@superdoc-dev/sdk 1.13.0-next.6 → 1.13.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.
package/dist/index.cjs CHANGED
@@ -79,13 +79,6 @@ class SuperDocDocumentCore {
79
79
  markClosed() {
80
80
  this.boundRuntime.markClosed();
81
81
  }
82
- async formatRange(params, options = {}) {
83
- const { properties, ...rest } = params;
84
- return this.boundRuntime.invoke(contract.CONTRACT.operations['doc.format.apply'], {
85
- ...rest,
86
- inline: properties,
87
- }, options);
88
- }
89
82
  }
90
83
  function attachBoundDocApi(target, api) {
91
84
  const { save: _save, close: _close, ...boundMethods } = api;
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { type BoundDocApi, type DocCloseBoundParams, type DocCloseResult, type DocFormatApplyBoundParams, type DocFormatApplyResult, type DocOpenParams as GeneratedDocOpenParams, type DocOpenResult, type DocSaveBoundParams, type DocSaveResult } from './generated/client.js';
1
+ import { type BoundDocApi, type DocCloseBoundParams, type DocCloseResult, type DocOpenParams as GeneratedDocOpenParams, type DocOpenResult, type DocSaveBoundParams, type DocSaveResult } from './generated/client.js';
2
2
  import { SuperDocRuntime, type SuperDocClientOptions, type InvokeOptions, type OperationSpec, type RuntimeInvoker } from './runtime/process.js';
3
3
  /**
4
4
  * Wraps a raw runtime and injects a fixed sessionId into every invoke call.
@@ -14,9 +14,6 @@ declare class BoundRuntime implements RuntimeInvoker {
14
14
  invoke<TData = unknown>(operation: OperationSpec, params?: Record<string, unknown>, options?: InvokeOptions): Promise<TData>;
15
15
  markClosed(): void;
16
16
  }
17
- export interface DocFormatRangeBoundParams extends Omit<DocFormatApplyBoundParams, 'inline'> {
18
- properties: NonNullable<DocFormatApplyBoundParams['inline']>;
19
- }
20
17
  /**
21
18
  * Bound document handle. All document operations are available as typed methods.
22
19
  * The handle injects its session id automatically — callers never pass
@@ -36,7 +33,6 @@ declare class SuperDocDocumentCore {
36
33
  close(params?: DocCloseBoundParams, options?: InvokeOptions): Promise<DocCloseResult>;
37
34
  /** @internal */
38
35
  markClosed(): void;
39
- formatRange(params: DocFormatRangeBoundParams, options?: InvokeOptions): Promise<DocFormatApplyResult>;
40
36
  }
41
37
  type SuperDocDocumentInstance = SuperDocDocumentCore & BoundDocApi;
42
38
  export declare const SuperDocDocument: new (boundRuntime: BoundRuntime, sessionId: string, openResult: DocOpenResult, client: SuperDocClient) => SuperDocDocumentInstance;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,WAAW,EAChB,KAAK,mBAAmB,EACxB,KAAK,cAAc,EACnB,KAAK,yBAAyB,EAC9B,KAAK,oBAAoB,EACzB,KAAK,aAAa,IAAI,sBAAsB,EAC5C,KAAK,aAAa,EAClB,KAAK,kBAAkB,EACvB,KAAK,aAAa,EACnB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EACL,eAAe,EACf,KAAK,qBAAqB,EAC1B,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,cAAc,EACpB,MAAM,sBAAsB,CAAC;AAO9B;;;;;GAKG;AACH,cAAM,YAAa,YAAW,cAAc;IAC1C,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAkB;IAC1C,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAS;IACnC,OAAO,CAAC,MAAM,CAAS;gBAEX,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM;IAKjD,MAAM,CAAC,KAAK,GAAG,OAAO,EAC1B,SAAS,EAAE,aAAa,EACxB,MAAM,GAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAM,EACpC,OAAO,GAAE,aAAkB,GAC1B,OAAO,CAAC,KAAK,CAAC;IAUjB,UAAU,IAAI,IAAI;CAGnB;AAED,MAAM,WAAW,yBAA0B,SAAQ,IAAI,CAAC,yBAAyB,EAAE,QAAQ,CAAC;IAC1F,UAAU,EAAE,WA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EAAE,wBAAwB,EAAE,OAAO,CAAC,EAAE,aAAa,GAAG,OAAO,CAAC,OAAO,CAAC;IAI5F,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAQ9B,gBAAgB;IAChB,YAAY,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI;CAGtC;AAED,wBAAgB,oBAAoB,CAAC,OAAO,GAAE,qBAA0B,GAAG,cAAc,CAExF;AAED,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACjE,OAAO,EACL,WAAW,EACX,oBAAoB,EACpB,YAAY,EACZ,eAAe,EACf,0BAA0B,EAC1B,cAAc,EACd,SAAS,GACV,MAAM,YAAY,CAAC;AACpB,YAAY,EACV,qBAAqB,EACrB,aAAa,EACb,6BAA6B,EAC7B,gBAAgB,EAChB,YAAY,GACb,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,kBAAkB,EAAE,MAAM,0CAA0C,CAAC;AAC9E,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,YAAY,EACV,aAAa,EACb,aAAa,EACb,kBAAkB,EAClB,cAAc,EACd,qBAAqB,GACtB,MAAM,sBAAsB,CAAC;AAC9B,YAAY,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC"}
