@nodetool-ai/protocol 0.8.3 → 0.8.4-a24.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 (149) hide show
  1. package/dist/.nodetool-build-stamp +1 -1
  2. package/dist/api-schemas/applications.d.ts +4 -0
  3. package/dist/api-schemas/applications.d.ts.map +1 -1
  4. package/dist/api-schemas/applications.js +4 -1
  5. package/dist/api-schemas/applications.js.map +1 -1
  6. package/dist/api-schemas/nodes.d.ts +2 -0
  7. package/dist/api-schemas/nodes.d.ts.map +1 -1
  8. package/dist/api-schemas/nodes.js +2 -1
  9. package/dist/api-schemas/nodes.js.map +1 -1
  10. package/dist/api-schemas/recipes.d.ts +8 -0
  11. package/dist/api-schemas/recipes.d.ts.map +1 -1
  12. package/dist/api-schemas/sdk-execution-v1.d.ts +81 -0
  13. package/dist/api-schemas/sdk-execution-v1.d.ts.map +1 -1
  14. package/dist/api-schemas/sdk-v1-http-operations.d.ts +2 -0
  15. package/dist/api-schemas/sdk-v1-http-operations.d.ts.map +1 -1
  16. package/dist/api-schemas/timeline-tool-contracts.d.ts +56 -0
  17. package/dist/api-schemas/timeline-tool-contracts.d.ts.map +1 -1
  18. package/dist/api-schemas/timeline-tool-contracts.js +4 -2
  19. package/dist/api-schemas/timeline-tool-contracts.js.map +1 -1
  20. package/dist/api-schemas/timeline.d.ts +478 -0
  21. package/dist/api-schemas/timeline.d.ts.map +1 -1
  22. package/dist/api-schemas/timeline.js +40 -0
  23. package/dist/api-schemas/timeline.js.map +1 -1
  24. package/dist/api-schemas/workflows.d.ts +24 -0
  25. package/dist/api-schemas/workflows.d.ts.map +1 -1
  26. package/dist/api-schemas/workflows.js +3 -0
  27. package/dist/api-schemas/workflows.js.map +1 -1
  28. package/dist/api-types.d.ts +13 -1
  29. package/dist/api-types.d.ts.map +1 -1
  30. package/dist/api-types.js +9 -1
  31. package/dist/api-types.js.map +1 -1
  32. package/dist/cloud-profile.d.ts.map +1 -1
  33. package/dist/cloud-profile.js +3 -0
  34. package/dist/cloud-profile.js.map +1 -1
  35. package/dist/custom-providers.js +1 -1
  36. package/dist/custom-providers.js.map +1 -1
  37. package/dist/example-needs.d.ts +24 -0
  38. package/dist/example-needs.d.ts.map +1 -0
  39. package/dist/example-needs.js +64 -0
  40. package/dist/example-needs.js.map +1 -0
  41. package/dist/game-particles.d.ts +74 -0
  42. package/dist/game-particles.d.ts.map +1 -1
  43. package/dist/game-particles.js +40 -1
  44. package/dist/game-particles.js.map +1 -1
  45. package/dist/game-saves.d.ts +73 -0
  46. package/dist/game-saves.d.ts.map +1 -0
  47. package/dist/game-saves.js +87 -0
  48. package/dist/game-saves.js.map +1 -0
  49. package/dist/game-screens.d.ts +2031 -0
  50. package/dist/game-screens.d.ts.map +1 -0
  51. package/dist/game-screens.js +89 -0
  52. package/dist/game-screens.js.map +1 -0
  53. package/dist/game2d/components/entity-components.d.ts +20 -0
  54. package/dist/game2d/components/entity-components.d.ts.map +1 -1
  55. package/dist/game2d/components/music.d.ts +4 -0
  56. package/dist/game2d/components/music.d.ts.map +1 -1
  57. package/dist/game2d/components/music.js +12 -1
  58. package/dist/game2d/components/music.js.map +1 -1
  59. package/dist/game2d/index.d.ts +1099 -0
  60. package/dist/game2d/index.d.ts.map +1 -1
  61. package/dist/game2d/index.js +7 -1
  62. package/dist/game2d/index.js.map +1 -1
  63. package/dist/game3d/components/animation-graph.d.ts +1 -0
  64. package/dist/game3d/components/animation-graph.d.ts.map +1 -1
  65. package/dist/game3d/components/animation-graph.js +1 -1
  66. package/dist/game3d/components/animation-graph.js.map +1 -1
  67. package/dist/game3d/components/assets.d.ts +30 -0
  68. package/dist/game3d/components/assets.d.ts.map +1 -1
  69. package/dist/game3d/components/assets.js +4 -1
  70. package/dist/game3d/components/assets.js.map +1 -1
  71. package/dist/game3d/components/collider.d.ts +65 -0
  72. package/dist/game3d/components/collider.d.ts.map +1 -1
  73. package/dist/game3d/components/collider.js +6 -1
  74. package/dist/game3d/components/collider.js.map +1 -1
  75. package/dist/game3d/components/force-command.d.ts +30 -0
  76. package/dist/game3d/components/force-command.d.ts.map +1 -0
  77. package/dist/game3d/components/force-command.js +10 -0
  78. package/dist/game3d/components/force-command.js.map +1 -0
  79. package/dist/game3d/components/material.d.ts +66 -0
  80. package/dist/game3d/components/material.d.ts.map +1 -1
  81. package/dist/game3d/components/material.js +13 -2
  82. package/dist/game3d/components/material.js.map +1 -1
  83. package/dist/game3d/components/model.d.ts +54 -0
  84. package/dist/game3d/components/model.d.ts.map +1 -1
  85. package/dist/game3d/components/model.js +1 -0
  86. package/dist/game3d/components/model.js.map +1 -1
  87. package/dist/game3d/components/performance.js +1 -1
  88. package/dist/game3d/components/performance.js.map +1 -1
  89. package/dist/game3d/components/physics-material.d.ts +50 -0
  90. package/dist/game3d/components/physics-material.d.ts.map +1 -0
  91. package/dist/game3d/components/physics-material.js +20 -0
  92. package/dist/game3d/components/physics-material.js.map +1 -0
  93. package/dist/game3d/components/primitive.d.ts +54 -0
  94. package/dist/game3d/components/primitive.d.ts.map +1 -1
  95. package/dist/game3d/components/primitive.js +2 -1
  96. package/dist/game3d/components/primitive.js.map +1 -1
  97. package/dist/game3d/index.d.ts +9828 -3715
  98. package/dist/game3d/index.d.ts.map +1 -1
  99. package/dist/game3d/index.js +30 -8
  100. package/dist/game3d/index.js.map +1 -1
  101. package/dist/game3d/presets.d.ts +97 -0
  102. package/dist/game3d/presets.d.ts.map +1 -0
  103. package/dist/game3d/presets.js +52 -0
  104. package/dist/game3d/presets.js.map +1 -0
  105. package/dist/index.d.ts +6 -0
  106. package/dist/index.d.ts.map +1 -1
  107. package/dist/index.js +5 -0
  108. package/dist/index.js.map +1 -1
  109. package/dist/messages.d.ts +302 -0
  110. package/dist/messages.d.ts.map +1 -1
  111. package/dist/messages.js +7 -1
  112. package/dist/messages.js.map +1 -1
  113. package/dist/missing-pack.d.ts +45 -0
  114. package/dist/missing-pack.d.ts.map +1 -0
  115. package/dist/missing-pack.js +53 -0
  116. package/dist/missing-pack.js.map +1 -0
  117. package/dist/missing-runtime-package.d.ts +56 -2
  118. package/dist/missing-runtime-package.d.ts.map +1 -1
  119. package/dist/missing-runtime-package.js +141 -6
  120. package/dist/missing-runtime-package.js.map +1 -1
  121. package/dist/processing-messages.schema.json +357 -0
  122. package/dist/python-packs.d.ts +2 -0
  123. package/dist/python-packs.d.ts.map +1 -1
  124. package/dist/python-packs.js +5 -0
  125. package/dist/python-packs.js.map +1 -1
  126. package/dist/reasoning-effort.d.ts +15 -0
  127. package/dist/reasoning-effort.d.ts.map +1 -0
  128. package/dist/reasoning-effort.js +76 -0
  129. package/dist/reasoning-effort.js.map +1 -0
  130. package/dist/resource-id.d.ts +10 -0
  131. package/dist/resource-id.d.ts.map +1 -1
  132. package/dist/resource-id.js +21 -0
  133. package/dist/resource-id.js.map +1 -1
  134. package/dist/runtime-npm-packages.d.ts +101 -0
  135. package/dist/runtime-npm-packages.d.ts.map +1 -0
  136. package/dist/runtime-npm-packages.js +124 -0
  137. package/dist/runtime-npm-packages.js.map +1 -0
  138. package/dist/screenplay-authoring.js +1 -1
  139. package/dist/screenplay-authoring.js.map +1 -1
  140. package/dist/token-providers.d.ts.map +1 -1
  141. package/dist/token-providers.js +3 -1
  142. package/dist/token-providers.js.map +1 -1
  143. package/dist/workflow-plan.d.ts.map +1 -1
  144. package/dist/workflow-plan.js +39 -40
  145. package/dist/workflow-plan.js.map +1 -1
  146. package/package.json +8 -1
  147. package/schema/sdk-v1.discovery.schema.json +4 -2
  148. package/schema/sdk-v1.execution.schema.json +714 -0
  149. package/schema/sdk-v1.manifest.json +2 -2
