revise 2.0.0 → 2.1.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 (129) hide show
  1. package/CHANGELOG.md +128 -0
  2. package/README.md +4 -1
  3. package/assets/historyMaterializeWorker-C4uxcZEh.js +607 -0
  4. package/backend.d.ts +22 -0
  5. package/backend.js +3 -1
  6. package/chunks/AgentPageRenderer-BFB0arQL.js +1 -0
  7. package/chunks/AgentPageRenderer-Dn6SaRjW.js +1 -0
  8. package/chunks/AttachmentDocumentImporter-BHDJAdky.js +1 -0
  9. package/chunks/AttachmentDocumentImporter-CxOZqzt1.js +1 -0
  10. package/chunks/BidiText-C8PBPSQY.js +160 -0
  11. package/chunks/ColorParserFull-BKH72fK8.js +446 -1
  12. package/chunks/DocumentMutator-4vBJQ74L.js +31 -0
  13. package/chunks/DocumentScrubber-COPepQKE.js +1 -0
  14. package/chunks/DocumentScrubber-Cf_QqHhF.js +1 -0
  15. package/chunks/DocumentScrubber-DS4LFDKS.js +18 -0
  16. package/chunks/DocumentStylesheet-byN5dtC6.js +7 -1
  17. package/chunks/DocxConverter-BCEB7jWY.js +1083 -0
  18. package/chunks/{DocxConverter-COV6CjUM.js → DocxConverter-C3NflpDr.js} +7 -7
  19. package/chunks/{DocxConverter-B7P52lw7.js → DocxConverter-D9ZNn4nX.js} +6 -6
  20. package/chunks/{DocxGraft-CJ12C9WP.js → DocxGraft-Ba63IRP4.js} +1 -1
  21. package/chunks/DocxGraft-DjERgl-z.js +7 -0
  22. package/chunks/{DocxGraft-DcmFuUkd.js → DocxGraft-cYlmw4Ab.js} +1 -1
  23. package/chunks/FileImporter-CHXj9sNX.js +1 -0
  24. package/chunks/FileImporter-DetvRoJc.js +1 -0
  25. package/chunks/HorizontalRuleOrnaments-gmUZ3R7Q.js +3 -1
  26. package/chunks/HtmlConverter-Sd9t49vH.js +267 -0
  27. package/chunks/ListNumbering-Qlu6AuRZ.js +23 -1
  28. package/chunks/MarkdownConverter-BdJgh8xt.js +57 -0
  29. package/chunks/MathRenderer-B0Y1h1JU.js +36 -7
  30. package/chunks/OdtConverter-BKtyx012.js +1 -0
  31. package/chunks/OdtConverter-Ce9j8PRt.js +1 -0
  32. package/chunks/OdtConverter-D709qfYb.js +31 -0
  33. package/chunks/ParagraphDiffAnalysis-DrmStvmz.js +36 -0
  34. package/chunks/PdfConverter-BA8XLTAM.js +21 -0
  35. package/chunks/PdfConverter-CkDClffR.js +438 -0
  36. package/chunks/PdfConverter-CxLxd-LJ.js +21 -0
  37. package/chunks/PdfImportService-CQCgsRX1.js +2 -0
  38. package/chunks/PdfImportService-xl7fstr-.js +2 -0
  39. package/chunks/{RtfConverter-oIwzoqCD.js → RtfConverter-BZOnMUGH.js} +5 -5
  40. package/chunks/{RtfConverter-BQGge3K-.js → RtfConverter-Bs81AfXt.js} +5 -5
  41. package/chunks/RtfConverter-DfuE5olb.js +45 -0
  42. package/chunks/TableBorders-Cdkc62cX.js +30 -0
  43. package/chunks/TableGrid-DbroRucl.js +12 -0
  44. package/chunks/TextFileDecoder--rsVs3NR.js +9 -2
  45. package/chunks/{TxtConverter-C1lp6dBS.js → TxtConverter-C-oiFUAp.js} +6 -3
  46. package/chunks/UnicodeUtils-CXtusU4g.js +10 -0
  47. package/chunks/XmlConverter-C0FnrVYk.js +70 -0
  48. package/chunks/XmlConverter-CQa8baOF.js +2 -0
  49. package/chunks/XmlConverter-DjEYaIyf.js +2 -0
  50. package/chunks/_commonjsHelpers-DaMA6jEr.js +2 -1
  51. package/chunks/_revise-sdk-lazy-harfbuzz-CDWdjF9f.js +1 -1
  52. package/chunks/_revise-sdk-lazy-harfbuzz-X8gnYTZL.js +1 -1
  53. package/chunks/ar-BdmGnaKI.js +14 -0
  54. package/chunks/backend-BIhAX-Gi.js +484 -0
  55. package/chunks/base64-Qx0OzT4p.js +196 -0
  56. package/chunks/browser-module-CFmqfGkE.js +1791 -3
  57. package/chunks/{browser-module-6b2Fq-5C.js → browser-module-CYGCfEyx.js} +1 -1
  58. package/chunks/{browser-module-CkO57IPL.js → browser-module-DgvTMhpA.js} +1 -1
  59. package/chunks/bundle.min-DRpfgV69.js +779 -5
  60. package/chunks/capture-BAJ2in5p.js +9 -0
  61. package/chunks/carrier-C5VZRMxZ.js +6 -0
  62. package/chunks/de-DldIXRFC.js +14 -0
  63. package/chunks/es-CnyKlSPK.js +14 -0
  64. package/chunks/footnoteFlatten-Bekh8ZfM.js +6 -0
  65. package/chunks/graftExport-CRRm1Oe_.js +82 -0
  66. package/chunks/html2canvas.esm-CntiHiYW.js +994 -2
  67. package/chunks/index-B1idHquf.js +1094 -0
  68. package/chunks/index-BWdRWxoH.js +1796 -13
  69. package/chunks/index-C-4H81OE.js +378 -0
  70. package/chunks/index-iZC8xN0t.js +378 -0
  71. package/chunks/{index.es-DOqegDGr.js → index.es-Bwt05m_b.js} +1 -1
  72. package/chunks/index.es-CI0QPo8w.js +780 -5
  73. package/chunks/{index.es-tXDO0RMv.js → index.es-DAQD57G4.js} +1 -1
  74. package/chunks/{jspdf.es.min-CzYti8jo.js → jspdf.es.min-CnNRolk9.js} +1 -1
  75. package/chunks/jspdf.es.min-DU74zN8b.js +1747 -32
  76. package/chunks/{jspdf.es.min-ejWOGhkJ.js → jspdf.es.min-DlTF8uTw.js} +1 -1
  77. package/chunks/jszip.min-CPW0h1Kx.js +476 -2
  78. package/chunks/katex-DWj8TvwO.js +1209 -8
  79. package/chunks/pdf-BLWDCiFF.js +1826 -10
  80. package/chunks/{pseudoLocale-CdBtPHRi.js → pseudoLocale-BoJwIubw.js} +1 -1
  81. package/chunks/{pseudoLocale-DEVWLkGC.js → pseudoLocale-DWAm7Dpa.js} +1 -1
  82. package/chunks/purify.es-BwLardii.js +107 -2
  83. package/chunks/serverDocumentSession-DASrQAbW.js +15 -0
  84. package/chunks/signatures-CBF7NZUy.js +17 -0
  85. package/chunks/tree-sitter-D6zWWUMP.js +1 -1
  86. package/chunks/web-tree-sitter-BXGZGnNj.js +2 -1
  87. package/full.js +1 -1
  88. package/index.d.ts +58 -16
  89. package/index.js +1 -1
  90. package/package.json +2 -2
  91. package/root.js +2 -2
  92. package/serverToolContract.d.ts +21 -3
  93. package/serverToolInputs.generated.d.ts +23 -2
  94. package/style.css +1 -1
  95. package/assets/historyMaterializeWorker-CoAX9ZAi.js +0 -3
  96. package/chunks/AgentPageRenderer-C0n4EnuW.js +0 -1
  97. package/chunks/AgentPageRenderer-DURfmiu0.js +0 -1
  98. package/chunks/AttachmentDocumentImporter-DSic_6At.js +0 -1
  99. package/chunks/AttachmentDocumentImporter-dNMtkxrv.js +0 -1
  100. package/chunks/BidiText-B4Hzrjg9.js +0 -1
  101. package/chunks/DocxConverter-Cq_zCEJC.js +0 -11
  102. package/chunks/DocxGraft-CQpvFcYb.js +0 -1
  103. package/chunks/FileImporter-DVnYOJHp.js +0 -1
  104. package/chunks/FileImporter-q9mCch0J.js +0 -1
  105. package/chunks/HtmlConverter-JvRlkQM3.js +0 -61
  106. package/chunks/MarkdownConverter-B-tPY7X3.js +0 -17
  107. package/chunks/OdtConverter-Br81BSoJ.js +0 -1
  108. package/chunks/OdtConverter-CQjh0vlo.js +0 -1
  109. package/chunks/OdtConverter-DYHnR4E8.js +0 -1
  110. package/chunks/PdfConverter-D26rXumc.js +0 -21
  111. package/chunks/PdfConverter-DGZpUSVf.js +0 -21
  112. package/chunks/PdfConverter-DZzVP0-B.js +0 -21
  113. package/chunks/PdfImportService-CBD8TL1k.js +0 -2
  114. package/chunks/PdfImportService-D6uUKGMf.js +0 -2
  115. package/chunks/RtfConverter-CMfZ4olw.js +0 -14
  116. package/chunks/TableBorders-BLkZYt1k.js +0 -1
  117. package/chunks/TableGrid-DVWaRZv0.js +0 -1
  118. package/chunks/ar-kgSWdrXF.js +0 -8
  119. package/chunks/backend-Cq-khfdG.js +0 -1
  120. package/chunks/base64-CfDUyGi8.js +0 -36
  121. package/chunks/capture-DU3MC7tb.js +0 -1
  122. package/chunks/carrier-WgcRSu7a.js +0 -1
  123. package/chunks/de-C2QTHrqo.js +0 -8
  124. package/chunks/es-BKboUn4q.js +0 -8
  125. package/chunks/footnoteFlatten-CW-DUcgK.js +0 -1
  126. package/chunks/graftExport-CVg7PO2A.js +0 -2
  127. package/chunks/index-CLw_BlSL.js +0 -353
  128. package/chunks/index-F-kHIwWT.js +0 -353
  129. package/chunks/serverDocumentSession-DZrYbdpk.js +0 -42
