@stll/folio-agents 0.8.8 → 0.9.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.
@@ -1,5 +1,20 @@
1
1
  import { FolioDocumentOperationBatch } from "@stll/folio-core/server";
2
2
  //#region src/operation-schema.d.ts
3
+ /** Compact public shape for the runtime JSON Schema projections. */
4
+ type FolioJsonSchema = {
5
+ readonly type?: string;
6
+ readonly description?: string;
7
+ readonly enum?: readonly unknown[];
8
+ readonly minimum?: number;
9
+ readonly minLength?: number;
10
+ readonly minProperties?: number;
11
+ readonly pattern?: string;
12
+ readonly properties?: Readonly<Record<string, FolioJsonSchema>>;
13
+ readonly required?: readonly string[];
14
+ readonly additionalProperties?: boolean;
15
+ readonly items?: FolioJsonSchema;
16
+ readonly oneOf?: readonly FolioJsonSchema[];
17
+ };
3
18
  /**
4
19
  * JSON Schema for the contract's `textRange` handle (a serializable range
5
20
  * over the visible text of one main-story block, as returned by `find_text`
@@ -8,40 +23,7 @@ import { FolioDocumentOperationBatch } from "@stll/folio-core/server";
8
23
  * drift. `endOffset` must be greater than `startOffset`; JSON Schema cannot
9
24
  * express that relation, the parser enforces it.
10
25
  */
11
- declare const FOLIO_TEXT_RANGE_JSON_SCHEMA: {
12
- readonly type: "object";
13
- readonly description: string;
14
- readonly properties: {
15
- readonly type: {
16
- readonly type: "string";
17
- readonly enum: readonly ["textRange"];
18
- };
19
- readonly story: {
20
- readonly type: "string";
21
- readonly enum: readonly ["main"];
22
- };
23
- readonly blockId: {
24
- readonly type: "string";
25
- readonly minLength: 1;
26
- };
27
- readonly startOffset: {
28
- readonly type: "integer";
29
- readonly minimum: 0;
30
- };
31
- readonly endOffset: {
32
- readonly type: "integer";
33
- readonly minimum: 1;
34
- readonly description: "Exclusive end offset; must be greater than `startOffset`.";
35
- };
36
- readonly selectedTextHash: {
37
- readonly type: "string";
38
- readonly pattern: "^h[0-9a-z]+$";
39
- readonly description: "Normalized hash of the selected text, used to detect stale ranges.";
40
- };
41
- };
42
- readonly required: readonly ["type", "story", "blockId", "startOffset", "endOffset", "selectedTextHash"];
43
- readonly additionalProperties: false;
44
- };
26
+ declare const FOLIO_TEXT_RANGE_JSON_SCHEMA: FolioJsonSchema;
45
27
  /**
46
28
  * JSON Schema for the contract's optional `precondition` guard: `{
47
29
  * blockTextHash }`, echoed from a `blockTextHash` returned by a document
@@ -49,19 +31,7 @@ declare const FOLIO_TEXT_RANGE_JSON_SCHEMA: {
49
31
  * `tools.ts` can attach the same shape to `suggest_changes` and
50
32
  * `add_comment` without redeclaring it.
51
33
  */
52
- declare const FOLIO_PRECONDITION_JSON_SCHEMA: {
53
- readonly type: "object";
54
- readonly description: string;
55
- readonly properties: {
56
- readonly blockTextHash: {
57
- readonly type: "string";
58
- readonly pattern: "^h[0-9a-z]+$";
59
- readonly description: "Normalized hash of the target block's text, from a prior document read.";
60
- };
61
- };
62
- readonly required: readonly ["blockTextHash"];
63
- readonly additionalProperties: false;
64
- };
34
+ declare const FOLIO_PRECONDITION_JSON_SCHEMA: FolioJsonSchema;
65
35
  /**
66
36
  * JSON Schema (draft-07 compatible) for ONE document operation: the full
67
37
  * thirteen-variant union accepted by `parseFolioDocumentOperationBatch` in
@@ -71,1008 +41,7 @@ declare const FOLIO_PRECONDITION_JSON_SCHEMA: {
71
41
  * it; note that the `suggest_changes` tool in `tools.ts` deliberately
72
42
  * narrows this union (see the comment there).
73
43
  */
