@fungi.computer/oyster 0.0.1 → 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 (195) hide show
  1. package/README.md +228 -176
  2. package/dist/agent-avatars.d.ts +103 -0
  3. package/dist/agent-avatars.js +66 -0
  4. package/dist/agents.d.ts +12 -2
  5. package/dist/agents.js +39 -2
  6. package/dist/app-builds.d.ts +76 -17
  7. package/dist/app-builds.js +207 -63
  8. package/dist/app-sources.d.ts +7 -22
  9. package/dist/app-sources.js +49 -14
  10. package/dist/apps/gate.d.ts +7 -7
  11. package/dist/apps/gate.js +6 -6
  12. package/dist/apps/installation.d.ts +35 -35
  13. package/dist/apps/installation.js +20 -19
  14. package/dist/build/artifact-writer.d.ts +40 -0
  15. package/dist/build/artifact-writer.js +181 -0
  16. package/dist/build/build-jobs.js +7 -1
  17. package/dist/build/build-policy.d.ts +10 -0
  18. package/dist/build/build-policy.js +10 -0
  19. package/dist/build/build-step.d.ts +12 -1
  20. package/dist/build/build-step.js +9 -1
  21. package/dist/build/candidate-builder.d.ts +68 -0
  22. package/dist/build/candidate-builder.js +91 -0
  23. package/dist/build/candidate-cli.d.ts +1 -0
  24. package/dist/build/candidate-cli.js +119 -0
  25. package/dist/build/candidate-cli.mjs +28220 -0
  26. package/dist/build/content-objects.d.ts +37 -0
  27. package/dist/build/content-objects.js +53 -0
  28. package/dist/build/effect.d.ts +18 -0
  29. package/dist/build/effect.js +52 -12
  30. package/dist/build/git-environment.d.ts +3 -0
  31. package/dist/build/git-environment.js +21 -9
  32. package/dist/build/local-build.d.ts +13 -3
  33. package/dist/build/local-build.js +149 -99
  34. package/dist/build/snapshot-package-store.d.ts +10 -0
  35. package/dist/build/snapshot-package-store.js +15 -0
  36. package/dist/build/snapshot-program-scripts.js +1 -1
  37. package/dist/build/snapshot-programs/snapshot-path.d.ts +2 -0
  38. package/dist/build/snapshot-programs/snapshot-path.js +6 -0
  39. package/dist/build/submission-contract.d.ts +461 -17
  40. package/dist/build/submission-contract.js +136 -26
  41. package/dist/build/workspace-build.d.ts +7 -2
  42. package/dist/build/workspace-build.js +55 -11
  43. package/dist/build-contract.d.ts +3 -0
  44. package/dist/build-contract.js +3 -0
  45. package/dist/build-egress.d.ts +62 -0
  46. package/dist/build-egress.js +148 -0
  47. package/dist/build.d.ts +1 -0
  48. package/dist/build.js +1 -0
  49. package/dist/cloudflare.js +4 -4
  50. package/dist/frame-binding-wire-script.js +1 -1
  51. package/dist/frame-binding-wire.d.ts +1 -1
  52. package/dist/frame-binding-wire.js +1 -1
  53. package/dist/git-journal.js +4 -4
  54. package/dist/index.d.ts +1 -0
  55. package/dist/index.js +1 -0
  56. package/dist/installation-consent.d.ts +3 -1
  57. package/dist/installation-consent.js +2 -0
  58. package/dist/mcp-owner.js +20 -8
  59. package/dist/pack.d.ts +6 -3
  60. package/dist/pack.js +28 -11
  61. package/dist/page/gill-observation.d.ts +4 -0
  62. package/dist/page/gill-observation.js +31 -0
  63. package/dist/page/mount.d.ts +4 -8
  64. package/dist/page/window-launch.d.ts +18 -0
  65. package/dist/page/window-launch.js +11 -0
  66. package/dist/page-script.js +4 -4
  67. package/dist/release.d.ts +11 -0
  68. package/dist/release.js +4 -1
  69. package/dist/shell/app-directory.d.ts +50 -45
  70. package/dist/shell/app-directory.js +19 -18
  71. package/dist/shell/shell-module.d.ts +26 -2
  72. package/dist/shell/shell-module.js +51 -2
  73. package/dist/shell/window-manager.d.ts +5 -1
  74. package/dist/shell/window-manager.js +21 -2
  75. package/dist/shell/workbench-directory.d.ts +332 -0
  76. package/dist/shell/workbench-directory.js +35 -0
  77. package/dist/shell/workbench-host-types.d.ts +1 -1
  78. package/dist/shell/workbench-host.js +5 -0
  79. package/dist/shell/workbench-model.d.ts +3 -1
  80. package/dist/source/index.d.ts +6 -7
  81. package/dist/source/index.js +6 -7
  82. package/dist/source/template-push.d.ts +33 -0
  83. package/dist/source/template-push.js +223 -0
  84. package/dist/source/template-repository.d.ts +2 -0
  85. package/dist/source/template-repository.js +13 -0
  86. package/dist/source/{template-write.d.ts → template-seed.d.ts} +19 -20
  87. package/dist/source/template-seed.js +80 -0
  88. package/dist/standalone/agent-directory.d.ts +4 -0
  89. package/dist/standalone/agent-directory.js +4 -0
  90. package/dist/standalone/agents.d.ts +227 -0
  91. package/dist/standalone/agents.js +834 -0
  92. package/dist/standalone/app-builds-binding.d.ts +36 -0
  93. package/dist/standalone/app-builds-binding.js +119 -0
  94. package/dist/standalone/app-set.d.ts +91 -0
  95. package/dist/standalone/app-set.js +395 -0
  96. package/dist/standalone/app-source.d.ts +41 -0
  97. package/dist/standalone/app-source.js +59 -0
  98. package/dist/standalone/builds.d.ts +18 -0
  99. package/dist/standalone/builds.js +101 -0
  100. package/dist/standalone/computer-egress.d.ts +37 -0
  101. package/dist/standalone/computer-egress.js +111 -0
  102. package/dist/standalone/computer.d.ts +122 -0
  103. package/dist/standalone/computer.js +714 -0
  104. package/dist/standalone/install-apps-cli.d.ts +2 -0
  105. package/dist/standalone/install-apps-cli.js +126 -0
  106. package/dist/standalone/instance.d.ts +35 -0
  107. package/dist/standalone/instance.js +74 -0
  108. package/dist/standalone/media.d.ts +76 -0
  109. package/dist/standalone/media.js +227 -0
  110. package/dist/standalone/preview.d.ts +51 -0
  111. package/dist/standalone/preview.js +167 -0
  112. package/dist/standalone/registry.d.ts +102 -0
  113. package/dist/standalone/registry.js +193 -0
  114. package/dist/standalone/tenancy.d.ts +42 -0
  115. package/dist/standalone/tenancy.js +241 -0
  116. package/dist/standalone/worker.d.ts +55 -0
  117. package/dist/standalone/worker.js +147 -0
  118. package/dist/standalone/workflow-authority-readers.d.ts +16 -0
  119. package/dist/standalone/workflow-authority-readers.js +35 -0
  120. package/dist/standalone/workflow-binding.d.ts +216 -0
  121. package/dist/standalone/workflow-binding.js +217 -0
  122. package/dist/standalone/workflow-events.d.ts +46 -0
  123. package/dist/standalone/workflow-events.js +39 -0
  124. package/dist/standalone/workflow-git-capture.d.ts +7 -0
  125. package/dist/standalone/workflow-git-capture.js +62 -0
  126. package/dist/standalone/workflow-host.d.ts +955 -0
  127. package/dist/standalone/workflow-host.js +778 -0
  128. package/dist/standalone/workflow-node-capture.d.ts +13 -0
  129. package/dist/standalone/workflow-node-capture.js +72 -0
  130. package/dist/standalone/workflow-root-authority.d.ts +27 -0
  131. package/dist/standalone/workflow-root-authority.js +87 -0
  132. package/dist/standalone/workflow-schedules.d.ts +52 -0
  133. package/dist/standalone/workflow-schedules.js +40 -0
  134. package/dist/standalone/workflow-trigger-host.d.ts +1716 -0
  135. package/dist/standalone/workflow-trigger-host.js +52 -0
  136. package/dist/standalone/workflows.d.ts +713 -0
  137. package/dist/standalone/workflows.js +554 -0
  138. package/dist/tenancy/auth0.d.ts +64 -0
  139. package/dist/tenancy/auth0.js +198 -0
  140. package/dist/tenancy/cloudflare/rate-limit.d.ts +8 -0
  141. package/dist/tenancy/cloudflare/rate-limit.js +19 -0
  142. package/dist/tenancy/cloudflare/registry.d.ts +50 -0
  143. package/dist/tenancy/cloudflare/registry.js +301 -0
  144. package/dist/tenancy/cloudflare.d.ts +2 -0
  145. package/dist/tenancy/cloudflare.js +2 -0
  146. package/dist/tenancy/cold-directory.d.ts +13 -0
  147. package/dist/tenancy/cold-directory.js +43 -0
  148. package/dist/tenancy/contracts.d.ts +195 -0
  149. package/dist/tenancy/contracts.js +1 -0
  150. package/dist/tenancy/index.d.ts +19 -0
  151. package/dist/tenancy/index.js +156 -0
  152. package/dist/tenancy/owner-key.d.ts +26 -0
  153. package/dist/tenancy/owner-key.js +63 -0
  154. package/dist/tenancy/oyster.d.ts +4 -0
  155. package/dist/tenancy/oyster.js +25 -0
  156. package/dist/tenancy/registry-record.d.ts +7 -0
  157. package/dist/tenancy/registry-record.js +44 -0
  158. package/dist/tenancy/registry.d.ts +27 -0
  159. package/dist/tenancy/registry.js +138 -0
  160. package/dist/tenancy/resolve.d.ts +7 -0
  161. package/dist/tenancy/resolve.js +64 -0
  162. package/dist/workers-git.js +1 -4
  163. package/dist/workers.d.ts +2 -2
  164. package/dist/workers.js +3 -1
  165. package/docs/api/build-contract.md +829 -32
  166. package/docs/api/build.md +253 -17
  167. package/docs/api/modules.md +40 -32
  168. package/docs/api/pack.md +6 -3
  169. package/docs/api/shell/app-directory.md +267 -0
  170. package/docs/api/shell/shell-module.md +64 -3
  171. package/docs/api/shell/workbench-directory.md +119 -0
  172. package/docs/api/shell/workbench.md +19 -0
  173. package/docs/api/shell.md +127 -0
  174. package/docs/api/tenancy/auth0.md +110 -0
  175. package/docs/api/tenancy/cloudflare.md +221 -0
  176. package/docs/api/tenancy/cold-directory.md +46 -0
  177. package/docs/api/tenancy/owner-key.md +63 -0
  178. package/docs/api/tenancy/registry.md +77 -0
  179. package/docs/api/tenancy/resolve.md +69 -0
  180. package/docs/api/tenancy.md +430 -0
  181. package/docs/api/workers-git.md +140 -21
  182. package/docs/api/workers.md +15 -2
  183. package/docs/site/agent-quickstart.mdx +52 -55
  184. package/examples/standalone/worker.ts +7 -14
  185. package/examples/standalone/wrangler.jsonc +67 -6
  186. package/package.json +78 -25
  187. package/dist/build/r2-artifact-writer.d.ts +0 -31
  188. package/dist/build/r2-artifact-writer.js +0 -179
  189. package/dist/source/template-write.js +0 -344
  190. package/docs/media/architecture.mmd +0 -32
  191. package/docs/media/architecture.png +0 -0
  192. package/docs/media/bonsai-network.png +0 -0
  193. package/docs/media/bonsai-repository.png +0 -0
  194. package/examples/git/worker.ts +0 -39
  195. package/examples/git/wrangler.jsonc +0 -32
