feat(mcp): ship compact cross-agent surface and reliable hooks#290
Open
zzet wants to merge 25 commits into
Open
feat(mcp): ship compact cross-agent surface and reliable hooks#290zzet wants to merge 25 commits into
zzet wants to merge 25 commits into
Conversation
zzet
commented
Jul 12, 2026
| // Keep this roster closed and agent-neutral. The bare names are the exact | ||
| // public CLI/MCP names; Pi adds only its collision-avoidance prefix at the | ||
| // registration boundary. | ||
| const PUBLIC_TOOLS: ToolDescriptor[] = [ |
Owner
Author
There was a problem hiding this comment.
TODO: validate if it makes sense to keep the dynamic list for preset instead of hardcoded.
zzet
commented
Jul 12, 2026
zzet
commented
Jul 12, 2026
| } | ||
|
|
||
| // --------------------------------------------------------------------------- | ||
| // On-demand tool discovery (mirrors MCP tools_search + promotion) |
Owner
Author
There was a problem hiding this comment.
TODO: validate if it makes sense to keep the tools discovery logic.
zzet
commented
Jul 12, 2026
| // Keep this roster closed and agent-neutral. The bare names are the exact | ||
| // public CLI/MCP names; Pi adds only its collision-avoidance prefix at the | ||
| // registration boundary. | ||
| const PUBLIC_TOOLS: ToolDescriptor[] = [ |
Owner
Author
There was a problem hiding this comment.
TODO: validate if it makes sense to keep the dynamic list for preset instead of hardcoded.
Duplicate of #290 (comment) comment.
zzet
commented
Jul 12, 2026
| } | ||
|
|
||
| // --------------------------------------------------------------------------- | ||
| // On-demand tool discovery (mirrors MCP tools_search + promotion) |
Owner
Author
There was a problem hiding this comment.
TODO: validate if it makes sense to keep the tools discovery logic.
Duplicate of #290 (comment) comment
Owner
Author
|
Optimization and language-outlier update (2026-07-13) Shipped on this branch:
Validation:
|
Applies De Morgan's law to satisfy staticcheck QF1001 flagged by CI lint.
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
read/edit, operation-dispatched domain tools, and stable operation schemas returned on demand bycapabilitiesmcp__gortexand non-prefixedgortexnamespaces), required at startup, and tolerant of bounded daemon cold startgortex callonly for harnesses that have no MCP transport by designdocs/mcp-facade-v1.mdPublic contract and schema
initialize -> tools/listreturns the same 21 public tools for canonical clients, supported aliases, and unknown non-empty client names; empty/pre-initialize sessions retain the server defaultread({target:{file:"..."}})and symbol/fileeditcalls infer their operation from the selectorchange({operation:"impact", target:{symbol:"..."}})andtarget.symbolsnow use the same selector family asreadandrelations; compatibilitysource.symbolsstill lowers correctly, while an explicittargetwinscapabilitiesprojects every available operation into the stable public envelope instead of exposing captured handler fields such asids; fixed server arguments stay hiddenrequest_shapevalidates against both its operation schema and the static facade schemaHost and agent integration
features.code_mode.direct_only_tool_namespaces = ["mcp__gortex", "gortex"],required = true, andstartup_timeout_sec = 90docs/versioning.mdImpact safety and explore quality
LOW / 0 affectedresultchange.impactcalls remain stable; the reported first-correct/later-zero race has dedicated regression and race coverageexplorekeeps the best generic data-leaf match but demotes repeated same-name leaves behind callable/type targets; literal symbol lookup ordering is unchangedclientvariables, then proves the public response restores the relevant callableread/searchoperationsCodex hook and issue coverage
deny/ conservativerewritepostures; hard deny requires a workspace-scoped graph-confirmed match.gortex init --hooks-onlymigrates stale managed matchers and posture commands without duplicating hooks or touching MCP/instruction surfaces.cat,head,tail, and bounded non-mutatingsed -n/awk NR...printshapes.fd,ls,tree -fi, andgit ls-files; ambiguous or execution-capable forms stay no-ops.read, including selector-default calls; advisory remains default, deny/rewrite opt-in.gortex call <public-tool>; MCP guidance never recommends a transport fallback.tools/listor settings-screen discovery alone is no longer considered success.Additional hook reliability:
hook-effectiveness.jsonlrecords event, emitted-context flag, daemon reachability, capped alternation count, and latency, including no-op eventsUserPromptSubmitcan re-surface task-relevant graph context in long sessionsapply_patchPostToolUse runs change detection and derives affected-symbol tests, guards, and contractsGORTEX_CODEX_HOOK_MODE=enrich|deny|rewrite|suppresskeeps advisory behavior as default and provides opt-in enforcement/rewrite/output replacementsuppressuses Codex's supported PostToolUse result replacement fieldsIntentional Codex lifecycle gaps remain explicit: there is no separate
PreCompact/PostCompacthook becauseSessionStart(source="compact")restores orientation, and noStopcontinuation policy.Validation
go test ./internal/mcp -count=1passed, including facade/schema/explore integration-racewith repeated reach/impact runsTestColdIndexNoWallClockRegressionpassed in 4.99sgo vetpassed over tracked packagesgolangci-lint v2.11.4: 0 issuesgit diff --checkAddresses #241 and its referenced #206 implementation stories. Also covers the #259 follow-up.