package/dist/index.js CHANGED
@@ -73,13 +73,6 @@ class SuperDocDocumentCore {
73
73
  markClosed() {
74
74
  this.boundRuntime.markClosed();
75
75
  }
76
- async formatRange(params, options = {}) {
77
- const { properties, ...rest } = params;
78
- return this.boundRuntime.invoke(CONTRACT.operations['doc.format.apply'], {
79
- ...rest,
80
- inline: properties,
81
- }, options);
82
- }
83
76
  }
84
77
  function attachBoundDocApi(target, api) {
85
78
  const { save: _save, close: _close, ...boundMethods } = api;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@superdoc-dev/sdk",
3
- "version": "1.13.0-next.6",
3
+ "version": "1.13.0",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -26,11 +26,11 @@
26
26
  "typescript": "^5.9.2"
27
27
  },
28
28
  "optionalDependencies": {
29
- "@superdoc-dev/sdk-linux-x64": "1.13.0-next.6",
30
- "@superdoc-dev/sdk-darwin-x64": "1.13.0-next.6",
31
- "@superdoc-dev/sdk-darwin-arm64": "1.13.0-next.6",
32
- "@superdoc-dev/sdk-linux-arm64": "1.13.0-next.6",
33
- "@superdoc-dev/sdk-windows-x64": "1.13.0-next.6"
29
+ "@superdoc-dev/sdk-darwin-arm64": "1.13.0",
30
+ "@superdoc-dev/sdk-darwin-x64": "1.13.0",
31
+ "@superdoc-dev/sdk-linux-x64": "1.13.0",
32
+ "@superdoc-dev/sdk-windows-x64": "1.13.0",
33
+ "@superdoc-dev/sdk-linux-arm64": "1.13.0"
34
34
  },
35
35
  "publishConfig": {
36
36
  "access": "public"
@@ -2600,34 +2600,15 @@
2600
2600
  },
2601
2601
  {
2602
2602
  "$ref": "#/$defs/TextTarget"
2603
- },
2604
- {
2605
- "$ref": "#/$defs/SelectionTarget"
2606
- },
2607
- {
2608
- "$ref": "#/$defs/CommentTrackedChangeTarget"
2609
2603
  }
2610
2604
  ],
2611
- "description": "Comment target. Accepts a TextAddress, TextTarget, SelectionTarget, or {trackedChangeId, kind?:'trackedChange'} to anchor directly on tracked content."
2605
+ "description": "Text range to anchor the comment. Accepts either a single-block TextAddress {kind:'text', blockId, range} or a multi-segment TextTarget {kind:'text', segments:[{blockId, range}, ...]} for selections that span blocks."
2612
2606
  },
2613
2607
  {
2614
- "oneOf": [
2615
- {
2616
- "$ref": "#/$defs/TextAddress"
2617
- },
2618
- {
2619
- "$ref": "#/$defs/TextTarget"
2620
- },
2621
- {
2622
- "$ref": "#/$defs/SelectionTarget"
2623
- },
2624
- {
2625
- "$ref": "#/$defs/CommentTrackedChangeTarget"
2626
- }
2627
- ]
2608
+ "$ref": "#/$defs/TextAddress"
2628
2609
  }
2629
2610
  ],
