@kafca/agentdock 0.1.63 → 0.1.64

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 (47) hide show
  1. package/README.md +4 -0
  2. package/dist/renderer/assets/{AutomationList-DR-micIT.js → AutomationList-uiR0seMA.js} +1 -1
  3. package/dist/renderer/assets/{Badge-COE1Zm2i.js → Badge-BZwdECxe.js} +1 -1
  4. package/dist/renderer/assets/{Card-F6UNFxnQ.js → Card-JMY-xmLX.js} +1 -1
  5. package/dist/renderer/assets/{Config-BKqxfhZi.js → Config-BMcWRfWu.js} +1 -1
  6. package/dist/renderer/assets/{Dashboard-Bvp7-_2z.js → Dashboard-CSk6wUMx.js} +2 -2
  7. package/dist/renderer/assets/{EmptyState-BwV_J0Og.js → EmptyState-3J94zJRa.js} +1 -1
  8. package/dist/renderer/assets/{HighlightedMarkdown-CBIBaWyM.js → HighlightedMarkdown-DKL7rO-G.js} +1 -1
  9. package/dist/renderer/assets/{Input-C8LZd4Bi.js → Input-BGK524F9.js} +1 -1
  10. package/dist/renderer/assets/{KnowledgeDetail-DjXYNMIs.js → KnowledgeDetail-XZ9sxTBY.js} +1 -1
  11. package/dist/renderer/assets/{KnowledgeHome-Cqk5_nJh.js → KnowledgeHome-CJlGiu7a.js} +1 -1
  12. package/dist/renderer/assets/{Logs-B6cXFvW4.js → Logs-B5Y0yspB.js} +1 -1
  13. package/dist/renderer/assets/{Modal-CAj7soll.js → Modal-DlIfXQ8_.js} +1 -1
  14. package/dist/renderer/assets/{Page-DlnMnu4F.js → Page-B1i9DSW-.js} +1 -1
  15. package/dist/renderer/assets/{Select-CVay_LUX.js → Select-DDpZ4sBt.js} +1 -1
  16. package/dist/renderer/assets/{ThreadChat-BxXRpYa1.js → ThreadChat-D63t_k2d.js} +3 -3
  17. package/dist/renderer/assets/{Workspace-YC0pC7cM.js → Workspace-BPkGxjuF.js} +1 -1
  18. package/dist/renderer/assets/{arrow-left-Cwm09dxx.js → arrow-left-C6VSgxEk.js} +1 -1
  19. package/dist/renderer/assets/{book-open-BwcGC_im.js → book-open-DWJZSr5x.js} +1 -1
  20. package/dist/renderer/assets/{channels-BPytmVCd.js → channels-Dkik3Wxt.js} +1 -1
  21. package/dist/renderer/assets/{chevron-down-2LP9oGHG.js → chevron-down-BHtOK5fW.js} +1 -1
  22. package/dist/renderer/assets/{index-eoVERL5K.js → index-DV9qeL9P.js} +2 -2
  23. package/dist/renderer/assets/{index-llCPCiYk.js → index-TTj4JT0d.js} +1 -1
  24. package/dist/renderer/assets/{knowledge-QujAv-Zh.js → knowledge-C9mJpMmJ.js} +1 -1
  25. package/dist/renderer/assets/{pencil-0P2INETc.js → pencil-B7bBxE-w.js} +1 -1
  26. package/dist/renderer/assets/{plus-tiGRgE2v.js → plus-DPOTxoL2.js} +1 -1
  27. package/dist/renderer/assets/{save-D8U93DNa.js → save-Drzhy5En.js} +1 -1
  28. package/dist/renderer/assets/{search-C-9J9J3f.js → search-m-2mVuF6.js} +1 -1
  29. package/dist/renderer/assets/{shield-check-BCKkPPTJ.js → shield-check-C8NOMoui.js} +1 -1
  30. package/dist/renderer/assets/{threads-Bsrwwnpm.js → threads-BG4F9grx.js} +1 -1
  31. package/dist/renderer/assets/{trash-2-CP4sn15n.js → trash-2-Bh0nSQUA.js} +1 -1
  32. package/dist/renderer/index.html +1 -1
  33. package/dist-electron/services/local-ai-core/src/acp/store/automation-store.js +69 -3
  34. package/dist-electron/services/local-ai-core/src/acp/store/local-core-acp-store.js +14 -2
  35. package/dist-electron/services/local-ai-core/src/automation/automation-monitor-service.js +5 -3
  36. package/dist-electron/services/local-ai-core/src/automation/automation-service.js +13 -4
  37. package/dist-electron/services/local-ai-core/src/automation/automation-trigger-engine.js +19 -18
  38. package/dist-electron/services/local-ai-core/src/automation/legacy-automation-mappers.js +25 -1
  39. package/dist-electron/services/local-ai-core/src/kernel/bootstrap.js +15 -0
  40. package/dist-electron/services/local-ai-core/src/runtime/local-core-controller.js +13 -3
  41. package/dist-electron/services/local-ai-core/src/scheduler/cron.js +197 -0
  42. package/dist-electron/services/local-ai-core/src/scheduler/scheduled-job-application-service.js +4 -3
  43. package/dist-electron/services/local-ai-core/src/scheduler/scheduler-service.js +3 -3
  44. package/dist-electron/tests/electron/automation-compatibility.test.js +6 -1
  45. package/dist-electron/tests/electron/automation-engine.test.js +67 -3
  46. package/dist-electron/tests/electron/automation-store.test.js +189 -0
  47. package/package.json +1 -1
package/README.md CHANGED
@@ -95,6 +95,10 @@ flowchart LR
95
95
 
96
96
  ## New
97
97
 
98
+ ### 2026-07-15
99
+
100
+ - 定时任务(cron)现在使用服务器本地时区解释表达式——`0 1 * * *` 会在本地凌晨 1 点触发,而不是 UTC。支持任意 IANA 时区(如 `Asia/Shanghai`、`America/New_York`),并正确处理 DST 夏令时跳变。
101
+
98
102
  ### 2026-07-13
99
103
 
100
104
  - 条件自动化现已统一 Scheduler 与 Monitor 的 Activation、Condition、Action 和 Delivery 边界,并提供逐项 macOS/Linux Sandbox 部署诊断、Linux 镜像依赖及 Ubuntu 24.04+ 专用 AppArmor 安全配置指引;Windows 脚本执行保持 fail-closed。
