airlock-bot 0.2.38 → 0.3.1

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 (200) hide show
  1. package/README.md +21 -39
  2. package/dist/airlock/tools.d.ts +4 -0
  3. package/dist/airlock/tools.d.ts.map +1 -1
  4. package/dist/airlock/tools.js +12 -0
  5. package/dist/airlock/tools.js.map +1 -1
  6. package/dist/audit/db.d.ts +7 -0
  7. package/dist/audit/db.d.ts.map +1 -1
  8. package/dist/audit/db.js +19 -3
  9. package/dist/audit/db.js.map +1 -1
  10. package/dist/backend/airlock-adapter.d.ts +10 -0
  11. package/dist/backend/airlock-adapter.d.ts.map +1 -1
  12. package/dist/backend/airlock-adapter.js +183 -1
  13. package/dist/backend/airlock-adapter.js.map +1 -1
  14. package/dist/backend/cli/builder.d.ts.map +1 -1
  15. package/dist/backend/cli/builder.js +10 -3
  16. package/dist/backend/cli/builder.js.map +1 -1
  17. package/dist/backend/mcp-adapter.d.ts +1 -0
  18. package/dist/backend/mcp-adapter.d.ts.map +1 -1
  19. package/dist/backend/mcp-adapter.js +5 -0
  20. package/dist/backend/mcp-adapter.js.map +1 -1
  21. package/dist/backend/openapi/adapter.d.ts.map +1 -1
  22. package/dist/backend/openapi/adapter.js +33 -18
  23. package/dist/backend/openapi/adapter.js.map +1 -1
  24. package/dist/backend/types.d.ts +8 -0
  25. package/dist/backend/types.d.ts.map +1 -1
  26. package/dist/config/loader.d.ts.map +1 -1
  27. package/dist/config/loader.js +71 -279
  28. package/dist/config/loader.js.map +1 -1
  29. package/dist/config/profiles.d.ts +3 -1
  30. package/dist/config/profiles.d.ts.map +1 -1
  31. package/dist/config/profiles.js +63 -0
  32. package/dist/config/profiles.js.map +1 -1
  33. package/dist/config/schema.d.ts +3109 -147
  34. package/dist/config/schema.d.ts.map +1 -1
  35. package/dist/config/schema.js +253 -2
  36. package/dist/config/schema.js.map +1 -1
  37. package/dist/configure-cli/cli.d.ts.map +1 -1
  38. package/dist/configure-cli/cli.js +1 -2
  39. package/dist/configure-cli/cli.js.map +1 -1
  40. package/dist/configure-web/cli.d.ts.map +1 -1
  41. package/dist/configure-web/cli.js +108 -2
  42. package/dist/configure-web/cli.js.map +1 -1
  43. package/dist/discover/strategies/completion.d.ts.map +1 -1
  44. package/dist/discover/strategies/completion.js +3 -3
  45. package/dist/discover/strategies/completion.js.map +1 -1
  46. package/dist/gateway.d.ts +6 -0
  47. package/dist/gateway.d.ts.map +1 -1
  48. package/dist/gateway.js +96 -6
  49. package/dist/gateway.js.map +1 -1
  50. package/dist/hitl/approval-dashboard.d.ts +4 -1
  51. package/dist/hitl/approval-dashboard.d.ts.map +1 -1
  52. package/dist/hitl/approval-dashboard.js +21 -1
  53. package/dist/hitl/approval-dashboard.js.map +1 -1
  54. package/dist/hitl/batcher.d.ts +2 -0
  55. package/dist/hitl/batcher.d.ts.map +1 -1
  56. package/dist/hitl/batcher.js +16 -0
  57. package/dist/hitl/batcher.js.map +1 -1
  58. package/dist/hitl/engine.d.ts +13 -0
  59. package/dist/hitl/engine.d.ts.map +1 -1
  60. package/dist/hitl/engine.js +3 -0
  61. package/dist/hitl/engine.js.map +1 -1
  62. package/dist/hitl/preview.d.ts +41 -0
  63. package/dist/hitl/preview.d.ts.map +1 -0
  64. package/dist/hitl/preview.js +235 -0
  65. package/dist/hitl/preview.js.map +1 -0
  66. package/dist/hitl/provider-factory.d.ts +2 -0
  67. package/dist/hitl/provider-factory.d.ts.map +1 -1
  68. package/dist/hitl/provider-factory.js +1 -1
  69. package/dist/hitl/provider-factory.js.map +1 -1
  70. package/dist/hitl/providers/dashboard.d.ts +3 -1
  71. package/dist/hitl/providers/dashboard.d.ts.map +1 -1
  72. package/dist/hitl/providers/dashboard.js +4 -2
  73. package/dist/hitl/providers/dashboard.js.map +1 -1
  74. package/dist/introspect/cli.d.ts +25 -1
  75. package/dist/introspect/cli.d.ts.map +1 -1
  76. package/dist/introspect/cli.js +97 -3
  77. package/dist/introspect/cli.js.map +1 -1
  78. package/dist/middleware/chain-builder.d.ts +1 -1
  79. package/dist/middleware/chain-builder.d.ts.map +1 -1
  80. package/dist/middleware/chain-builder.js +4 -2
  81. package/dist/middleware/chain-builder.js.map +1 -1
  82. package/dist/middleware/core/allowlist.d.ts.map +1 -1
  83. package/dist/middleware/core/allowlist.js +1 -0
  84. package/dist/middleware/core/allowlist.js.map +1 -1
  85. package/dist/middleware/core/arg-policy.d.ts.map +1 -1
  86. package/dist/middleware/core/arg-policy.js +2 -0
  87. package/dist/middleware/core/arg-policy.js.map +1 -1
  88. package/dist/middleware/core/command-policy.d.ts +13 -0
  89. package/dist/middleware/core/command-policy.d.ts.map +1 -0
  90. package/dist/middleware/core/command-policy.js +94 -0
  91. package/dist/middleware/core/command-policy.js.map +1 -0
  92. package/dist/middleware/core/exec-policy.d.ts.map +1 -1
  93. package/dist/middleware/core/exec-policy.js +1 -0
  94. package/dist/middleware/core/exec-policy.js.map +1 -1
  95. package/dist/middleware/core/execute.d.ts +2 -0
  96. package/dist/middleware/core/execute.d.ts.map +1 -1
  97. package/dist/middleware/core/execute.js +73 -1
  98. package/dist/middleware/core/execute.js.map +1 -1
  99. package/dist/middleware/core/hitl-gate.d.ts.map +1 -1
  100. package/dist/middleware/core/hitl-gate.js +7 -0
  101. package/dist/middleware/core/hitl-gate.js.map +1 -1
  102. package/dist/middleware/detectors/injection-detector.d.ts.map +1 -1
  103. package/dist/middleware/detectors/injection-detector.js +2 -0
  104. package/dist/middleware/detectors/injection-detector.js.map +1 -1
  105. package/dist/middleware/detectors/sensitivity-classifier.js +1 -0
  106. package/dist/middleware/detectors/sensitivity-classifier.js.map +1 -1
  107. package/dist/middleware/post/canary-token-injector.d.ts.map +1 -1
  108. package/dist/middleware/post/canary-token-injector.js +1 -0
  109. package/dist/middleware/post/canary-token-injector.js.map +1 -1
  110. package/dist/middleware/post/output-injection-detector.d.ts.map +1 -1
  111. package/dist/middleware/post/output-injection-detector.js +1 -0
  112. package/dist/middleware/post/output-injection-detector.js.map +1 -1
  113. package/dist/middleware/post/untrusted-envelope.d.ts.map +1 -1
  114. package/dist/middleware/post/untrusted-envelope.js +7 -0
  115. package/dist/middleware/post/untrusted-envelope.js.map +1 -1
  116. package/dist/mobile/api.d.ts +2 -0
  117. package/dist/mobile/api.d.ts.map +1 -1
  118. package/dist/mobile/api.js +21 -1
  119. package/dist/mobile/api.js.map +1 -1
  120. package/dist/mobile/apns.d.ts.map +1 -1
  121. package/dist/mobile/apns.js +2 -1
  122. package/dist/mobile/apns.js.map +1 -1
  123. package/dist/pool/client-credentials.d.ts +46 -0
  124. package/dist/pool/client-credentials.d.ts.map +1 -0
  125. package/dist/pool/client-credentials.js +204 -0
  126. package/dist/pool/client-credentials.js.map +1 -0
  127. package/dist/pool/credential-health.d.ts +54 -0
  128. package/dist/pool/credential-health.d.ts.map +1 -0
  129. package/dist/pool/credential-health.js +262 -0
  130. package/dist/pool/credential-health.js.map +1 -0
  131. package/dist/pool/http-client.d.ts +49 -1
  132. package/dist/pool/http-client.d.ts.map +1 -1
  133. package/dist/pool/http-client.js +298 -16
  134. package/dist/pool/http-client.js.map +1 -1
  135. package/dist/pool/oauth-provider.d.ts +21 -0
  136. package/dist/pool/oauth-provider.d.ts.map +1 -1
  137. package/dist/pool/oauth-provider.js +117 -8
  138. package/dist/pool/oauth-provider.js.map +1 -1
  139. package/dist/pool/oauth-timing.d.ts +3 -0
  140. package/dist/pool/oauth-timing.d.ts.map +1 -0
  141. package/dist/pool/oauth-timing.js +8 -0
  142. package/dist/pool/oauth-timing.js.map +1 -0
  143. package/dist/pool/pool.d.ts +6 -0
  144. package/dist/pool/pool.d.ts.map +1 -1
  145. package/dist/pool/pool.js +15 -2
  146. package/dist/pool/pool.js.map +1 -1
  147. package/dist/pool/sse-client.d.ts +7 -0
  148. package/dist/pool/sse-client.d.ts.map +1 -1
  149. package/dist/pool/sse-client.js +41 -3
  150. package/dist/pool/sse-client.js.map +1 -1
  151. package/dist/pool/status.d.ts +6 -0
  152. package/dist/pool/status.d.ts.map +1 -0
  153. package/dist/pool/status.js +2 -0
  154. package/dist/pool/status.js.map +1 -0
  155. package/dist/pool/stdio-client.d.ts +8 -0
  156. package/dist/pool/stdio-client.d.ts.map +1 -1
  157. package/dist/pool/stdio-client.js +34 -1
  158. package/dist/pool/stdio-client.js.map +1 -1
  159. package/dist/registry/registry.d.ts +47 -4
  160. package/dist/registry/registry.d.ts.map +1 -1
  161. package/dist/registry/registry.js +145 -10
  162. package/dist/registry/registry.js.map +1 -1
  163. package/dist/registry/sanitizer.d.ts +16 -1
  164. package/dist/registry/sanitizer.d.ts.map +1 -1
  165. package/dist/registry/sanitizer.js +70 -11
  166. package/dist/registry/sanitizer.js.map +1 -1
  167. package/dist/stdio-mode.d.ts.map +1 -1
  168. package/dist/stdio-mode.js +69 -7
  169. package/dist/stdio-mode.js.map +1 -1
  170. package/dist/tools/api.d.ts +1 -0
  171. package/dist/tools/api.d.ts.map +1 -1
  172. package/dist/tools/api.js +10 -2
  173. package/dist/tools/api.js.map +1 -1
  174. package/dist/transport/agent-server.d.ts.map +1 -1
  175. package/dist/transport/agent-server.js +24 -1
  176. package/dist/transport/agent-server.js.map +1 -1
  177. package/dist/transport/http-server.d.ts +2 -0
  178. package/dist/transport/http-server.d.ts.map +1 -1
  179. package/dist/transport/http-server.js +59 -3
  180. package/dist/transport/http-server.js.map +1 -1
  181. package/dist/transport/keepalive.d.ts +27 -0
  182. package/dist/transport/keepalive.d.ts.map +1 -0
  183. package/dist/transport/keepalive.js +30 -0
  184. package/dist/transport/keepalive.js.map +1 -0
  185. package/dist/transport/session-limiter.d.ts +84 -0
  186. package/dist/transport/session-limiter.d.ts.map +1 -0
  187. package/dist/transport/session-limiter.js +189 -0
  188. package/dist/transport/session-limiter.js.map +1 -0
  189. package/dist/transport/sse-server.d.ts +2 -0
  190. package/dist/transport/sse-server.d.ts.map +1 -1
  191. package/dist/transport/sse-server.js +17 -3
  192. package/dist/transport/sse-server.js.map +1 -1
  193. package/dist/util/atomic-file.d.ts +9 -0
  194. package/dist/util/atomic-file.d.ts.map +1 -0
  195. package/dist/util/atomic-file.js +39 -0
  196. package/dist/util/atomic-file.js.map +1 -0
  197. package/examples/airlock.yaml +55 -0
  198. package/examples/approval-previews.yaml +144 -0
  199. package/package.json +3 -3
  200. package/schema.json +682 -4
@@ -1,6 +1,115 @@
1
1
  import { z } from 'zod';
2
2
  export declare function withEnvVarResolution<T>(resolve: boolean, fn: () => T): T;
3
+ /**
4
+ * A cheap, read-only call used to prove the provider's CREDENTIAL still works — as opposed to
5
+ * `mcpHealth`, which only proves the transport is reachable. The distinction is not academic: a
6
+ * Google Workspace sidecar answers MCP happily for weeks after its refresh token dies, so the
7
+ * gateway reported `ok` the entire time nobody could read mail.
8
+ *
9
+ * Pick the cheapest read the provider offers, and scope it tightly — this runs unattended.
10
+ *
11
+ * Classification: a thrown error or an `isError` result is a failure, and the failure text decides
12
+ * `auth_required` vs `error`. Providers that report expired credentials as a SUCCESSFUL text
13
+ * response (the Google sidecar's "ACTION REQUIRED: authorize…" is one) can't be caught that way,
14
+ * which is what `expect_contains` / `reject_contains` are for. Prefer `expect_contains` and anchor
15
+ * it on the shape of a healthy response: `reject_contains` matches the whole payload, so a probe
16
+ * that returns user data can trip on the phrase appearing in that data (an email subject line
17
+ * reading "Action Required" would do it).
18
+ */
19
+ export declare const CredentialProbeConfig: z.ZodObject<{
20
+ /** Provider-local tool name — unprefixed, e.g. `search_gmail_messages`. */
21
+ tool: z.ZodString;
22
+ args: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
23
+ /** Healthy responses must contain this substring; otherwise the credential is auth_required. */
24
+ expect_contains: z.ZodOptional<z.ZodString>;
25
+ /** Healthy responses must NOT contain this substring. See the caveat above. */
26
+ reject_contains: z.ZodOptional<z.ZodString>;
27
+ /** Cache TTL. Floored at a minute so a hot /health poll can't hammer a provider's API quota. */
28
+ interval_ms: z.ZodDefault<z.ZodNumber>;
29
+ timeout_ms: z.ZodDefault<z.ZodNumber>;
30
+ }, "strict", z.ZodTypeAny, {
31
+ tool: string;
32
+ args: Record<string, unknown>;
33
+ interval_ms: number;
34
+ timeout_ms: number;
35
+ expect_contains?: string | undefined;
36
+ reject_contains?: string | undefined;
37
+ }, {
38
+ tool: string;
39
+ args?: Record<string, unknown> | undefined;
40
+ expect_contains?: string | undefined;
41
+ reject_contains?: string | undefined;
42
+ interval_ms?: number | undefined;
43
+ timeout_ms?: number | undefined;
44
+ }>;
45
+ export type CredentialProbeConfig = z.infer<typeof CredentialProbeConfig>;
46
+ /**
47
+ * OAuth2 client-credentials grant — the gateway authenticates as the APPLICATION, with no user in
48
+ * the loop and no browser flow. Use it for provider-side bot/service identities: actions land as
49
+ * the app rather than as whoever last authorized it, which is what makes an autonomous agent's
50
+ * writes attributable.
51
+ *
52
+ * Distinct from `oauth: true`, which is the authorization-code flow and carries a USER's identity.
53
+ * The two are mutually exclusive (see the loader diagnostic) — a provider has one identity.
54
+ *
55
+ * Tokens are minted on demand, cached to disk, and re-minted proactively before expiry or reactively
56
+ * on a 401. Disk caching is load-bearing rather than an optimization: issuers cap how many tokens an
57
+ * app may hold at once (Linear allows 1000), so a gateway that minted on every restart would burn
58
+ * through that quota.
59
+ */
60
+ export declare const ClientCredentialsConfig: z.ZodObject<{
61
+ /** The issuer's token endpoint, e.g. `https://api.linear.app/oauth/token`. */
62
+ token_url: z.ZodString;
63
+ client_id: z.ZodEffects<z.ZodString, string, string>;
64
+ client_secret: z.ZodEffects<z.ZodString, string, string>;
65
+ /**
66
+ * Scopes to request, verbatim — the separator is the issuer's to define (Linear uses commas,
67
+ * the OAuth2 spec says spaces), so the string is passed through untouched. Omit to accept the
68
+ * issuer's default scopes. NOTE: some issuers revoke every live token when an app's scopes
69
+ * change, so treat this as a value that is changed deliberately, not tuned.
70
+ */
71
+ scope: z.ZodOptional<z.ZodString>;
72
+ }, "strict", z.ZodTypeAny, {
73
+ client_id: string;
74
+ client_secret: string;
75
+ token_url: string;
76
+ scope?: string | undefined;
77
+ }, {
78
+ client_id: string;
79
+ client_secret: string;
80
+ token_url: string;
81
+ scope?: string | undefined;
82
+ }>;
83
+ export type ClientCredentialsConfig = z.infer<typeof ClientCredentialsConfig>;
3
84
  export declare const McpServerConfig: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
85
+ credential_probe: z.ZodOptional<z.ZodObject<{
86
+ /** Provider-local tool name — unprefixed, e.g. `search_gmail_messages`. */
87
+ tool: z.ZodString;
88
+ args: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
89
+ /** Healthy responses must contain this substring; otherwise the credential is auth_required. */
90
+ expect_contains: z.ZodOptional<z.ZodString>;
91
+ /** Healthy responses must NOT contain this substring. See the caveat above. */
92
+ reject_contains: z.ZodOptional<z.ZodString>;
93
+ /** Cache TTL. Floored at a minute so a hot /health poll can't hammer a provider's API quota. */
94
+ interval_ms: z.ZodDefault<z.ZodNumber>;
95
+ timeout_ms: z.ZodDefault<z.ZodNumber>;
96
+ }, "strict", z.ZodTypeAny, {
97
+ tool: string;
98
+ args: Record<string, unknown>;
99
+ interval_ms: number;
100
+ timeout_ms: number;
101
+ expect_contains?: string | undefined;
102
+ reject_contains?: string | undefined;
103
+ }, {
104
+ tool: string;
105
+ args?: Record<string, unknown> | undefined;
106
+ expect_contains?: string | undefined;
107
+ reject_contains?: string | undefined;
108
+ interval_ms?: number | undefined;
109
+ timeout_ms?: number | undefined;
110
+ }>>;
111
+ instructions: z.ZodOptional<z.ZodString>;
112
+ upstream_instructions: z.ZodOptional<z.ZodEnum<["include", "ignore"]>>;
4
113
  type: z.ZodLiteral<"stdio">;
5
114
  enabled: z.ZodDefault<z.ZodBoolean>;
6
115
  command: z.ZodString;
