@superdoc/sdk 2.9.1-next.2 → 2.10.0-next.10

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 (57) hide show
  1. package/README.md +45 -0
  2. package/dist/action-primitives/doc-index.cjs +6 -4
  3. package/dist/action-primitives/doc-index.js +6 -4
  4. package/dist/action-primitives/engine.cjs +6 -2
  5. package/dist/action-primitives/engine.js +6 -2
  6. package/dist/action-primitives/receipt.d.ts +4 -0
  7. package/dist/action-primitives/tools/structure-insert.d.ts +1 -1
  8. package/dist/agent/actions.cjs +384 -373
  9. package/dist/agent/actions.d.ts +5 -0
  10. package/dist/agent/actions.js +385 -374
  11. package/dist/agent/catalog.cjs +15 -0
  12. package/dist/agent/catalog.js +15 -0
  13. package/dist/agent/doc-snapshot.cjs +205 -86
  14. package/dist/agent/doc-snapshot.d.ts +11 -0
  15. package/dist/agent/doc-snapshot.js +203 -86
  16. package/dist/agent/execution-context.cjs +385 -0
  17. package/dist/agent/execution-context.d.ts +97 -0
  18. package/dist/agent/execution-context.js +376 -0
  19. package/dist/agent/runtime.cjs +123 -117
  20. package/dist/agent/runtime.d.ts +3 -0
  21. package/dist/agent/runtime.js +124 -118
  22. package/dist/agent/v2-preset-compat.cjs +5 -1
  23. package/dist/agent/v2-preset-compat.js +4 -1
  24. package/dist/embedded-tools.generated.cjs +5 -5
  25. package/dist/embedded-tools.generated.js +5 -5
  26. package/dist/generated/client.cjs +2 -0
  27. package/dist/generated/client.d.ts +85 -0
  28. package/dist/generated/client.js +2 -0
  29. package/dist/generated/contract.cjs +1796 -1297
  30. package/dist/generated/contract.js +1797 -1297
  31. package/dist/index.cjs +23 -0
  32. package/dist/index.d.ts +7 -2
  33. package/dist/index.js +23 -0
  34. package/dist/presets/core.cjs +1 -1
  35. package/dist/presets/core.js +1 -1
  36. package/dist/runtime/document-evidence.cjs +40 -0
  37. package/dist/runtime/document-evidence.d.ts +13 -0
  38. package/dist/runtime/document-evidence.js +30 -0
  39. package/dist/runtime/document-rpc.cjs +27 -0
  40. package/dist/runtime/document-rpc.d.ts +2 -0
  41. package/dist/runtime/document-rpc.js +25 -0
  42. package/dist/runtime/host.cjs +65 -4
  43. package/dist/runtime/host.d.ts +3 -0
  44. package/dist/runtime/host.js +66 -5
  45. package/dist/runtime/process.cjs +38 -0
  46. package/dist/runtime/process.d.ts +16 -0
  47. package/dist/runtime/process.js +38 -0
  48. package/dist/runtime/sdk-version.generated.cjs +1 -1
  49. package/dist/runtime/sdk-version.generated.d.ts +1 -1
  50. package/dist/runtime/sdk-version.generated.js +1 -1
  51. package/package.json +10 -8
  52. package/tools/catalog.json +89 -0
  53. package/tools/tools-policy.json +1 -1
  54. package/tools/tools.anthropic.json +89 -0
  55. package/tools/tools.generic.json +89 -0
  56. package/tools/tools.openai.json +89 -0
  57. package/tools/tools.vercel.json +89 -0
@@ -1,5 +1,8 @@
1
1
  'use strict';
2
2
 
3
+ var promises = require('node:fs/promises');
4
+ var os = require('node:os');
5
+ var path = require('node:path');
3
6
  var host = require('./host.cjs');
4
7
  var embeddedCli = require('./embedded-cli.cjs');
5
8
  var embeddedDocumentHost = require('./embedded-document-host.cjs');
