@duct-sdk/sdk 0.5.13 → 0.6.0

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.
Files changed (160) hide show
  1. package/CHANGELOG.md +385 -344
  2. package/README.md +418 -264
  3. package/TOKEN_SPEC.md +243 -243
  4. package/dist/cli/add.d.ts +7 -0
  5. package/dist/cli/add.js +152 -0
  6. package/dist/cli/agent-prompt.d.ts +3 -0
  7. package/dist/cli/agent-prompt.js +39 -0
  8. package/dist/cli/api-sources.d.ts +26 -0
  9. package/dist/cli/api-sources.js +222 -0
  10. package/dist/cli/cloud.d.ts +133 -0
  11. package/dist/cli/cloud.js +298 -0
  12. package/dist/cli/config-loader.d.ts +14 -0
  13. package/dist/cli/config-loader.js +56 -7
  14. package/dist/cli/device-login.d.ts +17 -0
  15. package/dist/cli/device-login.js +75 -0
  16. package/dist/cli/drift.js +6 -6
  17. package/dist/cli/generators/any-stack.d.ts +3 -0
  18. package/dist/cli/generators/any-stack.js +97 -0
  19. package/dist/cli/generators/config.js +3 -2
  20. package/dist/cli/generators/receiver.js +7 -7
  21. package/dist/cli/generators/shell.js +12 -12
  22. package/dist/cli/generators/token-route.js +245 -245
  23. package/dist/cli/index.js +396 -611
  24. package/dist/cli/mcp-core.d.ts +42 -0
  25. package/dist/cli/mcp-core.js +161 -0
  26. package/dist/cli/mcp-setup.d.ts +4 -0
  27. package/dist/cli/mcp-setup.js +360 -0
  28. package/dist/cli/mcp.d.ts +2 -0
  29. package/dist/cli/mcp.js +457 -0
  30. package/dist/cli/migrate-intershell.js +5 -5
  31. package/dist/cli/policy-defaults.d.ts +37 -0
  32. package/dist/cli/policy-defaults.js +127 -0
  33. package/dist/cli/processors/integration-audit.js +2 -2
  34. package/dist/cli/processors/openapi-parser.d.ts +5 -0
  35. package/dist/cli/processors/openapi-parser.js +8 -3
  36. package/dist/cli/project-loader.d.ts +58 -0
  37. package/dist/cli/project-loader.js +198 -0
  38. package/dist/cli/project-writer.d.ts +23 -0
  39. package/dist/cli/project-writer.js +171 -0
  40. package/dist/cli/push.d.ts +43 -0
  41. package/dist/cli/push.js +276 -0
  42. package/dist/cli/safety-checks.d.ts +9 -0
  43. package/dist/cli/safety-checks.js +29 -0
  44. package/dist/cli/setup.d.ts +20 -0
  45. package/dist/cli/setup.js +349 -0
  46. package/dist/cli/shell-name.d.ts +8 -0
  47. package/dist/cli/shell-name.js +29 -0
  48. package/dist/cli/shells.d.ts +22 -0
  49. package/dist/cli/shells.js +122 -0
  50. package/dist/cli/split.d.ts +7 -0
  51. package/dist/cli/split.js +71 -0
  52. package/dist/cli/sync.d.ts +25 -0
  53. package/dist/cli/sync.js +120 -0
  54. package/dist/cli/test-runner.d.ts +21 -0
  55. package/dist/cli/test-runner.js +281 -0
  56. package/dist/core/compile.d.ts +43 -0
  57. package/dist/core/compile.js +510 -0
  58. package/dist/core/config.d.ts +464 -1
  59. package/dist/core/config.js +14 -14
  60. package/dist/core/login-handoff.d.ts +1 -1
  61. package/dist/core/login-handoff.js +1 -1
  62. package/dist/core/project.d.ts +1798 -0
  63. package/dist/core/project.js +278 -0
  64. package/dist/core/readiness-checks.js +2 -2
  65. package/dist/core/types.d.ts +1 -1
  66. package/dist/index.d.ts +2 -0
  67. package/dist/index.js +1 -0
  68. package/dist/project.d.ts +4 -0
  69. package/dist/project.js +8 -0
  70. package/dist/server.d.ts +2 -0
  71. package/dist/server.js +1 -0
  72. package/package.json +94 -95
  73. package/dist/adapters/react/page-context-guard.test.d.ts +0 -1
  74. package/dist/adapters/react/page-context-guard.test.js +0 -15
  75. package/dist/cli/agents/api-agent.d.ts +0 -22
  76. package/dist/cli/agents/api-agent.js +0 -761
  77. package/dist/cli/agents/auth-agent.d.ts +0 -7
  78. package/dist/cli/agents/auth-agent.js +0 -212
  79. package/dist/cli/agents/deeplink-agent.d.ts +0 -6
  80. package/dist/cli/agents/deeplink-agent.js +0 -285
  81. package/dist/cli/agents/llm.d.ts +0 -33
  82. package/dist/cli/agents/llm.js +0 -309
  83. package/dist/cli/agents/pipeline.d.ts +0 -72
  84. package/dist/cli/agents/pipeline.js +0 -421
  85. package/dist/cli/agents/reviewer-agent.d.ts +0 -13
  86. package/dist/cli/agents/reviewer-agent.js +0 -450
  87. package/dist/cli/agents/route-agent.d.ts +0 -17
  88. package/dist/cli/agents/route-agent.js +0 -383
  89. package/dist/cli/config-loader.test.d.ts +0 -1
  90. package/dist/cli/config-loader.test.js +0 -63
  91. package/dist/cli/detectors/topology.d.ts +0 -46
  92. package/dist/cli/detectors/topology.js +0 -417
  93. package/dist/cli/generators/config.test.d.ts +0 -1
  94. package/dist/cli/generators/config.test.js +0 -222
  95. package/dist/cli/generators/shell.test.d.ts +0 -1
  96. package/dist/cli/generators/shell.test.js +0 -73
  97. package/dist/cli/generators/token-route.test.d.ts +0 -1
  98. package/dist/cli/generators/token-route.test.js +0 -53
  99. package/dist/cli/generators/wiring-snippets.test.d.ts +0 -1
  100. package/dist/cli/generators/wiring-snippets.test.js +0 -80
  101. package/dist/cli/init.d.ts +0 -32
  102. package/dist/cli/init.js +0 -1336
  103. package/dist/cli/manifest-diff.test.d.ts +0 -1
  104. package/dist/cli/manifest-diff.test.js +0 -144
  105. package/dist/cli/processors/curl-parser.test.d.ts +0 -1
  106. package/dist/cli/processors/curl-parser.test.js +0 -24
  107. package/dist/cli/processors/integration-audit.test.d.ts +0 -1
  108. package/dist/cli/processors/integration-audit.test.js +0 -154
  109. package/dist/cli/processors/postprocess.d.ts +0 -22
  110. package/dist/cli/processors/postprocess.js +0 -107
  111. package/dist/cli/processors/prisma-parser.d.ts +0 -35
  112. package/dist/cli/processors/prisma-parser.js +0 -117
  113. package/dist/cli/processors/verify-discovery.d.ts +0 -33
  114. package/dist/cli/processors/verify-discovery.js +0 -193
  115. package/dist/cli/processors/verify-discovery.test.d.ts +0 -1
  116. package/dist/cli/processors/verify-discovery.test.js +0 -153
  117. package/dist/cli/processors/zod-extractor.d.ts +0 -27
  118. package/dist/cli/processors/zod-extractor.js +0 -153
  119. package/dist/cli/prompts/review.d.ts +0 -61
  120. package/dist/cli/prompts/review.js +0 -410
  121. package/dist/cli/selectors/express.d.ts +0 -12
  122. package/dist/cli/selectors/express.js +0 -117
  123. package/dist/cli/selectors/fastapi.d.ts +0 -12
  124. package/dist/cli/selectors/fastapi.js +0 -122
  125. package/dist/cli/selectors/generic.d.ts +0 -10
  126. package/dist/cli/selectors/generic.js +0 -74
  127. package/dist/cli/selectors/index.d.ts +0 -37
  128. package/dist/cli/selectors/index.js +0 -315
  129. package/dist/cli/selectors/next.d.ts +0 -12
  130. package/dist/cli/selectors/next.js +0 -130
  131. package/dist/core/config-policy.test.d.ts +0 -1
  132. package/dist/core/config-policy.test.js +0 -101
  133. package/dist/core/config-roundtrip.test.d.ts +0 -1
  134. package/dist/core/config-roundtrip.test.js +0 -180
  135. package/dist/core/endpoint-guard.test.d.ts +0 -1
  136. package/dist/core/endpoint-guard.test.js +0 -57
  137. package/dist/core/env-diagnostics.test.d.ts +0 -1
  138. package/dist/core/env-diagnostics.test.js +0 -31
  139. package/dist/core/evidence-bundle.conformance.test.d.ts +0 -1
  140. package/dist/core/evidence-bundle.conformance.test.js +0 -110
  141. package/dist/core/evidence-bundle.test.d.ts +0 -1
  142. package/dist/core/evidence-bundle.test.js +0 -58
  143. package/dist/core/invariants.test.d.ts +0 -1
  144. package/dist/core/invariants.test.js +0 -217
  145. package/dist/core/login-handoff.test.d.ts +0 -1
  146. package/dist/core/login-handoff.test.js +0 -31
  147. package/dist/core/profile.test.d.ts +0 -1
  148. package/dist/core/profile.test.js +0 -95
  149. package/dist/core/readiness-checks.test.d.ts +0 -1
  150. package/dist/core/readiness-checks.test.js +0 -106
  151. package/dist/core/receipt.test.d.ts +0 -1
  152. package/dist/core/receipt.test.js +0 -75
  153. package/dist/core/sdk-entrypoint.test.d.ts +0 -1
  154. package/dist/core/sdk-entrypoint.test.js +0 -8
  155. package/dist/core/side-effects-review.test.d.ts +0 -1
  156. package/dist/core/side-effects-review.test.js +0 -28
  157. package/dist/core/token.conformance.test.d.ts +0 -1
  158. package/dist/core/token.conformance.test.js +0 -43
  159. package/dist/core/token.test.d.ts +0 -1
  160. package/dist/core/token.test.js +0 -66