2630
- "description": "Comment target. Accepts a TextAddress, TextTarget, SelectionTarget, or {trackedChangeId, kind?:'trackedChange'} to anchor directly on tracked content. Only for actions 'create', 'update'. Omit for other actions."
2611
+ "description": "Text range to anchor the comment. Accepts either a single-block TextAddress {kind:'text', blockId, range} or a multi-segment TextTarget {kind:'text', segments:[{blockId, range}, ...]} for selections that span blocks. Only for actions 'create', 'update'. Omit for other actions."
2631
2612
  },
2632
2613
  "parentId": {
2633
2614
  "type": "string",
@@ -2701,7 +2682,7 @@
2701
2682
  },
2702
2683
  {
2703
2684
  "toolName": "superdoc_track_changes",
2704
- "description": "Review and resolve tracked changes (insertions, deletions, replacements, format changes) in the document. Action \"list\" returns all tracked changes with optional filtering by type (insert, delete, replacement, format) and pagination (limit, offset). Each change includes an ID, type, author, timestamp, and content preview. Action \"decide\" accepts or rejects changes. Pass decision:\"accept\" to apply the change permanently, or decision:\"reject\" to discard it. Target a single change with {id:\"<changeId>\"}, a partial selection with {kind:\"range\", range:{...}}, or all changes at once with {scope:\"all\"} (optionally plus story). Do NOT use this tool unless the document has tracked changes. Use superdoc_get_content info to check the tracked change count first.\n\nEXAMPLES:\n 1. {\"action\":\"list\"}\n 2. {\"action\":\"list\",\"type\":\"replacement\",\"limit\":10}\n 3. {\"action\":\"decide\",\"decision\":\"accept\",\"target\":{\"id\":\"<changeId>\"}}\n 4. {\"action\":\"decide\",\"decision\":\"reject\",\"target\":{\"kind\":\"range\",\"range\":{\"kind\":\"text\",\"segments\":[{\"blockId\":\"<blockId>\",\"range\":{\"start\":0,\"end\":5}}]}}}\n 5. {\"action\":\"decide\",\"decision\":\"reject\",\"target\":{\"scope\":\"all\"}}",
2685
+ "description": "Review and resolve tracked changes (insertions, deletions, format changes) in the document. Action \"list\" returns all tracked changes with optional filtering by type (insert, delete, format) and pagination (limit, offset). Each change includes an ID, type, author, timestamp, and content preview. Action \"decide\" accepts or rejects changes. Pass decision:\"accept\" to apply the change permanently, or decision:\"reject\" to discard it. Target a single change with {id:\"<changeId>\"} or all changes at once with {scope:\"all\"}. Do NOT use this tool unless the document has tracked changes. Use superdoc_get_content info to check the tracked change count first.\n\nEXAMPLES:\n 1. {\"action\":\"list\"}\n 2. {\"action\":\"list\",\"type\":\"insert\",\"limit\":10}\n 3. {\"action\":\"decide\",\"decision\":\"accept\",\"target\":{\"id\":\"<changeId>\"}}\n 4. {\"action\":\"decide\",\"decision\":\"reject\",\"target\":{\"scope\":\"all\"}}",
2705
2686
  "inputSchema": {
2706
2687
  "type": "object",
2707
2688
  "properties": {
@@ -2725,10 +2706,9 @@
2725
2706
  "enum": [
2726
2707
  "insert",
2727
2708
  "delete",
2728
- "replacement",
2729
2709
  "format"
2730
2710
  ],
2731
- "description": "Filter by change type: 'insert', 'delete', 'replacement', or 'format'. Only for action 'list'. Omit for other actions."
2711
+ "description": "Filter by change type: 'insert', 'delete', or 'format'. Only for action 'list'. Omit for other actions."
2732
2712
  },
2733
2713
  "force": {
2734
2714
  "type": "boolean",
@@ -2766,30 +2746,6 @@
2766
2746
  "id"
2767
2747
  ]
2768
2748
  },
2769
- {
2770
- "type": "object",
2771
- "properties": {
2772
- "kind": {
2773
- "const": "range",
2774
- "type": "string"
2775
- },
2776
- "range": {
2777
- "$ref": "#/$defs/TextTarget"
2778
- },
2779
- "story": {
2780
- "$ref": "#/$defs/StoryLocator"
2781
- },
2782
- "part": {
2783
- "type": "string",
2784
- "description": "Optional part discriminator for the range target."
2785
- }
2786
- },
2787
- "additionalProperties": false,
2788
- "required": [
2789
- "kind",
2790
- "range"
2791
- ]
2792
- },
2793
2749
  {
2794
2750
  "type": "object",
2795
2751
  "properties": {
@@ -2797,18 +2753,6 @@
2797
2753
  "enum": [
2798
2754
  "all"
2799
2755
  ]
2800
- },
2801
- "story": {
2802
- "oneOf": [
2803
- {
2804
- "$ref": "#/$defs/StoryLocator"
2805
- },
2806
- {
2807
- "const": "all",
2808
- "type": "string"
2809
- }
2810
- ],
2811
- "description": "Optional explicit bulk filter. Omit or pass 'all' to target every revision-capable story, or pass a StoryLocator to scope the decision to one story."
2812
2756
  }
2813
2757
  },
2814
2758
  "additionalProperties": false,
@@ -43,5 +43,5 @@
43
43
  "mutates": true
44
44
  }
