apps 0.0.1-beta.1 → 0.0.1-beta.2

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 (47) hide show
  1. package/framework-reference.json +1 -1
  2. package/js/browser-XIPJGLH2.js +65 -0
  3. package/js/{chunk-6YBRWRK3.js → chunk-5MQZEB6Y.js} +16 -4
  4. package/js/chunk-D47C7KG5.js +172 -0
  5. package/js/{chunk-ZTFQHGEB.js → chunk-FDNTX5QJ.js} +1 -3
  6. package/js/{chunk-G7IE6BKC.js → chunk-HDTGZWP2.js} +2 -2
  7. package/js/{chunk-KOXMLKTM.js → chunk-J7O55ZV7.js} +20 -148
  8. package/js/{chunk-RBAC33PQ.js → chunk-JN55AYQH.js} +3 -57
  9. package/js/chunk-LGIYBDWA.js +85 -0
  10. package/js/{chunk-IHQ4ML7K.js → chunk-MYYEW3RA.js} +130 -86
  11. package/js/{chunk-PZ36XMXW.js → chunk-PYUYJRSK.js} +1 -1
  12. package/js/{chunk-X7SFGU4Q.js → chunk-RN2MXB4R.js} +4 -4
  13. package/js/{chunk-NCYXZN2G.js → chunk-UVL56Z6E.js} +390 -23
  14. package/js/{chunk-2HHMABB6.js → chunk-WFSQXYUT.js} +46 -10
  15. package/js/{chunk-6IIO4NPI.js → chunk-Z5NMEGJN.js} +1 -1
  16. package/js/client.js +1 -1
  17. package/js/contracts.js +8 -1
  18. package/js/effect.js +8 -7
  19. package/js/es-APDZKREY.js +40968 -0
  20. package/js/graphql.js +10 -9
  21. package/js/host.js +12 -11
  22. package/js/index.js +7 -5
  23. package/js/mcp/effect.js +10 -9
  24. package/js/mcp/stdio.js +10 -9
  25. package/js/mcp.js +12 -11
  26. package/js/openapi.js +776 -41590
  27. package/js/skills/effect.js +1 -2
  28. package/js/skills.js +47 -10
  29. package/package.json +1 -1
  30. package/runtime.json +1 -1
  31. package/types/app-cache/src/contracts/cache.d.ts +42 -2
  32. package/types/app-cache/src/index.d.ts +59 -1
  33. package/types/apps/src/contracts/cache.d.ts +4 -1
  34. package/types/apps/src/contracts/host.d.ts +8 -672
  35. package/types/apps/src/contracts/openapi.d.ts +6 -0
  36. package/types/apps/src/contracts/protocol-version.d.ts +6 -0
  37. package/types/apps/src/contracts/protocols/1.d.ts +1575 -0
  38. package/types/apps/src/contracts/skills.d.ts +17 -8
  39. package/types/apps/src/implementation/cache.d.ts +3 -1
  40. package/types/apps/src/implementation/openapi-compile.d.ts +1 -1
  41. package/types/apps/src/implementation/openapi-document.d.ts +0 -2
  42. package/types/apps/src/implementation/openapi-names.d.ts +18 -0
  43. package/types/apps/src/implementation/openapi-request.d.ts +0 -1
  44. package/types/apps/src/implementation/openapi-source.d.ts +5 -1
  45. package/types/apps/src/implementation/schema.d.ts +0 -5
  46. package/types/apps/src/implementation/swagger-client.d.ts +28 -0
  47. package/types/apps/src/skills.d.ts +6 -3
@@ -19,397 +19,16 @@ export { McpClientLimits, defaultMcpClientLimits } from "./mcp.js";
19
19
  export * from "./webhook-protocol.js";
20
20
  export { AccountId, HttpUrl } from "./schema.js";
21
21
  export { OAuthClientAuth, OAuthSecretClientAuth } from "./provider.js";
