@superdoc/sdk 2.5.0 → 2.7.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.
- package/dist/agent/actions.cjs +1869 -160
- package/dist/agent/actions.d.ts +77 -10
- package/dist/agent/actions.js +1870 -161
- package/dist/agent/catalog.cjs +102 -9
- package/dist/agent/catalog.d.ts +243 -0
- package/dist/agent/catalog.js +99 -9
- package/dist/agent/doc-snapshot.cjs +200 -2
- package/dist/agent/doc-snapshot.d.ts +91 -0
- package/dist/agent/doc-snapshot.js +199 -2
- package/dist/agent/runtime.cjs +9 -1
- package/dist/agent/runtime.d.ts +8 -0
- package/dist/agent/runtime.js +9 -1
- package/dist/embedded-tools.generated.cjs +5 -5
- package/dist/embedded-tools.generated.js +5 -5
- package/dist/generated/client.cjs +754 -770
- package/dist/generated/client.d.ts +14 -9
- package/dist/generated/client.js +754 -770
- package/dist/generated/contract.cjs +16207 -274
- package/dist/generated/contract.d.ts +38 -0
- package/dist/generated/contract.js +17443 -1503
- package/dist/index.cjs +5 -4
- package/dist/index.d.ts +2 -2
- package/dist/index.js +5 -4
- package/dist/introspection.cjs +59 -0
- package/dist/introspection.d.ts +3 -0
- package/dist/introspection.js +53 -0
- package/dist/runtime/document-rpc.cjs +328 -0
- package/dist/runtime/document-rpc.d.ts +24 -0
- package/dist/runtime/document-rpc.js +312 -0
- package/dist/runtime/embedded-cli.cjs +5 -68
- package/dist/runtime/embedded-cli.js +5 -67
- package/dist/runtime/embedded-document-host.cjs +28 -0
- package/dist/runtime/embedded-document-host.d.ts +1 -0
- package/dist/runtime/embedded-document-host.js +23 -0
- package/dist/runtime/embedded-platform.cjs +102 -0
- package/dist/runtime/embedded-platform.d.ts +5 -0
- package/dist/runtime/embedded-platform.js +93 -0
- package/dist/runtime/host.cjs +128 -16
- package/dist/runtime/host.d.ts +11 -5
- package/dist/runtime/host.js +126 -16
- package/dist/runtime/process.cjs +34 -5
- package/dist/runtime/process.d.ts +12 -3
- package/dist/runtime/process.js +33 -5
- package/dist/runtime/transport-common.cjs +1 -0
- package/dist/runtime/transport-common.d.ts +28 -10
- package/dist/runtime/transport-common.js +1 -1
- package/package.json +7 -6
- package/tools/__pycache__/__init__.cpython-311.pyc +0 -0
- package/tools/__pycache__/intent_dispatch_generated.cpython-311.pyc +0 -0
- package/tools/catalog.json +2 -2
- package/tools/tools-policy.json +1 -1
- package/tools/tools.anthropic.json +2 -2
- package/tools/tools.generic.json +2 -2
- package/tools/tools.openai.json +2 -2
- package/tools/tools.vercel.json +2 -2
package/dist/agent/actions.d.ts
CHANGED
|
@@ -37,6 +37,14 @@ export type InsertParagraphsArgs = {
|
|
|
37
37
|
action: 'insert_paragraphs';
|
|
38
38
|
texts?: readonly string[];
|
|
39
39
|
text?: string;
|
|
40
|
+
/**
|
|
41
|
+
* Per-paragraph styling specs aligned with `texts` (same order/length).
|
|
42
|
+
* Entries with runs/marks get a post-insert format.apply pass so an inserted
|
|
43
|
+
* paragraph can mirror its section's pattern (e.g. a bold "(n)" lead-in).
|
|
44
|
+
* Populated by the dispatcher when a texts entry is a {text, runs, marks}
|
|
45
|
+
* object instead of a plain string.
|
|
46
|
+
*/
|
|
47
|
+
textSpecs?: ReadonlyArray<AgentListItemSpec | null>;
|
|
40
48
|
placement?: ActionPlacement;
|
|
41
49
|
changeMode?: AgentChangeMode;
|
|
42
50
|
headingLevel?: number;
|
|
@@ -74,7 +82,12 @@ export type DeleteBlocksArgs = {
|
|
|
74
82
|
};
|
|
75
83
|
export type AppendListArgs = {
|
|
76
84
|
action: 'append_list';
|
|
77
|
-
|
|
85
|
+
/**
|
|
86
|
+
* Plain strings or styled `{text|runs, marks?}` objects — the shared `items`
|
|
87
|
+
* schema advertises both, so both must dispatch. Styled entries are inserted
|
|
88
|
+
* as text and formatted in a post-pass, the same way add_list_items does it.
|
|
89
|
+
*/
|
|
90
|
+
items: readonly (string | AgentListItemSpec)[];
|
|
78
91
|
kind?: 'ordered' | 'bullet';
|
|
79
92
|
headingText?: string;
|
|
80
93
|
headingLevel?: number;
|
|
@@ -88,28 +101,80 @@ export type AppendListArgs = {
|
|
|
88
101
|
export type InsertListItemsArgs = {
|
|
89
102
|
listOrdinal?: number;
|
|
90
103
|
items: readonly string[];
|
|
104
|
+
/**
|
|
105
|
+
* Per-item styling aligned by index with `items`, applied as a post-insert
|
|
106
|
+
* format pass (the workflow insert itself is text-only). Present when the
|
|
107
|
+
* caller wants run-level formatting on the new items.
|
|
108
|
+
*/
|
|
109
|
+
styled?: readonly AgentListItemSpec[];
|
|
91
110
|
changeMode?: AgentChangeMode;
|
|
92
111
|
};
|
|
112
|
+
/**
|
|
113
|
+
* Inline run marks the agent can request on a list-item segment. `fontSize` is
|
|
114
|
+
* in POINTS; `color`/`highlight` are hex (e.g. `#1a1a1a`). Mirrors the keys the
|
|
115
|
+
* shared `doc.format.apply` `inline` payload understands (see marksToInline).
|
|
116
|
+
*/
|
|
117
|
+
export type AgentRunMarks = {
|
|
118
|
+
bold?: boolean;
|
|
119
|
+
italic?: boolean;
|
|
120
|
+
underline?: boolean;
|
|
121
|
+
strikethrough?: boolean;
|
|
122
|
+
fontFamily?: string;
|
|
123
|
+
fontSize?: number;
|
|
124
|
+
color?: string;
|
|
125
|
+
highlight?: string;
|
|
126
|
+
};
|
|
127
|
+
/** One styled text segment of a list item (e.g. first word plain, second italic). */
|
|
128
|
+
export type AgentRunSpec = {
|
|
129
|
+
text: string;
|
|
130
|
+
marks?: AgentRunMarks;
|
|
131
|
+
};
|
|
132
|
+
/**
|
|
133
|
+
* One list item to append. Either plain `text`, or ordered styled `runs` so the
|
|
134
|
+
* agent can replicate an intra-item formatting PATTERN it inferred from the
|
|
135
|
+
* sibling items (e.g. "first word plain, second word italic"). `marks` are
|
|
136
|
+
* whole-item defaults applied UNDER the per-run marks, so unstyled runs still
|
|
137
|
+
* inherit them. `level` nests relative to the anchor (0 = same level).
|
|
138
|
+
*/
|
|
139
|
+
export type AgentListItemSpec = {
|
|
140
|
+
text?: string;
|
|
141
|
+
runs?: readonly AgentRunSpec[];
|
|
142
|
+
marks?: AgentRunMarks;
|
|
143
|
+
level?: number;
|
|
144
|
+
};
|
|
145
|
+
/**
|
|
146
|
+
* One table cell's content — plain `text`, or ordered styled `runs` (so a cell
|
|
147
|
+
* can reproduce an intra-cell formatting pattern), with an optional whole-cell
|
|
148
|
+
* `marks` default. Same run/marks model as list items.
|
|
149
|
+
*/
|
|
150
|
+
export type AgentCellSpec = {
|
|
151
|
+
text?: string;
|
|
152
|
+
runs?: readonly AgentRunSpec[];
|
|
153
|
+
marks?: AgentRunMarks;
|
|
154
|
+
};
|
|
93
155
|
export type AddListItemsArgs = {
|
|
94
156
|
action: 'add_list_items';
|
|
95
157
|
/** Text inside an existing list item to identify the list to extend. Provide this OR listOrdinal. */
|
|
96
158
|
anchorText?: string;
|
|
159
|
+
/**
|
|
160
|
+
* Anchor an existing list item directly by nodeId (internal — used when
|
|
161
|
+
* listOrdinal is resolved to a concrete item, so styled inserts reach this
|
|
162
|
+
* path regardless of which locator the model passed).
|
|
163
|
+
*/
|
|
164
|
+
anchorNodeId?: string;
|
|
97
165
|
/** 1-based index of the target list (from inspect). Alternative to anchorText. */
|
|
98
166
|
listOrdinal?: number;
|
|
99
|
-
/** Items to append, with relative nesting level
|
|
100
|
-
entries?: ReadonlyArray<
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
}>;
|
|
104
|
-
/** Plain items to append at the list's base level (simple alias for entries without nesting). */
|
|
105
|
-
items?: readonly string[];
|
|
167
|
+
/** Items to append, with relative nesting level and optional per-run styling. */
|
|
168
|
+
entries?: ReadonlyArray<AgentListItemSpec>;
|
|
169
|
+
/** Plain or styled items to append at the list's base level. */
|
|
170
|
+
items?: ReadonlyArray<string | AgentListItemSpec>;
|
|
106
171
|
changeMode?: AgentChangeMode;
|
|
107
172
|
};
|
|
108
173
|
export type CreateTableArgs = {
|
|
109
174
|
action: 'create_table';
|
|
110
175
|
rows: number;
|
|
111
176
|
columns: number;
|
|
112
|
-
cellTexts?: ReadonlyArray<ReadonlyArray<string>>;
|
|
177
|
+
cellTexts?: ReadonlyArray<ReadonlyArray<string | AgentCellSpec>>;
|
|
113
178
|
placement?: ActionPlacement;
|
|
114
179
|
changeMode?: AgentChangeMode;
|
|
115
180
|
};
|
|
@@ -233,7 +298,7 @@ export type InsertTableRowArgs = {
|
|
|
233
298
|
tableOrdinal?: number;
|
|
234
299
|
rowIndex?: number;
|
|
235
300
|
position?: 'before' | 'after' | 'above' | 'below';
|
|
236
|
-
cellTexts?: readonly string[];
|
|
301
|
+
cellTexts?: readonly (string | AgentCellSpec)[];
|
|
237
302
|
changeMode?: AgentChangeMode;
|
|
238
303
|
dryRun?: boolean;
|
|
239
304
|
};
|
|
@@ -243,6 +308,8 @@ export type InsertTableColumnArgs = {
|
|
|
243
308
|
columnIndex?: number;
|
|
244
309
|
position?: 'left' | 'right';
|
|
245
310
|
headerText?: string;
|
|
311
|
+
/** Optional styled content per row for the new column's cells (index 0 = top row). */
|
|
312
|
+
cellTexts?: readonly (string | AgentCellSpec)[];
|
|
246
313
|
changeMode?: AgentChangeMode;
|
|
247
314
|
};
|
|
248
315
|
export type DeleteTableRowArgs = {
|