revise 2.0.1 → 2.2.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.
Files changed (147) hide show
  1. package/CHANGELOG.md +195 -0
  2. package/README.md +4 -1
  3. package/assets/historyMaterializeWorker-B51R08XN.js +612 -0
  4. package/backend.d.ts +8 -2
  5. package/backend.js +3 -1
  6. package/chunks/AgentPageRenderer-CH8kSTJn.js +1 -0
  7. package/chunks/AgentPageRenderer-P23XVguo.js +1 -0
  8. package/chunks/AttachmentDocumentImporter-B1WOaa7d.js +1 -0
  9. package/chunks/AttachmentDocumentImporter-CT_PJp_e.js +1 -0
  10. package/chunks/BidiText-Swm5fl9J.js +160 -0
  11. package/chunks/ColorParserFull-BKH72fK8.js +446 -1
  12. package/chunks/DocumentMutator-btiDK57e.js +31 -0
  13. package/chunks/DocumentScrubber-CMPfm_HF.js +18 -0
  14. package/chunks/{DocumentScrubber-DrgzBlx4.js → DocumentScrubber-Cm2kH8op.js} +1 -1
  15. package/chunks/{DocumentScrubber-W0EfGmL-.js → DocumentScrubber-bJoKijol.js} +1 -1
  16. package/chunks/DocumentStylesheet-DreoD7sD.js +7 -0
  17. package/chunks/DocxConverter-BcVG-p5K.js +13 -0
  18. package/chunks/DocxConverter-D2bO5RE-.js +1125 -0
  19. package/chunks/DocxConverter-haCfRuWb.js +13 -0
  20. package/chunks/{DocxGraft-B6W7fbh4.js → DocxGraft-BRKh4mHQ.js} +1 -1
  21. package/chunks/DocxGraft-BxSQtl12.js +7 -0
  22. package/chunks/{DocxGraft-Cj7v78BO.js → DocxGraft-C9MBQCnf.js} +1 -1
  23. package/chunks/FileImporter-CszqRfVU.js +1 -0
  24. package/chunks/FileImporter-DObFoCCn.js +1 -0
  25. package/chunks/HorizontalRuleOrnaments-gmUZ3R7Q.js +3 -1
  26. package/chunks/HtmlConverter-DwXB4IDh.js +267 -0
  27. package/chunks/ListNumbering-Qlu6AuRZ.js +23 -1
  28. package/chunks/MarkdownConverter-CUC8GgsS.js +57 -0
  29. package/chunks/MathRenderer-DT6GyJXb.js +68 -0
  30. package/chunks/OdtConverter-7h9HHMpL.js +125 -0
  31. package/chunks/OdtConverter-Ct4qypJk.js +6 -0
  32. package/chunks/OdtConverter-DFl__sJc.js +6 -0
  33. package/chunks/OfficeImportShared-BY6FdZ8d.js +1 -0
  34. package/chunks/OfficeImportShared-BrZoDM0j.js +30 -0
  35. package/chunks/OfficeImportShared-Bvm-mOyj.js +1 -0
  36. package/chunks/ParagraphDiffAnalysis-DrmStvmz.js +36 -0
  37. package/chunks/PdfConverter-1wyvoT7X.js +21 -0
  38. package/chunks/PdfConverter-BAoEHILo.js +21 -0
  39. package/chunks/PdfConverter-CKEvFj11.js +448 -0
  40. package/chunks/{PdfImportService-Dj1-3L2B.js → PdfImportService-BhLPp5uG.js} +2 -2
  41. package/chunks/{PdfImportService-OE9G383I.js → PdfImportService-xbzrN__L.js} +2 -2
  42. package/chunks/RtfConverter-Bxn-enp8.js +15 -0
  43. package/chunks/RtfConverter-LZPzBDSr.js +15 -0
  44. package/chunks/RtfConverter-_bacXqr1.js +186 -0
  45. package/chunks/TableBorders-CwnF3jvH.js +30 -0
  46. package/chunks/TableGrid-DbroRucl.js +12 -0
  47. package/chunks/TextFileDecoder--rsVs3NR.js +9 -2
  48. package/chunks/{TxtConverter-BYazsp6P.js → TxtConverter-C7FOwHpH.js} +5 -2
  49. package/chunks/UnicodeUtils-CXtusU4g.js +10 -0
  50. package/chunks/XmlConverter-7oo8oeQB.js +2 -0
  51. package/chunks/XmlConverter-DGORHJcZ.js +96 -0
  52. package/chunks/XmlConverter-DeLHReK_.js +2 -0
  53. package/chunks/_commonjsHelpers-DaMA6jEr.js +2 -1
  54. package/chunks/_revise-sdk-lazy-harfbuzz-CDWdjF9f.js +1 -1
  55. package/chunks/_revise-sdk-lazy-harfbuzz-X8gnYTZL.js +1 -1
  56. package/chunks/ar-ComXvtmh.js +13 -0
  57. package/chunks/backend-DecaBz-I.js +490 -0
  58. package/chunks/base64-sSPOzq-u.js +198 -0
  59. package/chunks/browser-module-CFmqfGkE.js +1791 -3
  60. package/chunks/{browser-module-BbaxnHNK.js → browser-module-Dj5o3kuL.js} +1 -1
  61. package/chunks/{browser-module-D2ixluMg.js → browser-module-UuM_O36W.js} +1 -1
  62. package/chunks/bundle.min-DRpfgV69.js +779 -5
  63. package/chunks/capture-1btcWcPF.js +9 -0
  64. package/chunks/carrier-DQeng6yq.js +6 -0
  65. package/chunks/de-BkbpIKxx.js +13 -0
  66. package/chunks/es-CKkXujOF.js +13 -0
  67. package/chunks/fil-piIHMc8F.js +13 -0
  68. package/chunks/footnoteFlatten-DUQticYy.js +6 -0
  69. package/chunks/fr-DuA8qLje.js +13 -0
  70. package/chunks/graftExport-CYnStOdU.js +82 -0
  71. package/chunks/html2canvas.esm-CntiHiYW.js +994 -2
  72. package/chunks/index-2TBhRkX7.js +387 -0
  73. package/chunks/index-BWdRWxoH.js +1796 -13
  74. package/chunks/index-Bf14eTEW.js +1096 -0
  75. package/chunks/index-BwcX_r62.js +387 -0
  76. package/chunks/index.es-CI0QPo8w.js +780 -5
  77. package/chunks/{index.es-B97tjxvW.js → index.es-CI7cDExj.js} +1 -1
  78. package/chunks/{index.es-mTU7Sl3w.js → index.es-DHpGt6Y5.js} +1 -1
  79. package/chunks/ja-DgrSs555.js +13 -0
  80. package/chunks/{jspdf.es.min-Mykp4BZO.js → jspdf.es.min--GshOuIm.js} +1 -1
  81. package/chunks/jspdf.es.min-DU74zN8b.js +1747 -32
  82. package/chunks/{jspdf.es.min-DGiD4mlU.js → jspdf.es.min-DurJZ1zW.js} +1 -1
  83. package/chunks/jszip.min-CPW0h1Kx.js +476 -2
  84. package/chunks/katex-DWj8TvwO.js +1209 -8
  85. package/chunks/pdf-BLWDCiFF.js +1826 -10
  86. package/chunks/pseudoLocale-BoYTjmiK.js +1 -0
  87. package/chunks/pseudoLocale-DG2NnZmz.js +1 -0
  88. package/chunks/purify.es-BwLardii.js +107 -2
  89. package/chunks/serverDocumentSession-CJ1EH3Tp.js +15 -0
  90. package/chunks/signatures-Bwt_OGik.js +17 -0
  91. package/chunks/suggestionAuthorship-B-IuLQlE.js +1 -0
  92. package/chunks/tree-sitter-D6zWWUMP.js +1 -1
  93. package/chunks/web-tree-sitter-BXGZGnNj.js +2 -1
  94. package/chunks/zh-9OF3SWWO.js +13 -0
  95. package/full.js +1 -1
  96. package/index.d.ts +42 -15
  97. package/index.js +1 -1
  98. package/package.json +1 -1
  99. package/root.js +2 -2
  100. package/serverToolContract.d.ts +21 -3
  101. package/serverToolInputs.generated.d.ts +23 -2
  102. package/style.css +1 -1
  103. package/assets/historyMaterializeWorker-C4uxcZEh.js +0 -3
  104. package/chunks/AgentPageRenderer-BIf_Fza8.js +0 -1
  105. package/chunks/AgentPageRenderer-DT9sNxEn.js +0 -1
  106. package/chunks/AttachmentDocumentImporter-BUavYRxO.js +0 -1
  107. package/chunks/AttachmentDocumentImporter-DGwfDJSH.js +0 -1
  108. package/chunks/BidiText-D7LYTAUL.js +0 -1
  109. package/chunks/DocumentMutator-CjN7Kk-X.js +0 -31
  110. package/chunks/DocumentScrubber-C9ZZEcYW.js +0 -1
  111. package/chunks/DocumentStylesheet-byN5dtC6.js +0 -1
  112. package/chunks/DocxConverter-Be3uPNcD.js +0 -11
  113. package/chunks/DocxConverter-CGYMfz-j.js +0 -11
  114. package/chunks/DocxConverter-DabDLfsu.js +0 -11
  115. package/chunks/DocxGraft-Duvo2cpy.js +0 -1
  116. package/chunks/FileImporter-CjUX2S4s.js +0 -1
  117. package/chunks/FileImporter-DtkbI6rF.js +0 -1
  118. package/chunks/HtmlConverter-ikXImzTY.js +0 -61
  119. package/chunks/MarkdownConverter-CFrcLyO_.js +0 -17
  120. package/chunks/MathRenderer-B0Y1h1JU.js +0 -33
  121. package/chunks/OdtConverter-BFT_P8SI.js +0 -1
  122. package/chunks/OdtConverter-Cnda9T0q.js +0 -1
  123. package/chunks/OdtConverter-WdwwXKVM.js +0 -1
  124. package/chunks/PdfConverter-D7UM58vc.js +0 -21
  125. package/chunks/PdfConverter-TB-QPw29.js +0 -21
  126. package/chunks/PdfConverter-wVP63986.js +0 -21
  127. package/chunks/RtfConverter-D-oqPWNl.js +0 -14
  128. package/chunks/RtfConverter-D9zhE07-.js +0 -14
  129. package/chunks/RtfConverter-DZgwU-_R.js +0 -14
  130. package/chunks/TableBorders-BorZS8aZ.js +0 -1
  131. package/chunks/TableGrid-DVWaRZv0.js +0 -1
  132. package/chunks/ar-C8zx2RwP.js +0 -8
  133. package/chunks/backend-MFpDFVrD.js +0 -1
  134. package/chunks/base64-BNMNG-lN.js +0 -1
  135. package/chunks/capture-qC26xmfy.js +0 -1
  136. package/chunks/carrier-BWONvrA7.js +0 -1
  137. package/chunks/de-ByQFqecF.js +0 -8
  138. package/chunks/es-PHpJXv5S.js +0 -8
  139. package/chunks/footnoteFlatten-Bdnn_bz1.js +0 -1
  140. package/chunks/graftExport-CP3h2T88.js +0 -2
  141. package/chunks/index-CjeGoI2g.js +0 -351
  142. package/chunks/index-D7V8zn4w.js +0 -36
  143. package/chunks/index-DyOcu9mD.js +0 -351
  144. package/chunks/pseudoLocale-C90lXrPg.js +0 -1
  145. package/chunks/pseudoLocale-UA_TkGrH.js +0 -1
  146. package/chunks/serverDocumentSession-CRZSb5SO.js +0 -11
  147. package/chunks/signatures-CsL_TjvW.js +0 -1