45
45
  ],
46
- "contractHash": "5f439c4117bbb2e55f227e7711df415c1173f8c476954c6e412a4b8b45edd1a3"
46
+ "contractHash": "266b6bb8fa042ebd94c3da6e11652471f49c40a061960f3df9055cf64c4bcbbe"
47
47
  }
@@ -2311,34 +2311,15 @@
2311
2311
  },
2312
2312
  {
2313
2313
  "$ref": "#/$defs/TextTarget"
2314
- },
2315
- {
2316
- "$ref": "#/$defs/SelectionTarget"
2317
- },
2318
- {
2319
- "$ref": "#/$defs/CommentTrackedChangeTarget"
2320
2314
  }
2321
2315
  ],
2322
- "description": "Comment target. Accepts a TextAddress, TextTarget, SelectionTarget, or {trackedChangeId, kind?:'trackedChange'} to anchor directly on tracked content."
2316
+ "description": "Text range to anchor the comment. Accepts either a single-block TextAddress {kind:'text', blockId, range} or a multi-segment TextTarget {kind:'text', segments:[{blockId, range}, ...]} for selections that span blocks."
2323
2317
  },
2324
2318
  {
2325
- "oneOf": [
2326
- {
2327
- "$ref": "#/$defs/TextAddress"
2328
- },
2329
- {
2330
- "$ref": "#/$defs/TextTarget"
2331
- },
2332
- {
2333
- "$ref": "#/$defs/SelectionTarget"
2334
- },
2335
- {
2336
- "$ref": "#/$defs/CommentTrackedChangeTarget"
2337
- }
2338
- ]
2319
+ "$ref": "#/$defs/TextAddress"
2339
2320
  }
2340
2321
  ],
2341
- "description": "Comment target. Accepts a TextAddress, TextTarget, SelectionTarget, or {trackedChangeId, kind?:'trackedChange'} to anchor directly on tracked content. Only for actions 'create', 'update'. Omit for other actions."
2322
+ "description": "Text range to anchor the comment. Accepts either a single-block TextAddress {kind:'text', blockId, range} or a multi-segment TextTarget {kind:'text', segments:[{blockId, range}, ...]} for selections that span blocks. Only for actions 'create', 'update'. Omit for other actions."
2342
2323
  },
2343
2324
  "parentId": {
2344
2325
  "type": "string",
@@ -2380,7 +2361,7 @@
2380
2361
  },
