feat(prime): finish AgentProfile coverage — wire verified dimensions, reject the rest loudly - #123
Merged
Merged
Conversation
… reject the rest loudly Bump @tangle-network/agent-interface to 0.45.0, whose harness enum now carries 'prime'; a profile pinned to harness 'prime' runs and any other pin still refuses. Wire the three dimensions the pinned fork clone (v0.7.0, be9e2fa0) verifiably loads from the per-run agent dir in --mode rpc: - prompt.instructions + resources.instructions -> <agentDir>/AGENTS.md (global context file, core/resource-loader.ts:58-90, injected on both prompt paths, core/system-prompt.ts:76-82/150-156) - inline resources.skills -> <agentDir>/skills/<name>/SKILL.md (auto-discovered, core/package-manager.ts:2171/2240-2246; frontmatter normalized because a description-less SKILL.md is silently dropped, core/skills.ts:415-417) - subagents -> merge-seeded global entries in <agentDir>/harness/harness_state.json (loaded on every system-prompt build, core/refinement/refinement.ts:269-283 + core/agent-session.ts:4288; kernel reads the same file, rlm/harness.py:77-90), tagged source=cli-bridge-profile so re-provisioning replaces exactly its own entries and the agent's self-created state survives A bridge-owned manifest prunes stale bridge-written files on session re-provision, with a path guard so a tampered manifest cannot delete outside the agent dir. A corrupt harness_state.json refuses the run instead of resetting agent self-modification state. Persistent operator agent dirs are never rewritten: profile material there is refused. Every dimension without a verified fork loader is now rejected loudly instead of silently dropped: permissions, tools, hooks, modes, connections, confidential, resources.files/tools/agents/commands, GitHub-backed refs, subagent model/tools/permissions/maxSteps pins, unknown extensions.prime keys, and profile-scoped MCP (kernel MCP tools exist only as installed Python McpIntegration skill packages; core/mcp/mcp-manager.ts:73 skips non-http settings entries outright).
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
Completes AgentProfile coverage in the prime backend on agent-interface 0.45.0.
Wired, each with fork file:line proof (pinned clone v0.7.0
be9e2fa0):harness: "prime"accepted (explicit tests both ways —"pi"still refuses).prompt.instructions+resources.instructions→ agent-dirAGENTS.md— the fork loads a global context file from the agent dir on both the default and--system-promptprompt paths (resource-loader.ts,system-prompt.ts); no caller-workspace writes.resources.skills(inline) → agent-dirskills/<name>/SKILL.md, auto-discovered and prompt-injected; name rules mirrored as bridge validation; description-required satisfied via normalizeSkillMd.subagents(description/prompt/metadata) → global continual-harness store entries; shape satisfies both the host reader and the kernel's Python reader.Rejected loudly with evidence:
mcp(settings.jsonmcpServersnever becomes model-visible in the fork),permissions/tools/hooks, subagent model/tools/permissions/maxSteps.Proof
tests/prime-backend.test.ts: 40 passed | 1 skipped (gated real-binary smoke).prompt-intent.test.ts, the PR feat(backends): honor replace-vs-append prompt intent, or refuse it loudly #120appendSystemPromptgap; upstream fix belongs in agent-profile-materialize, which lacks the field through published 0.10.3). tsc: exactly the 6 pre-existing errors, none in prime files.git merge-treeclean into main.Upstream debt (named, not smuggled)
agent-profile-materializeneeds aprimeHarnessId andappendSystemPrompton WorkspacePlan/Receipt — both belong in agent-sdk; the prime dimension wiring here folds into the shared materializer when that lands.