@@ -1,4 +1,4 @@
1
- import{c as I,z as h,D as U,r as l,j as t,B as x,E as L,u as V,s as B,R as D,A as q}from"./index-eoVERL5K.js";import{l as G}from"./threads-Bsrwwnpm.js";import{C as $}from"./Card-F6UNFxnQ.js";import{B as R}from"./Badge-COE1Zm2i.js";import{S as F}from"./Select-CVay_LUX.js";import{E as H}from"./EmptyState-BwV_J0Og.js";import{P as J}from"./Page-DlnMnu4F.js";import{M as T}from"./Modal-CAj7soll.js";import{I as K}from"./Input-C8LZd4Bi.js";import"./index-llCPCiYk.js";import"./chevron-down-2LP9oGHG.js";/**
1
+ import{c as I,z as h,D as U,r as l,j as t,B as x,E as L,u as V,s as B,R as D,A as q}from"./index-DV9qeL9P.js";import{l as G}from"./threads-BG4F9grx.js";import{C as $}from"./Card-JMY-xmLX.js";import{B as R}from"./Badge-BZwdECxe.js";import{S as F}from"./Select-DDpZ4sBt.js";import{E as H}from"./EmptyState-3J94zJRa.js";import{P as J}from"./Page-B1i9DSW-.js";import{M as T}from"./Modal-DlIfXQ8_.js";import{I as K}from"./Input-BGK524F9.js";import"./index-TTj4JT0d.js";import"./chevron-down-BHtOK5fW.js";/**
2
2
  * @license lucide-react v0.487.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1 +1 @@
1
- import{j as t,g as a}from"./index-eoVERL5K.js";const n={default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",success:"border-transparent bg-primary/10 text-primary dark:bg-primary/15 dark:text-primary",warning:"border-transparent bg-amber-100 text-amber-700 dark:bg-amber-500/15 dark:text-amber-200",danger:"border-transparent bg-destructive/10 text-destructive dark:bg-destructive/20 dark:text-red-200",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground",info:"border-transparent bg-blue-100 text-blue-700 dark:bg-blue-500/15 dark:text-blue-200"};function s({children:r,variant:e="default"}){return t.jsx("span",{className:a("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",n[e]),children:r})}export{s as B};
1
+ import{j as t,g as a}from"./index-DV9qeL9P.js";const n={default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",success:"border-transparent bg-primary/10 text-primary dark:bg-primary/15 dark:text-primary",warning:"border-transparent bg-amber-100 text-amber-700 dark:bg-amber-500/15 dark:text-amber-200",danger:"border-transparent bg-destructive/10 text-destructive dark:bg-destructive/20 dark:text-red-200",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground",info:"border-transparent bg-blue-100 text-blue-700 dark:bg-blue-500/15 dark:text-blue-200"};function s({children:r,variant:e="default"}){return t.jsx("span",{className:a("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",n[e]),children:r})}export{s as B};
@@ -1 +1 @@
1
- import{j as a,g as d}from"./index-eoVERL5K.js";function n({children:r,className:o,hover:e}){return a.jsx("div",{className:d("rounded-lg p-5 text-card-foreground transition-colors duration-200 animate-float-in","border border-black/[0.08] bg-white/62 shadow-[0_1px_1px_rgba(0,0,0,0.04)] backdrop-blur-2xl","dark:border-white/[0.07] dark:bg-white/[0.06] dark:shadow-none",e&&"cursor-pointer hover:border-black/[0.12] hover:bg-white/76 hover:shadow-[0_10px_26px_rgba(0,0,0,0.07)] dark:hover:border-white/[0.10] dark:hover:bg-white/[0.09] dark:hover:shadow-none",o),children:r})}export{n as C};
1
+ import{j as a,g as d}from"./index-DV9qeL9P.js";function n({children:r,className:o,hover:e}){return a.jsx("div",{className:d("rounded-lg p-5 text-card-foreground transition-colors duration-200 animate-float-in","border border-black/[0.08] bg-white/62 shadow-[0_1px_1px_rgba(0,0,0,0.04)] backdrop-blur-2xl","dark:border-white/[0.07] dark:bg-white/[0.06] dark:shadow-none",e&&"cursor-pointer hover:border-black/[0.12] hover:bg-white/76 hover:shadow-[0_10px_26px_rgba(0,0,0,0.07)] dark:hover:border-white/[0.10] dark:hover:bg-white/[0.09] dark:hover:shadow-none",o),children:r})}export{n as C};
@@ -1,4 +1,4 @@
1
- import{c as g,u as H,r as n,k as $,G as T,H as C,j as e,B as c,R as q,L as V,T as F,I as R,J as G,K as J}from"./index-eoVERL5K.js";import{B as x}from"./Badge-COE1Zm2i.js";import{I as Q}from"./Input-C8LZd4Bi.js";import{P as X,S as l,a as I}from"./Page-DlnMnu4F.js";import{S as O}from"./shield-check-BCKkPPTJ.js";import{S as W,P as Y}from"./save-D8U93DNa.js";import"./Card-F6UNFxnQ.js";/**
1
+ import{c as g,u as H,r as n,k as $,G as T,H as C,j as e,B as c,R as q,L as V,T as F,I as R,J as G,K as J}from"./index-DV9qeL9P.js";import{B as x}from"./Badge-BZwdECxe.js";import{I as Q}from"./Input-BGK524F9.js";import{P as X,S as l,a as I}from"./Page-B1i9DSW-.js";import{S as O}from"./shield-check-C8NOMoui.js";import{S as W,P as Y}from"./save-Drzhy5En.js";import"./Card-JMY-xmLX.js";/**
2
2
  * @license lucide-react v0.487.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{c as u,u as se,r,a as te,l as ae,b as M,d as re,e as ie,f as ne,o as de,s as le,j as e,A as ce,M as oe,W as me,B as xe,R as ue,L as E,F as he,S as ge,g as pe}from"./index-eoVERL5K.js";import{C as f}from"./Card-F6UNFxnQ.js";import{B as n}from"./Badge-COE1Zm2i.js";import{E as j}from"./EmptyState-BwV_J0Og.js";import{P as fe}from"./Page-DlnMnu4F.js";import{l as je}from"./threads-Bsrwwnpm.js";import{B as ye}from"./book-open-BwcGC_im.js";import{S as B}from"./shield-check-BCKkPPTJ.js";/**
1
+ import{c as u,u as se,r,a as te,l as ae,b as M,d as re,e as ie,f as ne,o as de,s as le,j as e,A as ce,M as oe,W as me,B as xe,R as ue,L as E,F as he,S as ge,g as pe}from"./index-DV9qeL9P.js";import{C as f}from"./Card-JMY-xmLX.js";import{B as n}from"./Badge-BZwdECxe.js";import{E as j}from"./EmptyState-3J94zJRa.js";import{P as fe}from"./Page-B1i9DSW-.js";import{l as je}from"./threads-BG4F9grx.js";import{B as ye}from"./book-open-DWJZSr5x.js";import{S as B}from"./shield-check-C8NOMoui.js";/**
2
2
  * @license lucide-react v0.487.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -33,4 +33,4 @@ import{c as u,u as se,r,a as te,l as ae,b as M,d as re,e as ie,f as ne,o as de,s
33
33
  *
34
34
  * This source code is licensed under the ISC license.
35
35
  * See the LICENSE file in the root directory of this source tree.
36
- */const Ee=[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]],ze=u("server",Ee);function Ce({title:a,description:t,to:l,icon:c,primary:m}){return e.jsxs(E,{to:l,className:["group flex min-h-[112px] flex-col justify-between rounded-[18px] border p-5 transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-ring",m?"border-primary/20 bg-primary/5 text-foreground hover:bg-primary/10 dark:bg-primary/10 dark:hover:bg-primary/15":"border-black/[0.08] bg-white text-foreground hover:bg-[#fcfcfd] dark:border-white/[0.07] dark:bg-white/[0.04] dark:hover:bg-white/[0.07]"].join(" "),children:[e.jsxs("div",{className:"flex items-start justify-between gap-4",children:[e.jsx("div",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-full bg-primary/10 text-primary dark:bg-primary/15",children:e.jsx(c,{size:20})}),e.jsx(W,{size:17,className:"mt-1 text-muted-foreground/45 transition-colors group-hover:text-foreground"})]}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-base font-semibold text-foreground",children:a}),e.jsx("p",{className:"mt-2 max-w-sm text-sm leading-5 text-muted-foreground",children:t})]})]})}function v({label:a,value:t,detail:l,tone:c="neutral"}){return e.jsxs("div",{className:"app-surface p-4",children:[e.jsx("p",{className:"text-xs text-muted-foreground",children:a}),e.jsx("p",{className:pe("mt-2 text-2xl font-semibold",c==="primary"?"text-primary":c==="warning"?"text-amber-600 dark:text-amber-300":"text-foreground"),children:t}),e.jsx("p",{className:"mt-1 truncate text-xs text-muted-foreground",children:l})]})}function _e(a){return a.readiness==="ready"?"success":a.readiness==="failed"?"danger":a.readiness==="degraded"?"warning":a.status==="installed"?"success":a.status==="error"?"danger":"warning"}function De(a){return a.readiness||(a.status==="installed"?"ready":"unknown")}function L({title:a,description:t,tasks:l,empty:c,urgent:m}){return e.jsxs(f,{className:"app-panel overflow-hidden p-0",children:[e.jsx("div",{className:"border-b border-black/[0.08] px-5 py-4 dark:border-white/[0.07]",children:e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-base font-semibold text-foreground",children:a}),e.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:t})]}),e.jsx(n,{variant:m&&l.length>0?"warning":"secondary",children:l.length})]})}),l.length===0?e.jsx("div",{className:"p-5",children:e.jsx(j,{message:c,icon:Le})}):e.jsx("div",{className:"divide-y divide-black/[0.08] dark:divide-white/[0.07]",children:l.map(d=>e.jsxs("div",{className:"px-5 py-4 transition-colors hover:bg-black/[0.025] dark:hover:bg-white/[0.035]",children:[e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:"truncate text-sm font-medium text-foreground",children:d.title}),e.jsxs("p",{className:"mt-1 truncate text-xs text-muted-foreground",children:[d.workspaceId," · ",d.runtimeId]})]}),e.jsx(n,{variant:d.status==="failed"?"danger":d.status==="completed"?"success":"info",children:d.status})]}),e.jsxs("p",{className:"mt-2 text-xs text-muted-foreground",children:["Updated ",new Date(d.updatedAt).toLocaleString()]})]},d.taskId))})]})}function Te({approvals:a}){return e.jsxs(f,{className:"app-panel overflow-hidden p-0",children:[e.jsx("div",{className:"border-b border-black/[0.08] px-5 py-4 dark:border-white/[0.07]",children:e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-base font-semibold text-foreground",children:"待审批"}),e.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"高风险操作会在这里等待确认或拒绝。"})]}),e.jsx(n,{variant:a.length>0?"warning":"secondary",children:a.length})]})}),a.length===0?e.jsx("div",{className:"p-5",children:e.jsx(j,{message:"暂无待审批操作",icon:B})}):e.jsx("div",{className:"divide-y divide-black/[0.08] dark:divide-white/[0.07]",children:a.map(t=>e.jsxs("div",{className:"px-5 py-4",children:[e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:"truncate text-sm font-medium text-foreground",children:t.title}),e.jsxs("p",{className:"mt-1 truncate text-xs text-muted-foreground",children:[t.workspaceId," · ",t.kind]})]}),e.jsx(n,{variant:t.riskLevel==="high"?"danger":"warning",children:t.riskLevel})]}),e.jsx("p",{className:"mt-2 line-clamp-2 text-xs leading-5 text-muted-foreground",children:t.description})]},t.approvalId))})]})}function Pe({events:a}){return e.jsxs(f,{className:"app-panel overflow-hidden p-0",children:[e.jsxs("div",{className:"border-b border-black/[0.08] px-5 py-4 dark:border-white/[0.07]",children:[e.jsx("h2",{className:"text-base font-semibold text-foreground",children:"审计记录"}),e.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"最近的任务、审批和权限事件。"})]}),a.length===0?e.jsx("div",{className:"p-5",children:e.jsx(j,{message:"暂无审计记录",icon:B})}):e.jsx("div",{className:"divide-y divide-black/[0.08] dark:divide-white/[0.07]",children:a.map(t=>e.jsxs("div",{className:"px-5 py-4",children:[e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:"truncate text-sm font-medium text-foreground",children:t.summary}),e.jsxs("p",{className:"mt-1 truncate text-xs text-muted-foreground",children:[t.type," · ",t.actor||"system"]})]}),t.riskLevel?e.jsx(n,{variant:t.riskLevel==="high"?"danger":"secondary",children:t.riskLevel}):null]}),e.jsx("p",{className:"mt-2 text-xs text-muted-foreground",children:new Date(t.createdAt).toLocaleString()})]},t.auditId))})]})}function Ke(){const{t:a}=se(),[t,l]=r.useState([]),[c,m]=r.useState([]),[d,F]=r.useState([]),[N,U]=r.useState([]),[V,H]=r.useState([]),[w,K]=r.useState([]),[O,Q]=r.useState([]),[G,z]=r.useState(!0),[J,C]=r.useState(!1),[X,g]=r.useState(!1),[_,D]=r.useState(""),[T,p]=r.useState(""),{desktopRuntime:h,desktopWorkspace:qe,knowledgeModule:P,schedulerModule:q,monitorModule:I}=te(),R=c.filter(s=>s.installed),y=[{title:"继续聊天",description:"打开本地对话,继续当前项目里的 agent 线程。",to:"/chat",icon:oe,primary:!0},{title:"工作区",description:"管理项目、平台、模型和本地运行配置。",to:"/workspace",icon:me}];P&&y.push({title:"知识库",description:"上传文档,维护可被检索的项目资料。",to:"/knowledge",icon:ye}),(q||I)&&y.push({title:"自动化",description:"查看和管理计划、监控和条件触发的自动化。",to:"/automations",icon:ve}),(!P||!q&&!I)&&y.push({title:"系统设置",description:"查看配置、日志和桌面应用偏好。",to:"/system",icon:ge});const k=r.useCallback(async()=>{var s;z(!0),D(""),p("");try{if(h){const[i,x]=await Promise.all([je(),ae().then(S=>({status:"fulfilled",runtimes:S.runtimes}),S=>({status:"rejected",error:S}))]),[o,A,b]=await Promise.all([M({status:["created","queued","running"],limit:6}),M({status:"waiting_for_user",limit:6}),M({status:["completed","failed","cancelled"],limit:6})]),[Z,ee]=await Promise.all([re({status:"pending",limit:6}),ie({limit:6})]);F(o.tasks||[]),U(A.tasks||[]),H(b.tasks||[]),K(Z.approvals||[]),Q(ee.events||[]),l(i.workspaces||[]),x.status==="fulfilled"?m(x.runtimes):(m([]),p(((s=x.error)==null?void 0:s.message)||String(x.error)));return}}catch(i){D(i.message||String(i))}finally{z(!1)}},[h]),Y=r.useCallback(async()=>{C(!0),g(!0),p("");try{m((await ne()).runtimes)}catch(s){p(s.message||String(s))}finally{C(!1),g(!1)}},[]);return r.useEffect(()=>{k();const s=()=>k();window.addEventListener("cc:refresh",s);const i=de(()=>{k()}),x=le(o=>{if(o.type==="runtime.detect.started"){g(!0);return}if(o.type==="runtime.detect.completed"){g(!1),m(o.runtimes);return}if(o.type==="runtime.detect.failed"){g(!1),p(o.error);return}o.type==="runtime.status.changed"&&m(A=>A.map(b=>b.runtimeId===o.runtime.runtimeId?o.runtime:b))});return()=>{window.removeEventListener("cc:refresh",s),i(),x()}},[h,k]),G&&t.length===0?e.jsx("div",{className:"flex h-64 items-center justify-center text-muted-foreground",children:e.jsx(ce,{className:"animate-pulse",size:24})}):e.jsxs("div",{className:"animate-fade-in space-y-8",children:[e.jsx(fe,{title:"概览",description:"继续最近的工作,或进入项目、知识和自动化配置。当前版本 v0.1.63"}),e.jsxs("section",{className:"grid grid-cols-2 gap-3 lg:grid-cols-4",children:[e.jsx(v,{label:"Projects",value:t.length,detail:"configured workspaces",tone:"primary"}),e.jsx(v,{label:"Running",value:d.length,detail:"active agent tasks"}),e.jsx(v,{label:"Waiting",value:N.length+w.length,detail:"needs attention",tone:N.length+w.length>0?"warning":"neutral"}),e.jsx(v,{label:"Runtimes",value:R.length,detail:"installed locally"})]}),_?e.jsx("div",{role:"alert",className:"rounded-lg border border-amber-200 bg-amber-50 px-4 py-3 text-sm text-amber-700 dark:border-amber-400/20 dark:bg-amber-500/10 dark:text-amber-200",children:_}):null,e.jsxs("section",{className:"space-y-3",children:[e.jsx("div",{className:"flex items-end justify-between gap-4",children:e.jsxs("div",{children:[e.jsx("h2",{className:"text-lg font-semibold tracking-tight text-foreground",children:"快速开始"}),e.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"常用入口会保留在最前面。"})]})}),e.jsx("div",{className:"grid grid-cols-1 gap-3 lg:grid-cols-2",children:y.map(s=>e.jsx(Ce,{...s},s.to))})]}),h?e.jsxs(f,{className:"app-panel overflow-hidden p-0",children:[e.jsxs("div",{className:"flex flex-col gap-3 border-b border-black/[0.08] px-5 py-4 dark:border-white/[0.07] sm:flex-row sm:items-center sm:justify-between",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-base font-semibold text-foreground",children:"本机 Agent Runtime"}),e.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"显示本机 runtime 安装检测状态,不执行安装或登录检查。"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs(n,{variant:R.length>0?"success":"default",children:[R.length," installed"]}),X?e.jsx(n,{variant:"info",children:"checking"}):null,e.jsxs(xe,{variant:"outline",size:"sm",loading:J,onClick:Y,title:"刷新 runtime 检测",children:[e.jsx(ue,{size:15}),"刷新"]})]})]}),T?e.jsxs("div",{className:"px-5 py-4 text-sm text-amber-700 dark:text-amber-200",children:["检测失败:",T]}):c.length===0?e.jsx("div",{className:"p-5",children:e.jsx(j,{message:"还没有 runtime 检测结果",icon:$})}):e.jsx("div",{className:"grid grid-cols-1 gap-3 p-5 md:grid-cols-2 xl:grid-cols-3",children:c.map(s=>{var i,x;return e.jsxs("div",{className:"app-list-row",children:[e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[e.jsx("div",{className:["flex h-10 w-10 shrink-0 items-center justify-center rounded-xl",s.status==="installed"?"bg-emerald-500/10 text-emerald-600 dark:text-emerald-300":s.status==="error"?"bg-red-500/10 text-red-600 dark:text-red-200":"bg-amber-500/10 text-amber-700 dark:text-amber-200"].join(" "),children:e.jsx($,{size:19})}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:"truncate text-sm font-semibold text-foreground",children:s.displayName}),e.jsx("p",{className:"mt-0.5 truncate text-xs text-muted-foreground",children:s.agentType})]})]}),s.status==="installed"?e.jsx(Ae,{size:18,className:"mt-0.5 shrink-0 text-emerald-500"}):e.jsx(we,{size:18,className:"mt-0.5 shrink-0 text-amber-500"})]}),e.jsxs("div",{className:"mt-4 flex flex-wrap items-center gap-2",children:[e.jsx(n,{variant:s.status==="installed"?"success":s.status==="error"?"danger":"warning",children:s.status}),e.jsx(n,{variant:_e(s),children:De(s)}),e.jsx(n,{children:s.source}),s.version?e.jsxs(n,{variant:"secondary",children:["v",s.version]}):null]}),e.jsx("p",{className:"mt-3 text-sm leading-5 text-muted-foreground",children:s.summary}),s.lastLaunchError?e.jsx("p",{className:"mt-2 text-xs leading-5 text-red-600 dark:text-red-200",children:s.lastLaunchError.userMessage}):s.issues[0]?e.jsx("p",{className:"mt-2 text-xs leading-5 text-amber-700 dark:text-amber-200",children:s.issues[0].message}):null,(i=s.lastLaunchError)!=null&&i.suggestedAction?e.jsx("p",{className:"mt-2 text-xs leading-5 text-muted-foreground",children:s.lastLaunchError.suggestedAction}):null,s.binaryPath||s.command?e.jsx("p",{className:"mt-3 truncate rounded-lg bg-black/[0.045] px-2.5 py-2 font-mono text-xs text-muted-foreground dark:bg-white/[0.06]",children:s.binaryPath||s.command}):null,s.recommendedActions[0]&&!((x=s.lastLaunchError)!=null&&x.suggestedAction)?e.jsx("p",{className:"mt-3 text-xs leading-5 text-muted-foreground",children:s.recommendedActions[0].description}):null,e.jsxs("p",{className:"mt-3 text-xs text-muted-foreground",children:["Last checked ",new Date(s.lastCheckedAt||s.detectedAt).toLocaleString()]})]},s.agentType)})})]}):null,h?e.jsxs("section",{className:"grid grid-cols-1 gap-4 xl:grid-cols-3",children:[e.jsx(L,{title:"运行中任务",description:"正在排队或执行的 agent 工作。",tasks:d,empty:"暂无运行中的任务"}),e.jsx(L,{title:"等待处理",description:"需要用户输入或审批的任务。",tasks:N,empty:"暂无等待处理的任务",urgent:!0}),e.jsx(L,{title:"最近完成",description:"最近结束、失败或取消的任务。",tasks:V,empty:"暂无最近任务"})]}):null,h?e.jsxs("section",{className:"grid grid-cols-1 gap-4 xl:grid-cols-2",children:[e.jsx(Te,{approvals:w}),e.jsx(Pe,{events:O})]}):null,e.jsxs(f,{className:"app-panel p-0",children:[e.jsxs("div",{className:"flex items-center justify-between gap-4 border-b border-black/[0.08] px-5 py-4 dark:border-white/[0.07]",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-base font-semibold text-foreground",children:a("nav.projects")}),e.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"最近配置和会话概览。"})]}),e.jsx(E,{to:"/workspace",className:"text-sm font-medium text-primary transition-colors hover:text-primary/80",children:a("common.viewAll")})]}),t.length===0?e.jsx("div",{className:"p-5",children:e.jsx(j,{message:a("projects.noProjects"),icon:he})}):e.jsx("div",{className:"divide-y divide-black/[0.08] dark:divide-white/[0.07]",children:t.slice(0,6).map(s=>{var i;return e.jsxs(E,{to:`/workspace?project=${encodeURIComponent(s.name)}`,className:"group flex items-center justify-between gap-3 px-5 py-4 transition-colors duration-200 hover:bg-black/[0.04] dark:hover:bg-white/[0.06]",children:[e.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[e.jsx("div",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-xl bg-primary/10 text-primary",children:e.jsx(ze,{size:17})}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:"truncate text-sm font-medium text-foreground",children:s.name}),e.jsxs("p",{className:"mt-0.5 truncate text-xs text-muted-foreground",children:[s.agentType," · ",((i=s.platforms)==null?void 0:i.join(", "))||"no platform"," · ",s.sessionsCount," sessions"]})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[s.heartbeatEnabled?e.jsx(n,{variant:"success",children:"heartbeat"}):null,e.jsx(W,{size:16,className:"text-muted-foreground/45 transition-colors group-hover:text-foreground"})]})]},s.name)})})]})]})}export{Ke as default};
36
+ */const Ee=[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]],ze=u("server",Ee);function Ce({title:a,description:t,to:l,icon:c,primary:m}){return e.jsxs(E,{to:l,className:["group flex min-h-[112px] flex-col justify-between rounded-[18px] border p-5 transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-ring",m?"border-primary/20 bg-primary/5 text-foreground hover:bg-primary/10 dark:bg-primary/10 dark:hover:bg-primary/15":"border-black/[0.08] bg-white text-foreground hover:bg-[#fcfcfd] dark:border-white/[0.07] dark:bg-white/[0.04] dark:hover:bg-white/[0.07]"].join(" "),children:[e.jsxs("div",{className:"flex items-start justify-between gap-4",children:[e.jsx("div",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-full bg-primary/10 text-primary dark:bg-primary/15",children:e.jsx(c,{size:20})}),e.jsx(W,{size:17,className:"mt-1 text-muted-foreground/45 transition-colors group-hover:text-foreground"})]}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-base font-semibold text-foreground",children:a}),e.jsx("p",{className:"mt-2 max-w-sm text-sm leading-5 text-muted-foreground",children:t})]})]})}function v({label:a,value:t,detail:l,tone:c="neutral"}){return e.jsxs("div",{className:"app-surface p-4",children:[e.jsx("p",{className:"text-xs text-muted-foreground",children:a}),e.jsx("p",{className:pe("mt-2 text-2xl font-semibold",c==="primary"?"text-primary":c==="warning"?"text-amber-600 dark:text-amber-300":"text-foreground"),children:t}),e.jsx("p",{className:"mt-1 truncate text-xs text-muted-foreground",children:l})]})}function _e(a){return a.readiness==="ready"?"success":a.readiness==="failed"?"danger":a.readiness==="degraded"?"warning":a.status==="installed"?"success":a.status==="error"?"danger":"warning"}function De(a){return a.readiness||(a.status==="installed"?"ready":"unknown")}function L({title:a,description:t,tasks:l,empty:c,urgent:m}){return e.jsxs(f,{className:"app-panel overflow-hidden p-0",children:[e.jsx("div",{className:"border-b border-black/[0.08] px-5 py-4 dark:border-white/[0.07]",children:e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-base font-semibold text-foreground",children:a}),e.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:t})]}),e.jsx(n,{variant:m&&l.length>0?"warning":"secondary",children:l.length})]})}),l.length===0?e.jsx("div",{className:"p-5",children:e.jsx(j,{message:c,icon:Le})}):e.jsx("div",{className:"divide-y divide-black/[0.08] dark:divide-white/[0.07]",children:l.map(d=>e.jsxs("div",{className:"px-5 py-4 transition-colors hover:bg-black/[0.025] dark:hover:bg-white/[0.035]",children:[e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:"truncate text-sm font-medium text-foreground",children:d.title}),e.jsxs("p",{className:"mt-1 truncate text-xs text-muted-foreground",children:[d.workspaceId," · ",d.runtimeId]})]}),e.jsx(n,{variant:d.status==="failed"?"danger":d.status==="completed"?"success":"info",children:d.status})]}),e.jsxs("p",{className:"mt-2 text-xs text-muted-foreground",children:["Updated ",new Date(d.updatedAt).toLocaleString()]})]},d.taskId))})]})}function Te({approvals:a}){return e.jsxs(f,{className:"app-panel overflow-hidden p-0",children:[e.jsx("div",{className:"border-b border-black/[0.08] px-5 py-4 dark:border-white/[0.07]",children:e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-base font-semibold text-foreground",children:"待审批"}),e.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"高风险操作会在这里等待确认或拒绝。"})]}),e.jsx(n,{variant:a.length>0?"warning":"secondary",children:a.length})]})}),a.length===0?e.jsx("div",{className:"p-5",children:e.jsx(j,{message:"暂无待审批操作",icon:B})}):e.jsx("div",{className:"divide-y divide-black/[0.08] dark:divide-white/[0.07]",children:a.map(t=>e.jsxs("div",{className:"px-5 py-4",children:[e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:"truncate text-sm font-medium text-foreground",children:t.title}),e.jsxs("p",{className:"mt-1 truncate text-xs text-muted-foreground",children:[t.workspaceId," · ",t.kind]})]}),e.jsx(n,{variant:t.riskLevel==="high"?"danger":"warning",children:t.riskLevel})]}),e.jsx("p",{className:"mt-2 line-clamp-2 text-xs leading-5 text-muted-foreground",children:t.description})]},t.approvalId))})]})}function Pe({events:a}){return e.jsxs(f,{className:"app-panel overflow-hidden p-0",children:[e.jsxs("div",{className:"border-b border-black/[0.08] px-5 py-4 dark:border-white/[0.07]",children:[e.jsx("h2",{className:"text-base font-semibold text-foreground",children:"审计记录"}),e.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"最近的任务、审批和权限事件。"})]}),a.length===0?e.jsx("div",{className:"p-5",children:e.jsx(j,{message:"暂无审计记录",icon:B})}):e.jsx("div",{className:"divide-y divide-black/[0.08] dark:divide-white/[0.07]",children:a.map(t=>e.jsxs("div",{className:"px-5 py-4",children:[e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:"truncate text-sm font-medium text-foreground",children:t.summary}),e.jsxs("p",{className:"mt-1 truncate text-xs text-muted-foreground",children:[t.type," · ",t.actor||"system"]})]}),t.riskLevel?e.jsx(n,{variant:t.riskLevel==="high"?"danger":"secondary",children:t.riskLevel}):null]}),e.jsx("p",{className:"mt-2 text-xs text-muted-foreground",children:new Date(t.createdAt).toLocaleString()})]},t.auditId))})]})}function Ke(){const{t:a}=se(),[t,l]=r.useState([]),[c,m]=r.useState([]),[d,F]=r.useState([]),[N,U]=r.useState([]),[V,H]=r.useState([]),[w,K]=r.useState([]),[O,Q]=r.useState([]),[G,z]=r.useState(!0),[J,C]=r.useState(!1),[X,g]=r.useState(!1),[_,D]=r.useState(""),[T,p]=r.useState(""),{desktopRuntime:h,desktopWorkspace:qe,knowledgeModule:P,schedulerModule:q,monitorModule:I}=te(),R=c.filter(s=>s.installed),y=[{title:"继续聊天",description:"打开本地对话,继续当前项目里的 agent 线程。",to:"/chat",icon:oe,primary:!0},{title:"工作区",description:"管理项目、平台、模型和本地运行配置。",to:"/workspace",icon:me}];P&&y.push({title:"知识库",description:"上传文档,维护可被检索的项目资料。",to:"/knowledge",icon:ye}),(q||I)&&y.push({title:"自动化",description:"查看和管理计划、监控和条件触发的自动化。",to:"/automations",icon:ve}),(!P||!q&&!I)&&y.push({title:"系统设置",description:"查看配置、日志和桌面应用偏好。",to:"/system",icon:ge});const k=r.useCallback(async()=>{var s;z(!0),D(""),p("");try{if(h){const[i,x]=await Promise.all([je(),ae().then(S=>({status:"fulfilled",runtimes:S.runtimes}),S=>({status:"rejected",error:S}))]),[o,A,b]=await Promise.all([M({status:["created","queued","running"],limit:6}),M({status:"waiting_for_user",limit:6}),M({status:["completed","failed","cancelled"],limit:6})]),[Z,ee]=await Promise.all([re({status:"pending",limit:6}),ie({limit:6})]);F(o.tasks||[]),U(A.tasks||[]),H(b.tasks||[]),K(Z.approvals||[]),Q(ee.events||[]),l(i.workspaces||[]),x.status==="fulfilled"?m(x.runtimes):(m([]),p(((s=x.error)==null?void 0:s.message)||String(x.error)));return}}catch(i){D(i.message||String(i))}finally{z(!1)}},[h]),Y=r.useCallback(async()=>{C(!0),g(!0),p("");try{m((await ne()).runtimes)}catch(s){p(s.message||String(s))}finally{C(!1),g(!1)}},[]);return r.useEffect(()=>{k();const s=()=>k();window.addEventListener("cc:refresh",s);const i=de(()=>{k()}),x=le(o=>{if(o.type==="runtime.detect.started"){g(!0);return}if(o.type==="runtime.detect.completed"){g(!1),m(o.runtimes);return}if(o.type==="runtime.detect.failed"){g(!1),p(o.error);return}o.type==="runtime.status.changed"&&m(A=>A.map(b=>b.runtimeId===o.runtime.runtimeId?o.runtime:b))});return()=>{window.removeEventListener("cc:refresh",s),i(),x()}},[h,k]),G&&t.length===0?e.jsx("div",{className:"flex h-64 items-center justify-center text-muted-foreground",children:e.jsx(ce,{className:"animate-pulse",size:24})}):e.jsxs("div",{className:"animate-fade-in space-y-8",children:[e.jsx(fe,{title:"概览",description:"继续最近的工作,或进入项目、知识和自动化配置。当前版本 v0.1.64"}),e.jsxs("section",{className:"grid grid-cols-2 gap-3 lg:grid-cols-4",children:[e.jsx(v,{label:"Projects",value:t.length,detail:"configured workspaces",tone:"primary"}),e.jsx(v,{label:"Running",value:d.length,detail:"active agent tasks"}),e.jsx(v,{label:"Waiting",value:N.length+w.length,detail:"needs attention",tone:N.length+w.length>0?"warning":"neutral"}),e.jsx(v,{label:"Runtimes",value:R.length,detail:"installed locally"})]}),_?e.jsx("div",{role:"alert",className:"rounded-lg border border-amber-200 bg-amber-50 px-4 py-3 text-sm text-amber-700 dark:border-amber-400/20 dark:bg-amber-500/10 dark:text-amber-200",children:_}):null,e.jsxs("section",{className:"space-y-3",children:[e.jsx("div",{className:"flex items-end justify-between gap-4",children:e.jsxs("div",{children:[e.jsx("h2",{className:"text-lg font-semibold tracking-tight text-foreground",children:"快速开始"}),e.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"常用入口会保留在最前面。"})]})}),e.jsx("div",{className:"grid grid-cols-1 gap-3 lg:grid-cols-2",children:y.map(s=>e.jsx(Ce,{...s},s.to))})]}),h?e.jsxs(f,{className:"app-panel overflow-hidden p-0",children:[e.jsxs("div",{className:"flex flex-col gap-3 border-b border-black/[0.08] px-5 py-4 dark:border-white/[0.07] sm:flex-row sm:items-center sm:justify-between",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-base font-semibold text-foreground",children:"本机 Agent Runtime"}),e.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"显示本机 runtime 安装检测状态,不执行安装或登录检查。"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs(n,{variant:R.length>0?"success":"default",children:[R.length," installed"]}),X?e.jsx(n,{variant:"info",children:"checking"}):null,e.jsxs(xe,{variant:"outline",size:"sm",loading:J,onClick:Y,title:"刷新 runtime 检测",children:[e.jsx(ue,{size:15}),"刷新"]})]})]}),T?e.jsxs("div",{className:"px-5 py-4 text-sm text-amber-700 dark:text-amber-200",children:["检测失败:",T]}):c.length===0?e.jsx("div",{className:"p-5",children:e.jsx(j,{message:"还没有 runtime 检测结果",icon:$})}):e.jsx("div",{className:"grid grid-cols-1 gap-3 p-5 md:grid-cols-2 xl:grid-cols-3",children:c.map(s=>{var i,x;return e.jsxs("div",{className:"app-list-row",children:[e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[e.jsx("div",{className:["flex h-10 w-10 shrink-0 items-center justify-center rounded-xl",s.status==="installed"?"bg-emerald-500/10 text-emerald-600 dark:text-emerald-300":s.status==="error"?"bg-red-500/10 text-red-600 dark:text-red-200":"bg-amber-500/10 text-amber-700 dark:text-amber-200"].join(" "),children:e.jsx($,{size:19})}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:"truncate text-sm font-semibold text-foreground",children:s.displayName}),e.jsx("p",{className:"mt-0.5 truncate text-xs text-muted-foreground",children:s.agentType})]})]}),s.status==="installed"?e.jsx(Ae,{size:18,className:"mt-0.5 shrink-0 text-emerald-500"}):e.jsx(we,{size:18,className:"mt-0.5 shrink-0 text-amber-500"})]}),e.jsxs("div",{className:"mt-4 flex flex-wrap items-center gap-2",children:[e.jsx(n,{variant:s.status==="installed"?"success":s.status==="error"?"danger":"warning",children:s.status}),e.jsx(n,{variant:_e(s),children:De(s)}),e.jsx(n,{children:s.source}),s.version?e.jsxs(n,{variant:"secondary",children:["v",s.version]}):null]}),e.jsx("p",{className:"mt-3 text-sm leading-5 text-muted-foreground",children:s.summary}),s.lastLaunchError?e.jsx("p",{className:"mt-2 text-xs leading-5 text-red-600 dark:text-red-200",children:s.lastLaunchError.userMessage}):s.issues[0]?e.jsx("p",{className:"mt-2 text-xs leading-5 text-amber-700 dark:text-amber-200",children:s.issues[0].message}):null,(i=s.lastLaunchError)!=null&&i.suggestedAction?e.jsx("p",{className:"mt-2 text-xs leading-5 text-muted-foreground",children:s.lastLaunchError.suggestedAction}):null,s.binaryPath||s.command?e.jsx("p",{className:"mt-3 truncate rounded-lg bg-black/[0.045] px-2.5 py-2 font-mono text-xs text-muted-foreground dark:bg-white/[0.06]",children:s.binaryPath||s.command}):null,s.recommendedActions[0]&&!((x=s.lastLaunchError)!=null&&x.suggestedAction)?e.jsx("p",{className:"mt-3 text-xs leading-5 text-muted-foreground",children:s.recommendedActions[0].description}):null,e.jsxs("p",{className:"mt-3 text-xs text-muted-foreground",children:["Last checked ",new Date(s.lastCheckedAt||s.detectedAt).toLocaleString()]})]},s.agentType)})})]}):null,h?e.jsxs("section",{className:"grid grid-cols-1 gap-4 xl:grid-cols-3",children:[e.jsx(L,{title:"运行中任务",description:"正在排队或执行的 agent 工作。",tasks:d,empty:"暂无运行中的任务"}),e.jsx(L,{title:"等待处理",description:"需要用户输入或审批的任务。",tasks:N,empty:"暂无等待处理的任务",urgent:!0}),e.jsx(L,{title:"最近完成",description:"最近结束、失败或取消的任务。",tasks:V,empty:"暂无最近任务"})]}):null,h?e.jsxs("section",{className:"grid grid-cols-1 gap-4 xl:grid-cols-2",children:[e.jsx(Te,{approvals:w}),e.jsx(Pe,{events:O})]}):null,e.jsxs(f,{className:"app-panel p-0",children:[e.jsxs("div",{className:"flex items-center justify-between gap-4 border-b border-black/[0.08] px-5 py-4 dark:border-white/[0.07]",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-base font-semibold text-foreground",children:a("nav.projects")}),e.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"最近配置和会话概览。"})]}),e.jsx(E,{to:"/workspace",className:"text-sm font-medium text-primary transition-colors hover:text-primary/80",children:a("common.viewAll")})]}),t.length===0?e.jsx("div",{className:"p-5",children:e.jsx(j,{message:a("projects.noProjects"),icon:he})}):e.jsx("div",{className:"divide-y divide-black/[0.08] dark:divide-white/[0.07]",children:t.slice(0,6).map(s=>{var i;return e.jsxs(E,{to:`/workspace?project=${encodeURIComponent(s.name)}`,className:"group flex items-center justify-between gap-3 px-5 py-4 transition-colors duration-200 hover:bg-black/[0.04] dark:hover:bg-white/[0.06]",children:[e.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[e.jsx("div",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-xl bg-primary/10 text-primary",children:e.jsx(ze,{size:17})}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:"truncate text-sm font-medium text-foreground",children:s.name}),e.jsxs("p",{className:"mt-0.5 truncate text-xs text-muted-foreground",children:[s.agentType," · ",((i=s.platforms)==null?void 0:i.join(", "))||"no platform"," · ",s.sessionsCount," sessions"]})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[s.heartbeatEnabled?e.jsx(n,{variant:"success",children:"heartbeat"}):null,e.jsx(W,{size:16,className:"text-muted-foreground/45 transition-colors group-hover:text-foreground"})]})]},s.name)})})]})]})}export{Ke as default};
@@ -1,4 +1,4 @@
1
- import{c as s,j as e}from"./index-eoVERL5K.js";/**
1
+ import{c as s,j as e}from"./index-DV9qeL9P.js";/**
2
2
  * @license lucide-react v0.487.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{c as Jn,h as jn,j as fe,r as ei}from"./index-eoVERL5K.js";import{C as ti}from"./chevron-down-2LP9oGHG.js";import{c as ni,v as ii,M as ai,r as ri}from"./ThreadChat-BxXRpYa1.js";import"./channels-BPytmVCd.js";import"./shield-check-BCKkPPTJ.js";import"./Input-C8LZd4Bi.js";import"./Modal-CAj7soll.js";import"./index-llCPCiYk.js";import"./search-C-9J9J3f.js";import"./pencil-0P2INETc.js";import"./trash-2-CP4sn15n.js";import"./knowledge-QujAv-Zh.js";import"./threads-Bsrwwnpm.js";/**
1
+ import{c as Jn,h as jn,j as fe,r as ei}from"./index-DV9qeL9P.js";import{C as ti}from"./chevron-down-BHtOK5fW.js";import{c as ni,v as ii,M as ai,r as ri}from"./ThreadChat-D63t_k2d.js";import"./channels-Dkik3Wxt.js";import"./shield-check-C8NOMoui.js";import"./Input-BGK524F9.js";import"./Modal-DlIfXQ8_.js";import"./index-TTj4JT0d.js";import"./search-m-2mVuF6.js";import"./pencil-B7bBxE-w.js";import"./trash-2-Bh0nSQUA.js";import"./knowledge-C9mJpMmJ.js";import"./threads-BG4F9grx.js";/**
2
2
  * @license lucide-react v0.487.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1 +1 @@
1
- import{j as e,g as i}from"./index-eoVERL5K.js";function t({label:s,className:o,...r}){return e.jsxs("div",{className:"space-y-1.5",children:[s&&e.jsx("label",{className:"block text-sm font-medium text-foreground",children:s}),e.jsx("input",{className:i("flex h-9 w-full rounded-md border border-input bg-background px-3 py-1 text-sm shadow-sm transition-colors","file:border-0 file:bg-transparent file:text-sm file:font-medium","placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring","disabled:cursor-not-allowed disabled:opacity-50",o),...r})]})}function l({label:s,className:o,...r}){return e.jsxs("div",{className:"space-y-1.5",children:[s&&e.jsx("label",{className:"block text-sm font-medium text-foreground",children:s}),e.jsx("textarea",{className:i("flex min-h-20 w-full rounded-md border border-input bg-background px-3 py-2 text-sm shadow-sm transition-colors resize-none","placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring","disabled:cursor-not-allowed disabled:opacity-50",o),...r})]})}export{t as I,l as T};
1
+ import{j as e,g as i}from"./index-DV9qeL9P.js";function t({label:s,className:o,...r}){return e.jsxs("div",{className:"space-y-1.5",children:[s&&e.jsx("label",{className:"block text-sm font-medium text-foreground",children:s}),e.jsx("input",{className:i("flex h-9 w-full rounded-md border border-input bg-background px-3 py-1 text-sm shadow-sm transition-colors","file:border-0 file:bg-transparent file:text-sm file:font-medium","placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring","disabled:cursor-not-allowed disabled:opacity-50",o),...r})]})}function l({label:s,className:o,...r}){return e.jsxs("div",{className:"space-y-1.5",children:[s&&e.jsx("label",{className:"block text-sm font-medium text-foreground",children:s}),e.jsx("textarea",{className:i("flex min-h-20 w-full rounded-md border border-input bg-background px-3 py-2 text-sm shadow-sm transition-colors resize-none","placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring","disabled:cursor-not-allowed disabled:opacity-50",o),...r})]})}export{t as I,l as T};
@@ -1,4 +1,4 @@
1
- import{c as y,Y as q,r as t,j as e,L as C,B as p,S as H,g as P,Q as _}from"./index-eoVERL5K.js";import{C as x}from"./Card-F6UNFxnQ.js";import{I as U}from"./Input-C8LZd4Bi.js";import{E as F}from"./EmptyState-BwV_J0Og.js";import{g as E,h as O,a as Q,i as V,j as Z,k as G,s as Y}from"./knowledge-QujAv-Zh.js";import{A as J}from"./arrow-left-Cwm09dxx.js";import{S as W}from"./search-C-9J9J3f.js";import{T as X}from"./trash-2-CP4sn15n.js";/**
1
+ import{c as y,Y as q,r as t,j as e,L as C,B as p,S as H,g as P,Q as _}from"./index-DV9qeL9P.js";import{C as x}from"./Card-JMY-xmLX.js";import{I as U}from"./Input-BGK524F9.js";import{E as F}from"./EmptyState-3J94zJRa.js";import{g as E,h as O,a as Q,i as V,j as Z,k as G,s as Y}from"./knowledge-C9mJpMmJ.js";import{A as J}from"./arrow-left-C6VSgxEk.js";import{S as W}from"./search-m-2mVuF6.js";import{T as X}from"./trash-2-Bh0nSQUA.js";/**
2
2
  * @license lucide-react v0.487.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{c as T,r as t,j as e,L as D,B as d,S as se,g as I,C as ae,P as te,Q as re}from"./index-eoVERL5K.js";import{C as x}from"./Card-F6UNFxnQ.js";import{M as L}from"./Modal-CAj7soll.js";import{I as C,T as ne}from"./Input-C8LZd4Bi.js";import{E as P}from"./EmptyState-BwV_J0Og.js";import{g as ie,a as le,l as oe,c as de,b as ce,u as me,d as xe,e as ge,f as pe}from"./knowledge-QujAv-Zh.js";import{P as R}from"./pencil-0P2INETc.js";import{T as O}from"./trash-2-CP4sn15n.js";import{S as he}from"./search-C-9J9J3f.js";import{P as ue}from"./plus-tiGRgE2v.js";import{B as fe}from"./book-open-BwcGC_im.js";import"./index-llCPCiYk.js";/**
1
+ import{c as T,r as t,j as e,L as D,B as d,S as se,g as I,C as ae,P as te,Q as re}from"./index-DV9qeL9P.js";import{C as x}from"./Card-JMY-xmLX.js";import{M as L}from"./Modal-DlIfXQ8_.js";import{I as C,T as ne}from"./Input-BGK524F9.js";import{E as P}from"./EmptyState-3J94zJRa.js";import{g as ie,a as le,l as oe,c as de,b as ce,u as me,d as xe,e as ge,f as pe}from"./knowledge-C9mJpMmJ.js";import{P as R}from"./pencil-B7bBxE-w.js";import{T as O}from"./trash-2-Bh0nSQUA.js";import{S as he}from"./search-m-2mVuF6.js";import{P as ue}from"./plus-DPOTxoL2.js";import{B as fe}from"./book-open-DWJZSr5x.js";import"./index-TTj4JT0d.js";/**
2
2
  * @license lucide-react v0.487.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{c as N,u as b,r as t,N as L,j as e,L as S,B as m}from"./index-eoVERL5K.js";import{C}from"./Card-F6UNFxnQ.js";import{B as E}from"./Badge-COE1Zm2i.js";import{I as k}from"./Input-C8LZd4Bi.js";import{S as f}from"./Select-CVay_LUX.js";import{P as z}from"./Page-DlnMnu4F.js";import{A}from"./arrow-left-Cwm09dxx.js";import{S as I}from"./search-C-9J9J3f.js";import"./index-llCPCiYk.js";import"./chevron-down-2LP9oGHG.js";/**
1
+ import{c as N,u as b,r as t,N as L,j as e,L as S,B as m}from"./index-DV9qeL9P.js";import{C}from"./Card-JMY-xmLX.js";import{B as E}from"./Badge-BZwdECxe.js";import{I as k}from"./Input-BGK524F9.js";import{S as f}from"./Select-DDpZ4sBt.js";import{P as z}from"./Page-B1i9DSW-.js";import{A}from"./arrow-left-C6VSgxEk.js";import{S as I}from"./search-m-2mVuF6.js";import"./index-TTj4JT0d.js";import"./chevron-down-BHtOK5fW.js";/**
2
2
  * @license lucide-react v0.487.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{c as K,r as s,O as C,j as i,g as P}from"./index-eoVERL5K.js";import{u as I,d as X,e as O,g as Y,P as x,f as N,R as Z,h as J,c as Q,a as ee,i as te,F as ne,D as oe,j as re}from"./index-llCPCiYk.js";/**
1
+ import{c as K,r as s,O as C,j as i,g as P}from"./index-DV9qeL9P.js";import{u as I,d as X,e as O,g as Y,P as x,f as N,R as Z,h as J,c as Q,a as ee,i as te,F as ne,D as oe,j as re}from"./index-TTj4JT0d.js";/**
2
2
  * @license lucide-react v0.487.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1 +1 @@
1
- import{j as e,g as a}from"./index-eoVERL5K.js";import{C as n}from"./Card-F6UNFxnQ.js";function o({title:s,description:r,actions:t}){return e.jsxs("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("h1",{className:"text-2xl font-semibold tracking-tight text-foreground",children:s}),r?e.jsx("p",{className:"mt-1 max-w-3xl text-sm leading-6 text-muted-foreground",children:r}):null]}),t?e.jsx("div",{className:"flex shrink-0 flex-wrap gap-2",children:t}):null]})}function b({title:s,description:r,actions:t,children:l,className:d,bodyClassName:m}){return e.jsxs(n,{className:a("p-0",d),children:[(s||r||t)&&e.jsxs("div",{className:"flex flex-col gap-3 border-b px-5 py-4 sm:flex-row sm:items-start sm:justify-between",children:[e.jsxs("div",{className:"min-w-0",children:[s?e.jsx("h2",{className:"text-sm font-semibold text-foreground",children:s}):null,r?e.jsx("p",{className:"mt-1 text-sm leading-5 text-muted-foreground",children:r}):null]}),t?e.jsx("div",{className:"flex shrink-0 flex-wrap gap-2",children:t}):null]}),e.jsx("div",{className:a("p-5",m),children:l})]})}const x={neutral:"border-border bg-muted text-muted-foreground",success:"border-primary/20 bg-primary/10 text-primary",warning:"border-amber-200 bg-amber-50 text-amber-700 dark:border-amber-400/20 dark:bg-amber-500/10 dark:text-amber-200",danger:"border-destructive/20 bg-destructive/10 text-destructive dark:text-red-200",info:"border-blue-200 bg-blue-50 text-blue-700 dark:border-blue-400/20 dark:bg-blue-500/10 dark:text-blue-200"};function c({children:s,tone:r="neutral"}){return e.jsx("span",{className:a("inline-flex items-center rounded-full border px-2.5 py-1 text-xs font-medium",x[r]),children:s})}export{o as P,b as S,c as a};
1
+ import{j as e,g as a}from"./index-DV9qeL9P.js";import{C as n}from"./Card-JMY-xmLX.js";function o({title:s,description:r,actions:t}){return e.jsxs("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("h1",{className:"text-2xl font-semibold tracking-tight text-foreground",children:s}),r?e.jsx("p",{className:"mt-1 max-w-3xl text-sm leading-6 text-muted-foreground",children:r}):null]}),t?e.jsx("div",{className:"flex shrink-0 flex-wrap gap-2",children:t}):null]})}function b({title:s,description:r,actions:t,children:l,className:d,bodyClassName:m}){return e.jsxs(n,{className:a("p-0",d),children:[(s||r||t)&&e.jsxs("div",{className:"flex flex-col gap-3 border-b px-5 py-4 sm:flex-row sm:items-start sm:justify-between",children:[e.jsxs("div",{className:"min-w-0",children:[s?e.jsx("h2",{className:"text-sm font-semibold text-foreground",children:s}):null,r?e.jsx("p",{className:"mt-1 text-sm leading-5 text-muted-foreground",children:r}):null]}),t?e.jsx("div",{className:"flex shrink-0 flex-wrap gap-2",children:t}):null]}),e.jsx("div",{className:a("p-5",m),children:l})]})}const x={neutral:"border-border bg-muted text-muted-foreground",success:"border-primary/20 bg-primary/10 text-primary",warning:"border-amber-200 bg-amber-50 text-amber-700 dark:border-amber-400/20 dark:bg-amber-500/10 dark:text-amber-200",danger:"border-destructive/20 bg-destructive/10 text-destructive dark:text-red-200",info:"border-blue-200 bg-blue-50 text-blue-700 dark:border-blue-400/20 dark:bg-blue-500/10 dark:text-blue-200"};function c({children:s,tone:r="neutral"}){return e.jsx("span",{className:a("inline-flex items-center rounded-full border px-2.5 py-1 text-xs font-medium",x[r]),children:s})}export{o as P,b as S,c as a};
@@ -1,4 +1,4 @@
1
- import{c as jn,n as he,O as Y,j as S,r as p,g as vt}from"./index-eoVERL5K.js";import{c as ct,a as Je,r as lt,P as z,u as J,b as kt,d as yt,e as at,f as $,g as kn,h as Hn,i as Vn,R as Bn,F as Wn,D as Fn}from"./index-llCPCiYk.js";import{a as St,C as $n}from"./chevron-down-2LP9oGHG.js";/**
1
+ import{c as jn,n as he,O as Y,j as S,r as p,g as vt}from"./index-DV9qeL9P.js";import{c as ct,a as Je,r as lt,P as z,u as J,b as kt,d as yt,e as at,f as $,g as kn,h as Hn,i as Vn,R as Bn,F as Wn,D as Fn}from"./index-TTj4JT0d.js";import{a as St,C as $n}from"./chevron-down-BHtOK5fW.js";/**
2
2
  * @license lucide-react v0.487.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.