@superdoc-dev/sdk 1.19.2 → 1.20.1

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 (103) hide show
  1. package/dist/action-primitives/doc-index.cjs +215 -0
  2. package/dist/action-primitives/doc-index.d.ts +83 -0
  3. package/dist/action-primitives/doc-index.d.ts.map +1 -0
  4. package/dist/action-primitives/doc-index.js +211 -0
  5. package/dist/action-primitives/engine.cjs +204 -0
  6. package/dist/action-primitives/engine.d.ts +71 -0
  7. package/dist/action-primitives/engine.d.ts.map +1 -0
  8. package/dist/action-primitives/engine.js +196 -0
  9. package/dist/action-primitives/receipt.cjs +39 -0
  10. package/dist/action-primitives/receipt.d.ts +49 -0
  11. package/dist/action-primitives/receipt.d.ts.map +1 -0
  12. package/dist/action-primitives/receipt.js +32 -0
  13. package/dist/action-primitives/resolve.cjs +252 -0
  14. package/dist/action-primitives/resolve.d.ts +56 -0
  15. package/dist/action-primitives/resolve.d.ts.map +1 -0
  16. package/dist/action-primitives/resolve.js +246 -0
  17. package/dist/action-primitives/session-cache.cjs +43 -0
  18. package/dist/action-primitives/session-cache.d.ts +19 -0
  19. package/dist/action-primitives/session-cache.d.ts.map +1 -0
  20. package/dist/action-primitives/session-cache.js +37 -0
  21. package/dist/action-primitives/tools/list-transform.cjs +661 -0
  22. package/dist/action-primitives/tools/list-transform.d.ts +98 -0
  23. package/dist/action-primitives/tools/list-transform.d.ts.map +1 -0
  24. package/dist/action-primitives/tools/list-transform.js +656 -0
  25. package/dist/action-primitives/tools/structure-insert.cjs +1343 -0
  26. package/dist/action-primitives/tools/structure-insert.d.ts +183 -0
  27. package/dist/action-primitives/tools/structure-insert.d.ts.map +1 -0
  28. package/dist/action-primitives/tools/structure-insert.js +1338 -0
  29. package/dist/action-primitives/tools/text-transform.cjs +669 -0
  30. package/dist/action-primitives/tools/text-transform.d.ts +64 -0
  31. package/dist/action-primitives/tools/text-transform.d.ts.map +1 -0
  32. package/dist/action-primitives/tools/text-transform.js +664 -0
  33. package/dist/action-primitives/types.d.ts +36 -0
  34. package/dist/action-primitives/types.d.ts.map +1 -0
  35. package/dist/action-primitives/types.js +15 -0
  36. package/dist/agent/actions.cjs +5381 -0
  37. package/dist/agent/actions.d.ts +404 -0
  38. package/dist/agent/actions.d.ts.map +1 -0
  39. package/dist/agent/actions.js +5373 -0
  40. package/dist/agent/catalog.cjs +483 -0
  41. package/dist/agent/catalog.d.ts +103 -0
  42. package/dist/agent/catalog.d.ts.map +1 -0
  43. package/dist/agent/catalog.js +471 -0
  44. package/dist/agent/doc-snapshot.cjs +663 -0
  45. package/dist/agent/doc-snapshot.d.ts +247 -0
  46. package/dist/agent/doc-snapshot.d.ts.map +1 -0
  47. package/dist/agent/doc-snapshot.js +657 -0
  48. package/dist/agent/index.d.ts +16 -0
  49. package/dist/agent/index.d.ts.map +1 -0
  50. package/dist/agent/index.js +15 -0
  51. package/dist/agent/ir.cjs +170 -0
  52. package/dist/agent/ir.d.ts +216 -0
  53. package/dist/agent/ir.d.ts.map +1 -0
  54. package/dist/agent/ir.js +181 -0
  55. package/dist/agent/operation-catalog.cjs +418 -0
  56. package/dist/agent/operation-catalog.d.ts +36 -0
  57. package/dist/agent/operation-catalog.d.ts.map +1 -0
  58. package/dist/agent/operation-catalog.js +446 -0
  59. package/dist/agent/runtime.cjs +501 -0
  60. package/dist/agent/runtime.d.ts +120 -0
  61. package/dist/agent/runtime.d.ts.map +1 -0
  62. package/dist/agent/runtime.js +493 -0
  63. package/dist/embedded-prompts.generated.cjs +13 -0
  64. package/dist/embedded-prompts.generated.d.ts +4 -0
  65. package/dist/embedded-prompts.generated.d.ts.map +1 -0
  66. package/dist/embedded-prompts.generated.js +9 -0
  67. package/dist/generated/client.cjs +18 -0
  68. package/dist/generated/client.d.ts +134 -0
  69. package/dist/generated/client.d.ts.map +1 -1
  70. package/dist/generated/client.js +18 -0
  71. package/dist/generated/contract.cjs +622 -3
  72. package/dist/generated/contract.d.ts.map +1 -1
  73. package/dist/generated/contract.js +622 -3
  74. package/dist/index.cjs +3 -7
  75. package/dist/index.d.ts +8 -6
  76. package/dist/index.d.ts.map +1 -1
  77. package/dist/index.js +2 -8
  78. package/dist/presets/core.cjs +454 -0
  79. package/dist/presets/core.d.ts +20 -0
  80. package/dist/presets/core.d.ts.map +1 -0
  81. package/dist/presets/core.js +447 -0
  82. package/dist/presets.cjs +55 -8
  83. package/dist/presets.d.ts +39 -8
  84. package/dist/presets.d.ts.map +1 -1
  85. package/dist/presets.js +53 -8
  86. package/dist/prompts/mcp-prompt.md +23 -0
  87. package/dist/prompts/system-prompt.md +108 -0
  88. package/dist/runtime/transport-common.cjs +8 -0
  89. package/dist/runtime/transport-common.d.ts.map +1 -1
  90. package/dist/runtime/transport-common.js +8 -0
  91. package/dist/tools.cjs +46 -11
  92. package/dist/tools.d.ts +55 -8
  93. package/dist/tools.d.ts.map +1 -1
  94. package/dist/tools.js +45 -13
  95. package/package.json +9 -8
  96. package/tools/__pycache__/__init__.cpython-312.pyc +0 -0
  97. package/tools/__pycache__/intent_dispatch_generated.cpython-312.pyc +0 -0
  98. package/tools/catalog.json +14 -0
  99. package/tools/tools-policy.json +1 -1
  100. package/tools/tools.anthropic.json +14 -0
  101. package/tools/tools.generic.json +14 -0
  102. package/tools/tools.openai.json +14 -0
  103. package/tools/tools.vercel.json +14 -0
