@superdoc-dev/sdk 1.0.0-alpha.25 → 1.0.0-alpha.27
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/LICENSE +661 -0
- package/dist/generated/client.cjs +14 -2
- package/dist/generated/client.d.ts +118 -3
- package/dist/generated/client.d.ts.map +1 -1
- package/dist/generated/client.js +14 -2
- package/dist/generated/contract.cjs +2655 -160
- package/dist/generated/contract.d.ts +1694 -4
- package/dist/generated/contract.d.ts.map +1 -1
- package/dist/generated/contract.js +2655 -160
- package/dist/tools.cjs +11 -4
- package/dist/tools.d.ts.map +1 -1
- package/dist/tools.js +11 -4
- package/package.json +15 -17
- package/tools/catalog.json +2579 -752
- package/tools/tool-name-map.json +2 -0
- package/tools/tools-policy.json +1 -1
- package/tools/tools.anthropic.json +38 -0
- package/tools/tools.generic.json +1840 -22
- package/tools/tools.openai.json +44 -0
- package/tools/tools.vercel.json +44 -0
|
@@ -4,13 +4,25 @@ var contract = require('./contract.cjs');
|
|
|
4
4
|
|
|
5
5
|
/* eslint-disable */
|
|
6
6
|
// Auto-generated by packages/sdk/codegen/src/generate-node.mjs
|
|
7
|
+
/** Extract a string value from a CLI response envelope like `{ document, text: "..." }`. */
|
|
8
|
+
function unwrapStringEnvelope(value, key) {
|
|
9
|
+
if (typeof value === "string")
|
|
10
|
+
return value;
|
|
11
|
+
if (typeof value === "object" && value !== null) {
|
|
12
|
+
const extracted = value[key];
|
|
13
|
+
if (typeof extracted === "string")
|
|
14
|
+
return extracted;
|
|
15
|
+
}
|
|
16
|
+
return value;
|
|
17
|
+
}
|
|
7
18
|
function createDocApi(runtime) {
|
|
8
19
|
return {
|
|
9
20
|
find: (params = {}, options) => runtime.invoke(contract.CONTRACT.operations["doc.find"], params, options),
|
|
10
21
|
getNode: (params = {}, options) => runtime.invoke(contract.CONTRACT.operations["doc.getNode"], params, options),
|
|
11
22
|
getNodeById: (params, options) => runtime.invoke(contract.CONTRACT.operations["doc.getNodeById"], params, options),
|
|
12
|
-
getText: (params = {}, options) => runtime.invoke(contract.CONTRACT.operations["doc.getText"], params, options),
|
|
13
|
-
getMarkdown: (params = {}, options) => runtime.invoke(contract.CONTRACT.operations["doc.getMarkdown"], params, options),
|
|
23
|
+
getText: async (params = {}, options) => unwrapStringEnvelope(await runtime.invoke(contract.CONTRACT.operations["doc.getText"], params, options), "text"),
|
|
24
|
+
getMarkdown: async (params = {}, options) => unwrapStringEnvelope(await runtime.invoke(contract.CONTRACT.operations["doc.getMarkdown"], params, options), "markdown"),
|
|
25
|
+
getHtml: async (params = {}, options) => unwrapStringEnvelope(await runtime.invoke(contract.CONTRACT.operations["doc.getHtml"], params, options), "html"),
|
|
14
26
|
info: (params = {}, options) => runtime.invoke(contract.CONTRACT.operations["doc.info"], params, options),
|
|
15
27
|
insert: (params = {}, options) => runtime.invoke(contract.CONTRACT.operations["doc.insert"], params, options),
|
|
16
28
|
replace: (params = {}, options) => runtime.invoke(contract.CONTRACT.operations["doc.replace"], params, options),
|
|
@@ -53,6 +53,11 @@ export interface DocGetMarkdownParams {
|
|
|
53
53
|
doc?: string;
|
|
54
54
|
sessionId?: string;
|
|
55
55
|
}
|
|
56
|
+
export interface DocGetHtmlParams {
|
|
57
|
+
doc?: string;
|
|
58
|
+
sessionId?: string;
|
|
59
|
+
unflattenLists?: boolean;
|
|
60
|
+
}
|
|
56
61
|
export interface DocInfoParams {
|
|
57
62
|
doc?: string;
|
|
58
63
|
sessionId?: string;
|
|
@@ -2472,7 +2477,7 @@ export interface DocQueryMatchParams {
|
|
|
2472
2477
|
export interface DocMutationsPreviewParams {
|
|
2473
2478
|
doc?: string;
|
|
2474
2479
|
sessionId?: string;
|
|
2475
|
-
expectedRevision
|
|
2480
|
+
expectedRevision?: string;
|
|
2476
2481
|
atomic: true;
|
|
2477
2482
|
changeMode: string;
|
|
2478
2483
|
steps: unknown;
|
|
@@ -3577,6 +3582,7 @@ export type DocGetNodeByIdResult = {
|
|
|
3577
3582
|
};
|
|
3578
3583
|
export type DocGetTextResult = string;
|
|
3579
3584
|
export type DocGetMarkdownResult = string;
|
|
3585
|
+
export type DocGetHtmlResult = string;
|
|
3580
3586
|
export type DocInfoResult = {
|
|
3581
3587
|
capabilities: {
|
|
3582
3588
|
canComment: boolean;
|
|
@@ -3652,28 +3658,130 @@ export type DocFormatStylisticSetsResult = unknown;
|
|
|
3652
3658
|
export type DocFormatContextualAlternatesResult = unknown;
|
|
3653
3659
|
export type DocStylesApplyResult = {
|
|
3654
3660
|
after: {
|
|
3661
|
+
adjustRightInd?: "on" | "off" | "inherit";
|
|
3662
|
+
autoSpaceDE?: "on" | "off" | "inherit";
|
|
3663
|
+
autoSpaceDN?: "on" | "off" | "inherit";
|
|
3655
3664
|
bold?: "on" | "off" | "inherit";
|
|
3665
|
+
boldCs?: "on" | "off" | "inherit";
|
|
3666
|
+
borders?: Record<string, unknown> | "inherit";
|
|
3656
3667
|
color?: Record<string, unknown> | "inherit";
|
|
3668
|
+
contextualSpacing?: "on" | "off" | "inherit";
|
|
3669
|
+
dstrike?: "on" | "off" | "inherit";
|
|
3670
|
+
eastAsianLayout?: Record<string, unknown> | "inherit";
|
|
3671
|
+
effect?: string | "inherit";
|
|
3672
|
+
em?: string | "inherit";
|
|
3673
|
+
emboss?: "on" | "off" | "inherit";
|
|
3674
|
+
fitText?: Record<string, unknown> | "inherit";
|
|
3657
3675
|
fontFamily?: Record<string, unknown> | "inherit";
|
|
3658
3676
|
fontSize?: number | "inherit";
|
|
3659
3677
|
fontSizeCs?: number | "inherit";
|
|
3678
|
+
framePr?: Record<string, unknown> | "inherit";
|
|
3679
|
+
iCs?: "on" | "off" | "inherit";
|
|
3680
|
+
imprint?: "on" | "off" | "inherit";
|
|
3660
3681
|
indent?: Record<string, unknown> | "inherit";
|
|
3661
3682
|
italic?: "on" | "off" | "inherit";
|
|
3662
3683
|
justification?: string | "inherit";
|
|
3684
|
+
keepLines?: "on" | "off" | "inherit";
|
|
3685
|
+
keepNext?: "on" | "off" | "inherit";
|
|
3686
|
+
kern?: number | "inherit";
|
|
3687
|
+
kinsoku?: "on" | "off" | "inherit";
|
|
3688
|
+
lang?: Record<string, unknown> | "inherit";
|
|
3663
3689
|
letterSpacing?: number | "inherit";
|
|
3690
|
+
mirrorIndents?: "on" | "off" | "inherit";
|
|
3691
|
+
noProof?: "on" | "off" | "inherit";
|
|
3692
|
+
numberingProperties?: Record<string, unknown> | "inherit";
|
|
3693
|
+
outline?: "on" | "off" | "inherit";
|
|
3694
|
+
outlineLvl?: number | "inherit";
|
|
3695
|
+
overflowPunct?: "on" | "off" | "inherit";
|
|
3696
|
+
pageBreakBefore?: "on" | "off" | "inherit";
|
|
3697
|
+
position?: number | "inherit";
|
|
3698
|
+
rightToLeft?: "on" | "off" | "inherit";
|
|
3699
|
+
shading?: Record<string, unknown> | "inherit";
|
|
3700
|
+
shadow?: "on" | "off" | "inherit";
|
|
3701
|
+
smallCaps?: "on" | "off" | "inherit";
|
|
3702
|
+
snapToGrid?: "on" | "off" | "inherit";
|
|
3664
3703
|
spacing?: Record<string, unknown> | "inherit";
|
|
3704
|
+
specVanish?: "on" | "off" | "inherit";
|
|
3705
|
+
strike?: "on" | "off" | "inherit";
|
|
3706
|
+
suppressAutoHyphens?: "on" | "off" | "inherit";
|
|
3707
|
+
suppressLineNumbers?: "on" | "off" | "inherit";
|
|
3708
|
+
suppressOverlap?: "on" | "off" | "inherit";
|
|
3709
|
+
tabStops?: Array<unknown> | "inherit";
|
|
3710
|
+
textAlignment?: string | "inherit";
|
|
3711
|
+
textboxTightWrap?: string | "inherit";
|
|
3712
|
+
textDirection?: string | "inherit";
|
|
3713
|
+
textTransform?: string | "inherit";
|
|
3714
|
+
topLinePunct?: "on" | "off" | "inherit";
|
|
3715
|
+
underline?: Record<string, unknown> | "inherit";
|
|
3716
|
+
vanish?: "on" | "off" | "inherit";
|
|
3717
|
+
vertAlign?: string | "inherit";
|
|
3718
|
+
w?: number | "inherit";
|
|
3719
|
+
webHidden?: "on" | "off" | "inherit";
|
|
3720
|
+
widowControl?: "on" | "off" | "inherit";
|
|
3721
|
+
wordWrap?: "on" | "off" | "inherit";
|
|
3665
3722
|
};
|
|
3666
3723
|
before: {
|
|
3724
|
+
adjustRightInd?: "on" | "off" | "inherit";
|
|
3725
|
+
autoSpaceDE?: "on" | "off" | "inherit";
|
|
3726
|
+
autoSpaceDN?: "on" | "off" | "inherit";
|
|
3667
3727
|
bold?: "on" | "off" | "inherit";
|
|
3728
|
+
boldCs?: "on" | "off" | "inherit";
|
|
3729
|
+
borders?: Record<string, unknown> | "inherit";
|
|
3668
3730
|
color?: Record<string, unknown> | "inherit";
|
|
3731
|
+
contextualSpacing?: "on" | "off" | "inherit";
|
|
3732
|
+
dstrike?: "on" | "off" | "inherit";
|
|
3733
|
+
eastAsianLayout?: Record<string, unknown> | "inherit";
|
|
3734
|
+
effect?: string | "inherit";
|
|
3735
|
+
em?: string | "inherit";
|
|
3736
|
+
emboss?: "on" | "off" | "inherit";
|
|
3737
|
+
fitText?: Record<string, unknown> | "inherit";
|
|
3669
3738
|
fontFamily?: Record<string, unknown> | "inherit";
|
|
3670
3739
|
fontSize?: number | "inherit";
|
|
3671
3740
|
fontSizeCs?: number | "inherit";
|
|
3741
|
+
framePr?: Record<string, unknown> | "inherit";
|
|
3742
|
+
iCs?: "on" | "off" | "inherit";
|
|
3743
|
+
imprint?: "on" | "off" | "inherit";
|
|
3672
3744
|
indent?: Record<string, unknown> | "inherit";
|
|
3673
3745
|
italic?: "on" | "off" | "inherit";
|
|
3674
3746
|
justification?: string | "inherit";
|
|
3747
|
+
keepLines?: "on" | "off" | "inherit";
|
|
3748
|
+
keepNext?: "on" | "off" | "inherit";
|
|
3749
|
+
kern?: number | "inherit";
|
|
3750
|
+
kinsoku?: "on" | "off" | "inherit";
|
|
3751
|
+
lang?: Record<string, unknown> | "inherit";
|
|
3675
3752
|
letterSpacing?: number | "inherit";
|
|
3753
|
+
mirrorIndents?: "on" | "off" | "inherit";
|
|
3754
|
+
noProof?: "on" | "off" | "inherit";
|
|
3755
|
+
numberingProperties?: Record<string, unknown> | "inherit";
|
|
3756
|
+
outline?: "on" | "off" | "inherit";
|
|
3757
|
+
outlineLvl?: number | "inherit";
|
|
3758
|
+
overflowPunct?: "on" | "off" | "inherit";
|
|
3759
|
+
pageBreakBefore?: "on" | "off" | "inherit";
|
|
3760
|
+
position?: number | "inherit";
|
|
3761
|
+
rightToLeft?: "on" | "off" | "inherit";
|
|
3762
|
+
shading?: Record<string, unknown> | "inherit";
|
|
3763
|
+
shadow?: "on" | "off" | "inherit";
|
|
3764
|
+
smallCaps?: "on" | "off" | "inherit";
|
|
3765
|
+
snapToGrid?: "on" | "off" | "inherit";
|
|
3676
3766
|
spacing?: Record<string, unknown> | "inherit";
|
|
3767
|
+
specVanish?: "on" | "off" | "inherit";
|
|
3768
|
+
strike?: "on" | "off" | "inherit";
|
|
3769
|
+
suppressAutoHyphens?: "on" | "off" | "inherit";
|
|
3770
|
+
suppressLineNumbers?: "on" | "off" | "inherit";
|
|
3771
|
+
suppressOverlap?: "on" | "off" | "inherit";
|
|
3772
|
+
tabStops?: Array<unknown> | "inherit";
|
|
3773
|
+
textAlignment?: string | "inherit";
|
|
3774
|
+
textboxTightWrap?: string | "inherit";
|
|
3775
|
+
textDirection?: string | "inherit";
|
|
3776
|
+
textTransform?: string | "inherit";
|
|
3777
|
+
topLinePunct?: "on" | "off" | "inherit";
|
|
3778
|
+
underline?: Record<string, unknown> | "inherit";
|
|
3779
|
+
vanish?: "on" | "off" | "inherit";
|
|
3780
|
+
vertAlign?: string | "inherit";
|
|
3781
|
+
w?: number | "inherit";
|
|
3782
|
+
webHidden?: "on" | "off" | "inherit";
|
|
3783
|
+
widowControl?: "on" | "off" | "inherit";
|
|
3784
|
+
wordWrap?: "on" | "off" | "inherit";
|
|
3677
3785
|
};
|
|
3678
3786
|
changed: boolean;
|
|
3679
3787
|
dryRun: boolean;
|
|
@@ -4956,6 +5064,12 @@ export type DocCapabilitiesGetResult = {
|
|
|
4956
5064
|
reasons?: Array<"COMMAND_UNAVAILABLE" | "HELPER_UNAVAILABLE" | "OPERATION_UNAVAILABLE" | "TRACKED_MODE_UNAVAILABLE" | "DRY_RUN_UNAVAILABLE" | "NAMESPACE_UNAVAILABLE" | "STYLES_PART_MISSING" | "COLLABORATION_ACTIVE">;
|
|
4957
5065
|
tracked: boolean;
|
|
4958
5066
|
};
|
|
5067
|
+
getHtml: {
|
|
5068
|
+
available: boolean;
|
|
5069
|
+
dryRun: boolean;
|
|
5070
|
+
reasons?: Array<"COMMAND_UNAVAILABLE" | "HELPER_UNAVAILABLE" | "OPERATION_UNAVAILABLE" | "TRACKED_MODE_UNAVAILABLE" | "DRY_RUN_UNAVAILABLE" | "NAMESPACE_UNAVAILABLE" | "STYLES_PART_MISSING" | "COLLABORATION_ACTIVE">;
|
|
5071
|
+
tracked: boolean;
|
|
5072
|
+
};
|
|
4959
5073
|
getMarkdown: {
|
|
4960
5074
|
available: boolean;
|
|
4961
5075
|
dryRun: boolean;
|
|
@@ -6103,8 +6217,9 @@ export declare function createDocApi(runtime: SuperDocRuntime): {
|
|
|
6103
6217
|
find: (params?: DocFindParams, options?: InvokeOptions) => Promise<DocFindResult>;
|
|
6104
6218
|
getNode: (params?: DocGetNodeParams, options?: InvokeOptions) => Promise<DocGetNodeResult>;
|
|
6105
6219
|
getNodeById: (params: DocGetNodeByIdParams, options?: InvokeOptions) => Promise<DocGetNodeByIdResult>;
|
|
6106
|
-
getText: (params?: DocGetTextParams, options?: InvokeOptions) => Promise<
|
|
6107
|
-
getMarkdown: (params?: DocGetMarkdownParams, options?: InvokeOptions) => Promise<
|
|
6220
|
+
getText: (params?: DocGetTextParams, options?: InvokeOptions) => Promise<DocGetTextResult>;
|
|
6221
|
+
getMarkdown: (params?: DocGetMarkdownParams, options?: InvokeOptions) => Promise<DocGetMarkdownResult>;
|
|
6222
|
+
getHtml: (params?: DocGetHtmlParams, options?: InvokeOptions) => Promise<DocGetHtmlResult>;
|
|
6108
6223
|
info: (params?: DocInfoParams, options?: InvokeOptions) => Promise<DocInfoResult>;
|
|
6109
6224
|
insert: (params?: DocInsertParams, options?: InvokeOptions) => Promise<unknown>;
|
|
6110
6225
|
replace: (params?: DocReplaceParams, options?: InvokeOptions) => Promise<unknown>;
|