Repository navigation
v1.91.290.0 feat(harness): gstack registers its skills in whatever agent harness it is installed into (GSTA-135) - #3526
Merged
Conversation
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>
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>
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>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
|
😎 This pull request was merged. |
9 tasks done
…t 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>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…ease 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>
This was referenced Oct 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
./setup --host openclawused to print instructions for wiring gstack in by hand. It now registers gstack's 62 skills in OpenClaw's own skills folder through one router skill, and prints the ledger and the command that removes them.Before/after as text: ./setup --host openclaw: before, instructions to wire gstack in by hand; after, gstack's 62 skills registered in OpenClaw's own skills folder through one router skill, with a ledger and the removal command
Why
Garry asked for this on 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". Until now an agent working inside OpenClaw or Hermes could not find a single gstack skill until a person wired one in by hand. Running
./setupinside one of those harnesses now registers the skills the harness's own way, andgstack-uninstalltakes them back out.Blast radius
The change touches
setup(a new install arm for openclaw and hermes, an automatic step only when no--hostis given, and--refresh-registered),bin/gstack-uninstall(it reads the harness ledgers before removing anything), and the openclaw and hermes host configs. What makes this safe is that gstack writes only files its ledger names, inside the harness's own skills folder, and refuses symlinks, unowned entries and edited context blocks. Rung reached: script ran, with real OpenClaw 2026.10.6 and Hermes v2026.9.24 listing the skills, and./setupplusgstack-uninstallexercised end to end in temporary homes.Approvals
Source: gstack-approvals record for gsta-135/harness-registration (display only; not an approval citation).
Summary
gstack now knows each harness it can live in, and how that harness finds skills: OpenClaw and dots read a skills folder, Hermes reads one category folder, QM takes an org skill pack through its admin API, and Muse Code and Grok are detected and checked but never written to.
bin/gstack-harnessregisters, refreshes, lists and removes, and every file it writes goes into a ledger with its hash. Uninstall reads that ledger with bash alone, so it still works after bun is gone. When a harness has no folder gstack can write,register genericadds a router skill and a marked context block, and--printgives a paste-in version.Review found four ways the first version could lose data. Uninstall deleted the backups of edited skills, unregister followed a symlinked folder, a lone marker let the cut take the user's own lines, and a
--contextchange never reached the ledger. All four are fixed. Edited files now stay beside the original as<file>.edited-<time>, and a context block is cut only when it is exactly the block gstack wrote.Test Coverage
All new code paths have test coverage in
test/harness-register.test.ts, plus the setup and uninstall journeys.Tests: 15 → 19 in test/harness-register.test.ts (+4 new), with the setup and uninstall journeys extended to edit a skill before uninstalling.
Regression proof: the six blocker regressions fail at 808dead, pass after the fix (the edited file survives a full
gstack-uninstallfor openclaw and hermes; a lone, repeated or edited block is never cut; a moved--contextis recorded; a symlinked folder below the destination is never followed); the no-destination ledger case failed before d7cb3c1.Not covered by tests: the
status,detect,manifestand--printCLI subcommands, which were exercised by hand only, and Muse Code and Grok status, which needs their binaries.Tests ran: remote free tier 21309 at the reviewed tree (0 failed); the final remote run at the frozen head is recorded in the receipt.
Pre-Landing Review
Pass 1: four blocking findings (data loss and an unrecorded ledger block) were fixed, plus three informational ones: the ledger is now written before the files,
--refresh-registeredno longer flips a--skills allregistration back to router, and the context file mode is preserved on cut. Pass 2 (range 808dead..d7cb3c1) found nothing blocking.REVIEW_LOOP: passes=2 blocking_found=4 deferred=0 noted=13 fixed=7 scope=frozen
Gate edits: 2 listed, 2 read, 0 findings.
test/setup-help.test.tsdrops openclaw and hermes from the "finishes before installation preflight" set, andtest/gen-skill-docs.test.tsadds them to the accept-list string. Both follow the approved contract (they are now installs, not instruction-only hosts), andtest/harness-register.test.tsruns the real./setup --host openclaw|hermesin their place.Outside review: a gpt-6-astra Capy subagent (cross-family) completed, and its findings are included above. The Codex CLI did not run.
Review notes
These are informational and below the blocking floor, so they were listed rather than fixed:
lib/harness-register.tswithBlock).refresh()stops at the first failing registration, so one edited generic block keeps later ledgers from refreshing.test/harness-register.test.tsis not in the Windows lane...or a trailing slash is not rejected. Register never writes such rows.SKILL.md.edited-*makes the nextregisterrefuse the folder as unowned.--contextpointing at the router itself piles up.edited-*files.--contextis not reported, and its output reaches--jsonstdout.refreshrecreates a harness root the user deleted.pair-agent --local openclawwrites~/.openclaw/skills/gstack/browse-remote.json, which is the router's folder. Pairing before registering makesregisterrefuse, so register first, then pair.Exploratory QA
Real harnesses: OpenClaw 2026.10.6 lists the
gstackrouter as visible (all mode: 62 openclaw-managed skills, no duplicates), and Hermes v2026.9.24 status shows it visible. On both, the rendered preamble runs from the installed root (SKILL_START_PROTO: 1, rc=0). Live agent-session discovery for OpenClaw, Hermes and QM is pending with Harness Evals (HARN-5) and is not claimed here.Design Review
No frontend files changed, so design review was skipped.
Eval Results
No prompt bytes changed:
bun run gen:skill-docs --host allleaves git clean. eval-select falls back to full only becausesetupandhosts/are global touchfiles. Paid coverage is the PR's E2E Evals plus the train gate.Greptile Review
No Greptile comments.
Plan Completion
Plan items 1–6 and 8 are done. Item 7, the live discovery proofs, is pending with Harness Evals (HARN-5), as GStack Minder agreed. Drift: the manifest is a CLI JSON print rather than a
gstack-skills.jsonfile.Issues
Refs #3526
Verification Results
Local runs passed: the four blocker repros,
./setup --host openclaw|hermeswithgstack-uninstall, and setup run inside OpenClaw. Two things were not run: live agent sessions, which are pending with HARN-5, and the macOS and Windows lanes, which CI runs.TODOS
No TODO items completed in this PR. TODOS.md:404 ("Recording an instruction-only host from setup") still names Hermes and OpenClaw, and should shrink to GBrain after this lands.
Documentation
Status: updated. Factual edits in 3 files, no blockers.
Scope: gsta-135/harness-registration at d7cb3c1 against base 3986182 (9 commits, 25 files; no staged, unstaged or untracked content). Audited the 8 changed docs (README.md, docs/hosts.md, docs/install.md, docs/uninstall.md, docs/OPENCLAW.md, docs/ADDING_A_HOST.md, docs/capy-install.md, docs/troubleshooting.md § Agent harnesses) against bin/gstack-harness, lib/harness-register.ts, lib/harness-qm.ts, setup, bin/gstack-uninstall, hosts/*.ts and scripts/host-config.ts. Grepped all authored docs and templates for stale OpenClaw/Hermes instruction-only claims.
Documentation health:
./setupnow notes harness registration when run inside OpenClaw, Hermes or a Dot; agent harnesses added to the per-host notes line and to the Install details and Other agents index rows.--localskips it../setup --localnever writes under a harness folder.Coverage:
gstack-harnessregister/unregister/status: reference ✅ (hosts.md, troubleshooting.md), how-to ✅ (hosts.md table), tutorial ❌, explanation ✅ (ADDING_A_HOST.md).gstack-harness detect,refresh,auto: reference only in the CLI usage header. Common gap; a reference row in hosts.md would close it.--no-harness-auto/GSTACK_HARNESS_AUTO: reference ✅, how-to ✅.AI_AGENT=hermes-agent: undocumented (minor).Diagram drift: none found in the audited docs.
Suggest
/document-generatefor the how-to and reference gaps above.Test plan
bun test test/harness-register.test.ts: 19 pass, 0 failbun test test/setup-help.test.ts test/gen-skill-docs.test.ts test/script-invocation-tripwire.test.ts: 511 pass, 0 failbun run typecheckclean;bun run typecheck:testno new diagnostics🤖 Generated with Claude Code