apps 0.0.1-beta.70 → 0.0.1-beta.73
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/framework-reference.json +1 -1
- package/js/{chunk-WGQP62EG.js → chunk-G7L5DHQX.js} +1 -1
- package/js/{chunk-M5OLYYNU.js → chunk-LTF4TLMO.js} +1 -1
- package/js/{chunk-4NCIPADO.js → chunk-OBYMFSWA.js} +12 -5
- package/js/{chunk-WDIVWSDG.js → chunk-QGHGYH5V.js} +1 -1
- package/js/{chunk-2YSTJMBD.js → chunk-WCVV4PPS.js} +1 -1
- package/js/effect.js +2 -2
- package/js/graphql.js +3 -3
- package/js/host.js +2 -2
- package/js/mcp/effect.js +4 -4
- package/js/mcp/stdio.js +4 -4
- package/js/mcp.js +5 -5
- package/js/openapi.js +20 -10
- package/package.json +1 -1
- package/runtime.json +1 -1
|
@@ -229,9 +229,11 @@ var OpenapiSkippedOperation = Schema_exports.Struct({
|
|
|
229
229
|
var listedReasons = 8;
|
|
230
230
|
var reasonLength = 240;
|
|
231
231
|
var cut = (text) => text.length <= reasonLength ? text : `${text.slice(0, reasonLength - 1)}\u2026`;
|
|
232
|
+
var customTool = `To call a left-out operation anyway, write a custom tool for it in this app with the same account: see "Custom tools beside generated ones" in the app-authoring skill's integrations.md.`;
|
|
232
233
|
var compileMessage = (error) => {
|
|
233
234
|
const skipped = error.skipped ?? [];
|
|
234
235
|
if (skipped.length === 0) return error.reason;
|
|
236
|
+
const close = skipped.some(({ code }) => code !== "event_stream") ? ` ${customTool}` : "";
|
|
235
237
|
const groups = /* @__PURE__ */ new Map();
|
|
236
238
|
for (const operation of skipped) {
|
|
237
239
|
const key = JSON.stringify([operation.code, operation.reason]);
|
|
@@ -242,12 +244,17 @@ var compileMessage = (error) => {
|
|
|
242
244
|
const example = ({ first, count: count2 }) => `${first.method} ${first.path}${count2 > 1 ? ` and ${count2 - 1} more` : ""}`;
|
|
243
245
|
const [only, ...others] = groups.values();
|
|
244
246
|
if (only !== void 0 && others.length === 0 && only.first.code === error.code && only.first.reason === error.reason)
|
|
245
|
-
return `${error.reason} Left out: ${example(only)}
|
|
246
|
-
const listed = [
|
|
247
|
+
return `${error.reason} Left out: ${example(only)}.${close}`;
|
|
248
|
+
const listed = [];
|
|
249
|
+
let room = maxFailureMessageLength - `${error.reason} Left out: ; and ${groups.size} other reasons.${close}`.length;
|
|
250
|
+
for (const group of groups.values()) {
|
|
251
|
+
const text = `${example(group)} (${group.first.code}: ${cut(group.first.reason.replace(/\.$/, ""))})`;
|
|
252
|
+
if (listed.length === listedReasons || text.length + 2 > room) break;
|
|
253
|
+
listed.push(text);
|
|
254
|
+
room -= text.length + 2;
|
|
255
|
+
}
|
|
247
256
|
const rest = groups.size - listed.length;
|
|
248
|
-
return `${error.reason} Left out: ${listed.
|
|
249
|
-
(group) => `${example(group)} (${group.first.code}: ${cut(group.first.reason.replace(/\.$/, ""))})`
|
|
250
|
-
).join("; ")}${rest > 0 ? `; and ${rest} other reasons` : ""}.`;
|
|
257
|
+
return `${error.reason} Left out: ${listed.join("; ")}${rest > 0 ? `; and ${rest} other reasons` : ""}.${close}`;
|
|
251
258
|
};
|
|
252
259
|
var OpenapiCompileError = class extends Schema_exports.TaggedError()(
|
|
253
260
|
"OpenapiCompileError",
|
package/js/effect.js
CHANGED
|
@@ -3,9 +3,9 @@ import {
|
|
|
3
3
|
ApprovalDecision,
|
|
4
4
|
createAppHandler,
|
|
5
5
|
prepareElicitation
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-WCVV4PPS.js";
|
|
7
7
|
import "./chunk-RUP4JMKO.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-OBYMFSWA.js";
|
|
9
9
|
import "./chunk-MHB7IFG7.js";
|
|
10
10
|
import "./chunk-XBG7HHXC.js";
|
|
11
11
|
import "./chunk-3R3KFCDU.js";
|
package/js/graphql.js
CHANGED
|
@@ -4,13 +4,13 @@ import {
|
|
|
4
4
|
} from "./chunk-ECCWT5GJ.js";
|
|
5
5
|
import {
|
|
6
6
|
protocolOperations
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-QGHGYH5V.js";
|
|
8
8
|
import "./chunk-BCSNKUAC.js";
|
|
9
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-WCVV4PPS.js";
|
|
10
10
|
import {
|
|
11
11
|
cacheKey
|
|
12
12
|
} from "./chunk-RUP4JMKO.js";
|
|
13
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-OBYMFSWA.js";
|
|
14
14
|
import {
|
|
15
15
|
failOnNetworkRefusal
|
|
16
16
|
} from "./chunk-MHB7IFG7.js";
|
package/js/host.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createAppHandler
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-WCVV4PPS.js";
|
|
4
4
|
import "./chunk-RUP4JMKO.js";
|
|
5
|
-
import "./chunk-
|
|
5
|
+
import "./chunk-OBYMFSWA.js";
|
|
6
6
|
import "./chunk-MHB7IFG7.js";
|
|
7
7
|
import "./chunk-XBG7HHXC.js";
|
|
8
8
|
import "./chunk-3R3KFCDU.js";
|
package/js/mcp/effect.js
CHANGED
|
@@ -2,12 +2,12 @@ import {
|
|
|
2
2
|
mcpClientEffect,
|
|
3
3
|
mcpHealthEffect,
|
|
4
4
|
mcpToolsEffect
|
|
5
|
-
} from "../chunk-
|
|
6
|
-
import "../chunk-
|
|
5
|
+
} from "../chunk-LTF4TLMO.js";
|
|
6
|
+
import "../chunk-G7L5DHQX.js";
|
|
7
7
|
import "../chunk-BCSNKUAC.js";
|
|
8
|
-
import "../chunk-
|
|
8
|
+
import "../chunk-WCVV4PPS.js";
|
|
9
9
|
import "../chunk-RUP4JMKO.js";
|
|
10
|
-
import "../chunk-
|
|
10
|
+
import "../chunk-OBYMFSWA.js";
|
|
11
11
|
import "../chunk-MHB7IFG7.js";
|
|
12
12
|
import "../chunk-XBG7HHXC.js";
|
|
13
13
|
import "../chunk-3R3KFCDU.js";
|
package/js/mcp/stdio.js
CHANGED
|
@@ -3,14 +3,14 @@ import {
|
|
|
3
3
|
answeredError,
|
|
4
4
|
mcpClient,
|
|
5
5
|
mcpJsonSchemaValidator
|
|
6
|
-
} from "../chunk-
|
|
6
|
+
} from "../chunk-G7L5DHQX.js";
|
|
7
7
|
import {
|
|
8
8
|
protocolRouter
|
|
9
|
-
} from "../chunk-
|
|
9
|
+
} from "../chunk-QGHGYH5V.js";
|
|
10
10
|
import "../chunk-BCSNKUAC.js";
|
|
11
|
-
import "../chunk-
|
|
11
|
+
import "../chunk-WCVV4PPS.js";
|
|
12
12
|
import "../chunk-RUP4JMKO.js";
|
|
13
|
-
import "../chunk-
|
|
13
|
+
import "../chunk-OBYMFSWA.js";
|
|
14
14
|
import "../chunk-MHB7IFG7.js";
|
|
15
15
|
import "../chunk-XBG7HHXC.js";
|
|
16
16
|
import "../chunk-3R3KFCDU.js";
|
package/js/mcp.js
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import {
|
|
2
2
|
mcpClientEffect,
|
|
3
3
|
mcpHealthEffect
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-LTF4TLMO.js";
|
|
5
5
|
import {
|
|
6
6
|
catalogCache,
|
|
7
7
|
catalogScope
|
|
8
8
|
} from "./chunk-ECCWT5GJ.js";
|
|
9
9
|
import {
|
|
10
10
|
adaptMcpTool
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-G7L5DHQX.js";
|
|
12
12
|
import {
|
|
13
13
|
protocolOperations
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-QGHGYH5V.js";
|
|
15
15
|
import "./chunk-BCSNKUAC.js";
|
|
16
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-WCVV4PPS.js";
|
|
17
17
|
import {
|
|
18
18
|
cacheKey
|
|
19
19
|
} from "./chunk-RUP4JMKO.js";
|
|
20
20
|
import {
|
|
21
21
|
operationDescription
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-OBYMFSWA.js";
|
|
23
23
|
import "./chunk-MHB7IFG7.js";
|
|
24
24
|
import "./chunk-XBG7HHXC.js";
|
|
25
25
|
import "./chunk-3R3KFCDU.js";
|
package/js/openapi.js
CHANGED
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
import {
|
|
9
9
|
protocolOperations,
|
|
10
10
|
protocolRouter
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-QGHGYH5V.js";
|
|
12
12
|
import {
|
|
13
13
|
OpenapiCompileError,
|
|
14
14
|
OpenapiCompileErrorCode,
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
isOpenapiTextMedia,
|
|
30
30
|
openapiBinaryResultSchema,
|
|
31
31
|
openapiMediaKind
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-OBYMFSWA.js";
|
|
33
33
|
import {
|
|
34
34
|
failOnNetworkRefusal
|
|
35
35
|
} from "./chunk-MHB7IFG7.js";
|
|
@@ -4887,7 +4887,21 @@ var compileOpenApiDocument = (entry, inputDocument, options = {}) => {
|
|
|
4887
4887
|
});
|
|
4888
4888
|
if (request.required) required.push("body");
|
|
4889
4889
|
}
|
|
4890
|
-
const
|
|
4890
|
+
const requirements = operation.security ?? spec.security ?? fallback ?? [];
|
|
4891
|
+
const security = requirements.filter(
|
|
4892
|
+
(requirement) => Object.keys(requirement).every((key) => Object.hasOwn(schemes, key))
|
|
4893
|
+
);
|
|
4894
|
+
if (security.length === 0 && requirements.length > 0) {
|
|
4895
|
+
const undeclared = [
|
|
4896
|
+
...new Set(
|
|
4897
|
+
requirements.flatMap(Object.keys).filter((key) => !Object.hasOwn(schemes, key))
|
|
4898
|
+
)
|
|
4899
|
+
];
|
|
4900
|
+
fail2(
|
|
4901
|
+
"auth_method",
|
|
4902
|
+
`Every security requirement names a scheme securitySchemes does not declare: ${undeclared.map((key) => JSON.stringify(key)).join(", ")}. Declare and fill every scheme in one complete alternative (securitySchemes plus methods or oauth).`
|
|
4903
|
+
);
|
|
4904
|
+
}
|
|
4891
4905
|
for (const requirement of security) {
|
|
4892
4906
|
const keys = Object.keys(requirement).sort();
|
|
4893
4907
|
if (!keys.length) continue;
|
|
@@ -4936,13 +4950,9 @@ var compileOpenApiDocument = (entry, inputDocument, options = {}) => {
|
|
|
4936
4950
|
baseUrl,
|
|
4937
4951
|
openapi: spec.openapi,
|
|
4938
4952
|
securitySchemes: Object.fromEntries(
|
|
4939
|
-
|
|
4940
|
-
key,
|
|
4941
|
-
|
|
4942
|
-
"auth_method",
|
|
4943
|
-
`A security requirement names ${JSON.stringify(key)}, which securitySchemes does not declare.`
|
|
4944
|
-
)
|
|
4945
|
-
])
|
|
4953
|
+
Object.entries(schemes).filter(
|
|
4954
|
+
([key]) => security.some((requirement) => Object.hasOwn(requirement, key))
|
|
4955
|
+
)
|
|
4946
4956
|
),
|
|
4947
4957
|
request: {
|
|
4948
4958
|
parameters: [...parameters.values()].map(({ parameter }) => parameter),
|