@superdoc/sdk 2.25.0-next.9 → 2.25.0

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.
@@ -8,6 +8,8 @@ var debugTrace = require('../runtime/debug-trace.cjs');
8
8
  var catalog = require('../agent/catalog.cjs');
9
9
  var runtime = require('../agent/runtime.cjs');
10
10
  var actions = require('../agent/actions.cjs');
11
+ var actionChangeMode = require('../agent/action-change-mode.cjs');
12
+ var executionContext = require('../agent/execution-context.cjs');
11
13
  var embeddedPrompts_generated = require('../embedded-prompts.generated.cjs');
12
14
  var guards = require('../guards.cjs');
13
15
 
@@ -87,9 +89,14 @@ function stripCorruptedToolArgKeys(value) {
87
89
  return value;
88
90
  const clean = {};
89
91
  for (const [key, entryValue] of Object.entries(value)) {
90
- if (key === '__proto__' || isObviouslyCorruptedToolArgKey(key))
92
+ if (isObviouslyCorruptedToolArgKey(key))
91
93
  continue;
92
- clean[key] = stripCorruptedToolArgKeys(entryValue);
94
+ Object.defineProperty(clean, key, {
95
+ value: stripCorruptedToolArgKeys(entryValue),
96
+ enumerable: true,
97
+ configurable: true,
98
+ writable: true,
99
+ });
93
100
  }
94
101
  return clean;
95
102
  }
@@ -364,6 +371,12 @@ async function dispatchAgentToolInner(documentHandle, toolName, args, invokeOpti
364
371
  actions.ACTION_ARGS[args.action].includes('changeMode')
365
372
  ? { changeMode: invokeOptions.changeMode }
366
373
  : {}),
374
+ ...(args.expectedRevision === undefined &&
375
+ invokeOptions?.expectedRevision != null &&
376
+ actions.isActionName(args.action) &&
377
+ actions.ACTION_ARGS[args.action].includes('expectedRevision')
378
+ ? { expectedRevision: String(invokeOptions.expectedRevision) }
379
+ : {}),
367
380
  }));
368
381
  case 'superdoc_execute_code':
369
382
  return dispatchExecuteCode(documentHandle, args, invokeOptions);
@@ -529,6 +542,32 @@ const ENFORCEMENT_SIDE_DOORS = new Set([
529
542
  'superdoc_execute_code',
530
543
  ]);
531
544
  const POLICY_OPTION_KEYS = ['excludeActions', 'enforceChangeMode', 'allowDirectActions'];
