apps 0.0.1-beta.4 → 0.0.1-beta.6

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 (96) hide show
  1. package/README.md +65 -43
  2. package/framework-reference.json +1 -1
  3. package/js/{chunk-SATWJKN6.js → chunk-27F7W2LG.js} +1 -1
  4. package/js/{chunk-HDJH3RPR.js → chunk-57RKNWL2.js} +2 -2
  5. package/js/{chunk-WFSQXYUT.js → chunk-5T57N25Q.js} +15 -3
  6. package/js/{chunk-EQB7JMAL.js → chunk-6BSSI67S.js} +8 -8
  7. package/js/{chunk-3M2MEDNL.js → chunk-B3EOZTK3.js} +351 -33
  8. package/js/{chunk-FW5HBOIK.js → chunk-CDL5PM2Q.js} +307 -169
  9. package/js/{chunk-Z5NMEGJN.js → chunk-ECQFRCH4.js} +21 -9
  10. package/js/{chunk-G7ZIRKMK.js → chunk-IJX4CYZO.js} +3 -3
  11. package/js/{chunk-FDNTX5QJ.js → chunk-IPI4MFSN.js} +2 -2
  12. package/js/{chunk-2VPJHFOU.js → chunk-ITM77QPO.js} +28 -9
  13. package/js/{chunk-YEJOQEII.js → chunk-JU7VHODU.js} +1 -1
  14. package/js/{chunk-NQ3OMCA5.js → chunk-KUMBKVJD.js} +2 -2
  15. package/js/{chunk-EVJUVWN2.js → chunk-M3B3DE4K.js} +2 -2
  16. package/js/{chunk-ZJWDMTE3.js → chunk-MKWZPDR6.js} +3 -3
  17. package/js/chunk-MNMNLXBL.js +507 -0
  18. package/js/{chunk-BMOIAIVR.js → chunk-N7YDVXYJ.js} +49 -1
  19. package/js/{chunk-D47C7KG5.js → chunk-NKLWZJLE.js} +2 -2
  20. package/js/{chunk-DHUDODG5.js → chunk-OE3QQTSB.js} +41 -32
  21. package/js/{chunk-M6ZRRIBI.js → chunk-PJJ24GU7.js} +1 -1
  22. package/js/{chunk-FZJOYIZO.js → chunk-PZB6T6KU.js} +1 -1
  23. package/js/{chunk-LGIYBDWA.js → chunk-R3EV5FTO.js} +13 -1
  24. package/js/{chunk-5MQZEB6Y.js → chunk-RFVIONFX.js} +29 -12
  25. package/js/{chunk-ZCAMUXSG.js → chunk-RJDDBDSN.js} +3 -3
  26. package/js/{chunk-6VRYO2BG.js → chunk-SB4HEPNJ.js} +191 -170
  27. package/js/chunk-T7GKZBLP.js +209 -0
  28. package/js/{chunk-QKHR7BMF.js → chunk-UK573G7W.js} +1 -1
  29. package/js/{chunk-T2LAZCAD.js → chunk-VFZKSM3T.js} +1 -1
  30. package/js/{chunk-PLCMJREA.js → chunk-ZQINWV4W.js} +60 -20
  31. package/js/client.js +10 -10
  32. package/js/contracts.js +52 -16
  33. package/js/effect.js +19 -20
  34. package/js/graphql.js +34 -40
  35. package/js/host.js +19 -20
  36. package/js/index.js +189 -178
  37. package/js/mcp/effect.js +21 -22
  38. package/js/mcp/stdio.js +25 -26
  39. package/js/mcp.js +60 -45
  40. package/js/openapi.js +182 -224
  41. package/js/react.js +3 -3
  42. package/js/skills/effect.js +3 -3
  43. package/js/skills.js +12 -13
  44. package/js/storage/facet.js +4 -4
  45. package/js/ui/auth/contracts.js +2 -2
  46. package/js/ui/auth.js +5 -5
  47. package/js/ui/contracts.js +4 -4
  48. package/js/ui/serving.js +8 -8
  49. package/package.json +1 -1
  50. package/runtime.json +1 -1
  51. package/types/app-data/src/contracts/database.d.ts +33 -6
  52. package/types/app-data/src/implementation/schema.d.ts +2 -17
  53. package/types/apps/src/contracts/app.d.ts +2 -5
  54. package/types/apps/src/contracts/failure.d.ts +25 -0
  55. package/types/apps/src/contracts/host.d.ts +18 -9
  56. package/types/apps/src/contracts/mcp.d.ts +16 -0
  57. package/types/apps/src/contracts/openapi.d.ts +5 -1
  58. package/types/apps/src/contracts/operations.d.ts +0 -5
  59. package/types/apps/src/contracts/protocol-version.d.ts +2 -2
  60. package/types/apps/src/contracts/protocols/1.d.ts +15 -1
  61. package/types/apps/src/contracts/protocols/2.d.ts +2 -2
  62. package/types/apps/src/contracts/protocols/3.d.ts +676 -0
  63. package/types/apps/src/contracts/protocols/4.d.ts +1229 -0
  64. package/types/apps/src/contracts/router.d.ts +59 -0
  65. package/types/apps/src/contracts/storage.d.ts +3 -3
  66. package/types/apps/src/contracts/workflows.d.ts +34 -3
  67. package/types/apps/src/graphql.d.ts +1 -3
  68. package/types/apps/src/implementation/account-router.d.ts +12 -0
  69. package/types/apps/src/implementation/app.d.ts +5 -4
  70. package/types/apps/src/implementation/catalog-cache.d.ts +9 -2
  71. package/types/apps/src/implementation/elicitation.d.ts +1 -1
  72. package/types/apps/src/implementation/failure-detail.d.ts +25 -0
  73. package/types/apps/src/implementation/graphql-catalog.d.ts +1 -4
  74. package/types/apps/src/implementation/mcp-catalog.d.ts +1 -4
  75. package/types/apps/src/implementation/mcp-client.d.ts +35 -19
  76. package/types/apps/src/implementation/mcp.d.ts +35 -19
  77. package/types/apps/src/implementation/openapi-compile.d.ts +2 -1
  78. package/types/apps/src/implementation/openapi-source.d.ts +2 -6
  79. package/types/apps/src/implementation/operations.d.ts +26 -3
  80. package/types/apps/src/implementation/protocol-operations.d.ts +3 -4
  81. package/types/apps/src/implementation/router-catalog.d.ts +225 -0
  82. package/types/apps/src/implementation/router.d.ts +59 -0
  83. package/types/apps/src/implementation/schema.d.ts +5 -1
  84. package/types/apps/src/implementation/storage.d.ts +5 -3
  85. package/types/apps/src/implementation/webhooks.d.ts +1 -1
  86. package/types/apps/src/implementation/workflow-context.d.ts +11 -3
  87. package/types/apps/src/index.d.ts +3 -2
  88. package/types/apps/src/mcp-stdio.d.ts +2 -5
  89. package/types/apps/src/mcp.d.ts +5 -4
  90. package/types/apps/src/openapi.d.ts +6 -6
  91. package/js/chunk-PYUYJRSK.js +0 -93
  92. package/js/chunk-SWPD52J7.js +0 -35
  93. package/js/chunk-W7D7WVSY.js +0 -18
  94. package/types/apps/src/contracts/dynamic-tools.d.ts +0 -13
  95. package/types/apps/src/implementation/account-operations.d.ts +0 -151
  96. package/types/apps/src/implementation/dynamic-tools.d.ts +0 -8
