@fungi.computer/computer 0.18.0 → 0.18.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.
@@ -3,6 +3,7 @@ export { checkComputerGrant, type ComputerAdmission } from "./admission.js";
3
3
  export { createFleetBacking } from "./backing.js";
4
4
  export { computerActionSchema, computerProvenanceSchema, computerGrantSchema, computerStateSchema, computerFactSchema, computerBackendViewSchema, localBackendAttachSchema, localBackendDetachSchema, localBackendDetachRequestSchema, ComputerBackingError, type ComputerAction, type ComputerProvenance, type ComputerGrant, type ComputerRuntimeState, type ComputerFact, type ComputerBackendView, type ComputerBackendsProjection, type ComputerBackingChange, type LocalBackendAttachInput, type LocalBackendDetachInput, } from "./wire.js";
5
5
  export { ComputerRuntimeUsage } from "./runtime-usage.js";
6
+ export { ComputerStartDisconnectedError } from "./lifecycle.js";
6
7
  export { computerKeepAwake } from "./keep-awake.js";
7
8
  export { computerUsageIntervalSchema, type ComputerUsageInterval, } from "./wire.js";
8
9
  export { createFleetInventory } from "./inventory.js";
@@ -3,6 +3,7 @@ export { checkComputerGrant } from "./admission.js";
3
3
  export { createFleetBacking } from "./backing.js";
4
4
  export { computerActionSchema, computerProvenanceSchema, computerGrantSchema, computerStateSchema, computerFactSchema, computerBackendViewSchema, localBackendAttachSchema, localBackendDetachSchema, localBackendDetachRequestSchema, ComputerBackingError, } from "./wire.js";
5
5
  export { ComputerRuntimeUsage } from "./runtime-usage.js";
6
+ export { ComputerStartDisconnectedError } from "./lifecycle.js";
6
7
  export { computerKeepAwake } from "./keep-awake.js";
7
8
  export { computerUsageIntervalSchema, } from "./wire.js";
8
9
  export { createFleetInventory } from "./inventory.js";
@@ -3,6 +3,14 @@ import type { ComputerDO as NativeComputerDO, OnBoxVmContainerHost } from "../in
3
3
  import { type ContainerRuntimeStart, type HostedBacking, type AttachedBackend, type AttachedBackendView } from "../computer-backends.js";
4
4
  import { ComputerRuntimeUsage } from "./runtime-usage.js";
5
5
  import type { ComputerGrant } from "./wire.js";
6
+ /**
7
+ * The hosted runtime was admitted and its workspace pushed, then it was not
8
+ * running. The name survives a Durable Object RPC, so a caller that only sees
9
+ * the error cross it can still say what happened.
10
+ */
11
+ export declare class ComputerStartDisconnectedError extends Error {
12
+ constructor();
13
+ }
6
14
  /** Runtime observations consumed by the host; never host callbacks. */
7
15
  export type FleetLifecycleFact = Readonly<{
8
16
  kind: "reservation.release" | "reservation.monitor";
@@ -5,6 +5,17 @@ import { z } from "zod";
5
5
  import { ComputerRuntimeUsage } from "./runtime-usage.js";
6
6
  import { checkComputerGrant } from "./admission.js";
7
7
  import { computerKeepAwake } from "./keep-awake.js";
8
+ /**
9
+ * The hosted runtime was admitted and its workspace pushed, then it was not
10
+ * running. The name survives a Durable Object RPC, so a caller that only sees
11
+ * the error cross it can still say what happened.
12
+ */
13
+ export class ComputerStartDisconnectedError extends Error {
14
+ constructor() {
15
+ super("Hosted Computer disconnected while starting");
16
+ this.name = "ComputerStartDisconnectedError";
17
+ }
18
+ }
8
19
  const vmRecycleAfterMs = 23 * 60 * 60 * 1_000;
9
20
  const vmRecycleQuietMs = 30_000;
10
21
  const runtimeWatchSchema = z.lazy(() => z.coerce.number().int().min(1_000).max(3_600_000).catch(60_000));
@@ -72,7 +83,7 @@ export class FleetLifecycle {
72
83
  await this.ports.backend.workspace().push(hosted.id);
73
84
  });
74
85
  if (!(await this.ports.backend.containerRunning(hosted.backing)))
75
- throw new Error("Hosted Computer disconnected while starting");
86
+ throw new ComputerStartDisconnectedError();
76
87
  return { state: "running" };
77
88
  }
78
89
  finally {
@@ -20840,6 +20840,7 @@ var appCapabilityIds = [
20840
20840
  "agent.avatar",
20841
20841
  "agent.instructions",
20842
20842
  "agent.toolPolicy",
20843
+ "agent.extensions",
20843
20844
  "agent.stop",
20844
20845
  "agent.read",
20845
20846
  "agent.send",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fungi.computer/computer",
3
- "version": "0.18.0",
3
+ "version": "0.18.1",
4
4
  "author": "Levi <levi@technomancy.dev>",
5
5
  "description": "Cloudflare Computer host for one durable Fungi Computer",
6
6
  "type": "module",
@@ -72,10 +72,10 @@
72
72
  "@fungi.computer/capnweb": "0.12.0-fungi.0",
73
73
  "@fungi.computer/cloudflare-computer": "0.2.1-fungi.3",
74
74
  "@fungi.computer/cordyceps": "0.4.3",
75
- "@fungi.computer/knapsack": "0.4.24",
75
+ "@fungi.computer/knapsack": "0.4.25",
76
76
  "@fungi.computer/seam": "0.2.7",
77
77
  "@fungi.computer/watchdog": "0.1.5",
78
- "@fungi.computer/computer-contract": "0.6.0",
78
+ "@fungi.computer/computer-contract": "0.6.1",
79
79
  "effect": "4.0.2",
80
80
  "just-bash": "3.4.2",
81
81
  "zod": "4.4.3",