infernoflow 0.37.1 → 0.37.4
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 +71 -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
package/dist/lib/ui/prompts.mjs
CHANGED
|
@@ -1,147 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
function ask(question, defaultVal = "") {
|
|
8
|
-
return new Promise(resolve => {
|
|
9
|
-
const hint = defaultVal ? ` (${defaultVal})` : "";
|
|
10
|
-
const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
|
|
11
|
-
rl.question(` ${question}${hint}: `, answer => {
|
|
12
|
-
rl.close();
|
|
13
|
-
resolve(answer.trim() || defaultVal);
|
|
14
|
-
});
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export async function promptInit() {
|
|
19
|
-
const policyId = await ask("Project / policy name", process.env._INFERNO_DEFAULT_POLICY || "my-project");
|
|
20
|
-
const caps = await ask("Capabilities (comma-separated)", "CreateTask, ReadTasks, UpdateTask, DeleteTask");
|
|
21
|
-
return { policyId, capabilities: caps.split(",").map(c => c.trim()).filter(Boolean) };
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
function readJson(filePath) {
|
|
25
|
-
try {
|
|
26
|
-
return JSON.parse(fs.readFileSync(filePath, "utf8"));
|
|
27
|
-
} catch {
|
|
28
|
-
return null;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
export function loadImplementContext(cwd) {
|
|
33
|
-
const infernoDir = path.join(cwd, "inferno");
|
|
34
|
-
const contract = readJson(path.join(infernoDir, "contract.json")) || {};
|
|
35
|
-
const caps = readJson(path.join(infernoDir, "capabilities.json")) || { capabilities: [] };
|
|
36
|
-
const state = readJson(path.join(infernoDir, "context-state.json")) || {};
|
|
37
|
-
const scenariosDir = path.join(infernoDir, "scenarios");
|
|
38
|
-
|
|
39
|
-
const scenarios = [];
|
|
40
|
-
if (fs.existsSync(scenariosDir)) {
|
|
41
|
-
for (const fileName of fs.readdirSync(scenariosDir).filter((f) => f.endsWith(".json"))) {
|
|
42
|
-
const scenario = readJson(path.join(scenariosDir, fileName));
|
|
43
|
-
if (scenario) scenarios.push({ file: fileName, scenario });
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
return { contract, caps, state, scenarios };
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
function renderCaps(capsRegistry) {
|
|
51
|
-
const list = capsRegistry?.capabilities || [];
|
|
52
|
-
if (list.length === 0) return "- none";
|
|
53
|
-
return list.map((c) => `- ${c.id}: ${c.title || c.id}`).join("\n");
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
function renderScenarios(scenarios) {
|
|
57
|
-
if (!scenarios || scenarios.length === 0) return "- none";
|
|
58
|
-
return scenarios
|
|
59
|
-
.map(({ file, scenario }) => {
|
|
60
|
-
const covered = (scenario.capabilitiesCovered || []).join(", ") || "none";
|
|
61
|
-
return `- ${file}: covers [${covered}]`;
|
|
62
|
-
})
|
|
63
|
-
.join("\n");
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
function baseContextBlock({ contract, caps, scenarios, state }) {
|
|
67
|
-
const policy = contract?.policyId || "unknown-policy";
|
|
68
|
-
const version = contract?.policyVersion ?? "unknown";
|
|
69
|
-
const declared = (contract?.capabilities || []).join(", ") || "none";
|
|
70
|
-
const working = state?.working || "not set";
|
|
71
|
-
const intent = state?.intent || "not set";
|
|
72
|
-
|
|
73
|
-
return [
|
|
74
|
-
`Project policyId: ${policy}`,
|
|
75
|
-
`Policy version: ${version}`,
|
|
76
|
-
`Declared capabilities: [${declared}]`,
|
|
77
|
-
`Working on: ${working}`,
|
|
78
|
-
`Intent: ${intent}`,
|
|
79
|
-
"",
|
|
80
|
-
"Capabilities registry:",
|
|
81
|
-
renderCaps(caps),
|
|
82
|
-
"",
|
|
83
|
-
"Scenarios:",
|
|
84
|
-
renderScenarios(scenarios),
|
|
85
|
-
].join("\n");
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
export function buildCursorImplementPrompt({ task, contract, caps, scenarios, state }) {
|
|
89
|
-
return [
|
|
90
|
-
"You are a Cursor coding agent working inside my repository.",
|
|
91
|
-
"Implement the task end-to-end with minimal reliable changes.",
|
|
92
|
-
"",
|
|
93
|
-
baseContextBlock({ contract, caps, scenarios, state }),
|
|
94
|
-
"",
|
|
95
|
-
`Task: ${task}`,
|
|
96
|
-
"",
|
|
97
|
-
"Requirements:",
|
|
98
|
-
"1) Propose smallest safe implementation.",
|
|
99
|
-
"2) Explain which files you changed and why.",
|
|
100
|
-
"3) Implement production-ready code.",
|
|
101
|
-
"4) Preserve backward compatibility unless explicitly requested.",
|
|
102
|
-
"5) Update tests or add smoke checks.",
|
|
103
|
-
"6) Provide run/verify commands.",
|
|
104
|
-
"7) If assumptions are needed, state briefly and proceed with sensible defaults.",
|
|
105
|
-
"",
|
|
106
|
-
"Output format:",
|
|
107
|
-
"- Plan (short)",
|
|
108
|
-
"- Code changes (by file)",
|
|
109
|
-
"- Tests updated/added",
|
|
110
|
-
"- Commands to run",
|
|
111
|
-
"- Acceptance checklist",
|
|
112
|
-
"",
|
|
113
|
-
"Quality bar:",
|
|
114
|
-
"- No TODO placeholders in final code",
|
|
115
|
-
"- Handle edge cases and errors",
|
|
116
|
-
"- Keep naming/style consistent",
|
|
117
|
-
"- Prefer simple maintainable solutions",
|
|
118
|
-
"",
|
|
119
|
-
"If model is overloaded (resource exhausted), retry with Auto/another model and continue deterministically.",
|
|
120
|
-
].join("\n");
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
export function buildGenericImplementPrompt({ task, contract, caps, scenarios, state }) {
|
|
124
|
-
return [
|
|
125
|
-
"You are my senior software engineer pair.",
|
|
126
|
-
"Implement this task end-to-end in my project.",
|
|
127
|
-
"",
|
|
128
|
-
baseContextBlock({ contract, caps, scenarios, state }),
|
|
129
|
-
"",
|
|
130
|
-
`Goal: ${task}`,
|
|
131
|
-
"",
|
|
132
|
-
"Deliverables:",
|
|
133
|
-
"- Short implementation plan",
|
|
134
|
-
"- Exact file-level changes",
|
|
135
|
-
"- Test updates",
|
|
136
|
-
"- Verification commands",
|
|
137
|
-
"- Final acceptance checklist",
|
|
138
|
-
"",
|
|
139
|
-
"Constraints:",
|
|
140
|
-
"- Keep backward compatibility by default",
|
|
141
|
-
"- Make minimal reliable changes",
|
|
142
|
-
"- Handle edge cases and error states",
|
|
143
|
-
"- Keep output concise and actionable",
|
|
144
|
-
"",
|
|
145
|
-
"If you encounter temporary model high-load errors, retry and preserve the same output structure.",
|
|
146
|
-
].join("\n");
|
|
147
|
-
}
|
|
1
|
+
import*as f from"node:readline";import*as d from"node:fs";import*as a from"node:path";function m(e,n=""){return new Promise(t=>{const o=n?` (${n})`:"",i=f.createInterface({input:process.stdin,output:process.stdout});i.question(` ${e}${o}: `,r=>{i.close(),t(r.trim()||n)})})}async function b(){const e=await m("Project / policy name",process.env._INFERNO_DEFAULT_POLICY||"my-project"),n=await m("Capabilities (comma-separated)","CreateTask, ReadTasks, UpdateTask, DeleteTask");return{policyId:e,capabilities:n.split(",").map(t=>t.trim()).filter(Boolean)}}function p(e){try{return JSON.parse(d.readFileSync(e,"utf8"))}catch{return null}}function k(e){const n=a.join(e,"inferno"),t=p(a.join(n,"contract.json"))||{},o=p(a.join(n,"capabilities.json"))||{capabilities:[]},i=p(a.join(n,"context-state.json"))||{},r=a.join(n,"scenarios"),c=[];if(d.existsSync(r))for(const l of d.readdirSync(r).filter(s=>s.endsWith(".json"))){const s=p(a.join(r,l));s&&c.push({file:l,scenario:s})}return{contract:t,caps:o,state:i,scenarios:c}}function y(e){const n=e?.capabilities||[];return n.length===0?"- none":n.map(t=>`- ${t.id}: ${t.title||t.id}`).join(`
|
|
2
|
+
`)}function h(e){return!e||e.length===0?"- none":e.map(({file:n,scenario:t})=>{const o=(t.capabilitiesCovered||[]).join(", ")||"none";return`- ${n}: covers [${o}]`}).join(`
|
|
3
|
+
`)}function u({contract:e,caps:n,scenarios:t,state:o}){const i=e?.policyId||"unknown-policy",r=e?.policyVersion??"unknown",c=(e?.capabilities||[]).join(", ")||"none",l=o?.working||"not set",s=o?.intent||"not set";return[`Project policyId: ${i}`,`Policy version: ${r}`,`Declared capabilities: [${c}]`,`Working on: ${l}`,`Intent: ${s}`,"","Capabilities registry:",y(n),"","Scenarios:",h(t)].join(`
|
|
4
|
+
`)}function j({task:e,contract:n,caps:t,scenarios:o,state:i}){return["You are a Cursor coding agent working inside my repository.","Implement the task end-to-end with minimal reliable changes.","",u({contract:n,caps:t,scenarios:o,state:i}),"",`Task: ${e}`,"","Requirements:","1) Propose smallest safe implementation.","2) Explain which files you changed and why.","3) Implement production-ready code.","4) Preserve backward compatibility unless explicitly requested.","5) Update tests or add smoke checks.","6) Provide run/verify commands.","7) If assumptions are needed, state briefly and proceed with sensible defaults.","","Output format:","- Plan (short)","- Code changes (by file)","- Tests updated/added","- Commands to run","- Acceptance checklist","","Quality bar:","- No TODO placeholders in final code","- Handle edge cases and errors","- Keep naming/style consistent","- Prefer simple maintainable solutions","","If model is overloaded (resource exhausted), retry with Auto/another model and continue deterministically."].join(`
|
|
5
|
+
`)}function g({task:e,contract:n,caps:t,scenarios:o,state:i}){return["You are my senior software engineer pair.","Implement this task end-to-end in my project.","",u({contract:n,caps:t,scenarios:o,state:i}),"",`Goal: ${e}`,"","Deliverables:","- Short implementation plan","- Exact file-level changes","- Test updates","- Verification commands","- Final acceptance checklist","","Constraints:","- Keep backward compatibility by default","- Make minimal reliable changes","- Handle edge cases and error states","- Keep output concise and actionable","","If you encounter temporary model high-load errors, retry and preserve the same output structure."].join(`
|
|
6
|
+
`)}export{j as buildCursorImplementPrompt,g as buildGenericImplementPrompt,k as loadImplementContext,b as promptInit};
|
|
@@ -1,42 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import * as path from "node:path";
|
|
3
|
-
import { installInfernoDraftTooling } from "./draftToolingInstall.mjs";
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* VS Code + GitHub Copilot agent hooks (Preview). See:
|
|
7
|
-
* https://code.visualstudio.com/docs/copilot/customization/hooks
|
|
8
|
-
*
|
|
9
|
-
* @param {object} opts
|
|
10
|
-
* @param {string} opts.cwd
|
|
11
|
-
* @param {string} opts.templatesRoot
|
|
12
|
-
* @param {boolean} opts.force
|
|
13
|
-
* @param {boolean} opts.silent
|
|
14
|
-
* @param {(msg: string) => void} [opts.logOk]
|
|
15
|
-
* @param {(msg: string) => void} [opts.logWarn]
|
|
16
|
-
*/
|
|
17
|
-
export function installVsCodeCopilotHooksArtifacts(opts) {
|
|
18
|
-
const { cwd, templatesRoot, force, silent } = opts;
|
|
19
|
-
const logOk = opts.logOk || (() => {});
|
|
20
|
-
const logWarn = opts.logWarn || (() => {});
|
|
21
|
-
|
|
22
|
-
function copyFile(src, dst) {
|
|
23
|
-
if (fs.existsSync(dst) && !force) {
|
|
24
|
-
if (!silent) logWarn("Skipped (exists): " + path.relative(cwd, dst));
|
|
25
|
-
return false;
|
|
26
|
-
}
|
|
27
|
-
fs.mkdirSync(path.dirname(dst), { recursive: true });
|
|
28
|
-
fs.copyFileSync(src, dst);
|
|
29
|
-
if (!silent) logOk("Created: " + path.relative(cwd, dst));
|
|
30
|
-
return true;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
installInfernoDraftTooling({ cwd, templatesRoot, force, silent, logOk, logWarn });
|
|
34
|
-
|
|
35
|
-
const srcHooks = path.join(templatesRoot, "github-hooks", "infernoflow-drafts.json");
|
|
36
|
-
const dstHooks = path.join(cwd, ".github", "hooks", "infernoflow-drafts.json");
|
|
37
|
-
const srcHookScript = path.join(templatesRoot, "scripts", "inferno-vscode-copilot-hook.mjs");
|
|
38
|
-
const dstHookScript = path.join(cwd, "scripts", "inferno-vscode-copilot-hook.mjs");
|
|
39
|
-
|
|
40
|
-
copyFile(srcHooks, dstHooks);
|
|
41
|
-
copyFile(srcHookScript, dstHookScript);
|
|
42
|
-
}
|
|
1
|
+
import*as e from"node:fs";import*as o from"node:path";import{installInfernoDraftTooling as j}from"./draftToolingInstall.mjs";function h(t){const{cwd:i,templatesRoot:r,force:c,silent:s}=t,f=t.logOk||(()=>{}),l=t.logWarn||(()=>{});function a(d,n){return e.existsSync(n)&&!c?(s||l("Skipped (exists): "+o.relative(i,n)),!1):(e.mkdirSync(o.dirname(n),{recursive:!0}),e.copyFileSync(d,n),s||f("Created: "+o.relative(i,n)),!0)}j({cwd:i,templatesRoot:r,force:c,silent:s,logOk:f,logWarn:l});const p=o.join(r,"github-hooks","infernoflow-drafts.json"),k=o.join(i,".github","hooks","infernoflow-drafts.json"),m=o.join(r,"scripts","inferno-vscode-copilot-hook.mjs"),u=o.join(i,"scripts","inferno-vscode-copilot-hook.mjs");a(p,k),a(m,u)}export{h as installVsCodeCopilotHooksArtifacts};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "infernoflow",
|
|
3
|
-
"version": "0.37.
|
|
3
|
+
"version": "0.37.4",
|
|
4
4
|
"description": "Persistent memory for AI coding sessions — captures what agents can't infer from code alone. Works with Copilot, Cursor, Claude, and Windsurf.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -26,9 +26,7 @@
|
|
|
26
26
|
"inferno:promote-draft": "node scripts/inferno-promote-draft.mjs",
|
|
27
27
|
"postinstall": "node scripts/postinstall.js"
|
|
28
28
|
},
|
|
29
|
-
"dependencies": {
|
|
30
|
-
"@scarf/scarf": "^1.3.0"
|
|
31
|
-
},
|
|
29
|
+
"dependencies": {},
|
|
32
30
|
"keywords": [
|
|
33
31
|
"ai",
|
|
34
32
|
"ai-memory",
|
package/scripts/postinstall.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
//
|
|
2
|
-
|
|
1
|
+
// postinstall — intentionally minimal, no network calls, no blocking
|
|
2
|
+
// infernoflow telemetry is opt-out and runs at CLI runtime, not install time
|