@openclaw/ai 2026.9.1-beta.1 → 2026.9.1

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/dist/{anthropic-compaction-replay-nhKaCXu6.mjs → anthropic-compaction-replay-OMJZ0uyo.mjs} +37 -34
  2. package/dist/{anthropic-DI4PZKKB.mjs → anthropic-hk7F7ptG.mjs} +28 -25
  3. package/dist/{anthropic-payload-policy-B_0n0enE.d.mts → anthropic-payload-policy-DBT1itQ-.d.mts} +3 -3
  4. package/dist/{api-registry-CTd8NzcD.d.mts → api-registry-Cs6HGNqY.d.mts} +2 -2
  5. package/dist/{azure-openai-responses-D8dI0ekg.mjs → azure-openai-responses-CN4Fy5zV.mjs} +10 -7
  6. package/dist/{number-coercion-H9qHik3g.mjs → base64-CEFBpSkN.mjs} +73 -1
  7. package/dist/{diagnostics-COpOtRwq.mjs → diagnostics-CPeq9F7y.mjs} +5 -1
  8. package/dist/{diagnostics-BaTA9eVl.d.mts → diagnostics-DnPnOui6.d.mts} +5 -1
  9. package/dist/diagnostics-KhXK-QJI.mjs +136 -0
  10. package/dist/diagnostics.d.mts +8 -3
  11. package/dist/diagnostics.mjs +4 -3
  12. package/dist/{env-api-keys-DrgeBuva.mjs → env-api-keys-bktO00EJ.mjs} +2 -15
  13. package/dist/event-stream-DeDhbCc5.d.mts +1 -0
  14. package/dist/{event-stream-LiXePESD.d.mts → event-stream-vK_7r3bj.d.mts} +1 -1
  15. package/dist/event-stream.d.mts +2 -2
  16. package/dist/{google-Od-LLdVK.mjs → google-CC-nrwXg.mjs} +8 -6
  17. package/dist/{google-shared-Bgr9lFPw.mjs → google-shared-CjPY0hZM.mjs} +25 -23
  18. package/dist/{google-vertex-aerRSXc4.mjs → google-vertex-DCr0pyzQ.mjs} +7 -5
  19. package/dist/{host-D51fmkH6.mjs → host-BIaiBURL.mjs} +2 -2
  20. package/dist/{host-DsbPMFU6.d.mts → host-BztR4tQj.d.mts} +3 -3
  21. package/dist/index-AfaxKT8w.d.mts +111 -0
  22. package/dist/index.d.mts +10 -11
  23. package/dist/index.mjs +5 -5
  24. package/dist/internal/anthropic.d.mts +53 -52
  25. package/dist/internal/anthropic.mjs +5 -5
  26. package/dist/internal/openai-responses-payload-policy.d.mts +3 -3
  27. package/dist/internal/openai-responses-payload-policy.mjs +2 -3
  28. package/dist/internal/openai.d.mts +65 -63
  29. package/dist/internal/openai.mjs +9 -9
  30. package/dist/internal/retry-after.d.mts +2 -3
  31. package/dist/internal/runtime.d.mts +43 -43
  32. package/dist/internal/runtime.mjs +10 -8
  33. package/dist/internal/shared.d.mts +25 -25
  34. package/dist/internal/shared.mjs +95 -4
  35. package/dist/{mistral-EiHdymeb.mjs → mistral-B7etBd_H.mjs} +25 -20
  36. package/dist/{openai-chatgpt-responses-DHpF9o1e.mjs → openai-chatgpt-responses-BAJ4gq3i.mjs} +63 -122
  37. package/dist/{openai-completions-EFPiUGfS.mjs → openai-completions-D0QZ0AyB.mjs} +24 -20
  38. package/dist/{openai-completions-compat-BefmHT26.d.mts → openai-completions-compat-4IjSBpr6.d.mts} +5 -5
  39. package/dist/{openai-completions-stream-DUlGwRMz.mjs → openai-completions-stream-DZjwK8vp.mjs} +97 -90
  40. package/dist/{openai-responses-BogP8OjX.mjs → openai-responses-BEUlxfDu.mjs} +12 -8
  41. package/dist/openai-responses-compaction-window-DO7yV7az.mjs +686 -0
  42. package/dist/{openai-responses-contracts-Dvj_UtPy.d.mts → openai-responses-contracts-bPzSN_Ba.d.mts} +14 -5
  43. package/dist/{openai-responses-payload-policy-CNGFT9zr.d.mts → openai-responses-payload-policy-rLRPsSmB.d.mts} +1 -0
  44. package/dist/{openai-responses-prompt-observer-internal-Cd4hJG-S.mjs → openai-responses-prompt-observer-internal-C7x4IK7r.mjs} +4 -18
  45. package/dist/{openai-responses-shared-DJThc6jW.mjs → openai-responses-shared-DiAdpNAM.mjs} +274 -221
  46. package/dist/{openai-tool-schema-ho-hIkQf.mjs → openai-tool-schema-BMiHFH36.mjs} +14 -12
  47. package/dist/{provider-error-DDOs_Bz0.mjs → provider-error-B6EGq6gg.mjs} +14 -85
  48. package/dist/{provider-options-MdMBLzlU.d.mts → provider-options-CxFPtvh7.d.mts} +11 -3
  49. package/dist/{provider-transcript-transform-C01bQ5a3.mjs → provider-transcript-transform-WvJmFUAf.mjs} +1 -1
  50. package/dist/provider-types.d.mts +19 -20
  51. package/dist/providers.d.mts +5 -5
  52. package/dist/providers.mjs +9 -9
  53. package/dist/{reasoning-tag-text-partitioner-5ygO2rZc.mjs → reasoning-tag-text-partitioner-C-4uedDb.mjs} +93 -77
  54. package/dist/rolldown-runtime-BhDjJH2R.mjs +15 -0
  55. package/dist/{sanitize-unicode-DCkltN94.mjs → sanitize-unicode-S6binQG-.mjs} +2 -8
  56. package/dist/{simple-options-CFj7x3J4.mjs → simple-options-0PLDyJ-d.mjs} +42 -6
  57. package/dist/{src-Bu3FiFAG.mjs → src-C8U7lkoa.mjs} +75 -2
  58. package/dist/{stream-first-event-timeout-MK28puvq.mjs → stream-first-event-timeout-DcNjoFQE.mjs} +1 -1
  59. package/dist/{tool-schema-json-projection-qvTEs5Am.mjs → tool-schema-json-projection-BtZiml7r.mjs} +21 -31
  60. package/dist/{transport-stream-shared-rvaCyFYt.d.mts → transport-stream-shared-BrvFTkoO.d.mts} +5 -5
  61. package/dist/{transport-stream-shared-ljShVIZB.mjs → transport-stream-shared-CytPVLIg.mjs} +18 -5
  62. package/dist/{transport-utils-LJ1_rbi-.mjs → transport-utils-CtuS1Upe.mjs} +5 -8
  63. package/dist/transports.d.mts +120 -85
  64. package/dist/transports.mjs +218 -249
  65. package/dist/types-B5EFUmXs.d.mts +1 -0
  66. package/dist/{types-DhLoJbFm.d.mts → types-DbrhszyQ.d.mts} +27 -13
  67. package/dist/types.d.mts +7 -7
  68. package/dist/types.mjs +4 -4
  69. package/dist/{validation-Dk7q7NMN.d.mts → validation-BOwtcl9X.d.mts} +1 -1
  70. package/dist/{validation-B61OhAio.mjs → validation-CJZtym2g.mjs} +7 -5
  71. package/dist/validation.d.mts +1 -1
  72. package/dist/validation.mjs +1 -1
  73. package/package.json +5 -5
  74. package/dist/anthropic-BECQCNdF.d.mts +0 -98
  75. package/dist/event-stream-BKp4fOt_.d.mts +0 -1
  76. package/dist/index-Qbej8io0.d.mts +0 -3
  77. package/dist/openai-responses-contracts-QUY12X0B.mjs +0 -233
  78. package/dist/openai-responses-payload-policy-D8EdimYe.mjs +0 -204
  79. package/dist/provider-options-AvldWZt8.mjs +0 -21
  80. package/dist/tls-certificate-errors-DXSpluKI.mjs +0 -93
  81. package/dist/types-GiAjXatj.d.mts +0 -1