22
- /** Serializable auth methods shared with SDK hosts; protocol configuration has one schema. */
23
- export declare const DeclaredAuthMethod: Schema.Union<readonly [Schema.Struct<{
24
- readonly type: Schema.Literal<"secrets">;
25
- readonly label: Schema.String;
26
- readonly fields: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
27
- }>, Schema.Struct<{
28
- readonly response: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
29
- readonly discover: Schema.String;
30
- readonly authorizationUrl: Schema.optionalKey<Schema.Never>;
31
- readonly tokenUrl: Schema.optionalKey<Schema.Never>;
32
- readonly revocationUrl: Schema.optionalKey<Schema.Never>;
33
- readonly scopes: Schema.optionalKey<Schema.$Array<Schema.String>>;
34
- readonly grant: Schema.optionalKey<Schema.Literal<"authorization_code">>;
35
- readonly authorizationParams: Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>;
36
- readonly tokenEndpointAuthMethod: Schema.optionalKey<Schema.Literals<readonly ["none", "client_secret_post", "client_secret_basic", "client_secret_basic_raw"]>>;
37
- readonly resource: Schema.optionalKey<Schema.NullOr<Schema.String>>;
38
- readonly type: Schema.Literal<"oauth2">;
39
- }>, Schema.Struct<{
40
- readonly response: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
41
- readonly authorizationUrl: Schema.String;
42
- readonly tokenUrl: Schema.String;
43
- readonly revocationUrl: Schema.optionalKey<Schema.String>;
44
- readonly scopes: Schema.$Array<Schema.String>;
45
- readonly issuer: Schema.optionalKey<Schema.String>;
46
- readonly discover: Schema.optionalKey<Schema.Never>;
47
- readonly grant: Schema.optionalKey<Schema.Literal<"authorization_code">>;
48
- readonly authorizationParams: Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>;
49
- readonly tokenEndpointAuthMethod: Schema.optionalKey<Schema.Literals<readonly ["none", "client_secret_post", "client_secret_basic", "client_secret_basic_raw"]>>;
50
- readonly resource: Schema.optionalKey<Schema.NullOr<Schema.String>>;
51
- readonly type: Schema.Literal<"oauth2">;
52
- }>, Schema.Struct<{
53
- readonly response: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
54
- readonly grant: Schema.Literal<"client_credentials">;
55
- readonly discover: Schema.String;
56
- readonly authorizationUrl: Schema.optionalKey<Schema.Never>;
57
- readonly tokenUrl: Schema.optionalKey<Schema.Never>;
58
- readonly revocationUrl: Schema.optionalKey<Schema.Never>;
59
- readonly scopes: Schema.optionalKey<Schema.$Array<Schema.String>>;
60
- readonly tokenEndpointAuthMethod: Schema.Literals<readonly ["client_secret_post", "client_secret_basic", "client_secret_basic_raw"]>;
61
- readonly resource: Schema.optionalKey<Schema.NullOr<Schema.String>>;
62
- readonly type: Schema.Literal<"oauth2">;
63
- }>, Schema.Struct<{
64
- readonly response: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
65
- readonly grant: Schema.Literal<"client_credentials">;
66
- readonly tokenUrl: Schema.String;
67
- readonly revocationUrl: Schema.optionalKey<Schema.String>;
68
- readonly scopes: Schema.$Array<Schema.String>;
69
- readonly tokenEndpointAuthMethod: Schema.Literals<readonly ["client_secret_post", "client_secret_basic", "client_secret_basic_raw"]>;
70
- readonly resource: Schema.optionalKey<Schema.NullOr<Schema.String>>;
71
- readonly authorizationUrl: Schema.optionalKey<Schema.Never>;
72
- readonly discover: Schema.optionalKey<Schema.Never>;
73
- readonly type: Schema.Literal<"oauth2">;
74
- }>]>;
75
- /** Serializable declaration of a provider's named authentication methods. */
76
- export declare const DeclaredProvider: Schema.Struct<{
77
- readonly name: Schema.NonEmptyString;
78
- readonly auth: Schema.$Record<Schema.NonEmptyString, Schema.Union<readonly [Schema.Struct<{
79
- readonly type: Schema.Literal<"secrets">;
80
- readonly label: Schema.String;
81
- readonly fields: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
82
- }>, Schema.Struct<{
83
- readonly response: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
84
- readonly discover: Schema.String;
85
- readonly authorizationUrl: Schema.optionalKey<Schema.Never>;
86
- readonly tokenUrl: Schema.optionalKey<Schema.Never>;
87
- readonly revocationUrl: Schema.optionalKey<Schema.Never>;
88
- readonly scopes: Schema.optionalKey<Schema.$Array<Schema.String>>;
89
- readonly grant: Schema.optionalKey<Schema.Literal<"authorization_code">>;
90
- readonly authorizationParams: Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>;
91
- readonly tokenEndpointAuthMethod: Schema.optionalKey<Schema.Literals<readonly ["none", "client_secret_post", "client_secret_basic", "client_secret_basic_raw"]>>;
92
- readonly resource: Schema.optionalKey<Schema.NullOr<Schema.String>>;
93
- readonly type: Schema.Literal<"oauth2">;
94
- }>, Schema.Struct<{
95
- readonly response: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
96
- readonly authorizationUrl: Schema.String;
97
- readonly tokenUrl: Schema.String;
98
- readonly revocationUrl: Schema.optionalKey<Schema.String>;
99
- readonly scopes: Schema.$Array<Schema.String>;
100
- readonly issuer: Schema.optionalKey<Schema.String>;
101
- readonly discover: Schema.optionalKey<Schema.Never>;
102
- readonly grant: Schema.optionalKey<Schema.Literal<"authorization_code">>;
103
- readonly authorizationParams: Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>;
104
- readonly tokenEndpointAuthMethod: Schema.optionalKey<Schema.Literals<readonly ["none", "client_secret_post", "client_secret_basic", "client_secret_basic_raw"]>>;
105
- readonly resource: Schema.optionalKey<Schema.NullOr<Schema.String>>;
106
- readonly type: Schema.Literal<"oauth2">;
107
- }>, Schema.Struct<{
108
- readonly response: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
109
- readonly grant: Schema.Literal<"client_credentials">;
110
- readonly discover: Schema.String;
111
- readonly authorizationUrl: Schema.optionalKey<Schema.Never>;
112
- readonly tokenUrl: Schema.optionalKey<Schema.Never>;
113
- readonly revocationUrl: Schema.optionalKey<Schema.Never>;
114
- readonly scopes: Schema.optionalKey<Schema.$Array<Schema.String>>;
115
- readonly tokenEndpointAuthMethod: Schema.Literals<readonly ["client_secret_post", "client_secret_basic", "client_secret_basic_raw"]>;
116
- readonly resource: Schema.optionalKey<Schema.NullOr<Schema.String>>;
117
- readonly type: Schema.Literal<"oauth2">;
118
- }>, Schema.Struct<{
119
- readonly response: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
120
- readonly grant: Schema.Literal<"client_credentials">;
121
- readonly tokenUrl: Schema.String;
122
- readonly revocationUrl: Schema.optionalKey<Schema.String>;
123
- readonly scopes: Schema.$Array<Schema.String>;
124
- readonly tokenEndpointAuthMethod: Schema.Literals<readonly ["client_secret_post", "client_secret_basic", "client_secret_basic_raw"]>;
125
- readonly resource: Schema.optionalKey<Schema.NullOr<Schema.String>>;
126
- readonly authorizationUrl: Schema.optionalKey<Schema.Never>;
127
- readonly discover: Schema.optionalKey<Schema.Never>;
128
- readonly type: Schema.Literal<"oauth2">;
129
- }>]>>;
130
- }>;
131
- /** Credential-free provider declaration; content matching remains host policy. */
132
- export type DeclaredProvider = typeof DeclaredProvider.Type;
133
- /** Account slots available without binding accounts or evaluating the app factory. */
134
- export declare const DeclaredRequirements: Schema.Struct<{
135
- /** Protocol support of this retained framework build, not an author-declared requirement. */
136
- readonly capabilities: Schema.optionalKey<Schema.Struct<{
137
- readonly skills: Schema.Literal<true>;
138
- /** Accepts inspect detail and tools. Earlier builds reject both as excess fields. */
139
- readonly toolIndex: Schema.optionalKey<Schema.Literal<true>>;
140
- /** Accepts skills sources and reports whether the catalog includes a live loader. */
141
- readonly skillSources: Schema.optionalKey<Schema.Literal<true>>;
142
- /** Accepts scheduled inspection. Earlier builds reject it as an excess field. */
143
- readonly scheduledTools: Schema.optionalKey<Schema.Literal<true>>;
144
- }>>;
145
- readonly database: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Struct<{
146
- readonly fields: Schema.$Record<Schema.String, Schema.Struct<{
147
- readonly kind: Schema.Literals<readonly ["string", "number", "boolean", "id", "userId"]>;
148
- readonly optional: Schema.optional<Schema.Boolean>;
149
- readonly default: Schema.optional<Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean]>>;
150
- readonly references: Schema.optional<Schema.String>;
151
- }>>;
152
- readonly indexes: Schema.$Array<Schema.Struct<{
153
- readonly name: Schema.String;
154
- readonly fields: Schema.NonEmptyArray<Schema.String>;
155
- }>>;
156
- }>>>;
157
- readonly accounts: Schema.$Record<Schema.NonEmptyString, Schema.Struct<{
158
- readonly definition: Schema.Struct<{
159
- readonly name: Schema.NonEmptyString;
160
- readonly auth: Schema.$Record<Schema.NonEmptyString, Schema.Union<readonly [Schema.Struct<{
161
- readonly type: Schema.Literal<"secrets">;
162
- readonly label: Schema.String;
163
- readonly fields: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
164
- }>, Schema.Struct<{
165
- readonly response: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
166
- readonly discover: Schema.String;
167
- readonly authorizationUrl: Schema.optionalKey<Schema.Never>;
168
- readonly tokenUrl: Schema.optionalKey<Schema.Never>;
169
- readonly revocationUrl: Schema.optionalKey<Schema.Never>;
170
- readonly scopes: Schema.optionalKey<Schema.$Array<Schema.String>>;
171
- readonly grant: Schema.optionalKey<Schema.Literal<"authorization_code">>;
172
- readonly authorizationParams: Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>;
173
- readonly tokenEndpointAuthMethod: Schema.optionalKey<Schema.Literals<readonly ["none", "client_secret_post", "client_secret_basic", "client_secret_basic_raw"]>>;
174
- readonly resource: Schema.optionalKey<Schema.NullOr<Schema.String>>;
175
- readonly type: Schema.Literal<"oauth2">;
176
- }>, Schema.Struct<{
177
- readonly response: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
178
- readonly authorizationUrl: Schema.String;
179
- readonly tokenUrl: Schema.String;
180
- readonly revocationUrl: Schema.optionalKey<Schema.String>;
181
- readonly scopes: Schema.$Array<Schema.String>;
182
- readonly issuer: Schema.optionalKey<Schema.String>;
183
- readonly discover: Schema.optionalKey<Schema.Never>;
184
- readonly grant: Schema.optionalKey<Schema.Literal<"authorization_code">>;
185
- readonly authorizationParams: Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>;
186
- readonly tokenEndpointAuthMethod: Schema.optionalKey<Schema.Literals<readonly ["none", "client_secret_post", "client_secret_basic", "client_secret_basic_raw"]>>;
187
- readonly resource: Schema.optionalKey<Schema.NullOr<Schema.String>>;
188
- readonly type: Schema.Literal<"oauth2">;
189
- }>, Schema.Struct<{
190
- readonly response: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
191
- readonly grant: Schema.Literal<"client_credentials">;
192
- readonly discover: Schema.String;
193
- readonly authorizationUrl: Schema.optionalKey<Schema.Never>;
194
- readonly tokenUrl: Schema.optionalKey<Schema.Never>;
195
- readonly revocationUrl: Schema.optionalKey<Schema.Never>;
196
- readonly scopes: Schema.optionalKey<Schema.$Array<Schema.String>>;
197
- readonly tokenEndpointAuthMethod: Schema.Literals<readonly ["client_secret_post", "client_secret_basic", "client_secret_basic_raw"]>;
198
- readonly resource: Schema.optionalKey<Schema.NullOr<Schema.String>>;
199
- readonly type: Schema.Literal<"oauth2">;
200
- }>, Schema.Struct<{
201
- readonly response: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
202
- readonly grant: Schema.Literal<"client_credentials">;
203
- readonly tokenUrl: Schema.String;
204
- readonly revocationUrl: Schema.optionalKey<Schema.String>;
205
- readonly scopes: Schema.$Array<Schema.String>;
206
- readonly tokenEndpointAuthMethod: Schema.Literals<readonly ["client_secret_post", "client_secret_basic", "client_secret_basic_raw"]>;
207
- readonly resource: Schema.optionalKey<Schema.NullOr<Schema.String>>;
208
- readonly authorizationUrl: Schema.optionalKey<Schema.Never>;
209
- readonly discover: Schema.optionalKey<Schema.Never>;
210
- readonly type: Schema.Literal<"oauth2">;
211
- }>]>>;
212
- }>;
213
- readonly cardinality: Schema.Literals<readonly ["one", "many"]>;
214
- }>>;
215
- }>;
216
- /** Parsed declared account requirements. */
217
- export type DeclaredRequirements = typeof DeclaredRequirements.Type;
218
- /** Host-resolved credentials for one stable saved account. Never a request DTO. */
219
- export declare const ResolvedAccount: Schema.Struct<{
220
- readonly id: Schema.brand<Schema.String, "acc">;
221
- readonly provider: Schema.Struct<{
222
- readonly name: Schema.NonEmptyString;
223
- readonly auth: Schema.$Record<Schema.NonEmptyString, Schema.Union<readonly [Schema.Struct<{
224
- readonly type: Schema.Literal<"secrets">;
225
- readonly label: Schema.String;
226
- readonly fields: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
227
- }>, Schema.Struct<{
228
- readonly response: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
229
- readonly discover: Schema.String;
230
- readonly authorizationUrl: Schema.optionalKey<Schema.Never>;
231
- readonly tokenUrl: Schema.optionalKey<Schema.Never>;
232
- readonly revocationUrl: Schema.optionalKey<Schema.Never>;
233
- readonly scopes: Schema.optionalKey<Schema.$Array<Schema.String>>;
234
- readonly grant: Schema.optionalKey<Schema.Literal<"authorization_code">>;
235
- readonly authorizationParams: Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>;
236
- readonly tokenEndpointAuthMethod: Schema.optionalKey<Schema.Literals<readonly ["none", "client_secret_post", "client_secret_basic", "client_secret_basic_raw"]>>;
237
- readonly resource: Schema.optionalKey<Schema.NullOr<Schema.String>>;
238
- readonly type: Schema.Literal<"oauth2">;
239
- }>, Schema.Struct<{
240
- readonly response: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
241
- readonly authorizationUrl: Schema.String;
242
- readonly tokenUrl: Schema.String;
243
- readonly revocationUrl: Schema.optionalKey<Schema.String>;
244
- readonly scopes: Schema.$Array<Schema.String>;
245
- readonly issuer: Schema.optionalKey<Schema.String>;
246
- readonly discover: Schema.optionalKey<Schema.Never>;
247
- readonly grant: Schema.optionalKey<Schema.Literal<"authorization_code">>;
248
- readonly authorizationParams: Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>;
249
- readonly tokenEndpointAuthMethod: Schema.optionalKey<Schema.Literals<readonly ["none", "client_secret_post", "client_secret_basic", "client_secret_basic_raw"]>>;
250
- readonly resource: Schema.optionalKey<Schema.NullOr<Schema.String>>;
251
- readonly type: Schema.Literal<"oauth2">;
252
- }>, Schema.Struct<{
253
- readonly response: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
254
- readonly grant: Schema.Literal<"client_credentials">;
255
- readonly discover: Schema.String;
256
- readonly authorizationUrl: Schema.optionalKey<Schema.Never>;
257
- readonly tokenUrl: Schema.optionalKey<Schema.Never>;
258
- readonly revocationUrl: Schema.optionalKey<Schema.Never>;
259
- readonly scopes: Schema.optionalKey<Schema.$Array<Schema.String>>;
260
- readonly tokenEndpointAuthMethod: Schema.Literals<readonly ["client_secret_post", "client_secret_basic", "client_secret_basic_raw"]>;
261
- readonly resource: Schema.optionalKey<Schema.NullOr<Schema.String>>;
262
- readonly type: Schema.Literal<"oauth2">;
263
- }>, Schema.Struct<{
264
- readonly response: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
265
- readonly grant: Schema.Literal<"client_credentials">;
266
- readonly tokenUrl: Schema.String;
267
- readonly revocationUrl: Schema.optionalKey<Schema.String>;
268
- readonly scopes: Schema.$Array<Schema.String>;
269
- readonly tokenEndpointAuthMethod: Schema.Literals<readonly ["client_secret_post", "client_secret_basic", "client_secret_basic_raw"]>;
270
- readonly resource: Schema.optionalKey<Schema.NullOr<Schema.String>>;
271
- readonly authorizationUrl: Schema.optionalKey<Schema.Never>;
272
- readonly discover: Schema.optionalKey<Schema.Never>;
273
- readonly type: Schema.Literal<"oauth2">;
274
- }>]>>;
275
- }>;
276
- readonly method: Schema.NonEmptyString;
277
- readonly fields: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
278
- }>;
279
- /** Parsed host account binding. */
280
- export type ResolvedAccount = typeof ResolvedAccount.Type;
281
- /** Full saved selection resolved by the trusted caller; [] differs from a missing slot. */
282
- export declare const ResolvedAccounts: Schema.$Record<Schema.NonEmptyString, Schema.Union<readonly [Schema.Struct<{
283
- readonly id: Schema.brand<Schema.String, "acc">;
284
- readonly provider: Schema.Struct<{
285
- readonly name: Schema.NonEmptyString;
286
- readonly auth: Schema.$Record<Schema.NonEmptyString, Schema.Union<readonly [Schema.Struct<{
287
- readonly type: Schema.Literal<"secrets">;
288
- readonly label: Schema.String;
289
- readonly fields: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
290
- }>, Schema.Struct<{
291
- readonly response: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
292
- readonly discover: Schema.String;
293
- readonly authorizationUrl: Schema.optionalKey<Schema.Never>;
294
- readonly tokenUrl: Schema.optionalKey<Schema.Never>;
295
- readonly revocationUrl: Schema.optionalKey<Schema.Never>;
296
- readonly scopes: Schema.optionalKey<Schema.$Array<Schema.String>>;
297
- readonly grant: Schema.optionalKey<Schema.Literal<"authorization_code">>;
298
- readonly authorizationParams: Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>;
299
- readonly tokenEndpointAuthMethod: Schema.optionalKey<Schema.Literals<readonly ["none", "client_secret_post", "client_secret_basic", "client_secret_basic_raw"]>>;
300
- readonly resource: Schema.optionalKey<Schema.NullOr<Schema.String>>;
301
- readonly type: Schema.Literal<"oauth2">;
302
- }>, Schema.Struct<{
303
- readonly response: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
304
- readonly authorizationUrl: Schema.String;
305
- readonly tokenUrl: Schema.String;
306
- readonly revocationUrl: Schema.optionalKey<Schema.String>;
307
- readonly scopes: Schema.$Array<Schema.String>;
308
- readonly issuer: Schema.optionalKey<Schema.String>;
309
- readonly discover: Schema.optionalKey<Schema.Never>;
310
- readonly grant: Schema.optionalKey<Schema.Literal<"authorization_code">>;
311
- readonly authorizationParams: Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>;
312
- readonly tokenEndpointAuthMethod: Schema.optionalKey<Schema.Literals<readonly ["none", "client_secret_post", "client_secret_basic", "client_secret_basic_raw"]>>;
313
- readonly resource: Schema.optionalKey<Schema.NullOr<Schema.String>>;
314
- readonly type: Schema.Literal<"oauth2">;
315
- }>, Schema.Struct<{
316
- readonly response: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
317
- readonly grant: Schema.Literal<"client_credentials">;
318
- readonly discover: Schema.String;
319
- readonly authorizationUrl: Schema.optionalKey<Schema.Never>;
320
- readonly tokenUrl: Schema.optionalKey<Schema.Never>;
321
- readonly revocationUrl: Schema.optionalKey<Schema.Never>;
322
- readonly scopes: Schema.optionalKey<Schema.$Array<Schema.String>>;
323
- readonly tokenEndpointAuthMethod: Schema.Literals<readonly ["client_secret_post", "client_secret_basic", "client_secret_basic_raw"]>;
324
- readonly resource: Schema.optionalKey<Schema.NullOr<Schema.String>>;
325
- readonly type: Schema.Literal<"oauth2">;
326
- }>, Schema.Struct<{
327
- readonly response: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
328
- readonly grant: Schema.Literal<"client_credentials">;
329
- readonly tokenUrl: Schema.String;
330
- readonly revocationUrl: Schema.optionalKey<Schema.String>;
331
- readonly scopes: Schema.$Array<Schema.String>;
332
- readonly tokenEndpointAuthMethod: Schema.Literals<readonly ["client_secret_post", "client_secret_basic", "client_secret_basic_raw"]>;
333
- readonly resource: Schema.optionalKey<Schema.NullOr<Schema.String>>;
334
- readonly authorizationUrl: Schema.optionalKey<Schema.Never>;
335
- readonly discover: Schema.optionalKey<Schema.Never>;
336
- readonly type: Schema.Literal<"oauth2">;
337
- }>]>>;
338
- }>;
339
- readonly method: Schema.NonEmptyString;
340
- readonly fields: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
341
- }>, Schema.$Array<Schema.Struct<{
342
- readonly id: Schema.brand<Schema.String, "acc">;
343
- readonly provider: Schema.Struct<{
344
- readonly name: Schema.NonEmptyString;
345
- readonly auth: Schema.$Record<Schema.NonEmptyString, Schema.Union<readonly [Schema.Struct<{
346
- readonly type: Schema.Literal<"secrets">;
347
- readonly label: Schema.String;
348
- readonly fields: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
349
- }>, Schema.Struct<{
350
- readonly response: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
351
- readonly discover: Schema.String;
352
- readonly authorizationUrl: Schema.optionalKey<Schema.Never>;
353
- readonly tokenUrl: Schema.optionalKey<Schema.Never>;
354
- readonly revocationUrl: Schema.optionalKey<Schema.Never>;
355
- readonly scopes: Schema.optionalKey<Schema.$Array<Schema.String>>;
356
- readonly grant: Schema.optionalKey<Schema.Literal<"authorization_code">>;
357
- readonly authorizationParams: Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>;
358
- readonly tokenEndpointAuthMethod: Schema.optionalKey<Schema.Literals<readonly ["none", "client_secret_post", "client_secret_basic", "client_secret_basic_raw"]>>;
359
- readonly resource: Schema.optionalKey<Schema.NullOr<Schema.String>>;
360
- readonly type: Schema.Literal<"oauth2">;
361
- }>, Schema.Struct<{
362
- readonly response: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
363
- readonly authorizationUrl: Schema.String;
364
- readonly tokenUrl: Schema.String;
365
- readonly revocationUrl: Schema.optionalKey<Schema.String>;
366
- readonly scopes: Schema.$Array<Schema.String>;
367
- readonly issuer: Schema.optionalKey<Schema.String>;
368
- readonly discover: Schema.optionalKey<Schema.Never>;
369
- readonly grant: Schema.optionalKey<Schema.Literal<"authorization_code">>;
370
- readonly authorizationParams: Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>;
371
- readonly tokenEndpointAuthMethod: Schema.optionalKey<Schema.Literals<readonly ["none", "client_secret_post", "client_secret_basic", "client_secret_basic_raw"]>>;
372
- readonly resource: Schema.optionalKey<Schema.NullOr<Schema.String>>;
373
- readonly type: Schema.Literal<"oauth2">;
374
- }>, Schema.Struct<{
375
- readonly response: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
376
- readonly grant: Schema.Literal<"client_credentials">;
377
- readonly discover: Schema.String;
378
- readonly authorizationUrl: Schema.optionalKey<Schema.Never>;
379
- readonly tokenUrl: Schema.optionalKey<Schema.Never>;
380
- readonly revocationUrl: Schema.optionalKey<Schema.Never>;
381
- readonly scopes: Schema.optionalKey<Schema.$Array<Schema.String>>;
382
- readonly tokenEndpointAuthMethod: Schema.Literals<readonly ["client_secret_post", "client_secret_basic", "client_secret_basic_raw"]>;
383
- readonly resource: Schema.optionalKey<Schema.NullOr<Schema.String>>;
384
- readonly type: Schema.Literal<"oauth2">;
385
- }>, Schema.Struct<{
386
- readonly response: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
387
- readonly grant: Schema.Literal<"client_credentials">;
388
- readonly tokenUrl: Schema.String;
389
- readonly revocationUrl: Schema.optionalKey<Schema.String>;
390
- readonly scopes: Schema.$Array<Schema.String>;
391
- readonly tokenEndpointAuthMethod: Schema.Literals<readonly ["client_secret_post", "client_secret_basic", "client_secret_basic_raw"]>;
392
- readonly resource: Schema.optionalKey<Schema.NullOr<Schema.String>>;
393
- readonly authorizationUrl: Schema.optionalKey<Schema.Never>;
394
- readonly discover: Schema.optionalKey<Schema.Never>;
395
- readonly type: Schema.Literal<"oauth2">;
396
- }>]>>;
397
- }>;
398
- readonly method: Schema.NonEmptyString;
399
- readonly fields: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
400
- }>>]>>;
22
+ /**
23
+ * The host protocol this framework speaks and its wire schemas. A later protocol replaces this
24
+ * re-export; released protocol modules stay unchanged for host adapters.
25
+ */
26
+ export { frameworkProtocol } from "./protocol-version.js";
27
+ export { protocol1 } from "./protocols/1.js";
28
+ import { HostAccountsInvalid, HostDeclarationInvalid, HostEvaluationFailed, HostInputInvalid, HostOperationFailed, HostOperationNotFound, HostOutputInvalid, HostRequestInvalid, HostToolApprovalRequired, HostToolBlocked, HostToolNotFound, HostToolPolicyFailed, SkillSources, type InvocationDeadline, ResolvedAccounts, type SkillCatalogResponse, type TrustedToolApproval } from "./protocols/1.js";
29
+ export { DeclaredAuthMethod, DeclaredProvider, DeclaredRequirements, ResolvedAccount, ResolvedAccounts, TrustedToolApproval, InvocationDeadline, HostedTool, HostedToolSummary, SkillSources, SkillCatalogResponse, HostRequest, HostRequestInvalid, HostAccountsInvalid, HostDeclarationInvalid, HostEvaluationFailed, HostOperationNotFound, HostOperationFailed, HostToolNotFound, InputProblem, maxInputProblems, HostInputInvalid, HostToolBlocked, HostToolApprovalRequired, HostToolPolicyFailed, HostOutputInvalid, HostError, HostResponse, HostInvocation, } from "./protocols/1.js";
401
30
  /** Raw host inputs; the host boundary parses and redacts these immediately. */
