@bluestep-systems/b6p-cli 0.7.0 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -5,6 +5,88 @@ All notable changes to `@bluestep-systems/b6p-cli` will be documented in this fi
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.8.0] — 2026-09-25
9
+
10
+ ### Changed (breaking, user-visible)
11
+
12
+ - **`--yes` and an empty answer now decline overwrites and deletes.** Core 0.8.0 puts the safe
13
+ answer first in every prompt that overwrites or deletes something on the platform (`[Cancel] /
14
+ Overwrite all`, `[No] / Yes`), and `--yes` or pressing Enter takes that first answer. Before, `--yes`
15
+ overwrote files changed on the platform and deleted platform-only files without showing either
16
+ question. A script or agent that relies on `--yes` now gets exit `1` where it used to overwrite
17
+ (with the command that confirms the files), and keeps platform-only files where it used to delete
18
+ them (exit `0`). The old per-file answer `Overwrite` no longer matches the question, so it declines
19
+ too; the answer is now `Overwrite all`.
20
+ - **`--yes` now prints every question it answers**, with the options and the answer it took, on
21
+ stderr (also with `--json`). A destructive prompt says `--yes` never confirms an overwrite or a
22
+ delete.
23
+
24
+ ### Added
25
+
26
+ - **`b6p push --overwrite <path>`** (repeatable) confirms overwriting that file on the platform up
27
+ front, so a push that `--yes` would stop can go through for exactly the files you checked. The
28
+ path is the one the overwrite question lists (e.g. `scripts/app.ts`).
29
+ - **A declined overwrite now says how to go on**: after core's message (which files, and why), the
30
+ CLI prints the command that repeats the push with one `--overwrite` per file. A push that kept
31
+ platform-only files prints the command that deletes them (without `--yes`, answering `Yes`). Both
32
+ are quoted for your shell: POSIX, or PowerShell on Windows outside Git Bash / MSYS.
33
+ - **`--json` for a declined overwrite.** The push used to print nothing on stdout; it now prints the
34
+ same object as any push, with `pushed: false` and the files in a new `declinedOverwrites` field
35
+ (`[]` on every other push), and exits `1`.
36
+ - **`b6p auth set` refuses a gateway token.** A value starting with `b6pt_` is the token for the
37
+ BlueStep AI tools, not the CLI; storing it made every later call fail with `HTTP Error: 401`. It is
38
+ now refused with a message saying so, and nothing is stored (exit `1`). The same check runs on the
39
+ token question any command asks on first use.
40
+ - **`b6p --help` and `b6p push --help`** say what `--yes` answers, the two questions a push can
41
+ ask, `--overwrite`, piping answers, the exit codes and the `--json` shape.
42
+
43
+ ### Changed
44
+
45
+ - **One overwrite question per push, before anything is uploaded.** Core 0.8.0 lists every file
46
+ that would overwrite a platform change in a single `[Cancel] / Overwrite all` question, so a
47
+ declined or unanswered question can no longer leave a push half done. New files and files already
48
+ equal to the platform copy no longer ask.
49
+ - **Bundles `@bluestep-systems/b6p-core` 0.8.0.** A snapshot push now checks, before uploading
50
+ anything, that the compiled `scripts/app.js` exists and has code; checks every upload to
51
+ `snapshot/`; and reads each live copy back afterwards, sending it again once if it doesn't match.
52
+ A re-push also repairs a live copy left stale by an earlier failed push, even when nothing changed
53
+ locally.
54
+
55
+ ### Fixed
56
+
57
+ - **`b6p push --snapshot` no longer exits `0` when the live version is broken.** It exits `1` when
58
+ nothing was uploaded (`pushed: false`, e.g. a blank or types-only `app.ts`) and when a live copy
59
+ is still missing, unreadable or different after the re-send (`liveVerified: false`, with the files
60
+ in `liveMismatches`). `--json` prints the new fields (`liveVerified`, `liveMismatches`,
61
+ `keptPlatformOnly`). A copy served without a content hash can't
62
+ be compared (`liveVerified: null`): that prints a warning on stderr and still exits `0`.
63
+ - **A refused upload prints its details once**, not a second time after `[ERROR] Failed to push …`.
64
+ - **Piped answers reach every prompt, not only the first.** When stdin delivers every line at once
65
+ (`printf 'Overwrite all\nYes\n' | b6p push …`, or `< answers.txt`), the second line used to arrive
66
+ while no prompt was waiting and was lost, so the second prompt failed with "No input available".
67
+ Each line now answers the next prompt. On a non-terminal stdin the answer is written after its
68
+ prompt, so the output shows what was answered (never for a token).
69
+ - **An answer that matches none of a prompt's options now says so** (`"Overwrite" is not one of the
70
+ answers (Cancel, Overwrite all), so none was chosen.`) instead of declining silently.
71
+
72
+ ## [0.7.0] — 2026-08-24
73
+
74
+ Entry added on 2026-09-25: this release shipped without one.
75
+
76
+ ### Changed
77
+
78
+ - **Bundles `@bluestep-systems/b6p-core` 0.7.0.** The type-check a snapshot push runs before
79
+ publishing now loads the component's declaration files, so platform globals (`B`, `console`,
80
+ `Bluestep`, `Record_*`, …) no longer come back as hundreds of false `Cannot find name`
81
+ diagnostics. What remains is real.
82
+
83
+ ### Fixed
84
+
85
+ - **`b6p push --snapshot` exits `1` when the type-check reported diagnostics.** The platform runs
86
+ the emitted JavaScript without type-checking it, so this push is the only type gate; CI can now
87
+ catch a publish that went out un-type-checked. A plain push (no compile) and a clean snapshot
88
+ still exit `0`. Client-bundle diagnostics (e.g. a merge report's `static/`) stay advisory.
89
+
8
90
  ## [0.6.1] — 2026-08-21
9
91
 
10
92
  ### Changed
package/README.md CHANGED
@@ -67,14 +67,51 @@ The npm install above is unchanged and remains the recommended path wherever Nod
67
67
  | `b6p pull --file <path>` | Pull using metadata stored with a local file |
68
68
  | `b6p push --file <path>` | Push local files to the platform |
69
69
  | `b6p push --file <path> --snapshot --message "…"` | Push and record a versioned snapshot |
70
+ | `b6p push --file <path> --overwrite <file>` | Push, overwriting a file that changed on the platform |
70
71
  | `b6p audit --file <path>` | Diff local vs. server |
71
72
  | `b6p audit --file <path> --pull` | Audit and pull if differences found |
72
73
  | `b6p deploy <config.json>` | Multi-target deploy from a config file |
73
74
  | `b6p setup --file <path>` | Print the web-UI setup URL for a script |
74
75
  | `b6p report` | Report cached state |
76
+ | `b6p auth set` | Store or replace your CLI access token (a gateway token, `b6pt_…`, is refused) |
75
77
 
76
- Most commands accept `--json` for machine-readable output and `--yes` to skip
77
- interactive prompts. Run `b6p <command> --help` for full options.
78
+ Most commands accept `--json` for machine-readable output and `--yes` to answer every question with
79
+ its default (and print what it answered). Run `b6p <command> --help` for full options.
80
+
81
+ ## Pushing
82
+
83
+ A push can ask two questions. Both default to the safe answer, which `--yes` and an empty answer
84
+ take, so `--yes` never overwrites or deletes anything on the platform:
85
+
86
+ 1. **Before uploading anything**, when files would overwrite a platform version nobody here has seen
87
+ (it changed on the platform since your last push or pull, or this machine never synced it):
88
+ `[Cancel] / Overwrite all`. One question lists every such file; Cancel stops the push with nothing
89
+ uploaded (exit `1`). New files and files already equal to the platform copy never ask.
90
+ 2. **After uploading**, when the platform has files your draft doesn't: `[No] / Yes` to delete them.
91
+ No keeps them (exit `0`).
92
+
93
+ When question 1 is declined, the CLI prints the command that confirms it. After checking the
94
+ platform versions (`b6p audit`), confirm specific files up front with `--overwrite`, once per file,
95
+ using the path the question listed:
96
+
97
+ ```bash
98
+ b6p --yes push --file <path> --snapshot --overwrite scripts/app.ts --overwrite README.md
99
+ ```
100
+
101
+ Question 2 has no flag: run without `--yes` and answer `Yes`. Answers can be piped, one line per
102
+ question, in order (`printf 'Overwrite all\nYes\n' | b6p push --file <path>`, or `< answers.txt`;
103
+ in PowerShell, `'Overwrite all', 'Yes' | b6p push --file <path>`). The commands the CLI prints are
104
+ written for your shell: POSIX, or PowerShell on Windows outside Git Bash.
105
+
106
+ **Exit codes:** `0` when the push went through (keeping platform-only files is still `0`); `1` when
107
+ nothing was uploaded, an overwrite was not confirmed, an upload was refused, or, on a snapshot, a
108
+ live copy is still wrong after one re-send, the history entry wasn't recorded, or type-check
109
+ diagnostics were reported.
110
+
111
+ **`--json`** prints one object on stdout: `pushed`, `historyRecorded`, `typeCheckDiagnostics`,
112
+ `liveVerified`, `liveMismatches`, `keptPlatformOnly`, `declinedOverwrites`. A declined overwrite
113
+ prints `pushed: false` with the files in `declinedOverwrites`. Questions, warnings and next steps
114
+ go to stderr.
78
115
 
79
116
  ## WebDAV URL format
80
117