maestro-flow 0.4.8 → 0.4.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (94) hide show
  1. package/dashboard/dist/assets/{ArtifactsPage-CVh0Z2I2.js → ArtifactsPage-BLvAqQlQ.js} +1 -1
  2. package/dashboard/dist/assets/{ChatInput-CBI3qHQQ.js → ChatInput-DU9YGZKX.js} +1 -1
  3. package/dashboard/dist/assets/{ChatPage-BjJ9CYox.js → ChatPage-DYHfheXC.js} +1 -1
  4. package/dashboard/dist/assets/{CollabPage-CprGGO9y.js → CollabPage-CSlmvEa-.js} +1 -1
  5. package/dashboard/dist/assets/{ExecutionPanel-CClxD7cH.js → ExecutionPanel-RYWf0dYC.js} +1 -1
  6. package/dashboard/dist/assets/{KanbanPage-copqjdPg.js → KanbanPage-N55Iv0-X.js} +1 -1
  7. package/dashboard/dist/assets/{MaestroCoordinatePage-CioZjQ9N.js → MaestroCoordinatePage-BxwZ6yy5.js} +1 -1
  8. package/dashboard/dist/assets/{MarkdownRenderer-CtUhoxCT.js → MarkdownRenderer-ZGtOY7Ti.js} +1 -1
  9. package/dashboard/dist/assets/{McpPage-BcPPcJpr.js → McpPage-Im6s4pGR.js} +1 -1
  10. package/dashboard/dist/assets/{MeetingRoomPage-BgmAKxU-.js → MeetingRoomPage-CxHRn1xx.js} +1 -1
  11. package/dashboard/dist/assets/{OutputPanel-DgT3gMyp.js → OutputPanel-DaL8c1i5.js} +1 -1
  12. package/dashboard/dist/assets/{ProblemsPanel-BmG7rxoG.js → ProblemsPanel-BQTd5812.js} +1 -1
  13. package/dashboard/dist/assets/{RequirementBoardPage-k8YoeQ0r.js → RequirementBoardPage-22y9u1qh.js} +1 -1
  14. package/dashboard/dist/assets/{RequirementPage-Da2354px.js → RequirementPage-_mO743Xm.js} +1 -1
  15. package/dashboard/dist/assets/{RoomsPage-BtqDiYaU.js → RoomsPage-CExTbOGr.js} +1 -1
  16. package/dashboard/dist/assets/{SpecsPage-ByPVH_M3.js → SpecsPage-gr4KX51-.js} +1 -1
  17. package/dashboard/dist/assets/{TeamsPage-sFDLN30L.js → TeamsPage-BxEXLb5g.js} +1 -1
  18. package/dashboard/dist/assets/{TreeBrowser-oEx8YJXV.js → TreeBrowser-CVtPF5C9.js} +1 -1
  19. package/dashboard/dist/assets/{WorkflowPage-JrX7CVHh.js → WorkflowPage-BoN18Lhs.js} +1 -1
  20. package/dashboard/dist/assets/{arrow-left-DYvgSdIH.js → arrow-left-C5ROg97G.js} +1 -1
  21. package/dashboard/dist/assets/{check-jcgYBWVR.js → check-Bs8PM0tQ.js} +1 -1
  22. package/dashboard/dist/assets/{chevron-right-DvZ5sMOg.js → chevron-right-SmErd_1F.js} +1 -1
  23. package/dashboard/dist/assets/{circle-DYT-zoRZ.js → circle-CjpslL_D.js} +1 -1
  24. package/dashboard/dist/assets/{circle-alert-Bfbv3gt4.js → circle-alert-CuzAg2fd.js} +1 -1
  25. package/dashboard/dist/assets/{circle-check-D82WnpbI.js → circle-check-BIkDU5D5.js} +1 -1
  26. package/dashboard/dist/assets/{circle-check-big-CPVD1GKF.js → circle-check-big-CYctV8bK.js} +1 -1
  27. package/dashboard/dist/assets/{code-B3bKFGI4.js → code-DoB7rfxt.js} +1 -1
  28. package/dashboard/dist/assets/{columns-3-BeMAQCix.js → columns-3-Ch5KIyRa.js} +1 -1
  29. package/dashboard/dist/assets/{download-BCtpoWYB.js → download-DadtG2Nr.js} +1 -1
  30. package/dashboard/dist/assets/{folder-CTj6SNNu.js → folder-B8ODoZfb.js} +1 -1
  31. package/dashboard/dist/assets/{index-BxR_3IbJ.js → index-BL4h1OKY.js} +1 -1
  32. package/dashboard/dist/assets/{index-DpcPd-UG.js → index-DQIlX2w_.js} +4 -4
  33. package/dashboard/dist/assets/{index-CWBJLu42.js → index-DaFwSmVJ.js} +10 -10
  34. package/dashboard/dist/assets/{list-BMv8pIQn.js → list-CI-XIPZh.js} +1 -1
  35. package/dashboard/dist/assets/{loader-DdM4VOgF.js → loader-DpdMoQvh.js} +1 -1
  36. package/dashboard/dist/assets/{minus-D15s2E__.js → minus-BVbfXGrC.js} +1 -1
  37. package/dashboard/dist/assets/{pen-line-DO6o4xWz.js → pen-line-CR8GaHt-.js} +1 -1
  38. package/dashboard/dist/assets/{pencil-qGxg9jOe.js → pencil-I7GE0y29.js} +1 -1
  39. package/dashboard/dist/assets/{proxy-DOffTzwA.js → proxy-CcYyZZWI.js} +1 -1
  40. package/dashboard/dist/assets/{refresh-cw-C9UNdLCy.js → refresh-cw-BG9V_T4R.js} +1 -1
  41. package/dashboard/dist/assets/{rows-2-CifAA5SL.js → rows-2-DP6NjQFk.js} +1 -1
  42. package/dashboard/dist/assets/{search-pe7pU1YN.js → search-b78eLlw2.js} +1 -1
  43. package/dashboard/dist/assets/{shallow-r7YynQYA.js → shallow-CJEesgtu.js} +1 -1
  44. package/dashboard/dist/assets/{table-Bh772iIw.js → table-B_lk-a1d.js} +1 -1
  45. package/dashboard/dist/assets/{team-types-C_HqX2p2.js → team-types-Se7f9LfJ.js} +1 -1
  46. package/dashboard/dist/assets/{terminal-EpmtGBlw.js → terminal-DXx4tvzq.js} +1 -1
  47. package/dashboard/dist/assets/{trash-2-Xen46iNQ.js → trash-2-CVh9mnRj.js} +1 -1
  48. package/dashboard/dist/assets/{users-BLueDPxF.js → users-Da9zGME5.js} +1 -1
  49. package/dashboard/dist/assets/{zap-DsQCPF61.js → zap-C0zaC7gJ.js} +1 -1
  50. package/dashboard/dist/index.html +1 -1
  51. package/dashboard/dist-server/dashboard/src/server/agents/adapter-factory.js +4 -0
  52. package/dashboard/dist-server/dashboard/src/server/agents/adapter-factory.js.map +1 -1
  53. package/dashboard/dist-server/dashboard/src/server/agents/agy-adapter.d.ts +39 -0
  54. package/dashboard/dist-server/dashboard/src/server/agents/agy-adapter.js +423 -0
  55. package/dashboard/dist-server/dashboard/src/server/agents/agy-adapter.js.map +1 -0
  56. package/dashboard/dist-server/dashboard/src/server/agents/codex-cli-adapter.d.ts +6 -0
  57. package/dashboard/dist-server/dashboard/src/server/agents/codex-cli-adapter.js +109 -0
  58. package/dashboard/dist-server/dashboard/src/server/agents/codex-cli-adapter.js.map +1 -1
  59. package/dashboard/dist-server/dashboard/src/shared/constants.js +2 -0
  60. package/dashboard/dist-server/dashboard/src/shared/constants.js.map +1 -1
  61. package/dashboard/dist-server/shared/agent-types.d.ts +1 -1
  62. package/dist/shared/agent-types.d.ts +1 -1
  63. package/dist/shared/agent-types.d.ts.map +1 -1
  64. package/dist/src/agents/cli-agent-runner.d.ts.map +1 -1
  65. package/dist/src/agents/cli-agent-runner.js +3 -0
  66. package/dist/src/agents/cli-agent-runner.js.map +1 -1
  67. package/dist/src/commands/hooks.d.ts +64 -0
  68. package/dist/src/commands/hooks.d.ts.map +1 -1
  69. package/dist/src/commands/hooks.js +107 -0
  70. package/dist/src/commands/hooks.js.map +1 -1
  71. package/dist/src/commands/install.d.ts.map +1 -1
  72. package/dist/src/commands/install.js +17 -3
  73. package/dist/src/commands/install.js.map +1 -1
  74. package/dist/src/commands/update.d.ts.map +1 -1
  75. package/dist/src/commands/update.js +53 -0
  76. package/dist/src/commands/update.js.map +1 -1
  77. package/dist/src/config/cli-tools-config.d.ts +19 -5
  78. package/dist/src/config/cli-tools-config.d.ts.map +1 -1
  79. package/dist/src/config/cli-tools-config.js +77 -32
  80. package/dist/src/config/cli-tools-config.js.map +1 -1
  81. package/dist/src/config/cli-tools-defaults.json +2 -1
  82. package/dist/src/core/component-defs.d.ts.map +1 -1
  83. package/dist/src/core/component-defs.js +53 -0
  84. package/dist/src/core/component-defs.js.map +1 -1
  85. package/dist/src/tui/install-ui/InstallExecution.d.ts.map +1 -1
  86. package/dist/src/tui/install-ui/InstallExecution.js +5 -3
  87. package/dist/src/tui/install-ui/InstallExecution.js.map +1 -1
  88. package/dist/src/utils/update-notices.d.ts +62 -0
  89. package/dist/src/utils/update-notices.d.ts.map +1 -0
  90. package/dist/src/utils/update-notices.js +178 -0
  91. package/dist/src/utils/update-notices.js.map +1 -0
  92. package/package.json +82 -82
  93. package/shared/agent-types.ts +1 -1
  94. package/workflows/agy-instructions.md +124 -0