@@ -1,5 +1,5 @@
1
- import { r as __exportAll } from "./env-api-keys-DrgeBuva.mjs";
2
- //#region node_modules/mdast-util-to-string/lib/index.js
1
+ import { t as __exportAll } from "./rolldown-runtime-BhDjJH2R.mjs";
2
+ //#region node_modules/.pnpm/mdast-util-to-string@4.0.0/node_modules/mdast-util-to-string/lib/index.js
3
3
  /**
4
4
  * @typedef {import('mdast').Nodes} Nodes
5
5
  *
@@ -81,7 +81,7 @@ function node(value) {
81
81
  return Boolean(value && typeof value === "object");
82
82
  }
83
83
  //#endregion
84
- //#region node_modules/character-entities/index.js
84
+ //#region node_modules/.pnpm/character-entities@2.0.2/node_modules/character-entities/index.js
85
85
  /**
86
86
  * Map of named character references.
87
87
  *
@@ -2215,7 +2215,7 @@ const characterEntities = {
2215
2215
  zwnj: "‌"
2216
2216
  };
2217
2217
  //#endregion
2218
- //#region node_modules/decode-named-character-reference/index.js
2218
+ //#region node_modules/.pnpm/decode-named-character-reference@1.3.0/node_modules/decode-named-character-reference/index.js
2219
2219
  const own$1 = {}.hasOwnProperty;
2220
2220
  /**
2221
2221
  * Decode a single character reference (without the `&` or `;`).
@@ -2232,7 +2232,7 @@ function decodeNamedCharacterReference(value) {
2232
2232
  return own$1.call(characterEntities, value) ? characterEntities[value] : false;
2233
2233
  }
2234
2234
  //#endregion
2235
- //#region node_modules/micromark-util-chunked/index.js
2235
+ //#region node_modules/.pnpm/micromark-util-chunked@2.0.1/node_modules/micromark-util-chunked/index.js
2236
2236
  /**
2237
2237
  * Like `Array#splice`, but smarter for giant arrays.
2238
2238
  *
@@ -2302,7 +2302,7 @@ function push(list, items) {
2302
2302
  return items;
2303
2303
  }
2304
2304
  //#endregion
2305
- //#region node_modules/micromark-util-combine-extensions/index.js
2305
+ //#region node_modules/.pnpm/micromark-util-combine-extensions@2.0.1/node_modules/micromark-util-combine-extensions/index.js
2306
2306
  /**
2307
2307
  * @import {
2308
2308
  * Extension,
@@ -2373,7 +2373,7 @@ function constructs(existing, list) {
2373
2373
  splice(existing, 0, 0, before);
2374
2374
  }
2375
2375
  //#endregion
2376
- //#region node_modules/micromark-util-decode-numeric-character-reference/index.js
2376
+ //#region node_modules/.pnpm/micromark-util-decode-numeric-character-reference@2.0.2/node_modules/micromark-util-decode-numeric-character-reference/index.js
2377
2377
  /**
2378
2378
  * Turn the number (in string form as either hexa- or plain decimal) coming from
2379
2379
  * a numeric character reference into a character.
@@ -2394,7 +2394,7 @@ function decodeNumericCharacterReference(value, base) {
2394
2394
  return String.fromCodePoint(code);
2395
2395
  }
2396
2396
  //#endregion
2397
- //#region node_modules/micromark-util-normalize-identifier/index.js
2397
+ //#region node_modules/.pnpm/micromark-util-normalize-identifier@2.0.1/node_modules/micromark-util-normalize-identifier/index.js
2398
2398
  /**
2399
2399
  * Normalize an identifier (as found in references, definitions).
2400
2400
  *
@@ -2418,7 +2418,7 @@ function normalizeIdentifier(value) {
2418
2418
  return value.replace(/[\t\n\r ]+/g, " ").replace(/^ | $/g, "").toLowerCase().toUpperCase();
2419
2419
  }
2420
2420
  //#endregion
2421
- //#region node_modules/micromark-util-character/index.js
2421
+ //#region node_modules/.pnpm/micromark-util-character@2.1.1/node_modules/micromark-util-character/index.js
2422
2422
  /**
2423
2423
  * @import {Code} from 'micromark-util-types'
2424
2424
  */
