infernoflow 0.44.12 → 0.44.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.
package/README.md CHANGED
@@ -123,8 +123,9 @@ The injected memory block is paid for on every AI turn (and twice when a tool lo
123
123
  Or write the same values via CLI flags:
124
124
 
125
125
  ```bash
126
- infernoflow setup --max-memory 3 --max-commits 5 --max-entry-chars 200 --no-protocol
127
- infernoflow refresh --max-memory 3 # same; persists into amp.json
126
+ infernoflow setup --max-memory 3 --max-commits 5 --max-entry-chars 200 --protocol-style compact
127
+ infernoflow refresh --targets CLAUDE.md,.cursorrules # only these get the block; the rest are stripped
128
+ infernoflow refresh --targets auto # canonical file for the IDE you're in (kills Copilot's double-load)
128
129
  infernoflow prune --apply --max-age-days 14 # one-off cleanup
129
130
  ```
130
131
 
@@ -1,5 +1,6 @@
1
- import{refreshRuleFilesFromMemory as d}from"../ruleFiles.mjs";import{updateInjectionConfig as m}from"../amp/io.mjs";import{findProjectRoot as a}from"../projectRoot.mjs";import{bold as f,cyan as p,gray as c,green as g,red as u}from"../ui/output.mjs";function s(o,r){const t=o.indexOf(r);if(t===-1)return;const n=parseInt(o[t+1],10);return Number.isFinite(n)?n:void 0}function y(o){const r={},t=s(o,"--max-memory");t!==void 0&&(r.maxEntries=t);const n=s(o,"--max-commits");n!==void 0&&(r.maxCommits=n);const l=s(o,"--max-entry-chars");return l!==void 0&&(r.maxEntryChars=l),o.includes("--no-protocol")&&(r.includeProtocol=!1),o.includes("--protocol")&&(r.includeProtocol=!0),r}async function w(o){const r=o.includes("--dry-run")||o.includes("-n"),t=o.includes("--json"),n=a(process.cwd()),l=y(o);if(!r&&Object.keys(l).length)try{m(n,l)}catch{}if(r){if(t){console.log(JSON.stringify({dryRun:!0,projectRoot:n},null,2));return}console.log(`
2
- `+f("\u{1F525} infernoflow refresh")+c(" \u2014 dry run")),console.log(" "+c("Project root: ")+p(n)),console.log(" "+c("Would rewrite: ")+".cursorrules, CLAUDE.md, .github/copilot-instructions.md"),console.log();return}let i;try{i=d(n)}catch(e){t?console.log(JSON.stringify({ok:!1,error:e.message},null,2)):console.error(u(`
1
+ import*as y from"node:path";import{refreshRuleFilesFromMemory as h}from"../ruleFiles.mjs";import{updateInjectionConfig as x}from"../amp/io.mjs";import{findProjectRoot as C}from"../projectRoot.mjs";import{detectIdeContext as E}from"../ai/ideDetection.mjs";import{bold as u,cyan as f,gray as c,green as d,red as m}from"../ui/output.mjs";const a=y.join(".github","copilot-instructions.md"),O=[".cursorrules","CLAUDE.md",a];function i(o,r){const t=o.indexOf(r);if(t===-1)return;const n=parseInt(o[t+1],10);return Number.isFinite(n)?n:void 0}function p(o,r){const t=o.indexOf(r);return t!==-1&&o[t+1]?o[t+1]:void 0}function j(){const o=process.env;if(o.CLAUDE_CODE_SESSION||o.CLAUDECODE)return["CLAUDE.md"];const{ideDetected:r}=E("auto");return r==="cursor"?[".cursorrules"]:r==="vscode"?[a]:O}function L(o){const r={},t=i(o,"--max-memory");t!==void 0&&(r.maxEntries=t);const n=i(o,"--max-commits");n!==void 0&&(r.maxCommits=n);const s=i(o,"--max-entry-chars");s!==void 0&&(r.maxEntryChars=s),o.includes("--no-protocol")&&(r.includeProtocol=!1),o.includes("--protocol")&&(r.includeProtocol=!0);const l=p(o,"--protocol-style");l&&["compact","full","off"].includes(l)&&(r.protocolStyle=l);const e=p(o,"--targets");return e&&(r.targets=e==="auto"?j():e.split(",").map(g=>g.trim()).filter(Boolean)),r}async function R(o){const r=o.includes("--dry-run")||o.includes("-n"),t=o.includes("--json"),n=C(process.cwd()),s=L(o);if(!r&&Object.keys(s).length)try{x(n,s)}catch{}if(s.targets&&!t){const e=s.targets.length<3;console.log(`
2
+ `+d("\u2714")+c(" memory block \u2192 ")+f(s.targets.join(", "))+(e?c(" (other rule files' blocks are stripped \u2014 no double-load)"):""))}if(r){if(t){console.log(JSON.stringify({dryRun:!0,projectRoot:n},null,2));return}console.log(`
3
+ `+u("\u{1F525} infernoflow refresh")+c(" \u2014 dry run")),console.log(" "+c("Project root: ")+f(n)),console.log(" "+c("Would rewrite: ")+".cursorrules, CLAUDE.md, .github/copilot-instructions.md"),console.log();return}let l;try{l=h(n)}catch(e){t?console.log(JSON.stringify({ok:!1,error:e.message},null,2)):console.error(m(`
3
4
  \u2718 refresh failed: `)+e.message+`
4
- `),process.exit(1)}if(t){console.log(JSON.stringify({ok:!0,projectRoot:n,results:i},null,2));return}console.log(`
5
- `+f("\u{1F525} infernoflow refresh")),console.log(" "+"\u2500".repeat(50));for(const e of i)"error"in e&&e.error?console.log(" "+u("\u2718 ")+e.rel+c(" \u2014 "+e.error)):"created"in e&&(e.created||e.updated)?console.log(" "+g("\u2714 ")+e.rel+c(e.created?" \u2014 created":" \u2014 updated")):console.log(" "+c("\xB7 ")+e.rel+c(" \u2014 unchanged"));console.log()}export{y as injectionPatchFromArgs,w as refreshCommand};
5
+ `),process.exit(1)}if(t){console.log(JSON.stringify({ok:!0,projectRoot:n,results:l},null,2));return}console.log(`
6
+ `+u("\u{1F525} infernoflow refresh")),console.log(" "+"\u2500".repeat(50));for(const e of l)"error"in e&&e.error?console.log(" "+m("\u2718 ")+e.rel+c(" \u2014 "+e.error)):"created"in e&&(e.created||e.updated)?console.log(" "+d("\u2714 ")+e.rel+c(e.created?" \u2014 created":" \u2014 updated")):console.log(" "+c("\xB7 ")+e.rel+c(" \u2014 unchanged"));console.log()}export{L as injectionPatchFromArgs,R as refreshCommand,j as resolveAutoTargets};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "infernoflow",
3
- "version": "0.44.12",
3
+ "version": "0.44.13",
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": {