bazilion 0.19.0 → 0.20.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/dist/cli.js +272 -129
- package/dist/cli.js.map +1 -1
- package/dist/daemon.js +1689 -709
- package/dist/daemon.js.map +1 -1
- package/dist/migrations/0001_init.sql +46 -0
- package/dist/web/client/assets/{ChatPane-DCyGcqdh.js → ChatPane-CGCtAuD3.js} +1 -1
- package/dist/web/client/assets/{ConfirmDialog-C908TxS5.js → ConfirmDialog-Br19uXWH.js} +1 -1
- package/dist/web/client/assets/{FieldRow-CELqI-1V.js → FieldRow-Csy3_cH5.js} +1 -1
- package/dist/web/client/assets/{ProductionTeamPolicyEditor-DnTcWhG8.js → ProductionTeamPolicyEditor-DG1x4Cqz.js} +1 -1
- package/dist/web/client/assets/{ProfileCommunicationEditor-BVIEaW3s.js → ProfileCommunicationEditor-C3odNVkK.js} +1 -1
- package/dist/web/client/assets/{ResultSourceConversation-4gbZCh_s.js → ResultSourceConversation-5PFWqXTY.js} +1 -1
- package/dist/web/client/assets/{TeamTabs-V17b45X5.js → TeamTabs-BHB_COm0.js} +1 -1
- package/dist/web/client/assets/{TemplatesTabs-BMK3Qok_.js → TemplatesTabs-YyytjW7k.js} +1 -1
- package/dist/web/client/assets/{UnsavedChangesGuard-BaE-UzyS.js → UnsavedChangesGuard-CredyC3E.js} +1 -1
- package/dist/web/client/assets/{_id-CArZR-IO.js → _id-BLm9LVlZ.js} +1 -1
- package/dist/web/client/assets/{_id-BU1l9gP7.js → _id-BZ_-4M4s.js} +1 -1
- package/dist/web/client/assets/{_id-Bvh5LyUv.js → _id-CIkPtQY0.js} +1 -1
- package/dist/web/client/assets/{_id-BVANQm00.js → _id-KXX6nuKc.js} +1 -1
- package/dist/web/client/assets/{_id-tUkSe5li.js → _id-nDbQY7f_.js} +1 -1
- package/dist/web/client/assets/{activity-CWCnqjqj.js → activity-BE7jG1Mz.js} +1 -1
- package/dist/web/client/assets/{agents-CdCnhH06.js → agents-S9lzXrrs.js} +1 -1
- package/dist/web/client/assets/{agents-CX4STmGK.js → agents-vOPd-upn.js} +1 -1
- package/dist/web/client/assets/{approvals-CnNpwG78.js → approvals-BUfhlUAX.js} +1 -1
- package/dist/web/client/assets/{attention-CEE-wWrx.js → attention-C3r-2GSp.js} +1 -1
- package/dist/web/client/assets/chevron-right-C7P3Z105.js +1 -0
- package/dist/web/client/assets/{config-CSEtI-dq.js → config-AL_EM57n.js} +1 -1
- package/dist/web/client/assets/{inbox-MYnBtPdF.js → inbox-LlCpJrMH.js} +1 -1
- package/dist/web/client/assets/{index-Ct31TjS-.js → index-CwMw0pnV.js} +2 -2
- package/dist/web/client/assets/{learning-BIR5FTgQ.js → learning-zvTJ_9vM.js} +1 -1
- package/dist/web/client/assets/{login-DIeceuOs.js → login-BpQ54z8Y.js} +1 -1
- package/dist/web/client/assets/{mcp-CX3kJpGu.js → mcp-BD6VzXg_.js} +1 -1
- package/dist/web/client/assets/{members-DlhSjye1.js → members-SEDi8SFo.js} +1 -1
- package/dist/web/client/assets/{memory-CsDd6b2l.js → memory-zi_dPlMA.js} +1 -1
- package/dist/web/client/assets/{policy-DkWDhG0x.js → policy-URjQAAdN.js} +1 -1
- package/dist/web/client/assets/{results-BHdhNHJJ.js → results-Bcuy4Flp.js} +1 -1
- package/dist/web/client/assets/review-CVH7X9-d.js +1 -0
- package/dist/web/client/assets/{routes-DtYD4WJL.js → routes-BJEX6yAE.js} +1 -1
- package/dist/web/client/assets/{services-WUlW7oEo.js → services-BTG4F5FL.js} +1 -1
- package/dist/web/client/assets/{skills-jNoUfUSZ.js → skills-DwiHS7eD.js} +1 -1
- package/dist/web/client/assets/{teams-C1kYRrtP.js → teams-DcROmSGB.js} +1 -1
- package/dist/web/client/assets/{teams-D3FaSKE7.js → teams-DfpwQu1i.js} +1 -1
- package/dist/web/client/assets/{telegram-D86AO6V9.js → telegram-BLyaaUXE.js} +1 -1
- package/dist/web/client/assets/{tokens-B42KDisP.js → tokens-Dp9Vwvfx.js} +1 -1
- package/dist/web/client/assets/{triggers-yEfWnQ_K.js → triggers-CtVhrAGA.js} +1 -1
- package/dist/web/client/assets/verifications-TC0ccGLY.js +2 -0
- package/dist/web/client/assets/{welcome-D8IbF_P0.js → welcome-DML3X1ha.js} +1 -1
- package/dist/web/client/assets/{x-CXKABZ7C.js → x-D8yuCam7.js} +1 -1
- package/dist/web/server/assets/{_id-bVispdh-.js → _id-Bazctexc.js} +1 -1
- package/dist/web/server/assets/{_id-Dab2CVtO2.js → _id-BjvOb4CK2.js} +1 -1
- package/dist/web/server/assets/{_id-DL-SnSnK.js → _id-Bn0w00AG.js} +1 -1
- package/dist/web/server/assets/{_id-D2bDA1iV.js → _id-DFf_uQiI.js} +1 -1
- package/dist/web/server/assets/{_tanstack-start-manifest_v-BcTOb0oj.js → _tanstack-start-manifest_v-BGSoO6CK.js} +79 -79
- package/dist/web/server/assets/{activity-CLDAy6rk.js → activity-j_Enmf3L.js} +1 -1
- package/dist/web/server/assets/{agents-CdB2kuNN.js → agents-BAi0dE66.js} +1 -1
- package/dist/web/server/assets/{agents-DfHcb2H2.js → agents-BHUbTrm7.js} +1 -1
- package/dist/web/server/assets/{approvals-Bq846WaP.js → approvals-BcUm6IOo.js} +1 -1
- package/dist/web/server/assets/{attention-Sm-U7s_0.js → attention-BQBa0Bu5.js} +1 -1
- package/dist/web/server/assets/{auth-PB5dVyvX.js → auth-PDNSxrT-.js} +1 -1
- package/dist/web/server/assets/{config-BNGTBu80.js → config-Cf7hhsUR.js} +1 -1
- package/dist/web/server/assets/{daemon-client-CWQvck6B.js → daemon-client-DY4jE6KU.js} +15 -0
- package/dist/web/server/assets/{git-review-C_h_tezf.js → git-review-RvzReZyD.js} +1 -1
- package/dist/web/server/assets/{inbox-DJoU-bla.js → inbox-Du1guYth.js} +1 -1
- package/dist/web/server/assets/{learning-DVb0I_3Z.js → learning-CjcixPRH.js} +1 -1
- package/dist/web/server/assets/{mcp-CeZqOiDG.js → mcp-BCalFLvt.js} +1 -1
- package/dist/web/server/assets/{members-CcYjuqxB.js → members-C4TpK50B.js} +1 -1
- package/dist/web/server/assets/{memory-CH2yNT89.js → memory-CLZs-XRY.js} +1 -1
- package/dist/web/server/assets/{policy-DrRKinMr.js → policy-BrIXpwxZ.js} +1 -1
- package/dist/web/server/assets/publications-BrX3-WJf.js +57 -0
- package/dist/web/server/assets/{results-fT2zyiJx.js → results-CJR6dNzB.js} +1 -1
- package/dist/web/server/assets/{review-CvUPk4HA.js → review-CRHiZfC8.js} +1 -1
- package/dist/web/server/assets/{review-DYcYdUTv.js → review-Dqdts12v.js} +205 -3
- package/dist/web/server/assets/{review-packets-e36PsTSX.js → review-packets-D3bZ7QYU.js} +1 -1
- package/dist/web/server/assets/{router-NYhuYQCd.js → router-BVhdWkwP.js} +3 -3
- package/dist/web/server/assets/{routes-RdppWPiW.js → routes-DizvfkfZ.js} +1 -1
- package/dist/web/server/assets/{services-Dgu7dcTC.js → services-DDRj180j.js} +1 -1
- package/dist/web/server/assets/{skills-DL7UIWa8.js → skills-Bck9L5oo.js} +1 -1
- package/dist/web/server/assets/{teams-DiC-MBg4.js → teams-CSqR5mWl.js} +1 -1
- package/dist/web/server/assets/{teams-Cmn7mdx9.js → teams-C_PicOsj.js} +1 -1
- package/dist/web/server/assets/{telegram-CLOFnLjF.js → telegram-D0odXx1E.js} +1 -1
- package/dist/web/server/assets/{tokens-BVva7GHu.js → tokens-B2O0Di4p.js} +1 -1
- package/dist/web/server/assets/{triggers-D4orksJq.js → triggers-DtKMYL2r.js} +1 -1
- package/dist/web/server/assets/{verification-C1SHMTX8.js → verification-no5BrOeR.js} +1 -1
- package/dist/web/server/assets/{verifications-Ci49n2Km.js → verifications-CM-Bbgjt.js} +114 -91
- package/dist/web/server/assets/{verifications-C_ycXrPK.js → verifications-DhGe86E1.js} +1 -1
- package/dist/web/server/server.js +56 -48
- package/dist/worker.js +52 -1
- package/dist/worker.js.map +1 -1
- package/package.json +3 -3
- package/dist/web/client/assets/chevron-right-CvCEwfSl.js +0 -1
- package/dist/web/client/assets/review-Dyw47eM1.js +0 -1
- package/dist/web/client/assets/verifications-DrHQEQFx.js +0 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bazilion",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.20.0",
|
|
4
4
|
"description": "Multi-agent runtime CLI — spawn LLM agents, manage profiles/teams/skills, and run the local daemon.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -68,8 +68,8 @@
|
|
|
68
68
|
"devDependencies": {
|
|
69
69
|
"@types/adm-zip": "^0.5.8",
|
|
70
70
|
"@types/qrcode-terminal": "^0.12.2",
|
|
71
|
-
"@bazilion/
|
|
72
|
-
"@bazilion/
|
|
71
|
+
"@bazilion/api-types": "0.20.0",
|
|
72
|
+
"@bazilion/client": "0.20.0"
|
|
73
73
|
},
|
|
74
74
|
"scripts": {
|
|
75
75
|
"build": "pnpm --filter @bazilion/web build && tsup"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{gt as e}from"./index-Ct31TjS-.js";var t=e(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]);export{t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e,t}from"./jsx-runtime-DGeXAQPT.js";import{t as n}from"./react-3W8R1pOO.js";import{C as r,D as i,E as a,S as o,T as s,_ as c,b as l,f as u,g as d,m as f,p,v as m,w as h,x as g,y as _}from"./index-Ct31TjS-.js";import{r as v}from"./Page-NV96O47A.js";import{t as y}from"./Button-ByiV6fpd.js";import{a as b,i as x,o as S,r as C,s as w}from"./git-review-presentation-CzHQulDk.js";import{t as T}from"./TeamTabs-V17b45X5.js";var E=e(n(),1),D=t(),O=[`blocker`,`major`,`minor`,`info`],k=[`changes_requested`,`commented`,`recommended`],A=[`committed`,`pushed`,`pullRequest`,`merged`,`deployed`,`productionAccepted`];function j(e){return e===`identical`?`unchanged since capture`:e===`changed`?`changed since capture (never a pass)`:`not checked`}function M({teamId:e,view:t}){let[n,c]=(0,E.useState)({}),[u,d]=(0,E.useState)(!1),[f,p]=(0,E.useState)(null),[m,_]=(0,E.useState)(t.snapshots[0]?.id??``),[v,b]=(0,E.useState)(t.members[0]?.id??``),[x,S]=(0,E.useState)({path:``,severity:`major`,note:``}),[C,w]=(0,E.useState)(null),[T,M]=(0,E.useState)(null),[N,P]=(0,E.useState)(``),[F,I]=(0,E.useState)(`committed`),[L,R]=(0,E.useState)(``),z=async e=>{d(!0),p(null);try{let t=await e();`report`in t&&t.report?c(e=>({...e,[t.report.packet.id]:t.report})):`message`in t&&p(t)}finally{d(!1)}},B=()=>z(()=>g({data:{id:e,snapshotId:m,reviewerAgentId:v||null}})),V=t=>z(()=>h({data:{id:e,packetId:t}})),H=e=>n[e];return(0,D.jsxs)(`section`,{className:`space-y-3`,"aria-label":`Review packets`,children:[(0,D.jsxs)(`div`,{className:`flex items-baseline justify-between gap-2`,children:[(0,D.jsx)(`h3`,{children:`Review packets`}),(0,D.jsx)(`span`,{className:`muted`,children:`A packet binds one captured revision. Findings are recorded against it; resolving one needs an explicit decision or a named later revision.`})]}),(0,D.jsxs)(`div`,{className:`flex flex-wrap items-end gap-2`,children:[(0,D.jsxs)(`label`,{className:`flex flex-col text-sm`,children:[(0,D.jsx)(`span`,{className:`muted`,children:`Revision`}),(0,D.jsxs)(`select`,{value:m,onChange:e=>_(e.target.value),className:`unstyled`,children:[t.snapshots.length===0?(0,D.jsx)(`option`,{value:``,children:`(none captured)`}):null,t.snapshots.map(e=>(0,D.jsxs)(`option`,{value:e.id,children:[e.id.slice(0,12),e.complete?``:` — INCOMPLETE`]},e.id))]})]}),(0,D.jsxs)(`label`,{className:`flex flex-col text-sm`,children:[(0,D.jsx)(`span`,{className:`muted`,children:`Reviewer (optional)`}),(0,D.jsxs)(`select`,{value:v,onChange:e=>b(e.target.value),className:`unstyled`,children:[(0,D.jsx)(`option`,{value:``,children:`none — nothing delegated`}),t.members.map(e=>(0,D.jsx)(`option`,{value:e.id,children:e.name},e.id))]})]}),(0,D.jsx)(y,{variant:`primary`,disabled:u||!m,onClick:B,children:`Open packet`})]}),f?(0,D.jsx)(`p`,{role:`alert`,className:`rounded-sm border border-fawn p-2 text-sm`,children:f.message}):null,t.packets.length===0?(0,D.jsx)(`p`,{className:`muted`,children:`No review packets yet.`}):(0,D.jsx)(`ul`,{className:`list`,children:t.packets.map(t=>{let n=H(t.packet.id);return(0,D.jsxs)(`li`,{className:`card space-y-2`,children:[(0,D.jsxs)(`div`,{className:`flex flex-wrap items-baseline justify-between gap-2`,children:[(0,D.jsxs)(`div`,{children:[(0,D.jsx)(`strong`,{children:t.packet.state}),` `,(0,D.jsxs)(`span`,{className:`muted`,children:[t.packet.reviewerAgentId??`no reviewer`,` ·`,` `,t.packet.snapshot.id.slice(0,12)]})]}),(0,D.jsxs)(`div`,{className:`flex gap-2`,children:[(0,D.jsx)(y,{variant:`ghost`,disabled:u,onClick:()=>V(t.packet.id),children:`Details`}),(0,D.jsx)(y,{variant:`ghost`,disabled:u,onClick:async()=>{d(!0);let n=await o({data:{id:e,packetId:t.packet.id}});d(!1),`handoff`in n?w({packetId:t.packet.id,patch:n.patch,text:n.handoff}):`message`in n&&p(n)},children:`Handoff`})]})]}),(0,D.jsxs)(`p`,{className:`muted`,children:[t.counts.findings,` finding(s), `,t.counts.unresolved,` unresolved`,t.counts.blockers>0?`, ${t.counts.blockers} blocker(s)`:``,` ·`,` `,t.conclusion??`no conclusion yet`]}),C?.packetId===t.packet.id?(0,D.jsxs)(`div`,{className:`space-y-1`,children:[(0,D.jsx)(`h4`,{children:`Handoff`}),(0,D.jsx)(`pre`,{className:`overflow-x-auto rounded-sm border border-fawn p-2 text-xs`,children:C.text}),C.patch?(0,D.jsx)(`pre`,{className:`overflow-x-auto rounded-sm border border-fawn p-2 text-xs`,children:C.patch}):null,(0,D.jsx)(y,{variant:`ghost`,onClick:()=>{navigator.clipboard?.writeText(C.patch||C.text)},children:`Copy`})]}):null,n?(0,D.jsxs)(D.Fragment,{children:[(0,D.jsxs)(`p`,{className:`muted`,children:[`applicability: `,j(n.applicability.comparison)]}),(0,D.jsx)(`ul`,{children:n.findings.map(n=>(0,D.jsxs)(`li`,{children:[(0,D.jsxs)(`span`,{className:`muted`,children:[`[`,n.severity,`]`]}),` `,(0,D.jsxs)(`code`,{children:[n.path,n.lineStart===null?``:`:${n.lineStart}${n.lineEnd&&n.lineEnd!==n.lineStart?`-${n.lineEnd}`:``}`]}),` `,`— `,n.note,n.resolution?(0,D.jsxs)(`span`,{className:`muted`,children:[` `,`· resolved (`,n.resolution.kind,`) by `,n.resolution.by.kind]}):n.state===`unverified`?(0,D.jsx)(`span`,{className:`muted`,children:` · UNVERIFIED — not correlated to this revision`}):(0,D.jsx)(y,{variant:`ghost`,disabled:u,onClick:()=>z(()=>i({data:{id:e,packetId:t.packet.id,findingId:n.id,resolutionKind:`explicit`,resolutionNote:`resolved by the operator`}})),children:`Resolve explicitly`})]},n.id))}),(0,D.jsxs)(`div`,{className:`flex flex-wrap items-end gap-2`,children:[(0,D.jsxs)(`label`,{className:`flex flex-col text-sm`,children:[(0,D.jsx)(`span`,{className:`muted`,children:`Finding path`}),(0,D.jsx)(`input`,{value:x.path,onChange:e=>S({...x,path:e.target.value})})]}),(0,D.jsxs)(`label`,{className:`flex flex-col text-sm`,children:[(0,D.jsx)(`span`,{className:`muted`,children:`Severity`}),(0,D.jsx)(`select`,{value:x.severity,onChange:e=>S({...x,severity:e.target.value}),children:O.map(e=>(0,D.jsx)(`option`,{value:e,children:e},e))})]}),(0,D.jsxs)(`label`,{className:`flex flex-col grow text-sm`,children:[(0,D.jsx)(`span`,{className:`muted`,children:`Note`}),(0,D.jsx)(`input`,{value:x.note,onChange:e=>S({...x,note:e.target.value})})]}),(0,D.jsx)(y,{variant:`ghost`,disabled:u||!x.path||!x.note,onClick:()=>z(()=>l({data:{id:e,packetId:t.packet.id,path:x.path,severity:x.severity,note:x.note}})),children:`Add finding`})]}),(0,D.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,D.jsx)(`span`,{className:`muted`,children:`Conclusion:`}),k.map(n=>(0,D.jsx)(y,{variant:`ghost`,disabled:u,onClick:()=>z(()=>a({data:{id:e,packetId:t.packet.id,conclusion:n}})),children:n},n))]}),(0,D.jsxs)(`div`,{className:`space-y-1`,children:[(0,D.jsx)(`span`,{className:`muted`,children:`Where a file link points. The workspace belongs to the machine running the daemon, so this says which host it names and whether it is the reviewed revision.`}),(0,D.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,D.jsx)(`input`,{placeholder:`changed path`,value:L,onChange:e=>R(e.target.value)}),(0,D.jsx)(y,{variant:`ghost`,disabled:u||!L,onClick:async()=>{let n=await r({data:{id:e,packetId:t.packet.id,path:L}});`link`in n?M({packetId:t.packet.id,link:n.link}):`message`in n&&p(n)},children:`Resolve location`}),T?.packetId===t.packet.id?(0,D.jsx)(y,{variant:`ghost`,onClick:()=>void navigator.clipboard?.writeText(T.link.copyTarget),children:`Copy location`}):null]}),T?.packetId===t.packet.id?(0,D.jsxs)(`p`,{className:`muted`,children:[(0,D.jsx)(`code`,{children:T.link.copyTarget}),` · on`,` `,T.link.host.daemon??`the daemon host`,` ·`,` `,T.link.mode===`live`?`the reviewed revision`:T.link.mode===`stale`?`the CURRENT file, not the reviewed revision`:`unknown`,` `,`·`,` `,T.link.canOpen?`an editor is configured on the daemon host (${T.link.command})`:`no editor configured, so nothing can be opened here`]}):null]}),(0,D.jsxs)(`p`,{className:`muted`,children:[`completed: change prepared=`,String(n.facts.changePrepared),` checks current=`,String(n.facts.checksCurrent),` reviewed=`,String(n.facts.reviewed),` — a conclusion is not acceptance, and nothing here commits, pushes, merges or deploys.`]}),(0,D.jsxs)(`div`,{className:`space-y-1`,children:[(0,D.jsx)(`span`,{className:`muted`,children:`Beyond this point nothing is verified: Bazilion has no code-host integration, so these are whatever you report.`}),(0,D.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,D.jsx)(`select`,{className:`unstyled`,value:F,onChange:e=>I(e.target.value),children:A.map(e=>(0,D.jsx)(`option`,{value:e,children:e},e))}),(0,D.jsx)(`input`,{placeholder:`commit id, URL, release name…`,value:N,onChange:e=>P(e.target.value)}),(0,D.jsx)(y,{variant:`ghost`,disabled:u,onClick:()=>z(()=>s({data:{id:e,packetId:t.packet.id,state:F,reference:N||null}})),children:`Report`})]}),(0,D.jsxs)(`p`,{className:`muted`,children:[`reported (reported, not verified):`,` `,Object.entries(n.packet.reported).filter(([,e])=>e!==null).map(([e,t])=>`${e}=${t}`).join(` `)||`nothing yet`]})]})]}):null]},t.packet.id)})})]})}function N(){let e=u.useLoaderData(),t=e.team.id,[n,r]=(0,E.useState)(``),[i,a]=(0,E.useState)(``),[o,s]=(0,E.useState)(e.review),[l,h]=(0,E.useState)(e.unavailable),[g,O]=(0,E.useState)(e.snapshots),[k,A]=(0,E.useState)(null),[j,N]=(0,E.useState)(null),[P,F]=(0,E.useState)(null),[I,L]=(0,E.useState)(()=>e.snapshots[0]?.snapshotId??null),[R,z]=(0,E.useState)(``),[B,V]=(0,E.useState)(()=>e.members[0]?.id??``),[H,U]=(0,E.useState)(null),[W,G]=(0,E.useState)(null),[K,q]=(0,E.useState)(!1);async function J(e=i){q(!0),G({kind:`info`,message:`Loading changes…`});try{let n=await d({data:{id:t,...e?{base:e}:{}}});if(!n)return;s(n.review),h(n.unavailable),O(n.snapshots),a(e),A(null),N(null),G(null)}finally{q(!1)}}async function Y(e){A(e),N(null),G({kind:`info`,message:`Loading diff…`}),N(await f({data:{id:t,path:e,...i?{base:i}:{}}})),G(null)}async function X(){q(!0),G({kind:`info`,message:`Capturing a source snapshot…`});let e=await p({data:{id:t}});`reference`in e?(G({kind:`info`,message:`Captured ${b(e.reference)}`}),await J()):G({kind:`error`,message:w(e.code,e.message)}),q(!1)}async function Z(){if(!k)return;q(!0),G({kind:`info`,message:`Preparing feedback…`});let e=await m({data:{id:t,path:k,...I?{snapshotId:I}:{},...R.trim()?{note:R}:{}}});`message`in e&&`reference`in e?(U(e),G(null)):G({kind:`error`,message:w(e.code,e.message)}),q(!1)}async function Q(){if(!H||!B)return;q(!0);let e=await _({data:{agentId:B,message:H.message}});G(`queued`in e?{kind:`info`,message:`Feedback queued for the Agent. It runs as the next turn.`}:{kind:`error`,message:w(e.code,e.message)}),`queued`in e&&U(null),q(!1)}async function ee(e){G({kind:`info`,message:`Loading snapshot…`});let n=await c({data:{id:t,snapshotId:e}});F(n),G(n?null:{kind:`error`,message:`That snapshot is no longer retained.`})}let $=o?.changes;return(0,D.jsxs)(v,{children:[(0,D.jsxs)(`header`,{children:[(0,D.jsxs)(`h1`,{children:[e.team.name||e.team.id,` review`]}),(0,D.jsx)(`p`,{children:`Changes since a pinned baseline, and the source snapshots taken for them. Inspection is read-only — nothing here stages, commits or reverts anything.`})]}),(0,D.jsx)(T,{teamId:t}),(0,D.jsxs)(`section`,{className:`space-y-2`,"aria-label":`Comparison base`,children:[(0,D.jsxs)(`div`,{className:`flex flex-col gap-2 sm:flex-row sm:items-end`,children:[(0,D.jsxs)(`label`,{className:`flex min-w-0 flex-1 flex-col gap-1`,children:[(0,D.jsx)(`span`,{children:`Comparison base`}),(0,D.jsx)(`input`,{className:`input`,value:n,placeholder:`HEAD`,onChange:e=>r(e.target.value),onKeyDown:e=>{e.key===`Enter`&&J(n)}})]}),(0,D.jsxs)(`div`,{className:`flex gap-2`,children:[(0,D.jsx)(y,{variant:`ghost`,disabled:K,onClick:()=>void J(n),children:`Apply base`}),(0,D.jsx)(y,{variant:`primary`,disabled:K,onClick:()=>void J(),children:`Refresh`})]})]}),$&&(0,D.jsx)(`p`,{className:`text-sm opacity-80`,children:C($.identity,$)}),(0,D.jsx)(`p`,{className:`text-xs opacity-70`,children:`A branch name is resolved to a concrete commit when the review loads, so a moving tip cannot rewrite what you are looking at.`})]}),W&&(0,D.jsx)(`p`,{role:W.kind===`error`?`alert`:`status`,className:`text-sm`,children:W.message}),l&&(0,D.jsxs)(`section`,{className:`rounded-sm border border-fawn bg-ivory p-3`,"aria-label":`Review unavailable`,children:[(0,D.jsx)(`p`,{role:`alert`,children:w(l.code,l.message)}),l.code&&(0,D.jsxs)(`p`,{className:`text-xs opacity-70`,children:[`code: `,l.code]})]}),$&&(0,D.jsxs)(`section`,{className:`space-y-2`,"aria-label":`Changes since baseline`,children:[(0,D.jsx)(`h2`,{children:`Changes since baseline`}),$.changes.length===0&&(0,D.jsx)(`p`,{children:`No changes since this baseline.`}),$.changes.length>0&&(0,D.jsx)(`ul`,{className:`divide-y divide-fawn rounded-sm border border-fawn`,children:$.changes.map(e=>(0,D.jsx)(`li`,{children:(0,D.jsxs)(`button`,{type:`button`,"aria-current":k===e.path?`true`:void 0,onClick:()=>void Y(e.path),className:`flex w-full flex-col gap-1 px-3 py-2 text-left hover:bg-sapphire-glow focus:bg-sapphire-glow`,children:[(0,D.jsx)(`span`,{className:`break-all font-mono text-sm`,children:e.previousPath?`${e.previousPath} → ${e.path}`:e.path}),(0,D.jsxs)(`span`,{className:`text-xs opacity-80`,children:[x(e),e.patchTruncated?` · diff truncated`:``]})]})},`${e.status}:${e.path}`))}),$.truncated&&(0,D.jsx)(`p`,{className:`text-sm`,children:`This list is incomplete: more files changed than the review limit allows.`}),($.withheld.excluded>0||$.withheld.untracked>0)&&(0,D.jsxs)(`p`,{className:`text-xs opacity-80`,children:[$.withheld.excluded,` excluded and `,$.withheld.untracked,` untracked path(s) withheld by scope policy.`]}),$.issues.map(e=>(0,D.jsxs)(`p`,{className:`text-xs opacity-80`,children:[`note: `,e.code,`: `,e.message]},`${e.code}:${e.message}`))]}),k&&(0,D.jsxs)(`section`,{className:`space-y-2`,"aria-label":`Selected file diff`,children:[(0,D.jsx)(`h2`,{className:`break-all font-mono text-base`,children:k}),j===null?(0,D.jsx)(`p`,{className:`text-sm`,children:`Loading…`}):j.patch===null?(0,D.jsxs)(`p`,{className:`text-sm`,children:[`No diff text for this file`,j.omitted?` (${j.omitted.replaceAll(`_`,` `)})`:``,`.`]}):(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(`pre`,{className:`max-h-96 overflow-auto whitespace-pre-wrap break-words rounded-sm bg-[rgba(42,31,22,0.04)] p-3 font-mono text-xs`,children:j.patch}),j.truncated&&(0,D.jsx)(`p`,{className:`text-xs`,children:`This diff was truncated at the patch limit.`})]}),(0,D.jsxs)(`div`,{className:`space-y-2 rounded-sm border border-fawn p-3`,children:[(0,D.jsx)(`h3`,{children:`Send feedback about this file`}),(0,D.jsxs)(`label`,{className:`flex flex-col gap-1`,children:[(0,D.jsx)(`span`,{children:`Note (optional)`}),(0,D.jsx)(`textarea`,{className:`input`,rows:2,value:R,onChange:e=>z(e.target.value)})]}),(0,D.jsxs)(`label`,{className:`flex flex-col gap-1`,children:[(0,D.jsx)(`span`,{children:`Agent`}),(0,D.jsx)(`select`,{className:`input`,value:B,onChange:e=>V(e.target.value),children:e.members.map(e=>(0,D.jsx)(`option`,{value:e.id,children:e.name},e.id))})]}),(0,D.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,D.jsx)(y,{variant:`ghost`,disabled:K,onClick:()=>void Z(),children:`Preview message`}),(0,D.jsx)(y,{variant:`primary`,disabled:K||!H||!B,onClick:()=>void Q(),children:`Queue for Agent`})]}),I?(0,D.jsxs)(`p`,{className:`text-xs opacity-70`,children:[`Referenced snapshot: `,I.slice(0,12),`. It is rechecked now, and the verdict is stated in the message.`]}):(0,D.jsx)(`p`,{className:`text-xs opacity-70`,children:`No snapshot captured for this Team yet, so the feedback will say its source identity is unknown rather than implying the lines still match.`}),H&&(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(`p`,{className:`text-sm`,children:H.applicability===`current`?`This file is unchanged since the snapshot.`:H.applicability===`stale`?`This file changed since the snapshot — the selected lines may have moved.`:`Source identity unknown (${H.applicabilityReason}).`}),(0,D.jsx)(`pre`,{className:`max-h-64 overflow-auto whitespace-pre-wrap break-words rounded-sm bg-[rgba(42,31,22,0.04)] p-3 font-mono text-xs`,children:H.message})]})]})]}),(0,D.jsxs)(`section`,{className:`space-y-2`,"aria-label":`Source snapshots`,children:[(0,D.jsxs)(`div`,{className:`flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between`,children:[(0,D.jsx)(`h2`,{children:`Source snapshots`}),(0,D.jsx)(y,{variant:`ghost`,disabled:K,onClick:()=>void X(),children:`Capture snapshot`})]}),(0,D.jsx)(`p`,{className:`text-xs opacity-70`,children:`A snapshot records HEAD, the index and digests of changed files — never file content. Untracked content is only included when a path is named explicitly.`}),g.length===0&&(0,D.jsx)(`p`,{children:`No retained snapshots for this Team.`}),g.length>0&&(0,D.jsx)(`ul`,{className:`divide-y divide-fawn rounded-sm border border-fawn`,children:g.map(e=>(0,D.jsx)(`li`,{children:(0,D.jsx)(`button`,{type:`button`,onClick:()=>void ee(e.snapshotId),className:`w-full px-3 py-2 text-left font-mono text-xs hover:bg-sapphire-glow focus:bg-sapphire-glow`,children:S(e)})},e.snapshotId))}),P&&(0,D.jsxs)(`div`,{className:`space-y-1`,children:[(0,D.jsxs)(`p`,{className:`text-sm`,children:[P.id.slice(0,12),` · `,P.complete?`complete`:`incomplete — applicability unknown`,` · head `,P.head?.slice(0,12)??`(unborn)`]}),P.entries.length>0&&(0,D.jsx)(`ul`,{className:`space-y-1 font-mono text-xs`,children:P.entries.map(e=>(0,D.jsxs)(`li`,{children:[e.layer,` · `,e.kind,` · `,e.path,e.bytes===null?``:` · ${e.bytes}B`]},`${e.layer}:${e.path}`))}),P.exclusions.length>0&&(0,D.jsxs)(`p`,{className:`text-xs opacity-80`,children:[`withheld: `,P.exclusions.map(e=>`${e.path} (${e.reason})`).join(`, `)]})]})]}),e.packets?(0,D.jsx)(M,{teamId:t,view:e.packets}):null]})}export{N as component};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as e,t}from"./jsx-runtime-DGeXAQPT.js";import{t as n}from"./react-3W8R1pOO.js";import{a as r}from"./preload-helper-bztXdkDj.js";import{A as i,M as a,O as o,j as s,k as c}from"./index-Ct31TjS-.js";import{r as l}from"./Page-NV96O47A.js";import{t as u}from"./Button-ByiV6fpd.js";import{t as d}from"./TeamTabs-V17b45X5.js";var f=e(n()),p=t();function m(e){return e===`identical`?`unchanged since capture`:e===`changed`?`changed since capture — re-verify`:`not checked`}function h(e,t){return e===`not_executed`?`not run`:e===`succeeded`?`ok${t===null?``:` (exit ${t})`}`:e===`failed`?`failed${t===null?``:` (exit ${t})`}`:e.replace(/_/g,` `)}function g(){let e=o.useLoaderData(),t=o.useParams().id,[n,g]=(0,f.useState)(e.requests),[_,v]=(0,f.useState)(e.unavailable),[y,b]=(0,f.useState)(()=>e.members[0]?.id??``),[x,S]=(0,f.useState)(``),[C,w]=(0,f.useState)(`pnpm test :: unit suite`),[T,E]=(0,f.useState)(``),[D,O]=(0,f.useState)(null),[k,A]=(0,f.useState)(!1),[j,M]=(0,f.useState)({});async function N(){let e=await s({data:{id:t}});e&&(g(e.requests),v(e.unavailable))}async function P(){A(!0),O({kind:`info`,message:`Capturing the request…`});try{let e=await i({data:{id:t,recipientAgentId:y,snapshotId:x,checks:C.split(`
|
|
2
|
-
`).map(e=>e.trim()).filter(Boolean).map(e=>{let[t,n,r,i]=e.split(`::`).map(e=>e?.trim());return{command:t??``,purpose:n??``,cwd:r||`.`,timeoutMs:Math.round((i?Number(i):120)*1e3)}}),...T?{summary:T}:{}}});if(`blocker`in e&&e.blocker){O({kind:`error`,message:`Blocked: ${e.blocker.detail}`});return}if(`ok`in e&&e.ok){O({kind:`info`,message:`Captured. The specialist is admitted by the scheduler.`}),S(``),await N();return}O({kind:`error`,message:`message`in e?e.message??`Request failed`:`Request failed`})}finally{A(!1)}}async function F(e){A(!0);try{let n=await a({data:{id:t,requestId:e}});M(t=>({...t,[e]:`report`in n?m(n.report.applicability.comparison):`unavailable`}))}finally{A(!1)}}async function I(e){A(!0);try{let n=await c({data:{id:t,requestId:e}});O(n.ok?{kind:`info`,message:`Cancellation requested.`}:{kind:`error`,message:n.message??`Cancel failed`}),await N()}finally{A(!1)}}return(0,p.jsxs)(l,{children:[(0,p.jsx)(d,{teamId:t}),(0,p.jsx)(`h2`,{children:`Specialist verification`}),_?(0,p.jsx)(`p`,{className:`muted`,children:_.message}):null,D?(0,p.jsx)(`p`,{className:D.kind===`error`?`error`:`muted`,role:`status`,children:D.message}):null,(0,p.jsxs)(`section`,{"aria-label":`Request verification`,className:`card`,children:[(0,p.jsx)(`h3`,{children:`Request verification of a captured change`}),(0,p.jsxs)(`p`,{className:`muted`,children:[`Capture a source snapshot on the`,` `,(0,p.jsx)(r,{to:`/teams/$id/review`,params:{id:t},children:`Review`}),` `,`page first, then name it here with the checks you want run. Nothing runs until the daemon admits the request.`]}),(0,p.jsxs)(`label`,{children:[`Specialist`,(0,p.jsx)(`select`,{value:y,onChange:e=>b(e.target.value),children:e.members.map(e=>(0,p.jsx)(`option`,{value:e.id,children:e.name},e.id))})]}),(0,p.jsxs)(`label`,{children:[`Snapshot id`,(0,p.jsx)(`input`,{value:x,onChange:e=>S(e.target.value),placeholder:`captured snapshot id`})]}),(0,p.jsxs)(`label`,{children:[`Checks (one per line: command :: purpose [:: cwd] [:: seconds])`,(0,p.jsx)(`textarea`,{value:C,onChange:e=>w(e.target.value),rows:4})]}),(0,p.jsxs)(`label`,{children:[`Acceptance summary (optional)`,(0,p.jsx)(`input`,{value:T,onChange:e=>E(e.target.value)})]}),(0,p.jsx)(u,{variant:`primary`,disabled:k||!y||!x||!C.trim(),onClick:P,children:`Request verification`})]}),(0,p.jsxs)(`section`,{"aria-label":`Verification requests`,children:[(0,p.jsx)(`h3`,{children:`Requests`}),n.length===0?(0,p.jsx)(`p`,{className:`muted`,children:`No verification requests yet.`}):(0,p.jsx)(`ul`,{className:`list`,children:n.map(e=>{let t=[...e.attempts].sort((e,t)=>t.attemptNumber-e.attemptNumber)[0],n=new Map((t?.outcomes??[]).map(e=>[e.ordinal,e])),r=e.request.state===`pending`||e.request.state===`awaiting_approval`||e.request.state===`running`;return(0,p.jsxs)(`li`,{className:`card`,children:[(0,p.jsxs)(`div`,{children:[(0,p.jsx)(`strong`,{children:e.request.state}),` `,(0,p.jsxs)(`span`,{className:`muted`,children:[e.request.recipientAgentId,` · `,e.request.id]})]}),(0,p.jsxs)(`p`,{className:`muted`,children:[`change `,e.request.snapshot.id.slice(0,12),` ·`,` `,e.request.environment.image,` (shell `,e.request.environment.sandbox,`)`]}),(0,p.jsx)(`ul`,{children:e.checks.map(e=>{let t=n.get(e.ordinal);return(0,p.jsxs)(`li`,{children:[`[`,e.ordinal,`] `,h(t?.state??`not_executed`,t?.exitCode??null),` `,`— `,(0,p.jsx)(`code`,{children:e.command}),t?.commandId?(0,p.jsxs)(p.Fragment,{children:[` `,(0,p.jsxs)(`span`,{className:`muted`,children:[`receipt `,t.commandId.slice(0,8)]})]}):t?.receiptUnavailable?(0,p.jsxs)(p.Fragment,{children:[` `,(0,p.jsx)(`span`,{className:`muted`,children:`receipt no longer available`})]}):null]},e.ordinal)})}),t?.observedWrites?.undeclaredPaths.length?(0,p.jsxs)(`p`,{className:`muted`,children:[`wrote outside the declared output paths (`,t.observedWrites.declaredPaths.length?t.observedWrites.declaredPaths.join(`, `):`none declared`,`): `,t.observedWrites.undeclaredPaths.join(`, `),t.observedWrites.truncated?` …`:``]}):t?.observedWrites?.comparison===`unknown`?(0,p.jsx)(`p`,{className:`muted`,children:`writes: could not be established`}):null,t?.error?(0,p.jsxs)(`p`,{className:`muted`,children:[`note: `,t.error]}):null,(0,p.jsxs)(`p`,{className:`muted`,children:[`applicability: `,j[e.request.id]??`not checked`]}),(0,p.jsx)(u,{variant:`ghost`,disabled:k,onClick:()=>F(e.request.id),children:`Check applicability`}),` `,r?(0,p.jsx)(u,{variant:`danger`,disabled:k,onClick:()=>I(e.request.id),children:`Cancel`}):null]},e.request.id)})})]})]})}export{g as component};
|