@@ -0,0 +1,1229 @@
1
+ /**
2
+ * Host protocol 4: protocol 3 plus call kinds and routers. `call` carries the caller's `kind`, and
3
+ * a bundle refuses a call whose tool has the other kind with `HostKindMismatch`. Inspection
4
+ * answers with a catalog of tools and the routers that group them, instead of a list of tools.
5
+ * Messages it does not change are protocol 3's, imported from its frozen module.
6
+ *
7
+ * Once released, this protocol is frozen like the earlier ones: `bun run check` compares
8
+ * `protocol4` with `packages/apps/protocols/4.json`. See notes/apps-publishing.md.
9
+ */
10
+ import { Schema } from "effect";
11
+ import { McpError } from "../mcp.js";
12
+ import { ProviderError } from "../provider-error.js";
13
+ import { SkillLoadFailed } from "../skills.js";
14
+ import { HostDeclarationInvalid, HostEvaluationFailed } from "./3.js";
15
+ export { DeclaredAuthMethod, DeclaredProvider, DeclaredRequirements, ResolvedAccount, ResolvedAccounts, TrustedToolApproval, InvocationDeadline, SkillSources, SkillCatalogResponse, HostRequestInvalid, HostAccountsInvalid, HostDeclarationInvalid, HostEvaluationFailed, HostOperationNotFound, HostOperationFailed, HostToolNotFound, InputProblem, maxInputProblems, HostInputInvalid, HostToolBlocked, HostToolApprovalRequired, HostToolPolicyFailed, HostOutputInvalid, } from "./3.js";
16
+ /**
17
+ * Serializable live tool metadata; executable callbacks never cross this boundary. `name` is the
18
+ * tool's full dotted path. `router` is the path of the router that owns it, omitted at the root.
19
+ * `readOnly` marks a query; a tool without it is a mutation.
20
+ */
21
+ export declare const HostedTool: Schema.Struct<{
22
+ readonly schedules: Schema.optionalKey<Schema.$Array<Schema.Struct<{
23
+ readonly name: Schema.NonEmptyString;
24
+ readonly timing: Schema.Union<readonly [Schema.Struct<{
25
+ readonly kind: Schema.Literal<"interval">;
26
+ readonly milliseconds: Schema.Int;
27
+ }>, Schema.Struct<{
28
+ readonly kind: Schema.Literal<"cron">;
29
+ readonly calendar: Schema.Struct<{
30
+ readonly expression: Schema.NonEmptyString;
31
+ readonly timezone: Schema.NonEmptyString;
32
+ }>;
33
+ }>]>;
34
+ readonly input: Schema.Codec<Schema.Json, Schema.Json, never, never>;
35
+ }>>>;
36
+ readonly name: Schema.NonEmptyString;
37
+ readonly router: Schema.optionalKey<Schema.NonEmptyString>;
38
+ readonly tags: Schema.optionalKey<Schema.$Array<Schema.NonEmptyString>>;
39
+ readonly description: Schema.String;
40
+ readonly inputSchema: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
41
+ readonly readOnly: Schema.optionalKey<Schema.Boolean>;
42
+ readonly title: Schema.optionalKey<Schema.String>;
43
+ readonly outputSchema: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
44
+ readonly annotations: Schema.optionalKey<Schema.Struct<{
45
+ readonly title: Schema.optionalKey<Schema.String>;
46
+ readonly readOnlyHint: Schema.optionalKey<Schema.Boolean>;
47
+ readonly destructiveHint: Schema.optionalKey<Schema.Boolean>;
48
+ readonly idempotentHint: Schema.optionalKey<Schema.Boolean>;
49
+ readonly openWorldHint: Schema.optionalKey<Schema.Boolean>;
50
+ }>>;
51
+ readonly _meta: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
52
+ }>;
53
+ /** Parsed live tool description. */
54
+ export type HostedTool = typeof HostedTool.Type;
55
+ /** Catalog entry without schemas. Browsing lists these and reads one full tool on selection. */
56
+ export declare const HostedToolSummary: Schema.Struct<{
57
+ readonly schedules: Schema.optionalKey<Schema.$Array<Schema.Struct<{
58
+ readonly name: Schema.NonEmptyString;
59
+ readonly timing: Schema.Union<readonly [Schema.Struct<{
60
+ readonly kind: Schema.Literal<"interval">;
61
+ readonly milliseconds: Schema.Int;
62
+ }>, Schema.Struct<{
63
+ readonly kind: Schema.Literal<"cron">;
64
+ readonly calendar: Schema.Struct<{
65
+ readonly expression: Schema.NonEmptyString;
66
+ readonly timezone: Schema.NonEmptyString;
67
+ }>;
68
+ }>]>;
69
+ readonly input: Schema.Codec<Schema.Json, Schema.Json, never, never>;
70
+ }>>>;
71
+ readonly name: Schema.NonEmptyString;
72
+ readonly router: Schema.optionalKey<Schema.NonEmptyString>;
73
+ readonly tags: Schema.optionalKey<Schema.$Array<Schema.NonEmptyString>>;
74
+ readonly description: Schema.String;
75
+ readonly readOnly: Schema.optionalKey<Schema.Boolean>;
76
+ readonly title: Schema.optionalKey<Schema.String>;
77
+ readonly annotations: Schema.optionalKey<Schema.Struct<{
78
+ readonly title: Schema.optionalKey<Schema.String>;
79
+ readonly readOnlyHint: Schema.optionalKey<Schema.Boolean>;
80
+ readonly destructiveHint: Schema.optionalKey<Schema.Boolean>;
81
+ readonly idempotentHint: Schema.optionalKey<Schema.Boolean>;
82
+ readonly openWorldHint: Schema.optionalKey<Schema.Boolean>;
83
+ }>>;
84
+ }>;
85
+ export type HostedToolSummary = typeof HostedToolSummary.Type;
86
+ /** Why one router's tools could not be read. The rest of the app's catalog is unaffected. */
87
+ export declare const HostRouterError: Schema.Union<readonly [typeof ProviderError, typeof McpError, typeof SkillLoadFailed, typeof HostDeclarationInvalid, typeof HostEvaluationFailed]>;
88
+ export type HostRouterError = typeof HostRouterError.Type;
89
+ /**
90
+ * One router in a live catalog. `path` is "" for the app's root router. `skill` names the skill
91
+ * that carries this router's instructions. A router with `error` lists none of its tools.
92
+ */
93
+ export declare const HostedRouter: Schema.Struct<{
94
+ readonly path: Schema.String;
95
+ readonly title: Schema.optionalKey<Schema.String>;
96
+ readonly description: Schema.optionalKey<Schema.String>;
97
+ readonly icons: Schema.optionalKey<Schema.$Array<Schema.Struct<{
98
+ readonly src: Schema.NonEmptyString;
99
+ readonly mimeType: Schema.optionalKey<Schema.String>;
100
+ readonly sizes: Schema.optionalKey<Schema.$Array<Schema.String>>;
101
+ readonly theme: Schema.optionalKey<Schema.Literals<readonly ["light", "dark"]>>;
102
+ }>>>;
103
+ readonly tags: Schema.optionalKey<Schema.$Record<Schema.NonEmptyString, Schema.String>>;
104
+ readonly skill: Schema.optionalKey<Schema.NonEmptyString>;
105
+ readonly error: Schema.optionalKey<Schema.Union<readonly [typeof ProviderError, typeof McpError, typeof SkillLoadFailed, typeof HostDeclarationInvalid, typeof HostEvaluationFailed]>>;
106
+ }>;
107
+ export type HostedRouter = typeof HostedRouter.Type;
108
+ /** A live evaluation's tools and the routers that group them. */
109
+ export declare const HostedCatalog: Schema.Struct<{
110
+ readonly tools: Schema.$Array<Schema.Struct<{
111
+ readonly schedules: Schema.optionalKey<Schema.$Array<Schema.Struct<{
112
+ readonly name: Schema.NonEmptyString;
113
+ readonly timing: Schema.Union<readonly [Schema.Struct<{
114
+ readonly kind: Schema.Literal<"interval">;
115
+ readonly milliseconds: Schema.Int;
116
+ }>, Schema.Struct<{
117
+ readonly kind: Schema.Literal<"cron">;
118
+ readonly calendar: Schema.Struct<{
119
+ readonly expression: Schema.NonEmptyString;
120
+ readonly timezone: Schema.NonEmptyString;
121
+ }>;
122
+ }>]>;
123
+ readonly input: Schema.Codec<Schema.Json, Schema.Json, never, never>;
124
+ }>>>;
125
+ readonly name: Schema.NonEmptyString;
126
+ readonly router: Schema.optionalKey<Schema.NonEmptyString>;
127
+ readonly tags: Schema.optionalKey<Schema.$Array<Schema.NonEmptyString>>;
128
+ readonly description: Schema.String;
129
+ readonly inputSchema: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
130
+ readonly readOnly: Schema.optionalKey<Schema.Boolean>;
131
+ readonly title: Schema.optionalKey<Schema.String>;
132
+ readonly outputSchema: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
133
+ readonly annotations: Schema.optionalKey<Schema.Struct<{
134
+ readonly title: Schema.optionalKey<Schema.String>;
135
+ readonly readOnlyHint: Schema.optionalKey<Schema.Boolean>;
136
+ readonly destructiveHint: Schema.optionalKey<Schema.Boolean>;
137
+ readonly idempotentHint: Schema.optionalKey<Schema.Boolean>;
138
+ readonly openWorldHint: Schema.optionalKey<Schema.Boolean>;
139
+ }>>;
140
+ readonly _meta: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
141
+ }>>;
142
+ readonly routers: Schema.$Array<Schema.Struct<{
143
+ readonly path: Schema.String;
144
+ readonly title: Schema.optionalKey<Schema.String>;
145
+ readonly description: Schema.optionalKey<Schema.String>;
146
+ readonly icons: Schema.optionalKey<Schema.$Array<Schema.Struct<{
147
+ readonly src: Schema.NonEmptyString;
148
+ readonly mimeType: Schema.optionalKey<Schema.String>;
149
+ readonly sizes: Schema.optionalKey<Schema.$Array<Schema.String>>;
150
+ readonly theme: Schema.optionalKey<Schema.Literals<readonly ["light", "dark"]>>;
151
+ }>>>;
152
+ readonly tags: Schema.optionalKey<Schema.$Record<Schema.NonEmptyString, Schema.String>>;
153
+ readonly skill: Schema.optionalKey<Schema.NonEmptyString>;
154
+ readonly error: Schema.optionalKey<Schema.Union<readonly [typeof ProviderError, typeof McpError, typeof SkillLoadFailed, typeof HostDeclarationInvalid, typeof HostEvaluationFailed]>>;
155
+ }>>;
156
+ }>;
157
+ export type HostedCatalog = typeof HostedCatalog.Type;
158
+ /** A catalog without tool schemas. Browsing lists these and reads one full tool on selection. */
159
+ export declare const HostedCatalogSummary: Schema.Struct<{
160
+ readonly tools: Schema.$Array<Schema.Struct<{
161
+ readonly schedules: Schema.optionalKey<Schema.$Array<Schema.Struct<{
162
+ readonly name: Schema.NonEmptyString;
163
+ readonly timing: Schema.Union<readonly [Schema.Struct<{
164
+ readonly kind: Schema.Literal<"interval">;
165
+ readonly milliseconds: Schema.Int;
166
+ }>, Schema.Struct<{
167
+ readonly kind: Schema.Literal<"cron">;
168
+ readonly calendar: Schema.Struct<{
169
+ readonly expression: Schema.NonEmptyString;
170
+ readonly timezone: Schema.NonEmptyString;
171
+ }>;
172
+ }>]>;
173
+ readonly input: Schema.Codec<Schema.Json, Schema.Json, never, never>;
174
+ }>>>;
175
+ readonly name: Schema.NonEmptyString;
176
+ readonly router: Schema.optionalKey<Schema.NonEmptyString>;
177
+ readonly tags: Schema.optionalKey<Schema.$Array<Schema.NonEmptyString>>;
178
+ readonly description: Schema.String;
179
+ readonly readOnly: Schema.optionalKey<Schema.Boolean>;
180
+ readonly title: Schema.optionalKey<Schema.String>;
181
+ readonly annotations: Schema.optionalKey<Schema.Struct<{
182
+ readonly title: Schema.optionalKey<Schema.String>;
183
+ readonly readOnlyHint: Schema.optionalKey<Schema.Boolean>;
184
+ readonly destructiveHint: Schema.optionalKey<Schema.Boolean>;
185
+ readonly idempotentHint: Schema.optionalKey<Schema.Boolean>;
186
+ readonly openWorldHint: Schema.optionalKey<Schema.Boolean>;
187
+ }>>;
188
+ }>>;
189
+ readonly routers: Schema.$Array<Schema.Struct<{
190
+ readonly path: Schema.String;
191
+ readonly title: Schema.optionalKey<Schema.String>;
192
+ readonly description: Schema.optionalKey<Schema.String>;
193
+ readonly icons: Schema.optionalKey<Schema.$Array<Schema.Struct<{
194
+ readonly src: Schema.NonEmptyString;
195
+ readonly mimeType: Schema.optionalKey<Schema.String>;
196
+ readonly sizes: Schema.optionalKey<Schema.$Array<Schema.String>>;
197
+ readonly theme: Schema.optionalKey<Schema.Literals<readonly ["light", "dark"]>>;
198
+ }>>>;
199
+ readonly tags: Schema.optionalKey<Schema.$Record<Schema.NonEmptyString, Schema.String>>;
200
+ readonly skill: Schema.optionalKey<Schema.NonEmptyString>;
201
+ readonly error: Schema.optionalKey<Schema.Union<readonly [typeof ProviderError, typeof McpError, typeof SkillLoadFailed, typeof HostDeclarationInvalid, typeof HostEvaluationFailed]>>;
202
+ }>>;
203
+ }>;
204
+ export type HostedCatalogSummary = typeof HostedCatalogSummary.Type;
205
+ /** Whether a tool reads or writes. */
206
+ export declare const ToolKind: Schema.Literals<readonly ["query", "mutation"]>;
207
+ /** Framework-owned dispatch, independent of app-authored HTTP routing. */
208
+ export declare const HostRequest: Schema.Union<readonly [Schema.Union<readonly [Schema.Struct<{
209
+ readonly operation: Schema.Literal<"workflows">;
210
+ }>, Schema.Struct<{
211
+ readonly operation: Schema.Literal<"workflow-validate">;
212
+ readonly name: Schema.NonEmptyString;
213
+ readonly input: Schema.Codec<Schema.Json, Schema.Json, never, never>;
214
+ }>, Schema.Struct<{
215
+ readonly operation: Schema.Literal<"workflow-run">;
216
+ readonly name: Schema.NonEmptyString;
217
+ readonly input: Schema.Codec<Schema.Json, Schema.Json, never, never>;
218
+ }>]>, Schema.Union<readonly [Schema.Struct<{
219
+ readonly operation: Schema.Literal<"webhooks">;
220
+ }>, Schema.Struct<{
221
+ readonly name: Schema.NonEmptyString;
222
+ readonly subscriptionId: Schema.NonEmptyString;
223
+ readonly sourceAccount: Schema.brand<Schema.String, "acc">;
224
+ readonly callbackUrl: Schema.String;
225
+ readonly secret: Schema.String;
226
+ readonly config: Schema.Codec<Schema.Json, Schema.Json, never, never>;
227
+ readonly operation: Schema.Literal<"webhook-validate">;
228
+ }>, Schema.Struct<{
229
+ readonly state: Schema.Codec<Schema.Json, Schema.Json, never, never>;
230
+ readonly name: Schema.NonEmptyString;
231
+ readonly subscriptionId: Schema.NonEmptyString;
232
+ readonly sourceAccount: Schema.brand<Schema.String, "acc">;
233
+ readonly callbackUrl: Schema.String;
234
+ readonly secret: Schema.String;
235
+ readonly config: Schema.Codec<Schema.Json, Schema.Json, never, never>;
236
+ readonly operation: Schema.Literal<"webhook-complete">;
237
+ }>, Schema.Struct<{
238
+ readonly name: Schema.NonEmptyString;
239
+ readonly subscriptionId: Schema.NonEmptyString;
240
+ readonly sourceAccount: Schema.brand<Schema.String, "acc">;
241
+ readonly callbackUrl: Schema.String;
242
+ readonly secret: Schema.String;
243
+ readonly config: Schema.Codec<Schema.Json, Schema.Json, never, never>;
244
+ readonly operation: Schema.Literal<"webhook-register">;
245
+ }>, Schema.Struct<{
246
+ readonly state: Schema.Codec<Schema.Json, Schema.Json, never, never>;
247
+ readonly name: Schema.NonEmptyString;
248
+ readonly subscriptionId: Schema.NonEmptyString;
249
+ readonly sourceAccount: Schema.brand<Schema.String, "acc">;
250
+ readonly callbackUrl: Schema.String;
251
+ readonly secret: Schema.String;
252
+ readonly config: Schema.Codec<Schema.Json, Schema.Json, never, never>;
253
+ readonly operation: Schema.Literal<"webhook-unregister">;
254
+ }>, Schema.Struct<{
255
+ readonly state: Schema.Codec<Schema.Json, Schema.Json, never, never>;
256
+ readonly request: Schema.Struct<{
257
+ readonly url: Schema.String;
258
+ readonly method: Schema.Literals<readonly ["GET", "POST", "PUT", "PATCH", "DELETE", "HEAD", "OPTIONS"]>;
259
+ readonly headers: Schema.$Record<Schema.String, Schema.String>;
260
+ readonly body: Schema.String;
261
+ }>;
262
+ readonly name: Schema.NonEmptyString;
263
+ readonly subscriptionId: Schema.NonEmptyString;
264
+ readonly sourceAccount: Schema.brand<Schema.String, "acc">;
265
+ readonly callbackUrl: Schema.String;
266
+ readonly secret: Schema.String;
267
+ readonly config: Schema.Codec<Schema.Json, Schema.Json, never, never>;
268
+ readonly operation: Schema.Literal<"webhook-handle">;
269
+ }>]>, Schema.Struct<{
270
+ readonly operation: Schema.Literal<"requirements">;
271
+ }>, Schema.Struct<{
272
+ readonly operation: Schema.Literal<"inspect">;
273
+ /** Omit schemas. Only builds that declare the toolIndex capability accept this. */
274
+ readonly detail: Schema.optionalKey<Schema.Literal<"summary">>;
275
+ /** Describe only these tools. Only builds that declare the toolIndex capability accept this. */
276
+ readonly tools: Schema.optionalKey<Schema.$Array<Schema.NonEmptyString>>;
277
+ /**
278
+ * Describe only declared operations that have schedules, without dynamic tool discovery.
279
+ * Only builds that declare the scheduledTools capability accept this.
280
+ */
281
+ readonly scheduled: Schema.optionalKey<Schema.Literal<true>>;
282
+ }>, Schema.Struct<{
283
+ readonly operation: Schema.Literal<"skills">;
284
+ /** Answer with SkillSources. Only builds that declare the skillSources capability accept this. */
285
+ readonly sources: Schema.optionalKey<Schema.Literal<true>>;
286
+ }>, Schema.Struct<{
287
+ readonly operation: Schema.Literal<"query">;
288
+ readonly name: Schema.NonEmptyString;
289
+ readonly input: Schema.Codec<Schema.Json, Schema.Json, never, never>;
290
+ }>, Schema.Struct<{
291
+ readonly operation: Schema.Literal<"mutate">;
292
+ readonly name: Schema.NonEmptyString;
293
+ readonly input: Schema.Codec<Schema.Json, Schema.Json, never, never>;
294
+ }>, Schema.Struct<{
295
+ readonly operation: Schema.Literal<"call">;
296
+ readonly tool: Schema.NonEmptyString;
297
+ /**
298
+ * The caller's claim; the bundle rejects a call whose tool has the other kind. The host omits
299
+ * it for a tool its catalog does not list, and then opens storage for writing.
300
+ */
301
+ readonly kind: Schema.optionalKey<Schema.Literals<readonly ["query", "mutation"]>>;
302
+ readonly input: Schema.Codec<Schema.Json, Schema.Json, never, never>;
303
+ }>]>;
304
+ /** Parsed portable dispatch request. */
305
+ export type HostRequest = typeof HostRequest.Type;
306
+ declare const HostKindMismatch_base: Schema.Class<HostKindMismatch, Schema.TaggedStruct<"HostKindMismatch", {
307
+ readonly tool: Schema.NonEmptyString;
308
+ readonly requested: Schema.Literals<readonly ["query", "mutation"]>;
309
+ readonly actual: Schema.Literals<readonly ["query", "mutation"]>;
310
+ }>, import("effect/Cause").YieldableError>;
311
+ /** The tool exists but is a query called as a mutation, or the reverse. Nothing ran. */
312
+ export declare class HostKindMismatch extends HostKindMismatch_base {
313
+ }
314
+ /**
315
+ * Safe error envelope. Author failures carry only their name and bounded message with account
316
+ * secrets replaced; no source, account fields, stack or cause value is serialized.
317
+ */
318
+ export declare const HostError: Schema.Union<readonly [typeof import("../api-response-error.js").OpenapiResponseError, typeof ProviderError, typeof McpError, typeof SkillLoadFailed, typeof import("../workflows.js").WorkflowFailure, typeof import("./1.js").HostRequestInvalid, typeof import("./1.js").HostAccountsInvalid, typeof HostDeclarationInvalid, typeof HostEvaluationFailed, typeof import("./1.js").HostOperationNotFound, typeof import("./3.js").HostOperationFailed, typeof import("../../../../app-data/src/index.js").DatabaseLimitExceeded, typeof import("../../../../app-data/src/index.js").DatabaseFieldReserved, typeof import("./1.js").HostToolNotFound, typeof import("./1.js").HostInputInvalid, typeof import("./1.js").HostOutputInvalid, typeof import("./1.js").HostToolBlocked, typeof import("./1.js").HostToolApprovalRequired, typeof import("./1.js").HostToolPolicyFailed, typeof import("../elicitation.js").ElicitationFailed, typeof HostKindMismatch]>;
319
+ /** Expected host failures. */
320
+ export type HostError = typeof HostError.Type;
321
+ /** Portable response envelope; callers parse the success value for their operation. */
322
+ export declare const HostResponse: Schema.Union<readonly [Schema.Struct<{
323
+ readonly ok: Schema.Literal<true>;
324
+ readonly value: Schema.Codec<Schema.Json, Schema.Json, never, never>;
325
+ readonly toolError: Schema.optionalKey<Schema.Literal<true>>;
326
+ }>, Schema.Struct<{
327
+ readonly ok: Schema.Literal<false>;
328
+ readonly error: Schema.Union<readonly [typeof import("../api-response-error.js").OpenapiResponseError, typeof ProviderError, typeof McpError, typeof SkillLoadFailed, typeof import("../workflows.js").WorkflowFailure, typeof import("./1.js").HostRequestInvalid, typeof import("./1.js").HostAccountsInvalid, typeof HostDeclarationInvalid, typeof HostEvaluationFailed, typeof import("./1.js").HostOperationNotFound, typeof import("./3.js").HostOperationFailed, typeof import("../../../../app-data/src/index.js").DatabaseLimitExceeded, typeof import("../../../../app-data/src/index.js").DatabaseFieldReserved, typeof import("./1.js").HostToolNotFound, typeof import("./1.js").HostInputInvalid, typeof import("./1.js").HostOutputInvalid, typeof import("./1.js").HostToolBlocked, typeof import("./1.js").HostToolApprovalRequired, typeof import("./1.js").HostToolPolicyFailed, typeof import("../elicitation.js").ElicitationFailed, typeof HostKindMismatch]>;
329
+ }>]>;
330
+ /** Parsed response envelope. */
331
+ export type HostResponse = typeof HostResponse.Type;
332
+ /** The JSON body the host sends to a bundle's generated server entry. */
333
+ export declare const HostInvocation: Schema.Struct<{
334
+ readonly command: Schema.Union<readonly [Schema.Union<readonly [Schema.Struct<{
335
+ readonly operation: Schema.Literal<"workflows">;
336
+ }>, Schema.Struct<{
337
+ readonly operation: Schema.Literal<"workflow-validate">;
338
+ readonly name: Schema.NonEmptyString;
339
+ readonly input: Schema.Codec<Schema.Json, Schema.Json, never, never>;
340
+ }>, Schema.Struct<{
341
+ readonly operation: Schema.Literal<"workflow-run">;
342
+ readonly name: Schema.NonEmptyString;
343
+ readonly input: Schema.Codec<Schema.Json, Schema.Json, never, never>;
344
+ }>]>, Schema.Union<readonly [Schema.Struct<{
345
+ readonly operation: Schema.Literal<"webhooks">;
346
+ }>, Schema.Struct<{
347
+ readonly name: Schema.NonEmptyString;
348
+ readonly subscriptionId: Schema.NonEmptyString;
349
+ readonly sourceAccount: Schema.brand<Schema.String, "acc">;
350
+ readonly callbackUrl: Schema.String;
351
+ readonly secret: Schema.String;
352
+ readonly config: Schema.Codec<Schema.Json, Schema.Json, never, never>;
353
+ readonly operation: Schema.Literal<"webhook-validate">;
354
+ }>, Schema.Struct<{
355
+ readonly state: Schema.Codec<Schema.Json, Schema.Json, never, never>;
356
+ readonly name: Schema.NonEmptyString;
357
+ readonly subscriptionId: Schema.NonEmptyString;
358
+ readonly sourceAccount: Schema.brand<Schema.String, "acc">;
359
+ readonly callbackUrl: Schema.String;
360
+ readonly secret: Schema.String;
361
+ readonly config: Schema.Codec<Schema.Json, Schema.Json, never, never>;
362
+ readonly operation: Schema.Literal<"webhook-complete">;
363
+ }>, Schema.Struct<{
364
+ readonly name: Schema.NonEmptyString;
365
+ readonly subscriptionId: Schema.NonEmptyString;
366
+ readonly sourceAccount: Schema.brand<Schema.String, "acc">;
367
+ readonly callbackUrl: Schema.String;
368
+ readonly secret: Schema.String;
369
+ readonly config: Schema.Codec<Schema.Json, Schema.Json, never, never>;
370
+ readonly operation: Schema.Literal<"webhook-register">;
371
+ }>, Schema.Struct<{
372
+ readonly state: Schema.Codec<Schema.Json, Schema.Json, never, never>;
373
+ readonly name: Schema.NonEmptyString;
374
+ readonly subscriptionId: Schema.NonEmptyString;
375
+ readonly sourceAccount: Schema.brand<Schema.String, "acc">;
376
+ readonly callbackUrl: Schema.String;
377
+ readonly secret: Schema.String;
378
+ readonly config: Schema.Codec<Schema.Json, Schema.Json, never, never>;
379
+ readonly operation: Schema.Literal<"webhook-unregister">;
380
+ }>, Schema.Struct<{
381
+ readonly state: Schema.Codec<Schema.Json, Schema.Json, never, never>;
382
+ readonly request: Schema.Struct<{
383
+ readonly url: Schema.String;
384
+ readonly method: Schema.Literals<readonly ["GET", "POST", "PUT", "PATCH", "DELETE", "HEAD", "OPTIONS"]>;
385
+ readonly headers: Schema.$Record<Schema.String, Schema.String>;
386
+ readonly body: Schema.String;
387
+ }>;
388
+ readonly name: Schema.NonEmptyString;
389
+ readonly subscriptionId: Schema.NonEmptyString;
390
+ readonly sourceAccount: Schema.brand<Schema.String, "acc">;
391
+ readonly callbackUrl: Schema.String;
392
+ readonly secret: Schema.String;
393
+ readonly config: Schema.Codec<Schema.Json, Schema.Json, never, never>;
394
+ readonly operation: Schema.Literal<"webhook-handle">;
395
+ }>]>, Schema.Struct<{
396
+ readonly operation: Schema.Literal<"requirements">;
397
+ }>, Schema.Struct<{
398
+ readonly operation: Schema.Literal<"inspect">;
399
+ /** Omit schemas. Only builds that declare the toolIndex capability accept this. */
400
+ readonly detail: Schema.optionalKey<Schema.Literal<"summary">>;
401
+ /** Describe only these tools. Only builds that declare the toolIndex capability accept this. */
402
+ readonly tools: Schema.optionalKey<Schema.$Array<Schema.NonEmptyString>>;
403
+ /**
404
+ * Describe only declared operations that have schedules, without dynamic tool discovery.
405
+ * Only builds that declare the scheduledTools capability accept this.
406
+ */
407
+ readonly scheduled: Schema.optionalKey<Schema.Literal<true>>;
408
+ }>, Schema.Struct<{
409
+ readonly operation: Schema.Literal<"skills">;
410
+ /** Answer with SkillSources. Only builds that declare the skillSources capability accept this. */
411
+ readonly sources: Schema.optionalKey<Schema.Literal<true>>;
412
+ }>, Schema.Struct<{
413
+ readonly operation: Schema.Literal<"query">;
414
+ readonly name: Schema.NonEmptyString;
415
+ readonly input: Schema.Codec<Schema.Json, Schema.Json, never, never>;
416
+ }>, Schema.Struct<{
417
+ readonly operation: Schema.Literal<"mutate">;
418
+ readonly name: Schema.NonEmptyString;
419
+ readonly input: Schema.Codec<Schema.Json, Schema.Json, never, never>;
420
+ }>, Schema.Struct<{
421
+ readonly operation: Schema.Literal<"call">;
422
+ readonly tool: Schema.NonEmptyString;
423
+ /**
424
+ * The caller's claim; the bundle rejects a call whose tool has the other kind. The host omits
425
+ * it for a tool its catalog does not list, and then opens storage for writing.
426
+ */
427
+ readonly kind: Schema.optionalKey<Schema.Literals<readonly ["query", "mutation"]>>;
428
+ readonly input: Schema.Codec<Schema.Json, Schema.Json, never, never>;
429
+ }>]>;
430
+ readonly accounts: Schema.$Record<Schema.NonEmptyString, Schema.Union<readonly [Schema.Struct<{
431
+ readonly id: Schema.brand<Schema.String, "acc">;
432
+ readonly provider: Schema.Struct<{
433
+ readonly name: Schema.NonEmptyString;
434
+ readonly auth: Schema.$Record<Schema.NonEmptyString, Schema.Union<readonly [Schema.Struct<{
435
+ readonly type: Schema.Literal<"secrets">;
436
+ readonly label: Schema.String;
437
+ readonly fields: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
438
+ }>, Schema.Struct<{
439
+ readonly response: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
440
+ readonly discover: Schema.String;
441
+ readonly authorizationUrl: Schema.optionalKey<Schema.Never>;
442
+ readonly tokenUrl: Schema.optionalKey<Schema.Never>;
443
+ readonly revocationUrl: Schema.optionalKey<Schema.Never>;
444
+ readonly scopes: Schema.optionalKey<Schema.$Array<Schema.String>>;
445
+ readonly grant: Schema.optionalKey<Schema.Literal<"authorization_code">>;
446
+ readonly authorizationParams: Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>;
447
+ readonly tokenEndpointAuthMethod: Schema.optionalKey<Schema.Literals<readonly ["none", "client_secret_post", "client_secret_basic", "client_secret_basic_raw"]>>;
448
+ readonly resource: Schema.optionalKey<Schema.NullOr<Schema.String>>;
449
+ readonly type: Schema.Literal<"oauth2">;
450
+ }>, Schema.Struct<{
451
+ readonly response: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
452
+ readonly authorizationUrl: Schema.String;
453
+ readonly tokenUrl: Schema.String;
454
+ readonly revocationUrl: Schema.optionalKey<Schema.String>;
455
+ readonly scopes: Schema.$Array<Schema.String>;
456
+ readonly issuer: Schema.optionalKey<Schema.String>;
457
+ readonly discover: Schema.optionalKey<Schema.Never>;
458
+ readonly grant: Schema.optionalKey<Schema.Literal<"authorization_code">>;
459
+ readonly authorizationParams: Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>;
460
+ readonly tokenEndpointAuthMethod: Schema.optionalKey<Schema.Literals<readonly ["none", "client_secret_post", "client_secret_basic", "client_secret_basic_raw"]>>;
461
+ readonly resource: Schema.optionalKey<Schema.NullOr<Schema.String>>;
462
+ readonly type: Schema.Literal<"oauth2">;
463
+ }>, Schema.Struct<{
464
+ readonly response: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
465
+ readonly grant: Schema.Literal<"client_credentials">;
466
+ readonly discover: Schema.String;
467
+ readonly authorizationUrl: Schema.optionalKey<Schema.Never>;
468
+ readonly tokenUrl: Schema.optionalKey<Schema.Never>;
469
+ readonly revocationUrl: Schema.optionalKey<Schema.Never>;
470
+ readonly scopes: Schema.optionalKey<Schema.$Array<Schema.String>>;
471
+ readonly tokenEndpointAuthMethod: Schema.Literals<readonly ["client_secret_post", "client_secret_basic", "client_secret_basic_raw"]>;
472
+ readonly resource: Schema.optionalKey<Schema.NullOr<Schema.String>>;
473
+ readonly type: Schema.Literal<"oauth2">;
474
+ }>, Schema.Struct<{
475
+ readonly response: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
476
+ readonly grant: Schema.Literal<"client_credentials">;
477
+ readonly tokenUrl: Schema.String;
478
+ readonly revocationUrl: Schema.optionalKey<Schema.String>;
479
+ readonly scopes: Schema.$Array<Schema.String>;
480
+ readonly tokenEndpointAuthMethod: Schema.Literals<readonly ["client_secret_post", "client_secret_basic", "client_secret_basic_raw"]>;
481
+ readonly resource: Schema.optionalKey<Schema.NullOr<Schema.String>>;
482
+ readonly authorizationUrl: Schema.optionalKey<Schema.Never>;
483
+ readonly discover: Schema.optionalKey<Schema.Never>;
484
+ readonly type: Schema.Literal<"oauth2">;
485
+ }>]>>;
486
+ }>;
487
+ readonly method: Schema.NonEmptyString;
488
+ readonly generation: Schema.optionalKey<Schema.Int>;
489
+ readonly fields: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
490
+ }>, Schema.$Array<Schema.Struct<{
491
+ readonly id: Schema.brand<Schema.String, "acc">;
492
+ readonly provider: Schema.Struct<{
493
+ readonly name: Schema.NonEmptyString;
494
+ readonly auth: Schema.$Record<Schema.NonEmptyString, Schema.Union<readonly [Schema.Struct<{
495
+ readonly type: Schema.Literal<"secrets">;
496
+ readonly label: Schema.String;
497
+ readonly fields: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
498
+ }>, Schema.Struct<{
499
+ readonly response: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
500
+ readonly discover: Schema.String;
501
+ readonly authorizationUrl: Schema.optionalKey<Schema.Never>;
502
+ readonly tokenUrl: Schema.optionalKey<Schema.Never>;
503
+ readonly revocationUrl: Schema.optionalKey<Schema.Never>;
504
+ readonly scopes: Schema.optionalKey<Schema.$Array<Schema.String>>;
505
+ readonly grant: Schema.optionalKey<Schema.Literal<"authorization_code">>;
506
+ readonly authorizationParams: Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>;
507
+ readonly tokenEndpointAuthMethod: Schema.optionalKey<Schema.Literals<readonly ["none", "client_secret_post", "client_secret_basic", "client_secret_basic_raw"]>>;
508
+ readonly resource: Schema.optionalKey<Schema.NullOr<Schema.String>>;
509
+ readonly type: Schema.Literal<"oauth2">;
510
+ }>, Schema.Struct<{
511
+ readonly response: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
512
+ readonly authorizationUrl: Schema.String;
513
+ readonly tokenUrl: Schema.String;
514
+ readonly revocationUrl: Schema.optionalKey<Schema.String>;
515
+ readonly scopes: Schema.$Array<Schema.String>;
516
+ readonly issuer: Schema.optionalKey<Schema.String>;
517
+ readonly discover: Schema.optionalKey<Schema.Never>;
518
+ readonly grant: Schema.optionalKey<Schema.Literal<"authorization_code">>;
519
+ readonly authorizationParams: Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>;
520
+ readonly tokenEndpointAuthMethod: Schema.optionalKey<Schema.Literals<readonly ["none", "client_secret_post", "client_secret_basic", "client_secret_basic_raw"]>>;
521
+ readonly resource: Schema.optionalKey<Schema.NullOr<Schema.String>>;
522
+ readonly type: Schema.Literal<"oauth2">;
523
+ }>, Schema.Struct<{
524
+ readonly response: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
525
+ readonly grant: Schema.Literal<"client_credentials">;
526
+ readonly discover: Schema.String;
527
+ readonly authorizationUrl: Schema.optionalKey<Schema.Never>;
528
+ readonly tokenUrl: Schema.optionalKey<Schema.Never>;
529
+ readonly revocationUrl: Schema.optionalKey<Schema.Never>;
530
+ readonly scopes: Schema.optionalKey<Schema.$Array<Schema.String>>;
531
+ readonly tokenEndpointAuthMethod: Schema.Literals<readonly ["client_secret_post", "client_secret_basic", "client_secret_basic_raw"]>;
532
+ readonly resource: Schema.optionalKey<Schema.NullOr<Schema.String>>;
533
+ readonly type: Schema.Literal<"oauth2">;
534
+ }>, Schema.Struct<{
535
+ readonly response: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
536
+ readonly grant: Schema.Literal<"client_credentials">;
537
+ readonly tokenUrl: Schema.String;
538
+ readonly revocationUrl: Schema.optionalKey<Schema.String>;
539
+ readonly scopes: Schema.$Array<Schema.String>;
540
+ readonly tokenEndpointAuthMethod: Schema.Literals<readonly ["client_secret_post", "client_secret_basic", "client_secret_basic_raw"]>;
541
+ readonly resource: Schema.optionalKey<Schema.NullOr<Schema.String>>;
542
+ readonly authorizationUrl: Schema.optionalKey<Schema.Never>;
543
+ readonly discover: Schema.optionalKey<Schema.Never>;
544
+ readonly type: Schema.Literal<"oauth2">;
545
+ }>]>>;
546
+ }>;
547
+ readonly method: Schema.NonEmptyString;
548
+ readonly generation: Schema.optionalKey<Schema.Int>;
549
+ readonly fields: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
550
+ }>>]>>;
551
+ readonly approval: Schema.optionalKey<Schema.Struct<{
552
+ readonly tool: Schema.NonEmptyString;
553
+ readonly input: Schema.Codec<Schema.Json, Schema.Json, never, never>;
554
+ }>>;
555
+ readonly replay: Schema.optionalKey<Schema.Struct<{
556
+ readonly key: Schema.NonEmptyString;
557
+ readonly fingerprint: Schema.NonEmptyString;
558
+ }>>;
559
+ readonly deadline: Schema.optionalKey<Schema.Finite>;
560
+ readonly workflowRun: Schema.optionalKey<Schema.brand<Schema.NonEmptyString, "wfr">>;
561
+ }>;
562
+ export type HostInvocation = typeof HostInvocation.Type;
563
+ /** Every message of protocol 4, in the order its snapshot records them. */
564
+ export declare const protocol4: {
565
+ readonly version: 4;
566
+ readonly schemas: {
567
+ readonly invocation: Schema.Struct<{
568
+ readonly command: Schema.Union<readonly [Schema.Union<readonly [Schema.Struct<{
569
+ readonly operation: Schema.Literal<"workflows">;
570
+ }>, Schema.Struct<{
571
+ readonly operation: Schema.Literal<"workflow-validate">;
572
+ readonly name: Schema.NonEmptyString;
573
+ readonly input: Schema.Codec<Schema.Json, Schema.Json, never, never>;
574
+ }>, Schema.Struct<{
575
+ readonly operation: Schema.Literal<"workflow-run">;
576
+ readonly name: Schema.NonEmptyString;
577
+ readonly input: Schema.Codec<Schema.Json, Schema.Json, never, never>;
578
+ }>]>, Schema.Union<readonly [Schema.Struct<{
579
+ readonly operation: Schema.Literal<"webhooks">;
580
+ }>, Schema.Struct<{
581
+ readonly name: Schema.NonEmptyString;
582
+ readonly subscriptionId: Schema.NonEmptyString;
583
+ readonly sourceAccount: Schema.brand<Schema.String, "acc">;
584
+ readonly callbackUrl: Schema.String;
585
+ readonly secret: Schema.String;
586
+ readonly config: Schema.Codec<Schema.Json, Schema.Json, never, never>;
587
+ readonly operation: Schema.Literal<"webhook-validate">;
588
+ }>, Schema.Struct<{
589
+ readonly state: Schema.Codec<Schema.Json, Schema.Json, never, never>;
590
+ readonly name: Schema.NonEmptyString;
591
+ readonly subscriptionId: Schema.NonEmptyString;
592
+ readonly sourceAccount: Schema.brand<Schema.String, "acc">;
593
+ readonly callbackUrl: Schema.String;
594
+ readonly secret: Schema.String;
595
+ readonly config: Schema.Codec<Schema.Json, Schema.Json, never, never>;
596
+ readonly operation: Schema.Literal<"webhook-complete">;
597
+ }>, Schema.Struct<{
598
+ readonly name: Schema.NonEmptyString;
599
+ readonly subscriptionId: Schema.NonEmptyString;
600
+ readonly sourceAccount: Schema.brand<Schema.String, "acc">;
601
+ readonly callbackUrl: Schema.String;
602
+ readonly secret: Schema.String;
603
+ readonly config: Schema.Codec<Schema.Json, Schema.Json, never, never>;
604
+ readonly operation: Schema.Literal<"webhook-register">;
605
+ }>, Schema.Struct<{
606
+ readonly state: Schema.Codec<Schema.Json, Schema.Json, never, never>;
607
+ readonly name: Schema.NonEmptyString;
608
+ readonly subscriptionId: Schema.NonEmptyString;
609
+ readonly sourceAccount: Schema.brand<Schema.String, "acc">;
610
+ readonly callbackUrl: Schema.String;
611
+ readonly secret: Schema.String;
612
+ readonly config: Schema.Codec<Schema.Json, Schema.Json, never, never>;
613
+ readonly operation: Schema.Literal<"webhook-unregister">;
614
+ }>, Schema.Struct<{
615
+ readonly state: Schema.Codec<Schema.Json, Schema.Json, never, never>;
616
+ readonly request: Schema.Struct<{
617
+ readonly url: Schema.String;
618
+ readonly method: Schema.Literals<readonly ["GET", "POST", "PUT", "PATCH", "DELETE", "HEAD", "OPTIONS"]>;
619
+ readonly headers: Schema.$Record<Schema.String, Schema.String>;
620
+ readonly body: Schema.String;
621
+ }>;
622
+ readonly name: Schema.NonEmptyString;
623
+ readonly subscriptionId: Schema.NonEmptyString;
624
+ readonly sourceAccount: Schema.brand<Schema.String, "acc">;
625
+ readonly callbackUrl: Schema.String;
626
+ readonly secret: Schema.String;
627
+ readonly config: Schema.Codec<Schema.Json, Schema.Json, never, never>;
628
+ readonly operation: Schema.Literal<"webhook-handle">;
629
+ }>]>, Schema.Struct<{
630
+ readonly operation: Schema.Literal<"requirements">;
631
+ }>, Schema.Struct<{
632
+ readonly operation: Schema.Literal<"inspect">;
633
+ /** Omit schemas. Only builds that declare the toolIndex capability accept this. */
634
+ readonly detail: Schema.optionalKey<Schema.Literal<"summary">>;
635
+ /** Describe only these tools. Only builds that declare the toolIndex capability accept this. */
636
+ readonly tools: Schema.optionalKey<Schema.$Array<Schema.NonEmptyString>>;
637
+ /**
638
+ * Describe only declared operations that have schedules, without dynamic tool discovery.
639
+ * Only builds that declare the scheduledTools capability accept this.
640
+ */
641
+ readonly scheduled: Schema.optionalKey<Schema.Literal<true>>;
642
+ }>, Schema.Struct<{
643
+ readonly operation: Schema.Literal<"skills">;
644
+ /** Answer with SkillSources. Only builds that declare the skillSources capability accept this. */
645
+ readonly sources: Schema.optionalKey<Schema.Literal<true>>;
646
+ }>, Schema.Struct<{
647
+ readonly operation: Schema.Literal<"query">;
648
+ readonly name: Schema.NonEmptyString;
649
+ readonly input: Schema.Codec<Schema.Json, Schema.Json, never, never>;
650
+ }>, Schema.Struct<{
651
+ readonly operation: Schema.Literal<"mutate">;
652
+ readonly name: Schema.NonEmptyString;
653
+ readonly input: Schema.Codec<Schema.Json, Schema.Json, never, never>;
654
+ }>, Schema.Struct<{
655
+ readonly operation: Schema.Literal<"call">;
656
+ readonly tool: Schema.NonEmptyString;
657
+ /**
658
+ * The caller's claim; the bundle rejects a call whose tool has the other kind. The host omits
659
+ * it for a tool its catalog does not list, and then opens storage for writing.
660
+ */
661
+ readonly kind: Schema.optionalKey<Schema.Literals<readonly ["query", "mutation"]>>;
662
+ readonly input: Schema.Codec<Schema.Json, Schema.Json, never, never>;
663
+ }>]>;
664
+ readonly accounts: Schema.$Record<Schema.NonEmptyString, Schema.Union<readonly [Schema.Struct<{
665
+ readonly id: Schema.brand<Schema.String, "acc">;
666
+ readonly provider: Schema.Struct<{
667
+ readonly name: Schema.NonEmptyString;
668
+ readonly auth: Schema.$Record<Schema.NonEmptyString, Schema.Union<readonly [Schema.Struct<{
669
+ readonly type: Schema.Literal<"secrets">;
670
+ readonly label: Schema.String;
671
+ readonly fields: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
672
+ }>, Schema.Struct<{
673
+ readonly response: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
674
+ readonly discover: Schema.String;
675
+ readonly authorizationUrl: Schema.optionalKey<Schema.Never>;
676
+ readonly tokenUrl: Schema.optionalKey<Schema.Never>;
677
+ readonly revocationUrl: Schema.optionalKey<Schema.Never>;
678
+ readonly scopes: Schema.optionalKey<Schema.$Array<Schema.String>>;
679
+ readonly grant: Schema.optionalKey<Schema.Literal<"authorization_code">>;
680
+ readonly authorizationParams: Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>;
681
+ readonly tokenEndpointAuthMethod: Schema.optionalKey<Schema.Literals<readonly ["none", "client_secret_post", "client_secret_basic", "client_secret_basic_raw"]>>;
682
+ readonly resource: Schema.optionalKey<Schema.NullOr<Schema.String>>;
683
+ readonly type: Schema.Literal<"oauth2">;
684
+ }>, Schema.Struct<{
685
+ readonly response: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
686
+ readonly authorizationUrl: Schema.String;
687
+ readonly tokenUrl: Schema.String;
688
+ readonly revocationUrl: Schema.optionalKey<Schema.String>;
689
+ readonly scopes: Schema.$Array<Schema.String>;
690
+ readonly issuer: Schema.optionalKey<Schema.String>;
691
+ readonly discover: Schema.optionalKey<Schema.Never>;
692
+ readonly grant: Schema.optionalKey<Schema.Literal<"authorization_code">>;
693
+ readonly authorizationParams: Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>;
694
+ readonly tokenEndpointAuthMethod: Schema.optionalKey<Schema.Literals<readonly ["none", "client_secret_post", "client_secret_basic", "client_secret_basic_raw"]>>;
695
+ readonly resource: Schema.optionalKey<Schema.NullOr<Schema.String>>;
696
+ readonly type: Schema.Literal<"oauth2">;
697
+ }>, Schema.Struct<{
698
+ readonly response: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
699
+ readonly grant: Schema.Literal<"client_credentials">;
700
+ readonly discover: Schema.String;
701
+ readonly authorizationUrl: Schema.optionalKey<Schema.Never>;
702
+ readonly tokenUrl: Schema.optionalKey<Schema.Never>;
703
+ readonly revocationUrl: Schema.optionalKey<Schema.Never>;
704
+ readonly scopes: Schema.optionalKey<Schema.$Array<Schema.String>>;
705
+ readonly tokenEndpointAuthMethod: Schema.Literals<readonly ["client_secret_post", "client_secret_basic", "client_secret_basic_raw"]>;
706
+ readonly resource: Schema.optionalKey<Schema.NullOr<Schema.String>>;
707
+ readonly type: Schema.Literal<"oauth2">;
708
+ }>, Schema.Struct<{
709
+ readonly response: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
710
+ readonly grant: Schema.Literal<"client_credentials">;
711
+ readonly tokenUrl: Schema.String;
712
+ readonly revocationUrl: Schema.optionalKey<Schema.String>;
713
+ readonly scopes: Schema.$Array<Schema.String>;
714
+ readonly tokenEndpointAuthMethod: Schema.Literals<readonly ["client_secret_post", "client_secret_basic", "client_secret_basic_raw"]>;
715
+ readonly resource: Schema.optionalKey<Schema.NullOr<Schema.String>>;
716
+ readonly authorizationUrl: Schema.optionalKey<Schema.Never>;
717
+ readonly discover: Schema.optionalKey<Schema.Never>;
718
+ readonly type: Schema.Literal<"oauth2">;
719
+ }>]>>;
720
+ }>;
721
+ readonly method: Schema.NonEmptyString;
722
+ readonly generation: Schema.optionalKey<Schema.Int>;
723
+ readonly fields: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
724
+ }>, Schema.$Array<Schema.Struct<{
725
+ readonly id: Schema.brand<Schema.String, "acc">;
726
+ readonly provider: Schema.Struct<{
727
+ readonly name: Schema.NonEmptyString;
728
+ readonly auth: Schema.$Record<Schema.NonEmptyString, Schema.Union<readonly [Schema.Struct<{
729
+ readonly type: Schema.Literal<"secrets">;
730
+ readonly label: Schema.String;
731
+ readonly fields: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
732
+ }>, Schema.Struct<{
733
+ readonly response: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
734
+ readonly discover: Schema.String;
735
+ readonly authorizationUrl: Schema.optionalKey<Schema.Never>;
736
+ readonly tokenUrl: Schema.optionalKey<Schema.Never>;
737
+ readonly revocationUrl: Schema.optionalKey<Schema.Never>;
738
+ readonly scopes: Schema.optionalKey<Schema.$Array<Schema.String>>;
739
+ readonly grant: Schema.optionalKey<Schema.Literal<"authorization_code">>;
740
+ readonly authorizationParams: Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>;
741
+ readonly tokenEndpointAuthMethod: Schema.optionalKey<Schema.Literals<readonly ["none", "client_secret_post", "client_secret_basic", "client_secret_basic_raw"]>>;
742
+ readonly resource: Schema.optionalKey<Schema.NullOr<Schema.String>>;
743
+ readonly type: Schema.Literal<"oauth2">;
744
+ }>, Schema.Struct<{
745
+ readonly response: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
746
+ readonly authorizationUrl: Schema.String;
747
+ readonly tokenUrl: Schema.String;
748
+ readonly revocationUrl: Schema.optionalKey<Schema.String>;
749
+ readonly scopes: Schema.$Array<Schema.String>;
750
+ readonly issuer: Schema.optionalKey<Schema.String>;
751
+ readonly discover: Schema.optionalKey<Schema.Never>;
752
+ readonly grant: Schema.optionalKey<Schema.Literal<"authorization_code">>;
753
+ readonly authorizationParams: Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>;
754
+ readonly tokenEndpointAuthMethod: Schema.optionalKey<Schema.Literals<readonly ["none", "client_secret_post", "client_secret_basic", "client_secret_basic_raw"]>>;
755
+ readonly resource: Schema.optionalKey<Schema.NullOr<Schema.String>>;
756
+ readonly type: Schema.Literal<"oauth2">;
757
+ }>, Schema.Struct<{
758
+ readonly response: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
759
+ readonly grant: Schema.Literal<"client_credentials">;
760
+ readonly discover: Schema.String;
761
+ readonly authorizationUrl: Schema.optionalKey<Schema.Never>;
762
+ readonly tokenUrl: Schema.optionalKey<Schema.Never>;
763
+ readonly revocationUrl: Schema.optionalKey<Schema.Never>;
764
+ readonly scopes: Schema.optionalKey<Schema.$Array<Schema.String>>;
765
+ readonly tokenEndpointAuthMethod: Schema.Literals<readonly ["client_secret_post", "client_secret_basic", "client_secret_basic_raw"]>;
766
+ readonly resource: Schema.optionalKey<Schema.NullOr<Schema.String>>;
767
+ readonly type: Schema.Literal<"oauth2">;
768
+ }>, Schema.Struct<{
769
+ readonly response: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
770
+ readonly grant: Schema.Literal<"client_credentials">;
771
+ readonly tokenUrl: Schema.String;
772
+ readonly revocationUrl: Schema.optionalKey<Schema.String>;
773
+ readonly scopes: Schema.$Array<Schema.String>;
774
+ readonly tokenEndpointAuthMethod: Schema.Literals<readonly ["client_secret_post", "client_secret_basic", "client_secret_basic_raw"]>;
775
+ readonly resource: Schema.optionalKey<Schema.NullOr<Schema.String>>;
776
+ readonly authorizationUrl: Schema.optionalKey<Schema.Never>;
777
+ readonly discover: Schema.optionalKey<Schema.Never>;
778
+ readonly type: Schema.Literal<"oauth2">;
779
+ }>]>>;
780
+ }>;
781
+ readonly method: Schema.NonEmptyString;
782
+ readonly generation: Schema.optionalKey<Schema.Int>;
783
+ readonly fields: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
784
+ }>>]>>;
785
+ readonly approval: Schema.optionalKey<Schema.Struct<{
786
+ readonly tool: Schema.NonEmptyString;
787
+ readonly input: Schema.Codec<Schema.Json, Schema.Json, never, never>;
788
+ }>>;
789
+ readonly replay: Schema.optionalKey<Schema.Struct<{
790
+ readonly key: Schema.NonEmptyString;
791
+ readonly fingerprint: Schema.NonEmptyString;
792
+ }>>;
793
+ readonly deadline: Schema.optionalKey<Schema.Finite>;
794
+ readonly workflowRun: Schema.optionalKey<Schema.brand<Schema.NonEmptyString, "wfr">>;
795
+ }>;
796
+ readonly request: Schema.Union<readonly [Schema.Union<readonly [Schema.Struct<{
797
+ readonly operation: Schema.Literal<"workflows">;
798
+ }>, Schema.Struct<{
799
+ readonly operation: Schema.Literal<"workflow-validate">;
800
+ readonly name: Schema.NonEmptyString;
801
+ readonly input: Schema.Codec<Schema.Json, Schema.Json, never, never>;
802
+ }>, Schema.Struct<{
803
+ readonly operation: Schema.Literal<"workflow-run">;
804
+ readonly name: Schema.NonEmptyString;
805
+ readonly input: Schema.Codec<Schema.Json, Schema.Json, never, never>;
806
+ }>]>, Schema.Union<readonly [Schema.Struct<{
807
+ readonly operation: Schema.Literal<"webhooks">;
808
+ }>, Schema.Struct<{
809
+ readonly name: Schema.NonEmptyString;
810
+ readonly subscriptionId: Schema.NonEmptyString;
811
+ readonly sourceAccount: Schema.brand<Schema.String, "acc">;
812
+ readonly callbackUrl: Schema.String;
813
+ readonly secret: Schema.String;
814
+ readonly config: Schema.Codec<Schema.Json, Schema.Json, never, never>;
815
+ readonly operation: Schema.Literal<"webhook-validate">;
816
+ }>, Schema.Struct<{
817
+ readonly state: Schema.Codec<Schema.Json, Schema.Json, never, never>;
818
+ readonly name: Schema.NonEmptyString;
819
+ readonly subscriptionId: Schema.NonEmptyString;
820
+ readonly sourceAccount: Schema.brand<Schema.String, "acc">;
821
+ readonly callbackUrl: Schema.String;
822
+ readonly secret: Schema.String;
823
+ readonly config: Schema.Codec<Schema.Json, Schema.Json, never, never>;
824
+ readonly operation: Schema.Literal<"webhook-complete">;
825
+ }>, Schema.Struct<{
826
+ readonly name: Schema.NonEmptyString;
827
+ readonly subscriptionId: Schema.NonEmptyString;
828
+ readonly sourceAccount: Schema.brand<Schema.String, "acc">;
829
+ readonly callbackUrl: Schema.String;
830
+ readonly secret: Schema.String;
831
+ readonly config: Schema.Codec<Schema.Json, Schema.Json, never, never>;
832
+ readonly operation: Schema.Literal<"webhook-register">;
833
+ }>, Schema.Struct<{
834
+ readonly state: Schema.Codec<Schema.Json, Schema.Json, never, never>;
835
+ readonly name: Schema.NonEmptyString;
836
+ readonly subscriptionId: Schema.NonEmptyString;
837
+ readonly sourceAccount: Schema.brand<Schema.String, "acc">;
838
+ readonly callbackUrl: Schema.String;
839
+ readonly secret: Schema.String;
840
+ readonly config: Schema.Codec<Schema.Json, Schema.Json, never, never>;
841
+ readonly operation: Schema.Literal<"webhook-unregister">;
842
+ }>, Schema.Struct<{
843
+ readonly state: Schema.Codec<Schema.Json, Schema.Json, never, never>;
844
+ readonly request: Schema.Struct<{
845
+ readonly url: Schema.String;
846
+ readonly method: Schema.Literals<readonly ["GET", "POST", "PUT", "PATCH", "DELETE", "HEAD", "OPTIONS"]>;
847
+ readonly headers: Schema.$Record<Schema.String, Schema.String>;
848
+ readonly body: Schema.String;
849
+ }>;
850
+ readonly name: Schema.NonEmptyString;
851
+ readonly subscriptionId: Schema.NonEmptyString;
852
+ readonly sourceAccount: Schema.brand<Schema.String, "acc">;
853
+ readonly callbackUrl: Schema.String;
854
+ readonly secret: Schema.String;
855
+ readonly config: Schema.Codec<Schema.Json, Schema.Json, never, never>;
856
+ readonly operation: Schema.Literal<"webhook-handle">;
857
+ }>]>, Schema.Struct<{
858
+ readonly operation: Schema.Literal<"requirements">;
859
+ }>, Schema.Struct<{
860
+ readonly operation: Schema.Literal<"inspect">;
861
+ /** Omit schemas. Only builds that declare the toolIndex capability accept this. */
862
+ readonly detail: Schema.optionalKey<Schema.Literal<"summary">>;
863
+ /** Describe only these tools. Only builds that declare the toolIndex capability accept this. */
864
+ readonly tools: Schema.optionalKey<Schema.$Array<Schema.NonEmptyString>>;
865
+ /**
866
+ * Describe only declared operations that have schedules, without dynamic tool discovery.
867
+ * Only builds that declare the scheduledTools capability accept this.
868
+ */
869
+ readonly scheduled: Schema.optionalKey<Schema.Literal<true>>;
870
+ }>, Schema.Struct<{
871
+ readonly operation: Schema.Literal<"skills">;
872
+ /** Answer with SkillSources. Only builds that declare the skillSources capability accept this. */
873
+ readonly sources: Schema.optionalKey<Schema.Literal<true>>;
874
+ }>, Schema.Struct<{
875
+ readonly operation: Schema.Literal<"query">;
876
+ readonly name: Schema.NonEmptyString;
877
+ readonly input: Schema.Codec<Schema.Json, Schema.Json, never, never>;
878
+ }>, Schema.Struct<{
879
+ readonly operation: Schema.Literal<"mutate">;
880
+ readonly name: Schema.NonEmptyString;
881
+ readonly input: Schema.Codec<Schema.Json, Schema.Json, never, never>;
882
+ }>, Schema.Struct<{
883
+ readonly operation: Schema.Literal<"call">;
884
+ readonly tool: Schema.NonEmptyString;
885
+ /**
886
+ * The caller's claim; the bundle rejects a call whose tool has the other kind. The host omits
887
+ * it for a tool its catalog does not list, and then opens storage for writing.
888
+ */
889
+ readonly kind: Schema.optionalKey<Schema.Literals<readonly ["query", "mutation"]>>;
890
+ readonly input: Schema.Codec<Schema.Json, Schema.Json, never, never>;
891
+ }>]>;
892
+ readonly response: Schema.Union<readonly [Schema.Struct<{
893
+ readonly ok: Schema.Literal<true>;
894
+ readonly value: Schema.Codec<Schema.Json, Schema.Json, never, never>;
895
+ readonly toolError: Schema.optionalKey<Schema.Literal<true>>;
896
+ }>, Schema.Struct<{
897
+ readonly ok: Schema.Literal<false>;
898
+ readonly error: Schema.Union<readonly [typeof import("../api-response-error.js").OpenapiResponseError, typeof ProviderError, typeof McpError, typeof SkillLoadFailed, typeof import("../workflows.js").WorkflowFailure, typeof import("./1.js").HostRequestInvalid, typeof import("./1.js").HostAccountsInvalid, typeof HostDeclarationInvalid, typeof HostEvaluationFailed, typeof import("./1.js").HostOperationNotFound, typeof import("./3.js").HostOperationFailed, typeof import("../../../../app-data/src/index.js").DatabaseLimitExceeded, typeof import("../../../../app-data/src/index.js").DatabaseFieldReserved, typeof import("./1.js").HostToolNotFound, typeof import("./1.js").HostInputInvalid, typeof import("./1.js").HostOutputInvalid, typeof import("./1.js").HostToolBlocked, typeof import("./1.js").HostToolApprovalRequired, typeof import("./1.js").HostToolPolicyFailed, typeof import("../elicitation.js").ElicitationFailed, typeof HostKindMismatch]>;
899
+ }>]>;
900
+ readonly requirements: Schema.Struct<{
901
+ readonly capabilities: Schema.optionalKey<Schema.Struct<{
902
+ readonly skills: Schema.Literal<true>;
903
+ readonly toolIndex: Schema.optionalKey<Schema.Literal<true>>;
904
+ readonly skillSources: Schema.optionalKey<Schema.Literal<true>>;
905
+ readonly scheduledTools: Schema.optionalKey<Schema.Literal<true>>;
906
+ }>>;
907
+ readonly database: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Struct<{
908
+ readonly fields: Schema.$Record<Schema.String, Schema.Struct<{
909
+ readonly kind: Schema.Literals<readonly ["string", "number", "boolean", "id", "userId"]>;
910
+ readonly optional: Schema.optional<Schema.Boolean>;
911
+ readonly default: Schema.optional<Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean]>>;
912
+ readonly references: Schema.optional<Schema.String>;
913
+ }>>;
914
+ readonly indexes: Schema.$Array<Schema.Struct<{
915
+ readonly name: Schema.String;
916
+ readonly fields: Schema.NonEmptyArray<Schema.String>;
917
+ }>>;
918
+ }>>>;
919
+ readonly accounts: Schema.$Record<Schema.NonEmptyString, Schema.Struct<{
920
+ readonly definition: Schema.Struct<{
921
+ readonly name: Schema.NonEmptyString;
922
+ readonly auth: Schema.$Record<Schema.NonEmptyString, Schema.Union<readonly [Schema.Struct<{
923
+ readonly type: Schema.Literal<"secrets">;
924
+ readonly label: Schema.String;
925
+ readonly fields: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
926
+ }>, Schema.Struct<{
927
+ readonly response: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
928
+ readonly discover: Schema.String;
929
+ readonly authorizationUrl: Schema.optionalKey<Schema.Never>;
930
+ readonly tokenUrl: Schema.optionalKey<Schema.Never>;
931
+ readonly revocationUrl: Schema.optionalKey<Schema.Never>;
932
+ readonly scopes: Schema.optionalKey<Schema.$Array<Schema.String>>;
933
+ readonly grant: Schema.optionalKey<Schema.Literal<"authorization_code">>;
934
+ readonly authorizationParams: Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>;
935
+ readonly tokenEndpointAuthMethod: Schema.optionalKey<Schema.Literals<readonly ["none", "client_secret_post", "client_secret_basic", "client_secret_basic_raw"]>>;
936
+ readonly resource: Schema.optionalKey<Schema.NullOr<Schema.String>>;
937
+ readonly type: Schema.Literal<"oauth2">;
938
+ }>, Schema.Struct<{
939
+ readonly response: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
940
+ readonly authorizationUrl: Schema.String;
941
+ readonly tokenUrl: Schema.String;
942
+ readonly revocationUrl: Schema.optionalKey<Schema.String>;
943
+ readonly scopes: Schema.$Array<Schema.String>;
944
+ readonly issuer: Schema.optionalKey<Schema.String>;
945
+ readonly discover: Schema.optionalKey<Schema.Never>;
946
+ readonly grant: Schema.optionalKey<Schema.Literal<"authorization_code">>;
947
+ readonly authorizationParams: Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>;
948
+ readonly tokenEndpointAuthMethod: Schema.optionalKey<Schema.Literals<readonly ["none", "client_secret_post", "client_secret_basic", "client_secret_basic_raw"]>>;
949
+ readonly resource: Schema.optionalKey<Schema.NullOr<Schema.String>>;
950
+ readonly type: Schema.Literal<"oauth2">;
951
+ }>, Schema.Struct<{
952
+ readonly response: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
953
+ readonly grant: Schema.Literal<"client_credentials">;
954
+ readonly discover: Schema.String;
955
+ readonly authorizationUrl: Schema.optionalKey<Schema.Never>;
956
+ readonly tokenUrl: Schema.optionalKey<Schema.Never>;
957
+ readonly revocationUrl: Schema.optionalKey<Schema.Never>;
958
+ readonly scopes: Schema.optionalKey<Schema.$Array<Schema.String>>;
959
+ readonly tokenEndpointAuthMethod: Schema.Literals<readonly ["client_secret_post", "client_secret_basic", "client_secret_basic_raw"]>;
960
+ readonly resource: Schema.optionalKey<Schema.NullOr<Schema.String>>;
961
+ readonly type: Schema.Literal<"oauth2">;
962
+ }>, Schema.Struct<{
963
+ readonly response: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
964
+ readonly grant: Schema.Literal<"client_credentials">;
965
+ readonly tokenUrl: Schema.String;
966
+ readonly revocationUrl: Schema.optionalKey<Schema.String>;
967
+ readonly scopes: Schema.$Array<Schema.String>;
968
+ readonly tokenEndpointAuthMethod: Schema.Literals<readonly ["client_secret_post", "client_secret_basic", "client_secret_basic_raw"]>;
969
+ readonly resource: Schema.optionalKey<Schema.NullOr<Schema.String>>;
970
+ readonly authorizationUrl: Schema.optionalKey<Schema.Never>;
971
+ readonly discover: Schema.optionalKey<Schema.Never>;
972
+ readonly type: Schema.Literal<"oauth2">;
973
+ }>]>>;
974
+ }>;
975
+ readonly cardinality: Schema.Literals<readonly ["one", "many"]>;
976
+ }>>;
977
+ }>;
978
+ readonly catalog: Schema.Struct<{
979
+ readonly tools: Schema.$Array<Schema.Struct<{
980
+ readonly schedules: Schema.optionalKey<Schema.$Array<Schema.Struct<{
981
+ readonly name: Schema.NonEmptyString;
982
+ readonly timing: Schema.Union<readonly [Schema.Struct<{
983
+ readonly kind: Schema.Literal<"interval">;
984
+ readonly milliseconds: Schema.Int;
985
+ }>, Schema.Struct<{
986
+ readonly kind: Schema.Literal<"cron">;
987
+ readonly calendar: Schema.Struct<{
988
+ readonly expression: Schema.NonEmptyString;
989
+ readonly timezone: Schema.NonEmptyString;
990
+ }>;
991
+ }>]>;
992
+ readonly input: Schema.Codec<Schema.Json, Schema.Json, never, never>;
993
+ }>>>;
994
+ readonly name: Schema.NonEmptyString;
995
+ readonly router: Schema.optionalKey<Schema.NonEmptyString>;
996
+ readonly tags: Schema.optionalKey<Schema.$Array<Schema.NonEmptyString>>;
997
+ readonly description: Schema.String;
998
+ readonly inputSchema: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
999
+ readonly readOnly: Schema.optionalKey<Schema.Boolean>;
1000
+ readonly title: Schema.optionalKey<Schema.String>;
1001
+ readonly outputSchema: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
1002
+ readonly annotations: Schema.optionalKey<Schema.Struct<{
1003
+ readonly title: Schema.optionalKey<Schema.String>;
1004
+ readonly readOnlyHint: Schema.optionalKey<Schema.Boolean>;
1005
+ readonly destructiveHint: Schema.optionalKey<Schema.Boolean>;
1006
+ readonly idempotentHint: Schema.optionalKey<Schema.Boolean>;
1007
+ readonly openWorldHint: Schema.optionalKey<Schema.Boolean>;
1008
+ }>>;
1009
+ readonly _meta: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
1010
+ }>>;
1011
+ readonly routers: Schema.$Array<Schema.Struct<{
1012
+ readonly path: Schema.String;
1013
+ readonly title: Schema.optionalKey<Schema.String>;
1014
+ readonly description: Schema.optionalKey<Schema.String>;
1015
+ readonly icons: Schema.optionalKey<Schema.$Array<Schema.Struct<{
1016
+ readonly src: Schema.NonEmptyString;
1017
+ readonly mimeType: Schema.optionalKey<Schema.String>;
1018
+ readonly sizes: Schema.optionalKey<Schema.$Array<Schema.String>>;
1019
+ readonly theme: Schema.optionalKey<Schema.Literals<readonly ["light", "dark"]>>;
1020
+ }>>>;
1021
+ readonly tags: Schema.optionalKey<Schema.$Record<Schema.NonEmptyString, Schema.String>>;
1022
+ readonly skill: Schema.optionalKey<Schema.NonEmptyString>;
1023
+ readonly error: Schema.optionalKey<Schema.Union<readonly [typeof ProviderError, typeof McpError, typeof SkillLoadFailed, typeof HostDeclarationInvalid, typeof HostEvaluationFailed]>>;
1024
+ }>>;
1025
+ }>;
1026
+ readonly catalogSummary: Schema.Struct<{
1027
+ readonly tools: Schema.$Array<Schema.Struct<{
1028
+ readonly schedules: Schema.optionalKey<Schema.$Array<Schema.Struct<{
1029
+ readonly name: Schema.NonEmptyString;
1030
+ readonly timing: Schema.Union<readonly [Schema.Struct<{
1031
+ readonly kind: Schema.Literal<"interval">;
1032
+ readonly milliseconds: Schema.Int;
1033
+ }>, Schema.Struct<{
1034
+ readonly kind: Schema.Literal<"cron">;
1035
+ readonly calendar: Schema.Struct<{
1036
+ readonly expression: Schema.NonEmptyString;
1037
+ readonly timezone: Schema.NonEmptyString;
1038
+ }>;
1039
+ }>]>;
1040
+ readonly input: Schema.Codec<Schema.Json, Schema.Json, never, never>;
1041
+ }>>>;
1042
+ readonly name: Schema.NonEmptyString;
1043
+ readonly router: Schema.optionalKey<Schema.NonEmptyString>;
1044
+ readonly tags: Schema.optionalKey<Schema.$Array<Schema.NonEmptyString>>;
1045
+ readonly description: Schema.String;
1046
+ readonly readOnly: Schema.optionalKey<Schema.Boolean>;
1047
+ readonly title: Schema.optionalKey<Schema.String>;
1048
+ readonly annotations: Schema.optionalKey<Schema.Struct<{
1049
+ readonly title: Schema.optionalKey<Schema.String>;
1050
+ readonly readOnlyHint: Schema.optionalKey<Schema.Boolean>;
1051
+ readonly destructiveHint: Schema.optionalKey<Schema.Boolean>;
1052
+ readonly idempotentHint: Schema.optionalKey<Schema.Boolean>;
1053
+ readonly openWorldHint: Schema.optionalKey<Schema.Boolean>;
1054
+ }>>;
1055
+ }>>;
1056
+ readonly routers: Schema.$Array<Schema.Struct<{
1057
+ readonly path: Schema.String;
1058
+ readonly title: Schema.optionalKey<Schema.String>;
1059
+ readonly description: Schema.optionalKey<Schema.String>;
1060
+ readonly icons: Schema.optionalKey<Schema.$Array<Schema.Struct<{
1061
+ readonly src: Schema.NonEmptyString;
1062
+ readonly mimeType: Schema.optionalKey<Schema.String>;
1063
+ readonly sizes: Schema.optionalKey<Schema.$Array<Schema.String>>;
1064
+ readonly theme: Schema.optionalKey<Schema.Literals<readonly ["light", "dark"]>>;
1065
+ }>>>;
1066
+ readonly tags: Schema.optionalKey<Schema.$Record<Schema.NonEmptyString, Schema.String>>;
1067
+ readonly skill: Schema.optionalKey<Schema.NonEmptyString>;
1068
+ readonly error: Schema.optionalKey<Schema.Union<readonly [typeof ProviderError, typeof McpError, typeof SkillLoadFailed, typeof HostDeclarationInvalid, typeof HostEvaluationFailed]>>;
1069
+ }>>;
1070
+ }>;
1071
+ readonly skills: Schema.Union<readonly [Schema.Struct<{
1072
+ readonly skills: Schema.$Array<Schema.Struct<{
1073
+ readonly files: Schema.$Array<Schema.Struct<{
1074
+ readonly path: Schema.NonEmptyString;
1075
+ readonly content: Schema.String;
1076
+ }>>;
1077
+ readonly name: Schema.NonEmptyString;
1078
+ readonly description: Schema.String;
1079
+ readonly license: Schema.optionalKey<Schema.String>;
1080
+ readonly compatibility: Schema.optionalKey<Schema.String>;
1081
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>;
1082
+ readonly "allowed-tools": Schema.optionalKey<Schema.String>;
1083
+ }>>;
1084
+ readonly dynamic: Schema.Boolean;
1085
+ readonly cached: Schema.optionalKey<Schema.Boolean>;
1086
+ }>, Schema.$Array<Schema.Struct<{
1087
+ readonly files: Schema.$Array<Schema.Struct<{
1088
+ readonly path: Schema.NonEmptyString;
1089
+ readonly content: Schema.String;
1090
+ }>>;
1091
+ readonly name: Schema.NonEmptyString;
1092
+ readonly description: Schema.String;
1093
+ readonly license: Schema.optionalKey<Schema.String>;
1094
+ readonly compatibility: Schema.optionalKey<Schema.String>;
1095
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>;
1096
+ readonly "allowed-tools": Schema.optionalKey<Schema.String>;
1097
+ }>>]>;
1098
+ readonly elicitationRequest: Schema.Struct<{
1099
+ readonly mode: Schema.Literal<"form">;
1100
+ readonly requestedSchema: Schema.toEncoded<Schema.Struct<{
1101
+ readonly $schema: Schema.decodeTo<Schema.optional<Schema.String>, Schema.optionalKey<Schema.String>, never, never>;
1102
+ readonly type: Schema.tag<"object">;
1103
+ readonly properties: Schema.$Record<Schema.String, Schema.Union<readonly [Schema.Union<readonly [typeof import("effect/unstable/ai/McpSchema").LegacyTitledEnum, Schema.Union<readonly [typeof import("effect/unstable/ai/McpSchema").UntitledSingleSelectEnum, typeof import("effect/unstable/ai/McpSchema").TitledSingleSelectEnum]>, Schema.Union<readonly [typeof import("effect/unstable/ai/McpSchema").UntitledMultiSelectEnum, typeof import("effect/unstable/ai/McpSchema").TitledMultiSelectEnum]>]>, typeof import("effect/unstable/ai/McpSchema").ElicitationString, typeof import("effect/unstable/ai/McpSchema").ElicitationNumber, typeof import("effect/unstable/ai/McpSchema").ElicitationBoolean]>>;
1104
+ readonly required: Schema.decodeTo<Schema.optional<Schema.$Array<Schema.String>>, Schema.optionalKey<Schema.$Array<Schema.String>>, never, never>;
1105
+ }>>;
1106
+ readonly _meta: Schema.optional<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
1107
+ readonly message: Schema.String;
1108
+ }>;
1109
+ readonly elicitationReply: Schema.Union<readonly [Schema.Struct<{
1110
+ readonly ok: Schema.Literal<true>;
1111
+ readonly response: Schema.Union<readonly [Schema.Struct<{
1112
+ readonly _meta: Schema.optional<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
1113
+ readonly action: Schema.Literal<"accept">;
1114
+ readonly content: Schema.decodeTo<Schema.optional<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.$Array<Schema.String>]>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.$Array<Schema.String>]>>>, never, never>;
1115
+ }>, Schema.Struct<{
1116
+ readonly _meta: Schema.optional<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
1117
+ readonly action: Schema.Literals<readonly ["cancel", "decline"]>;
1118
+ }>]>;
1119
+ }>, Schema.Struct<{
1120
+ readonly ok: Schema.Literal<false>;
1121
+ readonly error: typeof import("../elicitation.js").ElicitationFailed;
1122
+ }>]>;
1123
+ readonly workflowStep: Schema.Union<readonly [Schema.Struct<{
1124
+ readonly operation: Schema.Literal<"do">;
1125
+ readonly name: Schema.NonEmptyString;
1126
+ readonly options: Schema.Struct<{
1127
+ readonly retries: Schema.optionalKey<Schema.Struct<{
1128
+ readonly limit: Schema.Int;
1129
+ readonly delay: Schema.Union<readonly [Schema.Finite, Schema.NonEmptyString]>;
1130
+ readonly backoff: Schema.optionalKey<Schema.Literals<readonly ["constant", "linear", "exponential"]>>;
1131
+ }>>;
1132
+ readonly timeout: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.NonEmptyString]>>;
1133
+ }>;
1134
+ }>, Schema.Struct<{
1135
+ readonly operation: Schema.Literal<"sleep">;
1136
+ readonly name: Schema.NonEmptyString;
1137
+ readonly duration: Schema.Union<readonly [Schema.Finite, Schema.NonEmptyString]>;
1138
+ }>, Schema.Struct<{
1139
+ readonly operation: Schema.Literal<"until">;
1140
+ readonly name: Schema.NonEmptyString;
1141
+ readonly timestamp: Schema.Finite;
1142
+ }>, Schema.Struct<{
1143
+ readonly operation: Schema.Literal<"context">;
1144
+ }>, Schema.Struct<{
1145
+ readonly operation: Schema.Literal<"invoke">;
1146
+ readonly kind: Schema.Literals<readonly ["query", "mutation"]>;
1147
+ readonly name: Schema.NonEmptyString;
1148
+ readonly input: Schema.Codec<Schema.Json, Schema.Json, never, never>;
1149
+ readonly stepId: Schema.NonEmptyString;
1150
+ readonly timeout: Schema.Finite;
1151
+ }>]>;
1152
+ readonly workflowStepReply: Schema.Union<readonly [Schema.Struct<{
1153
+ readonly ok: Schema.Literal<true>;
1154
+ readonly value: Schema.Codec<Schema.Json, Schema.Json, never, never>;
1155
+ }>, Schema.Struct<{
1156
+ readonly ok: Schema.Literal<false>;
1157
+ readonly error: typeof import("../workflows.js").WorkflowFailure;
1158
+ }>]>;
1159
+ readonly workflowControl: Schema.Union<readonly [Schema.Struct<{
1160
+ readonly operation: Schema.Literal<"start">;
1161
+ readonly workflow: Schema.NonEmptyString;
1162
+ readonly input: Schema.Codec<Schema.Json, Schema.Json, never, never>;
1163
+ readonly key: Schema.optionalKey<Schema.NonEmptyString>;
1164
+ }>, Schema.Struct<{
1165
+ readonly operation: Schema.Literal<"get">;
1166
+ readonly run: Schema.brand<Schema.NonEmptyString, "wfr">;
1167
+ }>, Schema.Struct<{
1168
+ readonly operation: Schema.Literal<"list">;
1169
+ readonly workflow: Schema.optionalKey<Schema.NonEmptyString>;
1170
+ readonly cursor: Schema.optionalKey<Schema.brand<Schema.NonEmptyString, "wfr">>;
1171
+ readonly limit: Schema.optionalKey<Schema.Int>;
1172
+ }>, Schema.Struct<{
1173
+ readonly operation: Schema.Literal<"terminate">;
1174
+ readonly run: Schema.brand<Schema.NonEmptyString, "wfr">;
1175
+ }>]>;
1176
+ readonly cacheCommand: Schema.Union<readonly [Schema.Struct<{
1177
+ readonly operation: Schema.Literal<"read">;
1178
+ readonly keys: Schema.$Array<Schema.String>;
1179
+ }>, Schema.Struct<{
1180
+ readonly operation: Schema.Literal<"acquire">;
1181
+ readonly key: Schema.String;
1182
+ readonly refresh: Schema.Boolean;
1183
+ readonly version: Schema.optionalKey<Schema.NullOr<Schema.String>>;
1184
+ }>, Schema.Struct<{
1185
+ readonly operation: Schema.Literal<"claim">;
1186
+ readonly key: Schema.String;
1187
+ readonly version: Schema.NullOr<Schema.String>;
1188
+ }>, Schema.Struct<{
1189
+ readonly operation: Schema.Literal<"publish">;
1190
+ readonly key: Schema.String;
1191
+ readonly lease: Schema.String;
1192
+ readonly entry: Schema.Struct<{
1193
+ readonly value: Schema.Codec<Schema.Json, Schema.Json, never, never>;
1194
+ readonly version: Schema.String;
1195
+ readonly freshUntil: Schema.Finite;
1196
+ readonly staleUntil: Schema.Finite;
1197
+ }>;
1198
+ }>, Schema.Struct<{
1199
+ readonly operation: Schema.Literal<"release">;
1200
+ readonly key: Schema.String;
1201
+ readonly lease: Schema.String;
1202
+ }>, Schema.Struct<{
1203
+ readonly operation: Schema.Literal<"renew">;
1204
+ readonly key: Schema.String;
1205
+ readonly lease: Schema.String;
1206
+ }>, Schema.Struct<{
1207
+ readonly operation: Schema.Literal<"write">;
1208
+ readonly entries: Schema.$Array<Schema.Struct<{
1209
+ readonly key: Schema.String;
1210
+ readonly entry: Schema.Struct<{
1211
+ readonly value: Schema.Codec<Schema.Json, Schema.Json, never, never>;
1212
+ readonly version: Schema.String;
1213
+ readonly freshUntil: Schema.Finite;
1214
+ readonly staleUntil: Schema.Finite;
1215
+ }>;
1216
+ }>>;
1217
+ }>, Schema.Struct<{
1218
+ readonly operation: Schema.Literal<"invalidate">;
1219
+ readonly key: Schema.String;
1220
+ }>]>;
1221
+ readonly cacheReply: Schema.Union<readonly [Schema.Struct<{
1222
+ readonly ok: Schema.Literal<true>;
1223
+ readonly value: Schema.Codec<Schema.Json, Schema.Json, never, never>;
1224
+ }>, Schema.Struct<{
1225
+ readonly ok: Schema.Literal<false>;
1226
+ readonly error: typeof import("../../../../app-cache/src/index.js").CacheError;
1227
+ }>]>;
1228
+ };
1229
+ };