@curdx/flow 2.0.0-beta.13 → 2.0.0-beta.15
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/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +1 -1
- package/cli/install.js +50 -11
- package/package.json +1 -2
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
},
|
|
7
7
|
"metadata": {
|
|
8
8
|
"description": "Claude Code Discipline Layer — spec-driven workflow + goal-backward verification + Karpathy 4 principles enforced via gates. Stops Claude from faking \"done\" on non-trivial features.",
|
|
9
|
-
"version": "2.0.0-beta.
|
|
9
|
+
"version": "2.0.0-beta.15"
|
|
10
10
|
},
|
|
11
11
|
"plugins": [
|
|
12
12
|
{
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "curdx-flow",
|
|
3
|
-
"version": "2.0.0-beta.
|
|
3
|
+
"version": "2.0.0-beta.15",
|
|
4
4
|
"description": "Claude Code Discipline Layer — spec-driven workflow + goal-backward verification + Karpathy 4 principles enforced via gates. Stops Claude from faking \"done\" on non-trivial features.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "wdx",
|
package/cli/install.js
CHANGED
|
@@ -58,6 +58,15 @@ export async function install(args = []) {
|
|
|
58
58
|
}
|
|
59
59
|
log.ok(`claude CLI found (${ver})`);
|
|
60
60
|
|
|
61
|
+
// Snapshot curdx-flow's pre-install version BEFORE Step 2 touches the
|
|
62
|
+
// marketplace. Step 2 does `claude plugin marketplace remove` + `add` to
|
|
63
|
+
// rebind to the current source, and the remove side-effect also drops
|
|
64
|
+
// any plugins installed from that marketplace. If we only call
|
|
65
|
+
// listPlugins() in Step 3, curdx-flow is already gone from the list and
|
|
66
|
+
// we can't tell a fresh install apart from an upgrade — the Step 3
|
|
67
|
+
// output then incorrectly says "installed" for both cases.
|
|
68
|
+
const prevCurdxFlow = listPlugins().find((p) => p.name === "curdx-flow");
|
|
69
|
+
|
|
61
70
|
// ---------- Step 2: Add marketplace ----------
|
|
62
71
|
log.blank();
|
|
63
72
|
const marketplaceSource = useOffline ? PKG_ROOT : "curdx/curdx-flow";
|
|
@@ -105,25 +114,51 @@ export async function install(args = []) {
|
|
|
105
114
|
// marketplace not local (online install) or unreadable — fall through
|
|
106
115
|
}
|
|
107
116
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
117
|
+
// Use the pre-Step-2 snapshot — by this point `claude plugin marketplace
|
|
118
|
+
// remove` has already evicted the plugin, so listPlugins() here would
|
|
119
|
+
// always return undefined for curdx-flow and we'd mis-report "installed"
|
|
120
|
+
// when we actually upgraded (the bug reported by @wdx's beta.14 log).
|
|
121
|
+
const already = prevCurdxFlow;
|
|
122
|
+
|
|
123
|
+
if (already && shippedVersion && already.version === shippedVersion) {
|
|
124
|
+
// Already on the exact version the tarball ships — no re-install needed.
|
|
125
|
+
// `claude plugin install` would succeed too but the fresh-install output
|
|
126
|
+
// is misleading here.
|
|
127
|
+
log.ok(
|
|
128
|
+
`curdx-flow already at v${already.version} ${color.dim("(no change)")}`
|
|
129
|
+
);
|
|
130
|
+
} else if (already && shippedVersion) {
|
|
131
|
+
// Existing install, different version — frame as an upgrade.
|
|
111
132
|
log.info(
|
|
112
|
-
`curdx-flow
|
|
133
|
+
`curdx-flow v${already.version} → v${shippedVersion}, installing...`
|
|
113
134
|
);
|
|
114
135
|
const r = await run(
|
|
115
136
|
"claude",
|
|
116
|
-
["plugin", "
|
|
137
|
+
["plugin", "install", "curdx-flow@curdx-flow-marketplace"],
|
|
117
138
|
{ silent: true }
|
|
118
139
|
);
|
|
119
140
|
if (r.code !== 0) {
|
|
120
|
-
log.
|
|
121
|
-
|
|
122
|
-
} else {
|
|
123
|
-
log.ok(`curdx-flow updated to v${shippedVersion}`);
|
|
141
|
+
log.err(`Install failed: ${r.stderr.trim() || r.stdout.trim()}`);
|
|
142
|
+
process.exit(1);
|
|
124
143
|
}
|
|
144
|
+
log.ok(`curdx-flow upgraded to v${shippedVersion}`);
|
|
125
145
|
} else if (already) {
|
|
126
|
-
|
|
146
|
+
// shippedVersion unknown (e.g. online install) — best we can do is report
|
|
147
|
+
// the previous version and let `claude plugin install` idempotently
|
|
148
|
+
// re-register.
|
|
149
|
+
log.info(
|
|
150
|
+
`curdx-flow v${already.version} detected, re-registering...`
|
|
151
|
+
);
|
|
152
|
+
const r = await run(
|
|
153
|
+
"claude",
|
|
154
|
+
["plugin", "install", "curdx-flow@curdx-flow-marketplace"],
|
|
155
|
+
{ silent: true }
|
|
156
|
+
);
|
|
157
|
+
if (r.code !== 0) {
|
|
158
|
+
log.err(`Install failed: ${r.stderr.trim() || r.stdout.trim()}`);
|
|
159
|
+
process.exit(1);
|
|
160
|
+
}
|
|
161
|
+
log.ok(`curdx-flow re-registered`);
|
|
127
162
|
} else {
|
|
128
163
|
const r = await run(
|
|
129
164
|
"claude",
|
|
@@ -134,7 +169,11 @@ export async function install(args = []) {
|
|
|
134
169
|
log.err(`Install failed: ${r.stderr.trim() || r.stdout.trim()}`);
|
|
135
170
|
process.exit(1);
|
|
136
171
|
}
|
|
137
|
-
|
|
172
|
+
if (shippedVersion) {
|
|
173
|
+
log.ok(`curdx-flow v${shippedVersion} installed`);
|
|
174
|
+
} else {
|
|
175
|
+
log.ok("curdx-flow installed");
|
|
176
|
+
}
|
|
138
177
|
}
|
|
139
178
|
|
|
140
179
|
// ---------- Step 3.5: Register user-level MCPs (context7, sequential-thinking) ----------
|
package/package.json
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@curdx/flow",
|
|
3
|
-
"version": "2.0.0-beta.
|
|
3
|
+
"version": "2.0.0-beta.15",
|
|
4
4
|
"description": "CLI installer for CurDX-Flow — AI engineering workflow meta-framework for Claude Code",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
|
-
"flow": "bin/curdx-flow.js",
|
|
8
7
|
"curdx-flow": "bin/curdx-flow.js"
|
|
9
8
|
},
|
|
10
9
|
"scripts": {
|