apps 0.0.1-beta.3 → 0.0.1-beta.30

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 (139) hide show
  1. package/README.md +68 -44
  2. package/framework-reference.json +1 -1
  3. package/js/{chunk-G7ZIRKMK.js → chunk-2D2PKLGQ.js} +118 -197
  4. package/js/chunk-3SPRHIEE.js +42 -0
  5. package/js/{chunk-FDNTX5QJ.js → chunk-4N26L465.js} +2 -2
  6. package/js/chunk-5ZHHO4OM.js +92 -0
  7. package/js/{chunk-EVJUVWN2.js → chunk-65SZ23BK.js} +2 -2
  8. package/js/{chunk-M6ZRRIBI.js → chunk-6JBTHTI5.js} +1 -1
  9. package/js/{chunk-J7O55ZV7.js → chunk-6NK26ONC.js} +332 -187
  10. package/js/chunk-6VWYEQ4X.js +254 -0
  11. package/js/{chunk-RN2MXB4R.js → chunk-AE4FWJQU.js} +128 -24
  12. package/js/{chunk-HDJH3RPR.js → chunk-BBTELEAN.js} +2 -2
  13. package/js/{chunk-LGIYBDWA.js → chunk-BRGF7VFN.js} +65 -1
  14. package/js/{chunk-MYYEW3RA.js → chunk-BSRU52RU.js} +984 -61
  15. package/js/{chunk-FZJOYIZO.js → chunk-BTJMXW4I.js} +1 -1
  16. package/js/{chunk-HDTGZWP2.js → chunk-IMCEF6KE.js} +139 -32
  17. package/js/chunk-KQCMHI3K.js +118 -0
  18. package/js/{chunk-BMOIAIVR.js → chunk-M2KEEOIQ.js} +49 -1
  19. package/js/{chunk-YEJOQEII.js → chunk-MYCVMDWI.js} +45 -7
  20. package/js/{chunk-FW5HBOIK.js → chunk-NXTXZ635.js} +1841 -1701
  21. package/js/chunk-OD3KFKZD.js +1617 -0
  22. package/js/{chunk-JN55AYQH.js → chunk-OI5CKSBU.js} +61 -32
  23. package/js/{chunk-NQ3OMCA5.js → chunk-P46HIAX6.js} +2 -2
  24. package/js/chunk-PUC24GZP.js +801 -0
  25. package/js/{chunk-SATWJKN6.js → chunk-PWF2DRJ3.js} +1 -1
  26. package/js/{chunk-D47C7KG5.js → chunk-VUVBMNKC.js} +2 -2
  27. package/js/{chunk-ZCAMUXSG.js → chunk-WGBI5MVX.js} +3 -4
  28. package/js/{chunk-T2LAZCAD.js → chunk-WQ5MVBTP.js} +1 -1
  29. package/js/{chunk-PLCMJREA.js → chunk-XBQTJP76.js} +60 -20
  30. package/js/{chunk-QKHR7BMF.js → chunk-XGN5IFOZ.js} +3 -3
  31. package/js/{chunk-WFSQXYUT.js → chunk-YML53Z7H.js} +42 -5
  32. package/js/{chunk-5MQZEB6Y.js → chunk-ZZOCEUTB.js} +37 -12
  33. package/js/client.js +120 -84
  34. package/js/contracts.js +110 -16
  35. package/js/effect.js +20 -20
  36. package/js/{es-APDZKREY.js → es-DIULA3ZF.js} +62 -1659
  37. package/js/graphql.js +58 -54
  38. package/js/host.js +20 -20
  39. package/js/index.js +247 -204
  40. package/js/mcp/effect.js +24 -22
  41. package/js/mcp/stdio.js +35 -30
  42. package/js/mcp.js +105 -68
  43. package/js/openapi.js +4087 -1503
  44. package/js/react.js +3 -3
  45. package/js/skills/effect.js +5 -3
  46. package/js/skills.js +15 -15
  47. package/js/storage/facet.js +4 -4
  48. package/js/ui/auth/contracts.js +2 -2
  49. package/js/ui/auth.js +5 -5
  50. package/js/ui/contracts.js +5 -4
  51. package/js/ui/serving.js +8516 -214
  52. package/package.json +1 -1
  53. package/runtime.json +1 -1
  54. package/types/app-data/src/contracts/database.d.ts +33 -6
  55. package/types/app-data/src/implementation/schema.d.ts +2 -17
  56. package/types/apps/src/contracts/api-response-error.d.ts +4 -0
  57. package/types/apps/src/contracts/app.d.ts +7 -6
  58. package/types/apps/src/contracts/failure.d.ts +54 -0
  59. package/types/apps/src/contracts/graphql.d.ts +2 -1
  60. package/types/apps/src/contracts/host.d.ts +34 -11
  61. package/types/apps/src/contracts/mcp.d.ts +91 -10
  62. package/types/apps/src/contracts/network.d.ts +84 -0
  63. package/types/apps/src/contracts/openapi-compile.d.ts +31 -3
  64. package/types/apps/src/contracts/openapi.d.ts +45 -9
  65. package/types/apps/src/contracts/operations.d.ts +5 -6
  66. package/types/apps/src/contracts/protocol-version.d.ts +2 -2
  67. package/types/apps/src/contracts/protocols/1.d.ts +251 -69
  68. package/types/apps/src/contracts/protocols/2.d.ts +710 -0
  69. package/types/apps/src/contracts/protocols/3.d.ts +716 -0
  70. package/types/apps/src/contracts/protocols/4.d.ts +1298 -0
  71. package/types/apps/src/contracts/protocols/5.d.ts +1174 -0
  72. package/types/apps/src/contracts/protocols/6.d.ts +1620 -0
  73. package/types/apps/src/contracts/protocols/7.d.ts +1784 -0
  74. package/types/apps/src/contracts/protocols/8.d.ts +1119 -0
  75. package/types/apps/src/contracts/protocols/oauth.d.ts +89 -0
  76. package/types/apps/src/contracts/provider-error.d.ts +9 -0
  77. package/types/apps/src/contracts/provider.d.ts +115 -10
  78. package/types/apps/src/contracts/router.d.ts +59 -0
  79. package/types/apps/src/contracts/skills.d.ts +18 -5
  80. package/types/apps/src/contracts/storage.d.ts +3 -3
  81. package/types/apps/src/contracts/ui.d.ts +18 -0
  82. package/types/apps/src/contracts/workflows.d.ts +34 -3
  83. package/types/apps/src/graphql.d.ts +1 -3
  84. package/types/apps/src/implementation/account-router.d.ts +12 -0
  85. package/types/apps/src/implementation/app.d.ts +5 -4
  86. package/types/apps/src/implementation/browser-scripts.gen.d.ts +6 -0
  87. package/types/apps/src/implementation/catalog-cache.d.ts +34 -4
  88. package/types/apps/src/implementation/elicitation.d.ts +9 -9
  89. package/types/apps/src/implementation/failure-detail.d.ts +46 -0
  90. package/types/apps/src/implementation/graphql-catalog.d.ts +4 -7
  91. package/types/apps/src/implementation/graphql.d.ts +4 -3
  92. package/types/apps/src/implementation/mcp-call.d.ts +6 -5
  93. package/types/apps/src/implementation/mcp-catalog.d.ts +7 -8
  94. package/types/apps/src/implementation/mcp-client.d.ts +49 -25
  95. package/types/apps/src/implementation/mcp-stdio.d.ts +1 -1
  96. package/types/apps/src/implementation/mcp-tools.d.ts +2 -1
  97. package/types/apps/src/implementation/mcp.d.ts +52 -25
  98. package/types/apps/src/implementation/network.d.ts +16 -0
  99. package/types/apps/src/implementation/openapi-compile.d.ts +27 -6
  100. package/types/apps/src/implementation/openapi-document.d.ts +35 -8
  101. package/types/apps/src/implementation/openapi-names.d.ts +9 -4
  102. package/types/apps/src/implementation/openapi-request.d.ts +10 -2
  103. package/types/apps/src/implementation/openapi-source.d.ts +8 -6
  104. package/types/apps/src/implementation/openapi-upgrade.d.ts +4 -0
  105. package/types/apps/src/implementation/operations.d.ts +36 -3
  106. package/types/apps/src/implementation/protocol-operations.d.ts +6 -4
  107. package/types/apps/src/implementation/provider-error.d.ts +28 -1
  108. package/types/apps/src/implementation/provider.d.ts +19 -5
  109. package/types/apps/src/implementation/router-catalog.d.ts +224 -0
  110. package/types/apps/src/implementation/router.d.ts +68 -0
  111. package/types/apps/src/implementation/runtime-yield.d.ts +7 -0
  112. package/types/apps/src/implementation/schema.d.ts +52 -1
  113. package/types/apps/src/implementation/skills.d.ts +2 -2
  114. package/types/apps/src/implementation/storage.d.ts +5 -3
  115. package/types/apps/src/implementation/ui-account-notice.d.ts +9 -0
  116. package/types/apps/src/implementation/ui-client.d.ts +2 -2
  117. package/types/apps/src/implementation/ui-document.d.ts +5 -0
  118. package/types/apps/src/implementation/ui-errors.d.ts +1 -1
  119. package/types/apps/src/implementation/ui-serving.d.ts +10 -4
  120. package/types/apps/src/implementation/ui-watch.d.ts +1 -1
  121. package/types/apps/src/implementation/upstream-error.d.ts +7 -0
  122. package/types/apps/src/implementation/webhooks.d.ts +1 -1
  123. package/types/apps/src/implementation/workflow-context.d.ts +11 -3
  124. package/types/apps/src/index.d.ts +29 -11
  125. package/types/apps/src/mcp-stdio.d.ts +2 -5
  126. package/types/apps/src/mcp.d.ts +25 -5
  127. package/types/apps/src/openapi.d.ts +6 -6
  128. package/types/apps/src/skills.d.ts +4 -4
  129. package/types/telemetry/src/browser-operations.d.ts +5 -2
  130. package/types/telemetry/src/config.d.ts +2 -2
  131. package/types/utils/src/api-error.d.ts +48 -0
  132. package/js/chunk-PYUYJRSK.js +0 -93
  133. package/js/chunk-SWPD52J7.js +0 -35
  134. package/js/chunk-W7D7WVSY.js +0 -18
  135. package/js/chunk-Z5NMEGJN.js +0 -29
  136. package/js/chunk-ZJWDMTE3.js +0 -63
  137. package/types/apps/src/contracts/dynamic-tools.d.ts +0 -13
  138. package/types/apps/src/implementation/account-operations.d.ts +0 -151
  139. package/types/apps/src/implementation/dynamic-tools.d.ts +0 -8
