projectstore-claude 0.29.3 → 0.29.4
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/bin/projectstore-claude.mjs +1 -1
- package/node_modules/projectstore/.claude-plugin/marketplace.json +1 -1
- package/node_modules/projectstore/.claude-plugin/plugin.json +1 -1
- package/node_modules/projectstore/README.md +17 -0
- package/node_modules/projectstore/commands/bind.md +6 -17
- package/node_modules/projectstore/commands/doctor.md +12 -7
- package/node_modules/projectstore/commands/statusline.md +1 -1
- package/node_modules/projectstore/commands/story.md +15 -2
- package/node_modules/projectstore/docs/how-it-works.md +5 -3
- package/node_modules/projectstore/harnesses/claude-code.json +5 -5
- package/node_modules/projectstore/harnesses/codex.json +4 -5
- package/node_modules/projectstore/hooks/band.tsx +48 -20
- package/node_modules/projectstore/hooks/pre-compact.mjs +7 -10
- package/node_modules/projectstore/hooks/session-rules.mjs +14 -8
- package/node_modules/projectstore/hooks/session-start.mjs +50 -18
- package/node_modules/projectstore/hooks/session-stop.mjs +8 -6
- package/node_modules/projectstore/package.json +11 -2
- package/node_modules/projectstore/scripts/band-shared.mjs +141 -24
- package/node_modules/projectstore/scripts/band.mjs +72 -21
- package/node_modules/projectstore/scripts/binding.mjs +616 -85
- package/node_modules/projectstore/scripts/build-adapters.mjs +73 -29
- package/node_modules/projectstore/scripts/cli.mjs +1015 -185
- package/node_modules/projectstore/scripts/codemap.mjs +22 -7
- package/node_modules/projectstore/scripts/convergence.mjs +253 -83
- package/node_modules/projectstore/scripts/diff-refs.mjs +14 -8
- package/node_modules/projectstore/scripts/doctor-report.mjs +91 -23
- package/node_modules/projectstore/scripts/doctor.mjs +1317 -371
- package/node_modules/projectstore/scripts/draft.mjs +5 -2
- package/node_modules/projectstore/scripts/fetch-shell.mjs +106 -20
- package/node_modules/projectstore/scripts/graph.mjs +19 -13
- package/node_modules/projectstore/scripts/harness.mjs +123 -48
- package/node_modules/projectstore/scripts/install-harness.mjs +3511 -616
- package/node_modules/projectstore/scripts/kanban.mjs +2 -1
- package/node_modules/projectstore/scripts/lib.mjs +694 -159
- package/node_modules/projectstore/scripts/mcp.mjs +386 -105
- package/node_modules/projectstore/scripts/portable-registration.mjs +224 -51
- package/node_modules/projectstore/scripts/provenance.mjs +26 -10
- package/node_modules/projectstore/scripts/query.mjs +378 -80
- package/node_modules/projectstore/scripts/reconcile.mjs +55 -18
- package/node_modules/projectstore/scripts/run-host.mjs +62 -17
- package/node_modules/projectstore/scripts/scaffold.mjs +89 -28
- package/node_modules/projectstore/scripts/setup.mjs +987 -0
- package/node_modules/projectstore/scripts/stages.mjs +5 -1
- package/node_modules/projectstore/scripts/statusline-launcher.mjs +36 -11
- package/node_modules/projectstore/scripts/statusline.mjs +32 -14
- package/node_modules/projectstore/scripts/story-section.mjs +39 -17
- package/node_modules/projectstore/scripts/surfaces.mjs +416 -95
- package/node_modules/projectstore/scripts/term.mjs +382 -97
- package/node_modules/projectstore/scripts/tokens.mjs +106 -28
- package/node_modules/projectstore/scripts/touch-session.mjs +109 -70
- package/node_modules/projectstore/scripts/version-guard.mjs +74 -27
- package/node_modules/projectstore/scripts/worktree.mjs +16 -5
- package/package.json +2 -2
|
@@ -40,11 +40,12 @@ const VERSION_SITES = [
|
|
|
40
40
|
// Found by name, not by position: `plugins[0]` reads a sibling plugin's
|
|
41
41
|
// version the moment the marketplace lists more than one, and reports the
|
|
42
42
|
// disagreement against the wrong file.
|
|
43
|
-
[
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
],
|
|
43
|
+
[".claude-plugin/marketplace.json", (j) => j.plugins?.find((p) => p.name === "projectstore")?.version, true],
|
|
44
|
+
// The lockfile, committed since the lint ADR, records the root package's
|
|
45
|
+
// version twice. `npm version` rewrites both; a hand edit of package.json
|
|
46
|
+
// leaves both behind, and this is where that shows.
|
|
47
|
+
["package-lock.json", (j) => j.version, true],
|
|
48
|
+
["package-lock.json", (j) => j.packages?.[""]?.version, true],
|
|
48
49
|
];
|
|
49
50
|
|
|
50
51
|
// The distribution shells (the shells ADR; layout spec contract 11): one
|
|
@@ -58,34 +59,51 @@ export function collectShells(root = ROOT) {
|
|
|
58
59
|
if (!existsSync(dir)) return { shells: [] };
|
|
59
60
|
const shells = [];
|
|
60
61
|
// Directories only: a .DS_Store Finder drops on a browse is not a shell.
|
|
61
|
-
for (const name of readdirSync(dir, { withFileTypes: true })
|
|
62
|
+
for (const name of readdirSync(dir, { withFileTypes: true })
|
|
63
|
+
.filter((e) => e.isDirectory())
|
|
64
|
+
.map((e) => e.name)
|
|
65
|
+
.sort()) {
|
|
62
66
|
const rel = `${SHELLS_DIR}/${name}/package.json`;
|
|
63
67
|
const abs = resolve(root, rel);
|
|
64
68
|
if (!existsSync(abs)) return { error: `${rel}: missing — every directory under ${SHELLS_DIR}/ is a shell` };
|
|
65
69
|
let json;
|
|
66
|
-
try {
|
|
70
|
+
try {
|
|
71
|
+
json = JSON.parse(readFileSync(abs, "utf8"));
|
|
72
|
+
} catch (e) {
|
|
73
|
+
return { error: `${rel}: ${e.message}` };
|
|
74
|
+
}
|
|
67
75
|
if (json.name !== name) return { error: `${rel}: name "${json.name}" is not its directory's` };
|
|
68
|
-
if (typeof json.version !== "string" || !json.version)
|
|
76
|
+
if (typeof json.version !== "string" || !json.version)
|
|
77
|
+
return { error: `${rel}: no version found where one is required` };
|
|
69
78
|
const pluginVersions = [];
|
|
70
79
|
if (name === "projectstore-codex") {
|
|
71
80
|
// A root plugin.json is an Agent Plugins manifest Codex picks first, and
|
|
72
81
|
// Codex loads no hooks from that format (openai/codex#37027, merged
|
|
73
82
|
// 2026-08-05): every hook goes missing.
|
|
74
83
|
if (existsSync(resolve(root, SHELLS_DIR, name, "plugin.json"))) {
|
|
75
|
-
return {
|
|
84
|
+
return {
|
|
85
|
+
error: `${SHELLS_DIR}/${name}/plugin.json: refused — Codex picks a root Agent Plugins manifest first and loads no hooks from it (openai/codex#37027; codex-rs/core-plugins/src/loader.rs); the shell's manifest is .codex-plugin/plugin.json alone`,
|
|
86
|
+
};
|
|
76
87
|
}
|
|
77
88
|
for (const manifest of [".codex-plugin/plugin.json"]) {
|
|
78
89
|
const manifestRel = `${SHELLS_DIR}/${name}/${manifest}`;
|
|
79
90
|
const manifestAbs = resolve(root, manifestRel);
|
|
80
91
|
if (!existsSync(manifestAbs)) return { error: `${manifestRel}: missing — the Codex shell's one manifest` };
|
|
81
92
|
let parsed;
|
|
82
|
-
try {
|
|
83
|
-
|
|
93
|
+
try {
|
|
94
|
+
parsed = JSON.parse(readFileSync(manifestAbs, "utf8"));
|
|
95
|
+
} catch (e) {
|
|
96
|
+
return { error: `${manifestRel}: ${e.message}` };
|
|
97
|
+
}
|
|
98
|
+
if (typeof parsed.version !== "string" || !parsed.version)
|
|
99
|
+
return { error: `${manifestRel}: no version found where one is required` };
|
|
84
100
|
pluginVersions.push({ file: manifestRel, version: parsed.version });
|
|
85
101
|
}
|
|
86
102
|
}
|
|
87
103
|
shells.push({
|
|
88
|
-
name,
|
|
104
|
+
name,
|
|
105
|
+
file: rel,
|
|
106
|
+
version: json.version,
|
|
89
107
|
pin: json.dependencies?.projectstore ?? null,
|
|
90
108
|
private: json.private === true,
|
|
91
109
|
bin: json.bin?.[name] ?? null,
|
|
@@ -104,7 +122,9 @@ function die(msg) {
|
|
|
104
122
|
|
|
105
123
|
export function collectVersions(root = ROOT) {
|
|
106
124
|
if (existsSync(resolve(root, ".codex-plugin", "plugin.json"))) {
|
|
107
|
-
return {
|
|
125
|
+
return {
|
|
126
|
+
error: ".codex-plugin/plugin.json must live in the projectstore-codex shell, not at the core package root",
|
|
127
|
+
};
|
|
108
128
|
}
|
|
109
129
|
const found = [];
|
|
110
130
|
for (const [rel, pick, required] of VERSION_SITES) {
|
|
@@ -138,7 +158,10 @@ export function checkVersions({ root = ROOT, tag = null } = {}) {
|
|
|
138
158
|
if (sh.error) return { ok: false, error: sh.error };
|
|
139
159
|
|
|
140
160
|
// A shell's version is one more site under the same rule.
|
|
141
|
-
const sites = [
|
|
161
|
+
const sites = [
|
|
162
|
+
...found,
|
|
163
|
+
...sh.shells.flatMap((s) => [{ file: s.file, version: s.version }, ...(s.pluginVersions || [])]),
|
|
164
|
+
];
|
|
142
165
|
if (tag) sites.push({ file: "<tag>", version: stripV(tag) });
|
|
143
166
|
const distinct = [...new Set(sites.map((s) => s.version))];
|
|
144
167
|
if (distinct.length !== 1) return { ok: false, error: "version mismatch", versions: distinct, checked: sites };
|
|
@@ -147,11 +170,32 @@ export function checkVersions({ root = ROOT, tag = null } = {}) {
|
|
|
147
170
|
// is the one file it ships. A range here is the unverified pairing the
|
|
148
171
|
// shells ADR rejects; a missing bundle ships an installer with no core.
|
|
149
172
|
for (const s of sh.shells) {
|
|
150
|
-
if (s.pin !== `=${s.version}`)
|
|
173
|
+
if (s.pin !== `=${s.version}`)
|
|
174
|
+
return {
|
|
175
|
+
ok: false,
|
|
176
|
+
error: "shell pin mismatch",
|
|
177
|
+
shell: s.name,
|
|
178
|
+
pin: s.pin,
|
|
179
|
+
expected: `=${s.version}`,
|
|
180
|
+
checked: sites,
|
|
181
|
+
};
|
|
151
182
|
if (!s.bundled) return { ok: false, error: "shell does not bundle the core", shell: s.name, checked: sites };
|
|
152
|
-
if (s.bin !== `bin/${s.name}.mjs` || !s.binExists)
|
|
183
|
+
if (s.bin !== `bin/${s.name}.mjs` || !s.binExists)
|
|
184
|
+
return {
|
|
185
|
+
ok: false,
|
|
186
|
+
error: "shell bin missing or misnamed",
|
|
187
|
+
shell: s.name,
|
|
188
|
+
bin: s.bin,
|
|
189
|
+
expected: `bin/${s.name}.mjs`,
|
|
190
|
+
checked: sites,
|
|
191
|
+
};
|
|
153
192
|
}
|
|
154
|
-
return {
|
|
193
|
+
return {
|
|
194
|
+
ok: true,
|
|
195
|
+
version: distinct[0],
|
|
196
|
+
checked: sites,
|
|
197
|
+
shells: sh.shells.map((s) => ({ name: s.name, private: s.private })),
|
|
198
|
+
};
|
|
155
199
|
}
|
|
156
200
|
|
|
157
201
|
// Everything at the repository root that is deliberately NOT in the tarball.
|
|
@@ -182,6 +226,11 @@ export const NOT_SHIPPED = new Set([
|
|
|
182
226
|
"adapters", // generated harness inputs copied into their distribution shells at build time
|
|
183
227
|
"site", // the public site: Pages serves it, npm never does
|
|
184
228
|
"package-lock.json",
|
|
229
|
+
// The lint and format tooling (the lint ADR): dev-only, never in the package.
|
|
230
|
+
"eslint.config.mjs",
|
|
231
|
+
".prettierrc.json",
|
|
232
|
+
".prettierignore",
|
|
233
|
+
".git-blame-ignore-revs",
|
|
185
234
|
// Claude Code lays this beside a plugin folder it loads with --plugin-dir
|
|
186
235
|
// (extending .claude-plugin/types/, which is gitignored and kept out of the
|
|
187
236
|
// package too): the band module's type-check reads it, nobody installs it.
|
|
@@ -192,12 +241,8 @@ export const NOT_SHIPPED = new Set([
|
|
|
192
241
|
// pure — it takes the tree listing rather than reading it — so a test can hand
|
|
193
242
|
// it a directory that does not exist and watch it fail.
|
|
194
243
|
export function unshippedTopLevel(entries, packlist) {
|
|
195
|
-
const shipped = new Set(
|
|
196
|
-
|
|
197
|
-
);
|
|
198
|
-
return entries
|
|
199
|
-
.filter((e) => e !== "." && e !== ".." && !shipped.has(e) && !NOT_SHIPPED.has(e))
|
|
200
|
-
.sort();
|
|
244
|
+
const shipped = new Set(packlist.map((p) => (p.includes("/") ? p.slice(0, p.indexOf("/")) : p)));
|
|
245
|
+
return entries.filter((e) => e !== "." && e !== ".." && !shipped.has(e) && !NOT_SHIPPED.has(e)).sort();
|
|
201
246
|
}
|
|
202
247
|
|
|
203
248
|
// The packlist is the second release-time invariant: what npm would actually
|
|
@@ -246,13 +291,15 @@ async function main(argv) {
|
|
|
246
291
|
for (const b of built.shells) {
|
|
247
292
|
if (b.error) die(b.error);
|
|
248
293
|
const rel = m.shellPacklistPath(b.name);
|
|
249
|
-
try {
|
|
294
|
+
try {
|
|
295
|
+
writeFileAtomic(resolve(ROOT, rel), JSON.stringify(b.files, null, 2) + "\n");
|
|
296
|
+
} catch (e) {
|
|
297
|
+
die(`${rel}: ${e.message}`);
|
|
298
|
+
}
|
|
250
299
|
shells.push({ wrote: rel, count: b.files.length });
|
|
251
300
|
}
|
|
252
301
|
}
|
|
253
|
-
process.stdout.write(
|
|
254
|
-
JSON.stringify({ ok: true, wrote: PACKLIST, count: files.length, shells }) + "\n",
|
|
255
|
-
);
|
|
302
|
+
process.stdout.write(JSON.stringify({ ok: true, wrote: PACKLIST, count: files.length, shells }) + "\n");
|
|
256
303
|
return;
|
|
257
304
|
}
|
|
258
305
|
|
|
@@ -31,7 +31,14 @@ const trim = (s) => (typeof s === "string" ? s.trim() : null);
|
|
|
31
31
|
// `layout` and `language` are the parent's: what a bind without an inherit
|
|
32
32
|
// path must name to write the parent's binding rather than bind's defaults.
|
|
33
33
|
function record(state, worktree, mainCheckout, vaultPath, parent = null) {
|
|
34
|
-
return {
|
|
34
|
+
return {
|
|
35
|
+
state,
|
|
36
|
+
worktree,
|
|
37
|
+
mainCheckout,
|
|
38
|
+
vaultPath,
|
|
39
|
+
layout: parent?.layout || null,
|
|
40
|
+
language: parent?.language || null,
|
|
41
|
+
};
|
|
35
42
|
}
|
|
36
43
|
|
|
37
44
|
// The main checkout behind a linked worktree.
|
|
@@ -96,10 +103,14 @@ export function bindingOfferText(b) {
|
|
|
96
103
|
`- its vault: \`${truncFront(String(b.vaultPath), PATH_CELL)}\``,
|
|
97
104
|
"",
|
|
98
105
|
...(bindInherits()
|
|
99
|
-
? [
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
106
|
+
? [
|
|
107
|
+
`Run \`${inheritForm(b.vaultPath, { layout: b.layout, language: b.language })}\` to adopt that binding. It copies the binding`,
|
|
108
|
+
"only — the vault is shared and unchanged, and no session state travels with it.",
|
|
109
|
+
]
|
|
110
|
+
: [
|
|
111
|
+
`Run \`${inheritForm(b.vaultPath, { layout: b.layout, language: b.language })}\` to bind this checkout to the same vault,`,
|
|
112
|
+
"layout and language — the vault is shared and unchanged, and no session state travels with it.",
|
|
113
|
+
]),
|
|
103
114
|
"",
|
|
104
115
|
"",
|
|
105
116
|
].join("\n");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "projectstore-claude",
|
|
3
|
-
"version": "0.29.
|
|
3
|
+
"version": "0.29.4",
|
|
4
4
|
"description": "Installs projectstore for Claude Code from npm: the core pinned and bundled, the harness fixed — npx projectstore-claude install --project \"$PWD\".",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"projectstore",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"README.md"
|
|
38
38
|
],
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"projectstore": "=0.29.
|
|
40
|
+
"projectstore": "=0.29.4"
|
|
41
41
|
},
|
|
42
42
|
"bundleDependencies": [
|
|
43
43
|
"projectstore"
|