@@ -0,0 +1,404 @@
1
+ /**
2
+ * Clean agent actions.
3
+ *
4
+ * Actions are the high-level, flat-arg actions the product agent surface
5
+ * exposes through `superdoc_perform_action`. They lower into deterministic doc.*
6
+ * operation calls on the bound document handle and return real
7
+ * AgentReceipts with pre/post evidence and verification.
8
+ *
9
+ * Actions are *not* benchmark-shaped: they take only product-facing arguments
10
+ * (text, items, target ordinal, change-mode) and never depend on eval IDs,
11
+ * fixture names, benchmark descriptions, or task-text routing. They are a
12
+ * port of the *generalizable* logic from the workflow-poc surface
13
+ * (clause-level routing and descriptor sentinels are deliberately left
14
+ * behind).
15
+ *
16
+ * The set is intentionally compact — every action covers a real product
17
+ * intent that an LLM would otherwise have to express via raw generated
18
+ * doc.* calls with complex oneOf JSON args.
19
+ */
20
+ import type { BoundDocApi } from '../generated/client.js';
21
+ import type { AgentReceipt } from './runtime.js';
22
+ import type { AgentChangeMode, AgentSelector } from './ir.js';
23
+ export type ActionName = 'insert_paragraphs' | 'insert_heading' | 'replace_text' | 'delete_text' | 'append_list' | 'create_table' | 'comment_paragraphs' | 'add_comments' | 'resolve_comments' | 'reply_to_comment' | 'rewrite_block' | 'accept_tracked_changes' | 'reject_tracked_changes' | 'normalize_body_font_size' | 'set_font_family' | 'apply_letter_spacing' | 'fill_placeholders' | 'move_range' | 'insert_toc' | 'insert_table_row' | 'insert_table_column' | 'delete_table_row' | 'delete_table_column' | 'split_table' | 'convert_list' | 'split_list' | 'undo_changes' | 'redo_changes' | 'attach_numbering' | 'add_list_items' | 'format_text' | 'apply_style' | 'format_paragraph' | 'move_text' | 'style_table' | 'move_table' | 'delete_table' | 'set_paragraph_spacing' | 'insert_page_break' | 'add_hyperlink';
24
+ export type ActionPlacement = {
25
+ at: 'document_end';
26
+ } | {
27
+ at: 'document_start';
28
+ } | {
29
+ at: 'after';
30
+ selector: AgentSelector;
31
+ } | {
32
+ at: 'before';
33
+ selector: AgentSelector;
34
+ };
35
+ export type ActionArgs = InsertParagraphsArgs | InsertHeadingArgs | ReplaceTextArgs | DeleteTextArgs | AppendListArgs | AddListItemsArgs | ConvertListArgs | AttachNumberingArgs | SplitListArgs | CreateTableArgs | CommentParagraphsArgs | AddCommentsArgs | ResolveCommentsArgs | ReplyToCommentArgs | RewriteBlockArgs | FormatTextArgs | FormatParagraphArgs | ApplyStyleArgs | MoveTextArgs | UndoChangesArgs | RedoChangesArgs | AcceptTrackedChangesArgs | RejectTrackedChangesArgs | NormalizeBodyFontSizeArgs | SetFontFamilyArgs | ApplyLetterSpacingArgs | FillPlaceholdersArgs | MoveRangeArgs | InsertTocArgs | StyleTableArgs | MoveTableArgs | DeleteTableArgs | SetParagraphSpacingArgs | InsertPageBreakArgs | AddHyperlinkArgs | InsertTableRowArgs | InsertTableColumnArgs | DeleteTableRowArgs | DeleteTableColumnArgs | SplitTableArgs;
36
+ export type InsertParagraphsArgs = {
37
+ action: 'insert_paragraphs';
38
+ texts?: readonly string[];
39
+ text?: string;
40
+ placement?: ActionPlacement;
41
+ changeMode?: AgentChangeMode;
42
+ headingLevel?: number;
43
+ };
44
+ export type InsertHeadingArgs = {
45
+ action: 'insert_heading';
46
+ text: string;
47
+ level: number;
48
+ placement?: ActionPlacement;
49
+ changeMode?: AgentChangeMode;
50
+ };
51
+ export type ReplaceTextArgs = {
52
+ action: 'replace_text';
53
+ edits: ReadonlyArray<{
54
+ find: string;
55
+ replace: string;
56
+ }>;
57
+ selector?: AgentSelector;
58
+ caseSensitive?: boolean;
59
+ changeMode?: AgentChangeMode;
60
+ };
61
+ export type DeleteTextArgs = {
62
+ action: 'delete_text';
63
+ finds: readonly string[];
64
+ /** Scope deletions to one inspected block (like replace_text). Without it, finds match document-wide. */
65
+ selector?: AgentSelector;
66
+ caseSensitive?: boolean;
67
+ changeMode?: AgentChangeMode;
68
+ };
69
+ export type AppendListArgs = {
70
+ action: 'append_list';
71
+ items: readonly string[];
72
+ kind?: 'ordered' | 'bullet';
73
+ headingText?: string;
74
+ headingLevel?: number;
75
+ changeMode?: AgentChangeMode;
76
+ };
77
+ /**
78
+ * Internal args for the workflow/ghost-list insertion path (formerly the
79
+ * standalone insert_list_items action, now folded into add_list_items). Not a
80
+ * public action — has no `action` discriminant.
81
+ */
82
+ export type InsertListItemsArgs = {
83
+ listOrdinal?: number;
84
+ items: readonly string[];
85
+ changeMode?: AgentChangeMode;
86
+ };
87
+ export type AddListItemsArgs = {
88
+ action: 'add_list_items';
89
+ /** Text inside an existing list item to identify the list to extend. Provide this OR listOrdinal. */
90
+ anchorText?: string;
91
+ /** 1-based index of the target list (from inspect). Alternative to anchorText. */
92
+ listOrdinal?: number;
93
+ /** Items to append, with relative nesting level (0 = same as anchor, 1 = nested sub-item). */
94
+ entries?: ReadonlyArray<{
95
+ text: string;
96
+ level?: number;
97
+ }>;
98
+ /** Plain items to append at the list's base level (simple alias for entries without nesting). */
99
+ items?: readonly string[];
100
+ changeMode?: AgentChangeMode;
101
+ };
102
+ export type CreateTableArgs = {
103
+ action: 'create_table';
104
+ rows: number;
105
+ columns: number;
106
+ cellTexts?: ReadonlyArray<ReadonlyArray<string>>;
107
+ placement?: ActionPlacement;
108
+ changeMode?: AgentChangeMode;
109
+ };
110
+ export type CommentParagraphsArgs = {
111
+ action: 'comment_paragraphs';
112
+ commentText: string;
113
+ scope?: 'all' | 'body';
114
+ excludeBlockQuotes?: boolean;
115
+ };
116
+ export type AddCommentsArgs = {
117
+ action: 'add_comments';
118
+ commentText: string;
119
+ /** Single target. Provide this OR `selectors` (batch). */
120
+ selector?: AgentSelector;
121
+ /** Batch: comment many blocks in ONE call (same text). Looped sequentially. */
122
+ selectors?: AgentSelector[];
123
+ };
124
+ export type ReplyToCommentArgs = {
125
+ action: 'reply_to_comment';
126
+ /** The reply body. */
127
+ commentText: string;
128
+ /** Locate the comment to reply to by text it is anchored on / mentions. Provide this OR commentId. */
129
+ anchorText?: string;
130
+ /** Explicit id of the parent comment (from inspect comments[].id). Alternative to anchorText. */
131
+ commentId?: string;
132
+ };
133
+ export type SetFontFamilyArgs = {
134
+ action: 'set_font_family';
135
+ /** Font family to apply, e.g. "Arial" or "Times New Roman". */
136
+ fontFamily: string;
137
+ /** Restrict to one block. Omit selector + targetText to set the whole body. */
138
+ selector?: AgentSelector;
139
+ /** Apply to every occurrence of this text (or targetTexts[] for several). */
140
+ targetText?: string;
141
+ targetTexts?: readonly string[];
142
+ caseSensitive?: boolean;
143
+ changeMode?: AgentChangeMode;
144
+ };
145
+ export type RewriteBlockArgs = {
146
+ action: 'rewrite_block';
147
+ selector: AgentSelector;
148
+ text: string;
149
+ changeMode?: AgentChangeMode;
150
+ };
151
+ export type TrackedChangeKind = 'insert' | 'delete' | 'replacement' | 'format';
152
+ export type AcceptTrackedChangesArgs = {
153
+ action: 'accept_tracked_changes';
154
+ author?: string;
155
+ /** Restrict the decision to one kind of change, e.g. 'format' = formatting-only revisions. */
156
+ changeType?: TrackedChangeKind;
157
+ };
158
+ export type RejectTrackedChangesArgs = {
159
+ action: 'reject_tracked_changes';
160
+ author?: string;
161
+ changeType?: TrackedChangeKind;
162
+ };
163
+ export type NormalizeBodyFontSizeArgs = {
164
+ action: 'normalize_body_font_size';
165
+ fontSize: number;
166
+ changeMode?: AgentChangeMode;
167
+ };
168
+ export type ApplyLetterSpacingArgs = {
169
+ action: 'apply_letter_spacing';
170
+ selector: AgentSelector;
171
+ letterSpacing: number;
172
+ changeMode?: AgentChangeMode;
173
+ };
174
+ export type FillPlaceholdersArgs = {
175
+ action: 'fill_placeholders';
176
+ values?: readonly string[];
177
+ fields?: ReadonlyArray<{
178
+ label?: string;
179
+ value: string;
180
+ }>;
181
+ changeMode?: AgentChangeMode;
182
+ };
183
+ export type MoveRangeArgs = {
184
+ action: 'move_range';
185
+ /** Text identifying the FIRST block of the contiguous range to move. */
186
+ fromText: string;
187
+ /**
188
+ * Text identifying the LAST block of the range. When omitted, the range
189
+ * auto-extends from the `fromText` block up to (but NOT including) the next
190
+ * heading-like block — i.e. the whole "visual section".
191
+ */
192
+ toText?: string;
193
+ /** Place the moved range AFTER the block containing this text. Exactly one of afterText/beforeText is required. */
194
+ afterText?: string;
195
+ /** Place the moved range BEFORE the block containing this text. Exactly one of afterText/beforeText is required. */
196
+ beforeText?: string;
197
+ changeMode?: AgentChangeMode;
198
+ };
199
+ export type InsertTocArgs = {
200
+ action: 'insert_toc';
201
+ title?: string;
202
+ placement?: ActionPlacement;
203
+ changeMode?: AgentChangeMode;
204
+ };
205
+ export type StyleTableArgs = {
206
+ action: 'style_table';
207
+ /** 1-based table ordinal (default 1). */
208
+ tableOrdinal: number;
209
+ /** Header-row fill color (hex, e.g. "#1F3864"); defaults to dark navy. */
210
+ accentColor?: string;
211
+ };
212
+ export type MoveTableArgs = {
213
+ action: 'move_table';
214
+ /** 1-based table ordinal to move (default 1). */
215
+ tableOrdinal?: number;
216
+ /** Destination for the whole table (reuses the placement shape). */
217
+ placement: ActionPlacement;
218
+ };
219
+ export type DeleteTableArgs = {
220
+ action: 'delete_table';
221
+ /** 1-based table ordinal to delete (default 1). */
222
+ tableOrdinal?: number;
223
+ changeMode?: AgentChangeMode;
224
+ };
225
+ export type InsertTableRowArgs = {
226
+ action: 'insert_table_row';
227
+ tableOrdinal?: number;
228
+ rowIndex?: number;
229
+ position?: 'before' | 'after' | 'above' | 'below';
230
+ cellTexts?: readonly string[];
231
+ changeMode?: AgentChangeMode;
232
+ dryRun?: boolean;
233
+ };
234
+ export type InsertTableColumnArgs = {
235
+ action: 'insert_table_column';
236
+ tableOrdinal?: number;
237
+ columnIndex?: number;
238
+ position?: 'left' | 'right';
239
+ headerText?: string;
240
+ changeMode?: AgentChangeMode;
241
+ };
242
+ export type DeleteTableRowArgs = {
243
+ action: 'delete_table_row';
244
+ tableOrdinal?: number;
245
+ rowIndex: number;
246
+ changeMode?: AgentChangeMode;
247
+ };
248
+ export type DeleteTableColumnArgs = {
249
+ action: 'delete_table_column';
250
+ tableOrdinal?: number;
251
+ columnIndex: number;
252
+ changeMode?: AgentChangeMode;
253
+ };
254
+ export type SplitTableArgs = {
255
+ action: 'split_table';
256
+ tableOrdinal?: number;
257
+ rowIndex: number;
258
+ separatorText?: string;
259
+ changeMode?: AgentChangeMode;
260
+ };
261
+ export type ConvertListArgs = {
262
+ action: 'convert_list';
263
+ kind: 'ordered' | 'bullet';
264
+ listOrdinal?: number;
265
+ anchorText?: string;
266
+ fromMarker?: string;
267
+ toMarker?: string;
268
+ fromText?: string;
269
+ toText?: string;
270
+ changeMode?: AgentChangeMode;
271
+ };
272
+ export type UndoChangesArgs = {
273
+ action: 'undo_changes';
274
+ untilMarker?: string;
275
+ steps?: number;
276
+ };
277
+ export type RedoChangesArgs = {
278
+ action: 'redo_changes';
279
+ steps?: number;
280
+ };
281
+ export type SplitListArgs = {
282
+ action: 'split_list';
283
+ /** Text inside the list item that should START the new (second) list. */
284
+ anchorText: string;
285
+ /** Restart the new list's numbering at 1 (default true); false keeps it continuous. */
286
+ restartNumbering?: boolean;
287
+ };
288
+ export type AttachNumberingArgs = {
289
+ action: 'attach_numbering';
290
+ nodeId?: string;
291
+ anchorText?: string;
292
+ likeMarker: string;
293
+ };
294
+ export type ApplyStyleArgs = {
295
+ action: 'apply_style';
296
+ /** Block to restyle. */
297
+ selector: AgentSelector;
298
+ /** Explicit paragraph style id (e.g. "Heading2"). */
299
+ styleId?: string;
300
+ /** Shorthand for styleId "Heading<N>". */
301
+ headingLevel?: number;
302
+ /** Copy the style (and effective inline look) of the block containing this text. */
303
+ likeText?: string;
304
+ };
305
+ export type FormatTextArgs = {
306
+ action: 'format_text';
307
+ /** Literal text whose every occurrence gets formatted. */
308
+ targetText?: string;
309
+ /** Several literal texts in one call ("bold these three dates"). */
310
+ targetTexts?: readonly string[];
311
+ /** Scope to one block (whole block when no targetText given). */
312
+ selector?: AgentSelector;
313
+ caseSensitive?: boolean;
314
+ bold?: boolean;
315
+ italic?: boolean;
316
+ underline?: boolean;
317
+ strike?: boolean;
318
+ /** Highlight color name (e.g. "yellow"). */
319
+ highlight?: string;
320
+ color?: string;
321
+ fontSize?: number;
322
+ changeMode?: AgentChangeMode;
323
+ };
324
+ /**
325
+ * Per-action argument hints — together with ACTION_NAMES and ACTION_GROUPS,
326
+ * the single source for the advertised superdoc_perform_action tool schema/description
327
+ * (rendered in catalog.ts — never hand-edit the description string there).
328
+ * Adding a action = union entry + ACTION_NAMES entry + hint + group + dispatch
329
+ * case; the compiler enforces all but the group, which a unit test covers.
330
+ */
331
+ export declare const ACTION_HINTS: Record<ActionName, string>;
332
+ /** Category grouping for the rendered tool description. Must cover ACTION_NAMES exactly (unit-tested). */
333
+ export declare const ACTION_GROUPS: ReadonlyArray<{
334
+ label: string;
335
+ actions: readonly ActionName[];
336
+ }>;
337
+ /**
338
+ * Per-action argument names (EXCLUDING `action` itself). Derived by reading
339
+ * every `args.X` the matching `case '<action>':` block in the `superdocPerformAction`
340
+ * dispatch switch consumes — including the args read inside the helper
341
+ * functions that case forwards `args` into (e.g. `appendListAtPlacement`,
342
+ * `insertListItemsIntoGhostList` via `chooseListFromSnapshot`,
343
+ * `matchInsertedBlockFormatting`, `runConvertList`, `runUndoChanges`,
344
+ * `runAttachNumbering`).
345
+ *
346
+ * This is the source of truth for which args each action accepts. The catalog
347
+ * generates the `superdoc_perform_action` tool's advertised properties from the UNION of
348
+ * these entries (see ACTION_ARG_PROPERTIES), so the schema can never drift from
349
+ * what actions actually read. `Record<ActionName, …>` forces an entry for every
350
+ * action at compile time.
351
+ */
352
+ export declare const ACTION_ARGS: Record<ActionName, readonly string[]>;
353
+ export declare function isActionName(value: unknown): value is ActionName;
354
+ export type ResolveCommentsArgs = {
355
+ action: 'resolve_comments';
356
+ /** Resolve only comments anchored on text containing this; omit to resolve all. */
357
+ anchorText?: string;
358
+ /** Reopen (status → active) instead of resolve. */
359
+ reopen?: boolean;
360
+ };
361
+ export type FormatParagraphArgs = {
362
+ action: 'format_paragraph';
363
+ /** Block whose paragraph properties to change. */
364
+ selector: AgentSelector;
365
+ /** Paragraph alignment: left | center | right | justify (alias: both). */
366
+ alignment: string;
367
+ changeMode?: AgentChangeMode;
368
+ };
369
+ export type MoveTextArgs = {
370
+ action: 'move_text';
371
+ /** Exact source text span to relocate. */
372
+ text: string;
373
+ /** Relocate to immediately after this text; defaults to immediately after the source span itself. */
374
+ afterText?: string;
375
+ /**
376
+ * 'tracked' records the move as a redline (tracked delete + insert); direct
377
+ * (default) physically relocates the text. Direct mode requires afterText.
378
+ */
379
+ changeMode?: AgentChangeMode;
380
+ };
381
+ export type SetParagraphSpacingArgs = {
382
+ action: 'set_paragraph_spacing';
383
+ selector: AgentSelector;
384
+ /** Line-spacing multiplier (1, 1.5, 2). */
385
+ lineSpacing?: number;
386
+ /** Space before the paragraph, in points. */
387
+ spaceBefore?: number;
388
+ /** Space after the paragraph, in points. */
389
+ spaceAfter?: number;
390
+ };
391
+ export type InsertPageBreakArgs = {
392
+ action: 'insert_page_break';
393
+ selector: AgentSelector;
394
+ };
395
+ export type AddHyperlinkArgs = {
396
+ action: 'add_hyperlink';
397
+ /** Exact text to turn into a hyperlink. */
398
+ text: string;
399
+ url: string;
400
+ tooltip?: string;
401
+ };
402
+ export declare function superdocPerformAction(doc: BoundDocApi, args: unknown): Promise<AgentReceipt>;
403
+ export declare const ACTION_NAMES_LIST: readonly ActionName[];
404
+ //# sourceMappingURL=actions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../src/agent/actions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAY1D,OAAO,KAAK,EAAE,YAAY,EAAuC,MAAM,cAAc,CAAC;AACtF,OAAO,KAAK,EAAE,eAAe,EAAE,aAAa,EAA0B,MAAM,SAAS,CAAC;AAEtF,MAAM,MAAM,UAAU,GAClB,mBAAmB,GACnB,gBAAgB,GAChB,cAAc,GACd,aAAa,GACb,aAAa,GACb,cAAc,GACd,oBAAoB,GACpB,cAAc,GACd,kBAAkB,GAClB,kBAAkB,GAClB,eAAe,GACf,wBAAwB,GACxB,wBAAwB,GACxB,0BAA0B,GAC1B,iBAAiB,GACjB,sBAAsB,GACtB,mBAAmB,GACnB,YAAY,GACZ,YAAY,GACZ,kBAAkB,GAClB,qBAAqB,GACrB,kBAAkB,GAClB,qBAAqB,GACrB,aAAa,GACb,cAAc,GACd,YAAY,GACZ,cAAc,GACd,cAAc,GACd,kBAAkB,GAClB,gBAAgB,GAChB,aAAa,GACb,aAAa,GACb,kBAAkB,GAClB,WAAW,GACX,aAAa,GACb,YAAY,GACZ,cAAc,GACd,uB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