apps 0.0.1-beta.2 → 0.0.1-beta.21
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 +68 -44
- package/framework-reference.json +1 -1
- package/js/{chunk-SATWJKN6.js → chunk-27F7W2LG.js} +1 -1
- package/js/{chunk-WFSQXYUT.js → chunk-4QQ62BVS.js} +37 -3
- package/js/{chunk-HDJH3RPR.js → chunk-57RKNWL2.js} +2 -2
- package/js/chunk-625MBYU4.js +524 -0
- package/js/{chunk-RN2MXB4R.js → chunk-BLI53LPN.js} +28 -9
- package/js/{chunk-FW5HBOIK.js → chunk-CDL5PM2Q.js} +307 -169
- package/js/{chunk-J7O55ZV7.js → chunk-CHAK4P5C.js} +317 -176
- package/js/{chunk-HDTGZWP2.js → chunk-CMRKLZZY.js} +8 -8
- package/js/{chunk-OHRT55C4.js → chunk-IJX4CYZO.js} +3 -6
- package/js/{chunk-FDNTX5QJ.js → chunk-IPI4MFSN.js} +2 -2
- package/js/{chunk-YEJOQEII.js → chunk-JU7VHODU.js} +1 -1
- package/js/chunk-KUMBKVJD.js +39 -0
- package/js/{chunk-EVJUVWN2.js → chunk-M3B3DE4K.js} +2 -2
- package/js/{chunk-ZJWDMTE3.js → chunk-MKWZPDR6.js} +3 -3
- package/js/{chunk-BMOIAIVR.js → chunk-N7YDVXYJ.js} +49 -1
- package/js/{chunk-D47C7KG5.js → chunk-NKLWZJLE.js} +2 -2
- package/js/chunk-NMKHTJOQ.js +254 -0
- package/js/chunk-OD3KFKZD.js +1617 -0
- package/js/{chunk-ZCAMUXSG.js → chunk-ODEIDRGW.js} +3 -4
- package/js/{chunk-5MQZEB6Y.js → chunk-OZ4UK3CD.js} +37 -12
- package/js/{chunk-M6ZRRIBI.js → chunk-PJJ24GU7.js} +1 -1
- package/js/{chunk-FZJOYIZO.js → chunk-PZB6T6KU.js} +1 -1
- package/js/{chunk-LGIYBDWA.js → chunk-R3EV5FTO.js} +13 -1
- package/js/{chunk-Z5NMEGJN.js → chunk-RAAPJMVZ.js} +21 -9
- package/js/{chunk-QKHR7BMF.js → chunk-UK573G7W.js} +1 -1
- package/js/{chunk-4LPG6RCH.js → chunk-VFZKSM3T.js} +5 -25
- package/js/{chunk-MYYEW3RA.js → chunk-VXWY44LE.js} +780 -55
- package/js/{chunk-JN55AYQH.js → chunk-XNCYIB4D.js} +61 -32
- package/js/{chunk-PLCMJREA.js → chunk-ZQINWV4W.js} +60 -20
- package/js/client.js +10 -26
- package/js/contracts.js +74 -16
- package/js/effect.js +19 -20
- package/js/{es-APDZKREY.js → es-DIULA3ZF.js} +62 -1659
- package/js/graphql.js +47 -49
- package/js/host.js +19 -20
- package/js/index.js +232 -201
- package/js/mcp/effect.js +21 -22
- package/js/mcp/stdio.js +25 -26
- package/js/mcp.js +74 -56
- package/js/openapi.js +3428 -1276
- package/js/react.js +3 -3
- package/js/skills/effect.js +3 -3
- package/js/skills.js +12 -13
- package/js/storage/facet.js +4 -4
- package/js/ui/auth/contracts.js +8 -9
- package/js/ui/auth.js +16 -14
- package/js/ui/contracts.js +4 -4
- package/js/ui/serving.js +71 -218
- package/package.json +1 -1
- package/runtime.json +1 -1
- package/types/app-data/src/contracts/database.d.ts +33 -6
- package/types/app-data/src/implementation/schema.d.ts +2 -17
- package/types/apps/src/contracts/app.d.ts +7 -6
- package/types/apps/src/contracts/failure.d.ts +25 -0
- package/types/apps/src/contracts/host.d.ts +31 -10
- package/types/apps/src/contracts/mcp.d.ts +16 -0
- package/types/apps/src/contracts/openapi.d.ts +5 -1
- package/types/apps/src/contracts/operations.d.ts +0 -5
- package/types/apps/src/contracts/protocol-version.d.ts +2 -2
- package/types/apps/src/contracts/protocols/1.d.ts +235 -67
- package/types/apps/src/contracts/protocols/2.d.ts +710 -0
- package/types/apps/src/contracts/protocols/3.d.ts +718 -0
- package/types/apps/src/contracts/protocols/4.d.ts +1299 -0
- package/types/apps/src/contracts/protocols/5.d.ts +1174 -0
- package/types/apps/src/contracts/protocols/6.d.ts +1620 -0
- package/types/apps/src/contracts/protocols/7.d.ts +1784 -0
- package/types/apps/src/contracts/protocols/oauth.d.ts +89 -0
- package/types/apps/src/contracts/provider.d.ts +109 -10
- package/types/apps/src/contracts/router.d.ts +59 -0
- package/types/apps/src/contracts/storage.d.ts +3 -3
- package/types/apps/src/contracts/ui-auth.d.ts +6 -14
- package/types/apps/src/contracts/ui.d.ts +18 -0
- package/types/apps/src/contracts/workflows.d.ts +34 -3
- package/types/apps/src/graphql.d.ts +1 -3
- package/types/apps/src/implementation/account-router.d.ts +12 -0
- package/types/apps/src/implementation/app.d.ts +5 -4
- package/types/apps/src/implementation/browser-scripts.gen.d.ts +6 -0
- package/types/apps/src/implementation/catalog-cache.d.ts +34 -4
- package/types/apps/src/implementation/elicitation.d.ts +2 -2
- package/types/apps/src/implementation/failure-detail.d.ts +26 -0
- package/types/apps/src/implementation/graphql-catalog.d.ts +4 -7
- package/types/apps/src/implementation/mcp-catalog.d.ts +7 -8
- package/types/apps/src/implementation/mcp-client.d.ts +35 -19
- package/types/apps/src/implementation/mcp.d.ts +35 -19
- package/types/apps/src/implementation/openapi-compile.d.ts +9 -5
- package/types/apps/src/implementation/openapi-document.d.ts +15 -2
- package/types/apps/src/implementation/openapi-request.d.ts +8 -1
- package/types/apps/src/implementation/openapi-source.d.ts +2 -6
- package/types/apps/src/implementation/openapi-upgrade.d.ts +4 -0
- package/types/apps/src/implementation/operations.d.ts +36 -3
- package/types/apps/src/implementation/protocol-operations.d.ts +3 -4
- package/types/apps/src/implementation/provider.d.ts +19 -5
- package/types/apps/src/implementation/router-catalog.d.ts +225 -0
- package/types/apps/src/implementation/router.d.ts +68 -0
- package/types/apps/src/implementation/runtime-yield.d.ts +7 -0
- package/types/apps/src/implementation/schema.d.ts +44 -1
- package/types/apps/src/implementation/storage.d.ts +5 -3
- package/types/apps/src/implementation/ui-account-notice.d.ts +9 -0
- package/types/apps/src/implementation/ui-auth.d.ts +11 -5
- package/types/apps/src/implementation/ui-errors.d.ts +1 -1
- package/types/apps/src/implementation/ui-serving.d.ts +10 -4
- package/types/apps/src/implementation/ui-watch.d.ts +1 -1
- package/types/apps/src/implementation/webhooks.d.ts +1 -1
- package/types/apps/src/implementation/workflow-context.d.ts +11 -3
- package/types/apps/src/index.d.ts +28 -11
- package/types/apps/src/mcp-stdio.d.ts +2 -5
- package/types/apps/src/mcp.d.ts +5 -4
- package/types/apps/src/openapi.d.ts +6 -6
- package/types/apps/src/ui-auth.d.ts +2 -2
- package/types/telemetry/src/browser-operations.d.ts +5 -2
- package/js/chunk-PYUYJRSK.js +0 -93
- package/js/chunk-SWPD52J7.js +0 -35
- package/js/chunk-TE4KO4HI.js +0 -47
- package/js/chunk-W7D7WVSY.js +0 -18
- package/types/apps/src/contracts/dynamic-tools.d.ts +0 -13
- package/types/apps/src/implementation/account-operations.d.ts +0 -151
- package/types/apps/src/implementation/dynamic-tools.d.ts +0 -8
package/js/graphql.js
CHANGED
|
@@ -1,55 +1,56 @@
|
|
|
1
1
|
import {
|
|
2
|
-
catalogCache
|
|
3
|
-
|
|
2
|
+
catalogCache,
|
|
3
|
+
catalogScope
|
|
4
|
+
} from "./chunk-OZ4UK3CD.js";
|
|
4
5
|
import {
|
|
5
6
|
protocolOperations
|
|
6
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-RAAPJMVZ.js";
|
|
7
8
|
import "./chunk-BCSNKUAC.js";
|
|
8
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-CHAK4P5C.js";
|
|
9
10
|
import {
|
|
10
11
|
cacheKey
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-NKLWZJLE.js";
|
|
13
|
+
import "./chunk-625MBYU4.js";
|
|
14
|
+
import "./chunk-IPI4MFSN.js";
|
|
15
|
+
import "./chunk-XNCYIB4D.js";
|
|
16
|
+
import "./chunk-ZQINWV4W.js";
|
|
15
17
|
import {
|
|
16
|
-
nativeOperation
|
|
17
|
-
|
|
18
|
+
nativeOperation,
|
|
19
|
+
routerDeclaration
|
|
20
|
+
} from "./chunk-NMKHTJOQ.js";
|
|
18
21
|
import {
|
|
19
22
|
accountProviderError,
|
|
20
23
|
graphqlProviderError,
|
|
21
24
|
httpProviderError
|
|
22
|
-
} from "./chunk-
|
|
23
|
-
import "./chunk-
|
|
24
|
-
import "./chunk-
|
|
25
|
-
import "./chunk-LGIYBDWA.js";
|
|
26
|
-
import "./chunk-YEJOQEII.js";
|
|
27
|
-
import "./chunk-SWPD52J7.js";
|
|
25
|
+
} from "./chunk-MKWZPDR6.js";
|
|
26
|
+
import "./chunk-VXWY44LE.js";
|
|
27
|
+
import "./chunk-N7YDVXYJ.js";
|
|
28
28
|
import {
|
|
29
29
|
ProviderError
|
|
30
|
-
} from "./chunk-
|
|
31
|
-
import "./chunk-
|
|
30
|
+
} from "./chunk-R3EV5FTO.js";
|
|
31
|
+
import "./chunk-JU7VHODU.js";
|
|
32
|
+
import "./chunk-ODEIDRGW.js";
|
|
32
33
|
import {
|
|
33
34
|
FetchHttpClient_exports
|
|
34
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-57RKNWL2.js";
|
|
35
36
|
import {
|
|
36
37
|
HttpClientRequest_exports,
|
|
37
38
|
HttpClient_exports
|
|
38
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-UK573G7W.js";
|
|
39
40
|
import {
|
|
40
41
|
jsonSchemaDecoder
|
|
41
|
-
} from "./chunk-
|
|
42
|
-
import "./chunk-
|
|
42
|
+
} from "./chunk-4QQ62BVS.js";
|
|
43
|
+
import "./chunk-PZB6T6KU.js";
|
|
43
44
|
import {
|
|
44
45
|
AccountId,
|
|
45
46
|
HttpUrl,
|
|
46
47
|
JsonObject
|
|
47
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-27F7W2LG.js";
|
|
48
49
|
import {
|
|
49
50
|
Effect_exports,
|
|
50
51
|
Redacted_exports,
|
|
51
52
|
Schema_exports
|
|
52
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-CDL5PM2Q.js";
|
|
53
54
|
import "./chunk-CZ7CSFO4.js";
|
|
54
55
|
|
|
55
56
|
// src/contracts/graphql.ts
|
|
@@ -429,17 +430,20 @@ var GraphqlToolSummary = GraphqlToolDefinition.mapFields(({ name, kind, descript
|
|
|
429
430
|
description
|
|
430
431
|
}));
|
|
431
432
|
var graphqlCatalog = (options, kinds) => Effect_exports.gen(function* () {
|
|
432
|
-
const
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
433
|
+
const invalid = () => new GraphqlError({ phase: "discover", reason: "invalid_input" });
|
|
434
|
+
const parsed = yield* Schema_exports.decodeUnknownEffect(GraphqlToolsOptions)({
|
|
435
|
+
url: options.url,
|
|
436
|
+
accountId: options.account?.id,
|
|
437
|
+
headers: options.headers,
|
|
438
|
+
signal: options.signal,
|
|
439
|
+
timeoutMs: options.timeoutMs
|
|
440
|
+
}).pipe(Effect_exports.mapError(invalid));
|
|
441
|
+
const cache = yield* catalogScope(options, invalid);
|
|
442
|
+
const id = yield* cacheKey({ url: parsed.url });
|
|
440
443
|
const client = yield* graphqlClientEffect(parsed);
|
|
441
444
|
const catalog = yield* catalogCache({
|
|
442
445
|
...options,
|
|
446
|
+
cache,
|
|
443
447
|
prefix: ["graphql-catalog-v2", id],
|
|
444
448
|
schema: GraphqlToolDefinition,
|
|
445
449
|
summary: {
|
|
@@ -448,13 +452,13 @@ var graphqlCatalog = (options, kinds) => Effect_exports.gen(function* () {
|
|
|
448
452
|
},
|
|
449
453
|
load: (context) => (context === void 0 ? Effect_exports.succeed(client) : graphqlClientEffect({ ...parsed, signal: context.signal })).pipe(
|
|
450
454
|
Effect_exports.flatMap((source) => source.discover),
|
|
451
|
-
Effect_exports.flatMap(graphqlDefinitions)
|
|
455
|
+
Effect_exports.flatMap(graphqlDefinitions),
|
|
456
|
+
Effect_exports.map((tools) => ({ tools }))
|
|
452
457
|
)
|
|
453
458
|
});
|
|
454
459
|
const kindOf = (tool) => Object.hasOwn(kinds, tool.name) ? kinds[tool.name] ?? "mutation" : tool.kind;
|
|
455
|
-
const qualified = (tool) => `${kindOf(tool) === "query" ? "queries" : "mutations"}.${tool.name}`;
|
|
456
460
|
const summarize = (tool) => ({
|
|
457
|
-
name:
|
|
461
|
+
name: tool.name,
|
|
458
462
|
description: tool.description,
|
|
459
463
|
readOnly: kindOf(tool) === "query"
|
|
460
464
|
});
|
|
@@ -462,34 +466,28 @@ var graphqlCatalog = (options, kinds) => Effect_exports.gen(function* () {
|
|
|
462
466
|
...summarize(tool),
|
|
463
467
|
inputSchema: tool.inputSchema
|
|
464
468
|
});
|
|
465
|
-
const
|
|
466
|
-
|
|
467
|
-
const tool = yield* catalog.resolve(name.slice(name.indexOf(".") + 1));
|
|
468
|
-
return tool === void 0 || qualified(tool) !== name ? void 0 : tool;
|
|
469
|
-
});
|
|
470
|
-
const dynamicTools = {
|
|
469
|
+
const router = {
|
|
470
|
+
kind: "dynamic",
|
|
471
471
|
list: () => catalog.list().pipe(Effect_exports.map((tools) => tools.map(describe))),
|
|
472
472
|
summaries: () => catalog.summaries().pipe(Effect_exports.map((tools) => tools.map(summarize))),
|
|
473
|
-
describe: (name) =>
|
|
474
|
-
Effect_exports.map((tool) => tool === void 0 ? void 0 : describe(tool))
|
|
475
|
-
),
|
|
473
|
+
describe: (name) => catalog.resolve(name).pipe(Effect_exports.map((tool) => tool === void 0 ? void 0 : describe(tool))),
|
|
476
474
|
resolve: (name) => Effect_exports.gen(function* () {
|
|
477
|
-
const tool = yield*
|
|
475
|
+
const tool = yield* catalog.resolve(name);
|
|
478
476
|
if (tool === void 0) return void 0;
|
|
479
477
|
const adapted = yield* adaptGraphqlTool(client, tool);
|
|
480
478
|
const operations = protocolOperations({ selected: adapted }, { selected: kindOf(tool) });
|
|
481
|
-
return nativeOperation(operations.
|
|
479
|
+
return nativeOperation(operations.selected);
|
|
482
480
|
})
|
|
483
481
|
};
|
|
484
|
-
return
|
|
482
|
+
return routerDeclaration(router);
|
|
485
483
|
});
|
|
486
484
|
|
|
487
485
|
// src/graphql.ts
|
|
488
|
-
var
|
|
486
|
+
var graphqlRouter = (options, kinds = {}) => Effect_exports.runPromise(
|
|
489
487
|
graphqlCatalog(options, kinds),
|
|
490
488
|
options.signal === void 0 ? {} : { signal: options.signal }
|
|
491
489
|
);
|
|
492
490
|
export {
|
|
493
491
|
GraphqlError,
|
|
494
|
-
|
|
492
|
+
graphqlRouter
|
|
495
493
|
};
|
package/js/host.js
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createAppHandler
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-CHAK4P5C.js";
|
|
4
|
+
import "./chunk-NKLWZJLE.js";
|
|
5
|
+
import "./chunk-625MBYU4.js";
|
|
6
|
+
import "./chunk-IPI4MFSN.js";
|
|
7
|
+
import "./chunk-XNCYIB4D.js";
|
|
8
|
+
import "./chunk-ZQINWV4W.js";
|
|
9
|
+
import "./chunk-NMKHTJOQ.js";
|
|
10
|
+
import "./chunk-MKWZPDR6.js";
|
|
10
11
|
import {
|
|
11
12
|
ElicitationFailed,
|
|
12
13
|
ElicitationReply,
|
|
@@ -20,32 +21,30 @@ import {
|
|
|
20
21
|
WorkflowRun,
|
|
21
22
|
WorkflowRunId,
|
|
22
23
|
WorkflowRunPage
|
|
23
|
-
} from "./chunk-
|
|
24
|
-
import "./chunk-
|
|
24
|
+
} from "./chunk-VXWY44LE.js";
|
|
25
|
+
import "./chunk-N7YDVXYJ.js";
|
|
25
26
|
import {
|
|
26
27
|
CacheCommand,
|
|
27
28
|
CacheError,
|
|
28
29
|
CacheReply
|
|
29
|
-
} from "./chunk-
|
|
30
|
-
import "./chunk-
|
|
31
|
-
import "./chunk-SWPD52J7.js";
|
|
32
|
-
import "./chunk-W7D7WVSY.js";
|
|
30
|
+
} from "./chunk-R3EV5FTO.js";
|
|
31
|
+
import "./chunk-JU7VHODU.js";
|
|
33
32
|
import {
|
|
34
33
|
collectTelemetry,
|
|
35
34
|
withRemoteSpan
|
|
36
|
-
} from "./chunk-
|
|
37
|
-
import "./chunk-
|
|
38
|
-
import "./chunk-
|
|
39
|
-
import "./chunk-
|
|
40
|
-
import "./chunk-
|
|
41
|
-
import "./chunk-
|
|
35
|
+
} from "./chunk-ODEIDRGW.js";
|
|
36
|
+
import "./chunk-57RKNWL2.js";
|
|
37
|
+
import "./chunk-UK573G7W.js";
|
|
38
|
+
import "./chunk-4QQ62BVS.js";
|
|
39
|
+
import "./chunk-PZB6T6KU.js";
|
|
40
|
+
import "./chunk-27F7W2LG.js";
|
|
42
41
|
import {
|
|
43
42
|
Cause_exports,
|
|
44
43
|
Effect_exports,
|
|
45
44
|
Redacted_exports,
|
|
46
45
|
Scheduler_exports,
|
|
47
46
|
Schema_exports
|
|
48
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-CDL5PM2Q.js";
|
|
49
48
|
import "./chunk-CZ7CSFO4.js";
|
|
50
49
|
|
|
51
50
|
// src/implementation/cache-session.ts
|