@fungi.computer/oyster 0.6.0 → 0.7.0
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 +132 -78
- package/dist/agent-archive-projection.d.ts +8 -0
- package/dist/agent-archive-projection.js +49 -0
- package/dist/agent-schedules.d.ts +50 -0
- package/dist/agent-schedules.js +17 -0
- package/dist/agents.d.ts +35 -14
- package/dist/agents.js +93 -144
- package/dist/app-builds.d.ts +7 -2
- package/dist/app-builds.js +19 -2
- package/dist/approval-capability.d.ts +1 -1
- package/dist/approval-capability.js +11 -16
- package/dist/approval-home.d.ts +2 -1
- package/dist/approval-home.js +5 -3
- package/dist/apps/catalog.js +1 -1
- package/dist/apps/gate.d.ts +4 -7
- package/dist/apps/gate.js +14 -29
- package/dist/apps/index.d.ts +1 -1
- package/dist/apps/installation.d.ts +4 -42
- package/dist/apps/installation.js +7 -75
- package/dist/apps/operations.js +0 -10
- package/dist/apps/permissions.d.ts +18 -8
- package/dist/apps/permissions.js +7 -1
- package/dist/auth.d.ts +1 -24
- package/dist/auth.js +9 -39
- package/dist/authorization.d.ts +307 -0
- package/dist/authorization.js +542 -0
- package/dist/boot-host-script.js +1 -1
- package/dist/build/build-jobs.d.ts +2 -2
- package/dist/build/candidate-builder.d.ts +2 -0
- package/dist/build/candidate-builder.js +5 -1
- package/dist/build/candidate-cli.js +3 -0
- package/dist/build/candidate-cli.mjs +59 -21
- package/dist/build/job-log.d.ts +23 -0
- package/dist/build/job-log.js +88 -0
- package/dist/build/local-build.d.ts +2 -0
- package/dist/build/local-build.js +11 -9
- package/dist/cloudflare.d.ts +4 -1
- package/dist/cloudflare.js +1 -1
- package/dist/files.js +9 -8
- package/dist/git-admission.d.ts +3 -3
- package/dist/git-admission.js +4 -6
- package/dist/git-door.d.ts +8 -7
- package/dist/git-door.js +18 -17
- package/dist/git.d.ts +1 -1
- package/dist/host.d.ts +33 -40
- package/dist/host.js +153 -272
- package/dist/installation-execution.js +10 -5
- package/dist/installation-operations.d.ts +4 -180
- package/dist/installation-operations.js +1 -5
- package/dist/installation-store-generation.d.ts +4 -1
- package/dist/installation-store-generation.js +59 -6
- package/dist/internal/delivery.js +0 -1
- package/dist/internal/host-gate.d.ts +3 -2
- package/dist/internal/host-gate.js +5 -18
- package/dist/internal/invocation-timing.d.ts +16 -0
- package/dist/internal/invocation-timing.js +23 -0
- package/dist/internal/registry-installations.js +1 -0
- package/dist/invocation.d.ts +15 -14
- package/dist/invocation.js +58 -26
- package/dist/keys.d.ts +2 -19
- package/dist/keys.js +1 -37
- package/dist/mcp.d.ts +15 -27
- package/dist/mcp.js +105 -155
- package/dist/page/agent-browser.d.ts +15 -0
- package/dist/page/agent-browser.js +162 -0
- package/dist/page/app-permissions-port.d.ts +3 -0
- package/dist/page/app-permissions-port.js +43 -0
- package/dist/page/app-permissions.d.ts +11 -0
- package/dist/page/app-permissions.js +296 -0
- package/dist/page/isolated-page-theme.d.ts +2 -0
- package/dist/page/isolated-page-theme.js +11 -0
- package/dist/page/mount.d.ts +2 -13
- package/dist/page/mount.js +7 -93
- package/dist/page-script.d.ts +0 -3
- package/dist/page-script.js +3 -4
- package/dist/standalone/agent-archive-owner.d.ts +42 -0
- package/dist/standalone/agent-archive-owner.js +116 -0
- package/dist/standalone/agent-archive-schedules.d.ts +6 -0
- package/dist/standalone/agent-archive-schedules.js +76 -0
- package/dist/standalone/agent-archive.d.ts +31 -0
- package/dist/standalone/agent-archive.js +67 -0
- package/dist/standalone/agent-computers.d.ts +7 -6
- package/dist/standalone/agent-computers.js +4 -7
- package/dist/standalone/agent-mail.d.ts +2 -2
- package/dist/standalone/agents.d.ts +157 -20
- package/dist/standalone/agents.js +234 -30
- package/dist/standalone/app-builds-binding.js +1 -1
- package/dist/standalone/app-set.js +2 -54
- package/dist/standalone/app-source.d.ts +3 -4
- package/dist/standalone/app-source.js +12 -9
- package/dist/standalone/builds.d.ts +2 -14
- package/dist/standalone/builds.js +15 -13
- package/dist/standalone/computer-fleet.d.ts +4 -4
- package/dist/standalone/computer-fleet.js +13 -42
- package/dist/standalone/computer.d.ts +4 -3
- package/dist/standalone/computer.js +52 -53
- package/dist/standalone/dashboard-approval.d.ts +10 -0
- package/dist/standalone/dashboard-approval.js +66 -0
- package/dist/standalone/machine-link.d.ts +4 -221
- package/dist/standalone/machine-link.js +21 -15
- package/dist/standalone/media.d.ts +1 -0
- package/dist/standalone/media.js +20 -14
- package/dist/standalone/owner-routes.d.ts +16 -0
- package/dist/standalone/owner-routes.js +21 -0
- package/dist/standalone/permission-resources.d.ts +5 -0
- package/dist/standalone/permission-resources.js +31 -0
- package/dist/standalone/registry.d.ts +7 -0
- package/dist/standalone/registry.js +3 -0
- package/dist/standalone/tenancy.d.ts +0 -3
- package/dist/standalone/tenancy.js +2 -5
- package/dist/standalone/worker-routes.d.ts +19 -0
- package/dist/standalone/worker-routes.js +9 -0
- package/dist/standalone/worker.d.ts +1 -1
- package/dist/standalone/worker.js +27 -35
- package/dist/standalone/workflow-binding.d.ts +8 -3
- package/dist/standalone/workflow-binding.js +14 -5
- package/dist/standalone/workflow-git-capture.js +2 -1
- package/dist/standalone/workflow-host.d.ts +8 -103
- package/dist/standalone/workflow-host.js +1 -1
- package/dist/standalone/workflow-node-capture.js +2 -2
- package/dist/standalone/workflow-root-authority.d.ts +1 -1
- package/dist/standalone/workflow-root-authority.js +1 -1
- package/dist/standalone/workflow-schedules.d.ts +14 -5
- package/dist/standalone/workflow-schedules.js +11 -5
- package/dist/standalone/workflow-webhooks.d.ts +4 -18
- package/dist/standalone/workflow-webhooks.js +5 -5
- package/dist/standalone/workflows.d.ts +36 -28
- package/dist/standalone/workflows.js +6 -3
- package/dist/storage-frame.d.ts +6 -6
- package/dist/testing/capabilities.d.ts +7 -6
- package/dist/testing/capabilities.js +3 -6
- package/dist/testing/installation.d.ts +0 -1
- package/dist/testing/installation.js +2 -5
- package/dist/workers-git.d.ts +12 -4
- package/dist/workers-git.js +38 -35
- package/dist/workers.d.ts +9 -1
- package/dist/workers.js +44 -8
- package/dist/workflows.d.ts +2 -0
- package/dist/workflows.js +1 -0
- package/docs/api/README.md +7 -0
- package/docs/api/agent-schedules.md +175 -0
- package/docs/api/agents.md +34 -13
- package/docs/api/app-storage.md +1 -1
- package/docs/api/apps.md +323 -225
- package/docs/api/auth.md +0 -55
- package/docs/api/authorization.md +1300 -0
- package/docs/api/build.md +40 -37
- package/docs/api/cloudflare.md +3 -3
- package/docs/api/git.md +20 -11
- package/docs/api/host.md +64 -192
- package/docs/api/index.md +1 -1
- package/docs/api/invocation.md +14 -14
- package/docs/api/keys.md +1 -98
- package/docs/api/mcp.md +43 -40
- package/docs/api/modules.md +2 -0
- package/docs/api/page/mount.md +16 -19
- package/docs/api/workers-git.md +46 -12
- package/docs/api/workers.md +124 -235
- package/package.json +39 -20
- package/dist/page/computer-target.d.ts +0 -3
- package/dist/page/computer-target.js +0 -9
- package/dist/standalone/channel-session-door.d.ts +0 -4
- package/dist/standalone/channel-session-door.js +0 -72
package/dist/git-door.d.ts
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
/** Smart-HTTP routing; all writes enter the same admitted Git path. */
|
|
2
|
-
import { Hono } from "hono";
|
|
3
1
|
import type { GitWriter } from "@fungi.computer/agar/git";
|
|
4
2
|
import type { AdmittedGit } from "./git-admission.js";
|
|
5
3
|
/** The repository and access one smart-HTTP request names. */
|
|
@@ -11,12 +9,10 @@ export type GitDoorTarget = Readonly<{
|
|
|
11
9
|
/** Identity and selected installation come only from host-held ports. */
|
|
12
10
|
export type GitDoorHost = Readonly<{
|
|
13
11
|
/** Resolve a host-authenticated actor for this exact repository and scope;
|
|
14
|
-
* null
|
|
12
|
+
* null refuses the request. */
|
|
15
13
|
authenticate(request: Request, target: GitDoorTarget): Promise<Extract<GitWriter, {
|
|
16
14
|
kind: "actor";
|
|
17
15
|
}> | null>;
|
|
18
|
-
/** Decide whether anonymous reads may reach the selected installation. */
|
|
19
|
-
isPublic(installationId: string): Promise<boolean>;
|
|
20
16
|
/** Resolve the installation's admitted path without exposing provider credentials. */
|
|
21
17
|
git(installationId: string): Promise<AdmittedGit | null>;
|
|
22
18
|
}>;
|
|
@@ -31,5 +27,10 @@ export declare function smartHttpExchange(method: string, url: URL, suffix: stri
|
|
|
31
27
|
export declare function gitDoorRoute(method: string, url: URL): (GitDoorTarget & Readonly<{
|
|
32
28
|
advertise: boolean;
|
|
33
29
|
}>) | null;
|
|
34
|
-
/**
|
|
35
|
-
export
|
|
30
|
+
/** One smart-HTTP exchange's answer; the host declares the route it serves at. */
|
|
31
|
+
export type GitDoor = Readonly<{
|
|
32
|
+
/** Answer one smart-HTTP request at `/git/...`; anything else is 404. */
|
|
33
|
+
fetch: (request: Request) => Promise<Response>;
|
|
34
|
+
}>;
|
|
35
|
+
/** One smart-HTTP door with no provider credentials or alternate write branch. */
|
|
36
|
+
export declare function createGitDoor(host: GitDoorHost): GitDoor;
|
package/dist/git-door.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/** Smart-HTTP routing; all writes enter the same admitted Git path. */
|
|
2
|
-
import { Hono } from "hono";
|
|
3
2
|
import { z } from "zod";
|
|
4
3
|
const route = /^\/git\/([a-zA-Z0-9_-]{1,256})\/([a-zA-Z0-9._-]{1,128}?)(?:\.git)?\/(info\/refs|git-upload-pack|git-receive-pack)$/u;
|
|
5
4
|
/** One smart-HTTP exchange: the method, `service` query and path suffix a
|
|
@@ -59,34 +58,37 @@ async function bodyOf(request) {
|
|
|
59
58
|
}
|
|
60
59
|
return body;
|
|
61
60
|
}
|
|
62
|
-
|
|
61
|
+
const text = (body, status) => new Response(body, {
|
|
62
|
+
status,
|
|
63
|
+
headers: { "Content-Type": "text/plain; charset=UTF-8" },
|
|
64
|
+
});
|
|
65
|
+
/** One smart-HTTP door with no provider credentials or alternate write branch. */
|
|
63
66
|
export function createGitDoor(host) {
|
|
64
|
-
const
|
|
65
|
-
|
|
66
|
-
const routed = gitDoorRoute(context.req.method, new URL(context.req.url));
|
|
67
|
+
const smartHttp = async (incoming) => {
|
|
68
|
+
const routed = gitDoorRoute(incoming.method, new URL(incoming.url));
|
|
67
69
|
if (routed === null)
|
|
68
|
-
return
|
|
70
|
+
return text("Not a git route", 404);
|
|
69
71
|
const { advertise, ...target } = routed;
|
|
70
72
|
const { installationId, repository } = target;
|
|
71
73
|
const writing = target.scope === "write";
|
|
72
|
-
const writer = await host.authenticate(
|
|
73
|
-
if (writer === null
|
|
74
|
+
const writer = await host.authenticate(incoming, target);
|
|
75
|
+
if (writer === null)
|
|
74
76
|
return new Response("A key is required", {
|
|
75
77
|
status: 401,
|
|
76
78
|
headers: { "WWW-Authenticate": 'Basic realm="Oyster git"' },
|
|
77
79
|
});
|
|
78
80
|
const git = await host.git(installationId);
|
|
79
81
|
if (git === null)
|
|
80
|
-
return
|
|
81
|
-
if (
|
|
82
|
-
return
|
|
83
|
-
const body = advertise ? null : await bodyOf(
|
|
82
|
+
return text("Installation Git unavailable", 403);
|
|
83
|
+
if (incoming.headers.get("content-encoding") !== null)
|
|
84
|
+
return text("Compressed Git requests are not supported", 400);
|
|
85
|
+
const body = advertise ? null : await bodyOf(incoming);
|
|
84
86
|
if (body instanceof Response)
|
|
85
87
|
return body;
|
|
86
88
|
const headers = {};
|
|
87
89
|
for (const name of ["content-type", "accept", "git-protocol"]) {
|
|
88
|
-
const value =
|
|
89
|
-
if (value !==
|
|
90
|
+
const value = incoming.headers.get(name);
|
|
91
|
+
if (value !== null)
|
|
90
92
|
headers[name] = value;
|
|
91
93
|
}
|
|
92
94
|
const request = {
|
|
@@ -95,7 +97,7 @@ export function createGitDoor(host) {
|
|
|
95
97
|
headers,
|
|
96
98
|
body,
|
|
97
99
|
};
|
|
98
|
-
const response = writing
|
|
100
|
+
const response = writing
|
|
99
101
|
? await git.push(writer, repository, request)
|
|
100
102
|
: await git.read(writer, repository, request);
|
|
101
103
|
return new Response(new Uint8Array(response.body), {
|
|
@@ -103,6 +105,5 @@ export function createGitDoor(host) {
|
|
|
103
105
|
headers: response.headers,
|
|
104
106
|
});
|
|
105
107
|
};
|
|
106
|
-
|
|
107
|
-
return door;
|
|
108
|
+
return { fetch: smartHttp };
|
|
108
109
|
}
|
package/dist/git.d.ts
CHANGED
|
@@ -23,7 +23,7 @@ export declare function signStandardWebhook(secret: string, id: string, timestam
|
|
|
23
23
|
/** Headers for one signed delivery: Standard Webhooks plus `X-Hub-Signature-256`. */
|
|
24
24
|
export declare function webhookHeaders(secret: string, id: string, type: string, timestamp: number, body: string): Promise<Record<string, string>>;
|
|
25
25
|
export { createGitDoor, gitDoorRoute, smartHttpExchange } from "./git-door.js";
|
|
26
|
-
export type { GitDoorHost, GitDoorTarget } from "./git-door.js";
|
|
26
|
+
export type { GitDoor, GitDoorHost, GitDoorTarget } from "./git-door.js";
|
|
27
27
|
export { createAdmittedGit, createInstallationGitAdmission, } from "./git-admission.js";
|
|
28
28
|
export type { AdmittedGit, GitStore, GitGrants, GitPolicy, GitJournal, } from "./git-admission.js";
|
|
29
29
|
export { createGitPushJournal } from "./git-journal.js";
|
package/dist/host.d.ts
CHANGED
|
@@ -13,13 +13,14 @@ import { type AppGitPushFact, type GitPushQuestion, type GitPushVerdict, type Gi
|
|
|
13
13
|
import { type GuestLimits } from "./guest-policy.js";
|
|
14
14
|
import { type InvocationFacts } from "./invocation.js";
|
|
15
15
|
export type { GuestLimits } from "./guest-policy.js";
|
|
16
|
-
import { Hono } from "hono";
|
|
17
16
|
import { type TimingVariables } from "hono/timing";
|
|
18
17
|
import * as Schema from "effect/Schema";
|
|
19
18
|
import { type BackgroundSyncRefusal } from "@fungi.computer/puffball/background-replay";
|
|
20
19
|
import { type Installation, type InstallationReader } from "./apps/installation.js";
|
|
20
|
+
import { type ResourceOption } from "./apps/permissions.js";
|
|
21
21
|
import type { AppToolPolicy } from "./apps/tools.js";
|
|
22
|
-
import {
|
|
22
|
+
import type { LiveOysterKey } from "./keys.js";
|
|
23
|
+
import { type ServedTable, type RouteDeclaration, type Routes } from "./authorization.js";
|
|
23
24
|
import { type AppMethodReply } from "@fungi.computer/agar/backend";
|
|
24
25
|
import type { AppCapabilityId, HostActor } from "@fungi.computer/puffball/app";
|
|
25
26
|
import { type CapabilityDescriptor } from "./capability-descriptor.js";
|
|
@@ -33,26 +34,6 @@ import type { AdmittedGit } from "./git-admission.js";
|
|
|
33
34
|
import { type PageAssetLoader } from "./page-assets.js";
|
|
34
35
|
import { type AppApi } from "@fungi.computer/puffball";
|
|
35
36
|
export { ReleaseError, defaultAssetPolicy, parseRelease, resolveBackend, sha256, verifyRelease, type ArtifactStore, type VerifiedObjectCache, type VerifiedRelease, } from "./release.js";
|
|
36
|
-
/**
|
|
37
|
-
* The anonymous reader of a public installation. The host admits it only when
|
|
38
|
-
* authentication refuses; it reaches that App's page and its `read` methods.
|
|
39
|
-
*/
|
|
40
|
-
export type OysterVisitor = Readonly<{
|
|
41
|
-
actor: Readonly<{
|
|
42
|
-
kind: "visitor";
|
|
43
|
-
}>;
|
|
44
|
-
}>;
|
|
45
|
-
/** Who an admitted request acts for: an authenticated tenant principal or the visitor. */
|
|
46
|
-
export type OysterPrincipal = TenantPrincipal | OysterVisitor;
|
|
47
|
-
/** Narrow an admitted principal to the anonymous public reader. */
|
|
48
|
-
export declare function oysterPrincipalIsVisitor(principal: OysterPrincipal): principal is OysterVisitor;
|
|
49
|
-
/** True only for a member admitted with the owner role. */
|
|
50
|
-
export declare function oysterPrincipalIsOwner(principal: OysterPrincipal): principal is Readonly<{
|
|
51
|
-
actor: Extract<HostActor, {
|
|
52
|
-
kind: "member";
|
|
53
|
-
}>;
|
|
54
|
-
role: "owner";
|
|
55
|
-
}>;
|
|
56
37
|
/** Stable actor identity for host storage and backend attribution. */
|
|
57
38
|
export declare function oysterPrincipalId(principal: TenantPrincipal): string;
|
|
58
39
|
/** The outcome of authenticating one request. */
|
|
@@ -86,6 +67,8 @@ export type InstallationStore = InstallationReader & Readonly<{
|
|
|
86
67
|
operations?: InstallationOperations;
|
|
87
68
|
/** Opaque identity of this store incarnation; replacing the store mints another. */
|
|
88
69
|
generation: () => Promise<string>;
|
|
70
|
+
/** Registry-backed stores retain their reset audit; other hosts have none. */
|
|
71
|
+
resetAt?: () => Promise<number | null>;
|
|
89
72
|
/**
|
|
90
73
|
* Atomically commit one reducer-produced record only over the version it
|
|
91
74
|
* was computed from (0: no record). Every writer reads, may await
|
|
@@ -170,17 +153,13 @@ export type CapabilityEnv = {
|
|
|
170
153
|
export type OysterCapability = Readonly<CapabilityDescriptor & {
|
|
171
154
|
/** The permission declared by an App Release to use this contract. */
|
|
172
155
|
permission: AppCapabilityId;
|
|
173
|
-
/**
|
|
174
|
-
|
|
156
|
+
/** Declared routes relative to the descriptor's base path; each names
|
|
157
|
+
* its own requirement beyond the App holding this capability. */
|
|
158
|
+
routes: Routes<CapabilityEnv>;
|
|
175
159
|
}>;
|
|
176
|
-
/**
|
|
177
|
-
export type OysterVariables = TimingVariables & {
|
|
178
|
-
principal: OysterPrincipal;
|
|
179
|
-
installation?: Installation;
|
|
180
|
-
};
|
|
181
|
-
/** Owner routes run after the host's owner guard and read `c.get("principal")`. */
|
|
160
|
+
/** The host table's Hono env; every route receives its principal from its declared requirement. */
|
|
182
161
|
export type OysterEnv = {
|
|
183
|
-
Variables:
|
|
162
|
+
Variables: TimingVariables;
|
|
184
163
|
};
|
|
185
164
|
/** Everything a host supplies to run Oyster. */
|
|
186
165
|
export type OysterHost = Readonly<{
|
|
@@ -193,9 +172,11 @@ export type OysterHost = Readonly<{
|
|
|
193
172
|
* Host-bound Workflow control; absence exposes no Workflow authority.
|
|
194
173
|
* @inlineType WorkflowControl
|
|
195
174
|
*/
|
|
196
|
-
workflows?: (principal:
|
|
175
|
+
workflows?: (principal: TenantPrincipal) => Promise<WorkflowControl | null>;
|
|
197
176
|
/** Owner-admitted durable Computer inventory, absent on hosts without a fleet. */
|
|
198
|
-
computerControl?: (principal:
|
|
177
|
+
computerControl?: (principal: TenantPrincipal) => ComputerControlPort | null;
|
|
178
|
+
/** Owner-direct picker facts from the host's existing resource directories. */
|
|
179
|
+
permissionResources?: (principal: TenantPrincipal) => Promise<readonly ResourceOption[]>;
|
|
199
180
|
auth: OysterAuth;
|
|
200
181
|
/** Host-held sealing key for member writes; never exposed to the guest.
|
|
201
182
|
* Absence refuses eligible named member writes, even when the App has no sync continuation.
|
|
@@ -215,7 +196,7 @@ export type OysterHost = Readonly<{
|
|
|
215
196
|
* `computer.use` grant). The Computer owner accepts each call against the
|
|
216
197
|
* authority the host issued.
|
|
217
198
|
*/
|
|
218
|
-
computer?: (principal:
|
|
199
|
+
computer?: (principal: TenantPrincipal) => KnapsackComputer | null | Promise<KnapsackComputer | null>;
|
|
219
200
|
/** Host-attested Agent tool policy; absence grants no App tool access. A
|
|
220
201
|
* key's App access is its own grants (Ear Tag), read through `keys.live`
|
|
221
202
|
* and `keyAppAccess`, never this port. */
|
|
@@ -233,9 +214,9 @@ export type OysterHost = Readonly<{
|
|
|
233
214
|
mcp?: OysterMcp;
|
|
234
215
|
/** The git door for Apps that use GIT; mounted at `/git/*`. */
|
|
235
216
|
git?: OysterGitHost;
|
|
236
|
-
/**
|
|
237
|
-
*
|
|
238
|
-
ownerRoutes?:
|
|
217
|
+
/** Further routes the host adds (keys, webhooks, builds); each declares
|
|
218
|
+
* its own requirement and receives the admitted principal from it. */
|
|
219
|
+
ownerRoutes?: Routes<OysterEnv>;
|
|
239
220
|
/** Adapters granted only when the Release declares them and admission passes. */
|
|
240
221
|
capabilities?: readonly OysterCapability[];
|
|
241
222
|
/**
|
|
@@ -266,11 +247,23 @@ export type OysterHost = Readonly<{
|
|
|
266
247
|
title?: string;
|
|
267
248
|
}>;
|
|
268
249
|
/** Completed selection, without re-deriving or executing outside Watchdog. */
|
|
269
|
-
export declare function installOrSelect(host: OysterHost, installationId: string, release: Release, principal:
|
|
250
|
+
export declare function installOrSelect(host: OysterHost, installationId: string, release: Release, principal: TenantPrincipal, intent: "install-or-select" | "install-or-remint" | "create-only", origin: "owner-direct" | "workflow" | "app", requestId?: string, signal?: AbortSignal): Promise<Response>;
|
|
251
|
+
/** One host's declared routes and the one way to serve them. */
|
|
252
|
+
export type OysterRouteTable = Readonly<{
|
|
253
|
+
/** Every route this host serves, each with its declared requirement. */
|
|
254
|
+
declarations: () => readonly RouteDeclaration[];
|
|
255
|
+
/** Serve the table; only declared routes answer. */
|
|
256
|
+
serve: () => ServedTable<OysterEnv>;
|
|
257
|
+
}>;
|
|
270
258
|
/**
|
|
271
|
-
* Create the Oyster App server: a
|
|
259
|
+
* Create the Oyster App server: a served route table that installs App Releases, serves
|
|
272
260
|
* their UI, forwards their backend requests and methods to their Instances,
|
|
273
261
|
* and mounts the host's MCP endpoint. The host's adapters decide where state
|
|
274
262
|
* lives and who may sign in.
|
|
275
263
|
*/
|
|
276
|
-
export declare function createOyster(host: OysterHost):
|
|
264
|
+
export declare function createOyster(host: OysterHost): ServedTable<OysterEnv>;
|
|
265
|
+
/**
|
|
266
|
+
* The Oyster host's declared route table: every route names its requirement
|
|
267
|
+
* (`authorization.ts`), so an undeclared route is never served.
|
|
268
|
+
*/
|
|
269
|
+
export declare function oysterRouteTable(host: OysterHost): OysterRouteTable;
|