apps 0.0.1-beta.5 → 0.0.1-beta.7

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.
Files changed (66) hide show
  1. package/README.md +65 -43
  2. package/framework-reference.json +1 -1
  3. package/js/{chunk-FWQC6I3C.js → chunk-5T57N25Q.js} +13 -1
  4. package/js/{chunk-TDNYXSIX.js → chunk-72JNVHPK.js} +21 -9
  5. package/js/{chunk-UDDE5KOR.js → chunk-CMYUWAX7.js} +26 -7
  6. package/js/chunk-FL2QR3XW.js +507 -0
  7. package/js/{chunk-G7T27IWB.js → chunk-MKWZPDR6.js} +1 -1
  8. package/js/{chunk-CYYBFC2K.js → chunk-NKLWZJLE.js} +1 -1
  9. package/js/{chunk-67EVWIGJ.js → chunk-OCYUEU47.js} +4 -4
  10. package/js/{chunk-YEPYT6SD.js → chunk-R3EV5FTO.js} +12 -0
  11. package/js/{chunk-XHO2ZX6W.js → chunk-RFVIONFX.js} +27 -10
  12. package/js/{chunk-LUVSFETN.js → chunk-UESPOTUI.js} +127 -231
  13. package/js/{chunk-DQAZTA4I.js → chunk-WLE7WX2U.js} +290 -20
  14. package/js/{chunk-C3VAOK5B.js → chunk-YXQHV65J.js} +53 -26
  15. package/js/chunk-Z5M2LQOZ.js +209 -0
  16. package/js/client.js +1 -1
  17. package/js/contracts.js +34 -11
  18. package/js/effect.js +9 -11
  19. package/js/graphql.js +25 -32
  20. package/js/host.js +9 -11
  21. package/js/index.js +194 -192
  22. package/js/mcp/effect.js +11 -13
  23. package/js/mcp/stdio.js +15 -17
  24. package/js/mcp.js +50 -36
  25. package/js/openapi.js +166 -108
  26. package/js/skills.js +6 -7
  27. package/package.json +1 -1
  28. package/runtime.json +1 -1
  29. package/types/apps/src/contracts/app.d.ts +2 -5
  30. package/types/apps/src/contracts/host.d.ts +19 -7
  31. package/types/apps/src/contracts/mcp.d.ts +16 -0
  32. package/types/apps/src/contracts/openapi.d.ts +4 -0
  33. package/types/apps/src/contracts/operations.d.ts +0 -5
  34. package/types/apps/src/contracts/protocol-version.d.ts +2 -2
  35. package/types/apps/src/contracts/protocols/4.d.ts +1229 -0
  36. package/types/apps/src/contracts/protocols/5.d.ts +1090 -0
  37. package/types/apps/src/contracts/provider.d.ts +51 -5
  38. package/types/apps/src/contracts/router.d.ts +59 -0
  39. package/types/apps/src/graphql.d.ts +1 -3
  40. package/types/apps/src/implementation/account-router.d.ts +12 -0
  41. package/types/apps/src/implementation/app.d.ts +5 -4
  42. package/types/apps/src/implementation/catalog-cache.d.ts +9 -2
  43. package/types/apps/src/implementation/graphql-catalog.d.ts +1 -4
  44. package/types/apps/src/implementation/mcp-catalog.d.ts +1 -4
  45. package/types/apps/src/implementation/mcp-client.d.ts +35 -19
  46. package/types/apps/src/implementation/mcp.d.ts +35 -19
  47. package/types/apps/src/implementation/openapi-compile.d.ts +2 -1
  48. package/types/apps/src/implementation/openapi-source.d.ts +2 -6
  49. package/types/apps/src/implementation/operations.d.ts +26 -3
  50. package/types/apps/src/implementation/protocol-operations.d.ts +3 -4
  51. package/types/apps/src/implementation/provider.d.ts +9 -4
  52. package/types/apps/src/implementation/router-catalog.d.ts +225 -0
  53. package/types/apps/src/implementation/router.d.ts +59 -0
  54. package/types/apps/src/implementation/schema.d.ts +5 -1
  55. package/types/apps/src/implementation/workflow-context.d.ts +1 -1
  56. package/types/apps/src/index.d.ts +5 -4
  57. package/types/apps/src/mcp-stdio.d.ts +2 -5
  58. package/types/apps/src/mcp.d.ts +5 -4
  59. package/types/apps/src/openapi.d.ts +6 -6
  60. package/js/chunk-3XKZDQLM.js +0 -93
  61. package/js/chunk-4M277YTM.js +0 -136
  62. package/js/chunk-SB3V4YVR.js +0 -18
  63. package/js/chunk-W4DMKWAB.js +0 -35
  64. package/types/apps/src/contracts/dynamic-tools.d.ts +0 -13
  65. package/types/apps/src/implementation/account-operations.d.ts +0 -151
  66. package/types/apps/src/implementation/dynamic-tools.d.ts +0 -8
