@fungi.computer/computer 0.0.1 → 0.1.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.
@@ -4,7 +4,7 @@ export declare const hostedBackingSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
4
4
  kind: z.ZodLiteral<"platform-container">;
5
5
  }, z.core.$strict>, z.ZodObject<{
6
6
  kind: z.ZodLiteral<"on-box-vm">;
7
- hostId: z.ZodString;
7
+ hostId: z.ZodLazy<z.ZodString>;
8
8
  }, z.core.$strict>], "kind">;
9
9
  export type HostedBacking = z.infer<typeof hostedBackingSchema>;
10
10
  /** A member's machine, attached with a device key that never leaves it. */
@@ -12,39 +12,39 @@ export declare const localBackendSchema: z.ZodObject<{
12
12
  kind: z.ZodLiteral<"local">;
13
13
  deviceId: z.ZodString;
14
14
  publicKey: z.ZodBase64;
15
- hostLabel: z.ZodString;
16
- folderLabel: z.ZodString;
15
+ hostLabel: z.ZodLazy<z.ZodString>;
16
+ folderLabel: z.ZodLazy<z.ZodString>;
17
17
  }, z.core.$strict>;
18
18
  export type LocalBackend = z.infer<typeof localBackendSchema>;
19
19
  export declare const attachedBackendSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
20
20
  kind: z.ZodLiteral<"platform-container">;
21
21
  }, z.core.$strict>, z.ZodObject<{
22
22
  kind: z.ZodLiteral<"on-box-vm">;
23
- hostId: z.ZodString;
23
+ hostId: z.ZodLazy<z.ZodString>;
24
24
  }, z.core.$strict>, z.ZodObject<{
25
25
  kind: z.ZodLiteral<"local">;
26
26
  deviceId: z.ZodString;
27
27
  publicKey: z.ZodBase64;
28
- hostLabel: z.ZodString;
29
- folderLabel: z.ZodString;
28
+ hostLabel: z.ZodLazy<z.ZodString>;
29
+ folderLabel: z.ZodLazy<z.ZodString>;
30
30
  }, z.core.$strict>], "kind">;
31
31
  export type AttachedBackend = z.infer<typeof attachedBackendSchema>;
32
32
  /** The stable Workspace backend id: its sync cursor is keyed by it. */
33
33
  export declare function attachedBackendId(backend: AttachedBackend): string;
34
34
  /** One Computer's attached backends, in attach order; ids are unique. */
35
- export declare const attachedBackendsSchema: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
35
+ export declare const attachedBackendsSchema: z.ZodLazy<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
36
36
  kind: z.ZodLiteral<"platform-container">;
37
37
  }, z.core.$strict>, z.ZodObject<{
38
38
  kind: z.ZodLiteral<"on-box-vm">;
39
- hostId: z.ZodString;
39
+ hostId: z.ZodLazy<z.ZodString>;
40
40
  }, z.core.$strict>, z.ZodObject<{
41
41
  kind: z.ZodLiteral<"local">;
42
42
  deviceId: z.ZodString;
43
43
  publicKey: z.ZodBase64;
44
- hostLabel: z.ZodString;
45
- folderLabel: z.ZodString;
46
- }, z.core.$strict>], "kind">>;
47
- export declare const attachedBackendIdSchema: z.ZodString;
44
+ hostLabel: z.ZodLazy<z.ZodString>;
45
+ folderLabel: z.ZodLazy<z.ZodString>;
46
+ }, z.core.$strict>], "kind">>>;
47
+ export declare const attachedBackendIdSchema: z.ZodLazy<z.ZodString>;
48
48
  export type AttachedBackendStatus = "ready" | "online" | "offline";
49
49
  /** What a Computer reports about one attached backend. */
50
50
  export type AttachedBackendView = Readonly<{
@@ -8,8 +8,8 @@ import * as z from "zod";
8
8
  * id at most; a local backend carries its device's public key and two display
9
9
  * labels, never a path on the member's machine.
10
10
  */
11
- const hostIdSchema = z.string().regex(/^[a-z0-9][a-z0-9-]{0,62}$/);
12
- const labelSchema = z.string().trim().min(1).max(256);
11
+ const hostIdSchema = z.lazy(() => z.string().regex(/^[a-z0-9][a-z0-9-]{0,62}$/));
12
+ const labelSchema = z.lazy(() => z.string().trim().min(1).max(256));
13
13
  /** A backend the platform runs: a Cloudflare container or an on-box VM. */
14
14
  export const hostedBackingSchema = z.discriminatedUnion("kind", [
15
15
  z.strictObject({ kind: z.literal("platform-container") }),
@@ -40,13 +40,13 @@ export function attachedBackendId(backend) {
40
40
  }
41
41
  }
42
42
  /** One Computer's attached backends, in attach order; ids are unique. */
43
- export const attachedBackendsSchema = z
43
+ export const attachedBackendsSchema = z.lazy(() => z
44
44
  .array(attachedBackendSchema)
45
45
  .max(16)
46
- .refine((backends) => new Set(backends.map(attachedBackendId)).size === backends.length, "attached backend ids must be unique");
47
- export const attachedBackendIdSchema = z
46
+ .refine((backends) => new Set(backends.map(attachedBackendId)).size === backends.length, "attached backend ids must be unique"));
47
+ export const attachedBackendIdSchema = z.lazy(() => z
48
48
  .string()
49
- .regex(/^(container|vm-[a-z0-9][a-z0-9-]{0,62}|local-[a-z2-7]{16})$/);
49
+ .regex(/^(container|vm-[a-z0-9][a-z0-9-]{0,62}|local-[a-z2-7]{16})$/));
50
50
  export function describeAttachedBackend(backend, online) {
51
51
  const id = attachedBackendId(backend);
52
52
  switch (backend.kind) {
@@ -2,7 +2,7 @@ import { z } from "zod";
2
2
  import { attachedBackendId, localBackendSchema, } from "../computer-backends.js";
3
3
  import { ComputerBackingError, computerBackingChangeSchema, hostedBackingsSchema, localBackendAttachSchema, localBackendDetachSchema, localBackendDetachRequestSchema, } from "./wire.js";
4
4
  const maximumLocalBackends = 8;
5
- const localRowSchema = z.strictObject({
5
+ const localRowSchema = z.lazy(() => z.strictObject({
6
6
  computer_id: z.string(),
7
7
  device_id: z.string(),
8
8
  actor_id: z.string(),
@@ -10,7 +10,7 @@ const localRowSchema = z.strictObject({
10
10
  host_label: z.string(),
11
11
  folder_label: z.string(),
12
12
  request_id: z.string(),
13
- });
13
+ }));
14
14
  function mintDeviceId() {
15
15
  const alphabet = "abcdefghijklmnopqrstuvwxyz234567";
16
16
  const bytes = crypto.getRandomValues(new Uint8Array(16));
@@ -17,10 +17,10 @@ export type ComputerCreateRequest = Readonly<{
17
17
  requestId: string;
18
18
  }>;
19
19
  /** Inventory pages retain stable ordering and a bounded response. */
20
- export declare const computerPageSchema: z.ZodObject<{
20
+ export declare const computerPageSchema: z.ZodLazy<z.ZodObject<{
21
21
  limit: z.ZodDefault<z.ZodNumber>;
22
22
  offset: z.ZodDefault<z.ZodNumber>;
23
- }, z.core.$strict>;
23
+ }, z.core.$strict>>;
24
24
  export type ComputerPage = z.input<typeof computerPageSchema>;
25
25
  /** Inventory failures, independent of a host's public error mapping. */
26
26
  export declare class ComputerInventoryError extends Error {
@@ -1,9 +1,9 @@
1
1
  import { z } from "zod";
2
2
  /** Inventory pages retain stable ordering and a bounded response. */
3
- export const computerPageSchema = z.strictObject({
3
+ export const computerPageSchema = z.lazy(() => z.strictObject({
4
4
  limit: z.number().int().min(1).max(100).default(100),
5
5
  offset: z.number().int().nonnegative().default(0),
6
- });
6
+ }));
7
7
  /** Inventory failures, independent of a host's public error mapping. */
8
8
  export class ComputerInventoryError extends Error {
9
9
  code;
@@ -7,7 +7,7 @@ const computerIds = defineIdFamily({
7
7
  version: 1,
8
8
  kinds: { computer: { prefix: "computer" } },
9
9
  });
10
- const rowSchema = z.strictObject({
10
+ const rowSchema = z.lazy(() => z.strictObject({
11
11
  computer_id: z.string().min(1),
12
12
  name: z.string().min(1).max(256),
13
13
  actor_kind: z.string().min(1),
@@ -15,15 +15,15 @@ const rowSchema = z.strictObject({
15
15
  active: z.number().int().min(0).max(1),
16
16
  created_at: z.number().int().nonnegative(),
17
17
  updated_at: z.number().int().nonnegative(),
18
- });
19
- const receiptSchema = z.strictObject({
18
+ }));
19
+ const receiptSchema = z.lazy(() => z.strictObject({
20
20
  requested_name: z.string().min(1).max(256).nullable(),
21
21
  request_id: z.string().min(1).max(256),
22
22
  actor_kind: z.string().min(1),
23
23
  actor_id: z.string().min(1).max(256),
24
24
  name: z.string().min(1).max(256),
25
25
  computer_id: z.string().min(1),
26
- });
26
+ }));
27
27
  const selectRow = "SELECT computer_id,name,actor_kind,actor_id,active,created_at,updated_at FROM hub_team_computers";
28
28
  function actorColumns(actor) {
29
29
  return { actorId: actor.id, actorKind: actor.kind };
@@ -6,12 +6,7 @@ import { ComputerRuntimeUsage } from "./runtime-usage.js";
6
6
  import { checkComputerGrant } from "./admission.js";
7
7
  const vmRecycleAfterMs = 23 * 60 * 60 * 1_000;
8
8
  const vmRecycleQuietMs = 30_000;
9
- const runtimeWatchSchema = z.coerce
10
- .number()
11
- .int()
12
- .min(1_000)
13
- .max(3_600_000)
14
- .catch(60_000);
9
+ const runtimeWatchSchema = z.lazy(() => z.coerce.number().int().min(1_000).max(3_600_000).catch(60_000));
15
10
  function runtimeWatchDelay(delivered, running, watchMs) {
16
11
  if (running > 0)
17
12
  return delivered ? watchMs : 1_000;
@@ -82,12 +82,12 @@ export declare const computerStateSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
82
82
  }, z.core.$strict>], "state">;
83
83
  export type ComputerRuntimeState = z.output<typeof computerStateSchema>;
84
84
  /** Hosted fallback order, with the same bound and identity law as the retained owner. */
85
- export declare const hostedBackingsSchema: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
85
+ export declare const hostedBackingsSchema: z.ZodLazy<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
86
86
  kind: z.ZodLiteral<"platform-container">;
87
87
  }, z.core.$strict>, z.ZodObject<{
88
88
  kind: z.ZodLiteral<"on-box-vm">;
89
- hostId: z.ZodString;
90
- }, z.core.$strict>], "kind">>;
89
+ hostId: z.ZodLazy<z.ZodString>;
90
+ }, z.core.$strict>], "kind">>>;
91
91
  /** The host delivers this complete revision to its Computer runtime. */
92
92
  export type ComputerBackendsProjection = Readonly<{
93
93
  computerId: string;
@@ -95,15 +95,15 @@ export type ComputerBackendsProjection = Readonly<{
95
95
  backends: readonly AttachedBackend[];
96
96
  }>;
97
97
  /** An explicit override, or the fleet default when no Computer is selected. */
98
- export declare const computerBackingChangeSchema: z.ZodObject<{
98
+ export declare const computerBackingChangeSchema: z.ZodLazy<z.ZodObject<{
99
99
  computerId: z.ZodOptional<z.ZodString>;
100
- backings: z.ZodNullable<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
100
+ backings: z.ZodNullable<z.ZodLazy<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
101
101
  kind: z.ZodLiteral<"platform-container">;
102
102
  }, z.core.$strict>, z.ZodObject<{
103
103
  kind: z.ZodLiteral<"on-box-vm">;
104
- hostId: z.ZodString;
105
- }, z.core.$strict>], "kind">>>;
106
- }, z.core.$strict>;
104
+ hostId: z.ZodLazy<z.ZodString>;
105
+ }, z.core.$strict>], "kind">>>>;
106
+ }, z.core.$strict>>;
107
107
  export type ComputerBackingChange = Readonly<{
108
108
  computerId?: string | undefined;
109
109
  backings: readonly z.output<typeof hostedBackingSchema>[] | null;
@@ -117,15 +117,15 @@ export declare class ComputerBackingError extends Error {
117
117
  export declare const localBackendAttachSchema: z.ZodObject<{
118
118
  computerId: z.ZodString;
119
119
  publicKey: z.ZodBase64;
120
- hostLabel: z.ZodString;
121
- folderLabel: z.ZodString;
120
+ hostLabel: z.ZodLazy<z.ZodString>;
121
+ folderLabel: z.ZodLazy<z.ZodString>;
122
122
  requestId: z.ZodString;
123
123
  }, z.core.$strict>;
124
124
  export type LocalBackendAttachInput = z.output<typeof localBackendAttachSchema>;
125
- export declare const localBackendDetachSchema: z.ZodObject<{
125
+ export declare const localBackendDetachSchema: z.ZodLazy<z.ZodObject<{
126
126
  computerId: z.ZodString;
127
127
  backendId: z.ZodString;
128
- }, z.core.$strict>;
128
+ }, z.core.$strict>>;
129
129
  /** Recover a lost attach response without retaining the device key. */
130
130
  export declare const localBackendDetachRequestSchema: z.ZodObject<{
131
131
  computerId: z.ZodString;
@@ -139,7 +139,7 @@ export declare const computerUsageIntervalSchema: z.ZodObject<{
139
139
  kind: z.ZodLiteral<"platform-container">;
140
140
  }, z.core.$strict>, z.ZodObject<{
141
141
  kind: z.ZodLiteral<"on-box-vm">;
142
- hostId: z.ZodString;
142
+ hostId: z.ZodLazy<z.ZodString>;
143
143
  }, z.core.$strict>], "kind">;
144
144
  startedAt: z.ZodNumber;
145
145
  observedAt: z.ZodNumber;
@@ -159,7 +159,7 @@ export type ComputerUsageInterval = Readonly<{
159
159
  ended: boolean;
160
160
  }>;
161
161
  /** Observations, not billing decisions. The host owns delivery and settlement. */
162
- export declare const computerFactSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
162
+ export declare const computerFactSchema: z.ZodLazy<z.ZodDiscriminatedUnion<[z.ZodObject<{
163
163
  kind: z.ZodLiteral<"process.exited">;
164
164
  requestId: z.ZodString;
165
165
  exitCode: z.ZodNullable<z.ZodNumber>;
@@ -213,7 +213,7 @@ export declare const computerFactSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
213
213
  kind: z.ZodLiteral<"platform-container">;
214
214
  }, z.core.$strict>, z.ZodObject<{
215
215
  kind: z.ZodLiteral<"on-box-vm">;
216
- hostId: z.ZodString;
216
+ hostId: z.ZodLazy<z.ZodString>;
217
217
  }, z.core.$strict>], "kind">;
218
218
  startedAt: z.ZodNumber;
219
219
  observedAt: z.ZodNumber;
@@ -224,5 +224,5 @@ export declare const computerFactSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
224
224
  actor: z.ZodString;
225
225
  via: z.ZodOptional<z.ZodString>;
226
226
  }, z.core.$strict>;
227
- }, z.core.$strict>], "kind">;
227
+ }, z.core.$strict>], "kind">>;
228
228
  export type ComputerFact = z.output<typeof computerFactSchema>;
@@ -39,15 +39,15 @@ export const computerStateSchema = z.discriminatedUnion("state", [
39
39
  }),
40
40
  ]);
