From 44f19d01069257e613edd063da77576587847121 Mon Sep 17 00:00:00 2001 From: Garry Tan Date: Tue, 27 Oct 2026 21:33:53 -0700 Subject: [PATCH] v1.91.290.0 feat(harness): gstack registers its skills in whatever agent harness it is installed into (GSTA-135) (#3526) * wip: gstack-harness registrar (GSTA-135) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * wip: harness registration in setup, uninstall, tests Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * wip: harness hosts experimental, troubleshooting codes, kit Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * docs: agent harness registration (GSTA-135) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix: harness hosts run in place from the checkout in --status Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * test: bun-free ledger reader Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * docs: CHANGELOG for harness registration (Unreleased) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix(harness): keep edits beside themselves, never follow symlinks, cut only gstack's own context block Review blockers on #3526: uninstall deleted the edit backups under the state root; unregister followed a symlinked folder below the destination; a lone or edited context marker made the cut eat user lines; a re-register adding --context left an unrecorded block. Also: ledger written before the files, --refresh-registered no longer re-runs harness hosts through setup (gstack-harness refresh keeps their mode), bash goes through runBashSync, and setup tests follow openclaw/hermes becoming installs. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix(harness): a ledger with no destination row touches nothing (no hang) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * docs: harness registration in README, install and hosts (document-release audit) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> --------- Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> --- CHANGELOG.md | 25 ++ README.md | 16 +- VERSION | 2 +- agents-digest/gstack-AGENTS.md | 2 +- bin/gstack-harness | 148 +++++++ bin/gstack-harness-ledger.sh | 89 ++++ bin/gstack-install-registry.sh | 12 +- bin/gstack-uninstall | 16 + docs/ADDING_A_HOST.md | 33 +- docs/OPENCLAW.md | 14 +- docs/capy-install.md | 4 +- docs/hosts.md | 46 +- docs/install.md | 10 +- docs/troubleshooting.md | 58 +++ docs/uninstall.md | 5 +- hosts/hermes.ts | 8 +- hosts/openclaw.ts | 9 +- lib/harness-qm.ts | 114 +++++ lib/harness-register.ts | 560 +++++++++++++++++++++++++ package.json | 2 +- scripts/host-config.ts | 13 +- setup | 96 ++--- test/agents-digest.test.ts | 26 +- test/fixtures/module-size-ratchet.json | 2 + test/gen-skill-docs.test.ts | 4 +- test/harness-register.test.ts | 356 ++++++++++++++++ test/host-conformance.test.ts | 3 +- test/setup-help.test.ts | 5 +- 28 files changed, 1549 insertions(+), 129 deletions(-) create mode 100755 bin/gstack-harness create mode 100644 bin/gstack-harness-ledger.sh create mode 100644 lib/harness-qm.ts create mode 100644 lib/harness-register.ts create mode 100644 test/harness-register.test.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index 57b7c90e4..b0f5f92ad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,30 @@ # Changelog +## [1.91.290.0] - 2026-10-28 + +**Installing gstack inside an agent harness now gives that harness gstack's skills, the harness's own way.** Until now OpenClaw and Hermes were instruction-only: `./setup --host hermes` printed a digest path and changed nothing, so an agent working inside OpenClaw or Hermes could not find a single gstack skill until a person wired one in by hand, and QM, dots, Muse Code and Grok were unknown to gstack (Garry, 2026-10-27: "when gstack is installed inside OpenClaw, Hermes, qm, muse, grok bot, dots or any harness it auto resolves and figures out how to use the skills"). `./setup` run inside OpenClaw, Hermes or a Dot now registers gstack there in the same run; `gstack-uninstall` takes it back out. + +### Added +- **`bin/gstack-harness`** (`lib/harness-register.ts`, `lib/harness-qm.ts`): `register`, `unregister`, `status`, `detect`, `refresh`, `auto` and `manifest` for seven targets. OpenClaw gets one `gstack` router skill (one 254-byte description line in every request; its body lists every skill with its path) in `$OPENCLAW_STATE_DIR/skills`, or every skill with `--skills all`. Hermes gets every skill as `gstack-` in one `gstack` category, because it opens only skills it has indexed. A Dot gets the router in `/home/dot/skills`. QM gets an org skill pack (`github.com/garrytan/gstack` at the installed commit) through one explicit admin command, `register qm --yes`, which lists packs first so a retry never makes a second one. Muse Code and Grok Build already read `~/.claude/skills`; `status` reports them as discovered, Claude-rendered and unverified. Any other harness gets the router in a skills folder (`--skills-dir`) or a routing block of at most 600 bytes between `gstack:begin`/`gstack:end` markers in a context file (`--context`), and `--print` writes both to stdout for chat-only apps such as Grok Bot. +- **Ownership ledger**: every file gstack-harness writes goes into `$GSTACK_STATE_ROOT/harness/.ledger` with its sha256. Registering again changes only what changed; a folder or a skill name gstack did not write stops it; a destination that is your home, the checkout, a symlink or outside a plain path is refused. `gstack-uninstall` reads the ledgers with `bin/gstack-harness-ledger.sh` (bash only) before it removes the checkout, never follows a symlink below the destination, and renames any file you edited to `.edited-