| { | ||
| "mcpServers": { | ||
| "oraculum": { | ||
| "command": "oraculum", | ||
| "args": [ | ||
| "mcp", | ||
| "serve" | ||
| ], | ||
| "timeout": 600 | ||
| } | ||
| } | ||
| } |
| { | ||
| "name": "oraculum", | ||
| "owner": { | ||
| "name": "Nhahan", | ||
| "email": "kisy324@naver.com" | ||
| }, | ||
| "plugins": [ | ||
| { | ||
| "name": "oraculum", | ||
| "description": "Consult competing patches, read verdicts, and crown survivors with Oraculum.", | ||
| "version": "0.1.0-beta.5", | ||
| "author": { | ||
| "name": "Nhahan", | ||
| "email": "kisy324@naver.com" | ||
| }, | ||
| "source": "./.claude-plugin", | ||
| "category": "development", | ||
| "homepage": "https://github.com/Nhahan/oraculum", | ||
| "repository": "https://github.com/Nhahan/oraculum", | ||
| "license": "MIT", | ||
| "keywords": [ | ||
| "oraculum", | ||
| "patch", | ||
| "verdict", | ||
| "crowning", | ||
| "mcp" | ||
| ], | ||
| "tags": [ | ||
| "patch-consultation", | ||
| "oracle-guided", | ||
| "development" | ||
| ] | ||
| } | ||
| ] | ||
| } |
| { | ||
| "name": "oraculum", | ||
| "version": "0.1.0-beta.5", | ||
| "description": "Oracle-guided patch consultation and crowning for Claude Code.", | ||
| "author": { | ||
| "name": "Nhahan", | ||
| "email": "kisy324@naver.com" | ||
| }, | ||
| "repository": "https://github.com/Nhahan/oraculum", | ||
| "homepage": "https://github.com/Nhahan/oraculum", | ||
| "license": "MIT", | ||
| "keywords": [ | ||
| "oraculum", | ||
| "patch", | ||
| "verdict", | ||
| "crowning", | ||
| "mcp" | ||
| ], | ||
| "skills": "./skills/", | ||
| "mcpServers": "./.mcp.json" | ||
| } |
| --- | ||
| name: consult | ||
| description: "Run the full consultation tournament and return the completed verdict state." | ||
| mcp_tool: oraculum_consult | ||
| mcp_args: | ||
| cwd: "$CWD" | ||
| taskInput: "$1" | ||
| magic_prefixes: | ||
| - "orc consult" | ||
| --- | ||
| # /oraculum:consult | ||
| Run the full consultation tournament and return the completed verdict state. | ||
| ## Usage | ||
| ``` | ||
| orc consult "fix session loss on refresh" | ||
| ``` | ||
| ## Notes | ||
| - This skill is intended for exact-prefix routing inside Claude Code. | ||
| - The Oraculum MCP server must already be registered through `oraculum setup --runtime claude-code`. |
| --- | ||
| name: crown | ||
| description: "Crown the recommended or selected survivor and materialize it in the project." | ||
| mcp_tool: oraculum_crown | ||
| mcp_args: | ||
| cwd: "$CWD" | ||
| branchName: "$1" | ||
| withReport: false | ||
| magic_prefixes: | ||
| - "orc crown" | ||
| --- | ||
| # /oraculum:crown | ||
| Crown the recommended or selected survivor and materialize it in the project. | ||
| ## Usage | ||
| ``` | ||
| orc crown fix/session-loss | ||
| ``` | ||
| ## Notes | ||
| - The chat-native crowning path expects the branch name as the first argument. | ||
| - It crowns the recommended survivor from the latest eligible consultation. | ||
| - The shared chat-native surface is `orc crown <branch-name>`. | ||
| - The Oraculum MCP server must already be registered through `oraculum setup --runtime claude-code`. |
| --- | ||
| name: draft | ||
| description: "Stage a consultation without executing candidates." | ||
| mcp_tool: oraculum_draft | ||
| mcp_args: | ||
| cwd: "$CWD" | ||
| taskInput: "$1" | ||
| magic_prefixes: | ||
| - "orc draft" | ||
| --- | ||
| # /oraculum:draft | ||
| Stage a consultation without executing candidates. | ||
| ## Usage | ||
| ``` | ||
| orc draft "fix session loss on refresh" | ||
| ``` | ||
| ## Notes | ||
| - This skill is intended for exact-prefix routing inside Claude Code. | ||
| - The Oraculum MCP server must already be registered through `oraculum setup --runtime claude-code`. |
| --- | ||
| name: init | ||
| description: "Initialize the quick-start scaffold explicitly." | ||
| mcp_tool: oraculum_init | ||
| mcp_args: | ||
| cwd: "$CWD" | ||
| force: false | ||
| magic_prefixes: | ||
| - "orc init" | ||
| --- | ||
| # /oraculum:init | ||
| Initialize the quick-start scaffold explicitly. | ||
| ## Usage | ||
| ``` | ||
| orc init | ||
| ``` | ||
| ## Notes | ||
| - This skill is intended for exact-prefix routing inside Claude Code. | ||
| - The Oraculum MCP server must already be registered through `oraculum setup --runtime claude-code`. |
| --- | ||
| name: verdict | ||
| description: "Reopen the latest verdict or inspect a specific consultation." | ||
| mcp_tool: oraculum_verdict | ||
| mcp_args: | ||
| cwd: "$CWD" | ||
| consultationId: "$1" | ||
| magic_prefixes: | ||
| - "orc verdict" | ||
| --- | ||
| # /oraculum:verdict | ||
| Reopen the latest verdict or inspect a specific consultation. | ||
| ## Usage | ||
| ``` | ||
| orc verdict | ||
| orc verdict run_20260404_xxxx | ||
| ``` | ||
| ## Notes | ||
| - This skill is intended for exact-prefix routing inside Claude Code. | ||
| - The Oraculum MCP server must already be registered through `oraculum setup --runtime claude-code`. |
| --- | ||
| description: "Run the full consultation tournament and return the completed verdict state." | ||
| --- | ||
| Read the file at `${CLAUDE_PLUGIN_ROOT}/skills/consult/SKILL.md` using the Read tool and follow its instructions exactly. | ||
| ## User Input | ||
| {{ARGUMENTS}} |
| --- | ||
| description: "Crown the recommended or selected survivor and materialize it in the project." | ||
| --- | ||
| Read the file at `${CLAUDE_PLUGIN_ROOT}/skills/crown/SKILL.md` using the Read tool and follow its instructions exactly. | ||
| ## User Input | ||
| {{ARGUMENTS}} |
| --- | ||
| description: "Stage a consultation without executing candidates." | ||
| --- | ||
| Read the file at `${CLAUDE_PLUGIN_ROOT}/skills/draft/SKILL.md` using the Read tool and follow its instructions exactly. | ||
| ## User Input | ||
| {{ARGUMENTS}} |
| --- | ||
| description: "Initialize the quick-start scaffold explicitly." | ||
| --- | ||
| Read the file at `${CLAUDE_PLUGIN_ROOT}/skills/init/SKILL.md` using the Read tool and follow its instructions exactly. | ||
| ## User Input | ||
| {{ARGUMENTS}} |
| --- | ||
| description: "Reopen the latest verdict or inspect a specific consultation." | ||
| --- | ||
| Read the file at `${CLAUDE_PLUGIN_ROOT}/skills/verdict/SKILL.md` using the Read tool and follow its instructions exactly. | ||
| ## User Input | ||
| {{ARGUMENTS}} |
| # Claude Code packaged artifacts | ||
| Generated marketplace, plugin, command, and skill artifacts for Claude Code live under this directory. |
| # Codex packaged artifacts | ||
| Generated rules and skills for Codex live under this directory. |
| # Oraculum for Codex | ||
| Use Oraculum when the user is asking to run Oraculum consultations, reopen verdicts, browse the consultation archive, or crown a survivor. | ||
| ## Critical: Exact-Prefix Routing | ||
| When the user types an exact `orc <command>` command, you MUST NOT interpret it as natural language and you MUST NOT do the work directly. | ||
| Immediately use the matching installed Oraculum skill and route to the mapped MCP tool. | ||
| Parse command arguments shell-style before calling the MCP tool. Do not pass option flags through as raw task text. | ||
| | User Input | Skill | MCP Tool | | ||
| | --- | --- | --- | | ||
| | `orc consult` | `oraculum-consult` | `oraculum_consult` | | ||
| | `orc verdict` | `oraculum-verdict` | `oraculum_verdict` | | ||
| | `orc verdict archive` | `oraculum-verdict-archive` | `oraculum_verdict_archive` | | ||
| | `orc crown` | `oraculum-crown` | `oraculum_crown` | | ||
| | `orc draft` | `oraculum-draft` | `oraculum_draft` | | ||
| | `orc init` | `oraculum-init` | `oraculum_init` | | ||
| If the Oraculum MCP tool is unavailable, respond with explicit setup guidance instead of improvising: | ||
| - Run `oraculum setup --runtime codex`. | ||
| If the user request is unrelated to `orc` commands or Oraculum workflows, handle it normally. |
| --- | ||
| name: oraculum-consult | ||
| description: Exact-prefix Oraculum consult routing for Codex. | ||
| --- | ||
| # Oraculum consult | ||
| When the user typed an exact `orc consult` command, do not treat it as natural language and do not perform the task yourself. | ||
| ## Required Action | ||
| Call the MCP tool `oraculum_consult`. | ||
| ## Argument Mapping | ||
| - `cwd`: the current working directory where the user invoked the command | ||
| - `taskInput`: the first positional argument after removing recognized flags from the command | ||
| - optional `--agent <claude-code|codex>` | ||
| - optional `--candidates <n>` | ||
| - optional `--timeout-ms <ms>` | ||
| - Example: `orc consult tasks/fix.md --agent claude-code --candidates 1` -> `{ taskInput: "tasks/fix.md", agent: "claude-code", candidates: 1 }` | ||
| ## Setup Failure | ||
| If the MCP tool is unavailable, tell the user exactly: Run `oraculum setup --runtime codex`. | ||
| ## Usage | ||
| ``` | ||
| orc consult "fix session loss on refresh" | ||
| ``` |
| --- | ||
| name: oraculum-crown | ||
| description: Exact-prefix Oraculum crown routing for Codex. | ||
| --- | ||
| # Oraculum crown | ||
| When the user typed an exact `orc crown` command, do not treat it as natural language and do not perform the task yourself. | ||
| ## Required Action | ||
| Call the MCP tool `oraculum_crown`. | ||
| ## Argument Mapping | ||
| - `cwd`: the current working directory where the user invoked the command | ||
| - required `branchName`: the first positional argument after `orc crown` | ||
| - the chat-native crowning path uses the recommended survivor automatically | ||
| - Example: `orc crown fix/greet` -> `{ branchName: "fix/greet" }` | ||
| ## Setup Failure | ||
| If the MCP tool is unavailable, tell the user exactly: Run `oraculum setup --runtime codex`. | ||
| ## Usage | ||
| ``` | ||
| orc crown fix/session-loss | ||
| ``` |
| --- | ||
| name: oraculum-draft | ||
| description: Exact-prefix Oraculum draft routing for Codex. | ||
| --- | ||
| # Oraculum draft | ||
| When the user typed an exact `orc draft` command, do not treat it as natural language and do not perform the task yourself. | ||
| ## Required Action | ||
| Call the MCP tool `oraculum_draft`. | ||
| ## Argument Mapping | ||
| - `cwd`: the current working directory where the user invoked the command | ||
| - `taskInput`: the first positional argument after removing recognized flags from the command | ||
| - optional `--agent <claude-code|codex>` | ||
| - optional `--candidates <n>` | ||
| - Example: `orc draft tasks/fix.md --agent codex --candidates 2` -> `{ taskInput: "tasks/fix.md", agent: "codex", candidates: 2 }` | ||
| ## Setup Failure | ||
| If the MCP tool is unavailable, tell the user exactly: Run `oraculum setup --runtime codex`. | ||
| ## Usage | ||
| ``` | ||
| orc draft "fix session loss on refresh" | ||
| ``` |
| --- | ||
| name: oraculum-init | ||
| description: Exact-prefix Oraculum init routing for Codex. | ||
| --- | ||
| # Oraculum init | ||
| When the user typed an exact `orc init` command, do not treat it as natural language and do not perform the task yourself. | ||
| ## Required Action | ||
| Call the MCP tool `oraculum_init`. | ||
| ## Argument Mapping | ||
| - `cwd`: the current working directory where the user invoked the command | ||
| - optional `force`: parse the presence of `--force` as `true` | ||
| ## Setup Failure | ||
| If the MCP tool is unavailable, tell the user exactly: Run `oraculum setup --runtime codex`. | ||
| ## Usage | ||
| ``` | ||
| orc init | ||
| orc init --force | ||
| ``` |
| --- | ||
| name: oraculum-verdict-archive | ||
| description: Exact-prefix Oraculum verdict-archive routing for Codex. | ||
| --- | ||
| # Oraculum verdict-archive | ||
| When the user typed an exact `orc verdict archive` command, do not treat it as natural language and do not perform the task yourself. | ||
| ## Required Action | ||
| Call the MCP tool `oraculum_verdict_archive`. | ||
| ## Argument Mapping | ||
| - `cwd`: the current working directory where the user invoked the command | ||
| - optional `count`: the first positional argument if present | ||
| ## Setup Failure | ||
| If the MCP tool is unavailable, tell the user exactly: Run `oraculum setup --runtime codex`. | ||
| ## Usage | ||
| ``` | ||
| orc verdict archive | ||
| orc verdict archive 20 | ||
| ``` |
| --- | ||
| name: oraculum-verdict | ||
| description: Exact-prefix Oraculum verdict routing for Codex. | ||
| --- | ||
| # Oraculum verdict | ||
| When the user typed an exact `orc verdict` command, do not treat it as natural language and do not perform the task yourself. | ||
| ## Required Action | ||
| Call the MCP tool `oraculum_verdict`. | ||
| ## Argument Mapping | ||
| - `cwd`: the current working directory where the user invoked the command | ||
| - optional `consultationId`: the first positional argument if present | ||
| ## Setup Failure | ||
| If the MCP tool is unavailable, tell the user exactly: Run `oraculum setup --runtime codex`. | ||
| ## Usage | ||
| ``` | ||
| orc verdict | ||
| orc verdict run_20260404_xxxx | ||
| ``` |
| [ | ||
| { | ||
| "id": "consult", | ||
| "prefix": "orc", | ||
| "path": [ | ||
| "consult" | ||
| ], | ||
| "summary": "Run the full consultation tournament and return the completed verdict state.", | ||
| "mcpTool": "oraculum_consult", | ||
| "requestShape": "consultToolRequestSchema", | ||
| "responseShape": "consultToolResponseSchema", | ||
| "arguments": [ | ||
| { | ||
| "name": "taskInput", | ||
| "kind": "string", | ||
| "description": "Inline task text, a task note path, or a task packet path.", | ||
| "required": true, | ||
| "positional": true | ||
| }, | ||
| { | ||
| "name": "agent", | ||
| "kind": "string", | ||
| "description": "Agent runtime override.", | ||
| "required": false, | ||
| "positional": false, | ||
| "option": "--agent" | ||
| }, | ||
| { | ||
| "name": "candidates", | ||
| "kind": "integer", | ||
| "description": "Number of candidate patches to plan.", | ||
| "required": false, | ||
| "positional": false, | ||
| "option": "--candidates" | ||
| }, | ||
| { | ||
| "name": "timeoutMs", | ||
| "kind": "integer", | ||
| "description": "Adapter timeout in milliseconds.", | ||
| "required": false, | ||
| "positional": false, | ||
| "option": "--timeout-ms" | ||
| } | ||
| ], | ||
| "examples": [ | ||
| "orc consult \"fix session loss on refresh\"" | ||
| ], | ||
| "hostAdditions": {} | ||
| }, | ||
| { | ||
| "id": "verdict", | ||
| "prefix": "orc", | ||
| "path": [ | ||
| "verdict" | ||
| ], | ||
| "summary": "Reopen the latest verdict or inspect a specific consultation.", | ||
| "mcpTool": "oraculum_verdict", | ||
| "requestShape": "verdictToolRequestSchema", | ||
| "responseShape": "verdictToolResponseSchema", | ||
| "arguments": [ | ||
| { | ||
| "name": "consultationId", | ||
| "kind": "string", | ||
| "description": "Consultation identifier; defaults to the latest consultation.", | ||
| "required": false, | ||
| "positional": true | ||
| } | ||
| ], | ||
| "examples": [ | ||
| "orc verdict", | ||
| "orc verdict run_20260404_xxxx" | ||
| ], | ||
| "hostAdditions": {} | ||
| }, | ||
| { | ||
| "id": "verdict-archive", | ||
| "prefix": "orc", | ||
| "path": [ | ||
| "verdict", | ||
| "archive" | ||
| ], | ||
| "summary": "Browse recent consultations without reopening one immediately.", | ||
| "mcpTool": "oraculum_verdict_archive", | ||
| "requestShape": "verdictArchiveToolRequestSchema", | ||
| "responseShape": "verdictArchiveToolResponseSchema", | ||
| "arguments": [ | ||
| { | ||
| "name": "count", | ||
| "kind": "integer", | ||
| "description": "Maximum number of recent consultations to show.", | ||
| "required": false, | ||
| "positional": true | ||
| } | ||
| ], | ||
| "examples": [ | ||
| "orc verdict archive", | ||
| "orc verdict archive 20" | ||
| ], | ||
| "hostAdditions": {} | ||
| }, | ||
| { | ||
| "id": "crown", | ||
| "prefix": "orc", | ||
| "path": [ | ||
| "crown" | ||
| ], | ||
| "summary": "Crown the recommended or selected survivor and materialize it in the project.", | ||
| "mcpTool": "oraculum_crown", | ||
| "requestShape": "crownToolRequestSchema", | ||
| "responseShape": "crownToolResponseSchema", | ||
| "arguments": [ | ||
| { | ||
| "name": "branchName", | ||
| "kind": "string", | ||
| "description": "Target branch name to create.", | ||
| "required": true, | ||
| "positional": true | ||
| } | ||
| ], | ||
| "examples": [ | ||
| "orc crown fix/session-loss" | ||
| ], | ||
| "hostAdditions": {} | ||
| }, | ||
| { | ||
| "id": "draft", | ||
| "prefix": "orc", | ||
| "path": [ | ||
| "draft" | ||
| ], | ||
| "summary": "Stage a consultation without executing candidates.", | ||
| "mcpTool": "oraculum_draft", | ||
| "requestShape": "draftToolRequestSchema", | ||
| "responseShape": "draftToolResponseSchema", | ||
| "arguments": [ | ||
| { | ||
| "name": "taskInput", | ||
| "kind": "string", | ||
| "description": "Inline task text, a task note path, or a task packet path.", | ||
| "required": true, | ||
| "positional": true | ||
| }, | ||
| { | ||
| "name": "agent", | ||
| "kind": "string", | ||
| "description": "Agent runtime override.", | ||
| "required": false, | ||
| "positional": false, | ||
| "option": "--agent" | ||
| }, | ||
| { | ||
| "name": "candidates", | ||
| "kind": "integer", | ||
| "description": "Number of candidate patches to plan.", | ||
| "required": false, | ||
| "positional": false, | ||
| "option": "--candidates" | ||
| } | ||
| ], | ||
| "examples": [ | ||
| "orc draft \"fix session loss on refresh\"" | ||
| ], | ||
| "hostAdditions": {} | ||
| }, | ||
| { | ||
| "id": "init", | ||
| "prefix": "orc", | ||
| "path": [ | ||
| "init" | ||
| ], | ||
| "summary": "Initialize the quick-start scaffold explicitly.", | ||
| "mcpTool": "oraculum_init", | ||
| "requestShape": "initToolRequestSchema", | ||
| "responseShape": "initToolResponseSchema", | ||
| "arguments": [ | ||
| { | ||
| "name": "force", | ||
| "kind": "boolean", | ||
| "description": "Reset quick-start config and remove advanced overrides.", | ||
| "required": false, | ||
| "positional": false, | ||
| "option": "--force" | ||
| } | ||
| ], | ||
| "examples": [ | ||
| "orc init", | ||
| "orc init --force" | ||
| ], | ||
| "hostAdditions": {} | ||
| } | ||
| ] |
| { | ||
| "rootDir": "chat-native", | ||
| "commandManifestPath": "chat-native/command-manifest.json", | ||
| "mcpToolSurfacePath": "chat-native/mcp-tool-surface.json", | ||
| "hosts": [ | ||
| { | ||
| "host": "claude-code", | ||
| "rootDir": "chat-native/claude-code", | ||
| "files": [ | ||
| { | ||
| "path": "chat-native/claude-code/README.md", | ||
| "purpose": "Documents the packaged Claude Code host-artifact root." | ||
| }, | ||
| { | ||
| "path": "chat-native/claude-code/.claude-plugin/marketplace.json", | ||
| "purpose": "Marketplace manifest for Claude Code plugin installation." | ||
| }, | ||
| { | ||
| "path": "chat-native/claude-code/commands/consult.md", | ||
| "purpose": "Generated Claude command entry for consult." | ||
| }, | ||
| { | ||
| "path": "chat-native/claude-code/commands/verdict.md", | ||
| "purpose": "Generated Claude command entry for verdict." | ||
| }, | ||
| { | ||
| "path": "chat-native/claude-code/commands/crown.md", | ||
| "purpose": "Generated Claude command entry for crown." | ||
| }, | ||
| { | ||
| "path": "chat-native/claude-code/commands/draft.md", | ||
| "purpose": "Generated Claude command entry for draft." | ||
| }, | ||
| { | ||
| "path": "chat-native/claude-code/commands/init.md", | ||
| "purpose": "Generated Claude command entry for init." | ||
| }, | ||
| { | ||
| "path": "chat-native/claude-code/.claude-plugin/plugin.json", | ||
| "purpose": "Generated Claude plugin manifest." | ||
| }, | ||
| { | ||
| "path": "chat-native/claude-code/.claude-plugin/.mcp.json", | ||
| "purpose": "Generated Claude plugin MCP registration manifest." | ||
| }, | ||
| { | ||
| "path": "chat-native/claude-code/.claude-plugin/skills/consult/SKILL.md", | ||
| "purpose": "Generated Claude exact-prefix consult skill." | ||
| }, | ||
| { | ||
| "path": "chat-native/claude-code/.claude-plugin/skills/verdict/SKILL.md", | ||
| "purpose": "Generated Claude exact-prefix verdict skill." | ||
| }, | ||
| { | ||
| "path": "chat-native/claude-code/.claude-plugin/skills/crown/SKILL.md", | ||
| "purpose": "Generated Claude exact-prefix crown skill." | ||
| }, | ||
| { | ||
| "path": "chat-native/claude-code/.claude-plugin/skills/draft/SKILL.md", | ||
| "purpose": "Generated Claude exact-prefix draft skill." | ||
| }, | ||
| { | ||
| "path": "chat-native/claude-code/.claude-plugin/skills/init/SKILL.md", | ||
| "purpose": "Generated Claude exact-prefix init skill." | ||
| } | ||
| ] | ||
| }, | ||
| { | ||
| "host": "codex", | ||
| "rootDir": "chat-native/codex", | ||
| "files": [ | ||
| { | ||
| "path": "chat-native/codex/README.md", | ||
| "purpose": "Documents the packaged Codex host-artifact root." | ||
| }, | ||
| { | ||
| "path": "chat-native/codex/rules/oraculum.md", | ||
| "purpose": "Generated Codex exact-prefix routing rules." | ||
| }, | ||
| { | ||
| "path": "chat-native/codex/skills/oraculum-consult/SKILL.md", | ||
| "purpose": "Generated Codex exact-prefix consult skill." | ||
| }, | ||
| { | ||
| "path": "chat-native/codex/skills/oraculum-verdict/SKILL.md", | ||
| "purpose": "Generated Codex exact-prefix verdict skill." | ||
| }, | ||
| { | ||
| "path": "chat-native/codex/skills/oraculum-verdict-archive/SKILL.md", | ||
| "purpose": "Generated Codex exact-prefix verdict archive skill." | ||
| }, | ||
| { | ||
| "path": "chat-native/codex/skills/oraculum-crown/SKILL.md", | ||
| "purpose": "Generated Codex exact-prefix crown skill." | ||
| }, | ||
| { | ||
| "path": "chat-native/codex/skills/oraculum-draft/SKILL.md", | ||
| "purpose": "Generated Codex exact-prefix draft skill." | ||
| }, | ||
| { | ||
| "path": "chat-native/codex/skills/oraculum-init/SKILL.md", | ||
| "purpose": "Generated Codex exact-prefix init skill." | ||
| } | ||
| ] | ||
| } | ||
| ] | ||
| } |
| [ | ||
| { | ||
| "id": "oraculum_consult", | ||
| "purpose": "Start a full consultation, execute candidates, and return the completed verdict state.", | ||
| "requestShape": "consultToolRequestSchema", | ||
| "responseShape": "consultToolResponseSchema", | ||
| "bindings": [ | ||
| { | ||
| "kind": "existing-service", | ||
| "module": "src/services/project.ts", | ||
| "symbol": "ensureProjectInitialized" | ||
| }, | ||
| { | ||
| "kind": "existing-service", | ||
| "module": "src/services/runs.ts", | ||
| "symbol": "planRun" | ||
| }, | ||
| { | ||
| "kind": "existing-service", | ||
| "module": "src/services/execution.ts", | ||
| "symbol": "executeRun" | ||
| }, | ||
| { | ||
| "kind": "existing-service", | ||
| "module": "src/services/consultations.ts", | ||
| "symbol": "renderConsultationSummary" | ||
| }, | ||
| { | ||
| "kind": "new-adapter-layer", | ||
| "module": "src/services/chat-native.ts", | ||
| "symbol": "buildConsultationArtifacts", | ||
| "note": "Machine-readable MCP response assembly layer." | ||
| } | ||
| ], | ||
| "machineReadableArtifacts": [ | ||
| "run.json", | ||
| "consultation-config.json", | ||
| "profile-selection.json", | ||
| "comparison.json", | ||
| "comparison.md", | ||
| "winner-selection.json" | ||
| ] | ||
| }, | ||
| { | ||
| "id": "oraculum_draft", | ||
| "purpose": "Plan a consultation without executing candidates and return the drafted run state.", | ||
| "requestShape": "draftToolRequestSchema", | ||
| "responseShape": "draftToolResponseSchema", | ||
| "bindings": [ | ||
| { | ||
| "kind": "existing-service", | ||
| "module": "src/services/project.ts", | ||
| "symbol": "ensureProjectInitialized" | ||
| }, | ||
| { | ||
| "kind": "existing-service", | ||
| "module": "src/services/runs.ts", | ||
| "symbol": "planRun" | ||
| }, | ||
| { | ||
| "kind": "existing-service", | ||
| "module": "src/services/consultations.ts", | ||
| "symbol": "renderConsultationSummary" | ||
| }, | ||
| { | ||
| "kind": "new-adapter-layer", | ||
| "module": "src/services/chat-native.ts", | ||
| "symbol": "buildConsultationArtifacts", | ||
| "note": "Machine-readable MCP response assembly layer." | ||
| } | ||
| ], | ||
| "machineReadableArtifacts": [ | ||
| "run.json", | ||
| "consultation-config.json", | ||
| "profile-selection.json" | ||
| ] | ||
| }, | ||
| { | ||
| "id": "oraculum_verdict", | ||
| "purpose": "Reopen the latest or a specific consultation and return the saved verdict state.", | ||
| "requestShape": "verdictToolRequestSchema", | ||
| "responseShape": "verdictToolResponseSchema", | ||
| "bindings": [ | ||
| { | ||
| "kind": "existing-service", | ||
| "module": "src/services/runs.ts", | ||
| "symbol": "readLatestRunManifest" | ||
| }, | ||
| { | ||
| "kind": "existing-service", | ||
| "module": "src/services/runs.ts", | ||
| "symbol": "readRunManifest" | ||
| }, | ||
| { | ||
| "kind": "existing-service", | ||
| "module": "src/services/consultations.ts", | ||
| "symbol": "renderConsultationSummary" | ||
| }, | ||
| { | ||
| "kind": "new-adapter-layer", | ||
| "module": "src/services/chat-native.ts", | ||
| "symbol": "buildConsultationArtifacts", | ||
| "note": "Machine-readable MCP response assembly layer." | ||
| } | ||
| ], | ||
| "machineReadableArtifacts": [ | ||
| "run.json", | ||
| "consultation-config.json", | ||
| "profile-selection.json", | ||
| "comparison.json", | ||
| "comparison.md", | ||
| "winner-selection.json", | ||
| "export-plan.json" | ||
| ] | ||
| }, | ||
| { | ||
| "id": "oraculum_verdict_archive", | ||
| "purpose": "List recent consultations in machine-readable form for archive browsing and reopen flows.", | ||
| "requestShape": "verdictArchiveToolRequestSchema", | ||
| "responseShape": "verdictArchiveToolResponseSchema", | ||
| "bindings": [ | ||
| { | ||
| "kind": "existing-service", | ||
| "module": "src/services/consultations.ts", | ||
| "symbol": "listRecentConsultations" | ||
| }, | ||
| { | ||
| "kind": "existing-service", | ||
| "module": "src/services/consultations.ts", | ||
| "symbol": "renderConsultationArchive" | ||
| } | ||
| ], | ||
| "machineReadableArtifacts": [ | ||
| "run.json" | ||
| ] | ||
| }, | ||
| { | ||
| "id": "oraculum_crown", | ||
| "purpose": "Crown the recommended or explicitly selected survivor and materialize it into the project.", | ||
| "requestShape": "crownToolRequestSchema", | ||
| "responseShape": "crownToolResponseSchema", | ||
| "bindings": [ | ||
| { | ||
| "kind": "existing-service", | ||
| "module": "src/services/exports.ts", | ||
| "symbol": "materializeExport" | ||
| }, | ||
| { | ||
| "kind": "existing-service", | ||
| "module": "src/services/runs.ts", | ||
| "symbol": "readRunManifest" | ||
| } | ||
| ], | ||
| "machineReadableArtifacts": [ | ||
| "export-plan.json", | ||
| "export.patch", | ||
| "export-sync.json" | ||
| ] | ||
| }, | ||
| { | ||
| "id": "oraculum_init", | ||
| "purpose": "Initialize the quick-start project scaffold and return the created paths.", | ||
| "requestShape": "initToolRequestSchema", | ||
| "responseShape": "initToolResponseSchema", | ||
| "bindings": [ | ||
| { | ||
| "kind": "existing-service", | ||
| "module": "src/services/project.ts", | ||
| "symbol": "initializeProject" | ||
| } | ||
| ], | ||
| "machineReadableArtifacts": [ | ||
| "config.json" | ||
| ] | ||
| }, | ||
| { | ||
| "id": "oraculum_setup_status", | ||
| "purpose": "Return setup diagnostics that explain whether host registration is ready for chat-native commands.", | ||
| "requestShape": "setupStatusToolRequestSchema", | ||
| "responseShape": "setupStatusToolResponseSchema", | ||
| "bindings": [ | ||
| { | ||
| "kind": "existing-service", | ||
| "module": "src/services/project.ts", | ||
| "symbol": "pathExists" | ||
| }, | ||
| { | ||
| "kind": "new-adapter-layer", | ||
| "module": "src/services/chat-native.ts", | ||
| "symbol": "buildSetupDiagnosticsResponse", | ||
| "note": "Host registration inspection layer until full setup/install commands land." | ||
| } | ||
| ], | ||
| "machineReadableArtifacts": [] | ||
| } | ||
| ] |
| import type { Command } from "commander"; | ||
| export declare function registerMcpCommand(program: Command): void; |
| import { runOraculumMcpServer } from "../services/mcp-server.js"; | ||
| export function registerMcpCommand(program) { | ||
| const mcp = program.command("mcp").description("Internal MCP server commands."); | ||
| mcp | ||
| .command("serve") | ||
| .description("Run the Oraculum MCP server on stdio.") | ||
| .action(async () => { | ||
| await runOraculumMcpServer(); | ||
| }); | ||
| } | ||
| //# sourceMappingURL=mcp.js.map |
| {"version":3,"file":"mcp.js","sourceRoot":"","sources":["../../src/commands/mcp.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAEjE,MAAM,UAAU,kBAAkB,CAAC,OAAgB;IACjD,MAAM,GAAG,GAAG,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,WAAW,CAAC,+BAA+B,CAAC,CAAC;IAEhF,GAAG;SACA,OAAO,CAAC,OAAO,CAAC;SAChB,WAAW,CAAC,uCAAuC,CAAC;SACpD,MAAM,CAAC,KAAK,IAAI,EAAE;QACjB,MAAM,oBAAoB,EAAE,CAAC;IAC/B,CAAC,CAAC,CAAC;AACP,CAAC"} |
| import { type Command } from "commander"; | ||
| export declare function registerSetupCommand(program: Command): void; |
| import { InvalidArgumentError } from "commander"; | ||
| import { OraculumError } from "../core/errors.js"; | ||
| import { buildSetupDiagnosticsResponse } from "../services/chat-native.js"; | ||
| import { setupClaudeCodeHost } from "../services/claude-chat-native.js"; | ||
| import { setupCodexHost } from "../services/codex-chat-native.js"; | ||
| export function registerSetupCommand(program) { | ||
| const setup = program | ||
| .command("setup") | ||
| .description("Register chat-native host integration and MCP wiring.") | ||
| .option("-r, --runtime <runtime>", "target host runtime", parseRuntime) | ||
| .option("--scope <scope>", "installation scope: user, project, or local", parseScope, "user") | ||
| .action(async (options, command) => { | ||
| const runtime = options.runtime ?? command.optsWithGlobals().runtime; | ||
| if (!runtime) { | ||
| throw new OraculumError('setup requires "--runtime <claude-code|codex>" unless a subcommand is used.'); | ||
| } | ||
| if (runtime === "claude-code") { | ||
| const result = await setupClaudeCodeHost({ | ||
| scope: options.scope, | ||
| }); | ||
| process.stdout.write("Configured Claude Code chat-native integration.\n"); | ||
| process.stdout.write(`Scope: ${result.scope}\n`); | ||
| process.stdout.write(`Packaged root: ${result.packagedRoot}\n`); | ||
| process.stdout.write(`Plugin root: ${result.pluginRoot}\n`); | ||
| process.stdout.write(`Marketplace: ${result.marketplacePath}\n`); | ||
| process.stdout.write(`MCP config: ${result.mcpConfigPath}\n`); | ||
| return; | ||
| } | ||
| if (runtime === "codex") { | ||
| const result = await setupCodexHost({ | ||
| scope: options.scope, | ||
| }); | ||
| process.stdout.write("Configured Codex chat-native integration.\n"); | ||
| process.stdout.write(`Scope: ${result.scope}\n`); | ||
| process.stdout.write(`Packaged root: ${result.packagedRoot}\n`); | ||
| process.stdout.write(`Install root: ${result.installRoot}\n`); | ||
| process.stdout.write(`Skills root: ${result.skillsRoot}\n`); | ||
| process.stdout.write(`Rules root: ${result.rulesRoot}\n`); | ||
| process.stdout.write(`Codex config: ${result.configPath}\n`); | ||
| return; | ||
| } | ||
| throw new OraculumError(`Chat-native setup for "${runtime}" is not implemented yet.`); | ||
| }); | ||
| setup | ||
| .command("status") | ||
| .description("Inspect host setup diagnostics for chat-native routing.") | ||
| .option("--json", "emit machine-readable setup diagnostics") | ||
| .option("-r, --runtime <runtime>", "target host runtime", parseRuntime) | ||
| .action(async (options, command) => { | ||
| const diagnostics = await buildSetupDiagnosticsResponse(process.cwd()); | ||
| const runtime = options.runtime ?? command.optsWithGlobals().runtime; | ||
| const hosts = runtime | ||
| ? diagnostics.hosts.filter((host) => host.host === runtime) | ||
| : diagnostics.hosts; | ||
| if (options.json) { | ||
| process.stdout.write(`${JSON.stringify({ | ||
| ...diagnostics, | ||
| hosts, | ||
| }, null, 2)}\n`); | ||
| return; | ||
| } | ||
| process.stdout.write(`${diagnostics.summary}\n`); | ||
| for (const host of hosts) { | ||
| if (options.runtime && host.host !== options.runtime) { | ||
| continue; | ||
| } | ||
| process.stdout.write(`${host.host}: status=${host.status} registered=${host.registered ? "yes" : "no"} artifacts=${host.artifactsInstalled ? "yes" : "no"}\n`); | ||
| process.stdout.write(`- next: ${host.nextAction}\n`); | ||
| for (const note of host.notes) { | ||
| process.stdout.write(`- ${note}\n`); | ||
| } | ||
| } | ||
| }); | ||
| } | ||
| function parseRuntime(value) { | ||
| if (value !== "claude-code" && value !== "codex") { | ||
| throw new InvalidArgumentError('runtime must be one of: "claude-code", "codex".'); | ||
| } | ||
| return value; | ||
| } | ||
| function parseScope(value) { | ||
| if (value !== "user" && value !== "project" && value !== "local") { | ||
| throw new InvalidArgumentError('scope must be one of: "user", "project", "local".'); | ||
| } | ||
| return value; | ||
| } | ||
| //# sourceMappingURL=setup.js.map |
| {"version":3,"file":"setup.js","sourceRoot":"","sources":["../../src/commands/setup.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,oBAAoB,EAAE,MAAM,WAAW,CAAC;AAE/D,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD,OAAO,EAAE,6BAA6B,EAAE,MAAM,4BAA4B,CAAC;AAC3E,OAAO,EAA6B,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AACnG,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAYlE,MAAM,UAAU,oBAAoB,CAAC,OAAgB;IACnD,MAAM,KAAK,GAAG,OAAO;SAClB,OAAO,CAAC,OAAO,CAAC;SAChB,WAAW,CAAC,uDAAuD,CAAC;SACpE,MAAM,CAAC,yBAAyB,EAAE,qBAAqB,EAAE,YAAY,CAAC;SACtE,MAAM,CAAC,iBAAiB,EAAE,6CAA6C,EAAE,UAAU,EAAE,MAAM,CAAC;SAC5F,MAAM,CAAC,KAAK,EAAE,OAAqB,EAAE,OAAgB,EAAE,EAAE;QACxD,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,IAAK,OAAO,CAAC,eAAe,EAAE,CAAC,OAA+B,CAAC;QAE9F,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,MAAM,IAAI,aAAa,CACrB,6EAA6E,CAC9E,CAAC;QACJ,CAAC;QAED,IAAI,OAAO,KAAK,aAAa,EAAE,CAAC;YAC9B,MAAM,MAAM,GAAG,MAAM,mBAAmB,CAAC;gBACvC,KAAK,EAAE,OAAO,CAAC,KAAK;aACrB,CAAC,CAAC;YAEH,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,mDAAmD,CAAC,CAAC;YAC1E,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,UAAU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,IAAI,cAAc,IAAI,CAAC,kBAAkB,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,IAAI,CACzI,CAAC;YACF,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,WAAW,IAAI,CAAC,UAAU,IAAI,CAAC,CAAC;YACrD,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;gBAC9B,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,IAAI,IAAI,CAAC,CAAC;YACtC,CAAC;QACH,CAAC;IACH,CAAC,CAAC,CAAC;AACP,CAAC;AAED,SAAS,YAAY,CAAC,KAAa;IACjC,IAAI,KAAK,KAAK,aAAa,IAAI,KAAK,KAAK,OAAO,EAAE,CAAC;QACjD,MAAM,IAAI,oBAAoB,CAAC,iDAAiD,CAAC,CAAC;IACpF,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC;AAED,SAAS,UAAU,CAAC,KAAa;IAC/B,IAAI,KAAK,KAAK,MAAM,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,OAAO,EAAE,CAAC;QACjE,MAAM,IAAI,oBAAoB,CAAC,mDAAmD,CAAC,CAAC;IACtF,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC"} |
| import { z } from "zod"; | ||
| export declare const commandPrefixSchema: z.ZodLiteral<"orc">; | ||
| export declare const mcpToolIdSchema: z.ZodEnum<{ | ||
| oraculum_consult: "oraculum_consult"; | ||
| oraculum_draft: "oraculum_draft"; | ||
| oraculum_verdict: "oraculum_verdict"; | ||
| oraculum_verdict_archive: "oraculum_verdict_archive"; | ||
| oraculum_crown: "oraculum_crown"; | ||
| oraculum_init: "oraculum_init"; | ||
| oraculum_setup_status: "oraculum_setup_status"; | ||
| }>; | ||
| export declare const schemaReferenceSchema: z.ZodString; | ||
| export declare const toolBindingSchema: z.ZodObject<{ | ||
| kind: z.ZodEnum<{ | ||
| "existing-service": "existing-service"; | ||
| "existing-command": "existing-command"; | ||
| "new-adapter-layer": "new-adapter-layer"; | ||
| }>; | ||
| module: z.ZodString; | ||
| symbol: z.ZodString; | ||
| note: z.ZodOptional<z.ZodString>; | ||
| }, z.core.$strip>; | ||
| export declare const toolMetadataSchema: z.ZodObject<{ | ||
| id: z.ZodEnum<{ | ||
| oraculum_consult: "oraculum_consult"; | ||
| oraculum_draft: "oraculum_draft"; | ||
| oraculum_verdict: "oraculum_verdict"; | ||
| oraculum_verdict_archive: "oraculum_verdict_archive"; | ||
| oraculum_crown: "oraculum_crown"; | ||
| oraculum_init: "oraculum_init"; | ||
| oraculum_setup_status: "oraculum_setup_status"; | ||
| }>; | ||
| purpose: z.ZodString; | ||
| requestShape: z.ZodString; | ||
| responseShape: z.ZodString; | ||
| bindings: z.ZodArray<z.ZodObject<{ | ||
| kind: z.ZodEnum<{ | ||
| "existing-service": "existing-service"; | ||
| "existing-command": "existing-command"; | ||
| "new-adapter-layer": "new-adapter-layer"; | ||
| }>; | ||
| module: z.ZodString; | ||
| symbol: z.ZodString; | ||
| note: z.ZodOptional<z.ZodString>; | ||
| }, z.core.$strip>>; | ||
| machineReadableArtifacts: z.ZodDefault<z.ZodArray<z.ZodString>>; | ||
| }, z.core.$strip>; | ||
| export declare const commandArgumentKindSchema: z.ZodEnum<{ | ||
| string: "string"; | ||
| boolean: "boolean"; | ||
| integer: "integer"; | ||
| }>; | ||
| export declare const commandArgumentSchema: z.ZodObject<{ | ||
| name: z.ZodString; | ||
| kind: z.ZodEnum<{ | ||
| string: "string"; | ||
| boolean: "boolean"; | ||
| integer: "integer"; | ||
| }>; | ||
| description: z.ZodString; | ||
| required: z.ZodDefault<z.ZodBoolean>; | ||
| positional: z.ZodDefault<z.ZodBoolean>; | ||
| option: z.ZodOptional<z.ZodString>; | ||
| }, z.core.$strip>; | ||
| export declare const commandManifestEntrySchema: z.ZodObject<{ | ||
| id: z.ZodString; | ||
| prefix: z.ZodLiteral<"orc">; | ||
| path: z.ZodArray<z.ZodString>; | ||
| summary: z.ZodString; | ||
| mcpTool: z.ZodEnum<{ | ||
| oraculum_consult: "oraculum_consult"; | ||
| oraculum_draft: "oraculum_draft"; | ||
| oraculum_verdict: "oraculum_verdict"; | ||
| oraculum_verdict_archive: "oraculum_verdict_archive"; | ||
| oraculum_crown: "oraculum_crown"; | ||
| oraculum_init: "oraculum_init"; | ||
| oraculum_setup_status: "oraculum_setup_status"; | ||
| }>; | ||
| requestShape: z.ZodString; | ||
| responseShape: z.ZodString; | ||
| arguments: z.ZodDefault<z.ZodArray<z.ZodObject<{ | ||
| name: z.ZodString; | ||
| kind: z.ZodEnum<{ | ||
| string: "string"; | ||
| boolean: "boolean"; | ||
| integer: "integer"; | ||
| }>; | ||
| description: z.ZodString; | ||
| required: z.ZodDefault<z.ZodBoolean>; | ||
| positional: z.ZodDefault<z.ZodBoolean>; | ||
| option: z.ZodOptional<z.ZodString>; | ||
| }, z.core.$strip>>>; | ||
| examples: z.ZodArray<z.ZodString>; | ||
| hostAdditions: z.ZodDefault<z.ZodObject<{ | ||
| "claude-code": z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>; | ||
| codex: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>; | ||
| }, z.core.$strip>>; | ||
| }, z.core.$strip>; | ||
| export declare const consultToolRequestSchema: z.ZodObject<{ | ||
| cwd: z.ZodString; | ||
| taskInput: z.ZodString; | ||
| agent: z.ZodOptional<z.ZodEnum<{ | ||
| "claude-code": "claude-code"; | ||
| codex: "codex"; | ||
| }>>; | ||
| candidates: z.ZodOptional<z.ZodNumber>; | ||
| timeoutMs: z.ZodOptional<z.ZodNumber>; | ||
| }, z.core.$strip>; | ||
| export declare const consultationArtifactPathsSchema: z.ZodObject<{ | ||
| consultationRoot: z.ZodString; | ||
| configPath: z.ZodString; | ||
| profileSelectionPath: z.ZodOptional<z.ZodString>; | ||
| comparisonJsonPath: z.ZodOptional<z.ZodString>; | ||
| comparisonMarkdownPath: z.ZodOptional<z.ZodString>; | ||
| winnerSelectionPath: z.ZodOptional<z.ZodString>; | ||
| crowningRecordPath: z.ZodOptional<z.ZodString>; | ||
| }, z.core.$strip>; | ||
| export declare const projectInitializationResultSchema: z.ZodObject<{ | ||
| projectRoot: z.ZodString; | ||
| configPath: z.ZodString; | ||
| createdPaths: z.ZodArray<z.ZodString>; | ||
| }, z.core.$strip>; | ||
| export declare const consultToolResponseSchema: z.ZodObject<{ | ||
| mode: z.ZodLiteral<"consult">; | ||
| consultation: z.ZodObject<{ | ||
| id: z.ZodString; | ||
| status: z.ZodEnum<{ | ||
| planned: "planned"; | ||
| running: "running"; | ||
| completed: "completed"; | ||
| }>; | ||
| taskPath: z.ZodString; | ||
| taskPacket: z.ZodObject<{ | ||
| id: z.ZodString; | ||
| title: z.ZodString; | ||
| sourceKind: z.ZodEnum<{ | ||
| "task-packet": "task-packet"; | ||
| "task-note": "task-note"; | ||
| }>; | ||
| sourcePath: z.ZodString; | ||
| }, z.core.$strip>; | ||
| agent: z.ZodEnum<{ | ||
| "claude-code": "claude-code"; | ||
| codex: "codex"; | ||
| }>; | ||
| configPath: z.ZodOptional<z.ZodString>; | ||
| candidateCount: z.ZodNumber; | ||
| createdAt: z.ZodString; | ||
| rounds: z.ZodArray<z.ZodObject<{ | ||
| id: z.ZodEnum<{ | ||
| fast: "fast"; | ||
| impact: "impact"; | ||
| deep: "deep"; | ||
| }>; | ||
| label: z.ZodString; | ||
| status: z.ZodEnum<{ | ||
| running: "running"; | ||
| pending: "pending"; | ||
| completed: "completed"; | ||
| }>; | ||
| verdictCount: z.ZodNumber; | ||
| survivorCount: z.ZodNumber; | ||
| eliminatedCount: z.ZodNumber; | ||
| startedAt: z.ZodOptional<z.ZodString>; | ||
| completedAt: z.ZodOptional<z.ZodString>; | ||
| }, z.core.$strip>>; | ||
| candidates: z.ZodArray<z.ZodObject<{ | ||
| id: z.ZodString; | ||
| strategyId: z.ZodString; | ||
| strategyLabel: z.ZodString; | ||
| status: z.ZodEnum<{ | ||
| planned: "planned"; | ||
| running: "running"; | ||
| executed: "executed"; | ||
| failed: "failed"; | ||
| judged: "judged"; | ||
| eliminated: "eliminated"; | ||
| promoted: "promoted"; | ||
| exported: "exported"; | ||
| }>; | ||
| workspaceDir: z.ZodString; | ||
| taskPacketPath: z.ZodString; | ||
| lastRunResultPath: z.ZodOptional<z.ZodString>; | ||
| workspaceMode: z.ZodOptional<z.ZodEnum<{ | ||
| copy: "copy"; | ||
| "git-worktree": "git-worktree"; | ||
| }>>; | ||
| baseRevision: z.ZodOptional<z.ZodString>; | ||
| baseSnapshotPath: z.ZodOptional<z.ZodString>; | ||
| repairCount: z.ZodDefault<z.ZodNumber>; | ||
| repairedRounds: z.ZodDefault<z.ZodArray<z.ZodEnum<{ | ||
| fast: "fast"; | ||
| impact: "impact"; | ||
| deep: "deep"; | ||
| }>>>; | ||
| createdAt: z.ZodString; | ||
| }, z.core.$strip>>; | ||
| profileSelection: z.ZodOptional<z.ZodObject<{ | ||
| profileId: z.ZodEnum<{ | ||
| library: "library"; | ||
| frontend: "frontend"; | ||
| migration: "migration"; | ||
| }>; | ||
| confidence: z.ZodEnum<{ | ||
| low: "low"; | ||
| medium: "medium"; | ||
| high: "high"; | ||
| }>; | ||
| source: z.ZodEnum<{ | ||
| "llm-recommendation": "llm-recommendation"; | ||
| "fallback-detection": "fallback-detection"; | ||
| }>; | ||
| summary: z.ZodString; | ||
| candidateCount: z.ZodNumber; | ||
| strategyIds: z.ZodArray<z.ZodString>; | ||
| oracleIds: z.ZodDefault<z.ZodArray<z.ZodString>>; | ||
| missingCapabilities: z.ZodDefault<z.ZodArray<z.ZodString>>; | ||
| signals: z.ZodDefault<z.ZodArray<z.ZodString>>; | ||
| }, z.core.$strip>>; | ||
| recommendedWinner: z.ZodOptional<z.ZodObject<{ | ||
| candidateId: z.ZodString; | ||
| summary: z.ZodString; | ||
| confidence: z.ZodEnum<{ | ||
| low: "low"; | ||
| medium: "medium"; | ||
| high: "high"; | ||
| }>; | ||
| source: z.ZodEnum<{ | ||
| "llm-judge": "llm-judge"; | ||
| "fallback-policy": "fallback-policy"; | ||
| }>; | ||
| }, z.core.$strip>>; | ||
| }, z.core.$strip>; | ||
| summary: z.ZodString; | ||
| artifacts: z.ZodObject<{ | ||
| consultationRoot: z.ZodString; | ||
| configPath: z.ZodString; | ||
| profileSelectionPath: z.ZodOptional<z.ZodString>; | ||
| comparisonJsonPath: z.ZodOptional<z.ZodString>; | ||
| comparisonMarkdownPath: z.ZodOptional<z.ZodString>; | ||
| winnerSelectionPath: z.ZodOptional<z.ZodString>; | ||
| crowningRecordPath: z.ZodOptional<z.ZodString>; | ||
| }, z.core.$strip>; | ||
| initializedProject: z.ZodOptional<z.ZodObject<{ | ||
| projectRoot: z.ZodString; | ||
| configPath: z.ZodString; | ||
| createdPaths: z.ZodArray<z.ZodString>; | ||
| }, z.core.$strip>>; | ||
| }, z.core.$strip>; | ||
| export declare const draftToolRequestSchema: z.ZodObject<{ | ||
| cwd: z.ZodString; | ||
| taskInput: z.ZodString; | ||
| agent: z.ZodOptional<z.ZodEnum<{ | ||
| "claude-code": "claude-code"; | ||
| codex: "codex"; | ||
| }>>; | ||
| candidates: z.ZodOptional<z.ZodNumber>; | ||
| }, z.core.$strip>; | ||
| export declare const draftToolResponseSchema: z.ZodObject<{ | ||
| mode: z.ZodLiteral<"draft">; | ||
| consultation: z.ZodObject<{ | ||
| id: z.ZodString; | ||
| status: z.ZodEnum<{ | ||
| planned: "planned"; | ||
| running: "running"; | ||
| completed: "completed"; | ||
| }>; | ||
| taskPath: z.ZodString; | ||
| taskPacket: z.ZodObject<{ | ||
| id: z.ZodString; | ||
| title: z.ZodString; | ||
| sourceKind: z.ZodEnum<{ | ||
| "task-packet": "task-packet"; | ||
| "task-note": "task-note"; | ||
| }>; | ||
| sourcePath: z.ZodString; | ||
| }, z.core.$strip>; | ||
| agent: z.ZodEnum<{ | ||
| "claude-code": "claude-code"; | ||
| codex: "codex"; | ||
| }>; | ||
| configPath: z.ZodOptional<z.ZodString>; | ||
| candidateCount: z.ZodNumber; | ||
| createdAt: z.ZodString; | ||
| rounds: z.ZodArray<z.ZodObject<{ | ||
| id: z.ZodEnum<{ | ||
| fast: "fast"; | ||
| impact: "impact"; | ||
| deep: "deep"; | ||
| }>; | ||
| label: z.ZodString; | ||
| status: z.ZodEnum<{ | ||
| running: "running"; | ||
| pending: "pending"; | ||
| completed: "completed"; | ||
| }>; | ||
| verdictCount: z.ZodNumber; | ||
| survivorCount: z.ZodNumber; | ||
| eliminatedCount: z.ZodNumber; | ||
| startedAt: z.ZodOptional<z.ZodString>; | ||
| completedAt: z.ZodOptional<z.ZodString>; | ||
| }, z.core.$strip>>; | ||
| candidates: z.ZodArray<z.ZodObject<{ | ||
| id: z.ZodString; | ||
| strategyId: z.ZodString; | ||
| strategyLabel: z.ZodString; | ||
| status: z.ZodEnum<{ | ||
| planned: "planned"; | ||
| running: "running"; | ||
| executed: "executed"; | ||
| failed: "failed"; | ||
| judged: "judged"; | ||
| eliminated: "eliminated"; | ||
| promoted: "promoted"; | ||
| exported: "exported"; | ||
| }>; | ||
| workspaceDir: z.ZodString; | ||
| taskPacketPath: z.ZodString; | ||
| lastRunResultPath: z.ZodOptional<z.ZodString>; | ||
| workspaceMode: z.ZodOptional<z.ZodEnum<{ | ||
| copy: "copy"; | ||
| "git-worktree": "git-worktree"; | ||
| }>>; | ||
| baseRevision: z.ZodOptional<z.ZodString>; | ||
| baseSnapshotPath: z.ZodOptional<z.ZodString>; | ||
| repairCount: z.ZodDefault<z.ZodNumber>; | ||
| repairedRounds: z.ZodDefault<z.ZodArray<z.ZodEnum<{ | ||
| fast: "fast"; | ||
| impact: "impact"; | ||
| deep: "deep"; | ||
| }>>>; | ||
| createdAt: z.ZodString; | ||
| }, z.core.$strip>>; | ||
| profileSelection: z.ZodOptional<z.ZodObject<{ | ||
| profileId: z.ZodEnum<{ | ||
| library: "library"; | ||
| frontend: "frontend"; | ||
| migration: "migration"; | ||
| }>; | ||
| confidence: z.ZodEnum<{ | ||
| low: "low"; | ||
| medium: "medium"; | ||
| high: "high"; | ||
| }>; | ||
| source: z.ZodEnum<{ | ||
| "llm-recommendation": "llm-recommendation"; | ||
| "fallback-detection": "fallback-detection"; | ||
| }>; | ||
| summary: z.ZodString; | ||
| candidateCount: z.ZodNumber; | ||
| strategyIds: z.ZodArray<z.ZodString>; | ||
| oracleIds: z.ZodDefault<z.ZodArray<z.ZodString>>; | ||
| missingCapabilities: z.ZodDefault<z.ZodArray<z.ZodString>>; | ||
| signals: z.ZodDefault<z.ZodArray<z.ZodString>>; | ||
| }, z.core.$strip>>; | ||
| recommendedWinner: z.ZodOptional<z.ZodObject<{ | ||
| candidateId: z.ZodString; | ||
| summary: z.ZodString; | ||
| confidence: z.ZodEnum<{ | ||
| low: "low"; | ||
| medium: "medium"; | ||
| high: "high"; | ||
| }>; | ||
| source: z.ZodEnum<{ | ||
| "llm-judge": "llm-judge"; | ||
| "fallback-policy": "fallback-policy"; | ||
| }>; | ||
| }, z.core.$strip>>; | ||
| }, z.core.$strip>; | ||
| summary: z.ZodString; | ||
| artifacts: z.ZodObject<{ | ||
| consultationRoot: z.ZodString; | ||
| configPath: z.ZodString; | ||
| profileSelectionPath: z.ZodOptional<z.ZodString>; | ||
| comparisonJsonPath: z.ZodOptional<z.ZodString>; | ||
| comparisonMarkdownPath: z.ZodOptional<z.ZodString>; | ||
| winnerSelectionPath: z.ZodOptional<z.ZodString>; | ||
| crowningRecordPath: z.ZodOptional<z.ZodString>; | ||
| }, z.core.$strip>; | ||
| initializedProject: z.ZodOptional<z.ZodObject<{ | ||
| projectRoot: z.ZodString; | ||
| configPath: z.ZodString; | ||
| createdPaths: z.ZodArray<z.ZodString>; | ||
| }, z.core.$strip>>; | ||
| }, z.core.$strip>; | ||
| export declare const verdictToolRequestSchema: z.ZodObject<{ | ||
| cwd: z.ZodString; | ||
| consultationId: z.ZodOptional<z.ZodString>; | ||
| }, z.core.$strip>; | ||
| export declare const verdictToolResponseSchema: z.ZodObject<{ | ||
| mode: z.ZodLiteral<"verdict">; | ||
| consultation: z.ZodObject<{ | ||
| id: z.ZodString; | ||
| status: z.ZodEnum<{ | ||
| planned: "planned"; | ||
| running: "running"; | ||
| completed: "completed"; | ||
| }>; | ||
| taskPath: z.ZodString; | ||
| taskPacket: z.ZodObject<{ | ||
| id: z.ZodString; | ||
| title: z.ZodString; | ||
| sourceKind: z.ZodEnum<{ | ||
| "task-packet": "task-packet"; | ||
| "task-note": "task-note"; | ||
| }>; | ||
| sourcePath: z.ZodString; | ||
| }, z.core.$strip>; | ||
| agent: z.ZodEnum<{ | ||
| "claude-code": "claude-code"; | ||
| codex: "codex"; | ||
| }>; | ||
| configPath: z.ZodOptional<z.ZodString>; | ||
| candidateCount: z.ZodNumber; | ||
| createdAt: z.ZodString; | ||
| rounds: z.ZodArray<z.ZodObject<{ | ||
| id: z.ZodEnum<{ | ||
| fast: "fast"; | ||
| impact: "impact"; | ||
| deep: "deep"; | ||
| }>; | ||
| label: z.ZodString; | ||
| status: z.ZodEnum<{ | ||
| running: "running"; | ||
| pending: "pending"; | ||
| completed: "completed"; | ||
| }>; | ||
| verdictCount: z.ZodNumber; | ||
| survivorCount: z.ZodNumber; | ||
| eliminatedCount: z.ZodNumber; | ||
| startedAt: z.ZodOptional<z.ZodString>; | ||
| completedAt: z.ZodOptional<z.ZodString>; | ||
| }, z.core.$strip>>; | ||
| candidates: z.ZodArray<z.ZodObject<{ | ||
| id: z.ZodString; | ||
| strategyId: z.ZodString; | ||
| strategyLabel: z.ZodString; | ||
| status: z.ZodEnum<{ | ||
| planned: "planned"; | ||
| running: "running"; | ||
| executed: "executed"; | ||
| failed: "failed"; | ||
| judged: "judged"; | ||
| eliminated: "eliminated"; | ||
| promoted: "promoted"; | ||
| exported: "exported"; | ||
| }>; | ||
| workspaceDir: z.ZodString; | ||
| taskPacketPath: z.ZodString; | ||
| lastRunResultPath: z.ZodOptional<z.ZodString>; | ||
| workspaceMode: z.ZodOptional<z.ZodEnum<{ | ||
| copy: "copy"; | ||
| "git-worktree": "git-worktree"; | ||
| }>>; | ||
| baseRevision: z.ZodOptional<z.ZodString>; | ||
| baseSnapshotPath: z.ZodOptional<z.ZodString>; | ||
| repairCount: z.ZodDefault<z.ZodNumber>; | ||
| repairedRounds: z.ZodDefault<z.ZodArray<z.ZodEnum<{ | ||
| fast: "fast"; | ||
| impact: "impact"; | ||
| deep: "deep"; | ||
| }>>>; | ||
| createdAt: z.ZodString; | ||
| }, z.core.$strip>>; | ||
| profileSelection: z.ZodOptional<z.ZodObject<{ | ||
| profileId: z.ZodEnum<{ | ||
| library: "library"; | ||
| frontend: "frontend"; | ||
| migration: "migration"; | ||
| }>; | ||
| confidence: z.ZodEnum<{ | ||
| low: "low"; | ||
| medium: "medium"; | ||
| high: "high"; | ||
| }>; | ||
| source: z.ZodEnum<{ | ||
| "llm-recommendation": "llm-recommendation"; | ||
| "fallback-detection": "fallback-detection"; | ||
| }>; | ||
| summary: z.ZodString; | ||
| candidateCount: z.ZodNumber; | ||
| strategyIds: z.ZodArray<z.ZodString>; | ||
| oracleIds: z.ZodDefault<z.ZodArray<z.ZodString>>; | ||
| missingCapabilities: z.ZodDefault<z.ZodArray<z.ZodString>>; | ||
| signals: z.ZodDefault<z.ZodArray<z.ZodString>>; | ||
| }, z.core.$strip>>; | ||
| recommendedWinner: z.ZodOptional<z.ZodObject<{ | ||
| candidateId: z.ZodString; | ||
| summary: z.ZodString; | ||
| confidence: z.ZodEnum<{ | ||
| low: "low"; | ||
| medium: "medium"; | ||
| high: "high"; | ||
| }>; | ||
| source: z.ZodEnum<{ | ||
| "llm-judge": "llm-judge"; | ||
| "fallback-policy": "fallback-policy"; | ||
| }>; | ||
| }, z.core.$strip>>; | ||
| }, z.core.$strip>; | ||
| summary: z.ZodString; | ||
| artifacts: z.ZodObject<{ | ||
| consultationRoot: z.ZodString; | ||
| configPath: z.ZodString; | ||
| profileSelectionPath: z.ZodOptional<z.ZodString>; | ||
| comparisonJsonPath: z.ZodOptional<z.ZodString>; | ||
| comparisonMarkdownPath: z.ZodOptional<z.ZodString>; | ||
| winnerSelectionPath: z.ZodOptional<z.ZodString>; | ||
| crowningRecordPath: z.ZodOptional<z.ZodString>; | ||
| }, z.core.$strip>; | ||
| }, z.core.$strip>; | ||
| export declare const verdictArchiveToolRequestSchema: z.ZodObject<{ | ||
| cwd: z.ZodString; | ||
| count: z.ZodOptional<z.ZodNumber>; | ||
| }, z.core.$strip>; | ||
| export declare const verdictArchiveToolResponseSchema: z.ZodObject<{ | ||
| mode: z.ZodLiteral<"verdict-archive">; | ||
| consultations: z.ZodArray<z.ZodObject<{ | ||
| id: z.ZodString; | ||
| status: z.ZodEnum<{ | ||
| planned: "planned"; | ||
| running: "running"; | ||
| completed: "completed"; | ||
| }>; | ||
| taskPath: z.ZodString; | ||
| taskPacket: z.ZodObject<{ | ||
| id: z.ZodString; | ||
| title: z.ZodString; | ||
| sourceKind: z.ZodEnum<{ | ||
| "task-packet": "task-packet"; | ||
| "task-note": "task-note"; | ||
| }>; | ||
| sourcePath: z.ZodString; | ||
| }, z.core.$strip>; | ||
| agent: z.ZodEnum<{ | ||
| "claude-code": "claude-code"; | ||
| codex: "codex"; | ||
| }>; | ||
| configPath: z.ZodOptional<z.ZodString>; | ||
| candidateCount: z.ZodNumber; | ||
| createdAt: z.ZodString; | ||
| rounds: z.ZodArray<z.ZodObject<{ | ||
| id: z.ZodEnum<{ | ||
| fast: "fast"; | ||
| impact: "impact"; | ||
| deep: "deep"; | ||
| }>; | ||
| label: z.ZodString; | ||
| status: z.ZodEnum<{ | ||
| running: "running"; | ||
| pending: "pending"; | ||
| completed: "completed"; | ||
| }>; | ||
| verdictCount: z.ZodNumber; | ||
| survivorCount: z.ZodNumber; | ||
| eliminatedCount: z.ZodNumber; | ||
| startedAt: z.ZodOptional<z.ZodString>; | ||
| completedAt: z.ZodOptional<z.ZodString>; | ||
| }, z.core.$strip>>; | ||
| candidates: z.ZodArray<z.ZodObject<{ | ||
| id: z.ZodString; | ||
| strategyId: z.ZodString; | ||
| strategyLabel: z.ZodString; | ||
| status: z.ZodEnum<{ | ||
| planned: "planned"; | ||
| running: "running"; | ||
| executed: "executed"; | ||
| failed: "failed"; | ||
| judged: "judged"; | ||
| eliminated: "eliminated"; | ||
| promoted: "promoted"; | ||
| exported: "exported"; | ||
| }>; | ||
| workspaceDir: z.ZodString; | ||
| taskPacketPath: z.ZodString; | ||
| lastRunResultPath: z.ZodOptional<z.ZodString>; | ||
| workspaceMode: z.ZodOptional<z.ZodEnum<{ | ||
| copy: "copy"; | ||
| "git-worktree": "git-worktree"; | ||
| }>>; | ||
| baseRevision: z.ZodOptional<z.ZodString>; | ||
| baseSnapshotPath: z.ZodOptional<z.ZodString>; | ||
| repairCount: z.ZodDefault<z.ZodNumber>; | ||
| repairedRounds: z.ZodDefault<z.ZodArray<z.ZodEnum<{ | ||
| fast: "fast"; | ||
| impact: "impact"; | ||
| deep: "deep"; | ||
| }>>>; | ||
| createdAt: z.ZodString; | ||
| }, z.core.$strip>>; | ||
| profileSelection: z.ZodOptional<z.ZodObject<{ | ||
| profileId: z.ZodEnum<{ | ||
| library: "library"; | ||
| frontend: "frontend"; | ||
| migration: "migration"; | ||
| }>; | ||
| confidence: z.ZodEnum<{ | ||
| low: "low"; | ||
| medium: "medium"; | ||
| high: "high"; | ||
| }>; | ||
| source: z.ZodEnum<{ | ||
| "llm-recommendation": "llm-recommendation"; | ||
| "fallback-detection": "fallback-detection"; | ||
| }>; | ||
| summary: z.ZodString; | ||
| candidateCount: z.ZodNumber; | ||
| strategyIds: z.ZodArray<z.ZodString>; | ||
| oracleIds: z.ZodDefault<z.ZodArray<z.ZodString>>; | ||
| missingCapabilities: z.ZodDefault<z.ZodArray<z.ZodString>>; | ||
| signals: z.ZodDefault<z.ZodArray<z.ZodString>>; | ||
| }, z.core.$strip>>; | ||
| recommendedWinner: z.ZodOptional<z.ZodObject<{ | ||
| candidateId: z.ZodString; | ||
| summary: z.ZodString; | ||
| confidence: z.ZodEnum<{ | ||
| low: "low"; | ||
| medium: "medium"; | ||
| high: "high"; | ||
| }>; | ||
| source: z.ZodEnum<{ | ||
| "llm-judge": "llm-judge"; | ||
| "fallback-policy": "fallback-policy"; | ||
| }>; | ||
| }, z.core.$strip>>; | ||
| }, z.core.$strip>>; | ||
| archive: z.ZodString; | ||
| }, z.core.$strip>; | ||
| export declare const crownToolRequestSchema: z.ZodObject<{ | ||
| cwd: z.ZodString; | ||
| branchName: z.ZodString; | ||
| consultationId: z.ZodOptional<z.ZodString>; | ||
| candidateId: z.ZodOptional<z.ZodString>; | ||
| withReport: z.ZodDefault<z.ZodBoolean>; | ||
| }, z.core.$strip>; | ||
| export declare const crownToolResponseSchema: z.ZodObject<{ | ||
| mode: z.ZodLiteral<"crown">; | ||
| plan: z.ZodObject<{ | ||
| runId: z.ZodString; | ||
| winnerId: z.ZodString; | ||
| branchName: z.ZodString; | ||
| mode: z.ZodEnum<{ | ||
| "git-branch": "git-branch"; | ||
| "workspace-sync": "workspace-sync"; | ||
| }>; | ||
| workspaceDir: z.ZodString; | ||
| patchPath: z.ZodOptional<z.ZodString>; | ||
| appliedPathCount: z.ZodOptional<z.ZodNumber>; | ||
| removedPathCount: z.ZodOptional<z.ZodNumber>; | ||
| withReport: z.ZodBoolean; | ||
| reportBundle: z.ZodOptional<z.ZodObject<{ | ||
| rootDir: z.ZodString; | ||
| files: z.ZodArray<z.ZodString>; | ||
| }, z.core.$strip>>; | ||
| createdAt: z.ZodString; | ||
| }, z.core.$strip>; | ||
| recordPath: z.ZodString; | ||
| consultation: z.ZodObject<{ | ||
| id: z.ZodString; | ||
| status: z.ZodEnum<{ | ||
| planned: "planned"; | ||
| running: "running"; | ||
| completed: "completed"; | ||
| }>; | ||
| taskPath: z.ZodString; | ||
| taskPacket: z.ZodObject<{ | ||
| id: z.ZodString; | ||
| title: z.ZodString; | ||
| sourceKind: z.ZodEnum<{ | ||
| "task-packet": "task-packet"; | ||
| "task-note": "task-note"; | ||
| }>; | ||
| sourcePath: z.ZodString; | ||
| }, z.core.$strip>; | ||
| agent: z.ZodEnum<{ | ||
| "claude-code": "claude-code"; | ||
| codex: "codex"; | ||
| }>; | ||
| configPath: z.ZodOptional<z.ZodString>; | ||
| candidateCount: z.ZodNumber; | ||
| createdAt: z.ZodString; | ||
| rounds: z.ZodArray<z.ZodObject<{ | ||
| id: z.ZodEnum<{ | ||
| fast: "fast"; | ||
| impact: "impact"; | ||
| deep: "deep"; | ||
| }>; | ||
| label: z.ZodString; | ||
| status: z.ZodEnum<{ | ||
| running: "running"; | ||
| pending: "pending"; | ||
| completed: "completed"; | ||
| }>; | ||
| verdictCount: z.ZodNumber; | ||
| survivorCount: z.ZodNumber; | ||
| eliminatedCount: z.ZodNumber; | ||
| startedAt: z.ZodOptional<z.ZodString>; | ||
| completedAt: z.ZodOptional<z.ZodString>; | ||
| }, z.core.$strip>>; | ||
| candidates: z.ZodArray<z.ZodObject<{ | ||
| id: z.ZodString; | ||
| strategyId: z.ZodString; | ||
| strategyLabel: z.ZodString; | ||
| status: z.ZodEnum<{ | ||
| planned: "planned"; | ||
| running: "running"; | ||
| executed: "executed"; | ||
| failed: "failed"; | ||
| judged: "judged"; | ||
| eliminated: "eliminated"; | ||
| promoted: "promoted"; | ||
| exported: "exported"; | ||
| }>; | ||
| workspaceDir: z.ZodString; | ||
| taskPacketPath: z.ZodString; | ||
| lastRunResultPath: z.ZodOptional<z.ZodString>; | ||
| workspaceMode: z.ZodOptional<z.ZodEnum<{ | ||
| copy: "copy"; | ||
| "git-worktree": "git-worktree"; | ||
| }>>; | ||
| baseRevision: z.ZodOptional<z.ZodString>; | ||
| baseSnapshotPath: z.ZodOptional<z.ZodString>; | ||
| repairCount: z.ZodDefault<z.ZodNumber>; | ||
| repairedRounds: z.ZodDefault<z.ZodArray<z.ZodEnum<{ | ||
| fast: "fast"; | ||
| impact: "impact"; | ||
| deep: "deep"; | ||
| }>>>; | ||
| createdAt: z.ZodString; | ||
| }, z.core.$strip>>; | ||
| profileSelection: z.ZodOptional<z.ZodObject<{ | ||
| profileId: z.ZodEnum<{ | ||
| library: "library"; | ||
| frontend: "frontend"; | ||
| migration: "migration"; | ||
| }>; | ||
| confidence: z.ZodEnum<{ | ||
| low: "low"; | ||
| medium: "medium"; | ||
| high: "high"; | ||
| }>; | ||
| source: z.ZodEnum<{ | ||
| "llm-recommendation": "llm-recommendation"; | ||
| "fallback-detection": "fallback-detection"; | ||
| }>; | ||
| summary: z.ZodString; | ||
| candidateCount: z.ZodNumber; | ||
| strategyIds: z.ZodArray<z.ZodString>; | ||
| oracleIds: z.ZodDefault<z.ZodArray<z.ZodString>>; | ||
| missingCapabilities: z.ZodDefault<z.ZodArray<z.ZodString>>; | ||
| signals: z.ZodDefault<z.ZodArray<z.ZodString>>; | ||
| }, z.core.$strip>>; | ||
| recommendedWinner: z.ZodOptional<z.ZodObject<{ | ||
| candidateId: z.ZodString; | ||
| summary: z.ZodString; | ||
| confidence: z.ZodEnum<{ | ||
| low: "low"; | ||
| medium: "medium"; | ||
| high: "high"; | ||
| }>; | ||
| source: z.ZodEnum<{ | ||
| "llm-judge": "llm-judge"; | ||
| "fallback-policy": "fallback-policy"; | ||
| }>; | ||
| }, z.core.$strip>>; | ||
| }, z.core.$strip>; | ||
| }, z.core.$strip>; | ||
| export declare const initToolRequestSchema: z.ZodObject<{ | ||
| cwd: z.ZodString; | ||
| force: z.ZodDefault<z.ZodBoolean>; | ||
| }, z.core.$strip>; | ||
| export declare const initToolResponseSchema: z.ZodObject<{ | ||
| mode: z.ZodLiteral<"init">; | ||
| initialization: z.ZodObject<{ | ||
| projectRoot: z.ZodString; | ||
| configPath: z.ZodString; | ||
| createdPaths: z.ZodArray<z.ZodString>; | ||
| }, z.core.$strip>; | ||
| }, z.core.$strip>; | ||
| export declare const setupStatusToolRequestSchema: z.ZodObject<{ | ||
| cwd: z.ZodString; | ||
| host: z.ZodOptional<z.ZodEnum<{ | ||
| "claude-code": "claude-code"; | ||
| codex: "codex"; | ||
| }>>; | ||
| }, z.core.$strip>; | ||
| export declare const hostSetupStatusSchema: z.ZodObject<{ | ||
| host: z.ZodEnum<{ | ||
| "claude-code": "claude-code"; | ||
| codex: "codex"; | ||
| }>; | ||
| status: z.ZodEnum<{ | ||
| ready: "ready"; | ||
| partial: "partial"; | ||
| "needs-setup": "needs-setup"; | ||
| }>; | ||
| registered: z.ZodBoolean; | ||
| artifactsInstalled: z.ZodBoolean; | ||
| nextAction: z.ZodString; | ||
| notes: z.ZodDefault<z.ZodArray<z.ZodString>>; | ||
| }, z.core.$strip>; | ||
| export declare const setupStatusToolResponseSchema: z.ZodObject<{ | ||
| mode: z.ZodLiteral<"setup-status">; | ||
| cwd: z.ZodString; | ||
| projectInitialized: z.ZodBoolean; | ||
| configPath: z.ZodOptional<z.ZodString>; | ||
| advancedConfigPath: z.ZodOptional<z.ZodString>; | ||
| targetPrefix: z.ZodLiteral<"orc">; | ||
| hosts: z.ZodArray<z.ZodObject<{ | ||
| host: z.ZodEnum<{ | ||
| "claude-code": "claude-code"; | ||
| codex: "codex"; | ||
| }>; | ||
| status: z.ZodEnum<{ | ||
| ready: "ready"; | ||
| partial: "partial"; | ||
| "needs-setup": "needs-setup"; | ||
| }>; | ||
| registered: z.ZodBoolean; | ||
| artifactsInstalled: z.ZodBoolean; | ||
| nextAction: z.ZodString; | ||
| notes: z.ZodDefault<z.ZodArray<z.ZodString>>; | ||
| }, z.core.$strip>>; | ||
| summary: z.ZodString; | ||
| }, z.core.$strip>; | ||
| export type McpToolId = z.infer<typeof mcpToolIdSchema>; | ||
| export type ToolBinding = z.infer<typeof toolBindingSchema>; | ||
| export type ToolMetadata = z.infer<typeof toolMetadataSchema>; | ||
| export type CommandArgument = z.infer<typeof commandArgumentSchema>; | ||
| export type CommandManifestEntry = z.infer<typeof commandManifestEntrySchema>; | ||
| export type ConsultToolRequest = z.infer<typeof consultToolRequestSchema>; | ||
| export type ConsultToolResponse = z.infer<typeof consultToolResponseSchema>; | ||
| export type DraftToolRequest = z.infer<typeof draftToolRequestSchema>; | ||
| export type DraftToolResponse = z.infer<typeof draftToolResponseSchema>; | ||
| export type VerdictToolRequest = z.infer<typeof verdictToolRequestSchema>; | ||
| export type VerdictToolResponse = z.infer<typeof verdictToolResponseSchema>; | ||
| export type VerdictArchiveToolRequest = z.infer<typeof verdictArchiveToolRequestSchema>; | ||
| export type VerdictArchiveToolResponse = z.infer<typeof verdictArchiveToolResponseSchema>; | ||
| export type CrownToolRequest = z.infer<typeof crownToolRequestSchema>; | ||
| export type CrownToolResponse = z.infer<typeof crownToolResponseSchema>; | ||
| export type InitToolRequest = z.infer<typeof initToolRequestSchema>; | ||
| export type InitToolResponse = z.infer<typeof initToolResponseSchema>; | ||
| export type SetupStatusToolRequest = z.infer<typeof setupStatusToolRequestSchema>; | ||
| export type SetupStatusToolResponse = z.infer<typeof setupStatusToolResponseSchema>; |
| import { z } from "zod"; | ||
| import { adapterSchema } from "./config.js"; | ||
| import { exportPlanSchema, runManifestSchema } from "./run.js"; | ||
| export const commandPrefixSchema = z.literal("orc"); | ||
| export const mcpToolIdSchema = z.enum([ | ||
| "oraculum_consult", | ||
| "oraculum_draft", | ||
| "oraculum_verdict", | ||
| "oraculum_verdict_archive", | ||
| "oraculum_crown", | ||
| "oraculum_init", | ||
| "oraculum_setup_status", | ||
| ]); | ||
| export const schemaReferenceSchema = z.string().min(1); | ||
| export const toolBindingSchema = z.object({ | ||
| kind: z.enum(["existing-service", "existing-command", "new-adapter-layer"]), | ||
| module: z.string().min(1), | ||
| symbol: z.string().min(1), | ||
| note: z.string().min(1).optional(), | ||
| }); | ||
| export const toolMetadataSchema = z.object({ | ||
| id: mcpToolIdSchema, | ||
| purpose: z.string().min(1), | ||
| requestShape: schemaReferenceSchema, | ||
| responseShape: schemaReferenceSchema, | ||
| bindings: z.array(toolBindingSchema).min(1), | ||
| machineReadableArtifacts: z.array(z.string().min(1)).default([]), | ||
| }); | ||
| export const commandArgumentKindSchema = z.enum(["string", "integer", "boolean"]); | ||
| export const commandArgumentSchema = z.object({ | ||
| name: z.string().min(1), | ||
| kind: commandArgumentKindSchema, | ||
| description: z.string().min(1), | ||
| required: z.boolean().default(false), | ||
| positional: z.boolean().default(false), | ||
| option: z.string().min(1).optional(), | ||
| }); | ||
| export const commandManifestEntrySchema = z.object({ | ||
| id: z.string().min(1), | ||
| prefix: commandPrefixSchema, | ||
| path: z.array(z.string().min(1)).min(1), | ||
| summary: z.string().min(1), | ||
| mcpTool: mcpToolIdSchema, | ||
| requestShape: schemaReferenceSchema, | ||
| responseShape: schemaReferenceSchema, | ||
| arguments: z.array(commandArgumentSchema).default([]), | ||
| examples: z.array(z.string().min(1)).min(1), | ||
| hostAdditions: z | ||
| .object({ | ||
| "claude-code": z.record(z.string(), z.string()).optional(), | ||
| codex: z.record(z.string(), z.string()).optional(), | ||
| }) | ||
| .default({}), | ||
| }); | ||
| export const consultToolRequestSchema = z.object({ | ||
| cwd: z.string().min(1), | ||
| taskInput: z.string().min(1), | ||
| agent: adapterSchema.optional(), | ||
| candidates: z.number().int().min(1).max(16).optional(), | ||
| timeoutMs: z.number().int().min(1).optional(), | ||
| }); | ||
| export const consultationArtifactPathsSchema = z.object({ | ||
| consultationRoot: z.string().min(1), | ||
| configPath: z.string().min(1), | ||
| profileSelectionPath: z.string().min(1).optional(), | ||
| comparisonJsonPath: z.string().min(1).optional(), | ||
| comparisonMarkdownPath: z.string().min(1).optional(), | ||
| winnerSelectionPath: z.string().min(1).optional(), | ||
| crowningRecordPath: z.string().min(1).optional(), | ||
| }); | ||
| export const projectInitializationResultSchema = z.object({ | ||
| projectRoot: z.string().min(1), | ||
| configPath: z.string().min(1), | ||
| createdPaths: z.array(z.string().min(1)), | ||
| }); | ||
| export const consultToolResponseSchema = z.object({ | ||
| mode: z.literal("consult"), | ||
| consultation: runManifestSchema, | ||
| summary: z.string().min(1), | ||
| artifacts: consultationArtifactPathsSchema, | ||
| initializedProject: projectInitializationResultSchema.optional(), | ||
| }); | ||
| export const draftToolRequestSchema = z.object({ | ||
| cwd: z.string().min(1), | ||
| taskInput: z.string().min(1), | ||
| agent: adapterSchema.optional(), | ||
| candidates: z.number().int().min(1).max(16).optional(), | ||
| }); | ||
| export const draftToolResponseSchema = z.object({ | ||
| mode: z.literal("draft"), | ||
| consultation: runManifestSchema, | ||
| summary: z.string().min(1), | ||
| artifacts: consultationArtifactPathsSchema, | ||
| initializedProject: projectInitializationResultSchema.optional(), | ||
| }); | ||
| export const verdictToolRequestSchema = z.object({ | ||
| cwd: z.string().min(1), | ||
| consultationId: z.string().min(1).optional(), | ||
| }); | ||
| export const verdictToolResponseSchema = z.object({ | ||
| mode: z.literal("verdict"), | ||
| consultation: runManifestSchema, | ||
| summary: z.string().min(1), | ||
| artifacts: consultationArtifactPathsSchema, | ||
| }); | ||
| export const verdictArchiveToolRequestSchema = z.object({ | ||
| cwd: z.string().min(1), | ||
| count: z.number().int().min(1).optional(), | ||
| }); | ||
| export const verdictArchiveToolResponseSchema = z.object({ | ||
| mode: z.literal("verdict-archive"), | ||
| consultations: z.array(runManifestSchema), | ||
| archive: z.string().min(1), | ||
| }); | ||
| export const crownToolRequestSchema = z.object({ | ||
| cwd: z.string().min(1), | ||
| branchName: z.string().min(1), | ||
| consultationId: z.string().min(1).optional(), | ||
| candidateId: z.string().min(1).optional(), | ||
| withReport: z.boolean().default(false), | ||
| }); | ||
| export const crownToolResponseSchema = z.object({ | ||
| mode: z.literal("crown"), | ||
| plan: exportPlanSchema, | ||
| recordPath: z.string().min(1), | ||
| consultation: runManifestSchema, | ||
| }); | ||
| export const initToolRequestSchema = z.object({ | ||
| cwd: z.string().min(1), | ||
| force: z.boolean().default(false), | ||
| }); | ||
| export const initToolResponseSchema = z.object({ | ||
| mode: z.literal("init"), | ||
| initialization: projectInitializationResultSchema, | ||
| }); | ||
| export const setupStatusToolRequestSchema = z.object({ | ||
| cwd: z.string().min(1), | ||
| host: adapterSchema.optional(), | ||
| }); | ||
| export const hostSetupStatusSchema = z.object({ | ||
| host: adapterSchema, | ||
| status: z.enum(["ready", "partial", "needs-setup"]), | ||
| registered: z.boolean(), | ||
| artifactsInstalled: z.boolean(), | ||
| nextAction: z.string().min(1), | ||
| notes: z.array(z.string().min(1)).default([]), | ||
| }); | ||
| export const setupStatusToolResponseSchema = z.object({ | ||
| mode: z.literal("setup-status"), | ||
| cwd: z.string().min(1), | ||
| projectInitialized: z.boolean(), | ||
| configPath: z.string().min(1).optional(), | ||
| advancedConfigPath: z.string().min(1).optional(), | ||
| targetPrefix: commandPrefixSchema, | ||
| hosts: z.array(hostSetupStatusSchema).min(1), | ||
| summary: z.string().min(1), | ||
| }); | ||
| //# sourceMappingURL=chat-native.js.map |
| {"version":3,"file":"chat-native.js","sourceRoot":"","sources":["../../src/domain/chat-native.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAE/D,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAEpD,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC,IAAI,CAAC;IACpC,kBAAkB;IAClB,gBAAgB;IAChB,kBAAkB;IAClB,0BAA0B;IAC1B,gBAAgB;IAChB,eAAe;IACf,uBAAuB;CACxB,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AAEvD,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC;IACxC,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,kBAAkB,EAAE,kBAAkB,EAAE,mBAAmB,CAAC,CAAC;IAC3E,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,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,aAAa,CAAC,CAAC;IACnD,UAAU,EAAE,CAAC,CAAC,OAAO,EAAE;IACvB,kBAAkB,EAAE,CAAC,CAAC,OAAO,EAAE;IAC/B,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC7B,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;CAC9C,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAC,CAAC,MAAM,CAAC;IACpD,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,cAAc,CAAC;IAC/B,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACtB,kBAAkB,EAAE,CAAC,CAAC,OAAO,EAAE;IAC/B,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;IACxC,kBAAkB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;IAChD,YAAY,EAAE,mBAAmB;IACjC,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IAC5C,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CAC3B,CAAC,CAAC"} |
| import { z } from "zod"; | ||
| export declare const packagedHostArtifactFileSchema: z.ZodObject<{ | ||
| path: z.ZodString; | ||
| purpose: z.ZodString; | ||
| }, z.core.$strip>; | ||
| export declare const packagedHostArtifactHostLayoutSchema: z.ZodObject<{ | ||
| host: z.ZodEnum<{ | ||
| "claude-code": "claude-code"; | ||
| codex: "codex"; | ||
| }>; | ||
| rootDir: z.ZodString; | ||
| files: z.ZodArray<z.ZodObject<{ | ||
| path: z.ZodString; | ||
| purpose: z.ZodString; | ||
| }, z.core.$strip>>; | ||
| }, z.core.$strip>; | ||
| export declare const packagedHostArtifactLayoutSchema: z.ZodObject<{ | ||
| rootDir: z.ZodString; | ||
| commandManifestPath: z.ZodString; | ||
| mcpToolSurfacePath: z.ZodString; | ||
| hosts: z.ZodArray<z.ZodObject<{ | ||
| host: z.ZodEnum<{ | ||
| "claude-code": "claude-code"; | ||
| codex: "codex"; | ||
| }>; | ||
| rootDir: z.ZodString; | ||
| files: z.ZodArray<z.ZodObject<{ | ||
| path: z.ZodString; | ||
| purpose: z.ZodString; | ||
| }, z.core.$strip>>; | ||
| }, z.core.$strip>>; | ||
| }, z.core.$strip>; | ||
| export type PackagedHostArtifactFile = z.infer<typeof packagedHostArtifactFileSchema>; | ||
| export type PackagedHostArtifactHostLayout = z.infer<typeof packagedHostArtifactHostLayoutSchema>; | ||
| export type PackagedHostArtifactLayout = z.infer<typeof packagedHostArtifactLayoutSchema>; |
| import { z } from "zod"; | ||
| import { adapterSchema } from "./config.js"; | ||
| export const packagedHostArtifactFileSchema = z.object({ | ||
| path: z.string().min(1), | ||
| purpose: z.string().min(1), | ||
| }); | ||
| export const packagedHostArtifactHostLayoutSchema = z.object({ | ||
| host: adapterSchema, | ||
| rootDir: z.string().min(1), | ||
| files: z.array(packagedHostArtifactFileSchema).min(1), | ||
| }); | ||
| export const packagedHostArtifactLayoutSchema = z.object({ | ||
| rootDir: z.string().min(1), | ||
| commandManifestPath: z.string().min(1), | ||
| mcpToolSurfacePath: z.string().min(1), | ||
| hosts: z.array(packagedHostArtifactHostLayoutSchema).min(1), | ||
| }); | ||
| //# sourceMappingURL=packaged-host-artifacts.js.map |
| {"version":3,"file":"packaged-host-artifacts.js","sourceRoot":"","sources":["../../src/domain/packaged-host-artifacts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,CAAC,MAAM,CAAC;IACrD,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACvB,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CAC3B,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,oCAAoC,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3D,IAAI,EAAE,aAAa;IACnB,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC1B,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,8BAA8B,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;CACtD,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,gCAAgC,GAAG,CAAC,CAAC,MAAM,CAAC;IACvD,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC1B,mBAAmB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACtC,kBAAkB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACrC,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,oCAAoC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;CAC5D,CAAC,CAAC"} |
| import type { ZodTypeAny } from "zod"; | ||
| import { type CommandManifestEntry, type McpToolId, type ToolMetadata } from "../domain/chat-native.js"; | ||
| import type { InitializeProjectResult } from "./project.js"; | ||
| export declare const oraculumMcpSchemas: { | ||
| oraculum_consult: { | ||
| request: import("zod").ZodObject<{ | ||
| cwd: import("zod").ZodString; | ||
| taskInput: import("zod").ZodString; | ||
| agent: import("zod").ZodOptional<import("zod").ZodEnum<{ | ||
| "claude-code": "claude-code"; | ||
| codex: "codex"; | ||
| }>>; | ||
| candidates: import("zod").ZodOptional<import("zod").ZodNumber>; | ||
| timeoutMs: import("zod").ZodOptional<import("zod").ZodNumber>; | ||
| }, import("zod/v4/core").$strip>; | ||
| response: import("zod").ZodObject<{ | ||
| mode: import("zod").ZodLiteral<"consult">; | ||
| consultation: import("zod").ZodObject<{ | ||
| id: import("zod").ZodString; | ||
| status: import("zod").ZodEnum<{ | ||
| planned: "planned"; | ||
| running: "running"; | ||
| completed: "completed"; | ||
| }>; | ||
| taskPath: import("zod").ZodString; | ||
| taskPacket: import("zod").ZodObject<{ | ||
| id: import("zod").ZodString; | ||
| title: import("zod").ZodString; | ||
| sourceKind: import("zod").ZodEnum<{ | ||
| "task-packet": "task-packet"; | ||
| "task-note": "task-note"; | ||
| }>; | ||
| sourcePath: import("zod").ZodString; | ||
| }, import("zod/v4/core").$strip>; | ||
| agent: import("zod").ZodEnum<{ | ||
| "claude-code": "claude-code"; | ||
| codex: "codex"; | ||
| }>; | ||
| configPath: import("zod").ZodOptional<import("zod").ZodString>; | ||
| candidateCount: import("zod").ZodNumber; | ||
| createdAt: import("zod").ZodString; | ||
| rounds: import("zod").ZodArray<import("zod").ZodObject<{ | ||
| id: import("zod").ZodEnum<{ | ||
| fast: "fast"; | ||
| impact: "impact"; | ||
| deep: "deep"; | ||
| }>; | ||
| label: import("zod").ZodString; | ||
| status: import("zod").ZodEnum<{ | ||
| running: "running"; | ||
| pending: "pending"; | ||
| completed: "completed"; | ||
| }>; | ||
| verdictCount: import("zod").ZodNumber; | ||
| survivorCount: import("zod").ZodNumber; | ||
| eliminatedCount: import("zod").ZodNumber; | ||
| startedAt: import("zod").ZodOptional<import("zod").ZodString>; | ||
| completedAt: import("zod").ZodOptional<import("zod").ZodString>; | ||
| }, import("zod/v4/core").$strip>>; | ||
| candidates: import("zod").ZodArray<import("zod").ZodObject<{ | ||
| id: import("zod").ZodString; | ||
| strategyId: import("zod").ZodString; | ||
| strategyLabel: import("zod").ZodString; | ||
| status: import("zod").ZodEnum<{ | ||
| planned: "planned"; | ||
| running: "running"; | ||
| executed: "executed"; | ||
| failed: "failed"; | ||
| judged: "judged"; | ||
| eliminated: "eliminated"; | ||
| promoted: "promoted"; | ||
| exported: "exported"; | ||
| }>; | ||
| workspaceDir: import("zod").ZodString; | ||
| taskPacketPath: import("zod").ZodString; | ||
| lastRunResultPath: import("zod").ZodOptional<import("zod").ZodString>; | ||
| workspaceMode: import("zod").ZodOptional<import("zod").ZodEnum<{ | ||
| copy: "copy"; | ||
| "git-worktree": "git-worktree"; | ||
| }>>; | ||
| baseRevision: import("zod").ZodOptional<import("zod").ZodString>; | ||
| baseSnapshotPath: import("zod").ZodOptional<import("zod").ZodString>; | ||
| repairCount: import("zod").ZodDefault<import("zod").ZodNumber>; | ||
| repairedRounds: import("zod").ZodDefault<import("zod").ZodArray<import("zod").ZodEnum<{ | ||
| fast: "fast"; | ||
| impact: "impact"; | ||
| deep: "deep"; | ||
| }>>>; | ||
| createdAt: import("zod").ZodString; | ||
| }, import("zod/v4/core").$strip>>; | ||
| profileSelection: import("zod").ZodOptional<import("zod").ZodObject<{ | ||
| profileId: import("zod").ZodEnum<{ | ||
| library: "library"; | ||
| frontend: "frontend"; | ||
| migration: "migration"; | ||
| }>; | ||
| confidence: import("zod").ZodEnum<{ | ||
| low: "low"; | ||
| medium: "medium"; | ||
| high: "high"; | ||
| }>; | ||
| source: import("zod").ZodEnum<{ | ||
| "llm-recommendation": "llm-recommendation"; | ||
| "fallback-detection": "fallback-detection"; | ||
| }>; | ||
| summary: import("zod").ZodString; | ||
| candidateCount: import("zod").ZodNumber; | ||
| strategyIds: import("zod").ZodArray<import("zod").ZodString>; | ||
| oracleIds: import("zod").ZodDefault<import("zod").ZodArray<import("zod").ZodString>>; | ||
| missingCapabilities: import("zod").ZodDefault<import("zod").ZodArray<import("zod").ZodString>>; | ||
| signals: import("zod").ZodDefault<import("zod").ZodArray<import("zod").ZodString>>; | ||
| }, import("zod/v4/core").$strip>>; | ||
| recommendedWinner: import("zod").ZodOptional<import("zod").ZodObject<{ | ||
| candidateId: import("zod").ZodString; | ||
| summary: import("zod").ZodString; | ||
| confidence: import("zod").ZodEnum<{ | ||
| low: "low"; | ||
| medium: "medium"; | ||
| high: "high"; | ||
| }>; | ||
| source: import("zod").ZodEnum<{ | ||
| "llm-judge": "llm-judge"; | ||
| "fallback-policy": "fallback-policy"; | ||
| }>; | ||
| }, import("zod/v4/core").$strip>>; | ||
| }, import("zod/v4/core").$strip>; | ||
| summary: import("zod").ZodString; | ||
| artifacts: import("zod").ZodObject<{ | ||
| consultationRoot: import("zod").ZodString; | ||
| configPath: import("zod").ZodString; | ||
| profileSelectionPath: import("zod").ZodOptional<import("zod").ZodString>; | ||
| comparisonJsonPath: import("zod").ZodOptional<import("zod").ZodString>; | ||
| comparisonMarkdownPath: import("zod").ZodOptional<import("zod").ZodString>; | ||
| winnerSelectionPath: import("zod").ZodOptional<import("zod").ZodString>; | ||
| crowningRecordPath: import("zod").ZodOptional<import("zod").ZodString>; | ||
| }, import("zod/v4/core").$strip>; | ||
| initializedProject: import("zod").ZodOptional<import("zod").ZodObject<{ | ||
| projectRoot: import("zod").ZodString; | ||
| configPath: import("zod").ZodString; | ||
| createdPaths: import("zod").ZodArray<import("zod").ZodString>; | ||
| }, import("zod/v4/core").$strip>>; | ||
| }, import("zod/v4/core").$strip>; | ||
| }; | ||
| oraculum_draft: { | ||
| request: import("zod").ZodObject<{ | ||
| cwd: import("zod").ZodString; | ||
| taskInput: import("zod").ZodString; | ||
| agent: import("zod").ZodOptional<import("zod").ZodEnum<{ | ||
| "claude-code": "claude-code"; | ||
| codex: "codex"; | ||
| }>>; | ||
| candidates: import("zod").ZodOptional<import("zod").ZodNumber>; | ||
| }, import("zod/v4/core").$strip>; | ||
| response: import("zod").ZodObject<{ | ||
| mode: import("zod").ZodLiteral<"draft">; | ||
| consultation: import("zod").ZodObject<{ | ||
| id: import("zod").ZodString; | ||
| status: import("zod").ZodEnum<{ | ||
| planned: "planned"; | ||
| running: "running"; | ||
| completed: "completed"; | ||
| }>; | ||
| taskPath: import("zod").ZodString; | ||
| taskPacket: import("zod").ZodObject<{ | ||
| id: import("zod").ZodString; | ||
| title: import("zod").ZodString; | ||
| sourceKind: import("zod").ZodEnum<{ | ||
| "task-packet": "task-packet"; | ||
| "task-note": "task-note"; | ||
| }>; | ||
| sourcePath: import("zod").ZodString; | ||
| }, import("zod/v4/core").$strip>; | ||
| agent: import("zod").ZodEnum<{ | ||
| "claude-code": "claude-code"; | ||
| codex: "codex"; | ||
| }>; | ||
| configPath: import("zod").ZodOptional<import("zod").ZodString>; | ||
| candidateCount: import("zod").ZodNumber; | ||
| createdAt: import("zod").ZodString; | ||
| rounds: import("zod").ZodArray<import("zod").ZodObject<{ | ||
| id: import("zod").ZodEnum<{ | ||
| fast: "fast"; | ||
| impact: "impact"; | ||
| deep: "deep"; | ||
| }>; | ||
| label: import("zod").ZodString; | ||
| status: import("zod").ZodEnum<{ | ||
| running: "running"; | ||
| pending: "pending"; | ||
| completed: "completed"; | ||
| }>; | ||
| verdictCount: import("zod").ZodNumber; | ||
| survivorCount: import("zod").ZodNumber; | ||
| eliminatedCount: import("zod").ZodNumber; | ||
| startedAt: import("zod").ZodOptional<import("zod").ZodString>; | ||
| completedAt: import("zod").ZodOptional<import("zod").ZodString>; | ||
| }, import("zod/v4/core").$strip>>; | ||
| candidates: import("zod").ZodArray<import("zod").ZodObject<{ | ||
| id: import("zod").ZodString; | ||
| strategyId: import("zod").ZodString; | ||
| strategyLabel: import("zod").ZodString; | ||
| status: import("zod").ZodEnum<{ | ||
| planned: "planned"; | ||
| running: "running"; | ||
| executed: "executed"; | ||
| failed: "failed"; | ||
| judged: "judged"; | ||
| eliminated: "eliminated"; | ||
| promoted: "promoted"; | ||
| exported: "exported"; | ||
| }>; | ||
| workspaceDir: import("zod").ZodString; | ||
| taskPacketPath: import("zod").ZodString; | ||
| lastRunResultPath: import("zod").ZodOptional<import("zod").ZodString>; | ||
| workspaceMode: import("zod").ZodOptional<import("zod").ZodEnum<{ | ||
| copy: "copy"; | ||
| "git-worktree": "git-worktree"; | ||
| }>>; | ||
| baseRevision: import("zod").ZodOptional<import("zod").ZodString>; | ||
| baseSnapshotPath: import("zod").ZodOptional<import("zod").ZodString>; | ||
| repairCount: import("zod").ZodDefault<import("zod").ZodNumber>; | ||
| repairedRounds: import("zod").ZodDefault<import("zod").ZodArray<import("zod").ZodEnum<{ | ||
| fast: "fast"; | ||
| impact: "impact"; | ||
| deep: "deep"; | ||
| }>>>; | ||
| createdAt: import("zod").ZodString; | ||
| }, import("zod/v4/core").$strip>>; | ||
| profileSelection: import("zod").ZodOptional<import("zod").ZodObject<{ | ||
| profileId: import("zod").ZodEnum<{ | ||
| library: "library"; | ||
| frontend: "frontend"; | ||
| migration: "migration"; | ||
| }>; | ||
| confidence: import("zod").ZodEnum<{ | ||
| low: "low"; | ||
| medium: "medium"; | ||
| high: "high"; | ||
| }>; | ||
| source: import("zod").ZodEnum<{ | ||
| "llm-recommendation": "llm-recommendation"; | ||
| "fallback-detection": "fallback-detection"; | ||
| }>; | ||
| summary: import("zod").ZodString; | ||
| candidateCount: import("zod").ZodNumber; | ||
| strategyIds: import("zod").ZodArray<import("zod").ZodString>; | ||
| oracleIds: import("zod").ZodDefault<import("zod").ZodArray<import("zod").ZodString>>; | ||
| missingCapabilities: import("zod").ZodDefault<import("zod").ZodArray<import("zod").ZodString>>; | ||
| signals: import("zod").ZodDefault<import("zod").ZodArray<import("zod").ZodString>>; | ||
| }, import("zod/v4/core").$strip>>; | ||
| recommendedWinner: import("zod").ZodOptional<import("zod").ZodObject<{ | ||
| candidateId: import("zod").ZodString; | ||
| summary: import("zod").ZodString; | ||
| confidence: import("zod").ZodEnum<{ | ||
| low: "low"; | ||
| medium: "medium"; | ||
| high: "high"; | ||
| }>; | ||
| source: import("zod").ZodEnum<{ | ||
| "llm-judge": "llm-judge"; | ||
| "fallback-policy": "fallback-policy"; | ||
| }>; | ||
| }, import("zod/v4/core").$strip>>; | ||
| }, import("zod/v4/core").$strip>; | ||
| summary: import("zod").ZodString; | ||
| artifacts: import("zod").ZodObject<{ | ||
| consultationRoot: import("zod").ZodString; | ||
| configPath: import("zod").ZodString; | ||
| profileSelectionPath: import("zod").ZodOptional<import("zod").ZodString>; | ||
| comparisonJsonPath: import("zod").ZodOptional<import("zod").ZodString>; | ||
| comparisonMarkdownPath: import("zod").ZodOptional<import("zod").ZodString>; | ||
| winnerSelectionPath: import("zod").ZodOptional<import("zod").ZodString>; | ||
| crowningRecordPath: import("zod").ZodOptional<import("zod").ZodString>; | ||
| }, import("zod/v4/core").$strip>; | ||
| initializedProject: import("zod").ZodOptional<import("zod").ZodObject<{ | ||
| projectRoot: import("zod").ZodString; | ||
| configPath: import("zod").ZodString; | ||
| createdPaths: import("zod").ZodArray<import("zod").ZodString>; | ||
| }, import("zod/v4/core").$strip>>; | ||
| }, import("zod/v4/core").$strip>; | ||
| }; | ||
| oraculum_verdict: { | ||
| request: import("zod").ZodObject<{ | ||
| cwd: import("zod").ZodString; | ||
| consultationId: import("zod").ZodOptional<import("zod").ZodString>; | ||
| }, import("zod/v4/core").$strip>; | ||
| response: import("zod").ZodObject<{ | ||
| mode: import("zod").ZodLiteral<"verdict">; | ||
| consultation: import("zod").ZodObject<{ | ||
| id: import("zod").ZodString; | ||
| status: import("zod").ZodEnum<{ | ||
| planned: "planned"; | ||
| running: "running"; | ||
| completed: "completed"; | ||
| }>; | ||
| taskPath: import("zod").ZodString; | ||
| taskPacket: import("zod").ZodObject<{ | ||
| id: import("zod").ZodString; | ||
| title: import("zod").ZodString; | ||
| sourceKind: import("zod").ZodEnum<{ | ||
| "task-packet": "task-packet"; | ||
| "task-note": "task-note"; | ||
| }>; | ||
| sourcePath: import("zod").ZodString; | ||
| }, import("zod/v4/core").$strip>; | ||
| agent: import("zod").ZodEnum<{ | ||
| "claude-code": "claude-code"; | ||
| codex: "codex"; | ||
| }>; | ||
| configPath: import("zod").ZodOptional<import("zod").ZodString>; | ||
| candidateCount: import("zod").ZodNumber; | ||
| createdAt: import("zod").ZodString; | ||
| rounds: import("zod").ZodArray<import("zod").ZodObject<{ | ||
| id: import("zod").ZodEnum<{ | ||
| fast: "fast"; | ||
| impact: "impact"; | ||
| deep: "deep"; | ||
| }>; | ||
| label: import("zod").ZodString; | ||
| status: import("zod").ZodEnum<{ | ||
| running: "running"; | ||
| pending: "pending"; | ||
| completed: "completed"; | ||
| }>; | ||
| verdictCount: import("zod").ZodNumber; | ||
| survivorCount: import("zod").ZodNumber; | ||
| eliminatedCount: import("zod").ZodNumber; | ||
| startedAt: import("zod").ZodOptional<import("zod").ZodString>; | ||
| completedAt: import("zod").ZodOptional<import("zod").ZodString>; | ||
| }, import("zod/v4/core").$strip>>; | ||
| candidates: import("zod").ZodArray<import("zod").ZodObject<{ | ||
| id: import("zod").ZodString; | ||
| strategyId: import("zod").ZodString; | ||
| strategyLabel: import("zod").ZodString; | ||
| status: import("zod").ZodEnum<{ | ||
| planned: "planned"; | ||
| running: "running"; | ||
| executed: "executed"; | ||
| failed: "failed"; | ||
| judged: "judged"; | ||
| eliminated: "eliminated"; | ||
| promoted: "promoted"; | ||
| exported: "exported"; | ||
| }>; | ||
| workspaceDir: import("zod").ZodString; | ||
| taskPacketPath: import("zod").ZodString; | ||
| lastRunResultPath: import("zod").ZodOptional<import("zod").ZodString>; | ||
| workspaceMode: import("zod").ZodOptional<import("zod").ZodEnum<{ | ||
| copy: "copy"; | ||
| "git-worktree": "git-worktree"; | ||
| }>>; | ||
| baseRevision: import("zod").ZodOptional<import("zod").ZodString>; | ||
| baseSnapshotPath: import("zod").ZodOptional<import("zod").ZodString>; | ||
| repairCount: import("zod").ZodDefault<import("zod").ZodNumber>; | ||
| repairedRounds: import("zod").ZodDefault<import("zod").ZodArray<import("zod").ZodEnum<{ | ||
| fast: "fast"; | ||
| impact: "impact"; | ||
| deep: "deep"; | ||
| }>>>; | ||
| createdAt: import("zod").ZodString; | ||
| }, import("zod/v4/core").$strip>>; | ||
| profileSelection: import("zod").ZodOptional<import("zod").ZodObject<{ | ||
| profileId: import("zod").ZodEnum<{ | ||
| library: "library"; | ||
| frontend: "frontend"; | ||
| migration: "migration"; | ||
| }>; | ||
| confidence: import("zod").ZodEnum<{ | ||
| low: "low"; | ||
| medium: "medium"; | ||
| high: "high"; | ||
| }>; | ||
| source: import("zod").ZodEnum<{ | ||
| "llm-recommendation": "llm-recommendation"; | ||
| "fallback-detection": "fallback-detection"; | ||
| }>; | ||
| summary: import("zod").ZodString; | ||
| candidateCount: import("zod").ZodNumber; | ||
| strategyIds: import("zod").ZodArray<import("zod").ZodString>; | ||
| oracleIds: import("zod").ZodDefault<import("zod").ZodArray<import("zod").ZodString>>; | ||
| missingCapabilities: import("zod").ZodDefault<import("zod").ZodArray<import("zod").ZodString>>; | ||
| signals: import("zod").ZodDefault<import("zod").ZodArray<import("zod").ZodString>>; | ||
| }, import("zod/v4/core").$strip>>; | ||
| recommendedWinner: import("zod").ZodOptional<import("zod").ZodObject<{ | ||
| candidateId: import("zod").ZodString; | ||
| summary: import("zod").ZodString; | ||
| confidence: import("zod").ZodEnum<{ | ||
| low: "low"; | ||
| medium: "medium"; | ||
| high: "high"; | ||
| }>; | ||
| source: import("zod").ZodEnum<{ | ||
| "llm-judge": "llm-judge"; | ||
| "fallback-policy": "fallback-policy"; | ||
| }>; | ||
| }, import("zod/v4/core").$strip>>; | ||
| }, import("zod/v4/core").$strip>; | ||
| summary: import("zod").ZodString; | ||
| artifacts: import("zod").ZodObject<{ | ||
| consultationRoot: import("zod").ZodString; | ||
| configPath: import("zod").ZodString; | ||
| profileSelectionPath: import("zod").ZodOptional<import("zod").ZodString>; | ||
| comparisonJsonPath: import("zod").ZodOptional<import("zod").ZodString>; | ||
| comparisonMarkdownPath: import("zod").ZodOptional<import("zod").ZodString>; | ||
| winnerSelectionPath: import("zod").ZodOptional<import("zod").ZodString>; | ||
| crowningRecordPath: import("zod").ZodOptional<import("zod").ZodString>; | ||
| }, import("zod/v4/core").$strip>; | ||
| }, import("zod/v4/core").$strip>; | ||
| }; | ||
| oraculum_verdict_archive: { | ||
| request: import("zod").ZodObject<{ | ||
| cwd: import("zod").ZodString; | ||
| count: import("zod").ZodOptional<import("zod").ZodNumber>; | ||
| }, import("zod/v4/core").$strip>; | ||
| response: import("zod").ZodObject<{ | ||
| mode: import("zod").ZodLiteral<"verdict-archive">; | ||
| consultations: import("zod").ZodArray<import("zod").ZodObject<{ | ||
| id: import("zod").ZodString; | ||
| status: import("zod").ZodEnum<{ | ||
| planned: "planned"; | ||
| running: "running"; | ||
| completed: "completed"; | ||
| }>; | ||
| taskPath: import("zod").ZodString; | ||
| taskPacket: import("zod").ZodObject<{ | ||
| id: import("zod").ZodString; | ||
| title: import("zod").ZodString; | ||
| sourceKind: import("zod").ZodEnum<{ | ||
| "task-packet": "task-packet"; | ||
| "task-note": "task-note"; | ||
| }>; | ||
| sourcePath: import("zod").ZodString; | ||
| }, import("zod/v4/core").$strip>; | ||
| agent: import("zod").ZodEnum<{ | ||
| "claude-code": "claude-code"; | ||
| codex: "codex"; | ||
| }>; | ||
| configPath: import("zod").ZodOptional<import("zod").ZodString>; | ||
| candidateCount: import("zod").ZodNumber; | ||
| createdAt: import("zod").ZodString; | ||
| rounds: import("zod").ZodArray<import("zod").ZodObject<{ | ||
| id: import("zod").ZodEnum<{ | ||
| fast: "fast"; | ||
| impact: "impact"; | ||
| deep: "deep"; | ||
| }>; | ||
| label: import("zod").ZodString; | ||
| status: import("zod").ZodEnum<{ | ||
| running: "running"; | ||
| pending: "pending"; | ||
| completed: "completed"; | ||
| }>; | ||
| verdictCount: import("zod").ZodNumber; | ||
| survivorCount: import("zod").ZodNumber; | ||
| eliminatedCount: import("zod").ZodNumber; | ||
| startedAt: import("zod").ZodOptional<import("zod").ZodString>; | ||
| completedAt: import("zod").ZodOptional<import("zod").ZodString>; | ||
| }, import("zod/v4/core").$strip>>; | ||
| candidates: import("zod").ZodArray<import("zod").ZodObject<{ | ||
| id: import("zod").ZodString; | ||
| strategyId: import("zod").ZodString; | ||
| strategyLabel: import("zod").ZodString; | ||
| status: import("zod").ZodEnum<{ | ||
| planned: "planned"; | ||
| running: "running"; | ||
| executed: "executed"; | ||
| failed: "failed"; | ||
| judged: "judged"; | ||
| eliminated: "eliminated"; | ||
| promoted: "promoted"; | ||
| exported: "exported"; | ||
| }>; | ||
| workspaceDir: import("zod").ZodString; | ||
| taskPacketPath: import("zod").ZodString; | ||
| lastRunResultPath: import("zod").ZodOptional<import("zod").ZodString>; | ||
| workspaceMode: import("zod").ZodOptional<import("zod").ZodEnum<{ | ||
| copy: "copy"; | ||
| "git-worktree": "git-worktree"; | ||
| }>>; | ||
| baseRevision: import("zod").ZodOptional<import("zod").ZodString>; | ||
| baseSnapshotPath: import("zod").ZodOptional<import("zod").ZodString>; | ||
| repairCount: import("zod").ZodDefault<import("zod").ZodNumber>; | ||
| repairedRounds: import("zod").ZodDefault<import("zod").ZodArray<import("zod").ZodEnum<{ | ||
| fast: "fast"; | ||
| impact: "impact"; | ||
| deep: "deep"; | ||
| }>>>; | ||
| createdAt: import("zod").ZodString; | ||
| }, import("zod/v4/core").$strip>>; | ||
| profileSelection: import("zod").ZodOptional<import("zod").ZodObject<{ | ||
| profileId: import("zod").ZodEnum<{ | ||
| library: "library"; | ||
| frontend: "frontend"; | ||
| migration: "migration"; | ||
| }>; | ||
| confidence: import("zod").ZodEnum<{ | ||
| low: "low"; | ||
| medium: "medium"; | ||
| high: "high"; | ||
| }>; | ||
| source: import("zod").ZodEnum<{ | ||
| "llm-recommendation": "llm-recommendation"; | ||
| "fallback-detection": "fallback-detection"; | ||
| }>; | ||
| summary: import("zod").ZodString; | ||
| candidateCount: import("zod").ZodNumber; | ||
| strategyIds: import("zod").ZodArray<import("zod").ZodString>; | ||
| oracleIds: import("zod").ZodDefault<import("zod").ZodArray<import("zod").ZodString>>; | ||
| missingCapabilities: import("zod").ZodDefault<import("zod").ZodArray<import("zod").ZodString>>; | ||
| signals: import("zod").ZodDefault<import("zod").ZodArray<import("zod").ZodString>>; | ||
| }, import("zod/v4/core").$strip>>; | ||
| recommendedWinner: import("zod").ZodOptional<import("zod").ZodObject<{ | ||
| candidateId: import("zod").ZodString; | ||
| summary: import("zod").ZodString; | ||
| confidence: import("zod").ZodEnum<{ | ||
| low: "low"; | ||
| medium: "medium"; | ||
| high: "high"; | ||
| }>; | ||
| source: import("zod").ZodEnum<{ | ||
| "llm-judge": "llm-judge"; | ||
| "fallback-policy": "fallback-policy"; | ||
| }>; | ||
| }, import("zod/v4/core").$strip>>; | ||
| }, import("zod/v4/core").$strip>>; | ||
| archive: import("zod").ZodString; | ||
| }, import("zod/v4/core").$strip>; | ||
| }; | ||
| oraculum_crown: { | ||
| request: import("zod").ZodObject<{ | ||
| cwd: import("zod").ZodString; | ||
| branchName: import("zod").ZodString; | ||
| consultationId: import("zod").ZodOptional<import("zod").ZodString>; | ||
| candidateId: import("zod").ZodOptional<import("zod").ZodString>; | ||
| withReport: import("zod").ZodDefault<import("zod").ZodBoolean>; | ||
| }, import("zod/v4/core").$strip>; | ||
| response: import("zod").ZodObject<{ | ||
| mode: import("zod").ZodLiteral<"crown">; | ||
| plan: import("zod").ZodObject<{ | ||
| runId: import("zod").ZodString; | ||
| winnerId: import("zod").ZodString; | ||
| branchName: import("zod").ZodString; | ||
| mode: import("zod").ZodEnum<{ | ||
| "git-branch": "git-branch"; | ||
| "workspace-sync": "workspace-sync"; | ||
| }>; | ||
| workspaceDir: import("zod").ZodString; | ||
| patchPath: import("zod").ZodOptional<import("zod").ZodString>; | ||
| appliedPathCount: import("zod").ZodOptional<import("zod").ZodNumber>; | ||
| removedPathCount: import("zod").ZodOptional<import("zod").ZodNumber>; | ||
| withReport: import("zod").ZodBoolean; | ||
| reportBundle: import("zod").ZodOptional<import("zod").ZodObject<{ | ||
| rootDir: import("zod").ZodString; | ||
| files: import("zod").ZodArray<import("zod").ZodString>; | ||
| }, import("zod/v4/core").$strip>>; | ||
| createdAt: import("zod").ZodString; | ||
| }, import("zod/v4/core").$strip>; | ||
| recordPath: import("zod").ZodString; | ||
| consultation: import("zod").ZodObject<{ | ||
| id: import("zod").ZodString; | ||
| status: import("zod").ZodEnum<{ | ||
| planned: "planned"; | ||
| running: "running"; | ||
| completed: "completed"; | ||
| }>; | ||
| taskPath: import("zod").ZodString; | ||
| taskPacket: import("zod").ZodObject<{ | ||
| id: import("zod").ZodString; | ||
| title: import("zod").ZodString; | ||
| sourceKind: import("zod").ZodEnum<{ | ||
| "task-packet": "task-packet"; | ||
| "task-note": "task-note"; | ||
| }>; | ||
| sourcePath: import("zod").ZodString; | ||
| }, import("zod/v4/core").$strip>; | ||
| agent: import("zod").ZodEnum<{ | ||
| "claude-code": "claude-code"; | ||
| codex: "codex"; | ||
| }>; | ||
| configPath: import("zod").ZodOptional<import("zod").ZodString>; | ||
| candidateCount: import("zod").ZodNumber; | ||
| createdAt: import("zod").ZodString; | ||
| rounds: import("zod").ZodArray<import("zod").ZodObject<{ | ||
| id: import("zod").ZodEnum<{ | ||
| fast: "fast"; | ||
| impact: "impact"; | ||
| deep: "deep"; | ||
| }>; | ||
| label: import("zod").ZodString; | ||
| status: import("zod").ZodEnum<{ | ||
| running: "running"; | ||
| pending: "pending"; | ||
| completed: "completed"; | ||
| }>; | ||
| verdictCount: import("zod").ZodNumber; | ||
| survivorCount: import("zod").ZodNumber; | ||
| eliminatedCount: import("zod").ZodNumber; | ||
| startedAt: import("zod").ZodOptional<import("zod").ZodString>; | ||
| completedAt: import("zod").ZodOptional<import("zod").ZodString>; | ||
| }, import("zod/v4/core").$strip>>; | ||
| candidates: import("zod").ZodArray<import("zod").ZodObject<{ | ||
| id: import("zod").ZodString; | ||
| strategyId: import("zod").ZodString; | ||
| strategyLabel: import("zod").ZodString; | ||
| status: import("zod").ZodEnum<{ | ||
| planned: "planned"; | ||
| running: "running"; | ||
| executed: "executed"; | ||
| failed: "failed"; | ||
| judged: "judged"; | ||
| eliminated: "eliminated"; | ||
| promoted: "promoted"; | ||
| exported: "exported"; | ||
| }>; | ||
| workspaceDir: import("zod").ZodString; | ||
| taskPacketPath: import("zod").ZodString; | ||
| lastRunResultPath: import("zod").ZodOptional<import("zod").ZodString>; | ||
| workspaceMode: import("zod").ZodOptional<import("zod").ZodEnum<{ | ||
| copy: "copy"; | ||
| "git-worktree": "git-worktree"; | ||
| }>>; | ||
| baseRevision: import("zod").ZodOptional<import("zod").ZodString>; | ||
| baseSnapshotPath: import("zod").ZodOptional<import("zod").ZodString>; | ||
| repairCount: import("zod").ZodDefault<import("zod").ZodNumber>; | ||
| repairedRounds: import("zod").ZodDefault<import("zod").ZodArray<import("zod").ZodEnum<{ | ||
| fast: "fast"; | ||
| impact: "impact"; | ||
| deep: "deep"; | ||
| }>>>; | ||
| createdAt: import("zod").ZodString; | ||
| }, import("zod/v4/core").$strip>>; | ||
| profileSelection: import("zod").ZodOptional<import("zod").ZodObject<{ | ||
| profileId: import("zod").ZodEnum<{ | ||
| library: "library"; | ||
| frontend: "frontend"; | ||
| migration: "migration"; | ||
| }>; | ||
| confidence: import("zod").ZodEnum<{ | ||
| low: "low"; | ||
| medium: "medium"; | ||
| high: "high"; | ||
| }>; | ||
| source: import("zod").ZodEnum<{ | ||
| "llm-recommendation": "llm-recommendation"; | ||
| "fallback-detection": "fallback-detection"; | ||
| }>; | ||
| summary: import("zod").ZodString; | ||
| candidateCount: import("zod").ZodNumber; | ||
| strategyIds: import("zod").ZodArray<import("zod").ZodString>; | ||
| oracleIds: import("zod").ZodDefault<import("zod").ZodArray<import("zod").ZodString>>; | ||
| missingCapabilities: import("zod").ZodDefault<import("zod").ZodArray<import("zod").ZodString>>; | ||
| signals: import("zod").ZodDefault<import("zod").ZodArray<import("zod").ZodString>>; | ||
| }, import("zod/v4/core").$strip>>; | ||
| recommendedWinner: import("zod").ZodOptional<import("zod").ZodObject<{ | ||
| candidateId: import("zod").ZodString; | ||
| summary: import("zod").ZodString; | ||
| confidence: import("zod").ZodEnum<{ | ||
| low: "low"; | ||
| medium: "medium"; | ||
| high: "high"; | ||
| }>; | ||
| source: import("zod").ZodEnum<{ | ||
| "llm-judge": "llm-judge"; | ||
| "fallback-policy": "fallback-policy"; | ||
| }>; | ||
| }, import("zod/v4/core").$strip>>; | ||
| }, import("zod/v4/core").$strip>; | ||
| }, import("zod/v4/core").$strip>; | ||
| }; | ||
| oraculum_init: { | ||
| request: import("zod").ZodObject<{ | ||
| cwd: import("zod").ZodString; | ||
| force: import("zod").ZodDefault<import("zod").ZodBoolean>; | ||
| }, import("zod/v4/core").$strip>; | ||
| response: import("zod").ZodObject<{ | ||
| mode: import("zod").ZodLiteral<"init">; | ||
| initialization: import("zod").ZodObject<{ | ||
| projectRoot: import("zod").ZodString; | ||
| configPath: import("zod").ZodString; | ||
| createdPaths: import("zod").ZodArray<import("zod").ZodString>; | ||
| }, import("zod/v4/core").$strip>; | ||
| }, import("zod/v4/core").$strip>; | ||
| }; | ||
| oraculum_setup_status: { | ||
| request: import("zod").ZodObject<{ | ||
| cwd: import("zod").ZodString; | ||
| host: import("zod").ZodOptional<import("zod").ZodEnum<{ | ||
| "claude-code": "claude-code"; | ||
| codex: "codex"; | ||
| }>>; | ||
| }, import("zod/v4/core").$strip>; | ||
| response: import("zod").ZodObject<{ | ||
| mode: import("zod").ZodLiteral<"setup-status">; | ||
| cwd: import("zod").ZodString; | ||
| projectInitialized: import("zod").ZodBoolean; | ||
| configPath: import("zod").ZodOptional<import("zod").ZodString>; | ||
| advancedConfigPath: import("zod").ZodOptional<import("zod").ZodString>; | ||
| targetPrefix: import("zod").ZodLiteral<"orc">; | ||
| hosts: import("zod").ZodArray<import("zod").ZodObject<{ | ||
| host: import("zod").ZodEnum<{ | ||
| "claude-code": "claude-code"; | ||
| codex: "codex"; | ||
| }>; | ||
| status: import("zod").ZodEnum<{ | ||
| ready: "ready"; | ||
| partial: "partial"; | ||
| "needs-setup": "needs-setup"; | ||
| }>; | ||
| registered: import("zod").ZodBoolean; | ||
| artifactsInstalled: import("zod").ZodBoolean; | ||
| nextAction: import("zod").ZodString; | ||
| notes: import("zod").ZodDefault<import("zod").ZodArray<import("zod").ZodString>>; | ||
| }, import("zod/v4/core").$strip>>; | ||
| summary: import("zod").ZodString; | ||
| }, import("zod/v4/core").$strip>; | ||
| }; | ||
| }; | ||
| export declare const oraculumMcpToolSurface: { | ||
| id: "oraculum_consult" | "oraculum_draft" | "oraculum_verdict" | "oraculum_verdict_archive" | "oraculum_crown" | "oraculum_init" | "oraculum_setup_status"; | ||
| purpose: string; | ||
| requestShape: string; | ||
| responseShape: string; | ||
| bindings: { | ||
| kind: "existing-service" | "existing-command" | "new-adapter-layer"; | ||
| module: string; | ||
| symbol: string; | ||
| note?: string | undefined; | ||
| }[]; | ||
| machineReadableArtifacts: string[]; | ||
| }[]; | ||
| export declare const oraculumCommandManifest: { | ||
| id: string; | ||
| prefix: "orc"; | ||
| path: string[]; | ||
| summary: string; | ||
| mcpTool: "oraculum_consult" | "oraculum_draft" | "oraculum_verdict" | "oraculum_verdict_archive" | "oraculum_crown" | "oraculum_init" | "oraculum_setup_status"; | ||
| requestShape: string; | ||
| responseShape: string; | ||
| arguments: { | ||
| name: string; | ||
| kind: "string" | "boolean" | "integer"; | ||
| description: string; | ||
| required: boolean; | ||
| positional: boolean; | ||
| option?: string | undefined; | ||
| }[]; | ||
| examples: string[]; | ||
| hostAdditions: { | ||
| "claude-code"?: Record<string, string> | undefined; | ||
| codex?: Record<string, string> | undefined; | ||
| }; | ||
| }[]; | ||
| export declare function getMcpToolSchemas(toolId: McpToolId): { | ||
| request: ZodTypeAny; | ||
| response: ZodTypeAny; | ||
| }; | ||
| export declare function buildConsultationArtifacts(projectRoot: string, consultationId: string): { | ||
| consultationRoot: string; | ||
| configPath: string; | ||
| profileSelectionPath?: string; | ||
| comparisonJsonPath?: string; | ||
| comparisonMarkdownPath?: string; | ||
| winnerSelectionPath?: string; | ||
| crowningRecordPath?: string; | ||
| }; | ||
| export declare function buildProjectInitializationResult(result: InitializeProjectResult): { | ||
| projectRoot: string; | ||
| configPath: string; | ||
| createdPaths: string[]; | ||
| }; | ||
| export declare function buildSetupDiagnosticsResponse(cwd: string): { | ||
| mode: "setup-status"; | ||
| cwd: string; | ||
| projectInitialized: boolean; | ||
| configPath: string; | ||
| advancedConfigPath: string; | ||
| targetPrefix: "orc"; | ||
| hosts: Array<{ | ||
| host: "claude-code" | "codex"; | ||
| status: "ready" | "partial" | "needs-setup"; | ||
| registered: boolean; | ||
| artifactsInstalled: boolean; | ||
| nextAction: string; | ||
| notes: string[]; | ||
| }>; | ||
| summary: string; | ||
| }; | ||
| export declare function assertToolId(value: string): McpToolId; | ||
| export declare const typedOraculumMcpToolSurface: ToolMetadata[]; | ||
| export declare const typedOraculumCommandManifest: CommandManifestEntry[]; |
| import { existsSync, readFileSync } from "node:fs"; | ||
| import { homedir } from "node:os"; | ||
| import { join } from "node:path"; | ||
| import { getAdvancedConfigPath, getConfigPath, getExportPlanPath, getFinalistComparisonJsonPath, getFinalistComparisonMarkdownPath, getProfileSelectionPath, getRunConfigPath, getRunDir, getWinnerSelectionPath, resolveProjectRoot, } from "../core/paths.js"; | ||
| import { commandManifestEntrySchema, consultToolRequestSchema, consultToolResponseSchema, crownToolRequestSchema, crownToolResponseSchema, draftToolRequestSchema, draftToolResponseSchema, initToolRequestSchema, initToolResponseSchema, mcpToolIdSchema, setupStatusToolRequestSchema, setupStatusToolResponseSchema, toolMetadataSchema, verdictArchiveToolRequestSchema, verdictArchiveToolResponseSchema, verdictToolRequestSchema, verdictToolResponseSchema, } from "../domain/chat-native.js"; | ||
| import { getExpectedCodexRuleFileName, getExpectedCodexSkillDirs } from "./codex-chat-native.js"; | ||
| export const oraculumMcpSchemas = { | ||
| oraculum_consult: { | ||
| request: consultToolRequestSchema, | ||
| response: consultToolResponseSchema, | ||
| }, | ||
| oraculum_draft: { | ||
| request: draftToolRequestSchema, | ||
| response: draftToolResponseSchema, | ||
| }, | ||
| oraculum_verdict: { | ||
| request: verdictToolRequestSchema, | ||
| response: verdictToolResponseSchema, | ||
| }, | ||
| oraculum_verdict_archive: { | ||
| request: verdictArchiveToolRequestSchema, | ||
| response: verdictArchiveToolResponseSchema, | ||
| }, | ||
| oraculum_crown: { | ||
| request: crownToolRequestSchema, | ||
| response: crownToolResponseSchema, | ||
| }, | ||
| oraculum_init: { | ||
| request: initToolRequestSchema, | ||
| response: initToolResponseSchema, | ||
| }, | ||
| oraculum_setup_status: { | ||
| request: setupStatusToolRequestSchema, | ||
| response: setupStatusToolResponseSchema, | ||
| }, | ||
| }; | ||
| export const oraculumMcpToolSurface = [ | ||
| { | ||
| id: "oraculum_consult", | ||
| purpose: "Start a full consultation, execute candidates, and return the completed verdict state.", | ||
| requestShape: "consultToolRequestSchema", | ||
| responseShape: "consultToolResponseSchema", | ||
| bindings: [ | ||
| { | ||
| kind: "existing-service", | ||
| module: "src/services/project.ts", | ||
| symbol: "ensureProjectInitialized", | ||
| }, | ||
| { | ||
| kind: "existing-service", | ||
| module: "src/services/runs.ts", | ||
| symbol: "planRun", | ||
| }, | ||
| { | ||
| kind: "existing-service", | ||
| module: "src/services/execution.ts", | ||
| symbol: "executeRun", | ||
| }, | ||
| { | ||
| kind: "existing-service", | ||
| module: "src/services/consultations.ts", | ||
| symbol: "renderConsultationSummary", | ||
| }, | ||
| { | ||
| kind: "new-adapter-layer", | ||
| module: "src/services/chat-native.ts", | ||
| symbol: "buildConsultationArtifacts", | ||
| note: "Machine-readable MCP response assembly layer.", | ||
| }, | ||
| ], | ||
| machineReadableArtifacts: [ | ||
| "run.json", | ||
| "consultation-config.json", | ||
| "profile-selection.json", | ||
| "comparison.json", | ||
| "comparison.md", | ||
| "winner-selection.json", | ||
| ], | ||
| }, | ||
| { | ||
| id: "oraculum_draft", | ||
| purpose: "Plan a consultation without executing candidates and return the drafted run state.", | ||
| requestShape: "draftToolRequestSchema", | ||
| responseShape: "draftToolResponseSchema", | ||
| bindings: [ | ||
| { | ||
| kind: "existing-service", | ||
| module: "src/services/project.ts", | ||
| symbol: "ensureProjectInitialized", | ||
| }, | ||
| { | ||
| kind: "existing-service", | ||
| module: "src/services/runs.ts", | ||
| symbol: "planRun", | ||
| }, | ||
| { | ||
| kind: "existing-service", | ||
| module: "src/services/consultations.ts", | ||
| symbol: "renderConsultationSummary", | ||
| }, | ||
| { | ||
| kind: "new-adapter-layer", | ||
| module: "src/services/chat-native.ts", | ||
| symbol: "buildConsultationArtifacts", | ||
| note: "Machine-readable MCP response assembly layer.", | ||
| }, | ||
| ], | ||
| machineReadableArtifacts: ["run.json", "consultation-config.json", "profile-selection.json"], | ||
| }, | ||
| { | ||
| id: "oraculum_verdict", | ||
| purpose: "Reopen the latest or a specific consultation and return the saved verdict state.", | ||
| requestShape: "verdictToolRequestSchema", | ||
| responseShape: "verdictToolResponseSchema", | ||
| bindings: [ | ||
| { | ||
| kind: "existing-service", | ||
| module: "src/services/runs.ts", | ||
| symbol: "readLatestRunManifest", | ||
| }, | ||
| { | ||
| kind: "existing-service", | ||
| module: "src/services/runs.ts", | ||
| symbol: "readRunManifest", | ||
| }, | ||
| { | ||
| kind: "existing-service", | ||
| module: "src/services/consultations.ts", | ||
| symbol: "renderConsultationSummary", | ||
| }, | ||
| { | ||
| kind: "new-adapter-layer", | ||
| module: "src/services/chat-native.ts", | ||
| symbol: "buildConsultationArtifacts", | ||
| note: "Machine-readable MCP response assembly layer.", | ||
| }, | ||
| ], | ||
| machineReadableArtifacts: [ | ||
| "run.json", | ||
| "consultation-config.json", | ||
| "profile-selection.json", | ||
| "comparison.json", | ||
| "comparison.md", | ||
| "winner-selection.json", | ||
| "export-plan.json", | ||
| ], | ||
| }, | ||
| { | ||
| id: "oraculum_verdict_archive", | ||
| purpose: "List recent consultations in machine-readable form for archive browsing and reopen flows.", | ||
| requestShape: "verdictArchiveToolRequestSchema", | ||
| responseShape: "verdictArchiveToolResponseSchema", | ||
| bindings: [ | ||
| { | ||
| kind: "existing-service", | ||
| module: "src/services/consultations.ts", | ||
| symbol: "listRecentConsultations", | ||
| }, | ||
| { | ||
| kind: "existing-service", | ||
| module: "src/services/consultations.ts", | ||
| symbol: "renderConsultationArchive", | ||
| }, | ||
| ], | ||
| machineReadableArtifacts: ["run.json"], | ||
| }, | ||
| { | ||
| id: "oraculum_crown", | ||
| purpose: "Crown the recommended or explicitly selected survivor and materialize it into the project.", | ||
| requestShape: "crownToolRequestSchema", | ||
| responseShape: "crownToolResponseSchema", | ||
| bindings: [ | ||
| { | ||
| kind: "existing-service", | ||
| module: "src/services/exports.ts", | ||
| symbol: "materializeExport", | ||
| }, | ||
| { | ||
| kind: "existing-service", | ||
| module: "src/services/runs.ts", | ||
| symbol: "readRunManifest", | ||
| }, | ||
| ], | ||
| machineReadableArtifacts: ["export-plan.json", "export.patch", "export-sync.json"], | ||
| }, | ||
| { | ||
| id: "oraculum_init", | ||
| purpose: "Initialize the quick-start project scaffold and return the created paths.", | ||
| requestShape: "initToolRequestSchema", | ||
| responseShape: "initToolResponseSchema", | ||
| bindings: [ | ||
| { | ||
| kind: "existing-service", | ||
| module: "src/services/project.ts", | ||
| symbol: "initializeProject", | ||
| }, | ||
| ], | ||
| machineReadableArtifacts: ["config.json"], | ||
| }, | ||
| { | ||
| id: "oraculum_setup_status", | ||
| purpose: "Return setup diagnostics that explain whether host registration is ready for chat-native commands.", | ||
| requestShape: "setupStatusToolRequestSchema", | ||
| responseShape: "setupStatusToolResponseSchema", | ||
| bindings: [ | ||
| { | ||
| kind: "existing-service", | ||
| module: "src/services/project.ts", | ||
| symbol: "pathExists", | ||
| }, | ||
| { | ||
| kind: "new-adapter-layer", | ||
| module: "src/services/chat-native.ts", | ||
| symbol: "buildSetupDiagnosticsResponse", | ||
| note: "Host registration inspection layer until full setup/install commands land.", | ||
| }, | ||
| ], | ||
| machineReadableArtifacts: [], | ||
| }, | ||
| ].map((tool) => toolMetadataSchema.parse(tool)); | ||
| export const oraculumCommandManifest = [ | ||
| { | ||
| id: "consult", | ||
| prefix: "orc", | ||
| path: ["consult"], | ||
| summary: "Run the full consultation tournament and return the completed verdict state.", | ||
| mcpTool: "oraculum_consult", | ||
| requestShape: "consultToolRequestSchema", | ||
| responseShape: "consultToolResponseSchema", | ||
| arguments: [ | ||
| { | ||
| name: "taskInput", | ||
| kind: "string", | ||
| description: "Inline task text, a task note path, or a task packet path.", | ||
| required: true, | ||
| positional: true, | ||
| }, | ||
| { | ||
| name: "agent", | ||
| kind: "string", | ||
| description: "Agent runtime override.", | ||
| option: "--agent", | ||
| }, | ||
| { | ||
| name: "candidates", | ||
| kind: "integer", | ||
| description: "Number of candidate patches to plan.", | ||
| option: "--candidates", | ||
| }, | ||
| { | ||
| name: "timeoutMs", | ||
| kind: "integer", | ||
| description: "Adapter timeout in milliseconds.", | ||
| option: "--timeout-ms", | ||
| }, | ||
| ], | ||
| examples: ['orc consult "fix session loss on refresh"'], | ||
| hostAdditions: {}, | ||
| }, | ||
| { | ||
| id: "verdict", | ||
| prefix: "orc", | ||
| path: ["verdict"], | ||
| summary: "Reopen the latest verdict or inspect a specific consultation.", | ||
| mcpTool: "oraculum_verdict", | ||
| requestShape: "verdictToolRequestSchema", | ||
| responseShape: "verdictToolResponseSchema", | ||
| arguments: [ | ||
| { | ||
| name: "consultationId", | ||
| kind: "string", | ||
| description: "Consultation identifier; defaults to the latest consultation.", | ||
| positional: true, | ||
| }, | ||
| ], | ||
| examples: ["orc verdict", "orc verdict run_20260404_xxxx"], | ||
| hostAdditions: {}, | ||
| }, | ||
| { | ||
| id: "verdict-archive", | ||
| prefix: "orc", | ||
| path: ["verdict", "archive"], | ||
| summary: "Browse recent consultations without reopening one immediately.", | ||
| mcpTool: "oraculum_verdict_archive", | ||
| requestShape: "verdictArchiveToolRequestSchema", | ||
| responseShape: "verdictArchiveToolResponseSchema", | ||
| arguments: [ | ||
| { | ||
| name: "count", | ||
| kind: "integer", | ||
| description: "Maximum number of recent consultations to show.", | ||
| positional: true, | ||
| }, | ||
| ], | ||
| examples: ["orc verdict archive", "orc verdict archive 20"], | ||
| hostAdditions: {}, | ||
| }, | ||
| { | ||
| id: "crown", | ||
| prefix: "orc", | ||
| path: ["crown"], | ||
| summary: "Crown the recommended or selected survivor and materialize it in the project.", | ||
| mcpTool: "oraculum_crown", | ||
| requestShape: "crownToolRequestSchema", | ||
| responseShape: "crownToolResponseSchema", | ||
| arguments: [ | ||
| { | ||
| name: "branchName", | ||
| kind: "string", | ||
| description: "Target branch name to create.", | ||
| required: true, | ||
| positional: true, | ||
| }, | ||
| ], | ||
| examples: ["orc crown fix/session-loss"], | ||
| hostAdditions: {}, | ||
| }, | ||
| { | ||
| id: "draft", | ||
| prefix: "orc", | ||
| path: ["draft"], | ||
| summary: "Stage a consultation without executing candidates.", | ||
| mcpTool: "oraculum_draft", | ||
| requestShape: "draftToolRequestSchema", | ||
| responseShape: "draftToolResponseSchema", | ||
| arguments: [ | ||
| { | ||
| name: "taskInput", | ||
| kind: "string", | ||
| description: "Inline task text, a task note path, or a task packet path.", | ||
| required: true, | ||
| positional: true, | ||
| }, | ||
| { | ||
| name: "agent", | ||
| kind: "string", | ||
| description: "Agent runtime override.", | ||
| option: "--agent", | ||
| }, | ||
| { | ||
| name: "candidates", | ||
| kind: "integer", | ||
| description: "Number of candidate patches to plan.", | ||
| option: "--candidates", | ||
| }, | ||
| ], | ||
| examples: ['orc draft "fix session loss on refresh"'], | ||
| hostAdditions: {}, | ||
| }, | ||
| { | ||
| id: "init", | ||
| prefix: "orc", | ||
| path: ["init"], | ||
| summary: "Initialize the quick-start scaffold explicitly.", | ||
| mcpTool: "oraculum_init", | ||
| requestShape: "initToolRequestSchema", | ||
| responseShape: "initToolResponseSchema", | ||
| arguments: [ | ||
| { | ||
| name: "force", | ||
| kind: "boolean", | ||
| description: "Reset quick-start config and remove advanced overrides.", | ||
| option: "--force", | ||
| }, | ||
| ], | ||
| examples: ["orc init", "orc init --force"], | ||
| hostAdditions: {}, | ||
| }, | ||
| ].map((entry) => commandManifestEntrySchema.parse(entry)); | ||
| export function getMcpToolSchemas(toolId) { | ||
| return oraculumMcpSchemas[toolId]; | ||
| } | ||
| export function buildConsultationArtifacts(projectRoot, consultationId) { | ||
| return { | ||
| consultationRoot: getRunDir(projectRoot, consultationId), | ||
| configPath: getRunConfigPath(projectRoot, consultationId), | ||
| profileSelectionPath: getProfileSelectionPath(projectRoot, consultationId), | ||
| comparisonJsonPath: getFinalistComparisonJsonPath(projectRoot, consultationId), | ||
| comparisonMarkdownPath: getFinalistComparisonMarkdownPath(projectRoot, consultationId), | ||
| winnerSelectionPath: getWinnerSelectionPath(projectRoot, consultationId), | ||
| crowningRecordPath: getExportPlanPath(projectRoot, consultationId), | ||
| }; | ||
| } | ||
| export function buildProjectInitializationResult(result) { | ||
| return { | ||
| projectRoot: result.projectRoot, | ||
| configPath: result.configPath, | ||
| createdPaths: result.createdPaths, | ||
| }; | ||
| } | ||
| export function buildSetupDiagnosticsResponse(cwd) { | ||
| const projectRoot = resolveProjectRoot(cwd); | ||
| const configPath = getConfigPath(projectRoot); | ||
| const advancedConfigPath = getAdvancedConfigPath(projectRoot); | ||
| const claudeMcpPath = join(homedir(), ".claude", "mcp.json"); | ||
| const claudePluginRoot = join(homedir(), ".claude"); | ||
| const codexConfigPath = join(homedir(), ".codex", "config.toml"); | ||
| const codexSkillsDir = join(homedir(), ".codex", "skills"); | ||
| const codexRulesDir = join(homedir(), ".codex", "rules"); | ||
| const claudeRegistered = hasMcpServer(claudeMcpPath, "oraculum"); | ||
| const claudeArtifactsInstalled = hasClaudePluginInstalled(); | ||
| const codexRegistered = hasCodexMcpServer(codexConfigPath); | ||
| const codexArtifactsInstalled = hasCodexArtifactsInstalled(codexSkillsDir, codexRulesDir); | ||
| const claudeStatus = computeHostSetupStatus(claudeRegistered, claudeArtifactsInstalled); | ||
| const codexStatus = computeHostSetupStatus(codexRegistered, codexArtifactsInstalled); | ||
| return { | ||
| mode: "setup-status", | ||
| cwd: projectRoot, | ||
| projectInitialized: existsSync(configPath), | ||
| configPath, | ||
| advancedConfigPath, | ||
| targetPrefix: "orc", | ||
| hosts: [ | ||
| { | ||
| host: "claude-code", | ||
| status: claudeStatus, | ||
| registered: claudeRegistered, | ||
| artifactsInstalled: claudeArtifactsInstalled, | ||
| nextAction: claudeStatus === "ready" | ||
| ? "Use `orc ...` directly in Claude Code." | ||
| : "Run `oraculum setup --runtime claude-code`.", | ||
| notes: [ | ||
| `Expected MCP config path: ${claudeMcpPath}`, | ||
| `Expected Claude plugin root: ${claudePluginRoot}`, | ||
| "Run `oraculum setup --runtime claude-code` to register the MCP server and install the Oraculum plugin.", | ||
| ], | ||
| }, | ||
| { | ||
| host: "codex", | ||
| status: codexStatus, | ||
| registered: codexRegistered, | ||
| artifactsInstalled: codexArtifactsInstalled, | ||
| nextAction: codexStatus === "ready" | ||
| ? "Use `orc ...` directly in Codex." | ||
| : "Run `oraculum setup --runtime codex`.", | ||
| notes: [ | ||
| `Expected MCP config path: ${codexConfigPath}`, | ||
| `Expected skill install root: ${codexSkillsDir}`, | ||
| `Expected rule install root: ${codexRulesDir}`, | ||
| "Run `oraculum setup --runtime codex` to register the MCP server and install the Oraculum skills and rules.", | ||
| ], | ||
| }, | ||
| ], | ||
| summary: claudeStatus === "ready" && codexStatus === "ready" | ||
| ? "Claude Code and Codex are ready for host-native `orc ...` commands." | ||
| : "Run `oraculum setup --runtime <host>` to finish host-native `orc ...` routing, then use `oraculum setup status` to verify the wiring.", | ||
| }; | ||
| } | ||
| export function assertToolId(value) { | ||
| return mcpToolIdSchema.parse(value); | ||
| } | ||
| export const typedOraculumMcpToolSurface = oraculumMcpToolSurface; | ||
| export const typedOraculumCommandManifest = oraculumCommandManifest; | ||
| function hasMcpServer(path, serverId) { | ||
| if (!existsSync(path)) { | ||
| return false; | ||
| } | ||
| try { | ||
| const parsed = JSON.parse(readFileSync(path, "utf8")); | ||
| return Boolean(parsed.mcpServers?.[serverId]); | ||
| } | ||
| catch { | ||
| return false; | ||
| } | ||
| } | ||
| function hasClaudePluginInstalled() { | ||
| const pluginsDir = join(homedir(), ".claude", "plugins"); | ||
| if (!existsSync(pluginsDir)) { | ||
| return false; | ||
| } | ||
| return existsSync(join(pluginsDir, "oraculum")) || existsSync(join(pluginsDir, "@oraculum")); | ||
| } | ||
| function hasCodexMcpServer(path) { | ||
| if (!existsSync(path)) { | ||
| return false; | ||
| } | ||
| try { | ||
| const raw = readFileSync(path, "utf8"); | ||
| return /\[mcp_servers\.oraculum\]/u.test(raw); | ||
| } | ||
| catch { | ||
| return false; | ||
| } | ||
| } | ||
| function hasCodexArtifactsInstalled(skillsDir, rulesDir) { | ||
| if (!existsSync(skillsDir) || !existsSync(rulesDir)) { | ||
| return false; | ||
| } | ||
| const expectedRule = join(rulesDir, getExpectedCodexRuleFileName()); | ||
| if (!existsSync(expectedRule)) { | ||
| return false; | ||
| } | ||
| return getExpectedCodexSkillDirs().every((dirName) => existsSync(join(skillsDir, dirName))); | ||
| } | ||
| function computeHostSetupStatus(registered, artifactsInstalled) { | ||
| if (registered && artifactsInstalled) { | ||
| return "ready"; | ||
| } | ||
| if (!registered && !artifactsInstalled) { | ||
| return "needs-setup"; | ||
| } | ||
| return "partial"; | ||
| } | ||
| //# sourceMappingURL=chat-native.js.map |
| {"version":3,"file":"chat-native.js","sourceRoot":"","sources":["../../src/services/chat-native.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAIjC,OAAO,EACL,qBAAqB,EACrB,aAAa,EACb,iBAAiB,EACjB,6BAA6B,EAC7B,iCAAiC,EACjC,uBAAuB,EACvB,gBAAgB,EAChB,SAAS,EACT,sBAAsB,EACtB,kBAAkB,GACnB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAEL,0BAA0B,EAC1B,wBAAwB,EACxB,yBAAyB,EACzB,sBAAsB,EACtB,uBAAuB,EACvB,sBAAsB,EACtB,uBA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AAkB,EAAE,CAAC;QACvC,OAAO,aAAa,CAAC;IACvB,CAAC;IAED,OAAO,SAAS,CAAC;AACnB,CAAC"} |
| import type { CommandManifestEntry } from "../domain/chat-native.js"; | ||
| export type ChatNativeSetupScope = "user" | "project" | "local"; | ||
| export type ClaudeSetupScope = ChatNativeSetupScope; | ||
| interface ClaudeSetupOptions { | ||
| claudeArgs?: string[]; | ||
| claudeBinaryPath?: string; | ||
| env?: NodeJS.ProcessEnv; | ||
| homeDir?: string; | ||
| mcpInvocation?: { | ||
| args: string[]; | ||
| command: string; | ||
| }; | ||
| packagedRoot?: string; | ||
| scope: ClaudeSetupScope; | ||
| } | ||
| interface ClaudeSetupResult { | ||
| effectiveMcpConfigPath: string; | ||
| installRoot: string; | ||
| scope: ClaudeSetupScope; | ||
| packagedRoot: string; | ||
| pluginRoot: string; | ||
| marketplacePath: string; | ||
| mcpConfigPath: string; | ||
| pluginInstalled: boolean; | ||
| } | ||
| export declare function getPackagedClaudeCodeRoot(): string; | ||
| export declare function getPackagedClaudePluginRoot(): string; | ||
| export declare function getPackagedClaudeMarketplacePath(): string; | ||
| export declare function buildClaudeMarketplaceManifest(): Record<string, unknown>; | ||
| export declare function buildClaudePluginManifest(): Record<string, unknown>; | ||
| export declare function buildClaudePluginMcpConfig(): Record<string, unknown>; | ||
| export declare function buildClaudeCommandFiles(manifest: readonly CommandManifestEntry[]): Array<{ | ||
| path: string; | ||
| content: string; | ||
| }>; | ||
| export declare function buildClaudeSkillFiles(manifest: readonly CommandManifestEntry[]): Array<{ | ||
| path: string; | ||
| content: string; | ||
| }>; | ||
| export declare function setupClaudeCodeHost(options: ClaudeSetupOptions): Promise<ClaudeSetupResult>; | ||
| export {}; |
| import { existsSync } from "node:fs"; | ||
| import { cp, mkdir, readFile, writeFile } from "node:fs/promises"; | ||
| import { homedir } from "node:os"; | ||
| import { dirname, join } from "node:path"; | ||
| import { fileURLToPath } from "node:url"; | ||
| import { APP_VERSION } from "../core/constants.js"; | ||
| import { OraculumError } from "../core/errors.js"; | ||
| import { runSubprocess } from "../core/subprocess.js"; | ||
| const CLAUDE_MARKETPLACE_NAME = "oraculum"; | ||
| const CLAUDE_PLUGIN_NAME = "oraculum"; | ||
| export function getPackagedClaudeCodeRoot() { | ||
| return fileURLToPath(new URL("../../dist/chat-native/claude-code", import.meta.url)); | ||
| } | ||
| export function getPackagedClaudePluginRoot() { | ||
| return join(getPackagedClaudeCodeRoot(), ".claude-plugin"); | ||
| } | ||
| export function getPackagedClaudeMarketplacePath() { | ||
| return join(getPackagedClaudePluginRoot(), "marketplace.json"); | ||
| } | ||
| export function buildClaudeMarketplaceManifest() { | ||
| return { | ||
| name: CLAUDE_MARKETPLACE_NAME, | ||
| owner: { | ||
| name: "Nhahan", | ||
| email: "kisy324@naver.com", | ||
| }, | ||
| plugins: [ | ||
| { | ||
| name: CLAUDE_PLUGIN_NAME, | ||
| description: "Consult competing patches, read verdicts, and crown survivors with Oraculum.", | ||
| version: APP_VERSION, | ||
| author: { | ||
| name: "Nhahan", | ||
| email: "kisy324@naver.com", | ||
| }, | ||
| source: "./.claude-plugin", | ||
| category: "development", | ||
| homepage: "https://github.com/Nhahan/oraculum", | ||
| repository: "https://github.com/Nhahan/oraculum", | ||
| license: "MIT", | ||
| keywords: ["oraculum", "patch", "verdict", "crowning", "mcp"], | ||
| tags: ["patch-consultation", "oracle-guided", "development"], | ||
| }, | ||
| ], | ||
| }; | ||
| } | ||
| export function buildClaudePluginManifest() { | ||
| return { | ||
| name: CLAUDE_PLUGIN_NAME, | ||
| version: APP_VERSION, | ||
| description: "Oracle-guided patch consultation and crowning for Claude Code.", | ||
| author: { | ||
| name: "Nhahan", | ||
| email: "kisy324@naver.com", | ||
| }, | ||
| repository: "https://github.com/Nhahan/oraculum", | ||
| homepage: "https://github.com/Nhahan/oraculum", | ||
| license: "MIT", | ||
| keywords: ["oraculum", "patch", "verdict", "crowning", "mcp"], | ||
| skills: "./skills/", | ||
| mcpServers: "./.mcp.json", | ||
| }; | ||
| } | ||
| export function buildClaudePluginMcpConfig() { | ||
| return { | ||
| mcpServers: { | ||
| oraculum: { | ||
| command: process.platform === "win32" ? "oraculum.cmd" : "oraculum", | ||
| args: ["mcp", "serve"], | ||
| timeout: 600, | ||
| }, | ||
| }, | ||
| }; | ||
| } | ||
| export function buildClaudeCommandFiles(manifest) { | ||
| const claudePluginRootPlaceholder = "$" + "{CLAUDE_PLUGIN_ROOT}"; | ||
| return manifest | ||
| .filter((entry) => entry.id !== "verdict-archive") | ||
| .map((entry) => ({ | ||
| path: `commands/${entry.id}.md`, | ||
| content: [ | ||
| "---", | ||
| `description: "${entry.summary.replaceAll('"', '\\"')}"`, | ||
| "---", | ||
| "", | ||
| "Read the file at `" + | ||
| claudePluginRootPlaceholder + | ||
| `/skills/${entry.id}/SKILL.md\` using the Read tool and follow its instructions exactly.`, | ||
| "", | ||
| "## User Input", | ||
| "", | ||
| "{{ARGUMENTS}}", | ||
| "", | ||
| ].join("\n"), | ||
| })); | ||
| } | ||
| export function buildClaudeSkillFiles(manifest) { | ||
| return manifest | ||
| .filter((entry) => new Set(["consult", "verdict", "crown", "draft", "init"]).has(entry.id)) | ||
| .map((entry) => ({ | ||
| path: `.claude-plugin/skills/${entry.id}/SKILL.md`, | ||
| content: renderClaudeSkill(entry), | ||
| })); | ||
| } | ||
| export async function setupClaudeCodeHost(options) { | ||
| const homeDir = options.homeDir ?? homedir(); | ||
| const claudeBinaryPath = options.claudeBinaryPath ?? "claude"; | ||
| const claudeArgs = options.claudeArgs ?? []; | ||
| const env = { | ||
| ...process.env, | ||
| ...options.env, | ||
| HOME: homeDir, | ||
| }; | ||
| const packagedRoot = options.packagedRoot ?? getPackagedClaudeCodeRoot(); | ||
| const installRoot = await prepareClaudeSetupRoot({ | ||
| homeDir, | ||
| mcpInvocation: options.mcpInvocation ?? resolveNodeCliInvocation(), | ||
| packagedRoot, | ||
| }); | ||
| const pluginRoot = join(installRoot, ".claude-plugin"); | ||
| const marketplacePath = join(pluginRoot, "marketplace.json"); | ||
| const mcpConfigPath = join(homeDir, ".claude", "mcp.json"); | ||
| if (!existsSync(pluginRoot) || !existsSync(marketplacePath)) { | ||
| throw new OraculumError("Packaged Claude Code artifacts are missing. Build Oraculum first so setup can install the generated host artifacts."); | ||
| } | ||
| await mkdir(join(homeDir, ".claude"), { recursive: true }); | ||
| const effectiveMcpConfig = buildClaudePluginMcpConfigFromInvocation(options.mcpInvocation ?? resolveNodeCliInvocation()); | ||
| await mergeClaudeMcpConfig(mcpConfigPath, effectiveMcpConfig); | ||
| const validate = await runSubprocess({ | ||
| command: claudeBinaryPath, | ||
| args: [...claudeArgs, "plugin", "validate", installRoot], | ||
| cwd: process.cwd(), | ||
| env, | ||
| timeoutMs: 30_000, | ||
| }); | ||
| if (validate.exitCode !== 0) { | ||
| throw new OraculumError(`Claude plugin validation failed: ${extractSubprocessError(validate)}`); | ||
| } | ||
| const marketList = await listClaudeMarketplaces(claudeBinaryPath, claudeArgs, env); | ||
| if (!marketList.some((entry) => entry.name === CLAUDE_MARKETPLACE_NAME)) { | ||
| const addMarketplace = await runSubprocess({ | ||
| command: claudeBinaryPath, | ||
| args: [...claudeArgs, "plugin", "marketplace", "add", installRoot, "--scope", options.scope], | ||
| cwd: process.cwd(), | ||
| env, | ||
| timeoutMs: 30_000, | ||
| }); | ||
| if (addMarketplace.exitCode !== 0) { | ||
| throw new OraculumError(`Failed to register the Oraculum Claude marketplace: ${extractSubprocessError(addMarketplace)}`); | ||
| } | ||
| } | ||
| const installedPlugins = await listClaudePlugins(claudeBinaryPath, claudeArgs, env); | ||
| if (!installedPlugins.some((entry) => entry.name === CLAUDE_PLUGIN_NAME)) { | ||
| const install = await runSubprocess({ | ||
| command: claudeBinaryPath, | ||
| args: [ | ||
| ...claudeArgs, | ||
| "plugin", | ||
| "install", | ||
| `${CLAUDE_PLUGIN_NAME}@${CLAUDE_MARKETPLACE_NAME}`, | ||
| "--scope", | ||
| options.scope, | ||
| ], | ||
| cwd: process.cwd(), | ||
| env, | ||
| timeoutMs: 30_000, | ||
| }); | ||
| if (install.exitCode !== 0) { | ||
| throw new OraculumError(`Failed to install the Oraculum Claude plugin: ${extractSubprocessError(install)}`); | ||
| } | ||
| } | ||
| return { | ||
| effectiveMcpConfigPath: join(pluginRoot, ".mcp.json"), | ||
| installRoot, | ||
| scope: options.scope, | ||
| packagedRoot, | ||
| pluginRoot, | ||
| marketplacePath, | ||
| mcpConfigPath, | ||
| pluginInstalled: true, | ||
| }; | ||
| } | ||
| async function mergeClaudeMcpConfig(mcpConfigPath, effectiveConfig) { | ||
| const existing = existsSync(mcpConfigPath) | ||
| ? JSON.parse(await readFile(mcpConfigPath, "utf8")) | ||
| : {}; | ||
| const next = { | ||
| ...existing, | ||
| mcpServers: { | ||
| ...(existing.mcpServers ?? {}), | ||
| oraculum: effectiveConfig.mcpServers.oraculum, | ||
| }, | ||
| }; | ||
| await mkdir(dirname(mcpConfigPath), { recursive: true }); | ||
| await writeFile(mcpConfigPath, `${JSON.stringify(next, null, 2)}\n`, "utf8"); | ||
| } | ||
| async function prepareClaudeSetupRoot(options) { | ||
| const installRoot = join(options.homeDir, ".oraculum", "chat-native", "claude-code", APP_VERSION); | ||
| await cp(options.packagedRoot, installRoot, { | ||
| force: true, | ||
| recursive: true, | ||
| }); | ||
| await writeFile(join(installRoot, ".claude-plugin", ".mcp.json"), `${JSON.stringify(buildClaudePluginMcpConfigFromInvocation(options.mcpInvocation), null, 2)}\n`, "utf8"); | ||
| return installRoot; | ||
| } | ||
| function buildClaudePluginMcpConfigFromInvocation(invocation) { | ||
| return { | ||
| mcpServers: { | ||
| oraculum: { | ||
| command: invocation.command, | ||
| args: [...invocation.args, "mcp", "serve"], | ||
| timeout: 600, | ||
| }, | ||
| }, | ||
| }; | ||
| } | ||
| function resolveNodeCliInvocation() { | ||
| const cliEntry = process.argv[1]; | ||
| if (!cliEntry) { | ||
| throw new OraculumError("Cannot determine the current Oraculum CLI entry for Claude setup."); | ||
| } | ||
| return { | ||
| command: process.execPath, | ||
| args: [cliEntry], | ||
| }; | ||
| } | ||
| async function listClaudePlugins(claudeBinaryPath, claudeArgs, env) { | ||
| const result = await runSubprocess({ | ||
| command: claudeBinaryPath, | ||
| args: [...claudeArgs, "plugin", "list", "--json"], | ||
| cwd: process.cwd(), | ||
| env, | ||
| timeoutMs: 30_000, | ||
| }); | ||
| if (result.exitCode !== 0) { | ||
| return []; | ||
| } | ||
| return normalizeNamedEntries(result.stdout); | ||
| } | ||
| async function listClaudeMarketplaces(claudeBinaryPath, claudeArgs, env) { | ||
| const result = await runSubprocess({ | ||
| command: claudeBinaryPath, | ||
| args: [...claudeArgs, "plugin", "marketplace", "list", "--json"], | ||
| cwd: process.cwd(), | ||
| env, | ||
| timeoutMs: 30_000, | ||
| }); | ||
| if (result.exitCode !== 0) { | ||
| return []; | ||
| } | ||
| return normalizeNamedEntries(result.stdout); | ||
| } | ||
| function normalizeNamedEntries(stdout) { | ||
| try { | ||
| const parsed = JSON.parse(stdout); | ||
| if (!Array.isArray(parsed)) { | ||
| return []; | ||
| } | ||
| return parsed | ||
| .filter((entry) => typeof entry === "object" && | ||
| entry !== null && | ||
| "name" in entry && | ||
| typeof entry.name === "string") | ||
| .map((entry) => ({ name: entry.name })); | ||
| } | ||
| catch { | ||
| return []; | ||
| } | ||
| } | ||
| function renderClaudeSkill(entry) { | ||
| const mcpArgs = buildClaudeSkillMcpArgs(entry); | ||
| const magicPrefixes = entry.id === "crown" ? ["orc crown"] : [`orc ${entry.path.join(" ")}`]; | ||
| return [ | ||
| "---", | ||
| `name: ${entry.id}`, | ||
| `description: "${entry.summary.replaceAll('"', '\\"')}"`, | ||
| `mcp_tool: ${entry.mcpTool}`, | ||
| "mcp_args:", | ||
| ...renderYamlObject(mcpArgs, 2), | ||
| "magic_prefixes:", | ||
| ...magicPrefixes.map((prefix) => ` - "${prefix}"`), | ||
| "---", | ||
| "", | ||
| `# /oraculum:${entry.id}`, | ||
| "", | ||
| entry.summary, | ||
| "", | ||
| "## Usage", | ||
| "", | ||
| "```", | ||
| ...buildUsageExamples(entry), | ||
| "```", | ||
| "", | ||
| "## Notes", | ||
| "", | ||
| ...buildClaudeSkillNotes(entry), | ||
| "", | ||
| ].join("\n"); | ||
| } | ||
| function buildClaudeSkillMcpArgs(entry) { | ||
| switch (entry.id) { | ||
| case "consult": | ||
| case "draft": | ||
| return { cwd: "$CWD", taskInput: "$1" }; | ||
| case "verdict": | ||
| return { cwd: "$CWD", consultationId: "$1" }; | ||
| case "crown": | ||
| return { cwd: "$CWD", branchName: "$1", withReport: false }; | ||
| case "init": | ||
| return { cwd: "$CWD", force: false }; | ||
| default: | ||
| return { cwd: "$CWD" }; | ||
| } | ||
| } | ||
| function buildUsageExamples(entry) { | ||
| switch (entry.id) { | ||
| case "crown": | ||
| return ["orc crown fix/session-loss"]; | ||
| case "consult": | ||
| return ['orc consult "fix session loss on refresh"']; | ||
| case "draft": | ||
| return ['orc draft "fix session loss on refresh"']; | ||
| case "verdict": | ||
| return ["orc verdict", "orc verdict run_20260404_xxxx"]; | ||
| case "init": | ||
| return ["orc init"]; | ||
| default: | ||
| return entry.examples; | ||
| } | ||
| } | ||
| function buildClaudeSkillNotes(entry) { | ||
| if (entry.id === "crown") { | ||
| return [ | ||
| "- The chat-native crowning path expects the branch name as the first argument.", | ||
| "- It crowns the recommended survivor from the latest eligible consultation.", | ||
| "- The shared chat-native surface is `orc crown <branch-name>`.", | ||
| "- The Oraculum MCP server must already be registered through `oraculum setup --runtime claude-code`.", | ||
| ]; | ||
| } | ||
| return [ | ||
| "- This skill is intended for exact-prefix routing inside Claude Code.", | ||
| "- The Oraculum MCP server must already be registered through `oraculum setup --runtime claude-code`.", | ||
| ]; | ||
| } | ||
| function renderYamlObject(value, indent) { | ||
| const prefix = " ".repeat(indent); | ||
| return Object.entries(value).map(([key, entry]) => { | ||
| if (typeof entry === "string") { | ||
| return `${prefix}${key}: "${entry.replaceAll('"', '\\"')}"`; | ||
| } | ||
| return `${prefix}${key}: ${String(entry)}`; | ||
| }); | ||
| } | ||
| function extractSubprocessError(result) { | ||
| const stderr = result.stderr.trim(); | ||
| if (stderr.length > 0) { | ||
| return stderr; | ||
| } | ||
| const stdout = result.stdout.trim(); | ||
| if (stdout.length > 0) { | ||
| return stdout; | ||
| } | ||
| return "unknown error"; | ||
| } | ||
| //# sourceMappingURL=claude-chat-native.js.map |
| {"version":3,"file":"claude-chat-native.js","sourceRoot":"","sources":["../../src/services/claude-chat-native.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAClE,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AA8BtD,MAAM,uBAAuB,GAAG,UAAU,CAAC;AAC3C,MAAM,kBAAkB,GAAG,UAAU,CAAC;AAEtC,MAAM,UAAU,yBAAyB;IACvC,OAAO,aAAa,CAAC,IAAI,GAAG,CAAC,oCAAoC,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AACvF,CAAC;AAED,MAAM,UAAU,2BAA2B;IACzC,OAAO,IAAI,CAAC,yBAAyB,EAAE,EAAE,gBAAgB,CAAC,CAAC;AAC7D,CAAC;AAED,MAAM,UAAU,gCAAgC;IAC9C,OAAO,IAAI,CAAC,2BAA2B,EAAE,EAAE,kBAAkB,CAAC,CAAC;AACjE,CAAC;AAED,MAAM,UAAU,8BAA8B;IAC5C,OAAO;QACL,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AM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE;QAChD,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;YAC9B,OAAO,GAAG,MAAM,GAAG,GAAG,MAAM,KAAK,CAAC,UAAU,CAAC,GAAG,EAAE,KAAK,CAAC,GAAG,CAAC;QAC9D,CAAC;QAED,OAAO,GAAG,MAAM,GAAG,GAAG,KAAK,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC;IAC7C,CAAC,CAAC,CAAC;AACL,CAAC;AAED,SAAS,sBAAsB,CAAC,MAA0C;IACxE,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;IACpC,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACtB,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;IACpC,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACtB,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,OAAO,eAAe,CAAC;AACzB,CAAC"} |
| import type { CommandManifestEntry } from "../domain/chat-native.js"; | ||
| import type { ChatNativeSetupScope } from "./claude-chat-native.js"; | ||
| export type CodexSetupScope = ChatNativeSetupScope; | ||
| interface CodexSetupOptions { | ||
| codexArgs?: string[]; | ||
| codexBinaryPath?: string; | ||
| env?: NodeJS.ProcessEnv; | ||
| homeDir?: string; | ||
| mcpInvocation?: { | ||
| args: string[]; | ||
| command: string; | ||
| }; | ||
| packagedRoot?: string; | ||
| scope: CodexSetupScope; | ||
| } | ||
| interface CodexSetupResult { | ||
| configPath: string; | ||
| installRoot: string; | ||
| packagedRoot: string; | ||
| registered: boolean; | ||
| rulesRoot: string; | ||
| scope: CodexSetupScope; | ||
| skillsRoot: string; | ||
| } | ||
| export declare function getPackagedCodexRoot(): string; | ||
| export declare function buildCodexRuleFiles(manifest: readonly CommandManifestEntry[]): Array<{ | ||
| path: string; | ||
| content: string; | ||
| }>; | ||
| export declare function buildCodexSkillFiles(manifest: readonly CommandManifestEntry[]): Array<{ | ||
| path: string; | ||
| content: string; | ||
| }>; | ||
| export declare function setupCodexHost(options: CodexSetupOptions): Promise<CodexSetupResult>; | ||
| export declare function getExpectedCodexSkillDirs(): string[]; | ||
| export declare function getExpectedCodexRuleFileName(): string; | ||
| export {}; |
| import { cp, mkdir, readdir, rm } from "node:fs/promises"; | ||
| import { homedir } from "node:os"; | ||
| import { join } from "node:path"; | ||
| import { fileURLToPath } from "node:url"; | ||
| import { APP_VERSION } from "../core/constants.js"; | ||
| import { OraculumError } from "../core/errors.js"; | ||
| import { runSubprocess } from "../core/subprocess.js"; | ||
| const CODEX_RULE_FILENAME = "oraculum.md"; | ||
| const CODEX_SKILL_PREFIX = "oraculum-"; | ||
| const CODEX_SETUP_GUIDANCE = "Run `oraculum setup --runtime codex`."; | ||
| export function getPackagedCodexRoot() { | ||
| return fileURLToPath(new URL("../../dist/chat-native/codex", import.meta.url)); | ||
| } | ||
| export function buildCodexRuleFiles(manifest) { | ||
| return [ | ||
| { | ||
| path: `rules/${CODEX_RULE_FILENAME}`, | ||
| content: renderCodexRules(manifest), | ||
| }, | ||
| ]; | ||
| } | ||
| export function buildCodexSkillFiles(manifest) { | ||
| return manifest.map((entry) => ({ | ||
| path: `skills/${toCodexSkillDir(entry.id)}/SKILL.md`, | ||
| content: renderCodexSkill(entry), | ||
| })); | ||
| } | ||
| export async function setupCodexHost(options) { | ||
| const homeDir = options.homeDir ?? homedir(); | ||
| const codexBinaryPath = options.codexBinaryPath ?? "codex"; | ||
| const codexArgs = options.codexArgs ?? []; | ||
| const env = { | ||
| ...process.env, | ||
| ...options.env, | ||
| HOME: homeDir, | ||
| }; | ||
| const packagedRoot = options.packagedRoot ?? getPackagedCodexRoot(); | ||
| const installRoot = await prepareCodexSetupRoot({ | ||
| homeDir, | ||
| packagedRoot, | ||
| }); | ||
| const codexDir = join(homeDir, ".codex"); | ||
| const skillsRoot = join(codexDir, "skills"); | ||
| const rulesRoot = join(codexDir, "rules"); | ||
| const configPath = join(codexDir, "config.toml"); | ||
| await installCodexArtifacts({ | ||
| installRoot, | ||
| rulesRoot, | ||
| skillsRoot, | ||
| }); | ||
| await registerCodexMcpServer({ | ||
| codexArgs, | ||
| codexBinaryPath, | ||
| env, | ||
| mcpInvocation: options.mcpInvocation ?? resolveNodeCliInvocation(), | ||
| }); | ||
| return { | ||
| configPath, | ||
| installRoot, | ||
| packagedRoot, | ||
| registered: true, | ||
| rulesRoot, | ||
| scope: options.scope, | ||
| skillsRoot, | ||
| }; | ||
| } | ||
| export function getExpectedCodexSkillDirs() { | ||
| return ["consult", "verdict", "verdict-archive", "crown", "draft", "init"].map(toCodexSkillDir); | ||
| } | ||
| export function getExpectedCodexRuleFileName() { | ||
| return CODEX_RULE_FILENAME; | ||
| } | ||
| function renderCodexRules(manifest) { | ||
| const rows = manifest | ||
| .map((entry) => `| \`orc ${entry.path.join(" ")}\` | \`${toCodexSkillDir(entry.id)}\` | \`${entry.mcpTool}\` |`) | ||
| .join("\n"); | ||
| return [ | ||
| "# Oraculum for Codex", | ||
| "", | ||
| "Use Oraculum when the user is asking to run Oraculum consultations, reopen verdicts, browse the consultation archive, or crown a survivor.", | ||
| "", | ||
| "## Critical: Exact-Prefix Routing", | ||
| "", | ||
| "When the user types an exact `orc <command>` command, you MUST NOT interpret it as natural language and you MUST NOT do the work directly.", | ||
| "Immediately use the matching installed Oraculum skill and route to the mapped MCP tool.", | ||
| "Parse command arguments shell-style before calling the MCP tool. Do not pass option flags through as raw task text.", | ||
| "", | ||
| "| User Input | Skill | MCP Tool |", | ||
| "| --- | --- | --- |", | ||
| rows, | ||
| "", | ||
| "If the Oraculum MCP tool is unavailable, respond with explicit setup guidance instead of improvising:", | ||
| "", | ||
| `- ${CODEX_SETUP_GUIDANCE}`, | ||
| "", | ||
| "If the user request is unrelated to `orc` commands or Oraculum workflows, handle it normally.", | ||
| "", | ||
| ].join("\n"); | ||
| } | ||
| function renderCodexSkill(entry) { | ||
| return [ | ||
| "---", | ||
| `name: ${toCodexSkillDir(entry.id)}`, | ||
| `description: Exact-prefix Oraculum ${entry.id} routing for Codex.`, | ||
| "---", | ||
| "", | ||
| `# Oraculum ${entry.id}`, | ||
| "", | ||
| `When the user typed an exact \`orc ${entry.path.join(" ")}\` command, do not treat it as natural language and do not perform the task yourself.`, | ||
| "", | ||
| "## Required Action", | ||
| "", | ||
| `Call the MCP tool \`${entry.mcpTool}\`.`, | ||
| "", | ||
| "## Argument Mapping", | ||
| "", | ||
| ...buildCodexSkillArgumentLines(entry), | ||
| "", | ||
| "## Setup Failure", | ||
| "", | ||
| `If the MCP tool is unavailable, tell the user exactly: ${CODEX_SETUP_GUIDANCE}`, | ||
| "", | ||
| "## Usage", | ||
| "", | ||
| "```", | ||
| ...entry.examples, | ||
| "```", | ||
| "", | ||
| ].join("\n"); | ||
| } | ||
| function buildCodexSkillArgumentLines(entry) { | ||
| const shared = ["- `cwd`: the current working directory where the user invoked the command"]; | ||
| switch (entry.id) { | ||
| case "consult": | ||
| return [ | ||
| ...shared, | ||
| "- `taskInput`: the first positional argument after removing recognized flags from the command", | ||
| "- optional `--agent <claude-code|codex>`", | ||
| "- optional `--candidates <n>`", | ||
| "- optional `--timeout-ms <ms>`", | ||
| '- Example: `orc consult tasks/fix.md --agent claude-code --candidates 1` -> `{ taskInput: "tasks/fix.md", agent: "claude-code", candidates: 1 }`', | ||
| ]; | ||
| case "draft": | ||
| return [ | ||
| ...shared, | ||
| "- `taskInput`: the first positional argument after removing recognized flags from the command", | ||
| "- optional `--agent <claude-code|codex>`", | ||
| "- optional `--candidates <n>`", | ||
| '- Example: `orc draft tasks/fix.md --agent codex --candidates 2` -> `{ taskInput: "tasks/fix.md", agent: "codex", candidates: 2 }`', | ||
| ]; | ||
| case "verdict": | ||
| return [...shared, "- optional `consultationId`: the first positional argument if present"]; | ||
| case "verdict-archive": | ||
| return [...shared, "- optional `count`: the first positional argument if present"]; | ||
| case "crown": | ||
| return [ | ||
| ...shared, | ||
| "- required `branchName`: the first positional argument after `orc crown`", | ||
| "- the chat-native crowning path uses the recommended survivor automatically", | ||
| '- Example: `orc crown fix/greet` -> `{ branchName: "fix/greet" }`', | ||
| ]; | ||
| case "init": | ||
| return [...shared, "- optional `force`: parse the presence of `--force` as `true`"]; | ||
| default: | ||
| return shared; | ||
| } | ||
| } | ||
| async function prepareCodexSetupRoot(options) { | ||
| const installRoot = join(options.homeDir, ".oraculum", "chat-native", "codex", APP_VERSION); | ||
| await cp(options.packagedRoot, installRoot, { | ||
| force: true, | ||
| recursive: true, | ||
| }); | ||
| return installRoot; | ||
| } | ||
| async function installCodexArtifacts(options) { | ||
| await mkdir(options.skillsRoot, { recursive: true }); | ||
| await mkdir(options.rulesRoot, { recursive: true }); | ||
| const packagedSkillsRoot = join(options.installRoot, "skills"); | ||
| const packagedRulesRoot = join(options.installRoot, "rules"); | ||
| const packagedSkillDirs = await readdir(packagedSkillsRoot, { withFileTypes: true }); | ||
| const desiredSkillNames = packagedSkillDirs | ||
| .filter((entry) => entry.isDirectory()) | ||
| .map((entry) => entry.name); | ||
| for (const desired of desiredSkillNames) { | ||
| const sourcePath = join(packagedSkillsRoot, desired); | ||
| const targetPath = join(options.skillsRoot, desired); | ||
| await rm(targetPath, { recursive: true, force: true }); | ||
| await cp(sourcePath, targetPath, { | ||
| force: true, | ||
| recursive: true, | ||
| }); | ||
| } | ||
| await pruneManagedCodexSkills(options.skillsRoot, new Set(desiredSkillNames)); | ||
| const packagedRules = await readdir(packagedRulesRoot, { withFileTypes: true }); | ||
| const desiredRuleNames = packagedRules | ||
| .filter((entry) => entry.isFile()) | ||
| .map((entry) => entry.name); | ||
| for (const desired of desiredRuleNames) { | ||
| const sourcePath = join(packagedRulesRoot, desired); | ||
| const targetPath = join(options.rulesRoot, desired); | ||
| await rm(targetPath, { recursive: true, force: true }); | ||
| await cp(sourcePath, targetPath, { | ||
| force: true, | ||
| recursive: true, | ||
| }); | ||
| } | ||
| await pruneManagedCodexRules(options.rulesRoot, new Set(desiredRuleNames)); | ||
| } | ||
| async function pruneManagedCodexSkills(skillsRoot, desired) { | ||
| for (const entry of await readdir(skillsRoot, { withFileTypes: true })) { | ||
| if (!entry.name.startsWith(CODEX_SKILL_PREFIX) || desired.has(entry.name)) { | ||
| continue; | ||
| } | ||
| await rm(join(skillsRoot, entry.name), { | ||
| force: true, | ||
| recursive: true, | ||
| }); | ||
| } | ||
| } | ||
| async function pruneManagedCodexRules(rulesRoot, desired) { | ||
| for (const entry of await readdir(rulesRoot, { withFileTypes: true })) { | ||
| if (!entry.isFile() || | ||
| (!entry.name.startsWith("oraculum") && entry.name !== CODEX_RULE_FILENAME) || | ||
| desired.has(entry.name)) { | ||
| continue; | ||
| } | ||
| await rm(join(rulesRoot, entry.name), { | ||
| force: true, | ||
| recursive: true, | ||
| }); | ||
| } | ||
| } | ||
| async function registerCodexMcpServer(options) { | ||
| await runSubprocess({ | ||
| command: options.codexBinaryPath, | ||
| args: [...options.codexArgs, "mcp", "remove", "oraculum"], | ||
| cwd: process.cwd(), | ||
| env: options.env, | ||
| timeoutMs: 30_000, | ||
| }).catch(() => undefined); | ||
| const addResult = await runSubprocess({ | ||
| command: options.codexBinaryPath, | ||
| args: [ | ||
| ...options.codexArgs, | ||
| "mcp", | ||
| "add", | ||
| "oraculum", | ||
| "--env", | ||
| "ORACULUM_AGENT_RUNTIME=codex", | ||
| "--env", | ||
| "ORACULUM_LLM_BACKEND=codex", | ||
| "--", | ||
| options.mcpInvocation.command, | ||
| ...options.mcpInvocation.args, | ||
| "mcp", | ||
| "serve", | ||
| ], | ||
| cwd: process.cwd(), | ||
| env: options.env, | ||
| timeoutMs: 30_000, | ||
| }); | ||
| if (addResult.exitCode !== 0) { | ||
| throw new OraculumError(`Failed to register the Oraculum Codex MCP server: ${extractSubprocessError(addResult)}`); | ||
| } | ||
| const verifyResult = await runSubprocess({ | ||
| command: options.codexBinaryPath, | ||
| args: [...options.codexArgs, "mcp", "get", "oraculum", "--json"], | ||
| cwd: process.cwd(), | ||
| env: options.env, | ||
| timeoutMs: 30_000, | ||
| }); | ||
| if (verifyResult.exitCode !== 0) { | ||
| throw new OraculumError(`Failed to verify the Oraculum Codex MCP server: ${extractSubprocessError(verifyResult)}`); | ||
| } | ||
| } | ||
| function resolveNodeCliInvocation() { | ||
| const cliEntry = process.argv[1]; | ||
| if (!cliEntry) { | ||
| throw new OraculumError("Cannot determine the current Oraculum CLI entry for Codex setup."); | ||
| } | ||
| return { | ||
| command: process.execPath, | ||
| args: [cliEntry], | ||
| }; | ||
| } | ||
| function toCodexSkillDir(commandId) { | ||
| return `${CODEX_SKILL_PREFIX}${commandId}`; | ||
| } | ||
| function extractSubprocessError(result) { | ||
| const stderr = result.stderr.trim(); | ||
| if (stderr.length > 0) { | ||
| return stderr; | ||
| } | ||
| const stdout = result.stdout.trim(); | ||
| if (stdout.length > 0) { | ||
| return stdout; | ||
| } | ||
| return "unknown error"; | ||
| } | ||
| //# sourceMappingURL=codex-chat-native.js.map |
| {"version":3,"file":"codex-chat-native.js","sourceRoot":"","sources":["../../src/services/codex-chat-native.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AA6BtD,MAAM,mBAAmB,GAAG,aAAa,CAAC;AAC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,GAAG,EAAE;QAClB,GAAG,EAAE,OAAO,CAAC,GAAG;QAChB,SAAS,EAAE,MAAM;KAClB,CAAC,CAAC;IACH,IAAI,YAAY,CAAC,QAAQ,KAAK,CAAC,EAAE,CAAC;QAChC,MAAM,IAAI,aAAa,CACrB,mDAAmD,sBAAsB,CAAC,YAAY,CAAC,EAAE,CAC1F,CAAC;IACJ,CAAC;AACH,CAAC;AAED,SAAS,wBAAwB;IAC/B,MAAM,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACjC,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,MAAM,IAAI,aAAa,CAAC,kEAAkE,CAAC,CAAC;IAC9F,CAAC;IAED,OAAO;QACL,OAAO,EAAE,OAAO,CAAC,QAAQ;QACzB,IAAI,EAAE,CAAC,QAAQ,CAAC;KACjB,CAAC;AACJ,CAAC;AAED,SAAS,eAAe,CAAC,SAAiB;IACxC,OAAO,GAAG,kBAAkB,GAAG,SAAS,EAAE,CAAC;AAC7C,CAAC;AAED,SAAS,sBAAsB,CAAC,MAA0C;IACxE,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;IACpC,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACtB,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;IACpC,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACtB,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,OAAO,eAAe,CAAC;AACzB,CAAC"} |
| import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js"; | ||
| export declare function createOraculumMcpServer(): McpServer; | ||
| export declare function runOraculumMcpServer(): Promise<void>; |
| import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js"; | ||
| import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js"; | ||
| import { APP_NAME, APP_VERSION } from "../core/constants.js"; | ||
| import { consultToolRequestSchema, consultToolResponseSchema, crownToolRequestSchema, crownToolResponseSchema, draftToolRequestSchema, draftToolResponseSchema, initToolRequestSchema, initToolResponseSchema, setupStatusToolRequestSchema, setupStatusToolResponseSchema, verdictArchiveToolRequestSchema, verdictArchiveToolResponseSchema, verdictToolRequestSchema, verdictToolResponseSchema, } from "../domain/chat-native.js"; | ||
| import { runConsultTool, runCrownTool, runDraftTool, runInitTool, runSetupStatusTool, runVerdictArchiveTool, runVerdictTool, } from "./mcp-tools.js"; | ||
| export function createOraculumMcpServer() { | ||
| const server = new McpServer({ name: APP_NAME, version: APP_VERSION }, { | ||
| instructions: "Use Oraculum to run consultations, reopen verdicts, and crown survivors. Prefer the shared `orc` command language over ad-hoc shell execution.", | ||
| }); | ||
| server.registerTool("oraculum_consult", { | ||
| title: "Oraculum Consult", | ||
| description: "Run the full consultation tournament, execute candidates, and return the completed verdict state.", | ||
| inputSchema: consultToolRequestSchema, | ||
| outputSchema: consultToolResponseSchema, | ||
| }, async (request) => { | ||
| const response = await runConsultTool(request); | ||
| return { | ||
| content: [{ type: "text", text: response.summary }], | ||
| structuredContent: response, | ||
| }; | ||
| }); | ||
| server.registerTool("oraculum_draft", { | ||
| title: "Oraculum Draft", | ||
| description: "Stage a consultation without executing candidates.", | ||
| inputSchema: draftToolRequestSchema, | ||
| outputSchema: draftToolResponseSchema, | ||
| }, async (request) => { | ||
| const response = await runDraftTool(request); | ||
| return { | ||
| content: [{ type: "text", text: response.summary }], | ||
| structuredContent: response, | ||
| }; | ||
| }); | ||
| server.registerTool("oraculum_verdict", { | ||
| title: "Oraculum Verdict", | ||
| description: "Reopen the latest or a specific consultation.", | ||
| inputSchema: verdictToolRequestSchema, | ||
| outputSchema: verdictToolResponseSchema, | ||
| }, async (request) => { | ||
| const response = await runVerdictTool(request); | ||
| return { | ||
| content: [{ type: "text", text: response.summary }], | ||
| structuredContent: response, | ||
| }; | ||
| }); | ||
| server.registerTool("oraculum_verdict_archive", { | ||
| title: "Oraculum Verdict Archive", | ||
| description: "List recent consultations in machine-readable form.", | ||
| inputSchema: verdictArchiveToolRequestSchema, | ||
| outputSchema: verdictArchiveToolResponseSchema, | ||
| }, async (request) => { | ||
| const response = await runVerdictArchiveTool(request); | ||
| return { | ||
| content: [{ type: "text", text: response.archive }], | ||
| structuredContent: response, | ||
| }; | ||
| }); | ||
| server.registerTool("oraculum_crown", { | ||
| title: "Oraculum Crown", | ||
| description: "Crown the recommended or explicitly selected survivor.", | ||
| inputSchema: crownToolRequestSchema, | ||
| outputSchema: crownToolResponseSchema, | ||
| }, async (request) => { | ||
| const response = await runCrownTool(request); | ||
| return { | ||
| content: [ | ||
| { | ||
| type: "text", | ||
| text: [ | ||
| `Crowned ${response.plan.winnerId}`, | ||
| `Consultation: ${response.plan.runId}`, | ||
| `Branch: ${response.plan.branchName}`, | ||
| `Crowning record: ${response.recordPath}`, | ||
| ].join("\n"), | ||
| }, | ||
| ], | ||
| structuredContent: response, | ||
| }; | ||
| }); | ||
| server.registerTool("oraculum_init", { | ||
| title: "Oraculum Init", | ||
| description: "Initialize the quick-start scaffold explicitly.", | ||
| inputSchema: initToolRequestSchema, | ||
| outputSchema: initToolResponseSchema, | ||
| }, async (request) => { | ||
| const response = await runInitTool(request); | ||
| return { | ||
| content: [ | ||
| { | ||
| type: "text", | ||
| text: `Initialized Oraculum in ${response.initialization.projectRoot}`, | ||
| }, | ||
| ], | ||
| structuredContent: response, | ||
| }; | ||
| }); | ||
| server.registerTool("oraculum_setup_status", { | ||
| title: "Oraculum Setup Status", | ||
| description: "Inspect host registration diagnostics for chat-native setup.", | ||
| inputSchema: setupStatusToolRequestSchema, | ||
| outputSchema: setupStatusToolResponseSchema, | ||
| }, async (request) => { | ||
| const response = await runSetupStatusTool(request); | ||
| return { | ||
| content: [{ type: "text", text: response.summary }], | ||
| structuredContent: response, | ||
| }; | ||
| }); | ||
| return server; | ||
| } | ||
| export async function runOraculumMcpServer() { | ||
| const server = createOraculumMcpServer(); | ||
| const transport = new StdioServerTransport(); | ||
| await server.connect(transport); | ||
| console.error("Oraculum MCP server running on stdio"); | ||
| } | ||
| //# sourceMappingURL=mcp-server.js.map |
| {"version":3,"file":"mcp-server.js","sourceRoot":"","sources":["../../src/services/mcp-server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AAEjF,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EACL,wBAAwB,EACxB,yBAAyB,EACzB,sBAAsB,EACtB,uBAAuB,EACvB,sBAAsB,EACtB,uBAAuB,EACvB,qBAAqB,EACrB,sBAAsB,EACtB,4BAA4B,EAC5B,6BAA6B,EAC7B,+BAA+B,EAC/B,gCAAgC,EAChC,wBAAwB,EACxB,yBAAyB,GAC1B,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,cAAc,EACd,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,kBAAkB,EAClB,qBAAqB,EACrB,cAAc,GACf,MAAM,gBAAgB,CAAC;AAExB,MAAM,UAAU,uBAAuB;IACrC,MAAM,MAAM,GAAG,IAAI,SAAS,CAC1B,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,WAAW,EAAE,EACxC;QACE,YAAY,EACV,gJAAgJ;KACnJ,CACF,CAAC;IAEF,MAAM,CAAC,YAAY,CACjB,kBAAkB,EAClB;QACE,KAAK,EAAE,kBAAkB;QACzB,WAAW,EACT,mGAAmG;QACrG,WAAW,EAAE,wBAAwB;QACrC,YAAY,EAAE,yBAAyB;KACxC,EACD,KAAK,EAAE,OAAO,EAAE,EAAE;QAChB,MAAM,QAAQ,GAAG,MAAM,cAAc,CAAC,OAAO,CAAC,CAAC;QAC/C,OAAO;YACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM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AAC,CACF,CAAC;IAEF,MAAM,CAAC,YAAY,CACjB,uBAAuB,EACvB;QACE,KAAK,EAAE,uBAAuB;QAC9B,WAAW,EAAE,8DAA8D;QAC3E,WAAW,EAAE,4BAA4B;QACzC,YAAY,EAAE,6BAA6B;KAC5C,EACD,KAAK,EAAE,OAAO,EAAE,EAAE;QAChB,MAAM,QAAQ,GAAG,MAAM,kBAAkB,CAAC,OAAO,CAAC,CAAC;QACnD,OAAO;YACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,CAAC,OAAO,EAAE,CAAC;YACnD,iBAAiB,EAAE,QAAQ;SAC5B,CAAC;IACJ,CAAC,CACF,CAAC;IAEF,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,oBAAoB;IACxC,MAAM,MAAM,GAAG,uBAAuB,EAAE,CAAC;IACzC,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;IAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAChC,OAAO,CAAC,KAAK,CAAC,sCAAsC,CAAC,CAAC;AACxD,CAAC"} |
| import { type ConsultToolRequest, type ConsultToolResponse, type CrownToolRequest, type CrownToolResponse, type DraftToolRequest, type DraftToolResponse, type InitToolRequest, type InitToolResponse, type SetupStatusToolRequest, type SetupStatusToolResponse, type VerdictArchiveToolRequest, type VerdictArchiveToolResponse, type VerdictToolRequest, type VerdictToolResponse } from "../domain/chat-native.js"; | ||
| export declare function runConsultTool(input: ConsultToolRequest): Promise<ConsultToolResponse>; | ||
| export declare function runDraftTool(input: DraftToolRequest): Promise<DraftToolResponse>; | ||
| export declare function runVerdictTool(input: VerdictToolRequest): Promise<VerdictToolResponse>; | ||
| export declare function runVerdictArchiveTool(input: VerdictArchiveToolRequest): Promise<VerdictArchiveToolResponse>; | ||
| export declare function runCrownTool(input: CrownToolRequest): Promise<CrownToolResponse>; | ||
| export declare function runInitTool(input: InitToolRequest): Promise<InitToolResponse>; | ||
| export declare function runSetupStatusTool(input: SetupStatusToolRequest): Promise<SetupStatusToolResponse>; |
| import { consultToolRequestSchema, consultToolResponseSchema, crownToolRequestSchema, crownToolResponseSchema, draftToolRequestSchema, draftToolResponseSchema, initToolRequestSchema, initToolResponseSchema, setupStatusToolRequestSchema, setupStatusToolResponseSchema, verdictArchiveToolRequestSchema, verdictArchiveToolResponseSchema, verdictToolRequestSchema, verdictToolResponseSchema, } from "../domain/chat-native.js"; | ||
| import { buildConsultationArtifacts, buildProjectInitializationResult, buildSetupDiagnosticsResponse, } from "./chat-native.js"; | ||
| import { listRecentConsultations, renderConsultationArchive, renderConsultationSummary, } from "./consultations.js"; | ||
| import { executeRun } from "./execution.js"; | ||
| import { materializeExport } from "./exports.js"; | ||
| import { ensureProjectInitialized, initializeProject } from "./project.js"; | ||
| import { planRun, readLatestRunManifest, readRunManifest } from "./runs.js"; | ||
| export async function runConsultTool(input) { | ||
| const request = consultToolRequestSchema.parse(input); | ||
| const initialized = await ensureProjectInitialized(request.cwd); | ||
| const manifest = await planRun({ | ||
| cwd: request.cwd, | ||
| taskInput: request.taskInput, | ||
| ...(request.agent ? { agent: request.agent } : {}), | ||
| ...(request.candidates !== undefined ? { candidates: request.candidates } : {}), | ||
| autoProfile: { | ||
| allowRuntime: true, | ||
| ...(request.timeoutMs !== undefined ? { timeoutMs: request.timeoutMs } : {}), | ||
| }, | ||
| }); | ||
| const execution = await executeRun({ | ||
| cwd: request.cwd, | ||
| runId: manifest.id, | ||
| ...(request.timeoutMs !== undefined ? { timeoutMs: request.timeoutMs } : {}), | ||
| }); | ||
| return consultToolResponseSchema.parse({ | ||
| mode: "consult", | ||
| consultation: execution.manifest, | ||
| summary: await renderConsultationSummary(execution.manifest, request.cwd, { | ||
| surface: "chat-native", | ||
| }), | ||
| artifacts: buildConsultationArtifacts(request.cwd, execution.manifest.id), | ||
| ...(initialized ? { initializedProject: buildProjectInitializationResult(initialized) } : {}), | ||
| }); | ||
| } | ||
| export async function runDraftTool(input) { | ||
| const request = draftToolRequestSchema.parse(input); | ||
| const initialized = await ensureProjectInitialized(request.cwd); | ||
| const manifest = await planRun({ | ||
| cwd: request.cwd, | ||
| taskInput: request.taskInput, | ||
| ...(request.agent ? { agent: request.agent } : {}), | ||
| ...(request.candidates !== undefined ? { candidates: request.candidates } : {}), | ||
| autoProfile: { | ||
| allowRuntime: false, | ||
| }, | ||
| }); | ||
| return draftToolResponseSchema.parse({ | ||
| mode: "draft", | ||
| consultation: manifest, | ||
| summary: await renderConsultationSummary(manifest, request.cwd, { | ||
| surface: "chat-native", | ||
| }), | ||
| artifacts: buildConsultationArtifacts(request.cwd, manifest.id), | ||
| ...(initialized ? { initializedProject: buildProjectInitializationResult(initialized) } : {}), | ||
| }); | ||
| } | ||
| export async function runVerdictTool(input) { | ||
| const request = verdictToolRequestSchema.parse(input); | ||
| const manifest = request.consultationId | ||
| ? await readRunManifest(request.cwd, request.consultationId) | ||
| : await readLatestRunManifest(request.cwd); | ||
| return verdictToolResponseSchema.parse({ | ||
| mode: "verdict", | ||
| consultation: manifest, | ||
| summary: await renderConsultationSummary(manifest, request.cwd, { | ||
| surface: "chat-native", | ||
| }), | ||
| artifacts: buildConsultationArtifacts(request.cwd, manifest.id), | ||
| }); | ||
| } | ||
| export async function runVerdictArchiveTool(input) { | ||
| const request = verdictArchiveToolRequestSchema.parse(input); | ||
| const consultations = await listRecentConsultations(request.cwd, request.count); | ||
| return verdictArchiveToolResponseSchema.parse({ | ||
| mode: "verdict-archive", | ||
| consultations, | ||
| archive: renderConsultationArchive(consultations, { | ||
| surface: "chat-native", | ||
| }), | ||
| }); | ||
| } | ||
| export async function runCrownTool(input) { | ||
| const request = crownToolRequestSchema.parse(input); | ||
| const result = await materializeExport({ | ||
| cwd: request.cwd, | ||
| branchName: request.branchName, | ||
| withReport: request.withReport, | ||
| ...(request.consultationId ? { runId: request.consultationId } : {}), | ||
| ...(request.candidateId ? { winnerId: request.candidateId } : {}), | ||
| }); | ||
| const consultation = await readRunManifest(request.cwd, result.plan.runId); | ||
| return crownToolResponseSchema.parse({ | ||
| mode: "crown", | ||
| plan: result.plan, | ||
| recordPath: result.path, | ||
| consultation, | ||
| }); | ||
| } | ||
| export async function runInitTool(input) { | ||
| const request = initToolRequestSchema.parse(input); | ||
| const initialization = await initializeProject({ | ||
| cwd: request.cwd, | ||
| force: request.force, | ||
| }); | ||
| return initToolResponseSchema.parse({ | ||
| mode: "init", | ||
| initialization: buildProjectInitializationResult(initialization), | ||
| }); | ||
| } | ||
| export async function runSetupStatusTool(input) { | ||
| const request = setupStatusToolRequestSchema.parse(input); | ||
| return setupStatusToolResponseSchema.parse(await buildSetupDiagnosticsResponse(request.cwd)); | ||
| } | ||
| //# sourceMappingURL=mcp-tools.js.map |
| {"version":3,"file":"mcp-tools.js","sourceRoot":"","sources":["../../src/services/mcp-tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,wBAAwB,EACxB,yBAAyB,EACzB,sBAAsB,EACtB,uBAAuB,EAGvB,sBAAsB,EACtB,uBAAuB,EAGvB,qBAAqB,EACrB,sBAAsB,EAGtB,4BAA4B,EAC5B,6BAA6B,EAK7B,+BAA+B,EAC/B,gCAAgC,EAChC,wBAAwB,EACxB,yBAAyB,GAC1B,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,0BAA0B,EAC1B,gCAAgC,EAChC,6BAA6B,GAC9B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,uBAAuB,EACvB,yBAAyB,EACzB,yBAAyB,GAC1B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,EAAE,wBAAwB,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAC3E,OAAO,EAAE,OAAO,EAAE,qBAAqB,EAAE,eAAe,EAAE,MAAM,WAAW,CA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AA4B,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAE1D,OAAO,6BAA6B,CAAC,KAAK,CAAC,MAAM,6BAA6B,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC;AAC/F,CAAC"} |
| import { type PackagedHostArtifactLayout } from "../domain/packaged-host-artifacts.js"; | ||
| export declare const PACKAGED_HOST_ARTIFACTS_ROOT = "chat-native"; | ||
| export declare const packagedHostArtifactLayout: PackagedHostArtifactLayout; |
| import { packagedHostArtifactLayoutSchema, } from "../domain/packaged-host-artifacts.js"; | ||
| export const PACKAGED_HOST_ARTIFACTS_ROOT = "chat-native"; | ||
| export const packagedHostArtifactLayout = packagedHostArtifactLayoutSchema.parse({ | ||
| rootDir: PACKAGED_HOST_ARTIFACTS_ROOT, | ||
| commandManifestPath: `${PACKAGED_HOST_ARTIFACTS_ROOT}/command-manifest.json`, | ||
| mcpToolSurfacePath: `${PACKAGED_HOST_ARTIFACTS_ROOT}/mcp-tool-surface.json`, | ||
| hosts: [ | ||
| { | ||
| host: "claude-code", | ||
| rootDir: `${PACKAGED_HOST_ARTIFACTS_ROOT}/claude-code`, | ||
| files: [ | ||
| { | ||
| path: `${PACKAGED_HOST_ARTIFACTS_ROOT}/claude-code/README.md`, | ||
| purpose: "Documents the packaged Claude Code host-artifact root.", | ||
| }, | ||
| { | ||
| path: `${PACKAGED_HOST_ARTIFACTS_ROOT}/claude-code/.claude-plugin/marketplace.json`, | ||
| purpose: "Marketplace manifest for Claude Code plugin installation.", | ||
| }, | ||
| { | ||
| path: `${PACKAGED_HOST_ARTIFACTS_ROOT}/claude-code/commands/consult.md`, | ||
| purpose: "Generated Claude command entry for consult.", | ||
| }, | ||
| { | ||
| path: `${PACKAGED_HOST_ARTIFACTS_ROOT}/claude-code/commands/verdict.md`, | ||
| purpose: "Generated Claude command entry for verdict.", | ||
| }, | ||
| { | ||
| path: `${PACKAGED_HOST_ARTIFACTS_ROOT}/claude-code/commands/crown.md`, | ||
| purpose: "Generated Claude command entry for crown.", | ||
| }, | ||
| { | ||
| path: `${PACKAGED_HOST_ARTIFACTS_ROOT}/claude-code/commands/draft.md`, | ||
| purpose: "Generated Claude command entry for draft.", | ||
| }, | ||
| { | ||
| path: `${PACKAGED_HOST_ARTIFACTS_ROOT}/claude-code/commands/init.md`, | ||
| purpose: "Generated Claude command entry for init.", | ||
| }, | ||
| { | ||
| path: `${PACKAGED_HOST_ARTIFACTS_ROOT}/claude-code/.claude-plugin/plugin.json`, | ||
| purpose: "Generated Claude plugin manifest.", | ||
| }, | ||
| { | ||
| path: `${PACKAGED_HOST_ARTIFACTS_ROOT}/claude-code/.claude-plugin/.mcp.json`, | ||
| purpose: "Generated Claude plugin MCP registration manifest.", | ||
| }, | ||
| { | ||
| path: `${PACKAGED_HOST_ARTIFACTS_ROOT}/claude-code/.claude-plugin/skills/consult/SKILL.md`, | ||
| purpose: "Generated Claude exact-prefix consult skill.", | ||
| }, | ||
| { | ||
| path: `${PACKAGED_HOST_ARTIFACTS_ROOT}/claude-code/.claude-plugin/skills/verdict/SKILL.md`, | ||
| purpose: "Generated Claude exact-prefix verdict skill.", | ||
| }, | ||
| { | ||
| path: `${PACKAGED_HOST_ARTIFACTS_ROOT}/claude-code/.claude-plugin/skills/crown/SKILL.md`, | ||
| purpose: "Generated Claude exact-prefix crown skill.", | ||
| }, | ||
| { | ||
| path: `${PACKAGED_HOST_ARTIFACTS_ROOT}/claude-code/.claude-plugin/skills/draft/SKILL.md`, | ||
| purpose: "Generated Claude exact-prefix draft skill.", | ||
| }, | ||
| { | ||
| path: `${PACKAGED_HOST_ARTIFACTS_ROOT}/claude-code/.claude-plugin/skills/init/SKILL.md`, | ||
| purpose: "Generated Claude exact-prefix init skill.", | ||
| }, | ||
| ], | ||
| }, | ||
| { | ||
| host: "codex", | ||
| rootDir: `${PACKAGED_HOST_ARTIFACTS_ROOT}/codex`, | ||
| files: [ | ||
| { | ||
| path: `${PACKAGED_HOST_ARTIFACTS_ROOT}/codex/README.md`, | ||
| purpose: "Documents the packaged Codex host-artifact root.", | ||
| }, | ||
| { | ||
| path: `${PACKAGED_HOST_ARTIFACTS_ROOT}/codex/rules/oraculum.md`, | ||
| purpose: "Generated Codex exact-prefix routing rules.", | ||
| }, | ||
| { | ||
| path: `${PACKAGED_HOST_ARTIFACTS_ROOT}/codex/skills/oraculum-consult/SKILL.md`, | ||
| purpose: "Generated Codex exact-prefix consult skill.", | ||
| }, | ||
| { | ||
| path: `${PACKAGED_HOST_ARTIFACTS_ROOT}/codex/skills/oraculum-verdict/SKILL.md`, | ||
| purpose: "Generated Codex exact-prefix verdict skill.", | ||
| }, | ||
| { | ||
| path: `${PACKAGED_HOST_ARTIFACTS_ROOT}/codex/skills/oraculum-verdict-archive/SKILL.md`, | ||
| purpose: "Generated Codex exact-prefix verdict archive skill.", | ||
| }, | ||
| { | ||
| path: `${PACKAGED_HOST_ARTIFACTS_ROOT}/codex/skills/oraculum-crown/SKILL.md`, | ||
| purpose: "Generated Codex exact-prefix crown skill.", | ||
| }, | ||
| { | ||
| path: `${PACKAGED_HOST_ARTIFACTS_ROOT}/codex/skills/oraculum-draft/SKILL.md`, | ||
| purpose: "Generated Codex exact-prefix draft skill.", | ||
| }, | ||
| { | ||
| path: `${PACKAGED_HOST_ARTIFACTS_ROOT}/codex/skills/oraculum-init/SKILL.md`, | ||
| purpose: "Generated Codex exact-prefix init skill.", | ||
| }, | ||
| ], | ||
| }, | ||
| ], | ||
| }); | ||
| //# sourceMappingURL=packaged-host-artifacts.js.map |
| {"version":3,"file":"packaged-host-artifacts.js","sourceRoot":"","sources":["../../src/services/packaged-host-artifacts.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,gCAAgC,GACjC,MAAM,sCAAsC,CAAC;AAE9C,MAAM,CAAC,MAAM,4BAA4B,GAAG,aAAa,CAAC;AAE1D,MAAM,CAAC,MAAM,0BAA0B,GACrC,gCAAgC,CAAC,KAAK,CAAC;IACrC,OAAO,EAAE,4BAA4B;IACrC,mBAAmB,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,4CAA4C;iBACtD;gBACD;oBACE,IAAI,EAAE,GAAG,4BAA4B,kDAAkD;oBACvF,OAAO,EAAE,2CAA2C;iBACrD;aACF;SACF;QACD;YACE,IAAI,EAAE,OAAO;YACb,OAAO,EAAE,GAAG,4BAA4B,QAAQ;YAChD,KAAK,EAAE;gBACL;oBACE,IAAI,EAAE,GAAG,4BAA4B,kBAAkB;oBACvD,OAAO,EAAE,kDAAkD;iBAC5D;gBACD;oBACE,IAAI,EAAE,GAAG,4BAA4B,0BAA0B;oBAC/D,OAAO,EAAE,6CAA6C;iBACvD;gBACD;oBACE,IAAI,EAAE,GAAG,4BAA4B,yCAAyC;oBAC9E,OAAO,EAAE,6CAA6C;iBACvD;gBACD;oBACE,IAAI,EAAE,GAAG,4BAA4B,yCAAyC;oBAC9E,OAAO,EAAE,6CAA6C;iBACvD;gBACD;oBACE,IAAI,EAAE,GAAG,4BAA4B,iDAAiD;oBACtF,OAAO,EAAE,qDAAqD;iBAC/D;gBACD;oBACE,IAAI,EAAE,GAAG,4BAA4B,uCAAuC;oBAC5E,OAAO,EAAE,2CAA2C;iBACrD;gBACD;oBACE,IAAI,EAAE,GAAG,4BAA4B,uCAAuC;oBAC5E,OAAO,EAAE,2CAA2C;iBACrD;gBACD;oBACE,IAAI,EAAE,GAAG,4BAA4B,sCAAsC;oBAC3E,OAAO,EAAE,0CAA0C;iBACpD;aACF;SACF;KACF;CACF,CAAC,CAAC"} |
@@ -8,4 +8,4 @@ import { z } from "zod"; | ||
| stdout: "stdout"; | ||
| patch: "patch"; | ||
| log: "log"; | ||
| patch: "patch"; | ||
| prompt: "prompt"; | ||
@@ -25,4 +25,4 @@ report: "report"; | ||
| stdout: "stdout"; | ||
| patch: "patch"; | ||
| log: "log"; | ||
| patch: "patch"; | ||
| prompt: "prompt"; | ||
@@ -55,4 +55,4 @@ report: "report"; | ||
| stdout: "stdout"; | ||
| patch: "patch"; | ||
| log: "log"; | ||
| patch: "patch"; | ||
| prompt: "prompt"; | ||
@@ -117,4 +117,4 @@ report: "report"; | ||
| stdout: "stdout"; | ||
| patch: "patch"; | ||
| log: "log"; | ||
| patch: "patch"; | ||
| prompt: "prompt"; | ||
@@ -210,4 +210,4 @@ report: "report"; | ||
| stdout: "stdout"; | ||
| patch: "patch"; | ||
| log: "log"; | ||
| patch: "patch"; | ||
| prompt: "prompt"; | ||
@@ -257,4 +257,4 @@ report: "report"; | ||
| stdout: "stdout"; | ||
| patch: "patch"; | ||
| log: "log"; | ||
| patch: "patch"; | ||
| prompt: "prompt"; | ||
@@ -261,0 +261,0 @@ report: "report"; |
+5
-10
| import { Command } from "commander"; | ||
| import { registerConsultCommand, registerDraftCommand } from "./commands/consult.js"; | ||
| import { registerInitCommand } from "./commands/init.js"; | ||
| import { registerCrownCommand } from "./commands/promote.js"; | ||
| import { registerVerdictCommand } from "./commands/verdict.js"; | ||
| import { registerMcpCommand } from "./commands/mcp.js"; | ||
| import { registerSetupCommand } from "./commands/setup.js"; | ||
| import { APP_NAME, APP_VERSION } from "./core/constants.js"; | ||
@@ -11,11 +9,8 @@ export function buildProgram() { | ||
| .name(APP_NAME) | ||
| .description("Consult competing patches, collect verdicts, and crown only survivors.") | ||
| .description("Set up Oraculum host integration and run internal MCP services.") | ||
| .version(APP_VERSION); | ||
| registerConsultCommand(program); | ||
| registerDraftCommand(program); | ||
| registerVerdictCommand(program); | ||
| registerCrownCommand(program); | ||
| registerInitCommand(program); | ||
| registerSetupCommand(program); | ||
| registerMcpCommand(program); | ||
| return program; | ||
| } | ||
| //# sourceMappingURL=program.js.map |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"program.js","sourceRoot":"","sources":["../src/program.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AACrF,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAE5D,MAAM,UAAU,YAAY;IAC1B,MAAM,OAAO,GAAG,IAAI,OAAO,EAAE,CAAC;IAE9B,OAAO;SACJ,IAAI,CAAC,QAAQ,CAAC;SACd,WAAW,CAAC,wEAAwE,CAAC;SACrF,OAAO,CAAC,WAAW,CAAC,CAAC;IAExB,sBAAsB,CAAC,OAAO,CAAC,CAAC;IAChC,oBAAoB,CAAC,OAAO,CAAC,CAAC;IAC9B,sBAAsB,CAAC,OAAO,CAAC,CAAC;IAChC,oBAAoB,CAAC,OAAO,CAAC,CAAC;IAC9B,mBAAmB,CAAC,OAAO,CAAC,CAAC;IAE7B,OAAO,OAAO,CAAC;AACjB,CAAC"} | ||
| {"version":3,"file":"program.js","sourceRoot":"","sources":["../src/program.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAE5D,MAAM,UAAU,YAAY;IAC1B,MAAM,OAAO,GAAG,IAAI,OAAO,EAAE,CAAC;IAE9B,OAAO;SACJ,IAAI,CAAC,QAAQ,CAAC;SACd,WAAW,CAAC,iEAAiE,CAAC;SAC9E,OAAO,CAAC,WAAW,CAAC,CAAC;IAExB,oBAAoB,CAAC,OAAO,CAAC,CAAC;IAC9B,kBAAkB,CAAC,OAAO,CAAC,CAAC;IAE5B,OAAO,OAAO,CAAC;AACjB,CAAC"} |
| import { type RunManifest } from "../domain/run.js"; | ||
| type ConsultationSurface = "chat-native"; | ||
| export declare function listRecentConsultations(cwd: string, limit?: number): Promise<RunManifest[]>; | ||
| export declare function renderConsultationSummary(manifest: RunManifest, cwd: string): Promise<string>; | ||
| export declare function renderConsultationArchive(manifests: RunManifest[]): string; | ||
| export declare function renderConsultationSummary(manifest: RunManifest, cwd: string, options?: { | ||
| surface?: ConsultationSurface; | ||
| }): Promise<string>; | ||
| export declare function renderConsultationArchive(manifests: RunManifest[], options?: { | ||
| surface?: ConsultationSurface; | ||
| }): string; | ||
| export {}; |
@@ -38,4 +38,7 @@ import { readdir, readFile } from "node:fs/promises"; | ||
| } | ||
| export async function renderConsultationSummary(manifest, cwd) { | ||
| export async function renderConsultationSummary(manifest, cwd, options) { | ||
| void options; | ||
| const projectRoot = resolveProjectRoot(cwd); | ||
| const verdictCommand = getSurfaceCommand("verdict"); | ||
| const crownCommand = getSurfaceCommand("crown"); | ||
| const finalists = manifest.candidates.filter((candidate) => candidate.status === "promoted" || candidate.status === "exported"); | ||
@@ -98,6 +101,6 @@ const lines = [ | ||
| else if (manifest.recommendedWinner) { | ||
| lines.push("- crown the recommended survivor: oraculum crown --branch <branch-name>"); | ||
| lines.push(`- crown the recommended survivor: ${crownCommand} <branch-name>`); | ||
| } | ||
| else if (manifest.status === "completed" && finalists.length > 0) { | ||
| lines.push("- inspect the comparison and choose a candidate manually: oraculum crown <candidate-id> --branch <branch-name>"); | ||
| lines.push(`- inspect the comparison first. The shared \`${crownCommand}\` path only crowns a recommended survivor.`); | ||
| } | ||
@@ -108,11 +111,14 @@ else if (manifest.status === "completed") { | ||
| else { | ||
| lines.push(`- reopen this consultation later: oraculum verdict consultation ${manifest.id}`); | ||
| lines.push(`- reopen this consultation later: ${verdictCommand} ${manifest.id}`); | ||
| } | ||
| lines.push("- reopen the latest consultation later: oraculum verdict"); | ||
| lines.push("- browse recent consultations: oraculum verdict archive"); | ||
| lines.push(`- reopen the latest consultation later: ${verdictCommand}`); | ||
| lines.push(`- browse recent consultations: ${verdictCommand} archive`); | ||
| return `${lines.join("\n")}\n`; | ||
| } | ||
| export function renderConsultationArchive(manifests) { | ||
| export function renderConsultationArchive(manifests, options) { | ||
| void options; | ||
| const consultCommand = getSurfaceCommand("consult"); | ||
| const verdictCommand = getSurfaceCommand("verdict"); | ||
| if (manifests.length === 0) { | ||
| return "No consultations yet. Start with `oraculum consult ...`.\n"; | ||
| return `No consultations yet. Start with \`${consultCommand} ...\`.\n`; | ||
| } | ||
@@ -127,3 +133,3 @@ const lines = ["Recent consultations:"]; | ||
| : "no auto profile"; | ||
| lines.push(`- ${manifest.id} | ${manifest.status} | ${manifest.taskPacket.title} | ${profile} | ${recommendation}`, ` opened: ${manifest.createdAt}`, ` reopen: oraculum verdict consultation ${manifest.id}`); | ||
| lines.push(`- ${manifest.id} | ${manifest.status} | ${manifest.taskPacket.title} | ${profile} | ${recommendation}`, ` opened: ${manifest.createdAt}`, ` reopen: ${verdictCommand} ${manifest.id}`); | ||
| } | ||
@@ -136,2 +142,5 @@ return `${lines.join("\n")}\n`; | ||
| } | ||
| function getSurfaceCommand(command) { | ||
| return `orc ${command}`; | ||
| } | ||
| //# sourceMappingURL=consultations.js.map |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"consultations.js","sourceRoot":"","sources":["../../src/services/consultations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAErC,OAAO,EACL,iBAAiB,EACjB,iCAAiC,EACjC,uBAAuB,EACvB,SAAS,EACT,kBAAkB,EAClB,UAAU,EACV,sBAAsB,EACtB,kBAAkB,GACnB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAoB,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAEvE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAAC,GAAW,EAAE,KAAK,GAAG,EAAE;IACnE,M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CAAC,CAAC;IACxC,KAAK,MAAM,QAAQ,IAAI,SAAS,EAAE,CAAC;QACjC,MAAM,cAAc,GAAG,QAAQ,CAAC,iBAAiB;YAC/C,CAAC,CAAC,YAAY,QAAQ,CAAC,iBAAiB,CAAC,WAAW,EAAE;YACtD,CAAC,CAAC,iBAAiB,CAAC;QACtB,MAAM,OAAO,GAAG,QAAQ,CAAC,gBAAgB;YACvC,CAAC,CAAC,WAAW,QAAQ,CAAC,gBAAgB,CAAC,SAAS,EAAE;YAClD,CAAC,CAAC,iBAAiB,CAAC;QACtB,KAAK,CAAC,IAAI,CACR,KAAK,QAAQ,CAAC,EAAE,MAAM,QAAQ,CAAC,MAAM,MAAM,QAAQ,CAAC,UAAU,CAAC,KAAK,MAAM,OAAO,MAAM,cAAc,EAAE,EACvG,aAAa,QAAQ,CAAC,SAAS,EAAE,EACjC,aAAa,cAAc,IAAI,QAAQ,CAAC,EAAE,EAAE,CAC7C,CAAC;IACJ,CAAC;IAED,OAAO,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC;AACjC,CAAC;AAED,SAAS,aAAa,CAAC,WAAmB,EAAE,UAAkB;IAC5D,MAAM,OAAO,GAAG,QAAQ,CAAC,WAAW,EAAE,UAAU,CAAC,CAAC,UAAU,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IACxE,OAAO,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC;AAC5C,CAAC;AAED,SAAS,iBAAiB,CAAC,OAAwC;IACjE,OAAO,OAAO,OAAO,EAAE,CAAC;AAC1B,CAAC"} |
@@ -53,3 +53,3 @@ import { lstat, mkdir, readFile, rm, writeFile } from "node:fs/promises"; | ||
| if (!(await pathExists(configPath))) { | ||
| throw new OraculumError(`Missing ${configPath}. Run "oraculum init" from the project root first.`); | ||
| throw new OraculumError(`Missing ${configPath}. Run "orc init" after setup from the project root first.`); | ||
| } | ||
@@ -56,0 +56,0 @@ const raw = await readFile(configPath, "utf8"); |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"project.js","sourceRoot":"","sources":["../../src/services/project.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAEzE,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EACL,qBAAqB,EACrB,aAAa,EACb,oBAAoB,EACpB,cAAc,EACd,UAAU,EACV,WAAW,EACX,kBAAkB,GACnB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,oBAAoB,EACpB,yBAAyB,EAIzB,2BAA2B,EAC3B,mBAAmB,EACnB,wBAAwB,GACzB,MAAM,qBAAqB,CAAC;AAqB7B,MAAM,CAAC,KAAK,UAAU,iBAAiB,CACrC,OAAiC;IAEjC,MAAM,WAAW,GAAG,kBAAkB,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACpD,MAAM,WAAW,GAAG,cAAc,CAAC,WAAW,CAAC,CAAC;IAChD,MAAM,iBAAiB,GAAG,oBAAoB,CAAC,WAAW,CAAC,CAAC;IAC5D,MAAM,OAAO,GAAG,UAAU,CAAC,WAAW,CAAC,CAAC;IACxC,MAAM,QAAQ,GAAG,WAAW,CAAC,WAAW,CAAC,CAAC;IAC1C,MAAM,UAAU,GAAG,aAAa,CAAC,WAAW,CAAC,CAAC;IAC9C,MAAM,kBAAkB,GAAG,qBAAqB,CAAC,WAAW,CAAC,CAAC;IAE9D,IAAI,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC,MAAM,UAAU,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC;QACrD,MAAM,IAAI,aAAa,CACrB,4CAA4C,UAAU,sCAAsC,CAC7F,CAAC;IACJ,CAAC;IAED,MAAM,KAAK,CAAC,WAAW,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC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,CAAC,KAAK,UAAU,aAAa,CAAC,IAAY,EAAE,KAAc;IAC9D,MAAM,SAAS,CAAC,IAAI,EAAE,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;AACvE,CAAC"} |
@@ -213,3 +213,3 @@ import { randomUUID } from "node:crypto"; | ||
| if (!(await pathExists(latestRunStatePath))) { | ||
| throw new OraculumError("No previous consultation found. Start with `oraculum consult ...`."); | ||
| throw new OraculumError("No previous consultation found. Start with `orc consult ...` after setup."); | ||
| } | ||
@@ -216,0 +216,0 @@ const raw = await readFile(latestRunStatePath, "utf8"); |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"runs.js","sourceRoot":"","sources":["../../src/services/runs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,wBAAwB,EACxB,0BAA0B,EAC1B,uBAAuB,EACvB,wBAAwB,EACxB,kBAAkB,EAClB,iBAAiB,EACjB,6BAA6B,EAC7B,iCAAiC,EACjC,oBAAoB,EACpB,+BAA+B,EAC/B,qBAAqB,EACrB,uBAAuB,EACvB,aAAa,EACb,gBAAgB,EAChB,SAAS,EACT,kBAAkB,EAClB,sBAAsB,EACtB,eAAe,EACf,kBAAkB,GACnB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAEL,uBAAuB,EAEvB,gBAAgB,EAChB,oBAAoB,EAGpB,iBAAiB,GAClB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,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AAC,SAAS,CAAC,CAAC;IAC5C,IAAI,sCAAsC,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC;QAC3D,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,CACL,SAAS,CAAC,UAAU,CAAC,GAAG,CAAC;QACzB,CAAC,CAAC,aAAa;YACb,CAAC,SAAS,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,SAAS,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAC5F,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,mBAAmB,CAAC,WAAmB,EAAE,KAAa;IAC1E,MAAM,aAAa,CAAC,qBAAqB,CAAC,WAAW,CAAC,EAAE;QACtD,KAAK;QACL,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;KACpC,CAAC,CAAC;AACL,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,6BAA6B,CACjD,WAAmB,EACnB,KAAa;IAEb,MAAM,aAAa,CAAC,+BAA+B,CAAC,WAAW,CAAC,EAAE;QAChE,KAAK;QACL,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;KACpC,CAAC,CAAC;AACL,CAAC"} |
+5
-2
| { | ||
| "name": "oraculum", | ||
| "version": "0.1.0-beta.4", | ||
| "version": "0.1.0-beta.5", | ||
| "description": "Oracle-guided patch consultation for Claude Code and Codex.", | ||
@@ -26,3 +26,3 @@ "license": "MIT", | ||
| "scripts": { | ||
| "build": "node -e \"require('node:fs').rmSync('dist', { recursive: true, force: true })\" && tsc -p tsconfig.build.json", | ||
| "build": "node -e \"require('node:fs').rmSync('dist', { recursive: true, force: true })\" && tsc -p tsconfig.build.json && node scripts/write-chat-native-artifacts.mjs", | ||
| "check": "npm run lint && npm run typecheck && npm run test", | ||
@@ -33,3 +33,5 @@ "dev": "tsx src/cli.ts", | ||
| "evidence:beta:matrix": "npm run build && node scripts/beta-evidence.mjs --mode=matrix", | ||
| "evidence:smoke": "npm run evidence:published-smoke && npm run evidence:release-smoke", | ||
| "evidence:published-smoke": "node scripts/published-smoke.mjs", | ||
| "evidence:release-smoke": "node scripts/release-smoke.mjs", | ||
| "format": "biome check --write .", | ||
@@ -50,2 +52,3 @@ "lint": "biome check .", | ||
| "dependencies": { | ||
| "@modelcontextprotocol/sdk": "^1.29.0", | ||
| "commander": "^13.1.0", | ||
@@ -52,0 +55,0 @@ "zod": "^4.3.6" |
+24
-9
@@ -23,3 +23,3 @@ <p align="right"> | ||
| <br /> | ||
| <sub>Claude Code와 Codex를 위한 오라클 기반(oracle-guided) 패치 검증 도구</sub> | ||
| <sub>Claude Code와 Codex를 위한 오라클 기반(oracle-guided) chat-native 패치 워크플로우 도구</sub> | ||
| </p> | ||
@@ -41,4 +41,6 @@ | ||
| 여러 후보를 격리된 환경에서 실행하고, 레포지토리에 정의한 오라클(repo-local oracle)로 판정하고, 판정(verdict)과 근거(witness)를 남긴 뒤, 마지막으로 끝까지 살아남은 후보만 최종 반영(crown)하도록 만드는 반복 가능한 로컬 워크플로우입니다. | ||
| 주 표면은 두 호스트에서 공통으로 쓰는 채팅 내부 명령어입니다. 기본 접두사는 `orc`이며, 핵심 흐름은 `orc consult`, `orc verdict`, `orc crown`입니다. | ||
| 그 아래에서 여러 후보를 격리된 환경에서 실행하고, 레포지토리에 정의한 오라클(repo-local oracle)로 판정하고, 판정(verdict)과 근거(witness)를 남긴 뒤, 마지막으로 끝까지 살아남은 후보만 최종 반영(crown)하도록 만드는 반복 가능한 워크플로우를 제공합니다. | ||
| ## 설치 | ||
@@ -52,16 +54,29 @@ | ||
| ## 빠른 시작 | ||
| 그 다음 사용하는 호스트에 맞게 Oraculum을 등록합니다. | ||
| 작업하려는 프로젝트 폴더에서: | ||
| ```bash | ||
| oraculum setup --runtime claude-code | ||
| oraculum setup --runtime codex | ||
| ``` | ||
| 나중에 연결 상태를 다시 확인하고 싶다면: | ||
| ```bash | ||
| oraculum consult "fix session loss on refresh" | ||
| oraculum crown --branch fix/session-loss | ||
| oraculum setup status | ||
| ``` | ||
| 이것이 기본 흐름입니다. `consult`는 처음 사용할 때 Oraculum을 자동 초기화하고, 실행이 끝나면 결과 요약을 바로 출력합니다. `crown`은 추천된 후보가 있는 가장 최근 실행 결과를 기본값으로 사용합니다. | ||
| ## 빠른 시작 | ||
| Claude Code나 Codex에서 설정을 마치면 host-native 흐름은 아래와 같습니다. | ||
| ```text | ||
| orc consult "fix session loss on refresh" | ||
| orc crown fix/session-loss | ||
| ``` | ||
| 이 흐름은 처음 사용할 때 Oraculum을 자동 초기화하고, 실행이 끝나면 결과 요약을 바로 출력합니다. `crown`은 추천된 후보가 있는 가장 최근 실행 결과를 기본값으로 사용합니다. | ||
| Git 프로젝트에서는 `crown`이 브랜치를 만들고 선택된 후보를 그 브랜치에 적용합니다. Git이 아닌 프로젝트에서는 해당 작업 공간 내용을 프로젝트 폴더에 그대로 동기화합니다. | ||
| 가장 최근 실행 결과를 나중에 다시 열어보거나, 예전 실행을 조회하거나, 기록 보관함을 살펴보고 싶다면 [고급 사용법](https://github.com/Nhahan/oraculum/blob/main/docs/advanced-usage.md)을 참고하세요. | ||
| 가장 최근 실행 결과를 나중에 다시 열어보거나, 예전 실행을 조회하거나, 기록 보관함을 살펴보거나, setup/MCP/디버깅용 셸 명령이 필요하다면 [고급 사용법](https://github.com/Nhahan/oraculum/blob/main/docs/advanced-usage.md)을 참고하세요. | ||
@@ -80,2 +95,2 @@ ## 동작 방식 | ||
| 프로필 선택, 런타임 선택, 후보 수 조정, 특정 실행 조회, 보고서 묶음 포함, 레포지토리에 정의한 오라클 설정, 추천 후보 수동 지정 같은 제어가 필요하면 [고급 사용법](https://github.com/Nhahan/oraculum/blob/main/docs/advanced-usage.md)을 참고하세요. 빠른 시작용 기본값은 `.oraculum/config.json`에, 운영자용 제어는 `.oraculum/advanced.json`에 둡니다. | ||
| 프로필 선택, 런타임 선택, 실행 기록 조회, 레포지토리에 정의한 오라클 설정, setup 진단, MCP 연결 같은 제어가 필요하면 [고급 사용법](https://github.com/Nhahan/oraculum/blob/main/docs/advanced-usage.md)을 참고하세요. 빠른 시작용 기본값은 `.oraculum/config.json`에, 운영자용 제어는 `.oraculum/advanced.json`에 둡니다. |
+24
-9
@@ -23,3 +23,3 @@ <p align="right"> | ||
| <br /> | ||
| <sub>Oracle-guided patch consultation for Claude Code and Codex</sub> | ||
| <sub>Oracle-guided chat-native patch workflow for Claude Code and Codex</sub> | ||
| </p> | ||
@@ -41,4 +41,6 @@ | ||
| It turns patching into a repeatable local workflow: run competing candidates in isolation, judge them with repo-local oracles, keep verdicts and witnesses, and crown only the survivor. | ||
| The primary product surface is a shared in-chat command language across both hosts: `orc consult`, `orc verdict`, and `orc crown`. | ||
| Under that surface, Oraculum turns patching into a repeatable workflow: run competing candidates in isolation, judge them with repo-local oracles, keep verdicts and witnesses, and crown only the survivor. | ||
| ## Installation | ||
@@ -52,16 +54,29 @@ | ||
| ## Quick Start | ||
| Then register Oraculum with the host you use: | ||
| From the project folder: | ||
| ```bash | ||
| oraculum setup --runtime claude-code | ||
| oraculum setup --runtime codex | ||
| ``` | ||
| If you want to verify the wiring later: | ||
| ```bash | ||
| oraculum consult "fix session loss on refresh" | ||
| oraculum crown --branch fix/session-loss | ||
| oraculum setup status | ||
| ``` | ||
| That is the default flow. `consult` initializes Oraculum on first use, runs the tournament, and prints the verdict summary immediately. `crown` uses the latest consultation with a recommended survivor by default. | ||
| ## Quick Start | ||
| After setup in Claude Code or Codex: | ||
| ```text | ||
| orc consult "fix session loss on refresh" | ||
| orc crown fix/session-loss | ||
| ``` | ||
| That flow initializes Oraculum on first use, runs the tournament, and prints the verdict summary immediately. `crown` uses the latest consultation with a recommended survivor by default. | ||
| In a Git-backed project, `crown` creates the branch and applies the survivor there. In a non-Git project, it syncs the survivor back into the project folder. | ||
| If you want to reopen the latest consultation later, inspect an older one, or browse consultation history, see [Advanced Usage](https://github.com/Nhahan/oraculum/blob/main/docs/advanced-usage.md). | ||
| If you want to reopen the latest consultation later, inspect an older one, browse consultation history, or use setup/MCP/debug commands from the shell binary, see [Advanced Usage](https://github.com/Nhahan/oraculum/blob/main/docs/advanced-usage.md). | ||
@@ -80,2 +95,2 @@ ## How It Works | ||
| If you want more control over consultation-scoped profile selection, runtimes, candidate counts, specific consultation IDs, report packaging, repo-local oracle configuration, or manually overriding the recommended survivor, see [Advanced Usage](https://github.com/Nhahan/oraculum/blob/main/docs/advanced-usage.md). Quick-start defaults live in `.oraculum/config.json`; operator controls belong in `.oraculum/advanced.json`. | ||
| If you want more control over consultation-scoped profile selection, runtimes, consultation history, repo-local oracle configuration, setup diagnostics, or MCP wiring details, see [Advanced Usage](https://github.com/Nhahan/oraculum/blob/main/docs/advanced-usage.md). Quick-start defaults live in `.oraculum/config.json`; operator controls belong in `.oraculum/advanced.json`. |
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 2 instances
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
748423
44.33%170
47.83%11048
59.4%93
19.23%3
50%28
27.27%+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added