@runeditrun/rer 0.2.63 → 0.2.64

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.
package/cli/README.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # Portable command sources
2
2
 
3
+ To bring existing data into a seed, sign in as the owner and use its import
4
+ screen. First step: open this path on the destination app:
5
+
6
+ ```text
7
+ /app/import
8
+ ```
9
+
10
+ Upload a supported source export, review the plan and its differences, then
11
+ approve that exact plan to apply it. Reconcile the result against native data;
12
+ use Undo from the same history when needed. Base's reference accepts people JSON
13
+ here, not installation `.rer` archives. Editions adopt this same door
14
+ with their own supported readers and native adapters.
15
+
3
16
  `bin/rer.mjs` dispatches `cli/main.mjs`. Parsing/contract declarations, project
4
17
  resolution, output/exits, shared lifecycle orchestration, local state/reset,
5
18
  transfers, independent argv and diagnostics are separate modules. `dev-identity.mjs`
@@ -32,11 +45,16 @@ names what each mode's command targets are and reads the lockfile entry that
32
45
  that still calls the removed copy, which `check` refuses (SC-13.package.calls). `global/README.md` lists the exports and the vendored
33
46
  path each replaces.
34
47
 
35
- `node scripts/export-reference.mjs NEW_PATH` creates a standalone copy of the
48
+ ## Create a seed from source
49
+
50
+ `exportReference` / `node scripts/export-reference.mjs NEW_PATH` creates a standalone copy of the
36
51
  reference with runtime imports relocated into its own source tree and an explicit
37
52
  transformation inventory. It preserves source/tool pins and the real app; it does
38
53
  not substitute an application fixture. Frozen dependency installation occurs
39
- separately. Refresh copied sources with the export tools after shared edits.
54
+ separately. This is seed creation from source, not an export of an installed
55
+ owner's data. Refresh copied sources with the export tools after shared edits.
56
+
57
+ ## Shared command lifecycle
40
58
 
41
59
  Every first-party seed declares `commandAdapter` alongside its installer hooks.
42
60
  `localInstaller.run` supplies shared setup lifecycle behavior; the RER command
@@ -66,6 +84,12 @@ For older installations without an answer record, a runtime selection outside
66
84
  the installer field's choices cannot replace an adapter-declared local choice.
67
85
  Explicit answers and recorded installer choices still undergo strict validation.
68
86
 
87
+ ## Back up and restore this installation
88
+
89
+ Use `rer export` / `rer import` to back up and restore this installation. This
90
+ is separate from bringing records in through the reviewed import door. Archive
91
+ restore has no door plan, reviewed fingerprint, reconciliation or Undo. Keep owner move-in instructions at `/app/import`.
92
+
69
93
  Local `export --output FILE` and `import --input FILE --yes` use the Base
70
94
  portability implementation through the shared command runner and real Wrangler
71
95
  bindings. Seed adapters declare their database, buckets and archive policy.
@@ -1,5 +1,18 @@
1
1
  # Shipped vendor exports
2
2
 
3
+ To bring existing data into a seed, sign in as the owner and use its import
4
+ screen. First step: open this path on the destination app:
5
+
6
+ ```text
7
+ /app/import
8
+ ```
9
+
10
+ Upload a supported source export, review the plan and its differences, then
11
+ approve that exact plan to apply it. Reconcile the result against native data;
12
+ use Undo from the same history when needed. Base's reference accepts people JSON
13
+ here, not installation `.rer` archives. Editions adopt this same door
14
+ with their own supported readers and native adapters.
15
+
3
16
  `exportVendor(vendor, {key, inputs, checkpoint, signal})` is an async generator.
4
17
  It yields `{name, bytes: Buffer, checkpoint}`. Keys remain in memory and are
5
18
  attached only to GET requests on the adapter's fixed HTTPS origin. Redirects,
