@runeditrun/rer 0.2.83 → 0.2.85

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 (269) hide show
  1. package/README.md +21 -24
  2. package/cli/README.md +17 -1
  3. package/cli/authoring.mjs +1 -0
  4. package/cli/bounded.mjs +1 -1
  5. package/cli/business/carry.mjs +149 -0
  6. package/cli/business/command.mjs +6 -1
  7. package/cli/business/connect.mjs +1 -1
  8. package/cli/business/local-commands.mjs +2 -0
  9. package/cli/business/opt-ins.mjs +8 -4
  10. package/cli/business/questions.mjs +4 -1
  11. package/cli/business/state.mjs +1 -1
  12. package/cli/business/supervisor.mjs +7 -1
  13. package/cli/container-transfer.mjs +2 -2
  14. package/cli/contract.mjs +7 -7
  15. package/cli/demo-host.mjs +5 -1
  16. package/cli/demo-native.mjs +2 -1
  17. package/cli/demo.mjs +6 -1
  18. package/cli/deploy-command.mjs +6 -4
  19. package/cli/deploy.mjs +9 -7
  20. package/cli/errors.mjs +1 -1
  21. package/cli/export.mjs +1 -1
  22. package/cli/human-error.mjs +20 -0
  23. package/cli/lifecycle.mjs +23 -5
  24. package/cli/main.mjs +1 -1
  25. package/cli/managed-data-schema.mjs +114 -0
  26. package/cli/managed-data-zip.mjs +116 -0
  27. package/cli/managed-data.mjs +110 -0
  28. package/cli/managed-server.mjs +25 -14
  29. package/cli/native-owner-entry.mjs +86 -0
  30. package/cli/output.mjs +3 -2
  31. package/cli/parse.mjs +3 -3
  32. package/cli/portability-empty.mjs +59 -0
  33. package/cli/portability-migrations.mjs +7 -5
  34. package/cli/portability-policy.mjs +5 -2
  35. package/cli/portability-worker.mjs +15 -6
  36. package/cli/portability.mjs +30 -8
  37. package/cli/ready-summary.mjs +9 -0
  38. package/cli/run-transfers.mjs +37 -0
  39. package/cli/runtime-front-door.mjs +4 -4
  40. package/cli/server-proxy.mjs +4 -3
  41. package/cli/server-registry.mjs +13 -8
  42. package/cli/site.mjs +6 -1
  43. package/cli/transfers.mjs +17 -4
  44. package/edition-authoring/base-copies.mjs +125 -30
  45. package/edition-authoring/copy-checkout.mjs +7 -120
  46. package/edition-authoring/edition-migrations.mjs +41 -0
  47. package/edition-authoring/files.mjs +67 -0
  48. package/edition-authoring/lock.mjs +2 -2
  49. package/edition-authoring/module-closure.mjs +232 -0
  50. package/edition-authoring/module-edges.mjs +100 -0
  51. package/edition-authoring/module-resolution.mjs +66 -0
  52. package/edition-authoring/module-syntax.mjs +57 -0
  53. package/edition-authoring/package-target.mjs +92 -0
  54. package/edition-authoring/runtime-dependencies.mjs +74 -97
  55. package/edition-authoring/vendor/babel-parser/LICENSE +22 -0
  56. package/edition-authoring/vendor/babel-parser/README.md +21 -0
  57. package/edition-authoring/vendor/babel-parser/babel-helper-string-parser/index.mjs +292 -0
  58. package/edition-authoring/vendor/babel-parser/babel-helper-validator-identifier/identifier.mjs +66 -0
  59. package/edition-authoring/vendor/babel-parser/babel-helper-validator-identifier/index.mjs +13 -0
  60. package/edition-authoring/vendor/babel-parser/babel-helper-validator-identifier/keyword.mjs +31 -0
  61. package/edition-authoring/vendor/babel-parser/babel-parser/index.mjs +99 -0
  62. package/edition-authoring/vendor/babel-parser/babel-parser/options.mjs +81 -0
  63. package/edition-authoring/vendor/babel-parser/babel-parser/parse-error/bind-operator-errors.mjs +8 -0
  64. package/edition-authoring/vendor/babel-parser/babel-parser/parse-error/module-errors.mjs +15 -0
  65. package/edition-authoring/vendor/babel-parser/babel-parser/parse-error/parse-expression-errors.mjs +10 -0
  66. package/edition-authoring/vendor/babel-parser/babel-parser/parse-error/pipeline-operator-errors.mjs +29 -0
  67. package/edition-authoring/vendor/babel-parser/babel-parser/parse-error/standard-errors.mjs +224 -0
  68. package/edition-authoring/vendor/babel-parser/babel-parser/parse-error/strict-mode-errors.mjs +17 -0
  69. package/edition-authoring/vendor/babel-parser/babel-parser/parse-error/to-node-description.mjs +31 -0
  70. package/edition-authoring/vendor/babel-parser/babel-parser/parse-error.mjs +114 -0
  71. package/edition-authoring/vendor/babel-parser/babel-parser/parser/base.mjs +34 -0
  72. package/edition-authoring/vendor/babel-parser/babel-parser/parser/comments.mjs +199 -0
  73. package/edition-authoring/vendor/babel-parser/babel-parser/parser/expression.mjs +1794 -0
  74. package/edition-authoring/vendor/babel-parser/babel-parser/parser/index.mjs +76 -0
  75. package/edition-authoring/vendor/babel-parser/babel-parser/parser/lval.mjs +439 -0
  76. package/edition-authoring/vendor/babel-parser/babel-parser/parser/node.mjs +111 -0
  77. package/edition-authoring/vendor/babel-parser/babel-parser/parser/statement.mjs +1962 -0
  78. package/edition-authoring/vendor/babel-parser/babel-parser/parser/util.mjs +244 -0
  79. package/edition-authoring/vendor/babel-parser/babel-parser/plugin-utils.mjs +116 -0
  80. package/edition-authoring/vendor/babel-parser/babel-parser/plugins/estree.mjs +417 -0
  81. package/edition-authoring/vendor/babel-parser/babel-parser/plugins/flow/index.mjs +2412 -0
  82. package/edition-authoring/vendor/babel-parser/babel-parser/plugins/flow/scope.mjs +37 -0
  83. package/edition-authoring/vendor/babel-parser/babel-parser/plugins/jsx/index.mjs +420 -0
  84. package/edition-authoring/vendor/babel-parser/babel-parser/plugins/jsx/xhtml.mjs +261 -0
  85. package/edition-authoring/vendor/babel-parser/babel-parser/plugins/placeholders.mjs +205 -0
  86. package/edition-authoring/vendor/babel-parser/babel-parser/plugins/typescript/index.mjs +2889 -0
  87. package/edition-authoring/vendor/babel-parser/babel-parser/plugins/typescript/scope.mjs +115 -0
  88. package/edition-authoring/vendor/babel-parser/babel-parser/plugins/v8intrinsic.mjs +26 -0
  89. package/edition-authoring/vendor/babel-parser/babel-parser/tokenizer/context.mjs +22 -0
  90. package/edition-authoring/vendor/babel-parser/babel-parser/tokenizer/index.mjs +1037 -0
  91. package/edition-authoring/vendor/babel-parser/babel-parser/tokenizer/state.mjs +178 -0
  92. package/edition-authoring/vendor/babel-parser/babel-parser/tokenizer/types.mjs +583 -0
  93. package/edition-authoring/vendor/babel-parser/babel-parser/types.mjs +1 -0
  94. package/edition-authoring/vendor/babel-parser/babel-parser/util/class-scope.mjs +82 -0
  95. package/edition-authoring/vendor/babel-parser/babel-parser/util/expression-scope.mjs +121 -0
  96. package/edition-authoring/vendor/babel-parser/babel-parser/util/identifier.mjs +23 -0
  97. package/edition-authoring/vendor/babel-parser/babel-parser/util/location.mjs +34 -0
  98. package/edition-authoring/vendor/babel-parser/babel-parser/util/production-parameter.mjs +40 -0
  99. package/edition-authoring/vendor/babel-parser/babel-parser/util/scope.mjs +173 -0
  100. package/edition-authoring/vendor/babel-parser/babel-parser/util/scopeflags.mjs +66 -0
  101. package/edition-authoring/vendor/babel-parser/babel-parser/util/whitespace.mjs +61 -0
  102. package/edition-authoring/vendor/yaml/LICENSE +13 -0
  103. package/edition-authoring/vendor/yaml/README.md +11 -0
  104. package/edition-authoring/vendor/yaml/compose/compose-collection.mjs +88 -0
  105. package/edition-authoring/vendor/yaml/compose/compose-doc.mjs +43 -0
  106. package/edition-authoring/vendor/yaml/compose/compose-node.mjs +110 -0
  107. package/edition-authoring/vendor/yaml/compose/compose-scalar.mjs +86 -0
  108. package/edition-authoring/vendor/yaml/compose/composer.mjs +218 -0
  109. package/edition-authoring/vendor/yaml/compose/resolve-block-map.mjs +115 -0
  110. package/edition-authoring/vendor/yaml/compose/resolve-block-scalar.mjs +198 -0
  111. package/edition-authoring/vendor/yaml/compose/resolve-block-seq.mjs +49 -0
  112. package/edition-authoring/vendor/yaml/compose/resolve-end.mjs +37 -0
  113. package/edition-authoring/vendor/yaml/compose/resolve-flow-collection.mjs +207 -0
  114. package/edition-authoring/vendor/yaml/compose/resolve-flow-scalar.mjs +228 -0
  115. package/edition-authoring/vendor/yaml/compose/resolve-props.mjs +148 -0
  116. package/edition-authoring/vendor/yaml/compose/util-contains-newline.mjs +34 -0
  117. package/edition-authoring/vendor/yaml/compose/util-empty-scalar-position.mjs +27 -0
  118. package/edition-authoring/vendor/yaml/compose/util-flow-indent-check.mjs +15 -0
  119. package/edition-authoring/vendor/yaml/compose/util-map-includes.mjs +13 -0
  120. package/edition-authoring/vendor/yaml/doc/Document.mjs +333 -0
  121. package/edition-authoring/vendor/yaml/doc/anchors.mjs +74 -0
  122. package/edition-authoring/vendor/yaml/doc/applyReviver.mjs +54 -0
  123. package/edition-authoring/vendor/yaml/doc/createNode.mjs +88 -0
  124. package/edition-authoring/vendor/yaml/doc/directives.mjs +176 -0
  125. package/edition-authoring/vendor/yaml/errors.mjs +57 -0
  126. package/edition-authoring/vendor/yaml/index.mjs +17 -0
  127. package/edition-authoring/vendor/yaml/log.mjs +11 -0
  128. package/edition-authoring/vendor/yaml/nodes/Alias.mjs +119 -0
  129. package/edition-authoring/vendor/yaml/nodes/Collection.mjs +147 -0
  130. package/edition-authoring/vendor/yaml/nodes/Node.mjs +38 -0
  131. package/edition-authoring/vendor/yaml/nodes/Pair.mjs +36 -0
  132. package/edition-authoring/vendor/yaml/nodes/Scalar.mjs +24 -0
  133. package/edition-authoring/vendor/yaml/nodes/YAMLMap.mjs +144 -0
  134. package/edition-authoring/vendor/yaml/nodes/YAMLSeq.mjs +113 -0
  135. package/edition-authoring/vendor/yaml/nodes/addPairToJSMap.mjs +62 -0
  136. package/edition-authoring/vendor/yaml/nodes/identity.mjs +36 -0
  137. package/edition-authoring/vendor/yaml/nodes/toJS.mjs +35 -0
  138. package/edition-authoring/vendor/yaml/parse/cst-scalar.mjs +214 -0
  139. package/edition-authoring/vendor/yaml/parse/cst-stringify.mjs +61 -0
  140. package/edition-authoring/vendor/yaml/parse/cst-visit.mjs +97 -0
  141. package/edition-authoring/vendor/yaml/parse/cst.mjs +98 -0
  142. package/edition-authoring/vendor/yaml/parse/lexer.mjs +722 -0
  143. package/edition-authoring/vendor/yaml/parse/line-counter.mjs +39 -0
  144. package/edition-authoring/vendor/yaml/parse/parser.mjs +975 -0
  145. package/edition-authoring/vendor/yaml/public-api.mjs +102 -0
  146. package/edition-authoring/vendor/yaml/schema/Schema.mjs +37 -0
  147. package/edition-authoring/vendor/yaml/schema/common/map.mjs +17 -0
  148. package/edition-authoring/vendor/yaml/schema/common/null.mjs +15 -0
  149. package/edition-authoring/vendor/yaml/schema/common/seq.mjs +17 -0
  150. package/edition-authoring/vendor/yaml/schema/common/string.mjs +14 -0
  151. package/edition-authoring/vendor/yaml/schema/core/bool.mjs +19 -0
  152. package/edition-authoring/vendor/yaml/schema/core/float.mjs +43 -0
  153. package/edition-authoring/vendor/yaml/schema/core/int.mjs +38 -0
  154. package/edition-authoring/vendor/yaml/schema/core/schema.mjs +23 -0
  155. package/edition-authoring/vendor/yaml/schema/json/schema.mjs +62 -0
  156. package/edition-authoring/vendor/yaml/schema/tags.mjs +96 -0
  157. package/edition-authoring/vendor/yaml/schema/yaml-1.1/binary.mjs +59 -0
  158. package/edition-authoring/vendor/yaml/schema/yaml-1.1/bool.mjs +26 -0
  159. package/edition-authoring/vendor/yaml/schema/yaml-1.1/float.mjs +46 -0
  160. package/edition-authoring/vendor/yaml/schema/yaml-1.1/int.mjs +71 -0
  161. package/edition-authoring/vendor/yaml/schema/yaml-1.1/merge.mjs +67 -0
  162. package/edition-authoring/vendor/yaml/schema/yaml-1.1/omap.mjs +74 -0
  163. package/edition-authoring/vendor/yaml/schema/yaml-1.1/pairs.mjs +78 -0
  164. package/edition-authoring/vendor/yaml/schema/yaml-1.1/schema.mjs +39 -0
  165. package/edition-authoring/vendor/yaml/schema/yaml-1.1/set.mjs +93 -0
  166. package/edition-authoring/vendor/yaml/schema/yaml-1.1/timestamp.mjs +101 -0
  167. package/edition-authoring/vendor/yaml/stringify/foldFlowLines.mjs +146 -0
  168. package/edition-authoring/vendor/yaml/stringify/stringify.mjs +130 -0
  169. package/edition-authoring/vendor/yaml/stringify/stringifyCollection.mjs +155 -0
  170. package/edition-authoring/vendor/yaml/stringify/stringifyComment.mjs +20 -0
  171. package/edition-authoring/vendor/yaml/stringify/stringifyDocument.mjs +85 -0
  172. package/edition-authoring/vendor/yaml/stringify/stringifyNumber.mjs +25 -0
  173. package/edition-authoring/vendor/yaml/stringify/stringifyPair.mjs +150 -0
  174. package/edition-authoring/vendor/yaml/stringify/stringifyString.mjs +338 -0
  175. package/edition-authoring/vendor/yaml/util.mjs +11 -0
  176. package/edition-authoring/vendor/yaml/visit.mjs +233 -0
  177. package/edition-authoring/workflow-copies.mjs +125 -0
  178. package/edition-authoring/workflow-scripts.mjs +112 -0
  179. package/foundation/runtime/contract-docs.mjs +754 -0
  180. package/foundation/runtime/run-data.d.mts +1 -0
  181. package/foundation/runtime/run-data.mjs +2 -0
  182. package/global/CHANGELOG.md +55 -3
  183. package/global/README.md +21 -24
  184. package/global/cli/command.mjs +8 -2
  185. package/global/cli/install.mjs +4 -5
  186. package/global/cli/path-link.mjs +3 -2
  187. package/global/cli/repo-command.mjs +3 -7
  188. package/global/launch/dev.mjs +12 -2
  189. package/global/launch/facts.mjs +2 -2
  190. package/global/launch/render.mjs +16 -9
  191. package/global/launch/state.mjs +4 -4
  192. package/global/main.mjs +12 -7
  193. package/install.sh +17 -6
  194. package/modules/container/README.md +6 -1
  195. package/modules/container/adapters/d1-limits.mjs +286 -0
  196. package/modules/container/adapters/d1-sqlite.mjs +95 -0
  197. package/modules/container/adapters/d1-workerd-preload.mjs +19 -0
  198. package/modules/container/adapters/d1-workerd-setup.mjs +26 -0
  199. package/modules/container/adapters/d1-workerd.mjs +5 -0
  200. package/modules/container/adapters/sqlite-worker.mjs +5 -3
  201. package/modules/container/build.mjs +1 -0
  202. package/modules/container/image-variables.mjs +8 -3
  203. package/modules/container/transfer.mjs +14 -4
  204. package/modules/container/worker-engine.mjs +3 -3
  205. package/modules/demo/declaration.mjs +1 -4
  206. package/modules/demo/vite.mjs +1 -1
  207. package/modules/demo-host/build.mjs +1 -0
  208. package/modules/demo-host/native/prepare.mjs +2 -1
  209. package/modules/demo-host/native/sql.mjs +7 -2
  210. package/modules/deploy-kit/README.md +23 -3
  211. package/modules/deploy-kit/d1-import-diagnostics.mjs +56 -0
  212. package/modules/deploy-kit/d1-import.mjs +17 -5
  213. package/modules/deploy-kit/diagnostics.mjs +29 -3
  214. package/modules/deploy-kit/owner-cli.mjs +20 -7
  215. package/modules/deploy-kit/provider-transport.mjs +19 -4
  216. package/modules/deploy-kit/provider.mjs +57 -22
  217. package/modules/deploy-kit/readiness-window.mjs +1 -1
  218. package/modules/deploy-kit/site.mjs +8 -3
  219. package/modules/deploy-kit/templates.mjs +3 -3
  220. package/modules/deploy-kit/worker.mjs +4 -4
  221. package/modules/import-kit/src/d1/README.md +23 -4
  222. package/modules/import-kit/src/d1/atomic-prefix.ts +2 -2
  223. package/modules/import-kit/src/d1/budget.ts +15 -7
  224. package/modules/import-kit/src/d1/column-layout.ts +5 -0
  225. package/modules/import-kit/src/d1/creation.ts +15 -8
  226. package/modules/import-kit/src/d1/database.ts +3 -3
  227. package/modules/import-kit/src/d1/erasure-pages.ts +2 -1
  228. package/modules/import-kit/src/d1/erasure.ts +2 -2
  229. package/modules/import-kit/src/d1/jobs.ts +10 -6
  230. package/modules/import-kit/src/d1/plans.ts +14 -8
  231. package/modules/import-kit/src/d1/retirement.ts +2 -2
  232. package/modules/import-kit/src/d1/sets.ts +1 -3
  233. package/modules/import-kit/src/d1/staged-creation.ts +3 -3
  234. package/modules/import-kit/src/door/limits.ts +1 -1
  235. package/modules/import-kit/src/door/refusals.ts +1 -1
  236. package/modules/portability/README.md +112 -4
  237. package/modules/portability/backfills.mjs +9 -8
  238. package/modules/portability/bridge.mjs +12 -5
  239. package/modules/portability/catalogue.mjs +12 -5
  240. package/modules/portability/files.mjs +4 -3
  241. package/modules/portability/http.mjs +3 -3
  242. package/modules/portability/import.mjs +18 -9
  243. package/modules/portability/index.d.mts +4 -3
  244. package/modules/portability/index.mjs +1 -1
  245. package/modules/portability/ledgers.mjs +3 -2
  246. package/modules/portability/legacy-safety.mjs +11 -2
  247. package/modules/portability/migration-history.mjs +2 -2
  248. package/modules/portability/progress.mjs +1 -0
  249. package/modules/portability/restore-empty.mjs +12 -0
  250. package/modules/release/github-verify.mjs +11 -2
  251. package/onboarding/adapter.mjs +35 -6
  252. package/onboarding/app-fetch.mjs +6 -4
  253. package/onboarding/development-runtime.mjs +19 -0
  254. package/onboarding/local/operation.mjs +45 -27
  255. package/onboarding/loopback-fetch.mjs +16 -0
  256. package/onboarding/operator-installer.mjs +4 -6
  257. package/onboarding/process-diagnostics.mjs +6 -2
  258. package/onboarding/production-runtime.mjs +4 -2
  259. package/onboarding/readiness.mjs +1 -0
  260. package/package.json +1 -1
  261. package/scripts/publish-check/README.md +6 -0
  262. package/scripts/publish-check/history_scan.py +5 -3
  263. package/scripts/publish-check/hygiene_config.py +2 -1
  264. package/scripts/publish-check/public_hygiene.py +1 -1
  265. package/scripts/publish-check/report.py +9 -3
  266. package/scripts/publish-check/third-party-notices.json +13 -0
  267. package/scripts/publish-check/third_party_notices.py +38 -0
  268. package/scripts/publish-check/tree_scan.py +6 -0
  269. package/scripts/publish-check.mjs +1 -1
