artshelf 0.3.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 +39 -0
- package/README.md +19 -10
- package/SPEC.md +7 -3
- package/dist/src/cli.js +0 -0
- package/dist/src/ledger.js +13 -3
- package/docs/index.html +4 -4
- package/docs/install.html +4 -8
- package/docs/reference.html +7 -3
- package/package.json +4 -3
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
- Renamed the published package and CLI binary from `shelf` to `artshelf`,
|
|
6
|
+
moved project URLs to `calvinnwq/artshelf`, and prepared public npm publishing.
|
|
5
7
|
- Added a user-level ledger registry plus `--all` review commands so Artshelf can
|
|
6
8
|
discover known project/user ledgers from one CLI entry point.
|
|
7
9
|
- Added read-only `find` and `get` commands for ledger lookup and idempotent
|
|
@@ -50,6 +52,43 @@
|
|
|
50
52
|
- Tightened the portable agent skill description so the completion-gate trigger
|
|
51
53
|
is visible before final responses, status updates, handoffs, and done reports.
|
|
52
54
|
|
|
55
|
+
## [0.4.0](https://github.com/calvinnwq/artshelf/compare/artshelf-v0.3.0...artshelf-v0.4.0) (2026-06-05)
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
### Features
|
|
59
|
+
|
|
60
|
+
* **cli:** add approval-first trash list and purge workflow ([20405db](https://github.com/calvinnwq/artshelf/commit/20405db8a7856440afe6aaf487cc156e6c66245d))
|
|
61
|
+
* **cli:** add approval-first trash list and purge workflow ([5a389f3](https://github.com/calvinnwq/artshelf/commit/5a389f3e4f18c75973f29dc727969063e3b3f54b))
|
|
62
|
+
* **cli:** add ledger registry review ([0cbdcc6](https://github.com/calvinnwq/artshelf/commit/0cbdcc6c1c1706b78e84a738fd8dfef900459045))
|
|
63
|
+
* **cli:** add ledger registry review ([d070131](https://github.com/calvinnwq/artshelf/commit/d0701317514f36ee266ca06c30b4ee67a6e45e42))
|
|
64
|
+
* **cli:** add read-only `shelf doctor` health command ([0ce18ea](https://github.com/calvinnwq/artshelf/commit/0ce18ea560ae7f870ea68b7248d097f4c7033b91))
|
|
65
|
+
* **cli:** add read-only `shelf status` dashboard command ([699035c](https://github.com/calvinnwq/artshelf/commit/699035c97009cb29caa0c995025a2d74533e21f1))
|
|
66
|
+
* **cli:** add shelf doctor and status commands ([c0f9a10](https://github.com/calvinnwq/artshelf/commit/c0f9a109cee58de7d7e8cf27e3860fee62941686))
|
|
67
|
+
* **cli:** add shelf lookup commands ([9092ea7](https://github.com/calvinnwq/artshelf/commit/9092ea72695b6b383a8ff3b74ccaabc2974e67fb))
|
|
68
|
+
* **cli:** improve shelf review triage and ledger listing ([6dc3c65](https://github.com/calvinnwq/artshelf/commit/6dc3c65e6837e542510d53890f1f49d3a28e0878))
|
|
69
|
+
* **cli:** optimize cleanup plan lifecycle ([f78773c](https://github.com/calvinnwq/artshelf/commit/f78773ca737b9d7a8318725d63590c9ed8184ba5))
|
|
70
|
+
* **cli:** resolve shelf records ([f21318d](https://github.com/calvinnwq/artshelf/commit/f21318d6edd16a170fcb6539c40899ec8b83c1ba))
|
|
71
|
+
* **cli:** summarize all-ledger review triage ([3284bd8](https://github.com/calvinnwq/artshelf/commit/3284bd886998777bd06a681ab3bfe0b819938c84))
|
|
72
|
+
* **cli:** validate registered ledgers in ledgers list ([327e4f8](https://github.com/calvinnwq/artshelf/commit/327e4f815c814c6b540fcbae8b42dbd8873fb4ab))
|
|
73
|
+
* optimize cleanup plan lifecycle ([4d77b2b](https://github.com/calvinnwq/artshelf/commit/4d77b2bed4a7bc963d2e9900a4dbbf3fed672514))
|
|
74
|
+
* rename Shelf package and CLI to Artshelf ([127649d](https://github.com/calvinnwq/artshelf/commit/127649d3689493700a4ef68922b6a837a2d53fc2))
|
|
75
|
+
* rename shelf to artshelf ([e7d250c](https://github.com/calvinnwq/artshelf/commit/e7d250cee56c27494bae224fe294387497fa8713))
|
|
76
|
+
* resolve shelf records ([dcd5109](https://github.com/calvinnwq/artshelf/commit/dcd5109c5a73f5080d89db51f375b9a5e307c65b))
|
|
77
|
+
* update ledger state after cleanup ([#7](https://github.com/calvinnwq/artshelf/issues/7)) ([31add84](https://github.com/calvinnwq/artshelf/commit/31add8466f0e37e397cfaf3dc146bd8060f57717))
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
### Bug Fixes
|
|
81
|
+
|
|
82
|
+
* build artshelf before packing ([470ea86](https://github.com/calvinnwq/artshelf/commit/470ea8637be29978e686f66b2bf1bb838a8a4fa8))
|
|
83
|
+
* clarify approval-only cleanup safety model ([20b8258](https://github.com/calvinnwq/artshelf/commit/20b82584e86a0a8f9b4067d2fbdc94d2c8064253))
|
|
84
|
+
* **cli:** align cleanup preview reuse ([b918a5d](https://github.com/calvinnwq/artshelf/commit/b918a5dc09536a9b87964fbf552b66ea16c0c62a))
|
|
85
|
+
* **cli:** harden registry diagnostics ([098f88e](https://github.com/calvinnwq/artshelf/commit/098f88e9ec8167333cb4d8f67876054b1076f922))
|
|
86
|
+
* **cli:** keep shelf review read-only ([8c417c2](https://github.com/calvinnwq/artshelf/commit/8c417c2e5737ee778c6f7a86b0c7e559d3cae7dc))
|
|
87
|
+
* **cli:** normalize review no-plan output ([57a6275](https://github.com/calvinnwq/artshelf/commit/57a6275b5960385102e8e4c54cfa498404df562d))
|
|
88
|
+
* **cli:** report stale ledgers in all-mode reads ([bc035ef](https://github.com/calvinnwq/artshelf/commit/bc035efbc15ba7877634cb7ec6c0702416d8510b))
|
|
89
|
+
* harden artshelf rename migration ([a84957c](https://github.com/calvinnwq/artshelf/commit/a84957c186f442d9067d07ec132fda4201cbc59e))
|
|
90
|
+
* **trash:** harden purge execution guardrails ([e569b1b](https://github.com/calvinnwq/artshelf/commit/e569b1be4a4f931f856fa9683afcb14023724ad9))
|
|
91
|
+
|
|
53
92
|
## [0.3.0](https://github.com/calvinnwq/artshelf/compare/artshelf-v0.2.0...artshelf-v0.3.0) (2026-06-05)
|
|
54
93
|
|
|
55
94
|
|
package/README.md
CHANGED
|
@@ -16,13 +16,13 @@ stay out of the way until you need them.
|
|
|
16
16
|
|
|
17
17
|
## Status
|
|
18
18
|
|
|
19
|
-
Artshelf is an early v1 MVP. The CLI is
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
Artshelf is an early v1 MVP. The CLI is distributed under the unscoped
|
|
20
|
+
`artshelf` package name. The existing local/source install path remains supported
|
|
21
|
+
as a fallback.
|
|
22
22
|
|
|
23
23
|
## Install
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
Install the npm package:
|
|
26
26
|
|
|
27
27
|
```bash
|
|
28
28
|
npm install -g artshelf
|
|
@@ -127,8 +127,9 @@ artshelf list --ledger /tmp/artshelf-ledger.jsonl
|
|
|
127
127
|
|
|
128
128
|
Artshelf also keeps a small global registry of known ledgers at
|
|
129
129
|
`~/.shelf/ledgers.json`. Override it with `--registry <path>` or
|
|
130
|
-
`ARTSHELF_REGISTRY
|
|
131
|
-
|
|
130
|
+
`ARTSHELF_REGISTRY`; renamed installs still honor legacy `SHELF_REGISTRY` when
|
|
131
|
+
`ARTSHELF_REGISTRY` is unset. `put` registers its ledger automatically, and you
|
|
132
|
+
can register an existing ledger explicitly:
|
|
132
133
|
|
|
133
134
|
```bash
|
|
134
135
|
artshelf ledgers list
|
|
@@ -245,9 +246,9 @@ purge, and when `artshelf resolve <id> --status resolved --reason <text>` may ma
|
|
|
245
246
|
confirmed handled, missing, or no-longer-needed records without moving or
|
|
246
247
|
deleting files.
|
|
247
248
|
|
|
248
|
-
From a source checkout, use
|
|
249
|
-
|
|
250
|
-
|
|
249
|
+
The same skill ships in the npm package. From a source checkout, use
|
|
250
|
+
`skills/artshelf/SKILL.md` directly. Agents should ask where the user wants
|
|
251
|
+
Artshelf cloned before installing or linking it.
|
|
251
252
|
|
|
252
253
|
## Development
|
|
253
254
|
|
|
@@ -264,6 +265,13 @@ pnpm docs:serve
|
|
|
264
265
|
|
|
265
266
|
Then open <http://127.0.0.1:8080/>.
|
|
266
267
|
|
|
268
|
+
Release Please owns version bumps, changelog updates, tags, and GitHub releases.
|
|
269
|
+
When a Release Please PR is merged and a release is created, the release workflow
|
|
270
|
+
validates the package with `pnpm check` and publishes `artshelf` to npm through
|
|
271
|
+
npm Trusted Publishing. The npm package must have this repository's release
|
|
272
|
+
workflow configured as a trusted publisher; no long-lived npm token is expected
|
|
273
|
+
in GitHub secrets.
|
|
274
|
+
|
|
267
275
|
During tests or one-off runs, pass both `--ledger <path>` and `--registry <path>`
|
|
268
276
|
to keep entries and registry updates out of default Artshelf storage.
|
|
269
277
|
|
|
@@ -274,7 +282,8 @@ covered by tests. See [CONTRIBUTING.md](CONTRIBUTING.md).
|
|
|
274
282
|
|
|
275
283
|
## Support And Security
|
|
276
284
|
|
|
277
|
-
Use GitHub issues for bugs and
|
|
285
|
+
Use [GitHub issues](https://github.com/calvinnwq/artshelf/issues) for bugs and
|
|
286
|
+
feature ideas. See
|
|
278
287
|
[SUPPORT.md](SUPPORT.md) and [SECURITY.md](SECURITY.md).
|
|
279
288
|
|
|
280
289
|
## License
|
package/SPEC.md
CHANGED
|
@@ -440,7 +440,12 @@ Default behavior:
|
|
|
440
440
|
V1 also supports a user-level registry of known ledgers:
|
|
441
441
|
|
|
442
442
|
- registry: `~/.shelf/ledgers.json`
|
|
443
|
-
-
|
|
443
|
+
- `--registry <path>` overrides the registry path. Without it,
|
|
444
|
+
`ARTSHELF_REGISTRY` is read first, then legacy `SHELF_REGISTRY`, then the
|
|
445
|
+
default registry path.
|
|
446
|
+
- Retention and due calculations use wall-clock time by default. `ARTSHELF_NOW`
|
|
447
|
+
overrides it for tests and controlled runs; legacy `SHELF_NOW` is read only
|
|
448
|
+
when `ARTSHELF_NOW` is unset.
|
|
444
449
|
- `put` registers the ledger it writes to.
|
|
445
450
|
- `ledgers add` registers an existing ledger explicitly.
|
|
446
451
|
- `--all` reads registered ledgers as one review surface.
|
|
@@ -537,7 +542,7 @@ hold, and every future feature (`status`, `doctor`, `review`, scheduled jobs,
|
|
|
537
542
|
...) must preserve them rather than add a shortcut around them:
|
|
538
543
|
|
|
539
544
|
- **No daemon.** Artshelf never runs in the background or watches the clock. It
|
|
540
|
-
only does work while you are running
|
|
545
|
+
only does work while you are running an `artshelf` command.
|
|
541
546
|
- **No auto-execute.** No command cleans up as a side effect. The only commands
|
|
542
547
|
that move, trash, or delete files are `artshelf cleanup --execute` and
|
|
543
548
|
`artshelf trash purge --execute`, each run by a human against a separately
|
|
@@ -672,4 +677,3 @@ human review.
|
|
|
672
677
|
- Retention classes like keep-daily/weekly/monthly.
|
|
673
678
|
- Dependency roots and pinning.
|
|
674
679
|
- Credential scanning.
|
|
675
|
-
- Public package publishing.
|
package/dist/src/cli.js
CHANGED
|
File without changes
|
package/dist/src/ledger.js
CHANGED
|
@@ -592,10 +592,9 @@ function registerArtshelfArtifact(ledgerPath, path, input) {
|
|
|
592
592
|
labels: input.labels
|
|
593
593
|
});
|
|
594
594
|
const records = readLedger(ledgerPath);
|
|
595
|
-
const index = records.findIndex((record) => (record
|
|
595
|
+
const index = records.findIndex((record) => (isMatchingArtshelfArtifact(record, path, input.labels) &&
|
|
596
596
|
record.status === "active" &&
|
|
597
|
-
record.path === path
|
|
598
|
-
sameLabels(record.labels, input.labels)));
|
|
597
|
+
record.path === path));
|
|
599
598
|
if (index === -1) {
|
|
600
599
|
appendPreparedRecord(ledgerPath, prepared);
|
|
601
600
|
return;
|
|
@@ -611,10 +610,21 @@ function registerArtshelfArtifact(ledgerPath, path, input) {
|
|
|
611
610
|
retention: prepared.retention,
|
|
612
611
|
kind: prepared.kind,
|
|
613
612
|
cleanup: prepared.cleanup,
|
|
613
|
+
owner: prepared.owner,
|
|
614
614
|
labels: prepared.labels
|
|
615
615
|
};
|
|
616
616
|
writeLedger(ledgerPath, records);
|
|
617
617
|
}
|
|
618
|
+
function isMatchingArtshelfArtifact(record, path, labels) {
|
|
619
|
+
if (record.path !== path)
|
|
620
|
+
return false;
|
|
621
|
+
if (record.owner === "artshelf")
|
|
622
|
+
return sameLabels(record.labels, labels);
|
|
623
|
+
if (record.owner !== "shelf")
|
|
624
|
+
return false;
|
|
625
|
+
const legacyLabels = labels.map((label, index) => index === 0 && label === "artshelf" ? "shelf" : label);
|
|
626
|
+
return sameLabels(record.labels, legacyLabels);
|
|
627
|
+
}
|
|
618
628
|
function sameLabels(left, right) {
|
|
619
629
|
if (left.length !== right.length)
|
|
620
630
|
return false;
|
package/docs/index.html
CHANGED
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
then gives humans and agents a reviewable cleanup plan before anything moves.
|
|
52
52
|
</p>
|
|
53
53
|
<div class="actions">
|
|
54
|
-
<a class="button primary" href="install.html">Install from
|
|
54
|
+
<a class="button primary" href="install.html">Install from npm</a>
|
|
55
55
|
<a class="button" href="quickstart.html">Quickstart</a>
|
|
56
56
|
<a class="button" href="agent-usage.html">Agent usage</a>
|
|
57
57
|
<a class="button" href="https://github.com/calvinnwq/artshelf">GitHub</a>
|
|
@@ -119,8 +119,8 @@ $ artshelf cleanup --dry-run --json
|
|
|
119
119
|
<h2>Pick Your Path</h2>
|
|
120
120
|
<div class="grid">
|
|
121
121
|
<a class="doc-card" href="install.html">
|
|
122
|
-
<strong>Install from
|
|
123
|
-
<span>
|
|
122
|
+
<strong>Install from npm</strong>
|
|
123
|
+
<span>Install the package globally, or use source install as the fallback path.</span>
|
|
124
124
|
</a>
|
|
125
125
|
<a class="doc-card" href="quickstart.html">
|
|
126
126
|
<strong>Try the workflow</strong>
|
|
@@ -157,7 +157,7 @@ $ artshelf cleanup --dry-run --json
|
|
|
157
157
|
<li>Cleanup refuses delete actions; physical trash purge needs its own reviewed plan.</li>
|
|
158
158
|
</ul>
|
|
159
159
|
<div class="note">
|
|
160
|
-
Artshelf is an early v1 MVP.
|
|
160
|
+
Artshelf is an early v1 MVP. The npm package is the primary install path; source install remains available as a fallback.
|
|
161
161
|
</div>
|
|
162
162
|
</section>
|
|
163
163
|
</article>
|
package/docs/install.html
CHANGED
|
@@ -42,8 +42,8 @@
|
|
|
42
42
|
<p class="eyebrow">Install</p>
|
|
43
43
|
<h1>Install Artshelf.</h1>
|
|
44
44
|
<p class="lede">
|
|
45
|
-
Artshelf is
|
|
46
|
-
|
|
45
|
+
Artshelf is distributed under the unscoped `artshelf` package name.
|
|
46
|
+
Source install remains the fallback path.
|
|
47
47
|
</p>
|
|
48
48
|
</div>
|
|
49
49
|
<div class="terminal">
|
|
@@ -62,8 +62,8 @@ $ artshelf doctor</code></pre>
|
|
|
62
62
|
<h2>Requirements</h2>
|
|
63
63
|
<div class="grid">
|
|
64
64
|
<div class="card"><h3>Node.js 22+</h3><p>The package declares `node >=22` and CI runs on Node 24.</p></div>
|
|
65
|
-
<div class="card"><h3>
|
|
66
|
-
<div class="card"><h3>
|
|
65
|
+
<div class="card"><h3>npm or pnpm</h3><p>Install the global package with your preferred Node package manager.</p></div>
|
|
66
|
+
<div class="card"><h3>Source tooling</h3><p>Corepack and Git are only needed when cloning, building, and linking from source.</p></div>
|
|
67
67
|
</div>
|
|
68
68
|
</section>
|
|
69
69
|
|
|
@@ -75,10 +75,6 @@ artshelf doctor</code></pre>
|
|
|
75
75
|
<pre><code>pnpm add -g artshelf
|
|
76
76
|
artshelf --version
|
|
77
77
|
artshelf doctor</code></pre>
|
|
78
|
-
<p>
|
|
79
|
-
The npm package exposes `artshelf` as the primary command and keeps
|
|
80
|
-
`shelf` as a temporary compatibility alias.
|
|
81
|
-
</p>
|
|
82
78
|
<pre><code>npm uninstall -g artshelf</code></pre>
|
|
83
79
|
</section>
|
|
84
80
|
|
package/docs/reference.html
CHANGED
|
@@ -88,6 +88,9 @@ $ artshelf --version</code></pre>
|
|
|
88
88
|
--registry <path> Use an explicit ledger registry
|
|
89
89
|
--all Read all registered ledgers for supported commands
|
|
90
90
|
ARTSHELF_REGISTRY Override the default ledger registry path
|
|
91
|
+
SHELF_REGISTRY Legacy fallback when ARTSHELF_REGISTRY is unset
|
|
92
|
+
ARTSHELF_NOW Override current time for retention and due calculations
|
|
93
|
+
SHELF_NOW Legacy fallback when ARTSHELF_NOW is unset
|
|
91
94
|
--json Emit machine-readable JSON
|
|
92
95
|
--help Show help
|
|
93
96
|
--version Show version</code></pre>
|
|
@@ -141,9 +144,10 @@ artshelf get <id> --all --json</code></pre>
|
|
|
141
144
|
</p>
|
|
142
145
|
<p>
|
|
143
146
|
Artshelf also keeps a user-level registry at `~/.shelf/ledgers.json`. Override it
|
|
144
|
-
with <code>--registry <path></code> or <code>ARTSHELF_REGISTRY</code
|
|
145
|
-
is
|
|
146
|
-
|
|
147
|
+
with <code>--registry <path></code> or <code>ARTSHELF_REGISTRY</code>; legacy
|
|
148
|
+
<code>SHELF_REGISTRY</code> is used only when <code>ARTSHELF_REGISTRY</code> is unset.
|
|
149
|
+
The registry is a discovery index for supported `--all` review, status, cleanup
|
|
150
|
+
dry-run, and trash-list commands; project records stay in their own repo-local ledgers.
|
|
147
151
|
</p>
|
|
148
152
|
<pre><code>artshelf ledgers add --ledger <repo>/.shelf/ledger.jsonl --name <project> --scope repo
|
|
149
153
|
artshelf review --all --json
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "artshelf",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "Tiny CLI for accountable temporary artifact retention.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": "Calvin",
|
|
@@ -20,8 +20,7 @@
|
|
|
20
20
|
"tmp"
|
|
21
21
|
],
|
|
22
22
|
"bin": {
|
|
23
|
-
"artshelf": "dist/src/cli.js"
|
|
24
|
-
"shelf": "dist/src/cli.js"
|
|
23
|
+
"artshelf": "dist/src/cli.js"
|
|
25
24
|
},
|
|
26
25
|
"publishConfig": {
|
|
27
26
|
"access": "public"
|
|
@@ -43,6 +42,8 @@
|
|
|
43
42
|
"test": "node --test dist/tests/*.test.js",
|
|
44
43
|
"check": "pnpm run build && pnpm run test",
|
|
45
44
|
"docs:serve": "python3 -m http.server 8080 --bind 127.0.0.1 --directory docs",
|
|
45
|
+
"prepack": "pnpm run build",
|
|
46
|
+
"prepublishOnly": "pnpm run build",
|
|
46
47
|
"start": "node dist/src/cli.js"
|
|
47
48
|
},
|
|
48
49
|
"devDependencies": {
|