41
41
  /** Hosted fallback order, with the same bound and identity law as the retained owner. */
42
- export const hostedBackingsSchema = z
42
+ export const hostedBackingsSchema = z.lazy(() => z
43
43
  .array(hostedBackingSchema)
44
44
  .max(4)
45
- .refine((backings) => new Set(backings.map(attachedBackendId)).size === backings.length, "hosted backings must be distinct");
45
+ .refine((backings) => new Set(backings.map(attachedBackendId)).size === backings.length, "hosted backings must be distinct"));
46
46
  /** An explicit override, or the fleet default when no Computer is selected. */
47
- export const computerBackingChangeSchema = z.strictObject({
47
+ export const computerBackingChangeSchema = z.lazy(() => z.strictObject({
48
48
  computerId: z.string().min(1).max(256).optional(),
49
49
  backings: hostedBackingsSchema.nullable(),
50
- });
50
+ }));
51
51
  /** A backing operation was refused without changing the stored decision. */
52
52
  export class ComputerBackingError extends Error {
53
53
  code;
@@ -65,10 +65,10 @@ export const localBackendAttachSchema = z.strictObject({
65
65
  folderLabel: localBackendSchema.shape.folderLabel,
66
66
  requestId: z.string().min(1).max(256),
67
67
  });
68
- export const localBackendDetachSchema = z.strictObject({
68
+ export const localBackendDetachSchema = z.lazy(() => z.strictObject({
69
69
  computerId: z.string().min(1).max(256),
70
70
  backendId: z.string().regex(/^local-[a-z2-7]{16}$/),
71
- });
71
+ }));
72
72
  /** Recover a lost attach response without retaining the device key. */
73
73
  export const localBackendDetachRequestSchema = z.strictObject({
74
74
  computerId: localBackendAttachSchema.shape.computerId,
@@ -89,7 +89,7 @@ export const computerUsageIntervalSchema = z.strictObject({
89
89
  });
90
90
  const timestamp = z.number().int().nonnegative();
91
91
  /** Observations, not billing decisions. The host owns delivery and settlement. */
92
- export const computerFactSchema = z.discriminatedUnion("kind", [
92
+ export const computerFactSchema = z.lazy(() => z.discriminatedUnion("kind", [
93
93
  z.strictObject({
94
94
  ...factIdentity,
95
95
  kind: z.literal("process.exited"),
@@ -124,4 +124,4 @@ export const computerFactSchema = z.discriminatedUnion("kind", [
124
124
  kind: z.literal("interval"),
125
125
  ...computerUsageIntervalSchema.shape,
126
126
  }),
127
- ]);
127
+ ]));
package/dist/index.js CHANGED
@@ -79,15 +79,15 @@ const terminalDefaultCols = 80;
79
79
  const terminalDefaultRows = 24;
80
80
  /** How often an attached terminal's container changes reach the Workspace. */
81
81
  const terminalSyncIntervalMs = 3_000;
82
- const terminalSessionsSchema = z.strictObject({
82
+ const terminalSessionsSchema = z.lazy(() => z.strictObject({
83
83
  attached: z.number().int().nonnegative(),
84
- });
84
+ }));
85
85
  async function sha256(value) {
86
86
  const bytes = new TextEncoder().encode(value);
87
87
  const digest = await crypto.subtle.digest("SHA-256", bytes);
88
88
  return Array.from(new Uint8Array(digest), (byte) => byte.toString(16).padStart(2, "0")).join("");
89
89
  }
90
- const terminalQuerySchema = z.strictObject({
90
+ const terminalQuerySchema = z.lazy(() => z.strictObject({
91
91
  session: z
92
92
  .string()
93
93
  .min(1)
@@ -95,7 +95,7 @@ const terminalQuerySchema = z.strictObject({
95
95
  .regex(/^[A-Za-z0-9._-]+$/),
96
96
  cols: z.coerce.number().int().min(2).max(500).catch(terminalDefaultCols),
97
97
  rows: z.coerce.number().int().min(2).max(300).catch(terminalDefaultRows),
98
- });
98
+ }));
99
99
  function entryType(entry) {
100
100
  if (entry.isFile)
101
101
  return "file";
@@ -42,19 +42,19 @@ export declare function onBoxVmPlacement(env: OnBoxVmEnv, hostId: string | undef
42
42
  declare const vmStateSchema: z.ZodObject<{
43
43
  running: z.ZodBoolean;
44
44
  runtimeId: z.ZodNullable<z.ZodString>;
45
- exit: z.ZodNullable<z.ZodObject<{
45
+ exit: z.ZodNullable<z.ZodLazy<z.ZodObject<{
46
46
  reason: z.ZodString;
47
47
  exitedAt: z.ZodNumber;
48
- }, z.core.$strict>>;
48
+ }, z.core.$strict>>>;
49
49
  }, z.core.$strict>;
50
50
  export type OnBoxVmState = z.infer<typeof vmStateSchema>;
51
51
  declare const vmInventorySchema: z.ZodArray<z.ZodObject<{
52
52
  running: z.ZodBoolean;
53
53
  runtimeId: z.ZodNullable<z.ZodString>;
54
- exit: z.ZodNullable<z.ZodObject<{
54
+ exit: z.ZodNullable<z.ZodLazy<z.ZodObject<{
55
55
  reason: z.ZodString;
56
56
  exitedAt: z.ZodNumber;
57
- }, z.core.$strict>>;
57
+ }, z.core.$strict>>>;
58
58
  id: z.ZodString;
59
59
  name: z.ZodString;
60
60
  lastActive: z.ZodNumber;
package/dist/on-box-vm.js CHANGED
@@ -13,13 +13,13 @@ function accessHeaders(env) {
13
13
  "CF-Access-Client-Secret": pair.data[1],
14
14
  };
15
15
  }
16
- const hostIdSchema = z.string().regex(/^[a-z0-9][a-z0-9-]{0,62}$/);
17
- const hostRegistrySchema = z.record(hostIdSchema, z.strictObject({
16
+ const hostIdSchema = z.lazy(() => z.string().regex(/^[a-z0-9][a-z0-9-]{0,62}$/));
17
+ const hostRegistrySchema = z.lazy(() => z.record(hostIdSchema, z.strictObject({
18
18
  origin: z
19
19
  .url({ protocol: /^https?$/ })
20
20
  .transform((value) => new URL(value).origin),
21
21
  publicKey: z.base64().length(44),
22
- }));
22
+ })));
23
23
  const registries = new Map();
24
24
  function hostRegistry(env) {
25
25
  const raw = env.COMPUTER_VM_HOSTS ?? "{}";
@@ -72,10 +72,10 @@ function hostVerifiers(env) {
72
72
  const vmHostAudience = (hostId) => `computer-vm-host:${hostId}`;
73
73
  /** The audience this Worker's ingress door verifies. */
74
74
  const vmIngressAudience = "computer-vm-ingress";
75
- const exitSchema = z.strictObject({
75
+ const exitSchema = z.lazy(() => z.strictObject({
76
76
  reason: z.string().max(1_024),
77
77
  exitedAt: z.number().int().nonnegative(),
78
- });
78
+ }));
79
79
  const vmStateSchema = z.strictObject({
80
80
  running: z.boolean(),
81
81
  runtimeId: z.string().min(1).max(128).nullable(),
@@ -86,9 +86,9 @@ const vmInventorySchema = z.array(vmStateSchema.extend({
86
86
  name: z.string(),
87
87
  lastActive: z.number().int().nonnegative(),
88
88
  }));
89
- const vmStartSchema = z.strictObject({
89
+ const vmStartSchema = z.lazy(() => z.strictObject({
90
90
  runtimeId: z.string().min(1).max(128),
91
- });
91
+ }));
92
92
  function vmBodyBytes(body) {
93
93
  return new Uint8Array(new TextEncoder().encode(body === undefined ? "" : JSON.stringify(body)));
94
94
  }
@@ -13,9 +13,9 @@ export type ComputerExecutionBudget = Readonly<{
13
13
  export declare const genericComputerExecutionBudget: ComputerExecutionBudget;
14
14
  export declare const computerValueSchema: z.ZodJSONSchema;
15
15
  export type ComputerValue = z.output<typeof computerValueSchema>;
16
- export declare const capabilityNameSchema: z.ZodString;
16
+ export declare const capabilityNameSchema: z.ZodLazy<z.ZodString>;
17
17
  /** One valid TCP port number, used only with this Computer's container. */
18
- export declare const computerPortSchema: z.ZodNumber;
18
+ export declare const computerPortSchema: z.ZodLazy<z.ZodNumber>;
19
19
  export declare const maximumExposedPorts = 64;
20
20
  /** computerd's Workspace RPC port, pinned by the Cloudflare container backend. */
21
21
  export declare const computerDaemonPort = 8080;
@@ -28,19 +28,19 @@ export declare const computerTerminalPort = 7681;
28
28
  export declare const computerReservedPorts: ReadonlySet<number>;
29
29
  export declare function isComputerReservedPort(port: number): boolean;
30
30
  export declare const computerPortInputSchema: z.ZodObject<{
31
- port: z.ZodNumber;
31
+ port: z.ZodLazy<z.ZodNumber>;
32
32
  }, z.core.$strict>;
33
- export declare const computerPortOutputSchema: z.ZodObject<{
34
- port: z.ZodNumber;
33
+ export declare const computerPortOutputSchema: z.ZodLazy<z.ZodObject<{
34
+ port: z.ZodLazy<z.ZodNumber>;
35
35
  exposed: z.ZodBoolean;
36
- }, z.core.$strict>;
37
- export declare const computerPortRemovalOutputSchema: z.ZodObject<{
38
- port: z.ZodNumber;
36
+ }, z.core.$strict>>;
37
+ export declare const computerPortRemovalOutputSchema: z.ZodLazy<z.ZodObject<{
38
+ port: z.ZodLazy<z.ZodNumber>;
39
39
  removed: z.ZodBoolean;
40
- }, z.core.$strict>;
41
- export declare const computerPortsOutputSchema: z.ZodObject<{
42
- ports: z.ZodArray<z.ZodNumber>;
43
- }, z.core.$strict>;
40
+ }, z.core.$strict>>;
41
+ export declare const computerPortsOutputSchema: z.ZodLazy<z.ZodObject<{
42
+ ports: z.ZodArray<z.ZodLazy<z.ZodNumber>>;
43
+ }, z.core.$strict>>;
44
44
  /** The port belongs to a Computer daemon and cannot be admitted for preview. */
45
45
  export declare class ComputerPortReservedError extends Error {
46
46
  constructor(port: number);
@@ -54,14 +54,14 @@ export declare class ComputerPortLimitError extends Error {
54
54
  constructor();
55
55
  }
56
56
  /** Native operation descriptions shared by discovery and its OpenAPI document. */
57
- export declare const computerCapabilitiesSchema: z.ZodArray<z.ZodObject<{
58
- id: z.ZodString;
59
- name: z.ZodString;
57
+ export declare const computerCapabilitiesSchema: z.ZodLazy<z.ZodArray<z.ZodObject<{
58
+ id: z.ZodLazy<z.ZodString>;
59
+ name: z.ZodLazy<z.ZodString>;
60
60
  kind: z.ZodString;
61
61
  description: z.ZodString;
62
- parameters: z.ZodRecord<z.ZodString, z.ZodUnknown>;
63
- output: z.ZodRecord<z.ZodString, z.ZodUnknown>;
64
- }, z.core.$strict>>;
62
+ parameters: z.ZodLazy<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
63
+ output: z.ZodLazy<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
64
+ }, z.core.$strict>>>;
65
65
  export declare const pathSchema: z.ZodString;
66
66
  export declare const boundedTextSchema: (minimumLength?: number) => z.ZodString;
67
67
  /** Complete bounded UTF-8 text reads. Binary reads use the same path input. */
@@ -69,10 +69,10 @@ export declare const readInputSchema: z.ZodObject<{
69
69
  path: z.ZodString;
70
70
  }, z.core.$strict>;
71
71
  export type ComputerFileReadInput = z.output<typeof readInputSchema>;
72
- export declare const readOutputSchema: z.ZodObject<{
72
+ export declare const readOutputSchema: z.ZodLazy<z.ZodObject<{
73
73
  path: z.ZodString;
74
74
  content: z.ZodString;
75
- }, z.core.$strict>;
75
+ }, z.core.$strict>>;
76
76
  export type ComputerFileReadOutput = z.output<typeof readOutputSchema>;
77
77
  /** Optional byte window; text reads remain complete and independently bounded. */
78
78
  export declare const readBytesInputSchema: z.ZodObject<{
@@ -82,18 +82,18 @@ export declare const readBytesInputSchema: z.ZodObject<{
82
82
  }, z.core.$strict>;
83
83
  export type ComputerFileByteReadInput = z.output<typeof readBytesInputSchema>;
84
84
  /** Finite byte-read reply used by admitted App frame bindings. */
85
- export declare const computerByteReadReplySchema: z.ZodObject<{
85
+ export declare const computerByteReadReplySchema: z.ZodLazy<z.ZodObject<{
86
86
  path: z.ZodString;
87
87
  byteOffset: z.ZodNumber;
88
88
  content: z.ZodString;
89
89
  encoding: z.ZodLiteral<"base64">;
90
90
  truncated: z.ZodBoolean;
91
- }, z.core.$strict>;
91
+ }, z.core.$strict>>;
92
92
  /** Host-admitted App method preview; parsing does not grant port access. */
93
- export declare const appMethodPreviewResultSchema: z.ZodObject<{
93
+ export declare const appMethodPreviewResultSchema: z.ZodLazy<z.ZodObject<{
94
94
  previewUrl: z.ZodURL;
95
95
  expiresAt: z.ZodNumber;
96
- }, z.core.$strict>;
96
+ }, z.core.$strict>>;
97
97
  export declare const listLimitSchema: z.ZodDefault<z.ZodNumber>;
98
98
  export declare const listOffsetSchema: z.ZodDefault<z.ZodNumber>;
99
99
  export declare const listInputSchema: z.ZodObject<{
@@ -101,9 +101,9 @@ export declare const listInputSchema: z.ZodObject<{
101
101
  limit: z.ZodDefault<z.ZodNumber>;
102
102
  offset: z.ZodDefault<z.ZodNumber>;
103
103
  }, z.core.$strict>;
104
- export declare const listOutputSchema: z.ZodObject<{
104
+ export declare const listOutputSchema: z.ZodLazy<z.ZodObject<{
105
105
  path: z.ZodString;
106
- entries: z.ZodArray<z.ZodObject<{
106
+ entries: z.ZodArray<z.ZodLazy<z.ZodObject<{
107
107
  name: z.ZodString;
108
108
  size: z.ZodNumber;
109
109
  modifiedAt: z.ZodNumber;
@@ -112,20 +112,20 @@ export declare const listOutputSchema: z.ZodObject<{
112
112
  directory: "directory";
113
113
  symlink: "symlink";
114
114
  }>;
115
- }, z.core.$strict>>;
115
+ }, z.core.$strict>>>;
116
116
  nextOffset: z.ZodNullable<z.ZodNumber>;
117
- }, z.core.$strict>;
117
+ }, z.core.$strict>>;
118
118
  export type ComputerFileListInput = z.output<typeof listInputSchema>;
119
119
  export type ComputerFileListOutput = z.output<typeof listOutputSchema>;
120
- export declare const fileContentSchema: z.ZodString;
120
+ export declare const fileContentSchema: z.ZodLazy<z.ZodString>;
121
121
  export declare const writeInputSchema: z.ZodObject<{
122
122
  path: z.ZodString;
123
- content: z.ZodString;
123
+ content: z.ZodLazy<z.ZodString>;
124
124
  }, z.core.$strict>;
125
- export declare const writeOutputSchema: z.ZodObject<{
125
+ export declare const writeOutputSchema: z.ZodLazy<z.ZodObject<{
126
126
  path: z.ZodString;
127
127
  bytes: z.ZodNumber;
128
- }, z.core.$strict>;
128
+ }, z.core.$strict>>;
129
129
  export type ComputerFileWriteInput = z.output<typeof writeInputSchema>;
130
130
  export type ComputerFileWriteOutput = z.output<typeof writeOutputSchema>;
131
131
  export declare const writeBytesInputSchema: z.ZodObject<{
@@ -133,31 +133,31 @@ export declare const writeBytesInputSchema: z.ZodObject<{
133
133
  }, z.core.$strict>;
134
134
  export declare const replaceInputSchema: z.ZodObject<{
135
135
  path: z.ZodString;
136
- expectedContent: z.ZodString;
137
- content: z.ZodString;
136
+ expectedContent: z.ZodLazy<z.ZodString>;
137
+ content: z.ZodLazy<z.ZodString>;
138
138
  }, z.core.$strict>;
139
- export declare const replaceOutputSchema: z.ZodObject<{
139
+ export declare const replaceOutputSchema: z.ZodLazy<z.ZodObject<{
140
140
  path: z.ZodString;
141
141
  bytes: z.ZodNumber;
142
- }, z.core.$strict>;
143
- export declare const globInputSchema: z.ZodObject<{
142
+ }, z.core.$strict>>;
143
+ export declare const globInputSchema: z.ZodLazy<z.ZodObject<{
144
144
  path: z.ZodString;
145
145
  pattern: z.ZodString;
146
146
  limit: z.ZodDefault<z.ZodNumber>;
147
- }, z.core.$strict>;
148
- export declare const globOutputSchema: z.ZodObject<{
147
+ }, z.core.$strict>>;
148
+ export declare const globOutputSchema: z.ZodLazy<z.ZodObject<{
149
149
  path: z.ZodString;
150
150
  matches: z.ZodArray<z.ZodString>;
151
151
  truncated: z.ZodBoolean;
152
- }, z.core.$strict>;
153
- export declare const grepInputSchema: z.ZodObject<{
152
+ }, z.core.$strict>>;
153
+ export declare const grepInputSchema: z.ZodLazy<z.ZodObject<{
154
154
  path: z.ZodString;
155
155
  pattern: z.ZodString;
156
156
  regex: z.ZodDefault<z.ZodBoolean>;
157
157
  ignoreCase: z.ZodDefault<z.ZodBoolean>;
158
158
  limit: z.ZodDefault<z.ZodNumber>;
159
- }, z.core.$strict>;
160
- export declare const grepOutputSchema: z.ZodObject<{
159
+ }, z.core.$strict>>;
160
+ export declare const grepOutputSchema: z.ZodLazy<z.ZodObject<{
161
161
  path: z.ZodString;
162
162
  matches: z.ZodArray<z.ZodObject<{
163
163
  path: z.ZodString;
@@ -165,23 +165,23 @@ export declare const grepOutputSchema: z.ZodObject<{
165
165
  text: z.ZodString;
166
166
  }, z.core.$strict>>;
167
167
  truncated: z.ZodBoolean;
168
- }, z.core.$strict>;
169
- export declare const editInputSchema: z.ZodObject<{
168
+ }, z.core.$strict>>;
169
+ export declare const editInputSchema: z.ZodLazy<z.ZodObject<{
170
170
  path: z.ZodString;
171
171
  oldText: z.ZodString;
172
172
  newText: z.ZodString;
173
- }, z.core.$strict>;
174
- export declare const editOutputSchema: z.ZodObject<{
173
+ }, z.core.$strict>>;
174
+ export declare const editOutputSchema: z.ZodLazy<z.ZodObject<{
175
175
  path: z.ZodString;
176
176
  bytes: z.ZodNumber;
177
177
  diff: z.ZodString;
178
178
  firstChangedLine: z.ZodNullable<z.ZodNumber>;
179
- }, z.core.$strict>;
179
+ }, z.core.$strict>>;
180
180
  export { patchInputSchema, patchOutputSchema, } from "@fungi.computer/knapsack/files-patch";
181
- export declare const mkdirInputSchema: z.ZodObject<{
181
+ export declare const mkdirInputSchema: z.ZodLazy<z.ZodObject<{
182
182
  path: z.ZodString;
183
183
  recursive: z.ZodDefault<z.ZodBoolean>;
184
- }, z.core.$strict>;
184
+ }, z.core.$strict>>;
185
185
  export declare const mkdirOutputSchema: z.ZodObject<{
186
186
  path: z.ZodString;
187
187
  }, z.core.$strict>;
@@ -197,14 +197,14 @@ export declare function mintComputerRequestId(): ComputerRequestId;
197
197
  export declare const execInputSchema: z.ZodObject<{
198
198
  command: z.ZodString;
199
199
  cwd: z.ZodOptional<z.ZodString>;
200
- backend: z.ZodOptional<z.ZodString>;
200
+ backend: z.ZodOptional<z.ZodLazy<z.ZodString>>;
201
201
  timeoutMs: z.ZodDefault<z.ZodNumber>;
202
202
  }, z.core.$strict>;
203
203
  /** Resource hosts select a budget only after admitting their job principal. */
204
204
  export declare function computerExecutionRequestSchema(budget: ComputerExecutionBudget): z.ZodObject<{
205
205
  command: z.ZodString;
206
206
  cwd: z.ZodOptional<z.ZodString>;
207
- backend: z.ZodOptional<z.ZodString>;
207
+ backend: z.ZodOptional<z.ZodLazy<z.ZodString>>;
208
208
  timeoutMs: z.ZodDefault<z.ZodNumber>;
209
209
  requestId: z.ZodUUID;
210
210
  }, z.core.$strict>;
@@ -212,7 +212,7 @@ export declare function computerExecutionRequestSchema(budget: ComputerExecution
212
212
  export declare const execRequestSchema: z.ZodObject<{
213
213
  command: z.ZodString;
214
214
  cwd: z.ZodOptional<z.ZodString>;
215
- backend: z.ZodOptional<z.ZodString>;
215
+ backend: z.ZodOptional<z.ZodLazy<z.ZodString>>;
216
216
  timeoutMs: z.ZodDefault<z.ZodNumber>;
217
217
  requestId: z.ZodUUID;
218
218
  }, z.core.$strict>;
@@ -227,7 +227,7 @@ export declare const execOutputSchema: z.ZodObject<{
227
227
  stderr: z.ZodString;
228
228
  truncated: z.ZodBoolean;
229
229
  }, z.core.$strict>;
230
- export declare const computerProcessIdSchema: z.ZodString & z.ZodType<import("@fungi.computer/cairn").CairnId<"computer-process", "process", 1>, string, z.core.$ZodTypeInternals<import("@fungi.computer/cairn").CairnId<"computer-process", "process", 1>, string>>;
230
+ export declare const computerProcessIdSchema: z.ZodLazy<z.ZodString & z.ZodType<import("@fungi.computer/cairn").CairnId<"computer-process", "process", 1>, string, z.core.$ZodTypeInternals<import("@fungi.computer/cairn").CairnId<"computer-process", "process", 1>, string>>>;
231
231
  export type ComputerProcessId = z.output<typeof computerProcessIdSchema>;
232
232
  /** At most this many processes may be running in one host scope at once. */
233
233
  export declare const maximumRunningProcesses = 16;
@@ -238,13 +238,13 @@ export declare function mintComputerProcessId(): ComputerProcessId;
238
238
  export declare const processStartInputSchema: z.ZodObject<{
239
239
  requestId: z.ZodString;
240
240
  requestScope: z.ZodString;
241
- port: z.ZodOptional<z.ZodNumber>;
241
+ port: z.ZodOptional<z.ZodLazy<z.ZodNumber>>;
242
242
  command: z.ZodString;
243
243
  cwd: z.ZodOptional<z.ZodString>;
244
244
  }, z.core.$strict>;
245
245
  /** Model input excludes the host's replay identity and authority scope. */
246
246
  export declare const processStartToolInputSchema: z.ZodObject<{
247
- port: z.ZodOptional<z.ZodNumber>;
247
+ port: z.ZodOptional<z.ZodLazy<z.ZodNumber>>;
248
248
  command: z.ZodString;
249
249
  cwd: z.ZodOptional<z.ZodString>;
250
250
  }, z.core.$strict>;
@@ -254,7 +254,7 @@ export declare function installationProcessScope(installation: string, method: s
254
254
  id: string;
255
255
  }>): string;
256
256
  export declare const processIdInputSchema: z.ZodObject<{
257
- id: z.ZodString & z.ZodType<import("@fungi.computer/cairn").CairnId<"computer-process", "process", 1>, string, z.core.$ZodTypeInternals<import("@fungi.computer/cairn").CairnId<"computer-process", "process", 1>, string>>;
257
+ id: z.ZodLazy<z.ZodString & z.ZodType<import("@fungi.computer/cairn").CairnId<"computer-process", "process", 1>, string, z.core.$ZodTypeInternals<import("@fungi.computer/cairn").CairnId<"computer-process", "process", 1>, string>>>;
258
258
  }, z.core.$strict>;
259
259
  /**
260
260
  * `running`: computerd still reports the execution live. `exited`: it ended;
@@ -287,8 +287,8 @@ export declare const computerProcessSyncSchema: z.ZodEnum<{
287
287
  }>;
288
288
  export type ComputerProcessSync = z.output<typeof computerProcessSyncSchema>;
289
289
  export declare const computerProcessSchema: z.ZodObject<{
290
- id: z.ZodString & z.ZodType<import("@fungi.computer/cairn").CairnId<"computer-process", "process", 1>, string, z.core.$ZodTypeInternals<import("@fungi.computer/cairn").CairnId<"computer-process", "process", 1>, string>>;
291
- port: z.ZodNullable<z.ZodNumber>;
290
+ id: z.ZodLazy<z.ZodString & z.ZodType<import("@fungi.computer/cairn").CairnId<"computer-process", "process", 1>, string, z.core.$ZodTypeInternals<import("@fungi.computer/cairn").CairnId<"computer-process", "process", 1>, string>>>;
291
+ port: z.ZodNullable<z.ZodLazy<z.ZodNumber>>;
292
292
  command: z.ZodString;
293
293
  cwd: z.ZodNullable<z.ZodString>;
294
294
  state: z.ZodEnum<{
@@ -308,8 +308,8 @@ export declare const computerProcessSchema: z.ZodObject<{
308
308
  export type ComputerProcess = z.output<typeof computerProcessSchema>;
309
309
  export declare const processListOutputSchema: z.ZodObject<{
310
310
  processes: z.ZodArray<z.ZodObject<{
311
- id: z.ZodString & z.ZodType<import("@fungi.computer/cairn").CairnId<"computer-process", "process", 1>, string, z.core.$ZodTypeInternals<import("@fungi.computer/cairn").CairnId<"computer-process", "process", 1>, string>>;
312
- port: z.ZodNullable<z.ZodNumber>;
311
+ id: z.ZodLazy<z.ZodString & z.ZodType<import("@fungi.computer/cairn").CairnId<"computer-process", "process", 1>, string, z.core.$ZodTypeInternals<import("@fungi.computer/cairn").CairnId<"computer-process", "process", 1>, string>>>;
312
+ port: z.ZodNullable<z.ZodLazy<z.ZodNumber>>;
313
313
  command: z.ZodString;
314
314
  cwd: z.ZodNullable<z.ZodString>;
315
315
  state: z.ZodEnum<{
@@ -327,10 +327,10 @@ export declare const processListOutputSchema: z.ZodObject<{
327
327
  endedAt: z.ZodNullable<z.ZodNumber>;
328
328
  }, z.core.$strict>>;
329
329
  }, z.core.$strict>;
330
- export declare const processKillOutputSchema: z.ZodObject<{
330
+ export declare const processKillOutputSchema: z.ZodLazy<z.ZodObject<{
331
331
  process: z.ZodObject<{
332
- id: z.ZodString & z.ZodType<import("@fungi.computer/cairn").CairnId<"computer-process", "process", 1>, string, z.core.$ZodTypeInternals<import("@fungi.computer/cairn").CairnId<"computer-process", "process", 1>, string>>;
333
- port: z.ZodNullable<z.ZodNumber>;
332
+ id: z.ZodLazy<z.ZodString & z.ZodType<import("@fungi.computer/cairn").CairnId<"computer-process", "process", 1>, string, z.core.$ZodTypeInternals<import("@fungi.computer/cairn").CairnId<"computer-process", "process", 1>, string>>>;
333
+ port: z.ZodNullable<z.ZodLazy<z.ZodNumber>>;
334
334
  command: z.ZodString;
335
335
  cwd: z.ZodNullable<z.ZodString>;
336
336
  state: z.ZodEnum<{
@@ -348,7 +348,7 @@ export declare const processKillOutputSchema: z.ZodObject<{
348
348
  endedAt: z.ZodNullable<z.ZodNumber>;
349
349
  }, z.core.$strict>;
350
350
  signalled: z.ZodBoolean;
351
- }, z.core.$strict>;
351
+ }, z.core.$strict>>;
352
352
  /** No process with this id was started on this Computer. */
353
353
  export declare class ComputerProcessNotFoundError extends Error {
354
354
  constructor(id: string);
@@ -11,13 +11,13 @@ export const maximumStreamBytes = 64 * 1_024;
11
11
  export const maximumExecutionTimeMs = 120_000;
12
12
  export const genericComputerExecutionBudget = Object.freeze({ maximumTimeMs: maximumExecutionTimeMs });
13
13
  export const computerValueSchema = z.json();
14
- export const capabilityNameSchema = z
14
+ export const capabilityNameSchema = z.lazy(() => z
15
15
  .string()
16
16
  .min(1)
17
17
  .max(128)
18
- .regex(/^[A-Za-z][A-Za-z0-9_]*$/);
18
+ .regex(/^[A-Za-z][A-Za-z0-9_]*$/));
19
19
  /** One valid TCP port number, used only with this Computer's container. */
20
- export const computerPortSchema = z.number().int().min(1).max(65_535);
20
+ export const computerPortSchema = z.lazy(() => z.number().int().min(1).max(65_535));
21
21
  export const maximumExposedPorts = 64;
22
22
  /** computerd's Workspace RPC port, pinned by the Cloudflare container backend. */
23
23
  export const computerDaemonPort = 8080;
@@ -37,17 +37,17 @@ export function isComputerReservedPort(port) {
37
37
  export const computerPortInputSchema = z.strictObject({
38
38
  port: computerPortSchema,
39
39
  });
40
- export const computerPortOutputSchema = z.strictObject({
40
+ export const computerPortOutputSchema = z.lazy(() => z.strictObject({
41
41
  port: computerPortSchema,
42
42
  exposed: z.boolean(),
43
- });
44
- export const computerPortRemovalOutputSchema = z.strictObject({
43
+ }));
44
+ export const computerPortRemovalOutputSchema = z.lazy(() => z.strictObject({
45
45
  port: computerPortSchema,
46
46
  removed: z.boolean(),
47
- });
48
- export const computerPortsOutputSchema = z.strictObject({
47
+ }));
48
+ export const computerPortsOutputSchema = z.lazy(() => z.strictObject({
49
49
  ports: z.array(computerPortSchema).max(maximumExposedPorts),
50
- });
50
+ }));
51
51
  /** The port belongs to a Computer daemon and cannot be admitted for preview. */
52
52
  export class ComputerPortReservedError extends Error {
53
53
  constructor(port) {
@@ -71,18 +71,18 @@ export class ComputerPortLimitError extends Error {
71
71
  }
72
72
  // Schema keywords are opaque transport data. Zod still validates every value
73
73
  // as JSON before the description leaves or enters the Computer boundary.
74
- const schemaDocument = z
74
+ const schemaDocument = z.lazy(() => z
75
75
  .record(z.string(), z.unknown())
76
- .refine((value) => computerValueSchema.safeParse(value).success, "Capability schema must contain JSON values");
76
+ .refine((value) => computerValueSchema.safeParse(value).success, "Capability schema must contain JSON values"));
77
77
  /** Native operation descriptions shared by discovery and its OpenAPI document. */
78
- export const computerCapabilitiesSchema = z.array(z.strictObject({
78
+ export const computerCapabilitiesSchema = z.lazy(() => z.array(z.strictObject({
79
79
  id: capabilityNameSchema,
80
80
  name: capabilityNameSchema,
81
81
  kind: z.string(),
82
82
  description: z.string(),
83
83
  parameters: schemaDocument,
84
84
  output: schemaDocument,
85
- }));
85
+ })));
86
86
  export const pathSchema = z
87
87
  .string()
88
88
  .min(1)
@@ -95,10 +95,10 @@ export const boundedTextSchema = (minimumLength = 0) => z
95
95
  .refine((content) => utf8.encode(content).byteLength <= maximumFileBytes, `Text exceeds the ${String(maximumFileBytes)}-byte Computer bound`);
96
96
  /** Complete bounded UTF-8 text reads. Binary reads use the same path input. */
97
97
  export const readInputSchema = z.strictObject({ path: pathSchema });
98
- export const readOutputSchema = z.strictObject({
98
+ export const readOutputSchema = z.lazy(() => z.strictObject({
99
99
  path: pathSchema,
100
100
  content: boundedTextSchema(),
101
- });
101
+ }));
102
102
  /** Optional byte window; text reads remain complete and independently bounded. */
103
103
  export const readBytesInputSchema = z.strictObject({
104
104
  path: pathSchema,
@@ -106,18 +106,18 @@ export const readBytesInputSchema = z.strictObject({
106
106
  byteLength: z.number().int().positive().max(maximumFileBytes).optional(),
107
107
  });
108
108
  /** Finite byte-read reply used by admitted App frame bindings. */
109
- export const computerByteReadReplySchema = z.strictObject({
109
+ export const computerByteReadReplySchema = z.lazy(() => z.strictObject({
110
110
  path: readBytesInputSchema.shape.path,
111
111
  byteOffset: z.number().int().nonnegative(),
112
112
  content: z.string(),
113
113
  encoding: z.literal("base64"),
114
114
  truncated: z.boolean(),
115
- });
115
+ }));
116
116
  /** Host-admitted App method preview; parsing does not grant port access. */
117
- export const appMethodPreviewResultSchema = z.strictObject({
117
+ export const appMethodPreviewResultSchema = z.lazy(() => z.strictObject({
118
118
  previewUrl: z.url(),
119
119
  expiresAt: z.number().int().positive(),
120
- });
120
+ }));
121
121
  export const listLimitSchema = z
122
122
  .number()
123
123
  .int()
@@ -130,28 +130,28 @@ export const listInputSchema = z.strictObject({
130
130
  limit: listLimitSchema,
131
131
  offset: listOffsetSchema,
132
132
  });
133
- const listEntrySchema = z.strictObject({
133
+ const listEntrySchema = z.lazy(() => z.strictObject({
134
134
  name: z.string(),
135
135
  size: z.number().int().nonnegative(),
136
136
  modifiedAt: z.number(),
137
137
  type: z.enum(["file", "directory", "symlink"]),
138
- });
139
- export const listOutputSchema = z.strictObject({
138
+ }));
139
+ export const listOutputSchema = z.lazy(() => z.strictObject({
140
140
  path: pathSchema,
141
141
  entries: z.array(listEntrySchema).max(maximumListEntries),
142
142
  nextOffset: z.number().int().nonnegative().nullable(),
143
- });
144
- export const fileContentSchema = z
143
+ }));
144
+ export const fileContentSchema = z.lazy(() => z
145
145
  .string()
146
- .refine((content) => utf8.encode(content).byteLength <= maximumFileBytes, "File exceeds the Computer write bound");
146
+ .refine((content) => utf8.encode(content).byteLength <= maximumFileBytes, "File exceeds the Computer write bound"));
147
147
  export const writeInputSchema = z.strictObject({
148
148
  path: pathSchema,
149
149
  content: fileContentSchema,
150
150
  });
151
- export const writeOutputSchema = z.strictObject({
151
+ export const writeOutputSchema = z.lazy(() => z.strictObject({
152
152
  path: pathSchema,
153
153
  bytes: z.number().int().nonnegative(),
154
- });
154
+ }));
155
155
  export const writeBytesInputSchema = readInputSchema;
156
156
  export const replaceInputSchema = z.strictObject({
157
157
  path: pathSchema,
@@ -159,7 +159,7 @@ export const replaceInputSchema = z.strictObject({
159
159
  content: fileContentSchema,
160
160
  });
161
161
  export const replaceOutputSchema = writeOutputSchema;
162
- export const globInputSchema = z.strictObject({
162
+ export const globInputSchema = z.lazy(() => z.strictObject({
163
163
  path: pathSchema,
164
164
  pattern: z.string().min(1).max(maximumPatternCharacters),
165
165
  limit: z
@@ -168,13 +168,13 @@ export const globInputSchema = z.strictObject({
168
168
  .min(1)
169
169
  .max(maximumListEntries)
170
170
  .default(maximumListEntries),
171
- });
172
- export const globOutputSchema = z.strictObject({
171
+ }));
172
+ export const globOutputSchema = z.lazy(() => z.strictObject({
173
173
  path: pathSchema,
174
174
  matches: z.array(pathSchema).max(maximumListEntries),
175
175
  truncated: z.boolean(),
176
- });
177
- export const grepInputSchema = z.strictObject({
176
+ }));
177
+ export const grepInputSchema = z.lazy(() => z.strictObject({
178
178
  path: pathSchema,
179
179
  pattern: z.string().min(1).max(maximumPatternCharacters),
180
180
  regex: z.boolean().default(false),
@@ -185,8 +185,8 @@ export const grepInputSchema = z.strictObject({
185
185
  .min(1)
186
186
  .max(maximumListEntries)
187
187
  .default(maximumListEntries),
188
- });
189
- export const grepOutputSchema = z.strictObject({
188
+ }));
189
+ export const grepOutputSchema = z.lazy(() => z.strictObject({
190
190
  path: pathSchema,
191
191
  matches: z
192
192
  .array(z.strictObject({
@@ -196,24 +196,24 @@ export const grepOutputSchema = z.strictObject({
196
196
  }))
197
197
  .max(maximumListEntries),
198
198
  truncated: z.boolean(),
199
- });
200
- export const editInputSchema = z.strictObject({
199
+ }));
200
+ export const editInputSchema = z.lazy(() => z.strictObject({
201
201
  path: pathSchema,
202
202
  oldText: boundedTextSchema(1),
203
203
  newText: boundedTextSchema(),
204
- });
205
- export const editOutputSchema = z.strictObject({
204
+ }));
205
+ export const editOutputSchema = z.lazy(() => z.strictObject({
206
206
  path: pathSchema,
207
207
  bytes: z.number().int().nonnegative(),
208
208
  diff: z.string(),
209
209
  firstChangedLine: z.number().int().positive().nullable(),
210
- });
210
+ }));
211
211
  // Native Files tools and Computer HTTP decode the same patch contract.
212
212
  export { patchInputSchema, patchOutputSchema, } from "@fungi.computer/knapsack/files-patch";
213
- export const mkdirInputSchema = z.strictObject({
213
+ export const mkdirInputSchema = z.lazy(() => z.strictObject({
214
214
  path: pathSchema,
215
215
  recursive: z.boolean().default(true),
216
- });
216
+ }));
217
217
  export const mkdirOutputSchema = z.strictObject({ path: pathSchema });
218
218
  /**
219
219
  * Host-owned idempotency key for one `exec` or `bash` tool invocation. The
@@ -264,9 +264,7 @@ const processIds = defineIdFamily({
264
264
  version: 1,
265
265
  kinds: { process: { prefix: "computer_process" } },
266
266
  }).process;
267
- export const computerProcessIdSchema = z
268
- .string()
269
- .refine((value) => processIds.is(value));
267
+ export const computerProcessIdSchema = z.lazy(() => z.string().refine((value) => processIds.is(value)));
270
268
  /** At most this many processes may be running in one host scope at once. */
271
269
  export const maximumRunningProcesses = 16;
272
270
  /** At most this many process records, running or exited, are kept per host scope. */
@@ -337,10 +335,10 @@ export const computerProcessSchema = z.strictObject({
337
335
  export const processListOutputSchema = z.strictObject({
338
336
  processes: z.array(computerProcessSchema).max(maximumProcessRecords),
339
337
  });
340
- export const processKillOutputSchema = z.strictObject({
338
+ export const processKillOutputSchema = z.lazy(() => z.strictObject({
341
339
  process: computerProcessSchema,
342
340
  signalled: z.boolean(),
343
- });
341
+ }));
344
342
  /** No process with this id was started on this Computer. */
345
343
  export class ComputerProcessNotFoundError extends Error {
346
344
  constructor(id) {
@@ -19232,6 +19232,17 @@ function nullable(innerType) {
19232
19232
  innerType
19233
19233
  });
19234
19234
  }
19235
+ var ZodMiniLazy = /* @__PURE__ */ $constructor("ZodMiniLazy", (inst, def) => {
19236
+ $ZodLazy.init(inst, def);
19237
+ ZodMiniType.init(inst, def);
19238
+ });
19239
+ // @__NO_SIDE_EFFECTS__
19240
+ function _lazy(getter) {
19241
+ return new ZodMiniLazy({
19242
+ type: "lazy",
19243
+ getter
19244
+ });
19245
+ }
19235
19246
  var ZodMiniCustom = /* @__PURE__ */ $constructor("ZodMiniCustom", (inst, def) => {
19236
19247
  $ZodCustom.init(inst, def);
19237
19248
  ZodMiniType.init(inst, def);
@@ -19292,10 +19303,10 @@ var workflowAttestationSchema = object({
19292
19303
  /** Actor that armed the run, re-admitted by the host at dispatch. */
19293
19304
  armedBy: hostActorSchema
19294
19305
  });
19295
- var backgroundOrigin = strictObject({
19306
+ var backgroundOrigin = _lazy(() => strictObject({
19296
19307
  method: string4().check(refine2((name) => isAppApiMethodName(name))),
19297
19308
  seal: string4().check(_regex(/^[A-Za-z0-9_-]{43}$/u))
19298
- });
19309
+ }));
19299
19310
  var appMethodCallerSchema = object({
19300
19311
  computerId: nullable(identity2),
19301
19312
  actor: hostActorSchema,
@@ -19626,6 +19637,7 @@ var appCapabilityIds = [
19626
19637
  "agent.list",
19627
19638
  "agent.manage",
19628
19639
  "agent.rename",
19640
+ "agent.avatar",
19629
19641
  "agent.toolPolicy",
19630
19642
  "agent.read",
19631
19643
  "agent.send",
@@ -19679,6 +19691,9 @@ var method = Struct({
19679
19691
  pending: optional2(Literal2(true)),
19680
19692
  hidden: optional2(Literal2(true)),
19681
19693
  anonymous: optional2(Literal2(true)),
19694
+ present: optional2(Struct({
19695
+ verb: String4.check(isMinLength(1), isMaxLength(32))
19696
+ })),
19682
19697
  effect: Literals(["read", "write", "external"]),
19683
19698
  requires: ArraySchema(Literals(appCapabilityIds)).pipe(check(makeFilter2((values) => new Set(values).size === values.length)))
19684
19699
  }).check(makeFilter2((value) => value.anonymous !== true || value.effect === "read" && value.requires.length === 0, {
@@ -19774,6 +19789,14 @@ var rowSchemaV1 = Struct({
19774
19789
  open: optional2(rowOpenSchemaV1)
19775
19790
  });
19776
19791
  var rowPageSchemaV1 = ArraySchema(rowSchemaV1).pipe(check(isMaxLength(200)));
19792
+ var resultRowSchemaV1 = Struct({
19793
+ ...rowSchemaV1.fields,
19794
+ /** A Computer file the receiving host may preview; the host authorizes the read. */
19795
+ media: optional2(Struct({
19796
+ path: rowLabelSchemaV1,
19797
+ format: Literals(["fungi:image", "fungi:video"])
19798
+ }))
19799
+ });
19777
19800
 
19778
19801
  // ../gills/dist/declaration.js
19779
19802
  var isUnique = (values) => new Set(values).size === values.length;
@@ -22020,6 +22043,9 @@ function Pencil() {
22020
22043
  function InkTrail() {
22021
22044
  return (0, import_jsx_runtime.jsx)("path", { style: { fill: art.coral }, d: "M40.804 40.625C38.238 41.462 37.291 41.953 31.169 45.625 15.743 54.871 8.047 56.158 5.879 49.856 5.501 48.754 5.501 48.754 4.843 50.913 1.673 61.302 12.377 61.671 30.386 51.796 39.649 46.719 41.142 46.647 40.81 51.291 40.565 54.775 41.168 56.135 43.486 57.31 49.556 60.387 62.035 54.816 59.605 50.116 58.502 47.983 56.1 47.882 52.163 49.799 47.082 52.273 45.983 51.652 47.998 47.449 50.89 41.416 47.686 38.376 40.804 40.625Z" });
22022
22045
  }
22046
+ function Leaf({ transform: transform4 }) {
22047
+ return (0, import_jsx_runtime.jsx)("path", { style: { fill: art.mint }, transform: transform4, d: "M0 0C3 -2 5 -5 5 -8 5 -10.5 3 -12 0 -12S-5 -10.5 -5 -8C-5 -5 -3 -2 0 0Z" });
22048
+ }
22023
22049
 
22024
22050
  // ../sigils/dist/generation-art.js
22025
22051
  function GenerateTextArtwork() {
@@ -22044,8 +22070,8 @@ function InkcapArtwork() {
22044
22070
  // ../sigils/dist/sigil.js
22045
22071
  var { coral, blue, mint, grape, yellow, cream, ink } = art;
22046
22072
  var symbols = {
22047
- // Retained Bonsai favicon branching mark, scaled from its 32px viewBox.
22048
- bonsai: (0, import_jsx_runtime4.jsxs)("g", { transform: "scale(2)", children: [(0, import_jsx_runtime4.jsx)("rect", { width: "32", height: "32", rx: "8", fill: "#242c28" }), (0, import_jsx_runtime4.jsx)("path", { d: "M9 23V9m0 4c0 4 14 2 14 9", fill: "none", stroke: "#63cfaa", strokeWidth: "3", strokeLinecap: "round" }), (0, import_jsx_runtime4.jsx)("circle", { cx: "9", cy: "9", r: "3", fill: "#43a6f2" }), (0, import_jsx_runtime4.jsx)("circle", { cx: "9", cy: "23", r: "3", fill: "#fff4de" }), (0, import_jsx_runtime4.jsx)("circle", { cx: "23", cy: "22", r: "3", fill: "#ff6558" })] }),
22073
+ // Bonsai: a potted tree whose branches end in commits.
22074
+ bonsai: (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [(0, import_jsx_runtime4.jsx)("path", { fill: "none", stroke: mint, strokeWidth: "3.7", strokeLinecap: "round", d: "M35 27.5C36 25 35.5 22.5 34 21S31.5 17.5 31.5 14M36 27C40 26.8 43 26 45 24S47 20.5 47.5 18.5M30.5 31C32.5 26.5 30.5 24.6 26.5 24 22 23.5 18.5 21.6 16.8 18.5M29 37C26.5 34.5 25 33.7 21.5 33.2S15.5 32 13 31.6M36 39.5C38 38 40 37.5 42 36.5S47 34 51 32.2" }), (0, import_jsx_runtime4.jsx)("path", { fill: mint, d: "M25.5 43.5C28 40.5 28 37 27.5 33 27.3 29.5 29.5 27 33.5 26.3L37.5 26V29.5C35 29.8 34.2 31.5 34.3 34 34.5 37.5 37 39.5 41 43.5Z" }), (0, import_jsx_runtime4.jsx)("circle", { fill: blue, cx: "31.5", cy: "10.7", r: "4.8" }), (0, import_jsx_runtime4.jsx)("circle", { fill: grape, cx: "16.6", cy: "18.3", r: "4.6" }), (0, import_jsx_runtime4.jsx)("circle", { fill: yellow, cx: "47.9", cy: "17.7", r: "4.6" }), (0, import_jsx_runtime4.jsx)("circle", { fill: yellow, cx: "12.8", cy: "31.5", r: "4.6" }), (0, import_jsx_runtime4.jsx)("circle", { fill: blue, cx: "50.9", cy: "32.1", r: "4.6" }), (0, import_jsx_runtime4.jsx)("path", { fill: coral, d: "M16 46H47.5C47.5 54 44 58 38 58H25.5C19.5 58 16 54 16 46Z" }), (0, import_jsx_runtime4.jsx)("rect", { fill: coral, x: "14", y: "43", width: "35.5", height: "4.6", rx: "2.3" })] }),
22049
22075
  computer: (0, import_jsx_runtime4.jsx)(ComputerArtwork, {}),
22050
22076
  prints: (0, import_jsx_runtime4.jsx)(PrintsArtwork, {}),
22051
22077
  inkcap: (0, import_jsx_runtime4.jsx)(InkcapArtwork, {}),
@@ -22070,7 +22096,31 @@ var symbols = {
22070
22096
  // An App tile dropping into place: another App installed into the Team.
22071
22097
  installApps: (0, import_jsx_runtime4.jsxs)("g", { transform: "rotate(-6 32 32)", children: [(0, import_jsx_runtime4.jsx)("rect", { style: { fill: blue }, x: "9", y: "26", width: "46", height: "32", rx: "10" }), (0, import_jsx_runtime4.jsx)("rect", { style: { fill: cream }, x: "17", y: "33", width: "30", height: "18", rx: "5" }), (0, import_jsx_runtime4.jsx)("path", { style: { fill: mint }, d: "M22 38h8v8h-8z" }), (0, import_jsx_runtime4.jsx)("path", { style: { fill: grape }, d: "M34 38h8v8h-8z" }), (0, import_jsx_runtime4.jsx)("path", { style: { stroke: coral }, strokeWidth: "6", strokeLinecap: "round", strokeLinejoin: "round", d: "M32 4v17m-8-7 8 8 8-8" })] }),
22072
22098
  restricted: (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [(0, import_jsx_runtime4.jsx)("path", { fill: "none", style: { stroke: coral }, strokeWidth: "9", strokeLinecap: "round", d: "M16 23V19q0-17 16-17t16 17v4" }), (0, import_jsx_runtime4.jsx)("rect", { style: { fill: coral }, x: "8", y: "26", width: "48", height: "36", rx: "9" }), (0, import_jsx_runtime4.jsx)("path", { style: { fill: cream }, d: "M32 34a7 7 0 0 0-4 13v7h8v-7a7 7 0 0 0-4-13Z" })] }),
22073
- error: (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [(0, import_jsx_runtime4.jsx)("path", { style: { fill: coral }, d: "M32 6q5-8 10 0 9-3 10 6 9 2 5 11 8 6 0 12 3 9-6 11-1 9-10 6-6 8-12 0-9 3-11-6-9-2-6-11-8-6 0-12-3-9 6-11 1-9 10-6Z" }), (0, import_jsx_runtime4.jsx)("path", { fill: "none", style: { stroke: cream }, strokeWidth: "7", strokeLinecap: "round", d: "M32 18v15" }), (0, import_jsx_runtime4.jsx)("circle", { style: { fill: cream }, cx: "32", cy: "45", r: "4" })] })
22099
+ error: (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [(0, import_jsx_runtime4.jsx)("path", { style: { fill: coral }, d: "M32 6q5-8 10 0 9-3 10 6 9 2 5 11 8 6 0 12 3 9-6 11-1 9-10 6-6 8-12 0-9 3-11-6-9-2-6-11-8-6 0-12-3-9 6-11 1-9 10-6Z" }), (0, import_jsx_runtime4.jsx)("path", { fill: "none", style: { stroke: cream }, strokeWidth: "7", strokeLinecap: "round", d: "M32 18v15" }), (0, import_jsx_runtime4.jsx)("circle", { style: { fill: cream }, cx: "32", cy: "45", r: "4" })] }),
22100
+ // Trellis: workflow steps growing up a trellis.
22101
+ trellis: (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [(0, import_jsx_runtime4.jsxs)("g", { fill: yellow, children: [(0, import_jsx_runtime4.jsx)("rect", { x: "17.25", y: "9", width: "3.9", height: "49.2", rx: "1.95" }), (0, import_jsx_runtime4.jsx)("rect", { x: "42.95", y: "9", width: "3.9", height: "49.2", rx: "1.95" }), (0, import_jsx_runtime4.jsx)("rect", { x: "30.4", y: "18", width: "3.2", height: "26" }), (0, import_jsx_runtime4.jsx)("rect", { x: "14.8", y: "15.75", width: "34.4", height: "3.1", rx: "1.55" }), (0, import_jsx_runtime4.jsx)("rect", { x: "14.8", y: "28.85", width: "34.4", height: "3.1", rx: "1.55" }), (0, import_jsx_runtime4.jsx)("rect", { x: "14.8", y: "42.55", width: "34.4", height: "3.1", rx: "1.55" })] }), (0, import_jsx_runtime4.jsx)("path", { fill: "none", stroke: mint, strokeWidth: "3", strokeLinecap: "round", d: "M21.9 56.1C31.5 54.4 32.9 47 32.1 45.8" }), (0, import_jsx_runtime4.jsx)("path", { fill: "none", stroke: mint, strokeWidth: "3", strokeLinecap: "round", d: "M32 44.2C28.7 41.8 25.2 35.7 32 32.3 38.8 28 38.9 24 31.9 18.8 32.4 16.3 32.8 14.7 34.5 12.2" }), (0, import_jsx_runtime4.jsx)(Leaf, { transform: "translate(32.1 14.1) rotate(45) scale(0.45 0.86)" }), (0, import_jsx_runtime4.jsx)(Leaf, { transform: "translate(32.2 14.7) rotate(-60) scale(0.42 0.58)" }), (0, import_jsx_runtime4.jsx)(Leaf, { transform: "translate(34.8 28.3) rotate(65) scale(0.38 0.8)" }), (0, import_jsx_runtime4.jsx)(Leaf, { transform: "translate(28.2 33.1) rotate(-51) scale(0.5 0.57)" }), (0, import_jsx_runtime4.jsx)(Leaf, { transform: "translate(28.6 53.3) rotate(-48) scale(0.47 0.6)" }), (0, import_jsx_runtime4.jsx)("circle", { fill: coral, cx: "31.9", cy: "18.8", r: "4" }), (0, import_jsx_runtime4.jsx)("circle", { fill: blue, cx: "32", cy: "32.3", r: "4" }), (0, import_jsx_runtime4.jsx)("circle", { fill: grape, cx: "32", cy: "44.2", r: "4" })] }),
22102
+ // Games: an arcade stick for the Team's game servers.
22103
+ games: (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [(0, import_jsx_runtime4.jsx)("path", { fill: blue, d: "M18.5 28.5H45.5C49.5 29.5 53 32 54 35 55 37.5 56.8 45.5 56.6 48 56.5 53 52.5 57.5 47 58H15C9.5 56.5 6.6 51 7.6 45.5 8.6 39.5 9.3 35 10.5 33 12 31 14.5 29.5 18.5 28.5Z" }), (0, import_jsx_runtime4.jsx)("ellipse", { fill: cream, cx: "26.8", cy: "37.9", rx: "9.1", ry: "5.6" }), (0, import_jsx_runtime4.jsx)("ellipse", { fill: ink, cx: "27", cy: "37.6", rx: "4.7", ry: "2.2" }), (0, import_jsx_runtime4.jsx)("path", { fill: ink, d: "M23.1 26V35.4A4 4.2 0 0 0 31.1 35.4V26Z" }), (0, import_jsx_runtime4.jsx)("circle", { fill: coral, cx: "27.1", cy: "18.3", r: "12.4" }), (0, import_jsx_runtime4.jsx)("circle", { fill: cream, cx: "22.6", cy: "14.3", r: "3.05" }), (0, import_jsx_runtime4.jsx)("ellipse", { fill: yellow, cx: "45.1", cy: "37.2", rx: "5.6", ry: "3.95" }), (0, import_jsx_runtime4.jsx)("ellipse", { fill: cream, cx: "40.1", cy: "46.6", rx: "6.2", ry: "4.4" })] }),
22104
+ // Oyster: the open shell that holds the Apps' pearl.
22105
+ oyster: (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [(0, import_jsx_runtime4.jsx)("path", { fill: grape, d: "M35.5 6C33.7 6.3 32.3 7.6 31.4 9.4 30.9 10.3 30.4 10.3 29.5 10 25.5 9 20.6 11.6 19.6 15.9 19.4 16.6 19 17 18 17.1 14.5 17.6 12 20.6 12.1 24.2 12.2 25.4 12 25.9 11.5 26.5 7.5 30 10.5 34.5 17.5 34.4 15.3 32.6 16 31 19 29 26 24 37 19.5 43.5 19 46 19 46 22 43 25.5 46.5 23.5 51.5 18.5 53.5 15 55 11 50 7 45 9 43.8 9.4 43.3 9.2 42.5 8 40.7 6.3 38 5.6 35.5 6Z" }), (0, import_jsx_runtime4.jsx)("circle", { fill: cream, cx: "34.9", cy: "41.9", r: "11.3" }), (0, import_jsx_runtime4.jsxs)("g", { fill: ink, children: [(0, import_jsx_runtime4.jsx)("rect", { x: "29.9", y: "33.2", width: "3.2", height: "5.6", rx: "1.6" }), (0, import_jsx_runtime4.jsx)("rect", { x: "36.7", y: "33.2", width: "3.2", height: "5.6", rx: "1.6" })] }), (0, import_jsx_runtime4.jsx)("path", { fill: grape, d: "M49.5 39C47.9 39.3 46.5 40 46.1 41.6 45.8 43.2 45.5 43.5 44 43.5 38.5 43.5 35 48 39 49.5 40 50 39.5 50.5 38 51 35.5 52.5 32.5 52 30 51 29 50.5 28.5 50 29.5 50 33 47.5 30 43.5 24.5 43.5 23.3 43.5 22.9 43.3 22.5 43 20.5 40.5 19 40 17.5 39.5 13 39.5 13 44 17 47.5 18.3 48.4 18.6 48.7 19 49.5 20.5 53 23 55 26 55 26.8 55 27 55.3 27.5 56 31 58.5 36.5 58.5 40 56 40.8 55.2 41.2 55 42 55 45 55 47.5 53 49 49.5 49.6 48.5 50 48 50.5 47.5 56 43.5 55 38.5 49.5 39Z" }), (0, import_jsx_runtime4.jsx)("path", { fill: "none", stroke: yellow, strokeWidth: "3", strokeLinecap: "round", d: "M46.6 31.8 49.2 27.8 M49.4 35.5 52.8 33.7 M21.5 32.5 22.9 33.5 M19.3 37.5 21.1 38.1" })] }),
22106
+ // Tourtois: the desktop shell, a tortoise carrying window panes.
22107
+ tourtois: (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [(0, import_jsx_runtime4.jsx)("rect", { fill: cream, x: "11.07", y: "35.73", width: "26.8", height: "9.7", rx: "3.25", transform: "rotate(-5 24.47 40.58)" }), (0, import_jsx_runtime4.jsx)("path", { fill: yellow, d: "M14.8 16C19 14.6 23 13.5 26.5 12.6 28.4 12.1 29.6 13.4 30.1 15.3L31.6 21 17.4 37.6C13.8 38.2 10.6 37.8 10.1 35.4L9.2 27.8C9.1 26.1 10.1 24.7 11.6 24.1 11.4 22.4 11.4 20.6 11.8 19.1 12.3 17.4 13.3 16.5 14.8 16Z" }), (0, import_jsx_runtime4.jsx)("path", { fill: coral, d: "M14.0 24.1Q13.3 21.2 16.2 20.4L30.7 16.2Q33.6 15.4 34.6 18.2L36.0 22.7Q37.0 25.5 34.7 27.4L20.2 39.7Q17.9 41.6 17.2 38.7Z" }), (0, import_jsx_runtime4.jsx)("path", { fill: blue, d: "M21 23.4 35.5 20.6C37.3 20.2 38.6 21 38.9 22.6L40 34.5C40.1 36.2 39.1 37.3 37.5 37.7 32.6 39.9 26 41 21 41 16 41 12.2 40.2 11 38.8 10.4 37.6 10.8 36.4 12.4 37L19.6 38.4 18.4 27C18.2 25.2 19.3 23.7 21 23.4Z" }), (0, import_jsx_runtime4.jsx)("path", { fill: cream, d: "M22.8 29.6 34.8 26.9C36.2 26.6 37 27.3 37.2 28.6L37.9 33C38.1 34.2 37.5 35 36.3 35.3L24.3 37.8C23 38.1 22.3 37.5 22.1 36.3L21.3 31.6C21.1 30.6 21.7 29.8 22.8 29.6Z" }), (0, import_jsx_runtime4.jsxs)("g", { fill: cream, children: [(0, import_jsx_runtime4.jsx)("circle", { cx: "14.7", cy: "18.45", r: "1" }), (0, import_jsx_runtime4.jsx)("circle", { cx: "17.6", cy: "17.65", r: "1" }), (0, import_jsx_runtime4.jsx)("circle", { cx: "20.5", cy: "16.85", r: "1" }), (0, import_jsx_runtime4.jsx)("circle", { cx: "17.9", cy: "22.2", r: "1" }), (0, import_jsx_runtime4.jsx)("circle", { cx: "21", cy: "21.5", r: "1" }), (0, import_jsx_runtime4.jsx)("circle", { cx: "24.1", cy: "20.75", r: "1" }), (0, import_jsx_runtime4.jsx)("circle", { cx: "28.2", cy: "25.3", r: "1" })] }), (0, import_jsx_runtime4.jsx)("circle", { fill: coral, cx: "21.7", cy: "26.6", r: "1" }), (0, import_jsx_runtime4.jsx)("circle", { fill: yellow, cx: "24.9", cy: "25.9", r: "1.05" }), (0, import_jsx_runtime4.jsxs)("g", { fill: mint, children: [(0, import_jsx_runtime4.jsx)("ellipse", { cx: "8.8", cy: "36.6", rx: "3.6", ry: "1.9", transform: "rotate(22 8.8 36.6)" }), (0, import_jsx_runtime4.jsx)("path", { d: "M12 41C10 41.5 7.5 44.5 7 46.5 7 48 8.5 49.5 10.5 50 12.5 50.5 13.5 50 15 48 15.5 47 16.5 47.5 19 50 22 49.5 22 46.5 22 45.5 20.5 45.5 17 45 16.5 44.5 16.5 44 16.5 42 13.5 40.5 12 41Z" }), (0, import_jsx_runtime4.jsx)("path", { d: "M40 33C39 38 36 42 34.5 41.5 32.5 40.5 29.5 42 28.5 44 26 49 27.5 51.5 32.5 51 36 51 37 50 36 46.5 36 45 37 44.5 38 44.5 38.5 45.5 40.5 49 43.5 50 46.5 47.5 47.5 46.5 46 43.5 44 42 43 41.5 43.5 40.5 44.5 39.5 46 38 47 37.5L47 33Z" })] }), (0, import_jsx_runtime4.jsx)("ellipse", { fill: mint, cx: "46.4", cy: "30.6", rx: "8.1", ry: "8.3" }), (0, import_jsx_runtime4.jsxs)("g", { fill: ink, children: [(0, import_jsx_runtime4.jsx)("rect", { x: "45.05", y: "26.95", width: "2.25", height: "4.6", rx: "1.1", transform: "rotate(-6 46.2 29.3)" }), (0, import_jsx_runtime4.jsx)("rect", { x: "49.25", y: "26.4", width: "2.25", height: "4.6", rx: "1.1", transform: "rotate(-6 50.4 28.7)" })] }), (0, import_jsx_runtime4.jsx)("path", { fill: coral, d: "M46.8 32.2H51C51 34.3 50 35.4 48.9 35.4S46.8 34.3 46.8 32.2Z", transform: "rotate(-8 48.9 33.5)" }), (0, import_jsx_runtime4.jsx)("path", { fill: "none", stroke: yellow, strokeWidth: "3", strokeLinecap: "round", d: "M50.9 17.7 50.5 19.7 M55.2 20.1 53.4 21.9 M56.5 24.5 55.7 24.7" })] }),
22108
+ // The launcher's "All Apps": four App tiles, no install arrow.
22109
+ allApps: (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [(0, import_jsx_runtime4.jsx)("rect", { fill: coral, x: "7", y: "7.25", width: "23.2", height: "22.7", rx: "4.6", transform: "rotate(-6.2 18.6 18.6)" }), (0, import_jsx_runtime4.jsx)("rect", { fill: blue, x: "33.9", y: "7.25", width: "23.2", height: "22.7", rx: "4.6", transform: "rotate(6.2 45.5 18.6)" }), (0, import_jsx_runtime4.jsx)("rect", { fill: mint, x: "7", y: "34.15", width: "23.2", height: "22.7", rx: "4.6", transform: "rotate(6.2 18.6 45.5)" }), (0, import_jsx_runtime4.jsx)("rect", { fill: yellow, x: "33.9", y: "34.15", width: "23.2", height: "22.7", rx: "4.6", transform: "rotate(-6.2 45.5 45.5)" })] }),
22110
+ // Search: a magnifying glass.
22111
+ search: (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [(0, import_jsx_runtime4.jsx)("path", { fill: "none", stroke: blue, strokeWidth: "6.5", d: "M37 37.5 43 43.5" }), (0, import_jsx_runtime4.jsx)("path", { fill: "none", stroke: coral, strokeWidth: "12.6", strokeLinecap: "round", d: "M44.2 43.8 51.4 51.8" }), (0, import_jsx_runtime4.jsx)("path", { fill: "none", stroke: yellow, strokeWidth: "3", strokeLinecap: "round", d: "M47.2 42.4 52.8 47.8" }), (0, import_jsx_runtime4.jsx)("ellipse", { fill: blue, cx: "25.6", cy: "24.6", rx: "19.25", ry: "18.6" }), (0, import_jsx_runtime4.jsx)("ellipse", { fill: cream, cx: "25.2", cy: "24.1", rx: "14.2", ry: "13.6" })] }),
22112
+ // An Agent's web browser: a window with the world inside.
22113
+ browser: (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [(0, import_jsx_runtime4.jsx)("rect", { fill: coral, x: "5.9", y: "6.15", width: "52.2", height: "51.7", rx: "5.5" }), (0, import_jsx_runtime4.jsx)("path", { fill: cream, d: "M10 16.5H29.4C30.3 16.1 31 14.4 31.8 12.5 32.5 10.9 33.2 10 34.5 10H52.2C53.4 10 54 10.7 54 12V16.5C55.2 16.5 56 17.1 56 18.3V52.4C56 53.7 55.1 54.6 53.8 54.6H10.2C8.9 54.6 8 53.7 8 52.4V18.2C8 17.1 8.7 16.5 10 16.5Z" }), (0, import_jsx_runtime4.jsx)("circle", { fill: yellow, cx: "12.2", cy: "11.9", r: "1.95" }), (0, import_jsx_runtime4.jsx)("circle", { fill: blue, cx: "18.6", cy: "11.9", r: "1.95" }), (0, import_jsx_runtime4.jsx)("circle", { fill: grape, cx: "25.1", cy: "11.9", r: "1.95" }), (0, import_jsx_runtime4.jsx)("circle", { fill: mint, cx: "32", cy: "34.9", r: "14.5" }), (0, import_jsx_runtime4.jsxs)("g", { fill: "none", stroke: cream, strokeWidth: "3", children: [(0, import_jsx_runtime4.jsx)("ellipse", { cx: "32", cy: "34.9", rx: "7.7", ry: "13.3" }), (0, import_jsx_runtime4.jsx)("path", { d: "M17.5 34.9H46.5" })] })] }),
22114
+ // The public web: a globe with an orbit.
22115
+ internet: (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [(0, import_jsx_runtime4.jsx)("ellipse", { fill: "none", stroke: yellow, strokeWidth: "4.4", cx: "32.2", cy: "30.2", rx: "25.6", ry: "8.1", transform: "rotate(-20.8 32.2 30.2)" }), (0, import_jsx_runtime4.jsx)("circle", { fill: blue, cx: "32", cy: "32", r: "21.1" }), (0, import_jsx_runtime4.jsxs)("g", { fill: "none", stroke: cream, strokeWidth: "3", children: [(0, import_jsx_runtime4.jsx)("ellipse", { cx: "32", cy: "31.8", rx: "12.2", ry: "18.7" }), (0, import_jsx_runtime4.jsx)("path", { d: "M32 13.1V50.5M15 20.4Q32 29 49 20.4M12.5 39Q32 44.6 51.5 39" })] }), (0, import_jsx_runtime4.jsx)("path", { fill: "none", stroke: yellow, strokeWidth: "4.4", d: "M6.6 30.2A25.6 8.1 0 0 0 57.8 30.2", transform: "rotate(-20.8 32.2 30.2)" })] }),
22116
+ // Members and invites: the people on a Team.
22117
+ members: (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [(0, import_jsx_runtime4.jsx)("circle", { fill: blue, cx: "41.9", cy: "22.85", r: "12.2" }), (0, import_jsx_runtime4.jsx)("path", { fill: blue, d: "M36 34C33.8 34.8 32.2 35.8 31 37 37.5 39.5 40.5 43.5 40.5 49.5V53.5H54.5C57 53.5 58 51 58 47.5 58 40 55 35.5 49 34Z" }), (0, import_jsx_runtime4.jsx)("circle", { fill: coral, cx: "22.95", cy: "27.6", r: "12.85" }), (0, import_jsx_runtime4.jsx)("path", { fill: coral, d: "M15.5 38C10.5 39 7.5 42.5 6.5 47 5.5 50.5 6 53.5 8.5 53.5H38.5C42 52 40 43 36 40 34.5 39 32 38 31 38Z" }), (0, import_jsx_runtime4.jsxs)("g", { fill: ink, children: [(0, import_jsx_runtime4.jsx)("circle", { cx: "18.3", cy: "28", r: "1.6" }), (0, import_jsx_runtime4.jsx)("circle", { cx: "27.9", cy: "28", r: "1.6" }), (0, import_jsx_runtime4.jsx)("circle", { cx: "39.1", cy: "23.05", r: "1.55" }), (0, import_jsx_runtime4.jsx)("circle", { cx: "47.25", cy: "23.05", r: "1.55" })] })] }),
22118
+ // Selling Apps: coins and a price tag.
22119
+ sell: (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [(0, import_jsx_runtime4.jsx)("path", { fill: yellow, d: "M6.4 41.2V48.4C6.4 51.4 13.2 54 21.8 54S37.2 51.4 37.2 48.4V41.2C37.2 37.8 30.4 35 21.8 35S6.4 37.8 6.4 41.2Z" }), (0, import_jsx_runtime4.jsx)("ellipse", { fill: cream, cx: "21.9", cy: "40.8", rx: "13.2", ry: "3.6" }), (0, import_jsx_runtime4.jsxs)("g", { transform: "rotate(-3 22.5 30) translate(0.5 0)", children: [(0, import_jsx_runtime4.jsx)("path", { fill: yellow, d: "M7.5 26V34C7.5 37.3 14.2 40 22.5 40S37.5 37.3 37.5 34V26C37.5 22.7 30.8 20 22.5 20S7.5 22.7 7.5 26Z" }), (0, import_jsx_runtime4.jsx)("ellipse", { fill: cream, cx: "23.7", cy: "26.55", rx: "13.05", ry: "4.4" })] }), (0, import_jsx_runtime4.jsxs)("g", { transform: "translate(46.3 40.3) rotate(-25)", children: [(0, import_jsx_runtime4.jsx)("path", { fill: coral, d: "M-8.5-10Q-8.5-12-7-13L-1.5-16.3Q0-17.2 1.5-16.3L7-13Q8.5-12 8.5-10V9Q8.5 12 5.5 12H-5.5Q-8.5 12-8.5 9Z" }), (0, import_jsx_runtime4.jsx)("circle", { fill: cream, cx: "0", cy: "-10.7", r: "2.2" })] }), (0, import_jsx_runtime4.jsx)(TaperedRay, { fill: yellow, transform: "translate(38.2 18.6) scale(1.1 .86)" }), (0, import_jsx_runtime4.jsx)(TaperedRay, { fill: yellow, transform: "translate(42.8 21.2) rotate(45) scale(1.1 .85)" })] }),
22120
+ // Schedules and recurring runs: a calendar page with a clock.
22121
+ schedule: (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [(0, import_jsx_runtime4.jsx)("rect", { fill: cream, x: "6", y: "11", width: "47.6", height: "44", rx: "6" }), (0, import_jsx_runtime4.jsx)("path", { fill: coral, d: "M12 11H47.6Q53.6 11 53.6 17V21.5H6V17Q6 11 12 11Z" }), (0, import_jsx_runtime4.jsxs)("g", { fill: cream, children: [(0, import_jsx_runtime4.jsx)("circle", { cx: "16.1", cy: "16.15", r: "3.4" }), (0, import_jsx_runtime4.jsx)("circle", { cx: "43.4", cy: "16.15", r: "3.4" })] }), (0, import_jsx_runtime4.jsxs)("g", { fill: blue, children: [(0, import_jsx_runtime4.jsx)("rect", { x: "13.6", y: "6", width: "5", height: "11.2", rx: "2.5" }), (0, import_jsx_runtime4.jsx)("rect", { x: "40.9", y: "6", width: "5", height: "11.2", rx: "2.5" })] }), (0, import_jsx_runtime4.jsxs)("g", { fill: mint, children: [(0, import_jsx_runtime4.jsx)("rect", { x: "11.1", y: "25.1", width: "6.9", height: "6.6", rx: "1.8" }), (0, import_jsx_runtime4.jsx)("rect", { x: "20.7", y: "25.1", width: "6.9", height: "6.6", rx: "1.8" }), (0, import_jsx_runtime4.jsx)("rect", { x: "30.4", y: "25.1", width: "6.9", height: "6.6", rx: "1.8" }), (0, import_jsx_runtime4.jsx)("rect", { x: "20.7", y: "33.9", width: "6.9", height: "6.6", rx: "1.8" }), (0, import_jsx_runtime4.jsx)("rect", { x: "30.4", y: "33.9", width: "6.9", height: "6.6", rx: "1.8" }), (0, import_jsx_runtime4.jsx)("rect", { x: "11.1", y: "42.7", width: "6.9", height: "6.6", rx: "1.8" }), (0, import_jsx_runtime4.jsx)("rect", { x: "30.4", y: "42.7", width: "6.9", height: "6.6", rx: "1.8" })] }), (0, import_jsx_runtime4.jsxs)("g", { fill: grape, children: [(0, import_jsx_runtime4.jsx)("rect", { x: "40.4", y: "25.1", width: "6.9", height: "6.6", rx: "1.8" }), (0, import_jsx_runtime4.jsx)("rect", { x: "11.1", y: "33.9", width: "6.9", height: "6.6", rx: "1.8" }), (0, import_jsx_runtime4.jsx)("rect", { x: "20.7", y: "42.7", width: "6.9", height: "6.6", rx: "1.8" })] }), (0, import_jsx_runtime4.jsx)("circle", { fill: yellow, cx: "45.5", cy: "45.6", r: "12.2" }), (0, import_jsx_runtime4.jsx)("path", { fill: "none", stroke: ink, strokeWidth: "3", strokeLinecap: "round", strokeLinejoin: "round", d: "M45.1 39.3V46.2L51.3 49.8" }), (0, import_jsx_runtime4.jsx)("circle", { fill: ink, cx: "45.1", cy: "46.2", r: "2.5" })] }),
22122
+ // Fungi: Shiitake, the brand mushroom, winking.
22123
+ fungi: (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [(0, import_jsx_runtime4.jsx)("ellipse", { fill: cream, cx: "33.5", cy: "43.6", rx: "18.6", ry: "14.4", transform: "rotate(-6 33.5 43.6)" }), (0, import_jsx_runtime4.jsx)("path", { fill: coral, d: "M29.5 6.5C22 7.5 16 11 11 18.5 4 29 4.6 39.6 13.5 42.2 24 45 44 40.5 54 34.6 57.6 32.6 58.6 29.2 57.5 25 56.5 20 53 16 48.5 13 43.5 8 37 5.5 29.5 6.5Z" }), (0, import_jsx_runtime4.jsxs)("g", { fill: cream, children: [(0, import_jsx_runtime4.jsx)("ellipse", { cx: "29", cy: "15.7", rx: "8.7", ry: "6.3", transform: "rotate(-15.5 29 15.7)" }), (0, import_jsx_runtime4.jsx)("ellipse", { cx: "50.8", cy: "20.1", rx: "6.5", ry: "3.5", transform: "rotate(51.6 50.8 20.1)" }), (0, import_jsx_runtime4.jsx)("ellipse", { cx: "13", cy: "26.8", rx: "4.2", ry: "3.3", transform: "rotate(-54.5 13 26.8)" })] }), (0, import_jsx_runtime4.jsxs)("g", { fill: ink, transform: "translate(26.6 46.6) scale(1.1) translate(-33.7 -38.5)", children: [(0, import_jsx_runtime4.jsx)("rect", { x: "31.85", y: "35.9", width: "3.75", height: "5.25", rx: "1.85" }), (0, import_jsx_runtime4.jsx)("path", { d: "M 47.4 34.3 C 46 35 44.6 35.8 43.5 36.7 42.9 37.2 43.2 38.3 44 38.4 45.2 38.6 46.5 38.6 47.7 38.4 48.4 38.3 48.3 37.3 47.6 37.3 46.6 37.4 45.7 37.4 45 37.3 45.9 36.7 46.9 36.1 48 35.6 48.7 35.3 48.2 34 47.4 34.3 Z" }), (0, import_jsx_runtime4.jsx)("path", { d: "M 37.4 41.1 C 38.6 44.3 42.6 44.3 43.6 40.5 43.7 40 43.1 39.8 42.9 40.3 41.9 42.8 39.1 42.9 38.3 40.7 38.1 40.2 37.3 40.5 37.4 41.1 Z" })] })] })
22074
22124
  };
22075
22125
  function isSigilName(name) {
22076
22126
  return Object.hasOwn(symbols, name);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fungi.computer/computer",
3
- "version": "0.0.1",
3
+ "version": "0.1.0",
4
4
  "author": "Levi <levi@technomancy.dev>",
5
5
  "description": "Cloudflare Computer host for one durable Fungi Computer",
6
6
  "type": "module",
@@ -63,7 +63,7 @@
63
63
  "@fungi.computer/cairn": "0.0.1",
64
64
  "@fungi.computer/cloudflare-computer": "0.2.1-fungi.1",
65
65
  "@fungi.computer/cordyceps": "0.2.2",
66
- "@fungi.computer/knapsack": "0.0.2",
66
+ "@fungi.computer/knapsack": "0.1.0",
67
67
  "@fungi.computer/capnweb": "0.12.0",
68
68
  "effect": "4.0.2",
69
69
  "zod": "4.4.3",