@ipab/cli 0.1.0-rc.1 → 0.1.0-rc.10

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 (285) hide show
  1. package/README.md +226 -9
  2. package/dist/app-authoring.d.ts +15 -0
  3. package/dist/app-authoring.d.ts.map +1 -1
  4. package/dist/app-authoring.js +144 -58
  5. package/dist/app-authoring.js.map +1 -1
  6. package/dist/app-definition.d.ts +52 -57
  7. package/dist/app-definition.d.ts.map +1 -1
  8. package/dist/app-definition.js +33 -38
  9. package/dist/app-definition.js.map +1 -1
  10. package/dist/app-prebuild.d.ts +18 -0
  11. package/dist/app-prebuild.d.ts.map +1 -1
  12. package/dist/app-prebuild.js +46 -0
  13. package/dist/app-prebuild.js.map +1 -1
  14. package/dist/app-templates.d.ts +0 -1
  15. package/dist/app-templates.d.ts.map +1 -1
  16. package/dist/app-templates.js +8 -46
  17. package/dist/app-templates.js.map +1 -1
  18. package/dist/assembly.d.ts +7 -0
  19. package/dist/assembly.d.ts.map +1 -0
  20. package/dist/assembly.js +130 -0
  21. package/dist/assembly.js.map +1 -0
  22. package/dist/authoring.d.ts +4 -8
  23. package/dist/authoring.d.ts.map +1 -1
  24. package/dist/authoring.js +25 -15
  25. package/dist/authoring.js.map +1 -1
  26. package/dist/builtins/skill.ipab.car +0 -0
  27. package/dist/builtins/template.bundle-viewer.car +0 -0
  28. package/dist/builtins/template.check.car +0 -0
  29. package/dist/builtins/template.node.car +0 -0
  30. package/dist/builtins/template.web-app.car +0 -0
  31. package/dist/builtins.d.ts.map +1 -1
  32. package/dist/builtins.js +1 -23
  33. package/dist/builtins.js.map +1 -1
  34. package/dist/bundled-skills.d.ts +14 -0
  35. package/dist/bundled-skills.d.ts.map +1 -0
  36. package/dist/bundled-skills.js +34 -0
  37. package/dist/bundled-skills.js.map +1 -0
  38. package/dist/cli.d.ts +8 -2
  39. package/dist/cli.d.ts.map +1 -1
  40. package/dist/cli.js +1919 -256
  41. package/dist/cli.js.map +1 -1
  42. package/dist/config-secret.d.ts +3 -0
  43. package/dist/config-secret.d.ts.map +1 -0
  44. package/dist/config-secret.js +12 -0
  45. package/dist/config-secret.js.map +1 -0
  46. package/dist/config.d.ts +7 -2
  47. package/dist/config.d.ts.map +1 -1
  48. package/dist/config.js +151 -8
  49. package/dist/config.js.map +1 -1
  50. package/dist/content-provider.d.ts +32 -0
  51. package/dist/content-provider.d.ts.map +1 -0
  52. package/dist/content-provider.js +222 -0
  53. package/dist/content-provider.js.map +1 -0
  54. package/dist/context-types.d.ts +12 -0
  55. package/dist/context-types.d.ts.map +1 -0
  56. package/dist/context-types.js +2 -0
  57. package/dist/context-types.js.map +1 -0
  58. package/dist/context.d.ts +26 -1
  59. package/dist/context.d.ts.map +1 -1
  60. package/dist/context.js +54 -10
  61. package/dist/context.js.map +1 -1
  62. package/dist/daemon-ui.d.ts +93 -0
  63. package/dist/daemon-ui.d.ts.map +1 -0
  64. package/dist/daemon-ui.js +713 -0
  65. package/dist/daemon-ui.js.map +1 -0
  66. package/dist/daemon.d.ts +21 -0
  67. package/dist/daemon.d.ts.map +1 -0
  68. package/dist/daemon.js +317 -0
  69. package/dist/daemon.js.map +1 -0
  70. package/dist/doctor.d.ts +32 -0
  71. package/dist/doctor.d.ts.map +1 -0
  72. package/dist/doctor.js +684 -0
  73. package/dist/doctor.js.map +1 -0
  74. package/dist/errors.d.ts +1 -8
  75. package/dist/errors.d.ts.map +1 -1
  76. package/dist/errors.js +1 -20
  77. package/dist/errors.js.map +1 -1
  78. package/dist/get.d.ts +3 -0
  79. package/dist/get.d.ts.map +1 -0
  80. package/dist/get.js +80 -0
  81. package/dist/get.js.map +1 -0
  82. package/dist/history.d.ts.map +1 -1
  83. package/dist/history.js +6 -14
  84. package/dist/history.js.map +1 -1
  85. package/dist/host-error.d.ts +9 -0
  86. package/dist/host-error.d.ts.map +1 -0
  87. package/dist/host-error.js +21 -0
  88. package/dist/host-error.js.map +1 -0
  89. package/dist/identity.d.ts +16 -0
  90. package/dist/identity.d.ts.map +1 -0
  91. package/dist/identity.js +119 -0
  92. package/dist/identity.js.map +1 -0
  93. package/dist/ipc.d.ts +5 -2
  94. package/dist/ipc.d.ts.map +1 -1
  95. package/dist/ipc.js +124 -12
  96. package/dist/ipc.js.map +1 -1
  97. package/dist/kubo-install.d.ts +26 -0
  98. package/dist/kubo-install.d.ts.map +1 -0
  99. package/dist/kubo-install.js +724 -0
  100. package/dist/kubo-install.js.map +1 -0
  101. package/dist/kubo-peering.d.ts +11 -0
  102. package/dist/kubo-peering.d.ts.map +1 -0
  103. package/dist/kubo-peering.js +93 -0
  104. package/dist/kubo-peering.js.map +1 -0
  105. package/dist/kubo-peers.d.ts +12 -0
  106. package/dist/kubo-peers.d.ts.map +1 -0
  107. package/dist/kubo-peers.js +119 -0
  108. package/dist/kubo-peers.js.map +1 -0
  109. package/dist/kubo-release.d.ts +22 -0
  110. package/dist/kubo-release.d.ts.map +1 -0
  111. package/dist/kubo-release.js +176 -0
  112. package/dist/kubo-release.js.map +1 -0
  113. package/dist/kubo-topology.d.ts +19 -0
  114. package/dist/kubo-topology.d.ts.map +1 -0
  115. package/dist/kubo-topology.js +113 -0
  116. package/dist/kubo-topology.js.map +1 -0
  117. package/dist/kubo.d.ts +85 -0
  118. package/dist/kubo.d.ts.map +1 -0
  119. package/dist/kubo.js +755 -0
  120. package/dist/kubo.js.map +1 -0
  121. package/dist/pins.d.ts +16 -18
  122. package/dist/pins.d.ts.map +1 -1
  123. package/dist/pins.js +144 -106
  124. package/dist/pins.js.map +1 -1
  125. package/dist/pivot-rpc.d.ts +62 -0
  126. package/dist/pivot-rpc.d.ts.map +1 -0
  127. package/dist/pivot-rpc.js +407 -0
  128. package/dist/pivot-rpc.js.map +1 -0
  129. package/dist/pivot-service.d.ts +16 -0
  130. package/dist/pivot-service.d.ts.map +1 -0
  131. package/dist/pivot-service.js +50 -0
  132. package/dist/pivot-service.js.map +1 -0
  133. package/dist/publish-source.d.ts +3 -0
  134. package/dist/publish-source.d.ts.map +1 -0
  135. package/dist/publish-source.js +85 -0
  136. package/dist/publish-source.js.map +1 -0
  137. package/dist/runtime.d.ts +2 -0
  138. package/dist/runtime.d.ts.map +1 -1
  139. package/dist/runtime.js +9 -4
  140. package/dist/runtime.js.map +1 -1
  141. package/dist/search-index.d.ts +64 -0
  142. package/dist/search-index.d.ts.map +1 -0
  143. package/dist/search-index.js +409 -0
  144. package/dist/search-index.js.map +1 -0
  145. package/dist/search-service.d.ts +23 -0
  146. package/dist/search-service.d.ts.map +1 -0
  147. package/dist/search-service.js +116 -0
  148. package/dist/search-service.js.map +1 -0
  149. package/dist/skill-definition.d.ts +6 -0
  150. package/dist/skill-definition.d.ts.map +1 -0
  151. package/dist/skill-definition.js +38 -0
  152. package/dist/skill-definition.js.map +1 -0
  153. package/dist/skill-source.d.ts +9 -0
  154. package/dist/skill-source.d.ts.map +1 -0
  155. package/dist/skill-source.js +24 -0
  156. package/dist/skill-source.js.map +1 -0
  157. package/dist/skills.d.ts +104 -0
  158. package/dist/skills.d.ts.map +1 -0
  159. package/dist/skills.js +894 -0
  160. package/dist/skills.js.map +1 -0
  161. package/dist/source-bundle.d.ts +3 -8
  162. package/dist/source-bundle.d.ts.map +1 -1
  163. package/dist/source-bundle.js +17 -12
  164. package/dist/source-bundle.js.map +1 -1
  165. package/dist/space-path.d.ts +3 -0
  166. package/dist/space-path.d.ts.map +1 -0
  167. package/dist/space-path.js +17 -0
  168. package/dist/space-path.js.map +1 -0
  169. package/dist/space.d.ts +16 -4
  170. package/dist/space.d.ts.map +1 -1
  171. package/dist/space.js +170 -24
  172. package/dist/space.js.map +1 -1
  173. package/dist/state-storage-windows.d.ts +2 -0
  174. package/dist/state-storage-windows.d.ts.map +1 -0
  175. package/dist/state-storage-windows.js +114 -0
  176. package/dist/state-storage-windows.js.map +1 -0
  177. package/dist/state-storage.d.ts +5 -0
  178. package/dist/state-storage.d.ts.map +1 -0
  179. package/dist/state-storage.js +333 -0
  180. package/dist/state-storage.js.map +1 -0
  181. package/dist/state.d.ts +115 -13
  182. package/dist/state.d.ts.map +1 -1
  183. package/dist/state.js +492 -91
  184. package/dist/state.js.map +1 -1
  185. package/dist/swarm-envelope.d.ts +57 -0
  186. package/dist/swarm-envelope.d.ts.map +1 -0
  187. package/dist/swarm-envelope.js +299 -0
  188. package/dist/swarm-envelope.js.map +1 -0
  189. package/dist/swarm-files.d.ts +6 -0
  190. package/dist/swarm-files.d.ts.map +1 -0
  191. package/dist/swarm-files.js +116 -0
  192. package/dist/swarm-files.js.map +1 -0
  193. package/dist/swarm-meta.d.ts +15 -0
  194. package/dist/swarm-meta.d.ts.map +1 -0
  195. package/dist/swarm-meta.js +68 -0
  196. package/dist/swarm-meta.js.map +1 -0
  197. package/dist/swarm-observations.d.ts +40 -0
  198. package/dist/swarm-observations.d.ts.map +1 -0
  199. package/dist/swarm-observations.js +271 -0
  200. package/dist/swarm-observations.js.map +1 -0
  201. package/dist/swarm.d.ts +469 -0
  202. package/dist/swarm.d.ts.map +1 -0
  203. package/dist/swarm.js +4708 -0
  204. package/dist/swarm.js.map +1 -0
  205. package/dist/template-definition.d.ts +47 -52
  206. package/dist/template-definition.d.ts.map +1 -1
  207. package/dist/template-definition.js +36 -41
  208. package/dist/template-definition.js.map +1 -1
  209. package/dist/template-paths.d.ts +7 -0
  210. package/dist/template-paths.d.ts.map +1 -0
  211. package/dist/template-paths.js +23 -0
  212. package/dist/template-paths.js.map +1 -0
  213. package/dist/template-presentation.d.ts +20 -0
  214. package/dist/template-presentation.d.ts.map +1 -0
  215. package/dist/template-presentation.js +133 -0
  216. package/dist/template-presentation.js.map +1 -0
  217. package/dist/template-source.d.ts +4 -1
  218. package/dist/template-source.d.ts.map +1 -1
  219. package/dist/template-source.js +11 -4
  220. package/dist/template-source.js.map +1 -1
  221. package/dist/templates.d.ts +11 -0
  222. package/dist/templates.d.ts.map +1 -0
  223. package/dist/templates.js +53 -0
  224. package/dist/templates.js.map +1 -0
  225. package/dist/unixfs-tree.d.ts +67 -0
  226. package/dist/unixfs-tree.d.ts.map +1 -0
  227. package/dist/unixfs-tree.js +329 -0
  228. package/dist/unixfs-tree.js.map +1 -0
  229. package/package.json +14 -7
  230. package/src/app-authoring.ts +240 -76
  231. package/src/app-definition.ts +33 -39
  232. package/src/app-prebuild.ts +61 -0
  233. package/src/app-templates.ts +17 -73
  234. package/src/assembly.ts +185 -0
  235. package/src/authoring.ts +41 -17
  236. package/src/builtins.ts +2 -27
  237. package/src/bundled-skills.ts +60 -0
  238. package/src/cli.ts +2399 -320
  239. package/src/config-secret.ts +14 -0
  240. package/src/config.ts +196 -8
  241. package/src/content-provider.ts +299 -0
  242. package/src/context-types.ts +11 -0
  243. package/src/context.ts +98 -10
  244. package/src/daemon-ui.ts +812 -0
  245. package/src/daemon.ts +386 -0
  246. package/src/doctor.ts +1082 -0
  247. package/src/errors.ts +1 -25
  248. package/src/get.ts +90 -0
  249. package/src/history.ts +5 -15
  250. package/src/host-error.ts +26 -0
  251. package/src/identity.ts +175 -0
  252. package/src/ipc.ts +160 -11
  253. package/src/kubo-install.ts +936 -0
  254. package/src/kubo-peering.ts +126 -0
  255. package/src/kubo-peers.ts +144 -0
  256. package/src/kubo-release.ts +230 -0
  257. package/src/kubo-topology.ts +148 -0
  258. package/src/kubo.ts +1088 -0
  259. package/src/pins.ts +188 -126
  260. package/src/pivot-rpc.ts +601 -0
  261. package/src/pivot-service.ts +87 -0
  262. package/src/publish-source.ts +103 -0
  263. package/src/runtime.ts +16 -4
  264. package/src/search-index.ts +560 -0
  265. package/src/search-service.ts +152 -0
  266. package/src/skill-definition.ts +53 -0
  267. package/src/skill-source.ts +29 -0
  268. package/src/skills.ts +1236 -0
  269. package/src/source-bundle.ts +26 -13
  270. package/src/space-path.ts +30 -0
  271. package/src/space.ts +230 -42
  272. package/src/state-storage-windows.ts +134 -0
  273. package/src/state-storage.ts +378 -0
  274. package/src/state.ts +759 -107
  275. package/src/swarm-envelope.ts +461 -0
  276. package/src/swarm-files.ts +126 -0
  277. package/src/swarm-meta.ts +98 -0
  278. package/src/swarm-observations.ts +393 -0
  279. package/src/swarm.ts +7051 -0
  280. package/src/template-definition.ts +36 -41
  281. package/src/template-paths.ts +43 -0
  282. package/src/template-presentation.ts +151 -0
  283. package/src/template-source.ts +19 -5
  284. package/src/templates.ts +77 -0
  285. package/src/unixfs-tree.ts +401 -0