74
- declare const FOLIO_DOCUMENT_OPERATION_JSON_SCHEMA: {
75
- readonly description: string;
76
- readonly oneOf: readonly [{
77
- readonly type: "object";
78
- readonly description: "Replace an exact text match inside one block.";
79
- readonly properties: {
80
- readonly type: {
81
- readonly type: "string";
82
- readonly enum: readonly ["replaceInBlock"];
83
- };
84
- readonly blockId: {
85
- readonly type: "string";
86
- readonly description: "Id of the target block, from a prior document read.";
87
- };
88
- readonly find: {
89
- readonly type: "string";
90
- readonly description: "The exact text to find within the block.";
91
- };
92
- readonly replace: {
93
- readonly type: "string";
94
- readonly description: "The replacement text.";
95
- };
96
- readonly comment: {
97
- readonly type: "object";
98
- readonly description: "A comment attached to the text affected by this operation.";
99
- readonly properties: {
100
- readonly text: {
101
- readonly type: "string";
102
- readonly description: "The comment body.";
103
- };
104
- };
105
- readonly required: readonly ["text"];
106
- readonly additionalProperties: false;
107
- };
108
- readonly id: {
109
- readonly type: "string";
110
- readonly description: string;
111
- };
112
- readonly severity: {
113
- readonly type: "string";
114
- readonly enum: readonly ["low", "medium", "high"];
115
- readonly description: "Optional review severity for structured-review workflows.";
116
- };
117
- readonly area: {
118
- readonly type: "string";
119
- readonly description: "Optional review area label (e.g. \"Penalty\") for structured-review workflows.";
120
- };
121
- readonly precondition: {
122
- readonly type: "object";
123
- readonly description: string;
124
- readonly properties: {
125
- readonly blockTextHash: {
126
- readonly type: "string";
127
- readonly pattern: "^h[0-9a-z]+$";
128
- readonly description: "Normalized hash of the target block's text, from a prior document read.";
129
- };
130
- };
131
- readonly required: readonly ["blockTextHash"];
132
- readonly additionalProperties: false;
133
- };
134
- };
135
- readonly required: readonly ["id", "type", "blockId", "find", "replace"];
136
- readonly additionalProperties: false;
137
- }, {
138
- readonly type: "object";
139
- readonly description: "Replace the text covered by a range handle.";
140
- readonly properties: {
141
- readonly type: {
142
- readonly type: "string";
143
- readonly enum: readonly ["replaceRange"];
144
- };
145
- readonly range: {
146
- readonly type: "object";
147
- readonly description: string;
148
- readonly properties: {
149
- readonly type: {
150
- readonly type: "string";
151
- readonly enum: readonly ["textRange"];
152
- };
153
- readonly story: {
154
- readonly type: "string";
155
- readonly enum: readonly ["main"];
156
- };
157
- readonly blockId: {
158
- readonly type: "string";
159
- readonly minLength: 1;
160
- };
161
- readonly startOffset: {
162
- readonly type: "integer";
163
- readonly minimum: 0;
164
- };
165
- readonly endOffset: {
166
- readonly type: "integer";
167
- readonly minimum: 1;
168
- readonly description: "Exclusive end offset; must be greater than `startOffset`.";
169
- };
170
- readonly selectedTextHash: {
171
- readonly type: "string";
172
- readonly pattern: "^h[0-9a-z]+$";
173
- readonly description: "Normalized hash of the selected text, used to detect stale ranges.";
174
- };
175
- };
176
- readonly required: readonly ["type", "story", "blockId", "startOffset", "endOffset", "selectedTextHash"];
177
- readonly additionalProperties: false;
178
- };
179
- readonly replace: {
180
- readonly type: "string";
181
- readonly description: "The replacement text.";
182
- };
183
- readonly comment: {
184
- readonly type: "object";
185
- readonly description: "A comment attached to the text affected by this operation.";
186
- readonly properties: {
187
- readonly text: {
188
- readonly type: "string";
189
- readonly description: "The comment body.";
190
- };
191
- };
192
- readonly required: readonly ["text"];
193
- readonly additionalProperties: false;
194
- };
195
- readonly id: {
196
- readonly type: "string";
197
- readonly description: string;
198
- };
199
- readonly severity: {
200
- readonly type: "string";
201
- readonly enum: readonly ["low", "medium", "high"];
202
- readonly description: "Optional review severity for structured-review workflows.";
203
- };
204
- readonly area: {
205
- readonly type: "string";
206
- readonly description: "Optional review area label (e.g. \"Penalty\") for structured-review workflows.";
207
- };
208
- readonly precondition: {
209
- readonly type: "object";
210
- readonly description: string;
211
- readonly properties: {
212
- readonly blockTextHash: {
213
- readonly type: "string";
214
- readonly pattern: "^h[0-9a-z]+$";
215
- readonly description: "Normalized hash of the target block's text, from a prior document read.";
216
- };
217
- };
218
- readonly required: readonly ["blockTextHash"];
219
- readonly additionalProperties: false;
220
- };
221
- };
222
- readonly required: readonly ["id", "type", "range", "replace"];
223
- readonly additionalProperties: false;
224
- }, {
225
- readonly type: "object";
226
- readonly description: "Attach a comment to the text covered by a range handle.";
227
- readonly properties: {
228
- readonly type: {
229
- readonly type: "string";
230
- readonly enum: readonly ["commentOnRange"];
231
- };
232
- readonly range: {
233
- readonly type: "object";
234
- readonly description: string;
235
- readonly properties: {
236
- readonly type: {
237
- readonly type: "string";
238
- readonly enum: readonly ["textRange"];
239
- };
240
- readonly story: {
241
- readonly type: "string";
242
- readonly enum: readonly ["main"];
243
- };
244
- readonly blockId: {
245
- readonly type: "string";
246
- readonly minLength: 1;
247
- };
248
- readonly startOffset: {
249
- readonly type: "integer";
250
- readonly minimum: 0;
251
- };
252
- readonly endOffset: {
253
- readonly type: "integer";
254
- readonly minimum: 1;
255
- readonly description: "Exclusive end offset; must be greater than `startOffset`.";
256
- };
257
- readonly selectedTextHash: {
258
- readonly type: "string";
259
- readonly pattern: "^h[0-9a-z]+$";
260
- readonly description: "Normalized hash of the selected text, used to detect stale ranges.";
261
- };
262
- };
263
- readonly required: readonly ["type", "story", "blockId", "startOffset", "endOffset", "selectedTextHash"];
264
- readonly additionalProperties: false;
265
- };
266
- readonly comment: {
267
- readonly type: "object";
268
- readonly description: "A comment attached to the text affected by this operation.";
269
- readonly properties: {
270
- readonly text: {
271
- readonly type: "string";
272
- readonly description: "The comment body.";
273
- };
274
- };
275
- readonly required: readonly ["text"];
276
- readonly additionalProperties: false;
277
- };
278
- readonly id: {
279
- readonly type: "string";
280
- readonly description: string;
281
- };
282
- readonly severity: {
283
- readonly type: "string";
284
- readonly enum: readonly ["low", "medium", "high"];
285
- readonly description: "Optional review severity for structured-review workflows.";
286
- };
287
- readonly area: {
288
- readonly type: "string";
289
- readonly description: "Optional review area label (e.g. \"Penalty\") for structured-review workflows.";
290
- };
291
- readonly precondition: {
292
- readonly type: "object";
293
- readonly description: string;
294
- readonly properties: {
295
- readonly blockTextHash: {
296
- readonly type: "string";
297
- readonly pattern: "^h[0-9a-z]+$";
298
- readonly description: "Normalized hash of the target block's text, from a prior document read.";
299
- };
300
- };
301
- readonly required: readonly ["blockTextHash"];
302
- readonly additionalProperties: false;
303
- };
304
- };
305
- readonly required: readonly ["id", "type", "range", "comment"];
306
- readonly additionalProperties: false;
307
- }, {
308
- readonly type: "object";
309
- readonly description: "Apply inline formatting to the text covered by a range handle in direct or tracked mode.";
310
- readonly properties: {
311
- readonly type: {
312
- readonly type: "string";
313
- readonly enum: readonly ["formatRange"];
314
- };
315
- readonly range: {
316
- readonly type: "object";
317
- readonly description: string;
318
- readonly properties: {
319
- readonly type: {
320
- readonly type: "string";
321
- readonly enum: readonly ["textRange"];
322
- };
323
- readonly story: {
324
- readonly type: "string";
325
- readonly enum: readonly ["main"];
326
- };
327
- readonly blockId: {
328
- readonly type: "string";
329
- readonly minLength: 1;
330
- };
331
- readonly startOffset: {
332
- readonly type: "integer";
333
- readonly minimum: 0;
334
- };
335
- readonly endOffset: {
336
- readonly type: "integer";
337
- readonly minimum: 1;
338
- readonly description: "Exclusive end offset; must be greater than `startOffset`.";
339
- };
340
- readonly selectedTextHash: {
341
- readonly type: "string";
342
- readonly pattern: "^h[0-9a-z]+$";
343
- readonly description: "Normalized hash of the selected text, used to detect stale ranges.";
344
- };
345
- };
346
- readonly required: readonly ["type", "story", "blockId", "startOffset", "endOffset", "selectedTextHash"];
347
- readonly additionalProperties: false;
348
- };
349
- readonly formatting: {
350
- readonly type: "object";
351
- readonly description: "Inline formatting to apply; at least one property is required.";
352
- readonly properties: {
353
- readonly bold: {
354
- readonly type: "boolean";
355
- };
356
- readonly italic: {
357
- readonly type: "boolean";
358
- };
359
- readonly underline: {
360
- readonly type: "boolean";
361
- };
362
- };
363
- readonly minProperties: 1;
364
- readonly additionalProperties: false;
365
- };
366
- readonly id: {
367
- readonly type: "string";
368
- readonly description: string;
369
- };
370
- readonly severity: {
371
- readonly type: "string";
372
- readonly enum: readonly ["low", "medium", "high"];
373
- readonly description: "Optional review severity for structured-review workflows.";
374
- };
375
- readonly area: {
376
- readonly type: "string";
377
- readonly description: "Optional review area label (e.g. \"Penalty\") for structured-review workflows.";
378
- };
379
- readonly precondition: {
380
- readonly type: "object";
381
- readonly description: string;
382
- readonly properties: {
383
- readonly blockTextHash: {
384
- readonly type: "string";
385
- readonly pattern: "^h[0-9a-z]+$";
386
- readonly description: "Normalized hash of the target block's text, from a prior document read.";
387
- };
388
- };
389
- readonly required: readonly ["blockTextHash"];
390
- readonly additionalProperties: false;
391
- };
392
- };
393
- readonly required: readonly ["id", "type", "range", "formatting"];
394
- readonly additionalProperties: false;
395
- }, {
396
- readonly type: "object";
397
- readonly description: "Insert a new paragraph after the anchor block.";
398
- readonly properties: {
399
- readonly type: {
400
- readonly type: "string";
401
- readonly enum: readonly ["insertAfterBlock"];
402
- };
403
- readonly blockId: {
404
- readonly type: "string";
405
- readonly description: "Id of the target block, from a prior document read.";
406
- };
407
- readonly text: {
408
- readonly type: "string";
409
- readonly description: "The paragraph text to insert.";
410
- };
411
- readonly inheritFormatting: {
412
- readonly type: "boolean";
413
- readonly description: "Inherit the anchor block's formatting for the inserted paragraph.";
414
- };
415
- readonly pageBreakBefore: {
416
- readonly type: "boolean";
417
- readonly description: "Start the inserted paragraph on a new page (`pageBreakBefore`).";
418
- };
419
- readonly styleId: {
420
- readonly type: "string";
421
- readonly description: "Paragraph style id for the inserted block (e.g. \"ClauseHeading1\").";
422
- };
423
- readonly comment: {
424
- readonly type: "object";
425
- readonly description: "A comment attached to the text affected by this operation.";
426
- readonly properties: {
427
- readonly text: {
428
- readonly type: "string";
429
- readonly description: "The comment body.";
430
- };
431
- };
432
- readonly required: readonly ["text"];
433
- readonly additionalProperties: false;
434
- };
435
- readonly id: {
436
- readonly type: "string";
437
- readonly description: string;
438
- };
439
- readonly severity: {
440
- readonly type: "string";
441
- readonly enum: readonly ["low", "medium", "high"];
442
- readonly description: "Optional review severity for structured-review workflows.";
443
- };
444
- readonly area: {
445
- readonly type: "string";
446
- readonly description: "Optional review area label (e.g. \"Penalty\") for structured-review workflows.";
447
- };
448
- readonly precondition: {
449
- readonly type: "object";
450
- readonly description: string;
451
- readonly properties: {
452
- readonly blockTextHash: {
453
- readonly type: "string";
454
- readonly pattern: "^h[0-9a-z]+$";
455
- readonly description: "Normalized hash of the target block's text, from a prior document read.";
456
- };
457
- };
458
- readonly required: readonly ["blockTextHash"];
459
- readonly additionalProperties: false;
460
- };
461
- };
462
- readonly required: readonly ["id", "type", "blockId", "text"];
463
- readonly additionalProperties: false;
464
- }, {
465
- readonly type: "object";
466
- readonly description: "Insert a new paragraph before the anchor block.";
467
- readonly properties: {
468
- readonly type: {
469
- readonly type: "string";
470
- readonly enum: readonly ["insertBeforeBlock"];
471
- };
472
- readonly blockId: {
473
- readonly type: "string";
474
- readonly description: "Id of the target block, from a prior document read.";
475
- };
476
- readonly text: {
477
- readonly type: "string";
478
- readonly description: "The paragraph text to insert.";
479
- };
480
- readonly inheritFormatting: {
481
- readonly type: "boolean";
482
- readonly description: "Inherit the anchor block's formatting for the inserted paragraph.";
483
- };
484
- readonly pageBreakBefore: {
485
- readonly type: "boolean";
486
- readonly description: "Start the inserted paragraph on a new page (`pageBreakBefore`).";
487
- };
488
- readonly styleId: {
489
- readonly type: "string";
490
- readonly description: "Paragraph style id for the inserted block (e.g. \"ClauseHeading1\").";
491
- };
492
- readonly comment: {
493
- readonly type: "object";
494
- readonly description: "A comment attached to the text affected by this operation.";
495
- readonly properties: {
496
- readonly text: {
497
- readonly type: "string";
498
- readonly description: "The comment body.";
499
- };
500
- };
501
- readonly required: readonly ["text"];
502
- readonly additionalProperties: false;
503
- };
504
- readonly id: {
505
- readonly type: "string";
506
- readonly description: string;
507
- };
508
- readonly severity: {
509
- readonly type: "string";
510
- readonly enum: readonly ["low", "medium", "high"];
511
- readonly description: "Optional review severity for structured-review workflows.";
512
- };
513
- readonly area: {
514
- readonly type: "string";
515
- readonly description: "Optional review area label (e.g. \"Penalty\") for structured-review workflows.";
516
- };
517
- readonly precondition: {
518
- readonly type: "object";
519
- readonly description: string;
520
- readonly properties: {
521
- readonly blockTextHash: {
522
- readonly type: "string";
523
- readonly pattern: "^h[0-9a-z]+$";
524
- readonly description: "Normalized hash of the target block's text, from a prior document read.";
525
- };
526
- };
527
- readonly required: readonly ["blockTextHash"];
528
- readonly additionalProperties: false;
529
- };
530
- };
531
- readonly required: readonly ["id", "type", "blockId", "text"];
532
- readonly additionalProperties: false;
533
- }, {
534
- readonly type: "object";
535
- readonly description: "Replace one block's entire text.";
536
- readonly properties: {
537
- readonly type: {
538
- readonly type: "string";
539
- readonly enum: readonly ["replaceBlock"];
540
- };
541
- readonly blockId: {
542
- readonly type: "string";
543
- readonly description: "Id of the target block, from a prior document read.";
544
- };
545
- readonly text: {
546
- readonly type: "string";
547
- readonly description: "The new block text.";
548
- };
549
- readonly preserveFormatting: {
550
- readonly type: "boolean";
551
- readonly description: "Keep the block's existing formatting for the replacement text.";
552
- };
553
- readonly styleId: {
554
- readonly type: "string";
555
- readonly description: "Paragraph style id to set on the replaced block.";
556
- };
557
- readonly comment: {
558
- readonly type: "object";
559
- readonly description: "A comment attached to the text affected by this operation.";
560
- readonly properties: {
561
- readonly text: {
562
- readonly type: "string";
563
- readonly description: "The comment body.";
564
- };
565
- };
566
- readonly required: readonly ["text"];
567
- readonly additionalProperties: false;
568
- };
569
- readonly id: {
570
- readonly type: "string";
571
- readonly description: string;
572
- };
573
- readonly severity: {
574
- readonly type: "string";
575
- readonly enum: readonly ["low", "medium", "high"];
576
- readonly description: "Optional review severity for structured-review workflows.";
577
- };
578
- readonly area: {
579
- readonly type: "string";
580
- readonly description: "Optional review area label (e.g. \"Penalty\") for structured-review workflows.";
581
- };
582
- readonly precondition: {
583
- readonly type: "object";
584
- readonly description: string;
585
- readonly properties: {
586
- readonly blockTextHash: {
587
- readonly type: "string";
588
- readonly pattern: "^h[0-9a-z]+$";
589
- readonly description: "Normalized hash of the target block's text, from a prior document read.";
590
- };
591
- };
592
- readonly required: readonly ["blockTextHash"];
593
- readonly additionalProperties: false;
594
- };
595
- };
596
- readonly required: readonly ["id", "type", "blockId", "text"];
597
- readonly additionalProperties: false;
598
- }, {
599
- readonly type: "object";
600
- readonly description: "Delete one block.";
601
- readonly properties: {
602
- readonly type: {
603
- readonly type: "string";
604
- readonly enum: readonly ["deleteBlock"];
605
- };
606
- readonly blockId: {
607
- readonly type: "string";
608
- readonly description: "Id of the target block, from a prior document read.";
609
- };
610
- readonly comment: {
611
- readonly type: "object";
612
- readonly description: "A comment attached to the text affected by this operation.";
613
- readonly properties: {
614
- readonly text: {
615
- readonly type: "string";
616
- readonly description: "The comment body.";
617
- };
618
- };
619
- readonly required: readonly ["text"];
620
- readonly additionalProperties: false;
621
- };
622
- readonly id: {
623
- readonly type: "string";
624
- readonly description: string;
625
- };
626
- readonly severity: {
627
- readonly type: "string";
628
- readonly enum: readonly ["low", "medium", "high"];
629
- readonly description: "Optional review severity for structured-review workflows.";
630
- };
631
- readonly area: {
632
- readonly type: "string";
633
- readonly description: "Optional review area label (e.g. \"Penalty\") for structured-review workflows.";
634
- };
635
- readonly precondition: {
636
- readonly type: "object";
637
- readonly description: string;
638
- readonly properties: {
639
- readonly blockTextHash: {
640
- readonly type: "string";
641
- readonly pattern: "^h[0-9a-z]+$";
642
- readonly description: "Normalized hash of the target block's text, from a prior document read.";
643
- };
644
- };
645
- readonly required: readonly ["blockTextHash"];
646
- readonly additionalProperties: false;
647
- };
648
- };
649
- readonly required: readonly ["id", "type", "blockId"];
650
- readonly additionalProperties: false;
651
- }, {
652
- readonly type: "object";
653
- readonly description: "Attach a comment to one block, optionally quoting text within it.";
654
- readonly properties: {
655
- readonly type: {
656
- readonly type: "string";
657
- readonly enum: readonly ["commentOnBlock"];
658
- };
659
- readonly blockId: {
660
- readonly type: "string";
661
- readonly description: "Id of the target block, from a prior document read.";
662
- };
663
- readonly quote: {
664
- readonly type: "string";
665
- readonly description: "Exact text within the block the comment is about.";
666
- };
667
- readonly comment: {
668
- readonly type: "object";
669
- readonly description: "A comment attached to the text affected by this operation.";
670
- readonly properties: {
671
- readonly text: {
672
- readonly type: "string";
673
- readonly description: "The comment body.";
674
- };
675
- };
676
- readonly required: readonly ["text"];
677
- readonly additionalProperties: false;
678
- };
679
- readonly id: {
680
- readonly type: "string";
681
- readonly description: string;
682
- };
683
- readonly severity: {
684
- readonly type: "string";
685
- readonly enum: readonly ["low", "medium", "high"];
686
- readonly description: "Optional review severity for structured-review workflows.";
687
- };
688
- readonly area: {
689
- readonly type: "string";
690
- readonly description: "Optional review area label (e.g. \"Penalty\") for structured-review workflows.";
691
- };
692
- readonly precondition: {
693
- readonly type: "object";
694
- readonly description: string;
695
- readonly properties: {
696
- readonly blockTextHash: {
697
- readonly type: "string";
698
- readonly pattern: "^h[0-9a-z]+$";
699
- readonly description: "Normalized hash of the target block's text, from a prior document read.";
700
- };
701
- };
702
- readonly required: readonly ["blockTextHash"];
703
- readonly additionalProperties: false;
704
- };
705
- };
706
- readonly required: readonly ["id", "type", "blockId", "comment"];
707
- readonly additionalProperties: false;
708
- }, {
709
- readonly type: "object";
710
- readonly description: string;
711
- readonly properties: {
712
- readonly type: {
713
- readonly type: "string";
714
- readonly enum: readonly ["insertSignatureTable"];
715
- };
716
- readonly blockId: {
717
- readonly type: "string";
718
- readonly description: "Id of the target block, from a prior document read.";
719
- };
720
- readonly position: {
721
- readonly type: "string";
722
- readonly enum: readonly ["after", "before"];
723
- readonly description: "Insert after the anchor block (default) or before it. Defaults to \"after\".";
724
- };
725
- readonly parties: {
726
- readonly type: "array";
727
- readonly description: "The signing parties, one table cell per party.";
728
- readonly items: {
729
- readonly type: "object";
730
- readonly properties: {
731
- readonly name: {
732
- readonly type: "string";
733
- readonly description: "Party name (rendered bold).";
734
- };
735
- readonly signatory: {
736
- readonly type: "string";
737
- readonly description: "Name of the person signing.";
738
- };
739
- readonly title: {
740
- readonly type: "string";
741
- readonly description: "Signatory title (rendered in italics).";
742
- };
743
- };
744
- readonly required: readonly ["name"];
745
- readonly additionalProperties: false;
746
- };
747
- };
748
- readonly comment: {
749
- readonly type: "object";
750
- readonly description: "A comment attached to the text affected by this operation.";
751
- readonly properties: {
752
- readonly text: {
753
- readonly type: "string";
754
- readonly description: "The comment body.";
755
- };
756
- };
757
- readonly required: readonly ["text"];
758
- readonly additionalProperties: false;
759
- };
760
- readonly id: {
761
- readonly type: "string";
762
- readonly description: string;
763
- };
764
- readonly severity: {
765
- readonly type: "string";
766
- readonly enum: readonly ["low", "medium", "high"];
767
- readonly description: "Optional review severity for structured-review workflows.";
768
- };
769
- readonly area: {
770
- readonly type: "string";
771
- readonly description: "Optional review area label (e.g. \"Penalty\") for structured-review workflows.";
772
- };
773
- readonly precondition: {
774
- readonly type: "object";
775
- readonly description: string;
776
- readonly properties: {
777
- readonly blockTextHash: {
778
- readonly type: "string";
779
- readonly pattern: "^h[0-9a-z]+$";
780
- readonly description: "Normalized hash of the target block's text, from a prior document read.";
781
- };
782
- };
783
- readonly required: readonly ["blockTextHash"];
784
- readonly additionalProperties: false;
785
- };
786
- };
787
- readonly required: readonly ["id", "type", "blockId", "parties"];
788
- readonly additionalProperties: false;
789
- }, {
790
- readonly type: "object";
791
- readonly description: "Insert a row next to the row containing the anchor block.";
792
- readonly properties: {
793
- readonly type: {
794
- readonly type: "string";
795
- readonly enum: readonly ["insertTableRow"];
796
- };
797
- readonly blockId: {
798
- readonly type: "string";
799
- readonly description: "Id of the target block, from a prior document read.";
800
- };
801
- readonly position: {
802
- readonly type: "string";
803
- readonly enum: readonly ["after", "before"];
804
- readonly description: "Insert after the anchor row (default) or before it. Defaults to \"after\".";
805
- };
806
- readonly cellTexts: {
807
- readonly type: "array";
808
- readonly description: "Initial text for physical cells in source order; omitted cells stay empty.";
809
- readonly items: {
810
- readonly type: "string";
811
- };
812
- };
813
- readonly id: {
814
- readonly type: "string";
815
- readonly description: string;
816
- };
817
- readonly severity: {
818
- readonly type: "string";
819
- readonly enum: readonly ["low", "medium", "high"];
820
- readonly description: "Optional review severity for structured-review workflows.";
821
- };
822
- readonly area: {
823
- readonly type: "string";
824
- readonly description: "Optional review area label (e.g. \"Penalty\") for structured-review workflows.";
825
- };
826
- readonly precondition: {
827
- readonly type: "object";
828
- readonly description: string;
829
- readonly properties: {
830
- readonly blockTextHash: {
831
- readonly type: "string";
832
- readonly pattern: "^h[0-9a-z]+$";
833
- readonly description: "Normalized hash of the target block's text, from a prior document read.";
834
- };
835
- };
836
- readonly required: readonly ["blockTextHash"];
837
- readonly additionalProperties: false;
838
- };
839
- };
840
- readonly required: readonly ["id", "type", "blockId"];
841
- readonly additionalProperties: false;
842
- }, {
843
- readonly type: "object";
844
- readonly description: "Delete the row containing the anchor block.";
845
- readonly properties: {
846
- readonly type: {
847
- readonly type: "string";
848
- readonly enum: readonly ["deleteTableRow"];
849
- };
850
- readonly blockId: {
851
- readonly type: "string";
852
- readonly description: "Id of the target block, from a prior document read.";
853
- };
854
- readonly id: {
855
- readonly type: "string";
856
- readonly description: string;
857
- };
858
- readonly severity: {
859
- readonly type: "string";
860
- readonly enum: readonly ["low", "medium", "high"];
861
- readonly description: "Optional review severity for structured-review workflows.";
862
- };
863
- readonly area: {
864
- readonly type: "string";
865
- readonly description: "Optional review area label (e.g. \"Penalty\") for structured-review workflows.";
866
- };
867
- readonly precondition: {
868
- readonly type: "object";
869
- readonly description: string;
870
- readonly properties: {
871
- readonly blockTextHash: {
872
- readonly type: "string";
873
- readonly pattern: "^h[0-9a-z]+$";
874
- readonly description: "Normalized hash of the target block's text, from a prior document read.";
875
- };
876
- };
877
- readonly required: readonly ["blockTextHash"];
878
- readonly additionalProperties: false;
879
- };
880
- };
881
- readonly required: readonly ["id", "type", "blockId"];
882
- readonly additionalProperties: false;
883
- }, {
884
- readonly type: "object";
885
- readonly description: "Insert a column next to the column containing the anchor block.";
886
- readonly properties: {
887
- readonly type: {
888
- readonly type: "string";
889
- readonly enum: readonly ["insertTableColumn"];
890
- };
891
- readonly blockId: {
892
- readonly type: "string";
893
- readonly description: "Id of the target block, from a prior document read.";
894
- };
895
- readonly position: {
896
- readonly type: "string";
897
- readonly enum: readonly ["after", "before"];
898
- readonly description: "Insert after the anchor column (default) or before it. Defaults to \"after\".";
899
- };
900
- readonly cellTexts: {
901
- readonly type: "array";
902
- readonly description: "Initial text for newly created physical cells in row order.";
903
- readonly items: {
904
- readonly type: "string";
905
- };
906
- };
907
- readonly id: {
908
- readonly type: "string";
909
- readonly description: string;
910
- };
911
- readonly severity: {
912
- readonly type: "string";
913
- readonly enum: readonly ["low", "medium", "high"];
914
- readonly description: "Optional review severity for structured-review workflows.";
915
- };
916
- readonly area: {
917
- readonly type: "string";
918
- readonly description: "Optional review area label (e.g. \"Penalty\") for structured-review workflows.";
919
- };
920
- readonly precondition: {
921
- readonly type: "object";
922
- readonly description: string;
923
- readonly properties: {
924
- readonly blockTextHash: {
925
- readonly type: "string";
926
- readonly pattern: "^h[0-9a-z]+$";
927
- readonly description: "Normalized hash of the target block's text, from a prior document read.";
928
- };
929
- };
930
- readonly required: readonly ["blockTextHash"];
931
- readonly additionalProperties: false;
932
- };
933
- };
934
- readonly required: readonly ["id", "type", "blockId"];
935
- readonly additionalProperties: false;
936
- }, {
937
- readonly type: "object";
938
- readonly description: "Delete the column containing the anchor block.";
939
- readonly properties: {
940
- readonly type: {
941
- readonly type: "string";
942
- readonly enum: readonly ["deleteTableColumn"];
943
- };
944
- readonly blockId: {
945
- readonly type: "string";
946
- readonly description: "Id of the target block, from a prior document read.";
947
- };
948
- readonly id: {
949
- readonly type: "string";
950
- readonly description: string;
951
- };
952
- readonly severity: {
953
- readonly type: "string";
954
- readonly enum: readonly ["low", "medium", "high"];
955
- readonly description: "Optional review severity for structured-review workflows.";
956
- };
957
- readonly area: {
958
- readonly type: "string";
959
- readonly description: "Optional review area label (e.g. \"Penalty\") for structured-review workflows.";
960
- };
961
- readonly precondition: {
962
- readonly type: "object";
963
- readonly description: string;
964
- readonly properties: {
965
- readonly blockTextHash: {
966
- readonly type: "string";
967
- readonly pattern: "^h[0-9a-z]+$";
968
- readonly description: "Normalized hash of the target block's text, from a prior document read.";
969
- };
970
- };
971
- readonly required: readonly ["blockTextHash"];
972
- readonly additionalProperties: false;
973
- };
974
- };
975
- readonly required: readonly ["id", "type", "blockId"];
976
- readonly additionalProperties: false;
977
- }, {
978
- readonly type: "object";
979
- readonly description: "Merge a region targeted by an opposite-cell anchor or a downward row count. Tracked mode supports vertical-only regions with empty continuation cells.";
980
- readonly properties: {
981
- readonly type: {
982
- readonly type: "string";
983
- readonly enum: readonly ["mergeTableCells"];
984
- };
985
- readonly blockId: {
986
- readonly type: "string";
987
- readonly description: "Id of the target block, from a prior document read.";
988
- };
989
- readonly endBlockId: {
990
- readonly type: "string";
991
- readonly minLength: 1;
992
- readonly description: "Stable paragraph anchor inside the opposite corner cell.";
993
- };
994
- readonly rowCount: {
995
- readonly type: "integer";
996
- readonly minimum: 2;
997
- readonly description: "Number of grid rows to merge downward from the anchored cell.";
998
- };
999
- readonly id: {
1000
- readonly type: "string";
1001
- readonly description: string;
1002
- };
1003
- readonly severity: {
1004
- readonly type: "string";
1005
- readonly enum: readonly ["low", "medium", "high"];
1006
- readonly description: "Optional review severity for structured-review workflows.";
1007
- };
1008
- readonly area: {
1009
- readonly type: "string";
1010
- readonly description: "Optional review area label (e.g. \"Penalty\") for structured-review workflows.";
1011
- };
1012
- readonly precondition: {
1013
- readonly type: "object";
1014
- readonly description: string;
1015
- readonly properties: {
1016
- readonly blockTextHash: {
1017
- readonly type: "string";
1018
- readonly pattern: "^h[0-9a-z]+$";
1019
- readonly description: "Normalized hash of the target block's text, from a prior document read.";
1020
- };
1021
- };
1022
- readonly required: readonly ["blockTextHash"];
1023
- readonly additionalProperties: false;
1024
- };
1025
- };
1026
- readonly required: readonly ["id", "type", "blockId"];
1027
- readonly oneOf: readonly [{
1028
- readonly required: readonly ["endBlockId"];
1029
- }, {
1030
- readonly required: readonly ["rowCount"];
1031
- }];
1032
- readonly additionalProperties: false;
1033
- }, {
1034
- readonly type: "object";
1035
- readonly description: "Split one spanned table cell into individual cells. Tracked mode supports vertical-only spans.";
1036
- readonly properties: {
1037
- readonly type: {
1038
- readonly type: "string";
1039
- readonly enum: readonly ["splitTableCell"];
1040
- };
1041
- readonly blockId: {
1042
- readonly type: "string";
1043
- readonly description: "Id of the target block, from a prior document read.";
1044
- };
1045
- readonly id: {
1046
- readonly type: "string";
1047
- readonly description: string;
1048
- };
1049
- readonly severity: {
1050
- readonly type: "string";
1051
- readonly enum: readonly ["low", "medium", "high"];
1052
- readonly description: "Optional review severity for structured-review workflows.";
1053
- };
1054
- readonly area: {
1055
- readonly type: "string";
1056
- readonly description: "Optional review area label (e.g. \"Penalty\") for structured-review workflows.";
1057
- };
1058
- readonly precondition: {
1059
- readonly type: "object";
1060
- readonly description: string;
1061
- readonly properties: {
1062
- readonly blockTextHash: {
1063
- readonly type: "string";
1064
- readonly pattern: "^h[0-9a-z]+$";
1065
- readonly description: "Normalized hash of the target block's text, from a prior document read.";
1066
- };
1067
- };
1068
- readonly required: readonly ["blockTextHash"];
1069
- readonly additionalProperties: false;
1070
- };
1071
- };
1072
- readonly required: readonly ["id", "type", "blockId"];
1073
- readonly additionalProperties: false;
1074
- }];
1075
- };
44
+ declare const FOLIO_DOCUMENT_OPERATION_JSON_SCHEMA: FolioJsonSchema;
1076
45
  /**
1077
46
  * JSON Schema (draft-07 compatible) for the versioned batch envelope accepted
1078
47
  * by `parseFolioDocumentOperationBatch`: `version` (always
@@ -1081,1038 +50,7 @@ declare const FOLIO_DOCUMENT_OPERATION_JSON_SCHEMA: {
1081
50
  * `FolioDocumentOperationBatch`. Hand this to an LLM tool definition (or any
1082
51
  * JSON Schema consumer) instead of re-declaring the contract.
1083
52
  */
