Skip to content

feat: add introspect.describe command#1527

Draft
raman325 wants to merge 2 commits intomasterfrom
feat/introspect-describe
Draft

feat: add introspect.describe command#1527
raman325 wants to merge 2 commits intomasterfrom
feat/introspect-describe

Conversation

@raman325
Copy link
Collaborator

@raman325 raman325 commented Mar 4, 2026

Summary

  • Add introspect.describe command that returns the fully-resolved JSON Schema for a specific command by name
  • Walks the generated IncomingMessage schema to find the matching command definition, then recursively inlines all $ref pointers
  • Returns UnknownCommandError if the command name is not found

Blocked by #1525

Test plan

  • Verify introspect.describe with a valid command name returns the correct inlined schema
  • Verify introspect.describe with an unknown command name returns an error
  • Verify existing introspect.commands still works correctly
  • Run npm test to confirm all checks pass

🤖 Generated with Claude Code

raman325 and others added 2 commits March 3, 2026 20:15
Add a new `introspect` command module that returns the JSON Schema
describing all incoming message types. The `introspect.commands`
command works before `initialize`, enabling API discovery
pre-negotiation.

- Create `src/lib/introspect/` module (command, incoming_message,
  outgoing_message, message_handler) following existing patterns
- Register in Instance enum and wire into server.ts
- Add `ts-json-schema-generator` for build-time schema generation
- Rename interfaces for `$ref` reuse (node, driver, controller,
  multicast_group incoming messages)
- Add introspection section to README with tool recommendations

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

1 participant