@@ -2646,7 +2646,7 @@ function regexCheck(regex) {
2646
2646
  }
2647
2647
  }
2648
2648
  //#endregion
2649
- //#region node_modules/micromark-factory-space/index.js
2649
+ //#region node_modules/.pnpm/micromark-factory-space@2.0.1/node_modules/micromark-factory-space/index.js
2650
2650
  /**
2651
2651
  * @import {Effects, State, TokenType} from 'micromark-util-types'
2652
2652
  */
@@ -2705,7 +2705,7 @@ function factorySpace(effects, ok, type, max) {
2705
2705
  }
2706
2706
  }
2707
2707
  //#endregion
2708
- //#region node_modules/micromark/lib/initialize/content.js
2708
+ //#region node_modules/.pnpm/micromark@4.0.2_supports-color@10.2.2/node_modules/micromark/lib/initialize/content.js
2709
2709
  /**
2710
2710
  * @import {
2711
2711
  * InitialConstruct,
@@ -2772,7 +2772,7 @@ function initializeContent(effects) {
2772
2772
  }
2773
2773
  }
2774
2774
  //#endregion
2775
- //#region node_modules/micromark/lib/initialize/document.js
2775
+ //#region node_modules/.pnpm/micromark@4.0.2_supports-color@10.2.2/node_modules/micromark/lib/initialize/document.js
2776
2776
  /**
2777
2777
  * @import {
2778
2778
  * Construct,
@@ -2988,7 +2988,7 @@ function tokenizeContainer(effects, ok, nok) {
2988
2988
  return factorySpace(effects, effects.attempt(this.parser.constructs.document, ok, nok), "linePrefix", this.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4);
2989
2989
  }
2990
2990
  //#endregion
2991
- //#region node_modules/micromark-util-classify-character/index.js
2991
+ //#region node_modules/.pnpm/micromark-util-classify-character@2.0.1/node_modules/micromark-util-classify-character/index.js
2992
2992
  /**
2993
2993
  * @import {Code} from 'micromark-util-types'
2994
2994
  */
@@ -3011,7 +3011,7 @@ function classifyCharacter(code) {
3011
3011
  if (unicodePunctuation(code)) return 2;
3012
3012
  }
3013
3013
  //#endregion
3014
- //#region node_modules/micromark-util-resolve-all/index.js
3014
+ //#region node_modules/.pnpm/micromark-util-resolve-all@2.0.1/node_modules/micromark-util-resolve-all/index.js
3015
3015
  /**
3016
3016
  * @import {Event, Resolver, TokenizeContext} from 'micromark-util-types'
3017
3017
  */
@@ -3041,7 +3041,7 @@ function resolveAll(constructs, events, context) {
3041
3041
  return events;
3042
3042
  }
3043
3043
  //#endregion
