apps 0.0.1-beta.0 → 0.0.1-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +97 -4
- package/framework-reference.json +1 -1
- package/js/browser-XIPJGLH2.js +65 -0
- package/js/{chunk-SBKHUC5L.js → chunk-4LPG6RCH.js} +2 -2
- package/js/chunk-5MQZEB6Y.js +172 -0
- package/js/{chunk-7JXHF5IF.js → chunk-BMOIAIVR.js} +1 -1
- package/js/chunk-CZ7CSFO4.js +39 -0
- package/js/chunk-D47C7KG5.js +172 -0
- package/js/{chunk-YDR4CPJA.js → chunk-EVJUVWN2.js} +8 -8
- package/js/chunk-FDNTX5QJ.js +78 -0
- package/js/{chunk-2OTCEKL2.js → chunk-FW5HBOIK.js} +2352 -1493
- package/js/{chunk-EP6AEUZO.js → chunk-FZJOYIZO.js} +1 -1
- package/js/{chunk-VFUZI3NY.js → chunk-HDJH3RPR.js} +4 -4
- package/js/{chunk-WIDTG42X.js → chunk-HDTGZWP2.js} +79 -26
- package/js/{chunk-Q2FD5IBM.js → chunk-J7O55ZV7.js} +298 -37
- package/js/{chunk-X3YBZCJW.js → chunk-JN55AYQH.js} +8 -41
- package/js/chunk-LGIYBDWA.js +85 -0
- package/js/{chunk-D6BKYP2L.js → chunk-M6ZRRIBI.js} +4 -4
- package/js/{chunk-HP7E42X6.js → chunk-MYYEW3RA.js} +767 -249
- 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-PYUYJRSK.js} +36 -2
- package/js/{chunk-W7Q5EOTS.js → chunk-QKHR7BMF.js} +32 -32
- package/js/{chunk-KWTCHVLT.js → chunk-RN2MXB4R.js} +47 -51
- 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-UVL56Z6E.js +6641 -0
- package/js/chunk-W7D7WVSY.js +18 -0
- package/js/{chunk-BPEFS4YF.js → chunk-WFSQXYUT.js} +109 -17
- package/js/chunk-YEJOQEII.js +104 -0
- package/js/{chunk-LOKGDT6B.js → chunk-Z5NMEGJN.js} +5 -4
- package/js/{chunk-OWD2YICM.js → chunk-ZCAMUXSG.js} +116 -87
- package/js/chunk-ZJWDMTE3.js +63 -0
- package/js/client.js +11 -11
- package/js/contracts.js +88 -25
- package/js/effect.js +21 -15
- package/js/es-APDZKREY.js +40968 -0
- package/js/graphql.js +224 -121
- package/js/host.js +76 -19
- package/js/index.js +193 -51
- package/js/mcp/effect.js +25 -17
- package/js/mcp/stdio.js +23 -17
- package/js/mcp.js +110 -24
- package/js/openapi.js +3045 -105
- package/js/operations/approval.js +1 -1
- package/js/react.js +4 -4
- package/js/skills/effect.js +11 -0
- package/js/skills.js +894 -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 +119 -0
- package/types/app-cache/src/index.d.ts +93 -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 +44 -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 +54 -525
- 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 +156 -30
- package/types/apps/src/contracts/protocol-version.d.ts +6 -0
- package/types/apps/src/contracts/protocols/1.d.ts +1575 -0
- 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 +122 -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 +8 -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 +51 -0
- package/types/apps/src/implementation/openapi-names.d.ts +18 -0
- package/types/apps/src/implementation/openapi-request.d.ts +10 -4
- package/types/apps/src/implementation/openapi-source.d.ts +40 -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 +6 -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/implementation/swagger-client.d.ts +28 -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 +75 -0
- package/types/telemetry/src/config.d.ts +2 -0
- package/js/chunk-22WRQZT7.js +0 -389
- package/js/chunk-MLKGABMK.js +0 -9
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import {
|
|
2
|
+
AccountId
|
|
3
|
+
} from "./chunk-SATWJKN6.js";
|
|
4
|
+
import {
|
|
5
|
+
Schema_exports
|
|
6
|
+
} from "./chunk-FW5HBOIK.js";
|
|
7
|
+
|
|
8
|
+
// src/contracts/provider-error.ts
|
|
9
|
+
var ProviderError = class extends Schema_exports.TaggedError()("ProviderError", {
|
|
10
|
+
reason: Schema_exports.Literals(["unauthorized", "forbidden", "rate_limited", "unavailable", "rejected"]),
|
|
11
|
+
status: Schema_exports.optional(Schema_exports.Int.check(Schema_exports.isBetween({ minimum: 100, maximum: 599 }))),
|
|
12
|
+
accountId: Schema_exports.optional(AccountId)
|
|
13
|
+
}) {
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export {
|
|
17
|
+
ProviderError
|
|
18
|
+
};
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ValidationError
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-SATWJKN6.js";
|
|
4
4
|
import {
|
|
5
|
+
Cause_exports,
|
|
5
6
|
Effect_exports,
|
|
7
|
+
Exit_exports,
|
|
8
|
+
SchemaGetter_exports,
|
|
6
9
|
SchemaIssue_exports,
|
|
7
10
|
SchemaParser_exports,
|
|
8
11
|
Schema_exports
|
|
9
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-FW5HBOIK.js";
|
|
10
13
|
|
|
11
14
|
// ../../node_modules/.bun/@cfworker+json-schema@4.1.1/node_modules/@cfworker/json-schema/dist/esm/deep-compare-strict.js
|
|
12
15
|
function deepCompareStrict(a, b) {
|
|
@@ -1129,12 +1132,30 @@ function object(fields) {
|
|
|
1129
1132
|
const entries = Object.entries(fields).map(
|
|
1130
1133
|
([key, field]) => [key, decoderOf(field)]
|
|
1131
1134
|
);
|
|
1132
|
-
const decoder =
|
|
1135
|
+
const decoder = entries.length === 0 ? withJsonSchemaDocument(
|
|
1136
|
+
// Native Struct({}) accepts every non-null value and retains undeclared fields.
|
|
1137
|
+
Schema_exports.Record(Schema_exports.String, Schema_exports.Unknown).pipe(
|
|
1138
|
+
Schema_exports.decodeTo(Schema_exports.Record(Schema_exports.String, Schema_exports.Never), {
|
|
1139
|
+
decode: SchemaGetter_exports.transform(() => ({})),
|
|
1140
|
+
encode: SchemaGetter_exports.transform((value) => value)
|
|
1141
|
+
})
|
|
1142
|
+
),
|
|
1143
|
+
{ type: "object", properties: {}, additionalProperties: false }
|
|
1144
|
+
) : Schema_exports.Struct(Object.fromEntries(entries));
|
|
1133
1145
|
return { ...wrap(decoder, false), fields: Object.freeze({ ...fields }) };
|
|
1134
1146
|
}
|
|
1135
1147
|
var ImportedJsonSchema = /* @__PURE__ */ Symbol("apps.JsonSchemaDocument");
|
|
1136
1148
|
var importedJsonSchema = (decoder) => ImportedJsonSchema in decoder ? decoder[ImportedJsonSchema] : void 0;
|
|
1137
1149
|
var withJsonSchemaDocument = (decoder, document) => Object.assign(decoder, { [ImportedJsonSchema]: document });
|
|
1150
|
+
var once = (compute) => {
|
|
1151
|
+
let state;
|
|
1152
|
+
return () => (state ??= { value: compute() }).value;
|
|
1153
|
+
};
|
|
1154
|
+
var withLazyJsonSchemaDocument = (decoder, document) => Object.defineProperty(decoder, ImportedJsonSchema, {
|
|
1155
|
+
configurable: true,
|
|
1156
|
+
enumerable: true,
|
|
1157
|
+
get: once(document)
|
|
1158
|
+
});
|
|
1138
1159
|
var nestJsonSchema = (input, pointer) => {
|
|
1139
1160
|
const document = structuredClone(input);
|
|
1140
1161
|
const lookup = dereference(document);
|
|
@@ -1232,6 +1253,40 @@ function interpretedDocument(value) {
|
|
|
1232
1253
|
}
|
|
1233
1254
|
return Object.fromEntries(entries);
|
|
1234
1255
|
}
|
|
1256
|
+
var containerKeywords = /* @__PURE__ */ new Set([
|
|
1257
|
+
"$ref",
|
|
1258
|
+
"$recursiveRef",
|
|
1259
|
+
"$dynamicRef",
|
|
1260
|
+
"properties",
|
|
1261
|
+
"patternProperties",
|
|
1262
|
+
"additionalProperties",
|
|
1263
|
+
"unevaluatedProperties",
|
|
1264
|
+
"propertyNames",
|
|
1265
|
+
"items",
|
|
1266
|
+
"prefixItems",
|
|
1267
|
+
"additionalItems",
|
|
1268
|
+
"unevaluatedItems",
|
|
1269
|
+
"contains",
|
|
1270
|
+
"allOf",
|
|
1271
|
+
"if",
|
|
1272
|
+
"then",
|
|
1273
|
+
"else",
|
|
1274
|
+
"dependentSchemas"
|
|
1275
|
+
]);
|
|
1276
|
+
var jsonSchemaProblems = (errors) => {
|
|
1277
|
+
const problems = errors.flatMap(({ keyword, instanceLocation, error }) => {
|
|
1278
|
+
if (containerKeywords.has(keyword)) return [];
|
|
1279
|
+
const path = instanceLocation.replace(/^#\/?/, "").split("/").filter((segment) => segment !== "").map((segment) => decodeURIComponent(segment).replace(/~1/g, "/").replace(/~0/g, "~")).map((segment) => /^\d+$/.test(segment) ? Number(segment) : segment);
|
|
1280
|
+
const required = keyword === "required" ? /required property "([^"]*)"/.exec(error) : null;
|
|
1281
|
+
const expected = keyword === "type" ? /Expected "([^.]*)"\.?$/.exec(error) : null;
|
|
1282
|
+
const issue = required !== null ? { path: [...path, required[1] ?? ""], issue: "Missing key" } : {
|
|
1283
|
+
path,
|
|
1284
|
+
issue: expected !== null ? `Expected ${(expected[1] ?? "").replace(/"/g, "")}` : keyword === "const" || keyword === "enum" ? "Expected one of the allowed values" : `Failed the "${keyword}" constraint`
|
|
1285
|
+
};
|
|
1286
|
+
return [issue];
|
|
1287
|
+
});
|
|
1288
|
+
return problems.length === 0 ? false : problems;
|
|
1289
|
+
};
|
|
1235
1290
|
var compileJsonSchemaDecoder = (document) => Effect_exports.gen(function* () {
|
|
1236
1291
|
const validator = yield* Effect_exports.try({
|
|
1237
1292
|
try: () => {
|
|
@@ -1266,7 +1321,8 @@ var compileJsonSchemaDecoder = (document) => Effect_exports.gen(function* () {
|
|
|
1266
1321
|
Schema_exports.makeFilter(
|
|
1267
1322
|
(value) => {
|
|
1268
1323
|
try {
|
|
1269
|
-
|
|
1324
|
+
const result = validator.validate(value);
|
|
1325
|
+
return result.valid || jsonSchemaProblems(result.errors);
|
|
1270
1326
|
} catch {
|
|
1271
1327
|
return false;
|
|
1272
1328
|
}
|
|
@@ -1276,24 +1332,58 @@ var compileJsonSchemaDecoder = (document) => Effect_exports.gen(function* () {
|
|
|
1276
1332
|
);
|
|
1277
1333
|
return Object.assign(decoder, { [ImportedJsonSchema]: document });
|
|
1278
1334
|
});
|
|
1279
|
-
var
|
|
1280
|
-
const
|
|
1281
|
-
|
|
1282
|
-
|
|
1335
|
+
var lazyDecoder = (document) => {
|
|
1336
|
+
const read = once(document);
|
|
1337
|
+
let compiled;
|
|
1338
|
+
const compile = Effect_exports.suspend(
|
|
1339
|
+
() => compiled ?? compileJsonSchemaDecoder(read()).pipe(
|
|
1340
|
+
// An interrupted compilation is not a result; the next decode compiles again.
|
|
1341
|
+
Effect_exports.onExit(
|
|
1342
|
+
(exit) => Effect_exports.sync(() => {
|
|
1343
|
+
if (Exit_exports.isSuccess(exit) || !Cause_exports.hasInterrupts(exit.cause)) compiled = exit;
|
|
1344
|
+
})
|
|
1345
|
+
)
|
|
1346
|
+
)
|
|
1283
1347
|
);
|
|
1284
|
-
const compiled = yield* Effect_exports.cached(compileJsonSchemaDecoder(document));
|
|
1285
1348
|
const decoder = Schema_exports.declareConstructor()(
|
|
1286
1349
|
[],
|
|
1287
|
-
() => (
|
|
1288
|
-
Effect_exports.mapError(
|
|
1289
|
-
|
|
1290
|
-
),
|
|
1291
|
-
Effect_exports.flatMap((schema) => SchemaParser_exports.decodeUnknownEffect(schema)(input2, options))
|
|
1350
|
+
() => (input, _ast, options) => compile.pipe(
|
|
1351
|
+
Effect_exports.mapError(() => new SchemaIssue_exports.InvalidValue({ message: "Unsupported JSON Schema" })),
|
|
1352
|
+
Effect_exports.flatMap((schema) => SchemaParser_exports.decodeUnknownEffect(schema)(input, options))
|
|
1292
1353
|
)
|
|
1293
1354
|
);
|
|
1294
|
-
return
|
|
1355
|
+
return withLazyJsonSchemaDocument(decoder, read);
|
|
1356
|
+
};
|
|
1357
|
+
var lazyJsonSchemaDecoder = (document) => Effect_exports.sync(() => lazyDecoder(document));
|
|
1358
|
+
var isJsonValue = Schema_exports.is(Schema_exports.Json);
|
|
1359
|
+
var jsonDocument = (input) => {
|
|
1360
|
+
if (typeof input !== "object" || input === null || Array.isArray(input)) return void 0;
|
|
1361
|
+
const keys = Object.keys(input);
|
|
1362
|
+
const values = keys.map((key) => Reflect.get(input, key));
|
|
1363
|
+
if (!isJsonValue(values)) return void 0;
|
|
1364
|
+
const document = {};
|
|
1365
|
+
keys.forEach(
|
|
1366
|
+
(key, index) => Object.defineProperty(document, key, {
|
|
1367
|
+
value: values[index],
|
|
1368
|
+
enumerable: true,
|
|
1369
|
+
writable: true,
|
|
1370
|
+
configurable: true
|
|
1371
|
+
})
|
|
1372
|
+
);
|
|
1373
|
+
return document;
|
|
1374
|
+
};
|
|
1375
|
+
var jsonSchemaDecoder = (input) => Effect_exports.suspend(() => {
|
|
1376
|
+
const document = jsonDocument(input);
|
|
1377
|
+
return document === void 0 ? Effect_exports.fail(new ValidationError()) : lazyJsonSchemaDecoder(() => document);
|
|
1295
1378
|
});
|
|
1296
|
-
var jsonSchema = (input) =>
|
|
1379
|
+
var jsonSchema = (input) => {
|
|
1380
|
+
const document = jsonDocument(input);
|
|
1381
|
+
if (document === void 0) throw new ValidationError();
|
|
1382
|
+
return wrap(
|
|
1383
|
+
lazyDecoder(() => document),
|
|
1384
|
+
false
|
|
1385
|
+
);
|
|
1386
|
+
};
|
|
1297
1387
|
var storageFieldOf = (schema) => schema[StorageField];
|
|
1298
1388
|
var id = (table) => wrap(Schema_exports.NonEmptyString, false, { kind: "id", references: table });
|
|
1299
1389
|
var userId = () => wrap(Schema_exports.NonEmptyString, false, { kind: "userId" });
|
|
@@ -1312,9 +1402,11 @@ export {
|
|
|
1312
1402
|
array,
|
|
1313
1403
|
object,
|
|
1314
1404
|
importedJsonSchema,
|
|
1315
|
-
|
|
1405
|
+
once,
|
|
1406
|
+
withLazyJsonSchemaDocument,
|
|
1316
1407
|
nestJsonSchema,
|
|
1317
1408
|
compileJsonSchemaDecoder,
|
|
1409
|
+
lazyJsonSchemaDecoder,
|
|
1318
1410
|
jsonSchemaDecoder,
|
|
1319
1411
|
jsonSchema,
|
|
1320
1412
|
storageFieldOf,
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Schema_exports
|
|
3
|
+
} from "./chunk-FW5HBOIK.js";
|
|
4
|
+
|
|
5
|
+
// src/contracts/skills.ts
|
|
6
|
+
var SkillFilePath = Schema_exports.NonEmptyString.check(
|
|
7
|
+
Schema_exports.makeFilter(
|
|
8
|
+
(path) => !path.startsWith("/") && !path.includes("\\") && !path.includes("\0") && path.split("/").every((part) => part !== "" && part !== "." && part !== "..")
|
|
9
|
+
)
|
|
10
|
+
);
|
|
11
|
+
var SkillFile = Schema_exports.Struct({ path: SkillFilePath, content: Schema_exports.String });
|
|
12
|
+
var skillFormatLimits = {
|
|
13
|
+
nameCharacters: 64,
|
|
14
|
+
descriptionCharacters: 1024,
|
|
15
|
+
compatibilityCharacters: 500
|
|
16
|
+
};
|
|
17
|
+
var AppSkillName = Schema_exports.NonEmptyString.check(
|
|
18
|
+
Schema_exports.makeFilter(
|
|
19
|
+
(value) => value === value.toLowerCase() && /^[\p{L}\p{N}]+(?:-[\p{L}\p{N}]+)*$/u.test(value) && [...value].length <= skillFormatLimits.nameCharacters
|
|
20
|
+
)
|
|
21
|
+
);
|
|
22
|
+
var AppSkillMetadata = Schema_exports.Struct({
|
|
23
|
+
name: AppSkillName,
|
|
24
|
+
description: Schema_exports.String.check(
|
|
25
|
+
Schema_exports.makeFilter(
|
|
26
|
+
(value) => value.trim().length > 0 && [...value].length <= skillFormatLimits.descriptionCharacters
|
|
27
|
+
)
|
|
28
|
+
),
|
|
29
|
+
license: Schema_exports.optionalKey(Schema_exports.String),
|
|
30
|
+
compatibility: Schema_exports.optionalKey(
|
|
31
|
+
Schema_exports.String.check(
|
|
32
|
+
Schema_exports.makeFilter(
|
|
33
|
+
(value) => value.trim().length > 0 && [...value].length <= skillFormatLimits.compatibilityCharacters
|
|
34
|
+
)
|
|
35
|
+
)
|
|
36
|
+
),
|
|
37
|
+
metadata: Schema_exports.optionalKey(Schema_exports.Record(Schema_exports.String, Schema_exports.String)),
|
|
38
|
+
"allowed-tools": Schema_exports.optionalKey(Schema_exports.String)
|
|
39
|
+
});
|
|
40
|
+
var AppSkillSource = Schema_exports.Struct({
|
|
41
|
+
...AppSkillMetadata.fields,
|
|
42
|
+
files: Schema_exports.Array(SkillFile).check(
|
|
43
|
+
Schema_exports.makeFilter(
|
|
44
|
+
(files) => files.some((file) => file.path === "SKILL.md") && new Set(files.map((file) => file.path)).size === files.length
|
|
45
|
+
)
|
|
46
|
+
)
|
|
47
|
+
});
|
|
48
|
+
var SkillDefinitionInvalid = class extends Schema_exports.TaggedError()(
|
|
49
|
+
"SkillDefinitionInvalid",
|
|
50
|
+
{
|
|
51
|
+
file: SkillFilePath,
|
|
52
|
+
reason: Schema_exports.Literals([
|
|
53
|
+
"files",
|
|
54
|
+
"directory",
|
|
55
|
+
"missing-document",
|
|
56
|
+
"frontmatter",
|
|
57
|
+
"metadata",
|
|
58
|
+
"name-mismatch"
|
|
59
|
+
])
|
|
60
|
+
},
|
|
61
|
+
{ httpApiStatus: 400 }
|
|
62
|
+
) {
|
|
63
|
+
};
|
|
64
|
+
var AppSkills = Schema_exports.Array(AppSkillSource).check(
|
|
65
|
+
Schema_exports.makeFilter((skills) => new Set(skills.map((skill) => skill.name)).size === skills.length)
|
|
66
|
+
);
|
|
67
|
+
var SkillServiceName = Schema_exports.String.check(
|
|
68
|
+
Schema_exports.isPattern(/^[A-Za-z0-9](?:[A-Za-z0-9 .-]{0,98}[A-Za-z0-9])?$/)
|
|
69
|
+
);
|
|
70
|
+
var SkillLoadFailed = class extends Schema_exports.TaggedError()("SkillLoadFailed", {
|
|
71
|
+
reason: Schema_exports.Literals([
|
|
72
|
+
"source",
|
|
73
|
+
"request",
|
|
74
|
+
"rate_limited",
|
|
75
|
+
"document",
|
|
76
|
+
"limit",
|
|
77
|
+
"changed",
|
|
78
|
+
"encoding"
|
|
79
|
+
]),
|
|
80
|
+
// Error instances read an omitted message as "", so an empty message means none was given.
|
|
81
|
+
message: Schema_exports.optional(Schema_exports.String.check(Schema_exports.isMaxLength(500))),
|
|
82
|
+
status: Schema_exports.optional(Schema_exports.Int.check(Schema_exports.isBetween({ minimum: 100, maximum: 599 })))
|
|
83
|
+
}) {
|
|
84
|
+
};
|
|
85
|
+
var skillLoadLimits = {
|
|
86
|
+
files: 1e3,
|
|
87
|
+
fileBytes: 2e6,
|
|
88
|
+
totalBytes: 2e7,
|
|
89
|
+
concurrency: 8
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
export {
|
|
93
|
+
SkillFilePath,
|
|
94
|
+
SkillFile,
|
|
95
|
+
skillFormatLimits,
|
|
96
|
+
AppSkillName,
|
|
97
|
+
AppSkillMetadata,
|
|
98
|
+
AppSkillSource,
|
|
99
|
+
SkillDefinitionInvalid,
|
|
100
|
+
AppSkills,
|
|
101
|
+
SkillServiceName,
|
|
102
|
+
SkillLoadFailed,
|
|
103
|
+
skillLoadLimits
|
|
104
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
operationDeclaration
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-PYUYJRSK.js";
|
|
4
4
|
|
|
5
5
|
// src/implementation/protocol-operations.ts
|
|
6
6
|
var protocolOperations = (operations, kinds = {}) => {
|
|
@@ -14,11 +14,12 @@ var protocolOperations = (operations, kinds = {}) => {
|
|
|
14
14
|
...operation.annotations === void 0 ? {} : { annotations: operation.annotations },
|
|
15
15
|
...operation._meta === void 0 ? {} : { _meta: operation._meta },
|
|
16
16
|
input: operation.input,
|
|
17
|
-
...operation.outputSchema === void 0 ? {} : { outputSchema: operation.outputSchema },
|
|
18
17
|
run: operation.run
|
|
19
18
|
};
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
const output = Object.getOwnPropertyDescriptor(operation, "outputSchema");
|
|
20
|
+
const withOutput = (target) => output === void 0 || output.get === void 0 && output.value === void 0 ? target : Object.defineProperty(target, "outputSchema", { ...output, enumerable: true });
|
|
21
|
+
if (kind === "query") queries[name] = operationDeclaration(withOutput({ ...native, kind }));
|
|
22
|
+
else mutations[name] = operationDeclaration(withOutput({ ...native, kind: "mutation" }));
|
|
22
23
|
}
|
|
23
24
|
return { queries, mutations };
|
|
24
25
|
};
|