@@ -54,6 +57,12 @@ class SuperDocRuntime {
54
57
  async connect() {
55
58
  await this.transport.connect();
56
59
  }
60
+ supportsDocumentFacts(sessionId) {
61
+ return this.transport.supportsDocumentFacts(sessionId);
62
+ }
63
+ async readDocumentRevision(sessionId) {
64
+ return this.transport.readDocumentRevision(sessionId);
65
+ }
57
66
  async dispose() {
58
67
  await this.transport.dispose();
59
68
  }
@@ -88,6 +97,35 @@ class SuperDocRuntime {
88
97
  throw error;
89
98
  }
90
99
  }
100
+ async replaceFile(sessionId, source, options = {}) {
101
+ if (typeof source === 'string') {
102
+ if (source.trim().length === 0) {
103
+ throw new errors.SuperDocCliError('replaceFile source path must be non-empty.', { code: 'INVALID_ARGUMENT' });
104
+ }
105
+ return (await this.transport.replaceFile(sessionId, source, options));
106
+ }
107
+ let bytes;
108
+ if (source instanceof Uint8Array) {
109
+ bytes = new Uint8Array(source);
110
+ }
111
+ else if (source instanceof ArrayBuffer) {
112
+ bytes = new Uint8Array(source.slice(0));
113
+ }
114
+ else {
115
+ throw new errors.SuperDocCliError('replaceFile source must be a path, Uint8Array, or ArrayBuffer.', {
116
+ code: 'INVALID_ARGUMENT',
117
+ });
118
+ }
119
+ const stagingDirectory = await promises.mkdtemp(path.join(os.tmpdir(), 'superdoc-sdk-replace-'));
120
+ const stagedPath = path.join(stagingDirectory, 'replacement.docx');
121
+ try {
122
+ await promises.writeFile(stagedPath, bytes, { mode: 0o600 });
123
+ return (await this.transport.replaceFile(sessionId, stagedPath, options));
124
+ }
125
+ finally {
126
+ await promises.rm(stagingDirectory, { recursive: true, force: true });
127
+ }
128
+ }
91
129
  }
92
130
 
93
131
  exports.SuperDocRuntime = SuperDocRuntime;
@@ -7,6 +7,19 @@ type EmbeddedRuntimeResolvers = {
7
7
  cli: () => string;
8
8
  documentHost: () => string;
9
9
  };
10
+ export type ReplaceFileSource = string | Uint8Array | ArrayBuffer;
11
+ export interface ReplaceFileOptions {
12
+ readonly timeoutMs?: number;
13
+ }
14
+ export interface ReplaceFileResult {
15
+ readonly contextId: string;
16
+ readonly runtime: 'v2';
17
+ readonly replaced: true;
18
+ readonly document: {
19
+ readonly byteLength: number;
20
+ readonly revision: string;
21
+ };
22
+ }
10
23
  export declare function resolveRuntimeProcess(options?: SuperDocClientOptions, embedded?: EmbeddedRuntimeResolvers): RuntimeProcessResolution;
11
24
  export declare function toSafeInvokeTraceOptions(options: TransportInvokeOptions): InvokeOptions;