@@ -0,0 +1 @@
1
+ export const coldRunBudget: string;
@@ -0,0 +1,2 @@
1
+ // One budget for public local-run instructions; estimates vary by app and cache.
2
+ export const coldRunBudget = 'Allow roughly 500 MB–1 GB of downloads and 1–3 GB of disk space for a first run, including Node, rer, the app and its dependencies. The app and your computer can need more; later runs reuse downloads.';
@@ -1,5 +1,57 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.2.85
4
+
5
+ - Two starters could both take over a stale local operation lock and both act as its owner. Takeover is now exclusive: the lock's inode stays pinned through takeover, and release checks the owner token.
6
+ - A local app listening on a different port than the CLI assigned left `rer dev`, `rer preview` and test runs waiting about 15 minutes. Shared local runtimes now bind before reporting their port, a mismatched listener fails within seconds, and application health readiness is bounded to 60 seconds.
7
+ - An import at the planner's accepted cap could fail part-way with `IMPORT_D1_REQUEST_LIMIT`. Each D1 batch call now counts as one paid-plan query, creation admission is shared with execution, existing erasure statement ceilings stay separate, and plan read pages are sized from their actual chunk bytes so the public door keeps room for its own queries. The canonical plan byte cap is unchanged.
8
+ - Portability export of a wide table (very many or very long column names) failed on D1: its row-size preflight query exceeded D1's 100,000-byte statement limit. The measurement is now split into bounded column queries and summed per row before the unchanged size limit applies, and internal row guards stay out of column removal so valid schema changes keep SQLite semantics. Local D1 stand-ins on the pinned Node 22 runtime now enforce D1's limits on SQL bytes, parameters, function arguments, pattern bytes, bound values and encoded rows (native demo SQLite bindings use the same helper), so tests can fail for queries production would reject. Expression depth 100 is observed, not documented, and is checked with an estimated parser-tree depth proved against workerd at 100 and 101.
9
+ - Run site deploy failures did not say which provider call failed or why. Human and JSON failures now name the failing provider step, sanitized endpoint, elapsed time, timeout limit and network cause or redacted HTTP refusal body, beside the existing deploy failure facts.
10
+ - Hosted demo bundling refused "Secret declared as an image variable" for an empty Wrangler placeholder of a declared runtime secret. Container and native demo bundles now drop empty placeholders for declared runtime secrets, keep the runtime secret declarations and still refuse non-empty secret image values.
11
+ - **Import the Platform data download natively.** The Managed data ZIP failed as a damaged archive. The reference adapter now opts into a bounded ZIP intake that stages the source in isolation, translates its Platform migration ledger and uses the existing empty-install restore; adapters opt in with `managedData: true` or wrap their native restore with `withManagedDataImport`. Malformed downloads, unknown source tables (even those row policy excludes) and occupied destinations are refused before destination data changes. Internal schema prefixes compare literally, indexes and triggers on excluded tables stay in archive accounting, trigger definitions import literally, retired schema objects reconcile against destination migrations, and dependent new-table backfills replay during native restore. The historical schema projection remains only for explicitly acknowledged v1 recovery.
12
+ - The separate install-then-start recipe needed a PATH step, and frozen-lockfile install failures showed raw pnpm codes. The recipe now runs the installed launcher by its absolute path, and frozen-lockfile refusals give one plain cause and a runnable repair command, keeping pnpm codes and captured output in JSON.
13
+ - A refused D1 import upload lost Cloudflare's HTTP status and body, so `rer deploy` could not explain it. D1 import init, upload, ingest and poll failures now keep redacted, bounded diagnostics (status, provider codes and messages, network cause) in human and JSON failures; the failure code and retry policy are unchanged.
14
+ - Refused dependency downloads, invalid ports and checkout archive paths printed error classes and stacks. They now give a plain cause and a runnable next command and keep useful detail facts (command, status, output tail, log path); JSON output is unchanged.
15
+ - After Business pairing the next step was unclear, and the owner's computer choices needed a reconnect. Business setup and local launch now lead with one plain next step, name `business next` after pairing, defer optional shell setup (`rer cli path`) until the app is ready, and show a shared cold-run budget with measured archive downloads and disk use; `business next` and `business run` apply the owner's latest choices without reconnecting.
16
+ - Local first-party apps did not know the paired Business. Connect, setup and dev now carry its name and display settings into the checkout, running apps refresh while Business runs, and disconnect removes the local carry.
17
+ - Contract `coverage check` counted the old Status summary table as lines to place, so a seed could not satisfy both it and the contract standard. Coverage now skips Status table lines except a clause row's non-empty Gap cell.
18
+ - Release verification reported one fixed reason for every GitHub CLI failure, hiding causes such as a rate-limit 403. Unavailable verification receipts now include the gh exit status and bounded, redacted stderr, keeping the authentication guidance when stderr is empty.
19
+ - `rer dev` and `rer demo` failed to load seed source folders named `exports`. Development now allows them while generated top-level export output and installation archives stay private.
20
+ - Local worker requests could fail with "fetch failed" or `UND_ERR_SOCKET` after a server closed an idle socket. Loopback harness connections now close after each response; readiness, owner claims and seed runtime journeys share this transport, with no retries.
21
+ - `rer deploy --dry-run` exited 3 without Cloudflare credentials although it is documented to validate locally. Dry runs now build and validate the local plan with no credentials or Cloudflare requests and print target, binding and migration names; remote readiness checks are left to a real deploy.
22
+ - Version 2 backups without a schema object inventory could not be restored. Explicit `--acknowledge-unverified-schema-objects` recovers them into an empty installation with destination migration replay and every existing restore fence; completed receipts record the acknowledged schema uncertainty, and current archives restore without acknowledgment.
23
+ - A fresh owner could not sign in to a local `rer preview`, and `rer demo` offered only its persona. Preview now prints a single-use native owner entry and demo adds one beside its persona, through the existing fragment gate and native owner grant; links expire within 15 minutes and are never saved.
24
+ - First runs needed a shell PATH detour, led with machine lines and an unlabelled site URL, showed a fixed owner address without explanation, and timed every phase from the launch. The installer now prints a quoted absolute launch command, ready output leads with one plain app link and labels the site, the owner form explains the local account, and each launch phase is timed separately; machine ready output is unchanged.
25
+ - The shared hosting guide listed its options in a different order from the Run chooser. It now follows the chooser: the one-line local run first, then Assisted, then Managed for a listing that offers it, then the do-it-yourself Cloudflare steps, with plan copy, sign-up state and links taken from the chooser.
26
+ - Automatic `rer dev` port selection could exhaust its 1,000 candidates when stopped checkouts kept saved setup records. A saved setup port now excludes a candidate only while that checkout's launch worker or server still runs with its recorded start identity; live servers, active claims and bound sockets still exclude their ports, and an exhausted search still names its range and candidate count.
27
+ - Publication scans rejected OpenAI noreply co-author trailers in commit messages. That provider's exact `noreply` address is now accepted in the final trailer paragraph, as the Anthropic and GitHub ones are; personal addresses, body text, other trailer keys, other or lookalike domains, files and annotated tags still fail.
28
+ - Refresh refused with "fetch full Base history" when a shallow Base checkout lacked the ancestry its migration comparison needs. Online refresh now fetches just the two immutable comparison tips, with no tags and a 60-second transport deadline, into a temporary bare repository and leaves the supplied checkout unchanged; failed or offline acquisition refuses before any write and names both revisions, the Base remote and an exact one-line repair command.
29
+ - Seed Verify ran the push shards in full for both a branch push and its pull request, ran every push shard again on each nightly schedule, and installed system browser libraries before trying Chromium. The delivered workflow now plans each run: it reuses the newest full push proof of an identical tree (the pull request's head push, the same commit on another branch, or a direct parent with the same tree), runs light coverage (the edition lock check, `pnpm run check`, the reviewed readers and the site build) when a branch push changes only contract documents, `sources.lock.json` or evidence on top of a push-verified parent, and otherwise runs in full. Schedules run only the nightly shards, on Monday and Thursday at a time rendered from the seed name; release tags still run every shard; and Chromium's system libraries are installed only after a failed launch probe.
30
+
31
+ ### Known issues
32
+
33
+ - The two refresh recovery guidance issues documented in 0.2.82 still apply, with the same manual recoveries.
34
+ - The delivered Verify template's runner-temporary pnpm store, Chromium and apt cache lifecycle is not yet exercised end to end on a GitHub Ubuntu 24.04 runner; Base Verify covers only Base's own bootstrap.
35
+
36
+ ## 0.2.84
37
+
38
+ - The publication scan accepts the upstream copyright notice of a Base-listed third-party licence text only under an exact licence file name with the listed Git blob ID (initially the vendored yaml 2.9.1 `LICENSE`) and reports each in `thirdPartyNotices`; seed configuration cannot extend the list, and scans of the unpacked rer tarball and of refreshed seeds pass without review records.
39
+ - Refresh resolves every runtime import form without declaration files, reads workflow run steps from a YAML AST, preserves equal-byte tracked siblings as edition-owned discovery exceptions, and keeps ordinary baseline-unresolved imports unresolved. Local package conditions are selected by Node itself, excluding types for runtime edges. JavaScript runtime paths follow Node's explicit-file rules; TypeScript source resolution is retained.
40
+ - Parse those import edges and workflow files with Babel parser 7.29.8 (MIT) and yaml 2.9.1 (ISC), vendored unchanged in behaviour as portable ESM modules under `edition-authoring/vendor`, so refresh installs no parser package.
41
+ - The edition-authoring tool includes its vendored YAML and JavaScript parsers with their licences: deploy-kit templates and the review-harness upgrade guide copy the whole `vendor/` directory, and the lock's toolchain identity covers it, so a copied tool's `lock` and `check` no longer fail on a missing `vendor/yaml/index.mjs`.
42
+ - Fix the Verify template's unavailable job-level runner context, keep its pnpm store under the runner temporary directory, lint delivered workflows in Base Verify, and upgrade unchanged historical Verify templates and their helper closure during refresh.
43
+ - Close every recorded code module over relative imports and declarations using existing copy namespaces, preserving seed-owned dependencies and pre-existing unresolved imports; withhold optional directory additions without a witnessed destination and refuse missing seed-owned bindings atomically.
44
+ - Declare edition migrations `run-data-paths` and `run-data-pricing`; repeat `--edition-migration ID` to consent to refresh while leaving the documented edition-owned edits owed.
45
+ - Check physical spelling before refresh writes or relies on a path; preserve unrecorded template aliases with a notice and refuse aliases on recorded paths and dependencies.
46
+ - Discover workflow helpers across shell wrappers, quoted paths, command substitutions and interpreter options, using the caller's template namespace.
47
+ - Pass the resolved demo Run exit from the CLI to Vite without loading adapters from copied demo modules, remove an empty authoring catch, and keep the Run guide link lint-clean.
48
+ - Add the contract document generator `foundation/runtime/contract-docs.mjs`: `write` regenerates `ACCEPTANCE.md`, `docs/CLAIMS.md` and the Status summary rows from `CONTRACT.md`, `check` fails on stale outputs, and `convert`, `id-map` and `coverage` support structural contract rewrites. `BASELINE.md` adds shared conformance and agent access duties that seeds cite by Base id.
49
+
50
+ ### Known issues
51
+
52
+ - The two refresh recovery guidance issues documented in 0.2.82 still apply, with the same manual recoveries.
53
+ - The delivered Verify template's runner-temporary pnpm store, Chromium and apt cache lifecycle is not yet exercised end to end on a GitHub Ubuntu 24.04 runner; Base Verify covers only Base's own bootstrap.
54
+
3
55
  ## 0.2.83
4
56
 
5
57
  - Point the shared Run chooser to Business pairing and keep one local launch recipe with optional alternatives tucked away.
@@ -10,7 +62,7 @@
10
62
 
11
63
  ### Known issues
12
64
 
13
- - The two refresh recovery guidance issues documented in 0.2.82 still apply, with the same manual recoveries. Their corrected refusal text moves to 0.2.84.
65
+ - The two refresh recovery guidance issues documented in 0.2.82 still apply, with the same manual recoveries. Use the manual recoveries below.
14
66
 
15
67
  ## 0.2.82
16
68
 
@@ -22,8 +74,8 @@
22
74
 
23
75
  ### Known issues
24
76
 
25
- - For a Base-equal untracked, ignored or excluded authoring helper, the suggested `git add -f` followed by refresh can leave `verify-base` reporting `unrecordedCopies`; from the seed root, run `node node_modules/@runeditrun/rer/edition-authoring/cli.mjs record-base LOCAL_PATH ORIGIN_PATH FULL_40_HEX_COMMIT --base /absolute/base-checkout`, then the same entry's `verify-base --base /absolute/base-checkout`. Corrected refusal text ships in 0.2.83.
26
- - On case-insensitive APFS, the suggested `mv -i` for a Base-equal committed `Copy-Checkout.mjs` can leave the old Git index spelling, so refresh succeeds but verification fails; move its `.refresh-backup` outside the checkout, run `git rm --cached -- PATH/Copy-Checkout.mjs` and `git add -- PATH/copy-checkout.mjs base-copies.json`, then verify again. This preserves both the backup and delivered bytes; corrected refusal text ships in 0.2.83.
77
+ - For a Base-equal untracked, ignored or excluded authoring helper, the suggested `git add -f` followed by refresh can leave `verify-base` reporting `unrecordedCopies`; from the seed root, run `node node_modules/@runeditrun/rer/edition-authoring/cli.mjs record-base LOCAL_PATH ORIGIN_PATH FULL_40_HEX_COMMIT --base /absolute/base-checkout`, then the same entry's `verify-base --base /absolute/base-checkout`. The manual recovery remains necessary.
78
+ - On case-insensitive APFS, the suggested `mv -i` for a Base-equal committed `Copy-Checkout.mjs` can leave the old Git index spelling, so refresh succeeds but verification fails; move its `.refresh-backup` outside the checkout, run `git rm --cached -- PATH/Copy-Checkout.mjs` and `git add -- PATH/copy-checkout.mjs base-copies.json`, then verify again. This preserves both the backup and delivered bytes; the manual recovery remains necessary.
27
79
 
28
80
  ## 0.2.81
29
81
 
package/global/README.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # rer
2
2
 
3
+ <!-- BEGIN COLD RUN BUDGET -->
4
+ Allow roughly 500 MB–1 GB of downloads and 1–3 GB of disk space for a first run, including Node, rer, the app and its dependencies. The app and your computer can need more; later runs reuse downloads.
5
+ <!-- END COLD RUN BUDGET -->
6
+
3
7
  `rer` is the Run Edit Run command. Install it once, then run `rer <verb>` in any
4
8
  Run Edit Run checkout: every verb runs that checkout's own pinned copy, so a
5
9
  checkout always gets the behaviour it was built and tested with.
@@ -21,13 +25,15 @@ Start a seed from an empty folder, with or without Node:
21
25
 
22
26
  ```sh
23
27
  curl -fsSL https://runeditrun.com/install.sh | sh
24
- rer dev just-every/run-inkwell
28
+ "$HOME/.local/bin/rer" dev just-every/run-inkwell
25
29
  ```
26
30
 
27
31
  The installer needs no Node: without Node 22 or later on PATH it installs a
28
- private one for `rer` (see below). It edits no shell profile: it names the next
29
- command, `rer dev <owner>/<repo>`, and when `~/.local/bin` is not on PATH for new
30
- terminals its last line is the one to run first, which adds it for your shell.
32
+ private one for `rer` (see below). It edits no shell profile. The second step
33
+ uses the installed launcher directly, so it works in the same shell without
34
+ changing PATH: a child installer cannot change its parent shell’s PATH, and bare
35
+ `rer` needs `~/.local/bin` on PATH. After the app opens, an optional
36
+ `rer cli path` step explains how to make `rer` available in future terminals.
31
37
  The same start also fits on one line:
32
38
 
33
39
  ```sh
@@ -66,24 +72,13 @@ With no Node 22 or later on PATH, the script installs Node 22.20.0 from
66
72
  `nodejs.org` into `~/.local/share/rer/runtimes` (under `XDG_DATA_HOME` when set),
67
73
  verifies the tarball against that release's published `SHASUMS256.txt`, and
68
74
  prints its location. The launcher uses this private runtime on later runs.
69
- System Node and other PATH directories are left alone: the private runtime's
70
- `node`, `npm` and `npx` are not put on PATH, because `rer` is the one command
71
- the installer provides. With no arguments the script names the next command,
72
- `rer dev <owner>/<repo>`, and ends with the PATH line below when one is needed.
73
-
74
- No installer edits shell profiles. The canonical launcher is `~/.local/bin/rer`.
75
- Installation creates that directory if needed and never writes into another
76
- PATH directory. It names any existing `rer` elsewhere on PATH and leaves it
77
- unchanged. If `~/.local/bin` is absent from PATH, another command shadows it,
78
- or no startup file of your shell adds it for new terminals, its last line is
79
- one command to run: it appends `export PATH="$HOME/.local/bin:$PATH"` to that
80
- startup file (`~/.zshrc` for zsh; `~/.bash_profile` for bash on macOS and
81
- `~/.bashrc` elsewhere; `~/.profile` otherwise) and runs it in the current shell.
82
- For fish it is `fish_add_path ~/.local/bin`. Without a private runtime, the
83
- launcher uses `node` from PATH. A re-run with the same build changes
84
- nothing; a different build is installed beside the current one, the previous one
85
- is kept and older ones are removed. It refuses to replace a `~/.local/bin/rer`
86
- that it did not write.
75
+ System Node is left alone. With no arguments, the installer prints an app-start
76
+ command using its absolute launcher. After a first launch, `rer cli path` shows
77
+ an optional shell-specific line to make `rer` available in future terminals.
78
+ Only running that line changes a shell startup file; `rer` never edits one.
79
+ A re-run with the same build changes nothing; a different build keeps the
80
+ previous version and removes older ones. It refuses to replace a launcher it
81
+ did not write.
87
82
 
88
83
  `rer --version` prints this rer's version; inside a checkout a second line
89
84
  names the version the checkout pins, or says that its vendored copy is
@@ -454,12 +449,14 @@ The owner chooses three things on the computer's row in the browser: "Add rules
454
449
  so Claude Code never reads your secret files" (Claude Code user Read deny
455
450
  rules), "Keep this computer awake while it works" (export-scoped macOS wake
456
451
  prevention) and "Install the background service" (a launchd or systemd user
457
- service). Connect reads them as `optIns` from device-authenticated
452
+ service). Connect, run and next read them as `optIns` from device-authenticated
458
453
  `GET /api/business/executors/self`, with keys `installPermissions`,
459
454
  `awakeConsent` and `installService`; the CLI prints only the sentences. Only
460
455
  `true` enables an option. Undecided (`null`) options are listed with a browser
461
456
  link; an older server without this route (it answers 403 or 404) leaves all
462
- options undecided. Run connect again after the owner decides. The first
457
+ options undecided. After the owner decides, run `rer business next` to apply
458
+ the choices and see the next task. `rer business run` also applies the latest
459
+ choices before working tasks. The first
463
460
  device-authenticated request happens after both the credential and local
464
461
  pairing state are stored, so a storage failure cannot activate the computer.
465
462
  A service installed with `RER_BUSINESS_STATE_DIR` set keeps that folder. Background
@@ -1,13 +1,19 @@
1
1
  // rer cli status|install|uninstall
2
- const usage = 'Usage: rer cli status [--json] | rer cli install | rer cli uninstall\n';
2
+ const usage = 'Usage: rer cli status [--json] | rer cli install | rer cli uninstall | rer cli path\n';
3
3
 
4
4
  export async function cliCommand(args) {
5
5
  const [action, ...flags] = args;
6
6
  if (!action || ['--help', '-h'].includes(action)) { process.stdout.write(usage); return 0; }
7
7
  const allowed = action === 'status' ? ['--json'] : [];
8
8
  const unknown = flags.find(flag => !allowed.includes(flag));
9
- if (!['status', 'install', 'uninstall'].includes(action) || unknown !== undefined) { process.stderr.write(`Unsupported: rer cli ${args.join(' ')}\n${usage}`); return 2; }
9
+ if (!['status', 'install', 'uninstall', 'path'].includes(action) || unknown !== undefined) { process.stderr.write(`Unsupported: rer cli ${args.join(' ')}\n${usage}`); return 2; }
10
10
  if (action === 'status') return (await import('./status.mjs')).status({ json: flags.includes('--json') });
11
+ if (action === 'path') {
12
+ const { pathAdvice } = await import('./path-link.mjs');
13
+ const { layout } = await import('./layout.mjs');
14
+ process.stdout.write((await pathAdvice(layout()) || 'rer is available in this terminal and future terminals.') + '\n');
15
+ return 0;
16
+ }
11
17
  if (action === 'install') return (await import('./install.mjs')).install();
12
18
  return (await import('./uninstall.mjs')).uninstall();
13
19
  }
@@ -40,12 +40,11 @@ async function writeLauncher(paths) {
40
40
  await rename(temporary, paths.launcher);
41
41
  }
42
42
 
43
- // The next step, then (when needed) the exact line that puts rer on PATH, last.
44
- // install.sh running a command itself, and rer update, set RER_INSTALL_NO_NEXT.
45
- // Business connect also suppresses PATH advice: it uses the launcher directly.
43
+ // The absolute launcher works immediately, without editing shell files.
44
+ const shellQuote = value => "'" + value.replaceAll("'", "'\"'\"'") + "'";
46
45
  async function closing(paths) {
47
- const advice = process.env.RER_INSTALL_NO_PATH ? '' : await pathAdvice(paths);
48
- return `${process.env.RER_INSTALL_NO_NEXT ? '' : 'Next, start an app: rer dev <owner>/<repo>\n'}${advice ? advice + '\n' : ''}`;
46
+ const notices = await pathAdvice(paths, process.env, { includeShellStep: false });
47
+ return (notices ? notices + '\n' : '') + (process.env.RER_INSTALL_NO_NEXT ? '' : `Next, start an app: ${shellQuote(paths.launcher)} dev <owner>/<repo>\n`);
49
48
  }
50
49
 
51
50
  export async function install({ quiet = false } = {}) {
@@ -44,7 +44,7 @@ async function persistent(files) {
44
44
 
45
45
  // Empty when `rer` already runs this launcher in this terminal and new ones.
46
46
  // Otherwise the advice ends with the exact line to run.
47
- export async function pathAdvice(paths, env = process.env) {
47
+ export async function pathAdvice(paths, env = process.env, { includeShellStep = true } = {}) {
48
48
  const entries = [...new Set((env.PATH ?? '').split(delimiter).filter(Boolean).map(entry => resolve(entry)))];
49
49
  const bin = resolve(paths.bin), lines = [];
50
50
  let firstCommand;
@@ -58,10 +58,11 @@ export async function pathAdvice(paths, env = process.env) {
58
58
  lines.push(`Left existing rer at ${candidate} unchanged.`);
59
59
  } catch (error) { if (!['ENOENT', 'EACCES', 'ENOTDIR'].includes(error.code)) throw error; }
60
60
  }
61
+ if (!includeShellStep) return lines.join('\n');
61
62
  const startup = await shellStartup(paths.home, env);
62
63
  const first = entries.includes(bin) && firstCommand === paths.launcher;
63
64
  if (first && await persistent(startup.files)) return lines.join('\n');
64
65
  const why = first ? 'New terminals will not find rer yet.' : firstCommand ? `Another rer (${firstCommand}) comes first on your PATH.` : 'rer is not on your PATH yet.';
65
- lines.push(`${why} Run this line; it puts ~/.local/bin first on PATH in this terminal and in new ones:`, ` ${startup.line}`);
66
+ lines.push(`Optional: make rer available in future terminals. ${why} Running the following line adds ~/.local/bin to your shell's startup file and this terminal. rer changes no shell file itself:`, ` ${startup.line}`);
66
67
  return lines.join('\n');
67
68
  }
