@superdoc/sdk 2.20.1-next.9 → 2.21.0-next.10
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/action-primitives/tools/list-transform.cjs +21 -1
- package/dist/action-primitives/tools/list-transform.d.ts +4 -3
- package/dist/action-primitives/tools/list-transform.js +21 -1
- package/dist/agent/action-descriptors.json +308 -0
- package/dist/agent/actions.cjs +20 -440
- package/dist/agent/actions.d.ts +13 -297
- package/dist/agent/actions.js +20 -440
- package/dist/embedded-tools.generated.cjs +5 -5
- package/dist/embedded-tools.generated.js +5 -5
- package/dist/generated/action-names.d.ts +1 -0
- package/dist/generated/action-names.js +1 -0
- package/dist/generated/client.cjs +2 -0
- package/dist/generated/client.d.ts +2282 -1023
- package/dist/generated/client.js +2 -0
- package/dist/generated/contract.cjs +1 -1
- package/dist/generated/contract.d.ts +24 -0
- package/dist/generated/contract.js +1 -1
- package/dist/runtime/document-rpc.cjs +10 -13
- package/dist/runtime/document-rpc.d.ts +5 -5
- package/dist/runtime/document-rpc.js +10 -13
- package/dist/runtime/host.cjs +7 -9
- package/dist/runtime/host.d.ts +1 -1
- package/dist/runtime/host.js +8 -10
- package/dist/runtime/sdk-policy.cjs +10 -0
- package/dist/runtime/sdk-policy.d.ts +22 -0
- package/dist/runtime/sdk-policy.js +5 -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/dist/runtime/transport-common.cjs +2 -8
- package/dist/runtime/transport-common.d.ts +2 -1
- package/dist/runtime/transport-common.js +2 -8
- package/package.json +7 -7
- package/tools/catalog.json +848 -243
- package/tools/generation-receipt.json +195 -0
- package/tools/tools-policy.json +1 -1
- package/tools/tools.anthropic.json +822 -243
- package/tools/tools.generic.json +822 -243
- package/tools/tools.openai.json +822 -243
- package/tools/tools.vercel.json +822 -243
|
@@ -2,21 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
var node_crypto = require('node:crypto');
|
|
4
4
|
var errors = require('./errors.cjs');
|
|
5
|
+
var sdkPolicy = require('./sdk-policy.cjs');
|
|
5
6
|
var transportCommon = require('./transport-common.cjs');
|
|
6
7
|
|
|
7
|
-
const DOCUMENT_RPC_FEATURES =
|
|
8
|
-
const DOCUMENT_RPC_REPLACE_FILE_FEATURE =
|
|
9
|
-
const DOCUMENT_RPC_DEFAULT_CHANGE_MODE_FEATURE =
|
|
10
|
-
const DOCUMENT_RPC_SOURCE_SAVE_FEATURE =
|
|
11
|
-
const DOCUMENT_RPC_REQUEST_TIMEOUT_FEATURE =
|
|
12
|
-
const DOCUMENT_RPC_OPEN_FIELDS = new Set(
|
|
13
|
-
const DOCUMENT_RPC_SAVE_FIELDS = new Set(
|
|
14
|
-
const DOCUMENT_API_OPTION_FIELDS = new Set(
|
|
15
|
-
const DOCUMENT_API_REVISION_PREFLIGHT_OPERATIONS = new Set(
|
|
16
|
-
'doc.history.redo',
|
|
17
|
-
'doc.history.undo',
|
|
18
|
-
'doc.plan.execute',
|
|
19
|
-
]);
|
|
8
|
+
const DOCUMENT_RPC_FEATURES = sdkPolicy.SDK_POLICY.documentRpcFeatures;
|
|
9
|
+
const DOCUMENT_RPC_REPLACE_FILE_FEATURE = sdkPolicy.SDK_POLICY.features.replaceFile;
|
|
10
|
+
const DOCUMENT_RPC_DEFAULT_CHANGE_MODE_FEATURE = sdkPolicy.SDK_POLICY.features.defaultChangeMode;
|
|
11
|
+
const DOCUMENT_RPC_SOURCE_SAVE_FEATURE = sdkPolicy.SDK_POLICY.features.sourceSave;
|
|
12
|
+
const DOCUMENT_RPC_REQUEST_TIMEOUT_FEATURE = sdkPolicy.SDK_POLICY.features.requestTimeout;
|
|
13
|
+
const DOCUMENT_RPC_OPEN_FIELDS = new Set(sdkPolicy.SDK_POLICY.documentOpenFields);
|
|
14
|
+
const DOCUMENT_RPC_SAVE_FIELDS = new Set(sdkPolicy.SDK_POLICY.documentSaveFields);
|
|
15
|
+
const DOCUMENT_API_OPTION_FIELDS = new Set(sdkPolicy.SDK_POLICY.documentOptionFields);
|
|
16
|
+
const DOCUMENT_API_REVISION_PREFLIGHT_OPERATIONS = new Set(sdkPolicy.SDK_POLICY.revisionPreflightOperations);
|
|
20
17
|
function unsupported(message, operationId) {
|
|
21
18
|
return new errors.SuperDocCliError(message, {
|
|
22
19
|
code: 'DOCUMENT_RPC_INPUT_UNSUPPORTED',
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { type ChangeMode, type InvokeOptions, type OperationSpec, type UserIdentity } from './transport-common.js';
|
|
2
|
-
export declare const DOCUMENT_RPC_FEATURES: readonly [
|
|
3
|
-
export declare const DOCUMENT_RPC_REPLACE_FILE_FEATURE
|
|
4
|
-
export declare const DOCUMENT_RPC_DEFAULT_CHANGE_MODE_FEATURE
|
|
5
|
-
export declare const DOCUMENT_RPC_SOURCE_SAVE_FEATURE
|
|
6
|
-
export declare const DOCUMENT_RPC_REQUEST_TIMEOUT_FEATURE
|
|
2
|
+
export declare const DOCUMENT_RPC_FEATURES: readonly string[];
|
|
3
|
+
export declare const DOCUMENT_RPC_REPLACE_FILE_FEATURE: string;
|
|
4
|
+
export declare const DOCUMENT_RPC_DEFAULT_CHANGE_MODE_FEATURE: string;
|
|
5
|
+
export declare const DOCUMENT_RPC_SOURCE_SAVE_FEATURE: string;
|
|
6
|
+
export declare const DOCUMENT_RPC_REQUEST_TIMEOUT_FEATURE: string;
|
|
7
7
|
type DocumentRpcRequest = {
|
|
8
8
|
readonly method: string;
|
|
9
9
|
readonly params: Record<string, unknown>;
|
|
@@ -1,19 +1,16 @@
|
|
|
1
1
|
import { randomUUID } from 'node:crypto';
|
|
2
2
|
import { SuperDocCliError } from './errors.js';
|
|
3
|
+
import { SDK_POLICY } from './sdk-policy.js';
|
|
3
4
|
import { applyOperationParamAliases, } from './transport-common.js';
|
|
4
|
-
export const DOCUMENT_RPC_FEATURES =
|
|
5
|
-
export const DOCUMENT_RPC_REPLACE_FILE_FEATURE =
|
|
6
|
-
export const DOCUMENT_RPC_DEFAULT_CHANGE_MODE_FEATURE =
|
|
7
|
-
export const DOCUMENT_RPC_SOURCE_SAVE_FEATURE =
|
|
8
|
-
export const DOCUMENT_RPC_REQUEST_TIMEOUT_FEATURE =
|
|
9
|
-
const DOCUMENT_RPC_OPEN_FIELDS = new Set(
|
|
10
|
-
const DOCUMENT_RPC_SAVE_FIELDS = new Set(
|
|
11
|
-
const DOCUMENT_API_OPTION_FIELDS = new Set(
|
|
12
|
-
const DOCUMENT_API_REVISION_PREFLIGHT_OPERATIONS = new Set(
|
|
13
|
-
'doc.history.redo',
|
|
14
|
-
'doc.history.undo',
|
|
15
|
-
'doc.plan.execute',
|
|
16
|
-
]);
|
|
5
|
+
export const DOCUMENT_RPC_FEATURES = SDK_POLICY.documentRpcFeatures;
|
|
6
|
+
export const DOCUMENT_RPC_REPLACE_FILE_FEATURE = SDK_POLICY.features.replaceFile;
|
|
7
|
+
export const DOCUMENT_RPC_DEFAULT_CHANGE_MODE_FEATURE = SDK_POLICY.features.defaultChangeMode;
|
|
8
|
+
export const DOCUMENT_RPC_SOURCE_SAVE_FEATURE = SDK_POLICY.features.sourceSave;
|
|
9
|
+
export const DOCUMENT_RPC_REQUEST_TIMEOUT_FEATURE = SDK_POLICY.features.requestTimeout;
|
|
10
|
+
const DOCUMENT_RPC_OPEN_FIELDS = new Set(SDK_POLICY.documentOpenFields);
|
|
11
|
+
const DOCUMENT_RPC_SAVE_FIELDS = new Set(SDK_POLICY.documentSaveFields);
|
|
12
|
+
const DOCUMENT_API_OPTION_FIELDS = new Set(SDK_POLICY.documentOptionFields);
|
|
13
|
+
const DOCUMENT_API_REVISION_PREFLIGHT_OPERATIONS = new Set(SDK_POLICY.revisionPreflightOperations);
|
|
17
14
|
function unsupported(message, operationId) {
|
|
18
15
|
return new SuperDocCliError(message, {
|
|
19
16
|
code: 'DOCUMENT_RPC_INPUT_UNSUPPORTED',
|
package/dist/runtime/host.cjs
CHANGED
|
@@ -6,26 +6,24 @@ var errors = require('./errors.cjs');
|
|
|
6
6
|
var stateDirectory = require('./state-directory.cjs');
|
|
7
7
|
var documentEvidence = require('./document-evidence.cjs');
|
|
8
8
|
var contract = require('../generated/contract.cjs');
|
|
9
|
+
var sdkPolicy = require('./sdk-policy.cjs');
|
|
9
10
|
var documentRpc = require('./document-rpc.cjs');
|
|
10
11
|
|
|
11
|
-
const HOST_PROTOCOL_VERSION =
|
|
12
|
-
const CLI_HOST_REQUIRED_FEATURES =
|
|
13
|
-
const COLLABORATION_AUTH_PER_OPEN_FEATURE =
|
|
14
|
-
const DOCUMENT_HOST_REQUIRED_FEATURES =
|
|
12
|
+
const HOST_PROTOCOL_VERSION = sdkPolicy.SDK_POLICY.protocolVersion;
|
|
13
|
+
const CLI_HOST_REQUIRED_FEATURES = sdkPolicy.SDK_POLICY.cliRequiredFeatures;
|
|
14
|
+
const COLLABORATION_AUTH_PER_OPEN_FEATURE = sdkPolicy.SDK_POLICY.features.collaborationAuthPerOpen;
|
|
15
|
+
const DOCUMENT_HOST_REQUIRED_FEATURES = sdkPolicy.SDK_POLICY.documentRequiredFeatures;
|
|
15
16
|
const CHANGE_MODES = ['direct', 'tracked'];
|
|
16
17
|
const FORWARD_HOST_STDERR = typeof process !== 'undefined' && typeof process.env?.SUPERDOC_DEBUG_TEXT_REWRITE === 'string'
|
|
17
18
|
? process.env.SUPERDOC_DEBUG_TEXT_REWRITE === '1'
|
|
18
19
|
: false;
|
|
19
20
|
const JSON_RPC_TIMEOUT_CODE = -32011;
|
|
20
|
-
|
|
21
|
-
// by hand; an explicit constant here avoids importing CLI app internals across
|
|
22
|
-
// the package boundary.
|
|
23
|
-
const HOST_DEFAULT_REQUEST_TIMEOUT_MS = 30_000;
|
|
21
|
+
const HOST_DEFAULT_REQUEST_TIMEOUT_MS = sdkPolicy.SDK_POLICY.hostDefaultRequestTimeoutMs;
|
|
24
22
|
// Extra time the JS-side watchdog waits beyond the host-side ceiling so the
|
|
25
23
|
// host's structured RequestTimeout error wins the race against the SDK's own
|
|
26
24
|
// abort. The buffer absorbs JSON-RPC serialization, stdio drain, and event-
|
|
27
25
|
// loop latency.
|
|
28
|
-
const WATCHDOG_HEADROOM_MS =
|
|
26
|
+
const WATCHDOG_HEADROOM_MS = sdkPolicy.SDK_POLICY.watchdogHeadroomMs;
|
|
29
27
|
function mapCliInvocationResult(operation, value) {
|
|
30
28
|
const envelopeKey = operation.responseEnvelopeKey;
|
|
31
29
|
if (envelopeKey === null || envelopeKey === undefined)
|
package/dist/runtime/host.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type OperationSpec, type SuperDocClientOptions, type TransportInvokeOptions } from './transport-common.js';
|
|
2
|
-
export declare const COLLABORATION_AUTH_PER_OPEN_FEATURE
|
|
2
|
+
export declare const COLLABORATION_AUTH_PER_OPEN_FEATURE: string;
|
|
3
3
|
export declare function mapCliInvocationResult(operation: OperationSpec, value: unknown): unknown;
|
|
4
4
|
/**
|
|
5
5
|
* Builds the argv passed to `spawn` for `superdoc host --stdio`. Propagates
|
package/dist/runtime/host.js
CHANGED
|
@@ -4,25 +4,23 @@ import { SuperDocCliError } from './errors.js';
|
|
|
4
4
|
import { SdkStateDirectory } from './state-directory.js';
|
|
5
5
|
import { registerMutationRevision } from './document-evidence.js';
|
|
6
6
|
import { CONTRACT } from '../generated/contract.js';
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
const
|
|
7
|
+
import { SDK_POLICY } from './sdk-policy.js';
|
|
8
|
+
import { DOCUMENT_RPC_DEFAULT_CHANGE_MODE_FEATURE, DOCUMENT_RPC_REQUEST_TIMEOUT_FEATURE, DOCUMENT_RPC_REPLACE_FILE_FEATURE, DOCUMENT_RPC_SOURCE_SAVE_FEATURE, buildDocumentInvokeParams, buildDocumentOpenParams, canOpenWithDocumentRpc, documentRpcRequestSupportsResponseTimeout, documentRpcEnabled, mapDocumentLifecycleResult, mapDocumentOpenResult, mapDocumentReplaceFileResult, supportsDocumentRpc, } from './document-rpc.js';
|
|
9
|
+
const HOST_PROTOCOL_VERSION = SDK_POLICY.protocolVersion;
|
|
10
|
+
const CLI_HOST_REQUIRED_FEATURES = SDK_POLICY.cliRequiredFeatures;
|
|
11
|
+
export const COLLABORATION_AUTH_PER_OPEN_FEATURE = SDK_POLICY.features.collaborationAuthPerOpen;
|
|
12
|
+
const DOCUMENT_HOST_REQUIRED_FEATURES = SDK_POLICY.documentRequiredFeatures;
|
|
12
13
|
const CHANGE_MODES = ['direct', 'tracked'];
|
|
13
14
|
const FORWARD_HOST_STDERR = typeof process !== 'undefined' && typeof process.env?.SUPERDOC_DEBUG_TEXT_REWRITE === 'string'
|
|
14
15
|
? process.env.SUPERDOC_DEBUG_TEXT_REWRITE === '1'
|
|
15
16
|
: false;
|
|
16
17
|
const JSON_RPC_TIMEOUT_CODE = -32011;
|
|
17
|
-
|
|
18
|
-
// by hand; an explicit constant here avoids importing CLI app internals across
|
|
19
|
-
// the package boundary.
|
|
20
|
-
const HOST_DEFAULT_REQUEST_TIMEOUT_MS = 30_000;
|
|
18
|
+
const HOST_DEFAULT_REQUEST_TIMEOUT_MS = SDK_POLICY.hostDefaultRequestTimeoutMs;
|
|
21
19
|
// Extra time the JS-side watchdog waits beyond the host-side ceiling so the
|
|
22
20
|
// host's structured RequestTimeout error wins the race against the SDK's own
|
|
23
21
|
// abort. The buffer absorbs JSON-RPC serialization, stdio drain, and event-
|
|
24
22
|
// loop latency.
|
|
25
|
-
const WATCHDOG_HEADROOM_MS =
|
|
23
|
+
const WATCHDOG_HEADROOM_MS = SDK_POLICY.watchdogHeadroomMs;
|
|
26
24
|
export function mapCliInvocationResult(operation, value) {
|
|
27
25
|
const envelopeKey = operation.responseEnvelopeKey;
|
|
28
26
|
if (envelopeKey === null || envelopeKey === undefined)
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var contract = require('../generated/contract.cjs');
|
|
4
|
+
|
|
5
|
+
if (!contract.CONTRACT.sdkPolicy) {
|
|
6
|
+
throw new Error('Generated SDK contract is missing sdkPolicy. Run generate:all before building or using SDK source.');
|
|
7
|
+
}
|
|
8
|
+
const SDK_POLICY = contract.CONTRACT.sdkPolicy;
|
|
9
|
+
|
|
10
|
+
exports.SDK_POLICY = SDK_POLICY;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export declare const SDK_POLICY: {
|
|
2
|
+
protocolVersion: string;
|
|
3
|
+
cliRequiredFeatures: readonly string[];
|
|
4
|
+
documentRequiredFeatures: readonly string[];
|
|
5
|
+
documentRpcFeatures: readonly string[];
|
|
6
|
+
features: {
|
|
7
|
+
replaceFile: string;
|
|
8
|
+
defaultChangeMode: string;
|
|
9
|
+
sourceSave: string;
|
|
10
|
+
requestTimeout: string;
|
|
11
|
+
collaborationAuthPerOpen: string;
|
|
12
|
+
documentAuthor: string;
|
|
13
|
+
};
|
|
14
|
+
documentOpenFields: readonly string[];
|
|
15
|
+
documentSaveFields: readonly string[];
|
|
16
|
+
documentOptionFields: readonly string[];
|
|
17
|
+
revisionPreflightOperations: readonly string[];
|
|
18
|
+
operationParamAliases: Record<string, Readonly<Record<string, readonly string[]>>>;
|
|
19
|
+
notifications: readonly string[];
|
|
20
|
+
hostDefaultRequestTimeoutMs: number;
|
|
21
|
+
watchdogHeadroomMs: number;
|
|
22
|
+
};
|
|
@@ -3,6 +3,6 @@
|
|
|
3
3
|
// AUTO-GENERATED by scripts/embed-version.mjs — DO NOT EDIT.
|
|
4
4
|
// Source of truth: package.json. Regenerated on every SDK build so the
|
|
5
5
|
// SDK retains its own version identity when bundled into another package.
|
|
6
|
-
const SDK_VERSION = '2.
|
|
6
|
+
const SDK_VERSION = '2.21.0-next.10';
|
|
7
7
|
|
|
8
8
|
exports.SDK_VERSION = SDK_VERSION;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "2.
|
|
1
|
+
export declare const SDK_VERSION = "2.21.0-next.10";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// AUTO-GENERATED by scripts/embed-version.mjs — DO NOT EDIT.
|
|
2
2
|
// Source of truth: package.json. Regenerated on every SDK build so the
|
|
3
3
|
// SDK retains its own version identity when bundled into another package.
|
|
4
|
-
export const SDK_VERSION = '2.
|
|
4
|
+
export const SDK_VERSION = '2.21.0-next.10';
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var node_util = require('node:util');
|
|
4
4
|
var errors = require('./errors.cjs');
|
|
5
|
+
var sdkPolicy = require('./sdk-policy.cjs');
|
|
5
6
|
|
|
6
7
|
function buildStructuredReadInput(operation, params, options, encodedArgv) {
|
|
7
8
|
if (!['doc.info', 'doc.blocks.list', 'doc.query.match'].includes(operation.operationId))
|
|
@@ -141,14 +142,7 @@ function resolveInvocation(cliBin) {
|
|
|
141
142
|
* generated contract so a renamed param cannot silently lose its documented
|
|
142
143
|
* name.
|
|
143
144
|
*/
|
|
144
|
-
const OPERATION_PARAM_ALIASES =
|
|
145
|
-
// tables.split renamed atRowIndex → rowIndex (SD-2132); keep the legacy name.
|
|
146
|
-
'doc.tables.split': { rowIndex: ['atRowIndex'] },
|
|
147
|
-
// comments.create exposes the contract `parentCommentId` as the `parentId`
|
|
148
|
-
// flag param (operation-params PARAM_FLAG_OVERRIDES). Accept both so public
|
|
149
|
-
// SDK/CLI callers using the documented `parentCommentId` reach `--parent-id`.
|
|
150
|
-
'doc.comments.create': { parentId: ['parentCommentId'] },
|
|
151
|
-
};
|
|
145
|
+
const OPERATION_PARAM_ALIASES = sdkPolicy.SDK_POLICY.operationParamAliases;
|
|
152
146
|
const TEMPLATES_APPLY_INPUT_FIELDS = ['source', 'bodyPolicy'];
|
|
153
147
|
function assertKnownTemplatesApplyParams(operation, params) {
|
|
154
148
|
if (operation.operationId !== 'doc.templates.apply')
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { DocOpenParams } from '../generated/client.js';
|
|
1
2
|
export type ParamType = 'string' | 'number' | 'boolean' | 'json' | 'string[]';
|
|
2
3
|
export type ParamKind = 'doc' | 'flag' | 'jsonFlag';
|
|
3
4
|
export interface OperationParamSpec {
|
|
@@ -39,7 +40,7 @@ export interface RuntimeInvoker {
|
|
|
39
40
|
invoke<TData = unknown>(operation: OperationSpec, params?: Record<string, unknown>, options?: InvokeOptions): Promise<TData>;
|
|
40
41
|
}
|
|
41
42
|
export type ChangeMode = 'direct' | 'tracked';
|
|
42
|
-
export type DocumentRuntimeKind = '
|
|
43
|
+
export type DocumentRuntimeKind = NonNullable<DocOpenParams['runtime']>;
|
|
43
44
|
export interface UserIdentity {
|
|
44
45
|
name: string;
|
|
45
46
|
email?: string;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { types as utilTypes } from 'node:util';
|
|
2
2
|
import { SuperDocCliError } from './errors.js';
|
|
3
|
+
import { SDK_POLICY } from './sdk-policy.js';
|
|
3
4
|
export function buildStructuredReadInput(operation, params, options, encodedArgv) {
|
|
4
5
|
if (!['doc.info', 'doc.blocks.list', 'doc.query.match'].includes(operation.operationId))
|
|
5
6
|
return undefined;
|
|
@@ -138,14 +139,7 @@ export function resolveInvocation(cliBin) {
|
|
|
138
139
|
* generated contract so a renamed param cannot silently lose its documented
|
|
139
140
|
* name.
|
|
140
141
|
*/
|
|
141
|
-
const OPERATION_PARAM_ALIASES =
|
|
142
|
-
// tables.split renamed atRowIndex → rowIndex (SD-2132); keep the legacy name.
|
|
143
|
-
'doc.tables.split': { rowIndex: ['atRowIndex'] },
|
|
144
|
-
// comments.create exposes the contract `parentCommentId` as the `parentId`
|
|
145
|
-
// flag param (operation-params PARAM_FLAG_OVERRIDES). Accept both so public
|
|
146
|
-
// SDK/CLI callers using the documented `parentCommentId` reach `--parent-id`.
|
|
147
|
-
'doc.comments.create': { parentId: ['parentCommentId'] },
|
|
148
|
-
};
|
|
142
|
+
const OPERATION_PARAM_ALIASES = SDK_POLICY.operationParamAliases;
|
|
149
143
|
const TEMPLATES_APPLY_INPUT_FIELDS = ['source', 'bodyPolicy'];
|
|
150
144
|
function assertKnownTemplatesApplyParams(operation, params) {
|
|
151
145
|
if (operation.operationId !== 'doc.templates.apply')
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@superdoc/sdk",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.21.0-next.10",
|
|
4
4
|
"description": "Node SDK for SuperDoc, wrapping the SuperDoc CLI to read and edit .docx files from JavaScript and TypeScript.",
|
|
5
5
|
"private": false,
|
|
6
6
|
"license": "AGPL-3.0",
|
|
@@ -38,11 +38,11 @@
|
|
|
38
38
|
"typescript": "^5.9.2"
|
|
39
39
|
},
|
|
40
40
|
"optionalDependencies": {
|
|
41
|
-
"@superdoc/sdk-darwin-arm64": "2.
|
|
42
|
-
"@superdoc/sdk-darwin-x64": "2.
|
|
43
|
-
"@superdoc/sdk-linux-x64": "2.
|
|
44
|
-
"@superdoc/sdk-linux-arm64": "2.
|
|
45
|
-
"@superdoc/sdk-windows-x64": "2.
|
|
41
|
+
"@superdoc/sdk-darwin-arm64": "2.21.0-next.10",
|
|
42
|
+
"@superdoc/sdk-darwin-x64": "2.21.0-next.10",
|
|
43
|
+
"@superdoc/sdk-linux-x64": "2.21.0-next.10",
|
|
44
|
+
"@superdoc/sdk-linux-arm64": "2.21.0-next.10",
|
|
45
|
+
"@superdoc/sdk-windows-x64": "2.21.0-next.10"
|
|
46
46
|
},
|
|
47
47
|
"publishConfig": {
|
|
48
48
|
"access": "public"
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"build": "rm -rf dist && node scripts/embed-version.mjs && node scripts/embed-prompts.mjs && node scripts/embed-tools.mjs && tsc && pnpm run typecheck:consumer && rollup -c rollup.cjs.config.mjs && rm -rf dist/prompts && mkdir -p dist/prompts && cp src/prompts/*.md dist/prompts/ && pnpm run audit:publish",
|
|
52
52
|
"audit:publish": "node ../../../../scripts/audit-publish-artifact.mjs dist --label sdk-node-dist",
|
|
53
53
|
"typecheck": "tsc --noEmit",
|
|
54
|
-
"typecheck:consumer": "tsc --noEmit --strict --skipLibCheck --target ES2022 --module NodeNext --moduleResolution NodeNext ../../../../tests/consumer-typecheck/src/sdk-per-open-collaboration-auth.mts ../../../../tests/consumer-typecheck/src/sdk-replace-file.mts ../../../../tests/consumer-typecheck/src/sdk-state-directory.mts ../../../../tests/consumer-typecheck/src/sdk-agent-evidence.mts ../../../../tests/consumer-typecheck/src/sdk-custom-actions.mts ../../../../tests/consumer-typecheck/src/sd4807-sdk-inspect.mts ../../../../tests/consumer-typecheck/src/sdk-tracked-only-policy.mts ../../../../tests/consumer-typecheck/src/sdk-tracked-review-route.mts ../../../../tests/consumer-typecheck/src/sd5266-sdk-placeholder-null.mts",
|
|
54
|
+
"typecheck:consumer": "tsc --noEmit --strict --skipLibCheck --target ES2022 --module NodeNext --moduleResolution NodeNext ../../../../tests/consumer-typecheck/src/sdk-per-open-collaboration-auth.mts ../../../../tests/consumer-typecheck/src/sdk-replace-file.mts ../../../../tests/consumer-typecheck/src/sdk-retained-paragraph.mts ../../../../tests/consumer-typecheck/src/sdk-state-directory.mts ../../../../tests/consumer-typecheck/src/sdk-agent-evidence.mts ../../../../tests/consumer-typecheck/src/sdk-custom-actions.mts ../../../../tests/consumer-typecheck/src/sd4807-sdk-inspect.mts ../../../../tests/consumer-typecheck/src/sdk-tracked-only-policy.mts ../../../../tests/consumer-typecheck/src/sdk-tracked-review-route.mts ../../../../tests/consumer-typecheck/src/sd5266-sdk-placeholder-null.mts ../../../../tests/consumer-typecheck/src/sdk-schema-types.mts",
|
|
55
55
|
"test:agent-actions": "bun test src/__tests__/actions.test.ts src/__tests__/agent-runtime.test.ts src/__tests__/custom-actions.test.ts src/__tests__/textbox-snapshot.test.ts",
|
|
56
56
|
"test:document-host": "bun test src/__tests__/diff-direct-styles.e2e.test.ts src/__tests__/default-cli-optimization.e2e.test.ts src/runtime/__tests__/host-spawn-args.test.ts src/runtime/__tests__/document-rpc.test.ts src/__tests__/tracked-review-route.test.ts src/__tests__/structured-document-rpc.e2e.test.ts src/__tests__/request-timeout-ms.e2e.test.ts src/__tests__/agent-evidence.e2e.test.ts src/__tests__/agent-apply.e2e.test.ts src/__tests__/find-text.e2e.test.ts src/__tests__/custom-actions.e2e.test.ts",
|
|
57
57
|
"smoke:product-action": "node scripts/product-action-smoke.mjs"
|