@fungi.computer/oyster 0.0.0-stage → 0.0.1
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/LICENSE +21 -0
- package/README.md +1082 -2
- package/dist/agents.d.ts +114 -0
- package/dist/agents.js +322 -0
- package/dist/app-builds.d.ts +151 -0
- package/dist/app-builds.js +355 -0
- package/dist/app-sandbox.d.ts +2 -0
- package/dist/app-sandbox.js +2 -0
- package/dist/app-sources.d.ts +46 -0
- package/dist/app-sources.js +335 -0
- package/dist/app-storage.d.ts +141 -0
- package/dist/app-storage.js +281 -0
- package/dist/apps/gate.d.ts +105 -0
- package/dist/apps/gate.js +273 -0
- package/dist/apps/index.d.ts +5 -0
- package/dist/apps/index.js +5 -0
- package/dist/apps/installation.d.ts +248 -0
- package/dist/apps/installation.js +307 -0
- package/dist/apps/operations.d.ts +8 -0
- package/dist/apps/operations.js +98 -0
- package/dist/apps/tools.d.ts +33 -0
- package/dist/apps/tools.js +17 -0
- package/dist/auth.d.ts +11 -0
- package/dist/auth.js +93 -0
- package/dist/backend-request.d.ts +3 -0
- package/dist/backend-request.js +53 -0
- package/dist/build/build-jobs.d.ts +128 -0
- package/dist/build/build-jobs.js +197 -0
- package/dist/build/build-step.d.ts +26 -0
- package/dist/build/build-step.js +20 -0
- package/dist/build/bundled-html.d.ts +7 -0
- package/dist/build/bundled-html.js +64 -0
- package/dist/build/definition-emission.d.ts +34 -0
- package/dist/build/definition-emission.js +201 -0
- package/dist/build/effect.d.ts +231 -0
- package/dist/build/effect.js +396 -0
- package/dist/build/git-environment.d.ts +6 -0
- package/dist/build/git-environment.js +48 -0
- package/dist/build/html-recipe.d.ts +20 -0
- package/dist/build/html-recipe.js +51 -0
- package/dist/build/local-build.d.ts +57 -0
- package/dist/build/local-build.js +1078 -0
- package/dist/build/r2-artifact-writer.d.ts +31 -0
- package/dist/build/r2-artifact-writer.js +179 -0
- package/dist/build/snapshot-package-store.d.ts +2 -0
- package/dist/build/snapshot-package-store.js +21 -0
- package/dist/build/snapshot-program-scripts.d.ts +6 -0
- package/dist/build/snapshot-program-scripts.js +2 -0
- package/dist/build/submission-contract.d.ts +384 -0
- package/dist/build/submission-contract.js +70 -0
- package/dist/build/workspace-build.d.ts +50 -0
- package/dist/build/workspace-build.js +156 -0
- package/dist/build-contract.d.ts +4 -0
- package/dist/build-contract.js +4 -0
- package/dist/build-jobs.d.ts +2 -0
- package/dist/build-jobs.js +2 -0
- package/dist/build.d.ts +11 -0
- package/dist/build.js +13 -0
- package/dist/capability-descriptor.d.ts +46 -0
- package/dist/capability-descriptor.js +51 -0
- package/dist/catalog-frame.d.ts +39 -0
- package/dist/catalog-frame.js +72 -0
- package/dist/cause-class.d.ts +19 -0
- package/dist/cause-class.js +54 -0
- package/dist/cloudflare.d.ts +123 -0
- package/dist/cloudflare.js +391 -0
- package/dist/computer-terminal.d.ts +38 -0
- package/dist/computer-terminal.js +410 -0
- package/dist/computer.d.ts +60 -0
- package/dist/computer.js +33 -0
- package/dist/event-recipients.d.ts +57 -0
- package/dist/event-recipients.js +144 -0
- package/dist/facet-invocation.d.ts +4 -0
- package/dist/facet-invocation.js +45 -0
- package/dist/files.d.ts +42 -0
- package/dist/files.js +123 -0
- package/dist/frame-binding-wire-script.d.ts +2 -0
- package/dist/frame-binding-wire-script.js +1 -0
- package/dist/frame-binding-wire.d.ts +28 -0
- package/dist/frame-binding-wire.js +54 -0
- package/dist/git-admission.d.ts +52 -0
- package/dist/git-admission.js +188 -0
- package/dist/git-auth.d.ts +11 -0
- package/dist/git-auth.js +27 -0
- package/dist/git-door.d.ts +35 -0
- package/dist/git-door.js +108 -0
- package/dist/git-journal.d.ts +31 -0
- package/dist/git-journal.js +188 -0
- package/dist/git.d.ts +31 -0
- package/dist/git.js +64 -0
- package/dist/guest-policy.d.ts +9 -0
- package/dist/guest-policy.js +13 -0
- package/dist/host.d.ts +244 -0
- package/dist/host.js +1043 -0
- package/dist/index.d.ts +166 -0
- package/dist/index.js +320 -0
- package/dist/installation-consent.d.ts +79 -0
- package/dist/installation-consent.js +82 -0
- package/dist/internal/background-origins.d.ts +3 -0
- package/dist/internal/background-origins.js +8 -0
- package/dist/internal/delivery.d.ts +12 -0
- package/dist/internal/delivery.js +167 -0
- package/dist/internal/host-gate.d.ts +14 -0
- package/dist/internal/host-gate.js +62 -0
- package/dist/internal/registry-installations.d.ts +6 -0
- package/dist/internal/registry-installations.js +12 -0
- package/dist/invocation.d.ts +251 -0
- package/dist/invocation.js +377 -0
- package/dist/keys.d.ts +48 -0
- package/dist/keys.js +52 -0
- package/dist/mcp-owner.d.ts +27 -0
- package/dist/mcp-owner.js +143 -0
- package/dist/mcp.d.ts +89 -0
- package/dist/mcp.js +429 -0
- package/dist/media.d.ts +23 -0
- package/dist/media.js +12 -0
- package/dist/pack.d.ts +76 -0
- package/dist/pack.js +134 -0
- package/dist/page/capabilities.d.ts +23 -0
- package/dist/page/capabilities.js +256 -0
- package/dist/page/computer-handles.d.ts +79 -0
- package/dist/page/computer-handles.js +44 -0
- package/dist/page/lifetime.d.ts +6 -0
- package/dist/page/lifetime.js +19 -0
- package/dist/page/mount.d.ts +163 -0
- package/dist/page/mount.js +390 -0
- package/dist/page/storage.d.ts +3 -0
- package/dist/page/storage.js +82 -0
- package/dist/page/terminal.d.ts +5 -0
- package/dist/page/terminal.js +7 -0
- package/dist/page-script.d.ts +14 -0
- package/dist/page-script.js +5 -0
- package/dist/r2-files.d.ts +3 -0
- package/dist/r2-files.js +79 -0
- package/dist/release.d.ts +72 -0
- package/dist/release.js +164 -0
- package/dist/root-data.d.ts +86 -0
- package/dist/root-data.js +69 -0
- package/dist/shell/app-directory.d.ts +537 -0
- package/dist/shell/app-directory.js +195 -0
- package/dist/shell/browser-actions.d.ts +7 -0
- package/dist/shell/browser-actions.js +56 -0
- package/dist/shell/command-host.d.ts +112 -0
- package/dist/shell/command-host.js +502 -0
- package/dist/shell/commands.d.ts +25 -0
- package/dist/shell/commands.js +78 -0
- package/dist/shell/index.d.ts +8 -0
- package/dist/shell/index.js +8 -0
- package/dist/shell/keys.d.ts +41 -0
- package/dist/shell/keys.js +134 -0
- package/dist/shell/shell-module.d.ts +31 -0
- package/dist/shell/shell-module.js +37 -0
- package/dist/shell/window-manager.d.ts +124 -0
- package/dist/shell/window-manager.js +711 -0
- package/dist/shell/workbench-contract.d.ts +68 -0
- package/dist/shell/workbench-contract.js +1 -0
- package/dist/shell/workbench-host-types.d.ts +96 -0
- package/dist/shell/workbench-host-types.js +1 -0
- package/dist/shell/workbench-host.d.ts +34 -0
- package/dist/shell/workbench-host.js +347 -0
- package/dist/shell/workbench-model.d.ts +192 -0
- package/dist/shell/workbench-model.js +53 -0
- package/dist/shell/workbench.d.ts +4 -0
- package/dist/shell/workbench.js +2 -0
- package/dist/source/fork.d.ts +27 -0
- package/dist/source/fork.js +46 -0
- package/dist/source/index.d.ts +11 -0
- package/dist/source/index.js +11 -0
- package/dist/source/seed-receipt.d.ts +53 -0
- package/dist/source/seed-receipt.js +18 -0
- package/dist/source/team-source.d.ts +32 -0
- package/dist/source/team-source.js +42 -0
- package/dist/source/template-repository.d.ts +2 -0
- package/dist/source/template-repository.js +8 -0
- package/dist/source/template-write.d.ts +69 -0
- package/dist/source/template-write.js +344 -0
- package/dist/storage-frame.d.ts +64 -0
- package/dist/storage-frame.js +28 -0
- package/dist/tenant.d.ts +81 -0
- package/dist/tenant.js +71 -0
- package/dist/testing/capabilities.d.ts +29 -0
- package/dist/testing/capabilities.js +130 -0
- package/dist/testing/catalog.d.ts +3 -0
- package/dist/testing/catalog.js +53 -0
- package/dist/testing/index.d.ts +10 -0
- package/dist/testing/index.js +10 -0
- package/dist/testing/installation.d.ts +11 -0
- package/dist/testing/installation.js +25 -0
- package/dist/testing/native-worker.d.ts +21 -0
- package/dist/testing/native-worker.js +106 -0
- package/dist/testing/worker.d.ts +18 -0
- package/dist/testing/worker.js +67 -0
- package/dist/testing/workers-runtime.d.ts +24 -0
- package/dist/testing/workers-runtime.js +33 -0
- package/dist/webhook-delivery.d.ts +14 -0
- package/dist/webhook-delivery.js +17 -0
- package/dist/workers-git.d.ts +285 -0
- package/dist/workers-git.js +1174 -0
- package/dist/workers.d.ts +352 -0
- package/dist/workers.js +866 -0
- package/docs/api/README.md +82 -0
- package/docs/api/agents.md +332 -0
- package/docs/api/app-storage.md +209 -0
- package/docs/api/apps.md +1375 -0
- package/docs/api/auth.md +63 -0
- package/docs/api/build-contract.md +507 -0
- package/docs/api/build.md +1476 -0
- package/docs/api/cloudflare.md +421 -0
- package/docs/api/computer.md +203 -0
- package/docs/api/files.md +117 -0
- package/docs/api/git.md +470 -0
- package/docs/api/host.md +1328 -0
- package/docs/api/index.md +430 -0
- package/docs/api/invocation.md +738 -0
- package/docs/api/keys.md +175 -0
- package/docs/api/mcp.md +301 -0
- package/docs/api/media.md +40 -0
- package/docs/api/modules.md +42 -0
- package/docs/api/pack.md +138 -0
- package/docs/api/page/mount.md +298 -0
- package/docs/api/root-data.md +111 -0
- package/docs/api/shell/app-directory.md +332 -0
- package/docs/api/shell/command-host.md +224 -0
- package/docs/api/shell/commands.md +197 -0
- package/docs/api/shell/keys.md +183 -0
- package/docs/api/shell/shell-module.md +143 -0
- package/docs/api/shell/window-manager.md +267 -0
- package/docs/api/shell/workbench.md +186 -0
- package/docs/api/shell.md +1788 -0
- package/docs/api/tenant.md +194 -0
- package/docs/api/workers-git.md +1527 -0
- package/docs/api/workers.md +1678 -0
- package/docs/media/architecture.mmd +32 -0
- package/docs/media/architecture.png +0 -0
- package/docs/media/bonsai-network.png +0 -0
- package/docs/media/bonsai-repository.png +0 -0
- package/docs/site/agent-quickstart.mdx +349 -0
- package/examples/git/worker.ts +39 -0
- package/examples/git/wrangler.jsonc +32 -0
- package/examples/standalone/worker.ts +14 -0
- package/examples/standalone/wrangler.jsonc +21 -0
- package/package.json +249 -3
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
<!-- Generated by Botanical API docs (TypeDoc + typedoc-plugin-markdown). Do not edit. -->
|
|
2
|
+
|
|
3
|
+
[**@fungi.computer/oyster**](README.md)
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
[@fungi.computer/oyster](modules.md) / tenant
|
|
8
|
+
|
|
9
|
+
# tenant
|
|
10
|
+
|
|
11
|
+
## Type Aliases
|
|
12
|
+
|
|
13
|
+
### TenantId
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
type TenantId = typeof tenantIdSchema.Type;
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
A validated host-selected tenant identity.
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
### TenantPrincipal
|
|
24
|
+
|
|
25
|
+
```ts
|
|
26
|
+
type TenantPrincipal =
|
|
27
|
+
| Readonly<{
|
|
28
|
+
actor: Extract<
|
|
29
|
+
HostActor,
|
|
30
|
+
{
|
|
31
|
+
kind: "member";
|
|
32
|
+
}
|
|
33
|
+
>;
|
|
34
|
+
role: "owner" | "member";
|
|
35
|
+
soleMember?: true;
|
|
36
|
+
}>
|
|
37
|
+
| Readonly<{
|
|
38
|
+
actor: Exclude<
|
|
39
|
+
HostActor,
|
|
40
|
+
{
|
|
41
|
+
kind: "member";
|
|
42
|
+
}
|
|
43
|
+
>;
|
|
44
|
+
}>;
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
A canonical host actor with a tenant role only when the actor is a member.
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
### TenantResolver
|
|
52
|
+
|
|
53
|
+
```ts
|
|
54
|
+
type TenantResolver = Readonly<{
|
|
55
|
+
resolve: Promise<Readonly<{
|
|
56
|
+
tenantId: TenantId;
|
|
57
|
+
origin: string;
|
|
58
|
+
}> | null>;
|
|
59
|
+
}>;
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Resolves a request before authentication; null means refuse, never fallback.
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
### TenantScope
|
|
67
|
+
|
|
68
|
+
```ts
|
|
69
|
+
type TenantScope = Readonly<{
|
|
70
|
+
tenantId: TenantId;
|
|
71
|
+
origin: string;
|
|
72
|
+
durableName: string;
|
|
73
|
+
computerName: string;
|
|
74
|
+
workspacePrefix: string;
|
|
75
|
+
repositoryPrefix: string;
|
|
76
|
+
}>;
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
The only source of durable names for a standalone Oyster tenant.
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
### ResolvedTenant
|
|
84
|
+
|
|
85
|
+
```ts
|
|
86
|
+
type ResolvedTenant = Readonly<{
|
|
87
|
+
scope: TenantScope;
|
|
88
|
+
auth: OysterAuth;
|
|
89
|
+
}>;
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
A host-selected scope paired with its existing authentication port.
|
|
93
|
+
|
|
94
|
+
---
|
|
95
|
+
|
|
96
|
+
### OysterTenancy
|
|
97
|
+
|
|
98
|
+
```ts
|
|
99
|
+
type OysterTenancy = Readonly<{
|
|
100
|
+
resolve: Promise<Readonly<{
|
|
101
|
+
scope: TenantScope;
|
|
102
|
+
auth: OysterAuth;
|
|
103
|
+
}> | null>;
|
|
104
|
+
}>;
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
Resolve an origin-scoped host; null refuses the request without a fallback.
|
|
108
|
+
|
|
109
|
+
## Variables
|
|
110
|
+
|
|
111
|
+
### tenantIdSchema
|
|
112
|
+
|
|
113
|
+
```ts
|
|
114
|
+
const tenantIdSchema: brand<String, "OysterTenantId">;
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
A host-minted tenant slug: 2–40 lowercase ASCII letters or digits, with single
|
|
118
|
+
interior hyphens. The repository separator `--` is forbidden. Hosts resolve it
|
|
119
|
+
before authentication; App-controlled inputs never select it.
|
|
120
|
+
|
|
121
|
+
---
|
|
122
|
+
|
|
123
|
+
### defaultTenant
|
|
124
|
+
|
|
125
|
+
```ts
|
|
126
|
+
const defaultTenant: TenantId;
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
The single-tenant Oyster identity whose durable names remain unchanged.
|
|
130
|
+
|
|
131
|
+
## Functions
|
|
132
|
+
|
|
133
|
+
### tenantScope()
|
|
134
|
+
|
|
135
|
+
```ts
|
|
136
|
+
function tenantScope(tenantId, origin): TenantScope;
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
Name tenant-owned stores without changing any default-tenant name. The `t.`
|
|
140
|
+
repository namespace cannot be a default installation slug, which forbids dots.
|
|
141
|
+
Hub supplies its own Team-scoped ports and does not use this naming contract.
|
|
142
|
+
|
|
143
|
+
#### Parameters
|
|
144
|
+
|
|
145
|
+
| Parameter | Type |
|
|
146
|
+
| ---------- | ---------------------------------------- |
|
|
147
|
+
| `tenantId` | `string` & `Brand`\<`"OysterTenantId"`\> |
|
|
148
|
+
| `origin` | `string` |
|
|
149
|
+
|
|
150
|
+
#### Returns
|
|
151
|
+
|
|
152
|
+
[`TenantScope`](#tenantscope)
|
|
153
|
+
|
|
154
|
+
---
|
|
155
|
+
|
|
156
|
+
### singleTenant()
|
|
157
|
+
|
|
158
|
+
```ts
|
|
159
|
+
function singleTenant(origin): TenantResolver;
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
Admit defaultTenant only at the configured origin. Scheme, host and port must
|
|
163
|
+
match after URL canonicalization; unknown origins never fall back to default.
|
|
164
|
+
|
|
165
|
+
#### Parameters
|
|
166
|
+
|
|
167
|
+
| Parameter | Type |
|
|
168
|
+
| --------- | -------- |
|
|
169
|
+
| `origin` | `string` |
|
|
170
|
+
|
|
171
|
+
#### Returns
|
|
172
|
+
|
|
173
|
+
[`TenantResolver`](#tenantresolver)
|
|
174
|
+
|
|
175
|
+
---
|
|
176
|
+
|
|
177
|
+
### implicitTenancy()
|
|
178
|
+
|
|
179
|
+
```ts
|
|
180
|
+
function implicitTenancy(origin, auth): OysterTenancy;
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
Preserve the default tenant's names and auth only at the configured origin.
|
|
184
|
+
|
|
185
|
+
#### Parameters
|
|
186
|
+
|
|
187
|
+
| Parameter | Type |
|
|
188
|
+
| --------- | ---------------------------------- |
|
|
189
|
+
| `origin` | `string` |
|
|
190
|
+
| `auth` | [`OysterAuth`](host.md#oysterauth) |
|
|
191
|
+
|
|
192
|
+
#### Returns
|
|
193
|
+
|
|
194
|
+
[`OysterTenancy`](#oystertenancy)
|