apps 0.0.1-beta.21 → 0.0.1-beta.22
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-VXWY44LE.js → chunk-2KZ7GG43.js} +3 -3
- package/js/{chunk-CHAK4P5C.js → chunk-3HH4OZR3.js} +5 -5
- package/js/{chunk-4QQ62BVS.js → chunk-66JAEDTE.js} +5 -2
- package/js/{chunk-XNCYIB4D.js → chunk-A5BSZKFF.js} +3 -3
- package/js/{chunk-OZ4UK3CD.js → chunk-AK54RD3A.js} +1 -1
- package/js/{chunk-BLI53LPN.js → chunk-B3T7CZOH.js} +64 -17
- package/js/{chunk-RAAPJMVZ.js → chunk-JWNSH5CA.js} +4 -3
- package/js/{chunk-CMRKLZZY.js → chunk-K2QATKIF.js} +2 -2
- package/js/{chunk-NMKHTJOQ.js → chunk-S47NFEWF.js} +2 -2
- package/js/{chunk-625MBYU4.js → chunk-WFEUCUFF.js} +4 -3
- package/js/client.js +1 -1
- package/js/contracts.js +1 -1
- package/js/effect.js +6 -6
- package/js/graphql.js +8 -8
- package/js/host.js +6 -6
- package/js/index.js +17 -11
- package/js/mcp/effect.js +8 -8
- package/js/mcp/stdio.js +8 -8
- package/js/mcp.js +38 -25
- package/js/openapi.js +5 -5
- package/js/skills.js +2 -2
- package/package.json +1 -1
- package/runtime.json +1 -1
- package/types/apps/src/contracts/mcp.d.ts +18 -7
- package/types/apps/src/contracts/operations.d.ts +5 -1
- package/types/apps/src/implementation/mcp-call.d.ts +3 -3
- package/types/apps/src/implementation/mcp-client.d.ts +3 -3
- package/types/apps/src/implementation/mcp.d.ts +3 -3
- package/types/apps/src/implementation/protocol-operations.d.ts +3 -0
- package/types/apps/src/implementation/schema.d.ts +8 -0
|
@@ -137,9 +137,9 @@ var McpToolsOptions = Schema_exports.Struct({
|
|
|
137
137
|
});
|
|
138
138
|
var McpToolResult = Schema_exports.Struct({
|
|
139
139
|
content: Schema_exports.Array(JsonObject2),
|
|
140
|
-
structuredContent: Schema_exports.
|
|
141
|
-
isError: Schema_exports.
|
|
142
|
-
_meta: Schema_exports.
|
|
140
|
+
structuredContent: Schema_exports.optionalKey(JsonObject2),
|
|
141
|
+
isError: Schema_exports.optionalKey(Schema_exports.Boolean),
|
|
142
|
+
_meta: Schema_exports.optionalKey(JsonObject2)
|
|
143
143
|
});
|
|
144
144
|
var McpToolMetadata = Schema_exports.Struct({
|
|
145
145
|
name: Schema_exports.String,
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
failureDetail,
|
|
9
9
|
readCatalog,
|
|
10
10
|
routerSkills
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-WFEUCUFF.js";
|
|
12
12
|
import {
|
|
13
13
|
folderSkillsEffect
|
|
14
14
|
} from "./chunk-IPI4MFSN.js";
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
isApp,
|
|
19
19
|
toEffectApp,
|
|
20
20
|
unavailableStorage
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-A5BSZKFF.js";
|
|
22
22
|
import {
|
|
23
23
|
parseDatabaseSchema
|
|
24
24
|
} from "./chunk-ZQINWV4W.js";
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
locate,
|
|
29
29
|
nativeOperation,
|
|
30
30
|
toPromise
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-S47NFEWF.js";
|
|
32
32
|
import {
|
|
33
33
|
accountProviderError,
|
|
34
34
|
httpProviderError,
|
|
@@ -81,7 +81,7 @@ import {
|
|
|
81
81
|
defaultWebhookTransportLimits,
|
|
82
82
|
maxInputProblems,
|
|
83
83
|
workflowDurationMillis
|
|
84
|
-
} from "./chunk-
|
|
84
|
+
} from "./chunk-2KZ7GG43.js";
|
|
85
85
|
import {
|
|
86
86
|
CacheError
|
|
87
87
|
} from "./chunk-R3EV5FTO.js";
|
|
@@ -99,7 +99,7 @@ import {
|
|
|
99
99
|
importedJsonSchema,
|
|
100
100
|
jsonSchemaDecoder,
|
|
101
101
|
jsonSchemaDocument
|
|
102
|
-
} from "./chunk-
|
|
102
|
+
} from "./chunk-66JAEDTE.js";
|
|
103
103
|
import {
|
|
104
104
|
JsonObject,
|
|
105
105
|
JsonValue
|
|
@@ -1352,7 +1352,7 @@ var compileJsonSchemaDecoder = (document) => Effect_exports.gen(function* () {
|
|
|
1352
1352
|
);
|
|
1353
1353
|
return Object.assign(decoder, { [ImportedJsonSchema]: document });
|
|
1354
1354
|
});
|
|
1355
|
-
var
|
|
1355
|
+
var lazyCompiledDecoder = (document) => {
|
|
1356
1356
|
const read = once(document);
|
|
1357
1357
|
let compiled;
|
|
1358
1358
|
const compile = Effect_exports.suspend(
|
|
@@ -1372,9 +1372,11 @@ var lazyDecoder = (document) => {
|
|
|
1372
1372
|
Effect_exports.flatMap((schema) => SchemaParser_exports.decodeUnknownEffect(schema)(input, options))
|
|
1373
1373
|
)
|
|
1374
1374
|
);
|
|
1375
|
-
return withLazyJsonSchemaDocument(decoder, read);
|
|
1375
|
+
return { decoder: withLazyJsonSchemaDocument(decoder, read), compile };
|
|
1376
1376
|
};
|
|
1377
|
+
var lazyDecoder = (document) => lazyCompiledDecoder(document).decoder;
|
|
1377
1378
|
var lazyJsonSchemaDecoder = (document) => Effect_exports.sync(() => lazyDecoder(document));
|
|
1379
|
+
var preparedJsonSchemaDecoder = (document) => lazyCompiledDecoder(() => document);
|
|
1378
1380
|
var isJsonValue = Schema_exports.is(Schema_exports.Json);
|
|
1379
1381
|
var jsonDocument = (input) => {
|
|
1380
1382
|
if (typeof input !== "object" || input === null || Array.isArray(input)) return void 0;
|
|
@@ -1440,6 +1442,7 @@ export {
|
|
|
1440
1442
|
nestJsonSchema,
|
|
1441
1443
|
compileJsonSchemaDecoder,
|
|
1442
1444
|
lazyJsonSchemaDecoder,
|
|
1445
|
+
preparedJsonSchemaDecoder,
|
|
1443
1446
|
jsonSchemaDecoder,
|
|
1444
1447
|
jsonSchema,
|
|
1445
1448
|
storageFieldOf,
|
|
@@ -6,10 +6,10 @@ import {
|
|
|
6
6
|
fromPromise,
|
|
7
7
|
nativeOperation,
|
|
8
8
|
nativeRouter
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-S47NFEWF.js";
|
|
10
10
|
import {
|
|
11
11
|
ScheduleTiming
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-2KZ7GG43.js";
|
|
13
13
|
import {
|
|
14
14
|
DatabaseSchema
|
|
15
15
|
} from "./chunk-N7YDVXYJ.js";
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
decoderOf,
|
|
18
18
|
isSchema,
|
|
19
19
|
storageFieldOf
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-66JAEDTE.js";
|
|
21
21
|
import {
|
|
22
22
|
AppStorageUnavailable
|
|
23
23
|
} from "./chunk-PZB6T6KU.js";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
prepareElicitation
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-3HH4OZR3.js";
|
|
4
4
|
import {
|
|
5
5
|
fromPromise
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-S47NFEWF.js";
|
|
7
7
|
import {
|
|
8
8
|
ElicitationFailed,
|
|
9
9
|
McpError,
|
|
@@ -15,11 +15,12 @@ import {
|
|
|
15
15
|
defaultElicitationLimits,
|
|
16
16
|
defaultMcpClientLimits,
|
|
17
17
|
mcpSdkTimerCeilingMs
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-2KZ7GG43.js";
|
|
19
19
|
import {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
jsonSchemaDecoder,
|
|
21
|
+
nestJsonSchema,
|
|
22
|
+
preparedJsonSchemaDecoder
|
|
23
|
+
} from "./chunk-66JAEDTE.js";
|
|
23
24
|
import {
|
|
24
25
|
JsonObject
|
|
25
26
|
} from "./chunk-27F7W2LG.js";
|
|
@@ -34,26 +35,76 @@ import {
|
|
|
34
35
|
} from "./chunk-CDL5PM2Q.js";
|
|
35
36
|
|
|
36
37
|
// src/implementation/mcp-tools.ts
|
|
38
|
+
var resultFields = {
|
|
39
|
+
content: { type: "array", items: { type: "object" } },
|
|
40
|
+
structuredContent: { type: "object" },
|
|
41
|
+
isError: { type: "boolean" },
|
|
42
|
+
_meta: { type: "object" }
|
|
43
|
+
};
|
|
44
|
+
var definitionReference = /^#\/(?:\$defs|definitions)\/[^/]+$/;
|
|
45
|
+
var locating = /* @__PURE__ */ new Set(["$id", "$anchor", "$dynamicAnchor", "$recursiveAnchor"]);
|
|
46
|
+
var onlyDefinitionReferences = (value) => Array.isArray(value) ? value.every(onlyDefinitionReferences) : value === null || typeof value !== "object" ? true : Object.entries(value).every(
|
|
47
|
+
([key, item]) => locating.has(key) || key === "$dynamicRef" || key === "$recursiveRef" ? false : key === "$ref" ? typeof item === "string" && definitionReference.test(item) : onlyDefinitionReferences(item)
|
|
48
|
+
);
|
|
49
|
+
var placed = (structuredContent, pointer) => {
|
|
50
|
+
if (onlyDefinitionReferences(structuredContent)) {
|
|
51
|
+
const { $defs, definitions, $schema: _draft, ...schema } = structuredContent;
|
|
52
|
+
return {
|
|
53
|
+
schema,
|
|
54
|
+
root: {
|
|
55
|
+
...$defs === void 0 ? {} : { $defs },
|
|
56
|
+
...definitions === void 0 ? {} : { definitions }
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
try {
|
|
61
|
+
return { schema: nestJsonSchema(structuredContent, pointer), root: {} };
|
|
62
|
+
} catch {
|
|
63
|
+
return { schema: structuredContent, root: {} };
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
var resultSchema = (structuredContent) => {
|
|
67
|
+
if (structuredContent === void 0)
|
|
68
|
+
return { type: "object", properties: resultFields, required: ["content"] };
|
|
69
|
+
const { schema, root } = placed(structuredContent, "#/anyOf/0/properties/structuredContent");
|
|
70
|
+
return {
|
|
71
|
+
// The envelope's keywords mean the same in every draft, so the server's draft applies.
|
|
72
|
+
...structuredContent.$schema === void 0 ? {} : { $schema: structuredContent.$schema },
|
|
73
|
+
...root,
|
|
74
|
+
anyOf: [
|
|
75
|
+
{
|
|
76
|
+
type: "object",
|
|
77
|
+
properties: { ...resultFields, structuredContent: schema, isError: { const: false } },
|
|
78
|
+
required: ["content", "structuredContent"]
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
type: "object",
|
|
82
|
+
properties: { ...resultFields, isError: { const: true } },
|
|
83
|
+
required: ["content", "isError"]
|
|
84
|
+
}
|
|
85
|
+
]
|
|
86
|
+
};
|
|
87
|
+
};
|
|
37
88
|
var adaptMcpTool = (client, tool) => Effect_exports.gen(function* () {
|
|
38
89
|
const decoder = yield* jsonSchemaDecoder(tool.inputSchema).pipe(
|
|
39
90
|
Effect_exports.mapError(() => new McpError({ phase: "schema", reason: "invalid_response" }))
|
|
40
91
|
);
|
|
41
|
-
const output = tool.outputSchema
|
|
42
|
-
|
|
43
|
-
Effect_exports.mapError(() => new McpError({ phase: "schema", reason: "invalid_response" }))
|
|
44
|
-
)
|
|
45
|
-
);
|
|
92
|
+
const output = preparedJsonSchemaDecoder(resultSchema(tool.outputSchema));
|
|
93
|
+
const { outputSchema: _upstream, ...metadata } = tool;
|
|
46
94
|
const adapted = {
|
|
47
|
-
...
|
|
95
|
+
...metadata,
|
|
48
96
|
description: tool.description ?? tool.title ?? tool.name,
|
|
49
97
|
input: decoder,
|
|
98
|
+
output: output.decoder,
|
|
50
99
|
...tool.annotations?.readOnlyHint === void 0 ? {} : { readOnly: tool.annotations.readOnlyHint },
|
|
51
100
|
run: (context, input) => Effect_exports.gen(function* () {
|
|
52
101
|
const arguments_ = yield* Schema_exports.decodeUnknownEffect(decoder)(input).pipe(
|
|
53
102
|
Effect_exports.flatMap(Schema_exports.decodeUnknownEffect(JsonObject)),
|
|
54
103
|
Effect_exports.mapError(() => new McpError({ phase: "call", reason: "invalid_input" }))
|
|
55
104
|
);
|
|
56
|
-
|
|
105
|
+
yield* output.compile.pipe(
|
|
106
|
+
Effect_exports.mapError(() => new McpError({ phase: "schema", reason: "invalid_response" }))
|
|
107
|
+
);
|
|
57
108
|
const result = yield* client.call(tool.name, arguments_, context);
|
|
58
109
|
if (result.isError === true) {
|
|
59
110
|
(yield* ToolResultObservation).failed();
|
|
@@ -62,10 +113,6 @@ var adaptMcpTool = (client, tool) => Effect_exports.gen(function* () {
|
|
|
62
113
|
"error.type": "McpToolError"
|
|
63
114
|
});
|
|
64
115
|
}
|
|
65
|
-
if (outputDecoder !== void 0 && !result.isError)
|
|
66
|
-
yield* Schema_exports.decodeUnknownEffect(outputDecoder)(result.structuredContent).pipe(
|
|
67
|
-
Effect_exports.mapError(() => new McpError({ phase: "call", reason: "invalid_response" }))
|
|
68
|
-
);
|
|
69
116
|
return result;
|
|
70
117
|
})
|
|
71
118
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
fixedRouter
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-WFEUCUFF.js";
|
|
4
4
|
import {
|
|
5
5
|
nativeOperation,
|
|
6
6
|
operationDeclaration,
|
|
7
7
|
routerDeclaration
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-S47NFEWF.js";
|
|
9
9
|
|
|
10
10
|
// src/implementation/protocol-operations.ts
|
|
11
11
|
var protocolOperations = (operations, kinds = {}) => {
|
|
@@ -18,10 +18,11 @@ var protocolOperations = (operations, kinds = {}) => {
|
|
|
18
18
|
...operation.annotations === void 0 ? {} : { annotations: operation.annotations },
|
|
19
19
|
...operation._meta === void 0 ? {} : { _meta: operation._meta },
|
|
20
20
|
input: operation.input,
|
|
21
|
+
...operation.output === void 0 ? {} : { output: operation.output },
|
|
21
22
|
run: operation.run
|
|
22
23
|
};
|
|
23
24
|
const output = Object.getOwnPropertyDescriptor(operation, "outputSchema");
|
|
24
|
-
const withOutput = (target) => output === void 0 || output.get === void 0 && output.value === void 0 ? target : Object.defineProperty(target, "outputSchema", { ...output, enumerable: true });
|
|
25
|
+
const withOutput = (target) => operation.output !== void 0 || output === void 0 || output.get === void 0 && output.value === void 0 ? target : Object.defineProperty(target, "outputSchema", { ...output, enumerable: true });
|
|
25
26
|
declared[name] = operationDeclaration(withOutput({ ...native, kind }));
|
|
26
27
|
}
|
|
27
28
|
return declared;
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
adaptMcpTools,
|
|
3
3
|
mcpClient,
|
|
4
4
|
mcpJsonSchemaValidator
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-B3T7CZOH.js";
|
|
6
6
|
import {
|
|
7
7
|
accountProviderError,
|
|
8
8
|
httpProviderError
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
McpError,
|
|
12
12
|
McpToolsOptions,
|
|
13
13
|
defaultMcpClientLimits
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-2KZ7GG43.js";
|
|
15
15
|
import {
|
|
16
16
|
ProviderError
|
|
17
17
|
} from "./chunk-R3EV5FTO.js";
|
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
RouterKey,
|
|
4
4
|
RouterMeta,
|
|
5
5
|
reservedRouterKeys
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-2KZ7GG43.js";
|
|
7
7
|
import {
|
|
8
8
|
decoderOf
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-66JAEDTE.js";
|
|
10
10
|
import {
|
|
11
11
|
Effect_exports,
|
|
12
12
|
Schema_exports
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
joinPath,
|
|
6
6
|
mergeMeta
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-S47NFEWF.js";
|
|
8
8
|
import {
|
|
9
9
|
parseProviderError
|
|
10
10
|
} from "./chunk-MKWZPDR6.js";
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
HostedToolSummary,
|
|
18
18
|
McpError,
|
|
19
19
|
maxFailureMessageLength
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-2KZ7GG43.js";
|
|
21
21
|
import {
|
|
22
22
|
AppDatabaseError
|
|
23
23
|
} from "./chunk-N7YDVXYJ.js";
|
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
} from "./chunk-JU7VHODU.js";
|
|
31
31
|
import {
|
|
32
32
|
jsonSchemaDocument
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-66JAEDTE.js";
|
|
34
34
|
import {
|
|
35
35
|
AppStorageError,
|
|
36
36
|
AppStorageUnavailable
|
|
@@ -518,6 +518,7 @@ export {
|
|
|
518
518
|
boundFailureMessage,
|
|
519
519
|
describeFailure,
|
|
520
520
|
failureDetail,
|
|
521
|
+
operationDescription,
|
|
521
522
|
fixedRouter,
|
|
522
523
|
readCatalog,
|
|
523
524
|
routerSkills
|
package/js/client.js
CHANGED
package/js/contracts.js
CHANGED
package/js/effect.js
CHANGED
|
@@ -3,17 +3,17 @@ import {
|
|
|
3
3
|
ApprovalDecision,
|
|
4
4
|
createAppHandler,
|
|
5
5
|
prepareElicitation
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-3HH4OZR3.js";
|
|
7
7
|
import "./chunk-NKLWZJLE.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-WFEUCUFF.js";
|
|
9
9
|
import "./chunk-IPI4MFSN.js";
|
|
10
|
-
import "./chunk-
|
|
10
|
+
import "./chunk-A5BSZKFF.js";
|
|
11
11
|
import "./chunk-ZQINWV4W.js";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-S47NFEWF.js";
|
|
13
13
|
import "./chunk-MKWZPDR6.js";
|
|
14
14
|
import {
|
|
15
15
|
ToolAnnotations
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-2KZ7GG43.js";
|
|
17
17
|
import "./chunk-N7YDVXYJ.js";
|
|
18
18
|
import "./chunk-R3EV5FTO.js";
|
|
19
19
|
import "./chunk-JU7VHODU.js";
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
decoderOf,
|
|
26
26
|
jsonSchemaDecoder,
|
|
27
27
|
wrap
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-66JAEDTE.js";
|
|
29
29
|
import "./chunk-PZB6T6KU.js";
|
|
30
30
|
import {
|
|
31
31
|
HttpUrl,
|
package/js/graphql.js
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
import {
|
|
2
2
|
catalogCache,
|
|
3
3
|
catalogScope
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-AK54RD3A.js";
|
|
5
5
|
import {
|
|
6
6
|
protocolOperations
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-JWNSH5CA.js";
|
|
8
8
|
import "./chunk-BCSNKUAC.js";
|
|
9
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-3HH4OZR3.js";
|
|
10
10
|
import {
|
|
11
11
|
cacheKey
|
|
12
12
|
} from "./chunk-NKLWZJLE.js";
|
|
13
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-WFEUCUFF.js";
|
|
14
14
|
import "./chunk-IPI4MFSN.js";
|
|
15
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-A5BSZKFF.js";
|
|
16
16
|
import "./chunk-ZQINWV4W.js";
|
|
17
17
|
import {
|
|
18
18
|
nativeOperation,
|
|
19
19
|
routerDeclaration
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-S47NFEWF.js";
|
|
21
21
|
import {
|
|
22
22
|
accountProviderError,
|
|
23
23
|
graphqlProviderError,
|
|
24
24
|
httpProviderError
|
|
25
25
|
} from "./chunk-MKWZPDR6.js";
|
|
26
|
-
import "./chunk-
|
|
26
|
+
import "./chunk-2KZ7GG43.js";
|
|
27
27
|
import "./chunk-N7YDVXYJ.js";
|
|
28
28
|
import {
|
|
29
29
|
ProviderError
|
|
@@ -39,7 +39,7 @@ import {
|
|
|
39
39
|
} from "./chunk-UK573G7W.js";
|
|
40
40
|
import {
|
|
41
41
|
jsonSchemaDecoder
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-66JAEDTE.js";
|
|
43
43
|
import "./chunk-PZB6T6KU.js";
|
|
44
44
|
import {
|
|
45
45
|
AccountId,
|
package/js/host.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createAppHandler
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-3HH4OZR3.js";
|
|
4
4
|
import "./chunk-NKLWZJLE.js";
|
|
5
|
-
import "./chunk-
|
|
5
|
+
import "./chunk-WFEUCUFF.js";
|
|
6
6
|
import "./chunk-IPI4MFSN.js";
|
|
7
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-A5BSZKFF.js";
|
|
8
8
|
import "./chunk-ZQINWV4W.js";
|
|
9
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-S47NFEWF.js";
|
|
10
10
|
import "./chunk-MKWZPDR6.js";
|
|
11
11
|
import {
|
|
12
12
|
ElicitationFailed,
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
WorkflowRun,
|
|
22
22
|
WorkflowRunId,
|
|
23
23
|
WorkflowRunPage
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-2KZ7GG43.js";
|
|
25
25
|
import "./chunk-N7YDVXYJ.js";
|
|
26
26
|
import {
|
|
27
27
|
CacheCommand,
|
|
@@ -35,7 +35,7 @@ import {
|
|
|
35
35
|
} from "./chunk-ODEIDRGW.js";
|
|
36
36
|
import "./chunk-57RKNWL2.js";
|
|
37
37
|
import "./chunk-UK573G7W.js";
|
|
38
|
-
import "./chunk-
|
|
38
|
+
import "./chunk-66JAEDTE.js";
|
|
39
39
|
import "./chunk-PZB6T6KU.js";
|
|
40
40
|
import "./chunk-27F7W2LG.js";
|
|
41
41
|
import {
|
package/js/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
defineDatabase,
|
|
6
6
|
table,
|
|
7
7
|
workflow
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-A5BSZKFF.js";
|
|
9
9
|
import "./chunk-ZQINWV4W.js";
|
|
10
10
|
import {
|
|
11
11
|
dynamicRouter,
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
toolAnnotations,
|
|
21
21
|
withApproval,
|
|
22
22
|
withApprovals
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-S47NFEWF.js";
|
|
24
24
|
import {
|
|
25
25
|
accountProviderError
|
|
26
26
|
} from "./chunk-MKWZPDR6.js";
|
|
@@ -38,7 +38,7 @@ import {
|
|
|
38
38
|
ScheduleTiming,
|
|
39
39
|
SecretsMethod,
|
|
40
40
|
WorkflowFailure
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-2KZ7GG43.js";
|
|
42
42
|
import "./chunk-N7YDVXYJ.js";
|
|
43
43
|
import {
|
|
44
44
|
CacheError,
|
|
@@ -68,7 +68,7 @@ import {
|
|
|
68
68
|
userId,
|
|
69
69
|
withLazyJsonSchemaDocument,
|
|
70
70
|
wrap
|
|
71
|
-
} from "./chunk-
|
|
71
|
+
} from "./chunk-66JAEDTE.js";
|
|
72
72
|
import "./chunk-PZB6T6KU.js";
|
|
73
73
|
import {
|
|
74
74
|
JsonObject,
|
|
@@ -107,16 +107,18 @@ var defineProvider = ({
|
|
|
107
107
|
};
|
|
108
108
|
|
|
109
109
|
// src/implementation/account-router.ts
|
|
110
|
-
var
|
|
111
|
-
const imported = importedJsonSchema(
|
|
110
|
+
var decoderDocument = (decoder) => {
|
|
111
|
+
const imported = importedJsonSchema(decoder);
|
|
112
112
|
if (imported !== void 0) return Schema_exports.decodeUnknownSync(JsonObject)(imported);
|
|
113
|
-
const document = Schema_exports.toJsonSchemaDocument(
|
|
113
|
+
const document = Schema_exports.toJsonSchemaDocument(decoder);
|
|
114
114
|
return Schema_exports.decodeUnknownSync(JsonObject)({ ...document.schema, $defs: document.definitions });
|
|
115
115
|
};
|
|
116
116
|
var declaresOutput = (operation) => {
|
|
117
|
+
if (operation.output !== void 0) return true;
|
|
117
118
|
const property = Object.getOwnPropertyDescriptor(operation, "outputSchema");
|
|
118
119
|
return property !== void 0 && (property.get !== void 0 || property.value !== void 0);
|
|
119
120
|
};
|
|
121
|
+
var outputDocument = (operation) => operation.output === void 0 ? operation.outputSchema : decoderDocument(operation.output);
|
|
120
122
|
var combineOperation = (accounts) => {
|
|
121
123
|
const variants = [...accounts.values()];
|
|
122
124
|
const first = variants[0];
|
|
@@ -139,7 +141,10 @@ var combineOperation = (accounts) => {
|
|
|
139
141
|
type: "object",
|
|
140
142
|
properties: {
|
|
141
143
|
accountId: { type: "string", const: accountId },
|
|
142
|
-
input: nestJsonSchema(
|
|
144
|
+
input: nestJsonSchema(
|
|
145
|
+
decoderDocument(operation.input),
|
|
146
|
+
`#/anyOf/${index}/properties/input`
|
|
147
|
+
)
|
|
143
148
|
},
|
|
144
149
|
required: ["accountId", "input"]
|
|
145
150
|
}))
|
|
@@ -169,9 +174,10 @@ var combineOperation = (accounts) => {
|
|
|
169
174
|
});
|
|
170
175
|
if (variants.every(declaresOutput)) {
|
|
171
176
|
const outputSchema = once(() => ({
|
|
172
|
-
anyOf: variants.flatMap(
|
|
173
|
-
|
|
174
|
-
|
|
177
|
+
anyOf: variants.flatMap((operation) => {
|
|
178
|
+
const output = outputDocument(operation);
|
|
179
|
+
return output === void 0 ? [] : [output];
|
|
180
|
+
}).map((output, index) => nestJsonSchema(output, `#/anyOf/${index}`))
|
|
175
181
|
}));
|
|
176
182
|
const native2 = nativeOperation(declaration2);
|
|
177
183
|
if (native2 !== void 0)
|
package/js/mcp/effect.js
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import {
|
|
2
2
|
mcpClientEffect,
|
|
3
3
|
mcpToolsEffect
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-K2QATKIF.js";
|
|
5
|
+
import "../chunk-B3T7CZOH.js";
|
|
6
6
|
import "../chunk-BCSNKUAC.js";
|
|
7
|
-
import "../chunk-
|
|
7
|
+
import "../chunk-3HH4OZR3.js";
|
|
8
8
|
import "../chunk-NKLWZJLE.js";
|
|
9
|
-
import "../chunk-
|
|
9
|
+
import "../chunk-WFEUCUFF.js";
|
|
10
10
|
import "../chunk-IPI4MFSN.js";
|
|
11
|
-
import "../chunk-
|
|
11
|
+
import "../chunk-A5BSZKFF.js";
|
|
12
12
|
import "../chunk-ZQINWV4W.js";
|
|
13
|
-
import "../chunk-
|
|
13
|
+
import "../chunk-S47NFEWF.js";
|
|
14
14
|
import "../chunk-MKWZPDR6.js";
|
|
15
|
-
import "../chunk-
|
|
15
|
+
import "../chunk-2KZ7GG43.js";
|
|
16
16
|
import "../chunk-N7YDVXYJ.js";
|
|
17
17
|
import "../chunk-R3EV5FTO.js";
|
|
18
18
|
import "../chunk-JU7VHODU.js";
|
|
19
19
|
import "../chunk-ODEIDRGW.js";
|
|
20
20
|
import "../chunk-57RKNWL2.js";
|
|
21
21
|
import "../chunk-UK573G7W.js";
|
|
22
|
-
import "../chunk-
|
|
22
|
+
import "../chunk-66JAEDTE.js";
|
|
23
23
|
import "../chunk-PZB6T6KU.js";
|
|
24
24
|
import "../chunk-27F7W2LG.js";
|
|
25
25
|
import "../chunk-CDL5PM2Q.js";
|
package/js/mcp/stdio.js
CHANGED
|
@@ -2,30 +2,30 @@ import {
|
|
|
2
2
|
adaptMcpTools,
|
|
3
3
|
mcpClient,
|
|
4
4
|
mcpJsonSchemaValidator
|
|
5
|
-
} from "../chunk-
|
|
5
|
+
} from "../chunk-B3T7CZOH.js";
|
|
6
6
|
import {
|
|
7
7
|
protocolRouter
|
|
8
|
-
} from "../chunk-
|
|
8
|
+
} from "../chunk-JWNSH5CA.js";
|
|
9
9
|
import "../chunk-BCSNKUAC.js";
|
|
10
|
-
import "../chunk-
|
|
10
|
+
import "../chunk-3HH4OZR3.js";
|
|
11
11
|
import "../chunk-NKLWZJLE.js";
|
|
12
|
-
import "../chunk-
|
|
12
|
+
import "../chunk-WFEUCUFF.js";
|
|
13
13
|
import "../chunk-IPI4MFSN.js";
|
|
14
|
-
import "../chunk-
|
|
14
|
+
import "../chunk-A5BSZKFF.js";
|
|
15
15
|
import "../chunk-ZQINWV4W.js";
|
|
16
|
-
import "../chunk-
|
|
16
|
+
import "../chunk-S47NFEWF.js";
|
|
17
17
|
import "../chunk-MKWZPDR6.js";
|
|
18
18
|
import {
|
|
19
19
|
McpError,
|
|
20
20
|
ProcessConfig
|
|
21
|
-
} from "../chunk-
|
|
21
|
+
} from "../chunk-2KZ7GG43.js";
|
|
22
22
|
import "../chunk-N7YDVXYJ.js";
|
|
23
23
|
import "../chunk-R3EV5FTO.js";
|
|
24
24
|
import "../chunk-JU7VHODU.js";
|
|
25
25
|
import "../chunk-ODEIDRGW.js";
|
|
26
26
|
import "../chunk-57RKNWL2.js";
|
|
27
27
|
import "../chunk-UK573G7W.js";
|
|
28
|
-
import "../chunk-
|
|
28
|
+
import "../chunk-66JAEDTE.js";
|
|
29
29
|
import "../chunk-PZB6T6KU.js";
|
|
30
30
|
import "../chunk-27F7W2LG.js";
|
|
31
31
|
import {
|