@markus-global/cli 0.11.3 → 0.12.0-rc.1

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 (114) hide show
  1. package/dist/backend.d.ts.map +1 -1
  2. package/dist/backend.js +5 -1
  3. package/dist/backend.js.map +1 -1
  4. package/dist/commands/approval-card.d.ts +53 -0
  5. package/dist/commands/approval-card.d.ts.map +1 -0
  6. package/dist/commands/approval-card.js +43 -0
  7. package/dist/commands/approval-card.js.map +1 -0
  8. package/dist/commands/auth.d.ts.map +1 -1
  9. package/dist/commands/auth.js +11 -5
  10. package/dist/commands/auth.js.map +1 -1
  11. package/dist/commands/init.d.ts.map +1 -1
  12. package/dist/commands/init.js +7 -5
  13. package/dist/commands/init.js.map +1 -1
  14. package/dist/commands/model.d.ts.map +1 -1
  15. package/dist/commands/model.js +6 -4
  16. package/dist/commands/model.js.map +1 -1
  17. package/dist/commands/outbound.d.ts +76 -0
  18. package/dist/commands/outbound.d.ts.map +1 -0
  19. package/dist/commands/outbound.js +80 -0
  20. package/dist/commands/outbound.js.map +1 -0
  21. package/dist/commands/start.d.ts +124 -2
  22. package/dist/commands/start.d.ts.map +1 -1
  23. package/dist/commands/start.js +718 -82
  24. package/dist/commands/start.js.map +1 -1
  25. package/dist/index.js +5 -20
  26. package/dist/index.js.map +1 -1
  27. package/dist/markus.mjs +112616 -103125
  28. package/dist/web-ui/assets/AsyncState-Brx503Qq.js +1 -0
  29. package/dist/web-ui/assets/{CommentInput-DN3Cichs.js → CommentInput-CyyImwaF.js} +1 -1
  30. package/dist/web-ui/assets/{ContentRenderer-CjHOyYgJ.js → ContentRenderer-CpiisvVQ.js} +2 -2
  31. package/dist/web-ui/assets/DeliverableShareModal-BbvcR0LN.js +1 -0
  32. package/dist/web-ui/assets/Deliverables-DIeYy6k7.js +3 -0
  33. package/dist/web-ui/assets/{Notifications-CCsdBfdg.js → Notifications-BoPgYIh8.js} +1 -1
  34. package/dist/web-ui/assets/Search-Bc44e8vT.js +1 -0
  35. package/dist/web-ui/assets/SendToChat-BHNwDw6Q.js +1 -0
  36. package/dist/web-ui/assets/Settings-5tk3XjBZ.js +8 -0
  37. package/dist/web-ui/assets/{Store-BWi97VP9.js → Store-CMxzEtXt.js} +1 -1
  38. package/dist/web-ui/assets/Switch-C1h7-ixU.js +1 -0
  39. package/dist/web-ui/assets/Team-Dcl-5Zvh.js +84 -0
  40. package/dist/web-ui/assets/Work-Dj9tQYXg.js +12 -0
  41. package/dist/web-ui/assets/{arc-Cg0-C295.js → arc-BA1zZ3ag.js} +1 -1
  42. package/dist/web-ui/assets/{architectureDiagram-3BPJPVTR-BctEHNLp.js → architectureDiagram-3BPJPVTR-DTUETQs3.js} +1 -1
  43. package/dist/web-ui/assets/{blockDiagram-GPEHLZMM-hxr2ZwOV.js → blockDiagram-GPEHLZMM-D5dvIq_3.js} +1 -1
  44. package/dist/web-ui/assets/{c4Diagram-AAUBKEIU-CfIRo1GE.js → c4Diagram-AAUBKEIU-CBurhkOF.js} +1 -1
  45. package/dist/web-ui/assets/channel-CYxqacYz.js +1 -0
  46. package/dist/web-ui/assets/{chunk-2J33WTMH-T0bENsqX.js → chunk-2J33WTMH-JDr6ZP1p.js} +1 -1
  47. package/dist/web-ui/assets/{chunk-4BX2VUAB-ChLLkyYx.js → chunk-4BX2VUAB-CsXt6Gd5.js} +1 -1
  48. package/dist/web-ui/assets/{chunk-55IACEB6-BD3ENYp9.js → chunk-55IACEB6-BPhC3YgG.js} +1 -1
  49. package/dist/web-ui/assets/{chunk-727SXJPM-BAes4atE.js → chunk-727SXJPM-BgceLEQx.js} +1 -1
  50. package/dist/web-ui/assets/{chunk-AQP2D5EJ-FymM7gfT.js → chunk-AQP2D5EJ-Bq58a84v.js} +1 -1
  51. package/dist/web-ui/assets/{chunk-FMBD7UC4-N5sRT0m9.js → chunk-FMBD7UC4-DyMa3olF.js} +1 -1
  52. package/dist/web-ui/assets/{chunk-ND2GUHAM-BSjS3JyS.js → chunk-ND2GUHAM-BsgTeDYu.js} +1 -1
  53. package/dist/web-ui/assets/{chunk-QZHKN3VN-Dkwitdbr.js → chunk-QZHKN3VN-BQpJPCpr.js} +1 -1
  54. package/dist/web-ui/assets/classDiagram-4FO5ZUOK-mygctjMz.js +1 -0
  55. package/dist/web-ui/assets/classDiagram-v2-Q7XG4LA2-mygctjMz.js +1 -0
  56. package/dist/web-ui/assets/{cose-bilkent-S5V4N54A-BLuYATCK.js → cose-bilkent-S5V4N54A-BCbssvKI.js} +1 -1
  57. package/dist/web-ui/assets/{dagre-BM42HDAG-DGLiqiH2.js → dagre-BM42HDAG-CT9IdAY4.js} +1 -1
  58. package/dist/web-ui/assets/{diagram-2AECGRRQ-Cq_GnNKs.js → diagram-2AECGRRQ-x2pwUpLt.js} +1 -1
  59. package/dist/web-ui/assets/{diagram-5GNKFQAL-CHNz-2dA.js → diagram-5GNKFQAL-d9_JOrSK.js} +1 -1
  60. package/dist/web-ui/assets/{diagram-KO2AKTUF-D8eKa7jh.js → diagram-KO2AKTUF-CAVFWSkN.js} +1 -1
  61. package/dist/web-ui/assets/{diagram-LMA3HP47-RkDgQcLr.js → diagram-LMA3HP47-DQEHXvkq.js} +1 -1
  62. package/dist/web-ui/assets/{diagram-OG6HWLK6-LqxQrIwa.js → diagram-OG6HWLK6-BW62W4O-.js} +1 -1
  63. package/dist/web-ui/assets/{docx-preview-Be-Qo_ag.js → docx-preview-pqFDBX8M.js} +1 -1
  64. package/dist/web-ui/assets/{erDiagram-TEJ5UH35-BX0zZgYQ.js → erDiagram-TEJ5UH35-yYImCEy2.js} +1 -1
  65. package/dist/web-ui/assets/{flowDiagram-I6XJVG4X-DKnfIFA4.js → flowDiagram-I6XJVG4X-Cpk1pKF0.js} +1 -1
  66. package/dist/web-ui/assets/{ganttDiagram-6RSMTGT7-DjBURmY-.js → ganttDiagram-6RSMTGT7-BnwH90c8.js} +1 -1
  67. package/dist/web-ui/assets/{gitGraphDiagram-PVQCEYII-BvSi7SvS.js → gitGraphDiagram-PVQCEYII-ELEziEhc.js} +1 -1
  68. package/dist/web-ui/assets/index-DD3NMntN.css +1 -0
  69. package/dist/web-ui/assets/index-Dt7RN5t2.js +883 -0
  70. package/dist/web-ui/assets/{infoDiagram-5YYISTIA-CwtIgim2.js → infoDiagram-5YYISTIA-48XZ0hV0.js} +1 -1
  71. package/dist/web-ui/assets/{ishikawaDiagram-YF4QCWOH-CWhXJfSa.js → ishikawaDiagram-YF4QCWOH-B0wQJGwe.js} +1 -1
  72. package/dist/web-ui/assets/{journeyDiagram-JHISSGLW-DN9rorlL.js → journeyDiagram-JHISSGLW-BNsrI94Q.js} +1 -1
  73. package/dist/web-ui/assets/{kanban-definition-UN3LZRKU-Burf5FE8.js → kanban-definition-UN3LZRKU-Cp8eSqCe.js} +1 -1
  74. package/dist/web-ui/assets/{mermaid.core-Dx4rzlyC.js → mermaid.core-BYCWrkC-.js} +5 -5
  75. package/dist/web-ui/assets/{mindmap-definition-RKZ34NQL-DqZ21Siw.js → mindmap-definition-RKZ34NQL-Ccay8RYS.js} +1 -1
  76. package/dist/web-ui/assets/{pieDiagram-4H26LBE5-C_4ksu-T.js → pieDiagram-4H26LBE5-BUzaEdin.js} +1 -1
  77. package/dist/web-ui/assets/{quadrantDiagram-W4KKPZXB-Dl6Rjg1X.js → quadrantDiagram-W4KKPZXB-BtM1AkZX.js} +1 -1
  78. package/dist/web-ui/assets/{requirementDiagram-4Y6WPE33-CzmWi02d.js → requirementDiagram-4Y6WPE33-eqO2tGIB.js} +1 -1
  79. package/dist/web-ui/assets/{sankeyDiagram-5OEKKPKP-D8K7e8we.js → sankeyDiagram-5OEKKPKP-M6qPg2gI.js} +1 -1
  80. package/dist/web-ui/assets/{sequenceDiagram-3UESZ5HK-1z9rqtVx.js → sequenceDiagram-3UESZ5HK-DtIYVpzR.js} +1 -1
  81. package/dist/web-ui/assets/{stateDiagram-AJRCARHV-nneYkkHa.js → stateDiagram-AJRCARHV-CLVsjtbI.js} +1 -1
  82. package/dist/web-ui/assets/stateDiagram-v2-BHNVJYJU-BfZl6BED.js +1 -0
  83. package/dist/web-ui/assets/{timeline-definition-PNZ67QCA-D6GmLlRi.js → timeline-definition-PNZ67QCA-CUwncHES.js} +1 -1
  84. package/dist/web-ui/assets/{vennDiagram-CIIHVFJN-TVefhiCa.js → vennDiagram-CIIHVFJN-KDkzNQIk.js} +1 -1
  85. package/dist/web-ui/assets/{wardley-L42UT6IY-BgUuAeiM.js → wardley-L42UT6IY-BqliL5Bv.js} +1 -1
  86. package/dist/web-ui/assets/{wardleyDiagram-YWT4CUSO-CyJ_l94o.js → wardleyDiagram-YWT4CUSO-B4qeGz2Q.js} +1 -1
  87. package/dist/web-ui/assets/{xychartDiagram-2RQKCTM6-kajbbx7a.js → xychartDiagram-2RQKCTM6-3877u0ek.js} +1 -1
  88. package/dist/web-ui/index.html +2 -2
  89. package/docs/README.md +1 -0
  90. package/docs/architecture/architecture.md +1 -1
  91. package/docs/architecture/configuration-model.md +156 -0
  92. package/docs/architecture/messaging-gateway.md +1043 -0
  93. package/docs/architecture/notification-delivery.md +273 -0
  94. package/docs/design/remote-access-contract.md +445 -0
  95. package/docs/guides/development.md +1 -1
  96. package/docs/guides/guide.md +4 -2
  97. package/docs/guides/remote-access.md +147 -214
  98. package/docs/handoff/approval-tri-state-handoff.md +69 -0
  99. package/docs/handoff/remote-access-handoff.md +160 -0
  100. package/docs/records/agent-platform-friction-2026-10.md +102 -2
  101. package/package.json +1 -1
  102. package/dist/web-ui/assets/DeliverableShareModal-CBSvxB-X.js +0 -1
  103. package/dist/web-ui/assets/Deliverables-BaAF4-w0.js +0 -3
  104. package/dist/web-ui/assets/Search-BiBdevAU.js +0 -1
  105. package/dist/web-ui/assets/Settings-CawBnWuy.js +0 -8
  106. package/dist/web-ui/assets/Team-CfUDkdc3.js +0 -84
  107. package/dist/web-ui/assets/Work-DrIXOW-P.js +0 -12
  108. package/dist/web-ui/assets/channel-DAQ2Rbxq.js +0 -1
  109. package/dist/web-ui/assets/classDiagram-4FO5ZUOK-BZyCVtJb.js +0 -1
  110. package/dist/web-ui/assets/classDiagram-v2-Q7XG4LA2-BZyCVtJb.js +0 -1
  111. package/dist/web-ui/assets/index-D8vskks7.js +0 -882
  112. package/dist/web-ui/assets/index-DEN_qReg.css +0 -1
  113. package/dist/web-ui/assets/modelCapabilities-DDtCBZ6o.js +0 -1
  114. package/dist/web-ui/assets/stateDiagram-v2-BHNVJYJU-C-hpzcms.js +0 -1
