Repository navigation
fix(agents): born on the enforced ruleset; edits merge onto disk; agent_create takes shellSecrets (v0.470.1) - #905
Merged
Conversation
…nt_create takes shellSecrets (v0.470.1) - Every creation path (console, agent_create, import, catalog install, seeded agent-author, System agents) now stamps os.policy.id instead of 'default@v3', so non-default tenants stop logging a false policyContextMismatch per agent. - applyAgentEdit, applyAgentSnapshot (revert), the console config PUT and duplicate build on the on-disk agent.json (onDiskManifest) instead of the in-memory copy, so out-of-band edits are no longer silently reverted. - agent_create MCP tool exposes shellSecrets (route already sanitised it). - New scripts/agent-manifest-disk-test.cjs in test:governance. Closes #903, closes #904. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Closes #903, closes #904.
What changed
os.policy.idon every creation path: console/agent_createcreate, the runtime-aware create, manifest import, catalog install (installAgentFromCatalogrewrites the copiedagent.json), the seededagent-author, and the System agents (concierge/operator, strategist, diagnosis, skill-scout, consolidator, improver). Non-default tenants no longer get a falsepolicyContextMismatchwarning per new agent.onDiskManifest(ag)insrc/state/agent-edit.tsreadsagent.json(same as a rescan/restart would load) and falls back to memory if missing/unparseable/id-mismatched. It's now the base inapplyAgentEdit(self-edit + cross-agent apply),applyAgentSnapshot(revert), the consolePUT /api/agents/:id/config, and duplicate. Hand edits like an addedshellSecretsor correctedpolicyContextsurvive the next edit.agent_createtakesshellSecrets, passed through to the route's existing sanitiser. It declares intent only; injection is still gated by the vault grant.Not changed
default@v3on a non-default tenant keep it. Fixing those is still a job forpolicy-reconcile.init.tsscaffolding and the mock demo keep their labels, because they run before or without a tenant policy.Validation
npm run typecheck,npm run build,npm run test:governanceall green.scripts/agent-manifest-disk-test.cjs(19 checks, added to the gate) boots a tenant enforcingacme@v2and covers: creation stamps the ruleset with no drift warning;shellSecretsis accepted at creation; out-of-band edits survive the self-edit, the config PUT and a revert; the seededagent-authoris stamped.🤖 Generated with Claude Code