@curdx/flow 2.0.12 → 2.0.14
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.
|
@@ -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.
|
|
9
|
+
"version": "2.0.14"
|
|
10
10
|
},
|
|
11
11
|
"plugins": [
|
|
12
12
|
{
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "curdx-flow",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.14",
|
|
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",
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import { color, ensureClaudeMemRuntimes, listPlugins, log, multiselectClack, note, run, text, writeConfig } from "./utils.js";
|
|
2
2
|
import { BUNDLED_MCPS, RECOMMENDED_PLUGINS, REQUIRED_PLUGINS } from "./registry.js";
|
|
3
3
|
import { readUserMcpConfig } from "./utils.js";
|
|
4
|
+
import {
|
|
5
|
+
mcpAddArgs,
|
|
6
|
+
mcpRemoveArgs,
|
|
7
|
+
pluginInstallArgs,
|
|
8
|
+
pluginMarketplaceAddArgs,
|
|
9
|
+
} from "./lib/claude-commands.js";
|
|
4
10
|
|
|
5
11
|
const RECOMMENDED = RECOMMENDED_PLUGINS;
|
|
6
12
|
|
|
@@ -11,7 +17,7 @@ export async function installRequiredPlugins({ yes, language, config }) {
|
|
|
11
17
|
console.log(` ${color.cyan("▸")} Installing ${color.bold(plugin.name)}...`);
|
|
12
18
|
const ma = await run(
|
|
13
19
|
"claude",
|
|
14
|
-
|
|
20
|
+
pluginMarketplaceAddArgs(plugin),
|
|
15
21
|
{ silent: true }
|
|
16
22
|
);
|
|
17
23
|
if (ma.code !== 0 && !ma.stderr.includes("already")) {
|
|
@@ -20,7 +26,7 @@ export async function installRequiredPlugins({ yes, language, config }) {
|
|
|
20
26
|
|
|
21
27
|
const ir = await run(
|
|
22
28
|
"claude",
|
|
23
|
-
|
|
29
|
+
pluginInstallArgs(plugin),
|
|
24
30
|
{ silent: true }
|
|
25
31
|
);
|
|
26
32
|
if (ir.code === 0) {
|
|
@@ -61,7 +67,7 @@ export async function registerBundledMcps() {
|
|
|
61
67
|
}
|
|
62
68
|
const r = await run(
|
|
63
69
|
"claude",
|
|
64
|
-
|
|
70
|
+
mcpAddArgs(mcp),
|
|
65
71
|
{ silent: true }
|
|
66
72
|
);
|
|
67
73
|
if (r.code === 0) {
|
|
@@ -125,7 +131,7 @@ export async function installRecommendedPlugins({ all, yes, language }) {
|
|
|
125
131
|
if (rec.marketplaceSource) {
|
|
126
132
|
const ma = await run(
|
|
127
133
|
"claude",
|
|
128
|
-
|
|
134
|
+
pluginMarketplaceAddArgs(rec),
|
|
129
135
|
{ silent: true }
|
|
130
136
|
);
|
|
131
137
|
if (ma.code !== 0 && !ma.stderr.includes("already")) {
|
|
@@ -133,7 +139,7 @@ export async function installRecommendedPlugins({ all, yes, language }) {
|
|
|
133
139
|
}
|
|
134
140
|
}
|
|
135
141
|
|
|
136
|
-
const ir = await run("claude",
|
|
142
|
+
const ir = await run("claude", pluginInstallArgs(rec), {
|
|
137
143
|
silent: true,
|
|
138
144
|
});
|
|
139
145
|
if (ir.code === 0) {
|
|
@@ -203,7 +209,12 @@ async function promptPluginConfig(plugin, language, config) {
|
|
|
203
209
|
|
|
204
210
|
const r = await run(
|
|
205
211
|
"claude",
|
|
206
|
-
|
|
212
|
+
mcpAddArgs({
|
|
213
|
+
name: "context7",
|
|
214
|
+
env: [`CONTEXT7_API_KEY=${apiKey}`],
|
|
215
|
+
command: "npx",
|
|
216
|
+
args: ["-y", "@upstash/context7-mcp"],
|
|
217
|
+
}),
|
|
207
218
|
{ silent: true }
|
|
208
219
|
);
|
|
209
220
|
|
|
@@ -214,10 +225,15 @@ async function promptPluginConfig(plugin, language, config) {
|
|
|
214
225
|
: " Context7 API key configured"
|
|
215
226
|
);
|
|
216
227
|
} else if (r.stderr.includes("already exists")) {
|
|
217
|
-
await run("claude",
|
|
228
|
+
await run("claude", mcpRemoveArgs({ name: "context7" }), { silent: true });
|
|
218
229
|
const r2 = await run(
|
|
219
230
|
"claude",
|
|
220
|
-
|
|
231
|
+
mcpAddArgs({
|
|
232
|
+
name: "context7",
|
|
233
|
+
env: [`CONTEXT7_API_KEY=${apiKey}`],
|
|
234
|
+
command: "npx",
|
|
235
|
+
args: ["-y", "@upstash/context7-mcp"],
|
|
236
|
+
}),
|
|
221
237
|
{ silent: true }
|
|
222
238
|
);
|
|
223
239
|
if (r2.code === 0) {
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
export function pluginMarketplaceAddArgs({ scope, marketplaceSource }) {
|
|
2
|
+
return ["plugin", "marketplace", "add", "--scope", scope, marketplaceSource];
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
export function pluginMarketplaceUpdateArgs(marketplaceId) {
|
|
6
|
+
return ["plugin", "marketplace", "update", marketplaceId];
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export function pluginMarketplaceRemoveArgs(marketplaceId) {
|
|
10
|
+
return ["plugin", "marketplace", "remove", marketplaceId];
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export function pluginInstallArgs({ scope, installSpec }) {
|
|
14
|
+
return ["plugin", "install", "--scope", scope, installSpec];
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export function pluginUpdateArgs({ scope = "user", spec }) {
|
|
18
|
+
return ["plugin", "update", "--scope", scope, spec];
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export function pluginUninstallArgs({ scope, uninstallSpec, uninstallArgs = [] }) {
|
|
22
|
+
return ["plugin", "uninstall", "--scope", scope, ...uninstallArgs, uninstallSpec];
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export function mcpAddArgs({ scope = "user", name, command, args = [], env = [] }) {
|
|
26
|
+
return [
|
|
27
|
+
"mcp",
|
|
28
|
+
"add",
|
|
29
|
+
"--scope",
|
|
30
|
+
scope,
|
|
31
|
+
name,
|
|
32
|
+
...env.flatMap((value) => ["--env", value]),
|
|
33
|
+
"--",
|
|
34
|
+
command,
|
|
35
|
+
...args,
|
|
36
|
+
];
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export function mcpRemoveArgs({ scope = "user", name }) {
|
|
40
|
+
return ["mcp", "remove", "--scope", scope, name];
|
|
41
|
+
}
|
package/cli/uninstall.js
CHANGED
|
@@ -17,6 +17,11 @@ import {
|
|
|
17
17
|
} from "./utils.js";
|
|
18
18
|
import { removeGlobalProtocols, GLOBAL_CLAUDE_MD } from "./protocols.js";
|
|
19
19
|
import { REQUIRED_PLUGINS, RECOMMENDED_PLUGINS, BUNDLED_MCPS } from "./registry.js";
|
|
20
|
+
import {
|
|
21
|
+
mcpRemoveArgs,
|
|
22
|
+
pluginMarketplaceRemoveArgs,
|
|
23
|
+
pluginUninstallArgs,
|
|
24
|
+
} from "./lib/claude-commands.js";
|
|
20
25
|
|
|
21
26
|
const HOME = homedir();
|
|
22
27
|
|
|
@@ -78,7 +83,10 @@ export async function uninstall(args = []) {
|
|
|
78
83
|
} else {
|
|
79
84
|
const r = await run(
|
|
80
85
|
"claude",
|
|
81
|
-
|
|
86
|
+
pluginUninstallArgs({
|
|
87
|
+
scope: "user",
|
|
88
|
+
uninstallSpec: "curdx-flow@curdx-flow-marketplace",
|
|
89
|
+
}),
|
|
82
90
|
{ silent: true }
|
|
83
91
|
);
|
|
84
92
|
if (r.code === 0) {
|
|
@@ -127,7 +135,7 @@ export async function uninstall(args = []) {
|
|
|
127
135
|
console.log(` ${color.cyan("▸")} Uninstalling ${color.bold(rec.name)}...`);
|
|
128
136
|
const r = await run(
|
|
129
137
|
"claude",
|
|
130
|
-
|
|
138
|
+
pluginUninstallArgs(rec),
|
|
131
139
|
{ silent: true }
|
|
132
140
|
);
|
|
133
141
|
if (r.code === 0) {
|
|
@@ -159,7 +167,7 @@ export async function uninstall(args = []) {
|
|
|
159
167
|
);
|
|
160
168
|
if (removeMcps) {
|
|
161
169
|
for (const mcp of BUNDLED_MCPS) {
|
|
162
|
-
const r = await run("claude",
|
|
170
|
+
const r = await run("claude", mcpRemoveArgs({ name: mcp.name }), {
|
|
163
171
|
silent: true,
|
|
164
172
|
});
|
|
165
173
|
if (r.code === 0) {
|
|
@@ -189,7 +197,7 @@ export async function uninstall(args = []) {
|
|
|
189
197
|
for (const plugin of REQUIRED) {
|
|
190
198
|
const r = await run(
|
|
191
199
|
"claude",
|
|
192
|
-
|
|
200
|
+
pluginUninstallArgs(plugin),
|
|
193
201
|
{ silent: true }
|
|
194
202
|
);
|
|
195
203
|
if (r.code === 0) {
|
|
@@ -225,7 +233,7 @@ export async function uninstall(args = []) {
|
|
|
225
233
|
for (const marketplaceId of marketplaceIds) {
|
|
226
234
|
const r = await run(
|
|
227
235
|
"claude",
|
|
228
|
-
|
|
236
|
+
pluginMarketplaceRemoveArgs(marketplaceId),
|
|
229
237
|
{ silent: true }
|
|
230
238
|
);
|
|
231
239
|
if (r.code === 0) {
|
package/cli/upgrade.js
CHANGED
|
@@ -7,6 +7,10 @@ import {
|
|
|
7
7
|
PLUGINS_TO_UPDATE,
|
|
8
8
|
MARKETPLACES_TO_REFRESH,
|
|
9
9
|
} from "./registry.js";
|
|
10
|
+
import {
|
|
11
|
+
pluginMarketplaceUpdateArgs,
|
|
12
|
+
pluginUpdateArgs,
|
|
13
|
+
} from "./lib/claude-commands.js";
|
|
10
14
|
|
|
11
15
|
export async function upgrade(args = []) {
|
|
12
16
|
log.title("⬆️ CurdX-Flow upgrade");
|
|
@@ -21,7 +25,7 @@ export async function upgrade(args = []) {
|
|
|
21
25
|
for (const mp of MARKETPLACES_TO_REFRESH) {
|
|
22
26
|
const r = await run(
|
|
23
27
|
"claude",
|
|
24
|
-
|
|
28
|
+
pluginMarketplaceUpdateArgs(mp),
|
|
25
29
|
{ silent: true }
|
|
26
30
|
);
|
|
27
31
|
if (r.code === 0) {
|
|
@@ -47,7 +51,7 @@ export async function upgrade(args = []) {
|
|
|
47
51
|
continue;
|
|
48
52
|
}
|
|
49
53
|
|
|
50
|
-
const r = await run("claude",
|
|
54
|
+
const r = await run("claude", pluginUpdateArgs({ spec }), { silent: true });
|
|
51
55
|
if (r.code === 0) {
|
|
52
56
|
const updated = r.stdout.includes("updated from");
|
|
53
57
|
if (updated) {
|