Files
t0saki 31f017bc16 fix(openclaw): commit the generated shared runtime copies again (#5062)
#4773 moved examples/openclaw-plugin/shared/ out of git on the grounds that
the plugin ships as a package and builds its copies at pack time. That holds
for ClawHub and npm, but not for every way the plugin is installed or built:

- ov-install's GitHub source downloads the plugin file by file from a git
  ref. install-manifest.json lists shared/ as required, the GitHub contents
  API answers 404 for it on main, and the helper exits after three retries.
  It is reached with --plugin-version=main/master/v*, --github-repo,
  PLUGIN_SOURCE=github, and whenever npm resolution fails and the helper
  falls back to GitHub. The helper cannot run sync.mjs on that path, and a
  helper-side fix would not reach the copies already installed globally.
- build.sh, bot/scripts/install_local_openclaw_plugin.sh and the guide's
  `npm run typecheck` / `npm run build` steps never run sync.mjs, so on a
  fresh clone tsc cannot resolve ./shared/recall-core.mjs.

The closure is two modules (three files with the declaration), so mark the
target committed, drop its .gitignore entry, commit the copies, and let the
shared-sync workflow regenerate them on main alongside the other committed
lanes. The capability reference and plugin-development guide now list
OpenClaw with the committed targets.
2026-09-15 20:54:51 +08:00

56 lines
1.8 KiB
YAML

name: Plugin Shared Runtime Sync
# The plugins a host installs by pointing at a directory in this repository —
# Claude Code, Codex, the Agent Plugins package, and OpenClaw through
# ov-install's GitHub source — can only load files git holds, so their copies of the shared runtime have to be committed. Generating
# them by hand is what let a copy go stale on main while the pull request that
# changed the library looked complete. This regenerates them after the merge.
#
# The plugins published as an npm package or assembled into a tarball build
# their copies at pack time and keep none in git; nothing here touches them.
on:
push:
branches: [main]
paths:
- "examples/memory-plugin-shared/lib/**"
- "examples/memory-plugin-shared/sync.mjs"
- "examples/skills/**"
- "examples/claude-code-memory-plugin/**"
- "examples/codex-memory-plugin/**"
- "examples/openclaw-plugin/**"
- "agent-plugins/**"
workflow_dispatch:
permissions:
contents: write
concurrency:
group: plugin-shared-sync
cancel-in-progress: false
jobs:
sync:
name: Regenerate the committed shared copies
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: "24"
- run: node examples/memory-plugin-shared/sync.mjs
- name: Commit what changed
run: |
git add -A
if git diff --cached --quiet; then
echo "the committed copies already match the library"
exit 0
fi
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git commit -m "chore(plugins): regenerate the committed shared runtime copies"
git push