@fungi.computer/puffball 0.0.2 → 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.
@@ -102,11 +102,11 @@ ceiling.
102
102
 
103
103
  #### Parameters
104
104
 
105
- | Parameter | Type |
106
- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
107
- | `operation` | [`AppBackendBindingOperation`](app-backend-binding-vocabulary.md#appbackendbindingoperation) |
108
- | `method` | \| `Pick`\<`Readonly`\<\{ `description`: `string`; `input`: `object`; `output`: `object`; `effect`: `"write"` \| `"external"` \| `"read"`; `requires`: 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"`)[]; `pending?`: `true`; `hidden?`: `true`; `anonymous?`: `true`; \}\>, `"requires"` \| `"effect"`\> \| `undefined` |
109
- | `ceiling` | `"write"` \| `"read"` |
105
+ | Parameter | Type |
106
+ | ----------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
107
+ | `operation` | [`AppBackendBindingOperation`](app-backend-binding-vocabulary.md#appbackendbindingoperation) |
108
+ | `method` | \| `Pick`\<`Readonly`\<\{ `description`: `string`; `input`: `object`; `output`: `object`; `effect`: `"write"` \| `"external"` \| `"read"`; `requires`: readonly ( \| `"approvals"` \| `"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"`)[]; `pending?`: `true`; `hidden?`: `true`; `anonymous?`: `true`; `present?`: `Readonly`\<\{ `verb`: `string`; \}\>; \}\>, `"requires"` \| `"effect"`\> \| `undefined` |
109
+ | `ceiling` | `"write"` \| `"read"` |
110
110
 
111
111
  #### Returns
112
112
 
@@ -85,7 +85,7 @@ const appEventFactSchema: ZodObject<
85
85
  gitSource: ZodOptional<
86
86
  ZodObject<
87
87
  {
88
- eventId: ZodString;
88
+ eventId: ZodLazy<ZodString>;
89
89
  repository: ZodString;
90
90
  updates: ZodArray<
91
91
  ZodObject<
@@ -192,12 +192,14 @@ const appMethodCallerSchema: ZodMiniObject<
192
192
  >;
193
193
  backgroundLane: ZodMiniOptional<ZodMiniString<string>>;
194
194
  backgroundOrigin: ZodMiniOptional<
195
- ZodMiniObject<
196
- {
197
- method: ZodMiniString<string>;
198
- seal: ZodMiniString<string>;
199
- },
200
- $strict
195
+ ZodMiniLazy<
196
+ ZodMiniObject<
197
+ {
198
+ method: ZodMiniString<string>;
199
+ seal: ZodMiniString<string>;
200
+ },
201
+ $strict
202
+ >
201
203
  >
202
204
  >;
203
205
  role: ZodMiniOptional<
@@ -150,12 +150,14 @@ A refused wake settles its lane; retry uses the existing Carrier backoff.
150
150
  ### backgroundOriginSchema
151
151
 
152
152
  ```ts
153
- const backgroundOriginSchema: ZodMiniObject<
154
- {
155
- method: ZodMiniString<string>;
156
- seal: ZodMiniString<string>;
157
- },
158
- $strict
153
+ const backgroundOriginSchema: ZodMiniLazy<
154
+ ZodMiniObject<
155
+ {
156
+ method: ZodMiniString<string>;
157
+ seal: ZodMiniString<string>;
158
+ },
159
+ $strict
160
+ >
159
161
  > = appMethodCallerSchema.shape.backgroundOrigin.def.innerType;
160
162
  ```
161
163
 
@@ -166,22 +168,24 @@ The caller's single lightweight grammar for a host-sealed enqueue origin.
166
168
  ### claimedJobAdmissionSchema
167
169
 
168
170
  ```ts
169
- const claimedJobAdmissionSchema: ZodUnion<
170
- readonly [
171
- ZodObject<
172
- {
173
- kind: ZodLiteral<"admitted">;
174
- },
175
- $strict
176
- >,
177
- ZodObject<
178
- {
179
- kind: ZodLiteral<"refused">;
180
- code: ZodLiteral<"access_changed">;
181
- },
182
- $strict
183
- >,
184
- ]
171
+ const claimedJobAdmissionSchema: ZodLazy<
172
+ ZodUnion<
173
+ readonly [
174
+ ZodObject<
175
+ {
176
+ kind: ZodLiteral<"admitted">;
177
+ },
178
+ $strict
179
+ >,
180
+ ZodObject<
181
+ {
182
+ kind: ZodLiteral<"refused">;
183
+ code: ZodLiteral<"access_changed">;
184
+ },
185
+ $strict
186
+ >,
187
+ ]
188
+ >
185
189
  >;
186
190
  ```
187
191
 
@@ -192,29 +196,31 @@ The closed result of checking a claimed job's origin in a fresh replay frame.
192
196
  ### backgroundWakeSchema
193
197
 
194
198
  ```ts
195
- const backgroundWakeSchema: ZodObject<
196
- {
197
- installationId: ZodString;
198
- actor: ZodObject<
199
- {
200
- kind: ZodMiniLiteral<"member">;
201
- memberId: ZodMiniString<string>;
202
- },
203
- $strict
204
- >;
205
- lane: ZodString;
206
- originMethod: ZodString;
207
- observed: ZodObject<
208
- {
209
- authorityVersion: ZodNumber;
210
- artifactDigest: ZodCustom<Sha256Digest, Sha256Digest>;
211
- membershipVersion: ZodOptional<ZodNumber>;
212
- },
213
- $strict
214
- >;
215
- epoch: ZodNumber;
216
- },
217
- $strict
199
+ const backgroundWakeSchema: ZodLazy<
200
+ ZodObject<
201
+ {
202
+ installationId: ZodString;
203
+ actor: ZodObject<
204
+ {
205
+ kind: ZodMiniLiteral<"member">;
206
+ memberId: ZodMiniString<string>;
207
+ },
208
+ $strict
209
+ >;
210
+ lane: ZodString;
211
+ originMethod: ZodString;
212
+ observed: ZodObject<
213
+ {
214
+ authorityVersion: ZodLazy<ZodNumber>;
215
+ artifactDigest: ZodCustom<Sha256Digest, Sha256Digest>;
216
+ membershipVersion: ZodOptional<ZodLazy<ZodNumber>>;
217
+ },
218
+ $strict
219
+ >;
220
+ epoch: ZodLazy<ZodNumber>;
221
+ },
222
+ $strict
223
+ >
218
224
  >;
219
225
  ```
220
226
 
@@ -765,6 +765,78 @@ R2 operations used by the scoped Team erasure owner.
765
765
 
766
766
  ---
767
767
 
768
+ ### ReleaseBootResultKey
769
+
770
+ ```ts
771
+ type ReleaseBootResultKey = Readonly<{
772
+ releaseId: string;
773
+ checkVersion: string;
774
+ }>;
775
+ ```
776
+
777
+ One boot result's identity: the Release and the version of the check that judged
778
+ it.
779
+
780
+ ---
781
+
782
+ ### ReleaseBootResultRecord
783
+
784
+ ```ts
785
+ type ReleaseBootResultRecord = Readonly<{
786
+ kind: "recorded";
787
+ result: Schema.Json;
788
+ checkedAt: number;
789
+ }>;
790
+ ```
791
+
792
+ A recorded boot result, opaque JSON owned by the boot gate that wrote it.
793
+
794
+ ---
795
+
796
+ ### ReleaseBootResults
797
+
798
+ ```ts
799
+ type ReleaseBootResults = Readonly<{
800
+ read: (key) => Promise<
801
+ | Readonly<{
802
+ kind: "absent";
803
+ }>
804
+ | ReleaseBootResultRecord
805
+ >;
806
+ recordIfAbsent: (input) => Promise<ReleaseBootResultRecord>;
807
+ }>;
808
+ ```
809
+
810
+ One boot result per Release and check version, beside the Release in the global
811
+ catalog. Whoever checks first (the publisher at submission or a Team's first
812
+ install) records it; everyone reads it; nobody rechecks. The catalog owns
813
+ identity and write-once storage; the boot gate owns the result's meaning and
814
+ parses it on read.
815
+
816
+ Writers are host-run checkers only, recording only definitive outcomes (never an
817
+ inconclusive or "not checked" run) with sanitized diagnostics; the result covers
818
+ the UI page check alone, not backend construction.
819
+
820
+ ---
821
+
822
+ ### BootCapabilityRows
823
+
824
+ ```ts
825
+ type BootCapabilityRows = Readonly<{
826
+ issue: (input) => Promise<void>;
827
+ resolve: (tokenDigest, now) => Promise<string | null>;
828
+ revoke: (leaseId) => Promise<void>;
829
+ }>;
830
+ ```
831
+
832
+ The catalog storage behind a host's boot `BootCapabilityStore`: one short-lived
833
+ row per issued lease, keyed by the token's digest (never the token). The lease
834
+ itself is opaque JSON owned by the boot capability contract, which parses it on
835
+ resolve. Expired rows are deleted on resolve and purged on every issue; revoke
836
+ deletes.
837
+
838
+ ---
839
+
768
840
  ### ArtifactSnapshotPolicy
769
841
 
770
842
  ```ts
@@ -821,6 +893,16 @@ const APP_RELEASE_D1_FRESH_SCHEMA: string;
821
893
 
822
894
  The one current App Release D1 schema for an empty catalog.
823
895
 
896
+ ---
897
+
898
+ ### BOOT\_CAPABILITY\_MAX\_LIFETIME\_MS
899
+
900
+ ```ts
901
+ const BOOT_CAPABILITY_MAX_LIFETIME_MS: 60000 = 60_000;
902
+ ```
903
+
904
+ The longest a boot capability lease may live: one boot check plus cleanup.
905
+
824
906
  ## Functions
825
907
 
826
908
  ### createTeamAppReleaseErasure()
@@ -880,6 +962,46 @@ Create the native registry that joins a Team publisher to one App/source.
880
962
 
881
963
  ---
882
964
 
965
+ ### createD1ReleaseBootResults()
966
+
967
+ ```ts
968
+ function createD1ReleaseBootResults(database): ReleaseBootResults;
969
+ ```
970
+
971
+ The catalog's write-once boot results, over the same App Release D1.
972
+
973
+ #### Parameters
974
+
975
+ | Parameter | Type |
976
+ | ---------- | ----------------------------------------------- |
977
+ | `database` | [`AppReleaseD1Database`](#appreleased1database) |
978
+
979
+ #### Returns
980
+
981
+ [`ReleaseBootResults`](#releasebootresults)
982
+
983
+ ---
984
+
985
+ ### createD1BootCapabilityRows()
986
+
987
+ ```ts
988
+ function createD1BootCapabilityRows(database): BootCapabilityRows;
989
+ ```
990
+
991
+ The catalog's short-lived boot capability rows, over the same App Release D1.
992
+
993
+ #### Parameters
994
+
995
+ | Parameter | Type |
996
+ | ---------- | ----------------------------------------------- |
997
+ | `database` | [`AppReleaseD1Database`](#appreleased1database) |
998
+
999
+ #### Returns
1000
+
1001
+ [`BootCapabilityRows`](#bootcapabilityrows)
1002
+
1003
+ ---
1004
+
883
1005
  ### createD1AppReleaseStore()
884
1006
 
885
1007
  ```ts
@@ -50,7 +50,7 @@ One ref update, bounded before a host asks the App or forwards the push.
50
50
  ### gitPushEventIdSchema
51
51
 
52
52
  ```ts
53
- const gitPushEventIdSchema: ZodString;
53
+ const gitPushEventIdSchema: ZodLazy<ZodString>;
54
54
  ```
55
55
 
56
56
  Host push event IDs include the Computer and local event identity.
package/docs/api/inbox.md CHANGED
@@ -282,7 +282,7 @@ Stable placement across review transitions; Map iterations remain distinct.
282
282
 
283
283
  | Parameter | Type |
284
284
  | --------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
285
- | `item` | \| \{ `agentId`: `string`; `sessionId`: `string`; `title`: `string`; `triggerId?`: `string`; `createdAt`: `number`; `lastActivityAt`: `number`; `settledAt?`: `number`; `visitedAt?`: `number`; `state`: `"running"` \| `"done"` \| `"errored"` \| `"needs_you"`; \} \| \{ `agentId`: `string`; `sessionId`: `string`; `state`: `"unavailable"`; \} \| \{ `kind`: `"workflow-review"`; `key`: \{ `runId`: `string`; `nodeId`: `string`; `iteration`: `string`; \}; `installationId`: `string`; `workflowId`: `string` \| `null`; `workflowTitle`: `string`; `reviewTitle`: `string`; `reviewers`: `"owners"` \| `"runner"`; `show`: readonly `Json`[]; `choices?`: readonly `string`[]; `openedAt`: `number`; `expiresAt`: `number`; `state`: `"closed"` \| `"pending"` \| `"answered"` \| `"delivered"` \| `"timed_out"`; \} \| \{ `agentId`: `string`; `sessionId`: `string`; `deleted`: `true`; \} |
285
+ | `item` | \| \{ `agentId`: `string`; `sessionId`: `string`; `title`: `string`; `triggerId?`: `string`; `createdAt`: `number`; `lastActivityAt`: `number`; `settledAt?`: `number`; `visitedAt?`: `number`; `state`: `"running"` \| `"done"` \| `"needs_you"` \| `"errored"`; \} \| \{ `agentId`: `string`; `sessionId`: `string`; `state`: `"unavailable"`; \} \| \{ `kind`: `"workflow-review"`; `key`: \{ `runId`: `string`; `nodeId`: `string`; `iteration`: `string`; \}; `installationId`: `string`; `workflowId`: `string` \| `null`; `workflowTitle`: `string`; `reviewTitle`: `string`; `reviewers`: `"owners"` \| `"runner"`; `show`: readonly `Json`[]; `choices?`: readonly `string`[]; `openedAt`: `number`; `expiresAt`: `number`; `state`: `"closed"` \| `"pending"` \| `"answered"` \| `"delivered"` \| `"timed_out"`; \} \| \{ `agentId`: `string`; `sessionId`: `string`; `deleted`: `true`; \} |
286
286
 
287
287
  #### Returns
288
288
 
package/docs/api/index.md CHANGED
@@ -746,6 +746,9 @@ type AppApi = Readonly<{
746
746
  pending?: true;
747
747
  hidden?: true;
748
748
  anonymous?: true;
749
+ present?: Readonly<{
750
+ verb: string;
751
+ }>;
749
752
  }>
750
753
  >
751
754
  >;
@@ -2560,9 +2563,11 @@ format lives in `@fungi.computer/agar/roles`.
2560
2563
 
2561
2564
  ```ts
2562
2565
  const appCapabilityIds: readonly [
2566
+ "approvals",
2563
2567
  "agent.list",
2564
2568
  "agent.manage",
2565
2569
  "agent.rename",
2570
+ "agent.avatar",
2566
2571
  "agent.toolPolicy",
2567
2572
  "agent.read",
2568
2573
  "agent.send",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fungi.computer/puffball",
3
- "version": "0.0.2",
3
+ "version": "0.2.0",
4
4
  "author": "Levi <levi@technomancy.dev>",
5
5
  "description": "Immutable App/Release catalog with verified public website delivery",
6
6
  "type": "module",
@@ -107,12 +107,12 @@
107
107
  "LICENSE"
108
108
  ],
109
109
  "dependencies": {
110
- "@fungi.computer/cairn": "0.0.1",
110
+ "@fungi.computer/cairn": "0.1.0",
111
111
  "effect": "4.0.2",
112
112
  "@fungi.computer/cloudflare-worker-bundler": "0.2.3-fungi.0",
113
113
  "zod": "4.4.3",
114
- "@fungi.computer/watchdog": "0.0.1",
115
- "@fungi.computer/gills": "0.0.1"
114
+ "@fungi.computer/watchdog": "0.1.0",
115
+ "@fungi.computer/gills": "0.2.0"
116
116
  },
117
117
  "devDependencies": {
118
118
  "@cloudflare/vitest-plugin": "1.1.2",