@superdoc-dev/sdk 1.13.0 → 1.14.0-next.2

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.
@@ -2328,15 +2328,34 @@
2328
2328
  },
2329
2329
  {
2330
2330
  "$ref": "#/$defs/TextTarget"
2331
+ },
2332
+ {
2333
+ "$ref": "#/$defs/SelectionTarget"
2334
+ },
2335
+ {
2336
+ "$ref": "#/$defs/CommentTrackedChangeTarget"
2331
2337
  }
2332
2338
  ],
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."
2339
+ "description": "Comment target. Accepts a TextAddress, TextTarget, SelectionTarget, or {trackedChangeId, kind?:'trackedChange'} to anchor directly on tracked content."
2334
2340
  },
2335
2341
  {
2336
- "$ref": "#/$defs/TextAddress"
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
+ ]
2337
2356
  }
2338
2357
  ],
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."
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."
2340
2359
  },
2341
2360
  "parentId": {
2342
2361
  "type": "string",
@@ -2381,7 +2400,7 @@
2381
2400
  "type": "function",
2382
2401
  "function": {
2383
2402
  "name": "superdoc_track_changes",
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\"}}",
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\"}}",
2385
2404
  "parameters": {
2386
2405
  "type": "object",
2387
2406
  "properties": {
@@ -2405,9 +2424,10 @@
2405
2424
  "enum": [
2406
2425
  "insert",
2407
2426
  "delete",
2427
+ "replacement",
2408
2428
  "format"
2409
2429
  ],
2410
- "description": "Filter by change type: 'insert', 'delete', or 'format'. Only for action 'list'. Omit for other actions."
2430
+ "description": "Filter by change type: 'insert', 'delete', 'replacement', or 'format'. Only for action 'list'. Omit for other actions."
2411
2431
  },
2412
2432
  "force": {
2413
2433
  "type": "boolean",
@@ -2445,6 +2465,30 @@
2445
2465
  "id"
2446
2466
  ]
2447
2467
  },
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
+ },
2448
2492
  {
2449
2493
  "type": "object",
2450
2494
  "properties": {
@@ -2452,6 +2496,18 @@
2452
2496
  "enum": [
2453
2497
  "all"
2454
2498
  ]
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."
2455
2511
  }
2456
2512
  },
2457
2513
  "additionalProperties": false,