apps 0.0.1-beta.66 → 0.0.1-beta.68
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-TZTLGP2Q.js → chunk-2KVS7XBO.js} +2 -2
- package/js/{chunk-KB6RUFDT.js → chunk-3K5SX2M6.js} +5 -5
- package/js/{chunk-MWKHKOTL.js → chunk-4733J7FG.js} +12 -1
- package/js/{chunk-CKVISKCZ.js → chunk-6JN66722.js} +58 -9
- package/js/{chunk-7FCKBNMS.js → chunk-6MJUPGMI.js} +2 -2
- package/js/{chunk-Y4ZPFQH6.js → chunk-ACJPBBNH.js} +3 -3
- package/js/{chunk-AQU56EPI.js → chunk-C47A664A.js} +17 -10
- package/js/{chunk-O2GPP4JT.js → chunk-JGLXI6SU.js} +5 -5
- package/js/{chunk-NRL677QZ.js → chunk-L7ZC6JR4.js} +3 -3
- package/js/{chunk-TLWLJ7PD.js → chunk-M3IIZDHH.js} +3 -1
- package/js/{chunk-T3FPHPJJ.js → chunk-UD4RXDWG.js} +1 -1
- package/js/{chunk-VFGI6XAL.js → chunk-XUG423KM.js} +20 -10
- package/js/{chunk-NSEKTAGP.js → chunk-YAOYLBKS.js} +2 -2
- package/js/contracts.js +2 -2
- package/js/effect.js +9 -9
- package/js/graphql.js +11 -11
- package/js/host.js +9 -9
- package/js/index.js +5 -5
- package/js/mcp/effect.js +11 -11
- package/js/mcp/stdio.js +11 -11
- package/js/mcp.js +13 -13
- package/js/openapi.js +22 -14
- package/js/skills.js +5 -5
- package/package.json +1 -1
- package/runtime.json +1 -1
- package/types/app-cache/src/contracts/cache.d.ts +2 -0
- package/types/apps/src/contracts/sql.d.ts +5 -0
- package/types/apps/src/implementation/upstream-error.d.ts +1 -1
package/js/mcp/effect.js
CHANGED
|
@@ -2,19 +2,19 @@ import {
|
|
|
2
2
|
mcpClientEffect,
|
|
3
3
|
mcpHealthEffect,
|
|
4
4
|
mcpToolsEffect
|
|
5
|
-
} from "../chunk-
|
|
6
|
-
import "../chunk-
|
|
5
|
+
} from "../chunk-3K5SX2M6.js";
|
|
6
|
+
import "../chunk-ACJPBBNH.js";
|
|
7
7
|
import "../chunk-BCSNKUAC.js";
|
|
8
|
-
import "../chunk-
|
|
9
|
-
import "../chunk-
|
|
10
|
-
import "../chunk-
|
|
11
|
-
import "../chunk-
|
|
8
|
+
import "../chunk-6JN66722.js";
|
|
9
|
+
import "../chunk-C47A664A.js";
|
|
10
|
+
import "../chunk-XUG423KM.js";
|
|
11
|
+
import "../chunk-UD4RXDWG.js";
|
|
12
12
|
import "../chunk-XBG7HHXC.js";
|
|
13
|
-
import "../chunk-
|
|
14
|
-
import "../chunk-
|
|
15
|
-
import "../chunk-
|
|
16
|
-
import "../chunk-
|
|
17
|
-
import "../chunk-
|
|
13
|
+
import "../chunk-L7ZC6JR4.js";
|
|
14
|
+
import "../chunk-2KVS7XBO.js";
|
|
15
|
+
import "../chunk-JGLXI6SU.js";
|
|
16
|
+
import "../chunk-M3IIZDHH.js";
|
|
17
|
+
import "../chunk-4733J7FG.js";
|
|
18
18
|
import "../chunk-H72MEDMN.js";
|
|
19
19
|
import "../chunk-KGCTYL2S.js";
|
|
20
20
|
import "../chunk-3CVQ3VPP.js";
|
package/js/mcp/stdio.js
CHANGED
|
@@ -3,24 +3,24 @@ import {
|
|
|
3
3
|
answeredError,
|
|
4
4
|
mcpClient,
|
|
5
5
|
mcpJsonSchemaValidator
|
|
6
|
-
} from "../chunk-
|
|
6
|
+
} from "../chunk-ACJPBBNH.js";
|
|
7
7
|
import {
|
|
8
8
|
protocolRouter
|
|
9
|
-
} from "../chunk-
|
|
9
|
+
} from "../chunk-6MJUPGMI.js";
|
|
10
10
|
import "../chunk-BCSNKUAC.js";
|
|
11
|
-
import "../chunk-
|
|
12
|
-
import "../chunk-
|
|
13
|
-
import "../chunk-
|
|
14
|
-
import "../chunk-
|
|
11
|
+
import "../chunk-6JN66722.js";
|
|
12
|
+
import "../chunk-C47A664A.js";
|
|
13
|
+
import "../chunk-XUG423KM.js";
|
|
14
|
+
import "../chunk-UD4RXDWG.js";
|
|
15
15
|
import "../chunk-XBG7HHXC.js";
|
|
16
|
-
import "../chunk-
|
|
17
|
-
import "../chunk-
|
|
18
|
-
import "../chunk-
|
|
16
|
+
import "../chunk-L7ZC6JR4.js";
|
|
17
|
+
import "../chunk-2KVS7XBO.js";
|
|
18
|
+
import "../chunk-JGLXI6SU.js";
|
|
19
19
|
import {
|
|
20
20
|
McpError,
|
|
21
21
|
ProcessConfig
|
|
22
|
-
} from "../chunk-
|
|
23
|
-
import "../chunk-
|
|
22
|
+
} from "../chunk-M3IIZDHH.js";
|
|
23
|
+
import "../chunk-4733J7FG.js";
|
|
24
24
|
import "../chunk-H72MEDMN.js";
|
|
25
25
|
import "../chunk-KGCTYL2S.js";
|
|
26
26
|
import {
|
package/js/mcp.js
CHANGED
|
@@ -1,44 +1,44 @@
|
|
|
1
1
|
import {
|
|
2
2
|
mcpClientEffect,
|
|
3
3
|
mcpHealthEffect
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-3K5SX2M6.js";
|
|
5
5
|
import {
|
|
6
6
|
catalogCache,
|
|
7
7
|
catalogScope
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-YAOYLBKS.js";
|
|
9
9
|
import {
|
|
10
10
|
adaptMcpTool
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-ACJPBBNH.js";
|
|
12
12
|
import {
|
|
13
13
|
protocolOperations
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-6MJUPGMI.js";
|
|
15
15
|
import "./chunk-BCSNKUAC.js";
|
|
16
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-6JN66722.js";
|
|
17
17
|
import {
|
|
18
18
|
cacheKey
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-C47A664A.js";
|
|
20
20
|
import {
|
|
21
21
|
operationDescription
|
|
22
|
-
} from "./chunk-
|
|
23
|
-
import "./chunk-
|
|
22
|
+
} from "./chunk-XUG423KM.js";
|
|
23
|
+
import "./chunk-UD4RXDWG.js";
|
|
24
24
|
import "./chunk-XBG7HHXC.js";
|
|
25
|
-
import "./chunk-
|
|
25
|
+
import "./chunk-L7ZC6JR4.js";
|
|
26
26
|
import {
|
|
27
27
|
nativeOperation,
|
|
28
28
|
routerDeclaration
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-2KVS7XBO.js";
|
|
30
30
|
import {
|
|
31
31
|
fromPromise,
|
|
32
32
|
method
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-JGLXI6SU.js";
|
|
34
34
|
import {
|
|
35
35
|
McpCredentialsUnverified,
|
|
36
36
|
McpError,
|
|
37
37
|
McpServerHeader,
|
|
38
38
|
McpToolMetadata,
|
|
39
39
|
McpToolsOptions
|
|
40
|
-
} from "./chunk-
|
|
41
|
-
import "./chunk-
|
|
40
|
+
} from "./chunk-M3IIZDHH.js";
|
|
41
|
+
import "./chunk-4733J7FG.js";
|
|
42
42
|
import "./chunk-H72MEDMN.js";
|
|
43
43
|
import "./chunk-KGCTYL2S.js";
|
|
44
44
|
import "./chunk-3CVQ3VPP.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-6MJUPGMI.js";
|
|
12
12
|
import {
|
|
13
13
|
OpenapiCompileError,
|
|
14
14
|
OpenapiCompileErrorCode,
|
|
@@ -29,34 +29,36 @@ import {
|
|
|
29
29
|
isOpenapiTextMedia,
|
|
30
30
|
openapiBinaryResultSchema,
|
|
31
31
|
openapiMediaKind
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-XUG423KM.js";
|
|
33
33
|
import {
|
|
34
34
|
failOnNetworkRefusal
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-UD4RXDWG.js";
|
|
36
36
|
import "./chunk-XBG7HHXC.js";
|
|
37
37
|
import {
|
|
38
38
|
nativeOperation,
|
|
39
39
|
routerDeclaration
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-2KVS7XBO.js";
|
|
41
41
|
import {
|
|
42
42
|
accountProviderError,
|
|
43
|
+
bodyUpstreamError,
|
|
43
44
|
fromPromise,
|
|
44
45
|
httpProviderError,
|
|
45
46
|
method,
|
|
47
|
+
providerErrorDetail,
|
|
46
48
|
toPromise
|
|
47
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-JGLXI6SU.js";
|
|
48
50
|
import {
|
|
49
51
|
ApiErrorRecovery,
|
|
50
52
|
ApiErrorResponse,
|
|
51
53
|
OpenapiResponseError,
|
|
52
54
|
RouterMeta,
|
|
53
55
|
defaultOpenapiErrorLimits
|
|
54
|
-
} from "./chunk-
|
|
56
|
+
} from "./chunk-M3IIZDHH.js";
|
|
55
57
|
import {
|
|
56
58
|
NetworkRefused,
|
|
57
59
|
ProviderError,
|
|
58
60
|
cacheLimits
|
|
59
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-4733J7FG.js";
|
|
60
62
|
import "./chunk-H72MEDMN.js";
|
|
61
63
|
import {
|
|
62
64
|
jsonSchema,
|
|
@@ -112,16 +114,15 @@ var responseShape = (response) => {
|
|
|
112
114
|
};
|
|
113
115
|
};
|
|
114
116
|
var bodyRecovery = Schema_exports.decodeUnknownOption(Schema_exports.Struct({ recovery: ApiErrorRecovery }));
|
|
115
|
-
function
|
|
117
|
+
function errorBody(response) {
|
|
116
118
|
return Effect_exports.gen(function* () {
|
|
117
|
-
|
|
118
|
-
if (candidates.length === 0 || !/^application\/(?:[\w.-]+\+)?json$/i.test(
|
|
119
|
+
if (!/^application\/(?:[\w.-]+\+)?json$/i.test(
|
|
119
120
|
response.headers["content-type"]?.split(";")[0]?.trim() ?? ""
|
|
120
121
|
))
|
|
121
122
|
return;
|
|
122
123
|
const length = response.headers["content-length"];
|
|
123
124
|
if (length !== void 0 && Number(length) > defaultOpenapiErrorLimits.maxBodyBytes) return;
|
|
124
|
-
|
|
125
|
+
return yield* response.stream.pipe(
|
|
125
126
|
Stream_exports.mapError(() => new OpenapiError({ reason: "request", status: response.status })),
|
|
126
127
|
Stream_exports.limitBytes(
|
|
127
128
|
defaultOpenapiErrorLimits.maxBodyBytes,
|
|
@@ -132,6 +133,11 @@ function responseError(response, errors) {
|
|
|
132
133
|
Effect_exports.flatMap(Schema_exports.decodeUnknownEffect(Schema_exports.fromJsonString(Schema_exports.Json))),
|
|
133
134
|
Effect_exports.timeout(defaultOpenapiErrorLimits.readTimeoutMs)
|
|
134
135
|
);
|
|
136
|
+
}).pipe(Effect_exports.catch(() => Effect_exports.succeed(void 0)));
|
|
137
|
+
}
|
|
138
|
+
function responseError(status, json, errors) {
|
|
139
|
+
return Effect_exports.gen(function* () {
|
|
140
|
+
const candidates = errors.filter((error) => error.status === status);
|
|
135
141
|
for (const candidate of candidates) {
|
|
136
142
|
const parsed = yield* Schema_exports.decodeUnknownEffect(candidate.decoder)(json).pipe(Effect_exports.option);
|
|
137
143
|
if (Option_exports.isSome(parsed)) {
|
|
@@ -142,7 +148,7 @@ function responseError(response, errors) {
|
|
|
142
148
|
const recovery = bodyRecovery(parsed.value);
|
|
143
149
|
return new OpenapiResponseError({
|
|
144
150
|
code: candidate.code,
|
|
145
|
-
status
|
|
151
|
+
status,
|
|
146
152
|
message: message.value.message,
|
|
147
153
|
...Option_exports.isSome(recovery) ? { recovery: recovery.value.recovery } : {}
|
|
148
154
|
});
|
|
@@ -368,8 +374,10 @@ function createRequest(config) {
|
|
|
368
374
|
if (response.status < 200 || response.status >= 300) {
|
|
369
375
|
const provider = httpProviderError(response.status, response.headers);
|
|
370
376
|
if (provider !== void 0 && provider.reason !== "rejected") return yield* provider;
|
|
371
|
-
const
|
|
372
|
-
|
|
377
|
+
const json = provider !== void 0 || errors.some((error) => error.status === response.status) ? yield* errorBody(response) : void 0;
|
|
378
|
+
const declared = json === void 0 ? void 0 : yield* responseError(response.status, json, errors);
|
|
379
|
+
const upstream = json === void 0 ? void 0 : bodyUpstreamError(json);
|
|
380
|
+
return yield* declared ?? (provider === void 0 || upstream === void 0 ? provider : providerErrorDetail(provider, { upstream })) ?? new OpenapiError({ reason: "request", operation, ...responseShape(response) });
|
|
373
381
|
}
|
|
374
382
|
if (response.status === 204 || prepared.method === "HEAD") return null;
|
|
375
383
|
const unreadable = new OpenapiError({
|
package/js/skills.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
catalogCache,
|
|
3
3
|
catalogScope
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-YAOYLBKS.js";
|
|
5
|
+
import "./chunk-C47A664A.js";
|
|
6
6
|
import {
|
|
7
7
|
failOnNetworkRefusal
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-UD4RXDWG.js";
|
|
9
9
|
import {
|
|
10
10
|
folderSkillsEffect,
|
|
11
11
|
skillFromFiles
|
|
@@ -16,12 +16,12 @@ import {
|
|
|
16
16
|
httpProviderError,
|
|
17
17
|
method,
|
|
18
18
|
toPromise
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-JGLXI6SU.js";
|
|
20
20
|
import {
|
|
21
21
|
NetworkRefused,
|
|
22
22
|
ProviderError,
|
|
23
23
|
networkRefusalStatus
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-4733J7FG.js";
|
|
25
25
|
import {
|
|
26
26
|
AppSkillMetadata,
|
|
27
27
|
AppSkillSource,
|