2381
2362
  {
2382
2363
  "name": "superdoc_track_changes",
2383
- "description": "Review and resolve tracked changes (insertions, deletions, replacements, format changes) in the document. Action \"list\" returns all tracked changes with optional filtering by type (insert, delete, replacement, format) and pagination (limit, offset). Each change includes an ID, type, author, timestamp, and content preview. Action \"decide\" accepts or rejects changes. Pass decision:\"accept\" to apply the change permanently, or decision:\"reject\" to discard it. Target a single change with {id:\"<changeId>\"}, a partial selection with {kind:\"range\", range:{...}}, or all changes at once with {scope:\"all\"} (optionally plus story). Do NOT use this tool unless the document has tracked changes. Use superdoc_get_content info to check the tracked change count first.\n\nEXAMPLES:\n 1. {\"action\":\"list\"}\n 2. {\"action\":\"list\",\"type\":\"replacement\",\"limit\":10}\n 3. {\"action\":\"decide\",\"decision\":\"accept\",\"target\":{\"id\":\"<changeId>\"}}\n 4. {\"action\":\"decide\",\"decision\":\"reject\",\"target\":{\"kind\":\"range\",\"range\":{\"kind\":\"text\",\"segments\":[{\"blockId\":\"<blockId>\",\"range\":{\"start\":0,\"end\":5}}]}}}\n 5. {\"action\":\"decide\",\"decision\":\"reject\",\"target\":{\"scope\":\"all\"}}",
2364
+ "description": "Review and resolve tracked changes (insertions, deletions, format changes) in the document. Action \"list\" returns all tracked changes with optional filtering by type (insert, delete, format) and pagination (limit, offset). Each change includes an ID, type, author, timestamp, and content preview. Action \"decide\" accepts or rejects changes. Pass decision:\"accept\" to apply the change permanently, or decision:\"reject\" to discard it. Target a single change with {id:\"<changeId>\"} or all changes at once with {scope:\"all\"}. Do NOT use this tool unless the document has tracked changes. Use superdoc_get_content info to check the tracked change count first.\n\nEXAMPLES:\n 1. {\"action\":\"list\"}\n 2. {\"action\":\"list\",\"type\":\"insert\",\"limit\":10}\n 3. {\"action\":\"decide\",\"decision\":\"accept\",\"target\":{\"id\":\"<changeId>\"}}\n 4. {\"action\":\"decide\",\"decision\":\"reject\",\"target\":{\"scope\":\"all\"}}",
2384
2365
  "input_schema": {
2385
2366
  "type": "object",
2386
2367
  "properties": {
@@ -2404,10 +2385,9 @@
2404
2385
  "enum": [
2405
2386
  "insert",
2406
2387
  "delete",
2407
- "replacement",
2408
2388
  "format"
2409
2389
  ],
2410
- "description": "Filter by change type: 'insert', 'delete', 'replacement', or 'format'. Only for action 'list'. Omit for other actions."
2390
+ "description": "Filter by change type: 'insert', 'delete', or 'format'. Only for action 'list'. Omit for other actions."
2411
2391
  },
2412
2392
  "force": {
2413
2393
  "type": "boolean",
@@ -2445,30 +2425,6 @@
2445
2425
  "id"
2446
2426
  ]
2447
2427
  },
2448
- {
2449
- "type": "object",
2450
- "properties": {
2451
- "kind": {
2452
- "const": "range",
2453
- "type": "string"
2454
- },
2455
- "range": {
2456
- "$ref": "#/$defs/TextTarget"
2457
- },
2458
- "story": {
2459
- "$ref": "#/$defs/StoryLocator"
2460
- },
2461
- "part": {
2462
- "type": "string",
2463
- "description": "Optional part discriminator for the range target."
2464
- }
2465
- },
2466
- "additionalProperties": false,
2467
- "required": [
2468
- "kind",
2469
- "range"
2470
- ]
2471
- },
2472
2428
  {
2473
2429
  "type": "object",
2474
2430
  "properties": {
@@ -2476,18 +2432,6 @@
2476
2432
  "enum": [
2477
2433
  "all"
2478
2434
  ]
2479
- },
2480
- "story": {
2481
- "oneOf": [
2482
- {
2483
- "$ref": "#/$defs/StoryLocator"
2484
- },
2485
- {
2486
- "const": "all",
2487
- "type": "string"
2488
- }
2489
- ],
2490
- "description": "Optional explicit bulk filter. Omit or pass 'all' to target every revision-capable story, or pass a StoryLocator to scope the decision to one story."
2491
2435
  }
2492
2436
  },
2493
2437
  "additionalProperties": false,
@@ -2420,34 +2420,15 @@
2420
2420
  },
2421
2421
  {
2422
2422
  "$ref": "#/$defs/TextTarget"
2423
- },
2424
- {
2425
- "$ref": "#/$defs/SelectionTarget"
2426
- },
2427
- {
2428
- "$ref": "#/$defs/CommentTrackedChangeTarget"
2429
2423
  }
2430
2424
  ],