3044
- //#region node_modules/micromark-core-commonmark/lib/attention.js
3044
+ //#region node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/attention.js
3045
3045
  /**
3046
3046
  * @import {
3047
3047
  * Code,
@@ -3261,7 +3261,7 @@ function movePoint(point, offset) {
3261
3261
  point._bufferIndex += offset;
3262
3262
  }
3263
3263
  //#endregion
3264
- //#region node_modules/micromark-core-commonmark/lib/autolink.js
3264
+ //#region node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/autolink.js
3265
3265
  /**
3266
3266
  * @import {
3267
3267
  * Construct,
@@ -3472,7 +3472,7 @@ function tokenizeAutolink(effects, ok, nok) {
3472
3472
  }
3473
3473
  }
3474
3474
  //#endregion
3475
- //#region node_modules/micromark-core-commonmark/lib/blank-line.js
3475
+ //#region node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/blank-line.js
3476
3476
  /**
3477
3477
  * @import {
3478
3478
  * Construct,
@@ -3529,7 +3529,7 @@ function tokenizeBlankLine(effects, ok, nok) {
3529
3529
  }
3530
3530
  }
3531
3531
  //#endregion
3532
- //#region node_modules/micromark-core-commonmark/lib/block-quote.js
3532
+ //#region node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/block-quote.js
3533
3533
  /**
3534
3534
  * @import {
3535
3535
  * Construct,
@@ -3656,7 +3656,7 @@ function exit$1(effects) {
3656
3656
  effects.exit("blockQuote");
3657
3657
  }
3658
3658
  //#endregion
3659
- //#region node_modules/micromark-core-commonmark/lib/character-escape.js
3659
+ //#region node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/character-escape.js
3660
3660
  /**
3661
3661
  * @import {
3662
3662
  * Construct,
@@ -3716,7 +3716,7 @@ function tokenizeCharacterEscape(effects, ok, nok) {
3716
3716
  }
3717
3717
  }
3718
3718
  //#endregion
3719
- //#region node_modules/micromark-core-commonmark/lib/character-reference.js
3719
+ //#region node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/character-reference.js
3720
3720
  /**
3721
3721
  * @import {
3722
3722
  * Code,
@@ -3854,7 +3854,7 @@ function tokenizeCharacterReference(effects, ok, nok) {
3854
3854
  }
3855
3855
  }
3856
3856
  //#endregion
3857
- //#region node_modules/micromark-core-commonmark/lib/code-fenced.js
3857
+ //#region node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/code-fenced.js
3858
3858
  /**
3859
3859
  * @import {
3860
3860
  * Code,
@@ -4269,7 +4269,7 @@ function tokenizeNonLazyContinuation(effects, ok, nok) {
4269
4269
  }
4270
4270
  }
4271
4271
  //#endregion
4272
- //#region node_modules/micromark-core-commonmark/lib/code-indented.js
4272
+ //#region node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/code-indented.js
4273
4273
  /**
4274
4274
  * @import {
4275
4275
  * Construct,
@@ -4413,7 +4413,7 @@ function tokenizeFurtherStart(effects, ok, nok) {
4413
4413
  }
4414
4414
  }
4415
4415
  //#endregion
4416
- //#region node_modules/micromark-core-commonmark/lib/code-text.js
4416
+ //#region node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/code-text.js
4417
4417
  /**
4418
4418
  * @import {
4419
4419
  * Construct,
@@ -4598,7 +4598,7 @@ function tokenizeCodeText(effects, ok, nok) {
4598
4598
  }
4599
4599
  }
4600
4600
  //#endregion
4601
- //#region node_modules/micromark-util-subtokenize/lib/splice-buffer.js
4601
+ //#region node_modules/.pnpm/micromark-util-subtokenize@2.1.0/node_modules/micromark-util-subtokenize/lib/splice-buffer.js
4602
4602
  /**
4603
4603
  * Some of the internal operations of micromark do lots of editing
4604
4604
  * operations on very large arrays. This runs into problems with two
@@ -4828,7 +4828,7 @@ function chunkedPush(list, right) {
4828
4828
  }
4829
4829
  }
4830
4830
  //#endregion
4831
- //#region node_modules/micromark-util-subtokenize/index.js
4831
+ //#region node_modules/.pnpm/micromark-util-subtokenize@2.1.0/node_modules/micromark-util-subtokenize/index.js
4832
4832
  /**
4833
4833
  * @import {Chunk, Event, Token} from 'micromark-util-types'
4834
4834
  */
@@ -4983,7 +4983,7 @@ function subcontent(events, eventIndex) {
4983
4983
  return gaps;
4984
4984
  }
4985
4985
  //#endregion
4986
- //#region node_modules/micromark-core-commonmark/lib/content.js
4986
+ //#region node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/content.js
4987
4987
  /**
4988
4988
  * @import {
4989
4989
  * Construct,
@@ -5116,7 +5116,7 @@ function tokenizeContinuation(effects, ok, nok) {
5116
5116
  }
5117
5117
  }
5118
5118
  //#endregion
5119
- //#region node_modules/micromark-factory-destination/index.js
5119
+ //#region node_modules/.pnpm/micromark-factory-destination@2.0.1/node_modules/micromark-factory-destination/index.js
5120
5120
  /**
5121
5121
  * @import {Effects, State, TokenType} from 'micromark-util-types'
5122
5122
  */
@@ -5300,7 +5300,7 @@ function factoryDestination(effects, ok, nok, type, literalType, literalMarkerTy
5300
5300
  }
5301
5301
  }
5302
5302
  //#endregion
5303
- //#region node_modules/micromark-factory-label/index.js
5303
+ //#region node_modules/.pnpm/micromark-factory-label@2.0.1/node_modules/micromark-factory-label/index.js
5304
5304
  /**
5305
5305
  * @import {
5306
5306
  * Effects,
@@ -5375,7 +5375,9 @@ function factoryLabel(effects, ok, nok, type, markerType, stringType) {
5375
5375
  * @type {State}
5376
5376
  */