545
+ async function fenceExpectedRevision(documentHandle, toolName, dispatchArgs, forwardOptions) {
546
+ const performsAction = toolName === 'superdoc_perform_action';
547
+ const inputRevision = performsAction ? dispatchArgs.expectedRevision : undefined;
548
+ const requestedRevision = inputRevision === undefined ? (forwardOptions?.expectedRevision ?? undefined) : inputRevision;
549
+ if (requestedRevision === undefined)
550
+ return { document: documentHandle };
551
+ const expectedRevision = typeof requestedRevision === 'string' && requestedRevision.length > 0
552
+ ? requestedRevision
553
+ : inputRevision === undefined &&
554
+ typeof requestedRevision === 'number' &&
555
+ Number.isSafeInteger(requestedRevision) &&
556
+ requestedRevision >= 0
557
+ ? String(requestedRevision)
558
+ : undefined;
559
+ if (expectedRevision === undefined)
560
+ throw new errors.SuperDocCliError('expectedRevision must be a non-empty live revision or a non-negative safe integer.', {
561
+ code: 'INVALID_ARGUMENT',
562
+ });
563
+ const liveRevision = await executionContext.readPublicRevision(documentHandle);
564
+ if (performsAction && expectedRevision !== liveRevision) {
565
+ const action = typeof dispatchArgs.action === 'string' ? dispatchArgs.action : toolName;
566
+ return { staleReceipt: actions.staleActionRevisionReceipt(action, liveRevision) };
567
+ }
568
+ actions.assertExpectedActionRevision(expectedRevision, liveRevision, toolName);
569
+ return { document: actionChangeMode.bindActionExpectedRevision(documentHandle, expectedRevision) };
570
+ }
532
571
  async function coreDispatch(documentHandle, toolName, args, invokeOptions) {
533
572
  if (!guards.isRecord(args)) {
534
573
  throw new errors.SuperDocCliError(`Tool arguments for ${toolName} must be an object.`, {
@@ -598,7 +637,16 @@ async function coreDispatch(documentHandle, toolName, args, invokeOptions) {
598
637
  }
599
638
  if (catalog.isAgentToolName(toolName)) {
600
639
  validateAgentToolArgs(toolName, dispatchArgs);
601
- const result = await dispatchAgentTool(documentHandle, toolName, dispatchArgs, forwardOptions);
640
+ if (forwardOptions?.dryRun === true) {
641
+ throw new errors.SuperDocCliError('The core preset dispatcher does not support dryRun previews.', {
642
+ code: 'CAPABILITY_UNSUPPORTED',
643
+ details: { toolName, preset: 'core', dryRun: true },
644
+ });
645
+ }
646
+ const fence = await fenceExpectedRevision(documentHandle, toolName, dispatchArgs, forwardOptions);
647
+ const result = 'staleReceipt' in fence
648
+ ? fence.staleReceipt
649
+ : await dispatchAgentTool(fence.document, toolName, dispatchArgs, forwardOptions);
602
650
  if (enforcing && toolName === 'superdoc_perform_action' && guards.isRecord(result)) {
603
651
  // Receipts under enforcement state the mode that actually ran, so a host
604
652
  // can audit "was this edit tracked?" without re-deriving the policy.
@@ -20,7 +20,9 @@ import { SuperDocCliError } from '../runtime/errors.js';
20
20
  import { writeSdkDebugTrace } from '../runtime/debug-trace.js';
21
21
  import { AGENT_TOOL_DEFINITIONS, isAgentToolName, listAgentTools, resolveActionPolicy, PUBLIC_AGENT_TOOL_NAMES, } from '../agent/catalog.js';
22
22
  import { agentApply, agentInspect, agentOperation, agentVerify } from '../agent/runtime.js';
23
- import { ACTION_ARGS, ACTION_DISPOSITIONS, isActionName, superdocPerformAction } from '../agent/actions.js';
23
+ import { ACTION_ARGS, ACTION_DISPOSITIONS, assertExpectedActionRevision, isActionName, staleActionRevisionReceipt, superdocPerformAction, } from '../agent/actions.js';
24
+ import { bindActionExpectedRevision } from '../agent/action-change-mode.js';
25
+ import { readPublicRevision } from '../agent/execution-context.js';
24
26
  import { EMBEDDED_PROMPTS } from '../embedded-prompts.generated.js';
25
27
  import { isRecord } from '../guards.js';
26
28
  // Prompts ship as <dist>/prompts/*.md. Resolve relative to the compiled
@@ -83,9 +85,14 @@ export function stripCorruptedToolArgKeys(value) {
83
85
  return value;
84
86
  const clean = {};
85
87
  for (const [key, entryValue] of Object.entries(value)) {
86
- if (key === '__proto__' || isObviouslyCorruptedToolArgKey(key))
88
+ if (isObviouslyCorruptedToolArgKey(key))
87
89
  continue;
88
- clean[key] = stripCorruptedToolArgKeys(entryValue);
90
+ Object.defineProperty(clean, key, {
91
+ value: stripCorruptedToolArgKeys(entryValue),
92
+ enumerable: true,
93
+ configurable: true,
94
+ writable: true,
95
+ });
89
96
  }
90
97
  return clean;
91
98
  }
@@ -360,6 +367,12 @@ async function dispatchAgentToolInner(documentHandle, toolName, args, invokeOpti
360
367
  ACTION_ARGS[args.action].includes('changeMode')
361
368
  ? { changeMode: invokeOptions.changeMode }
362
369
  : {}),
370
+ ...(args.expectedRevision === undefined &&
371
+ invokeOptions?.expectedRevision != null &&
372
+ isActionName(args.action) &&
373
+ ACTION_ARGS[args.action].includes('expectedRevision')
374
+ ? { expectedRevision: String(invokeOptions.expectedRevision) }
375
+ : {}),
363
376
  }));
364
377
  case 'superdoc_execute_code':
365
378
  return dispatchExecuteCode(documentHandle, args, invokeOptions);
@@ -525,6 +538,32 @@ const ENFORCEMENT_SIDE_DOORS = new Set([
525
538
  'superdoc_execute_code',
526
539
  ]);
527
540
  const POLICY_OPTION_KEYS = ['excludeActions', 'enforceChangeMode', 'allowDirectActions'];
541
+ async function fenceExpectedRevision(documentHandle, toolName, dispatchArgs, forwardOptions) {
542
+ const performsAction = toolName === 'superdoc_perform_action';
543
+ const inputRevision = performsAction ? dispatchArgs.expectedRevision : undefined;
544
+ const requestedRevision = inputRevision === undefined ? (forwardOptions?.expectedRevision ?? undefined) : inputRevision;
545
+ if (requestedRevision === undefined)
546
+ return { document: documentHandle };
547
+ const expectedRevision = typeof requestedRevision === 'string' && requestedRevision.length > 0
548
+ ? requestedRevision
549
+ : inputRevision === undefined &&
550
+ typeof requestedRevision === 'number' &&
551
+ Number.isSafeInteger(requestedRevision) &&
552
+ requestedRevision >= 0
553
+ ? String(requestedRevision)
554
+ : undefined;
555
+ if (expectedRevision === undefined)
556
+ throw new SuperDocCliError('expectedRevision must be a non-empty live revision or a non-negative safe integer.', {
557
+ code: 'INVALID_ARGUMENT',
558
+ });
559
+ const liveRevision = await readPublicRevision(documentHandle);
560
+ if (performsAction && expectedRevision !== liveRevision) {
561
+ const action = typeof dispatchArgs.action === 'string' ? dispatchArgs.action : toolName;
562
+ return { staleReceipt: staleActionRevisionReceipt(action, liveRevision) };
563
+ }
564
+ assertExpectedActionRevision(expectedRevision, liveRevision, toolName);
565
+ return { document: bindActionExpectedRevision(documentHandle, expectedRevision) };
566
+ }
528
567
  async function coreDispatch(documentHandle, toolName, args, invokeOptions) {
529
568
  if (!isRecord(args)) {
530
569
  throw new SuperDocCliError(`Tool arguments for ${toolName} must be an object.`, {
@@ -594,7 +633,16 @@ async function coreDispatch(documentHandle, toolName, args, invokeOptions) {
594
633
  }
595
634
  if (isAgentToolName(toolName)) {
596
635
  validateAgentToolArgs(toolName, dispatchArgs);
597
- const result = await dispatchAgentTool(documentHandle, toolName, dispatchArgs, forwardOptions);
636
+ if (forwardOptions?.dryRun === true) {
637
+ throw new SuperDocCliError('The core preset dispatcher does not support dryRun previews.', {
638
+ code: 'CAPABILITY_UNSUPPORTED',
639
+ details: { toolName, preset: 'core', dryRun: true },
640
+ });
641
+ }
642
+ const fence = await fenceExpectedRevision(documentHandle, toolName, dispatchArgs, forwardOptions);
643
+ const result = 'staleReceipt' in fence
644
+ ? fence.staleReceipt
645
+ : await dispatchAgentTool(fence.document, toolName, dispatchArgs, forwardOptions);
598
646
  if (enforcing && toolName === 'superdoc_perform_action' && isRecord(result)) {
599
647
  // Receipts under enforcement state the mode that actually ran, so a host
600
648
  // can audit "was this edit tracked?" without re-deriving the policy.
@@ -250,6 +250,12 @@ function forwardOptions(invokeOptions) {
250
250
  const { excludeActions: _ignored, ...rest } = invokeOptions;
251
251
  return rest;
252
252
  }
253
+ function operationInvokeOptions(operationId, options) {
254
+ if (!options || contract.CONTRACT.operations[operationId]?.mutates !== false)
255
+ return options;
256
+ const { changeMode: _changeMode, dryRun: _dryRun, ...readOptions } = options;
257
+ return readOptions;
258
+ }
253
259
  function resolveMethod(doc, operationId) {
254
260
  const tokens = operationId.split('.').slice(1);
255
261
  let cursor = doc;
@@ -271,7 +277,7 @@ function resolveMethod(doc, operationId) {
271
277
  });
272
278
  }
273
279
  const method = cursor;
274
- return (args, options) => method(enforceTrackedChangeMode(operationId, args, trackedEnforcementOf(options)).args, options);
280
+ return (args, options) => method(enforceTrackedChangeMode(operationId, args, trackedEnforcementOf(options)).args, operationInvokeOptions(operationId, options));
275
281
  }
276
282
  function trackedEnforcementOf(options) {
277
283
  if (!guards.isRecord(options) || options.enforceChangeMode !== 'tracked')
@@ -1633,6 +1639,16 @@ async function fullDispatch(includeExec, documentHandle, toolName, args, invokeO
1633
1639
  details: { toolName },
1634
1640
  });
1635
1641
  }
1642
+ if (invokeOptions?.dryRun === true &&
1643
+ (FULL_ONLY_TOOL_NAMES.has(toolName) ||
1644
+ (toolName === 'superdoc_perform_action' &&
1645
+ typeof args.action === 'string' &&
1646
+ Object.hasOwn(HELPER_ACTIONS, args.action)))) {
1647
+ throw new errors.SuperDocCliError('The full preset dispatcher does not support dryRun previews. Use a supported per-call dryRun instead.', {
1648
+ code: 'CAPABILITY_UNSUPPORTED',
1649
+ details: { toolName, preset: 'full', dryRun: true },
1650
+ });
1651
+ }
1636
1652
  if (!includeExec && toolName === 'superdoc_execute_code') {
1637
1653
  throw new errors.SuperDocCliError('superdoc_execute_code is disabled in the full preset. Use superdoc_api_call (a {calls:[…]} batch covers multi-step edits).', { code: 'TOOL_DISPATCH_NOT_FOUND', details: { toolName, preset: 'full' } });
1638
1654
  }
@@ -1648,6 +1664,12 @@ async function fullDispatch(includeExec, documentHandle, toolName, args, invokeO
1648
1664
  if (args.dryRun !== undefined && args.dryRun !== false) {
1649
1665
  throw new errors.SuperDocCliError(`Action ${args.action} has no dry run and would edit the document. Nothing was changed. Describe the planned change instead, or call it without dryRun.`, { code: 'INVALID_ARGUMENT', details: { action: args.action, supportsDryRun: false } });
1650
1666
  }
1667
+ if (Object.hasOwn(HELPER_ACTIONS, args.action) && Object.hasOwn(args, 'expectedRevision')) {
1668
+ throw new errors.SuperDocCliError(`Action ${args.action} cannot enforce args.expectedRevision. Nothing was changed.`, {
1669
+ code: 'CAPABILITY_UNSUPPORTED',
1670
+ details: { toolName, preset: 'full', action: args.action, feature: 'preset.full.helper.expectedRevision' },
1671
+ });
1672
+ }
1651
1673
  return runHelperAction(documentHandle, args.action, args, invokeOptions);
1652
1674
  }
1653
1675
  if (!FULL_ONLY_TOOL_NAMES.has(toolName)) {
@@ -247,6 +247,12 @@ function forwardOptions(invokeOptions) {
247
247
  const { excludeActions: _ignored, ...rest } = invokeOptions;
248
248
  return rest;
249
249
  }
250
+ function operationInvokeOptions(operationId, options) {
251
+ if (!options || CONTRACT.operations[operationId]?.mutates !== false)
252
+ return options;
253
+ const { changeMode: _changeMode, dryRun: _dryRun, ...readOptions } = options;
254
+ return readOptions;
255
+ }
250
256
  function resolveMethod(doc, operationId) {
251
257
  const tokens = operationId.split('.').slice(1);
252
258
  let cursor = doc;
@@ -268,7 +274,7 @@ function resolveMethod(doc, operationId) {
268
274
  });
269
275
  }
270
276
  const method = cursor;
271
- return (args, options) => method(enforceTrackedChangeMode(operationId, args, trackedEnforcementOf(options)).args, options);
277
+ return (args, options) => method(enforceTrackedChangeMode(operationId, args, trackedEnforcementOf(options)).args, operationInvokeOptions(operationId, options));
272
278
  }
273
279
  function trackedEnforcementOf(options) {
274
280
  if (!isRecord(options) || options.enforceChangeMode !== 'tracked')
@@ -1630,6 +1636,16 @@ async function fullDispatch(includeExec, documentHandle, toolName, args, invokeO
1630
1636
  details: { toolName },
1631
1637
  });
1632
1638
  }
1639
+ if (invokeOptions?.dryRun === true &&
1640
+ (FULL_ONLY_TOOL_NAMES.has(toolName) ||
1641
+ (toolName === 'superdoc_perform_action' &&
1642
+ typeof args.action === 'string' &&
1643
+ Object.hasOwn(HELPER_ACTIONS, args.action)))) {
1644
+ throw new SuperDocCliError('The full preset dispatcher does not support dryRun previews. Use a supported per-call dryRun instead.', {
1645
+ code: 'CAPABILITY_UNSUPPORTED',
1646
+ details: { toolName, preset: 'full', dryRun: true },
1647
+ });
1648
+ }
1633
1649
  if (!includeExec && toolName === 'superdoc_execute_code') {
1634
1650
  throw new SuperDocCliError('superdoc_execute_code is disabled in the full preset. Use superdoc_api_call (a {calls:[…]} batch covers multi-step edits).', { code: 'TOOL_DISPATCH_NOT_FOUND', details: { toolName, preset: 'full' } });
1635
1651
  }
@@ -1645,6 +1661,12 @@ async function fullDispatch(includeExec, documentHandle, toolName, args, invokeO
1645
1661
  if (args.dryRun !== undefined && args.dryRun !== false) {
1646
1662
  throw new SuperDocCliError(`Action ${args.action} has no dry run and would edit the document. Nothing was changed. Describe the planned change instead, or call it without dryRun.`, { code: 'INVALID_ARGUMENT', details: { action: args.action, supportsDryRun: false } });
1647
1663
  }
1664
+ if (Object.hasOwn(HELPER_ACTIONS, args.action) && Object.hasOwn(args, 'expectedRevision')) {
1665
+ throw new SuperDocCliError(`Action ${args.action} cannot enforce args.expectedRevision. Nothing was changed.`, {
1666
+ code: 'CAPABILITY_UNSUPPORTED',
1667
+ details: { toolName, preset: 'full', action: args.action, feature: 'preset.full.helper.expectedRevision' },
1668
+ });
1669
+ }
1648
1670
  return runHelperAction(documentHandle, args.action, args, invokeOptions);
1649
1671
  }
1650
1672
  if (!FULL_ONLY_TOOL_NAMES.has(toolName)) {
@@ -714,6 +714,9 @@ class HostTransport {
714
714
  if (typeof idRaw !== 'number') {
715
715
  return;
716
716
  }
717
+ if (Object.hasOwn(record, 'result') === Object.hasOwn(record, 'error')) {
718
+ return;
719
+ }
717
720
  const pending = this.pending.get(idRaw);
718
721
  if (!pending) {
719
722
  return;
@@ -711,6 +711,9 @@ export class HostTransport {
711
711
  if (typeof idRaw !== 'number') {
712
712
  return;
713
713
  }
714
+ if (Object.hasOwn(record, 'result') === Object.hasOwn(record, 'error')) {
715
+ return;
716
+ }
714
717
  const pending = this.pending.get(idRaw);
715
718
  if (!pending) {
716
719
  return;
@@ -10,6 +10,7 @@ export declare const SDK_POLICY: {
10
10
  requestTimeout: string;
11
11
  collaborationAuthPerOpen: string;
12
12
  documentAuthor: string;
13
+ fullPreset?: string;
13
14
  };
14
15
  documentOpenFields: readonly string[];
15
16
  documentSaveFields: readonly string[];
@@ -3,6 +3,6 @@
3
3
  // AUTO-GENERATED by scripts/embed-version.mjs — DO NOT EDIT.
4
4
  // Source of truth: package.json. Regenerated on every SDK build so the
5
5
  // SDK retains its own version identity when bundled into another package.
6
- const SDK_VERSION = '2.25.0-next.9';
6
+ const SDK_VERSION = '2.25.0';
7
7
 
8
8
  exports.SDK_VERSION = SDK_VERSION;
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "2.25.0-next.9";
1
+ export declare const SDK_VERSION = "2.25.0";
@@ -1,4 +1,4 @@
1
1
  // AUTO-GENERATED by scripts/embed-version.mjs — DO NOT EDIT.
2
2
  // Source of truth: package.json. Regenerated on every SDK build so the
3
3
  // SDK retains its own version identity when bundled into another package.
4
- export const SDK_VERSION = '2.25.0-next.9';
4
+ export const SDK_VERSION = '2.25.0';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@superdoc/sdk",
3
- "version": "2.25.0-next.9",
3
+ "version": "2.25.0",
4
4
  "description": "Node SDK for SuperDoc, wrapping the SuperDoc CLI to read and edit .docx files from JavaScript and TypeScript.",
5
5
  "private": false,
6
6
  "license": "AGPL-3.0",
@@ -38,11 +38,11 @@
38
38
  "typescript": "^5.9.2"
39
39
  },
40
40
  "optionalDependencies": {
41
- "@superdoc/sdk-darwin-arm64": "2.25.0-next.9",
42
- "@superdoc/sdk-darwin-x64": "2.25.0-next.9",
43
- "@superdoc/sdk-linux-x64": "2.25.0-next.9",
44
- "@superdoc/sdk-linux-arm64": "2.25.0-next.9",
45
- "@superdoc/sdk-windows-x64": "2.25.0-next.9"
41
+ "@superdoc/sdk-darwin-arm64": "2.25.0",
42
+ "@superdoc/sdk-darwin-x64": "2.25.0",
43
+ "@superdoc/sdk-linux-x64": "2.25.0",
44
+ "@superdoc/sdk-linux-arm64": "2.25.0",
45
+ "@superdoc/sdk-windows-x64": "2.25.0"
46
46
  },
47
47
  "publishConfig": {
48
48
  "access": "public"
@@ -4823,6 +4823,10 @@
4823
4823
  "start": {
4824
4824
  "type": "integer"
4825
4825
  },
4826
+ "lvlRestart": {
4827
+ "type": "integer",
4828
+ "minimum": 0
4829
+ },
4826
4830
  "alignment": {
4827
4831
  "enum": [
4828
4832
  "left",
@@ -1,28 +1,34 @@
1
1
  {
2
2
  "formatVersion": 1,
3
- "contractHash": "756068a9617daba6d9b4281bbb7efe4225ac79896afbafaee12a4c7f90d21fa1",
4
- "documentApiSourceHash": "e1a052db04cdc53e9bdc5773aac68ae29b283a12a9452b7c083f84cd60aa31a0",
5
- "generatorHash": "4bf17cfeace269af436275fcc2f30ccd7b7af3d7136f744785c9332ab6159e1c",
3
+ "contractHash": "c979c8d1b6aaf55fe9fae706ed82673d3e115be85b36ebdf0a46925ba566ba85",
4
+ "documentApiSourceHash": "4ac61ff95d6d623345ec29bb64f746232a269e9b02436f8b8a25ce0bb34ce0d7",
5
+ "generatorHash": "e8ba4ea1f857307d7cc9f99622d6c82f2ab71fe5ff86f08a3fa05996290b71b2",
6
6
  "inputs": {
7
- "apps/cli/src/host/sdk-policy.ts": "8820bc2cb4694bd665cbfacbb55c262a5df5cde4ed2a1a8d0735c09c6a5e6dd8",
8
- "packages/sdk/codegen/src/artifacts.mjs": "aecab7eca4694cbcf2366ddd9cabc033abddad2ff8fb0960d505580dbaf4d8b7",
7
+ "apps/cli/src/host/sdk-policy.ts": "9a2d67b9957d936a6f26345f5e5fc896a886da183811e3ad2f553d7d67b2da01",
8
+ "packages/sdk/codegen/src/artifacts.mjs": "1e03c94c1da3cca73a078b5ab445f891409e6053eb695d52933628226c7f1583",
9
9
  "packages/sdk/codegen/src/contract-identity.mjs": "9d2fd074c10cf71f89e4cb9a1c8d96f9c4df4a15e11207cd0921dc58b6906b52",
10
10
  "packages/sdk/codegen/src/generate-action-names.mjs": "eedb0b3e7ecab3bb7a4e507e339d8a06754cb8bab154da2583be2d5de024ea28",
11
- "packages/sdk/codegen/src/generate-all.mjs": "5c4dee723464e4fd73e13ca879a4e38191229414c050e1405c8e747e7a904afb",
11
+ "packages/sdk/codegen/src/generate-action-policy.mjs": "f99188ec75594ee37a8ef37e021f357c1d308cc4d5eae71a045a1426f58b9fbf",
12
+ "packages/sdk/codegen/src/generate-all.mjs": "e364d1b02b0c866886c357a598597b3efb3692e2320a88980981fd5f428c7433",
12
13
  "packages/sdk/codegen/src/generate-intent-tools.mjs": "843391a0eb83bf762985be96047e9e9109b87c7d9352cde7aabf49f0e57147b5",
13
- "packages/sdk/codegen/src/generate-node.mjs": "76e768216cd5e37fb44f5798faaf1b0e5572efac0be3d2e021edd81b28350093",
14
+ "packages/sdk/codegen/src/generate-node.mjs": "b1fc8c12a810eab72de387a7d87f35e58ebc3c3b94f267185fa1579b8f2d1cdf",
14
15
  "packages/sdk/codegen/src/generate-python.mjs": "e6415bb2047db279bf40f32f16ba1c6a4f5d99c9df303a69cc0b9ececfa01028",
15
16
  "packages/sdk/codegen/src/model/schema.mjs": "29cb1167413280907ad324d8a1fcb54dc70cce829df00c1a755f43040d01cf3b",
17
+ "packages/sdk/codegen/src/node22-core-characters.json": "ba26df167c0853b955b6e04d856a899a7c83865c7b5834d80645d1b41d66c693",
16
18
  "packages/sdk/codegen/src/shared.mjs": "a411e7ea4fab43b5b08b00294c746ff7063ceddbae66ece8d8c5990f131e0f7c",
17
19
  "packages/sdk/codegen/src/targets.mjs": "62c5ae3e3813e07b37e62487d973bac60ef6bea558a01f3ace2e0c6e8374e147",
18
- "packages/sdk/langs/node/package.json": "b413c73ffc569b7bd5796fac2b346030ae49d2a8fb9d47152ddc167a925274bb",
20
+ "packages/sdk/langs/node/package.json": "b2a792d69029725b5d116eb77b7a4be30b09667badeef2e061c247743838d8b5",
19
21
  "packages/sdk/langs/node/scripts/embed-prompts.mjs": "1b1641bf89cad962a4ff11d93f301fe5a4e32fe856cd3c9586106d8aaab4ad80",
20
22
  "packages/sdk/langs/node/scripts/embed-tools.mjs": "4cd8b0605b088421ea1fdf8e4e19c70f571f4e3352309a1480491600122e7bb3",
21
23
  "packages/sdk/langs/node/scripts/embed-version.mjs": "95e2ff3a7c15cb38130e12f04c8a96c901a5e55d9960610ebefa37178fd19cde",
22
24
  "packages/sdk/langs/node/src/agent/action-descriptors.json": "b2afbe8a23454bf807f7220172fb6211ccd098849f1ca27dc3546fdc352c8e48",
25
+ "packages/sdk/langs/node/src/agent/actions.ts": "a5ee29da19690344586e39f18631924c58ae8852b49b18339eeadaa45b1ea971",
26
+ "packages/sdk/langs/node/src/agent/catalog.ts": "9cf79f38dd21a2a082e6d4d35b9bcd2641bd0790a96503f4585d6cc5174ee64e",
27
+ "packages/sdk/langs/node/src/presets/core.ts": "b0f32dfc94ddfc86ad96a676da26b526edfcd5f658bfc077d880df69c057c214",
23
28
  "packages/sdk/langs/node/src/prompts/full-addendum.md": "1c18055ddee8e40661417f75d16c12741c7b5f89987386396dc673b4fc837875",
24
29
  "packages/sdk/langs/node/src/prompts/mcp-prompt.md": "ba1e239877b2b316744477e3ca7b6982fa265edb1358759209cc439457728e8b",
25
30
  "packages/sdk/langs/node/src/prompts/system-prompt.md": "dd9bdac644843db2f4964ea091f5c832b8c8eb058703861210374037c077bb92",
31
+ "packages/sdk/langs/node/src/runtime/tracked-support.ts": "779efa7c8a949090aa83e7db93d4fa84500e7563a2d47c464305f4513c424e6f",
26
32
  "packages/sdk/scripts/sdk-generate.mjs": "fc5b0cb07a39972694a0c60cfef19b2e166ec12890fb5060e97b2b818f746ef3",
27
33
  "packages/sdk/scripts/sdk-platform-targets.mjs": "6bdcd55fec9695c7af44ee5c7f67065450f61c27cdd9552d68b92e88abb9d7ab",
28
34
  "packages/sdk/tools/prompt-templates/system-prompt-core.md": "98632908dbece800115db92181b2a48823725b6e2612383de6bc6c34f57ac72e",
@@ -33,14 +39,14 @@
33
39
  "outputs": {
34
40
  "packages/sdk/langs/node/src/generated/contract.ts": {
35
41
  "id": "node-contract",
36
- "sha256": "120d819c4fae9de6ded1a66369dbfa91c038b96f1f15b9ca192e42cd31c4a55b",
42
+ "sha256": "62543eab3fa7ad079c8de9180b08e2cc400432f9533daf06ede129a93b23c27a",
37
43
  "consumers": [
38
44
  "node"
39
45
  ]
40
46
  },
41
47
  "packages/sdk/langs/node/src/generated/client.ts": {
42
48
  "id": "node-client",
43
- "sha256": "443e8cc3ed7a72ade8fb9539b024c5caab231e7320594994335985871f4a180a",
49
+ "sha256": "8d43f3fb870144acbc2a91eaddd556fa88feb6f7b87f85a9d345c635079a9cac",
44
50
  "consumers": [
45
51
  "node"
46
52
  ]
@@ -54,14 +60,14 @@
54
60
  },
55
61
  "packages/sdk/langs/python/superdoc/generated/contract.py": {
56
62
  "id": "python-contract",
57
- "sha256": "a08508e328c7c41b8e8ecd8ef086d537d20407dc95becb3d920b240b625d68b1",
63
+ "sha256": "a1c13a834f7a1e04ec829ed6b663f884d6f28adf12e5f5b9ca9a2064a8f5c978",
58
64
  "consumers": [
59
65
  "python"
60
66
  ]
61
67
  },
62
68
  "packages/sdk/langs/python/superdoc/generated/client.py": {
63
69
  "id": "python-client",
64
- "sha256": "f55c6cf0cd9c0f9cb330608faa4f18936bebf61e1ec297062d894f791043d2a2",
70
+ "sha256": "814a1c4789fc11a43bf1a3067583dc0137b947a6b2e6a5053d3829f884fe98d5",
65
71
  "consumers": [
66
72
  "python"
67
73
  ]
@@ -96,7 +102,7 @@
96
102
  },
97
103
  "packages/sdk/tools/catalog.json": {
98
104
  "id": "tool-catalog",
99
- "sha256": "0d22fe1e3bda56c043cd8e2156ec2af6f53e71db18dd1ce3a04486952c564976",
105
+ "sha256": "e21fbc1034d799d2b52eefe91e7f9b9bd13d7e02ca07a61ddf66552c5995afd5",
100
106
  "consumers": [
101
107
  "node",
102
108
  "python",
@@ -105,7 +111,7 @@
105
111
  },
106
112
  "packages/sdk/tools/tools-policy.json": {
107
113
  "id": "tool-policy",
108
- "sha256": "fb0195e4130bb323efa3fc9bddab193c6ea595656da14fa64222464ead34f853",
114
+ "sha256": "de390e1d508cea61d731e04823ad97b9ed7e56a613e7e34ef40cf73ba76ac8d5",
109
115
  "consumers": [
110
116
  "node",
111
117
  "python"
@@ -113,7 +119,7 @@
113
119
  },
114
120
  "packages/sdk/tools/tools.openai.json": {
115
121
  "id": "tools-openai",
116
- "sha256": "f41b4b2c1813d784bb2d32b48575e69d6fc05545bfcb3d29fa6ee690342d6270",
122
+ "sha256": "723c44e29a2becc1dd79c0b494f5a4383c4bb517189d4ae4cf0ea0a74b31a95b",
117
123
  "consumers": [
118
124
  "node",
119
125
  "python",
@@ -122,7 +128,7 @@
122
128
  },
123
129
  "packages/sdk/tools/tools.anthropic.json": {
124
130
  "id": "tools-anthropic",
125
- "sha256": "0920c8379fe6b116d34114a0f56378b52a7261aad78b55a59514ea5d1af3a903",
131
+ "sha256": "b9415158df37f6eb3b3b32136a8c40ead465d602dce4149169a29d8bd2259ecf",
126
132
  "consumers": [
127
133
  "node",
128
134
  "python",
@@ -131,7 +137,7 @@
131
137
  },
132
138
  "packages/sdk/tools/tools.vercel.json": {
133
139
  "id": "tools-vercel",
134
- "sha256": "f41b4b2c1813d784bb2d32b48575e69d6fc05545bfcb3d29fa6ee690342d6270",
140
+ "sha256": "723c44e29a2becc1dd79c0b494f5a4383c4bb517189d4ae4cf0ea0a74b31a95b",
135
141
  "consumers": [
136
142
  "node",
137
143
  "python",
@@ -140,7 +146,7 @@
140
146
  },
141
147
  "packages/sdk/tools/tools.generic.json": {
142
148
  "id": "tools-generic",
143
- "sha256": "81d9007fb7daaf902da38f0bb83681e21969e5eee609a74eb80c637f33b95e50",
149
+ "sha256": "7f8b0bb02005f1ae7171eebec8bc3367dc1568bc7b063401856e4c7783547f0f",
144
150
  "consumers": [
145
151
  "node",
146
152
  "python",
@@ -180,14 +186,14 @@
180
186
  },
181
187
  "packages/sdk/langs/node/src/embedded-tools.generated.ts": {
182
188
  "id": "node-embedded-tools",
183
- "sha256": "69cd0f4c4a7fdb5c1fc631dc99ce659da811b4ab3fed9a220aabe8f2e62a503c",
189
+ "sha256": "8eccf429e83acad4edeb2b75062614ba285502e47cfbc91293425caae2495b7e",
184
190
  "consumers": [
185
191
  "node"
186
192
  ]
187
193
  },
188
194
  "packages/sdk/langs/node/src/runtime/sdk-version.generated.ts": {
189
195
  "id": "node-sdk-version",
190
- "sha256": "3c940e8b9a160f1f103dd7f1414ce2b905b7f478dc1e9db7ce20435d5786e232",
196
+ "sha256": "7ccb66448173e185273ebc3627498023f7f3967fe2962653c39246dcd9c28c72",
191
197
  "consumers": [
192
198
  "node"
193
199
  ]
@@ -43,5 +43,5 @@
43
43
  "mutates": true
44
44
  }
45
45
  ],
46
- "contractHash": "756068a9617daba6d9b4281bbb7efe4225ac79896afbafaee12a4c7f90d21fa1"
46
+ "contractHash": "c979c8d1b6aaf55fe9fae706ed82673d3e115be85b36ebdf0a46925ba566ba85"
47
47
  }
@@ -4532,6 +4532,10 @@
4532
4532
  "start": {
4533
4533
  "type": "integer"
4534
4534
  },
4535
+ "lvlRestart": {
4536
+ "type": "integer",
4537
+ "minimum": 0
4538
+ },
4535
4539
  "alignment": {
4536
4540
  "enum": [
4537
4541
  "left",
@@ -4619,6 +4619,10 @@
4619
4619
  "start": {
4620
4620
  "type": "integer"
4621
4621
  },
4622
+ "lvlRestart": {
4623
+ "type": "integer",
4624
+ "minimum": 0
4625
+ },
4622
4626
  "alignment": {
4623
4627
  "enum": [
4624
4628
  "left",
@@ -4546,6 +4546,10 @@
4546
4546
  "start": {
4547
4547
  "type": "integer"
4548
4548
  },
4549
+ "lvlRestart": {
4550
+ "type": "integer",
4551
+ "minimum": 0
4552
+ },
4549
4553
  "alignment": {
4550
4554
  "enum": [
4551
4555
  "left",
@@ -4546,6 +4546,10 @@
4546
4546
  "start": {
4547
4547
  "type": "integer"
4548
4548
  },
4549
+ "lvlRestart": {
4550
+ "type": "integer",
4551
+ "minimum": 0
4552
+ },
4549
4553
  "alignment": {
4550
4554
  "enum": [
4551
4555
  "left",