@rehearsal-db/core 0.1.0-rc.9 → 1.0.1

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 (37) hide show
  1. package/CHANGELOG.md +52 -1
  2. package/COMPATIBILITY.md +56 -8
  3. package/README.md +31 -12
  4. package/SECURITY.md +5 -3
  5. package/SUPPORT.md +4 -3
  6. package/dist/package.json +3 -3
  7. package/dist/scripts/install/create_root_config.mjs +9 -2
  8. package/dist/src/application/interactive_task.d.mts +2 -6
  9. package/dist/src/application/interactive_task.mjs +4 -13
  10. package/dist/src/application/session.d.mts +5 -8
  11. package/dist/src/application/session.mjs +44 -19
  12. package/dist/src/cli/arguments.mjs +8 -1
  13. package/dist/src/cli/rehearsal.mjs +27 -5
  14. package/dist/src/cli/runtime_commands.mjs +16 -17
  15. package/dist/src/cli/runtime_planning.mjs +6 -0
  16. package/dist/src/cli/terminal.mjs +24 -5
  17. package/dist/src/project/install_scaffold.mjs +7 -0
  18. package/dist/src/project/project_discovery_metadata.mjs +9 -11
  19. package/dist/src/runtime/persistence.mjs +6 -3
  20. package/dist/src/runtime/plan.mjs +26 -15
  21. package/dist/src/shared/cancellation.d.mts +3 -1
  22. package/dist/src/shared/cancellation.mjs +12 -4
  23. package/dist/src/shared/host_platform.d.mts +16 -0
  24. package/dist/src/shared/host_platform.mjs +109 -0
  25. package/dist/src/shared/process_environment.d.mts +2 -1
  26. package/dist/src/shared/process_environment.mjs +47 -5
  27. package/dist/src/shared/terminal_input.d.mts +25 -0
  28. package/dist/src/shared/terminal_input.mjs +129 -0
  29. package/docs/commands.md +17 -1
  30. package/docs/getting-started.md +48 -0
  31. package/docs/index.md +15 -9
  32. package/docs/releasing.md +50 -24
  33. package/docs/roadmap.md +8 -3
  34. package/docs/stability.md +48 -19
  35. package/docs/tutorial.md +1 -1
  36. package/docs/vscode.md +199 -41
  37. package/package.json +3 -3
package/docs/vscode.md CHANGED
@@ -4,6 +4,22 @@ The Rehearsal extension turns the local CLI into a project-aware database-change
4
4
  workbench. It is for developers who want the safety of exact migration plans and disposable
5
5
  local runtimes without memorizing every command.
6
6
 