@@ -1 +1,2 @@
1
- class e{constructor(t){this.endIndex=t,this.childCount=0,this.startIndex=0,this.parent=null,this.type="text"}child(){return this}}class s{static async load(){return new s}}class n{static async init(){}setLanguage(){}parse(t){return{rootNode:new e(t.length)}}}export{s as Language,n as Parser};
1
+ class e{constructor(t){this.endIndex=t,this.childCount=0,this.startIndex=0,this.parent=null,this.type="text"}child(){return this}}class s{static async load(){return new s}}class n{static async init(){}setLanguage(){}parse(t){
2
+ return{rootNode:new e(t.length)}}}export{s as Language,n as Parser};
package/full.js CHANGED
@@ -1 +1 @@
1
- import{c8 as s,c7 as a,ca as e,cd as c,cb as r,c9 as o,ca as E,ce as t,cc as R}from"./chunks/index-F-kHIwWT.js";export{s as REVISE_SDK_BUILD,a as REVISE_SDK_VERSION,e as ReviseEditor,c as ReviseRoleError,r as ReviseToolError,o as createEmptyDocx,E as default,t as rolePolicy,R as setAssetBaseUrl};
1
+ import{cf as s,ce as a,ch as e,ck as r,ci as c,cg as o,ch as E,cl as t,cj as i}from"./chunks/index-C-4H81OE.js";export{s as REVISE_SDK_BUILD,a as REVISE_SDK_VERSION,e as ReviseEditor,r as ReviseRoleError,c as ReviseToolError,o as createEmptyDocx,E as default,t as rolePolicy,i as setAssetBaseUrl};
package/index.d.ts CHANGED
@@ -2,8 +2,8 @@ import * as React from "react";
2
2
  // The canonical tool contract, shared verbatim with the backend entry: the
