@jini-ai/agent-runtime 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README.md +43 -0
- package/dist/acp-model-probe.d.ts +48 -0
- package/dist/acp-model-probe.d.ts.map +1 -0
- package/dist/acp-model-probe.js +15 -0
- package/dist/acp-model-probe.js.map +1 -0
- package/dist/agent-protocol/acp/account-failure.d.ts +54 -0
- package/dist/agent-protocol/acp/account-failure.d.ts.map +1 -0
- package/dist/agent-protocol/acp/account-failure.js +37 -0
- package/dist/agent-protocol/acp/account-failure.js.map +1 -0
- package/dist/agent-protocol/acp/constants.d.ts +26 -0
- package/dist/agent-protocol/acp/constants.d.ts.map +1 -0
- package/dist/agent-protocol/acp/constants.js +39 -0
- package/dist/agent-protocol/acp/constants.js.map +1 -0
- package/dist/agent-protocol/acp/index.d.ts +14 -0
- package/dist/agent-protocol/acp/index.d.ts.map +1 -0
- package/dist/agent-protocol/acp/index.js +14 -0
- package/dist/agent-protocol/acp/index.js.map +1 -0
- package/dist/agent-protocol/acp/json.d.ts +82 -0
- package/dist/agent-protocol/acp/json.d.ts.map +1 -0
- package/dist/agent-protocol/acp/json.js +144 -0
- package/dist/agent-protocol/acp/json.js.map +1 -0
- package/dist/agent-protocol/acp/models.d.ts +112 -0
- package/dist/agent-protocol/acp/models.d.ts.map +1 -0
- package/dist/agent-protocol/acp/models.js +293 -0
- package/dist/agent-protocol/acp/models.js.map +1 -0
- package/dist/agent-protocol/acp/rpc.d.ts +107 -0
- package/dist/agent-protocol/acp/rpc.d.ts.map +1 -0
- package/dist/agent-protocol/acp/rpc.js +162 -0
- package/dist/agent-protocol/acp/rpc.js.map +1 -0
- package/dist/agent-protocol/acp/session-params.d.ts +55 -0
- package/dist/agent-protocol/acp/session-params.d.ts.map +1 -0
- package/dist/agent-protocol/acp/session-params.js +81 -0
- package/dist/agent-protocol/acp/session-params.js.map +1 -0
- package/dist/agent-protocol/acp/session.d.ts +101 -0
- package/dist/agent-protocol/acp/session.d.ts.map +1 -0
- package/dist/agent-protocol/acp/session.js +832 -0
- package/dist/agent-protocol/acp/session.js.map +1 -0
- package/dist/agent-protocol/acp/text-suppression.d.ts +73 -0
- package/dist/agent-protocol/acp/text-suppression.d.ts.map +1 -0
- package/dist/agent-protocol/acp/text-suppression.js +229 -0
- package/dist/agent-protocol/acp/text-suppression.js.map +1 -0
- package/dist/agent-protocol/acp/types.d.ts +27 -0
- package/dist/agent-protocol/acp/types.d.ts.map +1 -0
- package/dist/agent-protocol/acp/types.js +2 -0
- package/dist/agent-protocol/acp/types.js.map +1 -0
- package/dist/agent-protocol/acp/updates.d.ts +166 -0
- package/dist/agent-protocol/acp/updates.d.ts.map +1 -0
- package/dist/agent-protocol/acp/updates.js +268 -0
- package/dist/agent-protocol/acp/updates.js.map +1 -0
- package/dist/agent-protocol/core/index.d.ts +6 -0
- package/dist/agent-protocol/core/index.d.ts.map +1 -0
- package/dist/agent-protocol/core/index.js +6 -0
- package/dist/agent-protocol/core/index.js.map +1 -0
- package/dist/agent-protocol/core/json-line-stream.d.ts +42 -0
- package/dist/agent-protocol/core/json-line-stream.d.ts.map +1 -0
- package/dist/agent-protocol/core/json-line-stream.js +333 -0
- package/dist/agent-protocol/core/json-line-stream.js.map +1 -0
- package/dist/agent-protocol/index.d.ts +8 -0
- package/dist/agent-protocol/index.d.ts.map +1 -0
- package/dist/agent-protocol/index.js +8 -0
- package/dist/agent-protocol/index.js.map +1 -0
- package/dist/agent-protocol/pi-rpc/events.d.ts +26 -0
- package/dist/agent-protocol/pi-rpc/events.d.ts.map +1 -0
- package/dist/agent-protocol/pi-rpc/events.js +167 -0
- package/dist/agent-protocol/pi-rpc/events.js.map +1 -0
- package/dist/agent-protocol/pi-rpc/index.d.ts +11 -0
- package/dist/agent-protocol/pi-rpc/index.d.ts.map +1 -0
- package/dist/agent-protocol/pi-rpc/index.js +11 -0
- package/dist/agent-protocol/pi-rpc/index.js.map +1 -0
- package/dist/agent-protocol/pi-rpc/internal.d.ts +45 -0
- package/dist/agent-protocol/pi-rpc/internal.d.ts.map +1 -0
- package/dist/agent-protocol/pi-rpc/internal.js +41 -0
- package/dist/agent-protocol/pi-rpc/internal.js.map +1 -0
- package/dist/agent-protocol/pi-rpc/models.d.ts +21 -0
- package/dist/agent-protocol/pi-rpc/models.d.ts.map +1 -0
- package/dist/agent-protocol/pi-rpc/models.js +48 -0
- package/dist/agent-protocol/pi-rpc/models.js.map +1 -0
- package/dist/agent-protocol/pi-rpc/session.d.ts +106 -0
- package/dist/agent-protocol/pi-rpc/session.d.ts.map +1 -0
- package/dist/agent-protocol/pi-rpc/session.js +371 -0
- package/dist/agent-protocol/pi-rpc/session.js.map +1 -0
- package/dist/amr-model-cache.d.ts +40 -0
- package/dist/amr-model-cache.d.ts.map +1 -0
- package/dist/amr-model-cache.js +79 -0
- package/dist/amr-model-cache.js.map +1 -0
- package/dist/amr-profile-resolver.d.ts +21 -0
- package/dist/amr-profile-resolver.d.ts.map +1 -0
- package/dist/amr-profile-resolver.js +4 -0
- package/dist/amr-profile-resolver.js.map +1 -0
- package/dist/artifact-taxonomy.d.ts +27 -0
- package/dist/artifact-taxonomy.d.ts.map +1 -0
- package/dist/artifact-taxonomy.js +5 -0
- package/dist/artifact-taxonomy.js.map +1 -0
- package/dist/auth.d.ts +25 -0
- package/dist/auth.d.ts.map +1 -0
- package/dist/auth.js +332 -0
- package/dist/auth.js.map +1 -0
- package/dist/capabilities.d.ts +9 -0
- package/dist/capabilities.d.ts.map +1 -0
- package/dist/capabilities.js +2 -0
- package/dist/capabilities.js.map +1 -0
- package/dist/claude-stream.d.ts +37 -0
- package/dist/claude-stream.d.ts.map +1 -0
- package/dist/claude-stream.js +660 -0
- package/dist/claude-stream.js.map +1 -0
- package/dist/copilot-stream.d.ts +37 -0
- package/dist/copilot-stream.d.ts.map +1 -0
- package/dist/copilot-stream.js +136 -0
- package/dist/copilot-stream.js.map +1 -0
- package/dist/defs/aider.d.ts +13 -0
- package/dist/defs/aider.d.ts.map +1 -0
- package/dist/defs/aider.js +63 -0
- package/dist/defs/aider.js.map +1 -0
- package/dist/defs/amp.d.ts +12 -0
- package/dist/defs/amp.d.ts.map +1 -0
- package/dist/defs/amp.js +56 -0
- package/dist/defs/amp.js.map +1 -0
- package/dist/defs/amr.d.ts +37 -0
- package/dist/defs/amr.d.ts.map +1 -0
- package/dist/defs/amr.js +303 -0
- package/dist/defs/amr.js.map +1 -0
- package/dist/defs/antigravity.d.ts +25 -0
- package/dist/defs/antigravity.d.ts.map +1 -0
- package/dist/defs/antigravity.js +213 -0
- package/dist/defs/antigravity.js.map +1 -0
- package/dist/defs/claude.d.ts +30 -0
- package/dist/defs/claude.d.ts.map +1 -0
- package/dist/defs/claude.js +130 -0
- package/dist/defs/claude.js.map +1 -0
- package/dist/defs/codebuddy.d.ts +26 -0
- package/dist/defs/codebuddy.d.ts.map +1 -0
- package/dist/defs/codebuddy.js +124 -0
- package/dist/defs/codebuddy.js.map +1 -0
- package/dist/defs/codex.d.ts +30 -0
- package/dist/defs/codex.d.ts.map +1 -0
- package/dist/defs/codex.js +196 -0
- package/dist/defs/codex.js.map +1 -0
- package/dist/defs/copilot.d.ts +12 -0
- package/dist/defs/copilot.d.ts.map +1 -0
- package/dist/defs/copilot.js +88 -0
- package/dist/defs/copilot.js.map +1 -0
- package/dist/defs/cursor-agent.d.ts +27 -0
- package/dist/defs/cursor-agent.d.ts.map +1 -0
- package/dist/defs/cursor-agent.js +93 -0
- package/dist/defs/cursor-agent.js.map +1 -0
- package/dist/defs/deepseek.d.ts +12 -0
- package/dist/defs/deepseek.d.ts.map +1 -0
- package/dist/defs/deepseek.js +53 -0
- package/dist/defs/deepseek.js.map +1 -0
- package/dist/defs/devin.d.ts +12 -0
- package/dist/defs/devin.d.ts.map +1 -0
- package/dist/defs/devin.js +45 -0
- package/dist/defs/devin.js.map +1 -0
- package/dist/defs/grok-build.d.ts +26 -0
- package/dist/defs/grok-build.d.ts.map +1 -0
- package/dist/defs/grok-build.js +105 -0
- package/dist/defs/grok-build.js.map +1 -0
- package/dist/defs/hermes.d.ts +13 -0
- package/dist/defs/hermes.d.ts.map +1 -0
- package/dist/defs/hermes.js +51 -0
- package/dist/defs/hermes.js.map +1 -0
- package/dist/defs/index.d.ts +33 -0
- package/dist/defs/index.d.ts.map +1 -0
- package/dist/defs/index.js +33 -0
- package/dist/defs/index.js.map +1 -0
- package/dist/defs/kilo.d.ts +12 -0
- package/dist/defs/kilo.d.ts.map +1 -0
- package/dist/defs/kilo.js +20 -0
- package/dist/defs/kilo.js.map +1 -0
- package/dist/defs/kimi.d.ts +13 -0
- package/dist/defs/kimi.d.ts.map +1 -0
- package/dist/defs/kimi.js +26 -0
- package/dist/defs/kimi.js.map +1 -0
- package/dist/defs/kiro.d.ts +12 -0
- package/dist/defs/kiro.d.ts.map +1 -0
- package/dist/defs/kiro.js +20 -0
- package/dist/defs/kiro.js.map +1 -0
- package/dist/defs/mimo.d.ts +13 -0
- package/dist/defs/mimo.d.ts.map +1 -0
- package/dist/defs/mimo.js +26 -0
- package/dist/defs/mimo.js.map +1 -0
- package/dist/defs/opencode.d.ts +27 -0
- package/dist/defs/opencode.d.ts.map +1 -0
- package/dist/defs/opencode.js +89 -0
- package/dist/defs/opencode.js.map +1 -0
- package/dist/defs/pi.d.ts +18 -0
- package/dist/defs/pi.d.ts.map +1 -0
- package/dist/defs/pi.js +94 -0
- package/dist/defs/pi.js.map +1 -0
- package/dist/defs/qoder.d.ts +11 -0
- package/dist/defs/qoder.d.ts.map +1 -0
- package/dist/defs/qoder.js +50 -0
- package/dist/defs/qoder.js.map +1 -0
- package/dist/defs/qwen.d.ts +11 -0
- package/dist/defs/qwen.d.ts.map +1 -0
- package/dist/defs/qwen.js +28 -0
- package/dist/defs/qwen.js.map +1 -0
- package/dist/defs/reasonix.d.ts +20 -0
- package/dist/defs/reasonix.d.ts.map +1 -0
- package/dist/defs/reasonix.js +60 -0
- package/dist/defs/reasonix.js.map +1 -0
- package/dist/defs/shared.d.ts +23 -0
- package/dist/defs/shared.d.ts.map +1 -0
- package/dist/defs/shared.js +58 -0
- package/dist/defs/shared.js.map +1 -0
- package/dist/defs/trae-cli.d.ts +14 -0
- package/dist/defs/trae-cli.d.ts.map +1 -0
- package/dist/defs/trae-cli.js +22 -0
- package/dist/defs/trae-cli.js.map +1 -0
- package/dist/defs/vibe.d.ts +12 -0
- package/dist/defs/vibe.d.ts.map +1 -0
- package/dist/defs/vibe.js +20 -0
- package/dist/defs/vibe.js.map +1 -0
- package/dist/detection.d.ts +14 -0
- package/dist/detection.d.ts.map +1 -0
- package/dist/detection.js +266 -0
- package/dist/detection.js.map +1 -0
- package/dist/diagnostics.d.ts +8 -0
- package/dist/diagnostics.d.ts.map +1 -0
- package/dist/diagnostics.js +95 -0
- package/dist/diagnostics.js.map +1 -0
- package/dist/env.d.ts +19 -0
- package/dist/env.d.ts.map +1 -0
- package/dist/env.js +95 -0
- package/dist/env.js.map +1 -0
- package/dist/executables.d.ts +24 -0
- package/dist/executables.d.ts.map +1 -0
- package/dist/executables.js +349 -0
- package/dist/executables.js.map +1 -0
- package/dist/index.d.ts +74 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +102 -0
- package/dist/index.js.map +1 -0
- package/dist/invocation.d.ts +6 -0
- package/dist/invocation.d.ts.map +1 -0
- package/dist/invocation.js +47 -0
- package/dist/invocation.js.map +1 -0
- package/dist/json-event-stream.d.ts +9 -0
- package/dist/json-event-stream.d.ts.map +1 -0
- package/dist/json-event-stream.js +856 -0
- package/dist/json-event-stream.js.map +1 -0
- package/dist/launch.d.ts +12 -0
- package/dist/launch.d.ts.map +1 -0
- package/dist/launch.js +221 -0
- package/dist/launch.js.map +1 -0
- package/dist/mcp.d.ts +44 -0
- package/dist/mcp.d.ts.map +1 -0
- package/dist/mcp.js +12 -0
- package/dist/mcp.js.map +1 -0
- package/dist/metadata.d.ts +24 -0
- package/dist/metadata.d.ts.map +1 -0
- package/dist/metadata.js +100 -0
- package/dist/metadata.js.map +1 -0
- package/dist/mmd-routes.d.ts +12 -0
- package/dist/mmd-routes.d.ts.map +1 -0
- package/dist/mmd-routes.js +146 -0
- package/dist/mmd-routes.js.map +1 -0
- package/dist/model-registry.d.ts +120 -0
- package/dist/model-registry.d.ts.map +1 -0
- package/dist/model-registry.js +77 -0
- package/dist/model-registry.js.map +1 -0
- package/dist/models.d.ts +16 -0
- package/dist/models.d.ts.map +1 -0
- package/dist/models.js +93 -0
- package/dist/models.js.map +1 -0
- package/dist/opencode-log.d.ts +16 -0
- package/dist/opencode-log.d.ts.map +1 -0
- package/dist/opencode-log.js +163 -0
- package/dist/opencode-log.js.map +1 -0
- package/dist/paths.d.ts +3 -0
- package/dist/paths.d.ts.map +1 -0
- package/dist/paths.js +29 -0
- package/dist/paths.js.map +1 -0
- package/dist/pi-models.d.ts +13 -0
- package/dist/pi-models.d.ts.map +1 -0
- package/dist/pi-models.js +36 -0
- package/dist/pi-models.js.map +1 -0
- package/dist/prompt-augmenter.d.ts +60 -0
- package/dist/prompt-augmenter.d.ts.map +1 -0
- package/dist/prompt-augmenter.js +26 -0
- package/dist/prompt-augmenter.js.map +1 -0
- package/dist/prompt-budget.d.ts +20 -0
- package/dist/prompt-budget.d.ts.map +1 -0
- package/dist/prompt-budget.js +226 -0
- package/dist/prompt-budget.js.map +1 -0
- package/dist/prompt-file.d.ts +7 -0
- package/dist/prompt-file.d.ts.map +1 -0
- package/dist/prompt-file.js +27 -0
- package/dist/prompt-file.js.map +1 -0
- package/dist/providers/aihubmix.d.ts +99 -0
- package/dist/providers/aihubmix.d.ts.map +1 -0
- package/dist/providers/aihubmix.js +239 -0
- package/dist/providers/aihubmix.js.map +1 -0
- package/dist/providers/anthropic-messages.d.ts +116 -0
- package/dist/providers/anthropic-messages.d.ts.map +1 -0
- package/dist/providers/anthropic-messages.js +313 -0
- package/dist/providers/anthropic-messages.js.map +1 -0
- package/dist/providers/azure-chat.d.ts +99 -0
- package/dist/providers/azure-chat.d.ts.map +1 -0
- package/dist/providers/azure-chat.js +164 -0
- package/dist/providers/azure-chat.js.map +1 -0
- package/dist/providers/connection-guard.d.ts +67 -0
- package/dist/providers/connection-guard.d.ts.map +1 -0
- package/dist/providers/connection-guard.js +211 -0
- package/dist/providers/connection-guard.js.map +1 -0
- package/dist/providers/elevenlabs.d.ts +28 -0
- package/dist/providers/elevenlabs.d.ts.map +1 -0
- package/dist/providers/elevenlabs.js +138 -0
- package/dist/providers/elevenlabs.js.map +1 -0
- package/dist/providers/google-messages.d.ts +108 -0
- package/dist/providers/google-messages.d.ts.map +1 -0
- package/dist/providers/google-messages.js +284 -0
- package/dist/providers/google-messages.js.map +1 -0
- package/dist/providers/google.d.ts +20 -0
- package/dist/providers/google.d.ts.map +1 -0
- package/dist/providers/google.js +42 -0
- package/dist/providers/google.js.map +1 -0
- package/dist/providers/index.d.ts +39 -0
- package/dist/providers/index.d.ts.map +1 -0
- package/dist/providers/index.js +39 -0
- package/dist/providers/index.js.map +1 -0
- package/dist/providers/model-catalog.d.ts +32 -0
- package/dist/providers/model-catalog.d.ts.map +1 -0
- package/dist/providers/model-catalog.js +394 -0
- package/dist/providers/model-catalog.js.map +1 -0
- package/dist/providers/oauth-callback-server.d.ts +35 -0
- package/dist/providers/oauth-callback-server.d.ts.map +1 -0
- package/dist/providers/oauth-callback-server.js +217 -0
- package/dist/providers/oauth-callback-server.js.map +1 -0
- package/dist/providers/oauth-credentials.d.ts +29 -0
- package/dist/providers/oauth-credentials.d.ts.map +1 -0
- package/dist/providers/oauth-credentials.js +70 -0
- package/dist/providers/oauth-credentials.js.map +1 -0
- package/dist/providers/oauth-provider.d.ts +95 -0
- package/dist/providers/oauth-provider.d.ts.map +1 -0
- package/dist/providers/oauth-provider.js +130 -0
- package/dist/providers/oauth-provider.js.map +1 -0
- package/dist/providers/oauth-tokens.d.ts +35 -0
- package/dist/providers/oauth-tokens.d.ts.map +1 -0
- package/dist/providers/oauth-tokens.js +136 -0
- package/dist/providers/oauth-tokens.js.map +1 -0
- package/dist/providers/ollama-chat.d.ts +106 -0
- package/dist/providers/ollama-chat.d.ts.map +1 -0
- package/dist/providers/ollama-chat.js +292 -0
- package/dist/providers/ollama-chat.js.map +1 -0
- package/dist/providers/openai-chat.d.ts +147 -0
- package/dist/providers/openai-chat.d.ts.map +1 -0
- package/dist/providers/openai-chat.js +302 -0
- package/dist/providers/openai-chat.js.map +1 -0
- package/dist/providers/pkce.d.ts +81 -0
- package/dist/providers/pkce.d.ts.map +1 -0
- package/dist/providers/pkce.js +176 -0
- package/dist/providers/pkce.js.map +1 -0
- package/dist/providers/sse-decode.d.ts +47 -0
- package/dist/providers/sse-decode.d.ts.map +1 -0
- package/dist/providers/sse-decode.js +109 -0
- package/dist/providers/sse-decode.js.map +1 -0
- package/dist/providers/token-params.d.ts +29 -0
- package/dist/providers/token-params.d.ts.map +1 -0
- package/dist/providers/token-params.js +41 -0
- package/dist/providers/token-params.js.map +1 -0
- package/dist/providers/turn-end-guard.d.ts +37 -0
- package/dist/providers/turn-end-guard.d.ts.map +1 -0
- package/dist/providers/turn-end-guard.js +42 -0
- package/dist/providers/turn-end-guard.js.map +1 -0
- package/dist/providers/types.d.ts +36 -0
- package/dist/providers/types.d.ts.map +1 -0
- package/dist/providers/types.js +13 -0
- package/dist/providers/types.js.map +1 -0
- package/dist/qoder-stream.d.ts +19 -0
- package/dist/qoder-stream.d.ts.map +1 -0
- package/dist/qoder-stream.js +167 -0
- package/dist/qoder-stream.js.map +1 -0
- package/dist/registry.d.ts +5 -0
- package/dist/registry.d.ts.map +1 -0
- package/dist/registry.js +58 -0
- package/dist/registry.js.map +1 -0
- package/dist/resolution.d.ts +2 -0
- package/dist/resolution.d.ts.map +1 -0
- package/dist/resolution.js +19 -0
- package/dist/resolution.js.map +1 -0
- package/dist/role-marker-guard.d.ts +53 -0
- package/dist/role-marker-guard.d.ts.map +1 -0
- package/dist/role-marker-guard.js +280 -0
- package/dist/role-marker-guard.js.map +1 -0
- package/dist/telemetry-sink.d.ts +35 -0
- package/dist/telemetry-sink.d.ts.map +1 -0
- package/dist/telemetry-sink.js +5 -0
- package/dist/telemetry-sink.js.map +1 -0
- package/dist/terminal-launch.d.ts +11 -0
- package/dist/terminal-launch.d.ts.map +1 -0
- package/dist/terminal-launch.js +123 -0
- package/dist/terminal-launch.js.map +1 -0
- package/dist/types.d.ts +185 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/package.json +47 -0
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Ported from OD's `apps/daemon/src/runtimes/defs/copilot.ts` with two
|
|
3
|
+
* de-branding edits to comments (no behavior change): a product-named
|
|
4
|
+
* prompt-size example reworded to generic phrasing, and a
|
|
5
|
+
* product-prefixed operator-override env var name replaced with generic
|
|
6
|
+
* phrasing (this package's `types.ts` already documents
|
|
7
|
+
* `inactivityTimeoutMs` as "callers may still allow an operator override
|
|
8
|
+
* via their own env var"). See `source-map.md` for the exact original
|
|
9
|
+
* wording.
|
|
10
|
+
*/
|
|
11
|
+
import { DEFAULT_MODEL_OPTION } from './shared.js';
|
|
12
|
+
export const copilotAgentDef = {
|
|
13
|
+
id: 'copilot',
|
|
14
|
+
name: 'GitHub Copilot CLI',
|
|
15
|
+
bin: 'copilot',
|
|
16
|
+
versionArgs: ['--version'],
|
|
17
|
+
// Prompt is delivered via stdin (gated by `promptViaStdin: true`
|
|
18
|
+
// below) to avoid Windows `spawn ENAMETOOLONG` (issue #705):
|
|
19
|
+
// `copilot -p <body>` ships the full composed prompt as a single
|
|
20
|
+
// argv entry, and CreateProcess caps `lpCommandLine` at ~32 KB
|
|
21
|
+
// direct or ~8 KB through a `.cmd` shim. Any non-trivial composed
|
|
22
|
+
// prompt blows past that — even a "Hi" expands to several thousand
|
|
23
|
+
// chars after selected context is composed in.
|
|
24
|
+
//
|
|
25
|
+
// The transport is "omit `-p` entirely, pipe the prompt to stdin"
|
|
26
|
+
// per upstream copilot-cli issue #1046 (closed as already supported,
|
|
27
|
+
// confirmed working on Copilot CLI for `echo "..." | copilot
|
|
28
|
+
// --model <id>` and `cat prompt.txt | copilot --model <id>`). The
|
|
29
|
+
// earlier `-p -` attempt (PR #351) and the argv-bound revert
|
|
30
|
+
// (PR #466) both pre-dated that confirmation: `-p -` made Copilot
|
|
31
|
+
// interpret `-` as a literal one-character prompt, but omitting
|
|
32
|
+
// `-p` entirely is a separate code path that does delegate to
|
|
33
|
+
// stdin under a non-TTY pipe — which is exactly how the daemon
|
|
34
|
+
// spawns the child (`stdio: ['pipe', 'pipe', 'pipe']`).
|
|
35
|
+
//
|
|
36
|
+
// `--allow-all-tools` is still required for non-interactive runs:
|
|
37
|
+
// without it the CLI blocks waiting for human approval on every
|
|
38
|
+
// tool call. Unlike Codex (where `exec` is a dedicated headless
|
|
39
|
+
// subcommand with auto-approve baked in) or Claude Code (which
|
|
40
|
+
// inherits its permission policy from the user's settings.json),
|
|
41
|
+
// Copilot always prompts unless this flag is passed explicitly.
|
|
42
|
+
//
|
|
43
|
+
// `--output-format json` produces JSONL that copilot-stream.js
|
|
44
|
+
// parses into the same typed events as claude-stream.js.
|
|
45
|
+
//
|
|
46
|
+
// `--add-dir` (repeatable, same flag as Claude Code's) widens
|
|
47
|
+
// Copilot's path-level sandbox to skill seeds + design-system
|
|
48
|
+
// specs outside the project cwd.
|
|
49
|
+
//
|
|
50
|
+
// No `models` subcommand; the CLI accepts whatever the user's
|
|
51
|
+
// Copilot subscription exposes. Ship a small evidence-based hint
|
|
52
|
+
// list — the default we observed in the JSON stream and the
|
|
53
|
+
// example from `copilot --help`. Users can paste any other id via
|
|
54
|
+
// Settings.
|
|
55
|
+
fallbackModels: [
|
|
56
|
+
DEFAULT_MODEL_OPTION,
|
|
57
|
+
{ id: 'claude-sonnet-4.6', label: 'Claude Sonnet 4.6' },
|
|
58
|
+
{ id: 'gpt-5.2', label: 'GPT-5.2' },
|
|
59
|
+
],
|
|
60
|
+
buildArgs: (_prompt, _imagePaths, extraAllowedDirs = [], options = {}) => {
|
|
61
|
+
const args = [
|
|
62
|
+
'--allow-all-tools',
|
|
63
|
+
'--output-format',
|
|
64
|
+
'json',
|
|
65
|
+
];
|
|
66
|
+
if (options.model && options.model !== 'default') {
|
|
67
|
+
args.push('--model', options.model);
|
|
68
|
+
}
|
|
69
|
+
const dirs = (extraAllowedDirs || []).filter((d) => typeof d === 'string' && d.length > 0);
|
|
70
|
+
for (const d of dirs)
|
|
71
|
+
args.push('--add-dir', d);
|
|
72
|
+
return args;
|
|
73
|
+
},
|
|
74
|
+
promptViaStdin: true,
|
|
75
|
+
streamFormat: 'copilot-stream-json',
|
|
76
|
+
// GitHub Copilot's deck-generation and large-prompt turns go silent
|
|
77
|
+
// (no stdout, no streamed events) for stretches that exceed the
|
|
78
|
+
// 10-minute global default — the model is still working but the
|
|
79
|
+
// CLI does not emit keepalive frames. The default watchdog used to
|
|
80
|
+
// kill those runs as `stalled` even though the agent was healthy
|
|
81
|
+
// (issue #2467: "GitHub Copilot agent getting stuck after 10 mins
|
|
82
|
+
// and few seconds"). 30 minutes gives the heavy turns room to land
|
|
83
|
+
// while still bounding genuine hangs; a host can still allow an
|
|
84
|
+
// operator to override this via its own env var if it wants it
|
|
85
|
+
// tighter.
|
|
86
|
+
inactivityTimeoutMs: 30 * 60 * 1000,
|
|
87
|
+
};
|
|
88
|
+
//# sourceMappingURL=copilot.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"copilot.js","sourceRoot":"","sources":["../../src/defs/copilot.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAGnD,MAAM,CAAC,MAAM,eAAe,GAAG;IAC3B,EAAE,EAAE,SAAS;IACb,IAAI,EAAE,oBAAoB;IAC1B,GAAG,EAAE,SAAS;IACd,WAAW,EAAE,CAAC,WAAW,CAAC;IAC1B,i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M,CAAC,IAAI,IAAI;YAAE,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC;QAChD,OAAO,IAAI,CAAC;IACd,CAAC;IACD,cAAc,EAAE,IAAI;IACpB,YAAY,EAAE,qBAAqB;IACnC,oEAAoE;IACpE,gEAAgE;IAChE,gEAAgE;IAChE,mEAAmE;IACnE,iEAAiE;IACjE,kEAAkE;IAClE,mEAAmE;IACnE,gEAAgE;IAChE,+DAA+D;IAC/D,WAAW;IACX,mBAAmB,EAAE,EAAE,GAAG,EAAE,GAAG,IAAI;CACZ,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { RuntimeModelOption } from '../types.js';
|
|
2
|
+
export declare function parseCursorAgentModels(stdout: string): RuntimeModelOption[] | null;
|
|
3
|
+
export declare const cursorAgentDef: {
|
|
4
|
+
id: string;
|
|
5
|
+
name: string;
|
|
6
|
+
bin: string;
|
|
7
|
+
versionArgs: string[];
|
|
8
|
+
helpArgs: string[];
|
|
9
|
+
capabilityFlags: {
|
|
10
|
+
'--trust': string;
|
|
11
|
+
};
|
|
12
|
+
listModels: {
|
|
13
|
+
args: string[];
|
|
14
|
+
timeoutMs: number;
|
|
15
|
+
parse: (stdout: string) => RuntimeModelOption[] | null;
|
|
16
|
+
};
|
|
17
|
+
fallbackModels: RuntimeModelOption[];
|
|
18
|
+
buildArgs: (_prompt: string, _imagePaths: string[], _extra: string[] | undefined, options?: import("../types.js").RuntimeBuildOptions | undefined, runtimeContext?: import("../types.js").RuntimeContext | undefined) => string[];
|
|
19
|
+
promptViaStdin: true;
|
|
20
|
+
streamFormat: string;
|
|
21
|
+
eventParser: string;
|
|
22
|
+
authProbe: {
|
|
23
|
+
args: string[];
|
|
24
|
+
timeoutMs: number;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=cursor-agent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cursor-agent.d.ts","sourceRoot":"","sources":["../../src/defs/cursor-agent.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAEtD,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,MAAM,GAAG,kBAAkB,EAAE,GAAG,IAAI,CAuBlF;AAED,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;CA2EA,CAAC"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/** Ported verbatim from OD's `apps/daemon/src/runtimes/defs/cursor-agent.ts` (import path adjusted only). See `source-map.md`. */
|
|
2
|
+
import { DEFAULT_MODEL_OPTION } from './shared.js';
|
|
3
|
+
import { agentCapabilities } from '../capabilities.js';
|
|
4
|
+
export function parseCursorAgentModels(stdout) {
|
|
5
|
+
const lines = String(stdout || '')
|
|
6
|
+
.split('\n')
|
|
7
|
+
.map((line) => line.trim())
|
|
8
|
+
.filter((line) => line.length > 0 && !line.startsWith('#'));
|
|
9
|
+
if (lines.length === 0)
|
|
10
|
+
return null;
|
|
11
|
+
const out = [DEFAULT_MODEL_OPTION];
|
|
12
|
+
const seen = new Set([DEFAULT_MODEL_OPTION.id]);
|
|
13
|
+
for (const line of lines) {
|
|
14
|
+
if (/^(available models|models)$/i.test(line))
|
|
15
|
+
continue;
|
|
16
|
+
const match = line.match(/^([A-Za-z0-9][A-Za-z0-9._/:@-]*)(?:\s+-\s+(.+))?$/);
|
|
17
|
+
if (!match)
|
|
18
|
+
continue;
|
|
19
|
+
const id = match[1];
|
|
20
|
+
if (!id || seen.has(id))
|
|
21
|
+
continue;
|
|
22
|
+
seen.add(id);
|
|
23
|
+
const label = match[2]?.trim() || id;
|
|
24
|
+
out.push({ id, label });
|
|
25
|
+
}
|
|
26
|
+
return out.length > 1 ? out : null;
|
|
27
|
+
}
|
|
28
|
+
export const cursorAgentDef = {
|
|
29
|
+
id: 'cursor-agent',
|
|
30
|
+
name: 'Cursor Agent',
|
|
31
|
+
bin: 'cursor-agent',
|
|
32
|
+
versionArgs: ['--version'],
|
|
33
|
+
helpArgs: ['--help'],
|
|
34
|
+
capabilityFlags: {
|
|
35
|
+
// Flag string -> capability key. After probing `--help`, detection sets
|
|
36
|
+
// `agentCapabilities['cursor-agent'][key] = true` for each substring it
|
|
37
|
+
// finds. `--trust` is only honored in `-p`/headless mode and only exists
|
|
38
|
+
// on newer cursor-agent builds; older installs reject it with
|
|
39
|
+
// "unknown option '--trust'" and exit 1, which kills Test and task
|
|
40
|
+
// execution (issue #4461). Gate on the probe like claude/codebuddy do.
|
|
41
|
+
'--trust': 'trust',
|
|
42
|
+
},
|
|
43
|
+
// `cursor-agent models` prints account-bound model ids per line. When
|
|
44
|
+
// the user isn't authed it prints "No models available for this
|
|
45
|
+
// account." — that's not a model list, so we detect it and fall back.
|
|
46
|
+
listModels: {
|
|
47
|
+
args: ['models'],
|
|
48
|
+
timeoutMs: 5000,
|
|
49
|
+
parse: (stdout) => {
|
|
50
|
+
const trimmed = String(stdout || '').trim();
|
|
51
|
+
if (!trimmed || /no models available/i.test(trimmed))
|
|
52
|
+
return null;
|
|
53
|
+
return parseCursorAgentModels(trimmed);
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
fallbackModels: [
|
|
57
|
+
DEFAULT_MODEL_OPTION,
|
|
58
|
+
{ id: 'auto', label: 'auto' },
|
|
59
|
+
{ id: 'sonnet-4', label: 'sonnet-4' },
|
|
60
|
+
{ id: 'sonnet-4-thinking', label: 'sonnet-4-thinking' },
|
|
61
|
+
{ id: 'gpt-5', label: 'gpt-5' },
|
|
62
|
+
],
|
|
63
|
+
// Cursor Agent does not use `-` as a "read prompt from stdin" sentinel.
|
|
64
|
+
// Passing it makes the CLI treat the dash as the literal user prompt,
|
|
65
|
+
// which then surfaces as "your message only contains '-'". Keep stdin
|
|
66
|
+
// piped for prompt delivery, but do not append a fake prompt arg.
|
|
67
|
+
buildArgs: (_prompt, _imagePaths, _extra, options = {}, runtimeContext = {}) => {
|
|
68
|
+
const caps = agentCapabilities.get('cursor-agent') || {};
|
|
69
|
+
const args = [];
|
|
70
|
+
args.push('--print', '--output-format', 'stream-json', '--stream-partial-output', '--force');
|
|
71
|
+
// `--trust` grants workspace trust in headless runs, but only newer
|
|
72
|
+
// cursor-agent builds accept it; older ones exit 1 with "unknown option"
|
|
73
|
+
// (issue #4461). Pass it only when the `--help` probe saw it.
|
|
74
|
+
if (caps.trust) {
|
|
75
|
+
args.push('--trust');
|
|
76
|
+
}
|
|
77
|
+
if (runtimeContext.cwd) {
|
|
78
|
+
args.push('--workspace', runtimeContext.cwd);
|
|
79
|
+
}
|
|
80
|
+
if (options.model && options.model !== 'default') {
|
|
81
|
+
args.push('--model', options.model);
|
|
82
|
+
}
|
|
83
|
+
return args;
|
|
84
|
+
},
|
|
85
|
+
promptViaStdin: true,
|
|
86
|
+
streamFormat: 'json-event-stream',
|
|
87
|
+
eventParser: 'cursor-agent',
|
|
88
|
+
// `cursor-agent status` is a cheap, side-effect-free auth check. Declaring
|
|
89
|
+
// it here is what makes detection surface an "auth required" badge for
|
|
90
|
+
// Cursor Agent (the generalized probe only runs for adapters that opt in).
|
|
91
|
+
authProbe: { args: ['status'], timeoutMs: 5000 },
|
|
92
|
+
};
|
|
93
|
+
//# sourceMappingURL=cursor-agent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cursor-agent.js","sourceRoot":"","sources":["../../src/defs/cursor-agent.ts"],"names":[],"mappings":"AAAA,kIAAkI;AAClI,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAIvD,MAAM,UAAU,sBAAsB,CAAC,MAAc;IACnD,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,IAAI,EAAE,CAAC;SAC/B,KAAK,CAAC,IAAI,CAAC;SACX,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,EAA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IAAI,CAAC,KAAK,EAAE,CAAC;YACf,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QACvB,CAAC;QACD,IAAI,cAAc,CAAC,GAAG,EAAE,CAAC;YACvB,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,cAAc,CAAC,GAAG,CAAC,CAAC;QAC/C,CAAC;QACD,IAAI,OAAO,CAAC,KAAK,IAAI,OAAO,CAAC,KAAK,KAAK,SAAS,EAAE,CAAC;YACjD,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;QACtC,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IACD,cAAc,EAAE,IAAI;IACpB,YAAY,EAAE,mBAAmB;IACjC,WAAW,EAAE,cAAc;IAC3B,2EAA2E;IAC3E,uEAAuE;IACvE,2EAA2E;IAC3E,SAAS,EAAE,EAAE,IAAI,EAAE,CAAC,QAAQ,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE;CACzB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare const deepseekAgentDef: {
|
|
2
|
+
id: string;
|
|
3
|
+
name: string;
|
|
4
|
+
bin: string;
|
|
5
|
+
fallbackBins: string[];
|
|
6
|
+
versionArgs: string[];
|
|
7
|
+
fallbackModels: import("../types.js").RuntimeModelOption[];
|
|
8
|
+
buildArgs: (prompt: string, _imagePaths: string[], _extra: string[] | undefined, options?: import("../types.js").RuntimeBuildOptions | undefined) => string[];
|
|
9
|
+
maxPromptArgBytes: number;
|
|
10
|
+
streamFormat: string;
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=deepseek.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deepseek.d.ts","sourceRoot":"","sources":["../../src/defs/deepseek.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,gBAAgB;;;;;;;;;;CAiDF,CAAC"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/** Ported verbatim from OD's `apps/daemon/src/runtimes/defs/deepseek.ts` (import path adjusted only). See `source-map.md`. */
|
|
2
|
+
import { DEFAULT_MODEL_OPTION } from './shared.js';
|
|
3
|
+
export const deepseekAgentDef = {
|
|
4
|
+
id: 'deepseek',
|
|
5
|
+
name: 'DeepSeek TUI',
|
|
6
|
+
// The `deepseek` dispatcher owns the `exec` / `--auto` subcommands and
|
|
7
|
+
// delegates to a sibling TUI runtime binary at exec time. Upstream also
|
|
8
|
+
// ships the same dispatcher as `codewhale` after the CodeWhale rename
|
|
9
|
+
// (issue #2983). The companion `deepseek-tui` / `codewhale-tui` runtime
|
|
10
|
+
// is not probed here — it does not accept the argv shape `buildArgs`
|
|
11
|
+
// produces (`exec --auto <prompt>`).
|
|
12
|
+
bin: 'deepseek',
|
|
13
|
+
fallbackBins: ['codewhale'],
|
|
14
|
+
versionArgs: ['--version'],
|
|
15
|
+
// No `models` subcommand that prints a clean id-per-line list; the
|
|
16
|
+
// canonical model ids for DeepSeek V4 are documented in the README,
|
|
17
|
+
// and the CLI accepts arbitrary provider/model strings via `--model`,
|
|
18
|
+
// so users can paste anything else through the custom-model input.
|
|
19
|
+
fallbackModels: [
|
|
20
|
+
DEFAULT_MODEL_OPTION,
|
|
21
|
+
{ id: 'deepseek-v4-pro', label: 'deepseek-v4-pro' },
|
|
22
|
+
{ id: 'deepseek-v4-flash', label: 'deepseek-v4-flash' },
|
|
23
|
+
],
|
|
24
|
+
// DeepSeek's exec mode requires the prompt as a positional argument
|
|
25
|
+
// (no `-` stdin sentinel; `prompt: String` is a required clap field).
|
|
26
|
+
// `--auto` enables agentic mode with auto-approval — the daemon runs
|
|
27
|
+
// every CLI without a TTY, so the interactive approval prompt would
|
|
28
|
+
// hang the run. Streaming is plain text on stdout (tool calls go to
|
|
29
|
+
// stderr); skipping `--json` keeps deltas streaming live instead of
|
|
30
|
+
// batched into one trailing summary object at end-of-turn.
|
|
31
|
+
buildArgs: (prompt, _imagePaths, _extra, options = {}) => {
|
|
32
|
+
const args = ['exec', '--auto'];
|
|
33
|
+
if (options.model && options.model !== 'default') {
|
|
34
|
+
args.push('--model', options.model);
|
|
35
|
+
}
|
|
36
|
+
args.push(prompt);
|
|
37
|
+
return args;
|
|
38
|
+
},
|
|
39
|
+
// Guard against prompts that would blow Windows' ~32 KB CreateProcess
|
|
40
|
+
// limit (or Linux MAX_ARG_STRLEN on extreme edges) before spawn. Every
|
|
41
|
+
// other argv-sensitive adapter sets `promptViaStdin: true` to dodge
|
|
42
|
+
// this; DeepSeek's CLI doesn't accept `-` as a stdin sentinel yet, so
|
|
43
|
+
// we have to ship the prompt as argv. The /api/chat spawn path checks
|
|
44
|
+
// this byte budget against the composed prompt and emits an actionable
|
|
45
|
+
// SSE error ("reduce skills/design-system context, or use an adapter
|
|
46
|
+
// with stdin support") instead of letting the spawn fail with a
|
|
47
|
+
// generic ENAMETOOLONG/E2BIG message. 30_000 bytes leaves ~2.7 KB of
|
|
48
|
+
// argv headroom under the Windows command-line limit for `exec
|
|
49
|
+
// --auto --model <id>` and any internal quoting.
|
|
50
|
+
maxPromptArgBytes: 30_000,
|
|
51
|
+
streamFormat: 'plain',
|
|
52
|
+
};
|
|
53
|
+
//# sourceMappingURL=deepseek.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deepseek.js","sourceRoot":"","sources":["../../src/defs/deepseek.ts"],"names":[],"mappings":"AAAA,8HAA8H;AAC9H,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAGnD,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC5B,EAAE,EAAE,UAAU;IACd,IAAI,EAAE,cAAc;IACpB,uEAAuE;IACvE,wEAAwE;IACxE,sEAAsE;IACtE,wEAAwE;IACxE,qEAAqE;IACrE,qCAAqC;IACrC,GAAG,EAAE,UAAU;IACf,YAAY,EAAE,CAAC,WAAW,CAAC;IAC3B,WAAW,EAAE,CAAC,WAAW,CAAC;IAC1B,mEAAmE;IACnE,oEAAoE;IACpE,sEAAsE;IACtE,mEAAmE;IACnE,cAAc,EAAE;QACd,oBAAoB;QACpB,EAAE,EAAE,EAAE,iBAAiB,EAAE,KAAK,EAAE,iBAAiB,EAAE;QACnD,EAAE,EAAE,EAAE,mBAAmB,EAAE,KAAK,EAAE,mBAAmB,EAAE;KACxD;IACD,oEAAoE;IACpE,sEAAsE;IACtE,qEAAqE;IACrE,oEAAoE;IACpE,oEAAoE;IACpE,oEAAoE;IACpE,2DAA2D;IAC3D,SAAS,EAAE,CAAC,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,OAAO,GAAG,EAAE,EAAE,EAAE;QACvD,MAAM,IAAI,GAAG,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;QAChC,IAAI,OAAO,CAAC,KAAK,IAAI,OAAO,CAAC,KAAK,KAAK,SAAS,EAAE,CAAC;YACjD,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;QACtC,CAAC;QACD,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAClB,OAAO,IAAI,CAAC;IACd,CAAC;IACD,sEAAsE;IACtE,uEAAuE;IACvE,oEAAoE;IACpE,sEAAsE;IACtE,sEAAsE;IACtE,uEAAuE;IACvE,qEAAqE;IACrE,gEAAgE;IAChE,qEAAqE;IACrE,+DAA+D;IAC/D,iDAAiD;IACjD,iBAAiB,EAAE,MAAM;IACzB,YAAY,EAAE,OAAO;CACE,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare const devinAgentDef: {
|
|
2
|
+
id: string;
|
|
3
|
+
name: string;
|
|
4
|
+
bin: string;
|
|
5
|
+
versionArgs: string[];
|
|
6
|
+
fetchModels: (resolvedBin: string, env: import("../types.js").RuntimeEnv) => Promise<import("../types.js").RuntimeModelOption[]>;
|
|
7
|
+
fallbackModels: import("../types.js").RuntimeModelOption[];
|
|
8
|
+
buildArgs: () => string[];
|
|
9
|
+
streamFormat: string;
|
|
10
|
+
externalMcpInjection: "acp-merge";
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=devin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"devin.d.ts","sourceRoot":"","sources":["../../src/defs/devin.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,aAAa;;;;;;;;;;CA0CC,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/** Ported verbatim from OD's `apps/daemon/src/runtimes/defs/devin.ts` (import path adjusted only). See `source-map.md`. */
|
|
2
|
+
import { detectAcpModels, DEFAULT_MODEL_OPTION } from './shared.js';
|
|
3
|
+
export const devinAgentDef = {
|
|
4
|
+
id: 'devin',
|
|
5
|
+
name: 'Devin for Terminal',
|
|
6
|
+
bin: 'devin',
|
|
7
|
+
versionArgs: ['--version'],
|
|
8
|
+
fetchModels: async (resolvedBin, env) => detectAcpModels({
|
|
9
|
+
bin: resolvedBin,
|
|
10
|
+
args: [
|
|
11
|
+
'--permission-mode',
|
|
12
|
+
'dangerous',
|
|
13
|
+
'--respect-workspace-trust',
|
|
14
|
+
'false',
|
|
15
|
+
'acp',
|
|
16
|
+
],
|
|
17
|
+
env,
|
|
18
|
+
timeoutMs: 15_000,
|
|
19
|
+
defaultModelOption: DEFAULT_MODEL_OPTION,
|
|
20
|
+
}),
|
|
21
|
+
// Fallback aliases from Devin for Terminal docs
|
|
22
|
+
// (https://cli.devin.ai/docs/models): `adaptive` appears in the config example;
|
|
23
|
+
// `opus`, `sonnet`, `swe`, `codex`, `gemini`, and `gpt` are documented
|
|
24
|
+
// as short model-family names / recommended picks.
|
|
25
|
+
fallbackModels: [
|
|
26
|
+
DEFAULT_MODEL_OPTION,
|
|
27
|
+
{ id: 'adaptive', label: 'adaptive' },
|
|
28
|
+
{ id: 'swe', label: 'swe' },
|
|
29
|
+
{ id: 'opus', label: 'opus' },
|
|
30
|
+
{ id: 'sonnet', label: 'sonnet' },
|
|
31
|
+
{ id: 'codex', label: 'codex' },
|
|
32
|
+
{ id: 'gpt', label: 'gpt' },
|
|
33
|
+
{ id: 'gemini', label: 'gemini' },
|
|
34
|
+
],
|
|
35
|
+
buildArgs: () => [
|
|
36
|
+
'--permission-mode',
|
|
37
|
+
'dangerous',
|
|
38
|
+
'--respect-workspace-trust',
|
|
39
|
+
'false',
|
|
40
|
+
'acp',
|
|
41
|
+
],
|
|
42
|
+
streamFormat: 'acp-json-rpc',
|
|
43
|
+
externalMcpInjection: 'acp-merge',
|
|
44
|
+
};
|
|
45
|
+
//# sourceMappingURL=devin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"devin.js","sourceRoot":"","sources":["../../src/defs/devin.ts"],"names":[],"mappings":"AAAA,2HAA2H;AAC3H,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAGpE,MAAM,CAAC,MAAM,aAAa,GAAG;IACzB,EAAE,EAAE,OAAO;IACX,IAAI,EAAE,oBAAoB;IAC1B,GAAG,EAAE,OAAO;IACZ,WAAW,EAAE,CAAC,WAAW,CAAC;IAC1B,WAAW,EAAE,KAAK,EAAE,WAAW,EAAE,GAAG,EAAE,EAAE,CACtC,eAAe,CAAC;QACd,GAAG,EAAE,WAAW;QAChB,IAAI,EAAE;YACJ,mBAAmB;YACnB,WAAW;YACX,2BAA2B;YAC3B,OAAO;YACP,KAAK;SACN;QACD,GAAG;QACH,SAAS,EAAE,MAAM;QACjB,kBAAkB,EAAE,oBAAoB;KACzC,CAAC;IACJ,gDAAgD;IAChD,gFAAgF;IAChF,uEAAuE;IACvE,mDAAmD;IACnD,cAAc,EAAE;QACd,oBAAoB;QACpB,EAAE,EAAE,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,EAAE;QACrC,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE;QAC3B,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE;QAC7B,EAAE,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE;QACjC,EAAE,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;QAC/B,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE;QAC3B,EAAE,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE;KAClC;IACD,SAAS,EAAE,GAAG,EAAE,CAAC;QACf,mBAAmB;QACnB,WAAW;QACX,2BAA2B;QAC3B,OAAO;QACP,KAAK;KACN;IACD,YAAY,EAAE,cAAc;IAC5B,oBAAoB,EAAE,WAAW;CACV,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { RuntimeModelOption } from '../types.js';
|
|
2
|
+
export declare function parseGrokBuildModels(stdout: string): RuntimeModelOption[];
|
|
3
|
+
export declare const grokBuildAgentDef: {
|
|
4
|
+
id: string;
|
|
5
|
+
name: string;
|
|
6
|
+
bin: string;
|
|
7
|
+
versionArgs: string[];
|
|
8
|
+
helpArgs: string[];
|
|
9
|
+
listModels: {
|
|
10
|
+
args: string[];
|
|
11
|
+
timeoutMs: number;
|
|
12
|
+
parse: typeof parseGrokBuildModels;
|
|
13
|
+
};
|
|
14
|
+
fallbackModels: RuntimeModelOption[];
|
|
15
|
+
buildArgs: (_prompt: string, _imagePaths: string[], _extra?: string[] | undefined, options?: import("../types.js").RuntimeBuildOptions | undefined, runtimeContext?: import("../types.js").RuntimeContext | undefined) => string[];
|
|
16
|
+
reasoningOptions: {
|
|
17
|
+
id: string;
|
|
18
|
+
label: string;
|
|
19
|
+
}[];
|
|
20
|
+
promptViaFile: true;
|
|
21
|
+
promptViaStdin: false;
|
|
22
|
+
streamFormat: string;
|
|
23
|
+
installUrl: string;
|
|
24
|
+
docsUrl: string;
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=grok-build.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"grok-build.d.ts","sourceRoot":"","sources":["../../src/defs/grok-build.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAKtD,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,GAAG,kBAAkB,EAAE,CAWzE;AA4BD,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;CAwDH,CAAC"}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Ported from OD's `apps/daemon/src/runtimes/defs/grok-build.ts` with
|
|
3
|
+
* several product-named comment mentions reworded to generic
|
|
4
|
+
* host-application phrasing (no behavior change; see `source-map.md` for
|
|
5
|
+
* the exact original wording).
|
|
6
|
+
*/
|
|
7
|
+
import { DEFAULT_MODEL_OPTION } from './shared.js';
|
|
8
|
+
const GROK_MODEL_ID_RE = /^\*?\s*-?\s*(grok-[a-z0-9][a-z0-9._-]*)(?:\s+\(default\))?\s*$/i;
|
|
9
|
+
export function parseGrokBuildModels(stdout) {
|
|
10
|
+
const seen = new Set();
|
|
11
|
+
const out = [DEFAULT_MODEL_OPTION];
|
|
12
|
+
for (const rawLine of String(stdout || '').split('\n')) {
|
|
13
|
+
const match = rawLine.trim().match(GROK_MODEL_ID_RE);
|
|
14
|
+
const id = match?.[1];
|
|
15
|
+
if (!id || seen.has(id))
|
|
16
|
+
continue;
|
|
17
|
+
seen.add(id);
|
|
18
|
+
out.push({ id, label: id });
|
|
19
|
+
}
|
|
20
|
+
return out;
|
|
21
|
+
}
|
|
22
|
+
function grokModelSupportsReasoningEffort(model) {
|
|
23
|
+
if (!model || model === DEFAULT_MODEL_OPTION.id || model === 'grok-build')
|
|
24
|
+
return false;
|
|
25
|
+
return /reasoning/i.test(model);
|
|
26
|
+
}
|
|
27
|
+
// xAI's first-party CLI agent — https://x.ai/cli — distributed as the
|
|
28
|
+
// `grok` binary. Installed via `curl -fsSL https://x.ai/cli/install.sh | bash`,
|
|
29
|
+
// which symlinks `~/.grok/bin/grok` into PATH.
|
|
30
|
+
//
|
|
31
|
+
// `grok` ships its own SuperGrok OAuth dance (the same `auth.x.ai` issuer +
|
|
32
|
+
// loopback-redirect shape a host's own xAI settings panel might use), so
|
|
33
|
+
// it's already authenticated by the time detection finds the binary; the
|
|
34
|
+
// host does not need to inject credentials. Users authenticate once with
|
|
35
|
+
// `grok login --oauth` and the resulting `~/.grok/auth.json` is what every
|
|
36
|
+
// spawned invocation reads.
|
|
37
|
+
//
|
|
38
|
+
// Headless mode uses `--prompt-file <PATH>` because recent Grok CLI builds
|
|
39
|
+
// require `-p/--single` to receive the prompt as an argv value and no longer
|
|
40
|
+
// read piped stdin. A host's composed prompts can exceed safe argv limits,
|
|
41
|
+
// so the caller stages the prompt in a temp file and passes that path here.
|
|
42
|
+
// The CLI also exposes `--output-format streaming-json`, but the
|
|
43
|
+
// streaming-json schema is xAI-specific and there is not yet a parser for
|
|
44
|
+
// it here. To ship the runtime now and let a chat UI at least talk to grok,
|
|
45
|
+
// this defaults to `plain` streamFormat (single-turn text reply, no
|
|
46
|
+
// tool_use streaming). Upgrading to a `grok-stream-json` event parser is
|
|
47
|
+
// follow-up work once the format is stable enough to lock in.
|
|
48
|
+
export const grokBuildAgentDef = {
|
|
49
|
+
id: 'grok-build',
|
|
50
|
+
name: 'Grok Build',
|
|
51
|
+
bin: 'grok',
|
|
52
|
+
versionArgs: ['--version'],
|
|
53
|
+
helpArgs: ['-p', '--help'],
|
|
54
|
+
// `grok models` prints status/header lines plus bullet-prefixed model ids.
|
|
55
|
+
// Keep only concrete `grok-*` ids so UI pickers don't show prose such as
|
|
56
|
+
// "You are logged in with grok.com" as selectable model names.
|
|
57
|
+
listModels: {
|
|
58
|
+
args: ['models'],
|
|
59
|
+
timeoutMs: 10_000,
|
|
60
|
+
parse: parseGrokBuildModels,
|
|
61
|
+
},
|
|
62
|
+
fallbackModels: [
|
|
63
|
+
DEFAULT_MODEL_OPTION,
|
|
64
|
+
{ id: 'grok-build', label: 'grok-build (xAI · default)' },
|
|
65
|
+
{ id: 'grok-4.3', label: 'grok-4.3 (xAI)' },
|
|
66
|
+
{ id: 'grok-4.20-reasoning', label: 'grok-4.20-reasoning (xAI · deep)' },
|
|
67
|
+
{
|
|
68
|
+
id: 'grok-4.20-non-reasoning',
|
|
69
|
+
label: 'grok-4.20-non-reasoning (xAI · fast)',
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
id: 'grok-4.20-multi-agent',
|
|
73
|
+
label: 'grok-4.20-multi-agent (xAI · orchestration)',
|
|
74
|
+
},
|
|
75
|
+
],
|
|
76
|
+
// Grok Build CLI v0.1.212+ enforces `-p, --single <PROMPT>` as
|
|
77
|
+
// value-required, while a host's composed prompts can exceed safe argv
|
|
78
|
+
// budgets. Use the CLI's explicit prompt-file transport instead.
|
|
79
|
+
buildArgs: (_prompt, _imagePaths, _extra = [], options = {}, runtimeContext = {}) => {
|
|
80
|
+
if (!runtimeContext.promptFilePath) {
|
|
81
|
+
throw new Error('grok-build requires runtimeContext.promptFilePath');
|
|
82
|
+
}
|
|
83
|
+
const args = ['--prompt-file', runtimeContext.promptFilePath];
|
|
84
|
+
if (options.model && options.model !== DEFAULT_MODEL_OPTION.id) {
|
|
85
|
+
args.push('--model', options.model);
|
|
86
|
+
}
|
|
87
|
+
if (options.reasoning && grokModelSupportsReasoningEffort(options.model)) {
|
|
88
|
+
args.push('--effort', options.reasoning);
|
|
89
|
+
}
|
|
90
|
+
return args;
|
|
91
|
+
},
|
|
92
|
+
reasoningOptions: [
|
|
93
|
+
{ id: 'low', label: 'low' },
|
|
94
|
+
{ id: 'medium', label: 'medium' },
|
|
95
|
+
{ id: 'high', label: 'high' },
|
|
96
|
+
{ id: 'xhigh', label: 'xhigh' },
|
|
97
|
+
{ id: 'max', label: 'max' },
|
|
98
|
+
],
|
|
99
|
+
promptViaFile: true,
|
|
100
|
+
promptViaStdin: false,
|
|
101
|
+
streamFormat: 'plain',
|
|
102
|
+
installUrl: 'https://x.ai/cli',
|
|
103
|
+
docsUrl: 'https://x.ai/cli',
|
|
104
|
+
};
|
|
105
|
+
//# sourceMappingURL=grok-build.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"grok-build.js","sourceRoot":"","sources":["../../src/defs/grok-build.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAInD,MAAM,gBAAgB,GAAG,iEAAiE,CAAC;AAE3F,MAAM,UAAU,oBAAoB,CAAC,MAAc;IACjD,MAAM,IAAI,GAAG,IAAI,GAAG,EAAU,CAAC;IAC/B,MAAM,GAAG,GAAyB,CAAC,oBAAoB,CAAC,CAAC;IACzD,KAAK,MAAM,OAAO,IAAI,MAAM,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC;QACvD,MAAM,KAAK,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC;QACrD,MAAM,EAAE,GAAG,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC;QACtB,IAAI,CAAC,EAAE,IAAI,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;YAAE,SAAS;QAClC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QACb,GAAG,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CAAC;IAC9B,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC;AAED,SAAS,gCAAgC,CAAC,KAAgC;IACxE,IAAI,CAAC,KAAK,IAAI,KAAK,KAAK,oBAAoB,CAAC,EAAE,IAAI,KAAK,KAAK,YAAY;QAAE,OAAO,KAAK,CAAC;IACxF,OAAO,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAClC,CAAC;AAED,sEAAsE;AACtE,gFAAgF;AAChF,+CAA+C;AAC/C,E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,CAAC;QACvE,CAAC;QACD,MAAM,IAAI,GAAG,CAAC,eAAe,EAAE,cAAc,CAAC,cAAc,CAAC,CAAC;QAC9D,IAAI,OAAO,CAAC,KAAK,IAAI,OAAO,CAAC,KAAK,KAAK,oBAAoB,CAAC,EAAE,EAAE,CAAC;YAC/D,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;QACtC,CAAC;QACD,IAAI,OAAO,CAAC,SAAS,IAAI,gCAAgC,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;YACzE,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC;QAC3C,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IACD,gBAAgB,EAAE;QAChB,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE;QAC3B,EAAE,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE;QACjC,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE;QAC7B,EAAE,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;QAC/B,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE;KAC5B;IACD,aAAa,EAAE,IAAI;IACnB,cAAc,EAAE,KAAK;IACrB,YAAY,EAAE,OAAO;IACrB,UAAU,EAAE,kBAAkB;IAC9B,OAAO,EAAE,kBAAkB;CACF,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare const hermesAgentDef: {
|
|
2
|
+
id: string;
|
|
3
|
+
name: string;
|
|
4
|
+
bin: string;
|
|
5
|
+
versionArgs: string[];
|
|
6
|
+
fetchModels: (resolvedBin: string, env: import("../types.js").RuntimeEnv) => Promise<import("../types.js").RuntimeModelOption[]>;
|
|
7
|
+
fallbackModels: import("../types.js").RuntimeModelOption[];
|
|
8
|
+
buildArgs: () => string[];
|
|
9
|
+
streamFormat: string;
|
|
10
|
+
mcpDiscovery: string;
|
|
11
|
+
externalMcpInjection: "acp-merge";
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=hermes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hermes.d.ts","sourceRoot":"","sources":["../../src/defs/hermes.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,cAAc;;;;;;;;;;;CAgDA,CAAC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/** Ported verbatim from OD's `apps/daemon/src/runtimes/defs/hermes.ts` (import path adjusted only). See `source-map.md`. */
|
|
2
|
+
import { detectAcpModels, DEFAULT_MODEL_OPTION } from './shared.js';
|
|
3
|
+
export const hermesAgentDef = {
|
|
4
|
+
id: 'hermes',
|
|
5
|
+
name: 'Hermes',
|
|
6
|
+
bin: 'hermes',
|
|
7
|
+
versionArgs: ['--version'],
|
|
8
|
+
fetchModels: async (resolvedBin, env) => detectAcpModels({
|
|
9
|
+
bin: resolvedBin,
|
|
10
|
+
args: ['acp', '--accept-hooks'],
|
|
11
|
+
env,
|
|
12
|
+
timeoutMs: 15_000,
|
|
13
|
+
defaultModelOption: DEFAULT_MODEL_OPTION,
|
|
14
|
+
}),
|
|
15
|
+
// Used only when `fetchModels` (which calls `hermes acp` to enumerate
|
|
16
|
+
// the user's actually-installed providers) fails — e.g. Hermes isn't on
|
|
17
|
+
// PATH yet. The list doubles as discovery hints in the model picker so a
|
|
18
|
+
// user who hasn't installed Hermes still sees what becomes available
|
|
19
|
+
// after `hermes auth add xai-oauth` (xAI · SuperGrok subscription) or
|
|
20
|
+
// `hermes auth add openai` (Codex). Reference: https://x.ai/news/grok-hermes.
|
|
21
|
+
fallbackModels: [
|
|
22
|
+
DEFAULT_MODEL_OPTION,
|
|
23
|
+
// xAI Grok — available via SuperGrok OAuth (`hermes auth add xai-oauth`)
|
|
24
|
+
// or XAI_API_KEY in `~/.hermes/.env`.
|
|
25
|
+
{ id: 'grok-4.3', label: 'grok-4.3 (xAI · default)' },
|
|
26
|
+
{
|
|
27
|
+
id: 'grok-4.20-reasoning',
|
|
28
|
+
label: 'grok-4.20-reasoning (xAI · deep)',
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
id: 'grok-4.20-0309-non-reasoning',
|
|
32
|
+
label: 'grok-4.20-non-reasoning (xAI · fast)',
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
id: 'grok-4.20-multi-agent-0309',
|
|
36
|
+
label: 'grok-4.20-multi-agent (xAI · orchestration)',
|
|
37
|
+
},
|
|
38
|
+
// OpenAI Codex.
|
|
39
|
+
{ id: 'openai-codex:gpt-5.5', label: 'gpt-5.5 (openai-codex:gpt-5.5)' },
|
|
40
|
+
{ id: 'openai-codex:gpt-5.4', label: 'gpt-5.4 (openai-codex:gpt-5.4)' },
|
|
41
|
+
{
|
|
42
|
+
id: 'openai-codex:gpt-5.4-mini',
|
|
43
|
+
label: 'gpt-5.4-mini (openai-codex:gpt-5.4-mini)',
|
|
44
|
+
},
|
|
45
|
+
],
|
|
46
|
+
buildArgs: () => ['acp', '--accept-hooks'],
|
|
47
|
+
streamFormat: 'acp-json-rpc',
|
|
48
|
+
mcpDiscovery: 'mature-acp',
|
|
49
|
+
externalMcpInjection: 'acp-merge',
|
|
50
|
+
};
|
|
51
|
+
//# sourceMappingURL=hermes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hermes.js","sourceRoot":"","sources":["../../src/defs/hermes.ts"],"names":[],"mappings":"AAAA,4HAA4H;AAC5H,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAGpE,MAAM,CAAC,MAAM,cAAc,GAAG;IAC1B,EAAE,EAAE,QAAQ;IACZ,IAAI,EAAE,QAAQ;IACd,GAAG,EAAE,QAAQ;IACb,WAAW,EAAE,CAAC,WAAW,CAAC;IAC1B,WAAW,EAAE,KAAK,EAAE,WAAW,EAAE,GAAG,EAAE,EAAE,CACtC,eAAe,CAAC;QACd,GAAG,EAAE,WAAW;QAChB,IAAI,EAAE,CAAC,KAAK,EAAE,gBAAgB,CAAC;QAC/B,GAAG;QACH,SAAS,EAAE,MAAM;QACjB,kBAAkB,EAAE,oBAAoB;KACzC,CAAC;IACJ,sEAAsE;IACtE,wEAAwE;IACxE,yEAAyE;IACzE,qEAAqE;IACrE,sEAAsE;IACtE,8EAA8E;IAC9E,cAAc,EAAE;QACd,oBAAoB;QACpB,yEAAyE;QACzE,sCAAsC;QACtC,EAAE,EAAE,EAAE,UAAU,EAAE,KAAK,EAAE,0BAA0B,EAAE;QACrD;YACE,EAAE,EAAE,qBAAqB;YACzB,KAAK,EAAE,kCAAkC;SAC1C;QACD;YACE,EAAE,EAAE,8BAA8B;YAClC,KAAK,EAAE,sCAAsC;SAC9C;QACD;YACE,EAAE,EAAE,4BAA4B;YAChC,KAAK,EAAE,6CAA6C;SACrD;QACD,gBAAgB;QAChB,EAAE,EAAE,EAAE,sBAAsB,EAAE,KAAK,EAAE,gCAAgC,EAAE;QACvE,EAAE,EAAE,EAAE,sBAAsB,EAAE,KAAK,EAAE,gCAAgC,EAAE;QACvE;YACE,EAAE,EAAE,2BAA2B;YAC/B,KAAK,EAAE,0CAA0C;SAClD;KACF;IACD,SAAS,EAAE,GAAG,EAAE,CAAC,CAAC,KAAK,EAAE,gBAAgB,CAAC;IAC1C,YAAY,EAAE,cAAc;IAC5B,YAAY,EAAE,YAAY;IAC1B,oBAAoB,EAAE,WAAW;CACV,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module defs/index
|
|
3
|
+
*
|
|
4
|
+
* Barrel for the declarative per-CLI `RuntimeAgentDef` catalog: one file
|
|
5
|
+
* per supported coding-agent CLI, plus AMR/Vela model-parsing helpers and
|
|
6
|
+
* Antigravity's model-lock file. Ported from OD's
|
|
7
|
+
* `apps/daemon/src/runtimes/defs/index.ts`.
|
|
8
|
+
*/
|
|
9
|
+
export * from './aider.js';
|
|
10
|
+
export * from './amp.js';
|
|
11
|
+
export * from './amr.js';
|
|
12
|
+
export * from './antigravity.js';
|
|
13
|
+
export * from './claude.js';
|
|
14
|
+
export * from './codebuddy.js';
|
|
15
|
+
export * from './codex.js';
|
|
16
|
+
export * from './copilot.js';
|
|
17
|
+
export * from './cursor-agent.js';
|
|
18
|
+
export * from './deepseek.js';
|
|
19
|
+
export * from './devin.js';
|
|
20
|
+
export * from './grok-build.js';
|
|
21
|
+
export * from './hermes.js';
|
|
22
|
+
export * from './kilo.js';
|
|
23
|
+
export * from './kimi.js';
|
|
24
|
+
export * from './kiro.js';
|
|
25
|
+
export * from './mimo.js';
|
|
26
|
+
export * from './opencode.js';
|
|
27
|
+
export * from './pi.js';
|
|
28
|
+
export * from './qoder.js';
|
|
29
|
+
export * from './qwen.js';
|
|
30
|
+
export * from './reasonix.js';
|
|
31
|
+
export * from './trae-cli.js';
|
|
32
|
+
export * from './vibe.js';
|
|
33
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/defs/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC"}
|