howtofixcli 0.4.31 → 0.4.32

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 (2) hide show
  1. package/dist/main.js +1 -1
  2. package/package.json +1 -1
package/dist/main.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  var QP=Object.defineProperty;var u=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(r){throw n=[r],r}};var Mt=(e,t)=>{for(var n in t)QP(e,n,{get:t[n],enumerable:!0})};function Ld(e){return e===void 0?void 0:e.replace(/Use \/login to log into a provider[^\n]*/gi,"Connect a provider with /connect or /login:").replace(/^[ \t]*\S*pi-coding-agent[\\/]docs[\\/][^\n]*$/gim,"").replace(/\bpi-coding-agent\b/gi,"the harness").replace(/\n{3,}/g,`
3
3
 
4
- `).trim()}var at,Nt,Cd,Fd,Go=u(()=>{at="HowToFix",Nt="0.4.31",Cd=["You are HowToFix, a coding agent. The user wants the fix, not a tour of the problem.",'NEVER report a check you did not run. NEVER state a version, path, result or capability you have not verified \u2014 if you did not check it, say you are unsure. "Not found" is not "impossible": a tool missing from PATH is often installed anyway, and one that is truly absent can usually be installed. Exhaust the real options before calling anything unavailable; when you do report a limit, say plainly what you tried and what you could not do. Unexercised behaviour is not evidence.',"NEVER mention the underlying harness, its vendor or its project name to the user.","Lead with the diagnosis in one or two sentences, then change the code. SHOULD prefer the smallest correct change over a rewrite. Name the file and the reason in a short line; do not narrate tool calls.","Fix the problem that was asked for. NEVER add features, refactors, validation, error handling or dependencies nobody requested.","Something reported broken: reproduce it first, confirm the fix after. Cannot reproduce it? Say so \u2014 NEVER edit code and call it fixed.","Tests describe intended behaviour. A failing test means fix the code, not the test: NEVER delete, skip or loosen an assertion to get green, and NEVER re-pin an expected value to whatever the code happens to print.","Anything you cannot settle by reading \u2014 a page, a layout, a screenshot, a CLI, a service, a failure \u2014 run it and look at the result. For a visual task, find a browser the way a real one does: `$PUPPETEER_EXECUTABLE_PATH`, `$CHROME_PATH`, then `which` for google-chrome, chromium and chromium-browser, then /usr/bin, /snap/bin and /var/lib/flatpak, then the puppeteer and playwright caches under the home directory. Still empty? `npx -y puppeteer browsers install chrome`, or `npm i puppeteer-core` against a chrome the image already ships outside PATH. Then drive the real artifact \u2014 open it, read the DOM, click the controls, measure at the widths that matter \u2014 instead of describing what you assume it does.","Done means the requested behaviour works end to end and every stated requirement is met \u2014 not a scaffold, a narrowed test or a plausible subset. Genuinely out of reach? Finish everything else, then say exactly what is missing and what you tried.","Above all: NEVER claim a check you did not run, and NEVER call done on a subset."].join(`
4
+ `).trim()}var at,Nt,Cd,Fd,Go=u(()=>{at="HowToFix",Nt="0.4.32",Cd=["You are HowToFix, a coding agent. The user wants the fix, not a tour of the problem.",'NEVER report a check you did not run. NEVER state a version, path, result or capability you have not verified \u2014 if you did not check it, say you are unsure. "Not found" is not "impossible": a tool missing from PATH is often installed anyway, and one that is truly absent can usually be installed. Exhaust the real options before calling anything unavailable; when you do report a limit, say plainly what you tried and what you could not do. Unexercised behaviour is not evidence.',"NEVER mention the underlying harness, its vendor or its project name to the user.","Lead with the diagnosis in one or two sentences, then change the code. SHOULD prefer the smallest correct change over a rewrite. Name the file and the reason in a short line; do not narrate tool calls.","Fix the problem that was asked for. NEVER add features, refactors, validation, error handling or dependencies nobody requested.","Something reported broken: reproduce it first, confirm the fix after. Cannot reproduce it? Say so \u2014 NEVER edit code and call it fixed.","Tests describe intended behaviour. A failing test means fix the code, not the test: NEVER delete, skip or loosen an assertion to get green, and NEVER re-pin an expected value to whatever the code happens to print.","Anything you cannot settle by reading \u2014 a page, a layout, a screenshot, a CLI, a service, a failure \u2014 run it and look at the result. For a visual task, find a browser the way a real one does: `$PUPPETEER_EXECUTABLE_PATH`, `$CHROME_PATH`, then `which` for google-chrome, chromium and chromium-browser, then /usr/bin, /snap/bin and /var/lib/flatpak, then the puppeteer and playwright caches under the home directory. Still empty? `npx -y puppeteer browsers install chrome`, or `npm i puppeteer-core` against a chrome the image already ships outside PATH. Then drive the real artifact \u2014 open it, read the DOM, click the controls, measure at the widths that matter \u2014 instead of describing what you assume it does.","Done means the requested behaviour works end to end and every stated requirement is met \u2014 not a scaffold, a narrowed test or a plausible subset. Genuinely out of reach? Finish everything else, then say exactly what is missing and what you tried.","Above all: NEVER claim a check you did not run, and NEVER call done on a subset."].join(`
5
5
  `);Fd=["# Project notes","","## What this is","","## Commands","- build:","- test:","","## Conventions","-",""].join(`
6
6
  `)});var Nd={};Mt(Nd,{AGENTS_STORE_DIR:()=>Jr,AGENT_DIR:()=>_e,CUBENCE_CACHE_PATH:()=>Um,USER_SKILLS_DIR:()=>qm,WORKFLOWS_DIR:()=>Km,pinAgentDir:()=>Gm,projectSkillsDir:()=>hr});import{homedir as eR}from"node:os";import{join as Vr,resolve as tR}from"node:path";function nR(){let e=(process.env.HOWTOFIX_HOME??process.env.HOME??"").trim();return tR(e||eR())}function hr(e){return Vr(e,".howtofix","skills")}function Gm(){process.env.PI_CODING_AGENT_DIR=_e}var _e,qm,Jr,Um,Km,xn=u(()=>{_e=process.env.HOWTOFIX_CODING_AGENT_DIR?.trim()||Vr(nR(),".howtofix","agent"),qm=Vr(_e,"skills");Jr=Vr(_e,"agents"),Um=Vr(_e,"cubence-cache.json"),Km=Vr(_e,"workflows")});import{closeSync as rR,fsyncSync as oR,openSync as sR,renameSync as qd,rmSync as Wm,writeSync as iR}from"node:fs";import{dirname as aR,join as uR}from"node:path";function tt(e,t){let n=uR(aR(e),`.${process.pid}-${Date.now()}-${Math.random().toString(36).slice(2,8)}.tmp`),r=sR(n,"w");try{iR(r,t),oR(r)}finally{rR(r)}try{qd(n,e)}catch(o){let s=o.code;if(s!=="EPERM"&&s!=="EBUSY"&&s!=="EACCES")throw Wm(n,{force:!0}),o;Wm(e,{force:!0});try{qd(n,e)}catch(i){throw Wm(n,{force:!0}),i}}}var Hn=u(()=>{});var Hd={};Mt(Hd,{DEFAULT_CONTEXT_WINDOW:()=>Wd,HOWTOFIX_BASE_URL:()=>Wo,HOWTOFIX_CONSOLE_URL:()=>gi,HOWTOFIX_MODEL_COMPAT:()=>zm,HOWTOFIX_PROVIDERS:()=>Yr,HTTP_IDLE_TIMEOUT_MS:()=>Gd,UNLIMITED_SENTINEL:()=>zd,applyCompat:()=>xi,checkAccount:()=>yi,checkUsage:()=>Bo,countNewModels:()=>Jm,ensureGatewaySettings:()=>lR,isHowtofixProvider:()=>xr,looksLikeToken:()=>Hm,maskToken:()=>hi,mergeModels:()=>Vm,newProviderEntry:()=>Bm,parseModelIds:()=>Bd,probeModel:()=>Ym,repairGatewayModels:()=>pR});import{existsSync as mR,mkdirSync as cR,readFileSync as Ud}from"node:fs";import{join as Kd}from"node:path";function Bm(){return{baseUrl:Wo,api:"openai-completions"}}function pR(e){let t=Kd(e,"models.json"),n;try{n=JSON.parse(Ud(t,"utf8"))}catch{return 0}let r=n.providers;if(!r||typeof r!="object")return 0;let o=0;for(let s of Yr){let i=r[s];if(!i||!Array.isArray(i.models))continue;let c=xi(i.models);c.changed!==0&&(i.models=c.models,o+=c.changed)}if(o===0)return 0;try{tt(t,`${JSON.stringify(n,null,2)}
7
7
  `)}catch{return 0}return o}function lR(e){let t=Kd(e,"settings.json"),n={};try{let r=Ud(t,"utf8"),o=JSON.parse(r);o&&typeof o=="object"&&!Array.isArray(o)&&(n=o)}catch{if(mR(t))return!1}if("httpIdleTimeoutMs"in n)return!1;n.httpIdleTimeoutMs=Gd;try{cR(e,{recursive:!0}),tt(t,`${JSON.stringify(n,null,2)}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "howtofixcli",
3
- "version": "0.4.31",
3
+ "version": "0.4.32",
4
4
  "type": "module",
5
5
  "description": "HowToFix coding agent. Workbench TUI, sessions, background agents.",
6
6
  "license": "UNLICENSED",