@@ -221,7 +221,11 @@ export interface ReviseMutationData {
221
221
 
222
222
  export interface ReviseCommentData {
223
223
  commentId: string;
224
+ /** The block the comment is anchored to. */
224
225
  blockId: string;
226
+ /** Set when the requested block did not hold the anchor text and the
227
+ * comment went to the only read block that did. */
228
+ requestedBlockId?: string;
225
229
  anchor: ReviseJsonObject;
226
230
  }
227
231
 
@@ -253,11 +257,25 @@ export type ReviseToolDataMap = {
253
257
  export type ReviseToolData<Name extends ReviseToolName> =
254
258
  ReviseToolDataMap[Name];
255
259
 
260
+ /**
261
+ * A tool's input as application code writes it for typed `execute()` and
262
+ * `call()`.
263
+ *
264
+ * `context_notes` is a model's working memory, carried from one read to the
265
+ * next, and the model-facing schemas require it. Host code keeps its own
266
+ * state, so the field is optional here and defaults to `"N/A"`.
267
+ * `executeDynamic()`, the path for model-provided calls, still requires it.
268
+ */
269
+ export type ReviseHostToolInput<Name extends ReviseToolName> =
270
+ ReviseToolInput<Name> extends { context_notes: string }
271
+ ? Omit<ReviseToolInput<Name>, "context_notes"> & { context_notes?: string }
272
+ : ReviseToolInput<Name>;
273
+
256
274
  /** Tool arguments, with input optional only when its schema has no required fields. */
257
275
  export type ReviseToolArguments<Name extends ReviseToolName> =
258
- Record<string, never> extends ReviseToolInput<Name>
259
- ? [input?: ReviseToolInput<Name>, options?: ReviseToolCallOptions]
260
- : [input: ReviseToolInput<Name>, options?: ReviseToolCallOptions];
276
+ Record<string, never> extends ReviseHostToolInput<Name>
277
+ ? [input?: ReviseHostToolInput<Name>, options?: ReviseToolCallOptions]
278
+ : [input: ReviseHostToolInput<Name>, options?: ReviseToolCallOptions];
261
279
 
262
280
  /** Semantic document context returned by read and search calls. */
263
281
  export interface ReviseDocumentContext {
@@ -1,5 +1,4 @@
1
- // Generated from backend/agent/internal/tools/definitions.go.
2
- // Run `npm run generate:sdk-tools` after changing agent tool schemas.
1
+ // Input types for every Revise tool, generated from the tool schemas.
3
2
  export type ReviseJsonPrimitive = string | number | boolean | null;
4
3
  export type ReviseJsonValue =
5
4
  | ReviseJsonPrimitive
@@ -26,6 +25,19 @@ export interface ReviseToolInputMap {
26
25
  block_ids: Array<string>;
27
26
  context_notes: string;
28
27
  };
28
+ read_table: {
29
+ cell_id?: string;
30
+ column_count?: number;
31
+ column_start?: number;
32
+ context_notes: string;
33
+ continuation_revision?: string;
34
+ mode?: "summary" | "rows" | "cell_text";
35
+ row_count?: number;
36
+ row_ids?: Array<string>;
37
+ row_start?: number;
38
+ table_id: string;
39
+ text_offset?: number;
40
+ };
29
41
  measure_document: {
30
42
  heading_levels?: Array<1 | 2 | 3>;
31
43
  include_sections?: boolean;
@@ -215,6 +227,15 @@ export interface ReviseToolInputMap {
215
227
  columnIndex: number;
216
228
  tableId: string;
217
229
  };
230
+ edit_table_cells: {
231
+ cells: Array<{
232
+ column: number;
233
+ row_id: string;
234
+ text: string;
235
+ }>;
236
+ mode: "fill_if_empty" | "replace";
237
+ table_id: string;
238
+ };
218
239
  remove_block: {
219
240
  count?: number;
220
241
  id?: string;