@fungi.computer/oyster 0.37.0 → 0.37.2

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.
@@ -53,6 +53,13 @@ export async function previewOrigins(env) {
53
53
  }
54
54
  export class PreviewRefused extends Error {
55
55
  }
56
+ // Public suffix rules only: a private-suffix preview domain still makes every
57
+ // workspace-* host one site, so the gate refuses siblings that browsers might
58
+ // treat as separate sites. Loaded on demand like previewOrigins' parser.
59
+ async function publicSite() {
60
+ const { getDomain } = await import("tldts");
61
+ return (url) => getDomain(url.hostname, { allowPrivateDomains: false });
62
+ }
56
63
  // The retained flat hostname uses the Computer's non-secret identity. Fleet
57
64
  // IDs have a computer_ prefix; configured standalone IDs can be simple labels.
58
65
  const hostnameComputer = z.string().regex(/^(?:computer_)?[a-z0-9]+$/u);
@@ -90,8 +97,12 @@ export function createStandalonePreview(storage, computerId, origins, native) {
90
97
  if (incoming.origin !== target.origin ||
91
98
  !incoming.pathname.startsWith(target.pathname))
92
99
  return new Response(null, { status: 404 });
100
+ const policy = {
101
+ entryUrl: entryUrl(origins, computerId, port),
102
+ site: await publicSite(),
103
+ };
93
104
  return access
94
- .gate(port, entryUrl(origins, computerId, port), async (admitted) => {
105
+ .gate(port, policy, async (admitted) => {
95
106
  const service = new URL("http://localhost");
96
107
  service.pathname = incoming.pathname;
97
108
  service.search = incoming.search;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fungi.computer/oyster",
3
- "version": "0.37.0",
3
+ "version": "0.37.2",
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",
@@ -360,35 +360,35 @@
360
360
  "@earendil-works/pi-ai": "1.5.2",
361
361
  "@fungi.computer/agar": "0.21.0",
362
362
  "@fungi.computer/bird-dog": "0.3.7",
363
- "@fungi.computer/braid": "0.5.0",
363
+ "@fungi.computer/braid": "0.5.1",
364
364
  "@fungi.computer/burrow": "0.2.1",
365
365
  "@fungi.computer/cairn": "0.1.0",
366
366
  "@fungi.computer/capnweb": "0.12.0-fungi.0",
367
367
  "@fungi.computer/caps": "0.12.0",
368
368
  "@fungi.computer/carrier": "0.2.5",
369
- "@fungi.computer/computer": "0.14.3",
370
- "@fungi.computer/computer-contract": "0.5.4",
369
+ "@fungi.computer/computer": "0.14.5",
370
+ "@fungi.computer/computer-contract": "0.5.5",
371
371
  "@fungi.computer/darkroom": "0.11.5",
372
372
  "@fungi.computer/ear-tag": "0.1.0",
373
373
  "@fungi.computer/forage": "0.3.12",
374
374
  "@fungi.computer/gills": "0.4.0",
375
- "@fungi.computer/knapsack": "0.4.17",
375
+ "@fungi.computer/knapsack": "0.4.18",
376
376
  "@fungi.computer/lantern": "0.4.2",
377
- "@fungi.computer/mycelium": "0.4.4",
377
+ "@fungi.computer/mycelium": "0.4.5",
378
378
  "@fungi.computer/nacre": "0.8.0",
379
- "@fungi.computer/parakeet": "0.13.0",
379
+ "@fungi.computer/parakeet": "0.13.1",
380
380
  "@fungi.computer/puffball": "0.11.0",
381
381
  "@fungi.computer/seam": "0.2.6",
382
- "@fungi.computer/shiitake": "0.20.1",
383
- "@fungi.computer/shiitake-extensions": "0.11.6",
382
+ "@fungi.computer/shiitake": "0.20.2",
383
+ "@fungi.computer/shiitake-extensions": "0.11.7",
384
384
  "@fungi.computer/sigils": "0.3.2",
385
385
  "@fungi.computer/sprite": "0.2.2",
386
386
  "@fungi.computer/sprite-zdog": "0.3.2",
387
- "@fungi.computer/veil": "0.7.8",
387
+ "@fungi.computer/veil": "0.7.9",
388
388
  "@fungi.computer/watchdog": "0.1.4",
389
389
  "@fungi.computer/whistle": "0.3.0",
390
- "@fungi.computer/workflows-wire": "0.5.0",
391
- "@fungi.computer/zookeeper": "0.0.38",
390
+ "@fungi.computer/workflows-wire": "0.5.1",
391
+ "@fungi.computer/zookeeper": "0.0.39",
392
392
  "@modelcontextprotocol/server": "2.0.0",
393
393
  "@msgpack/msgpack": "3.1.3",
394
394
  "@pnpm/lockfile.fs": "1100.2.13",