2431
- "description": "Comment target. Accepts a TextAddress, TextTarget, SelectionTarget, or {trackedChangeId, kind?:'trackedChange'} to anchor directly on tracked content."
2425
+ "description": "Text range to anchor the comment. Accepts either a single-block TextAddress {kind:'text', blockId, range} or a multi-segment TextTarget {kind:'text', segments:[{blockId, range}, ...]} for selections that span blocks."
2432
2426
  },
2433
2427
  {
2434
- "oneOf": [
2435
- {
2436
- "$ref": "#/$defs/TextAddress"
2437
- },
2438
- {
2439
- "$ref": "#/$defs/TextTarget"
2440
- },
2441
- {
2442
- "$ref": "#/$defs/SelectionTarget"
2443
- },
2444
- {
2445
- "$ref": "#/$defs/CommentTrackedChangeTarget"
2446
- }
2447
- ]
2428
+ "$ref": "#/$defs/TextAddress"
2448
2429
  }
2449
2430
  ],
2450
- "description": "Comment target. Accepts a TextAddress, TextTarget, SelectionTarget, or {trackedChangeId, kind?:'trackedChange'} to anchor directly on tracked content. Only for actions 'create', 'update'. Omit for other actions."
2431
+ "description": "Text range to anchor the comment. Accepts either a single-block TextAddress {kind:'text', blockId, range} or a multi-segment TextTarget {kind:'text', segments:[{blockId, range}, ...]} for selections that span blocks. Only for actions 'create', 'update'. Omit for other actions."
2451
2432
  },
2452
2433
  "parentId": {
2453
2434
  "type": "string",
@@ -2509,7 +2490,7 @@
2509
2490
  },
2510
2491
  {
2511
2492
  "name": "superdoc_track_changes",
2512
- "description": "Review and resolve tracked changes (insertions, deletions, replacements, format changes) in the document. Action \"list\" returns all tracked changes with optional filtering by type (insert, delete, replacement, format) and pagination (limit, offset). Each change includes an ID, type, author, timestamp, and content preview. Action \"decide\" accepts or rejects changes. Pass decision:\"accept\" to apply the change permanently, or decision:\"reject\" to discard it. Target a single change with {id:\"<changeId>\"}, a partial selection with {kind:\"range\", range:{...}}, or all changes at once with {scope:\"all\"} (optionally plus story). Do NOT use this tool unless the document has tracked changes. Use superdoc_get_content info to check the tracked change count first.\n\nEXAMPLES:\n 1. {\"action\":\"list\"}\n 2. {\"action\":\"list\",\"type\":\"replacement\",\"limit\":10}\n 3. {\"action\":\"decide\",\"decision\":\"accept\",\"target\":{\"id\":\"<changeId>\"}}\n 4. {\"action\":\"decide\",\"decision\":\"reject\",\"target\":{\"kind\":\"range\",\"range\":{\"kind\":\"text\",\"segments\":[{\"blockId\":\"<blockId>\",\"range\":{\"start\":0,\"end\":5}}]}}}\n 5. {\"action\":\"decide\",\"decision\":\"reject\",\"target\":{\"scope\":\"all\"}}",
2493
+ "description": "Review and resolve tracked changes (insertions, deletions, format changes) in the document. Action \"list\" returns all tracked changes with optional filtering by type (insert, delete, format) and pagination (limit, offset). Each change includes an ID, type, author, timestamp, and content preview. Action \"decide\" accepts or rejects changes. Pass decision:\"accept\" to apply the change permanently, or decision:\"reject\" to discard it. Target a single change with {id:\"<changeId>\"} or all changes at once with {scope:\"all\"}. Do NOT use this tool unless the document has tracked changes. Use superdoc_get_content info to check the tracked change count first.\n\nEXAMPLES:\n 1. {\"action\":\"list\"}\n 2. {\"action\":\"list\",\"type\":\"insert\",\"limit\":10}\n 3. {\"action\":\"decide\",\"decision\":\"accept\",\"target\":{\"id\":\"<changeId>\"}}\n 4. {\"action\":\"decide\",\"decision\":\"reject\",\"target\":{\"scope\":\"all\"}}",
2513
2494
  "parameters": {
2514
2495
  "type": "object",
2515
2496
  "properties": {
@@ -2533,10 +2514,9 @@
2533
2514
  "enum": [
2534
2515
  "insert",
2535
2516
  "delete",
2536
- "replacement",
2537
2517
  "format"
2538
2518
  ],
2539
- "description": "Filter by change type: 'insert', 'delete', 'replacement', or 'format'. Only for action 'list'. Omit for other actions."
2519
+ "description": "Filter by change type: 'insert', 'delete', or 'format'. Only for action 'list'. Omit for other actions."
2540
2520
  },
2541
2521
  "force": {
2542
2522
  "type": "boolean",
@@ -2574,30 +2554,6 @@
2574
2554
  "id"
2575
2555
  ]
2576
2556
  },
2577
- {
2578
- "type": "object",
2579
- "properties": {
2580
- "kind": {
2581
- "const": "range",
2582
- "type": "string"
2583
- },
2584
- "range": {
2585
- "$ref": "#/$defs/TextTarget"
2586
- },
2587
- "story": {
2588
- "$ref": "#/$defs/StoryLocator"
2589
- },
2590
- "part": {
2591
- "type": "string",
2592
- "description": "Optional part discriminator for the range target."
2593
- }
2594
- },
2595
- "additionalProperties": false,
2596
- "required": [
2597
- "kind",
2598
- "range"
2599
- ]
2600
- },
2601
2557
  {
2602
2558
  "type": "object",
2603
2559
  "properties": {
@@ -2605,18 +2561,6 @@
2605
2561
  "enum": [
2606
2562
  "all"
2607
2563
  ]
2608
- },
2609
- "story": {
2610
- "oneOf": [
2611
- {
2612
- "$ref": "#/$defs/StoryLocator"
2613
- },
2614
- {
2615
- "const": "all",
2616
- "type": "string"
2617
- }
2618
- ],
2619
- "description": "Optional explicit bulk filter. Omit or pass 'all' to target every revision-capable story, or pass a StoryLocator to scope the decision to one story."
2620
2564
  }
2621
2565
  },
2622
2566
  "additionalProperties": false,
@@ -2328,34 +2328,15 @@
2328
2328
  },
