@openclaw/ai 2026.11.2 → 2026.11.4

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.
Files changed (81) hide show
  1. package/README.md +9 -1
  2. package/dist/{anthropic-CUVqVXTe.mjs → anthropic-C8cQsW5d.mjs} +46 -26
  3. package/dist/{anthropic-payload-policy-rqCq9sT_.d.mts → anthropic-payload-policy-BCp4dUJR.d.mts} +2 -2
  4. package/dist/{anthropic-stream-reducer-yWDb5Cct.mjs → anthropic-stream-reducer-BgAICq34.mjs} +11 -10
  5. package/dist/{anthropic-tool-projection-DZOKfAmL.mjs → anthropic-tool-projection-CrsCkF4k.mjs} +1 -1
  6. package/dist/{anthropic-tool-projection-JTvMo4KG.d.mts → anthropic-tool-projection-CzSSQzZL.d.mts} +1 -1
  7. package/dist/{api-registry-gDt0faai.d.mts → api-registry-CkmxPPac.d.mts} +1 -1
  8. package/dist/{assistant-output-BnQm3fov.mjs → assistant-output-Hl3b-ViJ.mjs} +2 -2
  9. package/dist/{azure-openai-responses-I97-HnAv.mjs → azure-openai-responses-CZKrN3aq.mjs} +5 -5
  10. package/dist/diagnostics.d.mts +3 -3
  11. package/dist/{google-Cpi_cLKZ.mjs → google-DuI8TLy0.mjs} +2 -2
  12. package/dist/{google-interactions-BYRQ49MR.mjs → google-interactions-jbqgn8zL.mjs} +8 -8
  13. package/dist/{google-messages-DQMgG5yG.mjs → google-messages-BWhsZ167.mjs} +3 -3
  14. package/dist/{google-provider-stream-BHd0cST9.mjs → google-provider-stream-DL0bXgX5.mjs} +6 -6
  15. package/dist/{google-shared-vtag8bj5.mjs → google-shared-DXizMtnG.mjs} +5 -5
  16. package/dist/{google-vertex-eKoUnW7N.mjs → google-vertex-DnjRWo-M.mjs} +2 -2
  17. package/dist/{host-jJOffdlW.d.mts → host-B03VqZdH.d.mts} +2 -2
  18. package/dist/{host-CWt55nnF.mjs → host-CyGba3M8.mjs} +99 -80
  19. package/dist/{host-policy-Dm7PM6AD.mjs → host-policy-CNQztzZm.mjs} +1 -1
  20. package/dist/{index-DSprYWaz.d.mts → index-B8ODIVmA.d.mts} +15 -4
  21. package/dist/index.d.mts +4 -4
  22. package/dist/index.mjs +4 -4
  23. package/dist/internal/anthropic.d.mts +15 -5
  24. package/dist/internal/anthropic.mjs +6 -6
  25. package/dist/internal/openai-completions-compat.d.mts +1 -1
  26. package/dist/internal/openai-completions-compat.mjs +1 -1
  27. package/dist/internal/openai-responses-payload-policy.d.mts +2 -2
  28. package/dist/internal/openai-responses-payload-policy.mjs +1 -1
  29. package/dist/internal/openai.d.mts +8 -8
  30. package/dist/internal/openai.mjs +7 -7
  31. package/dist/internal/runtime.d.mts +6 -6
  32. package/dist/internal/runtime.mjs +4 -4
  33. package/dist/internal/shared.d.mts +3 -3
  34. package/dist/internal/shared.mjs +2 -2
  35. package/dist/internal/tool-schema.d.mts +2 -2
  36. package/dist/internal/tool-schema.mjs +3 -3
  37. package/dist/{mistral-CQ7aoWg2.mjs → mistral-BgamhpFG.mjs} +4 -4
  38. package/dist/openai-DAGvHDxa.mjs +20077 -0
  39. package/dist/{openai-chatgpt-responses-DgDVhpUI.mjs → openai-chatgpt-responses-CWIwGLDZ.mjs} +10 -10
  40. package/dist/{openai-completions-compat-bNQXF1y9.mjs → openai-completions-compat-D9KEUevM.mjs} +1 -1
  41. package/dist/{openai-completions-compat-CBvb2eld.d.mts → openai-completions-compat-DTe2EXPi.d.mts} +2 -2
  42. package/dist/{openai-completions-BdfBhFjx.mjs → openai-completions-kAWkz3bl.mjs} +4 -4
  43. package/dist/openai-completions-transport-bgZfY_xa.mjs +10881 -0
  44. package/dist/{openai-prompt-cache-B9AvdoEo.mjs → openai-prompt-cache-CAo-Mah6.mjs} +1 -1
  45. package/dist/{openai-prompt-cache-DgjD-UL5.d.mts → openai-prompt-cache-k7EPMLa0.d.mts} +1 -1
  46. package/dist/{openai-responses-compaction-replay-DUBbsfku.d.mts → openai-responses-compaction-replay-DOJaDCUl.d.mts} +3 -3
  47. package/dist/{openai-responses-contracts-gnl6ZRs1.d.mts → openai-responses-contracts-DHtim7d_.d.mts} +3 -3
  48. package/dist/{openai-responses-endpoint-CfKR6N5f.mjs → openai-responses-endpoint-DJwbSy3n.mjs} +3 -1
  49. package/dist/{openai-responses-payload-policy-BzM52TTH.d.mts → openai-responses-payload-policy-cIaYG5ZQ.d.mts} +1 -0
  50. package/dist/{openai-responses-request-lifecycle-WKXjj_th.mjs → openai-responses-request-lifecycle-CQBkk3bx.mjs} +6 -6
  51. package/dist/{openai-responses-shared-iWBHb0Sq.mjs → openai-responses-shared-C8C1myRt.mjs} +1092 -15
  52. package/dist/{openai-responses-terminal-usage-CpVjkqn-.d.mts → openai-responses-terminal-usage-BDGDBGuA.d.mts} +1 -1
  53. package/dist/{openai-responses-5KI4v8DN.mjs → openai-responses-wWDdPeKC.mjs} +7 -7
  54. package/dist/{openai-tool-schema-BTEU2xmN.mjs → openai-tool-schema-D913am3I.mjs} +3 -2
  55. package/dist/openai.LICENSE +201 -0
  56. package/dist/{provider-options-Bo8GzTGX.d.mts → provider-options-DFjnfImJ.d.mts} +8 -2
  57. package/dist/{provider-replay-context-4vxI7p4V.mjs → provider-replay-context-BWgW0iTm.mjs} +1 -1
  58. package/dist/{provider-transport-turn-state-BbaD56A1.mjs → provider-transport-turn-state-CxXS1_Cv.mjs} +3 -3
  59. package/dist/{provider-types-CWl4VXvE.d.mts → provider-types-C-67EZr8.d.mts} +2 -2
  60. package/dist/provider-types.d.mts +3 -3
  61. package/dist/providers.d.mts +2 -2
  62. package/dist/providers.mjs +10 -10
  63. package/dist/{reasoning-tag-text-partitioner-DzlRubwU.mjs → reasoning-tag-text-partitioner-CU9A4Lg8.mjs} +2 -13
  64. package/dist/rolldown-runtime-B4iAMlE-.mjs +35 -0
  65. package/dist/{sanitize-unicode-ZqVLLEKC.d.mts → sanitize-unicode-CkejzD2f.d.mts} +1 -1
  66. package/dist/{simple-options-xJkqrG_E.mjs → simple-options-Bd0STwu7.mjs} +2 -2
  67. package/dist/{src-CyA0zJnt.mjs → src--qsViR3j.mjs} +60 -12
  68. package/dist/{stream-C4YDqhFj.mjs → stream-BRecd0FZ.mjs} +1 -1
  69. package/dist/{tool-schema-json-projection-B1sTYwfH.mjs → tool-schema-json-projection-DU-FFSa7.mjs} +1 -1
  70. package/dist/{transport-stream-shared-lhgkTOz3.mjs → transport-stream-shared-C1AtJhZA.mjs} +1 -1
  71. package/dist/{transport-stream-shared-8ru8eX4s.d.mts → transport-stream-shared-Dhx_37f1.d.mts} +1 -1
  72. package/dist/{transport-utils-DwOpuTjL.mjs → transport-utils-4xPfuKp2.mjs} +2 -2
  73. package/dist/transports.d.mts +13 -13
  74. package/dist/transports.mjs +61 -41
  75. package/dist/types-BFfXm_Jr.d.mts +1 -0
  76. package/dist/types.d.mts +3 -3
  77. package/dist/types.mjs +2 -2
  78. package/dist/ws.LICENSE +20 -0
  79. package/package.json +1 -1
  80. package/dist/openai-completions-transport-CnFaKYO-.mjs +0 -3425
  81. package/dist/types-CBJthzJX.d.mts +0 -1