12
25
  /**
@@ -19,7 +32,10 @@ export declare class SuperDocRuntime {
19
32
  private readonly transport;
20
33
  constructor(options?: SuperDocClientOptions);
21
34
  connect(): Promise<void>;
35
+ supportsDocumentFacts(sessionId: string): boolean;
36
+ readDocumentRevision(sessionId: string): Promise<string | undefined>;
22
37
  dispose(): Promise<void>;
23
38
  invoke<TData = unknown>(operation: OperationSpec, params?: Record<string, unknown>, options?: TransportInvokeOptions): Promise<TData>;
39
+ replaceFile(sessionId: string, source: ReplaceFileSource, options?: ReplaceFileOptions): Promise<ReplaceFileResult>;
24
40
  }
25
41
  export type { CollaborationAuth, DocumentRuntimeKind, DocOpenOptions, InvokeOptions, OperationParamSpec, OperationSpec, RuntimeInvoker, SuperDocClientOptions, };
@@ -1,3 +1,6 @@
1
+ import { mkdtemp, rm, writeFile } from 'node:fs/promises';
2
+ import { tmpdir } from 'node:os';
3
+ import { join } from 'node:path';
1
4
  import { HostTransport } from './host.js';
2
5
  import { resolveEmbeddedCliBinary } from './embedded-cli.js';
3
6
  import { resolveEmbeddedDocumentHostBinary } from './embedded-document-host.js';
@@ -51,6 +54,12 @@ export class SuperDocRuntime {
51
54
  async connect() {
52
55
  await this.transport.connect();
53
56
  }
57
+ supportsDocumentFacts(sessionId) {
58
+ return this.transport.supportsDocumentFacts(sessionId);
59
+ }
60
+ async readDocumentRevision(sessionId) {
61
+ return this.transport.readDocumentRevision(sessionId);
62
+ }
54
63
  async dispose() {
55
64
  await this.transport.dispose();
56
65
  }
@@ -85,4 +94,33 @@ export class SuperDocRuntime {
85
94
  throw error;
86
95
  }
87
96
  }
97
+ async replaceFile(sessionId, source, options = {}) {
98
+ if (typeof source === 'string') {
99
+ if (source.trim().length === 0) {
100
+ throw new SuperDocCliError('replaceFile source path must be non-empty.', { code: 'INVALID_ARGUMENT' });
101
+ }
102
+ return (await this.transport.replaceFile(sessionId, source, options));
103
+ }
104
+ let bytes;
105
+ if (source instanceof Uint8Array) {
106
+ bytes = new Uint8Array(source);
107
+ }
108
+ else if (source instanceof ArrayBuffer) {
109
+ bytes = new Uint8Array(source.slice(0));
110
+ }
111
+ else {
112
+ throw new SuperDocCliError('replaceFile source must be a path, Uint8Array, or ArrayBuffer.', {
113
+ code: 'INVALID_ARGUMENT',
114
+ });
115
+ }
116
+ const stagingDirectory = await mkdtemp(join(tmpdir(), 'superdoc-sdk-replace-'));
117
+ const stagedPath = join(stagingDirectory, 'replacement.docx');
118
+ try {
119
+ await writeFile(stagedPath, bytes, { mode: 0o600 });
120
+ return (await this.transport.replaceFile(sessionId, stagedPath, options));
121
+ }
122
+ finally {
123
+ await rm(stagingDirectory, { recursive: true, force: true });
124
+ }
125
+ }
88
126
  }
@@ -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.9.1-next.2';
6
+ const SDK_VERSION = '2.10.0-next.10';
7
7
 
8
8
  exports.SDK_VERSION = SDK_VERSION;
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "2.9.1-next.2";
1
+ export declare const SDK_VERSION = "2.10.0-next.10";
@@ -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.9.1-next.2';
4
+ export const SDK_VERSION = '2.10.0-next.10';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@superdoc/sdk",
3
- "version": "2.9.1-next.2",
3
+ "version": "2.10.0-next.10",
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",
@@ -33,15 +33,16 @@
33
33
  "devDependencies": {
34
34
  "@types/bun": "^1.3.8",
35
35
  "@types/node": "22.19.2",
36
+ "jszip": "3.10.1",
36
37
  "rollup": "^4.31.0",
37
38
  "typescript": "^5.9.2"
38
39
  },
39
40
  "optionalDependencies": {
40
- "@superdoc/sdk-darwin-arm64": "2.9.1-next.2",
41
- "@superdoc/sdk-darwin-x64": "2.9.1-next.2",
42
- "@superdoc/sdk-linux-x64": "2.9.1-next.2",
43
- "@superdoc/sdk-linux-arm64": "2.9.1-next.2",
44
- "@superdoc/sdk-windows-x64": "2.9.1-next.2"
41
+ "@superdoc/sdk-darwin-arm64": "2.10.0-next.10",
42
+ "@superdoc/sdk-darwin-x64": "2.10.0-next.10",
43
+ "@superdoc/sdk-linux-x64": "2.10.0-next.10",
44
+ "@superdoc/sdk-linux-arm64": "2.10.0-next.10",
45
+ "@superdoc/sdk-windows-x64": "2.10.0-next.10"
45
46
  },
46
47
  "publishConfig": {
47
48
  "access": "public"
@@ -50,8 +51,9 @@
50
51
  "build": "rm -rf dist && node scripts/embed-version.mjs && node scripts/embed-prompts.mjs && node scripts/embed-tools.mjs && tsc && pnpm run typecheck:consumer && rollup -c rollup.cjs.config.mjs && rm -rf dist/prompts && mkdir -p dist/prompts && cp src/prompts/*.md dist/prompts/ && pnpm run audit:publish",
51
52
  "audit:publish": "node ../../../../scripts/audit-publish-artifact.mjs dist --label sdk-node-dist",
52
53
  "typecheck": "tsc --noEmit",
53
- "typecheck:consumer": "tsc --noEmit --strict --skipLibCheck --target ES2022 --module NodeNext --moduleResolution NodeNext ../../../../tests/consumer-typecheck/src/sdk-per-open-collaboration-auth.mts",
54
- "test:document-host": "bun test src/runtime/__tests__/host-spawn-args.test.ts src/runtime/__tests__/document-rpc.test.ts src/__tests__/structured-document-rpc.e2e.test.ts src/__tests__/request-timeout-ms.e2e.test.ts",
54
+ "typecheck:consumer": "tsc --noEmit --strict --skipLibCheck --target ES2022 --module NodeNext --moduleResolution NodeNext ../../../../tests/consumer-typecheck/src/sdk-per-open-collaboration-auth.mts ../../../../tests/consumer-typecheck/src/sdk-replace-file.mts ../../../../tests/consumer-typecheck/src/sdk-agent-evidence.mts",
55
+ "test:agent-actions": "bun test src/__tests__/actions.test.ts src/__tests__/agent-runtime.test.ts",
56
+ "test:document-host": "bun test src/runtime/__tests__/host-spawn-args.test.ts src/runtime/__tests__/document-rpc.test.ts src/__tests__/structured-document-rpc.e2e.test.ts src/__tests__/request-timeout-ms.e2e.test.ts src/__tests__/agent-evidence.e2e.test.ts src/__tests__/agent-apply.e2e.test.ts src/__tests__/find-text.e2e.test.ts",
55
57
  "smoke:product-action": "node scripts/product-action-smoke.mjs"
56
58
  }
57
59
  }
@@ -43,6 +43,41 @@
43
43
  "type": "boolean",
44
44
  "description": "Only for actions 'markdown_projection', 'html_projection'. Omit for other actions."
45
45
  },
46
+ "nodeIds": {
47
+ "type": "array",
48
+ "items": {
49
+ "type": "string",
50
+ "minLength": 1
51
+ },
52
+ "description": "Top-level block identities to match before pagination. Only for action 'blocks'. Omit for other actions."
53
+ },
54
+ "textSearch": {
55
+ "type": "object",
56
+ "properties": {
57
+ "terms": {
58
+ "type": "array",
59
+ "minItems": 1,
60
+ "items": {
61
+ "type": "string",
62
+ "minLength": 1
63
+ }
64
+ },
65
+ "match": {
66
+ "enum": [
67
+ "all",
68
+ "any"
69
+ ]
70
+ },
71
+ "caseSensitive": {
72
+ "type": "boolean"
73
+ }
74
+ },
75
+ "additionalProperties": false,
76
+ "required": [
77
+ "terms"
78
+ ],
79
+ "description": "Only for action 'blocks'. Omit for other actions."
80
+ },
46
81
  "offset": {
47
82
  "type": "number",
48
83
  "minimum": 0,
@@ -3647,6 +3682,10 @@
3647
3682
  "wholeWord": {
3648
3683
  "type": "boolean",
3649
3684
  "description": "Require word-boundary matches. Default: false."
3685
+ },
3686
+ "includeDeletedText": {
3687
+ "type": "boolean",
3688
+ "description": "When true, includes text from pending tracked deletions. Default: false."
3650
3689
  }
3651
3690
  },
3652
3691
  "additionalProperties": false,
@@ -3841,6 +3880,10 @@
3841
3880
  "wholeWord": {
3842
3881
  "type": "boolean",
3843
3882
  "description": "Require word-boundary matches. Default: false."
3883
+ },
3884
+ "includeDeletedText": {
3885
+ "type": "boolean",
3886
+ "description": "When true, includes text from pending tracked deletions. Default: false."
3844
3887
  }
3845
3888
  },
3846
3889
  "additionalProperties": false,
@@ -4030,6 +4073,20 @@
4030
4073
  }
4031
4074
  ]
4032
4075
  },
4076
+ "replacementMode": {
4077
+ "enum": [
4078
+ "literal",
4079
+ "regex-template"
4080
+ ],
4081
+ "type": "string"
4082
+ },
4083
+ "caseHandling": {
4084
+ "enum": [
4085
+ "exact",
4086
+ "preserve-match"
4087
+ ],
4088
+ "type": "string"
4089
+ },
4033
4090
  "style": {
4034
4091
  "type": "object",
4035
4092
  "properties": {
@@ -4181,6 +4238,10 @@
4181
4238
  "wholeWord": {
4182
4239
  "type": "boolean",
4183
4240
  "description": "Require word-boundary matches. Default: false."
4241
+ },
4242
+ "includeDeletedText": {
4243
+ "type": "boolean",
4244
+ "description": "When true, includes text from pending tracked deletions. Default: false."
4184
4245
  }
4185
4246
  },
4186
4247
  "additionalProperties": false,
@@ -4470,6 +4531,10 @@
4470
4531
  "wholeWord": {
4471
4532
  "type": "boolean",
4472
4533
  "description": "Require word-boundary matches. Default: false."
4534
+ },
4535
+ "includeDeletedText": {
4536
+ "type": "boolean",
4537
+ "description": "When true, includes text from pending tracked deletions. Default: false."
4473
4538
  }
4474
4539
  },
4475
4540
  "additionalProperties": false,
@@ -4681,6 +4746,10 @@
4681
4746
  "wholeWord": {
4682
4747
  "type": "boolean",
4683
4748
  "description": "Require word-boundary matches. Default: false."
4749
+ },
4750
+ "includeDeletedText": {
4751
+ "type": "boolean",
4752
+ "description": "When true, includes text from pending tracked deletions. Default: false."
4684
4753
  }
4685
4754
  },
4686
4755
  "additionalProperties": false,
@@ -5715,6 +5784,10 @@
5715
5784
  "wholeWord": {
5716
5785
  "type": "boolean",
5717
5786
  "description": "Require word-boundary matches. Default: false."
5787
+ },
5788
+ "includeDeletedText": {
5789
+ "type": "boolean",
5790
+ "description": "When true, includes text from pending tracked deletions. Default: false."
5718
5791
  }
5719
5792
  },
5720
5793
  "additionalProperties": false,
@@ -5808,6 +5881,22 @@
5808
5881
  },
5809
5882
  "description": "Ordered array of mutation steps. Each step needs 'op' (text.rewrite, text.insert, text.delete, format.apply, or assert) and a 'where' targeting clause."
5810
5883
  },
5884
+ "detail": {
5885
+ "type": "object",
5886
+ "properties": {
5887
+ "offset": {
5888
+ "type": "number",
5889
+ "minimum": 0
5890
+ },
5891
+ "limit": {
5892
+ "type": "number",
5893
+ "minimum": 0,
5894
+ "maximum": 1000
5895
+ }
5896
+ },
5897
+ "additionalProperties": false,
5898
+ "description": "Only for action 'preview'. Omit for other actions."
5899
+ },
5811
5900
  "force": {
5812
5901
  "type": "boolean",
5813
5902
  "description": "Bypass confirmation checks. Only for action 'apply'. Omit for other actions."
@@ -43,5 +43,5 @@
43
43
  "mutates": true
44
44
  }
45
45
  ],
46
- "contractHash": "02f82dbd04b3ff01becfcb9387d5a23191fd88b17e8fa27a86fe89c9dc046008"
46
+ "contractHash": "243b9ae43deca7396cb83238901d31cec3aa20fcba31f9ba5eba561f63c6c2cc"
47
47
  }
@@ -41,6 +41,41 @@
41
41
  "type": "boolean",
42
42
  "description": "Only for actions 'markdown_projection', 'html_projection'. Omit for other actions."
43
43
  },
44
+ "nodeIds": {
45
+ "type": "array",
46
+ "items": {
47
+ "type": "string",
48
+ "minLength": 1
49
+ },
50
+ "description": "Top-level block identities to match before pagination. Only for action 'blocks'. Omit for other actions."
51
+ },
52
+ "textSearch": {
53
+ "type": "object",
54
+ "properties": {
55
+ "terms": {
56
+ "type": "array",
57
+ "minItems": 1,
58
+ "items": {
59
+ "type": "string",
60
+ "minLength": 1
61
+ }
62
+ },
63
+ "match": {
64
+ "enum": [
65
+ "all",
66
+ "any"
67
+ ]
68
+ },
69
+ "caseSensitive": {
70
+ "type": "boolean"
71
+ }
72
+ },
73
+ "additionalProperties": false,
74
+ "required": [
75
+ "terms"
76
+ ],
77
+ "description": "Only for action 'blocks'. Omit for other actions."
78
+ },
44
79
  "offset": {
45
80
  "type": "number",
46
81
  "minimum": 0,
@@ -3250,6 +3285,10 @@
3250
3285
  "wholeWord": {
3251
3286
  "type": "boolean",
3252
3287
  "description": "Require word-boundary matches. Default: false."
3288
+ },
3289
+ "includeDeletedText": {
3290
+ "type": "boolean",
3291
+ "description": "When true, includes text from pending tracked deletions. Default: false."
3253
3292
  }
3254
3293
  },
3255
3294
  "additionalProperties": false,
@@ -3434,6 +3473,10 @@
3434
3473
  "wholeWord": {
3435
3474
  "type": "boolean",
3436
3475
  "description": "Require word-boundary matches. Default: false."
3476
+ },
3477
+ "includeDeletedText": {
3478
+ "type": "boolean",
3479
+ "description": "When true, includes text from pending tracked deletions. Default: false."
3437
3480
  }
3438
3481
  },
3439
3482
  "additionalProperties": false,
@@ -3623,6 +3666,20 @@
3623
3666
  }
3624
3667
  ]
3625
3668
  },
3669
+ "replacementMode": {
3670
+ "enum": [
3671
+ "literal",
3672
+ "regex-template"
3673
+ ],
3674
+ "type": "string"
3675
+ },
3676
+ "caseHandling": {
3677
+ "enum": [
3678
+ "exact",
3679
+ "preserve-match"
3680
+ ],
3681
+ "type": "string"
3682
+ },
3626
3683
  "style": {
3627
3684
  "type": "object",
3628
3685
  "properties": {
@@ -3774,6 +3831,10 @@
3774
3831
  "wholeWord": {
3775
3832
  "type": "boolean",
3776
3833
  "description": "Require word-boundary matches. Default: false."
3834
+ },
3835
+ "includeDeletedText": {
3836
+ "type": "boolean",
3837
+ "description": "When true, includes text from pending tracked deletions. Default: false."
3777
3838
  }
3778
3839
  },
3779
3840
  "additionalProperties": false,
@@ -4063,6 +4124,10 @@
4063
4124
  "wholeWord": {
4064
4125
  "type": "boolean",
4065
4126
  "description": "Require word-boundary matches. Default: false."
4127
+ },
4128
+ "includeDeletedText": {
4129
+ "type": "boolean",
4130
+ "description": "When true, includes text from pending tracked deletions. Default: false."
4066
4131
  }
4067
4132
  },
4068
4133
  "additionalProperties": false,
@@ -4274,6 +4339,10 @@
4274
4339
  "wholeWord": {
4275
4340
  "type": "boolean",
4276
4341
  "description": "Require word-boundary matches. Default: false."
4342
+ },
4343
+ "includeDeletedText": {
4344
+ "type": "boolean",
4345
+ "description": "When true, includes text from pending tracked deletions. Default: false."
4277
4346
  }
4278
4347
  },
4279
4348
  "additionalProperties": false,
@@ -5308,6 +5377,10 @@
5308
5377
  "wholeWord": {
5309
5378
  "type": "boolean",
5310
5379
  "description": "Require word-boundary matches. Default: false."
5380
+ },
5381
+ "includeDeletedText": {
5382
+ "type": "boolean",
5383
+ "description": "When true, includes text from pending tracked deletions. Default: false."
5311
5384
  }
5312
5385
  },
5313
5386
  "additionalProperties": false,
@@ -5401,6 +5474,22 @@
5401
5474
  },
5402
5475
  "description": "Ordered array of mutation steps. Each step needs 'op' (text.rewrite, text.insert, text.delete, format.apply, or assert) and a 'where' targeting clause."
5403
5476
  },
5477
+ "detail": {
5478
+ "type": "object",
5479
+ "properties": {
5480
+ "offset": {
5481
+ "type": "number",
5482
+ "minimum": 0
5483
+ },
5484
+ "limit": {
5485
+ "type": "number",
5486
+ "minimum": 0,
5487
+ "maximum": 1000
5488
+ }
5489
+ },
5490
+ "additionalProperties": false,
5491
+ "description": "Only for action 'preview'. Omit for other actions."
5492
+ },
5404
5493
  "force": {
5405
5494
  "type": "boolean",
5406
5495
  "description": "Bypass confirmation checks. Only for action 'apply'. Omit for other actions."
@@ -41,6 +41,41 @@
41
41
  "type": "boolean",
42
42
  "description": "Only for actions 'markdown_projection', 'html_projection'. Omit for other actions."
43
43
  },
44
+ "nodeIds": {
45
+ "type": "array",
46
+ "items": {
47
+ "type": "string",
48
+ "minLength": 1
49
+ },
50
+ "description": "Top-level block identities to match before pagination. Only for action 'blocks'. Omit for other actions."
51
+ },
52
+ "textSearch": {
53
+ "type": "object",
54
+ "properties": {
55
+ "terms": {
56
+ "type": "array",
57
+ "minItems": 1,
58
+ "items": {
59
+ "type": "string",
60
+ "minLength": 1
61
+ }
62
+ },
63
+ "match": {
64
+ "enum": [
65
+ "all",
66
+ "any"
67
+ ]
68
+ },
69
+ "caseSensitive": {
70
+ "type": "boolean"
71
+ }
72
+ },
73
+ "additionalProperties": false,
74
+ "required": [
75
+ "terms"
76
+ ],
77
+ "description": "Only for action 'blocks'. Omit for other actions."
78
+ },
44
79
  "offset": {
45
80
  "type": "number",
46
81
  "minimum": 0,
@@ -3400,6 +3435,10 @@
3400
3435
  "wholeWord": {
3401
3436
  "type": "boolean",
3402
3437
  "description": "Require word-boundary matches. Default: false."
3438
+ },
3439
+ "includeDeletedText": {
3440
+ "type": "boolean",
3441
+ "description": "When true, includes text from pending tracked deletions. Default: false."
3403
3442
  }
3404
3443
  },
3405
3444
  "additionalProperties": false,
@@ -3600,6 +3639,10 @@
3600
3639
  "wholeWord": {
3601
3640
  "type": "boolean",
3602
3641
  "description": "Require word-boundary matches. Default: false."
3642
+ },
3643
+ "includeDeletedText": {
3644
+ "type": "boolean",
3645
+ "description": "When true, includes text from pending tracked deletions. Default: false."
3603
3646
  }
3604
3647
  },
3605
3648
  "additionalProperties": false,
@@ -3789,6 +3832,20 @@
3789
3832
  }
3790
3833
  ]
3791
3834
  },
3835
+ "replacementMode": {
3836
+ "enum": [
3837
+ "literal",
3838
+ "regex-template"
3839
+ ],
3840
+ "type": "string"
3841
+ },
3842
+ "caseHandling": {
3843
+ "enum": [
3844
+ "exact",
3845
+ "preserve-match"
3846
+ ],
3847
+ "type": "string"
3848
+ },
3792
3849
  "style": {
3793
3850
  "type": "object",
3794
3851
  "properties": {
@@ -3940,6 +3997,10 @@
3940
3997
  "wholeWord": {
3941
3998
  "type": "boolean",
3942
3999
  "description": "Require word-boundary matches. Default: false."
4000
+ },
4001
+ "includeDeletedText": {
4002
+ "type": "boolean",
4003
+ "description": "When true, includes text from pending tracked deletions. Default: false."
3943
4004
  }
3944
4005
  },
3945
4006
  "additionalProperties": false,
@@ -4229,6 +4290,10 @@
4229
4290
  "wholeWord": {
4230
4291
  "type": "boolean",
4231
4292
  "description": "Require word-boundary matches. Default: false."
4293
+ },
4294
+ "includeDeletedText": {
4295
+ "type": "boolean",
4296
+ "description": "When true, includes text from pending tracked deletions. Default: false."
4232
4297
  }
4233
4298
  },
4234
4299
  "additionalProperties": false,
@@ -4440,6 +4505,10 @@
4440
4505
  "wholeWord": {
4441
4506
  "type": "boolean",
4442
4507
  "description": "Require word-boundary matches. Default: false."
4508
+ },
4509
+ "includeDeletedText": {
4510
+ "type": "boolean",
4511
+ "description": "When true, includes text from pending tracked deletions. Default: false."
4443
4512
  }
4444
4513
  },
4445
4514
  "additionalProperties": false,
@@ -5474,6 +5543,10 @@
5474
5543
  "wholeWord": {
5475
5544
  "type": "boolean",
5476
5545
  "description": "Require word-boundary matches. Default: false."
5546
+ },
5547
+ "includeDeletedText": {
5548
+ "type": "boolean",
5549
+ "description": "When true, includes text from pending tracked deletions. Default: false."
5477
5550
  }
5478
5551
  },
5479
5552
  "additionalProperties": false,
@@ -5567,6 +5640,22 @@
5567
5640
  },
5568
5641
  "description": "Ordered array of mutation steps. Each step needs 'op' (text.rewrite, text.insert, text.delete, format.apply, or assert) and a 'where' targeting clause."
5569
5642
  },
5643
+ "detail": {
5644
+ "type": "object",
5645
+ "properties": {
5646
+ "offset": {
5647
+ "type": "number",
5648
+ "minimum": 0
5649
+ },
5650
+ "limit": {
5651
+ "type": "number",
5652
+ "minimum": 0,
5653
+ "maximum": 1000
5654
+ }
5655
+ },
5656
+ "additionalProperties": false,
5657
+ "description": "Only for action 'preview'. Omit for other actions."
5658
+ },
5570
5659
  "force": {
5571
5660
  "type": "boolean",
5572
5661
  "description": "Bypass confirmation checks. Only for action 'apply'. Omit for other actions."