infernoflow 0.37.1 → 0.37.3
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 +64 -0
- package/dist/bin/infernoflow.mjs +29 -277
- package/dist/lib/adopters/angular.mjs +1 -128
- package/dist/lib/adopters/css.mjs +1 -111
- package/dist/lib/adopters/react.mjs +1 -104
- package/dist/lib/ai/ideDetection.mjs +1 -31
- package/dist/lib/ai/localProvider.mjs +1 -88
- package/dist/lib/ai/providerRouter.mjs +2 -295
- package/dist/lib/commands/adopt.mjs +20 -869
- package/dist/lib/commands/adoptWizard.mjs +9 -320
- package/dist/lib/commands/agent.mjs +5 -191
- package/dist/lib/commands/ai.mjs +2 -407
- package/dist/lib/commands/ask.mjs +4 -299
- package/dist/lib/commands/audit.mjs +13 -300
- package/dist/lib/commands/changelog.mjs +26 -594
- package/dist/lib/commands/check.mjs +3 -184
- package/dist/lib/commands/ci.mjs +3 -208
- package/dist/lib/commands/claudeMd.mjs +30 -135
- package/dist/lib/commands/cloud.mjs +10 -773
- package/dist/lib/commands/context.mjs +34 -346
- package/dist/lib/commands/coverage.mjs +2 -282
- package/dist/lib/commands/dashboard.mjs +123 -635
- package/dist/lib/commands/demo.mjs +8 -465
- package/dist/lib/commands/diff.mjs +5 -274
- package/dist/lib/commands/docGate.mjs +2 -81
- package/dist/lib/commands/doctor.mjs +3 -321
- package/dist/lib/commands/explain.mjs +8 -438
- package/dist/lib/commands/export.mjs +10 -239
- package/dist/lib/commands/feedback.mjs +12 -216
- package/dist/lib/commands/generateSkills.mjs +38 -163
- package/dist/lib/commands/graph.mjs +11 -378
- package/dist/lib/commands/health.mjs +2 -309
- package/dist/lib/commands/impact.mjs +2 -325
- package/dist/lib/commands/implement.mjs +7 -103
- package/dist/lib/commands/init.mjs +45 -631
- package/dist/lib/commands/installCursorHooks.mjs +1 -36
- package/dist/lib/commands/installVsCodeCopilotHooks.mjs +1 -37
- package/dist/lib/commands/link.mjs +2 -342
- package/dist/lib/commands/log.mjs +18 -248
- package/dist/lib/commands/monorepo.mjs +4 -428
- package/dist/lib/commands/notify.mjs +4 -258
- package/dist/lib/commands/onboard.mjs +4 -296
- package/dist/lib/commands/prComment.mjs +2 -361
- package/dist/lib/commands/prImpact.mjs +2 -157
- package/dist/lib/commands/publish.mjs +15 -316
- package/dist/lib/commands/recap.mjs +6 -380
- package/dist/lib/commands/report.mjs +28 -272
- package/dist/lib/commands/review.mjs +9 -223
- package/dist/lib/commands/run.mjs +8 -336
- package/dist/lib/commands/scaffold.mjs +54 -419
- package/dist/lib/commands/scan.mjs +11 -1118
- package/dist/lib/commands/scout.mjs +2 -291
- package/dist/lib/commands/setup.mjs +5 -310
- package/dist/lib/commands/share.mjs +13 -196
- package/dist/lib/commands/snapshot.mjs +3 -383
- package/dist/lib/commands/stability.mjs +2 -293
- package/dist/lib/commands/stats.mjs +5 -402
- package/dist/lib/commands/status.mjs +4 -172
- package/dist/lib/commands/suggest.mjs +21 -563
- package/dist/lib/commands/switch.mjs +13 -520
- package/dist/lib/commands/syncAuto.mjs +1 -96
- package/dist/lib/commands/synthesize.mjs +10 -228
- package/dist/lib/commands/teamSync.mjs +2 -388
- package/dist/lib/commands/test.mjs +6 -363
- package/dist/lib/commands/theme.mjs +18 -195
- package/dist/lib/commands/uninstall.mjs +13 -406
- package/dist/lib/commands/upgrade.mjs +20 -153
- package/dist/lib/commands/version.mjs +2 -282
- package/dist/lib/commands/vibe.mjs +7 -357
- package/dist/lib/commands/watch.mjs +4 -203
- package/dist/lib/commands/why.mjs +4 -358
- package/dist/lib/cursorHooksInstall.mjs +1 -60
- package/dist/lib/draftToolingInstall.mjs +7 -68
- package/dist/lib/git/detect-drift.mjs +4 -208
- package/dist/lib/learning/adapt.mjs +6 -101
- package/dist/lib/learning/observe.mjs +1 -119
- package/dist/lib/learning/patternDetector.mjs +1 -298
- package/dist/lib/learning/profile.mjs +2 -279
- package/dist/lib/learning/skillSynthesizer.mjs +24 -145
- package/dist/lib/telemetry.mjs +19 -269
- package/dist/lib/templates/index.mjs +1 -131
- package/dist/lib/theme/scanner.mjs +4 -343
- package/dist/lib/ui/errors.mjs +1 -142
- package/dist/lib/ui/output.mjs +6 -95
- package/dist/lib/ui/prompts.mjs +6 -147
- package/dist/lib/vsCodeCopilotHooksInstall.mjs +1 -42
- package/package.json +2 -4
- package/scripts/postinstall.js +2 -2
|
@@ -1,103 +1,7 @@
|
|
|
1
|
-
import fs from "node:
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
buildGenericImplementPrompt,
|
|
9
|
-
} from "../ui/prompts.mjs";
|
|
10
|
-
|
|
11
|
-
function getFlagValue(args, flag) {
|
|
12
|
-
const idx = args.indexOf(flag);
|
|
13
|
-
return idx !== -1 && args[idx + 1] ? args[idx + 1] : null;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
function extractTask(args) {
|
|
17
|
-
const skipNextFor = new Set(["--mode"]);
|
|
18
|
-
const parts = [];
|
|
19
|
-
for (let i = 0; i < args.length; i += 1) {
|
|
20
|
-
const token = args[i];
|
|
21
|
-
if (token.startsWith("-")) {
|
|
22
|
-
if (skipNextFor.has(token)) i += 1;
|
|
23
|
-
continue;
|
|
24
|
-
}
|
|
25
|
-
if (i === 0) continue; // command name
|
|
26
|
-
parts.push(token);
|
|
27
|
-
}
|
|
28
|
-
return parts.join(" ").trim();
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
function copyToClipboard(text) {
|
|
32
|
-
try {
|
|
33
|
-
const p = process.platform;
|
|
34
|
-
if (p === "win32") execSync("clip", { input: text });
|
|
35
|
-
else if (p === "darwin") execSync("pbcopy", { input: text });
|
|
36
|
-
else {
|
|
37
|
-
try { execSync("xclip -selection clipboard", { input: text }); }
|
|
38
|
-
catch { execSync("xsel --clipboard --input", { input: text }); }
|
|
39
|
-
}
|
|
40
|
-
return true;
|
|
41
|
-
} catch {
|
|
42
|
-
return false;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
export async function implementCommand(args = []) {
|
|
47
|
-
header("implement");
|
|
48
|
-
|
|
49
|
-
const cwd = process.cwd();
|
|
50
|
-
const infernoDir = path.join(cwd, "inferno");
|
|
51
|
-
if (!fs.existsSync(infernoDir)) {
|
|
52
|
-
errorAndExit("inferno/ not found", "Run: infernoflow init");
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
const mode = (getFlagValue(args, "--mode") || "both").toLowerCase();
|
|
56
|
-
const copyFlag = args.includes("--copy") || args.includes("-c");
|
|
57
|
-
if (!["cursor", "generic", "both"].includes(mode)) {
|
|
58
|
-
errorAndExit("Invalid --mode value", "Use: --mode cursor|generic|both");
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
const rawTask = extractTask(args);
|
|
62
|
-
if (!rawTask) {
|
|
63
|
-
errorAndExit("No task provided", 'Usage: infernoflow implement "your task description"');
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
const context = loadImplementContext(cwd);
|
|
67
|
-
const cursorPrompt = buildCursorImplementPrompt({ task: rawTask, ...context });
|
|
68
|
-
const genericPrompt = buildGenericImplementPrompt({ task: rawTask, ...context });
|
|
69
|
-
|
|
70
|
-
info(`Task: ${cyan(rawTask)}`);
|
|
71
|
-
info(`Mode: ${cyan(mode)}`);
|
|
72
|
-
warn("If you hit model high-load/resource-exhausted, retry with Auto/another model.");
|
|
73
|
-
|
|
74
|
-
if (mode === "cursor" || mode === "both") {
|
|
75
|
-
section("Cursor Agent Prompt");
|
|
76
|
-
console.log();
|
|
77
|
-
console.log(gray("─".repeat(50)));
|
|
78
|
-
console.log(cursorPrompt);
|
|
79
|
-
console.log(gray("─".repeat(50)));
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
if (mode === "generic" || mode === "both") {
|
|
83
|
-
section("Generic Agent Prompt");
|
|
84
|
-
console.log();
|
|
85
|
-
console.log(gray("─".repeat(50)));
|
|
86
|
-
console.log(genericPrompt);
|
|
87
|
-
console.log(gray("─".repeat(50)));
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
if (copyFlag) {
|
|
91
|
-
const textToCopy =
|
|
92
|
-
mode === "cursor"
|
|
93
|
-
? cursorPrompt
|
|
94
|
-
: mode === "generic"
|
|
95
|
-
? genericPrompt
|
|
96
|
-
: `## Cursor Agent Prompt\n\n${cursorPrompt}\n\n## Generic Agent Prompt\n\n${genericPrompt}`;
|
|
97
|
-
const ok = copyToClipboard(textToCopy);
|
|
98
|
-
if (ok) info(`Copied ${mode} prompt${mode === "both" ? "s" : ""} to clipboard.`);
|
|
99
|
-
else warn("Clipboard copy failed. Copy from terminal output.");
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
console.log();
|
|
103
|
-
}
|
|
1
|
+
import y from"node:fs";import b from"node:path";import{execSync as c}from"node:child_process";import{header as k,section as f,info as m,warn as d,cyan as h,gray as s,errorAndExit as u}from"../ui/output.mjs";import{loadImplementContext as w,buildCursorImplementPrompt as x,buildGenericImplementPrompt as C}from"../ui/prompts.mjs";function P(o,n){const t=o.indexOf(n);return t!==-1&&o[t+1]?o[t+1]:null}function A(o){const n=new Set(["--mode"]),t=[];for(let e=0;e<o.length;e+=1){const r=o[e];if(r.startsWith("-")){n.has(r)&&(e+=1);continue}e!==0&&t.push(r)}return t.join(" ").trim()}function $(o){try{const n=process.platform;if(n==="win32")c("clip",{input:o});else if(n==="darwin")c("pbcopy",{input:o});else try{c("xclip -selection clipboard",{input:o})}catch{c("xsel --clipboard --input",{input:o})}return!0}catch{return!1}}async function j(o=[]){k("implement");const n=process.cwd(),t=b.join(n,"inferno");y.existsSync(t)||u("inferno/ not found","Run: infernoflow init");const e=(P(o,"--mode")||"both").toLowerCase(),r=o.includes("--copy")||o.includes("-c");["cursor","generic","both"].includes(e)||u("Invalid --mode value","Use: --mode cursor|generic|both");const i=A(o);i||u("No task provided",'Usage: infernoflow implement "your task description"');const a=w(n),l=x({task:i,...a}),p=C({task:i,...a});if(m(`Task: ${h(i)}`),m(`Mode: ${h(e)}`),d("If you hit model high-load/resource-exhausted, retry with Auto/another model."),(e==="cursor"||e==="both")&&(f("Cursor Agent Prompt"),console.log(),console.log(s("\u2500".repeat(50))),console.log(l),console.log(s("\u2500".repeat(50)))),(e==="generic"||e==="both")&&(f("Generic Agent Prompt"),console.log(),console.log(s("\u2500".repeat(50))),console.log(p),console.log(s("\u2500".repeat(50)))),r){const g=e==="cursor"?l:e==="generic"?p:`## Cursor Agent Prompt
|
|
2
|
+
|
|
3
|
+
${l}
|
|
4
|
+
|
|
5
|
+
## Generic Agent Prompt
|
|
6
|
+
|
|
7
|
+
${p}`;$(g)?m(`Copied ${e} prompt${e==="both"?"s":""} to clipboard.`):d("Clipboard copy failed. Copy from terminal output.")}console.log()}export{j as implementCommand};
|