@staff0rd/assist 0.917.0 → 0.918.0

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
@@ -539,8 +539,8 @@ assist config set next.excludeTypes Epic -g --repo
539
539
 
540
540
  Concurrent sessions in one repo can be isolated with native git worktrees instead of keeping multiple physical clones: see [docs/parallel-work.md](docs/parallel-work.md). All of these keys **default off** except `worktree.install`:
541
541
 
542
- - `worktree.enabled` (parallel work) — spill concurrent prompt sessions into adjacent `<clone>-N` worktrees instead of sharing the clone's working copy. Assist-command sessions (draft, bug, backlog run, next, review, …) always get a fresh worktree off `origin/<default>`.
543
- - `worktree.trunk` (trunk-based) — a worktree's branch tracks `origin/<trunk>` so commits land on the mainline, and jobs that commit (`backlog run`, PR checkouts) always run in a worktree, never the clone. Off, worktrees start off the remote default branch with no mainline tracking.
542
+ - `worktree.enabled` (parallel work) — every session (prompt, assist command, backlog run, resume of a reaped worktree, `assist review` from a terminal) gets a fresh adjacent `<clone>-N` worktree; the clone itself is never allocated. Only `inPlace` launches (e.g. the PR Review button) and agents added to an existing stream stay in their tree.
543
+ - `worktree.trunk` (trunk-based) — a worktree's branch tracks `origin/<trunk>` so commits land on the mainline. Off, worktrees start off the remote default branch with no mainline tracking.
544
544
  - `worktree.install` — how a new worktree installs its deps: `true` (default) auto-detects pnpm/yarn/bun/npm, a string is the install command, `false` skips it, and a list of paths installs in each in order.
545
545
 
546
546
  None of them leaves permanent state on the clone, so turning parallel work back off leaves the repo as it was.
@@ -581,7 +581,7 @@ A restart kills every managed session's pty, which also kills any background tas
581
581
 
582
582
  ### Send to assist
583
583
 
584
- The extension also adds an **assist** button beside each PR review comment, review and issue comment timestamp, and to the PR/issue header. Pressing it opens a popover with an optional instructions field; **Enter** sends (even when empty), **Shift+Enter** adds a newline and **Escape** closes. The background script POSTs the link and instructions to the assist web server's `POST /api/sessions/from-github` (`{ url, instructions? }`), which parses `owner/repo` from the GitHub URL, finds its clone under `clone.baseDir` (`<baseDir>/<repo>`, else any folder directly under `baseDir` whose origin matches) and starts a Claude session there whose prompt is the link followed by the instructions, answering `{ sessionId, cwd }`. `extension.redirects` maps an `owner/repo` to another `owner/repo` whose clone hosts these sessions instead (e.g. issues tracked in one repo but worked on in another); the prompt keeps the original link, and PR review sends always open the PR's own repo. A toast reports the result: a URL that isn't a GitHub repo link gets a 400, a repo that isn't cloned gets a 404 saying so (nothing is cloned), and an unreachable server names the URL the extension tried. The endpoint has no auth and answers CORS only for `moz-extension://` and `chrome-extension://` origins.
584
+ The extension also adds an **assist** button beside each PR review comment, review and issue comment timestamp, and to the PR/issue header. Pressing it opens a popover with an optional instructions field and **Prompt**, **Draft** and **Bug** buttons; **Enter** sends as Prompt (even when empty), **Shift+Enter** adds a newline and **Escape** closes. The background script POSTs the link and instructions to the assist web server's `POST /api/sessions/from-github` (`{ url, instructions?, mode? }`), which parses `owner/repo` from the GitHub URL, finds its clone under `clone.baseDir` (`<baseDir>/<repo>`, else any folder directly under `baseDir` whose origin matches) and starts a Claude session there whose prompt is the link followed by the instructions, answering `{ sessionId, cwd }`. `mode: "draft"` or `"bug"` instead runs `assist draft --once` / `assist bug --once` with that text; any other mode gets a 400. `extension.redirects` maps an `owner/repo` to another `owner/repo` whose clone hosts these sessions instead (e.g. issues tracked in one repo but worked on in another); the prompt keeps the original link, and PR review sends always open the PR's own repo. A toast reports the result: a URL that isn't a GitHub repo link gets a 400, a repo that isn't cloned gets a 404 saying so (nothing is cloned), and an unreachable server names the URL the extension tried. The endpoint has no auth and answers CORS only for `moz-extension://` and `chrome-extension://` origins.
585
585
 