@@ -1 +0,0 @@
1
- import{u as I,r as i,l as c,j as e,n as d,P as x,A as O}from"./index-D8vskks7.js";function D(){const{t:l}=I(["common","home","work"]),[u,y]=i.useState(""),[r,o]=i.useState("all"),[t,m]=i.useState({agents:[],tasks:[],requirements:[],projects:[],deliverables:[],workflows:[]}),[h,b]=i.useState(!1),[w,p]=i.useState(!1),v=i.useRef(null),j=i.useRef(void 0);i.useEffect(()=>{setTimeout(()=>v.current?.focus(),100)},[]);const W=i.useCallback(async s=>{if(!s.trim()){m({agents:[],tasks:[],requirements:[],projects:[],deliverables:[],workflows:[]}),p(!1);return}b(!0),p(!0);const n=s.toLowerCase();try{const[N,C,V,R,L,A]=await Promise.allSettled([c.agents.list(),c.tasks.list({search:s,pageSize:20}),c.requirements.list(),c.projects.list(),c.deliverables.search({q:s,limit:20}),c.teams.list()]),E=N.status==="fulfilled"?N.value.agents.filter(a=>a.name?.toLowerCase().includes(n)||a.role?.toLowerCase().includes(n)):[],M=C.status==="fulfilled"?C.value.tasks:[],H=V.status==="fulfilled"?V.value.requirements.filter(a=>a.title?.toLowerCase().includes(n)||a.description?.toLowerCase().includes(n)):[],T=R.status==="fulfilled"?R.value.projects.filter(a=>a.name?.toLowerCase().includes(n)||a.description?.toLowerCase().includes(n)):[],z=L.status==="fulfilled"?L.value.results:[],S=[];if(A.status==="fulfilled"){const a=await Promise.allSettled(A.value.teams.map(f=>c.workflows.list(f.id)));for(const f of a)if(f.status==="fulfilled")for(const g of f.value.workflows)(g.name.toLowerCase().includes(n)||(g.displayName||"").toLowerCase().includes(n)||g.description?.toLowerCase().includes(n))&&S.push(g)}m({agents:E,tasks:M,requirements:H,projects:T,deliverables:z,workflows:S})}catch{m({agents:[],tasks:[],requirements:[],projects:[],deliverables:[],workflows:[]})}finally{b(!1)}},[]),B=s=>{y(s),j.current&&clearTimeout(j.current),j.current=setTimeout(()=>W(s),400)},q=[{id:"all",label:l("common:all",{defaultValue:"全部"})},{id:"agents",label:l("common:agents",{defaultValue:"智能体"})},{id:"tasks",label:l("common:tasks",{defaultValue:"任务"})},{id:"requirements",label:l("common:requirements",{defaultValue:"需求"})},{id:"projects",label:l("common:projects",{defaultValue:"项目"})},{id:"deliverables",label:l("common:deliverables",{defaultValue:"交付物"})},{id:"workflows",label:l("common:workflows",{defaultValue:"工作流"})}],k=t.agents.length>0||t.tasks.length>0||t.requirements.length>0||t.projects.length>0||t.deliverables.length>0||t.workflows.length>0;return e.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[e.jsxs("div",{className:"shrink-0 px-4 pt-4 pb-2 space-y-3",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("button",{onClick:()=>d.navigate(x.HOME),className:"p-1.5 rounded-lg hover:bg-surface-overlay transition-colors shrink-0",children:e.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("path",{d:"M19 12H5"}),e.jsx("polyline",{points:"12 19 5 12 12 5"})]})}),e.jsxs("div",{className:"flex-1 relative",children:[e.jsxs("svg",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-fg-tertiary",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("circle",{cx:"11",cy:"11",r:"8"}),e.jsx("line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65"})]}),e.jsx("input",{ref:v,value:u,onChange:s=>B(s.target.value),placeholder:l("common:search"),className:"w-full bg-surface-elevated border border-border-default rounded-xl pl-9 pr-3 py-2.5 text-sm text-fg-primary placeholder:text-fg-tertiary focus:border-brand-500 focus:outline-none transition-colors"}),u&&e.jsx("button",{onClick:()=>{y(""),m({agents:[],tasks:[],requirements:[],projects:[],deliverables:[],workflows:[]}),p(!1),v.current?.focus()},className:"absolute right-3 top-1/2 -translate-y-1/2 text-fg-tertiary hover:text-fg-secondary",children:e.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),e.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]})]}),e.jsx("div",{className:"flex gap-1 overflow-x-auto scrollbar-hide",children:q.map(s=>e.jsx("button",{onClick:()=>o(s.id),className:`px-3 py-1.5 text-xs rounded-lg whitespace-nowrap transition-colors ${r===s.id?"bg-brand-600 text-white":"bg-surface-elevated text-fg-secondary hover:text-fg-primary"}`,children:s.label},s.id))})]}),e.jsxs("div",{className:"flex-1 overflow-y-auto px-4 pb-4",children:[h&&e.jsx("div",{className:"flex items-center justify-center py-12",children:e.jsx("div",{className:"text-fg-tertiary text-sm animate-pulse",children:l("common:loading")})}),!h&&w&&!k&&e.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[e.jsxs("svg",{width:"40",height:"40",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",className:"text-fg-tertiary mb-3",children:[e.jsx("circle",{cx:"11",cy:"11",r:"8"}),e.jsx("line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65"})]}),e.jsx("p",{className:"text-sm text-fg-tertiary",children:l("common:noResults",{defaultValue:"没有找到相关结果"})})]}),!h&&k&&e.jsxs("div",{className:"space-y-4",children:[(r==="all"||r==="agents")&&t.agents.length>0&&e.jsxs("section",{children:[e.jsx("h3",{className:"text-xs font-medium text-fg-tertiary uppercase mb-2",children:l("common:agents",{defaultValue:"智能体"})}),e.jsx("div",{className:"space-y-1",children:(r==="all"?t.agents.slice(0,8):t.agents).map(s=>e.jsxs("button",{onClick:()=>d.navigate(x.TEAM,{agentId:s.id}),className:"w-full flex items-center gap-3 px-3 py-2.5 rounded-xl hover:bg-surface-overlay transition-colors text-left",children:[e.jsx(O,{name:s.name||"Agent",avatarUrl:s.avatarUrl,size:32}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("div",{className:"text-sm font-medium text-fg-primary truncate",children:s.name}),e.jsx("div",{className:"text-xs text-fg-tertiary truncate",children:s.role||s.status})]}),e.jsx(P,{status:s.status})]},s.id))}),r==="all"&&t.agents.length>8&&e.jsxs("button",{onClick:()=>o("agents"),className:"mt-1 w-full text-xs text-brand-500 hover:text-brand-400 py-1.5 rounded-lg hover:bg-surface-overlay transition-colors",children:[l("common:showAll",{defaultValue:"查看全部"})," (",t.agents.length,")"]})]}),(r==="all"||r==="tasks")&&t.tasks.length>0&&e.jsxs("section",{children:[e.jsx("h3",{className:"text-xs font-medium text-fg-tertiary uppercase mb-2",children:l("common:tasks",{defaultValue:"任务"})}),e.jsx("div",{className:"space-y-1",children:(r==="all"?t.tasks.slice(0,8):t.tasks).map(s=>e.jsxs("button",{onClick:()=>d.navigate(x.WORK,{openTask:s.id}),className:"w-full flex items-center gap-3 px-3 py-2.5 rounded-xl hover:bg-surface-overlay transition-colors text-left",children:[e.jsx(K,{status:s.status}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("div",{className:"text-sm text-fg-primary truncate",children:s.title}),e.jsxs("div",{className:"text-xs text-fg-tertiary truncate",children:[s.status," · ",s.priority||""]})]})]},s.id))}),r==="all"&&t.tasks.length>8&&e.jsxs("button",{onClick:()=>o("tasks"),className:"mt-1 w-full text-xs text-brand-500 hover:text-brand-400 py-1.5 rounded-lg hover:bg-surface-overlay transition-colors",children:[l("common:showAll",{defaultValue:"查看全部"})," (",t.tasks.length,")"]})]}),(r==="all"||r==="requirements")&&t.requirements.length>0&&e.jsxs("section",{children:[e.jsx("h3",{className:"text-xs font-medium text-fg-tertiary uppercase mb-2",children:l("common:requirements",{defaultValue:"需求"})}),e.jsx("div",{className:"space-y-1",children:(r==="all"?t.requirements.slice(0,8):t.requirements).map(s=>e.jsxs("button",{onClick:()=>d.navigate(x.WORK,{openRequirement:s.id}),className:"w-full flex items-center gap-3 px-3 py-2.5 rounded-xl hover:bg-surface-overlay transition-colors text-left",children:[e.jsx("div",{className:`w-8 h-8 rounded-lg flex items-center justify-center shrink-0 ${s.status==="approved"?"text-green-500 bg-green-500/15":s.status==="pending"?"text-amber-500 bg-amber-500/15":s.status==="rejected"?"text-red-500 bg-red-500/15":"text-fg-tertiary bg-surface-elevated"}`,children:e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[e.jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),e.jsx("polyline",{points:"14 2 14 8 20 8"}),e.jsx("line",{x1:"16",y1:"13",x2:"8",y2:"13"}),e.jsx("line",{x1:"16",y1:"17",x2:"8",y2:"17"})]})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("div",{className:"text-sm text-fg-primary truncate",children:s.title}),e.jsxs("div",{className:"text-xs text-fg-tertiary truncate",children:[s.status," · ",s.priority||""]})]})]},s.id))}),r==="all"&&t.requirements.length>8&&e.jsxs("button",{onClick:()=>o("requirements"),className:"mt-1 w-full text-xs text-brand-500 hover:text-brand-400 py-1.5 rounded-lg hover:bg-surface-overlay transition-colors",children:[l("common:showAll",{defaultValue:"查看全部"})," (",t.requirements.length,")"]})]}),(r==="all"||r==="projects")&&t.projects.length>0&&e.jsxs("section",{children:[e.jsx("h3",{className:"text-xs font-medium text-fg-tertiary uppercase mb-2",children:l("common:projects",{defaultValue:"项目"})}),e.jsx("div",{className:"space-y-1",children:(r==="all"?t.projects.slice(0,8):t.projects).map(s=>e.jsxs("button",{onClick:()=>d.navigate(x.WORK,{projectId:s.id}),className:"w-full flex items-center gap-3 px-3 py-2.5 rounded-xl hover:bg-surface-overlay transition-colors text-left",children:[e.jsx("div",{className:"w-8 h-8 rounded-lg bg-brand-500/15 flex items-center justify-center shrink-0",children:e.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",className:"text-brand-500",children:e.jsx("path",{d:"M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"})})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("div",{className:"text-sm text-fg-primary truncate",children:s.name}),s.description&&e.jsx("div",{className:"text-xs text-fg-tertiary truncate",children:s.description})]})]},s.id))}),r==="all"&&t.projects.length>8&&e.jsxs("button",{onClick:()=>o("projects"),className:"mt-1 w-full text-xs text-brand-500 hover:text-brand-400 py-1.5 rounded-lg hover:bg-surface-overlay transition-colors",children:[l("common:showAll",{defaultValue:"查看全部"})," (",t.projects.length,")"]})]}),(r==="all"||r==="deliverables")&&t.deliverables.length>0&&e.jsxs("section",{children:[e.jsx("h3",{className:"text-xs font-medium text-fg-tertiary uppercase mb-2",children:l("common:deliverables",{defaultValue:"交付物"})}),e.jsx("div",{className:"space-y-1",children:(r==="all"?t.deliverables.slice(0,8):t.deliverables).map(s=>e.jsxs("button",{onClick:()=>d.navigate(x.DELIVERABLES,{openDeliverable:s.id}),className:"w-full flex items-center gap-3 px-3 py-2.5 rounded-xl hover:bg-surface-overlay transition-colors text-left",children:[e.jsx("div",{className:"w-8 h-8 rounded-lg bg-purple-500/15 flex items-center justify-center shrink-0",children:e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",className:"text-purple-500",children:[e.jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),e.jsx("polyline",{points:"14 2 14 8 20 8"})]})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("div",{className:"text-sm text-fg-primary truncate",children:s.title}),e.jsxs("div",{className:"text-xs text-fg-tertiary truncate",children:[s.type," · ",s.status]})]})]},s.id))}),r==="all"&&t.deliverables.length>8&&e.jsxs("button",{onClick:()=>o("deliverables"),className:"mt-1 w-full text-xs text-brand-500 hover:text-brand-400 py-1.5 rounded-lg hover:bg-surface-overlay transition-colors",children:[l("common:showAll",{defaultValue:"查看全部"})," (",t.deliverables.length,")"]})]}),(r==="all"||r==="workflows")&&t.workflows.length>0&&e.jsxs("section",{children:[e.jsx("h3",{className:"text-xs font-medium text-fg-tertiary uppercase mb-2",children:l("common:workflows",{defaultValue:"工作流"})}),e.jsx("div",{className:"space-y-1",children:(r==="all"?t.workflows.slice(0,8):t.workflows).map(s=>e.jsxs("button",{onClick:()=>d.navigate(x.WORK,{boardType:"workflows"}),className:"w-full flex items-center gap-3 px-3 py-2.5 rounded-xl hover:bg-surface-overlay transition-colors text-left",children:[e.jsx("div",{className:"w-8 h-8 rounded-lg bg-teal-500/15 flex items-center justify-center shrink-0",children:e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",className:"text-teal-500",children:[e.jsx("circle",{cx:"12",cy:"12",r:"3"}),e.jsx("path",{d:"M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06A1.65 1.65 0 0 0 4.68 15a1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06A1.65 1.65 0 0 0 9 4.68a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06A1.65 1.65 0 0 0 19.4 9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"})]})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("div",{className:"text-sm text-fg-primary truncate",children:s.displayName||s.name}),e.jsxs("div",{className:"text-xs text-fg-tertiary truncate",children:[s.stepCount," steps · v",s.version]})]})]},s.name))}),r==="all"&&t.workflows.length>8&&e.jsxs("button",{onClick:()=>o("workflows"),className:"mt-1 w-full text-xs text-brand-500 hover:text-brand-400 py-1.5 rounded-lg hover:bg-surface-overlay transition-colors",children:[l("common:showAll",{defaultValue:"查看全部"})," (",t.workflows.length,")"]})]})]}),!h&&!w&&e.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[e.jsxs("svg",{width:"40",height:"40",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",className:"text-fg-tertiary mb-3",children:[e.jsx("circle",{cx:"11",cy:"11",r:"8"}),e.jsx("line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65"})]}),e.jsx("p",{className:"text-sm text-fg-tertiary",children:l("common:search")})]})]})]})}function P({status:l}){const u=l==="active"||l==="idle"?"bg-green-500":l==="working"||l==="busy"?"bg-blue-500":"bg-gray-400";return e.jsx("span",{className:`w-2 h-2 rounded-full shrink-0 ${u}`})}function K({status:l}){const u=l==="completed"?"text-green-500 bg-green-500/15":l==="in_progress"?"text-blue-500 bg-blue-500/15":l==="pending"?"text-amber-500 bg-amber-500/15":"text-fg-tertiary bg-surface-elevated";return e.jsx("div",{className:`w-8 h-8 rounded-lg flex items-center justify-center shrink-0 ${u}`,children:e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[e.jsx("path",{d:"M9 11l3 3L22 4"}),e.jsx("path",{d:"M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11"})]})})}export{D as SearchPage};