@wrongstack/webui 1.0.16 → 1.0.17
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/assets/{AgentRosterView-DMxOg0xX.js → AgentRosterView-CV9MW-4M.js} +4 -4
- package/dist/assets/AnalyticsDashboard-30brLbuz.js +1 -0
- package/dist/assets/{AudienceMemoryPanel-CyfpggCK.js → AudienceMemoryPanel-bKVydKg8.js} +1 -1
- package/dist/assets/ChangesView-Cv6svx-V.js +1 -0
- package/dist/assets/{ChimeraReviewsView-DencEMIY.js → ChimeraReviewsView-DLTrEJDS.js} +1 -1
- package/dist/assets/{ChronicleDashboard-CvDPqZKE.js → ChronicleDashboard-DhgWbaXj.js} +1 -1
- package/dist/assets/{CodeEditor-s0lHP0DZ.js → CodeEditor-JlvMbECd.js} +2 -2
- package/dist/assets/CodeMap-4swT3FIw.js +1 -0
- package/dist/assets/{CronJobsPanel-LoDmuRHl.js → CronJobsPanel-LSpFBceD.js} +1 -1
- package/dist/assets/{DeadCodeScanPanel-ByhAW_bl.js → DeadCodeScanPanel-ZRNNV02b.js} +1 -1
- package/dist/assets/{DebugDashboard-BP1Mia-L.js → DebugDashboard-DlH0QNPX.js} +1 -1
- package/dist/assets/{DesignGalleryView-taDxRN63.js → DesignGalleryView-yZgVVEg9.js} +1 -1
- package/dist/assets/{GoalView-CcLxMYXe.js → GoalView-D1gxZre2.js} +1 -1
- package/dist/assets/{KanbanView-C-K6OBw8.js → KanbanView-Bh0T3p3J.js} +1 -1
- package/dist/assets/MailboxDetailView-C4lEW3f8.js +1 -0
- package/dist/assets/{MemoryDrawer-CuFQypU-.js → MemoryDrawer-arujfDSW.js} +1 -1
- package/dist/assets/MemoryManager-BmQYIRhD.js +1 -0
- package/dist/assets/ProcessMonitor-ByW-VKsX.js +1 -0
- package/dist/assets/{PromptJournalView-CdC4ldrv.js → PromptJournalView-0cHPeYXa.js} +1 -1
- package/dist/assets/{ProviderTestView-Dy7EQEI9.js → ProviderTestView-CQlwC6HG.js} +1 -1
- package/dist/assets/{QueuePanel-DE9ySxkR.js → QueuePanel-DJeK7xCh.js} +1 -1
- package/dist/assets/{RefreshDebugView-Dbq_bHwj.js → RefreshDebugView-BfOjHodq.js} +1 -1
- package/dist/assets/RepositoryHistoryView-BYPPu5uv.js +2 -0
- package/dist/assets/RequirementIntakeView-CEwUB7VD.js +1 -0
- package/dist/assets/{SageTabs-Dwbux3im.js → SageTabs-Bt2kzPNB.js} +2 -2
- package/dist/assets/{SddFlowGraph-BZkvlaQ1.js → SddFlowGraph-CZSwcAtS.js} +1 -1
- package/dist/assets/SddHub-Cc79Ob7A.js +2 -0
- package/dist/assets/{SessionInspectView-Bak1hK82.js → SessionInspectView-BasxJ_5x.js} +1 -1
- package/dist/assets/{SessionList-xXaygO5X.js → SessionList-C9MRSj_-.js} +1 -1
- package/dist/assets/{SessionsDashboard-CaSXukNy.js → SessionsDashboard-BK95Zp6f.js} +1 -1
- package/dist/assets/{SetupScreen-BSEF1air.js → SetupScreen-rPKsBa9Z.js} +1 -1
- package/dist/assets/{SkillDetailView-OdtAJM43.js → SkillDetailView-LkJyIBPb.js} +1 -1
- package/dist/assets/{TechStackView-BUIbnU2F.js → TechStackView-xVR5dsSn.js} +1 -1
- package/dist/assets/{TerminalPanel-CfoKklMj.js → TerminalPanel-CBEZTuvV.js} +1 -1
- package/dist/assets/{activity-Bk7N_ZW5.js → activity-CDHIWIPJ.js} +4 -4
- package/dist/assets/{activity-BazcMhZZ.js → activity-CInOo57V.js} +4 -4
- package/dist/assets/{activity-VTOCX_jm.js → activity-D6XfckyA.js} +4 -4
- package/dist/assets/{activity-BWPWyp3o.js → activity-DapbBEf6.js} +4 -4
- package/dist/assets/{activity-DBsMiPsa.js → activity-E8vCWdG2.js} +4 -4
- package/dist/assets/{activity-Cmq0z33p.js → activity-e8OIpNGJ.js} +4 -4
- package/dist/assets/{activity-B-GYDVn2.js → activity-oTJsNfZu.js} +4 -4
- package/dist/assets/button-BbeB5Qm8.js +1 -0
- package/dist/assets/{chat-store-DNRce6sE.js → chat-store-BDVZSmod.js} +1 -1
- package/dist/assets/common-BXosnbIt.js +1 -0
- package/dist/assets/common-CzfPgMjC.js +1 -0
- package/dist/assets/common-DDDPz7Dv.js +1 -0
- package/dist/assets/common-DYx9oSoC.js +1 -0
- package/dist/assets/common-DZ-05t4z.js +1 -0
- package/dist/assets/common-MjX8fcng.js +1 -0
- package/dist/assets/common-ipsuLC3n.js +1 -0
- package/dist/assets/{config-store-BAUadwHd.js → config-store-mWuYCild.js} +1 -1
- package/dist/assets/dialog-b-Ai37sa.js +1 -0
- package/dist/assets/empty-state-pfuS5znr.js +1 -0
- package/dist/assets/{i18n-CbyUyl6G.js → i18n-CvJB4U4z.js} +3 -3
- package/dist/assets/{index-3TGBKeBP.js → index-DLjaZSCH.js} +80 -80
- package/dist/assets/index-DiX5j910.css +1 -0
- package/dist/assets/input-BA6D2L3K.js +1 -0
- package/dist/assets/mailbox-store-ZQO_Rv6E.js +1 -0
- package/dist/assets/{roster-ws-z8DKquaN.js → roster-ws-BRANim2Y.js} +1 -1
- package/dist/assets/stores-D5loyGLL.js +7 -0
- package/dist/assets/{vector-memory-panel-DZFEwwGM.js → vector-memory-panel-YWv6xcza.js} +1 -1
- package/dist/assets/view-navigation-DTs4cSQ6.js +1 -0
- package/dist/components/CodeMap.d.ts +1 -1
- package/dist/components/CodeMapCanvasSurface.d.ts +2 -1
- package/dist/components/ConfirmModal.d.ts +10 -0
- package/dist/components/FileExplorer/FileExplorerModals.d.ts +4 -5
- package/dist/components/MainViewSlot.d.ts +1 -1
- package/dist/components/MemoryManager/useMemoryManagerState.d.ts +2 -2
- package/dist/components/PanelSuspense.d.ts +0 -4
- package/dist/components/RepositoryHistoryView.d.ts +1 -1
- package/dist/components/RequirementIntakeView.d.ts +22 -1
- package/dist/components/SddHub.d.ts +3 -3
- package/dist/components/ui/dialog.d.ts +1 -1
- package/dist/components/ui/dropdown-menu.d.ts +1 -1
- package/dist/components/ui/empty-state.d.ts +1 -1
- package/dist/components/ui/tabs.d.ts +1 -1
- package/dist/index.html +12 -12
- package/dist/index.js +1989 -1473
- package/dist/lib/view-navigation.d.ts +2 -2
- package/dist/stores/index.d.ts +1 -1
- package/dist/stores/sdd-wizard-store.d.ts +7 -0
- package/package.json +9 -9
- package/dist/assets/AnalyticsDashboard-DGQk1vSi.js +0 -1
- package/dist/assets/ChangesView-C8x8tmpi.js +0 -1
- package/dist/assets/CodeMap-6mmDO9gJ.js +0 -1
- package/dist/assets/MailboxDetailView-N00dLbpr.js +0 -1
- package/dist/assets/MemoryManager-Bmz62aEV.js +0 -1
- package/dist/assets/ProcessMonitor-CkAtUjrR.js +0 -1
- package/dist/assets/RepositoryHistoryView-D0ynYRgu.js +0 -2
- package/dist/assets/RequirementIntakeView-CPRtncuJ.js +0 -1
- package/dist/assets/SddHub-CoRKeq7Q.js +0 -2
- package/dist/assets/button-9ewV4TF3.js +0 -1
- package/dist/assets/common-5rSj2oHt.js +0 -1
- package/dist/assets/common-B5Uslzr2.js +0 -1
- package/dist/assets/common-BnhmJl6b.js +0 -1
- package/dist/assets/common-CmkkiJUR.js +0 -1
- package/dist/assets/common-CpZ-DoXd.js +0 -1
- package/dist/assets/common-Ct-Iodid.js +0 -1
- package/dist/assets/common-D9w3BalB.js +0 -1
- package/dist/assets/dialog-C7EIBM_2.js +0 -1
- package/dist/assets/empty-state-5YP1rmE6.js +0 -1
- package/dist/assets/index-NBVZNAcU.css +0 -1
- package/dist/assets/input-ag1CrUiS.js +0 -1
- package/dist/assets/mailbox-store-C49LeBj8.js +0 -1
- package/dist/assets/stores-RkHrTaRO.js +0 -7
- package/dist/assets/view-navigation-DHtNFXIl.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{i as t,t as n}from"./react-core-wiHys0m2.js";import{t as r}from"./utils-CKsqCaP8.js";var i=e(t(),1),a=n(),o=i.forwardRef(({className:e,type:t,...n},i)=>(0,a.jsx)(`input`,{type:t,className:r(`flex h-10 min-w-0 w-full rounded-none border border-input bg-background px-3 py-2 text-sm transition-colors hover:border-foreground/30 ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 aria-invalid:border-destructive aria-invalid:focus-visible:ring-destructive disabled:cursor-not-allowed disabled:opacity-50`,e),ref:i,...n}));o.displayName=`Input`;export{o as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{vo as e}from"./vendor-V3ydTHqN.js";var t=e()(e=>({snapshot:null,agentText:``,error:null,startedRunId:null,activeHubTab:`project`,prefilledGoal:``,setSnapshot:t=>{if(t.discarded||t.phase===`idle`&&!t.sessionId){e({snapshot:null,agentText:``,error:null});return}e({snapshot:t,error:null,...t.lastAgentText?{agentText:t.lastAgentText}:{}})},setAgentText:t=>e({agentText:t}),setError:t=>e({error:t}),setStartedRunId:t=>e({startedRunId:t}),setActiveHubTab:t=>e({activeHubTab:t}),setPrefilledGoal:t=>e({prefilledGoal:t}),reset:()=>e({snapshot:null,agentText:``,error:null,startedRunId:null,activeHubTab:`project`,prefilledGoal:``})})),n=100,r=50,i=216e5,a=`@session:`;function o(e){if(e===`*`||e===`all`)return{scope:`project`};if(e.startsWith(a)){let t=e.slice(9);return t.length===0?{scope:`agent`}:{scope:`session`,recipientSessionId:t}}return{scope:`agent`}}var s=e()(e=>({messages:[],agents:[],lastCompaction:null,setMessages:t=>e({messages:t.map(e=>{if(e.scope!==void 0)return e;let t=o(e.to);return{...e,...t}}).sort((e,t)=>(Date.parse(t.timestamp)||0)-(Date.parse(e.timestamp)||0)).slice(0,n)}),setAgents:t=>e(()=>{let e=Date.now()-i,n=t.filter(t=>{if(t.online)return!0;let n=Date.parse(t.lastSeenAt);return!Number.isFinite(n)||n>=e});return n.length<=r?{agents:n}:{agents:[...n].sort((e,t)=>{let n=Date.parse(e.lastSeenAt)||0;return(Date.parse(t.lastSeenAt)||0)-n}).slice(0,r)}}),setLastCompaction:t=>e({lastCompaction:t}),removeAgent:t=>e(e=>({agents:e.agents.filter(e=>e.agentId!==t)}))}));function c(e){return e.messages.filter(e=>!e.completed&&(e.readByCount??0)===0).length}export{t as i,c as n,s as r,o as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{K as e}from"./config-store-
|
|
1
|
+
import{K as e}from"./config-store-mWuYCild.js";var t=new Map,n=15e3;function r(e){return e.startsWith(`agent-roster.`)&&e.length>13?e.slice(13):void 0}function i(i,a,o){return new Promise((s,c)=>{let l=e(),u=!1,d=[],f=e=>{if(!u){u=!0;for(let e of d)e();d=[],t.delete(i),e()}},p=e=>{let t=e,n=t&&typeof t==`object`?t.payload??t:e;if(n&&typeof n==`object`&&`error`in n&&typeof n.error==`string`){f(()=>c(Error(n.error)));return}f(()=>s(n))};l.connect().then(()=>{if(u)return;let e=t.get(i);e&&(e.cleanup(),e.reject(Error(`Roster request "${i}" superseded by new request`)),t.delete(i)),t.set(i,{reject:e=>f(()=>c(e)),cleanup:()=>{for(let e of d)e();d=[],u||t.delete(i)}});let s=l.on(i,p);d.push(s);let m=r(i);if(m){let e=l.on(m,p);d.push(e)}if(o){if(o.aborted){f(()=>c(new DOMException(`Aborted`,`AbortError`)));return}let e=()=>f(()=>c(new DOMException(`Aborted`,`AbortError`)));o.addEventListener(`abort`,e,{once:!0}),d.push(()=>o.removeEventListener(`abort`,e))}let h=setTimeout(()=>f(()=>c(Error(`Roster request "${i}" timed out`))),n);d.push(()=>clearTimeout(h)),l.send({type:i,payload:a})}).catch(e=>f(()=>c(e)))})}export{i as t};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import{Dt as e,K as t,Nt as n,wt as r,zt as i}from"./config-store-mWuYCild.js";import{_o as a,bo as o,vo as s,yo as c}from"./vendor-V3ydTHqN.js";import"./i18n-CvJB4U4z.js";import"./mailbox-store-ZQO_Rv6E.js";import"./ui-store-DC3mkswy.js";import"./chat-store-BDVZSmod.js";import"./codemap-activity-store-Ha7XbGgq.js";var l=`__bug_hunt_continuation_pending__`,u=s()(a((e,t)=>({runs:{},start:(t,n)=>e(e=>({runs:{...e.runs,[t]:n}})),ownsRequest:(e,n)=>{let r=t().runs[e];return!!(r&&n!==void 0&&r.requestId!==null&&r.requestId!==l&&r.requestId===n)},advance:(n,r)=>{let i=t().runs[n];if(!i||i.requestId===l||r!==void 0&&i.requestId!==null&&i.requestId!==r)return null;if(i.currentRound>=i.totalRounds)return t().clear(n),null;let a={...i,currentRound:i.currentRound+1,requestId:l};return e(e=>({runs:{...e.runs,[n]:a}})),a},setRequestId:(t,n)=>e(e=>{let r=e.runs[t];return!r||r.requestId!==l?e:{runs:{...e.runs,[t]:{...r,requestId:n}}}}),stop:(e,n)=>{let r=t().runs[e];!r||n&&r.requestId!==null&&r.requestId!==n||t().clear(e)},recover:(t,n)=>e(e=>({runs:{...e.runs,[t]:{...n,requestId:null}}})),clear:t=>e(e=>{let{[t]:n,...r}=e.runs;return{runs:r}})}),{name:`wrongstack-bug-hunt-runs`,partialize:e=>({runs:e.runs})})),d=8;function f(t,a={}){let s=Math.max(1,a.max??d),l=new Map,u=e=>e&&e.length>0?e:r,f=e=>{let n=u(e),r=l.get(n);if(r)return r;for(;l.size>=s;){let e=[...l.keys()].find(e=>e!==n);if(e===void 0)break;l.delete(e)}let i=o(t);return l.set(n,i),i},p=(e=>{let t=c(i,e=>e.activeSessionId);return c(f(t),e)});return p.getState=()=>f(e()).getState(),p.setState=t=>f(e()).setState(t),p.subscribe=t=>f(e()).subscribe(t),p.for=f,p.dropSession=e=>{l.delete(u(e))},p.sessionIds=()=>[...l.keys()],n(e=>p.dropSession(e)),p}function p(e,t){return t>=100?`danger`:`warning`}function m(e,t){switch(e){case`budget.threshold_reached`:{let e=t,n=e.limit>0?Math.round(e.used/e.limit*100):0;return`${e.subagentId} [${e.kind}] ${n}% (${e.used}/${e.limit})`}case`budget.decision`:{let e=t;return`${e.subagentId} [${e.kind}] → ${e.decision}`}case`consensus.vote_initiated`:{let e=t;return`Vote: "${e.title}" — ${e.eligible.length} voters`}case`consensus.vote_cast`:{let e=t;return`${e.voterId} voted ${e.value}`}case`consensus.vote_resolved`:{let e=t;return`${e.result} — ✅${e.approveCount} ❌${e.rejectCount}`}case`task.pending`:return`Task queued: "${t.description.slice(0,60)}"`;case`task.started`:{let e=t;return`${e.subagentId} started ${e.taskId}`}case`task.completed`:{let e=t;return`Task ${e.taskId} ${e.status} (${e.durationMs}ms)`}case`task.failed`:{let e=t;return`Task ${e.taskId} failed: ${e.error.slice(0,60)}`}case`subagent.budget_extended`:{let e=t;return`${e.subagentId} [${e.kind}] extended → ${e.extendedTo}ms`}default:return e}}var h=200,ee=50,g=300,_=200,v=100;function y(e,t,n){if(!(e.size<=t)){if(n)for(let[r,i]of e){if(e.size<=t)break;n(i)&&e.delete(r)}for(let n of e.keys()){if(e.size<=t)break;e.delete(n)}}}var b=f(e=>({coordinatorStatus:`idle`,subagents:new Map,events:[],consensusVotes:new Map,tasks:new Map,taskCounts:{pending:0,running:0,completed:0,failed:0},budgetAlerts:[],lastUpdated:Date.now(),setCoordinatorStatus:(t,n)=>e(e=>({coordinatorStatus:t,coordinatorMode:n,lastUpdated:Date.now()})),updateCoordinatorStats:t=>e(e=>{let n=new Map(e.subagents);for(let e of t.subagentStatuses??[]){let t=n.get(e.id);n.set(e.id,{id:e.id,name:e.name,role:t?.role??`agent`,status:e.status,currentTask:e.currentTask,budgetLimits:t?.budgetLimits,budgetUsage:t?.budgetUsage,lastSeen:t?.lastSeen??Date.now()})}return y(n,_,e=>e.status===`stopped`),{subagents:n,taskCounts:{pending:t.pending,running:t.inFlight,completed:t.completed,failed:0},lastUpdated:Date.now()}}),updateSubagentBudget:(t,n)=>e(e=>{let r=new Map(e.subagents),i=r.get(t);return r.set(t,{id:t,name:i?.name??t,role:i?.role??`agent`,status:i?.status??`idle`,...i,...n,lastSeen:Date.now()}),y(r,_,e=>e.status===`stopped`),{subagents:r,lastUpdated:Date.now()}}),pushEvent:(t,n,r,i,a)=>e(e=>{let o=n.kind??t,s=(t.includes(`budget`)||t.includes(`threshold`))&&typeof n.limit==`number`&&n.limit>0?Math.round(n.used/n.limit*100):void 0,c=s===void 0?t.includes(`consensus.vote_resolved`)?`info`:t.includes(`consensus.vote_initiated`)?`warning`:`info`:s>=100?`danger`:s>=85?`warning`:`info`;return{events:[{id:`${r}-${t}`,ts:r,type:t,subagentId:i,taskId:a,payload:n,kind:o,level:c,message:m(t,n)},...e.events].slice(0,h),lastUpdated:Date.now()}}),pushConsensusVote:(t,n,r)=>e(e=>{let i=new Map(e.consensusVotes);return i.set(t,{changeId:t,title:n,status:`pending`,eligible:r,votes:[],approveCount:0,rejectCount:0,abstainCount:0,expiresAt:Date.now()+3e5}),y(i,v,e=>e.status!==`pending`),{consensusVotes:i,lastUpdated:Date.now()}}),recordConsensusVote:(t,n,r,i)=>e(e=>{let a=new Map(e.consensusVotes),o=a.get(t);if(!o)return{};let s={...o,votes:[...o.votes.filter(e=>e.agentId!==n),{agentId:n,agentName:r,value:i,votedAt:Date.now()}],approveCount:i===`approve`?o.approveCount+1:o.approveCount,rejectCount:i===`reject`?o.rejectCount+1:o.rejectCount,abstainCount:i===`abstain`?o.abstainCount+1:o.abstainCount};return a.set(t,s),{consensusVotes:a,lastUpdated:Date.now()}}),resolveConsensusVote:(t,n,r,i)=>e(e=>{let a=new Map(e.consensusVotes),o=a.get(t);return o?(a.set(t,{...o,status:n,approveCount:r,rejectCount:i,resolvedAt:Date.now()}),{consensusVotes:a,lastUpdated:Date.now()}):{}}),pushTaskPending:(t,n,r)=>e(e=>{let i=new Map(e.tasks);return i.set(t,{id:t,description:n,status:`pending`,priority:r,queuedAt:Date.now()}),y(i,g,e=>e.status===`completed`||e.status===`failed`),{tasks:i,taskCounts:{...e.taskCounts,pending:e.taskCounts.pending+1},lastUpdated:Date.now()}}),startTask:(t,n)=>e(e=>{let r=new Map(e.tasks),i=r.get(t);return i?r.set(t,{...i,status:`running`,subagentId:n,startedAt:Date.now()}):r.set(t,{id:t,description:``,status:`running`,subagentId:n,startedAt:Date.now()}),{tasks:r,taskCounts:{...e.taskCounts,pending:Math.max(0,e.taskCounts.pending-1),running:e.taskCounts.running+1},lastUpdated:Date.now()}}),completeTask:(t,n,r)=>e(e=>{let i=new Map(e.tasks),a=i.get(t);return a&&i.set(t,{...a,status:n,completedAt:Date.now(),durationMs:r}),y(i,g,e=>e.status===`completed`||e.status===`failed`),{tasks:i,taskCounts:{...e.taskCounts,running:Math.max(0,e.taskCounts.running-1),completed:n===`completed`?e.taskCounts.completed+1:e.taskCounts.completed,failed:n===`failed`?e.taskCounts.failed+1:e.taskCounts.failed},lastUpdated:Date.now()}}),failTask:(t,n)=>e(e=>{let r=new Map(e.tasks),i=r.get(t);return i&&r.set(t,{...i,status:`failed`,error:n,completedAt:Date.now()}),y(r,g,e=>e.status===`completed`||e.status===`failed`),{tasks:r,taskCounts:{...e.taskCounts,running:Math.max(0,e.taskCounts.running-1),failed:e.taskCounts.failed+1},lastUpdated:Date.now()}}),recordBudgetDecision:(t,n,r,i)=>e(e=>{let a=new Map;for(let t of e.budgetAlerts){let e=`${t.subagentId}:${t.kind}`;a.has(e)||a.set(e,t)}let o=`${t}:${n}`,s=a.get(o);return s&&a.set(o,{...s,decision:r,newLimit:i,level:r===`extend`?`warning`:`danger`}),{budgetAlerts:Array.from(a.values()),lastUpdated:Date.now()}}),recordBudgetAlert:(t,n,r,i)=>e(e=>{let a=`${Date.now()}-${t}-${n}`,o=i>0?Math.round(r/i*100):0;return{budgetAlerts:[{id:a,ts:Date.now(),subagentId:t,kind:n,level:p(n,o),used:r,limit:i,pct:o},...e.budgetAlerts].slice(0,ee),lastUpdated:Date.now()}}),recordBudgetExtended:(t,n,r)=>e(e=>{let i=new Map(e.subagents),a=i.get(t);if(a?.budgetLimits){let e={...a.budgetLimits};n===`timeout`&&r&&(e.timeoutMs=r),n===`iterations`&&(e.maxIterations=r),n===`tool_calls`&&(e.maxToolCalls=r),i.set(t,{...a,budgetLimits:e,lastSeen:Date.now()})}return{subagents:i,lastUpdated:Date.now()}}),clear:()=>e({coordinatorStatus:`idle`,coordinatorMode:void 0,subagents:new Map,events:[],consensusVotes:new Map,tasks:new Map,taskCounts:{pending:0,running:0,completed:0,failed:0},budgetAlerts:[],lastUpdated:Date.now()})}),{max:4});function x(e,t){return{seatId:C(e.seatId)??`seat`,persona:C(e.persona)??`voter`,status:C(e.status)??`valid`,optionId:C(e.optionId),stance:C(e.stance),rationale:C(e.rationale),providerId:C(e.providerId),model:C(e.model),veto:T(e.veto),weight:w(e.weight),durationMs:w(e.durationMs),error:C(e.error),round:w(e.round),changed:T(e.changed),at:w(e.at)??t}}function te(e){if(e.phase===`voting`){let t=e.seats.reduce((e,t)=>Math.max(e,t.round??1),1);return`voting${t>1?` r${t}`:``} · ${e.seats.length} seat${e.seats.length===1?``:`s`} in`}let t=e.configuredSeatCount??e.seats.length,n=[e.resolution??e.status??`resolved`,`${e.validVoteCount??e.seats.length}/${t} seats`,`${e.distinctTargetCount??0} distinct target${e.distinctTargetCount===1?``:`s`}`];if(e.rounds!==void 0&&e.rounds>1){let t=e.deliberationChanges??0;n.push(`${e.rounds} rounds${t>0?`, ${t} changed`:`, none changed`}`)}return e.judgeUsed&&n.push(`judge${e.judgeLabel?` ${e.judgeLabel}`:``}`+(e.judgeIsVoter?` (also a voter)`:``)),e.durationMs!==void 0&&n.push(`${Math.round(e.durationMs/100)/10}s`),e.totalTokens&&n.push(`${e.totalTokens} tok`),n.join(` · `)}function S(e,t,n,r){let i=e.findIndex(e=>e.requestId===t);if(i>=0){let t=e[i],n=[...e];return n[i]=r(t),n}return[r({requestId:t,phase:`voting`,startedAt:n,seats:[]}),...e].slice(0,50)}var ne=f(e=>({panels:[],recordVote:t=>{let n=C(t.requestId);if(!n)return;let r=Date.now();e(e=>({panels:S(e.panels,n,r,e=>{let n=C(t.seatId)??`seat`,i=x(t,r);return e.seats.some(e=>e.seatId===n)?{...e,seats:e.seats.map(e=>e.seatId===n?i:e)}:e.phase===`resolved`?{requestId:e.requestId,phase:`voting`,startedAt:r,seats:[i],question:e.question}:{...e,seats:[...e.seats,i]}})}))},recordResolution:t=>{let n=C(t.requestId);if(!n)return;let r=Date.now(),i=t.usage;e(e=>({panels:S(e.panels,n,r,e=>({...e,phase:`resolved`,resolvedAt:w(t.at)??r,status:C(t.status),resolution:C(t.resolution),optionId:C(t.optionId),reason:C(t.reason),configuredSeatCount:w(t.configuredSeatCount),validVoteCount:w(t.validVoteCount),distinctTargetCount:w(t.distinctTargetCount),judgeUsed:T(t.judgeUsed),judgeLabel:C(t.judgeLabel),judgeIsVoter:T(t.judgeIsVoter),rounds:w(t.rounds),deliberationChanges:w(t.deliberationChanges),totalTokens:w(i?.totalTokens),durationMs:w(i?.durationMs),warnings:Array.isArray(t.warnings)?t.warnings.filter(e=>typeof e==`string`):void 0}))}))},noteQuestion:(t,n)=>{let r=n.trim();t&&r&&e(e=>{let n=e.panels.findIndex(e=>e.requestId===t);if(n<0)return e;let i=e.panels[n];if(i.question===r)return e;let a=[...e.panels];return a[n]={...i,question:r},{panels:a}})},clear:()=>e({panels:[]})}));function C(e){return typeof e==`string`&&e.trim()?e:void 0}function w(e){return typeof e==`number`&&Number.isFinite(e)?e:void 0}function T(e){return typeof e==`boolean`?e:void 0}var E=s()(e=>({snapshot:null,lastFiredAt:{},revision:0,setSnapshot:t=>e(e=>({snapshot:t,revision:e.revision+1})),recordFired:(t,n)=>e(e=>({lastFiredAt:{...e.lastFiredAt,[t]:n},revision:e.revision+1})),clear:()=>e({snapshot:null,lastFiredAt:{},revision:0})}));function D(){return`ref_${Date.now()}_${Math.random().toString(36).slice(2,8)}`}function O(e){switch(e.split(`.`).pop()?.toLowerCase()??``){case`ts`:case`tsx`:return`typescript`;case`js`:case`jsx`:return`javascript`;case`json`:return`json`;case`md`:case`mdx`:return`markdown`;case`css`:return`css`;case`scss`:return`scss`;case`html`:case`htm`:return`html`;case`py`:return`python`;case`rs`:return`rust`;case`go`:return`go`;case`rb`:return`ruby`;case`java`:return`java`;case`c`:return`c`;case`cpp`:case`hpp`:return`cpp`;case`h`:return`c`;case`sh`:case`bash`:return`bash`;case`sql`:return`sql`;case`yaml`:case`yml`:return`yaml`;case`toml`:return`toml`;default:return``}}function k(e,t=20,n=2e3){let r=e.split(`
|
|
2
|
+
`),i=!1,a=e;return r.length>t&&(a=r.slice(0,t).join(`
|
|
3
|
+
`),i=!0),a.length>n&&(a=a.slice(0,n),i=!0),i&&(a=a.replace(/\s+$/,``)+`
|
|
4
|
+
…`),{text:a,truncated:i}}function A(e){return e.length===0?``:[`[File reference contract]`,`Before answering or modifying anything related to these references, use the available file-reading tools to read each complete project file:`,...e.map(e=>`- ${JSON.stringify(e)}`),`If a read is paginated or chunked, continue on the same path until EOF. Do not treat an inline preview as the complete file.`].join(`
|
|
5
|
+
`)}function re(e,t){if(e.length===0)return``;let n=[],r=new Set;for(let i of e){if(i.kind===`file`){let e=t?.[i.path];if(e){let t=O(i.path),a=t?`\`\`\`${t}`:"```",o=k(e),s=o.truncated?`preview; complete read required`:`entire file`;n.push(`${a}\n// ${i.path} (${s})\n${o.text}\n\`\`\``),o.truncated&&r.add(i.path)}else n.push(`@${i.path}`),r.add(i.path);continue}let e=O(i.path),a=e?`\`\`\`${e}`:"```",o=`// ${i.path}:${i.startLine}-${i.endLine}`,s=k(i.kind===`snippet`?i.content:i.preview);n.push(`${a}\n${o}\n${s.text}\n\`\`\``),s.truncated&&r.add(i.path)}let i=A([...r]);return[...n,i].filter(Boolean).join(`
|
|
6
|
+
|
|
7
|
+
`)}var ie=s()((e,t)=>({refs:[],addRef:n=>{let r=t();if(n.kind===`file`&&r.refs.find(e=>e.kind===`file`&&e.path===n.path))return;let i={...n,id:D()};e({refs:[...r.refs,i]})},removeRef:t=>{e(e=>({refs:e.refs.filter(e=>e.id!==t)}))},clearRefs:()=>e({refs:[]})})),ae=s()(e=>({info:null,setInfo:t=>e({info:t}),clear:()=>e({info:null})})),j=s()((e,t)=>({result:null,loading:!1,currentSeq:0,setResult:t=>e(e=>t.reqSeq===e.currentSeq?{result:t,loading:!1}:{}),setLoading:()=>e({loading:!0,result:null}),clear:()=>e({result:null,loading:!1}),nextSeq:()=>{let n=t().currentSeq+1;return e({currentSeq:n}),n}})),M=s()(e=>({phases:[],activePhaseId:null,overallPercent:0,autonomous:!1,title:null,goal:null,status:`idle`,multiBoard:!1,lastEvent:null,lastError:null,graphs:[],progress:null,setState:t=>e(e=>({phases:t.phases??e.phases,activePhaseId:t.activePhaseId===void 0?e.activePhaseId:t.activePhaseId,overallPercent:t.overallPercent??e.overallPercent,autonomous:t.autonomous??e.autonomous,title:t.title===void 0?e.title:t.title,goal:t.goal===void 0?e.goal:t.goal,status:t.status??e.status,multiBoard:t.multiBoard??e.multiBoard,lastEvent:t.lastEvent===void 0?e.lastEvent:t.lastEvent,lastError:t.lastError===void 0?e.lastError:t.lastError,graphs:t.graphs??e.graphs,progress:t.progress===void 0?e.progress:t.progress})),clear:()=>e({phases:[],activePhaseId:null,overallPercent:0,autonomous:!1,title:null,goal:null,status:`idle`,multiBoard:!1,lastEvent:null,lastError:null,graphs:[],progress:null}),hydrateFromServer:e=>{e({type:`goal.list`}),e({type:`goal.state`})}}));function N(e){if(!e||typeof e!=`object`||Array.isArray(e))return!1;let t=e;return!(typeof t.iteration!=`number`||!Number.isFinite(t.iteration)||t.task!==void 0&&typeof t.task!=`string`||t.status!==void 0&&typeof t.status!=`string`||t.progress!==void 0&&(typeof t.progress!=`number`||!Number.isFinite(t.progress))||t.progressNote!==void 0&&typeof t.progressNote!=`string`||t.timestamp!==void 0&&typeof t.timestamp!=`string`)}function P(e){return!e||typeof e.goal!=`string`||!e.goal.trim()?null:{goal:e.goal,refinedGoal:typeof e.refinedGoal==`string`?e.refinedGoal:void 0,goalState:[`active`,`paused`,`completed`,`failed`,`abandoned`].includes(e.goalState)?e.goalState:`active`,iterations:typeof e.iterations==`number`?e.iterations:0,progress:typeof e.progress==`number`?e.progress:0,progressNote:typeof e.progressNote==`string`?e.progressNote:void 0,progressTrend:e.progressTrend===`accelerating`?`up`:e.progressTrend===`stalling`?`down`:e.progressTrend===`steady`?`stable`:void 0,deliverables:Array.isArray(e.deliverables)?e.deliverables.map((e,t)=>typeof e==`string`?{id:`d${t}`,text:e,status:/^\[[x✓]\]|✅|\(done\)/i.test(e)?`done`:`pending`}:e):void 0,journal:Array.isArray(e.journal)?e.journal.filter(N):void 0,lastTask:typeof e.lastTask==`string`?e.lastTask:void 0,lastStatus:typeof e.lastStatus==`string`?e.lastStatus:void 0}}var F=s()(e=>({goal:null,setGoal:t=>e({goal:P(t)}),clear:()=>e({goal:null}),appendJournalEntry:t=>e(e=>e.goal?{goal:{...e.goal,iterations:Math.max(e.goal.iterations,t.iteration),lastTask:t.task??e.goal.lastTask,lastStatus:t.status??e.goal.lastStatus,journal:[t,...e.goal.journal??[]].slice(0,200)}}:e),refresh:()=>{try{t()?.send?.({type:`goal-state.get`})}catch{}}}));function I(e,t){return e.presence?.some(e=>e.active)===!0||e.tags?.some(e=>e.startsWith(`session:`)&&t.includes(e.slice(8)))===!0}var L=3e5,R=s()((e,t)=>({boards:[],boardTotal:0,activeBoardTotal:0,orphanedBoardTotal:0,activeBoardId:null,activeBoard:null,loading:!1,lastOutboundAction:null,error:null,queueHealth:null,supervisorSnapshot:null,workbench:null,verificationActivity:{},boardHistory:[],fetchBoardHistory:e=>{t().sendKanban(`kanban.board.history`,{boardId:e})},setLoading:t=>e({loading:t}),sendKanban:(t,n)=>(e({loading:!0,lastOutboundAction:t}),t),transitionTask:(t,n,r,i)=>{let a=`kanban.task.transition`;return e({loading:!0,lastOutboundAction:a}),a},dispatchTask:(t,n,r)=>{let i=`kanban.task.dispatch`;return e({loading:!0,lastOutboundAction:i}),i},moveTask:(t,n,r)=>{let i=`kanban.task.move`;return e({loading:!0,lastOutboundAction:i}),i},removeTask:(t,n)=>{let r=`kanban.task.remove`;return e({loading:!0,lastOutboundAction:r}),r},setActiveBoardId:t=>e({activeBoardId:t,queueHealth:null,supervisorSnapshot:null,verificationActivity:{}}),setError:t=>e({error:t}),setQueueHealth:t=>e({queueHealth:t}),handleResult:(n,r)=>{if(!r.success){e({loading:!1,error:r.error??`Kanban request failed`});return}let i=r.data;if((n===`kanban.supervisor.status`||n===`kanban.supervisor.audit`)&&i){e({supervisorSnapshot:i,loading:!1,error:null});return}if(n===`kanban.health`&&r.data){e({queueHealth:r.data,loading:!1,error:null});return}if(n===`kanban.workbench`&&r.data){e({workbench:r.data,loading:!1,error:null});return}if(n===`kanban.list`){let t=U(i)?i:null,n=t?t.items:Array.isArray(i)?i:[];e({boards:n,boardTotal:t?.total??n.length,activeBoardTotal:t?.activeTotal??n.filter(e=>W(e)).length,orphanedBoardTotal:t?.orphanedTotal??n.filter(e=>!W(e)).length,loading:!1,error:null});return}if(n===`kanban.delete`){let n=t().activeBoardId,r=i,a=r?.removed===!0,o=r?.boardId??n;e(e=>{let t=a?e.boards.find(e=>e.id===o):void 0,n=t?W(t):void 0;return{boards:a?e.boards.filter(e=>e.id!==o):e.boards,boardTotal:a?Math.max(0,e.boardTotal-1):e.boardTotal,activeBoardTotal:n===!0?Math.max(0,e.activeBoardTotal-1):e.activeBoardTotal,orphanedBoardTotal:n===!1?Math.max(0,e.orphanedBoardTotal-1):e.orphanedBoardTotal,activeBoardId:a&&e.activeBoardId===o?null:e.activeBoardId,activeBoard:a&&e.activeBoard?.id===o?null:e.activeBoard,loading:!1,error:null}});return}if(n===`kanban.task.remove`){let t=i;e(e=>{let n=z(t?.board)?t.board:null;if(n&&e.activeBoardId===n.id)return{boards:q(e.boards,K(n)),activeBoard:n,loading:!1,error:null};let r=t?.boardId,i=t?.taskId,a=t?.removed===!0&&i&&e.activeBoard&&(!r||e.activeBoard.id===r)?{...e.activeBoard,tasks:e.activeBoard.tasks.filter(e=>e.id!==i)}:e.activeBoard;return{activeBoard:a,boards:a?q(e.boards,K(a)):e.boards,loading:!1,error:null}});return}if(n===`kanban.board.history`){Array.isArray(i)&&e({boardHistory:i});return}if(n===`kanban.task.verification_started`){let t=i;if(t?.boardId&&t.taskId){let n=`${t.boardId}:${t.taskId}`;e(e=>{let t=Date.now(),r=Object.fromEntries(Object.entries(e.verificationActivity).filter(([,e])=>t-e.startedAt<L));return r[n]={startedAt:t},{verificationActivity:r,loading:!1,error:null}})}return}if(n===`kanban.task.verification_completed`&&V(i)){let t=`${i.boardId}:${i.task.id}`;e(e=>{let n={...e.verificationActivity};if(delete n[t],e.activeBoard&&e.activeBoard.id===i.boardId){let t=J(e.activeBoard,i.task);return{verificationActivity:n,boards:q(e.boards,K(t)),activeBoard:t,loading:!1,error:null}}return{verificationActivity:n,loading:!1,error:null}});return}if(H(i)){let t=i.board;e(e=>({boards:q(e.boards,K(t)),activeBoard:e.activeBoardId===t.id?t:e.activeBoard,loading:!1,error:null}));return}if(V(i)){e(e=>{if(e.activeBoard&&e.activeBoard.id===i.boardId){let t=J(e.activeBoard,i.task);return{boards:q(e.boards,K(t)),activeBoard:t,loading:!1,error:null}}return{loading:!1,error:null}});return}if(z(i)){let t=K(i);if(n!==`kanban.create`&&n!==`kanban.duplicate`&&n!==`kanban.generate`){e(e=>({boards:q(e.boards,t),activeBoard:e.activeBoardId===i.id?i:e.activeBoard,loading:!1,error:null}));return}e(e=>({boards:q(e.boards,t),activeBoardId:i.id,activeBoard:i,loading:!1,error:null}));return}if(B(i)){e(e=>({...e.activeBoard?(()=>{let t=J(e.activeBoard,i);return{activeBoard:t,boards:q(e.boards,K(t))}})():{activeBoard:e.activeBoard},loading:!1,error:null}));return}if(Array.isArray(i)&&i.every(G)){e(e=>({...e.activeBoard?(()=>{let t={...e.activeBoard,columns:i};return{activeBoard:t,boards:q(e.boards,K(t))}})():{activeBoard:e.activeBoard},loading:!1,error:null}));return}e({loading:!1,error:null})}}));function z(e){return!!e&&typeof e==`object`&&Array.isArray(e.columns)&&Array.isArray(e.tasks)}function B(e){return!!e&&typeof e==`object`&&typeof e.title==`string`}function V(e){return!!e&&typeof e==`object`&&typeof e.boardId==`string`&&B(e.task)}function H(e){return!!e&&typeof e==`object`&&z(e.board)}function U(e){return!!e&&typeof e==`object`&&Array.isArray(e.items)&&typeof e.total==`number`}function W(e){return I(e,[])}function G(e){return!!e&&typeof e==`object`&&typeof e.id==`string`}function K(e){return{id:e.id,title:e.title,description:e.description,tags:e.tags,presence:e.presence,createdAt:e.createdAt,updatedAt:e.updatedAt,columnCount:e.columns.length,taskCount:e.tasks.length,completedTaskCount:e.tasks.filter(e=>e.status===`completed`).length}}function q(e,t){return[t,...e.filter(e=>e.id!==t.id)].sort((e,t)=>t.updatedAt.localeCompare(e.updatedAt))}function J(e,t){let n=e.tasks.some(e=>e.id===t.id)?e.tasks.map(e=>e.id===t.id?t:e):[...e.tasks,t];return{...e,tasks:n}}function oe(e){switch(e){case`tui`:return`tui`;case`cli`:case`repl`:return`repl`;case`webui`:return`webui`;default:return`webui`}}function se(e){let t={tui:0,webui:0,repl:0},n=0,r=0,i={toolCalls:0,costUsd:0,tokensIn:0,tokensOut:0};for(let a of e){t[oe(a.clientType)]+=1;for(let e of a.agents)n+=1,(e.status===`running`||e.status===`streaming`)&&(r+=1),i.toolCalls+=e.toolCalls??0,i.costUsd+=e.costUsd??0,i.tokensIn+=e.tokensIn??0,i.tokensOut+=e.tokensOut??0}return{clientCounts:t,totalAgents:n,activeAgents:r,aggregate:i}}function ce(e){if(e!==void 0)return Number.isFinite(e)?Math.max(0,Math.min(100,Math.round(e))):0}function le(e){return e.map(e=>({...e,agents:e.agents.map(e=>({...e,ctxPct:ce(e.ctxPct)}))}))}var ue=0,Y=s()(e=>({clientCounts:{tui:0,webui:0,repl:0},mailActivity:[],totalMessages:0,openMessages:0,unreadMessages:0,totalAgents:0,activeAgents:0,currentSession:{},liveSessions:[],aggregate:{toolCalls:0,costUsd:0,tokensIn:0,tokensOut:0},lastUpdated:Date.now(),setClientCounts:t=>e({clientCounts:t,lastUpdated:Date.now()}),setLiveSessions:t=>{let n=le(t),r=Y.getState().liveSessions;if(r.length===n.length){let e=!0;for(let t=0;t<n.length;t++){let i=n[t],a=r[t];if(i.sessionId!==a.sessionId||i.status!==a.status||i.agentCount!==a.agentCount||i.startedAt!==a.startedAt||i.lastHeartbeatAt!==a.lastHeartbeatAt){e=!1;break}let o=i.agents??[],s=a.agents??[];if(o.length!==s.length){e=!1;break}for(let t=0;t<o.length;t++)if(o[t].id!==s[t].id||o[t].name!==s[t].name||o[t].status!==s[t].status||o[t].currentTool!==s[t].currentTool||o[t].iterations!==s[t].iterations||o[t].toolCalls!==s[t].toolCalls||o[t].ctxPct!==s[t].ctxPct||o[t].tokensIn!==s[t].tokensIn||o[t].tokensOut!==s[t].tokensOut||o[t].costUsd!==s[t].costUsd||o[t].recentTools?.[0]?.id!==s[t].recentTools?.[0]?.id||o[t].recentMail?.[0]?.id!==s[t].recentMail?.[0]?.id||o[t].activity?.reads!==s[t].activity?.reads||o[t].activity?.writes!==s[t].activity?.writes||o[t].activity?.edits!==s[t].activity?.edits||o[t].activity?.terminalCalls!==s[t].activity?.terminalCalls||o[t].activity?.mailReceived!==s[t].activity?.mailReceived||o[t].activity?.mailSent!==s[t].activity?.mailSent||o[t].activity?.linesAdded!==s[t].activity?.linesAdded||o[t].activity?.linesRemoved!==s[t].activity?.linesRemoved){e=!1;break}if(!e)break}if(e)return}e({liveSessions:n,...se(n),lastUpdated:Date.now()})},addMailActivity:t=>e(e=>({mailActivity:[{...t,seq:t.seq??++ue},...e.mailActivity].slice(0,50),lastUpdated:Date.now()})),setMailStats:(t,n,r)=>e({totalMessages:t,openMessages:n,unreadMessages:r,lastUpdated:Date.now()}),setAgentStats:(t,n)=>e({totalAgents:t,activeAgents:n,lastUpdated:Date.now()}),setCurrentSession:t=>e({currentSession:{...Y.getState().currentSession,...t},lastUpdated:Date.now()}),clear:()=>e({clientCounts:{tui:0,webui:0,repl:0},mailActivity:[],totalMessages:0,openMessages:0,unreadMessages:0,totalAgents:0,activeAgents:0,currentSession:{},liveSessions:[],aggregate:{toolCalls:0,costUsd:0,tokensIn:0,tokensOut:0},lastUpdated:Date.now()})})),de=[3e4,6e4,12e4,3e5,6e5],X=12e4,fe=s()(a(e=>({viewMode:`office`,showHud:!0,showLegend:!0,showMinimap:!0,showControls:!0,animateEdges:!0,showFeed:!0,background:`dots`,waitThresholdMs:X,setViewMode:t=>e({viewMode:t}),setShowHud:t=>e({showHud:t}),setShowLegend:t=>e({showLegend:t}),setShowMinimap:t=>e({showMinimap:t}),setShowControls:t=>e({showControls:t}),setAnimateEdges:t=>e({animateEdges:t}),setShowFeed:t=>e({showFeed:t}),setBackground:t=>e({background:t}),setWaitThresholdMs:t=>e({waitThresholdMs:Number.isFinite(t)&&t>0?Math.round(t):X})}),{name:`wrongstack-officemap`}));function Z(e){return`${e.providerId}\u0000${e.meterId}`}function pe(e){if(!e||typeof e!=`object`)return!1;let t=e;return typeof t.providerId==`string`&&typeof t.meterId==`string`&&Array.isArray(t.windows)&&typeof t.capturedAt==`number`}var me=s(e=>({meters:{},apply:t=>e(e=>{let n={...e.meters};for(let e of t){if(!pe(e))continue;let t=n[Z(e)];n[Z(e)]={...e,...e.planLabel===void 0&&t?.planLabel!==void 0?{planLabel:t.planLabel}:{},...e.meterLabel===void 0&&t?.meterLabel!==void 0?{meterLabel:t.meterLabel}:{}}}return{meters:n}}),clear:()=>e({meters:{}})}));function he(e){let t;for(let n of Object.values(e))for(let e of n.windows){if(!t||e.usedPercent>t.window.usedPercent){t={snapshot:n,window:e};continue}if(e.usedPercent===t.window.usedPercent){let r=e.resetsAt,i=t.window.resetsAt;r!==void 0&&(i===void 0||r<i)&&(t={snapshot:n,window:e})}}return t}function ge(e){if(e.label)return e.label;let t=e.windowMinutes;return t!==void 0&&Number.isFinite(t)&&t>0?t%1440==0?`${t/1440}d`:t%60==0?`${t/60}h`:`${t}m`:e.id}function _e(e,t=Date.now()){if(e?.resetsAt===void 0)return;let n=e.resetsAt*1e3-t;if(n<=0)return;let r=Math.floor(n/6e4);if(r<1)return`${Math.max(1,Math.round(n/1e3))}s`;let i=Math.floor(r/1440),a=Math.floor(r%1440/60),o=r%60;return i>0?a>0?`${i}d ${a}h`:`${i}d`:a>0?o>0?`${a}h ${o}m`:`${a}h`:`${o}m`}var Q=e=>`${e.providerId}\u0000${e.model}`,ve=s(e=>({entries:{},audit:[],summary:null,loading:!1,error:null,update:t=>e(e=>{let n={...e.entries},r=Q(t);if(t.state===`healthy`)delete n[r];else{let e=n[r],i=Object.fromEntries(Object.entries(t).filter(e=>e[1]!==void 0));n[r]={...e,...i}}return{entries:n}}),hydrate:t=>e({entries:Object.fromEntries(t.filter(e=>e.state!==`healthy`).map(e=>[Q(e),e]))}),applySnapshot:t=>{let n=t.statuses;if(!Array.isArray(n)){e({error:`Invalid snapshot from server`,loading:!1});return}let r={};for(let e of n){if(!e||typeof e!=`object`)continue;let t=e,n=typeof t.providerId==`string`?t.providerId:``,i=typeof t.model==`string`?t.model:``;if(!n||!i)continue;let a=t.state;(a===`healthy`||a===`degraded`||a===`blocked`)&&(r[`${n}\u0000${i}`]={providerId:n,model:i,state:a,reason:(typeof t.lastErrorKind==`string`?t.lastErrorKind:``)||a,updatedAt:typeof t.lastFailureAt==`number`?t.lastFailureAt:Date.now(),...typeof t.stateExpiresAt==`number`?{stateExpiresAt:t.stateExpiresAt}:{},...typeof t.consecutiveFailures==`number`?{consecutiveFailures:t.consecutiveFailures}:{},...typeof t.totalFailures==`number`?{totalFailures:t.totalFailures}:{},...typeof t.rateLimitHits==`number`?{rateLimitHits:t.rateLimitHits}:{},...typeof t.lastErrorMessage==`string`?{lastErrorMessage:t.lastErrorMessage}:{},...typeof t.lastErrorKind==`string`?{lastErrorKind:t.lastErrorKind}:{},...typeof t.lastErrorStatus==`number`?{lastErrorStatus:t.lastErrorStatus}:{},...Array.isArray(t.recentErrors)?{recentErrors:t.recentErrors.slice(0,20)}:{},...typeof t.lastSessionId==`string`?{lastSessionId:t.lastSessionId}:{},...typeof t.lastAgentId==`string`?{lastAgentId:t.lastAgentId}:{},...typeof t.lastFailureAt==`number`?{lastFailureAt:t.lastFailureAt}:{}})}let i=t;e({entries:r,summary:{totalPairs:typeof i.totalPairs==`number`?i.totalPairs:0,healthy:typeof i.healthy==`number`?i.healthy:0,degraded:typeof i.degraded==`number`?i.degraded:0,blocked:typeof i.blocked==`number`?i.blocked:0,totalFailures:typeof i.totalFailures==`number`?i.totalFailures:0,totalRateLimits:typeof i.totalRateLimits==`number`?i.totalRateLimits:0},error:null,loading:!1})},setAudit:t=>e({audit:t}),setLoading:t=>e({loading:t}),setError:t=>e({error:t,loading:!1}),removeEntry:(t,n)=>e(e=>{let r={...e.entries};return delete r[Q({providerId:t,model:n})],{entries:r}}),clear:()=>e({entries:{},audit:[],summary:null,error:null})})),ye=s()(e=>({snapshot:null,boards:[],lifecycleResult:null,destroying:!1,setSnapshot:t=>e({snapshot:t}),setBoards:t=>e({boards:t}),setLifecycleResult:t=>e({lifecycleResult:t}),setDestroying:t=>e({destroying:t})})),be=f(e=>({sideEffects:[],loading:!1,setSideEffects:t=>e({sideEffects:t,loading:!1}),setLoading:t=>e({loading:t}),clear:()=>e({sideEffects:[],loading:!1})})),xe=s()(e=>({specs:[],detail:null,expandedSpecId:null,setSpecs:t=>e({specs:t}),setDetail:t=>e({detail:t}),setExpanded:t=>e({expandedSpecId:t,detail:null})})),Se=new Set([`idle`,`queued`,`discovering`,`inventorying`,`enriching`,`researching`,`synthesizing`,`completed`,`failed`,`cancelled`]);function Ce(e){return Se.has(e)?e:void 0}var $={snapshot:null,stale:!1,loading:!1,error:null,activeJob:null,lastWorkspaceId:null,reportId:null},we=s()(e=>({...$,setSnapshot:(t,n=!1)=>e(e=>({snapshot:t,stale:n,loading:!1,error:null,activeJob:e.activeJob?{...e.activeJob,status:`completed`,error:null}:null})),setLoading:t=>e({loading:t}),setError:t=>e({error:t,loading:!1}),jobStarted:(t,n)=>e({activeJob:{id:t,kind:n,status:`queued`,progress:null,error:null},error:null,loading:!0}),jobProgress:(t,n)=>e(e=>{if(e.activeJob?.id!==t)return e;let r=Ce(n.phase);return r?{activeJob:{...e.activeJob,status:r,progress:n},loading:!0}:e}),jobFailed:(t,n)=>e(e=>e.activeJob?.id===t?{activeJob:{...e.activeJob,status:`failed`,error:n},error:n,loading:!1}:e),jobCancelled:t=>e(e=>({activeJob:e.activeJob?.id===t?{...e.activeJob,status:`cancelled`,error:null}:e.activeJob,loading:!1})),workspaceCompleted:t=>e({lastWorkspaceId:t}),reportReady:t=>e({reportId:t}),clear:()=>e($)})),Te=s()(e=>({worktrees:[],baseBranch:``,activity:[],orphans:[],canClean:!1,cleanResult:null,mergeResult:null,diffByDir:{},setSnapshot:(t,n)=>e({worktrees:t,baseBranch:n}),pushEvent:t=>e(e=>({activity:[...e.activity,t].slice(-40)})),setOrphans:(t,n,r)=>e({orphans:t,canClean:n,cleanBlockedReason:r}),setCleanResult:t=>e({cleanResult:t}),setMergeResult:t=>e({mergeResult:t}),setDiff:(t,n)=>e(e=>({diffByDir:{...e.diffByDir,[t]:n}}))}));export{te as C,u as D,f as E,E as S,b as T,M as _,ye as a,re as b,ge as c,de as d,fe as f,F as g,I as h,be as i,he as l,R as m,we as n,ve as o,Y as p,xe as r,_e as s,Te as t,me as u,j as v,ne as w,ie as x,ae as y};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{i as t,t as n}from"./react-core-wiHys0m2.js";import{Mr as r,Qt as i,ja as a}from"./vendor-V3ydTHqN.js";import{a as o,i as s,n as c,o as l,r as u,t as d}from"./dialog-
|
|
1
|
+
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{i as t,t as n}from"./react-core-wiHys0m2.js";import{Mr as r,Qt as i,ja as a}from"./vendor-V3ydTHqN.js";import{a as o,i as s,n as c,o as l,r as u,t as d}from"./dialog-b-Ai37sa.js";import{t as f}from"./button-BbeB5Qm8.js";var p=e(t(),1);async function m(e=``){let t=await fetch(`${e}/api/vector-memory/status`,{credentials:`include`});if(!t.ok)throw Error(`status failed: HTTP ${t.status}`);return await t.json()}async function h(e,t={}){let n=new URLSearchParams;n.set(`q`,e),t.limit!==void 0&&n.set(`limit`,String(t.limit)),t.threshold!==void 0&&n.set(`threshold`,String(t.threshold)),t.similarity===!0&&n.set(`similarity`,`1`);let r=await fetch(`${t.baseUrl??``}/api/vector-memory/search?${n.toString()}`,{credentials:`include`});if(!r.ok)throw Error(`search failed: HTTP ${r.status}`);return await r.json()}function g(e,t=170){let n=e.replace(/\s+/g,` `).trim();return n.length>t?`${n.slice(0,t-1)}…`:n}async function _(e,t={}){let n=await fetch(`${t.baseUrl??``}/api/vector-memory/store/${encodeURIComponent(e)}`,{method:`DELETE`,credentials:`include`});if(!n.ok)throw Error(`forget failed: HTTP ${n.status}`);return await n.json()}var v=n();function y({hit:e,busy:t,error:n,onCancel:a,onConfirm:p,onOpenChange:m}){return(0,v.jsx)(d,{open:e!==null,onOpenChange:m,children:(0,v.jsxs)(c,{className:`max-w-md`,children:[(0,v.jsxs)(o,{children:[(0,v.jsx)(`span`,{className:`mb-2 flex size-10 items-center justify-center border border-destructive/35 bg-destructive/10 text-destructive`,children:(0,v.jsx)(i,{className:`size-4`})}),(0,v.jsx)(l,{children:`Forget this vector memory?`}),(0,v.jsx)(u,{className:`leading-6`,children:`This removes the entry and its embedding from the vector memory store.`})]}),(0,v.jsx)(`div`,{className:`border border-border/70 bg-background/45 p-3 text-xs text-muted-foreground`,children:g(e?.text??``,180)}),n===void 0?null:(0,v.jsx)(`p`,{role:`alert`,className:`text-xs text-destructive`,children:n}),(0,v.jsxs)(s,{children:[(0,v.jsx)(f,{variant:`outline`,onClick:a,disabled:t,children:`Cancel`}),(0,v.jsxs)(f,{variant:`destructive`,onClick:p,disabled:t,children:[t?(0,v.jsx)(r,{className:`size-4 animate-spin`}):(0,v.jsx)(i,{className:`size-4`}),t?`Forgetting…`:`Forget memory`]})]})]})})}function b({baseUrl:e=``}={}){let[t,n]=(0,p.useState)(),[r,i]=(0,p.useState)(),[o,s]=(0,p.useState)(``),[c,l]=(0,p.useState)(10),[u,d]=(0,p.useState)(void 0),[f,b]=(0,p.useState)([]),[S,C]=(0,p.useState)(),[w,T]=(0,p.useState)(),[E,D]=(0,p.useState)(!1),[O,k]=(0,p.useState)(null),[A,j]=(0,p.useState)(null),[M,N]=(0,p.useState)(!1),[P,F]=(0,p.useState)(),[I,L]=(0,p.useState)(0),R=(0,p.useRef)(0),z=(0,p.useRef)(!1),B=(0,p.useRef)(e);(0,p.useEffect)(()=>{let t=!1;return B.current!==e&&(B.current=e,z.current=!1,n(void 0),i(void 0)),m(e).then(e=>{t||(z.current=!0,n(e),i(void 0))}).catch(e=>{t||z.current||(n(void 0),i(e instanceof Error?e.message:String(e)))}),()=>{t=!0}},[e,I]);let V=async()=>{let t=o.trim();if(t.length!==0){D(!0),T(void 0),k(null),j(null),F(void 0);try{let n=await h(t,{limit:c,...u===void 0?{}:{threshold:u},similarity:!0,baseUrl:e});b(n.hits),C(n.similarity)}catch(e){b([]),C(void 0),T(e instanceof Error?e.message:String(e))}finally{R.current+=1,D(!1)}}},H=async()=>{if(A===null)return;let t=A.id,n=R.current,r=f,i=S;N(!0),F(void 0);try{let{removed:a}=await _(t,{baseUrl:e});if(a){if(R.current===n){let e=r.findIndex(e=>e.id===t);b(r.filter(e=>e.id!==t)),i!==void 0&&e>=0&&C(i.filter((t,n)=>n!==e).map(t=>t.filter((t,n)=>n!==e))),O===t&&k(null)}j(e=>e?.id===t?null:e),L(e=>e+1)}else F(`The store reported the entry was not removed.`)}catch(e){F(e instanceof Error?e.message:String(e))}finally{N(!1)}};return r===void 0?t===void 0?(0,v.jsxs)(`div`,{className:`vector-memory-panel vector-memory-panel--loading`,children:[(0,v.jsx)(`h3`,{children:`Vector Memory`}),(0,v.jsx)(`p`,{children:`Loading status…`})]}):t.enabled?(0,v.jsxs)(`div`,{className:`vector-memory-panel`,children:[(0,v.jsx)(`h3`,{children:`Vector Memory`}),(0,v.jsxs)(`dl`,{className:`vector-memory-panel__status`,children:[(0,v.jsx)(`dt`,{children:`Active provider`}),(0,v.jsx)(`dd`,{children:(0,v.jsx)(`code`,{children:t.providerId??`unknown`})}),(0,v.jsx)(`dt`,{children:`Model`}),(0,v.jsx)(`dd`,{children:(0,v.jsx)(`code`,{children:t.modelId??`unknown`})}),(0,v.jsx)(`dt`,{children:`Dimensions`}),(0,v.jsx)(`dd`,{children:t.dimensions??`unknown`}),(0,v.jsx)(`dt`,{children:`Entries / vectors`}),(0,v.jsxs)(`dd`,{children:[t.entries??0,` / `,t.vectors??0]}),(0,v.jsx)(`dt`,{children:`Store path`}),(0,v.jsx)(`dd`,{children:(0,v.jsx)(`code`,{children:t.storePath??`(project root)`})}),(0,v.jsx)(`dt`,{children:`Model cache`}),(0,v.jsx)(`dd`,{children:(0,v.jsx)(`code`,{children:t.modelCacheDir??`(project root)`})}),(0,v.jsx)(`dt`,{children:`Providers`}),(0,v.jsx)(`dd`,{children:t.providers?.join(`, `)??``}),t.cache?(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(`dt`,{children:`Embedding cache`}),(0,v.jsxs)(`dd`,{children:[t.cache.entries,` entries · `,t.cache.providers,` provider`,t.cache.providers===1?``:`s`,` · `,t.cache.totalUseCount,` hits`]})]}):null]}),(0,v.jsxs)(`div`,{className:`vector-memory-panel__search`,children:[(0,v.jsx)(`label`,{htmlFor:`vm-query`,children:`Query`}),(0,v.jsx)(`input`,{id:`vm-query`,type:`text`,value:o,onChange:e=>s(e.currentTarget.value),onKeyDown:e=>{e.key===`Enter`&&V()},placeholder:`apple banana`}),(0,v.jsxs)(`div`,{className:`vector-memory-panel__controls`,children:[(0,v.jsxs)(`label`,{children:[`limit`,(0,v.jsx)(`input`,{type:`number`,min:1,max:50,value:c,onChange:e=>l(Math.max(1,Math.min(50,Number(e.currentTarget.value)||10)))})]}),(0,v.jsxs)(`label`,{children:[`threshold`,(0,v.jsx)(`input`,{type:`number`,min:0,max:1,step:.05,value:u??``,onChange:e=>{let t=e.currentTarget.value;d(t===``?void 0:Number.parseFloat(t))}})]}),(0,v.jsx)(`button`,{type:`button`,onClick:()=>void V(),disabled:E,children:E?`Searching…`:`Search`})]})]}),w===void 0?null:(0,v.jsxs)(`p`,{className:`vector-memory-panel__error`,children:[`Search error: `,w]}),(0,v.jsxs)(`ol`,{className:`vector-memory-panel__hits`,children:[f.map(e=>{let t=O===e.id;return(0,v.jsxs)(`li`,{className:t?`vector-memory-panel__hit vector-memory-panel__hit--expanded`:`vector-memory-panel__hit`,children:[(0,v.jsxs)(`button`,{type:`button`,className:`vector-memory-panel__hit-toggle`,"aria-expanded":t,onClick:()=>k(t?null:e.id),children:[(0,v.jsx)(a,{"aria-hidden":`true`,className:t?`vector-memory-panel__hit-chevron vector-memory-panel__hit-chevron--open`:`vector-memory-panel__hit-chevron`}),(0,v.jsx)(`span`,{className:`vector-memory-panel__hit-score`,children:e.score.toFixed(3)}),e.summary?(0,v.jsx)(`span`,{className:`vector-memory-panel__hit-summary`,children:e.summary}):null]}),(0,v.jsx)(`p`,{className:`vector-memory-panel__hit-text`,children:t?e.text:g(e.text)}),e.tags.length>0?(0,v.jsx)(`p`,{className:`vector-memory-panel__hit-tags`,children:e.tags.map(e=>(0,v.jsx)(`span`,{className:`vector-memory-panel__hit-tag`,children:e},e))}):null,t?(0,v.jsxs)(`div`,{className:`vector-memory-panel__hit-detail`,children:[(0,v.jsxs)(`dl`,{className:`vector-memory-panel__hit-fields`,children:[(0,v.jsx)(`dt`,{children:`id`}),(0,v.jsx)(`dd`,{children:(0,v.jsx)(`code`,{children:e.id})}),(0,v.jsx)(`dt`,{children:`score`}),(0,v.jsx)(`dd`,{children:e.score.toFixed(3)}),e.summary?(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(`dt`,{children:`summary`}),(0,v.jsx)(`dd`,{children:e.summary})]}):null]}),(0,v.jsx)(`div`,{className:`vector-memory-panel__hit-actions`,children:(0,v.jsx)(`button`,{type:`button`,className:`vector-memory-panel__forget`,onClick:()=>{F(void 0),j(e)},children:`Forget`})})]}):null]},e.id)}),f.length===0&&E===!1&&o.trim().length>0?(0,v.jsx)(`li`,{className:`vector-memory-panel__no-hits`,children:`No results.`}):null]}),S!==void 0&&S.length>1?(0,v.jsxs)(`div`,{className:`vector-memory-panel__heatmap`,"data-testid":`vector-memory-heatmap`,children:[(0,v.jsx)(`h4`,{children:`Result similarity`}),(0,v.jsx)(`p`,{className:`vector-memory-panel__heatmap-hint`,children:`Pairwise cosine similarity between returned hits. Darker cells = more similar. A bright diagonal with mostly dark off-diagonals means results form a tight cluster; a noisy grid means the search returned mixed topics.`}),(0,v.jsxs)(`div`,{className:`vector-memory-panel__heatmap-grid`,style:{gridTemplateColumns:`auto repeat(${S.length}, minmax(20px, 1fr))`},role:`table`,"aria-label":`Pairwise cosine similarity between returned hits`,children:[(0,v.jsx)(`div`,{className:`vector-memory-panel__heatmap-corner`}),S.map((e,t)=>(0,v.jsx)(`div`,{className:`vector-memory-panel__heatmap-col-label`,children:t+1},`col-${t}`)),S.map((e,t)=>(0,v.jsx)(x,{row:e,index:t},`row-${t}`))]})]}):null,(0,v.jsx)(y,{hit:A,busy:M,error:P,onCancel:()=>j(null),onConfirm:()=>void H(),onOpenChange:e=>{!e&&!M&&j(null)}})]}):(0,v.jsxs)(`div`,{className:`vector-memory-panel vector-memory-panel--disabled`,children:[(0,v.jsx)(`h3`,{children:`Vector Memory`}),(0,v.jsx)(`p`,{children:`Disabled — the webui-server host does not have a vector memory store wired.`})]}):(0,v.jsxs)(`div`,{className:`vector-memory-panel vector-memory-panel--error`,children:[(0,v.jsx)(`h3`,{children:`Vector Memory`}),(0,v.jsxs)(`p`,{children:[`Status unavailable: `,r]})]})}function x({row:e,index:t}){return(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(`div`,{className:`vector-memory-panel__heatmap-row-label`,children:t+1}),e.map((e,n)=>{let r=t===n,i=Math.max(0,Math.min(1,e)),a=95-i*60,o=`hsl(220, ${r?0:35}%, ${a}%)`;return(0,v.jsx)(`div`,{className:r?`vector-memory-panel__heatmap-cell vector-memory-panel__heatmap-cell--diagonal`:`vector-memory-panel__heatmap-cell`,style:{background:o},role:`cell`,"aria-label":`hit ${t+1} vs hit ${n+1}: ${i.toFixed(2)}`,title:`hit ${t+1} ↔ hit ${n+1}: ${i.toFixed(3)}`,children:i>=.5?i.toFixed(2):``},`cell-${t}-${n}`)})]})}export{b as VectorMemoryPanel};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as e}from"./mailbox-store-ZQO_Rv6E.js";import{n as t}from"./ui-store-DC3mkswy.js";var n=(()=>{try{if(typeof navigator>`u`)return!1;let e=navigator.userAgentData?.platform??navigator.platform??``;return/mac|iphone|ipad|ipod/i.test(e)}catch{return!1}})(),r=n?`⌘`:`Ctrl`,i=n?`⌥`:`Alt`,a=n?`⇧`:`Shift`;function o(e){switch(e){case`Ctrl`:return r;case`Alt`:return i;case`Shift`:return a;default:return e}}var s={chat:`chat`,agents:`chat`,files:`files`,changes:`changes`,mailbox:`mailbox`,skills:`skill`,design:`design-gallery`},c={chat:`chat`,files:`files`,changes:`changes`,mailbox:`mailbox`,skill:`skills`,"design-gallery":`design`},l={1:`chat`,2:`files`,3:`changes`,4:`mailbox`,5:`skills`,0:`design`},u=Object.entries(l).reduce((e,[t,n])=>(e[n]=`${r}+${t}`,e),{chat:``,agents:``,files:``,changes:``,mailbox:``,skills:``,design:``});function d(e){return s[e]??`chat`}function f(e){return u[e]??``}function p(e){let n=t.getState();n.currentView!==e&&n.setCurrentView(e)}function m(e){let n=t.getState();n.setSidebarOpen(!0),n.selectActivity(e),p(d(e))}function h(e){let n=t.getState();if(!n.sidebarOpen)n.setSidebarOpen(!0),n.selectActivity(e);else if(n.activeActivity===e){n.setSidebarOpen(!1);return}else n.activeActivity===`agents`&&n.setSidebarOpen(!0),n.selectActivity(e);p(d(e))}function g(e){let n=t.getState();if(n.currentView===e){m(`chat`);return}n.setSidebarOpen(!1),p(e)}function _(n){if(n===`intake`){e.getState().setActiveHubTab(`requirements`),g(`sddhub`);return}let r=c[n];if(r){m(r);return}t.getState().setSidebarOpen(!1),p(n)}export{f as a,h as i,_ as n,m as o,g as r,o as s,l as t};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Code Atlas — persistent code tree, dependency canvas, and relation inspector.
|
|
3
3
|
*
|
|
4
4
|
* The explorer never disappears while the user moves package → file → symbol.
|
|
5
|
-
* A graph click
|
|
5
|
+
* A graph click opens packages/files; the relation action focuses relationships.
|
|
6
6
|
*
|
|
7
7
|
* Performance notes:
|
|
8
8
|
* - Activity store is subscribed via selectors (not the whole store).
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type Edge, type Node, type OnEdgesChange, type OnNodesChange } from '@xyflow/react';
|
|
2
2
|
import type React from 'react';
|
|
3
3
|
import type { CodeMapGraphResponse } from './codemap-model';
|
|
4
|
-
export declare function CodeMapCanvasSurface({ loading, error, graph, canvasNodeCount, flowNodes, flowEdges, onNodesChange, onEdgesChange, agentTrailCount, }: {
|
|
4
|
+
export declare function CodeMapCanvasSurface({ loading, error, graph, canvasNodeCount, flowNodes, flowEdges, onNodesChange, onEdgesChange, onNodeClick, agentTrailCount, }: {
|
|
5
5
|
loading: boolean;
|
|
6
6
|
error: string | null;
|
|
7
7
|
graph: CodeMapGraphResponse;
|
|
@@ -10,6 +10,7 @@ export declare function CodeMapCanvasSurface({ loading, error, graph, canvasNode
|
|
|
10
10
|
flowEdges: Edge[];
|
|
11
11
|
onNodesChange: OnNodesChange<Node>;
|
|
12
12
|
onEdgesChange: OnEdgesChange<Edge>;
|
|
13
|
+
onNodeClick?: (event: React.MouseEvent, node: Node) => void;
|
|
13
14
|
agentTrailCount: number;
|
|
14
15
|
}): React.ReactElement;
|
|
15
16
|
//# sourceMappingURL=CodeMapCanvasSurface.d.ts.map
|
|
@@ -25,6 +25,8 @@ interface ConfirmModalOptions {
|
|
|
25
25
|
danger?: boolean | undefined;
|
|
26
26
|
/** Which choice receives focus and Enter. Defaults to confirm for compatibility. */
|
|
27
27
|
defaultAction?: 'confirm' | 'cancel' | undefined;
|
|
28
|
+
/** If true, the cancel button is omitted, acting as an alert dialog. */
|
|
29
|
+
hideCancel?: boolean | undefined;
|
|
28
30
|
}
|
|
29
31
|
interface ConfirmRequest extends ConfirmModalOptions {
|
|
30
32
|
resolve: (confirmed: boolean | null) => void;
|
|
@@ -41,6 +43,14 @@ export declare function confirmModal(options: ConfirmModalOptions): Promise<bool
|
|
|
41
43
|
type ConfirmModalChoice = 'confirm' | 'cancel' | 'dismiss';
|
|
42
44
|
/** Three-way variant for workflows where dismissing must not equal either button. */
|
|
43
45
|
export declare function confirmModalChoice(options: ConfirmModalOptions): Promise<ConfirmModalChoice>;
|
|
46
|
+
/** Ask the user to acknowledge an alert. Resolves when dismissed or OK is clicked. */
|
|
47
|
+
export interface AlertModalOptions {
|
|
48
|
+
title: string;
|
|
49
|
+
message?: string | undefined;
|
|
50
|
+
details?: string[] | undefined;
|
|
51
|
+
okLabel?: string | undefined;
|
|
52
|
+
}
|
|
53
|
+
export declare function alertModal(options: AlertModalOptions): Promise<void>;
|
|
44
54
|
export declare function ConfirmModalHost(): import("react").JSX.Element;
|
|
45
55
|
interface PromptModalOptions {
|
|
46
56
|
title: string;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type React from 'react';
|
|
2
1
|
import type { TreeNode } from '@/stores/file-store';
|
|
3
2
|
import type { CreatePromptState, CrumbContext, RenamePromptState } from './types';
|
|
4
3
|
interface BreadcrumbContextMenuProps {
|
|
@@ -13,7 +12,7 @@ interface BreadcrumbContextMenuProps {
|
|
|
13
12
|
handleStartCreate: (dirPath: string, type: 'file' | 'directory') => void;
|
|
14
13
|
handleShellOpen: (dirPath: string, target: 'terminal' | 'file-manager') => void;
|
|
15
14
|
}
|
|
16
|
-
export declare function BreadcrumbContextMenu({ contextMenu, onClose, copyToClipboard, handleStartCreate, handleShellOpen, }: BreadcrumbContextMenuProps):
|
|
15
|
+
export declare function BreadcrumbContextMenu({ contextMenu, onClose, copyToClipboard, handleStartCreate, handleShellOpen, }: BreadcrumbContextMenuProps): import("react").JSX.Element;
|
|
17
16
|
interface NodeContextMenuProps {
|
|
18
17
|
nodeMenu: {
|
|
19
18
|
x: number;
|
|
@@ -28,7 +27,7 @@ interface NodeContextMenuProps {
|
|
|
28
27
|
handleStartRename: (node: TreeNode) => void;
|
|
29
28
|
handleDelete: (node: TreeNode) => void;
|
|
30
29
|
}
|
|
31
|
-
export declare function NodeContextMenu({ nodeMenu, onClose, handleMentionInChat, copyNodePath, handleStartCreate, handleStartRename, handleDelete, }: NodeContextMenuProps):
|
|
30
|
+
export declare function NodeContextMenu({ nodeMenu, onClose, handleMentionInChat, copyNodePath, handleStartCreate, handleStartRename, handleDelete, }: NodeContextMenuProps): import("react").JSX.Element;
|
|
32
31
|
interface CreatePromptModalProps {
|
|
33
32
|
createPrompt: CreatePromptState;
|
|
34
33
|
createName: string;
|
|
@@ -36,7 +35,7 @@ interface CreatePromptModalProps {
|
|
|
36
35
|
onCancel: () => void;
|
|
37
36
|
onConfirm: () => void;
|
|
38
37
|
}
|
|
39
|
-
export declare function CreatePromptModal({ createPrompt, createName, setCreateName, onCancel, onConfirm, }: CreatePromptModalProps):
|
|
38
|
+
export declare function CreatePromptModal({ createPrompt, createName, setCreateName, onCancel, onConfirm, }: CreatePromptModalProps): import("react").JSX.Element;
|
|
40
39
|
interface RenamePromptModalProps {
|
|
41
40
|
renamePrompt: RenamePromptState;
|
|
42
41
|
renameValue: string;
|
|
@@ -44,6 +43,6 @@ interface RenamePromptModalProps {
|
|
|
44
43
|
onCancel: () => void;
|
|
45
44
|
onConfirm: () => void;
|
|
46
45
|
}
|
|
47
|
-
export declare function RenamePromptModal({ renamePrompt, renameValue, setRenameValue, onCancel, onConfirm, }: RenamePromptModalProps):
|
|
46
|
+
export declare function RenamePromptModal({ renamePrompt, renameValue, setRenameValue, onCancel, onConfirm, }: RenamePromptModalProps): import("react").JSX.Element;
|
|
48
47
|
export {};
|
|
49
48
|
//# sourceMappingURL=FileExplorerModals.d.ts.map
|
|
@@ -66,10 +66,10 @@ export declare function useMemoryManagerState(): {
|
|
|
66
66
|
drawerActive: boolean;
|
|
67
67
|
loadMemories: () => void;
|
|
68
68
|
loadMore: () => void;
|
|
69
|
-
openCreate: () => void
|
|
69
|
+
openCreate: () => Promise<void>;
|
|
70
70
|
openMemory: (id: string) => void;
|
|
71
71
|
openEdit: (id?: string) => void;
|
|
72
|
-
cancelEditor: () => void
|
|
72
|
+
cancelEditor: () => Promise<void>;
|
|
73
73
|
submitCreate: () => void;
|
|
74
74
|
submitUpdate: () => void;
|
|
75
75
|
confirmDelete: () => void;
|
|
@@ -3,7 +3,7 @@ type HistoryPayload = Extract<WSServerMessage, {
|
|
|
3
3
|
type: 'git.history';
|
|
4
4
|
}>['payload'];
|
|
5
5
|
type HistoryCommit = HistoryPayload['commits'][number];
|
|
6
|
-
export declare const COMMIT_DETAIL_PANEL_CLASS = "flex h-[44%] min-h-[230px] max-h-[460px] shrink-0 flex-col overflow-hidden border-t border-border/70 bg-card/35 shadow-[0_-16px_40px_-34px_hsl(var(--primary)/0.8)] sm:h-[36%] sm:max-h-[390px] sm:flex-row";
|
|
6
|
+
export declare const COMMIT_DETAIL_PANEL_CLASS = "ws-commit-detail flex h-[44%] min-h-[230px] max-h-[460px] shrink-0 flex-col overflow-hidden border-t border-border/70 bg-card/35 shadow-[0_-16px_40px_-34px_hsl(var(--primary)/0.8)] sm:h-[36%] sm:max-h-[390px] sm:flex-row";
|
|
7
7
|
interface GraphLayout {
|
|
8
8
|
lanes: number[];
|
|
9
9
|
laneCount: number;
|
|
@@ -1,2 +1,23 @@
|
|
|
1
|
-
export
|
|
1
|
+
export interface IntakeRecord {
|
|
2
|
+
id: string;
|
|
3
|
+
title: string;
|
|
4
|
+
originalRequest?: string;
|
|
5
|
+
normalizedSummary?: string;
|
|
6
|
+
requestType: string;
|
|
7
|
+
status: string;
|
|
8
|
+
priority: string;
|
|
9
|
+
requestedBy?: string;
|
|
10
|
+
businessGoal?: string;
|
|
11
|
+
targetUsers?: string[];
|
|
12
|
+
expectedOutcome?: string;
|
|
13
|
+
scopeNotes?: string;
|
|
14
|
+
constraints?: string[];
|
|
15
|
+
isVibeMode?: boolean;
|
|
16
|
+
updatedAt: number;
|
|
17
|
+
createdAt: number;
|
|
18
|
+
}
|
|
19
|
+
export interface RequirementIntakeViewProps {
|
|
20
|
+
onStartSdd?: (intake: IntakeRecord) => void;
|
|
21
|
+
}
|
|
22
|
+
export declare function RequirementIntakeView({ onStartSdd, }?: RequirementIntakeViewProps): React.ReactElement;
|
|
2
23
|
//# sourceMappingURL=RequirementIntakeView.d.ts.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* SddHub — unified tabbed container
|
|
3
|
-
*
|
|
4
|
-
*
|
|
2
|
+
* SddHub — unified tabbed container for the entire spec-driven workflow:
|
|
3
|
+
* Requirements Intake → New SDD Project / Wizard → Live Board → Specifications.
|
|
4
|
+
* Each tab renders its respective component without unmounting sibling tabs.
|
|
5
5
|
*
|
|
6
6
|
* Listens for `sdd.run.started` (via the wizard store) so a run kicked off
|
|
7
7
|
* from Specs, Kanban, or the Project tab always flips to the Live Board.
|
|
@@ -25,5 +25,5 @@ declare namespace DialogFooter {
|
|
|
25
25
|
}
|
|
26
26
|
declare const DialogTitle: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
27
27
|
declare const DialogDescription: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
28
|
-
export { Dialog, DialogContent,
|
|
28
|
+
export { Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle };
|
|
29
29
|
//# sourceMappingURL=dialog.d.ts.map
|
|
@@ -24,5 +24,5 @@ declare function DropdownMenuShortcut({ className, ...props }: React.HTMLAttribu
|
|
|
24
24
|
declare namespace DropdownMenuShortcut {
|
|
25
25
|
var displayName: string;
|
|
26
26
|
}
|
|
27
|
-
export { DropdownMenu,
|
|
27
|
+
export { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuTrigger, };
|
|
28
28
|
//# sourceMappingURL=dropdown-menu.d.ts.map
|
|
@@ -11,7 +11,7 @@ interface EmptyStateAction {
|
|
|
11
11
|
onClick: () => void;
|
|
12
12
|
}
|
|
13
13
|
interface EmptyStateProps {
|
|
14
|
-
/** Icon component (lucide-react element). Rendered in a
|
|
14
|
+
/** Icon component (lucide-react element). Rendered in a square tile. */
|
|
15
15
|
icon?: ReactNode;
|
|
16
16
|
/** Primary heading. */
|
|
17
17
|
title: string;
|
|
@@ -4,5 +4,5 @@ declare const Tabs: React.ForwardRefExoticComponent<TabsPrimitive.TabsProps & Re
|
|
|
4
4
|
declare const TabsList: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsListProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
5
5
|
declare const TabsTrigger: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
6
6
|
declare const TabsContent: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
-
export { Tabs, TabsList, TabsTrigger
|
|
7
|
+
export { Tabs, TabsContent, TabsList, TabsTrigger };
|
|
8
8
|
//# sourceMappingURL=tabs.d.ts.map
|
package/dist/index.html
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
|
|
12
12
|
<meta name="apple-mobile-web-app-title" content="WrongStack" />
|
|
13
13
|
<title>WrongStack WebUI</title>
|
|
14
|
-
<script type="module" crossorigin src="/assets/index-
|
|
14
|
+
<script type="module" crossorigin src="/assets/index-DLjaZSCH.js"></script>
|
|
15
15
|
<link rel="modulepreload" crossorigin href="/assets/rolldown-runtime-hePW80VL.js">
|
|
16
16
|
<link rel="modulepreload" crossorigin href="/assets/react-core-wiHys0m2.js">
|
|
17
17
|
<link rel="modulepreload" crossorigin href="/assets/xyflow-BqDBClm9.js">
|
|
@@ -19,26 +19,26 @@
|
|
|
19
19
|
<link rel="modulepreload" crossorigin href="/assets/vendor-V3ydTHqN.js">
|
|
20
20
|
<link rel="modulepreload" crossorigin href="/assets/chat-BITJe8-v.js">
|
|
21
21
|
<link rel="modulepreload" crossorigin href="/assets/commandPalette-BovBiPec.js">
|
|
22
|
-
<link rel="modulepreload" crossorigin href="/assets/common-
|
|
22
|
+
<link rel="modulepreload" crossorigin href="/assets/common-ipsuLC3n.js">
|
|
23
23
|
<link rel="modulepreload" crossorigin href="/assets/setup-qooXjj4V.js">
|
|
24
24
|
<link rel="modulepreload" crossorigin href="/assets/toasts-DZ6HdKgG.js">
|
|
25
25
|
<link rel="modulepreload" crossorigin href="/assets/vite-preload-BZ1Pz5am.js">
|
|
26
|
-
<link rel="modulepreload" crossorigin href="/assets/i18n-
|
|
26
|
+
<link rel="modulepreload" crossorigin href="/assets/i18n-CvJB4U4z.js">
|
|
27
27
|
<link rel="modulepreload" crossorigin href="/assets/utils-CKsqCaP8.js">
|
|
28
28
|
<link rel="modulepreload" crossorigin href="/assets/ui-store-DC3mkswy.js">
|
|
29
29
|
<link rel="modulepreload" crossorigin href="/assets/fonts-DRGbd-AM.js">
|
|
30
|
-
<link rel="modulepreload" crossorigin href="/assets/config-store-
|
|
31
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
32
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
30
|
+
<link rel="modulepreload" crossorigin href="/assets/config-store-mWuYCild.js">
|
|
31
|
+
<link rel="modulepreload" crossorigin href="/assets/mailbox-store-ZQO_Rv6E.js">
|
|
32
|
+
<link rel="modulepreload" crossorigin href="/assets/view-navigation-DTs4cSQ6.js">
|
|
33
|
+
<link rel="modulepreload" crossorigin href="/assets/chat-store-BDVZSmod.js">
|
|
33
34
|
<link rel="modulepreload" crossorigin href="/assets/codemap-activity-store-Ha7XbGgq.js">
|
|
34
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
35
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
36
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
37
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
38
|
-
<link rel="modulepreload" crossorigin href="/assets/input-ag1CrUiS.js">
|
|
35
|
+
<link rel="modulepreload" crossorigin href="/assets/stores-D5loyGLL.js">
|
|
36
|
+
<link rel="modulepreload" crossorigin href="/assets/dialog-b-Ai37sa.js">
|
|
37
|
+
<link rel="modulepreload" crossorigin href="/assets/button-BbeB5Qm8.js">
|
|
38
|
+
<link rel="modulepreload" crossorigin href="/assets/input-BA6D2L3K.js">
|
|
39
39
|
<link rel="stylesheet" crossorigin href="/assets/xyflow-DLioOiRN.css">
|
|
40
40
|
<link rel="stylesheet" crossorigin href="/assets/vendor-jL-bRT8f.css">
|
|
41
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
41
|
+
<link rel="stylesheet" crossorigin href="/assets/index-DiX5j910.css">
|
|
42
42
|
</head>
|
|
43
43
|
<body>
|
|
44
44
|
<div id="root"></div>
|