apps 0.0.1-beta.0 → 0.0.1-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +97 -4
- package/framework-reference.json +1 -1
- package/js/{chunk-BPEFS4YF.js → chunk-2HHMABB6.js} +70 -14
- package/js/{chunk-SBKHUC5L.js → chunk-4LPG6RCH.js} +2 -2
- package/js/{chunk-LOKGDT6B.js → chunk-6IIO4NPI.js} +5 -4
- package/js/chunk-6YBRWRK3.js +160 -0
- package/js/{chunk-7JXHF5IF.js → chunk-BMOIAIVR.js} +1 -1
- package/js/chunk-CZ7CSFO4.js +39 -0
- package/js/{chunk-YDR4CPJA.js → chunk-EVJUVWN2.js} +8 -8
- package/js/{chunk-2OTCEKL2.js → chunk-FW5HBOIK.js} +2352 -1493
- package/js/{chunk-EP6AEUZO.js → chunk-FZJOYIZO.js} +1 -1
- package/js/{chunk-WIDTG42X.js → chunk-G7IE6BKC.js} +79 -26
- package/js/{chunk-VFUZI3NY.js → chunk-HDJH3RPR.js} +4 -4
- package/js/{chunk-HP7E42X6.js → chunk-IHQ4ML7K.js} +693 -219
- package/js/{chunk-Q2FD5IBM.js → chunk-KOXMLKTM.js} +430 -41
- package/js/{chunk-D6BKYP2L.js → chunk-M6ZRRIBI.js} +4 -4
- package/js/chunk-NCYXZN2G.js +6274 -0
- package/js/{chunk-3ANFZFCV.js → chunk-OHRT55C4.js} +15 -15
- package/js/{chunk-R6JMJSVT.js → chunk-PLCMJREA.js} +2 -2
- package/js/{chunk-C24KEZXR.js → chunk-PZ36XMXW.js} +36 -2
- package/js/{chunk-W7Q5EOTS.js → chunk-QKHR7BMF.js} +32 -32
- package/js/{chunk-X3YBZCJW.js → chunk-RBAC33PQ.js} +59 -38
- package/js/{chunk-36DNRFZQ.js → chunk-SATWJKN6.js} +1 -1
- package/js/chunk-SWPD52J7.js +35 -0
- package/js/{chunk-BKVL7XAJ.js → chunk-TE4KO4HI.js} +1 -1
- package/js/chunk-W7D7WVSY.js +18 -0
- package/js/{chunk-KWTCHVLT.js → chunk-X7SFGU4Q.js} +47 -51
- package/js/chunk-YEJOQEII.js +104 -0
- package/js/{chunk-OWD2YICM.js → chunk-ZCAMUXSG.js} +116 -87
- package/js/chunk-ZJWDMTE3.js +63 -0
- package/js/chunk-ZTFQHGEB.js +80 -0
- package/js/client.js +11 -11
- package/js/contracts.js +81 -25
- package/js/effect.js +20 -15
- package/js/graphql.js +223 -121
- package/js/host.js +75 -19
- package/js/index.js +191 -51
- package/js/mcp/effect.js +24 -17
- package/js/mcp/stdio.js +22 -17
- package/js/mcp.js +109 -24
- package/js/openapi.js +43897 -143
- package/js/operations/approval.js +1 -1
- package/js/react.js +4 -4
- package/js/skills/effect.js +12 -0
- package/js/skills.js +857 -0
- package/js/storage/facet.js +7 -7
- package/js/ui/auth/contracts.js +6 -6
- package/js/ui/auth.js +8 -8
- package/js/ui/contracts.js +5 -5
- package/js/ui/serving.js +12 -12
- package/package.json +9 -1
- package/runtime.json +1 -1
- package/types/app-cache/src/contracts/cache.d.ts +79 -0
- package/types/app-cache/src/index.d.ts +35 -0
- package/types/apps/src/contracts/api-response-error.d.ts +43 -0
- package/types/apps/src/contracts/app.d.ts +11 -0
- package/types/apps/src/contracts/cache.d.ts +41 -0
- package/types/apps/src/contracts/dynamic-skills.d.ts +10 -0
- package/types/apps/src/contracts/dynamic-tools.d.ts +13 -0
- package/types/apps/src/contracts/graphql.d.ts +18 -1
- package/types/apps/src/contracts/host.d.ts +200 -7
- package/types/apps/src/contracts/mcp.d.ts +3 -1
- package/types/apps/src/contracts/openapi-compile.d.ts +11 -0
- package/types/apps/src/contracts/openapi-document.d.ts +53 -0
- package/types/apps/src/contracts/openapi.d.ts +150 -30
- package/types/apps/src/contracts/provider-error.d.ts +15 -0
- package/types/apps/src/contracts/provider.d.ts +18 -1
- package/types/apps/src/contracts/skills.d.ts +113 -0
- package/types/apps/src/contracts/swagger-client.d.ts +29 -0
- package/types/apps/src/graphql.d.ts +6 -6
- package/types/apps/src/host.d.ts +1 -0
- package/types/apps/src/implementation/account-operations.d.ts +122 -3
- package/types/apps/src/implementation/app.d.ts +1 -1
- package/types/apps/src/implementation/cache-session.d.ts +7 -0
- package/types/apps/src/implementation/cache.d.ts +6 -0
- package/types/apps/src/implementation/catalog-cache.d.ts +29 -0
- package/types/apps/src/implementation/dynamic-skills.d.ts +7 -0
- package/types/apps/src/implementation/dynamic-tools.d.ts +8 -0
- package/types/apps/src/implementation/elicitation.d.ts +12 -12
- package/types/apps/src/implementation/git.d.ts +25 -0
- package/types/apps/src/implementation/graphql-catalog.d.ts +10 -0
- package/types/apps/src/implementation/graphql.d.ts +81 -3
- package/types/apps/src/implementation/inflate.d.ts +16 -0
- package/types/apps/src/implementation/input-problems.d.ts +3 -0
- package/types/apps/src/implementation/mcp-call.d.ts +3 -2
- package/types/apps/src/implementation/mcp-catalog.d.ts +12 -0
- package/types/apps/src/implementation/mcp-client.d.ts +9 -8
- package/types/apps/src/implementation/mcp-stdio.d.ts +1 -1
- package/types/apps/src/implementation/mcp-tools.d.ts +6 -3
- package/types/apps/src/implementation/mcp.d.ts +39 -2
- package/types/apps/src/implementation/openapi-compile.d.ts +119 -0
- package/types/apps/src/implementation/openapi-document.d.ts +53 -0
- package/types/apps/src/implementation/openapi-request.d.ts +11 -4
- package/types/apps/src/implementation/openapi-source.d.ts +36 -0
- package/types/apps/src/implementation/openapi.d.ts +39 -3
- package/types/apps/src/implementation/provider-error.d.ts +10 -0
- package/types/apps/src/implementation/schema.d.ts +11 -5
- package/types/apps/src/implementation/skill-files.d.ts +10 -0
- package/types/apps/src/implementation/skills.d.ts +43 -0
- package/types/apps/src/index.d.ts +7 -0
- package/types/apps/src/mcp.d.ts +5 -5
- package/types/apps/src/openapi.d.ts +3 -1
- package/types/apps/src/skills.d.ts +72 -0
- package/types/telemetry/src/config.d.ts +2 -0
- package/js/chunk-22WRQZT7.js +0 -389
- package/js/chunk-MLKGABMK.js +0 -9
|
@@ -1,13 +1,28 @@
|
|
|
1
1
|
import {
|
|
2
|
+
DatabaseSchema
|
|
3
|
+
} from "./chunk-BMOIAIVR.js";
|
|
4
|
+
import {
|
|
5
|
+
AppSkills,
|
|
6
|
+
SkillLoadFailed
|
|
7
|
+
} from "./chunk-YEJOQEII.js";
|
|
8
|
+
import {
|
|
9
|
+
OpenapiResponseError
|
|
10
|
+
} from "./chunk-SWPD52J7.js";
|
|
11
|
+
import {
|
|
12
|
+
ProviderError
|
|
13
|
+
} from "./chunk-W7D7WVSY.js";
|
|
14
|
+
import {
|
|
15
|
+
AccountId,
|
|
2
16
|
HttpUrl,
|
|
3
17
|
JsonObject as JsonObject2,
|
|
4
18
|
JsonValue
|
|
5
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-SATWJKN6.js";
|
|
6
20
|
import {
|
|
7
21
|
Any,
|
|
8
22
|
ArraySchema,
|
|
9
23
|
Boolean,
|
|
10
24
|
Class2 as Class,
|
|
25
|
+
Context_exports,
|
|
11
26
|
Cron_exports,
|
|
12
27
|
Data_exports,
|
|
13
28
|
Defect,
|
|
@@ -55,77 +70,242 @@ import {
|
|
|
55
70
|
transformOptional,
|
|
56
71
|
withConstructorDefault,
|
|
57
72
|
withDefault
|
|
58
|
-
} from "./chunk-
|
|
73
|
+
} from "./chunk-FW5HBOIK.js";
|
|
59
74
|
|
|
60
|
-
// src/contracts/
|
|
61
|
-
var
|
|
62
|
-
|
|
63
|
-
)
|
|
75
|
+
// src/contracts/tools.ts
|
|
76
|
+
var ToolAnnotations = Schema_exports.Struct({
|
|
77
|
+
title: Schema_exports.optionalKey(Schema_exports.String),
|
|
78
|
+
readOnlyHint: Schema_exports.optionalKey(Schema_exports.Boolean),
|
|
79
|
+
destructiveHint: Schema_exports.optionalKey(Schema_exports.Boolean),
|
|
80
|
+
idempotentHint: Schema_exports.optionalKey(Schema_exports.Boolean),
|
|
81
|
+
openWorldHint: Schema_exports.optionalKey(Schema_exports.Boolean)
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
// src/contracts/mcp.ts
|
|
85
|
+
var McpClientLimits = Schema_exports.Struct({
|
|
86
|
+
timeoutMs: Schema_exports.Int.check(Schema_exports.isGreaterThan(0)),
|
|
87
|
+
maxTimeoutMs: Schema_exports.Int.check(Schema_exports.isGreaterThan(0)),
|
|
88
|
+
maxTools: Schema_exports.Int.check(Schema_exports.isGreaterThan(0)),
|
|
89
|
+
maxPaginationCursors: Schema_exports.Int.check(Schema_exports.isGreaterThan(0)),
|
|
90
|
+
cleanupTimeoutMs: Schema_exports.Int.check(Schema_exports.isGreaterThan(0))
|
|
91
|
+
});
|
|
92
|
+
var defaultMcpClientLimits = McpClientLimits.make({
|
|
93
|
+
timeoutMs: 3e4,
|
|
94
|
+
maxTimeoutMs: 3e5,
|
|
95
|
+
maxTools: 5e4,
|
|
96
|
+
maxPaginationCursors: 1e3,
|
|
97
|
+
cleanupTimeoutMs: 1e3
|
|
98
|
+
});
|
|
99
|
+
var mcpSdkTimerCeilingMs = 2147483647;
|
|
100
|
+
var McpToolsOptions = Schema_exports.Struct({
|
|
101
|
+
url: HttpUrl,
|
|
102
|
+
accountId: Schema_exports.optional(AccountId),
|
|
103
|
+
headers: Schema_exports.optional(Schema_exports.Record(Schema_exports.String, Schema_exports.String)),
|
|
104
|
+
signal: Schema_exports.optional(Schema_exports.instanceOf(AbortSignal)),
|
|
105
|
+
timeoutMs: Schema_exports.optional(
|
|
106
|
+
Schema_exports.Number.check(
|
|
107
|
+
Schema_exports.isInt(),
|
|
108
|
+
Schema_exports.isBetween({ minimum: 1, maximum: defaultMcpClientLimits.maxTimeoutMs })
|
|
109
|
+
)
|
|
110
|
+
)
|
|
111
|
+
});
|
|
112
|
+
var McpToolResult = Schema_exports.Struct({
|
|
113
|
+
content: Schema_exports.Array(JsonObject2),
|
|
114
|
+
structuredContent: Schema_exports.optional(JsonObject2),
|
|
115
|
+
isError: Schema_exports.optional(Schema_exports.Boolean),
|
|
116
|
+
_meta: Schema_exports.optional(JsonObject2)
|
|
117
|
+
});
|
|
118
|
+
var McpToolMetadata = Schema_exports.Struct({
|
|
119
|
+
name: Schema_exports.String,
|
|
120
|
+
title: Schema_exports.optional(Schema_exports.String),
|
|
121
|
+
description: Schema_exports.optional(Schema_exports.String),
|
|
122
|
+
inputSchema: JsonObject2,
|
|
123
|
+
outputSchema: Schema_exports.optional(JsonObject2),
|
|
124
|
+
annotations: Schema_exports.optional(ToolAnnotations),
|
|
125
|
+
_meta: Schema_exports.optional(JsonObject2)
|
|
126
|
+
});
|
|
127
|
+
var McpError = class extends Schema_exports.TaggedError()("McpError", {
|
|
128
|
+
phase: Schema_exports.Literals(["connect", "discover", "call", "schema", "transport"]),
|
|
129
|
+
reason: Schema_exports.Literals([
|
|
130
|
+
"request",
|
|
131
|
+
"unauthorized",
|
|
132
|
+
"invalid_response",
|
|
133
|
+
"timeout",
|
|
134
|
+
"invalid_input"
|
|
135
|
+
]),
|
|
136
|
+
status: Schema_exports.optional(Schema_exports.Number)
|
|
137
|
+
}) {
|
|
64
138
|
};
|
|
65
|
-
var
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
139
|
+
var ProcessConfig = Schema_exports.Struct({
|
|
140
|
+
command: Schema_exports.NonEmptyString,
|
|
141
|
+
args: Schema_exports.Array(Schema_exports.String),
|
|
142
|
+
cwd: Schema_exports.optional(Schema_exports.String),
|
|
143
|
+
env: Schema_exports.Record(Schema_exports.String, Schema_exports.String),
|
|
144
|
+
timeoutMs: Schema_exports.Int.check(
|
|
145
|
+
Schema_exports.isBetween({ minimum: 1, maximum: defaultMcpClientLimits.maxTimeoutMs })
|
|
146
|
+
)
|
|
147
|
+
});
|
|
148
|
+
|
|
149
|
+
// src/contracts/workflows.ts
|
|
150
|
+
var WorkflowRunId = Schema_exports.NonEmptyString.pipe(Schema_exports.brand("wfr"));
|
|
151
|
+
var WorkflowName = Schema_exports.NonEmptyString.check(Schema_exports.isMaxLength(200));
|
|
152
|
+
var durationUnits = {
|
|
153
|
+
millisecond: 1,
|
|
154
|
+
milliseconds: 1,
|
|
155
|
+
second: 1e3,
|
|
156
|
+
seconds: 1e3,
|
|
157
|
+
minute: 6e4,
|
|
158
|
+
minutes: 6e4,
|
|
159
|
+
hour: 36e5,
|
|
160
|
+
hours: 36e5,
|
|
161
|
+
day: 864e5,
|
|
162
|
+
days: 864e5,
|
|
163
|
+
week: 6048e5,
|
|
164
|
+
weeks: 6048e5
|
|
165
|
+
};
|
|
166
|
+
var workflowDurationMillis = (value) => {
|
|
167
|
+
if (typeof value === "number") return Number.isFinite(value) && value >= 0 ? value : void 0;
|
|
168
|
+
const match = /^(\d+(?:\.\d+)?) (milliseconds?|seconds?|minutes?|hours?|days?|weeks?)$/.exec(
|
|
169
|
+
value
|
|
170
|
+
);
|
|
171
|
+
const unit = match?.[2] === void 0 ? void 0 : durationUnits[match[2]];
|
|
172
|
+
if (unit === void 0) return void 0;
|
|
173
|
+
const result = Number(match?.[1]) * unit;
|
|
174
|
+
return Number.isFinite(result) ? result : void 0;
|
|
175
|
+
};
|
|
176
|
+
var WorkflowDuration = Schema_exports.Union([
|
|
177
|
+
Schema_exports.Finite.check(Schema_exports.isGreaterThanOrEqualTo(0)),
|
|
178
|
+
Schema_exports.NonEmptyString
|
|
179
|
+
]).check(Schema_exports.makeFilter((value) => workflowDurationMillis(value) !== void 0));
|
|
180
|
+
var WorkflowStepOptions = Schema_exports.Struct({
|
|
181
|
+
retries: Schema_exports.optionalKey(
|
|
182
|
+
Schema_exports.Struct({
|
|
183
|
+
limit: Schema_exports.Int.check(Schema_exports.isGreaterThanOrEqualTo(0)),
|
|
184
|
+
delay: WorkflowDuration,
|
|
185
|
+
backoff: Schema_exports.optionalKey(Schema_exports.Literals(["constant", "linear", "exponential"]))
|
|
186
|
+
})
|
|
187
|
+
),
|
|
188
|
+
timeout: Schema_exports.optionalKey(WorkflowDuration)
|
|
189
|
+
});
|
|
190
|
+
var WorkflowFailure = class extends Schema_exports.TaggedError()("WorkflowFailure", {
|
|
191
|
+
reason: Schema_exports.Literals([
|
|
192
|
+
"unavailable",
|
|
193
|
+
"not_found",
|
|
194
|
+
"input",
|
|
195
|
+
"output",
|
|
196
|
+
"operation",
|
|
197
|
+
"approval",
|
|
198
|
+
"credentials",
|
|
199
|
+
"terminated",
|
|
200
|
+
"execution",
|
|
201
|
+
"conflict",
|
|
202
|
+
"engine"
|
|
203
|
+
]),
|
|
204
|
+
retryable: Schema_exports.Boolean
|
|
205
|
+
}) {
|
|
206
|
+
};
|
|
207
|
+
var NonRetryableError = class extends Error {
|
|
208
|
+
name = "NonRetryableError";
|
|
209
|
+
};
|
|
210
|
+
var WorkflowValue = JsonValue.check(
|
|
211
|
+
Schema_exports.makeFilter(
|
|
212
|
+
(value) => new TextEncoder().encode(JSON.stringify(value)).byteLength <= 1024 * 1024
|
|
213
|
+
)
|
|
214
|
+
);
|
|
215
|
+
var HostedWorkflow = Schema_exports.Struct({
|
|
216
|
+
name: WorkflowName,
|
|
217
|
+
description: Schema_exports.optionalKey(Schema_exports.String),
|
|
218
|
+
inputSchema: JsonObject2,
|
|
219
|
+
outputSchema: Schema_exports.optionalKey(JsonObject2)
|
|
220
|
+
});
|
|
221
|
+
var runFields = {
|
|
222
|
+
profile: Schema_exports.optionalKey(Schema_exports.NonEmptyString),
|
|
223
|
+
id: WorkflowRunId,
|
|
224
|
+
app: Schema_exports.NonEmptyString,
|
|
225
|
+
deployment: Schema_exports.NonEmptyString,
|
|
226
|
+
workflow: WorkflowName,
|
|
227
|
+
createdAt: Schema_exports.String
|
|
228
|
+
};
|
|
229
|
+
var WorkflowRun = Schema_exports.Union([
|
|
230
|
+
Schema_exports.Struct({
|
|
231
|
+
...runFields,
|
|
232
|
+
status: Schema_exports.Literals(["queued", "running", "waiting", "paused", "waitingForPause"])
|
|
233
|
+
}),
|
|
234
|
+
Schema_exports.Struct({ ...runFields, status: Schema_exports.Literal("complete"), output: WorkflowValue }),
|
|
235
|
+
Schema_exports.Struct({
|
|
236
|
+
...runFields,
|
|
237
|
+
status: Schema_exports.Literal("errored"),
|
|
238
|
+
error: WorkflowFailure.fields.reason
|
|
239
|
+
}),
|
|
240
|
+
Schema_exports.Struct({ ...runFields, status: Schema_exports.Literal("terminated") })
|
|
70
241
|
]);
|
|
71
|
-
var
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
242
|
+
var WorkflowRunPage = Schema_exports.Struct({
|
|
243
|
+
items: Schema_exports.Array(WorkflowRun),
|
|
244
|
+
next: Schema_exports.optionalKey(WorkflowRunId)
|
|
245
|
+
});
|
|
246
|
+
var WorkflowReplay = Schema_exports.Struct({
|
|
247
|
+
key: Schema_exports.NonEmptyString,
|
|
248
|
+
fingerprint: Schema_exports.NonEmptyString
|
|
249
|
+
});
|
|
250
|
+
var WorkflowCommand = Schema_exports.Union([
|
|
251
|
+
Schema_exports.Struct({ operation: Schema_exports.Literal("workflows") }),
|
|
252
|
+
Schema_exports.Struct({
|
|
253
|
+
operation: Schema_exports.Literal("workflow-validate"),
|
|
254
|
+
name: WorkflowName,
|
|
255
|
+
input: JsonValue
|
|
256
|
+
}),
|
|
257
|
+
Schema_exports.Struct({
|
|
258
|
+
operation: Schema_exports.Literal("workflow-run"),
|
|
259
|
+
name: WorkflowName,
|
|
260
|
+
input: JsonValue
|
|
261
|
+
})
|
|
75
262
|
]);
|
|
76
|
-
var
|
|
77
|
-
grant: Schema_exports.optionalKey(Schema_exports.Literal("authorization_code")),
|
|
78
|
-
tokenEndpointAuthMethod: Schema_exports.optionalKey(OAuthClientAuth),
|
|
79
|
-
/** Omitted uses discovery; null explicitly suppresses the resource parameter. */
|
|
80
|
-
resource: Schema_exports.optionalKey(Schema_exports.NullOr(HttpUrl))
|
|
81
|
-
};
|
|
82
|
-
var OAuth2Config = Schema_exports.Union([
|
|
263
|
+
var WorkflowRpcCommand = Schema_exports.Union([
|
|
83
264
|
Schema_exports.Struct({
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
tokenUrl: Schema_exports.optionalKey(Schema_exports.Never),
|
|
88
|
-
scopes: Schema_exports.optionalKey(Schema_exports.Array(Schema_exports.String))
|
|
265
|
+
operation: Schema_exports.Literal("do"),
|
|
266
|
+
name: WorkflowName,
|
|
267
|
+
options: WorkflowStepOptions
|
|
89
268
|
}),
|
|
90
269
|
Schema_exports.Struct({
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
scopes: Schema_exports.Array(Schema_exports.String),
|
|
95
|
-
discover: Schema_exports.optionalKey(Schema_exports.Never)
|
|
270
|
+
operation: Schema_exports.Literal("sleep"),
|
|
271
|
+
name: WorkflowName,
|
|
272
|
+
duration: WorkflowDuration
|
|
96
273
|
}),
|
|
97
274
|
Schema_exports.Struct({
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
tokenUrl: Schema_exports.optionalKey(Schema_exports.Never),
|
|
102
|
-
scopes: Schema_exports.optionalKey(Schema_exports.Array(Schema_exports.String)),
|
|
103
|
-
tokenEndpointAuthMethod: OAuthSecretClientAuth,
|
|
104
|
-
resource: Schema_exports.optionalKey(Schema_exports.NullOr(HttpUrl))
|
|
275
|
+
operation: Schema_exports.Literal("until"),
|
|
276
|
+
name: WorkflowName,
|
|
277
|
+
timestamp: Schema_exports.Finite
|
|
105
278
|
}),
|
|
279
|
+
Schema_exports.Struct({ operation: Schema_exports.Literal("context") }),
|
|
106
280
|
Schema_exports.Struct({
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
discover: Schema_exports.optionalKey(Schema_exports.Never)
|
|
281
|
+
operation: Schema_exports.Literal("invoke"),
|
|
282
|
+
kind: Schema_exports.Literals(["query", "mutation"]),
|
|
283
|
+
name: Schema_exports.NonEmptyString,
|
|
284
|
+
input: JsonValue,
|
|
285
|
+
stepId: Schema_exports.NonEmptyString,
|
|
286
|
+
timeout: Schema_exports.Finite.check(Schema_exports.isGreaterThanOrEqualTo(0))
|
|
114
287
|
})
|
|
115
288
|
]);
|
|
116
|
-
var
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
)
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
|
|
289
|
+
var WorkflowRpcResult = Schema_exports.Union([
|
|
290
|
+
Schema_exports.Struct({ ok: Schema_exports.Literal(true), value: JsonValue }),
|
|
291
|
+
Schema_exports.Struct({ ok: Schema_exports.Literal(false), error: WorkflowFailure })
|
|
292
|
+
]);
|
|
293
|
+
var WorkflowControlCommand = Schema_exports.Union([
|
|
294
|
+
Schema_exports.Struct({
|
|
295
|
+
operation: Schema_exports.Literal("start"),
|
|
296
|
+
workflow: WorkflowName,
|
|
297
|
+
input: WorkflowValue,
|
|
298
|
+
key: Schema_exports.optionalKey(Schema_exports.NonEmptyString.check(Schema_exports.isMaxLength(128)))
|
|
299
|
+
}),
|
|
300
|
+
Schema_exports.Struct({ operation: Schema_exports.Literal("get"), run: WorkflowRunId }),
|
|
301
|
+
Schema_exports.Struct({
|
|
302
|
+
operation: Schema_exports.Literal("list"),
|
|
303
|
+
workflow: Schema_exports.optionalKey(WorkflowName),
|
|
304
|
+
cursor: Schema_exports.optionalKey(WorkflowRunId),
|
|
305
|
+
limit: Schema_exports.optionalKey(Schema_exports.Int.check(Schema_exports.isBetween({ minimum: 1, maximum: 100 })))
|
|
306
|
+
}),
|
|
307
|
+
Schema_exports.Struct({ operation: Schema_exports.Literal("terminate"), run: WorkflowRunId })
|
|
308
|
+
]);
|
|
129
309
|
|
|
130
310
|
// src/contracts/schedules.ts
|
|
131
311
|
var minimumIntervalMilliseconds = 6e4;
|
|
@@ -162,7 +342,7 @@ var OperationSchedule = Schema_exports.Struct({
|
|
|
162
342
|
input: JsonValue
|
|
163
343
|
});
|
|
164
344
|
|
|
165
|
-
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@
|
|
345
|
+
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/unstable/rpc/RpcSchema.js
|
|
166
346
|
var StreamSchemaTypeId = "~effect/rpc/RpcSchema/StreamSchema";
|
|
167
347
|
var schema = /* @__PURE__ */ declare(isStream);
|
|
168
348
|
function Stream(success, error) {
|
|
@@ -173,7 +353,7 @@ function Stream(success, error) {
|
|
|
173
353
|
});
|
|
174
354
|
}
|
|
175
355
|
|
|
176
|
-
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@
|
|
356
|
+
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/unstable/rpc/Rpc.js
|
|
177
357
|
var TypeId = "~effect/rpc/Rpc";
|
|
178
358
|
var Proto = {
|
|
179
359
|
[TypeId]: TypeId,
|
|
@@ -291,7 +471,7 @@ var make2 = (tag2, options) => {
|
|
|
291
471
|
});
|
|
292
472
|
};
|
|
293
473
|
|
|
294
|
-
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@
|
|
474
|
+
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/unstable/ai/McpSchema.js
|
|
295
475
|
var optionalWithDefault = (schema2, defaultValue) => {
|
|
296
476
|
const effect = sync(defaultValue);
|
|
297
477
|
return optionalKey(schema2).pipe(decode({
|
|
@@ -561,7 +741,7 @@ var InternalError = class _InternalError extends (/* @__PURE__ */ Error2("effect
|
|
|
561
741
|
message: "Not implemented"
|
|
562
742
|
});
|
|
563
743
|
};
|
|
564
|
-
var
|
|
744
|
+
var McpError2 = /* @__PURE__ */ Union([ParseError, InvalidRequest, MethodNotFound, InvalidParams, InternalError, McpErrorBase]);
|
|
565
745
|
var InitializeResult = class extends (/* @__PURE__ */ Opaque()(/* @__PURE__ */ Struct({
|
|
566
746
|
...ResultMeta.fields,
|
|
567
747
|
/**
|
|
@@ -584,7 +764,7 @@ var InitializeResult = class extends (/* @__PURE__ */ Opaque()(/* @__PURE__ */ S
|
|
|
584
764
|
};
|
|
585
765
|
var Initialize = class extends (/* @__PURE__ */ make2("initialize", {
|
|
586
766
|
success: InitializeResult,
|
|
587
|
-
error:
|
|
767
|
+
error: McpError2,
|
|
588
768
|
payload: {
|
|
589
769
|
...RequestMeta.fields,
|
|
590
770
|
/**
|
|
@@ -783,7 +963,7 @@ var ReadResourceResult = class extends (/* @__PURE__ */ Opaque()(/* @__PURE__ */
|
|
|
783
963
|
};
|
|
784
964
|
var ReadResource = class extends (/* @__PURE__ */ make2("resources/read", {
|
|
785
965
|
success: ReadResourceResult,
|
|
786
|
-
error:
|
|
966
|
+
error: McpError2,
|
|
787
967
|
payload: {
|
|
788
968
|
...RequestMeta.fields,
|
|
789
969
|
/**
|
|
@@ -796,7 +976,7 @@ var ReadResource = class extends (/* @__PURE__ */ make2("resources/read", {
|
|
|
796
976
|
};
|
|
797
977
|
var Subscribe = class extends (/* @__PURE__ */ make2("resources/subscribe", {
|
|
798
978
|
success: /* @__PURE__ */ Struct({}),
|
|
799
|
-
error:
|
|
979
|
+
error: McpError2,
|
|
800
980
|
payload: {
|
|
801
981
|
...RequestMeta.fields,
|
|
802
982
|
/**
|
|
@@ -809,7 +989,7 @@ var Subscribe = class extends (/* @__PURE__ */ make2("resources/subscribe", {
|
|
|
809
989
|
};
|
|
810
990
|
var Unsubscribe = class extends (/* @__PURE__ */ make2("resources/unsubscribe", {
|
|
811
991
|
success: /* @__PURE__ */ Struct({}),
|
|
812
|
-
error:
|
|
992
|
+
error: McpError2,
|
|
813
993
|
payload: {
|
|
814
994
|
...RequestMeta.fields,
|
|
815
995
|
/**
|
|
@@ -953,7 +1133,7 @@ var GetPromptResult = class extends (/* @__PURE__ */ Class("@effect/ai/McpSchema
|
|
|
953
1133
|
};
|
|
954
1134
|
var GetPrompt = class extends (/* @__PURE__ */ make2("prompts/get", {
|
|
955
1135
|
success: GetPromptResult,
|
|
956
|
-
error:
|
|
1136
|
+
error: McpError2,
|
|
957
1137
|
payload: {
|
|
958
1138
|
...RequestMeta.fields,
|
|
959
1139
|
/**
|
|
@@ -968,7 +1148,7 @@ var GetPrompt = class extends (/* @__PURE__ */ make2("prompts/get", {
|
|
|
968
1148
|
}
|
|
969
1149
|
})) {
|
|
970
1150
|
};
|
|
971
|
-
var
|
|
1151
|
+
var ToolAnnotations2 = class extends (/* @__PURE__ */ Opaque()(/* @__PURE__ */ Struct({
|
|
972
1152
|
/**
|
|
973
1153
|
* A human-readable title for the tool.
|
|
974
1154
|
*/
|
|
@@ -1037,7 +1217,7 @@ var Tool = class extends (/* @__PURE__ */ Class("@effect/ai/McpSchema/Tool")({
|
|
|
1037
1217
|
/**
|
|
1038
1218
|
* Optional additional tool information.
|
|
1039
1219
|
*/
|
|
1040
|
-
annotations: /* @__PURE__ */ optional2(
|
|
1220
|
+
annotations: /* @__PURE__ */ optional2(ToolAnnotations2),
|
|
1041
1221
|
/**
|
|
1042
1222
|
* Icons that clients can display for this tool.
|
|
1043
1223
|
*/
|
|
@@ -1073,7 +1253,7 @@ var CallToolResult = class extends (/* @__PURE__ */ Class("@effect/ai/McpSchema/
|
|
|
1073
1253
|
};
|
|
1074
1254
|
var CallTool = class extends (/* @__PURE__ */ make2("tools/call", {
|
|
1075
1255
|
success: CallToolResult,
|
|
1076
|
-
error:
|
|
1256
|
+
error: McpError2,
|
|
1077
1257
|
payload: {
|
|
1078
1258
|
...RequestMeta.fields,
|
|
1079
1259
|
name: String,
|
|
@@ -1093,7 +1273,7 @@ var SetLevel = class extends (/* @__PURE__ */ make2("logging/setLevel", {
|
|
|
1093
1273
|
level: LoggingLevel
|
|
1094
1274
|
},
|
|
1095
1275
|
success: /* @__PURE__ */ Struct({}),
|
|
1096
|
-
error:
|
|
1276
|
+
error: McpError2
|
|
1097
1277
|
})) {
|
|
1098
1278
|
};
|
|
1099
1279
|
var LoggingMessageNotification = class extends (/* @__PURE__ */ make2("notifications/message", {
|
|
@@ -1239,7 +1419,7 @@ var CreateMessageResult = class extends (/* @__PURE__ */ Class("@effect/ai/McpSc
|
|
|
1239
1419
|
};
|
|
1240
1420
|
var CreateMessage = class extends (/* @__PURE__ */ make2("sampling/createMessage", {
|
|
1241
1421
|
success: CreateMessageResult,
|
|
1242
|
-
error:
|
|
1422
|
+
error: McpError2,
|
|
1243
1423
|
payload: {
|
|
1244
1424
|
messages: /* @__PURE__ */ ArraySchema(SamplingMessage),
|
|
1245
1425
|
/**
|
|
@@ -1450,7 +1630,7 @@ var ElicitDeclineResult = class extends (/* @__PURE__ */ Class("@effect/ai/McpSc
|
|
|
1450
1630
|
var ElicitResult = /* @__PURE__ */ Union([ElicitAcceptResult, ElicitDeclineResult]);
|
|
1451
1631
|
var Elicit = class extends (/* @__PURE__ */ make2("elicitation/create", {
|
|
1452
1632
|
success: ElicitResult,
|
|
1453
|
-
error:
|
|
1633
|
+
error: McpError2,
|
|
1454
1634
|
payload: ElicitRequestParams
|
|
1455
1635
|
})) {
|
|
1456
1636
|
};
|
|
@@ -1516,165 +1696,403 @@ ${JSON.stringify(input, null, 2)}`,
|
|
|
1516
1696
|
requestedSchema: { type: "object", properties: {} }
|
|
1517
1697
|
});
|
|
1518
1698
|
|
|
1519
|
-
// src/contracts/
|
|
1520
|
-
var
|
|
1521
|
-
|
|
1522
|
-
var durationUnits = {
|
|
1523
|
-
millisecond: 1,
|
|
1524
|
-
milliseconds: 1,
|
|
1525
|
-
second: 1e3,
|
|
1526
|
-
seconds: 1e3,
|
|
1527
|
-
minute: 6e4,
|
|
1528
|
-
minutes: 6e4,
|
|
1529
|
-
hour: 36e5,
|
|
1530
|
-
hours: 36e5,
|
|
1531
|
-
day: 864e5,
|
|
1532
|
-
days: 864e5,
|
|
1533
|
-
week: 6048e5,
|
|
1534
|
-
weeks: 6048e5
|
|
1535
|
-
};
|
|
1536
|
-
var workflowDurationMillis = (value) => {
|
|
1537
|
-
if (typeof value === "number") return Number.isFinite(value) && value >= 0 ? value : void 0;
|
|
1538
|
-
const match = /^(\d+(?:\.\d+)?) (milliseconds?|seconds?|minutes?|hours?|days?|weeks?)$/.exec(
|
|
1539
|
-
value
|
|
1540
|
-
);
|
|
1541
|
-
const unit = match?.[2] === void 0 ? void 0 : durationUnits[match[2]];
|
|
1542
|
-
if (unit === void 0) return void 0;
|
|
1543
|
-
const result = Number(match?.[1]) * unit;
|
|
1544
|
-
return Number.isFinite(result) ? result : void 0;
|
|
1545
|
-
};
|
|
1546
|
-
var WorkflowDuration = Schema_exports.Union([
|
|
1547
|
-
Schema_exports.Finite.check(Schema_exports.isGreaterThanOrEqualTo(0)),
|
|
1548
|
-
Schema_exports.NonEmptyString
|
|
1549
|
-
]).check(Schema_exports.makeFilter((value) => workflowDurationMillis(value) !== void 0));
|
|
1550
|
-
var WorkflowStepOptions = Schema_exports.Struct({
|
|
1551
|
-
retries: Schema_exports.optionalKey(
|
|
1552
|
-
Schema_exports.Struct({
|
|
1553
|
-
limit: Schema_exports.Int.check(Schema_exports.isGreaterThanOrEqualTo(0)),
|
|
1554
|
-
delay: WorkflowDuration,
|
|
1555
|
-
backoff: Schema_exports.optionalKey(Schema_exports.Literals(["constant", "linear", "exponential"]))
|
|
1556
|
-
})
|
|
1557
|
-
),
|
|
1558
|
-
timeout: Schema_exports.optionalKey(WorkflowDuration)
|
|
1699
|
+
// src/contracts/webhook-protocol.ts
|
|
1700
|
+
var WebhookTransportLimits = Schema_exports.Struct({
|
|
1701
|
+
maxBodyBytes: Schema_exports.Int.check(Schema_exports.isGreaterThan(0))
|
|
1559
1702
|
});
|
|
1560
|
-
var
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1703
|
+
var defaultWebhookTransportLimits = WebhookTransportLimits.make({
|
|
1704
|
+
maxBodyBytes: 1024 * 1024
|
|
1705
|
+
});
|
|
1706
|
+
var encodedBodyChars = 4 * Math.ceil(defaultWebhookTransportLimits.maxBodyBytes / 3);
|
|
1707
|
+
var WebhookRequestData = Schema_exports.Struct({
|
|
1708
|
+
url: HttpUrl,
|
|
1709
|
+
method: Schema_exports.Literals(["GET", "POST", "PUT", "PATCH", "DELETE", "HEAD", "OPTIONS"]),
|
|
1710
|
+
headers: Schema_exports.Record(Schema_exports.String, Schema_exports.String),
|
|
1711
|
+
body: Schema_exports.String.check(Schema_exports.isMaxLength(encodedBodyChars))
|
|
1712
|
+
});
|
|
1713
|
+
var WebhookResponseData = Schema_exports.Struct({
|
|
1714
|
+
status: Schema_exports.Int.check(Schema_exports.isBetween({ minimum: 200, maximum: 599 })),
|
|
1715
|
+
headers: Schema_exports.Record(Schema_exports.String, Schema_exports.String),
|
|
1716
|
+
body: Schema_exports.String.check(Schema_exports.isMaxLength(encodedBodyChars))
|
|
1717
|
+
});
|
|
1718
|
+
var ManualWebhookSetup = Schema_exports.Struct({
|
|
1719
|
+
instructions: Schema_exports.NonEmptyString,
|
|
1720
|
+
signingSecret: Schema_exports.Literals(["executor", "provider"])
|
|
1721
|
+
});
|
|
1722
|
+
var ManualWebhookDescriptor = Schema_exports.Struct({
|
|
1723
|
+
...ManualWebhookSetup.fields,
|
|
1724
|
+
stateSchema: JsonObject2
|
|
1725
|
+
});
|
|
1726
|
+
var HostedWebhook = Schema_exports.Struct({
|
|
1727
|
+
name: Schema_exports.NonEmptyString,
|
|
1728
|
+
account: Schema_exports.NonEmptyString,
|
|
1729
|
+
configSchema: JsonObject2,
|
|
1730
|
+
setup: Schema_exports.optionalKey(ManualWebhookDescriptor)
|
|
1731
|
+
});
|
|
1732
|
+
var identity = {
|
|
1733
|
+
name: Schema_exports.NonEmptyString,
|
|
1734
|
+
subscriptionId: Schema_exports.NonEmptyString,
|
|
1735
|
+
sourceAccount: AccountId,
|
|
1736
|
+
callbackUrl: HttpUrl,
|
|
1737
|
+
secret: Schema_exports.String,
|
|
1738
|
+
config: JsonValue
|
|
1739
|
+
};
|
|
1740
|
+
var WebhookCommand = Schema_exports.Union([
|
|
1741
|
+
Schema_exports.Struct({ operation: Schema_exports.Literal("webhooks") }),
|
|
1742
|
+
Schema_exports.Struct({ operation: Schema_exports.Literal("webhook-validate"), ...identity }),
|
|
1743
|
+
Schema_exports.Struct({ operation: Schema_exports.Literal("webhook-complete"), ...identity, state: JsonValue }),
|
|
1744
|
+
Schema_exports.Struct({ operation: Schema_exports.Literal("webhook-register"), ...identity }),
|
|
1745
|
+
Schema_exports.Struct({ operation: Schema_exports.Literal("webhook-unregister"), ...identity, state: JsonValue }),
|
|
1746
|
+
Schema_exports.Struct({
|
|
1747
|
+
operation: Schema_exports.Literal("webhook-handle"),
|
|
1748
|
+
...identity,
|
|
1749
|
+
state: JsonValue,
|
|
1750
|
+
request: WebhookRequestData
|
|
1751
|
+
})
|
|
1752
|
+
]);
|
|
1753
|
+
|
|
1754
|
+
// src/contracts/provider.ts
|
|
1755
|
+
var SecretsMethod = class extends Data_exports.TaggedClass(
|
|
1756
|
+
"secrets"
|
|
1757
|
+
) {
|
|
1579
1758
|
};
|
|
1580
|
-
var
|
|
1759
|
+
var OAuthClientAuth = Schema_exports.Literals([
|
|
1760
|
+
"none",
|
|
1761
|
+
"client_secret_post",
|
|
1762
|
+
"client_secret_basic",
|
|
1763
|
+
"client_secret_basic_raw"
|
|
1764
|
+
]);
|
|
1765
|
+
var OAuthSecretClientAuth = Schema_exports.Literals([
|
|
1766
|
+
"client_secret_post",
|
|
1767
|
+
"client_secret_basic",
|
|
1768
|
+
"client_secret_basic_raw"
|
|
1769
|
+
]);
|
|
1770
|
+
var reservedAuthorizationParams = /* @__PURE__ */ new Set([
|
|
1771
|
+
"response_type",
|
|
1772
|
+
"client_id",
|
|
1773
|
+
"redirect_uri",
|
|
1774
|
+
"state",
|
|
1775
|
+
"scope",
|
|
1776
|
+
"code_challenge",
|
|
1777
|
+
"code_challenge_method",
|
|
1778
|
+
"nonce",
|
|
1779
|
+
"resource",
|
|
1780
|
+
"request",
|
|
1781
|
+
"request_uri"
|
|
1782
|
+
]);
|
|
1783
|
+
var OAuthAuthorizationParams = Schema_exports.Record(Schema_exports.String, Schema_exports.String).check(
|
|
1581
1784
|
Schema_exports.makeFilter(
|
|
1582
|
-
(
|
|
1785
|
+
(params) => Object.keys(params).every((key) => !reservedAuthorizationParams.has(key)),
|
|
1786
|
+
{
|
|
1787
|
+
message: "Authorization parameters cannot replace protocol parameters such as state or scope."
|
|
1788
|
+
}
|
|
1583
1789
|
)
|
|
1584
1790
|
);
|
|
1585
|
-
var
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
var runFields = {
|
|
1592
|
-
profile: Schema_exports.optionalKey(Schema_exports.NonEmptyString),
|
|
1593
|
-
id: WorkflowRunId,
|
|
1594
|
-
app: Schema_exports.NonEmptyString,
|
|
1595
|
-
deployment: Schema_exports.NonEmptyString,
|
|
1596
|
-
workflow: WorkflowName,
|
|
1597
|
-
createdAt: Schema_exports.String
|
|
1791
|
+
var oauthOptions = {
|
|
1792
|
+
grant: Schema_exports.optionalKey(Schema_exports.Literal("authorization_code")),
|
|
1793
|
+
authorizationParams: Schema_exports.optionalKey(OAuthAuthorizationParams),
|
|
1794
|
+
tokenEndpointAuthMethod: Schema_exports.optionalKey(OAuthClientAuth),
|
|
1795
|
+
/** Omitted uses discovery; null explicitly suppresses the resource parameter. */
|
|
1796
|
+
resource: Schema_exports.optionalKey(Schema_exports.NullOr(HttpUrl))
|
|
1598
1797
|
};
|
|
1599
|
-
var
|
|
1798
|
+
var OAuth2Config = Schema_exports.Union([
|
|
1600
1799
|
Schema_exports.Struct({
|
|
1601
|
-
...
|
|
1602
|
-
|
|
1800
|
+
...oauthOptions,
|
|
1801
|
+
discover: HttpUrl,
|
|
1802
|
+
authorizationUrl: Schema_exports.optionalKey(Schema_exports.Never),
|
|
1803
|
+
tokenUrl: Schema_exports.optionalKey(Schema_exports.Never),
|
|
1804
|
+
revocationUrl: Schema_exports.optionalKey(Schema_exports.Never),
|
|
1805
|
+
scopes: Schema_exports.optionalKey(Schema_exports.Array(Schema_exports.String))
|
|
1603
1806
|
}),
|
|
1604
|
-
Schema_exports.Struct({ ...runFields, status: Schema_exports.Literal("complete"), output: WorkflowValue }),
|
|
1605
1807
|
Schema_exports.Struct({
|
|
1606
|
-
...
|
|
1607
|
-
|
|
1608
|
-
|
|
1808
|
+
...oauthOptions,
|
|
1809
|
+
authorizationUrl: HttpUrl,
|
|
1810
|
+
tokenUrl: HttpUrl,
|
|
1811
|
+
revocationUrl: Schema_exports.optionalKey(HttpUrl),
|
|
1812
|
+
scopes: Schema_exports.Array(Schema_exports.String),
|
|
1813
|
+
/** RFC 8414 issuer identifier. Declared issuers are checked against the callback's `iss`. */
|
|
1814
|
+
issuer: Schema_exports.optionalKey(HttpUrl),
|
|
1815
|
+
discover: Schema_exports.optionalKey(Schema_exports.Never)
|
|
1609
1816
|
}),
|
|
1610
|
-
Schema_exports.Struct({
|
|
1817
|
+
Schema_exports.Struct({
|
|
1818
|
+
grant: Schema_exports.Literal("client_credentials"),
|
|
1819
|
+
discover: HttpUrl,
|
|
1820
|
+
authorizationUrl: Schema_exports.optionalKey(Schema_exports.Never),
|
|
1821
|
+
tokenUrl: Schema_exports.optionalKey(Schema_exports.Never),
|
|
1822
|
+
revocationUrl: Schema_exports.optionalKey(Schema_exports.Never),
|
|
1823
|
+
scopes: Schema_exports.optionalKey(Schema_exports.Array(Schema_exports.String)),
|
|
1824
|
+
tokenEndpointAuthMethod: OAuthSecretClientAuth,
|
|
1825
|
+
resource: Schema_exports.optionalKey(Schema_exports.NullOr(HttpUrl))
|
|
1826
|
+
}),
|
|
1827
|
+
Schema_exports.Struct({
|
|
1828
|
+
grant: Schema_exports.Literal("client_credentials"),
|
|
1829
|
+
tokenUrl: HttpUrl,
|
|
1830
|
+
revocationUrl: Schema_exports.optionalKey(HttpUrl),
|
|
1831
|
+
scopes: Schema_exports.Array(Schema_exports.String),
|
|
1832
|
+
tokenEndpointAuthMethod: OAuthSecretClientAuth,
|
|
1833
|
+
resource: Schema_exports.optionalKey(Schema_exports.NullOr(HttpUrl)),
|
|
1834
|
+
authorizationUrl: Schema_exports.optionalKey(Schema_exports.Never),
|
|
1835
|
+
discover: Schema_exports.optionalKey(Schema_exports.Never)
|
|
1836
|
+
})
|
|
1611
1837
|
]);
|
|
1612
|
-
var
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1838
|
+
var OAuth2AccessToken = Schema_exports.Struct({ access_token: Schema_exports.String });
|
|
1839
|
+
var OAuth2Method = class extends Data_exports.TaggedClass(
|
|
1840
|
+
"oauth2"
|
|
1841
|
+
) {
|
|
1842
|
+
};
|
|
1843
|
+
var Provider = class extends Data_exports.Class {
|
|
1844
|
+
/** Declare zero or more accounts from this provider without performing I/O. */
|
|
1845
|
+
many() {
|
|
1846
|
+
return new ManyAccounts({ provider: this });
|
|
1847
|
+
}
|
|
1848
|
+
};
|
|
1849
|
+
var ManyAccounts = class extends Data_exports.TaggedClass("many") {
|
|
1850
|
+
};
|
|
1851
|
+
|
|
1852
|
+
// src/contracts/operations.ts
|
|
1853
|
+
var OperationToolPrefixes = { query: "queries.", mutate: "mutations." };
|
|
1854
|
+
|
|
1855
|
+
// src/contracts/host.ts
|
|
1856
|
+
var DeclaredAuthMethod = Schema_exports.Union([
|
|
1857
|
+
Schema_exports.Struct({ type: Schema_exports.Literal("secrets"), label: Schema_exports.String, fields: JsonObject2 }),
|
|
1622
1858
|
Schema_exports.Struct({
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1859
|
+
type: Schema_exports.Literal("oauth2"),
|
|
1860
|
+
...OAuth2Config.members[0].fields,
|
|
1861
|
+
response: JsonObject2
|
|
1626
1862
|
}),
|
|
1627
1863
|
Schema_exports.Struct({
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1864
|
+
type: Schema_exports.Literal("oauth2"),
|
|
1865
|
+
...OAuth2Config.members[1].fields,
|
|
1866
|
+
response: JsonObject2
|
|
1867
|
+
}),
|
|
1868
|
+
Schema_exports.Struct({
|
|
1869
|
+
type: Schema_exports.Literal("oauth2"),
|
|
1870
|
+
...OAuth2Config.members[2].fields,
|
|
1871
|
+
response: JsonObject2
|
|
1872
|
+
}),
|
|
1873
|
+
Schema_exports.Struct({
|
|
1874
|
+
type: Schema_exports.Literal("oauth2"),
|
|
1875
|
+
...OAuth2Config.members[3].fields,
|
|
1876
|
+
response: JsonObject2
|
|
1631
1877
|
})
|
|
1632
1878
|
]);
|
|
1633
|
-
var
|
|
1879
|
+
var DeclaredProvider = Schema_exports.Struct({
|
|
1880
|
+
name: Schema_exports.NonEmptyString,
|
|
1881
|
+
auth: Schema_exports.Record(Schema_exports.NonEmptyString, DeclaredAuthMethod)
|
|
1882
|
+
});
|
|
1883
|
+
var DeclaredRequirements = Schema_exports.Struct({
|
|
1884
|
+
/** Protocol support of this retained framework build, not an author-declared requirement. */
|
|
1885
|
+
capabilities: Schema_exports.optionalKey(
|
|
1886
|
+
Schema_exports.Struct({
|
|
1887
|
+
skills: Schema_exports.Literal(true),
|
|
1888
|
+
/** Accepts inspect detail and tools. Earlier builds reject both as excess fields. */
|
|
1889
|
+
toolIndex: Schema_exports.optionalKey(Schema_exports.Literal(true)),
|
|
1890
|
+
/** Accepts skills sources and reports whether the catalog includes a live loader. */
|
|
1891
|
+
skillSources: Schema_exports.optionalKey(Schema_exports.Literal(true)),
|
|
1892
|
+
/** Accepts scheduled inspection. Earlier builds reject it as an excess field. */
|
|
1893
|
+
scheduledTools: Schema_exports.optionalKey(Schema_exports.Literal(true))
|
|
1894
|
+
})
|
|
1895
|
+
),
|
|
1896
|
+
database: Schema_exports.optionalKey(DatabaseSchema),
|
|
1897
|
+
accounts: Schema_exports.Record(
|
|
1898
|
+
Schema_exports.NonEmptyString,
|
|
1899
|
+
Schema_exports.Struct({
|
|
1900
|
+
definition: DeclaredProvider,
|
|
1901
|
+
cardinality: Schema_exports.Literals(["one", "many"])
|
|
1902
|
+
})
|
|
1903
|
+
)
|
|
1904
|
+
});
|
|
1905
|
+
var ResolvedAccount = Schema_exports.Struct({
|
|
1906
|
+
id: AccountId,
|
|
1907
|
+
provider: DeclaredProvider,
|
|
1908
|
+
method: Schema_exports.NonEmptyString,
|
|
1909
|
+
fields: JsonObject2
|
|
1910
|
+
});
|
|
1911
|
+
var ResolvedAccounts = Schema_exports.Record(
|
|
1912
|
+
Schema_exports.NonEmptyString,
|
|
1913
|
+
Schema_exports.Union([ResolvedAccount, Schema_exports.Array(ResolvedAccount)])
|
|
1914
|
+
);
|
|
1915
|
+
var TrustedToolApproval = Schema_exports.Struct({ tool: Schema_exports.NonEmptyString, input: JsonValue });
|
|
1916
|
+
var InvocationDeadline = Schema_exports.Finite.check(Schema_exports.isGreaterThanOrEqualTo(0));
|
|
1917
|
+
var HostedTool = Schema_exports.Struct({
|
|
1918
|
+
schedules: Schema_exports.optionalKey(Schema_exports.Array(OperationSchedule)),
|
|
1919
|
+
name: Schema_exports.NonEmptyString,
|
|
1920
|
+
description: Schema_exports.String,
|
|
1921
|
+
inputSchema: JsonObject2,
|
|
1922
|
+
readOnly: Schema_exports.optionalKey(Schema_exports.Boolean),
|
|
1923
|
+
title: Schema_exports.optionalKey(Schema_exports.String),
|
|
1924
|
+
outputSchema: Schema_exports.optionalKey(JsonObject2),
|
|
1925
|
+
annotations: Schema_exports.optionalKey(ToolAnnotations),
|
|
1926
|
+
_meta: Schema_exports.optionalKey(JsonObject2)
|
|
1927
|
+
});
|
|
1928
|
+
var HostedToolSummary = HostedTool.mapFields(
|
|
1929
|
+
({ inputSchema: _input, outputSchema: _output, _meta, ...fields }) => fields
|
|
1930
|
+
);
|
|
1931
|
+
var SkillSources = Schema_exports.Struct({ skills: AppSkills, dynamic: Schema_exports.Boolean });
|
|
1932
|
+
var skillsCommand = (sources) => sources ? { operation: "skills", sources: true } : { operation: "skills" };
|
|
1933
|
+
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
|
+
var HostRequest = Schema_exports.Union([
|
|
1943
|
+
WorkflowCommand,
|
|
1944
|
+
WebhookCommand,
|
|
1945
|
+
Schema_exports.Struct({ operation: Schema_exports.Literal("requirements") }),
|
|
1634
1946
|
Schema_exports.Struct({
|
|
1635
|
-
operation: Schema_exports.Literal("
|
|
1636
|
-
|
|
1637
|
-
|
|
1947
|
+
operation: Schema_exports.Literal("inspect"),
|
|
1948
|
+
/** Omit schemas. Only builds that declare the toolIndex capability accept this. */
|
|
1949
|
+
detail: Schema_exports.optionalKey(Schema_exports.Literal("summary")),
|
|
1950
|
+
/** Describe only these tools. Only builds that declare the toolIndex capability accept this. */
|
|
1951
|
+
tools: Schema_exports.optionalKey(Schema_exports.Array(Schema_exports.NonEmptyString)),
|
|
1952
|
+
/**
|
|
1953
|
+
* Describe only declared operations that have schedules, without dynamic tool discovery.
|
|
1954
|
+
* Only builds that declare the scheduledTools capability accept this.
|
|
1955
|
+
*/
|
|
1956
|
+
scheduled: Schema_exports.optionalKey(Schema_exports.Literal(true))
|
|
1638
1957
|
}),
|
|
1639
1958
|
Schema_exports.Struct({
|
|
1640
|
-
operation: Schema_exports.Literal("
|
|
1641
|
-
|
|
1642
|
-
|
|
1959
|
+
operation: Schema_exports.Literal("skills"),
|
|
1960
|
+
/** Answer with SkillSources. Only builds that declare the skillSources capability accept this. */
|
|
1961
|
+
sources: Schema_exports.optionalKey(Schema_exports.Literal(true))
|
|
1643
1962
|
}),
|
|
1644
1963
|
Schema_exports.Struct({
|
|
1645
|
-
operation: Schema_exports.Literal("
|
|
1646
|
-
name:
|
|
1647
|
-
|
|
1964
|
+
operation: Schema_exports.Literal("query"),
|
|
1965
|
+
name: Schema_exports.NonEmptyString,
|
|
1966
|
+
input: JsonValue
|
|
1648
1967
|
}),
|
|
1649
|
-
Schema_exports.Struct({ operation: Schema_exports.Literal("context") }),
|
|
1650
1968
|
Schema_exports.Struct({
|
|
1651
|
-
operation: Schema_exports.Literal("
|
|
1652
|
-
kind: Schema_exports.Literals(["query", "mutation"]),
|
|
1969
|
+
operation: Schema_exports.Literal("mutate"),
|
|
1653
1970
|
name: Schema_exports.NonEmptyString,
|
|
1654
|
-
input: JsonValue
|
|
1655
|
-
|
|
1656
|
-
|
|
1971
|
+
input: JsonValue
|
|
1972
|
+
}),
|
|
1973
|
+
Schema_exports.Struct({
|
|
1974
|
+
operation: Schema_exports.Literal("call"),
|
|
1975
|
+
tool: Schema_exports.NonEmptyString,
|
|
1976
|
+
input: JsonValue
|
|
1657
1977
|
})
|
|
1658
1978
|
]);
|
|
1659
|
-
var
|
|
1660
|
-
|
|
1661
|
-
|
|
1979
|
+
var HostRequestInvalid = class extends Schema_exports.TaggedError()(
|
|
1980
|
+
"HostRequestInvalid",
|
|
1981
|
+
{}
|
|
1982
|
+
) {
|
|
1983
|
+
};
|
|
1984
|
+
var HostAccountsInvalid = class extends Schema_exports.TaggedError()(
|
|
1985
|
+
"HostAccountsInvalid",
|
|
1986
|
+
{}
|
|
1987
|
+
) {
|
|
1988
|
+
};
|
|
1989
|
+
var HostDeclarationInvalid = class extends Schema_exports.TaggedError()(
|
|
1990
|
+
"HostDeclarationInvalid",
|
|
1991
|
+
{}
|
|
1992
|
+
) {
|
|
1993
|
+
};
|
|
1994
|
+
var HostEvaluationFailed = class extends Schema_exports.TaggedError()(
|
|
1995
|
+
"HostEvaluationFailed",
|
|
1996
|
+
{}
|
|
1997
|
+
) {
|
|
1998
|
+
};
|
|
1999
|
+
var HostOperationNotFound = class extends Schema_exports.TaggedError()(
|
|
2000
|
+
"HostOperationNotFound",
|
|
2001
|
+
{}
|
|
2002
|
+
) {
|
|
2003
|
+
};
|
|
2004
|
+
var HostOperationFailed = class extends Schema_exports.TaggedError()(
|
|
2005
|
+
"HostOperationFailed",
|
|
2006
|
+
{}
|
|
2007
|
+
) {
|
|
2008
|
+
};
|
|
2009
|
+
var HostToolNotFound = class extends Schema_exports.TaggedError()(
|
|
2010
|
+
"HostToolNotFound",
|
|
2011
|
+
{}
|
|
2012
|
+
) {
|
|
2013
|
+
};
|
|
2014
|
+
var InputProblem = Schema_exports.String.check(Schema_exports.isMaxLength(512));
|
|
2015
|
+
var maxInputProblems = 10;
|
|
2016
|
+
var HostInputInvalid = class extends Schema_exports.TaggedError()("HostInputInvalid", {
|
|
2017
|
+
problems: Schema_exports.optionalKey(
|
|
2018
|
+
Schema_exports.Array(InputProblem).check(Schema_exports.isMaxLength(maxInputProblems))
|
|
2019
|
+
)
|
|
2020
|
+
}) {
|
|
2021
|
+
};
|
|
2022
|
+
var HostToolBlocked = class extends Schema_exports.TaggedError()("HostToolBlocked", {}) {
|
|
2023
|
+
};
|
|
2024
|
+
var HostToolApprovalRequired = class extends Schema_exports.TaggedError()(
|
|
2025
|
+
"HostToolApprovalRequired",
|
|
2026
|
+
{ input: JsonValue, elicitation: ApprovalElicitation }
|
|
2027
|
+
) {
|
|
2028
|
+
};
|
|
2029
|
+
var HostToolPolicyFailed = class extends Schema_exports.TaggedError()(
|
|
2030
|
+
"HostToolPolicyFailed",
|
|
2031
|
+
{}
|
|
2032
|
+
) {
|
|
2033
|
+
};
|
|
2034
|
+
var HostOutputInvalid = class extends Schema_exports.TaggedError()(
|
|
2035
|
+
"HostOutputInvalid",
|
|
2036
|
+
{}
|
|
2037
|
+
) {
|
|
2038
|
+
};
|
|
2039
|
+
var HostRequirementsError = Schema_exports.Union([HostRequestInvalid, HostDeclarationInvalid]);
|
|
2040
|
+
var HostInspectError = Schema_exports.Union([
|
|
2041
|
+
ProviderError,
|
|
2042
|
+
McpError,
|
|
2043
|
+
SkillLoadFailed,
|
|
2044
|
+
HostRequestInvalid,
|
|
2045
|
+
HostDeclarationInvalid,
|
|
2046
|
+
HostAccountsInvalid,
|
|
2047
|
+
HostEvaluationFailed
|
|
1662
2048
|
]);
|
|
1663
|
-
var
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
2049
|
+
var HostCallError = Schema_exports.Union([
|
|
2050
|
+
OpenapiResponseError,
|
|
2051
|
+
WorkflowFailure,
|
|
2052
|
+
HostInspectError,
|
|
2053
|
+
HostToolNotFound,
|
|
2054
|
+
HostOperationNotFound,
|
|
2055
|
+
HostOperationFailed,
|
|
2056
|
+
HostInputInvalid,
|
|
2057
|
+
HostOutputInvalid,
|
|
2058
|
+
HostToolBlocked,
|
|
2059
|
+
HostToolApprovalRequired,
|
|
2060
|
+
HostToolPolicyFailed,
|
|
2061
|
+
ElicitationFailed
|
|
2062
|
+
]);
|
|
2063
|
+
var HostDataError = HostCallError;
|
|
2064
|
+
var HostError = Schema_exports.Union([
|
|
2065
|
+
OpenapiResponseError,
|
|
2066
|
+
ProviderError,
|
|
2067
|
+
McpError,
|
|
2068
|
+
SkillLoadFailed,
|
|
2069
|
+
WorkflowFailure,
|
|
2070
|
+
HostRequestInvalid,
|
|
2071
|
+
HostAccountsInvalid,
|
|
2072
|
+
HostDeclarationInvalid,
|
|
2073
|
+
HostEvaluationFailed,
|
|
2074
|
+
HostOperationNotFound,
|
|
2075
|
+
HostOperationFailed,
|
|
2076
|
+
HostToolNotFound,
|
|
2077
|
+
HostInputInvalid,
|
|
2078
|
+
HostOutputInvalid,
|
|
2079
|
+
HostToolBlocked,
|
|
2080
|
+
HostToolApprovalRequired,
|
|
2081
|
+
HostToolPolicyFailed,
|
|
2082
|
+
ElicitationFailed
|
|
2083
|
+
]);
|
|
2084
|
+
var ToolResultObservation = Context_exports.Reference(
|
|
2085
|
+
"apps/ToolResultObservation",
|
|
2086
|
+
{ defaultValue: () => ({ failed: () => {
|
|
2087
|
+
} }) }
|
|
2088
|
+
);
|
|
2089
|
+
var HostResponse = Schema_exports.Union([
|
|
1671
2090
|
Schema_exports.Struct({
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
limit: Schema_exports.optionalKey(Schema_exports.Int.check(Schema_exports.isBetween({ minimum: 1, maximum: 100 })))
|
|
2091
|
+
ok: Schema_exports.Literal(true),
|
|
2092
|
+
value: JsonValue,
|
|
2093
|
+
toolError: Schema_exports.optionalKey(Schema_exports.Literal(true))
|
|
1676
2094
|
}),
|
|
1677
|
-
Schema_exports.Struct({
|
|
2095
|
+
Schema_exports.Struct({ ok: Schema_exports.Literal(false), error: HostError })
|
|
1678
2096
|
]);
|
|
1679
2097
|
|
|
1680
2098
|
export {
|
|
@@ -1686,20 +2104,15 @@ export {
|
|
|
1686
2104
|
OAuth2Method,
|
|
1687
2105
|
Provider,
|
|
1688
2106
|
ManyAccounts,
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
ElicitationFailed,
|
|
1699
|
-
ElicitationReply,
|
|
1700
|
-
ApprovalElicitation,
|
|
1701
|
-
ApprovalResponse,
|
|
1702
|
-
approvalElicitation,
|
|
2107
|
+
ToolAnnotations,
|
|
2108
|
+
McpClientLimits,
|
|
2109
|
+
defaultMcpClientLimits,
|
|
2110
|
+
mcpSdkTimerCeilingMs,
|
|
2111
|
+
McpToolsOptions,
|
|
2112
|
+
McpToolResult,
|
|
2113
|
+
McpToolMetadata,
|
|
2114
|
+
McpError,
|
|
2115
|
+
ProcessConfig,
|
|
1703
2116
|
WorkflowRunId,
|
|
1704
2117
|
WorkflowName,
|
|
1705
2118
|
workflowDurationMillis,
|
|
@@ -1715,5 +2128,66 @@ export {
|
|
|
1715
2128
|
WorkflowCommand,
|
|
1716
2129
|
WorkflowRpcCommand,
|
|
1717
2130
|
WorkflowRpcResult,
|
|
1718
|
-
WorkflowControlCommand
|
|
2131
|
+
WorkflowControlCommand,
|
|
2132
|
+
minimumIntervalMilliseconds,
|
|
2133
|
+
Interval,
|
|
2134
|
+
CalendarSchedule,
|
|
2135
|
+
ScheduleTiming,
|
|
2136
|
+
OperationSchedule,
|
|
2137
|
+
ElicitationLimits,
|
|
2138
|
+
defaultElicitationLimits,
|
|
2139
|
+
FormElicitation,
|
|
2140
|
+
ElicitationResponse,
|
|
2141
|
+
ElicitationFailed,
|
|
2142
|
+
ElicitationReply,
|
|
2143
|
+
ApprovalElicitation,
|
|
2144
|
+
ApprovalResponse,
|
|
2145
|
+
approvalElicitation,
|
|
2146
|
+
WebhookTransportLimits,
|
|
2147
|
+
defaultWebhookTransportLimits,
|
|
2148
|
+
WebhookRequestData,
|
|
2149
|
+
WebhookResponseData,
|
|
2150
|
+
ManualWebhookSetup,
|
|
2151
|
+
ManualWebhookDescriptor,
|
|
2152
|
+
HostedWebhook,
|
|
2153
|
+
WebhookCommand,
|
|
2154
|
+
OperationToolPrefixes,
|
|
2155
|
+
DeclaredAuthMethod,
|
|
2156
|
+
DeclaredProvider,
|
|
2157
|
+
DeclaredRequirements,
|
|
2158
|
+
ResolvedAccount,
|
|
2159
|
+
ResolvedAccounts,
|
|
2160
|
+
TrustedToolApproval,
|
|
2161
|
+
InvocationDeadline,
|
|
2162
|
+
HostedTool,
|
|
2163
|
+
HostedToolSummary,
|
|
2164
|
+
SkillSources,
|
|
2165
|
+
skillsCommand,
|
|
2166
|
+
SkillCatalogResponse,
|
|
2167
|
+
skillCatalog,
|
|
2168
|
+
inspectCommand,
|
|
2169
|
+
indexCommand,
|
|
2170
|
+
selectTools,
|
|
2171
|
+
HostRequest,
|
|
2172
|
+
HostRequestInvalid,
|
|
2173
|
+
HostAccountsInvalid,
|
|
2174
|
+
HostDeclarationInvalid,
|
|
2175
|
+
HostEvaluationFailed,
|
|
2176
|
+
HostOperationNotFound,
|
|
2177
|
+
HostOperationFailed,
|
|
2178
|
+
HostToolNotFound,
|
|
2179
|
+
InputProblem,
|
|
2180
|
+
maxInputProblems,
|
|
2181
|
+
HostInputInvalid,
|
|
2182
|
+
HostToolBlocked,
|
|
2183
|
+
HostToolApprovalRequired,
|
|
2184
|
+
HostToolPolicyFailed,
|
|
2185
|
+
HostOutputInvalid,
|
|
2186
|
+
HostRequirementsError,
|
|
2187
|
+
HostInspectError,
|
|
2188
|
+
HostCallError,
|
|
2189
|
+
HostDataError,
|
|
2190
|
+
HostError,
|
|
2191
|
+
ToolResultObservation,
|
|
2192
|
+
HostResponse
|
|
1719
2193
|
};
|