@fungi.computer/computer 0.20.4 → 0.22.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/README.md +46 -0
- package/dist/create-environment.d.ts +55 -0
- package/dist/create-environment.js +144 -0
- package/dist/fleet/index.d.ts +1 -0
- package/dist/fleet/index.js +1 -0
- package/dist/fleet/inventory-wire.d.ts +17 -5
- package/dist/fleet/inventory-wire.js +4 -0
- package/dist/fleet/inventory.js +27 -0
- package/dist/fleet/lifecycle.d.ts +7 -0
- package/dist/fleet/lifecycle.js +6 -0
- package/dist/fleet/wire.d.ts +8 -2
- package/dist/fleet/wire.js +4 -0
- package/dist/index.d.ts +17 -2
- package/dist/index.js +67 -7
- package/dist/metered-container-host.d.ts +1 -1
- package/dist/metered-container-host.js +5 -3
- package/dist/on-box-vm.d.ts +4 -0
- package/dist/on-box-vm.js +1 -0
- package/dist/team-candidate-builder.mjs +12 -0
- package/dist/vault-references.d.ts +22 -11
- package/dist/vault-references.js +57 -8
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -96,6 +96,52 @@ compare-and-replace save pulls first, so a newer terminal edit surfaces as an
|
|
|
96
96
|
honest conflict instead of a silent overwrite, while a blind write still
|
|
97
97
|
overwrites the container's copy.
|
|
98
98
|
|
|
99
|
+
## Create with an environment, files and setup
|
|
100
|
+
|
|
101
|
+
Hub's Computer create request accepts `env`, `files` and `setupScript` alongside
|
|
102
|
+
`name`, `size` and its request ID. The environment is immutable for that
|
|
103
|
+
creation: replaying the request ID with different content refuses instead of
|
|
104
|
+
changing it.
|
|
105
|
+
|
|
106
|
+
```json
|
|
107
|
+
{
|
|
108
|
+
"env": {
|
|
109
|
+
"MODE": { "secret": false, "value": "development" },
|
|
110
|
+
"API_TOKEN": { "secret": true, "connectionId": "existing_vault_secret" }
|
|
111
|
+
},
|
|
112
|
+
"files": [{ "path": "/workspace/config.txt", "content": "development" }],
|
|
113
|
+
"setupScript": "cat /workspace/config.txt"
|
|
114
|
+
}
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
Environment names use portable shell identifiers. There are at most 100 entries
|
|
118
|
+
and 64 KiB of serialized environment data. Initial files contain UTF-8 text by
|
|
119
|
+
default, or base64 bytes with `"encoding": "base64"`. They use unique paths
|
|
120
|
+
under `/workspace/` without `.` or `..` segments, and are limited to 100 files,
|
|
121
|
+
128 KiB decoded each and 1 MiB decoded together. Setup accepts at most 16,384
|
|
122
|
+
characters and runs on the hosted backend with a ten-minute timeout, after files
|
|
123
|
+
arrive.
|
|
124
|
+
|
|
125
|
+
Secret entries must name existing destination-bound HTTP secrets in the Team's
|
|
126
|
+
Vault. They cannot carry a value. A missing secret or denied use refuses before
|
|
127
|
+
allocation and names the secret and cause. A member must have Vault management
|
|
128
|
+
authority; a Team key needs both `secret.use` scope and an existing live grant.
|
|
129
|
+
A Team key also needs `computer.command` on all Computers for setup or plain
|
|
130
|
+
startup environment, and `files.write` on all Computers for initial files; the
|
|
131
|
+
new Computer does not yet have an ID that a selected-resource grant can name.
|
|
132
|
+
The runtime issues invocation-scoped references to ordinary hosted commands and
|
|
133
|
+
setup. The Vault places the credential on admitted outbound requests; neither
|
|
134
|
+
setup nor the guest receives its clear value. Agent and App invocations retain
|
|
135
|
+
their own credential authority. Plain values also reach terminals; Vault
|
|
136
|
+
references are scoped to recorded commands and processes, not terminal sessions.
|
|
137
|
+
|
|
138
|
+
Setup's durable dispatch fence survives Computer reconstruction and ordinary
|
|
139
|
+
operation receipt expiry. A successful replay neither rewrites initial files nor
|
|
140
|
+
runs setup again. Failure returns its exit status; an interrupted dispatch
|
|
141
|
+
returns an uncertain outcome and never repeats possible side effects. Creation
|
|
142
|
+
may have allocated the Computer before file delivery or setup fails; reuse the
|
|
143
|
+
original request ID to recover delivery or read the retained setup outcome.
|
|
144
|
+
|
|
99
145
|
## Choose an execution backend
|
|
100
146
|
|
|
101
147
|
[Backend routing](src/computer-backends.ts) owns these choices:
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import type { WatchdogSqliteOwner } from "@fungi.computer/watchdog";
|
|
3
|
+
/** Creation payload limits, independent of the runtime's command limits. */
|
|
4
|
+
export declare const computerCreateEnvironmentSchema: z.ZodObject<{
|
|
5
|
+
env: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
6
|
+
secret: z.ZodLiteral<false>;
|
|
7
|
+
value: z.ZodString;
|
|
8
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
9
|
+
secret: z.ZodLiteral<true>;
|
|
10
|
+
connectionId: z.ZodString;
|
|
11
|
+
}, z.core.$strict>], "secret">>>;
|
|
12
|
+
files: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
13
|
+
path: z.ZodString;
|
|
14
|
+
content: z.ZodString;
|
|
15
|
+
encoding: z.ZodOptional<z.ZodEnum<{
|
|
16
|
+
base64: "base64";
|
|
17
|
+
utf8: "utf8";
|
|
18
|
+
}>>;
|
|
19
|
+
}, z.core.$strict>>>;
|
|
20
|
+
setupScript: z.ZodOptional<z.ZodString>;
|
|
21
|
+
}, z.core.$strict>;
|
|
22
|
+
export type ComputerCreateEnvironment = z.output<typeof computerCreateEnvironmentSchema>;
|
|
23
|
+
export type ComputerInitializationResult = Readonly<{
|
|
24
|
+
status: "ready";
|
|
25
|
+
} | {
|
|
26
|
+
status: "failed" | "unknown";
|
|
27
|
+
reason: string;
|
|
28
|
+
}>;
|
|
29
|
+
export declare class ComputerInitializationError extends Error {
|
|
30
|
+
readonly result: Exclude<ComputerInitializationResult, {
|
|
31
|
+
status: "ready";
|
|
32
|
+
}>;
|
|
33
|
+
constructor(result: Exclude<ComputerInitializationResult, {
|
|
34
|
+
status: "ready";
|
|
35
|
+
}>);
|
|
36
|
+
}
|
|
37
|
+
/** Stable replay identity: map order is not part of an environment's meaning. */
|
|
38
|
+
export declare function computerCreateEnvironmentIdentity(input: ComputerCreateEnvironment): string;
|
|
39
|
+
/** A named refusal carries metadata only, never a secret or submitted value. */
|
|
40
|
+
export declare class ComputerEnvironmentError extends Error {
|
|
41
|
+
readonly reason: "not_found" | "denied" | "unavailable" | "not_http" | "not_ready";
|
|
42
|
+
readonly secret: string;
|
|
43
|
+
constructor(reason: "not_found" | "denied" | "unavailable" | "not_http" | "not_ready", secret: string);
|
|
44
|
+
}
|
|
45
|
+
/** Immutable initialization in the Computer's own store; file delivery can resume. */
|
|
46
|
+
export declare function createComputerEnvironment(sql: WatchdogSqliteOwner["sql"]): {
|
|
47
|
+
read: () => ComputerCreateEnvironment;
|
|
48
|
+
install(input: ComputerCreateEnvironment): void;
|
|
49
|
+
filesWritten: () => boolean;
|
|
50
|
+
finishFiles: () => void;
|
|
51
|
+
setup(run: (script: string, accept: () => void) => Promise<ComputerInitializationResult>): Promise<ComputerInitializationResult>;
|
|
52
|
+
plain: () => {
|
|
53
|
+
[k: string]: string;
|
|
54
|
+
};
|
|
55
|
+
};
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { posix } from "node:path";
|
|
3
|
+
import { workspaceRoot } from "./files.js";
|
|
4
|
+
import { pathSchema, maximumCommandCharacters, } from "@fungi.computer/computer-contract";
|
|
5
|
+
const bytes = (value) => new TextEncoder().encode(value).byteLength;
|
|
6
|
+
const environmentName = z.string().regex(/^[A-Za-z_][A-Za-z0-9_]{0,127}$/u);
|
|
7
|
+
const environmentEntry = z.discriminatedUnion("secret", [
|
|
8
|
+
z.strictObject({
|
|
9
|
+
secret: z.literal(false),
|
|
10
|
+
value: z.string().refine((value) => !value.includes("\0")),
|
|
11
|
+
}),
|
|
12
|
+
z.strictObject({
|
|
13
|
+
secret: z.literal(true),
|
|
14
|
+
connectionId: z.string().regex(/^[A-Za-z0-9_.:-]{1,128}$/u),
|
|
15
|
+
}),
|
|
16
|
+
]);
|
|
17
|
+
const initialFileBytes = (file) => file.encoding === "base64"
|
|
18
|
+
? z.base64().safeParse(file.content).success
|
|
19
|
+
? atob(file.content).length
|
|
20
|
+
: Infinity
|
|
21
|
+
: bytes(file.content);
|
|
22
|
+
/** Creation payload limits, independent of the runtime's command limits. */
|
|
23
|
+
export const computerCreateEnvironmentSchema = z.strictObject({
|
|
24
|
+
env: z
|
|
25
|
+
.record(environmentName, environmentEntry)
|
|
26
|
+
.refine((env) => Object.keys(env).length <= 100 && bytes(JSON.stringify(env)) <= 65_536, "Environment must have at most 100 entries and 64 KiB")
|
|
27
|
+
.default({}),
|
|
28
|
+
files: z
|
|
29
|
+
.array(z
|
|
30
|
+
.strictObject({
|
|
31
|
+
path: pathSchema.refine((path) => path.startsWith(`${workspaceRoot}/`) &&
|
|
32
|
+
posix.normalize(path) === path &&
|
|
33
|
+
!path.endsWith("/"), "Initial file paths must be canonical paths under /workspace"),
|
|
34
|
+
content: z.string().max(174_764),
|
|
35
|
+
encoding: z.enum(["utf8", "base64"]).optional(),
|
|
36
|
+
})
|
|
37
|
+
.refine((file) => initialFileBytes(file) <= 131_072, "File must contain valid content of at most 128 KiB"))
|
|
38
|
+
.max(100, { abort: true })
|
|
39
|
+
.refine((files) => new Set(files.map((file) => file.path)).size === files.length &&
|
|
40
|
+
files.every((file) => !files.some((other) => other.path.startsWith(`${file.path}/`))) &&
|
|
41
|
+
files.reduce((total, file) => total + initialFileBytes(file), 0) <=
|
|
42
|
+
1_048_576, "Initial files must have unique, non-overlapping file paths and total at most 1 MiB")
|
|
43
|
+
.default([]),
|
|
44
|
+
setupScript: z
|
|
45
|
+
.string()
|
|
46
|
+
.min(1)
|
|
47
|
+
.max(maximumCommandCharacters)
|
|
48
|
+
.refine((script) => !script.includes("\0"), "Setup script cannot contain NUL")
|
|
49
|
+
.optional(),
|
|
50
|
+
});
|
|
51
|
+
export class ComputerInitializationError extends Error {
|
|
52
|
+
result;
|
|
53
|
+
constructor(result) {
|
|
54
|
+
super(result.reason);
|
|
55
|
+
this.result = result;
|
|
56
|
+
this.name = "ComputerInitializationError";
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
/** Stable replay identity: map order is not part of an environment's meaning. */
|
|
60
|
+
export function computerCreateEnvironmentIdentity(input) {
|
|
61
|
+
return JSON.stringify({
|
|
62
|
+
env: Object.fromEntries(Object.entries(input.env).sort(([a], [b]) => a.localeCompare(b))),
|
|
63
|
+
files: [...input.files].sort((a, b) => a.path.localeCompare(b.path)),
|
|
64
|
+
setupScript: input.setupScript ?? null,
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
/** A named refusal carries metadata only, never a secret or submitted value. */
|
|
68
|
+
export class ComputerEnvironmentError extends Error {
|
|
69
|
+
reason;
|
|
70
|
+
secret;
|
|
71
|
+
constructor(reason, secret) {
|
|
72
|
+
super(`Vault secret ${secret}: ${{ not_found: "does not exist", denied: "you cannot use it", unavailable: "authorization is unavailable", not_http: "is not a destination-bound HTTP secret", not_ready: "has no active credential; reconnect it in the Vault" }[reason]}.`);
|
|
73
|
+
this.reason = reason;
|
|
74
|
+
this.secret = secret;
|
|
75
|
+
this.name = "ComputerEnvironmentError";
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
/** Immutable initialization in the Computer's own store; file delivery can resume. */
|
|
79
|
+
export function createComputerEnvironment(sql) {
|
|
80
|
+
sql.exec("CREATE TABLE IF NOT EXISTS computer_create_environment (singleton INTEGER PRIMARY KEY CHECK(singleton=1), input_json TEXT NOT NULL, files_written INTEGER NOT NULL DEFAULT 0) STRICT");
|
|
81
|
+
sql.exec("CREATE TABLE IF NOT EXISTS computer_setup (singleton INTEGER PRIMARY KEY CHECK(singleton=1), status TEXT NOT NULL CHECK(status IN ('running','succeeded','failed','unknown')), detail TEXT NOT NULL) STRICT");
|
|
82
|
+
const row = () => z
|
|
83
|
+
.object({ input_json: z.string(), files_written: z.number() })
|
|
84
|
+
.optional()
|
|
85
|
+
.parse(sql
|
|
86
|
+
.exec("SELECT input_json,files_written FROM computer_create_environment WHERE singleton=1")
|
|
87
|
+
.toArray()[0]);
|
|
88
|
+
const read = () => {
|
|
89
|
+
const stored = row();
|
|
90
|
+
return computerCreateEnvironmentSchema.parse(stored === undefined ? {} : JSON.parse(stored.input_json));
|
|
91
|
+
};
|
|
92
|
+
return {
|
|
93
|
+
read,
|
|
94
|
+
install(input) {
|
|
95
|
+
const parsed = computerCreateEnvironmentSchema.parse(input);
|
|
96
|
+
const identity = computerCreateEnvironmentIdentity(parsed);
|
|
97
|
+
const stored = row();
|
|
98
|
+
if (stored !== undefined &&
|
|
99
|
+
computerCreateEnvironmentIdentity(read()) !== identity)
|
|
100
|
+
throw new Error("Computer initialization conflicts with its original creation request");
|
|
101
|
+
if (stored === undefined)
|
|
102
|
+
sql.exec("INSERT INTO computer_create_environment(singleton,input_json) VALUES(1,?)", JSON.stringify(parsed));
|
|
103
|
+
},
|
|
104
|
+
filesWritten: () => row()?.files_written === 1,
|
|
105
|
+
finishFiles: () => {
|
|
106
|
+
sql.exec("UPDATE computer_create_environment SET files_written=1 WHERE singleton=1");
|
|
107
|
+
},
|
|
108
|
+
async setup(run) {
|
|
109
|
+
const script = read().setupScript;
|
|
110
|
+
if (script === undefined)
|
|
111
|
+
return { status: "ready" };
|
|
112
|
+
const previous = z
|
|
113
|
+
.object({
|
|
114
|
+
status: z.enum(["running", "succeeded", "failed", "unknown"]),
|
|
115
|
+
detail: z.string(),
|
|
116
|
+
})
|
|
117
|
+
.optional()
|
|
118
|
+
.parse(sql
|
|
119
|
+
.exec("SELECT status,detail FROM computer_setup WHERE singleton=1")
|
|
120
|
+
.toArray()[0]);
|
|
121
|
+
if (previous?.status === "succeeded")
|
|
122
|
+
return { status: "ready" };
|
|
123
|
+
if (previous !== undefined)
|
|
124
|
+
return {
|
|
125
|
+
status: previous.status === "running" ? "unknown" : previous.status,
|
|
126
|
+
reason: previous.status === "running"
|
|
127
|
+
? "Computer setup was interrupted; its outcome is unknown and it will not run again."
|
|
128
|
+
: previous.detail,
|
|
129
|
+
};
|
|
130
|
+
// Admission fences dispatch. Refusal before acceptance remains retryable;
|
|
131
|
+
// reconstruction never repeats an accepted script after receipt expiry.
|
|
132
|
+
const result = await run(script, () => {
|
|
133
|
+
sql.exec("INSERT INTO computer_setup VALUES(1,'running','')");
|
|
134
|
+
});
|
|
135
|
+
if (sql
|
|
136
|
+
.exec("SELECT singleton FROM computer_setup WHERE singleton=1")
|
|
137
|
+
.toArray().length === 0)
|
|
138
|
+
throw new Error("Computer setup execution did not accept the request");
|
|
139
|
+
sql.exec("UPDATE computer_setup SET status=?,detail=? WHERE singleton=1", result.status === "ready" ? "succeeded" : result.status, result.status === "ready" ? "" : result.reason);
|
|
140
|
+
return result;
|
|
141
|
+
},
|
|
142
|
+
plain: () => Object.fromEntries(Object.entries(read().env).flatMap(([name, entry]) => entry.secret ? [] : [[name, entry.value]])),
|
|
143
|
+
};
|
|
144
|
+
}
|
package/dist/fleet/index.d.ts
CHANGED
|
@@ -11,3 +11,4 @@ export { ComputerInventoryError, computerCreateRequestSchema, computerPageSchema
|
|
|
11
11
|
export { createFleetSlots } from "./slots.js";
|
|
12
12
|
export { FleetLifecycle, FleetGrantRefused, type FleetLifecyclePorts, type FleetLifecycleFact, } from "./lifecycle.js";
|
|
13
13
|
export { createFleetComputers } from "./computers.js";
|
|
14
|
+
export { computerCreateEnvironmentSchema, ComputerEnvironmentError, ComputerInitializationError, type ComputerCreateEnvironment, type ComputerInitializationResult, } from "../create-environment.js";
|
package/dist/fleet/index.js
CHANGED
|
@@ -11,3 +11,4 @@ export { ComputerInventoryError, computerCreateRequestSchema, computerPageSchema
|
|
|
11
11
|
export { createFleetSlots } from "./slots.js";
|
|
12
12
|
export { FleetLifecycle, FleetGrantRefused, } from "./lifecycle.js";
|
|
13
13
|
export { createFleetComputers } from "./computers.js";
|
|
14
|
+
export { computerCreateEnvironmentSchema, ComputerEnvironmentError, ComputerInitializationError, } from "../create-environment.js";
|
|
@@ -15,6 +15,22 @@ export type FleetComputer = Readonly<{
|
|
|
15
15
|
}>;
|
|
16
16
|
/** A durable create receipt binds the complete request to its actor. */
|
|
17
17
|
export declare const computerCreateRequestSchema: z.ZodObject<{
|
|
18
|
+
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
19
|
+
secret: z.ZodLiteral<false>;
|
|
20
|
+
value: z.ZodString;
|
|
21
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
22
|
+
secret: z.ZodLiteral<true>;
|
|
23
|
+
connectionId: z.ZodString;
|
|
24
|
+
}, z.core.$strict>], "secret">>>;
|
|
25
|
+
files: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
26
|
+
path: z.ZodString;
|
|
27
|
+
content: z.ZodString;
|
|
28
|
+
encoding: z.ZodOptional<z.ZodEnum<{
|
|
29
|
+
base64: "base64";
|
|
30
|
+
utf8: "utf8";
|
|
31
|
+
}>>;
|
|
32
|
+
}, z.core.$strict>>>;
|
|
33
|
+
setupScript: z.ZodOptional<z.ZodString>;
|
|
18
34
|
name: z.ZodOptional<z.ZodString>;
|
|
19
35
|
size: z.ZodOptional<z.ZodEnum<{
|
|
20
36
|
default: "default";
|
|
@@ -23,11 +39,7 @@ export declare const computerCreateRequestSchema: z.ZodObject<{
|
|
|
23
39
|
}>>;
|
|
24
40
|
requestId: z.ZodString;
|
|
25
41
|
}, z.core.$strict>;
|
|
26
|
-
export type ComputerCreateRequest =
|
|
27
|
-
name?: string | undefined;
|
|
28
|
-
size?: ComputerSize | undefined;
|
|
29
|
-
requestId: string;
|
|
30
|
-
}>;
|
|
42
|
+
export type ComputerCreateRequest = z.input<typeof computerCreateRequestSchema>;
|
|
31
43
|
/** Inventory pages retain stable ordering and a bounded response. */
|
|
32
44
|
export declare const computerPageSchema: z.ZodObject<{
|
|
33
45
|
limit: z.ZodDefault<z.ZodNumber>;
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { computerSizeSchema } from "../computer-backends.js";
|
|
3
|
+
import { computerCreateEnvironmentSchema } from "../create-environment.js";
|
|
3
4
|
/** A durable create receipt binds the complete request to its actor. */
|
|
4
5
|
export const computerCreateRequestSchema = z.strictObject({
|
|
6
|
+
env: computerCreateEnvironmentSchema.shape.env.unwrap().optional(),
|
|
7
|
+
files: computerCreateEnvironmentSchema.shape.files.unwrap().optional(),
|
|
8
|
+
setupScript: computerCreateEnvironmentSchema.shape.setupScript,
|
|
5
9
|
name: z.string().min(1).max(256).optional(),
|
|
6
10
|
/** Omitted means `default`. */
|
|
7
11
|
size: computerSizeSchema.optional(),
|
package/dist/fleet/inventory.js
CHANGED
|
@@ -1,8 +1,14 @@
|
|
|
1
|
+
import { createHash } from "node:crypto";
|
|
1
2
|
import { words } from "@fungi.computer/cairn";
|
|
2
3
|
import { defineIdFamily } from "@fungi.computer/cairn/id";
|
|
3
4
|
import { z } from "zod";
|
|
4
5
|
import { computerSizeSchema, defaultComputerSize, } from "../computer-backends.js";
|
|
5
6
|
import { ComputerInventoryError, computerPageSchema, } from "./inventory-wire.js";
|
|
7
|
+
import { computerCreateEnvironmentSchema, computerCreateEnvironmentIdentity, } from "../create-environment.js";
|
|
8
|
+
/** Replay needs only a fingerprint; initial file contents stay with the Computer. */
|
|
9
|
+
const environmentFingerprint = (input) => createHash("sha256")
|
|
10
|
+
.update(computerCreateEnvironmentIdentity(input))
|
|
11
|
+
.digest("hex");
|
|
6
12
|
const computerIds = defineIdFamily({
|
|
7
13
|
family: "computer",
|
|
8
14
|
version: 1,
|
|
@@ -46,6 +52,7 @@ export function createFleetInventory(options) {
|
|
|
46
52
|
if (!columns.some(({ name }) => name === "size"))
|
|
47
53
|
sql.exec(`ALTER TABLE hub_team_computers ADD COLUMN size TEXT NOT NULL DEFAULT '${defaultComputerSize}' CHECK (size IN ('small','default','large'))`);
|
|
48
54
|
sql.exec("CREATE TABLE IF NOT EXISTS hub_team_computer_create_receipts (request_id TEXT PRIMARY KEY, actor_kind TEXT NOT NULL, actor_id TEXT NOT NULL, requested_name TEXT, name TEXT NOT NULL, computer_id TEXT NOT NULL REFERENCES hub_team_computers(computer_id)) STRICT");
|
|
55
|
+
sql.exec("CREATE TABLE IF NOT EXISTS computer_create_inputs (request_id TEXT PRIMARY KEY, fingerprint TEXT NOT NULL) STRICT");
|
|
49
56
|
};
|
|
50
57
|
const decode = (row) => {
|
|
51
58
|
const id = computerIds.computer.parse(row.computer_id);
|
|
@@ -135,6 +142,21 @@ export function createFleetInventory(options) {
|
|
|
135
142
|
if (stored.success &&
|
|
136
143
|
stored.data.size !== (request.size ?? defaultComputerSize))
|
|
137
144
|
throw new ComputerInventoryError("request_conflict");
|
|
145
|
+
const initialization = z
|
|
146
|
+
.object({ fingerprint: z.string() })
|
|
147
|
+
.optional()
|
|
148
|
+
.parse(sql
|
|
149
|
+
.exec("SELECT fingerprint FROM computer_create_inputs WHERE request_id=?", request.requestId)
|
|
150
|
+
.toArray()[0]);
|
|
151
|
+
const requested = computerCreateEnvironmentSchema.parse({
|
|
152
|
+
env: request.env,
|
|
153
|
+
files: request.files,
|
|
154
|
+
setupScript: request.setupScript,
|
|
155
|
+
});
|
|
156
|
+
if ((initialization?.fingerprint ??
|
|
157
|
+
environmentFingerprint(computerCreateEnvironmentSchema.parse({}))) !==
|
|
158
|
+
environmentFingerprint(requested))
|
|
159
|
+
throw new ComputerInventoryError("request_conflict");
|
|
138
160
|
if (!stored.success ||
|
|
139
161
|
stored.data.name !== receipt.data.name ||
|
|
140
162
|
stored.data.actor_kind !== receipt.data.actor_kind ||
|
|
@@ -158,6 +180,11 @@ export function createFleetInventory(options) {
|
|
|
158
180
|
sql.exec("INSERT INTO hub_team_computers (computer_id,name,size,actor_kind,actor_id,active,created_at,updated_at) VALUES (?,?,?,?,?,?,?,?)", computerId, name, request.size ?? defaultComputerSize, columns.actorKind, columns.actorId, 1, now, now);
|
|
159
181
|
sql.exec("INSERT INTO hub_team_computer_create_receipts (request_id,actor_kind,actor_id,requested_name,name,computer_id) VALUES (?,?,?,?,?,?)", request.requestId, columns.actorKind, columns.actorId, request.name ?? null, name, computerId);
|
|
160
182
|
const created = read(computerId);
|
|
183
|
+
sql.exec("INSERT INTO computer_create_inputs VALUES(?,?)", request.requestId, environmentFingerprint(computerCreateEnvironmentSchema.parse({
|
|
184
|
+
env: request.env,
|
|
185
|
+
files: request.files,
|
|
186
|
+
setupScript: request.setupScript,
|
|
187
|
+
})));
|
|
161
188
|
if (created === null)
|
|
162
189
|
throw new ComputerInventoryError("partial_init");
|
|
163
190
|
return created;
|
|
@@ -90,12 +90,19 @@ export declare class FleetLifecycle {
|
|
|
90
90
|
readComputerState(): Promise<{
|
|
91
91
|
state: "queued";
|
|
92
92
|
position: number;
|
|
93
|
+
reason?: never;
|
|
93
94
|
} | {
|
|
94
95
|
state: "running" | "starting";
|
|
95
96
|
position?: never;
|
|
97
|
+
reason?: never;
|
|
98
|
+
} | {
|
|
99
|
+
state: "sleeping";
|
|
100
|
+
reason: string;
|
|
101
|
+
position?: never;
|
|
96
102
|
} | {
|
|
97
103
|
state: "running" | "sleeping";
|
|
98
104
|
position?: never;
|
|
105
|
+
reason?: never;
|
|
99
106
|
}>;
|
|
100
107
|
/** The Computer page's read: each attached backend and its live status. */
|
|
101
108
|
readAttachedBackends(): Promise<(Omit<AttachedBackendView, "status"> & {
|
package/dist/fleet/lifecycle.js
CHANGED
|
@@ -122,6 +122,7 @@ export class FleetLifecycle {
|
|
|
122
122
|
return { state: "queued", position };
|
|
123
123
|
if (this.#startingHosted > 0)
|
|
124
124
|
return { state: "starting" };
|
|
125
|
+
let stoppedReason;
|
|
125
126
|
for (const backing of this.ports.backend.attachedBackends()) {
|
|
126
127
|
if (backing.kind === "on-box-vm") {
|
|
127
128
|
const runtime = await this.ports.backend
|
|
@@ -133,12 +134,17 @@ export class FleetLifecycle {
|
|
|
133
134
|
? "starting"
|
|
134
135
|
: "running",
|
|
135
136
|
};
|
|
137
|
+
if (runtime.exit?.code === "scratch_pool_full")
|
|
138
|
+
stoppedReason = runtime.exit.reason;
|
|
136
139
|
}
|
|
137
140
|
else if (backing.kind === "platform-container" &&
|
|
138
141
|
(await this.ports.backend.containerRunning(backing))) {
|
|
139
142
|
return { state: "running" };
|
|
140
143
|
}
|
|
141
144
|
}
|
|
145
|
+
if (!backends.some((backend) => backend.status === "online") &&
|
|
146
|
+
stoppedReason !== undefined)
|
|
147
|
+
return { state: "sleeping", reason: stoppedReason };
|
|
142
148
|
return {
|
|
143
149
|
state: backends.some((backend) => backend.status === "online")
|
|
144
150
|
? "running"
|
package/dist/fleet/wire.d.ts
CHANGED
|
@@ -4,8 +4,8 @@ import { hostedBackingSchema, type AttachedBackend } from "../computer-backends.
|
|
|
4
4
|
export declare const computerActionSchema: z.ZodEnum<{
|
|
5
5
|
start: "start";
|
|
6
6
|
exec: "exec";
|
|
7
|
-
delete: "delete";
|
|
8
7
|
mkdir: "mkdir";
|
|
8
|
+
delete: "delete";
|
|
9
9
|
backing: "backing";
|
|
10
10
|
bash: "bash";
|
|
11
11
|
"files.read": "files.read";
|
|
@@ -50,8 +50,8 @@ export declare const computerGrantSchema: z.ZodObject<{
|
|
|
50
50
|
actions: z.ZodReadonly<z.ZodSet<z.ZodEnum<{
|
|
51
51
|
start: "start";
|
|
52
52
|
exec: "exec";
|
|
53
|
-
delete: "delete";
|
|
54
53
|
mkdir: "mkdir";
|
|
54
|
+
delete: "delete";
|
|
55
55
|
backing: "backing";
|
|
56
56
|
bash: "bash";
|
|
57
57
|
"files.read": "files.read";
|
|
@@ -98,6 +98,9 @@ export declare const computerStateSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
98
98
|
sleeping: "sleeping";
|
|
99
99
|
starting: "starting";
|
|
100
100
|
}>;
|
|
101
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
102
|
+
state: z.ZodLiteral<"sleeping">;
|
|
103
|
+
reason: z.ZodString;
|
|
101
104
|
}, z.core.$strict>, z.ZodObject<{
|
|
102
105
|
state: z.ZodLiteral<"start_failed">;
|
|
103
106
|
}, z.core.$strict>, z.ZodObject<{
|
|
@@ -252,6 +255,9 @@ export declare const computerFactSchema: z.ZodLazy<z.ZodDiscriminatedUnion<[z.Zo
|
|
|
252
255
|
sleeping: "sleeping";
|
|
253
256
|
starting: "starting";
|
|
254
257
|
}>;
|
|
258
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
259
|
+
state: z.ZodLiteral<"sleeping">;
|
|
260
|
+
reason: z.ZodString;
|
|
255
261
|
}, z.core.$strict>, z.ZodObject<{
|
|
256
262
|
state: z.ZodLiteral<"start_failed">;
|
|
257
263
|
}, z.core.$strict>, z.ZodObject<{
|
package/dist/fleet/wire.js
CHANGED
|
@@ -42,6 +42,10 @@ export const computerGrantSchema = z.strictObject({
|
|
|
42
42
|
/** State visible without knowing which application hosts the Computer. */
|
|
43
43
|
export const computerStateSchema = z.union([
|
|
44
44
|
z.strictObject({ state: z.enum(["running", "sleeping", "starting"]) }),
|
|
45
|
+
z.strictObject({
|
|
46
|
+
state: z.literal("sleeping"),
|
|
47
|
+
reason: z.string().min(1).max(1_024),
|
|
48
|
+
}),
|
|
45
49
|
// An owed start ended without running; start again. `reason` says why
|
|
46
50
|
// where the reader asked for it or decodes extra keys: released strict
|
|
47
51
|
// readers, and Hubs from before it, see `start_failed` alone. Two shapes,
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type ComputerCreateEnvironment, type ComputerInitializationResult } from "./create-environment.js";
|
|
1
2
|
export type { WorkspaceRuntimeResultOptions } from "@fungi.computer/cloudflare-computer";
|
|
2
3
|
export { createLocalBackendReplayStore } from "./local-backend-replay.js";
|
|
3
4
|
import { type VaultGrantPort, type VaultReferenceAdmission } from "./vault-references.js";
|
|
@@ -87,6 +88,16 @@ declare class ContainerComputer extends ContainerComputerBase {
|
|
|
87
88
|
#private;
|
|
88
89
|
/** Parked dial-ins from attached machines; survives Workspace rebuilds. */
|
|
89
90
|
readonly localConnections: LocalBackendConnections;
|
|
91
|
+
protected creationEnvironment(): {
|
|
92
|
+
read: () => ComputerCreateEnvironment;
|
|
93
|
+
install(input: ComputerCreateEnvironment): void;
|
|
94
|
+
filesWritten: () => boolean;
|
|
95
|
+
finishFiles: () => void;
|
|
96
|
+
setup(run: (script: string, accept: () => void) => Promise<ComputerInitializationResult>): Promise<ComputerInitializationResult>;
|
|
97
|
+
plain: () => {
|
|
98
|
+
[k: string]: string;
|
|
99
|
+
};
|
|
100
|
+
};
|
|
90
101
|
constructor(ctx: DurableObjectState, env: ComputerEnv);
|
|
91
102
|
/**
|
|
92
103
|
* This Computer's name, from storage: an instance first woken by object id
|
|
@@ -171,6 +182,10 @@ declare class ContainerComputer extends ContainerComputerBase {
|
|
|
171
182
|
/** One upstream Cloudflare Workspace that advertises and runs its capabilities. */
|
|
172
183
|
export declare class ComputerDO extends ContainerComputer implements ComputerFilesRpc {
|
|
173
184
|
#private;
|
|
185
|
+
/** Deliver immutable create input and retain its setup outcome across retries. */
|
|
186
|
+
initializeCreation(input: ComputerCreateEnvironment, context?: ComputerValue): Promise<ComputerInitializationResult>;
|
|
187
|
+
/** Hosted owners may bind configured Vault references to each command. */
|
|
188
|
+
protected creationExecutionContext(): Promise<ComputerValue | undefined>;
|
|
174
189
|
constructor(ctx: DurableObjectState, env: ComputerEnv);
|
|
175
190
|
/** The fleet slept this backend after it sat idle; its running commands ended with it. */
|
|
176
191
|
protected endedByIdleSleep(backendId: string): void;
|
|
@@ -335,7 +350,7 @@ export declare class ComputerDO extends ContainerComputer implements ComputerFil
|
|
|
335
350
|
/** Start one long-running container process with a durable identity. */
|
|
336
351
|
startProcess(input: ComputerValue): Promise<ComputerProcess>;
|
|
337
352
|
/** The host accepts authority when the running slot is reserved. */
|
|
338
|
-
protected startProcessAfterAcceptance(input: ComputerValue, accept: () => void,
|
|
353
|
+
protected startProcessAfterAcceptance(input: ComputerValue, accept: () => void, requestedContext?: ComputerValue): Promise<ComputerProcess>;
|
|
339
354
|
/** List this Computer's processes, reconciling live ones with computerd. */
|
|
340
355
|
listProcesses(): Promise<{
|
|
341
356
|
processes: ComputerProcess[];
|
|
@@ -397,7 +412,7 @@ export { WorkspaceProxy, WorkspaceServiceProxy };
|
|
|
397
412
|
export { computerName, learnComputerName } from "./computer-name.js";
|
|
398
413
|
export { OnBoxVmContainerHost, OnBoxVmTimeoutError, OnBoxVmUnavailableError, onBoxVmPlacement, onBoxVmIngress, type OnBoxVmEnv, type OnBoxVmOperation, type OnBoxVmSshCertificate, type OnBoxVmState, } from "./on-box-vm.js";
|
|
399
414
|
export { computerContainerSleepAfterMs } from "./container-policy.js";
|
|
400
|
-
export { isVaultExecutionContext, vaultExecutionContext, withVaultExecution, type VaultGrantPort, type VaultHolder, type VaultReferenceAdmission, type VaultSecretGrant, type VaultSubject, } from "./vault-references.js";
|
|
415
|
+
export { isVaultExecutionContext, vaultExecutionContext, vaultExecutionContextForSubject, withVaultExecution, type VaultGrantPort, type VaultHolder, type VaultReferenceAdmission, type VaultSecretGrant, type VaultSubject, } from "./vault-references.js";
|
|
401
416
|
export * from "./computer-backends.js";
|
|
402
417
|
export { LocalBackendOfflineError, localBackendAudience, localBackendDialPath, ownerLocalBackendDialPath, verifyLocalBackendDial, } from "./local-backend.js";
|
|
403
418
|
/** Keep each native Workspace lease inside the operation that uses it. */
|
package/dist/index.js
CHANGED
|
@@ -51,6 +51,7 @@ var __disposeResources = (this && this.__disposeResources) || (function (Suppres
|
|
|
51
51
|
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
52
52
|
});
|
|
53
53
|
import { boundExecStream } from "./exec-output.js";
|
|
54
|
+
import { createComputerEnvironment, } from "./create-environment.js";
|
|
54
55
|
import { portPreviewFailure } from "./port-failure.js";
|
|
55
56
|
import { forwardPreviewWaitingForPort } from "./preview-wait.js";
|
|
56
57
|
export { createLocalBackendReplayStore } from "./local-backend-replay.js";
|
|
@@ -204,7 +205,7 @@ async function write(workspace, input) {
|
|
|
204
205
|
bytes: utf8.encode(content).byteLength,
|
|
205
206
|
});
|
|
206
207
|
}
|
|
207
|
-
async function exec(workspace, input, backend, signal, execution, resultOptions) {
|
|
208
|
+
async function exec(workspace, input, backend, signal, execution, resultOptions, environment) {
|
|
208
209
|
const env_1 = { stack: [], error: void 0, hasError: false };
|
|
209
210
|
try {
|
|
210
211
|
// The host request has already been decoded under its admitted budget.
|
|
@@ -216,6 +217,7 @@ async function exec(workspace, input, backend, signal, execution, resultOptions)
|
|
|
216
217
|
const nativeOptions = {
|
|
217
218
|
...options,
|
|
218
219
|
...execution?.carriage,
|
|
220
|
+
env: { ...environment, ...execution?.carriage.env },
|
|
219
221
|
};
|
|
220
222
|
if (execution !== undefined)
|
|
221
223
|
nativeOptions.id = execution.invocation.id;
|
|
@@ -309,6 +311,10 @@ class ContainerComputer extends ContainerComputerBase {
|
|
|
309
311
|
* `observeSync`), not read from this tracker.
|
|
310
312
|
*/
|
|
311
313
|
#pullPending = new PullPendingTracker();
|
|
314
|
+
#creationEnvironment;
|
|
315
|
+
creationEnvironment() {
|
|
316
|
+
return (this.#creationEnvironment ??= createComputerEnvironment(this.state.storage.sql));
|
|
317
|
+
}
|
|
312
318
|
constructor(ctx, env) {
|
|
313
319
|
super(ctx, env);
|
|
314
320
|
if (ctx.id.name !== undefined)
|
|
@@ -448,7 +454,7 @@ class ContainerComputer extends ContainerComputerBase {
|
|
|
448
454
|
return new MeteredContainerHost(host, backing, () => this.computerSize(), (start) => {
|
|
449
455
|
this.containerRuntimeStarted(start);
|
|
450
456
|
this.hostedRuntimeStarted(start.backing);
|
|
451
|
-
});
|
|
457
|
+
}, () => this.creationEnvironment().plain());
|
|
452
458
|
}
|
|
453
459
|
/** The on-box VM host service for `hostId`, one per placement. */
|
|
454
460
|
onBoxVmHost(hostId) {
|
|
@@ -611,6 +617,52 @@ class ContainerComputer extends ContainerComputerBase {
|
|
|
611
617
|
}
|
|
612
618
|
/** One upstream Cloudflare Workspace that advertises and runs its capabilities. */
|
|
613
619
|
export class ComputerDO extends ContainerComputer {
|
|
620
|
+
#initializing;
|
|
621
|
+
/** Deliver immutable create input and retain its setup outcome across retries. */
|
|
622
|
+
initializeCreation(input, context) {
|
|
623
|
+
const environment = this.creationEnvironment();
|
|
624
|
+
environment.install(input);
|
|
625
|
+
if (this.#initializing !== undefined)
|
|
626
|
+
return this.#initializing;
|
|
627
|
+
const run = async () => {
|
|
628
|
+
if (context !== undefined)
|
|
629
|
+
await this.state.storage.put("computer.create.context", context);
|
|
630
|
+
if (!environment.filesWritten()) {
|
|
631
|
+
const workspace = await this.readyWorkspace();
|
|
632
|
+
for (const file of environment.read().files) {
|
|
633
|
+
const parent = file.path.slice(0, file.path.lastIndexOf("/")) || "/";
|
|
634
|
+
await workspace.fs.mkdir(parent, { recursive: true });
|
|
635
|
+
await workspace.fs.writeFile(file.path, file.encoding === "base64"
|
|
636
|
+
? Uint8Array.from(atob(file.content), (character) => character.charCodeAt(0))
|
|
637
|
+
: file.content);
|
|
638
|
+
}
|
|
639
|
+
environment.finishFiles();
|
|
640
|
+
}
|
|
641
|
+
return await environment.setup(async (script, accept) => {
|
|
642
|
+
const result = await this.executeOperationAfterAcceptance({
|
|
643
|
+
requestId: mintComputerRequestId(),
|
|
644
|
+
command: script,
|
|
645
|
+
timeoutMs: 600_000,
|
|
646
|
+
}, accept, "hosted", undefined, undefined, await this.creationExecutionContext());
|
|
647
|
+
if (result.status === "succeeded")
|
|
648
|
+
return { status: "ready" };
|
|
649
|
+
return {
|
|
650
|
+
status: result.status === "failed" ? "failed" : "unknown",
|
|
651
|
+
reason: result.status === "failed"
|
|
652
|
+
? `Computer setup failed with exit code ${String(result.output?.exitCode ?? "unknown")}.${result.output?.stderr.trim() ? ` ${result.output.stderr.trim().slice(0, 1024)}` : ""}`
|
|
653
|
+
: `Computer setup ${result.status}: ${result.cause ?? "the runtime did not establish its outcome"}; it will not run again.`,
|
|
654
|
+
};
|
|
655
|
+
});
|
|
656
|
+
};
|
|
657
|
+
this.#initializing = run().finally(() => {
|
|
658
|
+
this.#initializing = undefined;
|
|
659
|
+
});
|
|
660
|
+
return this.#initializing;
|
|
661
|
+
}
|
|
662
|
+
/** Hosted owners may bind configured Vault references to each command. */
|
|
663
|
+
async creationExecutionContext() {
|
|
664
|
+
return await this.state.storage.get("computer.create.context");
|
|
665
|
+
}
|
|
614
666
|
constructor(ctx, env) {
|
|
615
667
|
super(ctx, env);
|
|
616
668
|
// Reconstruction revokes unfinished exec authority before the first RPC.
|
|
@@ -759,7 +811,7 @@ export class ComputerDO extends ContainerComputer {
|
|
|
759
811
|
return undefined;
|
|
760
812
|
}
|
|
761
813
|
get #vaultReferences() {
|
|
762
|
-
return (this.#vaultReferenceRecord ??= createComputerVaultReferences(this.state.storage
|
|
814
|
+
return (this.#vaultReferenceRecord ??= createComputerVaultReferences(this.state.storage));
|
|
763
815
|
}
|
|
764
816
|
/**
|
|
765
817
|
* The hooks that put an Agent command's Vault references in its
|
|
@@ -1428,7 +1480,7 @@ export class ComputerDO extends ContainerComputer {
|
|
|
1428
1480
|
};
|
|
1429
1481
|
}
|
|
1430
1482
|
stage = "dispatched";
|
|
1431
|
-
const output = await exec(workspace, command, route?.id, signal, execution, resultOptions);
|
|
1483
|
+
const output = await exec(workspace, command, route?.id, signal, execution, resultOptions, this.creationEnvironment().plain());
|
|
1432
1484
|
completed = true;
|
|
1433
1485
|
operations.settle(requestId, output);
|
|
1434
1486
|
}
|
|
@@ -1480,12 +1532,18 @@ export class ComputerDO extends ContainerComputer {
|
|
|
1480
1532
|
return await this.startProcessAfterAcceptance(input, () => undefined);
|
|
1481
1533
|
}
|
|
1482
1534
|
/** The host accepts authority when the running slot is reserved. */
|
|
1483
|
-
async startProcessAfterAcceptance(input, accept,
|
|
1535
|
+
async startProcessAfterAcceptance(input, accept, requestedContext) {
|
|
1484
1536
|
const start = processStartInputSchema.parse(input);
|
|
1485
1537
|
const { command, cwd } = start;
|
|
1538
|
+
const contextForBackend = (backend) => requestedContext !== undefined &&
|
|
1539
|
+
isVaultExecutionContext(requestedContext) &&
|
|
1540
|
+
(backend === undefined || this.hostedRoute(backend) === undefined)
|
|
1541
|
+
? undefined
|
|
1542
|
+
: requestedContext;
|
|
1486
1543
|
const inputHash = await sha256(JSON.stringify({ command, cwd: cwd ?? null, port: start.port ?? null }));
|
|
1487
1544
|
const replay = this.#processes.replay(start, inputHash, accept);
|
|
1488
1545
|
if (replay !== undefined) {
|
|
1546
|
+
const executionContext = contextForBackend(this.#processes.backend(replay.id));
|
|
1489
1547
|
if (executionContext !== undefined)
|
|
1490
1548
|
await this.#renewExecution(replay.id);
|
|
1491
1549
|
return this.#processReceipt(replay, executionContext !== undefined);
|
|
@@ -1493,6 +1551,7 @@ export class ComputerDO extends ContainerComputer {
|
|
|
1493
1551
|
if (start.port !== undefined && isComputerReservedPort(start.port))
|
|
1494
1552
|
throw new ComputerPortReservedError(start.port);
|
|
1495
1553
|
const backend = this.routeBackend(undefined, "exec").id;
|
|
1554
|
+
const executionContext = contextForBackend(backend);
|
|
1496
1555
|
const workspace = await this.readyWorkspace();
|
|
1497
1556
|
const admission = this.#processes.admit(backend, start, inputHash, accept);
|
|
1498
1557
|
if (!admission.created) {
|
|
@@ -1513,6 +1572,7 @@ export class ComputerDO extends ContainerComputer {
|
|
|
1513
1572
|
const options = {
|
|
1514
1573
|
id,
|
|
1515
1574
|
backend,
|
|
1575
|
+
env: this.creationEnvironment().plain(),
|
|
1516
1576
|
encoding: "utf8",
|
|
1517
1577
|
timeoutMs: 0,
|
|
1518
1578
|
};
|
|
@@ -1525,7 +1585,7 @@ export class ComputerDO extends ContainerComputer {
|
|
|
1525
1585
|
this.#executions.begin(invocation, backend, executionContext);
|
|
1526
1586
|
const carriage = await hooks.open(invocation, executionContext);
|
|
1527
1587
|
if (carriage.env !== undefined)
|
|
1528
|
-
options.env = carriage.env;
|
|
1588
|
+
options.env = { ...options.env, ...carriage.env };
|
|
1529
1589
|
if (carriage.stdin !== undefined)
|
|
1530
1590
|
options.stdin = carriage.stdin;
|
|
1531
1591
|
}
|
|
@@ -1995,7 +2055,7 @@ export { WorkspaceProxy, WorkspaceServiceProxy };
|
|
|
1995
2055
|
export { computerName, learnComputerName } from "./computer-name.js";
|
|
1996
2056
|
export { OnBoxVmContainerHost, OnBoxVmTimeoutError, OnBoxVmUnavailableError, onBoxVmPlacement, onBoxVmIngress, } from "./on-box-vm.js";
|
|
1997
2057
|
export { computerContainerSleepAfterMs } from "./container-policy.js";
|
|
1998
|
-
export { isVaultExecutionContext, vaultExecutionContext, withVaultExecution, } from "./vault-references.js";
|
|
2058
|
+
export { isVaultExecutionContext, vaultExecutionContext, vaultExecutionContextForSubject, withVaultExecution, } from "./vault-references.js";
|
|
1999
2059
|
export * from "./computer-backends.js";
|
|
2000
2060
|
export { LocalBackendOfflineError, localBackendAudience, localBackendDialPath, ownerLocalBackendDialPath, verifyLocalBackendDial, } from "./local-backend.js";
|
|
2001
2061
|
/** Keep each native Workspace lease inside the operation that uses it. */
|
|
@@ -7,7 +7,7 @@ import type { ComputerSize, ContainerRuntimeStart, HostedBacking } from "./compu
|
|
|
7
7
|
*/
|
|
8
8
|
export declare class MeteredContainerHost implements IWorkspaceContainerAPI {
|
|
9
9
|
#private;
|
|
10
|
-
constructor(host: IWorkspaceContainerAPI, backing: HostedBacking, size: () => ComputerSize, started: (start: ContainerRuntimeStart) => void);
|
|
10
|
+
constructor(host: IWorkspaceContainerAPI, backing: HostedBacking, size: () => ComputerSize, started: (start: ContainerRuntimeStart) => void, environment?: () => Readonly<Record<string, string>>);
|
|
11
11
|
start(env: Record<string, string>, enableInternet: boolean): Promise<{
|
|
12
12
|
runtimeId: string;
|
|
13
13
|
}>;
|
|
@@ -8,11 +8,13 @@ export class MeteredContainerHost {
|
|
|
8
8
|
#backing;
|
|
9
9
|
#size;
|
|
10
10
|
#started;
|
|
11
|
-
|
|
11
|
+
#environment;
|
|
12
|
+
constructor(host, backing, size, started, environment = () => ({})) {
|
|
12
13
|
this.#host = host;
|
|
13
14
|
this.#backing = backing;
|
|
14
15
|
this.#size = size;
|
|
15
16
|
this.#started = started;
|
|
17
|
+
this.#environment = environment;
|
|
16
18
|
}
|
|
17
19
|
async #report(boot) {
|
|
18
20
|
const runtime = await boot;
|
|
@@ -25,10 +27,10 @@ export class MeteredContainerHost {
|
|
|
25
27
|
return runtime;
|
|
26
28
|
}
|
|
27
29
|
start(env, enableInternet) {
|
|
28
|
-
return this.#report(this.#host.start(env, enableInternet));
|
|
30
|
+
return this.#report(this.#host.start({ ...this.#environment(), ...env }, enableInternet));
|
|
29
31
|
}
|
|
30
32
|
restart(env, enableInternet) {
|
|
31
|
-
return this.#report(this.#host.restart(env, enableInternet));
|
|
33
|
+
return this.#report(this.#host.restart({ ...this.#environment(), ...env }, enableInternet));
|
|
32
34
|
}
|
|
33
35
|
status() {
|
|
34
36
|
return this.#host.status();
|
package/dist/on-box-vm.d.ts
CHANGED
|
@@ -57,6 +57,7 @@ declare const vmStateSchema: z.ZodObject<{
|
|
|
57
57
|
runtimeId: z.ZodNullable<z.ZodString>;
|
|
58
58
|
exit: z.ZodNullable<z.ZodLazy<z.ZodObject<{
|
|
59
59
|
reason: z.ZodString;
|
|
60
|
+
code: z.ZodExactOptional<z.ZodLiteral<"scratch_pool_full">>;
|
|
60
61
|
exitedAt: z.ZodNumber;
|
|
61
62
|
}, z.core.$strict>>>;
|
|
62
63
|
}, z.core.$strict>;
|
|
@@ -66,6 +67,7 @@ declare const vmInventorySchema: z.ZodArray<z.ZodObject<{
|
|
|
66
67
|
runtimeId: z.ZodNullable<z.ZodString>;
|
|
67
68
|
exit: z.ZodNullable<z.ZodLazy<z.ZodObject<{
|
|
68
69
|
reason: z.ZodString;
|
|
70
|
+
code: z.ZodExactOptional<z.ZodLiteral<"scratch_pool_full">>;
|
|
69
71
|
exitedAt: z.ZodNumber;
|
|
70
72
|
}, z.core.$strict>>>;
|
|
71
73
|
id: z.ZodString;
|
|
@@ -123,11 +125,13 @@ export declare class OnBoxVmContainerHost implements IWorkspaceContainerAPI {
|
|
|
123
125
|
exit: {
|
|
124
126
|
reason: string;
|
|
125
127
|
exitedAt: number;
|
|
128
|
+
code?: "scratch_pool_full";
|
|
126
129
|
} | null;
|
|
127
130
|
}>;
|
|
128
131
|
exitInfo(): Promise<{
|
|
129
132
|
reason: string;
|
|
130
133
|
exitedAt: number;
|
|
134
|
+
code?: "scratch_pool_full";
|
|
131
135
|
} | null>;
|
|
132
136
|
/** Whether the VM is running now; the platform container answers from `ctx.container.running`. */
|
|
133
137
|
running(): Promise<boolean>;
|
package/dist/on-box-vm.js
CHANGED
|
@@ -91,6 +91,7 @@ const vmHostAudience = (hostId) => `computer-vm-host:${hostId}`;
|
|
|
91
91
|
const vmIngressAudience = "computer-vm-ingress";
|
|
92
92
|
const exitSchema = z.lazy(() => z.strictObject({
|
|
93
93
|
reason: z.string().max(1_024),
|
|
94
|
+
code: z.literal("scratch_pool_full").exactOptional(),
|
|
94
95
|
exitedAt: z.number().int().nonnegative(),
|
|
95
96
|
}));
|
|
96
97
|
const vmStateSchema = z.strictObject({
|
|
@@ -20385,6 +20385,7 @@ var appApiReservedMethodNames = Object.freeze({
|
|
|
20385
20385
|
"onGitPush",
|
|
20386
20386
|
"syncRefused",
|
|
20387
20387
|
"authorizeGitPush",
|
|
20388
|
+
"authorizeGitRepository",
|
|
20388
20389
|
"onRegion",
|
|
20389
20390
|
"fetch",
|
|
20390
20391
|
"alarm",
|
|
@@ -20430,6 +20431,13 @@ var backgroundOrigin = _lazy(() => strictObject({
|
|
|
20430
20431
|
var appMethodCallerSchema = object2({
|
|
20431
20432
|
scope: appCallerScopeSchema,
|
|
20432
20433
|
computerId: nullable2(identity2),
|
|
20434
|
+
/** Host-attested repository ceiling; absent preserves unscoped key access. */
|
|
20435
|
+
repositoryScope: optional4(discriminatedUnion("kind", [
|
|
20436
|
+
strictObject({ kind: literal2("all") }),
|
|
20437
|
+
strictObject({ kind: literal2("selected"), ids: array3(identity2) })
|
|
20438
|
+
])),
|
|
20439
|
+
/** Installation selected by the host for repository-scoped attribution. */
|
|
20440
|
+
repositoryInstallationId: optional4(identity2),
|
|
20433
20441
|
actor: hostActorSchema,
|
|
20434
20442
|
/** Host-attested enqueue eligibility for this ordinary write; absent otherwise. */
|
|
20435
20443
|
backgroundLane: optional4(string5().check(_minLength(8), _maxLength(263))),
|
|
@@ -20467,6 +20475,8 @@ var strictCaller = strictObject({
|
|
|
20467
20475
|
});
|
|
20468
20476
|
var parseAppMethodCallContext = (value, rejectUnknownKeys = false) => validateCaller((rejectUnknownKeys ? strictCaller : appMethodCallerSchema).parse(value));
|
|
20469
20477
|
function validateCaller(context3) {
|
|
20478
|
+
if ((context3.repositoryScope !== void 0 || context3.repositoryInstallationId !== void 0) && context3.actor.kind !== "team-key")
|
|
20479
|
+
throw new Error("Only a Team key carries a repository scope");
|
|
20470
20480
|
if (context3.soleMember !== void 0 && (context3.actor.kind !== "member" || context3.workflow !== void 0))
|
|
20471
20481
|
throw new Error("Only a member's own call can be its Team's sole member");
|
|
20472
20482
|
if (context3.backgroundLane === void 0 !== (context3.backgroundOrigin === void 0))
|
|
@@ -20840,6 +20850,7 @@ var appRoles = [
|
|
|
20840
20850
|
];
|
|
20841
20851
|
var appCapabilityIds = [
|
|
20842
20852
|
"approvals",
|
|
20853
|
+
"team.issue-index.read",
|
|
20843
20854
|
"agent.list",
|
|
20844
20855
|
"agent.manage",
|
|
20845
20856
|
"agent.rename",
|
|
@@ -21211,6 +21222,7 @@ var appCallSchema = declareConstructor()([appCallFields], ([fields]) => (input,
|
|
|
21211
21222
|
var appCallsSchema = ArraySchema(appCallSchema).check(isMinLength(1), isMaxLength(16), makeFilter2((calls) => isUnique2(calls.map((call) => call.appId)), unique2));
|
|
21212
21223
|
var declarationSchemaFor = (gill) => Struct({
|
|
21213
21224
|
api: optionalKey2(appApiSchema),
|
|
21225
|
+
repositoryScopedKeys: optionalKey2(Literal2(true)),
|
|
21214
21226
|
displayName: optional2(String4.pipe(check(isMinLength(1)), check(isMaxLength(64)))),
|
|
21215
21227
|
capabilities: ArraySchema(appCapabilityIdSchema).pipe(check(makeFilter2(isUnique2, unique2))),
|
|
21216
21228
|
calls: optionalKey2(appCallsSchema),
|
|
@@ -1,39 +1,50 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Vault references: the only form in which a Vault secret enters a Computer.
|
|
3
3
|
*
|
|
4
|
-
* When a Computer opens
|
|
5
|
-
* owner which secrets
|
|
4
|
+
* When a Computer opens a command's native invocation, it asks the
|
|
5
|
+
* owner which secrets its subject holds and puts one `fvr1.` reference per
|
|
6
6
|
* secret into that command's environment, under the secret's name. A
|
|
7
|
-
* reference is not the credential. It names the owner, the secret, the
|
|
7
|
+
* reference is not the credential. It names the owner, the secret, the subject
|
|
8
8
|
* and this command's invocation, and only this Computer's egress gateway resolves it,
|
|
9
9
|
* only while that invocation is live. The gateway then asks the owner to place
|
|
10
10
|
* the real value on a request to one of the secret's bound destinations. Only
|
|
11
11
|
* a reference's digest is stored, so a copy on another Computer, or after its
|
|
12
12
|
* command ended, names nothing.
|
|
13
13
|
*
|
|
14
|
-
* Apps hold no Vault power
|
|
14
|
+
* Apps hold no Vault power. Subjects are Agents, Computers and Team keys.
|
|
15
15
|
*/
|
|
16
|
-
import type
|
|
16
|
+
import { type ComputerExecutionHostHooks, type ComputerValue } from "@fungi.computer/computer-contract";
|
|
17
17
|
import type { WatchdogSqliteOwner } from "@fungi.computer/watchdog";
|
|
18
18
|
import { z } from "zod";
|
|
19
19
|
/** Every distinct reference written anywhere in `text`. */
|
|
20
20
|
export declare function vaultReferencesIn(text: string): readonly string[];
|
|
21
21
|
declare const subjectSchema: z.ZodObject<{
|
|
22
|
-
kind: z.
|
|
22
|
+
kind: z.ZodEnum<{
|
|
23
|
+
computer: "computer";
|
|
24
|
+
agent: "agent";
|
|
25
|
+
"team-key": "team-key";
|
|
26
|
+
}>;
|
|
23
27
|
id: z.ZodString;
|
|
24
28
|
}, z.core.$strict>;
|
|
25
29
|
export type VaultSubject = z.output<typeof subjectSchema>;
|
|
26
30
|
declare const vaultHolderSchema: z.ZodObject<{
|
|
27
31
|
owner: z.ZodString;
|
|
28
32
|
subject: z.ZodObject<{
|
|
29
|
-
kind: z.
|
|
33
|
+
kind: z.ZodEnum<{
|
|
34
|
+
computer: "computer";
|
|
35
|
+
agent: "agent";
|
|
36
|
+
"team-key": "team-key";
|
|
37
|
+
}>;
|
|
30
38
|
id: z.ZodString;
|
|
31
39
|
}, z.core.$strict>;
|
|
40
|
+
secrets: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
32
41
|
}, z.core.$strict>;
|
|
33
|
-
/** Whose secrets one
|
|
42
|
+
/** Whose secrets one command may name. */
|
|
34
43
|
export type VaultHolder = z.output<typeof vaultHolderSchema>;
|
|
35
|
-
/** The durable, secret-free context of one
|
|
44
|
+
/** The durable, secret-free context of one command that may hold references. */
|
|
36
45
|
export declare function vaultExecutionContext(holder: VaultHolder): ComputerValue;
|
|
46
|
+
/** Keep configured aliases, but bind command references to the current caller. */
|
|
47
|
+
export declare function vaultExecutionContextForSubject(context: ComputerValue | undefined, holder: Pick<VaultHolder, "owner" | "subject">): ComputerValue | undefined;
|
|
37
48
|
export declare function isVaultExecutionContext(context: ComputerValue): boolean;
|
|
38
49
|
/** One secret a subject holds, as its owner lists it: never the value. */
|
|
39
50
|
export type VaultSecretGrant = Readonly<{
|
|
@@ -54,12 +65,12 @@ export type VaultReferenceAdmission = Readonly<{
|
|
|
54
65
|
grantVersion: number;
|
|
55
66
|
}>;
|
|
56
67
|
/** This Computer's reference rows, in its own SQLite storage. */
|
|
57
|
-
export declare function createComputerVaultReferences(
|
|
68
|
+
export declare function createComputerVaultReferences(owner: WatchdogSqliteOwner): {
|
|
58
69
|
/**
|
|
59
70
|
* One reference per granted secret, named by the secret. Names are taken
|
|
60
71
|
* in connection order; a repeated or non-portable name gets none.
|
|
61
72
|
*/
|
|
62
|
-
issue(invocationId: string, { owner, subject }: VaultHolder, grants: readonly VaultSecretGrant[]): Promise<Readonly<Record<string, string>>>;
|
|
73
|
+
issue(invocationId: string, { owner, subject, secrets }: VaultHolder, grants: readonly VaultSecretGrant[]): Promise<Readonly<Record<string, string>>>;
|
|
63
74
|
find(reference: string): Promise<VaultReferenceAdmission | null>;
|
|
64
75
|
close(invocationId: string): void;
|
|
65
76
|
};
|
package/dist/vault-references.js
CHANGED
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Vault references: the only form in which a Vault secret enters a Computer.
|
|
3
|
+
*
|
|
4
|
+
* When a Computer opens a command's native invocation, it asks the
|
|
5
|
+
* owner which secrets its subject holds and puts one `fvr1.` reference per
|
|
6
|
+
* secret into that command's environment, under the secret's name. A
|
|
7
|
+
* reference is not the credential. It names the owner, the secret, the subject
|
|
8
|
+
* and this command's invocation, and only this Computer's egress gateway resolves it,
|
|
9
|
+
* only while that invocation is live. The gateway then asks the owner to place
|
|
10
|
+
* the real value on a request to one of the secret's bound destinations. Only
|
|
11
|
+
* a reference's digest is stored, so a copy on another Computer, or after its
|
|
12
|
+
* command ended, names nothing.
|
|
13
|
+
*
|
|
14
|
+
* Apps hold no Vault power. Subjects are Agents, Computers and Team keys.
|
|
15
|
+
*/
|
|
16
|
+
import { computerValueSchema, } from "@fungi.computer/computer-contract";
|
|
1
17
|
import { z } from "zod";
|
|
2
18
|
import { reportCatchFailure } from "./failure.js";
|
|
3
19
|
const referencePrefix = "fvr1.";
|
|
@@ -10,7 +26,7 @@ export function vaultReferencesIn(text) {
|
|
|
10
26
|
return [...new Set(text.match(referenceGrammar) ?? [])];
|
|
11
27
|
}
|
|
12
28
|
const subjectSchema = z.strictObject({
|
|
13
|
-
kind: z.
|
|
29
|
+
kind: z.enum(["agent", "computer", "team-key"]),
|
|
14
30
|
// Veil's Connection identifier grammar.
|
|
15
31
|
id: z.string().regex(/^[A-Za-z0-9_.:-]{1,128}$/u),
|
|
16
32
|
});
|
|
@@ -18,13 +34,24 @@ const vaultHolderSchema = z.strictObject({
|
|
|
18
34
|
/** The host's name for the secrets' owner: Hub's Team, Oyster's directory. */
|
|
19
35
|
owner: z.string().min(1).max(256),
|
|
20
36
|
subject: subjectSchema,
|
|
37
|
+
/** Creation binds explicit environment names to existing Connections. */
|
|
38
|
+
secrets: z
|
|
39
|
+
.record(z.string().regex(environmentName), z.string().min(1).max(128))
|
|
40
|
+
.optional(),
|
|
21
41
|
});
|
|
22
42
|
const vaultExecutionContextSchema = z.strictObject({
|
|
23
43
|
vault: vaultHolderSchema,
|
|
24
44
|
});
|
|
25
|
-
/** The durable, secret-free context of one
|
|
45
|
+
/** The durable, secret-free context of one command that may hold references. */
|
|
26
46
|
export function vaultExecutionContext(holder) {
|
|
27
|
-
return vaultExecutionContextSchema.parse({ vault: holder });
|
|
47
|
+
return computerValueSchema.parse(vaultExecutionContextSchema.parse({ vault: holder }));
|
|
48
|
+
}
|
|
49
|
+
/** Keep configured aliases, but bind command references to the current caller. */
|
|
50
|
+
export function vaultExecutionContextForSubject(context, holder) {
|
|
51
|
+
if (context === undefined)
|
|
52
|
+
return undefined;
|
|
53
|
+
const saved = vaultExecutionContextSchema.parse(context).vault;
|
|
54
|
+
return vaultExecutionContext({ ...saved, ...holder });
|
|
28
55
|
}
|
|
29
56
|
export function isVaultExecutionContext(context) {
|
|
30
57
|
return vaultExecutionContextSchema.safeParse(context).success;
|
|
@@ -32,7 +59,7 @@ export function isVaultExecutionContext(context) {
|
|
|
32
59
|
const referenceRowSchema = z.object({
|
|
33
60
|
invocation_id: z.string(),
|
|
34
61
|
owner: z.string(),
|
|
35
|
-
subject_kind:
|
|
62
|
+
subject_kind: subjectSchema.shape.kind,
|
|
36
63
|
subject_id: z.string(),
|
|
37
64
|
connection_id: z.string(),
|
|
38
65
|
grant_version: z.number().int().positive(),
|
|
@@ -47,12 +74,26 @@ async function referenceDigest(reference) {
|
|
|
47
74
|
return Array.from(new Uint8Array(digest), (byte) => byte.toString(16).padStart(2, "0")).join("");
|
|
48
75
|
}
|
|
49
76
|
/** This Computer's reference rows, in its own SQLite storage. */
|
|
50
|
-
export function createComputerVaultReferences(
|
|
77
|
+
export function createComputerVaultReferences(owner) {
|
|
78
|
+
const { sql } = owner;
|
|
79
|
+
const previous = z
|
|
80
|
+
.object({ sql: z.string() })
|
|
81
|
+
.optional()
|
|
82
|
+
.parse(sql
|
|
83
|
+
.exec("SELECT sql FROM sqlite_master WHERE type='table' AND name='computer_vault_references'")
|
|
84
|
+
.toArray()[0]);
|
|
85
|
+
if (previous?.sql.includes("CHECK(subject_kind='agent')"))
|
|
86
|
+
owner.transactionSync(() => {
|
|
87
|
+
sql.exec("ALTER TABLE computer_vault_references RENAME TO computer_vault_references_previous");
|
|
88
|
+
sql.exec("CREATE TABLE computer_vault_references (reference_digest TEXT PRIMARY KEY, invocation_id TEXT NOT NULL, owner TEXT NOT NULL, subject_kind TEXT NOT NULL CHECK(subject_kind IN ('agent','computer','team-key')), subject_id TEXT NOT NULL, connection_id TEXT NOT NULL, grant_version INTEGER NOT NULL) STRICT");
|
|
89
|
+
sql.exec("INSERT INTO computer_vault_references SELECT * FROM computer_vault_references_previous");
|
|
90
|
+
sql.exec("DROP TABLE computer_vault_references_previous");
|
|
91
|
+
});
|
|
51
92
|
sql.exec(`CREATE TABLE IF NOT EXISTS computer_vault_references (
|
|
52
93
|
reference_digest TEXT PRIMARY KEY,
|
|
53
94
|
invocation_id TEXT NOT NULL,
|
|
54
95
|
owner TEXT NOT NULL,
|
|
55
|
-
subject_kind TEXT NOT NULL CHECK(subject_kind
|
|
96
|
+
subject_kind TEXT NOT NULL CHECK(subject_kind IN ('agent','computer','team-key')),
|
|
56
97
|
subject_id TEXT NOT NULL,
|
|
57
98
|
connection_id TEXT NOT NULL,
|
|
58
99
|
grant_version INTEGER NOT NULL
|
|
@@ -63,9 +104,17 @@ export function createComputerVaultReferences(sql) {
|
|
|
63
104
|
* One reference per granted secret, named by the secret. Names are taken
|
|
64
105
|
* in connection order; a repeated or non-portable name gets none.
|
|
65
106
|
*/
|
|
66
|
-
async issue(invocationId, { owner, subject }, grants) {
|
|
107
|
+
async issue(invocationId, { owner, subject, secrets }, grants) {
|
|
67
108
|
const environment = {};
|
|
68
|
-
const
|
|
109
|
+
const selected = secrets === undefined
|
|
110
|
+
? grants
|
|
111
|
+
: Object.entries(secrets).map(([name, connectionId]) => {
|
|
112
|
+
const grant = grants.find((entry) => entry.connectionId === connectionId);
|
|
113
|
+
if (grant === undefined)
|
|
114
|
+
throw new Error(`Vault secret ${connectionId}: its grant is no longer available.`);
|
|
115
|
+
return { ...grant, name };
|
|
116
|
+
});
|
|
117
|
+
const ordered = [...selected].sort((left, right) => left.connectionId.localeCompare(right.connectionId));
|
|
69
118
|
for (const grant of ordered) {
|
|
70
119
|
if (!environmentName.test(grant.name) ||
|
|
71
120
|
Object.hasOwn(environment, grant.name))
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fungi.computer/computer",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.22.0",
|
|
4
4
|
"author": "Levi <levi@technomancy.dev>",
|
|
5
5
|
"description": "Cloudflare Computer host for one durable Fungi Computer",
|
|
6
6
|
"type": "module",
|
|
@@ -68,15 +68,15 @@
|
|
|
68
68
|
"LICENSE"
|
|
69
69
|
],
|
|
70
70
|
"dependencies": {
|
|
71
|
-
"@fungi.computer/agar": "0.
|
|
71
|
+
"@fungi.computer/agar": "0.33.0",
|
|
72
72
|
"@fungi.computer/cairn": "0.1.1",
|
|
73
73
|
"@fungi.computer/capnweb": "0.12.0-fungi.0",
|
|
74
74
|
"@fungi.computer/cloudflare-computer": "0.2.1-fungi.4",
|
|
75
75
|
"@fungi.computer/cordyceps": "0.4.3",
|
|
76
|
-
"@fungi.computer/knapsack": "0.4.
|
|
76
|
+
"@fungi.computer/knapsack": "0.4.46",
|
|
77
77
|
"@fungi.computer/seam": "0.2.9",
|
|
78
78
|
"@fungi.computer/watchdog": "0.1.7",
|
|
79
|
-
"@fungi.computer/computer-contract": "0.6.
|
|
79
|
+
"@fungi.computer/computer-contract": "0.6.23",
|
|
80
80
|
"effect": "4.0.2",
|
|
81
81
|
"just-bash": "3.4.2",
|
|
82
82
|
"zod": "4.4.3",
|