@duct-sdk/sdk 0.5.4 → 0.5.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/CHANGELOG.md +42 -0
- package/README.md +10 -10
- package/dist/adapters/react/shell.d.ts +2 -2
- package/dist/adapters/react/shell.js +1 -2
- package/dist/cli/generators/config.test.js +3 -0
- package/dist/cli/index.js +216 -36
- package/dist/cli/prompts/review.js +14 -0
- package/dist/core/config-roundtrip.test.d.ts +1 -0
- package/dist/core/config-roundtrip.test.js +180 -0
- package/dist/core/config.d.ts +281 -25
- package/dist/core/config.js +51 -67
- package/dist/core/endpoint-guard.d.ts +27 -0
- package/dist/core/endpoint-guard.js +71 -0
- package/dist/core/endpoint-guard.test.d.ts +1 -0
- package/dist/core/endpoint-guard.test.js +57 -0
- package/dist/core/env-diagnostics.d.ts +13 -0
- package/dist/core/env-diagnostics.js +63 -0
- package/dist/core/env-diagnostics.test.d.ts +1 -0
- package/dist/core/env-diagnostics.test.js +31 -0
- package/dist/core/evidence-bundle.conformance.test.d.ts +1 -0
- package/dist/core/evidence-bundle.conformance.test.js +110 -0
- package/dist/core/evidence-bundle.d.ts +59 -0
- package/dist/core/evidence-bundle.js +68 -0
- package/dist/core/evidence-bundle.test.d.ts +1 -0
- package/dist/core/evidence-bundle.test.js +58 -0
- package/dist/core/profile.d.ts +44 -0
- package/dist/core/profile.js +128 -0
- package/dist/core/profile.test.d.ts +1 -0
- package/dist/core/profile.test.js +95 -0
- package/dist/core/readiness-checks.d.ts +131 -0
- package/dist/core/readiness-checks.js +162 -0
- package/dist/core/readiness-checks.test.d.ts +1 -0
- package/dist/core/readiness-checks.test.js +106 -0
- package/dist/core/receipt.d.ts +5 -1
- package/dist/core/types.d.ts +23 -0
- package/dist/core/types.js +3 -3
- package/dist/index.d.ts +4 -3
- package/dist/index.js +2 -1
- package/dist/server.d.ts +3 -2
- package/dist/server.js +2 -1
- package/package.json +94 -93
package/dist/core/config.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import type { DuctConfig } from "./types.js";
|
|
3
|
+
export { ActionManifestSchema, ManifestActionSchema, SensitivityLevelSchema, ErrorEnvelopeSchema, ConfirmationStateSchema, } from "@duct-sdk/contracts";
|
|
4
|
+
export type { ActionManifest, ManifestAction, SensitivityLevel, ErrorEnvelope, ConfirmationState, } from "@duct-sdk/contracts";
|
|
3
5
|
export declare const DuctConfigSchema: z.ZodObject<{
|
|
4
6
|
shellId: z.ZodString;
|
|
5
7
|
product: z.ZodObject<{
|
|
@@ -36,11 +38,15 @@ export declare const DuctConfigSchema: z.ZodObject<{
|
|
|
36
38
|
customClaims: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
37
39
|
loginDeeplinkId: z.ZodOptional<z.ZodString>;
|
|
38
40
|
loginRoutePath: z.ZodOptional<z.ZodString>;
|
|
41
|
+
confidence: z.ZodOptional<z.ZodNumber>;
|
|
42
|
+
evidence: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
39
43
|
}, "strip", z.ZodTypeAny, {
|
|
40
44
|
strategy: "none" | "nextauth" | "clerk" | "auth0" | "custom-jwt" | "session-cookie" | "unknown";
|
|
41
45
|
sessionFields: string[];
|
|
42
46
|
guestAllowed: boolean;
|
|
43
47
|
tokenExpirySeconds: number;
|
|
48
|
+
confidence?: number | undefined;
|
|
49
|
+
evidence?: string[] | undefined;
|
|
44
50
|
tokenEndpoint?: string | undefined;
|
|
45
51
|
customClaims?: Record<string, string> | undefined;
|
|
46
52
|
loginDeeplinkId?: string | undefined;
|
|
@@ -48,6 +54,8 @@ export declare const DuctConfigSchema: z.ZodObject<{
|
|
|
48
54
|
}, {
|
|
49
55
|
strategy: "none" | "nextauth" | "clerk" | "auth0" | "custom-jwt" | "session-cookie" | "unknown";
|
|
50
56
|
guestAllowed: boolean;
|
|
57
|
+
confidence?: number | undefined;
|
|
58
|
+
evidence?: string[] | undefined;
|
|
51
59
|
sessionFields?: string[] | undefined;
|
|
52
60
|
tokenExpirySeconds?: number | undefined;
|
|
53
61
|
tokenEndpoint?: string | undefined;
|
|
@@ -98,6 +106,19 @@ export declare const DuctConfigSchema: z.ZodObject<{
|
|
|
98
106
|
requiresAuth: z.ZodBoolean;
|
|
99
107
|
deeplinkable: z.ZodBoolean;
|
|
100
108
|
methods: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
109
|
+
updatedAt: z.ZodOptional<z.ZodString>;
|
|
110
|
+
confidence: z.ZodOptional<z.ZodNumber>;
|
|
111
|
+
evidence: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
112
|
+
searchAction: z.ZodOptional<z.ZodObject<{
|
|
113
|
+
actionId: z.ZodString;
|
|
114
|
+
paramMap: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
115
|
+
}, "strip", z.ZodTypeAny, {
|
|
116
|
+
actionId: string;
|
|
117
|
+
paramMap: Record<string, string>;
|
|
118
|
+
}, {
|
|
119
|
+
actionId: string;
|
|
120
|
+
paramMap: Record<string, string>;
|
|
121
|
+
}>>;
|
|
101
122
|
}, "strip", z.ZodTypeAny, {
|
|
102
123
|
name: string;
|
|
103
124
|
params: {
|
|
@@ -119,6 +140,13 @@ export declare const DuctConfigSchema: z.ZodObject<{
|
|
|
119
140
|
requiresAuth: boolean;
|
|
120
141
|
deeplinkable: boolean;
|
|
121
142
|
methods?: string[] | undefined;
|
|
143
|
+
updatedAt?: string | undefined;
|
|
144
|
+
confidence?: number | undefined;
|
|
145
|
+
evidence?: string[] | undefined;
|
|
146
|
+
searchAction?: {
|
|
147
|
+
actionId: string;
|
|
148
|
+
paramMap: Record<string, string>;
|
|
149
|
+
} | undefined;
|
|
122
150
|
}, {
|
|
123
151
|
name: string;
|
|
124
152
|
path: string;
|
|
@@ -140,6 +168,13 @@ export declare const DuctConfigSchema: z.ZodObject<{
|
|
|
140
168
|
defaultValue?: string | number | boolean | undefined;
|
|
141
169
|
}[] | undefined;
|
|
142
170
|
methods?: string[] | undefined;
|
|
171
|
+
updatedAt?: string | undefined;
|
|
172
|
+
confidence?: number | undefined;
|
|
173
|
+
evidence?: string[] | undefined;
|
|
174
|
+
searchAction?: {
|
|
175
|
+
actionId: string;
|
|
176
|
+
paramMap: Record<string, string>;
|
|
177
|
+
} | undefined;
|
|
143
178
|
}>, "many">>;
|
|
144
179
|
actions: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
145
180
|
id: z.ZodString;
|
|
@@ -170,11 +205,18 @@ export declare const DuctConfigSchema: z.ZodObject<{
|
|
|
170
205
|
schema?: Record<string, unknown> | undefined;
|
|
171
206
|
}>, "many">>;
|
|
172
207
|
responseSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
208
|
+
inputSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
173
209
|
requiresAuth: z.ZodBoolean;
|
|
174
210
|
rateLimit: z.ZodOptional<z.ZodNumber>;
|
|
211
|
+
searchHint: z.ZodOptional<z.ZodString>;
|
|
212
|
+
alwaysInclude: z.ZodOptional<z.ZodBoolean>;
|
|
213
|
+
interruptBehavior: z.ZodOptional<z.ZodEnum<["cancel", "block"]>>;
|
|
214
|
+
updatedAt: z.ZodOptional<z.ZodString>;
|
|
215
|
+
confidence: z.ZodOptional<z.ZodNumber>;
|
|
216
|
+
evidence: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
175
217
|
validFrom: z.ZodOptional<z.ZodString>;
|
|
176
218
|
validUntil: z.ZodOptional<z.ZodString>;
|
|
177
|
-
approveIf: z.ZodOptional<z.ZodType<import("
|
|
219
|
+
approveIf: z.ZodOptional<z.ZodType<import("@duct-sdk/contracts").ApprovalPredicate, z.ZodTypeDef, import("@duct-sdk/contracts").ApprovalPredicate>>;
|
|
178
220
|
actionLimit: z.ZodOptional<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
179
221
|
type: z.ZodLiteral<"rate">;
|
|
180
222
|
maxPerWindow: z.ZodNumber;
|
|
@@ -197,9 +239,21 @@ export declare const DuctConfigSchema: z.ZodObject<{
|
|
|
197
239
|
type: "count";
|
|
198
240
|
maxCount: number;
|
|
199
241
|
}>]>>;
|
|
242
|
+
dependsOn: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
243
|
+
actionId: z.ZodString;
|
|
244
|
+
paramMapping: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
245
|
+
}, "strip", z.ZodTypeAny, {
|
|
246
|
+
actionId: string;
|
|
247
|
+
paramMapping: Record<string, string>;
|
|
248
|
+
}, {
|
|
249
|
+
actionId: string;
|
|
250
|
+
paramMapping: Record<string, string>;
|
|
251
|
+
}>, "many">>;
|
|
252
|
+
semanticType: z.ZodOptional<z.ZodEnum<["list", "entity", "status", "comparison", "timeline", "search_results"]>>;
|
|
253
|
+
outputSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
254
|
+
paramMappings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
255
|
+
navigatesTo: z.ZodOptional<z.ZodString>;
|
|
200
256
|
}, "strip", z.ZodTypeAny, {
|
|
201
|
-
id: string;
|
|
202
|
-
name: string;
|
|
203
257
|
params: {
|
|
204
258
|
type: "string" | "number" | "boolean" | "object" | "array";
|
|
205
259
|
name: string;
|
|
@@ -208,17 +262,26 @@ export declare const DuctConfigSchema: z.ZodObject<{
|
|
|
208
262
|
schema?: Record<string, unknown> | undefined;
|
|
209
263
|
}[];
|
|
210
264
|
path: string;
|
|
265
|
+
name: string;
|
|
211
266
|
description: string;
|
|
212
|
-
|
|
267
|
+
id: string;
|
|
213
268
|
method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
|
|
214
269
|
agentAccessible: boolean;
|
|
215
270
|
sideEffects: boolean;
|
|
216
271
|
sensitivityLevel: "none" | "low" | "medium" | "high" | "critical";
|
|
272
|
+
requiresAuth: boolean;
|
|
217
273
|
responseSchema?: Record<string, unknown> | undefined;
|
|
274
|
+
inputSchema?: Record<string, unknown> | undefined;
|
|
218
275
|
rateLimit?: number | undefined;
|
|
276
|
+
searchHint?: string | undefined;
|
|
277
|
+
alwaysInclude?: boolean | undefined;
|
|
278
|
+
interruptBehavior?: "cancel" | "block" | undefined;
|
|
279
|
+
updatedAt?: string | undefined;
|
|
280
|
+
confidence?: number | undefined;
|
|
281
|
+
evidence?: string[] | undefined;
|
|
219
282
|
validFrom?: string | undefined;
|
|
220
283
|
validUntil?: string | undefined;
|
|
221
|
-
approveIf?: import("
|
|
284
|
+
approveIf?: import("@duct-sdk/contracts").ApprovalPredicate | undefined;
|
|
222
285
|
actionLimit?: {
|
|
223
286
|
type: "rate";
|
|
224
287
|
maxPerWindow: number;
|
|
@@ -227,16 +290,24 @@ export declare const DuctConfigSchema: z.ZodObject<{
|
|
|
227
290
|
type: "count";
|
|
228
291
|
maxCount: number;
|
|
229
292
|
} | undefined;
|
|
293
|
+
dependsOn?: {
|
|
294
|
+
actionId: string;
|
|
295
|
+
paramMapping: Record<string, string>;
|
|
296
|
+
}[] | undefined;
|
|
297
|
+
semanticType?: "status" | "list" | "entity" | "comparison" | "timeline" | "search_results" | undefined;
|
|
298
|
+
outputSchema?: Record<string, unknown> | undefined;
|
|
299
|
+
paramMappings?: Record<string, string> | undefined;
|
|
300
|
+
navigatesTo?: string | undefined;
|
|
230
301
|
}, {
|
|
231
|
-
id: string;
|
|
232
|
-
name: string;
|
|
233
302
|
path: string;
|
|
303
|
+
name: string;
|
|
234
304
|
description: string;
|
|
235
|
-
|
|
305
|
+
id: string;
|
|
236
306
|
method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
|
|
237
307
|
agentAccessible: boolean;
|
|
238
308
|
sideEffects: boolean;
|
|
239
309
|
sensitivityLevel: "none" | "low" | "medium" | "high" | "critical";
|
|
310
|
+
requiresAuth: boolean;
|
|
240
311
|
params?: {
|
|
241
312
|
type: "string" | "number" | "boolean" | "object" | "array";
|
|
242
313
|
name: string;
|
|
@@ -245,10 +316,17 @@ export declare const DuctConfigSchema: z.ZodObject<{
|
|
|
245
316
|
schema?: Record<string, unknown> | undefined;
|
|
246
317
|
}[] | undefined;
|
|
247
318
|
responseSchema?: Record<string, unknown> | undefined;
|
|
319
|
+
inputSchema?: Record<string, unknown> | undefined;
|
|
248
320
|
rateLimit?: number | undefined;
|
|
321
|
+
searchHint?: string | undefined;
|
|
322
|
+
alwaysInclude?: boolean | undefined;
|
|
323
|
+
interruptBehavior?: "cancel" | "block" | undefined;
|
|
324
|
+
updatedAt?: string | undefined;
|
|
325
|
+
confidence?: number | undefined;
|
|
326
|
+
evidence?: string[] | undefined;
|
|
249
327
|
validFrom?: string | undefined;
|
|
250
328
|
validUntil?: string | undefined;
|
|
251
|
-
approveIf?: import("
|
|
329
|
+
approveIf?: import("@duct-sdk/contracts").ApprovalPredicate | undefined;
|
|
252
330
|
actionLimit?: {
|
|
253
331
|
type: "rate";
|
|
254
332
|
maxPerWindow: number;
|
|
@@ -257,6 +335,14 @@ export declare const DuctConfigSchema: z.ZodObject<{
|
|
|
257
335
|
type: "count";
|
|
258
336
|
maxCount: number;
|
|
259
337
|
} | undefined;
|
|
338
|
+
dependsOn?: {
|
|
339
|
+
actionId: string;
|
|
340
|
+
paramMapping: Record<string, string>;
|
|
341
|
+
}[] | undefined;
|
|
342
|
+
semanticType?: "status" | "list" | "entity" | "comparison" | "timeline" | "search_results" | undefined;
|
|
343
|
+
outputSchema?: Record<string, unknown> | undefined;
|
|
344
|
+
paramMappings?: Record<string, string> | undefined;
|
|
345
|
+
navigatesTo?: string | undefined;
|
|
260
346
|
}>, "many">>;
|
|
261
347
|
deeplinks: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
262
348
|
id: z.ZodString;
|
|
@@ -284,6 +370,7 @@ export declare const DuctConfigSchema: z.ZodObject<{
|
|
|
284
370
|
}>, "many">>;
|
|
285
371
|
expirySeconds: z.ZodDefault<z.ZodNumber>;
|
|
286
372
|
requiresAuth: z.ZodBoolean;
|
|
373
|
+
openInNewTab: z.ZodOptional<z.ZodBoolean>;
|
|
287
374
|
intent: z.ZodOptional<z.ZodString>;
|
|
288
375
|
pageResolver: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
|
|
289
376
|
actionId: z.ZodString;
|
|
@@ -300,6 +387,7 @@ export declare const DuctConfigSchema: z.ZodObject<{
|
|
|
300
387
|
}>]>>;
|
|
301
388
|
allowFetch: z.ZodOptional<z.ZodBoolean>;
|
|
302
389
|
contentSelector: z.ZodOptional<z.ZodString>;
|
|
390
|
+
updatedAt: z.ZodOptional<z.ZodString>;
|
|
303
391
|
}, "strip", z.ZodTypeAny, {
|
|
304
392
|
id: string;
|
|
305
393
|
name: string;
|
|
@@ -314,6 +402,8 @@ export declare const DuctConfigSchema: z.ZodObject<{
|
|
|
314
402
|
sessionSource?: string | undefined;
|
|
315
403
|
}[];
|
|
316
404
|
expirySeconds: number;
|
|
405
|
+
updatedAt?: string | undefined;
|
|
406
|
+
openInNewTab?: boolean | undefined;
|
|
317
407
|
intent?: string | undefined;
|
|
318
408
|
pageResolver?: {
|
|
319
409
|
actionId: string;
|
|
@@ -328,6 +418,7 @@ export declare const DuctConfigSchema: z.ZodObject<{
|
|
|
328
418
|
description: string;
|
|
329
419
|
requiresAuth: boolean;
|
|
330
420
|
targetRoute: string;
|
|
421
|
+
updatedAt?: string | undefined;
|
|
331
422
|
stateFields?: {
|
|
332
423
|
type: "string" | "number" | "boolean" | "object";
|
|
333
424
|
required: boolean;
|
|
@@ -336,6 +427,7 @@ export declare const DuctConfigSchema: z.ZodObject<{
|
|
|
336
427
|
sessionSource?: string | undefined;
|
|
337
428
|
}[] | undefined;
|
|
338
429
|
expirySeconds?: number | undefined;
|
|
430
|
+
openInNewTab?: boolean | undefined;
|
|
339
431
|
intent?: string | undefined;
|
|
340
432
|
pageResolver?: {
|
|
341
433
|
actionId: string;
|
|
@@ -349,6 +441,7 @@ export declare const DuctConfigSchema: z.ZodObject<{
|
|
|
349
441
|
defaultLevel: z.ZodEnum<["none", "read", "write", "admin"]>;
|
|
350
442
|
actionOverrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEnum<["none", "read", "write", "admin"]>>>;
|
|
351
443
|
allowedCallers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
444
|
+
allowedCallees: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
352
445
|
requireUserConsent: z.ZodBoolean;
|
|
353
446
|
allowedActions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
354
447
|
validFrom: z.ZodOptional<z.ZodString>;
|
|
@@ -357,20 +450,22 @@ export declare const DuctConfigSchema: z.ZodObject<{
|
|
|
357
450
|
}, "strip", z.ZodTypeAny, {
|
|
358
451
|
defaultLevel: "none" | "read" | "write" | "admin";
|
|
359
452
|
requireUserConsent: boolean;
|
|
360
|
-
validFrom?: string | undefined;
|
|
361
|
-
validUntil?: string | undefined;
|
|
362
453
|
actionOverrides?: Record<string, "none" | "read" | "write" | "admin"> | undefined;
|
|
363
454
|
allowedCallers?: string[] | undefined;
|
|
455
|
+
allowedCallees?: string[] | undefined;
|
|
364
456
|
allowedActions?: string[] | undefined;
|
|
457
|
+
validFrom?: string | undefined;
|
|
458
|
+
validUntil?: string | undefined;
|
|
365
459
|
consentActionScope?: string[] | undefined;
|
|
366
460
|
}, {
|
|
367
461
|
defaultLevel: "none" | "read" | "write" | "admin";
|
|
368
462
|
requireUserConsent: boolean;
|
|
369
|
-
validFrom?: string | undefined;
|
|
370
|
-
validUntil?: string | undefined;
|
|
371
463
|
actionOverrides?: Record<string, "none" | "read" | "write" | "admin"> | undefined;
|
|
372
464
|
allowedCallers?: string[] | undefined;
|
|
465
|
+
allowedCallees?: string[] | undefined;
|
|
373
466
|
allowedActions?: string[] | undefined;
|
|
467
|
+
validFrom?: string | undefined;
|
|
468
|
+
validUntil?: string | undefined;
|
|
374
469
|
consentActionScope?: string[] | undefined;
|
|
375
470
|
}>;
|
|
376
471
|
widget: z.ZodOptional<z.ZodObject<{
|
|
@@ -386,6 +481,9 @@ export declare const DuctConfigSchema: z.ZodObject<{
|
|
|
386
481
|
width: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
387
482
|
height: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
388
483
|
customCSS: z.ZodOptional<z.ZodString>;
|
|
484
|
+
compactionTurns: z.ZodOptional<z.ZodNumber>;
|
|
485
|
+
maxToolIterations: z.ZodOptional<z.ZodNumber>;
|
|
486
|
+
maxPlanSteps: z.ZodOptional<z.ZodNumber>;
|
|
389
487
|
}, "strip", z.ZodTypeAny, {
|
|
390
488
|
primaryColor?: string | undefined;
|
|
391
489
|
position?: "bottom-right" | "bottom-left" | "top-right" | "top-left" | undefined;
|
|
@@ -399,6 +497,9 @@ export declare const DuctConfigSchema: z.ZodObject<{
|
|
|
399
497
|
width?: string | number | undefined;
|
|
400
498
|
height?: string | number | undefined;
|
|
401
499
|
customCSS?: string | undefined;
|
|
500
|
+
compactionTurns?: number | undefined;
|
|
501
|
+
maxToolIterations?: number | undefined;
|
|
502
|
+
maxPlanSteps?: number | undefined;
|
|
402
503
|
}, {
|
|
403
504
|
primaryColor?: string | undefined;
|
|
404
505
|
position?: "bottom-right" | "bottom-left" | "top-right" | "top-left" | undefined;
|
|
@@ -412,15 +513,80 @@ export declare const DuctConfigSchema: z.ZodObject<{
|
|
|
412
513
|
width?: string | number | undefined;
|
|
413
514
|
height?: string | number | undefined;
|
|
414
515
|
customCSS?: string | undefined;
|
|
516
|
+
compactionTurns?: number | undefined;
|
|
517
|
+
maxToolIterations?: number | undefined;
|
|
518
|
+
maxPlanSteps?: number | undefined;
|
|
519
|
+
}>>;
|
|
520
|
+
dataModel: z.ZodOptional<z.ZodObject<{
|
|
521
|
+
entities: z.ZodArray<z.ZodObject<{
|
|
522
|
+
id: z.ZodString;
|
|
523
|
+
label: z.ZodString;
|
|
524
|
+
discoveryAction: z.ZodString;
|
|
525
|
+
fetchAction: z.ZodString;
|
|
526
|
+
indexKey: z.ZodString;
|
|
527
|
+
labelKey: z.ZodString;
|
|
528
|
+
dimensions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
529
|
+
}, "strip", z.ZodTypeAny, {
|
|
530
|
+
id: string;
|
|
531
|
+
label: string;
|
|
532
|
+
discoveryAction: string;
|
|
533
|
+
fetchAction: string;
|
|
534
|
+
indexKey: string;
|
|
535
|
+
labelKey: string;
|
|
536
|
+
dimensions?: string[] | undefined;
|
|
537
|
+
}, {
|
|
538
|
+
id: string;
|
|
539
|
+
label: string;
|
|
540
|
+
discoveryAction: string;
|
|
541
|
+
fetchAction: string;
|
|
542
|
+
indexKey: string;
|
|
543
|
+
labelKey: string;
|
|
544
|
+
dimensions?: string[] | undefined;
|
|
545
|
+
}>, "many">;
|
|
546
|
+
}, "strip", z.ZodTypeAny, {
|
|
547
|
+
entities: {
|
|
548
|
+
id: string;
|
|
549
|
+
label: string;
|
|
550
|
+
discoveryAction: string;
|
|
551
|
+
fetchAction: string;
|
|
552
|
+
indexKey: string;
|
|
553
|
+
labelKey: string;
|
|
554
|
+
dimensions?: string[] | undefined;
|
|
555
|
+
}[];
|
|
556
|
+
}, {
|
|
557
|
+
entities: {
|
|
558
|
+
id: string;
|
|
559
|
+
label: string;
|
|
560
|
+
discoveryAction: string;
|
|
561
|
+
fetchAction: string;
|
|
562
|
+
indexKey: string;
|
|
563
|
+
labelKey: string;
|
|
564
|
+
dimensions?: string[] | undefined;
|
|
565
|
+
}[];
|
|
415
566
|
}>>;
|
|
416
567
|
registry_visibility: z.ZodDefault<z.ZodOptional<z.ZodEnum<["public", "private"]>>>;
|
|
417
568
|
intershell_enabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
569
|
+
webhooks: z.ZodOptional<z.ZodObject<{
|
|
570
|
+
consentCallback: z.ZodOptional<z.ZodString>;
|
|
571
|
+
identityUrl: z.ZodOptional<z.ZodString>;
|
|
572
|
+
secret: z.ZodOptional<z.ZodString>;
|
|
573
|
+
}, "strip", z.ZodTypeAny, {
|
|
574
|
+
consentCallback?: string | undefined;
|
|
575
|
+
identityUrl?: string | undefined;
|
|
576
|
+
secret?: string | undefined;
|
|
577
|
+
}, {
|
|
578
|
+
consentCallback?: string | undefined;
|
|
579
|
+
identityUrl?: string | undefined;
|
|
580
|
+
secret?: string | undefined;
|
|
581
|
+
}>>;
|
|
418
582
|
}, "strip", z.ZodTypeAny, {
|
|
419
583
|
auth: {
|
|
420
584
|
strategy: "none" | "nextauth" | "clerk" | "auth0" | "custom-jwt" | "session-cookie" | "unknown";
|
|
421
585
|
sessionFields: string[];
|
|
422
586
|
guestAllowed: boolean;
|
|
423
587
|
tokenExpirySeconds: number;
|
|
588
|
+
confidence?: number | undefined;
|
|
589
|
+
evidence?: string[] | undefined;
|
|
424
590
|
tokenEndpoint?: string | undefined;
|
|
425
591
|
customClaims?: Record<string, string> | undefined;
|
|
426
592
|
loginDeeplinkId?: string | undefined;
|
|
@@ -457,10 +623,15 @@ export declare const DuctConfigSchema: z.ZodObject<{
|
|
|
457
623
|
requiresAuth: boolean;
|
|
458
624
|
deeplinkable: boolean;
|
|
459
625
|
methods?: string[] | undefined;
|
|
626
|
+
updatedAt?: string | undefined;
|
|
627
|
+
confidence?: number | undefined;
|
|
628
|
+
evidence?: string[] | undefined;
|
|
629
|
+
searchAction?: {
|
|
630
|
+
actionId: string;
|
|
631
|
+
paramMap: Record<string, string>;
|
|
632
|
+
} | undefined;
|
|
460
633
|
}[];
|
|
461
634
|
actions: {
|
|
462
|
-
id: string;
|
|
463
|
-
name: string;
|
|
464
635
|
params: {
|
|
465
636
|
type: "string" | "number" | "boolean" | "object" | "array";
|
|
466
637
|
name: string;
|
|
@@ -469,17 +640,26 @@ export declare const DuctConfigSchema: z.ZodObject<{
|
|
|
469
640
|
schema?: Record<string, unknown> | undefined;
|
|
470
641
|
}[];
|
|
471
642
|
path: string;
|
|
643
|
+
name: string;
|
|
472
644
|
description: string;
|
|
473
|
-
|
|
645
|
+
id: string;
|
|
474
646
|
method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
|
|
475
647
|
agentAccessible: boolean;
|
|
476
648
|
sideEffects: boolean;
|
|
477
649
|
sensitivityLevel: "none" | "low" | "medium" | "high" | "critical";
|
|
650
|
+
requiresAuth: boolean;
|
|
478
651
|
responseSchema?: Record<string, unknown> | undefined;
|
|
652
|
+
inputSchema?: Record<string, unknown> | undefined;
|
|
479
653
|
rateLimit?: number | undefined;
|
|
654
|
+
searchHint?: string | undefined;
|
|
655
|
+
alwaysInclude?: boolean | undefined;
|
|
656
|
+
interruptBehavior?: "cancel" | "block" | undefined;
|
|
657
|
+
updatedAt?: string | undefined;
|
|
658
|
+
confidence?: number | undefined;
|
|
659
|
+
evidence?: string[] | undefined;
|
|
480
660
|
validFrom?: string | undefined;
|
|
481
661
|
validUntil?: string | undefined;
|
|
482
|
-
approveIf?: import("
|
|
662
|
+
approveIf?: import("@duct-sdk/contracts").ApprovalPredicate | undefined;
|
|
483
663
|
actionLimit?: {
|
|
484
664
|
type: "rate";
|
|
485
665
|
maxPerWindow: number;
|
|
@@ -488,6 +668,14 @@ export declare const DuctConfigSchema: z.ZodObject<{
|
|
|
488
668
|
type: "count";
|
|
489
669
|
maxCount: number;
|
|
490
670
|
} | undefined;
|
|
671
|
+
dependsOn?: {
|
|
672
|
+
actionId: string;
|
|
673
|
+
paramMapping: Record<string, string>;
|
|
674
|
+
}[] | undefined;
|
|
675
|
+
semanticType?: "status" | "list" | "entity" | "comparison" | "timeline" | "search_results" | undefined;
|
|
676
|
+
outputSchema?: Record<string, unknown> | undefined;
|
|
677
|
+
paramMappings?: Record<string, string> | undefined;
|
|
678
|
+
navigatesTo?: string | undefined;
|
|
491
679
|
}[];
|
|
492
680
|
deeplinks: {
|
|
493
681
|
id: string;
|
|
@@ -503,6 +691,8 @@ export declare const DuctConfigSchema: z.ZodObject<{
|
|
|
503
691
|
sessionSource?: string | undefined;
|
|
504
692
|
}[];
|
|
505
693
|
expirySeconds: number;
|
|
694
|
+
updatedAt?: string | undefined;
|
|
695
|
+
openInNewTab?: boolean | undefined;
|
|
506
696
|
intent?: string | undefined;
|
|
507
697
|
pageResolver?: {
|
|
508
698
|
actionId: string;
|
|
@@ -515,11 +705,12 @@ export declare const DuctConfigSchema: z.ZodObject<{
|
|
|
515
705
|
agentPermissions: {
|
|
516
706
|
defaultLevel: "none" | "read" | "write" | "admin";
|
|
517
707
|
requireUserConsent: boolean;
|
|
518
|
-
validFrom?: string | undefined;
|
|
519
|
-
validUntil?: string | undefined;
|
|
520
708
|
actionOverrides?: Record<string, "none" | "read" | "write" | "admin"> | undefined;
|
|
521
709
|
allowedCallers?: string[] | undefined;
|
|
710
|
+
allowedCallees?: string[] | undefined;
|
|
522
711
|
allowedActions?: string[] | undefined;
|
|
712
|
+
validFrom?: string | undefined;
|
|
713
|
+
validUntil?: string | undefined;
|
|
523
714
|
consentActionScope?: string[] | undefined;
|
|
524
715
|
};
|
|
525
716
|
registry_visibility: "public" | "private";
|
|
@@ -537,11 +728,32 @@ export declare const DuctConfigSchema: z.ZodObject<{
|
|
|
537
728
|
width?: string | number | undefined;
|
|
538
729
|
height?: string | number | undefined;
|
|
539
730
|
customCSS?: string | undefined;
|
|
731
|
+
compactionTurns?: number | undefined;
|
|
732
|
+
maxToolIterations?: number | undefined;
|
|
733
|
+
maxPlanSteps?: number | undefined;
|
|
734
|
+
} | undefined;
|
|
735
|
+
dataModel?: {
|
|
736
|
+
entities: {
|
|
737
|
+
id: string;
|
|
738
|
+
label: string;
|
|
739
|
+
discoveryAction: string;
|
|
740
|
+
fetchAction: string;
|
|
741
|
+
indexKey: string;
|
|
742
|
+
labelKey: string;
|
|
743
|
+
dimensions?: string[] | undefined;
|
|
744
|
+
}[];
|
|
745
|
+
} | undefined;
|
|
746
|
+
webhooks?: {
|
|
747
|
+
consentCallback?: string | undefined;
|
|
748
|
+
identityUrl?: string | undefined;
|
|
749
|
+
secret?: string | undefined;
|
|
540
750
|
} | undefined;
|
|
541
751
|
}, {
|
|
542
752
|
auth: {
|
|
543
753
|
strategy: "none" | "nextauth" | "clerk" | "auth0" | "custom-jwt" | "session-cookie" | "unknown";
|
|
544
754
|
guestAllowed: boolean;
|
|
755
|
+
confidence?: number | undefined;
|
|
756
|
+
evidence?: string[] | undefined;
|
|
545
757
|
sessionFields?: string[] | undefined;
|
|
546
758
|
tokenExpirySeconds?: number | undefined;
|
|
547
759
|
tokenEndpoint?: string | undefined;
|
|
@@ -562,11 +774,12 @@ export declare const DuctConfigSchema: z.ZodObject<{
|
|
|
562
774
|
agentPermissions: {
|
|
563
775
|
defaultLevel: "none" | "read" | "write" | "admin";
|
|
564
776
|
requireUserConsent: boolean;
|
|
565
|
-
validFrom?: string | undefined;
|
|
566
|
-
validUntil?: string | undefined;
|
|
567
777
|
actionOverrides?: Record<string, "none" | "read" | "write" | "admin"> | undefined;
|
|
568
778
|
allowedCallers?: string[] | undefined;
|
|
779
|
+
allowedCallees?: string[] | undefined;
|
|
569
780
|
allowedActions?: string[] | undefined;
|
|
781
|
+
validFrom?: string | undefined;
|
|
782
|
+
validUntil?: string | undefined;
|
|
570
783
|
consentActionScope?: string[] | undefined;
|
|
571
784
|
};
|
|
572
785
|
routes?: {
|
|
@@ -590,17 +803,24 @@ export declare const DuctConfigSchema: z.ZodObject<{
|
|
|
590
803
|
defaultValue?: string | number | boolean | undefined;
|
|
591
804
|
}[] | undefined;
|
|
592
805
|
methods?: string[] | undefined;
|
|
806
|
+
updatedAt?: string | undefined;
|
|
807
|
+
confidence?: number | undefined;
|
|
808
|
+
evidence?: string[] | undefined;
|
|
809
|
+
searchAction?: {
|
|
810
|
+
actionId: string;
|
|
811
|
+
paramMap: Record<string, string>;
|
|
812
|
+
} | undefined;
|
|
593
813
|
}[] | undefined;
|
|
594
814
|
actions?: {
|
|
595
|
-
id: string;
|
|
596
|
-
name: string;
|
|
597
815
|
path: string;
|
|
816
|
+
name: string;
|
|
598
817
|
description: string;
|
|
599
|
-
|
|
818
|
+
id: string;
|
|
600
819
|
method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
|
|
601
820
|
agentAccessible: boolean;
|
|
602
821
|
sideEffects: boolean;
|
|
603
822
|
sensitivityLevel: "none" | "low" | "medium" | "high" | "critical";
|
|
823
|
+
requiresAuth: boolean;
|
|
604
824
|
params?: {
|
|
605
825
|
type: "string" | "number" | "boolean" | "object" | "array";
|
|
606
826
|
name: string;
|
|
@@ -609,10 +829,17 @@ export declare const DuctConfigSchema: z.ZodObject<{
|
|
|
609
829
|
schema?: Record<string, unknown> | undefined;
|
|
610
830
|
}[] | undefined;
|
|
611
831
|
responseSchema?: Record<string, unknown> | undefined;
|
|
832
|
+
inputSchema?: Record<string, unknown> | undefined;
|
|
612
833
|
rateLimit?: number | undefined;
|
|
834
|
+
searchHint?: string | undefined;
|
|
835
|
+
alwaysInclude?: boolean | undefined;
|
|
836
|
+
interruptBehavior?: "cancel" | "block" | undefined;
|
|
837
|
+
updatedAt?: string | undefined;
|
|
838
|
+
confidence?: number | undefined;
|
|
839
|
+
evidence?: string[] | undefined;
|
|
613
840
|
validFrom?: string | undefined;
|
|
614
841
|
validUntil?: string | undefined;
|
|
615
|
-
approveIf?: import("
|
|
842
|
+
approveIf?: import("@duct-sdk/contracts").ApprovalPredicate | undefined;
|
|
616
843
|
actionLimit?: {
|
|
617
844
|
type: "rate";
|
|
618
845
|
maxPerWindow: number;
|
|
@@ -621,6 +848,14 @@ export declare const DuctConfigSchema: z.ZodObject<{
|
|
|
621
848
|
type: "count";
|
|
622
849
|
maxCount: number;
|
|
623
850
|
} | undefined;
|
|
851
|
+
dependsOn?: {
|
|
852
|
+
actionId: string;
|
|
853
|
+
paramMapping: Record<string, string>;
|
|
854
|
+
}[] | undefined;
|
|
855
|
+
semanticType?: "status" | "list" | "entity" | "comparison" | "timeline" | "search_results" | undefined;
|
|
856
|
+
outputSchema?: Record<string, unknown> | undefined;
|
|
857
|
+
paramMappings?: Record<string, string> | undefined;
|
|
858
|
+
navigatesTo?: string | undefined;
|
|
624
859
|
}[] | undefined;
|
|
625
860
|
deeplinks?: {
|
|
626
861
|
id: string;
|
|
@@ -628,6 +863,7 @@ export declare const DuctConfigSchema: z.ZodObject<{
|
|
|
628
863
|
description: string;
|
|
629
864
|
requiresAuth: boolean;
|
|
630
865
|
targetRoute: string;
|
|
866
|
+
updatedAt?: string | undefined;
|
|
631
867
|
stateFields?: {
|
|
632
868
|
type: "string" | "number" | "boolean" | "object";
|
|
633
869
|
required: boolean;
|
|
@@ -636,6 +872,7 @@ export declare const DuctConfigSchema: z.ZodObject<{
|
|
|
636
872
|
sessionSource?: string | undefined;
|
|
637
873
|
}[] | undefined;
|
|
638
874
|
expirySeconds?: number | undefined;
|
|
875
|
+
openInNewTab?: boolean | undefined;
|
|
639
876
|
intent?: string | undefined;
|
|
640
877
|
pageResolver?: {
|
|
641
878
|
actionId: string;
|
|
@@ -658,9 +895,28 @@ export declare const DuctConfigSchema: z.ZodObject<{
|
|
|
658
895
|
width?: string | number | undefined;
|
|
659
896
|
height?: string | number | undefined;
|
|
660
897
|
customCSS?: string | undefined;
|
|
898
|
+
compactionTurns?: number | undefined;
|
|
899
|
+
maxToolIterations?: number | undefined;
|
|
900
|
+
maxPlanSteps?: number | undefined;
|
|
901
|
+
} | undefined;
|
|
902
|
+
dataModel?: {
|
|
903
|
+
entities: {
|
|
904
|
+
id: string;
|
|
905
|
+
label: string;
|
|
906
|
+
discoveryAction: string;
|
|
907
|
+
fetchAction: string;
|
|
908
|
+
indexKey: string;
|
|
909
|
+
labelKey: string;
|
|
910
|
+
dimensions?: string[] | undefined;
|
|
911
|
+
}[];
|
|
661
912
|
} | undefined;
|
|
662
913
|
registry_visibility?: "public" | "private" | undefined;
|
|
663
914
|
intershell_enabled?: boolean | undefined;
|
|
915
|
+
webhooks?: {
|
|
916
|
+
consentCallback?: string | undefined;
|
|
917
|
+
identityUrl?: string | undefined;
|
|
918
|
+
secret?: string | undefined;
|
|
919
|
+
} | undefined;
|
|
664
920
|
}>;
|
|
665
921
|
export type ValidatedDuctConfig = z.infer<typeof DuctConfigSchema>;
|
|
666
922
|
export interface DuctConfigValidationIssue {
|