@@ -1,4 +1,4 @@
1
- import { n as isNativeOpenAIEndpoint } from "./openai-completions-compat-bNQXF1y9.mjs";
1
+ import { n as isNativeOpenAIEndpoint } from "./openai-completions-compat-D9KEUevM.mjs";
2
2
  //#region packages/normalization-core/src/code-points.ts
3
3
  /** Truncates to a nonnegative code-point budget; grapheme clusters may be split. */
4
4
  function truncateCodePoints(text, maxCodePoints) {
@@ -1,5 +1,5 @@
1
1
  import { N as OpenAICompletionsCompat, k as Model, l as CacheRetention } from "./types-CVYzKrMl.mjs";
2
- import "./types-CBJthzJX.mjs";
2
+ import "./types-BFfXm_Jr.mjs";
3
3
  //#region packages/ai/src/providers/openai-prompt-cache.d.ts
4
4
  /** Selects documented lifetime fields shared by Responses and Chat Completions. */
5
5
  declare function resolveOpenAIPromptCacheParams(model: Pick<Model, "id" | "provider" | "baseUrl">, cacheRetention: CacheRetention, compat: Required<Pick<OpenAICompletionsCompat, "supportsPromptCacheKey" | "supportsLongCacheRetention">>): {
@@ -1,7 +1,7 @@
1
- import "./index-DSprYWaz.mjs";
1
+ import "./index-B8ODIVmA.mjs";
2
2
  import { a as AssistantMessage, k as Model } from "./types-CVYzKrMl.mjs";
3
- import "./provider-options-Bo8GzTGX.mjs";
4
- import { i as ReplayableResponseCompactionItem, r as OpenAIResponsesReasoningReplayMetadata, u as OpenAIResponsesCompactionOutput } from "./openai-responses-contracts-gnl6ZRs1.mjs";
3
+ import "./provider-options-DFjnfImJ.mjs";
4
+ import { i as ReplayableResponseCompactionItem, r as OpenAIResponsesReasoningReplayMetadata, u as OpenAIResponsesCompactionOutput } from "./openai-responses-contracts-DHtim7d_.mjs";
5
5
  import "openai/resources/responses/responses.js";
6
6
  //#region packages/ai/src/transports/openai-responses-compaction-replay.d.ts
7
7
  declare function captureOpenAIResponsesCompaction(output: Pick<AssistantMessage, "providerReplay">, item: ReplayableResponseCompactionItem, boundary: number | "retained-users", model: Model, captureMetadata?: OpenAIResponsesReasoningReplayMetadata, compactedOutput?: OpenAIResponsesCompactionOutput, outputTokens?: number): void;
@@ -1,7 +1,7 @@
1
- import "./index-DSprYWaz.mjs";
1
+ import "./index-B8ODIVmA.mjs";
2
2
  import { M as ModelThinkingLevel, k as Model, n as Api } from "./types-CVYzKrMl.mjs";
3
- import { a as BaseOpenAIStreamOptions, y as OpenAIReasoningEffort } from "./provider-options-Bo8GzTGX.mjs";
4
- import "./types-CBJthzJX.mjs";
3
+ import { a as BaseOpenAIStreamOptions, y as OpenAIReasoningEffort } from "./provider-options-DFjnfImJ.mjs";
4
+ import "./types-BFfXm_Jr.mjs";
5
5
  import { Response, ResponseCompactionItem, ResponseCreateParamsStreaming, ResponseInputItem, ResponseOutputMessage, ResponseReasoningItem } from "openai/resources/responses/responses.js";
6
6
  //#region packages/ai/src/providers/openai-request-reasoning.d.ts
7
7
  type OpenAIRequestReasoningEffort = ModelThinkingLevel | "none";
@@ -70,6 +70,7 @@ function resolveOpenAIResponsesPayloadCapabilities(model) {
70
70
  allowsOpenAIServiceTier: provider === "openai" && (api === "openai-responses" || api === "openclaw-openai-responses-transport") || isOpenAIProvider && (api === "openai-chatgpt-responses" || api === "openclaw-openai-chatgpt-responses-transport") && endpointClass === "openai",
71
71
  allowsResponsesStore: supportsResponsesStoreField && api !== "openai-chatgpt-responses" && api !== "openclaw-openai-chatgpt-responses-transport" && provider !== void 0 && OPENAI_RESPONSES_PROVIDERS.has(provider) && usesKnownNativeOpenAIEndpoint,
72
72
  explicitContinuationOptIn,
73
+ requiresStatelessCompactionReplay: endpointClass === "openai-public" || isOpenAIProvider && endpointClass === "default",
73
74
  shouldStripResponsesPromptCache,
74
75
  supportsResponsesStoreField,
75
76
  usesKnownNativeOpenAIRoute,
@@ -147,6 +148,7 @@ function resolveOpenAIResponsesPayloadPolicy(model, options = {}) {
147
148
  defaultManagedReasoningEffort: capabilities.usesKnownNativeOpenAIRoute && !shouldStripDisabledReasoningPayload && model.provider !== "github-copilot" ? "none" : void 0,
148
149
  explicitContinuationOptIn: capabilities.explicitContinuationOptIn,
149
150
  explicitStore,
151
+ requiresStatelessCompactionReplay: capabilities.requiresStatelessCompactionReplay,
150
152
  shouldStripDisabledReasoningPayload,
151
153
  shouldStripInputStatus,
152
154
  shouldStripPromptCache: options.enablePromptCacheStripping === true && capabilities.shouldStripResponsesPromptCache,
@@ -157,7 +159,7 @@ function resolveOpenAIResponsesPayloadPolicy(model, options = {}) {
157
159
  }
158
160
  /** Mutate a Responses request payload according to the resolved endpoint policy. */
159
161
  function applyOpenAIResponsesPayloadPolicy(payloadObj, policy) {
160
- if (policy.explicitStore !== void 0) payloadObj.store = policy.explicitStore;
162
+ if (policy.explicitStore !== void 0) payloadObj.store = policy.explicitStore && !(policy.requiresStatelessCompactionReplay && Array.isArray(payloadObj.input) && payloadObj.input.some((item) => isRecord(item) && item.type === "compaction"));
161
163
  if (policy.shouldStripStore) delete payloadObj.store;
162
164
  if (policy.shouldStripPromptCache) {
163
165
  delete payloadObj.prompt_cache_key;
@@ -20,6 +20,7 @@ type OpenAIResponsesPayloadPolicy = {
20
20
  defaultManagedReasoningEffort: "none" | undefined;
21
21
  explicitContinuationOptIn: boolean;
22
22
  explicitStore: boolean | undefined;
23
+ requiresStatelessCompactionReplay: boolean;
23
24
  shouldStripDisabledReasoningPayload: boolean;
24
25
  shouldStripInputStatus: boolean;
25
26
  shouldStripPromptCache: boolean;
@@ -1,12 +1,12 @@
1
1
  import { o as isRecord } from "./record-coerce-CNDovvft.mjs";
2
2
  import { f as RESPONSES_RETAINED_USER, g as responsesPromptObserver } from "./openai-responses-contracts-B5mGAbR6.mjs";
3
3
  import { c as stableStringify, d as estimateTokensFromChars, u as estimateStringChars } from "./provider-error-qtZD2inE.mjs";
4
- import "./transport-utils-DwOpuTjL.mjs";
5
- import { w as stripSystemPromptCacheBoundary } from "./simple-options-xJkqrG_E.mjs";
6
- import { v as sanitizeTransportPayloadText } from "./transport-stream-shared-lhgkTOz3.mjs";
7
- import { w as sha256Hex } from "./tool-schema-json-projection-B1sTYwfH.mjs";
8
- import { rt as buildOpenAIResponsesReasoningReplayMetadata } from "./openai-responses-shared-iWBHb0Sq.mjs";
9
- import { a as isOpenAIResponsesCompactionOutput, s as sanitizeResponsesImagePayload } from "./openai-responses-endpoint-CfKR6N5f.mjs";
4
+ import "./transport-utils-4xPfuKp2.mjs";
5
+ import { w as stripSystemPromptCacheBoundary } from "./simple-options-Bd0STwu7.mjs";
6
+ import { v as sanitizeTransportPayloadText } from "./transport-stream-shared-C1AtJhZA.mjs";
7
+ import { w as sha256Hex } from "./tool-schema-json-projection-DU-FFSa7.mjs";
8
+ import { rt as buildOpenAIResponsesReasoningReplayMetadata } from "./openai-responses-shared-C8C1myRt.mjs";
9
+ import { a as isOpenAIResponsesCompactionOutput, s as sanitizeResponsesImagePayload } from "./openai-responses-endpoint-DJwbSy3n.mjs";
10
10
  //#region packages/ai/src/transports/openai-responses-compact-request.ts
11
11
  const COMPACT_REQUEST = Symbol("openaiResponsesCompactRequest");
12
12
  function claimResponsesCompactRequest(options) {