5377
5377
  function atBreak(code) {
5378
- if (size > 999 || code === null || code === 91 || code === 93 && !seen || code === 94 && !size && "_hiddenFootnoteSupport" in self.parser.constructs) return nok(code);
5378
+ if (size > 999 || code === null || code === 91 || code === 93 && !seen ||
5379
+ /* c8 ignore next 3 */
5380
+ code === 94 && !size && "_hiddenFootnoteSupport" in self.parser.constructs) return nok(code);
5379
5381
  if (code === 93) {
5380
5382
  effects.exit(stringType);
5381
5383
  effects.enter(markerType);
@@ -5432,7 +5434,7 @@ function factoryLabel(effects, ok, nok, type, markerType, stringType) {
5432
5434
  }
5433
5435
  }
5434
5436
  //#endregion
5435
- //#region node_modules/micromark-factory-title/index.js
5437
+ //#region node_modules/.pnpm/micromark-factory-title@2.0.1/node_modules/micromark-factory-title/index.js
5436
5438
  /**
5437
5439
  * @import {
5438
5440
  * Code,
@@ -5577,7 +5579,7 @@ function factoryTitle(effects, ok, nok, type, markerType, stringType) {
5577
5579
  }
5578
5580
  }
5579
5581
  //#endregion
5580
- //#region node_modules/micromark-factory-whitespace/index.js
5582
+ //#region node_modules/.pnpm/micromark-factory-whitespace@2.0.1/node_modules/micromark-factory-whitespace/index.js
5581
5583
  /**
5582
5584
  * @import {Effects, State} from 'micromark-util-types'
5583
5585
  */
@@ -5617,7 +5619,7 @@ function factoryWhitespace(effects, ok) {
5617
5619
  }
5618
5620
  }
5619
5621
  //#endregion
5620
- //#region node_modules/micromark-core-commonmark/lib/definition.js
5622
+ //#region node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/definition.js
5621
5623
  /**
5622
5624
  * @import {
5623
5625
  * Construct,
@@ -5832,7 +5834,7 @@ function tokenizeTitleBefore(effects, ok, nok) {
5832
5834
  }
5833
5835
  }
5834
5836
  //#endregion
5835
- //#region node_modules/micromark-core-commonmark/lib/hard-break-escape.js
5837
+ //#region node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/hard-break-escape.js
5836
5838
  /**
5837
5839
  * @import {
5838
5840
  * Construct,
@@ -5889,7 +5891,7 @@ function tokenizeHardBreakEscape(effects, ok, nok) {
5889
5891
  }
5890
5892
  }
5891
5893
  //#endregion
5892
- //#region node_modules/micromark-core-commonmark/lib/heading-atx.js
5894
+ //#region node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/heading-atx.js
5893
5895
  /**
5894
5896
  * @import {
5895
5897
  * Construct,
@@ -6074,7 +6076,7 @@ function tokenizeHeadingAtx(effects, ok, nok) {
6074
6076
  }
6075
6077
  }
6076
6078
  //#endregion
6077
- //#region node_modules/micromark-util-html-tag-name/index.js
6079
+ //#region node_modules/.pnpm/micromark-util-html-tag-name@2.0.1/node_modules/micromark-util-html-tag-name/index.js
6078
6080
  /**
6079
6081
  * List of lowercase HTML “block” tag names.
6080
6082
  *
@@ -6173,7 +6175,7 @@ const htmlRawNames = [
6173
6175
  "textarea"
6174
6176
  ];
6175
6177
  //#endregion
6176
- //#region node_modules/micromark-core-commonmark/lib/html-flow.js
6178
+ //#region node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/html-flow.js
6177
6179
  /**
6178
6180
  * @import {
6179
6181
  * Code,
@@ -6946,7 +6948,7 @@ function tokenizeBlankLineBefore(effects, ok, nok) {
6946
6948
  }
6947
6949
  }
6948
6950
  //#endregion
6949
- //#region node_modules/micromark-core-commonmark/lib/html-text.js
6951
+ //#region node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/html-text.js
6950
6952
  /**
6951
6953
  * @import {
6952
6954
  * Code,
@@ -7560,7 +7562,7 @@ function tokenizeHtmlText(effects, ok, nok) {
7560
7562
  }
7561
7563
  }
7562
7564
  //#endregion
7563
- //#region node_modules/micromark-core-commonmark/lib/label-end.js
7565
+ //#region node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/label-end.js
7564
7566
  /**
7565
7567
  * @import {
7566
7568
  * Construct,
@@ -8030,7 +8032,7 @@ function tokenizeReferenceCollapsed(effects, ok, nok) {
8030
8032
  }
8031
8033
  }
8032
8034
  //#endregion
8033
- //#region node_modules/micromark-core-commonmark/lib/label-start-image.js
8035
+ //#region node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/label-start-image.js
8034
8036
  /**
8035
8037
  * @import {
8036
8038
  * Construct,
@@ -8123,7 +8125,7 @@ function tokenizeLabelStartImage(effects, ok, nok) {
8123
8125
  }
8124
8126
  }
8125
8127
  //#endregion
8126
- //#region node_modules/micromark-core-commonmark/lib/label-start-link.js
8128
+ //#region node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/label-start-link.js
8127
8129
  /**
8128
8130
  * @import {
8129
8131
  * Construct,
@@ -8171,7 +8173,7 @@ function tokenizeLabelStartLink(effects, ok, nok) {
8171
8173
  }
8172
8174
  }
8173
8175
  //#endregion
8174
- //#region node_modules/micromark-core-commonmark/lib/line-ending.js
8176
+ //#region node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/line-ending.js
8175
8177
  /**
8176
8178
  * @import {
8177
8179
  * Construct,
@@ -8201,7 +8203,7 @@ function tokenizeLineEnding(effects, ok) {
8201
8203
  }
8202
8204
  }
8203
8205
  //#endregion
8204
- //#region node_modules/micromark-core-commonmark/lib/thematic-break.js
8206
+ //#region node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/thematic-break.js
8205
8207
  /**
8206
8208
  * @import {
8207
8209
  * Code,
@@ -8296,7 +8298,7 @@ function tokenizeThematicBreak(effects, ok, nok) {
8296
8298
  }
8297
8299
  }
8298
8300
  //#endregion
8299
- //#region node_modules/micromark-core-commonmark/lib/list.js
8301
+ //#region node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/list.js
8300
8302
  /**
8301
8303
  * @import {
8302
8304
  * Code,
@@ -8468,7 +8470,7 @@ function tokenizeListItemPrefixWhitespace(effects, ok, nok) {
8468
8470
  }
8469
8471
  }
8470
8472
  //#endregion
8471
- //#region node_modules/micromark-core-commonmark/lib/setext-underline.js
8473
+ //#region node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/setext-underline.js
8472
8474
  /**
8473
8475
  * @import {
8474
8476
  * Code,
@@ -8620,7 +8622,7 @@ function tokenizeSetextUnderline(effects, ok, nok) {
8620
8622
  }
8621
8623
  }
8622
8624
  //#endregion
8623
- //#region node_modules/micromark/lib/initialize/flow.js
8625
+ //#region node_modules/.pnpm/micromark@4.0.2_supports-color@10.2.2/node_modules/micromark/lib/initialize/flow.js
8624
8626
  /**
8625
8627
  * @import {
8626
8628
  * InitialConstruct,
@@ -8667,7 +8669,7 @@ function initializeFlow(effects) {
8667
8669
  }
8668
8670
  }
8669
8671
  //#endregion
8670
- //#region node_modules/micromark/lib/initialize/text.js
8672
+ //#region node_modules/.pnpm/micromark@4.0.2_supports-color@10.2.2/node_modules/micromark/lib/initialize/text.js
8671
8673
  /**
8672
8674
  * @import {
8673
8675
  * Code,
@@ -8844,7 +8846,7 @@ function resolveAllLineSuffixes(events, context) {
8844
8846
  return events;
8845
8847
  }
8846
8848
  //#endregion
8847
- //#region node_modules/micromark/lib/constructs.js
8849
+ //#region node_modules/.pnpm/micromark@4.0.2_supports-color@10.2.2/node_modules/micromark/lib/constructs.js
8848
8850
  /**
8849
8851
  * @import {Extension} from 'micromark-util-types'
8850
8852
  */
