@curdx/flow 2.0.12 → 2.0.13
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.13"
|
|
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.13",
|
|
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,25 @@
|
|
|
1
|
+
export function pluginMarketplaceAddArgs({ scope, marketplaceSource }) {
|
|
2
|
+
return ["plugin", "marketplace", "add", "--scope", scope, marketplaceSource];
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
export function pluginInstallArgs({ scope, installSpec }) {
|
|
6
|
+
return ["plugin", "install", "--scope", scope, installSpec];
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export function mcpAddArgs({ scope = "user", name, command, args = [], env = [] }) {
|
|
10
|
+
return [
|
|
11
|
+
"mcp",
|
|
12
|
+
"add",
|
|
13
|
+
"--scope",
|
|
14
|
+
scope,
|
|
15
|
+
name,
|
|
16
|
+
...env.flatMap((value) => ["--env", value]),
|
|
17
|
+
"--",
|
|
18
|
+
command,
|
|
19
|
+
...args,
|
|
20
|
+
];
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export function mcpRemoveArgs({ scope = "user", name }) {
|
|
24
|
+
return ["mcp", "remove", "--scope", scope, name];
|
|
25
|
+
}
|