@@ -147,6 +147,139 @@
147
147
  "type": "null"
148
148
  }
149
149
  ]
150
+ },
151
+ "missing_pack": {
152
+ "anyOf": [
153
+ {
154
+ "type": "object",
155
+ "properties": {
156
+ "error": {
157
+ "type": "string",
158
+ "const": "missing_pack"
159
+ },
160
+ "packs": {
161
+ "readOnly": true,
162
+ "type": "array",
163
+ "items": {
164
+ "readOnly": true,
165
+ "type": "object",
166
+ "properties": {
167
+ "id": {
168
+ "type": "string"
169
+ },
170
+ "npm": {
171
+ "type": "string"
172
+ },
173
+ "version": {
174
+ "type": "string"
175
+ },
176
+ "installBytes": {
177
+ "type": "number",
178
+ "minimum": 0
179
+ },
180
+ "requires": {
181
+ "readOnly": true,
182
+ "type": "array",
183
+ "items": {
184
+ "type": "string"
185
+ }
186
+ }
187
+ },
188
+ "required": [
189
+ "id",
190
+ "npm",
191
+ "version",
192
+ "installBytes",
193
+ "requires"
194
+ ],
195
+ "additionalProperties": false
196
+ }
197
+ },
198
+ "runtimeLibraries": {
199
+ "readOnly": true,
200
+ "type": "array",
201
+ "items": {
202
+ "type": "string"
203
+ }
204
+ },
205
+ "nodeTypes": {
206
+ "readOnly": true,
207
+ "type": "array",
208
+ "items": {
209
+ "type": "string"
210
+ }
211
+ },
212
+ "install": {
213
+ "oneOf": [
214
+ {
215
+ "type": "object",
216
+ "properties": {
217
+ "supported": {
218
+ "type": "boolean",
219
+ "const": true
220
+ },
221
+ "reason": {
222
+ "type": "null"
223
+ },
224
+ "command": {
225
+ "anyOf": [
226
+ {
227
+ "type": "string"
228
+ },
229
+ {
230
+ "type": "null"
231
+ }
232
+ ]
233
+ }
234
+ },
235
+ "required": [
236
+ "supported",
237
+ "reason",
238
+ "command"
239
+ ],
240
+ "additionalProperties": false
241
+ },
242
+ {
243
+ "type": "object",
244
+ "properties": {
245
+ "supported": {
246
+ "type": "boolean",
247
+ "const": false
248
+ },
249
+ "reason": {
250
+ "type": "string"
251
+ },
252
+ "command": {
253
+ "type": "null"
254
+ }
255
+ },
256
+ "required": [
257
+ "supported",
258
+ "reason",
259
+ "command"
260
+ ],
261
+ "additionalProperties": false
262
+ }
263
+ ]
264
+ },
265
+ "restartRequired": {
266
+ "type": "boolean"
267
+ }
268
+ },
269
+ "required": [
270
+ "error",
271
+ "packs",
272
+ "runtimeLibraries",
273
+ "nodeTypes",
274
+ "install",
275
+ "restartRequired"
276
+ ],
277
+ "additionalProperties": false
278
+ },
279
+ {
280
+ "type": "null"
281
+ }
282
+ ]
150
283
  }
