@bluestep-systems/b6p-cli 1.1.0 → 1.3.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,48 @@ 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
+ ## [Unreleased]
9
+
10
+ ## [1.3.0] — 2026-11-20
11
+
12
+ ### Added
13
+
14
+ - **`b6p marketplace create <name> [--description <t>] [--website <url>] [--topic <t>...]`** (b6p-core 1.4.0, ClickUp
15
+ 1k5g91bqxwk) creates an empty, private marketplace repository, or adopts an existing empty one an earlier attempt
16
+ left, and prints its clone URL. Needs `registry:push` and a fleet super user. The repository is not in
17
+ `marketplace list` until its first push; push `main` alone first, then its tags in a second push. Refusals (name in
18
+ use, another change under way, missing scope, not a super user, bad argument, forge unavailable) each say what to do.
19
+
20
+ ### Changed
21
+
22
+ - Depends on `@bluestep-systems/b6p-core` 1.4.0 (was 1.3.0).
23
+
24
+ ## [1.2.0] — 2026-11-19
25
+
26
+ ### Added
27
+
28
+ - **Plain `git pull` and `git push` with the stored token: `b6p auth setup-git`** (b6p-core 1.3.0's
29
+ `core.gitCredential`, ClickUp 1k5g91bqme2). It makes `b6p` git's credential helper, as `gh auth setup-git` does,
30
+ for the gateway (when https) and the tenants you have pulled scripts from: an empty `helper =` and then
31
+ `!b6p auth git-credential` per host in the file `git config --global` writes, so no other helper sees or keeps
32
+ the token. It says what it wrote and where, what was set up already, and any entry of yours that still makes git
33
+ ask another helper; running it again changes nothing. `--remove` takes b6p's entries out and reports any reset it
34
+ had to leave. A plain push to a draft does not build or publish; that still takes `b6p script push`. Needs git
35
+ 2.27 (2.42 for setup); an older git fails setup with exit `1`, saying so.
36
+ - **`b6p auth set` offers to set git up** once a token is stored and git is not set up (Yes is the default). Piped,
37
+ or under `--yes`, it never asks and prints a one-line hint instead; under `--json` it prints
38
+ `{ authenticated, git: { configured, hint } }`.
39
+ - **`b6p auth status` reports git**: set up, not set up (and which other helper git asks), or git too old. Under
40
+ `--json` it is the new `git` field.
41
+ - **`b6p kb pull` (a new clone) and `b6p script pull` print a one-line hint** to run `b6p auth setup-git` when git
42
+ there would not use the token. The hint never fails the pull. Known gap: after a script pull the hint reads the
43
+ git config in effect where the workspace is, not the draft clone's own config, since core's pull result does
44
+ not name the draft folder yet.
45
+ - `b6p auth git-credential get|store|erase`, hidden from help, is the command git runs. It is recognised by its
46
+ position (`b6p auth git-credential <action>`) and run before any option parsing, so `--help`, `--version` or an
47
+ unknown flag after it change nothing; it writes only core's answer to stdout and always exits `0`, even when a
48
+ cache fails to load in the background, stdout or stderr cannot be written, or Node is too old.
49
+
8
50
  ## [1.1.0] — 2026-11-19
9
51
 
10
52
  ### Added
package/README.md CHANGED
@@ -77,6 +77,29 @@ b6p auth set
77
77
  If no token is stored, the first command you run asks for it. A `401` with a `b6pt_` token usually
78
78
  means the token expired or its account lost access, not that it is the wrong kind of token.
79
79
 