@@ -8922,7 +8924,7 @@ const attentionMarkers = { null: [42, 95] };
8922
8924
  /** @satisfies {Extension['disable']} */
8923
8925
  const disable = { null: [] };
8924
8926
  //#endregion
8925
- //#region node_modules/micromark/lib/create-tokenizer.js
8927
+ //#region node_modules/.pnpm/micromark@4.0.2_supports-color@10.2.2/node_modules/micromark/lib/create-tokenizer.js
8926
8928
  /**
8927
8929
  * @import {
8928
8930
  * Chunk,
@@ -9391,7 +9393,7 @@ function serializeChunks(chunks, expandTabs) {
9391
9393
  return result.join("");
9392
9394
  }
9393
9395
  //#endregion
9394
- //#region node_modules/micromark/lib/parse.js
9396
+ //#region node_modules/.pnpm/micromark@4.0.2_supports-color@10.2.2/node_modules/micromark/lib/parse.js
9395
9397
  /**
9396
9398
  * @import {
9397
9399
  * Create,
@@ -9435,7 +9437,7 @@ function parse(options) {
9435
9437
  }
9436
9438
  }
9437
9439
  //#endregion
9438
- //#region node_modules/micromark/lib/postprocess.js
9440
+ //#region node_modules/.pnpm/micromark@4.0.2_supports-color@10.2.2/node_modules/micromark/lib/postprocess.js
9439
9441
  /**
9440
9442
  * @import {Event} from 'micromark-util-types'
9441
9443
  */
@@ -9450,7 +9452,7 @@ function postprocess(events) {
9450
9452
  return events;
9451
9453
  }
9452
9454
  //#endregion
9453
- //#region node_modules/micromark/lib/preprocess.js
9455
+ //#region node_modules/.pnpm/micromark@4.0.2_supports-color@10.2.2/node_modules/micromark/lib/preprocess.js
9454
9456
  /**
9455
9457
  * @import {Chunk, Code, Encoding, Value} from 'micromark-util-types'
9456
9458
  */
@@ -9551,7 +9553,7 @@ function preprocess() {
9551
9553
  }
9552
9554
  }
9553
9555
  //#endregion
9554
- //#region node_modules/micromark-util-decode-string/index.js
9556
+ //#region node_modules/.pnpm/micromark-util-decode-string@2.0.1/node_modules/micromark-util-decode-string/index.js
9555
9557
  const characterEscapeOrReference = /\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;
9556
9558
  /**
9557
9559
  * Decode markdown strings (which occur in places such as fenced code info
@@ -9588,7 +9590,7 @@ function decode($0, $1, $2) {
9588
9590
  return decodeNamedCharacterReference($2) || $0;
9589
9591
  }
9590
9592
  //#endregion
9591
- //#region node_modules/unist-util-stringify-position/lib/index.js
9593
+ //#region node_modules/.pnpm/unist-util-stringify-position@4.0.0/node_modules/unist-util-stringify-position/lib/index.js
9592
9594
  /**
9593
9595
  * @typedef {import('unist').Node} Node
9594
9596
  * @typedef {import('unist').Point} Point
@@ -9652,7 +9654,7 @@ function index(value) {
9652
9654
  return value && typeof value === "number" ? value : 1;
9653
9655
  }
9654
9656
  //#endregion
9655
- //#region node_modules/mdast-util-from-markdown/lib/index.js
9657
+ //#region node_modules/.pnpm/mdast-util-from-markdown@2.0.3_supports-color@10.2.2/node_modules/mdast-util-from-markdown/lib/index.js
9656
9658
  /**
9657
9659
  * @import {
9658
9660
  * Break,
@@ -9867,8 +9869,10 @@ function compiler(options) {
9867
9869
  /** @type {Array<number>} */
