@fungi.computer/oyster 0.27.1 → 0.28.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/dist/apps/gate.js +1 -4
- package/dist/apps/installation.js +8 -10
- package/dist/apps/permissions.d.ts +2 -0
- package/dist/apps/permissions.js +2 -2
- package/dist/embed-metafiles.js +1 -1
- package/dist/host.js +7 -4
- package/dist/page/app-access.js +1 -0
- package/dist/page/app-permissions.js +1 -0
- package/dist/page-script.js +2 -2
- package/dist/standalone/computer.d.ts +8 -1
- package/dist/standalone/computer.js +17 -10
- package/dist/standalone/dashboard-approval.js +1 -2
- package/dist/standalone/media.d.ts +15 -2
- package/dist/standalone/media.js +8 -0
- package/dist/standalone/tenancy.d.ts +6 -0
- package/dist/standalone/tenancy.js +57 -0
- package/dist/tenancy/cloudflare/registry.d.ts +3 -0
- package/dist/tenancy/cloudflare/registry.js +43 -2
- package/dist/tenancy/cloudflare-access.d.ts +28 -0
- package/dist/tenancy/cloudflare-access.js +99 -0
- package/docs/api/README.md +69 -6
- package/docs/api/apps.md +14 -8
- package/docs/api/modules.md +37 -36
- package/docs/api/tenancy/cloudflare-access.md +82 -0
- package/docs/api/tenancy/cloudflare.md +1 -0
- package/examples/standalone/wrangler.jsonc +7 -0
- package/package.json +14 -10
package/docs/api/modules.md
CHANGED
|
@@ -8,39 +8,40 @@
|
|
|
8
8
|
|
|
9
9
|
## Modules
|
|
10
10
|
|
|
11
|
-
| Module
|
|
12
|
-
|
|
|
13
|
-
| [agent-schedules](agent-schedules.md)
|
|
14
|
-
| [agents](agents.md)
|
|
15
|
-
| [app-storage](app-storage.md)
|
|
16
|
-
| [apps](apps.md)
|
|
17
|
-
| [auth](auth.md)
|
|
18
|
-
| [authorization](authorization.md)
|
|
19
|
-
| [browser/boot-once](browser/boot-once.md)
|
|
20
|
-
| [browser/boot](browser/boot.md)
|
|
21
|
-
| [browser](browser.md)
|
|
22
|
-
| [build-contract](build-contract.md)
|
|
23
|
-
| [build](build.md)
|
|
24
|
-
| [cloudflare](cloudflare.md)
|
|
25
|
-
| [computer](computer.md)
|
|
26
|
-
| [files](files.md)
|
|
27
|
-
| [git](git.md)
|
|
28
|
-
| [host](host.md)
|
|
29
|
-
| [index](index.md)
|
|
30
|
-
| [invocation](invocation.md)
|
|
31
|
-
| [keys](keys.md)
|
|
32
|
-
| [mcp](mcp.md)
|
|
33
|
-
| [media](media.md)
|
|
34
|
-
| [pack](pack.md)
|
|
35
|
-
| [page/mount](page/mount.md)
|
|
36
|
-
| [root-data](root-data.md)
|
|
37
|
-
| [tenancy/auth0](tenancy/auth0.md)
|
|
38
|
-
| [tenancy/cloudflare](tenancy/cloudflare.md)
|
|
39
|
-
| [tenancy/
|
|
40
|
-
| [tenancy](tenancy.md)
|
|
41
|
-
| [tenancy
|
|
42
|
-
| [tenancy/
|
|
43
|
-
| [tenancy/
|
|
44
|
-
| [
|
|
45
|
-
| [
|
|
46
|
-
| [workers](workers.md)
|
|
11
|
+
| Module | Description |
|
|
12
|
+
| --------------------------------------------------------- | ----------- |
|
|
13
|
+
| [agent-schedules](agent-schedules.md) | - |
|
|
14
|
+
| [agents](agents.md) | - |
|
|
15
|
+
| [app-storage](app-storage.md) | - |
|
|
16
|
+
| [apps](apps.md) | - |
|
|
17
|
+
| [auth](auth.md) | - |
|
|
18
|
+
| [authorization](authorization.md) | - |
|
|
19
|
+
| [browser/boot-once](browser/boot-once.md) | - |
|
|
20
|
+
| [browser/boot](browser/boot.md) | - |
|
|
21
|
+
| [browser](browser.md) | - |
|
|
22
|
+
| [build-contract](build-contract.md) | - |
|
|
23
|
+
| [build](build.md) | - |
|
|
24
|
+
| [cloudflare](cloudflare.md) | - |
|
|
25
|
+
| [computer](computer.md) | - |
|
|
26
|
+
| [files](files.md) | - |
|
|
27
|
+
| [git](git.md) | - |
|
|
28
|
+
| [host](host.md) | - |
|
|
29
|
+
| [index](index.md) | - |
|
|
30
|
+
| [invocation](invocation.md) | - |
|
|
31
|
+
| [keys](keys.md) | - |
|
|
32
|
+
| [mcp](mcp.md) | - |
|
|
33
|
+
| [media](media.md) | - |
|
|
34
|
+
| [pack](pack.md) | - |
|
|
35
|
+
| [page/mount](page/mount.md) | - |
|
|
36
|
+
| [root-data](root-data.md) | - |
|
|
37
|
+
| [tenancy/auth0](tenancy/auth0.md) | - |
|
|
38
|
+
| [tenancy/cloudflare-access](tenancy/cloudflare-access.md) | - |
|
|
39
|
+
| [tenancy/cloudflare](tenancy/cloudflare.md) | - |
|
|
40
|
+
| [tenancy/cold-directory](tenancy/cold-directory.md) | - |
|
|
41
|
+
| [tenancy](tenancy.md) | - |
|
|
42
|
+
| [tenancy/owner-key](tenancy/owner-key.md) | - |
|
|
43
|
+
| [tenancy/registry](tenancy/registry.md) | - |
|
|
44
|
+
| [tenancy/resolve](tenancy/resolve.md) | - |
|
|
45
|
+
| [tenant](tenant.md) | - |
|
|
46
|
+
| [workers-git](workers-git.md) | - |
|
|
47
|
+
| [workers](workers.md) | - |
|
|
@@ -0,0 +1,82 @@
|
|
|
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) / tenancy/cloudflare-access
|
|
8
|
+
|
|
9
|
+
# tenancy/cloudflare-access
|
|
10
|
+
|
|
11
|
+
## Type Aliases
|
|
12
|
+
|
|
13
|
+
### CloudflareAccessOptions
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
type CloudflareAccessOptions = Readonly<{
|
|
17
|
+
teamDomain: string;
|
|
18
|
+
audience: string;
|
|
19
|
+
fetch?: typeof globalThis.fetch;
|
|
20
|
+
}>;
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Cloudflare Access settings for one Access application; the adapter is opt-in.
|
|
24
|
+
|
|
25
|
+
## Variables
|
|
26
|
+
|
|
27
|
+
### cloudflareAccessAssertionHeader
|
|
28
|
+
|
|
29
|
+
```ts
|
|
30
|
+
const cloudflareAccessAssertionHeader: "Cf-Access-Jwt-Assertion" =
|
|
31
|
+
"Cf-Access-Jwt-Assertion";
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
The request header Cloudflare Access adds after it admits a request.
|
|
35
|
+
|
|
36
|
+
## Functions
|
|
37
|
+
|
|
38
|
+
### cloudflareAccessIssuer()
|
|
39
|
+
|
|
40
|
+
```ts
|
|
41
|
+
function cloudflareAccessIssuer(teamDomain): string;
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
The exact `iss` Access signs, which is also the identity provider namespace.
|
|
45
|
+
Access omits the trailing slash; the match is exact.
|
|
46
|
+
|
|
47
|
+
#### Parameters
|
|
48
|
+
|
|
49
|
+
| Parameter | Type |
|
|
50
|
+
| ------------ | -------- |
|
|
51
|
+
| `teamDomain` | `string` |
|
|
52
|
+
|
|
53
|
+
#### Returns
|
|
54
|
+
|
|
55
|
+
`string`
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
### cloudflareAccess()
|
|
60
|
+
|
|
61
|
+
```ts
|
|
62
|
+
function cloudflareAccess(options): AuthAdapter;
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Verify a Cloudflare Access application token and return its issuer-scoped
|
|
66
|
+
identity. The registry alone maps that identity to a member: an Access user with
|
|
67
|
+
no explicit binding is refused by the kit, and nothing is created here.
|
|
68
|
+
|
|
69
|
+
Precedence: any `Authorization` header or Oyster owner-key cookie is an explicit
|
|
70
|
+
Oyster credential, so this adapter passes and the key adapters decide. Register
|
|
71
|
+
it after the key adapters and before any terminal adapter. Only the
|
|
72
|
+
`Cf-Access-Jwt-Assertion` header is read, as Cloudflare recommends.
|
|
73
|
+
|
|
74
|
+
#### Parameters
|
|
75
|
+
|
|
76
|
+
| Parameter | Type |
|
|
77
|
+
| --------- | ----------------------------------------------------- |
|
|
78
|
+
| `options` | [`CloudflareAccessOptions`](#cloudflareaccessoptions) |
|
|
79
|
+
|
|
80
|
+
#### Returns
|
|
81
|
+
|
|
82
|
+
[`AuthAdapter`](../tenancy.md#authadapter)
|
|
@@ -43,6 +43,13 @@
|
|
|
43
43
|
"OYSTER_HOME_INSTALLATION": "tourtois",
|
|
44
44
|
"OYSTER_ORIGIN": "https://oyster.example",
|
|
45
45
|
"OYSTER_OWNER_NAME": "owner",
|
|
46
|
+
// Opt in to Cloudflare Access sign-in (hostname-based Access application).
|
|
47
|
+
// Set both, plus the Access user ID (sub) to bind to the existing owner.
|
|
48
|
+
// With Access, OYSTER_ORIGIN must be the protected hostname and
|
|
49
|
+
// workers_dev/preview_urls must be false.
|
|
50
|
+
// "OYSTER_ACCESS_TEAM_DOMAIN": "yourteam.cloudflareaccess.com",
|
|
51
|
+
// "OYSTER_ACCESS_AUD": "<Application Audience (AUD) tag>",
|
|
52
|
+
// "OYSTER_ACCESS_OWNER_SUBJECT": "<your Access user's sub>",
|
|
46
53
|
// Cloudflare creates the account's default AI Gateway on first use.
|
|
47
54
|
// Set another ID here to route Prints through a Gateway you configured.
|
|
48
55
|
"AI_GATEWAY_ID": "default",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fungi.computer/oyster",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.28.0",
|
|
4
4
|
"author": "Levi <levi@technomancy.dev>",
|
|
5
5
|
"description": "Oyster by Fungi: open-source Apps for people and AI agents. Try with one command or run on your own Cloudflare account.",
|
|
6
6
|
"homepage": "https://docs.fungi.computer/oyster",
|
|
@@ -290,6 +290,10 @@
|
|
|
290
290
|
"types": "./dist/tenancy/auth0.d.ts",
|
|
291
291
|
"import": "./dist/tenancy/auth0.js"
|
|
292
292
|
},
|
|
293
|
+
"./tenancy/cloudflare-access": {
|
|
294
|
+
"types": "./dist/tenancy/cloudflare-access.d.ts",
|
|
295
|
+
"import": "./dist/tenancy/cloudflare-access.js"
|
|
296
|
+
},
|
|
293
297
|
"./tenancy/cloudflare": {
|
|
294
298
|
"types": "./dist/tenancy/cloudflare.d.ts",
|
|
295
299
|
"import": "./dist/tenancy/cloudflare.js"
|
|
@@ -342,9 +346,9 @@
|
|
|
342
346
|
"dependencies": {
|
|
343
347
|
"@cfworker/json-schema": "4.1.1",
|
|
344
348
|
"@earendil-works/pi-ai": "1.3.0",
|
|
345
|
-
"@fungi.computer/agar": "0.
|
|
349
|
+
"@fungi.computer/agar": "0.14.0",
|
|
346
350
|
"@fungi.computer/bird-dog": "0.3.6",
|
|
347
|
-
"@fungi.computer/braid": "0.4.
|
|
351
|
+
"@fungi.computer/braid": "0.4.15",
|
|
348
352
|
"@fungi.computer/burrow": "0.2.1",
|
|
349
353
|
"@fungi.computer/cairn": "0.1.0",
|
|
350
354
|
"@fungi.computer/capnweb": "0.12.0-fungi.0",
|
|
@@ -352,27 +356,27 @@
|
|
|
352
356
|
"@fungi.computer/carrier": "0.2.4",
|
|
353
357
|
"@fungi.computer/computer": "0.12.1",
|
|
354
358
|
"@fungi.computer/computer-contract": "0.4.0",
|
|
355
|
-
"@fungi.computer/darkroom": "0.
|
|
359
|
+
"@fungi.computer/darkroom": "0.8.0",
|
|
356
360
|
"@fungi.computer/ear-tag": "0.1.0",
|
|
357
361
|
"@fungi.computer/forage": "0.3.8",
|
|
358
362
|
"@fungi.computer/gills": "0.3.0",
|
|
359
363
|
"@fungi.computer/knapsack": "0.4.12",
|
|
360
364
|
"@fungi.computer/lantern": "0.4.2",
|
|
361
365
|
"@fungi.computer/mycelium": "0.3.11",
|
|
362
|
-
"@fungi.computer/nacre": "0.6.
|
|
363
|
-
"@fungi.computer/parakeet": "0.11.
|
|
366
|
+
"@fungi.computer/nacre": "0.6.2",
|
|
367
|
+
"@fungi.computer/parakeet": "0.11.27",
|
|
364
368
|
"@fungi.computer/puffball": "0.8.0",
|
|
365
369
|
"@fungi.computer/seam": "0.2.5",
|
|
366
|
-
"@fungi.computer/shiitake": "0.16.
|
|
367
|
-
"@fungi.computer/shiitake-extensions": "0.9.
|
|
370
|
+
"@fungi.computer/shiitake": "0.16.1",
|
|
371
|
+
"@fungi.computer/shiitake-extensions": "0.9.1",
|
|
368
372
|
"@fungi.computer/sigils": "0.3.2",
|
|
369
373
|
"@fungi.computer/sprite": "0.2.2",
|
|
370
374
|
"@fungi.computer/sprite-zdog": "0.3.2",
|
|
371
375
|
"@fungi.computer/veil": "0.7.3",
|
|
372
376
|
"@fungi.computer/watchdog": "0.1.3",
|
|
373
377
|
"@fungi.computer/whistle": "0.3.0",
|
|
374
|
-
"@fungi.computer/workflows-wire": "0.4.
|
|
375
|
-
"@fungi.computer/zookeeper": "0.0.
|
|
378
|
+
"@fungi.computer/workflows-wire": "0.4.15",
|
|
379
|
+
"@fungi.computer/zookeeper": "0.0.26",
|
|
376
380
|
"@modelcontextprotocol/server": "2.0.0",
|
|
377
381
|
"@pnpm/lockfile.fs": "1100.2.13",
|
|
378
382
|
"@pnpm/lockfile.pruner": "1100.0.27",
|