@superdoc/sdk 2.10.0-next.7 → 2.10.0-next.9
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/README.md +45 -0
- package/dist/action-primitives/doc-index.cjs +6 -4
- package/dist/action-primitives/doc-index.js +6 -4
- package/dist/action-primitives/engine.cjs +6 -2
- package/dist/action-primitives/engine.js +6 -2
- package/dist/action-primitives/receipt.d.ts +4 -0
- package/dist/action-primitives/tools/structure-insert.d.ts +1 -1
- package/dist/agent/actions.cjs +203 -223
- package/dist/agent/actions.d.ts +5 -0
- package/dist/agent/actions.js +203 -223
- package/dist/agent/catalog.cjs +15 -0
- package/dist/agent/catalog.js +15 -0
- package/dist/agent/doc-snapshot.cjs +22 -46
- package/dist/agent/doc-snapshot.js +22 -46
- package/dist/agent/execution-context.cjs +385 -0
- package/dist/agent/execution-context.d.ts +97 -0
- package/dist/agent/execution-context.js +376 -0
- package/dist/agent/runtime.cjs +116 -158
- package/dist/agent/runtime.d.ts +3 -0
- package/dist/agent/runtime.js +117 -159
- package/dist/agent/v2-preset-compat.cjs +5 -1
- package/dist/agent/v2-preset-compat.js +4 -1
- package/dist/embedded-tools.generated.cjs +5 -5
- package/dist/embedded-tools.generated.js +5 -5
- package/dist/generated/client.cjs +2 -0
- package/dist/generated/client.d.ts +47 -0
- package/dist/generated/client.js +2 -0
- package/dist/generated/contract.cjs +1605 -1297
- package/dist/generated/contract.js +1605 -1297
- package/dist/index.cjs +11 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.js +11 -0
- package/dist/presets/core.cjs +1 -1
- package/dist/presets/core.js +1 -1
- package/dist/runtime/document-evidence.cjs +40 -0
- package/dist/runtime/document-evidence.d.ts +13 -0
- package/dist/runtime/document-evidence.js +30 -0
- package/dist/runtime/host.cjs +30 -2
- package/dist/runtime/host.d.ts +2 -0
- package/dist/runtime/host.js +30 -2
- package/dist/runtime/process.cjs +6 -0
- package/dist/runtime/process.d.ts +2 -0
- package/dist/runtime/process.js +6 -0
- package/dist/runtime/sdk-version.generated.cjs +1 -1
- package/dist/runtime/sdk-version.generated.d.ts +1 -1
- package/dist/runtime/sdk-version.generated.js +1 -1
- package/package.json +10 -9
- package/tools/catalog.json +35 -0
- package/tools/tools-policy.json +1 -1
- package/tools/tools.anthropic.json +35 -0
- package/tools/tools.generic.json +35 -0
- package/tools/tools.openai.json +35 -0
- package/tools/tools.vercel.json +35 -0
|
@@ -29,6 +29,7 @@ function createDocApi(runtime) {
|
|
|
29
29
|
delete: (params = {}, options) => runtime.invoke(contract.CONTRACT.operations["doc.delete"], params, options),
|
|
30
30
|
formatRange: (params, options) => runtime.invoke(contract.CONTRACT.operations["doc.formatRange"], params, options),
|
|
31
31
|
blocks: {
|
|
32
|
+
findText: (params, options) => runtime.invoke(contract.CONTRACT.operations["doc.blocks.findText"], params, options),
|
|
32
33
|
list: (params = {}, options) => runtime.invoke(contract.CONTRACT.operations["doc.blocks.list"], params, options),
|
|
33
34
|
delete: (params = {}, options) => runtime.invoke(contract.CONTRACT.operations["doc.blocks.delete"], params, options),
|
|
34
35
|
deleteRange: (params = {}, options) => runtime.invoke(contract.CONTRACT.operations["doc.blocks.deleteRange"], params, options),
|
|
@@ -591,6 +592,7 @@ function createBoundDocApi(runtime) {
|
|
|
591
592
|
delete: (params = {}, options) => runtime.invoke(contract.CONTRACT.operations["doc.delete"], params, options),
|
|
592
593
|
formatRange: (params, options) => runtime.invoke(contract.CONTRACT.operations["doc.formatRange"], params, options),
|
|
593
594
|
blocks: {
|
|
595
|
+
findText: (params, options) => runtime.invoke(contract.CONTRACT.operations["doc.blocks.findText"], params, options),
|
|
594
596
|
list: (params = {}, options) => runtime.invoke(contract.CONTRACT.operations["doc.blocks.list"], params, options),
|
|
595
597
|
delete: (params = {}, options) => runtime.invoke(contract.CONTRACT.operations["doc.blocks.delete"], params, options),
|
|
596
598
|
deleteRange: (params = {}, options) => runtime.invoke(contract.CONTRACT.operations["doc.blocks.deleteRange"], params, options),
|
|
@@ -3027,9 +3027,21 @@ export interface DocFormatRangeParams {
|
|
|
3027
3027
|
};
|
|
3028
3028
|
ref?: string;
|
|
3029
3029
|
}
|
|
3030
|
+
export interface DocBlocksFindTextParams {
|
|
3031
|
+
doc?: string;
|
|
3032
|
+
sessionId?: string;
|
|
3033
|
+
text: string;
|
|
3034
|
+
limit?: number;
|
|
3035
|
+
}
|
|
3030
3036
|
export interface DocBlocksListParams {
|
|
3031
3037
|
doc?: string;
|
|
3032
3038
|
sessionId?: string;
|
|
3039
|
+
nodeIds?: string[];
|
|
3040
|
+
textSearch?: {
|
|
3041
|
+
terms: Array<string>;
|
|
3042
|
+
match?: "all" | "any";
|
|
3043
|
+
caseSensitive?: boolean;
|
|
3044
|
+
};
|
|
3033
3045
|
in?: ({
|
|
3034
3046
|
kind: "story";
|
|
3035
3047
|
storyType: "body";
|
|
@@ -39153,6 +39165,22 @@ export type DocFormatRangeResult = {
|
|
|
39153
39165
|
}>;
|
|
39154
39166
|
};
|
|
39155
39167
|
};
|
|
39168
|
+
export type DocBlocksFindTextResult = {
|
|
39169
|
+
total: number;
|
|
39170
|
+
matches: Array<{
|
|
39171
|
+
ordinal: number;
|
|
39172
|
+
nodeId: string;
|
|
39173
|
+
nodeType: "paragraph" | "heading" | "listItem" | "table" | "tableRow" | "tableCell" | "tableOfContents" | "image" | "sdt";
|
|
39174
|
+
preview: string;
|
|
39175
|
+
}>;
|
|
39176
|
+
firstMatchOrdinal?: number;
|
|
39177
|
+
scanError?: {
|
|
39178
|
+
message: string;
|
|
39179
|
+
};
|
|
39180
|
+
scannedBlocks: number;
|
|
39181
|
+
truncated: boolean;
|
|
39182
|
+
revision: string;
|
|
39183
|
+
};
|
|
39156
39184
|
export type DocBlocksListResult = {
|
|
39157
39185
|
total: number;
|
|
39158
39186
|
blocks: Array<{
|
|
@@ -103354,6 +103382,12 @@ export type DocCapabilitiesGetResult = {
|
|
|
103354
103382
|
dryRun: boolean;
|
|
103355
103383
|
reasons?: Array<"COMMAND_UNAVAILABLE" | "HELPER_UNAVAILABLE" | "OPERATION_UNAVAILABLE" | "TRACKED_MODE_UNAVAILABLE" | "DRY_RUN_UNAVAILABLE" | "NAMESPACE_UNAVAILABLE" | "STYLES_PART_MISSING" | "COLLABORATION_ACTIVE">;
|
|
103356
103384
|
};
|
|
103385
|
+
"blocks.findText": {
|
|
103386
|
+
available: boolean;
|
|
103387
|
+
tracked: boolean;
|
|
103388
|
+
dryRun: boolean;
|
|
103389
|
+
reasons?: Array<"COMMAND_UNAVAILABLE" | "HELPER_UNAVAILABLE" | "OPERATION_UNAVAILABLE" | "TRACKED_MODE_UNAVAILABLE" | "DRY_RUN_UNAVAILABLE" | "NAMESPACE_UNAVAILABLE" | "STYLES_PART_MISSING" | "COLLABORATION_ACTIVE">;
|
|
103390
|
+
};
|
|
103357
103391
|
"blocks.list": {
|
|
103358
103392
|
available: boolean;
|
|
103359
103393
|
tracked: boolean;
|
|
@@ -110023,6 +110057,7 @@ export type DocTablesGetCellsResult = {
|
|
|
110023
110057
|
nodeId: string;
|
|
110024
110058
|
};
|
|
110025
110059
|
cells: Array<{
|
|
110060
|
+
firstParagraphNodeId?: string;
|
|
110026
110061
|
nodeId: string;
|
|
110027
110062
|
address: {
|
|
110028
110063
|
kind: "block";
|
|
@@ -121691,7 +121726,17 @@ export interface DocFormatRangeBoundParams {
|
|
|
121691
121726
|
};
|
|
121692
121727
|
ref?: string;
|
|
121693
121728
|
}
|
|
121729
|
+
export interface DocBlocksFindTextBoundParams {
|
|
121730
|
+
text: string;
|
|
121731
|
+
limit?: number;
|
|
121732
|
+
}
|
|
121694
121733
|
export interface DocBlocksListBoundParams {
|
|
121734
|
+
nodeIds?: string[];
|
|
121735
|
+
textSearch?: {
|
|
121736
|
+
terms: Array<string>;
|
|
121737
|
+
match?: "all" | "any";
|
|
121738
|
+
caseSensitive?: boolean;
|
|
121739
|
+
};
|
|
121695
121740
|
in?: ({
|
|
121696
121741
|
kind: "story";
|
|
121697
121742
|
storyType: "body";
|
|
@@ -148977,6 +149022,7 @@ export declare function createDocApi(runtime: RuntimeInvoker): {
|
|
|
148977
149022
|
delete: (params?: DocDeleteParams, options?: InvokeOptions) => Promise<DocDeleteResult>;
|
|
148978
149023
|
formatRange: (params: DocFormatRangeParams, options?: InvokeOptions) => Promise<DocFormatRangeResult>;
|
|
148979
149024
|
blocks: {
|
|
149025
|
+
findText: (params: DocBlocksFindTextParams, options?: InvokeOptions) => Promise<DocBlocksFindTextResult>;
|
|
148980
149026
|
list: (params?: DocBlocksListParams, options?: InvokeOptions) => Promise<DocBlocksListResult>;
|
|
148981
149027
|
delete: (params?: DocBlocksDeleteParams, options?: InvokeOptions) => Promise<DocBlocksDeleteResult>;
|
|
148982
149028
|
deleteRange: (params?: DocBlocksDeleteRangeParams, options?: InvokeOptions) => Promise<DocBlocksDeleteRangeResult>;
|
|
@@ -149535,6 +149581,7 @@ export declare function createBoundDocApi(runtime: RuntimeInvoker): {
|
|
|
149535
149581
|
delete: (params?: DocDeleteBoundParams, options?: InvokeOptions) => Promise<DocDeleteResult>;
|
|
149536
149582
|
formatRange: (params: DocFormatRangeBoundParams, options?: InvokeOptions) => Promise<DocFormatRangeResult>;
|
|
149537
149583
|
blocks: {
|
|
149584
|
+
findText: (params: DocBlocksFindTextBoundParams, options?: InvokeOptions) => Promise<DocBlocksFindTextResult>;
|
|
149538
149585
|
list: (params?: DocBlocksListBoundParams, options?: InvokeOptions) => Promise<DocBlocksListResult>;
|
|
149539
149586
|
delete: (params?: DocBlocksDeleteBoundParams, options?: InvokeOptions) => Promise<DocBlocksDeleteResult>;
|
|
149540
149587
|
deleteRange: (params?: DocBlocksDeleteRangeBoundParams, options?: InvokeOptions) => Promise<DocBlocksDeleteRangeResult>;
|
package/dist/generated/client.js
CHANGED
|
@@ -26,6 +26,7 @@ export function createDocApi(runtime) {
|
|
|
26
26
|
delete: (params = {}, options) => runtime.invoke(CONTRACT.operations["doc.delete"], params, options),
|
|
27
27
|
formatRange: (params, options) => runtime.invoke(CONTRACT.operations["doc.formatRange"], params, options),
|
|
28
28
|
blocks: {
|
|
29
|
+
findText: (params, options) => runtime.invoke(CONTRACT.operations["doc.blocks.findText"], params, options),
|
|
29
30
|
list: (params = {}, options) => runtime.invoke(CONTRACT.operations["doc.blocks.list"], params, options),
|
|
30
31
|
delete: (params = {}, options) => runtime.invoke(CONTRACT.operations["doc.blocks.delete"], params, options),
|
|
31
32
|
deleteRange: (params = {}, options) => runtime.invoke(CONTRACT.operations["doc.blocks.deleteRange"], params, options),
|
|
@@ -588,6 +589,7 @@ export function createBoundDocApi(runtime) {
|
|
|
588
589
|
delete: (params = {}, options) => runtime.invoke(CONTRACT.operations["doc.delete"], params, options),
|
|
589
590
|
formatRange: (params, options) => runtime.invoke(CONTRACT.operations["doc.formatRange"], params, options),
|
|
590
591
|
blocks: {
|
|
592
|
+
findText: (params, options) => runtime.invoke(CONTRACT.operations["doc.blocks.findText"], params, options),
|
|
591
593
|
list: (params = {}, options) => runtime.invoke(CONTRACT.operations["doc.blocks.list"], params, options),
|
|
592
594
|
delete: (params = {}, options) => runtime.invoke(CONTRACT.operations["doc.blocks.delete"], params, options),
|
|
593
595
|
deleteRange: (params = {}, options) => runtime.invoke(CONTRACT.operations["doc.blocks.deleteRange"], params, options),
|