@fungi.computer/oyster 0.1.0 → 0.2.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.
Files changed (43) hide show
  1. package/dist/agent-avatars.d.ts +103 -0
  2. package/dist/agent-avatars.js +66 -0
  3. package/dist/agents.d.ts +12 -2
  4. package/dist/agents.js +39 -2
  5. package/dist/apps/gate.d.ts +7 -7
  6. package/dist/apps/gate.js +6 -6
  7. package/dist/apps/installation.d.ts +35 -35
  8. package/dist/apps/installation.js +20 -19
  9. package/dist/build/candidate-cli.mjs +55 -5
  10. package/dist/build-egress.js +4 -4
  11. package/dist/cloudflare.js +4 -4
  12. package/dist/frame-binding-wire-script.js +1 -1
  13. package/dist/frame-binding-wire.d.ts +1 -1
  14. package/dist/frame-binding-wire.js +1 -1
  15. package/dist/git-journal.js +4 -4
  16. package/dist/index.d.ts +1 -0
  17. package/dist/index.js +1 -0
  18. package/dist/installation-consent.d.ts +3 -1
  19. package/dist/installation-consent.js +2 -0
  20. package/dist/page/mount.d.ts +4 -8
  21. package/dist/page-script.js +4 -4
  22. package/dist/shell/app-directory.d.ts +37 -37
  23. package/dist/shell/app-directory.js +15 -18
  24. package/dist/shell/window-manager.d.ts +5 -1
  25. package/dist/shell/window-manager.js +21 -2
  26. package/dist/shell/workbench-directory.d.ts +9 -9
  27. package/dist/shell/workbench-host-types.d.ts +1 -1
  28. package/dist/shell/workbench-host.js +5 -0
  29. package/dist/shell/workbench-model.d.ts +3 -1
  30. package/dist/standalone/agents.d.ts +11 -4
  31. package/dist/standalone/agents.js +44 -5
  32. package/dist/standalone/app-builds-binding.js +6 -6
  33. package/dist/standalone/computer.js +3 -3
  34. package/dist/standalone/preview.js +2 -2
  35. package/dist/standalone/worker.js +2 -2
  36. package/dist/standalone/workflow-binding.d.ts +10 -10
  37. package/dist/standalone/workflow-binding.js +2 -2
  38. package/dist/standalone/workflow-host.d.ts +37 -13
  39. package/dist/standalone/workflow-host.js +36 -9
  40. package/dist/standalone/workflow-trigger-host.d.ts +24 -2
  41. package/dist/standalone/workflows.d.ts +67 -11
  42. package/dist/workers-git.js +1 -4
  43. package/package.json +19 -17