1084
- declare const FOLIO_DOCUMENT_OPERATION_BATCH_JSON_SCHEMA: {
1085
- readonly type: "object";
1086
- readonly description: string;
1087
- readonly properties: {
1088
- readonly version: {
1089
- readonly type: "integer";
1090
- readonly enum: readonly [1];
1091
- readonly description: "Document-operation contract version.";
1092
- };
1093
- readonly operations: {
1094
- readonly type: "array";
1095
- readonly description: "The operations to apply, in order.";
1096
- readonly items: {
1097
- readonly description: string;
1098
- readonly oneOf: readonly [{
1099
- readonly type: "object";
1100
- readonly description: "Replace an exact text match inside one block.";
1101
- readonly properties: {
1102
- readonly type: {
1103
- readonly type: "string";
1104
- readonly enum: readonly ["replaceInBlock"];
1105
- };
1106
- readonly blockId: {
1107
- readonly type: "string";
1108
- readonly description: "Id of the target block, from a prior document read.";
1109
- };
1110
- readonly find: {
1111
- readonly type: "string";
1112
- readonly description: "The exact text to find within the block.";
1113
- };
1114
- readonly replace: {
1115
- readonly type: "string";
1116
- readonly description: "The replacement text.";
1117
- };
1118
- readonly comment: {
1119
- readonly type: "object";
1120
- readonly description: "A comment attached to the text affected by this operation.";
1121
- readonly properties: {
1122
- readonly text: {
1123
- readonly type: "string";
1124
- readonly description: "The comment body.";
1125
- };
1126
- };
1127
- readonly required: readonly ["text"];
1128
- readonly additionalProperties: false;
1129
- };
1130
- readonly id: {
1131
- readonly type: "string";
1132
- readonly description: string;
1133
- };
1134
- readonly severity: {
1135
- readonly type: "string";
1136
- readonly enum: readonly ["low", "medium", "high"];
1137
- readonly description: "Optional review severity for structured-review workflows.";
1138
- };
1139
- readonly area: {
1140
- readonly type: "string";
1141
- readonly description: "Optional review area label (e.g. \"Penalty\") for structured-review workflows.";
1142
- };
1143
- readonly precondition: {
1144
- readonly type: "object";
1145
- readonly description: string;
1146
- readonly properties: {
1147
- readonly blockTextHash: {
1148
- readonly type: "string";
1149
- readonly pattern: "^h[0-9a-z]+$";
1150
- readonly description: "Normalized hash of the target block's text, from a prior document read.";
1151
- };
1152
- };
1153
- readonly required: readonly ["blockTextHash"];
1154
- readonly additionalProperties: false;
1155
- };
1156
- };
1157
- readonly required: readonly ["id", "type", "blockId", "find", "replace"];
1158
- readonly additionalProperties: false;
1159
- }, {
1160
- readonly type: "object";
1161
- readonly description: "Replace the text covered by a range handle.";
1162
- readonly properties: {
1163
- readonly type: {
1164
- readonly type: "string";
1165
- readonly enum: readonly ["replaceRange"];
1166
- };
1167
- readonly range: {
1168
- readonly type: "object";
1169
- readonly description: string;
1170
- readonly properties: {
1171
- readonly type: {
1172
- readonly type: "string";
1173
- readonly enum: readonly ["textRange"];
1174
- };
1175
- readonly story: {
1176
- readonly type: "string";
1177
- readonly enum: readonly ["main"];
1178
- };
1179
- readonly blockId: {
1180
- readonly type: "string";
1181
- readonly minLength: 1;
1182
- };
1183
- readonly startOffset: {
1184
- readonly type: "integer";
1185
- readonly minimum: 0;
1186
- };
1187
- readonly endOffset: {
1188
- readonly type: "integer";
1189
- readonly minimum: 1;
1190
- readonly description: "Exclusive end offset; must be greater than `startOffset`.";
1191
- };
1192
- readonly selectedTextHash: {
1193
- readonly type: "string";
1194
- readonly pattern: "^h[0-9a-z]+$";
1195
- readonly description: "Normalized hash of the selected text, used to detect stale ranges.";
1196
- };
1197
- };
1198
- readonly required: readonly ["type", "story", "blockId", "startOffset", "endOffset", "selectedTextHash"];
1199
- readonly additionalProperties: false;
1200
- };
1201
- readonly replace: {
1202
- readonly type: "string";
1203
- readonly description: "The replacement text.";
1204
- };
1205
- readonly comment: {
1206
- readonly type: "object";
1207
- readonly description: "A comment attached to the text affected by this operation.";
1208
- readonly properties: {
1209
- readonly text: {
1210
- readonly type: "string";
1211
- readonly description: "The comment body.";
1212
- };
1213
- };
1214
- readonly required: readonly ["text"];
1215
- readonly additionalProperties: false;
1216
- };
1217
- readonly id: {
1218
- readonly type: "string";
1219
- readonly description: string;
1220
- };
1221
- readonly severity: {
1222
- readonly type: "string";
1223
- readonly enum: readonly ["low", "medium", "high"];
1224
- readonly description: "Optional review severity for structured-review workflows.";
1225
- };
1226
- readonly area: {
1227
- readonly type: "string";
1228
- readonly description: "Optional review area label (e.g. \"Penalty\") for structured-review workflows.";
1229
- };
1230
- readonly precondition: {
1231
- readonly type: "object";
1232
- readonly description: string;
1233
- readonly properties: {
1234
- readonly blockTextHash: {
1235
- readonly type: "string";
1236
- readonly pattern: "^h[0-9a-z]+$";
1237
- readonly description: "Normalized hash of the target block's text, from a prior document read.";
1238
- };
1239
- };
1240
- readonly required: readonly ["blockTextHash"];
1241
- readonly additionalProperties: false;
1242
- };
1243
- };
1244
- readonly required: readonly ["id", "type", "range", "replace"];
1245
- readonly additionalProperties: false;
1246
- }, {
1247
- readonly type: "object";
1248
- readonly description: "Attach a comment to the text covered by a range handle.";
1249
- readonly properties: {
1250
- readonly type: {
1251
- readonly type: "string";
1252
- readonly enum: readonly ["commentOnRange"];
1253
- };
1254
- readonly range: {
1255
- readonly type: "object";
1256
- readonly description: string;
1257
- readonly properties: {
1258
- readonly type: {
1259
- readonly type: "string";
1260
- readonly enum: readonly ["textRange"];
1261
- };
1262
- readonly story: {
1263
- readonly type: "string";
1264
- readonly enum: readonly ["main"];
1265
- };
1266
- readonly blockId: {
1267
- readonly type: "string";
1268
- readonly minLength: 1;
1269
- };
1270
- readonly startOffset: {
1271
- readonly type: "integer";
1272
- readonly minimum: 0;
1273
- };
1274
- readonly endOffset: {
1275
- readonly type: "integer";
1276
- readonly minimum: 1;
1277
- readonly description: "Exclusive end offset; must be greater than `startOffset`.";
1278
- };
1279
- readonly selectedTextHash: {
1280
- readonly type: "string";
1281
- readonly pattern: "^h[0-9a-z]+$";
1282
- readonly description: "Normalized hash of the selected text, used to detect stale ranges.";
1283
- };
1284
- };
1285
- readonly required: readonly ["type", "story", "blockId", "startOffset", "endOffset", "selectedTextHash"];
1286
- readonly additionalProperties: false;
1287
- };
1288
- readonly comment: {
1289
- readonly type: "object";
1290
- readonly description: "A comment attached to the text affected by this operation.";
1291
- readonly properties: {
1292
- readonly text: {
1293
- readonly type: "string";
1294
- readonly description: "The comment body.";
1295
- };
1296
- };
1297
- readonly required: readonly ["text"];
1298
- readonly additionalProperties: false;
1299
- };
1300
- readonly id: {
1301
- readonly type: "string";
1302
- readonly description: string;
1303
- };
1304
- readonly severity: {
1305
- readonly type: "string";
1306
- readonly enum: readonly ["low", "medium", "high"];
1307
- readonly description: "Optional review severity for structured-review workflows.";
1308
- };
1309
- readonly area: {
1310
- readonly type: "string";
1311
- readonly description: "Optional review area label (e.g. \"Penalty\") for structured-review workflows.";
1312
- };
1313
- readonly precondition: {
1314
- readonly type: "object";
1315
- readonly description: string;
1316
- readonly properties: {
1317
- readonly blockTextHash: {
1318
- readonly type: "string";
1319
- readonly pattern: "^h[0-9a-z]+$";
1320
- readonly description: "Normalized hash of the target block's text, from a prior document read.";
1321
- };
1322
- };
1323
- readonly required: readonly ["blockTextHash"];
1324
- readonly additionalProperties: false;
1325
- };
1326
- };
1327
- readonly required: readonly ["id", "type", "range", "comment"];
1328
- readonly additionalProperties: false;
1329
- }, {
1330
- readonly type: "object";
1331
- readonly description: "Apply inline formatting to the text covered by a range handle in direct or tracked mode.";
1332
- readonly properties: {
1333
- readonly type: {
1334
- readonly type: "string";
1335
- readonly enum: readonly ["formatRange"];
1336
- };
1337
- readonly range: {
1338
- readonly type: "object";
1339
- readonly description: string;
1340
- readonly properties: {
1341
- readonly type: {
1342
- readonly type: "string";
1343
- readonly enum: readonly ["textRange"];
1344
- };
1345
- readonly story: {
1346
- readonly type: "string";
1347
- readonly enum: readonly ["main"];
1348
- };
1349
- readonly blockId: {
1350
- readonly type: "string";
1351
- readonly minLength: 1;
1352
- };
1353
- readonly startOffset: {
1354
- readonly type: "integer";
1355
- readonly minimum: 0;
1356
- };
1357
- readonly endOffset: {
1358
- readonly type: "integer";
1359
- readonly minimum: 1;
1360
- readonly description: "Exclusive end offset; must be greater than `startOffset`.";
1361
- };
1362
- readonly selectedTextHash: {
1363
- readonly type: "string";
1364
- readonly pattern: "^h[0-9a-z]+$";
1365
- readonly description: "Normalized hash of the selected text, used to detect stale ranges.";
1366
- };
1367
- };
1368
- readonly required: readonly ["type", "story", "blockId", "startOffset", "endOffset", "selectedTextHash"];
1369
- readonly additionalProperties: false;
1370
- };
1371
- readonly formatting: {
1372
- readonly type: "object";
1373
- readonly description: "Inline formatting to apply; at least one property is required.";
1374
- readonly properties: {
1375
- readonly bold: {
1376
- readonly type: "boolean";
1377
- };
1378
- readonly italic: {
1379
- readonly type: "boolean";
1380
- };
1381
- readonly underline: {
1382
- readonly type: "boolean";
1383
- };
1384
- };
1385
- readonly minProperties: 1;
1386
- readonly additionalProperties: false;
1387
- };
1388
- readonly id: {
1389
- readonly type: "string";
1390
- readonly description: string;
1391
- };
1392
- readonly severity: {
1393
- readonly type: "string";
1394
- readonly enum: readonly ["low", "medium", "high"];
1395
- readonly description: "Optional review severity for structured-review workflows.";
1396
- };
1397
- readonly area: {
1398
- readonly type: "string";
1399
- readonly description: "Optional review area label (e.g. \"Penalty\") for structured-review workflows.";
1400
- };
1401
- readonly precondition: {
1402
- readonly type: "object";
1403
- readonly description: string;
1404
- readonly properties: {
1405
- readonly blockTextHash: {
1406
- readonly type: "string";
1407
- readonly pattern: "^h[0-9a-z]+$";
1408
- readonly description: "Normalized hash of the target block's text, from a prior document read.";
1409
- };
1410
- };
1411
- readonly required: readonly ["blockTextHash"];
1412
- readonly additionalProperties: false;
1413
- };
1414
- };
1415
- readonly required: readonly ["id", "type", "range", "formatting"];
1416
- readonly additionalProperties: false;
1417
- }, {
1418
- readonly type: "object";
1419
- readonly description: "Insert a new paragraph after the anchor block.";
1420
- readonly properties: {
1421
- readonly type: {
1422
- readonly type: "string";
1423
- readonly enum: readonly ["insertAfterBlock"];
1424
- };
1425
- readonly blockId: {
1426
- readonly type: "string";
1427
- readonly description: "Id of the target block, from a prior document read.";
1428
- };
1429
- readonly text: {
1430
- readonly type: "string";
1431
- readonly description: "The paragraph text to insert.";
1432
- };
1433
- readonly inheritFormatting: {
1434
- readonly type: "boolean";
1435
- readonly description: "Inherit the anchor block's formatting for the inserted paragraph.";
1436
- };
1437
- readonly pageBreakBefore: {
1438
- readonly type: "boolean";
1439
- readonly description: "Start the inserted paragraph on a new page (`pageBreakBefore`).";
1440
- };
1441
- readonly styleId: {
1442
- readonly type: "string";
1443
- readonly description: "Paragraph style id for the inserted block (e.g. \"ClauseHeading1\").";
1444
- };
1445
- readonly comment: {
1446
- readonly type: "object";
1447
- readonly description: "A comment attached to the text affected by this operation.";
1448
- readonly properties: {
1449
- readonly text: {
1450
- readonly type: "string";
1451
- readonly description: "The comment body.";
1452
- };
1453
- };
1454
- readonly required: readonly ["text"];
1455
- readonly additionalProperties: false;
1456
- };
1457
- readonly id: {
1458
- readonly type: "string";
1459
- readonly description: string;
1460
- };
1461
- readonly severity: {
1462
- readonly type: "string";
1463
- readonly enum: readonly ["low", "medium", "high"];
1464
- readonly description: "Optional review severity for structured-review workflows.";
1465
- };
1466
- readonly area: {
1467
- readonly type: "string";
1468
- readonly description: "Optional review area label (e.g. \"Penalty\") for structured-review workflows.";
1469
- };
1470
- readonly precondition: {
1471
- readonly type: "object";
1472
- readonly description: string;
1473
- readonly properties: {
1474
- readonly blockTextHash: {
1475
- readonly type: "string";
1476
- readonly pattern: "^h[0-9a-z]+$";
1477
- readonly description: "Normalized hash of the target block's text, from a prior document read.";
1478
- };
1479
- };
1480
- readonly required: readonly ["blockTextHash"];
1481
- readonly additionalProperties: false;
1482
- };
1483
- };
1484
- readonly required: readonly ["id", "type", "blockId", "text"];
1485
- readonly additionalProperties: false;
1486
- }, {
1487
- readonly type: "object";
1488
- readonly description: "Insert a new paragraph before the anchor block.";
1489
- readonly properties: {
1490
- readonly type: {
1491
- readonly type: "string";
1492
- readonly enum: readonly ["insertBeforeBlock"];
1493
- };
1494
- readonly blockId: {
1495
- readonly type: "string";
1496
- readonly description: "Id of the target block, from a prior document read.";
1497
- };
1498
- readonly text: {
1499
- readonly type: "string";
1500
- readonly description: "The paragraph text to insert.";
1501
- };
1502
- readonly inheritFormatting: {
1503
- readonly type: "boolean";
1504
- readonly description: "Inherit the anchor block's formatting for the inserted paragraph.";
1505
- };
1506
- readonly pageBreakBefore: {
1507
- readonly type: "boolean";
1508
- readonly description: "Start the inserted paragraph on a new page (`pageBreakBefore`).";
1509
- };
1510
- readonly styleId: {
1511
- readonly type: "string";
1512
- readonly description: "Paragraph style id for the inserted block (e.g. \"ClauseHeading1\").";
1513
- };
1514
- readonly comment: {
1515
- readonly type: "object";
1516
- readonly description: "A comment attached to the text affected by this operation.";
1517
- readonly properties: {
1518
- readonly text: {
1519
- readonly type: "string";
1520
- readonly description: "The comment body.";
1521
- };
1522
- };
1523
- readonly required: readonly ["text"];
1524
- readonly additionalProperties: false;
1525
- };
1526
- readonly id: {
1527
- readonly type: "string";
1528
- readonly description: string;
1529
- };
1530
- readonly severity: {
1531
- readonly type: "string";
1532
- readonly enum: readonly ["low", "medium", "high"];
1533
- readonly description: "Optional review severity for structured-review workflows.";
1534
- };
1535
- readonly area: {
1536
- readonly type: "string";
1537
- readonly description: "Optional review area label (e.g. \"Penalty\") for structured-review workflows.";
1538
- };
1539
- readonly precondition: {
1540
- readonly type: "object";
1541
- readonly description: string;
1542
- readonly properties: {
1543
- readonly blockTextHash: {
1544
- readonly type: "string";
1545
- readonly pattern: "^h[0-9a-z]+$";
1546
- readonly description: "Normalized hash of the target block's text, from a prior document read.";
1547
- };
1548
- };
1549
- readonly required: readonly ["blockTextHash"];
1550
- readonly additionalProperties: false;
1551
- };
1552
- };
1553
- readonly required: readonly ["id", "type", "blockId", "text"];
1554
- readonly additionalProperties: false;
1555
- }, {
1556
- readonly type: "object";
1557
- readonly description: "Replace one block's entire text.";
1558
- readonly properties: {
1559
- readonly type: {
1560
- readonly type: "string";
1561
- readonly enum: readonly ["replaceBlock"];
1562
- };
1563
- readonly blockId: {
1564
- readonly type: "string";
1565
- readonly description: "Id of the target block, from a prior document read.";
1566
- };
1567
- readonly text: {
1568
- readonly type: "string";
1569
- readonly description: "The new block text.";
1570
- };
1571
- readonly preserveFormatting: {
1572
- readonly type: "boolean";
1573
- readonly description: "Keep the block's existing formatting for the replacement text.";
1574
- };
1575
- readonly styleId: {
1576
- readonly type: "string";
1577
- readonly description: "Paragraph style id to set on the replaced block.";
1578
- };
1579
- readonly comment: {
1580
- readonly type: "object";
1581
- readonly description: "A comment attached to the text affected by this operation.";
1582
- readonly properties: {
1583
- readonly text: {
1584
- readonly type: "string";
1585
- readonly description: "The comment body.";
1586
- };
1587
- };
1588
- readonly required: readonly ["text"];
1589
- readonly additionalProperties: false;
1590
- };
1591
- readonly id: {
1592
- readonly type: "string";
1593
- readonly description: string;
1594
- };
1595
- readonly severity: {
1596
- readonly type: "string";
1597
- readonly enum: readonly ["low", "medium", "high"];
1598
- readonly description: "Optional review severity for structured-review workflows.";
1599
- };
1600
- readonly area: {
1601
- readonly type: "string";
1602
- readonly description: "Optional review area label (e.g. \"Penalty\") for structured-review workflows.";
1603
- };
1604
- readonly precondition: {
1605
- readonly type: "object";
1606
- readonly description: string;
1607
- readonly properties: {
1608
- readonly blockTextHash: {
1609
- readonly type: "string";
1610
- readonly pattern: "^h[0-9a-z]+$";
1611
- readonly description: "Normalized hash of the target block's text, from a prior document read.";
1612
- };
1613
- };
1614
- readonly required: readonly ["blockTextHash"];
1615
- readonly additionalProperties: false;
1616
- };
1617
- };
1618
- readonly required: readonly ["id", "type", "blockId", "text"];
1619
- readonly additionalProperties: false;
1620
- }, {
1621
- readonly type: "object";
1622
- readonly description: "Delete one block.";
1623
- readonly properties: {
1624
- readonly type: {
1625
- readonly type: "string";
1626
- readonly enum: readonly ["deleteBlock"];
1627
- };
1628
- readonly blockId: {
1629
- readonly type: "string";
1630
- readonly description: "Id of the target block, from a prior document read.";
1631
- };
1632
- readonly comment: {
1633
- readonly type: "object";
1634
- readonly description: "A comment attached to the text affected by this operation.";
1635
- readonly properties: {
1636
- readonly text: {
1637
- readonly type: "string";
1638
- readonly description: "The comment body.";
1639
- };
1640
- };
1641
- readonly required: readonly ["text"];
1642
- readonly additionalProperties: false;
1643
- };
1644
- readonly id: {
1645
- readonly type: "string";
1646
- readonly description: string;
1647
- };
1648
- readonly severity: {
1649
- readonly type: "string";
1650
- readonly enum: readonly ["low", "medium", "high"];
1651
- readonly description: "Optional review severity for structured-review workflows.";
1652
- };
1653
- readonly area: {
1654
- readonly type: "string";
1655
- readonly description: "Optional review area label (e.g. \"Penalty\") for structured-review workflows.";
1656
- };
1657
- readonly precondition: {
1658
- readonly type: "object";
1659
- readonly description: string;
1660
- readonly properties: {
1661
- readonly blockTextHash: {
1662
- readonly type: "string";
1663
- readonly pattern: "^h[0-9a-z]+$";
1664
- readonly description: "Normalized hash of the target block's text, from a prior document read.";
1665
- };
1666
- };
1667
- readonly required: readonly ["blockTextHash"];
1668
- readonly additionalProperties: false;
1669
- };
1670
- };
1671
- readonly required: readonly ["id", "type", "blockId"];
1672
- readonly additionalProperties: false;
1673
- }, {
1674
- readonly type: "object";
1675
- readonly description: "Attach a comment to one block, optionally quoting text within it.";
1676
- readonly properties: {
1677
- readonly type: {
1678
- readonly type: "string";
1679
- readonly enum: readonly ["commentOnBlock"];
1680
- };
1681
- readonly blockId: {
1682
- readonly type: "string";
1683
- readonly description: "Id of the target block, from a prior document read.";
1684
- };
1685
- readonly quote: {
1686
- readonly type: "string";
1687
- readonly description: "Exact text within the block the comment is about.";
1688
- };
1689
- readonly comment: {
1690
- readonly type: "object";
1691
- readonly description: "A comment attached to the text affected by this operation.";
1692
- readonly properties: {
1693
- readonly text: {
1694
- readonly type: "string";
1695
- readonly description: "The comment body.";
1696
- };
1697
- };
1698
- readonly required: readonly ["text"];
1699
- readonly additionalProperties: false;
1700
- };
1701
- readonly id: {
1702
- readonly type: "string";
1703
- readonly description: string;
1704
- };
1705
- readonly severity: {
1706
- readonly type: "string";
1707
- readonly enum: readonly ["low", "medium", "high"];
1708
- readonly description: "Optional review severity for structured-review workflows.";
1709
- };
1710
- readonly area: {
1711
- readonly type: "string";
1712
- readonly description: "Optional review area label (e.g. \"Penalty\") for structured-review workflows.";
1713
- };
1714
- readonly precondition: {
1715
- readonly type: "object";
1716
- readonly description: string;
1717
- readonly properties: {
1718
- readonly blockTextHash: {
1719
- readonly type: "string";
1720
- readonly pattern: "^h[0-9a-z]+$";
1721
- readonly description: "Normalized hash of the target block's text, from a prior document read.";
1722
- };
1723
- };
1724
- readonly required: readonly ["blockTextHash"];
1725
- readonly additionalProperties: false;
1726
- };
1727
- };
1728
- readonly required: readonly ["id", "type", "blockId", "comment"];
1729
- readonly additionalProperties: false;
1730
- }, {
1731
- readonly type: "object";
1732
- readonly description: string;
1733
- readonly properties: {
1734
- readonly type: {
1735
- readonly type: "string";
1736
- readonly enum: readonly ["insertSignatureTable"];
1737
- };
1738
- readonly blockId: {
1739
- readonly type: "string";
1740
- readonly description: "Id of the target block, from a prior document read.";
1741
- };
1742
- readonly position: {
1743
- readonly type: "string";
1744
- readonly enum: readonly ["after", "before"];
1745
- readonly description: "Insert after the anchor block (default) or before it. Defaults to \"after\".";
1746
- };
1747
- readonly parties: {
1748
- readonly type: "array";
1749
- readonly description: "The signing parties, one table cell per party.";
1750
- readonly items: {
1751
- readonly type: "object";
1752
- readonly properties: {
1753
- readonly name: {
1754
- readonly type: "string";
1755
- readonly description: "Party name (rendered bold).";
1756
- };
1757
- readonly signatory: {
1758
- readonly type: "string";
1759
- readonly description: "Name of the person signing.";
1760
- };
1761
- readonly title: {
1762
- readonly type: "string";
1763
- readonly description: "Signatory title (rendered in italics).";
1764
- };
1765
- };
1766
- readonly required: readonly ["name"];
1767
- readonly additionalProperties: false;
1768
- };
1769
- };
1770
- readonly comment: {
1771
- readonly type: "object";
1772
- readonly description: "A comment attached to the text affected by this operation.";
1773
- readonly properties: {
1774
- readonly text: {
1775
- readonly type: "string";
1776
- readonly description: "The comment body.";
1777
- };
1778
- };
1779
- readonly required: readonly ["text"];
1780
- readonly additionalProperties: false;
1781
- };
1782
- readonly id: {
1783
- readonly type: "string";
1784
- readonly description: string;
1785
- };
1786
- readonly severity: {
1787
- readonly type: "string";
1788
- readonly enum: readonly ["low", "medium", "high"];
1789
- readonly description: "Optional review severity for structured-review workflows.";
1790
- };
1791
- readonly area: {
1792
- readonly type: "string";
1793
- readonly description: "Optional review area label (e.g. \"Penalty\") for structured-review workflows.";
1794
- };
1795
- readonly precondition: {
1796
- readonly type: "object";
1797
- readonly description: string;
1798
- readonly properties: {
1799
- readonly blockTextHash: {
1800
- readonly type: "string";
1801
- readonly pattern: "^h[0-9a-z]+$";
1802
- readonly description: "Normalized hash of the target block's text, from a prior document read.";
1803
- };
1804
- };
1805
- readonly required: readonly ["blockTextHash"];
1806
- readonly additionalProperties: false;
1807
- };
1808
- };
1809
- readonly required: readonly ["id", "type", "blockId", "parties"];
1810
- readonly additionalProperties: false;
1811
- }, {
1812
- readonly type: "object";
1813
- readonly description: "Insert a row next to the row containing the anchor block.";
1814
- readonly properties: {
1815
- readonly type: {
1816
- readonly type: "string";
1817
- readonly enum: readonly ["insertTableRow"];
1818
- };
1819
- readonly blockId: {
1820
- readonly type: "string";
1821
- readonly description: "Id of the target block, from a prior document read.";
1822
- };
1823
- readonly position: {
1824
- readonly type: "string";
1825
- readonly enum: readonly ["after", "before"];
1826
- readonly description: "Insert after the anchor row (default) or before it. Defaults to \"after\".";
1827
- };
1828
- readonly cellTexts: {
1829
- readonly type: "array";
1830
- readonly description: "Initial text for physical cells in source order; omitted cells stay empty.";
1831
- readonly items: {
1832
- readonly type: "string";
1833
- };
1834
- };
1835
- readonly id: {
1836
- readonly type: "string";
1837
- readonly description: string;
1838
- };
1839
- readonly severity: {
1840
- readonly type: "string";
1841
- readonly enum: readonly ["low", "medium", "high"];
1842
- readonly description: "Optional review severity for structured-review workflows.";
1843
- };
1844
- readonly area: {
1845
- readonly type: "string";
1846
- readonly description: "Optional review area label (e.g. \"Penalty\") for structured-review workflows.";
1847
- };
1848
- readonly precondition: {
1849
- readonly type: "object";
1850
- readonly description: string;
1851
- readonly properties: {
1852
- readonly blockTextHash: {
1853
- readonly type: "string";
1854
- readonly pattern: "^h[0-9a-z]+$";
1855
- readonly description: "Normalized hash of the target block's text, from a prior document read.";
1856
- };
1857
- };
1858
- readonly required: readonly ["blockTextHash"];
1859
- readonly additionalProperties: false;
1860
- };
1861
- };
1862
- readonly required: readonly ["id", "type", "blockId"];
1863
- readonly additionalProperties: false;
1864
- }, {
1865
- readonly type: "object";
1866
- readonly description: "Delete the row containing the anchor block.";
1867
- readonly properties: {
1868
- readonly type: {
1869
- readonly type: "string";
1870
- readonly enum: readonly ["deleteTableRow"];
1871
- };
1872
- readonly blockId: {
1873
- readonly type: "string";
1874
- readonly description: "Id of the target block, from a prior document read.";
1875
- };
1876
- readonly id: {
1877
- readonly type: "string";
1878
- readonly description: string;
1879
- };
1880
- readonly severity: {
1881
- readonly type: "string";
1882
- readonly enum: readonly ["low", "medium", "high"];
1883
- readonly description: "Optional review severity for structured-review workflows.";
1884
- };
1885
- readonly area: {
1886
- readonly type: "string";
1887
- readonly description: "Optional review area label (e.g. \"Penalty\") for structured-review workflows.";
1888
- };
1889
- readonly precondition: {
1890
- readonly type: "object";
1891
- readonly description: string;
1892
- readonly properties: {
1893
- readonly blockTextHash: {
1894
- readonly type: "string";
1895
- readonly pattern: "^h[0-9a-z]+$";
1896
- readonly description: "Normalized hash of the target block's text, from a prior document read.";
1897
- };
1898
- };
1899
- readonly required: readonly ["blockTextHash"];
1900
- readonly additionalProperties: false;
1901
- };
1902
- };
1903
- readonly required: readonly ["id", "type", "blockId"];
1904
- readonly additionalProperties: false;
1905
- }, {
1906
- readonly type: "object";
1907
- readonly description: "Insert a column next to the column containing the anchor block.";
1908
- readonly properties: {
1909
- readonly type: {
1910
- readonly type: "string";
1911
- readonly enum: readonly ["insertTableColumn"];
1912
- };
1913
- readonly blockId: {
1914
- readonly type: "string";
1915
- readonly description: "Id of the target block, from a prior document read.";
1916
- };
1917
- readonly position: {
1918
- readonly type: "string";
1919
- readonly enum: readonly ["after", "before"];
1920
- readonly description: "Insert after the anchor column (default) or before it. Defaults to \"after\".";
1921
- };
1922
- readonly cellTexts: {
1923
- readonly type: "array";
1924
- readonly description: "Initial text for newly created physical cells in row order.";
1925
- readonly items: {
1926
- readonly type: "string";
1927
- };
1928
- };
1929
- readonly id: {
1930
- readonly type: "string";
1931
- readonly description: string;
1932
- };
1933
- readonly severity: {
1934
- readonly type: "string";
1935
- readonly enum: readonly ["low", "medium", "high"];
1936
- readonly description: "Optional review severity for structured-review workflows.";
1937
- };
1938
- readonly area: {
1939
- readonly type: "string";
1940
- readonly description: "Optional review area label (e.g. \"Penalty\") for structured-review workflows.";
1941
- };
1942
- readonly precondition: {
1943
- readonly type: "object";
1944
- readonly description: string;
1945
- readonly properties: {
1946
- readonly blockTextHash: {
1947
- readonly type: "string";
1948
- readonly pattern: "^h[0-9a-z]+$";
1949
- readonly description: "Normalized hash of the target block's text, from a prior document read.";
1950
- };
1951
- };
1952
- readonly required: readonly ["blockTextHash"];
1953
- readonly additionalProperties: false;
1954
- };
1955
- };
1956
- readonly required: readonly ["id", "type", "blockId"];
1957
- readonly additionalProperties: false;
1958
- }, {
1959
- readonly type: "object";
1960
- readonly description: "Delete the column containing the anchor block.";
1961
- readonly properties: {
1962
- readonly type: {
1963
- readonly type: "string";
1964
- readonly enum: readonly ["deleteTableColumn"];
1965
- };
1966
- readonly blockId: {
1967
- readonly type: "string";
1968
- readonly description: "Id of the target block, from a prior document read.";
1969
- };
1970
- readonly id: {
1971
- readonly type: "string";
1972
- readonly description: string;
1973
- };
1974
- readonly severity: {
1975
- readonly type: "string";
1976
- readonly enum: readonly ["low", "medium", "high"];
1977
- readonly description: "Optional review severity for structured-review workflows.";
1978
- };
1979
- readonly area: {
1980
- readonly type: "string";
1981
- readonly description: "Optional review area label (e.g. \"Penalty\") for structured-review workflows.";
1982
- };
1983
- readonly precondition: {
1984
- readonly type: "object";
1985
- readonly description: string;
1986
- readonly properties: {
1987
- readonly blockTextHash: {
1988
- readonly type: "string";
1989
- readonly pattern: "^h[0-9a-z]+$";
1990
- readonly description: "Normalized hash of the target block's text, from a prior document read.";
1991
- };
1992
- };
1993
- readonly required: readonly ["blockTextHash"];
1994
- readonly additionalProperties: false;
1995
- };
1996
- };
1997
- readonly required: readonly ["id", "type", "blockId"];
1998
- readonly additionalProperties: false;
1999
- }, {
2000
- readonly type: "object";
2001
- readonly description: "Merge a region targeted by an opposite-cell anchor or a downward row count. Tracked mode supports vertical-only regions with empty continuation cells.";
2002
- readonly properties: {
2003
- readonly type: {
2004
- readonly type: "string";
2005
- readonly enum: readonly ["mergeTableCells"];
2006
- };
2007
- readonly blockId: {
2008
- readonly type: "string";
2009
- readonly description: "Id of the target block, from a prior document read.";
2010
- };
2011
- readonly endBlockId: {
2012
- readonly type: "string";
2013
- readonly minLength: 1;
2014
- readonly description: "Stable paragraph anchor inside the opposite corner cell.";
2015
- };
2016
- readonly rowCount: {
2017
- readonly type: "integer";
2018
- readonly minimum: 2;
2019
- readonly description: "Number of grid rows to merge downward from the anchored cell.";
2020
- };
2021
- readonly id: {
2022
- readonly type: "string";
2023
- readonly description: string;
2024
- };
2025
- readonly severity: {
2026
- readonly type: "string";
2027
- readonly enum: readonly ["low", "medium", "high"];
2028
- readonly description: "Optional review severity for structured-review workflows.";
2029
- };
2030
- readonly area: {
2031
- readonly type: "string";
2032
- readonly description: "Optional review area label (e.g. \"Penalty\") for structured-review workflows.";
2033
- };
2034
- readonly precondition: {
2035
- readonly type: "object";
2036
- readonly description: string;
2037
- readonly properties: {
2038
- readonly blockTextHash: {
2039
- readonly type: "string";
2040
- readonly pattern: "^h[0-9a-z]+$";
2041
- readonly description: "Normalized hash of the target block's text, from a prior document read.";
2042
- };
2043
- };
2044
- readonly required: readonly ["blockTextHash"];
2045
- readonly additionalProperties: false;
2046
- };
2047
- };
2048
- readonly required: readonly ["id", "type", "blockId"];
2049
- readonly oneOf: readonly [{
2050
- readonly required: readonly ["endBlockId"];
2051
- }, {
2052
- readonly required: readonly ["rowCount"];
2053
- }];
2054
- readonly additionalProperties: false;
2055
- }, {
2056
- readonly type: "object";
2057
- readonly description: "Split one spanned table cell into individual cells. Tracked mode supports vertical-only spans.";
2058
- readonly properties: {
2059
- readonly type: {
2060
- readonly type: "string";
2061
- readonly enum: readonly ["splitTableCell"];
2062
- };
2063
- readonly blockId: {
2064
- readonly type: "string";
2065
- readonly description: "Id of the target block, from a prior document read.";
2066
- };
2067
- readonly id: {
2068
- readonly type: "string";
2069
- readonly description: string;
2070
- };
2071
- readonly severity: {
2072
- readonly type: "string";
2073
- readonly enum: readonly ["low", "medium", "high"];
2074
- readonly description: "Optional review severity for structured-review workflows.";
2075
- };
2076
- readonly area: {
2077
- readonly type: "string";
2078
- readonly description: "Optional review area label (e.g. \"Penalty\") for structured-review workflows.";
2079
- };
2080
- readonly precondition: {
2081
- readonly type: "object";
2082
- readonly description: string;
2083
- readonly properties: {
2084
- readonly blockTextHash: {
2085
- readonly type: "string";
2086
- readonly pattern: "^h[0-9a-z]+$";
2087
- readonly description: "Normalized hash of the target block's text, from a prior document read.";
2088
- };
2089
- };
2090
- readonly required: readonly ["blockTextHash"];
2091
- readonly additionalProperties: false;
2092
- };
2093
- };
2094
- readonly required: readonly ["id", "type", "blockId"];
2095
- readonly additionalProperties: false;
2096
- }];
2097
- };
2098
- };
2099
- readonly mode: {
2100
- readonly type: "string";
2101
- readonly enum: readonly ["direct", "tracked-changes", "suggested"];
2102
- readonly description: string;
2103
- };
2104
- readonly atomic: {
2105
- readonly type: "boolean";
2106
- readonly description: "Reject the whole batch when any operation would be skipped.";
2107
- };
2108
- readonly dryRun: {
2109
- readonly type: "boolean";
2110
- readonly description: "Preview the batch without mutating the document.";
2111
- };
2112
- };
2113
- readonly required: readonly ["version", "operations"];
2114
- readonly additionalProperties: false;
2115
- };
53
+ declare const FOLIO_DOCUMENT_OPERATION_BATCH_JSON_SCHEMA: FolioJsonSchema;
2116
54
  /**
2117
55
  * Minimal structural subset of the Standard Schema V1 interface
2118
56
  * (https://standardschema.dev). Declared locally instead of depending on
@@ -2148,7 +86,7 @@ type FolioDocumentOperationBatchSchema = StandardSchemaV1<unknown, FolioDocument
2148
86
  * builders get the runtime validator and the LLM-facing schema from one
2149
87
  * import.
2150
88
  */
