@mirnoorata/codexa 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +634 -0
- package/dist/artifacts.d.ts +2 -0
- package/dist/artifacts.js +375 -0
- package/dist/artifacts.js.map +1 -0
- package/dist/autonomy.d.ts +17 -0
- package/dist/autonomy.js +124 -0
- package/dist/autonomy.js.map +1 -0
- package/dist/autoverify/policy.d.ts +5 -0
- package/dist/autoverify/policy.js +18 -0
- package/dist/autoverify/policy.js.map +1 -0
- package/dist/autoverify.d.ts +45 -0
- package/dist/autoverify.js +1041 -0
- package/dist/autoverify.js.map +1 -0
- package/dist/cache-lock.d.ts +16 -0
- package/dist/cache-lock.js +181 -0
- package/dist/cache-lock.js.map +1 -0
- package/dist/cli/hooks.d.ts +5 -0
- package/dist/cli/hooks.js +264 -0
- package/dist/cli/hooks.js.map +1 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +1034 -0
- package/dist/cli.js.map +1 -0
- package/dist/codex-contract.d.ts +2 -0
- package/dist/codex-contract.js +78 -0
- package/dist/codex-contract.js.map +1 -0
- package/dist/command.d.ts +34 -0
- package/dist/command.js +162 -0
- package/dist/command.js.map +1 -0
- package/dist/doctor.d.ts +112 -0
- package/dist/doctor.js +518 -0
- package/dist/doctor.js.map +1 -0
- package/dist/eval/baseline.d.ts +7 -0
- package/dist/eval/baseline.js +146 -0
- package/dist/eval/baseline.js.map +1 -0
- package/dist/eval/historical.d.ts +4 -0
- package/dist/eval/historical.js +663 -0
- package/dist/eval/historical.js.map +1 -0
- package/dist/eval/render.d.ts +2 -0
- package/dist/eval/render.js +53 -0
- package/dist/eval/render.js.map +1 -0
- package/dist/eval/scoring.d.ts +21 -0
- package/dist/eval/scoring.js +618 -0
- package/dist/eval/scoring.js.map +1 -0
- package/dist/eval/synthetic.d.ts +36 -0
- package/dist/eval/synthetic.js +107 -0
- package/dist/eval/synthetic.js.map +1 -0
- package/dist/eval/types.d.ts +36 -0
- package/dist/eval/types.js +2 -0
- package/dist/eval/types.js.map +1 -0
- package/dist/eval.d.ts +140 -0
- package/dist/eval.js +551 -0
- package/dist/eval.js.map +1 -0
- package/dist/git.d.ts +17 -0
- package/dist/git.js +189 -0
- package/dist/git.js.map +1 -0
- package/dist/github-release.d.ts +47 -0
- package/dist/github-release.js +610 -0
- package/dist/github-release.js.map +1 -0
- package/dist/github-sync.d.ts +68 -0
- package/dist/github-sync.js +345 -0
- package/dist/github-sync.js.map +1 -0
- package/dist/graph.d.ts +10 -0
- package/dist/graph.js +665 -0
- package/dist/graph.js.map +1 -0
- package/dist/indexer/aliases.d.ts +2 -0
- package/dist/indexer/aliases.js +190 -0
- package/dist/indexer/aliases.js.map +1 -0
- package/dist/indexer/artifact-writing.d.ts +3 -0
- package/dist/indexer/artifact-writing.js +79 -0
- package/dist/indexer/artifact-writing.js.map +1 -0
- package/dist/indexer/discovery.d.ts +2 -0
- package/dist/indexer/discovery.js +5 -0
- package/dist/indexer/discovery.js.map +1 -0
- package/dist/indexer/external-facts.d.ts +6 -0
- package/dist/indexer/external-facts.js +45 -0
- package/dist/indexer/external-facts.js.map +1 -0
- package/dist/indexer/freshness.d.ts +8 -0
- package/dist/indexer/freshness.js +56 -0
- package/dist/indexer/freshness.js.map +1 -0
- package/dist/indexer/graph-stage.d.ts +2 -0
- package/dist/indexer/graph-stage.js +21 -0
- package/dist/indexer/graph-stage.js.map +1 -0
- package/dist/indexer/parsing.d.ts +30 -0
- package/dist/indexer/parsing.js +177 -0
- package/dist/indexer/parsing.js.map +1 -0
- package/dist/indexer/pipeline.d.ts +5 -0
- package/dist/indexer/pipeline.js +8 -0
- package/dist/indexer/pipeline.js.map +1 -0
- package/dist/indexer/ranking.d.ts +4 -0
- package/dist/indexer/ranking.js +134 -0
- package/dist/indexer/ranking.js.map +1 -0
- package/dist/indexer.d.ts +13 -0
- package/dist/indexer.js +395 -0
- package/dist/indexer.js.map +1 -0
- package/dist/init.d.ts +24 -0
- package/dist/init.js +566 -0
- package/dist/init.js.map +1 -0
- package/dist/language.d.ts +8 -0
- package/dist/language.js +123 -0
- package/dist/language.js.map +1 -0
- package/dist/live-index.d.ts +68 -0
- package/dist/live-index.js +215 -0
- package/dist/live-index.js.map +1 -0
- package/dist/lsp/assist.d.ts +44 -0
- package/dist/lsp/assist.js +331 -0
- package/dist/lsp/assist.js.map +1 -0
- package/dist/lsp/client.d.ts +59 -0
- package/dist/lsp/client.js +208 -0
- package/dist/lsp/client.js.map +1 -0
- package/dist/mcp/compaction.d.ts +15 -0
- package/dist/mcp/compaction.js +1249 -0
- package/dist/mcp/compaction.js.map +1 -0
- package/dist/mcp/envelope.d.ts +44 -0
- package/dist/mcp/envelope.js +425 -0
- package/dist/mcp/envelope.js.map +1 -0
- package/dist/mcp/prompts.d.ts +2 -0
- package/dist/mcp/prompts.js +109 -0
- package/dist/mcp/prompts.js.map +1 -0
- package/dist/mcp/resources.d.ts +2 -0
- package/dist/mcp/resources.js +132 -0
- package/dist/mcp/resources.js.map +1 -0
- package/dist/mcp/runtime.d.ts +15 -0
- package/dist/mcp/runtime.js +122 -0
- package/dist/mcp/runtime.js.map +1 -0
- package/dist/mcp/session-memory.d.ts +3 -0
- package/dist/mcp/session-memory.js +61 -0
- package/dist/mcp/session-memory.js.map +1 -0
- package/dist/mcp/tool-registry.d.ts +269 -0
- package/dist/mcp/tool-registry.js +284 -0
- package/dist/mcp/tool-registry.js.map +1 -0
- package/dist/mcp/tools.d.ts +53 -0
- package/dist/mcp/tools.js +372 -0
- package/dist/mcp/tools.js.map +1 -0
- package/dist/mcp-repo-root.d.ts +16 -0
- package/dist/mcp-repo-root.js +322 -0
- package/dist/mcp-repo-root.js.map +1 -0
- package/dist/mcp-tool-catalog.d.ts +2 -0
- package/dist/mcp-tool-catalog.js +2 -0
- package/dist/mcp-tool-catalog.js.map +1 -0
- package/dist/mcp.d.ts +11 -0
- package/dist/mcp.js +332 -0
- package/dist/mcp.js.map +1 -0
- package/dist/outcome-ranking.d.ts +5 -0
- package/dist/outcome-ranking.js +115 -0
- package/dist/outcome-ranking.js.map +1 -0
- package/dist/parser/context.d.ts +28 -0
- package/dist/parser/context.js +2 -0
- package/dist/parser/context.js.map +1 -0
- package/dist/parser/ecma.d.ts +5 -0
- package/dist/parser/ecma.js +388 -0
- package/dist/parser/ecma.js.map +1 -0
- package/dist/parser/facts.d.ts +12 -0
- package/dist/parser/facts.js +137 -0
- package/dist/parser/facts.js.map +1 -0
- package/dist/parser/json.d.ts +3 -0
- package/dist/parser/json.js +318 -0
- package/dist/parser/json.js.map +1 -0
- package/dist/parser/markdown.d.ts +3 -0
- package/dist/parser/markdown.js +180 -0
- package/dist/parser/markdown.js.map +1 -0
- package/dist/parser/nodes.d.ts +5 -0
- package/dist/parser/nodes.js +75 -0
- package/dist/parser/nodes.js.map +1 -0
- package/dist/parser/python.d.ts +2 -0
- package/dist/parser/python.js +307 -0
- package/dist/parser/python.js.map +1 -0
- package/dist/parser/references.d.ts +3 -0
- package/dist/parser/references.js +204 -0
- package/dist/parser/references.js.map +1 -0
- package/dist/parser/risks.d.ts +4 -0
- package/dist/parser/risks.js +62 -0
- package/dist/parser/risks.js.map +1 -0
- package/dist/parser/routes.d.ts +5 -0
- package/dist/parser/routes.js +97 -0
- package/dist/parser/routes.js.map +1 -0
- package/dist/parser/shallow.d.ts +3 -0
- package/dist/parser/shallow.js +545 -0
- package/dist/parser/shallow.js.map +1 -0
- package/dist/parser/source.d.ts +4 -0
- package/dist/parser/source.js +127 -0
- package/dist/parser/source.js.map +1 -0
- package/dist/parser.d.ts +2 -0
- package/dist/parser.js +2 -0
- package/dist/parser.js.map +1 -0
- package/dist/placeholder-signals.d.ts +15 -0
- package/dist/placeholder-signals.js +511 -0
- package/dist/placeholder-signals.js.map +1 -0
- package/dist/post-edit-outcomes.d.ts +167 -0
- package/dist/post-edit-outcomes.js +484 -0
- package/dist/post-edit-outcomes.js.map +1 -0
- package/dist/queries.d.ts +12 -0
- package/dist/queries.js +13 -0
- package/dist/queries.js.map +1 -0
- package/dist/query/change-plan.d.ts +48 -0
- package/dist/query/change-plan.js +858 -0
- package/dist/query/change-plan.js.map +1 -0
- package/dist/query/compact-data.d.ts +25 -0
- package/dist/query/compact-data.js +74 -0
- package/dist/query/compact-data.js.map +1 -0
- package/dist/query/context.d.ts +5 -0
- package/dist/query/context.js +1162 -0
- package/dist/query/context.js.map +1 -0
- package/dist/query/diff.d.ts +5 -0
- package/dist/query/diff.js +111 -0
- package/dist/query/diff.js.map +1 -0
- package/dist/query/edge-evidence.d.ts +3 -0
- package/dist/query/edge-evidence.js +36 -0
- package/dist/query/edge-evidence.js.map +1 -0
- package/dist/query/formatting.d.ts +14 -0
- package/dist/query/formatting.js +67 -0
- package/dist/query/formatting.js.map +1 -0
- package/dist/query/graph-traversal.d.ts +22 -0
- package/dist/query/graph-traversal.js +218 -0
- package/dist/query/graph-traversal.js.map +1 -0
- package/dist/query/graph.d.ts +14 -0
- package/dist/query/graph.js +102 -0
- package/dist/query/graph.js.map +1 -0
- package/dist/query/impact.d.ts +28 -0
- package/dist/query/impact.js +568 -0
- package/dist/query/impact.js.map +1 -0
- package/dist/query/inspection.d.ts +9 -0
- package/dist/query/inspection.js +290 -0
- package/dist/query/inspection.js.map +1 -0
- package/dist/query/next-tools.d.ts +3 -0
- package/dist/query/next-tools.js +25 -0
- package/dist/query/next-tools.js.map +1 -0
- package/dist/query/placeholders.d.ts +24 -0
- package/dist/query/placeholders.js +121 -0
- package/dist/query/placeholders.js.map +1 -0
- package/dist/query/post-edit/decision.d.ts +49 -0
- package/dist/query/post-edit/decision.js +130 -0
- package/dist/query/post-edit/decision.js.map +1 -0
- package/dist/query/post-edit/dirty-scope.d.ts +16 -0
- package/dist/query/post-edit/dirty-scope.js +21 -0
- package/dist/query/post-edit/dirty-scope.js.map +1 -0
- package/dist/query/post-edit/next-actions.d.ts +22 -0
- package/dist/query/post-edit/next-actions.js +44 -0
- package/dist/query/post-edit/next-actions.js.map +1 -0
- package/dist/query/post-edit/snapshot-contract.d.ts +8 -0
- package/dist/query/post-edit/snapshot-contract.js +111 -0
- package/dist/query/post-edit/snapshot-contract.js.map +1 -0
- package/dist/query/post-edit.d.ts +5 -0
- package/dist/query/post-edit.js +1108 -0
- package/dist/query/post-edit.js.map +1 -0
- package/dist/query/quality.d.ts +43 -0
- package/dist/query/quality.js +134 -0
- package/dist/query/quality.js.map +1 -0
- package/dist/query/raw-search.d.ts +23 -0
- package/dist/query/raw-search.js +147 -0
- package/dist/query/raw-search.js.map +1 -0
- package/dist/query/runtime.d.ts +11 -0
- package/dist/query/runtime.js +79 -0
- package/dist/query/runtime.js.map +1 -0
- package/dist/query/search.d.ts +25 -0
- package/dist/query/search.js +429 -0
- package/dist/query/search.js.map +1 -0
- package/dist/query/session-memory.d.ts +3 -0
- package/dist/query/session-memory.js +108 -0
- package/dist/query/session-memory.js.map +1 -0
- package/dist/query/session.d.ts +41 -0
- package/dist/query/session.js +90 -0
- package/dist/query/session.js.map +1 -0
- package/dist/query/targets.d.ts +25 -0
- package/dist/query/targets.js +97 -0
- package/dist/query/targets.js.map +1 -0
- package/dist/query/test-commands.d.ts +10 -0
- package/dist/query/test-commands.js +110 -0
- package/dist/query/test-commands.js.map +1 -0
- package/dist/query/test-plan.d.ts +6 -0
- package/dist/query/test-plan.js +104 -0
- package/dist/query/test-plan.js.map +1 -0
- package/dist/query/tests.d.ts +48 -0
- package/dist/query/tests.js +444 -0
- package/dist/query/tests.js.map +1 -0
- package/dist/query/verification/shell.d.ts +20 -0
- package/dist/query/verification/shell.js +164 -0
- package/dist/query/verification/shell.js.map +1 -0
- package/dist/query/verification.d.ts +47 -0
- package/dist/query/verification.js +1123 -0
- package/dist/query/verification.js.map +1 -0
- package/dist/query/workflow.d.ts +17 -0
- package/dist/query/workflow.js +252 -0
- package/dist/query/workflow.js.map +1 -0
- package/dist/query/workspace-guidance.d.ts +26 -0
- package/dist/query/workspace-guidance.js +214 -0
- package/dist/query/workspace-guidance.js.map +1 -0
- package/dist/query/worktree-state.d.ts +22 -0
- package/dist/query/worktree-state.js +32 -0
- package/dist/query/worktree-state.js.map +1 -0
- package/dist/query/worktree.d.ts +16 -0
- package/dist/query/worktree.js +194 -0
- package/dist/query/worktree.js.map +1 -0
- package/dist/query-data.d.ts +4 -0
- package/dist/query-data.js +112 -0
- package/dist/query-data.js.map +1 -0
- package/dist/repo-files.d.ts +24 -0
- package/dist/repo-files.js +105 -0
- package/dist/repo-files.js.map +1 -0
- package/dist/resolver.d.ts +9 -0
- package/dist/resolver.js +555 -0
- package/dist/resolver.js.map +1 -0
- package/dist/retrieval.d.ts +46 -0
- package/dist/retrieval.js +783 -0
- package/dist/retrieval.js.map +1 -0
- package/dist/risk-ingest.d.ts +16 -0
- package/dist/risk-ingest.js +458 -0
- package/dist/risk-ingest.js.map +1 -0
- package/dist/rules.d.ts +10 -0
- package/dist/rules.js +107 -0
- package/dist/rules.js.map +1 -0
- package/dist/semantic/python.d.ts +9 -0
- package/dist/semantic/python.js +817 -0
- package/dist/semantic/python.js.map +1 -0
- package/dist/semantic/typescript.d.ts +10 -0
- package/dist/semantic/typescript.js +714 -0
- package/dist/semantic/typescript.js.map +1 -0
- package/dist/semantic-retrieval.d.ts +53 -0
- package/dist/semantic-retrieval.js +673 -0
- package/dist/semantic-retrieval.js.map +1 -0
- package/dist/session-memory/derivation.d.ts +6 -0
- package/dist/session-memory/derivation.js +400 -0
- package/dist/session-memory/derivation.js.map +1 -0
- package/dist/session-memory/event-log.d.ts +23 -0
- package/dist/session-memory/event-log.js +126 -0
- package/dist/session-memory/event-log.js.map +1 -0
- package/dist/session-memory/formatting.d.ts +7 -0
- package/dist/session-memory/formatting.js +86 -0
- package/dist/session-memory/formatting.js.map +1 -0
- package/dist/session-memory/model.d.ts +94 -0
- package/dist/session-memory/model.js +17 -0
- package/dist/session-memory/model.js.map +1 -0
- package/dist/session-memory/runtime.d.ts +24 -0
- package/dist/session-memory/runtime.js +289 -0
- package/dist/session-memory/runtime.js.map +1 -0
- package/dist/session-memory/store.d.ts +27 -0
- package/dist/session-memory/store.js +447 -0
- package/dist/session-memory/store.js.map +1 -0
- package/dist/session-memory.d.ts +1 -0
- package/dist/session-memory.js +2 -0
- package/dist/session-memory.js.map +1 -0
- package/dist/static-analysis.d.ts +36 -0
- package/dist/static-analysis.js +505 -0
- package/dist/static-analysis.js.map +1 -0
- package/dist/symbol-report-ingest.d.ts +8 -0
- package/dist/symbol-report-ingest.js +504 -0
- package/dist/symbol-report-ingest.js.map +1 -0
- package/dist/task-snapshots.d.ts +41 -0
- package/dist/task-snapshots.js +430 -0
- package/dist/task-snapshots.js.map +1 -0
- package/dist/types.d.ts +848 -0
- package/dist/types.js +12 -0
- package/dist/types.js.map +1 -0
- package/dist/util.d.ts +11 -0
- package/dist/util.js +63 -0
- package/dist/util.js.map +1 -0
- package/dist/version.d.ts +1 -0
- package/dist/version.js +5 -0
- package/dist/version.js.map +1 -0
- package/package.json +81 -0
- package/plugins/codexa/.codex-plugin/plugin.json +38 -0
- package/plugins/codexa/.mcp.json +20 -0
- package/plugins/codexa/scripts/codexa-mcp.js +100 -0
- package/plugins/codexa/skills/codexa/SKILL.md +48 -0
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
export type McpToolTier = "primary" | "advanced";
|
|
2
|
+
export type McpToolPhase = "orientation" | "brief" | "plan" | "review" | "verify" | "inspect" | "diagnose" | "risk" | "memory";
|
|
3
|
+
/** Typical structured-output size, as a routing hint for agents choosing the cheapest sufficient tool. */
|
|
4
|
+
export type McpToolCost = "compact" | "medium" | "large";
|
|
5
|
+
export interface McpToolRegistryEntry {
|
|
6
|
+
name: string;
|
|
7
|
+
title: string;
|
|
8
|
+
description: string;
|
|
9
|
+
tier: McpToolTier;
|
|
10
|
+
phase: McpToolPhase;
|
|
11
|
+
cost: McpToolCost;
|
|
12
|
+
writeEffects: string;
|
|
13
|
+
readOnly: boolean;
|
|
14
|
+
useWhen: string;
|
|
15
|
+
avoidWhen: string;
|
|
16
|
+
nextToolUse: string[];
|
|
17
|
+
}
|
|
18
|
+
export declare const MCP_TOOL_REGISTRY: readonly [{
|
|
19
|
+
readonly name: "session_context";
|
|
20
|
+
readonly title: "Codexa session context";
|
|
21
|
+
readonly description: "Orient at session start or resume: project focus, dirty groups, likely workflows, and the next Codexa call to make. Alias of focus_brief. Compact output.";
|
|
22
|
+
readonly tier: "primary";
|
|
23
|
+
readonly phase: "orientation";
|
|
24
|
+
readonly cost: "compact";
|
|
25
|
+
readonly writeEffects: "session-memory-auto";
|
|
26
|
+
readonly readOnly: false;
|
|
27
|
+
readonly useWhen: "Start or resume work in a repo and choose the next focused Codexa call.";
|
|
28
|
+
readonly avoidWhen: "You already have an explicit file or symbol target; use task_brief or change_plan instead.";
|
|
29
|
+
readonly nextToolUse: ["search", "task_brief"];
|
|
30
|
+
}, {
|
|
31
|
+
readonly name: "search";
|
|
32
|
+
readonly title: "Codexa hybrid semantic search";
|
|
33
|
+
readonly description: "First-class target discovery when the task or identifier is ambiguous: one bounded hybrid pass (raw, exact, symbol, ranking; semantic only when configured) with likely tests and value/gap labels. Medium output; cheaper than context_pack.";
|
|
34
|
+
readonly tier: "primary";
|
|
35
|
+
readonly phase: "inspect";
|
|
36
|
+
readonly cost: "medium";
|
|
37
|
+
readonly writeEffects: "index-cache-if-auto-refresh";
|
|
38
|
+
readonly readOnly: false;
|
|
39
|
+
readonly useWhen: "Before task_brief when the target is unclear, when a prompt is broad, or when you need one hybrid semantic/raw pass instead of repeated searches.";
|
|
40
|
+
readonly avoidWhen: "You already have precise files/symbols and need edit planning, drift review, or verification proof.";
|
|
41
|
+
readonly nextToolUse: ["task_brief", "change_plan"];
|
|
42
|
+
}, {
|
|
43
|
+
readonly name: "task_brief";
|
|
44
|
+
readonly title: "Codexa task brief";
|
|
45
|
+
readonly description: "Default pre-edit context once a target or bounded task is known: read-first files, impact expansion, risks, likely tests, freshness, confidence labels, snippets. Medium output.";
|
|
46
|
+
readonly tier: "primary";
|
|
47
|
+
readonly phase: "brief";
|
|
48
|
+
readonly cost: "medium";
|
|
49
|
+
readonly writeEffects: "session-memory-auto";
|
|
50
|
+
readonly readOnly: false;
|
|
51
|
+
readonly useWhen: "Before editing, debugging, or reviewing a specific task after search/session context has supplied a plausible target.";
|
|
52
|
+
readonly avoidWhen: "The target is still unclear; run first-class search or provide explicit files first.";
|
|
53
|
+
readonly nextToolUse: ["change_plan"];
|
|
54
|
+
}, {
|
|
55
|
+
readonly name: "change_plan";
|
|
56
|
+
readonly title: "Codexa change plan";
|
|
57
|
+
readonly description: "Plan a non-trivial edit; set saveSnapshot=true before editing so post_edit_review can detect drift. Returns plan targets, tests, freshness, and known gaps. Medium output.";
|
|
58
|
+
readonly tier: "primary";
|
|
59
|
+
readonly phase: "plan";
|
|
60
|
+
readonly cost: "medium";
|
|
61
|
+
readonly writeEffects: "task-snapshot-cache";
|
|
62
|
+
readonly readOnly: false;
|
|
63
|
+
readonly useWhen: "Before non-trivial edits; pass saveSnapshot=true to enable post-edit drift checks.";
|
|
64
|
+
readonly avoidWhen: "After edits are already made; use post_edit_review for dirty-tree accountability.";
|
|
65
|
+
readonly nextToolUse: ["post_edit_review"];
|
|
66
|
+
}, {
|
|
67
|
+
readonly name: "post_edit_review";
|
|
68
|
+
readonly title: "Codexa post-edit review";
|
|
69
|
+
readonly description: "Go-to post-edit review gate: compares the dirty tree against the change_plan snapshot for planned-vs-actual drift, symbol/risk deltas, affected callers/tests/workflows, and tests still unaccounted for. Pass the snapshot task id plus commands that actually ran. MCP calls do not persist outcome files. Large output, budget-compacted.";
|
|
70
|
+
readonly tier: "primary";
|
|
71
|
+
readonly phase: "review";
|
|
72
|
+
readonly cost: "large";
|
|
73
|
+
readonly writeEffects: "session-memory-auto";
|
|
74
|
+
readonly readOnly: false;
|
|
75
|
+
readonly useWhen: "Immediately after edits and before final response; pass the saved change_plan task id plus commands/tests that actually ran.";
|
|
76
|
+
readonly avoidWhen: "Before editing or without a meaningful diff to review.";
|
|
77
|
+
readonly nextToolUse: ["test_plan"];
|
|
78
|
+
}, {
|
|
79
|
+
readonly name: "test_plan";
|
|
80
|
+
readonly title: "Codexa test plan";
|
|
81
|
+
readonly description: "Recommend targeted tests for the current diff or top-ranked files. Recommendations only, not execution evidence. Compact output.";
|
|
82
|
+
readonly tier: "primary";
|
|
83
|
+
readonly phase: "verify";
|
|
84
|
+
readonly cost: "compact";
|
|
85
|
+
readonly writeEffects: "session-memory-auto";
|
|
86
|
+
readonly readOnly: false;
|
|
87
|
+
readonly useWhen: "Select verification for the current diff or after post_edit_review.";
|
|
88
|
+
readonly avoidWhen: "You need proof that tests ran; recommendations are not execution evidence.";
|
|
89
|
+
readonly nextToolUse: [];
|
|
90
|
+
}, {
|
|
91
|
+
readonly name: "workflow_path";
|
|
92
|
+
readonly title: "Codexa workflow path";
|
|
93
|
+
readonly description: "Trace route/job/manifest workflow paths related to a query, file, or symbol. Medium output.";
|
|
94
|
+
readonly tier: "advanced";
|
|
95
|
+
readonly phase: "inspect";
|
|
96
|
+
readonly cost: "medium";
|
|
97
|
+
readonly writeEffects: "index-cache-if-auto-refresh";
|
|
98
|
+
readonly readOnly: false;
|
|
99
|
+
readonly useWhen: "Inspect route, job, manifest, or workflow traces for a focused runtime path.";
|
|
100
|
+
readonly avoidWhen: "You only need startup orientation; session_context is cheaper.";
|
|
101
|
+
readonly nextToolUse: ["task_brief", "change_plan"];
|
|
102
|
+
}, {
|
|
103
|
+
readonly name: "freshness";
|
|
104
|
+
readonly title: "Codexa freshness";
|
|
105
|
+
readonly description: "Report whether the Codexa index is present, fresh, stale, or missing. Compact, read-only.";
|
|
106
|
+
readonly tier: "advanced";
|
|
107
|
+
readonly phase: "diagnose";
|
|
108
|
+
readonly cost: "compact";
|
|
109
|
+
readonly writeEffects: "none";
|
|
110
|
+
readonly readOnly: true;
|
|
111
|
+
readonly useWhen: "Check whether indexed artifacts are present, fresh, stale, or missing.";
|
|
112
|
+
readonly avoidWhen: "You need task-specific context; use task_brief after freshness is known.";
|
|
113
|
+
readonly nextToolUse: ["task_brief"];
|
|
114
|
+
}, {
|
|
115
|
+
readonly name: "repo_map";
|
|
116
|
+
readonly title: "Codexa repo map";
|
|
117
|
+
readonly description: "Ranked map of top modules and files for orientation. Compact output.";
|
|
118
|
+
readonly tier: "advanced";
|
|
119
|
+
readonly phase: "orientation";
|
|
120
|
+
readonly cost: "compact";
|
|
121
|
+
readonly writeEffects: "index-cache-if-auto-refresh";
|
|
122
|
+
readonly readOnly: false;
|
|
123
|
+
readonly useWhen: "Get a ranked repository map or module overview.";
|
|
124
|
+
readonly avoidWhen: "You need edit-ready task context; task_brief carries more proof.";
|
|
125
|
+
readonly nextToolUse: ["task_brief"];
|
|
126
|
+
}, {
|
|
127
|
+
readonly name: "find_context";
|
|
128
|
+
readonly title: "Codexa find context";
|
|
129
|
+
readonly description: "Locate files, symbols, and usage sites matching a precise query. Compact output; cheaper than search when the name is already known.";
|
|
130
|
+
readonly tier: "advanced";
|
|
131
|
+
readonly phase: "inspect";
|
|
132
|
+
readonly cost: "compact";
|
|
133
|
+
readonly writeEffects: "session-memory-auto";
|
|
134
|
+
readonly readOnly: false;
|
|
135
|
+
readonly useWhen: "Find matching files, symbols, and usage sites for a precise query.";
|
|
136
|
+
readonly avoidWhen: "You need dirty-diff review or saved edit planning.";
|
|
137
|
+
readonly nextToolUse: ["task_brief"];
|
|
138
|
+
}, {
|
|
139
|
+
readonly name: "context_pack";
|
|
140
|
+
readonly title: "Codexa context pack";
|
|
141
|
+
readonly description: "Largest evidence packet for one task: focus files, bounded impact expansion, evidence snippets, impact groups, tests, freshness, provenance. Use only when task_brief is not enough. Large output.";
|
|
142
|
+
readonly tier: "advanced";
|
|
143
|
+
readonly phase: "brief";
|
|
144
|
+
readonly cost: "large";
|
|
145
|
+
readonly writeEffects: "session-memory-auto";
|
|
146
|
+
readonly readOnly: false;
|
|
147
|
+
readonly useWhen: "Build a larger task-shaped packet with snippets, impact, tests, and provenance.";
|
|
148
|
+
readonly avoidWhen: "A small first-pass task_brief is enough.";
|
|
149
|
+
readonly nextToolUse: ["change_plan"];
|
|
150
|
+
}, {
|
|
151
|
+
readonly name: "focus_brief";
|
|
152
|
+
readonly title: "Codexa focus brief";
|
|
153
|
+
readonly description: "Classify a broad natural-language task, pick likely subsystems, and recommend the next Codexa call. Compact output.";
|
|
154
|
+
readonly tier: "advanced";
|
|
155
|
+
readonly phase: "orientation";
|
|
156
|
+
readonly cost: "compact";
|
|
157
|
+
readonly writeEffects: "session-memory-auto";
|
|
158
|
+
readonly readOnly: false;
|
|
159
|
+
readonly useWhen: "Classify a broad natural-language task and choose likely subsystems.";
|
|
160
|
+
readonly avoidWhen: "You already know exact files or symbols.";
|
|
161
|
+
readonly nextToolUse: ["task_brief", "search"];
|
|
162
|
+
}, {
|
|
163
|
+
readonly name: "impact";
|
|
164
|
+
readonly title: "Codexa impact";
|
|
165
|
+
readonly description: "Blast-radius evidence for one file or symbol; traversal depth auto-scales with changeType (rename/delete reach deeper than style). Medium output.";
|
|
166
|
+
readonly tier: "advanced";
|
|
167
|
+
readonly phase: "inspect";
|
|
168
|
+
readonly cost: "medium";
|
|
169
|
+
readonly writeEffects: "session-memory-auto";
|
|
170
|
+
readonly readOnly: false;
|
|
171
|
+
readonly useWhen: "Inspect blast radius for one file or symbol before an API, behavior, rename, or delete change.";
|
|
172
|
+
readonly avoidWhen: "No target is known; use search or task_brief first.";
|
|
173
|
+
readonly nextToolUse: ["change_plan"];
|
|
174
|
+
}, {
|
|
175
|
+
readonly name: "diff_impact";
|
|
176
|
+
readonly title: "Codexa diff impact";
|
|
177
|
+
readonly description: "Group the current dirty git diff into impact modules before review or verification. Medium output.";
|
|
178
|
+
readonly tier: "advanced";
|
|
179
|
+
readonly phase: "inspect";
|
|
180
|
+
readonly cost: "medium";
|
|
181
|
+
readonly writeEffects: "index-cache-if-auto-refresh";
|
|
182
|
+
readonly readOnly: false;
|
|
183
|
+
readonly useWhen: "Group the current dirty tree before review or verification.";
|
|
184
|
+
readonly avoidWhen: "The tree is clean or you need a saved-snapshot drift review.";
|
|
185
|
+
readonly nextToolUse: ["post_edit_review", "test_plan"];
|
|
186
|
+
}, {
|
|
187
|
+
readonly name: "symbol_context";
|
|
188
|
+
readonly title: "Codexa symbol context";
|
|
189
|
+
readonly description: "Proof-carrying neighborhood for one symbol: callers, callees, references, tests, risks, evidence. depth=1 is compact; depth=3 expands several-fold.";
|
|
190
|
+
readonly tier: "advanced";
|
|
191
|
+
readonly phase: "inspect";
|
|
192
|
+
readonly cost: "medium";
|
|
193
|
+
readonly writeEffects: "index-cache-if-auto-refresh";
|
|
194
|
+
readonly readOnly: false;
|
|
195
|
+
readonly useWhen: "Inspect one symbol's definition and usage sites.";
|
|
196
|
+
readonly avoidWhen: "You need full file blast radius; use impact.";
|
|
197
|
+
readonly nextToolUse: ["impact"];
|
|
198
|
+
}, {
|
|
199
|
+
readonly name: "callers";
|
|
200
|
+
readonly title: "Codexa callers";
|
|
201
|
+
readonly description: "Typed inbound graph edges (calls, references, imports, tests) for a file or symbol. Compact output.";
|
|
202
|
+
readonly tier: "advanced";
|
|
203
|
+
readonly phase: "inspect";
|
|
204
|
+
readonly cost: "compact";
|
|
205
|
+
readonly writeEffects: "index-cache-if-auto-refresh";
|
|
206
|
+
readonly readOnly: false;
|
|
207
|
+
readonly useWhen: "Find typed inbound graph edges for a focused file or symbol.";
|
|
208
|
+
readonly avoidWhen: "You need outgoing dependencies; use callees.";
|
|
209
|
+
readonly nextToolUse: ["impact"];
|
|
210
|
+
}, {
|
|
211
|
+
readonly name: "callees";
|
|
212
|
+
readonly title: "Codexa callees";
|
|
213
|
+
readonly description: "Typed outbound graph edges (calls, references, imports, tests, risks) for a file or symbol. Compact output.";
|
|
214
|
+
readonly tier: "advanced";
|
|
215
|
+
readonly phase: "inspect";
|
|
216
|
+
readonly cost: "compact";
|
|
217
|
+
readonly writeEffects: "index-cache-if-auto-refresh";
|
|
218
|
+
readonly readOnly: false;
|
|
219
|
+
readonly useWhen: "Find typed outgoing graph edges for a focused file or symbol.";
|
|
220
|
+
readonly avoidWhen: "You need inbound usages; use callers.";
|
|
221
|
+
readonly nextToolUse: ["impact"];
|
|
222
|
+
}, {
|
|
223
|
+
readonly name: "dependency_path";
|
|
224
|
+
readonly title: "Codexa dependency path";
|
|
225
|
+
readonly description: "Bounded typed graph path between two known files or symbols. Compact output.";
|
|
226
|
+
readonly tier: "advanced";
|
|
227
|
+
readonly phase: "inspect";
|
|
228
|
+
readonly cost: "compact";
|
|
229
|
+
readonly writeEffects: "index-cache-if-auto-refresh";
|
|
230
|
+
readonly readOnly: false;
|
|
231
|
+
readonly useWhen: "Find a bounded graph path between two known files or symbols.";
|
|
232
|
+
readonly avoidWhen: "Either endpoint is unknown; use search first.";
|
|
233
|
+
readonly nextToolUse: ["change_plan"];
|
|
234
|
+
}, {
|
|
235
|
+
readonly name: "placeholder_report";
|
|
236
|
+
readonly title: "Codexa placeholder report";
|
|
237
|
+
readonly description: "Indexed placeholder, dummy, TODO, and stub findings; tracked as risk signals that participate in post_edit_review deltas. Compact output.";
|
|
238
|
+
readonly tier: "advanced";
|
|
239
|
+
readonly phase: "risk";
|
|
240
|
+
readonly cost: "compact";
|
|
241
|
+
readonly writeEffects: "index-cache-if-auto-refresh";
|
|
242
|
+
readonly readOnly: false;
|
|
243
|
+
readonly useWhen: "Inspect TODO, stub, dummy, and not-implemented risk signals.";
|
|
244
|
+
readonly avoidWhen: "You need ordinary file localization.";
|
|
245
|
+
readonly nextToolUse: ["task_brief"];
|
|
246
|
+
}, {
|
|
247
|
+
readonly name: "session_memory";
|
|
248
|
+
readonly title: "Codexa session memory";
|
|
249
|
+
readonly description: "Read, summarize, compact, or explicitly remember durable structured working memory for this Codex session. Cache-only; never mutates source. action=summary is the cheap overview. Compact output.";
|
|
250
|
+
readonly tier: "advanced";
|
|
251
|
+
readonly phase: "memory";
|
|
252
|
+
readonly cost: "compact";
|
|
253
|
+
readonly writeEffects: "explicit-memory-cache";
|
|
254
|
+
readonly readOnly: false;
|
|
255
|
+
readonly useWhen: "Read or write cache-only structured session memory for the current Codex workflow.";
|
|
256
|
+
readonly avoidWhen: "You need durable project docs or source changes.";
|
|
257
|
+
readonly nextToolUse: ["task_brief"];
|
|
258
|
+
}];
|
|
259
|
+
export type McpToolName = (typeof MCP_TOOL_REGISTRY)[number]["name"];
|
|
260
|
+
export type McpToolCatalogEntry = Pick<McpToolRegistryEntry, "name" | "tier" | "phase" | "cost" | "writeEffects" | "readOnly" | "useWhen" | "avoidWhen" | "nextToolUse">;
|
|
261
|
+
export declare const MCP_TOOL_CATALOG: readonly McpToolCatalogEntry[];
|
|
262
|
+
export declare const MCP_TOOL_NAMES: readonly ("context_pack" | "task_brief" | "focus_brief" | "session_context" | "change_plan" | "post_edit_review" | "test_plan" | "repo_map" | "search" | "find_context" | "symbol_context" | "impact" | "diff_impact" | "callers" | "callees" | "dependency_path" | "workflow_path" | "placeholder_report" | "session_memory" | "freshness")[];
|
|
263
|
+
export declare const PRIMARY_MCP_TOOL_NAMES: readonly ("task_brief" | "session_context" | "change_plan" | "post_edit_review" | "test_plan" | "search")[];
|
|
264
|
+
export declare const ADVANCED_MCP_TOOL_NAMES: readonly ("context_pack" | "focus_brief" | "repo_map" | "find_context" | "symbol_context" | "impact" | "diff_impact" | "callers" | "callees" | "dependency_path" | "workflow_path" | "placeholder_report" | "session_memory" | "freshness")[];
|
|
265
|
+
export declare const SOURCE_CONTEXT_MCP_TOOL_NAMES: readonly ("repo_map" | "search" | "symbol_context" | "diff_impact" | "callers" | "callees" | "dependency_path" | "workflow_path" | "placeholder_report")[];
|
|
266
|
+
export declare const MEMORY_RECORDING_MCP_TOOL_NAMES: readonly ("context_pack" | "task_brief" | "focus_brief" | "session_context" | "post_edit_review" | "test_plan" | "find_context" | "impact")[];
|
|
267
|
+
export declare const PRIMARY_CODEX_LOOP = "session_context -> search(if target unclear) -> task_brief -> change_plan(saveSnapshot) -> post_edit_review -> test_plan";
|
|
268
|
+
export declare const NO_SOURCE_MUTATION_CONTRACT = "Codexa MCP tools may write Codexa cache artifacts, but must not mutate source files.";
|
|
269
|
+
export declare function mcpToolRegistryEntry(name: string): McpToolRegistryEntry | undefined;
|
|
@@ -0,0 +1,284 @@
|
|
|
1
|
+
export const MCP_TOOL_REGISTRY = [
|
|
2
|
+
{
|
|
3
|
+
name: "session_context",
|
|
4
|
+
title: "Codexa session context",
|
|
5
|
+
description: "Orient at session start or resume: project focus, dirty groups, likely workflows, and the next Codexa call to make. Alias of focus_brief. Compact output.",
|
|
6
|
+
tier: "primary",
|
|
7
|
+
phase: "orientation",
|
|
8
|
+
cost: "compact",
|
|
9
|
+
writeEffects: "session-memory-auto",
|
|
10
|
+
readOnly: false,
|
|
11
|
+
useWhen: "Start or resume work in a repo and choose the next focused Codexa call.",
|
|
12
|
+
avoidWhen: "You already have an explicit file or symbol target; use task_brief or change_plan instead.",
|
|
13
|
+
nextToolUse: ["search", "task_brief"]
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
name: "search",
|
|
17
|
+
title: "Codexa hybrid semantic search",
|
|
18
|
+
description: "First-class target discovery when the task or identifier is ambiguous: one bounded hybrid pass (raw, exact, symbol, ranking; semantic only when configured) with likely tests and value/gap labels. Medium output; cheaper than context_pack.",
|
|
19
|
+
tier: "primary",
|
|
20
|
+
phase: "inspect",
|
|
21
|
+
cost: "medium",
|
|
22
|
+
writeEffects: "index-cache-if-auto-refresh",
|
|
23
|
+
readOnly: false,
|
|
24
|
+
useWhen: "Before task_brief when the target is unclear, when a prompt is broad, or when you need one hybrid semantic/raw pass instead of repeated searches.",
|
|
25
|
+
avoidWhen: "You already have precise files/symbols and need edit planning, drift review, or verification proof.",
|
|
26
|
+
nextToolUse: ["task_brief", "change_plan"]
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
name: "task_brief",
|
|
30
|
+
title: "Codexa task brief",
|
|
31
|
+
description: "Default pre-edit context once a target or bounded task is known: read-first files, impact expansion, risks, likely tests, freshness, confidence labels, snippets. Medium output.",
|
|
32
|
+
tier: "primary",
|
|
33
|
+
phase: "brief",
|
|
34
|
+
cost: "medium",
|
|
35
|
+
writeEffects: "session-memory-auto",
|
|
36
|
+
readOnly: false,
|
|
37
|
+
useWhen: "Before editing, debugging, or reviewing a specific task after search/session context has supplied a plausible target.",
|
|
38
|
+
avoidWhen: "The target is still unclear; run first-class search or provide explicit files first.",
|
|
39
|
+
nextToolUse: ["change_plan"]
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
name: "change_plan",
|
|
43
|
+
title: "Codexa change plan",
|
|
44
|
+
description: "Plan a non-trivial edit; set saveSnapshot=true before editing so post_edit_review can detect drift. Returns plan targets, tests, freshness, and known gaps. Medium output.",
|
|
45
|
+
tier: "primary",
|
|
46
|
+
phase: "plan",
|
|
47
|
+
cost: "medium",
|
|
48
|
+
writeEffects: "task-snapshot-cache",
|
|
49
|
+
readOnly: false,
|
|
50
|
+
useWhen: "Before non-trivial edits; pass saveSnapshot=true to enable post-edit drift checks.",
|
|
51
|
+
avoidWhen: "After edits are already made; use post_edit_review for dirty-tree accountability.",
|
|
52
|
+
nextToolUse: ["post_edit_review"]
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
name: "post_edit_review",
|
|
56
|
+
title: "Codexa post-edit review",
|
|
57
|
+
description: "Go-to post-edit review gate: compares the dirty tree against the change_plan snapshot for planned-vs-actual drift, symbol/risk deltas, affected callers/tests/workflows, and tests still unaccounted for. Pass the snapshot task id plus commands that actually ran. MCP calls do not persist outcome files. Large output, budget-compacted.",
|
|
58
|
+
tier: "primary",
|
|
59
|
+
phase: "review",
|
|
60
|
+
cost: "large",
|
|
61
|
+
writeEffects: "session-memory-auto",
|
|
62
|
+
readOnly: false,
|
|
63
|
+
useWhen: "Immediately after edits and before final response; pass the saved change_plan task id plus commands/tests that actually ran.",
|
|
64
|
+
avoidWhen: "Before editing or without a meaningful diff to review.",
|
|
65
|
+
nextToolUse: ["test_plan"]
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
name: "test_plan",
|
|
69
|
+
title: "Codexa test plan",
|
|
70
|
+
description: "Recommend targeted tests for the current diff or top-ranked files. Recommendations only, not execution evidence. Compact output.",
|
|
71
|
+
tier: "primary",
|
|
72
|
+
phase: "verify",
|
|
73
|
+
cost: "compact",
|
|
74
|
+
writeEffects: "session-memory-auto",
|
|
75
|
+
readOnly: false,
|
|
76
|
+
useWhen: "Select verification for the current diff or after post_edit_review.",
|
|
77
|
+
avoidWhen: "You need proof that tests ran; recommendations are not execution evidence.",
|
|
78
|
+
nextToolUse: []
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
name: "workflow_path",
|
|
82
|
+
title: "Codexa workflow path",
|
|
83
|
+
description: "Trace route/job/manifest workflow paths related to a query, file, or symbol. Medium output.",
|
|
84
|
+
tier: "advanced",
|
|
85
|
+
phase: "inspect",
|
|
86
|
+
cost: "medium",
|
|
87
|
+
writeEffects: "index-cache-if-auto-refresh",
|
|
88
|
+
readOnly: false,
|
|
89
|
+
useWhen: "Inspect route, job, manifest, or workflow traces for a focused runtime path.",
|
|
90
|
+
avoidWhen: "You only need startup orientation; session_context is cheaper.",
|
|
91
|
+
nextToolUse: ["task_brief", "change_plan"]
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
name: "freshness",
|
|
95
|
+
title: "Codexa freshness",
|
|
96
|
+
description: "Report whether the Codexa index is present, fresh, stale, or missing. Compact, read-only.",
|
|
97
|
+
tier: "advanced",
|
|
98
|
+
phase: "diagnose",
|
|
99
|
+
cost: "compact",
|
|
100
|
+
writeEffects: "none",
|
|
101
|
+
readOnly: true,
|
|
102
|
+
useWhen: "Check whether indexed artifacts are present, fresh, stale, or missing.",
|
|
103
|
+
avoidWhen: "You need task-specific context; use task_brief after freshness is known.",
|
|
104
|
+
nextToolUse: ["task_brief"]
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
name: "repo_map",
|
|
108
|
+
title: "Codexa repo map",
|
|
109
|
+
description: "Ranked map of top modules and files for orientation. Compact output.",
|
|
110
|
+
tier: "advanced",
|
|
111
|
+
phase: "orientation",
|
|
112
|
+
cost: "compact",
|
|
113
|
+
writeEffects: "index-cache-if-auto-refresh",
|
|
114
|
+
readOnly: false,
|
|
115
|
+
useWhen: "Get a ranked repository map or module overview.",
|
|
116
|
+
avoidWhen: "You need edit-ready task context; task_brief carries more proof.",
|
|
117
|
+
nextToolUse: ["task_brief"]
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
name: "find_context",
|
|
121
|
+
title: "Codexa find context",
|
|
122
|
+
description: "Locate files, symbols, and usage sites matching a precise query. Compact output; cheaper than search when the name is already known.",
|
|
123
|
+
tier: "advanced",
|
|
124
|
+
phase: "inspect",
|
|
125
|
+
cost: "compact",
|
|
126
|
+
writeEffects: "session-memory-auto",
|
|
127
|
+
readOnly: false,
|
|
128
|
+
useWhen: "Find matching files, symbols, and usage sites for a precise query.",
|
|
129
|
+
avoidWhen: "You need dirty-diff review or saved edit planning.",
|
|
130
|
+
nextToolUse: ["task_brief"]
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
name: "context_pack",
|
|
134
|
+
title: "Codexa context pack",
|
|
135
|
+
description: "Largest evidence packet for one task: focus files, bounded impact expansion, evidence snippets, impact groups, tests, freshness, provenance. Use only when task_brief is not enough. Large output.",
|
|
136
|
+
tier: "advanced",
|
|
137
|
+
phase: "brief",
|
|
138
|
+
cost: "large",
|
|
139
|
+
writeEffects: "session-memory-auto",
|
|
140
|
+
readOnly: false,
|
|
141
|
+
useWhen: "Build a larger task-shaped packet with snippets, impact, tests, and provenance.",
|
|
142
|
+
avoidWhen: "A small first-pass task_brief is enough.",
|
|
143
|
+
nextToolUse: ["change_plan"]
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
name: "focus_brief",
|
|
147
|
+
title: "Codexa focus brief",
|
|
148
|
+
description: "Classify a broad natural-language task, pick likely subsystems, and recommend the next Codexa call. Compact output.",
|
|
149
|
+
tier: "advanced",
|
|
150
|
+
phase: "orientation",
|
|
151
|
+
cost: "compact",
|
|
152
|
+
writeEffects: "session-memory-auto",
|
|
153
|
+
readOnly: false,
|
|
154
|
+
useWhen: "Classify a broad natural-language task and choose likely subsystems.",
|
|
155
|
+
avoidWhen: "You already know exact files or symbols.",
|
|
156
|
+
nextToolUse: ["task_brief", "search"]
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
name: "impact",
|
|
160
|
+
title: "Codexa impact",
|
|
161
|
+
description: "Blast-radius evidence for one file or symbol; traversal depth auto-scales with changeType (rename/delete reach deeper than style). Medium output.",
|
|
162
|
+
tier: "advanced",
|
|
163
|
+
phase: "inspect",
|
|
164
|
+
cost: "medium",
|
|
165
|
+
writeEffects: "session-memory-auto",
|
|
166
|
+
readOnly: false,
|
|
167
|
+
useWhen: "Inspect blast radius for one file or symbol before an API, behavior, rename, or delete change.",
|
|
168
|
+
avoidWhen: "No target is known; use search or task_brief first.",
|
|
169
|
+
nextToolUse: ["change_plan"]
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
name: "diff_impact",
|
|
173
|
+
title: "Codexa diff impact",
|
|
174
|
+
description: "Group the current dirty git diff into impact modules before review or verification. Medium output.",
|
|
175
|
+
tier: "advanced",
|
|
176
|
+
phase: "inspect",
|
|
177
|
+
cost: "medium",
|
|
178
|
+
writeEffects: "index-cache-if-auto-refresh",
|
|
179
|
+
readOnly: false,
|
|
180
|
+
useWhen: "Group the current dirty tree before review or verification.",
|
|
181
|
+
avoidWhen: "The tree is clean or you need a saved-snapshot drift review.",
|
|
182
|
+
nextToolUse: ["post_edit_review", "test_plan"]
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
name: "symbol_context",
|
|
186
|
+
title: "Codexa symbol context",
|
|
187
|
+
description: "Proof-carrying neighborhood for one symbol: callers, callees, references, tests, risks, evidence. depth=1 is compact; depth=3 expands several-fold.",
|
|
188
|
+
tier: "advanced",
|
|
189
|
+
phase: "inspect",
|
|
190
|
+
cost: "medium",
|
|
191
|
+
writeEffects: "index-cache-if-auto-refresh",
|
|
192
|
+
readOnly: false,
|
|
193
|
+
useWhen: "Inspect one symbol's definition and usage sites.",
|
|
194
|
+
avoidWhen: "You need full file blast radius; use impact.",
|
|
195
|
+
nextToolUse: ["impact"]
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
name: "callers",
|
|
199
|
+
title: "Codexa callers",
|
|
200
|
+
description: "Typed inbound graph edges (calls, references, imports, tests) for a file or symbol. Compact output.",
|
|
201
|
+
tier: "advanced",
|
|
202
|
+
phase: "inspect",
|
|
203
|
+
cost: "compact",
|
|
204
|
+
writeEffects: "index-cache-if-auto-refresh",
|
|
205
|
+
readOnly: false,
|
|
206
|
+
useWhen: "Find typed inbound graph edges for a focused file or symbol.",
|
|
207
|
+
avoidWhen: "You need outgoing dependencies; use callees.",
|
|
208
|
+
nextToolUse: ["impact"]
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
name: "callees",
|
|
212
|
+
title: "Codexa callees",
|
|
213
|
+
description: "Typed outbound graph edges (calls, references, imports, tests, risks) for a file or symbol. Compact output.",
|
|
214
|
+
tier: "advanced",
|
|
215
|
+
phase: "inspect",
|
|
216
|
+
cost: "compact",
|
|
217
|
+
writeEffects: "index-cache-if-auto-refresh",
|
|
218
|
+
readOnly: false,
|
|
219
|
+
useWhen: "Find typed outgoing graph edges for a focused file or symbol.",
|
|
220
|
+
avoidWhen: "You need inbound usages; use callers.",
|
|
221
|
+
nextToolUse: ["impact"]
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
name: "dependency_path",
|
|
225
|
+
title: "Codexa dependency path",
|
|
226
|
+
description: "Bounded typed graph path between two known files or symbols. Compact output.",
|
|
227
|
+
tier: "advanced",
|
|
228
|
+
phase: "inspect",
|
|
229
|
+
cost: "compact",
|
|
230
|
+
writeEffects: "index-cache-if-auto-refresh",
|
|
231
|
+
readOnly: false,
|
|
232
|
+
useWhen: "Find a bounded graph path between two known files or symbols.",
|
|
233
|
+
avoidWhen: "Either endpoint is unknown; use search first.",
|
|
234
|
+
nextToolUse: ["change_plan"]
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
name: "placeholder_report",
|
|
238
|
+
title: "Codexa placeholder report",
|
|
239
|
+
description: "Indexed placeholder, dummy, TODO, and stub findings; tracked as risk signals that participate in post_edit_review deltas. Compact output.",
|
|
240
|
+
tier: "advanced",
|
|
241
|
+
phase: "risk",
|
|
242
|
+
cost: "compact",
|
|
243
|
+
writeEffects: "index-cache-if-auto-refresh",
|
|
244
|
+
readOnly: false,
|
|
245
|
+
useWhen: "Inspect TODO, stub, dummy, and not-implemented risk signals.",
|
|
246
|
+
avoidWhen: "You need ordinary file localization.",
|
|
247
|
+
nextToolUse: ["task_brief"]
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
name: "session_memory",
|
|
251
|
+
title: "Codexa session memory",
|
|
252
|
+
description: "Read, summarize, compact, or explicitly remember durable structured working memory for this Codex session. Cache-only; never mutates source. action=summary is the cheap overview. Compact output.",
|
|
253
|
+
tier: "advanced",
|
|
254
|
+
phase: "memory",
|
|
255
|
+
cost: "compact",
|
|
256
|
+
writeEffects: "explicit-memory-cache",
|
|
257
|
+
readOnly: false,
|
|
258
|
+
useWhen: "Read or write cache-only structured session memory for the current Codex workflow.",
|
|
259
|
+
avoidWhen: "You need durable project docs or source changes.",
|
|
260
|
+
nextToolUse: ["task_brief"]
|
|
261
|
+
}
|
|
262
|
+
];
|
|
263
|
+
export const MCP_TOOL_CATALOG = MCP_TOOL_REGISTRY.map(({ name, tier, phase, cost, writeEffects, readOnly, useWhen, avoidWhen, nextToolUse }) => ({
|
|
264
|
+
name,
|
|
265
|
+
tier,
|
|
266
|
+
phase,
|
|
267
|
+
cost,
|
|
268
|
+
writeEffects,
|
|
269
|
+
readOnly,
|
|
270
|
+
useWhen,
|
|
271
|
+
avoidWhen,
|
|
272
|
+
nextToolUse
|
|
273
|
+
}));
|
|
274
|
+
export const MCP_TOOL_NAMES = Object.freeze(MCP_TOOL_REGISTRY.map((tool) => tool.name));
|
|
275
|
+
export const PRIMARY_MCP_TOOL_NAMES = Object.freeze(MCP_TOOL_REGISTRY.filter((tool) => tool.tier === "primary").map((tool) => tool.name));
|
|
276
|
+
export const ADVANCED_MCP_TOOL_NAMES = Object.freeze(MCP_TOOL_REGISTRY.filter((tool) => tool.tier === "advanced").map((tool) => tool.name));
|
|
277
|
+
export const SOURCE_CONTEXT_MCP_TOOL_NAMES = Object.freeze(MCP_TOOL_REGISTRY.filter((tool) => tool.writeEffects === "index-cache-if-auto-refresh").map((tool) => tool.name));
|
|
278
|
+
export const MEMORY_RECORDING_MCP_TOOL_NAMES = Object.freeze(MCP_TOOL_REGISTRY.filter((tool) => tool.writeEffects === "session-memory-auto").map((tool) => tool.name));
|
|
279
|
+
export const PRIMARY_CODEX_LOOP = "session_context -> search(if target unclear) -> task_brief -> change_plan(saveSnapshot) -> post_edit_review -> test_plan";
|
|
280
|
+
export const NO_SOURCE_MUTATION_CONTRACT = "Codexa MCP tools may write Codexa cache artifacts, but must not mutate source files.";
|
|
281
|
+
export function mcpToolRegistryEntry(name) {
|
|
282
|
+
return MCP_TOOL_REGISTRY.find((tool) => tool.name === name);
|
|
283
|
+
}
|
|
284
|
+
//# sourceMappingURL=tool-registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-registry.js","sourceRoot":"","sources":["../../src/mcp/tool-registry.ts"],"names":[],"mappings":"AAmBA,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B;QACE,IAAI,EAAE,iBAAiB;QACvB,KAAK,EAAE,wBAAwB;QAC/B,WAAW,EAAE,2JAA2J;QACxK,IAAI,EAAE,SAAS;QACf,KAAK,EAAE,aAAa;QACpB,IAAI,EAAE,SAAS;QACf,YAAY,EAAE,qBAAqB;QACnC,QAAQ,EAAE,KAAK;QACf,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J,MAAM,CAAC,MAAM,2BAA2B,GAAG,sFAAsF,CAAC;AAElI,MAAM,UAAU,oBAAoB,CAAC,IAAY;IAC/C,OAAO,iBAAiB,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC;AAC9D,CAAC"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
2
|
+
import type { ZodRawShapeCompat } from "@modelcontextprotocol/sdk/server/zod-compat.js";
|
|
3
|
+
import type { CallToolResult, ToolAnnotations } from "@modelcontextprotocol/sdk/types.js";
|
|
4
|
+
import { z } from "zod";
|
|
5
|
+
import type { QueryOptions, QueryResult } from "../types.js";
|
|
6
|
+
import type { QuerySession } from "../query/session.js";
|
|
7
|
+
export type McpOptionalQueryInput = Record<string, unknown> & {
|
|
8
|
+
semantic?: boolean;
|
|
9
|
+
semanticProvider?: "openai" | "local-command";
|
|
10
|
+
semanticModel?: string;
|
|
11
|
+
semanticDimensions?: number;
|
|
12
|
+
semanticTimeoutMs?: number;
|
|
13
|
+
semanticBatchSize?: number;
|
|
14
|
+
lsp?: boolean;
|
|
15
|
+
lspTimeoutMs?: number;
|
|
16
|
+
lspMaxFiles?: number;
|
|
17
|
+
};
|
|
18
|
+
type McpToolContext = string | {
|
|
19
|
+
toolName: string;
|
|
20
|
+
input?: Record<string, unknown>;
|
|
21
|
+
autoRecord?: boolean;
|
|
22
|
+
};
|
|
23
|
+
type ChangeType = "style" | "api" | "behavior" | "rename" | "delete" | "unknown";
|
|
24
|
+
interface RegisterMcpToolsOptions {
|
|
25
|
+
server: McpServer;
|
|
26
|
+
queryOptions: QueryOptions;
|
|
27
|
+
outputSchema: ZodRawShapeCompat;
|
|
28
|
+
annotations: {
|
|
29
|
+
pureRead: ToolAnnotations;
|
|
30
|
+
sourceContext: ToolAnnotations;
|
|
31
|
+
cacheWrite: ToolAnnotations;
|
|
32
|
+
memoryWrite: ToolAnnotations;
|
|
33
|
+
};
|
|
34
|
+
schemas: {
|
|
35
|
+
changeType: z.ZodType<ChangeType>;
|
|
36
|
+
semanticQuery: z.ZodRawShape;
|
|
37
|
+
lspQuery: z.ZodRawShape;
|
|
38
|
+
confidence: z.ZodTypeAny;
|
|
39
|
+
evidenceTier: z.ZodTypeAny;
|
|
40
|
+
sessionMemoryKind: z.ZodTypeAny;
|
|
41
|
+
sessionMemoryProvenance: z.ZodTypeAny;
|
|
42
|
+
sessionMemoryStatus: z.ZodTypeAny;
|
|
43
|
+
sessionMemoryRef: z.ZodTypeAny;
|
|
44
|
+
sessionMemoryScope: z.ZodTypeAny;
|
|
45
|
+
sessionMemoryEvidence: z.ZodTypeAny;
|
|
46
|
+
};
|
|
47
|
+
toolQueryOptions: (input?: McpOptionalQueryInput) => QueryOptions;
|
|
48
|
+
runTool: (producer: (session: QuerySession) => Promise<QueryResult>, toolContext: McpToolContext) => Promise<CallToolResult>;
|
|
49
|
+
runFreshnessTool: () => Promise<CallToolResult>;
|
|
50
|
+
}
|
|
51
|
+
export declare const MCP_REGISTERED_TOOL_NAMES: readonly ("context_pack" | "task_brief" | "focus_brief" | "session_context" | "change_plan" | "post_edit_review" | "test_plan" | "repo_map" | "search" | "find_context" | "symbol_context" | "impact" | "diff_impact" | "callers" | "callees" | "dependency_path" | "workflow_path" | "placeholder_report" | "session_memory" | "freshness")[];
|
|
52
|
+
export declare function registerMcpTools(options: RegisterMcpToolsOptions): void;
|
|
53
|
+
export {};
|