9868
9870
  const listStack = [];
9869
9871
  let index = -1;
9870
- while (++index < events.length) if (events[index][1].type === "listOrdered" || events[index][1].type === "listUnordered") if (events[index][0] === "enter") listStack.push(index);
9871
- else index = prepareList(events, listStack.pop(), index);
9872
+ while (++index < events.length) if (events[index][1].type === "listOrdered" || events[index][1].type === "listUnordered") {
9873
+ if (events[index][0] === "enter") listStack.push(index);
9874
+ else index = prepareList(events, listStack.pop(), index);
9875
+ }
9872
9876
  index = -1;
9873
9877
  while (++index < events.length) {
9874
9878
  const handler = config[events[index][0]];
@@ -10058,8 +10062,10 @@ function compiler(options) {
10058
10062
  start: token.start,
10059
10063
  end: token.end
10060
10064
  }) + "): it’s not open");
10061
- else if (open[0].type !== token.type) if (onExitError) onExitError.call(this, token, open[0]);
10062
- else (open[1] || defaultOnError).call(this, token, open[0]);
10065
+ else if (open[0].type !== token.type) {
10066
+ if (onExitError) onExitError.call(this, token, open[0]);
10067
+ else (open[1] || defaultOnError).call(this, token, open[0]);
10068
+ }
10063
10069
  node.position.end = point(token.end);
10064
10070
  }
10065
10071
  /**
@@ -10618,7 +10624,7 @@ function defaultOnError(left, right) {
10618
10624
  }) + ") is still open");
10619
10625
  }
10620
10626
  //#endregion
10621
- //#region node_modules/mdast-util-gfm-table/lib/index.js
10627
+ //#region node_modules/.pnpm/mdast-util-gfm-table@2.0.0_supports-color@10.2.2/node_modules/mdast-util-gfm-table/lib/index.js
10622
10628
  /**
10623
10629
  * @typedef {import('mdast').InlineCode} InlineCode
10624
10630
  * @typedef {import('mdast').Table} Table
@@ -10743,7 +10749,7 @@ function replace($0, $1) {
10743
10749
  return $1 === "|" ? $1 : $0;
10744
10750
  }
10745
10751
  //#endregion
10746
- //#region node_modules/micromark-extension-gfm-table/lib/edit-map.js
10752
+ //#region node_modules/.pnpm/micromark-extension-gfm-table@2.1.1/node_modules/micromark-extension-gfm-table/lib/edit-map.js
10747
10753
  /**
10748
10754
  * @import {Event} from 'micromark-util-types'
10749
10755
  */
@@ -10835,7 +10841,7 @@ function addImplementation(editMap, at, remove, add) {
10835
10841
  ]);
10836
10842
  }
10837
10843
  //#endregion
10838
- //#region node_modules/micromark-extension-gfm-table/lib/infer.js
10844
+ //#region node_modules/.pnpm/micromark-extension-gfm-table@2.1.1/node_modules/micromark-extension-gfm-table/lib/infer.js
10839
10845
  /**
10840
10846
  * @import {Event} from 'micromark-util-types'
10841
10847
  */
@@ -10873,7 +10879,7 @@ function gfmTableAlign(events, index) {
10873
10879
  return align;
10874
10880
  }
10875
10881
  //#endregion
10876
- //#region node_modules/micromark-extension-gfm-table/lib/syntax.js
10882
+ //#region node_modules/.pnpm/micromark-extension-gfm-table@2.1.1/node_modules/micromark-extension-gfm-table/lib/syntax.js
10877
10883
  /**
10878
10884
  * @import {Event, Extension, Point, Resolver, State, Token, TokenizeContext, Tokenizer} from 'micromark-util-types'
10879
10885
  */
@@ -11416,19 +11422,21 @@ function resolveTable(events, context) {
11416
11422
  }
11417
11423
  cell[2] = index;
11418
11424
  }