@@ -8,17 +117,65 @@ export declare const McpServerConfig: z.ZodDiscriminatedUnion<"type", [z.ZodObje
8
117
  env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodString, string, string>>>;
9
118
  }, "strict", z.ZodTypeAny, {
10
119
  type: "stdio";
120
+ args: string[];
11
121
  enabled: boolean;
12
122
  command: string;
13
- args: string[];
14
123
  env?: Record<string, string> | undefined;
124
+ credential_probe?: {
125
+ tool: string;
126
+ args: Record<string, unknown>;
127
+ interval_ms: number;
128
+ timeout_ms: number;
129
+ expect_contains?: string | undefined;
130
+ reject_contains?: string | undefined;
131
+ } | undefined;
132
+ instructions?: string | undefined;
133
+ upstream_instructions?: "ignore" | "include" | undefined;
15
134
  }, {
16
135
  type: "stdio";
17
136
  command: string;
18
- enabled?: boolean | undefined;
19
137
  args?: string[] | undefined;
138
+ enabled?: boolean | undefined;
20
139
  env?: Record<string, string> | undefined;
140
+ credential_probe?: {
141
+ tool: string;
142
+ args?: Record<string, unknown> | undefined;
143
+ expect_contains?: string | undefined;
144
+ reject_contains?: string | undefined;
145
+ interval_ms?: number | undefined;
146
+ timeout_ms?: number | undefined;
147
+ } | undefined;
148
+ instructions?: string | undefined;
149
+ upstream_instructions?: "ignore" | "include" | undefined;
21
150
  }>, z.ZodObject<{
151
+ credential_probe: z.ZodOptional<z.ZodObject<{
152
+ /** Provider-local tool name — unprefixed, e.g. `search_gmail_messages`. */
153
+ tool: z.ZodString;
154
+ args: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
155
+ /** Healthy responses must contain this substring; otherwise the credential is auth_required. */
156
+ expect_contains: z.ZodOptional<z.ZodString>;
157
+ /** Healthy responses must NOT contain this substring. See the caveat above. */
158
+ reject_contains: z.ZodOptional<z.ZodString>;
159
+ /** Cache TTL. Floored at a minute so a hot /health poll can't hammer a provider's API quota. */
160
+ interval_ms: z.ZodDefault<z.ZodNumber>;
161
+ timeout_ms: z.ZodDefault<z.ZodNumber>;
162
+ }, "strict", z.ZodTypeAny, {
163
+ tool: string;
164
+ args: Record<string, unknown>;
165
+ interval_ms: number;
166
+ timeout_ms: number;
167
+ expect_contains?: string | undefined;
168
+ reject_contains?: string | undefined;
169
+ }, {
170
+ tool: string;
171
+ args?: Record<string, unknown> | undefined;
172
+ expect_contains?: string | undefined;
173
+ reject_contains?: string | undefined;
174
+ interval_ms?: number | undefined;
175
+ timeout_ms?: number | undefined;
176
+ }>>;
177
+ instructions: z.ZodOptional<z.ZodString>;
178
+ upstream_instructions: z.ZodOptional<z.ZodEnum<["include", "ignore"]>>;
22
179
  type: z.ZodLiteral<"sse">;
23
180
  enabled: z.ZodDefault<z.ZodBoolean>;
24
181
  url: z.ZodString;
@@ -27,13 +184,61 @@ export declare const McpServerConfig: z.ZodDiscriminatedUnion<"type", [z.ZodObje
27
184
  url: string;
28
185
  type: "sse";
29
186
  enabled: boolean;
187
+ credential_probe?: {
188
+ tool: string;
189
+ args: Record<string, unknown>;
190
+ interval_ms: number;
191
+ timeout_ms: number;
192
+ expect_contains?: string | undefined;
193
+ reject_contains?: string | undefined;
194
+ } | undefined;
195
+ instructions?: string | undefined;
196
+ upstream_instructions?: "ignore" | "include" | undefined;
30
197
  headers?: Record<string, string> | undefined;
31
198
  }, {
32
199
  url: string;
33
200
  type: "sse";
34
201
  enabled?: boolean | undefined;
202
+ credential_probe?: {
203
+ tool: string;
204
+ args?: Record<string, unknown> | undefined;
205
+ expect_contains?: string | undefined;
206
+ reject_contains?: string | undefined;
207
+ interval_ms?: number | undefined;
208
+ timeout_ms?: number | undefined;
209
+ } | undefined;
210
+ instructions?: string | undefined;
211
+ upstream_instructions?: "ignore" | "include" | undefined;
35
212
  headers?: Record<string, string> | undefined;
36
213
  }>, z.ZodObject<{
214
+ credential_probe: z.ZodOptional<z.ZodObject<{
215
+ /** Provider-local tool name — unprefixed, e.g. `search_gmail_messages`. */
216
+ tool: z.ZodString;
217
+ args: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
218
+ /** Healthy responses must contain this substring; otherwise the credential is auth_required. */
219
+ expect_contains: z.ZodOptional<z.ZodString>;
220
+ /** Healthy responses must NOT contain this substring. See the caveat above. */
221
+ reject_contains: z.ZodOptional<z.ZodString>;
222
+ /** Cache TTL. Floored at a minute so a hot /health poll can't hammer a provider's API quota. */
223
+ interval_ms: z.ZodDefault<z.ZodNumber>;
224
+ timeout_ms: z.ZodDefault<z.ZodNumber>;
225
+ }, "strict", z.ZodTypeAny, {
226
+ tool: string;
227
+ args: Record<string, unknown>;
228
+ interval_ms: number;
229
+ timeout_ms: number;
230
+ expect_contains?: string | undefined;
231
+ reject_contains?: string | undefined;
232
+ }, {
233
+ tool: string;
234
+ args?: Record<string, unknown> | undefined;
235
+ expect_contains?: string | undefined;
236
+ reject_contains?: string | undefined;
237
+ interval_ms?: number | undefined;
238
+ timeout_ms?: number | undefined;
239
+ }>>;
240
+ instructions: z.ZodOptional<z.ZodString>;
241
+ upstream_instructions: z.ZodOptional<z.ZodEnum<["include", "ignore"]>>;
37
242
  type: z.ZodLiteral<"http">;
38
243
  enabled: z.ZodDefault<z.ZodBoolean>;
39
244
  url: z.ZodString;
@@ -43,16 +248,62 @@ export declare const McpServerConfig: z.ZodDiscriminatedUnion<"type", [z.ZodObje
43
248
  oauth_callback_url: z.ZodOptional<z.ZodString>;
44
249
  client_id: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
45
250
  client_secret: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
251
+ client_credentials: z.ZodOptional<z.ZodObject<{
252
+ /** The issuer's token endpoint, e.g. `https://api.linear.app/oauth/token`. */
253
+ token_url: z.ZodString;
254
+ client_id: z.ZodEffects<z.ZodString, string, string>;
255
+ client_secret: z.ZodEffects<z.ZodString, string, string>;
256
+ /**
257
+ * Scopes to request, verbatim — the separator is the issuer's to define (Linear uses commas,
258
+ * the OAuth2 spec says spaces), so the string is passed through untouched. Omit to accept the
259
+ * issuer's default scopes. NOTE: some issuers revoke every live token when an app's scopes
260
+ * change, so treat this as a value that is changed deliberately, not tuned.
261
+ */
262
+ scope: z.ZodOptional<z.ZodString>;
263
+ }, "strict", z.ZodTypeAny, {
264
+ client_id: string;
265
+ client_secret: string;
266
+ token_url: string;
267
+ scope?: string | undefined;
268
+ }, {
269
+ client_id: string;
270
+ client_secret: string;
271
+ token_url: string;
272
+ scope?: string | undefined;
273
+ }>>;
274
+ /**
275
+ * Per-request MCP SDK deadline. The SDK otherwise imposes an invisible 60s default even when
276
+ * Airlock's outer call_execution_timeout_ms is higher, so slow but healthy providers can
277
+ * never use the operator-configured execution budget.
278
+ */
279
+ request_timeout_ms: z.ZodDefault<z.ZodNumber>;
46
280
  }, "strict", z.ZodTypeAny, {
47
281
  url: string;
48
282
  type: "http";
49
283
  oauth: boolean;
50
284
  enabled: boolean;
51
285
  oauth_callback_port: number;
286
+ request_timeout_ms: number;
52
287
  client_id?: string | undefined;
53
288
  client_secret?: string | undefined;
289
+ credential_probe?: {
290
+ tool: string;
291
+ args: Record<string, unknown>;
292
+ interval_ms: number;
293
+ timeout_ms: number;
294
+ expect_contains?: string | undefined;
295
+ reject_contains?: string | undefined;
296
+ } | undefined;
297
+ instructions?: string | undefined;
298
+ upstream_instructions?: "ignore" | "include" | undefined;
54
299
  headers?: Record<string, string> | undefined;
55
300
  oauth_callback_url?: string | undefined;
301
+ client_credentials?: {
302
+ client_id: string;
303
+ client_secret: string;
304
+ token_url: string;
305
+ scope?: string | undefined;
306
+ } | undefined;
56
307
  }, {
57
308
  url: string;
58
309
  type: "http";
@@ -60,32 +311,89 @@ export declare const McpServerConfig: z.ZodDiscriminatedUnion<"type", [z.ZodObje
60
311
  client_id?: string | undefined;
61
312
  client_secret?: string | undefined;
62
313
  enabled?: boolean | undefined;
314
+ credential_probe?: {
315
+ tool: string;
316
+ args?: Record<string, unknown> | undefined;
317
+ expect_contains?: string | undefined;
318
+ reject_contains?: string | undefined;
319
+ interval_ms?: number | undefined;
320
+ timeout_ms?: number | undefined;
321
+ } | undefined;
322
+ instructions?: string | undefined;
323
+ upstream_instructions?: "ignore" | "include" | undefined;
63
324
  headers?: Record<string, string> | undefined;
64
325
  oauth_callback_port?: number | undefined;
65
326
  oauth_callback_url?: string | undefined;
327
+ client_credentials?: {
328
+ client_id: string;
329
+ client_secret: string;
330
+ token_url: string;
331
+ scope?: string | undefined;
332
+ } | undefined;
333
+ request_timeout_ms?: number | undefined;
66
334
  }>]>;
67
335
  export type McpServerConfig = z.infer<typeof McpServerConfig>;
68
336
  export declare const BuiltinProviderConfig: z.ZodObject<{
337
+ instructions: z.ZodOptional<z.ZodString>;
338
+ upstream_instructions: z.ZodOptional<z.ZodEnum<["include", "ignore"]>>;
69
339
  type: z.ZodLiteral<"builtin">;
70
340
  enabled: z.ZodDefault<z.ZodBoolean>;
71
341
  }, "strict", z.ZodTypeAny, {
72
342
  type: "builtin";
73
343
  enabled: boolean;
344
+ instructions?: string | undefined;
345
+ upstream_instructions?: "ignore" | "include" | undefined;
74
346
  }, {
75
347
  type: "builtin";
76
348
  enabled?: boolean | undefined;
349
+ instructions?: string | undefined;
350
+ upstream_instructions?: "ignore" | "include" | undefined;
77
351
  }>;
78
352
  export type BuiltinProviderConfig = z.infer<typeof BuiltinProviderConfig>;
79
353
  export declare const ProviderConfig: z.ZodUnion<[z.ZodLiteral<"builtin">, z.ZodObject<{
354
+ instructions: z.ZodOptional<z.ZodString>;
355
+ upstream_instructions: z.ZodOptional<z.ZodEnum<["include", "ignore"]>>;
80
356
  type: z.ZodLiteral<"builtin">;
81
357
  enabled: z.ZodDefault<z.ZodBoolean>;
82
358
  }, "strict", z.ZodTypeAny, {
83
359
  type: "builtin";
84
360
  enabled: boolean;
361
+ instructions?: string | undefined;
362
+ upstream_instructions?: "ignore" | "include" | undefined;
85
363
  }, {
86
364
  type: "builtin";
87
365
  enabled?: boolean | undefined;
366
+ instructions?: string | undefined;
367
+ upstream_instructions?: "ignore" | "include" | undefined;
88
368
  }>, z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
369
+ credential_probe: z.ZodOptional<z.ZodObject<{
370
+ /** Provider-local tool name — unprefixed, e.g. `search_gmail_messages`. */
371
+ tool: z.ZodString;
372
+ args: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
373
+ /** Healthy responses must contain this substring; otherwise the credential is auth_required. */
374
+ expect_contains: z.ZodOptional<z.ZodString>;
375
+ /** Healthy responses must NOT contain this substring. See the caveat above. */
376
+ reject_contains: z.ZodOptional<z.ZodString>;
377
+ /** Cache TTL. Floored at a minute so a hot /health poll can't hammer a provider's API quota. */
378
+ interval_ms: z.ZodDefault<z.ZodNumber>;
379
+ timeout_ms: z.ZodDefault<z.ZodNumber>;
380
+ }, "strict", z.ZodTypeAny, {
381
+ tool: string;
382
+ args: Record<string, unknown>;
383
+ interval_ms: number;
384
+ timeout_ms: number;
385
+ expect_contains?: string | undefined;
386
+ reject_contains?: string | undefined;
387
+ }, {
388
+ tool: string;
389
+ args?: Record<string, unknown> | undefined;
390
+ expect_contains?: string | undefined;
391
+ reject_contains?: string | undefined;
392
+ interval_ms?: number | undefined;
393
+ timeout_ms?: number | undefined;
394
+ }>>;
395
+ instructions: z.ZodOptional<z.ZodString>;
396
+ upstream_instructions: z.ZodOptional<z.ZodEnum<["include", "ignore"]>>;
89
397
  type: z.ZodLiteral<"stdio">;
90
398
  enabled: z.ZodDefault<z.ZodBoolean>;
91
399
  command: z.ZodString;
@@ -93,17 +401,65 @@ export declare const ProviderConfig: z.ZodUnion<[z.ZodLiteral<"builtin">, z.ZodO
93
401
  env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodString, string, string>>>;
94
402
  }, "strict", z.ZodTypeAny, {
95
403
  type: "stdio";
404
+ args: string[];
96
405
  enabled: boolean;
97
406
  command: string;
98
- args: string[];
99
407
  env?: Record<string, string> | undefined;
408
+ credential_probe?: {
409
+ tool: string;
410
+ args: Record<string, unknown>;
411
+ interval_ms: number;
412
+ timeout_ms: number;
413
+ expect_contains?: string | undefined;
414
+ reject_contains?: string | undefined;
415
+ } | undefined;
416
+ instructions?: string | undefined;
417
+ upstream_instructions?: "ignore" | "include" | undefined;
100
418
  }, {
101
419
  type: "stdio";
102
420
  command: string;
103
- enabled?: boolean | undefined;
104
421
  args?: string[] | undefined;
422
+ enabled?: boolean | undefined;
105
423
  env?: Record<string, string> | undefined;
424
+ credential_probe?: {
425
+ tool: string;
426
+ args?: Record<string, unknown> | undefined;
427
+ expect_contains?: string | undefined;
428
+ reject_contains?: string | undefined;
429
+ interval_ms?: number | undefined;
430
+ timeout_ms?: number | undefined;
431
+ } | undefined;
432
+ instructions?: string | undefined;
433
+ upstream_instructions?: "ignore" | "include" | undefined;
106
434
  }>, z.ZodObject<{
435
+ credential_probe: z.ZodOptional<z.ZodObject<{
436
+ /** Provider-local tool name — unprefixed, e.g. `search_gmail_messages`. */
437
+ tool: z.ZodString;
438
+ args: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
439
+ /** Healthy responses must contain this substring; otherwise the credential is auth_required. */
440
+ expect_contains: z.ZodOptional<z.ZodString>;
441
+ /** Healthy responses must NOT contain this substring. See the caveat above. */
442
+ reject_contains: z.ZodOptional<z.ZodString>;
443
+ /** Cache TTL. Floored at a minute so a hot /health poll can't hammer a provider's API quota. */
444
+ interval_ms: z.ZodDefault<z.ZodNumber>;
445
+ timeout_ms: z.ZodDefault<z.ZodNumber>;
446
+ }, "strict", z.ZodTypeAny, {
447
+ tool: string;
448
+ args: Record<string, unknown>;
449
+ interval_ms: number;
450
+ timeout_ms: number;
451
+ expect_contains?: string | undefined;
452
+ reject_contains?: string | undefined;
453
+ }, {
454
+ tool: string;
455
+ args?: Record<string, unknown> | undefined;
456
+ expect_contains?: string | undefined;
457
+ reject_contains?: string | undefined;
458
+ interval_ms?: number | undefined;
459
+ timeout_ms?: number | undefined;
460
+ }>>;
461
+ instructions: z.ZodOptional<z.ZodString>;
462
+ upstream_instructions: z.ZodOptional<z.ZodEnum<["include", "ignore"]>>;
107
463
  type: z.ZodLiteral<"sse">;
108
464
  enabled: z.ZodDefault<z.ZodBoolean>;
109
465
  url: z.ZodString;
@@ -112,13 +468,61 @@ export declare const ProviderConfig: z.ZodUnion<[z.ZodLiteral<"builtin">, z.ZodO
112
468
  url: string;
113
469
  type: "sse";
114
470
  enabled: boolean;
471
+ credential_probe?: {
472
+ tool: string;
473
+ args: Record<string, unknown>;
474
+ interval_ms: number;
475
+ timeout_ms: number;
476
+ expect_contains?: string | undefined;
477
+ reject_contains?: string | undefined;
478
+ } | undefined;
479
+ instructions?: string | undefined;
480
+ upstream_instructions?: "ignore" | "include" | undefined;
115
481
  headers?: Record<string, string> | undefined;
116
482
  }, {
117
483
  url: string;
118
484
  type: "sse";
119
485
  enabled?: boolean | undefined;
486
+ credential_probe?: {
487
+ tool: string;
488
+ args?: Record<string, unknown> | undefined;
489
+ expect_contains?: string | undefined;
490
+ reject_contains?: string | undefined;
491
+ interval_ms?: number | undefined;
492
+ timeout_ms?: number | undefined;
493
+ } | undefined;
494
+ instructions?: string | undefined;
495
+ upstream_instructions?: "ignore" | "include" | undefined;
120
496
  headers?: Record<string, string> | undefined;
121
497
  }>, z.ZodObject<{
498
+ credential_probe: z.ZodOptional<z.ZodObject<{
499
+ /** Provider-local tool name — unprefixed, e.g. `search_gmail_messages`. */
500
+ tool: z.ZodString;
501
+ args: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
502
+ /** Healthy responses must contain this substring; otherwise the credential is auth_required. */
503
+ expect_contains: z.ZodOptional<z.ZodString>;
504
+ /** Healthy responses must NOT contain this substring. See the caveat above. */
505
+ reject_contains: z.ZodOptional<z.ZodString>;
506
+ /** Cache TTL. Floored at a minute so a hot /health poll can't hammer a provider's API quota. */
507
+ interval_ms: z.ZodDefault<z.ZodNumber>;
508
+ timeout_ms: z.ZodDefault<z.ZodNumber>;
509
+ }, "strict", z.ZodTypeAny, {
510
+ tool: string;
511
+ args: Record<string, unknown>;
512
+ interval_ms: number;
513
+ timeout_ms: number;
514
+ expect_contains?: string | undefined;
515
+ reject_contains?: string | undefined;
516
+ }, {
517
+ tool: string;
518
+ args?: Record<string, unknown> | undefined;
519
+ expect_contains?: string | undefined;
520
+ reject_contains?: string | undefined;
521
+ interval_ms?: number | undefined;
522
+ timeout_ms?: number | undefined;
523
+ }>>;
524
+ instructions: z.ZodOptional<z.ZodString>;
525
+ upstream_instructions: z.ZodOptional<z.ZodEnum<["include", "ignore"]>>;
122
526
  type: z.ZodLiteral<"http">;
123
527
  enabled: z.ZodDefault<z.ZodBoolean>;
124
528
  url: z.ZodString;
@@ -128,16 +532,62 @@ export declare const ProviderConfig: z.ZodUnion<[z.ZodLiteral<"builtin">, z.ZodO
128
532
  oauth_callback_url: z.ZodOptional<z.ZodString>;
129
533
  client_id: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
130
534
  client_secret: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
535
+ client_credentials: z.ZodOptional<z.ZodObject<{
536
+ /** The issuer's token endpoint, e.g. `https://api.linear.app/oauth/token`. */
537
+ token_url: z.ZodString;
538
+ client_id: z.ZodEffects<z.ZodString, string, string>;
539
+ client_secret: z.ZodEffects<z.ZodString, string, string>;
540
+ /**
541
+ * Scopes to request, verbatim — the separator is the issuer's to define (Linear uses commas,
542
+ * the OAuth2 spec says spaces), so the string is passed through untouched. Omit to accept the
543
+ * issuer's default scopes. NOTE: some issuers revoke every live token when an app's scopes
544
+ * change, so treat this as a value that is changed deliberately, not tuned.
545
+ */
546
+ scope: z.ZodOptional<z.ZodString>;
547
+ }, "strict", z.ZodTypeAny, {
548
+ client_id: string;
549
+ client_secret: string;
550
+ token_url: string;
551
+ scope?: string | undefined;
552
+ }, {
553
+ client_id: string;
554
+ client_secret: string;
555
+ token_url: string;
556
+ scope?: string | undefined;
557
+ }>>;
558
+ /**
559
+ * Per-request MCP SDK deadline. The SDK otherwise imposes an invisible 60s default even when
560
+ * Airlock's outer call_execution_timeout_ms is higher, so slow but healthy providers can
561
+ * never use the operator-configured execution budget.
562
+ */
563
+ request_timeout_ms: z.ZodDefault<z.ZodNumber>;
131
564
  }, "strict", z.ZodTypeAny, {
132
565
  url: string;
133
566
  type: "http";
134
567
  oauth: boolean;
135
568
  enabled: boolean;
136
569
  oauth_callback_port: number;
570
+ request_timeout_ms: number;
137
571
  client_id?: string | undefined;
138
572
  client_secret?: string | undefined;
573
+ credential_probe?: {
574
+ tool: string;
575
+ args: Record<string, unknown>;
576
+ interval_ms: number;
577
+ timeout_ms: number;
578
+ expect_contains?: string | undefined;
579
+ reject_contains?: string | undefined;
580
+ } | undefined;
581
+ instructions?: string | undefined;
582
+ upstream_instructions?: "ignore" | "include" | undefined;
139
583
  headers?: Record<string, string> | undefined;
140
584
  oauth_callback_url?: string | undefined;
585
+ client_credentials?: {
586
+ client_id: string;
587
+ client_secret: string;
588
+ token_url: string;
589
+ scope?: string | undefined;
590
+ } | undefined;
141
591
  }, {
142
592
  url: string;
143
593
  type: "http";
@@ -145,13 +595,47 @@ export declare const ProviderConfig: z.ZodUnion<[z.ZodLiteral<"builtin">, z.ZodO
145
595
  client_id?: string | undefined;
146
596
  client_secret?: string | undefined;
147
597
  enabled?: boolean | undefined;
598
+ credential_probe?: {
599
+ tool: string;
600
+ args?: Record<string, unknown> | undefined;
601
+ expect_contains?: string | undefined;
602
+ reject_contains?: string | undefined;
603
+ interval_ms?: number | undefined;
604
+ timeout_ms?: number | undefined;
605
+ } | undefined;
606
+ instructions?: string | undefined;
607
+ upstream_instructions?: "ignore" | "include" | undefined;
148
608
  headers?: Record<string, string> | undefined;
149
609
  oauth_callback_port?: number | undefined;
150
610
  oauth_callback_url?: string | undefined;
611
+ client_credentials?: {
612
+ client_id: string;
613
+ client_secret: string;
614
+ token_url: string;
615
+ scope?: string | undefined;
616
+ } | undefined;
617
+ request_timeout_ms?: number | undefined;
151
618
  }>]>]>;
152
619
  export type ProviderConfig = z.infer<typeof ProviderConfig>;
153
620
  /** Extract only MCP server configs from the providers map */
154
621
  export declare function getMcpConfigs(providers: Record<string, ProviderConfig>): Record<string, McpServerConfig>;
622
+ /**
623
+ * Credential probes for the providers that declare one, keyed by provider id. Providers without a
624
+ * probe are simply absent — the monitor still reports on them, using the transport's own OAuth
625
+ * state, and says `unknown` rather than guessing.
626
+ */
627
+ export declare function getCredentialProbes(providers: Record<string, ProviderConfig>): Record<string, CredentialProbeConfig>;
628
+ export interface ProviderInstructionsConfig {
629
+ /** Operator-authored text. Trusted: never scrubbed or truncated. */
630
+ instructions?: string;
631
+ /** Whether the provider's own advertised instructions are included alongside it. */
632
+ upstream: 'include' | 'ignore';
633
+ }
634
+ /**
635
+ * Per-provider instruction settings, keyed by provider id. Providers declared as the bare string
636
+ * `'builtin'` carry no settings and fall back to the defaults.
637
+ */
638
+ export declare function getProviderInstructions(providers: Record<string, ProviderConfig>): Record<string, ProviderInstructionsConfig>;
155
639
  /** Extract the set of builtin provider names (e.g. "exec", "http") */
156
640
  export declare function getBuiltinProviders(providers: Record<string, ProviderConfig>): Set<string>;
157
641
  export declare const SandboxFilesystemConfig: z.ZodObject<{
@@ -853,6 +1337,60 @@ export declare const ToolArgPolicyConfig: z.ZodRecord<z.ZodString, z.ZodRecord<z
853
1337
  value_set?: string | undefined;
854
1338
  }[]]>>>;
855
1339
  export type ToolArgPolicyConfig = z.infer<typeof ToolArgPolicyConfig>;
1340
+ export declare const CommandPolicyRuleConfig: z.ZodEffects<z.ZodObject<{
1341
+ allow: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1342
+ ask: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1343
+ deny: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1344
+ default: z.ZodOptional<z.ZodEnum<["allow", "ask", "deny"]>>;
1345
+ }, "strict", z.ZodTypeAny, {
1346
+ allow: string[];
1347
+ ask: string[];
1348
+ deny: string[];
1349
+ default?: "allow" | "ask" | "deny" | undefined;
1350
+ }, {
1351
+ default?: "allow" | "ask" | "deny" | undefined;
1352
+ allow?: string[] | undefined;
1353
+ ask?: string[] | undefined;
1354
+ deny?: string[] | undefined;
1355
+ }>, {
1356
+ allow: string[];
1357
+ ask: string[];
1358
+ deny: string[];
1359
+ default?: "allow" | "ask" | "deny" | undefined;
1360
+ }, {
1361
+ default?: "allow" | "ask" | "deny" | undefined;
1362
+ allow?: string[] | undefined;
1363
+ ask?: string[] | undefined;
1364
+ deny?: string[] | undefined;
1365
+ }>;
1366
+ export type CommandPolicyRuleConfig = z.infer<typeof CommandPolicyRuleConfig>;
1367
+ export declare const CommandPolicyConfig: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodObject<{
1368
+ allow: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1369
+ ask: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1370
+ deny: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1371
+ default: z.ZodOptional<z.ZodEnum<["allow", "ask", "deny"]>>;
1372
+ }, "strict", z.ZodTypeAny, {
1373
+ allow: string[];
1374
+ ask: string[];
1375
+ deny: string[];
1376
+ default?: "allow" | "ask" | "deny" | undefined;
1377
+ }, {
1378
+ default?: "allow" | "ask" | "deny" | undefined;
1379
+ allow?: string[] | undefined;
1380
+ ask?: string[] | undefined;
1381
+ deny?: string[] | undefined;
1382
+ }>, {
1383
+ allow: string[];
1384
+ ask: string[];
1385
+ deny: string[];
1386
+ default?: "allow" | "ask" | "deny" | undefined;
1387
+ }, {
1388
+ default?: "allow" | "ask" | "deny" | undefined;
1389
+ allow?: string[] | undefined;
1390
+ ask?: string[] | undefined;
1391
+ deny?: string[] | undefined;
1392
+ }>>>;
1393
+ export type CommandPolicyConfig = z.infer<typeof CommandPolicyConfig>;
856
1394
  export declare const ArgScopeConfig: z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "atleastone">]>>, {
857
1395
  [k: string]: string[];
858
1396
  }, Record<string, string | [string, ...string[]]>>;
@@ -872,7 +1410,13 @@ export declare const ArgDimensionConfig: z.ZodObject<{
872
1410
  }>;
873
1411
  export type ArgDimensionConfig = z.infer<typeof ArgDimensionConfig>;
874
1412
  export declare const ToolOverride: z.ZodObject<{
1413
+ /** Replaces the upstream description entirely. */
875
1414
  description: z.ZodOptional<z.ZodString>;
1415
+ /**
1416
+ * Appended after whatever description survives (upstream, or `description` when set). Use this
1417
+ * for house rules you want on top of the vendor's docs without restating them by hand.
1418
+ */
1419
+ description_append: z.ZodOptional<z.ZodString>;
876
1420
  alias_of: z.ZodOptional<z.ZodString>;
877
1421
  sandbox_presets: z.ZodDefault<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, string[], string | string[]>>;
878
1422
  sandbox: z.ZodOptional<z.ZodObject<{
@@ -1140,6 +1684,7 @@ export declare const ToolOverride: z.ZodObject<{
1140
1684
  label?: string | undefined;
1141
1685
  value_set?: string | undefined;
1142
1686
  }[]> | undefined;
1687
+ description_append?: string | undefined;
1143
1688
  alias_of?: string | undefined;
1144
1689
  sandbox?: {
1145
1690
  filesystem?: {
@@ -1198,6 +1743,7 @@ export declare const ToolOverride: z.ZodObject<{
1198
1743
  label?: string | undefined;
1199
1744
  value_set?: string | undefined;
1200
1745
  }[]]> | undefined;
1746
+ description_append?: string | undefined;
1201
1747
  alias_of?: string | undefined;
1202
1748
  sandbox_presets?: string | string[] | undefined;
1203
1749
  sandbox?: {
@@ -1213,6 +1759,7 @@ export declare const ToolOverride: z.ZodObject<{
1213
1759
  } | undefined;
1214
1760
  } | undefined;
1215
1761
  }>;
1762
+ export type ToolOverride = z.infer<typeof ToolOverride>;
1216
1763
  export declare const AgentExecConfig: z.ZodObject<{
1217
1764
  allow: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1218
1765
  ask: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
@@ -1238,13 +1785,13 @@ export declare const AgentHttpConfig: z.ZodObject<{
1238
1785
  max_response_bytes: z.ZodDefault<z.ZodNumber>;
1239
1786
  timeout_ms: z.ZodDefault<z.ZodNumber>;
1240
1787
  }, "strict", z.ZodTypeAny, {
1788
+ timeout_ms: number;
1241
1789
  domain_allowlist: string[];
1242
1790
  max_response_bytes: number;
1243
- timeout_ms: number;
1244
1791
  }, {
1792
+ timeout_ms?: number | undefined;
1245
1793
  domain_allowlist?: string[] | undefined;
1246
1794
  max_response_bytes?: number | undefined;
1247
- timeout_ms?: number | undefined;
1248
1795
  }>;
1249
1796
  export type AgentHttpConfig = z.infer<typeof AgentHttpConfig>;
1250
1797
  export declare const RememberAllowRule: z.ZodObject<{
@@ -1279,11 +1826,11 @@ export declare const MiddlewareItemConfig: z.ZodObject<{
1279
1826
  enabled: boolean;
1280
1827
  model?: string | undefined;
1281
1828
  tools?: string[] | undefined;
1282
- mode?: "detect" | "mangle" | "escalate" | undefined;
1283
1829
  exclude?: string[] | undefined;
1284
1830
  max_requests?: number | undefined;
1285
1831
  window_ms?: number | undefined;
1286
1832
  per?: "tool" | "agent" | undefined;
1833
+ mode?: "detect" | "mangle" | "escalate" | undefined;
1287
1834
  backend?: "regex" | "deberta" | "heuristic" | "llm" | undefined;
1288
1835
  inference_url?: string | undefined;
1289
1836
  threshold?: number | undefined;
@@ -1294,12 +1841,12 @@ export declare const MiddlewareItemConfig: z.ZodObject<{
1294
1841
  name: "schema-validator" | "rate-limiter" | "untrusted-envelope" | "strip-query-params" | "output-injection-detector" | "canary-token-injector" | "output-size-limiter" | "output-summarizer" | "injection-detector" | "sensitivity-classifier";
1295
1842
  model?: string | undefined;
1296
1843
  tools?: string[] | undefined;
1297
- mode?: "detect" | "mangle" | "escalate" | undefined;
1298
1844
  enabled?: boolean | undefined;
1299
1845
  exclude?: string[] | undefined;
1300
1846
  max_requests?: number | undefined;
1301
1847
  window_ms?: number | undefined;
1302
1848
  per?: "tool" | "agent" | undefined;
1849
+ mode?: "detect" | "mangle" | "escalate" | undefined;
1303
1850
  backend?: "regex" | "deberta" | "heuristic" | "llm" | undefined;
1304
1851
  inference_url?: string | undefined;
1305
1852
  threshold?: number | undefined;
@@ -1308,9 +1855,39 @@ export declare const MiddlewareItemConfig: z.ZodObject<{
1308
1855
  threshold_chars?: number | undefined;
1309
1856
  }>;
1310
1857
  export type MiddlewareItemConfig = z.infer<typeof MiddlewareItemConfig>;
1858
+ export declare const LimitsConfig: z.ZodObject<{
1859
+ max_sessions_per_agent: z.ZodOptional<z.ZodNumber>;
1860
+ max_sessions_global: z.ZodOptional<z.ZodNumber>;
1861
+ session_idle_ms: z.ZodOptional<z.ZodNumber>;
1862
+ session_max_lifetime_ms: z.ZodOptional<z.ZodNumber>;
1863
+ new_session_max: z.ZodOptional<z.ZodNumber>;
1864
+ new_session_window_ms: z.ZodOptional<z.ZodNumber>;
1865
+ max_concurrent_calls_per_agent: z.ZodOptional<z.ZodNumber>;
1866
+ call_execution_timeout_ms: z.ZodOptional<z.ZodNumber>;
1867
+ }, "strict", z.ZodTypeAny, {
1868
+ max_sessions_per_agent?: number | undefined;
1869
+ max_sessions_global?: number | undefined;
1870
+ session_idle_ms?: number | undefined;
1871
+ session_max_lifetime_ms?: number | undefined;
1872
+ new_session_max?: number | undefined;
1873
+ new_session_window_ms?: number | undefined;
1874
+ max_concurrent_calls_per_agent?: number | undefined;
1875
+ call_execution_timeout_ms?: number | undefined;
1876
+ }, {
1877
+ max_sessions_per_agent?: number | undefined;
1878
+ max_sessions_global?: number | undefined;
1879
+ session_idle_ms?: number | undefined;
1880
+ session_max_lifetime_ms?: number | undefined;
1881
+ new_session_max?: number | undefined;
1882
+ new_session_window_ms?: number | undefined;
1883
+ max_concurrent_calls_per_agent?: number | undefined;
1884
+ call_execution_timeout_ms?: number | undefined;
1885
+ }>;
1886
+ export type LimitsConfig = z.infer<typeof LimitsConfig>;
1311
1887
  export declare const AgentConfig: z.ZodObject<{
1312
1888
  token: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
1313
1889
  extends: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1890
+ inherit_default: z.ZodDefault<z.ZodBoolean>;
1314
1891
  allow: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1315
1892
  remember_allow: z.ZodDefault<z.ZodArray<z.ZodObject<{
1316
1893
  tool: z.ZodString;
@@ -1325,7 +1902,13 @@ export declare const AgentConfig: z.ZodObject<{
1325
1902
  ask: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1326
1903
  deny: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1327
1904
  tool_overrides: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
1905
+ /** Replaces the upstream description entirely. */
1328
1906
  description: z.ZodOptional<z.ZodString>;
1907
+ /**
1908
+ * Appended after whatever description survives (upstream, or `description` when set). Use this
1909
+ * for house rules you want on top of the vendor's docs without restating them by hand.
1910
+ */
1911
+ description_append: z.ZodOptional<z.ZodString>;
1329
1912
  alias_of: z.ZodOptional<z.ZodString>;
1330
1913
  sandbox_presets: z.ZodDefault<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, string[], string | string[]>>;
1331
1914
  sandbox: z.ZodOptional<z.ZodObject<{
@@ -1593,6 +2176,7 @@ export declare const AgentConfig: z.ZodObject<{
1593
2176
  label?: string | undefined;
1594
2177
  value_set?: string | undefined;
1595
2178
  }[]> | undefined;
2179
+ description_append?: string | undefined;
1596
2180
  alias_of?: string | undefined;
1597
2181
  sandbox?: {
1598
2182
  filesystem?: {
@@ -1651,6 +2235,7 @@ export declare const AgentConfig: z.ZodObject<{
1651
2235
  label?: string | undefined;
1652
2236
  value_set?: string | undefined;
1653
2237
  }[]]> | undefined;
2238
+ description_append?: string | undefined;
1654
2239
  alias_of?: string | undefined;
1655
2240
  sandbox_presets?: string | string[] | undefined;
1656
2241
  sandbox?: {
@@ -1866,6 +2451,32 @@ export declare const AgentConfig: z.ZodObject<{
1866
2451
  arg_scope: z.ZodOptional<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "atleastone">]>>, {
1867
2452
  [k: string]: string[];
1868
2453
  }, Record<string, string | [string, ...string[]]>>>;
2454
+ command_policy: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodObject<{
2455
+ allow: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
2456
+ ask: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
2457
+ deny: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
2458
+ default: z.ZodOptional<z.ZodEnum<["allow", "ask", "deny"]>>;
2459
+ }, "strict", z.ZodTypeAny, {
2460
+ allow: string[];
2461
+ ask: string[];
2462
+ deny: string[];
2463
+ default?: "allow" | "ask" | "deny" | undefined;
2464
+ }, {
2465
+ default?: "allow" | "ask" | "deny" | undefined;
2466
+ allow?: string[] | undefined;
2467
+ ask?: string[] | undefined;
2468
+ deny?: string[] | undefined;
2469
+ }>, {
2470
+ allow: string[];
2471
+ ask: string[];
2472
+ deny: string[];
2473
+ default?: "allow" | "ask" | "deny" | undefined;
2474
+ }, {
2475
+ default?: "allow" | "ask" | "deny" | undefined;
2476
+ allow?: string[] | undefined;
2477
+ ask?: string[] | undefined;
2478
+ deny?: string[] | undefined;
2479
+ }>>>>;
1869
2480
  exec: z.ZodDefault<z.ZodObject<{
1870
2481
  allow: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1871
2482
  ask: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
@@ -1890,13 +2501,13 @@ export declare const AgentConfig: z.ZodObject<{
1890
2501
  max_response_bytes: z.ZodDefault<z.ZodNumber>;
1891
2502
  timeout_ms: z.ZodDefault<z.ZodNumber>;
1892
2503
  }, "strict", z.ZodTypeAny, {
2504
+ timeout_ms: number;
1893
2505
  domain_allowlist: string[];
1894
2506
  max_response_bytes: number;
1895
- timeout_ms: number;
1896
2507
  }, {
2508
+ timeout_ms?: number | undefined;
1897
2509
  domain_allowlist?: string[] | undefined;
1898
2510
  max_response_bytes?: number | undefined;
1899
- timeout_ms?: number | undefined;
1900
2511
  }>>;
1901
2512
  sandbox: z.ZodDefault<z.ZodObject<{
1902
2513
  enabled: z.ZodDefault<z.ZodBoolean>;
@@ -2049,11 +2660,11 @@ export declare const AgentConfig: z.ZodObject<{
2049
2660
  enabled: boolean;
2050
2661
  model?: string | undefined;
2051
2662
  tools?: string[] | undefined;
2052
- mode?: "detect" | "mangle" | "escalate" | undefined;
2053
2663
  exclude?: string[] | undefined;
2054
2664
  max_requests?: number | undefined;
2055
2665
  window_ms?: number | undefined;
2056
2666
  per?: "tool" | "agent" | undefined;
2667
+ mode?: "detect" | "mangle" | "escalate" | undefined;
2057
2668
  backend?: "regex" | "deberta" | "heuristic" | "llm" | undefined;
2058
2669
  inference_url?: string | undefined;
2059
2670
  threshold?: number | undefined;
@@ -2064,12 +2675,12 @@ export declare const AgentConfig: z.ZodObject<{
2064
2675
  name: "schema-validator" | "rate-limiter" | "untrusted-envelope" | "strip-query-params" | "output-injection-detector" | "canary-token-injector" | "output-size-limiter" | "output-summarizer" | "injection-detector" | "sensitivity-classifier";
2065
2676
  model?: string | undefined;
2066
2677
  tools?: string[] | undefined;
2067
- mode?: "detect" | "mangle" | "escalate" | undefined;
2068
2678
  enabled?: boolean | undefined;
2069
2679
  exclude?: string[] | undefined;
2070
2680
  max_requests?: number | undefined;
2071
2681
  window_ms?: number | undefined;
2072
2682
  per?: "tool" | "agent" | undefined;
2683
+ mode?: "detect" | "mangle" | "escalate" | undefined;
2073
2684
  backend?: "regex" | "deberta" | "heuristic" | "llm" | undefined;
2074
2685
  inference_url?: string | undefined;
2075
2686
  threshold?: number | undefined;
@@ -2077,13 +2688,44 @@ export declare const AgentConfig: z.ZodObject<{
2077
2688
  max_chars?: number | undefined;
2078
2689
  threshold_chars?: number | undefined;
2079
2690
  }>, "many">>;
2691
+ expose_tools_api: z.ZodDefault<z.ZodBoolean>;
2692
+ limits: z.ZodOptional<z.ZodObject<{
2693
+ max_sessions_per_agent: z.ZodOptional<z.ZodNumber>;
2694
+ max_sessions_global: z.ZodOptional<z.ZodNumber>;
2695
+ session_idle_ms: z.ZodOptional<z.ZodNumber>;
2696
+ session_max_lifetime_ms: z.ZodOptional<z.ZodNumber>;
2697
+ new_session_max: z.ZodOptional<z.ZodNumber>;
2698
+ new_session_window_ms: z.ZodOptional<z.ZodNumber>;
2699
+ max_concurrent_calls_per_agent: z.ZodOptional<z.ZodNumber>;
2700
+ call_execution_timeout_ms: z.ZodOptional<z.ZodNumber>;
2701
+ }, "strict", z.ZodTypeAny, {
2702
+ max_sessions_per_agent?: number | undefined;
2703
+ max_sessions_global?: number | undefined;
2704
+ session_idle_ms?: number | undefined;
2705
+ session_max_lifetime_ms?: number | undefined;
2706
+ new_session_max?: number | undefined;
2707
+ new_session_window_ms?: number | undefined;
2708
+ max_concurrent_calls_per_agent?: number | undefined;
2709
+ call_execution_timeout_ms?: number | undefined;
2710
+ }, {
2711
+ max_sessions_per_agent?: number | undefined;
2712
+ max_sessions_global?: number | undefined;
2713
+ session_idle_ms?: number | undefined;
2714
+ session_max_lifetime_ms?: number | undefined;
2715
+ new_session_max?: number | undefined;
2716
+ new_session_window_ms?: number | undefined;
2717
+ max_concurrent_calls_per_agent?: number | undefined;
2718
+ call_execution_timeout_ms?: number | undefined;
2719
+ }>>;
2080
2720
  }, "strict", z.ZodTypeAny, {
2081
2721
  http: {
2722
+ timeout_ms: number;
2082
2723
  domain_allowlist: string[];
2083
2724
  max_response_bytes: number;
2084
- timeout_ms: number;
2085
2725
  };
2086
2726
  allow: string[];
2727
+ ask: string[];
2728
+ deny: string[];
2087
2729
  sandbox: {
2088
2730
  enabled: boolean;
2089
2731
  filesystem: {
@@ -2110,9 +2752,8 @@ export declare const AgentConfig: z.ZodObject<{
2110
2752
  } | undefined;
2111
2753
  }>;
2112
2754
  };
2113
- ask: string[];
2114
- deny: string[];
2115
2755
  extends: string[];
2756
+ inherit_default: boolean;
2116
2757
  remember_allow: {
2117
2758
  tool: string;
2118
2759
  expires_at?: string | undefined;
@@ -2135,6 +2776,7 @@ export declare const AgentConfig: z.ZodObject<{
2135
2776
  label?: string | undefined;
2136
2777
  value_set?: string | undefined;
2137
2778
  }[]> | undefined;
2779
+ description_append?: string | undefined;
2138
2780
  alias_of?: string | undefined;
2139
2781
  sandbox?: {
2140
2782
  filesystem?: {
@@ -2156,6 +2798,7 @@ export declare const AgentConfig: z.ZodObject<{
2156
2798
  deny: string[];
2157
2799
  default_timeout_ms: number;
2158
2800
  };
2801
+ expose_tools_api: boolean;
2159
2802
  token?: string | undefined;
2160
2803
  arg_policy?: Record<string, Record<string, {
2161
2804
  normalize?: ("trim" | "email" | "phone" | "lower")[] | undefined;
@@ -2175,16 +2818,22 @@ export declare const AgentConfig: z.ZodObject<{
2175
2818
  arg_scope?: {
2176
2819
  [k: string]: string[];
2177
2820
  } | undefined;
2821
+ command_policy?: Record<string, Record<string, {
2822
+ allow: string[];
2823
+ ask: string[];
2824
+ deny: string[];
2825
+ default?: "allow" | "ask" | "deny" | undefined;
2826
+ }>> | undefined;
2178
2827
  middleware?: {
2179
2828
  name: "schema-validator" | "rate-limiter" | "untrusted-envelope" | "strip-query-params" | "output-injection-detector" | "canary-token-injector" | "output-size-limiter" | "output-summarizer" | "injection-detector" | "sensitivity-classifier";
2180
2829
  enabled: boolean;
2181
2830
  model?: string | undefined;
2182
2831
  tools?: string[] | undefined;
2183
- mode?: "detect" | "mangle" | "escalate" | undefined;
2184
2832
  exclude?: string[] | undefined;
2185
2833
  max_requests?: number | undefined;
2186
2834
  window_ms?: number | undefined;
2187
2835
  per?: "tool" | "agent" | undefined;
2836
+ mode?: "detect" | "mangle" | "escalate" | undefined;
2188
2837
  backend?: "regex" | "deberta" | "heuristic" | "llm" | undefined;
2189
2838
  inference_url?: string | undefined;
2190
2839
  threshold?: number | undefined;
@@ -2192,13 +2841,25 @@ export declare const AgentConfig: z.ZodObject<{
2192
2841
  max_chars?: number | undefined;
2193
2842
  threshold_chars?: number | undefined;
2194
2843
  }[] | undefined;
2844
+ limits?: {
2845
+ max_sessions_per_agent?: number | undefined;
2846
+ max_sessions_global?: number | undefined;
2847
+ session_idle_ms?: number | undefined;
2848
+ session_max_lifetime_ms?: number | undefined;
2849
+ new_session_max?: number | undefined;
2850
+ new_session_window_ms?: number | undefined;
2851
+ max_concurrent_calls_per_agent?: number | undefined;
2852
+ call_execution_timeout_ms?: number | undefined;
2853
+ } | undefined;
2195
2854
  }, {
2196
2855
  http?: {
2856
+ timeout_ms?: number | undefined;
2197
2857
  domain_allowlist?: string[] | undefined;
2198
2858
  max_response_bytes?: number | undefined;
2199
- timeout_ms?: number | undefined;
2200
2859
  } | undefined;
2201
2860
  allow?: string[] | undefined;
2861
+ ask?: string[] | undefined;
2862
+ deny?: string[] | undefined;
2202
2863
  sandbox?: {
2203
2864
  enabled?: boolean | undefined;
2204
2865
  filesystem?: {
@@ -2225,10 +2886,9 @@ export declare const AgentConfig: z.ZodObject<{
2225
2886
  } | undefined;
2226
2887
  }> | undefined;
2227
2888
  } | undefined;
2228
- ask?: string[] | undefined;
2229
- deny?: string[] | undefined;
2230
2889
  token?: string | undefined;
2231
2890
  extends?: string[] | undefined;
2891
+ inherit_default?: boolean | undefined;
2232
2892
  remember_allow?: {
2233
2893
  tool: string;
2234
2894
  expires_at?: string | undefined;
@@ -2278,6 +2938,7 @@ export declare const AgentConfig: z.ZodObject<{
2278
2938
  label?: string | undefined;
2279
2939
  value_set?: string | undefined;
2280
2940
  }[]]> | undefined;
2941
+ description_append?: string | undefined;
2281
2942
  alias_of?: string | undefined;
2282
2943
  sandbox_presets?: string | string[] | undefined;
2283
2944
  sandbox?: {
@@ -2337,6 +2998,12 @@ export declare const AgentConfig: z.ZodObject<{
2337
2998
  value_set?: string | undefined;
2338
2999
  }[]]>> | undefined;
2339
3000
  arg_scope?: Record<string, string | [string, ...string[]]> | undefined;
3001
+ command_policy?: Record<string, Record<string, {
3002
+ default?: "allow" | "ask" | "deny" | undefined;
3003
+ allow?: string[] | undefined;
3004
+ ask?: string[] | undefined;
3005
+ deny?: string[] | undefined;
3006
+ }>> | undefined;
2340
3007
  exec?: {
2341
3008
  env?: Record<string, string> | undefined;
2342
3009
  allow?: string[] | undefined;
@@ -2348,12 +3015,12 @@ export declare const AgentConfig: z.ZodObject<{
2348
3015
  name: "schema-validator" | "rate-limiter" | "untrusted-envelope" | "strip-query-params" | "output-injection-detector" | "canary-token-injector" | "output-size-limiter" | "output-summarizer" | "injection-detector" | "sensitivity-classifier";
2349
3016
  model?: string | undefined;
2350
3017
  tools?: string[] | undefined;
2351
- mode?: "detect" | "mangle" | "escalate" | undefined;
2352
3018
  enabled?: boolean | undefined;
2353
3019
  exclude?: string[] | undefined;
2354
3020
  max_requests?: number | undefined;
2355
3021
  window_ms?: number | undefined;
2356
3022
  per?: "tool" | "agent" | undefined;
3023
+ mode?: "detect" | "mangle" | "escalate" | undefined;
2357
3024
  backend?: "regex" | "deberta" | "heuristic" | "llm" | undefined;
2358
3025
  inference_url?: string | undefined;
2359
3026
  threshold?: number | undefined;
@@ -2361,6 +3028,17 @@ export declare const AgentConfig: z.ZodObject<{
2361
3028
  max_chars?: number | undefined;
2362
3029
  threshold_chars?: number | undefined;
2363
3030
  }[] | undefined;
3031
+ expose_tools_api?: boolean | undefined;
3032
+ limits?: {
3033
+ max_sessions_per_agent?: number | undefined;
3034
+ max_sessions_global?: number | undefined;
3035
+ session_idle_ms?: number | undefined;
3036
+ session_max_lifetime_ms?: number | undefined;
3037
+ new_session_max?: number | undefined;
3038
+ new_session_window_ms?: number | undefined;
3039
+ max_concurrent_calls_per_agent?: number | undefined;
3040
+ call_execution_timeout_ms?: number | undefined;
3041
+ } | undefined;
2364
3042
  }>;
2365
3043
  export type AgentConfig = z.infer<typeof AgentConfig>;
2366
3044
  export declare const ProfileConfig: z.ZodObject<{
@@ -2368,35 +3046,385 @@ export declare const ProfileConfig: z.ZodObject<{
2368
3046
  allow: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
2369
3047
  ask: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
2370
3048
  deny: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
2371
- arg_policy: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodUnion<[z.ZodEffects<z.ZodObject<{
2372
- allow: z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>;
2373
- equals: z.ZodOptional<z.ZodUnknown>;
2374
- in: z.ZodOptional<z.ZodString>;
2375
- glob_in: z.ZodOptional<z.ZodString>;
2376
- each_in: z.ZodOptional<z.ZodString>;
2377
- glob_allow: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2378
- each_allow: z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>;
2379
- normalize: z.ZodOptional<z.ZodArray<z.ZodEnum<["phone", "email", "lower", "trim"]>, "many">>;
2380
- path: z.ZodOptional<z.ZodString>;
2381
- required: z.ZodOptional<z.ZodBoolean>;
2382
- label: z.ZodOptional<z.ZodString>;
2383
- value_set: z.ZodOptional<z.ZodString>;
2384
- expose_values: z.ZodOptional<z.ZodBoolean>;
2385
- }, "strict", z.ZodTypeAny, {
2386
- normalize?: ("trim" | "email" | "phone" | "lower")[] | undefined;
2387
- in?: string | undefined;
2388
- required?: boolean | undefined;
2389
- path?: string | undefined;
2390
- expose_values?: boolean | undefined;
2391
- allow?: unknown[] | undefined;
2392
- equals?: unknown;
2393
- glob_in?: string | undefined;
2394
- each_in?: string | undefined;
2395
- glob_allow?: string[] | undefined;
2396
- each_allow?: unknown[] | undefined;
2397
- label?: string | undefined;
2398
- value_set?: string | undefined;
2399
- }, {
3049
+ tool_overrides: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
3050
+ /** Replaces the upstream description entirely. */
3051
+ description: z.ZodOptional<z.ZodString>;
3052
+ /**
3053
+ * Appended after whatever description survives (upstream, or `description` when set). Use this
3054
+ * for house rules you want on top of the vendor's docs without restating them by hand.
3055
+ */
3056
+ description_append: z.ZodOptional<z.ZodString>;
3057
+ alias_of: z.ZodOptional<z.ZodString>;
3058
+ sandbox_presets: z.ZodDefault<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, string[], string | string[]>>;
3059
+ sandbox: z.ZodOptional<z.ZodObject<{
3060
+ filesystem: z.ZodOptional<z.ZodObject<{
3061
+ allow_write: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
3062
+ deny_read: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
3063
+ deny_write: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
3064
+ allow_read: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3065
+ }, "strict", z.ZodTypeAny, {
3066
+ allow_write: string[];
3067
+ deny_read: string[];
3068
+ deny_write: string[];
3069
+ allow_read?: string[] | undefined;
3070
+ }, {
3071
+ allow_write?: string[] | undefined;
3072
+ deny_read?: string[] | undefined;
3073
+ deny_write?: string[] | undefined;
3074
+ allow_read?: string[] | undefined;
3075
+ }>>;
3076
+ network: z.ZodOptional<z.ZodObject<{
3077
+ allowed_domains: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
3078
+ denied_domains: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
3079
+ }, "strict", z.ZodTypeAny, {
3080
+ allowed_domains: string[];
3081
+ denied_domains: string[];
3082
+ }, {
3083
+ allowed_domains?: string[] | undefined;
3084
+ denied_domains?: string[] | undefined;
3085
+ }>>;
3086
+ }, "strict", z.ZodTypeAny, {
3087
+ filesystem?: {
3088
+ allow_write: string[];
3089
+ deny_read: string[];
3090
+ deny_write: string[];
3091
+ allow_read?: string[] | undefined;
3092
+ } | undefined;
3093
+ network?: {
3094
+ allowed_domains: string[];
3095
+ denied_domains: string[];
3096
+ } | undefined;
3097
+ }, {
3098
+ filesystem?: {
3099
+ allow_write?: string[] | undefined;
3100
+ deny_read?: string[] | undefined;
3101
+ deny_write?: string[] | undefined;
3102
+ allow_read?: string[] | undefined;
3103
+ } | undefined;
3104
+ network?: {
3105
+ allowed_domains?: string[] | undefined;
3106
+ denied_domains?: string[] | undefined;
3107
+ } | undefined;
3108
+ }>>;
3109
+ args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodUnion<[z.ZodEffects<z.ZodObject<{
3110
+ allow: z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>;
3111
+ equals: z.ZodOptional<z.ZodUnknown>;
3112
+ in: z.ZodOptional<z.ZodString>;
3113
+ glob_in: z.ZodOptional<z.ZodString>;
3114
+ each_in: z.ZodOptional<z.ZodString>;
3115
+ glob_allow: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3116
+ each_allow: z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>;
3117
+ normalize: z.ZodOptional<z.ZodArray<z.ZodEnum<["phone", "email", "lower", "trim"]>, "many">>;
3118
+ path: z.ZodOptional<z.ZodString>;
3119
+ required: z.ZodOptional<z.ZodBoolean>;
3120
+ label: z.ZodOptional<z.ZodString>;
3121
+ value_set: z.ZodOptional<z.ZodString>;
3122
+ expose_values: z.ZodOptional<z.ZodBoolean>;
3123
+ }, "strict", z.ZodTypeAny, {
3124
+ normalize?: ("trim" | "email" | "phone" | "lower")[] | undefined;
3125
+ in?: string | undefined;
3126
+ required?: boolean | undefined;
3127
+ path?: string | undefined;
3128
+ expose_values?: boolean | undefined;
3129
+ allow?: unknown[] | undefined;
3130
+ equals?: unknown;
3131
+ glob_in?: string | undefined;
3132
+ each_in?: string | undefined;
3133
+ glob_allow?: string[] | undefined;
3134
+ each_allow?: unknown[] | undefined;
3135
+ label?: string | undefined;
3136
+ value_set?: string | undefined;
3137
+ }, {
3138
+ normalize?: ("trim" | "email" | "phone" | "lower")[] | undefined;
3139
+ in?: string | undefined;
3140
+ required?: boolean | undefined;
3141
+ path?: string | undefined;
3142
+ expose_values?: boolean | undefined;
3143
+ allow?: unknown[] | undefined;
3144
+ equals?: unknown;
3145
+ glob_in?: string | undefined;
3146
+ each_in?: string | undefined;
3147
+ glob_allow?: string[] | undefined;
3148
+ each_allow?: unknown[] | undefined;
3149
+ label?: string | undefined;
3150
+ value_set?: string | undefined;
3151
+ }>, {
3152
+ normalize?: ("trim" | "email" | "phone" | "lower")[] | undefined;
3153
+ in?: string | undefined;
3154
+ required?: boolean | undefined;
3155
+ path?: string | undefined;
3156
+ expose_values?: boolean | undefined;
3157
+ allow?: unknown[] | undefined;
3158
+ equals?: unknown;
3159
+ glob_in?: string | undefined;
3160
+ each_in?: string | undefined;
3161
+ glob_allow?: string[] | undefined;
3162
+ each_allow?: unknown[] | undefined;
3163
+ label?: string | undefined;
3164
+ value_set?: string | undefined;
3165
+ }, {
3166
+ normalize?: ("trim" | "email" | "phone" | "lower")[] | undefined;
3167
+ in?: string | undefined;
3168
+ required?: boolean | undefined;
3169
+ path?: string | undefined;
3170
+ expose_values?: boolean | undefined;
3171
+ allow?: unknown[] | undefined;
3172
+ equals?: unknown;
3173
+ glob_in?: string | undefined;
3174
+ each_in?: string | undefined;
3175
+ glob_allow?: string[] | undefined;
3176
+ each_allow?: unknown[] | undefined;
3177
+ label?: string | undefined;
3178
+ value_set?: string | undefined;
3179
+ }>, z.ZodArray<z.ZodEffects<z.ZodObject<{
3180
+ allow: z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>;
3181
+ equals: z.ZodOptional<z.ZodUnknown>;
3182
+ in: z.ZodOptional<z.ZodString>;
3183
+ glob_in: z.ZodOptional<z.ZodString>;
3184
+ each_in: z.ZodOptional<z.ZodString>;
3185
+ glob_allow: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3186
+ each_allow: z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>;
3187
+ normalize: z.ZodOptional<z.ZodArray<z.ZodEnum<["phone", "email", "lower", "trim"]>, "many">>;
3188
+ path: z.ZodOptional<z.ZodString>;
3189
+ required: z.ZodOptional<z.ZodBoolean>;
3190
+ label: z.ZodOptional<z.ZodString>;
3191
+ value_set: z.ZodOptional<z.ZodString>;
3192
+ expose_values: z.ZodOptional<z.ZodBoolean>;
3193
+ }, "strict", z.ZodTypeAny, {
3194
+ normalize?: ("trim" | "email" | "phone" | "lower")[] | undefined;
3195
+ in?: string | undefined;
3196
+ required?: boolean | undefined;
3197
+ path?: string | undefined;
3198
+ expose_values?: boolean | undefined;
3199
+ allow?: unknown[] | undefined;
3200
+ equals?: unknown;
3201
+ glob_in?: string | undefined;
3202
+ each_in?: string | undefined;
3203
+ glob_allow?: string[] | undefined;
3204
+ each_allow?: unknown[] | undefined;
3205
+ label?: string | undefined;
3206
+ value_set?: string | undefined;
3207
+ }, {
3208
+ normalize?: ("trim" | "email" | "phone" | "lower")[] | undefined;
3209
+ in?: string | undefined;
3210
+ required?: boolean | undefined;
3211
+ path?: string | undefined;
3212
+ expose_values?: boolean | undefined;
3213
+ allow?: unknown[] | undefined;
3214
+ equals?: unknown;
3215
+ glob_in?: string | undefined;
3216
+ each_in?: string | undefined;
3217
+ glob_allow?: string[] | undefined;
3218
+ each_allow?: unknown[] | undefined;
3219
+ label?: string | undefined;
3220
+ value_set?: string | undefined;
3221
+ }>, {
3222
+ normalize?: ("trim" | "email" | "phone" | "lower")[] | undefined;
3223
+ in?: string | undefined;
3224
+ required?: boolean | undefined;
3225
+ path?: string | undefined;
3226
+ expose_values?: boolean | undefined;
3227
+ allow?: unknown[] | undefined;
3228
+ equals?: unknown;
3229
+ glob_in?: string | undefined;
3230
+ each_in?: string | undefined;
3231
+ glob_allow?: string[] | undefined;
3232
+ each_allow?: unknown[] | undefined;
3233
+ label?: string | undefined;
3234
+ value_set?: string | undefined;
3235
+ }, {
3236
+ normalize?: ("trim" | "email" | "phone" | "lower")[] | undefined;
3237
+ in?: string | undefined;
3238
+ required?: boolean | undefined;
3239
+ path?: string | undefined;
3240
+ expose_values?: boolean | undefined;
3241
+ allow?: unknown[] | undefined;
3242
+ equals?: unknown;
3243
+ glob_in?: string | undefined;
3244
+ each_in?: string | undefined;
3245
+ glob_allow?: string[] | undefined;
3246
+ each_allow?: unknown[] | undefined;
3247
+ label?: string | undefined;
3248
+ value_set?: string | undefined;
3249
+ }>, "atleastone">]>, {
3250
+ normalize?: ("trim" | "email" | "phone" | "lower")[] | undefined;
3251
+ in?: string | undefined;
3252
+ required?: boolean | undefined;
3253
+ path?: string | undefined;
3254
+ expose_values?: boolean | undefined;
3255
+ allow?: unknown[] | undefined;
3256
+ equals?: unknown;
3257
+ glob_in?: string | undefined;
3258
+ each_in?: string | undefined;
3259
+ glob_allow?: string[] | undefined;
3260
+ each_allow?: unknown[] | undefined;
3261
+ label?: string | undefined;
3262
+ value_set?: string | undefined;
3263
+ }[], {
3264
+ normalize?: ("trim" | "email" | "phone" | "lower")[] | undefined;
3265
+ in?: string | undefined;
3266
+ required?: boolean | undefined;
3267
+ path?: string | undefined;
3268
+ expose_values?: boolean | undefined;
3269
+ allow?: unknown[] | undefined;
3270
+ equals?: unknown;
3271
+ glob_in?: string | undefined;
3272
+ each_in?: string | undefined;
3273
+ glob_allow?: string[] | undefined;
3274
+ each_allow?: unknown[] | undefined;
3275
+ label?: string | undefined;
3276
+ value_set?: string | undefined;
3277
+ } | [{
3278
+ normalize?: ("trim" | "email" | "phone" | "lower")[] | undefined;
3279
+ in?: string | undefined;
3280
+ required?: boolean | undefined;
3281
+ path?: string | undefined;
3282
+ expose_values?: boolean | undefined;
3283
+ allow?: unknown[] | undefined;
3284
+ equals?: unknown;
3285
+ glob_in?: string | undefined;
3286
+ each_in?: string | undefined;
3287
+ glob_allow?: string[] | undefined;
3288
+ each_allow?: unknown[] | undefined;
3289
+ label?: string | undefined;
3290
+ value_set?: string | undefined;
3291
+ }, ...{
3292
+ normalize?: ("trim" | "email" | "phone" | "lower")[] | undefined;
3293
+ in?: string | undefined;
3294
+ required?: boolean | undefined;
3295
+ path?: string | undefined;
3296
+ expose_values?: boolean | undefined;
3297
+ allow?: unknown[] | undefined;
3298
+ equals?: unknown;
3299
+ glob_in?: string | undefined;
3300
+ each_in?: string | undefined;
3301
+ glob_allow?: string[] | undefined;
3302
+ each_allow?: unknown[] | undefined;
3303
+ label?: string | undefined;
3304
+ value_set?: string | undefined;
3305
+ }[]]>>>;
3306
+ }, "strict", z.ZodTypeAny, {
3307
+ sandbox_presets: string[];
3308
+ description?: string | undefined;
3309
+ args?: Record<string, {
3310
+ normalize?: ("trim" | "email" | "phone" | "lower")[] | undefined;
3311
+ in?: string | undefined;
3312
+ required?: boolean | undefined;
3313
+ path?: string | undefined;
3314
+ expose_values?: boolean | undefined;
3315
+ allow?: unknown[] | undefined;
3316
+ equals?: unknown;
3317
+ glob_in?: string | undefined;
3318
+ each_in?: string | undefined;
3319
+ glob_allow?: string[] | undefined;
3320
+ each_allow?: unknown[] | undefined;
3321
+ label?: string | undefined;
3322
+ value_set?: string | undefined;
3323
+ }[]> | undefined;
3324
+ description_append?: string | undefined;
3325
+ alias_of?: string | undefined;
3326
+ sandbox?: {
3327
+ filesystem?: {
3328
+ allow_write: string[];
3329
+ deny_read: string[];
3330
+ deny_write: string[];
3331
+ allow_read?: string[] | undefined;
3332
+ } | undefined;
3333
+ network?: {
3334
+ allowed_domains: string[];
3335
+ denied_domains: string[];
3336
+ } | undefined;
3337
+ } | undefined;
3338
+ }, {
3339
+ description?: string | undefined;
3340
+ args?: Record<string, {
3341
+ normalize?: ("trim" | "email" | "phone" | "lower")[] | undefined;
3342
+ in?: string | undefined;
3343
+ required?: boolean | undefined;
3344
+ path?: string | undefined;
3345
+ expose_values?: boolean | undefined;
3346
+ allow?: unknown[] | undefined;
3347
+ equals?: unknown;
3348
+ glob_in?: string | undefined;
3349
+ each_in?: string | undefined;
3350
+ glob_allow?: string[] | undefined;
3351
+ each_allow?: unknown[] | undefined;
3352
+ label?: string | undefined;
3353
+ value_set?: string | undefined;
3354
+ } | [{
3355
+ normalize?: ("trim" | "email" | "phone" | "lower")[] | undefined;
3356
+ in?: string | undefined;
3357
+ required?: boolean | undefined;
3358
+ path?: string | undefined;
3359
+ expose_values?: boolean | undefined;
3360
+ allow?: unknown[] | undefined;
3361
+ equals?: unknown;
3362
+ glob_in?: string | undefined;
3363
+ each_in?: string | undefined;
3364
+ glob_allow?: string[] | undefined;
3365
+ each_allow?: unknown[] | undefined;
3366
+ label?: string | undefined;
3367
+ value_set?: string | undefined;
3368
+ }, ...{
3369
+ normalize?: ("trim" | "email" | "phone" | "lower")[] | undefined;
3370
+ in?: string | undefined;
3371
+ required?: boolean | undefined;
3372
+ path?: string | undefined;
3373
+ expose_values?: boolean | undefined;
3374
+ allow?: unknown[] | undefined;
3375
+ equals?: unknown;
3376
+ glob_in?: string | undefined;
3377
+ each_in?: string | undefined;
3378
+ glob_allow?: string[] | undefined;
3379
+ each_allow?: unknown[] | undefined;
3380
+ label?: string | undefined;
3381
+ value_set?: string | undefined;
3382
+ }[]]> | undefined;
3383
+ description_append?: string | undefined;
3384
+ alias_of?: string | undefined;
3385
+ sandbox_presets?: string | string[] | undefined;
3386
+ sandbox?: {
3387
+ filesystem?: {
3388
+ allow_write?: string[] | undefined;
3389
+ deny_read?: string[] | undefined;
3390
+ deny_write?: string[] | undefined;
3391
+ allow_read?: string[] | undefined;
3392
+ } | undefined;
3393
+ network?: {
3394
+ allowed_domains?: string[] | undefined;
3395
+ denied_domains?: string[] | undefined;
3396
+ } | undefined;
3397
+ } | undefined;
3398
+ }>>>;
3399
+ arg_policy: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodUnion<[z.ZodEffects<z.ZodObject<{
3400
+ allow: z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>;
3401
+ equals: z.ZodOptional<z.ZodUnknown>;
3402
+ in: z.ZodOptional<z.ZodString>;
3403
+ glob_in: z.ZodOptional<z.ZodString>;
3404
+ each_in: z.ZodOptional<z.ZodString>;
3405
+ glob_allow: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3406
+ each_allow: z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>;
3407
+ normalize: z.ZodOptional<z.ZodArray<z.ZodEnum<["phone", "email", "lower", "trim"]>, "many">>;
3408
+ path: z.ZodOptional<z.ZodString>;
3409
+ required: z.ZodOptional<z.ZodBoolean>;
3410
+ label: z.ZodOptional<z.ZodString>;
3411
+ value_set: z.ZodOptional<z.ZodString>;
3412
+ expose_values: z.ZodOptional<z.ZodBoolean>;
3413
+ }, "strict", z.ZodTypeAny, {
3414
+ normalize?: ("trim" | "email" | "phone" | "lower")[] | undefined;
3415
+ in?: string | undefined;
3416
+ required?: boolean | undefined;
3417
+ path?: string | undefined;
3418
+ expose_values?: boolean | undefined;
3419
+ allow?: unknown[] | undefined;
3420
+ equals?: unknown;
3421
+ glob_in?: string | undefined;
3422
+ each_in?: string | undefined;
3423
+ glob_allow?: string[] | undefined;
3424
+ each_allow?: unknown[] | undefined;
3425
+ label?: string | undefined;
3426
+ value_set?: string | undefined;
3427
+ }, {
2400
3428
  normalize?: ("trim" | "email" | "phone" | "lower")[] | undefined;
2401
3429
  in?: string | undefined;
2402
3430
  required?: boolean | undefined;
@@ -2568,11 +3596,70 @@ export declare const ProfileConfig: z.ZodObject<{
2568
3596
  arg_scope: z.ZodOptional<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "atleastone">]>>, {
2569
3597
  [k: string]: string[];
2570
3598
  }, Record<string, string | [string, ...string[]]>>>;
3599
+ command_policy: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodObject<{
3600
+ allow: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
3601
+ ask: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
3602
+ deny: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
3603
+ default: z.ZodOptional<z.ZodEnum<["allow", "ask", "deny"]>>;
3604
+ }, "strict", z.ZodTypeAny, {
3605
+ allow: string[];
3606
+ ask: string[];
3607
+ deny: string[];
3608
+ default?: "allow" | "ask" | "deny" | undefined;
3609
+ }, {
3610
+ default?: "allow" | "ask" | "deny" | undefined;
3611
+ allow?: string[] | undefined;
3612
+ ask?: string[] | undefined;
3613
+ deny?: string[] | undefined;
3614
+ }>, {
3615
+ allow: string[];
3616
+ ask: string[];
3617
+ deny: string[];
3618
+ default?: "allow" | "ask" | "deny" | undefined;
3619
+ }, {
3620
+ default?: "allow" | "ask" | "deny" | undefined;
3621
+ allow?: string[] | undefined;
3622
+ ask?: string[] | undefined;
3623
+ deny?: string[] | undefined;
3624
+ }>>>>;
2571
3625
  }, "strict", z.ZodTypeAny, {
2572
3626
  allow: string[];
2573
3627
  ask: string[];
2574
3628
  deny: string[];
2575
3629
  extends: string[];
3630
+ tool_overrides: Record<string, {
3631
+ sandbox_presets: string[];
3632
+ description?: string | undefined;
3633
+ args?: Record<string, {
3634
+ normalize?: ("trim" | "email" | "phone" | "lower")[] | undefined;
3635
+ in?: string | undefined;
3636
+ required?: boolean | undefined;
3637
+ path?: string | undefined;
3638
+ expose_values?: boolean | undefined;
3639
+ allow?: unknown[] | undefined;
3640
+ equals?: unknown;
3641
+ glob_in?: string | undefined;
3642
+ each_in?: string | undefined;
3643
+ glob_allow?: string[] | undefined;
3644
+ each_allow?: unknown[] | undefined;
3645
+ label?: string | undefined;
3646
+ value_set?: string | undefined;
3647
+ }[]> | undefined;
3648
+ description_append?: string | undefined;
3649
+ alias_of?: string | undefined;
3650
+ sandbox?: {
3651
+ filesystem?: {
3652
+ allow_write: string[];
3653
+ deny_read: string[];
3654
+ deny_write: string[];
3655
+ allow_read?: string[] | undefined;
3656
+ } | undefined;
3657
+ network?: {
3658
+ allowed_domains: string[];
3659
+ denied_domains: string[];
3660
+ } | undefined;
3661
+ } | undefined;
3662
+ }>;
2576
3663
  arg_policy?: Record<string, Record<string, {
2577
3664
  normalize?: ("trim" | "email" | "phone" | "lower")[] | undefined;
2578
3665
  in?: string | undefined;
@@ -2591,11 +3678,78 @@ export declare const ProfileConfig: z.ZodObject<{
2591
3678
  arg_scope?: {
2592
3679
  [k: string]: string[];
2593
3680
  } | undefined;
3681
+ command_policy?: Record<string, Record<string, {
3682
+ allow: string[];
3683
+ ask: string[];
3684
+ deny: string[];
3685
+ default?: "allow" | "ask" | "deny" | undefined;
3686
+ }>> | undefined;
2594
3687
  }, {
2595
3688
  allow?: string[] | undefined;
2596
3689
  ask?: string[] | undefined;
2597
3690
  deny?: string[] | undefined;
2598
3691
  extends?: string[] | undefined;
3692
+ tool_overrides?: Record<string, {
3693
+ description?: string | undefined;
3694
+ args?: Record<string, {
3695
+ normalize?: ("trim" | "email" | "phone" | "lower")[] | undefined;
3696
+ in?: string | undefined;
3697
+ required?: boolean | undefined;
3698
+ path?: string | undefined;
3699
+ expose_values?: boolean | undefined;
3700
+ allow?: unknown[] | undefined;
3701
+ equals?: unknown;
3702
+ glob_in?: string | undefined;
3703
+ each_in?: string | undefined;
3704
+ glob_allow?: string[] | undefined;
3705
+ each_allow?: unknown[] | undefined;
3706
+ label?: string | undefined;
3707
+ value_set?: string | undefined;
3708
+ } | [{
3709
+ normalize?: ("trim" | "email" | "phone" | "lower")[] | undefined;
3710
+ in?: string | undefined;
3711
+ required?: boolean | undefined;
3712
+ path?: string | undefined;
3713
+ expose_values?: boolean | undefined;
3714
+ allow?: unknown[] | undefined;
3715
+ equals?: unknown;
3716
+ glob_in?: string | undefined;
3717
+ each_in?: string | undefined;
3718
+ glob_allow?: string[] | undefined;
3719
+ each_allow?: unknown[] | undefined;
3720
+ label?: string | undefined;
3721
+ value_set?: string | undefined;
3722
+ }, ...{
3723
+ normalize?: ("trim" | "email" | "phone" | "lower")[] | undefined;
3724
+ in?: string | undefined;
3725
+ required?: boolean | undefined;
3726
+ path?: string | undefined;
3727
+ expose_values?: boolean | undefined;
3728
+ allow?: unknown[] | undefined;
3729
+ equals?: unknown;
3730
+ glob_in?: string | undefined;
3731
+ each_in?: string | undefined;
3732
+ glob_allow?: string[] | undefined;
3733
+ each_allow?: unknown[] | undefined;
3734
+ label?: string | undefined;
3735
+ value_set?: string | undefined;
3736
+ }[]]> | undefined;
3737
+ description_append?: string | undefined;
3738
+ alias_of?: string | undefined;
3739
+ sandbox_presets?: string | string[] | undefined;
3740
+ sandbox?: {
3741
+ filesystem?: {
3742
+ allow_write?: string[] | undefined;
3743
+ deny_read?: string[] | undefined;
3744
+ deny_write?: string[] | undefined;
3745
+ allow_read?: string[] | undefined;
3746
+ } | undefined;
3747
+ network?: {
3748
+ allowed_domains?: string[] | undefined;
3749
+ denied_domains?: string[] | undefined;
3750
+ } | undefined;
3751
+ } | undefined;
3752
+ }> | undefined;
2599
3753
  arg_policy?: Record<string, Record<string, {
2600
3754
  normalize?: ("trim" | "email" | "phone" | "lower")[] | undefined;
2601
3755
  in?: string | undefined;
@@ -2640,6 +3794,12 @@ export declare const ProfileConfig: z.ZodObject<{
2640
3794
  value_set?: string | undefined;
2641
3795
  }[]]>> | undefined;
2642
3796
  arg_scope?: Record<string, string | [string, ...string[]]> | undefined;
3797
+ command_policy?: Record<string, Record<string, {
3798
+ default?: "allow" | "ask" | "deny" | undefined;
3799
+ allow?: string[] | undefined;
3800
+ ask?: string[] | undefined;
3801
+ deny?: string[] | undefined;
3802
+ }>> | undefined;
2643
3803
  }>;
2644
3804
  export type ProfileConfig = z.infer<typeof ProfileConfig>;
2645
3805
  export declare const ApprovalProviderConfig: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
@@ -2750,6 +3910,102 @@ export declare const ApprovalProviderConfig: z.ZodDiscriminatedUnion<"type", [z.
2750
3910
  }>]>;
2751
3911
  export type ApprovalProviderConfig = z.infer<typeof ApprovalProviderConfig>;
2752
3912
  export type HitlProviderConfig = ApprovalProviderConfig;
3913
+ export declare const ApprovalPreviewConfig: z.ZodObject<{
3914
+ tool: z.ZodString;
3915
+ args: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
3916
+ args_from: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
3917
+ fields: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodObject<{
3918
+ label: z.ZodString;
3919
+ path: z.ZodOptional<z.ZodString>;
3920
+ text_prefix: z.ZodOptional<z.ZodString>;
3921
+ primary: z.ZodDefault<z.ZodBoolean>;
3922
+ }, "strict", z.ZodTypeAny, {
3923
+ label: string;
3924
+ primary: boolean;
3925
+ path?: string | undefined;
3926
+ text_prefix?: string | undefined;
3927
+ }, {
3928
+ label: string;
3929
+ path?: string | undefined;
3930
+ text_prefix?: string | undefined;
3931
+ primary?: boolean | undefined;
3932
+ }>, {
3933
+ label: string;
3934
+ primary: boolean;
3935
+ path?: string | undefined;
3936
+ text_prefix?: string | undefined;
3937
+ }, {
3938
+ label: string;
3939
+ path?: string | undefined;
3940
+ text_prefix?: string | undefined;
3941
+ primary?: boolean | undefined;
3942
+ }>, "many">>;
3943
+ request_fields: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodObject<{
3944
+ label: z.ZodString;
3945
+ path: z.ZodOptional<z.ZodString>;
3946
+ text_prefix: z.ZodOptional<z.ZodString>;
3947
+ primary: z.ZodDefault<z.ZodBoolean>;
3948
+ }, "strict", z.ZodTypeAny, {
3949
+ label: string;
3950
+ primary: boolean;
3951
+ path?: string | undefined;
3952
+ text_prefix?: string | undefined;
3953
+ }, {
3954
+ label: string;
3955
+ path?: string | undefined;
3956
+ text_prefix?: string | undefined;
3957
+ primary?: boolean | undefined;
3958
+ }>, {
3959
+ label: string;
3960
+ primary: boolean;
3961
+ path?: string | undefined;
3962
+ text_prefix?: string | undefined;
3963
+ }, {
3964
+ label: string;
3965
+ path?: string | undefined;
3966
+ text_prefix?: string | undefined;
3967
+ primary?: boolean | undefined;
3968
+ }>, "many">>;
3969
+ timeout_ms: z.ZodDefault<z.ZodNumber>;
3970
+ max_chars: z.ZodDefault<z.ZodNumber>;
3971
+ }, "strict", z.ZodTypeAny, {
3972
+ tool: string;
3973
+ args: Record<string, unknown>;
3974
+ timeout_ms: number;
3975
+ max_chars: number;
3976
+ args_from: Record<string, string>;
3977
+ fields?: {
3978
+ label: string;
3979
+ primary: boolean;
3980
+ path?: string | undefined;
3981
+ text_prefix?: string | undefined;
3982
+ }[] | undefined;
3983
+ request_fields?: {
3984
+ label: string;
3985
+ primary: boolean;
3986
+ path?: string | undefined;
3987
+ text_prefix?: string | undefined;
3988
+ }[] | undefined;
3989
+ }, {
3990
+ tool: string;
3991
+ args?: Record<string, unknown> | undefined;
3992
+ timeout_ms?: number | undefined;
3993
+ max_chars?: number | undefined;
3994
+ args_from?: Record<string, string> | undefined;
3995
+ fields?: {
3996
+ label: string;
3997
+ path?: string | undefined;
3998
+ text_prefix?: string | undefined;
3999
+ primary?: boolean | undefined;
4000
+ }[] | undefined;
4001
+ request_fields?: {
4002
+ label: string;
4003
+ path?: string | undefined;
4004
+ text_prefix?: string | undefined;
4005
+ primary?: boolean | undefined;
4006
+ }[] | undefined;
4007
+ }>;
4008
+ export type ApprovalPreviewConfig = z.infer<typeof ApprovalPreviewConfig>;
2753
4009
  export declare const ApprovalsConfig: z.ZodObject<{
2754
4010
  provider: z.ZodDefault<z.ZodUnion<[z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
2755
4011
  type: z.ZodLiteral<"telegram">;
@@ -2964,6 +4220,101 @@ export declare const ApprovalsConfig: z.ZodObject<{
2964
4220
  }>]>, "many">]>>;
2965
4221
  timeout_ms: z.ZodDefault<z.ZodNumber>;
2966
4222
  batch_window_ms: z.ZodDefault<z.ZodNumber>;
4223
+ previews: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
4224
+ tool: z.ZodString;
4225
+ args: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
4226
+ args_from: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
4227
+ fields: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodObject<{
4228
+ label: z.ZodString;
4229
+ path: z.ZodOptional<z.ZodString>;
4230
+ text_prefix: z.ZodOptional<z.ZodString>;
4231
+ primary: z.ZodDefault<z.ZodBoolean>;
4232
+ }, "strict", z.ZodTypeAny, {
4233
+ label: string;
4234
+ primary: boolean;
4235
+ path?: string | undefined;
4236
+ text_prefix?: string | undefined;
4237
+ }, {
4238
+ label: string;
4239
+ path?: string | undefined;
4240
+ text_prefix?: string | undefined;
4241
+ primary?: boolean | undefined;
4242
+ }>, {
4243
+ label: string;
4244
+ primary: boolean;
4245
+ path?: string | undefined;
4246
+ text_prefix?: string | undefined;
4247
+ }, {
4248
+ label: string;
4249
+ path?: string | undefined;
4250
+ text_prefix?: string | undefined;
4251
+ primary?: boolean | undefined;
4252
+ }>, "many">>;
4253
+ request_fields: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodObject<{
4254
+ label: z.ZodString;
4255
+ path: z.ZodOptional<z.ZodString>;
4256
+ text_prefix: z.ZodOptional<z.ZodString>;
4257
+ primary: z.ZodDefault<z.ZodBoolean>;
4258
+ }, "strict", z.ZodTypeAny, {
4259
+ label: string;
4260
+ primary: boolean;
4261
+ path?: string | undefined;
4262
+ text_prefix?: string | undefined;
4263
+ }, {
4264
+ label: string;
4265
+ path?: string | undefined;
4266
+ text_prefix?: string | undefined;
4267
+ primary?: boolean | undefined;
4268
+ }>, {
4269
+ label: string;
4270
+ primary: boolean;
4271
+ path?: string | undefined;
4272
+ text_prefix?: string | undefined;
4273
+ }, {
4274
+ label: string;
4275
+ path?: string | undefined;
4276
+ text_prefix?: string | undefined;
4277
+ primary?: boolean | undefined;
4278
+ }>, "many">>;
4279
+ timeout_ms: z.ZodDefault<z.ZodNumber>;
4280
+ max_chars: z.ZodDefault<z.ZodNumber>;
4281
+ }, "strict", z.ZodTypeAny, {
4282
+ tool: string;
4283
+ args: Record<string, unknown>;
4284
+ timeout_ms: number;
4285
+ max_chars: number;
4286
+ args_from: Record<string, string>;
4287
+ fields?: {
4288
+ label: string;
4289
+ primary: boolean;
4290
+ path?: string | undefined;
4291
+ text_prefix?: string | undefined;
4292
+ }[] | undefined;
4293
+ request_fields?: {
4294
+ label: string;
4295
+ primary: boolean;
4296
+ path?: string | undefined;
4297
+ text_prefix?: string | undefined;
4298
+ }[] | undefined;
4299
+ }, {
4300
+ tool: string;
4301
+ args?: Record<string, unknown> | undefined;
4302
+ timeout_ms?: number | undefined;
4303
+ max_chars?: number | undefined;
4304
+ args_from?: Record<string, string> | undefined;
4305
+ fields?: {
4306
+ label: string;
4307
+ path?: string | undefined;
4308
+ text_prefix?: string | undefined;
4309
+ primary?: boolean | undefined;
4310
+ }[] | undefined;
4311
+ request_fields?: {
4312
+ label: string;
4313
+ path?: string | undefined;
4314
+ text_prefix?: string | undefined;
4315
+ primary?: boolean | undefined;
4316
+ }[] | undefined;
4317
+ }>>>;
2967
4318
  }, "strict", z.ZodTypeAny, {
2968
4319
  timeout_ms: number;
2969
4320
  provider: {
@@ -3038,6 +4389,25 @@ export declare const ApprovalsConfig: z.ZodObject<{
3038
4389
  type: "stdio";
3039
4390
  })[];
3040
4391
  batch_window_ms: number;
4392
+ previews: Record<string, {
4393
+ tool: string;
4394
+ args: Record<string, unknown>;
4395
+ timeout_ms: number;
4396
+ max_chars: number;
4397
+ args_from: Record<string, string>;
4398
+ fields?: {
4399
+ label: string;
4400
+ primary: boolean;
4401
+ path?: string | undefined;
4402
+ text_prefix?: string | undefined;
4403
+ }[] | undefined;
4404
+ request_fields?: {
4405
+ label: string;
4406
+ primary: boolean;
4407
+ path?: string | undefined;
4408
+ text_prefix?: string | undefined;
4409
+ }[] | undefined;
4410
+ }>;
3041
4411
  }, {
3042
4412
  timeout_ms?: number | undefined;
3043
4413
  provider?: {
@@ -3112,16 +4482,83 @@ export declare const ApprovalsConfig: z.ZodObject<{
3112
4482
  type: "stdio";
3113
4483
  })[] | undefined;
3114
4484
  batch_window_ms?: number | undefined;
4485
+ previews?: Record<string, {
4486
+ tool: string;
4487
+ args?: Record<string, unknown> | undefined;
4488
+ timeout_ms?: number | undefined;
4489
+ max_chars?: number | undefined;
4490
+ args_from?: Record<string, string> | undefined;
4491
+ fields?: {
4492
+ label: string;
4493
+ path?: string | undefined;
4494
+ text_prefix?: string | undefined;
4495
+ primary?: boolean | undefined;
4496
+ }[] | undefined;
4497
+ request_fields?: {
4498
+ label: string;
4499
+ path?: string | undefined;
4500
+ text_prefix?: string | undefined;
4501
+ primary?: boolean | undefined;
4502
+ }[] | undefined;
4503
+ }> | undefined;
3115
4504
  }>;
3116
4505
  export type ApprovalsConfig = z.infer<typeof ApprovalsConfig>;
3117
4506
  export type HitlConfig = ApprovalsConfig;
3118
4507
  export declare const SecurityConfig: z.ZodObject<{
3119
4508
  blocked_hosts: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
3120
4509
  allowed_local: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
4510
+ limits: z.ZodOptional<z.ZodObject<{
4511
+ max_sessions_per_agent: z.ZodOptional<z.ZodNumber>;
4512
+ max_sessions_global: z.ZodOptional<z.ZodNumber>;
4513
+ session_idle_ms: z.ZodOptional<z.ZodNumber>;
4514
+ session_max_lifetime_ms: z.ZodOptional<z.ZodNumber>;
4515
+ new_session_max: z.ZodOptional<z.ZodNumber>;
4516
+ new_session_window_ms: z.ZodOptional<z.ZodNumber>;
4517
+ max_concurrent_calls_per_agent: z.ZodOptional<z.ZodNumber>;
4518
+ call_execution_timeout_ms: z.ZodOptional<z.ZodNumber>;
4519
+ }, "strict", z.ZodTypeAny, {
4520
+ max_sessions_per_agent?: number | undefined;
4521
+ max_sessions_global?: number | undefined;
4522
+ session_idle_ms?: number | undefined;
4523
+ session_max_lifetime_ms?: number | undefined;
4524
+ new_session_max?: number | undefined;
4525
+ new_session_window_ms?: number | undefined;
4526
+ max_concurrent_calls_per_agent?: number | undefined;
4527
+ call_execution_timeout_ms?: number | undefined;
4528
+ }, {
4529
+ max_sessions_per_agent?: number | undefined;
4530
+ max_sessions_global?: number | undefined;
4531
+ session_idle_ms?: number | undefined;
4532
+ session_max_lifetime_ms?: number | undefined;
4533
+ new_session_max?: number | undefined;
4534
+ new_session_window_ms?: number | undefined;
4535
+ max_concurrent_calls_per_agent?: number | undefined;
4536
+ call_execution_timeout_ms?: number | undefined;
4537
+ }>>;
3121
4538
  }, "strict", z.ZodTypeAny, {
3122
4539
  blocked_hosts: string[];
3123
4540
  allowed_local: string[];
4541
+ limits?: {
4542
+ max_sessions_per_agent?: number | undefined;
4543
+ max_sessions_global?: number | undefined;
4544
+ session_idle_ms?: number | undefined;
4545
+ session_max_lifetime_ms?: number | undefined;
4546
+ new_session_max?: number | undefined;
4547
+ new_session_window_ms?: number | undefined;
4548
+ max_concurrent_calls_per_agent?: number | undefined;
4549
+ call_execution_timeout_ms?: number | undefined;
4550
+ } | undefined;
3124
4551
  }, {
4552
+ limits?: {
4553
+ max_sessions_per_agent?: number | undefined;
4554
+ max_sessions_global?: number | undefined;
4555
+ session_idle_ms?: number | undefined;
4556
+ session_max_lifetime_ms?: number | undefined;
4557
+ new_session_max?: number | undefined;
4558
+ new_session_window_ms?: number | undefined;
4559
+ max_concurrent_calls_per_agent?: number | undefined;
4560
+ call_execution_timeout_ms?: number | undefined;
4561
+ } | undefined;
3125
4562
  blocked_hosts?: string[] | undefined;
3126
4563
  allowed_local?: string[] | undefined;
3127
4564
  }>;
@@ -3163,6 +4600,8 @@ export declare const ManagementApiConfig: z.ZodObject<{
3163
4600
  expose_hook_api?: boolean | undefined;
3164
4601
  }>;
3165
4602
  export type ManagementApiConfig = z.infer<typeof ManagementApiConfig>;
4603
+ export declare const ToolsApiMode: z.ZodEnum<["all", "none", "per-agent"]>;
4604
+ export type ToolsApiMode = z.infer<typeof ToolsApiMode>;
3166
4605
  export declare const ServerConfig: z.ZodEffects<z.ZodObject<{
3167
4606
  port: z.ZodDefault<z.ZodNumber>;
3168
4607
  host: z.ZodDefault<z.ZodString>;
@@ -3170,7 +4609,7 @@ export declare const ServerConfig: z.ZodEffects<z.ZodObject<{
3170
4609
  auth_required: z.ZodDefault<z.ZodBoolean>;
3171
4610
  require_agent_tokens: z.ZodDefault<z.ZodBoolean>;
3172
4611
  allowed_origins: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
3173
- expose_tools_api: z.ZodDefault<z.ZodBoolean>;
4612
+ expose_tools_api: z.ZodDefault<z.ZodEffects<z.ZodEnum<["all", "none", "per-agent"]>, "all" | "none" | "per-agent", unknown>>;
3174
4613
  management_api: z.ZodDefault<z.ZodObject<{
3175
4614
  enabled: z.ZodDefault<z.ZodBoolean>;
3176
4615
  api_secret: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
@@ -3196,12 +4635,12 @@ export declare const ServerConfig: z.ZodEffects<z.ZodObject<{
3196
4635
  expose_management_api: z.ZodOptional<z.ZodBoolean>;
3197
4636
  expose_hook_api: z.ZodOptional<z.ZodBoolean>;
3198
4637
  }, "strict", z.ZodTypeAny, {
4638
+ auth_required: boolean;
3199
4639
  port: number;
4640
+ expose_tools_api: "all" | "none" | "per-agent";
3200
4641
  host: string;
3201
- auth_required: boolean;
3202
4642
  require_agent_tokens: boolean;
3203
4643
  allowed_origins: string[];
3204
- expose_tools_api: boolean;
3205
4644
  management_api: {
3206
4645
  port: number;
3207
4646
  enabled: boolean;
@@ -3214,14 +4653,14 @@ export declare const ServerConfig: z.ZodEffects<z.ZodObject<{
3214
4653
  expose_hook_api?: boolean | undefined;
3215
4654
  expose_management_api?: boolean | undefined;
3216
4655
  }, {
4656
+ auth_required?: boolean | undefined;
3217
4657
  port?: number | undefined;
4658
+ expose_tools_api?: unknown;
3218
4659
  host?: string | undefined;
3219
4660
  api_secret?: string | undefined;
3220
4661
  expose_hook_api?: boolean | undefined;
3221
- auth_required?: boolean | undefined;
3222
4662
  require_agent_tokens?: boolean | undefined;
3223
4663
  allowed_origins?: string[] | undefined;
3224
- expose_tools_api?: boolean | undefined;
3225
4664
  management_api?: {
3226
4665
  port?: number | undefined;
3227
4666
  enabled?: boolean | undefined;
@@ -3240,24 +4679,24 @@ export declare const ServerConfig: z.ZodEffects<z.ZodObject<{
3240
4679
  insecure_remote_bind: boolean;
3241
4680
  api_secret?: string | undefined;
3242
4681
  };
4682
+ auth_required: boolean;
3243
4683
  port: number;
4684
+ expose_tools_api: "all" | "none" | "per-agent";
3244
4685
  host: string;
3245
- auth_required: boolean;
3246
4686
  require_agent_tokens: boolean;
3247
4687
  allowed_origins: string[];
3248
- expose_tools_api: boolean;
3249
4688
  api_secret?: string | undefined;
3250
4689
  expose_hook_api?: boolean | undefined;
3251
4690
  expose_management_api?: boolean | undefined;
3252
4691
  }, {
4692
+ auth_required?: boolean | undefined;
3253
4693
  port?: number | undefined;
4694
+ expose_tools_api?: unknown;
3254
4695
  host?: string | undefined;
3255
4696
  api_secret?: string | undefined;
3256
4697
  expose_hook_api?: boolean | undefined;
3257
- auth_required?: boolean | undefined;
3258
4698
  require_agent_tokens?: boolean | undefined;
3259
4699
  allowed_origins?: string[] | undefined;
3260
- expose_tools_api?: boolean | undefined;
3261
4700
  management_api?: {
3262
4701
  port?: number | undefined;
3263
4702
  enabled?: boolean | undefined;
@@ -3269,20 +4708,20 @@ export declare const ServerConfig: z.ZodEffects<z.ZodObject<{
3269
4708
  expose_management_api?: boolean | undefined;
3270
4709
  }>;
3271
4710
  export type ServerConfig = z.infer<typeof ServerConfig>;
3272
- export declare const LINT_RULE_IDS: readonly ["dead-deny", "unused-profile", "unused-value-set", "unused-dimension", "empty-agent", "missing-env-ref", "unresolvable-ref"];
4711
+ export declare const LINT_RULE_IDS: readonly ["dead-deny", "unused-profile", "unused-value-set", "unused-dimension", "empty-agent", "missing-env-ref", "unresolvable-ref", "unallocated-tool", "dead-allow"];
3273
4712
  export type LintRuleId = (typeof LINT_RULE_IDS)[number];
3274
- export declare const LintRuleIdConfig: z.ZodEnum<["dead-deny", "unused-profile", "unused-value-set", "unused-dimension", "empty-agent", "missing-env-ref", "unresolvable-ref"]>;
4713
+ export declare const LintRuleIdConfig: z.ZodEnum<["dead-deny", "unused-profile", "unused-value-set", "unused-dimension", "empty-agent", "missing-env-ref", "unresolvable-ref", "unallocated-tool", "dead-allow"]>;
3275
4714
  export declare const LintRuleSeverityConfig: z.ZodEnum<["info", "warn", "error"]>;
3276
4715
  export type LintRuleSeverity = z.infer<typeof LintRuleSeverityConfig>;
3277
4716
  export declare const LintConfig: z.ZodObject<{
3278
- disable: z.ZodDefault<z.ZodArray<z.ZodEnum<["dead-deny", "unused-profile", "unused-value-set", "unused-dimension", "empty-agent", "missing-env-ref", "unresolvable-ref"]>, "many">>;
3279
- severity: z.ZodDefault<z.ZodRecord<z.ZodEnum<["dead-deny", "unused-profile", "unused-value-set", "unused-dimension", "empty-agent", "missing-env-ref", "unresolvable-ref"]>, z.ZodEnum<["info", "warn", "error"]>>>;
4717
+ disable: z.ZodDefault<z.ZodArray<z.ZodEnum<["dead-deny", "unused-profile", "unused-value-set", "unused-dimension", "empty-agent", "missing-env-ref", "unresolvable-ref", "unallocated-tool", "dead-allow"]>, "many">>;
4718
+ severity: z.ZodDefault<z.ZodRecord<z.ZodEnum<["dead-deny", "unused-profile", "unused-value-set", "unused-dimension", "empty-agent", "missing-env-ref", "unresolvable-ref", "unallocated-tool", "dead-allow"]>, z.ZodEnum<["info", "warn", "error"]>>>;
3280
4719
  }, "strict", z.ZodTypeAny, {
3281
- disable: ("dead-deny" | "unused-profile" | "unused-value-set" | "unused-dimension" | "empty-agent" | "missing-env-ref" | "unresolvable-ref")[];
3282
- severity: Partial<Record<"dead-deny" | "unused-profile" | "unused-value-set" | "unused-dimension" | "empty-agent" | "missing-env-ref" | "unresolvable-ref", "error" | "warn" | "info">>;
4720
+ disable: ("dead-deny" | "unused-profile" | "unused-value-set" | "unused-dimension" | "empty-agent" | "missing-env-ref" | "unresolvable-ref" | "unallocated-tool" | "dead-allow")[];
4721
+ severity: Partial<Record<"dead-deny" | "unused-profile" | "unused-value-set" | "unused-dimension" | "empty-agent" | "missing-env-ref" | "unresolvable-ref" | "unallocated-tool" | "dead-allow", "error" | "warn" | "info">>;
3283
4722
  }, {
3284
- disable?: ("dead-deny" | "unused-profile" | "unused-value-set" | "unused-dimension" | "empty-agent" | "missing-env-ref" | "unresolvable-ref")[] | undefined;
3285
- severity?: Partial<Record<"dead-deny" | "unused-profile" | "unused-value-set" | "unused-dimension" | "empty-agent" | "missing-env-ref" | "unresolvable-ref", "error" | "warn" | "info">> | undefined;
4723
+ disable?: ("dead-deny" | "unused-profile" | "unused-value-set" | "unused-dimension" | "empty-agent" | "missing-env-ref" | "unresolvable-ref" | "unallocated-tool" | "dead-allow")[] | undefined;
4724
+ severity?: Partial<Record<"dead-deny" | "unused-profile" | "unused-value-set" | "unused-dimension" | "empty-agent" | "missing-env-ref" | "unresolvable-ref" | "unallocated-tool" | "dead-allow", "error" | "warn" | "info">> | undefined;
3286
4725
  }>;
3287
4726
  export type LintConfig = z.infer<typeof LintConfig>;
3288
4727
  export declare const CliParamConfig: z.ZodObject<{
@@ -3515,9 +4954,10 @@ export declare const ApiConfig: z.ZodObject<{
3515
4954
  timeout_ms: z.ZodDefault<z.ZodNumber>;
3516
4955
  max_response_bytes: z.ZodDefault<z.ZodNumber>;
3517
4956
  }, "strict", z.ZodTypeAny, {
3518
- max_response_bytes: number;
3519
4957
  timeout_ms: number;
4958
+ max_response_bytes: number;
3520
4959
  spec: string;
4960
+ include?: string[] | undefined;
3521
4961
  exclude?: string[] | undefined;
3522
4962
  base_url?: string | undefined;
3523
4963
  auth?: {
@@ -3528,11 +4968,11 @@ export declare const ApiConfig: z.ZodObject<{
3528
4968
  type: "header";
3529
4969
  value: string;
3530
4970
  } | undefined;
3531
- include?: string[] | undefined;
3532
4971
  }, {
3533
4972
  spec: string;
3534
- max_response_bytes?: number | undefined;
4973
+ include?: string[] | undefined;
3535
4974
  timeout_ms?: number | undefined;
4975
+ max_response_bytes?: number | undefined;
3536
4976
  exclude?: string[] | undefined;
3537
4977
  base_url?: string | undefined;
3538
4978
  auth?: {
@@ -3543,7 +4983,6 @@ export declare const ApiConfig: z.ZodObject<{
3543
4983
  type: "header";
3544
4984
  value: string;
3545
4985
  } | undefined;
3546
- include?: string[] | undefined;
3547
4986
  }>;
3548
4987
  export type ApiConfig = z.infer<typeof ApiConfig>;
3549
4988
  export declare const SandboxPresetConfig: z.ZodObject<{
@@ -3599,15 +5038,49 @@ export declare const SandboxPresetConfig: z.ZodObject<{
3599
5038
  export type SandboxPresetConfig = z.infer<typeof SandboxPresetConfig>;
3600
5039
  export declare const GatewayConfig: z.ZodEffects<z.ZodObject<{
3601
5040
  providers: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodLiteral<"builtin">, z.ZodObject<{
5041
+ instructions: z.ZodOptional<z.ZodString>;
5042
+ upstream_instructions: z.ZodOptional<z.ZodEnum<["include", "ignore"]>>;
3602
5043
  type: z.ZodLiteral<"builtin">;
3603
5044
  enabled: z.ZodDefault<z.ZodBoolean>;
3604
5045
  }, "strict", z.ZodTypeAny, {
3605
5046
  type: "builtin";
3606
5047
  enabled: boolean;
5048
+ instructions?: string | undefined;
5049
+ upstream_instructions?: "ignore" | "include" | undefined;
3607
5050
  }, {
3608
5051
  type: "builtin";
3609
5052
  enabled?: boolean | undefined;
5053
+ instructions?: string | undefined;
5054
+ upstream_instructions?: "ignore" | "include" | undefined;
3610
5055
  }>, z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
5056
+ credential_probe: z.ZodOptional<z.ZodObject<{
5057
+ /** Provider-local tool name — unprefixed, e.g. `search_gmail_messages`. */
5058
+ tool: z.ZodString;
5059
+ args: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
5060
+ /** Healthy responses must contain this substring; otherwise the credential is auth_required. */
5061
+ expect_contains: z.ZodOptional<z.ZodString>;
5062
+ /** Healthy responses must NOT contain this substring. See the caveat above. */
5063
+ reject_contains: z.ZodOptional<z.ZodString>;
5064
+ /** Cache TTL. Floored at a minute so a hot /health poll can't hammer a provider's API quota. */
5065
+ interval_ms: z.ZodDefault<z.ZodNumber>;
5066
+ timeout_ms: z.ZodDefault<z.ZodNumber>;
5067
+ }, "strict", z.ZodTypeAny, {
5068
+ tool: string;
5069
+ args: Record<string, unknown>;
5070
+ interval_ms: number;
5071
+ timeout_ms: number;
5072
+ expect_contains?: string | undefined;
5073
+ reject_contains?: string | undefined;
5074
+ }, {
5075
+ tool: string;
5076
+ args?: Record<string, unknown> | undefined;
5077
+ expect_contains?: string | undefined;
5078
+ reject_contains?: string | undefined;
5079
+ interval_ms?: number | undefined;
5080
+ timeout_ms?: number | undefined;
5081
+ }>>;
5082
+ instructions: z.ZodOptional<z.ZodString>;
5083
+ upstream_instructions: z.ZodOptional<z.ZodEnum<["include", "ignore"]>>;
3611
5084
  type: z.ZodLiteral<"stdio">;
3612
5085
  enabled: z.ZodDefault<z.ZodBoolean>;
3613
5086
  command: z.ZodString;
@@ -3615,17 +5088,65 @@ export declare const GatewayConfig: z.ZodEffects<z.ZodObject<{
3615
5088
  env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodString, string, string>>>;
3616
5089
  }, "strict", z.ZodTypeAny, {
3617
5090
  type: "stdio";
5091
+ args: string[];
3618
5092
  enabled: boolean;
3619
5093
  command: string;
3620
- args: string[];
3621
5094
  env?: Record<string, string> | undefined;
5095
+ credential_probe?: {
5096
+ tool: string;
5097
+ args: Record<string, unknown>;
5098
+ interval_ms: number;
5099
+ timeout_ms: number;
5100
+ expect_contains?: string | undefined;
5101
+ reject_contains?: string | undefined;
5102
+ } | undefined;
5103
+ instructions?: string | undefined;
5104
+ upstream_instructions?: "ignore" | "include" | undefined;
3622
5105
  }, {
3623
5106
  type: "stdio";
3624
5107
  command: string;
3625
- enabled?: boolean | undefined;
3626
5108
  args?: string[] | undefined;
5109
+ enabled?: boolean | undefined;
3627
5110
  env?: Record<string, string> | undefined;
5111
+ credential_probe?: {
5112
+ tool: string;
5113
+ args?: Record<string, unknown> | undefined;
5114
+ expect_contains?: string | undefined;
5115
+ reject_contains?: string | undefined;
5116
+ interval_ms?: number | undefined;
5117
+ timeout_ms?: number | undefined;
5118
+ } | undefined;
5119
+ instructions?: string | undefined;
5120
+ upstream_instructions?: "ignore" | "include" | undefined;
3628
5121
  }>, z.ZodObject<{
5122
+ credential_probe: z.ZodOptional<z.ZodObject<{
5123
+ /** Provider-local tool name — unprefixed, e.g. `search_gmail_messages`. */
5124
+ tool: z.ZodString;
5125
+ args: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
5126
+ /** Healthy responses must contain this substring; otherwise the credential is auth_required. */
5127
+ expect_contains: z.ZodOptional<z.ZodString>;
5128
+ /** Healthy responses must NOT contain this substring. See the caveat above. */
5129
+ reject_contains: z.ZodOptional<z.ZodString>;
5130
+ /** Cache TTL. Floored at a minute so a hot /health poll can't hammer a provider's API quota. */
5131
+ interval_ms: z.ZodDefault<z.ZodNumber>;
5132
+ timeout_ms: z.ZodDefault<z.ZodNumber>;
5133
+ }, "strict", z.ZodTypeAny, {
5134
+ tool: string;
5135
+ args: Record<string, unknown>;
5136
+ interval_ms: number;
5137
+ timeout_ms: number;
5138
+ expect_contains?: string | undefined;
5139
+ reject_contains?: string | undefined;
5140
+ }, {
5141
+ tool: string;
5142
+ args?: Record<string, unknown> | undefined;
5143
+ expect_contains?: string | undefined;
5144
+ reject_contains?: string | undefined;
5145
+ interval_ms?: number | undefined;
5146
+ timeout_ms?: number | undefined;
5147
+ }>>;
5148
+ instructions: z.ZodOptional<z.ZodString>;
5149
+ upstream_instructions: z.ZodOptional<z.ZodEnum<["include", "ignore"]>>;
3629
5150
  type: z.ZodLiteral<"sse">;
3630
5151
  enabled: z.ZodDefault<z.ZodBoolean>;
3631
5152
  url: z.ZodString;
@@ -3634,13 +5155,61 @@ export declare const GatewayConfig: z.ZodEffects<z.ZodObject<{
3634
5155
  url: string;
3635
5156
  type: "sse";
3636
5157
  enabled: boolean;
5158
+ credential_probe?: {
5159
+ tool: string;
5160
+ args: Record<string, unknown>;
5161
+ interval_ms: number;
5162
+ timeout_ms: number;
5163
+ expect_contains?: string | undefined;
5164
+ reject_contains?: string | undefined;
5165
+ } | undefined;
5166
+ instructions?: string | undefined;
5167
+ upstream_instructions?: "ignore" | "include" | undefined;
3637
5168
  headers?: Record<string, string> | undefined;
3638
5169
  }, {
3639
5170
  url: string;
3640
5171
  type: "sse";
3641
5172
  enabled?: boolean | undefined;
5173
+ credential_probe?: {
5174
+ tool: string;
5175
+ args?: Record<string, unknown> | undefined;
5176
+ expect_contains?: string | undefined;
5177
+ reject_contains?: string | undefined;
5178
+ interval_ms?: number | undefined;
5179
+ timeout_ms?: number | undefined;
5180
+ } | undefined;
5181
+ instructions?: string | undefined;
5182
+ upstream_instructions?: "ignore" | "include" | undefined;
3642
5183
  headers?: Record<string, string> | undefined;
3643
5184
  }>, z.ZodObject<{
5185
+ credential_probe: z.ZodOptional<z.ZodObject<{
5186
+ /** Provider-local tool name — unprefixed, e.g. `search_gmail_messages`. */
5187
+ tool: z.ZodString;
5188
+ args: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
5189
+ /** Healthy responses must contain this substring; otherwise the credential is auth_required. */
5190
+ expect_contains: z.ZodOptional<z.ZodString>;
5191
+ /** Healthy responses must NOT contain this substring. See the caveat above. */
5192
+ reject_contains: z.ZodOptional<z.ZodString>;
5193
+ /** Cache TTL. Floored at a minute so a hot /health poll can't hammer a provider's API quota. */
5194
+ interval_ms: z.ZodDefault<z.ZodNumber>;
5195
+ timeout_ms: z.ZodDefault<z.ZodNumber>;
5196
+ }, "strict", z.ZodTypeAny, {
5197
+ tool: string;
5198
+ args: Record<string, unknown>;
5199
+ interval_ms: number;
5200
+ timeout_ms: number;
5201
+ expect_contains?: string | undefined;
5202
+ reject_contains?: string | undefined;
5203
+ }, {
5204
+ tool: string;
5205
+ args?: Record<string, unknown> | undefined;
5206
+ expect_contains?: string | undefined;
5207
+ reject_contains?: string | undefined;
5208
+ interval_ms?: number | undefined;
5209
+ timeout_ms?: number | undefined;
5210
+ }>>;
5211
+ instructions: z.ZodOptional<z.ZodString>;
5212
+ upstream_instructions: z.ZodOptional<z.ZodEnum<["include", "ignore"]>>;
3644
5213
  type: z.ZodLiteral<"http">;
3645
5214
  enabled: z.ZodDefault<z.ZodBoolean>;
3646
5215
  url: z.ZodString;
@@ -3650,16 +5219,62 @@ export declare const GatewayConfig: z.ZodEffects<z.ZodObject<{
3650
5219
  oauth_callback_url: z.ZodOptional<z.ZodString>;
3651
5220
  client_id: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
3652
5221
  client_secret: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
5222
+ client_credentials: z.ZodOptional<z.ZodObject<{
5223
+ /** The issuer's token endpoint, e.g. `https://api.linear.app/oauth/token`. */
5224
+ token_url: z.ZodString;
5225
+ client_id: z.ZodEffects<z.ZodString, string, string>;
5226
+ client_secret: z.ZodEffects<z.ZodString, string, string>;
5227
+ /**
5228
+ * Scopes to request, verbatim — the separator is the issuer's to define (Linear uses commas,
5229
+ * the OAuth2 spec says spaces), so the string is passed through untouched. Omit to accept the
5230
+ * issuer's default scopes. NOTE: some issuers revoke every live token when an app's scopes
5231
+ * change, so treat this as a value that is changed deliberately, not tuned.
5232
+ */
5233
+ scope: z.ZodOptional<z.ZodString>;
5234
+ }, "strict", z.ZodTypeAny, {
5235
+ client_id: string;
5236
+ client_secret: string;
5237
+ token_url: string;
5238
+ scope?: string | undefined;
5239
+ }, {
5240
+ client_id: string;
5241
+ client_secret: string;
5242
+ token_url: string;
5243
+ scope?: string | undefined;
5244
+ }>>;
5245
+ /**
5246
+ * Per-request MCP SDK deadline. The SDK otherwise imposes an invisible 60s default even when
5247
+ * Airlock's outer call_execution_timeout_ms is higher, so slow but healthy providers can
5248
+ * never use the operator-configured execution budget.
5249
+ */
5250
+ request_timeout_ms: z.ZodDefault<z.ZodNumber>;
3653
5251
  }, "strict", z.ZodTypeAny, {
3654
5252
  url: string;
3655
5253
  type: "http";
3656
5254
  oauth: boolean;
3657
5255
  enabled: boolean;
3658
5256
  oauth_callback_port: number;
5257
+ request_timeout_ms: number;
3659
5258
  client_id?: string | undefined;
3660
5259
  client_secret?: string | undefined;
5260
+ credential_probe?: {
5261
+ tool: string;
5262
+ args: Record<string, unknown>;
5263
+ interval_ms: number;
5264
+ timeout_ms: number;
5265
+ expect_contains?: string | undefined;
5266
+ reject_contains?: string | undefined;
5267
+ } | undefined;
5268
+ instructions?: string | undefined;
5269
+ upstream_instructions?: "ignore" | "include" | undefined;
3661
5270
  headers?: Record<string, string> | undefined;
3662
5271
  oauth_callback_url?: string | undefined;
5272
+ client_credentials?: {
5273
+ client_id: string;
5274
+ client_secret: string;
5275
+ token_url: string;
5276
+ scope?: string | undefined;
5277
+ } | undefined;
3663
5278
  }, {
3664
5279
  url: string;
3665
5280
  type: "http";
@@ -3667,9 +5282,26 @@ export declare const GatewayConfig: z.ZodEffects<z.ZodObject<{
3667
5282
  client_id?: string | undefined;
3668
5283
  client_secret?: string | undefined;
3669
5284
  enabled?: boolean | undefined;
5285
+ credential_probe?: {
5286
+ tool: string;
5287
+ args?: Record<string, unknown> | undefined;
5288
+ expect_contains?: string | undefined;
5289
+ reject_contains?: string | undefined;
5290
+ interval_ms?: number | undefined;
5291
+ timeout_ms?: number | undefined;
5292
+ } | undefined;
5293
+ instructions?: string | undefined;
5294
+ upstream_instructions?: "ignore" | "include" | undefined;
3670
5295
  headers?: Record<string, string> | undefined;
3671
5296
  oauth_callback_port?: number | undefined;
3672
5297
  oauth_callback_url?: string | undefined;
5298
+ client_credentials?: {
5299
+ client_id: string;
5300
+ client_secret: string;
5301
+ token_url: string;
5302
+ scope?: string | undefined;
5303
+ } | undefined;
5304
+ request_timeout_ms?: number | undefined;
3673
5305
  }>]>]>>>;
3674
5306
  value_sets: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodUnion<[z.ZodArray<z.ZodUnknown, "atleastone">, z.ZodObject<{
3675
5307
  values: z.ZodArray<z.ZodUnknown, "atleastone">;
@@ -3705,6 +5337,356 @@ export declare const GatewayConfig: z.ZodEffects<z.ZodObject<{
3705
5337
  allow: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
3706
5338
  ask: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
3707
5339
  deny: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
5340
+ tool_overrides: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
5341
+ /** Replaces the upstream description entirely. */
5342
+ description: z.ZodOptional<z.ZodString>;
5343
+ /**
5344
+ * Appended after whatever description survives (upstream, or `description` when set). Use this
5345
+ * for house rules you want on top of the vendor's docs without restating them by hand.
5346
+ */
5347
+ description_append: z.ZodOptional<z.ZodString>;
5348
+ alias_of: z.ZodOptional<z.ZodString>;
5349
+ sandbox_presets: z.ZodDefault<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, string[], string | string[]>>;
5350
+ sandbox: z.ZodOptional<z.ZodObject<{
5351
+ filesystem: z.ZodOptional<z.ZodObject<{
5352
+ allow_write: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
5353
+ deny_read: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
5354
+ deny_write: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
5355
+ allow_read: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
5356
+ }, "strict", z.ZodTypeAny, {
5357
+ allow_write: string[];
5358
+ deny_read: string[];
5359
+ deny_write: string[];
5360
+ allow_read?: string[] | undefined;
5361
+ }, {
5362
+ allow_write?: string[] | undefined;
5363
+ deny_read?: string[] | undefined;
5364
+ deny_write?: string[] | undefined;
5365
+ allow_read?: string[] | undefined;
5366
+ }>>;
5367
+ network: z.ZodOptional<z.ZodObject<{
5368
+ allowed_domains: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
5369
+ denied_domains: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
5370
+ }, "strict", z.ZodTypeAny, {
5371
+ allowed_domains: string[];
5372
+ denied_domains: string[];
5373
+ }, {
5374
+ allowed_domains?: string[] | undefined;
5375
+ denied_domains?: string[] | undefined;
5376
+ }>>;
5377
+ }, "strict", z.ZodTypeAny, {
5378
+ filesystem?: {
5379
+ allow_write: string[];
5380
+ deny_read: string[];
5381
+ deny_write: string[];
5382
+ allow_read?: string[] | undefined;
5383
+ } | undefined;
5384
+ network?: {
5385
+ allowed_domains: string[];
5386
+ denied_domains: string[];
5387
+ } | undefined;
5388
+ }, {
5389
+ filesystem?: {
5390
+ allow_write?: string[] | undefined;
5391
+ deny_read?: string[] | undefined;
5392
+ deny_write?: string[] | undefined;
5393
+ allow_read?: string[] | undefined;
5394
+ } | undefined;
5395
+ network?: {
5396
+ allowed_domains?: string[] | undefined;
5397
+ denied_domains?: string[] | undefined;
5398
+ } | undefined;
5399
+ }>>;
5400
+ args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodUnion<[z.ZodEffects<z.ZodObject<{
5401
+ allow: z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>;
5402
+ equals: z.ZodOptional<z.ZodUnknown>;
5403
+ in: z.ZodOptional<z.ZodString>;
5404
+ glob_in: z.ZodOptional<z.ZodString>;
5405
+ each_in: z.ZodOptional<z.ZodString>;
5406
+ glob_allow: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
5407
+ each_allow: z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>;
5408
+ normalize: z.ZodOptional<z.ZodArray<z.ZodEnum<["phone", "email", "lower", "trim"]>, "many">>;
5409
+ path: z.ZodOptional<z.ZodString>;
5410
+ required: z.ZodOptional<z.ZodBoolean>;
5411
+ label: z.ZodOptional<z.ZodString>;
5412
+ value_set: z.ZodOptional<z.ZodString>;
5413
+ expose_values: z.ZodOptional<z.ZodBoolean>;
5414
+ }, "strict", z.ZodTypeAny, {
5415
+ normalize?: ("trim" | "email" | "phone" | "lower")[] | undefined;
5416
+ in?: string | undefined;
5417
+ required?: boolean | undefined;
5418
+ path?: string | undefined;
5419
+ expose_values?: boolean | undefined;
5420
+ allow?: unknown[] | undefined;
5421
+ equals?: unknown;
5422
+ glob_in?: string | undefined;
5423
+ each_in?: string | undefined;
5424
+ glob_allow?: string[] | undefined;
5425
+ each_allow?: unknown[] | undefined;
5426
+ label?: string | undefined;
5427
+ value_set?: string | undefined;
5428
+ }, {
5429
+ normalize?: ("trim" | "email" | "phone" | "lower")[] | undefined;
5430
+ in?: string | undefined;
5431
+ required?: boolean | undefined;
5432
+ path?: string | undefined;
5433
+ expose_values?: boolean | undefined;
5434
+ allow?: unknown[] | undefined;
5435
+ equals?: unknown;
5436
+ glob_in?: string | undefined;
5437
+ each_in?: string | undefined;
5438
+ glob_allow?: string[] | undefined;
5439
+ each_allow?: unknown[] | undefined;
5440
+ label?: string | undefined;
5441
+ value_set?: string | undefined;
5442
+ }>, {
5443
+ normalize?: ("trim" | "email" | "phone" | "lower")[] | undefined;
5444
+ in?: string | undefined;
5445
+ required?: boolean | undefined;
5446
+ path?: string | undefined;
5447
+ expose_values?: boolean | undefined;
5448
+ allow?: unknown[] | undefined;
5449
+ equals?: unknown;
5450
+ glob_in?: string | undefined;
5451
+ each_in?: string | undefined;
5452
+ glob_allow?: string[] | undefined;
5453
+ each_allow?: unknown[] | undefined;
5454
+ label?: string | undefined;
5455
+ value_set?: string | undefined;
5456
+ }, {
5457
+ normalize?: ("trim" | "email" | "phone" | "lower")[] | undefined;
5458
+ in?: string | undefined;
5459
+ required?: boolean | undefined;
5460
+ path?: string | undefined;
5461
+ expose_values?: boolean | undefined;
5462
+ allow?: unknown[] | undefined;
5463
+ equals?: unknown;
5464
+ glob_in?: string | undefined;
5465
+ each_in?: string | undefined;
5466
+ glob_allow?: string[] | undefined;
5467
+ each_allow?: unknown[] | undefined;
5468
+ label?: string | undefined;
5469
+ value_set?: string | undefined;
5470
+ }>, z.ZodArray<z.ZodEffects<z.ZodObject<{
5471
+ allow: z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>;
5472
+ equals: z.ZodOptional<z.ZodUnknown>;
5473
+ in: z.ZodOptional<z.ZodString>;
5474
+ glob_in: z.ZodOptional<z.ZodString>;
5475
+ each_in: z.ZodOptional<z.ZodString>;
5476
+ glob_allow: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
5477
+ each_allow: z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>;
5478
+ normalize: z.ZodOptional<z.ZodArray<z.ZodEnum<["phone", "email", "lower", "trim"]>, "many">>;
5479
+ path: z.ZodOptional<z.ZodString>;
5480
+ required: z.ZodOptional<z.ZodBoolean>;
5481
+ label: z.ZodOptional<z.ZodString>;
5482
+ value_set: z.ZodOptional<z.ZodString>;
5483
+ expose_values: z.ZodOptional<z.ZodBoolean>;
5484
+ }, "strict", z.ZodTypeAny, {
5485
+ normalize?: ("trim" | "email" | "phone" | "lower")[] | undefined;
5486
+ in?: string | undefined;
5487
+ required?: boolean | undefined;
5488
+ path?: string | undefined;
5489
+ expose_values?: boolean | undefined;
5490
+ allow?: unknown[] | undefined;
5491
+ equals?: unknown;
5492
+ glob_in?: string | undefined;
5493
+ each_in?: string | undefined;
5494
+ glob_allow?: string[] | undefined;
5495
+ each_allow?: unknown[] | undefined;
5496
+ label?: string | undefined;
5497
+ value_set?: string | undefined;
5498
+ }, {
5499
+ normalize?: ("trim" | "email" | "phone" | "lower")[] | undefined;
5500
+ in?: string | undefined;
5501
+ required?: boolean | undefined;
5502
+ path?: string | undefined;
5503
+ expose_values?: boolean | undefined;
5504
+ allow?: unknown[] | undefined;
5505
+ equals?: unknown;
5506
+ glob_in?: string | undefined;
5507
+ each_in?: string | undefined;
5508
+ glob_allow?: string[] | undefined;
5509
+ each_allow?: unknown[] | undefined;
5510
+ label?: string | undefined;
5511
+ value_set?: string | undefined;
5512
+ }>, {
5513
+ normalize?: ("trim" | "email" | "phone" | "lower")[] | undefined;
5514
+ in?: string | undefined;
5515
+ required?: boolean | undefined;
5516
+ path?: string | undefined;
5517
+ expose_values?: boolean | undefined;
5518
+ allow?: unknown[] | undefined;
5519
+ equals?: unknown;
5520
+ glob_in?: string | undefined;
5521
+ each_in?: string | undefined;
5522
+ glob_allow?: string[] | undefined;
5523
+ each_allow?: unknown[] | undefined;
5524
+ label?: string | undefined;
5525
+ value_set?: string | undefined;
5526
+ }, {
5527
+ normalize?: ("trim" | "email" | "phone" | "lower")[] | undefined;
5528
+ in?: string | undefined;
5529
+ required?: boolean | undefined;
5530
+ path?: string | undefined;
5531
+ expose_values?: boolean | undefined;
5532
+ allow?: unknown[] | undefined;
5533
+ equals?: unknown;
5534
+ glob_in?: string | undefined;
5535
+ each_in?: string | undefined;
5536
+ glob_allow?: string[] | undefined;
5537
+ each_allow?: unknown[] | undefined;
5538
+ label?: string | undefined;
5539
+ value_set?: string | undefined;
5540
+ }>, "atleastone">]>, {
5541
+ normalize?: ("trim" | "email" | "phone" | "lower")[] | undefined;
5542
+ in?: string | undefined;
5543
+ required?: boolean | undefined;
5544
+ path?: string | undefined;
5545
+ expose_values?: boolean | undefined;
5546
+ allow?: unknown[] | undefined;
5547
+ equals?: unknown;
5548
+ glob_in?: string | undefined;
5549
+ each_in?: string | undefined;
5550
+ glob_allow?: string[] | undefined;
5551
+ each_allow?: unknown[] | undefined;
5552
+ label?: string | undefined;
5553
+ value_set?: string | undefined;
5554
+ }[], {
5555
+ normalize?: ("trim" | "email" | "phone" | "lower")[] | undefined;
5556
+ in?: string | undefined;
5557
+ required?: boolean | undefined;
5558
+ path?: string | undefined;
5559
+ expose_values?: boolean | undefined;
5560
+ allow?: unknown[] | undefined;
5561
+ equals?: unknown;
5562
+ glob_in?: string | undefined;
5563
+ each_in?: string | undefined;
5564
+ glob_allow?: string[] | undefined;
5565
+ each_allow?: unknown[] | undefined;
5566
+ label?: string | undefined;
5567
+ value_set?: string | undefined;
5568
+ } | [{
5569
+ normalize?: ("trim" | "email" | "phone" | "lower")[] | undefined;
5570
+ in?: string | undefined;
5571
+ required?: boolean | undefined;
5572
+ path?: string | undefined;
5573
+ expose_values?: boolean | undefined;
5574
+ allow?: unknown[] | undefined;
5575
+ equals?: unknown;
5576
+ glob_in?: string | undefined;
5577
+ each_in?: string | undefined;
5578
+ glob_allow?: string[] | undefined;
5579
+ each_allow?: unknown[] | undefined;
5580
+ label?: string | undefined;
5581
+ value_set?: string | undefined;
5582
+ }, ...{
5583
+ normalize?: ("trim" | "email" | "phone" | "lower")[] | undefined;
5584
+ in?: string | undefined;
5585
+ required?: boolean | undefined;
5586
+ path?: string | undefined;
5587
+ expose_values?: boolean | undefined;
5588
+ allow?: unknown[] | undefined;
5589
+ equals?: unknown;
5590
+ glob_in?: string | undefined;
5591
+ each_in?: string | undefined;
5592
+ glob_allow?: string[] | undefined;
5593
+ each_allow?: unknown[] | undefined;
5594
+ label?: string | undefined;
5595
+ value_set?: string | undefined;
5596
+ }[]]>>>;
5597
+ }, "strict", z.ZodTypeAny, {
5598
+ sandbox_presets: string[];
5599
+ description?: string | undefined;
5600
+ args?: Record<string, {
5601
+ normalize?: ("trim" | "email" | "phone" | "lower")[] | undefined;
5602
+ in?: string | undefined;
5603
+ required?: boolean | undefined;
5604
+ path?: string | undefined;
5605
+ expose_values?: boolean | undefined;
5606
+ allow?: unknown[] | undefined;
5607
+ equals?: unknown;
5608
+ glob_in?: string | undefined;
5609
+ each_in?: string | undefined;
5610
+ glob_allow?: string[] | undefined;
5611
+ each_allow?: unknown[] | undefined;
5612
+ label?: string | undefined;
5613
+ value_set?: string | undefined;
5614
+ }[]> | undefined;
5615
+ description_append?: string | undefined;
5616
+ alias_of?: string | undefined;
5617
+ sandbox?: {
5618
+ filesystem?: {
5619
+ allow_write: string[];
5620
+ deny_read: string[];
5621
+ deny_write: string[];
5622
+ allow_read?: string[] | undefined;
5623
+ } | undefined;
5624
+ network?: {
5625
+ allowed_domains: string[];
5626
+ denied_domains: string[];
5627
+ } | undefined;
5628
+ } | undefined;
5629
+ }, {
5630
+ description?: string | undefined;
5631
+ args?: Record<string, {
5632
+ normalize?: ("trim" | "email" | "phone" | "lower")[] | undefined;
5633
+ in?: string | undefined;
5634
+ required?: boolean | undefined;
5635
+ path?: string | undefined;
5636
+ expose_values?: boolean | undefined;
5637
+ allow?: unknown[] | undefined;
5638
+ equals?: unknown;
5639
+ glob_in?: string | undefined;
5640
+ each_in?: string | undefined;
5641
+ glob_allow?: string[] | undefined;
5642
+ each_allow?: unknown[] | undefined;
5643
+ label?: string | undefined;
5644
+ value_set?: string | undefined;
5645
+ } | [{
5646
+ normalize?: ("trim" | "email" | "phone" | "lower")[] | undefined;
5647
+ in?: string | undefined;
5648
+ required?: boolean | undefined;
5649
+ path?: string | undefined;
5650
+ expose_values?: boolean | undefined;
5651
+ allow?: unknown[] | undefined;
5652
+ equals?: unknown;
5653
+ glob_in?: string | undefined;
5654
+ each_in?: string | undefined;
5655
+ glob_allow?: string[] | undefined;
5656
+ each_allow?: unknown[] | undefined;
5657
+ label?: string | undefined;
5658
+ value_set?: string | undefined;
5659
+ }, ...{
5660
+ normalize?: ("trim" | "email" | "phone" | "lower")[] | undefined;
5661
+ in?: string | undefined;
5662
+ required?: boolean | undefined;
5663
+ path?: string | undefined;
5664
+ expose_values?: boolean | undefined;
5665
+ allow?: unknown[] | undefined;
5666
+ equals?: unknown;
5667
+ glob_in?: string | undefined;
5668
+ each_in?: string | undefined;
5669
+ glob_allow?: string[] | undefined;
5670
+ each_allow?: unknown[] | undefined;
5671
+ label?: string | undefined;
5672
+ value_set?: string | undefined;
5673
+ }[]]> | undefined;
5674
+ description_append?: string | undefined;
5675
+ alias_of?: string | undefined;
5676
+ sandbox_presets?: string | string[] | undefined;
5677
+ sandbox?: {
5678
+ filesystem?: {
5679
+ allow_write?: string[] | undefined;
5680
+ deny_read?: string[] | undefined;
5681
+ deny_write?: string[] | undefined;
5682
+ allow_read?: string[] | undefined;
5683
+ } | undefined;
5684
+ network?: {
5685
+ allowed_domains?: string[] | undefined;
5686
+ denied_domains?: string[] | undefined;
5687
+ } | undefined;
5688
+ } | undefined;
5689
+ }>>>;
3708
5690
  arg_policy: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodUnion<[z.ZodEffects<z.ZodObject<{
3709
5691
  allow: z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>;
3710
5692
  equals: z.ZodOptional<z.ZodUnknown>;
@@ -3905,11 +5887,70 @@ export declare const GatewayConfig: z.ZodEffects<z.ZodObject<{
3905
5887
  arg_scope: z.ZodOptional<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "atleastone">]>>, {
3906
5888
  [k: string]: string[];
3907
5889
  }, Record<string, string | [string, ...string[]]>>>;
5890
+ command_policy: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodObject<{
5891
+ allow: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
5892
+ ask: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
5893
+ deny: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
5894
+ default: z.ZodOptional<z.ZodEnum<["allow", "ask", "deny"]>>;
5895
+ }, "strict", z.ZodTypeAny, {
5896
+ allow: string[];
5897
+ ask: string[];
5898
+ deny: string[];
5899
+ default?: "allow" | "ask" | "deny" | undefined;
5900
+ }, {
5901
+ default?: "allow" | "ask" | "deny" | undefined;
5902
+ allow?: string[] | undefined;
5903
+ ask?: string[] | undefined;
5904
+ deny?: string[] | undefined;
5905
+ }>, {
5906
+ allow: string[];
5907
+ ask: string[];
5908
+ deny: string[];
5909
+ default?: "allow" | "ask" | "deny" | undefined;
5910
+ }, {
5911
+ default?: "allow" | "ask" | "deny" | undefined;
5912
+ allow?: string[] | undefined;
5913
+ ask?: string[] | undefined;
5914
+ deny?: string[] | undefined;
5915
+ }>>>>;
3908
5916
  }, "strict", z.ZodTypeAny, {
3909
5917
  allow: string[];
3910
5918
  ask: string[];
3911
5919
  deny: string[];
3912
5920
  extends: string[];
5921
+ tool_overrides: Record<string, {
5922
+ sandbox_presets: string[];
5923
+ description?: string | undefined;
5924
+ args?: Record<string, {
5925
+ normalize?: ("trim" | "email" | "phone" | "lower")[] | undefined;
5926
+ in?: string | undefined;
5927
+ required?: boolean | undefined;
5928
+ path?: string | undefined;
5929
+ expose_values?: boolean | undefined;
5930
+ allow?: unknown[] | undefined;
5931
+ equals?: unknown;
5932
+ glob_in?: string | undefined;
5933
+ each_in?: string | undefined;
5934
+ glob_allow?: string[] | undefined;
5935
+ each_allow?: unknown[] | undefined;
5936
+ label?: string | undefined;
5937
+ value_set?: string | undefined;
5938
+ }[]> | undefined;
5939
+ description_append?: string | undefined;
5940
+ alias_of?: string | undefined;
5941
+ sandbox?: {
5942
+ filesystem?: {
5943
+ allow_write: string[];
5944
+ deny_read: string[];
5945
+ deny_write: string[];
5946
+ allow_read?: string[] | undefined;
5947
+ } | undefined;
5948
+ network?: {
5949
+ allowed_domains: string[];
5950
+ denied_domains: string[];
5951
+ } | undefined;
5952
+ } | undefined;
5953
+ }>;
3913
5954
  arg_policy?: Record<string, Record<string, {
3914
5955
  normalize?: ("trim" | "email" | "phone" | "lower")[] | undefined;
3915
5956
  in?: string | undefined;
@@ -3928,11 +5969,78 @@ export declare const GatewayConfig: z.ZodEffects<z.ZodObject<{
3928
5969
  arg_scope?: {
3929
5970
  [k: string]: string[];
3930
5971
  } | undefined;
5972
+ command_policy?: Record<string, Record<string, {
5973
+ allow: string[];
5974
+ ask: string[];
5975
+ deny: string[];
5976
+ default?: "allow" | "ask" | "deny" | undefined;
5977
+ }>> | undefined;
3931
5978
  }, {
3932
5979
  allow?: string[] | undefined;
3933
5980
  ask?: string[] | undefined;
3934
5981
  deny?: string[] | undefined;
3935
5982
  extends?: string[] | undefined;
5983
+ tool_overrides?: Record<string, {
5984
+ description?: string | undefined;
5985
+ args?: Record<string, {
5986
+ normalize?: ("trim" | "email" | "phone" | "lower")[] | undefined;
5987
+ in?: string | undefined;
5988
+ required?: boolean | undefined;
5989
+ path?: string | undefined;
5990
+ expose_values?: boolean | undefined;
5991
+ allow?: unknown[] | undefined;
5992
+ equals?: unknown;
5993
+ glob_in?: string | undefined;
5994
+ each_in?: string | undefined;
5995
+ glob_allow?: string[] | undefined;
5996
+ each_allow?: unknown[] | undefined;
5997
+ label?: string | undefined;
5998
+ value_set?: string | undefined;
5999
+ } | [{
6000
+ normalize?: ("trim" | "email" | "phone" | "lower")[] | undefined;
6001
+ in?: string | undefined;
6002
+ required?: boolean | undefined;
6003
+ path?: string | undefined;
6004
+ expose_values?: boolean | undefined;
6005
+ allow?: unknown[] | undefined;
6006
+ equals?: unknown;
6007
+ glob_in?: string | undefined;
6008
+ each_in?: string | undefined;
6009
+ glob_allow?: string[] | undefined;
6010
+ each_allow?: unknown[] | undefined;
6011
+ label?: string | undefined;
6012
+ value_set?: string | undefined;
6013
+ }, ...{
6014
+ normalize?: ("trim" | "email" | "phone" | "lower")[] | undefined;
6015
+ in?: string | undefined;
6016
+ required?: boolean | undefined;
6017
+ path?: string | undefined;
6018
+ expose_values?: boolean | undefined;
6019
+ allow?: unknown[] | undefined;
6020
+ equals?: unknown;
6021
+ glob_in?: string | undefined;
6022
+ each_in?: string | undefined;
6023
+ glob_allow?: string[] | undefined;
6024
+ each_allow?: unknown[] | undefined;
6025
+ label?: string | undefined;
6026
+ value_set?: string | undefined;
6027
+ }[]]> | undefined;
6028
+ description_append?: string | undefined;
6029
+ alias_of?: string | undefined;
6030
+ sandbox_presets?: string | string[] | undefined;
6031
+ sandbox?: {
6032
+ filesystem?: {
6033
+ allow_write?: string[] | undefined;
6034
+ deny_read?: string[] | undefined;
6035
+ deny_write?: string[] | undefined;
6036
+ allow_read?: string[] | undefined;
6037
+ } | undefined;
6038
+ network?: {
6039
+ allowed_domains?: string[] | undefined;
6040
+ denied_domains?: string[] | undefined;
6041
+ } | undefined;
6042
+ } | undefined;
6043
+ }> | undefined;
3936
6044
  arg_policy?: Record<string, Record<string, {
3937
6045
  normalize?: ("trim" | "email" | "phone" | "lower")[] | undefined;
3938
6046
  in?: string | undefined;
@@ -3977,7 +6085,14 @@ export declare const GatewayConfig: z.ZodEffects<z.ZodObject<{
3977
6085
  value_set?: string | undefined;
3978
6086
  }[]]>> | undefined;
3979
6087
  arg_scope?: Record<string, string | [string, ...string[]]> | undefined;
6088
+ command_policy?: Record<string, Record<string, {
6089
+ default?: "allow" | "ask" | "deny" | undefined;
6090
+ allow?: string[] | undefined;
6091
+ ask?: string[] | undefined;
6092
+ deny?: string[] | undefined;
6093
+ }>> | undefined;
3980
6094
  }>>>;
6095
+ default_profile: z.ZodOptional<z.ZodString>;
3981
6096
  sandbox_presets: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
3982
6097
  filesystem: z.ZodOptional<z.ZodObject<{
3983
6098
  allow_write: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
@@ -4156,9 +6271,10 @@ export declare const GatewayConfig: z.ZodEffects<z.ZodObject<{
4156
6271
  timeout_ms: z.ZodDefault<z.ZodNumber>;
4157
6272
  max_response_bytes: z.ZodDefault<z.ZodNumber>;
4158
6273
  }, "strict", z.ZodTypeAny, {
4159
- max_response_bytes: number;
4160
6274
  timeout_ms: number;
6275
+ max_response_bytes: number;
4161
6276
  spec: string;
6277
+ include?: string[] | undefined;
4162
6278
  exclude?: string[] | undefined;
4163
6279
  base_url?: string | undefined;
4164
6280
  auth?: {
@@ -4169,11 +6285,11 @@ export declare const GatewayConfig: z.ZodEffects<z.ZodObject<{
4169
6285
  type: "header";
4170
6286
  value: string;
4171
6287
  } | undefined;
4172
- include?: string[] | undefined;
4173
6288
  }, {
4174
6289
  spec: string;
4175
- max_response_bytes?: number | undefined;
6290
+ include?: string[] | undefined;
4176
6291
  timeout_ms?: number | undefined;
6292
+ max_response_bytes?: number | undefined;
4177
6293
  exclude?: string[] | undefined;
4178
6294
  base_url?: string | undefined;
4179
6295
  auth?: {
@@ -4184,11 +6300,11 @@ export declare const GatewayConfig: z.ZodEffects<z.ZodObject<{
4184
6300
  type: "header";
4185
6301
  value: string;
4186
6302
  } | undefined;
4187
- include?: string[] | undefined;
4188
6303
  }>>>;
4189
6304
  agents: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
4190
6305
  token: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
4191
6306
  extends: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
6307
+ inherit_default: z.ZodDefault<z.ZodBoolean>;
4192
6308
  allow: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
4193
6309
  remember_allow: z.ZodDefault<z.ZodArray<z.ZodObject<{
4194
6310
  tool: z.ZodString;
@@ -4203,7 +6319,13 @@ export declare const GatewayConfig: z.ZodEffects<z.ZodObject<{
4203
6319
  ask: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
4204
6320
  deny: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
4205
6321
  tool_overrides: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
6322
+ /** Replaces the upstream description entirely. */
4206
6323
  description: z.ZodOptional<z.ZodString>;
6324
+ /**
6325
+ * Appended after whatever description survives (upstream, or `description` when set). Use this
6326
+ * for house rules you want on top of the vendor's docs without restating them by hand.
6327
+ */
6328
+ description_append: z.ZodOptional<z.ZodString>;
4207
6329
  alias_of: z.ZodOptional<z.ZodString>;
4208
6330
  sandbox_presets: z.ZodDefault<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, string[], string | string[]>>;
4209
6331
  sandbox: z.ZodOptional<z.ZodObject<{
@@ -4471,6 +6593,7 @@ export declare const GatewayConfig: z.ZodEffects<z.ZodObject<{
4471
6593
  label?: string | undefined;
4472
6594
  value_set?: string | undefined;
4473
6595
  }[]> | undefined;
6596
+ description_append?: string | undefined;
4474
6597
  alias_of?: string | undefined;
4475
6598
  sandbox?: {
4476
6599
  filesystem?: {
@@ -4529,6 +6652,7 @@ export declare const GatewayConfig: z.ZodEffects<z.ZodObject<{
4529
6652
  label?: string | undefined;
4530
6653
  value_set?: string | undefined;
4531
6654
  }[]]> | undefined;
6655
+ description_append?: string | undefined;
4532
6656
  alias_of?: string | undefined;
4533
6657
  sandbox_presets?: string | string[] | undefined;
4534
6658
  sandbox?: {
@@ -4744,6 +6868,32 @@ export declare const GatewayConfig: z.ZodEffects<z.ZodObject<{
4744
6868
  arg_scope: z.ZodOptional<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "atleastone">]>>, {
4745
6869
  [k: string]: string[];
4746
6870
  }, Record<string, string | [string, ...string[]]>>>;
6871
+ command_policy: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodObject<{
6872
+ allow: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
6873
+ ask: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
6874
+ deny: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
6875
+ default: z.ZodOptional<z.ZodEnum<["allow", "ask", "deny"]>>;
6876
+ }, "strict", z.ZodTypeAny, {
6877
+ allow: string[];
6878
+ ask: string[];
6879
+ deny: string[];
6880
+ default?: "allow" | "ask" | "deny" | undefined;
6881
+ }, {
6882
+ default?: "allow" | "ask" | "deny" | undefined;
6883
+ allow?: string[] | undefined;
6884
+ ask?: string[] | undefined;
6885
+ deny?: string[] | undefined;
6886
+ }>, {
6887
+ allow: string[];
6888
+ ask: string[];
6889
+ deny: string[];
6890
+ default?: "allow" | "ask" | "deny" | undefined;
6891
+ }, {
6892
+ default?: "allow" | "ask" | "deny" | undefined;
6893
+ allow?: string[] | undefined;
6894
+ ask?: string[] | undefined;
6895
+ deny?: string[] | undefined;
6896
+ }>>>>;
4747
6897
  exec: z.ZodDefault<z.ZodObject<{
4748
6898
  allow: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
4749
6899
  ask: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
@@ -4768,13 +6918,13 @@ export declare const GatewayConfig: z.ZodEffects<z.ZodObject<{
4768
6918
  max_response_bytes: z.ZodDefault<z.ZodNumber>;
4769
6919
  timeout_ms: z.ZodDefault<z.ZodNumber>;
4770
6920
  }, "strict", z.ZodTypeAny, {
6921
+ timeout_ms: number;
4771
6922
  domain_allowlist: string[];
4772
6923
  max_response_bytes: number;
4773
- timeout_ms: number;
4774
6924
  }, {
6925
+ timeout_ms?: number | undefined;
4775
6926
  domain_allowlist?: string[] | undefined;
4776
6927
  max_response_bytes?: number | undefined;
4777
- timeout_ms?: number | undefined;
4778
6928
  }>>;
4779
6929
  sandbox: z.ZodDefault<z.ZodObject<{
4780
6930
  enabled: z.ZodDefault<z.ZodBoolean>;
@@ -4927,11 +7077,11 @@ export declare const GatewayConfig: z.ZodEffects<z.ZodObject<{
4927
7077
  enabled: boolean;
4928
7078
  model?: string | undefined;
4929
7079
  tools?: string[] | undefined;
4930
- mode?: "detect" | "mangle" | "escalate" | undefined;
4931
7080
  exclude?: string[] | undefined;
4932
7081
  max_requests?: number | undefined;
4933
7082
  window_ms?: number | undefined;
4934
7083
  per?: "tool" | "agent" | undefined;
7084
+ mode?: "detect" | "mangle" | "escalate" | undefined;
4935
7085
  backend?: "regex" | "deberta" | "heuristic" | "llm" | undefined;
4936
7086
  inference_url?: string | undefined;
4937
7087
  threshold?: number | undefined;
@@ -4942,12 +7092,12 @@ export declare const GatewayConfig: z.ZodEffects<z.ZodObject<{
4942
7092
  name: "schema-validator" | "rate-limiter" | "untrusted-envelope" | "strip-query-params" | "output-injection-detector" | "canary-token-injector" | "output-size-limiter" | "output-summarizer" | "injection-detector" | "sensitivity-classifier";
4943
7093
  model?: string | undefined;
4944
7094
  tools?: string[] | undefined;
4945
- mode?: "detect" | "mangle" | "escalate" | undefined;
4946
7095
  enabled?: boolean | undefined;
4947
7096
  exclude?: string[] | undefined;
4948
7097
  max_requests?: number | undefined;
4949
7098
  window_ms?: number | undefined;
4950
7099
  per?: "tool" | "agent" | undefined;
7100
+ mode?: "detect" | "mangle" | "escalate" | undefined;
4951
7101
  backend?: "regex" | "deberta" | "heuristic" | "llm" | undefined;
4952
7102
  inference_url?: string | undefined;
4953
7103
  threshold?: number | undefined;
@@ -4955,13 +7105,44 @@ export declare const GatewayConfig: z.ZodEffects<z.ZodObject<{
4955
7105
  max_chars?: number | undefined;
4956
7106
  threshold_chars?: number | undefined;
4957
7107
  }>, "many">>;
7108
+ expose_tools_api: z.ZodDefault<z.ZodBoolean>;
7109
+ limits: z.ZodOptional<z.ZodObject<{
7110
+ max_sessions_per_agent: z.ZodOptional<z.ZodNumber>;
7111
+ max_sessions_global: z.ZodOptional<z.ZodNumber>;
7112
+ session_idle_ms: z.ZodOptional<z.ZodNumber>;
7113
+ session_max_lifetime_ms: z.ZodOptional<z.ZodNumber>;
7114
+ new_session_max: z.ZodOptional<z.ZodNumber>;
7115
+ new_session_window_ms: z.ZodOptional<z.ZodNumber>;
7116
+ max_concurrent_calls_per_agent: z.ZodOptional<z.ZodNumber>;
7117
+ call_execution_timeout_ms: z.ZodOptional<z.ZodNumber>;
7118
+ }, "strict", z.ZodTypeAny, {
7119
+ max_sessions_per_agent?: number | undefined;
7120
+ max_sessions_global?: number | undefined;
7121
+ session_idle_ms?: number | undefined;
7122
+ session_max_lifetime_ms?: number | undefined;
7123
+ new_session_max?: number | undefined;
7124
+ new_session_window_ms?: number | undefined;
7125
+ max_concurrent_calls_per_agent?: number | undefined;
7126
+ call_execution_timeout_ms?: number | undefined;
7127
+ }, {
7128
+ max_sessions_per_agent?: number | undefined;
7129
+ max_sessions_global?: number | undefined;
7130
+ session_idle_ms?: number | undefined;
7131
+ session_max_lifetime_ms?: number | undefined;
7132
+ new_session_max?: number | undefined;
7133
+ new_session_window_ms?: number | undefined;
7134
+ max_concurrent_calls_per_agent?: number | undefined;
7135
+ call_execution_timeout_ms?: number | undefined;
7136
+ }>>;
4958
7137
  }, "strict", z.ZodTypeAny, {
4959
7138
  http: {
7139
+ timeout_ms: number;
4960
7140
  domain_allowlist: string[];
4961
7141
  max_response_bytes: number;
4962
- timeout_ms: number;
4963
7142
  };
4964
7143
  allow: string[];
7144
+ ask: string[];
7145
+ deny: string[];
4965
7146
  sandbox: {
4966
7147
  enabled: boolean;
4967
7148
  filesystem: {
@@ -4988,9 +7169,8 @@ export declare const GatewayConfig: z.ZodEffects<z.ZodObject<{
4988
7169
  } | undefined;
4989
7170
  }>;
4990
7171
  };
4991
- ask: string[];
4992
- deny: string[];
4993
7172
  extends: string[];
7173
+ inherit_default: boolean;
4994
7174
  remember_allow: {
4995
7175
  tool: string;
4996
7176
  expires_at?: string | undefined;
@@ -5013,6 +7193,7 @@ export declare const GatewayConfig: z.ZodEffects<z.ZodObject<{
5013
7193
  label?: string | undefined;
5014
7194
  value_set?: string | undefined;
5015
7195
  }[]> | undefined;
7196
+ description_append?: string | undefined;
5016
7197
  alias_of?: string | undefined;
5017
7198
  sandbox?: {
5018
7199
  filesystem?: {
@@ -5034,6 +7215,7 @@ export declare const GatewayConfig: z.ZodEffects<z.ZodObject<{
5034
7215
  deny: string[];
5035
7216
  default_timeout_ms: number;
5036
7217
  };
7218
+ expose_tools_api: boolean;
5037
7219
  token?: string | undefined;
5038
7220
  arg_policy?: Record<string, Record<string, {
5039
7221
  normalize?: ("trim" | "email" | "phone" | "lower")[] | undefined;
@@ -5053,16 +7235,22 @@ export declare const GatewayConfig: z.ZodEffects<z.ZodObject<{
5053
7235
  arg_scope?: {
5054
7236
  [k: string]: string[];
5055
7237
  } | undefined;
7238
+ command_policy?: Record<string, Record<string, {
7239
+ allow: string[];
7240
+ ask: string[];
7241
+ deny: string[];
7242
+ default?: "allow" | "ask" | "deny" | undefined;
7243
+ }>> | undefined;
5056
7244
  middleware?: {
5057
7245
  name: "schema-validator" | "rate-limiter" | "untrusted-envelope" | "strip-query-params" | "output-injection-detector" | "canary-token-injector" | "output-size-limiter" | "output-summarizer" | "injection-detector" | "sensitivity-classifier";
5058
7246
  enabled: boolean;
5059
7247
  model?: string | undefined;
5060
7248
  tools?: string[] | undefined;
5061
- mode?: "detect" | "mangle" | "escalate" | undefined;
5062
7249
  exclude?: string[] | undefined;
5063
7250
  max_requests?: number | undefined;
5064
7251
  window_ms?: number | undefined;
5065
7252
  per?: "tool" | "agent" | undefined;
7253
+ mode?: "detect" | "mangle" | "escalate" | undefined;
5066
7254
  backend?: "regex" | "deberta" | "heuristic" | "llm" | undefined;
5067
7255
  inference_url?: string | undefined;
5068
7256
  threshold?: number | undefined;
@@ -5070,13 +7258,25 @@ export declare const GatewayConfig: z.ZodEffects<z.ZodObject<{
5070
7258
  max_chars?: number | undefined;
5071
7259
  threshold_chars?: number | undefined;
5072
7260
  }[] | undefined;
7261
+ limits?: {
7262
+ max_sessions_per_agent?: number | undefined;
7263
+ max_sessions_global?: number | undefined;
7264
+ session_idle_ms?: number | undefined;
7265
+ session_max_lifetime_ms?: number | undefined;
7266
+ new_session_max?: number | undefined;
7267
+ new_session_window_ms?: number | undefined;
7268
+ max_concurrent_calls_per_agent?: number | undefined;
7269
+ call_execution_timeout_ms?: number | undefined;
7270
+ } | undefined;
5073
7271
  }, {
5074
7272
  http?: {
7273
+ timeout_ms?: number | undefined;
5075
7274
  domain_allowlist?: string[] | undefined;
5076
7275
  max_response_bytes?: number | undefined;
5077
- timeout_ms?: number | undefined;
5078
7276
  } | undefined;
5079
7277
  allow?: string[] | undefined;
7278
+ ask?: string[] | undefined;
7279
+ deny?: string[] | undefined;
5080
7280
  sandbox?: {
5081
7281
  enabled?: boolean | undefined;
5082
7282
  filesystem?: {
@@ -5103,10 +7303,9 @@ export declare const GatewayConfig: z.ZodEffects<z.ZodObject<{
5103
7303
  } | undefined;
5104
7304
  }> | undefined;
5105
7305
  } | undefined;
5106
- ask?: string[] | undefined;
5107
- deny?: string[] | undefined;
5108
7306
  token?: string | undefined;
5109
7307
  extends?: string[] | undefined;
7308
+ inherit_default?: boolean | undefined;
5110
7309
  remember_allow?: {
5111
7310
  tool: string;
5112
7311
  expires_at?: string | undefined;
@@ -5156,6 +7355,7 @@ export declare const GatewayConfig: z.ZodEffects<z.ZodObject<{
5156
7355
  label?: string | undefined;
5157
7356
  value_set?: string | undefined;
5158
7357
  }[]]> | undefined;
7358
+ description_append?: string | undefined;
5159
7359
  alias_of?: string | undefined;
5160
7360
  sandbox_presets?: string | string[] | undefined;
5161
7361
  sandbox?: {
@@ -5215,6 +7415,12 @@ export declare const GatewayConfig: z.ZodEffects<z.ZodObject<{
5215
7415
  value_set?: string | undefined;
5216
7416
  }[]]>> | undefined;
5217
7417
  arg_scope?: Record<string, string | [string, ...string[]]> | undefined;
7418
+ command_policy?: Record<string, Record<string, {
7419
+ default?: "allow" | "ask" | "deny" | undefined;
7420
+ allow?: string[] | undefined;
7421
+ ask?: string[] | undefined;
7422
+ deny?: string[] | undefined;
7423
+ }>> | undefined;
5218
7424
  exec?: {
5219
7425
  env?: Record<string, string> | undefined;
5220
7426
  allow?: string[] | undefined;
@@ -5226,12 +7432,12 @@ export declare const GatewayConfig: z.ZodEffects<z.ZodObject<{
5226
7432
  name: "schema-validator" | "rate-limiter" | "untrusted-envelope" | "strip-query-params" | "output-injection-detector" | "canary-token-injector" | "output-size-limiter" | "output-summarizer" | "injection-detector" | "sensitivity-classifier";
5227
7433
  model?: string | undefined;
5228
7434
  tools?: string[] | undefined;
5229
- mode?: "detect" | "mangle" | "escalate" | undefined;
5230
7435
  enabled?: boolean | undefined;
5231
7436
  exclude?: string[] | undefined;
5232
7437
  max_requests?: number | undefined;
5233
7438
  window_ms?: number | undefined;
5234
7439
  per?: "tool" | "agent" | undefined;
7440
+ mode?: "detect" | "mangle" | "escalate" | undefined;
5235
7441
  backend?: "regex" | "deberta" | "heuristic" | "llm" | undefined;
5236
7442
  inference_url?: string | undefined;
5237
7443
  threshold?: number | undefined;
@@ -5239,6 +7445,17 @@ export declare const GatewayConfig: z.ZodEffects<z.ZodObject<{
5239
7445
  max_chars?: number | undefined;
5240
7446
  threshold_chars?: number | undefined;
5241
7447
  }[] | undefined;
7448
+ expose_tools_api?: boolean | undefined;
7449
+ limits?: {
7450
+ max_sessions_per_agent?: number | undefined;
7451
+ max_sessions_global?: number | undefined;
7452
+ session_idle_ms?: number | undefined;
7453
+ session_max_lifetime_ms?: number | undefined;
7454
+ new_session_max?: number | undefined;
7455
+ new_session_window_ms?: number | undefined;
7456
+ max_concurrent_calls_per_agent?: number | undefined;
7457
+ call_execution_timeout_ms?: number | undefined;
7458
+ } | undefined;
5242
7459
  }>>>;
5243
7460
  approvals: z.ZodDefault<z.ZodObject<{
5244
7461
  provider: z.ZodDefault<z.ZodUnion<[z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
@@ -5454,6 +7671,101 @@ export declare const GatewayConfig: z.ZodEffects<z.ZodObject<{
5454
7671
  }>]>, "many">]>>;
5455
7672
  timeout_ms: z.ZodDefault<z.ZodNumber>;
5456
7673
  batch_window_ms: z.ZodDefault<z.ZodNumber>;
7674
+ previews: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
7675
+ tool: z.ZodString;
7676
+ args: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
7677
+ args_from: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
7678
+ fields: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodObject<{
7679
+ label: z.ZodString;
7680
+ path: z.ZodOptional<z.ZodString>;
7681
+ text_prefix: z.ZodOptional<z.ZodString>;
7682
+ primary: z.ZodDefault<z.ZodBoolean>;
7683
+ }, "strict", z.ZodTypeAny, {
7684
+ label: string;
7685
+ primary: boolean;
7686
+ path?: string | undefined;
7687
+ text_prefix?: string | undefined;
7688
+ }, {
7689
+ label: string;
7690
+ path?: string | undefined;
7691
+ text_prefix?: string | undefined;
7692
+ primary?: boolean | undefined;
7693
+ }>, {
7694
+ label: string;
7695
+ primary: boolean;
7696
+ path?: string | undefined;
7697
+ text_prefix?: string | undefined;
7698
+ }, {
7699
+ label: string;
7700
+ path?: string | undefined;
7701
+ text_prefix?: string | undefined;
7702
+ primary?: boolean | undefined;
7703
+ }>, "many">>;
7704
+ request_fields: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodObject<{
7705
+ label: z.ZodString;
7706
+ path: z.ZodOptional<z.ZodString>;
7707
+ text_prefix: z.ZodOptional<z.ZodString>;
7708
+ primary: z.ZodDefault<z.ZodBoolean>;
7709
+ }, "strict", z.ZodTypeAny, {
7710
+ label: string;
7711
+ primary: boolean;
7712
+ path?: string | undefined;
7713
+ text_prefix?: string | undefined;
7714
+ }, {
7715
+ label: string;
7716
+ path?: string | undefined;
7717
+ text_prefix?: string | undefined;
7718
+ primary?: boolean | undefined;
7719
+ }>, {
7720
+ label: string;
7721
+ primary: boolean;
7722
+ path?: string | undefined;
7723
+ text_prefix?: string | undefined;
7724
+ }, {
7725
+ label: string;
7726
+ path?: string | undefined;
7727
+ text_prefix?: string | undefined;
7728
+ primary?: boolean | undefined;
7729
+ }>, "many">>;
7730
+ timeout_ms: z.ZodDefault<z.ZodNumber>;
7731
+ max_chars: z.ZodDefault<z.ZodNumber>;
7732
+ }, "strict", z.ZodTypeAny, {
7733
+ tool: string;
7734
+ args: Record<string, unknown>;
7735
+ timeout_ms: number;
7736
+ max_chars: number;
7737
+ args_from: Record<string, string>;
7738
+ fields?: {
7739
+ label: string;
7740
+ primary: boolean;
7741
+ path?: string | undefined;
7742
+ text_prefix?: string | undefined;
7743
+ }[] | undefined;
7744
+ request_fields?: {
7745
+ label: string;
7746
+ primary: boolean;
7747
+ path?: string | undefined;
7748
+ text_prefix?: string | undefined;
7749
+ }[] | undefined;
7750
+ }, {
7751
+ tool: string;
7752
+ args?: Record<string, unknown> | undefined;
7753
+ timeout_ms?: number | undefined;
7754
+ max_chars?: number | undefined;
7755
+ args_from?: Record<string, string> | undefined;
7756
+ fields?: {
7757
+ label: string;
7758
+ path?: string | undefined;
7759
+ text_prefix?: string | undefined;
7760
+ primary?: boolean | undefined;
7761
+ }[] | undefined;
7762
+ request_fields?: {
7763
+ label: string;
7764
+ path?: string | undefined;
7765
+ text_prefix?: string | undefined;
7766
+ primary?: boolean | undefined;
7767
+ }[] | undefined;
7768
+ }>>>;
5457
7769
  }, "strict", z.ZodTypeAny, {
5458
7770
  timeout_ms: number;
5459
7771
  provider: {
@@ -5528,6 +7840,25 @@ export declare const GatewayConfig: z.ZodEffects<z.ZodObject<{
5528
7840
  type: "stdio";
5529
7841
  })[];
5530
7842
  batch_window_ms: number;
7843
+ previews: Record<string, {
7844
+ tool: string;
7845
+ args: Record<string, unknown>;
7846
+ timeout_ms: number;
7847
+ max_chars: number;
7848
+ args_from: Record<string, string>;
7849
+ fields?: {
7850
+ label: string;
7851
+ primary: boolean;
7852
+ path?: string | undefined;
7853
+ text_prefix?: string | undefined;
7854
+ }[] | undefined;
7855
+ request_fields?: {
7856
+ label: string;
7857
+ primary: boolean;
7858
+ path?: string | undefined;
7859
+ text_prefix?: string | undefined;
7860
+ }[] | undefined;
7861
+ }>;
5531
7862
  }, {
5532
7863
  timeout_ms?: number | undefined;
5533
7864
  provider?: {
@@ -5602,14 +7933,81 @@ export declare const GatewayConfig: z.ZodEffects<z.ZodObject<{
5602
7933
  type: "stdio";
5603
7934
  })[] | undefined;
5604
7935
  batch_window_ms?: number | undefined;
7936
+ previews?: Record<string, {
7937
+ tool: string;
7938
+ args?: Record<string, unknown> | undefined;
7939
+ timeout_ms?: number | undefined;
7940
+ max_chars?: number | undefined;
7941
+ args_from?: Record<string, string> | undefined;
7942
+ fields?: {
7943
+ label: string;
7944
+ path?: string | undefined;
7945
+ text_prefix?: string | undefined;
7946
+ primary?: boolean | undefined;
7947
+ }[] | undefined;
7948
+ request_fields?: {
7949
+ label: string;
7950
+ path?: string | undefined;
7951
+ text_prefix?: string | undefined;
7952
+ primary?: boolean | undefined;
7953
+ }[] | undefined;
7954
+ }> | undefined;
5605
7955
  }>>;
5606
7956
  security: z.ZodDefault<z.ZodObject<{
5607
7957
  blocked_hosts: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
5608
7958
  allowed_local: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
7959
+ limits: z.ZodOptional<z.ZodObject<{
7960
+ max_sessions_per_agent: z.ZodOptional<z.ZodNumber>;
7961
+ max_sessions_global: z.ZodOptional<z.ZodNumber>;
7962
+ session_idle_ms: z.ZodOptional<z.ZodNumber>;
7963
+ session_max_lifetime_ms: z.ZodOptional<z.ZodNumber>;
7964
+ new_session_max: z.ZodOptional<z.ZodNumber>;
7965
+ new_session_window_ms: z.ZodOptional<z.ZodNumber>;
7966
+ max_concurrent_calls_per_agent: z.ZodOptional<z.ZodNumber>;
7967
+ call_execution_timeout_ms: z.ZodOptional<z.ZodNumber>;
7968
+ }, "strict", z.ZodTypeAny, {
7969
+ max_sessions_per_agent?: number | undefined;
7970
+ max_sessions_global?: number | undefined;
7971
+ session_idle_ms?: number | undefined;
7972
+ session_max_lifetime_ms?: number | undefined;
7973
+ new_session_max?: number | undefined;
7974
+ new_session_window_ms?: number | undefined;
7975
+ max_concurrent_calls_per_agent?: number | undefined;
7976
+ call_execution_timeout_ms?: number | undefined;
7977
+ }, {
7978
+ max_sessions_per_agent?: number | undefined;
7979
+ max_sessions_global?: number | undefined;
7980
+ session_idle_ms?: number | undefined;
7981
+ session_max_lifetime_ms?: number | undefined;
7982
+ new_session_max?: number | undefined;
7983
+ new_session_window_ms?: number | undefined;
7984
+ max_concurrent_calls_per_agent?: number | undefined;
7985
+ call_execution_timeout_ms?: number | undefined;
7986
+ }>>;
5609
7987
  }, "strict", z.ZodTypeAny, {
5610
7988
  blocked_hosts: string[];
5611
7989
  allowed_local: string[];
7990
+ limits?: {
7991
+ max_sessions_per_agent?: number | undefined;
7992
+ max_sessions_global?: number | undefined;
7993
+ session_idle_ms?: number | undefined;
7994
+ session_max_lifetime_ms?: number | undefined;
7995
+ new_session_max?: number | undefined;
7996
+ new_session_window_ms?: number | undefined;
7997
+ max_concurrent_calls_per_agent?: number | undefined;
7998
+ call_execution_timeout_ms?: number | undefined;
7999
+ } | undefined;
5612
8000
  }, {
8001
+ limits?: {
8002
+ max_sessions_per_agent?: number | undefined;
8003
+ max_sessions_global?: number | undefined;
8004
+ session_idle_ms?: number | undefined;
8005
+ session_max_lifetime_ms?: number | undefined;
8006
+ new_session_max?: number | undefined;
8007
+ new_session_window_ms?: number | undefined;
8008
+ max_concurrent_calls_per_agent?: number | undefined;
8009
+ call_execution_timeout_ms?: number | undefined;
8010
+ } | undefined;
5613
8011
  blocked_hosts?: string[] | undefined;
5614
8012
  allowed_local?: string[] | undefined;
5615
8013
  }>>;
@@ -5633,7 +8031,7 @@ export declare const GatewayConfig: z.ZodEffects<z.ZodObject<{
5633
8031
  auth_required: z.ZodDefault<z.ZodBoolean>;
5634
8032
  require_agent_tokens: z.ZodDefault<z.ZodBoolean>;
5635
8033
  allowed_origins: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
5636
- expose_tools_api: z.ZodDefault<z.ZodBoolean>;
8034
+ expose_tools_api: z.ZodDefault<z.ZodEffects<z.ZodEnum<["all", "none", "per-agent"]>, "all" | "none" | "per-agent", unknown>>;
5637
8035
  management_api: z.ZodDefault<z.ZodObject<{
5638
8036
  enabled: z.ZodDefault<z.ZodBoolean>;
5639
8037
  api_secret: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
@@ -5659,12 +8057,12 @@ export declare const GatewayConfig: z.ZodEffects<z.ZodObject<{
5659
8057
  expose_management_api: z.ZodOptional<z.ZodBoolean>;
5660
8058
  expose_hook_api: z.ZodOptional<z.ZodBoolean>;
5661
8059
  }, "strict", z.ZodTypeAny, {
8060
+ auth_required: boolean;
5662
8061
  port: number;
8062
+ expose_tools_api: "all" | "none" | "per-agent";
5663
8063
  host: string;
5664
- auth_required: boolean;
5665
8064
  require_agent_tokens: boolean;
5666
8065
  allowed_origins: string[];
5667
- expose_tools_api: boolean;
5668
8066
  management_api: {
5669
8067
  port: number;
5670
8068
  enabled: boolean;
@@ -5677,14 +8075,14 @@ export declare const GatewayConfig: z.ZodEffects<z.ZodObject<{
5677
8075
  expose_hook_api?: boolean | undefined;
5678
8076
  expose_management_api?: boolean | undefined;
5679
8077
  }, {
8078
+ auth_required?: boolean | undefined;
5680
8079
  port?: number | undefined;
8080
+ expose_tools_api?: unknown;
5681
8081
  host?: string | undefined;
5682
8082
  api_secret?: string | undefined;
5683
8083
  expose_hook_api?: boolean | undefined;
5684
- auth_required?: boolean | undefined;
5685
8084
  require_agent_tokens?: boolean | undefined;
5686
8085
  allowed_origins?: string[] | undefined;
5687
- expose_tools_api?: boolean | undefined;
5688
8086
  management_api?: {
5689
8087
  port?: number | undefined;
5690
8088
  enabled?: boolean | undefined;
@@ -5703,24 +8101,24 @@ export declare const GatewayConfig: z.ZodEffects<z.ZodObject<{
5703
8101
  insecure_remote_bind: boolean;
5704
8102
  api_secret?: string | undefined;
5705
8103
  };
8104
+ auth_required: boolean;
5706
8105
  port: number;
8106
+ expose_tools_api: "all" | "none" | "per-agent";
5707
8107
  host: string;
5708
- auth_required: boolean;
5709
8108
  require_agent_tokens: boolean;
5710
8109
  allowed_origins: string[];
5711
- expose_tools_api: boolean;
5712
8110
  api_secret?: string | undefined;
5713
8111
  expose_hook_api?: boolean | undefined;
5714
8112
  expose_management_api?: boolean | undefined;
5715
8113
  }, {
8114
+ auth_required?: boolean | undefined;
5716
8115
  port?: number | undefined;
8116
+ expose_tools_api?: unknown;
5717
8117
  host?: string | undefined;
5718
8118
  api_secret?: string | undefined;
5719
8119
  expose_hook_api?: boolean | undefined;
5720
- auth_required?: boolean | undefined;
5721
8120
  require_agent_tokens?: boolean | undefined;
5722
8121
  allowed_origins?: string[] | undefined;
5723
- expose_tools_api?: boolean | undefined;
5724
8122
  management_api?: {
5725
8123
  port?: number | undefined;
5726
8124
  enabled?: boolean | undefined;
@@ -5732,14 +8130,14 @@ export declare const GatewayConfig: z.ZodEffects<z.ZodObject<{
5732
8130
  expose_management_api?: boolean | undefined;
5733
8131
  }>>;
5734
8132
  lint: z.ZodDefault<z.ZodObject<{
5735
- disable: z.ZodDefault<z.ZodArray<z.ZodEnum<["dead-deny", "unused-profile", "unused-value-set", "unused-dimension", "empty-agent", "missing-env-ref", "unresolvable-ref"]>, "many">>;
5736
- severity: z.ZodDefault<z.ZodRecord<z.ZodEnum<["dead-deny", "unused-profile", "unused-value-set", "unused-dimension", "empty-agent", "missing-env-ref", "unresolvable-ref"]>, z.ZodEnum<["info", "warn", "error"]>>>;
8133
+ disable: z.ZodDefault<z.ZodArray<z.ZodEnum<["dead-deny", "unused-profile", "unused-value-set", "unused-dimension", "empty-agent", "missing-env-ref", "unresolvable-ref", "unallocated-tool", "dead-allow"]>, "many">>;
8134
+ severity: z.ZodDefault<z.ZodRecord<z.ZodEnum<["dead-deny", "unused-profile", "unused-value-set", "unused-dimension", "empty-agent", "missing-env-ref", "unresolvable-ref", "unallocated-tool", "dead-allow"]>, z.ZodEnum<["info", "warn", "error"]>>>;
5737
8135
  }, "strict", z.ZodTypeAny, {
5738
- disable: ("dead-deny" | "unused-profile" | "unused-value-set" | "unused-dimension" | "empty-agent" | "missing-env-ref" | "unresolvable-ref")[];
5739
- severity: Partial<Record<"dead-deny" | "unused-profile" | "unused-value-set" | "unused-dimension" | "empty-agent" | "missing-env-ref" | "unresolvable-ref", "error" | "warn" | "info">>;
8136
+ disable: ("dead-deny" | "unused-profile" | "unused-value-set" | "unused-dimension" | "empty-agent" | "missing-env-ref" | "unresolvable-ref" | "unallocated-tool" | "dead-allow")[];
8137
+ severity: Partial<Record<"dead-deny" | "unused-profile" | "unused-value-set" | "unused-dimension" | "empty-agent" | "missing-env-ref" | "unresolvable-ref" | "unallocated-tool" | "dead-allow", "error" | "warn" | "info">>;
5740
8138
  }, {
5741
- disable?: ("dead-deny" | "unused-profile" | "unused-value-set" | "unused-dimension" | "empty-agent" | "missing-env-ref" | "unresolvable-ref")[] | undefined;
5742
- severity?: Partial<Record<"dead-deny" | "unused-profile" | "unused-value-set" | "unused-dimension" | "empty-agent" | "missing-env-ref" | "unresolvable-ref", "error" | "warn" | "info">> | undefined;
8139
+ disable?: ("dead-deny" | "unused-profile" | "unused-value-set" | "unused-dimension" | "empty-agent" | "missing-env-ref" | "unresolvable-ref" | "unallocated-tool" | "dead-allow")[] | undefined;
8140
+ severity?: Partial<Record<"dead-deny" | "unused-profile" | "unused-value-set" | "unused-dimension" | "empty-agent" | "missing-env-ref" | "unresolvable-ref" | "unallocated-tool" | "dead-allow", "error" | "warn" | "info">> | undefined;
5743
8141
  }>>;
5744
8142
  }, "strict", z.ZodTypeAny, {
5745
8143
  sandbox_presets: Record<string, {
@@ -5756,14 +8154,34 @@ export declare const GatewayConfig: z.ZodEffects<z.ZodObject<{
5756
8154
  }>;
5757
8155
  providers: Record<string, {
5758
8156
  type: "stdio";
8157
+ args: string[];
5759
8158
  enabled: boolean;
5760
8159
  command: string;
5761
- args: string[];
5762
8160
  env?: Record<string, string> | undefined;
8161
+ credential_probe?: {
8162
+ tool: string;
8163
+ args: Record<string, unknown>;
8164
+ interval_ms: number;
8165
+ timeout_ms: number;
8166
+ expect_contains?: string | undefined;
8167
+ reject_contains?: string | undefined;
8168
+ } | undefined;
8169
+ instructions?: string | undefined;
8170
+ upstream_instructions?: "ignore" | "include" | undefined;
5763
8171
  } | {
5764
8172
  url: string;
5765
8173
  type: "sse";
5766
8174
  enabled: boolean;
8175
+ credential_probe?: {
8176
+ tool: string;
8177
+ args: Record<string, unknown>;
8178
+ interval_ms: number;
8179
+ timeout_ms: number;
8180
+ expect_contains?: string | undefined;
8181
+ reject_contains?: string | undefined;
8182
+ } | undefined;
8183
+ instructions?: string | undefined;
8184
+ upstream_instructions?: "ignore" | "include" | undefined;
5767
8185
  headers?: Record<string, string> | undefined;
5768
8186
  } | {
5769
8187
  url: string;
@@ -5771,13 +8189,32 @@ export declare const GatewayConfig: z.ZodEffects<z.ZodObject<{
5771
8189
  oauth: boolean;
5772
8190
  enabled: boolean;
5773
8191
  oauth_callback_port: number;
8192
+ request_timeout_ms: number;
5774
8193
  client_id?: string | undefined;
5775
8194
  client_secret?: string | undefined;
8195
+ credential_probe?: {
8196
+ tool: string;
8197
+ args: Record<string, unknown>;
8198
+ interval_ms: number;
8199
+ timeout_ms: number;
8200
+ expect_contains?: string | undefined;
8201
+ reject_contains?: string | undefined;
8202
+ } | undefined;
8203
+ instructions?: string | undefined;
8204
+ upstream_instructions?: "ignore" | "include" | undefined;
5776
8205
  headers?: Record<string, string> | undefined;
5777
8206
  oauth_callback_url?: string | undefined;
8207
+ client_credentials?: {
8208
+ client_id: string;
8209
+ client_secret: string;
8210
+ token_url: string;
8211
+ scope?: string | undefined;
8212
+ } | undefined;
5778
8213
  } | "builtin" | {
5779
8214
  type: "builtin";
5780
8215
  enabled: boolean;
8216
+ instructions?: string | undefined;
8217
+ upstream_instructions?: "ignore" | "include" | undefined;
5781
8218
  }>;
5782
8219
  value_sets: Record<string, {
5783
8220
  values: [unknown, ...unknown[]];
@@ -5793,6 +8230,39 @@ export declare const GatewayConfig: z.ZodEffects<z.ZodObject<{
5793
8230
  ask: string[];
5794
8231
  deny: string[];
5795
8232
  extends: string[];
8233
+ tool_overrides: Record<string, {
8234
+ sandbox_presets: string[];
8235
+ description?: string | undefined;
8236
+ args?: Record<string, {
8237
+ normalize?: ("trim" | "email" | "phone" | "lower")[] | undefined;
8238
+ in?: string | undefined;
8239
+ required?: boolean | undefined;
8240
+ path?: string | undefined;
8241
+ expose_values?: boolean | undefined;
8242
+ allow?: unknown[] | undefined;
8243
+ equals?: unknown;
8244
+ glob_in?: string | undefined;
8245
+ each_in?: string | undefined;
8246
+ glob_allow?: string[] | undefined;
8247
+ each_allow?: unknown[] | undefined;
8248
+ label?: string | undefined;
8249
+ value_set?: string | undefined;
8250
+ }[]> | undefined;
8251
+ description_append?: string | undefined;
8252
+ alias_of?: string | undefined;
8253
+ sandbox?: {
8254
+ filesystem?: {
8255
+ allow_write: string[];
8256
+ deny_read: string[];
8257
+ deny_write: string[];
8258
+ allow_read?: string[] | undefined;
8259
+ } | undefined;
8260
+ network?: {
8261
+ allowed_domains: string[];
8262
+ denied_domains: string[];
8263
+ } | undefined;
8264
+ } | undefined;
8265
+ }>;
5796
8266
  arg_policy?: Record<string, Record<string, {
5797
8267
  normalize?: ("trim" | "email" | "phone" | "lower")[] | undefined;
5798
8268
  in?: string | undefined;
@@ -5811,6 +8281,12 @@ export declare const GatewayConfig: z.ZodEffects<z.ZodObject<{
5811
8281
  arg_scope?: {
5812
8282
  [k: string]: string[];
5813
8283
  } | undefined;
8284
+ command_policy?: Record<string, Record<string, {
8285
+ allow: string[];
8286
+ ask: string[];
8287
+ deny: string[];
8288
+ default?: "allow" | "ask" | "deny" | undefined;
8289
+ }>> | undefined;
5814
8290
  }>;
5815
8291
  clis: Record<string, {
5816
8292
  max_output_bytes: number;
@@ -5833,9 +8309,10 @@ export declare const GatewayConfig: z.ZodEffects<z.ZodObject<{
5833
8309
  shell?: string | undefined;
5834
8310
  }>;
5835
8311
  apis: Record<string, {
5836
- max_response_bytes: number;
5837
8312
  timeout_ms: number;
8313
+ max_response_bytes: number;
5838
8314
  spec: string;
8315
+ include?: string[] | undefined;
5839
8316
  exclude?: string[] | undefined;
5840
8317
  base_url?: string | undefined;
5841
8318
  auth?: {
@@ -5846,15 +8323,16 @@ export declare const GatewayConfig: z.ZodEffects<z.ZodObject<{
5846
8323
  type: "header";
5847
8324
  value: string;
5848
8325
  } | undefined;
5849
- include?: string[] | undefined;
5850
8326
  }>;
5851
8327
  agents: Record<string, {
5852
8328
  http: {
8329
+ timeout_ms: number;
5853
8330
  domain_allowlist: string[];
5854
8331
  max_response_bytes: number;
5855
- timeout_ms: number;
5856
8332
  };
5857
8333
  allow: string[];
8334
+ ask: string[];
8335
+ deny: string[];
5858
8336
  sandbox: {
5859
8337
  enabled: boolean;
5860
8338
  filesystem: {
@@ -5881,9 +8359,8 @@ export declare const GatewayConfig: z.ZodEffects<z.ZodObject<{
5881
8359
  } | undefined;
5882
8360
  }>;
5883
8361
  };
5884
- ask: string[];
5885
- deny: string[];
5886
8362
  extends: string[];
8363
+ inherit_default: boolean;
5887
8364
  remember_allow: {
5888
8365
  tool: string;
5889
8366
  expires_at?: string | undefined;
@@ -5906,6 +8383,7 @@ export declare const GatewayConfig: z.ZodEffects<z.ZodObject<{
5906
8383
  label?: string | undefined;
5907
8384
  value_set?: string | undefined;
5908
8385
  }[]> | undefined;
8386
+ description_append?: string | undefined;
5909
8387
  alias_of?: string | undefined;
5910
8388
  sandbox?: {
5911
8389
  filesystem?: {
@@ -5927,6 +8405,7 @@ export declare const GatewayConfig: z.ZodEffects<z.ZodObject<{
5927
8405
  deny: string[];
5928
8406
  default_timeout_ms: number;
5929
8407
  };
8408
+ expose_tools_api: boolean;
5930
8409
  token?: string | undefined;
5931
8410
  arg_policy?: Record<string, Record<string, {
5932
8411
  normalize?: ("trim" | "email" | "phone" | "lower")[] | undefined;
@@ -5946,16 +8425,22 @@ export declare const GatewayConfig: z.ZodEffects<z.ZodObject<{
5946
8425
  arg_scope?: {
5947
8426
  [k: string]: string[];
5948
8427
  } | undefined;
8428
+ command_policy?: Record<string, Record<string, {
8429
+ allow: string[];
8430
+ ask: string[];
8431
+ deny: string[];
8432
+ default?: "allow" | "ask" | "deny" | undefined;
8433
+ }>> | undefined;
5949
8434
  middleware?: {
5950
8435
  name: "schema-validator" | "rate-limiter" | "untrusted-envelope" | "strip-query-params" | "output-injection-detector" | "canary-token-injector" | "output-size-limiter" | "output-summarizer" | "injection-detector" | "sensitivity-classifier";
5951
8436
  enabled: boolean;
5952
8437
  model?: string | undefined;
5953
8438
  tools?: string[] | undefined;
5954
- mode?: "detect" | "mangle" | "escalate" | undefined;
5955
8439
  exclude?: string[] | undefined;
5956
8440
  max_requests?: number | undefined;
5957
8441
  window_ms?: number | undefined;
5958
8442
  per?: "tool" | "agent" | undefined;
8443
+ mode?: "detect" | "mangle" | "escalate" | undefined;
5959
8444
  backend?: "regex" | "deberta" | "heuristic" | "llm" | undefined;
5960
8445
  inference_url?: string | undefined;
5961
8446
  threshold?: number | undefined;
@@ -5963,6 +8448,16 @@ export declare const GatewayConfig: z.ZodEffects<z.ZodObject<{
5963
8448
  max_chars?: number | undefined;
5964
8449
  threshold_chars?: number | undefined;
5965
8450
  }[] | undefined;
8451
+ limits?: {
8452
+ max_sessions_per_agent?: number | undefined;
8453
+ max_sessions_global?: number | undefined;
8454
+ session_idle_ms?: number | undefined;
8455
+ session_max_lifetime_ms?: number | undefined;
8456
+ new_session_max?: number | undefined;
8457
+ new_session_window_ms?: number | undefined;
8458
+ max_concurrent_calls_per_agent?: number | undefined;
8459
+ call_execution_timeout_ms?: number | undefined;
8460
+ } | undefined;
5966
8461
  }>;
5967
8462
  approvals: {
5968
8463
  timeout_ms: number;
@@ -6038,10 +8533,39 @@ export declare const GatewayConfig: z.ZodEffects<z.ZodObject<{
6038
8533
  type: "stdio";
6039
8534
  })[];
6040
8535
  batch_window_ms: number;
8536
+ previews: Record<string, {
8537
+ tool: string;
8538
+ args: Record<string, unknown>;
8539
+ timeout_ms: number;
8540
+ max_chars: number;
8541
+ args_from: Record<string, string>;
8542
+ fields?: {
8543
+ label: string;
8544
+ primary: boolean;
8545
+ path?: string | undefined;
8546
+ text_prefix?: string | undefined;
8547
+ }[] | undefined;
8548
+ request_fields?: {
8549
+ label: string;
8550
+ primary: boolean;
8551
+ path?: string | undefined;
8552
+ text_prefix?: string | undefined;
8553
+ }[] | undefined;
8554
+ }>;
6041
8555
  };
6042
8556
  security: {
6043
8557
  blocked_hosts: string[];
6044
8558
  allowed_local: string[];
8559
+ limits?: {
8560
+ max_sessions_per_agent?: number | undefined;
8561
+ max_sessions_global?: number | undefined;
8562
+ session_idle_ms?: number | undefined;
8563
+ session_max_lifetime_ms?: number | undefined;
8564
+ new_session_max?: number | undefined;
8565
+ new_session_window_ms?: number | undefined;
8566
+ max_concurrent_calls_per_agent?: number | undefined;
8567
+ call_execution_timeout_ms?: number | undefined;
8568
+ } | undefined;
6045
8569
  };
6046
8570
  audit: {
6047
8571
  db_path: string;
@@ -6057,20 +8581,21 @@ export declare const GatewayConfig: z.ZodEffects<z.ZodObject<{
6057
8581
  insecure_remote_bind: boolean;
6058
8582
  api_secret?: string | undefined;
6059
8583
  };
8584
+ auth_required: boolean;
6060
8585
  port: number;
8586
+ expose_tools_api: "all" | "none" | "per-agent";
6061
8587
  host: string;
6062
- auth_required: boolean;
6063
8588
  require_agent_tokens: boolean;
6064
8589
  allowed_origins: string[];
6065
- expose_tools_api: boolean;
6066
8590
  api_secret?: string | undefined;
6067
8591
  expose_hook_api?: boolean | undefined;
6068
8592
  expose_management_api?: boolean | undefined;
6069
8593
  };
6070
8594
  lint: {
6071
- disable: ("dead-deny" | "unused-profile" | "unused-value-set" | "unused-dimension" | "empty-agent" | "missing-env-ref" | "unresolvable-ref")[];
6072
- severity: Partial<Record<"dead-deny" | "unused-profile" | "unused-value-set" | "unused-dimension" | "empty-agent" | "missing-env-ref" | "unresolvable-ref", "error" | "warn" | "info">>;
8595
+ disable: ("dead-deny" | "unused-profile" | "unused-value-set" | "unused-dimension" | "empty-agent" | "missing-env-ref" | "unresolvable-ref" | "unallocated-tool" | "dead-allow")[];
8596
+ severity: Partial<Record<"dead-deny" | "unused-profile" | "unused-value-set" | "unused-dimension" | "empty-agent" | "missing-env-ref" | "unresolvable-ref" | "unallocated-tool" | "dead-allow", "error" | "warn" | "info">>;
6073
8597
  };
8598
+ default_profile?: string | undefined;
6074
8599
  }, {
6075
8600
  sandbox_presets?: Record<string, {
6076
8601
  filesystem?: {
@@ -6087,13 +8612,33 @@ export declare const GatewayConfig: z.ZodEffects<z.ZodObject<{
6087
8612
  providers?: Record<string, {
6088
8613
  type: "stdio";
6089
8614
  command: string;
6090
- enabled?: boolean | undefined;
6091
8615
  args?: string[] | undefined;
8616
+ enabled?: boolean | undefined;
6092
8617
  env?: Record<string, string> | undefined;
8618
+ credential_probe?: {
8619
+ tool: string;
8620
+ args?: Record<string, unknown> | undefined;
8621
+ expect_contains?: string | undefined;
8622
+ reject_contains?: string | undefined;
8623
+ interval_ms?: number | undefined;
8624
+ timeout_ms?: number | undefined;
8625
+ } | undefined;
8626
+ instructions?: string | undefined;
8627
+ upstream_instructions?: "ignore" | "include" | undefined;
6093
8628
  } | {
6094
8629
  url: string;
6095
8630
  type: "sse";
6096
8631
  enabled?: boolean | undefined;
8632
+ credential_probe?: {
8633
+ tool: string;
8634
+ args?: Record<string, unknown> | undefined;
8635
+ expect_contains?: string | undefined;
8636
+ reject_contains?: string | undefined;
8637
+ interval_ms?: number | undefined;
8638
+ timeout_ms?: number | undefined;
8639
+ } | undefined;
8640
+ instructions?: string | undefined;
8641
+ upstream_instructions?: "ignore" | "include" | undefined;
6097
8642
  headers?: Record<string, string> | undefined;
6098
8643
  } | {
6099
8644
  url: string;
@@ -6102,12 +8647,31 @@ export declare const GatewayConfig: z.ZodEffects<z.ZodObject<{
6102
8647
  client_id?: string | undefined;
6103
8648
  client_secret?: string | undefined;
6104
8649
  enabled?: boolean | undefined;
8650
+ credential_probe?: {
8651
+ tool: string;
8652
+ args?: Record<string, unknown> | undefined;
8653
+ expect_contains?: string | undefined;
8654
+ reject_contains?: string | undefined;
8655
+ interval_ms?: number | undefined;
8656
+ timeout_ms?: number | undefined;
8657
+ } | undefined;
8658
+ instructions?: string | undefined;
8659
+ upstream_instructions?: "ignore" | "include" | undefined;
6105
8660
  headers?: Record<string, string> | undefined;
6106
8661
  oauth_callback_port?: number | undefined;
6107
8662
  oauth_callback_url?: string | undefined;
8663
+ client_credentials?: {
8664
+ client_id: string;
8665
+ client_secret: string;
8666
+ token_url: string;
8667
+ scope?: string | undefined;
8668
+ } | undefined;
8669
+ request_timeout_ms?: number | undefined;
6108
8670
  } | "builtin" | {
6109
8671
  type: "builtin";
6110
8672
  enabled?: boolean | undefined;
8673
+ instructions?: string | undefined;
8674
+ upstream_instructions?: "ignore" | "include" | undefined;
6111
8675
  }> | undefined;
6112
8676
  value_sets?: Record<string, [unknown, ...unknown[]] | {
6113
8677
  values: [unknown, ...unknown[]];
@@ -6123,6 +8687,67 @@ export declare const GatewayConfig: z.ZodEffects<z.ZodObject<{
6123
8687
  ask?: string[] | undefined;
6124
8688
  deny?: string[] | undefined;
6125
8689
  extends?: string[] | undefined;
8690
+ tool_overrides?: Record<string, {
8691
+ description?: string | undefined;
8692
+ args?: Record<string, {
8693
+ normalize?: ("trim" | "email" | "phone" | "lower")[] | undefined;
8694
+ in?: string | undefined;
8695
+ required?: boolean | undefined;
8696
+ path?: string | undefined;
8697
+ expose_values?: boolean | undefined;
8698
+ allow?: unknown[] | undefined;
8699
+ equals?: unknown;
8700
+ glob_in?: string | undefined;
8701
+ each_in?: string | undefined;
8702
+ glob_allow?: string[] | undefined;
8703
+ each_allow?: unknown[] | undefined;
8704
+ label?: string | undefined;
8705
+ value_set?: string | undefined;
8706
+ } | [{
8707
+ normalize?: ("trim" | "email" | "phone" | "lower")[] | undefined;
8708
+ in?: string | undefined;
8709
+ required?: boolean | undefined;
8710
+ path?: string | undefined;
8711
+ expose_values?: boolean | undefined;
8712
+ allow?: unknown[] | undefined;
8713
+ equals?: unknown;
8714
+ glob_in?: string | undefined;
8715
+ each_in?: string | undefined;
8716
+ glob_allow?: string[] | undefined;
8717
+ each_allow?: unknown[] | undefined;
8718
+ label?: string | undefined;
8719
+ value_set?: string | undefined;
8720
+ }, ...{
8721
+ normalize?: ("trim" | "email" | "phone" | "lower")[] | undefined;
8722
+ in?: string | undefined;
8723
+ required?: boolean | undefined;
8724
+ path?: string | undefined;
8725
+ expose_values?: boolean | undefined;
8726
+ allow?: unknown[] | undefined;
8727
+ equals?: unknown;
8728
+ glob_in?: string | undefined;
8729
+ each_in?: string | undefined;
8730
+ glob_allow?: string[] | undefined;
8731
+ each_allow?: unknown[] | undefined;
8732
+ label?: string | undefined;
8733
+ value_set?: string | undefined;
8734
+ }[]]> | undefined;
8735
+ description_append?: string | undefined;
8736
+ alias_of?: string | undefined;
8737
+ sandbox_presets?: string | string[] | undefined;
8738
+ sandbox?: {
8739
+ filesystem?: {
8740
+ allow_write?: string[] | undefined;
8741
+ deny_read?: string[] | undefined;
8742
+ deny_write?: string[] | undefined;
8743
+ allow_read?: string[] | undefined;
8744
+ } | undefined;
8745
+ network?: {
8746
+ allowed_domains?: string[] | undefined;
8747
+ denied_domains?: string[] | undefined;
8748
+ } | undefined;
8749
+ } | undefined;
8750
+ }> | undefined;
6126
8751
  arg_policy?: Record<string, Record<string, {
6127
8752
  normalize?: ("trim" | "email" | "phone" | "lower")[] | undefined;
6128
8753
  in?: string | undefined;
@@ -6167,7 +8792,14 @@ export declare const GatewayConfig: z.ZodEffects<z.ZodObject<{
6167
8792
  value_set?: string | undefined;
6168
8793
  }[]]>> | undefined;
6169
8794
  arg_scope?: Record<string, string | [string, ...string[]]> | undefined;
8795
+ command_policy?: Record<string, Record<string, {
8796
+ default?: "allow" | "ask" | "deny" | undefined;
8797
+ allow?: string[] | undefined;
8798
+ ask?: string[] | undefined;
8799
+ deny?: string[] | undefined;
8800
+ }>> | undefined;
6170
8801
  }> | undefined;
8802
+ default_profile?: string | undefined;
6171
8803
  clis?: Record<string, {
6172
8804
  cwd?: string | undefined;
6173
8805
  discovered?: string | undefined;
@@ -6190,8 +8822,9 @@ export declare const GatewayConfig: z.ZodEffects<z.ZodObject<{
6190
8822
  }> | undefined;
6191
8823
  apis?: Record<string, {
6192
8824
  spec: string;
6193
- max_response_bytes?: number | undefined;
8825
+ include?: string[] | undefined;
6194
8826
  timeout_ms?: number | undefined;
8827
+ max_response_bytes?: number | undefined;
6195
8828
  exclude?: string[] | undefined;
6196
8829
  base_url?: string | undefined;
6197
8830
  auth?: {
@@ -6202,15 +8835,16 @@ export declare const GatewayConfig: z.ZodEffects<z.ZodObject<{
6202
8835
  type: "header";
6203
8836
  value: string;
6204
8837
  } | undefined;
6205
- include?: string[] | undefined;
6206
8838
  }> | undefined;
6207
8839
  agents?: Record<string, {
6208
8840
  http?: {
8841
+ timeout_ms?: number | undefined;
6209
8842
  domain_allowlist?: string[] | undefined;
6210
8843
  max_response_bytes?: number | undefined;
6211
- timeout_ms?: number | undefined;
6212
8844
  } | undefined;
6213
8845
  allow?: string[] | undefined;
8846
+ ask?: string[] | undefined;
8847
+ deny?: string[] | undefined;
6214
8848
  sandbox?: {
6215
8849
  enabled?: boolean | undefined;
6216
8850
  filesystem?: {
@@ -6237,10 +8871,9 @@ export declare const GatewayConfig: z.ZodEffects<z.ZodObject<{
6237
8871
  } | undefined;
6238
8872
  }> | undefined;
6239
8873
  } | undefined;
6240
- ask?: string[] | undefined;
6241
- deny?: string[] | undefined;
6242
8874
  token?: string | undefined;
6243
8875
  extends?: string[] | undefined;
8876
+ inherit_default?: boolean | undefined;
6244
8877
  remember_allow?: {
6245
8878
  tool: string;
6246
8879
  expires_at?: string | undefined;
@@ -6290,6 +8923,7 @@ export declare const GatewayConfig: z.ZodEffects<z.ZodObject<{
6290
8923
  label?: string | undefined;
6291
8924
  value_set?: string | undefined;
6292
8925
  }[]]> | undefined;
8926
+ description_append?: string | undefined;
6293
8927
  alias_of?: string | undefined;
6294
8928
  sandbox_presets?: string | string[] | undefined;
6295
8929
  sandbox?: {
@@ -6349,6 +8983,12 @@ export declare const GatewayConfig: z.ZodEffects<z.ZodObject<{
6349
8983
  value_set?: string | undefined;
6350
8984
  }[]]>> | undefined;
6351
8985
  arg_scope?: Record<string, string | [string, ...string[]]> | undefined;
8986
+ command_policy?: Record<string, Record<string, {
8987
+ default?: "allow" | "ask" | "deny" | undefined;
8988
+ allow?: string[] | undefined;
8989
+ ask?: string[] | undefined;
8990
+ deny?: string[] | undefined;
8991
+ }>> | undefined;
6352
8992
  exec?: {
6353
8993
  env?: Record<string, string> | undefined;
6354
8994
  allow?: string[] | undefined;
@@ -6360,12 +9000,12 @@ export declare const GatewayConfig: z.ZodEffects<z.ZodObject<{
6360
9000
  name: "schema-validator" | "rate-limiter" | "untrusted-envelope" | "strip-query-params" | "output-injection-detector" | "canary-token-injector" | "output-size-limiter" | "output-summarizer" | "injection-detector" | "sensitivity-classifier";
6361
9001
  model?: string | undefined;
6362
9002
  tools?: string[] | undefined;
6363
- mode?: "detect" | "mangle" | "escalate" | undefined;
6364
9003
  enabled?: boolean | undefined;
6365
9004
  exclude?: string[] | undefined;
6366
9005
  max_requests?: number | undefined;
6367
9006
  window_ms?: number | undefined;
6368
9007
  per?: "tool" | "agent" | undefined;
9008
+ mode?: "detect" | "mangle" | "escalate" | undefined;
6369
9009
  backend?: "regex" | "deberta" | "heuristic" | "llm" | undefined;
6370
9010
  inference_url?: string | undefined;
6371
9011
  threshold?: number | undefined;
@@ -6373,6 +9013,17 @@ export declare const GatewayConfig: z.ZodEffects<z.ZodObject<{
6373
9013
  max_chars?: number | undefined;
6374
9014
  threshold_chars?: number | undefined;
6375
9015
  }[] | undefined;
9016
+ expose_tools_api?: boolean | undefined;
9017
+ limits?: {
9018
+ max_sessions_per_agent?: number | undefined;
9019
+ max_sessions_global?: number | undefined;
9020
+ session_idle_ms?: number | undefined;
9021
+ session_max_lifetime_ms?: number | undefined;
9022
+ new_session_max?: number | undefined;
9023
+ new_session_window_ms?: number | undefined;
9024
+ max_concurrent_calls_per_agent?: number | undefined;
9025
+ call_execution_timeout_ms?: number | undefined;
9026
+ } | undefined;
6376
9027
  }> | undefined;
6377
9028
  approvals?: {
6378
9029
  timeout_ms?: number | undefined;
@@ -6448,8 +9099,37 @@ export declare const GatewayConfig: z.ZodEffects<z.ZodObject<{
6448
9099
  type: "stdio";
6449
9100
  })[] | undefined;
6450
9101
  batch_window_ms?: number | undefined;
9102
+ previews?: Record<string, {
9103
+ tool: string;
9104
+ args?: Record<string, unknown> | undefined;
9105
+ timeout_ms?: number | undefined;
9106
+ max_chars?: number | undefined;
9107
+ args_from?: Record<string, string> | undefined;
9108
+ fields?: {
9109
+ label: string;
9110
+ path?: string | undefined;
9111
+ text_prefix?: string | undefined;
9112
+ primary?: boolean | undefined;
9113
+ }[] | undefined;
9114
+ request_fields?: {
9115
+ label: string;
9116
+ path?: string | undefined;
9117
+ text_prefix?: string | undefined;
9118
+ primary?: boolean | undefined;
9119
+ }[] | undefined;
9120
+ }> | undefined;
6451
9121
  } | undefined;
6452
9122
  security?: {
9123
+ limits?: {
9124
+ max_sessions_per_agent?: number | undefined;
9125
+ max_sessions_global?: number | undefined;
9126
+ session_idle_ms?: number | undefined;
9127
+ session_max_lifetime_ms?: number | undefined;
9128
+ new_session_max?: number | undefined;
9129
+ new_session_window_ms?: number | undefined;
9130
+ max_concurrent_calls_per_agent?: number | undefined;
9131
+ call_execution_timeout_ms?: number | undefined;
9132
+ } | undefined;
6453
9133
  blocked_hosts?: string[] | undefined;
6454
9134
  allowed_local?: string[] | undefined;
6455
9135
  } | undefined;
@@ -6459,14 +9139,14 @@ export declare const GatewayConfig: z.ZodEffects<z.ZodObject<{
6459
9139
  redact_fields?: string[] | undefined;
6460
9140
  } | undefined;
6461
9141
  server?: {
9142
+ auth_required?: boolean | undefined;
6462
9143
  port?: number | undefined;
9144
+ expose_tools_api?: unknown;
6463
9145
  host?: string | undefined;
6464
9146
  api_secret?: string | undefined;
6465
9147
  expose_hook_api?: boolean | undefined;
6466
- auth_required?: boolean | undefined;
6467
9148
  require_agent_tokens?: boolean | undefined;
6468
9149
  allowed_origins?: string[] | undefined;
6469
- expose_tools_api?: boolean | undefined;
6470
9150
  management_api?: {
6471
9151
  port?: number | undefined;
6472
9152
  enabled?: boolean | undefined;
@@ -6478,18 +9158,20 @@ export declare const GatewayConfig: z.ZodEffects<z.ZodObject<{
6478
9158
  expose_management_api?: boolean | undefined;
6479
9159
  } | undefined;
6480
9160
  lint?: {
6481
- disable?: ("dead-deny" | "unused-profile" | "unused-value-set" | "unused-dimension" | "empty-agent" | "missing-env-ref" | "unresolvable-ref")[] | undefined;
6482
- severity?: Partial<Record<"dead-deny" | "unused-profile" | "unused-value-set" | "unused-dimension" | "empty-agent" | "missing-env-ref" | "unresolvable-ref", "error" | "warn" | "info">> | undefined;
9161
+ disable?: ("dead-deny" | "unused-profile" | "unused-value-set" | "unused-dimension" | "empty-agent" | "missing-env-ref" | "unresolvable-ref" | "unallocated-tool" | "dead-allow")[] | undefined;
9162
+ severity?: Partial<Record<"dead-deny" | "unused-profile" | "unused-value-set" | "unused-dimension" | "empty-agent" | "missing-env-ref" | "unresolvable-ref" | "unallocated-tool" | "dead-allow", "error" | "warn" | "info">> | undefined;
6483
9163
  } | undefined;
6484
9164
  }>, {
6485
9165
  agents: {
6486
9166
  [k: string]: {
6487
9167
  http: {
9168
+ timeout_ms: number;
6488
9169
  domain_allowlist: string[];
6489
9170
  max_response_bytes: number;
6490
- timeout_ms: number;
6491
9171
  };
6492
9172
  allow: string[];
9173
+ ask: string[];
9174
+ deny: string[];
6493
9175
  sandbox: {
6494
9176
  enabled: boolean;
6495
9177
  filesystem: {
@@ -6516,9 +9198,8 @@ export declare const GatewayConfig: z.ZodEffects<z.ZodObject<{
6516
9198
  } | undefined;
6517
9199
  }>;
6518
9200
  };
6519
- ask: string[];
6520
- deny: string[];
6521
9201
  extends: string[];
9202
+ inherit_default: boolean;
6522
9203
  remember_allow: {
6523
9204
  tool: string;
6524
9205
  expires_at?: string | undefined;
@@ -6541,6 +9222,7 @@ export declare const GatewayConfig: z.ZodEffects<z.ZodObject<{
6541
9222
  label?: string | undefined;
6542
9223
  value_set?: string | undefined;
6543
9224
  }[]> | undefined;
9225
+ description_append?: string | undefined;
6544
9226
  alias_of?: string | undefined;
6545
9227
  sandbox?: {
6546
9228
  filesystem?: {
@@ -6562,6 +9244,7 @@ export declare const GatewayConfig: z.ZodEffects<z.ZodObject<{
6562
9244
  deny: string[];
6563
9245
  default_timeout_ms: number;
6564
9246
  };
9247
+ expose_tools_api: boolean;
6565
9248
  token?: string | undefined;
6566
9249
  arg_policy?: Record<string, Record<string, {
6567
9250
  normalize?: ("trim" | "email" | "phone" | "lower")[] | undefined;
@@ -6581,16 +9264,22 @@ export declare const GatewayConfig: z.ZodEffects<z.ZodObject<{
6581
9264
  arg_scope?: {
6582
9265
  [k: string]: string[];
6583
9266
  } | undefined;
9267
+ command_policy?: Record<string, Record<string, {
9268
+ allow: string[];
9269
+ ask: string[];
9270
+ deny: string[];
9271
+ default?: "allow" | "ask" | "deny" | undefined;
9272
+ }>> | undefined;
6584
9273
  middleware?: {
6585
9274
  name: "schema-validator" | "rate-limiter" | "untrusted-envelope" | "strip-query-params" | "output-injection-detector" | "canary-token-injector" | "output-size-limiter" | "output-summarizer" | "injection-detector" | "sensitivity-classifier";
6586
9275
  enabled: boolean;
6587
9276
  model?: string | undefined;
6588
9277
  tools?: string[] | undefined;
6589
- mode?: "detect" | "mangle" | "escalate" | undefined;
6590
9278
  exclude?: string[] | undefined;
6591
9279
  max_requests?: number | undefined;
6592
9280
  window_ms?: number | undefined;
6593
9281
  per?: "tool" | "agent" | undefined;
9282
+ mode?: "detect" | "mangle" | "escalate" | undefined;
6594
9283
  backend?: "regex" | "deberta" | "heuristic" | "llm" | undefined;
6595
9284
  inference_url?: string | undefined;
6596
9285
  threshold?: number | undefined;
@@ -6598,6 +9287,16 @@ export declare const GatewayConfig: z.ZodEffects<z.ZodObject<{
6598
9287
  max_chars?: number | undefined;
6599
9288
  threshold_chars?: number | undefined;
6600
9289
  }[] | undefined;
9290
+ limits?: {
9291
+ max_sessions_per_agent?: number | undefined;
9292
+ max_sessions_global?: number | undefined;
9293
+ session_idle_ms?: number | undefined;
9294
+ session_max_lifetime_ms?: number | undefined;
9295
+ new_session_max?: number | undefined;
9296
+ new_session_window_ms?: number | undefined;
9297
+ max_concurrent_calls_per_agent?: number | undefined;
9298
+ call_execution_timeout_ms?: number | undefined;
9299
+ } | undefined;
6601
9300
  };
6602
9301
  };
6603
9302
  sandbox_presets: Record<string, {
@@ -6614,14 +9313,34 @@ export declare const GatewayConfig: z.ZodEffects<z.ZodObject<{
6614
9313
  }>;
6615
9314
  providers: Record<string, {
6616
9315
  type: "stdio";
9316
+ args: string[];
6617
9317
  enabled: boolean;
6618
9318
  command: string;
6619
- args: string[];
6620
9319
  env?: Record<string, string> | undefined;
9320
+ credential_probe?: {
9321
+ tool: string;
9322
+ args: Record<string, unknown>;
9323
+ interval_ms: number;
9324
+ timeout_ms: number;
9325
+ expect_contains?: string | undefined;
9326
+ reject_contains?: string | undefined;
9327
+ } | undefined;
9328
+ instructions?: string | undefined;
9329
+ upstream_instructions?: "ignore" | "include" | undefined;
6621
9330
  } | {
6622
9331
  url: string;
6623
9332
  type: "sse";
6624
9333
  enabled: boolean;
9334
+ credential_probe?: {
9335
+ tool: string;
9336
+ args: Record<string, unknown>;
9337
+ interval_ms: number;
9338
+ timeout_ms: number;
9339
+ expect_contains?: string | undefined;
9340
+ reject_contains?: string | undefined;
9341
+ } | undefined;
9342
+ instructions?: string | undefined;
9343
+ upstream_instructions?: "ignore" | "include" | undefined;
6625
9344
  headers?: Record<string, string> | undefined;
6626
9345
  } | {
6627
9346
  url: string;
@@ -6629,13 +9348,32 @@ export declare const GatewayConfig: z.ZodEffects<z.ZodObject<{
6629
9348
  oauth: boolean;
6630
9349
  enabled: boolean;
6631
9350
  oauth_callback_port: number;
9351
+ request_timeout_ms: number;
6632
9352
  client_id?: string | undefined;
6633
9353
  client_secret?: string | undefined;
9354
+ credential_probe?: {
9355
+ tool: string;
9356
+ args: Record<string, unknown>;
9357
+ interval_ms: number;
9358
+ timeout_ms: number;
9359
+ expect_contains?: string | undefined;
9360
+ reject_contains?: string | undefined;
9361
+ } | undefined;
9362
+ instructions?: string | undefined;
9363
+ upstream_instructions?: "ignore" | "include" | undefined;
6634
9364
  headers?: Record<string, string> | undefined;
6635
9365
  oauth_callback_url?: string | undefined;
9366
+ client_credentials?: {
9367
+ client_id: string;
9368
+ client_secret: string;
9369
+ token_url: string;
9370
+ scope?: string | undefined;
9371
+ } | undefined;
6636
9372
  } | "builtin" | {
6637
9373
  type: "builtin";
6638
9374
  enabled: boolean;
9375
+ instructions?: string | undefined;
9376
+ upstream_instructions?: "ignore" | "include" | undefined;
6639
9377
  }>;
6640
9378
  value_sets: Record<string, {
6641
9379
  values: [unknown, ...unknown[]];
@@ -6651,6 +9389,39 @@ export declare const GatewayConfig: z.ZodEffects<z.ZodObject<{
6651
9389
  ask: string[];
6652
9390
  deny: string[];
6653
9391
  extends: string[];
9392
+ tool_overrides: Record<string, {
9393
+ sandbox_presets: string[];
9394
+ description?: string | undefined;
9395
+ args?: Record<string, {
9396
+ normalize?: ("trim" | "email" | "phone" | "lower")[] | undefined;
9397
+ in?: string | undefined;
9398
+ required?: boolean | undefined;
9399
+ path?: string | undefined;
9400
+ expose_values?: boolean | undefined;
9401
+ allow?: unknown[] | undefined;
9402
+ equals?: unknown;
9403
+ glob_in?: string | undefined;
9404
+ each_in?: string | undefined;
9405
+ glob_allow?: string[] | undefined;
9406
+ each_allow?: unknown[] | undefined;
9407
+ label?: string | undefined;
9408
+ value_set?: string | undefined;
9409
+ }[]> | undefined;
9410
+ description_append?: string | undefined;
9411
+ alias_of?: string | undefined;
9412
+ sandbox?: {
9413
+ filesystem?: {
9414
+ allow_write: string[];
9415
+ deny_read: string[];
9416
+ deny_write: string[];
9417
+ allow_read?: string[] | undefined;
9418
+ } | undefined;
9419
+ network?: {
9420
+ allowed_domains: string[];
9421
+ denied_domains: string[];
9422
+ } | undefined;
9423
+ } | undefined;
9424
+ }>;
6654
9425
  arg_policy?: Record<string, Record<string, {
6655
9426
  normalize?: ("trim" | "email" | "phone" | "lower")[] | undefined;
6656
9427
  in?: string | undefined;
@@ -6669,6 +9440,12 @@ export declare const GatewayConfig: z.ZodEffects<z.ZodObject<{
6669
9440
  arg_scope?: {
6670
9441
  [k: string]: string[];
6671
9442
  } | undefined;
9443
+ command_policy?: Record<string, Record<string, {
9444
+ allow: string[];
9445
+ ask: string[];
9446
+ deny: string[];
9447
+ default?: "allow" | "ask" | "deny" | undefined;
9448
+ }>> | undefined;
6672
9449
  }>;
6673
9450
  clis: Record<string, {
6674
9451
  max_output_bytes: number;
@@ -6691,9 +9468,10 @@ export declare const GatewayConfig: z.ZodEffects<z.ZodObject<{
6691
9468
  shell?: string | undefined;
6692
9469
  }>;
6693
9470
  apis: Record<string, {
6694
- max_response_bytes: number;
6695
9471
  timeout_ms: number;
9472
+ max_response_bytes: number;
6696
9473
  spec: string;
9474
+ include?: string[] | undefined;
6697
9475
  exclude?: string[] | undefined;
6698
9476
  base_url?: string | undefined;
6699
9477
  auth?: {
@@ -6704,7 +9482,6 @@ export declare const GatewayConfig: z.ZodEffects<z.ZodObject<{
6704
9482
  type: "header";
6705
9483
  value: string;
6706
9484
  } | undefined;
6707
- include?: string[] | undefined;
6708
9485
  }>;
6709
9486
  approvals: {
6710
9487
  timeout_ms: number;
@@ -6780,10 +9557,39 @@ export declare const GatewayConfig: z.ZodEffects<z.ZodObject<{
6780
9557
  type: "stdio";
6781
9558
  })[];
6782
9559
  batch_window_ms: number;
9560
+ previews: Record<string, {
9561
+ tool: string;
9562
+ args: Record<string, unknown>;
9563
+ timeout_ms: number;
9564
+ max_chars: number;
9565
+ args_from: Record<string, string>;
9566
+ fields?: {
9567
+ label: string;
9568
+ primary: boolean;
9569
+ path?: string | undefined;
9570
+ text_prefix?: string | undefined;
9571
+ }[] | undefined;
9572
+ request_fields?: {
9573
+ label: string;
9574
+ primary: boolean;
9575
+ path?: string | undefined;
9576
+ text_prefix?: string | undefined;
9577
+ }[] | undefined;
9578
+ }>;
6783
9579
  };
6784
9580
  security: {
6785
9581
  blocked_hosts: string[];
6786
9582
  allowed_local: string[];
9583
+ limits?: {
9584
+ max_sessions_per_agent?: number | undefined;
9585
+ max_sessions_global?: number | undefined;
9586
+ session_idle_ms?: number | undefined;
9587
+ session_max_lifetime_ms?: number | undefined;
9588
+ new_session_max?: number | undefined;
9589
+ new_session_window_ms?: number | undefined;
9590
+ max_concurrent_calls_per_agent?: number | undefined;
9591
+ call_execution_timeout_ms?: number | undefined;
9592
+ } | undefined;
6787
9593
  };
6788
9594
  audit: {
6789
9595
  db_path: string;
@@ -6799,20 +9605,21 @@ export declare const GatewayConfig: z.ZodEffects<z.ZodObject<{
6799
9605
  insecure_remote_bind: boolean;
6800
9606
  api_secret?: string | undefined;
6801
9607
  };
9608
+ auth_required: boolean;
6802
9609
  port: number;
9610
+ expose_tools_api: "all" | "none" | "per-agent";
6803
9611
  host: string;
6804
- auth_required: boolean;
6805
9612
  require_agent_tokens: boolean;
6806
9613
  allowed_origins: string[];
6807
- expose_tools_api: boolean;
6808
9614
  api_secret?: string | undefined;
6809
9615
  expose_hook_api?: boolean | undefined;
6810
9616
  expose_management_api?: boolean | undefined;
6811
9617
  };
6812
9618
  lint: {
6813
- disable: ("dead-deny" | "unused-profile" | "unused-value-set" | "unused-dimension" | "empty-agent" | "missing-env-ref" | "unresolvable-ref")[];
6814
- severity: Partial<Record<"dead-deny" | "unused-profile" | "unused-value-set" | "unused-dimension" | "empty-agent" | "missing-env-ref" | "unresolvable-ref", "error" | "warn" | "info">>;
9619
+ disable: ("dead-deny" | "unused-profile" | "unused-value-set" | "unused-dimension" | "empty-agent" | "missing-env-ref" | "unresolvable-ref" | "unallocated-tool" | "dead-allow")[];
9620
+ severity: Partial<Record<"dead-deny" | "unused-profile" | "unused-value-set" | "unused-dimension" | "empty-agent" | "missing-env-ref" | "unresolvable-ref" | "unallocated-tool" | "dead-allow", "error" | "warn" | "info">>;
6815
9621
  };
9622
+ default_profile?: string | undefined;
6816
9623
  }, {
6817
9624
  sandbox_presets?: Record<string, {
6818
9625
  filesystem?: {
@@ -6829,13 +9636,33 @@ export declare const GatewayConfig: z.ZodEffects<z.ZodObject<{
6829
9636
  providers?: Record<string, {
6830
9637
  type: "stdio";
6831
9638
  command: string;
6832
- enabled?: boolean | undefined;
6833
9639
  args?: string[] | undefined;
9640
+ enabled?: boolean | undefined;
6834
9641
  env?: Record<string, string> | undefined;
9642
+ credential_probe?: {
9643
+ tool: string;
9644
+ args?: Record<string, unknown> | undefined;
9645
+ expect_contains?: string | undefined;
9646
+ reject_contains?: string | undefined;
9647
+ interval_ms?: number | undefined;
9648
+ timeout_ms?: number | undefined;
9649
+ } | undefined;
9650
+ instructions?: string | undefined;
9651
+ upstream_instructions?: "ignore" | "include" | undefined;
6835
9652
  } | {
6836
9653
  url: string;
6837
9654
  type: "sse";
6838
9655
  enabled?: boolean | undefined;
9656
+ credential_probe?: {
9657
+ tool: string;
9658
+ args?: Record<string, unknown> | undefined;
9659
+ expect_contains?: string | undefined;
9660
+ reject_contains?: string | undefined;
9661
+ interval_ms?: number | undefined;
9662
+ timeout_ms?: number | undefined;
9663
+ } | undefined;
9664
+ instructions?: string | undefined;
9665
+ upstream_instructions?: "ignore" | "include" | undefined;
6839
9666
  headers?: Record<string, string> | undefined;
6840
9667
  } | {
6841
9668
  url: string;
@@ -6844,12 +9671,31 @@ export declare const GatewayConfig: z.ZodEffects<z.ZodObject<{
6844
9671
  client_id?: string | undefined;
6845
9672
  client_secret?: string | undefined;
6846
9673
  enabled?: boolean | undefined;
9674
+ credential_probe?: {
9675
+ tool: string;
9676
+ args?: Record<string, unknown> | undefined;
9677
+ expect_contains?: string | undefined;
9678
+ reject_contains?: string | undefined;
9679
+ interval_ms?: number | undefined;
9680
+ timeout_ms?: number | undefined;
9681
+ } | undefined;
9682
+ instructions?: string | undefined;
9683
+ upstream_instructions?: "ignore" | "include" | undefined;
6847
9684
  headers?: Record<string, string> | undefined;
6848
9685
  oauth_callback_port?: number | undefined;
6849
9686
  oauth_callback_url?: string | undefined;
9687
+ client_credentials?: {
9688
+ client_id: string;
9689
+ client_secret: string;
9690
+ token_url: string;
9691
+ scope?: string | undefined;
9692
+ } | undefined;
9693
+ request_timeout_ms?: number | undefined;
6850
9694
  } | "builtin" | {
6851
9695
  type: "builtin";
6852
9696
  enabled?: boolean | undefined;
9697
+ instructions?: string | undefined;
9698
+ upstream_instructions?: "ignore" | "include" | undefined;
6853
9699
  }> | undefined;
6854
9700
  value_sets?: Record<string, [unknown, ...unknown[]] | {
6855
9701
  values: [unknown, ...unknown[]];
@@ -6865,6 +9711,67 @@ export declare const GatewayConfig: z.ZodEffects<z.ZodObject<{
6865
9711
  ask?: string[] | undefined;
6866
9712
  deny?: string[] | undefined;
6867
9713
  extends?: string[] | undefined;
9714
+ tool_overrides?: Record<string, {
9715
+ description?: string | undefined;
9716
+ args?: Record<string, {
9717
+ normalize?: ("trim" | "email" | "phone" | "lower")[] | undefined;
9718
+ in?: string | undefined;
9719
+ required?: boolean | undefined;
9720
+ path?: string | undefined;
9721
+ expose_values?: boolean | undefined;
9722
+ allow?: unknown[] | undefined;
9723
+ equals?: unknown;
9724
+ glob_in?: string | undefined;
9725
+ each_in?: string | undefined;
9726
+ glob_allow?: string[] | undefined;
9727
+ each_allow?: unknown[] | undefined;
9728
+ label?: string | undefined;
9729
+ value_set?: string | undefined;
9730
+ } | [{
9731
+ normalize?: ("trim" | "email" | "phone" | "lower")[] | undefined;
9732
+ in?: string | undefined;
9733
+ required?: boolean | undefined;
9734
+ path?: string | undefined;
9735
+ expose_values?: boolean | undefined;
9736
+ allow?: unknown[] | undefined;
9737
+ equals?: unknown;
9738
+ glob_in?: string | undefined;
9739
+ each_in?: string | undefined;
9740
+ glob_allow?: string[] | undefined;
9741
+ each_allow?: unknown[] | undefined;
9742
+ label?: string | undefined;
9743
+ value_set?: string | undefined;
9744
+ }, ...{
9745
+ normalize?: ("trim" | "email" | "phone" | "lower")[] | undefined;
9746
+ in?: string | undefined;
9747
+ required?: boolean | undefined;
9748
+ path?: string | undefined;
9749
+ expose_values?: boolean | undefined;
9750
+ allow?: unknown[] | undefined;
9751
+ equals?: unknown;
9752
+ glob_in?: string | undefined;
9753
+ each_in?: string | undefined;
9754
+ glob_allow?: string[] | undefined;
9755
+ each_allow?: unknown[] | undefined;
9756
+ label?: string | undefined;
9757
+ value_set?: string | undefined;
9758
+ }[]]> | undefined;
9759
+ description_append?: string | undefined;
9760
+ alias_of?: string | undefined;
9761
+ sandbox_presets?: string | string[] | undefined;
9762
+ sandbox?: {
9763
+ filesystem?: {
9764
+ allow_write?: string[] | undefined;
9765
+ deny_read?: string[] | undefined;
9766
+ deny_write?: string[] | undefined;
9767
+ allow_read?: string[] | undefined;
9768
+ } | undefined;
9769
+ network?: {
9770
+ allowed_domains?: string[] | undefined;
9771
+ denied_domains?: string[] | undefined;
9772
+ } | undefined;
9773
+ } | undefined;
9774
+ }> | undefined;
6868
9775
  arg_policy?: Record<string, Record<string, {
6869
9776
  normalize?: ("trim" | "email" | "phone" | "lower")[] | undefined;
6870
9777
  in?: string | undefined;
@@ -6909,7 +9816,14 @@ export declare const GatewayConfig: z.ZodEffects<z.ZodObject<{
6909
9816
  value_set?: string | undefined;
6910
9817
  }[]]>> | undefined;
6911
9818
  arg_scope?: Record<string, string | [string, ...string[]]> | undefined;
9819
+ command_policy?: Record<string, Record<string, {
9820
+ default?: "allow" | "ask" | "deny" | undefined;
9821
+ allow?: string[] | undefined;
9822
+ ask?: string[] | undefined;
9823
+ deny?: string[] | undefined;
9824
+ }>> | undefined;
6912
9825
  }> | undefined;
9826
+ default_profile?: string | undefined;
6913
9827
  clis?: Record<string, {
6914
9828
  cwd?: string | undefined;
6915
9829
  discovered?: string | undefined;
@@ -6932,8 +9846,9 @@ export declare const GatewayConfig: z.ZodEffects<z.ZodObject<{
6932
9846
  }> | undefined;
6933
9847
  apis?: Record<string, {
6934
9848
  spec: string;
6935
- max_response_bytes?: number | undefined;
9849
+ include?: string[] | undefined;
6936
9850
  timeout_ms?: number | undefined;
9851
+ max_response_bytes?: number | undefined;
6937
9852
  exclude?: string[] | undefined;
6938
9853
  base_url?: string | undefined;
6939
9854
  auth?: {
@@ -6944,15 +9859,16 @@ export declare const GatewayConfig: z.ZodEffects<z.ZodObject<{
6944
9859
  type: "header";
6945
9860
  value: string;
6946
9861
  } | undefined;
6947
- include?: string[] | undefined;
6948
9862
  }> | undefined;
6949
9863
  agents?: Record<string, {
6950
9864
  http?: {
9865
+ timeout_ms?: number | undefined;
6951
9866
  domain_allowlist?: string[] | undefined;
6952
9867
  max_response_bytes?: number | undefined;
6953
- timeout_ms?: number | undefined;
6954
9868
  } | undefined;
6955
9869
  allow?: string[] | undefined;
9870
+ ask?: string[] | undefined;
9871
+ deny?: string[] | undefined;
6956
9872
  sandbox?: {
6957
9873
  enabled?: boolean | undefined;
6958
9874
  filesystem?: {
@@ -6979,10 +9895,9 @@ export declare const GatewayConfig: z.ZodEffects<z.ZodObject<{
6979
9895
  } | undefined;
6980
9896
  }> | undefined;
6981
9897
  } | undefined;
6982
- ask?: string[] | undefined;
6983
- deny?: string[] | undefined;
6984
9898
  token?: string | undefined;
6985
9899
  extends?: string[] | undefined;
9900
+ inherit_default?: boolean | undefined;
6986
9901
  remember_allow?: {
6987
9902
  tool: string;
6988
9903
  expires_at?: string | undefined;
@@ -7032,6 +9947,7 @@ export declare const GatewayConfig: z.ZodEffects<z.ZodObject<{
7032
9947
  label?: string | undefined;
7033
9948
  value_set?: string | undefined;
7034
9949
  }[]]> | undefined;
9950
+ description_append?: string | undefined;
7035
9951
  alias_of?: string | undefined;
7036
9952
  sandbox_presets?: string | string[] | undefined;
7037
9953
  sandbox?: {
@@ -7091,6 +10007,12 @@ export declare const GatewayConfig: z.ZodEffects<z.ZodObject<{
7091
10007
  value_set?: string | undefined;
7092
10008
  }[]]>> | undefined;
7093
10009
  arg_scope?: Record<string, string | [string, ...string[]]> | undefined;
10010
+ command_policy?: Record<string, Record<string, {
10011
+ default?: "allow" | "ask" | "deny" | undefined;
10012
+ allow?: string[] | undefined;
10013
+ ask?: string[] | undefined;
10014
+ deny?: string[] | undefined;
10015
+ }>> | undefined;
7094
10016
  exec?: {
7095
10017
  env?: Record<string, string> | undefined;
7096
10018
  allow?: string[] | undefined;
@@ -7102,12 +10024,12 @@ export declare const GatewayConfig: z.ZodEffects<z.ZodObject<{
7102
10024
  name: "schema-validator" | "rate-limiter" | "untrusted-envelope" | "strip-query-params" | "output-injection-detector" | "canary-token-injector" | "output-size-limiter" | "output-summarizer" | "injection-detector" | "sensitivity-classifier";
7103
10025
  model?: string | undefined;
7104
10026
  tools?: string[] | undefined;
7105
- mode?: "detect" | "mangle" | "escalate" | undefined;
7106
10027
  enabled?: boolean | undefined;
7107
10028
  exclude?: string[] | undefined;
7108
10029
  max_requests?: number | undefined;
7109
10030
  window_ms?: number | undefined;
7110
10031
  per?: "tool" | "agent" | undefined;
10032
+ mode?: "detect" | "mangle" | "escalate" | undefined;
7111
10033
  backend?: "regex" | "deberta" | "heuristic" | "llm" | undefined;
7112
10034
  inference_url?: string | undefined;
7113
10035
  threshold?: number | undefined;
@@ -7115,6 +10037,17 @@ export declare const GatewayConfig: z.ZodEffects<z.ZodObject<{
7115
10037
  max_chars?: number | undefined;
7116
10038
  threshold_chars?: number | undefined;
7117
10039
  }[] | undefined;
10040
+ expose_tools_api?: boolean | undefined;
10041
+ limits?: {
10042
+ max_sessions_per_agent?: number | undefined;
10043
+ max_sessions_global?: number | undefined;
10044
+ session_idle_ms?: number | undefined;
10045
+ session_max_lifetime_ms?: number | undefined;
10046
+ new_session_max?: number | undefined;
10047
+ new_session_window_ms?: number | undefined;
10048
+ max_concurrent_calls_per_agent?: number | undefined;
10049
+ call_execution_timeout_ms?: number | undefined;
10050
+ } | undefined;
7118
10051
  }> | undefined;
7119
10052
  approvals?: {
7120
10053
  timeout_ms?: number | undefined;
@@ -7190,8 +10123,37 @@ export declare const GatewayConfig: z.ZodEffects<z.ZodObject<{
7190
10123
  type: "stdio";
7191
10124
  })[] | undefined;
7192
10125
  batch_window_ms?: number | undefined;
10126
+ previews?: Record<string, {
10127
+ tool: string;
10128
+ args?: Record<string, unknown> | undefined;
10129
+ timeout_ms?: number | undefined;
10130
+ max_chars?: number | undefined;
10131
+ args_from?: Record<string, string> | undefined;
10132
+ fields?: {
10133
+ label: string;
10134
+ path?: string | undefined;
10135
+ text_prefix?: string | undefined;
10136
+ primary?: boolean | undefined;
10137
+ }[] | undefined;
10138
+ request_fields?: {
10139
+ label: string;
10140
+ path?: string | undefined;
10141
+ text_prefix?: string | undefined;
10142
+ primary?: boolean | undefined;
10143
+ }[] | undefined;
10144
+ }> | undefined;
7193
10145
  } | undefined;
7194
10146
  security?: {
10147
+ limits?: {
10148
+ max_sessions_per_agent?: number | undefined;
10149
+ max_sessions_global?: number | undefined;
10150
+ session_idle_ms?: number | undefined;
10151
+ session_max_lifetime_ms?: number | undefined;
10152
+ new_session_max?: number | undefined;
10153
+ new_session_window_ms?: number | undefined;
10154
+ max_concurrent_calls_per_agent?: number | undefined;
10155
+ call_execution_timeout_ms?: number | undefined;
10156
+ } | undefined;
7195
10157
  blocked_hosts?: string[] | undefined;
7196
10158
  allowed_local?: string[] | undefined;
7197
10159
  } | undefined;
@@ -7201,14 +10163,14 @@ export declare const GatewayConfig: z.ZodEffects<z.ZodObject<{
7201
10163
  redact_fields?: string[] | undefined;
7202
10164
  } | undefined;
7203
10165
  server?: {
10166
+ auth_required?: boolean | undefined;
7204
10167
  port?: number | undefined;
10168
+ expose_tools_api?: unknown;
7205
10169
  host?: string | undefined;
7206
10170
  api_secret?: string | undefined;
7207
10171
  expose_hook_api?: boolean | undefined;
7208
- auth_required?: boolean | undefined;
7209
10172
  require_agent_tokens?: boolean | undefined;
7210
10173
  allowed_origins?: string[] | undefined;
7211
- expose_tools_api?: boolean | undefined;
7212
10174
  management_api?: {
7213
10175
  port?: number | undefined;
7214
10176
  enabled?: boolean | undefined;
@@ -7220,8 +10182,8 @@ export declare const GatewayConfig: z.ZodEffects<z.ZodObject<{
7220
10182
  expose_management_api?: boolean | undefined;
7221
10183
  } | undefined;
7222
10184
  lint?: {
7223
- disable?: ("dead-deny" | "unused-profile" | "unused-value-set" | "unused-dimension" | "empty-agent" | "missing-env-ref" | "unresolvable-ref")[] | undefined;
7224
- severity?: Partial<Record<"dead-deny" | "unused-profile" | "unused-value-set" | "unused-dimension" | "empty-agent" | "missing-env-ref" | "unresolvable-ref", "error" | "warn" | "info">> | undefined;
10185
+ disable?: ("dead-deny" | "unused-profile" | "unused-value-set" | "unused-dimension" | "empty-agent" | "missing-env-ref" | "unresolvable-ref" | "unallocated-tool" | "dead-allow")[] | undefined;
10186
+ severity?: Partial<Record<"dead-deny" | "unused-profile" | "unused-value-set" | "unused-dimension" | "empty-agent" | "missing-env-ref" | "unresolvable-ref" | "unallocated-tool" | "dead-allow", "error" | "warn" | "info">> | undefined;
7225
10187
  } | undefined;
7226
10188
  }>;
7227
10189
  export type GatewayConfig = z.infer<typeof GatewayConfig>;