@jini-ai/agent-runtime 0.7.2 → 0.7.3-next.1
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/CHANGELOG.md +3 -13
- package/README.md +1 -0
- package/dist/acp-model-probe.d.ts +2 -3
- package/dist/acp-model-probe.js +1 -1
- package/dist/agent-protocol/acp/account-failure.d.ts +3 -1
- package/dist/agent-protocol/acp/account-failure.js +1 -1
- package/dist/agent-protocol/acp/constants.d.ts +3 -1
- package/dist/agent-protocol/acp/constants.js +2 -0
- package/dist/agent-protocol/acp/index.d.ts +2 -1
- package/dist/agent-protocol/acp/index.js +2 -1
- package/dist/agent-protocol/acp/json.d.ts +26 -7
- package/dist/agent-protocol/acp/json.js +11 -11
- package/dist/agent-protocol/acp/models.d.ts +26 -6
- package/dist/agent-protocol/acp/models.js +157 -129
- package/dist/agent-protocol/acp/rpc.d.ts +37 -9
- package/dist/agent-protocol/acp/rpc.js +19 -16
- package/dist/agent-protocol/acp/session-params.d.ts +4 -1
- package/dist/agent-protocol/acp/session-params.js +1 -1
- package/dist/agent-protocol/acp/session-permission.d.ts +13 -0
- package/dist/agent-protocol/acp/session-permission.js +110 -0
- package/dist/agent-protocol/acp/session-results.d.ts +61 -0
- package/dist/agent-protocol/acp/session-results.js +226 -0
- package/dist/agent-protocol/acp/session-run.d.ts +92 -0
- package/dist/agent-protocol/acp/session-run.js +555 -0
- package/dist/agent-protocol/acp/session-state.d.ts +9 -0
- package/dist/agent-protocol/acp/session-state.js +29 -0
- package/dist/agent-protocol/acp/session-text-updates.d.ts +56 -0
- package/dist/agent-protocol/acp/session-text-updates.js +119 -0
- package/dist/agent-protocol/acp/session-tool-updates.d.ts +21 -0
- package/dist/agent-protocol/acp/session-tool-updates.js +90 -0
- package/dist/agent-protocol/acp/session-types.d.ts +166 -0
- package/dist/agent-protocol/acp/session-types.js +4 -0
- package/dist/agent-protocol/acp/session.d.ts +4 -280
- package/dist/agent-protocol/acp/session.js +65 -998
- package/dist/agent-protocol/acp/text-suppression.d.ts +5 -1
- package/dist/agent-protocol/acp/text-suppression.js +1 -1
- package/dist/agent-protocol/acp/updates.d.ts +43 -12
- package/dist/agent-protocol/acp/updates.js +34 -34
- package/dist/agent-protocol/core/json-line-stream.d.ts +133 -36
- package/dist/agent-protocol/core/json-line-stream.js +62 -62
- package/dist/agent-protocol/pi-rpc/events.d.ts +14 -4
- package/dist/agent-protocol/pi-rpc/events.js +14 -14
- package/dist/agent-protocol/pi-rpc/internal.d.ts +9 -3
- package/dist/agent-protocol/pi-rpc/internal.js +3 -3
- package/dist/agent-protocol/pi-rpc/models.d.ts +3 -17
- package/dist/agent-protocol/pi-rpc/models.js +1 -45
- package/dist/agent-protocol/pi-rpc/session.d.ts +36 -12
- package/dist/agent-protocol/pi-rpc/session.js +134 -122
- package/dist/amr-model-cache.d.ts +1 -1
- package/dist/anthropic-live-models.d.ts +8 -3
- package/dist/anthropic-live-models.js +0 -0
- package/dist/auth-common.d.ts +2 -0
- package/dist/auth-common.js +2 -0
- package/dist/auth.d.ts +7 -34
- package/dist/auth.js +25 -139
- package/dist/capabilities.d.ts +1 -1
- package/dist/claude-code-models.d.ts +13 -5
- package/dist/claude-code-models.js +12 -10
- package/dist/claude-filesystem-policy.d.ts +1 -1
- package/dist/claude-stream-frames.d.ts +125 -0
- package/dist/claude-stream-frames.js +327 -0
- package/dist/claude-stream-handler.d.ts +19 -0
- package/dist/claude-stream-handler.js +480 -0
- package/dist/claude-stream.d.ts +3 -72
- package/dist/claude-stream.js +2 -801
- package/dist/core/model-discovery-shared.d.ts +14 -8
- package/dist/core/model-discovery-shared.js +6 -9
- package/dist/core/omit-keys.d.ts +4 -1
- package/dist/core/omit-keys.js +1 -1
- package/dist/defs/aider/executable.d.ts +2 -0
- package/dist/defs/aider/executable.js +2 -0
- package/dist/defs/aider/model-discovery.d.ts +3 -0
- package/dist/defs/aider/model-discovery.js +6 -0
- package/dist/defs/aider.d.ts +10 -10
- package/dist/defs/amp/index.d.ts +35 -0
- package/dist/defs/amp/index.js +75 -0
- package/dist/defs/amp.d.ts +1 -34
- package/dist/defs/amp.js +1 -74
- package/dist/defs/amr/executable-resolution.d.ts +7 -0
- package/dist/defs/amr/executable-resolution.js +50 -0
- package/dist/defs/amr/executable.d.ts +2 -0
- package/dist/defs/amr/executable.js +2 -0
- package/dist/defs/amr/index.d.ts +69 -0
- package/dist/defs/amr/index.js +279 -0
- package/dist/defs/amr/model-discovery.d.ts +3 -0
- package/dist/defs/amr/model-discovery.js +4 -0
- package/dist/defs/amr.d.ts +1 -68
- package/dist/defs/amr.js +1 -291
- package/dist/defs/antigravity/auth.d.ts +14 -0
- package/dist/defs/antigravity/auth.js +47 -0
- package/dist/defs/antigravity/index.d.ts +9 -9
- package/dist/defs/antigravity/index.js +3 -3
- package/dist/defs/antigravity/model-discovery.d.ts +3 -0
- package/dist/defs/antigravity/model-discovery.js +5 -0
- package/dist/defs/auggie/executable.d.ts +2 -0
- package/dist/defs/auggie/executable.js +2 -0
- package/dist/defs/auggie.d.ts +13 -13
- package/dist/defs/auggie.js +2 -9
- package/dist/defs/claude/auth.d.ts +15 -0
- package/dist/defs/claude/auth.js +47 -0
- package/dist/defs/claude/executable.d.ts +2 -0
- package/dist/defs/claude/executable.js +2 -0
- package/dist/defs/claude/model-discovery.d.ts +3 -0
- package/dist/defs/claude/model-discovery.js +20 -0
- package/dist/defs/claude-compatible-args.d.ts +10 -6
- package/dist/defs/claude-compatible-args.js +5 -5
- package/dist/defs/claude.d.ts +11 -11
- package/dist/defs/claude.js +5 -4
- package/dist/defs/cline/executable.d.ts +2 -0
- package/dist/defs/cline/executable.js +2 -0
- package/dist/defs/cline.d.ts +13 -13
- package/dist/defs/cline.js +2 -9
- package/dist/defs/codebuddy/executable.d.ts +2 -0
- package/dist/defs/codebuddy/executable.js +2 -0
- package/dist/defs/codebuddy/index.d.ts +48 -0
- package/dist/defs/codebuddy/index.js +121 -0
- package/dist/defs/codebuddy/model-discovery.d.ts +3 -0
- package/dist/defs/codebuddy/model-discovery.js +5 -0
- package/dist/defs/codebuddy.d.ts +1 -47
- package/dist/defs/codebuddy.js +1 -120
- package/dist/defs/codex/auth.d.ts +4 -0
- package/dist/defs/codex/auth.js +2 -0
- package/dist/defs/codex/event-stream.d.ts +10 -0
- package/dist/defs/codex/event-stream.js +353 -0
- package/dist/defs/codex/executable-resolution.d.ts +7 -0
- package/dist/defs/codex/executable-resolution.js +37 -0
- package/dist/defs/codex/executable.d.ts +2 -0
- package/dist/defs/codex/executable.js +2 -0
- package/dist/defs/codex/launch.d.ts +3 -0
- package/dist/defs/codex/launch.js +155 -0
- package/dist/defs/codex/model-discovery.d.ts +3 -0
- package/dist/defs/codex/model-discovery.js +11 -0
- package/dist/defs/codex/options.d.ts +11 -0
- package/dist/defs/codex/options.js +5 -0
- package/dist/defs/codex.d.ts +18 -11
- package/dist/defs/codex.js +32 -29
- package/dist/defs/crush/executable.d.ts +2 -0
- package/dist/defs/crush/executable.js +2 -0
- package/dist/defs/crush/model-discovery.d.ts +3 -0
- package/dist/defs/crush/model-discovery.js +6 -0
- package/dist/defs/crush.d.ts +10 -10
- package/dist/defs/cursor-agent/auth.d.ts +13 -0
- package/dist/defs/cursor-agent/auth.js +22 -0
- package/dist/defs/cursor-agent/event-stream.d.ts +8 -0
- package/dist/defs/cursor-agent/event-stream.js +104 -0
- package/dist/defs/cursor-agent/executable.d.ts +2 -0
- package/dist/defs/cursor-agent/executable.js +2 -0
- package/dist/defs/cursor-agent/model-discovery.d.ts +3 -0
- package/dist/defs/cursor-agent/model-discovery.js +5 -0
- package/dist/defs/cursor-agent.d.ts +11 -13
- package/dist/defs/cursor-agent.js +1 -1
- package/dist/defs/deepseek/auth.d.ts +13 -0
- package/dist/defs/deepseek/auth.js +18 -0
- package/dist/defs/deepseek/executable.d.ts +2 -0
- package/dist/defs/deepseek/executable.js +2 -0
- package/dist/defs/deepseek/model-discovery.d.ts +3 -0
- package/dist/defs/deepseek/model-discovery.js +5 -0
- package/dist/defs/deepseek.d.ts +10 -10
- package/dist/defs/devin/executable.d.ts +2 -0
- package/dist/defs/devin/executable.js +2 -0
- package/dist/defs/devin.d.ts +15 -15
- package/dist/defs/devin.js +3 -10
- package/dist/defs/droid/executable.d.ts +2 -0
- package/dist/defs/droid/executable.js +2 -0
- package/dist/defs/droid/model-discovery.d.ts +3 -0
- package/dist/defs/droid/model-discovery.js +5 -0
- package/dist/defs/droid.d.ts +10 -10
- package/dist/defs/gemini/event-stream.d.ts +14 -0
- package/dist/defs/gemini/event-stream.js +193 -0
- package/dist/defs/goose/executable.d.ts +2 -0
- package/dist/defs/goose/executable.js +2 -0
- package/dist/defs/goose.d.ts +13 -13
- package/dist/defs/goose.js +2 -9
- package/dist/defs/grok-build/model-discovery.d.ts +3 -0
- package/dist/defs/grok-build/model-discovery.js +5 -0
- package/dist/defs/grok-build.d.ts +10 -10
- package/dist/defs/hermes/executable.d.ts +2 -0
- package/dist/defs/hermes/executable.js +2 -0
- package/dist/defs/hermes/index.d.ts +34 -0
- package/dist/defs/hermes/index.js +57 -0
- package/dist/defs/hermes.d.ts +1 -33
- package/dist/defs/hermes.js +1 -56
- package/dist/defs/index.d.ts +1 -0
- package/dist/defs/index.js +1 -0
- package/dist/defs/kilo/executable.d.ts +2 -0
- package/dist/defs/kilo/executable.js +2 -0
- package/dist/defs/kilo.d.ts +13 -13
- package/dist/defs/kilo.js +2 -9
- package/dist/defs/kimi/event-stream.d.ts +3 -0
- package/dist/defs/kimi/event-stream.js +46 -0
- package/dist/defs/kimi/executable.d.ts +2 -0
- package/dist/defs/kimi/executable.js +2 -0
- package/dist/defs/kimi.d.ts +13 -13
- package/dist/defs/kimi.js +2 -9
- package/dist/defs/kiro/executable.d.ts +2 -0
- package/dist/defs/kiro/executable.js +2 -0
- package/dist/defs/kiro.d.ts +13 -13
- package/dist/defs/kiro.js +2 -9
- package/dist/defs/mimo/executable.d.ts +2 -0
- package/dist/defs/mimo/executable.js +2 -0
- package/dist/defs/mimo/model-discovery.d.ts +3 -0
- package/dist/defs/mimo/model-discovery.js +7 -0
- package/dist/defs/mimo.d.ts +10 -10
- package/dist/defs/opencode/event-stream.d.ts +8 -0
- package/dist/defs/opencode/event-stream.js +108 -0
- package/dist/defs/opencode/executable.d.ts +2 -0
- package/dist/defs/opencode/executable.js +2 -0
- package/dist/defs/opencode/model-discovery.d.ts +4 -0
- package/dist/defs/opencode/model-discovery.js +14 -0
- package/dist/defs/opencode-acp.d.ts +42 -0
- package/dist/defs/opencode-acp.js +23 -0
- package/dist/defs/opencode.d.ts +9 -9
- package/dist/defs/pi/executable.d.ts +2 -0
- package/dist/defs/pi/executable.js +2 -0
- package/dist/defs/pi/model-discovery.d.ts +4 -0
- package/dist/defs/pi/model-discovery.js +16 -0
- package/dist/defs/pi/options.d.ts +11 -0
- package/dist/defs/pi/options.js +5 -0
- package/dist/defs/pi.d.ts +10 -10
- package/dist/defs/qoder/executable.d.ts +2 -0
- package/dist/defs/qoder/executable.js +2 -0
- package/dist/defs/qoder/model-discovery.d.ts +3 -0
- package/dist/defs/qoder/model-discovery.js +7 -0
- package/dist/defs/qoder.d.ts +9 -9
- package/dist/defs/qwen/executable.d.ts +2 -0
- package/dist/defs/qwen/executable.js +2 -0
- package/dist/defs/qwen/model-discovery.d.ts +3 -0
- package/dist/defs/qwen/model-discovery.js +7 -0
- package/dist/defs/qwen.d.ts +10 -10
- package/dist/defs/reasonix/auth.d.ts +13 -0
- package/dist/defs/reasonix/auth.js +18 -0
- package/dist/defs/reasonix/executable.d.ts +2 -0
- package/dist/defs/reasonix/executable.js +2 -0
- package/dist/defs/reasonix.d.ts +13 -13
- package/dist/defs/reasonix.js +2 -9
- package/dist/defs/shared.d.ts +10 -2
- package/dist/defs/shared.js +5 -1
- package/dist/defs/trae-cli/executable.d.ts +2 -0
- package/dist/defs/trae-cli/executable.js +2 -0
- package/dist/defs/trae-cli.d.ts +15 -15
- package/dist/defs/trae-cli.js +2 -9
- package/dist/defs/vibe/executable.d.ts +2 -0
- package/dist/defs/vibe/executable.js +2 -0
- package/dist/defs/vibe.d.ts +13 -13
- package/dist/defs/vibe.js +2 -9
- package/dist/detection.d.ts +4 -3
- package/dist/detection.js +22 -22
- package/dist/diagnostics.d.ts +4 -4
- package/dist/diagnostics.js +2 -2
- package/dist/env.js +2 -1
- package/dist/executable-helpers.d.ts +21 -0
- package/dist/executable-helpers.js +2 -0
- package/dist/executables.d.ts +2 -2
- package/dist/executables.js +68 -114
- package/dist/index.d.ts +6 -2
- package/dist/index.js +5 -1
- package/dist/invocation.d.ts +22 -6
- package/dist/invocation.js +19 -17
- package/dist/json-event-stream-shared.d.ts +81 -0
- package/dist/json-event-stream-shared.js +147 -0
- package/dist/json-event-stream.d.ts +2 -4
- package/dist/json-event-stream.js +15 -940
- package/dist/launch.d.ts +1 -9
- package/dist/launch.js +6 -155
- package/dist/log-file.d.ts +2 -8
- package/dist/log-file.js +1 -1
- package/dist/mcp.d.ts +2 -2
- package/dist/mcp.js +1 -1
- package/dist/mmd-routes.d.ts +7 -7
- package/dist/mmd-routes.js +19 -27
- package/dist/model-discovery-adapters.d.ts +47 -11
- package/dist/model-discovery-adapters.js +47 -41
- package/dist/model-discovery-config-types.d.ts +44 -0
- package/dist/model-discovery-config-types.js +20 -0
- package/dist/model-discovery-config.d.ts +19 -11
- package/dist/model-discovery-config.js +64 -87
- package/dist/model-discovery-native.d.ts +2 -1
- package/dist/model-discovery-native.js +3 -3
- package/dist/model-discovery-sdk.d.ts +6 -2
- package/dist/model-discovery-sdk.js +2 -2
- package/dist/model-discovery-types.d.ts +1 -138
- package/dist/model-discovery-yaml.d.ts +3 -1
- package/dist/model-discovery-yaml.js +1 -1
- package/dist/model-discovery.d.ts +15 -5
- package/dist/model-discovery.js +119 -105
- package/dist/model-loading-state.d.ts +1 -1
- package/dist/model-loading-state.js +1 -1
- package/dist/model-registry.d.ts +5 -5
- package/dist/model-registry.js +7 -6
- package/dist/models.d.ts +4 -3
- package/dist/models.js +2 -2
- package/dist/native-permissions.d.ts +47 -0
- package/dist/native-permissions.js +80 -0
- package/dist/native-runtime.d.ts +11 -8
- package/dist/native-runtime.js +8 -4
- package/dist/native-tool-policy.d.ts +1 -40
- package/dist/opencode-log.d.ts +3 -3
- package/dist/opencode-log.js +5 -3
- package/dist/paths.d.ts +1 -1
- package/dist/paths.js +1 -1
- package/dist/pi-models.d.ts +12 -2
- package/dist/pi-models.js +11 -1
- package/dist/prompt-augmenter.d.ts +1 -37
- package/dist/prompt-augmenter.js +0 -6
- package/dist/prompt-budget.d.ts +3 -3
- package/dist/prompt-budget.js +2 -2
- package/dist/prompt-file.d.ts +2 -6
- package/dist/prompt-file.js +1 -1
- package/dist/providers/aihubmix.d.ts +8 -8
- package/dist/providers/aihubmix.js +8 -8
- package/dist/providers/anthropic-messages.d.ts +22 -23
- package/dist/providers/anthropic-messages.js +26 -53
- package/dist/providers/azure-chat.d.ts +7 -6
- package/dist/providers/azure-chat.js +9 -6
- package/dist/providers/connection-guard.d.ts +3 -9
- package/dist/providers/connection-guard.js +6 -14
- package/dist/providers/connection-test.d.ts +1 -2
- package/dist/providers/connection-test.js +51 -51
- package/dist/providers/credentials.d.ts +59 -0
- package/dist/providers/credentials.js +80 -0
- package/dist/providers/elevenlabs.d.ts +2 -6
- package/dist/providers/elevenlabs.js +2 -31
- package/dist/providers/google-messages.d.ts +11 -10
- package/dist/providers/google-messages.js +16 -35
- package/dist/providers/google-schema.d.ts +1 -1
- package/dist/providers/google-schema.js +1 -1
- package/dist/providers/google.d.ts +6 -6
- package/dist/providers/google.js +6 -6
- package/dist/providers/index.d.ts +5 -2
- package/dist/providers/index.js +5 -2
- package/dist/providers/model-catalog.d.ts +4 -9
- package/dist/providers/model-catalog.js +3 -11
- package/dist/providers/oauth-callback-server.js +93 -87
- package/dist/providers/oauth-provider.d.ts +1 -1
- package/dist/providers/oauth-provider.js +1 -1
- package/dist/providers/oauth-tokens.d.ts +5 -5
- package/dist/providers/oauth-tokens.js +8 -9
- package/dist/providers/ollama-chat.d.ts +13 -12
- package/dist/providers/ollama-chat.js +15 -24
- package/dist/providers/openai-chat-request.d.ts +34 -0
- package/dist/providers/openai-chat-request.js +152 -0
- package/dist/providers/openai-chat-stream.d.ts +48 -0
- package/dist/providers/openai-chat-stream.js +89 -0
- package/dist/providers/openai-chat-tool-results.d.ts +81 -0
- package/dist/providers/openai-chat-tool-results.js +124 -0
- package/dist/providers/openai-chat-types.d.ts +180 -0
- package/dist/providers/openai-chat-types.js +3 -0
- package/dist/providers/openai-chat.d.ts +5 -405
- package/dist/providers/openai-chat.js +9 -388
- package/dist/providers/pkce.d.ts +1 -1
- package/dist/providers/pkce.js +1 -1
- package/dist/providers/provider-url.d.ts +6 -0
- package/dist/providers/provider-url.js +9 -0
- package/dist/providers/response-text.d.ts +4 -0
- package/dist/providers/response-text.js +16 -0
- package/dist/providers/sse-decode.d.ts +4 -0
- package/dist/providers/sse-decode.js +11 -0
- package/dist/providers/token-params.d.ts +5 -5
- package/dist/providers/token-params.js +5 -5
- package/dist/providers/tool-loop-verdict.d.ts +1 -1
- package/dist/providers/tool-loop-verdict.js +1 -1
- package/dist/providers/tool-turn-types.d.ts +2 -1
- package/dist/providers/tool-turn.js +30 -50
- package/dist/providers/turn-end-guard.d.ts +4 -1
- package/dist/providers/turn-end-guard.js +1 -1
- package/dist/qoder-stream.d.ts +1 -1
- package/dist/qoder-stream.js +1 -1
- package/dist/registry.d.ts +5 -5
- package/dist/registry.js +4 -4
- package/dist/role-marker-guard.d.ts +13 -1
- package/dist/role-marker-guard.js +15 -1
- package/dist/runtime-def-binding.d.ts +15 -0
- package/dist/runtime-def-binding.js +19 -0
- package/dist/runtime-port-bindings.d.ts +181 -0
- package/dist/runtime-port-bindings.js +95 -0
- package/dist/runtime-state.d.ts +2 -11
- package/dist/runtime-state.js +0 -13
- package/dist/types.d.ts +1 -454
- package/package.json +27 -15
- package/dist/ai-trace/capture.d.ts +0 -17
- package/dist/ai-trace/capture.js +0 -43
- package/dist/ai-trace/classify.d.ts +0 -12
- package/dist/ai-trace/classify.js +0 -16
- package/dist/ai-trace/index.d.ts +0 -13
- package/dist/ai-trace/index.js +0 -6
- package/dist/ai-trace/recorder.d.ts +0 -64
- package/dist/ai-trace/recorder.js +0 -258
- package/dist/ai-trace/sinks.d.ts +0 -51
- package/dist/ai-trace/sinks.js +0 -153
- package/dist/ai-trace/types.d.ts +0 -123
- package/dist/ai-trace/types.js +0 -17
- package/dist/ai-trace/usage.d.ts +0 -13
- package/dist/ai-trace/usage.js +0 -45
- package/dist/copilot-stream.d.ts +0 -65
- package/dist/copilot-stream.js +0 -131
- package/dist/defs/antigravity.d.ts +0 -94
- package/dist/defs/antigravity.js +0 -320
- package/dist/defs/copilot.d.ts +0 -34
- package/dist/defs/copilot.js +0 -96
- package/dist/defs/gemini.d.ts +0 -24
- package/dist/defs/gemini.js +0 -81
- package/dist/model-contracts.d.ts +0 -29
- package/dist/model-contracts.js +0 -2
- package/dist/providers/types.d.ts +0 -36
- package/dist/providers/types.js +0 -13
package/dist/defs/codex.js
CHANGED
|
@@ -250,14 +250,14 @@ function codexSandboxTier(options) {
|
|
|
250
250
|
return trustedBypass || codexNeedsDangerFullAccessSandbox({}) ? 'danger-full-access' : 'workspace-write';
|
|
251
251
|
}
|
|
252
252
|
/** Approval, native-tool lock, per-capability overrides and plugin policy, in that order. */
|
|
253
|
-
function codexPolicyArgs(options) {
|
|
253
|
+
function codexPolicyArgs(options, { codex }) {
|
|
254
254
|
const nativeToolsLocked = options.nativeToolAccess === false;
|
|
255
255
|
const native = options.nativeCapabilities;
|
|
256
256
|
return [
|
|
257
257
|
...(options.cliParity && options.permissionMode === 'bypass' && !nativeToolsLocked ? ['-c', 'approval_policy="never"'] : []),
|
|
258
258
|
...(nativeToolsLocked ? CODEX_NATIVE_TOOLS_LOCKED_ARGS : []),
|
|
259
259
|
...CODEX_CAPABILITY_OVERRIDES.flatMap(([key, values]) => (native?.[key] === false ? values.flatMap((value) => ['-c', value]) : [])),
|
|
260
|
-
...(
|
|
260
|
+
...(codex.disablePlugins === true ? ['--disable', 'plugins'] : []),
|
|
261
261
|
];
|
|
262
262
|
}
|
|
263
263
|
// `-C <cwd>` and `--add-dir <dir>` are CREATE-only flags: `codex exec
|
|
@@ -291,6 +291,35 @@ function codexModelArgs(options) {
|
|
|
291
291
|
function nonEmptyStrings(values) {
|
|
292
292
|
return (values || []).filter((value) => typeof value === 'string' && value.length > 0);
|
|
293
293
|
}
|
|
294
|
+
/** Codex argv. `codex` is this definition's own host config (see `defs/codex/options.ts`); the neutral
|
|
295
|
+
* `buildArgs` passes none, and only a binding that owns the host policy supplies it. */
|
|
296
|
+
export function buildCodexArgs({ imagePaths }, { extraAllowedDirs = [], options = {}, runtimeContext = {}, codex = {} } = {}) {
|
|
297
|
+
const resumeSessionId = codexResumeSessionId(runtimeContext);
|
|
298
|
+
const turn = resumeSessionId ? 'resume' : 'create';
|
|
299
|
+
return [
|
|
300
|
+
...CODEX_TURN_COMMAND[turn],
|
|
301
|
+
...CODEX_SANDBOX_ARGS[codexSandboxTier(options)][turn],
|
|
302
|
+
...codexPolicyArgs(options, { codex }),
|
|
303
|
+
...(resumeSessionId ? [] : codexCreateOnlyArgs({ extraAllowedDirs, runtimeContext })),
|
|
304
|
+
...codexModelArgs(options),
|
|
305
|
+
// Own dedicated `-i/--image <FILE>` argv flag — confirmed against a
|
|
306
|
+
// real installed Codex CLI (0.151.0) on BOTH `codex exec --help` and
|
|
307
|
+
// `codex exec resume --help`, so unlike `-C`/`--add-dir` above this is
|
|
308
|
+
// not create-only and needs no `resumeSessionId` guard. Pushed for
|
|
309
|
+
// every claimed attachment path the caller hands in here, not only
|
|
310
|
+
// ones actually of kind "image": the caller
|
|
311
|
+
// (`agent-daemon-server.ts#resolveAttachmentRunFields`, in the consuming product) already
|
|
312
|
+
// stopped filtering by kind for the same reason `qoderAgentDef`'s
|
|
313
|
+
// `--attachment` above does not filter either — a same-shaped
|
|
314
|
+
// repeated-flag mechanism, see `imageDelivery`'s doc below.
|
|
315
|
+
...nonEmptyStrings(imagePaths).flatMap((p) => ['-i', p]),
|
|
316
|
+
// The resume thread id is the positional SESSION_ID argument of
|
|
317
|
+
// `codex exec resume`; it must come after the flags. The prompt is
|
|
318
|
+
// delivered via stdin (promptViaStdin), so the thread id is the final
|
|
319
|
+
// argv entry.
|
|
320
|
+
...(resumeSessionId ? [resumeSessionId] : []),
|
|
321
|
+
];
|
|
322
|
+
}
|
|
294
323
|
export const codexAgentDef = {
|
|
295
324
|
...createAgentModelDiscovery('codex', { fallbackModels: () => codexAgentDef.fallbackModels, args: ['debug', 'models'], parse: parseCodexDebugModels }),
|
|
296
325
|
id: 'codex',
|
|
@@ -367,33 +396,7 @@ export const codexAgentDef = {
|
|
|
367
396
|
// `error: unexpected argument '-' found` and the agent exits with
|
|
368
397
|
// code 2 before any prompt is read. The pipe alone is sufficient for
|
|
369
398
|
// stdin delivery.
|
|
370
|
-
buildArgs: (
|
|
371
|
-
const resumeSessionId = codexResumeSessionId(runtimeContext);
|
|
372
|
-
const turn = resumeSessionId ? 'resume' : 'create';
|
|
373
|
-
return [
|
|
374
|
-
...CODEX_TURN_COMMAND[turn],
|
|
375
|
-
...CODEX_SANDBOX_ARGS[codexSandboxTier(options)][turn],
|
|
376
|
-
...codexPolicyArgs(options),
|
|
377
|
-
...(resumeSessionId ? [] : codexCreateOnlyArgs({ extraAllowedDirs, runtimeContext })),
|
|
378
|
-
...codexModelArgs(options),
|
|
379
|
-
// Own dedicated `-i/--image <FILE>` argv flag — confirmed against a
|
|
380
|
-
// real installed Codex CLI (0.151.0) on BOTH `codex exec --help` and
|
|
381
|
-
// `codex exec resume --help`, so unlike `-C`/`--add-dir` above this is
|
|
382
|
-
// not create-only and needs no `resumeSessionId` guard. Pushed for
|
|
383
|
-
// every claimed attachment path the caller hands in here, not only
|
|
384
|
-
// ones actually of kind "image": the caller
|
|
385
|
-
// (`agent-daemon-server.ts#resolveAttachmentRunFields`, in the consuming product) already
|
|
386
|
-
// stopped filtering by kind for the same reason `qoderAgentDef`'s
|
|
387
|
-
// `--attachment` above does not filter either — a same-shaped
|
|
388
|
-
// repeated-flag mechanism, see `imageDelivery`'s doc below.
|
|
389
|
-
...nonEmptyStrings(imagePaths).flatMap((p) => ['-i', p]),
|
|
390
|
-
// The resume thread id is the positional SESSION_ID argument of
|
|
391
|
-
// `codex exec resume`; it must come after the flags. The prompt is
|
|
392
|
-
// delivered via stdin (promptViaStdin), so the thread id is the final
|
|
393
|
-
// argv entry.
|
|
394
|
-
...(resumeSessionId ? [resumeSessionId] : []),
|
|
395
|
-
];
|
|
396
|
-
},
|
|
399
|
+
buildArgs: (required, optional = {}) => buildCodexArgs(required, optional),
|
|
397
400
|
promptViaStdin: true,
|
|
398
401
|
// Codex's CLI carries its own session across spawns: on a follow-up turn
|
|
399
402
|
// the caller resumes the captured thread id instead of re-sending the
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { join } from 'node:path';
|
|
2
|
+
import { json } from '../../model-discovery-config-types.js';
|
|
3
|
+
export const crushModelConfig = {
|
|
4
|
+
files: ({ configHome, local }) => [json({ path: join(configHome, 'crush/crush.json') }, { key: 'models.large.model' }), json({ path: local('crush.json') }, { key: 'models.large.model' })],
|
|
5
|
+
};
|
|
6
|
+
//# sourceMappingURL=model-discovery.js.map
|
package/dist/defs/crush.d.ts
CHANGED
|
@@ -3,31 +3,31 @@ export declare const crushAgentDef: {
|
|
|
3
3
|
name: string;
|
|
4
4
|
bin: string;
|
|
5
5
|
versionArgs: string[];
|
|
6
|
-
fallbackModels: import("
|
|
6
|
+
fallbackModels: import("@jini-ai/core/contracts/agents").RuntimeModelOption[];
|
|
7
7
|
buildArgs: ({ prompt: _prompt, imagePaths: _imagePaths }: {
|
|
8
8
|
prompt: string;
|
|
9
9
|
imagePaths: string[];
|
|
10
10
|
}, { extraAllowedDirs: _extra, options }?: {
|
|
11
11
|
extraAllowedDirs?: string[];
|
|
12
|
-
options?: import("
|
|
13
|
-
runtimeContext?: import("
|
|
12
|
+
options?: import("@jini-ai/core/contracts/agents").RuntimeBuildOptions;
|
|
13
|
+
runtimeContext?: import("@jini-ai/core/contracts/agents").RuntimeContext;
|
|
14
14
|
} | undefined) => string[];
|
|
15
15
|
promptViaStdin: true;
|
|
16
16
|
streamFormat: string;
|
|
17
17
|
discoverModels(requiredArgs: {
|
|
18
|
-
context: import("
|
|
18
|
+
context: import("@jini-ai/core/contracts/agents").ModelDiscoveryContext;
|
|
19
19
|
}, optionalArgs?: {
|
|
20
20
|
signal?: AbortSignal;
|
|
21
21
|
force?: boolean;
|
|
22
22
|
staleWhileRevalidate?: boolean;
|
|
23
|
-
deps?: import("
|
|
24
|
-
}): Promise<import("
|
|
23
|
+
deps?: import("@jini-ai/core/contracts/agents").ModelDiscoveryDeps;
|
|
24
|
+
}): Promise<import("@jini-ai/core/contracts/agents").ModelCatalogSnapshot>;
|
|
25
25
|
resolveDefaultModel(requiredArgs: {
|
|
26
|
-
context: import("
|
|
27
|
-
catalog: import("
|
|
26
|
+
context: import("@jini-ai/core/contracts/agents").ModelDiscoveryContext;
|
|
27
|
+
catalog: import("@jini-ai/core/contracts/agents").ModelCatalogSnapshot;
|
|
28
28
|
}, optionalArgs?: {
|
|
29
29
|
signal?: AbortSignal;
|
|
30
|
-
deps?: import("
|
|
31
|
-
}): Promise<import("
|
|
30
|
+
deps?: import("@jini-ai/core/contracts/agents").ModelDiscoveryDeps;
|
|
31
|
+
}): Promise<import("@jini-ai/core/contracts/agents").DefaultModelResolution>;
|
|
32
32
|
};
|
|
33
33
|
//# sourceMappingURL=crush.d.ts.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare function cursorAuthGuidance({}: {}, { hostName }?: {
|
|
2
|
+
hostName?: string;
|
|
3
|
+
}): string;
|
|
4
|
+
export declare function isCursorAuthFailureText({ text }: {
|
|
5
|
+
text: string;
|
|
6
|
+
}): boolean;
|
|
7
|
+
export declare const cursorAuthProfile: {
|
|
8
|
+
isFailure: typeof isCursorAuthFailureText;
|
|
9
|
+
guidance: ({ hostName }: {
|
|
10
|
+
hostName: string;
|
|
11
|
+
}) => string;
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=auth.d.ts.map
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { DEFAULT_HOST_NAME } from '../../auth-common.js';
|
|
2
|
+
export function cursorAuthGuidance({}, { hostName = DEFAULT_HOST_NAME } = {}) {
|
|
3
|
+
return `Cursor Agent is not authenticated. Run \`cursor-agent login\`, then \`cursor-agent status\`, and retry. For automation, ensure CURSOR_API_KEY is set in ${hostName}'s process environment.`;
|
|
4
|
+
}
|
|
5
|
+
export function isCursorAuthFailureText({ text }) {
|
|
6
|
+
const value = String(text || '');
|
|
7
|
+
if (!value.trim())
|
|
8
|
+
return false;
|
|
9
|
+
return [
|
|
10
|
+
/authentication required/i,
|
|
11
|
+
/not authenticated/i,
|
|
12
|
+
/not logged in/i,
|
|
13
|
+
/unauthenticated/i,
|
|
14
|
+
/agent login/i,
|
|
15
|
+
/cursor_api_key/i,
|
|
16
|
+
].some((pattern) => pattern.test(value));
|
|
17
|
+
}
|
|
18
|
+
export const cursorAuthProfile = {
|
|
19
|
+
isFailure: isCursorAuthFailureText,
|
|
20
|
+
guidance: ({ hostName }) => cursorAuthGuidance({}, { hostName }),
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=auth.js.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ParserState, StreamEventHandler } from '../../json-event-stream-shared.js';
|
|
2
|
+
export type CursorStreamState = {
|
|
3
|
+
textSoFar: string;
|
|
4
|
+
turnStart: number;
|
|
5
|
+
};
|
|
6
|
+
export declare function createCursorStreamState(): CursorStreamState;
|
|
7
|
+
export declare function handleCursorEvent(obj: unknown, onEvent: StreamEventHandler, state: ParserState): boolean;
|
|
8
|
+
//# sourceMappingURL=event-stream.d.ts.map
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { initializingStatus, isRecord, optionalNumber, pickUsage } from '../../json-event-stream-shared.js';
|
|
2
|
+
export function createCursorStreamState() { return { textSoFar: '', turnStart: 0 }; }
|
|
3
|
+
function extractCursorText(message) {
|
|
4
|
+
const content = isRecord(message) ? message.content : undefined;
|
|
5
|
+
const blocks = Array.isArray(content) ? content : [];
|
|
6
|
+
return blocks
|
|
7
|
+
.filter((block) => isRecord(block) && block.type === 'text' && typeof block.text === 'string')
|
|
8
|
+
.map((block) => block.text)
|
|
9
|
+
.join('');
|
|
10
|
+
}
|
|
11
|
+
function emitCursorTextDelta(text, onEvent, state) {
|
|
12
|
+
// Timestamped assistant events WITHOUT `model_call_id` are cursor-agent's
|
|
13
|
+
// real-time incremental deltas (`--stream-partial-output`): the final turn
|
|
14
|
+
// text is the in-order concatenation of every such delta. Emit each one
|
|
15
|
+
// verbatim — do NOT dedupe by content. Legitimately repeated deltas
|
|
16
|
+
// (`"ha"`, `"ha"` -> `"haha"`) or a delta that happens to be a prefix of
|
|
17
|
+
// earlier text are real content, not duplicates; content-based prefix or
|
|
18
|
+
// equality checks would silently drop them. Duplicate suppression and
|
|
19
|
+
// dropped-chunk recovery belong to the buffered terminal replay paths
|
|
20
|
+
// (`model_call_id` and no-timestamp events) via reconcileCursorTurnReplay.
|
|
21
|
+
//
|
|
22
|
+
// No `!text` guard: this function's only real call site
|
|
23
|
+
// (`handleCursorAssistant`, below) already returns early on `if (!text) return
|
|
24
|
+
// false;` before ever calling in, so `text` is always non-empty here. The
|
|
25
|
+
// guard was dead code for the one real caller; removed rather than padded
|
|
26
|
+
// with a test.
|
|
27
|
+
state.cursor.textSoFar += text;
|
|
28
|
+
onEvent({ type: 'text_delta', delta: text });
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Reconcile a Cursor terminal replay against the text already emitted for the
|
|
32
|
+
* CURRENT turn. A terminal replay (either a `model_call_id` message or a
|
|
33
|
+
* non-timestamped final assistant message) carries the full text for the
|
|
34
|
+
* current turn only, so it must be compared against
|
|
35
|
+
* `cursorTextSoFar.slice(cursorTurnStart)` — NOT the whole cross-turn buffer,
|
|
36
|
+
* which would miss the current-turn prefix on later turns and re-append the
|
|
37
|
+
* whole replay (duplicate output like "secondsecond turn").
|
|
38
|
+
*
|
|
39
|
+
* Only a verified prefix permits suffix recovery: if the emitted turn text is
|
|
40
|
+
* a prefix of the replay (including the empty case where no chunk arrived),
|
|
41
|
+
* emit the missing suffix. On divergence (a non-final chunk was dropped, so
|
|
42
|
+
* the emitted text is not a prefix) leave the append-only stream untouched
|
|
43
|
+
* rather than duplicate already-shown text. Always advances the turn boundary.
|
|
44
|
+
*/
|
|
45
|
+
function reconcileCursorTurnReplay(text, onEvent, state) {
|
|
46
|
+
const emittedTurn = state.cursor.textSoFar.slice(state.cursor.turnStart);
|
|
47
|
+
if (text && text !== emittedTurn && text.startsWith(emittedTurn)) {
|
|
48
|
+
const suffix = text.slice(emittedTurn.length);
|
|
49
|
+
if (suffix)
|
|
50
|
+
onEvent({ type: 'text_delta', delta: suffix });
|
|
51
|
+
state.cursor.textSoFar += suffix;
|
|
52
|
+
}
|
|
53
|
+
state.cursor.turnStart = state.cursor.textSoFar.length;
|
|
54
|
+
}
|
|
55
|
+
function handleCursorAssistant(obj, onEvent, state) {
|
|
56
|
+
// Cursor sends a final assistant message that replays the full text for
|
|
57
|
+
// the current turn — either tagged with `model_call_id`, or (fallback)
|
|
58
|
+
// as a non-timestamped terminal assistant message. Both are reconciled
|
|
59
|
+
// against the current turn's emitted text via reconcileCursorTurnReplay.
|
|
60
|
+
const text = extractCursorText(obj.message);
|
|
61
|
+
if (typeof obj.model_call_id === 'string') {
|
|
62
|
+
reconcileCursorTurnReplay(text, onEvent, state);
|
|
63
|
+
return true;
|
|
64
|
+
}
|
|
65
|
+
if (!text)
|
|
66
|
+
return false;
|
|
67
|
+
if (typeof obj.timestamp_ms === 'number') {
|
|
68
|
+
// Incremental streaming chunk within a turn — accumulate as usual.
|
|
69
|
+
emitCursorTextDelta(text, onEvent, state);
|
|
70
|
+
return true;
|
|
71
|
+
}
|
|
72
|
+
// Non-timestamped final assistant message: a terminal replay that marks a
|
|
73
|
+
// turn boundary. Reconcile against the current turn (not the whole
|
|
74
|
+
// cross-turn buffer) so later fallback-terminated turns do not duplicate
|
|
75
|
+
// output, then advance the turn boundary.
|
|
76
|
+
reconcileCursorTurnReplay(text, onEvent, state);
|
|
77
|
+
return true;
|
|
78
|
+
}
|
|
79
|
+
const CURSOR_USAGE_FIELDS = [
|
|
80
|
+
['inputTokens', 'input_tokens'],
|
|
81
|
+
['outputTokens', 'output_tokens'],
|
|
82
|
+
['cacheReadTokens', 'cached_read_tokens'],
|
|
83
|
+
['cacheWriteTokens', 'cached_write_tokens'],
|
|
84
|
+
];
|
|
85
|
+
export function handleCursorEvent(obj, onEvent, state) {
|
|
86
|
+
if (!isRecord(obj))
|
|
87
|
+
return false;
|
|
88
|
+
if (obj.type === 'system' && obj.subtype === 'init') {
|
|
89
|
+
onEvent(initializingStatus({ obj }));
|
|
90
|
+
return true;
|
|
91
|
+
}
|
|
92
|
+
if (obj.type === 'assistant' && obj.message)
|
|
93
|
+
return handleCursorAssistant(obj, onEvent, state);
|
|
94
|
+
if (obj.type === 'result' && isRecord(obj.usage)) {
|
|
95
|
+
onEvent({
|
|
96
|
+
type: 'usage',
|
|
97
|
+
usage: pickUsage({ source: obj.usage, fields: CURSOR_USAGE_FIELDS }),
|
|
98
|
+
durationMs: optionalNumber({ value: obj.duration_ms }),
|
|
99
|
+
});
|
|
100
|
+
return true;
|
|
101
|
+
}
|
|
102
|
+
return false;
|
|
103
|
+
}
|
|
104
|
+
//# sourceMappingURL=event-stream.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { RuntimeBuildOptions, RuntimeModelOption } from '
|
|
1
|
+
import type { RuntimeBuildOptions, RuntimeModelOption } from '@jini-ai/core/contracts/agents';
|
|
2
2
|
export declare function parseCursorAgentModels({ stdout }: {
|
|
3
3
|
stdout: string;
|
|
4
|
-
}): RuntimeModelOption[] | null;
|
|
4
|
+
}, _optional?: Record<string, never>): RuntimeModelOption[] | null;
|
|
5
5
|
declare function parseCursorAgentListing({ stdout }: {
|
|
6
6
|
stdout: string;
|
|
7
7
|
}): RuntimeModelOption[] | null;
|
|
@@ -26,7 +26,7 @@ export declare const cursorAgentDef: {
|
|
|
26
26
|
}, { options, runtimeContext }?: {
|
|
27
27
|
extraAllowedDirs?: string[];
|
|
28
28
|
options?: RuntimeBuildOptions;
|
|
29
|
-
runtimeContext?: import("
|
|
29
|
+
runtimeContext?: import("@jini-ai/core/contracts/agents").RuntimeContext;
|
|
30
30
|
} | undefined) => string[];
|
|
31
31
|
promptViaStdin: true;
|
|
32
32
|
streamFormat: string;
|
|
@@ -36,22 +36,20 @@ export declare const cursorAgentDef: {
|
|
|
36
36
|
timeoutMs: number;
|
|
37
37
|
};
|
|
38
38
|
discoverModels(requiredArgs: {
|
|
39
|
-
context: import("
|
|
39
|
+
context: import("@jini-ai/core/contracts/agents").ModelDiscoveryContext;
|
|
40
40
|
}, optionalArgs?: {
|
|
41
41
|
signal?: AbortSignal;
|
|
42
|
-
force
|
|
43
|
-
/** Approval flags: `--force` always, `--trust` only when this build's `--help` probe saw it. */
|
|
44
|
-
?: boolean;
|
|
42
|
+
force?: boolean;
|
|
45
43
|
staleWhileRevalidate?: boolean;
|
|
46
|
-
deps?: import("
|
|
47
|
-
}): Promise<import("
|
|
44
|
+
deps?: import("@jini-ai/core/contracts/agents").ModelDiscoveryDeps;
|
|
45
|
+
}): Promise<import("@jini-ai/core/contracts/agents").ModelCatalogSnapshot>;
|
|
48
46
|
resolveDefaultModel(requiredArgs: {
|
|
49
|
-
context: import("
|
|
50
|
-
catalog: import("
|
|
47
|
+
context: import("@jini-ai/core/contracts/agents").ModelDiscoveryContext;
|
|
48
|
+
catalog: import("@jini-ai/core/contracts/agents").ModelCatalogSnapshot;
|
|
51
49
|
}, optionalArgs?: {
|
|
52
50
|
signal?: AbortSignal;
|
|
53
|
-
deps?: import("
|
|
54
|
-
}): Promise<import("
|
|
51
|
+
deps?: import("@jini-ai/core/contracts/agents").ModelDiscoveryDeps;
|
|
52
|
+
}): Promise<import("@jini-ai/core/contracts/agents").DefaultModelResolution>;
|
|
55
53
|
};
|
|
56
54
|
export {};
|
|
57
55
|
//# sourceMappingURL=cursor-agent.d.ts.map
|
|
@@ -14,7 +14,7 @@ function parseCursorAgentModelLine(line) {
|
|
|
14
14
|
const id = match[1];
|
|
15
15
|
return { id, label: match[2]?.trim() || id };
|
|
16
16
|
}
|
|
17
|
-
export function parseCursorAgentModels({ stdout }) {
|
|
17
|
+
export function parseCursorAgentModels({ stdout }, _optional = {}) {
|
|
18
18
|
const lines = String(stdout || '')
|
|
19
19
|
.split('\n')
|
|
20
20
|
.map((line) => line.trim())
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare function deepseekAuthGuidance({}: {}, { hostName }?: {
|
|
2
|
+
hostName?: string;
|
|
3
|
+
}): string;
|
|
4
|
+
export declare function isDeepSeekAuthFailureText({ text }: {
|
|
5
|
+
text: string;
|
|
6
|
+
}): boolean;
|
|
7
|
+
export declare const deepseekAuthProfile: {
|
|
8
|
+
isFailure: typeof isDeepSeekAuthFailureText;
|
|
9
|
+
guidance: ({ hostName }: {
|
|
10
|
+
hostName: string;
|
|
11
|
+
}) => string;
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=auth.d.ts.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { DEFAULT_HOST_NAME } from '../../auth-common.js';
|
|
2
|
+
export function deepseekAuthGuidance({}, { hostName = DEFAULT_HOST_NAME } = {}) {
|
|
3
|
+
return `DeepSeek TUI is installed but is not authenticated. Add or verify your API key in \`~/.deepseek/config.toml\` as \`api_key = "..."\`, or expose DEEPSEEK_API_KEY to ${hostName}'s daemon process, then retry. If ${hostName} is launched outside an interactive shell, shell rc files such as ~/.zshrc may not be loaded.`;
|
|
4
|
+
}
|
|
5
|
+
export function isDeepSeekAuthFailureText({ text }) {
|
|
6
|
+
const value = String(text || '');
|
|
7
|
+
if (!value.trim())
|
|
8
|
+
return false;
|
|
9
|
+
const placeholderKey = /KEY=<your-key>/i.test(value) || /api_key\s*=\s*["']<your-key>["']/i.test(value);
|
|
10
|
+
const configMentionsKey = /~\/\.deepseek\/config\.toml/i.test(value) && /api[_ -]?key|KEY=/i.test(value);
|
|
11
|
+
const envKeyProblem = /DEEPSEEK_API_KEY/i.test(value) && /auth|missing|not set|required|unauthorized|empty|invalid/i.test(value);
|
|
12
|
+
return placeholderKey || configMentionsKey || envKeyProblem;
|
|
13
|
+
}
|
|
14
|
+
export const deepseekAuthProfile = {
|
|
15
|
+
isFailure: isDeepSeekAuthFailureText,
|
|
16
|
+
guidance: ({ hostName }) => deepseekAuthGuidance({}, { hostName }),
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=auth.js.map
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export const deepseekModelConfig = {
|
|
2
|
+
files: ({ user }) => [{ path: user('.deepseek/config.toml'), format: 'toml' }, { path: user('.codewhale/config.toml'), format: 'toml' }],
|
|
3
|
+
modelEnv: ['CODEWHALE_MODEL', 'DEEPSEEK_MODEL'],
|
|
4
|
+
};
|
|
5
|
+
//# sourceMappingURL=model-discovery.js.map
|
package/dist/defs/deepseek.d.ts
CHANGED
|
@@ -4,31 +4,31 @@ export declare const deepseekAgentDef: {
|
|
|
4
4
|
bin: string;
|
|
5
5
|
fallbackBins: string[];
|
|
6
6
|
versionArgs: string[];
|
|
7
|
-
fallbackModels: import("
|
|
7
|
+
fallbackModels: import("@jini-ai/core/contracts/agents").RuntimeModelOption[];
|
|
8
8
|
buildArgs: ({ prompt, imagePaths: _imagePaths }: {
|
|
9
9
|
prompt: string;
|
|
10
10
|
imagePaths: string[];
|
|
11
11
|
}, { extraAllowedDirs: _extra, options }?: {
|
|
12
12
|
extraAllowedDirs?: string[];
|
|
13
|
-
options?: import("
|
|
14
|
-
runtimeContext?: import("
|
|
13
|
+
options?: import("@jini-ai/core/contracts/agents").RuntimeBuildOptions;
|
|
14
|
+
runtimeContext?: import("@jini-ai/core/contracts/agents").RuntimeContext;
|
|
15
15
|
} | undefined) => string[];
|
|
16
16
|
maxPromptArgBytes: number;
|
|
17
17
|
streamFormat: string;
|
|
18
18
|
discoverModels(requiredArgs: {
|
|
19
|
-
context: import("
|
|
19
|
+
context: import("@jini-ai/core/contracts/agents").ModelDiscoveryContext;
|
|
20
20
|
}, optionalArgs?: {
|
|
21
21
|
signal?: AbortSignal;
|
|
22
22
|
force?: boolean;
|
|
23
23
|
staleWhileRevalidate?: boolean;
|
|
24
|
-
deps?: import("
|
|
25
|
-
}): Promise<import("
|
|
24
|
+
deps?: import("@jini-ai/core/contracts/agents").ModelDiscoveryDeps;
|
|
25
|
+
}): Promise<import("@jini-ai/core/contracts/agents").ModelCatalogSnapshot>;
|
|
26
26
|
resolveDefaultModel(requiredArgs: {
|
|
27
|
-
context: import("
|
|
28
|
-
catalog: import("
|
|
27
|
+
context: import("@jini-ai/core/contracts/agents").ModelDiscoveryContext;
|
|
28
|
+
catalog: import("@jini-ai/core/contracts/agents").ModelCatalogSnapshot;
|
|
29
29
|
}, optionalArgs?: {
|
|
30
30
|
signal?: AbortSignal;
|
|
31
|
-
deps?: import("
|
|
32
|
-
}): Promise<import("
|
|
31
|
+
deps?: import("@jini-ai/core/contracts/agents").ModelDiscoveryDeps;
|
|
32
|
+
}): Promise<import("@jini-ai/core/contracts/agents").DefaultModelResolution>;
|
|
33
33
|
};
|
|
34
34
|
//# sourceMappingURL=deepseek.d.ts.map
|
package/dist/defs/devin.d.ts
CHANGED
|
@@ -3,38 +3,38 @@ export declare const devinAgentDef: {
|
|
|
3
3
|
name: string;
|
|
4
4
|
bin: string;
|
|
5
5
|
versionArgs: string[];
|
|
6
|
-
fetchModels: (
|
|
6
|
+
fetchModels: (requiredArgs: {
|
|
7
7
|
resolvedBin: string;
|
|
8
|
-
env: import("
|
|
9
|
-
},
|
|
10
|
-
acpModelProbe?: import("
|
|
11
|
-
}
|
|
12
|
-
fallbackModels: import("
|
|
8
|
+
env: import("@jini-ai/core/contracts/agents").RuntimeEnv;
|
|
9
|
+
}, optionalArgs?: {
|
|
10
|
+
acpModelProbe?: import("@jini-ai/core/contracts/agents").AcpModelProbe;
|
|
11
|
+
}) => Promise<import("@jini-ai/core/contracts/agents").RuntimeModelOption[] | null>;
|
|
12
|
+
fallbackModels: import("@jini-ai/core/contracts/agents").RuntimeModelOption[];
|
|
13
13
|
buildArgs: ({ prompt: _prompt, imagePaths: _imagePaths }: {
|
|
14
14
|
prompt: string;
|
|
15
15
|
imagePaths: string[];
|
|
16
16
|
}, { extraAllowedDirs: _extra, options }?: {
|
|
17
17
|
extraAllowedDirs?: string[];
|
|
18
|
-
options?: import("
|
|
19
|
-
runtimeContext?: import("
|
|
18
|
+
options?: import("@jini-ai/core/contracts/agents").RuntimeBuildOptions;
|
|
19
|
+
runtimeContext?: import("@jini-ai/core/contracts/agents").RuntimeContext;
|
|
20
20
|
} | undefined) => string[];
|
|
21
21
|
streamFormat: string;
|
|
22
22
|
externalMcpInjection: "acp-merge";
|
|
23
23
|
imageDelivery: "native";
|
|
24
24
|
discoverModels(requiredArgs: {
|
|
25
|
-
context: import("
|
|
25
|
+
context: import("@jini-ai/core/contracts/agents").ModelDiscoveryContext;
|
|
26
26
|
}, optionalArgs?: {
|
|
27
27
|
signal?: AbortSignal;
|
|
28
28
|
force?: boolean;
|
|
29
29
|
staleWhileRevalidate?: boolean;
|
|
30
|
-
deps?: import("
|
|
31
|
-
}): Promise<import("
|
|
30
|
+
deps?: import("@jini-ai/core/contracts/agents").ModelDiscoveryDeps;
|
|
31
|
+
}): Promise<import("@jini-ai/core/contracts/agents").ModelCatalogSnapshot>;
|
|
32
32
|
resolveDefaultModel(requiredArgs: {
|
|
33
|
-
context: import("
|
|
34
|
-
catalog: import("
|
|
33
|
+
context: import("@jini-ai/core/contracts/agents").ModelDiscoveryContext;
|
|
34
|
+
catalog: import("@jini-ai/core/contracts/agents").ModelCatalogSnapshot;
|
|
35
35
|
}, optionalArgs?: {
|
|
36
36
|
signal?: AbortSignal;
|
|
37
|
-
deps?: import("
|
|
38
|
-
}): Promise<import("
|
|
37
|
+
deps?: import("@jini-ai/core/contracts/agents").ModelDiscoveryDeps;
|
|
38
|
+
}): Promise<import("@jini-ai/core/contracts/agents").DefaultModelResolution>;
|
|
39
39
|
};
|
|
40
40
|
//# sourceMappingURL=devin.d.ts.map
|
package/dist/defs/devin.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createAgentModelDiscovery } from '../model-discovery-native.js';
|
|
2
|
-
import {
|
|
2
|
+
import { acpModelFetcher, DEFAULT_MODEL_OPTION } from './shared.js';
|
|
3
3
|
export const devinAgentDef = {
|
|
4
4
|
// UNVERIFIED live integration locally; source/category and limits are documented in model-discovery-adapters.ts.
|
|
5
5
|
...createAgentModelDiscovery('devin', { fallbackModels: () => devinAgentDef.fallbackModels }),
|
|
@@ -7,20 +7,13 @@ export const devinAgentDef = {
|
|
|
7
7
|
name: 'Devin for Terminal',
|
|
8
8
|
bin: 'devin',
|
|
9
9
|
versionArgs: ['--version'],
|
|
10
|
-
fetchModels:
|
|
11
|
-
...(acpModelProbe ? { probe: acpModelProbe } : {}),
|
|
12
|
-
bin: resolvedBin,
|
|
13
|
-
args: [
|
|
10
|
+
fetchModels: acpModelFetcher({ args: [
|
|
14
11
|
'--permission-mode',
|
|
15
12
|
'dangerous',
|
|
16
13
|
'--respect-workspace-trust',
|
|
17
14
|
'false',
|
|
18
15
|
'acp',
|
|
19
|
-
],
|
|
20
|
-
env,
|
|
21
|
-
timeoutMs: 15_000,
|
|
22
|
-
defaultModelOption: DEFAULT_MODEL_OPTION,
|
|
23
|
-
}),
|
|
16
|
+
] }),
|
|
24
17
|
// Fallback aliases from Devin for Terminal docs
|
|
25
18
|
// (https://cli.devin.ai/docs/models): `adaptive` appears in the config example;
|
|
26
19
|
// `opus`, `sonnet`, `swe`, `codex`, `gemini`, and `gpt` are documented
|