@fungi.computer/oyster 0.0.0-stage → 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.
Files changed (339) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +1134 -2
  3. package/dist/agents.d.ts +114 -0
  4. package/dist/agents.js +322 -0
  5. package/dist/app-builds.d.ts +210 -0
  6. package/dist/app-builds.js +499 -0
  7. package/dist/app-sandbox.d.ts +2 -0
  8. package/dist/app-sandbox.js +2 -0
  9. package/dist/app-sources.d.ts +31 -0
  10. package/dist/app-sources.js +370 -0
  11. package/dist/app-storage.d.ts +141 -0
  12. package/dist/app-storage.js +281 -0
  13. package/dist/apps/gate.d.ts +105 -0
  14. package/dist/apps/gate.js +273 -0
  15. package/dist/apps/index.d.ts +5 -0
  16. package/dist/apps/index.js +5 -0
  17. package/dist/apps/installation.d.ts +248 -0
  18. package/dist/apps/installation.js +307 -0
  19. package/dist/apps/operations.d.ts +8 -0
  20. package/dist/apps/operations.js +98 -0
  21. package/dist/apps/tools.d.ts +33 -0
  22. package/dist/apps/tools.js +17 -0
  23. package/dist/auth.d.ts +11 -0
  24. package/dist/auth.js +93 -0
  25. package/dist/backend-request.d.ts +3 -0
  26. package/dist/backend-request.js +53 -0
  27. package/dist/build/artifact-writer.d.ts +40 -0
  28. package/dist/build/artifact-writer.js +181 -0
  29. package/dist/build/build-jobs.d.ts +128 -0
  30. package/dist/build/build-jobs.js +203 -0
  31. package/dist/build/build-policy.d.ts +10 -0
  32. package/dist/build/build-policy.js +10 -0
  33. package/dist/build/build-step.d.ts +37 -0
  34. package/dist/build/build-step.js +28 -0
  35. package/dist/build/bundled-html.d.ts +7 -0
  36. package/dist/build/bundled-html.js +64 -0
  37. package/dist/build/candidate-builder.d.ts +68 -0
  38. package/dist/build/candidate-builder.js +91 -0
  39. package/dist/build/candidate-cli.d.ts +1 -0
  40. package/dist/build/candidate-cli.js +119 -0
  41. package/dist/build/candidate-cli.mjs +28170 -0
  42. package/dist/build/content-objects.d.ts +37 -0
  43. package/dist/build/content-objects.js +53 -0
  44. package/dist/build/definition-emission.d.ts +34 -0
  45. package/dist/build/definition-emission.js +201 -0
  46. package/dist/build/effect.d.ts +249 -0
  47. package/dist/build/effect.js +436 -0
  48. package/dist/build/git-environment.d.ts +9 -0
  49. package/dist/build/git-environment.js +60 -0
  50. package/dist/build/html-recipe.d.ts +20 -0
  51. package/dist/build/html-recipe.js +51 -0
  52. package/dist/build/local-build.d.ts +67 -0
  53. package/dist/build/local-build.js +1128 -0
  54. package/dist/build/snapshot-package-store.d.ts +12 -0
  55. package/dist/build/snapshot-package-store.js +36 -0
  56. package/dist/build/snapshot-program-scripts.d.ts +6 -0
  57. package/dist/build/snapshot-program-scripts.js +2 -0
  58. package/dist/build/snapshot-programs/snapshot-path.d.ts +2 -0
  59. package/dist/build/snapshot-programs/snapshot-path.js +6 -0
  60. package/dist/build/submission-contract.d.ts +828 -0
  61. package/dist/build/submission-contract.js +180 -0
  62. package/dist/build/workspace-build.d.ts +55 -0
  63. package/dist/build/workspace-build.js +200 -0
  64. package/dist/build-contract.d.ts +7 -0
  65. package/dist/build-contract.js +7 -0
  66. package/dist/build-egress.d.ts +62 -0
  67. package/dist/build-egress.js +148 -0
  68. package/dist/build-jobs.d.ts +2 -0
  69. package/dist/build-jobs.js +2 -0
  70. package/dist/build.d.ts +12 -0
  71. package/dist/build.js +14 -0
  72. package/dist/capability-descriptor.d.ts +46 -0
  73. package/dist/capability-descriptor.js +51 -0
  74. package/dist/catalog-frame.d.ts +39 -0
  75. package/dist/catalog-frame.js +72 -0
  76. package/dist/cause-class.d.ts +19 -0
  77. package/dist/cause-class.js +54 -0
  78. package/dist/cloudflare.d.ts +123 -0
  79. package/dist/cloudflare.js +391 -0
  80. package/dist/computer-terminal.d.ts +38 -0
  81. package/dist/computer-terminal.js +410 -0
  82. package/dist/computer.d.ts +60 -0
  83. package/dist/computer.js +33 -0
  84. package/dist/event-recipients.d.ts +57 -0
  85. package/dist/event-recipients.js +144 -0
  86. package/dist/facet-invocation.d.ts +4 -0
  87. package/dist/facet-invocation.js +45 -0
  88. package/dist/files.d.ts +42 -0
  89. package/dist/files.js +123 -0
  90. package/dist/frame-binding-wire-script.d.ts +2 -0
  91. package/dist/frame-binding-wire-script.js +1 -0
  92. package/dist/frame-binding-wire.d.ts +28 -0
  93. package/dist/frame-binding-wire.js +54 -0
  94. package/dist/git-admission.d.ts +52 -0
  95. package/dist/git-admission.js +188 -0
  96. package/dist/git-auth.d.ts +11 -0
  97. package/dist/git-auth.js +27 -0
  98. package/dist/git-door.d.ts +35 -0
  99. package/dist/git-door.js +108 -0
  100. package/dist/git-journal.d.ts +31 -0
  101. package/dist/git-journal.js +188 -0
  102. package/dist/git.d.ts +31 -0
  103. package/dist/git.js +64 -0
  104. package/dist/guest-policy.d.ts +9 -0
  105. package/dist/guest-policy.js +13 -0
  106. package/dist/host.d.ts +244 -0
  107. package/dist/host.js +1043 -0
  108. package/dist/index.d.ts +166 -0
  109. package/dist/index.js +320 -0
  110. package/dist/installation-consent.d.ts +79 -0
  111. package/dist/installation-consent.js +82 -0
  112. package/dist/internal/background-origins.d.ts +3 -0
  113. package/dist/internal/background-origins.js +8 -0
  114. package/dist/internal/delivery.d.ts +12 -0
  115. package/dist/internal/delivery.js +167 -0
  116. package/dist/internal/host-gate.d.ts +14 -0
  117. package/dist/internal/host-gate.js +62 -0
  118. package/dist/internal/registry-installations.d.ts +6 -0
  119. package/dist/internal/registry-installations.js +12 -0
  120. package/dist/invocation.d.ts +251 -0
  121. package/dist/invocation.js +377 -0
  122. package/dist/keys.d.ts +48 -0
  123. package/dist/keys.js +52 -0
  124. package/dist/mcp-owner.d.ts +27 -0
  125. package/dist/mcp-owner.js +155 -0
  126. package/dist/mcp.d.ts +89 -0
  127. package/dist/mcp.js +429 -0
  128. package/dist/media.d.ts +23 -0
  129. package/dist/media.js +12 -0
  130. package/dist/pack.d.ts +79 -0
  131. package/dist/pack.js +151 -0
  132. package/dist/page/capabilities.d.ts +23 -0
  133. package/dist/page/capabilities.js +256 -0
  134. package/dist/page/computer-handles.d.ts +79 -0
  135. package/dist/page/computer-handles.js +44 -0
  136. package/dist/page/gill-observation.d.ts +4 -0
  137. package/dist/page/gill-observation.js +31 -0
  138. package/dist/page/lifetime.d.ts +6 -0
  139. package/dist/page/lifetime.js +19 -0
  140. package/dist/page/mount.d.ts +163 -0
  141. package/dist/page/mount.js +390 -0
  142. package/dist/page/storage.d.ts +3 -0
  143. package/dist/page/storage.js +82 -0
  144. package/dist/page/terminal.d.ts +5 -0
  145. package/dist/page/terminal.js +7 -0
  146. package/dist/page/window-launch.d.ts +18 -0
  147. package/dist/page/window-launch.js +11 -0
  148. package/dist/page-script.d.ts +14 -0
  149. package/dist/page-script.js +5 -0
  150. package/dist/r2-files.d.ts +3 -0
  151. package/dist/r2-files.js +79 -0
  152. package/dist/release.d.ts +83 -0
  153. package/dist/release.js +167 -0
  154. package/dist/root-data.d.ts +86 -0
  155. package/dist/root-data.js +69 -0
  156. package/dist/shell/app-directory.d.ts +542 -0
  157. package/dist/shell/app-directory.js +199 -0
  158. package/dist/shell/browser-actions.d.ts +7 -0
  159. package/dist/shell/browser-actions.js +56 -0
  160. package/dist/shell/command-host.d.ts +112 -0
  161. package/dist/shell/command-host.js +502 -0
  162. package/dist/shell/commands.d.ts +25 -0
  163. package/dist/shell/commands.js +78 -0
  164. package/dist/shell/index.d.ts +8 -0
  165. package/dist/shell/index.js +8 -0
  166. package/dist/shell/keys.d.ts +41 -0
  167. package/dist/shell/keys.js +134 -0
  168. package/dist/shell/shell-module.d.ts +55 -0
  169. package/dist/shell/shell-module.js +86 -0
  170. package/dist/shell/window-manager.d.ts +124 -0
  171. package/dist/shell/window-manager.js +711 -0
  172. package/dist/shell/workbench-contract.d.ts +68 -0
  173. package/dist/shell/workbench-contract.js +1 -0
  174. package/dist/shell/workbench-directory.d.ts +332 -0
  175. package/dist/shell/workbench-directory.js +35 -0
  176. package/dist/shell/workbench-host-types.d.ts +96 -0
  177. package/dist/shell/workbench-host-types.js +1 -0
  178. package/dist/shell/workbench-host.d.ts +34 -0
  179. package/dist/shell/workbench-host.js +347 -0
  180. package/dist/shell/workbench-model.d.ts +192 -0
  181. package/dist/shell/workbench-model.js +53 -0
  182. package/dist/shell/workbench.d.ts +4 -0
  183. package/dist/shell/workbench.js +2 -0
  184. package/dist/source/fork.d.ts +27 -0
  185. package/dist/source/fork.js +46 -0
  186. package/dist/source/index.d.ts +10 -0
  187. package/dist/source/index.js +10 -0
  188. package/dist/source/seed-receipt.d.ts +53 -0
  189. package/dist/source/seed-receipt.js +18 -0
  190. package/dist/source/team-source.d.ts +32 -0
  191. package/dist/source/team-source.js +42 -0
  192. package/dist/source/template-push.d.ts +33 -0
  193. package/dist/source/template-push.js +223 -0
  194. package/dist/source/template-repository.d.ts +4 -0
  195. package/dist/source/template-repository.js +21 -0
  196. package/dist/source/template-seed.d.ts +68 -0
  197. package/dist/source/template-seed.js +80 -0
  198. package/dist/standalone/agent-directory.d.ts +4 -0
  199. package/dist/standalone/agent-directory.js +4 -0
  200. package/dist/standalone/agents.d.ts +220 -0
  201. package/dist/standalone/agents.js +795 -0
  202. package/dist/standalone/app-builds-binding.d.ts +36 -0
  203. package/dist/standalone/app-builds-binding.js +119 -0
  204. package/dist/standalone/app-set.d.ts +91 -0
  205. package/dist/standalone/app-set.js +395 -0
  206. package/dist/standalone/app-source.d.ts +41 -0
  207. package/dist/standalone/app-source.js +59 -0
  208. package/dist/standalone/builds.d.ts +18 -0
  209. package/dist/standalone/builds.js +101 -0
  210. package/dist/standalone/computer-egress.d.ts +37 -0
  211. package/dist/standalone/computer-egress.js +111 -0
  212. package/dist/standalone/computer.d.ts +122 -0
  213. package/dist/standalone/computer.js +714 -0
  214. package/dist/standalone/install-apps-cli.d.ts +2 -0
  215. package/dist/standalone/install-apps-cli.js +126 -0
  216. package/dist/standalone/instance.d.ts +35 -0
  217. package/dist/standalone/instance.js +74 -0
  218. package/dist/standalone/media.d.ts +76 -0
  219. package/dist/standalone/media.js +227 -0
  220. package/dist/standalone/preview.d.ts +51 -0
  221. package/dist/standalone/preview.js +167 -0
  222. package/dist/standalone/registry.d.ts +102 -0
  223. package/dist/standalone/registry.js +193 -0
  224. package/dist/standalone/tenancy.d.ts +42 -0
  225. package/dist/standalone/tenancy.js +241 -0
  226. package/dist/standalone/worker.d.ts +55 -0
  227. package/dist/standalone/worker.js +147 -0
  228. package/dist/standalone/workflow-authority-readers.d.ts +16 -0
  229. package/dist/standalone/workflow-authority-readers.js +35 -0
  230. package/dist/standalone/workflow-binding.d.ts +216 -0
  231. package/dist/standalone/workflow-binding.js +217 -0
  232. package/dist/standalone/workflow-events.d.ts +46 -0
  233. package/dist/standalone/workflow-events.js +39 -0
  234. package/dist/standalone/workflow-git-capture.d.ts +7 -0
  235. package/dist/standalone/workflow-git-capture.js +62 -0
  236. package/dist/standalone/workflow-host.d.ts +931 -0
  237. package/dist/standalone/workflow-host.js +751 -0
  238. package/dist/standalone/workflow-node-capture.d.ts +13 -0
  239. package/dist/standalone/workflow-node-capture.js +72 -0
  240. package/dist/standalone/workflow-root-authority.d.ts +27 -0
  241. package/dist/standalone/workflow-root-authority.js +87 -0
  242. package/dist/standalone/workflow-schedules.d.ts +52 -0
  243. package/dist/standalone/workflow-schedules.js +40 -0
  244. package/dist/standalone/workflow-trigger-host.d.ts +1694 -0
  245. package/dist/standalone/workflow-trigger-host.js +52 -0
  246. package/dist/standalone/workflows.d.ts +657 -0
  247. package/dist/standalone/workflows.js +554 -0
  248. package/dist/storage-frame.d.ts +64 -0
  249. package/dist/storage-frame.js +28 -0
  250. package/dist/tenancy/auth0.d.ts +64 -0
  251. package/dist/tenancy/auth0.js +198 -0
  252. package/dist/tenancy/cloudflare/rate-limit.d.ts +8 -0
  253. package/dist/tenancy/cloudflare/rate-limit.js +19 -0
  254. package/dist/tenancy/cloudflare/registry.d.ts +50 -0
  255. package/dist/tenancy/cloudflare/registry.js +301 -0
  256. package/dist/tenancy/cloudflare.d.ts +2 -0
  257. package/dist/tenancy/cloudflare.js +2 -0
  258. package/dist/tenancy/cold-directory.d.ts +13 -0
  259. package/dist/tenancy/cold-directory.js +43 -0
  260. package/dist/tenancy/contracts.d.ts +195 -0
  261. package/dist/tenancy/contracts.js +1 -0
  262. package/dist/tenancy/index.d.ts +19 -0
  263. package/dist/tenancy/index.js +156 -0
  264. package/dist/tenancy/owner-key.d.ts +26 -0
  265. package/dist/tenancy/owner-key.js +63 -0
  266. package/dist/tenancy/oyster.d.ts +4 -0
  267. package/dist/tenancy/oyster.js +25 -0
  268. package/dist/tenancy/registry-record.d.ts +7 -0
  269. package/dist/tenancy/registry-record.js +44 -0
  270. package/dist/tenancy/registry.d.ts +27 -0
  271. package/dist/tenancy/registry.js +138 -0
  272. package/dist/tenancy/resolve.d.ts +7 -0
  273. package/dist/tenancy/resolve.js +64 -0
  274. package/dist/tenant.d.ts +81 -0
  275. package/dist/tenant.js +71 -0
  276. package/dist/testing/capabilities.d.ts +29 -0
  277. package/dist/testing/capabilities.js +130 -0
  278. package/dist/testing/catalog.d.ts +3 -0
  279. package/dist/testing/catalog.js +53 -0
  280. package/dist/testing/index.d.ts +10 -0
  281. package/dist/testing/index.js +10 -0
  282. package/dist/testing/installation.d.ts +11 -0
  283. package/dist/testing/installation.js +25 -0
  284. package/dist/testing/native-worker.d.ts +21 -0
  285. package/dist/testing/native-worker.js +106 -0
  286. package/dist/testing/worker.d.ts +18 -0
  287. package/dist/testing/worker.js +67 -0
  288. package/dist/testing/workers-runtime.d.ts +24 -0
  289. package/dist/testing/workers-runtime.js +33 -0
  290. package/dist/webhook-delivery.d.ts +14 -0
  291. package/dist/webhook-delivery.js +17 -0
  292. package/dist/workers-git.d.ts +285 -0
  293. package/dist/workers-git.js +1174 -0
  294. package/dist/workers.d.ts +352 -0
  295. package/dist/workers.js +868 -0
  296. package/docs/api/README.md +82 -0
  297. package/docs/api/agents.md +332 -0
  298. package/docs/api/app-storage.md +209 -0
  299. package/docs/api/apps.md +1375 -0
  300. package/docs/api/auth.md +63 -0
  301. package/docs/api/build-contract.md +1304 -0
  302. package/docs/api/build.md +1712 -0
  303. package/docs/api/cloudflare.md +421 -0
  304. package/docs/api/computer.md +203 -0
  305. package/docs/api/files.md +117 -0
  306. package/docs/api/git.md +470 -0
  307. package/docs/api/host.md +1328 -0
  308. package/docs/api/index.md +430 -0
  309. package/docs/api/invocation.md +738 -0
  310. package/docs/api/keys.md +175 -0
  311. package/docs/api/mcp.md +301 -0
  312. package/docs/api/media.md +40 -0
  313. package/docs/api/modules.md +50 -0
  314. package/docs/api/pack.md +141 -0
  315. package/docs/api/page/mount.md +298 -0
  316. package/docs/api/root-data.md +111 -0
  317. package/docs/api/shell/app-directory.md +599 -0
  318. package/docs/api/shell/command-host.md +224 -0
  319. package/docs/api/shell/commands.md +197 -0
  320. package/docs/api/shell/keys.md +183 -0
  321. package/docs/api/shell/shell-module.md +204 -0
  322. package/docs/api/shell/window-manager.md +267 -0
  323. package/docs/api/shell/workbench-directory.md +119 -0
  324. package/docs/api/shell/workbench.md +205 -0
  325. package/docs/api/shell.md +1915 -0
  326. package/docs/api/tenancy/auth0.md +110 -0
  327. package/docs/api/tenancy/cloudflare.md +221 -0
  328. package/docs/api/tenancy/cold-directory.md +46 -0
  329. package/docs/api/tenancy/owner-key.md +63 -0
  330. package/docs/api/tenancy/registry.md +77 -0
  331. package/docs/api/tenancy/resolve.md +69 -0
  332. package/docs/api/tenancy.md +430 -0
  333. package/docs/api/tenant.md +194 -0
  334. package/docs/api/workers-git.md +1646 -0
  335. package/docs/api/workers.md +1691 -0
  336. package/docs/site/agent-quickstart.mdx +346 -0
  337. package/examples/standalone/worker.ts +7 -0
  338. package/examples/standalone/wrangler.jsonc +82 -0
  339. package/package.json +300 -3