@@ -1,4 +1,4 @@
1
- import{d as e}from"./index-DpcPd-UG.js";/**
1
+ import{d as e}from"./index-DQIlX2w_.js";/**
2
2
  * @license lucide-react v0.577.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{d as o}from"./index-DpcPd-UG.js";/**
1
+ import{d as o}from"./index-DQIlX2w_.js";/**
2
2
  * @license lucide-react v0.577.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{d as c}from"./index-DpcPd-UG.js";/**
1
+ import{d as c}from"./index-DQIlX2w_.js";/**
2
2
  * @license lucide-react v0.577.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1 +1 @@
1
- import{z as b}from"./index-DpcPd-UG.js";const i=t=>Symbol.iterator in t,c=t=>"entries"in t,f=(t,e)=>{const n=t instanceof Map?t:new Map(t.entries()),r=e instanceof Map?e:new Map(e.entries());if(n.size!==r.size)return!1;for(const[o,s]of n)if(!r.has(o)||!Object.is(s,r.get(o)))return!1;return!0},p=(t,e)=>{const n=t[Symbol.iterator](),r=e[Symbol.iterator]();let o=n.next(),s=r.next();for(;!o.done&&!s.done;){if(!Object.is(o.value,s.value))return!1;o=n.next(),s=r.next()}return!!o.done&&!!s.done};function a(t,e){return Object.is(t,e)?!0:typeof t!="object"||t===null||typeof e!="object"||e===null||Object.getPrototypeOf(t)!==Object.getPrototypeOf(e)?!1:i(t)&&i(e)?c(t)&&c(e)?f(t,e):p(t,e):f({entries:()=>Object.entries(t)},{entries:()=>Object.entries(e)})}function m(t){const e=b.useRef(void 0);return n=>{const r=t(n);return a(e.current,r)?e.current:e.current=r}}export{m as u};
1
+ import{z as b}from"./index-DQIlX2w_.js";const i=t=>Symbol.iterator in t,c=t=>"entries"in t,f=(t,e)=>{const n=t instanceof Map?t:new Map(t.entries()),r=e instanceof Map?e:new Map(e.entries());if(n.size!==r.size)return!1;for(const[o,s]of n)if(!r.has(o)||!Object.is(s,r.get(o)))return!1;return!0},p=(t,e)=>{const n=t[Symbol.iterator](),r=e[Symbol.iterator]();let o=n.next(),s=r.next();for(;!o.done&&!s.done;){if(!Object.is(o.value,s.value))return!1;o=n.next(),s=r.next()}return!!o.done&&!!s.done};function a(t,e){return Object.is(t,e)?!0:typeof t!="object"||t===null||typeof e!="object"||e===null||Object.getPrototypeOf(t)!==Object.getPrototypeOf(e)?!1:i(t)&&i(e)?c(t)&&c(e)?f(t,e):p(t,e):f({entries:()=>Object.entries(t)},{entries:()=>Object.entries(e)})}function m(t){const e=b.useRef(void 0);return n=>{const r=t(n);return a(e.current,r)?e.current:e.current=r}}export{m as u};
@@ -1,4 +1,4 @@
1
- import{j as e,X as y,u as b,S as f,r as h,a as u,d as N}from"./index-DpcPd-UG.js";function Y({open:t,onClose:a,title:s,children:i}){return e.jsxs("aside",{style:{width:t?360:0,opacity:t?1:0,transition:"width 200ms ease, opacity 200ms ease"},className:"shrink-0 border-l border-border bg-bg-primary overflow-hidden flex flex-col",children:[e.jsxs("div",{className:"flex items-center justify-between px-[var(--spacing-4)] py-[var(--spacing-3)] border-b border-border-divider min-h-[48px] shrink-0",children:[e.jsx("span",{className:"text-[length:var(--font-size-sm)] font-[var(--font-weight-semibold)] text-text-primary",children:s}),e.jsx("button",{type:"button",onClick:a,"aria-label":"Close detail panel",className:["flex items-center justify-center w-7 h-7 rounded-[var(--radius-md)]","text-text-tertiary hover:text-text-primary hover:bg-bg-hover","transition-colors duration-[var(--duration-fast)] ease-[var(--ease-notion)]","focus-visible:outline-none focus-visible:shadow-[var(--shadow-focus-ring)]"].join(" "),children:e.jsx(y,{size:14})})]}),e.jsx("div",{className:"flex-1 overflow-y-auto p-[var(--spacing-4)]",children:i})]})}const w={not_started:"rounded-full",planning:"rotate-45 rounded-none",executing:"rounded-full",verifying:"rotate-45 rounded-none",reviewing:"rounded-full",completed:"rounded-full",blocked:"rounded-[var(--radius-sm)]"},_={not_started:"status.not_started",planning:"status.planning",executing:"status.executing",verifying:"status.verifying",reviewing:"status.reviewing",completed:"status.completed",blocked:"status.blocked"},k={not_started:"var(--color-status-bg-not-started)",planning:"var(--color-status-bg-planning)",executing:"var(--color-status-bg-executing)",verifying:"var(--color-status-bg-verifying)",reviewing:"var(--color-status-bg-reviewing)",completed:"var(--color-status-bg-completed)",blocked:"var(--color-status-bg-blocked)"};function z({status:t,showLabel:a=!0,compact:s=!1,cardVariant:i}){const{t:r}=b(),l=f[t],x=w[t],o=_[t],c=r(o),n=k[t],d=t==="executing",p=s?"w-1.5 h-1.5":"w-2 h-2";return e.jsxs("span",{className:["inline-flex items-center gap-[var(--spacing-1-5)]",i?"rounded-full":"rounded-[var(--radius-sm)]",s?"":i?"px-[var(--spacing-2)] py-[var(--spacing-0-5)]":"px-[var(--spacing-1-5)] py-[var(--spacing-0-5)]"].join(" "),style:s?void 0:{backgroundColor:n},role:"status","aria-label":`Status: ${c}`,children:[e.jsxs("span",{className:"relative inline-flex","aria-hidden":"true",children:[e.jsx("span",{className:`inline-block ${p} ${x}`,style:{backgroundColor:l}}),d&&e.jsx("span",{className:`absolute inset-0 inline-block ${p} rounded-full animate-ping opacity-40 motion-reduce:hidden`,style:{backgroundColor:l}})]}),a&&!s&&e.jsx("span",{className:"text-[length:var(--font-size-xs)] font-[var(--font-weight-semibold)] leading-[var(--line-height-tight)] capitalize",style:{color:l},children:c})]})}function S({completed:t,total:a,color:s}){const i=a>0?Math.round(t/a*100):0,r=s??"var(--color-status-completed)",l=t>=a&&a>0;return e.jsxs("div",{className:"flex items-center gap-[var(--spacing-2)] w-full",children:[e.jsx("div",{className:"flex-1 h-[5px] rounded-full bg-border overflow-hidden",role:"progressbar","aria-valuenow":t,"aria-valuemin":0,"aria-valuemax":a,"aria-label":`${t} of ${a} tasks completed`,children:e.jsx("div",{className:["h-full rounded-full min-w-[6px]","transition-[width] duration-[var(--duration-smooth)] ease-[var(--ease-out)]","motion-reduce:transition-none",l?"motion-safe:animate-[progress-complete_0.3s_ease-out]":""].join(" "),style:{width:`${i}%`,backgroundColor:r}})}),e.jsxs("span",{className:"text-[length:var(--font-size-xs)] font-[var(--font-weight-medium)] text-text-secondary font-mono whitespace-nowrap tabular-nums min-w-[32px]",children:[t,"/",a]})]})}const C={0:"No priority",1:"Urgent",2:"High",3:"Medium",4:"Low"},A={0:"#A09D97",1:"#C46555",2:"#B89540",3:"#5B8DB8",4:"#A09D97"};function j(t){var x,o;const a=t,s=a.task_id??a.id??"",i=((x=a.meta)==null?void 0:x.status)??a.status??"pending",r=((o=a.meta)==null?void 0:o.wave)??a.wave??0,l=a.convergence;return{id:s,title:a.title??"",description:a.description??"",type:a.type??"feature",priority:a.priority??"medium",effort:a.effort??"",action:a.action??"",scope:a.scope??"",focus_paths:a.focus_paths??[],depends_on:a.depends_on??[],parallel_group:a.parallel_group??null,convergence:{criteria:(l==null?void 0:l.criteria)??[],verification:(l==null?void 0:l.verification)??"",definition_of_done:(l==null?void 0:l.definition_of_done)??""},files:Array.isArray(a.files)?a.files.map(c=>typeof c=="string"?{path:c,action:"",target:"",change:""}:c):[],implementation:a.implementation??[],test:{commands:[],unit:[],integration:[],success_metrics:[],...a.test??{}},reference:{pattern:"",files:a.read_first??[],examples:null,...a.reference??{}},rationale:{chosen_approach:"",decision_factors:[],tradeoffs:null,...a.rationale??{}},risks:a.risks??[],code_skeleton:a.code_skeleton??null,doc_context:{affected_features:[],affected_components:[],affected_requirements:[],adr_ids:[],...a.doc_context??{}},meta:{status:i,estimated_time:a.estimated_time??null,risk:a.risk??"low",autonomous:a.autonomous??!1,checkpoint:a.checkpoint??!1,wave:r,execution_group:a.execution_group??null,executor:a.executor??""}}}function T(t){const[a,s]=h.useState([]),[i,r]=h.useState(!1),[l,x]=h.useState(null),o=u(d=>{var p;return t!==null?(p=d.board)==null?void 0:p.phases.find(m=>m.phase===t):void 0}),c=(o==null?void 0:o.updated_at)??null,n=h.useRef(null);return h.useEffect(()=>{if(t===null){s([]),r(!1),x(null),n.current=null;return}if(c===n.current&&a.length>0)return;n.current=c;let d=!1;return r(!0),x(null),fetch(`/api/phases/${t}/tasks`).then(p=>{if(!p.ok)throw new Error(`HTTP ${p.status}`);return p.json()}).then(p=>{d||(s(p.map(j)),r(!1))}).catch(p=>{d||(x(p.message),r(!1))}),()=>{d=!0}},[t,c]),{tasks:a,loading:i,error:l}}function D(t){const[a,s]=h.useState([]),[i,r]=h.useState(!1),[l,x]=h.useState(null);return h.useEffect(()=>{if(!t){s([]),r(!1),x(null);return}let o=!1;return r(!0),x(null),fetch(`/api/issues/${encodeURIComponent(t)}/tasks`).then(c=>{if(!c.ok)throw new Error(`HTTP ${c.status}`);return c.json()}).then(c=>{o||(s(c.map(j)),r(!1))}).catch(c=>{o||(x(c.message),r(!1))}),()=>{o=!0}},[t]),{tasks:a,loading:i,error:l}}const $={pending:"#A09D97",in_progress:"#B89540",completed:"#5A9E78",failed:"#C46555"};function E({tasks:t}){const[a,s]=h.useState(new Set),i=r=>{s(l=>{const x=new Set(l);return x.has(r)?x.delete(r):x.add(r),x})};return e.jsx("div",{className:"space-y-1",children:t.map(r=>{const l=a.has(r.id),x=$[r.meta.status]??"#A09D97";return e.jsxs("div",{children:[e.jsxs("button",{type:"button",onClick:()=>i(r.id),className:"w-full flex items-center gap-2 py-1.5 px-1 rounded text-left transition-colors hover:bg-[var(--color-bg-hover)]",children:[e.jsx("span",{className:"w-2 h-2 rounded-full shrink-0",style:{backgroundColor:x}}),e.jsx("span",{className:"shrink-0 font-mono",style:{fontSize:"var(--font-size-xs)",color:"var(--color-text-tertiary)"},children:r.id}),e.jsx("span",{className:"truncate flex-1",style:{fontSize:"var(--font-size-sm)",color:"var(--color-text-secondary)"},children:r.title}),r.meta.wave>0&&e.jsxs("span",{className:"shrink-0",style:{fontSize:"var(--font-size-xs)",color:"var(--color-text-tertiary)"},children:["W",r.meta.wave]}),e.jsx("span",{className:"shrink-0",style:{fontSize:"var(--font-size-xs)",color:"var(--color-text-tertiary)"},children:l?"▾":"▸"})]}),l&&e.jsxs("div",{className:"ml-5 pl-3 py-2 space-y-2",style:{borderLeft:"2px solid var(--color-border-divider)"},children:[r.description&&e.jsx("p",{className:"whitespace-pre-wrap leading-relaxed",style:{fontSize:"var(--font-size-xs)",color:"var(--color-text-secondary)"},children:r.description}),r.convergence.criteria.length>0&&e.jsxs("div",{children:[e.jsx("div",{className:"text-[9px] font-semibold uppercase tracking-wider mb-1",style:{color:"var(--color-text-tertiary)"},children:"Convergence"}),e.jsx("ul",{className:"space-y-0.5",children:r.convergence.criteria.map((o,c)=>e.jsxs("li",{className:"font-mono",style:{fontSize:"var(--font-size-xs)",color:"var(--color-text-secondary)"},children:["• ",o]},c))})]}),r.files.length>0&&e.jsxs("div",{children:[e.jsx("div",{className:"text-[9px] font-semibold uppercase tracking-wider mb-1",style:{color:"var(--color-text-tertiary)"},children:"Files"}),e.jsx("ul",{className:"space-y-0.5",children:r.files.map((o,c)=>e.jsxs("li",{className:"font-mono truncate",style:{fontSize:"var(--font-size-xs)",color:"var(--color-text-secondary)"},title:o.path,children:[o.action?`${o.action} `:"",o.path]},c))})]}),r.implementation.length>0&&e.jsxs("div",{children:[e.jsx("div",{className:"text-[9px] font-semibold uppercase tracking-wider mb-1",style:{color:"var(--color-text-tertiary)"},children:"Implementation"}),e.jsx("ol",{className:"space-y-0.5 list-decimal list-inside",children:r.implementation.map((o,c)=>e.jsx("li",{style:{fontSize:"var(--font-size-xs)",color:"var(--color-text-secondary)"},children:o},c))})]}),r.risks.length>0&&e.jsxs("div",{children:[e.jsx("div",{className:"text-[9px] font-semibold uppercase tracking-wider mb-1",style:{color:"var(--color-text-tertiary)"},children:"Risks"}),e.jsx("ul",{className:"space-y-0.5",children:r.risks.map((o,c)=>e.jsxs("li",{style:{fontSize:"var(--font-size-xs)",color:"var(--color-accent-red)"},children:["⚠ ",o]},c))})]}),r.depends_on.length>0&&e.jsxs("div",{className:"font-mono",style:{fontSize:"var(--font-size-xs)",color:"var(--color-text-tertiary)"},children:["Depends on: ",r.depends_on.join(", ")]})]})]},r.id)})})}function H({selectedItem:t}){return t.type==="linearIssue"?e.jsx(W,{issue:t.issue}):t.type==="issue"?e.jsx(I,{issue:t.issue}):t.type==="task"?e.jsx(O,{task:t.task}):e.jsx(L,{phaseId:t.phaseId})}function L({phaseId:t}){const a=u(n=>n.board),s=a==null?void 0:a.phases.find(n=>n.phase===t),{tasks:i,loading:r}=T(t);if(!s)return e.jsx("div",{className:"text-[length:var(--font-size-sm)] text-text-secondary",children:"Phase not found"});const{tasks_completed:l,tasks_total:x,current_wave:o}=s.execution,c=f[s.status];return e.jsxs("div",{className:"space-y-[var(--spacing-4)]",children:[e.jsx("h3",{className:"text-[length:var(--font-size-lg)] font-[var(--font-weight-bold)] text-text-primary",children:s.title}),e.jsxs("div",{className:"flex flex-wrap gap-[var(--spacing-2)]",children:[e.jsx(z,{status:s.status}),e.jsxs("span",{className:"text-[length:10px] font-[var(--font-weight-semibold)] px-[var(--spacing-2)] py-[2px] rounded-full",style:{backgroundColor:"var(--color-bg-hover)",color:"var(--color-text-secondary)"},children:["P-",String(s.phase).padStart(2,"0")]}),s.status==="executing"&&o>0&&e.jsxs("span",{className:"text-[length:10px] font-[var(--font-weight-semibold)] px-[var(--spacing-2)] py-[2px] rounded-full",style:{backgroundColor:"var(--color-bg-hover)",color:"var(--color-text-secondary)"},children:["Wave ",o]})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-[length:10px] font-[var(--font-weight-semibold)] uppercase tracking-[0.06em] text-text-tertiary mb-[var(--spacing-2)]",children:"Goal"}),e.jsx("p",{className:"text-[length:var(--font-size-sm)] text-text-secondary leading-[1.6]",children:s.goal})]}),x>0&&e.jsxs("div",{children:[e.jsx("div",{className:"text-[length:10px] font-[var(--font-weight-semibold)] uppercase tracking-[0.06em] text-text-tertiary mb-[var(--spacing-2)]",children:"Progress"}),e.jsx(S,{completed:l,total:x,color:c})]}),s.success_criteria.length>0&&e.jsxs("div",{children:[e.jsx("div",{className:"text-[length:10px] font-[var(--font-weight-semibold)] uppercase tracking-[0.06em] text-text-tertiary mb-[var(--spacing-2)]",children:"Success Criteria"}),e.jsx("div",{children:s.success_criteria.map((n,d)=>e.jsxs("div",{className:"flex items-start gap-[var(--spacing-2)] py-[var(--spacing-1-5)] border-b border-border-divider last:border-b-0 text-[length:var(--font-size-xs)]",children:[e.jsx("span",{className:"text-text-tertiary shrink-0",children:"•"}),e.jsx("span",{className:"flex-1 text-text-secondary",children:n})]},d))})]}),s.verification.status!=="pending"&&e.jsxs("div",{children:[e.jsx("div",{className:"text-[length:10px] font-[var(--font-weight-semibold)] uppercase tracking-[0.06em] text-text-tertiary mb-[var(--spacing-2)]",children:"Verification"}),e.jsxs("div",{className:"space-y-[var(--spacing-1)]",children:[e.jsxs("div",{className:"flex items-center gap-[var(--spacing-2)] text-[length:var(--font-size-xs)]",children:[e.jsx("span",{className:`w-2 h-2 rounded-full ${s.verification.status==="passed"?"bg-[var(--color-status-completed)]":"bg-[var(--color-status-executing)]"}`}),e.jsx("span",{className:"text-text-primary capitalize",children:s.verification.status})]}),s.verification.gaps.length>0&&e.jsx("div",{className:"text-[length:var(--font-size-xs)] text-text-secondary space-y-[var(--spacing-1)]",children:s.verification.gaps.map((n,d)=>e.jsxs("div",{className:"flex items-start gap-[var(--spacing-1)] text-[#C46555]",children:[e.jsx("span",{className:"shrink-0",children:"⚠"}),e.jsx("span",{children:typeof n=="string"?n:n.description??n.id??JSON.stringify(n)})]},d))})]})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"text-[length:10px] font-[var(--font-weight-semibold)] uppercase tracking-[0.06em] text-text-tertiary mb-[var(--spacing-2)]",children:["Tasks ",s.plan.task_count>0?`(${s.execution.tasks_completed}/${s.plan.task_count})`:""]}),r?e.jsx("div",{className:"text-[length:var(--font-size-xs)] text-text-tertiary py-[var(--spacing-2)]",children:"Loading tasks..."}):i.length===0?s.plan.task_ids.length>0?e.jsx("div",{className:"text-[length:var(--font-size-xs)] text-text-secondary",children:s.plan.task_ids.map(n=>e.jsxs("div",{className:"flex items-center gap-[var(--spacing-2)] py-[var(--spacing-1-5)] border-b border-border-divider last:border-b-0",children:[e.jsx("span",{className:"w-3.5 h-3.5 rounded-[4px] border-[1.5px] border-border shrink-0"}),e.jsx("span",{className:"text-text-primary",children:n})]},n))}):e.jsx("div",{className:"text-[length:var(--font-size-xs)] text-text-tertiary py-[var(--spacing-2)]",children:"No tasks"}):e.jsx("div",{children:i.map(n=>{const d=n.meta.status==="completed",p=d?"var(--color-status-completed)":n.meta.status==="in_progress"?"var(--color-status-executing)":"var(--color-text-tertiary)",m=d?"Done":n.meta.status==="in_progress"?"Running":n.meta.status==="failed"?"Failed":"Queued";return e.jsxs("div",{className:"flex items-center gap-[var(--spacing-2)] py-[var(--spacing-1-5)] border-b border-border-divider last:border-b-0 text-[length:var(--font-size-xs)]",children:[e.jsx("span",{className:["w-3.5 h-3.5 rounded-[4px] border-[1.5px] shrink-0",d?"bg-[var(--color-status-completed)] border-[var(--color-status-completed)]":"border-border"].join(" ")}),e.jsx("span",{className:"flex-1 text-text-primary",children:n.title}),e.jsx("span",{className:"text-[length:10px] font-[var(--font-weight-medium)] shrink-0",style:{color:p},children:m})]},n.id)})})]}),s.requirements.length>0&&e.jsxs("div",{children:[e.jsx("div",{className:"text-[length:10px] font-[var(--font-weight-semibold)] uppercase tracking-[0.06em] text-text-tertiary mb-[var(--spacing-2)]",children:"Requirements"}),e.jsx("div",{children:s.requirements.map((n,d)=>e.jsxs("div",{className:"flex items-start gap-[var(--spacing-2)] py-[var(--spacing-1-5)] border-b border-border-divider last:border-b-0 text-[length:var(--font-size-xs)]",children:[e.jsx("span",{className:"text-text-tertiary shrink-0",children:"•"}),e.jsx("span",{className:"flex-1 text-text-secondary",children:n})]},d))})]}),s.spec_ref&&e.jsxs("div",{children:[e.jsx("div",{className:"text-[length:10px] font-[var(--font-weight-semibold)] uppercase tracking-[0.06em] text-text-tertiary mb-[var(--spacing-2)]",children:"Spec Reference"}),e.jsx("span",{className:"text-[length:var(--font-size-xs)] text-text-secondary font-mono",children:s.spec_ref})]}),(s.plan.complexity||s.plan.waves.length>0)&&e.jsxs("div",{children:[e.jsx("div",{className:"text-[length:10px] font-[var(--font-weight-semibold)] uppercase tracking-[0.06em] text-text-tertiary mb-[var(--spacing-2)]",children:"Plan Details"}),e.jsxs("div",{className:"text-[length:var(--font-size-xs)] text-text-secondary space-y-[var(--spacing-1)]",children:[s.plan.complexity&&e.jsxs("div",{children:["Complexity: ",e.jsx("span",{className:"text-text-primary",children:s.plan.complexity})]}),s.plan.waves.length>0&&e.jsxs("div",{children:["Waves: ",e.jsx("span",{className:"text-text-primary",children:s.plan.waves.length})," (",s.plan.waves.map((n,d)=>{var m;const p=Array.isArray(n)?n.length:((m=n.tasks)==null?void 0:m.length)??0;return`W${d+1}: ${p} tasks`}).join(", "),")"]})]})]}),s.execution.method&&e.jsxs("div",{children:[e.jsx("div",{className:"text-[length:10px] font-[var(--font-weight-semibold)] uppercase tracking-[0.06em] text-text-tertiary mb-[var(--spacing-2)]",children:"Execution"}),e.jsxs("div",{className:"text-[length:var(--font-size-xs)] text-text-secondary space-y-[var(--spacing-1)]",children:[e.jsxs("div",{children:["Method: ",e.jsx("span",{className:"text-text-primary",children:s.execution.method})]}),s.execution.commits.length>0&&e.jsxs("div",{children:[e.jsx("span",{children:"Commits:"}),e.jsx("div",{className:"mt-[var(--spacing-1)] space-y-[var(--spacing-0-5)]",children:s.execution.commits.map((n,d)=>e.jsx("div",{className:"font-mono text-[length:10px] text-text-tertiary truncate",children:typeof n=="string"?n:`${n.hash.slice(0,7)} ${n.message}`},d))})]})]})]}),s.validation.status!=="pending"&&e.jsxs("div",{children:[e.jsx("div",{className:"text-[length:10px] font-[var(--font-weight-semibold)] uppercase tracking-[0.06em] text-text-tertiary mb-[var(--spacing-2)]",children:"Validation"}),e.jsxs("div",{className:"text-[length:var(--font-size-xs)] text-text-secondary space-y-[var(--spacing-1)]",children:[e.jsxs("div",{className:"flex items-center gap-[var(--spacing-2)]",children:[e.jsx("span",{className:`w-2 h-2 rounded-full ${s.validation.status==="passed"?"bg-[var(--color-status-completed)]":"bg-[var(--color-status-executing)]"}`}),e.jsx("span",{className:"text-text-primary capitalize",children:s.validation.status})]}),s.validation.test_coverage!==null&&e.jsxs("div",{children:["Test Coverage: ",e.jsx("span",{className:"text-text-primary",children:typeof s.validation.test_coverage=="number"?`${s.validation.test_coverage}%`:`${s.validation.test_coverage.lines}%`})]}),s.validation.gaps.length>0&&e.jsx("div",{className:"space-y-[var(--spacing-1)]",children:s.validation.gaps.map((n,d)=>e.jsxs("div",{className:"flex items-start gap-[var(--spacing-1)] text-[#C46555]",children:[e.jsx("span",{className:"shrink-0",children:"⚠"}),e.jsx("span",{children:typeof n=="string"?n:n.description??n.requirement??JSON.stringify(n)})]},d))})]})]}),s.uat.test_count>0&&e.jsxs("div",{children:[e.jsx("div",{className:"text-[length:10px] font-[var(--font-weight-semibold)] uppercase tracking-[0.06em] text-text-tertiary mb-[var(--spacing-2)]",children:"UAT"}),e.jsxs("div",{className:"text-[length:var(--font-size-xs)] text-text-secondary space-y-[var(--spacing-1)]",children:[e.jsxs("div",{className:"flex items-center gap-[var(--spacing-2)]",children:[e.jsx("span",{className:"text-text-primary capitalize",children:s.uat.status}),e.jsxs("span",{className:"text-text-tertiary",children:["(",s.uat.passed,"/",s.uat.test_count," passed)"]})]}),s.uat.gaps.length>0&&e.jsx("div",{className:"space-y-[var(--spacing-1)]",children:s.uat.gaps.map((n,d)=>e.jsxs("div",{className:"flex items-start gap-[var(--spacing-1)] text-[#C46555]",children:[e.jsx("span",{className:"shrink-0",children:"⚠"}),e.jsx("span",{children:typeof n=="string"?n:n.description??JSON.stringify(n)})]},d))})]})]}),s.reflection.rounds>0&&e.jsxs("div",{children:[e.jsx("div",{className:"text-[length:10px] font-[var(--font-weight-semibold)] uppercase tracking-[0.06em] text-text-tertiary mb-[var(--spacing-2)]",children:"Reflection"}),e.jsxs("div",{className:"text-[length:var(--font-size-xs)] text-text-secondary space-y-[var(--spacing-1)]",children:[e.jsxs("div",{children:["Rounds: ",e.jsx("span",{className:"text-text-primary",children:s.reflection.rounds})]}),s.reflection.strategy_adjustments.length>0&&e.jsx("div",{children:s.reflection.strategy_adjustments.map((n,d)=>e.jsxs("div",{className:"flex items-start gap-[var(--spacing-2)] py-[var(--spacing-1)] border-b border-border-divider last:border-b-0",children:[e.jsx("span",{className:"text-text-tertiary shrink-0",children:"•"}),e.jsx("span",{children:n})]},d))})]})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-[length:10px] font-[var(--font-weight-semibold)] uppercase tracking-[0.06em] text-text-tertiary mb-[var(--spacing-2)]",children:"Activity"}),e.jsxs("div",{className:"text-[length:var(--font-size-xs)] text-text-secondary",children:[s.execution.started_at&&e.jsxs("div",{className:"flex gap-[var(--spacing-2)] py-[var(--spacing-1-5)] border-b border-border-divider",children:[e.jsx("span",{className:"font-mono text-[length:10px] text-text-tertiary whitespace-nowrap min-w-[48px]",children:v(s.execution.started_at)}),e.jsx("span",{className:"flex-1",children:"Phase execution started"})]}),o>0&&e.jsxs("div",{className:"flex gap-[var(--spacing-2)] py-[var(--spacing-1-5)] border-b border-border-divider",children:[e.jsx("span",{className:"font-mono text-[length:10px] text-text-tertiary whitespace-nowrap min-w-[48px]",children:v(s.updated_at)}),e.jsxs("span",{className:"flex-1",children:["Wave ",o," active (",x-l," remaining)"]})]}),s.execution.completed_at&&e.jsxs("div",{className:"flex gap-[var(--spacing-2)] py-[var(--spacing-1-5)]",children:[e.jsx("span",{className:"font-mono text-[length:10px] text-text-tertiary whitespace-nowrap min-w-[48px]",children:v(s.execution.completed_at)}),e.jsx("span",{className:"flex-1",children:"Phase completed"})]}),!s.execution.started_at&&!s.execution.completed_at&&e.jsx("div",{className:"py-[var(--spacing-1-5)] text-text-tertiary italic",children:"No activity yet"})]})]})]})}const R={feature:"#5B8DB8",fix:"#C46555",refactor:"#9178B5",test:"#5B8DB8",docs:"#A09D97"},B={pending:"#A09D97",in_progress:"#C99B2D",completed:"#5A9E78",failed:"#C46555"};function O({task:t}){const a=R[t.type]??"#A09D97",s=B[t.meta.status]??"#A09D97";return e.jsxs("div",{className:"space-y-[var(--spacing-4)]",children:[e.jsxs("div",{children:[e.jsx("span",{className:"text-[length:var(--font-size-xs)] font-mono text-text-tertiary",children:t.id}),e.jsx("h3",{className:"text-[length:var(--font-size-lg)] font-[var(--font-weight-bold)] text-text-primary mt-[var(--spacing-1)]",children:t.title})]}),e.jsxs("div",{className:"flex flex-wrap gap-[var(--spacing-2)]",children:[e.jsx("span",{className:"text-[length:10px] font-[var(--font-weight-semibold)] px-[var(--spacing-2)] py-[2px] rounded-full",style:{backgroundColor:`${a}20`,color:a},children:t.type}),e.jsx("span",{className:"text-[length:10px] font-[var(--font-weight-semibold)] px-[var(--spacing-2)] py-[2px] rounded-full",style:{backgroundColor:`${s}20`,color:s},children:t.meta.status.replace("_"," ")}),e.jsx("span",{className:"text-[length:10px] font-[var(--font-weight-semibold)] px-[var(--spacing-2)] py-[2px] rounded-full",style:{backgroundColor:"var(--color-bg-hover)",color:"var(--color-text-secondary)"},children:t.priority}),e.jsxs("span",{className:"text-[length:10px] font-[var(--font-weight-semibold)] px-[var(--spacing-2)] py-[2px] rounded-full",style:{backgroundColor:"var(--color-bg-hover)",color:"var(--color-text-secondary)"},children:["Wave ",t.meta.wave]})]}),t.description&&e.jsxs("div",{children:[e.jsx(g,{children:"Description"}),e.jsx("p",{className:"text-[length:var(--font-size-sm)] text-text-secondary leading-[1.6] whitespace-pre-wrap",children:t.description})]}),t.convergence.criteria.length>0&&e.jsxs("div",{children:[e.jsx(g,{children:"Convergence Criteria"}),e.jsx("div",{children:t.convergence.criteria.map((i,r)=>e.jsxs("div",{className:"flex items-start gap-[var(--spacing-2)] py-[var(--spacing-1-5)] border-b border-border-divider last:border-b-0 text-[length:var(--font-size-xs)]",children:[e.jsx("span",{className:"text-text-tertiary shrink-0",children:"•"}),e.jsx("span",{className:"flex-1 text-text-secondary font-mono",children:i})]},r))})]}),t.files.length>0&&e.jsxs("div",{children:[e.jsxs(g,{children:["Files (",t.files.length,")"]}),e.jsx("div",{children:t.files.map((i,r)=>e.jsxs("div",{className:"flex items-start gap-[var(--spacing-2)] py-[var(--spacing-1-5)] border-b border-border-divider last:border-b-0 text-[length:var(--font-size-xs)]",children:[e.jsx("span",{className:"font-mono text-text-primary shrink-0",children:i.path}),e.jsx("span",{className:"text-text-tertiary shrink-0",children:i.action})]},r))})]}),t.implementation.length>0&&e.jsxs("div",{children:[e.jsx(g,{children:"Implementation"}),e.jsx("div",{children:t.implementation.map((i,r)=>e.jsxs("div",{className:"flex items-start gap-[var(--spacing-2)] py-[var(--spacing-1-5)] border-b border-border-divider last:border-b-0 text-[length:var(--font-size-xs)]",children:[e.jsxs("span",{className:"text-text-tertiary shrink-0 tabular-nums",children:[r+1,"."]}),e.jsx("span",{className:"flex-1 text-text-secondary",children:i})]},r))})]}),t.risks.length>0&&e.jsxs("div",{children:[e.jsx(g,{children:"Risks"}),e.jsx("div",{children:t.risks.map((i,r)=>e.jsxs("div",{className:"flex items-start gap-[var(--spacing-1)] py-[var(--spacing-1)] text-[length:var(--font-size-xs)] text-[#C46555]",children:[e.jsx("span",{className:"shrink-0",children:"⚠"}),e.jsx("span",{children:i})]},r))})]}),t.depends_on.length>0&&e.jsxs("div",{children:[e.jsx(g,{children:"Dependencies"}),e.jsx("div",{className:"flex flex-wrap gap-[var(--spacing-1)]",children:t.depends_on.map(i=>e.jsx("span",{className:"text-[length:var(--font-size-xs)] font-mono text-text-secondary bg-bg-hover px-[var(--spacing-1-5)] py-[1px] rounded",children:i},i))})]})]})}function g({children:t}){return e.jsx("div",{className:"text-[length:10px] font-[var(--font-weight-semibold)] uppercase tracking-[0.06em] text-text-tertiary mb-[var(--spacing-2)]",children:t})}const P={bug:"#C46555",feature:"#5B8DB8",improvement:"#9178B5",task:"#A09D97"},U={urgent:"#C46555",high:"#B89540",medium:"#5B8DB8",low:"#A09D97"},M={idle:"#A09D97",queued:"#5B8DB8",running:"#B89540",completed:"#5A9E78",failed:"#C46555",retrying:"#B89540"};function I({issue:t}){var l;const{tasks:a,loading:s}=D((l=t.task_refs)!=null&&l.length?t.id:null),i=P[t.type]??"#A09D97",r=U[t.priority]??"#A09D97";return e.jsxs("div",{className:"space-y-[var(--spacing-4)]",children:[e.jsxs("div",{children:[e.jsx("span",{className:"text-[length:var(--font-size-xs)] font-mono text-text-tertiary",children:t.id}),e.jsx("h3",{className:"text-[length:var(--font-size-lg)] font-[var(--font-weight-bold)] text-text-primary mt-[var(--spacing-1)]",children:t.title})]}),e.jsxs("div",{className:"flex flex-wrap gap-[var(--spacing-2)]",children:[e.jsx("span",{className:"text-[length:10px] font-[var(--font-weight-semibold)] px-[var(--spacing-2)] py-[2px] rounded-full",style:{backgroundColor:`${i}20`,color:i},children:t.type}),e.jsx("span",{className:"text-[length:10px] font-[var(--font-weight-semibold)] px-[var(--spacing-2)] py-[2px] rounded-full",style:{backgroundColor:`${r}20`,color:r},children:t.priority}),e.jsx("span",{className:"text-[length:10px] font-[var(--font-weight-semibold)] px-[var(--spacing-2)] py-[2px] rounded-full",style:{backgroundColor:"var(--color-bg-hover)",color:"var(--color-text-secondary)"},children:t.status})]}),t.executor&&e.jsxs("div",{children:[e.jsx("div",{className:"text-[length:10px] font-[var(--font-weight-semibold)] uppercase tracking-[0.06em] text-text-tertiary mb-[var(--spacing-2)]",children:"Executor"}),e.jsx("span",{className:"text-[length:var(--font-size-sm)] text-text-primary",children:t.executor})]}),t.execution&&t.execution.status!=="idle"&&e.jsxs("div",{children:[e.jsx("div",{className:"text-[length:10px] font-[var(--font-weight-semibold)] uppercase tracking-[0.06em] text-text-tertiary mb-[var(--spacing-2)]",children:"Execution"}),e.jsxs("div",{className:"space-y-[var(--spacing-1)]",children:[e.jsxs("div",{className:"flex items-center gap-[var(--spacing-2)]",children:[e.jsx("span",{className:"w-2 h-2 rounded-full",style:{backgroundColor:M[t.execution.status]??"#A09D97"}}),e.jsx("span",{className:"text-[length:var(--font-size-sm)] text-text-primary",children:t.execution.status}),t.execution.retryCount>0&&e.jsxs("span",{className:"text-[length:var(--font-size-xs)] text-text-tertiary",children:["(retry ",t.execution.retryCount,")"]})]}),t.execution.startedAt&&e.jsxs("div",{className:"text-[length:var(--font-size-xs)] text-text-tertiary",children:["Started: ",v(t.execution.startedAt)]}),t.execution.completedAt&&e.jsxs("div",{className:"text-[length:var(--font-size-xs)] text-text-tertiary",children:["Completed: ",v(t.execution.completedAt)]}),t.execution.lastError&&e.jsx("div",{className:"text-[length:var(--font-size-xs)] text-[#C46555] bg-[#C4655508] rounded px-2 py-1",children:t.execution.lastError})]})]}),t.description&&e.jsxs("div",{children:[e.jsx("div",{className:"text-[length:10px] font-[var(--font-weight-semibold)] uppercase tracking-[0.06em] text-text-tertiary mb-[var(--spacing-2)]",children:"Description"}),e.jsx("p",{className:"text-[length:var(--font-size-sm)] text-text-secondary leading-[1.6] whitespace-pre-wrap",children:t.description})]}),a.length>0&&e.jsxs("div",{children:[e.jsxs("div",{className:"text-[length:10px] font-[var(--font-weight-semibold)] uppercase tracking-[0.06em] text-text-tertiary mb-[var(--spacing-2)]",children:["Execution Plan (",a.length," tasks)"]}),e.jsx(E,{tasks:a})]}),s&&e.jsx("div",{className:"text-[length:var(--font-size-xs)] text-text-tertiary",children:"Loading tasks…"}),e.jsxs("div",{children:[e.jsx("div",{className:"text-[length:10px] font-[var(--font-weight-semibold)] uppercase tracking-[0.06em] text-text-tertiary mb-[var(--spacing-2)]",children:"Activity"}),e.jsxs("div",{className:"text-[length:var(--font-size-xs)] text-text-secondary space-y-[var(--spacing-1)]",children:[e.jsxs("div",{children:["Created: ",v(t.created_at)]}),e.jsxs("div",{children:["Updated: ",v(t.updated_at)]})]})]})]})}function W({issue:t}){const a=A[t.priority];return e.jsxs("div",{className:"space-y-[var(--spacing-4)]",children:[e.jsxs("div",{children:[e.jsx("span",{className:"text-[length:var(--font-size-xs)] font-mono text-text-tertiary",children:t.identifier}),e.jsx("h3",{className:"text-[length:var(--font-size-lg)] font-[var(--font-weight-bold)] text-text-primary mt-[var(--spacing-1)]",children:t.title})]}),e.jsxs("div",{className:"flex flex-wrap gap-[var(--spacing-2)]",children:[e.jsx("span",{className:"text-[length:10px] font-[var(--font-weight-semibold)] px-[var(--spacing-2)] py-[2px] rounded-full",style:{backgroundColor:`#${t.state.color}20`,color:`#${t.state.color}`},children:t.state.name}),e.jsx("span",{className:"text-[length:10px] font-[var(--font-weight-semibold)] px-[var(--spacing-2)] py-[2px] rounded-full",style:{backgroundColor:`${a}20`,color:a},children:C[t.priority]})]}),t.assignee&&e.jsxs("div",{children:[e.jsx("div",{className:"text-[length:10px] font-[var(--font-weight-semibold)] uppercase tracking-[0.06em] text-text-tertiary mb-[var(--spacing-2)]",children:"Assignee"}),e.jsxs("div",{className:"flex items-center gap-[var(--spacing-2)]",children:[e.jsx("span",{className:"w-6 h-6 rounded-full bg-bg-hover flex items-center justify-center text-[length:var(--font-size-xs)] font-[var(--font-weight-semibold)] text-text-secondary",children:t.assignee.displayName.charAt(0).toUpperCase()}),e.jsx("span",{className:"text-[length:var(--font-size-sm)] text-text-primary",children:t.assignee.displayName})]})]}),t.labels.length>0&&e.jsxs("div",{children:[e.jsx("div",{className:"text-[length:10px] font-[var(--font-weight-semibold)] uppercase tracking-[0.06em] text-text-tertiary mb-[var(--spacing-2)]",children:"Labels"}),e.jsx("div",{className:"flex flex-wrap gap-[var(--spacing-1)]",children:t.labels.map(s=>e.jsx("span",{className:"text-[length:var(--font-size-xs)] px-2 py-0.5 rounded-full",style:{backgroundColor:`#${s.color}20`,color:`#${s.color}`},children:s.name},s.id))})]}),t.description&&e.jsxs("div",{children:[e.jsx("div",{className:"text-[length:10px] font-[var(--font-weight-semibold)] uppercase tracking-[0.06em] text-text-tertiary mb-[var(--spacing-2)]",children:"Description"}),e.jsx("p",{className:"text-[length:var(--font-size-sm)] text-text-secondary leading-[1.6] whitespace-pre-wrap",children:t.description})]}),e.jsx("div",{children:e.jsxs("a",{href:t.url,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-[var(--spacing-1)] text-[length:var(--font-size-sm)] text-accent-blue hover:underline",children:["Open in Linear",e.jsxs("svg",{className:"w-3 h-3",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),e.jsx("polyline",{points:"15 3 21 3 21 9"}),e.jsx("line",{x1:"10",y1:"14",x2:"21",y2:"3"})]})]})})]})}function v(t){const a=Date.now(),s=new Date(t).getTime(),i=a-s;if(i<0)return"just now";const r=Math.floor(i/6e4);if(r<1)return"just now";if(r<60)return`${r}m ago`;const l=Math.floor(r/60);return l<24?`${l}h ago`:`${Math.floor(l/24)}d ago`}/**
1
+ import{j as e,X as y,u as b,S as f,r as h,a as u,d as N}from"./index-DQIlX2w_.js";function Y({open:t,onClose:a,title:s,children:i}){return e.jsxs("aside",{style:{width:t?360:0,opacity:t?1:0,transition:"width 200ms ease, opacity 200ms ease"},className:"shrink-0 border-l border-border bg-bg-primary overflow-hidden flex flex-col",children:[e.jsxs("div",{className:"flex items-center justify-between px-[var(--spacing-4)] py-[var(--spacing-3)] border-b border-border-divider min-h-[48px] shrink-0",children:[e.jsx("span",{className:"text-[length:var(--font-size-sm)] font-[var(--font-weight-semibold)] text-text-primary",children:s}),e.jsx("button",{type:"button",onClick:a,"aria-label":"Close detail panel",className:["flex items-center justify-center w-7 h-7 rounded-[var(--radius-md)]","text-text-tertiary hover:text-text-primary hover:bg-bg-hover","transition-colors duration-[var(--duration-fast)] ease-[var(--ease-notion)]","focus-visible:outline-none focus-visible:shadow-[var(--shadow-focus-ring)]"].join(" "),children:e.jsx(y,{size:14})})]}),e.jsx("div",{className:"flex-1 overflow-y-auto p-[var(--spacing-4)]",children:i})]})}const w={not_started:"rounded-full",planning:"rotate-45 rounded-none",executing:"rounded-full",verifying:"rotate-45 rounded-none",reviewing:"rounded-full",completed:"rounded-full",blocked:"rounded-[var(--radius-sm)]"},_={not_started:"status.not_started",planning:"status.planning",executing:"status.executing",verifying:"status.verifying",reviewing:"status.reviewing",completed:"status.completed",blocked:"status.blocked"},k={not_started:"var(--color-status-bg-not-started)",planning:"var(--color-status-bg-planning)",executing:"var(--color-status-bg-executing)",verifying:"var(--color-status-bg-verifying)",reviewing:"var(--color-status-bg-reviewing)",completed:"var(--color-status-bg-completed)",blocked:"var(--color-status-bg-blocked)"};function z({status:t,showLabel:a=!0,compact:s=!1,cardVariant:i}){const{t:r}=b(),l=f[t],x=w[t],o=_[t],c=r(o),n=k[t],d=t==="executing",p=s?"w-1.5 h-1.5":"w-2 h-2";return e.jsxs("span",{className:["inline-flex items-center gap-[var(--spacing-1-5)]",i?"rounded-full":"rounded-[var(--radius-sm)]",s?"":i?"px-[var(--spacing-2)] py-[var(--spacing-0-5)]":"px-[var(--spacing-1-5)] py-[var(--spacing-0-5)]"].join(" "),style:s?void 0:{backgroundColor:n},role:"status","aria-label":`Status: ${c}`,children:[e.jsxs("span",{className:"relative inline-flex","aria-hidden":"true",children:[e.jsx("span",{className:`inline-block ${p} ${x}`,style:{backgroundColor:l}}),d&&e.jsx("span",{className:`absolute inset-0 inline-block ${p} rounded-full animate-ping opacity-40 motion-reduce:hidden`,style:{backgroundColor:l}})]}),a&&!s&&e.jsx("span",{className:"text-[length:var(--font-size-xs)] font-[var(--font-weight-semibold)] leading-[var(--line-height-tight)] capitalize",style:{color:l},children:c})]})}function S({completed:t,total:a,color:s}){const i=a>0?Math.round(t/a*100):0,r=s??"var(--color-status-completed)",l=t>=a&&a>0;return e.jsxs("div",{className:"flex items-center gap-[var(--spacing-2)] w-full",children:[e.jsx("div",{className:"flex-1 h-[5px] rounded-full bg-border overflow-hidden",role:"progressbar","aria-valuenow":t,"aria-valuemin":0,"aria-valuemax":a,"aria-label":`${t} of ${a} tasks completed`,children:e.jsx("div",{className:["h-full rounded-full min-w-[6px]","transition-[width] duration-[var(--duration-smooth)] ease-[var(--ease-out)]","motion-reduce:transition-none",l?"motion-safe:animate-[progress-complete_0.3s_ease-out]":""].join(" "),style:{width:`${i}%`,backgroundColor:r}})}),e.jsxs("span",{className:"text-[length:var(--font-size-xs)] font-[var(--font-weight-medium)] text-text-secondary font-mono whitespace-nowrap tabular-nums min-w-[32px]",children:[t,"/",a]})]})}const C={0:"No priority",1:"Urgent",2:"High",3:"Medium",4:"Low"},A={0:"#A09D97",1:"#C46555",2:"#B89540",3:"#5B8DB8",4:"#A09D97"};function j(t){var x,o;const a=t,s=a.task_id??a.id??"",i=((x=a.meta)==null?void 0:x.status)??a.status??"pending",r=((o=a.meta)==null?void 0:o.wave)??a.wave??0,l=a.convergence;return{id:s,title:a.title??"",description:a.description??"",type:a.type??"feature",priority:a.priority??"medium",effort:a.effort??"",action:a.action??"",scope:a.scope??"",focus_paths:a.focus_paths??[],depends_on:a.depends_on??[],parallel_group:a.parallel_group??null,convergence:{criteria:(l==null?void 0:l.criteria)??[],verification:(l==null?void 0:l.verification)??"",definition_of_done:(l==null?void 0:l.definition_of_done)??""},files:Array.isArray(a.files)?a.files.map(c=>typeof c=="string"?{path:c,action:"",target:"",change:""}:c):[],implementation:a.implementation??[],test:{commands:[],unit:[],integration:[],success_metrics:[],...a.test??{}},reference:{pattern:"",files:a.read_first??[],examples:null,...a.reference??{}},rationale:{chosen_approach:"",decision_factors:[],tradeoffs:null,...a.rationale??{}},risks:a.risks??[],code_skeleton:a.code_skeleton??null,doc_context:{affected_features:[],affected_components:[],affected_requirements:[],adr_ids:[],...a.doc_context??{}},meta:{status:i,estimated_time:a.estimated_time??null,risk:a.risk??"low",autonomous:a.autonomous??!1,checkpoint:a.checkpoint??!1,wave:r,execution_group:a.execution_group??null,executor:a.executor??""}}}function T(t){const[a,s]=h.useState([]),[i,r]=h.useState(!1),[l,x]=h.useState(null),o=u(d=>{var p;return t!==null?(p=d.board)==null?void 0:p.phases.find(m=>m.phase===t):void 0}),c=(o==null?void 0:o.updated_at)??null,n=h.useRef(null);return h.useEffect(()=>{if(t===null){s([]),r(!1),x(null),n.current=null;return}if(c===n.current&&a.length>0)return;n.current=c;let d=!1;return r(!0),x(null),fetch(`/api/phases/${t}/tasks`).then(p=>{if(!p.ok)throw new Error(`HTTP ${p.status}`);return p.json()}).then(p=>{d||(s(p.map(j)),r(!1))}).catch(p=>{d||(x(p.message),r(!1))}),()=>{d=!0}},[t,c]),{tasks:a,loading:i,error:l}}function D(t){const[a,s]=h.useState([]),[i,r]=h.useState(!1),[l,x]=h.useState(null);return h.useEffect(()=>{if(!t){s([]),r(!1),x(null);return}let o=!1;return r(!0),x(null),fetch(`/api/issues/${encodeURIComponent(t)}/tasks`).then(c=>{if(!c.ok)throw new Error(`HTTP ${c.status}`);return c.json()}).then(c=>{o||(s(c.map(j)),r(!1))}).catch(c=>{o||(x(c.message),r(!1))}),()=>{o=!0}},[t]),{tasks:a,loading:i,error:l}}const $={pending:"#A09D97",in_progress:"#B89540",completed:"#5A9E78",failed:"#C46555"};function E({tasks:t}){const[a,s]=h.useState(new Set),i=r=>{s(l=>{const x=new Set(l);return x.has(r)?x.delete(r):x.add(r),x})};return e.jsx("div",{className:"space-y-1",children:t.map(r=>{const l=a.has(r.id),x=$[r.meta.status]??"#A09D97";return e.jsxs("div",{children:[e.jsxs("button",{type:"button",onClick:()=>i(r.id),className:"w-full flex items-center gap-2 py-1.5 px-1 rounded text-left transition-colors hover:bg-[var(--color-bg-hover)]",children:[e.jsx("span",{className:"w-2 h-2 rounded-full shrink-0",style:{backgroundColor:x}}),e.jsx("span",{className:"shrink-0 font-mono",style:{fontSize:"var(--font-size-xs)",color:"var(--color-text-tertiary)"},children:r.id}),e.jsx("span",{className:"truncate flex-1",style:{fontSize:"var(--font-size-sm)",color:"var(--color-text-secondary)"},children:r.title}),r.meta.wave>0&&e.jsxs("span",{className:"shrink-0",style:{fontSize:"var(--font-size-xs)",color:"var(--color-text-tertiary)"},children:["W",r.meta.wave]}),e.jsx("span",{className:"shrink-0",style:{fontSize:"var(--font-size-xs)",color:"var(--color-text-tertiary)"},children:l?"▾":"▸"})]}),l&&e.jsxs("div",{className:"ml-5 pl-3 py-2 space-y-2",style:{borderLeft:"2px solid var(--color-border-divider)"},children:[r.description&&e.jsx("p",{className:"whitespace-pre-wrap leading-relaxed",style:{fontSize:"var(--font-size-xs)",color:"var(--color-text-secondary)"},children:r.description}),r.convergence.criteria.length>0&&e.jsxs("div",{children:[e.jsx("div",{className:"text-[9px] font-semibold uppercase tracking-wider mb-1",style:{color:"var(--color-text-tertiary)"},children:"Convergence"}),e.jsx("ul",{className:"space-y-0.5",children:r.convergence.criteria.map((o,c)=>e.jsxs("li",{className:"font-mono",style:{fontSize:"var(--font-size-xs)",color:"var(--color-text-secondary)"},children:["• ",o]},c))})]}),r.files.length>0&&e.jsxs("div",{children:[e.jsx("div",{className:"text-[9px] font-semibold uppercase tracking-wider mb-1",style:{color:"var(--color-text-tertiary)"},children:"Files"}),e.jsx("ul",{className:"space-y-0.5",children:r.files.map((o,c)=>e.jsxs("li",{className:"font-mono truncate",style:{fontSize:"var(--font-size-xs)",color:"var(--color-text-secondary)"},title:o.path,children:[o.action?`${o.action} `:"",o.path]},c))})]}),r.implementation.length>0&&e.jsxs("div",{children:[e.jsx("div",{className:"text-[9px] font-semibold uppercase tracking-wider mb-1",style:{color:"var(--color-text-tertiary)"},children:"Implementation"}),e.jsx("ol",{className:"space-y-0.5 list-decimal list-inside",children:r.implementation.map((o,c)=>e.jsx("li",{style:{fontSize:"var(--font-size-xs)",color:"var(--color-text-secondary)"},children:o},c))})]}),r.risks.length>0&&e.jsxs("div",{children:[e.jsx("div",{className:"text-[9px] font-semibold uppercase tracking-wider mb-1",style:{color:"var(--color-text-tertiary)"},children:"Risks"}),e.jsx("ul",{className:"space-y-0.5",children:r.risks.map((o,c)=>e.jsxs("li",{style:{fontSize:"var(--font-size-xs)",color:"var(--color-accent-red)"},children:["⚠ ",o]},c))})]}),r.depends_on.length>0&&e.jsxs("div",{className:"font-mono",style:{fontSize:"var(--font-size-xs)",color:"var(--color-text-tertiary)"},children:["Depends on: ",r.depends_on.join(", ")]})]})]},r.id)})})}function H({selectedItem:t}){return t.type==="linearIssue"?e.jsx(W,{issue:t.issue}):t.type==="issue"?e.jsx(I,{issue:t.issue}):t.type==="task"?e.jsx(O,{task:t.task}):e.jsx(L,{phaseId:t.phaseId})}function L({phaseId:t}){const a=u(n=>n.board),s=a==null?void 0:a.phases.find(n=>n.phase===t),{tasks:i,loading:r}=T(t);if(!s)return e.jsx("div",{className:"text-[length:var(--font-size-sm)] text-text-secondary",children:"Phase not found"});const{tasks_completed:l,tasks_total:x,current_wave:o}=s.execution,c=f[s.status];return e.jsxs("div",{className:"space-y-[var(--spacing-4)]",children:[e.jsx("h3",{className:"text-[length:var(--font-size-lg)] font-[var(--font-weight-bold)] text-text-primary",children:s.title}),e.jsxs("div",{className:"flex flex-wrap gap-[var(--spacing-2)]",children:[e.jsx(z,{status:s.status}),e.jsxs("span",{className:"text-[length:10px] font-[var(--font-weight-semibold)] px-[var(--spacing-2)] py-[2px] rounded-full",style:{backgroundColor:"var(--color-bg-hover)",color:"var(--color-text-secondary)"},children:["P-",String(s.phase).padStart(2,"0")]}),s.status==="executing"&&o>0&&e.jsxs("span",{className:"text-[length:10px] font-[var(--font-weight-semibold)] px-[var(--spacing-2)] py-[2px] rounded-full",style:{backgroundColor:"var(--color-bg-hover)",color:"var(--color-text-secondary)"},children:["Wave ",o]})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-[length:10px] font-[var(--font-weight-semibold)] uppercase tracking-[0.06em] text-text-tertiary mb-[var(--spacing-2)]",children:"Goal"}),e.jsx("p",{className:"text-[length:var(--font-size-sm)] text-text-secondary leading-[1.6]",children:s.goal})]}),x>0&&e.jsxs("div",{children:[e.jsx("div",{className:"text-[length:10px] font-[var(--font-weight-semibold)] uppercase tracking-[0.06em] text-text-tertiary mb-[var(--spacing-2)]",children:"Progress"}),e.jsx(S,{completed:l,total:x,color:c})]}),s.success_criteria.length>0&&e.jsxs("div",{children:[e.jsx("div",{className:"text-[length:10px] font-[var(--font-weight-semibold)] uppercase tracking-[0.06em] text-text-tertiary mb-[var(--spacing-2)]",children:"Success Criteria"}),e.jsx("div",{children:s.success_criteria.map((n,d)=>e.jsxs("div",{className:"flex items-start gap-[var(--spacing-2)] py-[var(--spacing-1-5)] border-b border-border-divider last:border-b-0 text-[length:var(--font-size-xs)]",children:[e.jsx("span",{className:"text-text-tertiary shrink-0",children:"•"}),e.jsx("span",{className:"flex-1 text-text-secondary",children:n})]},d))})]}),s.verification.status!=="pending"&&e.jsxs("div",{children:[e.jsx("div",{className:"text-[length:10px] font-[var(--font-weight-semibold)] uppercase tracking-[0.06em] text-text-tertiary mb-[var(--spacing-2)]",children:"Verification"}),e.jsxs("div",{className:"space-y-[var(--spacing-1)]",children:[e.jsxs("div",{className:"flex items-center gap-[var(--spacing-2)] text-[length:var(--font-size-xs)]",children:[e.jsx("span",{className:`w-2 h-2 rounded-full ${s.verification.status==="passed"?"bg-[var(--color-status-completed)]":"bg-[var(--color-status-executing)]"}`}),e.jsx("span",{className:"text-text-primary capitalize",children:s.verification.status})]}),s.verification.gaps.length>0&&e.jsx("div",{className:"text-[length:var(--font-size-xs)] text-text-secondary space-y-[var(--spacing-1)]",children:s.verification.gaps.map((n,d)=>e.jsxs("div",{className:"flex items-start gap-[var(--spacing-1)] text-[#C46555]",children:[e.jsx("span",{className:"shrink-0",children:"⚠"}),e.jsx("span",{children:typeof n=="string"?n:n.description??n.id??JSON.stringify(n)})]},d))})]})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"text-[length:10px] font-[var(--font-weight-semibold)] uppercase tracking-[0.06em] text-text-tertiary mb-[var(--spacing-2)]",children:["Tasks ",s.plan.task_count>0?`(${s.execution.tasks_completed}/${s.plan.task_count})`:""]}),r?e.jsx("div",{className:"text-[length:var(--font-size-xs)] text-text-tertiary py-[var(--spacing-2)]",children:"Loading tasks..."}):i.length===0?s.plan.task_ids.length>0?e.jsx("div",{className:"text-[length:var(--font-size-xs)] text-text-secondary",children:s.plan.task_ids.map(n=>e.jsxs("div",{className:"flex items-center gap-[var(--spacing-2)] py-[var(--spacing-1-5)] border-b border-border-divider last:border-b-0",children:[e.jsx("span",{className:"w-3.5 h-3.5 rounded-[4px] border-[1.5px] border-border shrink-0"}),e.jsx("span",{className:"text-text-primary",children:n})]},n))}):e.jsx("div",{className:"text-[length:var(--font-size-xs)] text-text-tertiary py-[var(--spacing-2)]",children:"No tasks"}):e.jsx("div",{children:i.map(n=>{const d=n.meta.status==="completed",p=d?"var(--color-status-completed)":n.meta.status==="in_progress"?"var(--color-status-executing)":"var(--color-text-tertiary)",m=d?"Done":n.meta.status==="in_progress"?"Running":n.meta.status==="failed"?"Failed":"Queued";return e.jsxs("div",{className:"flex items-center gap-[var(--spacing-2)] py-[var(--spacing-1-5)] border-b border-border-divider last:border-b-0 text-[length:var(--font-size-xs)]",children:[e.jsx("span",{className:["w-3.5 h-3.5 rounded-[4px] border-[1.5px] shrink-0",d?"bg-[var(--color-status-completed)] border-[var(--color-status-completed)]":"border-border"].join(" ")}),e.jsx("span",{className:"flex-1 text-text-primary",children:n.title}),e.jsx("span",{className:"text-[length:10px] font-[var(--font-weight-medium)] shrink-0",style:{color:p},children:m})]},n.id)})})]}),s.requirements.length>0&&e.jsxs("div",{children:[e.jsx("div",{className:"text-[length:10px] font-[var(--font-weight-semibold)] uppercase tracking-[0.06em] text-text-tertiary mb-[var(--spacing-2)]",children:"Requirements"}),e.jsx("div",{children:s.requirements.map((n,d)=>e.jsxs("div",{className:"flex items-start gap-[var(--spacing-2)] py-[var(--spacing-1-5)] border-b border-border-divider last:border-b-0 text-[length:var(--font-size-xs)]",children:[e.jsx("span",{className:"text-text-tertiary shrink-0",children:"•"}),e.jsx("span",{className:"flex-1 text-text-secondary",children:n})]},d))})]}),s.spec_ref&&e.jsxs("div",{children:[e.jsx("div",{className:"text-[length:10px] font-[var(--font-weight-semibold)] uppercase tracking-[0.06em] text-text-tertiary mb-[var(--spacing-2)]",children:"Spec Reference"}),e.jsx("span",{className:"text-[length:var(--font-size-xs)] text-text-secondary font-mono",children:s.spec_ref})]}),(s.plan.complexity||s.plan.waves.length>0)&&e.jsxs("div",{children:[e.jsx("div",{className:"text-[length:10px] font-[var(--font-weight-semibold)] uppercase tracking-[0.06em] text-text-tertiary mb-[var(--spacing-2)]",children:"Plan Details"}),e.jsxs("div",{className:"text-[length:var(--font-size-xs)] text-text-secondary space-y-[var(--spacing-1)]",children:[s.plan.complexity&&e.jsxs("div",{children:["Complexity: ",e.jsx("span",{className:"text-text-primary",children:s.plan.complexity})]}),s.plan.waves.length>0&&e.jsxs("div",{children:["Waves: ",e.jsx("span",{className:"text-text-primary",children:s.plan.waves.length})," (",s.plan.waves.map((n,d)=>{var m;const p=Array.isArray(n)?n.length:((m=n.tasks)==null?void 0:m.length)??0;return`W${d+1}: ${p} tasks`}).join(", "),")"]})]})]}),s.execution.method&&e.jsxs("div",{children:[e.jsx("div",{className:"text-[length:10px] font-[var(--font-weight-semibold)] uppercase tracking-[0.06em] text-text-tertiary mb-[var(--spacing-2)]",children:"Execution"}),e.jsxs("div",{className:"text-[length:var(--font-size-xs)] text-text-secondary space-y-[var(--spacing-1)]",children:[e.jsxs("div",{children:["Method: ",e.jsx("span",{className:"text-text-primary",children:s.execution.method})]}),s.execution.commits.length>0&&e.jsxs("div",{children:[e.jsx("span",{children:"Commits:"}),e.jsx("div",{className:"mt-[var(--spacing-1)] space-y-[var(--spacing-0-5)]",children:s.execution.commits.map((n,d)=>e.jsx("div",{className:"font-mono text-[length:10px] text-text-tertiary truncate",children:typeof n=="string"?n:`${n.hash.slice(0,7)} ${n.message}`},d))})]})]})]}),s.validation.status!=="pending"&&e.jsxs("div",{children:[e.jsx("div",{className:"text-[length:10px] font-[var(--font-weight-semibold)] uppercase tracking-[0.06em] text-text-tertiary mb-[var(--spacing-2)]",children:"Validation"}),e.jsxs("div",{className:"text-[length:var(--font-size-xs)] text-text-secondary space-y-[var(--spacing-1)]",children:[e.jsxs("div",{className:"flex items-center gap-[var(--spacing-2)]",children:[e.jsx("span",{className:`w-2 h-2 rounded-full ${s.validation.status==="passed"?"bg-[var(--color-status-completed)]":"bg-[var(--color-status-executing)]"}`}),e.jsx("span",{className:"text-text-primary capitalize",children:s.validation.status})]}),s.validation.test_coverage!==null&&e.jsxs("div",{children:["Test Coverage: ",e.jsx("span",{className:"text-text-primary",children:typeof s.validation.test_coverage=="number"?`${s.validation.test_coverage}%`:`${s.validation.test_coverage.lines}%`})]}),s.validation.gaps.length>0&&e.jsx("div",{className:"space-y-[var(--spacing-1)]",children:s.validation.gaps.map((n,d)=>e.jsxs("div",{className:"flex items-start gap-[var(--spacing-1)] text-[#C46555]",children:[e.jsx("span",{className:"shrink-0",children:"⚠"}),e.jsx("span",{children:typeof n=="string"?n:n.description??n.requirement??JSON.stringify(n)})]},d))})]})]}),s.uat.test_count>0&&e.jsxs("div",{children:[e.jsx("div",{className:"text-[length:10px] font-[var(--font-weight-semibold)] uppercase tracking-[0.06em] text-text-tertiary mb-[var(--spacing-2)]",children:"UAT"}),e.jsxs("div",{className:"text-[length:var(--font-size-xs)] text-text-secondary space-y-[var(--spacing-1)]",children:[e.jsxs("div",{className:"flex items-center gap-[var(--spacing-2)]",children:[e.jsx("span",{className:"text-text-primary capitalize",children:s.uat.status}),e.jsxs("span",{className:"text-text-tertiary",children:["(",s.uat.passed,"/",s.uat.test_count," passed)"]})]}),s.uat.gaps.length>0&&e.jsx("div",{className:"space-y-[var(--spacing-1)]",children:s.uat.gaps.map((n,d)=>e.jsxs("div",{className:"flex items-start gap-[var(--spacing-1)] text-[#C46555]",children:[e.jsx("span",{className:"shrink-0",children:"⚠"}),e.jsx("span",{children:typeof n=="string"?n:n.description??JSON.stringify(n)})]},d))})]})]}),s.reflection.rounds>0&&e.jsxs("div",{children:[e.jsx("div",{className:"text-[length:10px] font-[var(--font-weight-semibold)] uppercase tracking-[0.06em] text-text-tertiary mb-[var(--spacing-2)]",children:"Reflection"}),e.jsxs("div",{className:"text-[length:var(--font-size-xs)] text-text-secondary space-y-[var(--spacing-1)]",children:[e.jsxs("div",{children:["Rounds: ",e.jsx("span",{className:"text-text-primary",children:s.reflection.rounds})]}),s.reflection.strategy_adjustments.length>0&&e.jsx("div",{children:s.reflection.strategy_adjustments.map((n,d)=>e.jsxs("div",{className:"flex items-start gap-[var(--spacing-2)] py-[var(--spacing-1)] border-b border-border-divider last:border-b-0",children:[e.jsx("span",{className:"text-text-tertiary shrink-0",children:"•"}),e.jsx("span",{children:n})]},d))})]})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-[length:10px] font-[var(--font-weight-semibold)] uppercase tracking-[0.06em] text-text-tertiary mb-[var(--spacing-2)]",children:"Activity"}),e.jsxs("div",{className:"text-[length:var(--font-size-xs)] text-text-secondary",children:[s.execution.started_at&&e.jsxs("div",{className:"flex gap-[var(--spacing-2)] py-[var(--spacing-1-5)] border-b border-border-divider",children:[e.jsx("span",{className:"font-mono text-[length:10px] text-text-tertiary whitespace-nowrap min-w-[48px]",children:v(s.execution.started_at)}),e.jsx("span",{className:"flex-1",children:"Phase execution started"})]}),o>0&&e.jsxs("div",{className:"flex gap-[var(--spacing-2)] py-[var(--spacing-1-5)] border-b border-border-divider",children:[e.jsx("span",{className:"font-mono text-[length:10px] text-text-tertiary whitespace-nowrap min-w-[48px]",children:v(s.updated_at)}),e.jsxs("span",{className:"flex-1",children:["Wave ",o," active (",x-l," remaining)"]})]}),s.execution.completed_at&&e.jsxs("div",{className:"flex gap-[var(--spacing-2)] py-[var(--spacing-1-5)]",children:[e.jsx("span",{className:"font-mono text-[length:10px] text-text-tertiary whitespace-nowrap min-w-[48px]",children:v(s.execution.completed_at)}),e.jsx("span",{className:"flex-1",children:"Phase completed"})]}),!s.execution.started_at&&!s.execution.completed_at&&e.jsx("div",{className:"py-[var(--spacing-1-5)] text-text-tertiary italic",children:"No activity yet"})]})]})]})}const R={feature:"#5B8DB8",fix:"#C46555",refactor:"#9178B5",test:"#5B8DB8",docs:"#A09D97"},B={pending:"#A09D97",in_progress:"#C99B2D",completed:"#5A9E78",failed:"#C46555"};function O({task:t}){const a=R[t.type]??"#A09D97",s=B[t.meta.status]??"#A09D97";return e.jsxs("div",{className:"space-y-[var(--spacing-4)]",children:[e.jsxs("div",{children:[e.jsx("span",{className:"text-[length:var(--font-size-xs)] font-mono text-text-tertiary",children:t.id}),e.jsx("h3",{className:"text-[length:var(--font-size-lg)] font-[var(--font-weight-bold)] text-text-primary mt-[var(--spacing-1)]",children:t.title})]}),e.jsxs("div",{className:"flex flex-wrap gap-[var(--spacing-2)]",children:[e.jsx("span",{className:"text-[length:10px] font-[var(--font-weight-semibold)] px-[var(--spacing-2)] py-[2px] rounded-full",style:{backgroundColor:`${a}20`,color:a},children:t.type}),e.jsx("span",{className:"text-[length:10px] font-[var(--font-weight-semibold)] px-[var(--spacing-2)] py-[2px] rounded-full",style:{backgroundColor:`${s}20`,color:s},children:t.meta.status.replace("_"," ")}),e.jsx("span",{className:"text-[length:10px] font-[var(--font-weight-semibold)] px-[var(--spacing-2)] py-[2px] rounded-full",style:{backgroundColor:"var(--color-bg-hover)",color:"var(--color-text-secondary)"},children:t.priority}),e.jsxs("span",{className:"text-[length:10px] font-[var(--font-weight-semibold)] px-[var(--spacing-2)] py-[2px] rounded-full",style:{backgroundColor:"var(--color-bg-hover)",color:"var(--color-text-secondary)"},children:["Wave ",t.meta.wave]})]}),t.description&&e.jsxs("div",{children:[e.jsx(g,{children:"Description"}),e.jsx("p",{className:"text-[length:var(--font-size-sm)] text-text-secondary leading-[1.6] whitespace-pre-wrap",children:t.description})]}),t.convergence.criteria.length>0&&e.jsxs("div",{children:[e.jsx(g,{children:"Convergence Criteria"}),e.jsx("div",{children:t.convergence.criteria.map((i,r)=>e.jsxs("div",{className:"flex items-start gap-[var(--spacing-2)] py-[var(--spacing-1-5)] border-b border-border-divider last:border-b-0 text-[length:var(--font-size-xs)]",children:[e.jsx("span",{className:"text-text-tertiary shrink-0",children:"•"}),e.jsx("span",{className:"flex-1 text-text-secondary font-mono",children:i})]},r))})]}),t.files.length>0&&e.jsxs("div",{children:[e.jsxs(g,{children:["Files (",t.files.length,")"]}),e.jsx("div",{children:t.files.map((i,r)=>e.jsxs("div",{className:"flex items-start gap-[var(--spacing-2)] py-[var(--spacing-1-5)] border-b border-border-divider last:border-b-0 text-[length:var(--font-size-xs)]",children:[e.jsx("span",{className:"font-mono text-text-primary shrink-0",children:i.path}),e.jsx("span",{className:"text-text-tertiary shrink-0",children:i.action})]},r))})]}),t.implementation.length>0&&e.jsxs("div",{children:[e.jsx(g,{children:"Implementation"}),e.jsx("div",{children:t.implementation.map((i,r)=>e.jsxs("div",{className:"flex items-start gap-[var(--spacing-2)] py-[var(--spacing-1-5)] border-b border-border-divider last:border-b-0 text-[length:var(--font-size-xs)]",children:[e.jsxs("span",{className:"text-text-tertiary shrink-0 tabular-nums",children:[r+1,"."]}),e.jsx("span",{className:"flex-1 text-text-secondary",children:i})]},r))})]}),t.risks.length>0&&e.jsxs("div",{children:[e.jsx(g,{children:"Risks"}),e.jsx("div",{children:t.risks.map((i,r)=>e.jsxs("div",{className:"flex items-start gap-[var(--spacing-1)] py-[var(--spacing-1)] text-[length:var(--font-size-xs)] text-[#C46555]",children:[e.jsx("span",{className:"shrink-0",children:"⚠"}),e.jsx("span",{children:i})]},r))})]}),t.depends_on.length>0&&e.jsxs("div",{children:[e.jsx(g,{children:"Dependencies"}),e.jsx("div",{className:"flex flex-wrap gap-[var(--spacing-1)]",children:t.depends_on.map(i=>e.jsx("span",{className:"text-[length:var(--font-size-xs)] font-mono text-text-secondary bg-bg-hover px-[var(--spacing-1-5)] py-[1px] rounded",children:i},i))})]})]})}function g({children:t}){return e.jsx("div",{className:"text-[length:10px] font-[var(--font-weight-semibold)] uppercase tracking-[0.06em] text-text-tertiary mb-[var(--spacing-2)]",children:t})}const P={bug:"#C46555",feature:"#5B8DB8",improvement:"#9178B5",task:"#A09D97"},U={urgent:"#C46555",high:"#B89540",medium:"#5B8DB8",low:"#A09D97"},M={idle:"#A09D97",queued:"#5B8DB8",running:"#B89540",completed:"#5A9E78",failed:"#C46555",retrying:"#B89540"};function I({issue:t}){var l;const{tasks:a,loading:s}=D((l=t.task_refs)!=null&&l.length?t.id:null),i=P[t.type]??"#A09D97",r=U[t.priority]??"#A09D97";return e.jsxs("div",{className:"space-y-[var(--spacing-4)]",children:[e.jsxs("div",{children:[e.jsx("span",{className:"text-[length:var(--font-size-xs)] font-mono text-text-tertiary",children:t.id}),e.jsx("h3",{className:"text-[length:var(--font-size-lg)] font-[var(--font-weight-bold)] text-text-primary mt-[var(--spacing-1)]",children:t.title})]}),e.jsxs("div",{className:"flex flex-wrap gap-[var(--spacing-2)]",children:[e.jsx("span",{className:"text-[length:10px] font-[var(--font-weight-semibold)] px-[var(--spacing-2)] py-[2px] rounded-full",style:{backgroundColor:`${i}20`,color:i},children:t.type}),e.jsx("span",{className:"text-[length:10px] font-[var(--font-weight-semibold)] px-[var(--spacing-2)] py-[2px] rounded-full",style:{backgroundColor:`${r}20`,color:r},children:t.priority}),e.jsx("span",{className:"text-[length:10px] font-[var(--font-weight-semibold)] px-[var(--spacing-2)] py-[2px] rounded-full",style:{backgroundColor:"var(--color-bg-hover)",color:"var(--color-text-secondary)"},children:t.status})]}),t.executor&&e.jsxs("div",{children:[e.jsx("div",{className:"text-[length:10px] font-[var(--font-weight-semibold)] uppercase tracking-[0.06em] text-text-tertiary mb-[var(--spacing-2)]",children:"Executor"}),e.jsx("span",{className:"text-[length:var(--font-size-sm)] text-text-primary",children:t.executor})]}),t.execution&&t.execution.status!=="idle"&&e.jsxs("div",{children:[e.jsx("div",{className:"text-[length:10px] font-[var(--font-weight-semibold)] uppercase tracking-[0.06em] text-text-tertiary mb-[var(--spacing-2)]",children:"Execution"}),e.jsxs("div",{className:"space-y-[var(--spacing-1)]",children:[e.jsxs("div",{className:"flex items-center gap-[var(--spacing-2)]",children:[e.jsx("span",{className:"w-2 h-2 rounded-full",style:{backgroundColor:M[t.execution.status]??"#A09D97"}}),e.jsx("span",{className:"text-[length:var(--font-size-sm)] text-text-primary",children:t.execution.status}),t.execution.retryCount>0&&e.jsxs("span",{className:"text-[length:var(--font-size-xs)] text-text-tertiary",children:["(retry ",t.execution.retryCount,")"]})]}),t.execution.startedAt&&e.jsxs("div",{className:"text-[length:var(--font-size-xs)] text-text-tertiary",children:["Started: ",v(t.execution.startedAt)]}),t.execution.completedAt&&e.jsxs("div",{className:"text-[length:var(--font-size-xs)] text-text-tertiary",children:["Completed: ",v(t.execution.completedAt)]}),t.execution.lastError&&e.jsx("div",{className:"text-[length:var(--font-size-xs)] text-[#C46555] bg-[#C4655508] rounded px-2 py-1",children:t.execution.lastError})]})]}),t.description&&e.jsxs("div",{children:[e.jsx("div",{className:"text-[length:10px] font-[var(--font-weight-semibold)] uppercase tracking-[0.06em] text-text-tertiary mb-[var(--spacing-2)]",children:"Description"}),e.jsx("p",{className:"text-[length:var(--font-size-sm)] text-text-secondary leading-[1.6] whitespace-pre-wrap",children:t.description})]}),a.length>0&&e.jsxs("div",{children:[e.jsxs("div",{className:"text-[length:10px] font-[var(--font-weight-semibold)] uppercase tracking-[0.06em] text-text-tertiary mb-[var(--spacing-2)]",children:["Execution Plan (",a.length," tasks)"]}),e.jsx(E,{tasks:a})]}),s&&e.jsx("div",{className:"text-[length:var(--font-size-xs)] text-text-tertiary",children:"Loading tasks…"}),e.jsxs("div",{children:[e.jsx("div",{className:"text-[length:10px] font-[var(--font-weight-semibold)] uppercase tracking-[0.06em] text-text-tertiary mb-[var(--spacing-2)]",children:"Activity"}),e.jsxs("div",{className:"text-[length:var(--font-size-xs)] text-text-secondary space-y-[var(--spacing-1)]",children:[e.jsxs("div",{children:["Created: ",v(t.created_at)]}),e.jsxs("div",{children:["Updated: ",v(t.updated_at)]})]})]})]})}function W({issue:t}){const a=A[t.priority];return e.jsxs("div",{className:"space-y-[var(--spacing-4)]",children:[e.jsxs("div",{children:[e.jsx("span",{className:"text-[length:var(--font-size-xs)] font-mono text-text-tertiary",children:t.identifier}),e.jsx("h3",{className:"text-[length:var(--font-size-lg)] font-[var(--font-weight-bold)] text-text-primary mt-[var(--spacing-1)]",children:t.title})]}),e.jsxs("div",{className:"flex flex-wrap gap-[var(--spacing-2)]",children:[e.jsx("span",{className:"text-[length:10px] font-[var(--font-weight-semibold)] px-[var(--spacing-2)] py-[2px] rounded-full",style:{backgroundColor:`#${t.state.color}20`,color:`#${t.state.color}`},children:t.state.name}),e.jsx("span",{className:"text-[length:10px] font-[var(--font-weight-semibold)] px-[var(--spacing-2)] py-[2px] rounded-full",style:{backgroundColor:`${a}20`,color:a},children:C[t.priority]})]}),t.assignee&&e.jsxs("div",{children:[e.jsx("div",{className:"text-[length:10px] font-[var(--font-weight-semibold)] uppercase tracking-[0.06em] text-text-tertiary mb-[var(--spacing-2)]",children:"Assignee"}),e.jsxs("div",{className:"flex items-center gap-[var(--spacing-2)]",children:[e.jsx("span",{className:"w-6 h-6 rounded-full bg-bg-hover flex items-center justify-center text-[length:var(--font-size-xs)] font-[var(--font-weight-semibold)] text-text-secondary",children:t.assignee.displayName.charAt(0).toUpperCase()}),e.jsx("span",{className:"text-[length:var(--font-size-sm)] text-text-primary",children:t.assignee.displayName})]})]}),t.labels.length>0&&e.jsxs("div",{children:[e.jsx("div",{className:"text-[length:10px] font-[var(--font-weight-semibold)] uppercase tracking-[0.06em] text-text-tertiary mb-[var(--spacing-2)]",children:"Labels"}),e.jsx("div",{className:"flex flex-wrap gap-[var(--spacing-1)]",children:t.labels.map(s=>e.jsx("span",{className:"text-[length:var(--font-size-xs)] px-2 py-0.5 rounded-full",style:{backgroundColor:`#${s.color}20`,color:`#${s.color}`},children:s.name},s.id))})]}),t.description&&e.jsxs("div",{children:[e.jsx("div",{className:"text-[length:10px] font-[var(--font-weight-semibold)] uppercase tracking-[0.06em] text-text-tertiary mb-[var(--spacing-2)]",children:"Description"}),e.jsx("p",{className:"text-[length:var(--font-size-sm)] text-text-secondary leading-[1.6] whitespace-pre-wrap",children:t.description})]}),e.jsx("div",{children:e.jsxs("a",{href:t.url,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-[var(--spacing-1)] text-[length:var(--font-size-sm)] text-accent-blue hover:underline",children:["Open in Linear",e.jsxs("svg",{className:"w-3 h-3",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),e.jsx("polyline",{points:"15 3 21 3 21 9"}),e.jsx("line",{x1:"10",y1:"14",x2:"21",y2:"3"})]})]})})]})}function v(t){const a=Date.now(),s=new Date(t).getTime(),i=a-s;if(i<0)return"just now";const r=Math.floor(i/6e4);if(r<1)return"just now";if(r<60)return`${r}m ago`;const l=Math.floor(r/60);return l<24?`${l}h ago`:`${Math.floor(l/24)}d ago`}/**
2
2
  * @license lucide-react v0.577.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{d as e}from"./index-DpcPd-UG.js";/**
1
+ import{d as e}from"./index-DQIlX2w_.js";/**
2
2
  * @license lucide-react v0.577.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{d as e}from"./index-DpcPd-UG.js";/**
1
+ import{d as e}from"./index-DQIlX2w_.js";/**
2
2
  * @license lucide-react v0.577.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{d as a}from"./index-DpcPd-UG.js";/**
1
+ import{d as a}from"./index-DQIlX2w_.js";/**
2
2
  * @license lucide-react v0.577.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{d as e}from"./index-DpcPd-UG.js";/**
1
+ import{d as e}from"./index-DQIlX2w_.js";/**
2
2
  * @license lucide-react v0.577.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{d as a}from"./index-DpcPd-UG.js";/**
1
+ import{d as a}from"./index-DQIlX2w_.js";/**
2
2
  * @license lucide-react v0.577.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -10,7 +10,7 @@
10
10
  href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap"
11
11
  rel="stylesheet"
12
12
  />
13
- <script type="module" crossorigin src="/assets/index-DpcPd-UG.js"></script>
13
+ <script type="module" crossorigin src="/assets/index-DQIlX2w_.js"></script>
14
14
  <link rel="stylesheet" crossorigin href="/assets/index-6-yE5Yl9.css">
15
15
  </head>
16
16
  <body style="margin: 0;">
@@ -38,6 +38,10 @@ export async function createAdapterForType(agentType) {
38
38
  const { OpenCodeAdapter } = await import('./opencode-adapter.js');
39
39
  return new OpenCodeAdapter();
40
40
  }
41
+ case 'agy': {
42
+ const { AgyAdapter } = await import('./agy-adapter.js');
43
+ return new AgyAdapter();
44
+ }
41
45
  default:
42
46
  throw new Error(`Unknown agent type for adapter factory: ${agentType}`);
43
47
  }
@@ -1 +1 @@
1
- {"version":3,"file":"adapter-factory.js","sourceRoot":"","sources":["../../../../../src/server/agents/adapter-factory.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,+EAA+E;AAC/E,EAAE;AACF,0EAA0E;AAC1E,2DAA2D;AAC3D,8EAA8E;AAK9E;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,oBAAoB,CAAC,SAAoB;IAC7D,QAAQ,SAAS,EAAE,CAAC;QAClB,KAAK,aAAa,CAAC,CAAC,CAAC;YACnB,MAAM,EAAE,iBAAiB,EAAE,GAAG,MAAM,MAAM,CAAC,0BAA0B,CAAC,CAAC;YACvE,OAAO,IAAI,iBAAiB,EAAE,CAAC;QACjC,CAAC;QACD,KAAK,QAAQ,CAAC,CAAC,CAAC;YACd,MAAM,EAAE,iBAAiB,EAAE,GAAG,MAAM,MAAM,CAAC,0BAA0B,CAAC,CAAC;YACvE,OAAO,IAAI,iBAAiB,CAAC,2BAA2B,EAAE,QAAQ,CAAC,CAAC;QACtE,CAAC;QACD,KAAK,YAAY,CAAC,CAAC,CAAC;YAClB,MAAM,EAAE,gBAAgB,EAAE,GAAG,MAAM,MAAM,CAAC,yBAAyB,CAAC,CAAC;YACrE,OAAO,IAAI,gBAAgB,EAAE,CAAC;QAChC,CAAC;QACD,KAAK,MAAM,CAAC,CAAC,CAAC;YACZ,MAAM,EAAE,iBAAiB,EAAE,GAAG,MAAM,MAAM,CAAC,0BAA0B,CAAC,CAAC;YACvE,OAAO,IAAI,iBAAiB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAC/C,CAAC;QACD,KAAK,OAAO,CAAC,CAAC,CAAC;YACb,MAAM,EAAE,eAAe,EAAE,GAAG,MAAM,MAAM,CAAC,wBAAwB,CAAC,CAAC;YACnE,OAAO,IAAI,eAAe,EAAE,CAAC;QAC/B,CAAC;QACD,KAAK,cAAc,CAAC,CAAC,CAAC;YACpB,MAAM,EAAE,qBAAqB,EAAE,GAAG,MAAM,MAAM,CAAC,+BAA+B,CAAC,CAAC;YAChF,OAAO,IAAI,qBAAqB,EAAE,CAAC;QACrC,CAAC;QACD,KAAK,UAAU,CAAC,CAAC,CAAC;YAChB,MAAM,EAAE,eAAe,EAAE,GAAG,MAAM,MAAM,CAAC,uBAAuB,CAAC,CAAC;YAClE,OAAO,IAAI,eAAe,EAAE,CAAC;QAC/B,CAAC;QACD;YACE,MAAM,IAAI,KAAK,CAAC,2CAA2C,SAAS,EAAE,CAAC,CAAC;IAC5E,CAAC;AACH,CAAC"}
1
+ {"version":3,"file":"adapter-factory.js","sourceRoot":"","sources":["../../../../../src/server/agents/adapter-factory.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,+EAA+E;AAC/E,EAAE;AACF,0EAA0E;AAC1E,2DAA2D;AAC3D,8EAA8E;AAK9E;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,oBAAoB,CAAC,SAAoB;IAC7D,QAAQ,SAAS,EAAE,CAAC;QAClB,KAAK,aAAa,CAAC,CAAC,CAAC;YACnB,MAAM,EAAE,iBAAiB,EAAE,GAAG,MAAM,MAAM,CAAC,0BAA0B,CAAC,CAAC;YACvE,OAAO,IAAI,iBAAiB,EAAE,CAAC;QACjC,CAAC;QACD,KAAK,QAAQ,CAAC,CAAC,CAAC;YACd,MAAM,EAAE,iBAAiB,EAAE,GAAG,MAAM,MAAM,CAAC,0BAA0B,CAAC,CAAC;YACvE,OAAO,IAAI,iBAAiB,CAAC,2BAA2B,EAAE,QAAQ,CAAC,CAAC;QACtE,CAAC;QACD,KAAK,YAAY,CAAC,CAAC,CAAC;YAClB,MAAM,EAAE,gBAAgB,EAAE,GAAG,MAAM,MAAM,CAAC,yBAAyB,CAAC,CAAC;YACrE,OAAO,IAAI,gBAAgB,EAAE,CAAC;QAChC,CAAC;QACD,KAAK,MAAM,CAAC,CAAC,CAAC;YACZ,MAAM,EAAE,iBAAiB,EAAE,GAAG,MAAM,MAAM,CAAC,0BAA0B,CAAC,CAAC;YACvE,OAAO,IAAI,iBAAiB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAC/C,CAAC;QACD,KAAK,OAAO,CAAC,CAAC,CAAC;YACb,MAAM,EAAE,eAAe,EAAE,GAAG,MAAM,MAAM,CAAC,wBAAwB,CAAC,CAAC;YACnE,OAAO,IAAI,eAAe,EAAE,CAAC;QAC/B,CAAC;QACD,KAAK,cAAc,CAAC,CAAC,CAAC;YACpB,MAAM,EAAE,qBAAqB,EAAE,GAAG,MAAM,MAAM,CAAC,+BAA+B,CAAC,CAAC;YAChF,OAAO,IAAI,qBAAqB,EAAE,CAAC;QACrC,CAAC;QACD,KAAK,UAAU,CAAC,CAAC,CAAC;YAChB,MAAM,EAAE,eAAe,EAAE,GAAG,MAAM,MAAM,CAAC,uBAAuB,CAAC,CAAC;YAClE,OAAO,IAAI,eAAe,EAAE,CAAC;QAC/B,CAAC;QACD,KAAK,KAAK,CAAC,CAAC,CAAC;YACX,MAAM,EAAE,UAAU,EAAE,GAAG,MAAM,MAAM,CAAC,kBAAkB,CAAC,CAAC;YACxD,OAAO,IAAI,UAAU,EAAE,CAAC;QAC1B,CAAC;QACD;YACE,MAAM,IAAI,KAAK,CAAC,2CAA2C,SAAS,EAAE,CAAC,CAAC;IAC5E,CAAC;AACH,CAAC"}
@@ -0,0 +1,39 @@
1
+ import type { AgentConfig, AgentProcess, ApprovalDecision } from '../../shared/agent-types.js';
2
+ import { BaseAgentAdapter } from './base-adapter.js';
3
+ export declare class AgyAdapter extends BaseAgentAdapter {
4
+ readonly agentType: "agy";
5
+ private readonly childProcesses;
6
+ private readonly readlineInterfaces;
7
+ private readonly streamMonitors;
8
+ private readonly stoppedEmitted;
9
+ private readonly spawnTimestamps;
10
+ private readonly textBuffers;
11
+ private readonly workDirs;
12
+ protected doSpawn(processId: string, config: AgentConfig): Promise<AgentProcess>;
13
+ protected doStop(processId: string): Promise<void>;
14
+ protected doSendMessage(_processId: string, _content: string): Promise<void>;
15
+ protected doRespondApproval(_decision: ApprovalDecision): Promise<void>;
16
+ /**
17
+ * Locate the conversationId agy used for this workspace on this run.
18
+ *
19
+ * Strategy:
20
+ * 1. Read cache/last_conversations.json — agy writes the
21
+ * workspace→conversationId map on every run. If the cache mtime is
22
+ * after our spawn and the workdir key resolves, return that id.
23
+ * 2. Fall back to scanning brain/ directories for a transcript.jsonl
24
+ * touched after our spawn (legacy heuristic; handles edge cases where
25
+ * the cache write is delayed).
26
+ */
27
+ private resolveConversationId;
28
+ /**
29
+ * After the agy process exits, locate the conversation transcript for our
30
+ * workspace and replay the entries that landed during our turn. The
31
+ * PLANNER_RESPONSE.content carries the model's actual reply text — that's
32
+ * the primary assistant_message source since stdout is empty in non-TTY
33
+ * mode. Tool calls and intermediate results become tool_use entries.
34
+ */
35
+ private enrichFromTranscript;
36
+ private setupProcessListeners;
37
+ private emitStopped;
38
+ private cleanup;
39
+ }