@useorgx/openclaw-plugin 0.7.17 → 0.7.18

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 (95) hide show
  1. package/dashboard/dist/assets/{D8mvKY2h.js → 467jKHFJ.js} +1 -1
  2. package/dashboard/dist/assets/467jKHFJ.js.br +0 -0
  3. package/dashboard/dist/assets/467jKHFJ.js.gz +0 -0
  4. package/dashboard/dist/assets/{CWXk6UZl.js → 5Ihga-4X.js} +1 -1
  5. package/dashboard/dist/assets/5Ihga-4X.js.br +0 -0
  6. package/dashboard/dist/assets/5Ihga-4X.js.gz +0 -0
  7. package/dashboard/dist/assets/{CoDun8X6.js → B71dt9yu.js} +1 -1
  8. package/dashboard/dist/assets/B71dt9yu.js.br +0 -0
  9. package/dashboard/dist/assets/B71dt9yu.js.gz +0 -0
  10. package/dashboard/dist/assets/{DBct8HLW.js → BEnI6kNR.js} +1 -1
  11. package/dashboard/dist/assets/BEnI6kNR.js.br +0 -0
  12. package/dashboard/dist/assets/BEnI6kNR.js.gz +0 -0
  13. package/dashboard/dist/assets/{DvFumX8R.js → BcJmNILk.js} +1 -1
  14. package/dashboard/dist/assets/BcJmNILk.js.br +0 -0
  15. package/dashboard/dist/assets/BcJmNILk.js.gz +0 -0
  16. package/dashboard/dist/assets/{B8NuBCcY.js → C-XuWXGi.js} +1 -1
  17. package/dashboard/dist/assets/C-XuWXGi.js.br +0 -0
  18. package/dashboard/dist/assets/C-XuWXGi.js.gz +0 -0
  19. package/dashboard/dist/assets/{BDlKSbsp.js → C3_j_W9V.js} +1 -1
  20. package/dashboard/dist/assets/C3_j_W9V.js.br +0 -0
  21. package/dashboard/dist/assets/C3_j_W9V.js.gz +0 -0
  22. package/dashboard/dist/assets/{05zHA1Am.js → C9-UYhBb.js} +1 -1
  23. package/dashboard/dist/assets/C9-UYhBb.js.br +0 -0
  24. package/dashboard/dist/assets/C9-UYhBb.js.gz +0 -0
  25. package/dashboard/dist/assets/{8nr6IqT4.js → C9yV06GS.js} +1 -1
  26. package/dashboard/dist/assets/C9yV06GS.js.br +0 -0
  27. package/dashboard/dist/assets/C9yV06GS.js.gz +0 -0
  28. package/dashboard/dist/assets/{CMir7ekf.js → CReugbyT.js} +1 -1
  29. package/dashboard/dist/assets/CReugbyT.js.br +0 -0
  30. package/dashboard/dist/assets/CReugbyT.js.gz +0 -0
  31. package/dashboard/dist/assets/{0uYJrBLl.js → CSDhTbKy.js} +1 -1
  32. package/dashboard/dist/assets/CSDhTbKy.js.br +0 -0
  33. package/dashboard/dist/assets/CSDhTbKy.js.gz +0 -0
  34. package/dashboard/dist/assets/{CyUpNSKv.js → CfMS9yIf.js} +1 -1
  35. package/dashboard/dist/assets/CfMS9yIf.js.br +0 -0
  36. package/dashboard/dist/assets/CfMS9yIf.js.gz +0 -0
  37. package/dashboard/dist/assets/D2Kqcmv9.js +212 -0
  38. package/dashboard/dist/assets/D2Kqcmv9.js.br +0 -0
  39. package/dashboard/dist/assets/D2Kqcmv9.js.gz +0 -0
  40. package/dashboard/dist/assets/{DLNTxNX-.js → DS79hzMu.js} +1 -1
  41. package/dashboard/dist/assets/DS79hzMu.js.br +0 -0
  42. package/dashboard/dist/assets/DS79hzMu.js.gz +0 -0
  43. package/dashboard/dist/assets/{DBRLnKWw.js → PVi0vr9a.js} +1 -1
  44. package/dashboard/dist/assets/PVi0vr9a.js.br +0 -0
  45. package/dashboard/dist/assets/PVi0vr9a.js.gz +0 -0
  46. package/dashboard/dist/assets/{B7kFLPiD.js → a6qcPiWt.js} +1 -1
  47. package/dashboard/dist/assets/a6qcPiWt.js.br +0 -0
  48. package/dashboard/dist/assets/a6qcPiWt.js.gz +0 -0
  49. package/dashboard/dist/assets/{DdYkuATV.js → qDJ6rqcs.js} +1 -1
  50. package/dashboard/dist/assets/qDJ6rqcs.js.br +0 -0
  51. package/dashboard/dist/assets/qDJ6rqcs.js.gz +0 -0
  52. package/dashboard/dist/assets/{Crj3jKHE.js → sdoPH_Z1.js} +1 -1
  53. package/dashboard/dist/assets/sdoPH_Z1.js.br +0 -0
  54. package/dashboard/dist/assets/sdoPH_Z1.js.gz +0 -0
  55. package/dashboard/dist/index.html +1 -1
  56. package/dashboard/dist/index.html.br +0 -0
  57. package/dashboard/dist/index.html.gz +0 -0
  58. package/package.json +1 -1
  59. package/dashboard/dist/assets/05zHA1Am.js.br +0 -0
  60. package/dashboard/dist/assets/05zHA1Am.js.gz +0 -0
  61. package/dashboard/dist/assets/0uYJrBLl.js.br +0 -0
  62. package/dashboard/dist/assets/0uYJrBLl.js.gz +0 -0
  63. package/dashboard/dist/assets/8nr6IqT4.js.br +0 -0
  64. package/dashboard/dist/assets/8nr6IqT4.js.gz +0 -0
  65. package/dashboard/dist/assets/B7kFLPiD.js.br +0 -0
  66. package/dashboard/dist/assets/B7kFLPiD.js.gz +0 -0
  67. package/dashboard/dist/assets/B8NuBCcY.js.br +0 -0
  68. package/dashboard/dist/assets/B8NuBCcY.js.gz +0 -0
  69. package/dashboard/dist/assets/BDlKSbsp.js.br +0 -0
  70. package/dashboard/dist/assets/BDlKSbsp.js.gz +0 -0
  71. package/dashboard/dist/assets/C8AYbjlq.js +0 -212
  72. package/dashboard/dist/assets/C8AYbjlq.js.br +0 -0
  73. package/dashboard/dist/assets/C8AYbjlq.js.gz +0 -0
  74. package/dashboard/dist/assets/CMir7ekf.js.br +0 -0
  75. package/dashboard/dist/assets/CMir7ekf.js.gz +0 -0
  76. package/dashboard/dist/assets/CWXk6UZl.js.br +0 -0
  77. package/dashboard/dist/assets/CWXk6UZl.js.gz +0 -0
  78. package/dashboard/dist/assets/CoDun8X6.js.br +0 -0
  79. package/dashboard/dist/assets/CoDun8X6.js.gz +0 -0
  80. package/dashboard/dist/assets/Crj3jKHE.js.br +0 -0
  81. package/dashboard/dist/assets/Crj3jKHE.js.gz +0 -0
  82. package/dashboard/dist/assets/CyUpNSKv.js.br +0 -0
  83. package/dashboard/dist/assets/CyUpNSKv.js.gz +0 -0
  84. package/dashboard/dist/assets/D8mvKY2h.js.br +0 -0
  85. package/dashboard/dist/assets/D8mvKY2h.js.gz +0 -0
  86. package/dashboard/dist/assets/DBRLnKWw.js.br +0 -0
  87. package/dashboard/dist/assets/DBRLnKWw.js.gz +0 -0
  88. package/dashboard/dist/assets/DBct8HLW.js.br +0 -0
  89. package/dashboard/dist/assets/DBct8HLW.js.gz +0 -0
  90. package/dashboard/dist/assets/DLNTxNX-.js.br +0 -0
  91. package/dashboard/dist/assets/DLNTxNX-.js.gz +0 -0
  92. package/dashboard/dist/assets/DdYkuATV.js.br +0 -0
  93. package/dashboard/dist/assets/DdYkuATV.js.gz +0 -0
  94. package/dashboard/dist/assets/DvFumX8R.js.br +0 -0
  95. package/dashboard/dist/assets/DvFumX8R.js.gz +0 -0
