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/js/mcp.js CHANGED
@@ -1,43 +1,45 @@
1
1
  import {
2
2
  mcpClientEffect
3
- } from "./chunk-CMRKLZZY.js";
3
+ } from "./chunk-K2QATKIF.js";
4
4
  import {
5
5
  catalogCache,
6
6
  catalogScope
7
- } from "./chunk-OZ4UK3CD.js";
7
+ } from "./chunk-AK54RD3A.js";
8
8
  import {
9
9
  adaptMcpTool
10
- } from "./chunk-BLI53LPN.js";
10
+ } from "./chunk-B3T7CZOH.js";
11
11
  import {
12
12
  protocolOperations
13
- } from "./chunk-RAAPJMVZ.js";
13
+ } from "./chunk-JWNSH5CA.js";
14
14
  import "./chunk-BCSNKUAC.js";
15
- import "./chunk-CHAK4P5C.js";
15
+ import "./chunk-3HH4OZR3.js";
16
16
  import {
17
17
  cacheKey
18
18
  } from "./chunk-NKLWZJLE.js";
19
- import "./chunk-625MBYU4.js";
19
+ import {
20
+ operationDescription
21
+ } from "./chunk-WFEUCUFF.js";
20
22
  import "./chunk-IPI4MFSN.js";
21
- import "./chunk-XNCYIB4D.js";
23
+ import "./chunk-A5BSZKFF.js";
22
24
  import "./chunk-ZQINWV4W.js";
23
25
  import {
24
26
  nativeOperation,
25
27
  routerDeclaration
26
- } from "./chunk-NMKHTJOQ.js";
28
+ } from "./chunk-S47NFEWF.js";
27
29
  import "./chunk-MKWZPDR6.js";
28
30
  import {
29
31
  McpError,
30
32
  McpServerHeader,
31
33
  McpToolMetadata,
32
34
  McpToolsOptions
33
- } from "./chunk-VXWY44LE.js";
35
+ } from "./chunk-2KZ7GG43.js";
34
36
  import "./chunk-N7YDVXYJ.js";
35
37
  import "./chunk-R3EV5FTO.js";
36
38
  import "./chunk-JU7VHODU.js";
37
39
  import "./chunk-ODEIDRGW.js";
38
40
  import "./chunk-57RKNWL2.js";
39
41
  import "./chunk-UK573G7W.js";
40
- import "./chunk-4QQ62BVS.js";
42
+ import "./chunk-66JAEDTE.js";
41
43
  import "./chunk-PZB6T6KU.js";
42
44
  import "./chunk-27F7W2LG.js";
43
45
  import {
@@ -102,12 +104,18 @@ var mcpCatalog = (options, kinds) => Effect_exports.gen(function* () {
102
104
  ...tool.title === void 0 ? {} : { title: tool.title },
103
105
  annotations: { ...tool.annotations, readOnlyHint: kindOf(tool) === "query" }
104
106
  });
105
- const describe = (tool) => ({
106
- ...summarize(tool),
107
- inputSchema: tool.inputSchema,
108
- ...tool.outputSchema === void 0 ? {} : { outputSchema: tool.outputSchema },
109
- ...tool._meta === void 0 ? {} : { _meta: tool._meta }
110
- });
107
+ const operation = (tool) => adaptMcpTool(client, tool).pipe(
108
+ Effect_exports.map(
109
+ (adapted) => nativeOperation(
110
+ protocolOperations({ selected: adapted }, { selected: kindOf(tool) }).selected
111
+ )
112
+ )
113
+ );
114
+ const describe = (tool) => operation(tool).pipe(
115
+ Effect_exports.flatMap(
116
+ (selected) => selected === void 0 ? Effect_exports.succeed(void 0) : operationDescription(tool.name, "", selected)
117
+ )
118
+ );
111
119
  const router = {
112
120
  kind: "dynamic",
113
121
  meta: () => catalog.header().pipe(
@@ -116,16 +124,21 @@ var mcpCatalog = (options, kinds) => Effect_exports.gen(function* () {
116
124
  ),
117
125
  Effect_exports.map(serverMeta)
118
126
  ),
119
- list: () => catalog.list().pipe(Effect_exports.map((tools) => tools.map(describe))),
127
+ list: () => catalog.list().pipe(
128
+ Effect_exports.flatMap((tools) => Effect_exports.forEach(tools, describe)),
129
+ Effect_exports.map((tools) => tools.filter((tool) => tool !== void 0))
130
+ ),
120
131
  summaries: () => catalog.summaries().pipe(Effect_exports.map((tools) => tools.map(summarize))),
121
- describe: (name) => catalog.resolve(name).pipe(Effect_exports.map((tool) => tool === void 0 ? void 0 : describe(tool))),
122
- resolve: (name) => Effect_exports.gen(function* () {
123
- const tool = yield* catalog.resolve(name);
124
- if (tool === void 0) return void 0;
125
- const adapted = yield* adaptMcpTool(client, tool);
126
- const operations = protocolOperations({ selected: adapted }, { selected: kindOf(tool) });
127
- return nativeOperation(operations.selected);
128
- })
132
+ describe: (name) => catalog.resolve(name).pipe(
133
+ Effect_exports.flatMap(
134
+ (tool) => tool === void 0 ? Effect_exports.succeed(void 0) : describe(tool)
135
+ )
136
+ ),
137
+ resolve: (name) => catalog.resolve(name).pipe(
138
+ Effect_exports.flatMap(
139
+ (tool) => tool === void 0 ? Effect_exports.succeed(void 0) : operation(tool)
140
+ )
141
+ )
129
142
  };
130
143
  return routerDeclaration(router);
131
144
  });