@@ -1,13 +0,0 @@
1
- /** Lazy operation discovery and resolution. Executables remain invocation-owned. */
2
- import type { Effect } from "effect";
3
- import type { HostedTool, HostedToolSummary } from "./host.js";
4
- import type { AppOperation } from "./operations.js";
5
- /** Tool names include their queries./mutations. prefix. Resolution never requires listing. */
6
- export interface DynamicTools {
7
- readonly list: () => Effect.Effect<readonly HostedTool[], unknown>;
8
- readonly resolve: (name: string) => Effect.Effect<AppOperation | undefined, unknown>;
9
- /** Names and descriptions without schemas. Omitted sources reduce list(). */
10
- readonly summaries?: () => Effect.Effect<readonly HostedToolSummary[], unknown>;
11
- /** One tool's full metadata without listing. Omitted sources search list(). */
12
- readonly describe?: (name: string) => Effect.Effect<HostedTool | undefined, unknown>;
13
- }
@@ -1,151 +0,0 @@
1
- /** Combine account-bound protocol operations without changing their upstream inputs. */
2
- import { Effect, Schema } from "effect";
3
- import type { DynamicTools } from "../contracts/dynamic-tools.js";
4
- import type { AppOperation, OperationContext } from "../contracts/operations.js";
5
- import { type JsonValue } from "../contracts/schema.js";
6
- import { type Operation } from "./operations.js";
7
- type Operations = {
8
- readonly queries?: Readonly<Record<string, Operation<JsonValue, unknown, "query", OperationContext>>>;
9
- readonly dynamicTools?: DynamicTools;
10
- readonly mutations?: Readonly<Record<string, Operation<JsonValue, unknown, "mutation", OperationContext>>>;
11
- };
12
- /**
13
- * Discover each selected account's protocol operations and combine matching names.
14
- * Calls take { accountId, input }; each branch retains its account's input schema,
15
- * credentials, approval and output validation. Empty selections expose no operations.
16
- * Discovery is sequential and cancellation follows the caller's signal.
17
- */
18
- export declare const accountOperations: <Account extends {
19
- readonly id: string;
20
- }>(accounts: readonly Account[], discover: (account: Account) => Promise<Operations>, options: {
21
- readonly signal: AbortSignal;
22
- }) => Promise<{
23
- queries: {
24
- [k: string]: Operation<{
25
- readonly accountId: string;
26
- readonly input: unknown;
27
- }, unknown, "query", import("../index.js").AppContext>;
28
- };
29
- mutations: {
30
- [k: string]: Operation<{
31
- readonly accountId: string;
32
- readonly input: unknown;
33
- }, unknown, "mutation", import("../index.js").AppContext>;
34
- };
35
- } | {
36
- dynamicTools: {
37
- list: () => Effect.Effect<{
38
- readonly name: string;
39
- readonly description: string;
40
- readonly inputSchema: {
41
- readonly [x: string]: Schema.Json;
42
- };
43
- readonly _meta?: {
44
- readonly [x: string]: Schema.Json;
45
- };
46
- readonly title?: string;
47
- readonly outputSchema?: {
48
- readonly [x: string]: Schema.Json;
49
- };
50
- readonly annotations?: {
51
- readonly title?: string;
52
- readonly readOnlyHint?: boolean;
53
- readonly destructiveHint?: boolean;
54
- readonly idempotentHint?: boolean;
55
- readonly openWorldHint?: boolean;
56
- };
57
- readonly schedules?: readonly {
58
- readonly name: string;
59
- readonly timing: {
60
- readonly kind: "interval";
61
- readonly milliseconds: number;
62
- } | {
63
- readonly kind: "cron";
64
- readonly calendar: {
65
- readonly expression: string;
66
- readonly timezone: string;
67
- };
68
- };
69
- readonly input: Schema.Json;
70
- }[];
71
- readonly readOnly?: boolean;
72
- }[], unknown, never>;
73
- summaries: () => Effect.Effect<{
74
- readonly name: string;
75
- readonly description: string;
76
- readonly title?: string;
77
- readonly annotations?: {
78
- readonly title?: string;
79
- readonly readOnlyHint?: boolean;
80
- readonly destructiveHint?: boolean;
81
- readonly idempotentHint?: boolean;
82
- readonly openWorldHint?: boolean;
83
- };
84
- readonly schedules?: readonly {
85
- readonly name: string;
86
- readonly timing: {
87
- readonly kind: "interval";
88
- readonly milliseconds: number;
89
- } | {
90
- readonly kind: "cron";
91
- readonly calendar: {
92
- readonly expression: string;
93
- readonly timezone: string;
94
- };
95
- };
96
- readonly input: Schema.Json;
97
- }[];
98
- readonly readOnly?: boolean;
99
- }[], unknown, never>;
100
- describe: (name: string) => Effect.Effect<{
101
- readonly name: string;
102
- readonly description: string;
103
- readonly inputSchema: {
104
- readonly [x: string]: Schema.Json;
105
- };
106
- readonly _meta?: {
107
- readonly [x: string]: Schema.Json;
108
- };
109
- readonly title?: string;
110
- readonly outputSchema?: {
111
- readonly [x: string]: Schema.Json;
112
- };
113
- readonly annotations?: {
114
- readonly title?: string;
115
- readonly readOnlyHint?: boolean;
116
- readonly destructiveHint?: boolean;
117
- readonly idempotentHint?: boolean;
118
- readonly openWorldHint?: boolean;
119
- };
120
- readonly schedules?: readonly {
121
- readonly name: string;
122
- readonly timing: {
123
- readonly kind: "interval";
124
- readonly milliseconds: number;
125
- } | {
126
- readonly kind: "cron";
127
- readonly calendar: {
128
- readonly expression: string;
129
- readonly timezone: string;
130
- };
131
- };
132
- readonly input: Schema.Json;
133
- }[];
134
- readonly readOnly?: boolean;
135
- } | undefined, unknown, never>;
136
- resolve: (name: string) => Effect.Effect<AppOperation<unknown, unknown> | undefined, unknown, never>;
137
- };
138
- queries: {
139
- [k: string]: Operation<{
140
- readonly accountId: string;
141
- readonly input: unknown;
142
- }, unknown, "query", import("../index.js").AppContext>;
143
- };
144
- mutations: {
145
- [k: string]: Operation<{
146
- readonly accountId: string;
147
- readonly input: unknown;
148
- }, unknown, "mutation", import("../index.js").AppContext>;
149
- };
150
- }>;
151
- export {};
@@ -1,8 +0,0 @@
1
- import { HostedTool } from "../contracts/host.js";
2
- import type { DynamicTools } from "../contracts/dynamic-tools.js";
3
- import { type OperationDeclaration } from "./operations.js";
4
- /** Declare metadata discovery separately from executable resolution. Names are fully qualified. */
5
- export declare const dynamicTools: (source: {
6
- readonly list: () => Promise<readonly HostedTool[]>;
7
- readonly resolve: (name: string) => Promise<OperationDeclaration<"query" | "mutation"> | undefined>;
8
- }) => DynamicTools;