package/README.md CHANGED
@@ -1,26 +1,243 @@
1
1
  # @ipab/cli
2
2
 
3
- Node subprocess host for InterPlanetary Application Bundles. **Not a sandbox**:
4
- only execute Apps you trust.
3
+ Node subprocess App host for IPAB (InterPlanetary Artifact Bundle). **Not a
4
+ sandbox**: only execute Apps you trust.
5
5
 
6
- `0.1.0-rc.0` is published. The next candidate is `0.1.0-rc.1`; until it is
7
- published, install the existing RC:
6
+ `0.1.0-rc.10` is a release candidate, not yet published. It includes v7 UnixFS
7
+ Swarm roots, Config v3/Approval v2 role permissions, unified Pivot receipts and
8
+ search, periodic daemon synchronization and a loopback-only status WebUI.
9
+ Existing Swarms are not implicitly migrated. Node >=22.20.0 is unchanged.
10
+
11
+ `0.1.0-rc.8` is published on the `rc` channel. It adds private Pivot networking
12
+ and a foreground coordinator, State v6/root-State references, local Swarm alias
13
+ management and aligned human-readable lists. Upgrade every Swarm client before
14
+ activating the new networking: rc.7 rejects the new Profile `pivot` field,
15
+ including `pivot:false`. See the [release scope](../../README.md#安装) and
16
+ [networking limits](../../docs/swarm-networking.md).
17
+
18
+ ## Explicit Bundle results (current source)
19
+
20
+ Apps may opt into the context's Bundle lifecycle without changing stdout:
21
+
22
+ ```ts
23
+ await ipab.beginOpenSession(inputCid, { supportedTypes: exactTypeCids });
24
+ const checkpoint = await ipab.deriveBundle(inputCid, {
25
+ "note.md": new TextEncoder().encode(updatedMarkdown),
26
+ });
27
+ await ipab.submitBundleResult(checkpoint);
28
+ ```
29
+
30
+ All four lifecycle methods (`beginOpenSession`, `deriveBundle`,
31
+ `submitBundleResult`, `cancelOpenSession`) accept an optional `{ signal }`. The
32
+ host validates the actual input Bundle and its exact type against the App's
33
+ `supportedSchemas`. An optional `supportedTypes` array must have no duplicates
34
+ and match the App declaration's entire set, not just the input type.
35
+ `deriveBundle` accepts safe relative file paths and byte-array replacements,
36
+ keeps every untouched file's exact UnixFS CID, validates the resulting Bundle,
37
+ and rejects type changes. Replacements can add files but do not delete files;
38
+ they are limited to 4096 paths and 64 MiB total per call, with normal Bundle
39
+ validation limits also applying. Bytes travel over the existing advanced IPC
40
+ serialization, not stdout or a JSON result directory.
41
+
42
+ Checkpoints are protected against GC by the execution owner until execution
43
+ ends. Each derivation stages under its own recoverable temporary import owner,
44
+ then retains/confirms the checkpoint for the execution before releasing that
45
+ temporary owner. A failed save or transient result validation/retention failure
46
+ can be retried; it never creates a successful result by itself. Submission
47
+ selects the exact existing Bundle CID, not an enclosing output directory. Only a
48
+ zero-exit, uncancelled execution commits it as the history `outputCid`. History
49
+ retention takes ownership before execution ownership is released; ordinary
50
+ explicit pins remain independent holders. With history or its retention
51
+ disabled, checkpoints/results have no implicit permanent pin after execution.
52
+
53
+ An opted-in session that exits without submission, or calls
54
+ `cancelOpenSession()`, is cancelled with no output CID. An exception, nonzero
55
+ exit or process cancellation also prevents submission from becoming a successful
56
+ result. Ordinary output Space writes cannot be mixed with explicit Bundle
57
+ results. Apps that never opt in or submit keep their existing output Space and
58
+ stdio behavior. Stdout text is never interpreted as a result CID.
59
+
60
+ Current source replaces `setup` with `ipab doctor`: read-only inspection of
61
+ state/configuration, managed Kubo, HOME identity, local Swarm registration and
62
+ compatible updates, plus the bundled IPAB Skill for detected global Agents.
63
+ `ipab doctor --fix --yes` also authorizes bundled Skill installation/updates,
64
+ without requiring a Swarm; custom edits and Swarm-managed installations are
65
+ protected. It otherwise authorizes only safe missing components and compatible
66
+ stable Kubo upgrades within `^0.43.2`. Healthy current components require
67
+ neither prompting nor download; archives are automatically verified and cached
68
+ in the protected state directory. No daemon is contacted, started or stopped,
69
+ and damaged credentials/installations are never replaced. For existing
70
+ unverified Kubo, authorized repair downloads/caches the same-version official
71
+ archive and compares bytes without executing or reinstalling the program.
72
+ Matching bytes are reused; a mismatch is an error and never overwritten.
73
+ Independent CID/local Store use still does not require Kubo.
74
+
75
+ `0.1.0-rc.9` is published, with on-demand background Swarm management and
76
+ CLI-bundled IPAB Skill bootstrap through doctor. Install this RC:
8
77
 
9
78
  ```sh
10
- npm install --global @ipab/cli@0.1.0-rc.0
79
+ npm install --global @ipab/cli@0.1.0-rc.9
11
80
  ipab --version
12
81
  ipab --help
13
82
  ```
14
83
 
15
- Node.js 22.15.0 or newer is required. Built-in Node and Web App project
16
- templates are validated CAR assets shipped in this package; initialization works
17
- offline and does not install dependencies or run hooks.
84
+ Node.js 22.20.0 or newer is required for all commands. Shipped template CARs are
85
+ creation seeds; the Skill CAR also supports doctor bootstrap: new Swarms include
86
+ typed root State configuration, all four templates and ordinary
87
+ `ipab/skills/ipab` in their first HEAD. Runtime `builtin:skill.ipab` is removed;
88
+ cached exact CIDs remain usable offline. Upgrades never overwrite existing
89
+ Swarms.
90
+
91
+ Actual Swarm network activation starts a background IPAB daemon on demand, one
92
+ per state directory, and waits for authenticated loopback readiness. Concurrent
93
+ commands reuse it; launch failures are explicit. Logs are in
94
+ `swarm-daemon/daemon.log`. No OS service or login task is registered; after a
95
+ reboot, the device stays offline until its next network operation. Help/version,
96
+ doctor, local operations and status/members inspections do not start the
97
+ manager. `ipab daemon` remains a foreground alternative when no manager already
98
+ owns the state directory.
99
+
100
+ `ipab daemon` always manages all registered Swarms (does not accept `--swarm`)
101
+ with three core responsibilities: maintaining membership and network topology,
102
+ forcibly refreshing HEAD/State/Names/name-following pins, and automatically
103
+ syncing Skills (to `universal`), Templates and Registry App Bundles into the
104
+ local Store. Sync runs on startup for each activated Swarm, then every 60
105
+ seconds after the preceding sync finishes (`swarm.syncInterval` /
106
+ `IPAB_SWARM_SYNC_INTERVAL`, 1–86400 seconds; restart daemon to apply). Syncs
107
+ never overlap within a Swarm. Local edits, unmanaged content and cross-source
108
+ collisions remain protected; failures are logged and retried next interval.
109
+ Removed Skill sources are not automatically uninstalled.
110
+
111
+ `ipab skills list` discovers the selected Swarm's exact typed Skills via root
112
+ skillPath (legacy v2/v3/v4 use Meta.skillPath) and reports shared Names, payload
113
+ CIDs and installation status. `ipab skills sync [NAMES...]` uses the pinned
114
+ official `npx skills@1.9.1` installer; NAMES accept install identities
115
+ (`ipab code-review`) or full shared Names (`ipab/skills/ipab`), resolved against
116
+ the same verified snapshot. The installer runs globally with `--copy`; repeat
117
+ `--agent AGENT`, or default to `universal` (`~/.agents/skills`). Doctor
118
+ bootstrap separately targets detected global Agents and never enables overrides.
119
+ Skills operations require Node >=22.20.0. There is one selected Swarm per
120
+ invocation and no `--all`. `--dry-run` previews source, installer version,
121
+ agents, paths and file changes without npx. Noninteractive installation needs
122
+ `--yes`, which skips IPAB consent only. Explicit `--override-existing` permits
123
+ replacement of unmanaged content and local edits at selected targets;
124
+ cross-source ownership, unselected paths, concurrent changes and
125
+ symlink/junction protections remain enforced. Removed sources are not
126
+ automatically uninstalled. Account-wide attribution and pending recovery
127
+ preserve partial successes, which are reported with nonzero status. Skill
128
+ scripts/hooks do not run; the trusted installer is not a sandbox. Its telemetry,
129
+ remote audits and npm lifecycle scripts are disabled. Shipping or installing a
130
+ Skill does not configure automatic Agent loading. Old v5 State roots without
131
+ skillPath retain their exact type/configuration on ordinary writes and require a
132
+ new seeded Swarm with explicitly republished reviewed Names before Skills
133
+ operations. A user Name ipab never overrides root configuration. Only legacy
134
+ v2/v3/v4 standalone Meta can migrate by explicit new typed Meta publication with
135
+ `--expect`; both known standalone Meta types remain readable.
18
136
 
19
137
  See the [user guide](https://github.com/silvermoon-work/ipab#readme) and
20
138
  [command reference](https://github.com/silvermoon-work/ipab/blob/main/docs/reference.md)
21
139
  for Store configuration, execution, pins, templates and App development.
22
140
 
23
- The rc.1 candidate removes the Kubo RPC backend and legacy alias state. Use the
141
+ The current CLI removes the Kubo RPC backend and legacy alias state. Use the
24
142
  Local Store and `store.gateway`; reset old `store.rpc` configuration and rebuild
25
143
  local named pins. Remote Kubo pins and retention are not automatically migrated
26
144
  or released. This is an intentional prerelease compatibility change.
145
+
146
+ The rc.2 release adds shared swarm Names, authenticated five-minute HEAD
147
+ caching, local swarm registration/selection and named search. See the
148
+ [MVP implementation](../../docs/mvp-implementation.md) for force controls and
149
+ the migration from legacy creation/membership records.
150
+
151
+ The current source implements
152
+ [Scope / Variable onboarding](../../docs/onboarding.md): signed Request files,
153
+ trusted Owner fingerprints, encrypted nonexpiring exact-ID certificates, lazy
154
+ membership activation and checksum-verified managed Kubo within `^0.43.2`. Each
155
+ Swarm uses a separate protected repo, key and ports; daemons start on demand and
156
+ survive CLI exit. No Invite/Response/Join or old Swarm CID protocol fallback
157
+ exists.
158
+
159
+ Local naming and membership requests are separate:
160
+
161
+ ```sh
162
+ ipab swarm set work CONFIG_URL
163
+ ipab swarm request work --output request.json
164
+ ```
165
+
166
+ `set ALIAS CONFIG_URL` is offline and requires no identity or membership.
167
+ Retargeting an existing alias requires confirmation or `--yes`; the previous URL
168
+ remains registered without that alias, preserving credentials, caches and the
169
+ saved default URL. Each URL keeps at most one alias. Repeating the same mapping
170
+ is idempotent; the first registration sets the default only if none exists.
171
+ `request URL_OR_ALIAS` never changes registrations or aliases and can use a full
172
+ URL without prior `set`. The old `swarm add` and `request --alias` interfaces
173
+ return migration guidance.
174
+
175
+ Shared references use `ipab://ALIAS_OR_ENCODED_CONFIG_URL/PATH`; `ipab:///PATH`
176
+ selects `--swarm` or the saved `swarm.default`, in that order. URI swarm
177
+ authorities take precedence and local aliases are case-sensitive. Search text
178
+ uses local alias URIs when available, falling back to full configuration URLs.
179
+ JSON `reference` fields always use full configuration-URL-based URIs for sharing
180
+ across devices. Legacy `name:PATH` references are no longer supported.
181
+ `IPAB_SWARM` is ignored entirely: it neither selects a Swarm nor causes an
182
+ error. Use `--swarm` or `swarm use` to select a Swarm.
183
+
184
+ `search QUERY` searches only the current Swarm by default (`--swarm`, then the
185
+ saved default); missing selection is an error. Use `search QUERY --all` to
186
+ search every registered Swarm. `--all` conflicts with `--swarm` and `--current`;
187
+ `--current` remains an explicit spelling of the default scope. Valid caches
188
+ require no network requests. Expired or forced searches read public
189
+ configuration and HEAD without member Profile reads or Kubo activation; private
190
+ networking is activated only to obtain missing State or Name pin content. Search
191
+ matches shared Names, not built-in templates or Bundle metadata.
192
+
193
+ Owner uses `swarm update` for organization information and `swarm exclude` /
194
+ `swarm resume` for irreversible, resumable member removal. Members change only
195
+ their account-wide personal name/description using `ipab profile`, independently
196
+ of Swarm selection. Updates save protected public-key-bound HOME data first,
197
+ then synchronize all registered memberships, preserving each Swarm's addresses.
198
+ Partial failures exit nonzero with per-Swarm results; retry the update or
199
+ activate the failed membership normally. Future memberships adopt the same
200
+ profile. Legacy fields are reused only when unanimous; conflicts require
201
+ explicit choices. `swarm profile --address` is network-only. `swarm members`
202
+ publicly lists all members, including Owner, with full public keys; no identity
203
+ or node is needed. Existing Swarm operations use global `--swarm URL_OR_ALIAS`
204
+ or the saved default, never target positionals. `swarm create --name` still sets
205
+ the organization name. HEAD uses content-CID CAS, not a history revision.
206
+
207
+ Current-source protocol updates keep Variable JSON bodies raw and use
208
+ content-CID ETags for CAS. Each member reuses a single account Ed25519 key for
209
+ signing, managed Kubo node identity (deterministic `PeerID`), and X25519
210
+ Approval key agreement. Config v3 supports 256 members through flattened public
211
+ member entries (`publicKey`, `role`, `profileId`, `approvalId`) and Owner-only
212
+ 2-field `{v:2,ciphertext}` dual-ECDH Approval v2 Variables (`2N + 1` live
213
+ Variables, with Owner `approvalId: null`); Request v2 is a 7-field offline-
214
+ signed JSON document (including `role: "ordinary" | "pivot"`); Pivot
215
+ certificates grant `[headId, profileId]` while Ordinary certificates grant only
216
+ `[profileId]` (requiring a Pivot/Owner `ScopeWriteReceipt` for HEAD writes).
217
+ Member-writable Profiles remain separate and readable without fetching any
218
+ Approval Variable. Existing Config v2/v1 and inline/linked State remain
219
+ readable. See [the protocol](../../docs/onboarding.md).
220
+
221
+ The current source adds a Swarm-only App registry (not included in rc.5), saving
222
+ exact type CID -> App CID + argv associations. `register list/set/remove`
223
+ without explicit `--swarm` uses the saved default Swarm; no selection is an
224
+ error with `--swarm` / `ipab swarm use` guidance. Use
225
+ `ipab register set TYPE_CID ipab:///apps/reader --swarm work --swarm team` to
226
+ register in multiple Swarms; an IPAB URI resolves independently for each target
227
+ and only the exact App CID is saved. Shared writes require HEAD write access and
228
+ commit sequentially, not atomically across Swarms. Failures identify completed
229
+ targets. Open uses only the content URI's Swarm, then explicit `--swarm`, then
230
+ the saved default; no selection is an error. Local associations and other Swarms
231
+ are never consulted; retrieval, compatibility and execution failures never
232
+ trigger fallback. `exec` remains the way to select an App directly. Existing
233
+ User registrations are preserved in-place as the inactive
234
+ `legacy_user_registrations` state-database table, never uploaded or deleted.
235
+ Register/Open warn with the archive location; review it and explicitly publish
236
+ only intended associations with `register set ... --swarm ...`.
237
+
238
+ `swarm status` reads public configuration, Scope, HEAD and verified State
239
+ content. Available content needs no HOME identity or managed node; missing
240
+ content may activate the registered Swarm's private source, with an explicit
241
+ diagnostic. Use `swarm status --local` for membership/Owner-interruption checks,
242
+ node connection, account-specific HEAD-cache updates and local PeerID/addresses.
243
+ Default JSON omits `peerId` and `addresses`; `--local` retains those fields.
@@ -1,4 +1,6 @@
1
+ import { type BundleType } from "@ipab/bundle";
1
2
  import { type AuthoringOptions, type BuildResult } from "./authoring.js";
3
+ export { appSchema } from "./app-definition.js";
2
4
  export declare function initApp(name: string, directory?: string, options?: AuthoringOptions & {
3
5
  template?: string;
4
6
  parameters?: readonly string[];
@@ -15,8 +17,21 @@ export declare function buildApp(directory?: string, options?: AuthoringOptions
15
17
  outputDir?: string;
16
18
  replace?: boolean;
17
19
  includeSource?: boolean;
20
+ /** Exact types from an author's Open App definition; exclusive with config paths. */
21
+ supportedTypes?: readonly BundleType[];
22
+ preparedDirectory?: string;
18
23
  }): Promise<Omit<BuildResult, "kind"> & {
19
24
  kind: "app-bundle";
20
25
  source?: Omit<BuildResult, "kind">;
21
26
  }>;
27
+ /** Explicit project tool. The root CLI build never calls this helper. */
28
+ export declare function prepareApp(directory?: string, options?: AuthoringOptions & {
29
+ replace?: boolean;
30
+ includeSource?: boolean;
31
+ /** Exact types from an author's Open App definition; exclusive with config paths. */
32
+ supportedTypes?: readonly BundleType[];
33
+ }): Promise<{
34
+ source?: Omit<BuildResult, "kind">;
35
+ directory: string;
36
+ }>;
22
37
  //# sourceMappingURL=app-authoring.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"app-authoring.d.ts","sourceRoot":"","sources":["../src/app-authoring.ts"],"names":[],"mappings":"AAUA,OAAO,EAKL,KAAK,gBAAgB,EACrB,KAAK,WAAW,EACjB,MAAM,gBAAgB,CAAC;AAkBxB,wBAAsB,OAAO,CAC3B,IAAI,EAAE,MAAM,EACZ,SAAS,SAAO,EAChB,OAAO,GAAE,gBAAgB,GAAG;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAC3B;;;;;;;GAgBP;AA6HD,wBAAsB,QAAQ,CAC5B,SAAS,SAAM,EACf,OAAO,GAAE,gBAAgB,GAAG;IAC1B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,aAAa,CAAC,EAAE,OAAO,CAAC;CACpB,GACL,OAAO,CACR,IAAI,CAAC,WAAW,EAAE,MAAM,CAAC,GAAG;IAC1B,IAAI,EAAE,YAAY,CAAC;IACnB,MAAM,CAAC,EAAE,IAAI,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;CACpC,CACF,CAoaA"}
1
+ {"version":3,"file":"app-authoring.d.ts","sourceRoot":"","sources":["../src/app-authoring.ts"],"names":[],"mappings":"AAaA,OAAO,EAAa,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAG1D,OAAO,EAML,KAAK,gBAAgB,EACrB,KAAK,WAAW,EACjB,MAAM,gBAAgB,CAAC;AAoBxB,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAMhD,wBAAsB,OAAO,CAC3B,IAAI,EAAE,MAAM,EACZ,SAAS,SAAO,EAChB,OAAO,GAAE,gBAAgB,GAAG;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAC3B;;;;;;;GAgBP;AA6HD,wBAAsB,QAAQ,CAC5B,SAAS,SAAM,EACf,OAAO,GAAE,gBAAgB,GAAG;IAC1B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,qFAAqF;IACrF,cAAc,CAAC,EAAE,SAAS,UAAU,EAAE,CAAC;IACvC,iBAAiB,CAAC,EAAE,MAAM,CAAC;CACvB,GACL,OAAO,CACR,IAAI,CAAC,WAAW,EAAE,MAAM,CAAC,GAAG;IAC1B,IAAI,EAAE,YAAY,CAAC;IACnB,MAAM,CAAC,EAAE,IAAI,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;CACpC,CACF,CAieA;AAED,yEAAyE;AACzE,wBAAsB,UAAU,CAC9B,SAAS,SAAM,EACf,OAAO,GAAE,gBAAgB,GAAG;IAC1B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,qFAAqF;IACrF,cAAc,CAAC,EAAE,SAAS,UAAU,EAAE,CAAC;CACnC;;;GA2EP"}
@@ -1,22 +1,23 @@
1
1
  import { spawn } from "node:child_process";
2
2
  import { lstat, mkdir, mkdtemp, rm, writeFile } from "node:fs/promises";
3
- import { isBuiltin } from "node:module";
4
- import { dirname, isAbsolute, join, relative, resolve, sep } from "node:path";
3
+ import { basename, dirname, isAbsolute, join, relative, resolve, sep, } from "node:path";
5
4
  import { StringDecoder } from "node:string_decoder";
6
- import { compileFunction } from "node:vm";
7
5
  import { stringify } from "yaml";
8
6
  import { parseData } from "@ipab/bundle";
9
7
  import { filesystemTree } from "@ipab/bundle-builder/node";
10
8
  import { encodeBundleCar, memoryTree, readBytes } from "@ipab/bundle-builder";
11
- import { writeCar, outputAvailable, scaffoldFiles, nodeError, } from "./authoring.js";
9
+ import { writeCar, outputAvailable, readCar, scaffoldFiles, nodeError, } from "./authoring.js";
12
10
  import { HostError, object } from "./errors.js";
13
11
  import { relativePath } from "./space.js";
14
12
  import { buildSupportedSchemas, supportedSchemasPath, } from "./supported-schemas.js";
15
13
  import { appDescription, appSchema, builtinAppSchema, } from "./app-definition.js";
16
14
  import { appTemplate } from "./app-templates.js";
17
- import { buildChain, projectBuild, runPrebuild } from "./app-prebuild.js";
15
+ import { buildChain, compileAppProgram, projectBuild, runPrebuild, } from "./app-prebuild.js";
18
16
  import { captureSource, sourceFingerprint } from "./source-bundle.js";
17
+ export { appSchema } from "./app-definition.js";
19
18
  const json = (value) => `${JSON.stringify(value, null, 2)}\n`;
19
+ const sourceTarget = "source";
20
+ const sourceCarInput = "source.car";
20
21
  export async function initApp(name, directory = name, options = {}) {
21
22
  const { files, cid: templateCid } = await appTemplate(options.template ?? "node", name, options);
22
23
  const root = await scaffoldFiles(directory, files, options);
@@ -217,7 +218,10 @@ export async function buildApp(directory = ".", options = {}) {
217
218
  throw new HostError("App metadata cannot override the generated supportedSchemas declaration.");
218
219
  if (Object.hasOwn(overrides, "source"))
219
220
  throw new HostError("App metadata cannot override the generated source declaration.");
220
- const supportedSchemas = await buildSupportedSchemas(tree, schemas, options);
221
+ if (options.supportedTypes && schemas.size)
222
+ throw new HostError("Use either supportedTypes or supportedSchemas paths, not both.");
223
+ const declared = options.supportedTypes?.map((type, index) => [`schemas/${index}.json`, new TextEncoder().encode(json(type))]);
224
+ const supportedSchemas = await buildSupportedSchemas(declared ? memoryTree(new Map(declared)) : tree, declared ? new Set(declared.map(([path]) => path)) : schemas, options);
221
225
  const description = appDescription({
222
226
  ...defaults,
223
227
  ...overrides,
@@ -291,7 +295,6 @@ export async function buildApp(directory = ".", options = {}) {
291
295
  options.signal?.throwIfAborted();
292
296
  const stage = await mkdtemp(join(root, ".ipab-app-"));
293
297
  try {
294
- const { build } = await import("esbuild");
295
298
  const bundleStage = join(stage, "bundle");
296
299
  const input = prebuild ? join(stage, "input") : root;
297
300
  if (prebuild) {
@@ -302,47 +305,8 @@ export async function buildApp(directory = ".", options = {}) {
302
305
  const prebuiltSource = prebuild
303
306
  ? await readBytes(inputTree, entry, 8 * 1024 * 1024, options)
304
307
  : undefined;
305
- if (prebuiltSource) {
306
- try {
307
- const source = new TextDecoder("utf-8", { fatal: true }).decode(prebuiltSource);
308
- compileFunction(source.replace(/^#![^\r\n]*/, ""), [
309
- "exports",
310
- "require",
311
- "module",
312
- "__filename",
313
- "__dirname",
314
- ]);
315
- }
316
- catch (cause) {
317
- const error = new HostError("Prebuilt App entry must be valid Node CommonJS; it is packaged without transformation.");
318
- error.cause = cause;
319
- throw error;
320
- }
321
- }
322
308
  await mkdir(join(bundleStage, "resources"), { recursive: true });
323
- const program = await build({
324
- absWorkingDir: input,
325
- entryPoints: [entry],
326
- outfile: join(bundleStage, "resources", "app.cjs"),
327
- bundle: true,
328
- platform: "node",
329
- format: "cjs",
330
- target: "node22.15",
331
- packages: prebuild ? "external" : "bundle",
332
- metafile: true,
333
- write: false,
334
- logLevel: "silent",
335
- logOverride: {
336
- "unsupported-dynamic-import": "error",
337
- "unsupported-require-call": "error",
338
- "indirect-require": "error",
339
- },
340
- });
341
- if (program.outputFiles.length !== 1 ||
342
- program.outputFiles[0].contents.length > 8 * 1024 * 1024 ||
343
- (prebuild && Object.keys(program.metafile.inputs).length !== 1) ||
344
- Object.values(program.metafile.outputs).some((file) => file.imports.some((item) => item.external && !isBuiltin(item.path))))
345
- throw new HostError("App must bundle into one self-contained .cjs of at most 8 MiB; only Node builtins may remain external.");
309
+ const program = await compileAppProgram(input, entry, join(bundleStage, "resources", "app.cjs"), prebuiltSource);
346
310
  if (sourceFiles && !prebuild)
347
311
  for (const path of Object.keys(program.metafile.inputs))
348
312
  if (!path.split(/[\\/]/).includes("node_modules") &&
@@ -354,7 +318,16 @@ export async function buildApp(directory = ".", options = {}) {
354
318
  flag: "wx",
355
319
  signal: options.signal,
356
320
  });
357
- await writeFile(join(bundleStage, ".bundle.yaml"), stringify(appSchema), {
321
+ await writeFile(join(bundleStage, ".bundle.yaml"), stringify({
322
+ title: description.name,
323
+ description: description.description,
324
+ entry: "app.json",
325
+ type: ".bundle-type.yaml",
326
+ }), {
327
+ flag: "wx",
328
+ signal: options.signal,
329
+ });
330
+ await writeFile(join(bundleStage, ".bundle-type.yaml"), stringify(appSchema), {
358
331
  flag: "wx",
359
332
  signal: options.signal,
360
333
  });
@@ -368,7 +341,7 @@ export async function buildApp(directory = ".", options = {}) {
368
341
  if (path
369
342
  .split("/")
370
343
  .some((part, index, parts) => part.startsWith(".") &&
371
- !(part === ".bundle.yaml" &&
344
+ !([".bundle.yaml", ".bundle-type.yaml"].includes(part) &&
372
345
  index === parts.length - 1 &&
373
346
  index > 0)))
374
347
  throw new HostError("Hidden prebuilt resources are not supported.");
@@ -414,16 +387,70 @@ export async function buildApp(directory = ".", options = {}) {
414
387
  ? { source: { cid: encodedSource.cid.toString() } }
415
388
  : {}),
416
389
  }), { flag: "wx", signal: options.signal });
417
- const encoded = await encodeBundleCar(await filesystemTree(bundleStage), options);
390
+ const source = encodedSource
391
+ ? {
392
+ cid: encodedSource.cid.toString(),
393
+ schemaCid: encodedSource.schema.cid.toString(),
394
+ output: sourceOutput,
395
+ bytes: await writeCar(encodedSource, sourceOutput, Boolean(options.replace), options),
396
+ }
397
+ : undefined;
398
+ const sourceCar = source
399
+ ? await readCar(source.output, options)
400
+ : undefined;
401
+ const encoded = await encodeBundleCar(await filesystemTree(bundleStage), {
402
+ ...options,
403
+ imports: encodedSource && sourceCar
404
+ ? [
405
+ {
406
+ path: sourceTarget,
407
+ cid: encodedSource.cid,
408
+ resolveCid: sourceCar.resolveCid,
409
+ },
410
+ ]
411
+ : [],
412
+ });
418
413
  try {
419
- const source = encodedSource
420
- ? {
421
- cid: encodedSource.cid.toString(),
422
- schemaCid: encodedSource.schema.cid.toString(),
423
- output: sourceOutput,
424
- bytes: await writeCar(encodedSource, sourceOutput, Boolean(options.replace), options),
425
- }
426
- : undefined;
414
+ if (options.preparedDirectory) {
415
+ const preparedFiles = new Map();
416
+ const preparedTree = await filesystemTree(bundleStage);
417
+ const collect = async (path) => {
418
+ for (const item of await preparedTree.list(path, options)) {
419
+ const child = path ? `${path}/${item.name}` : item.name;
420
+ if (item.kind === "directory")
421
+ await collect(child);
422
+ else
423
+ preparedFiles.set(child, await readBytes(preparedTree, child, 16 * 1024 * 1024, options));
424
+ }
425
+ };
426
+ await collect("");
427
+ preparedFiles.set("ipab.build.yaml", new TextEncoder().encode(stringify({
428
+ version: 1,
429
+ files: [...preparedFiles.keys()]
430
+ .filter((path) => path !== ".bundle.yaml")
431
+ .map((path) => ({ source: path, target: path })),
432
+ imports: source
433
+ ? [
434
+ {
435
+ cid: source.cid,
436
+ target: sourceTarget,
437
+ car: sourceCarInput,
438
+ },
439
+ ]
440
+ : [],
441
+ })));
442
+ if (source)
443
+ preparedFiles.set(sourceCarInput, await readBytes(await filesystemTree(dirname(source.output)), basename(source.output), source.bytes, options));
444
+ await scaffoldFiles(options.preparedDirectory, preparedFiles, options);
445
+ return {
446
+ kind: "app-bundle",
447
+ cid: encoded.cid.toString(),
448
+ schemaCid: encoded.schema.cid.toString(),
449
+ output,
450
+ bytes: 0,
451
+ ...(source ? { source } : {}),
452
+ };
453
+ }
427
454
  return {
428
455
  kind: "app-bundle",
429
456
  cid: encoded.cid.toString(),
@@ -445,4 +472,63 @@ export async function buildApp(directory = ".", options = {}) {
445
472
  await rm(stage, { recursive: true, force: true });
446
473
  }
447
474
  }
475
+ /** Explicit project tool. The root CLI build never calls this helper. */
476
+ export async function prepareApp(directory = ".", options = {}) {
477
+ const root = resolve(directory);
478
+ const prepared = join(root, "dist", "prepared-app");
479
+ try {
480
+ const stat = await lstat(prepared);
481
+ if (stat.isSymbolicLink() || !stat.isDirectory() || !options.replace)
482
+ throw new HostError("Prepared output exists; explicit replacement requires a regular generated directory.");
483
+ const tree = await filesystemTree(prepared);
484
+ const recipe = object(parseData(await readBytes(tree, "ipab.build.yaml", 64 * 1024), "application/yaml"), "prepared recipe");
485
+ if (recipe.version !== 1 ||
486
+ !Array.isArray(recipe.files) ||
487
+ !Array.isArray(recipe.imports) ||
488
+ recipe.imports.length > 1)
489
+ throw new HostError("Existing prepared output is not owned by the App preparation tool.");
490
+ const allowed = new Set([
491
+ ".bundle.yaml",
492
+ "ipab.build.yaml",
493
+ ...recipe.files.map((item) => {
494
+ const mapping = object(item, "prepared mapping");
495
+ if (typeof mapping.source !== "string" ||
496
+ mapping.source !== mapping.target)
497
+ throw new HostError("Existing prepared mapping is not generated.");
498
+ return relativePath(mapping.source);
499
+ }),
500
+ ]);
501
+ if (recipe.imports.length) {
502
+ const sourceImport = object(recipe.imports[0], "prepared source import");
503
+ if (sourceImport.target !== sourceTarget ||
504
+ sourceImport.car !== sourceCarInput ||
505
+ typeof sourceImport.cid !== "string")
506
+ throw new HostError("Existing prepared source import is not generated.");
507
+ allowed.add(sourceCarInput);
508
+ }
509
+ const verify = async (path) => {
510
+ for (const item of await tree.list(path)) {
511
+ const child = path ? `${path}/${item.name}` : item.name;
512
+ if (item.kind === "directory")
513
+ await verify(child);
514
+ else if (!allowed.has(child))
515
+ throw new HostError("Prepared output contains custom files; choose a new output rather than deleting them.");
516
+ }
517
+ };
518
+ await verify("");
519
+ await rm(prepared, { recursive: true });
520
+ }
521
+ catch (cause) {
522
+ if (!nodeError(cause, "ENOENT"))
523
+ throw cause;
524
+ }
525
+ const result = await buildApp(root, {
526
+ ...options,
527
+ preparedDirectory: prepared,
528
+ });
529
+ return {
530
+ directory: prepared,
531
+ ...(result.source ? { source: result.source } : {}),
532
+ };
533
+ }
448
534
  //# sourceMappingURL=app-authoring.js.map