@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
@@ -0,0 +1,1798 @@
1
+ import { z } from "zod";
2
+ export declare const PROJECT_DIR = "duct";
3
+ export declare const PROJECT_FILES: {
4
+ readonly project: "project.ts";
5
+ readonly capabilities: "capabilities.json";
6
+ readonly policy: "policy.ts";
7
+ readonly shell: "shell.ts";
8
+ readonly tests: "tests.ts";
9
+ };
10
+ /** Marker functions the static loader looks for in each .ts file. */
11
+ export declare const PROJECT_MARKERS: {
12
+ readonly project: "defineProject(";
13
+ readonly policy: "definePolicy(";
14
+ readonly shell: "defineShell(";
15
+ readonly tests: "defineTests(";
16
+ };
17
+ /** Action id or glob over action ids, e.g. `get_*`, `*_order`, `*`. */
18
+ export declare const ActionPatternSchema: z.ZodString;
19
+ export declare const ProjectNetworkSchema: z.ZodObject<{
20
+ registry_visibility: z.ZodOptional<z.ZodEnum<["public", "private"]>>;
21
+ intershell_enabled: z.ZodOptional<z.ZodBoolean>;
22
+ allowedCallers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
23
+ allowedCallees: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
24
+ }, "strict", z.ZodTypeAny, {
25
+ allowedCallers?: string[] | undefined;
26
+ allowedCallees?: string[] | undefined;
27
+ registry_visibility?: "public" | "private" | undefined;
28
+ intershell_enabled?: boolean | undefined;
29
+ }, {
30
+ allowedCallers?: string[] | undefined;
31
+ allowedCallees?: string[] | undefined;
32
+ registry_visibility?: "public" | "private" | undefined;
33
+ intershell_enabled?: boolean | undefined;
34
+ }>;
35
+ export declare const ProjectFileSchema: z.ZodObject<{
36
+ shellId: z.ZodString;
37
+ product: z.ZodObject<{
38
+ name: z.ZodString;
39
+ description: z.ZodString;
40
+ baseUrl: z.ZodString;
41
+ apiBaseUrl: z.ZodOptional<z.ZodString>;
42
+ locale: z.ZodOptional<z.ZodString>;
43
+ industry: z.ZodOptional<z.ZodString>;
44
+ logoUrl: z.ZodOptional<z.ZodString>;
45
+ }, "strip", z.ZodTypeAny, {
46
+ name: string;
47
+ description: string;
48
+ baseUrl: string;
49
+ apiBaseUrl?: string | undefined;
50
+ locale?: string | undefined;
51
+ industry?: string | undefined;
52
+ logoUrl?: string | undefined;
53
+ }, {
54
+ name: string;
55
+ description: string;
56
+ baseUrl: string;
57
+ apiBaseUrl?: string | undefined;
58
+ locale?: string | undefined;
59
+ industry?: string | undefined;
60
+ logoUrl?: string | undefined;
61
+ }>;
62
+ /** How your app authenticates users. Only needed for user identity and the chat shell. */
63
+ auth: z.ZodOptional<z.ZodObject<{
64
+ strategy: z.ZodEnum<["nextauth", "clerk", "auth0", "custom-jwt", "session-cookie", "none", "unknown"]>;
65
+ sessionFields: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
66
+ guestAllowed: z.ZodBoolean;
67
+ tokenExpirySeconds: z.ZodDefault<z.ZodNumber>;
68
+ tokenEndpoint: z.ZodOptional<z.ZodString>;
69
+ customClaims: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
70
+ loginDeeplinkId: z.ZodOptional<z.ZodString>;
71
+ loginRoutePath: z.ZodOptional<z.ZodString>;
72
+ confidence: z.ZodOptional<z.ZodNumber>;
73
+ evidence: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
74
+ }, "strip", z.ZodTypeAny, {
75
+ strategy: "none" | "nextauth" | "clerk" | "auth0" | "custom-jwt" | "session-cookie" | "unknown";
76
+ sessionFields: string[];
77
+ guestAllowed: boolean;
78
+ tokenExpirySeconds: number;
79
+ confidence?: number | undefined;
80
+ evidence?: string[] | undefined;
81
+ tokenEndpoint?: string | undefined;
82
+ customClaims?: Record<string, string> | undefined;
83
+ loginDeeplinkId?: string | undefined;
84
+ loginRoutePath?: string | undefined;
85
+ }, {
86
+ strategy: "none" | "nextauth" | "clerk" | "auth0" | "custom-jwt" | "session-cookie" | "unknown";
87
+ guestAllowed: boolean;
88
+ confidence?: number | undefined;
89
+ evidence?: string[] | undefined;
90
+ sessionFields?: string[] | undefined;
91
+ tokenExpirySeconds?: number | undefined;
92
+ tokenEndpoint?: string | undefined;
93
+ customClaims?: Record<string, string> | undefined;
94
+ loginDeeplinkId?: string | undefined;
95
+ loginRoutePath?: string | undefined;
96
+ }>>;
97
+ webhooks: z.ZodOptional<z.ZodObject<{
98
+ consentCallback: z.ZodOptional<z.ZodString>;
99
+ identityUrl: z.ZodOptional<z.ZodString>;
100
+ secret: z.ZodOptional<z.ZodString>;
101
+ deeplinkCallback: z.ZodOptional<z.ZodString>;
102
+ eventStream: z.ZodOptional<z.ZodString>;
103
+ }, "strip", z.ZodTypeAny, {
104
+ consentCallback?: string | undefined;
105
+ identityUrl?: string | undefined;
106
+ secret?: string | undefined;
107
+ deeplinkCallback?: string | undefined;
108
+ eventStream?: string | undefined;
109
+ }, {
110
+ consentCallback?: string | undefined;
111
+ identityUrl?: string | undefined;
112
+ secret?: string | undefined;
113
+ deeplinkCallback?: string | undefined;
114
+ eventStream?: string | undefined;
115
+ }>>;
116
+ /** Cross-shell settings (early access, off by default). */
117
+ network: z.ZodOptional<z.ZodObject<{
118
+ registry_visibility: z.ZodOptional<z.ZodEnum<["public", "private"]>>;
119
+ intershell_enabled: z.ZodOptional<z.ZodBoolean>;
120
+ allowedCallers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
121
+ allowedCallees: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
122
+ }, "strict", z.ZodTypeAny, {
123
+ allowedCallers?: string[] | undefined;
124
+ allowedCallees?: string[] | undefined;
125
+ registry_visibility?: "public" | "private" | undefined;
126
+ intershell_enabled?: boolean | undefined;
127
+ }, {
128
+ allowedCallers?: string[] | undefined;
129
+ allowedCallees?: string[] | undefined;
130
+ registry_visibility?: "public" | "private" | undefined;
131
+ intershell_enabled?: boolean | undefined;
132
+ }>>;
133
+ }, "strict", z.ZodTypeAny, {
134
+ shellId: string;
135
+ product: {
136
+ name: string;
137
+ description: string;
138
+ baseUrl: string;
139
+ apiBaseUrl?: string | undefined;
140
+ locale?: string | undefined;
141
+ industry?: string | undefined;
142
+ logoUrl?: string | undefined;
143
+ };
144
+ auth?: {
145
+ strategy: "none" | "nextauth" | "clerk" | "auth0" | "custom-jwt" | "session-cookie" | "unknown";
146
+ sessionFields: string[];
147
+ guestAllowed: boolean;
148
+ tokenExpirySeconds: number;
149
+ confidence?: number | undefined;
150
+ evidence?: string[] | undefined;
151
+ tokenEndpoint?: string | undefined;
152
+ customClaims?: Record<string, string> | undefined;
153
+ loginDeeplinkId?: string | undefined;
154
+ loginRoutePath?: string | undefined;
155
+ } | undefined;
156
+ webhooks?: {
157
+ consentCallback?: string | undefined;
158
+ identityUrl?: string | undefined;
159
+ secret?: string | undefined;
160
+ deeplinkCallback?: string | undefined;
161
+ eventStream?: string | undefined;
162
+ } | undefined;
163
+ network?: {
164
+ allowedCallers?: string[] | undefined;
165
+ allowedCallees?: string[] | undefined;
166
+ registry_visibility?: "public" | "private" | undefined;
167
+ intershell_enabled?: boolean | undefined;
168
+ } | undefined;
169
+ }, {
170
+ shellId: string;
171
+ product: {
172
+ name: string;
173
+ description: string;
174
+ baseUrl: string;
175
+ apiBaseUrl?: string | undefined;
176
+ locale?: string | undefined;
177
+ industry?: string | undefined;
178
+ logoUrl?: string | undefined;
179
+ };
180
+ auth?: {
181
+ strategy: "none" | "nextauth" | "clerk" | "auth0" | "custom-jwt" | "session-cookie" | "unknown";
182
+ guestAllowed: boolean;
183
+ confidence?: number | undefined;
184
+ evidence?: string[] | undefined;
185
+ sessionFields?: string[] | undefined;
186
+ tokenExpirySeconds?: number | undefined;
187
+ tokenEndpoint?: string | undefined;
188
+ customClaims?: Record<string, string> | undefined;
189
+ loginDeeplinkId?: string | undefined;
190
+ loginRoutePath?: string | undefined;
191
+ } | undefined;
192
+ webhooks?: {
193
+ consentCallback?: string | undefined;
194
+ identityUrl?: string | undefined;
195
+ secret?: string | undefined;
196
+ deeplinkCallback?: string | undefined;
197
+ eventStream?: string | undefined;
198
+ } | undefined;
199
+ network?: {
200
+ allowedCallers?: string[] | undefined;
201
+ allowedCallees?: string[] | undefined;
202
+ registry_visibility?: "public" | "private" | undefined;
203
+ intershell_enabled?: boolean | undefined;
204
+ } | undefined;
205
+ }>;
206
+ export declare const CapabilityActionSchema: z.ZodObject<Pick<{
207
+ id: z.ZodString;
208
+ name: z.ZodString;
209
+ description: z.ZodString;
210
+ method: z.ZodEnum<["GET", "POST", "PUT", "PATCH", "DELETE"]>;
211
+ path: z.ZodString;
212
+ agentAccessible: z.ZodBoolean;
213
+ sideEffects: z.ZodBoolean;
214
+ sideEffectsReviewAck: z.ZodOptional<z.ZodString>;
215
+ sensitivityLevel: z.ZodEnum<["none", "low", "medium", "high", "critical"]>;
216
+ params: z.ZodDefault<z.ZodArray<z.ZodObject<{
217
+ name: z.ZodString;
218
+ type: z.ZodEnum<["string", "number", "boolean", "object", "array"]>;
219
+ required: z.ZodBoolean;
220
+ description: z.ZodOptional<z.ZodString>;
221
+ schema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
222
+ }, "strip", z.ZodTypeAny, {
223
+ type: "string" | "number" | "boolean" | "object" | "array";
224
+ name: string;
225
+ required: boolean;
226
+ description?: string | undefined;
227
+ schema?: Record<string, unknown> | undefined;
228
+ }, {
229
+ type: "string" | "number" | "boolean" | "object" | "array";
230
+ name: string;
231
+ required: boolean;
232
+ description?: string | undefined;
233
+ schema?: Record<string, unknown> | undefined;
234
+ }>, "many">>;
235
+ responseSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
236
+ inputSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
237
+ requiresAuth: z.ZodBoolean;
238
+ rateLimit: z.ZodOptional<z.ZodNumber>;
239
+ searchHint: z.ZodOptional<z.ZodString>;
240
+ alwaysInclude: z.ZodOptional<z.ZodBoolean>;
241
+ interruptBehavior: z.ZodOptional<z.ZodEnum<["cancel", "block"]>>;
242
+ updatedAt: z.ZodOptional<z.ZodString>;
243
+ confidence: z.ZodOptional<z.ZodNumber>;
244
+ evidence: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
245
+ validFrom: z.ZodOptional<z.ZodString>;
246
+ validUntil: z.ZodOptional<z.ZodString>;
247
+ approveIf: z.ZodOptional<z.ZodType<import("@duct-sdk/contracts").ApprovalPredicate, z.ZodTypeDef, import("@duct-sdk/contracts").ApprovalPredicate>>;
248
+ actionLimit: z.ZodOptional<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
249
+ type: z.ZodLiteral<"rate">;
250
+ maxPerWindow: z.ZodNumber;
251
+ windowSeconds: z.ZodNumber;
252
+ }, "strip", z.ZodTypeAny, {
253
+ type: "rate";
254
+ maxPerWindow: number;
255
+ windowSeconds: number;
256
+ }, {
257
+ type: "rate";
258
+ maxPerWindow: number;
259
+ windowSeconds: number;
260
+ }>, z.ZodObject<{
261
+ type: z.ZodLiteral<"count">;
262
+ maxCount: z.ZodNumber;
263
+ }, "strip", z.ZodTypeAny, {
264
+ type: "count";
265
+ maxCount: number;
266
+ }, {
267
+ type: "count";
268
+ maxCount: number;
269
+ }>]>>;
270
+ dependsOn: z.ZodOptional<z.ZodArray<z.ZodObject<{
271
+ actionId: z.ZodString;
272
+ paramMapping: z.ZodRecord<z.ZodString, z.ZodString>;
273
+ }, "strip", z.ZodTypeAny, {
274
+ actionId: string;
275
+ paramMapping: Record<string, string>;
276
+ }, {
277
+ actionId: string;
278
+ paramMapping: Record<string, string>;
279
+ }>, "many">>;
280
+ semanticType: z.ZodOptional<z.ZodEnum<["list", "entity", "status", "comparison", "timeline", "search_results"]>>;
281
+ outputSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
282
+ paramMappings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
283
+ navigatesTo: z.ZodOptional<z.ZodString>;
284
+ }, "id" | "name" | "params" | "path" | "description" | "updatedAt" | "confidence" | "evidence" | "method" | "sideEffects" | "sideEffectsReviewAck" | "responseSchema" | "inputSchema"> & {
285
+ sensitivityLevel: z.ZodDefault<z.ZodEnum<["none", "low", "medium", "high", "critical"]>>;
286
+ requiresAuth: z.ZodDefault<z.ZodBoolean>;
287
+ }, "strict", z.ZodTypeAny, {
288
+ id: string;
289
+ name: string;
290
+ params: {
291
+ type: "string" | "number" | "boolean" | "object" | "array";
292
+ name: string;
293
+ required: boolean;
294
+ description?: string | undefined;
295
+ schema?: Record<string, unknown> | undefined;
296
+ }[];
297
+ path: string;
298
+ description: string;
299
+ requiresAuth: boolean;
300
+ method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
301
+ sideEffects: boolean;
302
+ sensitivityLevel: "none" | "low" | "medium" | "high" | "critical";
303
+ updatedAt?: string | undefined;
304
+ confidence?: number | undefined;
305
+ evidence?: string[] | undefined;
306
+ sideEffectsReviewAck?: string | undefined;
307
+ responseSchema?: Record<string, unknown> | undefined;
308
+ inputSchema?: Record<string, unknown> | undefined;
309
+ }, {
310
+ id: string;
311
+ name: string;
312
+ path: string;
313
+ description: string;
314
+ method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
315
+ sideEffects: boolean;
316
+ params?: {
317
+ type: "string" | "number" | "boolean" | "object" | "array";
318
+ name: string;
319
+ required: boolean;
320
+ description?: string | undefined;
321
+ schema?: Record<string, unknown> | undefined;
322
+ }[] | undefined;
323
+ requiresAuth?: boolean | undefined;
324
+ updatedAt?: string | undefined;
325
+ confidence?: number | undefined;
326
+ evidence?: string[] | undefined;
327
+ sideEffectsReviewAck?: string | undefined;
328
+ sensitivityLevel?: "none" | "low" | "medium" | "high" | "critical" | undefined;
329
+ responseSchema?: Record<string, unknown> | undefined;
330
+ inputSchema?: Record<string, unknown> | undefined;
331
+ }>;
332
+ export declare const CapabilitySourceSchema: z.ZodObject<{
333
+ kind: z.ZodEnum<["openapi", "postman", "curl", "manual", "imported"]>;
334
+ /** File path (relative to the project root) or URL the actions were generated from. */
335
+ location: z.ZodOptional<z.ZodString>;
336
+ syncedAt: z.ZodOptional<z.ZodString>;
337
+ }, "strict", z.ZodTypeAny, {
338
+ kind: "openapi" | "postman" | "curl" | "manual" | "imported";
339
+ location?: string | undefined;
340
+ syncedAt?: string | undefined;
341
+ }, {
342
+ kind: "openapi" | "postman" | "curl" | "manual" | "imported";
343
+ location?: string | undefined;
344
+ syncedAt?: string | undefined;
345
+ }>;
346
+ export declare const CapabilitiesFileSchema: z.ZodEffects<z.ZodObject<{
347
+ $schema: z.ZodOptional<z.ZodString>;
348
+ version: z.ZodLiteral<1>;
349
+ source: z.ZodObject<{
350
+ kind: z.ZodEnum<["openapi", "postman", "curl", "manual", "imported"]>;
351
+ /** File path (relative to the project root) or URL the actions were generated from. */
352
+ location: z.ZodOptional<z.ZodString>;
353
+ syncedAt: z.ZodOptional<z.ZodString>;
354
+ }, "strict", z.ZodTypeAny, {
355
+ kind: "openapi" | "postman" | "curl" | "manual" | "imported";
356
+ location?: string | undefined;
357
+ syncedAt?: string | undefined;
358
+ }, {
359
+ kind: "openapi" | "postman" | "curl" | "manual" | "imported";
360
+ location?: string | undefined;
361
+ syncedAt?: string | undefined;
362
+ }>;
363
+ actions: z.ZodArray<z.ZodObject<Pick<{
364
+ id: z.ZodString;
365
+ name: z.ZodString;
366
+ description: z.ZodString;
367
+ method: z.ZodEnum<["GET", "POST", "PUT", "PATCH", "DELETE"]>;
368
+ path: z.ZodString;
369
+ agentAccessible: z.ZodBoolean;
370
+ sideEffects: z.ZodBoolean;
371
+ sideEffectsReviewAck: z.ZodOptional<z.ZodString>;
372
+ sensitivityLevel: z.ZodEnum<["none", "low", "medium", "high", "critical"]>;
373
+ params: z.ZodDefault<z.ZodArray<z.ZodObject<{
374
+ name: z.ZodString;
375
+ type: z.ZodEnum<["string", "number", "boolean", "object", "array"]>;
376
+ required: z.ZodBoolean;
377
+ description: z.ZodOptional<z.ZodString>;
378
+ schema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
379
+ }, "strip", z.ZodTypeAny, {
380
+ type: "string" | "number" | "boolean" | "object" | "array";
381
+ name: string;
382
+ required: boolean;
383
+ description?: string | undefined;
384
+ schema?: Record<string, unknown> | undefined;
385
+ }, {
386
+ type: "string" | "number" | "boolean" | "object" | "array";
387
+ name: string;
388
+ required: boolean;
389
+ description?: string | undefined;
390
+ schema?: Record<string, unknown> | undefined;
391
+ }>, "many">>;
392
+ responseSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
393
+ inputSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
394
+ requiresAuth: z.ZodBoolean;
395
+ rateLimit: z.ZodOptional<z.ZodNumber>;
396
+ searchHint: z.ZodOptional<z.ZodString>;
397
+ alwaysInclude: z.ZodOptional<z.ZodBoolean>;
398
+ interruptBehavior: z.ZodOptional<z.ZodEnum<["cancel", "block"]>>;
399
+ updatedAt: z.ZodOptional<z.ZodString>;
400
+ confidence: z.ZodOptional<z.ZodNumber>;
401
+ evidence: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
402
+ validFrom: z.ZodOptional<z.ZodString>;
403
+ validUntil: z.ZodOptional<z.ZodString>;
404
+ approveIf: z.ZodOptional<z.ZodType<import("@duct-sdk/contracts").ApprovalPredicate, z.ZodTypeDef, import("@duct-sdk/contracts").ApprovalPredicate>>;
405
+ actionLimit: z.ZodOptional<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
406
+ type: z.ZodLiteral<"rate">;
407
+ maxPerWindow: z.ZodNumber;
408
+ windowSeconds: z.ZodNumber;
409
+ }, "strip", z.ZodTypeAny, {
410
+ type: "rate";
411
+ maxPerWindow: number;
412
+ windowSeconds: number;
413
+ }, {
414
+ type: "rate";
415
+ maxPerWindow: number;
416
+ windowSeconds: number;
417
+ }>, z.ZodObject<{
418
+ type: z.ZodLiteral<"count">;
419
+ maxCount: z.ZodNumber;
420
+ }, "strip", z.ZodTypeAny, {
421
+ type: "count";
422
+ maxCount: number;
423
+ }, {
424
+ type: "count";
425
+ maxCount: number;
426
+ }>]>>;
427
+ dependsOn: z.ZodOptional<z.ZodArray<z.ZodObject<{
428
+ actionId: z.ZodString;
429
+ paramMapping: z.ZodRecord<z.ZodString, z.ZodString>;
430
+ }, "strip", z.ZodTypeAny, {
431
+ actionId: string;
432
+ paramMapping: Record<string, string>;
433
+ }, {
434
+ actionId: string;
435
+ paramMapping: Record<string, string>;
436
+ }>, "many">>;
437
+ semanticType: z.ZodOptional<z.ZodEnum<["list", "entity", "status", "comparison", "timeline", "search_results"]>>;
438
+ outputSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
439
+ paramMappings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
440
+ navigatesTo: z.ZodOptional<z.ZodString>;
441
+ }, "id" | "name" | "params" | "path" | "description" | "updatedAt" | "confidence" | "evidence" | "method" | "sideEffects" | "sideEffectsReviewAck" | "responseSchema" | "inputSchema"> & {
442
+ sensitivityLevel: z.ZodDefault<z.ZodEnum<["none", "low", "medium", "high", "critical"]>>;
443
+ requiresAuth: z.ZodDefault<z.ZodBoolean>;
444
+ }, "strict", z.ZodTypeAny, {
445
+ id: string;
446
+ name: string;
447
+ params: {
448
+ type: "string" | "number" | "boolean" | "object" | "array";
449
+ name: string;
450
+ required: boolean;
451
+ description?: string | undefined;
452
+ schema?: Record<string, unknown> | undefined;
453
+ }[];
454
+ path: string;
455
+ description: string;
456
+ requiresAuth: boolean;
457
+ method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
458
+ sideEffects: boolean;
459
+ sensitivityLevel: "none" | "low" | "medium" | "high" | "critical";
460
+ updatedAt?: string | undefined;
461
+ confidence?: number | undefined;
462
+ evidence?: string[] | undefined;
463
+ sideEffectsReviewAck?: string | undefined;
464
+ responseSchema?: Record<string, unknown> | undefined;
465
+ inputSchema?: Record<string, unknown> | undefined;
466
+ }, {
467
+ id: string;
468
+ name: string;
469
+ path: string;
470
+ description: string;
471
+ method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
472
+ sideEffects: boolean;
473
+ params?: {
474
+ type: "string" | "number" | "boolean" | "object" | "array";
475
+ name: string;
476
+ required: boolean;
477
+ description?: string | undefined;
478
+ schema?: Record<string, unknown> | undefined;
479
+ }[] | undefined;
480
+ requiresAuth?: boolean | undefined;
481
+ updatedAt?: string | undefined;
482
+ confidence?: number | undefined;
483
+ evidence?: string[] | undefined;
484
+ sideEffectsReviewAck?: string | undefined;
485
+ sensitivityLevel?: "none" | "low" | "medium" | "high" | "critical" | undefined;
486
+ responseSchema?: Record<string, unknown> | undefined;
487
+ inputSchema?: Record<string, unknown> | undefined;
488
+ }>, "many">;
489
+ }, "strict", z.ZodTypeAny, {
490
+ actions: {
491
+ id: string;
492
+ name: string;
493
+ params: {
494
+ type: "string" | "number" | "boolean" | "object" | "array";
495
+ name: string;
496
+ required: boolean;
497
+ description?: string | undefined;
498
+ schema?: Record<string, unknown> | undefined;
499
+ }[];
500
+ path: string;
501
+ description: string;
502
+ requiresAuth: boolean;
503
+ method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
504
+ sideEffects: boolean;
505
+ sensitivityLevel: "none" | "low" | "medium" | "high" | "critical";
506
+ updatedAt?: string | undefined;
507
+ confidence?: number | undefined;
508
+ evidence?: string[] | undefined;
509
+ sideEffectsReviewAck?: string | undefined;
510
+ responseSchema?: Record<string, unknown> | undefined;
511
+ inputSchema?: Record<string, unknown> | undefined;
512
+ }[];
513
+ version: 1;
514
+ source: {
515
+ kind: "openapi" | "postman" | "curl" | "manual" | "imported";
516
+ location?: string | undefined;
517
+ syncedAt?: string | undefined;
518
+ };
519
+ $schema?: string | undefined;
520
+ }, {
521
+ actions: {
522
+ id: string;
523
+ name: string;
524
+ path: string;
525
+ description: string;
526
+ method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
527
+ sideEffects: boolean;
528
+ params?: {
529
+ type: "string" | "number" | "boolean" | "object" | "array";
530
+ name: string;
531
+ required: boolean;
532
+ description?: string | undefined;
533
+ schema?: Record<string, unknown> | undefined;
534
+ }[] | undefined;
535
+ requiresAuth?: boolean | undefined;
536
+ updatedAt?: string | undefined;
537
+ confidence?: number | undefined;
538
+ evidence?: string[] | undefined;
539
+ sideEffectsReviewAck?: string | undefined;
540
+ sensitivityLevel?: "none" | "low" | "medium" | "high" | "critical" | undefined;
541
+ responseSchema?: Record<string, unknown> | undefined;
542
+ inputSchema?: Record<string, unknown> | undefined;
543
+ }[];
544
+ version: 1;
545
+ source: {
546
+ kind: "openapi" | "postman" | "curl" | "manual" | "imported";
547
+ location?: string | undefined;
548
+ syncedAt?: string | undefined;
549
+ };
550
+ $schema?: string | undefined;
551
+ }>, {
552
+ actions: {
553
+ id: string;
554
+ name: string;
555
+ params: {
556
+ type: "string" | "number" | "boolean" | "object" | "array";
557
+ name: string;
558
+ required: boolean;
559
+ description?: string | undefined;
560
+ schema?: Record<string, unknown> | undefined;
561
+ }[];
562
+ path: string;
563
+ description: string;
564
+ requiresAuth: boolean;
565
+ method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
566
+ sideEffects: boolean;
567
+ sensitivityLevel: "none" | "low" | "medium" | "high" | "critical";
568
+ updatedAt?: string | undefined;
569
+ confidence?: number | undefined;
570
+ evidence?: string[] | undefined;
571
+ sideEffectsReviewAck?: string | undefined;
572
+ responseSchema?: Record<string, unknown> | undefined;
573
+ inputSchema?: Record<string, unknown> | undefined;
574
+ }[];
575
+ version: 1;
576
+ source: {
577
+ kind: "openapi" | "postman" | "curl" | "manual" | "imported";
578
+ location?: string | undefined;
579
+ syncedAt?: string | undefined;
580
+ };
581
+ $schema?: string | undefined;
582
+ }, {
583
+ actions: {
584
+ id: string;
585
+ name: string;
586
+ path: string;
587
+ description: string;
588
+ method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
589
+ sideEffects: boolean;
590
+ params?: {
591
+ type: "string" | "number" | "boolean" | "object" | "array";
592
+ name: string;
593
+ required: boolean;
594
+ description?: string | undefined;
595
+ schema?: Record<string, unknown> | undefined;
596
+ }[] | undefined;
597
+ requiresAuth?: boolean | undefined;
598
+ updatedAt?: string | undefined;
599
+ confidence?: number | undefined;
600
+ evidence?: string[] | undefined;
601
+ sideEffectsReviewAck?: string | undefined;
602
+ sensitivityLevel?: "none" | "low" | "medium" | "high" | "critical" | undefined;
603
+ responseSchema?: Record<string, unknown> | undefined;
604
+ inputSchema?: Record<string, unknown> | undefined;
605
+ }[];
606
+ version: 1;
607
+ source: {
608
+ kind: "openapi" | "postman" | "curl" | "manual" | "imported";
609
+ location?: string | undefined;
610
+ syncedAt?: string | undefined;
611
+ };
612
+ $schema?: string | undefined;
613
+ }>;
614
+ /** One comparison on a param: `{ gt: 500 }`, `{ in: ["USD", "EUR"] }`, or a bare value for equality. */
615
+ export declare const ComparisonSchema: z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>, z.ZodEffects<z.ZodObject<{
616
+ gt: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
617
+ gte: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
618
+ lt: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
619
+ lte: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
620
+ eq: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
621
+ neq: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
622
+ in: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>, "many">>;
623
+ }, "strict", z.ZodTypeAny, {
624
+ gt?: string | number | boolean | undefined;
625
+ gte?: string | number | boolean | undefined;
626
+ lt?: string | number | boolean | undefined;
627
+ lte?: string | number | boolean | undefined;
628
+ eq?: string | number | boolean | undefined;
629
+ neq?: string | number | boolean | undefined;
630
+ in?: (string | number | boolean)[] | undefined;
631
+ }, {
632
+ gt?: string | number | boolean | undefined;
633
+ gte?: string | number | boolean | undefined;
634
+ lt?: string | number | boolean | undefined;
635
+ lte?: string | number | boolean | undefined;
636
+ eq?: string | number | boolean | undefined;
637
+ neq?: string | number | boolean | undefined;
638
+ in?: (string | number | boolean)[] | undefined;
639
+ }>, {
640
+ gt?: string | number | boolean | undefined;
641
+ gte?: string | number | boolean | undefined;
642
+ lt?: string | number | boolean | undefined;
643
+ lte?: string | number | boolean | undefined;
644
+ eq?: string | number | boolean | undefined;
645
+ neq?: string | number | boolean | undefined;
646
+ in?: (string | number | boolean)[] | undefined;
647
+ }, {
648
+ gt?: string | number | boolean | undefined;
649
+ gte?: string | number | boolean | undefined;
650
+ lt?: string | number | boolean | undefined;
651
+ lte?: string | number | boolean | undefined;
652
+ eq?: string | number | boolean | undefined;
653
+ neq?: string | number | boolean | undefined;
654
+ in?: (string | number | boolean)[] | undefined;
655
+ }>]>;
656
+ export type Comparison = z.infer<typeof ComparisonSchema>;
657
+ /**
658
+ * When a call needs human approval. A plain object ANDs its params:
659
+ * `{ amount: { gt: 500 }, currency: "USD" }`. Use `any` / `all` to combine.
660
+ */
661
+ export type Condition = {
662
+ any: Condition[];
663
+ } | {
664
+ all: Condition[];
665
+ } | {
666
+ [param: string]: Comparison;
667
+ };
668
+ export declare const ConditionSchema: z.ZodType<Condition>;
669
+ export declare const LimitSpecSchema: z.ZodEffects<z.ZodObject<{
670
+ /** Requests per minute for this action (all callers). */
671
+ perMinute: z.ZodOptional<z.ZodNumber>;
672
+ perHour: z.ZodOptional<z.ZodNumber>;
673
+ perDay: z.ZodOptional<z.ZodNumber>;
674
+ /** Lifetime cap on executions. */
675
+ total: z.ZodOptional<z.ZodNumber>;
676
+ /** Custom rolling window. */
677
+ window: z.ZodOptional<z.ZodObject<{
678
+ max: z.ZodNumber;
679
+ seconds: z.ZodNumber;
680
+ }, "strict", z.ZodTypeAny, {
681
+ max: number;
682
+ seconds: number;
683
+ }, {
684
+ max: number;
685
+ seconds: number;
686
+ }>>;
687
+ }, "strict", z.ZodTypeAny, {
688
+ perMinute?: number | undefined;
689
+ perHour?: number | undefined;
690
+ perDay?: number | undefined;
691
+ total?: number | undefined;
692
+ window?: {
693
+ max: number;
694
+ seconds: number;
695
+ } | undefined;
696
+ }, {
697
+ perMinute?: number | undefined;
698
+ perHour?: number | undefined;
699
+ perDay?: number | undefined;
700
+ total?: number | undefined;
701
+ window?: {
702
+ max: number;
703
+ seconds: number;
704
+ } | undefined;
705
+ }>, {
706
+ perMinute?: number | undefined;
707
+ perHour?: number | undefined;
708
+ perDay?: number | undefined;
709
+ total?: number | undefined;
710
+ window?: {
711
+ max: number;
712
+ seconds: number;
713
+ } | undefined;
714
+ }, {
715
+ perMinute?: number | undefined;
716
+ perHour?: number | undefined;
717
+ perDay?: number | undefined;
718
+ total?: number | undefined;
719
+ window?: {
720
+ max: number;
721
+ seconds: number;
722
+ } | undefined;
723
+ }>;
724
+ export type LimitSpec = z.infer<typeof LimitSpecSchema>;
725
+ export declare const AgentAccessSchema: z.ZodEnum<["none", "read", "write"]>;
726
+ export type AgentAccess = z.infer<typeof AgentAccessSchema>;
727
+ export declare const PolicyAgentsSchema: z.ZodObject<{
728
+ /** Default for agents: none = no access, read = read-only actions, write = all exposed actions. */
729
+ access: z.ZodDefault<z.ZodEnum<["none", "read", "write"]>>;
730
+ /** Actions agents may call. Omit to expose every action the access level permits. */
731
+ allow: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
732
+ /** Actions agents may never call. Deny always wins. */
733
+ deny: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
734
+ /** Per-action access level overrides (advanced). */
735
+ levels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEnum<["none", "read", "write", "admin"]>>>;
736
+ /** Require a user consent token for every agent call that acts for a user. */
737
+ userConsent: z.ZodDefault<z.ZodBoolean>;
738
+ /** Limit which actions a user's consent can cover (exact action ids). */
739
+ consentScope: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
740
+ validFrom: z.ZodOptional<z.ZodString>;
741
+ validUntil: z.ZodOptional<z.ZodString>;
742
+ }, "strict", z.ZodTypeAny, {
743
+ access: "none" | "read" | "write";
744
+ userConsent: boolean;
745
+ allow?: string[] | undefined;
746
+ deny?: string[] | undefined;
747
+ validFrom?: string | undefined;
748
+ validUntil?: string | undefined;
749
+ levels?: Record<string, "none" | "read" | "write" | "admin"> | undefined;
750
+ consentScope?: string[] | undefined;
751
+ }, {
752
+ allow?: string[] | undefined;
753
+ deny?: string[] | undefined;
754
+ validFrom?: string | undefined;
755
+ validUntil?: string | undefined;
756
+ access?: "none" | "read" | "write" | undefined;
757
+ levels?: Record<string, "none" | "read" | "write" | "admin"> | undefined;
758
+ userConsent?: boolean | undefined;
759
+ consentScope?: string[] | undefined;
760
+ }>;
761
+ export declare const PolicyApproversSchema: z.ZodObject<{
762
+ /** Who gets notified when an agent request is waiting for approval. */
763
+ emails: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
764
+ reminderLeadMinutes: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
765
+ /** Re-authentication required to approve sensitive requests. */
766
+ stepUp: z.ZodOptional<z.ZodObject<{
767
+ minSensitivity: z.ZodDefault<z.ZodOptional<z.ZodEnum<["none", "low", "medium", "high", "critical"]>>>;
768
+ requireForSideEffects: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
769
+ sideEffectsMinSensitivity: z.ZodDefault<z.ZodOptional<z.ZodEnum<["none", "low", "medium", "high", "critical"]>>>;
770
+ }, "strip", z.ZodTypeAny, {
771
+ minSensitivity: "none" | "low" | "medium" | "high" | "critical";
772
+ requireForSideEffects: boolean;
773
+ sideEffectsMinSensitivity: "none" | "low" | "medium" | "high" | "critical";
774
+ }, {
775
+ minSensitivity?: "none" | "low" | "medium" | "high" | "critical" | undefined;
776
+ requireForSideEffects?: boolean | undefined;
777
+ sideEffectsMinSensitivity?: "none" | "low" | "medium" | "high" | "critical" | undefined;
778
+ }>>;
779
+ }, "strict", z.ZodTypeAny, {
780
+ stepUp?: {
781
+ minSensitivity: "none" | "low" | "medium" | "high" | "critical";
782
+ requireForSideEffects: boolean;
783
+ sideEffectsMinSensitivity: "none" | "low" | "medium" | "high" | "critical";
784
+ } | undefined;
785
+ emails?: string[] | undefined;
786
+ reminderLeadMinutes?: number | null | undefined;
787
+ }, {
788
+ stepUp?: {
789
+ minSensitivity?: "none" | "low" | "medium" | "high" | "critical" | undefined;
790
+ requireForSideEffects?: boolean | undefined;
791
+ sideEffectsMinSensitivity?: "none" | "low" | "medium" | "high" | "critical" | undefined;
792
+ } | undefined;
793
+ emails?: string[] | undefined;
794
+ reminderLeadMinutes?: number | null | undefined;
795
+ }>;
796
+ export declare const PolicyFileSchema: z.ZodObject<{
797
+ agents: z.ZodDefault<z.ZodObject<{
798
+ /** Default for agents: none = no access, read = read-only actions, write = all exposed actions. */
799
+ access: z.ZodDefault<z.ZodEnum<["none", "read", "write"]>>;
800
+ /** Actions agents may call. Omit to expose every action the access level permits. */
801
+ allow: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
802
+ /** Actions agents may never call. Deny always wins. */
803
+ deny: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
804
+ /** Per-action access level overrides (advanced). */
805
+ levels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEnum<["none", "read", "write", "admin"]>>>;
806
+ /** Require a user consent token for every agent call that acts for a user. */
807
+ userConsent: z.ZodDefault<z.ZodBoolean>;
808
+ /** Limit which actions a user's consent can cover (exact action ids). */
809
+ consentScope: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
810
+ validFrom: z.ZodOptional<z.ZodString>;
811
+ validUntil: z.ZodOptional<z.ZodString>;
812
+ }, "strict", z.ZodTypeAny, {
813
+ access: "none" | "read" | "write";
814
+ userConsent: boolean;
815
+ allow?: string[] | undefined;
816
+ deny?: string[] | undefined;
817
+ validFrom?: string | undefined;
818
+ validUntil?: string | undefined;
819
+ levels?: Record<string, "none" | "read" | "write" | "admin"> | undefined;
820
+ consentScope?: string[] | undefined;
821
+ }, {
822
+ allow?: string[] | undefined;
823
+ deny?: string[] | undefined;
824
+ validFrom?: string | undefined;
825
+ validUntil?: string | undefined;
826
+ access?: "none" | "read" | "write" | undefined;
827
+ levels?: Record<string, "none" | "read" | "write" | "admin"> | undefined;
828
+ userConsent?: boolean | undefined;
829
+ consentScope?: string[] | undefined;
830
+ }>>;
831
+ /** Require human approval when a call matches the condition. Later entries win. */
832
+ approveWhen: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<Condition, z.ZodTypeDef, Condition>>>;
833
+ /** Rate and count limits. Applied top to bottom; later entries override earlier fields. */
834
+ limits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodObject<{
835
+ /** Requests per minute for this action (all callers). */
836
+ perMinute: z.ZodOptional<z.ZodNumber>;
837
+ perHour: z.ZodOptional<z.ZodNumber>;
838
+ perDay: z.ZodOptional<z.ZodNumber>;
839
+ /** Lifetime cap on executions. */
840
+ total: z.ZodOptional<z.ZodNumber>;
841
+ /** Custom rolling window. */
842
+ window: z.ZodOptional<z.ZodObject<{
843
+ max: z.ZodNumber;
844
+ seconds: z.ZodNumber;
845
+ }, "strict", z.ZodTypeAny, {
846
+ max: number;
847
+ seconds: number;
848
+ }, {
849
+ max: number;
850
+ seconds: number;
851
+ }>>;
852
+ }, "strict", z.ZodTypeAny, {
853
+ perMinute?: number | undefined;
854
+ perHour?: number | undefined;
855
+ perDay?: number | undefined;
856
+ total?: number | undefined;
857
+ window?: {
858
+ max: number;
859
+ seconds: number;
860
+ } | undefined;
861
+ }, {
862
+ perMinute?: number | undefined;
863
+ perHour?: number | undefined;
864
+ perDay?: number | undefined;
865
+ total?: number | undefined;
866
+ window?: {
867
+ max: number;
868
+ seconds: number;
869
+ } | undefined;
870
+ }>, {
871
+ perMinute?: number | undefined;
872
+ perHour?: number | undefined;
873
+ perDay?: number | undefined;
874
+ total?: number | undefined;
875
+ window?: {
876
+ max: number;
877
+ seconds: number;
878
+ } | undefined;
879
+ }, {
880
+ perMinute?: number | undefined;
881
+ perHour?: number | undefined;
882
+ perDay?: number | undefined;
883
+ total?: number | undefined;
884
+ window?: {
885
+ max: number;
886
+ seconds: number;
887
+ } | undefined;
888
+ }>>>;
889
+ /** Raise or lower sensitivity for matching actions. Later entries win. */
890
+ sensitivity: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodLazy<z.ZodEnum<["none", "low", "medium", "high", "critical"]>>>>;
891
+ /** Time windows during which matching actions are callable. */
892
+ windows: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
893
+ from: z.ZodOptional<z.ZodString>;
894
+ until: z.ZodOptional<z.ZodString>;
895
+ }, "strict", z.ZodTypeAny, {
896
+ from?: string | undefined;
897
+ until?: string | undefined;
898
+ }, {
899
+ from?: string | undefined;
900
+ until?: string | undefined;
901
+ }>>>;
902
+ approvers: z.ZodOptional<z.ZodObject<{
903
+ /** Who gets notified when an agent request is waiting for approval. */
904
+ emails: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
905
+ reminderLeadMinutes: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
906
+ /** Re-authentication required to approve sensitive requests. */
907
+ stepUp: z.ZodOptional<z.ZodObject<{
908
+ minSensitivity: z.ZodDefault<z.ZodOptional<z.ZodEnum<["none", "low", "medium", "high", "critical"]>>>;
909
+ requireForSideEffects: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
910
+ sideEffectsMinSensitivity: z.ZodDefault<z.ZodOptional<z.ZodEnum<["none", "low", "medium", "high", "critical"]>>>;
911
+ }, "strip", z.ZodTypeAny, {
912
+ minSensitivity: "none" | "low" | "medium" | "high" | "critical";
913
+ requireForSideEffects: boolean;
914
+ sideEffectsMinSensitivity: "none" | "low" | "medium" | "high" | "critical";
915
+ }, {
916
+ minSensitivity?: "none" | "low" | "medium" | "high" | "critical" | undefined;
917
+ requireForSideEffects?: boolean | undefined;
918
+ sideEffectsMinSensitivity?: "none" | "low" | "medium" | "high" | "critical" | undefined;
919
+ }>>;
920
+ }, "strict", z.ZodTypeAny, {
921
+ stepUp?: {
922
+ minSensitivity: "none" | "low" | "medium" | "high" | "critical";
923
+ requireForSideEffects: boolean;
924
+ sideEffectsMinSensitivity: "none" | "low" | "medium" | "high" | "critical";
925
+ } | undefined;
926
+ emails?: string[] | undefined;
927
+ reminderLeadMinutes?: number | null | undefined;
928
+ }, {
929
+ stepUp?: {
930
+ minSensitivity?: "none" | "low" | "medium" | "high" | "critical" | undefined;
931
+ requireForSideEffects?: boolean | undefined;
932
+ sideEffectsMinSensitivity?: "none" | "low" | "medium" | "high" | "critical" | undefined;
933
+ } | undefined;
934
+ emails?: string[] | undefined;
935
+ reminderLeadMinutes?: number | null | undefined;
936
+ }>>;
937
+ }, "strict", z.ZodTypeAny, {
938
+ agents: {
939
+ access: "none" | "read" | "write";
940
+ userConsent: boolean;
941
+ allow?: string[] | undefined;
942
+ deny?: string[] | undefined;
943
+ validFrom?: string | undefined;
944
+ validUntil?: string | undefined;
945
+ levels?: Record<string, "none" | "read" | "write" | "admin"> | undefined;
946
+ consentScope?: string[] | undefined;
947
+ };
948
+ approveWhen?: Record<string, Condition> | undefined;
949
+ limits?: Record<string, {
950
+ perMinute?: number | undefined;
951
+ perHour?: number | undefined;
952
+ perDay?: number | undefined;
953
+ total?: number | undefined;
954
+ window?: {
955
+ max: number;
956
+ seconds: number;
957
+ } | undefined;
958
+ }> | undefined;
959
+ sensitivity?: Record<string, "none" | "low" | "medium" | "high" | "critical"> | undefined;
960
+ windows?: Record<string, {
961
+ from?: string | undefined;
962
+ until?: string | undefined;
963
+ }> | undefined;
964
+ approvers?: {
965
+ stepUp?: {
966
+ minSensitivity: "none" | "low" | "medium" | "high" | "critical";
967
+ requireForSideEffects: boolean;
968
+ sideEffectsMinSensitivity: "none" | "low" | "medium" | "high" | "critical";
969
+ } | undefined;
970
+ emails?: string[] | undefined;
971
+ reminderLeadMinutes?: number | null | undefined;
972
+ } | undefined;
973
+ }, {
974
+ agents?: {
975
+ allow?: string[] | undefined;
976
+ deny?: string[] | undefined;
977
+ validFrom?: string | undefined;
978
+ validUntil?: string | undefined;
979
+ access?: "none" | "read" | "write" | undefined;
980
+ levels?: Record<string, "none" | "read" | "write" | "admin"> | undefined;
981
+ userConsent?: boolean | undefined;
982
+ consentScope?: string[] | undefined;
983
+ } | undefined;
984
+ approveWhen?: Record<string, Condition> | undefined;
985
+ limits?: Record<string, {
986
+ perMinute?: number | undefined;
987
+ perHour?: number | undefined;
988
+ perDay?: number | undefined;
989
+ total?: number | undefined;
990
+ window?: {
991
+ max: number;
992
+ seconds: number;
993
+ } | undefined;
994
+ }> | undefined;
995
+ sensitivity?: Record<string, "none" | "low" | "medium" | "high" | "critical"> | undefined;
996
+ windows?: Record<string, {
997
+ from?: string | undefined;
998
+ until?: string | undefined;
999
+ }> | undefined;
1000
+ approvers?: {
1001
+ stepUp?: {
1002
+ minSensitivity?: "none" | "low" | "medium" | "high" | "critical" | undefined;
1003
+ requireForSideEffects?: boolean | undefined;
1004
+ sideEffectsMinSensitivity?: "none" | "low" | "medium" | "high" | "critical" | undefined;
1005
+ } | undefined;
1006
+ emails?: string[] | undefined;
1007
+ reminderLeadMinutes?: number | null | undefined;
1008
+ } | undefined;
1009
+ }>;
1010
+ export declare const ShellActionHintsSchema: z.ZodObject<Pick<{
1011
+ id: z.ZodString;
1012
+ name: z.ZodString;
1013
+ description: z.ZodString;
1014
+ method: z.ZodEnum<["GET", "POST", "PUT", "PATCH", "DELETE"]>;
1015
+ path: z.ZodString;
1016
+ agentAccessible: z.ZodBoolean;
1017
+ sideEffects: z.ZodBoolean;
1018
+ sideEffectsReviewAck: z.ZodOptional<z.ZodString>;
1019
+ sensitivityLevel: z.ZodEnum<["none", "low", "medium", "high", "critical"]>;
1020
+ params: z.ZodDefault<z.ZodArray<z.ZodObject<{
1021
+ name: z.ZodString;
1022
+ type: z.ZodEnum<["string", "number", "boolean", "object", "array"]>;
1023
+ required: z.ZodBoolean;
1024
+ description: z.ZodOptional<z.ZodString>;
1025
+ schema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1026
+ }, "strip", z.ZodTypeAny, {
1027
+ type: "string" | "number" | "boolean" | "object" | "array";
1028
+ name: string;
1029
+ required: boolean;
1030
+ description?: string | undefined;
1031
+ schema?: Record<string, unknown> | undefined;
1032
+ }, {
1033
+ type: "string" | "number" | "boolean" | "object" | "array";
1034
+ name: string;
1035
+ required: boolean;
1036
+ description?: string | undefined;
1037
+ schema?: Record<string, unknown> | undefined;
1038
+ }>, "many">>;
1039
+ responseSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1040
+ inputSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1041
+ requiresAuth: z.ZodBoolean;
1042
+ rateLimit: z.ZodOptional<z.ZodNumber>;
1043
+ searchHint: z.ZodOptional<z.ZodString>;
1044
+ alwaysInclude: z.ZodOptional<z.ZodBoolean>;
1045
+ interruptBehavior: z.ZodOptional<z.ZodEnum<["cancel", "block"]>>;
1046
+ updatedAt: z.ZodOptional<z.ZodString>;
1047
+ confidence: z.ZodOptional<z.ZodNumber>;
1048
+ evidence: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1049
+ validFrom: z.ZodOptional<z.ZodString>;
1050
+ validUntil: z.ZodOptional<z.ZodString>;
1051
+ approveIf: z.ZodOptional<z.ZodType<import("@duct-sdk/contracts").ApprovalPredicate, z.ZodTypeDef, import("@duct-sdk/contracts").ApprovalPredicate>>;
1052
+ actionLimit: z.ZodOptional<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1053
+ type: z.ZodLiteral<"rate">;
1054
+ maxPerWindow: z.ZodNumber;
1055
+ windowSeconds: z.ZodNumber;
1056
+ }, "strip", z.ZodTypeAny, {
1057
+ type: "rate";
1058
+ maxPerWindow: number;
1059
+ windowSeconds: number;
1060
+ }, {
1061
+ type: "rate";
1062
+ maxPerWindow: number;
1063
+ windowSeconds: number;
1064
+ }>, z.ZodObject<{
1065
+ type: z.ZodLiteral<"count">;
1066
+ maxCount: z.ZodNumber;
1067
+ }, "strip", z.ZodTypeAny, {
1068
+ type: "count";
1069
+ maxCount: number;
1070
+ }, {
1071
+ type: "count";
1072
+ maxCount: number;
1073
+ }>]>>;
1074
+ dependsOn: z.ZodOptional<z.ZodArray<z.ZodObject<{
1075
+ actionId: z.ZodString;
1076
+ paramMapping: z.ZodRecord<z.ZodString, z.ZodString>;
1077
+ }, "strip", z.ZodTypeAny, {
1078
+ actionId: string;
1079
+ paramMapping: Record<string, string>;
1080
+ }, {
1081
+ actionId: string;
1082
+ paramMapping: Record<string, string>;
1083
+ }>, "many">>;
1084
+ semanticType: z.ZodOptional<z.ZodEnum<["list", "entity", "status", "comparison", "timeline", "search_results"]>>;
1085
+ outputSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1086
+ paramMappings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1087
+ navigatesTo: z.ZodOptional<z.ZodString>;
1088
+ }, "searchHint" | "alwaysInclude" | "interruptBehavior" | "dependsOn" | "semanticType" | "outputSchema" | "paramMappings" | "navigatesTo">, "strict", z.ZodTypeAny, {
1089
+ searchHint?: string | undefined;
1090
+ alwaysInclude?: boolean | undefined;
1091
+ interruptBehavior?: "cancel" | "block" | undefined;
1092
+ dependsOn?: {
1093
+ actionId: string;
1094
+ paramMapping: Record<string, string>;
1095
+ }[] | undefined;
1096
+ semanticType?: "list" | "entity" | "status" | "comparison" | "timeline" | "search_results" | undefined;
1097
+ outputSchema?: Record<string, unknown> | undefined;
1098
+ paramMappings?: Record<string, string> | undefined;
1099
+ navigatesTo?: string | undefined;
1100
+ }, {
1101
+ searchHint?: string | undefined;
1102
+ alwaysInclude?: boolean | undefined;
1103
+ interruptBehavior?: "cancel" | "block" | undefined;
1104
+ dependsOn?: {
1105
+ actionId: string;
1106
+ paramMapping: Record<string, string>;
1107
+ }[] | undefined;
1108
+ semanticType?: "list" | "entity" | "status" | "comparison" | "timeline" | "search_results" | undefined;
1109
+ outputSchema?: Record<string, unknown> | undefined;
1110
+ paramMappings?: Record<string, string> | undefined;
1111
+ navigatesTo?: string | undefined;
1112
+ }>;
1113
+ export declare const ShellFileSchema: z.ZodObject<{
1114
+ widget: z.ZodOptional<z.ZodObject<{
1115
+ primaryColor: z.ZodOptional<z.ZodString>;
1116
+ position: z.ZodOptional<z.ZodEnum<["bottom-right", "bottom-left", "top-right", "top-left"]>>;
1117
+ defaultOpen: z.ZodOptional<z.ZodBoolean>;
1118
+ launcherText: z.ZodOptional<z.ZodString>;
1119
+ welcomeMessage: z.ZodOptional<z.ZodString>;
1120
+ hideLauncher: z.ZodOptional<z.ZodBoolean>;
1121
+ preset: z.ZodOptional<z.ZodEnum<["tall", "square", "large"]>>;
1122
+ placeholder: z.ZodOptional<z.ZodString>;
1123
+ theme: z.ZodOptional<z.ZodEnum<["light", "dark", "system"]>>;
1124
+ width: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
1125
+ height: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
1126
+ customCSS: z.ZodOptional<z.ZodString>;
1127
+ compactionTurns: z.ZodOptional<z.ZodNumber>;
1128
+ maxToolIterations: z.ZodOptional<z.ZodNumber>;
1129
+ maxPlanSteps: z.ZodOptional<z.ZodNumber>;
1130
+ }, "strip", z.ZodTypeAny, {
1131
+ primaryColor?: string | undefined;
1132
+ position?: "bottom-right" | "bottom-left" | "top-right" | "top-left" | undefined;
1133
+ defaultOpen?: boolean | undefined;
1134
+ launcherText?: string | undefined;
1135
+ welcomeMessage?: string | undefined;
1136
+ hideLauncher?: boolean | undefined;
1137
+ preset?: "tall" | "square" | "large" | undefined;
1138
+ placeholder?: string | undefined;
1139
+ theme?: "light" | "dark" | "system" | undefined;
1140
+ width?: string | number | undefined;
1141
+ height?: string | number | undefined;
1142
+ customCSS?: string | undefined;
1143
+ compactionTurns?: number | undefined;
1144
+ maxToolIterations?: number | undefined;
1145
+ maxPlanSteps?: number | undefined;
1146
+ }, {
1147
+ primaryColor?: string | undefined;
1148
+ position?: "bottom-right" | "bottom-left" | "top-right" | "top-left" | undefined;
1149
+ defaultOpen?: boolean | undefined;
1150
+ launcherText?: string | undefined;
1151
+ welcomeMessage?: string | undefined;
1152
+ hideLauncher?: boolean | undefined;
1153
+ preset?: "tall" | "square" | "large" | undefined;
1154
+ placeholder?: string | undefined;
1155
+ theme?: "light" | "dark" | "system" | undefined;
1156
+ width?: string | number | undefined;
1157
+ height?: string | number | undefined;
1158
+ customCSS?: string | undefined;
1159
+ compactionTurns?: number | undefined;
1160
+ maxToolIterations?: number | undefined;
1161
+ maxPlanSteps?: number | undefined;
1162
+ }>>;
1163
+ routes: z.ZodDefault<z.ZodArray<z.ZodObject<{
1164
+ path: z.ZodString;
1165
+ name: z.ZodString;
1166
+ description: z.ZodString;
1167
+ params: z.ZodDefault<z.ZodArray<z.ZodObject<{
1168
+ name: z.ZodString;
1169
+ type: z.ZodEnum<["string", "number", "uuid", "slug"]>;
1170
+ required: z.ZodBoolean;
1171
+ description: z.ZodOptional<z.ZodString>;
1172
+ }, "strip", z.ZodTypeAny, {
1173
+ type: "string" | "number" | "uuid" | "slug";
1174
+ name: string;
1175
+ required: boolean;
1176
+ description?: string | undefined;
1177
+ }, {
1178
+ type: "string" | "number" | "uuid" | "slug";
1179
+ name: string;
1180
+ required: boolean;
1181
+ description?: string | undefined;
1182
+ }>, "many">>;
1183
+ queryParams: z.ZodDefault<z.ZodArray<z.ZodObject<{
1184
+ name: z.ZodString;
1185
+ type: z.ZodEnum<["string", "number", "boolean", "string[]"]>;
1186
+ required: z.ZodBoolean;
1187
+ description: z.ZodOptional<z.ZodString>;
1188
+ defaultValue: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
1189
+ }, "strip", z.ZodTypeAny, {
1190
+ type: "string" | "number" | "boolean" | "string[]";
1191
+ name: string;
1192
+ required: boolean;
1193
+ description?: string | undefined;
1194
+ defaultValue?: string | number | boolean | undefined;
1195
+ }, {
1196
+ type: "string" | "number" | "boolean" | "string[]";
1197
+ name: string;
1198
+ required: boolean;
1199
+ description?: string | undefined;
1200
+ defaultValue?: string | number | boolean | undefined;
1201
+ }>, "many">>;
1202
+ uiStateHint: z.ZodEnum<["form", "list", "detail", "dashboard", "modal", "wizard", "empty", "error", "auth", "checkout", "profile", "settings", "search"]>;
1203
+ requiresAuth: z.ZodBoolean;
1204
+ deeplinkable: z.ZodBoolean;
1205
+ methods: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1206
+ updatedAt: z.ZodOptional<z.ZodString>;
1207
+ confidence: z.ZodOptional<z.ZodNumber>;
1208
+ evidence: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1209
+ searchAction: z.ZodOptional<z.ZodObject<{
1210
+ actionId: z.ZodString;
1211
+ paramMap: z.ZodRecord<z.ZodString, z.ZodString>;
1212
+ }, "strip", z.ZodTypeAny, {
1213
+ actionId: string;
1214
+ paramMap: Record<string, string>;
1215
+ }, {
1216
+ actionId: string;
1217
+ paramMap: Record<string, string>;
1218
+ }>>;
1219
+ }, "strip", z.ZodTypeAny, {
1220
+ name: string;
1221
+ params: {
1222
+ type: "string" | "number" | "uuid" | "slug";
1223
+ name: string;
1224
+ required: boolean;
1225
+ description?: string | undefined;
1226
+ }[];
1227
+ path: string;
1228
+ description: string;
1229
+ queryParams: {
1230
+ type: "string" | "number" | "boolean" | "string[]";
1231
+ name: string;
1232
+ required: boolean;
1233
+ description?: string | undefined;
1234
+ defaultValue?: string | number | boolean | undefined;
1235
+ }[];
1236
+ uiStateHint: "form" | "list" | "detail" | "dashboard" | "modal" | "wizard" | "empty" | "error" | "auth" | "checkout" | "profile" | "settings" | "search";
1237
+ requiresAuth: boolean;
1238
+ deeplinkable: boolean;
1239
+ methods?: string[] | undefined;
1240
+ updatedAt?: string | undefined;
1241
+ confidence?: number | undefined;
1242
+ evidence?: string[] | undefined;
1243
+ searchAction?: {
1244
+ actionId: string;
1245
+ paramMap: Record<string, string>;
1246
+ } | undefined;
1247
+ }, {
1248
+ name: string;
1249
+ path: string;
1250
+ description: string;
1251
+ uiStateHint: "form" | "list" | "detail" | "dashboard" | "modal" | "wizard" | "empty" | "error" | "auth" | "checkout" | "profile" | "settings" | "search";
1252
+ requiresAuth: boolean;
1253
+ deeplinkable: boolean;
1254
+ params?: {
1255
+ type: "string" | "number" | "uuid" | "slug";
1256
+ name: string;
1257
+ required: boolean;
1258
+ description?: string | undefined;
1259
+ }[] | undefined;
1260
+ queryParams?: {
1261
+ type: "string" | "number" | "boolean" | "string[]";
1262
+ name: string;
1263
+ required: boolean;
1264
+ description?: string | undefined;
1265
+ defaultValue?: string | number | boolean | undefined;
1266
+ }[] | undefined;
1267
+ methods?: string[] | undefined;
1268
+ updatedAt?: string | undefined;
1269
+ confidence?: number | undefined;
1270
+ evidence?: string[] | undefined;
1271
+ searchAction?: {
1272
+ actionId: string;
1273
+ paramMap: Record<string, string>;
1274
+ } | undefined;
1275
+ }>, "many">>;
1276
+ deeplinks: z.ZodDefault<z.ZodArray<z.ZodObject<{
1277
+ id: z.ZodString;
1278
+ name: z.ZodString;
1279
+ description: z.ZodString;
1280
+ targetRoute: z.ZodString;
1281
+ stateFields: z.ZodDefault<z.ZodArray<z.ZodObject<{
1282
+ key: z.ZodString;
1283
+ type: z.ZodEnum<["string", "number", "boolean", "object"]>;
1284
+ required: z.ZodBoolean;
1285
+ description: z.ZodOptional<z.ZodString>;
1286
+ sessionSource: z.ZodOptional<z.ZodString>;
1287
+ }, "strip", z.ZodTypeAny, {
1288
+ type: "string" | "number" | "boolean" | "object";
1289
+ required: boolean;
1290
+ key: string;
1291
+ description?: string | undefined;
1292
+ sessionSource?: string | undefined;
1293
+ }, {
1294
+ type: "string" | "number" | "boolean" | "object";
1295
+ required: boolean;
1296
+ key: string;
1297
+ description?: string | undefined;
1298
+ sessionSource?: string | undefined;
1299
+ }>, "many">>;
1300
+ expirySeconds: z.ZodDefault<z.ZodNumber>;
1301
+ requiresAuth: z.ZodBoolean;
1302
+ openInNewTab: z.ZodOptional<z.ZodBoolean>;
1303
+ intent: z.ZodOptional<z.ZodString>;
1304
+ pageResolver: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
1305
+ actionId: z.ZodString;
1306
+ }, "strip", z.ZodTypeAny, {
1307
+ actionId: string;
1308
+ }, {
1309
+ actionId: string;
1310
+ }>, z.ZodObject<{
1311
+ endpoint: z.ZodString;
1312
+ }, "strip", z.ZodTypeAny, {
1313
+ endpoint: string;
1314
+ }, {
1315
+ endpoint: string;
1316
+ }>]>>;
1317
+ allowFetch: z.ZodOptional<z.ZodBoolean>;
1318
+ contentSelector: z.ZodOptional<z.ZodString>;
1319
+ updatedAt: z.ZodOptional<z.ZodString>;
1320
+ }, "strip", z.ZodTypeAny, {
1321
+ id: string;
1322
+ name: string;
1323
+ description: string;
1324
+ requiresAuth: boolean;
1325
+ targetRoute: string;
1326
+ stateFields: {
1327
+ type: "string" | "number" | "boolean" | "object";
1328
+ required: boolean;
1329
+ key: string;
1330
+ description?: string | undefined;
1331
+ sessionSource?: string | undefined;
1332
+ }[];
1333
+ expirySeconds: number;
1334
+ updatedAt?: string | undefined;
1335
+ openInNewTab?: boolean | undefined;
1336
+ intent?: string | undefined;
1337
+ pageResolver?: {
1338
+ actionId: string;
1339
+ } | {
1340
+ endpoint: string;
1341
+ } | undefined;
1342
+ allowFetch?: boolean | undefined;
1343
+ contentSelector?: string | undefined;
1344
+ }, {
1345
+ id: string;
1346
+ name: string;
1347
+ description: string;
1348
+ requiresAuth: boolean;
1349
+ targetRoute: string;
1350
+ updatedAt?: string | undefined;
1351
+ stateFields?: {
1352
+ type: "string" | "number" | "boolean" | "object";
1353
+ required: boolean;
1354
+ key: string;
1355
+ description?: string | undefined;
1356
+ sessionSource?: string | undefined;
1357
+ }[] | undefined;
1358
+ expirySeconds?: number | undefined;
1359
+ openInNewTab?: boolean | undefined;
1360
+ intent?: string | undefined;
1361
+ pageResolver?: {
1362
+ actionId: string;
1363
+ } | {
1364
+ endpoint: string;
1365
+ } | undefined;
1366
+ allowFetch?: boolean | undefined;
1367
+ contentSelector?: string | undefined;
1368
+ }>, "many">>;
1369
+ dataModel: z.ZodOptional<z.ZodObject<{
1370
+ entities: z.ZodArray<z.ZodObject<{
1371
+ id: z.ZodString;
1372
+ label: z.ZodString;
1373
+ discoveryAction: z.ZodString;
1374
+ fetchAction: z.ZodString;
1375
+ indexKey: z.ZodString;
1376
+ labelKey: z.ZodString;
1377
+ dimensions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1378
+ }, "strip", z.ZodTypeAny, {
1379
+ id: string;
1380
+ label: string;
1381
+ discoveryAction: string;
1382
+ fetchAction: string;
1383
+ indexKey: string;
1384
+ labelKey: string;
1385
+ dimensions?: string[] | undefined;
1386
+ }, {
1387
+ id: string;
1388
+ label: string;
1389
+ discoveryAction: string;
1390
+ fetchAction: string;
1391
+ indexKey: string;
1392
+ labelKey: string;
1393
+ dimensions?: string[] | undefined;
1394
+ }>, "many">;
1395
+ }, "strip", z.ZodTypeAny, {
1396
+ entities: {
1397
+ id: string;
1398
+ label: string;
1399
+ discoveryAction: string;
1400
+ fetchAction: string;
1401
+ indexKey: string;
1402
+ labelKey: string;
1403
+ dimensions?: string[] | undefined;
1404
+ }[];
1405
+ }, {
1406
+ entities: {
1407
+ id: string;
1408
+ label: string;
1409
+ discoveryAction: string;
1410
+ fetchAction: string;
1411
+ indexKey: string;
1412
+ labelKey: string;
1413
+ dimensions?: string[] | undefined;
1414
+ }[];
1415
+ }>>;
1416
+ /** Chat-only hints per action id: search hints, UI shape, chaining. */
1417
+ actionHints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodLazy<z.ZodObject<Pick<{
1418
+ id: z.ZodString;
1419
+ name: z.ZodString;
1420
+ description: z.ZodString;
1421
+ method: z.ZodEnum<["GET", "POST", "PUT", "PATCH", "DELETE"]>;
1422
+ path: z.ZodString;
1423
+ agentAccessible: z.ZodBoolean;
1424
+ sideEffects: z.ZodBoolean;
1425
+ sideEffectsReviewAck: z.ZodOptional<z.ZodString>;
1426
+ sensitivityLevel: z.ZodEnum<["none", "low", "medium", "high", "critical"]>;
1427
+ params: z.ZodDefault<z.ZodArray<z.ZodObject<{
1428
+ name: z.ZodString;
1429
+ type: z.ZodEnum<["string", "number", "boolean", "object", "array"]>;
1430
+ required: z.ZodBoolean;
1431
+ description: z.ZodOptional<z.ZodString>;
1432
+ schema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1433
+ }, "strip", z.ZodTypeAny, {
1434
+ type: "string" | "number" | "boolean" | "object" | "array";
1435
+ name: string;
1436
+ required: boolean;
1437
+ description?: string | undefined;
1438
+ schema?: Record<string, unknown> | undefined;
1439
+ }, {
1440
+ type: "string" | "number" | "boolean" | "object" | "array";
1441
+ name: string;
1442
+ required: boolean;
1443
+ description?: string | undefined;
1444
+ schema?: Record<string, unknown> | undefined;
1445
+ }>, "many">>;
1446
+ responseSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1447
+ inputSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1448
+ requiresAuth: z.ZodBoolean;
1449
+ rateLimit: z.ZodOptional<z.ZodNumber>;
1450
+ searchHint: z.ZodOptional<z.ZodString>;
1451
+ alwaysInclude: z.ZodOptional<z.ZodBoolean>;
1452
+ interruptBehavior: z.ZodOptional<z.ZodEnum<["cancel", "block"]>>;
1453
+ updatedAt: z.ZodOptional<z.ZodString>;
1454
+ confidence: z.ZodOptional<z.ZodNumber>;
1455
+ evidence: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1456
+ validFrom: z.ZodOptional<z.ZodString>;
1457
+ validUntil: z.ZodOptional<z.ZodString>;
1458
+ approveIf: z.ZodOptional<z.ZodType<import("@duct-sdk/contracts").ApprovalPredicate, z.ZodTypeDef, import("@duct-sdk/contracts").ApprovalPredicate>>;
1459
+ actionLimit: z.ZodOptional<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1460
+ type: z.ZodLiteral<"rate">;
1461
+ maxPerWindow: z.ZodNumber;
1462
+ windowSeconds: z.ZodNumber;
1463
+ }, "strip", z.ZodTypeAny, {
1464
+ type: "rate";
1465
+ maxPerWindow: number;
1466
+ windowSeconds: number;
1467
+ }, {
1468
+ type: "rate";
1469
+ maxPerWindow: number;
1470
+ windowSeconds: number;
1471
+ }>, z.ZodObject<{
1472
+ type: z.ZodLiteral<"count">;
1473
+ maxCount: z.ZodNumber;
1474
+ }, "strip", z.ZodTypeAny, {
1475
+ type: "count";
1476
+ maxCount: number;
1477
+ }, {
1478
+ type: "count";
1479
+ maxCount: number;
1480
+ }>]>>;
1481
+ dependsOn: z.ZodOptional<z.ZodArray<z.ZodObject<{
1482
+ actionId: z.ZodString;
1483
+ paramMapping: z.ZodRecord<z.ZodString, z.ZodString>;
1484
+ }, "strip", z.ZodTypeAny, {
1485
+ actionId: string;
1486
+ paramMapping: Record<string, string>;
1487
+ }, {
1488
+ actionId: string;
1489
+ paramMapping: Record<string, string>;
1490
+ }>, "many">>;
1491
+ semanticType: z.ZodOptional<z.ZodEnum<["list", "entity", "status", "comparison", "timeline", "search_results"]>>;
1492
+ outputSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1493
+ paramMappings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1494
+ navigatesTo: z.ZodOptional<z.ZodString>;
1495
+ }, "searchHint" | "alwaysInclude" | "interruptBehavior" | "dependsOn" | "semanticType" | "outputSchema" | "paramMappings" | "navigatesTo">, "strict", z.ZodTypeAny, {
1496
+ searchHint?: string | undefined;
1497
+ alwaysInclude?: boolean | undefined;
1498
+ interruptBehavior?: "cancel" | "block" | undefined;
1499
+ dependsOn?: {
1500
+ actionId: string;
1501
+ paramMapping: Record<string, string>;
1502
+ }[] | undefined;
1503
+ semanticType?: "list" | "entity" | "status" | "comparison" | "timeline" | "search_results" | undefined;
1504
+ outputSchema?: Record<string, unknown> | undefined;
1505
+ paramMappings?: Record<string, string> | undefined;
1506
+ navigatesTo?: string | undefined;
1507
+ }, {
1508
+ searchHint?: string | undefined;
1509
+ alwaysInclude?: boolean | undefined;
1510
+ interruptBehavior?: "cancel" | "block" | undefined;
1511
+ dependsOn?: {
1512
+ actionId: string;
1513
+ paramMapping: Record<string, string>;
1514
+ }[] | undefined;
1515
+ semanticType?: "list" | "entity" | "status" | "comparison" | "timeline" | "search_results" | undefined;
1516
+ outputSchema?: Record<string, unknown> | undefined;
1517
+ paramMappings?: Record<string, string> | undefined;
1518
+ navigatesTo?: string | undefined;
1519
+ }>>>>;
1520
+ }, "strict", z.ZodTypeAny, {
1521
+ routes: {
1522
+ name: string;
1523
+ params: {
1524
+ type: "string" | "number" | "uuid" | "slug";
1525
+ name: string;
1526
+ required: boolean;
1527
+ description?: string | undefined;
1528
+ }[];
1529
+ path: string;
1530
+ description: string;
1531
+ queryParams: {
1532
+ type: "string" | "number" | "boolean" | "string[]";
1533
+ name: string;
1534
+ required: boolean;
1535
+ description?: string | undefined;
1536
+ defaultValue?: string | number | boolean | undefined;
1537
+ }[];
1538
+ uiStateHint: "form" | "list" | "detail" | "dashboard" | "modal" | "wizard" | "empty" | "error" | "auth" | "checkout" | "profile" | "settings" | "search";
1539
+ requiresAuth: boolean;
1540
+ deeplinkable: boolean;
1541
+ methods?: string[] | undefined;
1542
+ updatedAt?: string | undefined;
1543
+ confidence?: number | undefined;
1544
+ evidence?: string[] | undefined;
1545
+ searchAction?: {
1546
+ actionId: string;
1547
+ paramMap: Record<string, string>;
1548
+ } | undefined;
1549
+ }[];
1550
+ deeplinks: {
1551
+ id: string;
1552
+ name: string;
1553
+ description: string;
1554
+ requiresAuth: boolean;
1555
+ targetRoute: string;
1556
+ stateFields: {
1557
+ type: "string" | "number" | "boolean" | "object";
1558
+ required: boolean;
1559
+ key: string;
1560
+ description?: string | undefined;
1561
+ sessionSource?: string | undefined;
1562
+ }[];
1563
+ expirySeconds: number;
1564
+ updatedAt?: string | undefined;
1565
+ openInNewTab?: boolean | undefined;
1566
+ intent?: string | undefined;
1567
+ pageResolver?: {
1568
+ actionId: string;
1569
+ } | {
1570
+ endpoint: string;
1571
+ } | undefined;
1572
+ allowFetch?: boolean | undefined;
1573
+ contentSelector?: string | undefined;
1574
+ }[];
1575
+ widget?: {
1576
+ primaryColor?: string | undefined;
1577
+ position?: "bottom-right" | "bottom-left" | "top-right" | "top-left" | undefined;
1578
+ defaultOpen?: boolean | undefined;
1579
+ launcherText?: string | undefined;
1580
+ welcomeMessage?: string | undefined;
1581
+ hideLauncher?: boolean | undefined;
1582
+ preset?: "tall" | "square" | "large" | undefined;
1583
+ placeholder?: string | undefined;
1584
+ theme?: "light" | "dark" | "system" | undefined;
1585
+ width?: string | number | undefined;
1586
+ height?: string | number | undefined;
1587
+ customCSS?: string | undefined;
1588
+ compactionTurns?: number | undefined;
1589
+ maxToolIterations?: number | undefined;
1590
+ maxPlanSteps?: number | undefined;
1591
+ } | undefined;
1592
+ dataModel?: {
1593
+ entities: {
1594
+ id: string;
1595
+ label: string;
1596
+ discoveryAction: string;
1597
+ fetchAction: string;
1598
+ indexKey: string;
1599
+ labelKey: string;
1600
+ dimensions?: string[] | undefined;
1601
+ }[];
1602
+ } | undefined;
1603
+ actionHints?: Record<string, {
1604
+ searchHint?: string | undefined;
1605
+ alwaysInclude?: boolean | undefined;
1606
+ interruptBehavior?: "cancel" | "block" | undefined;
1607
+ dependsOn?: {
1608
+ actionId: string;
1609
+ paramMapping: Record<string, string>;
1610
+ }[] | undefined;
1611
+ semanticType?: "list" | "entity" | "status" | "comparison" | "timeline" | "search_results" | undefined;
1612
+ outputSchema?: Record<string, unknown> | undefined;
1613
+ paramMappings?: Record<string, string> | undefined;
1614
+ navigatesTo?: string | undefined;
1615
+ }> | undefined;
1616
+ }, {
1617
+ routes?: {
1618
+ name: string;
1619
+ path: string;
1620
+ description: string;
1621
+ uiStateHint: "form" | "list" | "detail" | "dashboard" | "modal" | "wizard" | "empty" | "error" | "auth" | "checkout" | "profile" | "settings" | "search";
1622
+ requiresAuth: boolean;
1623
+ deeplinkable: boolean;
1624
+ params?: {
1625
+ type: "string" | "number" | "uuid" | "slug";
1626
+ name: string;
1627
+ required: boolean;
1628
+ description?: string | undefined;
1629
+ }[] | undefined;
1630
+ queryParams?: {
1631
+ type: "string" | "number" | "boolean" | "string[]";
1632
+ name: string;
1633
+ required: boolean;
1634
+ description?: string | undefined;
1635
+ defaultValue?: string | number | boolean | undefined;
1636
+ }[] | undefined;
1637
+ methods?: string[] | undefined;
1638
+ updatedAt?: string | undefined;
1639
+ confidence?: number | undefined;
1640
+ evidence?: string[] | undefined;
1641
+ searchAction?: {
1642
+ actionId: string;
1643
+ paramMap: Record<string, string>;
1644
+ } | undefined;
1645
+ }[] | undefined;
1646
+ deeplinks?: {
1647
+ id: string;
1648
+ name: string;
1649
+ description: string;
1650
+ requiresAuth: boolean;
1651
+ targetRoute: string;
1652
+ updatedAt?: string | undefined;
1653
+ stateFields?: {
1654
+ type: "string" | "number" | "boolean" | "object";
1655
+ required: boolean;
1656
+ key: string;
1657
+ description?: string | undefined;
1658
+ sessionSource?: string | undefined;
1659
+ }[] | undefined;
1660
+ expirySeconds?: number | undefined;
1661
+ openInNewTab?: boolean | undefined;
1662
+ intent?: string | undefined;
1663
+ pageResolver?: {
1664
+ actionId: string;
1665
+ } | {
1666
+ endpoint: string;
1667
+ } | undefined;
1668
+ allowFetch?: boolean | undefined;
1669
+ contentSelector?: string | undefined;
1670
+ }[] | undefined;
1671
+ widget?: {
1672
+ primaryColor?: string | undefined;
1673
+ position?: "bottom-right" | "bottom-left" | "top-right" | "top-left" | undefined;
1674
+ defaultOpen?: boolean | undefined;
1675
+ launcherText?: string | undefined;
1676
+ welcomeMessage?: string | undefined;
1677
+ hideLauncher?: boolean | undefined;
1678
+ preset?: "tall" | "square" | "large" | undefined;
1679
+ placeholder?: string | undefined;
1680
+ theme?: "light" | "dark" | "system" | undefined;
1681
+ width?: string | number | undefined;
1682
+ height?: string | number | undefined;
1683
+ customCSS?: string | undefined;
1684
+ compactionTurns?: number | undefined;
1685
+ maxToolIterations?: number | undefined;
1686
+ maxPlanSteps?: number | undefined;
1687
+ } | undefined;
1688
+ dataModel?: {
1689
+ entities: {
1690
+ id: string;
1691
+ label: string;
1692
+ discoveryAction: string;
1693
+ fetchAction: string;
1694
+ indexKey: string;
1695
+ labelKey: string;
1696
+ dimensions?: string[] | undefined;
1697
+ }[];
1698
+ } | undefined;
1699
+ actionHints?: Record<string, {
1700
+ searchHint?: string | undefined;
1701
+ alwaysInclude?: boolean | undefined;
1702
+ interruptBehavior?: "cancel" | "block" | undefined;
1703
+ dependsOn?: {
1704
+ actionId: string;
1705
+ paramMapping: Record<string, string>;
1706
+ }[] | undefined;
1707
+ semanticType?: "list" | "entity" | "status" | "comparison" | "timeline" | "search_results" | undefined;
1708
+ outputSchema?: Record<string, unknown> | undefined;
1709
+ paramMappings?: Record<string, string> | undefined;
1710
+ navigatesTo?: string | undefined;
1711
+ }> | undefined;
1712
+ }>;
1713
+ export declare const PolicyExpectationSchema: z.ZodEnum<["allow", "deny", "approval", "blocked"]>;
1714
+ export declare const PolicyTestCaseSchema: z.ZodObject<{
1715
+ name: z.ZodOptional<z.ZodString>;
1716
+ /** Who is calling: an external agent, a signed-in user in the shell, or a guest. */
1717
+ as: z.ZodEnum<["agent", "user", "guest"]>;
1718
+ action: z.ZodString;
1719
+ params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1720
+ withUserConsent: z.ZodOptional<z.ZodBoolean>;
1721
+ /** `blocked` = must not run without a human (deny or approval). */
1722
+ expect: z.ZodEnum<["allow", "deny", "approval", "blocked"]>;
1723
+ }, "strict", z.ZodTypeAny, {
1724
+ action: string;
1725
+ as: "agent" | "user" | "guest";
1726
+ expect: "allow" | "deny" | "approval" | "blocked";
1727
+ name?: string | undefined;
1728
+ params?: Record<string, unknown> | undefined;
1729
+ withUserConsent?: boolean | undefined;
1730
+ }, {
1731
+ action: string;
1732
+ as: "agent" | "user" | "guest";
1733
+ expect: "allow" | "deny" | "approval" | "blocked";
1734
+ name?: string | undefined;
1735
+ params?: Record<string, unknown> | undefined;
1736
+ withUserConsent?: boolean | undefined;
1737
+ }>;
1738
+ export declare const TestsFileSchema: z.ZodObject<{
1739
+ policy: z.ZodDefault<z.ZodArray<z.ZodObject<{
1740
+ name: z.ZodOptional<z.ZodString>;
1741
+ /** Who is calling: an external agent, a signed-in user in the shell, or a guest. */
1742
+ as: z.ZodEnum<["agent", "user", "guest"]>;
1743
+ action: z.ZodString;
1744
+ params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1745
+ withUserConsent: z.ZodOptional<z.ZodBoolean>;
1746
+ /** `blocked` = must not run without a human (deny or approval). */
1747
+ expect: z.ZodEnum<["allow", "deny", "approval", "blocked"]>;
1748
+ }, "strict", z.ZodTypeAny, {
1749
+ action: string;
1750
+ as: "agent" | "user" | "guest";
1751
+ expect: "allow" | "deny" | "approval" | "blocked";
1752
+ name?: string | undefined;
1753
+ params?: Record<string, unknown> | undefined;
1754
+ withUserConsent?: boolean | undefined;
1755
+ }, {
1756
+ action: string;
1757
+ as: "agent" | "user" | "guest";
1758
+ expect: "allow" | "deny" | "approval" | "blocked";
1759
+ name?: string | undefined;
1760
+ params?: Record<string, unknown> | undefined;
1761
+ withUserConsent?: boolean | undefined;
1762
+ }>, "many">>;
1763
+ }, "strict", z.ZodTypeAny, {
1764
+ policy: {
1765
+ action: string;
1766
+ as: "agent" | "user" | "guest";
1767
+ expect: "allow" | "deny" | "approval" | "blocked";
1768
+ name?: string | undefined;
1769
+ params?: Record<string, unknown> | undefined;
1770
+ withUserConsent?: boolean | undefined;
1771
+ }[];
1772
+ }, {
1773
+ policy?: {
1774
+ action: string;
1775
+ as: "agent" | "user" | "guest";
1776
+ expect: "allow" | "deny" | "approval" | "blocked";
1777
+ name?: string | undefined;
1778
+ params?: Record<string, unknown> | undefined;
1779
+ withUserConsent?: boolean | undefined;
1780
+ }[] | undefined;
1781
+ }>;
1782
+ export type ProjectFile = z.input<typeof ProjectFileSchema>;
1783
+ export type CapabilitiesFile = z.input<typeof CapabilitiesFileSchema>;
1784
+ export type CapabilityAction = z.output<typeof CapabilityActionSchema>;
1785
+ export type PolicyFile = z.input<typeof PolicyFileSchema>;
1786
+ export type ShellFile = z.input<typeof ShellFileSchema>;
1787
+ export type TestsFile = z.input<typeof TestsFileSchema>;
1788
+ export type PolicyTestCase = z.output<typeof PolicyTestCaseSchema>;
1789
+ export type PolicyExpectation = z.infer<typeof PolicyExpectationSchema>;
1790
+ export type ParsedProjectFile = z.output<typeof ProjectFileSchema>;
1791
+ export type ParsedCapabilitiesFile = z.output<typeof CapabilitiesFileSchema>;
1792
+ export type ParsedPolicyFile = z.output<typeof PolicyFileSchema>;
1793
+ export type ParsedShellFile = z.output<typeof ShellFileSchema>;
1794
+ export type ParsedTestsFile = z.output<typeof TestsFileSchema>;
1795
+ export declare function defineProject(project: ProjectFile): ProjectFile;
1796
+ export declare function definePolicy(policy: PolicyFile): PolicyFile;
1797
+ export declare function defineShell(shell: ShellFile): ShellFile;
1798
+ export declare function defineTests(tests: TestsFile): TestsFile;