@roarpeng/graphflow 1.7.0 → 1.7.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +47 -0
- package/README.md +13 -10
- package/dist/agents/insight.d.ts +13 -2
- package/dist/agents/insight.d.ts.map +1 -1
- package/dist/agents/insight.js +56 -26
- package/dist/agents/insight.js.map +1 -1
- package/dist/agents/task-profile.d.ts +19 -0
- package/dist/agents/task-profile.d.ts.map +1 -0
- package/dist/agents/task-profile.js +64 -0
- package/dist/agents/task-profile.js.map +1 -0
- package/dist/agents/validator.js +1 -1
- package/dist/agents/validator.js.map +1 -1
- package/dist/config/defaults.d.ts.map +1 -1
- package/dist/config/defaults.js +3 -1
- package/dist/config/defaults.js.map +1 -1
- package/dist/config/discover-workspace.d.ts.map +1 -1
- package/dist/config/discover-workspace.js +10 -2
- package/dist/config/discover-workspace.js.map +1 -1
- package/dist/config/embedding-factory.d.ts.map +1 -1
- package/dist/config/embedding-factory.js +88 -9
- package/dist/config/embedding-factory.js.map +1 -1
- package/dist/config/loader.d.ts.map +1 -1
- package/dist/config/loader.js +9 -2
- package/dist/config/loader.js.map +1 -1
- package/dist/config/provider-env.d.ts +32 -0
- package/dist/config/provider-env.d.ts.map +1 -0
- package/dist/config/provider-env.js +51 -0
- package/dist/config/provider-env.js.map +1 -0
- package/dist/config/resolve.d.ts.map +1 -1
- package/dist/config/resolve.js +7 -2
- package/dist/config/resolve.js.map +1 -1
- package/dist/config/schema.d.ts +17 -2
- package/dist/config/schema.d.ts.map +1 -1
- package/dist/config/workspace-root.d.ts +0 -12
- package/dist/config/workspace-root.d.ts.map +1 -1
- package/dist/config/workspace-root.js +21 -5
- package/dist/config/workspace-root.js.map +1 -1
- package/dist/core/agent-delegation.d.ts +5 -0
- package/dist/core/agent-delegation.d.ts.map +1 -1
- package/dist/core/agent-delegation.js +131 -57
- package/dist/core/agent-delegation.js.map +1 -1
- package/dist/core/cancellation.d.ts +57 -0
- package/dist/core/cancellation.d.ts.map +1 -0
- package/dist/core/cancellation.js +195 -0
- package/dist/core/cancellation.js.map +1 -0
- package/dist/core/dag-engine.d.ts +6 -1
- package/dist/core/dag-engine.d.ts.map +1 -1
- package/dist/core/dag-engine.js +67 -9
- package/dist/core/dag-engine.js.map +1 -1
- package/dist/core/orchestrator-context.d.ts.map +1 -1
- package/dist/core/orchestrator-context.js +3 -0
- package/dist/core/orchestrator-context.js.map +1 -1
- package/dist/core/orchestrator-route.d.ts +1 -1
- package/dist/core/orchestrator-route.d.ts.map +1 -1
- package/dist/core/orchestrator-route.js.map +1 -1
- package/dist/core/orchestrator.d.ts.map +1 -1
- package/dist/core/orchestrator.js +61 -42
- package/dist/core/orchestrator.js.map +1 -1
- package/dist/core/runtime-controller.d.ts +19 -0
- package/dist/core/runtime-controller.d.ts.map +1 -0
- package/dist/core/runtime-controller.js +89 -0
- package/dist/core/runtime-controller.js.map +1 -0
- package/dist/core/types.d.ts +5 -0
- package/dist/core/types.d.ts.map +1 -1
- package/dist/graph/context-cache.d.ts +23 -0
- package/dist/graph/context-cache.d.ts.map +1 -0
- package/dist/graph/context-cache.js +92 -0
- package/dist/graph/context-cache.js.map +1 -0
- package/dist/graph/context-slicer-types.d.ts +2 -0
- package/dist/graph/context-slicer-types.d.ts.map +1 -1
- package/dist/graph/context-slicer-types.js.map +1 -1
- package/dist/graph/context-slicer.d.ts +1 -0
- package/dist/graph/context-slicer.d.ts.map +1 -1
- package/dist/graph/context-slicer.js +54 -8
- package/dist/graph/context-slicer.js.map +1 -1
- package/dist/graph/file-indexer.d.ts +4 -1
- package/dist/graph/file-indexer.d.ts.map +1 -1
- package/dist/graph/file-indexer.js +16 -5
- package/dist/graph/file-indexer.js.map +1 -1
- package/dist/graph/file-watcher.d.ts.map +1 -1
- package/dist/graph/file-watcher.js +9 -2
- package/dist/graph/file-watcher.js.map +1 -1
- package/dist/graph/graph-utils.d.ts +6 -1
- package/dist/graph/graph-utils.d.ts.map +1 -1
- package/dist/graph/graph-utils.js +116 -2
- package/dist/graph/graph-utils.js.map +1 -1
- package/dist/graph/graphify-file-client.d.ts.map +1 -1
- package/dist/graph/graphify-file-client.js +2 -1
- package/dist/graph/graphify-file-client.js.map +1 -1
- package/dist/graph/hit-diversify.d.ts +31 -0
- package/dist/graph/hit-diversify.d.ts.map +1 -0
- package/dist/graph/hit-diversify.js +270 -0
- package/dist/graph/hit-diversify.js.map +1 -0
- package/dist/graph/language-indexers/go.d.ts.map +1 -1
- package/dist/graph/language-indexers/go.js +2 -3
- package/dist/graph/language-indexers/go.js.map +1 -1
- package/dist/graph/language-indexers/incremental-parse.d.ts +9 -0
- package/dist/graph/language-indexers/incremental-parse.d.ts.map +1 -0
- package/dist/graph/language-indexers/incremental-parse.js +114 -0
- package/dist/graph/language-indexers/incremental-parse.js.map +1 -0
- package/dist/graph/language-indexers/python.d.ts.map +1 -1
- package/dist/graph/language-indexers/python.js +2 -3
- package/dist/graph/language-indexers/python.js.map +1 -1
- package/dist/graph/language-indexers/rust.d.ts.map +1 -1
- package/dist/graph/language-indexers/rust.js +2 -3
- package/dist/graph/language-indexers/rust.js.map +1 -1
- package/dist/graph/language-indexers/tree-sitter-loader.d.ts +19 -3
- package/dist/graph/language-indexers/tree-sitter-loader.d.ts.map +1 -1
- package/dist/graph/language-indexers/tree-sitter-loader.js +24 -4
- package/dist/graph/language-indexers/tree-sitter-loader.js.map +1 -1
- package/dist/graph/query-expand.d.ts.map +1 -1
- package/dist/graph/query-expand.js +2 -0
- package/dist/graph/query-expand.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/integrations/agent-mcp-installer.d.ts +39 -0
- package/dist/integrations/agent-mcp-installer.d.ts.map +1 -1
- package/dist/integrations/agent-mcp-installer.js +242 -31
- package/dist/integrations/agent-mcp-installer.js.map +1 -1
- package/dist/integrations/agent-profiles/index.d.ts +26 -0
- package/dist/integrations/agent-profiles/index.d.ts.map +1 -0
- package/dist/integrations/agent-profiles/index.js +31 -0
- package/dist/integrations/agent-profiles/index.js.map +1 -0
- package/dist/integrations/agent-profiles/profiles/amazon-q.d.ts +2 -0
- package/dist/integrations/agent-profiles/profiles/amazon-q.d.ts.map +1 -0
- package/dist/integrations/agent-profiles/profiles/amazon-q.js +18 -0
- package/dist/integrations/agent-profiles/profiles/amazon-q.js.map +1 -0
- package/dist/integrations/agent-profiles/profiles/antigravity.d.ts +2 -0
- package/dist/integrations/agent-profiles/profiles/antigravity.d.ts.map +1 -0
- package/dist/integrations/agent-profiles/profiles/antigravity.js +33 -0
- package/dist/integrations/agent-profiles/profiles/antigravity.js.map +1 -0
- package/dist/integrations/agent-profiles/profiles/claude-code.d.ts +2 -0
- package/dist/integrations/agent-profiles/profiles/claude-code.d.ts.map +1 -0
- package/dist/integrations/agent-profiles/profiles/claude-code.js +22 -0
- package/dist/integrations/agent-profiles/profiles/claude-code.js.map +1 -0
- package/dist/integrations/agent-profiles/profiles/cline.d.ts +2 -0
- package/dist/integrations/agent-profiles/profiles/cline.d.ts.map +1 -0
- package/dist/integrations/agent-profiles/profiles/cline.js +33 -0
- package/dist/integrations/agent-profiles/profiles/cline.js.map +1 -0
- package/dist/integrations/agent-profiles/profiles/codex.d.ts +2 -0
- package/dist/integrations/agent-profiles/profiles/codex.d.ts.map +1 -0
- package/dist/integrations/agent-profiles/profiles/codex.js +22 -0
- package/dist/integrations/agent-profiles/profiles/codex.js.map +1 -0
- package/dist/integrations/agent-profiles/profiles/continue.d.ts +2 -0
- package/dist/integrations/agent-profiles/profiles/continue.d.ts.map +1 -0
- package/dist/integrations/agent-profiles/profiles/continue.js +23 -0
- package/dist/integrations/agent-profiles/profiles/continue.js.map +1 -0
- package/dist/integrations/agent-profiles/profiles/cursor.d.ts +2 -0
- package/dist/integrations/agent-profiles/profiles/cursor.d.ts.map +1 -0
- package/dist/integrations/agent-profiles/profiles/cursor.js +28 -0
- package/dist/integrations/agent-profiles/profiles/cursor.js.map +1 -0
- package/dist/integrations/agent-profiles/profiles/gemini.d.ts +2 -0
- package/dist/integrations/agent-profiles/profiles/gemini.d.ts.map +1 -0
- package/dist/integrations/agent-profiles/profiles/gemini.js +30 -0
- package/dist/integrations/agent-profiles/profiles/gemini.js.map +1 -0
- package/dist/integrations/agent-profiles/profiles/kilocode.d.ts +2 -0
- package/dist/integrations/agent-profiles/profiles/kilocode.d.ts.map +1 -0
- package/dist/integrations/agent-profiles/profiles/kilocode.js +33 -0
- package/dist/integrations/agent-profiles/profiles/kilocode.js.map +1 -0
- package/dist/integrations/agent-profiles/profiles/pearai.d.ts +2 -0
- package/dist/integrations/agent-profiles/profiles/pearai.d.ts.map +1 -0
- package/dist/integrations/agent-profiles/profiles/pearai.js +23 -0
- package/dist/integrations/agent-profiles/profiles/pearai.js.map +1 -0
- package/dist/integrations/agent-profiles/profiles/qoder.d.ts +2 -0
- package/dist/integrations/agent-profiles/profiles/qoder.d.ts.map +1 -0
- package/dist/integrations/agent-profiles/profiles/qoder.js +32 -0
- package/dist/integrations/agent-profiles/profiles/qoder.js.map +1 -0
- package/dist/integrations/agent-profiles/profiles/roo-code.d.ts +2 -0
- package/dist/integrations/agent-profiles/profiles/roo-code.d.ts.map +1 -0
- package/dist/integrations/agent-profiles/profiles/roo-code.js +33 -0
- package/dist/integrations/agent-profiles/profiles/roo-code.js.map +1 -0
- package/dist/integrations/agent-profiles/profiles/trae.d.ts +2 -0
- package/dist/integrations/agent-profiles/profiles/trae.d.ts.map +1 -0
- package/dist/integrations/agent-profiles/profiles/trae.js +42 -0
- package/dist/integrations/agent-profiles/profiles/trae.js.map +1 -0
- package/dist/integrations/agent-profiles/profiles/vscode.d.ts +2 -0
- package/dist/integrations/agent-profiles/profiles/vscode.d.ts.map +1 -0
- package/dist/integrations/agent-profiles/profiles/vscode.js +28 -0
- package/dist/integrations/agent-profiles/profiles/vscode.js.map +1 -0
- package/dist/integrations/agent-profiles/profiles/windsurf.d.ts +2 -0
- package/dist/integrations/agent-profiles/profiles/windsurf.d.ts.map +1 -0
- package/dist/integrations/agent-profiles/profiles/windsurf.js +21 -0
- package/dist/integrations/agent-profiles/profiles/windsurf.js.map +1 -0
- package/dist/integrations/agent-profiles/profiles/zed.d.ts +2 -0
- package/dist/integrations/agent-profiles/profiles/zed.d.ts.map +1 -0
- package/dist/integrations/agent-profiles/profiles/zed.js +26 -0
- package/dist/integrations/agent-profiles/profiles/zed.js.map +1 -0
- package/dist/integrations/agent-profiles/registry.d.ts +5 -0
- package/dist/integrations/agent-profiles/registry.d.ts.map +1 -0
- package/dist/integrations/agent-profiles/registry.js +45 -0
- package/dist/integrations/agent-profiles/registry.js.map +1 -0
- package/dist/integrations/agent-profiles/skills/antigravity.d.ts +2 -0
- package/dist/integrations/agent-profiles/skills/antigravity.d.ts.map +1 -0
- package/dist/integrations/agent-profiles/skills/antigravity.js +13 -0
- package/dist/integrations/agent-profiles/skills/antigravity.js.map +1 -0
- package/dist/integrations/agent-profiles/skills/claude-code.d.ts +2 -0
- package/dist/integrations/agent-profiles/skills/claude-code.d.ts.map +1 -0
- package/dist/integrations/agent-profiles/skills/claude-code.js +13 -0
- package/dist/integrations/agent-profiles/skills/claude-code.js.map +1 -0
- package/dist/integrations/agent-profiles/skills/codex.d.ts +2 -0
- package/dist/integrations/agent-profiles/skills/codex.d.ts.map +1 -0
- package/dist/integrations/agent-profiles/skills/codex.js +18 -0
- package/dist/integrations/agent-profiles/skills/codex.js.map +1 -0
- package/dist/integrations/agent-profiles/skills/cursor.d.ts +2 -0
- package/dist/integrations/agent-profiles/skills/cursor.d.ts.map +1 -0
- package/dist/integrations/agent-profiles/skills/cursor.js +13 -0
- package/dist/integrations/agent-profiles/skills/cursor.js.map +1 -0
- package/dist/integrations/agent-profiles/skills/kilocode.d.ts +2 -0
- package/dist/integrations/agent-profiles/skills/kilocode.d.ts.map +1 -0
- package/dist/integrations/agent-profiles/skills/kilocode.js +13 -0
- package/dist/integrations/agent-profiles/skills/kilocode.js.map +1 -0
- package/dist/integrations/agent-profiles/skills/qoder.d.ts +2 -0
- package/dist/integrations/agent-profiles/skills/qoder.d.ts.map +1 -0
- package/dist/integrations/agent-profiles/skills/qoder.js +13 -0
- package/dist/integrations/agent-profiles/skills/qoder.js.map +1 -0
- package/dist/integrations/agent-profiles/skills/roo-code.d.ts +2 -0
- package/dist/integrations/agent-profiles/skills/roo-code.d.ts.map +1 -0
- package/dist/integrations/agent-profiles/skills/roo-code.js +13 -0
- package/dist/integrations/agent-profiles/skills/roo-code.js.map +1 -0
- package/dist/integrations/agent-profiles/types.d.ts +31 -0
- package/dist/integrations/agent-profiles/types.d.ts.map +1 -0
- package/dist/integrations/agent-profiles/types.js +3 -0
- package/dist/integrations/agent-profiles/types.js.map +1 -0
- package/dist/integrations/agent-profiles/utils.d.ts +12 -0
- package/dist/integrations/agent-profiles/utils.d.ts.map +1 -0
- package/dist/integrations/agent-profiles/utils.js +75 -0
- package/dist/integrations/agent-profiles/utils.js.map +1 -0
- package/dist/integrations/errors.d.ts +28 -0
- package/dist/integrations/errors.d.ts.map +1 -0
- package/dist/integrations/errors.js +97 -0
- package/dist/integrations/errors.js.map +1 -0
- package/dist/integrations/skill-health.d.ts +24 -0
- package/dist/integrations/skill-health.d.ts.map +1 -0
- package/dist/integrations/skill-health.js +111 -0
- package/dist/integrations/skill-health.js.map +1 -0
- package/dist/integrations/skill-installer.d.ts.map +1 -1
- package/dist/integrations/skill-installer.js +5 -8
- package/dist/integrations/skill-installer.js.map +1 -1
- package/dist/learning/embedding-quality.d.ts +46 -0
- package/dist/learning/embedding-quality.d.ts.map +1 -0
- package/dist/learning/embedding-quality.js +131 -0
- package/dist/learning/embedding-quality.js.map +1 -0
- package/dist/learning/embeddings.d.ts +45 -1
- package/dist/learning/embeddings.d.ts.map +1 -1
- package/dist/learning/embeddings.js +180 -5
- package/dist/learning/embeddings.js.map +1 -1
- package/dist/learning/skill-flywheel.d.ts +1 -1
- package/dist/learning/skill-flywheel.d.ts.map +1 -1
- package/dist/learning/skill-flywheel.js +10 -3
- package/dist/learning/skill-flywheel.js.map +1 -1
- package/dist/routing/deepseek-tools.d.ts +7 -0
- package/dist/routing/deepseek-tools.d.ts.map +1 -0
- package/dist/routing/deepseek-tools.js +154 -0
- package/dist/routing/deepseek-tools.js.map +1 -0
- package/dist/routing/model-router.d.ts +1 -1
- package/dist/routing/model-router.d.ts.map +1 -1
- package/dist/routing/model-router.js +5 -1
- package/dist/routing/model-router.js.map +1 -1
- package/dist/routing/provider-adapters/anthropic.d.ts.map +1 -1
- package/dist/routing/provider-adapters/anthropic.js +7 -4
- package/dist/routing/provider-adapters/anthropic.js.map +1 -1
- package/dist/routing/provider-adapters/bailian.d.ts.map +1 -1
- package/dist/routing/provider-adapters/bailian.js +7 -4
- package/dist/routing/provider-adapters/bailian.js.map +1 -1
- package/dist/routing/provider-adapters/deepseek.d.ts +5 -0
- package/dist/routing/provider-adapters/deepseek.d.ts.map +1 -0
- package/dist/routing/provider-adapters/deepseek.js +109 -0
- package/dist/routing/provider-adapters/deepseek.js.map +1 -0
- package/dist/routing/provider-adapters/doubao.d.ts.map +1 -1
- package/dist/routing/provider-adapters/doubao.js +7 -4
- package/dist/routing/provider-adapters/doubao.js.map +1 -1
- package/dist/routing/provider-adapters/openai.d.ts +2 -4
- package/dist/routing/provider-adapters/openai.d.ts.map +1 -1
- package/dist/routing/provider-adapters/openai.js +23 -32
- package/dist/routing/provider-adapters/openai.js.map +1 -1
- package/dist/routing/provider-adapters/types.d.ts +61 -0
- package/dist/routing/provider-adapters/types.d.ts.map +1 -0
- package/dist/routing/provider-adapters/types.js +56 -0
- package/dist/routing/provider-adapters/types.js.map +1 -0
- package/dist/routing/provider-executor.d.ts +6 -1
- package/dist/routing/provider-executor.d.ts.map +1 -1
- package/dist/routing/provider-executor.js +70 -39
- package/dist/routing/provider-executor.js.map +1 -1
- package/dist/routing/provider-health.d.ts.map +1 -1
- package/dist/routing/provider-health.js +7 -1
- package/dist/routing/provider-health.js.map +1 -1
- package/dist/routing/role-capabilities.d.ts +11 -0
- package/dist/routing/role-capabilities.d.ts.map +1 -0
- package/dist/routing/role-capabilities.js +94 -0
- package/dist/routing/role-capabilities.js.map +1 -0
- package/dist/surfaces/antigravity-rules/graphflow.md +3 -2
- package/dist/surfaces/cli/runtime/env.d.ts.map +1 -1
- package/dist/surfaces/cli/runtime/env.js +3 -0
- package/dist/surfaces/cli/runtime/env.js.map +1 -1
- package/dist/surfaces/cli/runtime/facade.d.ts +2 -1
- package/dist/surfaces/cli/runtime/facade.d.ts.map +1 -1
- package/dist/surfaces/cli/runtime/facade.js +1 -0
- package/dist/surfaces/cli/runtime/facade.js.map +1 -1
- package/dist/surfaces/cli/runtime/graph.d.ts.map +1 -1
- package/dist/surfaces/cli/runtime/graph.js +18 -2
- package/dist/surfaces/cli/runtime/graph.js.map +1 -1
- package/dist/surfaces/cli/runtime/routing.d.ts +3 -0
- package/dist/surfaces/cli/runtime/routing.d.ts.map +1 -1
- package/dist/surfaces/cli/runtime/routing.js +34 -6
- package/dist/surfaces/cli/runtime/routing.js.map +1 -1
- package/dist/surfaces/cli/runtime/types.d.ts +24 -1
- package/dist/surfaces/cli/runtime/types.d.ts.map +1 -1
- package/dist/surfaces/cli/runtime.d.ts +1 -1
- package/dist/surfaces/cli/runtime.d.ts.map +1 -1
- package/dist/surfaces/cli/runtime.js +2 -1
- package/dist/surfaces/cli/runtime.js.map +1 -1
- package/dist/surfaces/copilot-instructions/graphflow.md +3 -2
- package/dist/surfaces/cursor-rules/graphflow.mdc +3 -2
- package/dist/surfaces/mcp/server.js +17 -6
- package/dist/surfaces/mcp/server.js.map +1 -1
- package/dist/surfaces/mcp/tool-definitions.d.ts.map +1 -1
- package/dist/surfaces/mcp/tool-definitions.js +1 -1
- package/dist/surfaces/mcp/tool-definitions.js.map +1 -1
- package/dist/surfaces/mcp/tool-handlers.d.ts.map +1 -1
- package/dist/surfaces/mcp/tool-handlers.js +2 -0
- package/dist/surfaces/mcp/tool-handlers.js.map +1 -1
- package/dist/surfaces/trae-rules/graphflow.md +3 -2
- package/dist/surfaces/trae-skill/graphflow/SKILL.md +2 -0
- package/package.json +1 -1
- package/scripts/safe-postinstall.cjs +1 -0
- package/src/surfaces/antigravity-rules/graphflow.md +3 -2
- package/src/surfaces/copilot-instructions/graphflow.md +3 -2
- package/src/surfaces/cursor-rules/graphflow.mdc +3 -2
- package/src/surfaces/trae-rules/graphflow.md +3 -2
- package/src/surfaces/trae-skill/graphflow/SKILL.md +2 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"anthropic.js","sourceRoot":"","sources":["../../../src/routing/provider-adapters/anthropic.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"anthropic.js","sourceRoot":"","sources":["../../../src/routing/provider-adapters/anthropic.ts"],"names":[],"mappings":";;AAIA,sDA6DC;AAjED,0DAA4E;AAC5E,+CAA4C;AAGrC,KAAK,UAAU,qBAAqB,CAAC,OAA4B;IACtE,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,0BAA0B,KAAK,GAAG,CAAC;IAC9D,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC;IAC7C,MAAM,OAAO,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,kBAAkB,IAAI,2BAA2B,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;IACpG,MAAM,YAAY,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,8BAA8B,IAAI,KAAK,CAAC,CAAC;IACjF,MAAM,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;IAEnG,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,IAAI,MAAM,EA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jF,IAAI,CAAC,IAAI,EAAE,CAAC;YACV,MAAM,IAAI,KAAK,CAAC,yCAAyC,CAAC,CAAC;QAC7D,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,OAAO,KAAc,EAAE,CAAC;QACxB,IAAI,IAAA,2BAAY,EAAC,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC;YAC1C,MAAM,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAC;QAChF,CAAC;QACD,eAAM,CAAC,KAAK,CACV,EAAE,KAAK,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,EACjE,+BAA+B,CAChC,CAAC;QACF,IAAI,MAAM,EAAE,CAAC;YACX,MAAM,KAAK,CAAC;QACd,CAAC;QACD,OAAO,cAAc,OAAO,CAAC,KAAK,KAAK,OAAO,CAAC,MAAM,EAAE,CAAC;IAC1D,CAAC;YAAS,CAAC;QACT,OAAO,EAAE,CAAC;IACZ,CAAC;AACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bailian.d.ts","sourceRoot":"","sources":["../../../src/routing/provider-adapters/bailian.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"bailian.d.ts","sourceRoot":"","sources":["../../../src/routing/provider-adapters/bailian.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAEpD,wBAAsB,mBAAmB,CAAC,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,MAAM,CAAC,CA8DvF"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.bailianGenerateText = bailianGenerateText;
|
|
4
|
+
const cancellation_1 = require("../../core/cancellation");
|
|
4
5
|
const logger_1 = require("../../utils/logger");
|
|
5
6
|
async function bailianGenerateText(request) {
|
|
6
7
|
const strict = process.env.GRAPHFLOW_BAILIAN_STRICT === "1";
|
|
@@ -14,8 +15,7 @@ async function bailianGenerateText(request) {
|
|
|
14
15
|
}
|
|
15
16
|
return `[bailian:${request.model}] ${request.prompt}`;
|
|
16
17
|
}
|
|
17
|
-
const
|
|
18
|
-
const timer = setTimeout(() => controller.abort(), timeoutMs);
|
|
18
|
+
const { signal, dispose } = (0, cancellation_1.createTimeoutSignal)(timeoutMs, request.signal);
|
|
19
19
|
try {
|
|
20
20
|
const response = await fetch(`${baseUrl}/chat/completions`, {
|
|
21
21
|
method: "POST",
|
|
@@ -29,7 +29,7 @@ async function bailianGenerateText(request) {
|
|
|
29
29
|
temperature: 0.1,
|
|
30
30
|
max_tokens: 512,
|
|
31
31
|
}),
|
|
32
|
-
signal
|
|
32
|
+
signal,
|
|
33
33
|
});
|
|
34
34
|
if (!response.ok) {
|
|
35
35
|
const text = await response.text();
|
|
@@ -43,6 +43,9 @@ async function bailianGenerateText(request) {
|
|
|
43
43
|
return text;
|
|
44
44
|
}
|
|
45
45
|
catch (error) {
|
|
46
|
+
if ((0, cancellation_1.isAbortError)(error) || signal.aborted) {
|
|
47
|
+
throw error instanceof Error ? error : new Error("bailian request aborted");
|
|
48
|
+
}
|
|
46
49
|
logger_1.logger.error({ error: error instanceof Error ? error.message : String(error) }, "Provider adapter caught error");
|
|
47
50
|
if (strict) {
|
|
48
51
|
throw error;
|
|
@@ -50,7 +53,7 @@ async function bailianGenerateText(request) {
|
|
|
50
53
|
return `[bailian:${request.model}] ${request.prompt}`;
|
|
51
54
|
}
|
|
52
55
|
finally {
|
|
53
|
-
|
|
56
|
+
dispose();
|
|
54
57
|
}
|
|
55
58
|
}
|
|
56
59
|
//# sourceMappingURL=bailian.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bailian.js","sourceRoot":"","sources":["../../../src/routing/provider-adapters/bailian.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"bailian.js","sourceRoot":"","sources":["../../../src/routing/provider-adapters/bailian.ts"],"names":[],"mappings":";;AAIA,kDA8DC;AAlED,0DAA4E;AAC5E,+CAA4C;AAGrC,KAAK,UAAU,mBAAmB,CAAC,OAA4B;IACpE,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,wBAAwB,KAAK,GAAG,CAAC;IAC5D,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC;IAC3C,MAAM,OAAO,GAAG,CACd,OAAO,CAAC,GAAG,CAAC,gBAAgB,IAAI,mDAAmD,CACpF,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;IACtB,MAAM,YAAY,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,4BAA4B,IAAI,KAAK,CAAC,CAAC;IAC/E,MAAM,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;IAEnG,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,IAAI,MAAM,EAAE,CAAC;YACX,MAAM,IAAI,KAAK,CAAC,6BAA6B,CAAC,CAAC;QACjD,CAAC;QACD,OAAO,YAAY,OAAO,CAAC,KAAK,KAAK,OAAO,CAAC,MAAM,EAAE,CAAC;IACxD,CAAC;IAED,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,IAAA,kCAAmB,EAAC,SAAS,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;IAE3E,IAAI,CAAC;QACH,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,GAAG,OAAO,mBAAmB,EAAE;YAC1D,MAAM,EAAE,MAAM;YACd,OAAO,E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AM,CAAC,KAAK,CACV,EAAE,KAAK,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,EACjE,+BAA+B,CAChC,CAAC;QACF,IAAI,MAAM,EAAE,CAAC;YACX,MAAM,KAAK,CAAC;QACd,CAAC;QACD,OAAO,YAAY,OAAO,CAAC,KAAK,KAAK,OAAO,CAAC,MAAM,EAAE,CAAC;IACxD,CAAC;YAAS,CAAC;QACT,OAAO,EAAE,CAAC;IACZ,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type ProviderTextRequest, type ProviderTextResult } from "./types";
|
|
2
|
+
export type { ProviderTextRequest, ProviderTextResult } from "./types";
|
|
3
|
+
export declare function deepseekGenerateTextDetailed(request: ProviderTextRequest): Promise<ProviderTextResult>;
|
|
4
|
+
export declare function deepseekGenerateText(request: ProviderTextRequest): Promise<string>;
|
|
5
|
+
//# sourceMappingURL=deepseek.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deepseek.d.ts","sourceRoot":"","sources":["../../../src/routing/provider-adapters/deepseek.ts"],"names":[],"mappings":"AAEA,OAAO,EAKL,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EACxB,MAAM,SAAS,CAAC;AAEjB,YAAY,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAuCvE,wBAAsB,4BAA4B,CAChD,OAAO,EAAE,mBAAmB,GAC3B,OAAO,CAAC,kBAAkB,CAAC,CAmE7B;AAED,wBAAsB,oBAAoB,CAAC,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,MAAM,CAAC,CAGxF"}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.deepseekGenerateTextDetailed = deepseekGenerateTextDetailed;
|
|
4
|
+
exports.deepseekGenerateText = deepseekGenerateText;
|
|
5
|
+
const cancellation_1 = require("../../core/cancellation");
|
|
6
|
+
const logger_1 = require("../../utils/logger");
|
|
7
|
+
const types_1 = require("./types");
|
|
8
|
+
const DEFAULT_BASE_URL = "https://api.deepseek.com";
|
|
9
|
+
function buildMessages(request) {
|
|
10
|
+
if (request.messages && request.messages.length > 0) {
|
|
11
|
+
return request.messages;
|
|
12
|
+
}
|
|
13
|
+
return [{ role: "user", content: request.prompt }];
|
|
14
|
+
}
|
|
15
|
+
function buildBody(request) {
|
|
16
|
+
const body = {
|
|
17
|
+
model: request.model,
|
|
18
|
+
messages: buildMessages(request),
|
|
19
|
+
max_tokens: request.maxTokens ?? 1024,
|
|
20
|
+
};
|
|
21
|
+
if (request.thinking) {
|
|
22
|
+
body.thinking = { type: request.thinking };
|
|
23
|
+
}
|
|
24
|
+
if (request.reasoningEffort) {
|
|
25
|
+
body.reasoning_effort = request.reasoningEffort;
|
|
26
|
+
}
|
|
27
|
+
// DeepSeek docs: temperature is ignored under thinking mode but accepted for compatibility.
|
|
28
|
+
if (request.thinking !== "enabled" && request.temperature !== undefined) {
|
|
29
|
+
body.temperature = request.temperature;
|
|
30
|
+
}
|
|
31
|
+
else if (request.thinking !== "enabled") {
|
|
32
|
+
body.temperature = 0.1;
|
|
33
|
+
}
|
|
34
|
+
if (request.responseFormat) {
|
|
35
|
+
body.response_format = request.responseFormat;
|
|
36
|
+
}
|
|
37
|
+
if (request.tools && request.tools.length > 0) {
|
|
38
|
+
body.tools = request.tools;
|
|
39
|
+
}
|
|
40
|
+
return body;
|
|
41
|
+
}
|
|
42
|
+
async function deepseekGenerateTextDetailed(request) {
|
|
43
|
+
const strict = process.env.GRAPHFLOW_DEEPSEEK_STRICT === "1";
|
|
44
|
+
const apiKey = process.env.DEEPSEEK_API_KEY;
|
|
45
|
+
const baseUrl = (process.env.DEEPSEEK_BASE_URL ?? DEFAULT_BASE_URL).replace(/\/+$/, "");
|
|
46
|
+
const timeoutMsRaw = Number(process.env.GRAPHFLOW_DEEPSEEK_TIMEOUT_MS ?? 60000);
|
|
47
|
+
const timeoutMs = Number.isFinite(timeoutMsRaw) ? Math.max(1000, Math.floor(timeoutMsRaw)) : 60000;
|
|
48
|
+
if (!apiKey) {
|
|
49
|
+
if (strict) {
|
|
50
|
+
throw new Error("DEEPSEEK_API_KEY is required");
|
|
51
|
+
}
|
|
52
|
+
return { content: `[deepseek:${request.model}] ${request.prompt}` };
|
|
53
|
+
}
|
|
54
|
+
const { signal, dispose } = (0, cancellation_1.createTimeoutSignal)(timeoutMs, request.signal);
|
|
55
|
+
try {
|
|
56
|
+
const response = await fetch(`${baseUrl}/chat/completions`, {
|
|
57
|
+
method: "POST",
|
|
58
|
+
headers: {
|
|
59
|
+
"content-type": "application/json",
|
|
60
|
+
authorization: `Bearer ${apiKey}`,
|
|
61
|
+
},
|
|
62
|
+
body: JSON.stringify(buildBody(request)),
|
|
63
|
+
signal,
|
|
64
|
+
});
|
|
65
|
+
if (!response.ok) {
|
|
66
|
+
const text = await response.text();
|
|
67
|
+
throw new Error(`deepseek http ${response.status}: ${text.slice(0, 300)}`);
|
|
68
|
+
}
|
|
69
|
+
const payload = (0, types_1.asRecord)(await response.json());
|
|
70
|
+
const picked = (0, types_1.pickChatContent)(payload);
|
|
71
|
+
const usage = (0, types_1.pickUsage)(payload);
|
|
72
|
+
if (!picked.content && !(picked.toolCalls && picked.toolCalls.length > 0)) {
|
|
73
|
+
throw new Error("deepseek response missing content");
|
|
74
|
+
}
|
|
75
|
+
const message = (0, types_1.asRecord)((0, types_1.asRecord)(payload.choices?.[0]).message);
|
|
76
|
+
const rawAssistantMessage = {
|
|
77
|
+
role: "assistant",
|
|
78
|
+
content: typeof message.content === "string" ? message.content : picked.content ?? "",
|
|
79
|
+
...(picked.reasoningContent ? { reasoning_content: picked.reasoningContent } : {}),
|
|
80
|
+
...(picked.toolCalls ? { tool_calls: picked.toolCalls } : {}),
|
|
81
|
+
};
|
|
82
|
+
return {
|
|
83
|
+
content: picked.content ?? "",
|
|
84
|
+
...(picked.reasoningContent ? { reasoningContent: picked.reasoningContent } : {}),
|
|
85
|
+
...(picked.toolCalls ? { toolCalls: picked.toolCalls } : {}),
|
|
86
|
+
...(usage ? { usage } : {}),
|
|
87
|
+
rawAssistantMessage,
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
catch (error) {
|
|
91
|
+
if ((0, cancellation_1.isAbortError)(error) || signal.aborted) {
|
|
92
|
+
throw error instanceof Error ? error : new Error("deepseek request aborted");
|
|
93
|
+
}
|
|
94
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
95
|
+
logger_1.logger.error({ error: message }, "DeepSeek provider adapter caught error");
|
|
96
|
+
if (strict) {
|
|
97
|
+
throw error;
|
|
98
|
+
}
|
|
99
|
+
return { content: `[deepseek:${request.model}] ${request.prompt}` };
|
|
100
|
+
}
|
|
101
|
+
finally {
|
|
102
|
+
dispose();
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
async function deepseekGenerateText(request) {
|
|
106
|
+
const result = await deepseekGenerateTextDetailed(request);
|
|
107
|
+
return result.content;
|
|
108
|
+
}
|
|
109
|
+
//# sourceMappingURL=deepseek.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deepseek.js","sourceRoot":"","sources":["../../../src/routing/provider-adapters/deepseek.ts"],"names":[],"mappings":";;AAkDA,oEAqEC;AAED,oDAGC;AA5HD,0DAA4E;AAC5E,+CAA4C;AAC5C,mCAOiB;AAIjB,MAAM,gBAAgB,GAAG,0BAA0B,CAAC;AAEpD,SAAS,aAAa,CAAC,OAA4B;IACjD,IAAI,OAAO,CAAC,QAAQ,IAAI,OAAO,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACpD,OAAO,OAAO,CAAC,QAAQ,CAAC;IAC1B,CAAC;IACD,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,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oot":"","sources":["../../../src/routing/provider-adapters/doubao.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"doubao.d.ts","sourceRoot":"","sources":["../../../src/routing/provider-adapters/doubao.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAEpD,wBAAsB,kBAAkB,CAAC,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,MAAM,CAAC,CA+DtF"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.doubaoGenerateText = doubaoGenerateText;
|
|
4
|
+
const cancellation_1 = require("../../core/cancellation");
|
|
4
5
|
const logger_1 = require("../../utils/logger");
|
|
5
6
|
async function doubaoGenerateText(request) {
|
|
6
7
|
const strict = process.env.GRAPHFLOW_DOUBAO_STRICT === "1";
|
|
@@ -14,8 +15,7 @@ async function doubaoGenerateText(request) {
|
|
|
14
15
|
}
|
|
15
16
|
return `[doubao:${request.model}] ${request.prompt}`;
|
|
16
17
|
}
|
|
17
|
-
const
|
|
18
|
-
const timer = setTimeout(() => controller.abort(), timeoutMs);
|
|
18
|
+
const { signal, dispose } = (0, cancellation_1.createTimeoutSignal)(timeoutMs, request.signal);
|
|
19
19
|
try {
|
|
20
20
|
const response = await fetch(`${baseUrl}/chat/completions`, {
|
|
21
21
|
method: "POST",
|
|
@@ -29,7 +29,7 @@ async function doubaoGenerateText(request) {
|
|
|
29
29
|
temperature: 0.1,
|
|
30
30
|
max_tokens: 512,
|
|
31
31
|
}),
|
|
32
|
-
signal
|
|
32
|
+
signal,
|
|
33
33
|
});
|
|
34
34
|
if (!response.ok) {
|
|
35
35
|
const text = await response.text();
|
|
@@ -43,6 +43,9 @@ async function doubaoGenerateText(request) {
|
|
|
43
43
|
return text;
|
|
44
44
|
}
|
|
45
45
|
catch (error) {
|
|
46
|
+
if ((0, cancellation_1.isAbortError)(error) || signal.aborted) {
|
|
47
|
+
throw error instanceof Error ? error : new Error("doubao request aborted");
|
|
48
|
+
}
|
|
46
49
|
logger_1.logger.error({ error: error instanceof Error ? error.message : String(error) }, "Provider adapter caught error");
|
|
47
50
|
if (strict) {
|
|
48
51
|
throw error;
|
|
@@ -50,7 +53,7 @@ async function doubaoGenerateText(request) {
|
|
|
50
53
|
return `[doubao:${request.model}] ${request.prompt}`;
|
|
51
54
|
}
|
|
52
55
|
finally {
|
|
53
|
-
|
|
56
|
+
dispose();
|
|
54
57
|
}
|
|
55
58
|
}
|
|
56
59
|
//# sourceMappingURL=doubao.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"doubao.js","sourceRoot":"","sources":["../../../src/routing/provider-adapters/doubao.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"doubao.js","sourceRoot":"","sources":["../../../src/routing/provider-adapters/doubao.ts"],"names":[],"mappings":";;AAIA,gDA+DC;AAnED,0DAA4E;AAC5E,+CAA4C;AAGrC,KAAK,UAAU,kBAAkB,CAAC,OAA4B;IACnE,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,uBAAuB,KAAK,GAAG,CAAC;IAC3D,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC;IAC1C,MAAM,OAAO,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe,IAAI,0CAA0C,CAAC,CAAC,OAAO,CACjG,MAAM,EACN,EAAE,CACH,CAAC;IACF,MAAM,YAAY,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,2BAA2B,IAAI,KAAK,CAAC,CAAC;IAC9E,MAAM,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;IAEnG,IAAI,CAA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CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;QAClG,IAAI,CAAC,IAAI,EAAE,CAAC;YACV,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAC;QACrD,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,OAAO,KAAc,EAAE,CAAC;QACxB,IAAI,IAAA,2BAAY,EAAC,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC;YAC1C,MAAM,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,wBAAwB,CAAC,CAAC;QAC7E,CAAC;QACD,eAAM,CAAC,KAAK,CACV,EAAE,KAAK,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,EACjE,+BAA+B,CAChC,CAAC;QACF,IAAI,MAAM,EAAE,CAAC;YACX,MAAM,KAAK,CAAC;QACd,CAAC;QACD,OAAO,WAAW,OAAO,CAAC,KAAK,KAAK,OAAO,CAAC,MAAM,EAAE,CAAC;IACvD,CAAC;YAAS,CAAC;QACT,OAAO,EAAE,CAAC;IACZ,CAAC;AACH,CAAC"}
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
model: string;
|
|
4
|
-
}
|
|
1
|
+
import { type ProviderTextRequest } from "./types";
|
|
2
|
+
export type { ProviderTextRequest } from "./types";
|
|
5
3
|
export declare function openaiGenerateText(request: ProviderTextRequest): Promise<string>;
|
|
6
4
|
//# sourceMappingURL=openai.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"openai.d.ts","sourceRoot":"","sources":["../../../src/routing/provider-adapters/openai.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"openai.d.ts","sourceRoot":"","sources":["../../../src/routing/provider-adapters/openai.ts"],"names":[],"mappings":"AAEA,OAAO,EAGL,KAAK,mBAAmB,EACzB,MAAM,SAAS,CAAC;AAEjB,YAAY,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAMnD,wBAAsB,kBAAkB,CAAC,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,MAAM,CAAC,CAiEtF"}
|
|
@@ -1,29 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.openaiGenerateText = openaiGenerateText;
|
|
4
|
+
const cancellation_1 = require("../../core/cancellation");
|
|
4
5
|
const logger_1 = require("../../utils/logger");
|
|
5
|
-
|
|
6
|
-
if (value && typeof value === "object") {
|
|
7
|
-
return value;
|
|
8
|
-
}
|
|
9
|
-
return {};
|
|
10
|
-
}
|
|
6
|
+
const types_1 = require("./types");
|
|
11
7
|
function pickContent(payload) {
|
|
12
|
-
|
|
13
|
-
if (!Array.isArray(choices) || choices.length === 0) {
|
|
14
|
-
return undefined;
|
|
15
|
-
}
|
|
16
|
-
const first = asRecord(choices[0]);
|
|
17
|
-
const message = asRecord(first.message);
|
|
18
|
-
const content = message.content;
|
|
19
|
-
if (typeof content === "string" && content.trim().length > 0) {
|
|
20
|
-
return content.trim();
|
|
21
|
-
}
|
|
22
|
-
const text = first.text;
|
|
23
|
-
if (typeof text === "string" && text.trim().length > 0) {
|
|
24
|
-
return text.trim();
|
|
25
|
-
}
|
|
26
|
-
return undefined;
|
|
8
|
+
return (0, types_1.pickChatContent)(payload).content;
|
|
27
9
|
}
|
|
28
10
|
async function openaiGenerateText(request) {
|
|
29
11
|
const strict = process.env.GRAPHFLOW_OPENAI_STRICT === "1";
|
|
@@ -37,28 +19,34 @@ async function openaiGenerateText(request) {
|
|
|
37
19
|
}
|
|
38
20
|
return `[openai:${request.model}] ${request.prompt}`;
|
|
39
21
|
}
|
|
40
|
-
const
|
|
41
|
-
const
|
|
22
|
+
const { signal, dispose } = (0, cancellation_1.createTimeoutSignal)(timeoutMs, request.signal);
|
|
23
|
+
const messages = request.messages && request.messages.length > 0
|
|
24
|
+
? request.messages
|
|
25
|
+
: [{ role: "user", content: request.prompt }];
|
|
42
26
|
try {
|
|
27
|
+
const body = {
|
|
28
|
+
model: request.model,
|
|
29
|
+
messages,
|
|
30
|
+
temperature: request.temperature ?? 0.1,
|
|
31
|
+
max_tokens: request.maxTokens ?? 512,
|
|
32
|
+
};
|
|
33
|
+
if (request.responseFormat) {
|
|
34
|
+
body.response_format = request.responseFormat;
|
|
35
|
+
}
|
|
43
36
|
const response = await fetch(`${baseUrl}/chat/completions`, {
|
|
44
37
|
method: "POST",
|
|
45
38
|
headers: {
|
|
46
39
|
"content-type": "application/json",
|
|
47
40
|
authorization: `Bearer ${apiKey}`,
|
|
48
41
|
},
|
|
49
|
-
body: JSON.stringify(
|
|
50
|
-
|
|
51
|
-
messages: [{ role: "user", content: request.prompt }],
|
|
52
|
-
temperature: 0.1,
|
|
53
|
-
max_tokens: 512,
|
|
54
|
-
}),
|
|
55
|
-
signal: controller.signal,
|
|
42
|
+
body: JSON.stringify(body),
|
|
43
|
+
signal,
|
|
56
44
|
});
|
|
57
45
|
if (!response.ok) {
|
|
58
46
|
const text = await response.text();
|
|
59
47
|
throw new Error(`openai http ${response.status}: ${text.slice(0, 300)}`);
|
|
60
48
|
}
|
|
61
|
-
const payload = asRecord(await response.json());
|
|
49
|
+
const payload = (0, types_1.asRecord)(await response.json());
|
|
62
50
|
const content = pickContent(payload);
|
|
63
51
|
if (!content) {
|
|
64
52
|
throw new Error("openai response missing content");
|
|
@@ -66,6 +54,9 @@ async function openaiGenerateText(request) {
|
|
|
66
54
|
return content;
|
|
67
55
|
}
|
|
68
56
|
catch (error) {
|
|
57
|
+
if ((0, cancellation_1.isAbortError)(error) || signal.aborted) {
|
|
58
|
+
throw error instanceof Error ? error : new Error("openai request aborted");
|
|
59
|
+
}
|
|
69
60
|
const message = error instanceof Error ? error.message : String(error);
|
|
70
61
|
logger_1.logger.error({ error: message }, "Provider adapter caught error");
|
|
71
62
|
if (strict) {
|
|
@@ -74,7 +65,7 @@ async function openaiGenerateText(request) {
|
|
|
74
65
|
return `[openai:${request.model}] ${request.prompt}`;
|
|
75
66
|
}
|
|
76
67
|
finally {
|
|
77
|
-
|
|
68
|
+
dispose();
|
|
78
69
|
}
|
|
79
70
|
}
|
|
80
71
|
//# sourceMappingURL=openai.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"openai.js","sourceRoot":"","sources":["../../../src/routing/provider-adapters/openai.ts"],"names":[],"mappings":";;AA
|
|
1
|
+
{"version":3,"file":"openai.js","sourceRoot":"","sources":["../../../src/routing/provider-adapters/openai.ts"],"names":[],"mappings":";;AAcA,gDAiEC;AA/ED,0DAA4E;AAC5E,+CAA4C;AAC5C,mCAIiB;AAIjB,SAAS,WAAW,CAAC,OAAgC;IACnD,OAAO,IAAA,uBAAe,EAAC,OAAO,CAAC,CAAC,OAAO,CAAC;AAC1C,CAAC;AAEM,KAAK,UAAU,kBAAkB,CAAC,OAA4B;IACnE,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,uBAAuB,KAAK,GAAG,CAAC;IAC3D,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC;IAC1C,MAAM,OAAO,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe,IAAI,2BAA2B,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;IACjG,MAAM,YAAY,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,2BAA2B,IAAI,KAAK,CAAC,CAAC;IAC9E,MAAM,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;IAEnG,IAAI,CAA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M,IAAI,KAAK,CAAC,eAAe,QAAQ,CAAC,MAAM,KAAK,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC;QAC3E,CAAC;QAED,MAAM,OAAO,GAAG,IAAA,gBAAQ,EAAC,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC;QAChD,MAAM,OAAO,GAAG,WAAW,CAAC,OAAO,CAAC,CAAC;QACrC,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAC;QACrD,CAAC;QACD,OAAO,OAAO,CAAC;IACjB,CAAC;IAAC,OAAO,KAAc,EAAE,CAAC;QACxB,IAAI,IAAA,2BAAY,EAAC,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC;YAC1C,MAAM,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,wBAAwB,CAAC,CAAC;QAC7E,CAAC;QACD,MAAM,OAAO,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACvE,eAAM,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,+BAA+B,CAAC,CAAC;QAClE,IAAI,MAAM,EAAE,CAAC;YACX,MAAM,KAAK,CAAC;QACd,CAAC;QACD,OAAO,WAAW,OAAO,CAAC,KAAK,KAAK,OAAO,CAAC,MAAM,EAAE,CAAC;IACvD,CAAC;YAAS,CAAC;QACT,OAAO,EAAE,CAAC;IACZ,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
export interface ProviderChatMessage {
|
|
2
|
+
role: "system" | "user" | "assistant" | "tool";
|
|
3
|
+
content: string;
|
|
4
|
+
reasoning_content?: string;
|
|
5
|
+
tool_calls?: ProviderToolCall[];
|
|
6
|
+
tool_call_id?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface ProviderToolCall {
|
|
9
|
+
id: string;
|
|
10
|
+
type: "function";
|
|
11
|
+
function: {
|
|
12
|
+
name: string;
|
|
13
|
+
arguments: string;
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
export interface ProviderToolDefinition {
|
|
17
|
+
type: "function";
|
|
18
|
+
function: {
|
|
19
|
+
name: string;
|
|
20
|
+
description: string;
|
|
21
|
+
parameters: Record<string, unknown>;
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
export interface ProviderTextRequest {
|
|
25
|
+
prompt: string;
|
|
26
|
+
model: string;
|
|
27
|
+
/** External cancel/timeout signal; merged with provider-local timeout. */
|
|
28
|
+
signal?: AbortSignal;
|
|
29
|
+
/** Optional multi-message layout (system + user). When set, preferred over prompt-only. */
|
|
30
|
+
messages?: ProviderChatMessage[];
|
|
31
|
+
maxTokens?: number;
|
|
32
|
+
temperature?: number;
|
|
33
|
+
thinking?: "enabled" | "disabled";
|
|
34
|
+
reasoningEffort?: "high" | "max";
|
|
35
|
+
responseFormat?: {
|
|
36
|
+
type: "json_object";
|
|
37
|
+
};
|
|
38
|
+
tools?: ProviderToolDefinition[];
|
|
39
|
+
}
|
|
40
|
+
export interface ProviderUsageStats {
|
|
41
|
+
promptTokens?: number;
|
|
42
|
+
completionTokens?: number;
|
|
43
|
+
promptCacheHitTokens?: number;
|
|
44
|
+
promptCacheMissTokens?: number;
|
|
45
|
+
}
|
|
46
|
+
export interface ProviderTextResult {
|
|
47
|
+
content: string;
|
|
48
|
+
reasoningContent?: string;
|
|
49
|
+
toolCalls?: ProviderToolCall[];
|
|
50
|
+
usage?: ProviderUsageStats;
|
|
51
|
+
rawAssistantMessage?: ProviderChatMessage;
|
|
52
|
+
}
|
|
53
|
+
export declare function asRecord(value: unknown): Record<string, unknown>;
|
|
54
|
+
/** Prefer final content; fall back to reasoning_content when content is empty. */
|
|
55
|
+
export declare function pickChatContent(payload: Record<string, unknown>): {
|
|
56
|
+
content?: string;
|
|
57
|
+
reasoningContent?: string;
|
|
58
|
+
toolCalls?: ProviderToolCall[];
|
|
59
|
+
};
|
|
60
|
+
export declare function pickUsage(payload: Record<string, unknown>): ProviderUsageStats | undefined;
|
|
61
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/routing/provider-adapters/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,QAAQ,GAAG,MAAM,GAAG,WAAW,GAAG,MAAM,CAAC;IAC/C,OAAO,EAAE,MAAM,CAAC;IAChB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,UAAU,CAAC,EAAE,gBAAgB,EAAE,CAAC;IAChC,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,UAAU,CAAC;IACjB,QAAQ,EAAE;QACR,IAAI,EAAE,MAAM,CAAC;QACb,SAAS,EAAE,MAAM,CAAC;KACnB,CAAC;CACH;AAED,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,UAAU,CAAC;IACjB,QAAQ,EAAE;QACR,IAAI,EAAE,MAAM,CAAC;QACb,WAAW,EAAE,MAAM,CAAC;QACpB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACrC,CAAC;CACH;AAED,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,0EAA0E;IAC1E,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,2FAA2F;IAC3F,QAAQ,CAAC,EAAE,mBAAmB,EAAE,CAAC;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,SAAS,GAAG,UAAU,CAAC;IAClC,eAAe,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;IACjC,cAAc,CAAC,EAAE;QAAE,IAAI,EAAE,aAAa,CAAA;KAAE,CAAC;IACzC,KAAK,CAAC,EAAE,sBAAsB,EAAE,CAAC;CAClC;AAED,MAAM,WAAW,kBAAkB;IACjC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAChC;AAED,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,MAAM,CAAC;IAChB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,SAAS,CAAC,EAAE,gBAAgB,EAAE,CAAC;IAC/B,KAAK,CAAC,EAAE,kBAAkB,CAAC;IAC3B,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;CAC3C;AAED,wBAAgB,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAKhE;AAED,kFAAkF;AAClF,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG;IACjE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,SAAS,CAAC,EAAE,gBAAgB,EAAE,CAAC;CAChC,CAwBA;AAED,wBAAgB,SAAS,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,kBAAkB,GAAG,SAAS,CAmB1F"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.asRecord = asRecord;
|
|
4
|
+
exports.pickChatContent = pickChatContent;
|
|
5
|
+
exports.pickUsage = pickUsage;
|
|
6
|
+
function asRecord(value) {
|
|
7
|
+
if (value && typeof value === "object") {
|
|
8
|
+
return value;
|
|
9
|
+
}
|
|
10
|
+
return {};
|
|
11
|
+
}
|
|
12
|
+
/** Prefer final content; fall back to reasoning_content when content is empty. */
|
|
13
|
+
function pickChatContent(payload) {
|
|
14
|
+
const choices = payload.choices;
|
|
15
|
+
if (!Array.isArray(choices) || choices.length === 0) {
|
|
16
|
+
return {};
|
|
17
|
+
}
|
|
18
|
+
const first = asRecord(choices[0]);
|
|
19
|
+
const message = asRecord(first.message);
|
|
20
|
+
const contentRaw = typeof message.content === "string" ? message.content.trim() : "";
|
|
21
|
+
const reasoningRaw = message.reasoning_content ?? message.reasoning;
|
|
22
|
+
const reasoningContent = typeof reasoningRaw === "string" && reasoningRaw.trim().length > 0
|
|
23
|
+
? reasoningRaw.trim()
|
|
24
|
+
: undefined;
|
|
25
|
+
const toolCalls = Array.isArray(message.tool_calls)
|
|
26
|
+
? message.tool_calls
|
|
27
|
+
: undefined;
|
|
28
|
+
const textFallback = typeof first.text === "string" && first.text.trim().length > 0 ? first.text.trim() : undefined;
|
|
29
|
+
const content = contentRaw || textFallback || reasoningContent;
|
|
30
|
+
return {
|
|
31
|
+
...(content ? { content } : {}),
|
|
32
|
+
...(reasoningContent ? { reasoningContent } : {}),
|
|
33
|
+
...(toolCalls ? { toolCalls } : {}),
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
function pickUsage(payload) {
|
|
37
|
+
const usage = asRecord(payload.usage);
|
|
38
|
+
if (Object.keys(usage).length === 0) {
|
|
39
|
+
return undefined;
|
|
40
|
+
}
|
|
41
|
+
const stats = {};
|
|
42
|
+
if (typeof usage.prompt_tokens === "number") {
|
|
43
|
+
stats.promptTokens = usage.prompt_tokens;
|
|
44
|
+
}
|
|
45
|
+
if (typeof usage.completion_tokens === "number") {
|
|
46
|
+
stats.completionTokens = usage.completion_tokens;
|
|
47
|
+
}
|
|
48
|
+
if (typeof usage.prompt_cache_hit_tokens === "number") {
|
|
49
|
+
stats.promptCacheHitTokens = usage.prompt_cache_hit_tokens;
|
|
50
|
+
}
|
|
51
|
+
if (typeof usage.prompt_cache_miss_tokens === "number") {
|
|
52
|
+
stats.promptCacheMissTokens = usage.prompt_cache_miss_tokens;
|
|
53
|
+
}
|
|
54
|
+
return Object.keys(stats).length > 0 ? stats : undefined;
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/routing/provider-adapters/types.ts"],"names":[],"mappings":";;AAwDA,4BAKC;AAGD,0CA4BC;AAED,8BAmBC;AAzDD,SAAgB,QAAQ,CAAC,KAAc;IACrC,IAAI,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QACvC,OAAO,KAAgC,CAAC;IAC1C,CAAC;IACD,OAAO,EAAE,CAAC;AACZ,CAAC;AAED,kFAAkF;AAClF,SAAgB,eAAe,CAAC,OAAgC;IAK9D,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;IAChC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACpD,OAAO,EAAE,CAAC;IACZ,CAAC;IACD,MAAM,KAAK,GAAG,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;IACnC,MAAM,OAAO,GAAG,QAAQ,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IACxC,MAAM,UAAU,GAAG,OAAO,OAAO,CAAC,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;IACrF,MAAM,YAAY,GAAG,OAAO,CAAC,iBAAiB,IAAI,OAAO,CAAC,SAAS,CAAC;IACpE,MAAM,gBAAgB,GACpB,OAAO,YAAY,KAAK,Q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AC3C,CAAC;IACD,IAAI,OAAO,KAAK,CAAC,iBAAiB,KAAK,QAAQ,EAAE,CAAC;QAChD,KAAK,CAAC,gBAAgB,GAAG,KAAK,CAAC,iBAAiB,CAAC;IACnD,CAAC;IACD,IAAI,OAAO,KAAK,CAAC,uBAAuB,KAAK,QAAQ,EAAE,CAAC;QACtD,KAAK,CAAC,oBAAoB,GAAG,KAAK,CAAC,uBAAuB,CAAC;IAC7D,CAAC;IACD,IAAI,OAAO,KAAK,CAAC,wBAAwB,KAAK,QAAQ,EAAE,CAAC;QACvD,KAAK,CAAC,qBAAqB,GAAG,KAAK,CAAC,wBAAwB,CAAC;IAC/D,CAAC;IACD,OAAO,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;AAC3D,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { AgentRole } from "../core/types";
|
|
2
2
|
import type { ModelSelection } from "./model-router";
|
|
3
|
+
import type { ProviderChatMessage, ProviderUsageStats } from "./provider-adapters/types";
|
|
3
4
|
export declare class ProviderError extends Error {
|
|
4
5
|
provider: ModelSelection["provider"];
|
|
5
6
|
model: string;
|
|
@@ -16,6 +17,10 @@ export interface PromptContext {
|
|
|
16
17
|
skillHints?: string[];
|
|
17
18
|
extraInstructions?: string[];
|
|
18
19
|
}
|
|
20
|
+
export declare function getLastProviderUsage(): ProviderUsageStats | undefined;
|
|
19
21
|
export declare function formatPromptWithContext(role: AgentRole, prompt: string, context?: PromptContext): string;
|
|
20
|
-
export declare function executeRolePrompt(role: AgentRole, prompt: string, selection: ModelSelection, context?: PromptContext): Promise<string>;
|
|
22
|
+
export declare function executeRolePrompt(role: AgentRole, prompt: string, selection: ModelSelection, context?: PromptContext, signal?: AbortSignal): Promise<string>;
|
|
23
|
+
/** @internal test helper */
|
|
24
|
+
export declare function __resetProviderCircuitsForTests(): void;
|
|
25
|
+
export type { ProviderChatMessage };
|
|
21
26
|
//# sourceMappingURL=provider-executor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider-executor.d.ts","sourceRoot":"","sources":["../../src/routing/provider-executor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"provider-executor.d.ts","sourceRoot":"","sources":["../../src/routing/provider-executor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAI/C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAMrD,OAAO,KAAK,EAAE,mBAAmB,EAAuB,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAI9G,qBAAa,aAAc,SAAQ,KAAK;IACtC,QAAQ,EAAE,cAAc,CAAC,UAAU,CAAC,CAAC;IACrC,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,OAAO,CAAC;gBAEP,MAAM,EAAE;QAClB,QAAQ,EAAE,cAAc,CAAC,UAAU,CAAC,CAAC;QACrC,KAAK,EAAE,MAAM,CAAC;QACd,OAAO,EAAE,MAAM,CAAC;QAChB,SAAS,EAAE,OAAO,CAAC;KACpB;CAOF;AAYD,MAAM,WAAW,aAAa;IAC5B,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;CAC9B;AAOD,wBAAgB,oBAAoB,IAAI,kBAAkB,GAAG,SAAS,CAErE;AAYD,wBAAgB,uBAAuB,CACrC,IAAI,EAAE,SAAS,EACf,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE,aAAa,GACtB,MAAM,CAgCR;AA4FD,wBAAsB,iBAAiB,CACrC,IAAI,EAAE,SAAS,EACf,MAAM,EAAE,MAAM,EACd,SAAS,EA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