package/cli/contract.mjs CHANGED
@@ -12,8 +12,8 @@ const definitions = {
12
12
  verify: [[], 'Run the complete internal verification target.'],
13
13
  reset: [['--yes'], 'Confirmed removal of the declared local inventory only.'],
14
14
  deploy: [['--owner-name', '--environment', '--dry-run', '--site', '--demo', '--host', '--env-file', '--image', '--bind-address', '--http-port', '--https-port', '--remove', '--yes', '--set-secret', '--unset-secret', '--rotate-secret'], 'Owner-account deployment and health; dry run validates/builds locally and reads target secret bindings with Cloudflare credentials, without provider writes. Missing required secrets fail as in deploy; missing credentials or unreadable target secrets also fail. Builds and deploy hooks run with the checkout\'s local settings files moved aside, and a build output holding one (.dev.vars, .env) is refused. Declared secrets come from the environment or --env-file (an owned 0600 KEY=VALUE file); a new Worker gets the local setup owner and fresh generated secrets when they are not given. rer keeps the secrets it generates in .rer/deploy/ENVIRONMENT.secrets.env (0600) and reuses them on every redeploy; it refuses to generate a replacement for one a live Worker holds, and --rotate-secret NAME[,NAME] replaces them on purpose. After a healthy deploy rer claims the setup owner on the hosted app with the saved setup owner name and the one-time setup token, then removes the token. If the installer declares an owner-name field and no name is saved, deploy asks once and saves it; --non-interactive requires --owner-name NAME before any upload. --set-secret NAME[,NAME] (each value from the environment or --env-file; repeat the flag or join names with commas) and --unset-secret NAME[,NAME] change those secrets of the deployed Worker without a build, all of them in one new Worker version or none, and record that version; a missing value refuses before any change. --remove --yes deletes what this environment\'s deploy record says rer created (Worker, D1, R2, KV, queues), reads back that each is gone, and touches nothing else. --site deploys the run site instead: an assets-only Worker on its custom domain with www redirected; with --dry-run it builds the site and prints the plan with no provider request. --demo deploys the hosted demo instead (deploy-demo.json): a front Worker on demo.<domain> giving each visitor their own signed-in, throwaway native Worker isolate of this seed with real public reads/checks and simulated external writes; --dry-run writes it to .rer/demo-host with no provider request; --demo --remove --yes deletes that demo (its Worker, demo.<domain> Custom Domain, each only while the record its deploy left proves it the demo\'s), reads back that each is gone, and is a no-op once it is.'],
15
- export: [['--target', '--output', '--origin', '--session-file'], 'Complete supported archive of the local copy on this computer, with integrity and exclusions, written to --output. The hosted install cannot be exported yet: --origin or --target remote refuses (exit 2) before any effect and names the command that saves the hosted database.'],
16
- import: [['--target', '--input', '--journal', '--origin', '--session-file', '--yes', '--legacy-v1', '--acknowledge-unverified-metadata', '--output'], 'Confirmed atomic restore into an empty destination; --journal LATER_ARCHIVE also fences rows that installation erased since. Backup-only local v1 recovery requires --legacy-v1 --acknowledge-unverified-metadata and a new --output v2 archive; --journal requires normal v2 import.'],
15
+ export: [['--target', '--output', '--origin', '--session-file'], 'For owner move-in, run rer dev and open /app/import: export people there, then upload through the destination door. Developer-only installation backup: complete supported archive of the local copy on this computer, with integrity and exclusions, written to --output. The hosted install cannot be exported yet: --origin or --target remote refuses (exit 2) before any effect and names the command that saves the hosted database.'],
16
+ import: [['--target', '--input', '--journal', '--origin', '--session-file', '--yes', '--legacy-v1', '--acknowledge-unverified-metadata', '--output'], 'For owner move-in, run rer dev and open /app/import: upload, review and apply through the door. Developer-only installation recovery: confirmed atomic restore into an empty destination; --journal LATER_ARCHIVE also fences rows that installation erased since. Backup-only local v1 recovery requires --legacy-v1 --acknowledge-unverified-metadata and a new --output v2 archive; --journal requires normal v2 import.'],
17
17
  doctor: [[], 'Read-only installed tool, configuration and state diagnostics.'],
18
18
  describe: [[], 'Read-only description of actual command capabilities.'],
19
19
  check: [['--profile'], 'Read-only structural command contract and operations validation.'],
package/cli/parse.mjs CHANGED
@@ -106,7 +106,8 @@ export function parse(argv, cwd = process.cwd(), { independent = false, deferTai
106
106
  export function help(verb) {
107
107
  if (!verb) return `Usage: rer VERB [FLAGS]\nCommands: ${Object.keys(verbs).join(', ')}, signin, release\nRun rer VERB --help for flags.\n`;
108
108
  const known = verbs[verb] ?? (verb === 'signin' ? signinVerb : undefined);
109
- return `Usage: rer ${verb} [FLAGS]\nFlags: ${(known?.flags ?? commonFlags).join(', ')}\n${known?.effects ?? 'Execute the declared OPERATIONS v2 argv with explicit arguments after --.'}\n`;
109
+ const door = ['export', 'import'].includes(verb) ? 'To move records, start the app and open its signed-in owner import door:\n\n rer dev\n\nOpen /app/import, then export or upload and review supported records there.\n\nTo back up or restore this installation:\n' : '';
110
+ return `${door}Usage: rer ${verb} [FLAGS]\nFlags: ${(known?.flags ?? commonFlags).join(', ')}\n${known?.effects ?? 'Execute the declared OPERATIONS v2 argv with explicit arguments after --.'}\n`;
110
111
  }
111
112
 
112
113
  function distance(a,b){let row=Array.from({length:b.length+1},(_,i)=>i);for(let i=1;i<=a.length;i++){const next=[i];for(let j=1;j<=b.length;j++)next[j]=Math.min(next[j-1]+1,row[j]+1,row[j-1]+(a[i-1]===b[j-1]?0:1));row=next;}return row[b.length];}
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.2.64
4
+
5
+ - **Records start at one import door (#296).** The default seed uses upload, review, apply, reconcile and undo; the legacy importer is removed. Records export/import docs, templates and CLI help start at the door. Installation archives remain a separate backup/restore path. Adopting seeds follow [ADOPTING.md](../modules/import-kit/src/door/ADOPTING.md).
6
+ - **Documented shared-door limits remain.** Erasing a completed head blocks later plans in that lineage. Retired email-labelled jobs return `409 plan_custody_mismatch` on status/undo.
7
+ - **Readable contract progress (#301).** The shared /contract stat block and clause table wrap without overlap from 360 to 2560 pixels.
8
+
3
9
  ## 0.2.63
4
10
 
5
11
  - **Business connect waits for approval and keeps durable state (#277).** Pairing resumes after interruption, sends a readable device name and working folder, and accepts an explicit `RER_BUSINESS_STATE_DIR` when the usual state folder is unwritable. A refused macOS Keychain write stops before redeeming the code and explains how to approve the command outside the sandbox. Browser choices remain authoritative.
@@ -1,5 +1,18 @@
1
1
  # Portable container hosting
2
2
 
3
+ To bring existing data into a seed, sign in as the owner and use its import
4
+ screen. First step: open this path on the destination app:
5
+
6
+ ```text
7
+ /app/import
8
+ ```
9
+
10
+ Upload a supported source export, review the plan and its differences, then
11
+ approve that exact plan to apply it. Reconcile the result against native data;
12
+ use Undo from the same history when needed. Base's reference accepts people JSON
13
+ here, not installation `.rer` archives. Editions adopt this same door
14
+ with their own supported readers and native adapters.
15
+
3
16
  An image contains the seed's real Vite server/client build, migrations and the
4
17
  shared host. Workers remains the default. Opt in with `platforms` in `deploy.json`:
5
18
 
@@ -98,7 +111,8 @@ supervises the process; an unexpected runner exit stops the host so Compose can
98
111
  restart the complete unit. The runner owns its transport's public-address
99
112
  validation and TLS behavior.
100
113
 
101
- Local container export/import uses the same Base archive service and exclusion
114
+ To back up and restore this installation in a local container, use the same
115
+ Base archive service and exclusion
102
116
  policy as Workers. Stop the serving process first: one-shot transfers acquire
103
117
  the same volume lock. `rer archive diff BEFORE AFTER` verifies both entire
104
118
  archives, then reports added/removed/changed row keys, objects and payloads.
@@ -1,5 +1,18 @@
1
1
  # Application dependency links
2
2
 
3
+ To bring existing data into a seed, sign in as the owner and use its import
4
+ screen. First step: open this path on the destination app:
5
+
6
+ ```text
7
+ /app/import
8
+ ```
9
+
10
+ Upload a supported source export, review the plan and its differences, then
11
+ approve that exact plan to apply it. Reconcile the result against native data;
12
+ use Undo from the same history when needed. Base's reference accepts people JSON
13
+ here, not installation `.rer` archives. Editions adopt this same door
14
+ with their own supported readers and native adapters.
15
+
3
16
  This module implements the application side of the pull-link protocol. Auth's
4
17
  provider implementation (auth-7) is separate. `createDependencies` mounts the
5
18
  well-known routes and owner controls; `AuthConfig.dependencies: true` resolves
@@ -180,7 +193,9 @@ refused. Credential consumers must record/check the fence; the provided
180
193
  with no recorded fence. Editor grants require the actual current install owner;
181
194
  OIDC sessions must also match that owner's current issuer/subject account binding.
182
195
 
183
- Exports omit server link keys, approvals, code state, provider sessions and OIDC
196
+ To back up and restore this installation, apply the following identity policy
197
+ to its archives. This is separate from bringing records in through the door.
198
+ Archives omit server link keys, approvals, code state, provider sessions and OIDC
184
199
  transients, preserve durable people/bindings/grant use/sector, set sign-in off and
185
200
  mark links as needing re-link. Import checks these conditions and requires an
186
201
  explicit fresh provider approval. Local `rer import` returns `needsRelink: true`
@@ -1,5 +1,18 @@
1
1
  # Subject erasure
2
2
 
3
+ To bring existing data into a seed, sign in as the owner and use its import
4
+ screen. First step: open this path on the destination app:
5
+
6
+ ```text
7
+ /app/import
8
+ ```
9
+
10
+ Upload a supported source export, review the plan and its differences, then
11
+ approve that exact plan to apply it. Reconcile the result against native data;
12
+ use Undo from the same history when needed. Base's reference accepts people JSON
13
+ here, not installation `.rer` archives. Editions adopt this same door
14
+ with their own supported readers and native adapters.
15
+
3
16
  This dependency-free source module erases one subject (a person, contact,
4
17
  requester, booking and so on) and everything a seed declares as depending on
5
18
  it, for BASE-DATA-003. Audit records survive with an anonymised reference
@@ -163,7 +176,8 @@ the seed retires them in its own migration.
163
176
  only the subject), so an older archive that contains any of those rows is
164
177
  refused on restore. The fence's own limit stays: an old archive offered to a
165
178
  brand-new store that has no journal cannot be recognised. Supply the owner's
166
- later journal there (`rer import --journal LATER_ARCHIVE`).
179
+ later journal there (restore this installation with
180
+ `rer import --journal LATER_ARCHIVE`, separate from the reviewed import door).
167
181
  - **import-kit.** `nativeStatements(entity, subject)` returns the whole D1 phase
168
182
  as `{sql, params}` statements for `eraseD1ImportTarget(kind, id,
169
183
  nativeStatements, context)`. Kit custody, the product cascade and the fence
@@ -1,5 +1,22 @@
1
1
  # Portable installation data
2
2
 
3
+ To bring existing data into a seed, sign in as the owner and use its import
4
+ screen. First step: open this path on the destination app:
5
+
6
+ ```text
7
+ /app/import
8
+ ```
9
+
10
+ Upload a supported source export, review the plan and its differences, then
11
+ approve that exact plan to apply it. Reconcile the result against native data;
12
+ use Undo from the same history when needed. Base's reference accepts people JSON
13
+ here, not installation `.rer` archives. Editions adopt this same door
14
+ with their own supported readers and native adapters.
15
+
16
+ Use this module to back up and restore this installation, separately from
17
+ bringing records in through the reviewed import door. Its restore has no door
18
+ plan or Undo, and the door does not accept its `.rer` archives.
19
+
3
20
  This dependency-free source module exports and restores one installation's D1
4
21
  tables, R2 objects and optional named byte payloads. It is generalised from the
5
22
  Penny and Orbit seeds, with atomic graph restoration from Lamp. Products retain
@@ -1,5 +1,18 @@
1
1
  # Shared local setup lifecycle
2
2
 
3
+ To bring existing data into a seed, sign in as the owner and use its import
4
+ screen. First step: open this path on the destination app:
5
+
6
+ ```text
7
+ /app/import
8
+ ```
9
+
10
+ Upload a supported source export, review the plan and its differences, then
11
+ approve that exact plan to apply it. Reconcile the result against native data;
12
+ use Undo from the same history when needed. Base's reference accepts people JSON
13
+ here, not installation `.rer` archives. Editions adopt this same door
14
+ with their own supported readers and native adapters.
15
+
3
16
  First-party seeds expose public operations through the RER dispatcher. From a
4
17
  runnable seed checkout, the supported local sequence begins with
5
18
  `rer install`, `rer setup` and
@@ -195,11 +208,13 @@ exports and deployment receipts.
195
208
 
196
209
  ## Data, deployment and verification
197
210
 
198
- Each first-party adapter declares which resources local export/import supports.
211
+ To back up and restore this installation, use the local archive runner. This
212
+ is separate from bringing records in through the reviewed import door. Each
213
+ first-party adapter declares which resources that archive export/restore supports.
199
214
  Every first-party seed verifies a complete local export/import/export round
200
215
  trip across those resources. Archives are private and integrity-checked;
201
216
  owner/auth, historical development mail, private settings and transient runtime state remain
202
- excluded. Import validates and restores atomically into an empty destination.
217
+ excluded. Archive restore validates and restores atomically into an empty destination.
203
218
  Remote transfer is supported only when every required resource has a complete
204
219
  adapter implementation; unsupported targets fail visibly.
205
220
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@runeditrun/rer",
3
- "version": "0.2.63",
3
+ "version": "0.2.64",
4
4
  "description": "The rer command: install, set up, run and launch Run Edit Run checkouts.",
5
5
  "license": "MIT",
6
6
  "type": "module",