@@ -1,26 +1,30 @@
1
1
  import {
2
+ DatabaseFieldReserved,
3
+ DatabaseLimitExceeded,
2
4
  DatabaseSchema
3
- } from "./chunk-BMOIAIVR.js";
5
+ } from "./chunk-M2KEEOIQ.js";
4
6
  import {
5
7
  CacheCommand,
6
- CacheReply
7
- } from "./chunk-LGIYBDWA.js";
8
+ CacheReply,
9
+ FailureCode,
10
+ FailureDetail,
11
+ FailureMessage,
12
+ FailureName,
13
+ FailureSource,
14
+ ProviderError,
15
+ UpstreamError
16
+ } from "./chunk-BRGF7VFN.js";
8
17
  import {
18
+ AppSkillName,
9
19
  AppSkills,
10
20
  SkillLoadFailed
11
- } from "./chunk-YEJOQEII.js";
12
- import {
13
- OpenapiResponseError
14
- } from "./chunk-SWPD52J7.js";
15
- import {
16
- ProviderError
17
- } from "./chunk-W7D7WVSY.js";
21
+ } from "./chunk-MYCVMDWI.js";
18
22
  import {
19
23
  AccountId,
20
24
  HttpUrl,
21
25
  JsonObject as JsonObject2,
22
26
  JsonValue
23
- } from "./chunk-SATWJKN6.js";
27
+ } from "./chunk-PWF2DRJ3.js";
24
28
  import {
25
29
  Any,
26
30
  ArraySchema,
@@ -74,7 +78,31 @@ import {
74
78
  transformOptional,
75
79
  withConstructorDefault,
76
80
  withDefault
77
- } from "./chunk-FW5HBOIK.js";
81
+ } from "./chunk-NXTXZ635.js";
82
+
83
+ // src/contracts/router.ts
84
+ var reservedRouterKeys = /* @__PURE__ */ new Set([
85
+ "__proto__",
86
+ "constructor",
87
+ "prototype"
88
+ ]);
89
+ var RouterKey = Schema_exports.String.check(
90
+ Schema_exports.isPattern(/^[A-Za-z_][A-Za-z0-9_-]{0,99}$/),
91
+ Schema_exports.makeFilter((key) => !reservedRouterKeys.has(key))
92
+ );
93
+ var RouterIcon = Schema_exports.Struct({
94
+ src: Schema_exports.NonEmptyString,
95
+ mimeType: Schema_exports.optionalKey(Schema_exports.String),
96
+ sizes: Schema_exports.optionalKey(Schema_exports.Array(Schema_exports.String)),
97
+ theme: Schema_exports.optionalKey(Schema_exports.Literals(["light", "dark"]))
98
+ });
99
+ var RouterMeta = Schema_exports.Struct({
100
+ title: Schema_exports.optionalKey(Schema_exports.String),
101
+ description: Schema_exports.optionalKey(Schema_exports.String),
102
+ instructions: Schema_exports.optionalKey(Schema_exports.String),
103
+ icons: Schema_exports.optionalKey(Schema_exports.Array(RouterIcon)),
104
+ tags: Schema_exports.optionalKey(Schema_exports.Record(Schema_exports.NonEmptyString, Schema_exports.String))
105
+ });
78
106
 
79
107
  // src/contracts/tools.ts
80
108
  var ToolAnnotations = Schema_exports.Struct({
@@ -113,11 +141,17 @@ var McpToolsOptions = Schema_exports.Struct({
113
141
  )
114
142
  )
115
143
  });
144
+ var McpHealthInput = Schema_exports.Struct({
145
+ ...McpToolsOptions.fields,
146
+ headers: Schema_exports.Record(Schema_exports.String, Schema_exports.String),
147
+ deadline: Schema_exports.optional(Schema_exports.Finite)
148
+ });
149
+ var mcpHealthReserveMs = 2 * defaultMcpClientLimits.cleanupTimeoutMs + 250;
116
150
  var McpToolResult = Schema_exports.Struct({
117
151
  content: Schema_exports.Array(JsonObject2),
118
- structuredContent: Schema_exports.optional(JsonObject2),
119
- isError: Schema_exports.optional(Schema_exports.Boolean),
120
- _meta: Schema_exports.optional(JsonObject2)
152
+ structuredContent: Schema_exports.optionalKey(JsonObject2),
153
+ isError: Schema_exports.optionalKey(Schema_exports.Boolean),
154
+ _meta: Schema_exports.optionalKey(JsonObject2)
121
155
  });