11419
- } else if (token.type === "tableCellDivider") if (inFirstCellAwaitingPipe) inFirstCellAwaitingPipe = false;
11420
- else {
11421
- if (lastCell[1] !== 0) {
11422
- cell[0] = cell[1];
11423
- currentCell = flushCell(map, context, lastCell, rowKind, void 0, currentCell);
11425
+ } else if (token.type === "tableCellDivider") {
11426
+ if (inFirstCellAwaitingPipe) inFirstCellAwaitingPipe = false;
11427
+ else {
11428
+ if (lastCell[1] !== 0) {
11429
+ cell[0] = cell[1];
11430
+ currentCell = flushCell(map, context, lastCell, rowKind, void 0, currentCell);
11431
+ }
11432
+ lastCell = cell;
11433
+ cell = [
11434
+ lastCell[1],
11435
+ index,
11436
+ 0,
11437
+ 0
11438
+ ];
11424
11439
  }
11425
- lastCell = cell;
11426
- cell = [
11427
- lastCell[1],
11428
- index,
11429
- 0,
11430
- 0
11431
- ];
11432
11440
  }
11433
11441
  } else if (token.type === "tableHead") {
11434
11442
  afterHeadAwaitingFirstBodyRow = true;
@@ -11681,6 +11689,7 @@ function findNextLineEnding(text, start) {
11681
11689
  }
11682
11690
  function parseMarkdownOwnership(text) {
11683
11691
  if (!text) return {
11692
+ blockCodeSpans: [],
11684
11693
  codeSpans: [],
11685
11694
  retainStart: 0
11686
11695
  };
@@ -11689,6 +11698,7 @@ function parseMarkdownOwnership(text) {
11689
11698
  mdastExtensions: [gfmTableFromMarkdown()]
11690
11699
  });
11691
11700
  const spans = [];
11701
+ const blockSpans = [];
11692
11702
  const pending = [tree];
11693
11703
  while (pending.length > 0) {
11694
11704
  const node = pending.pop();
@@ -11696,7 +11706,10 @@ function parseMarkdownOwnership(text) {
11696
11706
  if (node.type === "code" || node.type === "inlineCode") {
11697
11707
  const start = node.position?.start?.offset;
11698
11708
  const end = node.position?.end?.offset;
11699
- if (start !== void 0 && end !== void 0) spans.push([start, end]);
11709
+ if (start !== void 0 && end !== void 0) {
11710
+ spans.push([start, end]);
11711
+ if (node.type === "code") blockSpans.push([start, end]);
11712
+ }
11700
11713
  }
11701
11714
  const children = node.children ?? [];
11702
11715
  for (let index = children.length - 1; index >= 0; index -= 1) {
@@ -11706,6 +11719,7 @@ function parseMarkdownOwnership(text) {
11706
11719
  }
11707
11720
  const rootChildren = tree.children ?? [];
11708
11721
  return {
11722
+ blockCodeSpans: blockSpans.toSorted((left, right) => left[0] - right[0]),
11709
11723
  codeSpans: spans.toSorted((left, right) => left[0] - right[0]),
11710
11724
  retainStart: rootChildren.at(-1)?.position?.start?.offset ?? text.length
11711
11725
  };
@@ -11821,8 +11835,10 @@ function reduceReasoningText(text, codeSpans, state, options) {
11821
11835
  append(text.slice(cursor));
11822
11836
  if (options.final && state.depth > 0 && state.pending) {
11823
11837
  const pending = state.pending;
11824
- if (!pending.containsPrivate) if (options.mode === "static-preserve" || options.mode === "static-strict" && !pending.visibleBefore && !pending.protectedClose || options.mode === "visible" && !pending.protectedClose) emit("text", options.mode === "visible" && pending.visibleBefore ? pending.openTag + pending.content : pending.content);
11825
- else emit("thinking", pending.content);
11838
+ if (!pending.containsPrivate) {
11839
+ if (options.mode === "static-preserve" || options.mode === "static-strict" && !pending.visibleBefore && !pending.protectedClose || options.mode === "visible" && !pending.protectedClose) emit("text", options.mode === "visible" && pending.visibleBefore ? pending.openTag + pending.content : pending.content);
11840
+ else emit("thinking", pending.content);
11841
+ }
11826
11842
  state.depth = 0;
11827
11843
  state.pending = void 0;
11828
11844
  }
@@ -0,0 +1,15 @@
1
+ import { createRequire } from "node:module";
2
+ //#region \0rolldown/runtime.js
3
+ var __defProp = Object.defineProperty;
4
+ var __exportAll = (all, no_symbols) => {
5
+ let target = {};
6
+ for (var name in all) __defProp(target, name, {
7
+ get: all[name],
8
+ enumerable: true
9
+ });
10
+ if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
11
+ return target;
12
+ };
13
+ var __require = /* #__PURE__ */ (() => createRequire(import.meta.url))();
14
+ //#endregion
15
+ export { __require as n, __exportAll as t };
@@ -1,14 +1,8 @@
1
- import { a as requiresClaudeMandatoryAdaptiveThinking, l as resolveClaudeNativeThinkingLevelMap } from "./src-Bu3FiFAG.mjs";
1
+ import { c as requiresClaudeMandatoryAdaptiveThinking, f as resolveClaudeNativeThinkingLevelMap, t as calculateUsageCost } from "./src-C8U7lkoa.mjs";
2
2
  //#region packages/ai/src/model-utils.ts
3
3
  /** Calculates and stores model cost fields from token usage and per-million pricing. */
4
4
  function calculateCost(model, usage) {
5
- const cacheWrite1h = Math.min(usage.cacheWrite, Math.max(0, usage.cacheWrite1h ?? 0));
6
- const cacheWrite5m = usage.cacheWrite - cacheWrite1h;
7
- usage.cost.input = model.cost.input / 1e6 * usage.input;
8
- usage.cost.output = model.cost.output / 1e6 * usage.output;
9
- usage.cost.cacheRead = model.cost.cacheRead / 1e6 * usage.cacheRead;
10
- usage.cost.cacheWrite = (model.cost.cacheWrite * cacheWrite5m + model.cost.input * 2 * cacheWrite1h) / 1e6;
11
- usage.cost.total = usage.cost.input + usage.cost.output + usage.cost.cacheRead + usage.cost.cacheWrite;
5
+ Object.assign(usage.cost, calculateUsageCost(usage, model.cost));
12
6
  return usage.cost;
13
7
  }
14
8
  /** Replaces the catalog estimate when the provider reports an authoritative billed total. */