apps 0.0.1-beta.9 → 0.0.1-beta.91
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 +56 -38
- package/framework-reference.json +1 -1
- package/js/chunk-3LEVTFD4.js +712 -0
- package/js/chunk-5FHWNLCI.js +88 -0
- package/js/{chunk-FL2QR3XW.js → chunk-5MDA7MKL.js} +338 -73
- package/js/chunk-6XQLA5NC.js +5047 -0
- package/js/{chunk-M3B3DE4K.js → chunk-74YVXBKY.js} +463 -218
- package/js/chunk-7PHHWYV4.js +335 -0
- package/js/chunk-DADXWWRZ.js +449 -0
- package/js/{chunk-27F7W2LG.js → chunk-DDHBUKXX.js} +18 -2
- package/js/{chunk-UK573G7W.js → chunk-EOPQ727L.js} +87 -51
- package/js/{chunk-5T57N25Q.js → chunk-GQ33QSNB.js} +583 -69
- package/js/{chunk-JU7VHODU.js → chunk-H72MEDMN.js} +65 -10
- package/js/chunk-I5C7FD5Z.js +171 -0
- package/js/{chunk-CDL5PM2Q.js → chunk-IFJU5SYQ.js} +19082 -18402
- package/js/{chunk-VFZKSM3T.js → chunk-JPEUKEV4.js} +3 -3
- package/js/{chunk-KUMBKVJD.js → chunk-KLYSEHUD.js} +2 -2
- package/js/{chunk-RFVIONFX.js → chunk-KUCCHNVY.js} +123 -44
- package/js/chunk-OD3KFKZD.js +1617 -0
- package/js/{chunk-57RKNWL2.js → chunk-PD6I2SDG.js} +4 -4
- package/js/{chunk-72JNVHPK.js → chunk-PYQLOLOC.js} +4 -3
- package/js/{chunk-ODEIDRGW.js → chunk-QWQM3CLH.js} +795 -176
- package/js/{chunk-IJX4CYZO.js → chunk-TUMGL2OC.js} +228 -264
- package/js/{chunk-IPI4MFSN.js → chunk-XBG7HHXC.js} +2 -2
- package/js/chunk-XPRZTLHD.js +1915 -0
- package/js/chunk-YNJ5CZMJ.js +93 -0
- package/js/chunk-YRGL4QEF.js +49 -0
- package/js/{chunk-Z5M2LQOZ.js → chunk-YWFUWTUJ.js} +113 -58
- package/js/client.js +142 -78
- package/js/contracts.js +142 -21
- package/js/effect.js +18 -19
- package/js/{es-APDZKREY.js → es-DIULA3ZF.js} +62 -1659
- package/js/graphql.js +49 -40
- package/js/host.js +85 -62
- package/js/index.js +165 -70
- package/js/mcp/effect.js +21 -21
- package/js/mcp.js +76 -56
- package/js/openapi.js +4189 -1411
- package/js/react.js +2 -3
- package/js/skills/effect.js +6 -3
- package/js/skills.js +208 -81
- package/js/storage/facet.js +1 -540
- package/js/ui/auth/contracts.js +2 -2
- package/js/ui/auth.js +5 -5
- package/js/ui/contracts.js +5 -4
- package/js/ui/serving.js +8605 -225
- package/package.json +3 -8
- package/runtime.json +1 -1
- package/types/app-cache/src/contracts/cache.d.ts +18 -0
- package/types/app-cache/src/index.d.ts +34 -2
- package/types/apps/src/contracts/api-response-error.d.ts +4 -0
- package/types/apps/src/contracts/app.d.ts +60 -11
- package/types/apps/src/contracts/cache.d.ts +20 -0
- package/types/apps/src/contracts/context.d.ts +60 -17
- package/types/apps/src/contracts/elicitation.d.ts +23 -7
- package/types/apps/src/contracts/events.d.ts +94 -0
- package/types/apps/src/contracts/failure.d.ts +30 -1
- package/types/apps/src/contracts/graphql.d.ts +2 -1
- package/types/apps/src/contracts/host.d.ts +1446 -17
- package/types/apps/src/contracts/icons.d.ts +28 -0
- package/types/apps/src/contracts/live.d.ts +2 -0
- package/types/apps/src/contracts/mcp.d.ts +81 -20
- package/types/apps/src/contracts/network.d.ts +120 -0
- package/types/apps/src/contracts/openapi-compile.d.ts +82 -3
- package/types/apps/src/contracts/openapi.d.ts +41 -9
- package/types/apps/src/contracts/operations.d.ts +14 -7
- package/types/apps/src/contracts/placement.d.ts +102 -0
- package/types/apps/src/contracts/protocol-version.d.ts +2 -2
- package/types/apps/src/contracts/protocols/1.d.ts +733 -81
- package/types/apps/src/contracts/protocols/10.d.ts +1450 -0
- package/types/apps/src/contracts/protocols/11.d.ts +1149 -0
- package/types/apps/src/contracts/protocols/12.d.ts +3310 -0
- package/types/apps/src/contracts/protocols/2.d.ts +69 -26
- package/types/apps/src/contracts/protocols/3.d.ts +133 -33
- package/types/apps/src/contracts/protocols/4.d.ts +122 -45
- package/types/apps/src/contracts/protocols/5.d.ts +157 -47
- package/types/apps/src/contracts/protocols/6.d.ts +1629 -0
- package/types/apps/src/contracts/protocols/7.d.ts +1785 -0
- package/types/apps/src/contracts/protocols/8.d.ts +1182 -0
- package/types/apps/src/contracts/protocols/9.d.ts +1104 -0
- package/types/apps/src/contracts/protocols/current.d.ts +6669 -0
- package/types/apps/src/contracts/protocols/oauth-6.d.ts +74 -0
- package/types/apps/src/contracts/protocols/oauth.d.ts +134 -0
- package/types/apps/src/contracts/provider-error.d.ts +9 -0
- package/types/apps/src/contracts/provider.d.ts +90 -6
- package/types/apps/src/contracts/schedules.d.ts +7 -1
- package/types/apps/src/contracts/schema.d.ts +21 -0
- package/types/apps/src/contracts/skills.d.ts +50 -13
- package/types/apps/src/contracts/sql.d.ts +63 -0
- package/types/apps/src/contracts/ui.d.ts +44 -14
- package/types/apps/src/contracts/webhooks.d.ts +24 -7
- package/types/apps/src/contracts/workflows.d.ts +19 -17
- package/types/apps/src/facet.d.ts +4 -5
- package/types/apps/src/host.d.ts +5 -0
- package/types/apps/src/implementation/account-router.d.ts +4 -3
- package/types/apps/src/implementation/app.d.ts +41 -14
- package/types/apps/src/implementation/authoring.d.ts +25 -5
- package/types/apps/src/implementation/browser-scripts.gen.d.ts +6 -0
- package/types/apps/src/implementation/cache.d.ts +29 -2
- package/types/apps/src/implementation/catalog-cache.d.ts +35 -4
- package/types/apps/src/implementation/elicitation.d.ts +18 -15
- package/types/apps/src/implementation/events.d.ts +64 -0
- package/types/apps/src/implementation/failure-detail.d.ts +28 -5
- package/types/apps/src/implementation/graphql-catalog.d.ts +3 -3
- package/types/apps/src/implementation/graphql.d.ts +4 -3
- package/types/apps/src/implementation/input-problems.d.ts +6 -2
- package/types/apps/src/implementation/invocation-timing.d.ts +18 -0
- package/types/apps/src/implementation/live.d.ts +2 -2
- package/types/apps/src/implementation/mcp-call.d.ts +6 -5
- package/types/apps/src/implementation/mcp-catalog.d.ts +6 -4
- package/types/apps/src/implementation/mcp-client.d.ts +17 -9
- package/types/apps/src/implementation/mcp-tools.d.ts +2 -1
- package/types/apps/src/implementation/mcp.d.ts +20 -9
- package/types/apps/src/implementation/network.d.ts +16 -0
- package/types/apps/src/implementation/openapi-compile.d.ts +28 -7
- package/types/apps/src/implementation/openapi-document.d.ts +46 -19
- package/types/apps/src/implementation/openapi-names.d.ts +9 -4
- package/types/apps/src/implementation/openapi-request.d.ts +10 -2
- package/types/apps/src/implementation/openapi-source.d.ts +23 -1
- package/types/apps/src/implementation/openapi-upgrade.d.ts +4 -0
- package/types/apps/src/implementation/operations.d.ts +57 -7
- package/types/apps/src/implementation/optimistic.d.ts +1 -1
- package/types/apps/src/implementation/placement.d.ts +60 -0
- package/types/apps/src/implementation/protocol-operations.d.ts +3 -0
- package/types/apps/src/implementation/provider-error.d.ts +28 -1
- package/types/apps/src/implementation/provider.d.ts +19 -4
- package/types/apps/src/implementation/query-commit.d.ts +1 -1
- package/types/apps/src/implementation/router-catalog.d.ts +20 -18
- package/types/apps/src/implementation/router.d.ts +24 -5
- package/types/apps/src/implementation/runtime-yield.d.ts +7 -0
- package/types/apps/src/implementation/schedules.d.ts +39 -8
- package/types/apps/src/implementation/schema.d.ts +98 -11
- package/types/apps/src/implementation/skills.d.ts +18 -24
- package/types/apps/src/implementation/sql.d.ts +71 -0
- package/types/apps/src/implementation/ui-account-notice.d.ts +9 -0
- package/types/apps/src/implementation/ui-auth.d.ts +1 -1
- package/types/apps/src/implementation/ui-client.d.ts +2 -2
- package/types/apps/src/implementation/ui-document.d.ts +5 -0
- package/types/apps/src/implementation/ui-errors.d.ts +1 -1
- package/types/apps/src/implementation/ui-serving.d.ts +26 -9
- package/types/apps/src/implementation/ui-watch.d.ts +1 -1
- package/types/apps/src/implementation/upstream-error.d.ts +7 -0
- package/types/apps/src/implementation/webhooks.d.ts +15 -6
- package/types/apps/src/implementation/workflow-context.d.ts +6 -2
- package/types/apps/src/implementation/workflows.d.ts +11 -4
- package/types/apps/src/index.d.ts +68 -19
- package/types/apps/src/mcp.d.ts +20 -1
- package/types/apps/src/openapi.d.ts +6 -1
- package/types/apps/src/react.d.ts +1 -1
- package/types/apps/src/skills.d.ts +10 -8
- package/types/apps/src/ui-serving.d.ts +1 -1
- package/types/telemetry/src/app-records.d.ts +42 -0
- package/types/telemetry/src/browser-operations.d.ts +2 -2
- package/types/telemetry/src/browser.d.ts +8 -3
- package/types/telemetry/src/config.d.ts +2 -2
- package/types/telemetry/src/index.d.ts +2 -1
- package/types/telemetry/src/layer.d.ts +10 -4
- package/types/telemetry/src/measurements.d.ts +1 -1
- package/types/telemetry/src/ownership.d.ts +60 -0
- package/types/telemetry/src/recorded-failure.d.ts +29 -0
- package/types/telemetry/src/relay.d.ts +16 -6
- package/types/telemetry/src/span-attributes.d.ts +17 -1
- package/types/telemetry/src/transport.d.ts +8 -1
- package/types/utils/src/api-error.d.ts +55 -0
- package/types/utils/src/connection-failure.d.ts +33 -0
- package/types/utils/src/recorded-message.d.ts +18 -0
- package/types/utils/src/user-facing-error.d.ts +83 -0
- package/js/chunk-7EK2JDX4.js +0 -299
- package/js/chunk-IKS2C5MQ.js +0 -224
- package/js/chunk-MKWZPDR6.js +0 -63
- package/js/chunk-N7YDVXYJ.js +0 -186
- package/js/chunk-NKLWZJLE.js +0 -172
- package/js/chunk-PJJ24GU7.js +0 -877
- package/js/chunk-PZB6T6KU.js +0 -19
- package/js/chunk-R3EV5FTO.js +0 -97
- package/js/chunk-SJFZCGXG.js +0 -1243
- package/js/chunk-WLE7WX2U.js +0 -2645
- package/js/chunk-YXQHV65J.js +0 -242
- package/js/chunk-ZQINWV4W.js +0 -630
- package/js/mcp/stdio.js +0 -128
- package/types/app-data/src/implementation/cursor.d.ts +0 -10
- package/types/app-data/src/implementation/index-key.d.ts +0 -7
- package/types/app-data/src/implementation/promise.d.ts +0 -68
- package/types/app-data/src/implementation/range.d.ts +0 -8
- package/types/app-data/src/implementation/schema.d.ts +0 -18
- package/types/app-data/src/implementation/sqlite.d.ts +0 -11
- package/types/app-data/src/index.d.ts +0 -4
- package/types/apps/src/contracts/storage.d.ts +0 -68
- package/types/apps/src/implementation/mcp-stdio.d.ts +0 -4
- package/types/apps/src/implementation/storage.d.ts +0 -15
- package/types/apps/src/mcp-stdio.d.ts +0 -5
package/README.md
CHANGED
|
@@ -4,16 +4,20 @@ Author apps with ordinary TypeScript and Promises. Framework operations use
|
|
|
4
4
|
Effect v4 internally. The root export contains declarations and schemas;
|
|
5
5
|
protocol helpers have separate entry points.
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
Install the exact version your Executor host runs: agents read it with the
|
|
8
|
+
Executor app's `framework.release`, and `executor apps framework` prints it. Run
|
|
9
|
+
`npm install --save-exact apps@<version>` and declare the same version in the
|
|
10
|
+
app's `package.json`. Do not install `apps@latest`; that tag is an unrelated,
|
|
11
|
+
earlier package. The package includes `framework-reference.json`, generated from
|
|
12
|
+
these declarations. The Executor app's `app-authoring` skill is the authoring
|
|
13
|
+
guide; [Author an app](https://v2.executor.sh/docs/author-an-app) summarizes
|
|
14
|
+
it. In this repository, `bun run pack` builds a local tarball.
|
|
11
15
|
|
|
12
16
|
```ts
|
|
13
17
|
import { defineApp } from "apps";
|
|
14
18
|
import { mcpRouter } from "apps/mcp";
|
|
15
19
|
|
|
16
|
-
export default defineApp({
|
|
20
|
+
export default defineApp({}, async ({ signal }) => ({
|
|
17
21
|
tools: await mcpRouter({
|
|
18
22
|
url: "https://mcp.deepwiki.com/mcp",
|
|
19
23
|
...(signal === undefined ? {} : { signal }),
|
|
@@ -21,17 +25,15 @@ export default defineApp({ accounts: {} }, async ({ signal }) => ({
|
|
|
21
25
|
}));
|
|
22
26
|
```
|
|
23
27
|
|
|
24
|
-
| Import
|
|
25
|
-
|
|
|
26
|
-
| `apps/mcp`
|
|
27
|
-
| `apps/
|
|
28
|
-
| `apps/
|
|
29
|
-
| `apps/openapi` | `openapiRouter` | None |
|
|
28
|
+
| Import | Helper | App dependency |
|
|
29
|
+
| -------------- | ------------------------ | --------------------------- |
|
|
30
|
+
| `apps/mcp` | `mcpRouter`, `mcpHealth` | `@modelcontextprotocol/sdk` |
|
|
31
|
+
| `apps/graphql` | `graphqlRouter` | `graphql` |
|
|
32
|
+
| `apps/openapi` | `liveOpenapiRouter` | None |
|
|
30
33
|
|
|
31
34
|
MCP and GraphQL are optional peers. Subpath imports isolate their module graphs;
|
|
32
|
-
optional peers keep unused libraries out of the dependency installation.
|
|
33
|
-
MCP
|
|
34
|
-
a host with process support.
|
|
35
|
+
optional peers keep unused libraries out of the dependency installation. Apps
|
|
36
|
+
reach MCP servers over HTTP; they cannot start local processes.
|
|
35
37
|
|
|
36
38
|
`defineApp` declares behavior, not a name. Package identity lives in
|
|
37
39
|
`package.json.name`; the host separately names each installed copy.
|
|
@@ -39,7 +41,7 @@ a host with process support.
|
|
|
39
41
|
Declare the needed peer in the deployed app's `package.json`, for example:
|
|
40
42
|
|
|
41
43
|
```json
|
|
42
|
-
{ "name": "deepwiki", "dependencies": { "@modelcontextprotocol/sdk": "1.
|
|
44
|
+
{ "name": "deepwiki", "dependencies": { "@modelcontextprotocol/sdk": "1.32.1" } }
|
|
43
45
|
```
|
|
44
46
|
|
|
45
47
|
Product runtimes compile authored source and declared dependencies inside workerd,
|
|
@@ -57,7 +59,7 @@ operation and shared schema before publishing the current revision. A warm call
|
|
|
57
59
|
reads that revision and the requested operation's schema dependencies. It does
|
|
58
60
|
not download, parse, or read the full catalog. `openapiRouter` remains the
|
|
59
61
|
lower-level helper for already normalized metadata.
|
|
60
|
-
`parameterDefaults` binds path, query or header values to the
|
|
62
|
+
`parameterDefaults` binds path, query or header values to the account.
|
|
61
63
|
Those parameters become optional and publish their value as the schema `default`;
|
|
62
64
|
an explicit value still wins.
|
|
63
65
|
|
|
@@ -69,17 +71,35 @@ Accounts bind at execution time. Live documents cannot change credential
|
|
|
69
71
|
placement or send credentials to another origin. Editing generated source and
|
|
70
72
|
redeploying is required to change those static choices.
|
|
71
73
|
|
|
72
|
-
|
|
74
|
+
Requirements are declared by scope. `user: { accounts }` holds each caller's
|
|
75
|
+
own accounts, read as `ctx.user.accounts`; `app: { accounts }` holds the app's
|
|
76
|
+
own accounts, which people who can edit the app link for everyone, read as
|
|
77
|
+
`ctx.app.accounts`. A requirement name is used once across both. Contexts of the
|
|
78
|
+
`"app"` scope, such as `MutationContext<typeof requirements, "app">`, have no
|
|
79
|
+
`user`: app schedules (`appCron`, `appInterval`), webhooks whose `account` is
|
|
80
|
+
`{ app: "..." }` and the workflows they start run without a caller. App
|
|
81
|
+
schedules also accept a mutation whose handler declares no parameters, unless
|
|
82
|
+
the call passes explicit type arguments: their third, the context, defaults to
|
|
83
|
+
the caller's. A
|
|
84
|
+
handler that declares its context without a type gets the caller's, with
|
|
85
|
+
`ctx.user`, as a tool's does; app schedules reject it. User
|
|
86
|
+
schedules (`userCron`, `userInterval`) run once for each member who enables them,
|
|
87
|
+
as them. `{ accounts }` requirements and `ctx.accounts` are removed.
|
|
88
|
+
|
|
89
|
+
Authenticated templates use a `provider.many()` user requirement and
|
|
90
|
+
`accountRouter` from `apps`. A factory also runs without a caller for app-scope
|
|
91
|
+
work, so `ctx.user` may be undefined there:
|
|
73
92
|
|
|
74
93
|
```ts
|
|
75
94
|
export default defineApp(
|
|
76
|
-
{ accounts: { service: provider.many() } },
|
|
77
|
-
async ({
|
|
95
|
+
{ user: { accounts: { service: provider.many() } } },
|
|
96
|
+
async ({ user, signal }) => ({
|
|
78
97
|
tools: await accountRouter(
|
|
79
|
-
accounts.service,
|
|
98
|
+
user?.accounts.service ?? [],
|
|
80
99
|
(account) =>
|
|
81
100
|
mcpRouter({
|
|
82
101
|
url: "https://example.com/mcp",
|
|
102
|
+
account,
|
|
83
103
|
headers: { Authorization: "Bearer " + account.fields.token },
|
|
84
104
|
signal,
|
|
85
105
|
}),
|
|
@@ -89,23 +109,24 @@ export default defineApp(
|
|
|
89
109
|
);
|
|
90
110
|
```
|
|
91
111
|
|
|
92
|
-
MCP and GraphQL helpers
|
|
93
|
-
`ctx.cache
|
|
112
|
+
MCP and GraphQL helpers take the account their headers come from, and accept
|
|
113
|
+
`cache: ctx.cache`; an account's catalog is kept in that account's scope and
|
|
114
|
+
credentials never enter its key. They return a dynamic router, cache remote
|
|
94
115
|
metadata, and compile only the selected tool. The defaults are five minutes fresh
|
|
95
116
|
plus five minutes stale. Use `freshFor` / `staleFor` to change the windows, or
|
|
96
117
|
`revalidate: true` to await a refresh. Tool results are never cached.
|
|
97
118
|
|
|
98
119
|
Each combined tool takes `{ accountId, input }`. `input` keeps the upstream shape;
|
|
99
|
-
`accountId` must identify
|
|
120
|
+
`accountId` must identify one of the caller's accounts that exposes that tool. Discovery
|
|
100
121
|
and validation remain specific to each account. An empty selection returns no
|
|
101
|
-
tools. This helper also works with OpenAPI
|
|
122
|
+
tools. This helper also works with OpenAPI and GraphQL operations.
|
|
102
123
|
|
|
103
124
|
Contracts live in `src/contracts/`; native operations live in `src/implementation/`.
|
|
104
125
|
Promise conversion happens at the public entry points. `apps/mcp/effect` exposes
|
|
105
126
|
the native HTTP discovery operation for host-side import probing.
|
|
106
127
|
|
|
107
128
|
Helpers are ordinary app libraries. The SDK still builds and invokes one app
|
|
108
|
-
model with the
|
|
129
|
+
model with the accounts each operation runs with; there is no protocol dispatcher.
|
|
109
130
|
Existing retained builds keep their bundled code until a new deployment.
|
|
110
131
|
|
|
111
132
|
The packaged runtime uses host protocol 1. A package missing that runtime or using
|
|
@@ -120,7 +141,8 @@ returns `approved`, `denied`, or `user-approval`. It receives `toolName`, decode
|
|
|
120
141
|
`toolInput`, and `signal`. Reuse a policy function across tools or attach it when
|
|
121
142
|
composing generated tools. There is no app-level policy.
|
|
122
143
|
The framework enforces the decision before the selected tool body.
|
|
123
|
-
Human approval delivery is separate; Executor SDK call/resume persists the pending invocation.
|
|
144
|
+
Human approval delivery is separate; Executor SDK call/resume persists the pending invocation.
|
|
145
|
+
See [Tools and approvals](https://v2.executor.sh/docs/concepts/tools-and-approvals).
|
|
124
146
|
|
|
125
147
|
## Browser UI
|
|
126
148
|
|
|
@@ -170,8 +192,7 @@ Use the Promise client methods for one-time reads and explicit writes.
|
|
|
170
192
|
|
|
171
193
|
The product host supplies authentication and binds the browser to one configured
|
|
172
194
|
app. No app ID, account token or Executor API key belongs in UI code. New
|
|
173
|
-
activations reload open app pages.
|
|
174
|
-
and [hosting notes](../../notes/app-ui.md).
|
|
195
|
+
activations reload open app pages. The `live-inbox` example in `framework-reference.json` is a complete app with a UI.
|
|
175
196
|
|
|
176
197
|
## Webhooks
|
|
177
198
|
|
|
@@ -184,14 +205,13 @@ The SDK creates durable subscriptions with `executor.webhooks.create`. A
|
|
|
184
205
|
subscription pins its deployment and saved account IDs while resolving fresh
|
|
185
206
|
credentials on each invocation. `.many()` sources use one subscription per
|
|
186
207
|
selected source account. Local, self-host and cloud use the same author API.
|
|
187
|
-
|
|
188
|
-
[the GitHub/Gmail example](../../playground/demo-apps/issue-mail/webhooks.ts).
|
|
208
|
+
The app-authoring skill's `webhooks.md` covers the lifecycle and examples.
|
|
189
209
|
|
|
190
210
|
Providers without a webhook API can use
|
|
191
211
|
`setup: { instructions: "...", signingSecret: "executor" }`
|
|
192
212
|
instead of `register` and `unregister`. The private setup page collects the
|
|
193
213
|
`state` schema and the signing secret. Agents get a setup link and safe status
|
|
194
|
-
through the normal management API.
|
|
214
|
+
through the normal management API.
|
|
195
215
|
|
|
196
216
|
## Workflows
|
|
197
217
|
|
|
@@ -205,9 +225,7 @@ Start and inspect runs through `executor.apps.workflowRuns`. Inside an app,
|
|
|
205
225
|
queries can inspect `ctx.workflows`; mutations and webhooks can also start and
|
|
206
226
|
terminate runs. Workflow execution has no live `elicit` capability.
|
|
207
227
|
|
|
208
|
-
|
|
209
|
-
self-host recovery and v1 limits, and the
|
|
210
|
-
[repository report example](../../playground/demo-apps/workflow-report/) for a full app.
|
|
228
|
+
The app-authoring skill's `workflows.md` covers replay, idempotency and limits.
|
|
211
229
|
|
|
212
230
|
Local and self-host products run authored apps in Alchemy/workerd, using the
|
|
213
231
|
same Worker build format and app-data facets as Cloud. Host filesystem and
|
|
@@ -222,7 +240,7 @@ private data; it also includes the current credential fingerprint. Use the
|
|
|
222
240
|
shared cache for public metadata that is identical across accounts.
|
|
223
241
|
|
|
224
242
|
```ts
|
|
225
|
-
const projects = await ctx.cache.forAccount(ctx.accounts.service).get({
|
|
243
|
+
const projects = await ctx.cache.forAccount(ctx.user.accounts.service).get({
|
|
226
244
|
key: ["projects", region],
|
|
227
245
|
schema: array(object({ id: string(), name: string() })),
|
|
228
246
|
freshFor: "1 minute",
|
|
@@ -263,8 +281,8 @@ mutation can be mounted at only one path.
|
|
|
263
281
|
|
|
264
282
|
Protocol helpers return routers, so an app mounts several sources under keys.
|
|
265
283
|
`mcpRouter` takes its title, description, icons and instructions from the
|
|
266
|
-
server, and `liveOpenapiRouter` from the document's `info` and tags. `
|
|
267
|
-
|
|
284
|
+
server, and `liveOpenapiRouter` from the document's `info` and tags. `openapiRouter`
|
|
285
|
+
and `graphqlRouter` carry no source metadata. A nested router that fails to load is reported on its own catalog entry;
|
|
268
286
|
the app's other tools still load. The root failing fails discovery.
|
|
269
287
|
|
|
270
288
|
`dynamicRouter({ list, resolve })` separates descriptions from executable
|
|
@@ -277,7 +295,7 @@ duplicate names.
|
|
|
277
295
|
|
|
278
296
|
```ts
|
|
279
297
|
export default defineApp(
|
|
280
|
-
{
|
|
298
|
+
{},
|
|
281
299
|
{
|
|
282
300
|
tools: dynamicRouter({
|
|
283
301
|
list: async () => [
|