package/js/openapi.js CHANGED
@@ -8,7 +8,7 @@ import {
8
8
  import {
9
9
  protocolOperations,
10
10
  protocolRouter
11
- } from "./chunk-RAAPJMVZ.js";
11
+ } from "./chunk-JWNSH5CA.js";
12
12
  import {
13
13
  OpenapiError,
14
14
  OpenapiErrorResponse,
@@ -21,14 +21,14 @@ import {
21
21
  isOpenapiTextMedia,
22
22
  openapiBinaryResultSchema,
23
23
  openapiMediaKind
24
- } from "./chunk-625MBYU4.js";
24
+ } from "./chunk-WFEUCUFF.js";
25
25
  import "./chunk-IPI4MFSN.js";
26
26
  import {
27
27
  fromPromise,
28
28
  nativeOperation,
29
29
  routerDeclaration,
30
30
  toPromise
31
- } from "./chunk-NMKHTJOQ.js";
31
+ } from "./chunk-S47NFEWF.js";
32
32
  import {
33
33
  accountProviderError,
34
34
  httpProviderError
@@ -39,7 +39,7 @@ import {
39
39
  OpenapiResponseError,
40
40
  RouterMeta,
41
41
  defaultOpenapiErrorLimits
42
- } from "./chunk-VXWY44LE.js";
42
+ } from "./chunk-2KZ7GG43.js";
43
43
  import "./chunk-N7YDVXYJ.js";
44
44
  import {
45
45
  ProviderError,
@@ -58,7 +58,7 @@ import {
58
58
  lazyJsonSchemaDecoder,
59
59
  once,
60
60
  wrap
61
- } from "./chunk-4QQ62BVS.js";
61
+ } from "./chunk-66JAEDTE.js";
62
62
  import "./chunk-PZB6T6KU.js";
63
63
  import {
64
64
  JsonObject
package/js/skills.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  catalogCache
3
- } from "./chunk-OZ4UK3CD.js";
3
+ } from "./chunk-AK54RD3A.js";
4
4
  import "./chunk-NKLWZJLE.js";
5
5
  import {
6
6
  folderSkillsEffect,
@@ -29,7 +29,7 @@ import {
29
29
  } from "./chunk-UK573G7W.js";
30
30
  import {
31
31
  wrap
32
- } from "./chunk-4QQ62BVS.js";
32
+ } from "./chunk-66JAEDTE.js";
33
33
  import "./chunk-27F7W2LG.js";
34
34
  import {
35
35
  Effect_exports,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "apps",
3
- "version": "0.0.1-beta.21",
3
+ "version": "0.0.1-beta.22",
4
4
  "description": "TypeScript apps with typed tools, accounts, storage, and UI.",
5
5
  "type": "module",
6
6
  "sideEffects": false,