howtocode 0.7.71 → 0.7.73

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
@@ -155,6 +155,7 @@ nothing to remember.
155
155
  - **Web search and fetch** — `web_search` and `web_fetch` read public http(s) URLs; local, loopback, and RFC1918 addresses are refused before any request is made. Search defaults to DuckDuckGo, with an optional `BRAVE_API_KEY` upgrade.
156
156
  - **Language server queries** — the read-only `lsp` tool asks a language server for definition, references, hover, symbols, or diagnostics. It needs the matching server on PATH (`typescript-language-server` for this repo); a missing binary comes back as a tool result that says so.
157
157
  - **Browser relay** — the `browser` tool drives the Chrome tabs you already have open, so signed-in sessions are reused instead of logging in again in a headless browser. Run `/browser-relay install` once, load the unpacked extension from `~/.howtocode/agent/browser-relay/extension` in `chrome://extensions`, set port `9224`, and paste the token from the file the command names into the extension options. The token is never printed. `/browser-relay status` reports the connection. The relay binds `127.0.0.1` only and requires that token; set `HOWTOCODE_BROWSER_RELAY_PORT` if the default port is taken. Actions: `status`, `tabs`, `open`, `activate`, `navigate`, `evaluate`, `screenshot`, `close`. The tier is `exec` — in `suggest` mode each call asks first. The extension ships under the MIT license; its license text is installed alongside the files.
158
+ - **Discord Rich Presence** — shows the running session on your Discord profile: `HowToCode`, the model, and the project folder. It works with the bundled HowToCode application id; set `HOWTOCODE_DISCORD_CLIENT_ID=<id>` or `"discordClientId": "<id>"` in `~/.howtocode/agent/settings.json` to use your own Discord app, and `HOWTOCODE_DISCORD_DISABLE=1` to turn it off. Discord already shows the application icon, so set that icon to the howtofix.id logo; for a dedicated Rich Presence image, upload an asset under Rich Presence → Art Assets and set `HOWTOCODE_DISCORD_LARGE_IMAGE=<asset-key>`. The IPC client is dependency-free and picks the right socket on Windows (`\\?\\pipe\\discord-ipc-N`), Linux and macOS (`$XDG_RUNTIME_DIR` or `/tmp`); a missing Discord client is a silent no-op.
158
159
  - **Hooks** — `hooks.json` in the config root attaches shell commands to seven lifecycle points (`PreToolUse`, `PostToolUse`, `UserPromptSubmit`, `SessionStart`, `Stop`, `PreCompact`, `SessionEnd`). A hook reads a JSON payload on stdin and decides with its exit code: `0` allows, `2` blocks with its stderr as the reason. A `PreToolUse` hook can also **rewrite** a call's arguments with `updatedInput` — validated against the tool's own schema, so a hook cannot make the agent run something it never asked for. A `PreToolUse` hook outranks the approval mode, so it holds under `full-auto` too. `async` and `once` are supported. See `docs/hooks.md`.
159
160
  - **Sessions** — stored as JSONL under `~/.howtocode/agent/sessions/<project>/`. `-c` continues the latest; `/resume` picks any of them. On startup, transcripts idle for more than 30 days are swept across every project — the session just opened is kept whatever its age — so the store does not grow for the life of the machine (the same window rewind's snapshots use).
160
161
  - **Project notes** — `/init` writes an `AGENTS.md` and asks the agent to fill it in; it is loaded into the system prompt on later runs.
@@ -1 +1 @@
1
- import{b as r}from"./chunk-EF3Z3FAO.js";import{j as a}from"./chunk-MVVEYKN6.js";import"./chunk-WOT6VMZA.js";function c(e){return{prompt:s=>e.session.prompt(s),abort:()=>e.session.abort(),subscribe:s=>e.session.subscribe(n=>s(n)),getLastAssistantText:()=>a(e.session.getLastAssistantText()??""),lastStopReason:()=>{let s=e.session.state.messages.at(-1);return s?.role==="assistant"?s.stopReason:void 0},dispose:()=>e.dispose()}}async function g(e,s){let{openSession:n}=await import("./chunk-H23J4FSF.js"),i=t=>n({cwd:t,model:s.model,thinking:s.thinking,continueSession:!1,noSession:!1,sessionPath:void 0,interactive:!1});if(e==="acp"){let{runAcp:t}=await import("./chunk-TOV557ET.js");await t({input:process.stdin,output:process.stdout,version:r,createAgent:async u=>c(await i(u))});return}let{runRpc:p}=await import("./chunk-QOYTPACU.js"),{createJsonEventEncoder:d}=await import("./chunk-MCDEIIEN.js"),o=await i(s.cwd),m=d();await p({input:process.stdin,output:process.stdout,agent:c(o),encodeEvent:t=>m.line(t),state:()=>({sessionId:o.session.sessionId,model:o.modelLabel,cwd:s.cwd})})}export{c as agentFromSession,g as serveProtocol};
1
+ import{b as r}from"./chunk-WDMBTVK7.js";import{j as a}from"./chunk-MVVEYKN6.js";import"./chunk-WOT6VMZA.js";function c(e){return{prompt:s=>e.session.prompt(s),abort:()=>e.session.abort(),subscribe:s=>e.session.subscribe(n=>s(n)),getLastAssistantText:()=>a(e.session.getLastAssistantText()??""),lastStopReason:()=>{let s=e.session.state.messages.at(-1);return s?.role==="assistant"?s.stopReason:void 0},dispose:()=>e.dispose()}}async function g(e,s){let{openSession:n}=await import("./chunk-HMCCBHIZ.js"),i=t=>n({cwd:t,model:s.model,thinking:s.thinking,continueSession:!1,noSession:!1,sessionPath:void 0,interactive:!1});if(e==="acp"){let{runAcp:t}=await import("./chunk-TOV557ET.js");await t({input:process.stdin,output:process.stdout,version:r,createAgent:async u=>c(await i(u))});return}let{runRpc:p}=await import("./chunk-QOYTPACU.js"),{createJsonEventEncoder:d}=await import("./chunk-MCDEIIEN.js"),o=await i(s.cwd),m=d();await p({input:process.stdin,output:process.stdout,agent:c(o),encodeEvent:t=>m.line(t),state:()=>({sessionId:o.session.sessionId,model:o.modelLabel,cwd:s.cwd})})}export{c as agentFromSession,g as serveProtocol};