2151
- readonly jsonSchema: typeof FOLIO_DOCUMENT_OPERATION_BATCH_JSON_SCHEMA;
89
+ readonly jsonSchema: FolioJsonSchema;
2152
90
  };
2153
91
  /**
2154
92
  * Standard Schema V1 (https://standardschema.dev) validator for a document
@@ -2162,4 +100,4 @@ type FolioDocumentOperationBatchSchema = StandardSchemaV1<unknown, FolioDocument
2162
100
  */
2163
101
  declare const folioDocumentOperationBatchSchema: FolioDocumentOperationBatchSchema;
2164
102
  //#endregion
2165
- export { FOLIO_DOCUMENT_OPERATION_BATCH_JSON_SCHEMA, FOLIO_DOCUMENT_OPERATION_JSON_SCHEMA, FOLIO_PRECONDITION_JSON_SCHEMA, FOLIO_TEXT_RANGE_JSON_SCHEMA, folioDocumentOperationBatchSchema };
103
+ export { FOLIO_DOCUMENT_OPERATION_BATCH_JSON_SCHEMA, FOLIO_DOCUMENT_OPERATION_JSON_SCHEMA, FOLIO_PRECONDITION_JSON_SCHEMA, FOLIO_TEXT_RANGE_JSON_SCHEMA, FolioJsonSchema, folioDocumentOperationBatchSchema };