apps 0.0.1-beta.6 → 0.0.1-beta.60
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 +24 -21
- package/framework-reference.json +1 -1
- package/js/{chunk-ECQFRCH4.js → chunk-2ARGIHVD.js} +4 -3
- package/js/chunk-5FHWNLCI.js +88 -0
- package/js/{chunk-M3B3DE4K.js → chunk-74YVXBKY.js} +463 -218
- package/js/{chunk-NKLWZJLE.js → chunk-AQU56EPI.js} +9 -5
- package/js/chunk-CDXQDN7W.js +92 -0
- package/js/{chunk-ITM77QPO.js → chunk-CWW7QWP4.js} +126 -31
- package/js/{chunk-UK573G7W.js → chunk-EOPQ727L.js} +87 -51
- package/js/chunk-ERJ5JGCB.js +266 -0
- package/js/{chunk-RJDDBDSN.js → chunk-FFSO3J76.js} +633 -89
- package/js/{chunk-27F7W2LG.js → chunk-H2CJWXA3.js} +2 -2
- package/js/{chunk-JU7VHODU.js → chunk-H72MEDMN.js} +65 -10
- package/js/{chunk-CDL5PM2Q.js → chunk-IFJU5SYQ.js} +19082 -18402
- package/js/{chunk-RFVIONFX.js → chunk-IJ6Y2KFQ.js} +79 -41
- package/js/{chunk-T7GKZBLP.js → chunk-JIU25DIL.js} +67 -55
- package/js/{chunk-VFZKSM3T.js → chunk-JPEUKEV4.js} +3 -3
- package/js/{chunk-5T57N25Q.js → chunk-KGCTYL2S.js} +511 -63
- package/js/{chunk-KUMBKVJD.js → chunk-KLYSEHUD.js} +2 -2
- package/js/chunk-MRV45IXB.js +340 -0
- package/js/chunk-MWKHKOTL.js +240 -0
- package/js/{chunk-SB4HEPNJ.js → chunk-MZNCLCGJ.js} +883 -189
- package/js/chunk-NS3DEHVA.js +49 -0
- package/js/chunk-OD3KFKZD.js +1617 -0
- package/js/{chunk-57RKNWL2.js → chunk-PD6I2SDG.js} +4 -4
- package/js/chunk-T53665H5.js +171 -0
- package/js/{chunk-B3EOZTK3.js → chunk-TLWLJ7PD.js} +2227 -453
- package/js/{chunk-IJX4CYZO.js → chunk-TUMGL2OC.js} +228 -264
- package/js/{chunk-IPI4MFSN.js → chunk-XBG7HHXC.js} +2 -2
- package/js/{chunk-MNMNLXBL.js → chunk-ZYTA5MK4.js} +316 -69
- package/js/client.js +142 -94
- package/js/contracts.js +103 -26
- package/js/effect.js +19 -19
- package/js/{es-APDZKREY.js → es-DIULA3ZF.js} +62 -1659
- package/js/graphql.js +50 -40
- package/js/host.js +83 -58
- package/js/index.js +90 -61
- package/js/mcp/effect.js +23 -21
- package/js/mcp/stdio.js +44 -34
- package/js/mcp.js +76 -53
- package/js/openapi.js +4050 -1354
- 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 +8517 -214
- package/package.json +2 -3
- package/runtime.json +1 -1
- package/types/app-cache/src/index.d.ts +10 -1
- package/types/apps/src/contracts/api-response-error.d.ts +4 -0
- package/types/apps/src/contracts/app.d.ts +7 -3
- package/types/apps/src/contracts/cache.d.ts +20 -0
- package/types/apps/src/contracts/context.d.ts +19 -11
- package/types/apps/src/contracts/elicitation.d.ts +6 -6
- package/types/apps/src/contracts/events.d.ts +93 -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 +48 -13
- package/types/apps/src/contracts/live.d.ts +2 -0
- package/types/apps/src/contracts/mcp.d.ts +80 -10
- package/types/apps/src/contracts/network.d.ts +84 -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 +8 -4
- 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/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 +1200 -0
- 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 +2476 -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 +115 -10
- package/types/apps/src/contracts/skills.d.ts +50 -13
- package/types/apps/src/contracts/sql.d.ts +58 -0
- package/types/apps/src/contracts/ui.d.ts +19 -1
- package/types/apps/src/contracts/workflows.d.ts +6 -0
- 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/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 +4 -0
- 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 +59 -0
- package/types/apps/src/implementation/failure-detail.d.ts +25 -3
- 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 +16 -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-stdio.d.ts +1 -1
- 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 +26 -6
- 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 +18 -0
- package/types/apps/src/implementation/openapi-upgrade.d.ts +4 -0
- package/types/apps/src/implementation/operations.d.ts +17 -2
- package/types/apps/src/implementation/optimistic.d.ts +1 -1
- 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 -5
- package/types/apps/src/implementation/query-commit.d.ts +1 -1
- package/types/apps/src/implementation/router-catalog.d.ts +11 -13
- package/types/apps/src/implementation/router.d.ts +16 -5
- package/types/apps/src/implementation/runtime-yield.d.ts +7 -0
- package/types/apps/src/implementation/schema.d.ts +90 -10
- 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 +11 -5
- 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 +1 -1
- package/types/apps/src/implementation/workflows.d.ts +1 -1
- package/types/apps/src/index.d.ts +30 -12
- package/types/apps/src/mcp.d.ts +20 -1
- package/types/apps/src/openapi.d.ts +1 -1
- package/types/apps/src/react.d.ts +1 -1
- package/types/apps/src/skills.d.ts +10 -8
- package/types/telemetry/src/app-records.d.ts +42 -0
- package/types/telemetry/src/browser-operations.d.ts +7 -4
- 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 +1 -0
- package/types/telemetry/src/layer.d.ts +2 -2
- package/types/telemetry/src/ownership.d.ts +56 -0
- package/types/telemetry/src/recorded-failure.d.ts +29 -0
- package/types/telemetry/src/relay.d.ts +11 -3
- 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-6BSSI67S.js +0 -224
- package/js/chunk-MKWZPDR6.js +0 -63
- package/js/chunk-N7YDVXYJ.js +0 -186
- package/js/chunk-OE3QQTSB.js +0 -222
- package/js/chunk-PJJ24GU7.js +0 -877
- package/js/chunk-PZB6T6KU.js +0 -19
- package/js/chunk-R3EV5FTO.js +0 -97
- package/js/chunk-ZQINWV4W.js +0 -630
- 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/storage.d.ts +0 -15
package/README.md
CHANGED
|
@@ -4,10 +4,14 @@ 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";
|
|
@@ -21,12 +25,12 @@ export default defineApp({ accounts: {} }, async ({ signal }) => ({
|
|
|
21
25
|
}));
|
|
22
26
|
```
|
|
23
27
|
|
|
24
|
-
| Import | Helper
|
|
25
|
-
| ---------------- |
|
|
26
|
-
| `apps/mcp` | `mcpRouter`
|
|
27
|
-
| `apps/mcp/stdio` | `stdioRouter`
|
|
28
|
-
| `apps/graphql` | `graphqlRouter`
|
|
29
|
-
| `apps/openapi` | `
|
|
28
|
+
| Import | Helper | App dependency |
|
|
29
|
+
| ---------------- | ------------------------ | --------------------------- |
|
|
30
|
+
| `apps/mcp` | `mcpRouter`, `mcpHealth` | `@modelcontextprotocol/sdk` |
|
|
31
|
+
| `apps/mcp/stdio` | `stdioRouter` | `@modelcontextprotocol/sdk` |
|
|
32
|
+
| `apps/graphql` | `graphqlRouter` | `graphql` |
|
|
33
|
+
| `apps/openapi` | `liveOpenapiRouter` | None |
|
|
30
34
|
|
|
31
35
|
MCP and GraphQL are optional peers. Subpath imports isolate their module graphs;
|
|
32
36
|
optional peers keep unused libraries out of the dependency installation. The
|
|
@@ -80,6 +84,7 @@ export default defineApp(
|
|
|
80
84
|
(account) =>
|
|
81
85
|
mcpRouter({
|
|
82
86
|
url: "https://example.com/mcp",
|
|
87
|
+
account,
|
|
83
88
|
headers: { Authorization: "Bearer " + account.fields.token },
|
|
84
89
|
signal,
|
|
85
90
|
}),
|
|
@@ -89,8 +94,9 @@ export default defineApp(
|
|
|
89
94
|
);
|
|
90
95
|
```
|
|
91
96
|
|
|
92
|
-
MCP and GraphQL helpers
|
|
93
|
-
`ctx.cache
|
|
97
|
+
MCP and GraphQL helpers take the account their headers come from, and accept
|
|
98
|
+
`cache: ctx.cache`; an account's catalog is kept in that account's scope and
|
|
99
|
+
credentials never enter its key. They return a dynamic router, cache remote
|
|
94
100
|
metadata, and compile only the selected tool. The defaults are five minutes fresh
|
|
95
101
|
plus five minutes stale. Use `freshFor` / `staleFor` to change the windows, or
|
|
96
102
|
`revalidate: true` to await a refresh. Tool results are never cached.
|
|
@@ -120,7 +126,8 @@ returns `approved`, `denied`, or `user-approval`. It receives `toolName`, decode
|
|
|
120
126
|
`toolInput`, and `signal`. Reuse a policy function across tools or attach it when
|
|
121
127
|
composing generated tools. There is no app-level policy.
|
|
122
128
|
The framework enforces the decision before the selected tool body.
|
|
123
|
-
Human approval delivery is separate; Executor SDK call/resume persists the pending invocation.
|
|
129
|
+
Human approval delivery is separate; Executor SDK call/resume persists the pending invocation.
|
|
130
|
+
See [Tools and approvals](https://v2.executor.sh/docs/concepts/tools-and-approvals).
|
|
124
131
|
|
|
125
132
|
## Browser UI
|
|
126
133
|
|
|
@@ -170,8 +177,7 @@ Use the Promise client methods for one-time reads and explicit writes.
|
|
|
170
177
|
|
|
171
178
|
The product host supplies authentication and binds the browser to one configured
|
|
172
179
|
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).
|
|
180
|
+
activations reload open app pages. The `live-inbox` example in `framework-reference.json` is a complete app with a UI.
|
|
175
181
|
|
|
176
182
|
## Webhooks
|
|
177
183
|
|
|
@@ -184,14 +190,13 @@ The SDK creates durable subscriptions with `executor.webhooks.create`. A
|
|
|
184
190
|
subscription pins its deployment and saved account IDs while resolving fresh
|
|
185
191
|
credentials on each invocation. `.many()` sources use one subscription per
|
|
186
192
|
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).
|
|
193
|
+
The app-authoring skill's `webhooks.md` covers the lifecycle and examples.
|
|
189
194
|
|
|
190
195
|
Providers without a webhook API can use
|
|
191
196
|
`setup: { instructions: "...", signingSecret: "executor" }`
|
|
192
197
|
instead of `register` and `unregister`. The private setup page collects the
|
|
193
198
|
`state` schema and the signing secret. Agents get a setup link and safe status
|
|
194
|
-
through the normal management API.
|
|
199
|
+
through the normal management API.
|
|
195
200
|
|
|
196
201
|
## Workflows
|
|
197
202
|
|
|
@@ -205,9 +210,7 @@ Start and inspect runs through `executor.apps.workflowRuns`. Inside an app,
|
|
|
205
210
|
queries can inspect `ctx.workflows`; mutations and webhooks can also start and
|
|
206
211
|
terminate runs. Workflow execution has no live `elicit` capability.
|
|
207
212
|
|
|
208
|
-
|
|
209
|
-
self-host recovery and v1 limits, and the
|
|
210
|
-
[repository report example](../../playground/demo-apps/workflow-report/) for a full app.
|
|
213
|
+
The app-authoring skill's `workflows.md` covers replay, idempotency and limits.
|
|
211
214
|
|
|
212
215
|
Local and self-host products run authored apps in Alchemy/workerd, using the
|
|
213
216
|
same Worker build format and app-data facets as Cloud. Host filesystem and
|