@aexol/spectral 0.9.230 → 0.9.234
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 +2 -0
- package/dist/agent/index.d.ts.map +1 -1
- package/dist/agent/index.js +89 -14
- package/dist/backend/generated-images.d.ts +1 -1
- package/dist/backend/generated-images.d.ts.map +1 -1
- package/dist/commands/serve.d.ts.map +1 -1
- package/dist/commands/serve.js +12 -1
- package/dist/designer/data/skills/blog-post.d.ts +3 -0
- package/dist/designer/data/skills/blog-post.d.ts.map +1 -0
- package/dist/designer/data/skills/blog-post.js +84 -0
- package/dist/designer/data/skills/blog-post.ts +87 -0
- package/dist/designer/data/skills/critique.d.ts +3 -0
- package/dist/designer/data/skills/critique.d.ts.map +1 -0
- package/dist/designer/data/skills/critique.js +109 -0
- package/dist/designer/data/skills/critique.ts +112 -0
- package/dist/designer/data/skills/dashboard.d.ts +3 -0
- package/dist/designer/data/skills/dashboard.d.ts.map +1 -0
- package/dist/designer/data/skills/dashboard.js +165 -0
- package/dist/designer/data/skills/dashboard.ts +168 -0
- package/dist/designer/data/skills/design-brief.d.ts +3 -0
- package/dist/designer/data/skills/design-brief.d.ts.map +1 -0
- package/dist/designer/data/skills/design-brief.js +141 -0
- package/dist/designer/data/skills/design-brief.ts +144 -0
- package/dist/designer/data/skills/design-skill.d.ts +10 -0
- package/dist/designer/data/skills/design-skill.d.ts.map +1 -0
- package/dist/designer/data/skills/design-skill.js +1 -0
- package/dist/designer/data/skills/design-skill.ts +9 -0
- package/dist/designer/data/skills/docs-page.d.ts +3 -0
- package/dist/designer/data/skills/docs-page.d.ts.map +1 -0
- package/dist/designer/data/skills/docs-page.js +68 -0
- package/dist/designer/data/skills/docs-page.ts +71 -0
- package/dist/designer/data/skills/index.d.ts +3 -0
- package/dist/designer/data/skills/index.d.ts.map +1 -0
- package/dist/designer/data/skills/index.js +28 -0
- package/dist/designer/data/skills/index.ts +30 -0
- package/dist/designer/data/skills/magazine-poster.d.ts +3 -0
- package/dist/designer/data/skills/magazine-poster.d.ts.map +1 -0
- package/dist/designer/data/skills/magazine-poster.js +70 -0
- package/dist/designer/data/skills/magazine-poster.ts +73 -0
- package/dist/designer/data/skills/mobile-app.d.ts +3 -0
- package/dist/designer/data/skills/mobile-app.d.ts.map +1 -0
- package/dist/designer/data/skills/mobile-app.js +229 -0
- package/dist/designer/data/skills/mobile-app.ts +232 -0
- package/dist/designer/data/skills/motion-frames.d.ts +3 -0
- package/dist/designer/data/skills/motion-frames.d.ts.map +1 -0
- package/dist/designer/data/skills/motion-frames.js +121 -0
- package/dist/designer/data/skills/motion-frames.ts +124 -0
- package/dist/designer/data/skills/pricing-page.d.ts +3 -0
- package/dist/designer/data/skills/pricing-page.d.ts.map +1 -0
- package/dist/designer/data/skills/pricing-page.js +76 -0
- package/dist/designer/data/skills/pricing-page.ts +79 -0
- package/dist/designer/data/skills/saas-landing.d.ts +3 -0
- package/dist/designer/data/skills/saas-landing.d.ts.map +1 -0
- package/dist/designer/data/skills/saas-landing.js +71 -0
- package/dist/designer/data/skills/saas-landing.ts +74 -0
- package/dist/designer/data/skills/slide-deck.d.ts +3 -0
- package/dist/designer/data/skills/slide-deck.d.ts.map +1 -0
- package/dist/designer/data/skills/slide-deck.js +213 -0
- package/dist/designer/data/skills/slide-deck.ts +216 -0
- package/dist/designer/data/skills/social-carousel.d.ts +3 -0
- package/dist/designer/data/skills/social-carousel.d.ts.map +1 -0
- package/dist/designer/data/skills/social-carousel.js +135 -0
- package/dist/designer/data/skills/social-carousel.ts +138 -0
- package/dist/designer/data/skills/web-prototype.d.ts +3 -0
- package/dist/designer/data/skills/web-prototype.d.ts.map +1 -0
- package/dist/designer/data/skills/web-prototype.js +159 -0
- package/dist/designer/data/skills/web-prototype.ts +162 -0
- package/dist/designer/skills.d.ts +4 -10
- package/dist/designer/skills.d.ts.map +1 -1
- package/dist/designer/skills.js +2 -1643
- package/dist/extensions/logic-trace.d.ts +1 -1
- package/dist/extensions/logic-trace.d.ts.map +1 -1
- package/dist/extensions/logic-trace.js +199 -70
- package/dist/extensions/video-generation/index.d.ts +3 -0
- package/dist/extensions/video-generation/index.d.ts.map +1 -0
- package/dist/extensions/video-generation/index.js +299 -0
- package/dist/extensions/wizard/index.js +9 -1
- package/dist/generated/parser/ast/nodes.d.ts +115 -0
- package/dist/generated/parser/ast/nodes.d.ts.map +1 -0
- package/dist/generated/parser/ast/nodes.js +8 -0
- package/dist/generated/parser/lexer/lexer.d.ts +28 -0
- package/dist/generated/parser/lexer/lexer.d.ts.map +1 -0
- package/dist/generated/parser/{lexer.js → lexer/lexer.js} +1 -180
- package/dist/generated/parser/{lexer.d.ts → lexer/tokens.d.ts} +5 -24
- package/dist/generated/parser/lexer/tokens.d.ts.map +1 -0
- package/dist/generated/parser/lexer/tokens.js +187 -0
- package/dist/generated/parser/mod.d.ts +5 -7
- package/dist/generated/parser/mod.d.ts.map +1 -1
- package/dist/generated/parser/mod.js +2 -1
- package/dist/generated/parser/parser/cursor.d.ts +47 -0
- package/dist/generated/parser/parser/cursor.d.ts.map +1 -0
- package/dist/generated/parser/parser/cursor.js +12 -0
- package/dist/generated/parser/parser/definitions.d.ts +16 -0
- package/dist/generated/parser/parser/definitions.d.ts.map +1 -0
- package/dist/generated/parser/parser/definitions.js +353 -0
- package/dist/generated/parser/parser/expressions.d.ts +17 -0
- package/dist/generated/parser/parser/expressions.d.ts.map +1 -0
- package/dist/generated/parser/parser/expressions.js +165 -0
- package/dist/generated/parser/parser.d.ts +18 -133
- package/dist/generated/parser/parser.d.ts.map +1 -1
- package/dist/generated/parser/parser.js +9 -505
- package/dist/generated/parser/tokenizer.d.ts +1 -2
- package/dist/generated/parser/tokenizer.d.ts.map +1 -1
- package/dist/generated/parser/tokenizer.js +2 -1
- package/dist/generated/parser/validator.d.ts +1 -1
- package/dist/generated/parser/validator.d.ts.map +1 -1
- package/dist/generated/zeus/const.d.ts.map +1 -1
- package/dist/generated/zeus/const.js +30 -0
- package/dist/generated/zeus/index.d.ts +140 -0
- package/dist/generated/zeus/index.d.ts.map +1 -1
- package/dist/generated/zeus/index.js +5 -0
- package/dist/mcp/glimpse-ui.js +9 -1
- package/dist/relay/dispatcher.d.ts +23 -104
- package/dist/relay/dispatcher.d.ts.map +1 -1
- package/dist/relay/dispatcher.js +21 -1130
- package/dist/relay/rest.d.ts +31 -0
- package/dist/relay/rest.d.ts.map +1 -0
- package/dist/relay/rest.js +85 -0
- package/dist/relay/routing.d.ts +109 -0
- package/dist/relay/routing.d.ts.map +1 -0
- package/dist/relay/routing.js +669 -0
- package/dist/relay/wizard-login.d.ts +17 -0
- package/dist/relay/wizard-login.d.ts.map +1 -0
- package/dist/relay/wizard-login.js +419 -0
- package/dist/sdk/agent-core/agent-loop.d.ts +2 -9
- package/dist/sdk/agent-core/agent-loop.d.ts.map +1 -1
- package/dist/sdk/agent-core/agent-loop.js +17 -291
- package/dist/sdk/agent-core/agent.d.ts +11 -4
- package/dist/sdk/agent-core/agent.d.ts.map +1 -1
- package/dist/sdk/agent-core/agent.js +16 -4
- package/dist/sdk/agent-core/tool-call-registry.d.ts +75 -0
- package/dist/sdk/agent-core/tool-call-registry.d.ts.map +1 -0
- package/dist/sdk/agent-core/tool-call-registry.js +131 -0
- package/dist/sdk/agent-core/tool-execution.d.ts +33 -0
- package/dist/sdk/agent-core/tool-execution.d.ts.map +1 -0
- package/dist/sdk/agent-core/tool-execution.js +399 -0
- package/dist/sdk/agent-core/types.d.ts +15 -4
- package/dist/sdk/agent-core/types.d.ts.map +1 -1
- package/dist/sdk/ai/env-api-keys.js +9 -1
- package/dist/sdk/ai/index.d.ts +3 -0
- package/dist/sdk/ai/index.d.ts.map +1 -1
- package/dist/sdk/ai/index.js +3 -0
- package/dist/sdk/ai/providers/faux.d.ts.map +1 -1
- package/dist/sdk/ai/providers/faux.js +3 -0
- package/dist/sdk/ai/providers/leaked-tool-call-parser.d.ts +39 -6
- package/dist/sdk/ai/providers/leaked-tool-call-parser.d.ts.map +1 -1
- package/dist/sdk/ai/providers/leaked-tool-call-parser.js +159 -18
- package/dist/sdk/ai/providers/openai/reasoning-replay.d.ts +48 -0
- package/dist/sdk/ai/providers/openai/reasoning-replay.d.ts.map +1 -0
- package/dist/sdk/ai/providers/openai/reasoning-replay.js +209 -0
- package/dist/sdk/ai/providers/openai-completions.d.ts.map +1 -1
- package/dist/sdk/ai/providers/openai-completions.js +23 -211
- package/dist/sdk/ai/providers/openrouter-videos.d.ts +3 -0
- package/dist/sdk/ai/providers/openrouter-videos.d.ts.map +1 -0
- package/dist/sdk/ai/providers/openrouter-videos.js +412 -0
- package/dist/sdk/ai/providers/register-builtins.d.ts.map +1 -1
- package/dist/sdk/ai/providers/register-builtins.js +6 -0
- package/dist/sdk/ai/providers/simple-options.d.ts +1 -6
- package/dist/sdk/ai/providers/simple-options.d.ts.map +1 -1
- package/dist/sdk/ai/providers/simple-options.js +0 -22
- package/dist/sdk/ai/providers/transform-messages.d.ts.map +1 -1
- package/dist/sdk/ai/providers/transform-messages.js +52 -1
- package/dist/sdk/ai/types.d.ts +91 -10
- package/dist/sdk/ai/types.d.ts.map +1 -1
- package/dist/sdk/ai/video-models.d.ts +10 -0
- package/dist/sdk/ai/video-models.d.ts.map +1 -0
- package/dist/sdk/ai/video-models.generated.d.ts +440 -0
- package/dist/sdk/ai/video-models.generated.d.ts.map +1 -0
- package/dist/sdk/ai/video-models.generated.js +441 -0
- package/dist/sdk/ai/video-models.js +22 -0
- package/dist/sdk/ai/videos-api-registry.d.ts +14 -0
- package/dist/sdk/ai/videos-api-registry.d.ts.map +1 -0
- package/dist/sdk/ai/videos-api-registry.js +21 -0
- package/dist/sdk/ai/videos.d.ts +4 -0
- package/dist/sdk/ai/videos.d.ts.map +1 -0
- package/dist/sdk/ai/videos.js +13 -0
- package/dist/sdk/coding-agent/core/agent-session.d.ts +8 -0
- package/dist/sdk/coding-agent/core/agent-session.d.ts.map +1 -1
- package/dist/sdk/coding-agent/core/agent-session.js +11 -0
- package/dist/sdk/coding-agent/core/compaction/compaction.d.ts +6 -118
- package/dist/sdk/coding-agent/core/compaction/compaction.d.ts.map +1 -1
- package/dist/sdk/coding-agent/core/compaction/compaction.js +11 -733
- package/dist/sdk/coding-agent/core/compaction/cut-points.d.ts +58 -0
- package/dist/sdk/coding-agent/core/compaction/cut-points.d.ts.map +1 -0
- package/dist/sdk/coding-agent/core/compaction/cut-points.js +191 -0
- package/dist/sdk/coding-agent/core/compaction/dedupe.d.ts +28 -0
- package/dist/sdk/coding-agent/core/compaction/dedupe.d.ts.map +1 -0
- package/dist/sdk/coding-agent/core/compaction/dedupe.js +156 -0
- package/dist/sdk/coding-agent/core/compaction/summarize.d.ts +21 -0
- package/dist/sdk/coding-agent/core/compaction/summarize.d.ts.map +1 -0
- package/dist/sdk/coding-agent/core/compaction/summarize.js +181 -0
- package/dist/sdk/coding-agent/core/compaction/tokens.d.ts +47 -0
- package/dist/sdk/coding-agent/core/compaction/tokens.d.ts.map +1 -0
- package/dist/sdk/coding-agent/core/compaction/tokens.js +224 -0
- package/dist/sdk/coding-agent/core/extensions/loader.d.ts.map +1 -1
- package/dist/sdk/coding-agent/core/extensions/loader.js +14 -0
- package/dist/sdk/coding-agent/core/extensions/native-extensions.d.ts +26 -0
- package/dist/sdk/coding-agent/core/extensions/native-extensions.d.ts.map +1 -1
- package/dist/sdk/coding-agent/core/extensions/native-extensions.js +23 -0
- package/dist/sdk/coding-agent/core/extensions/session-events.d.ts +157 -0
- package/dist/sdk/coding-agent/core/extensions/session-events.d.ts.map +1 -0
- package/dist/sdk/coding-agent/core/extensions/session-events.js +13 -0
- package/dist/sdk/coding-agent/core/extensions/types.d.ts +10 -367
- package/dist/sdk/coding-agent/core/extensions/types.d.ts.map +1 -1
- package/dist/sdk/coding-agent/core/extensions/types.js +2 -10
- package/dist/sdk/coding-agent/core/extensions/ui-types.d.ts +219 -0
- package/dist/sdk/coding-agent/core/extensions/ui-types.d.ts.map +1 -0
- package/dist/sdk/coding-agent/core/extensions/ui-types.js +4 -0
- package/dist/sdk/coding-agent/core/messages.d.ts.map +1 -1
- package/dist/sdk/coding-agent/core/messages.js +42 -2
- package/dist/sdk/coding-agent/core/package/default-package-manager.d.ts +115 -0
- package/dist/sdk/coding-agent/core/package/default-package-manager.d.ts.map +1 -0
- package/dist/sdk/coding-agent/core/package/default-package-manager.js +1184 -0
- package/dist/sdk/coding-agent/core/package/discovery.d.ts +20 -0
- package/dist/sdk/coding-agent/core/package/discovery.d.ts.map +1 -0
- package/dist/sdk/coding-agent/core/package/discovery.js +283 -0
- package/dist/sdk/coding-agent/core/package/ignore.d.ts +29 -0
- package/dist/sdk/coding-agent/core/package/ignore.d.ts.map +1 -0
- package/dist/sdk/coding-agent/core/package/ignore.js +235 -0
- package/dist/sdk/coding-agent/core/package/types.d.ts +128 -0
- package/dist/sdk/coding-agent/core/package/types.d.ts.map +1 -0
- package/dist/sdk/coding-agent/core/package/types.js +18 -0
- package/dist/sdk/coding-agent/core/package/update-check.d.ts +43 -0
- package/dist/sdk/coding-agent/core/package/update-check.d.ts.map +1 -0
- package/dist/sdk/coding-agent/core/package/update-check.js +253 -0
- package/dist/sdk/coding-agent/core/package-manager.d.ts +2 -188
- package/dist/sdk/coding-agent/core/package-manager.d.ts.map +1 -1
- package/dist/sdk/coding-agent/core/package-manager.js +1 -1940
- package/dist/sdk/coding-agent/core/resource-loader.d.ts +11 -0
- package/dist/sdk/coding-agent/core/resource-loader.d.ts.map +1 -1
- package/dist/sdk/coding-agent/core/resource-loader.js +23 -6
- package/dist/sdk/coding-agent/core/sdk.d.ts +24 -2
- package/dist/sdk/coding-agent/core/sdk.d.ts.map +1 -1
- package/dist/sdk/coding-agent/core/sdk.js +15 -3
- package/dist/sdk/coding-agent/core/session/migrate.d.ts +18 -0
- package/dist/sdk/coding-agent/core/session/migrate.d.ts.map +1 -0
- package/dist/sdk/coding-agent/core/session/migrate.js +78 -0
- package/dist/sdk/coding-agent/core/session/types.d.ts +165 -0
- package/dist/sdk/coding-agent/core/session/types.d.ts.map +1 -0
- package/dist/sdk/coding-agent/core/session/types.js +4 -0
- package/dist/sdk/coding-agent/core/session-manager.d.ts +3 -161
- package/dist/sdk/coding-agent/core/session-manager.d.ts.map +1 -1
- package/dist/sdk/coding-agent/core/session-manager.js +4 -72
- package/dist/sdk/coding-agent/core/settings-manager.d.ts +0 -8
- package/dist/sdk/coding-agent/core/settings-manager.d.ts.map +1 -1
- package/dist/sdk/coding-agent/core/settings-manager.js +3 -3
- package/dist/sdk/coding-agent/index.d.ts +2 -2
- package/dist/sdk/coding-agent/index.d.ts.map +1 -1
- package/dist/sdk/coding-agent/index.js +1 -1
- package/dist/sdk-public.d.ts +96 -0
- package/dist/sdk-public.d.ts.map +1 -0
- package/dist/sdk-public.js +109 -0
- package/dist/server/agent-bridge/rehydrate.d.ts +2 -2
- package/dist/server/agent-bridge/rehydrate.d.ts.map +1 -1
- package/dist/server/agent-bridge/rehydrate.js +14 -0
- package/dist/server/agent-bridge.d.ts +8 -2
- package/dist/server/agent-bridge.d.ts.map +1 -1
- package/dist/server/agent-bridge.js +25 -2
- package/dist/server/session-stream.d.ts +19 -0
- package/dist/server/session-stream.d.ts.map +1 -1
- package/dist/server/session-stream.js +35 -0
- package/dist/server/wire.d.ts +13 -0
- package/dist/server/wire.d.ts.map +1 -1
- package/package.json +8 -2
- package/dist/generated/parser/lexer.d.ts.map +0 -1
package/dist/sdk/ai/index.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ export * from "./providers/register-builtins.js";
|
|
|
11
11
|
export * from "./session-resources.js";
|
|
12
12
|
export * from "./stream.js";
|
|
13
13
|
export * from "./types.js";
|
|
14
|
+
export * from "./video-models.js";
|
|
14
15
|
export * from "./utils/diagnostics.js";
|
|
15
16
|
export * from "./utils/event-stream.js";
|
|
16
17
|
export * from "./utils/json-parse.js";
|
|
@@ -20,4 +21,6 @@ export * from "./utils/rate-limit-retry.js";
|
|
|
20
21
|
export * from "./utils/transient-error.js";
|
|
21
22
|
export * from "./utils/typebox-helpers.js";
|
|
22
23
|
export * from "./utils/validation.js";
|
|
24
|
+
export * from "./videos.js";
|
|
25
|
+
export * from "./videos-api-registry.js";
|
|
23
26
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/sdk/ai/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAE/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,0BAA0B,CAAC;AACzC,cAAc,aAAa,CAAC;AAC5B,cAAc,qBAAqB,CAAC;AACpC,cAAc,kCAAkC,CAAC;AACjD,cAAc,wBAAwB,CAAC;AACvC,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,YAAY,EACX,aAAa,EACb,gBAAgB,EAChB,mBAAmB,EACnB,mBAAmB,EACnB,WAAW,EACX,aAAa,EACb,eAAe,EACf,iBAAiB,EACjB,sBAAsB,EACtB,iBAAiB,EACjB,iBAAiB,GACjB,MAAM,wBAAwB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,uBAAuB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/sdk/ai/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAE/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,0BAA0B,CAAC;AACzC,cAAc,aAAa,CAAC;AAC5B,cAAc,qBAAqB,CAAC;AACpC,cAAc,kCAAkC,CAAC;AACjD,cAAc,wBAAwB,CAAC;AACvC,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,YAAY,EACX,aAAa,EACb,gBAAgB,EAChB,mBAAmB,EACnB,mBAAmB,EACnB,WAAW,EACX,aAAa,EACb,eAAe,EACf,iBAAiB,EACjB,sBAAsB,EACtB,iBAAiB,EACjB,iBAAiB,GACjB,MAAM,wBAAwB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,uBAAuB,CAAC;AACtC,cAAc,aAAa,CAAC;AAC5B,cAAc,0BAA0B,CAAC"}
|
package/dist/sdk/ai/index.js
CHANGED
|
@@ -10,6 +10,7 @@ export * from "./providers/register-builtins.js";
|
|
|
10
10
|
export * from "./session-resources.js";
|
|
11
11
|
export * from "./stream.js";
|
|
12
12
|
export * from "./types.js";
|
|
13
|
+
export * from "./video-models.js";
|
|
13
14
|
export * from "./utils/diagnostics.js";
|
|
14
15
|
export * from "./utils/event-stream.js";
|
|
15
16
|
export * from "./utils/json-parse.js";
|
|
@@ -18,3 +19,5 @@ export * from "./utils/rate-limit-retry.js";
|
|
|
18
19
|
export * from "./utils/transient-error.js";
|
|
19
20
|
export * from "./utils/typebox-helpers.js";
|
|
20
21
|
export * from "./utils/validation.js";
|
|
22
|
+
export * from "./videos.js";
|
|
23
|
+
export * from "./videos-api-registry.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"faux.d.ts","sourceRoot":"","sources":["../../../../src/sdk/ai/providers/faux.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACX,gBAAgB,EAEhB,OAAO,EAGP,KAAK,EAGL,aAAa,EACb,WAAW,EACX,eAAe,EACf,QAAQ,
|
|
1
|
+
{"version":3,"file":"faux.d.ts","sourceRoot":"","sources":["../../../../src/sdk/ai/providers/faux.ts"],"names":[],"mappings":"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"}
|
|
@@ -64,6 +64,9 @@ function contentToText(content) {
|
|
|
64
64
|
if (block.type === "text") {
|
|
65
65
|
return block.text;
|
|
66
66
|
}
|
|
67
|
+
if (block.type === "video") {
|
|
68
|
+
return `[video:${block.mimeType}:${block.url ?? `${block.data?.length ?? 0} bytes base64`}]`;
|
|
69
|
+
}
|
|
67
70
|
return `[image:${block.mimeType}:${block.data?.length ?? 0}${block.url ? `:${block.url}` : ""}]`;
|
|
68
71
|
})
|
|
69
72
|
.join("\n");
|
|
@@ -15,10 +15,22 @@
|
|
|
15
15
|
* where the wrapper tag is `function_calls` (optionally with an `antml:`
|
|
16
16
|
* namespace prefix) and invoke/parameter tags follow the same convention.
|
|
17
17
|
*
|
|
18
|
+
* Models also emit the same markup WITHOUT the wrapper — orphan
|
|
19
|
+
* `<invoke name="x">…</invoke>` blocks straight in prose (pi-style) — or
|
|
20
|
+
* truncated blocks that never receive their closing tags before the stream
|
|
21
|
+
* ends. Both shapes are recovered: orphan blocks during streaming, truncated
|
|
22
|
+
* parameter-complete tails at end of stream (see salvageLeakedToolCallTail).
|
|
23
|
+
*
|
|
18
24
|
* Everything here is pure string logic — no provider imports — so the tests
|
|
19
25
|
* cover it without any streaming harness.
|
|
20
26
|
*/
|
|
21
|
-
/**
|
|
27
|
+
/**
|
|
28
|
+
* Floor for how much tail a caller should expect a partial opener to occupy
|
|
29
|
+
* (the longest opener tag is the antml-prefixed one, 22 chars, plus margin).
|
|
30
|
+
* Partial detection anchors at the last `<` of the buffered text, so an
|
|
31
|
+
* invoke opener whose name attribute is still open can hold back more than
|
|
32
|
+
* this when the tool name is long — it is a floor, not a cap.
|
|
33
|
+
*/
|
|
22
34
|
export declare const LEAK_TAIL_LENGTH = 32;
|
|
23
35
|
export type LeakedToolCall = {
|
|
24
36
|
name: string;
|
|
@@ -26,10 +38,14 @@ export type LeakedToolCall = {
|
|
|
26
38
|
};
|
|
27
39
|
export type LeakOpenerMatch = "full" | "partial" | "none";
|
|
28
40
|
/**
|
|
29
|
-
* Locate a leaked
|
|
41
|
+
* Locate a leaked opener tag in `text` — either the wrapper
|
|
42
|
+
* (`<function_calls>`) or an orphan invoke (`<invoke name="x">`, pi-style
|
|
43
|
+
* markup emitted without the wrapper).
|
|
30
44
|
* - "full": a complete opener tag exists; `index` points at its `<`.
|
|
31
|
-
* - "partial": the text ENDS
|
|
32
|
-
*
|
|
45
|
+
* - "partial": the text ENDS mid-opener (an opener split across streaming
|
|
46
|
+
* deltas); `index` points at the start of that tail. A partial always
|
|
47
|
+
* starts at the last `<` — the tail matcher admits no further `<` — so the
|
|
48
|
+
* scan is a single anchored match there instead of a prefix enumeration.
|
|
33
49
|
* - "none": no opener, complete or partial.
|
|
34
50
|
*/
|
|
35
51
|
export declare function findLeakedToolCallOpener(text: string): {
|
|
@@ -45,8 +61,12 @@ export declare function findLeakedToolCallOpener(text: string): {
|
|
|
45
61
|
* before + after). `consumed` is the raw block text (opener→closer
|
|
46
62
|
* inclusive) so callers can fall back to emitting it as text when the
|
|
47
63
|
* parsed tool names turn out to be unknown.
|
|
48
|
-
*
|
|
49
|
-
*
|
|
64
|
+
* When no wrapper opener exists at all, orphan invoke blocks (pi-style, no
|
|
65
|
+
* wrapper) are parsed instead — but only when EVERY invoke opener has a
|
|
66
|
+
* matching closer; otherwise `complete: false` and `remaining`/`consumed`
|
|
67
|
+
* echo the input so nothing is cut prematurely. (A wrapper opener blocks the
|
|
68
|
+
* orphan path: wrapper-less invokes around a wrapper block are picked up
|
|
69
|
+
* later from `remaining`, once the wrapper block itself is consumed.)
|
|
50
70
|
*/
|
|
51
71
|
export declare function extractLeakedToolCalls(text: string): {
|
|
52
72
|
calls: LeakedToolCall[];
|
|
@@ -54,6 +74,19 @@ export declare function extractLeakedToolCalls(text: string): {
|
|
|
54
74
|
remaining: string;
|
|
55
75
|
consumed: string;
|
|
56
76
|
};
|
|
77
|
+
/**
|
|
78
|
+
* End-of-stream recovery for a leaked buffer that never received its closing
|
|
79
|
+
* tags (stream cut off, or a model that forgets `</invoke>` / the wrapper
|
|
80
|
+
* closer). Parses invoke blocks tolerantly: a missing closer is fine as long
|
|
81
|
+
* as every `<parameter>` value is fully closed. A truncated parameter value
|
|
82
|
+
* means the model was cut mid-argument — guessing at the value is unsafe, so
|
|
83
|
+
* the whole tail degrades to plain text (null).
|
|
84
|
+
*
|
|
85
|
+
* Returns the parsed calls (leading wrapper skeleton dropped), or null when
|
|
86
|
+
* nothing salvageable remains. Callers still validate tool names before
|
|
87
|
+
* emitting synthetic tool calls.
|
|
88
|
+
*/
|
|
89
|
+
export declare function salvageLeakedToolCallTail(text: string): LeakedToolCall[] | null;
|
|
57
90
|
/**
|
|
58
91
|
* Coerce a leaked parameter string into a JSON value when it clearly parses
|
|
59
92
|
* as one — native `tool_calls` arguments are real JSON, so a leaked
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"leaked-tool-call-parser.d.ts","sourceRoot":"","sources":["../../../../src/sdk/ai/providers/leaked-tool-call-parser.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"leaked-tool-call-parser.d.ts","sourceRoot":"","sources":["../../../../src/sdk/ai/providers/leaked-tool-call-parser.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAoBH;;;;;;GAMG;AACH,eAAO,MAAM,gBAAgB,KAAK,CAAC;AAEnC,MAAM,MAAM,cAAc,GAAG;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC7B,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,SAAS,GAAG,MAAM,CAAC;AAgC1D;;;;;;;;;;GAUG;AACH,wBAAgB,wBAAwB,CACvC,IAAI,EAAE,MAAM,GACV;IAAE,KAAK,EAAE,eAAe,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAuB3C;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,GAAG;IACrD,KAAK,EAAE,cAAc,EAAE,CAAC;IACxB,QAAQ,EAAE,OAAO,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;CACjB,CAoCA;AAoDD;;;;;;;;;;;GAWG;AACH,wBAAgB,yBAAyB,CACxC,IAAI,EAAE,MAAM,GACV,cAAc,EAAE,GAAG,IAAI,CAuCzB;AAED;;;;;GAKG;AACH,wBAAgB,0BAA0B,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAW/D"}
|
|
@@ -15,6 +15,12 @@
|
|
|
15
15
|
* where the wrapper tag is `function_calls` (optionally with an `antml:`
|
|
16
16
|
* namespace prefix) and invoke/parameter tags follow the same convention.
|
|
17
17
|
*
|
|
18
|
+
* Models also emit the same markup WITHOUT the wrapper — orphan
|
|
19
|
+
* `<invoke name="x">…</invoke>` blocks straight in prose (pi-style) — or
|
|
20
|
+
* truncated blocks that never receive their closing tags before the stream
|
|
21
|
+
* ends. Both shapes are recovered: orphan blocks during streaming, truncated
|
|
22
|
+
* parameter-complete tails at end of stream (see salvageLeakedToolCallTail).
|
|
23
|
+
*
|
|
18
24
|
* Everything here is pure string logic — no provider imports — so the tests
|
|
19
25
|
* cover it without any streaming harness.
|
|
20
26
|
*/
|
|
@@ -22,16 +28,52 @@
|
|
|
22
28
|
const NS = "(?:antml:)?";
|
|
23
29
|
const INVOKE_RE = new RegExp(`<${NS}invoke\\s+name="([^"]*)"\\s*>([\\s\\S]*?)</${NS}invoke\\s*>`, "g");
|
|
24
30
|
const PARAMETER_RE = new RegExp(`<${NS}parameter\\s+name="([^"]*)"\\s*>([\\s\\S]*?)</${NS}parameter\\s*>`, "g");
|
|
31
|
+
const INVOKE_OPEN_RE = new RegExp(`<${NS}invoke\\s+name="([^"]*)"\\s*>`, "g");
|
|
32
|
+
const INVOKE_CLOSE_RE = new RegExp(`</${NS}invoke\\s*>`, "g");
|
|
33
|
+
const PARAMETER_OPEN_RE = new RegExp(`<${NS}parameter\\s+name="[^"]*"\\s*>`, "g");
|
|
25
34
|
const WRAPPER_OPEN_RE = /<(?:antml:)?function_calls\s*>/;
|
|
26
35
|
const WRAPPER_CLOSE = /<\/(?:antml:)?function_calls\s*>/;
|
|
27
|
-
/**
|
|
36
|
+
/**
|
|
37
|
+
* Floor for how much tail a caller should expect a partial opener to occupy
|
|
38
|
+
* (the longest opener tag is the antml-prefixed one, 22 chars, plus margin).
|
|
39
|
+
* Partial detection anchors at the last `<` of the buffered text, so an
|
|
40
|
+
* invoke opener whose name attribute is still open can hold back more than
|
|
41
|
+
* this when the tool name is long — it is a floor, not a cap.
|
|
42
|
+
*/
|
|
28
43
|
export const LEAK_TAIL_LENGTH = 32;
|
|
29
44
|
const OPENER_PREFIXES = ["<function_calls", "<antml:function_calls"];
|
|
45
|
+
const INVOKE_OPENER_PREFIXES = ['<invoke name="', '<antml:invoke name="'];
|
|
46
|
+
const escapeRegExp = (s) => s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
47
|
+
/**
|
|
48
|
+
* A buffered tail that could still grow into a leaked opener, matched
|
|
49
|
+
* (anchored) against everything from the last `<` of the buffered text:
|
|
50
|
+
* - any prefix of a wrapper/invoke opener literal, from a bare `<` up to the
|
|
51
|
+
* full declared prefix (`<function_ca`, `<invoke name="`),
|
|
52
|
+
* - an invoke opener whose double-quoted name attribute is still open
|
|
53
|
+
* (`<invoke name="bash` — the closing `">` has not arrived), however long
|
|
54
|
+
* the name is.
|
|
55
|
+
* Single-quoted names and attribute-less `<invoke>` tags never match, so
|
|
56
|
+
* ordinary prose (`a < b`, `Array<string>`) stays out of the buffer.
|
|
57
|
+
*/
|
|
58
|
+
const PARTIAL_TAIL_RE = new RegExp(`^(?:${[
|
|
59
|
+
...[...OPENER_PREFIXES, ...INVOKE_OPENER_PREFIXES].flatMap((opener) => {
|
|
60
|
+
const prefixes = [];
|
|
61
|
+
for (let size = 1; size <= opener.length; size++) {
|
|
62
|
+
prefixes.push(escapeRegExp(opener.slice(0, size)));
|
|
63
|
+
}
|
|
64
|
+
return prefixes;
|
|
65
|
+
}),
|
|
66
|
+
'<(?:antml:)?invoke\\s+name="[^">]*',
|
|
67
|
+
].join("|")})$`);
|
|
30
68
|
/**
|
|
31
|
-
* Locate a leaked
|
|
69
|
+
* Locate a leaked opener tag in `text` — either the wrapper
|
|
70
|
+
* (`<function_calls>`) or an orphan invoke (`<invoke name="x">`, pi-style
|
|
71
|
+
* markup emitted without the wrapper).
|
|
32
72
|
* - "full": a complete opener tag exists; `index` points at its `<`.
|
|
33
|
-
* - "partial": the text ENDS
|
|
34
|
-
*
|
|
73
|
+
* - "partial": the text ENDS mid-opener (an opener split across streaming
|
|
74
|
+
* deltas); `index` points at the start of that tail. A partial always
|
|
75
|
+
* starts at the last `<` — the tail matcher admits no further `<` — so the
|
|
76
|
+
* scan is a single anchored match there instead of a prefix enumeration.
|
|
35
77
|
* - "none": no opener, complete or partial.
|
|
36
78
|
*/
|
|
37
79
|
export function findLeakedToolCallOpener(text) {
|
|
@@ -46,19 +88,16 @@ export function findLeakedToolCallOpener(text) {
|
|
|
46
88
|
best = { match: "full", index: m.index };
|
|
47
89
|
}
|
|
48
90
|
}
|
|
91
|
+
for (const m of text.matchAll(INVOKE_OPEN_RE)) {
|
|
92
|
+
if (best.match !== "full" || m.index < best.index) {
|
|
93
|
+
best = { match: "full", index: m.index };
|
|
94
|
+
}
|
|
95
|
+
}
|
|
49
96
|
if (best.match === "full")
|
|
50
97
|
return best;
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
if (text.endsWith(opener.slice(0, size))) {
|
|
55
|
-
const index = text.length - size;
|
|
56
|
-
if (best.match === "none" || index < best.index) {
|
|
57
|
-
best = { match: "partial", index };
|
|
58
|
-
}
|
|
59
|
-
break;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
98
|
+
const lastLt = text.lastIndexOf("<");
|
|
99
|
+
if (lastLt >= 0 && PARTIAL_TAIL_RE.test(text.slice(lastLt))) {
|
|
100
|
+
best = { match: "partial", index: lastLt };
|
|
62
101
|
}
|
|
63
102
|
return best;
|
|
64
103
|
}
|
|
@@ -71,13 +110,17 @@ export function findLeakedToolCallOpener(text) {
|
|
|
71
110
|
* before + after). `consumed` is the raw block text (opener→closer
|
|
72
111
|
* inclusive) so callers can fall back to emitting it as text when the
|
|
73
112
|
* parsed tool names turn out to be unknown.
|
|
74
|
-
*
|
|
75
|
-
*
|
|
113
|
+
* When no wrapper opener exists at all, orphan invoke blocks (pi-style, no
|
|
114
|
+
* wrapper) are parsed instead — but only when EVERY invoke opener has a
|
|
115
|
+
* matching closer; otherwise `complete: false` and `remaining`/`consumed`
|
|
116
|
+
* echo the input so nothing is cut prematurely. (A wrapper opener blocks the
|
|
117
|
+
* orphan path: wrapper-less invokes around a wrapper block are picked up
|
|
118
|
+
* later from `remaining`, once the wrapper block itself is consumed.)
|
|
76
119
|
*/
|
|
77
120
|
export function extractLeakedToolCalls(text) {
|
|
78
121
|
const openMatch = WRAPPER_OPEN_RE.exec(text);
|
|
79
122
|
if (!openMatch) {
|
|
80
|
-
return
|
|
123
|
+
return extractOrphanInvokes(text);
|
|
81
124
|
}
|
|
82
125
|
const openStart = openMatch.index;
|
|
83
126
|
const bodyStart = openStart + openMatch[0].length;
|
|
@@ -112,6 +155,104 @@ export function extractLeakedToolCalls(text) {
|
|
|
112
155
|
remaining: text.slice(0, openStart) + text.slice(closeEnd + 1),
|
|
113
156
|
};
|
|
114
157
|
}
|
|
158
|
+
/**
|
|
159
|
+
* Orphan invoke blocks: pi-style markup without any wrapper tag. Complete
|
|
160
|
+
* only when EVERY invoke opener has a matching closer; otherwise nothing is
|
|
161
|
+
* cut and the caller keeps buffering. `consumed` spans the first opener
|
|
162
|
+
* through the last closer (prose between invokes inside the parsed region is
|
|
163
|
+
* dropped, mirroring the wrapper path) and `remaining` echoes the prose
|
|
164
|
+
* before and after.
|
|
165
|
+
*/
|
|
166
|
+
function extractOrphanInvokes(text) {
|
|
167
|
+
const opens = [...text.matchAll(INVOKE_OPEN_RE)];
|
|
168
|
+
if (opens.length === 0) {
|
|
169
|
+
return { calls: [], complete: false, remaining: text, consumed: "" };
|
|
170
|
+
}
|
|
171
|
+
const closes = [...text.matchAll(INVOKE_CLOSE_RE)];
|
|
172
|
+
let closerPtr = 0;
|
|
173
|
+
const calls = [];
|
|
174
|
+
let firstOpen = -1;
|
|
175
|
+
let lastCloseEnd = -1;
|
|
176
|
+
for (const open of opens) {
|
|
177
|
+
const openStart = open.index;
|
|
178
|
+
if (firstOpen === -1)
|
|
179
|
+
firstOpen = openStart;
|
|
180
|
+
while (closerPtr < closes.length && closes[closerPtr].index < openStart) {
|
|
181
|
+
closerPtr++;
|
|
182
|
+
}
|
|
183
|
+
const closer = closes[closerPtr];
|
|
184
|
+
if (!closer) {
|
|
185
|
+
return { calls: [], complete: false, remaining: text, consumed: "" };
|
|
186
|
+
}
|
|
187
|
+
const body = text.slice(openStart + open[0].length, closer.index);
|
|
188
|
+
const args = {};
|
|
189
|
+
for (const p of body.matchAll(PARAMETER_RE)) {
|
|
190
|
+
args[p[1]] = p[2].trim();
|
|
191
|
+
}
|
|
192
|
+
calls.push({ name: open[1], args });
|
|
193
|
+
closerPtr++;
|
|
194
|
+
lastCloseEnd = closer.index + closer[0].length;
|
|
195
|
+
}
|
|
196
|
+
return {
|
|
197
|
+
calls,
|
|
198
|
+
complete: true,
|
|
199
|
+
consumed: text.slice(firstOpen, lastCloseEnd),
|
|
200
|
+
remaining: text.slice(0, firstOpen) + text.slice(lastCloseEnd),
|
|
201
|
+
};
|
|
202
|
+
}
|
|
203
|
+
/**
|
|
204
|
+
* End-of-stream recovery for a leaked buffer that never received its closing
|
|
205
|
+
* tags (stream cut off, or a model that forgets `</invoke>` / the wrapper
|
|
206
|
+
* closer). Parses invoke blocks tolerantly: a missing closer is fine as long
|
|
207
|
+
* as every `<parameter>` value is fully closed. A truncated parameter value
|
|
208
|
+
* means the model was cut mid-argument — guessing at the value is unsafe, so
|
|
209
|
+
* the whole tail degrades to plain text (null).
|
|
210
|
+
*
|
|
211
|
+
* Returns the parsed calls (leading wrapper skeleton dropped), or null when
|
|
212
|
+
* nothing salvageable remains. Callers still validate tool names before
|
|
213
|
+
* emitting synthetic tool calls.
|
|
214
|
+
*/
|
|
215
|
+
export function salvageLeakedToolCallTail(text) {
|
|
216
|
+
const opens = [...text.matchAll(INVOKE_OPEN_RE)];
|
|
217
|
+
if (opens.length === 0)
|
|
218
|
+
return null;
|
|
219
|
+
const closes = [...text.matchAll(INVOKE_CLOSE_RE)];
|
|
220
|
+
const calls = [];
|
|
221
|
+
let closerPtr = 0;
|
|
222
|
+
for (let i = 0; i < opens.length; i++) {
|
|
223
|
+
const open = opens[i];
|
|
224
|
+
const openStart = open.index;
|
|
225
|
+
while (closerPtr < closes.length && closes[closerPtr].index < openStart) {
|
|
226
|
+
closerPtr++;
|
|
227
|
+
}
|
|
228
|
+
const closer = closes[closerPtr];
|
|
229
|
+
const nextOpen = opens[i + 1];
|
|
230
|
+
let bodyEnd;
|
|
231
|
+
if (closer && (!nextOpen || closer.index < nextOpen.index)) {
|
|
232
|
+
bodyEnd = closer.index;
|
|
233
|
+
closerPtr++;
|
|
234
|
+
}
|
|
235
|
+
else if (nextOpen) {
|
|
236
|
+
// Unclosed invoke whose body runs up to the next opener.
|
|
237
|
+
bodyEnd = nextOpen.index;
|
|
238
|
+
}
|
|
239
|
+
else {
|
|
240
|
+
bodyEnd = text.length;
|
|
241
|
+
}
|
|
242
|
+
const body = text.slice(openStart + open[0].length, bodyEnd);
|
|
243
|
+
const args = {};
|
|
244
|
+
for (const p of body.matchAll(PARAMETER_RE)) {
|
|
245
|
+
args[p[1]] = p[2].trim();
|
|
246
|
+
}
|
|
247
|
+
const paramOpeners = [...body.matchAll(PARAMETER_OPEN_RE)];
|
|
248
|
+
if (paramOpeners.length > 0 &&
|
|
249
|
+
paramOpeners.length !== [...body.matchAll(PARAMETER_RE)].length) {
|
|
250
|
+
return null;
|
|
251
|
+
}
|
|
252
|
+
calls.push({ name: open[1], args });
|
|
253
|
+
}
|
|
254
|
+
return calls;
|
|
255
|
+
}
|
|
115
256
|
/**
|
|
116
257
|
* Coerce a leaked parameter string into a JSON value when it clearly parses
|
|
117
258
|
* as one — native `tool_calls` arguments are real JSON, so a leaked
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { ChatCompletionAssistantMessageParam } from "openai/resources/chat/completions.js";
|
|
2
|
+
import type { Model, ThinkingContent } from "../../types.js";
|
|
3
|
+
/**
|
|
4
|
+
* Reasoning sidecars and replay metadata helpers for OpenAI-compatible
|
|
5
|
+
* providers. Handles extracting reasoning deltas/signatures/metadata from
|
|
6
|
+
* provider payloads, safe reasoning replay fields, Responses-style reasoning
|
|
7
|
+
* sidecar messages, and inline <think> tag splitting.
|
|
8
|
+
*/
|
|
9
|
+
export declare const SAFE_REASONING_REPLAY_FIELDS: readonly ["reasoning_content", "reasoning", "reasoning_text", "reasoning_summary", "reasoning_summary_text", "summary_text", "summary"];
|
|
10
|
+
export type SafeReasoningReplayField = (typeof SAFE_REASONING_REPLAY_FIELDS)[number];
|
|
11
|
+
export interface ResponsesReasoningSidecar {
|
|
12
|
+
id?: string;
|
|
13
|
+
item_id?: string;
|
|
14
|
+
output_index?: number;
|
|
15
|
+
summary_index?: number;
|
|
16
|
+
encrypted_content?: string;
|
|
17
|
+
}
|
|
18
|
+
export type ChatCompletionAssistantMessageWithReasoningSidecars = ChatCompletionAssistantMessageParam & Partial<Record<SafeReasoningReplayField, string>> & {
|
|
19
|
+
reasoning_start?: ResponsesReasoningSidecar;
|
|
20
|
+
reasoning_end?: ResponsesReasoningSidecar;
|
|
21
|
+
};
|
|
22
|
+
export declare function asRecord(value: unknown): Record<string, unknown> | undefined;
|
|
23
|
+
export declare function collectReasoningText(value: unknown): string;
|
|
24
|
+
export declare function extractReasoningDelta(deltaFields: Record<string, unknown>): {
|
|
25
|
+
field: string;
|
|
26
|
+
delta: string;
|
|
27
|
+
} | undefined;
|
|
28
|
+
export declare function extractReasoningSignature(value: unknown): string | undefined;
|
|
29
|
+
export declare function extractReasoningMetadata(value: unknown): Record<string, unknown> | undefined;
|
|
30
|
+
export declare function stringMetadata(metadata: Record<string, unknown> | undefined, key: string): string | undefined;
|
|
31
|
+
export declare function numberMetadata(metadata: Record<string, unknown> | undefined, key: string): number | undefined;
|
|
32
|
+
export declare function hasEncryptedReasoningMetadata(block: ThinkingContent): boolean;
|
|
33
|
+
export declare function buildResponsesReasoningSidecar(metadata: Record<string, unknown> | undefined, includeOutputIndex: boolean): ResponsesReasoningSidecar;
|
|
34
|
+
export declare function isSafeReasoningReplayField(field: string): field is SafeReasoningReplayField;
|
|
35
|
+
export declare function normalizeReasoningReplayField(field: string | undefined, model: Model<"openai-completions">): SafeReasoningReplayField;
|
|
36
|
+
export declare function setAssistantReasoningField(message: ChatCompletionAssistantMessageParam, field: SafeReasoningReplayField, value: string): void;
|
|
37
|
+
export declare function setAssistantReasoningLifecycleSidecars(message: ChatCompletionAssistantMessageParam, blocks: ThinkingContent[]): void;
|
|
38
|
+
export declare function assistantHasReasoningReplay(message: ChatCompletionAssistantMessageParam): boolean;
|
|
39
|
+
export declare function mergeThinkingMetadata(block: ThinkingContent, metadata?: Record<string, unknown>): void;
|
|
40
|
+
export declare function splitInlineThinkingDelta(pending: string, inInlineThinking: boolean, delta: string): {
|
|
41
|
+
parts: Array<{
|
|
42
|
+
type: "text" | "thinking";
|
|
43
|
+
delta: string;
|
|
44
|
+
}>;
|
|
45
|
+
pending: string;
|
|
46
|
+
inInlineThinking: boolean;
|
|
47
|
+
};
|
|
48
|
+
//# sourceMappingURL=reasoning-replay.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reasoning-replay.d.ts","sourceRoot":"","sources":["../../../../../src/sdk/ai/providers/openai/reasoning-replay.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reasoning sidecars and replay metadata helpers for OpenAI-compatible
|
|
3
|
+
* providers. Handles extracting reasoning deltas/signatures/metadata from
|
|
4
|
+
* provider payloads, safe reasoning replay fields, Responses-style reasoning
|
|
5
|
+
* sidecar messages, and inline <think> tag splitting.
|
|
6
|
+
*/
|
|
7
|
+
export const SAFE_REASONING_REPLAY_FIELDS = [
|
|
8
|
+
"reasoning_content",
|
|
9
|
+
"reasoning",
|
|
10
|
+
"reasoning_text",
|
|
11
|
+
"reasoning_summary",
|
|
12
|
+
"reasoning_summary_text",
|
|
13
|
+
"summary_text",
|
|
14
|
+
"summary",
|
|
15
|
+
];
|
|
16
|
+
export function asRecord(value) {
|
|
17
|
+
return typeof value === "object" && value !== null && !Array.isArray(value)
|
|
18
|
+
? value
|
|
19
|
+
: undefined;
|
|
20
|
+
}
|
|
21
|
+
export function collectReasoningText(value) {
|
|
22
|
+
if (typeof value === "string")
|
|
23
|
+
return value;
|
|
24
|
+
if (Array.isArray(value))
|
|
25
|
+
return value.map(collectReasoningText).join("");
|
|
26
|
+
const record = asRecord(value);
|
|
27
|
+
if (!record)
|
|
28
|
+
return "";
|
|
29
|
+
const direct = [
|
|
30
|
+
record.delta,
|
|
31
|
+
record.text,
|
|
32
|
+
record.value,
|
|
33
|
+
record.output_text,
|
|
34
|
+
record.reasoning_text,
|
|
35
|
+
record.reasoning_content,
|
|
36
|
+
record.reasoning_summary,
|
|
37
|
+
record.reasoning_summary_text,
|
|
38
|
+
record.summary_text,
|
|
39
|
+
];
|
|
40
|
+
for (const candidate of direct) {
|
|
41
|
+
if (typeof candidate === "string" && candidate.length > 0)
|
|
42
|
+
return candidate;
|
|
43
|
+
}
|
|
44
|
+
return [record.summary, record.parts, record.content, record.annotations]
|
|
45
|
+
.map(collectReasoningText)
|
|
46
|
+
.join("");
|
|
47
|
+
}
|
|
48
|
+
export function extractReasoningDelta(deltaFields) {
|
|
49
|
+
const reasoningFields = [
|
|
50
|
+
"reasoning_content",
|
|
51
|
+
"reasoning",
|
|
52
|
+
"reasoning_text",
|
|
53
|
+
"reasoning_summary",
|
|
54
|
+
"reasoning_summary_text",
|
|
55
|
+
"summary_text",
|
|
56
|
+
"summary",
|
|
57
|
+
];
|
|
58
|
+
for (const field of reasoningFields) {
|
|
59
|
+
const delta = collectReasoningText(deltaFields[field]);
|
|
60
|
+
if (delta.length > 0)
|
|
61
|
+
return { field, delta };
|
|
62
|
+
}
|
|
63
|
+
const details = collectReasoningText(deltaFields.reasoning_details);
|
|
64
|
+
return details.length > 0
|
|
65
|
+
? { field: "reasoning_details", delta: details }
|
|
66
|
+
: undefined;
|
|
67
|
+
}
|
|
68
|
+
export function extractReasoningSignature(value) {
|
|
69
|
+
if (typeof value === "string" && value.length > 0)
|
|
70
|
+
return value;
|
|
71
|
+
const record = asRecord(value);
|
|
72
|
+
if (!record)
|
|
73
|
+
return undefined;
|
|
74
|
+
for (const candidate of [
|
|
75
|
+
record.id,
|
|
76
|
+
record.item_id,
|
|
77
|
+
record.data,
|
|
78
|
+
]) {
|
|
79
|
+
if (typeof candidate === "string" && candidate.length > 0)
|
|
80
|
+
return candidate;
|
|
81
|
+
}
|
|
82
|
+
return undefined;
|
|
83
|
+
}
|
|
84
|
+
export function extractReasoningMetadata(value) {
|
|
85
|
+
const record = asRecord(value);
|
|
86
|
+
if (!record)
|
|
87
|
+
return undefined;
|
|
88
|
+
const metadata = {};
|
|
89
|
+
for (const key of [
|
|
90
|
+
"id",
|
|
91
|
+
"item_id",
|
|
92
|
+
"output_index",
|
|
93
|
+
"summary_index",
|
|
94
|
+
"encrypted_content",
|
|
95
|
+
"type",
|
|
96
|
+
]) {
|
|
97
|
+
if (record[key] !== undefined && record[key] !== null)
|
|
98
|
+
metadata[key] = record[key];
|
|
99
|
+
}
|
|
100
|
+
return Object.keys(metadata).length > 0 ? metadata : undefined;
|
|
101
|
+
}
|
|
102
|
+
export function stringMetadata(metadata, key) {
|
|
103
|
+
const value = metadata?.[key];
|
|
104
|
+
return typeof value === "string" && value.length > 0 ? value : undefined;
|
|
105
|
+
}
|
|
106
|
+
export function numberMetadata(metadata, key) {
|
|
107
|
+
const value = metadata?.[key];
|
|
108
|
+
return typeof value === "number" && Number.isFinite(value) ? value : undefined;
|
|
109
|
+
}
|
|
110
|
+
export function hasEncryptedReasoningMetadata(block) {
|
|
111
|
+
return stringMetadata(block.thinkingMetadata, "encrypted_content") !== undefined;
|
|
112
|
+
}
|
|
113
|
+
export function buildResponsesReasoningSidecar(metadata, includeOutputIndex) {
|
|
114
|
+
const sidecar = {};
|
|
115
|
+
const id = stringMetadata(metadata, "id");
|
|
116
|
+
if (id)
|
|
117
|
+
sidecar.id = id;
|
|
118
|
+
const itemId = stringMetadata(metadata, "item_id");
|
|
119
|
+
if (itemId)
|
|
120
|
+
sidecar.item_id = itemId;
|
|
121
|
+
if (includeOutputIndex) {
|
|
122
|
+
const outputIndex = numberMetadata(metadata, "output_index");
|
|
123
|
+
if (outputIndex !== undefined)
|
|
124
|
+
sidecar.output_index = outputIndex;
|
|
125
|
+
const summaryIndex = numberMetadata(metadata, "summary_index");
|
|
126
|
+
if (summaryIndex !== undefined)
|
|
127
|
+
sidecar.summary_index = summaryIndex;
|
|
128
|
+
}
|
|
129
|
+
const encryptedContent = stringMetadata(metadata, "encrypted_content");
|
|
130
|
+
if (encryptedContent)
|
|
131
|
+
sidecar.encrypted_content = encryptedContent;
|
|
132
|
+
return sidecar;
|
|
133
|
+
}
|
|
134
|
+
export function isSafeReasoningReplayField(field) {
|
|
135
|
+
return SAFE_REASONING_REPLAY_FIELDS.includes(field);
|
|
136
|
+
}
|
|
137
|
+
export function normalizeReasoningReplayField(field, model) {
|
|
138
|
+
const normalized = model.provider === "opencode-go" && field === "reasoning"
|
|
139
|
+
? "reasoning_content"
|
|
140
|
+
: field;
|
|
141
|
+
return normalized && isSafeReasoningReplayField(normalized)
|
|
142
|
+
? normalized
|
|
143
|
+
: "reasoning_content";
|
|
144
|
+
}
|
|
145
|
+
export function setAssistantReasoningField(message, field, value) {
|
|
146
|
+
const messageWithSidecars = message;
|
|
147
|
+
messageWithSidecars[field] = value;
|
|
148
|
+
}
|
|
149
|
+
export function setAssistantReasoningLifecycleSidecars(message, blocks) {
|
|
150
|
+
const encryptedBlock = blocks.find(hasEncryptedReasoningMetadata);
|
|
151
|
+
if (!encryptedBlock)
|
|
152
|
+
return;
|
|
153
|
+
const messageWithSidecars = message;
|
|
154
|
+
messageWithSidecars.reasoning_start = buildResponsesReasoningSidecar(encryptedBlock.thinkingMetadata, true);
|
|
155
|
+
messageWithSidecars.reasoning_content = blocks
|
|
156
|
+
.map((block) => block.thinking)
|
|
157
|
+
.join("\n");
|
|
158
|
+
messageWithSidecars.reasoning_end = buildResponsesReasoningSidecar(encryptedBlock.thinkingMetadata, false);
|
|
159
|
+
}
|
|
160
|
+
export function assistantHasReasoningReplay(message) {
|
|
161
|
+
const messageWithSidecars = message;
|
|
162
|
+
return messageWithSidecars.reasoning_start !== undefined ||
|
|
163
|
+
messageWithSidecars.reasoning_end !== undefined ||
|
|
164
|
+
SAFE_REASONING_REPLAY_FIELDS.some((field) => typeof messageWithSidecars[field] === "string");
|
|
165
|
+
}
|
|
166
|
+
export function mergeThinkingMetadata(block, metadata) {
|
|
167
|
+
if (!metadata)
|
|
168
|
+
return;
|
|
169
|
+
block.thinkingMetadata = { ...(block.thinkingMetadata ?? {}), ...metadata };
|
|
170
|
+
}
|
|
171
|
+
export function splitInlineThinkingDelta(pending, inInlineThinking, delta) {
|
|
172
|
+
const parts = [];
|
|
173
|
+
let buffer = pending + delta;
|
|
174
|
+
let thinking = inInlineThinking;
|
|
175
|
+
const append = (type, value) => {
|
|
176
|
+
if (!value)
|
|
177
|
+
return;
|
|
178
|
+
const last = parts[parts.length - 1];
|
|
179
|
+
if (last?.type === type) {
|
|
180
|
+
last.delta += value;
|
|
181
|
+
return;
|
|
182
|
+
}
|
|
183
|
+
parts.push({ type, delta: value });
|
|
184
|
+
};
|
|
185
|
+
while (buffer.length > 0) {
|
|
186
|
+
const tag = thinking ? "</think>" : "<think>";
|
|
187
|
+
const idx = buffer.toLowerCase().indexOf(tag);
|
|
188
|
+
if (idx >= 0) {
|
|
189
|
+
append(thinking ? "thinking" : "text", buffer.slice(0, idx));
|
|
190
|
+
buffer = buffer.slice(idx + tag.length);
|
|
191
|
+
thinking = !thinking;
|
|
192
|
+
continue;
|
|
193
|
+
}
|
|
194
|
+
const maxTagLength = "</think>".length - 1;
|
|
195
|
+
let keep = 0;
|
|
196
|
+
const limit = Math.min(maxTagLength, buffer.length);
|
|
197
|
+
for (let size = limit; size > 0; size--) {
|
|
198
|
+
const suffix = buffer.slice(-size).toLowerCase();
|
|
199
|
+
if ("<think>".startsWith(suffix) || "</think>".startsWith(suffix)) {
|
|
200
|
+
keep = size;
|
|
201
|
+
break;
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
append(thinking ? "thinking" : "text", buffer.slice(0, buffer.length - keep));
|
|
205
|
+
buffer = buffer.slice(buffer.length - keep);
|
|
206
|
+
break;
|
|
207
|
+
}
|
|
208
|
+
return { parts, pending: buffer, inInlineThinking: thinking };
|
|
209
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"openai-completions.d.ts","sourceRoot":"","sources":["../../../../src/sdk/ai/providers/openai-completions.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"openai-completions.d.ts","sourceRoot":"","sources":["../../../../src/sdk/ai/providers/openai-completions.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAMX,0BAA0B,EAE1B,MAAM,sCAAsC,CAAC;AAI9C,OAAO,KAAK,EAGX,OAAO,EAGP,KAAK,EACL,uBAAuB,EACvB,mBAAmB,EAEnB,cAAc,EACd,aAAa,EAMb,MAAM,aAAa,CAAC;AA+FrB,MAAM,WAAW,wBAAyB,SAAQ,aAAa;IAC9D,UAAU,CAAC,EACR,MAAM,GACN,MAAM,GACN,UAAU,GACV;QAAE,IAAI,EAAE,UAAU,CAAC;QAAC,QAAQ,EAAE;YAAE,IAAI,EAAE,MAAM,CAAA;SAAE,CAAA;KAAE,CAAC;IACpD,eAAe,CAAC,EAAE,SAAS,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,CAAC;CAClE;AAED,KAAK,+BAA+B,GAAG,QAAQ,CAAC,uBAAuB,CAAC,CAAC;AAuBzE,eAAO,MAAM,uBAAuB,EAAE,cAAc,CACnD,oBAAoB,EACpB,wBAAwB,CAumBxB,CAAC;AAEF,eAAO,MAAM,6BAA6B,EAAE,cAAc,CACzD,oBAAoB,EACpB,mBAAmB,CAyBnB,CAAC;AAkNF,wBAAgB,eAAe,CAC9B,KAAK,EAAE,KAAK,CAAC,oBAAoB,CAAC,EAClC,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,+BAA+B,GACrC,0BAA0B,EAAE,CA0R9B"}
|