@fungi.computer/oyster 0.21.1 → 0.21.3

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.
@@ -80,6 +80,12 @@ export declare class ComputerDO extends NativeComputerDO implements ComputerFetc
80
80
  #private;
81
81
  private readonly previewBindings;
82
82
  constructor(state: DurableObjectState, previewBindings: StandaloneComputerOwnerEnv);
83
+ /**
84
+ * The configured Computer predates the name record, and the container's
85
+ * object-id reconnect wakes it nameless after every redeploy; it learns its
86
+ * name from the configured id once the namespace verifies it.
87
+ */
88
+ protected nameCandidates(): readonly string[];
83
89
  /** Install the fleet's creation projection before exposing its new identity. */
84
90
  initializeFleetBackings(backings: readonly AttachedBackend[]): void;
85
91
  /** The owner's attached backends with live status. Reads wake nothing. */
@@ -124,6 +124,14 @@ export class ComputerDO extends NativeComputerDO {
124
124
  });
125
125
  this.previewBindings = previewBindings;
126
126
  }
127
+ /**
128
+ * The configured Computer predates the name record, and the container's
129
+ * object-id reconnect wakes it nameless after every redeploy; it learns its
130
+ * name from the configured id once the namespace verifies it.
131
+ */
132
+ nameCandidates() {
133
+ return [this.previewBindings.OYSTER_COMPUTER_ID];
134
+ }
127
135
  #fleetLifecycle() {
128
136
  if (this.#lifecycle !== undefined)
129
137
  return this.#lifecycle;
@@ -382,7 +390,10 @@ export class ComputerDO extends NativeComputerDO {
382
390
  return this.#previewOwner().fetch(signature, port, request);
383
391
  }
384
392
  #id() {
385
- return workspaceId.parse(this.state.id.name);
393
+ const name = this.computerName();
394
+ if (name === undefined)
395
+ throw new Error("Computer woken by object id before any named wake");
396
+ return workspaceId.parse(name);
386
397
  }
387
398
  /**
388
399
  * The host side of native execution (Computer ABI 0edb0e4a): the grant's
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fungi.computer/oyster",
3
- "version": "0.21.1",
3
+ "version": "0.21.3",
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",
@@ -346,7 +346,7 @@
346
346
  "@fungi.computer/capnweb": "0.12.0-fungi.0",
347
347
  "@fungi.computer/caps": "0.11.1",
348
348
  "@fungi.computer/carrier": "0.2.4",
349
- "@fungi.computer/computer": "0.8.4",
349
+ "@fungi.computer/computer": "0.8.6",
350
350
  "@fungi.computer/computer-contract": "0.1.0",
351
351
  "@fungi.computer/darkroom": "0.5.9",
352
352
  "@fungi.computer/ear-tag": "0.1.0",