402
31
  export type ResolvedAccountsInput = typeof ResolvedAccounts.Encoded;
403
- /** Parsed host selections, kept redacted until native account binding. */
404
- export type ResolvedAccounts = typeof ResolvedAccounts.Type;
405
- /** Trusted approval for one decoded call. Never accepted in public command JSON. */
406
- export declare const TrustedToolApproval: Schema.Struct<{
407
- readonly tool: Schema.NonEmptyString;
408
- readonly input: Schema.Codec<Schema.Json, Schema.Json, never, never>;
409
- }>;
410
- export type TrustedToolApproval = typeof TrustedToolApproval.Type;
411
- /** Absolute Unix time in milliseconds; remote hosts enforce it inside the operation transaction. */
412
- export declare const InvocationDeadline: Schema.Finite;
413
32
  /** Trusted invocation context, supplied separately from the Request. */
414
33
  export interface HostContext {
415
34
  /** Trusted host deadline; never accepted in public operation JSON. */
@@ -429,88 +48,6 @@ export interface HostContext {
429
48
  readonly storage?: AppStorage;
430
49
  readonly accounts: Redacted.Redacted<ResolvedAccounts>;
431
50
  }
432
- /** Serializable live tool metadata; executable callbacks never cross this boundary. */
433
- export declare const HostedTool: Schema.Struct<{
434
- readonly schedules: Schema.optionalKey<Schema.$Array<Schema.Struct<{
435
- readonly name: Schema.NonEmptyString;
436
- readonly timing: Schema.Union<readonly [Schema.Struct<{
437
- readonly kind: Schema.Literal<"interval">;
438
- readonly milliseconds: Schema.Int;
439
- }>, Schema.Struct<{
440
- readonly kind: Schema.Literal<"cron">;
441
- readonly calendar: Schema.Struct<{
442
- readonly expression: Schema.NonEmptyString;
443
- readonly timezone: Schema.NonEmptyString;
444
- }>;
445
- }>]>;
446
- readonly input: Schema.Codec<Schema.Json, Schema.Json, never, never>;
447
- }>>>;
448
- readonly name: Schema.NonEmptyString;
449
- readonly description: Schema.String;
450
- readonly inputSchema: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
451
- readonly readOnly: Schema.optionalKey<Schema.Boolean>;
452
- readonly title: Schema.optionalKey<Schema.String>;
453
- readonly outputSchema: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
454
- readonly annotations: Schema.optionalKey<Schema.Struct<{
455
- readonly title: Schema.optionalKey<Schema.String>;
456
- readonly readOnlyHint: Schema.optionalKey<Schema.Boolean>;
457
- readonly destructiveHint: Schema.optionalKey<Schema.Boolean>;
458
- readonly idempotentHint: Schema.optionalKey<Schema.Boolean>;
459
- readonly openWorldHint: Schema.optionalKey<Schema.Boolean>;
460
- }>>;
461
- readonly _meta: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
462
- }>;
463
- /** Parsed live tool description. */
464
- export type HostedTool = typeof HostedTool.Type;
465
- /** Catalog entry without schemas. Browsing lists these and reads one full tool on selection. */
466
- export declare const HostedToolSummary: Schema.Struct<{
467
- readonly schedules: Schema.optionalKey<Schema.$Array<Schema.Struct<{
468
- readonly name: Schema.NonEmptyString;
469
- readonly timing: Schema.Union<readonly [Schema.Struct<{
470
- readonly kind: Schema.Literal<"interval">;
471
- readonly milliseconds: Schema.Int;
472
- }>, Schema.Struct<{
473
- readonly kind: Schema.Literal<"cron">;
474
- readonly calendar: Schema.Struct<{
475
- readonly expression: Schema.NonEmptyString;
476
- readonly timezone: Schema.NonEmptyString;
477
- }>;
478
- }>]>;
479
- readonly input: Schema.Codec<Schema.Json, Schema.Json, never, never>;
480
- }>>>;
481
- readonly name: Schema.NonEmptyString;
482
- readonly description: Schema.String;
483
- readonly readOnly: Schema.optionalKey<Schema.Boolean>;
484
- readonly title: Schema.optionalKey<Schema.String>;
485
- readonly annotations: Schema.optionalKey<Schema.Struct<{
486
- readonly title: Schema.optionalKey<Schema.String>;
487
- readonly readOnlyHint: Schema.optionalKey<Schema.Boolean>;
488
- readonly destructiveHint: Schema.optionalKey<Schema.Boolean>;
489
- readonly idempotentHint: Schema.optionalKey<Schema.Boolean>;
490
- readonly openWorldHint: Schema.optionalKey<Schema.Boolean>;
491
- }>>;
492
- }>;
493
- export type HostedToolSummary = typeof HostedToolSummary.Type;
494
- /**
495
- * A skill catalog and whether any of it came from `dynamicSkills`. Without a live loader the
496
- * catalog is determined by the build and its evaluation inputs; with one it reflects a publisher.
497
- */
498
- export declare const SkillSources: Schema.Struct<{
499
- readonly skills: Schema.$Array<Schema.Struct<{
500
- readonly files: Schema.$Array<Schema.Struct<{
501
- readonly path: Schema.NonEmptyString;
502
- readonly content: Schema.String;
503
- }>>;
504
- readonly name: Schema.NonEmptyString;
505
- readonly description: Schema.String;
506
- readonly license: Schema.optionalKey<Schema.String>;
507
- readonly compatibility: Schema.optionalKey<Schema.String>;
508
- readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>;
509
- readonly "allowed-tools": Schema.optionalKey<Schema.String>;
510
- }>>;
511
- readonly dynamic: Schema.Boolean;
512
- }>;
513
- export type SkillSources = typeof SkillSources.Type;
514
51
  /** Skill commands. Send sources only to builds that declare skillSources. */
515
52
  export declare const skillsCommand: (sources: boolean) => {
516
53
  readonly operation: "skills";
@@ -519,33 +56,6 @@ export declare const skillsCommand: (sources: boolean) => {
519
56
  readonly operation: "skills";
520
57
  readonly sources?: never;
521
58
  };
522
- /** Either response shape; `dynamic` is unknown for builds that predate skillSources. */
523
- export declare const SkillCatalogResponse: Schema.Union<readonly [Schema.Struct<{
524
- readonly skills: Schema.$Array<Schema.Struct<{
525
- readonly files: Schema.$Array<Schema.Struct<{
526
- readonly path: Schema.NonEmptyString;
527
- readonly content: Schema.String;
528
- }>>;
529
- readonly name: Schema.NonEmptyString;
530
- readonly description: Schema.String;
531
- readonly license: Schema.optionalKey<Schema.String>;
532
- readonly compatibility: Schema.optionalKey<Schema.String>;
533
- readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>;
534
- readonly "allowed-tools": Schema.optionalKey<Schema.String>;
535
- }>>;
536
- readonly dynamic: Schema.Boolean;
537
- }>, Schema.$Array<Schema.Struct<{
538
- readonly files: Schema.$Array<Schema.Struct<{
539
- readonly path: Schema.NonEmptyString;
540
- readonly content: Schema.String;
541
- }>>;
542
- readonly name: Schema.NonEmptyString;
543
- readonly description: Schema.String;
544
- readonly license: Schema.optionalKey<Schema.String>;
545
- readonly compatibility: Schema.optionalKey<Schema.String>;
546
- readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>;
547
- readonly "allowed-tools": Schema.optionalKey<Schema.String>;
548
- }>>]>;
549
59
  export interface SkillCatalog {
550
60
  readonly skills: SkillSources["skills"];
551
61
  readonly dynamic?: boolean;
@@ -568,165 +78,6 @@ export declare const indexCommand: {
568
78
  export declare const selectTools: (tools?: readonly string[]) => <A extends {
569
79
  readonly name: string;
570
80
  }>(all: readonly A[]) => readonly A[];
571
- /** Framework-owned dispatch, independent of app-authored HTTP routing. */
572
- export declare const HostRequest: Schema.Union<readonly [Schema.Union<readonly [Schema.Struct<{
573
- readonly operation: Schema.Literal<"workflows">;
574
- }>, Schema.Struct<{
575
- readonly operation: Schema.Literal<"workflow-validate">;
576
- readonly name: Schema.NonEmptyString;
577
- readonly input: Schema.Codec<Schema.Json, Schema.Json, never, never>;
578
- }>, Schema.Struct<{
579
- readonly operation: Schema.Literal<"workflow-run">;
580
- readonly name: Schema.NonEmptyString;
581
- readonly input: Schema.Codec<Schema.Json, Schema.Json, never, never>;
582
- }>]>, Schema.Union<readonly [Schema.Struct<{
583
- readonly operation: Schema.Literal<"webhooks">;
584
- }>, Schema.Struct<{
585
- readonly name: Schema.NonEmptyString;
586
- readonly subscriptionId: Schema.NonEmptyString;
587
- readonly sourceAccount: Schema.brand<Schema.String, "acc">;
588
- readonly callbackUrl: Schema.String;
589
- readonly secret: Schema.String;
590
- readonly config: Schema.Codec<Schema.Json, Schema.Json, never, never>;
591
- readonly operation: Schema.Literal<"webhook-validate">;
592
- }>, Schema.Struct<{
593
- readonly state: Schema.Codec<Schema.Json, Schema.Json, never, never>;
594
- readonly name: Schema.NonEmptyString;
595
- readonly subscriptionId: Schema.NonEmptyString;
596
- readonly sourceAccount: Schema.brand<Schema.String, "acc">;
597
- readonly callbackUrl: Schema.String;
598
- readonly secret: Schema.String;
599
- readonly config: Schema.Codec<Schema.Json, Schema.Json, never, never>;
600
- readonly operation: Schema.Literal<"webhook-complete">;
601
- }>, Schema.Struct<{
602
- readonly name: Schema.NonEmptyString;
603
- readonly subscriptionId: Schema.NonEmptyString;
604
- readonly sourceAccount: Schema.brand<Schema.String, "acc">;
605
- readonly callbackUrl: Schema.String;
606
- readonly secret: Schema.String;
607
- readonly config: Schema.Codec<Schema.Json, Schema.Json, never, never>;
608
- readonly operation: Schema.Literal<"webhook-register">;
609
- }>, Schema.Struct<{
610
- readonly state: Schema.Codec<Schema.Json, Schema.Json, never, never>;
611
- readonly name: Schema.NonEmptyString;
612
- readonly subscriptionId: Schema.NonEmptyString;
613
- readonly sourceAccount: Schema.brand<Schema.String, "acc">;
614
- readonly callbackUrl: Schema.String;
615
- readonly secret: Schema.String;
616
- readonly config: Schema.Codec<Schema.Json, Schema.Json, never, never>;
617
- readonly operation: Schema.Literal<"webhook-unregister">;
618
- }>, Schema.Struct<{
619
- readonly state: Schema.Codec<Schema.Json, Schema.Json, never, never>;
620
- readonly request: Schema.Struct<{
621
- readonly url: Schema.String;
622
- readonly method: Schema.Literals<readonly ["GET", "POST", "PUT", "PATCH", "DELETE", "HEAD", "OPTIONS"]>;
623
- readonly headers: Schema.$Record<Schema.String, Schema.String>;
624
- readonly body: Schema.String;
625
- }>;
626
- readonly name: Schema.NonEmptyString;
627
- readonly subscriptionId: Schema.NonEmptyString;
628
- readonly sourceAccount: Schema.brand<Schema.String, "acc">;
629
- readonly callbackUrl: Schema.String;
630
- readonly secret: Schema.String;
631
- readonly config: Schema.Codec<Schema.Json, Schema.Json, never, never>;
632
- readonly operation: Schema.Literal<"webhook-handle">;
633
- }>]>, Schema.Struct<{
634
- readonly operation: Schema.Literal<"requirements">;
635
- }>, Schema.Struct<{
636
- readonly operation: Schema.Literal<"inspect">;
637
- /** Omit schemas. Only builds that declare the toolIndex capability accept this. */
638
- readonly detail: Schema.optionalKey<Schema.Literal<"summary">>;
639
- /** Describe only these tools. Only builds that declare the toolIndex capability accept this. */
640
- readonly tools: Schema.optionalKey<Schema.$Array<Schema.NonEmptyString>>;
641
- /**
642
- * Describe only declared operations that have schedules, without dynamic tool discovery.
643
- * Only builds that declare the scheduledTools capability accept this.
644
- */
645
- readonly scheduled: Schema.optionalKey<Schema.Literal<true>>;
646
- }>, Schema.Struct<{
647
- readonly operation: Schema.Literal<"skills">;
648
- /** Answer with SkillSources. Only builds that declare the skillSources capability accept this. */
649
- readonly sources: Schema.optionalKey<Schema.Literal<true>>;
650
- }>, Schema.Struct<{
651
- readonly operation: Schema.Literal<"query">;
652
- readonly name: Schema.NonEmptyString;
653
- readonly input: Schema.Codec<Schema.Json, Schema.Json, never, never>;
654
- }>, Schema.Struct<{
655
- readonly operation: Schema.Literal<"mutate">;
656
- readonly name: Schema.NonEmptyString;
657
- readonly input: Schema.Codec<Schema.Json, Schema.Json, never, never>;
658
- }>, Schema.Struct<{
659
- readonly operation: Schema.Literal<"call">;
660
- readonly tool: Schema.NonEmptyString;
661
- readonly input: Schema.Codec<Schema.Json, Schema.Json, never, never>;
662
- }>]>;
663
- /** Parsed portable dispatch request. */
664
- export type HostRequest = typeof HostRequest.Type;
665
- declare const HostRequestInvalid_base: Schema.Class<HostRequestInvalid, Schema.TaggedStruct<"HostRequestInvalid", {}>, import("effect/Cause").YieldableError>;
666
- /** The dispatch request did not match the protocol. */
667
- export declare class HostRequestInvalid extends HostRequestInvalid_base {
668
- }
669
- declare const HostAccountsInvalid_base: Schema.Class<HostAccountsInvalid, Schema.TaggedStruct<"HostAccountsInvalid", {}>, import("effect/Cause").YieldableError>;
670
- /** Host-supplied accounts did not satisfy the declared slots or native method schemas. */
671
- export declare class HostAccountsInvalid extends HostAccountsInvalid_base {
672
- }
673
- declare const HostDeclarationInvalid_base: Schema.Class<HostDeclarationInvalid, Schema.TaggedStruct<"HostDeclarationInvalid", {}>, import("effect/Cause").YieldableError>;
674
- /** The module or declared capability shape could not be hosted. */
675
- export declare class HostDeclarationInvalid extends HostDeclarationInvalid_base {
676
- }
677
- declare const HostEvaluationFailed_base: Schema.Class<HostEvaluationFailed, Schema.TaggedStruct<"HostEvaluationFailed", {}>, import("effect/Cause").YieldableError>;
678
- /** Fresh app evaluation failed before calling a tool. */
679
- export declare class HostEvaluationFailed extends HostEvaluationFailed_base {
680
- }
681
- declare const HostOperationNotFound_base: Schema.Class<HostOperationNotFound, Schema.TaggedStruct<"HostOperationNotFound", {}>, import("effect/Cause").YieldableError>;
682
- /** No query or mutation matched the requested name. */
683
- export declare class HostOperationNotFound extends HostOperationNotFound_base {
684
- }
685
- declare const HostOperationFailed_base: Schema.Class<HostOperationFailed, Schema.TaggedStruct<"HostOperationFailed", {}>, import("effect/Cause").YieldableError>;
686
- /** An app operation failed. Raw author failures remain private. */
687
- export declare class HostOperationFailed extends HostOperationFailed_base {
688
- }
689
- declare const HostToolNotFound_base: Schema.Class<HostToolNotFound, Schema.TaggedStruct<"HostToolNotFound", {}>, import("effect/Cause").YieldableError>;
690
- /** The freshly evaluated catalog did not contain the requested tool. */
691
- export declare class HostToolNotFound extends HostToolNotFound_base {
692
- }
693
- /** One failing input location and its expected shape; never the supplied value. */
694
- export declare const InputProblem: Schema.String;
695
- /** Input decoding reports at most this many problems. */
696
- export declare const maxInputProblems = 10;
697
- declare const HostInputInvalid_base: Schema.Class<HostInputInvalid, Schema.TaggedStruct<"HostInputInvalid", {
698
- readonly problems: Schema.optionalKey<Schema.$Array<Schema.String>>;
699
- }>, import("effect/Cause").YieldableError>;
700
- /** Native input decoding failed; supplied values are omitted. Builds before problems were reported send none. */
701
- export declare class HostInputInvalid extends HostInputInvalid_base {
702
- }
703
- declare const HostToolBlocked_base: Schema.Class<HostToolBlocked, Schema.TaggedStruct<"HostToolBlocked", {}>, import("effect/Cause").YieldableError>;
704
- /** The tool's approval policy blocked this call before its tool body ran. */
705
- export declare class HostToolBlocked extends HostToolBlocked_base {
706
- }
707
- declare const HostToolApprovalRequired_base: Schema.Class<HostToolApprovalRequired, Schema.TaggedStruct<"HostToolApprovalRequired", {
708
- readonly input: Schema.Codec<Schema.Json, Schema.Json, never, never>;
709
- readonly elicitation: Schema.Struct<{
710
- readonly requestedSchema: Schema.Struct<{
711
- readonly type: Schema.Literal<"object">;
712
- readonly properties: Schema.$Record<Schema.String, Schema.Never>;
713
- }>;
714
- readonly mode: Schema.Literal<"form">;
715
- readonly _meta: Schema.optional<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
716
- readonly message: Schema.String;
717
- }>;
718
- }>, import("effect/Cause").YieldableError>;
719
- /** Policy elicitation plus decoded input. No tool body ran; the host owns delivery and resumption. */
720
- export declare class HostToolApprovalRequired extends HostToolApprovalRequired_base {
721
- }
722
- declare const HostToolPolicyFailed_base: Schema.Class<HostToolPolicyFailed, Schema.TaggedStruct<"HostToolPolicyFailed", {}>, import("effect/Cause").YieldableError>;
723
- /** The tool's approval policy failed or returned an invalid decision. Author failures remain private. */
724
- export declare class HostToolPolicyFailed extends HostToolPolicyFailed_base {
725
- }
726
- declare const HostOutputInvalid_base: Schema.Class<HostOutputInvalid, Schema.TaggedStruct<"HostOutputInvalid", {}>, import("effect/Cause").YieldableError>;
727
- /** A tool result was not JSON; the result is never included in the error. */
728
- export declare class HostOutputInvalid extends HostOutputInvalid_base {
729
- }
730
81
  /** Declaration reads do not bind accounts or evaluate the app factory. */
731
82
  export declare const HostRequirementsError: Schema.Union<readonly [typeof HostRequestInvalid, typeof HostDeclarationInvalid]>;
732
83
  /** Inspection can fail while binding accounts or evaluating the live definition. */
@@ -735,26 +86,11 @@ export declare const HostInspectError: Schema.Union<readonly [typeof ProviderErr
735
86
  export declare const HostCallError: Schema.Union<readonly [typeof OpenapiResponseError, typeof WorkflowFailure, Schema.Union<readonly [typeof ProviderError, typeof McpError, typeof SkillLoadFailed, typeof HostRequestInvalid, typeof HostDeclarationInvalid, typeof HostAccountsInvalid, typeof HostEvaluationFailed]>, typeof HostToolNotFound, typeof HostOperationNotFound, typeof HostOperationFailed, typeof HostInputInvalid, typeof HostOutputInvalid, typeof HostToolBlocked, typeof HostToolApprovalRequired, typeof HostToolPolicyFailed, typeof ElicitationFailed]>;
736
87
  /** Queries, mutations and agent calls use the same operation failures. */
737
88
  export declare const HostDataError: Schema.Union<readonly [typeof OpenapiResponseError, typeof WorkflowFailure, Schema.Union<readonly [typeof ProviderError, typeof McpError, typeof SkillLoadFailed, typeof HostRequestInvalid, typeof HostDeclarationInvalid, typeof HostAccountsInvalid, typeof HostEvaluationFailed]>, typeof HostToolNotFound, typeof HostOperationNotFound, typeof HostOperationFailed, typeof HostInputInvalid, typeof HostOutputInvalid, typeof HostToolBlocked, typeof HostToolApprovalRequired, typeof HostToolPolicyFailed, typeof ElicitationFailed]>;
738
- /** Safe error envelope; no author exception, source, account fields or stack is serialized. */
739
- export declare const HostError: Schema.Union<readonly [typeof OpenapiResponseError, typeof ProviderError, typeof McpError, typeof SkillLoadFailed, typeof WorkflowFailure, typeof HostRequestInvalid, typeof HostAccountsInvalid, typeof HostDeclarationInvalid, typeof HostEvaluationFailed, typeof HostOperationNotFound, typeof HostOperationFailed, typeof HostToolNotFound, typeof HostInputInvalid, typeof HostOutputInvalid, typeof HostToolBlocked, typeof HostToolApprovalRequired, typeof HostToolPolicyFailed, typeof ElicitationFailed]>;
740
- /** Expected host failures. */
741
- export type HostError = typeof HostError.Type;
742
89
  /** Invocation-owned outcome sink. Framework adapters report semantic failures
743
90
  * independently of successful JSON transport; customer output is never inspected. */
744
91
  export declare const ToolResultObservation: Context.Reference<{
745
92
  readonly failed: () => void;
746
93
  }>;
747
- /** Portable response envelope; callers parse the success value for their operation. */
748
- export declare const HostResponse: Schema.Union<readonly [Schema.Struct<{
749
- readonly ok: Schema.Literal<true>;
750
- readonly value: Schema.Codec<Schema.Json, Schema.Json, never, never>;
751
- readonly toolError: Schema.optionalKey<Schema.Literal<true>>;
752
- }>, Schema.Struct<{
753
- readonly ok: Schema.Literal<false>;
754
- readonly error: Schema.Union<readonly [typeof OpenapiResponseError, typeof ProviderError, typeof McpError, typeof SkillLoadFailed, typeof WorkflowFailure, typeof HostRequestInvalid, typeof HostAccountsInvalid, typeof HostDeclarationInvalid, typeof HostEvaluationFailed, typeof HostOperationNotFound, typeof HostOperationFailed, typeof HostToolNotFound, typeof HostInputInvalid, typeof HostOutputInvalid, typeof HostToolBlocked, typeof HostToolApprovalRequired, typeof HostToolPolicyFailed, typeof ElicitationFailed]>;
755
- }>]>;
756
- /** Parsed response envelope. */
757
- export type HostResponse = typeof HostResponse.Type;
758
94
  /** Native handler; context comes from host authority, never from request content. */
759
95
  export type AppHandler = (request: Request, context: HostContext) => Effect.Effect<Response>;
760
96
  export { OperationToolPrefixes, type AppOperation, type OperationContext } from "./operations.js";