@jsonstudio/rcc 0.90.352 → 0.90.367
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/dist/build-info.js +2 -2
- package/dist/cli/commands/codex.js +37 -7
- package/dist/cli/commands/codex.js.map +1 -1
- package/dist/cli/commands/launcher/types.d.ts +1 -0
- package/dist/cli/commands/launcher-kernel.js +69 -90
- package/dist/cli/commands/launcher-kernel.js.map +1 -1
- package/dist/modules/llmswitch/bridge/module-loader.js +2 -2
- package/dist/modules/llmswitch/bridge/module-loader.js.map +1 -1
- package/dist/modules/llmswitch/bridge/quota-manager.js +1 -1
- package/dist/modules/llmswitch/bridge/quota-manager.js.map +1 -1
- package/dist/modules/llmswitch/bridge/runtime-integrations.d.ts +1 -1
- package/dist/modules/llmswitch/bridge/runtime-integrations.js.map +1 -1
- package/dist/modules/llmswitch/bridge.d.ts +5 -5
- package/dist/modules/llmswitch/bridge.js.map +1 -1
- package/dist/modules/llmswitch/core-loader.js +35 -24
- package/dist/modules/llmswitch/core-loader.js.map +1 -1
- package/dist/server/runtime/http-server/executor/provider-response-converter.js +133 -2
- package/dist/server/runtime/http-server/executor/provider-response-converter.js.map +1 -1
- package/dist/server/runtime/http-server/executor-response.js +62 -1
- package/dist/server/runtime/http-server/executor-response.js.map +1 -1
- package/dist/server/runtime/http-server/session-client-route-utils.js +38 -5
- package/dist/server/runtime/http-server/session-client-route-utils.js.map +1 -1
- package/package.json +7 -8
- package/scripts/analyze-thinking-keywords.mjs +1 -1
- package/scripts/ensure-llmswitch-mode.mjs +5 -63
- package/scripts/install-global.sh +0 -46
- package/scripts/install-release.sh +4 -38
- package/scripts/install-verify.mjs +6 -25
- package/scripts/pack-mode.mjs +16 -39
- package/scripts/pack-rcc.mjs +4 -63
- package/scripts/publish-rcc.mjs +4 -59
- package/scripts/snapshot-inspect.mjs +24 -5
- package/scripts/tests/blackbox-rcc-vs-routecodex-antigravity.mjs +2 -2
- package/scripts/vendor-core.mjs +30 -9
- package/vendor/llmswitch-core/README.md +271 -0
- package/vendor/llmswitch-core/dist/bridge/routecodex-adapter.d.ts +74 -0
- package/vendor/llmswitch-core/dist/bridge/routecodex-adapter.js +229 -0
- package/vendor/llmswitch-core/dist/config-unified/enhanced-path-resolver.d.ts +5 -0
- package/vendor/llmswitch-core/dist/config-unified/enhanced-path-resolver.js +46 -0
- package/vendor/llmswitch-core/dist/config-unified/unified-config.d.ts +26 -0
- package/vendor/llmswitch-core/dist/config-unified/unified-config.js +231 -0
- package/vendor/llmswitch-core/dist/conversion/args-mapping.d.ts +18 -0
- package/vendor/llmswitch-core/dist/conversion/args-mapping.js +8 -0
- package/vendor/llmswitch-core/dist/conversion/bridge-actions.d.ts +39 -0
- package/vendor/llmswitch-core/dist/conversion/bridge-actions.js +82 -0
- package/vendor/llmswitch-core/dist/conversion/bridge-id-utils.d.ts +9 -0
- package/vendor/llmswitch-core/dist/conversion/bridge-id-utils.js +13 -0
- package/vendor/llmswitch-core/dist/conversion/bridge-instructions.d.ts +1 -0
- package/vendor/llmswitch-core/dist/conversion/bridge-instructions.js +17 -0
- package/vendor/llmswitch-core/dist/conversion/bridge-message-utils.d.ts +23 -0
- package/vendor/llmswitch-core/dist/conversion/bridge-message-utils.js +45 -0
- package/vendor/llmswitch-core/dist/conversion/bridge-metadata.d.ts +2 -0
- package/vendor/llmswitch-core/dist/conversion/bridge-metadata.js +5 -0
- package/vendor/llmswitch-core/dist/conversion/bridge-policies.d.ts +18 -0
- package/vendor/llmswitch-core/dist/conversion/bridge-policies.js +11 -0
- package/vendor/llmswitch-core/dist/conversion/codec-registry.d.ts +10 -0
- package/vendor/llmswitch-core/dist/conversion/codec-registry.js +37 -0
- package/vendor/llmswitch-core/dist/conversion/codecs/anthropic-openai-codec.d.ts +22 -0
- package/vendor/llmswitch-core/dist/conversion/codecs/anthropic-openai-codec.js +52 -0
- package/vendor/llmswitch-core/dist/conversion/codecs/gemini-openai-codec.d.ts +17 -0
- package/vendor/llmswitch-core/dist/conversion/codecs/gemini-openai-codec.js +85 -0
- package/vendor/llmswitch-core/dist/conversion/codecs/openai-openai-codec.d.ts +12 -0
- package/vendor/llmswitch-core/dist/conversion/codecs/openai-openai-codec.js +54 -0
- package/vendor/llmswitch-core/dist/conversion/codecs/responses-openai-codec.d.ts +12 -0
- package/vendor/llmswitch-core/dist/conversion/codecs/responses-openai-codec.js +66 -0
- package/vendor/llmswitch-core/dist/conversion/compaction-detect.d.ts +2 -0
- package/vendor/llmswitch-core/dist/conversion/compaction-detect.js +4 -0
- package/vendor/llmswitch-core/dist/conversion/compat/actions/anthropic-claude-code-system-prompt.d.ts +4 -0
- package/vendor/llmswitch-core/dist/conversion/compat/actions/anthropic-claude-code-system-prompt.js +42 -0
- package/vendor/llmswitch-core/dist/conversion/compat/actions/anthropic-claude-code-user-id.d.ts +3 -0
- package/vendor/llmswitch-core/dist/conversion/compat/actions/anthropic-claude-code-user-id.js +30 -0
- package/vendor/llmswitch-core/dist/conversion/compat/actions/antigravity-thought-signature-cache.d.ts +3 -0
- package/vendor/llmswitch-core/dist/conversion/compat/actions/antigravity-thought-signature-cache.js +8 -0
- package/vendor/llmswitch-core/dist/conversion/compat/actions/antigravity-thought-signature-prepare.d.ts +3 -0
- package/vendor/llmswitch-core/dist/conversion/compat/actions/antigravity-thought-signature-prepare.js +26 -0
- package/vendor/llmswitch-core/dist/conversion/compat/actions/apply-patch-fixer.d.ts +1 -0
- package/vendor/llmswitch-core/dist/conversion/compat/actions/apply-patch-fixer.js +30 -0
- package/vendor/llmswitch-core/dist/conversion/compat/actions/auto-thinking.d.ts +6 -0
- package/vendor/llmswitch-core/dist/conversion/compat/actions/auto-thinking.js +26 -0
- package/vendor/llmswitch-core/dist/conversion/compat/actions/claude-thinking-tools.d.ts +2 -0
- package/vendor/llmswitch-core/dist/conversion/compat/actions/claude-thinking-tools.js +4 -0
- package/vendor/llmswitch-core/dist/conversion/compat/actions/deepseek-web-request.d.ts +3 -0
- package/vendor/llmswitch-core/dist/conversion/compat/actions/deepseek-web-request.js +62 -0
- package/vendor/llmswitch-core/dist/conversion/compat/actions/deepseek-web-response.d.ts +12 -0
- package/vendor/llmswitch-core/dist/conversion/compat/actions/deepseek-web-response.js +114 -0
- package/vendor/llmswitch-core/dist/conversion/compat/actions/field-mapping.d.ts +14 -0
- package/vendor/llmswitch-core/dist/conversion/compat/actions/field-mapping.js +155 -0
- package/vendor/llmswitch-core/dist/conversion/compat/actions/gemini-cli-request.d.ts +5 -0
- package/vendor/llmswitch-core/dist/conversion/compat/actions/gemini-cli-request.js +27 -0
- package/vendor/llmswitch-core/dist/conversion/compat/actions/gemini-web-search.d.ts +3 -0
- package/vendor/llmswitch-core/dist/conversion/compat/actions/gemini-web-search.js +24 -0
- package/vendor/llmswitch-core/dist/conversion/compat/actions/glm-history-image-trim.d.ts +2 -0
- package/vendor/llmswitch-core/dist/conversion/compat/actions/glm-history-image-trim.js +54 -0
- package/vendor/llmswitch-core/dist/conversion/compat/actions/glm-image-content.d.ts +2 -0
- package/vendor/llmswitch-core/dist/conversion/compat/actions/glm-image-content.js +54 -0
- package/vendor/llmswitch-core/dist/conversion/compat/actions/glm-native-compat.d.ts +6 -0
- package/vendor/llmswitch-core/dist/conversion/compat/actions/glm-native-compat.js +34 -0
- package/vendor/llmswitch-core/dist/conversion/compat/actions/glm-tool-extraction.d.ts +3 -0
- package/vendor/llmswitch-core/dist/conversion/compat/actions/glm-tool-extraction.js +35 -0
- package/vendor/llmswitch-core/dist/conversion/compat/actions/glm-vision-prompt.d.ts +11 -0
- package/vendor/llmswitch-core/dist/conversion/compat/actions/glm-vision-prompt.js +104 -0
- package/vendor/llmswitch-core/dist/conversion/compat/actions/glm-web-search.d.ts +2 -0
- package/vendor/llmswitch-core/dist/conversion/compat/actions/glm-web-search.js +30 -0
- package/vendor/llmswitch-core/dist/conversion/compat/actions/harvest-tool-calls-from-text.d.ts +15 -0
- package/vendor/llmswitch-core/dist/conversion/compat/actions/harvest-tool-calls-from-text.js +124 -0
- package/vendor/llmswitch-core/dist/conversion/compat/actions/iflow-kimi-cli-defaults.d.ts +10 -0
- package/vendor/llmswitch-core/dist/conversion/compat/actions/iflow-kimi-cli-defaults.js +31 -0
- package/vendor/llmswitch-core/dist/conversion/compat/actions/iflow-kimi-history-media-placeholder.d.ts +7 -0
- package/vendor/llmswitch-core/dist/conversion/compat/actions/iflow-kimi-history-media-placeholder.js +25 -0
- package/vendor/llmswitch-core/dist/conversion/compat/actions/iflow-kimi-thinking-reasoning-fill.d.ts +12 -0
- package/vendor/llmswitch-core/dist/conversion/compat/actions/iflow-kimi-thinking-reasoning-fill.js +46 -0
- package/vendor/llmswitch-core/dist/conversion/compat/actions/iflow-native-compat.d.ts +6 -0
- package/vendor/llmswitch-core/dist/conversion/compat/actions/iflow-native-compat.js +36 -0
- package/vendor/llmswitch-core/dist/conversion/compat/actions/iflow-response-body-unwrap.d.ts +9 -0
- package/vendor/llmswitch-core/dist/conversion/compat/actions/iflow-response-body-unwrap.js +25 -0
- package/vendor/llmswitch-core/dist/conversion/compat/actions/iflow-tool-text-fallback.d.ts +5 -0
- package/vendor/llmswitch-core/dist/conversion/compat/actions/iflow-tool-text-fallback.js +29 -0
- package/vendor/llmswitch-core/dist/conversion/compat/actions/iflow-web-search.d.ts +18 -0
- package/vendor/llmswitch-core/dist/conversion/compat/actions/iflow-web-search.js +49 -0
- package/vendor/llmswitch-core/dist/conversion/compat/actions/index.d.ts +2 -0
- package/vendor/llmswitch-core/dist/conversion/compat/actions/index.js +2 -0
- package/vendor/llmswitch-core/dist/conversion/compat/actions/lmstudio-responses-fc-ids.d.ts +2 -0
- package/vendor/llmswitch-core/dist/conversion/compat/actions/lmstudio-responses-fc-ids.js +4 -0
- package/vendor/llmswitch-core/dist/conversion/compat/actions/lmstudio-responses-input-stringify.d.ts +14 -0
- package/vendor/llmswitch-core/dist/conversion/compat/actions/lmstudio-responses-input-stringify.js +125 -0
- package/vendor/llmswitch-core/dist/conversion/compat/actions/normalize-tool-call-ids.d.ts +2 -0
- package/vendor/llmswitch-core/dist/conversion/compat/actions/normalize-tool-call-ids.js +10 -0
- package/vendor/llmswitch-core/dist/conversion/compat/actions/qwen-transform.d.ts +4 -0
- package/vendor/llmswitch-core/dist/conversion/compat/actions/qwen-transform.js +40 -0
- package/vendor/llmswitch-core/dist/conversion/compat/actions/request-rules.d.ts +24 -0
- package/vendor/llmswitch-core/dist/conversion/compat/actions/request-rules.js +4 -0
- package/vendor/llmswitch-core/dist/conversion/compat/actions/response-blacklist.d.ts +10 -0
- package/vendor/llmswitch-core/dist/conversion/compat/actions/response-blacklist.js +10 -0
- package/vendor/llmswitch-core/dist/conversion/compat/actions/response-normalize.d.ts +5 -0
- package/vendor/llmswitch-core/dist/conversion/compat/actions/response-normalize.js +4 -0
- package/vendor/llmswitch-core/dist/conversion/compat/actions/response-validate.d.ts +5 -0
- package/vendor/llmswitch-core/dist/conversion/compat/actions/response-validate.js +4 -0
- package/vendor/llmswitch-core/dist/conversion/compat/actions/snapshot.d.ts +8 -0
- package/vendor/llmswitch-core/dist/conversion/compat/actions/snapshot.js +21 -0
- package/vendor/llmswitch-core/dist/conversion/compat/actions/strip-orphan-function-calls-tag.d.ts +2 -0
- package/vendor/llmswitch-core/dist/conversion/compat/actions/strip-orphan-function-calls-tag.js +4 -0
- package/vendor/llmswitch-core/dist/conversion/compat/actions/tool-schema.d.ts +6 -0
- package/vendor/llmswitch-core/dist/conversion/compat/actions/tool-schema.js +91 -0
- package/vendor/llmswitch-core/dist/conversion/compat/actions/tool-text-request-guidance.d.ts +9 -0
- package/vendor/llmswitch-core/dist/conversion/compat/actions/tool-text-request-guidance.js +7 -0
- package/vendor/llmswitch-core/dist/conversion/compat/actions/universal-shape-filter.d.ts +57 -0
- package/vendor/llmswitch-core/dist/conversion/compat/actions/universal-shape-filter.js +14 -0
- package/vendor/llmswitch-core/dist/conversion/compat/antigravity-session-signature.d.ts +86 -0
- package/vendor/llmswitch-core/dist/conversion/compat/antigravity-session-signature.js +1143 -0
- package/vendor/llmswitch-core/dist/conversion/compat/profiles/anthropic-claude-code.json +17 -0
- package/vendor/llmswitch-core/dist/conversion/compat/profiles/chat-claude-code.json +18 -0
- package/vendor/llmswitch-core/dist/conversion/compat/profiles/chat-deepseek-web.json +47 -0
- package/vendor/llmswitch-core/dist/conversion/compat/profiles/chat-gemini-cli.json +23 -0
- package/vendor/llmswitch-core/dist/conversion/compat/profiles/chat-gemini.json +31 -0
- package/vendor/llmswitch-core/dist/conversion/compat/profiles/chat-glm.json +405 -0
- package/vendor/llmswitch-core/dist/conversion/compat/profiles/chat-iflow.json +353 -0
- package/vendor/llmswitch-core/dist/conversion/compat/profiles/chat-lmstudio.json +80 -0
- package/vendor/llmswitch-core/dist/conversion/compat/profiles/chat-qwen.json +22 -0
- package/vendor/llmswitch-core/dist/conversion/compat/profiles/responses-c4m.json +45 -0
- package/vendor/llmswitch-core/dist/conversion/compat/profiles/responses-crs.json +15 -0
- package/vendor/llmswitch-core/dist/conversion/compat/profiles/responses-output2choices-test.json +12 -0
- package/vendor/llmswitch-core/dist/conversion/config/config-manager.d.ts +212 -0
- package/vendor/llmswitch-core/dist/conversion/config/config-manager.js +310 -0
- package/vendor/llmswitch-core/dist/conversion/config/sample-config.json +314 -0
- package/vendor/llmswitch-core/dist/conversion/config/version-switch.json +150 -0
- package/vendor/llmswitch-core/dist/conversion/hub/config/types.d.ts +26 -0
- package/vendor/llmswitch-core/dist/conversion/hub/config/types.js +1 -0
- package/vendor/llmswitch-core/dist/conversion/hub/core/detour-registry.d.ts +11 -0
- package/vendor/llmswitch-core/dist/conversion/hub/core/detour-registry.js +23 -0
- package/vendor/llmswitch-core/dist/conversion/hub/core/hub-context.d.ts +23 -0
- package/vendor/llmswitch-core/dist/conversion/hub/core/hub-context.js +1 -0
- package/vendor/llmswitch-core/dist/conversion/hub/core/index.d.ts +4 -0
- package/vendor/llmswitch-core/dist/conversion/hub/core/index.js +3 -0
- package/vendor/llmswitch-core/dist/conversion/hub/core/stage-driver.d.ts +30 -0
- package/vendor/llmswitch-core/dist/conversion/hub/core/stage-driver.js +33 -0
- package/vendor/llmswitch-core/dist/conversion/hub/format-adapters/anthropic-format-adapter.d.ts +16 -0
- package/vendor/llmswitch-core/dist/conversion/hub/format-adapters/anthropic-format-adapter.js +42 -0
- package/vendor/llmswitch-core/dist/conversion/hub/format-adapters/chat-format-adapter.d.ts +17 -0
- package/vendor/llmswitch-core/dist/conversion/hub/format-adapters/chat-format-adapter.js +42 -0
- package/vendor/llmswitch-core/dist/conversion/hub/format-adapters/gemini-format-adapter.d.ts +16 -0
- package/vendor/llmswitch-core/dist/conversion/hub/format-adapters/gemini-format-adapter.js +42 -0
- package/vendor/llmswitch-core/dist/conversion/hub/format-adapters/index.d.ts +21 -0
- package/vendor/llmswitch-core/dist/conversion/hub/format-adapters/index.js +4 -0
- package/vendor/llmswitch-core/dist/conversion/hub/format-adapters/responses-format-adapter.d.ts +19 -0
- package/vendor/llmswitch-core/dist/conversion/hub/format-adapters/responses-format-adapter.js +42 -0
- package/vendor/llmswitch-core/dist/conversion/hub/hub-feature.d.ts +1 -0
- package/vendor/llmswitch-core/dist/conversion/hub/hub-feature.js +26 -0
- package/vendor/llmswitch-core/dist/conversion/hub/node-support.d.ts +19 -0
- package/vendor/llmswitch-core/dist/conversion/hub/node-support.js +136 -0
- package/vendor/llmswitch-core/dist/conversion/hub/operation-table/operation-table-runner.d.ts +18 -0
- package/vendor/llmswitch-core/dist/conversion/hub/operation-table/operation-table-runner.js +162 -0
- package/vendor/llmswitch-core/dist/conversion/hub/operation-table/semantic-mappers/anthropic-mapper.d.ts +8 -0
- package/vendor/llmswitch-core/dist/conversion/hub/operation-table/semantic-mappers/anthropic-mapper.js +503 -0
- package/vendor/llmswitch-core/dist/conversion/hub/operation-table/semantic-mappers/archive/chat-mapper.archive.d.ts +8 -0
- package/vendor/llmswitch-core/dist/conversion/hub/operation-table/semantic-mappers/archive/chat-mapper.archive.js +409 -0
- package/vendor/llmswitch-core/dist/conversion/hub/operation-table/semantic-mappers/chat-mapper.d.ts +8 -0
- package/vendor/llmswitch-core/dist/conversion/hub/operation-table/semantic-mappers/chat-mapper.js +350 -0
- package/vendor/llmswitch-core/dist/conversion/hub/operation-table/semantic-mappers/gemini-mapper.d.ts +7 -0
- package/vendor/llmswitch-core/dist/conversion/hub/operation-table/semantic-mappers/gemini-mapper.js +1540 -0
- package/vendor/llmswitch-core/dist/conversion/hub/operation-table/semantic-mappers/responses-mapper.d.ts +21 -0
- package/vendor/llmswitch-core/dist/conversion/hub/operation-table/semantic-mappers/responses-mapper.js +491 -0
- package/vendor/llmswitch-core/dist/conversion/hub/ops/operations.d.ts +19 -0
- package/vendor/llmswitch-core/dist/conversion/hub/ops/operations.js +7 -0
- package/vendor/llmswitch-core/dist/conversion/hub/pipeline/compat/compat-engine.d.ts +9 -0
- package/vendor/llmswitch-core/dist/conversion/hub/pipeline/compat/compat-engine.js +13 -0
- package/vendor/llmswitch-core/dist/conversion/hub/pipeline/compat/compat-pipeline-executor.d.ts +9 -0
- package/vendor/llmswitch-core/dist/conversion/hub/pipeline/compat/compat-pipeline-executor.js +46 -0
- package/vendor/llmswitch-core/dist/conversion/hub/pipeline/compat/compat-profile-resolver.d.ts +2 -0
- package/vendor/llmswitch-core/dist/conversion/hub/pipeline/compat/compat-profile-resolver.js +14 -0
- package/vendor/llmswitch-core/dist/conversion/hub/pipeline/compat/compat-profile-store.d.ts +2 -0
- package/vendor/llmswitch-core/dist/conversion/hub/pipeline/compat/compat-profile-store.js +94 -0
- package/vendor/llmswitch-core/dist/conversion/hub/pipeline/compat/compat-types.d.ts +175 -0
- package/vendor/llmswitch-core/dist/conversion/hub/pipeline/compat/compat-types.js +1 -0
- package/vendor/llmswitch-core/dist/conversion/hub/pipeline/compat/native-adapter-context.d.ts +3 -0
- package/vendor/llmswitch-core/dist/conversion/hub/pipeline/compat/native-adapter-context.js +40 -0
- package/vendor/llmswitch-core/dist/conversion/hub/pipeline/hub-pipeline.d.ts +111 -0
- package/vendor/llmswitch-core/dist/conversion/hub/pipeline/hub-pipeline.js +1927 -0
- package/vendor/llmswitch-core/dist/conversion/hub/pipeline/hub-stage-timing.d.ts +8 -0
- package/vendor/llmswitch-core/dist/conversion/hub/pipeline/hub-stage-timing.js +211 -0
- package/vendor/llmswitch-core/dist/conversion/hub/pipeline/session-identifiers.d.ts +9 -0
- package/vendor/llmswitch-core/dist/conversion/hub/pipeline/session-identifiers.js +16 -0
- package/vendor/llmswitch-core/dist/conversion/hub/pipeline/stages/req_inbound/req_inbound_stage1_format_parse/index.d.ts +10 -0
- package/vendor/llmswitch-core/dist/conversion/hub/pipeline/stages/req_inbound/req_inbound_stage1_format_parse/index.js +236 -0
- package/vendor/llmswitch-core/dist/conversion/hub/pipeline/stages/req_inbound/req_inbound_stage2_semantic_map/index.d.ts +24 -0
- package/vendor/llmswitch-core/dist/conversion/hub/pipeline/stages/req_inbound/req_inbound_stage2_semantic_map/index.js +132 -0
- package/vendor/llmswitch-core/dist/conversion/hub/pipeline/stages/req_inbound/req_inbound_stage2_semantic_map/semantic-lift.d.ts +14 -0
- package/vendor/llmswitch-core/dist/conversion/hub/pipeline/stages/req_inbound/req_inbound_stage2_semantic_map/semantic-lift.js +24 -0
- package/vendor/llmswitch-core/dist/conversion/hub/pipeline/stages/req_inbound/req_inbound_stage3_context_capture/archive/shell-like-tool-call-normalization-fallback.d.ts +2 -0
- package/vendor/llmswitch-core/dist/conversion/hub/pipeline/stages/req_inbound/req_inbound_stage3_context_capture/archive/shell-like-tool-call-normalization-fallback.js +157 -0
- package/vendor/llmswitch-core/dist/conversion/hub/pipeline/stages/req_inbound/req_inbound_stage3_context_capture/context-capture-orchestration.d.ts +16 -0
- package/vendor/llmswitch-core/dist/conversion/hub/pipeline/stages/req_inbound/req_inbound_stage3_context_capture/context-capture-orchestration.js +29 -0
- package/vendor/llmswitch-core/dist/conversion/hub/pipeline/stages/req_inbound/req_inbound_stage3_context_capture/context-factories.d.ts +5 -0
- package/vendor/llmswitch-core/dist/conversion/hub/pipeline/stages/req_inbound/req_inbound_stage3_context_capture/context-factories.js +19 -0
- package/vendor/llmswitch-core/dist/conversion/hub/pipeline/stages/req_inbound/req_inbound_stage3_context_capture/index.d.ts +6 -0
- package/vendor/llmswitch-core/dist/conversion/hub/pipeline/stages/req_inbound/req_inbound_stage3_context_capture/index.js +22 -0
- package/vendor/llmswitch-core/dist/conversion/hub/pipeline/stages/req_inbound/req_inbound_stage3_context_capture/responses-context-snapshot.d.ts +8 -0
- package/vendor/llmswitch-core/dist/conversion/hub/pipeline/stages/req_inbound/req_inbound_stage3_context_capture/responses-context-snapshot.js +28 -0
- package/vendor/llmswitch-core/dist/conversion/hub/pipeline/stages/req_inbound/req_inbound_stage3_context_capture/tool-output-diagnostics.d.ts +2 -0
- package/vendor/llmswitch-core/dist/conversion/hub/pipeline/stages/req_inbound/req_inbound_stage3_context_capture/tool-output-diagnostics.js +4 -0
- package/vendor/llmswitch-core/dist/conversion/hub/pipeline/stages/req_inbound/req_inbound_stage3_context_capture/tool-output-snapshot.d.ts +10 -0
- package/vendor/llmswitch-core/dist/conversion/hub/pipeline/stages/req_inbound/req_inbound_stage3_context_capture/tool-output-snapshot.js +12 -0
- package/vendor/llmswitch-core/dist/conversion/hub/pipeline/stages/req_outbound/req_outbound_stage1_semantic_map/context-merge.d.ts +3 -0
- package/vendor/llmswitch-core/dist/conversion/hub/pipeline/stages/req_outbound/req_outbound_stage1_semantic_map/context-merge.js +30 -0
- package/vendor/llmswitch-core/dist/conversion/hub/pipeline/stages/req_outbound/req_outbound_stage1_semantic_map/index.d.ts +18 -0
- package/vendor/llmswitch-core/dist/conversion/hub/pipeline/stages/req_outbound/req_outbound_stage1_semantic_map/index.js +84 -0
- package/vendor/llmswitch-core/dist/conversion/hub/pipeline/stages/req_outbound/req_outbound_stage2_format_build/index.d.ts +8 -0
- package/vendor/llmswitch-core/dist/conversion/hub/pipeline/stages/req_outbound/req_outbound_stage2_format_build/index.js +12 -0
- package/vendor/llmswitch-core/dist/conversion/hub/pipeline/stages/req_outbound/req_outbound_stage3_compat/index.d.ts +14 -0
- package/vendor/llmswitch-core/dist/conversion/hub/pipeline/stages/req_outbound/req_outbound_stage3_compat/index.js +45 -0
- package/vendor/llmswitch-core/dist/conversion/hub/pipeline/stages/req_process/req_process_stage1_tool_governance/index.d.ts +16 -0
- package/vendor/llmswitch-core/dist/conversion/hub/pipeline/stages/req_process/req_process_stage1_tool_governance/index.js +62 -0
- package/vendor/llmswitch-core/dist/conversion/hub/pipeline/stages/req_process/req_process_stage2_route_select/index.d.ts +17 -0
- package/vendor/llmswitch-core/dist/conversion/hub/pipeline/stages/req_process/req_process_stage2_route_select/index.js +35 -0
- package/vendor/llmswitch-core/dist/conversion/hub/pipeline/stages/resp_inbound/resp_inbound_stage1_sse_decode/index.d.ts +17 -0
- package/vendor/llmswitch-core/dist/conversion/hub/pipeline/stages/resp_inbound/resp_inbound_stage1_sse_decode/index.js +243 -0
- package/vendor/llmswitch-core/dist/conversion/hub/pipeline/stages/resp_inbound/resp_inbound_stage1_sse_decode/stream-json-sniffer.d.ts +3 -0
- package/vendor/llmswitch-core/dist/conversion/hub/pipeline/stages/resp_inbound/resp_inbound_stage1_sse_decode/stream-json-sniffer.js +81 -0
- package/vendor/llmswitch-core/dist/conversion/hub/pipeline/stages/resp_inbound/resp_inbound_stage2_format_parse/index.d.ts +10 -0
- package/vendor/llmswitch-core/dist/conversion/hub/pipeline/stages/resp_inbound/resp_inbound_stage2_format_parse/index.js +50 -0
- package/vendor/llmswitch-core/dist/conversion/hub/pipeline/stages/resp_inbound/resp_inbound_stage3_semantic_map/index.d.ts +13 -0
- package/vendor/llmswitch-core/dist/conversion/hub/pipeline/stages/resp_inbound/resp_inbound_stage3_semantic_map/index.js +25 -0
- package/vendor/llmswitch-core/dist/conversion/hub/pipeline/stages/resp_outbound/resp_outbound_stage1_client_remap/chat-process-semantics-bridge.d.ts +6 -0
- package/vendor/llmswitch-core/dist/conversion/hub/pipeline/stages/resp_outbound/resp_outbound_stage1_client_remap/chat-process-semantics-bridge.js +17 -0
- package/vendor/llmswitch-core/dist/conversion/hub/pipeline/stages/resp_outbound/resp_outbound_stage1_client_remap/client-remap-protocol-switch.d.ts +9 -0
- package/vendor/llmswitch-core/dist/conversion/hub/pipeline/stages/resp_outbound/resp_outbound_stage1_client_remap/client-remap-protocol-switch.js +103 -0
- package/vendor/llmswitch-core/dist/conversion/hub/pipeline/stages/resp_outbound/resp_outbound_stage1_client_remap/index.d.ts +13 -0
- package/vendor/llmswitch-core/dist/conversion/hub/pipeline/stages/resp_outbound/resp_outbound_stage1_client_remap/index.js +30 -0
- package/vendor/llmswitch-core/dist/conversion/hub/pipeline/stages/resp_outbound/resp_outbound_stage2_sse_stream/index.d.ts +17 -0
- package/vendor/llmswitch-core/dist/conversion/hub/pipeline/stages/resp_outbound/resp_outbound_stage2_sse_stream/index.js +35 -0
- package/vendor/llmswitch-core/dist/conversion/hub/pipeline/stages/resp_process/resp_process_stage1_tool_governance/index.d.ts +16 -0
- package/vendor/llmswitch-core/dist/conversion/hub/pipeline/stages/resp_process/resp_process_stage1_tool_governance/index.js +52 -0
- package/vendor/llmswitch-core/dist/conversion/hub/pipeline/stages/resp_process/resp_process_stage2_finalize/index.d.ts +19 -0
- package/vendor/llmswitch-core/dist/conversion/hub/pipeline/stages/resp_process/resp_process_stage2_finalize/index.js +40 -0
- package/vendor/llmswitch-core/dist/conversion/hub/pipeline/stages/resp_process/resp_process_stage3_servertool_orchestration/index.d.ts +44 -0
- package/vendor/llmswitch-core/dist/conversion/hub/pipeline/stages/resp_process/resp_process_stage3_servertool_orchestration/index.js +88 -0
- package/vendor/llmswitch-core/dist/conversion/hub/pipeline/stages/utils.d.ts +2 -0
- package/vendor/llmswitch-core/dist/conversion/hub/pipeline/stages/utils.js +27 -0
- package/vendor/llmswitch-core/dist/conversion/hub/pipeline/target-utils.d.ts +5 -0
- package/vendor/llmswitch-core/dist/conversion/hub/pipeline/target-utils.js +26 -0
- package/vendor/llmswitch-core/dist/conversion/hub/pipelines/inbound.d.ts +22 -0
- package/vendor/llmswitch-core/dist/conversion/hub/pipelines/inbound.js +66 -0
- package/vendor/llmswitch-core/dist/conversion/hub/pipelines/outbound.d.ts +22 -0
- package/vendor/llmswitch-core/dist/conversion/hub/pipelines/outbound.js +59 -0
- package/vendor/llmswitch-core/dist/conversion/hub/policy/policy-engine.d.ts +48 -0
- package/vendor/llmswitch-core/dist/conversion/hub/policy/policy-engine.js +269 -0
- package/vendor/llmswitch-core/dist/conversion/hub/policy/protocol-spec.d.ts +75 -0
- package/vendor/llmswitch-core/dist/conversion/hub/policy/protocol-spec.js +27 -0
- package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process-anthropic-alias.d.ts +2 -0
- package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process-anthropic-alias.js +36 -0
- package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process-clock-directive-parser.d.ts +5 -0
- package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process-clock-directive-parser.js +56 -0
- package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process-clock-directives.d.ts +24 -0
- package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process-clock-directives.js +98 -0
- package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process-clock-reminder-directives.d.ts +8 -0
- package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process-clock-reminder-directives.js +42 -0
- package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process-clock-reminder-finalize.d.ts +14 -0
- package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process-clock-reminder-finalize.js +10 -0
- package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process-clock-reminder-messages.d.ts +5 -0
- package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process-clock-reminder-messages.js +10 -0
- package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process-clock-reminder-orchestration.d.ts +30 -0
- package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process-clock-reminder-orchestration.js +68 -0
- package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process-clock-reminder-time-tag.d.ts +9 -0
- package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process-clock-reminder-time-tag.js +18 -0
- package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process-clock-reminders.d.ts +2 -0
- package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process-clock-reminders.js +104 -0
- package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process-clock-tool-schemas.d.ts +3 -0
- package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process-clock-tool-schemas.js +280 -0
- package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process-clock-tools.d.ts +6 -0
- package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process-clock-tools.js +41 -0
- package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process-continue-execution.d.ts +11 -0
- package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process-continue-execution.js +83 -0
- package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process-governance-context.d.ts +15 -0
- package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process-governance-context.js +7 -0
- package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process-governance-finalize.d.ts +16 -0
- package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process-governance-finalize.js +11 -0
- package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process-governance-orchestration.d.ts +9 -0
- package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process-governance-orchestration.js +49 -0
- package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process-governed-control-ops.d.ts +8 -0
- package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process-governed-control-ops.js +5 -0
- package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process-governed-filter-call.d.ts +12 -0
- package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process-governed-filter-call.js +18 -0
- package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process-governed-merge.d.ts +8 -0
- package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process-governed-merge.js +11 -0
- package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process-media.d.ts +5 -0
- package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process-media.js +108 -0
- package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process-node-result.d.ts +23 -0
- package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process-node-result.js +24 -0
- package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process-pending-tool-sync.d.ts +14 -0
- package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process-pending-tool-sync.js +52 -0
- package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process-post-governed-normalization.d.ts +8 -0
- package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process-post-governed-normalization.js +16 -0
- package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process-review.d.ts +2 -0
- package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process-review.js +8 -0
- package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process-servertool-orchestration.d.ts +8 -0
- package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process-servertool-orchestration.js +22 -0
- package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process-session-usage.d.ts +7 -0
- package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process-session-usage.js +147 -0
- package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process-tool-normalization.d.ts +2 -0
- package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process-tool-normalization.js +4 -0
- package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process-web-search-intent.d.ts +12 -0
- package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process-web-search-intent.js +13 -0
- package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process-web-search-tool-schema.d.ts +3 -0
- package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process-web-search-tool-schema.js +4 -0
- package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process-web-search.d.ts +8 -0
- package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process-web-search.js +26 -0
- package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process.d.ts +15 -0
- package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process.js +27 -0
- package/vendor/llmswitch-core/dist/conversion/hub/process/client-inject-readiness.d.ts +1 -0
- package/vendor/llmswitch-core/dist/conversion/hub/process/client-inject-readiness.js +4 -0
- package/vendor/llmswitch-core/dist/conversion/hub/registry.d.ts +28 -0
- package/vendor/llmswitch-core/dist/conversion/hub/registry.js +101 -0
- package/vendor/llmswitch-core/dist/conversion/hub/response/chat-response-utils.d.ts +6 -0
- package/vendor/llmswitch-core/dist/conversion/hub/response/chat-response-utils.js +8 -0
- package/vendor/llmswitch-core/dist/conversion/hub/response/provider-response.d.ts +51 -0
- package/vendor/llmswitch-core/dist/conversion/hub/response/provider-response.js +529 -0
- package/vendor/llmswitch-core/dist/conversion/hub/response/response-mappers.d.ts +24 -0
- package/vendor/llmswitch-core/dist/conversion/hub/response/response-mappers.js +73 -0
- package/vendor/llmswitch-core/dist/conversion/hub/response/response-runtime.d.ts +9 -0
- package/vendor/llmswitch-core/dist/conversion/hub/response/response-runtime.js +758 -0
- package/vendor/llmswitch-core/dist/conversion/hub/semantic-mappers/anthropic-mapper.d.ts +2 -0
- package/vendor/llmswitch-core/dist/conversion/hub/semantic-mappers/anthropic-mapper.js +2 -0
- package/vendor/llmswitch-core/dist/conversion/hub/semantic-mappers/chat-mapper.d.ts +2 -0
- package/vendor/llmswitch-core/dist/conversion/hub/semantic-mappers/chat-mapper.js +2 -0
- package/vendor/llmswitch-core/dist/conversion/hub/semantic-mappers/gemini-mapper.d.ts +2 -0
- package/vendor/llmswitch-core/dist/conversion/hub/semantic-mappers/gemini-mapper.js +2 -0
- package/vendor/llmswitch-core/dist/conversion/hub/semantic-mappers/index.d.ts +4 -0
- package/vendor/llmswitch-core/dist/conversion/hub/semantic-mappers/index.js +4 -0
- package/vendor/llmswitch-core/dist/conversion/hub/semantic-mappers/responses-mapper.d.ts +2 -0
- package/vendor/llmswitch-core/dist/conversion/hub/semantic-mappers/responses-mapper.js +2 -0
- package/vendor/llmswitch-core/dist/conversion/hub/snapshot-recorder.d.ts +13 -0
- package/vendor/llmswitch-core/dist/conversion/hub/snapshot-recorder.js +38 -0
- package/vendor/llmswitch-core/dist/conversion/hub/standardized-bridge.d.ts +12 -0
- package/vendor/llmswitch-core/dist/conversion/hub/standardized-bridge.js +16 -0
- package/vendor/llmswitch-core/dist/conversion/hub/tool-governance/engine.d.ts +24 -0
- package/vendor/llmswitch-core/dist/conversion/hub/tool-governance/engine.js +118 -0
- package/vendor/llmswitch-core/dist/conversion/hub/tool-governance/index.d.ts +3 -0
- package/vendor/llmswitch-core/dist/conversion/hub/tool-governance/index.js +2 -0
- package/vendor/llmswitch-core/dist/conversion/hub/tool-governance/rules.d.ts +2 -0
- package/vendor/llmswitch-core/dist/conversion/hub/tool-governance/rules.js +80 -0
- package/vendor/llmswitch-core/dist/conversion/hub/tool-governance/types.d.ts +38 -0
- package/vendor/llmswitch-core/dist/conversion/hub/tool-governance/types.js +1 -0
- package/vendor/llmswitch-core/dist/conversion/hub/tool-session-compat.d.ts +26 -0
- package/vendor/llmswitch-core/dist/conversion/hub/tool-session-compat.js +86 -0
- package/vendor/llmswitch-core/dist/conversion/hub/tool-surface/tool-surface-engine.d.ts +18 -0
- package/vendor/llmswitch-core/dist/conversion/hub/tool-surface/tool-surface-engine.js +574 -0
- package/vendor/llmswitch-core/dist/conversion/hub/types/chat-envelope.d.ts +79 -0
- package/vendor/llmswitch-core/dist/conversion/hub/types/chat-envelope.js +1 -0
- package/vendor/llmswitch-core/dist/conversion/hub/types/chat-schema.d.ts +112 -0
- package/vendor/llmswitch-core/dist/conversion/hub/types/chat-schema.js +1 -0
- package/vendor/llmswitch-core/dist/conversion/hub/types/errors.d.ts +5 -0
- package/vendor/llmswitch-core/dist/conversion/hub/types/errors.js +13 -0
- package/vendor/llmswitch-core/dist/conversion/hub/types/format-envelope.d.ts +7 -0
- package/vendor/llmswitch-core/dist/conversion/hub/types/format-envelope.js +1 -0
- package/vendor/llmswitch-core/dist/conversion/hub/types/index.d.ts +6 -0
- package/vendor/llmswitch-core/dist/conversion/hub/types/index.js +6 -0
- package/vendor/llmswitch-core/dist/conversion/hub/types/json.d.ts +9 -0
- package/vendor/llmswitch-core/dist/conversion/hub/types/json.js +9 -0
- package/vendor/llmswitch-core/dist/conversion/hub/types/node.d.ts +31 -0
- package/vendor/llmswitch-core/dist/conversion/hub/types/node.js +1 -0
- package/vendor/llmswitch-core/dist/conversion/hub/types/standardized.d.ts +99 -0
- package/vendor/llmswitch-core/dist/conversion/hub/types/standardized.js +1 -0
- package/vendor/llmswitch-core/dist/conversion/index.d.ts +33 -0
- package/vendor/llmswitch-core/dist/conversion/index.js +33 -0
- package/vendor/llmswitch-core/dist/conversion/jsonish.d.ts +3 -0
- package/vendor/llmswitch-core/dist/conversion/jsonish.js +20 -0
- package/vendor/llmswitch-core/dist/conversion/mcp-injection.d.ts +2 -0
- package/vendor/llmswitch-core/dist/conversion/mcp-injection.js +7 -0
- package/vendor/llmswitch-core/dist/conversion/media.d.ts +1 -0
- package/vendor/llmswitch-core/dist/conversion/media.js +4 -0
- package/vendor/llmswitch-core/dist/conversion/metadata-passthrough.d.ts +11 -0
- package/vendor/llmswitch-core/dist/conversion/metadata-passthrough.js +20 -0
- package/vendor/llmswitch-core/dist/conversion/payload-budget.d.ts +13 -0
- package/vendor/llmswitch-core/dist/conversion/payload-budget.js +47 -0
- package/vendor/llmswitch-core/dist/conversion/pipeline/codecs/v2/anthropic-openai-pipeline.d.ts +11 -0
- package/vendor/llmswitch-core/dist/conversion/pipeline/codecs/v2/anthropic-openai-pipeline.js +104 -0
- package/vendor/llmswitch-core/dist/conversion/pipeline/codecs/v2/openai-openai-pipeline.d.ts +15 -0
- package/vendor/llmswitch-core/dist/conversion/pipeline/codecs/v2/openai-openai-pipeline.js +176 -0
- package/vendor/llmswitch-core/dist/conversion/pipeline/codecs/v2/responses-openai-pipeline.d.ts +12 -0
- package/vendor/llmswitch-core/dist/conversion/pipeline/codecs/v2/responses-openai-pipeline.js +212 -0
- package/vendor/llmswitch-core/dist/conversion/pipeline/codecs/v2/shared/openai-chat-helpers.d.ts +13 -0
- package/vendor/llmswitch-core/dist/conversion/pipeline/codecs/v2/shared/openai-chat-helpers.js +34 -0
- package/vendor/llmswitch-core/dist/conversion/pipeline/hooks/adapter-context.d.ts +7 -0
- package/vendor/llmswitch-core/dist/conversion/pipeline/hooks/adapter-context.js +18 -0
- package/vendor/llmswitch-core/dist/conversion/pipeline/hooks/protocol-hooks.d.ts +67 -0
- package/vendor/llmswitch-core/dist/conversion/pipeline/hooks/protocol-hooks.js +1 -0
- package/vendor/llmswitch-core/dist/conversion/pipeline/index.d.ts +35 -0
- package/vendor/llmswitch-core/dist/conversion/pipeline/index.js +103 -0
- package/vendor/llmswitch-core/dist/conversion/pipeline/meta/meta-bag.d.ts +20 -0
- package/vendor/llmswitch-core/dist/conversion/pipeline/meta/meta-bag.js +81 -0
- package/vendor/llmswitch-core/dist/conversion/pipeline/schema/canonical-chat.d.ts +18 -0
- package/vendor/llmswitch-core/dist/conversion/pipeline/schema/canonical-chat.js +1 -0
- package/vendor/llmswitch-core/dist/conversion/pipeline/schema/index.d.ts +1 -0
- package/vendor/llmswitch-core/dist/conversion/pipeline/schema/index.js +1 -0
- package/vendor/llmswitch-core/dist/conversion/protocol-field-allowlists.d.ts +7 -0
- package/vendor/llmswitch-core/dist/conversion/protocol-field-allowlists.js +9 -0
- package/vendor/llmswitch-core/dist/conversion/protocol-state.d.ts +4 -0
- package/vendor/llmswitch-core/dist/conversion/protocol-state.js +27 -0
- package/vendor/llmswitch-core/dist/conversion/provider-protocol-error.d.ts +17 -0
- package/vendor/llmswitch-core/dist/conversion/provider-protocol-error.js +25 -0
- package/vendor/llmswitch-core/dist/conversion/responses/responses-host-policy.d.ts +6 -0
- package/vendor/llmswitch-core/dist/conversion/responses/responses-host-policy.js +4 -0
- package/vendor/llmswitch-core/dist/conversion/responses/responses-openai-bridge/response-payload.d.ts +3 -0
- package/vendor/llmswitch-core/dist/conversion/responses/responses-openai-bridge/response-payload.js +190 -0
- package/vendor/llmswitch-core/dist/conversion/responses/responses-openai-bridge/types.d.ts +35 -0
- package/vendor/llmswitch-core/dist/conversion/responses/responses-openai-bridge/types.js +1 -0
- package/vendor/llmswitch-core/dist/conversion/responses/responses-openai-bridge.d.ts +15 -0
- package/vendor/llmswitch-core/dist/conversion/responses/responses-openai-bridge.js +475 -0
- package/vendor/llmswitch-core/dist/conversion/runtime-metadata.d.ts +7 -0
- package/vendor/llmswitch-core/dist/conversion/runtime-metadata.js +31 -0
- package/vendor/llmswitch-core/dist/conversion/schema-validator.d.ts +7 -0
- package/vendor/llmswitch-core/dist/conversion/schema-validator.js +67 -0
- package/vendor/llmswitch-core/dist/conversion/shared/anthropic-message-utils.d.ts +22 -0
- package/vendor/llmswitch-core/dist/conversion/shared/anthropic-message-utils.js +1416 -0
- package/vendor/llmswitch-core/dist/conversion/shared/chat-envelope-validator.d.ts +8 -0
- package/vendor/llmswitch-core/dist/conversion/shared/chat-envelope-validator.js +4 -0
- package/vendor/llmswitch-core/dist/conversion/shared/chat-output-normalizer.d.ts +4 -0
- package/vendor/llmswitch-core/dist/conversion/shared/chat-output-normalizer.js +10 -0
- package/vendor/llmswitch-core/dist/conversion/shared/chat-request-filters.d.ts +8 -0
- package/vendor/llmswitch-core/dist/conversion/shared/chat-request-filters.js +63 -0
- package/vendor/llmswitch-core/dist/conversion/shared/gemini-tool-utils.d.ts +7 -0
- package/vendor/llmswitch-core/dist/conversion/shared/gemini-tool-utils.js +20 -0
- package/vendor/llmswitch-core/dist/conversion/shared/openai-finalizer.d.ts +8 -0
- package/vendor/llmswitch-core/dist/conversion/shared/openai-finalizer.js +22 -0
- package/vendor/llmswitch-core/dist/conversion/shared/openai-message-normalize.d.ts +1 -0
- package/vendor/llmswitch-core/dist/conversion/shared/openai-message-normalize.js +151 -0
- package/vendor/llmswitch-core/dist/conversion/shared/output-content-normalizer.d.ts +12 -0
- package/vendor/llmswitch-core/dist/conversion/shared/output-content-normalizer.js +26 -0
- package/vendor/llmswitch-core/dist/conversion/shared/reasoning-mapping.d.ts +5 -0
- package/vendor/llmswitch-core/dist/conversion/shared/reasoning-mapping.js +7 -0
- package/vendor/llmswitch-core/dist/conversion/shared/reasoning-normalizer.d.ts +25 -0
- package/vendor/llmswitch-core/dist/conversion/shared/reasoning-normalizer.js +114 -0
- package/vendor/llmswitch-core/dist/conversion/shared/reasoning-tool-normalizer.d.ts +12 -0
- package/vendor/llmswitch-core/dist/conversion/shared/reasoning-tool-normalizer.js +22 -0
- package/vendor/llmswitch-core/dist/conversion/shared/reasoning-tool-parser.d.ts +10 -0
- package/vendor/llmswitch-core/dist/conversion/shared/reasoning-tool-parser.js +11 -0
- package/vendor/llmswitch-core/dist/conversion/shared/reasoning-utils.d.ts +2 -0
- package/vendor/llmswitch-core/dist/conversion/shared/reasoning-utils.js +19 -0
- package/vendor/llmswitch-core/dist/conversion/shared/responses-conversation-store.d.ts +35 -0
- package/vendor/llmswitch-core/dist/conversion/shared/responses-conversation-store.js +195 -0
- package/vendor/llmswitch-core/dist/conversion/shared/responses-output-builder.d.ts +13 -0
- package/vendor/llmswitch-core/dist/conversion/shared/responses-output-builder.js +32 -0
- package/vendor/llmswitch-core/dist/conversion/shared/responses-reasoning-registry.d.ts +24 -0
- package/vendor/llmswitch-core/dist/conversion/shared/responses-reasoning-registry.js +185 -0
- package/vendor/llmswitch-core/dist/conversion/shared/responses-request-adapter.d.ts +7 -0
- package/vendor/llmswitch-core/dist/conversion/shared/responses-request-adapter.js +14 -0
- package/vendor/llmswitch-core/dist/conversion/shared/responses-response-utils.d.ts +3 -0
- package/vendor/llmswitch-core/dist/conversion/shared/responses-response-utils.js +254 -0
- package/vendor/llmswitch-core/dist/conversion/shared/responses-tool-utils.d.ts +14 -0
- package/vendor/llmswitch-core/dist/conversion/shared/responses-tool-utils.js +102 -0
- package/vendor/llmswitch-core/dist/conversion/shared/streaming-text-extractor.d.ts +19 -0
- package/vendor/llmswitch-core/dist/conversion/shared/streaming-text-extractor.js +39 -0
- package/vendor/llmswitch-core/dist/conversion/shared/text-markup-normalizer/normalize.d.ts +2 -0
- package/vendor/llmswitch-core/dist/conversion/shared/text-markup-normalizer/normalize.js +116 -0
- package/vendor/llmswitch-core/dist/conversion/shared/text-markup-normalizer.d.ts +4 -0
- package/vendor/llmswitch-core/dist/conversion/shared/text-markup-normalizer.js +3 -0
- package/vendor/llmswitch-core/dist/conversion/shared/thought-signature-validator.d.ts +52 -0
- package/vendor/llmswitch-core/dist/conversion/shared/thought-signature-validator.js +58 -0
- package/vendor/llmswitch-core/dist/conversion/shared/tool-argument-repairer.d.ts +39 -0
- package/vendor/llmswitch-core/dist/conversion/shared/tool-argument-repairer.js +53 -0
- package/vendor/llmswitch-core/dist/conversion/shared/tool-call-id-manager.d.ts +109 -0
- package/vendor/llmswitch-core/dist/conversion/shared/tool-call-id-manager.js +202 -0
- package/vendor/llmswitch-core/dist/conversion/shared/tool-call-utils.d.ts +11 -0
- package/vendor/llmswitch-core/dist/conversion/shared/tool-call-utils.js +14 -0
- package/vendor/llmswitch-core/dist/conversion/shared/tool-filter-pipeline.d.ts +21 -0
- package/vendor/llmswitch-core/dist/conversion/shared/tool-filter-pipeline.js +171 -0
- package/vendor/llmswitch-core/dist/conversion/shared/tool-governor.d.ts +29 -0
- package/vendor/llmswitch-core/dist/conversion/shared/tool-governor.js +694 -0
- package/vendor/llmswitch-core/dist/conversion/shared/tool-harvester.d.ts +31 -0
- package/vendor/llmswitch-core/dist/conversion/shared/tool-harvester.js +23 -0
- package/vendor/llmswitch-core/dist/conversion/shared/tool-mapping.d.ts +19 -0
- package/vendor/llmswitch-core/dist/conversion/shared/tool-mapping.js +65 -0
- package/vendor/llmswitch-core/dist/conversion/shared/tooling.d.ts +29 -0
- package/vendor/llmswitch-core/dist/conversion/shared/tooling.js +57 -0
- package/vendor/llmswitch-core/dist/conversion/snapshot-utils.d.ts +31 -0
- package/vendor/llmswitch-core/dist/conversion/snapshot-utils.js +49 -0
- package/vendor/llmswitch-core/dist/conversion/types/bridge-message-types.d.ts +41 -0
- package/vendor/llmswitch-core/dist/conversion/types/bridge-message-types.js +1 -0
- package/vendor/llmswitch-core/dist/conversion/types/text-markup-normalizer.d.ts +13 -0
- package/vendor/llmswitch-core/dist/conversion/types/text-markup-normalizer.js +1 -0
- package/vendor/llmswitch-core/dist/conversion/types.d.ts +33 -0
- package/vendor/llmswitch-core/dist/conversion/types.js +1 -0
- package/vendor/llmswitch-core/dist/filters/builtin/add-fields-filter.d.ts +8 -0
- package/vendor/llmswitch-core/dist/filters/builtin/add-fields-filter.js +16 -0
- package/vendor/llmswitch-core/dist/filters/builtin/blacklist-filter.d.ts +8 -0
- package/vendor/llmswitch-core/dist/filters/builtin/blacklist-filter.js +19 -0
- package/vendor/llmswitch-core/dist/filters/builtin/whitelist-filter.d.ts +8 -0
- package/vendor/llmswitch-core/dist/filters/builtin/whitelist-filter.js +19 -0
- package/vendor/llmswitch-core/dist/filters/config/openai-openai.fieldmap.json +18 -0
- package/vendor/llmswitch-core/dist/filters/engine.d.ts +16 -0
- package/vendor/llmswitch-core/dist/filters/engine.js +167 -0
- package/vendor/llmswitch-core/dist/filters/index.d.ts +18 -0
- package/vendor/llmswitch-core/dist/filters/index.js +22 -0
- package/vendor/llmswitch-core/dist/filters/special/request-tool-choice-policy.d.ts +11 -0
- package/vendor/llmswitch-core/dist/filters/special/request-tool-choice-policy.js +29 -0
- package/vendor/llmswitch-core/dist/filters/special/request-tool-list-filter.d.ts +11 -0
- package/vendor/llmswitch-core/dist/filters/special/request-tool-list-filter.js +322 -0
- package/vendor/llmswitch-core/dist/filters/special/request-toolcalls-stringify.d.ts +13 -0
- package/vendor/llmswitch-core/dist/filters/special/request-toolcalls-stringify.js +94 -0
- package/vendor/llmswitch-core/dist/filters/special/request-tools-normalize.d.ts +11 -0
- package/vendor/llmswitch-core/dist/filters/special/request-tools-normalize.js +114 -0
- package/vendor/llmswitch-core/dist/filters/special/response-finish-invariants.d.ts +11 -0
- package/vendor/llmswitch-core/dist/filters/special/response-finish-invariants.js +30 -0
- package/vendor/llmswitch-core/dist/filters/special/response-openai-to-responses-bridge.d.ts +13 -0
- package/vendor/llmswitch-core/dist/filters/special/response-openai-to-responses-bridge.js +24 -0
- package/vendor/llmswitch-core/dist/filters/special/response-tool-arguments-blacklist.d.ts +12 -0
- package/vendor/llmswitch-core/dist/filters/special/response-tool-arguments-blacklist.js +63 -0
- package/vendor/llmswitch-core/dist/filters/special/response-tool-arguments-schema-converge.d.ts +13 -0
- package/vendor/llmswitch-core/dist/filters/special/response-tool-arguments-schema-converge.js +63 -0
- package/vendor/llmswitch-core/dist/filters/special/response-tool-arguments-stringify.d.ts +9 -0
- package/vendor/llmswitch-core/dist/filters/special/response-tool-arguments-stringify.js +132 -0
- package/vendor/llmswitch-core/dist/filters/special/response-tool-arguments-whitelist.d.ts +11 -0
- package/vendor/llmswitch-core/dist/filters/special/response-tool-arguments-whitelist.js +56 -0
- package/vendor/llmswitch-core/dist/filters/special/response-tool-text-canonicalize.d.ts +13 -0
- package/vendor/llmswitch-core/dist/filters/special/response-tool-text-canonicalize.js +16 -0
- package/vendor/llmswitch-core/dist/filters/special/tool-filter-hooks.d.ts +19 -0
- package/vendor/llmswitch-core/dist/filters/special/tool-filter-hooks.js +394 -0
- package/vendor/llmswitch-core/dist/filters/special/tool-post-constraints.d.ts +31 -0
- package/vendor/llmswitch-core/dist/filters/special/tool-post-constraints.js +120 -0
- package/vendor/llmswitch-core/dist/filters/types.d.ts +68 -0
- package/vendor/llmswitch-core/dist/filters/types.js +3 -0
- package/vendor/llmswitch-core/dist/filters/utils/fieldmap-loader.d.ts +2 -0
- package/vendor/llmswitch-core/dist/filters/utils/fieldmap-loader.js +16 -0
- package/vendor/llmswitch-core/dist/filters/utils/snapshot-writer.d.ts +10 -0
- package/vendor/llmswitch-core/dist/filters/utils/snapshot-writer.js +85 -0
- package/vendor/llmswitch-core/dist/guidance/index.d.ts +3 -0
- package/vendor/llmswitch-core/dist/guidance/index.js +299 -0
- package/vendor/llmswitch-core/dist/http/sse-response.d.ts +22 -0
- package/vendor/llmswitch-core/dist/http/sse-response.js +103 -0
- package/vendor/llmswitch-core/dist/index.d.ts +11 -0
- package/vendor/llmswitch-core/dist/index.js +11 -0
- package/vendor/llmswitch-core/dist/native/router_hotpath_napi.node +0 -0
- package/vendor/llmswitch-core/dist/quota/apikey-reset.d.ts +17 -0
- package/vendor/llmswitch-core/dist/quota/apikey-reset.js +43 -0
- package/vendor/llmswitch-core/dist/quota/index.d.ts +2 -0
- package/vendor/llmswitch-core/dist/quota/index.js +1 -0
- package/vendor/llmswitch-core/dist/quota/quota-manager.d.ts +44 -0
- package/vendor/llmswitch-core/dist/quota/quota-manager.js +463 -0
- package/vendor/llmswitch-core/dist/quota/quota-state.d.ts +6 -0
- package/vendor/llmswitch-core/dist/quota/quota-state.js +191 -0
- package/vendor/llmswitch-core/dist/quota/types.d.ts +62 -0
- package/vendor/llmswitch-core/dist/quota/types.js +1 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/bootstrap/auth-utils.d.ts +6 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/bootstrap/auth-utils.js +288 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/bootstrap/claude-code-helpers.d.ts +11 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/bootstrap/claude-code-helpers.js +18 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/bootstrap/config-defaults.d.ts +5 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/bootstrap/config-defaults.js +13 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/bootstrap/config-normalizers.d.ts +4 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/bootstrap/config-normalizers.js +106 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/bootstrap/profile-builder.d.ts +8 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/bootstrap/profile-builder.js +87 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/bootstrap/provider-normalization.d.ts +44 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/bootstrap/provider-normalization.js +272 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/bootstrap/responses-helpers.d.ts +15 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/bootstrap/responses-helpers.js +65 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/bootstrap/routing-config.d.ts +24 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/bootstrap/routing-config.js +346 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/bootstrap/streaming-helpers.d.ts +19 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/bootstrap/streaming-helpers.js +172 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/bootstrap/utils.d.ts +5 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/bootstrap/utils.js +41 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/bootstrap/web-search-config.d.ts +4 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/bootstrap/web-search-config.js +156 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/bootstrap.d.ts +2 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/bootstrap.js +329 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/classifier.d.ts +10 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/classifier.js +187 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/context-advisor.d.ts +23 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/context-advisor.js +67 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/context-weighted.d.ts +31 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/context-weighted.js +54 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/default-thinking-keywords.d.ts +1 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/default-thinking-keywords.js +13 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine/antigravity/alias-lease.d.ts +33 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine/antigravity/alias-lease.js +257 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine/cooldown-manager.d.ts +34 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine/cooldown-manager.js +118 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine/health/index.d.ts +23 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine/health/index.js +724 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine/provider-key/parse.d.ts +1 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine/provider-key/parse.js +1 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine/route-analytics.d.ts +28 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine/route-analytics.js +44 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine/routing-pools/index.d.ts +13 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine/routing-pools/index.js +386 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine/routing-state/keys.d.ts +3 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine/routing-state/keys.js +30 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine/routing-state/metadata.d.ts +6 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine/routing-state/metadata.js +132 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine/routing-state/store.d.ts +10 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine/routing-state/store.js +156 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine/sticky-session-manager.d.ts +29 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine/sticky-session-manager.js +55 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-health.d.ts +1 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-health.js +1 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-legacy/config.d.ts +11 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-legacy/config.js +108 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-legacy/direct-model.d.ts +10 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-legacy/direct-model.js +38 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-legacy/health.d.ts +13 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-legacy/health.js +104 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-legacy/helpers.d.ts +16 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-legacy/helpers.js +226 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-legacy/route-utils.d.ts +19 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-legacy/route-utils.js +212 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-legacy/selection-core.d.ts +28 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-legacy/selection-core.js +112 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-legacy/selection-state.d.ts +16 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-legacy/selection-state.js +187 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-legacy/state-accessors.d.ts +21 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-legacy/state-accessors.js +118 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-legacy.d.ts +123 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-legacy.js +245 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-logging.d.ts +67 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-logging.js +356 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/alias-selection.d.ts +15 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/alias-selection.js +118 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/context-weight-multipliers.d.ts +11 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/context-weight-multipliers.js +23 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/direct-provider-model.d.ts +9 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/direct-provider-model.js +49 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/instruction-target.d.ts +6 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/instruction-target.js +54 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/key-parsing.d.ts +8 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/key-parsing.js +47 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/multimodal-capability.d.ts +3 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/multimodal-capability.js +26 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-chat-process-clock-directive-parser.d.ts +24 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-chat-process-clock-directive-parser.js +209 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-chat-process-clock-reminder-directives.d.ts +7 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-chat-process-clock-reminder-directives.js +121 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-chat-process-clock-reminder-orchestration-semantics.d.ts +10 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-chat-process-clock-reminder-orchestration-semantics.js +110 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-chat-process-clock-reminder-semantics.d.ts +8 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-chat-process-clock-reminder-semantics.js +281 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-chat-process-clock-reminder-time-tag-semantics.d.ts +1 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-chat-process-clock-reminder-time-tag-semantics.js +25 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-chat-process-clock-reminders-semantics.d.ts +4 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-chat-process-clock-reminders-semantics.js +44 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-chat-process-clock-tool-schema-semantics.d.ts +2 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-chat-process-clock-tool-schema-semantics.js +62 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-chat-process-governance-semantics.d.ts +49 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-chat-process-governance-semantics.js +552 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-chat-process-governed-filter-semantics.d.ts +9 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-chat-process-governed-filter-semantics.js +64 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-chat-process-node-result-semantics.d.ts +5 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-chat-process-node-result-semantics.js +163 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-chat-process-post-governed-normalization-semantics.d.ts +1 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-chat-process-post-governed-normalization-semantics.js +49 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-chat-process-servertool-orchestration-semantics.d.ts +30 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-chat-process-servertool-orchestration-semantics.js +446 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-chat-process-web-search-intent-semantics.d.ts +1 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-chat-process-web-search-intent-semantics.js +49 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-chat-request-filter-semantics.d.ts +1 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-chat-request-filter-semantics.js +54 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-compat-action-semantics.d.ts +22 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-compat-action-semantics.js +559 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-deepseek-web-compat.d.ts +17 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-deepseek-web-compat.js +26 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-hub-bridge-action-semantics.d.ts +276 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-hub-bridge-action-semantics.js +1291 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-hub-bridge-policy-semantics.d.ts +72 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-hub-bridge-policy-semantics.js +405 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-hub-pipeline-edge-stage-semantics.d.ts +18 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-hub-pipeline-edge-stage-semantics.js +333 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-hub-pipeline-governance-semantics.d.ts +30 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-hub-pipeline-governance-semantics.js +202 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-hub-pipeline-inbound-outbound-semantics.d.ts +22 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-hub-pipeline-inbound-outbound-semantics.js +426 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-hub-pipeline-orchestration-semantics.d.ts +57 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-hub-pipeline-orchestration-semantics.js +705 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-hub-pipeline-req-inbound-semantics.d.ts +53 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-hub-pipeline-req-inbound-semantics.js +598 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-hub-pipeline-req-outbound-semantics.d.ts +147 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-hub-pipeline-req-outbound-semantics.js +570 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-hub-pipeline-req-process-semantics.d.ts +26 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-hub-pipeline-req-process-semantics.js +148 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-hub-pipeline-resp-semantics.d.ts +46 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-hub-pipeline-resp-semantics.js +755 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-hub-pipeline-semantic-mappers.d.ts +2 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-hub-pipeline-semantic-mappers.js +83 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-hub-pipeline-session-identifiers-semantics.d.ts +11 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-hub-pipeline-session-identifiers-semantics.js +207 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-hub-pipeline-target-semantics.d.ts +3 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-hub-pipeline-target-semantics.js +128 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-router-hotpath-analysis.d.ts +57 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-router-hotpath-analysis.js +217 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-router-hotpath-loader.d.ts +5 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-router-hotpath-loader.js +464 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-router-hotpath-policy.d.ts +5 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-router-hotpath-policy.js +18 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-router-hotpath-quota-buckets.d.ts +25 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-router-hotpath-quota-buckets.js +85 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-router-hotpath.d.ts +59 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-router-hotpath.js +117 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-shared-conversion-semantics.d.ts +243 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-shared-conversion-semantics.js +2594 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-snapshot-hooks.d.ts +3 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-snapshot-hooks.js +109 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-virtual-router-alias-selection-semantics.d.ts +16 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-virtual-router-alias-selection-semantics.js +96 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-virtual-router-engine-proxy.d.ts +16 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-virtual-router-engine-proxy.js +14 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-virtual-router-routing-instructions-semantics.d.ts +3 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-virtual-router-routing-instructions-semantics.js +123 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-virtual-router-stop-message-actions-semantics.d.ts +6 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-virtual-router-stop-message-actions-semantics.js +85 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-virtual-router-stop-message-semantics.d.ts +9 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-virtual-router-stop-message-semantics.js +70 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-virtual-router-stop-message-state-semantics.d.ts +2 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-virtual-router-stop-message-state-semantics.js +76 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/route-utils.d.ts +15 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/route-utils.js +248 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/routing-state-filter.d.ts +4 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/routing-state-filter.js +50 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/selection-deps.d.ts +58 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/selection-deps.js +1 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/sticky-pool.d.ts +11 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/sticky-pool.js +109 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/tier-load-balancing.d.ts +16 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/tier-load-balancing.js +120 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/tier-priority.d.ts +11 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/tier-priority.js +55 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/tier-selection-antigravity-session-lease.d.ts +10 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/tier-selection-antigravity-session-lease.js +231 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/tier-selection-antigravity-target-split.d.ts +4 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/tier-selection-antigravity-target-split.js +43 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/tier-selection-quota-integration.d.ts +29 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/tier-selection-quota-integration.js +194 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/tier-selection-select.d.ts +22 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/tier-selection-select.js +352 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/tier-selection.d.ts +3 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/tier-selection.js +309 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection.d.ts +1 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection.js +1 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine.d.ts +43 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/engine.js +360 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/error-center.d.ts +10 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/error-center.js +39 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/features.d.ts +3 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/features.js +124 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/health-manager.d.ts +23 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/health-manager.js +107 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/health-weighted.d.ts +25 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/health-weighted.js +63 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/load-balancer.d.ts +28 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/load-balancer.js +160 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/message-utils.d.ts +15 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/message-utils.js +235 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/pre-command-file-resolver.d.ts +2 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/pre-command-file-resolver.js +117 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/provider-registry.d.ts +17 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/provider-registry.js +145 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/routing-instructions/clean.d.ts +3 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/routing-instructions/clean.js +34 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/routing-instructions/parse.d.ts +6 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/routing-instructions/parse.js +24 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/routing-instructions/state.d.ts +4 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/routing-instructions/state.js +284 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/routing-instructions/types.d.ts +74 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/routing-instructions/types.js +2 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/routing-instructions.d.ts +5 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/routing-instructions.js +4 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/routing-pre-command-actions.d.ts +3 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/routing-pre-command-actions.js +26 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/routing-pre-command-parser.d.ts +2 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/routing-pre-command-parser.js +85 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/routing-pre-command-state-codec.d.ts +3 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/routing-pre-command-state-codec.js +24 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/routing-stop-message-actions.d.ts +2 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/routing-stop-message-actions.js +99 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/routing-stop-message-parser.d.ts +3 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/routing-stop-message-parser.js +19 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/routing-stop-message-state-codec.d.ts +7 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/routing-stop-message-state-codec.js +121 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/sticky-session-store.d.ts +8 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/sticky-session-store.js +296 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/stop-message-file-resolver.d.ts +2 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/stop-message-file-resolver.js +76 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/stop-message-stage-template-files.d.ts +12 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/stop-message-stage-template-files.js +67 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/stop-message-state-sync.d.ts +17 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/stop-message-state-sync.js +82 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/success-center.d.ts +10 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/success-center.js +32 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/token-counter.d.ts +2 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/token-counter.js +148 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/token-estimator.d.ts +2 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/token-estimator.js +16 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/token-file-scanner.d.ts +24 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/token-file-scanner.js +117 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/tool-signals.d.ts +19 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/tool-signals.js +647 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/types.d.ts +681 -0
- package/vendor/llmswitch-core/dist/router/virtual-router/types.js +34 -0
- package/vendor/llmswitch-core/dist/runtime/user-data-paths.d.ts +5 -0
- package/vendor/llmswitch-core/dist/runtime/user-data-paths.js +43 -0
- package/vendor/llmswitch-core/dist/servertool/clock/config.d.ts +17 -0
- package/vendor/llmswitch-core/dist/servertool/clock/config.js +48 -0
- package/vendor/llmswitch-core/dist/servertool/clock/daemon.d.ts +24 -0
- package/vendor/llmswitch-core/dist/servertool/clock/daemon.js +207 -0
- package/vendor/llmswitch-core/dist/servertool/clock/io.d.ts +2 -0
- package/vendor/llmswitch-core/dist/servertool/clock/io.js +14 -0
- package/vendor/llmswitch-core/dist/servertool/clock/log.d.ts +3 -0
- package/vendor/llmswitch-core/dist/servertool/clock/log.js +13 -0
- package/vendor/llmswitch-core/dist/servertool/clock/ntp.d.ts +18 -0
- package/vendor/llmswitch-core/dist/servertool/clock/ntp.js +318 -0
- package/vendor/llmswitch-core/dist/servertool/clock/paths.d.ts +5 -0
- package/vendor/llmswitch-core/dist/servertool/clock/paths.js +28 -0
- package/vendor/llmswitch-core/dist/servertool/clock/recurrence.d.ts +7 -0
- package/vendor/llmswitch-core/dist/servertool/clock/recurrence.js +248 -0
- package/vendor/llmswitch-core/dist/servertool/clock/session-scope.d.ts +3 -0
- package/vendor/llmswitch-core/dist/servertool/clock/session-scope.js +41 -0
- package/vendor/llmswitch-core/dist/servertool/clock/session-store.d.ts +3 -0
- package/vendor/llmswitch-core/dist/servertool/clock/session-store.js +63 -0
- package/vendor/llmswitch-core/dist/servertool/clock/state.d.ts +9 -0
- package/vendor/llmswitch-core/dist/servertool/clock/state.js +135 -0
- package/vendor/llmswitch-core/dist/servertool/clock/task-store.d.ts +5 -0
- package/vendor/llmswitch-core/dist/servertool/clock/task-store.js +4 -0
- package/vendor/llmswitch-core/dist/servertool/clock/tasks.d.ts +24 -0
- package/vendor/llmswitch-core/dist/servertool/clock/tasks.js +595 -0
- package/vendor/llmswitch-core/dist/servertool/clock/types.d.ts +98 -0
- package/vendor/llmswitch-core/dist/servertool/clock/types.js +1 -0
- package/vendor/llmswitch-core/dist/servertool/continue-execution/log.d.ts +3 -0
- package/vendor/llmswitch-core/dist/servertool/continue-execution/log.js +13 -0
- package/vendor/llmswitch-core/dist/servertool/engine.d.ts +38 -0
- package/vendor/llmswitch-core/dist/servertool/engine.js +1660 -0
- package/vendor/llmswitch-core/dist/servertool/followup-shadow.d.ts +16 -0
- package/vendor/llmswitch-core/dist/servertool/followup-shadow.js +145 -0
- package/vendor/llmswitch-core/dist/servertool/handlers/antigravity-thought-signature-bootstrap.d.ts +1 -0
- package/vendor/llmswitch-core/dist/servertool/handlers/antigravity-thought-signature-bootstrap.js +225 -0
- package/vendor/llmswitch-core/dist/servertool/handlers/apply-patch-guard.d.ts +1 -0
- package/vendor/llmswitch-core/dist/servertool/handlers/apply-patch-guard.js +5 -0
- package/vendor/llmswitch-core/dist/servertool/handlers/clock-auto.d.ts +1 -0
- package/vendor/llmswitch-core/dist/servertool/handlers/clock-auto.js +177 -0
- package/vendor/llmswitch-core/dist/servertool/handlers/clock.d.ts +1 -0
- package/vendor/llmswitch-core/dist/servertool/handlers/clock.js +544 -0
- package/vendor/llmswitch-core/dist/servertool/handlers/compaction-detect.d.ts +1 -0
- package/vendor/llmswitch-core/dist/servertool/handlers/compaction-detect.js +1 -0
- package/vendor/llmswitch-core/dist/servertool/handlers/continue-execution.d.ts +1 -0
- package/vendor/llmswitch-core/dist/servertool/handlers/continue-execution.js +110 -0
- package/vendor/llmswitch-core/dist/servertool/handlers/exec-command-guard.d.ts +1 -0
- package/vendor/llmswitch-core/dist/servertool/handlers/exec-command-guard.js +10 -0
- package/vendor/llmswitch-core/dist/servertool/handlers/followup-message-trimmer.d.ts +16 -0
- package/vendor/llmswitch-core/dist/servertool/handlers/followup-message-trimmer.js +198 -0
- package/vendor/llmswitch-core/dist/servertool/handlers/followup-request-builder.d.ts +25 -0
- package/vendor/llmswitch-core/dist/servertool/handlers/followup-request-builder.js +515 -0
- package/vendor/llmswitch-core/dist/servertool/handlers/followup-sanitize.d.ts +2 -0
- package/vendor/llmswitch-core/dist/servertool/handlers/followup-sanitize.js +7 -0
- package/vendor/llmswitch-core/dist/servertool/handlers/gemini-empty-reply-continue.d.ts +1 -0
- package/vendor/llmswitch-core/dist/servertool/handlers/gemini-empty-reply-continue.js +3 -0
- package/vendor/llmswitch-core/dist/servertool/handlers/iflow-model-error-retry.d.ts +1 -0
- package/vendor/llmswitch-core/dist/servertool/handlers/iflow-model-error-retry.js +92 -0
- package/vendor/llmswitch-core/dist/servertool/handlers/recursive-detection-guard.d.ts +1 -0
- package/vendor/llmswitch-core/dist/servertool/handlers/recursive-detection-guard.js +374 -0
- package/vendor/llmswitch-core/dist/servertool/handlers/review.d.ts +1 -0
- package/vendor/llmswitch-core/dist/servertool/handlers/review.js +181 -0
- package/vendor/llmswitch-core/dist/servertool/handlers/stop-message-auto/blocked-report.d.ts +16 -0
- package/vendor/llmswitch-core/dist/servertool/handlers/stop-message-auto/blocked-report.js +407 -0
- package/vendor/llmswitch-core/dist/servertool/handlers/stop-message-auto/iflow-followup.d.ts +44 -0
- package/vendor/llmswitch-core/dist/servertool/handlers/stop-message-auto/iflow-followup.js +816 -0
- package/vendor/llmswitch-core/dist/servertool/handlers/stop-message-auto/routing-state.d.ts +28 -0
- package/vendor/llmswitch-core/dist/servertool/handlers/stop-message-auto/routing-state.js +123 -0
- package/vendor/llmswitch-core/dist/servertool/handlers/stop-message-auto/runtime-utils.d.ts +81 -0
- package/vendor/llmswitch-core/dist/servertool/handlers/stop-message-auto/runtime-utils.js +355 -0
- package/vendor/llmswitch-core/dist/servertool/handlers/stop-message-auto.d.ts +1 -0
- package/vendor/llmswitch-core/dist/servertool/handlers/stop-message-auto.js +553 -0
- package/vendor/llmswitch-core/dist/servertool/handlers/vision.d.ts +7 -0
- package/vendor/llmswitch-core/dist/servertool/handlers/vision.js +240 -0
- package/vendor/llmswitch-core/dist/servertool/handlers/web-search.d.ts +7 -0
- package/vendor/llmswitch-core/dist/servertool/handlers/web-search.js +926 -0
- package/vendor/llmswitch-core/dist/servertool/log/progress-file.d.ts +14 -0
- package/vendor/llmswitch-core/dist/servertool/log/progress-file.js +88 -0
- package/vendor/llmswitch-core/dist/servertool/pending-session.d.ts +19 -0
- package/vendor/llmswitch-core/dist/servertool/pending-session.js +99 -0
- package/vendor/llmswitch-core/dist/servertool/pre-command-hooks.d.ts +17 -0
- package/vendor/llmswitch-core/dist/servertool/pre-command-hooks.js +491 -0
- package/vendor/llmswitch-core/dist/servertool/reenter-backend.d.ts +23 -0
- package/vendor/llmswitch-core/dist/servertool/reenter-backend.js +20 -0
- package/vendor/llmswitch-core/dist/servertool/registry.d.ts +35 -0
- package/vendor/llmswitch-core/dist/servertool/registry.js +92 -0
- package/vendor/llmswitch-core/dist/servertool/server-side-tools.d.ts +15 -0
- package/vendor/llmswitch-core/dist/servertool/server-side-tools.js +898 -0
- package/vendor/llmswitch-core/dist/servertool/stop-gateway-context.d.ts +14 -0
- package/vendor/llmswitch-core/dist/servertool/stop-gateway-context.js +167 -0
- package/vendor/llmswitch-core/dist/servertool/stop-message-compare-context.d.ts +24 -0
- package/vendor/llmswitch-core/dist/servertool/stop-message-compare-context.js +133 -0
- package/vendor/llmswitch-core/dist/servertool/strip-servertool-calls.d.ts +2 -0
- package/vendor/llmswitch-core/dist/servertool/strip-servertool-calls.js +75 -0
- package/vendor/llmswitch-core/dist/servertool/types.d.ts +235 -0
- package/vendor/llmswitch-core/dist/servertool/types.js +1 -0
- package/vendor/llmswitch-core/dist/sse/index.d.ts +176 -0
- package/vendor/llmswitch-core/dist/sse/index.js +142 -0
- package/vendor/llmswitch-core/dist/sse/json-to-sse/anthropic-json-to-sse-converter.d.ts +15 -0
- package/vendor/llmswitch-core/dist/sse/json-to-sse/anthropic-json-to-sse-converter.js +112 -0
- package/vendor/llmswitch-core/dist/sse/json-to-sse/chat-json-to-sse-converter.d.ts +80 -0
- package/vendor/llmswitch-core/dist/sse/json-to-sse/chat-json-to-sse-converter.js +300 -0
- package/vendor/llmswitch-core/dist/sse/json-to-sse/event-generators/chat.d.ts +55 -0
- package/vendor/llmswitch-core/dist/sse/json-to-sse/event-generators/chat.js +233 -0
- package/vendor/llmswitch-core/dist/sse/json-to-sse/event-generators/responses.d.ts +103 -0
- package/vendor/llmswitch-core/dist/sse/json-to-sse/event-generators/responses.js +703 -0
- package/vendor/llmswitch-core/dist/sse/json-to-sse/gemini-json-to-sse-converter.d.ts +15 -0
- package/vendor/llmswitch-core/dist/sse/json-to-sse/gemini-json-to-sse-converter.js +99 -0
- package/vendor/llmswitch-core/dist/sse/json-to-sse/index.d.ts +7 -0
- package/vendor/llmswitch-core/dist/sse/json-to-sse/index.js +9 -0
- package/vendor/llmswitch-core/dist/sse/json-to-sse/responses-json-to-sse-converter.d.ts +80 -0
- package/vendor/llmswitch-core/dist/sse/json-to-sse/responses-json-to-sse-converter.js +322 -0
- package/vendor/llmswitch-core/dist/sse/json-to-sse/sequencers/anthropic-sequencer.d.ts +13 -0
- package/vendor/llmswitch-core/dist/sse/json-to-sse/sequencers/anthropic-sequencer.js +162 -0
- package/vendor/llmswitch-core/dist/sse/json-to-sse/sequencers/chat-sequencer.d.ts +39 -0
- package/vendor/llmswitch-core/dist/sse/json-to-sse/sequencers/chat-sequencer.js +264 -0
- package/vendor/llmswitch-core/dist/sse/json-to-sse/sequencers/gemini-sequencer.d.ts +10 -0
- package/vendor/llmswitch-core/dist/sse/json-to-sse/sequencers/gemini-sequencer.js +95 -0
- package/vendor/llmswitch-core/dist/sse/json-to-sse/sequencers/responses-sequencer.d.ts +40 -0
- package/vendor/llmswitch-core/dist/sse/json-to-sse/sequencers/responses-sequencer.js +293 -0
- package/vendor/llmswitch-core/dist/sse/registry/sse-codec-registry.d.ts +32 -0
- package/vendor/llmswitch-core/dist/sse/registry/sse-codec-registry.js +135 -0
- package/vendor/llmswitch-core/dist/sse/shared/chat-serializer.d.ts +4 -0
- package/vendor/llmswitch-core/dist/sse/shared/chat-serializer.js +40 -0
- package/vendor/llmswitch-core/dist/sse/shared/constants.d.ts +272 -0
- package/vendor/llmswitch-core/dist/sse/shared/constants.js +321 -0
- package/vendor/llmswitch-core/dist/sse/shared/reasoning-dispatcher.d.ts +10 -0
- package/vendor/llmswitch-core/dist/sse/shared/reasoning-dispatcher.js +25 -0
- package/vendor/llmswitch-core/dist/sse/shared/responses-output-normalizer.d.ts +13 -0
- package/vendor/llmswitch-core/dist/sse/shared/responses-output-normalizer.js +47 -0
- package/vendor/llmswitch-core/dist/sse/shared/serializers/anthropic-event-serializer.d.ts +2 -0
- package/vendor/llmswitch-core/dist/sse/shared/serializers/anthropic-event-serializer.js +9 -0
- package/vendor/llmswitch-core/dist/sse/shared/serializers/base-serializer.d.ts +158 -0
- package/vendor/llmswitch-core/dist/sse/shared/serializers/base-serializer.js +210 -0
- package/vendor/llmswitch-core/dist/sse/shared/serializers/chat-event-serializer.d.ts +82 -0
- package/vendor/llmswitch-core/dist/sse/shared/serializers/chat-event-serializer.js +275 -0
- package/vendor/llmswitch-core/dist/sse/shared/serializers/gemini-event-serializer.d.ts +2 -0
- package/vendor/llmswitch-core/dist/sse/shared/serializers/gemini-event-serializer.js +5 -0
- package/vendor/llmswitch-core/dist/sse/shared/serializers/index.d.ts +42 -0
- package/vendor/llmswitch-core/dist/sse/shared/serializers/index.js +56 -0
- package/vendor/llmswitch-core/dist/sse/shared/serializers/responses-event-serializer.d.ts +131 -0
- package/vendor/llmswitch-core/dist/sse/shared/serializers/responses-event-serializer.js +375 -0
- package/vendor/llmswitch-core/dist/sse/shared/serializers/types.d.ts +51 -0
- package/vendor/llmswitch-core/dist/sse/shared/serializers/types.js +4 -0
- package/vendor/llmswitch-core/dist/sse/shared/utils.d.ts +254 -0
- package/vendor/llmswitch-core/dist/sse/shared/utils.js +543 -0
- package/vendor/llmswitch-core/dist/sse/shared/writer.d.ts +127 -0
- package/vendor/llmswitch-core/dist/sse/shared/writer.js +321 -0
- package/vendor/llmswitch-core/dist/sse/sse-to-json/anthropic-sse-to-json-converter.d.ts +20 -0
- package/vendor/llmswitch-core/dist/sse/sse-to-json/anthropic-sse-to-json-converter.js +204 -0
- package/vendor/llmswitch-core/dist/sse/sse-to-json/builders/anthropic-response-builder.d.ts +16 -0
- package/vendor/llmswitch-core/dist/sse/sse-to-json/builders/anthropic-response-builder.js +258 -0
- package/vendor/llmswitch-core/dist/sse/sse-to-json/builders/response-builder.d.ts +177 -0
- package/vendor/llmswitch-core/dist/sse/sse-to-json/builders/response-builder.js +1135 -0
- package/vendor/llmswitch-core/dist/sse/sse-to-json/chat-sse-to-json-converter.d.ts +119 -0
- package/vendor/llmswitch-core/dist/sse/sse-to-json/chat-sse-to-json-converter.js +850 -0
- package/vendor/llmswitch-core/dist/sse/sse-to-json/gemini-sse-to-json-converter.d.ts +14 -0
- package/vendor/llmswitch-core/dist/sse/sse-to-json/gemini-sse-to-json-converter.js +186 -0
- package/vendor/llmswitch-core/dist/sse/sse-to-json/index.d.ts +7 -0
- package/vendor/llmswitch-core/dist/sse/sse-to-json/index.js +9 -0
- package/vendor/llmswitch-core/dist/sse/sse-to-json/parsers/sse-parser.d.ts +73 -0
- package/vendor/llmswitch-core/dist/sse/sse-to-json/parsers/sse-parser.js +434 -0
- package/vendor/llmswitch-core/dist/sse/sse-to-json/responses-sse-to-json-converter.d.ts +61 -0
- package/vendor/llmswitch-core/dist/sse/sse-to-json/responses-sse-to-json-converter.js +306 -0
- package/vendor/llmswitch-core/dist/sse/types/anthropic-types.d.ts +194 -0
- package/vendor/llmswitch-core/dist/sse/types/anthropic-types.js +8 -0
- package/vendor/llmswitch-core/dist/sse/types/chat-types.d.ts +321 -0
- package/vendor/llmswitch-core/dist/sse/types/chat-types.js +33 -0
- package/vendor/llmswitch-core/dist/sse/types/conversion-context.d.ts +214 -0
- package/vendor/llmswitch-core/dist/sse/types/conversion-context.js +20 -0
- package/vendor/llmswitch-core/dist/sse/types/core-interfaces.d.ts +94 -0
- package/vendor/llmswitch-core/dist/sse/types/core-interfaces.js +5 -0
- package/vendor/llmswitch-core/dist/sse/types/gemini-types.d.ts +135 -0
- package/vendor/llmswitch-core/dist/sse/types/gemini-types.js +5 -0
- package/vendor/llmswitch-core/dist/sse/types/index.d.ts +17 -0
- package/vendor/llmswitch-core/dist/sse/types/index.js +9 -0
- package/vendor/llmswitch-core/dist/sse/types/responses-types.d.ts +334 -0
- package/vendor/llmswitch-core/dist/sse/types/responses-types.js +38 -0
- package/vendor/llmswitch-core/dist/sse/types/sse-events.d.ts +181 -0
- package/vendor/llmswitch-core/dist/sse/types/sse-events.js +150 -0
- package/vendor/llmswitch-core/dist/sse/types/stream-state.d.ts +199 -0
- package/vendor/llmswitch-core/dist/sse/types/stream-state.js +44 -0
- package/vendor/llmswitch-core/dist/sse/types/utility-types.d.ts +234 -0
- package/vendor/llmswitch-core/dist/sse/types/utility-types.js +46 -0
- package/vendor/llmswitch-core/dist/telemetry/stats-center.d.ts +82 -0
- package/vendor/llmswitch-core/dist/telemetry/stats-center.js +308 -0
- package/vendor/llmswitch-core/dist/tools/apply-patch/args-normalizer/default-actions.d.ts +2 -0
- package/vendor/llmswitch-core/dist/tools/apply-patch/args-normalizer/default-actions.js +12 -0
- package/vendor/llmswitch-core/dist/tools/apply-patch/args-normalizer/extract-patch.d.ts +2 -0
- package/vendor/llmswitch-core/dist/tools/apply-patch/args-normalizer/extract-patch.js +15 -0
- package/vendor/llmswitch-core/dist/tools/apply-patch/args-normalizer/index.d.ts +2 -0
- package/vendor/llmswitch-core/dist/tools/apply-patch/args-normalizer/index.js +164 -0
- package/vendor/llmswitch-core/dist/tools/apply-patch/args-normalizer/structured-builders.d.ts +7 -0
- package/vendor/llmswitch-core/dist/tools/apply-patch/args-normalizer/structured-builders.js +85 -0
- package/vendor/llmswitch-core/dist/tools/apply-patch/args-normalizer/types.d.ts +54 -0
- package/vendor/llmswitch-core/dist/tools/apply-patch/args-normalizer/types.js +1 -0
- package/vendor/llmswitch-core/dist/tools/apply-patch/execution-capturer.d.ts +13 -0
- package/vendor/llmswitch-core/dist/tools/apply-patch/execution-capturer.js +181 -0
- package/vendor/llmswitch-core/dist/tools/apply-patch/json/parse-loose.d.ts +3 -0
- package/vendor/llmswitch-core/dist/tools/apply-patch/json/parse-loose.js +139 -0
- package/vendor/llmswitch-core/dist/tools/apply-patch/patch-text/context-diff.d.ts +1 -0
- package/vendor/llmswitch-core/dist/tools/apply-patch/patch-text/context-diff.js +173 -0
- package/vendor/llmswitch-core/dist/tools/apply-patch/patch-text/git-diff.d.ts +1 -0
- package/vendor/llmswitch-core/dist/tools/apply-patch/patch-text/git-diff.js +138 -0
- package/vendor/llmswitch-core/dist/tools/apply-patch/patch-text/looks-like-patch.d.ts +1 -0
- package/vendor/llmswitch-core/dist/tools/apply-patch/patch-text/looks-like-patch.js +11 -0
- package/vendor/llmswitch-core/dist/tools/apply-patch/patch-text/normalize.d.ts +3 -0
- package/vendor/llmswitch-core/dist/tools/apply-patch/patch-text/normalize.js +383 -0
- package/vendor/llmswitch-core/dist/tools/apply-patch/regression-capturer.d.ts +13 -0
- package/vendor/llmswitch-core/dist/tools/apply-patch/regression-capturer.js +113 -0
- package/vendor/llmswitch-core/dist/tools/apply-patch/structured/coercion.d.ts +3 -0
- package/vendor/llmswitch-core/dist/tools/apply-patch/structured/coercion.js +103 -0
- package/vendor/llmswitch-core/dist/tools/apply-patch/structured.d.ts +20 -0
- package/vendor/llmswitch-core/dist/tools/apply-patch/structured.js +537 -0
- package/vendor/llmswitch-core/dist/tools/apply-patch/validation/shared.d.ts +3 -0
- package/vendor/llmswitch-core/dist/tools/apply-patch/validation/shared.js +6 -0
- package/vendor/llmswitch-core/dist/tools/apply-patch/validator.d.ts +8 -0
- package/vendor/llmswitch-core/dist/tools/apply-patch/validator.js +21 -0
- package/vendor/llmswitch-core/dist/tools/apply-patch-structured.d.ts +1 -0
- package/vendor/llmswitch-core/dist/tools/apply-patch-structured.js +1 -0
- package/vendor/llmswitch-core/dist/tools/args-json.d.ts +1 -0
- package/vendor/llmswitch-core/dist/tools/args-json.js +204 -0
- package/vendor/llmswitch-core/dist/tools/exec-command/normalize.d.ts +17 -0
- package/vendor/llmswitch-core/dist/tools/exec-command/normalize.js +116 -0
- package/vendor/llmswitch-core/dist/tools/exec-command/regression-capturer.d.ts +11 -0
- package/vendor/llmswitch-core/dist/tools/exec-command/regression-capturer.js +144 -0
- package/vendor/llmswitch-core/dist/tools/exec-command/validator.d.ts +10 -0
- package/vendor/llmswitch-core/dist/tools/exec-command/validator.js +238 -0
- package/vendor/llmswitch-core/dist/tools/patch-regression-capturer.d.ts +1 -0
- package/vendor/llmswitch-core/dist/tools/patch-regression-capturer.js +1 -0
- package/vendor/llmswitch-core/dist/tools/tool-description-utils.d.ts +5 -0
- package/vendor/llmswitch-core/dist/tools/tool-description-utils.js +50 -0
- package/vendor/llmswitch-core/dist/tools/tool-registry.d.ts +15 -0
- package/vendor/llmswitch-core/dist/tools/tool-registry.js +253 -0
- package/vendor/llmswitch-core/package.json +189 -0
- package/scripts/link-llmswitch.mjs +0 -56
|
@@ -0,0 +1,816 @@
|
|
|
1
|
+
import * as childProcess from 'node:child_process';
|
|
2
|
+
import * as fs from 'node:fs';
|
|
3
|
+
import * as os from 'node:os';
|
|
4
|
+
import * as path from 'node:path';
|
|
5
|
+
import { readRuntimeMetadata } from '../../../conversion/runtime-metadata.js';
|
|
6
|
+
import { extractTextFromMessageContent } from './blocked-report.js';
|
|
7
|
+
import { appendServerToolProgressFileEvent } from '../../log/progress-file.js';
|
|
8
|
+
import { sanitizeFollowupSnapshotText, sanitizeFollowupText } from '../followup-sanitize.js';
|
|
9
|
+
const DEFAULT_STOP_MESSAGE_AI_DONE_MARKER = '[STOPMESSAGE_DONE]';
|
|
10
|
+
const DEFAULT_STOP_MESSAGE_AI_APPROVED_MARKER = '[STOPMESSAGE_APPROVED]';
|
|
11
|
+
const STOP_MESSAGE_AUTOMESSAGE_IFLOW_TIMEOUT_MS = 300_000;
|
|
12
|
+
const STOP_MESSAGE_AUTOMESSAGE_IFLOW_TIMEOUT_MAX_MS = 300_000;
|
|
13
|
+
const STOP_MESSAGE_AUTOMESSAGE_IFLOW_TIMEOUT_TEST_CAP_MS = 800;
|
|
14
|
+
const STOP_MESSAGE_AUTOMESSAGE_PROMPT_MAX_CHARS = 18_000;
|
|
15
|
+
const STOP_MESSAGE_AUTOMESSAGE_OUTPUT_MAX_CHARS = 1_600;
|
|
16
|
+
const STOP_MESSAGE_AUTOMESSAGE_LOG_SUMMARY_MAX_CHARS = 200;
|
|
17
|
+
const ANSI_ESCAPE_PATTERN = /\x1B\[[0-?]*[ -/]*[@-~]/g;
|
|
18
|
+
export function renderStopMessageAutoFollowupViaAi(args) {
|
|
19
|
+
if (!isStopMessageAutoMessageEnabled()) {
|
|
20
|
+
return null;
|
|
21
|
+
}
|
|
22
|
+
const backendOrder = resolveStopMessageAutoMessageBackendOrder();
|
|
23
|
+
const maxOutputChars = resolveStopMessageAutoMessageIflowOutputMaxChars();
|
|
24
|
+
const workingDirectory = resolveStopMessageAutoMessageWorkingDirectory(args.workingDirectory);
|
|
25
|
+
for (const backend of backendOrder) {
|
|
26
|
+
const command = resolveStopMessageAutoMessageCommand(backend);
|
|
27
|
+
if (!command) {
|
|
28
|
+
continue;
|
|
29
|
+
}
|
|
30
|
+
const prompt = buildStopMessageAutoMessageIflowPrompt(args, backend);
|
|
31
|
+
if (!prompt) {
|
|
32
|
+
continue;
|
|
33
|
+
}
|
|
34
|
+
const invocation = createStopMessageAutoMessageInvocation(backend, prompt);
|
|
35
|
+
const timeoutMs = resolveStopMessageAutoMessageTimeoutMs(backend);
|
|
36
|
+
const requestSummary = summarizeStopMessageAutoMessageLog([
|
|
37
|
+
`base=${args.baseStopMessageText || ''}`,
|
|
38
|
+
`candidate=${args.candidateFollowupText || ''}`,
|
|
39
|
+
`assistant=${args.responseSnapshot.assistantText || ''}`,
|
|
40
|
+
`reasoning=${args.responseSnapshot.reasoningText || ''}`,
|
|
41
|
+
`completionClaimed=${args.completionClaimed === true ? 'yes' : 'no'}`,
|
|
42
|
+
`backend=${backend}`,
|
|
43
|
+
`cwd=${workingDirectory || 'n/a'}`
|
|
44
|
+
].join(' | '), STOP_MESSAGE_AUTOMESSAGE_LOG_SUMMARY_MAX_CHARS);
|
|
45
|
+
logStopMessageAutoMessageIflow({
|
|
46
|
+
requestId: args.requestId,
|
|
47
|
+
stage: 'request',
|
|
48
|
+
requestSummary
|
|
49
|
+
});
|
|
50
|
+
try {
|
|
51
|
+
const result = childProcess.spawnSync(command, invocation.args, {
|
|
52
|
+
encoding: 'utf8',
|
|
53
|
+
timeout: timeoutMs,
|
|
54
|
+
maxBuffer: 1024 * 1024,
|
|
55
|
+
...(workingDirectory ? { cwd: workingDirectory } : {})
|
|
56
|
+
});
|
|
57
|
+
if (result.error || result.status !== 0) {
|
|
58
|
+
const responseSummary = summarizeStopMessageAutoMessageLog(sanitizeStopMessageAutoMessageOutput(result.stderr || result.stdout, STOP_MESSAGE_AUTOMESSAGE_OUTPUT_MAX_CHARS), STOP_MESSAGE_AUTOMESSAGE_LOG_SUMMARY_MAX_CHARS);
|
|
59
|
+
logStopMessageAutoMessageIflow({
|
|
60
|
+
requestId: args.requestId,
|
|
61
|
+
stage: 'response',
|
|
62
|
+
status: result.status ?? -1,
|
|
63
|
+
requestSummary,
|
|
64
|
+
responseSummary,
|
|
65
|
+
error: result.error ? String(result.error) : 'non_zero_exit'
|
|
66
|
+
});
|
|
67
|
+
continue;
|
|
68
|
+
}
|
|
69
|
+
const backendOutput = backend === 'codex'
|
|
70
|
+
? sanitizeStopMessageAutoMessageOutput(readStopMessageAutoMessageCodexOutput(invocation.outputFilePath), maxOutputChars)
|
|
71
|
+
: '';
|
|
72
|
+
const stdout = backendOutput || sanitizeStopMessageAutoMessageOutput(result.stdout, maxOutputChars);
|
|
73
|
+
if (stdout) {
|
|
74
|
+
logStopMessageAutoMessageIflow({
|
|
75
|
+
requestId: args.requestId,
|
|
76
|
+
stage: 'response',
|
|
77
|
+
status: result.status ?? 0,
|
|
78
|
+
requestSummary,
|
|
79
|
+
responseSummary: summarizeStopMessageAutoMessageLog(stdout, STOP_MESSAGE_AUTOMESSAGE_LOG_SUMMARY_MAX_CHARS)
|
|
80
|
+
});
|
|
81
|
+
return stdout;
|
|
82
|
+
}
|
|
83
|
+
const stderr = sanitizeStopMessageAutoMessageOutput(result.stderr, maxOutputChars);
|
|
84
|
+
logStopMessageAutoMessageIflow({
|
|
85
|
+
requestId: args.requestId,
|
|
86
|
+
stage: 'response',
|
|
87
|
+
status: result.status ?? 0,
|
|
88
|
+
requestSummary,
|
|
89
|
+
responseSummary: summarizeStopMessageAutoMessageLog(stderr, STOP_MESSAGE_AUTOMESSAGE_LOG_SUMMARY_MAX_CHARS)
|
|
90
|
+
});
|
|
91
|
+
if (stderr) {
|
|
92
|
+
return stderr;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
catch (error) {
|
|
96
|
+
logStopMessageAutoMessageIflow({
|
|
97
|
+
requestId: args.requestId,
|
|
98
|
+
stage: 'response',
|
|
99
|
+
status: -1,
|
|
100
|
+
requestSummary,
|
|
101
|
+
error: error instanceof Error ? error.message : String(error ?? 'unknown_error')
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
finally {
|
|
105
|
+
invocation.cleanup();
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
return null;
|
|
109
|
+
}
|
|
110
|
+
export function renderStopMessageAutoFollowupViaIflow(args) {
|
|
111
|
+
return renderStopMessageAutoFollowupViaAi(args);
|
|
112
|
+
}
|
|
113
|
+
export function extractStopMessageAutoResponseSnapshot(base, adapterContext) {
|
|
114
|
+
const providerProtocol = extractStopMessageProviderProtocol(adapterContext);
|
|
115
|
+
if (!base || typeof base !== 'object' || Array.isArray(base)) {
|
|
116
|
+
return { ...(providerProtocol ? { providerProtocol } : {}) };
|
|
117
|
+
}
|
|
118
|
+
const payload = base;
|
|
119
|
+
const choices = Array.isArray(payload.choices) ? payload.choices : [];
|
|
120
|
+
if (choices.length > 0) {
|
|
121
|
+
const targetChoice = choices.find((choice) => toNonEmptyText(asRecord(choice)?.finish_reason).toLowerCase() === 'stop') || choices[0];
|
|
122
|
+
const choiceRecord = asRecord(targetChoice);
|
|
123
|
+
const message = asRecord(choiceRecord?.message);
|
|
124
|
+
const finishReason = toNonEmptyText(choiceRecord?.finish_reason).toLowerCase() || undefined;
|
|
125
|
+
const assistantText = message ? extractStopMessageAssistantText(message) : '';
|
|
126
|
+
const reasoningText = message ? extractStopMessageReasoningText(message) : '';
|
|
127
|
+
return {
|
|
128
|
+
...(providerProtocol ? { providerProtocol } : {}),
|
|
129
|
+
...(finishReason ? { finishReason } : {}),
|
|
130
|
+
...(assistantText ? { assistantText } : {}),
|
|
131
|
+
...(reasoningText ? { reasoningText } : {}),
|
|
132
|
+
responseExcerpt: buildStopMessageResponseExcerpt(choiceRecord || payload)
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
const anthropicContent = extractTextFromMessageContent(payload.content);
|
|
136
|
+
const anthropicReasoning = extractStopMessageReasoningFromContent(payload.content);
|
|
137
|
+
const anthropicFinishReason = toNonEmptyText(payload.stop_reason).toLowerCase() || undefined;
|
|
138
|
+
const responsesText = extractResponsesOutputText(payload);
|
|
139
|
+
const responsesReasoning = extractResponsesReasoningText(payload);
|
|
140
|
+
const responseFinishReason = anthropicFinishReason ||
|
|
141
|
+
toNonEmptyText(payload.finish_reason).toLowerCase() ||
|
|
142
|
+
toNonEmptyText(payload.status).toLowerCase() ||
|
|
143
|
+
undefined;
|
|
144
|
+
const assistantText = dedupeAndJoinTexts([responsesText, anthropicContent]);
|
|
145
|
+
const reasoningText = dedupeAndJoinTexts([responsesReasoning, anthropicReasoning]);
|
|
146
|
+
return {
|
|
147
|
+
...(providerProtocol ? { providerProtocol } : {}),
|
|
148
|
+
...(responseFinishReason ? { finishReason: responseFinishReason } : {}),
|
|
149
|
+
...(assistantText ? { assistantText } : {}),
|
|
150
|
+
...(reasoningText ? { reasoningText } : {}),
|
|
151
|
+
responseExcerpt: buildStopMessageResponseExcerpt(payload)
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
export function extractResponsesOutputText(base) {
|
|
155
|
+
const raw = base.output_text;
|
|
156
|
+
if (typeof raw === 'string') {
|
|
157
|
+
return raw.trim();
|
|
158
|
+
}
|
|
159
|
+
if (Array.isArray(raw)) {
|
|
160
|
+
const texts = raw
|
|
161
|
+
.map((entry) => (typeof entry === 'string' ? entry : ''))
|
|
162
|
+
.filter((entry) => entry.trim().length > 0);
|
|
163
|
+
if (texts.length > 0) {
|
|
164
|
+
return texts.join('\n').trim();
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
const output = Array.isArray(base.output) ? (base.output) : [];
|
|
168
|
+
const chunks = [];
|
|
169
|
+
for (const item of output) {
|
|
170
|
+
if (!item || typeof item !== 'object' || Array.isArray(item))
|
|
171
|
+
continue;
|
|
172
|
+
if (typeof item.type !== 'string')
|
|
173
|
+
continue;
|
|
174
|
+
const type = String(item.type).trim().toLowerCase();
|
|
175
|
+
if (type.includes('tool') || type.includes('function') || type.includes('call')) {
|
|
176
|
+
const toolText = extractUnknownText(item.input) ||
|
|
177
|
+
extractUnknownText(item.arguments) ||
|
|
178
|
+
extractUnknownText(item.args) ||
|
|
179
|
+
extractUnknownText(item.patch) ||
|
|
180
|
+
extractUnknownText(item);
|
|
181
|
+
if (toolText) {
|
|
182
|
+
chunks.push(toolText);
|
|
183
|
+
}
|
|
184
|
+
continue;
|
|
185
|
+
}
|
|
186
|
+
if (type !== 'message')
|
|
187
|
+
continue;
|
|
188
|
+
const content = Array.isArray(item.content) ? (item.content) : [];
|
|
189
|
+
for (const part of content) {
|
|
190
|
+
if (!part || typeof part !== 'object' || Array.isArray(part))
|
|
191
|
+
continue;
|
|
192
|
+
const pType = typeof part.type === 'string'
|
|
193
|
+
? String(part.type).trim().toLowerCase()
|
|
194
|
+
: '';
|
|
195
|
+
if (pType === 'output_text' || pType === 'text' || pType === 'input_text') {
|
|
196
|
+
const text = typeof part.text === 'string' ? String(part.text) : '';
|
|
197
|
+
if (text.trim().length)
|
|
198
|
+
chunks.push(text.trim());
|
|
199
|
+
continue;
|
|
200
|
+
}
|
|
201
|
+
const fallback = extractUnknownText(part.text) ||
|
|
202
|
+
extractUnknownText(part.input) ||
|
|
203
|
+
extractUnknownText(part.arguments) ||
|
|
204
|
+
extractUnknownText(part.args) ||
|
|
205
|
+
extractUnknownText(part.patch) ||
|
|
206
|
+
extractUnknownText(part.content) ||
|
|
207
|
+
extractUnknownText(part.value);
|
|
208
|
+
if (fallback) {
|
|
209
|
+
chunks.push(fallback);
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
return chunks.join('\n').trim();
|
|
214
|
+
}
|
|
215
|
+
export function hasToolLikeOutput(value) {
|
|
216
|
+
if (!value || typeof value !== 'object' || Array.isArray(value)) {
|
|
217
|
+
return false;
|
|
218
|
+
}
|
|
219
|
+
const typeRaw = value.type;
|
|
220
|
+
const type = typeof typeRaw === 'string' ? typeRaw.trim().toLowerCase() : '';
|
|
221
|
+
if (!type) {
|
|
222
|
+
return false;
|
|
223
|
+
}
|
|
224
|
+
return (type === 'tool_call' ||
|
|
225
|
+
type === 'tool_use' ||
|
|
226
|
+
type === 'function_call' ||
|
|
227
|
+
type.includes('tool'));
|
|
228
|
+
}
|
|
229
|
+
function isStopMessageAutoMessageEnabled() {
|
|
230
|
+
const raw = String(process.env.ROUTECODEX_STOPMESSAGE_AI_FOLLOWUP_ENABLED ??
|
|
231
|
+
process.env.ROUTECODEX_STOPMESSAGE_AUTOMESSAGE_ENABLED ??
|
|
232
|
+
process.env.ROUTECODEX_STOPMESSAGE_AUTOMESSAGE_IFLOW ??
|
|
233
|
+
'')
|
|
234
|
+
.trim()
|
|
235
|
+
.toLowerCase();
|
|
236
|
+
if (!raw) {
|
|
237
|
+
return true;
|
|
238
|
+
}
|
|
239
|
+
if (raw === '0' || raw === 'false' || raw === 'no' || raw === 'off') {
|
|
240
|
+
return false;
|
|
241
|
+
}
|
|
242
|
+
return true;
|
|
243
|
+
}
|
|
244
|
+
function resolveStopMessageAutoMessageBackendOrder() {
|
|
245
|
+
const preferred = resolveStopMessageAutoMessageBackend();
|
|
246
|
+
if (preferred === 'iflow') {
|
|
247
|
+
return ['iflow', 'codex'];
|
|
248
|
+
}
|
|
249
|
+
return ['codex', 'iflow'];
|
|
250
|
+
}
|
|
251
|
+
function resolveStopMessageAutoMessageBackend() {
|
|
252
|
+
const raw = String(process.env.ROUTECODEX_STOPMESSAGE_AI_FOLLOWUP_BACKEND ??
|
|
253
|
+
process.env.ROUTECODEX_STOPMESSAGE_AUTOMESSAGE_BACKEND ??
|
|
254
|
+
'').trim().toLowerCase();
|
|
255
|
+
if (raw === 'iflow') {
|
|
256
|
+
return 'iflow';
|
|
257
|
+
}
|
|
258
|
+
if (raw === 'codex') {
|
|
259
|
+
return 'codex';
|
|
260
|
+
}
|
|
261
|
+
const legacyIflowHint = String(process.env.ROUTECODEX_STOPMESSAGE_AUTOMESSAGE_IFLOW || '').trim().toLowerCase();
|
|
262
|
+
if (legacyIflowHint && legacyIflowHint !== '0' && legacyIflowHint !== 'false' && legacyIflowHint !== 'no' && legacyIflowHint !== 'off') {
|
|
263
|
+
return 'iflow';
|
|
264
|
+
}
|
|
265
|
+
return 'codex';
|
|
266
|
+
}
|
|
267
|
+
function resolveStopMessageAutoMessageCommand(backend) {
|
|
268
|
+
if (backend === 'codex') {
|
|
269
|
+
const codexRaw = String(process.env.ROUTECODEX_STOPMESSAGE_AI_FOLLOWUP_CODEX_BIN ??
|
|
270
|
+
process.env.ROUTECODEX_STOPMESSAGE_AUTOMESSAGE_CODEX_BIN ??
|
|
271
|
+
'').trim();
|
|
272
|
+
return codexRaw || 'codex';
|
|
273
|
+
}
|
|
274
|
+
const raw = String(process.env.ROUTECODEX_STOPMESSAGE_AI_FOLLOWUP_IFLOW_BIN ??
|
|
275
|
+
process.env.ROUTECODEX_STOPMESSAGE_AUTOMESSAGE_IFLOW_BIN ??
|
|
276
|
+
'').trim();
|
|
277
|
+
return raw || 'iflow';
|
|
278
|
+
}
|
|
279
|
+
function resolveStopMessageAutoMessageWorkingDirectory(value) {
|
|
280
|
+
return typeof value === 'string' && value.trim() ? value.trim() : undefined;
|
|
281
|
+
}
|
|
282
|
+
function resolveStopMessageAutoMessageTimeoutMs(backend) {
|
|
283
|
+
const raw = String(process.env.ROUTECODEX_STOPMESSAGE_AI_FOLLOWUP_TIMEOUT_MS ??
|
|
284
|
+
process.env.ROUTECODEX_STOPMESSAGE_AUTOMESSAGE_TIMEOUT_MS ??
|
|
285
|
+
'').trim();
|
|
286
|
+
const parsed = Number(raw);
|
|
287
|
+
const explicitTimeout = Number.isFinite(parsed) && parsed > 0
|
|
288
|
+
? Math.max(200, Math.min(STOP_MESSAGE_AUTOMESSAGE_IFLOW_TIMEOUT_MAX_MS, Math.floor(parsed)))
|
|
289
|
+
: STOP_MESSAGE_AUTOMESSAGE_IFLOW_TIMEOUT_MS;
|
|
290
|
+
let resolvedTimeout = explicitTimeout;
|
|
291
|
+
const explicitCommand = backend === 'codex'
|
|
292
|
+
? String(process.env.ROUTECODEX_STOPMESSAGE_AI_FOLLOWUP_CODEX_BIN ??
|
|
293
|
+
process.env.ROUTECODEX_STOPMESSAGE_AUTOMESSAGE_CODEX_BIN ??
|
|
294
|
+
'').trim()
|
|
295
|
+
: String(process.env.ROUTECODEX_STOPMESSAGE_AI_FOLLOWUP_IFLOW_BIN ??
|
|
296
|
+
process.env.ROUTECODEX_STOPMESSAGE_AUTOMESSAGE_IFLOW_BIN ??
|
|
297
|
+
'').trim();
|
|
298
|
+
const defaultCommand = backend === 'codex' ? 'codex' : 'iflow';
|
|
299
|
+
const usingDefaultCommand = !explicitCommand || explicitCommand === defaultCommand;
|
|
300
|
+
if (process.env.JEST_WORKER_ID && usingDefaultCommand) {
|
|
301
|
+
resolvedTimeout = Math.min(resolvedTimeout, STOP_MESSAGE_AUTOMESSAGE_IFLOW_TIMEOUT_TEST_CAP_MS);
|
|
302
|
+
}
|
|
303
|
+
const followupTimeoutRaw = String(process.env.ROUTECODEX_SERVERTOOL_FOLLOWUP_TIMEOUT_MS || '').trim();
|
|
304
|
+
const followupTimeoutParsed = Number(followupTimeoutRaw);
|
|
305
|
+
if (Number.isFinite(followupTimeoutParsed) && followupTimeoutParsed > 0) {
|
|
306
|
+
const boundedFollowupTimeout = Math.max(100, Math.min(STOP_MESSAGE_AUTOMESSAGE_IFLOW_TIMEOUT_MAX_MS, Math.floor(followupTimeoutParsed)));
|
|
307
|
+
resolvedTimeout = Math.min(resolvedTimeout, boundedFollowupTimeout);
|
|
308
|
+
}
|
|
309
|
+
return resolvedTimeout;
|
|
310
|
+
}
|
|
311
|
+
function createStopMessageAutoMessageInvocation(backend, prompt) {
|
|
312
|
+
if (backend !== 'codex') {
|
|
313
|
+
return {
|
|
314
|
+
args: ['-p', prompt],
|
|
315
|
+
cleanup: () => {
|
|
316
|
+
// no-op
|
|
317
|
+
}
|
|
318
|
+
};
|
|
319
|
+
}
|
|
320
|
+
const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'routecodex-stopmessage-codex-'));
|
|
321
|
+
const outputFilePath = path.join(dir, 'last-message.txt');
|
|
322
|
+
return {
|
|
323
|
+
args: ['exec', '--color', 'never', '--skip-git-repo-check', '--output-last-message', outputFilePath, prompt],
|
|
324
|
+
outputFilePath,
|
|
325
|
+
cleanup: () => {
|
|
326
|
+
try {
|
|
327
|
+
fs.rmSync(dir, { recursive: true, force: true });
|
|
328
|
+
}
|
|
329
|
+
catch {
|
|
330
|
+
// ignore cleanup errors
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
};
|
|
334
|
+
}
|
|
335
|
+
function readStopMessageAutoMessageCodexOutput(outputFilePath) {
|
|
336
|
+
if (!outputFilePath) {
|
|
337
|
+
return '';
|
|
338
|
+
}
|
|
339
|
+
try {
|
|
340
|
+
return fs.readFileSync(outputFilePath, 'utf8');
|
|
341
|
+
}
|
|
342
|
+
catch {
|
|
343
|
+
return '';
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
function resolveStopMessageAutoMessageIflowOutputMaxChars() {
|
|
347
|
+
const raw = String(process.env.ROUTECODEX_STOPMESSAGE_AI_FOLLOWUP_OUTPUT_MAX_CHARS ??
|
|
348
|
+
process.env.ROUTECODEX_STOPMESSAGE_AUTOMESSAGE_OUTPUT_MAX_CHARS ??
|
|
349
|
+
'').trim();
|
|
350
|
+
const parsed = Number(raw);
|
|
351
|
+
if (!Number.isFinite(parsed) || parsed <= 0) {
|
|
352
|
+
return STOP_MESSAGE_AUTOMESSAGE_OUTPUT_MAX_CHARS;
|
|
353
|
+
}
|
|
354
|
+
return Math.max(128, Math.min(8_000, Math.floor(parsed)));
|
|
355
|
+
}
|
|
356
|
+
function sanitizeStopMessageAutoMessageOutput(raw, maxChars) {
|
|
357
|
+
const text = typeof raw === 'string' ? raw : '';
|
|
358
|
+
if (!text.trim()) {
|
|
359
|
+
return '';
|
|
360
|
+
}
|
|
361
|
+
const withoutAnsi = text.replace(ANSI_ESCAPE_PATTERN, '');
|
|
362
|
+
const withoutCodeFence = withoutAnsi
|
|
363
|
+
.replace(/^```[a-zA-Z0-9_-]*\s*/g, '')
|
|
364
|
+
.replace(/\s*```$/g, '');
|
|
365
|
+
const cleaned = withoutCodeFence.trim();
|
|
366
|
+
if (!cleaned) {
|
|
367
|
+
return '';
|
|
368
|
+
}
|
|
369
|
+
const sanitized = sanitizeFollowupText(cleaned);
|
|
370
|
+
if (!sanitized) {
|
|
371
|
+
return '';
|
|
372
|
+
}
|
|
373
|
+
return sanitized.length > maxChars ? sanitized.slice(0, maxChars).trim() : sanitized;
|
|
374
|
+
}
|
|
375
|
+
function truncateStopMessageAutoMessagePrompt(value, maxChars) {
|
|
376
|
+
const text = sanitizeFollowupSnapshotText(value);
|
|
377
|
+
if (!text) {
|
|
378
|
+
return '';
|
|
379
|
+
}
|
|
380
|
+
if (text.length <= maxChars) {
|
|
381
|
+
return text;
|
|
382
|
+
}
|
|
383
|
+
return `${text.slice(0, maxChars)}...`;
|
|
384
|
+
}
|
|
385
|
+
function buildStopMessageAutoMessageIflowPrompt(args, backend) {
|
|
386
|
+
const usedRepeats = Math.max(0, Math.floor(args.usedRepeats));
|
|
387
|
+
const maxRepeats = Math.max(0, Math.floor(args.maxRepeats));
|
|
388
|
+
const nextRound = usedRepeats + 1;
|
|
389
|
+
const roundsLabel = maxRepeats > 0 ? `${nextRound}/${maxRepeats}` : `${nextRound}/n/a`;
|
|
390
|
+
const remaining = maxRepeats > 0 ? Math.max(0, maxRepeats - nextRound) : 0;
|
|
391
|
+
const overallGoal = (typeof args.candidateFollowupText === 'string' && args.candidateFollowupText.trim()) ||
|
|
392
|
+
(typeof args.baseStopMessageText === 'string' && args.baseStopMessageText.trim()) ||
|
|
393
|
+
'继续执行';
|
|
394
|
+
const approvedMarker = resolveStopMessageAiApprovedMarker(args.approvedMarker);
|
|
395
|
+
const completionClaimed = args.completionClaimed === true;
|
|
396
|
+
const isFirstPrompt = Boolean(args.isFirstPrompt);
|
|
397
|
+
const historyBlock = renderStopMessageAiHistoryEntries(args.historyEntries);
|
|
398
|
+
const lines = [
|
|
399
|
+
isFirstPrompt
|
|
400
|
+
? '你是 RouteCodex 的 ai-followup 生成器(首次引导)。'
|
|
401
|
+
: '你是 RouteCodex 的 ai-followup 生成器(续轮系统约束)。',
|
|
402
|
+
'角色定位:你是“执行审稿人(reviewer)”,默认做审慎核验但不要吹毛求疵,仍以证据驱动判断。',
|
|
403
|
+
'任务:根据“短期目标(用户输入) + 当前执行进度 + 模型反馈消息内容 + 历史记录(xxx)”,生成下一步用户 followup 消息。',
|
|
404
|
+
isFirstPrompt ? '首次提示词(完整规则):' : '续轮系统提示词(延续同一目标):',
|
|
405
|
+
'1) 只输出一段可直接注入的用户消息文本;不要解释、不要 JSON、不要代码块。',
|
|
406
|
+
'1.1) 输出目标固定为:根据当前状态调整后的下一步 followup 消息文本。',
|
|
407
|
+
'2) 模型反馈=消息内容(assistantText/reasoningText/responseExcerpt);你的指令必须基于这些实际内容,不得凭空编造状态。',
|
|
408
|
+
'3) 先做代码 review(最多一句),再给指令:必须结合 workingDirectory 下当前实现/测试/构建状态给出建议;不能只做抽象建议。',
|
|
409
|
+
'3.1) 主模型若声明“完成了某项”,优先核验与 overallGoal 直接相关的关键项;非关键分支/小目标可记录为后续补充验证,不必阻塞推进。',
|
|
410
|
+
'3.2) 通过标准以“总体目标是否达成”为主;当主目标证据充分时,允许次要项暂未验证,并给出后续补测建议。',
|
|
411
|
+
'3.3) 若主模型声称“无法完成/被阻塞”,你必须要求其提供阻塞证据,并判断是否存在可继续推进的最小可执行动作。',
|
|
412
|
+
'3.4) 必要时必须要求其打开并检查已改代码(明确到文件),再给出具体修改建议,不允许停留在抽象层面。',
|
|
413
|
+
'4) 必须包含至少一个可执行动作(具体文件、命令、检查点或验证目标),并尽量最小化下一步范围;优先“写动作”(改代码/补测试)。',
|
|
414
|
+
'5) 禁止输出空泛短答:如“继续”“继续执行”“好的”“收到”“ok”。',
|
|
415
|
+
'6) 禁止把回复做成纯状态汇总;默认是推进执行,直到阶段目标或总体目标完成。',
|
|
416
|
+
'7) 只有在消息内容或历史记录里存在明确证据时,才允许判断“偏离目标”;否则按同轨推进,不要泛化指责偏离。',
|
|
417
|
+
'8) 若判定偏离,必须在指令里点明证据来源(来自消息内容或历史记录)并给出回轨的最小动作;若无证据,直接给下一步动作。',
|
|
418
|
+
'9) 禁止把 review 责任交回主模型(例如“请你先自己 review/自查代码”);review 必须由你(ai-followup)先完成。',
|
|
419
|
+
'10) 禁止连续安排纯只读/纯汇报命令(如 cargo llvm-cov report、cat/head/tail/rg/git status);若上一轮没有代码修改证据,本轮必须先给出写动作(修改文件或新增测试),再允许验证命令。',
|
|
420
|
+
'11) 覆盖率类命令只能作为写动作后的验证步骤,不能作为本轮唯一或首要动作。',
|
|
421
|
+
completionClaimed
|
|
422
|
+
? '12) 参考信号:主模型本轮声称“已完成”,但你必须独立核验,不能直接采信。'
|
|
423
|
+
: '12) 主模型未显式声称完成;你仍可基于证据独立判断是否达成总体目标。',
|
|
424
|
+
`13) 当关键路径证据充分且确认已完成总体目标时,允许只输出 ${approvedMarker} 作为唯一内容;若仅剩非关键小项未验证,也可判定通过并建议后续补齐。`,
|
|
425
|
+
`14) 若证据不足或主目标未达成,严禁输出 ${approvedMarker}。`,
|
|
426
|
+
'',
|
|
427
|
+
'本轮注入上下文(必须参考):',
|
|
428
|
+
`overallGoal(短期目标): ${overallGoal}`,
|
|
429
|
+
'',
|
|
430
|
+
`baseStopMessage: ${args.baseStopMessageText || 'n/a'}`,
|
|
431
|
+
`candidateFollowup: ${args.candidateFollowupText || 'n/a'}`,
|
|
432
|
+
`repeat: ${roundsLabel}`,
|
|
433
|
+
`progress: used=${usedRepeats} next=${nextRound} max=${maxRepeats > 0 ? maxRepeats : 'n/a'} remaining=${maxRepeats > 0 ? remaining : 'n/a'}`,
|
|
434
|
+
`requestId: ${args.requestId || 'n/a'}`,
|
|
435
|
+
`sessionId: ${args.sessionId || 'n/a'}`,
|
|
436
|
+
`providerKey: ${args.providerKey || 'n/a'}`,
|
|
437
|
+
`model: ${args.model || 'n/a'}`,
|
|
438
|
+
`workingDirectory: ${args.workingDirectory || 'n/a'}`,
|
|
439
|
+
`completionClaimedByMainModel: ${completionClaimed ? 'yes' : 'no'}`,
|
|
440
|
+
`reviewApprovedMarker: ${approvedMarker}`,
|
|
441
|
+
'historyRecord(xxx): 见下方 stopMessage 历史轨迹',
|
|
442
|
+
'modelFeedback(消息内容): 见下方 assistantText/reasoningText/responseExcerpt',
|
|
443
|
+
'',
|
|
444
|
+
'stopMessage 历史轨迹(最近轮次,按时间升序):',
|
|
445
|
+
historyBlock,
|
|
446
|
+
'',
|
|
447
|
+
'当前模型反馈(结构化摘录):',
|
|
448
|
+
`responseProtocol: ${args.responseSnapshot.providerProtocol || 'n/a'}`,
|
|
449
|
+
`finishReason: ${args.responseSnapshot.finishReason || 'n/a'}`,
|
|
450
|
+
'',
|
|
451
|
+
'assistantText:',
|
|
452
|
+
truncateStopMessageAutoMessagePrompt(args.responseSnapshot.assistantText || 'n/a', 3_600),
|
|
453
|
+
'',
|
|
454
|
+
'reasoningText:',
|
|
455
|
+
truncateStopMessageAutoMessagePrompt(args.responseSnapshot.reasoningText || 'n/a', 3_600),
|
|
456
|
+
'',
|
|
457
|
+
'responseExcerpt:',
|
|
458
|
+
truncateStopMessageAutoMessagePrompt(args.responseSnapshot.responseExcerpt || 'n/a', 6_000)
|
|
459
|
+
];
|
|
460
|
+
const closingInstruction = `现在做完成校验:若确认已完成,仅输出 ${approvedMarker};否则输出“根据当前状态调整后的下一步 followup 消息文本”。`;
|
|
461
|
+
lines.push('', closingInstruction);
|
|
462
|
+
const prompt = lines.join('\n').trim();
|
|
463
|
+
if (prompt.length <= STOP_MESSAGE_AUTOMESSAGE_PROMPT_MAX_CHARS) {
|
|
464
|
+
return prompt;
|
|
465
|
+
}
|
|
466
|
+
const reserve = closingInstruction.length + 4;
|
|
467
|
+
if (STOP_MESSAGE_AUTOMESSAGE_PROMPT_MAX_CHARS <= reserve + 32) {
|
|
468
|
+
return truncateStopMessageAutoMessagePrompt(prompt, STOP_MESSAGE_AUTOMESSAGE_PROMPT_MAX_CHARS);
|
|
469
|
+
}
|
|
470
|
+
const headLimit = STOP_MESSAGE_AUTOMESSAGE_PROMPT_MAX_CHARS - reserve - 3;
|
|
471
|
+
const head = prompt.slice(0, headLimit).trimEnd();
|
|
472
|
+
return `${head}...\n\n${closingInstruction}`;
|
|
473
|
+
}
|
|
474
|
+
export function buildStopMessageAutoMessageIflowPromptForTests(args, backend = 'iflow') {
|
|
475
|
+
return buildStopMessageAutoMessageIflowPrompt(args, backend);
|
|
476
|
+
}
|
|
477
|
+
function renderStopMessageAiHistoryEntries(entries) {
|
|
478
|
+
if (!Array.isArray(entries) || entries.length === 0) {
|
|
479
|
+
return '- (empty)';
|
|
480
|
+
}
|
|
481
|
+
const normalized = entries
|
|
482
|
+
.slice(-8)
|
|
483
|
+
.map((entry) => {
|
|
484
|
+
const round = Number.isFinite(entry?.round) ? Math.max(0, Math.floor(entry.round)) : 0;
|
|
485
|
+
const assistant = truncateStopMessageAutoMessagePrompt(String(entry?.assistantText || ''), 280);
|
|
486
|
+
const followup = truncateStopMessageAutoMessagePrompt(String(entry?.followupText || ''), 280);
|
|
487
|
+
const reasoning = truncateStopMessageAutoMessagePrompt(String(entry?.reasoningText || ''), 220);
|
|
488
|
+
const parts = [
|
|
489
|
+
`round=${round || 'n/a'}`,
|
|
490
|
+
assistant ? `assistant=${assistant}` : '',
|
|
491
|
+
reasoning ? `reasoning=${reasoning}` : '',
|
|
492
|
+
followup ? `followup=${followup}` : ''
|
|
493
|
+
].filter(Boolean);
|
|
494
|
+
return `- ${parts.join(' | ')}`;
|
|
495
|
+
})
|
|
496
|
+
.filter((line) => line.trim().length > 0);
|
|
497
|
+
return normalized.length > 0 ? normalized.join('\n') : '- (empty)';
|
|
498
|
+
}
|
|
499
|
+
function summarizeStopMessageAutoMessageLog(value, maxChars) {
|
|
500
|
+
const text = typeof value === 'string' ? value : '';
|
|
501
|
+
if (!text.trim()) {
|
|
502
|
+
return '';
|
|
503
|
+
}
|
|
504
|
+
const singleLine = text
|
|
505
|
+
.replace(ANSI_ESCAPE_PATTERN, '')
|
|
506
|
+
.replace(/\s+/g, ' ')
|
|
507
|
+
.trim();
|
|
508
|
+
if (singleLine.length <= maxChars) {
|
|
509
|
+
return singleLine;
|
|
510
|
+
}
|
|
511
|
+
return `${singleLine.slice(0, maxChars)}...`;
|
|
512
|
+
}
|
|
513
|
+
export function resolveStopMessageAiDoneMarker(value) {
|
|
514
|
+
const explicit = typeof value === 'string' && value.trim() ? value.trim() : '';
|
|
515
|
+
if (explicit) {
|
|
516
|
+
return explicit;
|
|
517
|
+
}
|
|
518
|
+
const envValue = String(process.env.ROUTECODEX_STOPMESSAGE_AI_DONE_MARKER || '').trim();
|
|
519
|
+
if (envValue) {
|
|
520
|
+
return envValue;
|
|
521
|
+
}
|
|
522
|
+
return DEFAULT_STOP_MESSAGE_AI_DONE_MARKER;
|
|
523
|
+
}
|
|
524
|
+
export function resolveStopMessageAiApprovedMarker(value) {
|
|
525
|
+
const explicit = typeof value === 'string' && value.trim() ? value.trim() : '';
|
|
526
|
+
if (explicit) {
|
|
527
|
+
return explicit;
|
|
528
|
+
}
|
|
529
|
+
const envValue = String(process.env.ROUTECODEX_STOPMESSAGE_AI_APPROVED_MARKER || '').trim();
|
|
530
|
+
if (envValue) {
|
|
531
|
+
return envValue;
|
|
532
|
+
}
|
|
533
|
+
return DEFAULT_STOP_MESSAGE_AI_APPROVED_MARKER;
|
|
534
|
+
}
|
|
535
|
+
function isStopMessageAutoMessageIflowTraceEnabled() {
|
|
536
|
+
const raw = String(process.env.ROUTECODEX_STOPMESSAGE_AI_FOLLOWUP_TRACE ??
|
|
537
|
+
process.env.ROUTECODEX_STOPMESSAGE_IFLOW_TRACE ??
|
|
538
|
+
'').trim().toLowerCase();
|
|
539
|
+
if (!raw) {
|
|
540
|
+
return true;
|
|
541
|
+
}
|
|
542
|
+
if (raw === '0' || raw === 'false' || raw === 'no' || raw === 'off') {
|
|
543
|
+
return false;
|
|
544
|
+
}
|
|
545
|
+
return true;
|
|
546
|
+
}
|
|
547
|
+
function logStopMessageAutoMessageIflow(args) {
|
|
548
|
+
const requestId = args.requestId && args.requestId.trim() ? args.requestId.trim() : 'unknown';
|
|
549
|
+
const stage = args.stage;
|
|
550
|
+
const statusToken = typeof args.status === 'number' ? ` status=${args.status}` : '';
|
|
551
|
+
const errorToken = args.error ? ` error=${args.error}` : '';
|
|
552
|
+
const requestSummary = args.requestSummary || '';
|
|
553
|
+
const responseSummary = args.responseSummary || '';
|
|
554
|
+
const eventMessage = stage === 'request'
|
|
555
|
+
? requestSummary
|
|
556
|
+
: `${requestSummary}${requestSummary && (responseSummary || statusToken || errorToken) ? ' | ' : ''}${responseSummary}${statusToken}${errorToken}`.trim();
|
|
557
|
+
const eventResult = stage === 'request'
|
|
558
|
+
? 'sent'
|
|
559
|
+
: args.error || (typeof args.status === 'number' && args.status !== 0)
|
|
560
|
+
? 'failed'
|
|
561
|
+
: 'completed';
|
|
562
|
+
appendServerToolProgressFileEvent({
|
|
563
|
+
requestId,
|
|
564
|
+
flowId: 'stop_message_flow',
|
|
565
|
+
tool: 'ai_followup',
|
|
566
|
+
stage,
|
|
567
|
+
result: eventResult,
|
|
568
|
+
message: eventMessage,
|
|
569
|
+
step: stage === 'request' ? 3 : 4
|
|
570
|
+
});
|
|
571
|
+
if (!isStopMessageAutoMessageIflowTraceEnabled()) {
|
|
572
|
+
return;
|
|
573
|
+
}
|
|
574
|
+
const requestIdPart = args.requestId ? ` requestId=${args.requestId}` : '';
|
|
575
|
+
try {
|
|
576
|
+
if (args.stage === 'request') {
|
|
577
|
+
const request = args.requestSummary || '';
|
|
578
|
+
// cyan: outbound request summary
|
|
579
|
+
// eslint-disable-next-line no-console
|
|
580
|
+
console.log(`\x1b[38;5;45m[servertool][ai-followup] SEND${requestIdPart} ${request}\x1b[0m`);
|
|
581
|
+
return;
|
|
582
|
+
}
|
|
583
|
+
const response = args.responseSummary || '';
|
|
584
|
+
if (args.error || (typeof args.status === 'number' && args.status !== 0)) {
|
|
585
|
+
const statusPart = typeof args.status === 'number' ? ` status=${args.status}` : '';
|
|
586
|
+
const errorPart = args.error ? ` error=${args.error}` : '';
|
|
587
|
+
// red: failed response summary
|
|
588
|
+
// eslint-disable-next-line no-console
|
|
589
|
+
console.log(`\x1b[38;5;196m[servertool][ai-followup] RECV${requestIdPart}${statusPart}${errorPart} ${response}\x1b[0m`);
|
|
590
|
+
return;
|
|
591
|
+
}
|
|
592
|
+
// green: successful response summary
|
|
593
|
+
// eslint-disable-next-line no-console
|
|
594
|
+
console.log(`\x1b[38;5;46m[servertool][ai-followup] RECV${requestIdPart} ${response}\x1b[0m`);
|
|
595
|
+
}
|
|
596
|
+
catch {
|
|
597
|
+
// ignore logging failures
|
|
598
|
+
}
|
|
599
|
+
}
|
|
600
|
+
function extractStopMessageProviderProtocol(adapterContext) {
|
|
601
|
+
const direct = toNonEmptyText(asRecord(adapterContext)?.providerProtocol);
|
|
602
|
+
if (direct) {
|
|
603
|
+
return direct;
|
|
604
|
+
}
|
|
605
|
+
const runtime = readRuntimeMetadata(asRecord(adapterContext) || {});
|
|
606
|
+
const fromRuntime = toNonEmptyText(asRecord(runtime)?.providerProtocol);
|
|
607
|
+
return fromRuntime || undefined;
|
|
608
|
+
}
|
|
609
|
+
function extractStopMessageAssistantText(message) {
|
|
610
|
+
const chunks = [];
|
|
611
|
+
const contentText = extractTextFromMessageContent(message.content);
|
|
612
|
+
if (contentText) {
|
|
613
|
+
chunks.push(contentText);
|
|
614
|
+
}
|
|
615
|
+
const directKeys = [
|
|
616
|
+
'text',
|
|
617
|
+
'output_text',
|
|
618
|
+
'response',
|
|
619
|
+
'summary',
|
|
620
|
+
'message',
|
|
621
|
+
'result',
|
|
622
|
+
'command',
|
|
623
|
+
'patch'
|
|
624
|
+
];
|
|
625
|
+
for (const key of directKeys) {
|
|
626
|
+
const text = extractUnknownText(message[key]);
|
|
627
|
+
if (text) {
|
|
628
|
+
chunks.push(text);
|
|
629
|
+
}
|
|
630
|
+
}
|
|
631
|
+
const toolLikeKeys = [
|
|
632
|
+
'tool_calls',
|
|
633
|
+
'tool_call',
|
|
634
|
+
'function_call',
|
|
635
|
+
'tool_use',
|
|
636
|
+
'input',
|
|
637
|
+
'arguments',
|
|
638
|
+
'args',
|
|
639
|
+
'payload'
|
|
640
|
+
];
|
|
641
|
+
for (const key of toolLikeKeys) {
|
|
642
|
+
const text = extractUnknownText(message[key]);
|
|
643
|
+
if (text) {
|
|
644
|
+
chunks.push(text);
|
|
645
|
+
}
|
|
646
|
+
}
|
|
647
|
+
return sanitizeFollowupSnapshotText(dedupeAndJoinTexts(chunks));
|
|
648
|
+
}
|
|
649
|
+
function extractStopMessageReasoningText(message) {
|
|
650
|
+
const explicitKeys = [
|
|
651
|
+
'reasoning_content',
|
|
652
|
+
'reasoning',
|
|
653
|
+
'reasoning_text',
|
|
654
|
+
'thinking',
|
|
655
|
+
'thought',
|
|
656
|
+
'analysis'
|
|
657
|
+
];
|
|
658
|
+
const chunks = [];
|
|
659
|
+
for (const key of explicitKeys) {
|
|
660
|
+
const text = extractUnknownText(message[key]);
|
|
661
|
+
if (text) {
|
|
662
|
+
chunks.push(text);
|
|
663
|
+
}
|
|
664
|
+
}
|
|
665
|
+
const contentReasoning = extractStopMessageReasoningFromContent(message.content);
|
|
666
|
+
if (contentReasoning) {
|
|
667
|
+
chunks.push(contentReasoning);
|
|
668
|
+
}
|
|
669
|
+
return sanitizeFollowupSnapshotText(dedupeAndJoinTexts(chunks));
|
|
670
|
+
}
|
|
671
|
+
function extractResponsesReasoningText(payload) {
|
|
672
|
+
const chunks = [];
|
|
673
|
+
const directReasoning = extractUnknownText(payload.reasoning);
|
|
674
|
+
if (directReasoning) {
|
|
675
|
+
chunks.push(directReasoning);
|
|
676
|
+
}
|
|
677
|
+
const output = Array.isArray(payload.output) ? payload.output : [];
|
|
678
|
+
for (const item of output) {
|
|
679
|
+
const record = asRecord(item);
|
|
680
|
+
if (!record) {
|
|
681
|
+
continue;
|
|
682
|
+
}
|
|
683
|
+
const type = toNonEmptyText(record.type).toLowerCase();
|
|
684
|
+
if (type.includes('reason') || type.includes('think') || type.includes('analysis')) {
|
|
685
|
+
const text = extractUnknownText(record.summary) || extractUnknownText(record.content) || extractUnknownText(record.text);
|
|
686
|
+
if (text) {
|
|
687
|
+
chunks.push(text);
|
|
688
|
+
}
|
|
689
|
+
continue;
|
|
690
|
+
}
|
|
691
|
+
if (type === 'message') {
|
|
692
|
+
const contentReasoning = extractStopMessageReasoningFromContent(record.content);
|
|
693
|
+
if (contentReasoning) {
|
|
694
|
+
chunks.push(contentReasoning);
|
|
695
|
+
}
|
|
696
|
+
}
|
|
697
|
+
}
|
|
698
|
+
return sanitizeFollowupSnapshotText(dedupeAndJoinTexts(chunks));
|
|
699
|
+
}
|
|
700
|
+
function extractStopMessageReasoningFromContent(content) {
|
|
701
|
+
if (!Array.isArray(content)) {
|
|
702
|
+
return '';
|
|
703
|
+
}
|
|
704
|
+
const chunks = [];
|
|
705
|
+
for (const item of content) {
|
|
706
|
+
const record = asRecord(item);
|
|
707
|
+
if (!record) {
|
|
708
|
+
continue;
|
|
709
|
+
}
|
|
710
|
+
const type = toNonEmptyText(record.type).toLowerCase();
|
|
711
|
+
if (!type.includes('reason') && !type.includes('think') && !type.includes('analysis')) {
|
|
712
|
+
continue;
|
|
713
|
+
}
|
|
714
|
+
const text = extractUnknownText(record.text) ||
|
|
715
|
+
extractUnknownText(record.summary) ||
|
|
716
|
+
extractUnknownText(record.content) ||
|
|
717
|
+
extractUnknownText(record.value);
|
|
718
|
+
if (text) {
|
|
719
|
+
chunks.push(text);
|
|
720
|
+
}
|
|
721
|
+
}
|
|
722
|
+
return sanitizeFollowupSnapshotText(dedupeAndJoinTexts(chunks));
|
|
723
|
+
}
|
|
724
|
+
function extractUnknownText(value, depth = 0) {
|
|
725
|
+
if (depth > 4 || value === null || value === undefined) {
|
|
726
|
+
return '';
|
|
727
|
+
}
|
|
728
|
+
if (typeof value === 'string') {
|
|
729
|
+
return sanitizeFollowupSnapshotText(value);
|
|
730
|
+
}
|
|
731
|
+
if (typeof value === 'number' || typeof value === 'boolean') {
|
|
732
|
+
return sanitizeFollowupSnapshotText(String(value));
|
|
733
|
+
}
|
|
734
|
+
if (Array.isArray(value)) {
|
|
735
|
+
const parts = value
|
|
736
|
+
.map((entry) => extractUnknownText(entry, depth + 1))
|
|
737
|
+
.filter((entry) => entry.length > 0);
|
|
738
|
+
return dedupeAndJoinTexts(parts);
|
|
739
|
+
}
|
|
740
|
+
if (typeof value !== 'object') {
|
|
741
|
+
return '';
|
|
742
|
+
}
|
|
743
|
+
const record = value;
|
|
744
|
+
const priorityKeys = [
|
|
745
|
+
'text',
|
|
746
|
+
'content',
|
|
747
|
+
'value',
|
|
748
|
+
'summary',
|
|
749
|
+
'reasoning',
|
|
750
|
+
'thinking',
|
|
751
|
+
'analysis',
|
|
752
|
+
'function',
|
|
753
|
+
'input',
|
|
754
|
+
'arguments',
|
|
755
|
+
'args',
|
|
756
|
+
'patch',
|
|
757
|
+
'payload',
|
|
758
|
+
'result',
|
|
759
|
+
'command',
|
|
760
|
+
'message',
|
|
761
|
+
'output_text',
|
|
762
|
+
'name'
|
|
763
|
+
];
|
|
764
|
+
const parts = [];
|
|
765
|
+
for (const key of priorityKeys) {
|
|
766
|
+
if (!(key in record)) {
|
|
767
|
+
continue;
|
|
768
|
+
}
|
|
769
|
+
const text = extractUnknownText(record[key], depth + 1);
|
|
770
|
+
if (text) {
|
|
771
|
+
parts.push(text);
|
|
772
|
+
}
|
|
773
|
+
}
|
|
774
|
+
if (parts.length === 0) {
|
|
775
|
+
for (const raw of Object.values(record)) {
|
|
776
|
+
if (typeof raw !== 'string') {
|
|
777
|
+
continue;
|
|
778
|
+
}
|
|
779
|
+
const text = raw.trim();
|
|
780
|
+
if (text) {
|
|
781
|
+
parts.push(text);
|
|
782
|
+
}
|
|
783
|
+
}
|
|
784
|
+
}
|
|
785
|
+
return sanitizeFollowupSnapshotText(dedupeAndJoinTexts(parts));
|
|
786
|
+
}
|
|
787
|
+
function dedupeAndJoinTexts(parts) {
|
|
788
|
+
const unique = Array.from(new Set(parts
|
|
789
|
+
.map((entry) => (typeof entry === 'string' ? entry.trim() : ''))
|
|
790
|
+
.filter((entry) => entry.length > 0)));
|
|
791
|
+
return sanitizeFollowupSnapshotText(unique.join('\n').trim());
|
|
792
|
+
}
|
|
793
|
+
function buildStopMessageResponseExcerpt(value) {
|
|
794
|
+
try {
|
|
795
|
+
const raw = JSON.stringify(value);
|
|
796
|
+
if (!raw) {
|
|
797
|
+
return '';
|
|
798
|
+
}
|
|
799
|
+
if (raw.length <= 3_000) {
|
|
800
|
+
return sanitizeFollowupSnapshotText(raw);
|
|
801
|
+
}
|
|
802
|
+
return sanitizeFollowupSnapshotText(`${raw.slice(0, 3_000)}...`);
|
|
803
|
+
}
|
|
804
|
+
catch {
|
|
805
|
+
return '';
|
|
806
|
+
}
|
|
807
|
+
}
|
|
808
|
+
function asRecord(value) {
|
|
809
|
+
if (!value || typeof value !== 'object' || Array.isArray(value)) {
|
|
810
|
+
return null;
|
|
811
|
+
}
|
|
812
|
+
return value;
|
|
813
|
+
}
|
|
814
|
+
function toNonEmptyText(value) {
|
|
815
|
+
return typeof value === 'string' && value.trim() ? value.trim() : '';
|
|
816
|
+
}
|