@@ -0,0 +1,1712 @@
1
+ <!-- Generated by Botanical API docs (TypeDoc + typedoc-plugin-markdown). Do not edit. -->
2
+
3
+ [**@fungi.computer/oyster**](README.md)
4
+
5
+ ---
6
+
7
+ [@fungi.computer/oyster](modules.md) / build
8
+
9
+ # build
10
+
11
+ ## Classes
12
+
13
+ ### AppPublisherError
14
+
15
+ Closed failure boundary for the four private composition stages.
16
+
17
+ #### Extends
18
+
19
+ - `Error`
20
+
21
+ #### Constructors
22
+
23
+ ##### Constructor
24
+
25
+ ```ts
26
+ new AppPublisherError(stage, options?): AppPublisherError;
27
+ ```
28
+
29
+ ###### Parameters
30
+
31
+ | Parameter | Type |
32
+ | ---------- | ----------------------------------------- |
33
+ | `stage` | [`AppPublisherStage`](#apppublisherstage) |
34
+ | `options?` | `ErrorOptions` |
35
+
36
+ ###### Returns
37
+
38
+ [`AppPublisherError`](#apppublishererror)
39
+
40
+ ###### Overrides
41
+
42
+ ```ts
43
+ Error.constructor;
44
+ ```
45
+
46
+ #### Properties
47
+
48
+ ##### \_tag
49
+
50
+ ```ts
51
+ readonly _tag: "AppPublisherError";
52
+ ```
53
+
54
+ ##### stage
55
+
56
+ ```ts
57
+ readonly stage: AppPublisherStage;
58
+ ```
59
+
60
+ ## Type Aliases
61
+
62
+ ### ImmutableArtifactObjects
63
+
64
+ ```ts
65
+ type ImmutableArtifactObjects = Readonly<{
66
+ create: Promise<"created" | "exists">;
67
+ read: Promise<Uint8Array<ArrayBufferLike> | null>;
68
+ }>;
69
+ ```
70
+
71
+ Write-once object storage for one artifact root.
72
+
73
+ ---
74
+
75
+ ### StagedArtifactObject
76
+
77
+ ```ts
78
+ type StagedArtifactObject = Readonly<{
79
+ artifactRef: ArtifactRef;
80
+ bytes: Uint8Array;
81
+ digest: Sha256Digest;
82
+ }>;
83
+ ```
84
+
85
+ One object ready to store under its reference.
86
+
87
+ ---
88
+
89
+ ### StagedBuildOutput
90
+
91
+ ```ts
92
+ type StagedBuildOutput = Readonly<{
93
+ manifest: CandidateOutputManifest;
94
+ objects: readonly StagedArtifactObject[];
95
+ }>;
96
+ ```
97
+
98
+ A build's output manifest and each distinct object it names.
99
+
100
+ ---
101
+
102
+ ### WorkspaceBuildStep
103
+
104
+ ```ts
105
+ type WorkspaceBuildStep = Schema.Schema.Type<typeof workspaceBuildStepSchema>;
106
+ ```
107
+
108
+ One captured dependency build step.
109
+
110
+ ---
111
+
112
+ ### AppBackendOutput
113
+
114
+ ```ts
115
+ type AppBackendOutput = Readonly<{
116
+ file: esbuild.OutputFile;
117
+ inputs: readonly string[];
118
+ }>;
119
+ ```
120
+
121
+ The checked Worker output of one App backend build.
122
+
123
+ ---
124
+
125
+ ### DefinitionEmission
126
+
127
+ ```ts
128
+ type DefinitionEmission = Awaited<ReturnType<typeof createDefinitionEmission>>;
129
+ ```
130
+
131
+ One App backend build and the declaration derived from it.
132
+
133
+ ---
134
+
135
+ ### AppPublisherCoreConfigInput
136
+
137
+ ```ts
138
+ type AppPublisherCoreConfigInput = Schema.Codec.Encoded<
139
+ typeof AppPublisherCoreConfigSchema
140
+ >;
141
+ ```
142
+
143
+ App identity and caller-selected recipe inputs before normalization.
144
+
145
+ ---
146
+
147
+ ### PinnedRecipe
148
+
149
+ ```ts
150
+ type PinnedRecipe = Schema.Schema.Type<typeof capturedPinnedRecipeSchema>;
151
+ ```
152
+
153
+ Fully resolved recipe with its pinned toolchain.
154
+
155
+ ---
156
+
157
+ ### CapturedSource
158
+
159
+ ```ts
160
+ type CapturedSource = Readonly<{
161
+ sourceRevision: SourceRevision;
162
+ sourceTreeDigest: Sha256Digest;
163
+ snapshotPath: string;
164
+ }>;
165
+ ```
166
+
167
+ A source tree captured into a scoped local snapshot directory.
168
+
169
+ ---
170
+
171
+ ### RawBuildOutput
172
+
173
+ ```ts
174
+ type RawBuildOutput =
175
+ | Readonly<{
176
+ kind: "bytes";
177
+ bytes: Uint8Array;
178
+ }>
179
+ | Readonly<{
180
+ kind: "assets";
181
+ base: string;
182
+ assets: readonly object[];
183
+ }>;
184
+ ```
185
+
186
+ Compiler bytes or a bounded collection of emitted UI assets.
187
+
188
+ ---
189
+
190
+ ### UiBuildOutput
191
+
192
+ ```ts
193
+ type UiBuildOutput =
194
+ | Readonly<{
195
+ kind: "html";
196
+ bytes: Uint8Array;
197
+ }>
198
+ | Extract<
199
+ RawBuildOutput,
200
+ {
201
+ kind: "assets";
202
+ }
203
+ >;
204
+ ```
205
+
206
+ A complete HTML document or an asset collection.
207
+
208
+ ---
209
+
210
+ ### BuildExecutorOutput
211
+
212
+ ```ts
213
+ type BuildExecutorOutput =
214
+ | RawBuildOutput
215
+ | Readonly<{
216
+ kind: "app";
217
+ ui: PreparedUiOutput | null;
218
+ backend: Uint8Array | null;
219
+ }>;
220
+ ```
221
+
222
+ Raw executor result before the recipe owner assigns App surface meaning.
223
+
224
+ ---
225
+
226
+ ### PreparedUiOutput
227
+
228
+ ```ts
229
+ type PreparedUiOutput =
230
+ | Readonly<{
231
+ content: Extract<
232
+ UiBuildOutput,
233
+ {
234
+ kind: "html";
235
+ }
236
+ >;
237
+ mediaType: "text/html; charset=utf-8";
238
+ }>
239
+ | Readonly<{
240
+ content: Extract<
241
+ UiBuildOutput,
242
+ {
243
+ kind: "assets";
244
+ }
245
+ >;
246
+ mediaType: "application/vnd.fungi.app-assets+json";
247
+ }>;
248
+ ```
249
+
250
+ UI output paired with its immutable artifact media type.
251
+
252
+ ---
253
+
254
+ ### BuildOutput
255
+
256
+ ```ts
257
+ type BuildOutput =
258
+ | Readonly<{
259
+ kind: "ui";
260
+ ui: PreparedUiOutput;
261
+ }>
262
+ | Readonly<{
263
+ kind: "backend";
264
+ backend: Uint8Array;
265
+ }>
266
+ | (Readonly<{
267
+ kind: "app";
268
+ ui: PreparedUiOutput;
269
+ backend: Uint8Array;
270
+ }> &
271
+ Readonly<{
272
+ declaration?: AppDeclaration;
273
+ }>);
274
+ ```
275
+
276
+ Complete, non-empty App content accepted by immutable artifact writers.
277
+
278
+ ---
279
+
280
+ ### StoredArtifact
281
+
282
+ ```ts
283
+ type StoredArtifact = Readonly<{
284
+ artifactRef: ArtifactRef;
285
+ artifactDigest: Sha256Digest;
286
+ }>;
287
+ ```
288
+
289
+ Reference and digest of the persisted App build root.
290
+
291
+ ---
292
+
293
+ ### PreparedCandidate
294
+
295
+ ```ts
296
+ type PreparedCandidate = Readonly<{
297
+ appId: AppId;
298
+ releaseId: ReleaseId;
299
+ output: BuildOutput;
300
+ provenance: Readonly<{
301
+ sourceRevision: SourceRevision;
302
+ sourceTreeDigest: Sha256Digest;
303
+ buildRecipeDigest: Sha256Digest;
304
+ }>;
305
+ }>;
306
+ ```
307
+
308
+ A locally captured and built candidate awaiting native artifact/catalog custody.
309
+
310
+ ---
311
+
312
+ ### SourceCapture
313
+
314
+ ```ts
315
+ type SourceCapture = object;
316
+ ```
317
+
318
+ Four structural roles used by the private composition.
319
+
320
+ #### Properties
321
+
322
+ ##### capture
323
+
324
+ ```ts
325
+ readonly capture: () => Effect.Effect<CapturedSource, unknown, Scope.Scope>;
326
+ ```
327
+
328
+ Acquire a snapshot whose cleanup follows the Effect scope.
329
+
330
+ ###### Returns
331
+
332
+ `Effect.Effect`\<[`CapturedSource`](#capturedsource), `unknown`, `Scope.Scope`\>
333
+
334
+ ---
335
+
336
+ ### BuildExecutor
337
+
338
+ ```ts
339
+ type BuildExecutor = object;
340
+ ```
341
+
342
+ Compiles captured source and reads its matching declaration.
343
+
344
+ #### Properties
345
+
346
+ ##### build
347
+
348
+ ```ts
349
+ readonly build: (source, recipe) => Effect.Effect<BuildExecutorOutput, unknown, Scope.Scope>;
350
+ ```
351
+
352
+ Compile only the captured source under its pinned recipe.
353
+
354
+ ###### Parameters
355
+
356
+ | Parameter | Type |
357
+ | --------- | ----------------------------------- |
358
+ | `source` | [`CapturedSource`](#capturedsource) |
359
+ | `recipe` | [`PinnedRecipe`](#pinnedrecipe) |
360
+
361
+ ###### Returns
362
+
363
+ `Effect.Effect`\<[`BuildExecutorOutput`](#buildexecutoroutput), `unknown`,
364
+ `Scope.Scope`\>
365
+
366
+ ##### declaration?
367
+
368
+ ```ts
369
+ readonly optional declaration?: (source, recipe) => Effect.Effect<AppDeclaration, unknown>;
370
+ ```
371
+
372
+ Read the App's declaration from the same captured tree. Every App, a fork
373
+ included, declares through its own source; there is no other source.
374
+
375
+ ###### Parameters
376
+
377
+ | Parameter | Type |
378
+ | --------- | ----------------------------------- |
379
+ | `source` | [`CapturedSource`](#capturedsource) |
380
+ | `recipe` | [`PinnedRecipe`](#pinnedrecipe) |
381
+
382
+ ###### Returns
383
+
384
+ `Effect.Effect`\<`AppDeclaration`, `unknown`\>
385
+
386
+ ---
387
+
388
+ ### ArtifactWriter
389
+
390
+ ```ts
391
+ type ArtifactWriter = object;
392
+ ```
393
+
394
+ Persists one complete App build as immutable artifacts.
395
+
396
+ #### Properties
397
+
398
+ ##### write
399
+
400
+ ```ts
401
+ readonly write: (output) => Effect.Effect<StoredArtifact, unknown>;
402
+ ```
403
+
404
+ Persist the App root and return its reference and digest.
405
+
406
+ ###### Parameters
407
+
408
+ | Parameter | Type |
409
+ | --------- | ----------------------------- |
410
+ | `output` | [`BuildOutput`](#buildoutput) |
411
+
412
+ ###### Returns
413
+
414
+ `Effect.Effect`\<[`StoredArtifact`](#storedartifact), `unknown`\>
415
+
416
+ ---
417
+
418
+ ### ReleaseCreator
419
+
420
+ ```ts
421
+ type ReleaseCreator = Pick<AppReleaseCatalog, "createRelease">;
422
+ ```
423
+
424
+ Release catalog role needed to record a built candidate.
425
+
426
+ ---
427
+
428
+ ### AppPublisherOptions
429
+
430
+ ```ts
431
+ type AppPublisherOptions = Readonly<{
432
+ config: AppPublisherCoreConfigInput;
433
+ releaseCatalog: ReleaseCreator;
434
+ sourceCapture: SourceCapture;
435
+ buildExecutor: BuildExecutor;
436
+ artifactWriter: ArtifactWriter;
437
+ }>;
438
+ ```
439
+
440
+ Captured build inputs and the resource owners used to publish a candidate.
441
+
442
+ ---
443
+
444
+ ### AppPublisher
445
+
446
+ ```ts
447
+ type AppPublisher = Readonly<{
448
+ createCandidate: (releaseId) => Effect.Effect<Release, AppPublisherError>;
449
+ }>;
450
+ ```
451
+
452
+ Builds and records immutable App Release candidates.
453
+
454
+ ---
455
+
456
+ ### AppCandidatePreparer
457
+
458
+ ```ts
459
+ type AppCandidatePreparer = Readonly<{
460
+ prepareCandidate: (
461
+ releaseId,
462
+ ) => Effect.Effect<PreparedCandidate, AppPublisherError>;
463
+ }>;
464
+ ```
465
+
466
+ Builds a candidate before artifact storage and catalog publication.
467
+
468
+ ---
469
+
470
+ ### AppPublisherStage
471
+
472
+ ```ts
473
+ type AppPublisherStage =
474
+ "configuration" | "source" | "build" | "artifact" | "release";
475
+ ```
476
+
477
+ The bounded stages reported by AppPublisherError.
478
+
479
+ ---
480
+
481
+ ### CapturedConfig
482
+
483
+ ```ts
484
+ type CapturedConfig = Readonly<{
485
+ appId: AppId;
486
+ recipe: PinnedRecipe;
487
+ buildRecipeDigest: Sha256Digest;
488
+ }>;
489
+ ```
490
+
491
+ App identity and normalized recipe with its digest.
492
+
493
+ ---
494
+
495
+ ### FirstPartyAppSourceDistribution
496
+
497
+ ```ts
498
+ type FirstPartyAppSourceDistribution = Readonly<{
499
+ appId: AppId;
500
+ sourceRevision: SourceRevision;
501
+ sourceTreeDigest: ReturnType<typeof parseSha256Digest>;
502
+ appDirectory: string;
503
+ files: readonly Readonly<{
504
+ path: string;
505
+ contents: Uint8Array;
506
+ }>[];
507
+ }>;
508
+ ```
509
+
510
+ A first-party editable source tree ready to seed into an Artifacts template.
511
+
512
+ ---
513
+
514
+ ### LocalBuildExecutorOptions
515
+
516
+ ```ts
517
+ type LocalBuildExecutorOptions = Readonly<{
518
+ packageStoreDirectory?: string;
519
+ packageScripts?: "run";
520
+ onPhase?: (phase, milliseconds) => void;
521
+ }>;
522
+ ```
523
+
524
+ How one build executor is composed; never part of a recipe or request.
525
+
526
+ ---
527
+
528
+ ### LocalAppPublisherOptions
529
+
530
+ ```ts
531
+ type LocalAppPublisherOptions = Readonly<{
532
+ config: unknown;
533
+ releaseCatalog: ReleaseCreator;
534
+ }>;
535
+ ```
536
+
537
+ Local Git, recipe and artifact directory configuration with a Release catalog.
538
+
539
+ ---
540
+
541
+ ### WorkspaceBuildPolicy
542
+
543
+ ```ts
544
+ type WorkspaceBuildPolicy = Schema.Schema.Type<
545
+ typeof workspaceBuildPolicySchema
546
+ >;
547
+ ```
548
+
549
+ The build policy one manifest declares.
550
+
551
+ ---
552
+
553
+ ### WorkspaceBuild
554
+
555
+ ```ts
556
+ type WorkspaceBuild = Readonly<{
557
+ directory: string;
558
+ packageName: string;
559
+ react: boolean;
560
+ shellEntry?: string;
561
+ dependencies: readonly string[];
562
+ steps: readonly WorkspaceBuildStep[];
563
+ }>;
564
+ ```
565
+
566
+ One App page build derived from its manifests and package graph.
567
+
568
+ ## Variables
569
+
570
+ ### dependencyBuildProgram
571
+
572
+ ```ts
573
+ const dependencyBuildProgram: string = bundledDependencyBuildProgram;
574
+ ```
575
+
576
+ Captured-dependency build program with guarded filesystem access.
577
+
578
+ ---
579
+
580
+ ### workspaceBuildStepSchema
581
+
582
+ ```ts
583
+ const workspaceBuildStepSchema: Union<
584
+ readonly [
585
+ Struct<{
586
+ kind: Literal<"typescript">;
587
+ config: String;
588
+ }>,
589
+ Struct<{
590
+ kind: Literal<"tailwind">;
591
+ input: String;
592
+ output: String;
593
+ }>,
594
+ Struct<{
595
+ kind: Literal<"script">;
596
+ directory: String;
597
+ script: String;
598
+ }>,
599
+ ]
600
+ >;
601
+ ```
602
+
603
+ One captured dependency build step. Paths are relative to the captured snapshot
604
+ root. A TypeScript step compiles one config; a Tailwind step compiles one
605
+ stylesheet input into its output (the same path for an App's own stylesheet,
606
+ which compiles in place). A script step runs the one `package.json` script a
607
+ workspace dependency names as its build (`fungi.build.script`), with pnpm, in
608
+ that package's directory; only an admitted Computer build executes it.
609
+
610
+ ---
611
+
612
+ ### pinnedRecipeSchema
613
+
614
+ ```ts
615
+ const pinnedRecipeSchema: Struct<{
616
+ kind: optional<Literals<readonly ["bundled-html", "source-html"]>>;
617
+ entry: String;
618
+ assets: optional<
619
+ Struct<{
620
+ maxManifestBytes: Number;
621
+ maxObjects: Number;
622
+ maxObjectBytes: Number;
623
+ maxTotalBytes: Number;
624
+ }>
625
+ >;
626
+ assetBase: optionalKey<String>;
627
+ backend: Union<
628
+ readonly [
629
+ Null,
630
+ Struct<{
631
+ entry: optional<String>;
632
+ runtime: Struct<{
633
+ kind: Literal<"durable-facet">;
634
+ stateSchema: Number;
635
+ }>;
636
+ compatibilityDate: String;
637
+ exportName: String;
638
+ }>,
639
+ ]
640
+ >;
641
+ maxOutputBytes: Number;
642
+ }>;
643
+ ```
644
+
645
+ Canonical recipe policy shared by core and the local adapter.
646
+
647
+ ---
648
+
649
+ ### AppPublisherCoreConfigSchema
650
+
651
+ ```ts
652
+ const AppPublisherCoreConfigSchema: Struct<{
653
+ appId: refine<AppId, String>;
654
+ recipe: Struct<{
655
+ kind: optional<Literals<readonly ["bundled-html", "source-html"]>>;
656
+ entry: String;
657
+ assets: optional<Struct<{
658
+ maxManifestBytes: Number;
659
+ maxObjects: Number;
660
+ maxObjectBytes: Number;
661
+ maxTotalBytes: Number;
662
+ }>>;
663
+ assetBase: optionalKey<String>;
664
+ backend: Union<readonly [Null, Struct<{
665
+ entry: optional<String>;
666
+ runtime: Struct<{
667
+ kind: Literal<...>;
668
+ stateSchema: Number;
669
+ }>;
670
+ compatibilityDate: String;
671
+ exportName: String;
672
+ }>]>;
673
+ maxOutputBytes: Number;
674
+ }>;
675
+ }>;
676
+ ```
677
+
678
+ Core configuration contains only immutable App identity and recipe policy.
679
+
680
+ ---
681
+
682
+ ### appBackendExportConditions
683
+
684
+ ```ts
685
+ const appBackendExportConditions: readonly string[];
686
+ ```
687
+
688
+ Package-export conditions used by the pinned Workers builder.
689
+
690
+ ---
691
+
692
+ ### capturedPinnedRecipeSchema
693
+
694
+ ```ts
695
+ const capturedPinnedRecipeSchema: Struct<{
696
+ kind: optional<Literals<readonly ["bundled-html", "source-html"]>>;
697
+ bundle: Literal<true>;
698
+ entry: String;
699
+ format: Literals<readonly ["html", "esm", "assets"]>;
700
+ assets: optional<
701
+ Struct<{
702
+ maxManifestBytes: Number;
703
+ maxObjects: Number;
704
+ maxObjectBytes: Number;
705
+ maxTotalBytes: Number;
706
+ }>
707
+ >;
708
+ assetBase: optionalKey<String>;
709
+ toolchain: $Record<String, String>;
710
+ maxOutputBytes: Number;
711
+ platform: Literals<readonly ["browser", "neutral"]>;
712
+ backend: Union<
713
+ readonly [
714
+ Null,
715
+ Struct<{
716
+ entry: optional<String>;
717
+ runtime: Struct<{
718
+ kind: Literal<"durable-facet">;
719
+ stateSchema: Number;
720
+ }>;
721
+ compatibilityDate: String;
722
+ exportName: String;
723
+ }>,
724
+ ]
725
+ >;
726
+ target: Tuple<readonly [Literal<"es2022">]>;
727
+ }>;
728
+ ```
729
+
730
+ Persisted, fully resolved recipe including its code-owned toolchain.
731
+
732
+ ---
733
+
734
+ ### bundledHtmlRecipe
735
+
736
+ ```ts
737
+ const bundledHtmlRecipe: Readonly<{
738
+ kind: "bundled-html";
739
+ toolchain: Readonly<{
740
+ recipe: "captured-bundled-html-v1";
741
+ }>;
742
+ limits: Readonly<{
743
+ maxManifestBytes: 1048576;
744
+ maxObjects: 1024;
745
+ maxObjectBytes: 16777216;
746
+ maxTotalBytes: 67108864;
747
+ }>;
748
+ extensions: readonly string[];
749
+ }>;
750
+ ```
751
+
752
+ Engine/toolchain-independent input: an already bundled, captured directory. The
753
+ producer owns compilation; Publisher never discovers its build scripts. These
754
+ ceilings cannot be raised by a publication request.
755
+
756
+ ---
757
+
758
+ ### workspaceBuildPolicySchema
759
+
760
+ ```ts
761
+ const workspaceBuildPolicySchema: Struct<{
762
+ react: optional<Boolean>;
763
+ shellEntry: optional<String>;
764
+ packageStylesheets: optional<$Array<String>>;
765
+ stylesheets: optional<$Array<String>>;
766
+ typescript: optional<$Array<String>>;
767
+ script: optional<NonEmptyString>;
768
+ stylesheet: optional<
769
+ Struct<{
770
+ input: String;
771
+ output: String;
772
+ }>
773
+ >;
774
+ }>;
775
+ ```
776
+
777
+ `package.json#fungi.build`. An App manifest (the manifest nearest the entry)
778
+ declares how its page builds: `react`, `shellEntry`, the workspace packages
779
+ whose declared stylesheets compile first (`packageStylesheets`) and its own
780
+ `stylesheets`, compiled in place, in order. A workspace package declares its
781
+ build products: extra TypeScript configs compiled after its
782
+ `tsconfig.build.json`, and its stylesheet input and output; or, instead of
783
+ TypeScript configs, the one `package.json` script that builds it (`script`),
784
+ which only an admitted Computer build runs. Every path is relative to the
785
+ manifest that declares it. Unknown build fields are refused, so a builder never
786
+ silently ignores a policy it does not know.
787
+
788
+ ---
789
+
790
+ ### workspaceProjectsArguments
791
+
792
+ ```ts
793
+ const workspaceProjectsArguments: readonly string[];
794
+ ```
795
+
796
+ The pnpm arguments that list a source tree's workspace projects.
797
+
798
+ ## Functions
799
+
800
+ ### stageBuildOutput()
801
+
802
+ ```ts
803
+ function stageBuildOutput(output): StagedBuildOutput;
804
+ ```
805
+
806
+ Stage a build's bytes: the output manifest that names each object by its digest
807
+ and size, and each distinct object once.
808
+
809
+ #### Parameters
810
+
811
+ | Parameter | Type |
812
+ | --------- | ----------------------------- |
813
+ | `output` | [`BuildOutput`](#buildoutput) |
814
+
815
+ #### Returns
816
+
817
+ [`StagedBuildOutput`](#stagedbuildoutput)
818
+
819
+ ---
820
+
821
+ ### writeArtifactRoot()
822
+
823
+ ```ts
824
+ function writeArtifactRoot(
825
+ manifest,
826
+ objects,
827
+ options,
828
+ ): Promise<
829
+ Readonly<{
830
+ artifactRef: ArtifactRef;
831
+ artifactDigest: Sha256Digest;
832
+ }>
833
+ >;
834
+ ```
835
+
836
+ Write the asset manifest and App root an output manifest names. The objects it
837
+ names are already stored, and checked, by the caller.
838
+
839
+ #### Parameters
840
+
841
+ | Parameter | Type |
842
+ | ---------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
843
+ | `manifest` | \| \{ `declaration?`: `Readonly`\<\{ `api?`: `Readonly`\<\{ `methods`: `Readonly`\<`Record`\<`string`, `Readonly`\<...\>\>\>; `toolFamily?`: `Readonly`\<\{ `name`: ...; `list`: ...; `call`: ...; \}\>; `events?`: `Readonly`\<`Record`\<..., ...\>\>; \}\>; `displayName?`: `string`; `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"`)[]; `calls?`: readonly `Readonly`\<\{ `appId`: `string`; `methods`: readonly `string`[]; \}\>[]; `guidance?`: `string`; `handlers`: readonly `"file.open"`[]; `receives?`: readonly `"git.push"`[]; `icon?`: `string`; `roles`: readonly (`"dashboard"` \| `"inbox"` \| `"files"` \| `"media"` \| `"sessions"` \| `"terminal"`)[]; `storage?`: readonly `Readonly`\<\{ `key`: `string`; `scopes`: readonly (... \| ...)[]; `maxBytes`: `number`; \}\>[]; `commands?`: readonly `Readonly`\<\{ `id`: `string`; `title`: `string`; `category`: `string`; `description?`: `string`; `sigil?`: `string`; `projections?`: `Readonly`\<...\>; \}\>[]; `gills?`: readonly `Readonly`\<\{ `id`: `string`; `source`: `string`; `title`: `string`; `params?`: readonly ...[]; `watch?`: `AppGillWatch`; `desktop?`: `Readonly`\<...\>; \}\>[]; `backend?`: `Readonly`\<\{ `bindings`: readonly `Readonly`\<\{ `name`: ...; `operations`: ...; \}\>[]; `sync?`: `Readonly`\<\{ `method`: ...; \}\>; \}\>; \}\>; `kind`: `"ui"`; `ui`: \| \{ `mediaType`: `"text/html; charset=utf-8"`; `content`: \{ `digest`: `Sha256Digest`; `byteLength`: `number`; `kind`: `"html"`; \}; \} \| \{ `mediaType`: `"application/vnd.fungi.app-assets+json"`; `content`: \{ `kind`: `"assets"`; `base`: `string`; `assets`: readonly `object`[]; \}; \}; \} \| \{ `declaration?`: `Readonly`\<\{ `api?`: `Readonly`\<\{ `methods`: `Readonly`\<`Record`\<`string`, `Readonly`\<...\>\>\>; `toolFamily?`: `Readonly`\<\{ `name`: ...; `list`: ...; `call`: ...; \}\>; `events?`: `Readonly`\<`Record`\<..., ...\>\>; \}\>; `displayName?`: `string`; `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"`)[]; `calls?`: readonly `Readonly`\<\{ `appId`: `string`; `methods`: readonly `string`[]; \}\>[]; `guidance?`: `string`; `handlers`: readonly `"file.open"`[]; `receives?`: readonly `"git.push"`[]; `icon?`: `string`; `roles`: readonly (`"dashboard"` \| `"inbox"` \| `"files"` \| `"media"` \| `"sessions"` \| `"terminal"`)[]; `storage?`: readonly `Readonly`\<\{ `key`: `string`; `scopes`: readonly (... \| ...)[]; `maxBytes`: `number`; \}\>[]; `commands?`: readonly `Readonly`\<\{ `id`: `string`; `title`: `string`; `category`: `string`; `description?`: `string`; `sigil?`: `string`; `projections?`: `Readonly`\<...\>; \}\>[]; `gills?`: readonly `Readonly`\<\{ `id`: `string`; `source`: `string`; `title`: `string`; `params?`: readonly ...[]; `watch?`: `AppGillWatch`; `desktop?`: `Readonly`\<...\>; \}\>[]; `backend?`: `Readonly`\<\{ `bindings`: readonly `Readonly`\<\{ `name`: ...; `operations`: ...; \}\>[]; `sync?`: `Readonly`\<\{ `method`: ...; \}\>; \}\>; \}\>; `kind`: `"backend"`; `backend`: \{ `digest`: `Sha256Digest`; `byteLength`: `number`; \}; \} \| \{ `declaration?`: `Readonly`\<\{ `api?`: `Readonly`\<\{ `methods`: `Readonly`\<`Record`\<`string`, `Readonly`\<...\>\>\>; `toolFamily?`: `Readonly`\<\{ `name`: ...; `list`: ...; `call`: ...; \}\>; `events?`: `Readonly`\<`Record`\<..., ...\>\>; \}\>; `displayName?`: `string`; `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"`)[]; `calls?`: readonly `Readonly`\<\{ `appId`: `string`; `methods`: readonly `string`[]; \}\>[]; `guidance?`: `string`; `handlers`: readonly `"file.open"`[]; `receives?`: readonly `"git.push"`[]; `icon?`: `string`; `roles`: readonly (`"dashboard"` \| `"inbox"` \| `"files"` \| `"media"` \| `"sessions"` \| `"terminal"`)[]; `storage?`: readonly `Readonly`\<\{ `key`: `string`; `scopes`: readonly (... \| ...)[]; `maxBytes`: `number`; \}\>[]; `commands?`: readonly `Readonly`\<\{ `id`: `string`; `title`: `string`; `category`: `string`; `description?`: `string`; `sigil?`: `string`; `projections?`: `Readonly`\<...\>; \}\>[]; `gills?`: readonly `Readonly`\<\{ `id`: `string`; `source`: `string`; `title`: `string`; `params?`: readonly ...[]; `watch?`: `AppGillWatch`; `desktop?`: `Readonly`\<...\>; \}\>[]; `backend?`: `Readonly`\<\{ `bindings`: readonly `Readonly`\<\{ `name`: ...; `operations`: ...; \}\>[]; `sync?`: `Readonly`\<\{ `method`: ...; \}\>; \}\>; \}\>; `kind`: `"app"`; `ui`: \| \{ `mediaType`: `"text/html; charset=utf-8"`; `content`: \{ `digest`: `Sha256Digest`; `byteLength`: `number`; `kind`: `"html"`; \}; \} \| \{ `mediaType`: `"application/vnd.fungi.app-assets+json"`; `content`: \{ `kind`: `"assets"`; `base`: `string`; `assets`: readonly `object`[]; \}; \}; `backend`: \{ `digest`: `Sha256Digest`; `byteLength`: `number`; \}; \} |
844
+ | `objects` | [`ImmutableArtifactObjects`](#immutableartifactobjects) |
845
+ | `options` | `Readonly`\<\{ `rootArtifactRef`: `ArtifactRef`; `assetPolicy`: `AssetBuildPolicy` \| `undefined`; \}\> |
846
+
847
+ #### Returns
848
+
849
+ `Promise`\<`Readonly`\<\{ `artifactRef`: `ArtifactRef`; `artifactDigest`:
850
+ `Sha256Digest`; \}\>\>
851
+
852
+ ---
853
+
854
+ ### readBundledHtml()
855
+
856
+ ```ts
857
+ function readBundledHtml(
858
+ snapshot,
859
+ recipe,
860
+ ): Promise<
861
+ Readonly<{
862
+ kind: "assets";
863
+ base: string;
864
+ assets: readonly object[];
865
+ }>
866
+ >;
867
+ ```
868
+
869
+ Read only regular files under the captured entry's directory. No scripts,
870
+ dependency hydration, URL rewriting, or access to the producer's live build.
871
+
872
+ #### Parameters
873
+
874
+ | Parameter | Type |
875
+ | -------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
876
+ | `snapshot` | `string` |
877
+ | `recipe` | \{ `kind?`: `"bundled-html"` \| `"source-html"`; `bundle`: `true`; `entry`: `string`; `format`: `"html"` \| `"assets"` \| `"esm"`; `assets?`: \{ `maxManifestBytes`: `number`; `maxObjects`: `number`; `maxObjectBytes`: `number`; `maxTotalBytes`: `number`; \}; `assetBase?`: `string`; `toolchain`: \{ \[`key`: `string`\]: `string`; \}; `maxOutputBytes`: `number`; `platform`: `"browser"` \| `"neutral"`; `backend`: \| \{ `entry?`: `string`; `runtime`: \{ `kind`: `"durable-facet"`; `stateSchema`: `number`; \}; `compatibilityDate`: `string`; `exportName`: `string`; \} \| `null`; `target`: readonly \[`"es2022"`\]; \} |
878
+ | `recipe.kind?` | `"bundled-html"` \| `"source-html"` |
879
+ | `recipe.bundle` | `true` |
880
+ | `recipe.entry` | `string` |
881
+ | `recipe.format` | `"html"` \| `"assets"` \| `"esm"` |
882
+ | `recipe.assets?` | \{ `maxManifestBytes`: `number`; `maxObjects`: `number`; `maxObjectBytes`: `number`; `maxTotalBytes`: `number`; \} |
883
+ | `recipe.assets.maxManifestBytes` | `number` |
884
+ | `recipe.assets.maxObjects` | `number` |
885
+ | `recipe.assets.maxObjectBytes` | `number` |
886
+ | `recipe.assets.maxTotalBytes` | `number` |
887
+ | `recipe.assetBase?` | `string` |
888
+ | `recipe.toolchain` | \{ \[`key`: `string`\]: `string`; \} |
889
+ | `recipe.maxOutputBytes` | `number` |
890
+ | `recipe.platform` | `"browser"` \| `"neutral"` |
891
+ | `recipe.backend` | \| \{ `entry?`: `string`; `runtime`: \{ `kind`: `"durable-facet"`; `stateSchema`: `number`; \}; `compatibilityDate`: `string`; `exportName`: `string`; \} \| `null` |
892
+ | `recipe.target` | readonly \[`"es2022"`\] |
893
+
894
+ #### Returns
895
+
896
+ `Promise`\<`Readonly`\<\{ `kind`: `"assets"`; `base`: `string`; `assets`:
897
+ readonly `object`[]; \}\>\>
898
+
899
+ ---
900
+
901
+ ### createDefinitionEmission()
902
+
903
+ ```ts
904
+ function createDefinitionEmission(source, recipe): Promise<{
905
+ entryPoints: (entry) => Record<string, string>;
906
+ outdir: string;
907
+ plugins: Plugin[];
908
+ worker: AppBackendOutput;
909
+ declare: Promise<Readonly<{
910
+ api?: Readonly<{
911
+ methods: Readonly<Record<string, Readonly<...>>>;
912
+ toolFamily?: Readonly<{
913
+ name: ...;
914
+ list: ...;
915
+ call: ...;
916
+ }>;
917
+ events?: Readonly<Record<..., ...>>;
918
+ }>;
919
+ displayName?: string;
920
+ capabilities: readonly (
921
+ | "agent.list"
922
+ | "agent.manage"
923
+ | "agent.rename"
924
+ | "agent.toolPolicy"
925
+ | "agent.read"
926
+ | "agent.send"
927
+ | "computer.list"
928
+ | "computer.readFile"
929
+ | "computer.writeFile"
930
+ | "computer.execute"
931
+ | "llm.generation"
932
+ | "media.generation"
933
+ | "games:servers"
934
+ | "git.repository"
935
+ | "apps.open"
936
+ | "apps.call"
937
+ | "app.storage"
938
+ | "app.events.emit"
939
+ | "team.workbenchHost"
940
+ | "marketplace.browse"
941
+ | "marketplace.purchase"
942
+ | "workflow.run"
943
+ | "workflow.publish"
944
+ | "workflow.arm"
945
+ | "world"
946
+ | "channels.read"
947
+ | "channels.personal.manage")[];
948
+ calls?: readonly Readonly<{
949
+ appId: string;
950
+ methods: readonly string[];
951
+ }>[];
952
+ guidance?: string;
953
+ handlers: readonly "file.open"[];
954
+ receives?: readonly "git.push"[];
955
+ icon?: string;
956
+ roles: readonly ("dashboard" | "inbox" | "files" | "media" | "sessions" | "terminal")[];
957
+ storage?: readonly Readonly<{
958
+ key: string;
959
+ scopes: readonly (... | ...)[];
960
+ maxBytes: number;
961
+ }>[];
962
+ commands?: readonly Readonly<{
963
+ id: string;
964
+ title: string;
965
+ category: string;
966
+ description?: string;
967
+ sigil?: string;
968
+ projections?: Readonly<...>;
969
+ }>[];
970
+ gills?: readonly Readonly<{
971
+ id: string;
972
+ source: string;
973
+ title: string;
974
+ params?: readonly ...[];
975
+ watch?: AppGillWatch;
976
+ desktop?: Readonly<...>;
977
+ }>[];
978
+ backend?: Readonly<{
979
+ bindings: readonly Readonly<{
980
+ name: ...;
981
+ operations: ...;
982
+ }>[];
983
+ sync?: Readonly<{
984
+ method: ...;
985
+ }>;
986
+ }>;
987
+ }>>;
988
+ }>;
989
+ ```
990
+
991
+ Build one App backend and derive its declaration from that same build.
992
+
993
+ A declared `fungi.backendDefinition` adds a second, build-only entry that
994
+ derives the declaration with `buildAppDeclaration(appBackend, fungi.app)`.
995
+ esbuild loads every path and resolves every import once per build, so the Worker
996
+ serves exactly the definition bytes and module resolution the declaration
997
+ describes. The Worker output is then checked to include that definition and no
998
+ build-only declaration code, and the declaration output to import nothing at
999
+ runtime.
1000
+
1001
+ #### Parameters
1002
+
1003
+ | Parameter | Type |
1004
+ | -------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
1005
+ | `source` | [`CapturedSource`](#capturedsource) |
1006
+ | `recipe` | \{ `kind?`: `"bundled-html"` \| `"source-html"`; `bundle`: `true`; `entry`: `string`; `format`: `"html"` \| `"assets"` \| `"esm"`; `assets?`: \{ `maxManifestBytes`: `number`; `maxObjects`: `number`; `maxObjectBytes`: `number`; `maxTotalBytes`: `number`; \}; `assetBase?`: `string`; `toolchain`: \{ \[`key`: `string`\]: `string`; \}; `maxOutputBytes`: `number`; `platform`: `"browser"` \| `"neutral"`; `backend`: \| \{ `entry?`: `string`; `runtime`: \{ `kind`: `"durable-facet"`; `stateSchema`: `number`; \}; `compatibilityDate`: `string`; `exportName`: `string`; \} \| `null`; `target`: readonly \[`"es2022"`\]; \} |
1007
+ | `recipe.kind?` | `"bundled-html"` \| `"source-html"` |
1008
+ | `recipe.bundle` | `true` |
1009
+ | `recipe.entry` | `string` |
1010
+ | `recipe.format` | `"html"` \| `"assets"` \| `"esm"` |
1011
+ | `recipe.assets?` | \{ `maxManifestBytes`: `number`; `maxObjects`: `number`; `maxObjectBytes`: `number`; `maxTotalBytes`: `number`; \} |
1012
+ | `recipe.assets.maxManifestBytes` | `number` |
1013
+ | `recipe.assets.maxObjects` | `number` |
1014
+ | `recipe.assets.maxObjectBytes` | `number` |
1015
+ | `recipe.assets.maxTotalBytes` | `number` |
1016
+ | `recipe.assetBase?` | `string` |
1017
+ | `recipe.toolchain` | \{ \[`key`: `string`\]: `string`; \} |
1018
+ | `recipe.maxOutputBytes` | `number` |
1019
+ | `recipe.platform` | `"browser"` \| `"neutral"` |
1020
+ | `recipe.backend` | \| \{ `entry?`: `string`; `runtime`: \{ `kind`: `"durable-facet"`; `stateSchema`: `number`; \}; `compatibilityDate`: `string`; `exportName`: `string`; \} \| `null` |
1021
+ | `recipe.target` | readonly \[`"es2022"`\] |
1022
+
1023
+ #### Returns
1024
+
1025
+ `Promise`\<\{ `entryPoints`: (`entry`) => `Record`\<`string`, `string`\>;
1026
+ `outdir`: `string`; `plugins`: `Plugin`[]; `worker`:
1027
+ [`AppBackendOutput`](#appbackendoutput); `declare`: `Promise`\<`Readonly`\<\{
1028
+ `api?`: `Readonly`\<\{ `methods`: `Readonly`\<`Record`\<`string`,
1029
+ `Readonly`\<...\>\>\>; `toolFamily?`: `Readonly`\<\{ `name`: ...; `list`: ...;
1030
+ `call`: ...; \}\>; `events?`: `Readonly`\<`Record`\<..., ...\>\>; \}\>;
1031
+ `displayName?`: `string`; `capabilities`: readonly ( \| `"agent.list"` \|
1032
+ `"agent.manage"` \| `"agent.rename"` \| `"agent.toolPolicy"` \| `"agent.read"`
1033
+ \| `"agent.send"` \| `"computer.list"` \| `"computer.readFile"` \|
1034
+ `"computer.writeFile"` \| `"computer.execute"` \| `"llm.generation"` \|
1035
+ `"media.generation"` \| `"games:servers"` \| `"git.repository"` \| `"apps.open"`
1036
+ \| `"apps.call"` \| `"app.storage"` \| `"app.events.emit"` \|
1037
+ `"team.workbenchHost"` \| `"marketplace.browse"` \| `"marketplace.purchase"` \|
1038
+ `"workflow.run"` \| `"workflow.publish"` \| `"workflow.arm"` \| `"world"` \|
1039
+ `"channels.read"` \| `"channels.personal.manage"`)[]; `calls?`: readonly
1040
+ `Readonly`\<\{ `appId`: `string`; `methods`: readonly `string`[]; \}\>[];
1041
+ `guidance?`: `string`; `handlers`: readonly `"file.open"`[]; `receives?`:
1042
+ readonly `"git.push"`[]; `icon?`: `string`; `roles`: readonly (`"dashboard"` \|
1043
+ `"inbox"` \| `"files"` \| `"media"` \| `"sessions"` \| `"terminal"`)[];
1044
+ `storage?`: readonly `Readonly`\<\{ `key`: `string`; `scopes`: readonly (... \|
1045
+ ...)[]; `maxBytes`: `number`; \}\>[]; `commands?`: readonly `Readonly`\<\{ `id`:
1046
+ `string`; `title`: `string`; `category`: `string`; `description?`: `string`;
1047
+ `sigil?`: `string`; `projections?`: `Readonly`\<...\>; \}\>[]; `gills?`:
1048
+ readonly `Readonly`\<\{ `id`: `string`; `source`: `string`; `title`: `string`;
1049
+ `params?`: readonly ...[]; `watch?`: `AppGillWatch`; `desktop?`:
1050
+ `Readonly`\<...\>; \}\>[]; `backend?`: `Readonly`\<\{ `bindings`: readonly
1051
+ `Readonly`\<\{ `name`: ...; `operations`: ...; \}\>[]; `sync?`: `Readonly`\<\{
1052
+ `method`: ...; \}\>; \}\>; \}\>\>; \}\>
1053
+
1054
+ ---
1055
+
1056
+ ### pinsCurrentToolchain()
1057
+
1058
+ ```ts
1059
+ function pinsCurrentToolchain(recipe): boolean;
1060
+ ```
1061
+
1062
+ Whether a pinned recipe pins this Publisher's current toolchain (its build
1063
+ policy included). An executor refuses any other: a recipe pinned under another
1064
+ policy describes a build this code does not perform.
1065
+
1066
+ #### Parameters
1067
+
1068
+ | Parameter | Type |
1069
+ | -------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
1070
+ | `recipe` | \{ `kind?`: `"bundled-html"` \| `"source-html"`; `bundle`: `true`; `entry`: `string`; `format`: `"html"` \| `"assets"` \| `"esm"`; `assets?`: \{ `maxManifestBytes`: `number`; `maxObjects`: `number`; `maxObjectBytes`: `number`; `maxTotalBytes`: `number`; \}; `assetBase?`: `string`; `toolchain`: \{ \[`key`: `string`\]: `string`; \}; `maxOutputBytes`: `number`; `platform`: `"browser"` \| `"neutral"`; `backend`: \| \{ `entry?`: `string`; `runtime`: \{ `kind`: `"durable-facet"`; `stateSchema`: `number`; \}; `compatibilityDate`: `string`; `exportName`: `string`; \} \| `null`; `target`: readonly \[`"es2022"`\]; \} |
1071
+ | `recipe.kind?` | `"bundled-html"` \| `"source-html"` |
1072
+ | `recipe.bundle` | `true` |
1073
+ | `recipe.entry` | `string` |
1074
+ | `recipe.format` | `"html"` \| `"assets"` \| `"esm"` |
1075
+ | `recipe.assets?` | \{ `maxManifestBytes`: `number`; `maxObjects`: `number`; `maxObjectBytes`: `number`; `maxTotalBytes`: `number`; \} |
1076
+ | `recipe.assets.maxManifestBytes` | `number` |
1077
+ | `recipe.assets.maxObjects` | `number` |
1078
+ | `recipe.assets.maxObjectBytes` | `number` |
1079
+ | `recipe.assets.maxTotalBytes` | `number` |
1080
+ | `recipe.assetBase?` | `string` |
1081
+ | `recipe.toolchain` | \{ \[`key`: `string`\]: `string`; \} |
1082
+ | `recipe.maxOutputBytes` | `number` |
1083
+ | `recipe.platform` | `"browser"` \| `"neutral"` |
1084
+ | `recipe.backend` | \| \{ `entry?`: `string`; `runtime`: \{ `kind`: `"durable-facet"`; `stateSchema`: `number`; \}; `compatibilityDate`: `string`; `exportName`: `string`; \} \| `null` |
1085
+ | `recipe.target` | readonly \[`"es2022"`\] |
1086
+
1087
+ #### Returns
1088
+
1089
+ `boolean`
1090
+
1091
+ ---
1092
+
1093
+ ### digestPinnedRecipe()
1094
+
1095
+ ```ts
1096
+ function digestPinnedRecipe(recipe): Sha256Digest;
1097
+ ```
1098
+
1099
+ Hash every captured build and output-policy input in the Publisher recipe.
1100
+
1101
+ #### Parameters
1102
+
1103
+ | Parameter | Type |
1104
+ | -------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
1105
+ | `recipe` | \{ `kind?`: `"bundled-html"` \| `"source-html"`; `bundle`: `true`; `entry`: `string`; `format`: `"html"` \| `"assets"` \| `"esm"`; `assets?`: \{ `maxManifestBytes`: `number`; `maxObjects`: `number`; `maxObjectBytes`: `number`; `maxTotalBytes`: `number`; \}; `assetBase?`: `string`; `toolchain`: \{ \[`key`: `string`\]: `string`; \}; `maxOutputBytes`: `number`; `platform`: `"browser"` \| `"neutral"`; `backend`: \| \{ `entry?`: `string`; `runtime`: \{ `kind`: `"durable-facet"`; `stateSchema`: `number`; \}; `compatibilityDate`: `string`; `exportName`: `string`; \} \| `null`; `target`: readonly \[`"es2022"`\]; \} |
1106
+ | `recipe.kind?` | `"bundled-html"` \| `"source-html"` |
1107
+ | `recipe.bundle` | `true` |
1108
+ | `recipe.entry` | `string` |
1109
+ | `recipe.format` | `"html"` \| `"assets"` \| `"esm"` |
1110
+ | `recipe.assets?` | \{ `maxManifestBytes`: `number`; `maxObjects`: `number`; `maxObjectBytes`: `number`; `maxTotalBytes`: `number`; \} |
1111
+ | `recipe.assets.maxManifestBytes` | `number` |
1112
+ | `recipe.assets.maxObjects` | `number` |
1113
+ | `recipe.assets.maxObjectBytes` | `number` |
1114
+ | `recipe.assets.maxTotalBytes` | `number` |
1115
+ | `recipe.assetBase?` | `string` |
1116
+ | `recipe.toolchain` | \{ \[`key`: `string`\]: `string`; \} |
1117
+ | `recipe.maxOutputBytes` | `number` |
1118
+ | `recipe.platform` | `"browser"` \| `"neutral"` |
1119
+ | `recipe.backend` | \| \{ `entry?`: `string`; `runtime`: \{ `kind`: `"durable-facet"`; `stateSchema`: `number`; \}; `compatibilityDate`: `string`; `exportName`: `string`; \} \| `null` |
1120
+ | `recipe.target` | readonly \[`"es2022"`\] |
1121
+
1122
+ #### Returns
1123
+
1124
+ `Sha256Digest`
1125
+
1126
+ ---
1127
+
1128
+ ### normalizeAppPublisherRecipe()
1129
+
1130
+ ```ts
1131
+ function normalizeAppPublisherRecipe(input): Readonly<{
1132
+ recipe: PinnedRecipe;
1133
+ buildRecipeDigest: Sha256Digest;
1134
+ }>;
1135
+ ```
1136
+
1137
+ Decode and normalize Publisher-owned recipe policy for durable seed proof.
1138
+
1139
+ #### Parameters
1140
+
1141
+ | Parameter | Type |
1142
+ | -------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
1143
+ | `input` | \{ `appId`: `string`; `recipe`: \{ `kind?`: `"bundled-html"` \| `"source-html"`; `entry`: `string`; `assets?`: \{ `maxManifestBytes`: `number`; `maxObjects`: `number`; `maxObjectBytes`: `number`; `maxTotalBytes`: `number`; \}; `assetBase?`: `string`; `backend`: \| \{ `entry?`: `string`; `runtime`: \{ `kind`: `"durable-facet"`; `stateSchema`: `number`; \}; `compatibilityDate`: `string`; `exportName`: `string`; \} \| `null`; `maxOutputBytes`: `number`; \}; \} |
1144
+ | `input.appId` | `string` |
1145
+ | `input.recipe` | \{ `kind?`: `"bundled-html"` \| `"source-html"`; `entry`: `string`; `assets?`: \{ `maxManifestBytes`: `number`; `maxObjects`: `number`; `maxObjectBytes`: `number`; `maxTotalBytes`: `number`; \}; `assetBase?`: `string`; `backend`: \| \{ `entry?`: `string`; `runtime`: \{ `kind`: `"durable-facet"`; `stateSchema`: `number`; \}; `compatibilityDate`: `string`; `exportName`: `string`; \} \| `null`; `maxOutputBytes`: `number`; \} |
1146
+ | `input.recipe.kind?` | `"bundled-html"` \| `"source-html"` |
1147
+ | `input.recipe.entry` | `string` |
1148
+ | `input.recipe.assets?` | \{ `maxManifestBytes`: `number`; `maxObjects`: `number`; `maxObjectBytes`: `number`; `maxTotalBytes`: `number`; \} |
1149
+ | `input.recipe.assets.maxManifestBytes` | `number` |
1150
+ | `input.recipe.assets.maxObjects` | `number` |
1151
+ | `input.recipe.assets.maxObjectBytes` | `number` |
1152
+ | `input.recipe.assets.maxTotalBytes` | `number` |
1153
+ | `input.recipe.assetBase?` | `string` |
1154
+ | `input.recipe.backend` | \| \{ `entry?`: `string`; `runtime`: \{ `kind`: `"durable-facet"`; `stateSchema`: `number`; \}; `compatibilityDate`: `string`; `exportName`: `string`; \} \| `null` |
1155
+ | `input.recipe.maxOutputBytes` | `number` |
1156
+
1157
+ #### Returns
1158
+
1159
+ `Readonly`\<\{ `recipe`: [`PinnedRecipe`](#pinnedrecipe); `buildRecipeDigest`:
1160
+ `Sha256Digest`; \}\>
1161
+
1162
+ ---
1163
+
1164
+ ### pinnedRecipeObjectBound()
1165
+
1166
+ ```ts
1167
+ function pinnedRecipeObjectBound(recipe): number;
1168
+ ```
1169
+
1170
+ The largest single object a build under this recipe may upload: no larger than
1171
+ the largest output bound the recipe could assign it under.
1172
+
1173
+ #### Parameters
1174
+
1175
+ | Parameter | Type |
1176
+ | -------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
1177
+ | `recipe` | \{ `kind?`: `"bundled-html"` \| `"source-html"`; `bundle`: `true`; `entry`: `string`; `format`: `"html"` \| `"assets"` \| `"esm"`; `assets?`: \{ `maxManifestBytes`: `number`; `maxObjects`: `number`; `maxObjectBytes`: `number`; `maxTotalBytes`: `number`; \}; `assetBase?`: `string`; `toolchain`: \{ \[`key`: `string`\]: `string`; \}; `maxOutputBytes`: `number`; `platform`: `"browser"` \| `"neutral"`; `backend`: \| \{ `entry?`: `string`; `runtime`: \{ `kind`: `"durable-facet"`; `stateSchema`: `number`; \}; `compatibilityDate`: `string`; `exportName`: `string`; \} \| `null`; `target`: readonly \[`"es2022"`\]; \} |
1178
+ | `recipe.kind?` | `"bundled-html"` \| `"source-html"` |
1179
+ | `recipe.bundle` | `true` |
1180
+ | `recipe.entry` | `string` |
1181
+ | `recipe.format` | `"html"` \| `"assets"` \| `"esm"` |
1182
+ | `recipe.assets?` | \{ `maxManifestBytes`: `number`; `maxObjects`: `number`; `maxObjectBytes`: `number`; `maxTotalBytes`: `number`; \} |
1183
+ | `recipe.assets.maxManifestBytes` | `number` |
1184
+ | `recipe.assets.maxObjects` | `number` |
1185
+ | `recipe.assets.maxObjectBytes` | `number` |
1186
+ | `recipe.assets.maxTotalBytes` | `number` |
1187
+ | `recipe.assetBase?` | `string` |
1188
+ | `recipe.toolchain` | \{ \[`key`: `string`\]: `string`; \} |
1189
+ | `recipe.maxOutputBytes` | `number` |
1190
+ | `recipe.platform` | `"browser"` \| `"neutral"` |
1191
+ | `recipe.backend` | \| \{ `entry?`: `string`; `runtime`: \{ `kind`: `"durable-facet"`; `stateSchema`: `number`; \}; `compatibilityDate`: `string`; `exportName`: `string`; \} \| `null` |
1192
+ | `recipe.target` | readonly \[`"es2022"`\] |
1193
+
1194
+ #### Returns
1195
+
1196
+ `number`
1197
+
1198
+ ---
1199
+
1200
+ ### fitsPinnedRecipe()
1201
+
1202
+ ```ts
1203
+ function fitsPinnedRecipe(output, recipe): boolean;
1204
+ ```
1205
+
1206
+ Whether output built elsewhere (a Computer's candidate manifest) is one this
1207
+ recipe could assign: the same surfaces and `maxOutputBytes` bound the preparer
1208
+ applies here. Asset sizes stay the artifact writer's policy.
1209
+
1210
+ #### Parameters
1211
+
1212
+ | Parameter | Type |
1213
+ | -------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
1214
+ | `output` | \| \{ `declaration?`: `Readonly`\<\{ `api?`: `Readonly`\<\{ `methods`: `Readonly`\<`Record`\<`string`, `Readonly`\<...\>\>\>; `toolFamily?`: `Readonly`\<\{ `name`: ...; `list`: ...; `call`: ...; \}\>; `events?`: `Readonly`\<`Record`\<..., ...\>\>; \}\>; `displayName?`: `string`; `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"`)[]; `calls?`: readonly `Readonly`\<\{ `appId`: `string`; `methods`: readonly `string`[]; \}\>[]; `guidance?`: `string`; `handlers`: readonly `"file.open"`[]; `receives?`: readonly `"git.push"`[]; `icon?`: `string`; `roles`: readonly (`"dashboard"` \| `"inbox"` \| `"files"` \| `"media"` \| `"sessions"` \| `"terminal"`)[]; `storage?`: readonly `Readonly`\<\{ `key`: `string`; `scopes`: readonly (... \| ...)[]; `maxBytes`: `number`; \}\>[]; `commands?`: readonly `Readonly`\<\{ `id`: `string`; `title`: `string`; `category`: `string`; `description?`: `string`; `sigil?`: `string`; `projections?`: `Readonly`\<...\>; \}\>[]; `gills?`: readonly `Readonly`\<\{ `id`: `string`; `source`: `string`; `title`: `string`; `params?`: readonly ...[]; `watch?`: `AppGillWatch`; `desktop?`: `Readonly`\<...\>; \}\>[]; `backend?`: `Readonly`\<\{ `bindings`: readonly `Readonly`\<\{ `name`: ...; `operations`: ...; \}\>[]; `sync?`: `Readonly`\<\{ `method`: ...; \}\>; \}\>; \}\>; `kind`: `"ui"`; `ui`: \| \{ `mediaType`: `"text/html; charset=utf-8"`; `content`: \{ `digest`: `Sha256Digest`; `byteLength`: `number`; `kind`: `"html"`; \}; \} \| \{ `mediaType`: `"application/vnd.fungi.app-assets+json"`; `content`: \{ `kind`: `"assets"`; `base`: `string`; `assets`: readonly `object`[]; \}; \}; \} \| \{ `declaration?`: `Readonly`\<\{ `api?`: `Readonly`\<\{ `methods`: `Readonly`\<`Record`\<`string`, `Readonly`\<...\>\>\>; `toolFamily?`: `Readonly`\<\{ `name`: ...; `list`: ...; `call`: ...; \}\>; `events?`: `Readonly`\<`Record`\<..., ...\>\>; \}\>; `displayName?`: `string`; `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"`)[]; `calls?`: readonly `Readonly`\<\{ `appId`: `string`; `methods`: readonly `string`[]; \}\>[]; `guidance?`: `string`; `handlers`: readonly `"file.open"`[]; `receives?`: readonly `"git.push"`[]; `icon?`: `string`; `roles`: readonly (`"dashboard"` \| `"inbox"` \| `"files"` \| `"media"` \| `"sessions"` \| `"terminal"`)[]; `storage?`: readonly `Readonly`\<\{ `key`: `string`; `scopes`: readonly (... \| ...)[]; `maxBytes`: `number`; \}\>[]; `commands?`: readonly `Readonly`\<\{ `id`: `string`; `title`: `string`; `category`: `string`; `description?`: `string`; `sigil?`: `string`; `projections?`: `Readonly`\<...\>; \}\>[]; `gills?`: readonly `Readonly`\<\{ `id`: `string`; `source`: `string`; `title`: `string`; `params?`: readonly ...[]; `watch?`: `AppGillWatch`; `desktop?`: `Readonly`\<...\>; \}\>[]; `backend?`: `Readonly`\<\{ `bindings`: readonly `Readonly`\<\{ `name`: ...; `operations`: ...; \}\>[]; `sync?`: `Readonly`\<\{ `method`: ...; \}\>; \}\>; \}\>; `kind`: `"backend"`; `backend`: \{ `digest`: `Sha256Digest`; `byteLength`: `number`; \}; \} \| \{ `declaration?`: `Readonly`\<\{ `api?`: `Readonly`\<\{ `methods`: `Readonly`\<`Record`\<`string`, `Readonly`\<...\>\>\>; `toolFamily?`: `Readonly`\<\{ `name`: ...; `list`: ...; `call`: ...; \}\>; `events?`: `Readonly`\<`Record`\<..., ...\>\>; \}\>; `displayName?`: `string`; `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"`)[]; `calls?`: readonly `Readonly`\<\{ `appId`: `string`; `methods`: readonly `string`[]; \}\>[]; `guidance?`: `string`; `handlers`: readonly `"file.open"`[]; `receives?`: readonly `"git.push"`[]; `icon?`: `string`; `roles`: readonly (`"dashboard"` \| `"inbox"` \| `"files"` \| `"media"` \| `"sessions"` \| `"terminal"`)[]; `storage?`: readonly `Readonly`\<\{ `key`: `string`; `scopes`: readonly (... \| ...)[]; `maxBytes`: `number`; \}\>[]; `commands?`: readonly `Readonly`\<\{ `id`: `string`; `title`: `string`; `category`: `string`; `description?`: `string`; `sigil?`: `string`; `projections?`: `Readonly`\<...\>; \}\>[]; `gills?`: readonly `Readonly`\<\{ `id`: `string`; `source`: `string`; `title`: `string`; `params?`: readonly ...[]; `watch?`: `AppGillWatch`; `desktop?`: `Readonly`\<...\>; \}\>[]; `backend?`: `Readonly`\<\{ `bindings`: readonly `Readonly`\<\{ `name`: ...; `operations`: ...; \}\>[]; `sync?`: `Readonly`\<\{ `method`: ...; \}\>; \}\>; \}\>; `kind`: `"app"`; `ui`: \| \{ `mediaType`: `"text/html; charset=utf-8"`; `content`: \{ `digest`: `Sha256Digest`; `byteLength`: `number`; `kind`: `"html"`; \}; \} \| \{ `mediaType`: `"application/vnd.fungi.app-assets+json"`; `content`: \{ `kind`: `"assets"`; `base`: `string`; `assets`: readonly `object`[]; \}; \}; `backend`: \{ `digest`: `Sha256Digest`; `byteLength`: `number`; \}; \} |
1215
+ | `recipe` | \{ `kind?`: `"bundled-html"` \| `"source-html"`; `bundle`: `true`; `entry`: `string`; `format`: `"html"` \| `"assets"` \| `"esm"`; `assets?`: \{ `maxManifestBytes`: `number`; `maxObjects`: `number`; `maxObjectBytes`: `number`; `maxTotalBytes`: `number`; \}; `assetBase?`: `string`; `toolchain`: \{ \[`key`: `string`\]: `string`; \}; `maxOutputBytes`: `number`; `platform`: `"browser"` \| `"neutral"`; `backend`: \| \{ `entry?`: `string`; `runtime`: \{ `kind`: `"durable-facet"`; `stateSchema`: `number`; \}; `compatibilityDate`: `string`; `exportName`: `string`; \} \| `null`; `target`: readonly \[`"es2022"`\]; \} |
1216
+ | `recipe.kind?` | `"bundled-html"` \| `"source-html"` |
1217
+ | `recipe.bundle` | `true` |
1218
+ | `recipe.entry` | `string` |
1219
+ | `recipe.format` | `"html"` \| `"assets"` \| `"esm"` |
1220
+ | `recipe.assets?` | \{ `maxManifestBytes`: `number`; `maxObjects`: `number`; `maxObjectBytes`: `number`; `maxTotalBytes`: `number`; \} |
1221
+ | `recipe.assets.maxManifestBytes` | `number` |
1222
+ | `recipe.assets.maxObjects` | `number` |
1223
+ | `recipe.assets.maxObjectBytes` | `number` |
1224
+ | `recipe.assets.maxTotalBytes` | `number` |
1225
+ | `recipe.assetBase?` | `string` |
1226
+ | `recipe.toolchain` | \{ \[`key`: `string`\]: `string`; \} |
1227
+ | `recipe.maxOutputBytes` | `number` |
1228
+ | `recipe.platform` | `"browser"` \| `"neutral"` |
1229
+ | `recipe.backend` | \| \{ `entry?`: `string`; `runtime`: \{ `kind`: `"durable-facet"`; `stateSchema`: `number`; \}; `compatibilityDate`: `string`; `exportName`: `string`; \} \| `null` |
1230
+ | `recipe.target` | readonly \[`"es2022"`\] |
1231
+
1232
+ #### Returns
1233
+
1234
+ `boolean`
1235
+
1236
+ ---
1237
+
1238
+ ### createAppCandidatePreparer()
1239
+
1240
+ ```ts
1241
+ function createAppCandidatePreparer(options): AppCandidatePreparer;
1242
+ ```
1243
+
1244
+ Construct one private App Publisher with copied core configuration and roles.
1245
+
1246
+ #### Parameters
1247
+
1248
+ | Parameter | Type |
1249
+ | --------- | ------------------------------------------------------------------------------------------------------------- |
1250
+ | `options` | `Pick`\<[`AppPublisherOptions`](#apppublisheroptions), `"config"` \| `"sourceCapture"` \| `"buildExecutor"`\> |
1251
+
1252
+ #### Returns
1253
+
1254
+ [`AppCandidatePreparer`](#appcandidatepreparer)
1255
+
1256
+ ---
1257
+
1258
+ ### createCapturedCandidatePreparer()
1259
+
1260
+ ```ts
1261
+ function createCapturedCandidatePreparer(config, options): AppCandidatePreparer;
1262
+ ```
1263
+
1264
+ Prepare a candidate from a previously captured recipe.
1265
+
1266
+ #### Parameters
1267
+
1268
+ | Parameter | Type |
1269
+ | --------- | ----------------------------------------------------------------------------------------------- |
1270
+ | `config` | [`CapturedConfig`](#capturedconfig) |
1271
+ | `options` | `Pick`\<[`AppPublisherOptions`](#apppublisheroptions), `"sourceCapture"` \| `"buildExecutor"`\> |
1272
+
1273
+ #### Returns
1274
+
1275
+ [`AppCandidatePreparer`](#appcandidatepreparer)
1276
+
1277
+ ---
1278
+
1279
+ ### commitPreparedCandidate()
1280
+
1281
+ ```ts
1282
+ function commitPreparedCandidate(
1283
+ prepared,
1284
+ options,
1285
+ ): Effect<Release, AppPublisherError>;
1286
+ ```
1287
+
1288
+ Persist a prepared build through the native artifact and App Release owners.
1289
+
1290
+ #### Parameters
1291
+
1292
+ | Parameter | Type |
1293
+ | ---------- | ------------------------------------------------------------------------------------------------- |
1294
+ | `prepared` | [`PreparedCandidate`](#preparedcandidate) |
1295
+ | `options` | `Pick`\<[`AppPublisherOptions`](#apppublisheroptions), `"artifactWriter"` \| `"releaseCatalog"`\> |
1296
+
1297
+ #### Returns
1298
+
1299
+ `Effect`\<`Release`, [`AppPublisherError`](#apppublishererror)\>
1300
+
1301
+ ---
1302
+
1303
+ ### createAppPublisher()
1304
+
1305
+ ```ts
1306
+ function createAppPublisher(options): AppPublisher;
1307
+ ```
1308
+
1309
+ Compose capture, compilation, immutable writing and Release recording.
1310
+
1311
+ #### Parameters
1312
+
1313
+ | Parameter | Type |
1314
+ | --------- | --------------------------------------------- |
1315
+ | `options` | [`AppPublisherOptions`](#apppublisheroptions) |
1316
+
1317
+ #### Returns
1318
+
1319
+ [`AppPublisher`](#apppublisher)
1320
+
1321
+ ---
1322
+
1323
+ ### repositoryEnvironment()
1324
+
1325
+ ```ts
1326
+ function repositoryEnvironment(): ProcessEnv;
1327
+ ```
1328
+
1329
+ Run a nested repository without inheriting the caller's Git checkout.
1330
+
1331
+ #### Returns
1332
+
1333
+ `ProcessEnv`
1334
+
1335
+ ---
1336
+
1337
+ ### artifactsGitEnvironment()
1338
+
1339
+ ```ts
1340
+ function artifactsGitEnvironment(token): ProcessEnv;
1341
+ ```
1342
+
1343
+ Git environment for one authenticated Artifacts fetch; caller validates token.
1344
+
1345
+ #### Parameters
1346
+
1347
+ | Parameter | Type |
1348
+ | --------- | -------- |
1349
+ | `token` | `string` |
1350
+
1351
+ #### Returns
1352
+
1353
+ `ProcessEnv`
1354
+
1355
+ ---
1356
+
1357
+ ### hostedArtifactsGitRemote()
1358
+
1359
+ ```ts
1360
+ function hostedArtifactsGitRemote(endpoint, repository): string;
1361
+ ```
1362
+
1363
+ Credential-free private route used by the hosted Publisher Git client.
1364
+
1365
+ #### Parameters
1366
+
1367
+ | Parameter | Type |
1368
+ | ------------ | -------- |
1369
+ | `endpoint` | `string` |
1370
+ | `repository` | `string` |
1371
+
1372
+ #### Returns
1373
+
1374
+ `string`
1375
+
1376
+ ---
1377
+
1378
+ ### boundedBundlePolicy()
1379
+
1380
+ ```ts
1381
+ function boundedBundlePolicy(policy, maxOutputBytes): boolean;
1382
+ ```
1383
+
1384
+ Requests may tighten the catalog bounds, never raise them.
1385
+
1386
+ #### Parameters
1387
+
1388
+ | Parameter | Type |
1389
+ | ------------------------- | ------------------------------------------------------------------------------------------------------------------ |
1390
+ | `policy` | \{ `maxManifestBytes`: `number`; `maxObjects`: `number`; `maxObjectBytes`: `number`; `maxTotalBytes`: `number`; \} |
1391
+ | `policy.maxManifestBytes` | `number` |
1392
+ | `policy.maxObjects` | `number` |
1393
+ | `policy.maxObjectBytes` | `number` |
1394
+ | `policy.maxTotalBytes` | `number` |
1395
+ | `maxOutputBytes` | `number` |
1396
+
1397
+ #### Returns
1398
+
1399
+ `boolean`
1400
+
1401
+ ---
1402
+
1403
+ ### createLocalSourceCapture()
1404
+
1405
+ ```ts
1406
+ function createLocalSourceCapture(repositoryPath): SourceCapture;
1407
+ ```
1408
+
1409
+ Local proving adapter; accepted source policy is intentionally fixed to main.
1410
+
1411
+ #### Parameters
1412
+
1413
+ | Parameter | Type |
1414
+ | ---------------- | -------- |
1415
+ | `repositoryPath` | `string` |
1416
+
1417
+ #### Returns
1418
+
1419
+ [`SourceCapture`](#sourcecapture)
1420
+
1421
+ ---
1422
+
1423
+ ### createLocalDirectorySourceCapture()
1424
+
1425
+ ```ts
1426
+ function createLocalDirectorySourceCapture(directory): SourceCapture;
1427
+ ```
1428
+
1429
+ Capture saved App files for local authoring without modifying the customer's
1430
+ repository. Provenance names the exact temporary Git snapshot, not an existing
1431
+ customer commit. Dependencies and local credentials are not source inputs.
1432
+
1433
+ #### Parameters
1434
+
1435
+ | Parameter | Type |
1436
+ | ----------- | -------- |
1437
+ | `directory` | `string` |
1438
+
1439
+ #### Returns
1440
+
1441
+ [`SourceCapture`](#sourcecapture)
1442
+
1443
+ ---
1444
+
1445
+ ### createArtifactsSourceCapture()
1446
+
1447
+ ```ts
1448
+ function createArtifactsSourceCapture(options): SourceCapture;
1449
+ ```
1450
+
1451
+ Capture an exact Artifacts commit through a trusted host's credential-free Git
1452
+ URL.
1453
+
1454
+ #### Parameters
1455
+
1456
+ | Parameter | Type |
1457
+ | ------------------------ | -------------------------------------------------------------------------------- |
1458
+ | `options` | \{ `remote`: `string`; `token`: `string`; `sourceRevision`: `SourceRevision`; \} |
1459
+ | `options.remote` | `string` |
1460
+ | `options.token` | `string` |
1461
+ | `options.sourceRevision` | `SourceRevision` |
1462
+
1463
+ #### Returns
1464
+
1465
+ [`SourceCapture`](#sourcecapture)
1466
+
1467
+ ---
1468
+
1469
+ ### createLocalCommitSourceCapture()
1470
+
1471
+ ```ts
1472
+ function createLocalCommitSourceCapture(
1473
+ repositoryPath,
1474
+ sourceRevision,
1475
+ ): SourceCapture;
1476
+ ```
1477
+
1478
+ Capture one explicit committed revision without manufacturing a branch.
1479
+
1480
+ #### Parameters
1481
+
1482
+ | Parameter | Type |
1483
+ | ---------------- | ---------------- |
1484
+ | `repositoryPath` | `string` |
1485
+ | `sourceRevision` | `SourceRevision` |
1486
+
1487
+ #### Returns
1488
+
1489
+ [`SourceCapture`](#sourcecapture)
1490
+
1491
+ ---
1492
+
1493
+ ### createFirstPartyAppSourceDistribution()
1494
+
1495
+ ```ts
1496
+ function createFirstPartyAppSourceDistribution(options): Effect<
1497
+ Readonly<{
1498
+ appId: AppId;
1499
+ sourceRevision: SourceRevision;
1500
+ sourceTreeDigest: Sha256Digest;
1501
+ appDirectory: string;
1502
+ files: readonly Readonly<{
1503
+ path: string;
1504
+ contents: Uint8Array;
1505
+ }>[];
1506
+ }>,
1507
+ unknown
1508
+ >;
1509
+ ```
1510
+
1511
+ Project one pinned first-party App and its pnpm workspace dependency graph
1512
+ without changing upstream files or manufacturing Git history. The caller records
1513
+ the returned provenance on the Artifacts template seed commit.
1514
+
1515
+ #### Parameters
1516
+
1517
+ | Parameter | Type |
1518
+ | ---------------- | ------------------------------------------------------------------------------------------ |
1519
+ | `options` | \{ `appId`: `string`; `source`: [`CapturedSource`](#capturedsource); `entry`: `string`; \} |
1520
+ | `options.appId` | `string` |
1521
+ | `options.source` | [`CapturedSource`](#capturedsource) |
1522
+ | `options.entry` | `string` |
1523
+
1524
+ #### Returns
1525
+
1526
+ `Effect`\<`Readonly`\<\{ `appId`: `AppId`; `sourceRevision`: `SourceRevision`;
1527
+ `sourceTreeDigest`: `Sha256Digest`; `appDirectory`: `string`; `files`: readonly
1528
+ `Readonly`\<\{ `path`: `string`; `contents`: `Uint8Array`; \}\>[]; \}\>,
1529
+ `unknown`\>
1530
+
1531
+ ---
1532
+
1533
+ ### localSnapshotBuildOptions()
1534
+
1535
+ ```ts
1536
+ function localSnapshotBuildOptions(source, recipe, emission): BuildOptions;
1537
+ ```
1538
+
1539
+ Exact pinned esbuild options shared by local builds and artifact-budget proofs.
1540
+
1541
+ #### Parameters
1542
+
1543
+ | Parameter | Type | Description |
1544
+ | -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- |
1545
+ | `source` | [`CapturedSource`](#capturedsource) | - |
1546
+ | `recipe` | \{ `kind?`: `"bundled-html"` \| `"source-html"`; `bundle`: `true`; `entry`: `string`; `format`: `"html"` \| `"assets"` \| `"esm"`; `assets?`: \{ `maxManifestBytes`: `number`; `maxObjects`: `number`; `maxObjectBytes`: `number`; `maxTotalBytes`: `number`; \}; `assetBase?`: `string`; `toolchain`: \{ \[`key`: `string`\]: `string`; \}; `maxOutputBytes`: `number`; `platform`: `"browser"` \| `"neutral"`; `backend`: \| \{ `entry?`: `string`; `runtime`: \{ `kind`: `"durable-facet"`; `stateSchema`: `number`; \}; `compatibilityDate`: `string`; `exportName`: `string`; \} \| `null`; `target`: readonly \[`"es2022"`\]; \} | - |
1547
+ | `recipe.kind?` | `"bundled-html"` \| `"source-html"` | - |
1548
+ | `recipe.bundle` | `true` | - |
1549
+ | `recipe.entry` | `string` | - |
1550
+ | `recipe.format` | `"html"` \| `"assets"` \| `"esm"` | - |
1551
+ | `recipe.assets?` | \{ `maxManifestBytes`: `number`; `maxObjects`: `number`; `maxObjectBytes`: `number`; `maxTotalBytes`: `number`; \} | - |
1552
+ | `recipe.assets.maxManifestBytes` | `number` | - |
1553
+ | `recipe.assets.maxObjects` | `number` | - |
1554
+ | `recipe.assets.maxObjectBytes` | `number` | - |
1555
+ | `recipe.assets.maxTotalBytes` | `number` | - |
1556
+ | `recipe.assetBase?` | `string` | - |
1557
+ | `recipe.toolchain` | \{ \[`key`: `string`\]: `string`; \} | - |
1558
+ | `recipe.maxOutputBytes` | `number` | - |
1559
+ | `recipe.platform` | `"browser"` \| `"neutral"` | - |
1560
+ | `recipe.backend` | \| \{ `entry?`: `string`; `runtime`: \{ `kind`: `"durable-facet"`; `stateSchema`: `number`; \}; `compatibilityDate`: `string`; `exportName`: `string`; \} \| `null` | - |
1561
+ | `recipe.target` | readonly \[`"es2022"`\] | - |
1562
+ | `emission` | \{ `entryPoints`: (`entry`) => `Record`\<`string`, `string`\>; `outdir`: `string`; `plugins`: `Plugin`[]; `worker`: [`AppBackendOutput`](#appbackendoutput); `declare`: `Promise`\<`Readonly`\<\{ `api?`: `Readonly`\<\{ `methods`: `Readonly`\<`Record`\<`string`, `Readonly`\<\{ `description`: ...; `input`: ...; `output`: ...; `effect`: ...; `requires`: ...; `pending?`: ...; `hidden?`: ...; `anonymous?`: ...; \}\>\>\>; `toolFamily?`: `Readonly`\<\{ `name`: `string`; `list`: `string`; `call`: `string`; \}\>; `events?`: `Readonly`\<`Record`\<`string`, `Readonly`\<...\>\>\>; \}\>; `displayName?`: `string`; `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"`)[]; `calls?`: readonly `Readonly`\<\{ `appId`: `string`; `methods`: readonly `string`[]; \}\>[]; `guidance?`: `string`; `handlers`: readonly `"file.open"`[]; `receives?`: readonly `"git.push"`[]; `icon?`: `string`; `roles`: readonly (`"dashboard"` \| `"inbox"` \| `"files"` \| `"media"` \| `"sessions"` \| `"terminal"`)[]; `storage?`: readonly `Readonly`\<\{ `key`: `string`; `scopes`: readonly (`"team"` \| `"member"`)[]; `maxBytes`: `number`; \}\>[]; `commands?`: readonly `Readonly`\<\{ `id`: `string`; `title`: `string`; `category`: `string`; `description?`: `string`; `sigil?`: `string`; `projections?`: `Readonly`\<\{ `bindings?`: ...; `agent?`: ...; `help?`: ...; `menu?`: ...; `palette?`: ...; `slash?`: ...; \}\>; \}\>[]; `gills?`: readonly `Readonly`\<\{ `id`: `string`; `source`: `string`; `title`: `string`; `params?`: readonly `Readonly`\<...\>[]; `watch?`: `AppGillWatch`; `desktop?`: `Readonly`\<\{ `sizes`: ...; \}\>; \}\>[]; `backend?`: `Readonly`\<\{ `bindings`: readonly `Readonly`\<\{ `name`: ... \| ... \| ... \| ... \| ... \| ... \| ... \| ... \| ... \| ...; `operations`: readonly ...[]; \}\>[]; `sync?`: `Readonly`\<\{ `method`: `string`; \}\>; \}\>; \}\>\>; \} | - |
1563
+ | `emission.entryPoints` | (`entry`) => `Record`\<`string`, `string`\> | Entries for the one backend build: the Worker and, if defined, its declaration. |
1564
+ | `emission.outdir` | `string` | - |
1565
+ | `emission.plugins` | `Plugin`[] | - |
1566
+ | `emission.worker` | - |
1567
+ | `emission.declare` | - |
1568
+
1569
+ #### Returns
1570
+
1571
+ `BuildOptions`
1572
+
1573
+ ---
1574
+
1575
+ ### createLocalBuildExecutor()
1576
+
1577
+ ```ts
1578
+ function createLocalBuildExecutor(options?): BuildExecutor;
1579
+ ```
1580
+
1581
+ Local proving adapter; it builds only the captured extracted snapshot.
1582
+
1583
+ #### Parameters
1584
+
1585
+ | Parameter | Type |
1586
+ | --------- | --------------------------------------------------------- |
1587
+ | `options` | [`LocalBuildExecutorOptions`](#localbuildexecutoroptions) |
1588
+
1589
+ #### Returns
1590
+
1591
+ [`BuildExecutor`](#buildexecutor)
1592
+
1593
+ ---
1594
+
1595
+ ### createLocalArtifactWriter()
1596
+
1597
+ ```ts
1598
+ function createLocalArtifactWriter(artifactRoot, assetPolicy?): ArtifactWriter;
1599
+ ```
1600
+
1601
+ Local proving adapter; the configured root is private and write-once.
1602
+
1603
+ #### Parameters
1604
+
1605
+ | Parameter | Type |
1606
+ | ------------------------------- | ------------------------------------------------------------------------------------------------------------------ |
1607
+ | `artifactRoot` | `string` |
1608
+ | `assetPolicy?` | \{ `maxManifestBytes`: `number`; `maxObjects`: `number`; `maxObjectBytes`: `number`; `maxTotalBytes`: `number`; \} |
1609
+ | `assetPolicy.maxManifestBytes?` | `number` |
1610
+ | `assetPolicy.maxObjects?` | `number` |
1611
+ | `assetPolicy.maxObjectBytes?` | `number` |
1612
+ | `assetPolicy.maxTotalBytes?` | `number` |
1613
+
1614
+ #### Returns
1615
+
1616
+ [`ArtifactWriter`](#artifactwriter)
1617
+
1618
+ ---
1619
+
1620
+ ### createLocalAppPublisher()
1621
+
1622
+ ```ts
1623
+ function createLocalAppPublisher(options): AppPublisher;
1624
+ ```
1625
+
1626
+ Construct the complete local proving adapter around the provider-neutral core.
1627
+
1628
+ #### Parameters
1629
+
1630
+ | Parameter | Type |
1631
+ | --------- | ------------------------------------------------------- |
1632
+ | `options` | [`LocalAppPublisherOptions`](#localapppublisheroptions) |
1633
+
1634
+ #### Returns
1635
+
1636
+ [`AppPublisher`](#apppublisher)
1637
+
1638
+ ---
1639
+
1640
+ ### frozenSnapshotInstallArguments()
1641
+
1642
+ ```ts
1643
+ function frozenSnapshotInstallArguments(packageStoreDirectory?): string[];
1644
+ ```
1645
+
1646
+ Frozen hydration policy. Cached bytes are verified and copied into each
1647
+ snapshot.
1648
+
1649
+ #### Parameters
1650
+
1651
+ | Parameter | Type |
1652
+ | ------------------------ | -------- |
1653
+ | `packageStoreDirectory?` | `string` |
1654
+
1655
+ #### Returns
1656
+
1657
+ `string`[]
1658
+
1659
+ ---
1660
+
1661
+ ### resolveWorkspaceBuild()
1662
+
1663
+ ```ts
1664
+ function resolveWorkspaceBuild(options): Promise<
1665
+ Readonly<{
1666
+ directory: string;
1667
+ packageName: string;
1668
+ react: boolean;
1669
+ shellEntry?: string;
1670
+ dependencies: readonly string[];
1671
+ steps: readonly (
1672
+ | {
1673
+ kind: "typescript";
1674
+ config: string;
1675
+ }
1676
+ | {
1677
+ kind: "tailwind";
1678
+ input: string;
1679
+ output: string;
1680
+ }
1681
+ | {
1682
+ kind: "script";
1683
+ directory: string;
1684
+ script: string;
1685
+ }
1686
+ )[];
1687
+ }>
1688
+ >;
1689
+ ```
1690
+
1691
+ Derive one App's page build from the captured source alone: the manifest nearest
1692
+ `entry` declares the App policy, the owning pnpm workspace's runtime
1693
+ `workspace:` dependencies give the compile order, and each dependency's manifest
1694
+ declares its own extra build products.
1695
+
1696
+ #### Parameters
1697
+
1698
+ | Parameter | Type | Description |
1699
+ | ------------------ | ---------------------------------------------------------------- | --------------------------------------------------------------- |
1700
+ | `options` | \{ `root`: `string`; `entry`: `string`; `projects`: `string`; \} | - |
1701
+ | `options.root` | `string` | - |
1702
+ | `options.entry` | `string` | - |
1703
+ | `options.projects` | `string` | `pnpm ls -r --depth -1 --json` output for the same source tree. |
1704
+
1705
+ #### Returns
1706
+
1707
+ `Promise`\<`Readonly`\<\{ `directory`: `string`; `packageName`: `string`;
1708
+ `react`: `boolean`; `shellEntry?`: `string`; `dependencies`: readonly
1709
+ `string`[]; `steps`: readonly ( \| \{ `kind`: `"typescript"`; `config`:
1710
+ `string`; \} \| \{ `kind`: `"tailwind"`; `input`: `string`; `output`: `string`;
1711
+ \} \| \{ `kind`: `"script"`; `directory`: `string`; `script`: `string`; \})[];
1712
+ \}\>\>