7
+ This guide targets **Free Starter 0.1.21**, named **Rehearsal DB** on
8
+ [VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=rehearsal-db.rehearsal-db),
9
+ with a [reviewed GitHub VSIX](https://github.com/Ddupasquier/rehearsal-vscode/releases/tag/v0.1.21)
10
+ for direct installation. The canonical extension ID is **`rehearsal-db.rehearsal-db`**,
11
+ published by **`rehearsal-db`**. The workbench and commands retain the **Rehearsal** brand.
12
+ All included features are free indefinitely for personal or commercial development.
13
+ No account, payment card, purchase, trial period, or license activation is required.
14
+ The CLI is separately available on [npm](https://www.npmjs.com/package/@rehearsal-db/core)
15
+ under the MIT license. There is no paid CLI tier.
16
+ Confirm the target version appears in its official channel before installing. A guide
17
+ or checked-in version does not mean that publication has completed.
18
+
19
+ Already using the GitHub preview through 0.1.18? Follow the
20
+ [one-time migration steps](#move-from-a-preview-through-0118) before installing the new
21
+ identity. This is not an automatic rename or uninstall.
22
+
7
23
  ## What you can do
8
24
 
9
25
  - See what Rehearsal detected, what it suggests, and what still needs your decision.
@@ -14,6 +30,11 @@ local runtimes without memorizing every command.
14
30
  - Export a privacy-safe verification report and review bounded local activity.
15
31
  - Keep the sidebar and open workbench current when another terminal changes the project's
16
32
  Rehearsal package, lockfile, manifest, or known configuration.
33
+ - Browse resource inventories in independent pages of 5, 10 or 25 cards, rather than
34
+ one unbounded list.
35
+ - Read a configuration diff before choosing **Apply changes** or **Cancel**, then
36
+ return to the project from the saved result.
37
+ - Choose independent, initially off automatic-update options for the extension and CLI.
17
38
 
18
39
  The extension does not become a second database engine. Rehearsal core still owns data
19
40
  boundaries, baselines, migration digests, runtime isolation, locks, rollback, and cleanup.
@@ -22,6 +43,11 @@ boundaries, baselines, migration digests, runtime isolation, locks, rollback, an
22
43
 
23
44
  Use desktop VS Code 1.101 or newer on macOS or Linux and a supported Node.js release
24
45
  (22, 24, or 26). You do not need the extension source repository or Test Lab.
46
+ For a Windows desktop, use the [WSL 2 Linux-workspace setup](getting-started.md#windows-use-a-wsl-2-linux-workspace).
47
+ With editor 0.1.21, native Windows inspection and foreground actions refuse before launching a child
48
+ process and directs you to Remote-WSL. Install the extension into the Linux extension
49
+ host and keep the project on its Linux filesystem. WSL compatibility remains a preview;
50
+ real WSL core fixtures do not certify a native Remote-WSL editor walkthrough.
25
51
 
26
52
  1. Open your application's folder in VS Code—the one containing `package.json` and
27
53
  your migrations. Install Rehearsal there if it is missing:
@@ -30,31 +56,154 @@ Use desktop VS Code 1.101 or newer on macOS or Linux and a supported Node.js rel
30
56
  npm install --save-dev @rehearsal-db/core
31
57
  ```
32
58
 
33
- 2. Open the [reviewed GitHub prereleases](https://github.com/Ddupasquier/rehearsal-vscode/releases).
34
- Download the chosen release's `.vsix` and `SHA256SUMS`. Compare the file's SHA-256
35
- with that release's checksum; do not substitute an unreviewed rebuild.
36
- 3. In VS Code, open **Extensions → … → Install from VSIX…** and choose that file.
37
- Reload the extension host if VS Code asks.
38
- 4. Review Workspace Trust, then open the Command Palette and choose
59
+ 2. Open **Extensions** and search **`@id:rehearsal-db.rehearsal-db`**, or open the
60
+ [official Rehearsal DB listing](https://marketplace.visualstudio.com/items?itemName=rehearsal-db.rehearsal-db).
61
+ Confirm publisher **`rehearsal-db`** and the full extension ID, then choose **Install**.
62
+ The similar-looking legacy ID `rehearsal-db.rehearsal` is not the canonical package.
63
+ If you prefer a direct download, use the verified GitHub VSIX instructions below.
64
+ 3. Review Workspace Trust, then open the Command Palette and choose
39
65
  **Rehearsal: Open Dashboard**. The Rehearsal sidebar also has a dashboard button.
40
- 5. Follow **Next best step**. Review the detected project and active configuration;
66
+ 4. Follow **Next best step**. Review the detected project and active configuration;
41
67
  setup, source access, migration execution and cleanup keep their own confirmations.
42
68
 
43
- The extension needs `@rehearsal-db/core@0.1.0-rc.4` or newer. A project that is not ready
44
- should show setup guidance, not require you to build the extension. Use
69
+ The release pairing described here is core **1.0.1** with Starter **0.1.21**.
70
+ Install it once both versions appear in their official release channels.
71
+ The extension's minimum core is `0.1.0-rc.4`. A project that is not ready should show
72
+ setup guidance, not require you to build the extension. Opening the dashboard does not
73
+ start a database or run a migration. Use
45
74
  [Getting started](getting-started.md) for the CLI and safe baseline inputs.
46
75
 
47
- ## Updates
48
-
49
- GitHub VSIX installations do not auto-update. Download and verify the next reviewed
50
- release, then use **Install from VSIX…** again. Keep the previous reviewed file for
51
- rollback. See the extension's [installation guide](https://github.com/Ddupasquier/rehearsal-vscode#install-and-open-your-project)
52
- for checksum commands and the optional command-line installer.
53
-
54
- Updating the project's core package is separate: its manifest, lockfile and installed
55
- metadata trigger a narrow read-only refresh automatically. You do not reload the VS Code
56
- window after an ordinary core-package update. Replacing the VSIX may require VS Code's
57
- one-time extension-host reload so the new extension code becomes active.
76
+ Native Windows inspection refusal is not database-runtime support. Browser-based
77
+ VS Code, Codespaces, SSH and Dev Containers have no end-to-end support claim.
78
+ Native Windows means the Windows Node/extension host, not a Windows desktop
79
+ connected to WSL. iOS/iPadOS, Android, BSD and unlisted systems are not
80
+ supported by this desktop/local-runtime release. Consult the
81
+ [platform matrix](https://github.com/Ddupasquier/rehearsal-db/blob/main/COMPATIBILITY.md#operating-systems-and-execution-location) for the
82
+ distinction between desktop OS, extension host, architecture and actual database proof.
83
+
84
+ ### Direct GitHub installation
85
+
86
+ The verified GitHub VSIX is an alternative to Marketplace. Open the
87
+ [Starter 0.1.21 release](https://github.com/Ddupasquier/rehearsal-vscode/releases/tag/v0.1.21).
88
+ Under **Assets**, download `rehearsal-db-0.1.21.vsix` and `SHA256SUMS`. In a terminal,
89
+ run `shasum -a 256 /path/to/rehearsal-db-0.1.21.vsix` on macOS or
90
+ `sha256sum /path/to/rehearsal-db-0.1.21.vsix` on Linux. Compare the result with that
91
+ release's `SHA256SUMS`; stop if they differ. Do not substitute a local rebuild.
92
+ Then open **Extensions → … → Install from VSIX…** and choose the verified file.
93
+ Save your work and reload only if VS Code asks.
94
+
95
+ ### Move from a preview through 0.1.18
96
+
97
+ Earlier GitHub previews use `rehearsal-db.rehearsal`, a separate VS Code identity.
98
+ Their released 0.1.18 bytes, tag and checksum remain available and unchanged. Its updater
99
+ looks for `rehearsal-<version>.vsix`, so it ignores the canonical
100
+ `rehearsal-db-<version>.vsix` family instead of silently switching identities.
101
+
102
+ 1. Finish Rehearsal commands in all open project windows. If a sandbox app is open,
103
+ press **Ctrl+C** once in its owning terminal and wait for its normal shell prompt
104
+ and configured lifecycle result. Save your work.
105
+ 2. Explicitly uninstall the legacy extension: in **Extensions**, search
106
+ **`@id:rehearsal-db.rehearsal`**, then use its gear menu → **Uninstall**.
107
+ 3. Save remaining files and run **Developer: Reload Window**. Ensure the old extension
108
+ is no longer installed in each profile where you will use the canonical version.
109
+ 4. Install **Rehearsal DB**, ID **`rehearsal-db.rehearsal-db`**, using Marketplace or the
110
+ verified canonical VSIX above. Reload if asked, reopen the dashboard and review your
111
+ update preferences.
112
+
113
+ The canonical extension refuses activation whenever VS Code still reports the legacy ID.
114
+ Not currently active is not proof that an installed extension is disabled; uninstalling
115
+ and reloading is the supported route. The extension does not automatically uninstall,
116
+ disable or rename your existing installation, interrupt a command or force a reload.
117
+
118
+ This identity change does not reset or modify databases, Storage, project configuration,
119
+ keys or baselines. Private per-extension view state, activity history and metadata-check
120
+ consent are not copied to the new identity; re-select views and review consent there.
121
+ Shared VS Code user settings, including `rehearsal.automaticUpdates`, retain your existing
122
+ values. Review or disable those flags before migration if desired. Do not run database
123
+ cleanup or **Reset Saved Editor State** as a migration step.
124
+
125
+ ## Everyday editor workflow
126
+
127
+ Use **Overview** for the next safe step, **Migrations** to review the complete ordered
128
+ candidate set, and **Environments** for local resource inventory. Filters and sorting
129
+ apply to the full inventory before pagination. Each list has its own **Previous/Next**
130
+ controls and **5/10/25** page size. Paging preserves drafts and selections; bulk image
131
+ selection selects safe candidates on the current page only. Off-page selections remain
132
+ counted and can be cleared before the exact cleanup review. Display filters never narrow
133
+ database cleanup ownership or the required migration set.
134
+
135
+ For configuration, change only the values you intend to change, then choose
136
+ **Review exact configuration diff** or **Review name & protection**. The review tab
137
+ keeps the full diff readable. **Cancel** makes no changes; **Apply changes** saves the
138
+ reviewed change. Wait for **Saved**, then choose **Return to project**. Concurrent edits
139
+ refuse safely instead of overwriting someone else's work; a saved confirmation is tied
140
+ to the exact bytes read back from disk, not merely a completed write request.
141
+
142
+ Commands reuse the same Rehearsal terminal for a project only after its previous command
143
+ has a confirmed exit and its directory still matches. A running sandbox or manually
144
+ entered foreground command is never interrupted to make room for another action. If
145
+ shell integration or completion evidence is unavailable, finish the command and close
146
+ that terminal before retrying. An idle database lock is not proof that a terminal is free.
147
+
148
+ **Open sandbox** is a persistent hands-on session, not a task that should finish while
149
+ you browse. Overview distinguishes **Opening sandbox**, **Sandbox running** and
150
+ **Closing sandbox** from core phase evidence. Missing evidence says **Sandbox session
151
+ open**, not ready. Project inspection waits for that session; the app itself is not
152
+ paused. Use the local address shown by the owning terminal. **Open application** opens
153
+ that address without running another CLI command. Press **Ctrl+C** once in the owning
154
+ terminal when done, then wait for its shell prompt and the configured lifecycle result.
155
+
156
+ ## Optional automatic updates
157
+
158
+ Open **Rehearsal: Check for Updates** from the Command Palette, or use the dashboard's
159
+ **Check for updates** action. The prompt has two independent, initially unchecked choices:
160
+
161
+ - **Automatically keep the Rehearsal extension up to date**
162
+ - **Automatically keep Rehearsal CLI dependencies up to date**
163
+
164
+ Check the options you want, then choose **Save preferences**. Checking a box alone does
165
+ not save consent: **Later**, **Skip versions**, or closing the tab do not opt you in.
166
+ These choices are stored only in machine-scoped VS Code user settings, not your
167
+ repository or Settings Sync. A project cannot authorize automatic installation. You can
168
+ also edit the user setting directly:
169
+
170
+ ```json
171
+ "rehearsal.automaticUpdates": { "extension": true, "cli": false }
172
+ ```
173
+
174
+ Extension updates download only the official GitHub release, verify the checksum,
175
+ package identity and engine compatibility, and hand the local VSIX to VS Code's
176
+ installer. Rehearsal never forces a window reload; VS Code may ask you to reload when
177
+ you are ready to activate installed code. Keep the previous reviewed VSIX for rollback.
178
+ Canonical automatic updates require `rehearsal-db-<version>.vsix` and embedded identity
179
+ `rehearsal-db.rehearsal-db`; they do not automatically import or replace a legacy package.
180
+
181
+ CLI updates require the separate CLI opt-in. They update compatible registry-backed npm
182
+ dependencies in trusted, idle projects, preserve the dependency group, pin the exact
183
+ checked version and update the lockfile with install scripts disabled. Busy or
184
+ unknown-completion terminals, dirty dependency files, another window's update, offline
185
+ services and unverifiable artifacts defer the update rather than guessing. Breaking
186
+ upgrades, unsupported package managers and local/candidate provenance remain manual.
187
+ No migration, database lifecycle action or forced editor reload is requested.
188
+
189
+ Enabled automatic options check at project opening and daily while the editor stays
190
+ open; there is no separate background daemon. npm/GitHub receive ordinary connection
191
+ information and requested public releases, not project files, database data, credentials
192
+ or installed-version reports. Metadata-only advisory checks keep their separate consent.
193
+
194
+ Turn either option off to revoke its future automatic work. **Rehearsal: Configure
195
+ Update Checks → Disable updates** turns both automatic options off on this computer and
196
+ stops this project's release checks. Existing installations are not rolled back. An
197
+ interrupted package-manager update with unknown completion requires the support recovery
198
+ route; do not delete its coordination lock while a package manager may still be running.
199
+
200
+ Manual updating stays available: download and verify the next reviewed VSIX, then repeat
201
+ **Install from VSIX…**. See the release's
202
+ [installation guide](https://github.com/Ddupasquier/rehearsal-vscode/blob/v0.1.21/README.md#install-and-open-your-project).
203
+ An ordinary core-package update is detected from its manifest, lockfile and installed
204
+ metadata without reloading VS Code. The header shows loaded extension and core versions
205
+ separately; installed → newest appears only after a successful release check. Unknown or
206
+ offline availability is not proof that you are up to date.
58
207
 
59
208
  ## Privacy boundary
60
209
 
@@ -63,28 +212,37 @@ database access, or account. It does not read environment files, credentials, pr
63
212
  baseline contents, or project source. User-approved package operations and external links
64
213
  may use their own services.
65
214
 
66
- ## Licensing and planned editions
67
-
68
- The approved direction is a complete free MIT CLI, a useful free VS Code Starter, and
69
- optional paid Pro editor workflows. The [extension's edition guide](https://github.com/Ddupasquier/rehearsal-vscode/blob/main/docs/commercial-readiness.md)
70
- owns that planned split. Database and safety capabilities stay in the free CLI.
71
-
72
- The split is not implemented yet: current preview artifacts retain their bundled 14-day
73
- evaluation and per-user license, without a technical trial countdown or feature paywall.
74
- GitHub VSIX installations do not auto-update, so each reviewed delivery includes its exact
75
- version, compatible core range, checksum, privacy statement, license, and support policy.
76
-
77
- Technical GitHub prereleases are already public; they are not a Marketplace listing or
78
- an announcement of paid availability. A development candidate is not a released artifact
79
- merely because it has the same version number. Read the release's license, privacy and
80
- support documents before evaluation.
81
-
82
- Starter/Pro license terms and Marketplace distribution still need approval. Paid Pro
83
- availability also needs reviewed seller identity, checkout/refund arrangements and support
84
- ownership. Do not send payment based on an unofficial download or message. Native Windows,
85
- browser-based VS Code, Codespaces, SSH and Dev Containers are not yet claimed as supported.
215
+ ## License, support and future Pro
216
+
217
+ Starter 0.1.21 carries the same
218
+ [free Starter license](https://github.com/Ddupasquier/rehearsal-vscode/blob/v0.1.21/LICENSE).
219
+ Its current review, configuration, comparison and reporting tools are included; they
220
+ are not a timed evaluation or a paid feature gate. Free use does not mean the extension
221
+ is MIT-licensed: its bundled terms govern copying and redistribution. Core remains MIT.
222
+
223
+ Future optional Pro editor workflows must be separately identified. They cannot
224
+ retroactively remove Starter rights already granted for a received version. Pro pricing,
225
+ billing and entitlements are not implemented; no payment is needed to use Starter.
226
+ Database and safety capabilities stay in the free CLI. The
227
+ [edition guide](https://github.com/Ddupasquier/rehearsal-vscode/blob/v0.1.21/docs/commercial-readiness.md)
228
+ owns the detailed boundary.
229
+
230
+ Preview describes stability, not a trial countdown. Support is best effort, with no
231
+ service-level agreement, database hosting, backups or production support. Before use,
232
+ read the release's [privacy statement](https://github.com/Ddupasquier/rehearsal-vscode/blob/v0.1.21/PRIVACY.md)
233
+ and [support policy](https://github.com/Ddupasquier/rehearsal-vscode/blob/v0.1.21/SUPPORT.md).
234
+ Report editor problems in the
235
+ [Rehearsal issue tracker](https://github.com/Ddupasquier/rehearsal-db/issues), as
236
+ described in the support policy.
237
+ Use its [private security process](https://github.com/Ddupasquier/rehearsal-vscode/blob/v0.1.21/SECURITY.md)
238
+ for vulnerabilities; never post credentials, private rows or baseline files publicly.
239
+
240
+ Historical VSIX files retain their bundled terms. Choose a reviewed release carrying
241
+ the Starter license; a development candidate is not released merely because its version
242
+ number matches. The [release list](https://github.com/Ddupasquier/rehearsal-vscode/releases)
243
+ is the authority for downloadable artifacts and their checksums.
86
244
 
87
245
  ## Try the free engine first
88
246
 
89
247
  Start with [Getting started](getting-started.md). A successful CLI rehearsal proves the
90
- project and local runtime are compatible before you evaluate the visual workflow.
248
+ project and local runtime are compatible before you use the visual workflow.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rehearsal-db/core",
3
- "version": "0.1.0-rc.9",
3
+ "version": "1.0.1",
4
4
  "private": false,
5
5
  "description": "Catch PostgreSQL and Supabase migrations that pass on empty databases but fail on real data—before deploy.",
6
6
  "repository": {
@@ -76,9 +76,9 @@
76
76
  "test:fixture:standalone": "npm run build && node scripts/verification/run_scenario.mjs standalone",
77
77
  "test:fixture:privacy": "npm run build && node scripts/verification/run_scenario.mjs privacy",
78
78
  "test:fixture:resources": "npm run build && node scripts/verification/run_scenario.mjs resources",
79
- "release:verify": "node scripts/verification/release_gate.mjs",
79
+ "release:verify": "npm run build && node scripts/verification/release_gate.mjs",
80
80
  "check": "npm run check:syntax && npm run typecheck && npm run test && npm run docs:build && npm run format:check && npm run package:audit",
81
- "check:syntax": "find scripts tests -type f -name '*.mjs' -exec node --check {} +",
81
+ "check:syntax": "node scripts/verification/check_syntax.mjs",
82
82
  "typecheck": "npm run build && tsc --project tsconfig.json",
83
83
  "format": "prettier --write .",
84
84
  "format:check": "prettier --check .",