122
156
  var McpToolMetadata = Schema_exports.Struct({
123
157
  name: Schema_exports.String,
@@ -128,6 +162,15 @@ var McpToolMetadata = Schema_exports.Struct({
128
162
  annotations: Schema_exports.optional(ToolAnnotations),
129
163
  _meta: Schema_exports.optional(JsonObject2)
130
164
  });
165
+ var McpServerHeader = Schema_exports.Struct({
166
+ name: Schema_exports.optionalKey(Schema_exports.String),
167
+ title: Schema_exports.optionalKey(Schema_exports.String),
168
+ version: Schema_exports.optionalKey(Schema_exports.String),
169
+ description: Schema_exports.optionalKey(Schema_exports.String),
170
+ websiteUrl: Schema_exports.optionalKey(Schema_exports.String),
171
+ icons: Schema_exports.optionalKey(Schema_exports.Array(RouterIcon)),
172
+ instructions: Schema_exports.optionalKey(Schema_exports.String)
173
+ });
131
174
  var McpError = class extends Schema_exports.TaggedError()("McpError", {
132
175
  phase: Schema_exports.Literals(["connect", "discover", "call", "schema", "transport"]),
133
176
  reason: Schema_exports.Literals([
@@ -137,9 +180,15 @@ var McpError = class extends Schema_exports.TaggedError()("McpError", {
137
180
  "timeout",
138
181
  "invalid_input"
139
182
  ]),
140
- status: Schema_exports.optional(Schema_exports.Number)
183
+ status: Schema_exports.optional(Schema_exports.Number),
184
+ upstream: Schema_exports.optional(UpstreamError)
141
185
  }) {
142
186
  };
187
+ var McpCredentialsUnverified = class extends Schema_exports.TaggedError()(
188
+ "McpCredentialsUnverified",
189
+ { anonymous: Schema_exports.Union([Schema_exports.Literal("answered"), McpError, ProviderError]) }
190
+ ) {
191
+ };
143
192
  var ProcessConfig = Schema_exports.Struct({
144
193
  command: Schema_exports.NonEmptyString,
145
194
  args: Schema_exports.Array(Schema_exports.String),
@@ -150,6 +199,115 @@ var ProcessConfig = Schema_exports.Struct({
150
199
  )
151
200
  });
152
201
 
202
+ // src/contracts/api-response-error.ts
203
+ var maxApiErrorInstructionsLength = 4096;
204
+ var ApiErrorRecovery = Schema_exports.Struct({
205
+ action: Schema_exports.NonEmptyString.check(Schema_exports.isMaxLength(1024)),
206
+ instructions: Schema_exports.NonEmptyString.check(Schema_exports.isMaxLength(maxApiErrorInstructionsLength))
207
+ });
208
+ var maxApiErrorMessageLength = 4096;
209
+ var ApiErrorResponse = Schema_exports.Struct({
210
+ code: Schema_exports.NonEmptyString.check(Schema_exports.isMaxLength(128)),
211
+ status: Schema_exports.Int.check(Schema_exports.isBetween({ minimum: 400, maximum: 599 })),
212
+ message: Schema_exports.NonEmptyString.check(Schema_exports.isMaxLength(maxApiErrorMessageLength)),
213
+ recovery: Schema_exports.optionalKey(ApiErrorRecovery)
214
+ });
215
+ var OpenapiResponseError = class extends Schema_exports.TaggedError()(
216
+ "OpenapiResponseError",
217
+ ApiErrorResponse.fields
218
+ ) {
219
+ };
220
+ var OpenapiErrorLimits = Schema_exports.Struct({
221
+ maxBodyBytes: Schema_exports.Int.check(Schema_exports.isGreaterThan(0)),
222
+ readTimeoutMs: Schema_exports.Int.check(Schema_exports.isGreaterThan(0))
223
+ });
224
+ var defaultOpenapiErrorLimits = OpenapiErrorLimits.make({
225
+ maxBodyBytes: 65536,
226
+ readTimeoutMs: 2e3
227
+ });
228
+
229
+ // src/contracts/network.ts
230
+ var NetworkRefusal = Schema_exports.Union([
231
+ Schema_exports.Struct({ reason: Schema_exports.Literal("private_address") }),
232
+ Schema_exports.Struct({
233
+ reason: Schema_exports.Literal("credential_host"),
234
+ /** The provider of the credential handle the request carried. */
235
+ provider: Schema_exports.String,
236
+ /** The hosts that provider's credentials may reach; empty when it declares none. */
237
+ allowedHosts: Schema_exports.Array(Schema_exports.String)
238
+ }),
239
+ Schema_exports.Struct({ reason: Schema_exports.Literal("credential_app") }),
240
+ Schema_exports.Struct({
241
+ reason: Schema_exports.Literal("credential_expired"),
242
+ /** The provider of the expired credential handle. */
243
+ provider: Schema_exports.String
244
+ })
245
+ ]);
246
+ var NetworkRefused = class extends Schema_exports.TaggedError()("NetworkRefused", {
247
+ /** The refused destination, with its port when the URL names one. */
248
+ host: Schema_exports.String,
249
+ refusal: NetworkRefusal
250
+ }) {
251
+ get message() {
252
+ const refusal = this.refusal;
253
+ switch (refusal.reason) {
254
+ case "private_address":
255
+ return `Executor refused a request to ${this.host}: apps on this instance can reach only public addresses, and ${this.host} is a private, loopback or internal address. The request was not sent.`;
256
+ case "credential_host":
257
+ return refusal.allowedHosts.length === 0 ? `Executor refused this request: ${refusal.provider} credentials cannot be sent to ${this.host}: the provider declares no hosts.` : `Executor refused this request: ${refusal.provider} credentials cannot be sent to ${this.host}. The provider allows: ${refusal.allowedHosts.join(", ")}.`;
258
+ case "credential_app":
259
+ return "Executor refused this request: it carries a credential handle that is not valid for this app. Use the account fields this invocation received.";
260
+ case "credential_expired":
261
+ return `Executor refused this request: it carries an expired ${refusal.provider} credential handle. Use the account fields this invocation received.`;
262
+ }
263
+ }
264
+ };
265
+ var networkRefusalStatus = 421;
266
+ var networkRefusalHeader = "x-executor-refused";
267
+ var NetworkRefusedHeader = Schema_exports.StringFromUriComponent.pipe(
268
+ Schema_exports.decodeTo(Schema_exports.fromJsonString(NetworkRefused))
269
+ );
270
+ var encodeRefusal = Schema_exports.encodeSync(NetworkRefused);
271
+ var encodeRefusalHeader = Schema_exports.encodeSync(NetworkRefusedHeader);
272
+ var networkRefusalResponse = (refused) => new Response(JSON.stringify({ ...encodeRefusal(refused), message: refused.message }), {
273
+ status: networkRefusalStatus,
274
+ statusText: "Refused by Executor",
275
+ headers: {
276
+ "content-type": "application/json; charset=utf-8",
277
+ [networkRefusalHeader]: encodeRefusalHeader(refused)
278
+ }
279
+ });
280
+ var RestrictedFetchOption = Schema_exports.Literals(["redirect", "cache", "integrity"]);
281
+ var supportedFetchOptions = {
282
+ redirect: ["follow", "manual"],
283
+ cache: ["no-store", "no-cache"],
284
+ integrity: [""]
285
+ };
286
+ var FetchOptionUnsupported = class extends Schema_exports.TaggedError()(
287
+ "FetchOptionUnsupported",
288
+ {
289
+ option: RestrictedFetchOption,
290
+ value: Schema_exports.String,
291
+ supported: Schema_exports.Array(Schema_exports.String)
292
+ }
293
+ ) {
294
+ get message() {
295
+ const supported = this.supported.map((value) => JSON.stringify(value)).join(" or ");
296
+ return `fetch option ${this.option}: ${JSON.stringify(this.value)} is not supported by Executor's app runtime. Use ${supported}, or omit ${this.option}.${this.advice}`;
297
+ }
298
+ /** What to do instead, when the standard value has an equivalent the runtime supports. */
299
+ get advice() {
300
+ switch (this.option) {
301
+ case "redirect":
302
+ return this.value === "error" ? ` To reject redirects, send redirect: "manual" and treat a 3xx response as the error.` : "";
303
+ case "cache":
304
+ return "";
305
+ case "integrity":
306
+ return " To check a digest, read the body and hash it with crypto.subtle.digest.";
307
+ }
308
+ }
309
+ };
310
+
153
311
  // src/contracts/workflows.ts
154
312
  var WorkflowRunId = Schema_exports.NonEmptyString.pipe(Schema_exports.brand("wfr"));
155
313
  var WorkflowName = Schema_exports.NonEmptyString.check(Schema_exports.isMaxLength(200));
@@ -191,7 +349,14 @@ var WorkflowStepOptions = Schema_exports.Struct({
191
349
  ),
192
350
  timeout: Schema_exports.optionalKey(WorkflowDuration)
193
351
  });
352
+ var WorkflowFailureDetail = {
353
+ step: Schema_exports.optionalKey(Schema_exports.String.check(Schema_exports.isMaxLength(200))),
354
+ errorName: Schema_exports.optionalKey(FailureName),
355
+ message: Schema_exports.optionalKey(FailureMessage)
356
+ };
357
+ var WorkflowRunFailure = Schema_exports.Struct(WorkflowFailureDetail);
194
358
  var WorkflowFailure = class extends Schema_exports.TaggedError()("WorkflowFailure", {
359
+ ...WorkflowFailureDetail,
195
360
  reason: Schema_exports.Literals([
196
361
  "unavailable",
197
362
  "not_found",
@@ -239,7 +404,9 @@ var WorkflowRun = Schema_exports.Union([
239
404
  Schema_exports.Struct({
240
405
  ...runFields,
241
406
  status: Schema_exports.Literal("errored"),
242
- error: WorkflowFailure.fields.reason
407
+ error: WorkflowFailure.fields.reason,
408
+ /** The failing step and the app's own error, when the run recorded them. */
409
+ failure: Schema_exports.optionalKey(WorkflowRunFailure)
243
410
  }),
244
411
  Schema_exports.Struct({ ...runFields, status: Schema_exports.Literal("terminated") })
245
412
  ]);
@@ -1736,7 +1903,7 @@ var OAuthSecretClientAuth = Schema_exports.Literals([
1736
1903
  "client_secret_basic",
1737
1904
  "client_secret_basic_raw"
1738
1905
  ]);
1739
- var reservedAuthorizationParams = /* @__PURE__ */ new Set([
1906
+ var reservedAuthorizationParams = [
1740
1907
  "response_type",
1741
1908
  "client_id",
1742
1909
  "redirect_uri",
@@ -1748,17 +1915,55 @@ var reservedAuthorizationParams = /* @__PURE__ */ new Set([
1748
1915
  "resource",
1749
1916
  "request",
1750
1917
  "request_uri"
1751
- ]);
1918
+ ];
1919
+ var reserved = new Set(reservedAuthorizationParams);
1752
1920
  var OAuthAuthorizationParams = Schema_exports.Record(Schema_exports.String, Schema_exports.String).check(
1753
- Schema_exports.makeFilter(
1754
- (params) => Object.keys(params).every((key) => !reservedAuthorizationParams.has(key)),
1755
- {
1756
- message: "Authorization parameters cannot replace protocol parameters such as state or scope."
1757
- }
1758
- )
1921
+ Schema_exports.makeFilter((params) => Object.keys(params).every((key) => !reserved.has(key)), {
1922
+ message: "Authorization parameters cannot replace protocol parameters such as state or scope."
1923
+ })
1924
+ );
1925
+ var declaredAuthorizationQuery = Schema_exports.makeFilter(
1926
+ (config) => {
1927
+ const keys = [...new URL(config.authorizationUrl).searchParams.keys()];
1928
+ const owned = keys.filter((key) => reserved.has(key));
1929
+ if (owned.length > 0)
1930
+ return {
1931
+ path: ["authorizationUrl"],
1932
+ issue: `authorizationUrl cannot set protocol parameters: ${owned.join(", ")}.`
1933
+ };
1934
+ const repeated = keys.filter((key) => Object.hasOwn(config.authorizationParams ?? {}, key));
1935
+ if (repeated.length > 0)
1936
+ return {
1937
+ path: ["authorizationParams"],
1938
+ issue: `Declare each parameter once; authorizationUrl already sets: ${repeated.join(", ")}.`
1939
+ };
1940
+ return void 0;
1941
+ }
1759
1942
  );
1943
+ var OAuthTokenRequestFormat = Schema_exports.Literals(["form", "json"]);
1944
+ var OAuthTokenResponse = Schema_exports.Struct({
1945
+ path: Schema_exports.String.check(Schema_exports.isPattern(/^[^.]+(\.[^.]+)*$/))
1946
+ });
1947
+ var tokenRequestOptions = {
1948
+ /** Joins requested scopes; Linear wants `","`. Defaults to RFC 6749's space. */
1949
+ scopeSeparator: Schema_exports.optionalKey(Schema_exports.String.check(Schema_exports.isMinLength(1))),
1950
+ /** Encoding of token requests. Defaults to `"form"`; Atlassian, ClickUp and Notion need `"json"`. */
1951
+ tokenRequestFormat: Schema_exports.optionalKey(OAuthTokenRequestFormat)
1952
+ };
1760
1953
  var oauthOptions = {
1954
+ ...tokenRequestOptions,
1955
+ /**
1956
+ * Read the grant from this nested member of the token response when the top-level response has
1957
+ * no access token or no scope. Slack's user tokens use `{ path: "authed_user" }`.
1958
+ */
1959
+ tokenResponse: Schema_exports.optionalKey(OAuthTokenResponse),
1761
1960
  grant: Schema_exports.optionalKey(Schema_exports.Literal("authorization_code")),
1961
+ /**
1962
+ * Service-defined authorization request parameters, such as Google's
1963
+ * `{ access_type: "offline", prompt: "consent" }`. Host-owned protocol parameters
1964
+ * (`state`, `scope`, `redirect_uri`, PKCE and the others in `reservedAuthorizationParams`)
1965
+ * are rejected. A discovered endpoint's own query parameter of the same name is replaced.
1966
+ */
1762
1967
  authorizationParams: Schema_exports.optionalKey(OAuthAuthorizationParams),
1763
1968
  tokenEndpointAuthMethod: Schema_exports.optionalKey(OAuthClientAuth),
1764
1969
  /** Omitted uses discovery; null explicitly suppresses the resource parameter. */
@@ -1768,6 +1973,8 @@ var OAuth2Config = Schema_exports.Union([
1768
1973
  Schema_exports.Struct({
1769
1974
  ...oauthOptions,
1770
1975
  discover: HttpUrl,
1976
+ /** Fetch this exact metadata document and verify its issuer against discovery. */
1977
+ authorizationServerMetadataUrl: Schema_exports.optionalKey(HttpUrl),
1771
1978
  authorizationUrl: Schema_exports.optionalKey(Schema_exports.Never),
1772
1979
  tokenUrl: Schema_exports.optionalKey(Schema_exports.Never),
1773
1980
  revocationUrl: Schema_exports.optionalKey(Schema_exports.Never),
@@ -1775,21 +1982,26 @@ var OAuth2Config = Schema_exports.Union([
1775
1982
  }),
1776
1983
  Schema_exports.Struct({
1777
1984
  ...oauthOptions,
1985
+ /** Its query is kept; it cannot set protocol parameters or repeat `authorizationParams`. */
1778
1986
  authorizationUrl: HttpUrl,
1779
1987
  tokenUrl: HttpUrl,
1780
1988
  revocationUrl: Schema_exports.optionalKey(HttpUrl),
1781
1989
  scopes: Schema_exports.Array(Schema_exports.String),
1782
1990
  /** RFC 8414 issuer identifier. Declared issuers are checked against the callback's `iss`. */
1783
1991
  issuer: Schema_exports.optionalKey(HttpUrl),
1784
- discover: Schema_exports.optionalKey(Schema_exports.Never)
1785
- }),
1992
+ discover: Schema_exports.optionalKey(Schema_exports.Never),
1993
+ authorizationServerMetadataUrl: Schema_exports.optionalKey(Schema_exports.Never)
1994
+ }).check(declaredAuthorizationQuery),
1786
1995
  Schema_exports.Struct({
1787
1996
  grant: Schema_exports.Literal("client_credentials"),
1788
1997
  discover: HttpUrl,
1998
+ /** Fetch this exact metadata document and verify its issuer against discovery. */
1999
+ authorizationServerMetadataUrl: Schema_exports.optionalKey(HttpUrl),
1789
2000
  authorizationUrl: Schema_exports.optionalKey(Schema_exports.Never),
1790
2001
  tokenUrl: Schema_exports.optionalKey(Schema_exports.Never),
1791
2002
  revocationUrl: Schema_exports.optionalKey(Schema_exports.Never),
1792
2003
  scopes: Schema_exports.optionalKey(Schema_exports.Array(Schema_exports.String)),
2004
+ ...tokenRequestOptions,
1793
2005
  tokenEndpointAuthMethod: OAuthSecretClientAuth,
1794
2006
  resource: Schema_exports.optionalKey(Schema_exports.NullOr(HttpUrl))
1795
2007
  }),
@@ -1798,10 +2010,12 @@ var OAuth2Config = Schema_exports.Union([
1798
2010
  tokenUrl: HttpUrl,
1799
2011
  revocationUrl: Schema_exports.optionalKey(HttpUrl),
1800
2012
  scopes: Schema_exports.Array(Schema_exports.String),
2013
+ ...tokenRequestOptions,
1801
2014
  tokenEndpointAuthMethod: OAuthSecretClientAuth,
1802
2015
  resource: Schema_exports.optionalKey(Schema_exports.NullOr(HttpUrl)),
1803
2016
  authorizationUrl: Schema_exports.optionalKey(Schema_exports.Never),
1804
- discover: Schema_exports.optionalKey(Schema_exports.Never)
2017
+ discover: Schema_exports.optionalKey(Schema_exports.Never),
2018
+ authorizationServerMetadataUrl: Schema_exports.optionalKey(Schema_exports.Never)
1805
2019
  })
1806
2020
  ]);
1807
2021
  var OAuth2AccessToken = Schema_exports.Struct({ access_token: Schema_exports.String });
@@ -1809,6 +2023,16 @@ var OAuth2Method = class extends Data_exports.TaggedClass(
1809
2023
  "oauth2"
1810
2024
  ) {
1811
2025
  };
2026
+ var displayText = Schema_exports.String.check(Schema_exports.isMinLength(1), Schema_exports.isMaxLength(255));
2027
+ var AccountInfo = Schema_exports.Struct({
2028
+ externalId: Schema_exports.optionalKey(displayText),
2029
+ displayName: Schema_exports.optionalKey(displayText),
2030
+ username: Schema_exports.optionalKey(displayText),
2031
+ email: Schema_exports.optionalKey(displayText),
2032
+ avatarUrl: Schema_exports.optionalKey(HttpUrl),
2033
+ profileUrl: Schema_exports.optionalKey(HttpUrl)
2034
+ });
2035
+ var AccountCheckResult = Schema_exports.Struct({ accountInfo: Schema_exports.optionalKey(AccountInfo) });
1812
2036
  var Provider = class extends Data_exports.Class {
1813
2037
  /** Declare zero or more accounts from this provider without performing I/O. */
1814
2038
  many() {
@@ -1819,7 +2043,129 @@ var ManyAccounts = class extends Data_exports.TaggedClass("many") {
1819
2043
  };
1820
2044
 
1821
2045
  // src/contracts/protocol-version.ts
1822
- var frameworkProtocol = 1;
2046
+ var frameworkProtocol = 8;
2047
+
2048
+ // src/contracts/protocols/oauth.ts
2049
+ var OAuthClientAuth2 = Schema_exports.Literals([
2050
+ "none",
2051
+ "client_secret_post",
2052
+ "client_secret_basic",
2053
+ "client_secret_basic_raw"
2054
+ ]);
2055
+ var OAuthSecretClientAuth2 = Schema_exports.Literals([
2056
+ "client_secret_post",
2057
+ "client_secret_basic",
2058
+ "client_secret_basic_raw"
2059
+ ]);
2060
+ var reservedAuthorizationParams2 = [
2061
+ "response_type",
2062
+ "client_id",
2063
+ "redirect_uri",
2064
+ "state",
2065
+ "scope",
2066
+ "code_challenge",
2067
+ "code_challenge_method",
2068
+ "nonce",
2069
+ "resource",
2070
+ "request",
2071
+ "request_uri"
2072
+ ];
2073
+ var reserved2 = new Set(reservedAuthorizationParams2);
2074
+ var OAuthAuthorizationParams2 = Schema_exports.Record(Schema_exports.String, Schema_exports.String).check(
2075
+ Schema_exports.makeFilter((params) => Object.keys(params).every((key) => !reserved2.has(key)), {
2076
+ message: "Authorization parameters cannot replace protocol parameters such as state or scope."
2077
+ })
2078
+ );
2079
+ var declaredAuthorizationQuery2 = Schema_exports.makeFilter(
2080
+ (config) => {
2081
+ const keys = [...new URL(config.authorizationUrl).searchParams.keys()];
2082
+ const owned = keys.filter((key) => reserved2.has(key));
2083
+ if (owned.length > 0)
2084
+ return {
2085
+ path: ["authorizationUrl"],
2086
+ issue: `authorizationUrl cannot set protocol parameters: ${owned.join(", ")}.`
2087
+ };
2088
+ const repeated = keys.filter((key) => Object.hasOwn(config.authorizationParams ?? {}, key));
2089
+ if (repeated.length > 0)
2090
+ return {
2091
+ path: ["authorizationParams"],
2092
+ issue: `Declare each parameter once; authorizationUrl already sets: ${repeated.join(", ")}.`
2093
+ };
2094
+ return void 0;
2095
+ }
2096
+ );
2097
+ var OAuthTokenRequestFormat2 = Schema_exports.Literals(["form", "json"]);
2098
+ var OAuthTokenResponse2 = Schema_exports.Struct({
2099
+ path: Schema_exports.String.check(Schema_exports.isPattern(/^[^.]+(\.[^.]+)*$/))
2100
+ });
2101
+ var tokenRequestOptions2 = {
2102
+ /** Joins requested scopes; Linear wants `","`. Defaults to RFC 6749's space. */
2103
+ scopeSeparator: Schema_exports.optionalKey(Schema_exports.String.check(Schema_exports.isMinLength(1))),
2104
+ /** Encoding of token requests. Defaults to `"form"`; Atlassian, ClickUp and Notion need `"json"`. */
2105
+ tokenRequestFormat: Schema_exports.optionalKey(OAuthTokenRequestFormat2)
2106
+ };
2107
+ var oauthOptions2 = {
2108
+ ...tokenRequestOptions2,
2109
+ /**
2110
+ * Read the grant from this nested member of the token response when the top-level response has
2111
+ * no access token or no scope. Slack's user tokens use `{ path: "authed_user" }`.
2112
+ */
2113
+ tokenResponse: Schema_exports.optionalKey(OAuthTokenResponse2),
2114
+ grant: Schema_exports.optionalKey(Schema_exports.Literal("authorization_code")),
2115
+ /**
2116
+ * Service-defined authorization request parameters, such as Google's
2117
+ * `{ access_type: "offline", prompt: "consent" }`. Host-owned protocol parameters
2118
+ * (`state`, `scope`, `redirect_uri`, PKCE and the others in `reservedAuthorizationParams`)
2119
+ * are rejected. A discovered endpoint's own query parameter of the same name is replaced.
2120
+ */
2121
+ authorizationParams: Schema_exports.optionalKey(OAuthAuthorizationParams2),
2122
+ tokenEndpointAuthMethod: Schema_exports.optionalKey(OAuthClientAuth2),
2123
+ /** Omitted uses discovery; null explicitly suppresses the resource parameter. */
2124
+ resource: Schema_exports.optionalKey(Schema_exports.NullOr(HttpUrl))
2125
+ };
2126
+ var OAuth2Config2 = Schema_exports.Union([
2127
+ Schema_exports.Struct({
2128
+ ...oauthOptions2,
2129
+ discover: HttpUrl,
2130
+ authorizationUrl: Schema_exports.optionalKey(Schema_exports.Never),
2131
+ tokenUrl: Schema_exports.optionalKey(Schema_exports.Never),
2132
+ revocationUrl: Schema_exports.optionalKey(Schema_exports.Never),
2133
+ scopes: Schema_exports.optionalKey(Schema_exports.Array(Schema_exports.String))
2134
+ }),
2135
+ Schema_exports.Struct({
2136
+ ...oauthOptions2,
2137
+ /** Its query is kept; it cannot set protocol parameters or repeat `authorizationParams`. */
2138
+ authorizationUrl: HttpUrl,
2139
+ tokenUrl: HttpUrl,
2140
+ revocationUrl: Schema_exports.optionalKey(HttpUrl),
2141
+ scopes: Schema_exports.Array(Schema_exports.String),
2142
+ /** RFC 8414 issuer identifier. Declared issuers are checked against the callback's `iss`. */
2143
+ issuer: Schema_exports.optionalKey(HttpUrl),
2144
+ discover: Schema_exports.optionalKey(Schema_exports.Never)
2145
+ }).check(declaredAuthorizationQuery2),
2146
+ Schema_exports.Struct({
2147
+ grant: Schema_exports.Literal("client_credentials"),
2148
+ discover: HttpUrl,
2149
+ authorizationUrl: Schema_exports.optionalKey(Schema_exports.Never),
2150
+ tokenUrl: Schema_exports.optionalKey(Schema_exports.Never),
2151
+ revocationUrl: Schema_exports.optionalKey(Schema_exports.Never),
2152
+ scopes: Schema_exports.optionalKey(Schema_exports.Array(Schema_exports.String)),
2153
+ ...tokenRequestOptions2,
2154
+ tokenEndpointAuthMethod: OAuthSecretClientAuth2,
2155
+ resource: Schema_exports.optionalKey(Schema_exports.NullOr(HttpUrl))
2156
+ }),
2157
+ Schema_exports.Struct({
2158
+ grant: Schema_exports.Literal("client_credentials"),
2159
+ tokenUrl: HttpUrl,
2160
+ revocationUrl: Schema_exports.optionalKey(HttpUrl),
2161
+ scopes: Schema_exports.Array(Schema_exports.String),
2162
+ ...tokenRequestOptions2,
2163
+ tokenEndpointAuthMethod: OAuthSecretClientAuth2,
2164
+ resource: Schema_exports.optionalKey(Schema_exports.NullOr(HttpUrl)),
2165
+ authorizationUrl: Schema_exports.optionalKey(Schema_exports.Never),
2166
+ discover: Schema_exports.optionalKey(Schema_exports.Never)
2167
+ })
2168
+ ]);
1823
2169
 
1824
2170
  // src/contracts/schedules.ts
1825
2171
  var minimumIntervalMilliseconds = 6e4;
@@ -1857,26 +2203,65 @@ var OperationSchedule = Schema_exports.Struct({
1857
2203
  });
1858
2204
 
1859
2205
  // src/contracts/protocols/1.ts
2206
+ var ProviderError2 = class extends Schema_exports.TaggedError()("ProviderError", {
2207
+ reason: Schema_exports.Literals(["unauthorized", "forbidden", "rate_limited", "unavailable", "rejected"]),
2208
+ status: Schema_exports.optional(Schema_exports.Int.check(Schema_exports.isBetween({ minimum: 100, maximum: 599 }))),
2209
+ accountId: Schema_exports.optional(AccountId)
2210
+ }) {
2211
+ };
2212
+ var McpError3 = class extends Schema_exports.TaggedError()("McpError", {
2213
+ phase: Schema_exports.Literals(["connect", "discover", "call", "schema", "transport"]),
2214
+ reason: Schema_exports.Literals([
2215
+ "request",
2216
+ "unauthorized",
2217
+ "invalid_response",
2218
+ "timeout",
2219
+ "invalid_input"
2220
+ ]),
2221
+ status: Schema_exports.optional(Schema_exports.Number)
2222
+ }) {
2223
+ };
2224
+ var WorkflowFailure2 = class extends Schema_exports.TaggedError()("WorkflowFailure", {
2225
+ reason: Schema_exports.Literals([
2226
+ "unavailable",
2227
+ "not_found",
2228
+ "input",
2229
+ "output",
2230
+ "operation",
2231
+ "approval",
2232
+ "credentials",
2233
+ "terminated",
2234
+ "execution",
2235
+ "conflict",
2236
+ "engine"
2237
+ ]),
2238
+ retryable: Schema_exports.Boolean
2239
+ }) {
2240
+ };
2241
+ var WorkflowRpcResult2 = Schema_exports.Union([
2242
+ Schema_exports.Struct({ ok: Schema_exports.Literal(true), value: JsonValue }),
2243
+ Schema_exports.Struct({ ok: Schema_exports.Literal(false), error: WorkflowFailure2 })
2244
+ ]);
1860
2245
  var DeclaredAuthMethod = Schema_exports.Union([
1861
2246
  Schema_exports.Struct({ type: Schema_exports.Literal("secrets"), label: Schema_exports.String, fields: JsonObject2 }),
1862
2247
  Schema_exports.Struct({
1863
2248
  type: Schema_exports.Literal("oauth2"),
1864
- ...OAuth2Config.members[0].fields,
2249
+ ...OAuth2Config2.members[0].fields,
1865
2250
  response: JsonObject2
1866
2251
  }),
1867
2252
  Schema_exports.Struct({
1868
2253
  type: Schema_exports.Literal("oauth2"),
1869
- ...OAuth2Config.members[1].fields,
2254
+ ...OAuth2Config2.members[1].fields,
1870
2255
  response: JsonObject2
1871
2256
  }),
1872
2257
  Schema_exports.Struct({
1873
2258
  type: Schema_exports.Literal("oauth2"),
1874
- ...OAuth2Config.members[2].fields,
2259
+ ...OAuth2Config2.members[2].fields,
1875
2260
  response: JsonObject2
1876
2261
  }),
1877
2262
  Schema_exports.Struct({
1878
2263
  type: Schema_exports.Literal("oauth2"),
1879
- ...OAuth2Config.members[3].fields,
2264
+ ...OAuth2Config2.members[3].fields,
1880
2265
  response: JsonObject2
1881
2266
  })
1882
2267
  ]);
@@ -2038,10 +2423,10 @@ var HostOutputInvalid = class extends Schema_exports.TaggedError()(
2038
2423
  };
2039
2424
  var HostError = Schema_exports.Union([
2040
2425
  OpenapiResponseError,
2041
- ProviderError,
2042
- McpError,
2426
+ ProviderError2,
2427
+ McpError3,
2043
2428
  SkillLoadFailed,
2044
- WorkflowFailure,
2429
+ WorkflowFailure2,
2045
2430
  HostRequestInvalid,
2046
2431
  HostAccountsInvalid,
2047
2432
  HostDeclarationInvalid,
@@ -2085,6 +2470,217 @@ var protocol1 = {
2085
2470
  elicitationRequest: FormElicitation,
2086
2471
  elicitationReply: ElicitationReply,
2087
2472
  workflowStep: WorkflowRpcCommand,
2473
+ workflowStepReply: WorkflowRpcResult2,
2474
+ workflowControl: WorkflowControlCommand,
2475
+ cacheCommand: CacheCommand,
2476
+ cacheReply: CacheReply
2477
+ }
2478
+ };
2479
+
2480
+ // src/contracts/protocols/2.ts
2481
+ var SkillSources2 = Schema_exports.Struct({
2482
+ skills: AppSkills,
2483
+ dynamic: Schema_exports.Boolean,
2484
+ cached: Schema_exports.optionalKey(Schema_exports.Boolean)
2485
+ });
2486
+ var SkillCatalogResponse2 = Schema_exports.Union([SkillSources2, AppSkills]);
2487
+ var protocol2 = {
2488
+ version: 2,
2489
+ schemas: { ...protocol1.schemas, skills: SkillCatalogResponse2 }
2490
+ };
2491
+
2492
+ // src/contracts/protocols/3.ts
2493
+ var FailureDetail2 = {
2494
+ source: Schema_exports.optionalKey(FailureSource),
2495
+ errorName: Schema_exports.optionalKey(FailureName),
2496
+ code: Schema_exports.optionalKey(FailureCode),
2497
+ message: Schema_exports.optionalKey(FailureMessage)
2498
+ };
2499
+ var HostDeclarationInvalid2 = class extends Schema_exports.TaggedError()(
2500
+ "HostDeclarationInvalid",
2501
+ FailureDetail2
2502
+ ) {
2503
+ };
2504
+ var HostEvaluationFailed2 = class extends Schema_exports.TaggedError()(
2505
+ "HostEvaluationFailed",
2506
+ FailureDetail2
2507
+ ) {
2508
+ };
2509
+ var HostOperationFailed2 = class extends Schema_exports.TaggedError()(
2510
+ "HostOperationFailed",
2511
+ FailureDetail2
2512
+ ) {
2513
+ };
2514
+ var HostError2 = Schema_exports.Union([
2515
+ OpenapiResponseError,
2516
+ ProviderError2,
2517
+ McpError3,
2518
+ SkillLoadFailed,
2519
+ WorkflowFailure,
2520
+ HostRequestInvalid,
2521
+ HostAccountsInvalid,
2522
+ HostDeclarationInvalid2,
2523
+ HostEvaluationFailed2,
2524
+ HostOperationNotFound,
2525
+ HostOperationFailed2,
2526
+ DatabaseLimitExceeded,
2527
+ DatabaseFieldReserved,
2528
+ HostToolNotFound,
2529
+ HostInputInvalid,
2530
+ HostOutputInvalid,
2531
+ HostToolBlocked,
2532
+ HostToolApprovalRequired,
2533
+ HostToolPolicyFailed,
2534
+ ElicitationFailed
2535
+ ]);
2536
+ var HostResponse2 = Schema_exports.Union([
2537
+ Schema_exports.Struct({
2538
+ ok: Schema_exports.Literal(true),
2539
+ value: JsonValue,
2540
+ toolError: Schema_exports.optionalKey(Schema_exports.Literal(true))
2541
+ }),
2542
+ Schema_exports.Struct({ ok: Schema_exports.Literal(false), error: HostError2 })
2543
+ ]);
2544
+ var protocol3 = {
2545
+ version: 3,
2546
+ schemas: {
2547
+ invocation: HostInvocation,
2548
+ request: HostRequest,
2549
+ response: HostResponse2,
2550
+ requirements: DeclaredRequirements,
2551
+ tools: Schema_exports.Array(HostedTool),
2552
+ toolSummaries: Schema_exports.Array(HostedToolSummary),
2553
+ skills: SkillCatalogResponse2,
2554
+ elicitationRequest: FormElicitation,
2555
+ elicitationReply: ElicitationReply,
2556
+ workflowStep: WorkflowRpcCommand,
2557
+ workflowStepReply: WorkflowRpcResult,
2558
+ workflowControl: WorkflowControlCommand,
2559
+ cacheCommand: CacheCommand,
2560
+ cacheReply: CacheReply
2561
+ }
2562
+ };
2563
+
2564
+ // src/contracts/protocols/4.ts
2565
+ var HostedTool2 = Schema_exports.Struct({
2566
+ schedules: Schema_exports.optionalKey(Schema_exports.Array(OperationSchedule)),
2567
+ name: Schema_exports.NonEmptyString,
2568
+ router: Schema_exports.optionalKey(Schema_exports.NonEmptyString),
2569
+ tags: Schema_exports.optionalKey(Schema_exports.Array(Schema_exports.NonEmptyString)),
2570
+ description: Schema_exports.String,
2571
+ inputSchema: JsonObject2,
2572
+ readOnly: Schema_exports.optionalKey(Schema_exports.Boolean),
2573
+ title: Schema_exports.optionalKey(Schema_exports.String),
2574
+ outputSchema: Schema_exports.optionalKey(JsonObject2),
2575
+ annotations: Schema_exports.optionalKey(ToolAnnotations),
2576
+ _meta: Schema_exports.optionalKey(JsonObject2)
2577
+ });
2578
+ var HostedToolSummary2 = HostedTool2.mapFields(
2579
+ ({ inputSchema: _input, outputSchema: _output, _meta, ...fields }) => fields
2580
+ );
2581
+ var HostRouterError = Schema_exports.Union([
2582
+ ProviderError2,
2583
+ McpError3,
2584
+ SkillLoadFailed,
2585
+ HostDeclarationInvalid2,
2586
+ HostEvaluationFailed2
2587
+ ]);
2588
+ var HostedRouter = Schema_exports.Struct({
2589
+ path: Schema_exports.String,
2590
+ title: Schema_exports.optionalKey(Schema_exports.String),
2591
+ description: Schema_exports.optionalKey(Schema_exports.String),
2592
+ icons: Schema_exports.optionalKey(Schema_exports.Array(RouterIcon)),
2593
+ tags: Schema_exports.optionalKey(Schema_exports.Record(Schema_exports.NonEmptyString, Schema_exports.String)),
2594
+ skill: Schema_exports.optionalKey(AppSkillName),
2595
+ error: Schema_exports.optionalKey(HostRouterError)
2596
+ });
2597
+ var HostedCatalog = Schema_exports.Struct({
2598
+ tools: Schema_exports.Array(HostedTool2),
2599
+ routers: Schema_exports.Array(HostedRouter)
2600
+ });
2601
+ var HostedCatalogSummary = Schema_exports.Struct({
2602
+ tools: Schema_exports.Array(HostedToolSummary2),
2603
+ routers: Schema_exports.Array(HostedRouter)
2604
+ });
2605
+ var ToolKind = Schema_exports.Literals(["query", "mutation"]);
2606
+ var HostRequest2 = Schema_exports.Union([
2607
+ WorkflowCommand,
2608
+ WebhookCommand,
2609
+ Schema_exports.Struct({ operation: Schema_exports.Literal("requirements") }),
2610
+ Schema_exports.Struct({
2611
+ operation: Schema_exports.Literal("inspect"),
2612
+ /** Omit schemas. Only builds that declare the toolIndex capability accept this. */
2613
+ detail: Schema_exports.optionalKey(Schema_exports.Literal("summary")),
2614
+ /** Describe only these tools. Only builds that declare the toolIndex capability accept this. */
2615
+ tools: Schema_exports.optionalKey(Schema_exports.Array(Schema_exports.NonEmptyString)),
2616
+ /**
2617
+ * Describe only declared operations that have schedules, without dynamic tool discovery.
2618
+ * Only builds that declare the scheduledTools capability accept this.
2619
+ */
2620
+ scheduled: Schema_exports.optionalKey(Schema_exports.Literal(true))
2621
+ }),
2622
+ Schema_exports.Struct({
2623
+ operation: Schema_exports.Literal("skills"),
2624
+ /** Answer with SkillSources. Only builds that declare the skillSources capability accept this. */
2625
+ sources: Schema_exports.optionalKey(Schema_exports.Literal(true))
2626
+ }),
2627
+ Schema_exports.Struct({
2628
+ operation: Schema_exports.Literal("query"),
2629
+ name: Schema_exports.NonEmptyString,
2630
+ input: JsonValue
2631
+ }),
2632
+ Schema_exports.Struct({
2633
+ operation: Schema_exports.Literal("mutate"),
2634
+ name: Schema_exports.NonEmptyString,
2635
+ input: JsonValue
2636
+ }),
2637
+ Schema_exports.Struct({
2638
+ operation: Schema_exports.Literal("call"),
2639
+ tool: Schema_exports.NonEmptyString,
2640
+ /**
2641
+ * The caller's claim; the bundle rejects a call whose tool has the other kind. The host omits
2642
+ * it for a tool its catalog does not list, and then opens storage for writing.
2643
+ */
2644
+ kind: Schema_exports.optionalKey(ToolKind),
2645
+ input: JsonValue
2646
+ })
2647
+ ]);
2648
+ var HostKindMismatch = class extends Schema_exports.TaggedError()("HostKindMismatch", {
2649
+ tool: Schema_exports.NonEmptyString,
2650
+ requested: ToolKind,
2651
+ actual: ToolKind
2652
+ }) {
2653
+ };
2654
+ var HostError3 = Schema_exports.Union([...HostError2.members, HostKindMismatch]);
2655
+ var HostResponse3 = Schema_exports.Union([
2656
+ Schema_exports.Struct({
2657
+ ok: Schema_exports.Literal(true),
2658
+ value: JsonValue,
2659
+ toolError: Schema_exports.optionalKey(Schema_exports.Literal(true))
2660
+ }),
2661
+ Schema_exports.Struct({ ok: Schema_exports.Literal(false), error: HostError3 })
2662
+ ]);
2663
+ var HostInvocation2 = Schema_exports.Struct({
2664
+ command: HostRequest2,
2665
+ accounts: ResolvedAccounts,
2666
+ approval: Schema_exports.optionalKey(TrustedToolApproval),
2667
+ replay: Schema_exports.optionalKey(WorkflowReplay),
2668
+ deadline: Schema_exports.optionalKey(InvocationDeadline),
2669
+ workflowRun: Schema_exports.optionalKey(WorkflowRunId)
2670
+ });
2671
+ var protocol4 = {
2672
+ version: 4,
2673
+ schemas: {
2674
+ invocation: HostInvocation2,
2675
+ request: HostRequest2,
2676
+ response: HostResponse3,
2677
+ requirements: DeclaredRequirements,
2678
+ catalog: HostedCatalog,
2679
+ catalogSummary: HostedCatalogSummary,
2680
+ skills: SkillCatalogResponse2,
2681
+ elicitationRequest: FormElicitation,
2682
+ elicitationReply: ElicitationReply,
2683
+ workflowStep: WorkflowRpcCommand,
2088
2684
  workflowStepReply: WorkflowRpcResult,
2089
2685
  workflowControl: WorkflowControlCommand,
2090
2686
  cacheCommand: CacheCommand,
@@ -2092,28 +2688,300 @@ var protocol1 = {
2092
2688
  }
2093
2689
  };
2094
2690
 
2095
- // src/contracts/operations.ts
2096
- var OperationToolPrefixes = { query: "queries.", mutate: "mutations." };
2691
+ // src/contracts/protocols/5.ts
2692
+ var DeclaredRequirements2 = Schema_exports.Struct({
2693
+ /** Protocol support of this retained framework build, not an author-declared requirement. */
2694
+ capabilities: Schema_exports.optionalKey(
2695
+ Schema_exports.Struct({
2696
+ skills: Schema_exports.Literal(true),
2697
+ toolIndex: Schema_exports.optionalKey(Schema_exports.Literal(true)),
2698
+ skillSources: Schema_exports.optionalKey(Schema_exports.Literal(true)),
2699
+ scheduledTools: Schema_exports.optionalKey(Schema_exports.Literal(true))
2700
+ })
2701
+ ),
2702
+ database: Schema_exports.optionalKey(DatabaseSchema),
2703
+ accounts: Schema_exports.Record(
2704
+ Schema_exports.NonEmptyString,
2705
+ Schema_exports.Struct({
2706
+ definition: DeclaredProvider,
2707
+ cardinality: Schema_exports.Literals(["one", "many"]),
2708
+ /**
2709
+ * The slot's provider defines an account check. Kept beside the definition, not in it, so
2710
+ * adding or editing a check never changes the provider's identity.
2711
+ */
2712
+ health: Schema_exports.optionalKey(Schema_exports.Literal(true))
2713
+ })
2714
+ )
2715
+ });
2716
+ var AccountCheckCommand = Schema_exports.Struct({
2717
+ operation: Schema_exports.Literal("account-check"),
2718
+ requirement: Schema_exports.NonEmptyString
2719
+ });
2720
+ var HostRequest3 = Schema_exports.Union([
2721
+ ...protocol4.schemas.request.members,
2722
+ AccountCheckCommand
2723
+ ]);
2724
+ var HostInvocation3 = Schema_exports.Struct({
2725
+ command: HostRequest3,
2726
+ accounts: ResolvedAccounts,
2727
+ approval: Schema_exports.optionalKey(TrustedToolApproval),
2728
+ replay: Schema_exports.optionalKey(WorkflowReplay),
2729
+ deadline: Schema_exports.optionalKey(InvocationDeadline),
2730
+ workflowRun: Schema_exports.optionalKey(WorkflowRunId)
2731
+ });
2732
+ var protocol5 = {
2733
+ version: 5,
2734
+ schemas: {
2735
+ ...protocol4.schemas,
2736
+ invocation: HostInvocation3,
2737
+ request: HostRequest3,
2738
+ requirements: DeclaredRequirements2,
2739
+ accountCheck: AccountCheckResult
2740
+ }
2741
+ };
2742
+
2743
+ // src/contracts/protocols/6.ts
2744
+ var DeclaredAuthMethod2 = Schema_exports.Union([
2745
+ Schema_exports.Struct({ type: Schema_exports.Literal("secrets"), label: Schema_exports.String, fields: JsonObject2 }),
2746
+ Schema_exports.Struct({
2747
+ type: Schema_exports.Literal("oauth2"),
2748
+ ...OAuth2Config.members[0].fields,
2749
+ response: JsonObject2
2750
+ }),
2751
+ Schema_exports.Struct({
2752
+ type: Schema_exports.Literal("oauth2"),
2753
+ ...OAuth2Config.members[1].fields,
2754
+ response: JsonObject2
2755
+ }),
2756
+ Schema_exports.Struct({
2757
+ type: Schema_exports.Literal("oauth2"),
2758
+ ...OAuth2Config.members[2].fields,
2759
+ response: JsonObject2
2760
+ }),
2761
+ Schema_exports.Struct({
2762
+ type: Schema_exports.Literal("oauth2"),
2763
+ ...OAuth2Config.members[3].fields,
2764
+ response: JsonObject2
2765
+ })
2766
+ ]);
2767
+ var DeclaredProvider2 = Schema_exports.Struct({
2768
+ name: Schema_exports.NonEmptyString,
2769
+ auth: Schema_exports.Record(Schema_exports.NonEmptyString, DeclaredAuthMethod2)
2770
+ });
2771
+ var DeclaredRequirements3 = Schema_exports.Struct({
2772
+ ...DeclaredRequirements2.fields,
2773
+ accounts: Schema_exports.Record(
2774
+ Schema_exports.NonEmptyString,
2775
+ Schema_exports.Struct({
2776
+ definition: DeclaredProvider2,
2777
+ cardinality: Schema_exports.Literals(["one", "many"]),
2778
+ health: Schema_exports.optionalKey(Schema_exports.Literal(true))
2779
+ })
2780
+ )
2781
+ });
2782
+ var ResolvedAccount2 = Schema_exports.Struct({
2783
+ ...ResolvedAccount.fields,
2784
+ provider: DeclaredProvider2
2785
+ });
2786
+ var ResolvedAccounts2 = Schema_exports.Record(
2787
+ Schema_exports.NonEmptyString,
2788
+ Schema_exports.Union([ResolvedAccount2, Schema_exports.Array(ResolvedAccount2)])
2789
+ );
2790
+ var HostInvocation4 = Schema_exports.Struct({
2791
+ ...HostInvocation3.fields,
2792
+ accounts: ResolvedAccounts2
2793
+ });
2794
+ var protocol6 = {
2795
+ version: 6,
2796
+ schemas: {
2797
+ ...protocol5.schemas,
2798
+ requirements: DeclaredRequirements3,
2799
+ accounts: ResolvedAccounts2,
2800
+ invocation: HostInvocation4
2801
+ }
2802
+ };
2803
+
2804
+ // src/contracts/protocols/7.ts
2805
+ var CredentialHost = Schema_exports.String.check(
2806
+ Schema_exports.isPattern(
2807
+ /^(\*\.)?[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*(?::[0-9]{1,5})?$/
2808
+ )
2809
+ );
2810
+ var exposure = {
2811
+ /** Not secret: app code reads the real value and forms show it. */
2812
+ plain: Schema_exports.optionalKey(Schema_exports.Array(Schema_exports.NonEmptyString)),
2813
+ /** Secret, but app code reads the real value, for signing and similar uses. */
2814
+ raw: Schema_exports.optionalKey(Schema_exports.Array(Schema_exports.NonEmptyString))
2815
+ };
2816
+ var DeclaredAuthMethod3 = Schema_exports.Union([
2817
+ Schema_exports.Struct({
2818
+ type: Schema_exports.Literal("secrets"),
2819
+ label: Schema_exports.String,
2820
+ fields: JsonObject2,
2821
+ ...exposure
2822
+ }),
2823
+ Schema_exports.Struct({
2824
+ type: Schema_exports.Literal("oauth2"),
2825
+ ...OAuth2Config.members[0].fields,
2826
+ response: JsonObject2,
2827
+ ...exposure
2828
+ }),
2829
+ Schema_exports.Struct({
2830
+ type: Schema_exports.Literal("oauth2"),
2831
+ ...OAuth2Config.members[1].fields,
2832
+ response: JsonObject2,
2833
+ ...exposure
2834
+ }),
2835
+ Schema_exports.Struct({
2836
+ type: Schema_exports.Literal("oauth2"),
2837
+ ...OAuth2Config.members[2].fields,
2838
+ response: JsonObject2,
2839
+ ...exposure
2840
+ }),
2841
+ Schema_exports.Struct({
2842
+ type: Schema_exports.Literal("oauth2"),
2843
+ ...OAuth2Config.members[3].fields,
2844
+ response: JsonObject2,
2845
+ ...exposure
2846
+ })
2847
+ ]);
2848
+ var DeclaredProvider3 = Schema_exports.Struct({
2849
+ name: Schema_exports.NonEmptyString,
2850
+ auth: Schema_exports.Record(Schema_exports.NonEmptyString, DeclaredAuthMethod3),
2851
+ hosts: Schema_exports.optionalKey(Schema_exports.Array(CredentialHost))
2852
+ });
2853
+ var DeclaredRequirements4 = Schema_exports.Struct({
2854
+ ...DeclaredRequirements3.fields,
2855
+ accounts: Schema_exports.Record(
2856
+ Schema_exports.NonEmptyString,
2857
+ Schema_exports.Struct({
2858
+ definition: DeclaredProvider3,
2859
+ cardinality: Schema_exports.Literals(["one", "many"]),
2860
+ health: Schema_exports.optionalKey(Schema_exports.Literal(true))
2861
+ })
2862
+ )
2863
+ });
2864
+ var ResolvedAccount3 = Schema_exports.Struct({
2865
+ ...ResolvedAccount2.fields,
2866
+ provider: DeclaredProvider3
2867
+ });
2868
+ var ResolvedAccounts3 = Schema_exports.Record(
2869
+ Schema_exports.NonEmptyString,
2870
+ Schema_exports.Union([ResolvedAccount3, Schema_exports.Array(ResolvedAccount3)])
2871
+ );
2872
+ var HostInvocation5 = Schema_exports.Struct({
2873
+ ...HostInvocation4.fields,
2874
+ accounts: ResolvedAccounts3
2875
+ });
2876
+ var protocol7 = {
2877
+ version: 7,
2878
+ schemas: {
2879
+ ...protocol6.schemas,
2880
+ requirements: DeclaredRequirements4,
2881
+ accounts: ResolvedAccounts3,
2882
+ invocation: HostInvocation5
2883
+ }
2884
+ };
2885
+
2886
+ // src/contracts/protocols/8.ts
2887
+ var HostDeclarationInvalid3 = class extends Schema_exports.TaggedError()(
2888
+ "HostDeclarationInvalid",
2889
+ FailureDetail
2890
+ ) {
2891
+ };
2892
+ var HostEvaluationFailed3 = class extends Schema_exports.TaggedError()(
2893
+ "HostEvaluationFailed",
2894
+ FailureDetail
2895
+ ) {
2896
+ };
2897
+ var HostOperationFailed3 = class extends Schema_exports.TaggedError()(
2898
+ "HostOperationFailed",
2899
+ FailureDetail
2900
+ ) {
2901
+ };
2902
+ var HostRouterError2 = Schema_exports.Union([
2903
+ ProviderError,
2904
+ McpError,
2905
+ SkillLoadFailed,
2906
+ HostDeclarationInvalid3,
2907
+ HostEvaluationFailed3
2908
+ ]);
2909
+ var HostedRouter2 = Schema_exports.Struct({
2910
+ ...HostedRouter.fields,
2911
+ error: Schema_exports.optionalKey(HostRouterError2)
2912
+ });
2913
+ var HostedCatalog2 = Schema_exports.Struct({
2914
+ ...HostedCatalog.fields,
2915
+ routers: Schema_exports.Array(HostedRouter2)
2916
+ });
2917
+ var HostedCatalogSummary2 = Schema_exports.Struct({
2918
+ ...HostedCatalogSummary.fields,
2919
+ routers: Schema_exports.Array(HostedRouter2)
2920
+ });
2921
+ var HostError4 = Schema_exports.Union([
2922
+ OpenapiResponseError,
2923
+ ProviderError,
2924
+ McpError,
2925
+ SkillLoadFailed,
2926
+ WorkflowFailure,
2927
+ HostRequestInvalid,
2928
+ HostAccountsInvalid,
2929
+ HostDeclarationInvalid3,
2930
+ HostEvaluationFailed3,
2931
+ HostOperationNotFound,
2932
+ HostOperationFailed3,
2933
+ DatabaseLimitExceeded,
2934
+ DatabaseFieldReserved,
2935
+ HostToolNotFound,
2936
+ HostInputInvalid,
2937
+ HostOutputInvalid,
2938
+ HostToolBlocked,
2939
+ HostToolApprovalRequired,
2940
+ HostToolPolicyFailed,
2941
+ ElicitationFailed,
2942
+ HostKindMismatch
2943
+ ]);
2944
+ var HostResponse4 = Schema_exports.Union([
2945
+ Schema_exports.Struct({
2946
+ ok: Schema_exports.Literal(true),
2947
+ value: JsonValue,
2948
+ toolError: Schema_exports.optionalKey(Schema_exports.Literal(true))
2949
+ }),
2950
+ Schema_exports.Struct({ ok: Schema_exports.Literal(false), error: HostError4 })
2951
+ ]);
2952
+ var protocol8 = {
2953
+ version: 8,
2954
+ schemas: {
2955
+ ...protocol7.schemas,
2956
+ response: HostResponse4,
2957
+ catalog: HostedCatalog2,
2958
+ catalogSummary: HostedCatalogSummary2
2959
+ }
2960
+ };
2097
2961
 
2098
2962
  // src/contracts/host.ts
2099
2963
  var skillsCommand = (sources) => sources ? { operation: "skills", sources: true } : { operation: "skills" };
2100
- var skillCatalog = (response) => Schema_exports.is(SkillSources)(response) ? response : { skills: response };
2964
+ var skillCatalog = (response) => Schema_exports.is(SkillSources2)(response) ? response : { skills: response };
2101
2965
  var inspectCommand = (tools, scheduled) => ({
2102
2966
  operation: "inspect",
2103
2967
  ...tools === void 0 ? {} : { tools: [...tools] },
2104
2968
  ...scheduled === void 0 ? {} : { scheduled }
2105
2969
  });
2106
2970
  var indexCommand = { operation: "inspect", detail: "summary" };
2107
- var selectTools = (tools) => (all) => tools === void 0 ? all : all.filter((tool) => tools.includes(tool.name));
2108
- var HostRequirementsError = Schema_exports.Union([HostRequestInvalid, HostDeclarationInvalid]);
2971
+ var selectTools = (tools) => (catalog) => tools === void 0 ? catalog : { ...catalog, tools: catalog.tools.filter((tool) => tools.includes(tool.name)) };
2972
+ var HostRequirementsError = Schema_exports.Union([
2973
+ HostRequestInvalid,
2974
+ HostDeclarationInvalid3,
2975
+ DatabaseFieldReserved
2976
+ ]);
2109
2977
  var HostInspectError = Schema_exports.Union([
2110
2978
  ProviderError,
2111
2979
  McpError,
2112
2980
  SkillLoadFailed,
2113
2981
  HostRequestInvalid,
2114
- HostDeclarationInvalid,
2982
+ HostDeclarationInvalid3,
2115
2983
  HostAccountsInvalid,
2116
- HostEvaluationFailed
2984
+ HostEvaluationFailed3
2117
2985
  ]);
2118
2986
  var HostCallError = Schema_exports.Union([
2119
2987
  OpenapiResponseError,
@@ -2121,7 +2989,9 @@ var HostCallError = Schema_exports.Union([
2121
2989
  HostInspectError,
2122
2990
  HostToolNotFound,
2123
2991
  HostOperationNotFound,
2124
- HostOperationFailed,
2992
+ HostKindMismatch,
2993
+ HostOperationFailed3,
2994
+ DatabaseLimitExceeded,
2125
2995
  HostInputInvalid,
2126
2996
  HostOutputInvalid,
2127
2997
  HostToolBlocked,
@@ -2129,6 +2999,16 @@ var HostCallError = Schema_exports.Union([
2129
2999
  HostToolPolicyFailed,
2130
3000
  ElicitationFailed
2131
3001
  ]);
3002
+ var HostAccountCheckError = Schema_exports.Union([
3003
+ ProviderError,
3004
+ WorkflowFailure,
3005
+ HostRequestInvalid,
3006
+ HostDeclarationInvalid3,
3007
+ HostAccountsInvalid,
3008
+ HostOperationNotFound,
3009
+ HostOperationFailed3,
3010
+ HostOutputInvalid
3011
+ ]);
2132
3012
  var HostDataError = HostCallError;
2133
3013
  var ToolResultObservation = Context_exports.Reference(
2134
3014
  "apps/ToolResultObservation",
@@ -2137,28 +3017,57 @@ var ToolResultObservation = Context_exports.Reference(
2137
3017
  );
2138
3018
 
2139
3019
  export {
3020
+ NetworkRefusal,
3021
+ NetworkRefused,
3022
+ networkRefusalStatus,
3023
+ networkRefusalHeader,
3024
+ NetworkRefusedHeader,
3025
+ networkRefusalResponse,
3026
+ RestrictedFetchOption,
3027
+ supportedFetchOptions,
3028
+ FetchOptionUnsupported,
2140
3029
  SecretsMethod,
2141
3030
  OAuthClientAuth,
2142
3031
  OAuthSecretClientAuth,
3032
+ OAuthTokenRequestFormat,
3033
+ OAuthTokenResponse,
2143
3034
  OAuth2Config,
2144
3035
  OAuth2AccessToken,
2145
3036
  OAuth2Method,
3037
+ AccountInfo,
3038
+ AccountCheckResult,
2146
3039
  Provider,
2147
3040
  ManyAccounts,
3041
+ reservedRouterKeys,
3042
+ RouterKey,
3043
+ RouterIcon,
3044
+ RouterMeta,
2148
3045
  ToolAnnotations,
2149
3046
  McpClientLimits,
2150
3047
  defaultMcpClientLimits,
2151
3048
  mcpSdkTimerCeilingMs,
2152
3049
  McpToolsOptions,
3050
+ McpHealthInput,
3051
+ mcpHealthReserveMs,
2153
3052
  McpToolResult,
2154
3053
  McpToolMetadata,
3054
+ McpServerHeader,
2155
3055
  McpError,
3056
+ McpCredentialsUnverified,
2156
3057
  ProcessConfig,
3058
+ maxApiErrorInstructionsLength,
3059
+ ApiErrorRecovery,
3060
+ maxApiErrorMessageLength,
3061
+ ApiErrorResponse,
3062
+ OpenapiResponseError,
3063
+ defaultOpenapiErrorLimits,
2157
3064
  WorkflowRunId,
2158
3065
  WorkflowName,
2159
3066
  workflowDurationMillis,
2160
3067
  WorkflowDuration,
2161
3068
  WorkflowStepOptions,
3069
+ WorkflowFailureDetail,
3070
+ WorkflowRunFailure,
2162
3071
  WorkflowFailure,
2163
3072
  NonRetryableError,
2164
3073
  WorkflowValue,
@@ -2193,24 +3102,11 @@ export {
2193
3102
  CalendarSchedule,
2194
3103
  ScheduleTiming,
2195
3104
  OperationSchedule,
2196
- DeclaredAuthMethod,
2197
- DeclaredProvider,
2198
- DeclaredRequirements,
2199
- ResolvedAccount,
2200
- ResolvedAccounts,
2201
3105
  TrustedToolApproval,
2202
3106
  InvocationDeadline,
2203
- HostedTool,
2204
- HostedToolSummary,
2205
- SkillSources,
2206
- SkillCatalogResponse,
2207
- HostRequest,
2208
3107
  HostRequestInvalid,
2209
3108
  HostAccountsInvalid,
2210
- HostDeclarationInvalid,
2211
- HostEvaluationFailed,
2212
3109
  HostOperationNotFound,
2213
- HostOperationFailed,
2214
3110
  HostToolNotFound,
2215
3111
  InputProblem,
2216
3112
  maxInputProblems,
@@ -2219,11 +3115,37 @@ export {
2219
3115
  HostToolApprovalRequired,
2220
3116
  HostToolPolicyFailed,
2221
3117
  HostOutputInvalid,
2222
- HostError,
2223
- HostResponse,
2224
- HostInvocation,
2225
3118
  protocol1,
2226
- OperationToolPrefixes,
3119
+ SkillSources2 as SkillSources,
3120
+ SkillCatalogResponse2 as SkillCatalogResponse,
3121
+ protocol2,
3122
+ protocol3,
3123
+ HostedTool2 as HostedTool,
3124
+ HostedToolSummary2 as HostedToolSummary,
3125
+ HostKindMismatch,
3126
+ protocol4,
3127
+ AccountCheckCommand,
3128
+ HostRequest3 as HostRequest,
3129
+ protocol5,
3130
+ protocol6,
3131
+ CredentialHost,
3132
+ DeclaredAuthMethod3 as DeclaredAuthMethod,
3133
+ DeclaredProvider3 as DeclaredProvider,
3134
+ DeclaredRequirements4 as DeclaredRequirements,
3135
+ ResolvedAccount3 as ResolvedAccount,
3136
+ ResolvedAccounts3 as ResolvedAccounts,
3137
+ HostInvocation5 as HostInvocation,
3138
+ protocol7,
3139
+ HostDeclarationInvalid3 as HostDeclarationInvalid,
3140
+ HostEvaluationFailed3 as HostEvaluationFailed,
3141
+ HostOperationFailed3 as HostOperationFailed,
3142
+ HostRouterError2 as HostRouterError,
3143
+ HostedRouter2 as HostedRouter,
3144
+ HostedCatalog2 as HostedCatalog,
3145
+ HostedCatalogSummary2 as HostedCatalogSummary,
3146
+ HostError4 as HostError,
3147
+ HostResponse4 as HostResponse,
3148
+ protocol8,
2227
3149
  skillsCommand,
2228
3150
  skillCatalog,
2229
3151
  inspectCommand,
@@ -2232,6 +3154,7 @@ export {
2232
3154
  HostRequirementsError,
2233
3155
  HostInspectError,
2234
3156
  HostCallError,
3157
+ HostAccountCheckError,
2235
3158
  HostDataError,
2236
3159
  ToolResultObservation
2237
3160
  };