infernoflow 0.38.6 → 0.38.8
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 +13 -0
- package/dist/lib/cloud/supabase.mjs +1 -1
- package/dist/lib/commands/log.mjs +2 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -262,6 +262,19 @@
|
|
|
262
262
|
- v0.37.3 — remove Scarf, zero-dep install, no more Windows hang
|
|
263
263
|
- v0.37.3 — remove @scarf/scarf to fix Windows install hang
|
|
264
264
|
|
|
265
|
+
- v0.38.7 — fix anon key
|
|
266
|
+
- v0.38.6
|
|
267
|
+
- v0.38.5 — fix cloud push: use anon key + user_token
|
|
268
|
+
- v0.38.4 — login via GitHub Device Flow, no redirects
|
|
269
|
+
- v0.38.3 — fix login: use implicit flow
|
|
270
|
+
- v0.38.2 — fix login PKCE flow
|
|
271
|
+
- v0.38.1
|
|
272
|
+
- v0.38.0 — cloud login + auto-push to Supabase on every log
|
|
273
|
+
- v0.38.0 — cloud login, auto-push to Supabase on every log
|
|
274
|
+
- v0.37.4
|
|
275
|
+
- v0.37.3 — remove Scarf, zero-dep install, no more Windows hang
|
|
276
|
+
- v0.37.3 — remove @scarf/scarf to fix Windows install hang
|
|
277
|
+
|
|
265
278
|
## 0.10.25 — 2026-04-22
|
|
266
279
|
|
|
267
280
|
### Added
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as
|
|
1
|
+
import*as d from"node:https";const o=process.env.INFERNOFLOW_SUPABASE_URL||"https://vscesbbtmrsctfroigyx.supabase.co",l=process.env.INFERNOFLOW_SUPABASE_ANON_KEY||"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InZzY2VzYmJ0bXJzY3Rmcm9pZ3l4Iiwicm9sZSI6ImFub24iLCJpYXQiOjE3Nzc0ODAxMjcsImV4cCI6MjA5MzA1NjEyN30.4WCXr0aGBlqC2m29DnlCSu5qKl0L-fDQoaV9AGu8-68";function u(t,e,r,n){return new Promise((h,m)=>{const c=new URL(e),a=r?JSON.stringify(r):null,y={hostname:c.hostname,port:443,path:c.pathname+c.search,method:t,headers:{"Content-Type":"application/json",Accept:"application/json","User-Agent":"infernoflow-cli",apikey:l,...n,...a?{"Content-Length":Buffer.byteLength(a)}:{}}},s=d.request(y,i=>{let p="";i.on("data",A=>p+=A),i.on("end",()=>{try{h({status:i.statusCode,body:JSON.parse(p)})}catch{h({status:i.statusCode,body:p})}})});s.on("error",m),s.setTimeout(8e3,()=>{s.destroy(new Error("timeout"))}),a&&s.write(a),s.end()})}async function f(t,e,r){try{const n={project_id:r,user_token:e,ts:t.ts,type:t.type||"note",summary:t.summary,result:t.result||null,source:t.source||null,auto:t.auto||!1,agent:t.agent||null};await u("POST",`${o}/rest/v1/entries`,n,{Authorization:`Bearer ${l}`,apikey:l,Prefer:"return=minimal"})}catch{}}async function S(t){return await u("POST",`${o}/auth/v1/token?grant_type=pkce`,{auth_code:t},{})}function I(t,e){const r=new URLSearchParams({provider:"github",redirect_to:e,state:t});return`${o}/auth/v1/authorize?${r.toString()}`}async function E(t){const e=await u("GET",`${o}/auth/v1/user`,null,{Authorization:`Bearer ${t}`});return e.status===200?e.body:null}async function O(t,e){const r=new URLSearchParams({project_id:`eq.${e}`,order:"ts.asc",limit:"10000"}),n=await u("GET",`${o}/rest/v1/entries?${r.toString()}`,null,{Authorization:`Bearer ${t}`});return n.status===200&&Array.isArray(n.body)?n.body:[]}export{l as SUPABASE_ANON_KEY,o as SUPABASE_URL,S as exchangeCodeForSession,I as getOAuthUrl,E as getUser,O as pullEntries,f as pushEntry};
|
|
@@ -3,7 +3,7 @@ import*as s from"node:fs";import*as u from"node:path";import"node:os";import{bol
|
|
|
3
3
|
`),a=process.cwd(),f=u.join(a,"CLAUDE.md");s.existsSync(f)&&s.writeFileSync(f,d,"utf8");const m=u.join(a,".cursorrules");(s.existsSync(m)||s.existsSync(u.join(a,".cursor")))&&s.writeFileSync(m,d,"utf8");const $=u.join(a,".github","copilot-instructions.md");s.existsSync(u.join(a,".github"))&&s.writeFileSync($,d,"utf8")}catch{}}const F=["note","attempt","decision","gotcha","preference","theme","handoff","error"],b=["worked","failed","partial","unknown"];function C(){return s.existsSync(h)?s.readFileSync(h,"utf8").split(`
|
|
4
4
|
`).filter(Boolean).map(e=>{try{return JSON.parse(e)}catch{return null}}).filter(Boolean):[]}function U(e,{auto:c=!1,quiet:r=!1}={}){if(!s.existsSync(O)){if(c)return!1;r||console.error(I(` \u2718 inferno/ not found \u2014 run: infernoflow init
|
|
5
5
|
`)),process.exit(1)}return s.appendFileSync(h,JSON.stringify(e)+`
|
|
6
|
-
`,"utf8"),!0}function B(){return process.env.CURSOR_SESSION?"cursor":process.env.COPILOT_SESSION?"copilot":process.env.CLAUDE_CODE_SESSION?"claude":process.env.WINDSURF_SESSION?"windsurf":process.env.INFERNOFLOW_AGENT?process.env.INFERNOFLOW_AGENT:"human"}function J(e,c){const r=new Date(e.ts).toLocaleString("en-GB",{day:"2-digit",month:"short",hour:"2-digit",minute:"2-digit"}),l=e.type||"note",i=l==="gotcha"?"\x1B[33m":l==="decision"?"\x1B[36m":l==="theme"?"\x1B[35m":l==="preference"?"\x1B[34m":l==="attempt"?"\x1B[90m":l==="error"?"\x1B[31m":"\x1B[0m",d="\x1B[0m",a=e.result?` [${e.result}]`:"",f=e.agent&&e.agent!=="human"?o(` (${e.agent})`):"";return` ${o(String(c+1).padStart(3))} ${o(r)} ${i}${l}${d}${a} ${e.summary}${f}`}async function K(e){const c=n=>e.includes(n),r=(n,
|
|
6
|
+
`,"utf8"),!0}function B(){return process.env.CURSOR_SESSION?"cursor":process.env.COPILOT_SESSION?"copilot":process.env.CLAUDE_CODE_SESSION?"claude":process.env.WINDSURF_SESSION?"windsurf":process.env.INFERNOFLOW_AGENT?process.env.INFERNOFLOW_AGENT:"human"}function J(e,c){const r=new Date(e.ts).toLocaleString("en-GB",{day:"2-digit",month:"short",hour:"2-digit",minute:"2-digit"}),l=e.type||"note",i=l==="gotcha"?"\x1B[33m":l==="decision"?"\x1B[36m":l==="theme"?"\x1B[35m":l==="preference"?"\x1B[34m":l==="attempt"?"\x1B[90m":l==="error"?"\x1B[31m":"\x1B[0m",d="\x1B[0m",a=e.result?` [${e.result}]`:"",f=e.agent&&e.agent!=="human"?o(` (${e.agent})`):"";return` ${o(String(c+1).padStart(3))} ${o(r)} ${i}${l}${d}${a} ${e.summary}${f}`}async function K(e){e[0]==="log"&&(e=e.slice(1));const c=n=>e.includes(n),r=(n,p)=>{const g=e.indexOf(n);return g!==-1&&e[g+1]?e[g+1]:p},l=c("--show"),i=c("--clear"),d=c("--json"),a=c("--auto"),f=c("--quiet"),m=r("--source",null);if(l||d){const n=C(),p=e[e.indexOf("--show")+1],g=p&&/^\d+$/.test(p)?parseInt(p):20,S=n.slice(-g);if(d){console.log(JSON.stringify(S,null,2));return}if(console.log(`
|
|
7
7
|
`+N("\u{1F525} infernoflow \u2014 session memory")),console.log(" "+"\u2500".repeat(50)),!S.length){console.log(o(`
|
|
8
8
|
No entries yet. Start logging with: infernoflow log "<what happened>"
|
|
9
9
|
`));return}console.log(o(` Showing last ${S.length} of ${n.length} entries
|
|
@@ -14,5 +14,5 @@ import*as s from"node:fs";import*as u from"node:path";import"node:os";import{bol
|
|
|
14
14
|
`),console.log(o(" Usage:")),console.log(o(' infernoflow log "what happened"')),console.log(o(' infernoflow log "tried X, failed because Y" --type attempt --result failed')),console.log(o(' infernoflow log "always use multipart/form-data" --type gotcha')),console.log(o(' infernoflow log "switched to dark mode" --type theme')),console.log(o(" infernoflow log --show Print last 20 entries")),console.log(o(" infernoflow log --json Print as JSON")),console.log(),console.log(o(" Types: note \xB7 attempt \xB7 decision \xB7 gotcha \xB7 preference \xB7 theme \xB7 handoff \xB7 error")),console.log(o(" Results: worked \xB7 failed \xB7 partial \xB7 unknown")),console.log(o(` Auto-capture: --auto (silent skip if no inferno/) \xB7 --quiet \xB7 --source <name>
|
|
15
15
|
`));return}const w=r("--type","note"),y=r("--result",null),L=r("--agent",B());F.includes(w)||(f||console.error(I(` \u2718 Invalid type: ${w}. Valid: ${F.join(", ")}
|
|
16
16
|
`)),process.exit(1)),y&&!b.includes(y)&&(f||console.error(I(` \u2718 Invalid result: ${y}. Valid: ${b.join(", ")}
|
|
17
|
-
`)),process.exit(1));const E={ts:new Date().toISOString(),agent:L,type:w,summary:x,...y?{result:y}:{},...m?{source:m}:{},...a?{auto:!0}:{}};if(U(E,{auto:a,quiet:f})){A();try{if(k()){const n=_(),
|
|
17
|
+
`)),process.exit(1));const E={ts:new Date().toISOString(),agent:L,type:w,summary:x,...y?{result:y}:{},...m?{source:m}:{},...a?{auto:!0}:{}};if(U(E,{auto:a,quiet:f})){A();try{if(k()){const n=_(),p=n.user_token||n.user?.id||n.user?.login||"anonymous",g=(()=>{try{return JSON.parse(s.readFileSync(u.join(O,"config.json"),"utf8")).projectId||u.basename(process.cwd())}catch{return u.basename(process.cwd())}})();R(E,p,g).catch(()=>{})}}catch{}if(!f){const n=w!=="note"?v(` [${w}]`):"",p=y?o(` \u2192 ${y}`):"",g=m?o(` (via ${m})`):"";console.log(j(` \u2714 Logged${n}${p}${g}: `)+x+`
|
|
18
18
|
`)}}}export{K as logCommand};
|
package/package.json
CHANGED