@plinth-music/cli 0.2.0 → 0.4.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 +88 -0
- package/README.md +29 -21
- package/dist/build-stamp.json +5 -0
- package/dist/cli.js +16850 -76386
- package/package.json +5 -8
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
Notable changes to `@plinth-music/cli`. Grouped by what a user notices, not by PR.
|
|
4
|
+
|
|
5
|
+
## 0.4.0 — 2026-08-06
|
|
6
|
+
|
|
7
|
+
56 commits of product work since `0.3.0` (`v0.3.0..8c921e4`). `0.3.0` shipped four
|
|
8
|
+
commands — `login`, `sync`, `start`, `version` — and synced a single entity type,
|
|
9
|
+
documents. This release is most of a working daemon.
|
|
10
|
+
|
|
11
|
+
### Five new commands
|
|
12
|
+
|
|
13
|
+
- **`plinth status`** — daemon liveness, last sync and per-type counts, and how many
|
|
14
|
+
destructive batches are being held. Also warns when `dist/` is behind the checkout,
|
|
15
|
+
so a stale bundle can't be mistaken for the merged code (source-install only; a
|
|
16
|
+
registry install has no checkout to compare against and stays silent).
|
|
17
|
+
- **`plinth confirm`** — review and release the destructive batches the daemon
|
|
18
|
+
quarantines. Apply, or `--discard`. `--all` is gated behind rendering every batch
|
|
19
|
+
first and a final default-No.
|
|
20
|
+
- **`plinth refresh-context`** — regenerate the workspace-root `CLAUDE.md` from the
|
|
21
|
+
current schema and workspace. Your block between the `<!-- BEGIN: user-customisable -->`
|
|
22
|
+
markers is preserved verbatim; `CLAUDE.local.md` is never touched.
|
|
23
|
+
- **`plinth grounding`** — print the session-start grounding block (current date,
|
|
24
|
+
entity resolution, write confirmation, workspace rules, workspace memory, user
|
|
25
|
+
memory). Invoked by the generated Claude Code SessionStart hook.
|
|
26
|
+
- **`plinth voice-gate`** — gate agent-originated copy against the workspace voice
|
|
27
|
+
rubric. `--hook` runs it as a Claude Code PreToolUse hook that blocks
|
|
28
|
+
non-compliant Gmail drafts; direct mode gates a file or stdin and can print the
|
|
29
|
+
raw verdict as JSON.
|
|
30
|
+
|
|
31
|
+
### Sync covers the workspace, not just documents
|
|
32
|
+
|
|
33
|
+
`0.3.0` synced documents only — `plinth sync` was a one-shot pull, and `plinth start`
|
|
34
|
+
carried a watcher that pushed local edits for that one type. `0.4.0` syncs
|
|
35
|
+
**documents, projects, tasks, artists, meetings and threads**, each on its own entity
|
|
36
|
+
strategy, in both directions. Alongside that:
|
|
37
|
+
|
|
38
|
+
- **Ambient pull** — `plinth start` now pulls continuously rather than once at boot.
|
|
39
|
+
- **A user-writable `files/` subtree** — drop any file into the mirror and it syncs.
|
|
40
|
+
- **Rendered read-only blocks** in the mirror: artist contacts in `_artist.md`, a
|
|
41
|
+
bounded "Recent activity" comment tail on tasks and projects, and project-as-rollup
|
|
42
|
+
task lists in `projects/<slug>.md`.
|
|
43
|
+
- **Documents round-trip raw markdown** — the HTML conversion layer is gone. Frontmatter
|
|
44
|
+
(`category`, `is_context_doc`) round-trips faithfully.
|
|
45
|
+
- **`~/.plinth/daemon.log`** — live push/pull is visible instead of silent.
|
|
46
|
+
|
|
47
|
+
### Your local edits are harder to lose
|
|
48
|
+
|
|
49
|
+
Most of this release's fixes are one shape: the daemon must never silently discard
|
|
50
|
+
work you did on disk.
|
|
51
|
+
|
|
52
|
+
- Diverged local edits are reconciled at boot instead of being overwritten.
|
|
53
|
+
- A singleton pull no longer clobbers un-pushed local edits.
|
|
54
|
+
- Bulk deletes and gutting overwrites are quarantined for `plinth confirm` rather
|
|
55
|
+
than pushed.
|
|
56
|
+
- Task-mirror conflicts are field-typed, and validation failures are written back
|
|
57
|
+
into the file as a `# sync-error` block instead of vanishing.
|
|
58
|
+
- Rate-limit bursts (429) are throttled and retried, and anything still unsynced is
|
|
59
|
+
recorded rather than dropped.
|
|
60
|
+
- Renames are classified against a refreshed inode at boot, so a stale one can't turn
|
|
61
|
+
a rename into a delete-plus-create.
|
|
62
|
+
- Push failures surface the server's own error message instead of a bare 400.
|
|
63
|
+
- Untracked files already on disk at daemon boot are discovered rather than ignored,
|
|
64
|
+
and the `files/` subtree is scaffolded at boot instead of deadlocking on its own
|
|
65
|
+
absence.
|
|
66
|
+
|
|
67
|
+
### Context and grounding for agents
|
|
68
|
+
|
|
69
|
+
- A workspace-root `CLAUDE.md` and per-artist `CLAUDE.md` / `memory.md` /
|
|
70
|
+
`daily-log.md` are generated on sync.
|
|
71
|
+
- The workspace and per-artist maps are a content index, not just a folder structure.
|
|
72
|
+
- `workspace-rules.md`, `workspace-memory.md` and a member-private user-memory lane
|
|
73
|
+
sync bidirectionally.
|
|
74
|
+
- Dates ground to the mapped calendar rather than the retired `key_dates` table.
|
|
75
|
+
|
|
76
|
+
### Notes
|
|
77
|
+
|
|
78
|
+
- Requires Node >= 20. The keychain integration (`@napi-rs/keyring`) installs a
|
|
79
|
+
native prebuild for your platform: macOS Keychain, Windows Credential Manager, or
|
|
80
|
+
Linux Secret Service.
|
|
81
|
+
- `dist/build-stamp.json` ships in the tarball and records the git SHA the bundle was
|
|
82
|
+
built from.
|
|
83
|
+
|
|
84
|
+
## 0.3.0 — 2026-05-20
|
|
85
|
+
|
|
86
|
+
First published release. `plinth login` with OS-keychain PAT storage, `plinth sync`
|
|
87
|
+
(documents, one-shot pull), an early `plinth start` with a push watcher, and
|
|
88
|
+
`plinth version`.
|
package/README.md
CHANGED
|
@@ -2,35 +2,41 @@
|
|
|
2
2
|
|
|
3
3
|
Plinth capstone sync daemon and CLI. Mirrors your Plinth workspace to `~/Plinth/<workspace>/` and keeps it bidirectionally synced. AI-native: pair with Claude Code or any LLM agent for context-aware artist management.
|
|
4
4
|
|
|
5
|
-
**Status: early access
|
|
5
|
+
**Status: early access.** Two-way sync runs as a daemon across documents, projects, tasks, artists, meetings, threads and a user-writable `files/` subtree. See `V1_SPEC` §5 M3 in the plinth monorepo for the full milestone plan, and [`CHANGELOG.md`](CHANGELOG.md) for what landed when.
|
|
6
6
|
|
|
7
|
-
##
|
|
7
|
+
## Install
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
```sh
|
|
10
|
+
npm i -g @plinth-music/cli
|
|
11
|
+
```
|
|
10
12
|
|
|
11
|
-
|
|
12
|
-
- `plinth sync [--workspace <slug>]` — one-shot pull of documents into `~/Plinth/<workspace>/`. Defaults to the active workspace if `--workspace` is omitted.
|
|
13
|
+
Requires Node >= 20. A Homebrew tap (signed + notarised) is planned; npm is the only install path today.
|
|
13
14
|
|
|
14
|
-
|
|
15
|
+
## Getting started
|
|
15
16
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
- `plinth logout --workspace <slug>` — revoke local PAT reference, retain mirror files.
|
|
17
|
+
```sh
|
|
18
|
+
plinth login --workspace <slug> # issue a PAT in the browser, paste it back
|
|
19
|
+
plinth sync # one-shot pull into ~/Plinth/<slug>/
|
|
20
|
+
plinth start # run the daemon: continuous pull + watch + push
|
|
21
|
+
```
|
|
22
22
|
|
|
23
|
-
##
|
|
23
|
+
## Commands
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
- `plinth login --workspace <slug>` — issue a personal access token in the browser, paste it back, store it in the OS keychain (macOS Keychain / Linux Secret Service / Windows Credential Manager).
|
|
26
|
+
- `plinth sync [--workspace <slug>]` — one-shot pull into `~/Plinth/<workspace>/`. Also generates the workspace-root `CLAUDE.md` (a thin TOC + entity model + skill pointers) and an empty `CLAUDE.local.md` stub on first sync, and silently refreshes `CLAUDE.md` on a schema-version change. Defaults to the active workspace if `--workspace` is omitted.
|
|
27
|
+
- `plinth start` — run the long-running sync daemon: pull the latest, then watch the mirror for local edits and push them. Logs to `~/.plinth/daemon.log`.
|
|
28
|
+
- `plinth status` — local sync state: daemon liveness, last sync and per-type counts, and any destructive batches being held. Warns when a source install's `dist/` is behind its checkout.
|
|
29
|
+
- `plinth confirm` — review and release destructive batches the daemon has quarantined (apply, or `--discard`).
|
|
30
|
+
- `plinth refresh-context [--workspace <slug>]` — force-regenerate the workspace-root `CLAUDE.md` from the current Plinth schema + workspace. The user-customisable block between the `<!-- BEGIN: user-customisable -->` / `<!-- END -->` markers is always preserved verbatim; `CLAUDE.local.md` is never touched.
|
|
31
|
+
- `plinth grounding` — print the session-start grounding block (current date, entity resolution, write confirmation, workspace rules, workspace memory, user memory). Invoked by the generated Claude Code SessionStart hook.
|
|
32
|
+
- `plinth voice-gate` — gate agent-originated copy against the workspace voice rubric. `--hook` runs it as a Claude Code PreToolUse hook that blocks non-compliant Gmail drafts; direct mode takes `--file <path>` or stdin and prints the verdict (`--json` for the raw response).
|
|
33
|
+
- `plinth version` — print the installed version.
|
|
26
34
|
|
|
27
|
-
|
|
28
|
-
# npm (cross-platform)
|
|
29
|
-
npm i -g @plinth-music/cli
|
|
35
|
+
Planned (not yet implemented):
|
|
30
36
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
37
|
+
- `plinth export workspace` — generate an export bundle.
|
|
38
|
+
- `plinth update` — detect install method (brew vs npm-global) and upgrade in place.
|
|
39
|
+
- `plinth logout --workspace <slug>` — revoke the local PAT reference, retain mirror files.
|
|
34
40
|
|
|
35
41
|
## Develop
|
|
36
42
|
|
|
@@ -39,7 +45,7 @@ Requires [Bun](https://bun.sh/) (latest).
|
|
|
39
45
|
```sh
|
|
40
46
|
bun install
|
|
41
47
|
bun run build # produces dist/cli.js
|
|
42
|
-
bun test # builds, then runs the
|
|
48
|
+
bun test # builds, then runs the suite
|
|
43
49
|
bun run typecheck # strict tsc, no emit
|
|
44
50
|
```
|
|
45
51
|
|
|
@@ -50,6 +56,8 @@ The built CLI is a standard Node-compatible ESM bundle with a `#!/usr/bin/env no
|
|
|
50
56
|
./dist/cli.js --help
|
|
51
57
|
```
|
|
52
58
|
|
|
59
|
+
Releasing is documented in [`docs/RELEASING.md`](docs/RELEASING.md).
|
|
60
|
+
|
|
53
61
|
## License
|
|
54
62
|
|
|
55
63
|
MIT — see `LICENSE`.
|