@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
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { createAgentModelDiscovery } from '../../model-discovery-native.js';
|
|
2
|
+
import { addDirArgs, nonDefaultFlag, permissionModeArgs, resolveCapabilities, sessionArgs } from '../claude-compatible-args.js';
|
|
3
|
+
import { buildClaudeMcpConfigArgs, DEFAULT_MODEL_OPTION } from '../shared.js';
|
|
4
|
+
// Codebuddy Code (https://www.codebuddy.cn) — a Claude Code–compatible CLI
|
|
5
|
+
// that ships as `codebuddy` (short alias: `cbc`). The argument surface is a
|
|
6
|
+
// superset of Claude Code's `-p` mode: `--output-format stream-json`,
|
|
7
|
+
// `--input-format stream-json`, `--permission-mode`, `--session-id`,
|
|
8
|
+
// `--resume`, `--add-dir`, `--include-partial-messages`, and `--model` all
|
|
9
|
+
// work identically. The stream wire format matches Claude Code's, so we reuse
|
|
10
|
+
// `streamFormat: 'claude-stream-json'`.
|
|
11
|
+
//
|
|
12
|
+
// Key differences from the claude adapter:
|
|
13
|
+
// • Binary names: `codebuddy` / `cbc` (not `claude` / `openclaude`).
|
|
14
|
+
// • `--effort` flag for reasoning control (minimal/low/medium/high/xhigh/max).
|
|
15
|
+
// • Richer multi-provider model list (GLM, Kimi, MiniMax, Claude, GPT,
|
|
16
|
+
// Gemini, DeepSeek) exposed through `--model <id>`.
|
|
17
|
+
// • `--mcp-config <fileOrString>` for MCP server injection (the daemon can
|
|
18
|
+
// also write `.mcp.json` to the project cwd, same as Claude Code).
|
|
19
|
+
const CODEBUDDY_FALLBACK_MODELS = [
|
|
20
|
+
DEFAULT_MODEL_OPTION,
|
|
21
|
+
// GLM family (Zhipu AI)
|
|
22
|
+
{ id: 'glm-5.1-ioa', label: 'glm-5.1-ioa' },
|
|
23
|
+
{ id: 'glm-5v-turbo-ioa', label: 'glm-5v-turbo-ioa' },
|
|
24
|
+
// Claude family (via Codebuddy proxy)
|
|
25
|
+
{ id: 'claude-opus-4.8-1m', label: 'claude-opus-4.8-1m' },
|
|
26
|
+
{ id: 'claude-opus-4.8', label: 'claude-opus-4.8' },
|
|
27
|
+
{ id: 'claude-sonnet-4.6-1m', label: 'claude-sonnet-4.6-1m' },
|
|
28
|
+
{ id: 'claude-haiku-4.5', label: 'claude-haiku-4.5' },
|
|
29
|
+
// GPT family
|
|
30
|
+
{ id: 'gpt-5.5', label: 'gpt-5.5' },
|
|
31
|
+
{ id: 'gpt-5.4', label: 'gpt-5.4' },
|
|
32
|
+
{ id: 'gpt-5.3-codex', label: 'gpt-5.3-codex' },
|
|
33
|
+
// Gemini family
|
|
34
|
+
{ id: 'gemini-3.5-flash', label: 'gemini-3.5-flash' },
|
|
35
|
+
// DeepSeek family
|
|
36
|
+
{ id: 'deepseek-v4-pro-ioa', label: 'deepseek-v4-pro-ioa' },
|
|
37
|
+
{ id: 'deepseek-v4-flash-ioa', label: 'deepseek-v4-flash-ioa' },
|
|
38
|
+
// Kimi family
|
|
39
|
+
{ id: 'kimi-k2.6-ioa', label: 'kimi-k2.6-ioa' },
|
|
40
|
+
// MiniMax family
|
|
41
|
+
{ id: 'minimax-m3-ioa', label: 'minimax-m3-ioa' },
|
|
42
|
+
{ id: 'minimax-m2.7-ioa', label: 'minimax-m2.7-ioa' },
|
|
43
|
+
];
|
|
44
|
+
export const codebuddyAgentDef = {
|
|
45
|
+
// UNVERIFIED live integration locally; source/category and limits are documented in model-discovery-adapters.ts.
|
|
46
|
+
...createAgentModelDiscovery('codebuddy', { fallbackModels: () => codebuddyAgentDef.fallbackModels }),
|
|
47
|
+
id: 'codebuddy',
|
|
48
|
+
name: 'Codebuddy Code',
|
|
49
|
+
bin: 'codebuddy',
|
|
50
|
+
// `cbc` is the short alias shipped alongside `codebuddy`. Tried as a
|
|
51
|
+
// fallback when the primary binary isn't on PATH.
|
|
52
|
+
fallbackBins: ['cbc'],
|
|
53
|
+
versionArgs: ['--version'],
|
|
54
|
+
helpArgs: ['-p', '--help'],
|
|
55
|
+
capabilityFlags: {
|
|
56
|
+
// Same probing strategy as the claude adapter: these flags live under
|
|
57
|
+
// the `-p` subcommand help, so we probe `codebuddy -p --help`.
|
|
58
|
+
'--include-partial-messages': 'partialMessages',
|
|
59
|
+
'--add-dir': 'addDir',
|
|
60
|
+
},
|
|
61
|
+
fallbackModels: CODEBUDDY_FALLBACK_MODELS,
|
|
62
|
+
// Codebuddy CLI does not ship a `models` subcommand; the supported model
|
|
63
|
+
// ids are advertised in `--help` output. Fallback list above covers the
|
|
64
|
+
// current set; users can type custom ids through the "Custom" input.
|
|
65
|
+
// Codebuddy CLI --effort supports exactly 6 levels:
|
|
66
|
+
// minimal, low, medium, high, xhigh, max
|
|
67
|
+
// We additionally expose a synthetic `default` sentinel as the FIRST
|
|
68
|
+
// option so the web pickers (AvatarMenu / SettingsDialog) — which
|
|
69
|
+
// fall back to `reasoningOptions[0].id` when nothing is saved yet —
|
|
70
|
+
// surface a real "use Codebuddy's own default" choice that round-trips
|
|
71
|
+
// to "no --effort flag". `buildArgs` treats `default` as omit.
|
|
72
|
+
reasoningOptions: [
|
|
73
|
+
{ id: 'default', label: 'Default' },
|
|
74
|
+
{ id: 'minimal', label: 'Minimal' },
|
|
75
|
+
{ id: 'low', label: 'Low' },
|
|
76
|
+
{ id: 'medium', label: 'Medium' },
|
|
77
|
+
{ id: 'high', label: 'High' },
|
|
78
|
+
{ id: 'xhigh', label: 'XHigh' },
|
|
79
|
+
{ id: 'max', label: 'Max' },
|
|
80
|
+
],
|
|
81
|
+
buildArgs: (_requiredArgs, { extraAllowedDirs = [], options = {}, runtimeContext = {} } = {}) => {
|
|
82
|
+
const caps = resolveCapabilities({ agentId: 'codebuddy', options });
|
|
83
|
+
return [
|
|
84
|
+
// Same stdin strategy as Claude Code: `--input-format stream-json`
|
|
85
|
+
// enables JSONL stdin so the daemon can answer AskUserQuestion tool
|
|
86
|
+
// calls. `--output-format stream-json` gives us SSE-style events.
|
|
87
|
+
'-p', '--input-format', 'stream-json', '--output-format', 'stream-json', '--verbose',
|
|
88
|
+
// `--include-partial-messages` lands richer streaming deltas. Gate on
|
|
89
|
+
// the help-text probe to avoid "unknown option" errors on older builds.
|
|
90
|
+
...(caps.partialMessages ? ['--include-partial-messages'] : []),
|
|
91
|
+
...nonDefaultFlag({ flag: '--model', value: options.model }),
|
|
92
|
+
// Reasoning effort control — Codebuddy supports `--effort <level>`.
|
|
93
|
+
// The `default` sentinel means "let Codebuddy pick" — omit the flag.
|
|
94
|
+
...nonDefaultFlag({ flag: '--effort', value: options.reasoning }),
|
|
95
|
+
...addDirArgs({ extraAllowedDirs, caps }),
|
|
96
|
+
// Session continuity: Codebuddy supports `--resume <id>` and
|
|
97
|
+
// `--session-id <uuid>` identically to Claude Code.
|
|
98
|
+
...sessionArgs({ runtimeContext }),
|
|
99
|
+
...permissionModeArgs({ options }),
|
|
100
|
+
// Same explicit staged-config delivery as the claude def, through the same shared helper —
|
|
101
|
+
// see `buildClaudeMcpConfigArgs`'s doc. Without this, declaring
|
|
102
|
+
// `externalMcpInjection: 'claude-mcp-json'` (below) only got the file *written*; Codebuddy
|
|
103
|
+
// then had to auto-discover it, which is exactly the headless-trust-prompt hang the claude
|
|
104
|
+
// fix was built to avoid. Both flags are documented on Codebuddy's own CLI reference
|
|
105
|
+
// (`--mcp-config <fileOrString>`, `--strict-mcp-config`), so the strict-isolation guarantee
|
|
106
|
+
// is not silently degraded here relative to claude.
|
|
107
|
+
...buildClaudeMcpConfigArgs({ runtimeContext }, options),
|
|
108
|
+
];
|
|
109
|
+
},
|
|
110
|
+
promptViaStdin: true,
|
|
111
|
+
promptInputFormat: 'stream-json',
|
|
112
|
+
streamFormat: 'claude-stream-json',
|
|
113
|
+
// Codebuddy CLI auto-loads `.mcp.json` from the project cwd at spawn
|
|
114
|
+
// (same behavior as Claude Code), so the daemon can write the user's
|
|
115
|
+
// external MCP servers there before launching.
|
|
116
|
+
externalMcpInjection: 'claude-mcp-json',
|
|
117
|
+
resumesSessionViaCli: true,
|
|
118
|
+
installUrl: 'https://www.codebuddy.cn',
|
|
119
|
+
docsUrl: 'https://www.codebuddy.cn/docs/workbuddy/Overview',
|
|
120
|
+
};
|
|
121
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { json } from '../../model-discovery-config-types.js';
|
|
2
|
+
export const codebuddyModelConfig = {
|
|
3
|
+
files: ({ user, local }) => [json({ path: user('.codebuddy/settings.json') }), json({ path: local('.codebuddy/settings.json') }), json({ path: local('.codebuddy/settings.local.json') })],
|
|
4
|
+
};
|
|
5
|
+
//# sourceMappingURL=model-discovery.js.map
|
package/dist/defs/codebuddy.d.ts
CHANGED
|
@@ -1,48 +1,2 @@
|
|
|
1
|
-
export
|
|
2
|
-
id: string;
|
|
3
|
-
name: string;
|
|
4
|
-
bin: string;
|
|
5
|
-
fallbackBins: string[];
|
|
6
|
-
versionArgs: string[];
|
|
7
|
-
helpArgs: string[];
|
|
8
|
-
capabilityFlags: {
|
|
9
|
-
'--include-partial-messages': string;
|
|
10
|
-
'--add-dir': string;
|
|
11
|
-
};
|
|
12
|
-
fallbackModels: import("../model-contracts.js").RuntimeModelOption[];
|
|
13
|
-
reasoningOptions: {
|
|
14
|
-
id: string;
|
|
15
|
-
label: string;
|
|
16
|
-
}[];
|
|
17
|
-
buildArgs: (_requiredArgs: {
|
|
18
|
-
prompt: string;
|
|
19
|
-
imagePaths: string[];
|
|
20
|
-
}, { extraAllowedDirs, options, runtimeContext }?: {
|
|
21
|
-
extraAllowedDirs?: string[];
|
|
22
|
-
options?: import("../types.js").RuntimeBuildOptions;
|
|
23
|
-
runtimeContext?: import("../types.js").RuntimeContext;
|
|
24
|
-
} | undefined) => string[];
|
|
25
|
-
promptViaStdin: true;
|
|
26
|
-
promptInputFormat: "stream-json";
|
|
27
|
-
streamFormat: string;
|
|
28
|
-
externalMcpInjection: "claude-mcp-json";
|
|
29
|
-
resumesSessionViaCli: true;
|
|
30
|
-
installUrl: string;
|
|
31
|
-
docsUrl: string;
|
|
32
|
-
discoverModels(requiredArgs: {
|
|
33
|
-
context: import("../model-discovery-types.js").ModelDiscoveryContext;
|
|
34
|
-
}, optionalArgs?: {
|
|
35
|
-
signal?: AbortSignal;
|
|
36
|
-
force?: boolean;
|
|
37
|
-
staleWhileRevalidate?: boolean;
|
|
38
|
-
deps?: import("../model-discovery-types.js").ModelDiscoveryDeps;
|
|
39
|
-
}): Promise<import("../model-discovery-types.js").ModelCatalogSnapshot>;
|
|
40
|
-
resolveDefaultModel(requiredArgs: {
|
|
41
|
-
context: import("../model-discovery-types.js").ModelDiscoveryContext;
|
|
42
|
-
catalog: import("../model-discovery-types.js").ModelCatalogSnapshot;
|
|
43
|
-
}, optionalArgs?: {
|
|
44
|
-
signal?: AbortSignal;
|
|
45
|
-
deps?: import("../model-discovery-types.js").ModelDiscoveryDeps;
|
|
46
|
-
}): Promise<import("../model-discovery-types.js").DefaultModelResolution>;
|
|
47
|
-
};
|
|
1
|
+
export * from './codebuddy/index.js';
|
|
48
2
|
//# sourceMappingURL=codebuddy.d.ts.map
|
package/dist/defs/codebuddy.js
CHANGED
|
@@ -1,121 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
import { addDirArgs, nonDefaultFlag, permissionModeArgs, resolveCapabilities, sessionArgs } from './claude-compatible-args.js';
|
|
3
|
-
import { buildClaudeMcpConfigArgs, DEFAULT_MODEL_OPTION } from './shared.js';
|
|
4
|
-
// Codebuddy Code (https://www.codebuddy.cn) — a Claude Code–compatible CLI
|
|
5
|
-
// that ships as `codebuddy` (short alias: `cbc`). The argument surface is a
|
|
6
|
-
// superset of Claude Code's `-p` mode: `--output-format stream-json`,
|
|
7
|
-
// `--input-format stream-json`, `--permission-mode`, `--session-id`,
|
|
8
|
-
// `--resume`, `--add-dir`, `--include-partial-messages`, and `--model` all
|
|
9
|
-
// work identically. The stream wire format matches Claude Code's, so we reuse
|
|
10
|
-
// `streamFormat: 'claude-stream-json'`.
|
|
11
|
-
//
|
|
12
|
-
// Key differences from the claude adapter:
|
|
13
|
-
// • Binary names: `codebuddy` / `cbc` (not `claude` / `openclaude`).
|
|
14
|
-
// • `--effort` flag for reasoning control (minimal/low/medium/high/xhigh/max).
|
|
15
|
-
// • Richer multi-provider model list (GLM, Kimi, MiniMax, Claude, GPT,
|
|
16
|
-
// Gemini, DeepSeek) exposed through `--model <id>`.
|
|
17
|
-
// • `--mcp-config <fileOrString>` for MCP server injection (the daemon can
|
|
18
|
-
// also write `.mcp.json` to the project cwd, same as Claude Code).
|
|
19
|
-
const CODEBUDDY_FALLBACK_MODELS = [
|
|
20
|
-
DEFAULT_MODEL_OPTION,
|
|
21
|
-
// GLM family (Zhipu AI)
|
|
22
|
-
{ id: 'glm-5.1-ioa', label: 'glm-5.1-ioa' },
|
|
23
|
-
{ id: 'glm-5v-turbo-ioa', label: 'glm-5v-turbo-ioa' },
|
|
24
|
-
// Claude family (via Codebuddy proxy)
|
|
25
|
-
{ id: 'claude-opus-4.8-1m', label: 'claude-opus-4.8-1m' },
|
|
26
|
-
{ id: 'claude-opus-4.8', label: 'claude-opus-4.8' },
|
|
27
|
-
{ id: 'claude-sonnet-4.6-1m', label: 'claude-sonnet-4.6-1m' },
|
|
28
|
-
{ id: 'claude-haiku-4.5', label: 'claude-haiku-4.5' },
|
|
29
|
-
// GPT family
|
|
30
|
-
{ id: 'gpt-5.5', label: 'gpt-5.5' },
|
|
31
|
-
{ id: 'gpt-5.4', label: 'gpt-5.4' },
|
|
32
|
-
{ id: 'gpt-5.3-codex', label: 'gpt-5.3-codex' },
|
|
33
|
-
// Gemini family
|
|
34
|
-
{ id: 'gemini-3.5-flash', label: 'gemini-3.5-flash' },
|
|
35
|
-
// DeepSeek family
|
|
36
|
-
{ id: 'deepseek-v4-pro-ioa', label: 'deepseek-v4-pro-ioa' },
|
|
37
|
-
{ id: 'deepseek-v4-flash-ioa', label: 'deepseek-v4-flash-ioa' },
|
|
38
|
-
// Kimi family
|
|
39
|
-
{ id: 'kimi-k2.6-ioa', label: 'kimi-k2.6-ioa' },
|
|
40
|
-
// MiniMax family
|
|
41
|
-
{ id: 'minimax-m3-ioa', label: 'minimax-m3-ioa' },
|
|
42
|
-
{ id: 'minimax-m2.7-ioa', label: 'minimax-m2.7-ioa' },
|
|
43
|
-
];
|
|
44
|
-
export const codebuddyAgentDef = {
|
|
45
|
-
// UNVERIFIED live integration locally; source/category and limits are documented in model-discovery-adapters.ts.
|
|
46
|
-
...createAgentModelDiscovery('codebuddy', { fallbackModels: () => codebuddyAgentDef.fallbackModels }),
|
|
47
|
-
id: 'codebuddy',
|
|
48
|
-
name: 'Codebuddy Code',
|
|
49
|
-
bin: 'codebuddy',
|
|
50
|
-
// `cbc` is the short alias shipped alongside `codebuddy`. Tried as a
|
|
51
|
-
// fallback when the primary binary isn't on PATH.
|
|
52
|
-
fallbackBins: ['cbc'],
|
|
53
|
-
versionArgs: ['--version'],
|
|
54
|
-
helpArgs: ['-p', '--help'],
|
|
55
|
-
capabilityFlags: {
|
|
56
|
-
// Same probing strategy as the claude adapter: these flags live under
|
|
57
|
-
// the `-p` subcommand help, so we probe `codebuddy -p --help`.
|
|
58
|
-
'--include-partial-messages': 'partialMessages',
|
|
59
|
-
'--add-dir': 'addDir',
|
|
60
|
-
},
|
|
61
|
-
fallbackModels: CODEBUDDY_FALLBACK_MODELS,
|
|
62
|
-
// Codebuddy CLI does not ship a `models` subcommand; the supported model
|
|
63
|
-
// ids are advertised in `--help` output. Fallback list above covers the
|
|
64
|
-
// current set; users can type custom ids through the "Custom" input.
|
|
65
|
-
// Codebuddy CLI --effort supports exactly 6 levels:
|
|
66
|
-
// minimal, low, medium, high, xhigh, max
|
|
67
|
-
// We additionally expose a synthetic `default` sentinel as the FIRST
|
|
68
|
-
// option so the web pickers (AvatarMenu / SettingsDialog) — which
|
|
69
|
-
// fall back to `reasoningOptions[0].id` when nothing is saved yet —
|
|
70
|
-
// surface a real "use Codebuddy's own default" choice that round-trips
|
|
71
|
-
// to "no --effort flag". `buildArgs` treats `default` as omit.
|
|
72
|
-
reasoningOptions: [
|
|
73
|
-
{ id: 'default', label: 'Default' },
|
|
74
|
-
{ id: 'minimal', label: 'Minimal' },
|
|
75
|
-
{ id: 'low', label: 'Low' },
|
|
76
|
-
{ id: 'medium', label: 'Medium' },
|
|
77
|
-
{ id: 'high', label: 'High' },
|
|
78
|
-
{ id: 'xhigh', label: 'XHigh' },
|
|
79
|
-
{ id: 'max', label: 'Max' },
|
|
80
|
-
],
|
|
81
|
-
buildArgs: (_requiredArgs, { extraAllowedDirs = [], options = {}, runtimeContext = {} } = {}) => {
|
|
82
|
-
const caps = resolveCapabilities({ agentId: 'codebuddy', options });
|
|
83
|
-
return [
|
|
84
|
-
// Same stdin strategy as Claude Code: `--input-format stream-json`
|
|
85
|
-
// enables JSONL stdin so the daemon can answer AskUserQuestion tool
|
|
86
|
-
// calls. `--output-format stream-json` gives us SSE-style events.
|
|
87
|
-
'-p', '--input-format', 'stream-json', '--output-format', 'stream-json', '--verbose',
|
|
88
|
-
// `--include-partial-messages` lands richer streaming deltas. Gate on
|
|
89
|
-
// the help-text probe to avoid "unknown option" errors on older builds.
|
|
90
|
-
...(caps.partialMessages ? ['--include-partial-messages'] : []),
|
|
91
|
-
...nonDefaultFlag({ flag: '--model', value: options.model }),
|
|
92
|
-
// Reasoning effort control — Codebuddy supports `--effort <level>`.
|
|
93
|
-
// The `default` sentinel means "let Codebuddy pick" — omit the flag.
|
|
94
|
-
...nonDefaultFlag({ flag: '--effort', value: options.reasoning }),
|
|
95
|
-
...addDirArgs({ extraAllowedDirs, caps }),
|
|
96
|
-
// Session continuity: Codebuddy supports `--resume <id>` and
|
|
97
|
-
// `--session-id <uuid>` identically to Claude Code.
|
|
98
|
-
...sessionArgs(runtimeContext),
|
|
99
|
-
...permissionModeArgs(options),
|
|
100
|
-
// Same explicit staged-config delivery as the claude def, through the same shared helper —
|
|
101
|
-
// see `buildClaudeMcpConfigArgs`'s doc. Without this, declaring
|
|
102
|
-
// `externalMcpInjection: 'claude-mcp-json'` (below) only got the file *written*; Codebuddy
|
|
103
|
-
// then had to auto-discover it, which is exactly the headless-trust-prompt hang the claude
|
|
104
|
-
// fix was built to avoid. Both flags are documented on Codebuddy's own CLI reference
|
|
105
|
-
// (`--mcp-config <fileOrString>`, `--strict-mcp-config`), so the strict-isolation guarantee
|
|
106
|
-
// is not silently degraded here relative to claude.
|
|
107
|
-
...buildClaudeMcpConfigArgs(runtimeContext, options),
|
|
108
|
-
];
|
|
109
|
-
},
|
|
110
|
-
promptViaStdin: true,
|
|
111
|
-
promptInputFormat: 'stream-json',
|
|
112
|
-
streamFormat: 'claude-stream-json',
|
|
113
|
-
// Codebuddy CLI auto-loads `.mcp.json` from the project cwd at spawn
|
|
114
|
-
// (same behavior as Claude Code), so the daemon can write the user's
|
|
115
|
-
// external MCP servers there before launching.
|
|
116
|
-
externalMcpInjection: 'claude-mcp-json',
|
|
117
|
-
resumesSessionViaCli: true,
|
|
118
|
-
installUrl: 'https://www.codebuddy.cn',
|
|
119
|
-
docsUrl: 'https://www.codebuddy.cn/docs/workbuddy/Overview',
|
|
120
|
-
};
|
|
1
|
+
export * from './codebuddy/index.js';
|
|
121
2
|
//# sourceMappingURL=codebuddy.js.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ParserState, StreamEventHandler } from '../../json-event-stream-shared.js';
|
|
2
|
+
export type CodexStreamState = {
|
|
3
|
+
toolUses: Set<string>;
|
|
4
|
+
errorEmitted: boolean;
|
|
5
|
+
previousEventWasAgentMessage: boolean;
|
|
6
|
+
lastAgentMessageEndedWithNewline: boolean;
|
|
7
|
+
};
|
|
8
|
+
export declare function createCodexStreamState(): CodexStreamState;
|
|
9
|
+
export declare function handleCodexEvent(obj: unknown, onEvent: StreamEventHandler, state: ParserState): boolean;
|
|
10
|
+
//# sourceMappingURL=event-stream.d.ts.map
|