@fungi.computer/oyster 0.38.0 → 0.38.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.
@@ -1,3 +1,7 @@
1
+ /** Second boundary before an admitted request enters customer backend code.
2
+ * Hub normally builds this shape itself; callers of the App runtime must not
3
+ * be able to pass their own headers through the facet.
4
+ */
1
5
  export declare function appFacetRequest(request: Request): Request;
2
6
  /** Only content metadata crosses back from a guest; origin policy is host-owned. */
3
7
  export declare function appFacetResponse(response: Response): Response;
@@ -2,18 +2,11 @@
2
2
  * Hub normally builds this shape itself; callers of the App runtime must not
3
3
  * be able to pass their own headers through the facet.
4
4
  */
5
- import { appBackendActorHeader, appBackendComputerHeader, } from "@fungi.computer/agar/backend";
6
5
  export function appFacetRequest(request) {
7
6
  const headers = new Headers();
8
- for (const name of [
9
- "Content-Type",
10
- appBackendActorHeader,
11
- appBackendComputerHeader,
12
- ]) {
13
- const value = request.headers.get(name);
14
- if (value !== null)
15
- headers.set(name, value);
16
- }
7
+ const contentType = request.headers.get("Content-Type");
8
+ if (contentType !== null)
9
+ headers.set("Content-Type", contentType);
17
10
  const init = {
18
11
  method: request.method,
19
12
  headers,
@@ -50,7 +50,7 @@ var __disposeResources = (this && this.__disposeResources) || (function (Suppres
50
50
  var e = new Error(message);
51
51
  return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
52
52
  });
53
- import { appBackendComputerHeader, appMethodReplySchema, } from "@fungi.computer/agar/backend";
53
+ import { appMethodReplySchema } from "@fungi.computer/agar/backend";
54
54
  import { nativeGitFrameMethods } from "@fungi.computer/agar/git-rpc";
55
55
  import { rpcHandleSchema, rpcMethod } from "@fungi.computer/agar/rpc";
56
56
  import { facetInvocationModule, facetFrameBindingModule, } from "./facet-invocation.js";
@@ -440,7 +440,6 @@ export function createCloudflareAppTestCopies(ctx, loader, ports, limits) {
440
440
  /** Run ordinary backend HTTP with bounded bodies and no live bindings. */
441
441
  fetch: (authority, copyId, request) => execute(authority, copyId, async (stub) => {
442
442
  const safe = appFacetRequest(request);
443
- safe.headers.delete(appBackendComputerHeader);
444
443
  const reply = facetHttpReplySchema.parse(await stub.http({
445
444
  url: safe.url,
446
445
  method: safe.method,
package/dist/host.js CHANGED
@@ -27,7 +27,7 @@ import { admits, scopedBindings, grantsFor } from "./apps/gate.js";
27
27
  import { appCallTargetName, appPermissionPageSchema, permissionSaveSchema, } from "./apps/permissions.js";
28
28
  import { app as appRoute, apps as appsRoute, door, member, oysterPrincipalIsOwner, owner, publicRoute, authorityOf, hostAuthorityPorts, reachesInstallation, routes, serveCapability, serveHost, } from "./authorization.js";
29
29
  import { deriveDeclaredOperations, appCallOperation, } from "./apps/operations.js";
30
- import { appBackendActorHeader, appBackendComputerHeader, appMethodRefusalStatus, } from "@fungi.computer/agar/backend";
30
+ import { appMethodRefusalStatus, } from "@fungi.computer/agar/backend";
31
31
  import { appCallsDescriptor, } from "./capability-descriptor.js";
32
32
  export { capabilityDescriptorSchema, capabilityMethodKindSchema, capabilityMethodSchema, } from "./capability-descriptor.js";
33
33
  import { selectionOf, } from "./index.js";
@@ -872,10 +872,7 @@ export function oysterRouteTable(host) {
872
872
  return noStoreRefusal(400, "Invalid copy id");
873
873
  const request = new Request("https://app.internal/", {
874
874
  method: "PUT",
875
- headers: {
876
- "Content-Type": "text/plain",
877
- [appBackendActorHeader]: oysterPrincipalId(copyOwned.principal),
878
- },
875
+ headers: { "Content-Type": "text/plain" },
879
876
  body: await context.req.text(),
880
877
  });
881
878
  return copyOwned.copies.fetch(copyOwned.authority, copyId.data, request);
@@ -1264,15 +1261,9 @@ export function oysterRouteTable(host) {
1264
1261
  const body = await context.req.text();
1265
1262
  if (new TextEncoder().encode(body).byteLength > maxBackendBody)
1266
1263
  return refusal(413, "Request too large");
1267
- const headers = new Headers({
1268
- "Content-Type": "text/plain",
1269
- [appBackendActorHeader]: oysterPrincipalId(principal),
1270
- });
1271
- if (host.computerId !== undefined)
1272
- headers.set(appBackendComputerHeader, host.computerId);
1273
1264
  const request = new Request("https://app.internal/", {
1274
1265
  method: "PUT",
1275
- headers,
1266
+ headers: { "Content-Type": "text/plain" },
1276
1267
  body,
1277
1268
  });
1278
1269
  const response = await host.instances
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fungi.computer/oyster",
3
- "version": "0.38.0",
3
+ "version": "0.38.1",
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",
@@ -358,9 +358,9 @@
358
358
  "dependencies": {
359
359
  "@cfworker/json-schema": "4.1.1",
360
360
  "@earendil-works/pi-ai": "1.5.2",
361
- "@fungi.computer/agar": "0.22.0",
361
+ "@fungi.computer/agar": "0.22.1",
362
362
  "@fungi.computer/bird-dog": "0.3.7",
363
- "@fungi.computer/braid": "0.5.2",
363
+ "@fungi.computer/braid": "0.5.3",
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",
@@ -368,27 +368,27 @@
368
368
  "@fungi.computer/carrier": "0.2.5",
369
369
  "@fungi.computer/computer": "0.14.6",
370
370
  "@fungi.computer/computer-contract": "0.5.6",
371
- "@fungi.computer/darkroom": "0.11.6",
371
+ "@fungi.computer/darkroom": "0.11.7",
372
372
  "@fungi.computer/ear-tag": "0.1.0",
373
373
  "@fungi.computer/forage": "0.3.13",
374
374
  "@fungi.computer/gills": "0.4.0",
375
375
  "@fungi.computer/knapsack": "0.4.19",
376
376
  "@fungi.computer/lantern": "0.4.2",
377
377
  "@fungi.computer/mycelium": "0.4.6",
378
- "@fungi.computer/nacre": "0.8.1",
379
- "@fungi.computer/parakeet": "0.13.2",
378
+ "@fungi.computer/nacre": "0.8.2",
379
+ "@fungi.computer/parakeet": "0.13.3",
380
380
  "@fungi.computer/puffball": "0.12.0",
381
381
  "@fungi.computer/seam": "0.2.6",
382
- "@fungi.computer/shiitake": "0.20.3",
383
- "@fungi.computer/shiitake-extensions": "0.11.8",
382
+ "@fungi.computer/shiitake": "0.20.4",
383
+ "@fungi.computer/shiitake-extensions": "0.11.9",
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
387
  "@fungi.computer/veil": "0.8.0",
388
388
  "@fungi.computer/watchdog": "0.1.4",
389
389
  "@fungi.computer/whistle": "0.3.0",
390
- "@fungi.computer/workflows-wire": "0.5.2",
391
- "@fungi.computer/zookeeper": "0.0.40",
390
+ "@fungi.computer/workflows-wire": "0.5.3",
391
+ "@fungi.computer/zookeeper": "0.0.41",
392
392
  "@modelcontextprotocol/server": "2.0.0",
393
393
  "@msgpack/msgpack": "3.1.3",
394
394
  "@napi-rs/keyring": "2.1.2",