586
586
  On a PR page the header button opens a menu mirroring the web app's PR dialog instead: the review modes (Review, Review & refine, Review & apply, Review & post, High-level review), the Force re-run / Address comments after / Announce to Slack after toggles that add their flags to the picked mode, and the PR actions (Checkout, Address Comments, Fix conflicts merge/rebase). Arrow keys move, Enter picks or toggles, Escape or a click outside closes. Picking an entry POSTs `{ url, args }` to `POST /api/sessions/review-from-github`, which resolves the clone the same way and starts an assist session running those args plus the PR number. Args that aren't a shared review mode (optionally followed by toggle flags) or PR action get a 400.
587
587
 
@@ -1 +1 @@
1
- "use strict";(()=>{function c(s){let{type:e,pageId:o,prompt:t}=s??{};return e==="assist-docs-feedback"&&typeof o=="string"&&typeof t=="string"}async function r(s,e,o){let t;try{t=await fetch(`${s}${e}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(o)})}catch{return{ok:!1,message:`assist web server unreachable at ${s}`}}let n=await t.json().catch(()=>({}));return t.ok?{ok:!0,data:n}:{ok:!1,message:n.error??`assist web server returned ${t.status}`}}async function u(s,{type:e,...o}){let t=await r(s,"/api/sessions/docs-feedback",o);return t.ok?{ok:!0,message:t.data.message??"Sent to the docs session"}:t}function p(){return globalThis.browser?.storage?.local}function g(s){let e;try{e=new URL(s.trim())}catch{return}if(!(e.protocol!=="http:"&&e.protocol!=="https:"))return e.origin}var A="http://localhost:3100",m="serverUrl";async function d(){let e=(await p()?.get(m).catch(()=>{}))?.[m];return typeof e=="string"&&g(e)||A}var S={draft:["draft","--once"]};function f(s){return typeof s=="string"&&Object.hasOwn(S,s)}function l(s){let{type:e,url:o,args:t,mode:n}=s??{};return e==="assist-send"&&typeof o=="string"&&(t===void 0||Array.isArray(t)&&t.every(i=>typeof i=="string"))&&(n===void 0||f(n))}function y(){return globalThis.browser?.runtime}async function b(s,{url:e,instructions:o,args:t,mode:n}){let[i,k]=t?["review-from-github",{url:e,args:t}]:["from-github",{url:e,instructions:o,mode:n}],a=await r(s,`/api/sessions/${i}`,k);return a.ok?{ok:!0,message:`assist session started in ${a.data.cwd}`}:a}function h(){y()?.onMessage.addListener(s=>{if(l(s))return d().then(e=>b(e,s));if(c(s))return d().then(e=>u(e,s))})}h();})();
1
+ "use strict";(()=>{function u(s){let{type:e,pageId:o,prompt:t}=s??{};return e==="assist-docs-feedback"&&typeof o=="string"&&typeof t=="string"}async function r(s,e,o){let t;try{t=await fetch(`${s}${e}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(o)})}catch{return{ok:!1,message:`assist web server unreachable at ${s}`}}let n=await t.json().catch(()=>({}));return t.ok?{ok:!0,data:n}:{ok:!1,message:n.error??`assist web server returned ${t.status}`}}async function c(s,{type:e,...o}){let t=await r(s,"/api/sessions/docs-feedback",o);return t.ok?{ok:!0,message:t.data.message??"Sent to the docs session"}:t}function p(){return globalThis.browser?.storage?.local}function g(s){let e;try{e=new URL(s.trim())}catch{return}if(!(e.protocol!=="http:"&&e.protocol!=="https:"))return e.origin}var A="http://localhost:3100",m="serverUrl";async function d(){let e=(await p()?.get(m).catch(()=>{}))?.[m];return typeof e=="string"&&g(e)||A}var S={draft:["draft","--once"],bug:["bug","--once"]};function f(s){return typeof s=="string"&&Object.hasOwn(S,s)}function l(s){let{type:e,url:o,args:t,mode:n}=s??{};return e==="assist-send"&&typeof o=="string"&&(t===void 0||Array.isArray(t)&&t.every(i=>typeof i=="string"))&&(n===void 0||f(n))}function b(){return globalThis.browser?.runtime}async function y(s,{url:e,instructions:o,args:t,mode:n}){let[i,k]=t?["review-from-github",{url:e,args:t}]:["from-github",{url:e,instructions:o,mode:n}],a=await r(s,`/api/sessions/${i}`,k);return a.ok?{ok:!0,message:`assist session started in ${a.data.cwd}`}:a}function h(){b()?.onMessage.addListener(s=>{if(l(s))return d().then(e=>y(e,s));if(u(s))return d().then(e=>c(e,s))})}h();})();