Skip to content

Print extension schemas: urlcode extensions, inspectExtensions and get_extensions - #94

Merged
jimhoyd merged 3 commits into
mainfrom
claude/issue-80-extensions-schema
Sep 18, 2026
Merged

jimhoyd merged 3 commits into
mainfrom
claude/issue-80-extensions-schema

Conversation

@jimhoyd

@jimhoyd jimhoyd commented Sep 18, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • urlcode extensions [--project DIR] [--host-file /abs/host.mjs] [--json] loads the operator host exactly as validate does (absolute path, outside the project, close afterwards) and prints each registration's name, contract version, targets, credential headers, configuration JSON Schema, policy JSON Schema, whether the project declares it, whether its projectSha256 pins the current revision, the routes that mount it and the routes whose policies (including the auth short form) require it. Declared-but-unregistered names are called out. Without --host-file it lists declared names only and notes that schemas need the host file. Nothing is activated.
  • SDK: inspectExtensions({project, hostFile?}) and describeExtensions(project, registrations?) exported from the package root and src/tooling.ts.
  • MCP: get_extensions is advertised only when urlcode mcp was started with --host-file on 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-authoring flag.
  • Docs: docs/EXTENSIONS.md "Discovering schemas", docs/TOOLING.md (SDK + MCP), CLI usage; llms-full.txt regenerated.

Validation

  • npm run verify green (lint, typecheck, check incl. llms-full, build, full test suite).
  • New tests in test/extensions.test.ts: temp demo host registry (whose activate throws, proving inspection never activates and close is called), examples/extensions mounts/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

jimhoyd and others added 3 commits September 18, 2026 06:24
…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
@jimhoyd
jimhoyd merged commit e5643fe into main Sep 18, 2026
12 checks passed
@jimhoyd
jimhoyd deleted the claude/issue-80-extensions-schema branch September 18, 2026 07:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

urlcode extensions: print each registered extension's configuration and policy schemas

2 participants