@jini-ai/agent-runtime 0.7.2 → 0.7.3-next.2
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 -3
- 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 +6 -1
- package/dist/agent-protocol/acp/constants.js +7 -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 +161 -128
- 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 +231 -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 +28 -16
- 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/ai-trace/types.d.ts
DELETED
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module ai-trace/types
|
|
3
|
-
*
|
|
4
|
-
* Vendor-neutral AI-run trace contract: run → model turns → tool calls → outcome.
|
|
5
|
-
*
|
|
6
|
-
* Why a sibling port and not more `RunLifecycleEvent` variants: `TelemetrySink` is the
|
|
7
|
-
* product-analytics port and its `data` is deliberately opaque so the engine never installs a
|
|
8
|
-
* product's event schema. A trace is the opposite — a typed, hierarchical span tree that every
|
|
9
|
-
* backend (Langfuse, Phoenix, Helicone, OTel GenAI) maps field-for-field. Widening the analytics
|
|
10
|
-
* union would force every existing analytics sink to understand spans; a sibling port keeps both
|
|
11
|
-
* contracts small and lets a host install either, both, or neither.
|
|
12
|
-
*
|
|
13
|
-
* Honesty rule: a field a provider stream cannot supply is `null`, never estimated in place.
|
|
14
|
-
* Cost a host prices itself is marked `costSource: 'estimated'`.
|
|
15
|
-
*/
|
|
16
|
-
/** How much prompt/response/tool text leaves the process. `off`: none; `metadata`: char counts only; `full`: redacted text. */
|
|
17
|
-
export type AiContentCapture = 'off' | 'metadata' | 'full';
|
|
18
|
-
/** Why a tool call failed — the split that tells "the model called it wrong" apart from "the tool broke". */
|
|
19
|
-
export type AiToolErrorClass = 'input_validation' | 'execution' | 'denied' | 'timeout';
|
|
20
|
-
export type AiRunOutcome = 'succeeded' | 'failed' | 'cancelled';
|
|
21
|
-
/** Captured text after the capture mode and redaction ran. `text` is present only in `full` mode. */
|
|
22
|
-
export interface AiCapturedText {
|
|
23
|
-
readonly chars: number;
|
|
24
|
-
readonly text?: string;
|
|
25
|
-
readonly truncated?: boolean;
|
|
26
|
-
/** Per-category redaction counts (`{ email: 1 }`), so a reviewer sees what was stripped. */
|
|
27
|
-
readonly redactions?: Readonly<Record<string, number>>;
|
|
28
|
-
}
|
|
29
|
-
/** Token counters; `null` means the provider did not report that counter, not zero. */
|
|
30
|
-
export interface AiTokenUsage {
|
|
31
|
-
readonly inputTokens: number | null;
|
|
32
|
-
readonly outputTokens: number | null;
|
|
33
|
-
readonly cacheReadTokens: number | null;
|
|
34
|
-
readonly cacheWriteTokens: number | null;
|
|
35
|
-
readonly reasoningTokens: number | null;
|
|
36
|
-
}
|
|
37
|
-
export type AiCostSource = 'provider' | 'estimated';
|
|
38
|
-
export interface AiTraceRunStarted {
|
|
39
|
-
readonly kind: 'run_started';
|
|
40
|
-
readonly traceId: string;
|
|
41
|
-
readonly runId: string;
|
|
42
|
-
readonly at: number;
|
|
43
|
-
readonly agentId: string;
|
|
44
|
-
readonly provider: string | null;
|
|
45
|
-
readonly model: string | null;
|
|
46
|
-
/** Host conversation/chat id, so a backend can group runs into sessions. */
|
|
47
|
-
readonly sessionId: string | null;
|
|
48
|
-
readonly input: AiCapturedText | null;
|
|
49
|
-
readonly tags: readonly string[];
|
|
50
|
-
}
|
|
51
|
-
/** One explicit provider request, or a run-level window when the stream supplies no request boundaries. */
|
|
52
|
-
export interface AiTraceModelTurn {
|
|
53
|
-
readonly kind: 'model_turn';
|
|
54
|
-
readonly traceId: string;
|
|
55
|
-
readonly turnId: string;
|
|
56
|
-
readonly index: number;
|
|
57
|
-
readonly startedAt: number;
|
|
58
|
-
readonly endedAt: number;
|
|
59
|
-
readonly model: string | null;
|
|
60
|
-
readonly input: AiCapturedText | null;
|
|
61
|
-
readonly output: AiCapturedText | null;
|
|
62
|
-
readonly reasoning: AiCapturedText | null;
|
|
63
|
-
readonly usage: AiTokenUsage | null;
|
|
64
|
-
readonly costUsd: number | null;
|
|
65
|
-
readonly costSource: AiCostSource | null;
|
|
66
|
-
readonly ttftMs: number | null;
|
|
67
|
-
readonly stopReason: string | null;
|
|
68
|
-
readonly error: string | null;
|
|
69
|
-
/** Error text follows the same capture policy as prompts; `error` is a safe label outside full mode. */
|
|
70
|
-
readonly errorContent?: AiCapturedText | null;
|
|
71
|
-
readonly errorCode?: string | null;
|
|
72
|
-
/** Calls requested by this generation, including tools still pending when the turn closes. */
|
|
73
|
-
readonly toolCallCount?: number;
|
|
74
|
-
}
|
|
75
|
-
export interface AiTraceToolCall {
|
|
76
|
-
readonly kind: 'tool_call';
|
|
77
|
-
readonly traceId: string;
|
|
78
|
-
/** Request-scoped trace identity; provider ids may repeat on the next request. */
|
|
79
|
-
readonly toolCallId: string;
|
|
80
|
-
/** The model turn that requested the call. */
|
|
81
|
-
readonly turnId: string;
|
|
82
|
-
readonly name: string;
|
|
83
|
-
readonly input: AiCapturedText | null;
|
|
84
|
-
readonly output: AiCapturedText | null;
|
|
85
|
-
readonly isError: boolean;
|
|
86
|
-
readonly errorClass: AiToolErrorClass | null;
|
|
87
|
-
readonly startedAt: number;
|
|
88
|
-
/** `null` when the run ended before the tool reported a result. */
|
|
89
|
-
readonly endedAt: number | null;
|
|
90
|
-
}
|
|
91
|
-
export interface AiTraceTotals {
|
|
92
|
-
readonly turns: number;
|
|
93
|
-
readonly toolCalls: number;
|
|
94
|
-
readonly toolErrors: number;
|
|
95
|
-
readonly inputTokens: number | null;
|
|
96
|
-
readonly outputTokens: number | null;
|
|
97
|
-
readonly costUsd: number | null;
|
|
98
|
-
}
|
|
99
|
-
export interface AiTraceRunFinished {
|
|
100
|
-
readonly kind: 'run_finished';
|
|
101
|
-
readonly traceId: string;
|
|
102
|
-
readonly at: number;
|
|
103
|
-
readonly outcome: AiRunOutcome;
|
|
104
|
-
readonly error: {
|
|
105
|
-
readonly message: string;
|
|
106
|
-
readonly code: string | null;
|
|
107
|
-
readonly content?: AiCapturedText | null;
|
|
108
|
-
} | null;
|
|
109
|
-
readonly totals: AiTraceTotals;
|
|
110
|
-
}
|
|
111
|
-
export type AiTraceEvent = AiTraceRunStarted | AiTraceModelTurn | AiTraceToolCall | AiTraceRunFinished;
|
|
112
|
-
/**
|
|
113
|
-
* Backend port. `record` must not throw into the run (the recorder guards it anyway) and must not
|
|
114
|
-
* block: adapters buffer and send in `flush`. Hosts call `shutdown` once on process exit.
|
|
115
|
-
*/
|
|
116
|
-
export interface AiTraceSink {
|
|
117
|
-
/** Requested content policy. Absent means metadata; fan-out preserves each sink's policy. */
|
|
118
|
-
readonly capture?: AiContentCapture;
|
|
119
|
-
record(event: AiTraceEvent): void;
|
|
120
|
-
flush?(): Promise<void>;
|
|
121
|
-
shutdown?(): Promise<void>;
|
|
122
|
-
}
|
|
123
|
-
//# sourceMappingURL=types.d.ts.map
|
package/dist/ai-trace/types.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module ai-trace/types
|
|
3
|
-
*
|
|
4
|
-
* Vendor-neutral AI-run trace contract: run → model turns → tool calls → outcome.
|
|
5
|
-
*
|
|
6
|
-
* Why a sibling port and not more `RunLifecycleEvent` variants: `TelemetrySink` is the
|
|
7
|
-
* product-analytics port and its `data` is deliberately opaque so the engine never installs a
|
|
8
|
-
* product's event schema. A trace is the opposite — a typed, hierarchical span tree that every
|
|
9
|
-
* backend (Langfuse, Phoenix, Helicone, OTel GenAI) maps field-for-field. Widening the analytics
|
|
10
|
-
* union would force every existing analytics sink to understand spans; a sibling port keeps both
|
|
11
|
-
* contracts small and lets a host install either, both, or neither.
|
|
12
|
-
*
|
|
13
|
-
* Honesty rule: a field a provider stream cannot supply is `null`, never estimated in place.
|
|
14
|
-
* Cost a host prices itself is marked `costSource: 'estimated'`.
|
|
15
|
-
*/
|
|
16
|
-
export {};
|
|
17
|
-
//# sourceMappingURL=types.js.map
|
package/dist/ai-trace/usage.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module ai-trace/usage
|
|
3
|
-
* Folds every provider's usage spelling into {@link AiTokenUsage}. Each counter takes the first
|
|
4
|
-
* alias the provider actually reported; a counter no alias matched stays `null` (never `0`).
|
|
5
|
-
*/
|
|
6
|
-
import type { AiTokenUsage } from './types.js';
|
|
7
|
-
/** Returns `null` when the input is not a usage object or carries no recognised counter. */
|
|
8
|
-
export declare function normalizeAiUsage({ usage }: {
|
|
9
|
-
usage: unknown;
|
|
10
|
-
}, _options?: Record<string, never>): AiTokenUsage | null;
|
|
11
|
-
/** Adds two nullable counters; `null + null` stays `null` so "never reported" survives totals. */
|
|
12
|
-
export declare function addNullable(a: number | null, b: number | null): number | null;
|
|
13
|
-
//# sourceMappingURL=usage.d.ts.map
|
package/dist/ai-trace/usage.js
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
// Dotted paths reach OpenAI's nested `*_details` objects. Order matters only when a provider
|
|
2
|
-
// reports two spellings of the same counter, which none of the normalizers do today.
|
|
3
|
-
const USAGE_ALIASES = {
|
|
4
|
-
inputTokens: ['input_tokens', 'inputTokens', 'prompt_tokens', 'promptTokenCount'],
|
|
5
|
-
outputTokens: ['output_tokens', 'outputTokens', 'completion_tokens', 'candidatesTokenCount'],
|
|
6
|
-
cacheReadTokens: ['cache_read_input_tokens', 'cached_read_tokens', 'cachedReadTokens', 'cacheReadTokens', 'prompt_tokens_details.cached_tokens', 'cachedContentTokenCount'],
|
|
7
|
-
cacheWriteTokens: ['cache_creation_input_tokens', 'cached_write_tokens', 'cacheWriteTokens'],
|
|
8
|
-
reasoningTokens: ['thought_tokens', 'thoughtTokens', 'reasoningTokens', 'completion_tokens_details.reasoning_tokens', 'thoughtsTokenCount', 'reasoning_tokens'],
|
|
9
|
-
};
|
|
10
|
-
function isRecord(value) {
|
|
11
|
-
return value !== null && typeof value === 'object' && !Array.isArray(value);
|
|
12
|
-
}
|
|
13
|
-
function readPath(source, path) {
|
|
14
|
-
let current = source;
|
|
15
|
-
for (const part of path.split('.'))
|
|
16
|
-
current = isRecord(current) ? current[part] : undefined;
|
|
17
|
-
return current;
|
|
18
|
-
}
|
|
19
|
-
function firstNumber(source, aliases) {
|
|
20
|
-
for (const alias of aliases) {
|
|
21
|
-
const value = readPath(source, alias);
|
|
22
|
-
if (typeof value === 'number' && Number.isFinite(value))
|
|
23
|
-
return value;
|
|
24
|
-
}
|
|
25
|
-
return null;
|
|
26
|
-
}
|
|
27
|
-
/** Returns `null` when the input is not a usage object or carries no recognised counter. */
|
|
28
|
-
export function normalizeAiUsage({ usage }, _options = {}) {
|
|
29
|
-
if (!isRecord(usage))
|
|
30
|
-
return null;
|
|
31
|
-
const out = {};
|
|
32
|
-
let found = false;
|
|
33
|
-
for (const key of Object.keys(USAGE_ALIASES)) {
|
|
34
|
-
out[key] = firstNumber(usage, USAGE_ALIASES[key]);
|
|
35
|
-
found ||= out[key] !== null;
|
|
36
|
-
}
|
|
37
|
-
return found ? out : null;
|
|
38
|
-
}
|
|
39
|
-
/** Adds two nullable counters; `null + null` stays `null` so "never reported" survives totals. */
|
|
40
|
-
export function addNullable(a, b) {
|
|
41
|
-
if (a === null && b === null)
|
|
42
|
-
return null;
|
|
43
|
-
return (a ?? 0) + (b ?? 0);
|
|
44
|
-
}
|
|
45
|
-
//# sourceMappingURL=usage.js.map
|
package/dist/copilot-stream.d.ts
DELETED
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module copilot-stream
|
|
3
|
-
*
|
|
4
|
-
* Parses GitHub Copilot CLI's `--output-format json` JSONL stream into the
|
|
5
|
-
* same UI-friendly events that claude-stream.js emits, so the chat panel
|
|
6
|
-
* can render Copilot's thinking / tool calls / text the same way it does
|
|
7
|
-
* Claude Code's.
|
|
8
|
-
*
|
|
9
|
-
* Copilot's schema uses dotted top-level types (`assistant.*`, `tool.*`,
|
|
10
|
-
* `session.*`, `user.*`, `result`) with the payload under `data`. The
|
|
11
|
-
* `ephemeral: true` events (session.mcp_*, reasoning_delta, etc.) are still
|
|
12
|
-
* useful — they carry the streaming deltas — but events we don't have a UI
|
|
13
|
-
* lane for (mcp_server_status, skills_loaded, full reasoning recap, turn
|
|
14
|
-
* boundaries) are dropped on the floor.
|
|
15
|
-
*
|
|
16
|
-
* Mapping:
|
|
17
|
-
* session.tools_updated -> status (initializing, with model name)
|
|
18
|
-
* assistant.turn_start -> status (streaming)
|
|
19
|
-
* assistant.reasoning_delta -> thinking_delta
|
|
20
|
-
* assistant.message_delta -> text_delta
|
|
21
|
-
* tool.execution_start -> tool_use
|
|
22
|
-
* tool.execution_complete -> tool_result
|
|
23
|
-
* result -> usage
|
|
24
|
-
*/
|
|
25
|
-
/** Every event `createCopilotStreamHandler` can emit, discriminated on `type` — see `claude-stream.ts`'s `ClaudeStreamEvent` doc for why this is exported rather than left as `Record<string, unknown>`. */
|
|
26
|
-
export type CopilotStreamEvent = {
|
|
27
|
-
type: 'raw';
|
|
28
|
-
line: string;
|
|
29
|
-
} | {
|
|
30
|
-
type: 'status';
|
|
31
|
-
label: 'initializing';
|
|
32
|
-
model: unknown;
|
|
33
|
-
} | {
|
|
34
|
-
type: 'status';
|
|
35
|
-
label: 'streaming';
|
|
36
|
-
} | {
|
|
37
|
-
type: 'thinking_delta' | 'text_delta';
|
|
38
|
-
delta: string;
|
|
39
|
-
} | {
|
|
40
|
-
type: 'tool_use';
|
|
41
|
-
id: unknown;
|
|
42
|
-
name: unknown;
|
|
43
|
-
input: unknown;
|
|
44
|
-
} | {
|
|
45
|
-
type: 'tool_result';
|
|
46
|
-
toolUseId: unknown;
|
|
47
|
-
content: string;
|
|
48
|
-
isError: boolean;
|
|
49
|
-
} | {
|
|
50
|
-
type: 'usage';
|
|
51
|
-
usage: unknown;
|
|
52
|
-
stopReason: 'completed' | 'error';
|
|
53
|
-
durationMs: unknown;
|
|
54
|
-
};
|
|
55
|
-
type EventSink = (event: CopilotStreamEvent) => void;
|
|
56
|
-
export declare function createCopilotStreamHandler({ onEvent }: {
|
|
57
|
-
onEvent: EventSink;
|
|
58
|
-
}): {
|
|
59
|
-
feed: ({ chunk }: {
|
|
60
|
-
chunk: string;
|
|
61
|
-
}) => void;
|
|
62
|
-
flush: () => void;
|
|
63
|
-
};
|
|
64
|
-
export {};
|
|
65
|
-
//# sourceMappingURL=copilot-stream.d.ts.map
|
package/dist/copilot-stream.js
DELETED
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module copilot-stream
|
|
3
|
-
*
|
|
4
|
-
* Parses GitHub Copilot CLI's `--output-format json` JSONL stream into the
|
|
5
|
-
* same UI-friendly events that claude-stream.js emits, so the chat panel
|
|
6
|
-
* can render Copilot's thinking / tool calls / text the same way it does
|
|
7
|
-
* Claude Code's.
|
|
8
|
-
*
|
|
9
|
-
* Copilot's schema uses dotted top-level types (`assistant.*`, `tool.*`,
|
|
10
|
-
* `session.*`, `user.*`, `result`) with the payload under `data`. The
|
|
11
|
-
* `ephemeral: true` events (session.mcp_*, reasoning_delta, etc.) are still
|
|
12
|
-
* useful — they carry the streaming deltas — but events we don't have a UI
|
|
13
|
-
* lane for (mcp_server_status, skills_loaded, full reasoning recap, turn
|
|
14
|
-
* boundaries) are dropped on the floor.
|
|
15
|
-
*
|
|
16
|
-
* Mapping:
|
|
17
|
-
* session.tools_updated -> status (initializing, with model name)
|
|
18
|
-
* assistant.turn_start -> status (streaming)
|
|
19
|
-
* assistant.reasoning_delta -> thinking_delta
|
|
20
|
-
* assistant.message_delta -> text_delta
|
|
21
|
-
* tool.execution_start -> tool_use
|
|
22
|
-
* tool.execution_complete -> tool_result
|
|
23
|
-
* result -> usage
|
|
24
|
-
*/
|
|
25
|
-
function isRecord(value) {
|
|
26
|
-
return Boolean(value) && typeof value === 'object' && !Array.isArray(value);
|
|
27
|
-
}
|
|
28
|
-
export function createCopilotStreamHandler({ onEvent }) {
|
|
29
|
-
let buffer = '';
|
|
30
|
-
function feed({ chunk }) {
|
|
31
|
-
buffer += chunk;
|
|
32
|
-
let nl;
|
|
33
|
-
while ((nl = buffer.indexOf('\n')) !== -1) {
|
|
34
|
-
const line = buffer.slice(0, nl).trim();
|
|
35
|
-
buffer = buffer.slice(nl + 1);
|
|
36
|
-
if (!line)
|
|
37
|
-
continue;
|
|
38
|
-
let obj;
|
|
39
|
-
try {
|
|
40
|
-
obj = JSON.parse(line);
|
|
41
|
-
}
|
|
42
|
-
catch {
|
|
43
|
-
onEvent({ type: 'raw', line });
|
|
44
|
-
continue;
|
|
45
|
-
}
|
|
46
|
-
handleObject(obj);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
function flush() {
|
|
50
|
-
const rem = buffer.trim();
|
|
51
|
-
buffer = '';
|
|
52
|
-
if (!rem)
|
|
53
|
-
return;
|
|
54
|
-
try {
|
|
55
|
-
handleObject(JSON.parse(rem));
|
|
56
|
-
}
|
|
57
|
-
catch {
|
|
58
|
-
onEvent({ type: 'raw', line: rem });
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
function handleObject(obj) {
|
|
62
|
-
if (!isRecord(obj) || typeof obj.type !== 'string')
|
|
63
|
-
return;
|
|
64
|
-
const data = isRecord(obj.data) ? obj.data : {};
|
|
65
|
-
switch (obj.type) {
|
|
66
|
-
case 'session.tools_updated':
|
|
67
|
-
if (data.model) {
|
|
68
|
-
onEvent({ type: 'status', label: 'initializing', model: data.model });
|
|
69
|
-
}
|
|
70
|
-
return;
|
|
71
|
-
case 'assistant.turn_start':
|
|
72
|
-
onEvent({ type: 'status', label: 'streaming' });
|
|
73
|
-
return;
|
|
74
|
-
case 'assistant.reasoning_delta':
|
|
75
|
-
if (typeof data.deltaContent === 'string') {
|
|
76
|
-
onEvent({ type: 'thinking_delta', delta: data.deltaContent });
|
|
77
|
-
}
|
|
78
|
-
return;
|
|
79
|
-
case 'assistant.message_delta':
|
|
80
|
-
if (typeof data.deltaContent === 'string') {
|
|
81
|
-
onEvent({ type: 'text_delta', delta: data.deltaContent });
|
|
82
|
-
}
|
|
83
|
-
return;
|
|
84
|
-
case 'tool.execution_start':
|
|
85
|
-
onEvent({
|
|
86
|
-
type: 'tool_use',
|
|
87
|
-
id: data.toolCallId ?? null,
|
|
88
|
-
name: data.toolName ?? null,
|
|
89
|
-
input: data.arguments ?? null,
|
|
90
|
-
});
|
|
91
|
-
return;
|
|
92
|
-
case 'tool.execution_complete':
|
|
93
|
-
onEvent({
|
|
94
|
-
type: 'tool_result',
|
|
95
|
-
toolUseId: data.toolCallId ?? null,
|
|
96
|
-
content: stringifyResult(data.result),
|
|
97
|
-
isError: data.success === false,
|
|
98
|
-
});
|
|
99
|
-
return;
|
|
100
|
-
case 'result':
|
|
101
|
-
// `result` puts usage / exitCode at the top level, not under `data`.
|
|
102
|
-
// Treat a missing exitCode as success when `success: true` is set —
|
|
103
|
-
// strict `=== 0` would otherwise mis-flag turns where Copilot emits
|
|
104
|
-
// usage without a numeric exit code as `error`.
|
|
105
|
-
onEvent({
|
|
106
|
-
type: 'usage',
|
|
107
|
-
usage: obj.usage ?? null,
|
|
108
|
-
stopReason: obj.success === true || obj.exitCode === 0 ? 'completed' : 'error',
|
|
109
|
-
durationMs: isRecord(obj.usage) ? obj.usage.sessionDurationMs ?? null : null,
|
|
110
|
-
});
|
|
111
|
-
return;
|
|
112
|
-
default:
|
|
113
|
-
return;
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
return { feed, flush };
|
|
117
|
-
}
|
|
118
|
-
function stringifyResult(r) {
|
|
119
|
-
if (r == null)
|
|
120
|
-
return '';
|
|
121
|
-
if (typeof r === 'string')
|
|
122
|
-
return r;
|
|
123
|
-
if (!isRecord(r))
|
|
124
|
-
return JSON.stringify(r);
|
|
125
|
-
if (typeof r.content === 'string')
|
|
126
|
-
return r.content;
|
|
127
|
-
if (typeof r.detailedContent === 'string')
|
|
128
|
-
return r.detailedContent;
|
|
129
|
-
return JSON.stringify(r);
|
|
130
|
-
}
|
|
131
|
-
//# sourceMappingURL=copilot-stream.js.map
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
import type { RuntimeModelOption } from '../types.js';
|
|
2
|
-
/**
|
|
3
|
-
* Redacts any OAuth sign-in URL from agy's buffered print-mode stdout,
|
|
4
|
-
* leaving all other output byte-identical.
|
|
5
|
-
*
|
|
6
|
-
* Scoped to redaction on purpose: it does **not** classify the output as an
|
|
7
|
-
* auth failure or substitute sign-in guidance for it. That classification
|
|
8
|
-
* already has an owner — `auth.ts`'s `classifyAgentAuthFailure` /
|
|
9
|
-
* `isAntigravityAuthFailureText`, consumed by whatever surfaces a structured
|
|
10
|
-
* auth error — and duplicating the decision here would mean this def silently
|
|
11
|
-
* rewrites assistant text into instructions.
|
|
12
|
-
*
|
|
13
|
-
* @param fullText - The concatenation of every stdout chunk agy produced.
|
|
14
|
-
* @returns The same text with every sign-in URL replaced by a placeholder.
|
|
15
|
-
* @complexity O(n) in the buffered text length.
|
|
16
|
-
* @overallScore 100/100
|
|
17
|
-
*/
|
|
18
|
-
export declare function redactAntigravityAuthUrls({ fullText }: {
|
|
19
|
-
fullText: string;
|
|
20
|
-
}): string;
|
|
21
|
-
/**
|
|
22
|
-
* Parses `agy models`' stdout into the shared `RuntimeModelOption[]` shape.
|
|
23
|
-
*
|
|
24
|
-
* The CLI's real output (agy v1.1.24, verified live — see this file's header
|
|
25
|
-
* comment for the exact captured transcript) is one `Fetching available
|
|
26
|
-
* models...` progress line followed by one `<slug>\t<label>` pair per line.
|
|
27
|
-
* Each data line is split on the FIRST tab only, so a label that itself
|
|
28
|
-
* contains a tab or extra whitespace never bleeds into the id.
|
|
29
|
-
*
|
|
30
|
-
* @param stdout - Raw stdout from `agy models`.
|
|
31
|
-
* @returns The synthetic default option prepended to every parsed entry, or
|
|
32
|
-
* `null` when no real entry was found (empty stdout, or only the progress
|
|
33
|
-
* line survives filtering) — mirrors `parseCursorAgentModels`'s same-shape
|
|
34
|
-
* null contract, which `detection.ts#fetchModels` already treats the same
|
|
35
|
-
* as an empty array: fall back to `fallbackModels`.
|
|
36
|
-
* @complexity O(n) in the stdout length.
|
|
37
|
-
*/
|
|
38
|
-
export declare function parseAgyModels({ stdout }: {
|
|
39
|
-
stdout: string;
|
|
40
|
-
}): RuntimeModelOption[] | null;
|
|
41
|
-
export declare const antigravityAgentDef: {
|
|
42
|
-
id: string;
|
|
43
|
-
name: string;
|
|
44
|
-
bin: string;
|
|
45
|
-
versionArgs: string[];
|
|
46
|
-
listModels: {
|
|
47
|
-
args: string[];
|
|
48
|
-
parse: typeof parseAgyModels;
|
|
49
|
-
timeoutMs: number;
|
|
50
|
-
};
|
|
51
|
-
fallbackModelsAssertedAt: string;
|
|
52
|
-
fallbackModels: RuntimeModelOption[];
|
|
53
|
-
supportsCustomModel: false;
|
|
54
|
-
reasoningInModelId: {
|
|
55
|
-
levels: {
|
|
56
|
-
id: string;
|
|
57
|
-
label: string;
|
|
58
|
-
}[];
|
|
59
|
-
};
|
|
60
|
-
buildArgs: ({ prompt, imagePaths: _imagePaths }: {
|
|
61
|
-
prompt: string;
|
|
62
|
-
imagePaths: string[];
|
|
63
|
-
}, { extraAllowedDirs: _extra, options, runtimeContext }?: {
|
|
64
|
-
extraAllowedDirs?: string[];
|
|
65
|
-
options?: import("../types.js").RuntimeBuildOptions;
|
|
66
|
-
runtimeContext?: import("../types.js").RuntimeContext;
|
|
67
|
-
} | undefined) => string[];
|
|
68
|
-
maxPromptArgBytes: number;
|
|
69
|
-
streamFormat: string;
|
|
70
|
-
needsAgentLogFile: true;
|
|
71
|
-
stdoutPolicy: {
|
|
72
|
-
buffering: "until-close";
|
|
73
|
-
sanitize: typeof redactAntigravityAuthUrls;
|
|
74
|
-
};
|
|
75
|
-
installUrl: string;
|
|
76
|
-
docsUrl: string;
|
|
77
|
-
externalMcpInjection: "env-passthrough";
|
|
78
|
-
discoverModels(requiredArgs: {
|
|
79
|
-
context: import("../model-discovery-types.js").ModelDiscoveryContext;
|
|
80
|
-
}, optionalArgs?: {
|
|
81
|
-
signal?: AbortSignal;
|
|
82
|
-
force?: boolean;
|
|
83
|
-
staleWhileRevalidate?: boolean;
|
|
84
|
-
deps?: import("../model-discovery-types.js").ModelDiscoveryDeps;
|
|
85
|
-
}): Promise<import("../model-discovery-types.js").ModelCatalogSnapshot>;
|
|
86
|
-
resolveDefaultModel(requiredArgs: {
|
|
87
|
-
context: import("../model-discovery-types.js").ModelDiscoveryContext;
|
|
88
|
-
catalog: import("../model-discovery-types.js").ModelCatalogSnapshot;
|
|
89
|
-
}, optionalArgs?: {
|
|
90
|
-
signal?: AbortSignal;
|
|
91
|
-
deps?: import("../model-discovery-types.js").ModelDiscoveryDeps;
|
|
92
|
-
}): Promise<import("../model-discovery-types.js").DefaultModelResolution>;
|
|
93
|
-
};
|
|
94
|
-
//# sourceMappingURL=antigravity.d.ts.map
|