151
284
  },
152
285
  "required": [
@@ -202,6 +335,230 @@
202
335
  }
203
336
  ]
204
337
  },
338
+ "missing_runtime": {
339
+ "anyOf": [
340
+ {
341
+ "type": "object",
342
+ "properties": {
343
+ "runtimePackage": {
344
+ "type": "string",
345
+ "enum": [
346
+ "python",
347
+ "nodejs",
348
+ "ffmpeg",
349
+ "pandoc",
350
+ "pdftotext",
351
+ "yt-dlp",
352
+ "rust",
353
+ "manimgx",
354
+ "transformers-js",
355
+ "tensorflow-js",
356
+ "node-llama-cpp",
357
+ "whisper-cpp",
358
+ "playwright",
359
+ "pdf-js",
360
+ "office-documents",
361
+ "tesseract-ocr",
362
+ "fabric",
363
+ "email-imap",
364
+ "tokenizer",
365
+ "imaging",
366
+ "typescript",
367
+ "tracing",
368
+ "rapier",
369
+ "esbuild"
370
+ ]
371
+ },
372
+ "missing": {
373
+ "type": "string"
374
+ },
375
+ "reason": {
376
+ "type": "string",
377
+ "enum": [
378
+ "missing",
379
+ "incompatible",
380
+ "broken"
381
+ ]
382
+ },
383
+ "managed": {
384
+ "anyOf": [
385
+ {
386
+ "type": "string"
387
+ },
388
+ {
389
+ "type": "null"
390
+ }
391
+ ]
392
+ },
393
+ "bringYourOwn": {
394
+ "anyOf": [
395
+ {
396
+ "type": "string"
397
+ },
398
+ {
399
+ "type": "null"
400
+ }
401
+ ]
402
+ },
403
+ "restart": {
404
+ "anyOf": [
405
+ {
406
+ "type": "string"
407
+ },
408
+ {
409
+ "type": "null"
410
+ }
411
+ ]
412
+ }
413
+ },
414
+ "required": [
415
+ "runtimePackage",
416
+ "missing",
417
+ "reason",
418
+ "managed",
419
+ "bringYourOwn",
420
+ "restart"
421
+ ],
422
+ "additionalProperties": false
423
+ },
424
+ {
425
+ "type": "null"
426
+ }
427
+ ]
428
+ },
429
+ "missing_pack": {
430
+ "anyOf": [
431
+ {
432
+ "type": "object",
433
+ "properties": {
434
+ "error": {
435
+ "type": "string",
436
+ "const": "missing_pack"
437
+ },
438
+ "packs": {
439
+ "readOnly": true,
440
+ "type": "array",
441
+ "items": {
442
+ "readOnly": true,
443
+ "type": "object",
444
+ "properties": {
445
+ "id": {
446
+ "type": "string"
447
+ },
448
+ "npm": {
449
+ "type": "string"
450
+ },
451
+ "version": {
452
+ "type": "string"
453
+ },
454
+ "installBytes": {
455
+ "type": "number",
456
+ "minimum": 0
457
+ },
458
+ "requires": {
459
+ "readOnly": true,
460
+ "type": "array",
461
+ "items": {
462
+ "type": "string"
463
+ }
464
+ }
465
+ },
466
+ "required": [
467
+ "id",
468
+ "npm",
469
+ "version",
470
+ "installBytes",
471
+ "requires"
472
+ ],
473
+ "additionalProperties": false
474
+ }
475
+ },
476
+ "runtimeLibraries": {
477
+ "readOnly": true,
478
+ "type": "array",
479
+ "items": {
480
+ "type": "string"
481
+ }
482
+ },
483
+ "nodeTypes": {
484
+ "readOnly": true,
485
+ "type": "array",
486
+ "items": {
487
+ "type": "string"
488
+ }
489
+ },
490
+ "install": {
491
+ "oneOf": [
492
+ {
493
+ "type": "object",
494
+ "properties": {
495
+ "supported": {
496
+ "type": "boolean",
497
+ "const": true
498
+ },
499
+ "reason": {
500
+ "type": "null"
501
+ },
502
+ "command": {
503
+ "anyOf": [
504
+ {
505
+ "type": "string"
506
+ },
507
+ {
508
+ "type": "null"
509
+ }
510
+ ]
511
+ }
512
+ },
513
+ "required": [
514
+ "supported",
515
+ "reason",
516
+ "command"
517
+ ],
518
+ "additionalProperties": false
519
+ },
520
+ {
521
+ "type": "object",
522
+ "properties": {
523
+ "supported": {
524
+ "type": "boolean",
525
+ "const": false
526
+ },
527
+ "reason": {
528
+ "type": "string"
529
+ },
530
+ "command": {
531
+ "type": "null"
532
+ }
533
+ },
534
+ "required": [
535
+ "supported",
536
+ "reason",
537
+ "command"
538
+ ],
539
+ "additionalProperties": false
540
+ }
541
+ ]
542
+ },
543
+ "restartRequired": {
544
+ "type": "boolean"
545
+ }
546
+ },
547
+ "required": [
548
+ "error",
549
+ "packs",
550
+ "runtimeLibraries",
551
+ "nodeTypes",
552
+ "install",
553
+ "restartRequired"
554
+ ],
555
+ "additionalProperties": false
556
+ },
557
+ {
558
+ "type": "null"
559
+ }
560
+ ]
561
+ },
205
562
  "provider": {
206
563
  "anyOf": [
207
564
  {
@@ -34,6 +34,8 @@ export interface PythonNodePack {
34
34
  /** What the pack needs, named in the refusal on an unsupported platform. */
35
35
  platformRequirement?: string;
36
36
  }
37
+ /** A declared Python-pack namespace, including its node type suffix. */
38
+ export declare function isPythonNodeType(nodeType: string): boolean;
37
39
  export declare const PYTHON_NODE_PACKS: readonly PythonNodePack[];
38
40
  /** The catalog pack with this GitHub `owner/repo` id, if any. */
39
41
  export declare function findPythonNodePack(repoId: string): PythonNodePack | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"python-packs.d.ts","sourceRoot":"","sources":["../src/python-packs.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,uEAAuE;AACvE,MAAM,MAAM,kBAAkB,GAAG,GAAG,MAAM,IAAI,MAAM,EAAE,CAAC;AAEvD,MAAM,WAAW,cAAc;IAC7B,iDAAiD;IACjD,IAAI,EAAE,MAAM,CAAC;IACb,wEAAwE;IACxE,OAAO,EAAE,MAAM,CAAC;IAChB,+DAA+D;IAC/D,WAAW,EAAE,MAAM,CAAC;IACpB,oEAAoE;IACpE,UAAU,EAAE,SAAS,MAAM,EAAE,CAAC;IAC9B;;;;OAIG;IACH,SAAS,CAAC,EAAE,SAAS,kBAAkB,EAAE,CAAC;IAC1C;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,4EAA4E;IAC5E,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B;AAED,eAAO,MAAM,iBAAiB,EAAE,SAAS,cAAc,EA4CtD,CAAC;AAEF,iEAAiE;AACjE,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,MAAM,GACb,cAAc,GAAG,SAAS,CAG5B;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,cAAc,EACpB,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,EACZ,SAAS,CAAC,EAAE,MAAM,GACjB,OAAO,CAWT"}
1
+ {"version":3,"file":"python-packs.d.ts","sourceRoot":"","sources":["../src/python-packs.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,uEAAuE;AACvE,MAAM,MAAM,kBAAkB,GAAG,GAAG,MAAM,IAAI,MAAM,EAAE,CAAC;AAEvD,MAAM,WAAW,cAAc;IAC7B,iDAAiD;IACjD,IAAI,EAAE,MAAM,CAAC;IACb,wEAAwE;IACxE,OAAO,EAAE,MAAM,CAAC;IAChB,+DAA+D;IAC/D,WAAW,EAAE,MAAM,CAAC;IACpB,oEAAoE;IACpE,UAAU,EAAE,SAAS,MAAM,EAAE,CAAC;IAC9B;;;;OAIG;IACH,SAAS,CAAC,EAAE,SAAS,kBAAkB,EAAE,CAAC;IAC1C;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,4EAA4E;IAC5E,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B;AAED,wEAAwE;AACxE,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAK1D;AAED,eAAO,MAAM,iBAAiB,EAAE,SAAS,cAAc,EA4CtD,CAAC;AAEF,iEAAiE;AACjE,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,MAAM,GACb,cAAc,GAAG,SAAS,CAG5B;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,cAAc,EACpB,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,EACZ,SAAS,CAAC,EAAE,MAAM,GACjB,OAAO,CAWT"}
@@ -9,6 +9,11 @@
9
9
  * version. Compatibility with the app is the bridge protocol floor
10
10
  * (`MIN_NODETOOL_CORE_VERSION`), which applies to `nodetool-core` only.
11
11
  */
12
+ /** A declared Python-pack namespace, including its node type suffix. */
13
+ export function isPythonNodeType(nodeType) {
14
+ const qualified = nodeType.startsWith("nodetool.nodes.") ? nodeType : `nodetool.nodes.${nodeType}`;
15
+ return PYTHON_NODE_PACKS.some((pack) => pack.namespaces.some((namespace) => qualified === namespace || qualified.startsWith(`${namespace}.`)));
16
+ }
12
17
  export const PYTHON_NODE_PACKS = [
13
18
  {
14
19
  name: "Core",
@@ -1 +1 @@
1
- {"version":3,"file":"python-packs.js","sourceRoot":"","sources":["../src/python-packs.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AA6BH,MAAM,CAAC,MAAM,iBAAiB,GAA8B;IAC1D;QACE,IAAI,EAAE,MAAM;QACZ,OAAO,EAAE,2BAA2B;QACpC,WAAW,EACT,kHAAkH;QACpH,UAAU,EAAE,EAAE;KACf;IACD;QACE,IAAI,EAAE,KAAK;QACX,OAAO,EAAE,0BAA0B;QACnC,WAAW,EAAE,uCAAuC;QACpD,UAAU,EAAE,CAAC,oBAAoB,CAAC;QAClC,SAAS,EAAE,CAAC,cAAc,CAAC;QAC3B,mCAAmC;QACnC,eAAe,EAAE,EAAE;QACnB,mBAAmB,EAAE,gDAAgD;KACtE;IACD;QACE,IAAI,EAAE,aAAa;QACnB,OAAO,EAAE,kCAAkC;QAC3C,WAAW,EACT,qHAAqH;QACvH,UAAU,EAAE,CAAC,4BAA4B,CAAC;QAC1C,0EAA0E;QAC1E,sCAAsC;QACtC,SAAS,EAAE;YACT,cAAc;YACd,WAAW;YACX,aAAa;YACb,WAAW;YACX,aAAa;SACd;QACD,eAAe,EAAE,EAAE;QACnB,mBAAmB,EACjB,8HAA8H;KACjI;IACD;QACE,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,6BAA6B;QACtC,WAAW,EACT,sHAAsH;QACxH,UAAU,EAAE,CAAC,uBAAuB,CAAC;KACtC;CACF,CAAC;AAEF,iEAAiE;AACjE,MA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EAChB,IAAY,EACZ,SAAkB;IAElB,IAAI,IAAI,CAAC,SAAS,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,GAAG,QAAQ,IAAI,IAAI,EAAE,CAAC,EAAE,CAAC;QACtE,OAAO,KAAK,CAAC;IACf,CAAC;IACD,IAAI,QAAQ,KAAK,QAAQ,IAAI,IAAI,CAAC,eAAe,KAAK,SAAS,IAAI,SAAS,EAAE,CAAC;QAC7E,MAAM,KAAK,GAAG,MAAM,CAAC,QAAQ,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC;QAC7C,IAAI,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,KAAK,GAAG,IAAI,CAAC,eAAe,EAAE,CAAC;YAC3D,OAAO,KAAK,CAAC;QACf,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * The chat composer's reasoning level and which models accept it.
3
+ *
4
+ * The web composer shows its reasoning select only when
5
+ * {@link supportsReasoningEffort} is true for the picked model, and the chat
6
+ * turn forwards the level to the provider only under the same check. Each
7
+ * provider maps the level to its own setting (Anthropic `output_config.effort`,
8
+ * OpenAI `reasoning.effort`, Gemini `thinkingConfig`). Everything else never
9
+ * receives it.
10
+ */
11
+ export declare const REASONING_EFFORTS: readonly ["low", "medium", "high"];
12
+ export type ReasoningEffort = (typeof REASONING_EFFORTS)[number];
13
+ export declare function isReasoningEffort(value: unknown): value is ReasoningEffort;
14
+ export declare function supportsReasoningEffort(provider: string | null | undefined, model: string | null | undefined): boolean;
15
+ //# sourceMappingURL=reasoning-effort.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reasoning-effort.d.ts","sourceRoot":"","sources":["../src/reasoning-effort.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,eAAO,MAAM,iBAAiB,YAAI,KAAK,EAAE,QAAQ,EAAE,MAAM,CAAU,CAAC;AAEpE,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEjE,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,eAAe,CAI1E;AA0CD,wBAAgB,uBAAuB,CACrC,QAAQ,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACnC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAC/B,OAAO,CAiBT"}
@@ -0,0 +1,76 @@
1
+ /**
2
+ * The chat composer's reasoning level and which models accept it.
3
+ *
4
+ * The web composer shows its reasoning select only when
5
+ * {@link supportsReasoningEffort} is true for the picked model, and the chat
6
+ * turn forwards the level to the provider only under the same check. Each
7
+ * provider maps the level to its own setting (Anthropic `output_config.effort`,
8
+ * OpenAI `reasoning.effort`, Gemini `thinkingConfig`). Everything else never
9
+ * receives it.
10
+ */
11
+ import { isString } from "./predicates.js";
12
+ export const REASONING_EFFORTS = ["low", "medium", "high"];
13
+ export function isReasoningEffort(value) {
14
+ return (isString(value) && REASONING_EFFORTS.includes(value));
15
+ }
16
+ function bareModelId(model) {
17
+ return (model.split("/").pop() ?? model).toLowerCase();
18
+ }
19
+ /**
20
+ * Anthropic accepts `output_config.effort` on Opus 4.5, Opus 4.6, Sonnet 4.6
21
+ * and every model from the 4.7 generation on. Sonnet 4.5, Haiku 4.5 and older
22
+ * reject it with a 400.
23
+ */
24
+ function anthropicSupportsEffort(model) {
25
+ const match = /claude-(opus|sonnet|haiku|fable|mythos)-(\d+)(?:-(\d{1,2})(?!\d))?/.exec(model.toLowerCase());
26
+ if (!match)
27
+ return false;
28
+ const family = match[1];
29
+ const major = Number(match[2]);
30
+ const minor = match[3] === undefined ? 0 : Number(match[3]);
31
+ if (major >= 5)
32
+ return true;
33
+ if (major < 4)
34
+ return false;
35
+ if (minor >= 7)
36
+ return true;
37
+ if (family === "opus")
38
+ return minor >= 5;
39
+ if (family === "sonnet")
40
+ return minor >= 6;
41
+ return false;
42
+ }
43
+ /** OpenAI gpt-5 reasoning models. The `-chat` variants take no reasoning. */
44
+ function openaiSupportsEffort(model) {
45
+ const id = bareModelId(model);
46
+ if (/chat|audio|realtime|transcribe|image|tts/.test(id))
47
+ return false;
48
+ return /^gpt-5(?:[.-]|$)/.test(id);
49
+ }
50
+ /** Gemini 2.5 and 3 text models think. Image, speech and live models do not. */
51
+ function geminiSupportsEffort(model) {
52
+ const id = bareModelId(model);
53
+ if (/image|tts|audio|live|transcribe|embedding/.test(id))
54
+ return false;
55
+ return /^gemini-(?:2\.5|3)(?:[.-]|$)/.test(id);
56
+ }
57
+ export function supportsReasoningEffort(provider, model) {
58
+ if (!isString(provider) || !isString(model) || model === "")
59
+ return false;
60
+ switch (provider) {
61
+ case "anthropic":
62
+ return anthropicSupportsEffort(model);
63
+ // Subscription CLIs: their model aliases resolve to current models, and
64
+ // both CLIs take an `--effort` flag.
65
+ case "claude_agent_sdk":
66
+ case "antigravity":
67
+ return true;
68
+ case "openai":
69
+ return openaiSupportsEffort(model);
70
+ case "gemini":
71
+ return geminiSupportsEffort(model);
72
+ default:
73
+ return false;
74
+ }
75
+ }
76
+ //# sourceMappingURL=reasoning-effort.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reasoning-effort.js","sourceRoot":"","sources":["../src/reasoning-effort.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAE3C,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,KAAK,EAAE,QAAQ,EAAE,MAAM,CAAU,CAAC;AAIpE,MAAM,UAAU,iBAAiB,CAAC,KAAc;IAC9C,OAAO,CACL,QAAQ,CAAC,KAAK,CAAC,IAAK,iBAAuC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAC5E,CAAC;AACJ,CAAC;AAED,SAAS,WAAW,CAAC,KAAa;IAChC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAA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AAC,IAAI,CAAC,EAAE,CAAC;QAAE,OAAO,KAAK,CAAC;IACvE,OAAO,8BAA8B,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACjD,CAAC;AAED,MAAM,UAAU,uBAAuB,CACrC,QAAmC,EACnC,KAAgC;IAEhC,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,KAAK,KAAK,EAAE;QAAE,OAAO,KAAK,CAAC;IAC1E,QAAQ,QAAQ,EAAE,CAAC;QACjB,KAAK,WAAW;YACd,OAAO,uBAAuB,CAAC,KAAK,CAAC,CAAC;QACxC,wEAAwE;QACxE,qCAAqC;QACrC,KAAK,kBAAkB,CAAC;QACxB,KAAK,aAAa;YAChB,OAAO,IAAI,CAAC;QACd,KAAK,QAAQ;YACX,OAAO,oBAAoB,CAAC,KAAK,CAAC,CAAC;QACrC,KAAK,QAAQ;YACX,OAAO,oBAAoB,CAAC,KAAK,CAAC,CAAC;QACrC;YACE,OAAO,KAAK,CAAC;IACjB,CAAC;AACH,CAAC"}
@@ -19,4 +19,14 @@ export declare function isFullResourceId(value: string): boolean;
19
19
  export declare function isShortResourceId(value: string): boolean;
20
20
  /** The short form of a full id; anything else comes back unchanged. */
21
21
  export declare function shortResourceId(value: string): string;
22
+ /**
23
+ * The bare asset id an asset reference names, for every form an agent or a
24
+ * shipped document hands over: `asset://<id>.<ext>`, `asset://<id>`, a bare
25
+ * id, or a bare hex id with an extension. The id may still be a 12-character
26
+ * prefix; resolving it to the full id needs the caller's asset table.
27
+ *
28
+ * Any other scheme (`package://`, `http(s)://`, `data:`) is a locator, not an
29
+ * id, and comes back unchanged.
30
+ */
31
+ export declare function assetIdFromRef(ref: string): string;
22
32
  //# sourceMappingURL=resource-id.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"resource-id.d.ts","sourceRoot":"","sources":["../src/resource-id.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,eAAO,MAAM,wBAAwB,KAAK,CAAC;AAK3C,mDAAmD;AACnD,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAEvD;AAED,8EAA8E;AAC9E,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAExD;AAED,uEAAuE;AACvE,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAIrD"}
1
+ {"version":3,"file":"resource-id.d.ts","sourceRoot":"","sources":["../src/resource-id.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,eAAO,MAAM,wBAAwB,KAAK,CAAC;AAK3C,mDAAmD;AACnD,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAEvD;AAED,8EAA8E;AAC9E,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAExD;AAED,uEAAuE;AACvE,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAIrD;AAKD;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CASlD"}
@@ -29,4 +29,25 @@ export function shortResourceId(value) {
29
29
  ? value.slice(0, SHORT_RESOURCE_ID_LENGTH)
30
30
  : value;
31
31
  }
32
+ const ASSET_SCHEME = "asset://";
33
+ const HEX_ID_WITH_EXTENSION = /^([0-9a-f]{12,32})\.[A-Za-z0-9]{1,8}$/;
34
+ /**
35
+ * The bare asset id an asset reference names, for every form an agent or a
36
+ * shipped document hands over: `asset://<id>.<ext>`, `asset://<id>`, a bare
37
+ * id, or a bare hex id with an extension. The id may still be a 12-character
38
+ * prefix; resolving it to the full id needs the caller's asset table.
39
+ *
40
+ * Any other scheme (`package://`, `http(s)://`, `data:`) is a locator, not an
41
+ * id, and comes back unchanged.
42
+ */
43
+ export function assetIdFromRef(ref) {
44
+ const trimmed = ref.trim();
45
+ if (trimmed.startsWith(ASSET_SCHEME)) {
46
+ const rest = trimmed.slice(ASSET_SCHEME.length).split(/[?#]/)[0];
47
+ const withoutExt = rest.replace(/\.[A-Za-z0-9]{1,8}$/, "");
48
+ return withoutExt || rest;
49
+ }
50
+ const hexWithExt = HEX_ID_WITH_EXTENSION.exec(trimmed);
51
+ return hexWithExt ? hexWithExt[1] : trimmed;
52
+ }
32
53
  //# sourceMappingURL=resource-id.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"resource-id.js","sourceRoot":"","sources":["../src/resource-id.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,MAAM,CAAC,MAAM,wBAAwB,GAAG,EAAE,CAAC;AAE3C,MAAM,OAAO,GAAG,gBAAgB,CAAC;AACjC,MAAM,QAAQ,GAAG,IAAI,MAAM,CAAC,aAAa,wBAAwB,IAAI,CAAC,CAAC;AAEvE,mDAAmD;AACnD,MAAM,UAAU,gBAAgB,CAAC,KAAa;IAC5C,OAAO,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAC7B,CAAC;AAED,8EAA8E;AAC9E,MAAM,UAAU,iBAAiB,CAAC,KAAa;IAC7C,OAAO,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAC9B,CAAC;AAED,uEAAuE;AACvE,MAAM,UAAU,eAAe,CAAC,KAAa;IAC3C,OAAO,gBAAgB,CAAC,KAAK,CAAC;QAC5B,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,wBAAwB,CAAC;QAC1C,CAAC,CAAC,KAAK,CAAC;AACZ,CAAC"}
1
+ {"version":3,"file":"resource-id.js","sourceRoot":"","sources":["../src/resource-id.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,MAAM,CAAC,MAAM,wBAAwB,GAAG,EAAE,CAAC;AAE3C,MAAM,OAAO,GAAG,gBAAgB,CAAC;AACjC,MAAM,QAAQ,GAAG,IAAI,MAAM,CAAC,aAAa,wBAAwB,I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