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.
Files changed (88) hide show
  1. package/CHANGELOG.md +64 -0
  2. package/dist/bin/infernoflow.mjs +29 -277
  3. package/dist/lib/adopters/angular.mjs +1 -128
  4. package/dist/lib/adopters/css.mjs +1 -111
  5. package/dist/lib/adopters/react.mjs +1 -104
  6. package/dist/lib/ai/ideDetection.mjs +1 -31
  7. package/dist/lib/ai/localProvider.mjs +1 -88
  8. package/dist/lib/ai/providerRouter.mjs +2 -295
  9. package/dist/lib/commands/adopt.mjs +20 -869
  10. package/dist/lib/commands/adoptWizard.mjs +9 -320
  11. package/dist/lib/commands/agent.mjs +5 -191
  12. package/dist/lib/commands/ai.mjs +2 -407
  13. package/dist/lib/commands/ask.mjs +4 -299
  14. package/dist/lib/commands/audit.mjs +13 -300
  15. package/dist/lib/commands/changelog.mjs +26 -594
  16. package/dist/lib/commands/check.mjs +3 -184
  17. package/dist/lib/commands/ci.mjs +3 -208
  18. package/dist/lib/commands/claudeMd.mjs +30 -135
  19. package/dist/lib/commands/cloud.mjs +10 -773
  20. package/dist/lib/commands/context.mjs +34 -346
  21. package/dist/lib/commands/coverage.mjs +2 -282
  22. package/dist/lib/commands/dashboard.mjs +123 -635
  23. package/dist/lib/commands/demo.mjs +8 -465
  24. package/dist/lib/commands/diff.mjs +5 -274
  25. package/dist/lib/commands/docGate.mjs +2 -81
  26. package/dist/lib/commands/doctor.mjs +3 -321
  27. package/dist/lib/commands/explain.mjs +8 -438
  28. package/dist/lib/commands/export.mjs +10 -239
  29. package/dist/lib/commands/feedback.mjs +12 -216
  30. package/dist/lib/commands/generateSkills.mjs +38 -163
  31. package/dist/lib/commands/graph.mjs +11 -378
  32. package/dist/lib/commands/health.mjs +2 -309
  33. package/dist/lib/commands/impact.mjs +2 -325
  34. package/dist/lib/commands/implement.mjs +7 -103
  35. package/dist/lib/commands/init.mjs +45 -631
  36. package/dist/lib/commands/installCursorHooks.mjs +1 -36
  37. package/dist/lib/commands/installVsCodeCopilotHooks.mjs +1 -37
  38. package/dist/lib/commands/link.mjs +2 -342
  39. package/dist/lib/commands/log.mjs +18 -248
  40. package/dist/lib/commands/monorepo.mjs +4 -428
  41. package/dist/lib/commands/notify.mjs +4 -258
  42. package/dist/lib/commands/onboard.mjs +4 -296
  43. package/dist/lib/commands/prComment.mjs +2 -361
  44. package/dist/lib/commands/prImpact.mjs +2 -157
  45. package/dist/lib/commands/publish.mjs +15 -316
  46. package/dist/lib/commands/recap.mjs +6 -380
  47. package/dist/lib/commands/report.mjs +28 -272
  48. package/dist/lib/commands/review.mjs +9 -223
  49. package/dist/lib/commands/run.mjs +8 -336
  50. package/dist/lib/commands/scaffold.mjs +54 -419
  51. package/dist/lib/commands/scan.mjs +11 -1118
  52. package/dist/lib/commands/scout.mjs +2 -291
  53. package/dist/lib/commands/setup.mjs +5 -310
  54. package/dist/lib/commands/share.mjs +13 -196
  55. package/dist/lib/commands/snapshot.mjs +3 -383
  56. package/dist/lib/commands/stability.mjs +2 -293
  57. package/dist/lib/commands/stats.mjs +5 -402
  58. package/dist/lib/commands/status.mjs +4 -172
  59. package/dist/lib/commands/suggest.mjs +21 -563
  60. package/dist/lib/commands/switch.mjs +13 -520
  61. package/dist/lib/commands/syncAuto.mjs +1 -96
  62. package/dist/lib/commands/synthesize.mjs +10 -228
  63. package/dist/lib/commands/teamSync.mjs +2 -388
  64. package/dist/lib/commands/test.mjs +6 -363
  65. package/dist/lib/commands/theme.mjs +18 -195
  66. package/dist/lib/commands/uninstall.mjs +13 -406
  67. package/dist/lib/commands/upgrade.mjs +20 -153
  68. package/dist/lib/commands/version.mjs +2 -282
  69. package/dist/lib/commands/vibe.mjs +7 -357
  70. package/dist/lib/commands/watch.mjs +4 -203
  71. package/dist/lib/commands/why.mjs +4 -358
  72. package/dist/lib/cursorHooksInstall.mjs +1 -60
  73. package/dist/lib/draftToolingInstall.mjs +7 -68
  74. package/dist/lib/git/detect-drift.mjs +4 -208
  75. package/dist/lib/learning/adapt.mjs +6 -101
  76. package/dist/lib/learning/observe.mjs +1 -119
  77. package/dist/lib/learning/patternDetector.mjs +1 -298
  78. package/dist/lib/learning/profile.mjs +2 -279
  79. package/dist/lib/learning/skillSynthesizer.mjs +24 -145
  80. package/dist/lib/telemetry.mjs +19 -269
  81. package/dist/lib/templates/index.mjs +1 -131
  82. package/dist/lib/theme/scanner.mjs +4 -343
  83. package/dist/lib/ui/errors.mjs +1 -142
  84. package/dist/lib/ui/output.mjs +6 -95
  85. package/dist/lib/ui/prompts.mjs +6 -147
  86. package/dist/lib/vsCodeCopilotHooksInstall.mjs +1 -42
  87. package/package.json +2 -4
  88. package/scripts/postinstall.js +2 -2
@@ -1,103 +1,7 @@
1
- import fs from "node:fs";
2
- import path from "node:path";
3
- import { execSync } from "node:child_process";
4
- import { header, section, info, warn, cyan, gray, errorAndExit } from "../ui/output.mjs";
5
- import {
6
- loadImplementContext,
7
- buildCursorImplementPrompt,
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};