2329
2329
  {
2330
2330
  "$ref": "#/$defs/TextTarget"
2331
- },
2332
- {
2333
- "$ref": "#/$defs/SelectionTarget"
2334
- },
2335
- {
2336
- "$ref": "#/$defs/CommentTrackedChangeTarget"
2337
2331
  }
2338
2332
  ],
2339
- "description": "Comment target. Accepts a TextAddress, TextTarget, SelectionTarget, or {trackedChangeId, kind?:'trackedChange'} to anchor directly on tracked content."
2333
+ "description": "Text range to anchor the comment. Accepts either a single-block TextAddress {kind:'text', blockId, range} or a multi-segment TextTarget {kind:'text', segments:[{blockId, range}, ...]} for selections that span blocks."
2340
2334
  },
2341
2335
  {
2342
- "oneOf": [
2343
- {
2344
- "$ref": "#/$defs/TextAddress"
2345
- },
2346
- {
2347
- "$ref": "#/$defs/TextTarget"
2348
- },
2349
- {
2350
- "$ref": "#/$defs/SelectionTarget"
2351
- },
2352
- {
2353
- "$ref": "#/$defs/CommentTrackedChangeTarget"
2354
- }
2355
- ]
2336
+ "$ref": "#/$defs/TextAddress"
2356
2337
  }
2357
2338
  ],
2358
- "description": "Comment target. Accepts a TextAddress, TextTarget, SelectionTarget, or {trackedChangeId, kind?:'trackedChange'} to anchor directly on tracked content. Only for actions 'create', 'update'. Omit for other actions."
2339
+ "description": "Text range to anchor the comment. Accepts either a single-block TextAddress {kind:'text', blockId, range} or a multi-segment TextTarget {kind:'text', segments:[{blockId, range}, ...]} for selections that span blocks. Only for actions 'create', 'update'. Omit for other actions."
2359
2340
  },