3
3
  // browser surface returns the same envelopes and throws the same error.
4
4
  import type {
5
+ ReviseHostToolInput,
5
6
  ReviseSuggestionDecision,
6
- ReviseToolInput,
7
7
  ReviseToolName,
8
8
  ReviseToolResponse,
9
9
  ReviseToolResult,
@@ -66,15 +66,27 @@ export type ReviseAgentTurnStream = (
66
66
  request: ReviseAgentTurnRequest,
67
67
  ) => AsyncGenerator<ReviseAgentStreamEvent, void, unknown>;
68
68
 
69
+ /** Where agent work goes, and how it is signed. Configure one transport —
70
+ * `turnStream`, `baseUrl`, or `token` — or agent runs fail fast with
71
+ * `agent_not_configured` and send nothing. */
69
72
  export interface ReviseAgentConfig {
70
- /** Display name for comments and tracked changes. Defaults to Revise Agent. */
73
+ /** Display name for comments and tracked changes made through
74
+ * `tools.execute` and agent runs. Defaults to "Revise Agent". */
71
75
  name?: string;
76
+ /** Your own Revise agent backend. Without it, runs go to Revise's hosted
77
+ * agent, which needs a `token`. */
72
78
  baseUrl?: string;
79
+ /** Bearer token. Required for Revise's hosted agent; an anonymous
80
+ * `baseUrl` backend needs none. */
73
81
  token?: string;
74
82
  conversationId?: string;
75
83
  provider?: string;
76
84
  model?: string;
85
+ /** Run turns through your own model or gateway. Changing it takes effect on
86
+ * the next run, without reopening the document. */
77
87
  turnStream?: ReviseAgentTurnStream;
88
+ /** Skip the run-completion call (cost accounting) to the agent backend at
89
+ * `baseUrl`. Implied by `turnStream`. */
78
90
  disableMetrics?: boolean;
79
91
  }
80
92
 
@@ -121,10 +133,12 @@ export interface ReviseEditorToolExecutionOptions {
121
133
 
122
134
  /** Tool arguments, with input optional only when its schema has no required
123
135
  * fields — the browser twin of the server contract's argument tuple. */
136
+ /** Typed host arguments. `context_notes` is optional here and defaults to
137
+ * "N/A"; `executeDynamic()`, for model-provided calls, still requires it. */
124
138
  export type ReviseEditorToolArguments<Name extends ReviseToolName> =
125
- Record<string, never> extends ReviseToolInput<Name>
126
- ? [input?: ReviseToolInput<Name>, options?: ReviseEditorToolExecutionOptions]
127
- : [input: ReviseToolInput<Name>, options?: ReviseEditorToolExecutionOptions];
139
+ Record<string, never> extends ReviseHostToolInput<Name>
140
+ ? [input?: ReviseHostToolInput<Name>, options?: ReviseEditorToolExecutionOptions]
141
+ : [input: ReviseHostToolInput<Name>, options?: ReviseEditorToolExecutionOptions];
128
142
 
129
143
  export interface ReviseEditorTool extends ReviseEditorToolDefinition {
130
144
  execute(
@@ -158,6 +172,13 @@ export interface ReviseEditorTools {
158
172
  ): Promise<ReviseToolResponse<Name>>;
159
173
  getDefinitions(): ReviseEditorToolDefinition[];
160
174
  exportDocx(): Promise<Blob>;
175
+ /**
176
+ * Export the document as a file. `format` defaults to "docx". In
177
+ * "review" mode (the default) a .docx keeps pending tracked changes and
178
+ * comments; other formats show the text with changes accepted. "final"
179
+ * accepts every pending change and drops comments first: a clean copy.
180
+ */
181
+ export(options?: ReviseExportOptions): Promise<Blob>;
161
182
  /** Settle every open suggestion, collaborators' included. Prefer ID-based
162
183
  * review.acceptSuggestions() with IDs from mutation results. */
163
184
  acceptAllSuggestions(): ReviseSuggestionDecision;
@@ -229,6 +250,14 @@ export type InlineFormattingCommand =
229
250
  | "superscript"
230
251
  | "subscript";
231
252
 
253
+ /** File formats `tools.export()` can produce. */
254
+ export type ReviseExportFormat = "docx" | "pdf" | "html" | "markdown" | "txt";
255
+
256
+ export interface ReviseExportOptions {
257
+ format?: ReviseExportFormat;
258
+ mode?: "review" | "final";
259
+ }
260
+
232
261
  export type ReviseToolbarMode = "native" | "none";
233
262
  export type ReviseZoom = number | "fit-width";
234
263
 
@@ -631,10 +660,10 @@ export interface ReviseCollaborationConfig {
631
660
  * The recommended form: the editor builds the document and awareness with
632
661
  * the settings it requires, and this connects them.
633
662
  *
634
- * The editor reserves eight top-level keys in the document — content,
635
- * chrome, notes, comments, annotations, metadata, sdt-wrappers, paragraphs
636
- * — so a document built elsewhere may already use those names or hold
637
- * another schema. Let the editor build its own.
663
+ * The editor reserves the top-level keys listed in RESERVED_DOCUMENT_KEYS
664
+ * (content, comments, metadata, and others), so a document built elsewhere
665
+ * may already use those names or hold another schema. Let the editor build
666
+ * its own.
638
667
  */
639
668
  connect?: ReviseCollaborationConnect;
640
669
  /** A provider that already owns its document. The document is validated
@@ -702,10 +731,11 @@ export declare class ReviseRoleError extends Error {
702
731
  export interface ReviseTrackedChange {
703
732
  id: string;
704
733
  /** Word's three revision kinds, plus "move" for a linked move pair. A
705
- * replacement appears as both a delete and an insert, as it does in Word.
706
- * A linked move is ONE change: `deletedText` is the text at the source,
707
- * `insertedText` the text at the destination, and resolving it settles
708
- * both locations atomically. */
734
+ * replacement made in one operation (the agent's `replace` tool) is ONE
735
+ * change with both `deletedText` and `insertedText` set; its kind is
736
+ * the one it was recorded with, usually "delete". A linked move is also ONE
737
+ * change: `deletedText` is the text at the source, `insertedText` the
738
+ * text at the destination, and resolving it settles both locations. */
709
739
  kind: "insert" | "delete" | "format" | "move";
710
740
  /** A person, "Revise Agent", an external agent, or "Anonymous". */
711
741
  author: string;
@@ -728,8 +758,11 @@ export interface ReviseTrackedChange {
728
758
  export interface ReviseDocumentInput {
729
759
  /** Stable host-owned ID used by APIs, agent tools, and callbacks. */
730
760
  id: string;
731
- /** The source document: DOCX, Markdown, plain text, or HTML. Optional when
732
- * joining an established collaborative document. */
761
+ /** The document to open: DOCX, Markdown, plain text, or HTML. Optional
762
+ * when joining an established collaborative document. */
763
+ source?: ReviseDocumentSource;
764
+ /** The original name for `source`, accepted for compatibility. Pass one
765
+ * or the other. */
733
766
  docx?: ReviseDocumentSource;
734
767
  /** Share this document over a Yjs transport you own. */
735
768
  collaboration?: ReviseCollaborationConfig;
@@ -790,6 +823,7 @@ export type ReviseDocumentScoped<T> = T & {
790
823
  export interface ReviseMultiDocumentTools extends ReviseEditorTools {
791
824
  forDocument(documentId: string): ReviseEditorTools;
792
825
  exportDocx(documentId?: string): Promise<Blob>;
826
+ export(options?: ReviseExportOptions, documentId?: string): Promise<Blob>;
793
827
  acceptAllSuggestions(documentId?: string): ReviseSuggestionDecision;
794
828
  rejectAllSuggestions(documentId?: string): ReviseSuggestionDecision;
795
829
  }
@@ -862,7 +896,8 @@ export interface ReviseEditorProps {
862
896
  /** Once per page load, the SDK sends Revise one anonymous ping carrying
863
897
  * its version; the browser adds your site's origin. Development hosts
864
898
  * (localhost and similar) are only counted, never named. No cookies, user
865
- * data, or document content. Set false to turn it off. Defaults to true. */
899
+ * data, or document content. Set false to turn it off. Defaults to true.
900
+ * An agent, when you configure one, talks only to the backend you chose. */
866
901
  telemetry?: boolean;
867
902
  initialDocuments?: readonly ReviseDocumentInput[];
868
903
  /** Controlled active document ID. */
@@ -909,6 +944,13 @@ export interface ReviseEditorProps {
909
944
  pageBorderColor?: string;
910
945
  toolbarMode?: ReviseToolbarMode;
911
946
  fonts?: readonly ReviseFontDefinition[];
947
+ /**
948
+ * Store an image the user inserts, pastes, or drops, and resolve to the URL
949
+ * the document should reference. Without it, images are embedded in the
950
+ * document as data URLs, which export into the .docx like any other image.
951
+ * A rejection shows the user a notice and reaches onError.
952
+ */
953
+ onImageUpload?: (file: File, documentId: string) => Promise<string>;
912
954
  className?: string;
913
955
  style?: React.CSSProperties;
914
956
  onReady?: (editor: ReviseEditorHandle) => void;
package/index.js CHANGED
@@ -1 +1 @@
1
- import{c8 as s,c7 as a,ca as e,cd as c,cb as r,c9 as o,ca as E,ce as t,cc as R}from"./chunks/index-CLw_BlSL.js";export{s as REVISE_SDK_BUILD,a as REVISE_SDK_VERSION,e as ReviseEditor,c as ReviseRoleError,r as ReviseToolError,o as createEmptyDocx,E as default,t as rolePolicy,R as setAssetBaseUrl};
1
+ import{cf as s,ce as a,ch as e,ck as r,ci as c,cg as o,ch as E,cl as t,cj as i}from"./chunks/index-iZC8xN0t.js";export{s as REVISE_SDK_BUILD,a as REVISE_SDK_VERSION,e as ReviseEditor,r as ReviseRoleError,c as ReviseToolError,o as createEmptyDocx,E as default,t as rolePolicy,i as setAssetBaseUrl};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "revise",
3
- "version": "2.0.0",
3
+ "version": "2.1.0",
4
4
  "description": "A word processor for React: DOCX in and out, real pagination, tracked changes, comments, collaboration, and agent tools. Free for evaluation, personal projects, and education.",
5
5
  "keywords": [
6
6
  "docx",
@@ -85,7 +85,7 @@
85
85
  "node": ">=18"
86
86
  },
87
87
  "license": "SEE LICENSE IN LICENSE",
88
- "homepage": "https://revise.io",
88
+ "homepage": "https://revise.io/sdk",
89
89
  "bugs": {
90
90
  "email": "sdk@revise.io",
91
91
  "url": "https://developer.revise.io/editor-sdk/support"
package/root.js CHANGED
@@ -1,2 +1,2 @@
1
- export const REVISE_SDK_VERSION = "2.0.0";
2
- export const REVISE_SDK_BUILD = "7bebae559";
1
+ export const REVISE_SDK_VERSION = "2.1.0";
2
+ export const REVISE_SDK_BUILD = "86f2c47ed";
@@ -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;