infernoflow 0.10.20 → 0.10.22
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 +12 -0
- package/dist/bin/infernoflow.mjs +13 -2
- package/dist/lib/commands/changelog.mjs +21 -0
- package/dist/lib/commands/context.mjs +27 -23
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/bin/infernoflow.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{readFileSync as m}from"node:fs";import{dirname as d,join as
|
|
2
|
+
import{readFileSync as m}from"node:fs";import{dirname as d,join as u}from"node:path";import{fileURLToPath as f}from"node:url";import{bold as t,gray as e,red as s}from"../lib/ui/output.mjs";const h=d(f(import.meta.url)),g=JSON.parse(m(u(h,"..","package.json"),"utf8")),r=g.version||"0.0.0",c={publish:"Bump version, update changelog, build, npm publish, git commit + push in one shot",diff:"Show what capabilities changed since the last git tag (or any ref)",changelog:"Draft a changelog entry from commits since the last tag",setup:"One command to get fully operational \u2014 detects IDE, inits, installs hooks + MCP",init:"Scaffold inferno/ in your project (or adopt existing project)","install-cursor-hooks":"Install Cursor hooks: draft agent replies to inferno/CONTEXT.draft.md","install-vscode-copilot-hooks":"Install VS Code + Copilot agent hooks (Preview): draft to inferno/CONTEXT.draft.md",check:"Validate contract, capabilities, scenarios, changelog",status:"Show contract health at a glance","pr-impact":"Summarize PR impact on capabilities and docs",sync:"Run deterministic inferno sync flow",run:"One-command detect/propose/apply/validate flow","doc-gate":"Fail if code changed but docs were not updated",suggest:"Generate AI prompt + apply capability updates",implement:"Generate code-agent implementation prompt(s)",context:"Generate AI-ready context for new sessions","generate-skills":"Generate personalised Cursor rules + skill files from your developer profile"},l={publish:async o=>(await import("../lib/commands/publish.mjs")).publishCommand(o),diff:async o=>(await import("../lib/commands/diff.mjs")).diffCommand(o),changelog:async o=>(await import("../lib/commands/changelog.mjs")).changelogCommand(o),setup:async o=>(await import("../lib/commands/setup.mjs")).setupCommand(o),init:async o=>(await import("../lib/commands/init.mjs")).initCommand(o),"install-cursor-hooks":async o=>(await import("../lib/commands/installCursorHooks.mjs")).installCursorHooksCommand(o),"install-vscode-copilot-hooks":async o=>(await import("../lib/commands/installVsCodeCopilotHooks.mjs")).installVsCodeCopilotHooksCommand(o),check:async o=>(await import("../lib/commands/check.mjs")).checkCommand(o),status:async o=>(await import("../lib/commands/status.mjs")).statusCommand(o),"pr-impact":async o=>(await import("../lib/commands/prImpact.mjs")).prImpactCommand(o),sync:async o=>(await import("../lib/commands/syncAuto.mjs")).syncCommand(o),run:async o=>(await import("../lib/commands/run.mjs")).runCommand(o),suggest:async o=>(await import("../lib/commands/suggest.mjs")).suggestCommand(o),implement:async o=>(await import("../lib/commands/implement.mjs")).implementCommand(o),context:async o=>(await import("../lib/commands/context.mjs")).contextCommand(o),"doc-gate":async o=>(await import("../lib/commands/docGate.mjs")).docGateCommand(o),"generate-skills":async o=>(await import("../lib/commands/generateSkills.mjs")).generateSkillsCommand(o)};function y(){const o=Object.keys(c),i=Math.max(...o.map(a=>a.length),8)+1;return Object.entries(c).map(([a,p])=>` ${a.padEnd(i," ")}${p}`).join(`
|
|
3
3
|
`)}const w=`
|
|
4
4
|
${t("\u{1F525} infernoflow")} ${e("v"+r)}
|
|
5
5
|
${e("The forge for liquid code \u2014 keep every AI session in sync")}
|
|
@@ -15,6 +15,15 @@ ${y()}
|
|
|
15
15
|
--summary One-liner count only
|
|
16
16
|
--json Machine-readable output
|
|
17
17
|
|
|
18
|
+
${t("changelog options:")}
|
|
19
|
+
update Draft ## Unreleased from commits (default sub-command)
|
|
20
|
+
show Print the current ## Unreleased block
|
|
21
|
+
list List commits since last tag
|
|
22
|
+
--ref <tag|commit> Use a specific ref instead of last tag
|
|
23
|
+
--dry-run Print what would be written without modifying file
|
|
24
|
+
--append Append to existing ## Unreleased instead of replacing
|
|
25
|
+
--json Machine-readable output
|
|
26
|
+
|
|
18
27
|
${t("publish options:")}
|
|
19
28
|
--bump patch|minor|major Version bump type (default: patch)
|
|
20
29
|
--skip-build Skip the build step
|
|
@@ -56,6 +65,8 @@ ${y()}
|
|
|
56
65
|
--reset Clear all stored state
|
|
57
66
|
--watch Poll git diff every 30s and auto-update CONTEXT.md (living context)
|
|
58
67
|
--interval <secs> Watch poll interval in seconds (default: 30)
|
|
68
|
+
--auto-commit Watch mode: commit CONTEXT.md to git on every change
|
|
69
|
+
--auto-push Watch mode: commit + push CONTEXT.md on every change
|
|
59
70
|
|
|
60
71
|
${t("generate-skills options:")}
|
|
61
72
|
--cursor Also install rules to .cursor/rules/infernoflow.md
|
|
@@ -86,7 +97,7 @@ ${y()}
|
|
|
86
97
|
${e("pr-impact --json")}
|
|
87
98
|
${e("sync --auto --json")}
|
|
88
99
|
${e('run "task" --json')}
|
|
89
|
-
`;import*as k from"node:fs";import*as C from"node:path";try{const o=C.join(process.cwd(),"inferno");if(k.existsSync(o)){const{observeCommandStart:
|
|
100
|
+
`;import*as k from"node:fs";import*as C from"node:path";try{const o=C.join(process.cwd(),"inferno");if(k.existsSync(o)){const{observeCommandStart:i}=await import("../lib/learning/observe.mjs"),a=process.argv[2];a&&!a.startsWith("-")&&i(o,a)}}catch{}const[,,n,...b]=process.argv;(!n||n==="--help"||n==="-h")&&(console.log(w),process.exit(0)),(n==="--version"||n==="-v")&&(console.log(r),process.exit(0));const v=Object.keys(l);v.includes(n)||(console.error(s(`
|
|
90
101
|
Unknown command: ${n}`)),console.error(e(`Run: infernoflow --help
|
|
91
102
|
`)),process.exit(1));const $=[n,...b];l[n]($).catch(o=>{console.error(s(`
|
|
92
103
|
Error: `)+o.message),process.exit(1)});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import*as g from"node:fs";import*as S from"node:path";import{execSync as v}from"node:child_process";import{header as O,ok as R,fail as C,warn as m,info as b,done as G,bold as E,cyan as h,gray as f,green as F,yellow as L}from"../ui/output.mjs";function p(e,n){try{return v(e,{cwd:n,encoding:"utf8",stdio:["ignore","pipe","pipe"]}).trim()}catch{return null}}function y(e){return p("git describe --tags --abbrev=0",e)}function $(e,n){const o=e?`${e}..HEAD`:"",t=p(`git log ${o} --format=%H%x1f%s%x1f%b%x1e`,n);return t?t.split("").map(s=>s.trim()).filter(Boolean).map(s=>{const r=s.split("");return{hash:(r[0]||"").trim().slice(0,8),subject:(r[1]||"").trim(),body:(r[2]||"").trim()}}).filter(s=>s.subject):[]}function M(e,n){return p(`git log -1 --format=%ci "${e}"`,n)?.slice(0,10)||null}const w={feat:"Added",feature:"Added",add:"Added",fix:"Fixed",bugfix:"Fixed",hotfix:"Fixed",perf:"Changed",refactor:"Changed",change:"Changed",chore:"Changed",docs:"Changed",style:"Changed",test:"Changed",ci:"Changed",remove:"Removed",revert:"Removed",deprecate:"Removed"};function x(e){const n=e.match(/^(\w+)(?:\([^)]+\))?[!]?:\s*(.+)/);if(n){const t=n[1].toLowerCase();return{section:w[t]||"Changed",message:n[2].trim(),breaking:e.includes("!")}}const o=e.toLowerCase();for(const[t,s]of Object.entries(w))if(o.startsWith(t+" ")||o.startsWith(t+":"))return{section:s,message:e,breaking:!1};return{section:"Changed",message:e,breaking:!1}}function j(e){const n={Added:[],Fixed:[],Changed:[],Removed:[],Breaking:[]};for(const o of e){const{section:t,message:s,breaking:r}=x(o.subject);r&&n.Breaking.push(s),n[t].push(s)}for(const o of Object.keys(n))n[o]=[...new Set(n[o])];return n}function H(e,n){const o=["## Unreleased",""];n&&o.push(`> Changes since ${n}`,"");const t=["Breaking","Added","Fixed","Changed","Removed"];let s=!1;for(const r of t){const i=e[r];if(!(!i||!i.length)){s=!0,o.push(`### ${r}`);for(const c of i)o.push(`- ${c}`);o.push("")}}return s||o.push("- No significant changes",""),o.join(`
|
|
2
|
+
`)}function k(e){return g.existsSync(e)?g.readFileSync(e,"utf8"):null}function D(e){const n=e.match(/^## Unreleased[\s\S]*?(?=\n## |\n---|\z)/im);return n?n[0].trim():null}function U(e,n){return/^## Unreleased/im.test(e)?e.replace(/^## Unreleased[\s\S]*?(?=\n## |\n---)/im,n+`
|
|
3
|
+
|
|
4
|
+
`):/^# .+/im.test(e)?e.replace(/^(# .+\n)/im,`$1
|
|
5
|
+
${n}
|
|
6
|
+
|
|
7
|
+
`):`${n}
|
|
8
|
+
|
|
9
|
+
${e}`}function J(e,n){const o=n.split(`
|
|
10
|
+
`).filter(t=>t.startsWith("- ")).join(`
|
|
11
|
+
`);return o?/^## Unreleased/im.test(e)?e.replace(/(^## Unreleased[\s\S]*?)(\n## )/im,`$1
|
|
12
|
+
${o}
|
|
13
|
+
$2`):U(e,n):e}function W(e,n){const o=n||y(e),t=$(o,e);if(!t.length){b(`No commits since ${o||"beginning"}`);return}console.log(`
|
|
14
|
+
${E("Commits since")} ${h(o||"beginning")} ${f("("+t.length+")")}
|
|
15
|
+
`);for(const s of t){const{section:r}=x(s.subject),i=r==="Added"?F:r==="Fixed"?L:f;console.log(` ${f(s.hash)} ${i(s.subject)}`)}console.log()}function B(e){const n=k(e);if(!n){C("CHANGELOG.md not found");return}const o=D(n);if(!o){m("No ## Unreleased section found in CHANGELOG.md");return}console.log(`
|
|
16
|
+
`+o+`
|
|
17
|
+
`)}async function T(e,n,o){const{ref:t,dryRun:s,append:r,asJson:i}=o,c=t||y(e),a=$(c,e);if(!a.length){if(i){console.log(JSON.stringify({ok:!0,ref:c,commits:0,message:"No new commits"}));return}m(`No commits found since ${c||"beginning of repo"}`),console.log();return}const d=j(a),l=H(d,c);if(i){console.log(JSON.stringify({ok:!0,ref:c,commits:a.length,sections:{breaking:d.Breaking,added:d.Added,fixed:d.Fixed,changed:d.Changed,removed:d.Removed},markdown:l},null,2));return}if(console.log(),console.log(f(" \u2500\u2500\u2500 Drafted entry \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500")),l.split(`
|
|
18
|
+
`).forEach(N=>console.log(" "+N)),console.log(f(" \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500")),console.log(),b(`${a.length} commit${a.length>1?"s":""} since ${h(c||"beginning")}`),s){m("Dry run \u2014 CHANGELOG.md not modified"),console.log();return}let u=k(n);u||(u=`# Changelog
|
|
19
|
+
|
|
20
|
+
`);const A=r?J(u,l):U(u,l);g.writeFileSync(n,A),R(`CHANGELOG.md updated ${f("("+(r?"appended":"replaced")+" ## Unreleased)")}`),console.log(),G("Changelog drafted \u2014 review and edit before your next release"),console.log(` Run ${h("infernoflow publish")} when ready to cut the release
|
|
21
|
+
`)}async function P(e){const n=e.slice(1),o=n.find(l=>!l.startsWith("-"))||"update",t=n.includes("--dry-run"),s=n.includes("--append"),r=n.includes("--json"),i=n.indexOf("--ref"),c=i!==-1?n[i+1]:null,a=process.cwd(),d=S.join(a,"CHANGELOG.md");if(r||O("changelog "+o),o==="list"){W(a,c);return}if(o==="show"){B(d);return}if(o==="update"){await T(a,d,{ref:c,dryRun:t,append:s,asJson:r});return}C(`Unknown sub-command: ${o}`,"Use: update | show | list"),process.exit(1)}export{P as changelogCommand};
|
|
@@ -1,27 +1,31 @@
|
|
|
1
|
-
import
|
|
2
|
-
`))if(
|
|
3
|
-
`+
|
|
4
|
-
`),
|
|
5
|
-
`)),process.exit(1));const f=
|
|
6
|
-
`)),process.exit(1));let t=
|
|
7
|
-
`))),
|
|
8
|
-
`),
|
|
9
|
-
`+
|
|
1
|
+
import g from"node:fs";import b from"node:path";import{execSync as h}from"node:child_process";import{bold as I,gray as d,cyan as l,red as q,green as a,yellow as F}from"../ui/output.mjs";import{buildCursorImplementPrompt as wt,buildGenericImplementPrompt as yt}from"../ui/prompts.mjs";import{detectDrift as kt}from"../git/detect-drift.mjs";function Ct(e){try{const n=process.platform;if(n==="win32")h("clip",{input:e});else if(n==="darwin")h("pbcopy",{input:e});else try{h("xclip -selection clipboard",{input:e})}catch{h("xsel --clipboard --input",{input:e})}return!0}catch{return!1}}const w="inferno",P=b.join(w,"CONTEXT.md"),z=b.join(w,"context-state.json");function Q(e){try{return JSON.parse(g.readFileSync(e,"utf8"))}catch{return null}}function W(e){try{return g.readFileSync(e,"utf8")}catch{return null}}function Y(){const e=W(z);if(!e)return{};try{return JSON.parse(e)}catch{return{}}}function Z(e){g.writeFileSync(z,JSON.stringify(e,null,2),"utf8")}function E(e){return e?new Date(e).toLocaleDateString("en-GB",{day:"2-digit",month:"short",year:"numeric"}):"unknown"}function St(e,n){if(!e)return[];const i=[];let c=null;for(const r of e.split(`
|
|
2
|
+
`))if(r.startsWith("## ")){if(c&&i.length<n&&i.push(c),i.length>=n)break;c={title:r.replace("## ","").trim(),items:[]}}else c&&r.startsWith("- ")&&c.items.push(r.replace("- ","").trim());return c&&i.length<n&&i.push(c),i.filter(r=>r.items.length>0)}async function bt(e){const n=o=>e.includes(o),i=o=>{const u=e.indexOf(o);return u!==-1&&e[u+1]?e[u+1]:null},c=i("--intent")||i("-i"),r=i("--working")||i("-w"),$=i("--decision")||i("-d"),tt=n("--show")||n("-s"),G=n("--copy")||n("-c"),et=n("--cursor"),nt=n("--copilot"),ot=n("--reset"),it=n("--watch"),N=n("--auto-commit")||n("--auto-push"),v=n("--auto-push"),R=parseInt(i("--interval")||"30",10)*1e3;console.log(`
|
|
3
|
+
`+I("\uFFFD\uFFFD\uFFFD infernoflow \u2014 context")),console.log(" "+"\u2500".repeat(50)+`
|
|
4
|
+
`),g.existsSync(w)||(console.error(q(" \u2718 inferno/ not found")),console.error(d(` \u2192 Run: infernoflow init
|
|
5
|
+
`)),process.exit(1));const f=Q(b.join(w,"contract.json")),D=Q(b.join(w,"capabilities.json")),st=W(b.join(w,"CHANGELOG.md"));(!f||!D)&&(console.error(q(` \u2718 Missing contract.json or capabilities.json
|
|
6
|
+
`)),process.exit(1));let t=Y();ot&&(t={},console.log(F(` \u26A0 State reset
|
|
7
|
+
`))),c&&(t.intent=c,t.intentUpdated=new Date().toISOString(),console.log(a(' \u2714 Intent saved: "'+c+'"'))),r&&(t.working=r,t.workingUpdated=new Date().toISOString(),console.log(a(' \u2714 Working on: "'+r+'"'))),$&&(t.decisions||(t.decisions=[]),t.decisions.push({text:$,date:new Date().toISOString()}),console.log(a(' \u2714 Decision recorded: "'+$+'"'))),(c||r||$)&&Z(t);const j=D.capabilities||[],A=j.length===(f.capabilities||[]).length,U=St(st,3),T=String(f.policyVersion).replace(/^v/i,""),ct=new Date().toLocaleDateString("en-GB",{day:"2-digit",month:"short",year:"numeric"}),B=A?"\u2713 validated":"\u26A0 out of sync",L=t.intent||"describe the exact task to implement",J={task:L,contract:f,caps:D,scenarios:[],state:t},rt=wt(J),lt=yt(J),at=j.map(o=>"- **"+o.id+"** \u2014 "+o.title).join(`
|
|
8
|
+
`),dt=U.length>0?U.map(o=>"### "+o.title+`
|
|
9
|
+
`+o.items.map(u=>" - "+u).join(`
|
|
10
10
|
`)).join(`
|
|
11
11
|
|
|
12
|
-
`):"_No recent changes_",
|
|
13
|
-
`):"_No decisions recorded_",
|
|
14
|
-
`);if(
|
|
15
|
-
\u2714 Context written \u2192 `+
|
|
16
|
-
`+
|
|
17
|
-
`),console.log(" "+
|
|
18
|
-
`),
|
|
19
|
-
`)):(console.log(" "+
|
|
20
|
-
`)),
|
|
21
|
-
`));let
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
`))
|
|
12
|
+
`):"_No recent changes_",pt=t.intent?t.intent+" _("+E(t.intentUpdated)+")_":'_Not set \u2014 run: infernoflow context --intent "..."_',gt=t.working?t.working+" _("+E(t.workingUpdated)+")_":'_Not set \u2014 run: infernoflow context --working "..."_',ut=t.decisions&&t.decisions.length>0?t.decisions.slice(-5).map(o=>"- "+o.text+" _("+E(o.date)+")_").join(`
|
|
13
|
+
`):"_No decisions recorded_",x=["# Project Context \u2014 "+f.policyId+" v"+T,"> Generated by infernoflow | "+ct+" | "+B,"","---","","## What this system does","",at,"","---","","## Recent changes","",dt,"","---","","## Current state","","- **Capabilities:** "+j.length,"- **Version:** v"+T,"- **Sync:** "+B,"","---","","## What I am working on right now","",gt,"","---","","## Intent \u2014 what I want to build next","",pt,"","---","","## Decisions & notes","",ut,"","---","","## Implementation Prompt Seed","","Use this to start coding immediately with an agent:","","```bash",`infernoflow implement "${L}" --mode both`,"```","","### Cursor Agent Prompt","","```text",rt,"```","","### Generic Agent Prompt","","```text",lt,"```","","---","_Paste this block at the start of any new AI session._"].join(`
|
|
14
|
+
`);if(tt||(g.writeFileSync(P,x,"utf8"),console.log(a(`
|
|
15
|
+
\u2714 Context written \u2192 `+P))),G){const o=Ct(x);console.log(o?a(" \u2714 Copied to clipboard \u2014 paste with Ctrl+V"):F(" \u26A0 Clipboard copy failed \u2014 open inferno/CONTEXT.md manually"))}if(et&&(g.writeFileSync(".cursorrules",x,"utf8"),console.log(a(" \u2714 Written to .cursorrules \u2014 Cursor loads this automatically"))),nt&&(g.existsSync(".github")||g.mkdirSync(".github"),g.writeFileSync(".github/copilot-instructions.md",x,"utf8"),console.log(a(" \u2714 Written to .github/copilot-instructions.md \u2014 Copilot loads this automatically"))),console.log(`
|
|
16
|
+
`+I("Context Summary")),console.log(" "+"\u2500".repeat(50)),console.log(" Project "+f.policyId+" \u2014 v"+T),console.log(" Capabilities "+j.length+" registered"),console.log(" Sync "+(A?a("\u2713 in sync"):F("\u26A0 check needed"))),console.log(" Working on "+(t.working?l(t.working):d("not set"))),console.log(" Intent "+(t.intent?l(t.intent):d("not set"))),console.log(" Decisions "+(t.decisions?t.decisions.length:0)+` recorded
|
|
17
|
+
`),console.log(" "+I("Implementation Prompt")),console.log(" "+l("\u2192")+" Run "+l(`infernoflow implement "${L}" --mode both`)+`
|
|
18
|
+
`),G?(console.log(" "+I("Ready to use:")),console.log(" "+l("\u2192")+" Paste into Claude / Cursor / Copilot with "+l("Ctrl+V")+`
|
|
19
|
+
`)):(console.log(" "+I("Ready to use:")),console.log(" "+l("1.")+" Open "+l("inferno/CONTEXT.md")),console.log(" "+l("2.")+" Copy everything"),console.log(" "+l("3.")+" Paste at the start of your next AI session"),console.log(" "+d(" tip: use --copy to skip steps 1-2 automatically")+`
|
|
20
|
+
`)),it){let _=function(p){try{return h(p,{cwd:process.cwd(),encoding:"utf8",stdio:["ignore","pipe","pipe"]}),!0}catch{return!1}},X=function(p){try{return h(`git status --porcelain "${p}"`,{cwd:process.cwd(),encoding:"utf8",stdio:["ignore","pipe","pipe"]}).trim()===""}catch{return!0}},H=function(p,s,O){const k=`chore: update context [${s.length>0?s.slice(0,3).join(", "):`${O} files`}]`;return _(`git add "${p}"`)?X(p)?{ok:!1,reason:"nothing to commit"}:_(`git commit -m "${k}"`)?{ok:!0,msg:k}:{ok:!1,reason:"git commit failed (lock?)"}:{ok:!1,reason:"git add failed"}},K=function(){return _("git push")};var It=_,Ft=X,$t=H,jt=K;const o=v?"auto-push":N?"auto-commit":"watch";console.log(" "+l("\u{1F441} Watch mode active")+d(` \u2014 polling every ${R/1e3}s`+(v?" \xB7 will commit + push on change":N?" \xB7 will commit on change":""))),console.log(" "+d(`Press Ctrl+C to stop
|
|
21
|
+
`));let u="",V=null;const M=async()=>{try{const p=process.cwd(),s=kt(p,{sinceCommits:1}),O=s.changedFiles.sort().join("|");if(O===u||(u=O,s.changedFiles.length===0))return;const y=s.affectedCapabilities.map(S=>S.id),k=y.length>0?`Working on: ${y.join(", ")} (${s.changedFiles.length} files changed)`:`${s.changedFiles.length} files changed \u2014 no capability match yet`,C=Y();if(C.working!==k){C.working=k,C.workingUpdated=new Date().toISOString(),Z(C),await bt(e.filter(m=>m!=="--watch"&&m!=="--auto-commit"&&m!=="--auto-push"));const S=W(P),ft=new Date().toLocaleTimeString("en-GB",{hour:"2-digit",minute:"2-digit",second:"2-digit"});if(process.stderr.write(`
|
|
22
|
+
${a("\u2714")} [${ft}] Context updated \u2014 ${y.length} capabilities affected
|
|
23
|
+
${d(s.changedFiles.slice(0,3).join(", ")+(s.changedFiles.length>3?` +${s.changedFiles.length-3} more`:""))}
|
|
24
|
+
`),N&&S!==V){V=S;const m=H(P,y,s.changedFiles.length);if(m.ok){if(process.stderr.write(` ${a("\u2714")} Committed: ${d(m.msg)}
|
|
25
|
+
`),v){const ht=K();process.stderr.write(ht?` ${a("\u2714")} Pushed to origin
|
|
26
|
+
`:` ${F("\u26A0")} Push failed \u2014 will retry next change
|
|
27
|
+
`)}}else process.stderr.write(` ${F("\u26A0")} Commit skipped: ${d(m.reason)}
|
|
28
|
+
`)}}}catch{}};await M();const mt=setInterval(M,R);process.on("SIGINT",()=>{clearInterval(mt),process.stderr.write(`
|
|
25
29
|
`+d(`Watch stopped.
|
|
26
30
|
|
|
27
|
-
`)),process.exit(0)}),await new Promise(()=>{})}}export{
|
|
31
|
+
`)),process.exit(0)}),await new Promise(()=>{})}}export{bt as contextCommand};
|