@@ -2,6 +2,469 @@ import { z } from "zod";
2
2
  import type { DuctConfig } from "./types.js";
3
3
  export { ActionManifestSchema, ManifestActionSchema, SensitivityLevelSchema, ErrorEnvelopeSchema, ConfirmationStateSchema, } from "@duct-sdk/contracts";
4
4
  export type { ActionManifest, ManifestAction, SensitivityLevel, ErrorEnvelope, ConfirmationState, } from "@duct-sdk/contracts";
5
+ export declare const RouteManifestSchema: z.ZodObject<{
6
+ path: z.ZodString;
7
+ name: z.ZodString;
8
+ description: z.ZodString;
9
+ params: z.ZodDefault<z.ZodArray<z.ZodObject<{
10
+ name: z.ZodString;
11
+ type: z.ZodEnum<["string", "number", "uuid", "slug"]>;
12
+ required: z.ZodBoolean;
13
+ description: z.ZodOptional<z.ZodString>;
14
+ }, "strip", z.ZodTypeAny, {
15
+ type: "string" | "number" | "uuid" | "slug";
16
+ name: string;
17
+ required: boolean;
18
+ description?: string | undefined;
19
+ }, {
20
+ type: "string" | "number" | "uuid" | "slug";
21
+ name: string;
22
+ required: boolean;
23
+ description?: string | undefined;
24
+ }>, "many">>;
25
+ queryParams: z.ZodDefault<z.ZodArray<z.ZodObject<{
26
+ name: z.ZodString;
27
+ type: z.ZodEnum<["string", "number", "boolean", "string[]"]>;
28
+ required: z.ZodBoolean;
29
+ description: z.ZodOptional<z.ZodString>;
30
+ defaultValue: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
31
+ }, "strip", z.ZodTypeAny, {
32
+ type: "string" | "number" | "boolean" | "string[]";
33
+ name: string;
34
+ required: boolean;
35
+ description?: string | undefined;
36
+ defaultValue?: string | number | boolean | undefined;
37
+ }, {
38
+ type: "string" | "number" | "boolean" | "string[]";
39
+ name: string;
40
+ required: boolean;
41
+ description?: string | undefined;
42
+ defaultValue?: string | number | boolean | undefined;
43
+ }>, "many">>;
44
+ uiStateHint: z.ZodEnum<["form", "list", "detail", "dashboard", "modal", "wizard", "empty", "error", "auth", "checkout", "profile", "settings", "search"]>;
45
+ requiresAuth: z.ZodBoolean;
46
+ deeplinkable: z.ZodBoolean;
47
+ methods: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
48
+ updatedAt: z.ZodOptional<z.ZodString>;
49
+ confidence: z.ZodOptional<z.ZodNumber>;
50
+ evidence: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
51
+ searchAction: z.ZodOptional<z.ZodObject<{
52
+ actionId: z.ZodString;
53
+ paramMap: z.ZodRecord<z.ZodString, z.ZodString>;
54
+ }, "strip", z.ZodTypeAny, {
55
+ actionId: string;
56
+ paramMap: Record<string, string>;
57
+ }, {
58
+ actionId: string;
59
+ paramMap: Record<string, string>;
60
+ }>>;
61
+ }, "strip", z.ZodTypeAny, {
62
+ name: string;
63
+ params: {
64
+ type: "string" | "number" | "uuid" | "slug";
65
+ name: string;
66
+ required: boolean;
67
+ description?: string | undefined;
68
+ }[];
69
+ path: string;
70
+ description: string;
71
+ queryParams: {
72
+ type: "string" | "number" | "boolean" | "string[]";
73
+ name: string;
74
+ required: boolean;
75
+ description?: string | undefined;
76
+ defaultValue?: string | number | boolean | undefined;
77
+ }[];
78
+ uiStateHint: "form" | "list" | "detail" | "dashboard" | "modal" | "wizard" | "empty" | "error" | "auth" | "checkout" | "profile" | "settings" | "search";
79
+ requiresAuth: boolean;
80
+ deeplinkable: boolean;
81
+ methods?: string[] | undefined;
82
+ updatedAt?: string | undefined;
83
+ confidence?: number | undefined;
84
+ evidence?: string[] | undefined;
85
+ searchAction?: {
86
+ actionId: string;
87
+ paramMap: Record<string, string>;
88
+ } | undefined;
89
+ }, {
90
+ name: string;
91
+ path: string;
92
+ description: string;
93
+ uiStateHint: "form" | "list" | "detail" | "dashboard" | "modal" | "wizard" | "empty" | "error" | "auth" | "checkout" | "profile" | "settings" | "search";
94
+ requiresAuth: boolean;
95
+ deeplinkable: boolean;
96
+ params?: {
97
+ type: "string" | "number" | "uuid" | "slug";
98
+ name: string;
99
+ required: boolean;
100
+ description?: string | undefined;
101
+ }[] | undefined;
102
+ queryParams?: {
103
+ type: "string" | "number" | "boolean" | "string[]";
104
+ name: string;
105
+ required: boolean;
106
+ description?: string | undefined;
107
+ defaultValue?: string | number | boolean | undefined;
108
+ }[] | undefined;
109
+ methods?: string[] | undefined;
110
+ updatedAt?: string | undefined;
111
+ confidence?: number | undefined;
112
+ evidence?: string[] | undefined;
113
+ searchAction?: {
114
+ actionId: string;
115
+ paramMap: Record<string, string>;
116
+ } | undefined;
117
+ }>;
118
+ export declare const AuthStrategySchema: z.ZodEnum<["nextauth", "clerk", "auth0", "custom-jwt", "session-cookie", "none", "unknown"]>;
119
+ export declare const AuthSchemaSchema: z.ZodObject<{
120
+ strategy: z.ZodEnum<["nextauth", "clerk", "auth0", "custom-jwt", "session-cookie", "none", "unknown"]>;
121
+ sessionFields: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
122
+ guestAllowed: z.ZodBoolean;
123
+ tokenExpirySeconds: z.ZodDefault<z.ZodNumber>;
124
+ tokenEndpoint: z.ZodOptional<z.ZodString>;
125
+ customClaims: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
126
+ loginDeeplinkId: z.ZodOptional<z.ZodString>;
127
+ loginRoutePath: z.ZodOptional<z.ZodString>;
128
+ confidence: z.ZodOptional<z.ZodNumber>;
129
+ evidence: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
130
+ }, "strip", z.ZodTypeAny, {
131
+ strategy: "none" | "nextauth" | "clerk" | "auth0" | "custom-jwt" | "session-cookie" | "unknown";
132
+ sessionFields: string[];
133
+ guestAllowed: boolean;
134
+ tokenExpirySeconds: number;
135
+ confidence?: number | undefined;
136
+ evidence?: string[] | undefined;
137
+ tokenEndpoint?: string | undefined;
138
+ customClaims?: Record<string, string> | undefined;
139
+ loginDeeplinkId?: string | undefined;
140
+ loginRoutePath?: string | undefined;
141
+ }, {
142
+ strategy: "none" | "nextauth" | "clerk" | "auth0" | "custom-jwt" | "session-cookie" | "unknown";
143
+ guestAllowed: boolean;
144
+ confidence?: number | undefined;
145
+ evidence?: string[] | undefined;
146
+ sessionFields?: string[] | undefined;
147
+ tokenExpirySeconds?: number | undefined;
148
+ tokenEndpoint?: string | undefined;
149
+ customClaims?: Record<string, string> | undefined;
150
+ loginDeeplinkId?: string | undefined;
151
+ loginRoutePath?: string | undefined;
152
+ }>;
153
+ export declare const DeeplinkDefinitionSchema: z.ZodObject<{
154
+ id: z.ZodString;
155
+ name: z.ZodString;
156
+ description: z.ZodString;
157
+ targetRoute: z.ZodString;
158
+ stateFields: z.ZodDefault<z.ZodArray<z.ZodObject<{
159
+ key: z.ZodString;
160
+ type: z.ZodEnum<["string", "number", "boolean", "object"]>;
161
+ required: z.ZodBoolean;
162
+ description: z.ZodOptional<z.ZodString>;
163
+ sessionSource: z.ZodOptional<z.ZodString>;
164
+ }, "strip", z.ZodTypeAny, {
165
+ type: "string" | "number" | "boolean" | "object";
166
+ required: boolean;
167
+ key: string;
168
+ description?: string | undefined;
169
+ sessionSource?: string | undefined;
170
+ }, {
171
+ type: "string" | "number" | "boolean" | "object";
172
+ required: boolean;
173
+ key: string;
174
+ description?: string | undefined;
175
+ sessionSource?: string | undefined;
176
+ }>, "many">>;
177
+ expirySeconds: z.ZodDefault<z.ZodNumber>;
178
+ requiresAuth: z.ZodBoolean;
179
+ openInNewTab: z.ZodOptional<z.ZodBoolean>;
180
+ intent: z.ZodOptional<z.ZodString>;
181
+ pageResolver: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
182
+ actionId: z.ZodString;
183
+ }, "strip", z.ZodTypeAny, {
184
+ actionId: string;
185
+ }, {
186
+ actionId: string;
187
+ }>, z.ZodObject<{
188
+ endpoint: z.ZodString;
189
+ }, "strip", z.ZodTypeAny, {
190
+ endpoint: string;
191
+ }, {
192
+ endpoint: string;
193
+ }>]>>;
194
+ allowFetch: z.ZodOptional<z.ZodBoolean>;
195
+ contentSelector: z.ZodOptional<z.ZodString>;
196
+ updatedAt: z.ZodOptional<z.ZodString>;
197
+ }, "strip", z.ZodTypeAny, {
198
+ id: string;
199
+ name: string;
200
+ description: string;
201
+ requiresAuth: boolean;
202
+ targetRoute: string;
203
+ stateFields: {
204
+ type: "string" | "number" | "boolean" | "object";
205
+ required: boolean;
206
+ key: string;
207
+ description?: string | undefined;
208
+ sessionSource?: string | undefined;
209
+ }[];
210
+ expirySeconds: number;
211
+ updatedAt?: string | undefined;
212
+ openInNewTab?: boolean | undefined;
213
+ intent?: string | undefined;
214
+ pageResolver?: {
215
+ actionId: string;
216
+ } | {
217
+ endpoint: string;
218
+ } | undefined;
219
+ allowFetch?: boolean | undefined;
220
+ contentSelector?: string | undefined;
221
+ }, {
222
+ id: string;
223
+ name: string;
224
+ description: string;
225
+ requiresAuth: boolean;
226
+ targetRoute: string;
227
+ updatedAt?: string | undefined;
228
+ stateFields?: {
229
+ type: "string" | "number" | "boolean" | "object";
230
+ required: boolean;
231
+ key: string;
232
+ description?: string | undefined;
233
+ sessionSource?: string | undefined;
234
+ }[] | undefined;
235
+ expirySeconds?: number | undefined;
236
+ openInNewTab?: boolean | undefined;
237
+ intent?: string | undefined;
238
+ pageResolver?: {
239
+ actionId: string;
240
+ } | {
241
+ endpoint: string;
242
+ } | undefined;
243
+ allowFetch?: boolean | undefined;
244
+ contentSelector?: string | undefined;
245
+ }>;
246
+ export declare const AgentPermissionLevelSchema: z.ZodEnum<["none", "read", "write", "admin"]>;
247
+ export declare const AgentPermissionsSchema: z.ZodObject<{
248
+ defaultLevel: z.ZodEnum<["none", "read", "write", "admin"]>;
249
+ actionOverrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEnum<["none", "read", "write", "admin"]>>>;
250
+ allowedCallers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
251
+ allowedCallees: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
252
+ requireUserConsent: z.ZodBoolean;
253
+ allowedActions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
254
+ validFrom: z.ZodOptional<z.ZodString>;
255
+ validUntil: z.ZodOptional<z.ZodString>;
256
+ consentActionScope: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
257
+ }, "strip", z.ZodTypeAny, {
258
+ defaultLevel: "none" | "read" | "write" | "admin";
259
+ requireUserConsent: boolean;
260
+ actionOverrides?: Record<string, "none" | "read" | "write" | "admin"> | undefined;
261
+ allowedCallers?: string[] | undefined;
262
+ allowedCallees?: string[] | undefined;
263
+ allowedActions?: string[] | undefined;
264
+ validFrom?: string | undefined;
265
+ validUntil?: string | undefined;
266
+ consentActionScope?: string[] | undefined;
267
+ }, {
268
+ defaultLevel: "none" | "read" | "write" | "admin";
269
+ requireUserConsent: boolean;
270
+ actionOverrides?: Record<string, "none" | "read" | "write" | "admin"> | undefined;
271
+ allowedCallers?: string[] | undefined;
272
+ allowedCallees?: string[] | undefined;
273
+ allowedActions?: string[] | undefined;
274
+ validFrom?: string | undefined;
275
+ validUntil?: string | undefined;
276
+ consentActionScope?: string[] | undefined;
277
+ }>;
278
+ export declare const WebhooksConfigSchema: z.ZodObject<{
279
+ consentCallback: z.ZodOptional<z.ZodString>;
280
+ identityUrl: z.ZodOptional<z.ZodString>;
281
+ secret: z.ZodOptional<z.ZodString>;
282
+ deeplinkCallback: z.ZodOptional<z.ZodString>;
283
+ eventStream: z.ZodOptional<z.ZodString>;
284
+ }, "strip", z.ZodTypeAny, {
285
+ consentCallback?: string | undefined;
286
+ identityUrl?: string | undefined;
287
+ secret?: string | undefined;
288
+ deeplinkCallback?: string | undefined;
289
+ eventStream?: string | undefined;
290
+ }, {
291
+ consentCallback?: string | undefined;
292
+ identityUrl?: string | undefined;
293
+ secret?: string | undefined;
294
+ deeplinkCallback?: string | undefined;
295
+ eventStream?: string | undefined;
296
+ }>;
297
+ export declare const ApprovalStepUpConfigSchema: z.ZodObject<{
298
+ minSensitivity: z.ZodDefault<z.ZodOptional<z.ZodEnum<["none", "low", "medium", "high", "critical"]>>>;
299
+ requireForSideEffects: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
300
+ sideEffectsMinSensitivity: z.ZodDefault<z.ZodOptional<z.ZodEnum<["none", "low", "medium", "high", "critical"]>>>;
301
+ }, "strip", z.ZodTypeAny, {
302
+ minSensitivity: "none" | "low" | "medium" | "high" | "critical";
303
+ requireForSideEffects: boolean;
304
+ sideEffectsMinSensitivity: "none" | "low" | "medium" | "high" | "critical";
305
+ }, {
306
+ minSensitivity?: "none" | "low" | "medium" | "high" | "critical" | undefined;
307
+ requireForSideEffects?: boolean | undefined;
308
+ sideEffectsMinSensitivity?: "none" | "low" | "medium" | "high" | "critical" | undefined;
309
+ }>;
310
+ export declare const ApprovalConfigSchema: z.ZodObject<{
311
+ stepUp: z.ZodDefault<z.ZodOptional<z.ZodObject<{
312
+ minSensitivity: z.ZodDefault<z.ZodOptional<z.ZodEnum<["none", "low", "medium", "high", "critical"]>>>;
313
+ requireForSideEffects: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
314
+ sideEffectsMinSensitivity: z.ZodDefault<z.ZodOptional<z.ZodEnum<["none", "low", "medium", "high", "critical"]>>>;
315
+ }, "strip", z.ZodTypeAny, {
316
+ minSensitivity: "none" | "low" | "medium" | "high" | "critical";
317
+ requireForSideEffects: boolean;
318
+ sideEffectsMinSensitivity: "none" | "low" | "medium" | "high" | "critical";
319
+ }, {
320
+ minSensitivity?: "none" | "low" | "medium" | "high" | "critical" | undefined;
321
+ requireForSideEffects?: boolean | undefined;
322
+ sideEffectsMinSensitivity?: "none" | "low" | "medium" | "high" | "critical" | undefined;
323
+ }>>>;
324
+ }, "strip", z.ZodTypeAny, {
325
+ stepUp: {
326
+ minSensitivity: "none" | "low" | "medium" | "high" | "critical";
327
+ requireForSideEffects: boolean;
328
+ sideEffectsMinSensitivity: "none" | "low" | "medium" | "high" | "critical";
329
+ };
330
+ }, {
331
+ stepUp?: {
332
+ minSensitivity?: "none" | "low" | "medium" | "high" | "critical" | undefined;
333
+ requireForSideEffects?: boolean | undefined;
334
+ sideEffectsMinSensitivity?: "none" | "low" | "medium" | "high" | "critical" | undefined;
335
+ } | undefined;
336
+ }>;
337
+ export declare const OperatorNotificationsConfigSchema: z.ZodObject<{
338
+ approverEmails: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
339
+ confirmationReminderLeadMinutes: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
340
+ }, "strip", z.ZodTypeAny, {
341
+ approverEmails: string[];
342
+ confirmationReminderLeadMinutes?: number | null | undefined;
343
+ }, {
344
+ approverEmails?: string[] | undefined;
345
+ confirmationReminderLeadMinutes?: number | null | undefined;
346
+ }>;
347
+ export declare const WidgetConfigSchema: z.ZodObject<{
348
+ primaryColor: z.ZodOptional<z.ZodString>;
349
+ position: z.ZodOptional<z.ZodEnum<["bottom-right", "bottom-left", "top-right", "top-left"]>>;
350
+ defaultOpen: z.ZodOptional<z.ZodBoolean>;
351
+ launcherText: z.ZodOptional<z.ZodString>;
352
+ welcomeMessage: z.ZodOptional<z.ZodString>;
353
+ hideLauncher: z.ZodOptional<z.ZodBoolean>;
354
+ preset: z.ZodOptional<z.ZodEnum<["tall", "square", "large"]>>;
355
+ placeholder: z.ZodOptional<z.ZodString>;
356
+ theme: z.ZodOptional<z.ZodEnum<["light", "dark", "system"]>>;
357
+ width: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
358
+ height: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
359
+ customCSS: z.ZodOptional<z.ZodString>;
360
+ compactionTurns: z.ZodOptional<z.ZodNumber>;
361
+ maxToolIterations: z.ZodOptional<z.ZodNumber>;
362
+ maxPlanSteps: z.ZodOptional<z.ZodNumber>;
363
+ }, "strip", z.ZodTypeAny, {
364
+ primaryColor?: string | undefined;
365
+ position?: "bottom-right" | "bottom-left" | "top-right" | "top-left" | undefined;
366
+ defaultOpen?: boolean | undefined;
367
+ launcherText?: string | undefined;
368
+ welcomeMessage?: string | undefined;
369
+ hideLauncher?: boolean | undefined;
370
+ preset?: "tall" | "square" | "large" | undefined;
371
+ placeholder?: string | undefined;
372
+ theme?: "light" | "dark" | "system" | undefined;
373
+ width?: string | number | undefined;
374
+ height?: string | number | undefined;
375
+ customCSS?: string | undefined;
376
+ compactionTurns?: number | undefined;
377
+ maxToolIterations?: number | undefined;
378
+ maxPlanSteps?: number | undefined;
379
+ }, {
380
+ primaryColor?: string | undefined;
381
+ position?: "bottom-right" | "bottom-left" | "top-right" | "top-left" | undefined;
382
+ defaultOpen?: boolean | undefined;
383
+ launcherText?: string | undefined;
384
+ welcomeMessage?: string | undefined;
385
+ hideLauncher?: boolean | undefined;
386
+ preset?: "tall" | "square" | "large" | undefined;
387
+ placeholder?: string | undefined;
388
+ theme?: "light" | "dark" | "system" | undefined;
389
+ width?: string | number | undefined;
390
+ height?: string | number | undefined;
391
+ customCSS?: string | undefined;
392
+ compactionTurns?: number | undefined;
393
+ maxToolIterations?: number | undefined;
394
+ maxPlanSteps?: number | undefined;
395
+ }>;
396
+ export declare const DataModelSchema: z.ZodObject<{
397
+ entities: z.ZodArray<z.ZodObject<{
398
+ id: z.ZodString;
399
+ label: z.ZodString;
400
+ discoveryAction: z.ZodString;
401
+ fetchAction: z.ZodString;
402
+ indexKey: z.ZodString;
403
+ labelKey: z.ZodString;
404
+ dimensions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
405
+ }, "strip", z.ZodTypeAny, {
406
+ id: string;
407
+ label: string;
408
+ discoveryAction: string;
409
+ fetchAction: string;
410
+ indexKey: string;
411
+ labelKey: string;
412
+ dimensions?: string[] | undefined;
413
+ }, {
414
+ id: string;
415
+ label: string;
416
+ discoveryAction: string;
417
+ fetchAction: string;
418
+ indexKey: string;
419
+ labelKey: string;
420
+ dimensions?: string[] | undefined;
421
+ }>, "many">;
422
+ }, "strip", z.ZodTypeAny, {
423
+ entities: {
424
+ id: string;
425
+ label: string;
426
+ discoveryAction: string;
427
+ fetchAction: string;
428
+ indexKey: string;
429
+ labelKey: string;
430
+ dimensions?: string[] | undefined;
431
+ }[];
432
+ }, {
433
+ entities: {
434
+ id: string;
435
+ label: string;
436
+ discoveryAction: string;
437
+ fetchAction: string;
438
+ indexKey: string;
439
+ labelKey: string;
440
+ dimensions?: string[] | undefined;
441
+ }[];
442
+ }>;
443
+ export declare const ProductConfigSchema: z.ZodObject<{
444
+ name: z.ZodString;
445
+ description: z.ZodString;
446
+ baseUrl: z.ZodString;
447
+ apiBaseUrl: z.ZodOptional<z.ZodString>;
448
+ locale: z.ZodOptional<z.ZodString>;
449
+ industry: z.ZodOptional<z.ZodString>;
450
+ logoUrl: z.ZodOptional<z.ZodString>;
451
+ }, "strip", z.ZodTypeAny, {
452
+ name: string;
453
+ description: string;
454
+ baseUrl: string;
455
+ apiBaseUrl?: string | undefined;
456
+ locale?: string | undefined;
457
+ industry?: string | undefined;
458
+ logoUrl?: string | undefined;
459
+ }, {
460
+ name: string;
461
+ description: string;
462
+ baseUrl: string;
463
+ apiBaseUrl?: string | undefined;
464
+ locale?: string | undefined;
465
+ industry?: string | undefined;
466
+ logoUrl?: string | undefined;
467
+ }>;
5
468
  export declare const DuctConfigSchema: z.ZodObject<{
6
469
  shellId: z.ZodString;
7
470
  product: z.ZodObject<{
@@ -1001,7 +1464,7 @@ export interface DuctConfigValidationIssue {
1001
1464
  }
1002
1465
  export declare function crossValidateDuctConfig(data: ValidatedDuctConfig): DuctConfigValidationIssue[];
1003
1466
  /**
1004
- * Validate a Duct config without throwing — used by `duct init` before writing files.
1467
+ * Validate a Duct config without throwing — used by the CLI before writing files.
1005
1468
  */
1006
1469
  export declare function validateDuctConfigStrict(config: DuctConfig): {
1007
1470
  ok: true;
@@ -35,7 +35,7 @@ const QueryParamSchema = z.object({
35
35
  description: z.string().optional(),
36
36
  defaultValue: z.union([z.string(), z.number(), z.boolean()]).optional(),
37
37
  });
38
- const RouteManifestSchema = z.object({
38
+ export const RouteManifestSchema = z.object({
39
39
  path: z.string().min(1).startsWith("/"),
40
40
  name: z.string().min(1),
41
41
  description: z.string().min(1),
@@ -55,7 +55,7 @@ const RouteManifestSchema = z.object({
55
55
  })
56
56
  .optional(),
57
57
  });
58
- const AuthStrategySchema = z.enum([
58
+ export const AuthStrategySchema = z.enum([
59
59
  "nextauth",
60
60
  "clerk",
61
61
  "auth0",
@@ -64,7 +64,7 @@ const AuthStrategySchema = z.enum([
64
64
  "none",
65
65
  "unknown",
66
66
  ]);
67
- const AuthSchemaSchema = z.object({
67
+ export const AuthSchemaSchema = z.object({
68
68
  strategy: AuthStrategySchema,
69
69
  sessionFields: z.array(z.string()).default([]),
70
70
  guestAllowed: z.boolean(),
@@ -91,7 +91,7 @@ const PageResolverSchema = z.union([
91
91
  z.object({ actionId: z.string().min(1) }),
92
92
  z.object({ endpoint: z.string().min(1).startsWith("/") }),
93
93
  ]);
94
- const DeeplinkDefinitionSchema = z.object({
94
+ export const DeeplinkDefinitionSchema = z.object({
95
95
  id: z
96
96
  .string()
97
97
  .min(1)
@@ -109,13 +109,13 @@ const DeeplinkDefinitionSchema = z.object({
109
109
  contentSelector: z.string().optional(),
110
110
  updatedAt: z.string().optional(),
111
111
  });
112
- const AgentPermissionLevelSchema = z.enum([
112
+ export const AgentPermissionLevelSchema = z.enum([
113
113
  "none",
114
114
  "read",
115
115
  "write",
116
116
  "admin",
117
117
  ]);
118
- const AgentPermissionsSchema = z.object({
118
+ export const AgentPermissionsSchema = z.object({
119
119
  defaultLevel: AgentPermissionLevelSchema,
120
120
  actionOverrides: z.record(AgentPermissionLevelSchema).optional(),
121
121
  allowedCallers: z.array(z.string()).optional(),
@@ -128,30 +128,30 @@ const AgentPermissionsSchema = z.object({
128
128
  validUntil: iso8601Schema.optional(),
129
129
  consentActionScope: z.array(z.string().min(1)).optional(),
130
130
  });
131
- const WebhooksConfigSchema = z.object({
131
+ export const WebhooksConfigSchema = z.object({
132
132
  consentCallback: z.string().url().optional(),
133
133
  identityUrl: z.string().url().optional(),
134
134
  secret: z.string().optional(),
135
135
  deeplinkCallback: z.string().url().optional(),
136
136
  eventStream: z.string().url().optional(),
137
137
  });
138
- const ApprovalStepUpConfigSchema = z.object({
138
+ export const ApprovalStepUpConfigSchema = z.object({
139
139
  minSensitivity: SensitivityLevelSchema.optional().default('high'),
140
140
  requireForSideEffects: z.boolean().optional().default(true),
141
141
  sideEffectsMinSensitivity: SensitivityLevelSchema.optional().default('medium'),
142
142
  });
143
- const ApprovalConfigSchema = z.object({
143
+ export const ApprovalConfigSchema = z.object({
144
144
  stepUp: ApprovalStepUpConfigSchema.optional().default({
145
145
  minSensitivity: 'high',
146
146
  requireForSideEffects: true,
147
147
  sideEffectsMinSensitivity: 'medium',
148
148
  }),
149
149
  });
150
- const OperatorNotificationsConfigSchema = z.object({
150
+ export const OperatorNotificationsConfigSchema = z.object({
151
151
  approverEmails: z.array(z.string().email()).optional().default([]),
152
152
  confirmationReminderLeadMinutes: z.number().int().positive().nullable().optional(),
153
153
  });
154
- const WidgetConfigSchema = z.object({
154
+ export const WidgetConfigSchema = z.object({
155
155
  primaryColor: z.string().optional(),
156
156
  position: z
157
157
  .enum(["bottom-right", "bottom-left", "top-right", "top-left"])
@@ -179,10 +179,10 @@ const DataModelEntitySchema = z.object({
179
179
  labelKey: z.string().min(1),
180
180
  dimensions: z.array(z.string()).optional(),
181
181
  });
182
- const DataModelSchema = z.object({
182
+ export const DataModelSchema = z.object({
183
183
  entities: z.array(DataModelEntitySchema),
184
184
  });
185
- const ProductConfigSchema = z.object({
185
+ export const ProductConfigSchema = z.object({
186
186
  name: z.string().min(1),
187
187
  description: z.string().min(1),
188
188
  baseUrl: z.string().url(),
@@ -341,7 +341,7 @@ export function crossValidateDuctConfig(data) {
341
341
  return issues;
342
342
  }
343
343
  /**
344
- * Validate a Duct config without throwing — used by `duct init` before writing files.
344
+ * Validate a Duct config without throwing — used by the CLI before writing files.
345
345
  */
346
346
  export function validateDuctConfigStrict(config) {
347
347
  const result = DuctConfigSchema.safeParse(config);
@@ -27,7 +27,7 @@ export declare const DEFAULT_LOGIN_HANDOFF_MESSAGE = "You'll need to sign in fir
27
27
  export declare function normalizeRoutePathForLogin(path: string): string;
28
28
  /**
29
29
  * Pick the best login route path from a manifest route inventory.
30
- * Used by `duct init` to populate `auth.loginRoutePath`.
30
+ * Used by `duct add identity` to populate `auth.loginRoutePath`.
31
31
  */
32
32
  export declare function detectLoginRoutePath(routes: LoginRouteLike[]): string | undefined;
33
33
  /**
@@ -37,7 +37,7 @@ function buildHandoffUrl(baseUrl, path) {
37
37
  }
38
38
  /**
39
39
  * Pick the best login route path from a manifest route inventory.
40
- * Used by `duct init` to populate `auth.loginRoutePath`.
40
+ * Used by `duct add identity` to populate `auth.loginRoutePath`.
41
41
  */
42
42
  export function detectLoginRoutePath(routes) {
43
43
  for (const route of routes) {