-
Notifications
You must be signed in to change notification settings - Fork 829
feat(schema): output MCP tool spec envelope for all API commands #1048
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
sang-neo03
wants to merge
23
commits into
main
Choose a base branch
from
feat/ai-friendly-schema
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
dcb8dd1
feat(schema): add envelope types and ordered properties container
sang-neo03 7ab36c4
feat(schema): build meta_data.json key-order index for property ordering
sang-neo03 a7b02a6
feat(schema): implement convertProperty with file/enum/range/nested h…
sang-neo03 3020dc8
feat(schema): build inputSchema with x-in / file binary / yes injection
sang-neo03 f3f4442
feat(schema): build outputSchema wrapping responseBody
sang-neo03 d068624
feat(schema): build _meta with scopes/risk/access_tokens normalization
sang-neo03 e650faa
feat(schema): scaffold affordance overlay loader (PR-1 stub)
sang-neo03 b7bc039
feat(schema): wire up AssembleEnvelope main entry point
sang-neo03 8b27de5
feat(schema): parse dotted and space-separated path arguments
sang-neo03 6c74138
feat(schema): batch envelope assembly with optional method filter
sang-neo03 fcc1c03
feat(schema): implement L1-L3 envelope lint (structure/type/cross-field)
sang-neo03 e9f193e
feat(schema): measure L4 coverage and gate all envelopes through L1-L3
sang-neo03 fc72fde
feat(schema): add golden test harness with UPDATE_GOLDEN refresh
sang-neo03 38b4683
test(schema): seed 20 golden envelopes covering edge cases
sang-neo03 99a84db
feat(schema): output MCP envelope as default JSON, preserve pretty mode
sang-neo03 ea3b2d3
test(schema): cover envelope JSON output, space-form path, yes injection
sang-neo03 440ad39
feat(schema): assemble envelope from embedded data only for stability
sang-neo03 955bfdf
chore(schema): lint cleanup
sang-neo03 762dc64
fix(schema): preserve dotted resource segments in envelope name
sang-neo03 e7076bf
fix(schema): align MCP envelope output with JSON Schema 2020-12 contract
sang-neo03 722e8ac
fix(schema): address CodeRabbit findings and stabilize CI tests
sang-neo03 23086ae
chore(schema): refresh golden envelopes after meta_data drift
sang-neo03 54389d3
fix(schema): address CodeRabbit round-3 review findings
sang-neo03 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| # Reserved for future _meta.affordance overlays. Empty in PR-1. |
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Return defensive copies from embedded getters.
These functions currently expose mutable package-level slices. A caller can mutate shared state and affect subsequent assembly determinism.
🔧 Proposed fix
func EmbeddedMetaJSON() []byte { - return embeddedMetaJSON + if len(embeddedMetaJSON) == 0 { + return nil + } + out := make([]byte, len(embeddedMetaJSON)) + copy(out, embeddedMetaJSON) + return out } @@ func EmbeddedServiceNames() []string { parseEmbeddedServices() - return embeddedServiceNames + if len(embeddedServiceNames) == 0 { + return nil + } + out := make([]string, len(embeddedServiceNames)) + copy(out, embeddedServiceNames) + return out }Also applies to: 75-77
🤖 Prompt for AI Agents