@@ -4,8 +4,7 @@ import { join } from 'node:path';
4
4
  import { parse } from '../../cli/parse.mjs';
5
5
  import { shellQuote } from '../../cli/node-runtime-cache.mjs';
6
6
  import { install } from './install.mjs';
7
- import { launcherOwner, layout } from './layout.mjs';
8
- import { pathAdvice } from './path-link.mjs';
7
+ import { showBudget } from '../../cli/run-transfers.mjs';
9
8
  import { checkoutRepository, runCommand } from './repository.mjs';
10
9
  import { ownRoot } from '../package-info.mjs';
11
10
  import { prepare } from '../launch/prepare.mjs';
@@ -14,17 +13,14 @@ import { launchDirectory } from '../launch/state.mjs';
14
13
  export async function repoCommand(request) {
15
14
  const { verb, directory, args } = request;
16
15
  parse([verb, ...args]); // Refuse invalid options before installation or cloning.
17
- const paths = layout(), launcher = await launcherOwner(paths.launcher);
16
+ showBudget(args);
18
17
  const installed = await install({ quiet: true });
19
18
  if (installed !== 0) return installed;
20
19
  await checkoutRepository(request);
21
20
  const root = await realpath(request.root);
22
- if (launcher.state === 'absent') {
23
- const advice = await pathAdvice(paths);
24
- if (advice) process.stderr.write(advice + '\n');
25
- }
26
21
  const next = command => `cd ${shellQuote(directory)} && rer ${command}`;
27
22
  if (verb === 'setup') {
23
+ await (await import('../../cli/business/carry.mjs')).refreshCheckout(root);
28
24
  const state = await launchDirectory(root), children = new Set(), controller = new AbortController();
29
25
  const log = createWriteStream(join(state, 'launch.log'), { flags: 'a', mode: 0o600 });
30
26
  const handlers = new Map(['SIGINT', 'SIGTERM'].map(signal => [signal, () => { controller.abort(); for (const child of children) child.kill(signal); }]));
@@ -17,6 +17,11 @@ import { LaunchFailure } from './failure.mjs';
17
17
  import { describeCheckout } from './facts.mjs';
18
18
  import { prepare } from './prepare.mjs';
19
19
  import { printer } from './render.mjs';
20
+ import { access } from 'node:fs/promises';
21
+ import { layout } from '../cli/layout.mjs';
22
+ import { pathAdvice } from '../cli/path-link.mjs';
23
+ import { shellQuote } from '../../cli/node-runtime-cache.mjs';
24
+ import { showBudget } from '../../cli/run-transfers.mjs';
20
25
  import { stopLaunch } from './stop.mjs';
21
26
  import { launchDirectory, liveWorker } from './state.mjs';
22
27
 
@@ -41,8 +46,13 @@ export async function launchDev(target) {
41
46
  try { return await stopLaunch(target, devArgs, { checkout, directory }); }
42
47
  catch (failure) { if (!(failure instanceof LaunchFailure)) throw failure; process.stderr.write(failure.message + '\n'); return failure.exitCode; }
43
48
  }
49
+ showBudget(devArgs);
50
+ // The launch never asks for shell edits. Offer the optional step only at ready.
51
+ delete process.env.RER_LAUNCH_PATH_STEP;
52
+ const paths = layout();
53
+ if (await access(paths.launcher).then(() => true, () => false) && await pathAdvice(paths)) process.env.RER_LAUNCH_PATH_STEP = `Optional, after opening your app: make rer available in future terminals. Run ${shellQuote(paths.launcher)} cli path to see the shell step; it changes no shell file itself.`;
44
54
  const here = await realpath(process.cwd()).catch(() => undefined);
45
- const out = printer({ json: devArgs.includes('--json'), stopHint: `rer dev --stop${here === checkout ? '' : ` --cwd ${JSON.stringify(checkout)}`}`, keyless: doorStart });
55
+ const out = printer({ root: checkout, json: devArgs.includes('--json'), stopHint: `rer dev --stop${here === checkout ? '' : ` --cwd ${JSON.stringify(checkout)}`}`, keyless: doorStart });
46
56
  const detach = args.includes('--detach') || (!args.includes('--foreground') && !process.stdout.isTTY);
47
57
  return detach ? detached(target, devArgs, directory, out, doorStart) : foreground(target, devArgs, directory, out, doorStart);
48
58
  }
@@ -116,7 +126,7 @@ async function follow(directory, token, out, { worker, quiet = false }) {
116
126
  const event = JSON.parse(line);
117
127
  if (event.event === 'phase') out.phase(event);
118
128
  else if (event.event === 'redirect') return event.token ? follow(directory, event.token, out, { quiet }) : missing(directory);
119
- else if (event.event === 'ready') { if (!quiet) out.ready(event.ready, event); return 0; }
129
+ else if (event.event === 'ready') { if (!quiet) await out.ready(event.ready, event); return 0; }
120
130
  else if (event.event === 'failed') { out.failure(new LaunchFailure(event.exitCode, event.message, event.error)); return event.exitCode; }
121
131
  }
122
132
  continue;
@@ -76,8 +76,8 @@ export async function portTaken(port) {
76
76
  }
77
77
 
78
78
  // The first port from 8787 (RER_DEV_PORT_FROM moves the start), among the next
79
- // `searchCandidates` ports, that is not `held` (by a registered server, or saved
80
- // by another checkout that is stopped), nothing listens on, binds on both
79
+ // `searchCandidates` ports, that is not `held` by a live server or launch
80
+ // owner, nothing listens on, binds on both
81
81
  // 127.0.0.1 and ::1 (a browser that tries ::1 first never reaches another
82
82
  // server) and that `claim` secures against another launch choosing it at the
83
83
  // same time. The search is bounded by that count, never by time or load.
@@ -1,13 +1,17 @@
1
+ import { humanError } from '../../cli/human-error.mjs';
1
2
  // What `rer dev` prints while it launches: a progress line at least every 30
2
3
  // seconds (a `progress` event with --json), then the dispatcher's ready lines.
4
+ import { readySummary } from '../../cli/ready-summary.mjs';
5
+ import { launchSummary } from '../../cli/run-transfers.mjs';
6
+
3
7
  const elapsed = ms => { const s = Math.round(ms / 1000); return s < 60 ? `${s}s` : `${Math.floor(s / 60)}m ${s % 60}s`; };
4
8
  const quiet = 20000;
5
9
 
6
10
  // `keyless` (a start by the front door, whose log this is): the ready lines
7
11
  // leave out the dev-key link, so the door's files never hold a key.
8
- export function printer({ json, stopHint, keyless = false }) {
12
+ export function printer({ json, stopHint, keyless = false, root }) {
9
13
  const started = Date.now();
10
- let current = 'preparing', last = Date.now();
14
+ let current = 'preparing', last = Date.now(), phaseStarted = last, currentPhase;
11
15
  const event = (name, fields) => process.stdout.write(JSON.stringify({ version: 1, verb: 'dev', event: name, ...fields }) + '\n');
12
16
  const line = text => process.stderr.write(`rer dev: ${text}\n`);
13
17
  const progress = (phase, message) => {
@@ -16,20 +20,23 @@ export function printer({ json, stopHint, keyless = false }) {
16
20
  else line(message);
17
21
  };
18
22
  return {
19
- phase({ phase, message }) { if (phase !== 'note') current = message; progress(phase, message); },
23
+ phase({ phase, message }) { if (phase !== 'note') { if (phase !== currentPhase) phaseStarted = Date.now(); currentPhase = phase; current = message; } progress(phase, message); },
20
24
  attaching(startedAt) { progress('attach', `attaching to the launch already preparing this checkout (started ${elapsed(Date.now() - startedAt)} ago)`); },
21
- heartbeat() { if (Date.now() - last >= quiet) progress('waiting', `still ${current} (${elapsed(Date.now() - started)}). Allow up to 10 minutes; if this command is stopped, run rer dev again to reattach.`); },
25
+ heartbeat() { if (Date.now() - last >= quiet) progress('waiting', `still ${current} (${elapsed(Date.now() - phaseStarted)}). Allow up to 10 minutes; if this command is stopped, run rer dev again to reattach.`); },
22
26
  // The dispatcher's ready event, as its own human ready lines.
23
- ready(ready, { log, pid }) {
27
+ async ready(ready, { log, pid }) {
24
28
  if (keyless) { const { openUrl, ...rest } = ready; ready = rest; }
25
29
  if (json) { event('server', { pid, log }); process.stdout.write(JSON.stringify(ready) + '\n'); return; }
26
- const out = [`RER_READY ${ready.url}`];
30
+ const out = root
31
+ ? [...readySummary(ready), ...await launchSummary(root), '', 'Details for tools and troubleshooting:', `RER_READY ${ready.url}`]
32
+ : [`Your app is ready, open it: ${ready.openUrl ?? ready.url}`, `RER_READY ${ready.url}`];
27
33
  if (ready.openUrl) {
28
34
  if (ready.signedInAs) out.push(`RER_SIGNED_IN ${ready.signedInAs}`);
29
- out.push(`RER_OPEN ${ready.openUrl}`, 'Open that link on this computer. Its fragment holds this checkout\'s dev key, which the page keeps only as a cookie; never share the link.');
35
+ out.push(`RER_OPEN ${ready.openUrl}`);
30
36
  }
31
37
  // A seed with a run site: its static homepage, /run and docs, served locally.
32
- if (ready.siteUrl) out.push(`RER_SITE ${ready.siteUrl}`);
38
+ // The checkout summary above already labels it for people.
39
+ if (ready.siteUrl) out.push(...(root ? [] : [`Site: ${ready.siteUrl}`]), `RER_SITE ${ready.siteUrl}`);
33
40
  out.push(`The server keeps running in the background${pid ? ` (PID ${pid})` : ''}. Stop it with: ${stopHint}`);
34
41
  if (log) out.push(`Server log (private): ${log}`);
35
42
  process.stdout.write(out.join('\n') + '\n');
@@ -39,7 +46,7 @@ export function printer({ json, stopHint, keyless = false }) {
39
46
  if (failure.event) process.stdout.write(JSON.stringify(failure.event) + '\n');
40
47
  else event('error', { code: 'launch_refused', message: failure.message, exitCode: failure.exitCode });
41
48
  event('result', { ok: false, exitCode: failure.exitCode });
42
- } else process.stderr.write(failure.message + '\n');
49
+ } else process.stderr.write(humanError(failure, { retry: /Correct the cause, then run (.+) again\./.exec(failure.message)?.[1] }) + '\n');
43
50
  },
44
51
  };
45
52
  }
@@ -131,8 +131,8 @@ const stepRecord = name => ({
131
131
  });
132
132
  export const installState = stepRecord('install'), setupState = stepRecord('setup');
133
133
 
134
- // The ports other checkouts were set up on by this launcher. A stopped
135
- // checkout keeps its saved origin, so a fresh launch must not take its port.
134
+ // Saved setup ports are held only while their launch worker or server lives.
135
+ // A stopped checkout keeps its settings without reserving a port indefinitely.
136
136
  export async function savedPorts(checkout, env = process.env) {
137
137
  const launches = join(serversDirectory(env), 'launches'), own = launchPath(checkout, env);
138
138
  let entries = [];
@@ -140,8 +140,8 @@ export async function savedPorts(checkout, env = process.env) {
140
140
  const ports = [];
141
141
  for (const entry of entries) {
142
142
  if (!entry.isDirectory() || join(launches, entry.name) === own) continue;
143
- const port = (await setupState.read(join(launches, entry.name)))?.port;
144
- if (Number.isInteger(port)) ports.push(port);
143
+ const directory = join(launches, entry.name), port = (await setupState.read(directory))?.port;
144
+ if (Number.isInteger(port) && (await liveWorker(directory) || await live(await serverRecord.read(directory)))) ports.push(port);
145
145
  }
146
146
  return ports;
147
147
  }
package/global/main.mjs CHANGED
@@ -1,3 +1,4 @@
1
+ import { humanError } from '../cli/human-error.mjs';
1
2
  import { checkoutBootstrap, checkoutVerbs } from '../cli/contract.mjs';
2
3
  import { dispatcher, locate, pinnedPackage, unsupportedMessage } from './checkout.mjs';
3
4
  import { delegate } from './delegate.mjs';
@@ -28,8 +29,8 @@ else its vendored scripts/rer.mjs.
28
29
  them off PATH): where a project's docs say pnpm run X, run rer run X.
29
30
  rer list [DIR] The checkouts in DIR (default: here), newest first, with whether rer dev can
30
31
  launch them, whether they are set up, and their running URL. --json for data.
31
- rer business ... Pair a Business device, store local vendor keys, inspect tasks and disconnect.
32
- rer business --help lists the commands and current protocol limitations.
32
+ rer business ... Set up your business once and share its name, logo and brand colour
33
+ with apps that support Business. Start with rer business connect.
33
34
  rer companion ... Pair this computer with a Run Edit Run app and run its change requests here
34
35
  with your own Codex or Claude. rer companion --help lists the commands.
35
36
  rer door ... The opt-in front door: every checkout at http://NAME.localhost:PORT, started
@@ -37,6 +38,7 @@ else its vendored scripts/rer.mjs.
37
38
  rer cli status This rer: version, contents digest, install channel, launcher and other rer
38
39
  commands on PATH. --json for data.
39
40
  rer cli install Install this package for the current user (~/.local/bin/rer).
41
+ rer cli path Optional: make rer available in future terminals; shows the shell step.
40
42
  rer cli uninstall Remove the launcher and the install root; ~/.rer is untouched.
41
43
  rer update Move to the latest published rer (--version X for an exact one), the way it
42
44
  was installed: npx and install.sh installs switch atomically, npm installs run npm.
@@ -80,7 +82,7 @@ export async function main(argv) {
80
82
  const repository = repoArguments(argv);
81
83
  if (repository) return await (await import('./cli/repo-command.mjs')).repoCommand(repository);
82
84
  } catch (error) {
83
- process.stderr.write(error.message + '\n');
85
+ process.stderr.write((argv.includes('--json') ? error.message : humanError(error)) + '\n');
84
86
  return typeof error.exitCode === 'number' ? error.exitCode : 1;
85
87
  }
86
88
  const target = locate(argv);
@@ -95,7 +97,7 @@ export async function main(argv) {
95
97
  if ((mode !== 'bundled' || pinnedPackage(target.root)) && verb === 'doctor' && !argv.includes('--help')) {
96
98
  const { parse } = await import('../cli/parse.mjs');
97
99
  try { parse(target.args, target.root); }
98
- catch (error) { process.stderr.write(error.message + '\n'); return error.exitCode ?? 2; }
100
+ catch (error) { process.stderr.write((argv.includes('--json') ? error.message : humanError(error)) + '\n'); return error.exitCode ?? 2; }
99
101
  const code = await (await import('./browser-runtime.mjs')).browserPreflight(target.root, target.args);
100
102
  if (code !== undefined) return code;
101
103
  }
@@ -107,11 +109,11 @@ export async function main(argv) {
107
109
  // here, before provisioning the checkout's package manager.
108
110
  const publicArgs = verb === 'dev' ? target.args.filter(arg => arg !== '--door-start') : target.args;
109
111
  try { parse(publicArgs, target.root); }
110
- catch (error) { process.stderr.write(error.message + '\n'); return error.exitCode ?? 2; }
112
+ catch (error) { process.stderr.write((argv.includes('--json') ? error.message : humanError(error)) + '\n'); return error.exitCode ?? 2; }
111
113
  const { ensureProjectPnpm } = await import('../cli/project-pnpm.mjs');
112
114
  const { RerError } = await import('../cli/errors.mjs');
113
115
  try { await ensureProjectPnpm(target.root, { report: text => process.stderr.write(text + '\n') }); }
114
- catch (error) { if (!(error instanceof RerError)) throw error; process.stderr.write(error.message + '\n'); return error.exitCode; }
116
+ catch (error) { if (!(error instanceof RerError)) throw error; process.stderr.write((argv.includes('--json') ? error.message : humanError(error)) + '\n'); return error.exitCode; }
115
117
  }
116
118
  }
117
119
  if (verb === 'queue') {
@@ -135,7 +137,7 @@ export async function main(argv) {
135
137
  if (!(failure instanceof LaunchFailure)) throw failure;
136
138
  // A --json caller gets the failed step as data, as the checkout's own verbs report it.
137
139
  if (failure.event && target.args.includes('--json')) for (const event of [{ ...failure.event, verb }, { version: 1, verb, event: 'result', ok: false, exitCode: failure.exitCode }]) process.stdout.write(JSON.stringify(event) + '\n');
138
- else process.stderr.write(failure.message + '\n');
140
+ else process.stderr.write(humanError(failure, { retry: `rer ${verb} --cwd '${target.root.replaceAll("'", "'\\''")}'` }) + '\n');
139
141
  return failure.exitCode;
140
142
  }
141
143
  }
@@ -145,6 +147,9 @@ export async function main(argv) {
145
147
  const code = await (await import('./browser-runtime.mjs')).browserPreflight(target.root, target.args);
146
148
  if (code !== undefined) return code;
147
149
  }
150
+ if (first && ['setup', 'dev'].includes(verb) && !argv.some(arg => ['--help', '-h', '--stop', '--demo'].includes(arg))) {
151
+ await (await import('../cli/business/carry.mjs')).refreshCheckout(target.root);
152
+ }
148
153
  if (verb === 'dev' && mode && mode !== 'package' && !argv.includes('--help')) return (await import('./launch/dev.mjs')).launchDev(target);
149
154
  // Every other server start or queued job on a vendored pin gets the person
150
155
  // defaults too (a pinned package applies its own).
package/install.sh CHANGED
@@ -12,7 +12,7 @@
12
12
  # package's own `rer cli install`: the same layout as
13
13
  # `npx -y @runeditrun/rer cli install`. A failure leaves any previous install
14
14
  # selected and working. It never edits shell profiles: when ~/.local/bin is not
15
- # on PATH for new terminals, its last line is the one to run that adds it.
15
+ # on PATH, the absolute launcher works now; shell setup is optional after launch.
16
16
  #
17
17
  # Needs curl and tar. If Node 22 or later is absent, installs the pinned official
18
18
  # Node release in rer's own data directory. macOS/Linux x64/arm64; Windows: WSL2.
@@ -20,6 +20,13 @@
20
20
  # Everything runs from main, so a partly downloaded script does nothing.
21
21
  main() {
22
22
  set -eu
23
+ # BEGIN COLD RUN BUDGET (generated from foundation/runtime/run-data.mjs)
24
+ cold_run_budget='Allow roughly 500 MB–1 GB of downloads and 1–3 GB of disk space for a first run, including Node, rer, the app and its dependencies. The app and your computer can need more; later runs reuse downloads.'
25
+ # END COLD RUN BUDGET
26
+ printf '%s\n' "$cold_run_budget"
27
+ RER_BUDGET_SHOWN=1
28
+ RER_TRANSFER_NODE_BYTES=0
29
+ export RER_BUDGET_SHOWN RER_TRANSFER_NODE_BYTES
23
30
  if [ "${1:-}" = -- ]; then shift; fi
24
31
  package='@runeditrun/rer'
25
32
 
@@ -139,15 +146,15 @@ if (!ended || pax) stop('the archive is truncated.');
139
146
  if (process.argv[4] !== '' && Number(process.argv[4]) !== count) stop('the archive holds ' + count + ' entries; the registry says ' + process.argv[4] + '.');
140
147
  if (process.argv[5] !== '' && Number(process.argv[5]) !== total) stop('the archive unpacks to ' + total + ' bytes; the registry says ' + process.argv[5] + '.');
141
148
  NODE
149
+ RER_TRANSFER_RER_BYTES=$(wc -c < "$work/rer.tgz" | tr -d ' ')
150
+ export RER_TRANSFER_RER_BYTES
142
151
  mkdir "$work/stage"
143
152
  tar -xzf "$work/rer.tgz" -C "$work/stage" || fail "could not unpack rer $version; nothing was installed."
144
- # A supplied command replaces the app next step. Business connect runs the
145
- # launcher directly, so it also needs no PATH advice.
153
+ # A supplied command replaces the app next step. Shell setup is offered only
154
+ # after the app is ready, through the optional rer cli path command.
146
155
  no_next=
147
- no_path=
148
156
  if [ "$#" -gt 0 ]; then no_next=1; fi
149
- if [ "${1:-}" = business ] && [ "${2:-}" = connect ]; then no_path=1; fi
150
- RER_INSTALL_CHANNEL=script RER_INSTALL_NO_NEXT=$no_next RER_INSTALL_NO_PATH=$no_path "$node_binary" "$work/stage/package/global/rer.mjs" cli install </dev/null \
157
+ RER_INSTALL_CHANNEL=script RER_INSTALL_NO_NEXT=$no_next "$node_binary" "$work/stage/package/global/rer.mjs" cli install </dev/null \
151
158
  || fail "rer cli install failed; any previous install is still selected."
152
159
  if [ "$#" -eq 0 ]; then return; fi
153
160
  # The command can tell the person how to run rer again from their own shell,
@@ -174,6 +181,8 @@ install_node() {
174
181
  || fail "could not download Node $node_version checksums from nodejs.org."
175
182
  curl -fL --proto '=https' "$release/$archive" -o "$work/$archive" \
176
183
  || fail "could not download Node $node_version from nodejs.org."
184
+ RER_TRANSFER_NODE_BYTES=$(wc -c < "$work/$archive" | tr -d ' ')
185
+ export RER_TRANSFER_NODE_BYTES
177
186
  expected=$(awk -v file="$archive" '$2 == file { print $1 }' "$work/SHASUMS256.txt")
178
187
  [ "${#expected}" -eq 64 ] || fail "nodejs.org gives no unique SHA-256 for $archive."
179
188
  case "$expected" in *[!0-9a-f]*) fail "nodejs.org gives an invalid SHA-256 for $archive." ;; esac
@@ -203,6 +212,8 @@ try {
203
212
  fs.renameSync(temporary, path.join(root, 'node'));
204
213
  } finally { try { fs.unlinkSync(temporary); } catch (error) { if (error.code !== 'ENOENT') throw error; } }
205
214
  NODE
215
+ RER_TRANSFER_NODE_DISK=$(du -sk "$node_home" | awk '{printf "%.0f", $1 * 1024}')
216
+ export RER_TRANSFER_NODE_DISK
206
217
  node_binary="$node_home/bin/node"
207
218
  PATH="$PATH:$node_home/bin"
208
219
  export PATH
@@ -85,7 +85,12 @@ configuration. Keep them in the mail spec's public variables and Wrangler `vars`
85
85
  and remove them from `deploy.json` secrets. For migration, the image builder
86
86
  accepts those legacy secret declarations when the managed-mail spec declares them public,
87
87
  and prints that correction. Runtime settings override their image defaults.
88
- API keys, tokens and other secrets in image variables remain refused.
88
+ Both the container and native demo builders remove exact empty-string Wrangler
89
+ variables whose names are declared as runtime secrets, including from the packaged
90
+ Worker configuration. Their runtime secret declarations stay intact. Non-empty
91
+ secret values (including whitespace) in image variables remain refused with
92
+ `Secret declared as an image variable: NAME`. The managed-mail migration rule
93
+ above remains the only exception for non-empty public configuration.
89
94
 
90
95
  `rer deploy --platform container --host ssh://user@host --env-file FILE` uses
91
96
  strict SSH host-key checking and a Linux host with Python 3 and Docker. FILE must