apps 0.0.1-beta.4 → 0.0.1-beta.6

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 (96) hide show
  1. package/README.md +65 -43
  2. package/framework-reference.json +1 -1
  3. package/js/{chunk-SATWJKN6.js → chunk-27F7W2LG.js} +1 -1
  4. package/js/{chunk-HDJH3RPR.js → chunk-57RKNWL2.js} +2 -2
  5. package/js/{chunk-WFSQXYUT.js → chunk-5T57N25Q.js} +15 -3
  6. package/js/{chunk-EQB7JMAL.js → chunk-6BSSI67S.js} +8 -8
  7. package/js/{chunk-3M2MEDNL.js → chunk-B3EOZTK3.js} +351 -33
  8. package/js/{chunk-FW5HBOIK.js → chunk-CDL5PM2Q.js} +307 -169
  9. package/js/{chunk-Z5NMEGJN.js → chunk-ECQFRCH4.js} +21 -9
  10. package/js/{chunk-G7ZIRKMK.js → chunk-IJX4CYZO.js} +3 -3
  11. package/js/{chunk-FDNTX5QJ.js → chunk-IPI4MFSN.js} +2 -2
  12. package/js/{chunk-2VPJHFOU.js → chunk-ITM77QPO.js} +28 -9
  13. package/js/{chunk-YEJOQEII.js → chunk-JU7VHODU.js} +1 -1
  14. package/js/{chunk-NQ3OMCA5.js → chunk-KUMBKVJD.js} +2 -2
  15. package/js/{chunk-EVJUVWN2.js → chunk-M3B3DE4K.js} +2 -2
  16. package/js/{chunk-ZJWDMTE3.js → chunk-MKWZPDR6.js} +3 -3
  17. package/js/chunk-MNMNLXBL.js +507 -0
  18. package/js/{chunk-BMOIAIVR.js → chunk-N7YDVXYJ.js} +49 -1
  19. package/js/{chunk-D47C7KG5.js → chunk-NKLWZJLE.js} +2 -2
  20. package/js/{chunk-DHUDODG5.js → chunk-OE3QQTSB.js} +41 -32
  21. package/js/{chunk-M6ZRRIBI.js → chunk-PJJ24GU7.js} +1 -1
  22. package/js/{chunk-FZJOYIZO.js → chunk-PZB6T6KU.js} +1 -1
  23. package/js/{chunk-LGIYBDWA.js → chunk-R3EV5FTO.js} +13 -1
  24. package/js/{chunk-5MQZEB6Y.js → chunk-RFVIONFX.js} +29 -12
  25. package/js/{chunk-ZCAMUXSG.js → chunk-RJDDBDSN.js} +3 -3
  26. package/js/{chunk-6VRYO2BG.js → chunk-SB4HEPNJ.js} +191 -170
  27. package/js/chunk-T7GKZBLP.js +209 -0
  28. package/js/{chunk-QKHR7BMF.js → chunk-UK573G7W.js} +1 -1
  29. package/js/{chunk-T2LAZCAD.js → chunk-VFZKSM3T.js} +1 -1
  30. package/js/{chunk-PLCMJREA.js → chunk-ZQINWV4W.js} +60 -20
  31. package/js/client.js +10 -10
  32. package/js/contracts.js +52 -16
  33. package/js/effect.js +19 -20
  34. package/js/graphql.js +34 -40
  35. package/js/host.js +19 -20
  36. package/js/index.js +189 -178
  37. package/js/mcp/effect.js +21 -22
  38. package/js/mcp/stdio.js +25 -26
  39. package/js/mcp.js +60 -45
  40. package/js/openapi.js +182 -224
  41. package/js/react.js +3 -3
  42. package/js/skills/effect.js +3 -3
  43. package/js/skills.js +12 -13
  44. package/js/storage/facet.js +4 -4
  45. package/js/ui/auth/contracts.js +2 -2
  46. package/js/ui/auth.js +5 -5
  47. package/js/ui/contracts.js +4 -4
  48. package/js/ui/serving.js +8 -8
  49. package/package.json +1 -1
  50. package/runtime.json +1 -1
  51. package/types/app-data/src/contracts/database.d.ts +33 -6
  52. package/types/app-data/src/implementation/schema.d.ts +2 -17
  53. package/types/apps/src/contracts/app.d.ts +2 -5
  54. package/types/apps/src/contracts/failure.d.ts +25 -0
  55. package/types/apps/src/contracts/host.d.ts +18 -9
  56. package/types/apps/src/contracts/mcp.d.ts +16 -0
  57. package/types/apps/src/contracts/openapi.d.ts +5 -1
  58. package/types/apps/src/contracts/operations.d.ts +0 -5
  59. package/types/apps/src/contracts/protocol-version.d.ts +2 -2
  60. package/types/apps/src/contracts/protocols/1.d.ts +15 -1
  61. package/types/apps/src/contracts/protocols/2.d.ts +2 -2
  62. package/types/apps/src/contracts/protocols/3.d.ts +676 -0
  63. package/types/apps/src/contracts/protocols/4.d.ts +1229 -0
  64. package/types/apps/src/contracts/router.d.ts +59 -0
  65. package/types/apps/src/contracts/storage.d.ts +3 -3
  66. package/types/apps/src/contracts/workflows.d.ts +34 -3
  67. package/types/apps/src/graphql.d.ts +1 -3
  68. package/types/apps/src/implementation/account-router.d.ts +12 -0
  69. package/types/apps/src/implementation/app.d.ts +5 -4
  70. package/types/apps/src/implementation/catalog-cache.d.ts +9 -2
  71. package/types/apps/src/implementation/elicitation.d.ts +1 -1
  72. package/types/apps/src/implementation/failure-detail.d.ts +25 -0
  73. package/types/apps/src/implementation/graphql-catalog.d.ts +1 -4
  74. package/types/apps/src/implementation/mcp-catalog.d.ts +1 -4
  75. package/types/apps/src/implementation/mcp-client.d.ts +35 -19
  76. package/types/apps/src/implementation/mcp.d.ts +35 -19
  77. package/types/apps/src/implementation/openapi-compile.d.ts +2 -1
  78. package/types/apps/src/implementation/openapi-source.d.ts +2 -6
  79. package/types/apps/src/implementation/operations.d.ts +26 -3
  80. package/types/apps/src/implementation/protocol-operations.d.ts +3 -4
  81. package/types/apps/src/implementation/router-catalog.d.ts +225 -0
  82. package/types/apps/src/implementation/router.d.ts +59 -0
  83. package/types/apps/src/implementation/schema.d.ts +5 -1
  84. package/types/apps/src/implementation/storage.d.ts +5 -3
  85. package/types/apps/src/implementation/webhooks.d.ts +1 -1
  86. package/types/apps/src/implementation/workflow-context.d.ts +11 -3
  87. package/types/apps/src/index.d.ts +3 -2
  88. package/types/apps/src/mcp-stdio.d.ts +2 -5
  89. package/types/apps/src/mcp.d.ts +5 -4
  90. package/types/apps/src/openapi.d.ts +6 -6
  91. package/js/chunk-PYUYJRSK.js +0 -93
  92. package/js/chunk-SWPD52J7.js +0 -35
  93. package/js/chunk-W7D7WVSY.js +0 -18
  94. package/types/apps/src/contracts/dynamic-tools.d.ts +0 -13
  95. package/types/apps/src/implementation/account-operations.d.ts +0 -151
  96. package/types/apps/src/implementation/dynamic-tools.d.ts +0 -8
@@ -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;