@@ -1,2 +1,2 @@
1
- import{r as p,j as e}from"./Dj2k1r16.js";import{y as D,E as W,e as m,v as Q}from"./C8AYbjlq.js";import"./DMKyYAtD.js";import"./eeHXe_OQ.js";import"./cX2e-TLi.js";import"./BjK42gtU.js";import"./BV0BcV1u.js";const q={blocked:0,failed:1,running:2,active:2,queued:3,in_progress:3,pending:4,paused:5,cancelled:6,completed:7,archived:8};function Y(n){if(!n)return 0;const x=Date.parse(n);return Number.isFinite(x)?x:0}function F(n){return Y(n.updatedAt??n.lastEventAt??n.startedAt)}function G(n,x){const i=q[(n.status??"").toLowerCase()]??99,y=q[(x.status??"").toLowerCase()]??99;return i!==y?i-y:F(x)-F(n)}function H(n,x){const i=n.trim().toLowerCase();return i==="failed"?m.red:i==="blocked"||x>0?m.red:i==="running"||i==="active"||i==="in_progress"?m.lime:i==="queued"||i==="pending"?m.amber:i==="completed"?m.teal:m.textMuted}function J(n){switch(n){case"active":return{title:"Active Sessions",subtitle:"Running and queued work across agents."};case"blocked":return{title:"Blocked Sessions",subtitle:"Work that needs attention before it can proceed."};case"failed":return{title:"Failed Sessions",subtitle:"Runs that exited with an error and may need a retry."};default:return{title:"Sessions",subtitle:"All sessions visible to this dashboard."}}}function K(n,x){var j;const i=(x.status??"").toLowerCase(),y=((j=x.blockers)==null?void 0:j.length)??0;return n==="active"?["running","active","queued","pending","in_progress"].includes(i):n==="blocked"?i==="blocked"||y>0:n==="failed"?i==="failed":!0}function le({open:n,onClose:x,mode:i,sessions:y,onOpenSession:j,onRunAction:A,onRefetch:L,onSetNotice:v}){const{title:I,subtitle:P}=J(i),[S,_]=p.useState(""),[w,B]=p.useState(new Set),[d,k]=p.useState(null),[M,h]=p.useState(null),[N,C]=p.useState(null);p.useEffect(()=>{n&&(h(null),C(null))},[n]);const f=p.useMemo(()=>y.filter(t=>K(i,t)),[i,y]),g=p.useMemo(()=>{const t={};for(const o of f){const a=(o.status??"unknown").toLowerCase();t[a]=(t[a]??0)+1}const r=f.filter(o=>{var a;return(o.status??"").toLowerCase()==="blocked"||(((a=o.blockers)==null?void 0:a.length)??0)>0}).length,s=f.filter(o=>(o.status??"").toLowerCase()==="failed").length,l=f.filter(o=>["running","active","queued","pending","in_progress"].includes((o.status??"").toLowerCase())).length;return{total:f.length,active:l,blocked:r,failed:s,byStatus:t}},[f]),u=p.useMemo(()=>{const t=S.trim().toLowerCase(),r=[...f].sort(G);return t?r.filter(s=>[s.title,s.agentName,s.agentId,s.runId,s.lastEventSummary].filter(Boolean).join(" ").toLowerCase().includes(t)):r},[S,f]);p.useEffect(()=>{n&&B(t=>{const r=new Set(u.map(l=>l.id)),s=new Set;for(const l of t)r.has(l)&&s.add(l);return s})},[u,n]);const b=w.size,T=u.length>0&&u.every(t=>w.has(t.id)),R=()=>{d||B(t=>u.length===0?t:T?new Set:new Set(u.map(r=>r.id)))},U=t=>{d||B(r=>{const s=new Set(r);return s.has(t)?s.delete(t):s.add(t),s})},O=async()=>{if(b===0||d)return;const t=[];for(const s of u){if(!w.has(s.id))continue;const l=s.blockers??[];if(l.length!==0){t.push(`- ${s.title} (${l.length} blocker${l.length===1?"":"s"})`);for(const o of l)t.push(` - ${o}`)}}const r=t.length>0?t.join(`
1
+ import{r as p,j as e}from"./Dj2k1r16.js";import{y as D,E as W,e as m,v as Q}from"./D2Kqcmv9.js";import"./DMKyYAtD.js";import"./eeHXe_OQ.js";import"./cX2e-TLi.js";import"./BjK42gtU.js";import"./BV0BcV1u.js";const q={blocked:0,failed:1,running:2,active:2,queued:3,in_progress:3,pending:4,paused:5,cancelled:6,completed:7,archived:8};function Y(n){if(!n)return 0;const x=Date.parse(n);return Number.isFinite(x)?x:0}function F(n){return Y(n.updatedAt??n.lastEventAt??n.startedAt)}function G(n,x){const i=q[(n.status??"").toLowerCase()]??99,y=q[(x.status??"").toLowerCase()]??99;return i!==y?i-y:F(x)-F(n)}function H(n,x){const i=n.trim().toLowerCase();return i==="failed"?m.red:i==="blocked"||x>0?m.red:i==="running"||i==="active"||i==="in_progress"?m.lime:i==="queued"||i==="pending"?m.amber:i==="completed"?m.teal:m.textMuted}function J(n){switch(n){case"active":return{title:"Active Sessions",subtitle:"Running and queued work across agents."};case"blocked":return{title:"Blocked Sessions",subtitle:"Work that needs attention before it can proceed."};case"failed":return{title:"Failed Sessions",subtitle:"Runs that exited with an error and may need a retry."};default:return{title:"Sessions",subtitle:"All sessions visible to this dashboard."}}}function K(n,x){var j;const i=(x.status??"").toLowerCase(),y=((j=x.blockers)==null?void 0:j.length)??0;return n==="active"?["running","active","queued","pending","in_progress"].includes(i):n==="blocked"?i==="blocked"||y>0:n==="failed"?i==="failed":!0}function le({open:n,onClose:x,mode:i,sessions:y,onOpenSession:j,onRunAction:A,onRefetch:L,onSetNotice:v}){const{title:I,subtitle:P}=J(i),[S,_]=p.useState(""),[w,B]=p.useState(new Set),[d,k]=p.useState(null),[M,h]=p.useState(null),[N,C]=p.useState(null);p.useEffect(()=>{n&&(h(null),C(null))},[n]);const f=p.useMemo(()=>y.filter(t=>K(i,t)),[i,y]),g=p.useMemo(()=>{const t={};for(const o of f){const a=(o.status??"unknown").toLowerCase();t[a]=(t[a]??0)+1}const r=f.filter(o=>{var a;return(o.status??"").toLowerCase()==="blocked"||(((a=o.blockers)==null?void 0:a.length)??0)>0}).length,s=f.filter(o=>(o.status??"").toLowerCase()==="failed").length,l=f.filter(o=>["running","active","queued","pending","in_progress"].includes((o.status??"").toLowerCase())).length;return{total:f.length,active:l,blocked:r,failed:s,byStatus:t}},[f]),u=p.useMemo(()=>{const t=S.trim().toLowerCase(),r=[...f].sort(G);return t?r.filter(s=>[s.title,s.agentName,s.agentId,s.runId,s.lastEventSummary].filter(Boolean).join(" ").toLowerCase().includes(t)):r},[S,f]);p.useEffect(()=>{n&&B(t=>{const r=new Set(u.map(l=>l.id)),s=new Set;for(const l of t)r.has(l)&&s.add(l);return s})},[u,n]);const b=w.size,T=u.length>0&&u.every(t=>w.has(t.id)),R=()=>{d||B(t=>u.length===0?t:T?new Set:new Set(u.map(r=>r.id)))},U=t=>{d||B(r=>{const s=new Set(r);return s.has(t)?s.delete(t):s.add(t),s})},O=async()=>{if(b===0||d)return;const t=[];for(const s of u){if(!w.has(s.id))continue;const l=s.blockers??[];if(l.length!==0){t.push(`- ${s.title} (${l.length} blocker${l.length===1?"":"s"})`);for(const o of l)t.push(` - ${o}`)}}const r=t.length>0?t.join(`
2
2
  `):"No blockers found for selected sessions.";try{await navigator.clipboard.writeText(r),h("Copied blockers to clipboard.")}catch{h("Copy failed (clipboard unavailable).")}},$=async t=>{if(b===0||d)return;if(t==="cancel"){C({text:""});return}const r=u.filter(a=>w.has(a.id));h(null),k({action:t,processed:0,total:r.length});let s=0;const l=[];for(const a of r)try{await A(a,t)}catch(c){s+=1;const E=c instanceof Error?c.message:"unknown error";l.push(`${a.title||a.runId}: ${E}`)}finally{k(c=>c&&{...c,processed:Math.min(c.total,c.processed+1)})}const o=r.length-s;if(k(null),s>0){const a=l.length>0?` — ${l[0]}${l.length>1?` (+${l.length-1} more)`:""}`:"";h(`${t} finished: ${o} ok, ${s} failed.${a}`)}else h(`${t} finished: ${o} session${o===1?"":"s"}.`);try{await L()}catch{}t==="resume"?v(`Bulk resume requested: ${o} ok${s?`, ${s} failed`:""}.`):t==="pause"?v(`Bulk pause requested: ${o} ok${s?`, ${s} failed`:""}.`):t==="complete"&&v(`Bulk mark completed requested: ${o} ok${s?`, ${s} failed`:""}.`)},z=async()=>{if(!N||d||N.text.trim().toUpperCase()!=="CANCEL")return;const t=u.filter(a=>w.has(a.id));h(null),k({action:"cancel",processed:0,total:t.length}),C(null);let r=0;const s=[];for(const a of t)try{await A(a,"cancel")}catch(c){r+=1;const E=c instanceof Error?c.message:"unknown error";s.push(`${a.title||a.runId}: ${E}`)}finally{k(c=>c&&{...c,processed:Math.min(c.total,c.processed+1)})}const l=t.length-r;k(null);const o=s.length>0?` — ${s[0]}${s.length>1?` (+${s.length-1} more)`:""}`:"";h(`cancel finished: ${l} ok${r?`, ${r} failed`:""}.${o}`),v(`Bulk cancel requested: ${l} ok${r?`, ${r} failed`:""}.`);try{await L()}catch{}};return e.jsx(D,{open:n,onClose:x,maxWidth:"max-w-4xl",children:e.jsxs("div",{className:"flex h-full w-full flex-col",children:[e.jsxs("div",{className:"border-b border-subtle px-5 pt-5 pb-4",children:[e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsxs("h3",{className:"inline-flex items-center gap-2 text-heading font-semibold text-white",children:[e.jsx(W,{type:"session",size:14}),e.jsx("span",{className:"truncate",children:I}),e.jsx("span",{className:"rounded-full border border-strong bg-white/[0.04] px-2 py-0.5 text-caption font-semibold text-primary",children:g.total})]}),e.jsx("p",{className:"mt-1 text-body leading-relaxed text-secondary",children:P}),e.jsxs("div",{className:"mt-3 flex flex-wrap items-center gap-1.5",children:[e.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full border border-white/[0.1] bg-white/[0.03] px-2 py-0.5 text-micro text-secondary",children:[e.jsx("span",{className:"h-1.5 w-1.5 rounded-full",style:{backgroundColor:m.teal}}),"Total ",e.jsx("span",{className:"font-semibold text-white",children:g.total})]}),e.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full border border-white/[0.1] bg-white/[0.03] px-2 py-0.5 text-micro text-secondary",children:[e.jsx("span",{className:"h-1.5 w-1.5 rounded-full",style:{backgroundColor:g.active>0?m.lime:m.textMuted}}),"Active ",e.jsx("span",{className:"font-semibold text-white",children:g.active})]}),e.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full border border-white/[0.1] bg-white/[0.03] px-2 py-0.5 text-micro text-secondary",children:[e.jsx("span",{className:"h-1.5 w-1.5 rounded-full",style:{backgroundColor:g.blocked>0?m.red:m.textMuted}}),"Blocked ",e.jsx("span",{className:"font-semibold text-white",children:g.blocked})]}),e.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full border border-white/[0.1] bg-white/[0.03] px-2 py-0.5 text-micro text-secondary",children:[e.jsx("span",{className:"h-1.5 w-1.5 rounded-full",style:{backgroundColor:g.failed>0?m.red:m.textMuted}}),"Failed ",e.jsx("span",{className:"font-semibold text-white",children:g.failed})]})]})]}),e.jsx("button",{type:"button",onClick:x,className:"rounded-md border border-strong bg-white/[0.03] px-2.5 py-1.5 text-caption text-primary transition-colors hover:bg-white/[0.08]","aria-label":"Close bulk modal",children:"Close"})]}),e.jsxs("div",{className:"mt-4 flex flex-col gap-2 sm:flex-row sm:items-center",children:[e.jsxs("div",{className:"flex-1",children:[e.jsx("label",{className:"sr-only",htmlFor:"bulk-sessions-search",children:"Search sessions"}),e.jsx("input",{id:"bulk-sessions-search",value:S,onChange:t=>_(t.target.value),placeholder:"Search title, agent, run id…","data-modal-autofocus":"true",className:"w-full rounded-lg border border-strong bg-black/25 px-3 py-2 text-body text-white placeholder:text-muted focus:outline-none focus:ring-1 focus:ring-[#BFFF00]/35"})]}),e.jsx("button",{type:"button",onClick:R,disabled:u.length===0||!!d,className:"rounded-lg border border-strong bg-white/[0.03] px-3 py-2 text-caption text-primary transition-colors hover:bg-white/[0.08] disabled:opacity-45",children:T?"Clear all":`Select all (${u.length})`})]}),M&&e.jsx("div",{className:"mt-3 rounded-xl border border-white/[0.08] bg-white/[0.02] px-3 py-2 text-body text-secondary",children:M}),N&&e.jsxs("div",{className:"mt-3 rounded-xl border border-red-400/25 bg-red-500/[0.06] px-3 py-2.5",children:[e.jsxs("p",{className:"text-body font-semibold text-red-200",children:["Cancel ",b," session",b===1?"":"s","?"]}),e.jsxs("p",{className:"mt-1 text-caption text-red-200/70",children:["This is destructive. Type ",e.jsx("span",{className:"font-semibold",children:"CANCEL"})," to confirm."]}),e.jsxs("div",{className:"mt-2 flex flex-col gap-2 sm:flex-row sm:items-center",children:[e.jsx("input",{value:N.text,onChange:t=>C({text:t.target.value}),placeholder:"CANCEL",className:"flex-1 rounded-lg border border-red-300/25 bg-black/30 px-3 py-2 text-body text-white placeholder:text-muted focus:outline-none focus:ring-1 focus:ring-red-300/40"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("button",{type:"button",onClick:()=>C(null),className:"rounded-lg border border-strong bg-white/[0.03] px-3 py-2 text-caption text-primary transition-colors hover:bg-white/[0.08]",children:"Back"}),e.jsx("button",{type:"button",onClick:z,disabled:N.text.trim().toUpperCase()!=="CANCEL",className:"rounded-lg border border-red-300/25 bg-red-500/15 px-3 py-2 text-caption font-semibold text-red-200 transition-colors hover:bg-red-500/20 disabled:opacity-45",children:"Confirm cancel"})]})]})]})]}),e.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto px-5 py-4",children:u.length===0?e.jsx("div",{className:"rounded-xl border border-subtle bg-white/[0.02] p-4 text-body text-secondary",children:"No sessions match this view."}):e.jsx("div",{className:"space-y-2",children:u.map(t=>{const r=w.has(t.id),s=t.blockers??[],l=H(t.status??"",s.length),o=t.updatedAt??t.lastEventAt??t.startedAt,a=[(t.agentName??t.agentId??"").trim()||"Unknown agent",(t.status??"unknown").toLowerCase(),o?Q(o):null].filter(Boolean);return e.jsx("div",{className:"rounded-xl border border-white/[0.08] bg-white/[0.02] px-3 py-2.5 transition-colors hover:bg-white/[0.04]",style:{borderColor:r?`${m.lime}40`:"rgba(255,255,255,0.08)"},children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("input",{type:"checkbox",checked:r,onChange:()=>U(t.id),disabled:!!d,className:"mt-0.5 h-4 w-4 rounded border-white/20 bg-black/40 text-lime focus:ring-lime/40","aria-label":`Select session ${t.title}`}),e.jsx("button",{type:"button",onClick:()=>j(t),disabled:!!d,className:"min-w-0 flex-1 text-left",title:"Open session inspector",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-body font-medium text-white",children:t.title}),e.jsx("p",{className:"mt-0.5 text-caption text-secondary",children:a.join(" · ")}),t.lastEventSummary&&e.jsx("p",{className:"mt-1 line-clamp-2 text-caption text-secondary",children:t.lastEventSummary}),s.length>0&&e.jsxs("p",{className:"mt-1 text-micro text-red-200/80",children:[s.length," blocker",s.length===1?"":"s"," · ",s[0]]})]}),e.jsx("span",{className:"shrink-0 rounded-full border px-2 py-0.5 text-micro font-semibold uppercase tracking-[0.08em]",style:{borderColor:`${l}30`,backgroundColor:`${l}14`,color:l},children:(t.status??"unknown").toUpperCase()})]})})]})},t.id)})})}),e.jsxs("div",{className:"flex flex-col gap-2 border-t border-subtle px-5 py-3 sm:flex-row sm:items-center sm:justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2 text-caption text-secondary",children:[d?e.jsxs("span",{children:[d.action," ",d.processed,"/",d.total]}):e.jsx("span",{children:b>0?`${b} selected`:"No selection"}),i==="blocked"&&e.jsx("button",{type:"button",onClick:O,disabled:b===0||!!d,className:"rounded-md border border-strong bg-white/[0.03] px-2.5 py-1.5 text-caption text-secondary transition-colors hover:bg-white/[0.08] disabled:opacity-45",children:"Copy blockers"})]}),e.jsxs("div",{className:"flex flex-wrap items-center justify-end gap-2",children:[e.jsx("button",{type:"button",onClick:()=>{const t=u.find(r=>w.has(r.id))??null;t&&j(t)},disabled:b!==1||!!d,className:"rounded-md border border-strong bg-white/[0.03] px-3 py-1.5 text-caption text-primary transition-colors hover:bg-white/[0.08] disabled:opacity-45",children:"Open inspector"}),e.jsx("button",{type:"button",onClick:()=>void $("resume"),disabled:b===0||!!d,className:"rounded-md border border-lime/25 bg-lime/10 px-3 py-1.5 text-caption font-semibold text-lime transition-colors hover:bg-lime/20 disabled:opacity-45",children:"Resume selected"}),e.jsx("button",{type:"button",onClick:()=>void $("complete"),disabled:b===0||!!d,className:"rounded-md border border-teal/25 bg-teal/10 px-3 py-1.5 text-caption font-semibold text-teal transition-colors hover:bg-teal/20 disabled:opacity-45",children:"Mark completed"}),e.jsx("button",{type:"button",onClick:()=>void $("pause"),disabled:b===0||!!d,className:"rounded-md border border-strong bg-white/[0.03] px-3 py-1.5 text-caption text-primary transition-colors hover:bg-white/[0.08] disabled:opacity-45",children:"Pause selected"}),e.jsx("button",{type:"button",onClick:()=>void $("cancel"),disabled:b===0||!!d,className:"rounded-md border border-red-300/25 bg-red-500/10 px-3 py-1.5 text-caption font-semibold text-red-200 transition-colors hover:bg-red-500/15 disabled:opacity-45",children:"Cancel selected"})]})]})]})})}export{le as BulkSessionsModal};
@@ -1 +1 @@
1
- import{r as o,j as t}from"./Dj2k1r16.js";import{i as L,b as C,T as A,a8 as T}from"./C8AYbjlq.js";function R(c){const i=Date.parse(c);if(!Number.isFinite(i))return null;const s=Date.now()-i,r=s<0,a=Math.abs(s),l=Math.round(a/6e4);if(l<1)return r?"soon":"just now";if(l<60)return r?`in ${l}m`:`${l}m ago`;const u=Math.round(a/36e5);if(u<48)return r?`in ${u}h`:`${u}h ago`;const p=Math.round(a/864e5);return p<30?r?`in ${p}d`:`${p}d ago`:new Date(i).toLocaleDateString()}async function M(c,i){const s=await fetch(c,i);if(!s.ok){const r=await s.json().catch(()=>null),a=typeof(r==null?void 0:r.error)=="string"&&r.error||typeof(r==null?void 0:r.message)=="string"&&r.message||`Request failed (${s.status})`;throw new Error(a)}return await s.json()}function J(c){const{entityType:i,entityId:s,authToken:r,embedMode:a,className:l,variant:u="default"}=c,[p,b]=o.useState(!0),[j,v]=o.useState(!1),[N,x]=o.useState(null),[E,S]=o.useState([]),[h,g]=o.useState(""),m=L(),y=o.useMemo(()=>{const e=encodeURIComponent(i),n=encodeURIComponent(s);return`/orgx/api/entities/${e}/${n}/comments`},[i,s]),f=o.useCallback(async()=>{if(m){S([]),x(null),b(!1);return}b(!0),x(null);try{const e=await M(y,{method:"GET",headers:C({authToken:r,embedMode:a})});S(Array.isArray(e.comments)?e.comments:[])}catch(e){x(e instanceof Error?e.message:String(e))}finally{b(!1)}},[r,m,a,y]);o.useEffect(()=>{f()},[f]);const w=o.useCallback(async()=>{if(m){g("");return}const e=h.trim();if(e){v(!0),x(null);try{await M(y,{method:"POST",headers:C({authToken:r,embedMode:a,contentTypeJson:!0}),body:JSON.stringify({body:e,commentType:"note",severity:"info",tags:[]})}),g(""),await f()}catch(n){x(n instanceof Error?n.message:String(n))}finally{v(!1)}}},[r,h,m,a,y,f]),_=o.useCallback(e=>{e.key==="Enter"&&(!e.metaKey&&!e.ctrlKey||(e.preventDefault(),w()))},[w]),d=u==="inline";return t.jsxs("div",{className:l,children:[t.jsxs("div",{className:d?"space-y-1":"space-y-2",children:[t.jsx("textarea",{value:h,onChange:e=>g(e.target.value),onKeyDown:_,placeholder:"Leave a note for humans or agents...",className:d?"min-h-[60px] w-full resize-y border-b border-white/[0.06] bg-transparent px-0 py-2 text-body text-bright outline-none placeholder:text-faint focus:border-white/15 transition-colors":"min-h-[96px] w-full resize-y rounded-xl border border-white/[0.10] bg-white/[0.03] px-4 py-3 text-body text-bright outline-none placeholder:text-faint focus:border-white/20 focus:bg-white/[0.05] transition-colors"}),t.jsxs("div",{className:`flex flex-wrap items-center justify-between gap-3 ${d?"opacity-70":""}`,children:[t.jsx("p",{className:"text-caption text-muted",children:"Cmd/Ctrl+Enter to post. Visible to agents and collaborators."}),t.jsx("button",{type:"button",onClick:w,disabled:j||h.trim().length===0,className:d?"text-caption font-semibold text-primary hover:text-white transition-colors disabled:opacity-50":"inline-flex items-center justify-center rounded-full border border-strong bg-white/[0.05] px-3.5 py-1.5 text-caption font-semibold tracking-wide text-primary transition-colors hover:bg-white/[0.09] disabled:opacity-50 disabled:hover:bg-white/[0.05]",children:j?"Saving…":"Post note"})]})]}),N?t.jsx("div",{className:`mt-2 text-caption text-red-200 ${d?"":"rounded-xl border border-red-500/20 bg-red-500/10 px-3.5 py-2"}`,children:N}):null,p?t.jsx("div",{className:"mt-2 text-body text-muted",children:"Loading notes…"}):E.length===0?t.jsx(A,{icon:"inbox",headline:"No notes yet",description:m?"Notes are unavailable in demo mode.":"Add a note to keep context for your team and agents.",className:"py-6"}):t.jsx("div",{className:`mt-2 space-y-2 ${d?"divide-y divide-white/[0.06]":"space-y-3"}`,children:E.map(e=>{const n=e.created_at?R(e.created_at):null,k=e.author_name??(e.author_type==="agent"?e.author_id:"Unknown");if(d)return t.jsxs("div",{className:"pt-2 first:pt-0",children:[t.jsxs("div",{className:"flex items-center gap-2 text-micro text-muted",children:[t.jsx("span",{className:"font-medium text-secondary",children:k}),n?t.jsx("span",{title:T(e.created_at),children:n}):null]}),t.jsx("p",{className:"mt-0.5 whitespace-pre-wrap text-body leading-relaxed text-primary",children:e.body})]},e.id);const D=e.comment_type??"note",$=typeof e.severity=="string"?e.severity:"info";return t.jsxs("div",{className:"rounded-2xl border border-white/[0.10] bg-white/[0.02] px-4 py-3",children:[t.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[t.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[t.jsx("span",{className:"text-body font-semibold text-bright",children:k}),t.jsx("span",{className:"rounded-full border border-strong bg-white/[0.06] px-2 py-0.5 text-micro uppercase tracking-[0.08em] text-secondary",children:e.author_type}),t.jsx("span",{className:"rounded-full border border-strong px-2 py-0.5 text-micro uppercase tracking-[0.08em] text-secondary",children:D}),$!=="info"?t.jsx("span",{className:"rounded-full border border-strong px-2 py-0.5 text-micro uppercase tracking-[0.08em] text-secondary",children:$}):null]}),n?t.jsx("span",{className:"text-caption text-muted",title:T(e.created_at),children:n}):null]}),t.jsx("p",{className:"mt-2 whitespace-pre-wrap text-body leading-relaxed text-primary",children:e.body})]},e.id)})})]})}export{J as E};
1
+ import{r as o,j as t}from"./Dj2k1r16.js";import{i as L,b as C,T as A,a8 as T}from"./D2Kqcmv9.js";function R(c){const i=Date.parse(c);if(!Number.isFinite(i))return null;const s=Date.now()-i,r=s<0,a=Math.abs(s),l=Math.round(a/6e4);if(l<1)return r?"soon":"just now";if(l<60)return r?`in ${l}m`:`${l}m ago`;const u=Math.round(a/36e5);if(u<48)return r?`in ${u}h`:`${u}h ago`;const p=Math.round(a/864e5);return p<30?r?`in ${p}d`:`${p}d ago`:new Date(i).toLocaleDateString()}async function M(c,i){const s=await fetch(c,i);if(!s.ok){const r=await s.json().catch(()=>null),a=typeof(r==null?void 0:r.error)=="string"&&r.error||typeof(r==null?void 0:r.message)=="string"&&r.message||`Request failed (${s.status})`;throw new Error(a)}return await s.json()}function J(c){const{entityType:i,entityId:s,authToken:r,embedMode:a,className:l,variant:u="default"}=c,[p,b]=o.useState(!0),[j,v]=o.useState(!1),[N,x]=o.useState(null),[E,S]=o.useState([]),[h,g]=o.useState(""),m=L(),y=o.useMemo(()=>{const e=encodeURIComponent(i),n=encodeURIComponent(s);return`/orgx/api/entities/${e}/${n}/comments`},[i,s]),f=o.useCallback(async()=>{if(m){S([]),x(null),b(!1);return}b(!0),x(null);try{const e=await M(y,{method:"GET",headers:C({authToken:r,embedMode:a})});S(Array.isArray(e.comments)?e.comments:[])}catch(e){x(e instanceof Error?e.message:String(e))}finally{b(!1)}},[r,m,a,y]);o.useEffect(()=>{f()},[f]);const w=o.useCallback(async()=>{if(m){g("");return}const e=h.trim();if(e){v(!0),x(null);try{await M(y,{method:"POST",headers:C({authToken:r,embedMode:a,contentTypeJson:!0}),body:JSON.stringify({body:e,commentType:"note",severity:"info",tags:[]})}),g(""),await f()}catch(n){x(n instanceof Error?n.message:String(n))}finally{v(!1)}}},[r,h,m,a,y,f]),_=o.useCallback(e=>{e.key==="Enter"&&(!e.metaKey&&!e.ctrlKey||(e.preventDefault(),w()))},[w]),d=u==="inline";return t.jsxs("div",{className:l,children:[t.jsxs("div",{className:d?"space-y-1":"space-y-2",children:[t.jsx("textarea",{value:h,onChange:e=>g(e.target.value),onKeyDown:_,placeholder:"Leave a note for humans or agents...",className:d?"min-h-[60px] w-full resize-y border-b border-white/[0.06] bg-transparent px-0 py-2 text-body text-bright outline-none placeholder:text-faint focus:border-white/15 transition-colors":"min-h-[96px] w-full resize-y rounded-xl border border-white/[0.10] bg-white/[0.03] px-4 py-3 text-body text-bright outline-none placeholder:text-faint focus:border-white/20 focus:bg-white/[0.05] transition-colors"}),t.jsxs("div",{className:`flex flex-wrap items-center justify-between gap-3 ${d?"opacity-70":""}`,children:[t.jsx("p",{className:"text-caption text-muted",children:"Cmd/Ctrl+Enter to post. Visible to agents and collaborators."}),t.jsx("button",{type:"button",onClick:w,disabled:j||h.trim().length===0,className:d?"text-caption font-semibold text-primary hover:text-white transition-colors disabled:opacity-50":"inline-flex items-center justify-center rounded-full border border-strong bg-white/[0.05] px-3.5 py-1.5 text-caption font-semibold tracking-wide text-primary transition-colors hover:bg-white/[0.09] disabled:opacity-50 disabled:hover:bg-white/[0.05]",children:j?"Saving…":"Post note"})]})]}),N?t.jsx("div",{className:`mt-2 text-caption text-red-200 ${d?"":"rounded-xl border border-red-500/20 bg-red-500/10 px-3.5 py-2"}`,children:N}):null,p?t.jsx("div",{className:"mt-2 text-body text-muted",children:"Loading notes…"}):E.length===0?t.jsx(A,{icon:"inbox",headline:"No notes yet",description:m?"Notes are unavailable in demo mode.":"Add a note to keep context for your team and agents.",className:"py-6"}):t.jsx("div",{className:`mt-2 space-y-2 ${d?"divide-y divide-white/[0.06]":"space-y-3"}`,children:E.map(e=>{const n=e.created_at?R(e.created_at):null,k=e.author_name??(e.author_type==="agent"?e.author_id:"Unknown");if(d)return t.jsxs("div",{className:"pt-2 first:pt-0",children:[t.jsxs("div",{className:"flex items-center gap-2 text-micro text-muted",children:[t.jsx("span",{className:"font-medium text-secondary",children:k}),n?t.jsx("span",{title:T(e.created_at),children:n}):null]}),t.jsx("p",{className:"mt-0.5 whitespace-pre-wrap text-body leading-relaxed text-primary",children:e.body})]},e.id);const D=e.comment_type??"note",$=typeof e.severity=="string"?e.severity:"info";return t.jsxs("div",{className:"rounded-2xl border border-white/[0.10] bg-white/[0.02] px-4 py-3",children:[t.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[t.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[t.jsx("span",{className:"text-body font-semibold text-bright",children:k}),t.jsx("span",{className:"rounded-full border border-strong bg-white/[0.06] px-2 py-0.5 text-micro uppercase tracking-[0.08em] text-secondary",children:e.author_type}),t.jsx("span",{className:"rounded-full border border-strong px-2 py-0.5 text-micro uppercase tracking-[0.08em] text-secondary",children:D}),$!=="info"?t.jsx("span",{className:"rounded-full border border-strong px-2 py-0.5 text-micro uppercase tracking-[0.08em] text-secondary",children:$}):null]}),n?t.jsx("span",{className:"text-caption text-muted",title:T(e.created_at),children:n}):null]}),t.jsx("p",{className:"mt-2 whitespace-pre-wrap text-body leading-relaxed text-primary",children:e.body})]},e.id)})})]})}export{J as E};
@@ -1 +1 @@
1
- import{e as t}from"./C8AYbjlq.js";const e={QUEUED:"queued",RUNNING:"running",BLOCKED:"blocked",IDLE:"idle",COMPLETED:"completed"};function n(r){switch(r){case e.RUNNING:return"border-teal-300/35 bg-teal-400/[0.12] text-teal-100";case e.BLOCKED:return"border-amber-300/35 bg-amber-400/[0.12] text-amber-100";case e.IDLE:return"border-strong bg-white/[0.05] text-secondary";default:return"border-[#BFFF00]/30 bg-[#BFFF00]/12 text-[#E1FFB2]"}}function c(r){switch(r){case e.RUNNING:return"Running";case e.BLOCKED:return"Needs input";case e.IDLE:return"Idle";case e.COMPLETED:return"Completed";case e.QUEUED:return"Queued";default:return r.replace(/_/g," ")}}function o(r){switch(r){case e.QUEUED:case e.IDLE:return 0;case e.BLOCKED:return 1;case e.RUNNING:return 2;case e.COMPLETED:return 3;default:return 4}}function i(r){switch(r){case e.RUNNING:return"from-teal-300/0 via-teal-300/60 to-teal-300/0";case e.BLOCKED:return"from-amber-300/0 via-amber-300/55 to-amber-300/0";case e.IDLE:return"from-white/0 via-white/35 to-white/0";default:return"from-[#BFFF00]/0 via-[#BFFF00]/70 to-[#BFFF00]/0"}}function s(r){switch(r){case e.RUNNING:return"Current";case e.BLOCKED:return"Blocked on";default:return"Next"}}function E(r){switch(r){case e.RUNNING:return t.lime;case e.BLOCKED:return t.red;case e.IDLE:return t.iris;case e.QUEUED:return t.teal;default:return t.amber}}function d(r){switch(r){case e.RUNNING:return{background:`linear-gradient(to right, ${t.lime}, ${t.teal})`};case e.BLOCKED:return{background:`linear-gradient(to right, ${t.red}, ${t.amber})`};case e.IDLE:return{background:`linear-gradient(to right, ${t.iris}99, transparent)`};default:return{background:`linear-gradient(to right, ${t.lime}B3, ${t.teal}66)`}}}function l(r,a){if(a)return"Scope Under Review";switch(r){case e.COMPLETED:return"Completed Scope";case e.RUNNING:return"Current Work";case e.BLOCKED:return"Blocked Work";default:return"Next Work"}}function N(r){return r.some(a=>a.queueState===e.RUNNING)?e.RUNNING:r.some(a=>a.queueState===e.BLOCKED)?e.BLOCKED:r.some(a=>a.queueState===e.QUEUED)?e.QUEUED:r.some(a=>a.queueState===e.IDLE)?e.IDLE:e.COMPLETED}export{e as Q,c as a,n as b,i as c,N as d,s as e,d as f,E as g,o as q,l as w};
1
+ import{e as t}from"./D2Kqcmv9.js";const e={QUEUED:"queued",RUNNING:"running",BLOCKED:"blocked",IDLE:"idle",COMPLETED:"completed"};function n(r){switch(r){case e.RUNNING:return"border-teal-300/35 bg-teal-400/[0.12] text-teal-100";case e.BLOCKED:return"border-amber-300/35 bg-amber-400/[0.12] text-amber-100";case e.IDLE:return"border-strong bg-white/[0.05] text-secondary";default:return"border-[#BFFF00]/30 bg-[#BFFF00]/12 text-[#E1FFB2]"}}function c(r){switch(r){case e.RUNNING:return"Running";case e.BLOCKED:return"Needs input";case e.IDLE:return"Idle";case e.COMPLETED:return"Completed";case e.QUEUED:return"Queued";default:return r.replace(/_/g," ")}}function o(r){switch(r){case e.QUEUED:case e.IDLE:return 0;case e.BLOCKED:return 1;case e.RUNNING:return 2;case e.COMPLETED:return 3;default:return 4}}function i(r){switch(r){case e.RUNNING:return"from-teal-300/0 via-teal-300/60 to-teal-300/0";case e.BLOCKED:return"from-amber-300/0 via-amber-300/55 to-amber-300/0";case e.IDLE:return"from-white/0 via-white/35 to-white/0";default:return"from-[#BFFF00]/0 via-[#BFFF00]/70 to-[#BFFF00]/0"}}function s(r){switch(r){case e.RUNNING:return"Current";case e.BLOCKED:return"Blocked on";default:return"Next"}}function E(r){switch(r){case e.RUNNING:return t.lime;case e.BLOCKED:return t.red;case e.IDLE:return t.iris;case e.QUEUED:return t.teal;default:return t.amber}}function d(r){switch(r){case e.RUNNING:return{background:`linear-gradient(to right, ${t.lime}, ${t.teal})`};case e.BLOCKED:return{background:`linear-gradient(to right, ${t.red}, ${t.amber})`};case e.IDLE:return{background:`linear-gradient(to right, ${t.iris}99, transparent)`};default:return{background:`linear-gradient(to right, ${t.lime}B3, ${t.teal}66)`}}}function l(r,a){if(a)return"Scope Under Review";switch(r){case e.COMPLETED:return"Completed Scope";case e.RUNNING:return"Current Work";case e.BLOCKED:return"Blocked Work";default:return"Next Work"}}function N(r){return r.some(a=>a.queueState===e.RUNNING)?e.RUNNING:r.some(a=>a.queueState===e.BLOCKED)?e.BLOCKED:r.some(a=>a.queueState===e.QUEUED)?e.QUEUED:r.some(a=>a.queueState===e.IDLE)?e.IDLE:e.COMPLETED}export{e as Q,c as a,n as b,i as c,N as d,s as e,d as f,E as g,o as q,l as w};
@@ -1 +1 @@
1
- import{r as x,j as e}from"./Dj2k1r16.js";import{c as R}from"./DMKyYAtD.js";import{l as T,q as V,y as W,S as u,e as o,M as $,b as E}from"./C8AYbjlq.js";import{S as b}from"./DvFumX8R.js";import"./eeHXe_OQ.js";import"./cX2e-TLi.js";import"./BjK42gtU.js";import"./BV0BcV1u.js";const f={draft:o.textMuted,in_review:o.amber,approved:o.lime,changes_requested:o.red,superseded:o.textMuted,archived:o.textMuted},U={draft:"Draft",in_review:"In Review",approved:"Approved",changes_requested:"Changes Requested",superseded:"Superseded",archived:"Archived"};function D(){return e.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:o.cyan,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"}),e.jsx("path",{d:"M14 2v4a2 2 0 0 0 2 2h4"}),e.jsx("path",{d:"M10 9H8"}),e.jsx("path",{d:"M16 13H8"}),e.jsx("path",{d:"M16 17H8"})]})}function J(){var M,_,C,L,I,q;const{state:l,close:m}=T(),g=null,j=!1,[c,p]=x.useState(null),{data:a,isLoading:F,isFetching:v,error:y,refetch:H}=R({queryKey:V.artifactDetail({artifactId:l.artifactId??"",authToken:g,embedMode:j}),enabled:!!l.artifactId,queryFn:async()=>{const i=E({authToken:g,embedMode:j}),s=await fetch(`/orgx/api/artifacts/${encodeURIComponent(l.artifactId)}`,{headers:i});if(!s.ok){const r=await s.json().catch(()=>null),d=(typeof(r==null?void 0:r.error)=="string"?r.error:null)??(r!=null&&r.error&&typeof r.error=="object"&&typeof r.error.message=="string"?r.error.message:null)??(typeof(r==null?void 0:r.message)=="string"?r.message:null),B=s.status===401?"Authentication required to view this artifact.":`Failed to fetch artifact (${s.status}).`;throw new Error(d!=null&&d.trim().length?d.trim():B)}return s.json()}}),t=a==null?void 0:a.artifact,S=(a==null?void 0:a.localFallback)===!0||((M=t==null?void 0:t.metadata)==null?void 0:M.local_fallback)===!0,w=(typeof(a==null?void 0:a.warning)=="string"&&a.warning.trim().length>0?a.warning:(_=t==null?void 0:t.metadata)==null?void 0:_.local_warning)??null,h=((C=t==null?void 0:t.metadata)==null?void 0:C.preview_markdown)??null,n=x.useMemo(()=>{if(!(t!=null&&t.metadata))return null;const i=[t.metadata.local_source_path,t.metadata.url,t.metadata.path,t.metadata.file_path,t.metadata.filepath,t.metadata.artifact_path,t.metadata.output_path];for(const s of i)if(typeof s=="string"&&s.trim().length>0)return s.trim();return null},[t==null?void 0:t.metadata]),k=x.useMemo(()=>n?/^https?:\/\//i.test(n)?n:`/orgx/api/live/filesystem/open?path=${encodeURIComponent(n)}`:null,[n]),N=((L=t==null?void 0:t.metadata)==null?void 0:L.external_url)??(t==null?void 0:t.artifact_url);x.useEffect(()=>{if(!c)return;const i=window.setTimeout(()=>p(null),2e3);return()=>window.clearTimeout(i)},[c]);const A=async(i,s)=>{try{await navigator.clipboard.writeText(i),p(`${s} copied`)}catch{p("Copy failed")}};return e.jsxs(W,{open:!!l.artifactId,onClose:m,maxWidth:"max-w-3xl",children:[F&&e.jsxs("div",{className:"p-6 space-y-4",children:[e.jsx(b,{className:"h-6 w-2/3"}),e.jsx(b,{className:"h-4 w-1/3"}),e.jsx(b,{className:"h-32 w-full"})]}),y&&e.jsxs("div",{className:"space-y-4 p-6",children:[e.jsxs("div",{className:"rounded-xl border border-red-300/22 bg-red-500/[0.08] p-4",children:[e.jsx("p",{className:"text-body font-semibold text-red-200",children:"Failed to load artifact"}),e.jsx("p",{className:"mt-1 text-caption leading-relaxed text-red-100/80",children:y.message})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx("button",{type:"button",onClick:m,className:"rounded-full border border-strong bg-white/[0.03] px-3 py-1.5 text-caption font-semibold text-primary transition-colors hover:bg-white/[0.08]",children:"Back to activity"}),e.jsx("button",{type:"button",onClick:()=>void H(),disabled:v,className:"rounded-full border border-red-300/22 bg-red-500/[0.08] px-3 py-1.5 text-caption font-semibold text-red-100 transition-colors hover:bg-red-500/[0.14] disabled:opacity-45",children:v?"Retrying…":"Retry"})]})]}),t&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex items-center justify-between border-b border-subtle px-5 py-4 sm:px-6",children:[e.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[e.jsx(D,{}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("h3",{className:"truncate text-sm font-medium text-white",children:t.name}),e.jsxs("div",{className:"flex items-center gap-2 mt-0.5",children:[e.jsx(u,{tone:"muted",className:"text-micro uppercase tracking-[0.06em]",children:((I=t.catalog)==null?void 0:I.label)??t.artifact_type}),e.jsx(u,{tone:"neutral",className:"text-micro font-semibold uppercase tracking-[0.06em]",style:{color:f[t.status]??o.textMuted,backgroundColor:`${f[t.status]??o.textMuted}20`,borderColor:`${f[t.status]??o.textMuted}44`},children:U[t.status]??t.status}),((q=t.catalog)==null?void 0:q.domain)&&e.jsxs("span",{className:"text-micro text-faint",children:[t.catalog.domain," / ",t.catalog.stage]}),c&&e.jsx(u,{tone:"neutral",className:"text-micro text-secondary",children:c})]})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[N&&e.jsx("a",{href:N,target:"_blank",rel:"noopener noreferrer",className:"rounded-lg p-2 text-secondary transition-colors hover:bg-white/[0.08] hover:text-white",title:"Open source",children:e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("path",{d:"M15 3h6v6"}),e.jsx("path",{d:"M10 14 21 3"}),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("button",{onClick:m,className:"p-2 rounded-lg hover:bg-white/[0.06] text-secondary hover:text-white transition-colors",children:e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("path",{d:"M18 6 6 18"}),e.jsx("path",{d:"m6 6 12 12"})]})})]})]}),e.jsxs("div",{className:"max-h-[65vh] overflow-y-auto px-5 py-4 sm:px-6 space-y-4",children:[S&&e.jsxs("div",{className:"rounded-xl border border-amber-300/25 bg-amber-500/[0.09] p-4",children:[e.jsx("p",{className:"text-caption font-semibold uppercase tracking-[0.08em] text-amber-100/90",children:"Local fallback artifact"}),e.jsx("p",{className:"mt-1 text-body text-amber-50/90",children:"This artifact is buffered locally because OrgX registration is currently unavailable."}),w&&e.jsxs("p",{className:"mt-1.5 text-caption text-amber-100/70",children:["Upstream error: ",w]}),e.jsxs("div",{className:"mt-3 flex flex-wrap gap-2",children:[k&&e.jsx("a",{href:k,target:"_blank",rel:"noopener noreferrer",className:"rounded-full border border-amber-200/25 bg-black/25 px-3 py-1 text-caption font-semibold text-amber-100 transition-colors hover:bg-black/35",children:"Open local artifact"}),n&&e.jsx("button",{type:"button",onClick:()=>void A(n,"Artifact path"),className:"rounded-full border border-amber-200/25 bg-black/20 px-3 py-1 text-caption font-semibold text-amber-100 transition-colors hover:bg-black/35",children:"Copy path"})]})]}),t.description&&e.jsx("div",{children:e.jsx("p",{className:"text-body leading-relaxed text-primary",children:t.description})}),h&&e.jsx("div",{className:"rounded-xl border border-white/[0.06] bg-white/[0.02] p-4",children:e.jsx($,{mode:"block",text:h,className:"text-body leading-relaxed text-primary"})}),!t.description&&!h&&e.jsxs("div",{className:"py-12 text-center text-muted",children:[e.jsxs("svg",{className:"mx-auto mb-3 opacity-50",width:"32",height:"32",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[e.jsx("path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"}),e.jsx("path",{d:"M14 2v4a2 2 0 0 0 2 2h4"})]}),e.jsx("p",{className:"text-sm",children:"No preview available"})]}),e.jsxs("div",{className:"flex flex-wrap gap-x-6 gap-y-1.5 text-micro text-faint",children:[e.jsxs("span",{children:["Entity: ",t.entity_type,"/",t.entity_id.slice(0,8)]}),e.jsxs("span",{children:["Version: ",t.version]}),e.jsxs("span",{children:["Updated:"," ",new Date(t.updated_at).toLocaleDateString(void 0,{month:"short",day:"numeric",year:"numeric"})]})]})]})]})]})}export{J as ArtifactViewerModal};
1
+ import{r as x,j as e}from"./Dj2k1r16.js";import{c as R}from"./DMKyYAtD.js";import{l as T,q as V,y as W,S as u,e as o,M as $,b as E}from"./D2Kqcmv9.js";import{S as b}from"./BcJmNILk.js";import"./eeHXe_OQ.js";import"./cX2e-TLi.js";import"./BjK42gtU.js";import"./BV0BcV1u.js";const f={draft:o.textMuted,in_review:o.amber,approved:o.lime,changes_requested:o.red,superseded:o.textMuted,archived:o.textMuted},U={draft:"Draft",in_review:"In Review",approved:"Approved",changes_requested:"Changes Requested",superseded:"Superseded",archived:"Archived"};function D(){return e.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:o.cyan,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"}),e.jsx("path",{d:"M14 2v4a2 2 0 0 0 2 2h4"}),e.jsx("path",{d:"M10 9H8"}),e.jsx("path",{d:"M16 13H8"}),e.jsx("path",{d:"M16 17H8"})]})}function J(){var M,_,C,L,I,q;const{state:l,close:m}=T(),g=null,j=!1,[c,p]=x.useState(null),{data:a,isLoading:F,isFetching:v,error:y,refetch:H}=R({queryKey:V.artifactDetail({artifactId:l.artifactId??"",authToken:g,embedMode:j}),enabled:!!l.artifactId,queryFn:async()=>{const i=E({authToken:g,embedMode:j}),s=await fetch(`/orgx/api/artifacts/${encodeURIComponent(l.artifactId)}`,{headers:i});if(!s.ok){const r=await s.json().catch(()=>null),d=(typeof(r==null?void 0:r.error)=="string"?r.error:null)??(r!=null&&r.error&&typeof r.error=="object"&&typeof r.error.message=="string"?r.error.message:null)??(typeof(r==null?void 0:r.message)=="string"?r.message:null),B=s.status===401?"Authentication required to view this artifact.":`Failed to fetch artifact (${s.status}).`;throw new Error(d!=null&&d.trim().length?d.trim():B)}return s.json()}}),t=a==null?void 0:a.artifact,S=(a==null?void 0:a.localFallback)===!0||((M=t==null?void 0:t.metadata)==null?void 0:M.local_fallback)===!0,w=(typeof(a==null?void 0:a.warning)=="string"&&a.warning.trim().length>0?a.warning:(_=t==null?void 0:t.metadata)==null?void 0:_.local_warning)??null,h=((C=t==null?void 0:t.metadata)==null?void 0:C.preview_markdown)??null,n=x.useMemo(()=>{if(!(t!=null&&t.metadata))return null;const i=[t.metadata.local_source_path,t.metadata.url,t.metadata.path,t.metadata.file_path,t.metadata.filepath,t.metadata.artifact_path,t.metadata.output_path];for(const s of i)if(typeof s=="string"&&s.trim().length>0)return s.trim();return null},[t==null?void 0:t.metadata]),k=x.useMemo(()=>n?/^https?:\/\//i.test(n)?n:`/orgx/api/live/filesystem/open?path=${encodeURIComponent(n)}`:null,[n]),N=((L=t==null?void 0:t.metadata)==null?void 0:L.external_url)??(t==null?void 0:t.artifact_url);x.useEffect(()=>{if(!c)return;const i=window.setTimeout(()=>p(null),2e3);return()=>window.clearTimeout(i)},[c]);const A=async(i,s)=>{try{await navigator.clipboard.writeText(i),p(`${s} copied`)}catch{p("Copy failed")}};return e.jsxs(W,{open:!!l.artifactId,onClose:m,maxWidth:"max-w-3xl",children:[F&&e.jsxs("div",{className:"p-6 space-y-4",children:[e.jsx(b,{className:"h-6 w-2/3"}),e.jsx(b,{className:"h-4 w-1/3"}),e.jsx(b,{className:"h-32 w-full"})]}),y&&e.jsxs("div",{className:"space-y-4 p-6",children:[e.jsxs("div",{className:"rounded-xl border border-red-300/22 bg-red-500/[0.08] p-4",children:[e.jsx("p",{className:"text-body font-semibold text-red-200",children:"Failed to load artifact"}),e.jsx("p",{className:"mt-1 text-caption leading-relaxed text-red-100/80",children:y.message})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx("button",{type:"button",onClick:m,className:"rounded-full border border-strong bg-white/[0.03] px-3 py-1.5 text-caption font-semibold text-primary transition-colors hover:bg-white/[0.08]",children:"Back to activity"}),e.jsx("button",{type:"button",onClick:()=>void H(),disabled:v,className:"rounded-full border border-red-300/22 bg-red-500/[0.08] px-3 py-1.5 text-caption font-semibold text-red-100 transition-colors hover:bg-red-500/[0.14] disabled:opacity-45",children:v?"Retrying…":"Retry"})]})]}),t&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex items-center justify-between border-b border-subtle px-5 py-4 sm:px-6",children:[e.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[e.jsx(D,{}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("h3",{className:"truncate text-sm font-medium text-white",children:t.name}),e.jsxs("div",{className:"flex items-center gap-2 mt-0.5",children:[e.jsx(u,{tone:"muted",className:"text-micro uppercase tracking-[0.06em]",children:((I=t.catalog)==null?void 0:I.label)??t.artifact_type}),e.jsx(u,{tone:"neutral",className:"text-micro font-semibold uppercase tracking-[0.06em]",style:{color:f[t.status]??o.textMuted,backgroundColor:`${f[t.status]??o.textMuted}20`,borderColor:`${f[t.status]??o.textMuted}44`},children:U[t.status]??t.status}),((q=t.catalog)==null?void 0:q.domain)&&e.jsxs("span",{className:"text-micro text-faint",children:[t.catalog.domain," / ",t.catalog.stage]}),c&&e.jsx(u,{tone:"neutral",className:"text-micro text-secondary",children:c})]})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[N&&e.jsx("a",{href:N,target:"_blank",rel:"noopener noreferrer",className:"rounded-lg p-2 text-secondary transition-colors hover:bg-white/[0.08] hover:text-white",title:"Open source",children:e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("path",{d:"M15 3h6v6"}),e.jsx("path",{d:"M10 14 21 3"}),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("button",{onClick:m,className:"p-2 rounded-lg hover:bg-white/[0.06] text-secondary hover:text-white transition-colors",children:e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("path",{d:"M18 6 6 18"}),e.jsx("path",{d:"m6 6 12 12"})]})})]})]}),e.jsxs("div",{className:"max-h-[65vh] overflow-y-auto px-5 py-4 sm:px-6 space-y-4",children:[S&&e.jsxs("div",{className:"rounded-xl border border-amber-300/25 bg-amber-500/[0.09] p-4",children:[e.jsx("p",{className:"text-caption font-semibold uppercase tracking-[0.08em] text-amber-100/90",children:"Local fallback artifact"}),e.jsx("p",{className:"mt-1 text-body text-amber-50/90",children:"This artifact is buffered locally because OrgX registration is currently unavailable."}),w&&e.jsxs("p",{className:"mt-1.5 text-caption text-amber-100/70",children:["Upstream error: ",w]}),e.jsxs("div",{className:"mt-3 flex flex-wrap gap-2",children:[k&&e.jsx("a",{href:k,target:"_blank",rel:"noopener noreferrer",className:"rounded-full border border-amber-200/25 bg-black/25 px-3 py-1 text-caption font-semibold text-amber-100 transition-colors hover:bg-black/35",children:"Open local artifact"}),n&&e.jsx("button",{type:"button",onClick:()=>void A(n,"Artifact path"),className:"rounded-full border border-amber-200/25 bg-black/20 px-3 py-1 text-caption font-semibold text-amber-100 transition-colors hover:bg-black/35",children:"Copy path"})]})]}),t.description&&e.jsx("div",{children:e.jsx("p",{className:"text-body leading-relaxed text-primary",children:t.description})}),h&&e.jsx("div",{className:"rounded-xl border border-white/[0.06] bg-white/[0.02] p-4",children:e.jsx($,{mode:"block",text:h,className:"text-body leading-relaxed text-primary"})}),!t.description&&!h&&e.jsxs("div",{className:"py-12 text-center text-muted",children:[e.jsxs("svg",{className:"mx-auto mb-3 opacity-50",width:"32",height:"32",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[e.jsx("path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"}),e.jsx("path",{d:"M14 2v4a2 2 0 0 0 2 2h4"})]}),e.jsx("p",{className:"text-sm",children:"No preview available"})]}),e.jsxs("div",{className:"flex flex-wrap gap-x-6 gap-y-1.5 text-micro text-faint",children:[e.jsxs("span",{children:["Entity: ",t.entity_type,"/",t.entity_id.slice(0,8)]}),e.jsxs("span",{children:["Version: ",t.version]}),e.jsxs("span",{children:["Updated:"," ",new Date(t.updated_at).toLocaleDateString(void 0,{month:"short",day:"numeric",year:"numeric"})]})]})]})]})]})}export{J as ArtifactViewerModal};
@@ -1,2 +1,2 @@
1
- import{r as d,j as e}from"./Dj2k1r16.js";import{y as C,E as k,e as m,v as S}from"./C8AYbjlq.js";import"./DMKyYAtD.js";import"./eeHXe_OQ.js";import"./cX2e-TLi.js";import"./BjK42gtU.js";import"./BV0BcV1u.js";function $(i){const o=i.trim().toLowerCase();return o==="fulfilled"||o==="completed"?m.lime:o==="claimed"?m.teal:o==="blocked"?m.red:m.amber}function z({open:i,onClose:o,handoffs:x}){const[p,g]=d.useState(""),[c,h]=d.useState(new Set),[y,n]=d.useState(null);d.useEffect(()=>{i&&n(null)},[i]);const b=d.useMemo(()=>[...x].sort((t,s)=>Date.parse(s.updatedAt??"")-Date.parse(t.updatedAt??"")),[x]),r=d.useMemo(()=>{const t=p.trim().toLowerCase();return t?b.filter(s=>[s.title,s.summary,s.status,s.priority].filter(Boolean).join(" ").toLowerCase().includes(t)):b},[b,p]);d.useEffect(()=>{i&&h(t=>{const s=new Set(r.map(a=>a.id)),l=new Set;for(const a of t)s.has(a)&&l.add(a);return l})},[r,i]);const u=c.size,f=r.length>0&&r.every(t=>c.has(t.id)),w=()=>{h(t=>r.length===0?t:f?new Set:new Set(r.map(s=>s.id)))},j=t=>{h(s=>{const l=new Set(s);return l.has(t)?l.delete(t):l.add(t),l})},N=async()=>{const t=r.filter(a=>u===0||c.has(a.id)),s=[];s.push(`# Handoffs (${t.length})`),s.push("");for(const a of t)s.push(`- **${a.title}** — ${a.status}${a.priority?` (priority: ${a.priority})`:""}`),a.summary&&s.push(` - ${a.summary}`),s.push(` - Updated: ${a.updatedAt}`);const l=s.join(`
1
+ import{r as d,j as e}from"./Dj2k1r16.js";import{y as C,E as k,e as m,v as S}from"./D2Kqcmv9.js";import"./DMKyYAtD.js";import"./eeHXe_OQ.js";import"./cX2e-TLi.js";import"./BjK42gtU.js";import"./BV0BcV1u.js";function $(i){const o=i.trim().toLowerCase();return o==="fulfilled"||o==="completed"?m.lime:o==="claimed"?m.teal:o==="blocked"?m.red:m.amber}function z({open:i,onClose:o,handoffs:x}){const[p,g]=d.useState(""),[c,h]=d.useState(new Set),[y,n]=d.useState(null);d.useEffect(()=>{i&&n(null)},[i]);const b=d.useMemo(()=>[...x].sort((t,s)=>Date.parse(s.updatedAt??"")-Date.parse(t.updatedAt??"")),[x]),r=d.useMemo(()=>{const t=p.trim().toLowerCase();return t?b.filter(s=>[s.title,s.summary,s.status,s.priority].filter(Boolean).join(" ").toLowerCase().includes(t)):b},[b,p]);d.useEffect(()=>{i&&h(t=>{const s=new Set(r.map(a=>a.id)),l=new Set;for(const a of t)s.has(a)&&l.add(a);return l})},[r,i]);const u=c.size,f=r.length>0&&r.every(t=>c.has(t.id)),w=()=>{h(t=>r.length===0?t:f?new Set:new Set(r.map(s=>s.id)))},j=t=>{h(s=>{const l=new Set(s);return l.has(t)?l.delete(t):l.add(t),l})},N=async()=>{const t=r.filter(a=>u===0||c.has(a.id)),s=[];s.push(`# Handoffs (${t.length})`),s.push("");for(const a of t)s.push(`- **${a.title}** — ${a.status}${a.priority?` (priority: ${a.priority})`:""}`),a.summary&&s.push(` - ${a.summary}`),s.push(` - Updated: ${a.updatedAt}`);const l=s.join(`
2
2
  `);try{await navigator.clipboard.writeText(l),n("Copied markdown."),setTimeout(()=>n(null),1200)}catch{n("Copy failed (clipboard unavailable).")}},v=async()=>{const t=r.filter(s=>u===0||c.has(s.id));try{await navigator.clipboard.writeText(JSON.stringify(t,null,2)),n("Copied JSON."),setTimeout(()=>n(null),1200)}catch{n("Copy failed (clipboard unavailable).")}};return e.jsx(C,{open:i,onClose:o,maxWidth:"max-w-3xl",children:e.jsxs("div",{className:"flex h-full w-full flex-col",children:[e.jsxs("div",{className:"border-b border-subtle px-5 pt-5 pb-4",children:[e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsxs("h3",{className:"inline-flex items-center gap-2 text-heading font-semibold text-white",children:[e.jsx(k,{type:"handoff",size:14}),e.jsx("span",{className:"truncate",children:"Handoffs"}),e.jsx("span",{className:"rounded-full border border-strong bg-white/[0.04] px-2 py-0.5 text-caption font-semibold text-primary",children:x.length})]}),e.jsx("p",{className:"mt-1 text-body leading-relaxed text-secondary",children:"Review and export current handoffs. Select items for a tighter export."})]}),e.jsx("button",{type:"button",onClick:o,className:"rounded-md border border-strong bg-white/[0.03] px-2.5 py-1.5 text-caption text-primary transition-colors hover:bg-white/[0.08]","aria-label":"Close handoffs modal",children:"Close"})]}),e.jsxs("div",{className:"mt-4 flex flex-col gap-2 sm:flex-row sm:items-center",children:[e.jsxs("div",{className:"flex-1",children:[e.jsx("label",{className:"sr-only",htmlFor:"bulk-handoffs-search",children:"Search handoffs"}),e.jsx("input",{id:"bulk-handoffs-search",value:p,onChange:t=>g(t.target.value),placeholder:"Search title, summary, status…","data-modal-autofocus":"true",className:"w-full rounded-lg border border-strong bg-black/25 px-3 py-2 text-body text-white placeholder:text-muted focus:outline-none focus:ring-1 focus:ring-[#BFFF00]/35"})]}),e.jsx("button",{type:"button",onClick:w,disabled:r.length===0,className:"rounded-lg border border-strong bg-white/[0.03] px-3 py-2 text-caption text-primary transition-colors hover:bg-white/[0.08] disabled:opacity-45",children:f?"Clear all":`Select all (${r.length})`})]}),y&&e.jsx("div",{className:"mt-3 rounded-xl border border-white/[0.08] bg-white/[0.02] px-3 py-2 text-body text-secondary",children:y})]}),e.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto px-5 py-4",children:r.length===0?e.jsx("div",{className:"rounded-xl border border-subtle bg-white/[0.02] p-4 text-body text-secondary",children:"No handoffs match this view."}):e.jsx("div",{className:"space-y-2",children:r.map(t=>{const s=c.has(t.id),l=$(t.status);return e.jsx("div",{className:"rounded-xl border border-white/[0.08] bg-white/[0.02] px-3 py-2.5",style:{borderColor:s?`${m.lime}40`:"rgba(255,255,255,0.08)"},children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("input",{type:"checkbox",checked:s,onChange:()=>j(t.id),className:"mt-0.5 h-4 w-4 rounded border-white/20 bg-black/40 text-lime focus:ring-lime/40","aria-label":`Select handoff ${t.title}`}),e.jsx("div",{className:"min-w-0 flex-1",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-body font-medium text-white",children:t.title}),t.summary&&e.jsx("p",{className:"mt-1 line-clamp-2 text-caption text-secondary",children:t.summary}),e.jsxs("p",{className:"mt-1 text-micro text-secondary",children:["Updated ",S(t.updatedAt)]})]}),e.jsx("span",{className:"shrink-0 rounded-full border px-2 py-0.5 text-micro font-semibold uppercase tracking-[0.08em]",style:{borderColor:`${l}30`,backgroundColor:`${l}14`,color:l},children:t.status})]})})]})},t.id)})})}),e.jsxs("div",{className:"flex flex-col gap-2 border-t border-subtle px-5 py-3 sm:flex-row sm:items-center sm:justify-between",children:[e.jsx("div",{className:"text-caption text-secondary",children:u>0?`${u} selected`:"No selection (exporting will include all filtered handoffs)"}),e.jsxs("div",{className:"flex flex-wrap items-center justify-end gap-2",children:[e.jsx("button",{type:"button",onClick:N,disabled:r.length===0,className:"rounded-md border border-strong bg-white/[0.03] px-3 py-1.5 text-caption text-primary transition-colors hover:bg-white/[0.08] disabled:opacity-45",children:"Copy markdown"}),e.jsx("button",{type:"button",onClick:v,disabled:r.length===0,className:"rounded-md border border-strong bg-white/[0.03] px-3 py-1.5 text-caption text-primary transition-colors hover:bg-white/[0.08] disabled:opacity-45",children:"Copy JSON"})]})]})]})})}export{z as BulkHandoffsModal};
@@ -10,7 +10,7 @@
10
10
  <meta name="googlebot" content="noindex, nofollow, noarchive, nosnippet, noimageindex" />
11
11
  <meta name="copyright" content="OrgX. All rights reserved." />
12
12
  <title>OrgX Live Dashboard</title>
13
- <script type="module" crossorigin src="/orgx/live/assets/C8AYbjlq.js"></script>
13
+ <script type="module" crossorigin src="/orgx/live/assets/D2Kqcmv9.js"></script>
14
14
  <link rel="modulepreload" crossorigin href="/orgx/live/assets/Dj2k1r16.js">
15
15
  <link rel="modulepreload" crossorigin href="/orgx/live/assets/DMKyYAtD.js">
16
16
  <link rel="modulepreload" crossorigin href="/orgx/live/assets/eeHXe_OQ.js">
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@useorgx/openclaw-plugin",
3
- "version": "0.7.17",
3
+ "version": "0.7.18",
4
4
  "description": "OrgX plugin for OpenClaw — agent orchestration, quality gates, model routing, and live dashboard",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",