@@ -0,0 +1,2 @@
1
+ /** Whether `path` names the captured snapshot root or a path inside it. */
2
+ export declare function isInsideSnapshot(snapshot: string, path: string): boolean;
@@ -0,0 +1,6 @@
1
+ import { isAbsolute, relative, resolve, sep } from "node:path";
2
+ /** Whether `path` names the captured snapshot root or a path inside it. */
3
+ export function isInsideSnapshot(snapshot, path) {
4
+ const suffix = relative(snapshot, resolve(path));
5
+ return (suffix !== ".." && !suffix.startsWith(`..${sep}`) && !isAbsolute(suffix));
6
+ }
@@ -1,8 +1,212 @@
1
1
  import * as Schema from "effect/Schema";
2
- /** The largest Team App candidate submission request body, in bytes. */
3
- export declare const TEAM_APP_SUBMISSION_MAX_REQUEST_BYTES: number;
4
- /** Exact submitted output and provenance before the Team assigns a stable Release ID. */
5
- export declare const teamAppCandidateSubmissionSchema: Schema.Struct<{
2
+ /**
3
+ * The largest candidate manifest request body, in bytes. A manifest names
4
+ * objects; their bytes are uploaded one at a time, never inside it.
5
+ */
6
+ export declare const TEAM_APP_CANDIDATE_MANIFEST_MAX_BYTES: number;
7
+ /** One content-addressed object a build uploaded before its manifest. */
8
+ export declare const candidateObjectSchema: Schema.Struct<{
9
+ readonly digest: Schema.refine<import("@fungi.computer/puffball").Sha256Digest, Schema.String>;
10
+ readonly byteLength: Schema.Number;
11
+ }>;
12
+ /** One uploaded object, as a manifest names it. */
13
+ export type CandidateObject = Schema.Schema.Type<typeof candidateObjectSchema>;
14
+ /** A build's output by reference: the same surfaces as its bytes, sized. */
15
+ export declare const candidateOutputManifestSchema: Schema.Union<readonly [Schema.Struct<{
16
+ readonly declaration: Schema.optionalKey<Schema.Codec<Readonly<{
17
+ api?: import("@fungi.computer/puffball").AppApi;
18
+ displayName?: string | undefined;
19
+ capabilities: readonly import("@fungi.computer/puffball").AppCapabilityId[];
20
+ calls?: readonly Readonly<{
21
+ appId: string;
22
+ methods: readonly string[];
23
+ }>[] | undefined;
24
+ guidance?: string | undefined;
25
+ handlers: readonly import("@fungi.computer/puffball").AppHandler[];
26
+ receives?: readonly "git.push"[] | undefined;
27
+ icon?: string;
28
+ roles: readonly import("@fungi.computer/puffball").AppRole[];
29
+ storage?: readonly import("@fungi.computer/puffball").AppStorageKey[] | undefined;
30
+ commands?: readonly import("@fungi.computer/puffball").AppDeclaredCommand[] | undefined;
31
+ gills?: readonly import("@fungi.computer/gills").AppDeclaredGill[] | undefined;
32
+ backend?: Readonly<{
33
+ bindings: readonly import("@fungi.computer/puffball").AppBackendBinding[];
34
+ sync?: Readonly<{
35
+ method: string;
36
+ }>;
37
+ }> | undefined;
38
+ }>, Readonly<{
39
+ api?: import("@fungi.computer/puffball").AppApi;
40
+ displayName?: string | undefined;
41
+ capabilities: readonly import("@fungi.computer/puffball").AppCapabilityId[];
42
+ calls?: readonly Readonly<{
43
+ appId: string;
44
+ methods: readonly string[];
45
+ }>[] | undefined;
46
+ guidance?: string | undefined;
47
+ handlers: readonly import("@fungi.computer/puffball").AppHandler[];
48
+ receives?: readonly "git.push"[] | undefined;
49
+ icon?: string;
50
+ roles: readonly import("@fungi.computer/puffball").AppRole[];
51
+ storage?: readonly import("@fungi.computer/puffball").AppStorageKey[] | undefined;
52
+ commands?: readonly import("@fungi.computer/puffball").AppDeclaredCommand[] | undefined;
53
+ gills?: readonly import("@fungi.computer/gills").AppDeclaredGill[] | undefined;
54
+ backend?: Readonly<{
55
+ bindings: readonly import("@fungi.computer/puffball").AppBackendBinding[];
56
+ sync?: Readonly<{
57
+ method: string;
58
+ }>;
59
+ }> | undefined;
60
+ }>, never, never>>;
61
+ readonly kind: Schema.Literal<"ui">;
62
+ readonly ui: Schema.Union<readonly [Schema.Struct<{
63
+ readonly mediaType: Schema.Literal<"text/html; charset=utf-8">;
64
+ readonly content: Schema.Struct<{
65
+ readonly digest: Schema.refine<import("@fungi.computer/puffball").Sha256Digest, Schema.String>;
66
+ readonly byteLength: Schema.Number;
67
+ readonly kind: Schema.Literal<"html">;
68
+ }>;
69
+ }>, Schema.Struct<{
70
+ readonly mediaType: Schema.Literal<"application/vnd.fungi.app-assets+json">;
71
+ readonly content: Schema.Struct<{
72
+ readonly kind: Schema.Literal<"assets">;
73
+ readonly base: Schema.String;
74
+ readonly assets: Schema.$Array<Schema.Struct<{
75
+ readonly digest: Schema.refine<import("@fungi.computer/puffball").Sha256Digest, Schema.String>;
76
+ readonly byteLength: Schema.Number;
77
+ readonly path: Schema.String;
78
+ }>>;
79
+ }>;
80
+ }>]>;
81
+ }>, Schema.Struct<{
82
+ readonly declaration: Schema.optionalKey<Schema.Codec<Readonly<{
83
+ api?: import("@fungi.computer/puffball").AppApi;
84
+ displayName?: string | undefined;
85
+ capabilities: readonly import("@fungi.computer/puffball").AppCapabilityId[];
86
+ calls?: readonly Readonly<{
87
+ appId: string;
88
+ methods: readonly string[];
89
+ }>[] | undefined;
90
+ guidance?: string | undefined;
91
+ handlers: readonly import("@fungi.computer/puffball").AppHandler[];
92
+ receives?: readonly "git.push"[] | undefined;
93
+ icon?: string;
94
+ roles: readonly import("@fungi.computer/puffball").AppRole[];
95
+ storage?: readonly import("@fungi.computer/puffball").AppStorageKey[] | undefined;
96
+ commands?: readonly import("@fungi.computer/puffball").AppDeclaredCommand[] | undefined;
97
+ gills?: readonly import("@fungi.computer/gills").AppDeclaredGill[] | undefined;
98
+ backend?: Readonly<{
99
+ bindings: readonly import("@fungi.computer/puffball").AppBackendBinding[];
100
+ sync?: Readonly<{
101
+ method: string;
102
+ }>;
103
+ }> | undefined;
104
+ }>, Readonly<{
105
+ api?: import("@fungi.computer/puffball").AppApi;
106
+ displayName?: string | undefined;
107
+ capabilities: readonly import("@fungi.computer/puffball").AppCapabilityId[];
108
+ calls?: readonly Readonly<{
109
+ appId: string;
110
+ methods: readonly string[];
111
+ }>[] | undefined;
112
+ guidance?: string | undefined;
113
+ handlers: readonly import("@fungi.computer/puffball").AppHandler[];
114
+ receives?: readonly "git.push"[] | undefined;
115
+ icon?: string;
116
+ roles: readonly import("@fungi.computer/puffball").AppRole[];
117
+ storage?: readonly import("@fungi.computer/puffball").AppStorageKey[] | undefined;
118
+ commands?: readonly import("@fungi.computer/puffball").AppDeclaredCommand[] | undefined;
119
+ gills?: readonly import("@fungi.computer/gills").AppDeclaredGill[] | undefined;
120
+ backend?: Readonly<{
121
+ bindings: readonly import("@fungi.computer/puffball").AppBackendBinding[];
122
+ sync?: Readonly<{
123
+ method: string;
124
+ }>;
125
+ }> | undefined;
126
+ }>, never, never>>;
127
+ readonly kind: Schema.Literal<"backend">;
128
+ readonly backend: Schema.Struct<{
129
+ readonly digest: Schema.refine<import("@fungi.computer/puffball").Sha256Digest, Schema.String>;
130
+ readonly byteLength: Schema.Number;
131
+ }>;
132
+ }>, Schema.Struct<{
133
+ readonly declaration: Schema.optionalKey<Schema.Codec<Readonly<{
134
+ api?: import("@fungi.computer/puffball").AppApi;
135
+ displayName?: string | undefined;
136
+ capabilities: readonly import("@fungi.computer/puffball").AppCapabilityId[];
137
+ calls?: readonly Readonly<{
138
+ appId: string;
139
+ methods: readonly string[];
140
+ }>[] | undefined;
141
+ guidance?: string | undefined;
142
+ handlers: readonly import("@fungi.computer/puffball").AppHandler[];
143
+ receives?: readonly "git.push"[] | undefined;
144
+ icon?: string;
145
+ roles: readonly import("@fungi.computer/puffball").AppRole[];
146
+ storage?: readonly import("@fungi.computer/puffball").AppStorageKey[] | undefined;
147
+ commands?: readonly import("@fungi.computer/puffball").AppDeclaredCommand[] | undefined;
148
+ gills?: readonly import("@fungi.computer/gills").AppDeclaredGill[] | undefined;
149
+ backend?: Readonly<{
150
+ bindings: readonly import("@fungi.computer/puffball").AppBackendBinding[];
151
+ sync?: Readonly<{
152
+ method: string;
153
+ }>;
154
+ }> | undefined;
155
+ }>, Readonly<{
156
+ api?: import("@fungi.computer/puffball").AppApi;
157
+ displayName?: string | undefined;
158
+ capabilities: readonly import("@fungi.computer/puffball").AppCapabilityId[];
159
+ calls?: readonly Readonly<{
160
+ appId: string;
161
+ methods: readonly string[];
162
+ }>[] | undefined;
163
+ guidance?: string | undefined;
164
+ handlers: readonly import("@fungi.computer/puffball").AppHandler[];
165
+ receives?: readonly "git.push"[] | undefined;
166
+ icon?: string;
167
+ roles: readonly import("@fungi.computer/puffball").AppRole[];
168
+ storage?: readonly import("@fungi.computer/puffball").AppStorageKey[] | undefined;
169
+ commands?: readonly import("@fungi.computer/puffball").AppDeclaredCommand[] | undefined;
170
+ gills?: readonly import("@fungi.computer/gills").AppDeclaredGill[] | undefined;
171
+ backend?: Readonly<{
172
+ bindings: readonly import("@fungi.computer/puffball").AppBackendBinding[];
173
+ sync?: Readonly<{
174
+ method: string;
175
+ }>;
176
+ }> | undefined;
177
+ }>, never, never>>;
178
+ readonly kind: Schema.Literal<"app">;
179
+ readonly ui: Schema.Union<readonly [Schema.Struct<{
180
+ readonly mediaType: Schema.Literal<"text/html; charset=utf-8">;
181
+ readonly content: Schema.Struct<{
182
+ readonly digest: Schema.refine<import("@fungi.computer/puffball").Sha256Digest, Schema.String>;
183
+ readonly byteLength: Schema.Number;
184
+ readonly kind: Schema.Literal<"html">;
185
+ }>;
186
+ }>, Schema.Struct<{
187
+ readonly mediaType: Schema.Literal<"application/vnd.fungi.app-assets+json">;
188
+ readonly content: Schema.Struct<{
189
+ readonly kind: Schema.Literal<"assets">;
190
+ readonly base: Schema.String;
191
+ readonly assets: Schema.$Array<Schema.Struct<{
192
+ readonly digest: Schema.refine<import("@fungi.computer/puffball").Sha256Digest, Schema.String>;
193
+ readonly byteLength: Schema.Number;
194
+ readonly path: Schema.String;
195
+ }>>;
196
+ }>;
197
+ }>]>;
198
+ readonly backend: Schema.Struct<{
199
+ readonly digest: Schema.refine<import("@fungi.computer/puffball").Sha256Digest, Schema.String>;
200
+ readonly byteLength: Schema.Number;
201
+ }>;
202
+ }>]>;
203
+ /** One build output by reference. */
204
+ export type CandidateOutputManifest = Schema.Schema.Type<typeof candidateOutputManifestSchema>;
205
+ /**
206
+ * A submitted Team App candidate: its output's objects by digest and size,
207
+ * and its provenance, before the Team assigns a stable Release ID.
208
+ */
209
+ export declare const teamAppCandidateManifestSchema: Schema.Struct<{
6
210
  appId: Schema.refine<import("@fungi.computer/puffball").AppId, Schema.String>;
7
211
  output: Schema.Union<readonly [Schema.Struct<{
8
212
  readonly declaration: Schema.optionalKey<Schema.Codec<Readonly<{
@@ -54,8 +258,9 @@ export declare const teamAppCandidateSubmissionSchema: Schema.Struct<{
54
258
  readonly ui: Schema.Union<readonly [Schema.Struct<{
55
259
  readonly mediaType: Schema.Literal<"text/html; charset=utf-8">;
56
260
  readonly content: Schema.Struct<{
261
+ readonly digest: Schema.refine<import("@fungi.computer/puffball").Sha256Digest, Schema.String>;
262
+ readonly byteLength: Schema.Number;
57
263
  readonly kind: Schema.Literal<"html">;
58
- readonly bytes: Schema.Uint8ArrayFromBase64;
59
264
  }>;
60
265
  }>, Schema.Struct<{
61
266
  readonly mediaType: Schema.Literal<"application/vnd.fungi.app-assets+json">;
@@ -63,8 +268,9 @@ export declare const teamAppCandidateSubmissionSchema: Schema.Struct<{
63
268
  readonly kind: Schema.Literal<"assets">;
64
269
  readonly base: Schema.String;
65
270
  readonly assets: Schema.$Array<Schema.Struct<{
271
+ readonly digest: Schema.refine<import("@fungi.computer/puffball").Sha256Digest, Schema.String>;
272
+ readonly byteLength: Schema.Number;
66
273
  readonly path: Schema.String;
67
- readonly bytes: Schema.Uint8ArrayFromBase64;
68
274
  }>>;
69
275
  }>;
70
276
  }>]>;
@@ -115,7 +321,10 @@ export declare const teamAppCandidateSubmissionSchema: Schema.Struct<{
115
321
  }> | undefined;
116
322
  }>, never, never>>;
117
323
  readonly kind: Schema.Literal<"backend">;
118
- readonly backend: Schema.Uint8ArrayFromBase64;
324
+ readonly backend: Schema.Struct<{
325
+ readonly digest: Schema.refine<import("@fungi.computer/puffball").Sha256Digest, Schema.String>;
326
+ readonly byteLength: Schema.Number;
327
+ }>;
119
328
  }>, Schema.Struct<{
120
329
  readonly declaration: Schema.optionalKey<Schema.Codec<Readonly<{
121
330
  api?: import("@fungi.computer/puffball").AppApi;
@@ -166,8 +375,9 @@ export declare const teamAppCandidateSubmissionSchema: Schema.Struct<{
166
375
  readonly ui: Schema.Union<readonly [Schema.Struct<{
167
376
  readonly mediaType: Schema.Literal<"text/html; charset=utf-8">;
168
377
  readonly content: Schema.Struct<{
378
+ readonly digest: Schema.refine<import("@fungi.computer/puffball").Sha256Digest, Schema.String>;
379
+ readonly byteLength: Schema.Number;
169
380
  readonly kind: Schema.Literal<"html">;
170
- readonly bytes: Schema.Uint8ArrayFromBase64;
171
381
  }>;
172
382
  }>, Schema.Struct<{
173
383
  readonly mediaType: Schema.Literal<"application/vnd.fungi.app-assets+json">;
@@ -175,12 +385,16 @@ export declare const teamAppCandidateSubmissionSchema: Schema.Struct<{
175
385
  readonly kind: Schema.Literal<"assets">;
176
386
  readonly base: Schema.String;
177
387
  readonly assets: Schema.$Array<Schema.Struct<{
388
+ readonly digest: Schema.refine<import("@fungi.computer/puffball").Sha256Digest, Schema.String>;
389
+ readonly byteLength: Schema.Number;
178
390
  readonly path: Schema.String;
179
- readonly bytes: Schema.Uint8ArrayFromBase64;
180
391
  }>>;
181
392
  }>;
182
393
  }>]>;
183
- readonly backend: Schema.Uint8ArrayFromBase64;
394
+ readonly backend: Schema.Struct<{
395
+ readonly digest: Schema.refine<import("@fungi.computer/puffball").Sha256Digest, Schema.String>;
396
+ readonly byteLength: Schema.Number;
397
+ }>;
184
398
  }>]>;
185
399
  provenance: Schema.Struct<{
186
400
  readonly sourceRevision: Schema.refine<import("@fungi.computer/puffball").SourceRevision, Schema.String>;
@@ -188,10 +402,216 @@ export declare const teamAppCandidateSubmissionSchema: Schema.Struct<{
188
402
  readonly buildRecipeDigest: Schema.refine<import("@fungi.computer/puffball").Sha256Digest, Schema.String>;
189
403
  }>;
190
404
  }>;
405
+ /** One submitted Team App candidate manifest. */
406
+ export type TeamAppCandidateManifest = Schema.Schema.Type<typeof teamAppCandidateManifestSchema>;
191
407
  /** Publisher persistence input after TeamDO reserves retry-stable identities. */
192
- export declare const preparedCandidateSchema: Schema.Struct<{
408
+ export declare const preparedCandidateManifestSchema: Schema.Struct<{
193
409
  readonly releaseId: Schema.refine<import("@fungi.computer/puffball").ReleaseId, Schema.String>;
194
410
  readonly appId: Schema.refine<import("@fungi.computer/puffball").AppId, Schema.String>;
411
+ readonly output: Schema.Union<readonly [Schema.Struct<{
412
+ readonly declaration: Schema.optionalKey<Schema.Codec<Readonly<{
413
+ api?: import("@fungi.computer/puffball").AppApi;
414
+ displayName?: string | undefined;
415
+ capabilities: readonly import("@fungi.computer/puffball").AppCapabilityId[];
416
+ calls?: readonly Readonly<{
417
+ appId: string;
418
+ methods: readonly string[];
419
+ }>[] | undefined;
420
+ guidance?: string | undefined;
421
+ handlers: readonly import("@fungi.computer/puffball").AppHandler[];
422
+ receives?: readonly "git.push"[] | undefined;
423
+ icon?: string;
424
+ roles: readonly import("@fungi.computer/puffball").AppRole[];
425
+ storage?: readonly import("@fungi.computer/puffball").AppStorageKey[] | undefined;
426
+ commands?: readonly import("@fungi.computer/puffball").AppDeclaredCommand[] | undefined;
427
+ gills?: readonly import("@fungi.computer/gills").AppDeclaredGill[] | undefined;
428
+ backend?: Readonly<{
429
+ bindings: readonly import("@fungi.computer/puffball").AppBackendBinding[];
430
+ sync?: Readonly<{
431
+ method: string;
432
+ }>;
433
+ }> | undefined;
434
+ }>, Readonly<{
435
+ api?: import("@fungi.computer/puffball").AppApi;
436
+ displayName?: string | undefined;
437
+ capabilities: readonly import("@fungi.computer/puffball").AppCapabilityId[];
438
+ calls?: readonly Readonly<{
439
+ appId: string;
440
+ methods: readonly string[];
441
+ }>[] | undefined;
442
+ guidance?: string | undefined;
443
+ handlers: readonly import("@fungi.computer/puffball").AppHandler[];
444
+ receives?: readonly "git.push"[] | undefined;
445
+ icon?: string;
446
+ roles: readonly import("@fungi.computer/puffball").AppRole[];
447
+ storage?: readonly import("@fungi.computer/puffball").AppStorageKey[] | undefined;
448
+ commands?: readonly import("@fungi.computer/puffball").AppDeclaredCommand[] | undefined;
449
+ gills?: readonly import("@fungi.computer/gills").AppDeclaredGill[] | undefined;
450
+ backend?: Readonly<{
451
+ bindings: readonly import("@fungi.computer/puffball").AppBackendBinding[];
452
+ sync?: Readonly<{
453
+ method: string;
454
+ }>;
455
+ }> | undefined;
456
+ }>, never, never>>;
457
+ readonly kind: Schema.Literal<"ui">;
458
+ readonly ui: Schema.Union<readonly [Schema.Struct<{
459
+ readonly mediaType: Schema.Literal<"text/html; charset=utf-8">;
460
+ readonly content: Schema.Struct<{
461
+ readonly digest: Schema.refine<import("@fungi.computer/puffball").Sha256Digest, Schema.String>;
462
+ readonly byteLength: Schema.Number;
463
+ readonly kind: Schema.Literal<"html">;
464
+ }>;
465
+ }>, Schema.Struct<{
466
+ readonly mediaType: Schema.Literal<"application/vnd.fungi.app-assets+json">;
467
+ readonly content: Schema.Struct<{
468
+ readonly kind: Schema.Literal<"assets">;
469
+ readonly base: Schema.String;
470
+ readonly assets: Schema.$Array<Schema.Struct<{
471
+ readonly digest: Schema.refine<import("@fungi.computer/puffball").Sha256Digest, Schema.String>;
472
+ readonly byteLength: Schema.Number;
473
+ readonly path: Schema.String;
474
+ }>>;
475
+ }>;
476
+ }>]>;
477
+ }>, Schema.Struct<{
478
+ readonly declaration: Schema.optionalKey<Schema.Codec<Readonly<{
479
+ api?: import("@fungi.computer/puffball").AppApi;
480
+ displayName?: string | undefined;
481
+ capabilities: readonly import("@fungi.computer/puffball").AppCapabilityId[];
482
+ calls?: readonly Readonly<{
483
+ appId: string;
484
+ methods: readonly string[];
485
+ }>[] | undefined;
486
+ guidance?: string | undefined;
487
+ handlers: readonly import("@fungi.computer/puffball").AppHandler[];
488
+ receives?: readonly "git.push"[] | undefined;
489
+ icon?: string;
490
+ roles: readonly import("@fungi.computer/puffball").AppRole[];
491
+ storage?: readonly import("@fungi.computer/puffball").AppStorageKey[] | undefined;
492
+ commands?: readonly import("@fungi.computer/puffball").AppDeclaredCommand[] | undefined;
493
+ gills?: readonly import("@fungi.computer/gills").AppDeclaredGill[] | undefined;
494
+ backend?: Readonly<{
495
+ bindings: readonly import("@fungi.computer/puffball").AppBackendBinding[];
496
+ sync?: Readonly<{
497
+ method: string;
498
+ }>;
499
+ }> | undefined;
500
+ }>, Readonly<{
501
+ api?: import("@fungi.computer/puffball").AppApi;
502
+ displayName?: string | undefined;
503
+ capabilities: readonly import("@fungi.computer/puffball").AppCapabilityId[];
504
+ calls?: readonly Readonly<{
505
+ appId: string;
506
+ methods: readonly string[];
507
+ }>[] | undefined;
508
+ guidance?: string | undefined;
509
+ handlers: readonly import("@fungi.computer/puffball").AppHandler[];
510
+ receives?: readonly "git.push"[] | undefined;
511
+ icon?: string;
512
+ roles: readonly import("@fungi.computer/puffball").AppRole[];
513
+ storage?: readonly import("@fungi.computer/puffball").AppStorageKey[] | undefined;
514
+ commands?: readonly import("@fungi.computer/puffball").AppDeclaredCommand[] | undefined;
515
+ gills?: readonly import("@fungi.computer/gills").AppDeclaredGill[] | undefined;
516
+ backend?: Readonly<{
517
+ bindings: readonly import("@fungi.computer/puffball").AppBackendBinding[];
518
+ sync?: Readonly<{
519
+ method: string;
520
+ }>;
521
+ }> | undefined;
522
+ }>, never, never>>;
523
+ readonly kind: Schema.Literal<"backend">;
524
+ readonly backend: Schema.Struct<{
525
+ readonly digest: Schema.refine<import("@fungi.computer/puffball").Sha256Digest, Schema.String>;
526
+ readonly byteLength: Schema.Number;
527
+ }>;
528
+ }>, Schema.Struct<{
529
+ readonly declaration: Schema.optionalKey<Schema.Codec<Readonly<{
530
+ api?: import("@fungi.computer/puffball").AppApi;
531
+ displayName?: string | undefined;
532
+ capabilities: readonly import("@fungi.computer/puffball").AppCapabilityId[];
533
+ calls?: readonly Readonly<{
534
+ appId: string;
535
+ methods: readonly string[];
536
+ }>[] | undefined;
537
+ guidance?: string | undefined;
538
+ handlers: readonly import("@fungi.computer/puffball").AppHandler[];
539
+ receives?: readonly "git.push"[] | undefined;
540
+ icon?: string;
541
+ roles: readonly import("@fungi.computer/puffball").AppRole[];
542
+ storage?: readonly import("@fungi.computer/puffball").AppStorageKey[] | undefined;
543
+ commands?: readonly import("@fungi.computer/puffball").AppDeclaredCommand[] | undefined;
544
+ gills?: readonly import("@fungi.computer/gills").AppDeclaredGill[] | undefined;
545
+ backend?: Readonly<{
546
+ bindings: readonly import("@fungi.computer/puffball").AppBackendBinding[];
547
+ sync?: Readonly<{
548
+ method: string;
549
+ }>;
550
+ }> | undefined;
551
+ }>, Readonly<{
552
+ api?: import("@fungi.computer/puffball").AppApi;
553
+ displayName?: string | undefined;
554
+ capabilities: readonly import("@fungi.computer/puffball").AppCapabilityId[];
555
+ calls?: readonly Readonly<{
556
+ appId: string;
557
+ methods: readonly string[];
558
+ }>[] | undefined;
559
+ guidance?: string | undefined;
560
+ handlers: readonly import("@fungi.computer/puffball").AppHandler[];
561
+ receives?: readonly "git.push"[] | undefined;
562
+ icon?: string;
563
+ roles: readonly import("@fungi.computer/puffball").AppRole[];
564
+ storage?: readonly import("@fungi.computer/puffball").AppStorageKey[] | undefined;
565
+ commands?: readonly import("@fungi.computer/puffball").AppDeclaredCommand[] | undefined;
566
+ gills?: readonly import("@fungi.computer/gills").AppDeclaredGill[] | undefined;
567
+ backend?: Readonly<{
568
+ bindings: readonly import("@fungi.computer/puffball").AppBackendBinding[];
569
+ sync?: Readonly<{
570
+ method: string;
571
+ }>;
572
+ }> | undefined;
573
+ }>, never, never>>;
574
+ readonly kind: Schema.Literal<"app">;
575
+ readonly ui: Schema.Union<readonly [Schema.Struct<{
576
+ readonly mediaType: Schema.Literal<"text/html; charset=utf-8">;
577
+ readonly content: Schema.Struct<{
578
+ readonly digest: Schema.refine<import("@fungi.computer/puffball").Sha256Digest, Schema.String>;
579
+ readonly byteLength: Schema.Number;
580
+ readonly kind: Schema.Literal<"html">;
581
+ }>;
582
+ }>, Schema.Struct<{
583
+ readonly mediaType: Schema.Literal<"application/vnd.fungi.app-assets+json">;
584
+ readonly content: Schema.Struct<{
585
+ readonly kind: Schema.Literal<"assets">;
586
+ readonly base: Schema.String;
587
+ readonly assets: Schema.$Array<Schema.Struct<{
588
+ readonly digest: Schema.refine<import("@fungi.computer/puffball").Sha256Digest, Schema.String>;
589
+ readonly byteLength: Schema.Number;
590
+ readonly path: Schema.String;
591
+ }>>;
592
+ }>;
593
+ }>]>;
594
+ readonly backend: Schema.Struct<{
595
+ readonly digest: Schema.refine<import("@fungi.computer/puffball").Sha256Digest, Schema.String>;
596
+ readonly byteLength: Schema.Number;
597
+ }>;
598
+ }>]>;
599
+ readonly provenance: Schema.Struct<{
600
+ readonly sourceRevision: Schema.refine<import("@fungi.computer/puffball").SourceRevision, Schema.String>;
601
+ readonly sourceTreeDigest: Schema.refine<import("@fungi.computer/puffball").Sha256Digest, Schema.String>;
602
+ readonly buildRecipeDigest: Schema.refine<import("@fungi.computer/puffball").Sha256Digest, Schema.String>;
603
+ }>;
604
+ }>;
605
+ /** One Team App candidate manifest with its reserved Release ID. */
606
+ export type PreparedTeamAppCandidateManifest = Schema.Schema.Type<typeof preparedCandidateManifestSchema>;
607
+ /**
608
+ * A platform App candidate the trusted operator built and packed itself,
609
+ * with its bytes inline: the operator's platform publication request only.
610
+ * A Team candidate never carries bytes; it is a manifest.
611
+ */
612
+ export declare const preparedCandidateSchema: Schema.Struct<{
613
+ readonly appId: Schema.refine<import("@fungi.computer/puffball").AppId, Schema.String>;
614
+ readonly releaseId: Schema.refine<import("@fungi.computer/puffball").ReleaseId, Schema.String>;
195
615
  readonly output: Schema.Union<readonly [Schema.Struct<{
196
616
  readonly declaration: Schema.optionalKey<Schema.Codec<Readonly<{
197
617
  api?: import("@fungi.computer/puffball").AppApi;
@@ -376,9 +796,33 @@ export declare const preparedCandidateSchema: Schema.Struct<{
376
796
  readonly buildRecipeDigest: Schema.refine<import("@fungi.computer/puffball").Sha256Digest, Schema.String>;
377
797
  }>;
378
798
  }>;
379
- /** One submitted Team App candidate. */
380
- export type TeamAppCandidateSubmission = Schema.Schema.Type<typeof teamAppCandidateSubmissionSchema>;
381
- /** One Team App candidate with its reserved Release ID. */
382
- export type PreparedTeamAppCandidate = Schema.Schema.Type<typeof preparedCandidateSchema>;
383
- /** Canonical wire bytes make TeamDO's same-request digest independent of JSON spacing. */
384
- export declare function encodeTeamAppCandidateSubmission(input: TeamAppCandidateSubmission): string;
799
+ /** Canonical manifest bytes, so a digest is independent of JSON spacing. */
800
+ export declare function encodeTeamAppCandidateManifest(manifest: TeamAppCandidateManifest): string;
801
+ /** The hex SHA-256 of a manifest's canonical bytes: its App root's name. */
802
+ export declare function digestTeamAppCandidateManifest(manifest: TeamAppCandidateManifest): Promise<string>;
803
+ /**
804
+ * The media type an uploaded object is stored with. A store that reads an
805
+ * HTML document or backend descriptor by its stored type (the Publisher's)
806
+ * needs it; an asset's type is its manifest's, so it is an octet stream.
807
+ */
808
+ export declare const candidateObjectMediaTypes: readonly ["text/html; charset=utf-8", "application/vnd.fungi.app-backend+json", "application/octet-stream"];
809
+ /** One of {@link candidateObjectMediaTypes}. */
810
+ export type CandidateObjectMediaType = (typeof candidateObjectMediaTypes)[number];
811
+ /** The stored media type a request names, if it is one an object may carry. */
812
+ export declare function candidateObjectMediaType(value: string | null): CandidateObjectMediaType | null;
813
+ /** One object a build uploads, with the media type it is stored under. */
814
+ export type CandidateUpload = CandidateObject & Readonly<{
815
+ mediaType: CandidateObjectMediaType;
816
+ }>;
817
+ /** Every distinct object a manifest names, each once, in manifest order. */
818
+ export declare function candidateManifestObjects(output: CandidateOutputManifest): readonly CandidateUpload[];
819
+ /** Decode a stored backend descriptor; a manifest's backend must be one. */
820
+ export declare function decodeCandidateBackend(bytes: Uint8Array): {
821
+ readonly runtime: {
822
+ readonly kind: "durable-facet";
823
+ readonly stateSchema: number;
824
+ };
825
+ readonly compatibilityDate: string;
826
+ readonly exportName: string;
827
+ readonly code: string;
828
+ };