80
+ ### Plain `git pull` and `git push`
81
+
82
+ `b6p` can be git's credential helper, the way `gh auth setup-git` is for github.com, so plain `git pull`
83
+ and `git push` in a knowledge-base clone or a script's `draft/` folder use the stored token without asking:
84
+
85
+ ```bash
86
+ b6p auth setup-git # set git up (b6p auth set offers to do this for you)
87
+ b6p auth setup-git --remove # take it out again
88
+ ```
89
+
90
+ It answers git only for the gateway (when its URL is https) and for the tenants you have pulled a script
91
+ from, over https, and for nothing else. Setup writes, for each of those hosts, a
92
+ `[credential "https://<host>"]` section to the file `git config --global` writes: an empty `helper =`, so
93
+ no other helper (`store`, `cache`, a keychain) answers for that host or keeps a copy of the token, then
94
+ `helper = !b6p auth git-credential`. Your own entries are never moved or removed: if one still applies to a
95
+ host after b6p's (in a repository's own config, say), setup says which and what to change. Running it again
96
+ changes nothing; after a first script pull from another tenant, run it again to add that tenant. `b6p auth
97
+ status` says whether git is set up, and a `kb pull` or `script pull` prints a one-line hint when it is not.
98
+
99
+ A plain `git push` to a script's draft lands the commit but does not build or publish it: that still takes
100
+ `b6p script push`. git asks `b6p` by name, so `b6p` must be on the `PATH` git sees. Needs git 2.27 or later
101
+ (2.42 or later for setup). `b6p auth git-credential` is the command git runs; it is not for typing.
102
+
80
103
  ## Commands
81
104
 
82
105
  `b6p` is organised as `b6p <subsystem> <verb>`. Each top-level name is a part of the
@@ -107,7 +130,9 @@ platform; the verbs beneath it act on that part.
107
130
  | Command | Purpose |
108
131
  |---|---|
109
132
  | `b6p auth set` | Set or update the access token |
110
- | `b6p auth status` | Report whether a token is stored (never prompts) |
133
+ | `b6p auth status` | Report whether a token is stored, and whether git is set up to use it (never prompts) |
134
+ | `b6p auth setup-git` | Set git to use the token for plain `git pull` and `git push` ([details](#plain-git-pull-and-git-push)) |
135
+ | `b6p auth setup-git --remove` | Take b6p's entries out of your git config |
111
136
  | `b6p auth clear` | Clear the stored token |
112
137
  | `b6p auth token list` | List your own tokens, expired ones included, marked `(expired)` (the secret is never shown) |
113
138
  | `b6p auth token create --alias <a> --scopes <s,…> [--expires <90d\|date\|date-time\|never>]` | Mint a token; the secret is printed once |
@@ -156,6 +181,7 @@ is already public is left alone. `--json` prints `{ knowledgeBase, changed }` (`
156
181
  | Command | Purpose |
157
182
  |---|---|
158
183
  | `b6p marketplace list` | List repositories with their default branch and tags |
184
+ | `b6p marketplace create <name> [--description <t>] [--website <url>] [--topic <t>]...` | Create an empty private repository (or adopt an empty one left by an earlier attempt) and print its clone URL; `--topic` may repeat. Super users only. Push `main` alone first, then its tags |
159
185
  | `b6p marketplace pull <name> [dir] [--ref <tag\|branch>]` | Clone a repository into a folder (default `./<name>`), or fast-forward an existing clone |
160
186
 
161
187
  A plain working clone, unrelated to any script. There is no push.
@@ -172,6 +198,7 @@ the scopes you need:
172
198
  | `kb:push` | `kb push` |
173
199
  | `kb:manage` | `kb create`, and the change in `kb set` (super users) |
174
200
  | `registry:read` | `marketplace list`, `marketplace pull` |
201
+ | `registry:push` | `marketplace create` (fleet super users) |
175
202
  | `tokens:self` | `auth token …` |
176
203
  | `kb:rewrite` | rewriting a knowledge base's history (not a `b6p` command); mintable and rotatable here only if the token b6p uses holds it |
177
204
 
@@ -415,6 +442,13 @@ Set a token non-interactively by piping it in:
415
442
  echo "$B6P_TOKEN" | b6p auth set
416
443
  ```
417
444
 
445
+ Piped (or under `--yes` or `--json`), `auth set` does not ask about git; it prints a one-line hint to run
446
+ `b6p auth setup-git` when git is not set up. Under `--json` the hint is in the result instead:
447
+ `{ "authenticated": true, "git": { "configured": false, "hint": "…" } }` (`configured` is `null` when git could
448
+ not be checked, and `hint` is `null` when there is nothing to say). `b6p --json auth status` carries git's state as `git`: core's
449
+ status (`configured`, `hosts`, `otherHelpers`, `scope`) with `error: null`, or `{ "error": "<why>" }` when
450
+ git cannot be checked.
451
+
418
452
  ## WebDAV URL format
419
453
 
420
454
  ```