@superdoc/sdk 2.23.0-next.13 → 2.23.0-next.15
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/execution-context.cjs +5 -2
- package/dist/agent/execution-context.js +5 -2
- package/dist/embedded-tools.generated.cjs +5 -5
- package/dist/embedded-tools.generated.js +5 -5
- package/dist/generated/client.d.ts +193 -177
- package/dist/generated/contract.cjs +1 -1
- package/dist/generated/contract.js +1 -1
- 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 +7 -7
- package/tools/catalog.json +8 -0
- package/tools/generation-receipt.json +16 -16
- package/tools/tools-policy.json +1 -1
- package/tools/tools.anthropic.json +8 -0
- package/tools/tools.generic.json +8 -0
- package/tools/tools.openai.json +8 -0
- package/tools/tools.vercel.json +8 -0
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var documentEvidence = require('../runtime/document-evidence.cjs');
|
|
4
|
+
var guards = require('../guards.cjs');
|
|
4
5
|
var errors = require('../runtime/errors.cjs');
|
|
5
6
|
var docSnapshot = require('./doc-snapshot.cjs');
|
|
6
7
|
var operationCatalog = require('./operation-catalog.cjs');
|
|
@@ -226,9 +227,11 @@ class ExecutionContext {
|
|
|
226
227
|
]
|
|
227
228
|
: [args, options]);
|
|
228
229
|
this.executedOperations.push({ operationId, result });
|
|
229
|
-
if (result
|
|
230
|
+
if (guards.isRecord(result) && result.success === false)
|
|
230
231
|
throw new errors.SuperDocCliError('Document operation did not apply.', {
|
|
231
|
-
code: result.failure
|
|
232
|
+
code: guards.isRecord(result.failure) && typeof result.failure.code === 'string'
|
|
233
|
+
? result.failure.code
|
|
234
|
+
: 'APPLY_FAILED',
|
|
232
235
|
details: result,
|
|
233
236
|
});
|
|
234
237
|
if (documentEvidence.supportsDocumentFacts(this.source)) {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { getDocumentRevisionReader, supportsDocumentFacts, requiresSummaryCounts, forwardDocumentEvidence, getMutationRevision, } from '../runtime/document-evidence.js';
|
|
2
|
+
import { isRecord } from '../guards.js';
|
|
2
3
|
import { SuperDocCliError } from '../runtime/errors.js';
|
|
3
4
|
import { buildDocumentSnapshot, buildMutationSnapshot, buildExecutionSummary, resolveSnapshotSelector, } from './doc-snapshot.js';
|
|
4
5
|
import { getOperationCatalogEntry } from './operation-catalog.js';
|
|
@@ -223,9 +224,11 @@ export class ExecutionContext {
|
|
|
223
224
|
]
|
|
224
225
|
: [args, options]);
|
|
225
226
|
this.executedOperations.push({ operationId, result });
|
|
226
|
-
if (result
|
|
227
|
+
if (isRecord(result) && result.success === false)
|
|
227
228
|
throw new SuperDocCliError('Document operation did not apply.', {
|
|
228
|
-
code: result.failure
|
|
229
|
+
code: isRecord(result.failure) && typeof result.failure.code === 'string'
|
|
230
|
+
? result.failure.code
|
|
231
|
+
: 'APPLY_FAILED',
|
|
229
232
|
details: result,
|
|
230
233
|
});
|
|
231
234
|
if (supportsDocumentFacts(this.source)) {
|