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/framework-reference.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"0.0.1-beta.9","digest":"e90072f050d1e76dba712078ce377ed3a9d46f84465a1f3faf361e3f4cde7b2f","entries":[{"symbol":"AppCache","kind":"type","summary":"Cache keys describe every input that affects the value; the host adds app/build isolation.","signatures":[],"definition":"export interface AppCache {\n readonly get: <A>(options: CacheGetOptions<A>) => Promise<A>;\n /** Await a fresh load, coalescing concurrent refreshes and retaining the previous value on failure. */\n readonly revalidate: <A>(options: CacheGetOptions<A>) => Promise<A>;\n readonly read: <A>(key: JsonValue, schema: Schema<A, boolean>) => Promise<A | undefined>;\n readonly readMany: <A>(\n keys: readonly JsonValue[],\n schema: Schema<A, boolean>,\n ) => Promise<readonly (A | undefined)[]>;\n readonly write: (\n entries: readonly { readonly key: JsonValue; readonly value: JsonValue }[],\n retention: Duration.Input,\n ) => Promise<void>;\n readonly invalidate: (key: JsonValue) => Promise<void>;\n /**\n * Scope entries to a bound account and its credential generation. Token renewal keeps the\n * entries; reconnecting or replacing the account's credentials starts an empty scope.\n */\n readonly forAccount: (account: { readonly id: string }) => AppCache;\n}","tags":[],"docs":"tools.md","source":"apps/src/contracts/cache.ts","related":["apps.AppCache","apps.CacheGetOptions","apps.JsonValue","apps.Schema","Schema"],"examples":["live-inbox"]},{"symbol":"AppCache.forAccount","kind":"method","summary":"Scope entries to a bound account and its credential generation. Token renewal keeps the\nentries; reconnecting or replacing the account's credentials starts an empty scope.","signatures":["(account: { readonly id: string; }): AppCache"],"tags":[],"docs":"tools.md","source":"apps/src/contracts/cache.ts","related":["AppCache","apps.AppCache"],"examples":["live-inbox"]},{"symbol":"AppCache.get","kind":"method","summary":"","signatures":["<A>(options: CacheGetOptions<A>): Promise<A>"],"tags":[],"docs":"tools.md","source":"apps/src/contracts/cache.ts","related":["AppCache","apps.CacheGetOptions"],"examples":["live-inbox"]},{"symbol":"AppCache.invalidate","kind":"method","summary":"","signatures":["(key: JsonValue): Promise<void>"],"tags":[],"docs":"tools.md","source":"apps/src/contracts/cache.ts","related":["AppCache","apps.JsonValue"],"examples":["live-inbox"]},{"symbol":"AppCache.read","kind":"method","summary":"","signatures":["<A>(key: JsonValue, schema: Schema<A, boolean>): Promise<A | undefined>"],"tags":[],"docs":"tools.md","source":"apps/src/contracts/cache.ts","related":["AppCache","apps.JsonValue","apps.Schema","Schema"],"examples":["live-inbox"]},{"symbol":"AppCache.readMany","kind":"method","summary":"","signatures":["<A>(keys: readonly JsonValue[], schema: Schema<A, boolean>): Promise<readonly (A | undefined)[]>"],"tags":[],"docs":"tools.md","source":"apps/src/contracts/cache.ts","related":["AppCache","apps.JsonValue","apps.Schema","Schema"],"examples":["live-inbox"]},{"symbol":"AppCache.revalidate","kind":"method","summary":"Await a fresh load, coalescing concurrent refreshes and retaining the previous value on failure.","signatures":["<A>(options: CacheGetOptions<A>): Promise<A>"],"tags":[],"docs":"tools.md","source":"apps/src/contracts/cache.ts","related":["AppCache","apps.CacheGetOptions"],"examples":["live-inbox"]},{"symbol":"AppCache.write","kind":"method","summary":"","signatures":["(entries: readonly { readonly key: JsonValue; readonly value: JsonValue; }[], retention: Duration.Input): Promise<void>"],"tags":[],"docs":"tools.md","source":"apps/src/contracts/cache.ts","related":["AppCache","apps.JsonValue"],"examples":["live-inbox"]},{"symbol":"AppClient.dispose","kind":"method","summary":"Close this client when its page or embedding owner is removed.","signatures":["(): Promise<void>"],"tags":[],"docs":"ui.md","source":"apps/src/implementation/ui-client.ts","related":[],"examples":["live-inbox"]},{"symbol":"AppClient.mutate","kind":"method","summary":"Execute a write once in this client's queue. Success acknowledges the write; queries reconcile afterward.","signatures":["<Input, Output>(reference: OperationReference<Input, Output, \"mutation\">, input: NoInfer<Input>, output: Schema<NoInfer<Output>, boolean>): Promise<Output>"],"tags":[],"docs":"ui.md","source":"apps/src/implementation/ui-client.ts","related":["apps.Schema","apps/client.OperationReference","Schema"],"examples":["live-inbox"]},{"symbol":"AppClient.mutation","kind":"method","summary":"Create a callable mutation with optional withOptimisticUpdate projections over mounted queries.","signatures":["<Input, Output>(reference: OperationReference<Input, Output, \"mutation\">, output: Schema<NoInfer<Output>, boolean>): AppMutation<Input, Output>"],"tags":[],"docs":"ui.md","source":"apps/src/implementation/ui-client.ts","related":["AppMutation","apps.Schema","apps/client.AppMutation","apps/client.OperationReference","Schema"],"examples":["live-inbox"]},{"symbol":"AppClient.query","kind":"method","summary":"Query this app once, with a runtime-validated response. Does not populate the mounted query cache.","signatures":["<Input, Output>(reference: OperationReference<Input, Output, \"query\">, input: NoInfer<Input>, output: Schema<NoInfer<Output>, boolean>): Promise<NoInfer<Output>>"],"tags":[],"docs":"ui.md","source":"apps/src/implementation/ui-client.ts","related":["apps.Schema","apps/client.OperationReference","Schema"],"examples":["live-inbox"]},{"symbol":"AppClient.queryAtom","kind":"method","summary":"Share a live query across mounts and reconcile optimistic changes against fresh server reads.","signatures":["<Input, Output>(reference: OperationReference<Input, Output, \"query\">, input: NoInfer<Input>, output: Schema<NoInfer<Output>, boolean>): Atom.Atom<AsyncResult<Output, unknown>>"],"tags":[],"docs":"ui.md","source":"apps/src/implementation/ui-client.ts","related":["apps.Schema","apps/client.OperationReference","Schema"],"examples":["live-inbox"]},{"symbol":"AppContext","kind":"type","summary":"Current credentials for one invocation. Never retained in source or build output.","signatures":[],"definition":"export interface BoundContext<Slots extends AccountSlots> {\n /** Explicit app/build-scoped caching. Account-specific loaders opt into forAccount. */\n readonly cache: import(\"./cache.ts\").AppCache;\n /** Text files retained in this deployment. Paths are package-relative, never host filesystem paths. */\n readonly files: readonly SkillFile[];\n /** Read-only run management, bound to this configured app. */\n readonly workflows: WorkflowReads;\n /** Ask for user input during this tool call. Unavailable during discovery and after the invocation closes. */\n readonly elicit: Elicit;\n /** Invocation-owned HTTP requests with trace propagation and host cancellation. */\n readonly fetch: (input: string | URL | Request, init?: RequestInit) => Promise<Response>;\n /** Host cancellation for this invocation. Pass it to fetch and other interruptible APIs. */\n readonly signal: AbortSignal;\n readonly accounts: {\n readonly [Slot in keyof Slots]: AccountsFor<Slots[Slot]>;\n };\n}","tags":[],"docs":"tools.md","source":"apps/src/contracts/app.ts","related":["AppCache","apps.AccountSlots","apps.AppCache","apps.Elicit","apps.SkillFile","apps.WorkflowReads","apps/skills.SkillFile"],"examples":["live-inbox"]},{"symbol":"AppContext.elicit","kind":"method","summary":"Ask for user input during this tool call. Unavailable during discovery and after the invocation closes.","signatures":["(request: FormElicitation): Promise<ElicitationResponse>"],"tags":[],"docs":"tools.md","source":"apps/src/contracts/app.ts","related":["AppContext","apps.ElicitationResponse","apps.FormElicitation"],"examples":["live-inbox"]},{"symbol":"AppContext.fetch","kind":"method","summary":"Invocation-owned HTTP requests with trace propagation and host cancellation.","signatures":["(input: string | URL | Request, init?: RequestInit): Promise<Response>"],"tags":[],"docs":"tools.md","source":"apps/src/contracts/app.ts","related":["AppContext"],"examples":["live-inbox"]},{"symbol":"AppMutation","kind":"type","summary":"A callable mutation. Success means the write was acknowledged; its overlay stays until fresh reads finish.","signatures":[],"definition":"export interface AppMutation<Input, Output> {\n (input: Input): Promise<Output>;\n /** Return a new mutation handle with this projection. Failures remove only this invocation's changes. */\n withOptimisticUpdate(update: OptimisticUpdate<Input>): AppMutation<Input, Output>;\n}","tags":[],"docs":"ui.md","source":"apps/src/contracts/optimistic.ts","related":["apps/client.AppMutation","apps/client.OptimisticUpdate"],"examples":["live-inbox"]},{"symbol":"AppMutation.withOptimisticUpdate","kind":"method","summary":"Return a new mutation handle with this projection. Failures remove only this invocation's changes.","signatures":["(update: OptimisticUpdate<Input>): AppMutation<Input, Output>"],"tags":[],"docs":"ui.md","source":"apps/src/contracts/optimistic.ts","related":["AppMutation","apps/client.AppMutation","apps/client.OptimisticUpdate"],"examples":["live-inbox"]},{"symbol":"apps.AccountCheckContext","kind":"type","summary":"The account a provider's check verifies, with invocation-owned HTTP and cancellation.","signatures":[],"definition":"export interface AccountCheckContext<Auth extends AuthMethods> {\n readonly account: AccountOfMethods<Auth>;\n readonly fetch: (input: string | URL | Request, init?: RequestInit) => Promise<Response>;\n readonly signal: AbortSignal;\n}","tags":[],"docs":"tools.md","source":"apps/src/contracts/provider.ts","related":["apps.AuthMethods"],"examples":["live-inbox"]},{"symbol":"apps.AccountCheckResult","kind":"type","summary":"A passing account check. Failures are thrown, so there is no failing variant.","signatures":[],"definition":"AccountCheckResult = Schema.Struct({ accountInfo: Schema.optionalKey(AccountInfo) })","tags":[],"docs":"tools.md","source":"apps/src/contracts/provider.ts","related":["apps.AccountInfo","apps.Schema","Schema"],"examples":["live-inbox"]},{"symbol":"apps.AccountInfo","kind":"type","summary":"Upstream identity that a passing account check may report for display. Only these fields are\nretained; the host never stores raw provider responses.","signatures":[],"definition":"AccountInfo = Schema.Struct({\n externalId: Schema.optionalKey(displayText),\n displayName: Schema.optionalKey(displayText),\n username: Schema.optionalKey(displayText),\n email: Schema.optionalKey(displayText),\n avatarUrl: Schema.optionalKey(HttpUrl),\n profileUrl: Schema.optionalKey(HttpUrl),\n})","tags":[],"docs":"tools.md","source":"apps/src/contracts/provider.ts","related":["apps.Schema","Schema"],"examples":["live-inbox"]},{"symbol":"apps.AccountOf","kind":"type","summary":"One selected account, discriminated by its author-chosen method name.","signatures":[],"definition":"export type AccountOf<P> = P extends Provider<infer Auth> ? AccountOfMethods<Auth> : never;","tags":[],"docs":"tools.md","source":"apps/src/contracts/provider.ts","related":["Provider"],"examples":["live-inbox"]},{"symbol":"apps.accountRouter","kind":"function","summary":"Discover each selected account's router and combine matching names.\nCalls take { accountId, input }; each branch retains its account's input schema,\ncredentials, approval and output validation. Empty selections expose no operations.\nDiscovery is sequential and cancellation follows the caller's signal.","signatures":["<Account extends { readonly id: string; }>(accounts: readonly Account[], discover: (account: Account) => Promise<RouterDeclaration>, options: { readonly signal: AbortSignal; }): Promise<RouterDeclaration>"],"tags":[],"docs":"tools.md","source":"apps/src/implementation/account-router.ts","related":["apps.RouterDeclaration"],"examples":["live-inbox"]},{"symbol":"apps.AccountSlots","kind":"type","summary":"Named requirements for one account or a collection from a provider.","signatures":[],"definition":"export type AccountSlots = Readonly<\n Record<string, Provider<AuthMethods> | ManyAccounts<AuthMethods>>\n>;","tags":[],"docs":"tools.md","source":"apps/src/contracts/app.ts","related":["apps.AuthMethods","Provider"],"examples":["live-inbox"]},{"symbol":"apps.App","kind":"type","summary":"Public app handle; the native app is retained for host use without an async round trip.","signatures":[],"definition":"export interface App<\n Requirements extends AppRequirements,\n Def extends AppDefinition<Requirements>,\n> {\n readonly [InternalApp]: NativeApp<Requirements[\"accounts\"], EffectDefinition<Def>>;\n readonly accounts: Requirements[\"accounts\"];\n readonly evaluate: (context: AppContext<Requirements>) => Promise<Def>;\n}","tags":[],"docs":"tools.md","source":"apps/src/implementation/app.ts","related":["AppContext","apps.AppContext","apps.AppDefinition","apps.AppRequirements"],"examples":["live-inbox"]},{"symbol":"apps.AppCache","kind":"type","summary":"Cache keys describe every input that affects the value; the host adds app/build isolation.","signatures":[],"definition":"export interface AppCache {\n readonly get: <A>(options: CacheGetOptions<A>) => Promise<A>;\n /** Await a fresh load, coalescing concurrent refreshes and retaining the previous value on failure. */\n readonly revalidate: <A>(options: CacheGetOptions<A>) => Promise<A>;\n readonly read: <A>(key: JsonValue, schema: Schema<A, boolean>) => Promise<A | undefined>;\n readonly readMany: <A>(\n keys: readonly JsonValue[],\n schema: Schema<A, boolean>,\n ) => Promise<readonly (A | undefined)[]>;\n readonly write: (\n entries: readonly { readonly key: JsonValue; readonly value: JsonValue }[],\n retention: Duration.Input,\n ) => Promise<void>;\n readonly invalidate: (key: JsonValue) => Promise<void>;\n /**\n * Scope entries to a bound account and its credential generation. Token renewal keeps the\n * entries; reconnecting or replacing the account's credentials starts an empty scope.\n */\n readonly forAccount: (account: { readonly id: string }) => AppCache;\n}","tags":[],"docs":"tools.md","source":"apps/src/contracts/cache.ts","related":["AppCache","apps.CacheGetOptions","apps.JsonValue","apps.Schema","Schema"],"examples":["live-inbox"]},{"symbol":"apps.AppContext","kind":"type","summary":"Context available during dynamic app evaluation; storage opens only for handlers.","signatures":[],"definition":"export type AppContext<Requirements extends AppRequirements = AppRequirements> = BoundContext<\n Requirements[\"accounts\"]\n>;","tags":[],"docs":"tools.md","source":"apps/src/contracts/context.ts","related":["AppContext","apps.AppRequirements"],"examples":["live-inbox"]},{"symbol":"apps.AppDefinition","kind":"type","summary":"Author definition projected from native capabilities. Excluding callable objects keeps\nfactories from being inferred as definitions and preserves contextual handler inference.","signatures":[],"definition":"export type AppDefinition<Requirements extends AppRequirements> = {\n readonly [Key in keyof NativeDefinition<WebhookContext<Requirements>>]: Key extends \"workflows\"\n ? Readonly<Record<string, WorkflowDeclaration<WorkflowContext<Requirements>>>>\n : Key extends \"schedules\"\n ? Readonly<Record<string, ScheduleDeclaration<MutationContext<Requirements>>>>\n : Key extends \"tools\"\n ? RouterDeclaration<QueryContext<Requirements>, MutationContext<Requirements>>\n : Key extends \"webhooks\"\n ? PromiseCatalog<NonNullable<NativeDefinition<WebhookContext<Requirements>>[Key]>>\n : NativeDefinition<WebhookContext<Requirements>>[Key];\n} & {\n readonly name?: never;\n readonly queries?: never;\n readonly mutations?: never;\n readonly call?: never;\n};","tags":[],"docs":"tools.md","source":"apps/src/implementation/app.ts","related":["apps.AppRequirements","apps.MutationContext","apps.QueryContext","apps.RouterDeclaration","apps.ScheduleDeclaration","apps.WebhookContext","apps.WorkflowContext","apps.WorkflowDeclaration"],"examples":["live-inbox"]},{"symbol":"apps.AppRequirements","kind":"type","summary":"Requirements are pure values; selected accounts and database sessions belong to invocations.","signatures":[],"definition":"export interface AppRequirements {\n readonly accounts: AccountSlots;\n readonly database?: DatabaseDefinition;\n}","tags":[],"docs":"tools.md","source":"apps/src/contracts/context.ts","related":["apps.AccountSlots","apps.DatabaseDefinition"],"examples":["live-inbox"]},{"symbol":"apps.Approval","kind":"type","summary":"Synchronous or async policy, projected from the framework's native contract.","signatures":[],"definition":"export type Approval<Input = unknown> = (\n ...args: Parameters<NativeApproval<Input>>\n) =>\n | Effect.Success<ReturnType<NativeApproval<Input>>>\n | Promise<Effect.Success<ReturnType<NativeApproval<Input>>>>;","tags":[],"docs":"tools.md","source":"apps/src/approval.ts","related":["apps/operations/approval.Approval"],"examples":["live-inbox"]},{"symbol":"apps.ApprovalContext","kind":"type","summary":"Context for one tool's policy. toolInput is the same decoded value passed to run.","signatures":[],"definition":"export interface ApprovalContext<Input = unknown> {\n readonly toolName: string;\n readonly toolInput: Input;\n readonly signal: AbortSignal;\n}","tags":[],"docs":"tools.md","source":"apps/src/contracts/approval.ts","related":["apps/operations/approval.ApprovalContext"],"examples":["live-inbox"]},{"symbol":"apps.ApprovalDecision","kind":"type","summary":"Approve this call, deny it, or stop for a human decision.\nParsed result of one tool approval policy.","signatures":[],"definition":"ApprovalDecision = Schema.Literals([\"approved\", \"denied\", \"user-approval\"])","tags":[],"docs":"tools.md","source":"apps/src/contracts/approval.ts","related":["apps.Schema","apps/operations/approval.ApprovalDecision","Schema"],"examples":["live-inbox"]},{"symbol":"apps.array","kind":"function","summary":"An array whose elements use the given schema.","signatures":["<T>(item: Schema<T, boolean>): Schema<readonly T[]>"],"tags":[],"docs":"tools.md","source":"apps/src/implementation/schema.ts","related":["apps.Schema","Schema"],"examples":["live-inbox"]},{"symbol":"apps.AuthMethod","kind":"type","summary":"Supported declarations; these acquire credentials rather than normalize them.","signatures":[],"definition":"export type AuthMethod =\n | SecretsMethod<Schema.Decoder<unknown>>\n | OAuth2Method<Schema.Decoder<unknown>>;","tags":[],"docs":"tools.md","source":"apps/src/contracts/provider.ts","related":["apps.OAuth2Method","apps.Schema","apps.SecretsMethod","Schema"],"examples":["live-inbox"]},{"symbol":"apps.AuthMethodData","kind":"type","summary":"Infer the data for one method from its native Effect decoder.","signatures":[],"definition":"export type AuthMethodData<Method> =\n Method extends SecretsMethod<infer Fields>\n ? Fields[\"Type\"]\n : Method extends OAuth2Method<infer Response>\n ? Response[\"Type\"]\n : never;","tags":[],"docs":"tools.md","source":"apps/src/contracts/provider.ts","related":["apps.Fields","apps.OAuth2Method","apps.SecretsMethod"],"examples":["live-inbox"]},{"symbol":"apps.AuthMethods","kind":"type","summary":"Auth method names are chosen by the provider author.","signatures":[],"definition":"export type AuthMethods = Readonly<Record<string, AuthMethod>>;","tags":[],"docs":"tools.md","source":"apps/src/contracts/provider.ts","related":["apps.AuthMethod"],"examples":["live-inbox"]},{"symbol":"apps.boolean","kind":"function","summary":"A boolean. No coercion.","signatures":["(): Schema<boolean>"],"tags":[],"docs":"tools.md","source":"apps/src/implementation/schema.ts","related":["apps.Schema","Schema"],"examples":["live-inbox"]},{"symbol":"apps.CacheGetOptions","kind":"type","summary":"Load options shared by normal reads and explicit refreshes.","signatures":[],"definition":"export interface CacheGetOptions<A> {\n readonly key: JsonValue;\n readonly schema: Schema<A, boolean>;\n readonly freshFor: Duration.Input;\n readonly staleFor?: Duration.Input;\n readonly load: (context: CacheLoadContext) => Promise<A>;\n}","tags":[],"docs":"tools.md","source":"apps/src/contracts/cache.ts","related":["apps.CacheLoadContext","apps.JsonValue","apps.Schema","Schema"],"examples":["live-inbox"]},{"symbol":"apps.CacheLoadContext","kind":"type","summary":"A cache loader owns its own cancellation and HTTP capability, including during SWR.","signatures":[],"definition":"export interface CacheLoadContext {\n readonly cache: AppCache;\n readonly signal: AbortSignal;\n readonly fetch: typeof globalThis.fetch;\n}","tags":[],"docs":"tools.md","source":"apps/src/contracts/cache.ts","related":["AppCache","apps.AppCache"],"examples":["live-inbox"]},{"symbol":"apps.cron","kind":"function","summary":"Calendar alternative for wall-clock schedules. UTC is the explicit default when timezone is omitted.","signatures":["<Input, Output, Context>(calendar: { readonly expression: string; readonly timezone?: string; }, operation: Operation<Input, Output, \"mutation\", Context>, input: NoInfer<Input>): ScheduleDeclaration<Context>"],"tags":[],"docs":"tools.md","source":"apps/src/implementation/schedules.ts","related":["apps.Operation","apps.ScheduleDeclaration"],"examples":["live-inbox"]},{"symbol":"apps.Database","kind":"type","summary":"Mutation methods stay inside one native SQLite transaction.","signatures":[],"definition":"export type Database<T extends Tables> = {\n readonly [K in keyof T]: WriteTable<RowOf<T[K]>, InputValue<T[K][\"fields\"]>, IndexOf<T[K]>>;\n};","tags":[],"docs":"tools.md","source":"apps/src/contracts/storage.ts","related":[],"examples":["live-inbox"]},{"symbol":"apps.DatabaseDefinition","kind":"type","summary":"Pure database declaration shared by requirements and derived handler contexts.","signatures":[],"definition":"export interface DatabaseDefinition<T extends Tables = Tables> {\n readonly schema: DatabaseSchema;\n readonly tables: T;\n}","tags":[],"docs":"tools.md","source":"apps/src/contracts/storage.ts","related":[],"examples":["live-inbox"]},{"symbol":"apps.DatabaseReader","kind":"type","summary":"Queries receive only read methods.","signatures":[],"definition":"export type DatabaseReader<T extends Tables> = {\n readonly [K in keyof T]: ReadTable<RowOf<T[K]>, IndexOf<T[K]>>;\n};","tags":[],"docs":"tools.md","source":"apps/src/contracts/storage.ts","related":[],"examples":["live-inbox"]},{"symbol":"apps.decodeJson","kind":"function","summary":"Decode a fetch response with safe status/body errors. Unexpected reader failures propagate unchanged.","signatures":["<T>(response: JsonResponse, schema: Schema<T, boolean>): Promise<T>"],"tags":[],"docs":"tools.md","source":"apps/src/index.ts","related":["apps.JsonResponse","apps.Schema","Schema"],"examples":["live-inbox"]},{"symbol":"apps.defineApp","kind":"function","summary":"Assemble app behavior. Package names belong in package.json; hosts name installed copies.","signatures":["<const Requirements extends AppRequirements, Def extends AppDefinition<Requirements>>(requirements: Requirements, definition: (Def & AppDefinition<Requirements>) | ((context: AppContext<Requirements>) => Promise<Def & AppDefinition<Requirements>>)): App<Requirements, Def>"],"tags":[],"docs":"tools.md","source":"apps/src/implementation/app.ts","related":["AppContext","apps.App","apps.AppContext","apps.AppDefinition","apps.AppRequirements"],"examples":["live-inbox"]},{"symbol":"apps.defineDatabase","kind":"function","summary":"Declare storage independently of handlers; the host binds each invocation's database.","signatures":["<const T extends Tables>(tables: T): DatabaseDefinition<T>"],"tags":[],"docs":"tools.md","source":"apps/src/implementation/storage.ts","related":["apps.DatabaseDefinition"],"examples":["live-inbox"]},{"symbol":"apps.defineProvider","kind":"function","summary":"Retain the provider and literal method names without registering or authenticating it.","signatures":["<const Auth extends AuthMethods>({ health, ...options }: ProviderOptions<Auth>): Provider<Auth>"],"tags":[],"docs":"tools.md","source":"apps/src/implementation/provider.ts","related":["apps.AuthMethods","apps.ProviderOptions","Provider"],"examples":["live-inbox"]},{"symbol":"apps.dynamicRouter","kind":"function","summary":"Declare a router whose tools are discovered when read. `list` returns tools with names relative\nto this router; mark queries with `readOnly: true`. `resolve` receives one of those names.","signatures":["(source: { readonly meta?: () => RouterOptions | Promise<RouterOptions>; readonly list: () => readonly HostedTool[] | Promise<readonly HostedTool[]>; readonly resolve: (name: string) => OperationDeclaration<\"query\" | \"mutation\", unknown> | undefined | Promise<OperationDeclaration<\"query\" | \"mutation\", unknown> | undefined>; }): RouterDeclaration"],"tags":[],"docs":"tools.md","source":"apps/src/implementation/router.ts","related":["apps.RouterDeclaration","apps.RouterOptions"],"examples":["live-inbox"]},{"symbol":"apps.dynamicSkills","kind":"function","summary":"Declare skills that load only when skills are read, such as `list: () => githubSkills({...})`.","signatures":["(source: { readonly list: () => readonly AppSkillSource[] | Promise<readonly AppSkillSource[]>; }): DynamicSkills"],"tags":[],"docs":"tools.md","source":"apps/src/implementation/dynamic-skills.ts","related":[],"examples":["live-inbox"]},{"symbol":"apps.Elicit","kind":"type","summary":"App authors await standard MCP form responses without depending on Effect or a particular host.","signatures":[],"definition":"export type Elicit = (request: FormElicitation) => Promise<ElicitationResponse>;","tags":[],"docs":"tools.md","source":"apps/src/contracts/elicitation.ts","related":["apps.ElicitationResponse","apps.FormElicitation"],"examples":["live-inbox"]},{"symbol":"apps.ElicitationResponse","kind":"type","summary":"MCP accept/decline/cancel response, without imposing a client or transport on app code.","signatures":[],"definition":"ElicitationResponse = Schema.Union([\n Schema.Struct({ ...McpSchema.ElicitAcceptResult.fields, _meta: Schema.optional(JsonObject) }),\n Schema.Struct({ ...McpSchema.ElicitDeclineResult.fields, _meta: Schema.optional(JsonObject) }),\n])","tags":[],"docs":"tools.md","source":"apps/src/contracts/elicitation.ts","related":["apps.JsonObject","apps.Schema","Schema"],"examples":["live-inbox"]},{"symbol":"apps.Fields","kind":"type","summary":"Named author fields.","signatures":[],"definition":"export type Fields = Readonly<Record<string, Schema<unknown, boolean>>>;","tags":[],"docs":"tools.md","source":"apps/src/implementation/schema.ts","related":["apps.Schema","Schema"],"examples":["live-inbox"]},{"symbol":"apps.FormElicitation","kind":"type","summary":"Plain-data form request derived from the pinned MCP protocol schema.","signatures":[],"definition":"FormElicitation = Schema.Struct({\n ...McpSchema.ElicitRequestFormParams.fields,\n mode: Schema.Literal(\"form\"),\n requestedSchema: Schema.toEncoded(McpSchema.ElicitRequestFormParams.fields.requestedSchema),\n _meta: Schema.optional(JsonObject),\n})","tags":[],"docs":"tools.md","source":"apps/src/contracts/elicitation.ts","related":["apps.JsonObject","apps.Schema","Schema"],"examples":["live-inbox"]},{"symbol":"apps.id","kind":"function","summary":"A row reference records the target table; existence is not a foreign-key constraint.","signatures":["(table: string): Schema<string>"],"tags":[],"docs":"tools.md","source":"apps/src/implementation/schema.ts","related":["apps.Schema","Schema"],"examples":["live-inbox"]},{"symbol":"apps.Infer","kind":"type","summary":"Infer the parsed author value.","signatures":[],"definition":"export type Infer<S> = S extends Schema<infer T, boolean> ? T : never;","tags":[],"docs":"tools.md","source":"apps/src/implementation/schema.ts","related":["apps.Schema","Schema"],"examples":["live-inbox"]},{"symbol":"apps.interval","kind":"function","summary":"Run an existing mutation at a fixed interval. Installation enablement belongs to the host.","signatures":["<Input, Output, Context>(duration: Interval, operation: Operation<Input, Output, \"mutation\", Context>, input: NoInfer<Input>): ScheduleDeclaration<Context>"],"tags":[],"docs":"tools.md","source":"apps/src/implementation/schedules.ts","related":["apps.Operation","apps.ScheduleDeclaration"],"examples":["live-inbox"]},{"symbol":"apps.json","kind":"function","summary":"Any JSON value. Values still cross the native JSON decoder.","signatures":["(): Schema<EffectSchema.Json>"],"tags":[],"docs":"tools.md","source":"apps/src/implementation/schema.ts","related":["apps.Schema","Schema"],"examples":["live-inbox"]},{"symbol":"apps.JsonObject","kind":"type","summary":"A JSON object, distinct from an authored value schema.","signatures":[],"definition":"JsonObject = Schema.Record(Schema.String, JsonValue)","tags":[],"docs":"tools.md","source":"apps/src/contracts/schema.ts","related":["apps.JsonValue","apps.Schema","Schema"],"examples":["live-inbox"]},{"symbol":"apps.JsonResponse","kind":"type","summary":"Native fetch-compatible response accepted at the author boundary.","signatures":[],"definition":"export type JsonResponse = PromiseMethods<NativeResponse>;","tags":[],"docs":"tools.md","source":"apps/src/index.ts","related":[],"examples":["live-inbox"]},{"symbol":"apps.jsonSchema","kind":"function","summary":"Import JSON metadata now; unsupported schemas and invalid values fail when parsed.","signatures":["(input: unknown): Schema<EffectSchema.Json>"],"tags":[],"docs":"tools.md","source":"apps/src/implementation/schema.ts","related":["apps.Schema","Schema"],"examples":["live-inbox"]},{"symbol":"apps.JsonValue","kind":"type","summary":"JSON values carried by remote protocols such as MCP.","signatures":[],"definition":"JsonValue = Schema.Json","tags":[],"docs":"tools.md","source":"apps/src/contracts/schema.ts","related":["apps.Schema","Schema"],"examples":["live-inbox"]},{"symbol":"apps.literal","kind":"function","summary":"One exact JSON scalar value.","signatures":["<const T extends string | number | boolean | null>(value: T): Schema<T>"],"tags":[],"docs":"tools.md","source":"apps/src/implementation/schema.ts","related":["apps.Schema","Schema"],"examples":["live-inbox"]},{"symbol":"apps.mutation","kind":"function","summary":"Explicit write operation. Database writes roll back on failure; external effects cannot be undone.","signatures":["<Input, Output, Context extends AppContext = MutationContext>(options: OperationOptions<Input, Output>, run: (context: Context, input: Input) => Promise<Output>): Operation<Input, Output, \"mutation\", Context>"],"tags":[],"docs":"tools.md","source":"apps/src/implementation/operations.ts","related":["AppContext","apps.AppContext","apps.MutationContext","apps.Operation","apps.OperationOptions"],"examples":["live-inbox"]},{"symbol":"apps.MutationContext","kind":"type","summary":"Interactive mutation context; declared storage belongs to the invocation transaction.","signatures":[],"definition":"export type MutationContext<Requirements extends AppRequirements = AppRequirements> = Omit<\n AppContext<Requirements>,\n \"workflows\"\n> & { readonly workflows: WorkflowControls } & StorageContext<Requirements, true>;","tags":[],"docs":"tools.md","source":"apps/src/contracts/context.ts","related":["AppContext","apps.AppContext","apps.AppRequirements","apps.WorkflowControls","WorkflowControls"],"examples":["live-inbox"]},{"symbol":"apps.number","kind":"function","summary":"A finite JSON number. No coercion.","signatures":["(): Schema<number>"],"tags":[],"docs":"tools.md","source":"apps/src/implementation/schema.ts","related":["apps.Schema","Schema"],"examples":["live-inbox"]},{"symbol":"apps.oauth2","kind":"function","summary":"Declare OAuth discovery/endpoints and an optional app-visible response projection.","signatures":["(options: OAuth2Config): OAuth2Method<typeof OAuth2AccessToken>","<Response extends Schema<unknown, boolean>>(options: OAuth2Config & { readonly response: Response; }): OAuth2Method<Response>"],"tags":[],"docs":"tools.md","source":"apps/src/index.ts","related":["apps.OAuth2Config","apps.OAuth2Method","apps.Schema","Schema"],"examples":["live-inbox"]},{"symbol":"apps.OAuth2Config","kind":"type","summary":"OAuth endpoints and protocol choices. Omitted grant means authorization code; clients remain\nhost-owned. Declared endpoints may name an RFC 7009 `revocationUrl`; discovery reads the\nserver's `revocation_endpoint` metadata instead.","signatures":[],"definition":"OAuth2Config = Schema.Union([\n Schema.Struct({\n ...oauthOptions,\n discover: HttpUrl,\n authorizationUrl: Schema.optionalKey(Schema.Never),\n tokenUrl: Schema.optionalKey(Schema.Never),\n revocationUrl: Schema.optionalKey(Schema.Never),\n scopes: Schema.optionalKey(Schema.Array(Schema.String)),\n }),\n Schema.Struct({\n ...oauthOptions,\n authorizationUrl: HttpUrl,\n tokenUrl: HttpUrl,\n revocationUrl: Schema.optionalKey(HttpUrl),\n scopes: Schema.Array(Schema.String),\n /** RFC 8414 issuer identifier. Declared issuers are checked against the callback's `iss`. */\n issuer: Schema.optionalKey(HttpUrl),\n discover: Schema.optionalKey(Schema.Never),\n }),\n Schema.Struct({\n grant: Schema.Literal(\"client_credentials\"),\n discover: HttpUrl,\n authorizationUrl: Schema.optionalKey(Schema.Never),\n tokenUrl: Schema.optionalKey(Schema.Never),\n revocationUrl: Schema.optionalKey(Schema.Never),\n scopes: Schema.optionalKey(Schema.Array(Schema.String)),\n tokenEndpointAuthMethod: OAuthSecretClientAuth,\n resource: Schema.optionalKey(Schema.NullOr(HttpUrl)),\n }),\n Schema.Struct({\n grant: Schema.Literal(\"client_credentials\"),\n tokenUrl: HttpUrl,\n revocationUrl: Schema.optionalKey(HttpUrl),\n scopes: Schema.Array(Schema.String),\n tokenEndpointAuthMethod: OAuthSecretClientAuth,\n resource: Schema.optionalKey(Schema.NullOr(HttpUrl)),\n authorizationUrl: Schema.optionalKey(Schema.Never),\n discover: Schema.optionalKey(Schema.Never),\n }),\n])","tags":[],"docs":"tools.md","source":"apps/src/contracts/provider.ts","related":["apps.Schema","Schema"],"examples":["live-inbox"]},{"symbol":"apps.OAuth2Method","kind":"type","summary":"An OAuth declaration inferred from its author-facing response schema.","signatures":[],"definition":"export type OAuth2Method<Response extends Schema<unknown, boolean>> = NativeOAuth2Method<\n EffectSchema.Decoder<Infer<Response>>\n>;","tags":[],"docs":"tools.md","source":"apps/src/index.ts","related":["apps.Infer","apps.Schema","Schema"],"examples":["live-inbox"]},{"symbol":"apps.object","kind":"function","summary":"Parse declared fields and omit undeclared fields.","signatures":["<const F extends Fields>(fields: F): ObjectSchema<F>"],"tags":[],"docs":"tools.md","source":"apps/src/implementation/schema.ts","related":["apps.Fields","apps.ObjectSchema"],"examples":["live-inbox"]},{"symbol":"apps.ObjectSchema","kind":"type","summary":"An author object schema with retained field declarations.","signatures":[],"definition":"export interface ObjectSchema<F extends Fields> extends Schema<ObjectValue<F>> {\n readonly fields: F;\n}","tags":[],"docs":"tools.md","source":"apps/src/implementation/schema.ts","related":["apps.Fields","apps.ObjectValue","apps.Schema","Schema"],"examples":["live-inbox"]},{"symbol":"apps.ObjectValue","kind":"type","summary":"Optional fields may be absent; defaulted fields are present after decoding.","signatures":[],"definition":"export type ObjectValue<F extends Fields> = {\n readonly [Key in keyof F as F[Key][\"optionalValue\"] extends true ? never : Key]: Infer<F[Key]>;\n} & {\n readonly [Key in keyof F as F[Key][\"optionalValue\"] extends true ? Key : never]?: Infer<F[Key]>;\n};","tags":[],"docs":"tools.md","source":"apps/src/implementation/schema.ts","related":["apps.Fields","apps.Infer"],"examples":["live-inbox"]},{"symbol":"apps.Operation","kind":"type","summary":"Typed operation handles drive browser reference inference without bundling handlers.","signatures":[],"definition":"export interface Operation<\n Input,\n Output,\n Kind extends \"query\" | \"mutation\",\n Context = AppContext,\n> extends OperationDeclaration<Kind, Context> {\n readonly [NativeOperation]: AppOperation<Input, Output> & { readonly kind: Kind };\n}","tags":[],"docs":"tools.md","source":"apps/src/implementation/operations.ts","related":["AppContext","apps.AppContext"],"examples":["live-inbox"]},{"symbol":"apps.OperationContext","kind":"type","summary":"Host-bound operation capabilities; the author declaration refines accounts and storage.","signatures":[],"definition":"export type OperationContext = BoundContext<AccountSlots> & {\n readonly db?: DatabaseReader<Tables> | Database<Tables>;\n};","tags":[],"docs":"tools.md","source":"apps/src/contracts/operations.ts","related":["apps.AccountSlots","apps.Database","apps.DatabaseReader"],"examples":["live-inbox"]},{"symbol":"apps.OperationDescription","kind":"type","summary":"Serializable live tool metadata; executable callbacks never cross this boundary. `name` is the\ntool's full dotted path. `router` is the path of the router that owns it, omitted at the root.\n`readOnly` marks a query; a tool without it is a mutation.\nParsed live tool description.","signatures":[],"definition":"HostedTool = Schema.Struct({\n schedules: Schema.optionalKey(Schema.Array(OperationSchedule)),\n name: Schema.NonEmptyString,\n router: Schema.optionalKey(Schema.NonEmptyString),\n tags: Schema.optionalKey(Schema.Array(Schema.NonEmptyString)),\n description: Schema.String,\n inputSchema: JsonObject,\n readOnly: Schema.optionalKey(Schema.Boolean),\n title: Schema.optionalKey(Schema.String),\n outputSchema: Schema.optionalKey(JsonObject),\n annotations: Schema.optionalKey(ToolAnnotations),\n _meta: Schema.optionalKey(JsonObject),\n})","tags":[],"docs":"tools.md","source":"apps/src/contracts/protocols/4.ts","related":["apps.JsonObject","apps.Schema","Schema"],"examples":["live-inbox"]},{"symbol":"apps.OperationOptions","kind":"type","summary":"Options shared by database and external operations. Output defaults to a JSON-safe host check.","signatures":[],"definition":"export interface OperationOptions<Input, Output> {\n readonly description?: string;\n readonly title?: string;\n readonly input: Schema<Input, boolean>;\n readonly output?: Schema<Output, boolean>;\n readonly approval?: Approval<Input>;\n readonly annotations?: ToolAnnotations;\n readonly _meta?: JsonObject;\n}","tags":[],"docs":"tools.md","source":"apps/src/implementation/operations.ts","related":["apps.Approval","apps.JsonObject","apps.Schema","apps/operations/approval.Approval","Schema"],"examples":["live-inbox"]},{"symbol":"apps.ProviderOptions","kind":"type","summary":"Author options: the account check is an ordinary async function.","signatures":[],"definition":"export interface ProviderOptions<Auth extends AuthMethods> {\n readonly name: string;\n readonly auth: Auth;\n /** Verify a connected account with a safe read, optionally reporting its upstream identity. */\n readonly health?: PromiseMethod<AccountCheck<Auth>[\"run\"]>;\n}","tags":[],"docs":"tools.md","source":"apps/src/implementation/provider.ts","related":["apps.AuthMethods"],"examples":["live-inbox"]},{"symbol":"apps.query","kind":"function","summary":"Read operation. External reads are allowed; only database writes are mechanically prohibited.","signatures":["<Input, Output, Context extends AppContext = AppContext<AppRequirements>>(options: OperationOptions<Input, Output>, run: (context: Context, input: Input) => Promise<Output>): Operation<Input, Output, \"query\", Context>"],"tags":[],"docs":"tools.md","source":"apps/src/implementation/operations.ts","related":["AppContext","apps.AppContext","apps.AppRequirements","apps.Operation","apps.OperationOptions"],"examples":["live-inbox"]},{"symbol":"apps.QueryContext","kind":"type","summary":"Interactive query context; declared storage exposes only read methods.","signatures":[],"definition":"export type QueryContext<Requirements extends AppRequirements = AppRequirements> =\n AppContext<Requirements> & StorageContext<Requirements, false>;","tags":[],"docs":"tools.md","source":"apps/src/contracts/context.ts","related":["AppContext","apps.AppContext","apps.AppRequirements"],"examples":["live-inbox"]},{"symbol":"apps.record","kind":"function","summary":"Named values with a common schema.","signatures":["<T>(value: Schema<T, boolean>): Schema<Readonly<Record<string, T>>>"],"tags":[],"docs":"tools.md","source":"apps/src/implementation/schema.ts","related":["apps.Schema","Schema"],"examples":["live-inbox"]},{"symbol":"apps.router","kind":"function","summary":"Group operations and routers under path keys, like tRPC's nested routers, with metadata an\nagent can read. Passing an existing router instead of children overrides its metadata:\n`router(mcpRouter(options), { description: \"...\" })`.","signatures":["<Query = unknown, Mutation = unknown>(children: Readonly<Record<string, RouterChild<Query, Mutation>>>, options?: RouterOptions): RouterDeclaration<Query, Mutation>","<Query, Mutation>(source: RouterDeclaration<Query, Mutation>, options: RouterOptions): RouterDeclaration<Query, Mutation>"],"tags":[],"docs":"tools.md","source":"apps/src/implementation/router.ts","related":["apps.RouterChild","apps.RouterDeclaration","apps.RouterOptions"],"examples":["live-inbox"]},{"symbol":"apps.RouterChild","kind":"type","summary":"An operation or nested router under one key. Each child is typed only by its own kind's context.","signatures":[],"definition":"export interface RouterChild<Query, Mutation> {\n readonly [QueryHandlerContext]?: (context: Query) => void;\n readonly [MutationHandlerContext]?: (context: Mutation) => void;\n}","tags":[],"docs":"tools.md","source":"apps/src/implementation/operations.ts","related":[],"examples":["live-inbox"]},{"symbol":"apps.RouterDeclaration","kind":"type","summary":"A router declaration. The phantom contexts let `defineApp` type inline handlers; protocol\nrouters accept any context because their operations only use the framework's own capabilities.\nThe native router is held under a private key in implementation/router.ts.","signatures":[],"definition":"export interface RouterDeclaration<Query = unknown, Mutation = unknown> {\n readonly [QueryHandlerContext]?: (context: Query) => void;\n readonly [MutationHandlerContext]?: (context: Mutation) => void;\n readonly [NativeRouterKey]: unknown;\n}","tags":[],"docs":"tools.md","source":"apps/src/implementation/operations.ts","related":[],"examples":["live-inbox"]},{"symbol":"apps.RouterIcon","kind":"type","summary":"An image a client may show beside a router, such as an MCP server's own icon. Models never read it.","signatures":[],"definition":"RouterIcon = Schema.Struct({\n src: Schema.NonEmptyString,\n mimeType: Schema.optionalKey(Schema.String),\n sizes: Schema.optionalKey(Schema.Array(Schema.String)),\n theme: Schema.optionalKey(Schema.Literals([\"light\", \"dark\"])),\n})","tags":[],"docs":"tools.md","source":"apps/src/contracts/router.ts","related":["apps.Schema","Schema"],"examples":["live-inbox"]},{"symbol":"apps.RouterOptions","kind":"type","summary":"Author metadata for a router. Instructions become a skill named after the router's path.","signatures":[],"definition":"export interface RouterOptions {\n readonly title?: string;\n readonly description?: string;\n readonly instructions?: string;\n readonly icons?: readonly RouterIcon[];\n readonly tags?: Readonly<Record<string, string>>;\n}","tags":[],"docs":"tools.md","source":"apps/src/implementation/router.ts","related":["apps.RouterIcon"],"examples":["live-inbox"]},{"symbol":"apps.ScheduleDeclaration","kind":"type","summary":"The app adapter resolves this operation handle to its declared mutation name.","signatures":[],"definition":"export interface ScheduleDeclaration<Context = never> {\n readonly operation: OperationDeclaration<\"mutation\", Context>;\n readonly timing: ScheduleTiming;\n readonly input: JsonValue;\n}","tags":[],"docs":"tools.md","source":"apps/src/implementation/schedules.ts","related":["apps.JsonValue"],"examples":["live-inbox"]},{"symbol":"apps.Schema","kind":"type","summary":"An author-facing value schema. Effect is never required in author code.","signatures":[],"definition":"export interface Schema<T, Optional extends boolean = false> {\n readonly [StorageField]?: Field;\n readonly [Decoder]: EffectSchema.Decoder<T>;\n readonly optionalValue: Optional;\n /** Parse an unknown value; invalid input throws a safe ValidationError. */\n parse(input: unknown): T;\n /** Accept an absent field without changing the original schema. */\n optional(): Schema<T | undefined, true>;\n /** Validate the default now and use it for undefined input. */\n default(value: T): Schema<T> & { readonly hasDefault: true; readonly inputOptional: Optional };\n}","tags":[],"docs":"tools.md","source":"apps/src/implementation/schema.ts","related":["Schema"],"examples":["live-inbox"]},{"symbol":"apps.secrets","kind":"function","summary":"Declare a secrets method without requiring an Effect schema from the author.","signatures":["<const F extends Fields>(options: { readonly label: string; readonly fields: ObjectSchema<F>; }): SecretsMethod<ObjectSchema<F>>"],"tags":[],"docs":"tools.md","source":"apps/src/index.ts","related":["apps.Fields","apps.ObjectSchema","apps.SecretsMethod"],"examples":["live-inbox"]},{"symbol":"apps.SecretsMethod","kind":"type","summary":"A secrets declaration inferred from an author schema.","signatures":[],"definition":"export type SecretsMethod<Shape extends ObjectSchema<Fields>> = NativeSecretsMethod<\n EffectSchema.Decoder<Infer<Shape>>\n>;","tags":[],"docs":"tools.md","source":"apps/src/index.ts","related":["apps.Fields","apps.Infer","apps.ObjectSchema"],"examples":["live-inbox"]},{"symbol":"apps.Skill","kind":"type","summary":"Files use paths relative to this skill directory; reading one never executes its contents.","signatures":[],"definition":"AppSkillSource = Schema.Struct({\n ...AppSkillMetadata.fields,\n files: Schema.Array(SkillFile).check(\n Schema.makeFilter(\n (files) =>\n files.some((file) => file.path === \"SKILL.md\") &&\n new Set(files.map((file) => file.path)).size === files.length,\n ),\n ),\n})","tags":[],"docs":"tools.md","source":"apps/src/contracts/skills.ts","related":["apps.Schema","apps.SkillFile","apps/skills.SkillFile","Schema"],"examples":["live-inbox"]},{"symbol":"apps.SkillFile","kind":"type","summary":"UTF-8 text resource. Reading a resource never executes it.","signatures":[],"definition":"SkillFile = Schema.Struct({ path: SkillFilePath, content: Schema.String })","tags":[],"docs":"tools.md","source":"apps/src/contracts/skills.ts","related":["apps.Schema","apps/skills.SkillFile","Schema"],"examples":["live-inbox"]},{"symbol":"apps.string","kind":"function","summary":"A string, optionally with a minimum length. No coercion.","signatures":["(options?: { readonly minLength?: number; }): Schema<string>"],"tags":[],"docs":"tools.md","source":"apps/src/implementation/schema.ts","related":["apps.Schema","Schema"],"examples":["live-inbox"]},{"symbol":"apps.table","kind":"function","summary":"Declare scalar columns using the same schemas as operation inputs. The host adds `id`,\n`createdAt` and `updatedAt` to every row, so tables cannot declare those names.","signatures":["<const F extends Fields & { readonly [K in ReservedFieldName]?: never; }>(fields: F): Table<F>"],"tags":[],"docs":"tools.md","source":"apps/src/implementation/storage.ts","related":["apps.Fields","apps.Table","Table"],"examples":["live-inbox"]},{"symbol":"apps.Table","kind":"type","summary":"Typed table declaration; indexes refer only to authored or host metadata fields.","signatures":[],"definition":"export interface Table<F extends Fields, Index extends string = never> {\n readonly fields: F;\n readonly indexes: ReadonlyArray<{ readonly name: string; readonly fields: readonly string[] }>;\n readonly index: <Name extends string>(\n name: Name,\n fields: readonly [\n (keyof F & string) | keyof typeof RowMetadata.Type,\n ...((keyof F & string) | keyof typeof RowMetadata.Type)[],\n ],\n ) => Table<F, Index | Name>;\n}","tags":[],"docs":"tools.md","source":"apps/src/contracts/storage.ts","related":["apps.Fields","Table"],"examples":["live-inbox"]},{"symbol":"apps.userId","kind":"function","summary":"A host user identifier, stored as a string without imposing a product auth model.","signatures":["(): Schema<string>"],"tags":[],"docs":"tools.md","source":"apps/src/implementation/schema.ts","related":["apps.Schema","Schema"],"examples":["live-inbox"]},{"symbol":"apps.Webhook","kind":"type","summary":"Author lifecycle methods use async functions and share native decoded context/state types.","signatures":[],"definition":"export type Webhook<\n Context extends WebhookContext,\n Config extends Schema<unknown, boolean>,\n State extends Schema<unknown, boolean>,\n> = AuthorWebhook<\n NativeWebhook<Context, EffectSchema.Decoder<Infer<Config>>, EffectSchema.Decoder<Infer<State>>>,\n Config,\n State\n>;","tags":[],"docs":"tools.md","source":"apps/src/index.ts","related":["apps.Infer","apps.Schema","apps.WebhookContext","Schema"],"examples":["live-inbox"]},{"symbol":"apps.WebhookContext","kind":"type","summary":"Background webhook context has account and storage access without interactive input.","signatures":[],"definition":"export type WebhookContext<Requirements extends AppRequirements = AppRequirements> = Omit<\n MutationContext<Requirements>,\n \"elicit\"\n>;","tags":[],"docs":"tools.md","source":"apps/src/contracts/context.ts","related":["apps.AppRequirements","apps.MutationContext"],"examples":["live-inbox"]},{"symbol":"apps.withApproval","kind":"function","summary":"Attach the same approval function to a generated or shared operation.","signatures":["<Input, Output, Kind extends \"query\" | \"mutation\", Context>(operation: Operation<Input, Output, Kind, Context>, approval: Approval<Input>): Operation<Input, Output, Kind, Context>"],"tags":[],"docs":"tools.md","source":"apps/src/implementation/operations.ts","related":["apps.Approval","apps.Operation","apps/operations/approval.Approval"],"examples":["live-inbox"]},{"symbol":"apps.workflow","kind":"function","summary":"Declare durable orchestration without starting a run or performing I/O.","signatures":["<Input, Output, Context extends WorkflowContext = WorkflowContext<AppRequirements>>(options: { readonly input: Schema<Input, boolean>; readonly output?: Schema<Output, boolean>; readonly description?: string; }, run: (context: Context, input: Input) => Promise<Output>): Workflow<Input, Output, Context>"],"tags":[],"docs":"tools.md","source":"apps/src/implementation/workflows.ts","related":["apps.AppRequirements","apps.Schema","apps.Workflow","apps.WorkflowContext","Schema"],"examples":["live-inbox"]},{"symbol":"apps.Workflow","kind":"type","summary":"A workflow declaration retains input/output inference and required context compatibility.","signatures":[],"definition":"export interface Workflow<Input, Output, Context extends WorkflowContext = WorkflowContext> {\n readonly [HandlerContext]?: (context: Context) => void;\n readonly [NativeWorkflow]: AppWorkflow<Input, Output>;\n}","tags":[],"docs":"tools.md","source":"apps/src/implementation/workflows.ts","related":["apps.WorkflowContext"],"examples":["live-inbox"]},{"symbol":"apps.WorkflowContext","kind":"type","summary":"The orchestration body gets no account, database or interactive capabilities.","signatures":[],"definition":"export interface WorkflowContext<Requirements extends AppRequirements = AppRequirements> {\n readonly runId: WorkflowRunId;\n readonly step: WorkflowStep<Requirements>;\n}","tags":[],"docs":"tools.md","source":"apps/src/contracts/workflows.ts","related":["apps.AppRequirements","apps.WorkflowStep","WorkflowStep"],"examples":["live-inbox"]},{"symbol":"apps.WorkflowControls","kind":"type","summary":"Mutating handlers may start and terminate runs in their own configured app.","signatures":[],"definition":"export interface WorkflowControls extends WorkflowReads {\n readonly start: (input: {\n readonly workflow: string;\n readonly input: JsonValue;\n readonly key?: string;\n }) => Promise<WorkflowRun>;\n readonly terminate: (input: { readonly run: string }) => Promise<WorkflowRun>;\n}","tags":[],"docs":"tools.md","source":"apps/src/contracts/workflows.ts","related":["apps.JsonValue","apps.WorkflowReads","WorkflowControls"],"examples":["live-inbox"]},{"symbol":"apps.WorkflowDeclaration","kind":"type","summary":"Composition view erases input only after retaining its runtime decoder.","signatures":[],"definition":"export interface WorkflowDeclaration<Context extends WorkflowContext> {\n readonly [HandlerContext]?: (context: Context) => void;\n readonly [NativeWorkflow]: Omit<AppWorkflow<never>, \"input\"> & {\n readonly input: EffectSchema.Decoder<unknown>;\n };\n}","tags":[],"docs":"tools.md","source":"apps/src/implementation/workflows.ts","related":["apps.WorkflowContext"],"examples":["live-inbox"]},{"symbol":"apps.WorkflowDuration","kind":"type","summary":"Numbers are milliseconds; strings use a quantity and full unit, such as \"5 minutes\".","signatures":[],"definition":"WorkflowDuration = Schema.Union([\n Schema.Finite.check(Schema.isGreaterThanOrEqualTo(0)),\n Schema.NonEmptyString,\n]).check(Schema.makeFilter((value) => workflowDurationMillis(value) !== undefined))","tags":[],"docs":"tools.md","source":"apps/src/contracts/workflows.ts","related":["apps.Schema","Schema"],"examples":["live-inbox"]},{"symbol":"apps.WorkflowReads","kind":"type","summary":"Query and factory contexts may inspect only their own app's runs.","signatures":[],"definition":"export interface WorkflowReads {\n readonly get: (input: { readonly run: string }) => Promise<WorkflowRun>;\n readonly list: (input?: {\n readonly workflow?: string;\n readonly limit?: number;\n readonly cursor?: string;\n }) => Promise<WorkflowRunPage>;\n}","tags":[],"docs":"tools.md","source":"apps/src/contracts/workflows.ts","related":[],"examples":["live-inbox"]},{"symbol":"apps.WorkflowStep","kind":"type","summary":"Explicit durable boundaries; database access passes through registered app operations.","signatures":[],"definition":"export interface WorkflowStep<Requirements extends AppRequirements = AppRequirements> {\n do<Output>(\n name: string,\n run: (context: WorkflowStepContext<Requirements>) => Promise<Output>,\n ): Promise<Output>;\n do<Output>(\n name: string,\n options: WorkflowStepOptions,\n run: (context: WorkflowStepContext<Requirements>) => Promise<Output>,\n ): Promise<Output>;\n runQuery<Input, Output>(\n name: string,\n operation: Operation<Input, Output, \"query\", QueryContext<Requirements>>,\n input: NoInfer<Input>,\n options?: WorkflowStepOptions,\n ): Promise<Output>;\n runMutation<Input, Output>(\n name: string,\n operation: Operation<Input, Output, \"mutation\", MutationContext<Requirements>>,\n input: NoInfer<Input>,\n options?: WorkflowStepOptions,\n ): Promise<Output>;\n readonly sleep: (name: string, duration: WorkflowDuration) => Promise<void>;\n readonly sleepUntil: (name: string, timestamp: number | Date) => Promise<void>;\n}","tags":[],"docs":"tools.md","source":"apps/src/contracts/workflows.ts","related":["apps.AppRequirements","apps.MutationContext","apps.Operation","apps.QueryContext","apps.WorkflowDuration","apps.WorkflowStepContext","apps.WorkflowStepOptions","WorkflowStep"],"examples":["live-inbox"]},{"symbol":"apps.WorkflowStepContext","kind":"type","summary":"External steps get fresh credentials and cancellation, without storage or live elicitation.","signatures":[],"definition":"export type WorkflowStepContext<Requirements extends AppRequirements = AppRequirements> = Omit<\n AppContext<Requirements>,\n \"elicit\" | \"workflows\"\n> & {\n readonly runId: WorkflowRunId;\n readonly stepId: string;\n readonly idempotencyKey: string;\n};","tags":[],"docs":"tools.md","source":"apps/src/contracts/workflows.ts","related":["AppContext","apps.AppContext","apps.AppRequirements"],"examples":["live-inbox"]},{"symbol":"apps.WorkflowStepOptions","kind":"type","summary":"Author retry and timeout options are passed to the durable engine.","signatures":[],"definition":"WorkflowStepOptions = Schema.Struct({\n retries: Schema.optionalKey(\n Schema.Struct({\n limit: Schema.Int.check(Schema.isGreaterThanOrEqualTo(0)),\n delay: WorkflowDuration,\n backoff: Schema.optionalKey(Schema.Literals([\"constant\", \"linear\", \"exponential\"])),\n }),\n ),\n timeout: Schema.optionalKey(WorkflowDuration),\n})","tags":[],"docs":"tools.md","source":"apps/src/contracts/workflows.ts","related":["apps.Schema","apps.WorkflowDuration","Schema"],"examples":["live-inbox"]},{"symbol":"apps/client.AppMutation","kind":"type","summary":"A callable mutation. Success means the write was acknowledged; its overlay stays until fresh reads finish.","signatures":[],"definition":"export interface AppMutation<Input, Output> {\n (input: Input): Promise<Output>;\n /** Return a new mutation handle with this projection. Failures remove only this invocation's changes. */\n withOptimisticUpdate(update: OptimisticUpdate<Input>): AppMutation<Input, Output>;\n}","tags":[],"docs":"ui.md","source":"apps/src/contracts/optimistic.ts","related":["AppMutation","apps/client.OptimisticUpdate"],"examples":["live-inbox"]},{"symbol":"apps/client.createAppClient","kind":"function","summary":"A scoped page client. Host-injected context carries only the deployment, never credentials.","signatures":["(): { dispose: () => Promise<void>; query: <Input, Output>(reference: OperationReference<Input, Output, \"query\">, input: NoInfer<Input>, output: Schema<NoInfer<Output>, boolean>) => Promise<NoInfer<Output>>; mutate: <Input, Output>(reference: OperationReference<Input, Output, \"mutation\">, input: NoInfer<Input>, output: Schema<NoInfer<Output>, boolean>) => Promise<Output>; mutation: <Input, Output>(reference: OperationReference<Input, Output, \"mutation\">, output: Schema<NoInfer<Output>, boolean>) => AppMutation<Input, Output>; queryAtom: <Input, Output>(reference: OperationReference<Input, Output, \"query\">, input: NoInfer<Input>, output: Schema<NoInfer<Output>, boolean>) => Atom.Atom<AsyncResult<Output, unknown>>; }"],"tags":[],"docs":"ui.md","source":"apps/src/implementation/ui-client.ts","related":["AppMutation","apps.Schema","apps/client.AppMutation","apps/client.OperationReference","Schema"],"examples":["live-inbox"]},{"symbol":"apps/client.liveQueryAtom","kind":"function","summary":"Subscribe for the atom's mounted lifetime and parse every result using a shared output schema.\nThe host supplies routing, authentication and reconnection behavior through transport.","signatures":["<Input, Output>(reference: OperationReference<Input, Output, \"query\">, input: NoInfer<Input>, options: { readonly output: Schema<NoInfer<Output>, boolean>; readonly transport: QueryTransport; }): Atom.Atom<AsyncResult<NoInfer<Output>, NoSuchElementError | AppQueryFailed>>"],"tags":[],"docs":"ui.md","source":"apps/src/implementation/live.ts","related":["apps.Schema","apps/client.OperationReference","apps/client.QueryTransport","Schema"],"examples":["live-inbox"]},{"symbol":"apps/client.mutationReference","kind":"function","summary":"Make a mutation reference using a type-only server import.","signatures":["<Mutation>(name: Mutation extends Operation<infer _Input, infer _Output, \"mutation\", infer _Context> ? string : never): OperationReference<InputOf<Mutation>, OutputOf<Mutation>, \"mutation\">"],"tags":[],"docs":"ui.md","source":"apps/src/implementation/live.ts","related":["apps.Operation","apps/client.OperationReference"],"examples":["live-inbox"]},{"symbol":"apps/client.OperationReference","kind":"type","summary":"Serializable named reference; the phantom field is never populated at runtime.","signatures":[],"definition":"export interface OperationReference<Input, Output, Kind extends \"query\" | \"mutation\"> {\n readonly name: string;\n readonly kind: Kind;\n readonly _types?: { readonly input: Input; readonly output: Output };\n}","tags":[],"docs":"ui.md","source":"apps/src/contracts/live.ts","related":[],"examples":["live-inbox"]},{"symbol":"apps/client.OptimisticLocalStore","kind":"type","summary":"Read or replace mounted queries during a synchronous optimistic update. Never mutate returned values.","signatures":[],"definition":"export interface OptimisticLocalStore {\n /** Read the projected result, or undefined if this query is not loaded in this client. */\n getQuery<Input, Output>(\n reference: OperationReference<Input, Output, \"query\">,\n input: NoInfer<Input>,\n ): Output | undefined;\n /** Read all mounted argument variants of an operation, including loading queries. */\n getAllQueries<Input, Output>(\n reference: OperationReference<Input, Output, \"query\">,\n ): readonly { readonly input: Input; readonly value: Output | undefined }[];\n /** Replace a mounted query's projected result. The query's output schema validates the new value. */\n setQuery<Input, Output>(\n reference: OperationReference<Input, Output, \"query\">,\n input: NoInfer<Input>,\n value: NoInfer<Output>,\n ): void;\n}","tags":[],"docs":"ui.md","source":"apps/src/contracts/optimistic.ts","related":["apps/client.OperationReference","OptimisticLocalStore"],"examples":["live-inbox"]},{"symbol":"apps/client.OptimisticUpdate","kind":"type","summary":"Pure synchronous projection. Replayed over current data; create temporary IDs before invoking the mutation.","signatures":[],"definition":"export type OptimisticUpdate<Input> = (store: OptimisticLocalStore, input: Input) => undefined;","tags":[],"docs":"ui.md","source":"apps/src/contracts/optimistic.ts","related":["apps/client.OptimisticLocalStore","OptimisticLocalStore"],"examples":["live-inbox"]},{"symbol":"apps/client.QueryDescriptor","kind":"type","summary":"Host-bound subscription request. Authentication and configured app identity belong to the host.","signatures":[],"definition":"export interface QueryDescriptor {\n readonly name: string;\n readonly input: JsonValue;\n}","tags":[],"docs":"ui.md","source":"apps/src/contracts/live.ts","related":["apps.JsonValue"],"examples":["live-inbox"]},{"symbol":"apps/client.queryReference","kind":"function","summary":"Make a query reference using a type-only server import. No handler is passed or bundled.","signatures":["<Query>(name: Query extends Operation<infer _Input, infer _Output, \"query\", infer _Context> ? string : never): OperationReference<InputOf<Query>, OutputOf<Query>, \"query\">"],"tags":[],"docs":"ui.md","source":"apps/src/implementation/live.ts","related":["apps.Operation","apps/client.OperationReference"],"examples":["live-inbox"]},{"symbol":"apps/client.QueryTransport","kind":"type","summary":"Host transport must close its subscription when async iteration ends. Results are parsed by the client.","signatures":[],"definition":"export interface QueryTransport {\n readonly subscribe: (descriptor: QueryDescriptor) => Promise<AsyncIterable<unknown>>;\n}","tags":[],"docs":"ui.md","source":"apps/src/contracts/live.ts","related":["apps/client.QueryDescriptor"],"examples":["live-inbox"]},{"symbol":"apps/graphql.GraphqlCatalogOptions","kind":"type","summary":"","signatures":[],"definition":"export interface GraphqlCatalogOptions extends GraphqlToolsOptions, CatalogCacheOptions {}","tags":[],"docs":"integrations.md","source":"apps/src/implementation/graphql-catalog.ts","related":["apps/graphql.GraphqlToolsOptions"],"examples":[]},{"symbol":"apps/graphql.graphqlRouter","kind":"function","summary":"Lazy tools with optional persistent metadata caching for the selected account.","signatures":["(options: GraphqlCatalogOptions, kinds?: OperationKinds): Promise<RouterDeclaration<unknown, unknown>>"],"tags":[],"docs":"integrations.md","source":"apps/src/graphql.ts","related":["apps.RouterDeclaration","apps/graphql.GraphqlCatalogOptions","apps/graphql.OperationKinds","apps/mcp.OperationKinds","apps/openapi.OperationKinds"],"examples":[]},{"symbol":"apps/graphql.GraphqlToolsOptions","kind":"type","summary":"Endpoint and credential snapshot for one app evaluation.","signatures":[],"definition":"GraphqlToolsOptions = Schema.Struct({\n url: HttpUrl,\n accountId: Schema.optional(AccountId),\n headers: Schema.optional(Schema.Record(Schema.String, Schema.String)),\n signal: Schema.optional(Schema.instanceOf(AbortSignal)),\n timeoutMs: Schema.optional(\n Schema.Int.check(\n Schema.isBetween({ minimum: 1, maximum: defaultGraphqlClientLimits.maxTimeoutMs }),\n ),\n ),\n})","tags":[],"docs":"integrations.md","source":"apps/src/contracts/graphql.ts","related":["apps.Schema","Schema"],"examples":[]},{"symbol":"apps/graphql.OperationKinds","kind":"type","summary":"Explicit corrections for upstream read-only hints or unusual HTTP semantics.","signatures":[],"definition":"export type OperationKinds = Readonly<Record<string, \"query\" | \"mutation\">>;","tags":[],"docs":"integrations.md","source":"apps/src/implementation/protocol-operations.ts","related":["apps/mcp.OperationKinds","apps/openapi.OperationKinds"],"examples":[]},{"symbol":"apps/mcp.McpCatalogOptions","kind":"type","summary":"Metadata policy for HTTP/SSE sources. A missing cache keeps discovery invocation-local.","signatures":[],"definition":"export interface McpCatalogOptions extends McpToolsOptions, CatalogCacheOptions {}","tags":[],"docs":"integrations.md","source":"apps/src/implementation/mcp-catalog.ts","related":["apps/mcp.McpToolsOptions"],"examples":[]},{"symbol":"apps/mcp.mcpRouter","kind":"function","summary":"A router over a server's tools for the selected account. Its title, description and\ninstructions come from the server. Kinds override uncertain upstream read-only hints.","signatures":["(options: McpCatalogOptions, kinds?: OperationKinds): Promise<RouterDeclaration<unknown, unknown>>"],"tags":[],"docs":"integrations.md","source":"apps/src/mcp.ts","related":["apps.RouterDeclaration","apps/graphql.OperationKinds","apps/mcp.McpCatalogOptions","apps/mcp.OperationKinds","apps/openapi.OperationKinds"],"examples":[]},{"symbol":"apps/mcp.McpToolContext","kind":"type","summary":"Direct callers can omit interaction capabilities. A server that asks for input then fails explicitly.","signatures":[],"definition":"export interface McpToolContext {\n readonly elicit?: Elicit;\n}","tags":[],"docs":"integrations.md","source":"apps/src/contracts/mcp.ts","related":["apps.Elicit","apps/mcp/stdio.McpToolContext"],"examples":[]},{"symbol":"apps/mcp.McpToolResult","kind":"type","summary":"Native MCP result semantics. Protocol/transport failures use the Effect error channel.","signatures":[],"definition":"McpToolResult = Schema.Struct({\n content: Schema.Array(JsonObject),\n structuredContent: Schema.optional(JsonObject),\n isError: Schema.optional(Schema.Boolean),\n _meta: Schema.optional(JsonObject),\n})","tags":[],"docs":"integrations.md","source":"apps/src/contracts/mcp.ts","related":["apps.JsonObject","apps.Schema","Schema"],"examples":[]},{"symbol":"apps/mcp.McpToolsOptions","kind":"type","summary":"Server and headers for this selected account. Headers are a credential snapshot.","signatures":[],"definition":"McpToolsOptions = Schema.Struct({\n url: HttpUrl,\n accountId: Schema.optional(AccountId),\n headers: Schema.optional(Schema.Record(Schema.String, Schema.String)),\n signal: Schema.optional(Schema.instanceOf(AbortSignal)),\n timeoutMs: Schema.optional(\n Schema.Number.check(\n Schema.isInt(),\n Schema.isBetween({ minimum: 1, maximum: defaultMcpClientLimits.maxTimeoutMs }),\n ),\n ),\n})","tags":[],"docs":"integrations.md","source":"apps/src/contracts/mcp.ts","related":["apps.Schema","Schema"],"examples":[]},{"symbol":"apps/mcp.OperationKinds","kind":"type","summary":"Explicit corrections for upstream read-only hints or unusual HTTP semantics.","signatures":[],"definition":"export type OperationKinds = Readonly<Record<string, \"query\" | \"mutation\">>;","tags":[],"docs":"integrations.md","source":"apps/src/implementation/protocol-operations.ts","related":["apps/graphql.OperationKinds","apps/openapi.OperationKinds"],"examples":[]},{"symbol":"apps/mcp/stdio.McpToolContext","kind":"type","summary":"Direct callers can omit interaction capabilities. A server that asks for input then fails explicitly.","signatures":[],"definition":"export interface McpToolContext {\n readonly elicit?: Elicit;\n}","tags":[],"docs":"integrations.md","source":"apps/src/contracts/mcp.ts","related":["apps.Elicit","apps/mcp.McpToolContext"],"examples":[]},{"symbol":"apps/mcp/stdio.ProcessConfig","kind":"type","summary":"Public process configuration. Credentials arrive through the selected account.","signatures":[],"definition":"ProcessConfig = Schema.Struct({\n command: Schema.NonEmptyString,\n args: Schema.Array(Schema.String),\n cwd: Schema.optional(Schema.String),\n env: Schema.Record(Schema.String, Schema.String),\n timeoutMs: Schema.Int.check(\n Schema.isBetween({ minimum: 1, maximum: defaultMcpClientLimits.maxTimeoutMs }),\n ),\n})","tags":[],"docs":"integrations.md","source":"apps/src/contracts/mcp.ts","related":["apps.Schema","Schema"],"examples":[]},{"symbol":"apps/mcp/stdio.stdioRouter","kind":"function","summary":"Discover an account's tools as a router; each discovery and call owns and closes its subprocess.","signatures":["(config: ProcessConfig, signal?: AbortSignal, kinds?: OperationKinds): Promise<RouterDeclaration<unknown, unknown>>"],"tags":[],"docs":"integrations.md","source":"apps/src/mcp-stdio.ts","related":["apps.RouterDeclaration","apps/graphql.OperationKinds","apps/mcp.OperationKinds","apps/mcp/stdio.ProcessConfig","apps/openapi.OperationKinds"],"examples":[]},{"symbol":"apps/openapi.CredentialBinding","kind":"type","summary":"Map a selected account field to one Swagger credential value.","signatures":[],"definition":"CredentialBinding = Schema.Struct({\n scheme: Schema.String,\n field: Schema.String,\n part: Schema.Literals([\"value\", \"username\", \"password\"]),\n prefix: Schema.String,\n})","tags":[],"docs":"integrations.md","source":"apps/src/contracts/openapi.ts","related":["apps.Schema","Schema"],"examples":[]},{"symbol":"apps/openapi.isOpenapiTextMedia","kind":"function","summary":"Media returned as text rather than a base64 file. NDJSON remains an unparsed text result.","signatures":["(type: string): boolean"],"tags":[],"docs":"integrations.md","source":"apps/src/contracts/openapi.ts","related":[],"examples":[]},{"symbol":"apps/openapi.liveOpenapiRouter","kind":"function","summary":"No I/O during app construction. All accounts share credential-free compilation.","signatures":["(options: OpenapiSourceOptions): RouterDeclaration"],"tags":[],"docs":"integrations.md","source":"apps/src/implementation/openapi-source.ts","related":["apps.RouterDeclaration","apps/openapi.OpenapiSourceOptions"],"examples":[]},{"symbol":"apps/openapi.OpenapiErrorResponse","kind":"type","summary":"Tagged error shapes retain an explicit source for their public message.\nA retained declaration used to validate an HTTP failure before exposing its code.","signatures":[],"definition":"OpenapiErrorResponse = Schema.Struct({\n code: ApiErrorResponse.fields.code,\n status: ApiErrorResponse.fields.status,\n message: Schema.Union([\n Schema.Struct({ source: Schema.Literal(\"body\") }),\n Schema.Struct({ source: Schema.Literal(\"schema\"), value: ApiErrorResponse.fields.message }),\n ]),\n schema: JsonObject,\n})","tags":[],"docs":"integrations.md","source":"apps/src/contracts/openapi.ts","related":["apps.JsonObject","apps.Schema","Schema"],"examples":[]},{"symbol":"apps/openapi.openapiMediaKind","kind":"function","summary":"Classify request media for JSON-safe tool arguments; Swagger owns wire serialization.","signatures":["(type: string): \"form\" | \"binary\" | \"json\" | \"multipart\" | \"text\""],"tags":[],"docs":"integrations.md","source":"apps/src/contracts/openapi.ts","related":[],"examples":[]},{"symbol":"apps/openapi.OpenapiOperation","kind":"type","summary":"Credential-free operation data emitted by the OpenAPI importer.","signatures":[],"definition":"OpenapiOperation = Schema.Struct({\n /** The tool name after `queries.` or `mutations.`, grouped as `<group>.<leaf>`. */\n name: Schema.NonEmptyString,\n /** The document's operationId, when it declares one. `kinds` overrides are keyed by it. */\n operationId: Schema.optionalKey(Schema.String),\n description: Schema.String,\n method: Schema.Literals([\"GET\", \"POST\", \"PUT\", \"PATCH\", \"DELETE\", \"HEAD\", \"OPTIONS\"]),\n path: Schema.String,\n baseUrl: HttpUrl,\n openapi: Schema.String,\n securitySchemes: Schema.Record(Schema.String, JsonObject),\n /** The resolved OpenAPI Operation Object; Executor schemas remain separate. */\n request: Schema.Struct({\n parameters: Schema.Array(OpenapiParameter),\n requestBody: Schema.optionalKey(OpenapiRequestBody),\n security: Schema.Array(Schema.Record(Schema.String, Schema.Array(Schema.String))),\n responses: Schema.Record(Schema.String, JsonObject),\n }),\n /** Streams remain in the metadata but cannot run through a single-result tool call. */\n streaming: Schema.optionalKey(Schema.Literal(true)),\n /** The operation's OpenAPI tags, shown to agents as labels within its router. */\n tags: Schema.optionalKey(Schema.Array(Schema.NonEmptyString)),\n input: JsonObject,\n outputSchema: Schema.optionalKey(JsonObject),\n errorResponses: Schema.optionalKey(Schema.Array(OpenapiErrorResponse)),\n})","tags":[],"docs":"integrations.md","source":"apps/src/contracts/openapi.ts","related":["apps.JsonObject","apps.Operation","apps.Schema","apps/openapi.OpenapiErrorResponse","apps/openapi.OpenapiParameter","Schema"],"examples":[]},{"symbol":"apps/openapi.OpenapiParameter","kind":"type","summary":"Resolved OpenAPI parameter shared by import validation and request construction.","signatures":[],"definition":"OpenapiParameter = Schema.Struct({\n name: Schema.String,\n in: Schema.Literals([\"path\", \"query\", \"header\", \"cookie\"]),\n required: Schema.optionalKey(Schema.Boolean),\n schema: Schema.optionalKey(JsonObject),\n style: Schema.optionalKey(Schema.String),\n explode: Schema.optionalKey(Schema.Boolean),\n allowReserved: Schema.optionalKey(Schema.Boolean),\n allowEmptyValue: Schema.optionalKey(Schema.Boolean),\n content: Schema.optionalKey(JsonObject),\n})","tags":[],"docs":"integrations.md","source":"apps/src/contracts/openapi.ts","related":["apps.JsonObject","apps.Schema","Schema"],"examples":[]},{"symbol":"apps/openapi.openapiRouter","kind":"function","summary":"Discover a document's operations as a router for the selected account. Kinds override uncertain\nupstream read-only hints. Mount it under a key, or override its metadata with `router(...)`.","signatures":["(options: OpenapiToolsOptions, kinds?: OperationKinds): Promise<RouterDeclaration<unknown, unknown>>"],"tags":[],"docs":"integrations.md","source":"apps/src/openapi.ts","related":["apps.RouterDeclaration","apps/graphql.OperationKinds","apps/mcp.OperationKinds","apps/openapi.OpenapiToolsOptions","apps/openapi.OperationKinds"],"examples":[]},{"symbol":"apps/openapi.OpenapiSourceOptions","kind":"type","summary":"Static credential placement and destination are reviewed when the app is authored/imported.","signatures":[],"definition":"export interface OpenapiSourceOptions extends Omit<\n OpenapiToolsOptions,\n \"operations\" | \"definitions\"\n> {\n readonly cache: AppCache;\n readonly source: { readonly url: string } | { readonly document: JsonObject };\n readonly allowedOrigin: string;\n readonly securitySchemes: Readonly<Record<string, JsonObject>>;\n readonly baseUrl?: string;\n readonly freshFor?: Duration.Input;\n readonly staleFor?: Duration.Input;\n /**\n * Query or mutation overrides keyed by the document's operationId. An operation without an\n * operationId is keyed by its generated name without the kind, such as `users.getUsers`.\n */\n readonly kinds?: OperationKinds;\n readonly fallbackSecurity?: OpenapiOperation[\"request\"][\"security\"];\n readonly patches?: readonly {\n readonly op: \"add\" | \"remove\" | \"replace\";\n readonly path: string;\n readonly value?: JsonValue;\n }[];\n}","tags":[],"docs":"integrations.md","source":"apps/src/implementation/openapi-source.ts","related":["AppCache","apps.AppCache","apps.JsonObject","apps.JsonValue","apps/graphql.OperationKinds","apps/mcp.OperationKinds","apps/openapi.OpenapiOperation","apps/openapi.OpenapiToolsOptions","apps/openapi.OperationKinds"],"examples":[]},{"symbol":"apps/openapi.OpenapiToolsOptions","kind":"type","summary":"Parsed options for one account's evaluation.\nJSON imports are decoded at the helper boundary, without assertions in app source.","signatures":[],"definition":"OpenapiToolsOptions = Schema.Struct({\n operations: Schema.Array(OpenapiOperation),\n /**\n * Component schemas stored once per app and referenced as `#/$defs/<name>`. Operations\n * generated before shared definitions carry their own `$defs` and omit this.\n */\n definitions: Schema.optional(Schema.Record(Schema.String, JsonObject)),\n methods: Schema.Record(Schema.String, Schema.Array(CredentialBinding)),\n oauth: Schema.Array(Schema.String),\n account: Schema.optional(OpenapiAccount),\n parameterDefaults: Schema.optional(OpenapiParameterDefaults),\n signal: Schema.optional(Schema.instanceOf(AbortSignal)),\n fetch: Schema.optional(\n Schema.declare((value): value is typeof globalThis.fetch => typeof value === \"function\"),\n ),\n})","tags":[],"docs":"integrations.md","source":"apps/src/contracts/openapi.ts","related":["apps.JsonObject","apps.Schema","apps/openapi.CredentialBinding","apps/openapi.OpenapiOperation","Schema"],"examples":[]},{"symbol":"apps/openapi.OperationKinds","kind":"type","summary":"Explicit corrections for upstream read-only hints or unusual HTTP semantics.","signatures":[],"definition":"export type OperationKinds = Readonly<Record<string, \"query\" | \"mutation\">>;","tags":[],"docs":"integrations.md","source":"apps/src/implementation/protocol-operations.ts","related":["apps/graphql.OperationKinds","apps/mcp.OperationKinds"],"examples":[]},{"symbol":"apps/operations/approval.always","kind":"function","summary":"Require human approval for every call to the tool.","signatures":["<Input = unknown>(): Approval<Input>"],"tags":[],"docs":"tools.md","source":"apps/src/approval.ts","related":["apps.Approval","apps/operations/approval.Approval"],"examples":["live-inbox"]},{"symbol":"apps/operations/approval.Approval","kind":"type","summary":"Synchronous or async policy, projected from the framework's native contract.","signatures":[],"definition":"export type Approval<Input = unknown> = (\n ...args: Parameters<NativeApproval<Input>>\n) =>\n | Effect.Success<ReturnType<NativeApproval<Input>>>\n | Promise<Effect.Success<ReturnType<NativeApproval<Input>>>>;","tags":[],"docs":"tools.md","source":"apps/src/approval.ts","related":["apps.Approval"],"examples":["live-inbox"]},{"symbol":"apps/operations/approval.ApprovalContext","kind":"type","summary":"Context for one tool's policy. toolInput is the same decoded value passed to run.","signatures":[],"definition":"export interface ApprovalContext<Input = unknown> {\n readonly toolName: string;\n readonly toolInput: Input;\n readonly signal: AbortSignal;\n}","tags":[],"docs":"tools.md","source":"apps/src/contracts/approval.ts","related":["apps.ApprovalContext"],"examples":["live-inbox"]},{"symbol":"apps/operations/approval.ApprovalDecision","kind":"type","summary":"Approve this call, deny it, or stop for a human decision.\nParsed result of one tool approval policy.","signatures":[],"definition":"ApprovalDecision = Schema.Literals([\"approved\", \"denied\", \"user-approval\"])","tags":[],"docs":"tools.md","source":"apps/src/contracts/approval.ts","related":["apps.ApprovalDecision","apps.Schema","Schema"],"examples":["live-inbox"]},{"symbol":"apps/operations/approval.never","kind":"function","summary":"Never require human approval for this tool. Product access checks still apply.","signatures":["<Input = unknown>(): Approval<Input>"],"tags":[],"docs":"tools.md","source":"apps/src/approval.ts","related":["apps.Approval","apps/operations/approval.Approval"],"examples":["live-inbox"]},{"symbol":"apps/react.useAppQuery","kind":"function","summary":"Subscribe for the component lifetime. Each mount owns and disposes its registry, including StrictMode remounts.","signatures":["<A, E>(atom: Atom.Atom<AsyncResult.AsyncResult<A, E>>): { data: A | undefined; pending: boolean; error: string | undefined; }"],"tags":[],"docs":"ui.md","source":"apps/src/react.ts","related":[],"examples":["live-inbox"]},{"symbol":"apps/skills.fileSkill","kind":"function","summary":"Parse a bundled standard skill directory into an app capability.","signatures":["(files: readonly SkillFile[]): Promise<{ readonly name: string; readonly description: string; readonly files: readonly { readonly path: string; readonly content: string; }[]; readonly license?: string; readonly compatibility?: string; readonly metadata?: { readonly [x: string]: string; }; readonly \"allowed-tools\"?: string; }>"],"tags":[],"docs":"tools.md","source":"apps/src/skills.ts","related":["apps.SkillFile","apps/skills.SkillFile"],"examples":["live-inbox"]},{"symbol":"apps/skills.folderSkills","kind":"function","summary":"Read skill directories from ctx.files. Omitted path selects skills/; missing folders return [].","signatures":["(options: FolderSkillsOptions): Promise<readonly { readonly name: string; readonly description: string; readonly files: readonly { readonly path: string; readonly content: string; }[]; readonly license?: string; readonly compatibility?: string; readonly metadata?: { readonly [x: string]: string; }; readonly \"allowed-tools\"?: string; }[]>"],"tags":[],"docs":"tools.md","source":"apps/src/skills.ts","related":["apps/skills.FolderSkillsOptions"],"examples":["live-inbox"]},{"symbol":"apps/skills.FolderSkillsOptions","kind":"type","summary":"A folder in the deployed package; omitted path selects skills/. No host filesystem access.","signatures":[],"definition":"export interface FolderSkillsOptions {\n readonly files: readonly SkillFile[];\n readonly path?: string;\n}","tags":[],"docs":"tools.md","source":"apps/src/contracts/skills.ts","related":["apps.SkillFile","apps/skills.SkillFile"],"examples":["live-inbox"]},{"symbol":"apps/skills.githubSkills","kind":"function","summary":"Fetch a public GitHub skill collection from one resolved commit. Pass `cache: ctx.cache` to reuse\nthe catalog; without it, mutable refs resolve again on each call.","signatures":["(options: GitHubSkillsOptions): Promise<readonly { readonly name: string; readonly description: string; readonly files: readonly { readonly path: string; readonly content: string; }[]; readonly license?: string; readonly compatibility?: string; readonly metadata?: { readonly [x: string]: string; }; readonly \"allowed-tools\"?: string; }[]>"],"tags":[],"docs":"tools.md","source":"apps/src/skills.ts","related":["apps/skills.GitHubSkillsOptions"],"examples":["live-inbox"]},{"symbol":"apps/skills.GitHubSkillsOptions","kind":"type","summary":"A public GitHub repository and an optional immutable commit, tag or branch. With a cache, a\nbranch or tag is resolved again when the catalog refreshes, and each commit's file list is kept.","signatures":[],"definition":"export interface GitHubSkillsOptions extends SkillTransport, SkillCacheOptions {\n readonly repo: string;\n readonly path?: string;\n readonly ref?: string;\n}","tags":[],"docs":"tools.md","source":"apps/src/contracts/skills.ts","related":["apps/skills.SkillCacheOptions"],"examples":["live-inbox"]},{"symbol":"apps/skills.Skill","kind":"type","summary":"Files use paths relative to this skill directory; reading one never executes its contents.","signatures":[],"definition":"AppSkillSource = Schema.Struct({\n ...AppSkillMetadata.fields,\n files: Schema.Array(SkillFile).check(\n Schema.makeFilter(\n (files) =>\n files.some((file) => file.path === \"SKILL.md\") &&\n new Set(files.map((file) => file.path)).size === files.length,\n ),\n ),\n})","tags":[],"docs":"tools.md","source":"apps/src/contracts/skills.ts","related":["apps.Schema","apps.SkillFile","apps/skills.SkillFile","Schema"],"examples":["live-inbox"]},{"symbol":"apps/skills.SkillCacheOptions","kind":"type","summary":"Catalog reuse shared by remote skill loaders, with the same policy as MCP tool catalogs. Pass\n`ctx.cache` to keep the loaded catalog; without it every read fetches the source again.","signatures":[],"definition":"export interface SkillCacheOptions {\n readonly cache?: import(\"./cache.ts\").AppCache;\n /** Reuse the catalog for this duration. Defaults to five minutes. */\n readonly freshFor?: import(\"effect\").Duration.Input;\n /** Serve the retained catalog while refreshing. Defaults to one day. */\n readonly staleFor?: import(\"effect\").Duration.Input;\n}","tags":[],"docs":"tools.md","source":"apps/src/contracts/skills.ts","related":["AppCache","apps.AppCache"],"examples":["live-inbox"]},{"symbol":"apps/skills.SkillFile","kind":"type","summary":"UTF-8 text resource. Reading a resource never executes it.","signatures":[],"definition":"SkillFile = Schema.Struct({ path: SkillFilePath, content: Schema.String })","tags":[],"docs":"tools.md","source":"apps/src/contracts/skills.ts","related":["apps.Schema","apps.SkillFile","Schema"],"examples":["live-inbox"]},{"symbol":"apps/skills.skillReader","kind":"function","summary":"Read files for a custom remote skill loader, such as one for GitLab. Reads share one byte\nbudget and reject with the same safe SkillLoadFailed errors as githubSkills, naming `service`.","signatures":["(options: SkillReaderOptions): { text: (url: string) => Promise<string>; json: (url: string) => Promise<unknown>; }"],"tags":[],"docs":"tools.md","source":"apps/src/skills.ts","related":["apps/skills.SkillReaderOptions"],"examples":["live-inbox"]},{"symbol":"apps/skills.SkillReaderOptions","kind":"type","summary":"A custom loader's transport and the service name shown when a request fails.","signatures":[],"definition":"export interface SkillReaderOptions extends SkillTransport {\n readonly service: string;\n}","tags":[],"docs":"tools.md","source":"apps/src/contracts/skills.ts","related":[],"examples":["live-inbox"]},{"symbol":"apps/skills.wellKnownSkills","kind":"function","summary":"Fetch a published skill index and its text files. Pass `cache: ctx.cache` to reuse the catalog.","signatures":["(options: WellKnownSkillsOptions): Promise<readonly { readonly name: string; readonly description: string; readonly files: readonly { readonly path: string; readonly content: string; }[]; readonly license?: string; readonly compatibility?: string; readonly metadata?: { readonly [x: string]: string; }; readonly \"allowed-tools\"?: string; }[]>"],"tags":[],"docs":"tools.md","source":"apps/src/skills.ts","related":["apps/skills.WellKnownSkillsOptions"],"examples":["live-inbox"]},{"symbol":"apps/skills.WellKnownSkillsOptions","kind":"type","summary":"A published directory index, including its listed skill documents and text references.","signatures":[],"definition":"export interface WellKnownSkillsOptions extends SkillTransport, SkillCacheOptions {\n readonly url: string;\n}","tags":[],"docs":"tools.md","source":"apps/src/contracts/skills.ts","related":["apps/skills.SkillCacheOptions"],"examples":["live-inbox"]},{"symbol":"DatabaseTable","kind":"type","summary":"Writes are valid only inside their owning mutation.","signatures":[],"definition":"export interface WriteTable<Row, Insert, Index extends string = string> extends ReadTable<\n Row,\n Index\n> {\n /** Insert authored fields and return the complete row with generated id, createdAt and updatedAt. */\n readonly insert: (value: Insert) => Promise<Row>;\n /** Patch authored fields and return the complete row, or null if the ID does not exist. */\n readonly update: (id: string, patch: Partial<Insert>) => Promise<Row | null>;\n /** Delete the row and return whether it existed. */\n readonly delete: (id: string) => Promise<boolean>;\n}","tags":[],"docs":"storage.md","source":"app-data/src/implementation/promise.ts","related":[],"examples":["live-inbox"]},{"symbol":"DatabaseTable.delete","kind":"method","summary":"Delete the row and return whether it existed.","signatures":["(id: string): Promise<boolean>"],"tags":[],"docs":"storage.md","source":"app-data/src/implementation/promise.ts","related":["DatabaseTable"],"examples":["live-inbox"]},{"symbol":"DatabaseTable.get","kind":"method","summary":"Read a complete row by ID, or null when it does not exist.","signatures":["(id: string): Promise<Row | null>"],"tags":[],"docs":"storage.md","source":"app-data/src/implementation/promise.ts","related":["DatabaseTable"],"examples":["live-inbox"]},{"symbol":"DatabaseTable.insert","kind":"method","summary":"Insert authored fields and return the complete row with generated id, createdAt and updatedAt.","signatures":["(value: Insert): Promise<Row>"],"tags":[],"docs":"storage.md","source":"app-data/src/implementation/promise.ts","related":["DatabaseTable"],"examples":["live-inbox"]},{"symbol":"DatabaseTable.update","kind":"method","summary":"Patch authored fields and return the complete row, or null if the ID does not exist.","signatures":["(id: string, patch: Partial<Insert>): Promise<Row | null>"],"tags":[],"docs":"storage.md","source":"app-data/src/implementation/promise.ts","related":["DatabaseTable"],"examples":["live-inbox"]},{"symbol":"DatabaseTable.withIndex","kind":"method","summary":"Select a declared index or by_creation, with optional prefix and range constraints.","signatures":["(index: \"by_creation\" | Index, range?: ((query: IndexRange<Row>) => IndexRange<Row>) | undefined): Query<Row>"],"tags":[],"docs":"storage.md","source":"app-data/src/implementation/promise.ts","related":["DatabaseTable","IndexRange"],"examples":["live-inbox"]},{"symbol":"IndexQuery","kind":"type","summary":"Bounded indexed reads; collect/count reject work beyond the invocation budget.","signatures":[],"definition":"export interface Query<Row> {\n /** Choose ascending or descending index order without changing this query. */\n readonly order: (direction: \"asc\" | \"desc\") => Query<Row>;\n /** Read all matching rows within the invocation budget; exceeding it fails. */\n readonly collect: () => Promise<readonly Row[]>;\n /** Count matching rows within the scan budget; exceeding it fails. */\n readonly count: () => Promise<number>;\n /** Read the first matching row, or null when no row matches. */\n readonly first: () => Promise<Row | null>;\n /** Read at most count matching rows within the invocation budget. */\n readonly take: (count: number) => Promise<readonly Row[]>;\n /** Read one cursor page. Return its rows, continuation cursor and completion flag. */\n readonly paginate: (options: {\n readonly numItems: number;\n readonly cursor: string | null;\n }) => Promise<{\n readonly page: readonly Row[];\n readonly continueCursor: string | null;\n readonly isDone: boolean;\n }>;\n}","tags":[],"docs":"storage.md","source":"app-data/src/implementation/promise.ts","related":[],"examples":["live-inbox"]},{"symbol":"IndexQuery.collect","kind":"method","summary":"Read all matching rows within the invocation budget; exceeding it fails.","signatures":["(): Promise<readonly Row[]>"],"tags":[],"docs":"storage.md","source":"app-data/src/implementation/promise.ts","related":["IndexQuery"],"examples":["live-inbox"]},{"symbol":"IndexQuery.count","kind":"method","summary":"Count matching rows within the scan budget; exceeding it fails.","signatures":["(): Promise<number>"],"tags":[],"docs":"storage.md","source":"app-data/src/implementation/promise.ts","related":["IndexQuery"],"examples":["live-inbox"]},{"symbol":"IndexQuery.first","kind":"method","summary":"Read the first matching row, or null when no row matches.","signatures":["(): Promise<Row | null>"],"tags":[],"docs":"storage.md","source":"app-data/src/implementation/promise.ts","related":["IndexQuery"],"examples":["live-inbox"]},{"symbol":"IndexQuery.order","kind":"method","summary":"Choose ascending or descending index order without changing this query.","signatures":["(direction: \"asc\" | \"desc\"): Query<Row>"],"tags":[],"docs":"storage.md","source":"app-data/src/implementation/promise.ts","related":["IndexQuery"],"examples":["live-inbox"]},{"symbol":"IndexQuery.paginate","kind":"method","summary":"Read one cursor page. Return its rows, continuation cursor and completion flag.","signatures":["(options: { readonly numItems: number; readonly cursor: string | null; }): Promise<{ readonly page: readonly Row[]; readonly continueCursor: string | null; readonly isDone: boolean; }>"],"tags":[],"docs":"storage.md","source":"app-data/src/implementation/promise.ts","related":["IndexQuery"],"examples":["live-inbox"]},{"symbol":"IndexQuery.take","kind":"method","summary":"Read at most count matching rows within the invocation budget.","signatures":["(count: number): Promise<readonly Row[]>"],"tags":[],"docs":"storage.md","source":"app-data/src/implementation/promise.ts","related":["IndexQuery"],"examples":["live-inbox"]},{"symbol":"IndexRange","kind":"type","summary":"Index predicates are accumulated immutably, then checked against the declaration by the engine.","signatures":[],"definition":"export interface IndexRange<Fields> {\n /** Constrain an index prefix field to one value. Null matches a cleared optional field. */\n readonly eq: <Key extends keyof Fields & string>(\n field: Key,\n value: Fields[Key] | null,\n ) => IndexRange<Fields>;\n /** Require a value greater than the bound on the next index field. */\n readonly gt: <Key extends keyof Fields & string>(\n field: Key,\n value: Fields[Key],\n ) => IndexRange<Fields>;\n /** Require a value greater than or equal to the bound on the next index field. */\n readonly gte: <Key extends keyof Fields & string>(\n field: Key,\n value: Fields[Key],\n ) => IndexRange<Fields>;\n /** Require a value less than the bound on the next index field. */\n readonly lt: <Key extends keyof Fields & string>(\n field: Key,\n value: Fields[Key],\n ) => IndexRange<Fields>;\n /** Require a value less than or equal to the bound on the next index field. */\n readonly lte: <Key extends keyof Fields & string>(\n field: Key,\n value: Fields[Key],\n ) => IndexRange<Fields>;\n}","tags":[],"docs":"storage.md","source":"app-data/src/implementation/promise.ts","related":["apps.Fields"],"examples":["live-inbox"]},{"symbol":"IndexRange.eq","kind":"method","summary":"Constrain an index prefix field to one value. Null matches a cleared optional field.","signatures":["<Key extends keyof Fields & string>(field: Key, value: Fields[Key] | null): IndexRange<Fields>"],"tags":[],"docs":"storage.md","source":"app-data/src/implementation/promise.ts","related":["apps.Fields","IndexRange"],"examples":["live-inbox"]},{"symbol":"IndexRange.gt","kind":"method","summary":"Require a value greater than the bound on the next index field.","signatures":["<Key extends keyof Fields & string>(field: Key, value: Fields[Key]): IndexRange<Fields>"],"tags":[],"docs":"storage.md","source":"app-data/src/implementation/promise.ts","related":["apps.Fields","IndexRange"],"examples":["live-inbox"]},{"symbol":"IndexRange.gte","kind":"method","summary":"Require a value greater than or equal to the bound on the next index field.","signatures":["<Key extends keyof Fields & string>(field: Key, value: Fields[Key]): IndexRange<Fields>"],"tags":[],"docs":"storage.md","source":"app-data/src/implementation/promise.ts","related":["apps.Fields","IndexRange"],"examples":["live-inbox"]},{"symbol":"IndexRange.lt","kind":"method","summary":"Require a value less than the bound on the next index field.","signatures":["<Key extends keyof Fields & string>(field: Key, value: Fields[Key]): IndexRange<Fields>"],"tags":[],"docs":"storage.md","source":"app-data/src/implementation/promise.ts","related":["apps.Fields","IndexRange"],"examples":["live-inbox"]},{"symbol":"IndexRange.lte","kind":"method","summary":"Require a value less than or equal to the bound on the next index field.","signatures":["<Key extends keyof Fields & string>(field: Key, value: Fields[Key]): IndexRange<Fields>"],"tags":[],"docs":"storage.md","source":"app-data/src/implementation/promise.ts","related":["apps.Fields","IndexRange"],"examples":["live-inbox"]},{"symbol":"OptimisticLocalStore","kind":"type","summary":"Read or replace mounted queries during a synchronous optimistic update. Never mutate returned values.","signatures":[],"definition":"export interface OptimisticLocalStore {\n /** Read the projected result, or undefined if this query is not loaded in this client. */\n getQuery<Input, Output>(\n reference: OperationReference<Input, Output, \"query\">,\n input: NoInfer<Input>,\n ): Output | undefined;\n /** Read all mounted argument variants of an operation, including loading queries. */\n getAllQueries<Input, Output>(\n reference: OperationReference<Input, Output, \"query\">,\n ): readonly { readonly input: Input; readonly value: Output | undefined }[];\n /** Replace a mounted query's projected result. The query's output schema validates the new value. */\n setQuery<Input, Output>(\n reference: OperationReference<Input, Output, \"query\">,\n input: NoInfer<Input>,\n value: NoInfer<Output>,\n ): void;\n}","tags":[],"docs":"ui.md","source":"apps/src/contracts/optimistic.ts","related":["apps/client.OperationReference","apps/client.OptimisticLocalStore"],"examples":["live-inbox"]},{"symbol":"OptimisticLocalStore.getAllQueries","kind":"method","summary":"Read all mounted argument variants of an operation, including loading queries.","signatures":["<Input, Output>(reference: OperationReference<Input, Output, \"query\">): readonly { readonly input: Input; readonly value: Output | undefined; }[]"],"tags":[],"docs":"ui.md","source":"apps/src/contracts/optimistic.ts","related":["apps/client.OperationReference","OptimisticLocalStore"],"examples":["live-inbox"]},{"symbol":"OptimisticLocalStore.getQuery","kind":"method","summary":"Read the projected result, or undefined if this query is not loaded in this client.","signatures":["<Input, Output>(reference: OperationReference<Input, Output, \"query\">, input: NoInfer<Input>): Output | undefined"],"tags":[],"docs":"ui.md","source":"apps/src/contracts/optimistic.ts","related":["apps/client.OperationReference","OptimisticLocalStore"],"examples":["live-inbox"]},{"symbol":"OptimisticLocalStore.setQuery","kind":"method","summary":"Replace a mounted query's projected result. The query's output schema validates the new value.","signatures":["<Input, Output>(reference: OperationReference<Input, Output, \"query\">, input: NoInfer<Input>, value: NoInfer<Output>): void"],"tags":[],"docs":"ui.md","source":"apps/src/contracts/optimistic.ts","related":["apps/client.OperationReference","OptimisticLocalStore"],"examples":["live-inbox"]},{"symbol":"Provider","kind":"type","summary":"A provider declaration. The host derives its identity from the declaration, never its check.","signatures":[],"definition":"export class Provider<Auth extends AuthMethods> extends Data.Class<{\n readonly name: string;\n readonly auth: Auth;\n /**\n * Stored without its method types so a specific provider still fills a general slot. The host\n * binds the account against this provider's methods before running it.\n */\n readonly health?: AccountCheck<AuthMethods>;\n}> {\n /** Declare zero or more accounts from this provider without performing I/O. */\n many(): ManyAccounts<Auth> {\n return new ManyAccounts({ provider: this });\n }\n}","tags":[],"docs":"accounts.md","source":"apps/src/contracts/provider.ts","related":["apps.AuthMethods"],"examples":[]},{"symbol":"Provider.many","kind":"method","summary":"Declare zero or more accounts from this provider without performing I/O.","signatures":["(): ManyAccounts<Auth>"],"tags":[],"docs":"accounts.md","source":"apps/src/contracts/provider.ts","related":["Provider"],"examples":[]},{"symbol":"Provider.pipe","kind":"method","summary":"","signatures":["<A>(this: A): A","<A, B = never>(this: A, ab: (_: A) => B): B","<A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C","<A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D","<A, B = never, C = never, D = never, E = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D, de: (_: D) => E): E","<A, B = never, C = never, D = never, E = never, F = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D, de: (_: D) => E, ef: (_: E) => F): F","<A, B = never, C = never, D = never, E = never, F = never, G = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D, de: (_: D) => E, ef: (_: E) => F, fg: (_: F) => G): G","<A, B = never, C = never, D = never, E = never, F = never, G = never, H = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D, de: (_: D) => E, ef: (_: E) => F, fg: (_: F) => G, gh: (_: G) => H): H","<A, B = never, C = never, D = never, E = never, F = never, G = never, H = never, I = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D, de: (_: D) => E, ef: (_: E) => F, fg: (_: F) => G, gh: (_: G) => H, hi: (_: H) => I): I","<A, B = never, C = never, D = never, E = never, F = never, G = never, H = never, I = never, J = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D, de: (_: D) => E, ef: (_: E) => F, fg: (_: F) => G, gh: (_: G) => H, hi: (_: H) => I, ij: (_: I) => J): J","<A, B = never, C = never, D = never, E = never, F = never, G = never, H = never, I = never, J = never, K = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D, de: (_: D) => E, ef: (_: E) => F, fg: (_: F) => G, gh: (_: G) => H, hi: (_: H) => I, ij: (_: I) => J, jk: (_: J) => K): K","<A, B = never, C = never, D = never, E = never, F = never, G = never, H = never, I = never, J = never, K = never, L = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D, de: (_: D) => E, ef: (_: E) => F, fg: (_: F) => G, gh: (_: G) => H, hi: (_: H) => I, ij: (_: I) => J, jk: (_: J) => K, kl: (_: K) => L): L","<A, B = never, C = never, D = never, E = never, F = never, G = never, H = never, I = never, J = never, K = never, L = never, M = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D, de: (_: D) => E, ef: (_: E) => F, fg: (_: F) => G, gh: (_: G) => H, hi: (_: H) => I, ij: (_: I) => J, jk: (_: J) => K, kl: (_: K) => L, lm: (_: L) => M): M","<A, B = never, C = never, D = never, E = never, F = never, G = never, H = never, I = never, J = never, K = never, L = never, M = never, N = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D, de: (_: D) => E, ef: (_: E) => F, fg: (_: F) => G, gh: (_: G) => H, hi: (_: H) => I, ij: (_: I) => J, jk: (_: J) => K, kl: (_: K) => L, lm: (_: L) => M, mn: (_: M) => N): N","<A, B = never, C = never, D = never, E = never, F = never, G = never, H = never, I = never, J = never, K = never, L = never, M = never, N = never, O = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D, de: (_: D) => E, ef: (_: E) => F, fg: (_: F) => G, gh: (_: G) => H, hi: (_: H) => I, ij: (_: I) => J, jk: (_: J) => K, kl: (_: K) => L, lm: (_: L) => M, mn: (_: M) => N, no: (_: N) => O): O","<A, B = never, C = never, D = never, E = never, F = never, G = never, H = never, I = never, J = never, K = never, L = never, M = never, N = never, O = never, P = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D, de: (_: D) => E, ef: (_: E) => F, fg: (_: F) => G, gh: (_: G) => H, hi: (_: H) => I, ij: (_: I) => J, jk: (_: J) => K, kl: (_: K) => L, lm: (_: L) => M, mn: (_: M) => N, no: (_: N) => O, op: (_: O) => P): P","<A, B = never, C = never, D = never, E = never, F = never, G = never, H = never, I = never, J = never, K = never, L = never, M = never, N = never, O = never, P = never, Q = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D, de: (_: D) => E, ef: (_: E) => F, fg: (_: F) => G, gh: (_: G) => H, hi: (_: H) => I, ij: (_: I) => J, jk: (_: J) => K, kl: (_: K) => L, lm: (_: L) => M, mn: (_: M) => N, no: (_: N) => O, op: (_: O) => P, pq: (_: P) => Q): Q","<A, B = never, C = never, D = never, E = never, F = never, G = never, H = never, I = never, J = never, K = never, L = never, M = never, N = never, O = never, P = never, Q = never, R = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D, de: (_: D) => E, ef: (_: E) => F, fg: (_: F) => G, gh: (_: G) => H, hi: (_: H) => I, ij: (_: I) => J, jk: (_: J) => K, kl: (_: K) => L, lm: (_: L) => M, mn: (_: M) => N, no: (_: N) => O, op: (_: O) => P, pq: (_: P) => Q, qr: (_: Q) => R): R","<A, B = never, C = never, D = never, E = never, F = never, G = never, H = never, I = never, J = never, K = never, L = never, M = never, N = never, O = never, P = never, Q = never, R = never, S = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D, de: (_: D) => E, ef: (_: E) => F, fg: (_: F) => G, gh: (_: G) => H, hi: (_: H) => I, ij: (_: I) => J, jk: (_: J) => K, kl: (_: K) => L, lm: (_: L) => M, mn: (_: M) => N, no: (_: N) => O, op: (_: O) => P, pq: (_: P) => Q, qr: (_: Q) => R, rs: (_: R) => S): S","<A, B = never, C = never, D = never, E = never, F = never, G = never, H = never, I = never, J = never, K = never, L = never, M = never, N = never, O = never, P = never, Q = never, R = never, S = never, T = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D, de: (_: D) => E, ef: (_: E) => F, fg: (_: F) => G, gh: (_: G) => H, hi: (_: H) => I, ij: (_: I) => J, jk: (_: J) => K, kl: (_: K) => L, lm: (_: L) => M, mn: (_: M) => N, no: (_: N) => O, op: (_: O) => P, pq: (_: P) => Q, qr: (_: Q) => R, rs: (_: R) => S, st: (_: S) => T): T","<A, B = never, C = never, D = never, E = never, F = never, G = never, H = never, I = never, J = never, K = never, L = never, M = never, N = never, O = never, P = never, Q = never, R = never, S = never, T = never, U = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D, de: (_: D) => E, ef: (_: E) => F, fg: (_: F) => G, gh: (_: G) => H, hi: (_: H) => I, ij: (_: I) => J, jk: (_: J) => K, kl: (_: K) => L, lm: (_: L) => M, mn: (_: M) => N, no: (_: N) => O, op: (_: O) => P, pq: (_: P) => Q, qr: (_: Q) => R, rs: (_: R) => S, st: (_: S) => T, tu: (_: T) => U): U","<A, B = never, C = never, D = never, E = never, F = never, G = never, H = never, I = never, J = never, K = never, L = never, M = never, N = never, O = never, P = never, Q = never, R = never, S = never, T = never, U = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D, de: (_: D) => E, ef: (_: E) => F, fg: (_: F) => G, gh: (_: G) => H, hi: (_: H) => I, ij: (_: I) => J, jk: (_: J) => K, kl: (_: K) => L, lm: (_: L) => M, mn: (_: M) => N, no: (_: N) => O, op: (_: O) => P, pq: (_: P) => Q, qr: (_: Q) => R, rs: (_: R) => S, st: (_: S) => T, tu: (_: T) => U): U"],"tags":[],"docs":"accounts.md","source":"../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/Pipeable.d.ts","related":["Provider"],"examples":[]},{"symbol":"Schema","kind":"type","summary":"An author-facing value schema. Effect is never required in author code.","signatures":[],"definition":"export interface Schema<T, Optional extends boolean = false> {\n readonly [StorageField]?: Field;\n readonly [Decoder]: EffectSchema.Decoder<T>;\n readonly optionalValue: Optional;\n /** Parse an unknown value; invalid input throws a safe ValidationError. */\n parse(input: unknown): T;\n /** Accept an absent field without changing the original schema. */\n optional(): Schema<T | undefined, true>;\n /** Validate the default now and use it for undefined input. */\n default(value: T): Schema<T> & { readonly hasDefault: true; readonly inputOptional: Optional };\n}","tags":[],"docs":"tools.md","source":"apps/src/implementation/schema.ts","related":["apps.Schema"],"examples":["live-inbox"]},{"symbol":"Schema.default","kind":"method","summary":"Validate the default now and use it for undefined input.","signatures":["(value: T): Schema<T> & { readonly hasDefault: true; readonly inputOptional: Optional; }"],"tags":[],"docs":"tools.md","source":"apps/src/implementation/schema.ts","related":["apps.Schema","Schema"],"examples":["live-inbox"]},{"symbol":"Schema.optional","kind":"method","summary":"Accept an absent field without changing the original schema.","signatures":["(): Schema<T | undefined, true>"],"tags":[],"docs":"tools.md","source":"apps/src/implementation/schema.ts","related":["apps.Schema","Schema"],"examples":["live-inbox"]},{"symbol":"Schema.parse","kind":"method","summary":"Parse an unknown value; invalid input throws a safe ValidationError.","signatures":["(input: unknown): T"],"tags":[],"docs":"tools.md","source":"apps/src/implementation/schema.ts","related":["Schema"],"examples":["live-inbox"]},{"symbol":"Table","kind":"type","summary":"Typed table declaration; indexes refer only to authored or host metadata fields.","signatures":[],"definition":"export interface Table<F extends Fields, Index extends string = never> {\n readonly fields: F;\n readonly indexes: ReadonlyArray<{ readonly name: string; readonly fields: readonly string[] }>;\n readonly index: <Name extends string>(\n name: Name,\n fields: readonly [\n (keyof F & string) | keyof typeof RowMetadata.Type,\n ...((keyof F & string) | keyof typeof RowMetadata.Type)[],\n ],\n ) => Table<F, Index | Name>;\n}","tags":[],"docs":"storage.md","source":"apps/src/contracts/storage.ts","related":["apps.Fields","apps.Table"],"examples":["live-inbox"]},{"symbol":"Table.index","kind":"method","summary":"","signatures":["<Name extends string>(name: Name, fields: readonly [(keyof F & string) | keyof typeof RowMetadata.Type, ...((keyof F & string) | keyof typeof RowMetadata.Type)[]]): Table<F, Index | Name>"],"tags":[],"docs":"storage.md","source":"apps/src/contracts/storage.ts","related":["apps.Table","Table"],"examples":["live-inbox"]},{"symbol":"WorkflowControls","kind":"type","summary":"Mutating handlers may start and terminate runs in their own configured app.","signatures":[],"definition":"export interface WorkflowControls extends WorkflowReads {\n readonly start: (input: {\n readonly workflow: string;\n readonly input: JsonValue;\n readonly key?: string;\n }) => Promise<WorkflowRun>;\n readonly terminate: (input: { readonly run: string }) => Promise<WorkflowRun>;\n}","tags":[],"docs":"workflows.md","source":"apps/src/contracts/workflows.ts","related":["apps.JsonValue","apps.WorkflowControls","apps.WorkflowReads"],"examples":[]},{"symbol":"WorkflowControls.get","kind":"method","summary":"","signatures":["(input: { readonly run: string; }): Promise<WorkflowRun>"],"tags":[],"docs":"workflows.md","source":"apps/src/contracts/workflows.ts","related":["WorkflowControls"],"examples":[]},{"symbol":"WorkflowControls.list","kind":"method","summary":"","signatures":["(input?: { readonly workflow?: string; readonly limit?: number; readonly cursor?: string; }): Promise<WorkflowRunPage>"],"tags":[],"docs":"workflows.md","source":"apps/src/contracts/workflows.ts","related":["WorkflowControls"],"examples":[]},{"symbol":"WorkflowControls.start","kind":"method","summary":"","signatures":["(input: { readonly workflow: string; readonly input: JsonValue; readonly key?: string; }): Promise<WorkflowRun>"],"tags":[],"docs":"workflows.md","source":"apps/src/contracts/workflows.ts","related":["apps.JsonValue","WorkflowControls"],"examples":[]},{"symbol":"WorkflowControls.terminate","kind":"method","summary":"","signatures":["(input: { readonly run: string; }): Promise<WorkflowRun>"],"tags":[],"docs":"workflows.md","source":"apps/src/contracts/workflows.ts","related":["WorkflowControls"],"examples":[]},{"symbol":"WorkflowStep","kind":"type","summary":"Explicit durable boundaries; database access passes through registered app operations.","signatures":[],"definition":"export interface WorkflowStep<Requirements extends AppRequirements = AppRequirements> {\n do<Output>(\n name: string,\n run: (context: WorkflowStepContext<Requirements>) => Promise<Output>,\n ): Promise<Output>;\n do<Output>(\n name: string,\n options: WorkflowStepOptions,\n run: (context: WorkflowStepContext<Requirements>) => Promise<Output>,\n ): Promise<Output>;\n runQuery<Input, Output>(\n name: string,\n operation: Operation<Input, Output, \"query\", QueryContext<Requirements>>,\n input: NoInfer<Input>,\n options?: WorkflowStepOptions,\n ): Promise<Output>;\n runMutation<Input, Output>(\n name: string,\n operation: Operation<Input, Output, \"mutation\", MutationContext<Requirements>>,\n input: NoInfer<Input>,\n options?: WorkflowStepOptions,\n ): Promise<Output>;\n readonly sleep: (name: string, duration: WorkflowDuration) => Promise<void>;\n readonly sleepUntil: (name: string, timestamp: number | Date) => Promise<void>;\n}","tags":[],"docs":"workflows.md","source":"apps/src/contracts/workflows.ts","related":["apps.AppRequirements","apps.MutationContext","apps.Operation","apps.QueryContext","apps.WorkflowDuration","apps.WorkflowStep","apps.WorkflowStepContext","apps.WorkflowStepOptions"],"examples":[]},{"symbol":"WorkflowStep.do","kind":"method","summary":"","signatures":["<Output>(name: string, run: (context: WorkflowStepContext<Requirements>) => Promise<Output>): Promise<Output>","<Output>(name: string, options: WorkflowStepOptions, run: (context: WorkflowStepContext<Requirements>) => Promise<Output>): Promise<Output>"],"tags":[],"docs":"workflows.md","source":"apps/src/contracts/workflows.ts","related":["apps.WorkflowStepContext","apps.WorkflowStepOptions","WorkflowStep"],"examples":[]},{"symbol":"WorkflowStep.runMutation","kind":"method","summary":"","signatures":["<Input, Output>(name: string, operation: Operation<Input, Output, \"mutation\", MutationContext<Requirements>>, input: NoInfer<Input>, options?: WorkflowStepOptions): Promise<Output>"],"tags":[],"docs":"workflows.md","source":"apps/src/contracts/workflows.ts","related":["apps.MutationContext","apps.Operation","apps.WorkflowStepOptions","WorkflowStep"],"examples":[]},{"symbol":"WorkflowStep.runQuery","kind":"method","summary":"","signatures":["<Input, Output>(name: string, operation: Operation<Input, Output, \"query\", QueryContext<Requirements>>, input: NoInfer<Input>, options?: WorkflowStepOptions): Promise<Output>"],"tags":[],"docs":"workflows.md","source":"apps/src/contracts/workflows.ts","related":["apps.Operation","apps.QueryContext","apps.WorkflowStepOptions","WorkflowStep"],"examples":[]},{"symbol":"WorkflowStep.sleep","kind":"method","summary":"","signatures":["(name: string, duration: WorkflowDuration): Promise<void>"],"tags":[],"docs":"workflows.md","source":"apps/src/contracts/workflows.ts","related":["apps.WorkflowDuration","WorkflowStep"],"examples":[]},{"symbol":"WorkflowStep.sleepUntil","kind":"method","summary":"","signatures":["(name: string, timestamp: number | Date): Promise<void>"],"tags":[],"docs":"workflows.md","source":"apps/src/contracts/workflows.ts","related":["WorkflowStep"],"examples":[]}],"examples":[{"id":"live-inbox","title":"React UI with live app storage","files":[{"path":"index.ts","content":"import {\n query,\n mutation,\n type QueryContext,\n type MutationContext,\n array,\n defineApp,\n defineDatabase,\n object,\n string,\n table,\n router,\n} from \"apps\";\nimport { Message } from \"./schema.ts\";\n\nconst database = defineDatabase({\n messages: table({ subject: string() }).index(\"by_subject\", [\"subject\"]),\n});\n\nconst requirements = { accounts: {}, database };\n\nexport const listMessages = query(\n { input: object({}), output: array(Message) },\n async ({ db }: QueryContext<typeof requirements>) =>\n await db.messages.withIndex(\"by_creation\").order(\"desc\").take(100),\n);\nexport const receiveMessage = mutation(\n { input: object({ subject: string(), clientId: string().optional() }), output: Message },\n async ({ db }: MutationContext<typeof requirements>, message) =>\n await db.messages.insert({ subject: message.subject }),\n);\nexport default defineApp(requirements, {\n tools: router({\n listMessages,\n receiveMessage,\n }),\n});\n"},{"path":"schema.ts","content":"/** Shared data shape; safe to import from browser and server code. */\nimport { object, string } from \"apps\";\nexport const Message = object({ id: string(), subject: string() });\n"},{"path":"ui/main.tsx","content":"import { StrictMode, useState } from \"react\";\nimport { createRoot } from \"react-dom/client\";\nimport { array } from \"apps\";\nimport { createAppClient, mutationReference, queryReference } from \"apps/client\";\nimport { useAppQuery } from \"apps/react\";\nimport type { listMessages, receiveMessage } from \"../index.ts\";\nimport { Message } from \"../schema.ts\";\nimport \"./style.css\";\n\nconst client = createAppClient();\nconst listRef = queryReference<typeof listMessages>(\"listMessages\");\nconst inbox = client.queryAtom(listRef, {}, array(Message));\nconst receive = client\n .mutation(mutationReference<typeof receiveMessage>(\"receiveMessage\"), Message)\n .withOptimisticUpdate((store, input) => {\n const rows = store.getQuery(listRef, {});\n if (rows !== undefined && input.clientId !== undefined) {\n store.setQuery(\n listRef,\n {},\n [{ id: input.clientId, subject: input.subject }, ...rows].slice(0, 100),\n );\n }\n });\n\nfunction Inbox() {\n const { data, pending, error } = useAppQuery(inbox);\n const [subject, setSubject] = useState(\"\");\n const [saving, setSaving] = useState(false);\n const [failure, setFailure] = useState<string>();\n return (\n <main className=\"max-w-225 min-h-dvh py-0 px-[32px] m-auto flex flex-col max-[540px]:py-0 max-[540px]:px-[20px]\">\n <header className=\"h-20 flex items-center justify-between [border-bottom:1px_solid_#e8e8e2] max-[540px]:h-16.5\">\n <div className=\"identity flex items-center gap-2.5 font-semibold text-[15px]\">\n <span\n className=\"mark w-7.25 h-7.25 [border:1px_solid_#deded7] bg-white grid [place-items:center] rounded-[8px]\"\n aria-hidden=\"true\"\n >\n ↗\n </span>\n <span>Inbox</span>\n </div>\n <span className=\"status text-[#55645b] text-[12px] flex items-center gap-1.5 before:[content:''] before:w-1.5 before:h-1.5 before:bg-[#659674] before:rounded-[50%]\">\n {pending ? \"Connecting…\" : error ? \"Disconnected\" : \"Live\"}\n </span>\n </header>\n <section className=\"intro [padding:64px_0_36px] [&_p]:text-[14px] [&_p]:text-[#85857d] [&_p]:m-0 max-[540px]:pt-10\">\n <span className=\"eyebrow text-[10px] tracking-[0.12em] font-semibold text-[#888880]\">\n YOUR SPACE\n </span>\n <h1 className=\"text-[clamp(26px,_5vw,_36px)] tracking-[-0.04em] font-medium [margin:14px_0_10px]\">\n A little room for ideas.\n </h1>\n <p>Leave a thought. It’s here when you return.</p>\n </section>\n <form\n className=\"bg-white [border:1px_solid_#e2e2db] rounded-[12px] p-[20px] max-[540px]:p-[16px]\"\n onSubmit={async (event) => {\n event.preventDefault();\n if (!subject.trim() || saving) return;\n setSaving(true);\n setFailure(undefined);\n try {\n await receive({ subject: subject.trim(), clientId: crypto.randomUUID() });\n setSubject(\"\");\n } catch {\n setFailure(\"Could not save your message. Try again.\");\n } finally {\n setSaving(false);\n }\n }}\n >\n <label className=\"block text-[12px] [font-weight:550] mb-3\" htmlFor=\"subject\">\n New message\n </label>\n <div className=\"compose flex gap-3 max-[540px]:flex-col\">\n <input\n className=\"min-w-0 flex-1 [border:1px_solid_#e3e3dd] rounded-[7px] py-[11px] px-[12px] bg-[#fafaf8] text-[14px] focus-visible:[outline:2px_solid_#adbdad] focus-visible:outline-offset-[2px]\"\n id=\"subject\"\n value={subject}\n onChange={(e) => setSubject(e.target.value)}\n placeholder=\"What’s on your mind?\"\n autoComplete=\"off\"\n required\n />\n <button\n className=\"border-0 rounded-[7px] bg-[#303d34] text-white py-0 px-[17px] text-[12px] [font-weight:550] cursor-pointer max-[540px]:min-h-10.5 disabled:opacity-50 disabled:cursor-default\"\n disabled={saving || !subject.trim()}\n >\n {saving ? \"Saving…\" : \"Add message\"}\n </button>\n </div>\n {failure && (\n <p className=\" text-[#a74636] text-[13px]\" role=\"alert\">\n {failure}\n </p>\n )}\n </form>\n <section className=\"messages flex-1 pt-9.5\" aria-labelledby=\"messages-title\">\n <div className=\"section-heading flex items-center justify-between pb-3.75 [border-bottom:1px_solid_#e6e6df] [&_h2]:text-[13px] [&_h2]:[font-weight:550] [&_h2]:m-0 [&_span]:text-[11px] [&_span]:text-[#8c8c83]\">\n <h2 id=\"messages-title\">Messages</h2>\n <span>{data?.length ?? 0}</span>\n </div>\n {error && (\n <p className=\" text-[#a74636] text-[13px]\" role=\"alert\">\n {error}\n </p>\n )}\n {pending ? (\n <p className=\"empty py-[64px] px-0 text-center text-[#97978e] [&_>_span]:text-[30px] [&_>_span]:text-[#bdc4b8] [&_h3]:text-[#77776f] [&_h3]:text-[14px] [&_h3]:font-medium [&_h3]:[margin:18px_0_7px] [&_p]:text-[12px] [&_p]:m-0 \">\n Loading your inbox…\n </p>\n ) : data?.length === 0 ? (\n <div className=\"empty py-[64px] px-0 text-center text-[#97978e] [&_>_span]:text-[30px] [&_>_span]:text-[#bdc4b8] [&_h3]:text-[#77776f] [&_h3]:text-[14px] [&_h3]:font-medium [&_h3]:[margin:18px_0_7px] [&_p]:text-[12px] [&_p]:m-0\">\n <span aria-hidden=\"true\">✳</span>\n <h3>A clean slate.</h3>\n <p>Your first message goes here.</p>\n </div>\n ) : (\n <ul className=\"p-0 m-0 [list-style:none]\">\n {data?.map((message) => (\n <li\n className=\"[border-bottom:1px_solid_#e8e8e2] flex gap-3.75 items-start py-[21px] px-[2px]\"\n key={message.id}\n >\n <span className=\"message-icon text-[#80917e]\" aria-hidden=\"true\">\n ↗\n </span>\n <p>{message.subject}</p>\n </li>\n ))}\n </ul>\n )}\n </section>\n <footer className=\"flex justify-between text-[#a1a197] text-[11px] py-[30px] px-0 mt-10\">\n Live inbox <span>Made with Executor</span>\n </footer>\n </main>\n );\n}\n\nconst root = document.getElementById(\"root\");\nif (root === null) throw new Error(\"Missing app root\");\ncreateRoot(root).render(\n <StrictMode>\n <Inbox />\n </StrictMode>,\n);\n"},{"path":"ui/index.html","content":"<!doctype html>\n<html lang=\"en\">\n <head>\n <meta charset=\"utf-8\" />\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n <title>Live inbox</title>\n <script type=\"module\" src=\"./main.tsx\"></script>\n </head>\n <body>\n <div id=\"root\"></div>\n </body>\n</html>\n"},{"path":"ui/style.css","content":"/* Includes Preflight so copied controls do not retain browser default styles. */\n@import \"tailwindcss\";\n\n@layer base {\n :root {\n font-family:\n Inter,\n ui-sans-serif,\n -apple-system,\n BlinkMacSystemFont,\n \"Segoe UI\",\n sans-serif;\n color: #232321;\n background: #fafaf8;\n font-synthesis: none;\n }\n * {\n box-sizing: border-box;\n }\n body {\n margin: 0;\n }\n button {\n font: inherit;\n }\n input {\n font: inherit;\n }\n}\n"},{"path":"package.json","content":"{\n \"name\": \"@executor-js/app-live-inbox\",\n \"private\": true,\n \"type\": \"module\",\n \"dependencies\": {\n \"apps\": \"0.0.1-beta.9\",\n \"react\": \"^19.2.0\",\n \"react-dom\": \"^19.2.0\"\n }\n}\n"}]}]}
|
|
1
|
+
{"version":"0.0.1-beta.91","digest":"517b18b6f7e2de665de8b10b20d9ea9d5de0e65a2194795ceeed8e02d36bdd7d","entries":[{"symbol":"absent","kind":"value","summary":"","signatures":[],"definition":"const absent: Schema.optionalKey<Schema.Never>","tags":[],"source":"apps/src/contracts/schedules.ts","docs":"tools.md","related":[],"examples":["live-inbox"]},{"symbol":"AccountCheck","kind":"type","summary":"A safe authenticated read proving the account works for this app. Returning passes; a thrown\n`ProviderError` or HTTP status failure classifies the problem. Any other failure, including a\ntimeout, means the check could not verify the account, not that its credentials are bad. A\nthrown error's own message is shown to the user, bounded and with the checked credentials\nreplaced, so write it for them.","signatures":[],"definition":"export interface AccountCheck<Auth extends AuthMethods> {\n // Method syntax lets a check typed for specific methods be stored as a general one.\n run(context: AccountCheckContext<Auth>): Effect.Effect<AccountCheckResult | void, unknown>;\n}","tags":[],"source":"apps/src/contracts/provider.ts","docs":"accounts.md","related":["apps.AccountCheckContext","apps.AccountCheckResult","apps.AuthMethods"],"examples":[]},{"symbol":"AccountCredential","kind":"type","summary":"A credential a remote read sends, and the account it belongs to. A public source takes neither.\nA credential comes only with its account, so the read is cached in that account's scope.","signatures":[],"definition":"export type AccountCredential<Credential extends object> =\n | ({ readonly account?: undefined } & { readonly [Field in keyof Credential]?: undefined })\n | ({\n /** The selected account, as `ctx.app.accounts.<slot>` or `ctx.user.accounts.<slot>` provides it. */\n readonly account: { readonly id: string };\n } & Credential);","tags":[],"source":"apps/src/contracts/cache.ts","docs":"tools.md","related":[],"examples":["live-inbox"]},{"symbol":"AccountFields","kind":"type","summary":"Account fields as app code receives them from a method declared with this schema.","signatures":[],"definition":"type AccountFields<S> = S extends ObjectSchema<infer F> ? SecretFields<F> : SecretObject<Infer<S>>;","tags":[],"source":"apps/src/index.ts","docs":"tools.md","related":["apps.Infer","apps.ObjectSchema","SecretFields","SecretObject"],"examples":["live-inbox"]},{"symbol":"AccountId","kind":"type","summary":"Stable saved account identity supplied by a host, unchanged across refreshes.\nParsed saved account identity.","signatures":[],"definition":"AccountId = Schema.String.pipe(\n Schema.check(Schema.isStartingWith(\"acc_\"), Schema.isMinLength(5)),\n Schema.brand(\"acc\"),\n)","tags":[],"source":"apps/src/contracts/schema.ts","docs":"integrations.md","related":[],"examples":[]},{"symbol":"AccountOfMethods","kind":"type","summary":"One account for these methods, discriminated by its author-chosen method name.","signatures":[],"definition":"export type AccountOfMethods<Auth extends AuthMethods> = {\n // One object type rather than an intersection with `AccountRequest`, so compiler errors about\n // accounts print it as written.\n readonly [Method in keyof Auth & string]: {\n readonly id: AccountId;\n readonly method: Method;\n readonly fields: AuthMethodData<Auth[Method]>;\n /** See `AccountRequest`. */\n readonly headers: AccountRequest[\"headers\"];\n /** See `AccountRequest`. */\n readonly url: AccountRequest[\"url\"];\n };\n}[keyof Auth & string];","tags":[],"source":"apps/src/contracts/provider.ts","docs":"tools.md","related":["AccountId","apps.AccountRequest","apps.AuthMethodData","apps.AuthMethods"],"examples":["live-inbox"]},{"symbol":"AccountsFor","kind":"type","summary":"","signatures":[],"definition":"type AccountsFor<Slot> =\n Slot extends ManyAccounts<infer Auth> ? readonly AccountOf<Provider<Auth>>[] : AccountOf<Slot>;","tags":[],"source":"apps/src/contracts/app.ts","docs":"tools.md","related":["apps.AccountOf","apps.ManyAccounts","apps.Provider","Provider"],"examples":["live-inbox"]},{"symbol":"AnyContext","kind":"type","summary":"The context any handler may declare: either scope, so `user` may be absent.","signatures":[],"definition":"export type AnyContext = AppContext<AppRequirements, AccountScope>;","tags":[],"source":"apps/src/implementation/operations.ts","docs":"tools.md","related":["apps.AccountScope","apps.AppContext","apps.AppRequirements"],"examples":["live-inbox"]},{"symbol":"AnyEventDeclaration","kind":"type","summary":"Any declared event, for requirement constraints.","signatures":[],"definition":"export type AnyEventDeclaration = EventDeclaration<Fields, Schema<unknown, boolean>>;","tags":[],"source":"apps/src/implementation/events.ts","docs":"tools.md","related":["apps.EventDeclaration","apps.Fields","apps.Schema","Schema"],"examples":["live-inbox"]},{"symbol":"AnyWorkflowContext","kind":"type","summary":"The context any workflow may declare: either scope, so a run started without a caller, such as\nby an app schedule, declares `WorkflowContext<typeof requirements, \"app\">`.","signatures":[],"definition":"export type AnyWorkflowContext = WorkflowContext<AppRequirements, AccountScope>;","tags":[],"source":"apps/src/implementation/workflows.ts","docs":"tools.md","related":["apps.AccountScope","apps.AppRequirements","apps.WorkflowContext"],"examples":["live-inbox"]},{"symbol":"App@apps/src/contracts/app.ts","kind":"type","summary":"The host evaluates this factory fresh with the invocation's accounts.","signatures":[],"definition":"export interface App<Slots extends ScopedSlots, Def extends AppDefinition<never>> {\n readonly accounts: Slots;\n /** Declared beside the accounts, so a host lists them without evaluating the app. */\n readonly events?: Readonly<Record<string, import(\"./events.ts\").AppEvent>>;\n /** Declared beside the accounts and checked when the module loads. */\n readonly icons?: import(\"./icons.ts\").AppIcons;\n readonly evaluate: (context: EvaluationContext<Slots>) => Effect.Effect<Def, unknown>;\n}","tags":[],"source":"apps/src/contracts/app.ts","docs":"tools.md","related":["AppDefinition@apps/src/contracts/app.ts","AppEvent","AppIcons","EvaluationContext","ScopedSlots"],"examples":["live-inbox"]},{"symbol":"AppAccountsContext","kind":"type","summary":"The app's own accounts, linked for everyone by its managers. Every invocation has them.","signatures":[],"definition":"export interface AppAccountsContext<Slots extends AccountSlots> {\n readonly app: { readonly accounts: BoundAccounts<Slots> };\n}","tags":[],"source":"apps/src/contracts/app.ts","docs":"tools.md","related":["apps.AccountSlots","BoundAccounts"],"examples":["live-inbox"]},{"symbol":"AppCache","kind":"type","summary":"Cache keys describe every input that affects the value; the host adds app/build isolation.","signatures":[],"definition":"export interface AppCache {\n readonly get: <A>(options: CacheGetOptions<A>) => Promise<A>;\n /** Await a fresh load, coalescing concurrent refreshes and retaining the previous value on failure. */\n readonly revalidate: <A>(options: CacheGetOptions<A>) => Promise<A>;\n readonly read: <A>(key: JsonValue, schema: Schema<A, boolean>) => Promise<A | undefined>;\n readonly readMany: <A>(\n keys: readonly JsonValue[],\n schema: Schema<A, boolean>,\n ) => Promise<readonly (A | undefined)[]>;\n readonly write: (\n entries: readonly { readonly key: JsonValue; readonly value: JsonValue }[],\n retention: Duration.Input,\n ) => Promise<void>;\n readonly invalidate: (key: JsonValue) => Promise<void>;\n /**\n * Scope entries to a bound account and its credential generation. Token renewal keeps the\n * entries; reconnecting or replacing the account's credentials starts an empty scope.\n */\n readonly forAccount: (account: { readonly id: string }) => AppCache;\n}","tags":[],"source":"apps/src/contracts/cache.ts","docs":"tools.md","related":["apps.CacheGetOptions","apps.JsonValue","apps.Schema","Schema"],"examples":["live-inbox"]},{"symbol":"AppCache.forAccount","kind":"method","summary":"Scope entries to a bound account and its credential generation. Token renewal keeps the\nentries; reconnecting or replacing the account's credentials starts an empty scope.","signatures":["(account: { readonly id: string; }): AppCache"],"tags":[],"source":"apps/src/contracts/cache.ts","docs":"tools.md","related":["AppCache","apps.AppCache"],"examples":["live-inbox"]},{"symbol":"AppCache.get","kind":"method","summary":"","signatures":["<A>(options: CacheGetOptions<A>): Promise<A>"],"tags":[],"source":"apps/src/contracts/cache.ts","docs":"tools.md","related":["AppCache","apps.CacheGetOptions"],"examples":["live-inbox"]},{"symbol":"AppCache.invalidate","kind":"method","summary":"","signatures":["(key: JsonValue): Promise<void>"],"tags":[],"source":"apps/src/contracts/cache.ts","docs":"tools.md","related":["AppCache","apps.JsonValue"],"examples":["live-inbox"]},{"symbol":"AppCache.read","kind":"method","summary":"","signatures":["<A>(key: JsonValue, schema: Schema<A, boolean>): Promise<A | undefined>"],"tags":[],"source":"apps/src/contracts/cache.ts","docs":"tools.md","related":["AppCache","apps.JsonValue","apps.Schema","Schema"],"examples":["live-inbox"]},{"symbol":"AppCache.readMany","kind":"method","summary":"","signatures":["<A>(keys: readonly JsonValue[], schema: Schema<A, boolean>): Promise<readonly (A | undefined)[]>"],"tags":[],"source":"apps/src/contracts/cache.ts","docs":"tools.md","related":["AppCache","apps.JsonValue","apps.Schema","Schema"],"examples":["live-inbox"]},{"symbol":"AppCache.revalidate","kind":"method","summary":"Await a fresh load, coalescing concurrent refreshes and retaining the previous value on failure.","signatures":["<A>(options: CacheGetOptions<A>): Promise<A>"],"tags":[],"source":"apps/src/contracts/cache.ts","docs":"tools.md","related":["AppCache","apps.CacheGetOptions"],"examples":["live-inbox"]},{"symbol":"AppCache.write","kind":"method","summary":"","signatures":["(entries: readonly { readonly key: JsonValue; readonly value: JsonValue; }[], retention: Duration.Input): Promise<void>"],"tags":[],"source":"apps/src/contracts/cache.ts","docs":"tools.md","related":["AppCache","apps.JsonValue"],"examples":["live-inbox"]},{"symbol":"AppClient.dispose","kind":"method","summary":"Close this client when its page or embedding owner is removed.","signatures":["(): Promise<void>"],"tags":[],"source":"apps/src/implementation/ui-client.ts","docs":"ui.md","related":[],"examples":["live-inbox"]},{"symbol":"AppClient.mutate","kind":"method","summary":"Execute a write once in this client's queue. Success acknowledges the write; queries reconcile afterward.","signatures":["<Input, Output>(reference: OperationReference<Input, Output, \"mutation\">, input: NoInfer<Input>, output: Schema<NoInfer<Output>, boolean>): Promise<Output>"],"tags":[],"source":"apps/src/implementation/ui-client.ts","docs":"ui.md","related":["apps.Schema","apps/client.OperationReference","Schema"],"examples":["live-inbox"]},{"symbol":"AppClient.mutation","kind":"method","summary":"Create a callable mutation with optional withOptimisticUpdate projections over mounted queries.","signatures":["<Input, Output>(reference: OperationReference<Input, Output, \"mutation\">, output: Schema<NoInfer<Output>, boolean>): AppMutation<Input, Output>"],"tags":[],"source":"apps/src/implementation/ui-client.ts","docs":"ui.md","related":["AppMutation","apps.Schema","apps/client.AppMutation","apps/client.OperationReference","Schema"],"examples":["live-inbox"]},{"symbol":"AppClient.query","kind":"method","summary":"Query this app once, with a runtime-validated response. Does not populate the mounted query cache.","signatures":["<Input, Output>(reference: OperationReference<Input, Output, \"query\">, input: NoInfer<Input>, output: Schema<NoInfer<Output>, boolean>): Promise<NoInfer<Output>>"],"tags":[],"source":"apps/src/implementation/ui-client.ts","docs":"ui.md","related":["apps.Schema","apps/client.OperationReference","Schema"],"examples":["live-inbox"]},{"symbol":"AppClient.queryAtom","kind":"method","summary":"Share a live query across mounts and reconcile optimistic changes against fresh server reads.","signatures":["<Input, Output>(reference: OperationReference<Input, Output, \"query\">, input: NoInfer<Input>, output: Schema<NoInfer<Output>, boolean>): Atom.Atom<AsyncResult.AsyncResult<Output, unknown>>"],"tags":[],"source":"apps/src/implementation/ui-client.ts","docs":"ui.md","related":["apps.Schema","apps/client.OperationReference","Schema"],"examples":["live-inbox"]},{"symbol":"AppContext","kind":"type","summary":"Current credentials for one invocation. Never retained in source or build output. A context of\nthe `\"app\"` scope has no `user`: it serves work without a caller, such as an app schedule.","signatures":[],"definition":"export type BoundContext<\n Slots extends ScopedSlots,\n Scope extends AccountScope = \"user\",\n> = InvocationServices &\n AppAccountsContext<Slots[\"app\"]> &\n ([Scope] extends [\"user\"] ? UserAccountsContext<Slots[\"user\"]> : unknown);","tags":[],"source":"apps/src/contracts/app.ts","docs":"tools.md","related":["AppAccountsContext","apps.AccountScope","InvocationServices","ScopedSlots","UserAccountsContext"],"examples":["live-inbox"]},{"symbol":"AppContext.elicit","kind":"method","summary":"Ask for user input during this tool call. Unavailable during discovery and after the invocation closes.","signatures":["(request: FormElicitation): Promise<ElicitationResponse>"],"tags":[],"source":"apps/src/contracts/app.ts","docs":"tools.md","related":["AppContext","apps.ElicitationResponse","apps.FormElicitation"],"examples":["live-inbox"]},{"symbol":"AppContext.fetch","kind":"method","summary":"Invocation-owned HTTP requests with trace propagation and host cancellation. It lasts until the\ninvocation and every app cache refresh it started in the background have ended, so a catalog\nloader given this fetch can refresh after the reply.","signatures":["(input: string | URL | Request, init?: RequestInit): Promise<Response>"],"tags":[],"source":"apps/src/contracts/app.ts","docs":"tools.md","related":["AppContext"],"examples":["live-inbox"]},{"symbol":"AppDefinition@apps/src/contracts/app.ts","kind":"type","summary":"App capabilities share one account context. Package metadata belongs in package.json.","signatures":[],"definition":"export interface AppDefinition<Context> {\n /** The app's root router. Its keys form tool paths such as `issues.list`. */\n readonly tools?: import(\"./router.ts\").AppRouter | import(\"./router.ts\").DynamicRouter;\n /** Omission reads packaged skills/. An explicit catalog replaces that default, including []. */\n readonly skills?: readonly AppSkillSource[];\n /** Optional lazy skills, added to the static catalog. Only skill reads call them. */\n readonly dynamicSkills?: import(\"./dynamic-skills.ts\").DynamicSkills;\n readonly workflows?: Readonly<Record<string, AppWorkflow>>;\n readonly schedules?: Readonly<\n Record<string, Omit<OperationSchedule, \"name\"> & { readonly tool: string }>\n >;\n readonly webhooks?: Readonly<\n Record<\n string,\n {\n readonly account: WebhookAccount;\n readonly config: Schema.Decoder<unknown>;\n readonly state: Schema.Decoder<unknown>;\n readonly setup?: import(\"./webhook-protocol.ts\").ManualWebhookSetup;\n readonly register?: Handler<Context>;\n readonly handle: Handler<Context>;\n readonly unregister?: Handler<Context>;\n }\n >\n >;\n}","tags":[],"source":"apps/src/contracts/app.ts","docs":"tools.md","related":["AppRouter","apps.Skill","apps.WebhookAccount","apps/skills.Skill","AppWorkflow","DynamicRouter","DynamicSkills","Handler","ManualWebhookSetup","OperationSchedule"],"examples":["live-inbox"]},{"symbol":"AppEvent","kind":"type","summary":"Native event declaration. Filters are named scalar fields; the payload is any JSON schema.","signatures":[],"definition":"export interface AppEvent {\n readonly description: string;\n readonly filters: Readonly<Record<string, Schema.Decoder<unknown>>>;\n readonly payload: Schema.Decoder<unknown>;\n}","tags":[],"source":"apps/src/contracts/events.ts","docs":"tools.md","related":[],"examples":["live-inbox"]},{"symbol":"AppFactoryContext","kind":"type","summary":"What a dynamic definition's factory receives. App-scope work, such as an app schedule, evaluates\nthe app without a caller, so `user` is absent then.","signatures":[],"definition":"export type AppFactoryContext<Requirements extends AppRequirements> = EvaluationContext<\n RequirementSlots<Requirements>\n>;","tags":[],"source":"apps/src/implementation/app.ts","docs":"tools.md","related":["apps.AppRequirements","EvaluationContext","RequirementSlots"],"examples":["live-inbox"]},{"symbol":"AppIcons","kind":"type","summary":"An app's icons, bounded in number and total size.","signatures":[],"definition":"AppIcons = Schema.Array(AppIcon).check(\n Schema.isMaxLength(appIconLimits.icons),\n Schema.makeFilter((icons) => JSON.stringify(icons).length <= appIconLimits.characters, {\n message: `An app's icons total at most ${appIconLimits.characters} characters`,\n }),\n)","tags":[],"source":"apps/src/contracts/icons.ts","docs":"tools.md","related":["apps.AppIcon"],"examples":["live-inbox"]},{"symbol":"appIconSource","kind":"value","summary":"Base64 image data of a type browsers render safely in an image element, or an HTTPS URL.","signatures":[],"definition":"const appIconSource: RegExp","tags":[],"source":"apps/src/contracts/icons.ts","docs":"tools.md","related":[],"examples":["live-inbox"]},{"symbol":"AppMutation","kind":"type","summary":"A callable mutation. Success means the write was acknowledged; its overlay stays until fresh reads finish.","signatures":[],"definition":"export interface AppMutation<Input, Output> {\n (input: Input): Promise<Output>;\n /** Return a new mutation handle with this projection. Failures remove only this invocation's changes. */\n withOptimisticUpdate(update: OptimisticUpdate<Input>): AppMutation<Input, Output>;\n}","tags":[],"source":"apps/src/contracts/optimistic.ts","docs":"ui.md","related":["apps/client.OptimisticUpdate"],"examples":["live-inbox"]},{"symbol":"AppMutation.withOptimisticUpdate","kind":"method","summary":"Return a new mutation handle with this projection. Failures remove only this invocation's changes.","signatures":["(update: OptimisticUpdate<Input>): AppMutation<Input, Output>"],"tags":[],"source":"apps/src/contracts/optimistic.ts","docs":"ui.md","related":["AppMutation","apps/client.AppMutation","apps/client.OptimisticUpdate"],"examples":["live-inbox"]},{"symbol":"AppNode","kind":"type","summary":"Anything a router can contain.","signatures":[],"definition":"export type AppNode = AppOperation | AppRouter | DynamicRouter;","tags":[],"source":"apps/src/contracts/router.ts","docs":"tools.md","related":["AppOperation","AppRouter","DynamicRouter"],"examples":["live-inbox"]},{"symbol":"AppOperation","kind":"type","summary":"The host validates input, checks approval, then owns the transaction and output validation.","signatures":[],"definition":"export interface AppOperation<Input = unknown, Output = unknown> {\n readonly kind: \"query\" | \"mutation\";\n readonly description?: string;\n readonly title?: string;\n readonly annotations?: ToolAnnotations;\n readonly _meta?: JsonObject;\n readonly input: Schema.Decoder<Input>;\n /** Checks every value `run` returns and is the output schema the operation is described with. */\n readonly output?: Schema.Decoder<Output>;\n /**\n * An upstream protocol's description of the value `run` returns, used only when `output` is\n * absent. The host does not check it, so declare `output` when the result can be checked.\n */\n readonly outputSchema?: JsonObject;\n readonly approval?: Approval<Input>;\n readonly run: (context: OperationContext, input: Input) => Effect.Effect<Output, unknown>;\n}","tags":[],"source":"apps/src/contracts/operations.ts","docs":"tools.md","related":["Approval@apps/src/contracts/approval.ts","apps.JsonObject","apps.OperationContext","ToolAnnotations"],"examples":["live-inbox"]},{"symbol":"AppRouter","kind":"type","summary":"A statically declared router. Children are operations or further routers.","signatures":[],"definition":"export interface AppRouter {\n readonly kind: \"router\";\n readonly meta?: RouterMeta;\n readonly children: Readonly<Record<string, AppNode>>;\n}","tags":[],"source":"apps/src/contracts/router.ts","docs":"tools.md","related":["AppNode","RouterMeta"],"examples":["live-inbox"]},{"symbol":"Approval@apps/src/contracts/approval.ts","kind":"type","summary":"Native policy for this tool only. Failures prevent execution and remain private.","signatures":[],"definition":"export type Approval<Input = unknown> = (\n context: ApprovalContext<Input>,\n) => Effect.Effect<ApprovalDecision, unknown>;","tags":[],"source":"apps/src/contracts/approval.ts","docs":"tools.md","related":["apps.ApprovalContext","apps.ApprovalDecision","apps/operations/approval.ApprovalContext","apps/operations/approval.ApprovalDecision"],"examples":["live-inbox"]},{"symbol":"apps.AccountCheckContext","kind":"type","summary":"The account a provider's check verifies, with invocation-owned HTTP and cancellation.","signatures":[],"definition":"export interface AccountCheckContext<Auth extends AuthMethods> {\n readonly account: AccountOfMethods<Auth>;\n readonly fetch: (input: string | URL | Request, init?: RequestInit) => Promise<Response>;\n readonly signal: AbortSignal;\n /**\n * When the host stops waiting for the check, in milliseconds since the epoch. A check still\n * running then fails without its own message, so a check that gives up must do so before it.\n * Executor always sets it; a host that does not limit the check leaves it out.\n */\n readonly deadline?: number;\n}","tags":[],"source":"apps/src/contracts/provider.ts","docs":"tools.md","related":["AccountOfMethods","apps.AuthMethods"],"examples":["live-inbox"]},{"symbol":"apps.AccountCheckResult","kind":"type","summary":"A passing account check. Failures are thrown, so there is no failing variant.","signatures":[],"definition":"AccountCheckResult = Schema.Struct({ accountInfo: Schema.optionalKey(AccountInfo) })","tags":[],"source":"apps/src/contracts/provider.ts","docs":"tools.md","related":["apps.AccountInfo"],"examples":["live-inbox"]},{"symbol":"apps.AccountInfo","kind":"type","summary":"Upstream identity that a passing account check may report for display. Only these fields are\nretained; the host never stores raw provider responses.","signatures":[],"definition":"AccountInfo = Schema.Struct({\n externalId: Schema.optionalKey(displayText),\n displayName: Schema.optionalKey(displayText),\n username: Schema.optionalKey(displayText),\n email: Schema.optionalKey(displayText),\n avatarUrl: Schema.optionalKey(HttpUrl),\n profileUrl: Schema.optionalKey(HttpUrl),\n})","tags":[],"source":"apps/src/contracts/provider.ts","docs":"tools.md","related":[],"examples":["live-inbox"]},{"symbol":"apps.AccountOf","kind":"type","summary":"One selected account, discriminated by its author-chosen method name.","signatures":[],"definition":"export type AccountOf<P> = P extends Provider<infer Auth> ? AccountOfMethods<Auth> : never;","tags":[],"source":"apps/src/contracts/provider.ts","docs":"tools.md","related":["AccountOfMethods","apps.Provider","Provider"],"examples":["live-inbox"]},{"symbol":"apps.AccountRequest","kind":"type","summary":"Render an account's credential placements. Each renders the method's `request` with the fields\napp code holds, so a request built with them is one the outbound network accepts.","signatures":[],"definition":"export interface AccountRequest {\n /**\n * The headers the method's `request` places credentials in, by lowercase name. Spread them into\n * a request's headers. Throws when the method declares no `request`.\n */\n headers(): Record<string, string>;\n /**\n * `input` with the query parameters the method's `request` places credentials in, replacing any\n * of the same name. Throws when the method declares no `request`.\n */\n url(input: string | URL): string;\n}","tags":[],"source":"apps/src/contracts/provider.ts","docs":"tools.md","related":[],"examples":["live-inbox"]},{"symbol":"apps.accountRouter","kind":"function","summary":"Discover each selected account's router and combine matching names.\nCalls take { accountId, input }; each branch retains its account's input schema,\ncredentials, approval and output validation. Empty selections expose no operations.\nDiscovery is sequential and cancellation follows the caller's signal. `discover` may return the\nrouter or a Promise of it, and the combined router keeps its operations' handler contexts.","signatures":["<Account extends { readonly id: string; }, Query = unknown, Mutation = unknown>(accounts: readonly Account[], discover: (account: Account) => RouterDeclaration<Query, Mutation> | Promise<RouterDeclaration<Query, Mutation>>, options: { readonly signal: AbortSignal; }): Promise<RouterDeclaration<Query, Mutation>>"],"tags":[],"source":"apps/src/implementation/account-router.ts","docs":"tools.md","related":["apps.RouterDeclaration"],"examples":["live-inbox"]},{"symbol":"apps.AccountScope","kind":"type","summary":"Whose accounts a requirement or context names. App accounts are linked for everyone by the app's\nmanagers and fill the requirement for every caller and for the app's background work; user\naccounts are the caller's own links. App-scope work, such as an app schedule, has no caller.","signatures":[],"definition":"export type AccountScope = \"app\" | \"user\";","tags":[],"source":"apps/src/contracts/app.ts","docs":"tools.md","related":[],"examples":["live-inbox"]},{"symbol":"apps.AccountSlots","kind":"type","summary":"Named requirements for one account or a collection from a provider.","signatures":[],"definition":"export type AccountSlots = Readonly<\n Record<string, Provider<AuthMethods> | ManyAccounts<AuthMethods>>\n>;","tags":[],"source":"apps/src/contracts/app.ts","docs":"tools.md","related":["apps.AuthMethods","apps.ManyAccounts","apps.Provider","Provider"],"examples":["live-inbox"]},{"symbol":"apps.AnyScopeMutationContext","kind":"type","summary":"The context of a mutation whose handler declares no parameters. It uses no context, so it may run\nas the app, such as from an app schedule, where `user` is absent.","signatures":[],"definition":"export type AnyScopeMutationContext<Requirements extends AppRequirements = AppRequirements> =\n MutationContext<Requirements, \"app\"> & Partial<Pick<MutationContext<Requirements>, \"user\">>;","tags":[],"source":"apps/src/contracts/context.ts","docs":"tools.md","related":["apps.AppRequirements","apps.MutationContext"],"examples":["live-inbox"]},{"symbol":"apps.App","kind":"type","summary":"Public app handle; the native app is retained for host use without an async round trip.","signatures":[],"definition":"export interface App<\n Requirements extends AppRequirements,\n Def extends AppDefinition<Requirements>,\n> {\n readonly [InternalApp]: NativeApp<RequirementSlots<Requirements>, EffectDefinition<Def>>;\n readonly accounts: RequirementSlots<Requirements>;\n readonly evaluate: (context: AppFactoryContext<Requirements>) => Promise<Def>;\n}","tags":[],"source":"apps/src/implementation/app.ts","docs":"tools.md","related":["App@apps/src/contracts/app.ts","AppFactoryContext","apps.AppDefinition","apps.AppRequirements","EffectDefinition","RequirementSlots"],"examples":["live-inbox"]},{"symbol":"apps.AppCache","kind":"type","summary":"Cache keys describe every input that affects the value; the host adds app/build isolation.","signatures":[],"definition":"export interface AppCache {\n readonly get: <A>(options: CacheGetOptions<A>) => Promise<A>;\n /** Await a fresh load, coalescing concurrent refreshes and retaining the previous value on failure. */\n readonly revalidate: <A>(options: CacheGetOptions<A>) => Promise<A>;\n readonly read: <A>(key: JsonValue, schema: Schema<A, boolean>) => Promise<A | undefined>;\n readonly readMany: <A>(\n keys: readonly JsonValue[],\n schema: Schema<A, boolean>,\n ) => Promise<readonly (A | undefined)[]>;\n readonly write: (\n entries: readonly { readonly key: JsonValue; readonly value: JsonValue }[],\n retention: Duration.Input,\n ) => Promise<void>;\n readonly invalidate: (key: JsonValue) => Promise<void>;\n /**\n * Scope entries to a bound account and its credential generation. Token renewal keeps the\n * entries; reconnecting or replacing the account's credentials starts an empty scope.\n */\n readonly forAccount: (account: { readonly id: string }) => AppCache;\n}","tags":[],"source":"apps/src/contracts/cache.ts","docs":"tools.md","related":["apps.CacheGetOptions","apps.JsonValue","apps.Schema","Schema"],"examples":["live-inbox"]},{"symbol":"apps.AppContext","kind":"type","summary":"Context available during dynamic app evaluation; storage opens only for handlers. `ctx.app.accounts`\nholds the app's accounts and `ctx.user.accounts` the caller's. With the `\"app\"` scope there is no\n`user`: app schedules and app-account webhooks run without a caller.","signatures":[],"definition":"export type AppContext<\n Requirements extends AppRequirements = AppRequirements,\n Scope extends AccountScope = \"user\",\n> = BoundContext<RequirementSlots<Requirements>, Scope>;","tags":[],"source":"apps/src/contracts/context.ts","docs":"tools.md","related":["AppContext","apps.AccountScope","apps.AppRequirements","RequirementSlots"],"examples":["live-inbox"]},{"symbol":"apps.appCron","kind":"function","summary":"Calendar alternative to `appInterval`. UTC is the explicit default when timezone is omitted.","signatures":["<Input, Output, Context>(calendar: { readonly expression: string; readonly timezone?: string; }, operation: Operation<Input, Output, \"mutation\", Context> & WithoutApproval & RunsAsApp<Context>, input: NoInfer<Input>): ScheduleDeclaration<Context, \"app\">"],"tags":[],"source":"apps/src/implementation/schedules.ts","docs":"tools.md","related":["apps.Operation","apps.ScheduleDeclaration","RunsAsApp","WithoutApproval"],"examples":["live-inbox"]},{"symbol":"apps.AppDefinition","kind":"type","summary":"Author definition projected from native capabilities. Excluding callable objects keeps\nfactories from being inferred as definitions and preserves contextual handler inference.","signatures":[],"definition":"export type AppDefinition<Requirements extends AppRequirements> = {\n readonly [Key in keyof NativeDefinition<WebhookContext<Requirements>>]: Key extends \"workflows\"\n ? AuthorWorkflows<Requirements>\n : Key extends \"schedules\"\n ? AuthorSchedules<Requirements>\n : Key extends \"tools\"\n ? RouterDeclaration<QueryContext<Requirements>, MutationContext<Requirements>>\n : Key extends \"webhooks\"\n ? AuthorWebhooks<Requirements>\n : NativeDefinition<WebhookContext<Requirements>>[Key];\n} & {\n readonly name?: never;\n readonly queries?: never;\n readonly mutations?: never;\n readonly call?: never;\n};","tags":[],"source":"apps/src/implementation/app.ts","docs":"tools.md","related":["AppDefinition@apps/src/contracts/app.ts","apps.AppRequirements","apps.MutationContext","apps.QueryContext","apps.RouterDeclaration","apps.WebhookContext","AuthorSchedules","AuthorWebhooks","AuthorWorkflows"],"examples":["live-inbox"]},{"symbol":"apps.AppIcon","kind":"type","summary":"One image an app shows for itself, the same shape as a router's icon. `theme` names the color\nscheme it is drawn for; an icon without one suits both.","signatures":[],"definition":"AppIcon = Schema.Struct({\n ...RouterIcon.fields,\n src: Schema.String.check(\n Schema.isPattern(appIconSource),\n Schema.isMaxLength(appIconLimits.characters),\n ),\n})","tags":[],"source":"apps/src/contracts/icons.ts","docs":"tools.md","related":[],"examples":["live-inbox"]},{"symbol":"apps.appInterval","kind":"function","summary":"Run an existing mutation at a fixed interval as the app: one schedule an app manager enables, run\nwithout a caller with the app's accounts. The mutation takes a context of the `\"app\"` scope and\ndeclares no approval.","signatures":["<Input, Output, Context>(duration: Interval, operation: Operation<Input, Output, \"mutation\", Context> & WithoutApproval & RunsAsApp<Context>, input: NoInfer<Input>): ScheduleDeclaration<Context, \"app\">"],"tags":[],"source":"apps/src/implementation/schedules.ts","docs":"tools.md","related":["apps.Operation","apps.ScheduleDeclaration","Interval","RunsAsApp","WithoutApproval"],"examples":["live-inbox"]},{"symbol":"apps.AppRequirements","kind":"type","summary":"Requirements are pure values; bound accounts and SQL access belong to invocations. `app` names the\naccounts the app's managers link for every caller and for background work, `user` the accounts\neach caller links. A requirement name is used once across both.","signatures":[],"definition":"export interface AppRequirements {\n readonly app?: { readonly accounts: AccountSlots };\n readonly user?: { readonly accounts: AccountSlots };\n /** Removed: declare `user: { accounts }` for the caller's accounts or `app: { accounts }`. */\n readonly accounts?: never;\n /** Events this app emits, by name, such as `issue.opened`. */\n readonly events?: Readonly<Record<string, AnyEventDeclaration>>;\n /**\n * Images a dashboard shows for the app, such as its logo in light and dark variants. Each `src`\n * is base64 `data:image/...` or an `https:` URL; at most 8 icons and 32 KiB in total.\n */\n readonly icons?: ReadonlyArray<AppIcon>;\n}","tags":[],"source":"apps/src/contracts/context.ts","docs":"tools.md","related":["AnyEventDeclaration","apps.AccountSlots","apps.AppIcon"],"examples":["live-inbox"]},{"symbol":"apps.Approval","kind":"type","summary":"Synchronous or async policy, projected from the framework's native contract.","signatures":[],"definition":"export type Approval<Input = unknown> = (\n ...args: Parameters<NativeApproval<Input>>\n) =>\n | Effect.Success<ReturnType<NativeApproval<Input>>>\n | Promise<Effect.Success<ReturnType<NativeApproval<Input>>>>;","tags":[],"source":"apps/src/approval.ts","docs":"tools.md","related":["Approval@apps/src/contracts/approval.ts"],"examples":["live-inbox"]},{"symbol":"apps.ApprovalContext","kind":"type","summary":"Context for one tool's policy. toolInput is the same decoded value passed to run.","signatures":[],"definition":"export interface ApprovalContext<Input = unknown> {\n readonly toolName: string;\n readonly toolInput: Input;\n readonly signal: AbortSignal;\n}","tags":[],"source":"apps/src/contracts/approval.ts","docs":"tools.md","related":[],"examples":["live-inbox"]},{"symbol":"apps.ApprovalDecision","kind":"type","summary":"Approve this call, deny it, or stop for a human decision.\nParsed result of one tool approval policy.","signatures":[],"definition":"ApprovalDecision = Schema.Literals([\"approved\", \"denied\", \"user-approval\"])","tags":[],"source":"apps/src/contracts/approval.ts","docs":"tools.md","related":[],"examples":["live-inbox"]},{"symbol":"apps.Approved","kind":"type","summary":"Marks an operation declared with an approval. App-scope work, such as an app schedule, has no\nperson to approve a call, so it accepts only operations without this mark.","signatures":[],"definition":"export interface Approved {\n readonly [ApprovalDeclared]: true;\n}","tags":[],"source":"apps/src/implementation/operations.ts","docs":"tools.md","related":[],"examples":["live-inbox"]},{"symbol":"apps.array","kind":"function","summary":"An array whose elements use the given schema.","signatures":["<T>(item: Schema<T, boolean>): Schema<readonly T[]>"],"tags":[],"source":"apps/src/implementation/schema.ts","docs":"tools.md","related":["apps.Schema","Schema"],"examples":["live-inbox"]},{"symbol":"apps.AuthMethod","kind":"type","summary":"Supported declarations; these acquire credentials rather than normalize them.","signatures":[],"definition":"export type AuthMethod =\n | SecretsMethod<Schema.Decoder<unknown>>\n | OAuth2Method<Schema.Decoder<unknown>>;","tags":[],"source":"apps/src/contracts/provider.ts","docs":"tools.md","related":["OAuth2Method@apps/src/contracts/provider.ts","SecretsMethod@apps/src/contracts/provider.ts"],"examples":["live-inbox"]},{"symbol":"apps.AuthMethodData","kind":"type","summary":"Infer the data for one method from its native Effect decoder.","signatures":[],"definition":"export type AuthMethodData<Method> =\n Method extends SecretsMethod<infer Fields>\n ? Fields[\"Type\"]\n : Method extends OAuth2Method<infer Response>\n ? Response[\"Type\"]\n : never;","tags":[],"source":"apps/src/contracts/provider.ts","docs":"tools.md","related":["OAuth2Method@apps/src/contracts/provider.ts","SecretsMethod@apps/src/contracts/provider.ts"],"examples":["live-inbox"]},{"symbol":"apps.AuthMethods","kind":"type","summary":"Auth method names are chosen by the provider author.","signatures":[],"definition":"export type AuthMethods = Readonly<Record<string, AuthMethod>>;","tags":[],"source":"apps/src/contracts/provider.ts","docs":"tools.md","related":["apps.AuthMethod"],"examples":["live-inbox"]},{"symbol":"apps.base64","kind":"function","summary":"Base64 of a value's UTF-8 bytes, such as the `user:password` of Basic credentials.","signatures":["(value: PlacementInput): PlacementValue"],"tags":[],"source":"apps/src/implementation/placement.ts","docs":"tools.md","related":["apps.PlacementInput","apps.PlacementValue"],"examples":["live-inbox"]},{"symbol":"apps.basic","kind":"function","summary":"`Authorization: Basic base64(<user>:<password>)`.","signatures":["(user: PlacementInput, password: PlacementInput): Placement"],"tags":[],"source":"apps/src/implementation/placement.ts","docs":"tools.md","related":["apps.Placement","apps.PlacementInput"],"examples":["live-inbox"]},{"symbol":"apps.bearer","kind":"function","summary":"`Authorization: Bearer <token>`.","signatures":["(token: FieldRef): Placement"],"tags":[],"source":"apps/src/implementation/placement.ts","docs":"tools.md","related":["apps.FieldRef","apps.Placement"],"examples":["live-inbox"]},{"symbol":"apps.boolean","kind":"function","summary":"A boolean. No coercion.","signatures":["(): Schema<boolean>"],"tags":[],"source":"apps/src/implementation/schema.ts","docs":"tools.md","related":["apps.Schema","Schema"],"examples":["live-inbox"]},{"symbol":"apps.CacheError","kind":"class","summary":"Expected cache failures never include keys, values or upstream exception text.","signatures":[],"definition":"export class CacheError extends Schema.TaggedError<CacheError>()(\"CacheError\", {\n reason: Schema.Literals([\"unavailable\", \"storage\", \"invalid\", \"capacity\", \"timeout\"]),\n /** Which of `cacheLimits` the request exceeded, when one did. */\n limit: Schema.optionalKey(\n Schema.Literals([\n \"keyBytes\",\n \"entryBytes\",\n \"batchBytes\",\n \"batchEntries\",\n \"totalBytes\",\n \"totalEntries\",\n ]),\n ),\n}) {}","tags":[],"source":"app-cache/src/contracts/cache.ts","docs":"tools.md","related":[],"examples":["live-inbox"]},{"symbol":"apps.CacheGetOptions","kind":"type","summary":"Load options shared by normal reads and explicit refreshes.","signatures":[],"definition":"export interface CacheGetOptions<A> {\n readonly key: JsonValue;\n readonly schema: Schema<A, boolean>;\n readonly freshFor: Duration.Input;\n readonly staleFor?: Duration.Input;\n /**\n * Past `freshFor`, `serve` (the default) returns the kept value while `load` replaces it in the\n * background. `revalidate` awaits `load` first; the kept value stays readable with `read`, so\n * the loader can confirm it with the source instead of rebuilding it.\n */\n readonly stale?: \"serve\" | \"revalidate\";\n readonly load: (context: CacheLoadContext) => Promise<A>;\n}","tags":[],"source":"apps/src/contracts/cache.ts","docs":"tools.md","related":["apps.CacheLoadContext","apps.JsonValue","apps.Schema","Schema"],"examples":["live-inbox"]},{"symbol":"apps.CacheLoadContext","kind":"type","summary":"A cache loader owns its own cancellation and HTTP capability, including during SWR.","signatures":[],"definition":"export interface CacheLoadContext {\n readonly cache: AppCache;\n readonly signal: AbortSignal;\n readonly fetch: typeof globalThis.fetch;\n}","tags":[],"source":"apps/src/contracts/cache.ts","docs":"tools.md","related":["AppCache","apps.AppCache"],"examples":["live-inbox"]},{"symbol":"apps.DeclarationInvalid","kind":"class","summary":"An author's declaration, such as the options of `oauth2()`, did not match its schema. Unlike\n{@link ValidationError} it names each failing path and problem, because the value is the\nauthor's own source. Messages never include supplied values.","signatures":[],"definition":"export class DeclarationInvalid extends Schema.TaggedError<DeclarationInvalid>()(\n \"DeclarationInvalid\",\n { declaration: Schema.String, issues: Schema.Array(DeclarationIssue) },\n) {\n override get message();\n}","tags":[],"source":"apps/src/contracts/schema.ts","docs":"tools.md","related":["apps.DeclarationIssue"],"examples":["live-inbox"]},{"symbol":"apps.DeclarationIssue","kind":"type","summary":"One problem with a declaration: where in it, and what is wrong there.","signatures":[],"definition":"DeclarationIssue = Schema.Struct({\n path: Schema.Array(Schema.String),\n message: Schema.String,\n})","tags":[],"source":"apps/src/contracts/schema.ts","docs":"tools.md","related":[],"examples":["live-inbox"]},{"symbol":"apps.decodeJson","kind":"function","summary":"Decode a fetch response with safe status/body errors. Unexpected reader failures propagate unchanged.","signatures":["<T>(response: JsonResponse, schema: Schema<T, boolean>): Promise<T>"],"tags":[],"source":"apps/src/index.ts","docs":"tools.md","related":["apps.JsonResponse","apps.Schema","Schema"],"examples":["live-inbox"]},{"symbol":"apps.defineApp","kind":"function","summary":"Assemble app behavior. Package names belong in package.json; hosts name installed copies.","signatures":["<const Requirements extends AppRequirements, Def extends AppDefinition<Requirements>>(requirements: Requirements, definition: (Def & AppDefinition<Requirements>) | ((context: AppFactoryContext<Requirements>) => Promise<Def & AppDefinition<Requirements>>)): App<Requirements, Def>"],"tags":[],"source":"apps/src/implementation/app.ts","docs":"tools.md","related":["AppFactoryContext","apps.App","apps.AppDefinition","apps.AppRequirements"],"examples":["live-inbox"]},{"symbol":"apps.defineProvider","kind":"function","summary":"Retain the provider and literal method names without registering or authenticating it. A\nmethod's `request` restricts where its credentials go only among the provider's `hosts`, so a\nprovider that declares a `request` declares `hosts` too.","signatures":["<const Auth extends AuthMethods>({ health, ...options }: ProviderOptions<Auth>): Provider<Auth>"],"tags":[],"source":"apps/src/implementation/provider.ts","docs":"tools.md","related":["apps.AuthMethods","apps.Provider","apps.ProviderOptions","Provider"],"examples":["live-inbox"]},{"symbol":"apps.dynamicRouter","kind":"function","summary":"Declare a router whose tools are discovered when read. `list` returns tools with names relative\nto this router; mark queries with `readOnly: true`. `resolve` receives one of those names.\nThe router carries the handler contexts of the operations `resolve` returns, so `defineApp`\nchecks them like a static router's.","signatures":["<Query = unknown, Mutation = unknown>(source: { readonly meta?: () => RouterOptions | Promise<RouterOptions>; readonly list: () => readonly HostedTool[] | Promise<readonly HostedTool[]>; readonly resolve: (name: string) => OperationChild<Query, Mutation> | undefined | Promise<OperationChild<Query, Mutation> | undefined>; }): RouterDeclaration<Query, Mutation>"],"tags":[],"source":"apps/src/implementation/router.ts","docs":"tools.md","related":["apps.OperationChild","apps.OperationDescription","apps.RouterDeclaration","apps.RouterOptions"],"examples":["live-inbox"]},{"symbol":"apps.dynamicSkills","kind":"function","summary":"Declare skills that load only when skills are read, such as `list: () => githubSkills({...})`.","signatures":["(source: { readonly list: () => readonly AppSkillSource[] | Promise<readonly AppSkillSource[]>; }): DynamicSkills"],"tags":[],"source":"apps/src/implementation/dynamic-skills.ts","docs":"tools.md","related":["apps.Skill","apps/skills.Skill","DynamicSkills"],"examples":["live-inbox"]},{"symbol":"apps.Elicit","kind":"type","summary":"App authors await standard MCP form responses without depending on Effect or a particular host.","signatures":[],"definition":"export type Elicit = (request: FormElicitation) => Promise<ElicitationResponse>;","tags":[],"source":"apps/src/contracts/elicitation.ts","docs":"tools.md","related":["apps.ElicitationResponse","apps.FormElicitation"],"examples":["live-inbox"]},{"symbol":"apps.ElicitationFailed","kind":"class","summary":"A tool interaction could not be delivered or its request/response was invalid. No private payload is retained.","signatures":[],"definition":"export class ElicitationFailed extends Schema.TaggedError<ElicitationFailed>()(\n \"ElicitationFailed\",\n {\n reason: Schema.Literals([\n \"unavailable\",\n \"transaction\",\n \"invalid-request\",\n \"invalid-response\",\n \"transport\",\n \"expired\",\n \"forbidden\",\n ]),\n },\n) {}","tags":[],"source":"apps/src/contracts/elicitation.ts","docs":"tools.md","related":[],"examples":["live-inbox"]},{"symbol":"apps.ElicitationResponse","kind":"type","summary":"MCP accept/decline/cancel response, without imposing a client or transport on app code.","signatures":[],"definition":"ElicitationResponse = Schema.Union([\n Schema.Struct({ ...McpSchema.ElicitAcceptResult.fields, _meta: Schema.optional(JsonObject) }),\n Schema.Struct({ ...McpSchema.ElicitDeclineResult.fields, _meta: Schema.optional(JsonObject) }),\n])","tags":[],"source":"apps/src/contracts/elicitation.ts","docs":"tools.md","related":["apps.JsonObject"],"examples":["live-inbox"]},{"symbol":"apps.EmitOptions","kind":"type","summary":"Options for one emitted occurrence.","signatures":[],"definition":"export interface EmitOptions<Filters> {\n /** Values subscribers filter on. Required when the event declares filters. */\n readonly filters?: Filters;\n /**\n * A stable identifier, such as the provider's delivery or record ID, so a repeated delivery of\n * the same upstream event is not delivered twice. Defaults to a random ID.\n */\n readonly id?: string | undefined;\n /** When the event happened. Defaults to now. */\n readonly occurredAt?: Date | number | undefined;\n /**\n * The ID of the account the event came from. A webhook handler defaults to its source account,\n * and an invocation with exactly one of the caller's accounts to that account; the app's own\n * accounts never count. Name it when there are several.\n */\n readonly account?: string | undefined;\n}","tags":[],"source":"apps/src/contracts/events.ts","docs":"tools.md","related":[],"examples":["live-inbox"]},{"symbol":"apps.event","kind":"function","summary":"Declare an event. `filters` are scalar fields subscribers can narrow on, such as a repository;\nevery emitted occurrence supplies their values. `payload` describes each occurrence's data.","signatures":["<const F extends Fields = {}, P extends Schema<unknown, boolean> = Schema<unknown, false>>(options: { readonly description: string; readonly filters?: F; readonly payload: P; }): EventDeclaration<F, P>"],"tags":[],"source":"apps/src/implementation/events.ts","docs":"tools.md","related":["apps.EventDeclaration","apps.Fields","apps.Schema","Schema"],"examples":["live-inbox"]},{"symbol":"apps.EventDeclaration","kind":"type","summary":"An event an app emits. Declare it in `defineApp`'s requirements under `events`.","signatures":[],"definition":"export interface EventDeclaration<F extends Fields, P extends Schema<unknown, boolean>> {\n readonly [Native]: AppEvent;\n readonly description: string;\n readonly filters: F;\n readonly payload: P;\n}","tags":[],"source":"apps/src/implementation/events.ts","docs":"tools.md","related":["AppEvent","apps.Fields","apps.Schema","Schema"],"examples":["live-inbox"]},{"symbol":"apps.EventEmitter","kind":"type","summary":"`ctx.events` in mutations and webhook handlers.","signatures":[],"definition":"export interface EventEmitter<Events extends Readonly<Record<string, AnyEventDeclaration>>> {\n /**\n * Record an occurrence. It is delivered only if this invocation succeeds. Invalid data, filters\n * or options throw here, before anything is recorded.\n */\n readonly emit: <Name extends keyof Events & string>(\n name: Name,\n data: Infer<Events[Name][\"payload\"]>,\n ...options: OptionsFor<Events[Name][\"filters\"]>\n ) => void;\n}","tags":[],"source":"apps/src/implementation/events.ts","docs":"tools.md","related":["AnyEventDeclaration","apps.Infer","OptionsFor"],"examples":["live-inbox"]},{"symbol":"apps.FetchOptionUnsupported","kind":"class","summary":"`ctx.fetch` was given a standard RequestInit value the app runtime does not implement.","signatures":[],"definition":"export class FetchOptionUnsupported extends Schema.TaggedError<FetchOptionUnsupported>()(\n \"FetchOptionUnsupported\",\n {\n option: RestrictedFetchOption,\n value: Schema.String,\n supported: Schema.Array(Schema.String),\n },\n) {\n override get message();\n\n /** What to do instead, when the standard value has an equivalent the runtime supports. */\n private get advice();\n}","tags":[],"source":"apps/src/contracts/network.ts","docs":"tools.md","related":["RestrictedFetchOption"],"examples":["live-inbox"]},{"symbol":"apps.FieldRef","kind":"class","summary":"A reference to one of the method's account fields, given to its `request` callback.","signatures":[],"definition":"export class FieldRef<Name extends string = string> extends NotAString {\n readonly field: Name;\n constructor(field: Name);\n}","tags":[],"source":"apps/src/implementation/placement.ts","docs":"tools.md","related":["NotAString"],"examples":["live-inbox"]},{"symbol":"apps.FieldRefs","kind":"type","summary":"The field references a `request` callback receives, by field name.","signatures":[],"definition":"export type FieldRefs<Name extends string> = { readonly [Key in Name]: FieldRef<Key> };","tags":[],"source":"apps/src/implementation/placement.ts","docs":"tools.md","related":["apps.FieldRef"],"examples":["live-inbox"]},{"symbol":"apps.Fields","kind":"type","summary":"Named author fields.","signatures":[],"definition":"export type Fields = Readonly<Record<string, Schema<unknown, boolean>>>;","tags":[],"source":"apps/src/implementation/schema.ts","docs":"tools.md","related":["apps.Schema","Schema"],"examples":["live-inbox"]},{"symbol":"apps.FormElicitation","kind":"type","summary":"Plain-data form request derived from the pinned MCP protocol schema.","signatures":[],"definition":"FormElicitation = Schema.Struct({\n ...McpSchema.ElicitRequestFormParams.fields,\n mode: Schema.Literal(\"form\"),\n requestedSchema: Schema.toEncoded(McpSchema.ElicitRequestFormParams.fields.requestedSchema),\n _meta: Schema.optional(JsonObject),\n})","tags":[],"source":"apps/src/contracts/elicitation.ts","docs":"tools.md","related":["apps.JsonObject"],"examples":["live-inbox"]},{"symbol":"apps.header","kind":"function","summary":"Send a value as the whole value of this header. The name is case-insensitive.","signatures":["(name: string, input: PlacementInput): Placement"],"tags":[],"source":"apps/src/implementation/placement.ts","docs":"tools.md","related":["apps.Placement","apps.PlacementInput"],"examples":["live-inbox"]},{"symbol":"apps.Infer","kind":"type","summary":"Infer the parsed author value.","signatures":[],"definition":"export type Infer<S> = S extends Schema<infer T, boolean> ? T : never;","tags":[],"source":"apps/src/implementation/schema.ts","docs":"tools.md","related":["apps.Schema","Schema"],"examples":["live-inbox"]},{"symbol":"apps.json","kind":"function","summary":"Any JSON value. Values still cross the native JSON decoder.","signatures":["(): Schema<EffectSchema.Json>"],"tags":[],"source":"apps/src/implementation/schema.ts","docs":"tools.md","related":["apps.Schema","Schema"],"examples":["live-inbox"]},{"symbol":"apps.JsonObject","kind":"type","summary":"A JSON object, distinct from an authored value schema.","signatures":[],"definition":"JsonObject = Schema.Record(Schema.String, JsonValue)","tags":[],"source":"apps/src/contracts/schema.ts","docs":"tools.md","related":["apps.JsonValue"],"examples":["live-inbox"]},{"symbol":"apps.JsonResponse","kind":"type","summary":"Native fetch-compatible response accepted at the author boundary.","signatures":[],"definition":"export type JsonResponse = PromiseMethods<NativeResponse>;","tags":[],"source":"apps/src/index.ts","docs":"tools.md","related":["JsonResponse@apps/src/contracts/http.ts","PromiseMethods"],"examples":["live-inbox"]},{"symbol":"apps.jsonSchema","kind":"function","summary":"Import JSON metadata now; unsupported schemas and invalid values fail when parsed.","signatures":["(input: unknown): Schema<EffectSchema.Json>"],"tags":[],"source":"apps/src/implementation/schema.ts","docs":"tools.md","related":["apps.Schema","Schema"],"examples":["live-inbox"]},{"symbol":"apps.JsonValue","kind":"type","summary":"JSON values carried by remote protocols such as MCP.","signatures":[],"definition":"JsonValue = Schema.Json","tags":[],"source":"apps/src/contracts/schema.ts","docs":"tools.md","related":[],"examples":["live-inbox"]},{"symbol":"apps.literal","kind":"function","summary":"One exact JSON scalar value.","signatures":["<const T extends string | number | boolean | null>(value: T): Schema<T>"],"tags":[],"source":"apps/src/implementation/schema.ts","docs":"tools.md","related":["apps.Schema","Schema"],"examples":["live-inbox"]},{"symbol":"apps.ManyAccounts","kind":"class","summary":"A collection requirement; selecting accounts does not copy or transfer them.","signatures":[],"definition":"export class ManyAccounts<Auth extends AuthMethods> extends Data.TaggedClass(\"many\")<{\n readonly provider: Provider<Auth>;\n}> {}","tags":[],"source":"apps/src/contracts/provider.ts","docs":"tools.md","related":["apps.AuthMethods","apps.Provider","Provider"],"examples":["live-inbox"]},{"symbol":"apps.mutation","kind":"function","summary":"Explicit write operation. Database writes roll back on failure; external effects cannot be undone.\nA handler that declares a context gets the caller's, with `user`, unless its type says otherwise.\nOne that declares no parameters, in a call without explicit type arguments, uses no context, so\nit may run as the app, as an app schedule runs it. Explicit type arguments name the context with\nthe third, which defaults to the caller's. One declared with an approval is marked `Approved`, so\napp-scope schedules refuse it.\nA handler whose context's type the caller's does not fit, such as one of the `\"app\"` scope.","signatures":["<Input, Output, Context extends AnyContext = MutationContext>(options: OperationOptions<Input, Output> & { readonly approval: Approval<Input>; }, run: (context: Context, input: Input) => Promise<Output>): Operation<Input, Output, \"mutation\", Context> & Approved","<Input, Output, Context extends AnyContext = MutationContext, Signature extends HandlerParameters<Context, Input> = [context: Context, input: Input]>(options: OperationOptions<Input, Output> & { readonly approval?: undefined; }, run: (...parameters: Signature) => Promise<Output>): Operation<Input, Output, \"mutation\", DeclaredContext<Signature, Context>>","<Input, Output, Context extends AnyContext>(options: OperationOptions<Input, Output> & { readonly approval?: undefined; }, run: (context: Context, input: Input) => Promise<Output>): Operation<Input, Output, \"mutation\", Context>"],"tags":[],"source":"apps/src/implementation/operations.ts","docs":"tools.md","related":["AnyContext","apps.Approval","apps.Approved","apps.MutationContext","apps.Operation","apps.OperationOptions","apps/operations/approval.Approval","DeclaredContext","HandlerParameters"],"examples":["live-inbox"]},{"symbol":"apps.MutationContext","kind":"type","summary":"Interactive mutation context; outside calls happen between SQL transactions, never inside one.","signatures":[],"definition":"export type MutationContext<\n Requirements extends AppRequirements = AppRequirements,\n Scope extends AccountScope = \"user\",\n> = Omit<AppContext<Requirements, Scope>, \"workflows\"> & {\n readonly workflows: WorkflowControls;\n} & StorageContext<true> &\n EventsContext<Requirements>;","tags":[],"source":"apps/src/contracts/context.ts","docs":"tools.md","related":["apps.AccountScope","apps.AppContext","apps.AppRequirements","apps.WorkflowControls","EventsContext","StorageContext","WorkflowControls"],"examples":["live-inbox"]},{"symbol":"apps.NetworkRefused","kind":"class","summary":"Executor's app network refused a request before it reached the service.","signatures":[],"definition":"export class NetworkRefused extends Schema.TaggedError<NetworkRefused>()(\"NetworkRefused\", {\n /** The refused destination, with its port when the URL names one. */\n host: Schema.String,\n refusal: NetworkRefusal,\n}) {\n override get message();\n}","tags":[],"source":"apps/src/contracts/network.ts","docs":"tools.md","related":["NetworkRefusal"],"examples":["live-inbox"]},{"symbol":"apps.NonRetryableError","kind":"class","summary":"Explicitly stop retrying an authored step. Its message is reported like any step error.","signatures":[],"definition":"export class NonRetryableError extends Error {\n override readonly name = \"NonRetryableError\";\n}","tags":[],"source":"apps/src/contracts/workflows.ts","docs":"tools.md","related":[],"examples":["live-inbox"]},{"symbol":"apps.NotImplemented","kind":"class","summary":"Explicit failure for authored capabilities that are still only sketches.","signatures":[],"definition":"export class NotImplemented extends Schema.TaggedError<NotImplemented>()(\"NotImplemented\", {\n operation: Schema.String,\n}) {}","tags":[],"source":"apps/src/contracts/app.ts","docs":"tools.md","related":[],"examples":["live-inbox"]},{"symbol":"apps.number","kind":"function","summary":"A finite JSON number. No coercion.","signatures":["(): Schema<number>"],"tags":[],"source":"apps/src/implementation/schema.ts","docs":"tools.md","related":["apps.Schema","Schema"],"examples":["live-inbox"]},{"symbol":"apps.oauth2","kind":"function","summary":"Declare OAuth discovery/endpoints and an optional app-visible response projection.\n`authorizationParams` adds service-defined sign-in parameters; a declared `authorizationUrl`\nkeeps its own query. Neither can set host-owned parameters, and each parameter appears once.\n`request` says where the projected secret fields may be sent, such as\n`({ access_token }) => bearer(access_token)`; it runs once, here.","signatures":["(options: OAuth2Config & { readonly request?: RequestPlacements<\"access_token\">; }): OAuth2Method<typeof OAuth2AccessToken>","<Response extends Schema<unknown, boolean>>(options: OAuth2Config & { readonly response: Response; readonly request?: RequestPlacements<FieldNameOf<Response>>; }): OAuth2Method<Response>"],"tags":[],"source":"apps/src/index.ts","docs":"tools.md","related":["apps.OAuth2Config","apps.OAuth2Method","apps.RequestPlacements","apps.Schema","FieldNameOf","Schema"],"examples":["live-inbox"]},{"symbol":"apps.OAuth2AccessToken","kind":"value","summary":"Default OAuth fields visible to app code. Host-only grants and clients stay private.","signatures":[],"definition":"const OAuth2AccessToken: Schema<{ readonly access_token: string; }, false>","tags":[],"source":"apps/src/index.ts","docs":"tools.md","related":["apps.Schema","Schema"],"examples":["live-inbox"]},{"symbol":"apps.OAuth2Config","kind":"type","summary":"OAuth options as authors write them. `authorizationParams` naming a host-owned protocol\nparameter such as `state` or `scope` is a type error as well as a declaration failure.","signatures":[],"definition":"export type OAuth2Config = WithoutReservedParams<NativeOAuth2Config>;","tags":[],"source":"apps/src/index.ts","docs":"tools.md","related":["OAuth2Config@apps/src/contracts/provider.ts","WithoutReservedParams"],"examples":["live-inbox"]},{"symbol":"apps.OAuth2Method","kind":"type","summary":"An OAuth declaration inferred from its author-facing response schema.","signatures":[],"definition":"export type OAuth2Method<Response extends Schema<unknown, boolean>> = NativeOAuth2Method<\n EffectSchema.Decoder<AccountFields<Response>>\n>;","tags":[],"source":"apps/src/index.ts","docs":"tools.md","related":["AccountFields","apps.Schema","OAuth2Method@apps/src/contracts/provider.ts","Schema"],"examples":["live-inbox"]},{"symbol":"apps.object","kind":"function","summary":"Parse declared fields and omit undeclared fields.","signatures":["<const F extends Fields>(fields: F): ObjectSchema<F>"],"tags":[],"source":"apps/src/implementation/schema.ts","docs":"tools.md","related":["apps.Fields","apps.ObjectSchema"],"examples":["live-inbox"]},{"symbol":"apps.ObjectSchema","kind":"type","summary":"An author object schema with retained field declarations.","signatures":[],"definition":"export interface ObjectSchema<F extends Fields> extends Schema<ObjectValue<F>> {\n readonly fields: F;\n}","tags":[],"source":"apps/src/implementation/schema.ts","docs":"tools.md","related":["apps.Fields","apps.ObjectValue","apps.Schema","Schema"],"examples":["live-inbox"]},{"symbol":"apps.ObjectValue","kind":"type","summary":"Optional fields may be absent; defaulted fields are present after decoding.","signatures":[],"definition":"export type ObjectValue<F extends Fields> = {\n readonly [Key in keyof F as F[Key][\"optionalValue\"] extends true ? never : Key]: Infer<F[Key]>;\n} & {\n readonly [Key in keyof F as F[Key][\"optionalValue\"] extends true ? Key : never]?: Infer<F[Key]>;\n};","tags":[],"source":"apps/src/implementation/schema.ts","docs":"tools.md","related":["apps.Fields","apps.Infer"],"examples":["live-inbox"]},{"symbol":"apps.Operation","kind":"type","summary":"Typed operation handles drive browser reference inference without bundling handlers.","signatures":[],"definition":"export interface Operation<\n Input,\n Output,\n Kind extends \"query\" | \"mutation\",\n Context = AppContext,\n> extends OperationDeclaration<Kind, Context> {\n readonly [NativeOperation]: AppOperation<Input, Output> & { readonly kind: Kind };\n}","tags":[],"source":"apps/src/implementation/operations.ts","docs":"tools.md","related":["AppOperation","apps.AppContext","apps.OperationDeclaration"],"examples":["live-inbox"]},{"symbol":"apps.OperationChild","kind":"type","summary":"A query or mutation whose handler context is checked by its kind, as a dynamic router resolves\none. `query()` and `mutation()` results fit with their inferred contexts.","signatures":[],"definition":"export type OperationChild<Query, Mutation> = RouterChild<Query, Mutation> &\n Pick<OperationDeclaration<\"query\" | \"mutation\">, \"kind\" | typeof NativeOperation>;","tags":[],"source":"apps/src/implementation/operations.ts","docs":"tools.md","related":["apps.OperationDeclaration","apps.RouterChild"],"examples":["live-inbox"]},{"symbol":"apps.OperationContext","kind":"type","summary":"Host-bound operation capabilities; the author declaration refines accounts and storage. `user` is\nabsent when the invocation has no caller.","signatures":[],"definition":"export type OperationContext = EvaluationContext<ScopedSlots> & {\n readonly sql?: SqlReader | Sql;\n};","tags":[],"source":"apps/src/contracts/operations.ts","docs":"tools.md","related":["apps.Sql","apps.SqlReader","EvaluationContext","ScopedSlots","Sql","SqlReader"],"examples":["live-inbox"]},{"symbol":"apps.OperationDeclaration","kind":"type","summary":"A server-only declaration with its category preserved for catalog validation. Queries and\nmutations carry their handler context under different phantom keys, so a router can type a\nquery's handler from its query context alone.","signatures":[],"definition":"export interface OperationDeclaration<Kind extends \"query\" | \"mutation\", Context = never> {\n readonly [QueryHandlerContext]?: \"query\" extends Kind ? (context: Context) => void : never;\n readonly [MutationHandlerContext]?: \"mutation\" extends Kind ? (context: Context) => void : never;\n readonly kind: Kind;\n readonly [NativeOperation]: Omit<AppOperation<never>, \"kind\" | \"input\"> & {\n readonly kind: Kind;\n readonly input: EffectSchema.Decoder<unknown>;\n };\n}","tags":[],"source":"apps/src/implementation/operations.ts","docs":"tools.md","related":["AppOperation"],"examples":["live-inbox"]},{"symbol":"apps.OperationDescription","kind":"type","summary":"Serializable live tool metadata; executable callbacks never cross this boundary. `name` is the\ntool's full dotted path. `router` is the path of the router that owns it, omitted at the root.\n`readOnly` marks a query; a tool without it is a mutation.\nParsed live tool description.","signatures":[],"definition":"HostedTool = Schema.Struct({\n schedules: Schema.optionalKey(Schema.Array(OperationSchedule)),\n name: Schema.NonEmptyString,\n router: Schema.optionalKey(Schema.NonEmptyString),\n tags: Schema.optionalKey(Schema.Array(Schema.NonEmptyString)),\n description: Schema.String,\n inputSchema: JsonObject,\n readOnly: Schema.optionalKey(Schema.Boolean),\n title: Schema.optionalKey(Schema.String),\n outputSchema: Schema.optionalKey(JsonObject),\n annotations: Schema.optionalKey(ToolAnnotations),\n _meta: Schema.optionalKey(JsonObject),\n})","tags":[],"source":"apps/src/contracts/protocols/current.ts","docs":"tools.md","related":["apps.JsonObject","OperationSchedule","ToolAnnotations"],"examples":["live-inbox"]},{"symbol":"apps.OperationOptions","kind":"type","summary":"Options shared by database and external operations. Output defaults to a JSON-safe host check.","signatures":[],"definition":"export interface OperationOptions<Input, Output> {\n readonly description?: string;\n readonly title?: string;\n readonly input: Schema<Input, boolean>;\n readonly output?: Schema<Output, boolean>;\n readonly approval?: Approval<Input>;\n readonly annotations?: ToolAnnotations;\n readonly _meta?: JsonObject;\n}","tags":[],"source":"apps/src/implementation/operations.ts","docs":"tools.md","related":["apps.Approval","apps.JsonObject","apps.Schema","apps/operations/approval.Approval","Schema","ToolAnnotations"],"examples":["live-inbox"]},{"symbol":"apps.Placement","kind":"type","summary":"Where a credential may be sent and the exact value it is sent as. A header placement is the\nheader's whole value; a query placement is the whole value of the named query parameter.","signatures":[],"definition":"Placement = Schema.Union([\n Schema.Struct({ in: Schema.Literal(\"header\"), name: PlacementHeaderName, value: template }),\n Schema.Struct({ in: Schema.Literal(\"query\"), name: Schema.NonEmptyString, value: template }),\n])","tags":[],"source":"apps/src/contracts/placement.ts","docs":"tools.md","related":[],"examples":["live-inbox"]},{"symbol":"apps.PlacementInput","kind":"type","summary":"What a template may interpolate: literal text, a field reference or another value.","signatures":[],"definition":"export type PlacementInput = string | FieldRef | PlacementValue;","tags":[],"source":"apps/src/implementation/placement.ts","docs":"tools.md","related":["apps.FieldRef","apps.PlacementValue"],"examples":["live-inbox"]},{"symbol":"apps.PlacementValue","kind":"class","summary":"A value template built with `t` or `base64`.","signatures":[],"definition":"export class PlacementValue extends NotAString {\n readonly parts: readonly PlacementPart[];\n constructor(parts: readonly PlacementPart[]);\n}","tags":[],"source":"apps/src/implementation/placement.ts","docs":"tools.md","related":["NotAString","PlacementPart"],"examples":["live-inbox"]},{"symbol":"apps.plain","kind":"function","summary":"A field that is not secret, such as a subdomain or region. App code reads its real value and\nthe connect form shows it.","signatures":["<S extends Schema<unknown, boolean>>(schema: S): Exposed<S, \"plain\">"],"tags":[],"source":"apps/src/implementation/schema.ts","docs":"tools.md","related":["apps.Schema","Exposed","Schema"],"examples":["live-inbox"]},{"symbol":"apps.Provider","kind":"class","summary":"A provider declaration. The host derives its identity from the declaration, never its check.","signatures":[],"definition":"export class Provider<Auth extends AuthMethods> extends Data.Class<{\n readonly name: string;\n readonly auth: Auth;\n /**\n * The hosts this provider's credentials may be sent to. When present, secret fields reach app\n * code as handles that the outbound network replaces only on requests to these hosts.\n */\n readonly hosts?: readonly string[];\n /**\n * Stored without its method types so a specific provider still fills a general slot. The host\n * binds the account against this provider's methods before running it.\n */\n readonly health?: AccountCheck<AuthMethods>;\n}> {\n /** Declare zero or more accounts from this provider without performing I/O. */\n many(): ManyAccounts<Auth>;\n}","tags":[],"source":"apps/src/contracts/provider.ts","docs":"tools.md","related":["AccountCheck","apps.AuthMethods","apps.ManyAccounts"],"examples":["live-inbox"]},{"symbol":"apps.ProviderError","kind":"class","summary":"A recognized service failure. App authors can throw this ordinary Error from\nasync code. Supply only a known reason and the account used for that request.\nNever include response bodies, messages, URLs or credentials. A bare 403 is\n`rejected`; `forbidden` requires explicit evidence of insufficient permission.\n\nThe framework adds the phase the failure happened in, and `upstream`: the error code and\ndescription the service stated in its documented error format, such as a Bearer challenge's\n`error` and `error_description`. Account secrets in that text are replaced.","signatures":[],"definition":"export class ProviderError extends Schema.TaggedError<ProviderError>()(\"ProviderError\", {\n reason: Schema.Literals([\"unauthorized\", \"forbidden\", \"rate_limited\", \"unavailable\", \"rejected\"]),\n status: Schema.optional(Schema.Int.check(Schema.isBetween({ minimum: 100, maximum: 599 }))),\n accountId: Schema.optional(AccountId),\n phase: Schema.optional(FailurePhase),\n upstream: Schema.optional(UpstreamError),\n}) {}","tags":[],"source":"apps/src/contracts/provider-error.ts","docs":"tools.md","related":["AccountId","FailurePhase","UpstreamError"],"examples":["live-inbox"]},{"symbol":"apps.ProviderOptions","kind":"type","summary":"Author options: the account check is an ordinary async function.","signatures":[],"definition":"export interface ProviderOptions<Auth extends AuthMethods> {\n readonly name: string;\n readonly auth: Auth;\n /**\n * Hosts the credentials may be sent to: `api.example.com`, `api.example.com:8443`, or\n * `*.example.com` for one level of subdomain. Secret fields then reach app code as handles\n * that the outbound network replaces only on requests to these hosts. An account records the\n * hosts it was connected for; changing them does not change the provider, but an existing\n * account sends only to hosts it was connected for until it is connected again.\n */\n readonly hosts?: readonly string[];\n /** Verify a connected account with a safe read, optionally reporting its upstream identity. */\n readonly health?: PromiseMethod<AccountCheck<Auth>[\"run\"]>;\n}","tags":[],"source":"apps/src/implementation/provider.ts","docs":"tools.md","related":["AccountCheck","apps.AuthMethods","PromiseMethod"],"examples":["live-inbox"]},{"symbol":"apps.query","kind":"function","summary":"`query(options, run)` declares a read operation. `query(name, value)` inside a method's\n`request` places a credential in a query parameter, such as `query(\"key\", key)`.","signatures":["(name: string, value: PlacementInput): Placement","<Input, Output, Context extends AnyContext = NativeQueryContext>(options: OperationOptions<Input, Output>, run: (context: Context, input: Input) => Promise<Output>): ReturnType<typeof operationQuery<Input, Output, Context>>"],"tags":[],"source":"apps/src/index.ts","docs":"tools.md","related":["AnyContext","apps.OperationOptions","apps.Placement","apps.PlacementInput","apps.QueryContext"],"examples":["live-inbox"]},{"symbol":"apps.QueryContext","kind":"type","summary":"Interactive query context; declared storage exposes only read methods.","signatures":[],"definition":"export type QueryContext<\n Requirements extends AppRequirements = AppRequirements,\n Scope extends AccountScope = \"user\",\n> = AppContext<Requirements, Scope> & StorageContext<false>;","tags":[],"source":"apps/src/contracts/context.ts","docs":"tools.md","related":["apps.AccountScope","apps.AppContext","apps.AppRequirements","StorageContext"],"examples":["live-inbox"]},{"symbol":"apps.raw","kind":"function","summary":"A secret field that app code reads as its real value, for request signing and similar uses.\nThe connect form warns that the app can read it. Prefer an unmarked field, which app code\nreceives as a handle that only reaches the provider's declared hosts.","signatures":["<S extends Schema<unknown, boolean>>(schema: S): Exposed<S, \"raw\">"],"tags":[],"source":"apps/src/implementation/schema.ts","docs":"tools.md","related":["apps.Schema","Exposed","Schema"],"examples":["live-inbox"]},{"symbol":"apps.record","kind":"function","summary":"Named values with a common schema.","signatures":["<T>(value: Schema<T, boolean>): Schema<Readonly<Record<string, T>>>"],"tags":[],"source":"apps/src/implementation/schema.ts","docs":"tools.md","related":["apps.Schema","Schema"],"examples":["live-inbox"]},{"symbol":"apps.renameTools","kind":"function","summary":"Expose a protocol router's tools under other names, such as the names an earlier client used.\n`rename` receives each tool's name relative to this router and returns the name to expose, or\nundefined to leave the tool out. When two tools would share a name, the first listed keeps it.\nCalls and descriptions find a tool by its exposed name. Works on routers that discover their\ntools, such as `mcpRouter`, `graphqlRouter` and `liveOpenapiRouter`.","signatures":["<Query, Mutation>(source: RouterDeclaration<Query, Mutation>, rename: (name: string) => string | undefined): RouterDeclaration<Query, Mutation>"],"tags":[],"source":"apps/src/implementation/router.ts","docs":"tools.md","related":["apps.RouterDeclaration"],"examples":["live-inbox"]},{"symbol":"apps.RequestPlacements","kind":"type","summary":"How a method declares its placements: called once with its field references.","signatures":[],"definition":"export type RequestPlacements<Name extends string> = (\n fields: FieldRefs<Name>,\n) => Placement | readonly Placement[];","tags":[],"source":"apps/src/implementation/placement.ts","docs":"tools.md","related":["apps.FieldRefs","apps.Placement"],"examples":["live-inbox"]},{"symbol":"apps.ReservedAuthorizationParam","kind":"type","summary":"A protocol parameter only the host sets on the authorization request.","signatures":[],"definition":"export type ReservedAuthorizationParam = (typeof reservedAuthorizationParams)[number];","tags":[],"source":"apps/src/contracts/provider.ts","docs":"tools.md","related":[],"examples":["live-inbox"]},{"symbol":"apps.ResponseDecodeError","kind":"class","summary":"Invalid JSON or a schema mismatch. Never includes the response body.","signatures":[],"definition":"export class ResponseDecodeError extends Schema.TaggedError<ResponseDecodeError>()(\n \"ResponseDecodeError\",\n {},\n) {\n override get message();\n}","tags":[],"source":"apps/src/contracts/http.ts","docs":"tools.md","related":[],"examples":["live-inbox"]},{"symbol":"apps.ResponseStatusError","kind":"class","summary":"A non-2xx response. Carries the status only, never the body.","signatures":[],"definition":"export class ResponseStatusError extends Schema.TaggedError<ResponseStatusError>()(\n \"ResponseStatusError\",\n { status: Schema.Number },\n) {\n override get message();\n}","tags":[],"source":"apps/src/contracts/http.ts","docs":"tools.md","related":[],"examples":["live-inbox"]},{"symbol":"apps.router","kind":"function","summary":"Group operations and routers under path keys, like tRPC's nested routers, with metadata an\nagent can read. Passing an existing router instead of children overrides its metadata:\n`router(mcpRouter(options), { description: \"...\" })`.","signatures":["<Query = unknown, Mutation = unknown>(children: Readonly<Record<string, RouterChild<Query, Mutation>>>, options?: RouterOptions): RouterDeclaration<Query, Mutation>","<Query, Mutation>(source: RouterDeclaration<Query, Mutation>, options: RouterOptions): RouterDeclaration<Query, Mutation>"],"tags":[],"source":"apps/src/implementation/router.ts","docs":"tools.md","related":["apps.RouterChild","apps.RouterDeclaration","apps.RouterOptions"],"examples":["live-inbox"]},{"symbol":"apps.RouterChild","kind":"type","summary":"An operation or nested router under one key. Each child is typed only by its own kind's context.","signatures":[],"definition":"export interface RouterChild<Query, Mutation> {\n readonly [QueryHandlerContext]?: (context: Query) => void;\n readonly [MutationHandlerContext]?: (context: Mutation) => void;\n}","tags":[],"source":"apps/src/implementation/operations.ts","docs":"tools.md","related":[],"examples":["live-inbox"]},{"symbol":"apps.RouterDeclaration","kind":"type","summary":"A router declaration. The phantom contexts let `defineApp` type inline handlers; protocol\nrouters accept any context because their operations only use the framework's own capabilities.\nThe native router is held under a private key in implementation/router.ts.","signatures":[],"definition":"export interface RouterDeclaration<Query = unknown, Mutation = unknown> {\n readonly [QueryHandlerContext]?: (context: Query) => void;\n readonly [MutationHandlerContext]?: (context: Mutation) => void;\n readonly [NativeRouterKey]: unknown;\n}","tags":[],"source":"apps/src/implementation/operations.ts","docs":"tools.md","related":[],"examples":["live-inbox"]},{"symbol":"apps.RouterIcon","kind":"type","summary":"An image a client may show beside a router, such as an MCP server's own icon. Models never read it.","signatures":[],"definition":"RouterIcon = Schema.Struct({\n src: Schema.NonEmptyString,\n mimeType: Schema.optionalKey(Schema.String),\n sizes: Schema.optionalKey(Schema.Array(Schema.String)),\n theme: Schema.optionalKey(Schema.Literals([\"light\", \"dark\"])),\n})","tags":[],"source":"apps/src/contracts/router.ts","docs":"tools.md","related":[],"examples":["live-inbox"]},{"symbol":"apps.RouterOptions","kind":"type","summary":"Author metadata for a router. Instructions become a skill named after the router's path.","signatures":[],"definition":"export interface RouterOptions {\n readonly title?: string;\n readonly description?: string;\n readonly instructions?: string;\n readonly icons?: readonly RouterIcon[];\n readonly tags?: Readonly<Record<string, string>>;\n}","tags":[],"source":"apps/src/implementation/router.ts","docs":"tools.md","related":["apps.RouterIcon"],"examples":["live-inbox"]},{"symbol":"apps.ScheduleDeclaration","kind":"type","summary":"The app adapter resolves this operation handle to its declared mutation name. A `\"user\"`\nschedule has one copy per member who enables it, run as them with their linked accounts. An\n`\"app\"` schedule is one schedule, enabled by an app manager, run without a caller with the app's\naccounts only.","signatures":[],"definition":"export interface ScheduleDeclaration<Context = never, Scope extends AccountScope = AccountScope> {\n readonly scope: Scope;\n readonly operation: OperationDeclaration<\"mutation\", Context>;\n readonly timing: ScheduleTiming;\n readonly input: JsonValue;\n}","tags":[],"source":"apps/src/implementation/schedules.ts","docs":"tools.md","related":["apps.AccountScope","apps.JsonValue","apps.OperationDeclaration","ScheduleTiming"],"examples":["live-inbox"]},{"symbol":"apps.Schema","kind":"type","summary":"An author-facing value schema. Effect is never required in author code.","signatures":[],"definition":"export interface Schema<T, Optional extends boolean = false> {\n readonly [Decoder]: EffectSchema.Decoder<T>;\n readonly optionalValue: Optional;\n /** Parse an unknown value; invalid input throws a safe ValidationError. */\n parse(input: unknown): T;\n /** Accept an absent field without changing the original schema. */\n optional(): Schema<T | undefined, true>;\n /** Validate the default now and use it for undefined input. */\n default(value: T): Schema<T> & { readonly hasDefault: true; readonly inputOptional: Optional };\n}","tags":[],"source":"apps/src/implementation/schema.ts","docs":"tools.md","related":[],"examples":["live-inbox"]},{"symbol":"apps.secrets","kind":"function","summary":"Declare a secrets method without requiring an Effect schema from the author. `request` says\nwhere its secret fields may be sent, such as `({ token }) => bearer(token)`; it runs once, here.","signatures":["<const F extends Fields>(options: { readonly label: string; readonly fields: ObjectSchema<F>; readonly request?: RequestPlacements<keyof F & string>; }): SecretsMethod<ObjectSchema<F>>"],"tags":[],"source":"apps/src/index.ts","docs":"tools.md","related":["apps.Fields","apps.ObjectSchema","apps.RequestPlacements","apps.SecretsMethod"],"examples":["live-inbox"]},{"symbol":"apps.SecretsMethod","kind":"type","summary":"A secrets declaration inferred from an author schema.","signatures":[],"definition":"export type SecretsMethod<Shape extends ObjectSchema<Fields>> = NativeSecretsMethod<\n EffectSchema.Decoder<AccountFields<Shape>>\n>;","tags":[],"source":"apps/src/index.ts","docs":"tools.md","related":["AccountFields","apps.Fields","apps.ObjectSchema","SecretsMethod@apps/src/contracts/provider.ts"],"examples":["live-inbox"]},{"symbol":"apps.SecretString","kind":"type","summary":"A secret account value. In a provider that declares hosts it is a handle, which the host's\noutbound network replaces with the real value only on requests to those hosts. Pass it to\nclients and headers as an ordinary string; do not decode or transform it.","signatures":[],"definition":"export type SecretString = string & { readonly [Secret]: true };","tags":[],"source":"apps/src/implementation/schema.ts","docs":"tools.md","related":[],"examples":["live-inbox"]},{"symbol":"apps.Skill","kind":"type","summary":"Files use paths relative to this skill directory; reading one never executes its contents.","signatures":[],"definition":"AppSkillSource = Schema.Struct({\n ...AppSkillMetadata.fields,\n files: Schema.Array(SkillFile).check(\n Schema.makeFilter(\n (files) =>\n files.some((file) => file.path === \"SKILL.md\") &&\n new Set(files.map((file) => file.path)).size === files.length,\n ),\n ),\n})","tags":[],"source":"apps/src/contracts/skills.ts","docs":"tools.md","related":["apps.SkillFile","apps/skills.SkillFile"],"examples":["live-inbox"]},{"symbol":"apps.SkillFile","kind":"type","summary":"UTF-8 text resource. Reading a resource never executes it.","signatures":[],"definition":"SkillFile = Schema.Struct({ path: SkillFilePath, content: Schema.String })","tags":[],"source":"apps/src/contracts/skills.ts","docs":"tools.md","related":[],"examples":["live-inbox"]},{"symbol":"apps.Sql","kind":"type","summary":"Writable SQL. Outside a transaction every statement commits on its own. `transaction` runs its\ncallback synchronously in one SQLite transaction, so no transaction can stay open while the app\nwaits on anything else; throwing rolls it back. Apps call outside services between transactions.","signatures":[],"definition":"export interface Sql extends SqlReader {\n transaction<T>(work: (tx: SqlTransaction) => Synchronous<T>): T;\n}","tags":[],"source":"apps/src/contracts/sql.ts","docs":"tools.md","related":["apps.SqlReader","apps.SqlTransaction","SqlReader","Synchronous"],"examples":["live-inbox"]},{"symbol":"apps.SqlCursor","kind":"type","summary":"The rows of one statement, already read, and what the statement read and wrote.","signatures":[],"definition":"export interface SqlCursor<Row extends SqlRow = SqlRow> extends Iterable<Row> {\n readonly columnNames: readonly string[];\n readonly rowsRead: number;\n readonly rowsWritten: number;\n toArray(): Row[];\n /** The only row. Throws unless the statement returned exactly one. */\n one(): Row;\n}","tags":[],"source":"apps/src/contracts/sql.ts","docs":"tools.md","related":["apps.SqlRow"],"examples":["live-inbox"]},{"symbol":"apps.SqlReader","kind":"type","summary":"Read-only SQL. Query tools receive this. A query runs in a transaction that is always rolled\nback, so nothing it changes commits; one that changes rows fails.","signatures":[],"definition":"export interface SqlReader {\n exec<Row extends SqlRow = SqlRow>(query: string, ...bindings: SqlValue[]): SqlCursor<Row>;\n}","tags":[],"source":"apps/src/contracts/sql.ts","docs":"tools.md","related":["apps.SqlCursor","apps.SqlRow","apps.SqlValue","SqlCursor"],"examples":["live-inbox"]},{"symbol":"apps.SqlRow","kind":"type","summary":"One result row, keyed by column name.","signatures":[],"definition":"export type SqlRow = Record<string, SqlValue>;","tags":[],"source":"apps/src/contracts/sql.ts","docs":"tools.md","related":["apps.SqlValue"],"examples":["live-inbox"]},{"symbol":"apps.SqlTransaction","kind":"type","summary":"SQL inside one transaction.","signatures":[],"definition":"export type SqlTransaction = SqlReader;","tags":[],"source":"apps/src/contracts/sql.ts","docs":"tools.md","related":["apps.SqlReader","SqlReader"],"examples":["live-inbox"]},{"symbol":"apps.SqlValue","kind":"type","summary":"A value SQLite stores or returns.","signatures":[],"definition":"export type SqlValue = string | number | null | ArrayBuffer;","tags":[],"source":"apps/src/contracts/sql.ts","docs":"tools.md","related":[],"examples":["live-inbox"]},{"symbol":"apps.string","kind":"function","summary":"A string, optionally with a minimum length. No coercion.","signatures":["(options?: { readonly minLength?: number; }): Schema<string>"],"tags":[],"source":"apps/src/implementation/schema.ts","docs":"tools.md","related":["apps.Schema","Schema"],"examples":["live-inbox"]},{"symbol":"apps.t","kind":"function","summary":"A value template: literal text with interpolated field references and values.","signatures":["(strings: TemplateStringsArray, ...values: readonly PlacementInput[]): PlacementValue"],"tags":[],"source":"apps/src/implementation/placement.ts","docs":"tools.md","related":["apps.PlacementInput","apps.PlacementValue"],"examples":["live-inbox"]},{"symbol":"apps.toolAnnotations","kind":"function","summary":"The advisory hints an operation carries, such as an MCP server's `destructiveHint`. App code\nreads them to choose an approval; the framework never infers one from them.","signatures":["(operation: OperationDeclaration<\"query\" | \"mutation\", never>): ToolAnnotations | undefined"],"tags":[],"source":"apps/src/implementation/operations.ts","docs":"tools.md","related":["apps.OperationDeclaration","ToolAnnotations"],"examples":["live-inbox"]},{"symbol":"apps.userCron","kind":"function","summary":"Calendar alternative for wall-clock schedules, once per member who enables it, as them. UTC is the\nexplicit default when timezone is omitted.","signatures":["<Input, Output, Context>(calendar: { readonly expression: string; readonly timezone?: string; }, operation: Operation<Input, Output, \"mutation\", Context>, input: NoInfer<Input>): ScheduleDeclaration<Context, \"user\">"],"tags":[],"source":"apps/src/implementation/schedules.ts","docs":"tools.md","related":["apps.Operation","apps.ScheduleDeclaration"],"examples":["live-inbox"]},{"symbol":"apps.userInterval","kind":"function","summary":"Run an existing mutation at a fixed interval, once per member who enables it, as them.","signatures":["<Input, Output, Context>(duration: Interval, operation: Operation<Input, Output, \"mutation\", Context>, input: NoInfer<Input>): ScheduleDeclaration<Context, \"user\">"],"tags":[],"source":"apps/src/implementation/schedules.ts","docs":"tools.md","related":["apps.Operation","apps.ScheduleDeclaration","Interval"],"examples":["live-inbox"]},{"symbol":"apps.ValidationError","kind":"class","summary":"Invalid input. Never includes supplied values, credentials or response bodies.","signatures":[],"definition":"export class ValidationError extends Schema.TaggedError<ValidationError>()(\"ValidationError\", {}) {\n override get message();\n}","tags":[],"source":"apps/src/contracts/schema.ts","docs":"tools.md","related":[],"examples":["live-inbox"]},{"symbol":"apps.Webhook","kind":"type","summary":"A webhook's context names its source account's scope: one with `user` serves a user requirement\n(`account: { user: \"x\" }`), one of the `\"app\"` scope an app requirement (`account: { app: \"x\" }`)\nand runs without a caller.","signatures":[],"definition":"export type Webhook<\n Context extends WebhookContext<AppRequirements, AccountScope>,\n Config extends Schema<unknown, boolean>,\n State extends Schema<unknown, boolean>,\n> = AuthorWebhook<\n NativeWebhook<Context, EffectSchema.Decoder<Infer<Config>>, EffectSchema.Decoder<Infer<State>>>,\n Config,\n State\n>;","tags":[],"source":"apps/src/index.ts","docs":"tools.md","related":["apps.AccountScope","apps.AppRequirements","apps.Infer","apps.Schema","apps.WebhookContext","AuthorWebhook@apps/src/index.ts","Schema","Webhook@apps/src/contracts/webhooks.ts"],"examples":["live-inbox"]},{"symbol":"apps.WebhookAccount","kind":"type","summary":"The requirement a webhook's source account fills, in its scope.","signatures":[],"definition":"export type WebhookAccount = { readonly app: string } | { readonly user: string };","tags":[],"source":"apps/src/contracts/app.ts","docs":"tools.md","related":[],"examples":["live-inbox"]},{"symbol":"apps.WebhookContext","kind":"type","summary":"Background webhook context has account and storage access without interactive input.","signatures":[],"definition":"export type WebhookContext<\n Requirements extends AppRequirements = AppRequirements,\n Scope extends AccountScope = \"user\",\n> = Omit<MutationContext<Requirements, Scope>, \"elicit\">;","tags":[],"source":"apps/src/contracts/context.ts","docs":"tools.md","related":["apps.AccountScope","apps.AppRequirements","apps.MutationContext"],"examples":["live-inbox"]},{"symbol":"apps.withApproval","kind":"function","summary":"Attach the same approval function to a generated or shared operation.","signatures":["<Input, Output, Kind extends \"query\" | \"mutation\", Context>(operation: Operation<Input, Output, Kind, Context>, approval: Approval<Input>): Operation<Input, Output, Kind, Context> & Approved"],"tags":[],"source":"apps/src/implementation/operations.ts","docs":"tools.md","related":["apps.Approval","apps.Approved","apps.Operation","apps/operations/approval.Approval"],"examples":["live-inbox"]},{"symbol":"apps.withApprovals","kind":"function","summary":"Choose an approval for each operation a router contains, including tools a dynamic router\nresolves later. `policy` receives the operation and its name relative to this router; returning\nundefined keeps the operation's own approval. Read hints with `toolAnnotations(operation)`.\nApply it to each account's router before `accountRouter` combines them, so every account keeps\nits own tools' hints.","signatures":["<Query, Mutation>(source: RouterDeclaration<Query, Mutation>, policy: (operation: OperationDeclaration<\"query\" | \"mutation\", never>, name: string) => Approval | undefined): RouterDeclaration<Query, Mutation>"],"tags":[],"source":"apps/src/implementation/router.ts","docs":"tools.md","related":["apps.Approval","apps.OperationDeclaration","apps.RouterDeclaration","apps/operations/approval.Approval"],"examples":["live-inbox"]},{"symbol":"apps.workflow","kind":"function","summary":"Declare durable orchestration without starting a run or performing I/O.","signatures":["<Input, Output, Context extends AnyWorkflowContext = WorkflowContext<AppRequirements, \"user\">>(options: { readonly input: Schema<Input, boolean>; readonly output?: Schema<Output, boolean>; readonly description?: string; }, run: (context: Context, input: Input) => Promise<Output>): Workflow<Input, Output, Context>"],"tags":[],"source":"apps/src/implementation/workflows.ts","docs":"tools.md","related":["AnyWorkflowContext","apps.AppRequirements","apps.Schema","apps.Workflow","apps.WorkflowContext","Schema"],"examples":["live-inbox"]},{"symbol":"apps.Workflow","kind":"type","summary":"A workflow declaration retains input/output inference and required context compatibility.","signatures":[],"definition":"export interface Workflow<Input, Output, Context extends AnyWorkflowContext = WorkflowContext> {\n readonly [HandlerContext]?: (context: Context) => void;\n readonly [NativeWorkflow]: AppWorkflow<Input, Output>;\n}","tags":[],"source":"apps/src/implementation/workflows.ts","docs":"tools.md","related":["AnyWorkflowContext","apps.WorkflowContext","AppWorkflow"],"examples":["live-inbox"]},{"symbol":"apps.WorkflowContext","kind":"type","summary":"The orchestration body gets no account, database or interactive capabilities.","signatures":[],"definition":"export interface WorkflowContext<\n Requirements extends AppRequirements = AppRequirements,\n Scope extends AccountScope = \"user\",\n> {\n readonly runId: WorkflowRunId;\n readonly step: WorkflowStep<Requirements, Scope>;\n}","tags":[],"source":"apps/src/contracts/workflows.ts","docs":"tools.md","related":["apps.AccountScope","apps.AppRequirements","apps.WorkflowStep","WorkflowRunId","WorkflowStep"],"examples":["live-inbox"]},{"symbol":"apps.WorkflowControls","kind":"type","summary":"Mutating handlers may start and terminate runs in their own configured app.","signatures":[],"definition":"export interface WorkflowControls extends WorkflowReads {\n readonly start: (input: {\n readonly workflow: string;\n readonly input: JsonValue;\n readonly key?: string;\n }) => Promise<WorkflowRun>;\n readonly terminate: (input: { readonly run: string }) => Promise<WorkflowRun>;\n}","tags":[],"source":"apps/src/contracts/workflows.ts","docs":"tools.md","related":["apps.JsonValue","apps.WorkflowReads","WorkflowRun"],"examples":["live-inbox"]},{"symbol":"apps.WorkflowDeclaration","kind":"type","summary":"Composition view erases input only after retaining its runtime decoder.","signatures":[],"definition":"export interface WorkflowDeclaration<Context extends AnyWorkflowContext> {\n readonly [HandlerContext]?: (context: Context) => void;\n readonly [NativeWorkflow]: Omit<AppWorkflow<never>, \"input\"> & {\n readonly input: EffectSchema.Decoder<unknown>;\n };\n}","tags":[],"source":"apps/src/implementation/workflows.ts","docs":"tools.md","related":["AnyWorkflowContext","AppWorkflow"],"examples":["live-inbox"]},{"symbol":"apps.WorkflowDuration","kind":"type","summary":"Numbers are milliseconds; strings use a quantity and full unit, such as \"5 minutes\".","signatures":[],"definition":"WorkflowDuration = Schema.Union([\n Schema.Finite.check(Schema.isGreaterThanOrEqualTo(0)),\n Schema.NonEmptyString,\n]).check(Schema.makeFilter((value) => workflowDurationMillis(value) !== undefined))","tags":[],"source":"apps/src/contracts/workflows.ts","docs":"tools.md","related":[],"examples":["live-inbox"]},{"symbol":"apps.WorkflowFailure","kind":"class","summary":"Failures cross host boundaries as reason codes plus the app's own bounded error detail.","signatures":[],"definition":"export class WorkflowFailure extends Schema.TaggedError<WorkflowFailure>()(\"WorkflowFailure\", {\n ...WorkflowFailureDetail,\n reason: Schema.Literals([\n \"unavailable\",\n \"not_found\",\n \"input\",\n \"output\",\n \"operation\",\n \"approval\",\n \"credentials\",\n \"terminated\",\n \"execution\",\n \"conflict\",\n \"engine\",\n ]),\n retryable: Schema.Boolean,\n}) {\n /**\n * The step name and error detail are the app's. Its run's owner reads them; telemetry records\n * only the reason, however the failure was built or decoded.\n */\n get [RecordedMessage]();\n}","tags":[],"source":"apps/src/contracts/workflows.ts","docs":"tools.md","related":[],"examples":["live-inbox"]},{"symbol":"apps.WorkflowReads","kind":"type","summary":"Query and factory contexts may inspect only their own app's runs.","signatures":[],"definition":"export interface WorkflowReads {\n readonly get: (input: { readonly run: string }) => Promise<WorkflowRun>;\n readonly list: (input?: {\n readonly workflow?: string;\n readonly limit?: number;\n readonly cursor?: string;\n }) => Promise<WorkflowRunPage>;\n}","tags":[],"source":"apps/src/contracts/workflows.ts","docs":"tools.md","related":["WorkflowRun","WorkflowRunPage"],"examples":["live-inbox"]},{"symbol":"apps.WorkflowStep","kind":"type","summary":"Explicit durable boundaries; database access passes through registered app operations.","signatures":[],"definition":"export interface WorkflowStep<\n Requirements extends AppRequirements = AppRequirements,\n Scope extends AccountScope = \"user\",\n> {\n do<Output>(\n name: string,\n run: (context: WorkflowStepContext<Requirements, Scope>) => Promise<Output>,\n ): Promise<Output>;\n do<Output>(\n name: string,\n options: WorkflowStepOptions,\n run: (context: WorkflowStepContext<Requirements, Scope>) => Promise<Output>,\n ): Promise<Output>;\n runQuery<Input, Output>(\n name: string,\n operation: Operation<Input, Output, \"query\", QueryContext<Requirements, Scope>>,\n input: NoInfer<Input>,\n options?: WorkflowStepOptions,\n ): Promise<Output>;\n runMutation<Input, Output>(\n name: string,\n operation: Operation<Input, Output, \"mutation\", MutationContext<Requirements, Scope>>,\n input: NoInfer<Input>,\n options?: WorkflowStepOptions,\n ): Promise<Output>;\n readonly sleep: (name: string, duration: WorkflowDuration) => Promise<void>;\n readonly sleepUntil: (name: string, timestamp: number | Date) => Promise<void>;\n}","tags":[],"source":"apps/src/contracts/workflows.ts","docs":"tools.md","related":["apps.AccountScope","apps.AppRequirements","apps.MutationContext","apps.Operation","apps.QueryContext","apps.WorkflowDuration","apps.WorkflowStepContext","apps.WorkflowStepOptions"],"examples":["live-inbox"]},{"symbol":"apps.WorkflowStepContext","kind":"type","summary":"External steps get fresh credentials and cancellation, without storage or live elicitation. A run\nstarted by app-scope work, such as an app schedule, has the `\"app\"` scope: no `user`.","signatures":[],"definition":"export type WorkflowStepContext<\n Requirements extends AppRequirements = AppRequirements,\n Scope extends AccountScope = \"user\",\n> = Omit<AppContext<Requirements, Scope>, \"elicit\" | \"workflows\"> & {\n readonly runId: WorkflowRunId;\n readonly stepId: string;\n readonly idempotencyKey: string;\n};","tags":[],"source":"apps/src/contracts/workflows.ts","docs":"tools.md","related":["apps.AccountScope","apps.AppContext","apps.AppRequirements","WorkflowRunId"],"examples":["live-inbox"]},{"symbol":"apps.WorkflowStepOptions","kind":"type","summary":"Author retry and timeout options are passed to the durable engine.","signatures":[],"definition":"WorkflowStepOptions = Schema.Struct({\n retries: Schema.optionalKey(\n Schema.Struct({\n limit: Schema.Int.check(Schema.isGreaterThanOrEqualTo(0)),\n delay: WorkflowDuration,\n backoff: Schema.optionalKey(Schema.Literals([\"constant\", \"linear\", \"exponential\"])),\n }),\n ),\n timeout: Schema.optionalKey(WorkflowDuration),\n})","tags":[],"source":"apps/src/contracts/workflows.ts","docs":"tools.md","related":["apps.WorkflowDuration"],"examples":["live-inbox"]},{"symbol":"apps/client.AppMutation","kind":"type","summary":"A callable mutation. Success means the write was acknowledged; its overlay stays until fresh reads finish.","signatures":[],"definition":"export interface AppMutation<Input, Output> {\n (input: Input): Promise<Output>;\n /** Return a new mutation handle with this projection. Failures remove only this invocation's changes. */\n withOptimisticUpdate(update: OptimisticUpdate<Input>): AppMutation<Input, Output>;\n}","tags":[],"source":"apps/src/contracts/optimistic.ts","docs":"ui.md","related":["apps/client.OptimisticUpdate"],"examples":["live-inbox"]},{"symbol":"apps/client.AppQueryFailed","kind":"class","summary":"Safe client failure; arbitrary transport errors and response data are never exposed.","signatures":[],"definition":"export class AppQueryFailed extends Schema.TaggedError<AppQueryFailed>()(\"AppQueryFailed\", {}) {}","tags":[],"source":"apps/src/contracts/live.ts","docs":"ui.md","related":[],"examples":["live-inbox"]},{"symbol":"apps/client.createAppClient","kind":"function","summary":"A scoped page client. Host-injected context carries only the deployment, never credentials.","signatures":["(): { dispose: () => Promise<void>; query: <Input, Output>(reference: OperationReference<Input, Output, \"query\">, input: NoInfer<Input>, output: Schema<NoInfer<Output>, boolean>) => Promise<NoInfer<Output>>; mutate: <Input, Output>(reference: OperationReference<Input, Output, \"mutation\">, input: NoInfer<Input>, output: Schema<NoInfer<Output>, boolean>) => Promise<Output>; mutation: <Input, Output>(reference: OperationReference<Input, Output, \"mutation\">, output: Schema<NoInfer<Output>, boolean>) => AppMutation<Input, Output>; queryAtom: <Input, Output>(reference: OperationReference<Input, Output, \"query\">, input: NoInfer<Input>, output: Schema<NoInfer<Output>, boolean>) => Atom.Atom<AsyncResult.AsyncResult<Output, unknown>>; }"],"tags":[],"source":"apps/src/implementation/ui-client.ts","docs":"ui.md","related":["AppMutation","apps.Schema","apps/client.AppMutation","apps/client.OperationReference","Schema"],"examples":["live-inbox"]},{"symbol":"apps/client.liveQueryAtom","kind":"function","summary":"Subscribe for the atom's mounted lifetime and parse every result using a shared output schema.\nThe host supplies routing, authentication and reconnection behavior through transport.","signatures":["<Input, Output>(reference: OperationReference<Input, Output, \"query\">, input: NoInfer<Input>, options: { readonly output: Schema<NoInfer<Output>, boolean>; readonly transport: QueryTransport; }): Atom.Atom<AsyncResult<NoInfer<Output>, NoSuchElementError | AppQueryFailed>>"],"tags":[],"source":"apps/src/implementation/live.ts","docs":"ui.md","related":["apps.Schema","apps/client.AppQueryFailed","apps/client.OperationReference","apps/client.QueryTransport","Schema"],"examples":["live-inbox"]},{"symbol":"apps/client.mutationReference","kind":"function","summary":"Make a mutation reference using a type-only server import.","signatures":["<Mutation>(name: Mutation extends Operation<infer _Input, infer _Output, \"mutation\", infer _Context> ? string : never): OperationReference<InputOf<Mutation>, OutputOf<Mutation>, \"mutation\">"],"tags":[],"source":"apps/src/implementation/live.ts","docs":"ui.md","related":["apps.Operation","apps/client.OperationReference","InputOf","OutputOf"],"examples":["live-inbox"]},{"symbol":"apps/client.OperationReference","kind":"type","summary":"Serializable named reference; the phantom field is never populated at runtime.","signatures":[],"definition":"export interface OperationReference<Input, Output, Kind extends \"query\" | \"mutation\"> {\n readonly name: string;\n readonly kind: Kind;\n readonly _types?: { readonly input: Input; readonly output: Output };\n}","tags":[],"source":"apps/src/contracts/live.ts","docs":"ui.md","related":[],"examples":["live-inbox"]},{"symbol":"apps/client.OptimisticLocalStore","kind":"type","summary":"Read or replace mounted queries during a synchronous optimistic update. Never mutate returned values.","signatures":[],"definition":"export interface OptimisticLocalStore {\n /** Read the projected result, or undefined if this query is not loaded in this client. */\n getQuery<Input, Output>(\n reference: OperationReference<Input, Output, \"query\">,\n input: NoInfer<Input>,\n ): Output | undefined;\n /** Read all mounted argument variants of an operation, including loading queries. */\n getAllQueries<Input, Output>(\n reference: OperationReference<Input, Output, \"query\">,\n ): readonly { readonly input: Input; readonly value: Output | undefined }[];\n /** Replace a mounted query's projected result. The query's output schema validates the new value. */\n setQuery<Input, Output>(\n reference: OperationReference<Input, Output, \"query\">,\n input: NoInfer<Input>,\n value: NoInfer<Output>,\n ): void;\n}","tags":[],"source":"apps/src/contracts/optimistic.ts","docs":"ui.md","related":["apps/client.OperationReference"],"examples":["live-inbox"]},{"symbol":"apps/client.OptimisticUpdate","kind":"type","summary":"Pure synchronous projection. Replayed over current data; create temporary IDs before invoking the mutation.","signatures":[],"definition":"export type OptimisticUpdate<Input> = (store: OptimisticLocalStore, input: Input) => undefined;","tags":[],"source":"apps/src/contracts/optimistic.ts","docs":"ui.md","related":["apps/client.OptimisticLocalStore","OptimisticLocalStore"],"examples":["live-inbox"]},{"symbol":"apps/client.QueryDescriptor","kind":"type","summary":"Host-bound subscription request. Authentication and configured app identity belong to the host.","signatures":[],"definition":"export interface QueryDescriptor {\n readonly name: string;\n readonly input: JsonValue;\n}","tags":[],"source":"apps/src/contracts/live.ts","docs":"ui.md","related":["apps.JsonValue"],"examples":["live-inbox"]},{"symbol":"apps/client.queryReference","kind":"function","summary":"Make a query reference using a type-only server import. No handler is passed or bundled.","signatures":["<Query>(name: Query extends Operation<infer _Input, infer _Output, \"query\", infer _Context> ? string : never): OperationReference<InputOf<Query>, OutputOf<Query>, \"query\">"],"tags":[],"source":"apps/src/implementation/live.ts","docs":"ui.md","related":["apps.Operation","apps/client.OperationReference","InputOf","OutputOf"],"examples":["live-inbox"]},{"symbol":"apps/client.QueryTransport","kind":"type","summary":"Host transport must close its subscription when async iteration ends. Results are parsed by the client.","signatures":[],"definition":"export interface QueryTransport {\n readonly subscribe: (descriptor: QueryDescriptor) => Promise<AsyncIterable<unknown>>;\n}","tags":[],"source":"apps/src/contracts/live.ts","docs":"ui.md","related":["apps/client.QueryDescriptor"],"examples":["live-inbox"]},{"symbol":"apps/graphql.GraphqlCatalogOptions","kind":"type","summary":"An endpoint, the account whose schema it is, and the metadata policy.","signatures":[],"definition":"export type GraphqlCatalogOptions = Omit<GraphqlToolsOptions, \"accountId\" | \"headers\"> &\n CatalogCacheOptions &\n CatalogAccount;","tags":[],"source":"apps/src/implementation/graphql-catalog.ts","docs":"integrations.md","related":["apps/graphql.GraphqlToolsOptions","CatalogAccount","CatalogCacheOptions"],"examples":[]},{"symbol":"apps/graphql.GraphqlError","kind":"class","summary":"Safe failures omit upstream bodies. Execution means a valid GraphQL error response, not malformed data.","signatures":[],"definition":"export class GraphqlError extends Schema.TaggedError<GraphqlError>()(\"GraphqlError\", {\n phase: Schema.Literals([\"discover\", \"call\"]),\n reason: Schema.Literals([\n \"request\",\n \"unauthorized\",\n \"invalid_response\",\n \"invalid_input\",\n \"timeout\",\n \"execution\",\n ]),\n status: Schema.optional(Schema.Number),\n}) {}","tags":[],"source":"apps/src/contracts/graphql.ts","docs":"integrations.md","related":[],"examples":[]},{"symbol":"apps/graphql.graphqlRouter","kind":"function","summary":"Lazy tools with optional persistent metadata caching for the selected account.","signatures":["(options: GraphqlCatalogOptions, kinds?: OperationKinds): Promise<RouterDeclaration<unknown, unknown>>"],"tags":[],"source":"apps/src/graphql.ts","docs":"integrations.md","related":["apps.RouterDeclaration","apps/graphql.GraphqlCatalogOptions","apps/graphql.OperationKinds","apps/mcp.OperationKinds","apps/openapi.OperationKinds"],"examples":[]},{"symbol":"apps/graphql.GraphqlToolsOptions","kind":"type","summary":"Endpoint and credential snapshot for one app evaluation.","signatures":[],"definition":"GraphqlToolsOptions = Schema.Struct({\n url: HttpUrl,\n accountId: Schema.optional(AccountId),\n headers: Schema.optional(Schema.Record(Schema.String, Schema.String)),\n signal: Schema.optional(Schema.instanceOf(AbortSignal)),\n timeoutMs: Schema.optional(\n Schema.Int.check(\n Schema.isBetween({ minimum: 1, maximum: defaultGraphqlClientLimits.maxTimeoutMs }),\n ),\n ),\n})","tags":[],"source":"apps/src/contracts/graphql.ts","docs":"integrations.md","related":["AccountId"],"examples":[]},{"symbol":"apps/graphql.OperationKinds","kind":"type","summary":"Explicit corrections for upstream read-only hints or unusual HTTP semantics.","signatures":[],"definition":"export type OperationKinds = Readonly<Record<string, \"query\" | \"mutation\">>;","tags":[],"source":"apps/src/implementation/protocol-operations.ts","docs":"integrations.md","related":[],"examples":[]},{"symbol":"apps/mcp.McpCatalogOptions","kind":"type","summary":"A server, the account whose catalog it is, and the metadata policy for HTTP/SSE sources. A\nmissing cache keeps discovery invocation-local.","signatures":[],"definition":"export type McpCatalogOptions = Omit<McpToolsOptions, \"accountId\" | \"headers\"> &\n CatalogCacheOptions &\n CatalogAccount;","tags":[],"source":"apps/src/implementation/mcp-catalog.ts","docs":"integrations.md","related":["apps/mcp.McpToolsOptions","CatalogAccount","CatalogCacheOptions"],"examples":[]},{"symbol":"apps/mcp.McpCredentialsUnverified","kind":"class","summary":"`mcpHealth` could not show that the server needs the account's credentials, although it accepted\nthem. `anonymous` is what the same check without credentials met: `answered` when it succeeded,\nso a refused key would pass too, or the failure, other than a refusal, that left it undecided.\nOnly app code raises it; the host reports its fixed message, so no host protocol carries it.","signatures":[],"definition":"export class McpCredentialsUnverified extends Schema.TaggedError<McpCredentialsUnverified>()(\n \"McpCredentialsUnverified\",\n { anonymous: Schema.Union([Schema.Literal(\"answered\"), McpError, ProviderError]) },\n) {}","tags":[],"source":"apps/src/contracts/mcp.ts","docs":"integrations.md","related":["apps.ProviderError","apps/mcp.McpError"],"examples":[]},{"symbol":"apps/mcp.McpError","kind":"class","summary":"Safe protocol/transport failure; no raw upstream payloads or credentials. `status` is the HTTP\nstatus a `request` failure was redirected or refused with. Without one, a `request` failure in\nthe `transport` phase never reached the server; in another phase it may be a JSON-RPC error the\nserver answered with. `upstream` is that JSON-RPC error, bounded and with account secrets\nreplaced. A response that is not MCP is `invalid_response`. `session` is set when the refused\nrequest carried the session ID the server issued at initialization.\n\nThese fields describe the failure for whoever reads it. App code can set any of them, so they\nnever show that the failure lies outside Executor.","signatures":[],"definition":"export class McpError extends Schema.TaggedError<McpError>()(\"McpError\", {\n phase: Schema.Literals([\"connect\", \"discover\", \"call\", \"schema\", \"transport\"]),\n reason: Schema.Literals([\n \"request\",\n \"unauthorized\",\n \"invalid_response\",\n \"timeout\",\n \"invalid_input\",\n ]),\n status: Schema.optional(Schema.Number),\n upstream: Schema.optional(UpstreamError),\n session: Schema.optional(Schema.Literal(true)),\n}) {}","tags":[],"source":"apps/src/contracts/mcp.ts","docs":"integrations.md","related":["UpstreamError"],"examples":[]},{"symbol":"apps/mcp.mcpHealth","kind":"function","summary":"A provider `health` check for an MCP server. Pass the check context `health` receives, then the\nserver's `url` and the `headers` that send the account's credentials:\n`health: (check) => mcpHealth(check, { url, headers: headers(check.account) })`.\n\nIt connects with those headers, initializes, and reads the first page of tools, then does the\nsame without any headers. No tool runs. The check passes only when the server accepts the account\nand refuses the attempt without credentials. A refused account throws `ProviderError`, as HTTP\nhelpers do. An unreachable or unusable server throws `McpError`, and a request Executor's network\nrefuses throws `NetworkRefused`. A server that also answers without credentials, or whose answer\nto that attempt is not a refusal, throws `McpCredentialsUnverified`. Each of these errors means\nthe check could not verify the account, and the account form explains why. Send credentials only\nin `headers`; the attempt without them uses the same `url`. The check context's `signal` cancels\nboth attempts, and they share one budget that ends early enough before its `deadline` to report a\nserver that did not answer in time. `timeoutMs` can only shorten that budget.","signatures":["<Auth extends AuthMethods>(check: AccountCheckContext<Auth>, options: McpHealthOptions): Promise<void>"],"tags":[],"source":"apps/src/mcp.ts","docs":"integrations.md","related":["apps.AccountCheckContext","apps.AuthMethods","apps/mcp.McpHealthOptions"],"examples":[]},{"symbol":"apps/mcp.McpHealthOptions","kind":"type","summary":"The server a provider check verifies, and the headers that send the checked account's\ncredentials. The account, signal and deadline come from the check context instead. Both attempts\nshare one budget that ends `mcpHealthReserveMs` before the deadline. `timeoutMs` bounds the whole\ncheck too; it can shorten the budget, never extend it.","signatures":[],"definition":"export type McpHealthOptions = Pick<typeof McpHealthInput.Type, \"url\" | \"headers\" | \"timeoutMs\">;","tags":[],"source":"apps/src/contracts/mcp.ts","docs":"integrations.md","related":[],"examples":[]},{"symbol":"apps/mcp.mcpRouter","kind":"function","summary":"A router over a server's tools for the selected account. Its title, description and\ninstructions come from the server. Kinds override uncertain upstream read-only hints.","signatures":["(options: McpCatalogOptions, kinds?: OperationKinds): Promise<RouterDeclaration<unknown, unknown>>"],"tags":[],"source":"apps/src/mcp.ts","docs":"integrations.md","related":["apps.RouterDeclaration","apps/graphql.OperationKinds","apps/mcp.McpCatalogOptions","apps/mcp.OperationKinds","apps/openapi.OperationKinds"],"examples":[]},{"symbol":"apps/mcp.McpToolContext","kind":"type","summary":"Direct callers can omit interaction capabilities. A server that asks for input then fails explicitly.","signatures":[],"definition":"export interface McpToolContext {\n readonly elicit?: Elicit;\n}","tags":[],"source":"apps/src/contracts/mcp.ts","docs":"integrations.md","related":["apps.Elicit"],"examples":[]},{"symbol":"apps/mcp.McpToolResult","kind":"type","summary":"Native MCP result semantics, and the value every MCP tool call returns. A tool's output\nschema is built from this declaration. Protocol/transport failures use the Effect error channel.","signatures":[],"definition":"McpToolResult = Schema.Struct({\n content: Schema.Array(JsonObject),\n structuredContent: Schema.optionalKey(JsonObject),\n isError: Schema.optionalKey(Schema.Boolean),\n _meta: Schema.optionalKey(JsonObject),\n})","tags":[],"source":"apps/src/contracts/mcp.ts","docs":"integrations.md","related":["apps.JsonObject"],"examples":[]},{"symbol":"apps/mcp.McpToolsOptions","kind":"type","summary":"Server and headers for this selected account. Headers are a credential snapshot.","signatures":[],"definition":"McpToolsOptions = Schema.Struct({\n url: HttpUrl,\n accountId: Schema.optional(AccountId),\n headers: Schema.optional(Schema.Record(Schema.String, Schema.String)),\n signal: Schema.optional(Schema.instanceOf(AbortSignal)),\n timeoutMs: Schema.optional(\n Schema.Number.check(\n Schema.isInt(),\n Schema.isBetween({ minimum: 1, maximum: defaultMcpClientLimits.maxTimeoutMs }),\n ),\n ),\n})","tags":[],"source":"apps/src/contracts/mcp.ts","docs":"integrations.md","related":["AccountId"],"examples":[]},{"symbol":"apps/mcp.OperationKinds","kind":"type","summary":"Explicit corrections for upstream read-only hints or unusual HTTP semantics.","signatures":[],"definition":"export type OperationKinds = Readonly<Record<string, \"query\" | \"mutation\">>;","tags":[],"source":"apps/src/implementation/protocol-operations.ts","docs":"integrations.md","related":[],"examples":[]},{"symbol":"apps/openapi.CredentialBinding","kind":"type","summary":"Map a selected account field to one Swagger credential value.","signatures":[],"definition":"CredentialBinding = Schema.Struct({\n scheme: Schema.String,\n field: Schema.String,\n part: Schema.Literals([\"value\", \"username\", \"password\"]),\n prefix: Schema.String,\n})","tags":[],"source":"apps/src/contracts/openapi.ts","docs":"integrations.md","related":[],"examples":[]},{"symbol":"apps/openapi.isOpenapiTextMedia","kind":"function","summary":"Media returned as text rather than a base64 file. JSON sequences remain unparsed text.","signatures":["(type: string): boolean"],"tags":[],"source":"apps/src/contracts/openapi.ts","docs":"integrations.md","related":[],"examples":[]},{"symbol":"apps/openapi.liveOpenapiRouter","kind":"function","summary":"No I/O during app construction. All accounts share credential-free compilation.","signatures":["(options: OpenapiSourceOptions): RouterDeclaration"],"tags":[],"source":"apps/src/implementation/openapi-source.ts","docs":"integrations.md","related":["apps.RouterDeclaration","apps/openapi.OpenapiSourceOptions"],"examples":[]},{"symbol":"apps/openapi.openapiBinaryResultSchema","kind":"value","summary":"JSON-safe binary result, independent of the host's file storage.","signatures":[],"definition":"const openapiBinaryResultSchema: { readonly [x: string]: Schema.Json; }","tags":[],"source":"apps/src/contracts/openapi.ts","docs":"integrations.md","related":[],"examples":[]},{"symbol":"apps/openapi.OpenapiCompileError","kind":"class","summary":"A safe generation failure. `reason` explains the cause; `skipped` lists the declared operations\nit left out and why, and `origins` the origins operations resolve to when none of them matches\nthe allowed origin. Reading one left-out tool fails with this error for that operation alone.","signatures":[],"definition":"export class OpenapiCompileError extends Schema.TaggedError<OpenapiCompileError>()(\n \"OpenapiCompileError\",\n {\n code: OpenapiCompileErrorCode,\n reason: Schema.String,\n skipped: Schema.optionalKey(Schema.Array(OpenapiSkippedOperation)),\n origins: Schema.optionalKey(Schema.Array(Schema.String)),\n },\n) {\n override get message();\n}","tags":[],"source":"apps/src/contracts/openapi-compile.ts","docs":"integrations.md","related":["apps/openapi.OpenapiSkippedOperation"],"examples":[]},{"symbol":"apps/openapi.OpenapiCompileErrorCode","kind":"value","summary":"Which part of an OpenAPI document could not be compiled into tools.","signatures":[],"definition":"const OpenapiCompileErrorCode: Schema.Literals<readonly [\"server_protocol\", \"server_url\", \"external_reference\", \"circular_reference\", \"schema_keyword\", \"schema_reference\", \"missing_component\", \"openapi_version\", \"auth_helper\", \"auth_missing\", \"operation_path\", \"operation_method\", \"duplicate_operation\", \"server_missing\", \"multiple_hosts\", \"parameter_encoding\", \"parameter_style\", \"request_body\", \"combined_oauth\", \"auth_method\", \"event_stream\", \"input_schema\", \"no_operations\", \"no_supported_operations\", \"invalid_document\", \"source_generation\", \"authoring_reference\"]>","tags":[],"source":"apps/src/contracts/openapi-compile.ts","docs":"integrations.md","related":[],"examples":[]},{"symbol":"apps/openapi.OpenapiError","kind":"class","summary":"Safe failures omit request headers, credentials and upstream body text: the failure message is\nalso recorded in traces. A `request` failure with a status names the response that no declared\nerror matched, or the success response whose body could not be read, by its media type and\ndeclared length.","signatures":[],"definition":"export class OpenapiError extends Schema.TaggedError<OpenapiError>()(\"OpenapiError\", {\n reason: Schema.Literals([\"invalid_definition\", \"invalid_input\", \"request\"]),\n status: Schema.optional(Schema.Number),\n /** Absent only when the definition itself could not be read. */\n operation: Schema.optional(OpenapiFailedOperation),\n contentType: Schema.optional(OpenapiMediaType),\n /** The response's `content-length`, when it declared one. */\n bytes: Schema.optional(Schema.Int.check(Schema.isGreaterThanOrEqualTo(0))),\n}) {}","tags":[],"source":"apps/src/contracts/openapi.ts","docs":"integrations.md","related":["OpenapiFailedOperation"],"examples":[]},{"symbol":"apps/openapi.OpenapiErrorResponse","kind":"type","summary":"Tagged error shapes retain an explicit source for their public message.\nA retained declaration used to validate an HTTP failure before exposing its code.","signatures":[],"definition":"OpenapiErrorResponse = Schema.Struct({\n code: ApiErrorResponse.fields.code,\n status: ApiErrorResponse.fields.status,\n message: Schema.Union([\n Schema.Struct({ source: Schema.Literal(\"body\") }),\n Schema.Struct({ source: Schema.Literal(\"schema\"), value: ApiErrorResponse.fields.message }),\n ]),\n schema: JsonObject,\n})","tags":[],"source":"apps/src/contracts/openapi.ts","docs":"integrations.md","related":["apps.JsonObject"],"examples":[]},{"symbol":"apps/openapi.openapiMediaKind","kind":"function","summary":"Classify request media for JSON-safe tool arguments; Swagger owns wire serialization.","signatures":["(type: string): \"form\" | \"json\" | \"binary\" | \"multipart\" | \"text\""],"tags":[],"source":"apps/src/contracts/openapi.ts","docs":"integrations.md","related":[],"examples":[]},{"symbol":"apps/openapi.OpenapiOperation","kind":"type","summary":"Credential-free operation data emitted by the OpenAPI importer.","signatures":[],"definition":"OpenapiOperation = Schema.Struct({\n /** The tool name after `queries.` or `mutations.`, grouped as `<group>.<leaf>`. */\n name: Schema.NonEmptyString,\n /** The document's operationId, when it declares one. `kinds` overrides are keyed by it. */\n operationId: Schema.optionalKey(Schema.String),\n description: Schema.String,\n method: Schema.Literals([\"GET\", \"POST\", \"PUT\", \"PATCH\", \"DELETE\", \"HEAD\", \"OPTIONS\", \"QUERY\"]),\n path: Schema.String,\n baseUrl: HttpUrl,\n openapi: Schema.String,\n securitySchemes: Schema.Record(Schema.String, JsonObject),\n /** The resolved OpenAPI Operation Object; Executor schemas remain separate. */\n request: Schema.Struct({\n parameters: Schema.Array(OpenapiParameter),\n requestBody: Schema.optionalKey(OpenapiRequestBody),\n security: Schema.Array(Schema.Record(Schema.String, Schema.Array(Schema.String))),\n responses: Schema.Record(Schema.String, JsonObject),\n }),\n /** Streams remain in the metadata but cannot run through a single-result tool call. */\n streaming: Schema.optionalKey(Schema.Literal(true)),\n /** The operation's OpenAPI tags, shown to agents as labels within its router. */\n tags: Schema.optionalKey(Schema.Array(Schema.NonEmptyString)),\n input: JsonObject,\n outputSchema: Schema.optionalKey(JsonObject),\n errorResponses: Schema.optionalKey(Schema.Array(OpenapiErrorResponse)),\n})","tags":[],"source":"apps/src/contracts/openapi.ts","docs":"integrations.md","related":["apps.JsonObject","apps/openapi.OpenapiErrorResponse","apps/openapi.OpenapiParameter"],"examples":[]},{"symbol":"apps/openapi.OpenapiParameter","kind":"type","summary":"Resolved OpenAPI parameter shared by import validation and request construction.","signatures":[],"definition":"OpenapiParameter = Schema.Struct({\n name: Schema.String,\n /** OpenAPI 3.2's `querystring` is the whole query string, serialized from one `content` value. */\n in: Schema.Literals([\"path\", \"query\", \"querystring\", \"header\", \"cookie\"]),\n required: Schema.optionalKey(Schema.Boolean),\n schema: Schema.optionalKey(JsonObject),\n style: Schema.optionalKey(Schema.String),\n explode: Schema.optionalKey(Schema.Boolean),\n allowReserved: Schema.optionalKey(Schema.Boolean),\n allowEmptyValue: Schema.optionalKey(Schema.Boolean),\n content: Schema.optionalKey(JsonObject),\n})","tags":[],"source":"apps/src/contracts/openapi.ts","docs":"integrations.md","related":["apps.JsonObject"],"examples":[]},{"symbol":"apps/openapi.OpenapiRequestBody","kind":"value","summary":"Preserve media schemas and Encoding Objects for Swagger request construction.","signatures":[],"definition":"const OpenapiRequestBody: Schema.Struct<{ readonly required: Schema.optionalKey<Schema.Boolean>; readonly content: Schema.$Record<Schema.String, Schema.Struct<{ readonly schema: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>; readonly encoding: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>; }>>; }>","tags":[],"source":"apps/src/contracts/openapi.ts","docs":"integrations.md","related":[],"examples":[]},{"symbol":"apps/openapi.openapiRouter","kind":"function","summary":"Discover a document's operations as a router for the selected account. Kinds override uncertain\nupstream read-only hints. Mount it under a key, or override its metadata with `router(...)`.","signatures":["(options: OpenapiToolsOptions, kinds?: OperationKinds): Promise<RouterDeclaration<unknown, unknown>>"],"tags":[],"source":"apps/src/openapi.ts","docs":"integrations.md","related":["apps.RouterDeclaration","apps/graphql.OperationKinds","apps/mcp.OperationKinds","apps/openapi.OpenapiToolsOptions","apps/openapi.OperationKinds"],"examples":[]},{"symbol":"apps/openapi.OpenapiSkippedOperation","kind":"type","summary":"A declared operation the importer left out, and why.","signatures":[],"definition":"OpenapiSkippedOperation = Schema.Struct({\n /** The tool name the operation would have; reading that tool reports why it is missing. */\n name: Schema.String,\n /** The HTTP method, such as `GET`. */\n method: Schema.String,\n /** The path as the definition declares it. */\n path: Schema.String,\n code: OpenapiCompileErrorCode,\n reason: Schema.String,\n})","tags":[],"source":"apps/src/contracts/openapi-compile.ts","docs":"integrations.md","related":[],"examples":[]},{"symbol":"apps/openapi.OpenapiSourceOptions","kind":"type","summary":"Static credential placement and destination are reviewed when the app is authored/imported.","signatures":[],"definition":"export interface OpenapiSourceOptions extends Omit<\n OpenapiToolsOptions,\n \"operations\" | \"definitions\"\n> {\n readonly cache: AppCache;\n readonly source: { readonly url: string } | { readonly document: JsonObject };\n /**\n * The origin that may receive credentials, or several origins of one service, such as its API\n * and upload hosts. Operations on any other origin are left out.\n */\n readonly allowedOrigin: string | readonly string[];\n readonly securitySchemes: Readonly<Record<string, JsonObject>>;\n readonly baseUrl?: string;\n /**\n * A path inserted between the server and every operation's path, for a definition that omits a\n * leading segment, such as `/projects/{project}`. Each `{name}` becomes a required string path\n * parameter of every tool, unless the operation already declares it without placing it.\n */\n readonly pathPrefix?: string;\n readonly freshFor?: Duration.Input;\n readonly staleFor?: Duration.Input;\n /**\n * Query or mutation overrides keyed by the document's operationId. An operation without an\n * operationId is keyed by its generated name without the kind, such as `users.getUsers`.\n */\n readonly kinds?: OperationKinds;\n readonly fallbackSecurity?: OpenapiOperation[\"request\"][\"security\"];\n readonly patches?: readonly {\n readonly op: \"add\" | \"remove\" | \"replace\";\n readonly path: string;\n readonly value?: JsonValue;\n }[];\n}","tags":[],"source":"apps/src/implementation/openapi-source.ts","docs":"integrations.md","related":["AppCache","apps.AppCache","apps.JsonObject","apps.JsonValue","apps/graphql.OperationKinds","apps/mcp.OperationKinds","apps/openapi.OpenapiOperation","apps/openapi.OpenapiToolsOptions","apps/openapi.OperationKinds"],"examples":[]},{"symbol":"apps/openapi.OpenapiToolName","kind":"type","summary":"A tool a generated OpenAPI router exposes, read from the definition alone.","signatures":[],"definition":"OpenapiToolName = Schema.Struct({\n /** The tool name relative to the router, as `withApprovals` receives it. */\n name: Schema.String,\n /** The HTTP method, such as `GET`. */\n method: Schema.String,\n /** The request path, including any `pathPrefix`. */\n path: Schema.String,\n operationId: Schema.optionalKey(Schema.String),\n /** After `kinds` (keyed by `operationId`, else `name`); otherwise reading methods are queries. */\n kind: Schema.Literals([\"query\", \"mutation\"]),\n /** Callable without credentials, so every account and a router without one expose it. */\n public: Schema.Boolean,\n /** The `methods` and `oauth` entries whose accounts expose it. */\n methods: Schema.Array(Schema.String),\n})","tags":[],"source":"apps/src/contracts/openapi-compile.ts","docs":"integrations.md","related":[],"examples":[]},{"symbol":"apps/openapi.openapiToolNames","kind":"function","summary":"The tools `liveOpenapiRouter` with the same options exposes, from the definition alone: no\naccount, cache or deployment. Each tool says which `methods` and `oauth` entries expose it, so\nan author can check the names a `withApprovals` policy matches before any account connects.\n`skipped` lists only the operations the compiler left out and why. An operation no configured\n`methods` or `oauth` entry can authorize is missing from `tools` and not listed in `skipped`.\n`fetch` defaults to the global fetch.","signatures":["(options: OpenapiToolNamesOptions): Promise<OpenapiToolNames>"],"tags":[],"source":"apps/src/implementation/openapi-source.ts","docs":"integrations.md","related":["apps/openapi.OpenapiToolNames","apps/openapi.OpenapiToolNamesOptions"],"examples":[]},{"symbol":"apps/openapi.OpenapiToolNames","kind":"type","summary":"Every tool a definition yields for some account, and the operations the compiler left out.","signatures":[],"definition":"OpenapiToolNames = Schema.Struct({\n tools: Schema.Array(OpenapiToolName),\n /**\n * Operations the compiler left out, and why. An operation it imports but no configured `methods`\n * or `oauth` entry can authorize is missing from `tools` and is not listed here.\n */\n skipped: Schema.Array(OpenapiSkippedOperation),\n})","tags":[],"source":"apps/src/contracts/openapi-compile.ts","docs":"integrations.md","related":["apps/openapi.OpenapiSkippedOperation","apps/openapi.OpenapiToolName"],"examples":[]},{"symbol":"apps/openapi.OpenapiToolNamesOptions","kind":"type","summary":"The settings `openapiToolNames` reads: the router's, without an account or cache.","signatures":[],"definition":"export type OpenapiToolNamesOptions = Omit<\n OpenapiSourceOptions,\n \"cache\" | \"account\" | \"parameterDefaults\" | \"freshFor\" | \"staleFor\"\n>;","tags":[],"source":"apps/src/implementation/openapi-source.ts","docs":"integrations.md","related":["apps/openapi.OpenapiSourceOptions"],"examples":[]},{"symbol":"apps/openapi.OpenapiToolsOptions","kind":"type","summary":"Parsed options for one account's evaluation.\nJSON imports are decoded at the helper boundary, without assertions in app source.","signatures":[],"definition":"OpenapiToolsOptions = Schema.Struct({\n operations: Schema.Array(OpenapiOperation),\n /**\n * Component schemas stored once per app and referenced as `#/$defs/<name>`. Operations\n * generated before shared definitions carry their own `$defs` and omit this.\n */\n definitions: Schema.optional(Schema.Record(Schema.String, JsonObject)),\n methods: Schema.Record(Schema.String, Schema.Array(CredentialBinding)),\n oauth: Schema.Array(Schema.String),\n account: Schema.optional(OpenapiAccount),\n parameterDefaults: Schema.optional(OpenapiParameterDefaults),\n signal: Schema.optional(Schema.instanceOf(AbortSignal)),\n fetch: Schema.optional(\n Schema.declare((value): value is typeof globalThis.fetch => typeof value === \"function\"),\n ),\n})","tags":[],"source":"apps/src/contracts/openapi.ts","docs":"integrations.md","related":["apps.JsonObject","apps/openapi.CredentialBinding","apps/openapi.OpenapiOperation","OpenapiAccount","OpenapiParameterDefaults"],"examples":[]},{"symbol":"apps/openapi.OperationKinds","kind":"type","summary":"Explicit corrections for upstream read-only hints or unusual HTTP semantics.","signatures":[],"definition":"export type OperationKinds = Readonly<Record<string, \"query\" | \"mutation\">>;","tags":[],"source":"apps/src/implementation/protocol-operations.ts","docs":"integrations.md","related":[],"examples":[]},{"symbol":"apps/openapi.OperationNameInput","kind":"type","summary":"Group generated OpenAPI tool names as `<group>.<leaf>`, ported from Executor v1's tool paths.\nThe group is the first tag, or the first meaningful path segment. The leaf is the operationId\nwithout a repeated group prefix, or a method-and-path name when there is no operationId.","signatures":[],"definition":"export interface OperationNameInput {\n readonly operationId: string | undefined;\n /** The first non-empty tag. */\n readonly tag: string | undefined;\n readonly method: string;\n readonly path: string;\n}","tags":[],"source":"apps/src/implementation/openapi-names.ts","docs":"integrations.md","related":[],"examples":[]},{"symbol":"apps/openapi.planOperationNames","kind":"function","summary":"Name every input, in input order. Names that collide, whether or not they come from an\noperationId, are refined together: first by the path's version segment, then by the path\nsegments that tell them apart (`GET /items` and `GET /items/{id}` are `items.getItems` and\n`items.getItemsById`), then by the whole path, then by the HTTP method, then by a stable hash.\nRefinement only touches the colliding names, so adding an operation never renames an unrelated\none.","signatures":["<I extends OperationNameInput>(inputs: readonly I[]): (I & { readonly name: string; })[]"],"tags":[],"source":"apps/src/implementation/openapi-names.ts","docs":"integrations.md","related":["apps/openapi.OperationNameInput"],"examples":[]},{"symbol":"apps/operations/approval.always","kind":"function","summary":"Require human approval for every call to the tool.","signatures":["<Input = unknown>(): Approval<Input>"],"tags":[],"source":"apps/src/approval.ts","docs":"tools.md","related":["apps.Approval","apps/operations/approval.Approval"],"examples":["live-inbox"]},{"symbol":"apps/operations/approval.Approval","kind":"type","summary":"Synchronous or async policy, projected from the framework's native contract.","signatures":[],"definition":"export type Approval<Input = unknown> = (\n ...args: Parameters<NativeApproval<Input>>\n) =>\n | Effect.Success<ReturnType<NativeApproval<Input>>>\n | Promise<Effect.Success<ReturnType<NativeApproval<Input>>>>;","tags":[],"source":"apps/src/approval.ts","docs":"tools.md","related":["Approval@apps/src/contracts/approval.ts"],"examples":["live-inbox"]},{"symbol":"apps/operations/approval.ApprovalContext","kind":"type","summary":"Context for one tool's policy. toolInput is the same decoded value passed to run.","signatures":[],"definition":"export interface ApprovalContext<Input = unknown> {\n readonly toolName: string;\n readonly toolInput: Input;\n readonly signal: AbortSignal;\n}","tags":[],"source":"apps/src/contracts/approval.ts","docs":"tools.md","related":[],"examples":["live-inbox"]},{"symbol":"apps/operations/approval.ApprovalDecision","kind":"type","summary":"Approve this call, deny it, or stop for a human decision.\nParsed result of one tool approval policy.","signatures":[],"definition":"ApprovalDecision = Schema.Literals([\"approved\", \"denied\", \"user-approval\"])","tags":[],"source":"apps/src/contracts/approval.ts","docs":"tools.md","related":[],"examples":["live-inbox"]},{"symbol":"apps/operations/approval.never","kind":"function","summary":"Never require human approval for this tool. Product access checks still apply.","signatures":["<Input = unknown>(): Approval<Input>"],"tags":[],"source":"apps/src/approval.ts","docs":"tools.md","related":["apps.Approval","apps/operations/approval.Approval"],"examples":["live-inbox"]},{"symbol":"apps/react.useAppQuery","kind":"function","summary":"Subscribe for the component lifetime. Each mount owns and disposes its registry, including StrictMode remounts.","signatures":["<A, E>(atom: Atom.Atom<AsyncResult.AsyncResult<A, E>>): { data: A | undefined; pending: boolean; error: string | undefined; }"],"tags":[],"source":"apps/src/react.ts","docs":"ui.md","related":[],"examples":["live-inbox"]},{"symbol":"apps/skills.fileSkill","kind":"function","summary":"Parse a bundled standard skill directory into an app capability.","signatures":["(files: readonly SkillFile[]): Promise<{ readonly description: string; readonly name: string; readonly files: readonly { readonly path: string; readonly content: string; }[]; readonly license?: string; readonly compatibility?: string; readonly metadata?: { readonly [x: string]: string; }; readonly \"allowed-tools\"?: string; }>"],"tags":[],"source":"apps/src/skills.ts","docs":"tools.md","related":["apps.SkillFile","apps/skills.SkillFile"],"examples":["live-inbox"]},{"symbol":"apps/skills.folderSkills","kind":"function","summary":"Read skill directories from ctx.files. Omitted path selects skills/; missing folders return [].","signatures":["(options: FolderSkillsOptions): Promise<readonly { readonly description: string; readonly name: string; readonly files: readonly { readonly path: string; readonly content: string; }[]; readonly license?: string; readonly compatibility?: string; readonly metadata?: { readonly [x: string]: string; }; readonly \"allowed-tools\"?: string; }[]>"],"tags":[],"source":"apps/src/skills.ts","docs":"tools.md","related":["apps/skills.FolderSkillsOptions"],"examples":["live-inbox"]},{"symbol":"apps/skills.FolderSkillsOptions","kind":"type","summary":"A folder in the deployed package; omitted path selects skills/. No host filesystem access.","signatures":[],"definition":"export interface FolderSkillsOptions {\n readonly files: readonly SkillFile[];\n readonly path?: string;\n}","tags":[],"source":"apps/src/contracts/skills.ts","docs":"tools.md","related":["apps.SkillFile","apps/skills.SkillFile"],"examples":["live-inbox"]},{"symbol":"apps/skills.githubSkills","kind":"function","summary":"Fetch a GitHub skill collection from one resolved commit. A private repository takes `account`\nand its `token`. Pass `cache: ctx.cache` to reuse the catalog; without it, mutable refs resolve\nagain on each call.","signatures":["(options: GitHubSkillsOptions): Promise<readonly { readonly description: string; readonly name: string; readonly files: readonly { readonly path: string; readonly content: string; }[]; readonly license?: string; readonly compatibility?: string; readonly metadata?: { readonly [x: string]: string; }; readonly \"allowed-tools\"?: string; }[]>"],"tags":[],"source":"apps/src/skills.ts","docs":"tools.md","related":["apps/skills.GitHubSkillsOptions"],"examples":["live-inbox"]},{"symbol":"apps/skills.GitHubSkillsAccount","kind":"type","summary":"Whose access reads the repository. A public repository needs neither field. A private one takes\na GitHub account and its token, sent on every request of this read. The token comes only with\nits account, so the catalog is cached in that account's scope and failures name the account.","signatures":[],"definition":"export type GitHubSkillsAccount = import(\"./cache.ts\").AccountCredential<{\n /**\n * The account's token or its handle, such as `account.fields.token`. Its provider declares\n * hosts `github.com` and `raw.githubusercontent.com`, so app code never holds the value.\n */\n readonly token: string;\n}>;","tags":[],"source":"apps/src/contracts/skills.ts","docs":"tools.md","related":["AccountCredential"],"examples":["live-inbox"]},{"symbol":"apps/skills.GitHubSkillsOptions","kind":"type","summary":"A GitHub repository and an optional immutable commit, tag or branch. With a cache, a branch or\ntag is resolved again once the catalog is past `freshFor`, and each commit's file list is kept.","signatures":[],"definition":"export type GitHubSkillsOptions = SkillTransport &\n SkillCacheOptions &\n GitHubSkillsAccount & {\n readonly repo: string;\n readonly path?: string;\n readonly ref?: string;\n };","tags":[],"source":"apps/src/contracts/skills.ts","docs":"tools.md","related":["apps/skills.GitHubSkillsAccount","apps/skills.SkillCacheOptions","SkillTransport"],"examples":["live-inbox"]},{"symbol":"apps/skills.Skill","kind":"type","summary":"Files use paths relative to this skill directory; reading one never executes its contents.","signatures":[],"definition":"AppSkillSource = Schema.Struct({\n ...AppSkillMetadata.fields,\n files: Schema.Array(SkillFile).check(\n Schema.makeFilter(\n (files) =>\n files.some((file) => file.path === \"SKILL.md\") &&\n new Set(files.map((file) => file.path)).size === files.length,\n ),\n ),\n})","tags":[],"source":"apps/src/contracts/skills.ts","docs":"tools.md","related":["apps.SkillFile","apps/skills.SkillFile"],"examples":["live-inbox"]},{"symbol":"apps/skills.SkillCacheOptions","kind":"type","summary":"Catalog reuse shared by remote skill loaders. Pass `ctx.cache` to keep the loaded catalog;\nwithout it every read fetches the source again. Unlike an MCP tool catalog, a skill catalog\npast `freshFor` is not served while it refreshes: the read first asks the source whether its\npublication changed, so agents never read skills that a refresh replaces moments later.","signatures":[],"definition":"export interface SkillCacheOptions {\n readonly cache?: import(\"./cache.ts\").AppCache;\n /** Reuse the catalog without asking the source for this duration. Defaults to five minutes. */\n readonly freshFor?: import(\"effect\").Duration.Input;\n /**\n * Keep the catalog this long after `freshFor`. A read then confirms it with one request and\n * loads the files again only when the publication changed. Defaults to one day.\n */\n readonly staleFor?: import(\"effect\").Duration.Input;\n}","tags":[],"source":"apps/src/contracts/skills.ts","docs":"tools.md","related":["AppCache","apps.AppCache"],"examples":["live-inbox"]},{"symbol":"apps/skills.SkillDefinitionInvalid","kind":"type","summary":"Invalid selected skill files fail the load. Errors identify the file without disclosing its contents.","signatures":[],"definition":"SkillDefinitionInvalid = ApiError.define({\n tag: \"SkillDefinitionInvalid\",\n status: 400,\n fields: {\n file: SkillFilePath,\n reason: Schema.Literals([\n \"files\",\n \"directory\",\n \"missing-document\",\n \"frontmatter\",\n \"metadata\",\n \"name-mismatch\",\n ]),\n },\n message: ({ file, reason }) => skillDefinitionFailures[reason](file),\n recorded: ({ reason }) => `The app's skill definition is invalid (${reason})`,\n})","tags":[],"source":"apps/src/contracts/skills.ts","docs":"tools.md","related":[],"examples":["live-inbox"]},{"symbol":"apps/skills.SkillFile","kind":"type","summary":"UTF-8 text resource. Reading a resource never executes it.","signatures":[],"definition":"SkillFile = Schema.Struct({ path: SkillFilePath, content: Schema.String })","tags":[],"source":"apps/src/contracts/skills.ts","docs":"tools.md","related":[],"examples":["live-inbox"]},{"symbol":"apps/skills.SkillLoadFailed","kind":"class","summary":"A skill loader failure shown to people. `message` is the explanation they read; write it for\nthem and never include URLs, tokens or response bodies. `reason` selects the title and whether\na retry can help. Custom loaders throw this error to get the same presentation as built-ins.\nWith `source`, `missing` names what the service's answer points to as missing: the `repository`,\nor the branch or tag (`ref`). It may be missing, or not readable with the request's credentials.\nWithout it, the source's settings or the paths it lists are not valid.\nThese fields choose the explanation; they never show that the failure lies outside Executor.","signatures":[],"definition":"export class SkillLoadFailed extends Schema.TaggedError<SkillLoadFailed>()(\"SkillLoadFailed\", {\n reason: Schema.Literals([\n \"source\",\n \"request\",\n \"rate_limited\",\n \"document\",\n \"limit\",\n \"changed\",\n \"encoding\",\n ]),\n // Error instances read an omitted message as \"\", so an empty message means none was given.\n message: Schema.optional(Schema.String.check(Schema.isMaxLength(500))),\n status: Schema.optional(Schema.Int.check(Schema.isBetween({ minimum: 100, maximum: 599 }))),\n missing: Schema.optional(Schema.Literals([\"repository\", \"ref\"])),\n}) {}","tags":[],"source":"apps/src/contracts/skills.ts","docs":"tools.md","related":[],"examples":["live-inbox"]},{"symbol":"apps/skills.skillReader","kind":"function","summary":"Read files for a custom remote skill loader, such as one for GitLab. Reads share one byte\nbudget and reject with the same safe SkillLoadFailed errors as githubSkills, naming `service`,\nor with `NetworkRefused` when Executor's network refuses a request.","signatures":["(options: SkillReaderOptions): { text: (url: string) => Promise<string>; json: (url: string) => Promise<unknown>; }"],"tags":[],"source":"apps/src/skills.ts","docs":"tools.md","related":["apps/skills.SkillReaderOptions"],"examples":["live-inbox"]},{"symbol":"apps/skills.SkillReaderOptions","kind":"type","summary":"A custom loader's transport and the service name shown when a request fails.","signatures":[],"definition":"export interface SkillReaderOptions extends SkillTransport {\n readonly service: string;\n}","tags":[],"source":"apps/src/contracts/skills.ts","docs":"tools.md","related":["SkillTransport"],"examples":["live-inbox"]},{"symbol":"apps/skills.SkillServiceName","kind":"value","summary":"Short display name for a skill source, such as \"GitLab\" or an index host name.","signatures":[],"definition":"const SkillServiceName: Schema.String","tags":[],"source":"apps/src/contracts/skills.ts","docs":"tools.md","related":[],"examples":["live-inbox"]},{"symbol":"apps/skills.wellKnownSkills","kind":"function","summary":"Fetch a published skill index and its text files. Pass `cache: ctx.cache` to reuse the catalog.","signatures":["(options: WellKnownSkillsOptions): Promise<readonly { readonly description: string; readonly name: string; readonly files: readonly { readonly path: string; readonly content: string; }[]; readonly license?: string; readonly compatibility?: string; readonly metadata?: { readonly [x: string]: string; }; readonly \"allowed-tools\"?: string; }[]>"],"tags":[],"source":"apps/src/skills.ts","docs":"tools.md","related":["apps/skills.WellKnownSkillsOptions"],"examples":["live-inbox"]},{"symbol":"apps/skills.WellKnownSkillsOptions","kind":"type","summary":"A published directory index, including its listed skill documents and text references.","signatures":[],"definition":"export interface WellKnownSkillsOptions extends SkillTransport, SkillCacheOptions {\n readonly url: string;\n}","tags":[],"source":"apps/src/contracts/skills.ts","docs":"tools.md","related":["apps/skills.SkillCacheOptions","SkillTransport"],"examples":["live-inbox"]},{"symbol":"AppWorkflow","kind":"type","summary":"Framework-owned native declaration; only the callback crosses the author Promise boundary.","signatures":[],"definition":"export interface AppWorkflow<Input = unknown, Output = unknown> {\n readonly description?: string;\n readonly input: Schema.Decoder<Input>;\n readonly output?: Schema.Decoder<Output>;\n readonly run: (context: WorkflowContext, input: Input) => Effect.Effect<Output, unknown>;\n}","tags":[],"source":"apps/src/contracts/workflows.ts","docs":"tools.md","related":["apps.WorkflowContext"],"examples":["live-inbox"]},{"symbol":"AuthorSchedules","kind":"type","summary":"User schedules run as each member who enables them; app schedules run without a caller, so their\nmutation takes a context of the `\"app\"` scope.","signatures":[],"definition":"type AuthorSchedules<Requirements extends AppRequirements> = Readonly<\n Record<\n string,\n | ScheduleDeclaration<MutationContext<Requirements>, \"user\">\n | ScheduleDeclaration<MutationContext<Requirements, \"app\">, \"app\">\n >\n>;","tags":[],"source":"apps/src/implementation/app.ts","docs":"tools.md","related":["apps.AppRequirements","apps.MutationContext","apps.ScheduleDeclaration"],"examples":["live-inbox"]},{"symbol":"AuthorWebhook@apps/src/implementation/app.ts","kind":"type","summary":"A webhook as authors write it: Promise handlers, author schemas and its source requirement.","signatures":[],"definition":"type AuthorWebhook<Context, Account> = {\n readonly [Key in keyof NativeWebhook<Context>]: Key extends \"config\" | \"state\"\n ? Schema<unknown, boolean>\n : Key extends \"account\"\n ? Account\n : PromiseMethods<NativeWebhook<Context>>[Key];\n};","tags":[],"source":"apps/src/implementation/app.ts","docs":"tools.md","related":["apps.Schema","NativeWebhook","PromiseMethods","Schema"],"examples":["live-inbox"]},{"symbol":"AuthorWebhook@apps/src/index.ts","kind":"type","summary":"","signatures":[],"definition":"type AuthorWebhook<Member, Config, State> = Member extends object\n ? Omit<PromiseMethods<Member>, \"config\" | \"state\"> & {\n readonly config: Config;\n readonly state: State;\n }\n : never;","tags":[],"source":"apps/src/index.ts","docs":"tools.md","related":["PromiseMethods"],"examples":["live-inbox"]},{"symbol":"AuthorWebhooks","kind":"type","summary":"A user-account webhook gets the caller-shaped context; an app-account webhook runs without a\ncaller, so its context has no `user`.","signatures":[],"definition":"type AuthorWebhooks<Requirements extends AppRequirements> = Readonly<\n Record<\n string,\n | AuthorWebhook<\n WebhookContext<Requirements>,\n { readonly user: keyof RequirementSlots<Requirements>[\"user\"] & string }\n >\n | AuthorWebhook<\n WebhookContext<Requirements, \"app\">,\n { readonly app: keyof RequirementSlots<Requirements>[\"app\"] & string }\n >\n >\n>;","tags":[],"source":"apps/src/implementation/app.ts","docs":"tools.md","related":["apps.AppRequirements","apps.WebhookContext","AuthorWebhook@apps/src/implementation/app.ts","RequirementSlots"],"examples":["live-inbox"]},{"symbol":"AuthorWorkflows","kind":"type","summary":"A run started by a caller binds its accounts; one started without a caller, such as by an app\nschedule, has no `user`, so its workflow declares a context of the `\"app\"` scope.","signatures":[],"definition":"type AuthorWorkflows<Requirements extends AppRequirements> = Readonly<\n Record<\n string,\n | WorkflowDeclaration<WorkflowContext<Requirements>>\n | WorkflowDeclaration<WorkflowContext<Requirements, \"app\">>\n >\n>;","tags":[],"source":"apps/src/implementation/app.ts","docs":"tools.md","related":["apps.AppRequirements","apps.WorkflowContext","apps.WorkflowDeclaration"],"examples":["live-inbox"]},{"symbol":"BoundAccounts","kind":"type","summary":"One scope's current accounts, by requirement.","signatures":[],"definition":"export type BoundAccounts<Slots extends AccountSlots> = {\n readonly [Slot in keyof Slots]: AccountsFor<Slots[Slot]>;\n};","tags":[],"source":"apps/src/contracts/app.ts","docs":"tools.md","related":["AccountsFor","apps.AccountSlots"],"examples":["live-inbox"]},{"symbol":"CalendarSchedule","kind":"value","summary":"Calendar schedules use five cron fields and an explicit IANA time zone.","signatures":[],"definition":"const CalendarSchedule: Schema.Struct<{ readonly expression: Schema.NonEmptyString; readonly timezone: Schema.NonEmptyString; }>","tags":[],"source":"apps/src/contracts/schedules.ts","docs":"tools.md","related":[],"examples":["live-inbox"]},{"symbol":"CatalogAccount","kind":"type","summary":"Whose catalog a remote router reads, and the headers, such as credentials, it sends.","signatures":[],"definition":"export type CatalogAccount = AccountCredential<{\n /** Headers for this account's requests, such as its credentials. */\n readonly headers?: Readonly<Record<string, string>>;\n}>;","tags":[],"source":"apps/src/implementation/catalog-cache.ts","docs":"integrations.md","related":["AccountCredential"],"examples":[]},{"symbol":"CatalogCacheOptions","kind":"type","summary":"","signatures":[],"definition":"export interface CatalogCacheOptions {\n /** The app's cache. An account's catalog is kept in that account's scope. */\n readonly cache?: AppCache;\n /** Reuse metadata for this duration. Defaults to five minutes. */\n readonly freshFor?: Duration.Input;\n /** Serve retained metadata while refreshing. Defaults to one day. */\n readonly staleFor?: Duration.Input;\n /** Await a fresh revision at an explicit logical connection or refresh boundary. */\n readonly revalidate?: boolean;\n}","tags":[],"source":"apps/src/implementation/catalog-cache.ts","docs":"integrations.md","related":["AppCache","apps.AppCache"],"examples":[]},{"symbol":"count","kind":"value","summary":"Interval durations use one explicit unit; positive safe integers avoid rounding and overflow.","signatures":[],"definition":"const count: Schema.Int","tags":[],"source":"apps/src/contracts/schedules.ts","docs":"tools.md","related":[],"examples":["live-inbox"]},{"symbol":"declaredAuthorizationQuery","kind":"value","summary":"A declared `authorizationUrl` may carry its own query (RFC 6749 §3.1 keeps it). Each parameter\nis declared once, in the URL or in `authorizationParams`, and never names a host-owned one.","signatures":[],"definition":"const declaredAuthorizationQuery: Filter<{ readonly authorizationUrl: string; readonly authorizationParams?: Readonly<Record<string, string>>; }>","tags":[],"source":"apps/src/contracts/provider.ts","docs":"tools.md","related":[],"examples":["live-inbox"]},{"symbol":"DeclaredContext","kind":"type","summary":"The context a handler declares; one without parameters may run in either scope.","signatures":[],"definition":"type DeclaredContext<Signature, Context> = Signature extends []\n ? AnyScopeMutationContext\n : Signature extends readonly [infer Declared, ...unknown[]]\n ? Declared\n : Context;","tags":[],"source":"apps/src/implementation/operations.ts","docs":"tools.md","related":["apps.AnyScopeMutationContext"],"examples":["live-inbox"]},{"symbol":"displayText","kind":"value","summary":"","signatures":[],"definition":"const displayText: Schema.String","tags":[],"source":"apps/src/contracts/provider.ts","docs":"tools.md","related":[],"examples":["live-inbox"]},{"symbol":"DynamicRouter","kind":"type","summary":"A router whose tools are discovered when read, such as an MCP server or OpenAPI document.\nNames are relative to the router and may contain dots. `readOnly: true` marks a query;\nanything else is a mutation. Resolution never requires listing.","signatures":[],"definition":"export interface DynamicRouter {\n readonly kind: \"dynamic\";\n /** Metadata supplied by the source. Author metadata on the router takes precedence. */\n readonly meta?: () => Effect.Effect<RouterMeta, unknown>;\n readonly list: () => Effect.Effect<readonly HostedTool[], unknown>;\n readonly resolve: (name: string) => Effect.Effect<AppOperation | undefined, unknown>;\n /** Names and descriptions without schemas. Omitted sources reduce list(). */\n readonly summaries?: () => Effect.Effect<readonly HostedToolSummary[], unknown>;\n /** One tool's full metadata without listing. Omitted sources search list(). */\n readonly describe?: (name: string) => Effect.Effect<HostedTool | undefined, unknown>;\n /** Static author metadata, merged over the source's metadata. */\n readonly overrides?: RouterMeta;\n}","tags":[],"source":"apps/src/contracts/router.ts","docs":"tools.md","related":["AppOperation","apps.OperationDescription","HostedToolSummary","RouterMeta"],"examples":["live-inbox"]},{"symbol":"DynamicSkills","kind":"type","summary":"`list` returns complete skills, including their files, added to the static catalog. Every\nskill read loads the full catalog. Names must not repeat across both catalogs.","signatures":[],"definition":"export interface DynamicSkills {\n readonly list: () => Effect.Effect<readonly AppSkillSource[], unknown>;\n}","tags":[],"source":"apps/src/contracts/dynamic-skills.ts","docs":"tools.md","related":["apps.Skill","apps/skills.Skill"],"examples":["live-inbox"]},{"symbol":"EffectDefinition","kind":"type","summary":"Adapt operation and webhook catalogs without evaluating their handlers.","signatures":[],"definition":"export type EffectDefinition<Def> = {\n readonly [Key in keyof Def]: Key extends \"tools\"\n ? NonNullable<NativeDefinition<unknown>[\"tools\"]>\n : Key extends \"workflows\"\n ? Readonly<Record<string, import(\"../contracts/workflows.ts\").AppWorkflow>>\n : Key extends \"schedules\"\n ? NonNullable<NativeDefinition<unknown>[\"schedules\"]>\n : Key extends \"webhooks\"\n ? NonNullable<NativeDefinition<HostWebhookContext>[\"webhooks\"]>\n : Key extends \"skills\"\n ? NonNullable<NativeDefinition<unknown>[\"skills\"]>\n : Key extends \"dynamicSkills\"\n ? NonNullable<NativeDefinition<unknown>[\"dynamicSkills\"]>\n : Def[Key];\n};","tags":[],"source":"apps/src/implementation/app.ts","docs":"tools.md","related":["AppDefinition@apps/src/contracts/app.ts","AppWorkflow","HostWebhookContext"],"examples":["live-inbox"]},{"symbol":"EvaluationContext","kind":"type","summary":"What the app factory receives: the app's accounts, and the caller's when the invocation has a\ncaller. App-scope work evaluates the factory without `user`.","signatures":[],"definition":"export type EvaluationContext<Slots extends ScopedSlots> = BoundContext<Slots, \"app\"> &\n Partial<UserAccountsContext<Slots[\"user\"]>>;","tags":[],"source":"apps/src/contracts/app.ts","docs":"tools.md","related":["AppContext","ScopedSlots","UserAccountsContext"],"examples":["live-inbox"]},{"symbol":"EventsContext","kind":"type","summary":"The emitter for an app's declared events.","signatures":[],"definition":"type EventsContext<Requirements extends AppRequirements> = {\n readonly events: EventEmitter<NonNullable<Requirements[\"events\"]>>;\n};","tags":[],"source":"apps/src/contracts/context.ts","docs":"tools.md","related":["apps.AppRequirements","apps.EventEmitter"],"examples":["live-inbox"]},{"symbol":"Exposed","kind":"type","summary":"A schema marked with how app code sees the field in a provider that declares hosts.","signatures":[],"definition":"export type Exposed<S, E extends FieldExposure = FieldExposure> = S & { readonly [Exposure]: E };","tags":[],"source":"apps/src/implementation/schema.ts","docs":"tools.md","related":["FieldExposure"],"examples":["live-inbox"]},{"symbol":"FailurePhase","kind":"type","summary":"Where a service failed: setting up a session, listing tools, or running one.","signatures":[],"definition":"FailurePhase = Schema.Literals([\"connect\", \"discover\", \"call\"])","tags":[],"source":"apps/src/contracts/failure.ts","docs":"tools.md","related":[],"examples":["live-inbox"]},{"symbol":"FieldExposure","kind":"type","summary":"How app code sees a field of a provider that declares hosts. Unmarked string fields are secret:\napp code receives sealed handles that only the host's outbound network turns into values.\n`plain` fields are not secret. `raw` fields are secret, but app code reads the real value.","signatures":[],"definition":"export type FieldExposure = \"plain\" | \"raw\";","tags":[],"source":"apps/src/contracts/provider.ts","docs":"tools.md","related":[],"examples":["live-inbox"]},{"symbol":"FieldNameOf","kind":"type","summary":"The names of an object schema's fields, which a method's `request` can reference.","signatures":[],"definition":"type FieldNameOf<S> = S extends ObjectSchema<infer F> ? keyof F & string : never;","tags":[],"source":"apps/src/index.ts","docs":"tools.md","related":["apps.ObjectSchema"],"examples":["live-inbox"]},{"symbol":"Handler","kind":"type","summary":"Composition-only view. Specific handler inputs and outputs stay on the inferred definition.","signatures":[],"definition":"type Handler<Context> = (context: Context, input: never) => Effect.Effect<unknown, unknown>;","tags":[],"source":"apps/src/contracts/app.ts","docs":"tools.md","related":[],"examples":["live-inbox"]},{"symbol":"HandlerParameters","kind":"type","summary":"The parameters a mutation's handler declares: its context and input, its context, or none.","signatures":[],"definition":"type HandlerParameters<Context, Input> = [context: Context, input: Input] | [context: Context] | [];","tags":[],"source":"apps/src/implementation/operations.ts","docs":"tools.md","related":[],"examples":["live-inbox"]},{"symbol":"HookContext","kind":"type","summary":"What every webhook context provides; a context with `user` serves user-account webhooks.","signatures":[],"definition":"type HookContext = Pick<BoundContext<ScopedSlots, AccountScope>, \"app\" | \"fetch\" | \"signal\">;","tags":[],"source":"apps/src/contracts/webhooks.ts","docs":"tools.md","related":["AppContext","apps.AccountScope","ScopedSlots"],"examples":["live-inbox"]},{"symbol":"HostedToolSummary","kind":"type","summary":"Catalog entry without schemas. Browsing lists these and reads one full tool on selection.","signatures":[],"definition":"HostedToolSummary = HostedTool.mapFields(\n ({ inputSchema: _input, outputSchema: _output, _meta, ...fields }) => fields,\n)","tags":[],"source":"apps/src/contracts/protocols/current.ts","docs":"tools.md","related":[],"examples":["live-inbox"]},{"symbol":"HostWebhookContext","kind":"type","summary":"A webhook context as the host builds it: an app-account hook's has no `user`.","signatures":[],"definition":"type HostWebhookContext = WebhookContext<AppRequirements, AccountScope> &\n Partial<Pick<WebhookContext, \"user\">>;","tags":[],"source":"apps/src/implementation/app.ts","docs":"tools.md","related":["apps.AccountScope","apps.AppRequirements","apps.WebhookContext"],"examples":["live-inbox"]},{"symbol":"HttpUrl","kind":"value","summary":"Absolute HTTP(S) URL; local HTTP hosts are supported.","signatures":[],"definition":"const HttpUrl: Schema.String","tags":[],"source":"apps/src/contracts/schema.ts","docs":"integrations.md","related":[],"examples":[]},{"symbol":"InputOf","kind":"type","summary":"","signatures":[],"definition":"type InputOf<OperationType> =\n OperationType extends Operation<infer Input, infer _Output, infer _Kind, infer _Context>\n ? Input\n : never;","tags":[],"source":"apps/src/implementation/live.ts","docs":"ui.md","related":["apps.Operation"],"examples":["live-inbox"]},{"symbol":"Interval","kind":"type","summary":"","signatures":[],"definition":"Interval = Schema.Union([\n Schema.Struct({ seconds: count, minutes: absent, hours: absent }),\n Schema.Struct({ seconds: absent, minutes: count, hours: absent }),\n Schema.Struct({ seconds: absent, minutes: absent, hours: count }),\n])","tags":[],"source":"apps/src/contracts/schedules.ts","docs":"tools.md","related":[],"examples":["live-inbox"]},{"symbol":"InvocationServices","kind":"type","summary":"Invocation capabilities every context has, whatever its accounts.","signatures":[],"definition":"export interface InvocationServices {\n /** Explicit app/build-scoped caching. Account-specific loaders opt into forAccount. */\n readonly cache: import(\"./cache.ts\").AppCache;\n /** Text files retained in this deployment. Paths are package-relative, never host filesystem paths. */\n readonly files: readonly SkillFile[];\n /** Read-only run management, bound to this configured app. */\n readonly workflows: WorkflowReads;\n /** Ask for user input during this tool call. Unavailable during discovery and after the invocation closes. */\n readonly elicit: Elicit;\n /**\n * Invocation-owned HTTP requests with trace propagation and host cancellation. It lasts until the\n * invocation and every app cache refresh it started in the background have ended, so a catalog\n * loader given this fetch can refresh after the reply.\n */\n readonly fetch: (input: string | URL | Request, init?: RequestInit) => Promise<Response>;\n /** Host cancellation for this invocation. Pass it to fetch and other interruptible APIs. */\n readonly signal: AbortSignal;\n}","tags":[],"source":"apps/src/contracts/app.ts","docs":"tools.md","related":["AppCache","apps.AppCache","apps.Elicit","apps.SkillFile","apps.WorkflowReads","apps/skills.SkillFile"],"examples":["live-inbox"]},{"symbol":"JsonResponse@apps/src/contracts/http.ts","kind":"type","summary":"The response capability needed by the decoder, already adapted into Effect.","signatures":[],"definition":"export interface JsonResponse {\n readonly status: number;\n readonly json: () => Effect.Effect<unknown, ResponseDecodeError>;\n}","tags":[],"source":"apps/src/contracts/http.ts","docs":"tools.md","related":["apps.ResponseDecodeError"],"examples":["live-inbox"]},{"symbol":"ManualWebhookSetup","kind":"type","summary":"Manual instructions are text, never executable HTML. Signing secrets are exchanged only in the setup page.","signatures":[],"definition":"ManualWebhookSetup = Schema.Struct({\n instructions: Schema.NonEmptyString,\n signingSecret: Schema.Literals([\"executor\", \"provider\"]),\n})","tags":[],"source":"apps/src/contracts/webhook-protocol.ts","docs":"tools.md","related":[],"examples":["live-inbox"]},{"symbol":"maxUpstreamMessageLength","kind":"value","summary":"Longest error message a service stated, as carried across the runtime boundary.","signatures":[],"definition":"const maxUpstreamMessageLength: 1024","tags":[],"source":"apps/src/contracts/failure.ts","docs":"integrations.md","related":[],"examples":[]},{"symbol":"minimumIntervalMilliseconds","kind":"value","summary":"Dispatch coalesces overdue ticks, so sub-minute intervals promise a cadence the runner cannot keep.","signatures":[],"definition":"const minimumIntervalMilliseconds: 60000","tags":[],"source":"apps/src/contracts/schedules.ts","docs":"tools.md","related":[],"examples":["live-inbox"]},{"symbol":"NativeWebhook","kind":"type","summary":"One native webhook definition with the given handler context.","signatures":[],"definition":"type NativeWebhook<Context> = NonNullable<NativeDefinition<Context>[\"webhooks\"]>[string];","tags":[],"source":"apps/src/implementation/app.ts","docs":"tools.md","related":["AppDefinition@apps/src/contracts/app.ts"],"examples":["live-inbox"]},{"symbol":"NetworkRefusal","kind":"type","summary":"Why Executor's app network refused a request.\n- `private_address`: the destination is a private, loopback or internal address, and this\n instance lets apps reach only public addresses.\n- `credential_host`: the request carries a credential handle, and its provider does not allow\n the destination host.\n- `credential_app`: the request carries a credential handle that is not valid for this app.\n- `credential_expired`: the request carries an expired credential handle.\n- `credential_placement`: the request carries a credential handle somewhere its method does not\n place it, such as a body, the URL path or another header, or in a value that does not match\n the method's template exactly.\n- `credential_transport`: the request would send a placed credential over plain HTTP. Placed\n credentials go only over HTTPS, except to a loopback address on an instance whose operator\n lets apps reach private addresses, for local development.\n- `credential_method`: the request carries a credential handle and uses a method that asks the\n service to echo the request back, such as `TRACE`.","signatures":[],"definition":"NetworkRefusal = Schema.Union([\n Schema.Struct({ reason: Schema.Literal(\"private_address\") }),\n Schema.Struct({\n reason: Schema.Literal(\"credential_host\"),\n /** The provider of the credential handle the request carried. */\n provider: Schema.String,\n /** The hosts that provider's credentials may reach; empty when it declares none. */\n allowedHosts: Schema.Array(Schema.String),\n }),\n Schema.Struct({ reason: Schema.Literal(\"credential_app\") }),\n Schema.Struct({\n reason: Schema.Literal(\"credential_expired\"),\n /** The provider of the expired credential handle. */\n provider: Schema.String,\n }),\n Schema.Struct({\n reason: Schema.Literal(\"credential_placement\"),\n /** The provider of the misplaced credential handle. */\n provider: Schema.String,\n /** Where the handle was found, such as `body` or `header x-note`. */\n location: Schema.String,\n }),\n Schema.Struct({\n reason: Schema.Literal(\"credential_transport\"),\n /** The provider of the credential handle the request carried. */\n provider: Schema.String,\n }),\n Schema.Struct({\n reason: Schema.Literal(\"credential_method\"),\n /** The refused HTTP method. */\n method: Schema.String,\n }),\n])","tags":[],"source":"apps/src/contracts/network.ts","docs":"tools.md","related":[],"examples":["live-inbox"]},{"symbol":"NotAString","kind":"class","summary":"Throw when JavaScript turns a placement into a string, so untagged templates fail.","signatures":[],"definition":"class NotAString {\n readonly #described: string;\n constructor(described: string);\n [Symbol.toPrimitive](): never;\n toString(): never;\n toJSON(): never;\n}","tags":[],"source":"apps/src/implementation/placement.ts","docs":"tools.md","related":[],"examples":["live-inbox"]},{"symbol":"OAuth2Config@apps/src/contracts/provider.ts","kind":"type","summary":"OAuth endpoints and protocol choices. Omitted grant means authorization code; clients remain\nhost-owned. Declared endpoints may name an RFC 7009 `revocationUrl`; discovery reads the\nserver's `revocation_endpoint` metadata instead.","signatures":[],"definition":"OAuth2Config = Schema.Union([\n Schema.Struct({\n ...oauthOptions,\n discover: HttpUrl,\n /** Fetch this exact metadata document and verify its issuer against discovery. */\n authorizationServerMetadataUrl: Schema.optionalKey(HttpUrl),\n authorizationUrl: Schema.optionalKey(Schema.Never),\n tokenUrl: Schema.optionalKey(Schema.Never),\n revocationUrl: Schema.optionalKey(Schema.Never),\n scopes: Schema.optionalKey(Schema.Array(Schema.String)),\n }),\n Schema.Struct({\n ...oauthOptions,\n /** Its query is kept; it cannot set protocol parameters or repeat `authorizationParams`. */\n authorizationUrl: HttpUrl,\n tokenUrl: HttpUrl,\n revocationUrl: Schema.optionalKey(HttpUrl),\n scopes: Schema.Array(Schema.String),\n /** RFC 8414 issuer identifier. Declared issuers are checked against the callback's `iss`. */\n issuer: Schema.optionalKey(HttpUrl),\n discover: Schema.optionalKey(Schema.Never),\n authorizationServerMetadataUrl: Schema.optionalKey(Schema.Never),\n }).check(declaredAuthorizationQuery),\n Schema.Struct({\n grant: Schema.Literal(\"client_credentials\"),\n discover: HttpUrl,\n /** Fetch this exact metadata document and verify its issuer against discovery. */\n authorizationServerMetadataUrl: Schema.optionalKey(HttpUrl),\n authorizationUrl: Schema.optionalKey(Schema.Never),\n tokenUrl: Schema.optionalKey(Schema.Never),\n revocationUrl: Schema.optionalKey(Schema.Never),\n scopes: Schema.optionalKey(Schema.Array(Schema.String)),\n ...tokenRequestOptions,\n tokenEndpointAuthMethod: OAuthSecretClientAuth,\n resource: Schema.optionalKey(Schema.NullOr(HttpUrl)),\n }),\n Schema.Struct({\n grant: Schema.Literal(\"client_credentials\"),\n tokenUrl: HttpUrl,\n revocationUrl: Schema.optionalKey(HttpUrl),\n scopes: Schema.Array(Schema.String),\n ...tokenRequestOptions,\n tokenEndpointAuthMethod: OAuthSecretClientAuth,\n resource: Schema.optionalKey(Schema.NullOr(HttpUrl)),\n authorizationUrl: Schema.optionalKey(Schema.Never),\n discover: Schema.optionalKey(Schema.Never),\n authorizationServerMetadataUrl: Schema.optionalKey(Schema.Never),\n }),\n])","tags":[],"source":"apps/src/contracts/provider.ts","docs":"tools.md","related":[],"examples":["live-inbox"]},{"symbol":"OAuth2Method@apps/src/contracts/provider.ts","kind":"class","summary":"OAuth declaration with an explicit schema for app-visible account fields.","signatures":[],"definition":"export class OAuth2Method<Response extends Schema.Decoder<unknown>> extends Data.TaggedClass(\n \"oauth2\",\n)<{\n readonly config: OAuth2Config;\n readonly response: Response;\n /** Response fields marked with `plain()` or `raw()`. */\n readonly exposure?: Readonly<Record<string, FieldExposure>>;\n /** The only places the outbound network sends this method's secret fields; see `Placement`. */\n readonly request?: readonly Placement[];\n}> {}","tags":[],"source":"apps/src/contracts/provider.ts","docs":"tools.md","related":["apps.Placement","FieldExposure","OAuth2Config@apps/src/contracts/provider.ts"],"examples":["live-inbox"]},{"symbol":"oauthOptions","kind":"value","summary":"","signatures":[],"definition":"const oauthOptions: { tokenResponse: Schema.optionalKey<Schema.Struct<{ readonly path: Schema.String; }>>; grant: Schema.optionalKey<Schema.Literal<\"authorization_code\">>; authorizationParams: Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>; tokenEndpointAuthMethod: Schema.optionalKey<Schema.Literals<readonly [\"none\", \"client_secret_post\", \"client_secret_basic\", \"client_secret_basic_raw\"]>>; resource: Schema.optionalKey<Schema.NullOr<Schema.String>>; scopeSeparator: Schema.optionalKey<Schema.String>; tokenRequestFormat: Schema.optionalKey<Schema.Literals<readonly [\"form\", \"json\"]>>; }","tags":[],"source":"apps/src/contracts/provider.ts","docs":"tools.md","related":[],"examples":["live-inbox"]},{"symbol":"OAuthSecretClientAuth","kind":"value","summary":"Machine clients always authenticate; public clients cannot use the client-credentials grant.","signatures":[],"definition":"const OAuthSecretClientAuth: Schema.Literals<readonly [\"client_secret_post\", \"client_secret_basic\", \"client_secret_basic_raw\"]>","tags":[],"source":"apps/src/contracts/provider.ts","docs":"tools.md","related":[],"examples":["live-inbox"]},{"symbol":"OpenapiAccount","kind":"type","summary":"Selected credentials stay in the server runtime, separate from operation metadata.","signatures":[],"definition":"OpenapiAccount = Schema.Struct({\n id: Schema.optional(AccountId),\n method: Schema.String,\n fields: Schema.Record(Schema.String, Schema.Unknown),\n})","tags":[],"source":"apps/src/contracts/openapi.ts","docs":"integrations.md","related":["AccountId"],"examples":[]},{"symbol":"OpenapiFailedOperation","kind":"type","summary":"The operation a failed call addressed: its method and templated path, never parameter values.","signatures":[],"definition":"OpenapiFailedOperation = Schema.Struct({\n method: OpenapiOperation.fields.method,\n path: Schema.String,\n})","tags":[],"source":"apps/src/contracts/openapi.ts","docs":"integrations.md","related":[],"examples":[]},{"symbol":"OpenapiMediaType","kind":"value","summary":"A response media type without parameters, such as `text/html`.","signatures":[],"definition":"const OpenapiMediaType: Schema.String","tags":[],"source":"apps/src/contracts/openapi.ts","docs":"integrations.md","related":[],"examples":[]},{"symbol":"OpenapiParameterDefaults","kind":"type","summary":"Parameter values bound by the selected account, grouped as in tool input. Callers may omit\nthese parameters; an explicit value still takes precedence and the API still authorizes it.","signatures":[],"definition":"OpenapiParameterDefaults = Schema.Struct({\n path: Schema.optionalKey(Schema.Record(Schema.String, Schema.String)),\n query: Schema.optionalKey(Schema.Record(Schema.String, Schema.String)),\n headers: Schema.optionalKey(Schema.Record(Schema.String, Schema.String)),\n})","tags":[],"source":"apps/src/contracts/openapi.ts","docs":"integrations.md","related":[],"examples":[]},{"symbol":"OperationSchedule","kind":"type","summary":"A named trigger attached to the mutation it invokes, including schema-validated arguments.\n`scope: \"app\"` marks an app schedule: one schedule, run without a caller with the app's accounts.\nWithout it, each member who enables the schedule has a copy that runs as them; bundles of\nprotocol 12 and earlier declare only those.","signatures":[],"definition":"OperationSchedule = Schema.Struct({\n name: Schema.NonEmptyString,\n scope: Schema.optionalKey(Schema.Literal(\"app\")),\n timing: ScheduleTiming,\n input: JsonValue,\n})","tags":[],"source":"apps/src/contracts/schedules.ts","docs":"tools.md","related":["apps.JsonValue","ScheduleTiming"],"examples":["live-inbox"]},{"symbol":"OptimisticLocalStore","kind":"type","summary":"Read or replace mounted queries during a synchronous optimistic update. Never mutate returned values.","signatures":[],"definition":"export interface OptimisticLocalStore {\n /** Read the projected result, or undefined if this query is not loaded in this client. */\n getQuery<Input, Output>(\n reference: OperationReference<Input, Output, \"query\">,\n input: NoInfer<Input>,\n ): Output | undefined;\n /** Read all mounted argument variants of an operation, including loading queries. */\n getAllQueries<Input, Output>(\n reference: OperationReference<Input, Output, \"query\">,\n ): readonly { readonly input: Input; readonly value: Output | undefined }[];\n /** Replace a mounted query's projected result. The query's output schema validates the new value. */\n setQuery<Input, Output>(\n reference: OperationReference<Input, Output, \"query\">,\n input: NoInfer<Input>,\n value: NoInfer<Output>,\n ): void;\n}","tags":[],"source":"apps/src/contracts/optimistic.ts","docs":"ui.md","related":["apps/client.OperationReference"],"examples":["live-inbox"]},{"symbol":"OptimisticLocalStore.getAllQueries","kind":"method","summary":"Read all mounted argument variants of an operation, including loading queries.","signatures":["<Input, Output>(reference: OperationReference<Input, Output, \"query\">): readonly { readonly input: Input; readonly value: Output | undefined; }[]"],"tags":[],"source":"apps/src/contracts/optimistic.ts","docs":"ui.md","related":["apps/client.OperationReference","OptimisticLocalStore"],"examples":["live-inbox"]},{"symbol":"OptimisticLocalStore.getQuery","kind":"method","summary":"Read the projected result, or undefined if this query is not loaded in this client.","signatures":["<Input, Output>(reference: OperationReference<Input, Output, \"query\">, input: NoInfer<Input>): Output | undefined"],"tags":[],"source":"apps/src/contracts/optimistic.ts","docs":"ui.md","related":["apps/client.OperationReference","OptimisticLocalStore"],"examples":["live-inbox"]},{"symbol":"OptimisticLocalStore.setQuery","kind":"method","summary":"Replace a mounted query's projected result. The query's output schema validates the new value.","signatures":["<Input, Output>(reference: OperationReference<Input, Output, \"query\">, input: NoInfer<Input>, value: NoInfer<Output>): void"],"tags":[],"source":"apps/src/contracts/optimistic.ts","docs":"ui.md","related":["apps/client.OperationReference","OptimisticLocalStore"],"examples":["live-inbox"]},{"symbol":"OptionsFor","kind":"type","summary":"Emit options typed by the event's filters: required exactly when it declares some.","signatures":[],"definition":"type OptionsFor<F extends Fields> = keyof F extends never\n ? [options?: Omit<EmitOptions<never>, \"filters\">]\n : [options: EmitOptions<ObjectValue<F>> & { readonly filters: ObjectValue<F> }];","tags":[],"source":"apps/src/implementation/events.ts","docs":"tools.md","related":["apps.EmitOptions","apps.Fields","apps.ObjectValue"],"examples":["live-inbox"]},{"symbol":"OutputOf","kind":"type","summary":"","signatures":[],"definition":"type OutputOf<OperationType> =\n OperationType extends Operation<infer _Input, infer Output, infer _Kind, infer _Context>\n ? Output\n : never;","tags":[],"source":"apps/src/implementation/live.ts","docs":"ui.md","related":["apps.Operation"],"examples":["live-inbox"]},{"symbol":"PlacementBase64","kind":"type","summary":"Base64 (RFC 4648, padded) of the UTF-8 bytes of its parts, such as Basic credentials.","signatures":[],"definition":"PlacementBase64 = Schema.Struct({\n base64: Schema.Array(PlacementText).check(Schema.isMinLength(1)),\n})","tags":[],"source":"apps/src/contracts/placement.ts","docs":"tools.md","related":["PlacementText"],"examples":["live-inbox"]},{"symbol":"PlacementField","kind":"type","summary":"A reference to one of the method's own account fields.","signatures":[],"definition":"PlacementField = Schema.Struct({ field: Schema.NonEmptyString })","tags":[],"source":"apps/src/contracts/placement.ts","docs":"tools.md","related":[],"examples":["live-inbox"]},{"symbol":"PlacementHeaderName","kind":"value","summary":"A lowercase HTTP header name (RFC 9110 token).","signatures":[],"definition":"const PlacementHeaderName: Schema.String","tags":[],"source":"apps/src/contracts/placement.ts","docs":"tools.md","related":[],"examples":["live-inbox"]},{"symbol":"PlacementPart","kind":"type","summary":"One part of a value template. Parts concatenate.","signatures":[],"definition":"PlacementPart = Schema.Union([Schema.String, PlacementField, PlacementBase64])","tags":[],"source":"apps/src/contracts/placement.ts","docs":"tools.md","related":["PlacementBase64","PlacementField"],"examples":["live-inbox"]},{"symbol":"PlacementText","kind":"type","summary":"Literal text or a field reference: what base64 may encode. Base64 never nests.","signatures":[],"definition":"PlacementText = Schema.Union([Schema.String, PlacementField])","tags":[],"source":"apps/src/contracts/placement.ts","docs":"tools.md","related":["PlacementField"],"examples":["live-inbox"]},{"symbol":"PromiseMethod","kind":"type","summary":"Project one Effect operation into its author-facing Promise signature.","signatures":[],"definition":"export type PromiseMethod<Method> = Method extends (\n ...args: infer Args\n) => Effect.Effect<infer A, infer _E>\n ? (...args: Args) => Promise<A>\n : Method;","tags":[],"source":"apps/src/implementation/authoring.ts","docs":"tools.md","related":[],"examples":["live-inbox"]},{"symbol":"PromiseMethods","kind":"type","summary":"Project only an object's methods; data and schema types are not recursively rewritten.","signatures":[],"definition":"export type PromiseMethods<T> = { readonly [Key in keyof T]: PromiseMethod<T[Key]> };","tags":[],"source":"apps/src/implementation/authoring.ts","docs":"tools.md","related":["PromiseMethod"],"examples":["live-inbox"]},{"symbol":"Provider","kind":"type","summary":"A provider declaration. The host derives its identity from the declaration, never its check.","signatures":[],"definition":"export class Provider<Auth extends AuthMethods> extends Data.Class<{\n readonly name: string;\n readonly auth: Auth;\n /**\n * The hosts this provider's credentials may be sent to. When present, secret fields reach app\n * code as handles that the outbound network replaces only on requests to these hosts.\n */\n readonly hosts?: readonly string[];\n /**\n * Stored without its method types so a specific provider still fills a general slot. The host\n * binds the account against this provider's methods before running it.\n */\n readonly health?: AccountCheck<AuthMethods>;\n}> {\n /** Declare zero or more accounts from this provider without performing I/O. */\n many(): ManyAccounts<Auth>;\n}","tags":[],"source":"apps/src/contracts/provider.ts","docs":"accounts.md","related":["AccountCheck","apps.AuthMethods","apps.ManyAccounts"],"examples":[]},{"symbol":"Provider.many","kind":"method","summary":"Declare zero or more accounts from this provider without performing I/O.","signatures":["(): ManyAccounts<Auth>"],"tags":[],"source":"apps/src/contracts/provider.ts","docs":"accounts.md","related":["apps.ManyAccounts","Provider"],"examples":[]},{"symbol":"Provider.pipe","kind":"method","summary":"","signatures":["<A>(this: A): A","<A, B = never>(this: A, ab: (_: A) => B): B","<A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C","<A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D","<A, B = never, C = never, D = never, E = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D, de: (_: D) => E): E","<A, B = never, C = never, D = never, E = never, F = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D, de: (_: D) => E, ef: (_: E) => F): F","<A, B = never, C = never, D = never, E = never, F = never, G = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D, de: (_: D) => E, ef: (_: E) => F, fg: (_: F) => G): G","<A, B = never, C = never, D = never, E = never, F = never, G = never, H = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D, de: (_: D) => E, ef: (_: E) => F, fg: (_: F) => G, gh: (_: G) => H): H","<A, B = never, C = never, D = never, E = never, F = never, G = never, H = never, I = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D, de: (_: D) => E, ef: (_: E) => F, fg: (_: F) => G, gh: (_: G) => H, hi: (_: H) => I): I","<A, B = never, C = never, D = never, E = never, F = never, G = never, H = never, I = never, J = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D, de: (_: D) => E, ef: (_: E) => F, fg: (_: F) => G, gh: (_: G) => H, hi: (_: H) => I, ij: (_: I) => J): J","<A, B = never, C = never, D = never, E = never, F = never, G = never, H = never, I = never, J = never, K = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D, de: (_: D) => E, ef: (_: E) => F, fg: (_: F) => G, gh: (_: G) => H, hi: (_: H) => I, ij: (_: I) => J, jk: (_: J) => K): K","<A, B = never, C = never, D = never, E = never, F = never, G = never, H = never, I = never, J = never, K = never, L = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D, de: (_: D) => E, ef: (_: E) => F, fg: (_: F) => G, gh: (_: G) => H, hi: (_: H) => I, ij: (_: I) => J, jk: (_: J) => K, kl: (_: K) => L): L","<A, B = never, C = never, D = never, E = never, F = never, G = never, H = never, I = never, J = never, K = never, L = never, M = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D, de: (_: D) => E, ef: (_: E) => F, fg: (_: F) => G, gh: (_: G) => H, hi: (_: H) => I, ij: (_: I) => J, jk: (_: J) => K, kl: (_: K) => L, lm: (_: L) => M): M","<A, B = never, C = never, D = never, E = never, F = never, G = never, H = never, I = never, J = never, K = never, L = never, M = never, N = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D, de: (_: D) => E, ef: (_: E) => F, fg: (_: F) => G, gh: (_: G) => H, hi: (_: H) => I, ij: (_: I) => J, jk: (_: J) => K, kl: (_: K) => L, lm: (_: L) => M, mn: (_: M) => N): N","<A, B = never, C = never, D = never, E = never, F = never, G = never, H = never, I = never, J = never, K = never, L = never, M = never, N = never, O = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D, de: (_: D) => E, ef: (_: E) => F, fg: (_: F) => G, gh: (_: G) => H, hi: (_: H) => I, ij: (_: I) => J, jk: (_: J) => K, kl: (_: K) => L, lm: (_: L) => M, mn: (_: M) => N, no: (_: N) => O): O","<A, B = never, C = never, D = never, E = never, F = never, G = never, H = never, I = never, J = never, K = never, L = never, M = never, N = never, O = never, P = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D, de: (_: D) => E, ef: (_: E) => F, fg: (_: F) => G, gh: (_: G) => H, hi: (_: H) => I, ij: (_: I) => J, jk: (_: J) => K, kl: (_: K) => L, lm: (_: L) => M, mn: (_: M) => N, no: (_: N) => O, op: (_: O) => P): P","<A, B = never, C = never, D = never, E = never, F = never, G = never, H = never, I = never, J = never, K = never, L = never, M = never, N = never, O = never, P = never, Q = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D, de: (_: D) => E, ef: (_: E) => F, fg: (_: F) => G, gh: (_: G) => H, hi: (_: H) => I, ij: (_: I) => J, jk: (_: J) => K, kl: (_: K) => L, lm: (_: L) => M, mn: (_: M) => N, no: (_: N) => O, op: (_: O) => P, pq: (_: P) => Q): Q","<A, B = never, C = never, D = never, E = never, F = never, G = never, H = never, I = never, J = never, K = never, L = never, M = never, N = never, O = never, P = never, Q = never, R = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D, de: (_: D) => E, ef: (_: E) => F, fg: (_: F) => G, gh: (_: G) => H, hi: (_: H) => I, ij: (_: I) => J, jk: (_: J) => K, kl: (_: K) => L, lm: (_: L) => M, mn: (_: M) => N, no: (_: N) => O, op: (_: O) => P, pq: (_: P) => Q, qr: (_: Q) => R): R","<A, B = never, C = never, D = never, E = never, F = never, G = never, H = never, I = never, J = never, K = never, L = never, M = never, N = never, O = never, P = never, Q = never, R = never, S = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D, de: (_: D) => E, ef: (_: E) => F, fg: (_: F) => G, gh: (_: G) => H, hi: (_: H) => I, ij: (_: I) => J, jk: (_: J) => K, kl: (_: K) => L, lm: (_: L) => M, mn: (_: M) => N, no: (_: N) => O, op: (_: O) => P, pq: (_: P) => Q, qr: (_: Q) => R, rs: (_: R) => S): S","<A, B = never, C = never, D = never, E = never, F = never, G = never, H = never, I = never, J = never, K = never, L = never, M = never, N = never, O = never, P = never, Q = never, R = never, S = never, T = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D, de: (_: D) => E, ef: (_: E) => F, fg: (_: F) => G, gh: (_: G) => H, hi: (_: H) => I, ij: (_: I) => J, jk: (_: J) => K, kl: (_: K) => L, lm: (_: L) => M, mn: (_: M) => N, no: (_: N) => O, op: (_: O) => P, pq: (_: P) => Q, qr: (_: Q) => R, rs: (_: R) => S, st: (_: S) => T): T","<A, B = never, C = never, D = never, E = never, F = never, G = never, H = never, I = never, J = never, K = never, L = never, M = never, N = never, O = never, P = never, Q = never, R = never, S = never, T = never, U = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D, de: (_: D) => E, ef: (_: E) => F, fg: (_: F) => G, gh: (_: G) => H, hi: (_: H) => I, ij: (_: I) => J, jk: (_: J) => K, kl: (_: K) => L, lm: (_: L) => M, mn: (_: M) => N, no: (_: N) => O, op: (_: O) => P, pq: (_: P) => Q, qr: (_: Q) => R, rs: (_: R) => S, st: (_: S) => T, tu: (_: T) => U): U","<A, B = never, C = never, D = never, E = never, F = never, G = never, H = never, I = never, J = never, K = never, L = never, M = never, N = never, O = never, P = never, Q = never, R = never, S = never, T = never, U = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D, de: (_: D) => E, ef: (_: E) => F, fg: (_: F) => G, gh: (_: G) => H, hi: (_: H) => I, ij: (_: I) => J, jk: (_: J) => K, kl: (_: K) => L, lm: (_: L) => M, mn: (_: M) => N, no: (_: N) => O, op: (_: O) => P, pq: (_: P) => Q, qr: (_: Q) => R, rs: (_: R) => S, st: (_: S) => T, tu: (_: T) => U): U"],"tags":[],"source":"../node_modules/.bun/effect@4.0.1/node_modules/effect/dist/Pipeable.d.ts","docs":"accounts.md","related":["Provider"],"examples":[]},{"symbol":"query@apps/src/implementation/operations.ts","kind":"function","summary":"Read operation. External reads are allowed; only database writes are mechanically prohibited.","signatures":["<Input, Output, Context extends AnyContext = QueryContext>(options: OperationOptions<Input, Output>, run: (context: Context, input: Input) => Promise<Output>): Operation<Input, Output, \"query\", Context>"],"tags":[],"source":"apps/src/implementation/operations.ts","docs":"tools.md","related":["AnyContext","apps.Operation","apps.OperationOptions","apps.QueryContext"],"examples":["live-inbox"]},{"symbol":"RequirementSlots","kind":"type","summary":"An app's requirements by scope, as contexts bind them.","signatures":[],"definition":"export type RequirementSlots<Requirements extends AppRequirements> = {\n readonly app: ScopeSlots<Requirements, \"app\">;\n readonly user: ScopeSlots<Requirements, \"user\">;\n};","tags":[],"source":"apps/src/contracts/context.ts","docs":"tools.md","related":["apps.AppRequirements","ScopeSlots"],"examples":["live-inbox"]},{"symbol":"reservedAuthorizationParams","kind":"value","summary":"Parameters the host sets on every authorization request; a declaration cannot replace them.","signatures":[],"definition":"const reservedAuthorizationParams: readonly [\"response_type\", \"client_id\", \"redirect_uri\", \"state\", \"scope\", \"code_challenge\", \"code_challenge_method\", \"nonce\", \"resource\", \"request\", \"request_uri\"]","tags":[],"source":"apps/src/contracts/provider.ts","docs":"tools.md","related":[],"examples":["live-inbox"]},{"symbol":"RestrictedFetchOption","kind":"type","summary":"RequestInit options the app runtime restricts.","signatures":[],"definition":"RestrictedFetchOption = Schema.Literals([\"redirect\", \"cache\", \"integrity\"])","tags":[],"source":"apps/src/contracts/network.ts","docs":"tools.md","related":[],"examples":["live-inbox"]},{"symbol":"RouterMeta","kind":"type","summary":"What an agent should know about a group of tools. `instructions` is published as a skill;\n`tags` describes labels that tools in this router carry, such as OpenAPI tags.","signatures":[],"definition":"RouterMeta = Schema.Struct({\n title: Schema.optionalKey(Schema.String),\n description: Schema.optionalKey(Schema.String),\n instructions: Schema.optionalKey(Schema.String),\n icons: Schema.optionalKey(Schema.Array(RouterIcon)),\n tags: Schema.optionalKey(Schema.Record(Schema.NonEmptyString, Schema.String)),\n})","tags":[],"source":"apps/src/contracts/router.ts","docs":"tools.md","related":["apps.RouterIcon"],"examples":["live-inbox"]},{"symbol":"runFields","kind":"value","summary":"","signatures":[],"definition":"const runFields: { id: Schema.brand<Schema.NonEmptyString, \"wfr\">; app: Schema.NonEmptyString; deployment: Schema.NonEmptyString; workflow: Schema.NonEmptyString; createdAt: Schema.String; }","tags":[],"source":"apps/src/contracts/workflows.ts","docs":"workflows.md","related":[],"examples":[]},{"symbol":"RunsAsApp","kind":"type","summary":"Refuses, with a message the type error shows, a mutation whose handler context has the caller's\n`user`, such as one that declares a context without a type.","signatures":[],"definition":"type RunsAsApp<Context> = [Context] extends [{ readonly user: unknown }]\n ? {\n readonly 'An app schedule runs without a caller: type the handler\\'s context as MutationContext<typeof requirements, \"app\">, pass it as the third type argument, or declare no parameters and pass no type arguments': never;\n }\n : unknown;","tags":[],"source":"apps/src/implementation/schedules.ts","docs":"tools.md","related":[],"examples":["live-inbox"]},{"symbol":"ScheduleTiming","kind":"type","summary":"Validated timing crosses all runtime and persistence boundaries as data.","signatures":[],"definition":"ScheduleTiming = Schema.Union([\n Schema.Struct({\n kind: Schema.Literal(\"interval\"),\n milliseconds: Schema.Int.check(\n Schema.makeFilter((value) => value >= minimumIntervalMilliseconds, {\n message: \"Schedule intervals must be at least 60 seconds\",\n }),\n Schema.isLessThanOrEqualTo(Number.MAX_SAFE_INTEGER),\n ),\n }),\n Schema.Struct({ kind: Schema.Literal(\"cron\"), calendar: CalendarSchedule }),\n])","tags":[],"source":"apps/src/contracts/schedules.ts","docs":"tools.md","related":[],"examples":["live-inbox"]},{"symbol":"Schema","kind":"type","summary":"An author-facing value schema. Effect is never required in author code.","signatures":[],"definition":"export interface Schema<T, Optional extends boolean = false> {\n readonly [Decoder]: EffectSchema.Decoder<T>;\n readonly optionalValue: Optional;\n /** Parse an unknown value; invalid input throws a safe ValidationError. */\n parse(input: unknown): T;\n /** Accept an absent field without changing the original schema. */\n optional(): Schema<T | undefined, true>;\n /** Validate the default now and use it for undefined input. */\n default(value: T): Schema<T> & { readonly hasDefault: true; readonly inputOptional: Optional };\n}","tags":[],"source":"apps/src/implementation/schema.ts","docs":"tools.md","related":[],"examples":["live-inbox"]},{"symbol":"Schema.default","kind":"method","summary":"Validate the default now and use it for undefined input.","signatures":["(value: T): Schema<T> & { readonly hasDefault: true; readonly inputOptional: Optional; }"],"tags":[],"source":"apps/src/implementation/schema.ts","docs":"tools.md","related":["apps.Schema","Schema"],"examples":["live-inbox"]},{"symbol":"Schema.optional","kind":"method","summary":"Accept an absent field without changing the original schema.","signatures":["(): Schema<T | undefined, true>"],"tags":[],"source":"apps/src/implementation/schema.ts","docs":"tools.md","related":["apps.Schema","Schema"],"examples":["live-inbox"]},{"symbol":"Schema.parse","kind":"method","summary":"Parse an unknown value; invalid input throws a safe ValidationError.","signatures":["(input: unknown): T"],"tags":[],"source":"apps/src/implementation/schema.ts","docs":"tools.md","related":["Schema"],"examples":["live-inbox"]},{"symbol":"ScopeAccounts","kind":"type","summary":"The accounts of the webhook's scope. A context with `user` names a user requirement; one of the\n`\"app\"` scope, which has no `user`, an app requirement.","signatures":[],"definition":"type ScopeAccounts<Context extends HookContext> = Context extends {\n readonly user: { readonly accounts: infer Accounts };\n}\n ? Accounts\n : Context[\"app\"][\"accounts\"];","tags":[],"source":"apps/src/contracts/webhooks.ts","docs":"tools.md","related":["HookContext"],"examples":["live-inbox"]},{"symbol":"ScopedSlots","kind":"type","summary":"An app's requirements by scope. A requirement name is unique across both scopes, so a host can\nname one requirement without its scope.","signatures":[],"definition":"export interface ScopedSlots {\n readonly app: AccountSlots;\n readonly user: AccountSlots;\n}","tags":[],"source":"apps/src/contracts/app.ts","docs":"tools.md","related":["apps.AccountSlots"],"examples":["live-inbox"]},{"symbol":"ScopeSlots","kind":"type","summary":"One scope's requirements; none when the app declares none in it.","signatures":[],"definition":"type ScopeSlots<Requirements, Scope extends AccountScope> = Scope extends keyof Requirements\n ? NonNullable<Requirements[Scope]> extends { readonly accounts: infer Slots extends AccountSlots }\n ? Slots\n : Record<never, never>\n : Record<never, never>;","tags":[],"source":"apps/src/contracts/context.ts","docs":"tools.md","related":["apps.AccountScope","apps.AccountSlots"],"examples":["live-inbox"]},{"symbol":"Sealed","kind":"type","summary":"","signatures":[],"definition":"type Sealed<T> = T extends string ? SecretString : T;","tags":[],"source":"apps/src/implementation/schema.ts","docs":"tools.md","related":["apps.SecretString"],"examples":["live-inbox"]},{"symbol":"SecretFields","kind":"type","summary":"Account fields as app code receives them: unmarked string fields are secret.","signatures":[],"definition":"export type SecretFields<F extends Fields> = {\n readonly [Key in keyof ObjectValue<F>]: Key extends keyof F\n ? F[Key] extends Exposed<unknown>\n ? ObjectValue<F>[Key]\n : Sealed<ObjectValue<F>[Key]>\n : ObjectValue<F>[Key];\n};","tags":[],"source":"apps/src/implementation/schema.ts","docs":"tools.md","related":["apps.Fields","apps.ObjectValue","Exposed","Sealed"],"examples":["live-inbox"]},{"symbol":"SecretObject","kind":"type","summary":"An account object without declared fields, such as a default OAuth projection.","signatures":[],"definition":"export type SecretObject<T> = { readonly [Key in keyof T]: Sealed<T[Key]> };","tags":[],"source":"apps/src/implementation/schema.ts","docs":"tools.md","related":["Sealed"],"examples":["live-inbox"]},{"symbol":"SecretsMethod@apps/src/contracts/provider.ts","kind":"class","summary":"A named secrets method; its schema retains the provider's own field names.","signatures":[],"definition":"export class SecretsMethod<Fields extends Schema.Decoder<unknown>> extends Data.TaggedClass(\n \"secrets\",\n)<{\n readonly label: string;\n readonly fields: Fields;\n /** Fields marked with `plain()` or `raw()`. */\n readonly exposure?: Readonly<Record<string, FieldExposure>>;\n /** The only places the outbound network sends this method's secret fields; see `Placement`. */\n readonly request?: readonly Placement[];\n}> {}","tags":[],"source":"apps/src/contracts/provider.ts","docs":"tools.md","related":["apps.Placement","FieldExposure"],"examples":["live-inbox"]},{"symbol":"SelectedAccount","kind":"type","summary":"","signatures":[],"definition":"type SelectedAccount<Context extends HookContext> = {\n [\n Slot in keyof ScopeAccounts<Context>\n ]: ScopeAccounts<Context>[Slot] extends readonly (infer Account)[]\n ? Account\n : ScopeAccounts<Context>[Slot];\n}[keyof ScopeAccounts<Context>];","tags":[],"source":"apps/src/contracts/webhooks.ts","docs":"tools.md","related":["HookContext","ScopeAccounts"],"examples":["live-inbox"]},{"symbol":"skillDefinitionFailures","kind":"value","summary":"","signatures":[],"definition":"const skillDefinitionFailures: { readonly files: (file: string) => string; readonly directory: (file: string) => string; readonly \"missing-document\": (file: string) => string; readonly frontmatter: (file: string) => string; readonly metadata: (file: string) => string; readonly \"name-mismatch\": (file: string) => string; }","tags":[],"source":"apps/src/contracts/skills.ts","docs":"tools.md","related":[],"examples":["live-inbox"]},{"symbol":"SkillFilePath","kind":"value","summary":"Canonical resource path within one skill.","signatures":[],"definition":"const SkillFilePath: Schema.NonEmptyString","tags":[],"source":"apps/src/contracts/skills.ts","docs":"tools.md","related":[],"examples":["live-inbox"]},{"symbol":"SkillTransport","kind":"type","summary":"Invocation-owned transport and cancellation, supplied by the app context.","signatures":[],"definition":"export interface SkillTransport {\n readonly fetch?: typeof globalThis.fetch | undefined;\n readonly signal?: AbortSignal | undefined;\n}","tags":[],"source":"apps/src/contracts/skills.ts","docs":"tools.md","related":[],"examples":["live-inbox"]},{"symbol":"SourceAccount","kind":"type","summary":"","signatures":[],"definition":"type SourceAccount<Context extends HookContext> = Context extends { readonly user: unknown }\n ? { readonly user: keyof ScopeAccounts<Context> & string }\n : { readonly app: keyof ScopeAccounts<Context> & string };","tags":[],"source":"apps/src/contracts/webhooks.ts","docs":"tools.md","related":["HookContext","ScopeAccounts"],"examples":["live-inbox"]},{"symbol":"Sql","kind":"type","summary":"Writable SQL. Outside a transaction every statement commits on its own. `transaction` runs its\ncallback synchronously in one SQLite transaction, so no transaction can stay open while the app\nwaits on anything else; throwing rolls it back. Apps call outside services between transactions.","signatures":[],"definition":"export interface Sql extends SqlReader {\n transaction<T>(work: (tx: SqlTransaction) => Synchronous<T>): T;\n}","tags":[],"source":"apps/src/contracts/sql.ts","docs":"storage.md","related":["apps.SqlReader","apps.SqlTransaction","SqlReader","Synchronous"],"examples":["live-inbox"]},{"symbol":"Sql.exec","kind":"method","summary":"","signatures":["<Row extends SqlRow = SqlRow>(query: string, ...bindings: SqlValue[]): SqlCursor<Row>"],"tags":[],"source":"apps/src/contracts/sql.ts","docs":"storage.md","related":["apps.SqlCursor","apps.SqlRow","apps.SqlValue","Sql","SqlCursor"],"examples":["live-inbox"]},{"symbol":"Sql.transaction","kind":"method","summary":"","signatures":["<T>(work: (tx: SqlTransaction) => Synchronous<T>): T"],"tags":[],"source":"apps/src/contracts/sql.ts","docs":"storage.md","related":["apps.SqlTransaction","Sql","Synchronous"],"examples":["live-inbox"]},{"symbol":"SqlCursor","kind":"type","summary":"The rows of one statement, already read, and what the statement read and wrote.","signatures":[],"definition":"export interface SqlCursor<Row extends SqlRow = SqlRow> extends Iterable<Row> {\n readonly columnNames: readonly string[];\n readonly rowsRead: number;\n readonly rowsWritten: number;\n toArray(): Row[];\n /** The only row. Throws unless the statement returned exactly one. */\n one(): Row;\n}","tags":[],"source":"apps/src/contracts/sql.ts","docs":"storage.md","related":["apps.SqlRow"],"examples":["live-inbox"]},{"symbol":"SqlCursor.[Symbol.iterator]","kind":"method","summary":"","signatures":["(): Iterator<Row, any, any>"],"tags":[],"source":"../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.iterable.d.ts","docs":"storage.md","related":[],"examples":["live-inbox"]},{"symbol":"SqlCursor.one","kind":"method","summary":"The only row. Throws unless the statement returned exactly one.","signatures":["(): Row"],"tags":[],"source":"apps/src/contracts/sql.ts","docs":"storage.md","related":["SqlCursor"],"examples":["live-inbox"]},{"symbol":"SqlCursor.toArray","kind":"method","summary":"","signatures":["(): Row[]"],"tags":[],"source":"apps/src/contracts/sql.ts","docs":"storage.md","related":["SqlCursor"],"examples":["live-inbox"]},{"symbol":"SqlReader","kind":"type","summary":"Read-only SQL. Query tools receive this. A query runs in a transaction that is always rolled\nback, so nothing it changes commits; one that changes rows fails.","signatures":[],"definition":"export interface SqlReader {\n exec<Row extends SqlRow = SqlRow>(query: string, ...bindings: SqlValue[]): SqlCursor<Row>;\n}","tags":[],"source":"apps/src/contracts/sql.ts","docs":"storage.md","related":["apps.SqlCursor","apps.SqlRow","apps.SqlValue","SqlCursor"],"examples":["live-inbox"]},{"symbol":"SqlReader.exec","kind":"method","summary":"","signatures":["<Row extends SqlRow = SqlRow>(query: string, ...bindings: SqlValue[]): SqlCursor<Row>"],"tags":[],"source":"apps/src/contracts/sql.ts","docs":"storage.md","related":["apps.SqlCursor","apps.SqlRow","apps.SqlValue","SqlCursor","SqlReader"],"examples":["live-inbox"]},{"symbol":"StorageContext","kind":"type","summary":"Every handler has `ctx.sql`. The app's database exists once the build has SQL files in\n`migrations/`; before that, any statement fails and says so.","signatures":[],"definition":"type StorageContext<Writable extends boolean> = {\n readonly sql: Writable extends true ? Sql : SqlReader;\n};","tags":[],"source":"apps/src/contracts/context.ts","docs":"tools.md","related":["apps.Sql","apps.SqlReader","Sql","SqlReader"],"examples":["live-inbox"]},{"symbol":"Synchronous","kind":"type","summary":"A transaction callback's result: a Promise means the callback awaited, which is refused.","signatures":[],"definition":"export type Synchronous<T> = T extends PromiseLike<unknown> ? never : T;","tags":[],"source":"apps/src/contracts/sql.ts","docs":"storage.md","related":[],"examples":["live-inbox"]},{"symbol":"template","kind":"value","summary":"","signatures":[],"definition":"const template: Schema.$Array<Schema.Union<readonly [Schema.String, Schema.Struct<{ readonly field: Schema.NonEmptyString; }>, Schema.Struct<{ readonly base64: Schema.$Array<Schema.Union<readonly [Schema.String, Schema.Struct<{ readonly field: Schema.NonEmptyString; }>]>>; }>]>>","tags":[],"source":"apps/src/contracts/placement.ts","docs":"tools.md","related":[],"examples":["live-inbox"]},{"symbol":"tokenRequestOptions","kind":"value","summary":"Options for services that differ from RFC 6749 in how they read requests.","signatures":[],"definition":"const tokenRequestOptions: { scopeSeparator: Schema.optionalKey<Schema.String>; tokenRequestFormat: Schema.optionalKey<Schema.Literals<readonly [\"form\", \"json\"]>>; }","tags":[],"source":"apps/src/contracts/provider.ts","docs":"tools.md","related":[],"examples":["live-inbox"]},{"symbol":"ToolAnnotations","kind":"type","summary":"Advisory tool hints; neither the framework nor these declarations enforce access.","signatures":[],"definition":"ToolAnnotations = Schema.Struct({\n title: Schema.optionalKey(Schema.String),\n readOnlyHint: Schema.optionalKey(Schema.Boolean),\n destructiveHint: Schema.optionalKey(Schema.Boolean),\n idempotentHint: Schema.optionalKey(Schema.Boolean),\n openWorldHint: Schema.optionalKey(Schema.Boolean),\n})","tags":[],"source":"apps/src/contracts/tools.ts","docs":"tools.md","related":[],"examples":["live-inbox"]},{"symbol":"UpstreamError","kind":"type","summary":"The error a service stated in its own response: a JSON-RPC error's code and message, or an\nOAuth Bearer error code and description. Bounded, with the invocation's account secrets replaced.","signatures":[],"definition":"UpstreamError = Schema.Struct({\n code: Schema.Union([\n Schema.Int,\n Schema.String.check(Schema.isMinLength(1), Schema.isMaxLength(128)),\n ]),\n message: Schema.optionalKey(Schema.String.check(Schema.isMaxLength(maxUpstreamMessageLength))),\n})","tags":[],"source":"apps/src/contracts/failure.ts","docs":"integrations.md","related":[],"examples":[]},{"symbol":"UserAccountsContext","kind":"type","summary":"The caller's own linked accounts. App-scope work has no caller, so it has none.","signatures":[],"definition":"export interface UserAccountsContext<Slots extends AccountSlots> {\n readonly user: { readonly accounts: BoundAccounts<Slots> };\n}","tags":[],"source":"apps/src/contracts/app.ts","docs":"tools.md","related":["apps.AccountSlots","BoundAccounts"],"examples":["live-inbox"]},{"symbol":"Webhook@apps/src/contracts/webhooks.ts","kind":"type","summary":"Manual subscriptions collect the state schema in a private browser form instead of invoking provider APIs.","signatures":[],"definition":"export type Webhook<\n Context extends HookContext,\n Config extends Schema.Decoder<unknown>,\n State extends Schema.Decoder<unknown>,\n Error = unknown,\n> =\n | (WebhookLifecycle<Context, Config, State, Error> & { readonly setup?: never })\n | (Omit<WebhookLifecycle<Context, Config, State, Error>, \"register\" | \"unregister\"> & {\n readonly setup: typeof ManualWebhookSetup.Type;\n readonly register?: never;\n readonly unregister?: never;\n });","tags":[],"source":"apps/src/contracts/webhooks.ts","docs":"tools.md","related":["HookContext","WebhookLifecycle"],"examples":["live-inbox"]},{"symbol":"WebhookLifecycle","kind":"type","summary":"Registration, delivery and cleanup share the selected accounts.\nThe host stores account IDs and parsed state, never credentials.\nRegister runs when enabling a subscription, not on every app evaluation.","signatures":[],"definition":"interface WebhookLifecycle<\n Context extends HookContext,\n Config extends Schema.Decoder<unknown>,\n State extends Schema.Decoder<unknown>,\n Error = unknown,\n> {\n readonly account: SourceAccount<Context>;\n readonly config: Config;\n readonly state: State;\n readonly register: (\n context: Context,\n input: {\n readonly config: Config[\"Type\"];\n readonly subscriptionId: string;\n readonly account: SelectedAccount<Context>;\n readonly callbackUrl: string;\n readonly secret: string;\n },\n ) => Effect.Effect<State[\"Type\"], Error>;\n /** Verify the raw request before acting. */\n readonly handle: (\n context: Context,\n input: {\n readonly request: Request;\n readonly config: Config[\"Type\"];\n readonly subscriptionId: string;\n readonly account: SelectedAccount<Context>;\n readonly callbackUrl: string;\n readonly state: State[\"Type\"] | null;\n readonly secret: string;\n },\n ) => Effect.Effect<Response, Error>;\n /** Remove the upstream registration using its saved state and original account. */\n readonly unregister: (\n context: Context,\n input: {\n readonly state: State[\"Type\"] | null;\n readonly config: Config[\"Type\"];\n readonly subscriptionId: string;\n readonly account: SelectedAccount<Context>;\n readonly callbackUrl: string;\n readonly secret: string;\n },\n ) => Effect.Effect<void, Error>;\n}","tags":[],"source":"apps/src/contracts/webhooks.ts","docs":"tools.md","related":["HookContext","SelectedAccount","SourceAccount"],"examples":["live-inbox"]},{"symbol":"WithoutApproval","kind":"type","summary":"An operation declared without an approval.","signatures":[],"definition":"export interface WithoutApproval {\n readonly [ApprovalDeclared]?: never;\n}","tags":[],"source":"apps/src/implementation/operations.ts","docs":"tools.md","related":[],"examples":["live-inbox"]},{"symbol":"WithoutReservedParams","kind":"type","summary":"","signatures":[],"definition":"type WithoutReservedParams<Config> = Config extends unknown\n ? \"authorizationParams\" extends keyof Config\n ? Config & {\n readonly authorizationParams?: { readonly [Key in ReservedAuthorizationParam]?: never };\n }\n : Config\n : never;","tags":[],"source":"apps/src/index.ts","docs":"tools.md","related":["apps.ReservedAuthorizationParam"],"examples":["live-inbox"]},{"symbol":"WorkflowControls","kind":"type","summary":"Mutating handlers may start and terminate runs in their own configured app.","signatures":[],"definition":"export interface WorkflowControls extends WorkflowReads {\n readonly start: (input: {\n readonly workflow: string;\n readonly input: JsonValue;\n readonly key?: string;\n }) => Promise<WorkflowRun>;\n readonly terminate: (input: { readonly run: string }) => Promise<WorkflowRun>;\n}","tags":[],"source":"apps/src/contracts/workflows.ts","docs":"workflows.md","related":["apps.JsonValue","apps.WorkflowReads","WorkflowRun"],"examples":[]},{"symbol":"WorkflowControls.get","kind":"method","summary":"","signatures":["(input: { readonly run: string; }): Promise<WorkflowRun>"],"tags":[],"source":"apps/src/contracts/workflows.ts","docs":"workflows.md","related":["WorkflowControls","WorkflowRun"],"examples":[]},{"symbol":"WorkflowControls.list","kind":"method","summary":"","signatures":["(input?: { readonly workflow?: string; readonly limit?: number; readonly cursor?: string; }): Promise<WorkflowRunPage>"],"tags":[],"source":"apps/src/contracts/workflows.ts","docs":"workflows.md","related":["WorkflowControls","WorkflowRunPage"],"examples":[]},{"symbol":"WorkflowControls.start","kind":"method","summary":"","signatures":["(input: { readonly workflow: string; readonly input: JsonValue; readonly key?: string; }): Promise<WorkflowRun>"],"tags":[],"source":"apps/src/contracts/workflows.ts","docs":"workflows.md","related":["apps.JsonValue","WorkflowControls","WorkflowRun"],"examples":[]},{"symbol":"WorkflowControls.terminate","kind":"method","summary":"","signatures":["(input: { readonly run: string; }): Promise<WorkflowRun>"],"tags":[],"source":"apps/src/contracts/workflows.ts","docs":"workflows.md","related":["WorkflowControls","WorkflowRun"],"examples":[]},{"symbol":"workflowDurationMillis","kind":"function","summary":"Convert portable duration syntax to milliseconds; invalid or overflowing values are rejected.","signatures":["(value: number | string): number | undefined"],"tags":[],"source":"apps/src/contracts/workflows.ts","docs":"tools.md","related":[],"examples":["live-inbox"]},{"symbol":"WorkflowFailureDetail","kind":"value","summary":"Where and why a run failed: the failing step and the error the app's own code raised, its\nmessage bounded and with account secrets replaced. Runs from before these fields existed have none.","signatures":[],"definition":"const WorkflowFailureDetail: { step: Schema.optionalKey<Schema.String>; errorName: Schema.optionalKey<Schema.String>; message: Schema.optionalKey<Schema.String>; }","tags":[],"source":"apps/src/contracts/workflows.ts","docs":"workflows.md","related":[],"examples":[]},{"symbol":"WorkflowRun","kind":"type","summary":"Results are available only on completed runs; failures carry a reason code and app error detail.","signatures":[],"definition":"WorkflowRun = Schema.Union([\n Schema.Struct({\n ...runFields,\n status: Schema.Literals([\"queued\", \"running\", \"waiting\", \"paused\", \"waitingForPause\"]),\n }),\n Schema.Struct({ ...runFields, status: Schema.Literal(\"complete\"), output: WorkflowValue }),\n Schema.Struct({\n ...runFields,\n status: Schema.Literal(\"errored\"),\n error: WorkflowFailure.fields.reason,\n /** The failing step and the app's own error, when the run recorded them. */\n failure: Schema.optionalKey(WorkflowRunFailure),\n }),\n Schema.Struct({ ...runFields, status: Schema.Literal(\"terminated\") }),\n])","tags":[],"source":"apps/src/contracts/workflows.ts","docs":"workflows.md","related":["WorkflowRunFailure"],"examples":[]},{"symbol":"WorkflowRunFailure","kind":"type","summary":"A failed run's recorded step and app error.","signatures":[],"definition":"WorkflowRunFailure = Schema.Struct(WorkflowFailureDetail)","tags":[],"source":"apps/src/contracts/workflows.ts","docs":"workflows.md","related":[],"examples":[]},{"symbol":"WorkflowRunId","kind":"type","summary":"Run identity is opaque and shared by author and SDK interfaces.","signatures":[],"definition":"WorkflowRunId = Schema.NonEmptyString.pipe(Schema.brand(\"wfr\"))","tags":[],"source":"apps/src/contracts/workflows.ts","docs":"workflows.md","related":[],"examples":[]},{"symbol":"WorkflowRunPage","kind":"type","summary":"A bounded run-history page, already scoped to an authorized configured app.","signatures":[],"definition":"WorkflowRunPage = Schema.Struct({\n items: Schema.Array(WorkflowRun),\n next: Schema.optionalKey(WorkflowRunId),\n})","tags":[],"source":"apps/src/contracts/workflows.ts","docs":"workflows.md","related":["WorkflowRun","WorkflowRunId"],"examples":[]},{"symbol":"WorkflowStep","kind":"type","summary":"Explicit durable boundaries; database access passes through registered app operations.","signatures":[],"definition":"export interface WorkflowStep<\n Requirements extends AppRequirements = AppRequirements,\n Scope extends AccountScope = \"user\",\n> {\n do<Output>(\n name: string,\n run: (context: WorkflowStepContext<Requirements, Scope>) => Promise<Output>,\n ): Promise<Output>;\n do<Output>(\n name: string,\n options: WorkflowStepOptions,\n run: (context: WorkflowStepContext<Requirements, Scope>) => Promise<Output>,\n ): Promise<Output>;\n runQuery<Input, Output>(\n name: string,\n operation: Operation<Input, Output, \"query\", QueryContext<Requirements, Scope>>,\n input: NoInfer<Input>,\n options?: WorkflowStepOptions,\n ): Promise<Output>;\n runMutation<Input, Output>(\n name: string,\n operation: Operation<Input, Output, \"mutation\", MutationContext<Requirements, Scope>>,\n input: NoInfer<Input>,\n options?: WorkflowStepOptions,\n ): Promise<Output>;\n readonly sleep: (name: string, duration: WorkflowDuration) => Promise<void>;\n readonly sleepUntil: (name: string, timestamp: number | Date) => Promise<void>;\n}","tags":[],"source":"apps/src/contracts/workflows.ts","docs":"workflows.md","related":["apps.AccountScope","apps.AppRequirements","apps.MutationContext","apps.Operation","apps.QueryContext","apps.WorkflowDuration","apps.WorkflowStepContext","apps.WorkflowStepOptions"],"examples":[]},{"symbol":"WorkflowStep.do","kind":"method","summary":"","signatures":["<Output>(name: string, run: (context: WorkflowStepContext<Requirements, Scope>) => Promise<Output>): Promise<Output>","<Output>(name: string, options: WorkflowStepOptions, run: (context: WorkflowStepContext<Requirements, Scope>) => Promise<Output>): Promise<Output>"],"tags":[],"source":"apps/src/contracts/workflows.ts","docs":"workflows.md","related":["apps.WorkflowStepContext","apps.WorkflowStepOptions","WorkflowStep"],"examples":[]},{"symbol":"WorkflowStep.runMutation","kind":"method","summary":"","signatures":["<Input, Output>(name: string, operation: Operation<Input, Output, \"mutation\", MutationContext<Requirements, Scope>>, input: NoInfer<Input>, options?: WorkflowStepOptions): Promise<Output>"],"tags":[],"source":"apps/src/contracts/workflows.ts","docs":"workflows.md","related":["apps.MutationContext","apps.Operation","apps.WorkflowStepOptions","WorkflowStep"],"examples":[]},{"symbol":"WorkflowStep.runQuery","kind":"method","summary":"","signatures":["<Input, Output>(name: string, operation: Operation<Input, Output, \"query\", QueryContext<Requirements, Scope>>, input: NoInfer<Input>, options?: WorkflowStepOptions): Promise<Output>"],"tags":[],"source":"apps/src/contracts/workflows.ts","docs":"workflows.md","related":["apps.Operation","apps.QueryContext","apps.WorkflowStepOptions","WorkflowStep"],"examples":[]},{"symbol":"WorkflowStep.sleep","kind":"method","summary":"","signatures":["(name: string, duration: WorkflowDuration): Promise<void>"],"tags":[],"source":"apps/src/contracts/workflows.ts","docs":"workflows.md","related":["apps.WorkflowDuration","WorkflowStep"],"examples":[]},{"symbol":"WorkflowStep.sleepUntil","kind":"method","summary":"","signatures":["(name: string, timestamp: number | Date): Promise<void>"],"tags":[],"source":"apps/src/contracts/workflows.ts","docs":"workflows.md","related":["WorkflowStep"],"examples":[]},{"symbol":"WorkflowValue","kind":"value","summary":"Step outputs must fit the engine's persisted JSON result limit.","signatures":[],"definition":"const WorkflowValue: Schema.Codec<Schema.Json, Schema.Json, never, never>","tags":[],"source":"apps/src/contracts/workflows.ts","docs":"workflows.md","related":[],"examples":[]}],"examples":[{"id":"live-inbox","title":"React UI with live app storage","files":[{"path":"index.ts","content":"import {\n query,\n mutation,\n type QueryContext,\n type MutationContext,\n array,\n defineApp,\n object,\n string,\n router,\n} from \"apps\";\nimport { Message } from \"./schema.js\";\n\n/** The `messages` table is created by migrations/0001_messages.sql. */\nconst requirements = {};\n\ntype Row = { id: string; subject: string };\n\nexport const listMessages = query(\n { input: object({}), output: array(Message) },\n async ({ sql }: QueryContext<typeof requirements>) =>\n sql.exec<Row>(\"SELECT id, subject FROM messages ORDER BY created_at DESC LIMIT 100\").toArray(),\n);\nexport const receiveMessage = mutation(\n { input: object({ subject: string(), clientId: string().optional() }), output: Message },\n async ({ sql }: MutationContext<typeof requirements>, message) =>\n sql\n .exec<Row>(\n \"INSERT INTO messages (id, subject, created_at) VALUES (?, ?, ?) RETURNING id, subject\",\n crypto.randomUUID(),\n message.subject,\n Date.now(),\n )\n .one(),\n);\nexport default defineApp(requirements, {\n tools: router({\n listMessages,\n receiveMessage,\n }),\n});\n"},{"path":"schema.ts","content":"/** Shared data shape; safe to import from browser and server code. */\nimport { object, string } from \"apps\";\nexport const Message = object({ id: string(), subject: string() });\n"},{"path":"migrations/0001_messages.sql","content":"CREATE TABLE `messages` (\n\t`id` text PRIMARY KEY NOT NULL,\n\t`subject` text NOT NULL,\n\t`created_at` integer NOT NULL\n);\nCREATE INDEX `messages_created` ON `messages` (`created_at`);\n"},{"path":"ui/main.tsx","content":"import { StrictMode, useState } from \"react\";\nimport { createRoot } from \"react-dom/client\";\nimport { array } from \"apps\";\nimport { createAppClient, mutationReference, queryReference } from \"apps/client\";\nimport { useAppQuery } from \"apps/react\";\nimport type { listMessages, receiveMessage } from \"../index.js\";\nimport { Message } from \"../schema.js\";\nimport \"./style.css\";\n\nconst client = createAppClient();\nconst listRef = queryReference<typeof listMessages>(\"listMessages\");\nconst inbox = client.queryAtom(listRef, {}, array(Message));\nconst receive = client\n .mutation(mutationReference<typeof receiveMessage>(\"receiveMessage\"), Message)\n .withOptimisticUpdate((store, input) => {\n const rows = store.getQuery(listRef, {});\n if (rows !== undefined && input.clientId !== undefined) {\n store.setQuery(\n listRef,\n {},\n [{ id: input.clientId, subject: input.subject }, ...rows].slice(0, 100),\n );\n }\n });\n\nfunction Inbox() {\n const { data, pending, error } = useAppQuery(inbox);\n const [subject, setSubject] = useState(\"\");\n const [saving, setSaving] = useState(false);\n const [failure, setFailure] = useState<string>();\n return (\n <main className=\"max-w-225 min-h-dvh py-0 px-[32px] m-auto flex flex-col max-[540px]:py-0 max-[540px]:px-[20px]\">\n <header className=\"h-20 flex items-center justify-between [border-bottom:1px_solid_#e8e8e2] max-[540px]:h-16.5\">\n <div className=\"identity flex items-center gap-2.5 font-semibold text-[15px]\">\n <span\n className=\"mark w-7.25 h-7.25 [border:1px_solid_#deded7] bg-white grid [place-items:center] rounded-[8px]\"\n aria-hidden=\"true\"\n >\n ↗\n </span>\n <span>Inbox</span>\n </div>\n <span className=\"status text-[#55645b] text-[12px] flex items-center gap-1.5 before:[content:''] before:w-1.5 before:h-1.5 before:bg-[#659674] before:rounded-[50%]\">\n {pending ? \"Connecting…\" : error ? \"Disconnected\" : \"Live\"}\n </span>\n </header>\n <section className=\"intro [padding:64px_0_36px] [&_p]:text-[14px] [&_p]:text-[#85857d] [&_p]:m-0 max-[540px]:pt-10\">\n <span className=\"eyebrow text-[10px] tracking-[0.12em] font-semibold text-[#888880]\">\n YOUR SPACE\n </span>\n <h1 className=\"text-[clamp(26px,_5vw,_36px)] tracking-[-0.04em] font-medium [margin:14px_0_10px]\">\n A little room for ideas.\n </h1>\n <p>Leave a thought. It’s here when you return.</p>\n </section>\n <form\n className=\"bg-white [border:1px_solid_#e2e2db] rounded-[12px] p-[20px] max-[540px]:p-[16px]\"\n onSubmit={async (event) => {\n event.preventDefault();\n if (!subject.trim() || saving) return;\n setSaving(true);\n setFailure(undefined);\n try {\n await receive({ subject: subject.trim(), clientId: crypto.randomUUID() });\n setSubject(\"\");\n } catch {\n setFailure(\"Could not save your message. Try again.\");\n } finally {\n setSaving(false);\n }\n }}\n >\n <label className=\"block text-[12px] [font-weight:550] mb-3\" htmlFor=\"subject\">\n New message\n </label>\n <div className=\"compose flex gap-3 max-[540px]:flex-col\">\n <input\n className=\"min-w-0 flex-1 [border:1px_solid_#e3e3dd] rounded-[7px] py-[11px] px-[12px] bg-[#fafaf8] text-[14px] focus-visible:[outline:2px_solid_#adbdad] focus-visible:outline-offset-[2px]\"\n id=\"subject\"\n value={subject}\n onChange={(e) => setSubject(e.target.value)}\n placeholder=\"What’s on your mind?\"\n autoComplete=\"off\"\n required\n />\n <button\n className=\"border-0 rounded-[7px] bg-[#303d34] text-white py-0 px-[17px] text-[12px] [font-weight:550] cursor-pointer max-[540px]:min-h-10.5 disabled:opacity-50 disabled:cursor-default\"\n disabled={saving || !subject.trim()}\n >\n {saving ? \"Saving…\" : \"Add message\"}\n </button>\n </div>\n {failure && (\n <p className=\" text-[#a74636] text-[13px]\" role=\"alert\">\n {failure}\n </p>\n )}\n </form>\n <section className=\"messages flex-1 pt-9.5\" aria-labelledby=\"messages-title\">\n <div className=\"section-heading flex items-center justify-between pb-3.75 [border-bottom:1px_solid_#e6e6df] [&_h2]:text-[13px] [&_h2]:[font-weight:550] [&_h2]:m-0 [&_span]:text-[11px] [&_span]:text-[#8c8c83]\">\n <h2 id=\"messages-title\">Messages</h2>\n <span>{data?.length ?? 0}</span>\n </div>\n {error && (\n <p className=\" text-[#a74636] text-[13px]\" role=\"alert\">\n {error}\n </p>\n )}\n {pending ? (\n <p className=\"empty py-[64px] px-0 text-center text-[#97978e] [&_>_span]:text-[30px] [&_>_span]:text-[#bdc4b8] [&_h3]:text-[#77776f] [&_h3]:text-[14px] [&_h3]:font-medium [&_h3]:[margin:18px_0_7px] [&_p]:text-[12px] [&_p]:m-0 \">\n Loading your inbox…\n </p>\n ) : data?.length === 0 ? (\n <div className=\"empty py-[64px] px-0 text-center text-[#97978e] [&_>_span]:text-[30px] [&_>_span]:text-[#bdc4b8] [&_h3]:text-[#77776f] [&_h3]:text-[14px] [&_h3]:font-medium [&_h3]:[margin:18px_0_7px] [&_p]:text-[12px] [&_p]:m-0\">\n <span aria-hidden=\"true\">✳</span>\n <h3>A clean slate.</h3>\n <p>Your first message goes here.</p>\n </div>\n ) : (\n <ul className=\"p-0 m-0 [list-style:none]\">\n {data?.map((message) => (\n <li\n className=\"[border-bottom:1px_solid_#e8e8e2] flex gap-3.75 items-start py-[21px] px-[2px]\"\n key={message.id}\n >\n <span className=\"message-icon text-[#80917e]\" aria-hidden=\"true\">\n ↗\n </span>\n <p>{message.subject}</p>\n </li>\n ))}\n </ul>\n )}\n </section>\n <footer className=\"flex justify-between text-[#a1a197] text-[11px] py-[30px] px-0 mt-10\">\n Live inbox <span>Made with Executor</span>\n </footer>\n </main>\n );\n}\n\nconst root = document.getElementById(\"root\");\nif (root === null) throw new Error(\"Missing app root\");\ncreateRoot(root).render(\n <StrictMode>\n <Inbox />\n </StrictMode>,\n);\n"},{"path":"ui/index.html","content":"<!doctype html>\n<html lang=\"en\">\n <head>\n <meta charset=\"utf-8\" />\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n <title>Live inbox</title>\n <script type=\"module\" src=\"./main.tsx\"></script>\n </head>\n <body>\n <div id=\"root\"></div>\n </body>\n</html>\n"},{"path":"ui/style.css","content":"/* Includes Preflight so copied controls do not retain browser default styles. */\n@import \"tailwindcss\";\n\n@layer base {\n :root {\n font-family:\n Inter,\n ui-sans-serif,\n -apple-system,\n BlinkMacSystemFont,\n \"Segoe UI\",\n sans-serif;\n color: #232321;\n background: #fafaf8;\n font-synthesis: none;\n }\n * {\n box-sizing: border-box;\n }\n body {\n margin: 0;\n }\n button {\n font: inherit;\n }\n input {\n font: inherit;\n }\n}\n"},{"path":"ui/assets.d.ts","content":"/** Asset imports the app's UI makes, for the local type check in deploy.md. */\ndeclare module \"*.css\";\n"},{"path":"package.json","content":"{\n \"name\": \"@executor-js/app-live-inbox\",\n \"private\": true,\n \"type\": \"module\",\n \"dependencies\": {\n \"apps\": \"0.0.1-beta.91\",\n \"react\": \"19.3.0\",\n \"react-dom\": \"19.3.0\"\n },\n \"devDependencies\": {\n \"@types/react\": \"19.3.0\",\n \"@types/react-dom\": \"19.3.0\"\n }\n}\n"}]}]}
|