Repository navigation
Print extension schemas: urlcode extensions, inspectExtensions and get_extensions - #94
Merged
Merged
Conversation
…t_extensions Add `urlcode extensions [--project DIR] [--host-file /abs/host.mjs] [--json]`, which loads the operator host exactly as `validate` does and reports each registration's name, contract version, targets, credential headers, configuration and policy JSON Schemas, whether the project declares it, whether its revision pin matches and which routes mount or require it. Without --host-file it lists declared names only and says schemas need the host file. Expose the same report as `inspectExtensions`/`describeExtensions` from the package root and as the MCP tool `get_extensions`, which the server advertises only when started with --host-file from the command line; the server loads the host once for the session and releases it on exit. Document the discovery path in EXTENSIONS.md and TOOLING.md and cover it with tests against a temp demo registry and examples/extensions. Closes #80 Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01AQ3ZGqNtWviSYfUMsxU54E
Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01AQ3ZGqNtWviSYfUMsxU54E
Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01AQ3ZGqNtWviSYfUMsxU54E
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.
Summary
urlcode extensions [--project DIR] [--host-file /abs/host.mjs] [--json]loads the operator host exactly asvalidatedoes (absolute path, outside the project,closeafterwards) and prints each registration's name, contract version, targets, credential headers, configuration JSON Schema, policy JSON Schema, whether the project declares it, whether itsprojectSha256pins the current revision, the routes that mount it and the routes whose policies (including theauthshort form) require it. Declared-but-unregistered names are called out. Without--host-fileit lists declared names only and notes that schemas need the host file. Nothing is activated.inspectExtensions({project, hostFile?})anddescribeExtensions(project, registrations?)exported from the package root andsrc/tooling.ts.get_extensionsis advertised only whenurlcode mcpwas started with--host-fileon the command line; the server loads the host once for the session and releases it on exit. Without the flag the tool is absent and calls are rejected (-32602). Composes with the existing--allow-authoringflag.docs/EXTENSIONS.md"Discovering schemas",docs/TOOLING.md(SDK + MCP), CLI usage;llms-full.txtregenerated.Validation
npm run verifygreen (lint, typecheck, check incl. llms-full, build, full test suite).test/extensions.test.ts: temp demo host registry (whoseactivatethrows, proving inspection never activates andcloseis called),examples/extensionsmounts/policy routes/revision pin, the no-host path, the outside-project host-file rejection, the CLI text and JSON output, and MCP tool presence/absence with and without--host-file.Closes #80
🤖 Generated with Claude Code
https://claude.ai/code/session_01AQ3ZGqNtWviSYfUMsxU54E
Generated by Claude Code