2360
2341
  "parentId": {
2361
2342
  "type": "string",
@@ -2400,7 +2381,7 @@
2400
2381
  "type": "function",
2401
2382
  "function": {
2402
2383
  "name": "superdoc_track_changes",
2403
- "description": "Review and resolve tracked changes (insertions, deletions, replacements, format changes) in the document. Action \"list\" returns all tracked changes with optional filtering by type (insert, delete, replacement, format) and pagination (limit, offset). Each change includes an ID, type, author, timestamp, and content preview. Action \"decide\" accepts or rejects changes. Pass decision:\"accept\" to apply the change permanently, or decision:\"reject\" to discard it. Target a single change with {id:\"<changeId>\"}, a partial selection with {kind:\"range\", range:{...}}, or all changes at once with {scope:\"all\"} (optionally plus story). Do NOT use this tool unless the document has tracked changes. Use superdoc_get_content info to check the tracked change count first.\n\nEXAMPLES:\n 1. {\"action\":\"list\"}\n 2. {\"action\":\"list\",\"type\":\"replacement\",\"limit\":10}\n 3. {\"action\":\"decide\",\"decision\":\"accept\",\"target\":{\"id\":\"<changeId>\"}}\n 4. {\"action\":\"decide\",\"decision\":\"reject\",\"target\":{\"kind\":\"range\",\"range\":{\"kind\":\"text\",\"segments\":[{\"blockId\":\"<blockId>\",\"range\":{\"start\":0,\"end\":5}}]}}}\n 5. {\"action\":\"decide\",\"decision\":\"reject\",\"target\":{\"scope\":\"all\"}}",
2384
+ "description": "Review and resolve tracked changes (insertions, deletions, format changes) in the document. Action \"list\" returns all tracked changes with optional filtering by type (insert, delete, format) and pagination (limit, offset). Each change includes an ID, type, author, timestamp, and content preview. Action \"decide\" accepts or rejects changes. Pass decision:\"accept\" to apply the change permanently, or decision:\"reject\" to discard it. Target a single change with {id:\"<changeId>\"} or all changes at once with {scope:\"all\"}. Do NOT use this tool unless the document has tracked changes. Use superdoc_get_content info to check the tracked change count first.\n\nEXAMPLES:\n 1. {\"action\":\"list\"}\n 2. {\"action\":\"list\",\"type\":\"insert\",\"limit\":10}\n 3. {\"action\":\"decide\",\"decision\":\"accept\",\"target\":{\"id\":\"<changeId>\"}}\n 4. {\"action\":\"decide\",\"decision\":\"reject\",\"target\":{\"scope\":\"all\"}}",
2404
2385
  "parameters": {
2405
2386
  "type": "object",
2406
2387
  "properties": {
@@ -2424,10 +2405,9 @@
2424
2405
  "enum": [
2425
2406
  "insert",
2426
2407
  "delete",
2427
- "replacement",
2428
2408
  "format"
2429
2409
  ],
2430
- "description": "Filter by change type: 'insert', 'delete', 'replacement', or 'format'. Only for action 'list'. Omit for other actions."
2410
+ "description": "Filter by change type: 'insert', 'delete', or 'format'. Only for action 'list'. Omit for other actions."
2431
2411
  },
2432
2412
  "force": {
2433
2413
  "type": "boolean",
@@ -2465,30 +2445,6 @@
2465
2445
  "id"
2466
2446
  ]
2467
2447
  },
2468
- {
2469
- "type": "object",
2470
- "properties": {
2471
- "kind": {
2472
- "const": "range",
2473
- "type": "string"
2474
- },
2475
- "range": {
2476
- "$ref": "#/$defs/TextTarget"
2477
- },
2478
- "story": {
2479
- "$ref": "#/$defs/StoryLocator"
2480
- },
2481
- "part": {
2482
- "type": "string",
2483
- "description": "Optional part discriminator for the range target."
2484
- }
2485
- },
2486
- "additionalProperties": false,
2487
- "required": [
2488
- "kind",
2489
- "range"
2490
- ]
2491
- },
2492
2448
  {
2493
2449
  "type": "object",
2494
2450
  "properties": {
@@ -2496,18 +2452,6 @@
2496
2452
  "enum": [
2497
2453
  "all"
2498
2454
  ]
2499
- },
2500
- "story": {
2501
- "oneOf": [
2502
- {
2503
- "$ref": "#/$defs/StoryLocator"
2504
- },
2505
- {
2506
- "const": "all",
2507
- "type": "string"
2508
- }
2509
- ],
2510
- "description": "Optional explicit bulk filter. Omit or pass 'all' to target every revision-capable story, or pass a StoryLocator to scope the decision to one story."
2511
2455
  }
2512
2456
  },
2513
2457
  "additionalProperties": false,