@@ -29,6 +29,7 @@ export declare function createStandaloneWorkflowTriggerHost(options: {
29
29
  readonly source: "key" | "manual" | "event" | "schedule" | "agent";
30
30
  readonly runId: string;
31
31
  readonly computerId: string | null;
32
+ readonly teamId: string;
32
33
  readonly plan: {
33
34
  readonly planDigest: string;
34
35
  readonly definition: {
@@ -87,9 +88,11 @@ export declare function createStandaloneWorkflowTriggerHost(options: {
87
88
  readonly timeout: number;
88
89
  readonly kind: "review";
89
90
  readonly reviewers: "runner" | "owners";
91
+ readonly detail?: string;
90
92
  readonly choices?: readonly {
91
93
  readonly id: string;
92
94
  readonly label: string;
95
+ readonly description?: string;
93
96
  }[];
94
97
  } | {
95
98
  readonly id: string;
@@ -188,9 +191,11 @@ export declare function createStandaloneWorkflowTriggerHost(options: {
188
191
  readonly timeout: number;
189
192
  readonly kind: "review";
190
193
  readonly reviewers: "runner" | "owners";
194
+ readonly detail?: string;
191
195
  readonly choices?: readonly {
192
196
  readonly id: string;
193
197
  readonly label: string;
198
+ readonly description?: string;
194
199
  }[];
195
200
  } | {
196
201
  readonly id: string;
@@ -329,7 +334,6 @@ export declare function createStandaloneWorkflowTriggerHost(options: {
329
334
  readonly pending?: true;
330
335
  }[];
331
336
  };
332
- readonly teamId: string;
333
337
  readonly requestId: string;
334
338
  readonly actorId: string;
335
339
  readonly ceiling: {
@@ -340,7 +344,7 @@ export declare function createStandaloneWorkflowTriggerHost(options: {
340
344
  readonly operations: readonly string[];
341
345
  }[];
342
346
  readonly nodeId: string;
343
- readonly capabilities: readonly ("agent.list" | "agent.manage" | "agent.rename" | "agent.toolPolicy" | "agent.read" | "agent.send" | "computer.list" | "computer.readFile" | "computer.writeFile" | "computer.execute" | "llm.generation" | "media.generation" | "games:servers" | "git.repository" | "apps.open" | "apps.call" | "app.storage" | "app.events.emit" | "team.workbenchHost" | "marketplace.browse" | "marketplace.purchase" | "workflow.run" | "workflow.publish" | "workflow.arm" | "world" | "channels.read" | "channels.personal.manage")[];
347
+ readonly capabilities: readonly ("agent.list" | "agent.manage" | "agent.rename" | "agent.avatar" | "agent.toolPolicy" | "agent.read" | "agent.send" | "computer.list" | "computer.readFile" | "computer.writeFile" | "computer.execute" | "llm.generation" | "media.generation" | "games:servers" | "git.repository" | "apps.open" | "apps.call" | "app.storage" | "app.events.emit" | "team.workbenchHost" | "marketplace.browse" | "marketplace.purchase" | "workflow.run" | "workflow.publish" | "workflow.arm" | "world" | "channels.read" | "channels.personal.manage")[];
344
348
  readonly graphId?: string;
345
349
  }[];
346
350
  readonly nodeGitAccess: readonly {
@@ -588,9 +592,11 @@ export declare function createStandaloneWorkflowTriggerHost(options: {
588
592
  readonly timeout: number;
589
593
  readonly kind: "review";
590
594
  readonly reviewers: "runner" | "owners";
595
+ readonly detail?: string;
591
596
  readonly choices?: readonly {
592
597
  readonly id: string;
593
598
  readonly label: string;
599
+ readonly description?: string;
594
600
  }[];
595
601
  } | {
596
602
  readonly id: string;
@@ -689,9 +695,11 @@ export declare function createStandaloneWorkflowTriggerHost(options: {
689
695
  readonly timeout: number;
690
696
  readonly kind: "review";
691
697
  readonly reviewers: "runner" | "owners";
698
+ readonly detail?: string;
692
699
  readonly choices?: readonly {
693
700
  readonly id: string;
694
701
  readonly label: string;
702
+ readonly description?: string;
695
703
  }[];
696
704
  } | {
697
705
  readonly id: string;
@@ -966,9 +974,11 @@ export declare function createStandaloneWorkflowTriggerHost(options: {
966
974
  readonly timeout: number;
967
975
  readonly kind: "review";
968
976
  readonly reviewers: "runner" | "owners";
977
+ readonly detail?: string;
969
978
  readonly choices?: readonly {
970
979
  readonly id: string;
971
980
  readonly label: string;
981
+ readonly description?: string;
972
982
  }[];
973
983
  } | {
974
984
  readonly id: string;
@@ -1067,9 +1077,11 @@ export declare function createStandaloneWorkflowTriggerHost(options: {
1067
1077
  readonly timeout: number;
1068
1078
  readonly kind: "review";
1069
1079
  readonly reviewers: "runner" | "owners";
1080
+ readonly detail?: string;
1070
1081
  readonly choices?: readonly {
1071
1082
  readonly id: string;
1072
1083
  readonly label: string;
1084
+ readonly description?: string;
1073
1085
  }[];
1074
1086
  } | {
1075
1087
  readonly id: string;
@@ -1293,6 +1305,12 @@ export declare function createStandaloneWorkflowTriggerHost(options: {
1293
1305
  readonly iteration: string;
1294
1306
  readonly instanceId: string;
1295
1307
  readonly eventType: string;
1308
+ readonly position?: readonly {
1309
+ readonly node: string;
1310
+ readonly loop: "repeat" | "map";
1311
+ readonly index: number;
1312
+ readonly count: number;
1313
+ }[];
1296
1314
  readonly choices?: readonly string[];
1297
1315
  };
1298
1316
  status: "closed" | "pending" | "answered" | "delivered" | "timed_out";
@@ -1486,9 +1504,11 @@ export declare function createStandaloneWorkflowTriggerHost(options: {
1486
1504
  readonly timeout: number;
1487
1505
  readonly kind: "review";
1488
1506
  readonly reviewers: "runner" | "owners";
1507
+ readonly detail?: string;
1489
1508
  readonly choices?: readonly {
1490
1509
  readonly id: string;
1491
1510
  readonly label: string;
1511
+ readonly description?: string;
1492
1512
  }[];
1493
1513
  } | {
1494
1514
  readonly id: string;
@@ -1587,9 +1607,11 @@ export declare function createStandaloneWorkflowTriggerHost(options: {
1587
1607
  readonly timeout: number;
1588
1608
  readonly kind: "review";
1589
1609
  readonly reviewers: "runner" | "owners";
1610
+ readonly detail?: string;
1590
1611
  readonly choices?: readonly {
1591
1612
  readonly id: string;
1592
1613
  readonly label: string;
1614
+ readonly description?: string;
1593
1615
  }[];
1594
1616
  } | {
1595
1617
  readonly id: string;
@@ -125,7 +125,7 @@ export declare abstract class StandaloneWorkflowRunsBase<Env extends StandaloneW
125
125
  runId: string;
126
126
  workflowId: string | undefined;
127
127
  commit: string | undefined;
128
- source: "manual" | "agent" | "key" | "event" | "schedule";
128
+ source: "key" | "manual" | "agent" | "event" | "schedule";
129
129
  initiatedBy: Readonly<{
130
130
  kind: "member";
131
131
  memberId: string;
@@ -144,7 +144,7 @@ export declare abstract class StandaloneWorkflowRunsBase<Env extends StandaloneW
144
144
  runId: string;
145
145
  workflowId: string | undefined;
146
146
  commit: string | undefined;
147
- source: "manual" | "agent" | "key" | "event" | "schedule";
147
+ source: "key" | "manual" | "agent" | "event" | "schedule";
148
148
  initiatedBy: Readonly<{
149
149
  kind: "member";
150
150
  memberId: string;
@@ -300,9 +300,11 @@ export declare abstract class StandaloneWorkflowRunsBase<Env extends StandaloneW
300
300
  readonly port: string;
301
301
  }[];
302
302
  readonly timeout: number;
303
+ readonly detail?: string | undefined;
303
304
  readonly choices?: readonly {
304
- readonly id: string;
305
305
  readonly label: string;
306
+ readonly id: string;
307
+ readonly description?: string | undefined;
306
308
  }[] | undefined;
307
309
  } | {
308
310
  readonly id: string;
@@ -395,9 +397,11 @@ export declare abstract class StandaloneWorkflowRunsBase<Env extends StandaloneW
395
397
  readonly port: string;
396
398
  }[];
397
399
  readonly timeout: number;
400
+ readonly detail?: string | undefined;
398
401
  readonly choices?: readonly {
399
- readonly id: string;
400
402
  readonly label: string;
403
+ readonly id: string;
404
+ readonly description?: string | undefined;
401
405
  }[] | undefined;
402
406
  } | {
403
407
  readonly id: string;
@@ -451,10 +455,10 @@ export declare abstract class StandaloneWorkflowRunsBase<Env extends StandaloneW
451
455
  readonly triggers?: readonly ({
452
456
  readonly id: string;
453
457
  readonly on: "webhook";
454
- readonly when?: import("@fungi.computer/braid").Predicate | undefined;
455
458
  readonly input?: {
456
459
  readonly [x: string]: import("@fungi.computer/braid").Mapping;
457
460
  } | undefined;
461
+ readonly when?: import("@fungi.computer/braid").Predicate | undefined;
458
462
  readonly title?: string | undefined;
459
463
  } | {
460
464
  readonly id: string;
@@ -473,11 +477,11 @@ export declare abstract class StandaloneWorkflowRunsBase<Env extends StandaloneW
473
477
  readonly on: "event";
474
478
  readonly app: string;
475
479
  readonly eventDigest: string;
476
- readonly repository?: import("@fungi.computer/braid").Mapping | undefined;
477
- readonly when?: import("@fungi.computer/braid").Predicate | undefined;
478
480
  readonly input?: {
479
481
  readonly [x: string]: import("@fungi.computer/braid").Mapping;
480
482
  } | undefined;
483
+ readonly when?: import("@fungi.computer/braid").Predicate | undefined;
484
+ readonly repository?: import("@fungi.computer/braid").Mapping | undefined;
481
485
  readonly title?: string | undefined;
482
486
  })[] | undefined;
483
487
  };
@@ -485,13 +489,13 @@ export declare abstract class StandaloneWorkflowRunsBase<Env extends StandaloneW
485
489
  readonly [x: string]: {
486
490
  readonly methods: {
487
491
  readonly [x: string]: {
488
- readonly digest: string;
489
492
  readonly output: {
490
493
  readonly [x: string]: S.Json;
491
494
  };
492
495
  readonly input: {
493
496
  readonly [x: string]: S.Json;
494
497
  };
498
+ readonly digest: string;
495
499
  readonly approval: "none" | "queue" | "simulate";
496
500
  readonly description: string;
497
501
  readonly effect: "read" | "write" | "external";
@@ -520,14 +524,14 @@ export declare abstract class StandaloneWorkflowRunsBase<Env extends StandaloneW
520
524
  };
521
525
  readonly estimatedSteps: number;
522
526
  readonly requiredBindings: readonly {
523
- readonly method: string;
524
- readonly installationId: string;
525
527
  readonly output: {
526
528
  readonly [x: string]: S.Json;
527
529
  };
528
530
  readonly input: {
529
531
  readonly [x: string]: S.Json;
530
532
  };
533
+ readonly method: string;
534
+ readonly installationId: string;
531
535
  readonly approval: "none" | "queue" | "simulate";
532
536
  readonly description: string;
533
537
  readonly effect: "read" | "write" | "external";
@@ -547,9 +551,29 @@ export declare abstract class StandaloneWorkflowRunsBase<Env extends StandaloneW
547
551
  readonly code: "invalid_input" | "revoked" | "not_granted" | "invalid_output" | "member_revoked" | "workflow_run_revoked" | "computer_revoked" | "budget_exhausted" | "unknown_method";
548
552
  }>;
549
553
  dispatch(call: NodeCall): Promise<{
550
- readonly kind: "complete";
551
554
  readonly output: S.Json;
555
+ readonly kind: "complete";
552
556
  readonly costMilliunits: number;
557
+ readonly row?: {
558
+ readonly id: string;
559
+ readonly title: string;
560
+ readonly status?: {
561
+ readonly label: string;
562
+ readonly tone: "success" | "error" | "info" | "neutral" | "primary" | "secondary" | "accent" | "warning";
563
+ } | undefined;
564
+ readonly media?: {
565
+ readonly path: string;
566
+ readonly format: "fungi:image" | "fungi:video";
567
+ } | undefined;
568
+ readonly open?: {
569
+ readonly params: readonly {
570
+ readonly key: string;
571
+ readonly value: string;
572
+ }[];
573
+ } | undefined;
574
+ readonly detail?: string | undefined;
575
+ readonly tone?: "error" | "running" | "settled" | "attention" | "muted" | undefined;
576
+ } | undefined;
553
577
  } | {
554
578
  readonly kind: "refused";
555
579
  readonly code: "invalid_input" | "revoked" | "not_granted" | "invalid_output" | "member_revoked" | "workflow_run_revoked" | "computer_revoked" | "budget_exhausted" | "unknown_method";
@@ -599,9 +623,35 @@ export declare abstract class StandaloneWorkflowRunsBase<Env extends StandaloneW
599
623
  readonly output?: {
600
624
  readonly [x: string]: S.Json;
601
625
  } | undefined;
626
+ readonly row?: {
627
+ readonly id: string;
628
+ readonly title: string;
629
+ readonly status?: {
630
+ readonly label: string;
631
+ readonly tone: "success" | "error" | "info" | "neutral" | "primary" | "secondary" | "accent" | "warning";
632
+ } | undefined;
633
+ readonly media?: {
634
+ readonly path: string;
635
+ readonly format: "fungi:image" | "fungi:video";
636
+ } | undefined;
637
+ readonly open?: {
638
+ readonly params: readonly {
639
+ readonly key: string;
640
+ readonly value: string;
641
+ }[];
642
+ } | undefined;
643
+ readonly detail?: string | undefined;
644
+ readonly tone?: "error" | "running" | "settled" | "attention" | "muted" | undefined;
645
+ } | undefined;
602
646
  readonly costMilliunits?: number | undefined;
603
647
  readonly graphId?: string | undefined;
604
648
  readonly poll?: number | undefined;
649
+ readonly position?: readonly {
650
+ readonly node: string;
651
+ readonly loop: "map" | "repeat";
652
+ readonly index: number;
653
+ readonly count: number;
654
+ }[] | undefined;
605
655
  readonly recordedAt?: number | undefined;
606
656
  readonly durationMs?: number | undefined;
607
657
  readonly outputDigest?: string | undefined;
@@ -619,6 +669,12 @@ export declare abstract class StandaloneWorkflowRunsBase<Env extends StandaloneW
619
669
  readonly iteration: string;
620
670
  readonly instanceId: string;
621
671
  readonly eventType: string;
672
+ readonly position?: readonly {
673
+ readonly node: string;
674
+ readonly loop: "repeat" | "map";
675
+ readonly index: number;
676
+ readonly count: number;
677
+ }[];
622
678
  readonly choices?: readonly string[];
623
679
  };
624
680
  status: "closed" | "pending" | "answered" | "delivered" | "timed_out";
@@ -773,10 +773,7 @@ const revokeKeySchema = Schema.Struct({
773
773
  keyId: Schema.String.check(Schema.isMinLength(1), Schema.isMaxLength(256)),
774
774
  requestId: Schema.String.check(Schema.isPattern(/^[A-Za-z0-9_.:-]{1,112}$/u)),
775
775
  });
776
- const oysterGrantsArraySchema = z
777
- .array(oysterKeyVocabulary.grantSchema)
778
- .min(1)
779
- .max(64);
776
+ const oysterGrantsArraySchema = z.lazy(() => z.array(oysterKeyVocabulary.grantSchema).min(1).max(64));
780
777
  function keySummary(record) {
781
778
  return {
782
779
  keyId: record.keyId,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fungi.computer/oyster",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "author": "Levi <levi@technomancy.dev>",
5
5
  "description": "Run your own Apps on Cloudflare Workers or celld: installable App Releases, each with its own Durable Object, SQLite database and declared bindings",
6
6
  "type": "module",
@@ -242,20 +242,22 @@
242
242
  }
243
243
  },
244
244
  "dependencies": {
245
- "@fungi.computer/agar": "0.1.0",
245
+ "@fungi.computer/agar": "0.2.0",
246
246
  "@fungi.computer/burrow": "0.0.2",
247
247
  "@fungi.computer/cairn": "0.0.1",
248
- "@fungi.computer/ear-tag": "0.0.1",
249
- "@fungi.computer/caps": "0.0.2",
248
+ "@fungi.computer/ear-tag": "0.0.2",
249
+ "@fungi.computer/caps": "0.1.0",
250
250
  "@fungi.computer/carrier": "0.0.1",
251
- "@fungi.computer/forage": "0.0.2",
252
- "@fungi.computer/gills": "0.0.1",
253
- "@fungi.computer/knapsack": "0.0.2",
254
- "@fungi.computer/mycelium": "0.0.2",
255
- "@fungi.computer/puffball": "0.0.2",
256
- "@fungi.computer/sigils": "0.0.1",
251
+ "@fungi.computer/forage": "0.1.0",
252
+ "@fungi.computer/gills": "0.1.0",
253
+ "@fungi.computer/knapsack": "0.1.0",
254
+ "@fungi.computer/mycelium": "0.1.0",
255
+ "@fungi.computer/puffball": "0.1.0",
256
+ "@fungi.computer/sigils": "0.1.0",
257
+ "@fungi.computer/sprite": "0.1.0",
258
+ "@fungi.computer/sprite-zdog": "0.1.0",
257
259
  "@fungi.computer/watchdog": "0.0.1",
258
- "@fungi.computer/whistle": "0.0.1",
260
+ "@fungi.computer/whistle": "0.0.2",
259
261
  "@modelcontextprotocol/server": "2.0.0",
260
262
  "@pnpm/lockfile.fs": "1100.2.13",
261
263
  "@pnpm/lockfile.pruner": "1100.0.27",
@@ -271,12 +273,12 @@
271
273
  "oauth4webapi": "3.8.8",
272
274
  "@cfworker/json-schema": "4.1.1",
273
275
  "@earendil-works/pi-ai": "0.99.2",
274
- "@fungi.computer/braid": "0.0.1",
275
- "@fungi.computer/computer": "0.0.1",
276
- "@fungi.computer/darkroom": "0.0.1",
277
- "@fungi.computer/shiitake": "0.1.0",
278
- "@fungi.computer/veil": "0.0.1",
279
- "@fungi.computer/workflows-wire": "0.0.1"
276
+ "@fungi.computer/braid": "0.1.0",
277
+ "@fungi.computer/computer": "0.1.0",
278
+ "@fungi.computer/darkroom": "0.1.0",
279
+ "@fungi.computer/shiitake": "0.2.0",
280
+ "@fungi.computer/veil": "0.1.0",
281
+ "@fungi.computer/workflows-wire": "0.1.0"
280
282
  },
281
283
  "license": "MIT",
282
284
  "peerDependencies": {