apps 0.0.1-beta.1 → 0.0.1-beta.10
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.
- package/README.md +65 -43
- package/framework-reference.json +1 -1
- package/js/browser-XIPJGLH2.js +65 -0
- package/js/{chunk-SATWJKN6.js → chunk-27F7W2LG.js} +1 -1
- package/js/{chunk-HDJH3RPR.js → chunk-57RKNWL2.js} +2 -2
- package/js/{chunk-2HHMABB6.js → chunk-5T57N25Q.js} +61 -13
- package/js/{chunk-6IIO4NPI.js → chunk-72JNVHPK.js} +21 -9
- package/js/{chunk-FW5HBOIK.js → chunk-CDL5PM2Q.js} +307 -169
- package/js/{chunk-X7SFGU4Q.js → chunk-CRDWFA74.js} +28 -9
- package/js/{chunk-G7IE6BKC.js → chunk-EPT3ZP52.js} +8 -8
- package/js/chunk-FL2QR3XW.js +507 -0
- package/js/{chunk-OHRT55C4.js → chunk-IJX4CYZO.js} +3 -6
- package/js/{chunk-ZTFQHGEB.js → chunk-IPI4MFSN.js} +3 -5
- package/js/{chunk-YEJOQEII.js → chunk-JU7VHODU.js} +1 -1
- package/js/chunk-KUMBKVJD.js +39 -0
- package/js/{chunk-EVJUVWN2.js → chunk-M3B3DE4K.js} +2 -2
- package/js/{chunk-ZJWDMTE3.js → chunk-MKWZPDR6.js} +3 -3
- package/js/{chunk-BMOIAIVR.js → chunk-N7YDVXYJ.js} +49 -1
- package/js/chunk-NKLWZJLE.js +172 -0
- package/js/{chunk-ZCAMUXSG.js → chunk-ODEIDRGW.js} +3 -4
- package/js/{chunk-M6ZRRIBI.js → chunk-PJJ24GU7.js} +1 -1
- package/js/{chunk-FZJOYIZO.js → chunk-PZB6T6KU.js} +1 -1
- package/js/chunk-R3EV5FTO.js +97 -0
- package/js/{chunk-6YBRWRK3.js → chunk-RFVIONFX.js} +43 -14
- package/js/{chunk-QKHR7BMF.js → chunk-UK573G7W.js} +1 -1
- package/js/{chunk-NCYXZN2G.js → chunk-UVL56Z6E.js} +390 -23
- package/js/{chunk-KOXMLKTM.js → chunk-V5KNQVCT.js} +308 -316
- package/js/{chunk-4LPG6RCH.js → chunk-VFZKSM3T.js} +5 -25
- package/js/{chunk-IHQ4ML7K.js → chunk-WLE7WX2U.js} +554 -102
- package/js/{chunk-RBAC33PQ.js → chunk-YXQHV65J.js} +58 -83
- package/js/chunk-Z5M2LQOZ.js +209 -0
- package/js/{chunk-PLCMJREA.js → chunk-ZQINWV4W.js} +60 -20
- package/js/client.js +10 -26
- package/js/contracts.js +70 -15
- package/js/effect.js +19 -19
- package/js/es-APDZKREY.js +40968 -0
- package/js/graphql.js +34 -39
- package/js/host.js +23 -23
- package/js/index.js +199 -195
- package/js/mcp/effect.js +21 -21
- package/js/mcp/stdio.js +25 -25
- package/js/mcp.js +60 -44
- package/js/openapi.js +826 -41682
- package/js/react.js +3 -3
- package/js/skills/effect.js +3 -4
- package/js/skills.js +53 -17
- package/js/storage/facet.js +4 -4
- package/js/ui/auth/contracts.js +8 -9
- package/js/ui/auth.js +16 -14
- package/js/ui/contracts.js +4 -4
- package/js/ui/serving.js +9 -8
- package/package.json +1 -1
- package/runtime.json +1 -1
- package/types/app-cache/src/contracts/cache.d.ts +42 -2
- package/types/app-cache/src/index.d.ts +59 -1
- package/types/app-data/src/contracts/database.d.ts +33 -6
- package/types/app-data/src/implementation/schema.d.ts +2 -17
- package/types/apps/src/contracts/app.d.ts +7 -6
- package/types/apps/src/contracts/cache.d.ts +4 -1
- package/types/apps/src/contracts/failure.d.ts +25 -0
- package/types/apps/src/contracts/host.d.ts +34 -679
- package/types/apps/src/contracts/mcp.d.ts +16 -0
- package/types/apps/src/contracts/openapi.d.ts +11 -1
- package/types/apps/src/contracts/operations.d.ts +0 -5
- package/types/apps/src/contracts/protocol-version.d.ts +6 -0
- package/types/apps/src/contracts/protocols/1.d.ts +1589 -0
- package/types/apps/src/contracts/protocols/2.d.ts +668 -0
- package/types/apps/src/contracts/protocols/3.d.ts +676 -0
- package/types/apps/src/contracts/protocols/4.d.ts +1229 -0
- package/types/apps/src/contracts/protocols/5.d.ts +1090 -0
- package/types/apps/src/contracts/provider.d.ts +51 -5
- package/types/apps/src/contracts/router.d.ts +59 -0
- package/types/apps/src/contracts/skills.d.ts +17 -8
- package/types/apps/src/contracts/storage.d.ts +3 -3
- package/types/apps/src/contracts/ui-auth.d.ts +6 -14
- package/types/apps/src/contracts/workflows.d.ts +34 -3
- package/types/apps/src/graphql.d.ts +1 -3
- package/types/apps/src/implementation/account-router.d.ts +12 -0
- package/types/apps/src/implementation/app.d.ts +5 -4
- package/types/apps/src/implementation/cache.d.ts +3 -1
- package/types/apps/src/implementation/catalog-cache.d.ts +9 -2
- package/types/apps/src/implementation/elicitation.d.ts +1 -1
- package/types/apps/src/implementation/failure-detail.d.ts +25 -0
- package/types/apps/src/implementation/graphql-catalog.d.ts +1 -4
- package/types/apps/src/implementation/mcp-catalog.d.ts +1 -4
- package/types/apps/src/implementation/mcp-client.d.ts +35 -19
- package/types/apps/src/implementation/mcp.d.ts +35 -19
- package/types/apps/src/implementation/openapi-compile.d.ts +3 -2
- package/types/apps/src/implementation/openapi-document.d.ts +0 -2
- package/types/apps/src/implementation/openapi-names.d.ts +18 -0
- package/types/apps/src/implementation/openapi-request.d.ts +0 -1
- package/types/apps/src/implementation/openapi-source.d.ts +7 -7
- package/types/apps/src/implementation/operations.d.ts +26 -3
- package/types/apps/src/implementation/protocol-operations.d.ts +3 -4
- package/types/apps/src/implementation/provider.d.ts +9 -4
- package/types/apps/src/implementation/router-catalog.d.ts +225 -0
- package/types/apps/src/implementation/router.d.ts +59 -0
- package/types/apps/src/implementation/schema.d.ts +5 -6
- package/types/apps/src/implementation/storage.d.ts +5 -3
- package/types/apps/src/implementation/swagger-client.d.ts +28 -0
- package/types/apps/src/implementation/ui-auth.d.ts +11 -5
- package/types/apps/src/implementation/ui-serving.d.ts +4 -2
- package/types/apps/src/implementation/webhooks.d.ts +1 -1
- package/types/apps/src/implementation/workflow-context.d.ts +11 -3
- package/types/apps/src/index.d.ts +5 -4
- package/types/apps/src/mcp-stdio.d.ts +2 -5
- package/types/apps/src/mcp.d.ts +5 -4
- package/types/apps/src/openapi.d.ts +6 -6
- package/types/apps/src/skills.d.ts +6 -3
- package/types/apps/src/ui-auth.d.ts +2 -2
- package/types/telemetry/src/browser-operations.d.ts +5 -2
- package/js/chunk-PZ36XMXW.js +0 -93
- package/js/chunk-SWPD52J7.js +0 -35
- package/js/chunk-TE4KO4HI.js +0 -47
- package/js/chunk-W7D7WVSY.js +0 -18
- package/types/apps/src/contracts/dynamic-tools.d.ts +0 -13
- package/types/apps/src/implementation/account-operations.d.ts +0 -151
- package/types/apps/src/implementation/dynamic-tools.d.ts +0 -8
|
@@ -1,22 +1,24 @@
|
|
|
1
1
|
import {
|
|
2
|
+
DatabaseFieldReserved,
|
|
3
|
+
DatabaseLimitExceeded,
|
|
2
4
|
DatabaseSchema
|
|
3
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-N7YDVXYJ.js";
|
|
4
6
|
import {
|
|
7
|
+
CacheCommand,
|
|
8
|
+
CacheReply,
|
|
9
|
+
ProviderError
|
|
10
|
+
} from "./chunk-R3EV5FTO.js";
|
|
11
|
+
import {
|
|
12
|
+
AppSkillName,
|
|
5
13
|
AppSkills,
|
|
6
14
|
SkillLoadFailed
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import {
|
|
9
|
-
OpenapiResponseError
|
|
10
|
-
} from "./chunk-SWPD52J7.js";
|
|
11
|
-
import {
|
|
12
|
-
ProviderError
|
|
13
|
-
} from "./chunk-W7D7WVSY.js";
|
|
15
|
+
} from "./chunk-JU7VHODU.js";
|
|
14
16
|
import {
|
|
15
17
|
AccountId,
|
|
16
18
|
HttpUrl,
|
|
17
19
|
JsonObject as JsonObject2,
|
|
18
20
|
JsonValue
|
|
19
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-27F7W2LG.js";
|
|
20
22
|
import {
|
|
21
23
|
Any,
|
|
22
24
|
ArraySchema,
|
|
@@ -70,7 +72,31 @@ import {
|
|
|
70
72
|
transformOptional,
|
|
71
73
|
withConstructorDefault,
|
|
72
74
|
withDefault
|
|
73
|
-
} from "./chunk-
|
|
75
|
+
} from "./chunk-CDL5PM2Q.js";
|
|
76
|
+
|
|
77
|
+
// src/contracts/router.ts
|
|
78
|
+
var reservedRouterKeys = /* @__PURE__ */ new Set([
|
|
79
|
+
"__proto__",
|
|
80
|
+
"constructor",
|
|
81
|
+
"prototype"
|
|
82
|
+
]);
|
|
83
|
+
var RouterKey = Schema_exports.String.check(
|
|
84
|
+
Schema_exports.isPattern(/^[A-Za-z_][A-Za-z0-9_-]{0,99}$/),
|
|
85
|
+
Schema_exports.makeFilter((key) => !reservedRouterKeys.has(key))
|
|
86
|
+
);
|
|
87
|
+
var RouterIcon = Schema_exports.Struct({
|
|
88
|
+
src: Schema_exports.NonEmptyString,
|
|
89
|
+
mimeType: Schema_exports.optionalKey(Schema_exports.String),
|
|
90
|
+
sizes: Schema_exports.optionalKey(Schema_exports.Array(Schema_exports.String)),
|
|
91
|
+
theme: Schema_exports.optionalKey(Schema_exports.Literals(["light", "dark"]))
|
|
92
|
+
});
|
|
93
|
+
var RouterMeta = Schema_exports.Struct({
|
|
94
|
+
title: Schema_exports.optionalKey(Schema_exports.String),
|
|
95
|
+
description: Schema_exports.optionalKey(Schema_exports.String),
|
|
96
|
+
instructions: Schema_exports.optionalKey(Schema_exports.String),
|
|
97
|
+
icons: Schema_exports.optionalKey(Schema_exports.Array(RouterIcon)),
|
|
98
|
+
tags: Schema_exports.optionalKey(Schema_exports.Record(Schema_exports.NonEmptyString, Schema_exports.String))
|
|
99
|
+
});
|
|
74
100
|
|
|
75
101
|
// src/contracts/tools.ts
|
|
76
102
|
var ToolAnnotations = Schema_exports.Struct({
|
|
@@ -124,6 +150,15 @@ var McpToolMetadata = Schema_exports.Struct({
|
|
|
124
150
|
annotations: Schema_exports.optional(ToolAnnotations),
|
|
125
151
|
_meta: Schema_exports.optional(JsonObject2)
|
|
126
152
|
});
|
|
153
|
+
var McpServerHeader = Schema_exports.Struct({
|
|
154
|
+
name: Schema_exports.optionalKey(Schema_exports.String),
|
|
155
|
+
title: Schema_exports.optionalKey(Schema_exports.String),
|
|
156
|
+
version: Schema_exports.optionalKey(Schema_exports.String),
|
|
157
|
+
description: Schema_exports.optionalKey(Schema_exports.String),
|
|
158
|
+
websiteUrl: Schema_exports.optionalKey(Schema_exports.String),
|
|
159
|
+
icons: Schema_exports.optionalKey(Schema_exports.Array(RouterIcon)),
|
|
160
|
+
instructions: Schema_exports.optionalKey(Schema_exports.String)
|
|
161
|
+
});
|
|
127
162
|
var McpError = class extends Schema_exports.TaggedError()("McpError", {
|
|
128
163
|
phase: Schema_exports.Literals(["connect", "discover", "call", "schema", "transport"]),
|
|
129
164
|
reason: Schema_exports.Literals([
|
|
@@ -146,6 +181,44 @@ var ProcessConfig = Schema_exports.Struct({
|
|
|
146
181
|
)
|
|
147
182
|
});
|
|
148
183
|
|
|
184
|
+
// src/contracts/api-response-error.ts
|
|
185
|
+
var ApiErrorRecovery = Schema_exports.Struct({
|
|
186
|
+
action: Schema_exports.NonEmptyString.check(Schema_exports.isMaxLength(1024)),
|
|
187
|
+
instructions: Schema_exports.NonEmptyString.check(Schema_exports.isMaxLength(4096))
|
|
188
|
+
});
|
|
189
|
+
var ApiErrorResponse = Schema_exports.Struct({
|
|
190
|
+
code: Schema_exports.NonEmptyString.check(Schema_exports.isMaxLength(128)),
|
|
191
|
+
status: Schema_exports.Int.check(Schema_exports.isBetween({ minimum: 400, maximum: 599 })),
|
|
192
|
+
message: Schema_exports.NonEmptyString.check(Schema_exports.isMaxLength(4096)),
|
|
193
|
+
recovery: Schema_exports.optionalKey(ApiErrorRecovery)
|
|
194
|
+
});
|
|
195
|
+
var OpenapiResponseError = class extends Schema_exports.TaggedError()(
|
|
196
|
+
"OpenapiResponseError",
|
|
197
|
+
ApiErrorResponse.fields
|
|
198
|
+
) {
|
|
199
|
+
};
|
|
200
|
+
var OpenapiErrorLimits = Schema_exports.Struct({
|
|
201
|
+
maxBodyBytes: Schema_exports.Int.check(Schema_exports.isGreaterThan(0)),
|
|
202
|
+
readTimeoutMs: Schema_exports.Int.check(Schema_exports.isGreaterThan(0))
|
|
203
|
+
});
|
|
204
|
+
var defaultOpenapiErrorLimits = OpenapiErrorLimits.make({
|
|
205
|
+
maxBodyBytes: 65536,
|
|
206
|
+
readTimeoutMs: 2e3
|
|
207
|
+
});
|
|
208
|
+
|
|
209
|
+
// src/contracts/failure.ts
|
|
210
|
+
var maxFailureMessageLength = 2048;
|
|
211
|
+
var FailureSource = Schema_exports.Literals(["app", "storage", "service"]);
|
|
212
|
+
var FailureName = Schema_exports.String.check(Schema_exports.isMaxLength(128));
|
|
213
|
+
var FailureCode = Schema_exports.String.check(Schema_exports.isMaxLength(128));
|
|
214
|
+
var FailureMessage = Schema_exports.String.check(Schema_exports.isMaxLength(maxFailureMessageLength));
|
|
215
|
+
var FailureDetail = {
|
|
216
|
+
source: Schema_exports.optionalKey(FailureSource),
|
|
217
|
+
errorName: Schema_exports.optionalKey(FailureName),
|
|
218
|
+
code: Schema_exports.optionalKey(FailureCode),
|
|
219
|
+
message: Schema_exports.optionalKey(FailureMessage)
|
|
220
|
+
};
|
|
221
|
+
|
|
149
222
|
// src/contracts/workflows.ts
|
|
150
223
|
var WorkflowRunId = Schema_exports.NonEmptyString.pipe(Schema_exports.brand("wfr"));
|
|
151
224
|
var WorkflowName = Schema_exports.NonEmptyString.check(Schema_exports.isMaxLength(200));
|
|
@@ -187,7 +260,14 @@ var WorkflowStepOptions = Schema_exports.Struct({
|
|
|
187
260
|
),
|
|
188
261
|
timeout: Schema_exports.optionalKey(WorkflowDuration)
|
|
189
262
|
});
|
|
263
|
+
var WorkflowFailureDetail = {
|
|
264
|
+
step: Schema_exports.optionalKey(Schema_exports.String.check(Schema_exports.isMaxLength(200))),
|
|
265
|
+
errorName: Schema_exports.optionalKey(FailureName),
|
|
266
|
+
message: Schema_exports.optionalKey(FailureMessage)
|
|
267
|
+
};
|
|
268
|
+
var WorkflowRunFailure = Schema_exports.Struct(WorkflowFailureDetail);
|
|
190
269
|
var WorkflowFailure = class extends Schema_exports.TaggedError()("WorkflowFailure", {
|
|
270
|
+
...WorkflowFailureDetail,
|
|
191
271
|
reason: Schema_exports.Literals([
|
|
192
272
|
"unavailable",
|
|
193
273
|
"not_found",
|
|
@@ -235,7 +315,9 @@ var WorkflowRun = Schema_exports.Union([
|
|
|
235
315
|
Schema_exports.Struct({
|
|
236
316
|
...runFields,
|
|
237
317
|
status: Schema_exports.Literal("errored"),
|
|
238
|
-
error: WorkflowFailure.fields.reason
|
|
318
|
+
error: WorkflowFailure.fields.reason,
|
|
319
|
+
/** The failing step and the app's own error, when the run recorded them. */
|
|
320
|
+
failure: Schema_exports.optionalKey(WorkflowRunFailure)
|
|
239
321
|
}),
|
|
240
322
|
Schema_exports.Struct({ ...runFields, status: Schema_exports.Literal("terminated") })
|
|
241
323
|
]);
|
|
@@ -307,41 +389,6 @@ var WorkflowControlCommand = Schema_exports.Union([
|
|
|
307
389
|
Schema_exports.Struct({ operation: Schema_exports.Literal("terminate"), run: WorkflowRunId })
|
|
308
390
|
]);
|
|
309
391
|
|
|
310
|
-
// src/contracts/schedules.ts
|
|
311
|
-
var minimumIntervalMilliseconds = 6e4;
|
|
312
|
-
var count = Schema_exports.Int.check(Schema_exports.isGreaterThan(0));
|
|
313
|
-
var absent = Schema_exports.optionalKey(Schema_exports.Never);
|
|
314
|
-
var Interval = Schema_exports.Union([
|
|
315
|
-
Schema_exports.Struct({ seconds: count, minutes: absent, hours: absent }),
|
|
316
|
-
Schema_exports.Struct({ seconds: absent, minutes: count, hours: absent }),
|
|
317
|
-
Schema_exports.Struct({ seconds: absent, minutes: absent, hours: count })
|
|
318
|
-
]);
|
|
319
|
-
var CalendarSchedule = Schema_exports.Struct({
|
|
320
|
-
expression: Schema_exports.NonEmptyString,
|
|
321
|
-
timezone: Schema_exports.NonEmptyString
|
|
322
|
-
}).check(
|
|
323
|
-
Schema_exports.makeFilter(
|
|
324
|
-
(value) => value.expression.trim().split(/\s+/).length === 5 && Result_exports.isSuccess(Cron_exports.parse(value.expression, value.timezone))
|
|
325
|
-
)
|
|
326
|
-
);
|
|
327
|
-
var ScheduleTiming = Schema_exports.Union([
|
|
328
|
-
Schema_exports.Struct({
|
|
329
|
-
kind: Schema_exports.Literal("interval"),
|
|
330
|
-
milliseconds: Schema_exports.Int.check(
|
|
331
|
-
Schema_exports.makeFilter((value) => value >= minimumIntervalMilliseconds, {
|
|
332
|
-
message: "Schedule intervals must be at least 60 seconds"
|
|
333
|
-
}),
|
|
334
|
-
Schema_exports.isLessThanOrEqualTo(Number.MAX_SAFE_INTEGER)
|
|
335
|
-
)
|
|
336
|
-
}),
|
|
337
|
-
Schema_exports.Struct({ kind: Schema_exports.Literal("cron"), calendar: CalendarSchedule })
|
|
338
|
-
]);
|
|
339
|
-
var OperationSchedule = Schema_exports.Struct({
|
|
340
|
-
name: Schema_exports.NonEmptyString,
|
|
341
|
-
timing: ScheduleTiming,
|
|
342
|
-
input: JsonValue
|
|
343
|
-
});
|
|
344
|
-
|
|
345
392
|
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/unstable/rpc/RpcSchema.js
|
|
346
393
|
var StreamSchemaTypeId = "~effect/rpc/RpcSchema/StreamSchema";
|
|
347
394
|
var schema = /* @__PURE__ */ declare(isStream);
|
|
@@ -1840,6 +1887,16 @@ var OAuth2Method = class extends Data_exports.TaggedClass(
|
|
|
1840
1887
|
"oauth2"
|
|
1841
1888
|
) {
|
|
1842
1889
|
};
|
|
1890
|
+
var displayText = Schema_exports.String.check(Schema_exports.isMinLength(1), Schema_exports.isMaxLength(255));
|
|
1891
|
+
var AccountInfo = Schema_exports.Struct({
|
|
1892
|
+
externalId: Schema_exports.optionalKey(displayText),
|
|
1893
|
+
displayName: Schema_exports.optionalKey(displayText),
|
|
1894
|
+
username: Schema_exports.optionalKey(displayText),
|
|
1895
|
+
email: Schema_exports.optionalKey(displayText),
|
|
1896
|
+
avatarUrl: Schema_exports.optionalKey(HttpUrl),
|
|
1897
|
+
profileUrl: Schema_exports.optionalKey(HttpUrl)
|
|
1898
|
+
});
|
|
1899
|
+
var AccountCheckResult = Schema_exports.Struct({ accountInfo: Schema_exports.optionalKey(AccountInfo) });
|
|
1843
1900
|
var Provider = class extends Data_exports.Class {
|
|
1844
1901
|
/** Declare zero or more accounts from this provider without performing I/O. */
|
|
1845
1902
|
many() {
|
|
@@ -1849,10 +1906,66 @@ var Provider = class extends Data_exports.Class {
|
|
|
1849
1906
|
var ManyAccounts = class extends Data_exports.TaggedClass("many") {
|
|
1850
1907
|
};
|
|
1851
1908
|
|
|
1852
|
-
// src/contracts/
|
|
1853
|
-
var
|
|
1909
|
+
// src/contracts/protocol-version.ts
|
|
1910
|
+
var frameworkProtocol = 5;
|
|
1854
1911
|
|
|
1855
|
-
// src/contracts/
|
|
1912
|
+
// src/contracts/schedules.ts
|
|
1913
|
+
var minimumIntervalMilliseconds = 6e4;
|
|
1914
|
+
var count = Schema_exports.Int.check(Schema_exports.isGreaterThan(0));
|
|
1915
|
+
var absent = Schema_exports.optionalKey(Schema_exports.Never);
|
|
1916
|
+
var Interval = Schema_exports.Union([
|
|
1917
|
+
Schema_exports.Struct({ seconds: count, minutes: absent, hours: absent }),
|
|
1918
|
+
Schema_exports.Struct({ seconds: absent, minutes: count, hours: absent }),
|
|
1919
|
+
Schema_exports.Struct({ seconds: absent, minutes: absent, hours: count })
|
|
1920
|
+
]);
|
|
1921
|
+
var CalendarSchedule = Schema_exports.Struct({
|
|
1922
|
+
expression: Schema_exports.NonEmptyString,
|
|
1923
|
+
timezone: Schema_exports.NonEmptyString
|
|
1924
|
+
}).check(
|
|
1925
|
+
Schema_exports.makeFilter(
|
|
1926
|
+
(value) => value.expression.trim().split(/\s+/).length === 5 && Result_exports.isSuccess(Cron_exports.parse(value.expression, value.timezone))
|
|
1927
|
+
)
|
|
1928
|
+
);
|
|
1929
|
+
var ScheduleTiming = Schema_exports.Union([
|
|
1930
|
+
Schema_exports.Struct({
|
|
1931
|
+
kind: Schema_exports.Literal("interval"),
|
|
1932
|
+
milliseconds: Schema_exports.Int.check(
|
|
1933
|
+
Schema_exports.makeFilter((value) => value >= minimumIntervalMilliseconds, {
|
|
1934
|
+
message: "Schedule intervals must be at least 60 seconds"
|
|
1935
|
+
}),
|
|
1936
|
+
Schema_exports.isLessThanOrEqualTo(Number.MAX_SAFE_INTEGER)
|
|
1937
|
+
)
|
|
1938
|
+
}),
|
|
1939
|
+
Schema_exports.Struct({ kind: Schema_exports.Literal("cron"), calendar: CalendarSchedule })
|
|
1940
|
+
]);
|
|
1941
|
+
var OperationSchedule = Schema_exports.Struct({
|
|
1942
|
+
name: Schema_exports.NonEmptyString,
|
|
1943
|
+
timing: ScheduleTiming,
|
|
1944
|
+
input: JsonValue
|
|
1945
|
+
});
|
|
1946
|
+
|
|
1947
|
+
// src/contracts/protocols/1.ts
|
|
1948
|
+
var WorkflowFailure2 = class extends Schema_exports.TaggedError()("WorkflowFailure", {
|
|
1949
|
+
reason: Schema_exports.Literals([
|
|
1950
|
+
"unavailable",
|
|
1951
|
+
"not_found",
|
|
1952
|
+
"input",
|
|
1953
|
+
"output",
|
|
1954
|
+
"operation",
|
|
1955
|
+
"approval",
|
|
1956
|
+
"credentials",
|
|
1957
|
+
"terminated",
|
|
1958
|
+
"execution",
|
|
1959
|
+
"conflict",
|
|
1960
|
+
"engine"
|
|
1961
|
+
]),
|
|
1962
|
+
retryable: Schema_exports.Boolean
|
|
1963
|
+
}) {
|
|
1964
|
+
};
|
|
1965
|
+
var WorkflowRpcResult2 = Schema_exports.Union([
|
|
1966
|
+
Schema_exports.Struct({ ok: Schema_exports.Literal(true), value: JsonValue }),
|
|
1967
|
+
Schema_exports.Struct({ ok: Schema_exports.Literal(false), error: WorkflowFailure2 })
|
|
1968
|
+
]);
|
|
1856
1969
|
var DeclaredAuthMethod = Schema_exports.Union([
|
|
1857
1970
|
Schema_exports.Struct({ type: Schema_exports.Literal("secrets"), label: Schema_exports.String, fields: JsonObject2 }),
|
|
1858
1971
|
Schema_exports.Struct({
|
|
@@ -1906,6 +2019,11 @@ var ResolvedAccount = Schema_exports.Struct({
|
|
|
1906
2019
|
id: AccountId,
|
|
1907
2020
|
provider: DeclaredProvider,
|
|
1908
2021
|
method: Schema_exports.NonEmptyString,
|
|
2022
|
+
/**
|
|
2023
|
+
* Changes when the account is reconnected or its credentials replaced, not on renewal. Hosts
|
|
2024
|
+
* send it since credential generations; `apps@0.0.1-beta.0` and `beta.1` ignore it.
|
|
2025
|
+
*/
|
|
2026
|
+
generation: Schema_exports.optionalKey(Schema_exports.Int),
|
|
1909
2027
|
fields: JsonObject2
|
|
1910
2028
|
});
|
|
1911
2029
|
var ResolvedAccounts = Schema_exports.Record(
|
|
@@ -1929,16 +2047,7 @@ var HostedToolSummary = HostedTool.mapFields(
|
|
|
1929
2047
|
({ inputSchema: _input, outputSchema: _output, _meta, ...fields }) => fields
|
|
1930
2048
|
);
|
|
1931
2049
|
var SkillSources = Schema_exports.Struct({ skills: AppSkills, dynamic: Schema_exports.Boolean });
|
|
1932
|
-
var skillsCommand = (sources) => sources ? { operation: "skills", sources: true } : { operation: "skills" };
|
|
1933
2050
|
var SkillCatalogResponse = Schema_exports.Union([SkillSources, AppSkills]);
|
|
1934
|
-
var skillCatalog = (response) => Schema_exports.is(SkillSources)(response) ? response : { skills: response };
|
|
1935
|
-
var inspectCommand = (tools, scheduled) => ({
|
|
1936
|
-
operation: "inspect",
|
|
1937
|
-
...tools === void 0 ? {} : { tools: [...tools] },
|
|
1938
|
-
...scheduled === void 0 ? {} : { scheduled }
|
|
1939
|
-
});
|
|
1940
|
-
var indexCommand = { operation: "inspect", detail: "summary" };
|
|
1941
|
-
var selectTools = (tools) => (all) => tools === void 0 ? all : all.filter((tool) => tools.includes(tool.name));
|
|
1942
2051
|
var HostRequest = Schema_exports.Union([
|
|
1943
2052
|
WorkflowCommand,
|
|
1944
2053
|
WebhookCommand,
|
|
@@ -2036,23 +2145,19 @@ var HostOutputInvalid = class extends Schema_exports.TaggedError()(
|
|
|
2036
2145
|
{}
|
|
2037
2146
|
) {
|
|
2038
2147
|
};
|
|
2039
|
-
var
|
|
2040
|
-
|
|
2148
|
+
var HostError = Schema_exports.Union([
|
|
2149
|
+
OpenapiResponseError,
|
|
2041
2150
|
ProviderError,
|
|
2042
2151
|
McpError,
|
|
2043
2152
|
SkillLoadFailed,
|
|
2153
|
+
WorkflowFailure2,
|
|
2044
2154
|
HostRequestInvalid,
|
|
2045
|
-
HostDeclarationInvalid,
|
|
2046
2155
|
HostAccountsInvalid,
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
var HostCallError = Schema_exports.Union([
|
|
2050
|
-
OpenapiResponseError,
|
|
2051
|
-
WorkflowFailure,
|
|
2052
|
-
HostInspectError,
|
|
2053
|
-
HostToolNotFound,
|
|
2156
|
+
HostDeclarationInvalid,
|
|
2157
|
+
HostEvaluationFailed,
|
|
2054
2158
|
HostOperationNotFound,
|
|
2055
2159
|
HostOperationFailed,
|
|
2160
|
+
HostToolNotFound,
|
|
2056
2161
|
HostInputInvalid,
|
|
2057
2162
|
HostOutputInvalid,
|
|
2058
2163
|
HostToolBlocked,
|
|
@@ -2060,8 +2165,71 @@ var HostCallError = Schema_exports.Union([
|
|
|
2060
2165
|
HostToolPolicyFailed,
|
|
2061
2166
|
ElicitationFailed
|
|
2062
2167
|
]);
|
|
2063
|
-
var
|
|
2064
|
-
|
|
2168
|
+
var HostResponse = Schema_exports.Union([
|
|
2169
|
+
Schema_exports.Struct({
|
|
2170
|
+
ok: Schema_exports.Literal(true),
|
|
2171
|
+
value: JsonValue,
|
|
2172
|
+
toolError: Schema_exports.optionalKey(Schema_exports.Literal(true))
|
|
2173
|
+
}),
|
|
2174
|
+
Schema_exports.Struct({ ok: Schema_exports.Literal(false), error: HostError })
|
|
2175
|
+
]);
|
|
2176
|
+
var HostInvocation = Schema_exports.Struct({
|
|
2177
|
+
command: HostRequest,
|
|
2178
|
+
accounts: ResolvedAccounts,
|
|
2179
|
+
approval: Schema_exports.optionalKey(TrustedToolApproval),
|
|
2180
|
+
replay: Schema_exports.optionalKey(WorkflowReplay),
|
|
2181
|
+
deadline: Schema_exports.optionalKey(InvocationDeadline),
|
|
2182
|
+
workflowRun: Schema_exports.optionalKey(WorkflowRunId)
|
|
2183
|
+
});
|
|
2184
|
+
var protocol1 = {
|
|
2185
|
+
version: 1,
|
|
2186
|
+
schemas: {
|
|
2187
|
+
invocation: HostInvocation,
|
|
2188
|
+
request: HostRequest,
|
|
2189
|
+
response: HostResponse,
|
|
2190
|
+
requirements: DeclaredRequirements,
|
|
2191
|
+
tools: Schema_exports.Array(HostedTool),
|
|
2192
|
+
toolSummaries: Schema_exports.Array(HostedToolSummary),
|
|
2193
|
+
skills: SkillCatalogResponse,
|
|
2194
|
+
elicitationRequest: FormElicitation,
|
|
2195
|
+
elicitationReply: ElicitationReply,
|
|
2196
|
+
workflowStep: WorkflowRpcCommand,
|
|
2197
|
+
workflowStepReply: WorkflowRpcResult2,
|
|
2198
|
+
workflowControl: WorkflowControlCommand,
|
|
2199
|
+
cacheCommand: CacheCommand,
|
|
2200
|
+
cacheReply: CacheReply
|
|
2201
|
+
}
|
|
2202
|
+
};
|
|
2203
|
+
|
|
2204
|
+
// src/contracts/protocols/2.ts
|
|
2205
|
+
var SkillSources2 = Schema_exports.Struct({
|
|
2206
|
+
skills: AppSkills,
|
|
2207
|
+
dynamic: Schema_exports.Boolean,
|
|
2208
|
+
cached: Schema_exports.optionalKey(Schema_exports.Boolean)
|
|
2209
|
+
});
|
|
2210
|
+
var SkillCatalogResponse2 = Schema_exports.Union([SkillSources2, AppSkills]);
|
|
2211
|
+
var protocol2 = {
|
|
2212
|
+
version: 2,
|
|
2213
|
+
schemas: { ...protocol1.schemas, skills: SkillCatalogResponse2 }
|
|
2214
|
+
};
|
|
2215
|
+
|
|
2216
|
+
// src/contracts/protocols/3.ts
|
|
2217
|
+
var HostDeclarationInvalid2 = class extends Schema_exports.TaggedError()(
|
|
2218
|
+
"HostDeclarationInvalid",
|
|
2219
|
+
FailureDetail
|
|
2220
|
+
) {
|
|
2221
|
+
};
|
|
2222
|
+
var HostEvaluationFailed2 = class extends Schema_exports.TaggedError()(
|
|
2223
|
+
"HostEvaluationFailed",
|
|
2224
|
+
FailureDetail
|
|
2225
|
+
) {
|
|
2226
|
+
};
|
|
2227
|
+
var HostOperationFailed2 = class extends Schema_exports.TaggedError()(
|
|
2228
|
+
"HostOperationFailed",
|
|
2229
|
+
FailureDetail
|
|
2230
|
+
) {
|
|
2231
|
+
};
|
|
2232
|
+
var HostError2 = Schema_exports.Union([
|
|
2065
2233
|
OpenapiResponseError,
|
|
2066
2234
|
ProviderError,
|
|
2067
2235
|
McpError,
|
|
@@ -2069,10 +2237,12 @@ var HostError = Schema_exports.Union([
|
|
|
2069
2237
|
WorkflowFailure,
|
|
2070
2238
|
HostRequestInvalid,
|
|
2071
2239
|
HostAccountsInvalid,
|
|
2072
|
-
|
|
2073
|
-
|
|
2240
|
+
HostDeclarationInvalid2,
|
|
2241
|
+
HostEvaluationFailed2,
|
|
2074
2242
|
HostOperationNotFound,
|
|
2075
|
-
|
|
2243
|
+
HostOperationFailed2,
|
|
2244
|
+
DatabaseLimitExceeded,
|
|
2245
|
+
DatabaseFieldReserved,
|
|
2076
2246
|
HostToolNotFound,
|
|
2077
2247
|
HostInputInvalid,
|
|
2078
2248
|
HostOutputInvalid,
|
|
@@ -2081,19 +2251,269 @@ var HostError = Schema_exports.Union([
|
|
|
2081
2251
|
HostToolPolicyFailed,
|
|
2082
2252
|
ElicitationFailed
|
|
2083
2253
|
]);
|
|
2084
|
-
var
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2254
|
+
var HostResponse2 = Schema_exports.Union([
|
|
2255
|
+
Schema_exports.Struct({
|
|
2256
|
+
ok: Schema_exports.Literal(true),
|
|
2257
|
+
value: JsonValue,
|
|
2258
|
+
toolError: Schema_exports.optionalKey(Schema_exports.Literal(true))
|
|
2259
|
+
}),
|
|
2260
|
+
Schema_exports.Struct({ ok: Schema_exports.Literal(false), error: HostError2 })
|
|
2261
|
+
]);
|
|
2262
|
+
var protocol3 = {
|
|
2263
|
+
version: 3,
|
|
2264
|
+
schemas: {
|
|
2265
|
+
invocation: HostInvocation,
|
|
2266
|
+
request: HostRequest,
|
|
2267
|
+
response: HostResponse2,
|
|
2268
|
+
requirements: DeclaredRequirements,
|
|
2269
|
+
tools: Schema_exports.Array(HostedTool),
|
|
2270
|
+
toolSummaries: Schema_exports.Array(HostedToolSummary),
|
|
2271
|
+
skills: SkillCatalogResponse2,
|
|
2272
|
+
elicitationRequest: FormElicitation,
|
|
2273
|
+
elicitationReply: ElicitationReply,
|
|
2274
|
+
workflowStep: WorkflowRpcCommand,
|
|
2275
|
+
workflowStepReply: WorkflowRpcResult,
|
|
2276
|
+
workflowControl: WorkflowControlCommand,
|
|
2277
|
+
cacheCommand: CacheCommand,
|
|
2278
|
+
cacheReply: CacheReply
|
|
2279
|
+
}
|
|
2280
|
+
};
|
|
2281
|
+
|
|
2282
|
+
// src/contracts/protocols/4.ts
|
|
2283
|
+
var HostedTool2 = Schema_exports.Struct({
|
|
2284
|
+
schedules: Schema_exports.optionalKey(Schema_exports.Array(OperationSchedule)),
|
|
2285
|
+
name: Schema_exports.NonEmptyString,
|
|
2286
|
+
router: Schema_exports.optionalKey(Schema_exports.NonEmptyString),
|
|
2287
|
+
tags: Schema_exports.optionalKey(Schema_exports.Array(Schema_exports.NonEmptyString)),
|
|
2288
|
+
description: Schema_exports.String,
|
|
2289
|
+
inputSchema: JsonObject2,
|
|
2290
|
+
readOnly: Schema_exports.optionalKey(Schema_exports.Boolean),
|
|
2291
|
+
title: Schema_exports.optionalKey(Schema_exports.String),
|
|
2292
|
+
outputSchema: Schema_exports.optionalKey(JsonObject2),
|
|
2293
|
+
annotations: Schema_exports.optionalKey(ToolAnnotations),
|
|
2294
|
+
_meta: Schema_exports.optionalKey(JsonObject2)
|
|
2295
|
+
});
|
|
2296
|
+
var HostedToolSummary2 = HostedTool2.mapFields(
|
|
2297
|
+
({ inputSchema: _input, outputSchema: _output, _meta, ...fields }) => fields
|
|
2088
2298
|
);
|
|
2089
|
-
var
|
|
2299
|
+
var HostRouterError = Schema_exports.Union([
|
|
2300
|
+
ProviderError,
|
|
2301
|
+
McpError,
|
|
2302
|
+
SkillLoadFailed,
|
|
2303
|
+
HostDeclarationInvalid2,
|
|
2304
|
+
HostEvaluationFailed2
|
|
2305
|
+
]);
|
|
2306
|
+
var HostedRouter = Schema_exports.Struct({
|
|
2307
|
+
path: Schema_exports.String,
|
|
2308
|
+
title: Schema_exports.optionalKey(Schema_exports.String),
|
|
2309
|
+
description: Schema_exports.optionalKey(Schema_exports.String),
|
|
2310
|
+
icons: Schema_exports.optionalKey(Schema_exports.Array(RouterIcon)),
|
|
2311
|
+
tags: Schema_exports.optionalKey(Schema_exports.Record(Schema_exports.NonEmptyString, Schema_exports.String)),
|
|
2312
|
+
skill: Schema_exports.optionalKey(AppSkillName),
|
|
2313
|
+
error: Schema_exports.optionalKey(HostRouterError)
|
|
2314
|
+
});
|
|
2315
|
+
var HostedCatalog = Schema_exports.Struct({
|
|
2316
|
+
tools: Schema_exports.Array(HostedTool2),
|
|
2317
|
+
routers: Schema_exports.Array(HostedRouter)
|
|
2318
|
+
});
|
|
2319
|
+
var HostedCatalogSummary = Schema_exports.Struct({
|
|
2320
|
+
tools: Schema_exports.Array(HostedToolSummary2),
|
|
2321
|
+
routers: Schema_exports.Array(HostedRouter)
|
|
2322
|
+
});
|
|
2323
|
+
var ToolKind = Schema_exports.Literals(["query", "mutation"]);
|
|
2324
|
+
var HostRequest2 = Schema_exports.Union([
|
|
2325
|
+
WorkflowCommand,
|
|
2326
|
+
WebhookCommand,
|
|
2327
|
+
Schema_exports.Struct({ operation: Schema_exports.Literal("requirements") }),
|
|
2328
|
+
Schema_exports.Struct({
|
|
2329
|
+
operation: Schema_exports.Literal("inspect"),
|
|
2330
|
+
/** Omit schemas. Only builds that declare the toolIndex capability accept this. */
|
|
2331
|
+
detail: Schema_exports.optionalKey(Schema_exports.Literal("summary")),
|
|
2332
|
+
/** Describe only these tools. Only builds that declare the toolIndex capability accept this. */
|
|
2333
|
+
tools: Schema_exports.optionalKey(Schema_exports.Array(Schema_exports.NonEmptyString)),
|
|
2334
|
+
/**
|
|
2335
|
+
* Describe only declared operations that have schedules, without dynamic tool discovery.
|
|
2336
|
+
* Only builds that declare the scheduledTools capability accept this.
|
|
2337
|
+
*/
|
|
2338
|
+
scheduled: Schema_exports.optionalKey(Schema_exports.Literal(true))
|
|
2339
|
+
}),
|
|
2340
|
+
Schema_exports.Struct({
|
|
2341
|
+
operation: Schema_exports.Literal("skills"),
|
|
2342
|
+
/** Answer with SkillSources. Only builds that declare the skillSources capability accept this. */
|
|
2343
|
+
sources: Schema_exports.optionalKey(Schema_exports.Literal(true))
|
|
2344
|
+
}),
|
|
2345
|
+
Schema_exports.Struct({
|
|
2346
|
+
operation: Schema_exports.Literal("query"),
|
|
2347
|
+
name: Schema_exports.NonEmptyString,
|
|
2348
|
+
input: JsonValue
|
|
2349
|
+
}),
|
|
2350
|
+
Schema_exports.Struct({
|
|
2351
|
+
operation: Schema_exports.Literal("mutate"),
|
|
2352
|
+
name: Schema_exports.NonEmptyString,
|
|
2353
|
+
input: JsonValue
|
|
2354
|
+
}),
|
|
2355
|
+
Schema_exports.Struct({
|
|
2356
|
+
operation: Schema_exports.Literal("call"),
|
|
2357
|
+
tool: Schema_exports.NonEmptyString,
|
|
2358
|
+
/**
|
|
2359
|
+
* The caller's claim; the bundle rejects a call whose tool has the other kind. The host omits
|
|
2360
|
+
* it for a tool its catalog does not list, and then opens storage for writing.
|
|
2361
|
+
*/
|
|
2362
|
+
kind: Schema_exports.optionalKey(ToolKind),
|
|
2363
|
+
input: JsonValue
|
|
2364
|
+
})
|
|
2365
|
+
]);
|
|
2366
|
+
var HostKindMismatch = class extends Schema_exports.TaggedError()("HostKindMismatch", {
|
|
2367
|
+
tool: Schema_exports.NonEmptyString,
|
|
2368
|
+
requested: ToolKind,
|
|
2369
|
+
actual: ToolKind
|
|
2370
|
+
}) {
|
|
2371
|
+
};
|
|
2372
|
+
var HostError3 = Schema_exports.Union([...HostError2.members, HostKindMismatch]);
|
|
2373
|
+
var HostResponse3 = Schema_exports.Union([
|
|
2090
2374
|
Schema_exports.Struct({
|
|
2091
2375
|
ok: Schema_exports.Literal(true),
|
|
2092
2376
|
value: JsonValue,
|
|
2093
2377
|
toolError: Schema_exports.optionalKey(Schema_exports.Literal(true))
|
|
2094
2378
|
}),
|
|
2095
|
-
Schema_exports.Struct({ ok: Schema_exports.Literal(false), error:
|
|
2379
|
+
Schema_exports.Struct({ ok: Schema_exports.Literal(false), error: HostError3 })
|
|
2096
2380
|
]);
|
|
2381
|
+
var HostInvocation2 = Schema_exports.Struct({
|
|
2382
|
+
command: HostRequest2,
|
|
2383
|
+
accounts: ResolvedAccounts,
|
|
2384
|
+
approval: Schema_exports.optionalKey(TrustedToolApproval),
|
|
2385
|
+
replay: Schema_exports.optionalKey(WorkflowReplay),
|
|
2386
|
+
deadline: Schema_exports.optionalKey(InvocationDeadline),
|
|
2387
|
+
workflowRun: Schema_exports.optionalKey(WorkflowRunId)
|
|
2388
|
+
});
|
|
2389
|
+
var protocol4 = {
|
|
2390
|
+
version: 4,
|
|
2391
|
+
schemas: {
|
|
2392
|
+
invocation: HostInvocation2,
|
|
2393
|
+
request: HostRequest2,
|
|
2394
|
+
response: HostResponse3,
|
|
2395
|
+
requirements: DeclaredRequirements,
|
|
2396
|
+
catalog: HostedCatalog,
|
|
2397
|
+
catalogSummary: HostedCatalogSummary,
|
|
2398
|
+
skills: SkillCatalogResponse2,
|
|
2399
|
+
elicitationRequest: FormElicitation,
|
|
2400
|
+
elicitationReply: ElicitationReply,
|
|
2401
|
+
workflowStep: WorkflowRpcCommand,
|
|
2402
|
+
workflowStepReply: WorkflowRpcResult,
|
|
2403
|
+
workflowControl: WorkflowControlCommand,
|
|
2404
|
+
cacheCommand: CacheCommand,
|
|
2405
|
+
cacheReply: CacheReply
|
|
2406
|
+
}
|
|
2407
|
+
};
|
|
2408
|
+
|
|
2409
|
+
// src/contracts/protocols/5.ts
|
|
2410
|
+
var DeclaredRequirements2 = Schema_exports.Struct({
|
|
2411
|
+
/** Protocol support of this retained framework build, not an author-declared requirement. */
|
|
2412
|
+
capabilities: Schema_exports.optionalKey(
|
|
2413
|
+
Schema_exports.Struct({
|
|
2414
|
+
skills: Schema_exports.Literal(true),
|
|
2415
|
+
toolIndex: Schema_exports.optionalKey(Schema_exports.Literal(true)),
|
|
2416
|
+
skillSources: Schema_exports.optionalKey(Schema_exports.Literal(true)),
|
|
2417
|
+
scheduledTools: Schema_exports.optionalKey(Schema_exports.Literal(true))
|
|
2418
|
+
})
|
|
2419
|
+
),
|
|
2420
|
+
database: Schema_exports.optionalKey(DatabaseSchema),
|
|
2421
|
+
accounts: Schema_exports.Record(
|
|
2422
|
+
Schema_exports.NonEmptyString,
|
|
2423
|
+
Schema_exports.Struct({
|
|
2424
|
+
definition: DeclaredProvider,
|
|
2425
|
+
cardinality: Schema_exports.Literals(["one", "many"]),
|
|
2426
|
+
/**
|
|
2427
|
+
* The slot's provider defines an account check. Kept beside the definition, not in it, so
|
|
2428
|
+
* adding or editing a check never changes the provider's identity.
|
|
2429
|
+
*/
|
|
2430
|
+
health: Schema_exports.optionalKey(Schema_exports.Literal(true))
|
|
2431
|
+
})
|
|
2432
|
+
)
|
|
2433
|
+
});
|
|
2434
|
+
var AccountCheckCommand = Schema_exports.Struct({
|
|
2435
|
+
operation: Schema_exports.Literal("account-check"),
|
|
2436
|
+
requirement: Schema_exports.NonEmptyString
|
|
2437
|
+
});
|
|
2438
|
+
var HostRequest3 = Schema_exports.Union([
|
|
2439
|
+
...protocol4.schemas.request.members,
|
|
2440
|
+
AccountCheckCommand
|
|
2441
|
+
]);
|
|
2442
|
+
var HostInvocation3 = Schema_exports.Struct({
|
|
2443
|
+
command: HostRequest3,
|
|
2444
|
+
accounts: ResolvedAccounts,
|
|
2445
|
+
approval: Schema_exports.optionalKey(TrustedToolApproval),
|
|
2446
|
+
replay: Schema_exports.optionalKey(WorkflowReplay),
|
|
2447
|
+
deadline: Schema_exports.optionalKey(InvocationDeadline),
|
|
2448
|
+
workflowRun: Schema_exports.optionalKey(WorkflowRunId)
|
|
2449
|
+
});
|
|
2450
|
+
var protocol5 = {
|
|
2451
|
+
version: 5,
|
|
2452
|
+
schemas: {
|
|
2453
|
+
...protocol4.schemas,
|
|
2454
|
+
invocation: HostInvocation3,
|
|
2455
|
+
request: HostRequest3,
|
|
2456
|
+
requirements: DeclaredRequirements2,
|
|
2457
|
+
accountCheck: AccountCheckResult
|
|
2458
|
+
}
|
|
2459
|
+
};
|
|
2460
|
+
|
|
2461
|
+
// src/contracts/host.ts
|
|
2462
|
+
var skillsCommand = (sources) => sources ? { operation: "skills", sources: true } : { operation: "skills" };
|
|
2463
|
+
var skillCatalog = (response) => Schema_exports.is(SkillSources2)(response) ? response : { skills: response };
|
|
2464
|
+
var inspectCommand = (tools, scheduled) => ({
|
|
2465
|
+
operation: "inspect",
|
|
2466
|
+
...tools === void 0 ? {} : { tools: [...tools] },
|
|
2467
|
+
...scheduled === void 0 ? {} : { scheduled }
|
|
2468
|
+
});
|
|
2469
|
+
var indexCommand = { operation: "inspect", detail: "summary" };
|
|
2470
|
+
var selectTools = (tools) => (catalog) => tools === void 0 ? catalog : { ...catalog, tools: catalog.tools.filter((tool) => tools.includes(tool.name)) };
|
|
2471
|
+
var HostRequirementsError = Schema_exports.Union([
|
|
2472
|
+
HostRequestInvalid,
|
|
2473
|
+
HostDeclarationInvalid2,
|
|
2474
|
+
DatabaseFieldReserved
|
|
2475
|
+
]);
|
|
2476
|
+
var HostInspectError = Schema_exports.Union([
|
|
2477
|
+
ProviderError,
|
|
2478
|
+
McpError,
|
|
2479
|
+
SkillLoadFailed,
|
|
2480
|
+
HostRequestInvalid,
|
|
2481
|
+
HostDeclarationInvalid2,
|
|
2482
|
+
HostAccountsInvalid,
|
|
2483
|
+
HostEvaluationFailed2
|
|
2484
|
+
]);
|
|
2485
|
+
var HostCallError = Schema_exports.Union([
|
|
2486
|
+
OpenapiResponseError,
|
|
2487
|
+
WorkflowFailure,
|
|
2488
|
+
HostInspectError,
|
|
2489
|
+
HostToolNotFound,
|
|
2490
|
+
HostOperationNotFound,
|
|
2491
|
+
HostKindMismatch,
|
|
2492
|
+
HostOperationFailed2,
|
|
2493
|
+
DatabaseLimitExceeded,
|
|
2494
|
+
HostInputInvalid,
|
|
2495
|
+
HostOutputInvalid,
|
|
2496
|
+
HostToolBlocked,
|
|
2497
|
+
HostToolApprovalRequired,
|
|
2498
|
+
HostToolPolicyFailed,
|
|
2499
|
+
ElicitationFailed
|
|
2500
|
+
]);
|
|
2501
|
+
var HostAccountCheckError = Schema_exports.Union([
|
|
2502
|
+
ProviderError,
|
|
2503
|
+
WorkflowFailure,
|
|
2504
|
+
HostRequestInvalid,
|
|
2505
|
+
HostDeclarationInvalid2,
|
|
2506
|
+
HostAccountsInvalid,
|
|
2507
|
+
HostOperationNotFound,
|
|
2508
|
+
HostOperationFailed2,
|
|
2509
|
+
HostOutputInvalid
|
|
2510
|
+
]);
|
|
2511
|
+
var HostDataError = HostCallError;
|
|
2512
|
+
var ToolResultObservation = Context_exports.Reference(
|
|
2513
|
+
"apps/ToolResultObservation",
|
|
2514
|
+
{ defaultValue: () => ({ failed: () => {
|
|
2515
|
+
} }) }
|
|
2516
|
+
);
|
|
2097
2517
|
|
|
2098
2518
|
export {
|
|
2099
2519
|
SecretsMethod,
|
|
@@ -2102,8 +2522,14 @@ export {
|
|
|
2102
2522
|
OAuth2Config,
|
|
2103
2523
|
OAuth2AccessToken,
|
|
2104
2524
|
OAuth2Method,
|
|
2525
|
+
AccountInfo,
|
|
2526
|
+
AccountCheckResult,
|
|
2105
2527
|
Provider,
|
|
2106
2528
|
ManyAccounts,
|
|
2529
|
+
reservedRouterKeys,
|
|
2530
|
+
RouterKey,
|
|
2531
|
+
RouterIcon,
|
|
2532
|
+
RouterMeta,
|
|
2107
2533
|
ToolAnnotations,
|
|
2108
2534
|
McpClientLimits,
|
|
2109
2535
|
defaultMcpClientLimits,
|
|
@@ -2111,13 +2537,26 @@ export {
|
|
|
2111
2537
|
McpToolsOptions,
|
|
2112
2538
|
McpToolResult,
|
|
2113
2539
|
McpToolMetadata,
|
|
2540
|
+
McpServerHeader,
|
|
2114
2541
|
McpError,
|
|
2115
2542
|
ProcessConfig,
|
|
2543
|
+
ApiErrorRecovery,
|
|
2544
|
+
ApiErrorResponse,
|
|
2545
|
+
OpenapiResponseError,
|
|
2546
|
+
defaultOpenapiErrorLimits,
|
|
2547
|
+
maxFailureMessageLength,
|
|
2548
|
+
FailureSource,
|
|
2549
|
+
FailureName,
|
|
2550
|
+
FailureCode,
|
|
2551
|
+
FailureMessage,
|
|
2552
|
+
FailureDetail,
|
|
2116
2553
|
WorkflowRunId,
|
|
2117
2554
|
WorkflowName,
|
|
2118
2555
|
workflowDurationMillis,
|
|
2119
2556
|
WorkflowDuration,
|
|
2120
2557
|
WorkflowStepOptions,
|
|
2558
|
+
WorkflowFailureDetail,
|
|
2559
|
+
WorkflowRunFailure,
|
|
2121
2560
|
WorkflowFailure,
|
|
2122
2561
|
NonRetryableError,
|
|
2123
2562
|
WorkflowValue,
|
|
@@ -2129,11 +2568,6 @@ export {
|
|
|
2129
2568
|
WorkflowRpcCommand,
|
|
2130
2569
|
WorkflowRpcResult,
|
|
2131
2570
|
WorkflowControlCommand,
|
|
2132
|
-
minimumIntervalMilliseconds,
|
|
2133
|
-
Interval,
|
|
2134
|
-
CalendarSchedule,
|
|
2135
|
-
ScheduleTiming,
|
|
2136
|
-
OperationSchedule,
|
|
2137
2571
|
ElicitationLimits,
|
|
2138
2572
|
defaultElicitationLimits,
|
|
2139
2573
|
FormElicitation,
|
|
@@ -2151,30 +2585,21 @@ export {
|
|
|
2151
2585
|
ManualWebhookDescriptor,
|
|
2152
2586
|
HostedWebhook,
|
|
2153
2587
|
WebhookCommand,
|
|
2154
|
-
|
|
2588
|
+
frameworkProtocol,
|
|
2589
|
+
minimumIntervalMilliseconds,
|
|
2590
|
+
Interval,
|
|
2591
|
+
CalendarSchedule,
|
|
2592
|
+
ScheduleTiming,
|
|
2593
|
+
OperationSchedule,
|
|
2155
2594
|
DeclaredAuthMethod,
|
|
2156
2595
|
DeclaredProvider,
|
|
2157
|
-
DeclaredRequirements,
|
|
2158
2596
|
ResolvedAccount,
|
|
2159
2597
|
ResolvedAccounts,
|
|
2160
2598
|
TrustedToolApproval,
|
|
2161
2599
|
InvocationDeadline,
|
|
2162
|
-
HostedTool,
|
|
2163
|
-
HostedToolSummary,
|
|
2164
|
-
SkillSources,
|
|
2165
|
-
skillsCommand,
|
|
2166
|
-
SkillCatalogResponse,
|
|
2167
|
-
skillCatalog,
|
|
2168
|
-
inspectCommand,
|
|
2169
|
-
indexCommand,
|
|
2170
|
-
selectTools,
|
|
2171
|
-
HostRequest,
|
|
2172
2600
|
HostRequestInvalid,
|
|
2173
2601
|
HostAccountsInvalid,
|
|
2174
|
-
HostDeclarationInvalid,
|
|
2175
|
-
HostEvaluationFailed,
|
|
2176
2602
|
HostOperationNotFound,
|
|
2177
|
-
HostOperationFailed,
|
|
2178
2603
|
HostToolNotFound,
|
|
2179
2604
|
InputProblem,
|
|
2180
2605
|
maxInputProblems,
|
|
@@ -2183,11 +2608,38 @@ export {
|
|
|
2183
2608
|
HostToolApprovalRequired,
|
|
2184
2609
|
HostToolPolicyFailed,
|
|
2185
2610
|
HostOutputInvalid,
|
|
2611
|
+
protocol1,
|
|
2612
|
+
SkillSources2 as SkillSources,
|
|
2613
|
+
SkillCatalogResponse2 as SkillCatalogResponse,
|
|
2614
|
+
protocol2,
|
|
2615
|
+
HostDeclarationInvalid2 as HostDeclarationInvalid,
|
|
2616
|
+
HostEvaluationFailed2 as HostEvaluationFailed,
|
|
2617
|
+
HostOperationFailed2 as HostOperationFailed,
|
|
2618
|
+
protocol3,
|
|
2619
|
+
HostedTool2 as HostedTool,
|
|
2620
|
+
HostedToolSummary2 as HostedToolSummary,
|
|
2621
|
+
HostRouterError,
|
|
2622
|
+
HostedRouter,
|
|
2623
|
+
HostedCatalog,
|
|
2624
|
+
HostedCatalogSummary,
|
|
2625
|
+
HostKindMismatch,
|
|
2626
|
+
HostError3 as HostError,
|
|
2627
|
+
HostResponse3 as HostResponse,
|
|
2628
|
+
protocol4,
|
|
2629
|
+
DeclaredRequirements2 as DeclaredRequirements,
|
|
2630
|
+
AccountCheckCommand,
|
|
2631
|
+
HostRequest3 as HostRequest,
|
|
2632
|
+
HostInvocation3 as HostInvocation,
|
|
2633
|
+
protocol5,
|
|
2634
|
+
skillsCommand,
|
|
2635
|
+
skillCatalog,
|
|
2636
|
+
inspectCommand,
|
|
2637
|
+
indexCommand,
|
|
2638
|
+
selectTools,
|
|
2186
2639
|
HostRequirementsError,
|
|
2187
2640
|
HostInspectError,
|
|
2188
2641
|
HostCallError,
|
|
2642
|
+
HostAccountCheckError,
|
|
2189
2643
|
HostDataError,
|
|
2190
|
-
|
|
2191
|
-
ToolResultObservation,
|
|
2192
|
-
HostResponse
|
|
2644
|
+
ToolResultObservation
|
|
2193
2645
|
};
|