Repository navigation
feat: agentproto self-construction (create_driver, self_inspect, loadAgent, updateManifestSet) - #23
Conversation
- Add .github/workflows/release.yml (changesets/action two-state flow) - Update ci.yml: frozen-lockfile, pnpm cache, changeset-check job on PRs - Add .changeset/config.json + README with full process doc - Expand scripts/publish-packages.sh to all 50+ packages in dep order - Fix dead code in corpus/synthesize.ts (trim + startsWith bug) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
`pnpm changeset status --since=origin/main` exits with code 254 on some CLI versions. Replaced with a plain `git diff --diff-filter=A` check — no pnpm/node install needed, no fragile exit codes. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…s it automatically
- scripts/auto-changeset.mjs — calls claude-haiku-4-5 with the git diff, determines affected packages + bump type, writes .changeset/<slug>.md - .github/workflows/auto-changeset.yml — triggers on PR open/sync, skips if changeset already present, commits result back to branch - pnpm changeset:auto — same script usable locally Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add DoctypeSpec for DRIVER.md (spec.ts) + re-export from @agentproto/driver index - Thread driverSpec into agentproto-serve so MCP server registers create_driver - Add @agentproto/driver dep + external in cli/tsup.config.ts - Add @agentproto/manifest dep to @agentproto/driver (needed by spec) - Bundled adapter catalog (catalog.ts) + listAdaptersWithCatalog in resolve.ts (carried alongside: serve.ts imports both for adapter discovery) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add validateExtendsChain (AIP-42: max depth 5, cycle detection)
- Add loadAgent — resolves AGENT.md from disk, validates the chain before
returning {handle, body}; callers no longer need parseAgentManifest + agentFromManifest
- Re-export loadAgent + validateExtendsChain from @agentproto/agent index
- defineAgent: widen extendsChain field type to full AgentManifest[] for runtime use
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- New self_inspect MCP tool: reads the running server's own AGENT.md, resolves the extends-chain via @agentproto/agent loadAgent, and returns handle + body so an LLM can inspect the current agent's identity at runtime - Wire self-inspect-tool into the server index - Add @agentproto/agent + @agentproto/routine deps to mcp-server package.json - Export self-inspect entry in tsup.config.ts Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- updateManifestSet: accepts an array of {path, patch} pairs and applies
them atomically (all-or-nothing, no partial writes on error)
- Extend verbs.test.ts coverage for multi-file scenarios
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
End-to-end test that starts a real in-process MCP server, calls create_driver to register a driver manifest, then calls self_inspect to verify the agent reads its own identity — exercises the full create_driver → self_inspect path over the MCP JSON-RPC transport. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
serve.ts destructured model from startSession opts but the type in http-server.ts didn't declare it → TS2339 build failure. fix(corpus-cli): clean dist/specs before bundle-specs copy cpSync without prior rmSync left stale AIP dirs (e.g. aip-49/HARNESS from before HARNESS was moved to aip-52) in the published package. docs(aip-52): add ADAPTER.md for Harness spec Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Merge auto-changeset.yml into ci.yml with needs: [build-and-test] so Claude is never called for a broken build - Delete auto-changeset.yml (job now lives in ci.yml) - e2e test: replace `as Array<...>` cast with typed TextContent import from @modelcontextprotocol/sdk Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ckedIndexedAccess + unknown index sig)
…5, pnpm-setup@v6)
…overage Previous auto-generated changeset only caught @agentproto/corpus. Branch actually changed 8 packages: agent (minor), driver (minor), manifest (minor), mcp-server (minor), cli (patch), corpus (patch), corpus-cli (patch), runtime (patch). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
PR #23 — Agentic Code ReviewSummaryThis PR delivers a dense batch of well-structured features across four packages: AIP-42 Changeset
FindingsCorrectness
Type Safety
Tests
AIP Alignment
Nits
VerdictLGTM ✅ — All new features are correct, well-tested with real I/O and full E2E JSON-RPC coverage, properly exported, and cleanly aligned to AIP-42/30 specs. The CI overhaul (frozen lockfile, action v5 bumps, pnpm cache, agentic reviewer pipeline, release workflow) is a significant improvement. Minor nits do not block merge. |
Summary
Enables an agentproto runtime to construct and introspect itself at runtime via MCP tools.
create_driver— new MCP verb that registers a DRIVER.md manifest; driver doctype (@agentproto/driver) exposed viaDoctypeSpecand threaded intoagentproto-serveself_inspect— new MCP tool: reads the running server's ownAGENT.md, resolves the fullextendschain vialoadAgent, returns handle + body so the LLM can inspect its own identity at runtimeloadAgent— resolvesAGENT.mdfrom disk, validates the extends-chain (AIP-42: max depth 5, cycle detection) before returning; replaces manualparseAgentManifest + agentFromManifestcallsvalidateExtendsChain— standalone validator, re-exported from@agentproto/agentupdateManifestSet— atomic multi-file manifest writes (all-or-nothing, no partial writes on error)create_driverthenself_inspectover JSON-RPC transportAlso included
Release pipeline setup (changesets, CI, auto-changeset agent) from
chore/release-pipeline.Test plan
Build + testpassesGenerate changesetruns and commits a.changeset/*.mdto the branchChangeset present?passes after the auto-commit🤖 Generated with Claude Code