agi-farm 1.3.3 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +61 -8
- package/dashboard-dist/assets/Agents-C0vd-nLU.js +1 -0
- package/dashboard-dist/assets/{Approvals-DjkmjBWA.js → Approvals-Cuy-TQm_.js} +1 -1
- package/dashboard-dist/assets/{Broadcast-DsLcKkuU.js → Broadcast-CSDc56lS.js} +1 -1
- package/dashboard-dist/assets/{Budget-DbFU1nzj.js → Budget-CN9H2Y25.js} +1 -1
- package/dashboard-dist/assets/{Comms-CKh5xUB7.js → Comms-P_VTp6bW.js} +1 -1
- package/dashboard-dist/assets/{Crons-DTFPlfOv.js → Crons-C3mlvls0.js} +1 -1
- package/dashboard-dist/assets/{HITL-C9ecN_-W.js → HITL-DhPTL3Bo.js} +1 -1
- package/dashboard-dist/assets/{Jobs-Cf9UYZmJ.js → Jobs-mJ3shtZI.js} +1 -1
- package/dashboard-dist/assets/{Knowledge-Cy_ZdY_G.js → Knowledge-BYPPeIE_.js} +1 -1
- package/dashboard-dist/assets/Overview-DAgNrl1i.js +2 -0
- package/dashboard-dist/assets/Projects-DM6yWSRR.js +1 -0
- package/dashboard-dist/assets/Settings-TM1kGMlw.js +1 -0
- package/dashboard-dist/assets/Tasks-C536yeK0.js +1 -0
- package/dashboard-dist/assets/Velocity-BUG-TFJH.js +1 -0
- package/dashboard-dist/assets/charts-BrUY2WWl.js +36 -0
- package/dashboard-dist/assets/index-B8eJ63U_.js +2 -0
- package/dashboard-dist/assets/index-CButpJQR.css +1 -0
- package/dashboard-dist/index.html +2 -2
- package/openclaw.plugin.json +10 -1
- package/package.json +4 -2
- package/scripts/add-ecc-to-templates.js +81 -0
- package/scripts/dispatch.js +1 -2
- package/scripts/rebuild-original.js.backup +157 -0
- package/scripts/rebuild-with-ecc.js +345 -0
- package/scripts/rebuild.js +201 -13
- package/scripts/setup.js +64 -0
- package/scripts/update-ecc-resources.js +303 -0
- package/scripts/validate-config.js +195 -0
- package/server/dashboard.js +75 -6
- package/server/services/intake.js +3 -0
- package/server/services/policy.js +1 -1
- package/server/services/projects.js +60 -12
- package/templates/SOUL.md.anchor +32 -0
- package/templates/SOUL.md.cipher +32 -0
- package/templates/SOUL.md.evolve +32 -0
- package/templates/SOUL.md.forge +43 -0
- package/templates/SOUL.md.generic +32 -0
- package/templates/SOUL.md.lens +32 -0
- package/templates/SOUL.md.main +140 -0
- package/templates/SOUL.md.nova +32 -0
- package/templates/SOUL.md.pixel +32 -0
- package/templates/SOUL.md.sage +44 -0
- package/templates/SOUL.md.vigil +44 -0
- package/templates/SOUL.md.vista +32 -0
- package/templates/_ecc_section.template +31 -0
- package/dashboard-dist/assets/Agents-Bovx0mKi.js +0 -1
- package/dashboard-dist/assets/Overview-Boc7TOlC.js +0 -2
- package/dashboard-dist/assets/Projects-CT2nZTrB.js +0 -2
- package/dashboard-dist/assets/Tasks-Dcjhiktm.js +0 -1
- package/dashboard-dist/assets/Velocity-CKlz5-iP.js +0 -1
- package/dashboard-dist/assets/charts-C5TghfcA.js +0 -36
- package/dashboard-dist/assets/index-Bjt1AMWV.js +0 -2
- package/dashboard-dist/assets/index-Dz5_3d0J.css +0 -1
package/README.md
CHANGED
|
@@ -36,14 +36,26 @@
|
|
|
36
36
|
|
|
37
37
|
---
|
|
38
38
|
|
|
39
|
-
## 🆕 What's New in v1.
|
|
40
|
-
|
|
41
|
-
### Production
|
|
42
|
-
-
|
|
43
|
-
-
|
|
44
|
-
-
|
|
45
|
-
-
|
|
46
|
-
-
|
|
39
|
+
## 🆕 What's New in v1.5.0
|
|
40
|
+
|
|
41
|
+
### 🎯 ECC Integration: Production-Ready AI Coding Framework
|
|
42
|
+
- **69 specialized skills** from Everything Claude Code (Anthropic hackathon winner)
|
|
43
|
+
- **16 ECC agent templates** for domain-specific delegation
|
|
44
|
+
- **33 slash commands** for common workflows
|
|
45
|
+
- **Auto-applied resources** based on agent roles (Sage → @architect, Forge → @tdd-workflow, Vigil → @security-scan)
|
|
46
|
+
- **Zero configuration** — ECC resources automatically injected into SOUL.md files
|
|
47
|
+
- **Framework support** — Python, Django, Spring Boot, Go, Swift, PostgreSQL patterns included
|
|
48
|
+
- **TDD & Security-First** — 80%+ test coverage enforced, comprehensive security scans
|
|
49
|
+
- **See:** [ECC Integration Guide](docs/ECC_INTEGRATION_GUIDE.md)
|
|
50
|
+
|
|
51
|
+
### Previous: Dashboard UI v2: Agent OS Overhaul (v1.4.0)
|
|
52
|
+
- 🛰️ **Agent OS Aesthetic**: Professional, minimalist, and high-contrast obsidian design.
|
|
53
|
+
- 📉 **Strategic Command Matrix**: High-density project matrix with integrated Gantt and Burndown visualizations.
|
|
54
|
+
- 🧬 **Fleet Pulse signatures**: Minimalist neural activity and heartbeat monitoring for the entire fleet.
|
|
55
|
+
- 📊 **Efficiency Analytics**: Professional data visualizations for agent velocity and task throughput.
|
|
56
|
+
- ⚡ **Performance Optimization**: 60% reduction in dashboard asset size and faster SSE fan-out.
|
|
57
|
+
|
|
58
|
+
## 🆕 Previous Updates (v1.2.0 - v1.3.x)
|
|
47
59
|
|
|
48
60
|
### Previous Highlights (v1.1.x)
|
|
49
61
|
- 🔄 **GitHub release detection & Auto-Update system directly from dashboard**
|
|
@@ -144,6 +156,8 @@ Answer the setup prompts and your team will be live in ~2 minutes:
|
|
|
144
156
|
? Team size: 11 agents (Full Stack)
|
|
145
157
|
? Domain: general
|
|
146
158
|
? Collaboration frameworks: langgraph
|
|
159
|
+
? Auto-create project channel per project: Yes
|
|
160
|
+
? Default execution path: AGI-Farm first
|
|
147
161
|
? Confirm setup? Yes
|
|
148
162
|
|
|
149
163
|
✅ Creating 11 agents...
|
|
@@ -153,6 +167,23 @@ Answer the setup prompts and your team will be live in ~2 minutes:
|
|
|
153
167
|
🎉 Your AI team is ready!
|
|
154
168
|
```
|
|
155
169
|
|
|
170
|
+
Setup now captures project defaults in `PROJECTS.json`, including:
|
|
171
|
+
- `auto_project_channel` (default: `true`)
|
|
172
|
+
- `execution_path` (default: `agi-farm-first`)
|
|
173
|
+
|
|
174
|
+
This makes AGI Farm the default execution path for newly created projects.
|
|
175
|
+
|
|
176
|
+
### Project Defaults
|
|
177
|
+
|
|
178
|
+
New projects inherit defaults from `PROJECTS.json`:
|
|
179
|
+
- **Auto Project Channel**: when enabled, each new project gets a dedicated channel
|
|
180
|
+
- **Execution Path**: choose `agi-farm-first` (multi-agent routing) or `direct-first` (immediate execution)
|
|
181
|
+
|
|
182
|
+
View and edit defaults via:
|
|
183
|
+
- Dashboard → Settings tab
|
|
184
|
+
- `GET /api/projects` → `defaults` field
|
|
185
|
+
- `PATCH /api/projects/defaults` API endpoint
|
|
186
|
+
|
|
156
187
|
---
|
|
157
188
|
|
|
158
189
|
## 📦 Commands
|
|
@@ -667,6 +698,28 @@ Contributions are welcome! Please feel free to submit a Pull Request.
|
|
|
667
698
|
|
|
668
699
|
---
|
|
669
700
|
|
|
701
|
+
## 🙏 Acknowledgments
|
|
702
|
+
|
|
703
|
+
This plugin integrates production-ready AI coding resources from the following projects:
|
|
704
|
+
|
|
705
|
+
### Everything Claude Code (ECC)
|
|
706
|
+
- **Repository**: https://github.com/affaan-m/everything-claude-code
|
|
707
|
+
- **Author**: [@affaan-m](https://github.com/affaan-m)
|
|
708
|
+
- **Achievement**: Winner of Anthropic's Claude Code hackathon
|
|
709
|
+
- **Integration**: 194 resource files (16 agents, 69 skills, 33 commands, 7 guides)
|
|
710
|
+
- **Impact**: Industry-standard TDD workflows, security scans, API design patterns, and framework templates for Python/Django/Spring Boot/Go/Swift/PostgreSQL
|
|
711
|
+
|
|
712
|
+
The ECC framework provides the foundation for AGI Farm's production-ready coding capabilities, including:
|
|
713
|
+
- Test-driven development workflows with 80%+ coverage enforcement
|
|
714
|
+
- Comprehensive security scanning and vulnerability detection
|
|
715
|
+
- API design patterns and best practices
|
|
716
|
+
- Framework-specific templates and conventions
|
|
717
|
+
- Auto-delegation based on agent roles
|
|
718
|
+
|
|
719
|
+
**Special thanks to @affaan-m for creating and open-sourcing this exceptional framework.**
|
|
720
|
+
|
|
721
|
+
---
|
|
722
|
+
|
|
670
723
|
## 📝 License
|
|
671
724
|
|
|
672
725
|
MIT License — built for [OpenClaw](https://docs.openclaw.ai)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as x,a4 as e}from"./vendor-5MxLWm27.js";import{a as y}from"./index-B8eJ63U_.js";import{L as j}from"./LastUpdated-BVeFtHFH.js";function S({minutes:t}){const n=t??999,r=n<5?"var(--mint)":n<15?"var(--amber)":"var(--red)",o=Math.max(0,Math.min(100,100-n/60*100));return e.jsxs("div",{style:{width:"100%"},children:[e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",fontSize:"9px",color:"var(--muted)",marginBottom:"4px",fontFamily:"var(--font-mono)"},children:[e.jsx("span",{children:"PULSE_SIGNAL"}),e.jsx("span",{style:{color:r},children:n<999?`${n}M AGO`:"OFFLINE"})]}),e.jsx("div",{className:"progress-track",style:{height:"2px"},children:e.jsx("div",{className:"progress-fill",style:{width:`${o}%`,background:r}})})]})}function b({active:t,total:n}){const r=n>0?t/n*100:0,o=r>80?"var(--red)":r>40?"var(--amber)":"var(--accent)";return e.jsxs("div",{style:{width:"40px",flexShrink:0},children:[e.jsxs("div",{style:{fontSize:"12px",fontWeight:800,color:o,fontFamily:"var(--font-mono)",textAlign:"center"},children:[t,e.jsxs("span",{style:{color:"var(--muted)",fontSize:"9px",fontWeight:400},children:["/",n]})]}),e.jsx("div",{style:{fontSize:"7px",color:"var(--muted)",fontWeight:800,textAlign:"center",marginTop:"2px"},children:"LOAD"})]})}function C({task:t}){return t?e.jsxs("div",{style:{borderLeft:"2px solid var(--accent)",paddingLeft:"10px",margin:"4px 0"},children:[e.jsx("div",{style:{fontSize:"8px",color:"var(--accent)",fontWeight:800,fontFamily:"var(--font-mono)"},children:"ACTIVE_PROCESS"}),e.jsx("div",{style:{fontSize:"11px",fontWeight:600,color:"#fff",marginTop:"2px",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:t.title.toUpperCase()})]}):e.jsx("div",{style:{fontSize:"10px",color:"var(--muted)",fontFamily:"var(--font-mono)",padding:"8px",border:"1px solid var(--border-light)",borderRadius:"2px"},children:"// AWAITING_INSTRUCTIONS"})}function L({data:t,lastUpdated:n,toast:r}){const{agents:o=[],tasks:v=[],cache_age_seconds:f}=t||{},[l,m]=x.useState(""),[a,h]=x.useState("all"),d=o.filter(s=>{const c=l.toLowerCase(),p=!l||(s.name||"").toLowerCase().includes(c)||(s.id||"").toLowerCase().includes(c),u=a==="all"||s.status===a;return p&&u});return e.jsxs("div",{className:"fade-in",style:{display:"flex",flexDirection:"column",gap:20},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:16},children:[e.jsx("input",{className:"input-base",placeholder:"SEARCH_FLEET_ID...",value:l,onChange:s=>m(s.target.value),style:{width:"240px",fontFamily:"var(--font-mono)"}}),e.jsxs("select",{className:"input-base",value:a,onChange:s=>h(s.target.value),style:{width:"140px",cursor:"pointer",fontFamily:"var(--font-mono)"},children:[e.jsx("option",{value:"all",children:"ALL_STATUS"}),e.jsx("option",{value:"active",children:"ACTIVE"}),e.jsx("option",{value:"available",children:"AVAILABLE"}),e.jsx("option",{value:"busy",children:"BUSY"}),e.jsx("option",{value:"error",children:"ERROR"})]}),e.jsxs("div",{style:{display:"flex",gap:16,fontSize:"10px",fontFamily:"var(--font-mono)",fontWeight:700},children:[e.jsxs("span",{style:{color:"var(--accent)"},children:["● ",o.filter(s=>s.status==="active").length," ACTIVE"]}),e.jsxs("span",{style:{color:"var(--muted)"},children:["● ",o.filter(s=>s.status==="available").length," IDLE"]})]}),e.jsx("div",{style:{marginLeft:"auto"},children:e.jsx(j,{ts:n})})]}),e.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(320px, 1fr))",gap:20},children:d.map((s,c)=>e.jsx(E,{agent:s,tasks:v,toast:r,index:c},s.id))})]})}function E({agent:t,tasks:n,toast:r,index:o}){const[v,f]=x.useState(!1),[l,m]=x.useState(""),[a,h]=x.useState(!1),d=n.filter(i=>i.assigned_to===t.id),s=d.find(i=>i.status==="in-progress"),c=d.filter(i=>["in-progress","blocked","needs_human_decision"].includes(i.status)).length,p=d.some(i=>i.status==="needs_human_decision"),u=t.status==="error"?"var(--red)":p?"var(--purple)":"var(--border)",g=async()=>{if(l.trim()){h(!0);try{await y(`/api/comms/${t.id}/send`,{message:l.trim()}),r(`Signal transmitted to ${t.name}`,"success"),m(""),f(!1)}catch(i){r(i.message,"error")}h(!1)}};return e.jsxs("div",{className:"card fade-in",style:{animationDelay:`${o*.05}s`,display:"flex",flexDirection:"column",gap:16,borderColor:t.status==="error"||p?u:"var(--border)"},children:[e.jsxs("div",{style:{display:"flex",alignItems:"flex-start",gap:12},children:[e.jsx("div",{style:{fontSize:"24px",flexShrink:0},children:t.emoji||"🤖"}),e.jsxs("div",{style:{flex:1,minWidth:0},children:[e.jsx("div",{style:{fontSize:"14px",fontWeight:700,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:t.name.toUpperCase()}),e.jsxs("div",{style:{fontSize:"9px",color:"var(--muted)",fontFamily:"var(--font-mono)",marginTop:"2px"},children:[t.role.toUpperCase()," // ",t.id]})]}),e.jsx(b,{active:c,total:d.length})]}),e.jsx(C,{task:s}),p&&e.jsx("div",{style:{padding:"6px 10px",background:"rgba(181, 53, 255, 0.05)",border:"1px solid var(--purple)",borderRadius:"2px",fontSize:"9px",fontWeight:800,color:"var(--purple)",fontFamily:"var(--font-mono)"},children:"[!] ACTION_REQUIRED: HITL_GATE_OPEN"}),e.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr 1fr",gap:8},children:[e.jsxs("div",{className:"card",style:{padding:"8px",textAlign:"center",background:"transparent"},children:[e.jsx("div",{style:{fontSize:"14px",fontWeight:700,fontFamily:"var(--font-mono)",color:"var(--mint)"},children:t.tasks_completed??0}),e.jsx("div",{style:{fontSize:"7px",color:"var(--muted)",fontWeight:800},children:"SUCCESS"})]}),e.jsxs("div",{className:"card",style:{padding:"8px",textAlign:"center",background:"transparent"},children:[e.jsx("div",{style:{fontSize:"14px",fontWeight:700,fontFamily:"var(--font-mono)",color:"var(--red)"},children:t.tasks_failed??0}),e.jsx("div",{style:{fontSize:"7px",color:"var(--muted)",fontWeight:800},children:"FAILURES"})]}),e.jsxs("div",{className:"card",style:{padding:"8px",textAlign:"center",background:"transparent"},children:[e.jsx("div",{style:{fontSize:"14px",fontWeight:700,fontFamily:"var(--font-mono)",color:"var(--accent)"},children:(t.credibility||1).toFixed(1)}),e.jsx("div",{style:{fontSize:"7px",color:"var(--muted)",fontWeight:800},children:"CREDENCE"})]})]}),e.jsx(S,{minutes:t.heartbeat_age_minutes}),e.jsxs("div",{style:{fontSize:"10px",color:"var(--muted)",fontFamily:"var(--font-mono)",display:"flex",flexDirection:"column",gap:4},children:[e.jsxs("div",{style:{display:"flex",justifyContent:"space-between"},children:[e.jsx("span",{children:"MODEL_ID:"}),e.jsx("span",{style:{color:"#fff"},children:t.model?.toUpperCase()||"--"})]}),e.jsxs("div",{style:{display:"flex",justifyContent:"space-between"},children:[e.jsx("span",{children:"MEMORY_TAG:"}),e.jsx("span",{style:{color:"#fff"},children:t.inbox_count>0?`INBOX[${t.inbox_count}]`:"NOMINAL"})]})]}),e.jsx("div",{style:{marginTop:"auto",borderTop:"1px solid var(--border-light)",paddingTop:12},children:v?e.jsxs("div",{style:{display:"flex",gap:8},children:[e.jsx("input",{className:"input-base",style:{flex:1},placeholder:"ENCRYPTED_SIGNAL...",value:l,onChange:i=>m(i.target.value),onKeyDown:i=>i.key==="Enter"&&g()}),e.jsx("button",{className:"btn-primary",onClick:g,disabled:a||!l.trim(),children:a?"...":"SEND"}),e.jsx("button",{className:"btn-secondary",style:{padding:"8px 12px"},onClick:()=>f(!1),children:"✕"})]}):e.jsx("button",{className:"btn-secondary",style:{width:"100%",fontSize:"10px",color:"var(--muted)"},onClick:()=>f(!0),children:"ESTABLISH COMMS CHANNEL"})})]})}export{L as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as v,a4 as r}from"./vendor-5MxLWm27.js";import{L as x}from"./LastUpdated-BVeFtHFH.js";import{
|
|
1
|
+
import{r as v,a4 as r}from"./vendor-5MxLWm27.js";import{L as x}from"./LastUpdated-BVeFtHFH.js";import{e as u,f}from"./index-B8eJ63U_.js";function b({data:t,lastUpdated:i}){const{approvals:n=[],featureFlags:o={}}=t||{},[s,l]=v.useState({});if(!o.approvals)return r.jsx("div",{className:"card",children:"Approvals feature is disabled. Enable `featureApprovals` in plugin config."});const a=n.filter(e=>e.status==="pending");async function d(e){try{await u(e,s[e]||"")}catch{}}async function p(e){try{await f(e,s[e]||"")}catch{}}return r.jsxs("div",{className:"fade-in",style:{display:"grid",gap:14},children:[r.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[r.jsxs("div",{className:"section-title",style:{marginBottom:0},children:["Approvals (",a.length," pending)"]}),r.jsx(x,{ts:i})]}),a.length===0&&r.jsx("div",{className:"card",style:{color:"var(--muted)"},children:"No pending approvals."}),a.map(e=>r.jsxs("div",{className:"card",style:{display:"grid",gap:8},children:[r.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[r.jsx("span",{style:{fontWeight:700},children:e.action}),r.jsx("span",{className:"badge badge-hitl",children:"pending"}),r.jsx("span",{style:{color:"var(--muted)",fontSize:10},children:e.id})]}),r.jsxs("div",{style:{color:"var(--muted)",fontSize:12},children:["Job: ",e.jobId]}),r.jsxs("div",{style:{color:"var(--muted)",fontSize:12},children:["Reason: ",e.note||"approval required"]}),r.jsx("input",{value:s[e.id]||"",onChange:c=>l(g=>({...g,[e.id]:c.target.value})),placeholder:"Optional note",style:{width:"100%",background:"var(--bg3)",border:"1px solid var(--border)",borderRadius:6,color:"var(--text)",padding:"8px 10px",fontFamily:"inherit"}}),r.jsxs("div",{style:{display:"flex",gap:8},children:[r.jsx("button",{onClick:()=>d(e.id),style:{background:"rgba(0,230,118,.1)",border:"1px solid rgba(0,230,118,.35)",color:"var(--green)",borderRadius:5,padding:"5px 10px",cursor:"pointer",fontFamily:"inherit",fontSize:11},children:"Approve"}),r.jsx("button",{onClick:()=>p(e.id),style:{background:"rgba(255,23,68,.1)",border:"1px solid rgba(255,23,68,.35)",color:"var(--red)",borderRadius:5,padding:"5px 10px",cursor:"pointer",fontFamily:"inherit",fontSize:11},children:"Reject"})]})]},e.id))]})}export{b as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as n,a4 as t}from"./vendor-5MxLWm27.js";import{a as m}from"./index-
|
|
1
|
+
import{r as n,a4 as t}from"./vendor-5MxLWm27.js";import{a as m}from"./index-B8eJ63U_.js";function v({data:a,toast:e}){const{broadcast:s=""}=a,i=n.useRef(null);n.useEffect(()=>{i.current&&(i.current.scrollTop=i.current.scrollHeight)},[s]);const[o,l]=n.useState(""),[c,d]=n.useState(!1),u=async()=>{if(o.trim()){d(!0);try{await m("/api/broadcast",{message:o.trim()}),e("Broadcast posted","success"),l("")}catch(r){e(r.message,"error")}d(!1)}},p=(s||"").split(`
|
|
2
2
|
`);return t.jsxs("div",{className:"fade-in",children:[t.jsxs("div",{style:{display:"flex",gap:8,marginBottom:10},children:[t.jsx("input",{className:"input-base",style:{flex:1},placeholder:"Post a broadcast message...",value:o,onChange:r=>l(r.target.value),onKeyDown:r=>r.key==="Enter"&&u(),maxLength:2e3}),t.jsx("button",{className:"btn-primary",onClick:u,disabled:c||!o.trim(),children:c?"Posting...":"Post"})]}),t.jsxs("div",{style:{background:"var(--bg2)",border:"1px solid var(--border)",borderRadius:8,padding:16,fontFamily:"JetBrains Mono, monospace",fontSize:12,height:"calc(100vh - 160px)",overflowY:"auto"},ref:i,children:[p.length===0||s.trim()===""?t.jsx("span",{style:{color:"var(--muted)"},children:"No broadcasts yet."}):p.map((r,f)=>t.jsx(g,{line:r},f)),t.jsx("div",{style:{height:8}})]})]})}function g({line:a}){const e=a.toLowerCase();let s="var(--text)";return e.includes("[critical]")||e.includes("🔴")?s="var(--red)":e.includes("[blocked]")||e.includes("⚠")?s="var(--amber)":e.includes("[hitl]")||e.includes("🚨")?s="var(--purple)":e.includes("[done]")||e.includes("✅")?s="var(--green)":a.startsWith("#")?s="var(--cyan)":a.startsWith("---")?s="rgba(84,110,122,.5)":(e.includes("task_id:")||e.includes("from:"))&&(s="var(--muted)"),t.jsx("div",{style:{color:s,padding:"1px 0",lineHeight:1.6,whiteSpace:"pre-wrap",wordBreak:"break-word"},children:a||" "})}export{v as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a4 as e}from"./vendor-5MxLWm27.js";import{L as v}from"./LastUpdated-BVeFtHFH.js";import{R as u,B as S,X as T,Y as _,T as I,d as N,f as w}from"./charts-
|
|
1
|
+
import{a4 as e}from"./vendor-5MxLWm27.js";import{L as v}from"./LastUpdated-BVeFtHFH.js";import{R as u,B as S,X as T,Y as _,T as I,d as N,f as w}from"./charts-BrUY2WWl.js";function R({data:c,lastUpdated:p}){const{budget:i={}}=c||{},t=i.limits||{},s=i.current||{},n=i.alerts||{},a=i.per_agent||{},f=i.per_model||{},h=i.notes||null,y=i.last_updated||null,j=[{label:"DAILY_QUOTA",spent:s.daily_usd??0,limit:t.daily_usd??0,threshold:n.daily_threshold_pct??70},{label:"WEEKLY_QUOTA",spent:s.weekly_usd??0,limit:t.weekly_usd??0,threshold:n.weekly_threshold_pct??70},{label:"MONTHLY_QUOTA",spent:s.monthly_usd??0,limit:t.monthly_usd??0,threshold:80}];return e.jsxs("div",{className:"fade-in",style:{display:"grid",gap:16},children:[h&&e.jsxs("div",{className:"card shadow-glow",style:{padding:"12px 20px",background:"rgba(255,214,0,0.03)",border:"1px solid var(--amber)",display:"flex",alignItems:"center",gap:16},children:[e.jsx("span",{style:{fontSize:20,textShadow:"0 0 10px var(--amber)"},children:"⚠"}),e.jsxs("div",{style:{flex:1},children:[e.jsx("div",{className:"section-title",style:{fontSize:9,color:"var(--amber)",marginBottom:2},children:"FISCAL_INTERRUPT_TRIGGERED"}),e.jsx("div",{style:{fontSize:13,color:"var(--text)",fontWeight:600},children:h})]}),y&&e.jsxs("div",{style:{textAlign:"right",fontSize:9,color:"var(--muted)",fontFamily:"JetBrains Mono, monospace"},children:["SOURCE_SYNC: ",new Date(y).toLocaleString().toUpperCase()]}),e.jsx("div",{style:{marginLeft:16},children:e.jsx(v,{ts:p})})]}),e.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(3,1fr)",gap:16},children:j.map(({label:o,spent:r,limit:x,threshold:l})=>{const d=x>0?Math.min(100,r/x*100):0,b=d>=l,m=d>l?"var(--red)":d>l*.8?"var(--amber)":"var(--cyan)";return e.jsxs("div",{className:"card shadow-glow",style:{border:`1px solid ${b?"var(--red)":"var(--border)"}`},children:[e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",marginBottom:12,alignItems:"center"},children:[e.jsx("span",{className:"section-title",style:{fontSize:9,marginBottom:0},children:o}),e.jsx("div",{style:{textAlign:"right"},children:e.jsxs("div",{style:{fontSize:16,fontWeight:900,color:m,fontFamily:"Rajdhani, sans-serif"},children:["$",r.toFixed(2)," ",e.jsxs("span",{style:{fontSize:10,color:"var(--muted)"},children:["/ $",x]})]})})]}),e.jsxs("div",{className:"progress-track",style:{height:10,position:"relative",background:"rgba(255,255,255,0.02)"},children:[e.jsx("div",{className:"progress-fill",style:{width:`${d}%`,background:m,boxShadow:`0 0 10px ${m}66`}}),e.jsx("div",{style:{position:"absolute",top:-4,bottom:-4,left:`${l}%`,width:2,background:"var(--amber)",boxShadow:"0 0 8px var(--amber)",opacity:.8}})]}),e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",marginTop:10,fontSize:9,fontFamily:"JetBrains Mono, monospace",fontWeight:700},children:[e.jsxs("span",{style:{color:"var(--muted)"},children:["UTILIZATION: ",d.toFixed(1),"%"]}),e.jsxs("span",{style:{color:"var(--amber)"},children:["LIMITER: ",l,"%"]})]})]},o)})}),Object.keys(a).length>0&&e.jsxs("div",{className:"card",children:[e.jsx("div",{className:"section-title",style:{fontSize:9},children:"RESOURCE_COST_DISTRIBUTION_MATRIX"}),e.jsx("div",{style:{height:Math.max(240,Object.keys(a).length*40),marginTop:16},children:e.jsx(u,{width:"100%",height:"100%",children:e.jsxs(S,{data:Object.entries(a).map(([o,r])=>({name:o.toUpperCase(),spent:typeof r=="object"?r.spent??0:r})).sort((o,r)=>r.spent-o.spent),layout:"vertical",margin:{left:100,right:30,top:0,bottom:0},children:[e.jsx(T,{type:"number",hide:!0}),e.jsx(_,{type:"category",dataKey:"name",axisLine:!1,tickLine:!1,tick:{fill:"var(--muted)",fontSize:10,fontFamily:"JetBrains Mono, monospace",fontWeight:700},width:90}),e.jsx(I,{cursor:{fill:"rgba(255,255,255,0.02)"},contentStyle:{background:"#080810",border:"1px solid var(--border)",borderRadius:8,fontSize:11,fontFamily:"JetBrains Mono, monospace"},formatter:o=>[`$${o.toFixed(3)} USD`,"RESOURCE_CONSUMPTION"]}),e.jsx(N,{dataKey:"spent",radius:[0,4,4,0],barSize:16,children:Object.entries(a).map(([o],r)=>e.jsx(w,{fill:`hsl(${180+r*25}, 100%, 50%)`,fillOpacity:.8},o))})]})})})]}),e.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:16},children:[e.jsx(g,{title:"AGENTIC_CONSUMPTION_MATRIX",data:a}),e.jsx(g,{title:"MODEL_KERNEL_COST_MATRIX",data:f})]})]})}function g({title:c,data:p}){const i=Object.entries(p).sort(([,t],[,s])=>{const n=typeof t=="object"?t.spent??0:t;return(typeof s=="object"?s.spent??0:s)-n});return e.jsxs("div",{className:"card",style:{padding:0,overflow:"hidden"},children:[e.jsx("div",{style:{background:"rgba(255,255,255,0.02)",padding:"12px 16px",borderBottom:"1px solid var(--border)"},children:e.jsx("div",{className:"section-title",style:{fontSize:9,marginBottom:0},children:c})}),i.length===0?e.jsx("div",{style:{padding:24,textAlign:"center",color:"var(--muted)",fontSize:10},children:"DATA_INDEX_NULL"}):e.jsxs("table",{style:{width:"100%",fontSize:11,borderCollapse:"collapse"},children:[e.jsx("thead",{children:e.jsx("tr",{style:{background:"rgba(0,0,0,0.1)",borderBottom:"1px solid var(--border)"},children:["IDENTIFIER","EXPENDITURE","CYCLES"].map(t=>e.jsx("th",{style:{textAlign:t==="IDENTIFIER"?"left":"right",padding:"10px 16px",color:"var(--muted)",fontSize:8,fontWeight:800,letterSpacing:"0.1em"},children:t},t))})}),e.jsx("tbody",{children:i.map(([t,s])=>{const n=typeof s=="object"?s.spent??0:s,a=typeof s=="object"?s.calls??"--":"--";return e.jsxs("tr",{style:{borderBottom:"1px solid rgba(255,255,255,0.02)"},className:"task-row-hover",children:[e.jsx("td",{style:{padding:"12px 16px",fontSize:10,fontWeight:700,color:"var(--text)",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:160},children:t.toUpperCase()}),e.jsxs("td",{style:{padding:"12px 16px",textAlign:"right",color:"var(--cyan)",fontWeight:800,fontFamily:"JetBrains Mono, monospace"},children:["$",n.toFixed(3)]}),e.jsx("td",{style:{padding:"12px 16px",textAlign:"right",color:"var(--muted)",fontFamily:"JetBrains Mono, monospace",fontSize:10},children:a})]},t)})})]})]})}export{R as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as g,a4 as e}from"./vendor-5MxLWm27.js";import{a as w}from"./index-
|
|
1
|
+
import{r as g,a4 as e}from"./vendor-5MxLWm27.js";import{a as w}from"./index-B8eJ63U_.js";import{L as C}from"./LastUpdated-BVeFtHFH.js";function I({content:n,label:p,color:d}){if(!n||n.trim()===""||n.trim()===`# ${p}
|
|
2
2
|
|
|
3
3
|
_No messages._`)return e.jsxs("div",{style:{color:"var(--muted)",fontSize:11,padding:"60px 0",textAlign:"center",border:"1px dashed var(--border)",borderRadius:8,marginTop:16},children:[e.jsx("div",{style:{fontSize:24,marginBottom:12,opacity:.3},children:"📡"}),e.jsx("div",{style:{letterSpacing:"0.1em",fontWeight:700},children:"FEED_SILENT // NO ACTIVE SIGNALS"})]});const l=(n||"").split(`
|
|
4
4
|
`);return e.jsx("div",{style:{fontFamily:"JetBrains Mono, monospace",fontSize:11,lineHeight:1.8,maxHeight:500,overflowY:"auto",padding:20,background:"rgba(0,0,0,0.2)",borderRadius:8,border:"1px solid var(--border)"},children:l.map((a,i)=>{let r="rgba(255,255,255,0.7)",s=400,c="none";return a.startsWith("# ")||a.startsWith("## ")?(r=d,s=800,c=`0 0 10px ${d}44`):a.startsWith("---")?r="rgba(255,255,255,0.05)":a.startsWith("- ")?r="var(--muted)":a.startsWith("**")&&(r="var(--text)",s=600),e.jsxs("div",{style:{color:r,fontWeight:s,textShadow:c,padding:"2px 0",borderBottom:a.startsWith("---")?"1px solid rgba(255,255,255,0.05)":"none",display:"flex",gap:12},children:[e.jsx("span",{style:{width:24,color:"rgba(255,255,255,0.05)",textAlign:"right",userSelect:"none"},children:i+1}),e.jsx("span",{children:a||" "})]},i)})})}function A({data:n,lastUpdated:p,toast:d}){const{comms:l={},agents:a=[]}=n||{},[i,r]=g.useState(a[0]?.id||null),[s,c]=g.useState("inbox"),[x,h]=g.useState(""),[b,f]=g.useState(!1),v=async()=>{if(!(!x.trim()||!i)){f(!0);try{await w(`/api/comms/${i}/send`,{message:x.trim()}),d("Signal frequencies locked and transmitted","success"),h("")}catch(t){d(t.message,"error")}f(!1)}},S=l[i]||{inbox:"",outbox:""},m=a.find(t=>t.id===i),u=t=>(t?.match(/^## /gm)||[]).length;return e.jsxs("div",{className:"fade-in",style:{display:"grid",gridTemplateColumns:"260px 1fr",gap:20,minHeight:600},children:[e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:12},children:[e.jsx("div",{className:"section-title",style:{fontSize:9},children:"NEURAL FREQUENCIES"}),e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:6},children:a.map(t=>{const y=l[t.id]||{},j=u(y.inbox),N=u(y.outbox),o=i===t.id;return e.jsxs("button",{onClick:()=>r(t.id),style:{background:o?"rgba(0, 240, 255, 0.08)":"rgba(255,255,255,0.02)",border:`1px solid ${o?"rgba(0, 240, 255, 0.3)":"var(--border)"}`,borderRadius:8,padding:"12px 14px",cursor:"pointer",textAlign:"left",display:"flex",alignItems:"center",gap:12,transition:"all 0.2s",boxShadow:o?"0 0 15px rgba(0, 240, 255, 0.05)":"none"},className:"task-row-hover",children:[e.jsx("span",{style:{fontSize:24,filter:o?"drop-shadow(0 0 5px var(--cyan))":"grayscale(0.5)"},children:t.emoji}),e.jsxs("div",{style:{flex:1,minWidth:0},children:[e.jsx("div",{style:{fontSize:13,fontWeight:800,color:o?"var(--cyan)":"var(--text)",fontFamily:"Rajdhani, sans-serif",letterSpacing:"0.02em"},children:t.name.toUpperCase()}),e.jsxs("div",{style:{fontSize:9,color:"var(--muted)",fontFamily:"JetBrains Mono, monospace",marginTop:2},children:["IN:",j," // OUT:",N]})]}),o&&e.jsx("div",{className:"status-dot",style:{background:"var(--cyan)",boxShadow:"0 0 8px var(--cyan)"}})]},t.id)})})]}),e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:16},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:16},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12,padding:"8px 20px",background:"rgba(255,255,255,0.03)",borderRadius:10,border:"1px solid var(--border)"},children:[e.jsx("span",{style:{fontSize:24},children:m?.emoji}),e.jsx("span",{style:{fontWeight:800,fontSize:16,color:"var(--cyan)",fontFamily:"Rajdhani, sans-serif",letterSpacing:"0.05em"},children:m?.name.toUpperCase()})]}),e.jsx("div",{style:{display:"flex",gap:8,background:"rgba(0,0,0,0.2)",padding:4,borderRadius:8,border:"1px solid var(--border)"},children:["inbox","outbox"].map(t=>e.jsx("button",{onClick:()=>c(t),style:{background:s===t?"rgba(0,240,255,0.1)":"transparent",border:"none",color:s===t?"var(--cyan)":"var(--muted)",padding:"6px 16px",borderRadius:6,fontSize:10,cursor:"pointer",fontWeight:800,textTransform:"uppercase",letterSpacing:"0.1em",transition:"all 0.2s",fontFamily:"Rajdhani, sans-serif"},children:t==="inbox"?"📥 DOWNLINK":"📤 UPLINK"},t))}),e.jsx("div",{style:{marginLeft:"auto"},children:e.jsx(C,{ts:p})})]}),e.jsxs("div",{className:"card shadow-glow",style:{flex:1,padding:0,overflow:"hidden",minHeight:400},children:[e.jsxs("div",{style:{background:"rgba(255,255,255,0.02)",padding:"8px 16px",borderBottom:"1px solid var(--border)",display:"flex",alignItems:"center",gap:8},children:[e.jsx("div",{style:{width:8,height:8,borderRadius:"50%",background:s==="inbox"?"var(--cyan)":"var(--green)",boxShadow:`0 0 8px ${s==="inbox"?"var(--cyan)":"var(--green)"}`}}),e.jsxs("span",{style:{fontSize:9,fontWeight:800,color:"var(--muted)",letterSpacing:"0.1em"},children:["DECODING_",s.toUpperCase(),"_STREAM.EXE"]})]}),e.jsx(I,{content:S[s],label:s==="inbox"?"Inbox":"Outbox",color:s==="inbox"?"var(--cyan)":"var(--green)"})]}),i&&e.jsxs("div",{className:"card shadow-glow",style:{display:"flex",gap:12,alignItems:"flex-end",border:"1px solid var(--border-h)"},children:[e.jsxs("div",{style:{flex:1},children:[e.jsxs("div",{className:"section-title",style:{fontSize:9,marginBottom:8},children:["ENCRYPT MESSAGE FOR ",m?.name.toUpperCase()]}),e.jsx("textarea",{className:"input-base",placeholder:"AUTHORIZE SIGNAL TRANSMISSION...",value:x,onChange:t=>h(t.target.value),style:{width:"100%",minHeight:80,resize:"none",background:"rgba(0,0,0,0.2)",fontSize:12,padding:12},maxLength:2e3})]}),e.jsx("button",{className:"btn-primary",style:{height:80,width:120,fontSize:13},onClick:v,disabled:b||!x.trim(),children:b?"TX...":"TRANSMIT"})]})]})]})}export{A as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as x,a4 as r}from"./vendor-5MxLWm27.js";import{L as b}from"./LastUpdated-BVeFtHFH.js";import{a as m}from"./index-
|
|
1
|
+
import{r as x,a4 as r}from"./vendor-5MxLWm27.js";import{L as b}from"./LastUpdated-BVeFtHFH.js";import{a as m}from"./index-B8eJ63U_.js";function _(e){return e?e<1e3?`${e}ms`:e<6e4?`${(e/1e3).toFixed(1)}s`:`${Math.round(e/6e4)}m ${Math.round(e%6e4/1e3)}s`:"—"}function v(e){return e==null?"—":e<0?"overdue":e<60?`${e}s`:e<3600?`${Math.round(e/60)}m`:`${Math.round(e/3600)}h`}function S(e){return e==null?"—":e<60?`${e}s ago`:e<3600?`${Math.round(e/60)}m ago`:`${Math.round(e/3600)}h ago`}function j({status:e,errors:o}){return o>=3?r.jsx("span",{className:"dot dot-error",title:`${o} consecutive errors`}):e==="error"?r.jsx("span",{className:"dot dot-error"}):e==="running"?r.jsx("span",{className:"dot dot-active"}):e==="ok"?r.jsx("span",{className:"dot dot-available"}):r.jsx("span",{className:"dot dot-offline"})}function k({job:e,agents:o,onTrigger:s,onToggle:f}){const[a,c]=x.useState(!1),[l,u]=x.useState(!1),[i,g]=x.useState(e.enabled!==!1),d=o.find(p=>p.id===e.agentId),t=e._consecutive_errors||0,n=t>=3||e._status==="error";async function h(){c(!0),await m(`/api/cron/${e.id}/trigger`),s?.(e.id),setTimeout(()=>c(!1),2e3)}async function y(){u(!0);const p=await m(`/api/cron/${e.id}/toggle`);p.ok&&g(p.enabled),u(!1),f?.(e.id,p.enabled)}return r.jsxs(r.Fragment,{children:[r.jsxs("tr",{style:{borderBottom:"1px solid rgba(255,255,255,.03)",background:n?"rgba(255,23,68,.03)":"transparent",opacity:i?1:.5},children:[r.jsx("td",{style:{padding:"8px 12px"},children:r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[r.jsx(j,{status:e._status,errors:t}),r.jsxs("div",{children:[r.jsx("div",{style:{fontSize:12,fontWeight:t>=3?700:400,color:n?"var(--red)":"var(--text)"},children:e.name}),e.description&&r.jsx("div",{style:{fontSize:10,color:"var(--muted)"},children:e.description.slice(0,60)})]})]})}),r.jsx("td",{style:{padding:"8px 12px",fontSize:11},children:d?r.jsxs("span",{children:[d.emoji," ",d.name]}):r.jsx("span",{style:{color:"var(--muted)"},children:e.agentId})}),r.jsx("td",{style:{padding:"8px 12px",fontSize:10,color:"var(--muted)",fontFamily:"monospace"},children:e.schedule?.kind==="every"?`every ${Math.round((e.schedule.everyMs||0)/6e4)}m`:e.schedule?.cronExpression||e.schedule?.kind||"—"}),r.jsx("td",{style:{padding:"8px 12px",fontSize:11,color:v(e._next_run_sec)==="overdue"?"var(--red)":"var(--muted)"},children:v(e._next_run_sec)}),r.jsx("td",{style:{padding:"8px 12px",fontSize:11,color:"var(--muted)"},children:S(e._last_run_sec)}),r.jsx("td",{style:{padding:"8px 12px",fontSize:11,color:"var(--muted)"},children:_(e._duration_ms)}),r.jsxs("td",{style:{padding:"8px 12px"},children:[n&&r.jsxs("span",{style:{fontSize:10,padding:"2px 6px",borderRadius:3,fontWeight:700,background:"rgba(255,23,68,.15)",color:"var(--red)",border:"1px solid rgba(255,23,68,.3)"},children:[t,"× err"]}),!n&&e._status==="ok"&&r.jsx("span",{style:{fontSize:10,padding:"2px 6px",borderRadius:3,background:"rgba(0,230,118,.1)",color:"var(--green)",border:"1px solid rgba(0,230,118,.25)"},children:"ok"})]}),r.jsx("td",{style:{padding:"8px 12px"},children:r.jsxs("div",{style:{display:"flex",gap:6,alignItems:"center"},children:[r.jsx("button",{onClick:h,disabled:a,title:"Trigger now",style:{background:"rgba(0,229,255,.1)",border:"1px solid rgba(0,229,255,.3)",color:"var(--cyan)",padding:"3px 8px",borderRadius:4,cursor:a?"not-allowed":"pointer",fontSize:10,fontFamily:"inherit"},children:a?"...":"▶ Run"}),r.jsx("button",{onClick:y,disabled:l,title:i?"Disable":"Enable",style:{background:i?"rgba(255,214,0,.08)":"rgba(0,230,118,.08)",border:`1px solid ${i?"rgba(255,214,0,.3)":"rgba(0,230,118,.3)"}`,color:i?"var(--amber)":"var(--green)",padding:"3px 8px",borderRadius:4,cursor:l?"not-allowed":"pointer",fontSize:10,fontFamily:"inherit"},children:l?"...":i?"⏸ Off":"▶ On"})]})})]}),n&&e._last_error&&r.jsx("tr",{style:{background:"rgba(255,23,68,.04)"},children:r.jsxs("td",{colSpan:8,style:{padding:"4px 12px 8px 40px",fontSize:10,color:"var(--red)",fontFamily:"monospace"},children:["↳ ",e._last_error]})})]})}function w({data:e,lastUpdated:o}){const{crons:s=[],agents:f=[]}=e||{},[a,c]=x.useState("all"),l=s.filter(t=>(t._consecutive_errors||0)>=3||t._status==="error"),u=s.filter(t=>t._status==="running"),i=s.filter(t=>t.enabled===!1),g=s.filter(t=>a==="error"?(t._consecutive_errors||0)>=3||t._status==="error":a==="running"?t._status==="running":a==="disabled"?t.enabled===!1:!0),d={};return g.forEach(t=>{const n=t.agentId||"unknown";d[n]||(d[n]=[]),d[n].push(t)}),r.jsxs("div",{className:"fade-in",style:{display:"grid",gap:14},children:[r.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(4,1fr)",gap:10},children:[["Total",s.length,"var(--muted)"],["Erroring",l.length,l.length?"var(--red)":"var(--muted)"],["Running",u.length,u.length?"var(--cyan)":"var(--muted)"],["Disabled",i.length,i.length?"var(--amber)":"var(--muted)"]].map(([t,n,h])=>r.jsxs("div",{className:"card",style:{textAlign:"center",cursor:"pointer"},onClick:()=>c(t.toLowerCase()),children:[r.jsx("div",{className:"section-title",children:t}),r.jsx("div",{style:{fontSize:22,fontWeight:700,color:h},children:n})]},t))}),r.jsxs("div",{style:{display:"flex",gap:6,alignItems:"center"},children:[["all","error","running","disabled"].map(t=>r.jsx("button",{onClick:()=>c(t),style:{background:a===t?"rgba(0,229,255,.15)":"var(--surface)",border:`1px solid ${a===t?"rgba(0,229,255,.4)":"var(--border)"}`,color:a===t?"var(--cyan)":"var(--muted)",padding:"4px 12px",borderRadius:4,fontSize:11,cursor:"pointer",fontFamily:"inherit"},children:t},t)),r.jsx(b,{ts:o})]}),r.jsx("div",{className:"card",style:{padding:0,overflow:"hidden"},children:r.jsxs("table",{style:{width:"100%",borderCollapse:"collapse",fontSize:12},children:[r.jsx("thead",{children:r.jsx("tr",{style:{background:"var(--bg3)",borderBottom:"1px solid var(--border)"},children:["Job","Agent","Schedule","Next","Last Run","Duration","Status","Actions"].map(t=>r.jsx("th",{style:{padding:"8px 12px",textAlign:"left",fontSize:10,color:"var(--muted)",fontWeight:600,textTransform:"uppercase",letterSpacing:".05em"},children:t},t))})}),r.jsxs("tbody",{children:[g.length===0&&r.jsx("tr",{children:r.jsx("td",{colSpan:8,style:{padding:"20px",color:"var(--muted)",textAlign:"center"},children:"No cron jobs match filter"})}),g.map(t=>r.jsx(k,{job:t,agents:f},t.id))]})]})})]})}export{w as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as g,a4 as e}from"./vendor-5MxLWm27.js";import{L as h}from"./LastUpdated-BVeFtHFH.js";import{a as f}from"./index-
|
|
1
|
+
import{r as g,a4 as e}from"./vendor-5MxLWm27.js";import{L as h}from"./LastUpdated-BVeFtHFH.js";import{a as f}from"./index-B8eJ63U_.js";function v(t){if(!t)return"—";try{const i=Math.round((Date.now()-new Date(t))/6e4);return i<1?"just now":i<60?`${i}m ago`:i<1440?`${Math.round(i/60)}h ago`:`${Math.round(i/1440)}d ago`}catch{return t}}function m({task:t,agents:i,onAction:p}){const[c,a]=g.useState(""),[n,r]=g.useState(null),l=i.find(s=>s.id===t.assigned_to),o=v(t.created_at),d=(t.sla?.priority||t.priority||"").toUpperCase();async function x(s){r(s);try{await f(`/api/hitl/${t.id}/${s}`,{note:c||void 0}),p(t.id,s)}catch(u){console.error(u)}r(null)}return e.jsxs("div",{style:{background:"var(--bg2)",border:"1px solid rgba(224,64,251,.35)",borderRadius:10,padding:18,display:"grid",gap:14,boxShadow:"0 0 20px rgba(224,64,251,.08)"},children:[e.jsxs("div",{style:{display:"flex",alignItems:"flex-start",gap:12},children:[e.jsx("span",{style:{fontSize:28},children:"🚨"}),e.jsxs("div",{style:{flex:1},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:4,flexWrap:"wrap"},children:[e.jsx("span",{style:{fontWeight:700,fontSize:15},children:t.title}),e.jsx("span",{style:{fontSize:10,fontFamily:"monospace",color:"var(--muted)"},children:t.id}),d&&e.jsx("span",{className:d==="P1"?"p1":d==="P2"?"p2":"p3",children:d})]}),e.jsxs("div",{style:{fontSize:11,color:"var(--muted)"},children:[l&&e.jsxs("span",{children:[l.emoji," ",l.name," · "]}),"Waiting ",e.jsx("span",{style:{color:"var(--amber)",fontWeight:600},children:o}),t.sla?.deadline&&e.jsxs("span",{children:[" · Due ",new Date(t.sla.deadline).toLocaleString()]})]})]})]}),e.jsxs("div",{style:{padding:"12px 14px",background:"rgba(224,64,251,.08)",border:"1px solid rgba(224,64,251,.25)",borderRadius:7},children:[e.jsx("div",{style:{fontSize:10,color:"var(--purple)",fontWeight:700,textTransform:"uppercase",letterSpacing:".06em",marginBottom:6},children:"Decision Required"}),e.jsx("div",{style:{fontSize:13,color:"var(--text)",lineHeight:1.6},children:t.hitl_reason||"Human decision required before proceeding."})]}),t.description&&e.jsxs("div",{children:[e.jsx("div",{style:{fontSize:10,color:"var(--muted)",fontWeight:600,textTransform:"uppercase",letterSpacing:".05em",marginBottom:4},children:"Context"}),e.jsx("div",{style:{fontSize:12,color:"var(--text)",lineHeight:1.6},children:t.description})]}),e.jsxs("div",{children:[e.jsx("div",{style:{fontSize:10,color:"var(--muted)",marginBottom:6},children:"Optional note (sent to agent)"}),e.jsx("input",{value:c,onChange:s=>a(s.target.value),placeholder:"Add context for the agent...",style:{width:"100%",background:"var(--bg3)",border:"1px solid var(--border)",borderRadius:5,padding:"8px 10px",fontSize:12,color:"var(--text)",fontFamily:"inherit",outline:"none",boxSizing:"border-box"}})]}),e.jsxs("div",{style:{display:"flex",gap:10},children:[e.jsx("button",{onClick:()=>x("approve"),disabled:!!n,style:{flex:1,padding:"10px",background:"rgba(0,230,118,.15)",border:"1px solid rgba(0,230,118,.4)",color:"var(--green)",borderRadius:6,cursor:n?"not-allowed":"pointer",fontFamily:"inherit",fontSize:13,fontWeight:700,transition:"all .15s"},children:n==="approve"?"...":"✅ Approve — Continue"}),e.jsx("button",{onClick:()=>x("reject"),disabled:!!n,style:{flex:1,padding:"10px",background:"rgba(255,23,68,.1)",border:"1px solid rgba(255,23,68,.35)",color:"var(--red)",borderRadius:6,cursor:n?"not-allowed":"pointer",fontFamily:"inherit",fontSize:13,fontWeight:700,transition:"all .15s"},children:n==="reject"?"...":"❌ Reject — Block Task"})]})]})}function S({data:t,lastUpdated:i}){const{hitl_tasks:p=[],agents:c=[]}=t||{},[a,n]=g.useState(new Set),r=p.filter(o=>!a.has(o.id));function l(o){n(d=>new Set([...d,o]))}return e.jsxs("div",{className:"fade-in",style:{display:"grid",gap:14},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12},children:[e.jsx("span",{style:{fontSize:14,fontWeight:700,color:r.length?"var(--red)":"var(--green)"},children:r.length?`🚨 ${r.length} decision${r.length>1?"s":""} awaiting your input`:"✅ No pending HITL decisions"}),e.jsx(h,{ts:i})]}),r.length===0&&e.jsx("div",{className:"card",style:{color:"var(--muted)",fontSize:13},children:"All clear — no human decisions required right now. Agents are running autonomously."}),r.map(o=>e.jsx(m,{task:o,agents:c,onAction:l},o.id)),a.size>0&&e.jsxs("div",{style:{padding:"10px 14px",background:"rgba(0,230,118,.06)",border:"1px solid rgba(0,230,118,.2)",borderRadius:6,fontSize:12,color:"var(--green)"},children:["✅ ",a.size," decision",a.size>1?"s":""," resolved this session — agents notified via task status update."]})]})}export{S as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as s,a4 as e}from"./vendor-5MxLWm27.js";import{L as k}from"./LastUpdated-BVeFtHFH.js";import{
|
|
1
|
+
import{r as s,a4 as e}from"./vendor-5MxLWm27.js";import{L as k}from"./LastUpdated-BVeFtHFH.js";import{b as C,d as J,r as N}from"./index-B8eJ63U_.js";function R({step:a}){const i=a.status==="complete"?"var(--green)":a.status==="running"?"var(--cyan)":a.status==="failed"?"var(--red)":a.status==="blocked"?"var(--amber)":"var(--muted)";return e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,fontSize:11,padding:"3px 0"},children:[e.jsx("span",{style:{color:i},children:"●"}),e.jsx("span",{style:{minWidth:70},children:a.kind}),e.jsx("span",{style:{color:"var(--muted)"},children:a.status}),e.jsxs("span",{style:{color:"var(--muted)"},children:["attempt ",a.attempt||0,"/",a.maxAttempts||2]})]})}function F({data:a,lastUpdated:i}){const{jobs:l=[],featureFlags:b={}}=a||{},[n,o]=s.useState(""),[c,h]=s.useState("P2"),[p,u]=s.useState(""),[g,x]=s.useState(!1),[m,y]=s.useState(""),v=!b.jobs,d=s.useMemo(()=>[...l].sort((t,r)=>new Date(r.createdAt)-new Date(t.createdAt)),[l]);async function f(t){if(t.preventDefault(),!!n.trim()){x(!0),y("");try{await C({intent:n.trim(),priority:c,tags:p.split(",").map(r=>r.trim()).filter(Boolean)}),o(""),u("")}catch(r){y(r.message||"create_failed")}x(!1)}}async function j(t){try{await J(t)}catch{}}async function S(t){try{await N(t)}catch{}}return v?e.jsx("div",{className:"card",children:"Jobs feature is disabled. Enable `featureJobs` in plugin config."}):e.jsxs("div",{className:"fade-in",style:{display:"grid",gap:14},children:[e.jsxs("form",{onSubmit:f,className:"card",style:{display:"grid",gap:10},children:[e.jsx("div",{className:"section-title",children:"Create Job"}),e.jsx("input",{value:n,onChange:t=>o(t.target.value),placeholder:"High-level intent...",style:{width:"100%",background:"var(--bg3)",border:"1px solid var(--border)",borderRadius:6,color:"var(--text)",padding:"8px 10px",fontFamily:"inherit"}}),e.jsxs("div",{style:{display:"grid",gridTemplateColumns:"120px 1fr auto",gap:10},children:[e.jsxs("select",{value:c,onChange:t=>h(t.target.value),style:{background:"var(--bg3)",border:"1px solid var(--border)",borderRadius:6,color:"var(--text)",padding:"8px"},children:[e.jsx("option",{value:"P1",children:"P1"}),e.jsx("option",{value:"P2",children:"P2"}),e.jsx("option",{value:"P3",children:"P3"})]}),e.jsx("input",{value:p,onChange:t=>u(t.target.value),placeholder:"tags (comma separated)",style:{width:"100%",background:"var(--bg3)",border:"1px solid var(--border)",borderRadius:6,color:"var(--text)",padding:"8px 10px",fontFamily:"inherit"}}),e.jsx("button",{type:"submit",disabled:g,style:{background:"rgba(0,229,255,.15)",border:"1px solid rgba(0,229,255,.4)",color:"var(--cyan)",borderRadius:6,padding:"8px 12px",cursor:"pointer"},children:g?"...":"Create"})]}),m&&e.jsx("div",{style:{color:"var(--red)",fontSize:11},children:m})]}),e.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[e.jsxs("div",{className:"section-title",style:{marginBottom:0},children:["Jobs (",d.length,")"]}),e.jsx(k,{ts:i})]}),d.length===0&&e.jsx("div",{className:"card",style:{color:"var(--muted)"},children:"No jobs yet."}),d.map(t=>e.jsxs("div",{className:"card",style:{display:"grid",gap:8},children:[e.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[e.jsx("span",{style:{fontWeight:700},children:t.title}),e.jsx("span",{className:"badge badge-pending",style:{textTransform:"none"},children:t.status}),e.jsx("span",{style:{color:"var(--muted)",fontSize:10},children:t.id}),e.jsx("span",{style:{marginLeft:"auto",color:"var(--muted)",fontSize:11},children:new Date(t.createdAt).toLocaleString()})]}),e.jsx("div",{style:{color:"var(--muted)",fontSize:12},children:t.intent}),e.jsx("div",{style:{display:"grid",gap:2},children:(t.steps||[]).map(r=>e.jsx(R,{step:r},r.id))}),e.jsxs("div",{style:{display:"flex",gap:8},children:[e.jsx("button",{onClick:()=>j(t.id),disabled:["complete","failed","cancelled","blocked"].includes(t.status),style:{background:"rgba(255,23,68,.1)",border:"1px solid rgba(255,23,68,.35)",color:"var(--red)",borderRadius:5,padding:"5px 10px",cursor:"pointer",fontFamily:"inherit",fontSize:11},children:"Cancel"}),e.jsx("button",{onClick:()=>S(t.id),disabled:!["failed","blocked"].includes(t.status),style:{background:"rgba(0,230,118,.1)",border:"1px solid rgba(0,230,118,.35)",color:"var(--green)",borderRadius:5,padding:"5px 10px",cursor:"pointer",fontFamily:"inherit",fontSize:11},children:"Retry"})]})]},t.id))]})}export{F as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as n,a4 as a}from"./vendor-5MxLWm27.js";import{a as w,
|
|
1
|
+
import{r as n,a4 as a}from"./vendor-5MxLWm27.js";import{a as w,g as T}from"./index-B8eJ63U_.js";import{L as I}from"./LastUpdated-BVeFtHFH.js";function A({data:f,lastUpdated:y,toast:p}){const{shared_knowledge:i=[],agents:v=[]}=f||{},[g,j]=n.useState(""),[o,b]=n.useState("all"),[N,x]=n.useState(!1),[t,c]=n.useState({title:"",content:"",category:"general",tags:""}),[m,h]=n.useState(!1),S=async()=>{if(t.content.trim()){h(!0);try{const e={...t,tags:t.tags?t.tags.split(",").map(s=>s.trim()).filter(Boolean):[]};await w("/api/knowledge",e),p("Neural integration successful","success"),x(!1),c({title:"",content:"",category:"general",tags:""})}catch(e){p(e.message,"error")}h(!1)}},E=async e=>{if(confirm("Purge this neural entry?"))try{await T(`/api/knowledge/${e}`),p("Entry purged from archive","success")}catch(s){p(s.message,"error")}},C=n.useMemo(()=>{const e=new Set(i.map(s=>s.category||"general"));return["all",...Array.from(e).sort()]},[i]),u=n.useMemo(()=>i.filter(e=>{const s=o==="all"||(e.category||"general")===o,d=g.toLowerCase(),l=!d||(e.content||e.summary||"").toLowerCase().includes(d)||(e.title||"").toLowerCase().includes(d)||(e.tags||[]).some(r=>r.toLowerCase().includes(d));return s&&l}),[i,g,o]);return a.jsxs("div",{className:"fade-in",style:{display:"grid",gap:16},children:[a.jsxs("div",{style:{display:"flex",gap:12,alignItems:"center",flexWrap:"wrap"},children:[a.jsx("input",{className:"input-base",value:g,onChange:e=>j(e.target.value),placeholder:"QUERY NEURAL ARCHIVE...",style:{flex:1,minWidth:260,background:"rgba(0,0,0,0.2)",height:38}}),a.jsx("div",{style:{display:"flex",gap:6},children:C.map(e=>a.jsx("button",{onClick:()=>b(e),style:{background:o===e?"rgba(0,240,255,0.1)":"rgba(255,255,255,0.03)",border:`1px solid ${o===e?"rgba(0,240,255,0.4)":"var(--border)"}`,color:o===e?"var(--cyan)":"var(--muted)",padding:"6px 14px",borderRadius:6,fontSize:10,cursor:"pointer",fontFamily:"Rajdhani, sans-serif",fontWeight:700,letterSpacing:"0.05em",textTransform:"uppercase",transition:"all 0.2s"},children:e},e))}),a.jsx("button",{className:"btn-primary",style:{height:38},onClick:()=>x(e=>!e),children:"+ NEW ARCHIVE ENTRY"}),a.jsx("div",{style:{marginLeft:"auto"},children:a.jsx(I,{ts:y})})]}),N&&a.jsxs("div",{className:"card shadow-glow",style:{display:"grid",gap:10,border:"1px solid var(--border-h)"},children:[a.jsx("div",{className:"section-title",children:"INTEGRATE NEW NEURAL NODE"}),a.jsx("input",{className:"input-base",placeholder:"ENTRY TITLE (OPTIONAL)",value:t.title,onChange:e=>c(s=>({...s,title:e.target.value}))}),a.jsx("textarea",{className:"input-base",placeholder:"CORE CONTENT / INSIGHT *",value:t.content,onChange:e=>c(s=>({...s,content:e.target.value})),style:{minHeight:100,resize:"vertical",fontFamily:"JetBrains Mono, monospace"},maxLength:5e3}),a.jsxs("div",{style:{display:"flex",gap:10},children:[a.jsx("input",{className:"input-base",placeholder:"CATEGORY",value:t.category,onChange:e=>c(s=>({...s,category:e.target.value})),style:{flex:1}}),a.jsx("input",{className:"input-base",placeholder:"TAGS (SIGMA, DELTA...)",value:t.tags,onChange:e=>c(s=>({...s,tags:e.target.value})),style:{flex:2}})]}),a.jsxs("div",{style:{display:"flex",gap:10,justifyContent:"flex-end",marginTop:8},children:[a.jsx("button",{className:"btn-primary",onClick:S,disabled:m||!t.content.trim(),children:m?"PROCESSING...":"INITIALIZE UPLOAD"}),a.jsx("button",{className:"input-base",style:{cursor:"pointer",border:"1px solid transparent"},onClick:()=>x(!1),children:"ABORT"})]})]}),a.jsxs("div",{style:{fontSize:9,color:"var(--muted)",fontFamily:"Rajdhani, sans-serif",letterSpacing:"0.1em"},children:["INDEXED: ",u.length," / ",i.length," NODES",i.length===0&&" | SYSTEM SYMBOLIC SYNTHESIS PENDING"]}),a.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(400px, 1fr))",gap:16},children:u.map((e,s)=>{const d=v.find(r=>r.id===e.added_by||r.id===e.author),l=e.confidence??.85;return a.jsxs("div",{className:"card fade-in",style:{animationDelay:`${s*.05}s`,display:"flex",flexDirection:"column"},children:[a.jsxs("div",{style:{display:"flex",alignItems:"flex-start",gap:12,marginBottom:12},children:[a.jsxs("div",{style:{flex:1},children:[a.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:6},children:[a.jsx("span",{className:"badge badge-active",style:{fontSize:8},children:e.category||"GENERAL"}),e.title&&a.jsx("div",{style:{fontWeight:800,fontSize:14,color:"var(--text)",letterSpacing:"-0.01em"},children:e.title})]}),a.jsx("div",{style:{fontSize:13,color:"var(--text)",lineHeight:1.6,background:"rgba(0,0,0,0.15)",padding:12,borderRadius:8,border:"1px solid rgba(255,255,255,0.02)"},children:e.content||e.summary||e.insight||"—"})]}),e.id&&a.jsx("button",{className:"btn-danger",style:{opacity:.3},onClick:r=>{r.stopPropagation(),E(e.id)},children:"×"})]}),e.tags?.length>0&&a.jsx("div",{style:{display:"flex",gap:6,flexWrap:"wrap",marginBottom:16},children:e.tags.map(r=>a.jsx("span",{style:{fontSize:9,fontWeight:700,padding:"2px 8px",background:"rgba(181, 53, 255, 0.03)",color:"var(--purple)",border:"1px solid rgba(181, 53, 255, 0.15)",borderRadius:4,textTransform:"uppercase"},children:r},r))}),a.jsxs("div",{style:{marginTop:"auto",paddingTop:12,borderTop:"1px solid var(--border)",display:"grid",gridTemplateColumns:"1fr 1fr",gap:12},children:[a.jsxs("div",{style:{fontSize:10,color:"var(--muted)",display:"flex",flexDirection:"column",gap:4,fontFamily:"JetBrains Mono, monospace"},children:[a.jsxs("div",{style:{display:"flex",justifyContent:"space-between"},children:[a.jsx("span",{children:"AUTHOR:"}),a.jsx("span",{style:{color:"var(--cyan)"},children:d?.name.toUpperCase()||"SYSTEM"})]}),a.jsxs("div",{style:{display:"flex",justifyContent:"space-between"},children:[a.jsx("span",{children:"SIG:"}),a.jsx("span",{children:e.source_task||"—"})]})]}),a.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:4},children:[a.jsxs("div",{style:{display:"flex",justifyContent:"space-between",fontSize:9,fontWeight:700,color:"var(--muted)"},children:[a.jsx("span",{children:"CONFIDENCE"}),a.jsxs("span",{style:{color:l>.9?"var(--green)":"var(--amber)"},children:[(l*100).toFixed(0),"%"]})]}),a.jsx("div",{className:"progress-track",style:{height:4},children:a.jsx("div",{className:"progress-fill",style:{width:`${l*100}%`,background:l>.9?"var(--green)":"var(--amber)",boxShadow:l>.9?"0 0 8px var(--green)":"0 0 6px var(--amber)"}})})]})]})]},e.id||s)})})]})}export{A as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a4 as e}from"./vendor-5MxLWm27.js";import{L as y}from"./LastUpdated-BVeFtHFH.js";const j={healthy:"var(--mint)","at-risk":"var(--amber)",critical:"var(--red)",active:"var(--accent)",idle:"var(--muted)",hitl:"var(--purple)"};function T(t){const o=t._task_counts||{},r=t.target_completion?Math.ceil((new Date(t.target_completion)-Date.now())/864e5):999;return(o.blocked||0)>2||r<-3?"critical":(o.hitl||0)>0||r<0?"at-risk":"healthy"}function S(t,o,r){const l=o.filter(n=>(t.task_ids||[]).includes(n.id)),a=l.filter(n=>n.status==="complete").length,i=l.length,d=(t.team||[]).map(n=>r.find(c=>c.id===n)).filter(Boolean);return{...t,_task_counts:{total:i,done:a,active:l.filter(n=>n.status==="in-progress").length,blocked:l.filter(n=>n.status==="blocked").length,hitl:l.filter(n=>n.status==="needs_human_decision").length},_progress_pct:i>0?Math.round(a/i*100):0,_team_agents:d,_active_tasks:l.filter(n=>n.status==="in-progress")}}function C({project:t}){const o=T(t),r=j[o],l=t._progress_pct??0,a=t._task_counts||{};return e.jsxs("div",{className:"card fade-in",style:{padding:"16px",display:"flex",flexDirection:"column",gap:12},children:[e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"flex-start"},children:[e.jsxs("div",{style:{minWidth:0},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,marginBottom:2},children:[e.jsx("div",{style:{width:6,height:6,borderRadius:"50%",background:r}}),e.jsx("span",{style:{fontSize:"13px",fontWeight:700,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:t.id.toUpperCase()})]}),e.jsx("div",{style:{fontSize:"10px",color:"var(--muted)",fontFamily:"var(--font-mono)"},children:t.name.toUpperCase()})]}),e.jsxs("div",{style:{fontSize:"14px",fontWeight:800,fontFamily:"var(--font-mono)"},children:[l,"%"]})]}),e.jsx("div",{className:"progress-track",style:{height:"1px"},children:e.jsx("div",{className:"progress-fill",style:{width:`${l}%`,background:r}})}),e.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(4, 1fr)",gap:8},children:[{v:a.done,t:a.total,l:"DONE",c:"var(--mint)"},{v:a.active,l:"ACTV",c:"var(--accent)"},{v:a.hitl,l:"HITL",c:"var(--purple)"},{v:a.blocked,l:"BLOC",c:a.blocked?"var(--red)":"var(--muted)"}].map(i=>e.jsxs("div",{children:[e.jsx("div",{style:{fontSize:"11px",fontWeight:700,color:i.c,fontFamily:"var(--font-mono)"},children:i.t!=null?`${i.v}/${i.t}`:i.v}),e.jsx("div",{style:{fontSize:"7px",color:"var(--muted)",fontWeight:800},children:i.l})]},i.l))}),t._team_agents?.length>0&&e.jsx("div",{style:{display:"flex",gap:4,marginTop:"auto",paddingTop:8,borderTop:"1px solid var(--border-light)"},children:t._team_agents.slice(0,5).map(i=>e.jsx("span",{title:i.name,style:{fontSize:"12px"},children:i.emoji||"🤖"},i.id))})]})}function _({agent:t,tasks:o,projects:r}){const l=o.filter(c=>c.assigned_to===t.id),a=l.find(c=>c.status==="in-progress"),i=l.find(c=>c.status==="needs_human_decision"),d=t.heartbeat_age_minutes??999;t.status;const n=d<5?"var(--mint)":d<15?"var(--amber)":"var(--red)";return e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12,padding:"8px 12px",borderBottom:"1px solid var(--border-light)",transition:"background 0.2s"},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,minWidth:"120px"},children:[e.jsx("span",{style:{fontSize:"14px"},children:t.emoji||"🤖"}),e.jsxs("div",{style:{minWidth:0},children:[e.jsx("div",{style:{fontSize:"11px",fontWeight:700,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:t.name.toUpperCase()}),e.jsxs("div",{style:{fontSize:"8px",color:"var(--muted)",fontFamily:"var(--font-mono)"},children:["STATUS: ",t.status?.toUpperCase()]})]})]}),e.jsx("div",{style:{flex:1,minWidth:0},children:i?e.jsxs("div",{style:{fontSize:"10px",color:"var(--purple)",fontWeight:700,fontFamily:"var(--font-mono)"},children:["[!] HITL: ",i.title.toUpperCase()]}):a?e.jsx("div",{style:{fontSize:"10px",color:"var(--accent)",fontFamily:"var(--font-mono)"},children:`> ${a.title.toUpperCase()}`}):e.jsx("div",{style:{fontSize:"9px",color:"var(--muted)",fontFamily:"var(--font-mono)"},children:"IDLE"})}),e.jsxs("div",{style:{width:"40px",textAlign:"center"},children:[e.jsx("div",{style:{fontSize:"12px",fontWeight:700,fontFamily:"var(--font-mono)"},children:t.tasks_completed??0}),e.jsx("div",{style:{fontSize:"7px",color:"var(--muted)"},children:"CYCLES"})]}),e.jsx("div",{style:{width:"40px",textAlign:"right",fontSize:"10px",fontWeight:700,color:n,fontFamily:"var(--font-mono)"},children:d<999?`${d}m`:"--"})]})}function k({data:t,lastUpdated:o}){const{agents:r=[],tasks:l=[],task_counts:a={},projects:i=[],budget:d={},broadcast:n="",crons:c=[],alerts:E=[]}=t||{},x=i.map(s=>S(s,l,r)),p=x.filter(s=>["active","ACTIVE"].includes(s.status)),m=d.current?.daily_usd??0,h=d.limits?.daily_usd??1,v=(n||"").split(`
|
|
2
|
+
`).filter(s=>s.trim()).slice(-5);return e.jsxs("div",{className:"fade-in",style:{display:"flex",flexDirection:"column",gap:24},children:[e.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(4, 1fr)",gap:16},children:[e.jsxs("div",{className:"card",style:{padding:"12px 16px"},children:[e.jsx("div",{className:"section-title",children:"ACTIVE PROJECTS"}),e.jsx("div",{style:{fontSize:"24px",fontWeight:800,fontFamily:"var(--font-mono)"},children:p.length}),e.jsxs("div",{style:{fontSize:"10px",color:"var(--muted)",marginTop:4},children:["OF ",x.length," TOTAL IN MATRIX"]})]}),e.jsxs("div",{className:"card",style:{padding:"12px 16px"},children:[e.jsx("div",{className:"section-title",children:"FLEET CAPACITY"}),e.jsxs("div",{style:{fontSize:"24px",fontWeight:800,fontFamily:"var(--font-mono)"},children:[r.filter(s=>s.status==="active").length,e.jsxs("span",{style:{color:"var(--muted)",fontSize:"16px"},children:["/",r.length]})]}),e.jsx("div",{style:{fontSize:"10px",color:"var(--muted)",marginTop:4},children:"AGENTS DEPLOYED"})]}),e.jsxs("div",{className:"card",style:{padding:"12px 16px"},children:[e.jsx("div",{className:"section-title",children:"RESOURCE SPEND"}),e.jsxs("div",{style:{fontSize:"24px",fontWeight:800,fontFamily:"var(--font-mono)"},children:["$",m.toFixed(2),e.jsxs("span",{style:{color:"var(--muted)",fontSize:"14px"},children:["/$",h]})]}),e.jsx("div",{className:"progress-track",style:{height:"2px",marginTop:8},children:e.jsx("div",{className:"progress-fill",style:{width:`${Math.min(100,m/h*100)}%`}})})]}),e.jsxs("div",{className:"card",style:{padding:"12px 16px",display:"flex",flexDirection:"column",justifyContent:"center"},children:[e.jsx(y,{ts:o}),e.jsx("div",{style:{fontSize:"10px",color:"var(--muted)",marginTop:4},children:"NEXT SYNC: ~60s"})]})]}),e.jsxs("div",{children:[e.jsx("div",{className:"section-title",children:"STRATEGIC PROJECT MATRIX"}),p.length>0?e.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(280px, 1fr))",gap:16},children:p.map(s=>e.jsx(C,{project:s},s.id))}):e.jsx("div",{className:"card",style:{padding:"40px",textAlign:"center",color:"var(--muted)",fontSize:"11px",fontFamily:"var(--font-mono)"},children:"NO ACTIVE PROJECTS IN MATRIX"})]}),e.jsxs("div",{style:{display:"grid",gridTemplateColumns:"minmax(0, 1.5fr) minmax(0, 1fr)",gap:24},children:[e.jsxs("div",{children:[e.jsx("div",{className:"section-title",children:"FLEET PULSE"}),e.jsx("div",{className:"card",style:{padding:0},children:r.length>0?r.map(s=>e.jsx(_,{agent:s,tasks:l,projects:i},s.id)):e.jsx("div",{style:{padding:"24px",textAlign:"center",color:"var(--muted)",fontSize:"11px"},children:"NO AGENTS FOUND"})})]}),e.jsxs("div",{children:[e.jsx("div",{className:"section-title",children:"SYSTEM EVENT STREAM"}),e.jsxs("div",{style:{background:"#000",border:"1px solid var(--border)",padding:"16px",borderRadius:"var(--radius)",height:"100%",display:"flex",flexDirection:"column",gap:8,fontFamily:"var(--font-mono)",minHeight:"260px"},children:[v.length>0?v.map((s,f)=>{const g=s.toUpperCase().includes("CRITICAL")||s.toUpperCase().includes("FAILED"),u=s.toUpperCase().includes("HITL");return e.jsxs("div",{style:{fontSize:"10px",display:"flex",gap:12},children:[e.jsxs("span",{style:{color:"var(--muted)",flexShrink:0},children:["[",new Date().toLocaleTimeString([],{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"}),"]"]}),e.jsx("span",{style:{color:g?"var(--red)":u?"var(--purple)":"var(--text-dim)",wordBreak:"break-all"},children:s.toUpperCase()})]},f)}):e.jsx("div",{style:{color:"var(--muted)",fontSize:"10px"},children:"// AWAITING FEED..."}),e.jsx("div",{style:{marginTop:"auto",borderTop:"1px solid var(--border-light)",paddingTop:8,fontSize:"9px",color:"var(--accent)",animation:"pulse 2s infinite"},children:"● LIVE_FEED_STATUS: NOMINAL"})]})]})]})]})}export{k as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as m,a4 as e}from"./vendor-5MxLWm27.js";import{L as B}from"./LastUpdated-BVeFtHFH.js";import{l as P,s as F}from"./index-B8eJ63U_.js";import{R as H,L as $,C as G,X as Y,Y as K,T as V,a as X,b as N,c as J}from"./charts-BrUY2WWl.js";const O={active:"var(--accent)",complete:"var(--mint)",paused:"var(--amber)",archived:"var(--muted)",pending:"var(--muted)"},A={green:"var(--mint)",amber:"var(--amber)",red:"var(--red)"},Q={background:"#050505",border:"1px solid rgba(255, 255, 255, 0.1)",borderRadius:"2px",fontSize:"10px",color:"#fff",fontFamily:"var(--font-mono)",padding:"8px 12px"};function E(t){if(!t)return"—";try{const r=Math.round((Date.now()-new Date(t))/6e4);return r<1?"JUST NOW":r<60?`${r}M AGO`:r<1440?`${Math.round(r/60)}H AGO`:`${Math.round(r/1440)}D AGO`}catch{return t}}function Z(t,r){if(!t)return null;try{const a=Math.ceil((new Date(t)-Date.now())/864e5);return a<0?{label:`${Math.abs(a)}D OVERDUE`,color:"var(--red)"}:a===0?{label:"DUE TODAY",color:"var(--amber)"}:a===1?{label:"DUE TOMORROW",color:"var(--amber)"}:{label:`IN ${a}D`,color:"var(--muted)"}}catch{return{label:t,color:"var(--muted)"}}}function C(t){const r=(t._risks||[]).filter(p=>!p.resolved),a=t._progress_pct??0,o=t.target_completion?Math.ceil((new Date(t.target_completion)-Date.now())/864e5):999,i=t._task_counts||{};return r.some(p=>p.severity==="critical")||(i.blocked||0)>2||o<-3?"red":r.length>1||(i.hitl||0)>0||o<0||a<30?"amber":"green"}function D({label:t,color:r,size:a=9}){return e.jsx("span",{style:{fontSize:`${a}px`,padding:"2px 8px",borderRadius:"2px",fontWeight:800,textTransform:"uppercase",color:r,background:"rgba(255, 255, 255, 0.03)",border:`1px solid ${r}`,fontFamily:"var(--font-mono)"},children:t})}function w({pct:t,size:r=56,color:a="var(--accent)"}){const o=(r-8)/2,i=2*Math.PI*o,p=i*(t/100);return e.jsxs("div",{style:{position:"relative",width:r,height:r,flexShrink:0},children:[e.jsxs("svg",{width:r,height:r,style:{transform:"rotate(-90deg)"},children:[e.jsx("circle",{cx:r/2,cy:r/2,r:o,fill:"none",stroke:"rgba(255,255,255,.05)",strokeWidth:4}),e.jsx("circle",{cx:r/2,cy:r/2,r:o,fill:"none",stroke:a,strokeWidth:4,strokeDasharray:`${p} ${i}`,strokeLinecap:"square",style:{transition:"stroke-dasharray .8s cubic-bezier(0.4, 0, 0.2, 1)"}})]}),e.jsxs("div",{style:{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center",fontSize:r*.22,fontWeight:800,color:a,fontFamily:"var(--font-mono)"},children:[t,"%"]})]})}function L({agentId:t,agents:r,isOwner:a}){const o=r.find(i=>i.id===t);return e.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:6,fontSize:"9px",padding:"3px 8px",borderRadius:"2px",background:a?"rgba(37, 175, 244, 0.05)":"rgba(255,255,255,0.02)",border:`1px solid ${a?"var(--accent)":"var(--border)"}`,color:a?"var(--accent)":"var(--muted)",fontFamily:"var(--font-mono)",fontWeight:700},children:[e.jsx("span",{style:{fontSize:"12px"},children:o?.emoji||"🤖"}),e.jsx("span",{children:(o?.name||t).toUpperCase()})]})}function U({health:t}){return e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6},children:[e.jsx("div",{style:{width:8,height:8,borderRadius:"50%",background:A[t]}}),e.jsx("span",{style:{fontSize:"9px",fontWeight:800,color:A[t],fontFamily:"var(--font-mono)"},children:t.toUpperCase()})]})}function W({iso:t}){const r=Z(t,!1);return r?e.jsxs("span",{style:{fontSize:"10px",color:r.color,fontWeight:700,fontFamily:"var(--font-mono)"},children:["[",r.label,"]"]}):null}function q({project:t}){const r=t.milestones||[];if(!r.length)return e.jsx("div",{style:{fontSize:"11px",color:"var(--muted)",padding:"20px",textAlign:"center",border:"1px solid var(--border)",borderRadius:"2px"},children:"NO MILESTONES DEFINED"});const a=new Date(t.created_at||Date.now()),o=new Date(t.target_completion||Date.now()+30*864e5),i=Math.max(1,o-a),p=Math.max(0,Math.min(100,(Date.now()-a)/i*100)),f={complete:"var(--mint)","in-progress":"var(--accent)",pending:"rgba(255,255,255,0.05)",blocked:"var(--red)"};return e.jsxs("div",{style:{position:"relative",paddingTop:"12px"},children:[e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",fontSize:"9px",color:"var(--muted)",marginBottom:"16px",fontFamily:"var(--font-mono)",fontWeight:700},children:[e.jsxs("span",{children:["T_START: ",a.toLocaleDateString().toUpperCase()]}),e.jsx("span",{style:{color:"var(--amber)"},children:"NOW"}),e.jsxs("span",{children:["T_END: ",o.toLocaleDateString().toUpperCase()]})]}),e.jsxs("div",{style:{position:"relative",background:"#000",border:"1px solid var(--border)",padding:"20px 0"},children:[e.jsx("div",{style:{position:"absolute",left:`${p}%`,top:0,bottom:0,width:"1px",background:"var(--amber)",zIndex:2}}),r.map(x=>{const u=x.due?new Date(x.due):o,h=Math.max(4,Math.min(100,(u-a)/i*100)),d=x.status==="complete";return e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:16,marginBottom:"12px",padding:"0 20px"},children:[e.jsx("div",{style:{fontSize:"11px",color:d?"var(--muted)":"#fff",width:"140px",flexShrink:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontWeight:600},children:x.title.toUpperCase()}),e.jsx("div",{style:{flex:1,position:"relative",height:"8px",background:"rgba(255,255,255,0.03)",borderRadius:"1px"},children:e.jsx("div",{style:{position:"absolute",left:0,width:`${h}%`,height:"100%",background:f[x.status]||"rgba(255,255,255,0.05)",transition:"width 1s cubic-bezier(0.4, 0, 0.2, 1)"}})}),e.jsx("div",{style:{fontSize:"9px",color:"var(--muted)",width:"60px",flexShrink:0,textAlign:"right",fontFamily:"var(--font-mono)"},children:x.due?new Date(x.due).toLocaleDateString("en",{month:"short",day:"numeric"}).toUpperCase():"--"})]},x.id)})]})]})}function ee({project:t,tasks:r}){const a=r.filter(d=>(t.task_ids||[]).includes(d.id)),o=a.length;if(!o)return e.jsx("div",{style:{fontSize:"11px",color:"var(--muted)",padding:"20px",textAlign:"center",border:"1px solid var(--border)"},children:"INDEX_EMPTY // NO TASKS"});const i=new Date(t.created_at||Date.now()),p=new Date(t.target_completion||Date.now()+7*864e5),f=Math.max(1,Math.ceil((p-i)/864e5)),x=a.filter(d=>d.completed_at).map(d=>Math.max(0,Math.ceil((new Date(d.completed_at)-i)/864e5))).sort((d,y)=>d-y),u=Math.ceil((Date.now()-i)/864e5),h=Array.from({length:f+1},(d,y)=>({day:y,ideal:Math.round(o-o/f*y),actual:y<=u?o-x.filter(c=>c<=y).length:void 0}));return e.jsx(H,{width:"100%",height:240,children:e.jsxs($,{data:h,margin:{top:10,right:30,left:0,bottom:10},children:[e.jsx(G,{strokeDasharray:"2 2",stroke:"rgba(255,255,255,0.05)",vertical:!1}),e.jsx(Y,{dataKey:"day",axisLine:!1,tickLine:!1,tick:{fontSize:9,fill:"var(--muted)",fontFamily:"var(--font-mono)"}}),e.jsx(K,{axisLine:!1,tickLine:!1,tick:{fontSize:9,fill:"var(--muted)",fontFamily:"var(--font-mono)"},orientation:"right"}),e.jsx(V,{contentStyle:Q}),e.jsx(X,{verticalAlign:"top",height:36,iconType:"rect",wrapperStyle:{fontSize:"9px",fontFamily:"var(--font-mono)"}}),e.jsx(N,{type:"stepAfter",dataKey:"ideal",stroke:"rgba(255,255,255,0.1)",strokeDasharray:"4 4",dot:!1,name:"IDEAL"}),e.jsx(N,{type:"stepAfter",dataKey:"actual",stroke:"var(--accent)",strokeWidth:2,dot:{r:2,fill:"var(--accent)"},name:"ACTUAL"}),e.jsx(J,{x:u,stroke:"var(--amber)",strokeDasharray:"2 2"})]})})}function te({project:t}){const r=t.budget?.allocated_usd||0,a=t.budget?.spent_usd||0,o=r?Math.round(a/r*100):0,i=o>90?"var(--red)":o>75?"var(--amber)":"var(--accent)";return e.jsxs("div",{className:"card",style:{padding:"20px"},children:[e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",marginBottom:"16px"},children:[e.jsxs("div",{children:[e.jsx("div",{className:"section-title",children:"BUDGET EXPENDITURE"}),e.jsxs("div",{style:{fontSize:"24px",fontWeight:800,color:i,fontFamily:"var(--font-mono)"},children:["$",a.toFixed(2)," ",e.jsxs("span",{style:{fontSize:"14px",color:"var(--muted)",fontWeight:400},children:["/ $",r.toFixed(2)]})]})]}),e.jsxs("div",{style:{textAlign:"right"},children:[e.jsx("div",{style:{fontSize:"10px",color:"var(--muted)",fontWeight:800},children:"UTILIZATION"}),e.jsxs("div",{style:{fontSize:"18px",fontWeight:800,color:i,fontFamily:"var(--font-mono)"},children:[o,"%"]})]})]}),e.jsx("div",{className:"progress-track",style:{height:"4px"},children:e.jsx("div",{className:"progress-fill",style:{width:`${Math.min(100,o)}%`,background:i}})}),o>80&&e.jsx("div",{style:{marginTop:"16px",fontSize:"10px",color:"var(--red)",fontWeight:700,fontFamily:"var(--font-mono)"},children:"[!] CRITICAL_BURN_DETECTED: PROJECT_RUN_RATE_EXCEEDS_THRESHOLD"})]})}function ne({project:t,agents:r,selected:a,onClick:o}){const i=t._task_counts||{},p=t._progress_pct??0,f=(t._risks||[]).filter(h=>!h.resolved),x=C(t),u=p===100?"var(--mint)":f.length?"var(--red)":"var(--accent)";return e.jsxs("div",{onClick:o,className:"card fade-in",style:{cursor:"pointer",padding:"20px",transition:"background 0.2s",borderColor:a?"var(--accent)":"var(--border)",background:a?"rgba(37, 175, 244, 0.03)":"#0a0a0a"},children:[e.jsxs("div",{style:{display:"flex",gap:16,marginBottom:"20px"},children:[e.jsx(w,{pct:p,size:52,color:u}),e.jsxs("div",{style:{flex:1,minWidth:0},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,marginBottom:"4px"},children:[e.jsx("span",{style:{fontWeight:800,fontSize:"15px",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:t.name.toUpperCase()}),e.jsx(U,{health:x})]}),e.jsxs("div",{style:{fontSize:"9px",color:"var(--muted)",fontFamily:"var(--font-mono)"},children:[t.id," // STATUS: ",t.status.toUpperCase()]})]})]}),e.jsx("div",{style:{fontSize:"12px",color:"var(--muted)",lineHeight:1.5,marginBottom:"20px",height:"36px",overflow:"hidden"},children:t.description}),e.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(4, 1fr)",gap:8,marginBottom:"20px"},children:[{l:"CYCLES",v:`${i.done||0}/${i.total||0}`,c:"var(--accent)"},{l:"HITL",v:i.hitl||0,c:i.hitl?"var(--purple)":"var(--muted)"},{l:"BLOCKED",v:i.blocked||0,c:i.blocked?"var(--red)":"var(--muted)"},{l:"SPEND",v:`$${(t.budget?.spent_usd??0).toFixed(0)}`,c:"#fff"}].map(h=>e.jsxs("div",{children:[e.jsx("div",{style:{fontSize:"8px",color:"var(--muted)",fontWeight:800,marginBottom:"2px"},children:h.l}),e.jsx("div",{style:{fontSize:"11px",fontWeight:700,color:h.c,fontFamily:"var(--font-mono)"},children:h.v})]},h.l))}),e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[e.jsx(L,{agentId:t.owner,agents:r,isOwner:!0}),e.jsx(W,{iso:t.target_completion})]}),f.length>0&&e.jsxs("div",{style:{marginTop:"16px",fontSize:"9px",color:"var(--red)",fontWeight:800,fontFamily:"var(--font-mono)"},children:["! ",f.length," THREATS DETECTED"]})]})}const re=["OVERVIEW","TIMELINE","TASKS","RESOURCES","OKRS","LOGS"];function ae({project:t,agents:r,tasks:a,okrs:o,onClose:i,onReplan:p,onExecute:f,onSaveBudget:x,onSaveOkr:u,lastUpdated:h}){const[d,y]=m.useState("OVERVIEW");t._task_counts;const c=t._progress_pct??0,S=(t._risks||[]).filter(s=>!s.resolved),k=C(t),I=c===100?"var(--mint)":S.length?"var(--red)":"var(--accent)";return e.jsxs("div",{className:"fade-in",style:{border:"1px solid var(--border)",background:"#050505",marginBottom:"32px"},children:[e.jsxs("div",{style:{padding:"30px",borderBottom:"1px solid var(--border)",display:"flex",gap:30,alignItems:"flex-start"},children:[e.jsx(w,{pct:c,size:90,color:I}),e.jsxs("div",{style:{flex:1},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:16,marginBottom:"8px"},children:[e.jsx("span",{style:{fontSize:"28px",fontWeight:800},children:t.name.toUpperCase()}),e.jsx(D,{label:t.status,color:O[t.status]}),e.jsx(U,{health:k})]}),e.jsx("div",{style:{fontSize:"13px",color:"var(--muted)",lineHeight:1.6,marginBottom:"16px",maxWidth:"800px"},children:t.description}),e.jsxs("div",{style:{display:"flex",gap:20,alignItems:"center"},children:[e.jsx(L,{agentId:t.owner,agents:r,isOwner:!0}),e.jsx(W,{iso:t.target_completion}),e.jsx("div",{style:{display:"flex",gap:8},children:(t.tags||[]).map(s=>e.jsx(D,{label:s,color:"var(--accent)",size:8},s))})]})]}),e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:8,width:"160px"},children:[e.jsx("button",{className:"btn-primary",onClick:()=>f?.(t.id),style:{padding:"10px"},children:"EXECUTE_NOW"}),e.jsx("button",{className:"btn-secondary",onClick:()=>p?.(t.id),style:{padding:"10px"},children:"REPLAN"}),e.jsx("button",{className:"btn-secondary",onClick:i,style:{padding:"10px"},children:"EXIT_DETAIL"})]})]}),e.jsx("div",{style:{display:"flex",background:"rgba(255,255,255,0.02)",borderBottom:"1px solid var(--border)",padding:"0 30px"},children:re.map(s=>{const g=d===s;return e.jsx("button",{onClick:()=>y(s),style:{background:"none",border:"none",cursor:"pointer",padding:"16px 20px",fontSize:"11px",fontWeight:800,color:g?"#fff":"var(--muted)",borderBottom:g?"2px solid var(--accent)":"2px solid transparent",transition:"all 0.2s",fontFamily:"var(--font-mono)"},children:s},s)})}),e.jsxs("div",{style:{padding:"30px",minHeight:"400px"},children:[d==="OVERVIEW"&&e.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1.2fr 1fr",gap:40},children:[e.jsxs("div",{children:[e.jsx("div",{className:"section-title",children:"PHASE_TRAJECTORY"}),e.jsx(q,{project:t}),e.jsx("div",{className:"section-title",style:{marginTop:"40px"},children:"THREAT_MATRIX"}),S.length>0?S.map(s=>e.jsxs("div",{style:{padding:"12px",border:"1px solid var(--red)",borderLeftWidth:"4px",marginBottom:"12px",background:"rgba(255,42,85,0.03)"},children:[e.jsx("div",{style:{fontSize:"11px",fontWeight:700,color:"#fff"},children:s.description.toUpperCase()}),e.jsxs("div",{style:{fontSize:"9px",color:"var(--red)",fontWeight:800,marginTop:"4px",fontFamily:"var(--font-mono)"},children:["SEVERITY: ",s.severity.toUpperCase()," // DETECTED: ",E(s.detected_at)]})]},s.id)):e.jsx("div",{style:{padding:"20px",border:"1px solid var(--border)",color:"var(--mint)",fontSize:"11px",fontFamily:"var(--font-mono)"},children:"[OK] NO_THREATS_DETECTED"})]}),e.jsxs("div",{children:[e.jsx("div",{className:"section-title",children:"EVENT_LOG_STREAM"}),e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:12},children:(t._activity||[]).slice(0,10).map((s,g)=>e.jsxs("div",{style:{display:"flex",gap:12,fontSize:"11px"},children:[e.jsxs("span",{style:{color:"var(--muted)",flexShrink:0,fontFamily:"var(--font-mono)"},children:["[",E(s.ts),"]"]}),e.jsx("span",{style:{color:"#fff",fontWeight:500},children:s.text.toUpperCase()})]},g))})]})]}),d==="TIMELINE"&&e.jsx(ee,{project:t,tasks:a}),d==="TASKS"&&e.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(4, 1fr)",gap:20},children:["in-progress","blocked","needs_human_decision","complete"].map(s=>{const g=a.filter(l=>(t.task_ids||[]).includes(l.id)&&l.status===s);return e.jsxs("div",{children:[e.jsxs("div",{className:"section-title",style:{color:s==="blocked"?"var(--red)":s==="complete"?"var(--mint)":"var(--accent)"},children:[s.toUpperCase().replace(/_/g," ")," (",g.length,")"]}),g.map(l=>e.jsxs("div",{style:{padding:"10px",background:"rgba(255,255,255,0.02)",border:"1px solid var(--border)",marginBottom:"8px",borderRadius:"2px"},children:[e.jsx("div",{style:{fontSize:"11px",fontWeight:600},children:l.title.toUpperCase()}),e.jsx("div",{style:{fontSize:"8px",color:"var(--muted)",marginTop:"4px",fontFamily:"var(--font-mono)"},children:l.id})]},l.id))]},s)})}),d==="RESOURCES"&&e.jsx(te,{project:t}),d==="LOGS"&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8,fontFamily:"var(--font-mono)",fontSize:"11px"},children:(t._sessions||[]).map((s,g)=>e.jsxs("div",{style:{display:"flex",gap:20,padding:"8px",borderBottom:"1px solid var(--border-light)"},children:[e.jsx("span",{style:{color:"var(--accent)",minWidth:"80px"},children:s.proc_id||"--"}),e.jsx("span",{style:{flex:1},children:s.task_id}),e.jsx("span",{style:{color:s.status==="failed"?"var(--red)":"var(--mint)"},children:s.status?.toUpperCase()}),e.jsx("span",{style:{color:"var(--muted)"},children:E(s.completed_at)})]},g))})]})]})}function de({data:t,lastUpdated:r,toast:a}){const{agents:o=[],tasks:i=[],okrs:p={}}=t||{},[f,x]=m.useState([]),[u,h]=m.useState(null),[d,y]=m.useState(!0),[c,S]=m.useState({status:"all",search:"",health:"all"}),[k,I]=m.useState("priority"),[s,g]=m.useState(!1),[l,j]=m.useState({title:"",intent:"",description:"",priority:"P2",tags:"",project_hint:"",deadline:"",budget_usd:""}),_=m.useCallback(async()=>{try{const n=await P();x(n.projects||[])}catch{x([])}finally{y(!1)}},[]);m.useEffect(()=>{_()},[_]);const z=async()=>{if(!(!l.intent.trim()&&!l.title.trim())){g(!0);try{const n=await F({...l,tags:l.tags.split(",").map(v=>v.trim()).filter(Boolean)});await _(),j({title:"",intent:"",description:"",priority:"P2",tags:"",project_hint:"",deadline:"",budget_usd:""}),a?.(`Task routed: ${n.projectId}`,"success")}catch(n){a?.(n.message,"error")}finally{g(!1)}}},T=m.useMemo(()=>f.map(n=>{const v=i.filter(b=>(n.task_ids||[]).includes(b.id)),R=v.filter(b=>b.status==="complete").length;return{...n,_task_counts:{total:v.length,done:R,active:v.filter(b=>b.status==="in-progress").length,blocked:v.filter(b=>b.status==="blocked").length,hitl:v.filter(b=>b.status==="needs_human_decision").length},_progress_pct:v.length>0?Math.round(R/v.length*100):0,_risks:n._risks||[],_activity:n._activity||[]}}),[f,i]),M=m.useMemo(()=>T.filter(n=>!(c.status!=="all"&&n.status!==c.status||c.health!=="all"&&C(n)!==c.health||c.search&&!n.name.toLowerCase().includes(c.search.toLowerCase()))).sort((n,v)=>(v.priority_weight||0)-(n.priority_weight||0)),[T,c]);return d?e.jsx("div",{style:{padding:"40px",textAlign:"center",color:"var(--accent)",fontFamily:"var(--font-mono)"},children:"SYNCHRONIZING_MATRIX..."}):e.jsxs("div",{className:"fade-in",children:[e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"flex-end",marginBottom:"32px"},children:[e.jsxs("div",{children:[e.jsx("h1",{style:{margin:0,fontSize:"32px",fontWeight:800},children:"STRATEGIC_COMMAND"}),e.jsxs("div",{style:{fontSize:"10px",color:"var(--muted)",marginTop:"4px",fontFamily:"var(--font-mono)"},children:["STATUS: NOMINAL // PROJECTS: ",T.length]})]}),e.jsxs("div",{style:{display:"flex",gap:24,padding:"12px 24px",border:"1px solid var(--border)",background:"rgba(255,255,255,0.02)"},children:[e.jsxs("div",{children:[e.jsx("div",{className:"section-title",style:{fontSize:"8px"},children:"AVG_HEALTH_SCORE"}),e.jsx("div",{style:{fontSize:"18px",fontWeight:800,color:"var(--mint)"},children:"OPTIMAL"})]}),e.jsxs("div",{children:[e.jsx("div",{className:"section-title",style:{fontSize:"8px"},children:"ACTIVE_PIPELINES"}),e.jsx("div",{style:{fontSize:"18px",fontWeight:800,color:"var(--accent)"},children:T.filter(n=>n.status==="active").length})]})]})]}),e.jsxs("div",{className:"card",style:{marginBottom:"32px",padding:"24px",background:"rgba(37, 175, 244, 0.03)",borderColor:"var(--accent)"},children:[e.jsx("div",{className:"section-title",style:{color:"var(--accent)"},children:"AUTONOMOUS_INTAKE_PORTAL"}),e.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(4, 1fr)",gap:12,marginBottom:"12px"},children:[e.jsx("input",{className:"input-base",placeholder:"TASK_TITLE",value:l.title,onChange:n=>j({...l,title:n.target.value})}),e.jsx("input",{className:"input-base",placeholder:"PRIMARY_INTENT (REQUIRED)",value:l.intent,onChange:n=>j({...l,intent:n.target.value})}),e.jsxs("select",{className:"input-base",value:l.priority,onChange:n=>j({...l,priority:n.target.value}),children:[e.jsx("option",{value:"P1",children:"P1_PRIORITY"}),e.jsx("option",{value:"P2",children:"P2_PRIORITY"}),e.jsx("option",{value:"P3",children:"P3_PRIORITY"})]}),e.jsx("input",{className:"input-base",placeholder:"PROJECT_HINT",value:l.project_hint,onChange:n=>j({...l,project_hint:n.target.value})})]}),e.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr 1fr 1fr 120px",gap:12},children:[e.jsx("input",{className:"input-base",placeholder:"CONCURRENT_CONSTRAINTS",value:l.description,onChange:n=>j({...l,description:n.target.value})}),e.jsx("input",{className:"input-base",placeholder:"TAG_ARRAY (CSV)",value:l.tags,onChange:n=>j({...l,tags:n.target.value})}),e.jsx("input",{className:"input-base",type:"date",value:l.deadline,onChange:n=>j({...l,deadline:n.target.value})}),e.jsx("input",{className:"input-base",type:"number",placeholder:"BUDGET_ALLOWANCE",value:l.budget_usd,onChange:n=>j({...l,budget_usd:n.target.value})}),e.jsx("button",{className:"btn-primary",onClick:z,disabled:s||!l.intent.trim(),children:"PROCESS"})]})]}),e.jsxs("div",{className:"card",style:{display:"flex",gap:16,padding:"16px 24px",marginBottom:"32px",alignItems:"center",background:"rgba(255,255,255,0.02)"},children:[e.jsx("input",{className:"input-base",style:{flex:1},placeholder:"FILTER_PROJECT_INDEX...",value:c.search,onChange:n=>S({...c,search:n.target.value})}),e.jsxs("select",{className:"input-base",style:{width:"160px"},value:c.status,onChange:n=>S({...c,status:n.target.value}),children:[e.jsx("option",{value:"all",children:"ALL_STATUS"}),Object.keys(O).map(n=>e.jsx("option",{value:n,children:n.toUpperCase()},n))]}),e.jsxs("select",{className:"input-base",style:{width:"160px"},value:c.health,onChange:n=>S({...c,health:n.target.value}),children:[e.jsx("option",{value:"all",children:"ALL_HEALTH"}),e.jsx("option",{value:"healthy",children:"HEALTHY_STABLE"}),e.jsx("option",{value:"at-risk",children:"AT_RISK"}),e.jsx("option",{value:"critical",children:"CRITICAL_FAIL"})]}),e.jsx(B,{ts:r})]}),T.find(n=>n.id===u)&&e.jsx(ae,{project:T.find(n=>n.id===u),agents:o,tasks:i,okrs:p,lastUpdated:r,onReplan:handleReplan,onExecute:handleExecute,onSaveBudget:handleBudgetQuickSave,onSaveOkr:handleOkrQuickSave,onClose:()=>h(null)}),e.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(360px, 1fr))",gap:24,opacity:u?.4:1,transition:"opacity 0.3s"},children:M.map(n=>e.jsx(ne,{project:n,agents:o,selected:u===n.id,onClick:()=>h(n.id)},n.id))})]})}export{de as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as a,a4 as e}from"./vendor-5MxLWm27.js";function j({data:n,toast:c}){const[t,l]=a.useState(null),[x,g]=a.useState(!1),[s,d]=a.useState(!1),[u,p]=a.useState(null);a.useEffect(()=>{fetch("/api/session").then(r=>r.json()).then(r=>p(r.csrfToken)).catch(()=>{})},[]),a.useEffect(()=>{n?.project_defaults&&l(n.project_defaults)},[n]);const o=(r,i)=>{l(f=>({...f,[r]:i}))},h=async()=>{if(!(!u||!t)){d(!0);try{const r=await fetch("/api/projects/defaults",{method:"PATCH",headers:{"content-type":"application/json","x-agi-farm-csrf":u},body:JSON.stringify(t)}),i=await r.json();r.ok&&i.ok?c?.show?.("Defaults saved",{type:"success"}):c?.show?.(i.error||"Save failed",{type:"error"})}catch(r){c?.show?.(r.message||"Save failed",{type:"error"})}finally{d(!1)}}};return t?e.jsx("div",{children:e.jsxs("div",{className:"card",style:{marginBottom:16},children:[e.jsx("h2",{style:{margin:"0 0 12px 0"},children:"Project Defaults"}),e.jsx("p",{style:{color:"var(--muted)",margin:"0 0 16px 0"},children:"Configure default behavior for new projects created via intake or API."}),e.jsxs("div",{style:{display:"grid",gap:16},children:[e.jsx("div",{className:"card",style:{background:"rgba(0,0,0,0.2)",padding:16},children:e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:8},children:[e.jsxs("div",{children:[e.jsx("strong",{children:"Auto Project Channel"}),e.jsx("p",{style:{color:"var(--muted)",margin:"4px 0 0 0",fontSize:12},children:"Automatically create a dedicated project channel for each new project."})]}),e.jsxs("label",{style:{display:"flex",alignItems:"center",gap:8,cursor:"pointer"},children:[e.jsx("input",{type:"checkbox",checked:t.auto_project_channel===!0,onChange:r=>o("auto_project_channel",r.target.checked),style:{width:18,height:18,cursor:"pointer"}}),e.jsx("span",{style:{color:t.auto_project_channel?"var(--cyan)":"var(--muted)"},children:t.auto_project_channel?"Enabled":"Disabled"})]})]})}),e.jsxs("div",{className:"card",style:{background:"rgba(0,0,0,0.2)",padding:16},children:[e.jsxs("div",{style:{marginBottom:8},children:[e.jsx("strong",{children:"Default Execution Path"}),e.jsx("p",{style:{color:"var(--muted)",margin:"4px 0 0 0",fontSize:12},children:"Choose how new projects are executed by default."})]}),e.jsxs("div",{style:{display:"flex",gap:12,marginTop:12},children:[e.jsxs("label",{style:{display:"flex",alignItems:"center",gap:8,padding:"8px 12px",background:t.execution_path==="agi-farm-first"?"rgba(0,255,136,0.1)":"rgba(255,255,255,0.03)",border:`1px solid ${t.execution_path==="agi-farm-first"?"var(--cyan)":"rgba(255,255,255,0.1)"}`,borderRadius:8,cursor:"pointer",flex:1},children:[e.jsx("input",{type:"radio",name:"execution_path",value:"agi-farm-first",checked:t.execution_path==="agi-farm-first",onChange:()=>o("execution_path","agi-farm-first"),style:{cursor:"pointer"}}),e.jsxs("div",{children:[e.jsx("div",{style:{fontWeight:600},children:"AGI-Farm First"}),e.jsx("div",{style:{color:"var(--muted)",fontSize:11},children:"Route to multi-agent team by default"})]})]}),e.jsxs("label",{style:{display:"flex",alignItems:"center",gap:8,padding:"8px 12px",background:t.execution_path==="direct-first"?"rgba(0,255,136,0.1)":"rgba(255,255,255,0.03)",border:`1px solid ${t.execution_path==="direct-first"?"var(--cyan)":"rgba(255,255,255,0.1)"}`,borderRadius:8,cursor:"pointer",flex:1},children:[e.jsx("input",{type:"radio",name:"execution_path",value:"direct-first",checked:t.execution_path==="direct-first",onChange:()=>o("execution_path","direct-first"),style:{cursor:"pointer"}}),e.jsxs("div",{children:[e.jsx("div",{style:{fontWeight:600},children:"Direct First"}),e.jsx("div",{style:{color:"var(--muted)",fontSize:11},children:"Execute directly without team routing"})]})]})]})]})]}),e.jsx("div",{style:{marginTop:20,display:"flex",gap:12},children:e.jsx("button",{onClick:h,disabled:s,style:{background:s?"var(--muted)":"var(--cyan)",color:"#000",border:"none",padding:"10px 20px",borderRadius:8,fontWeight:600,cursor:s?"not-allowed":"pointer"},children:s?"Saving...":"Save Defaults"})})]})}):e.jsxs("div",{className:"card",children:[e.jsx("h3",{children:"Project Defaults"}),e.jsx("p",{style:{color:"var(--muted)"},children:"Loading..."})]})}export{j as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as c,a4 as e}from"./vendor-5MxLWm27.js";import{c as T}from"./index-B8eJ63U_.js";const O=["all","pending","in-progress","complete","failed","blocked","hitl"],m=25;function k(s=1e4){const[o,l]=c.useState(0);return c.useEffect(()=>{const a=setInterval(()=>l(r=>r+1),s);return()=>clearInterval(a)},[s]),o}function A({deadline:s}){if(k(1e4),!s)return e.jsx("span",{style:{color:"var(--muted)",fontSize:"10px"},children:"[NO_LIMIT]"});try{const o=new Date(s),l=Math.round((o-Date.now())/6e4),a=Math.abs(l),r=l<0,d=r?"var(--red)":l<60?"var(--amber)":"var(--muted)",p=a<60?`${r?"-":""}${a}M`:a<1440?`${r?"-":""}${Math.round(a/60)}H`:o.toLocaleDateString();return e.jsxs("span",{title:o.toLocaleString(),style:{color:d,fontSize:"10px",fontWeight:700,fontFamily:"var(--font-mono)"},children:[p,r?" !!":""]})}catch{return e.jsx("span",{style:{color:"var(--muted)",fontSize:"10px"},children:s})}}function L({task:s,expanded:o,onToggle:l}){const a=(s.sla?.priority||s.priority||"P3").toUpperCase(),r=(s.status||"").toLowerCase(),d={complete:"var(--mint)","in-progress":"var(--accent)",failed:"var(--red)",needs_human_decision:"var(--purple)",blocked:"var(--red)"}[r]||"var(--muted)",p=r==="needs_human_decision";return e.jsxs(e.Fragment,{children:[e.jsxs("tr",{onClick:l,style:{borderBottom:"1px solid var(--border-light)",background:p?"rgba(181, 53, 255, 0.05)":"transparent",cursor:"pointer",transition:"background 0.2s"},children:[e.jsx("td",{style:{padding:"12px 16px",color:"var(--accent)",fontFamily:"var(--font-mono)",fontSize:"10px"},children:s.id?.toUpperCase()||"--"}),e.jsx("td",{style:{padding:"12px 16px"},children:e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10},children:[p&&e.jsx("span",{style:{color:"var(--purple)",fontWeight:900},children:"[!]"}),e.jsx("span",{style:{fontWeight:600,color:"#fff",fontSize:"13px"},children:s.title?.toUpperCase()||"--"})]})}),e.jsx("td",{style:{padding:"12px 16px"},children:e.jsx("span",{style:{fontSize:"11px",color:"var(--muted)",fontWeight:600},children:s.assigned_to?.toUpperCase()||"--"})}),e.jsx("td",{style:{padding:"12px 16px"},children:e.jsx("span",{style:{fontSize:"9px",fontWeight:800,padding:"2px 6px",borderRadius:"2px",background:"rgba(255,255,255,0.03)",color:a==="P1"?"var(--red)":"var(--muted)",border:`1px solid ${a==="P1"?"var(--red)":"var(--border)"}`,fontFamily:"var(--font-mono)"},children:a})}),e.jsx("td",{style:{padding:"12px 16px"},children:e.jsx("span",{style:{fontSize:"9px",fontWeight:800,color:d,fontFamily:"var(--font-mono)"},children:r.toUpperCase().replace(/_/g," ")})}),e.jsx("td",{style:{padding:"12px 16px"},children:e.jsx(A,{deadline:s.sla?.deadline||s.sla?.target})}),e.jsx("td",{style:{padding:"12px 16px",color:"var(--muted)",fontSize:"10px",textAlign:"center",fontFamily:"var(--font-mono)"},children:o?"[-]":"[+]"})]}),o&&e.jsx("tr",{style:{background:"#080808"},children:e.jsx("td",{colSpan:7,style:{padding:"24px 32px",borderBottom:"1px solid var(--border)"},children:e.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1.5fr 1fr",gap:40},children:[e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:20},children:[s.hitl_reason&&e.jsxs("div",{className:"card",style:{borderColor:"var(--purple)",background:"rgba(181, 53, 255, 0.03)"},children:[e.jsx("div",{className:"section-title",style:{color:"var(--purple)"},children:"INTERVENTION_REQUIRED"}),e.jsx("div",{style:{fontSize:"13px",color:"#fff",fontWeight:600},children:s.hitl_reason})]}),e.jsxs("div",{children:[e.jsx("div",{className:"section-title",children:"MISSION_OBJECTIVE_DETAIL"}),e.jsx("div",{style:{fontSize:"13px",color:"var(--text-dim)",lineHeight:1.6,background:"#000",padding:"16px",border:"1px solid var(--border-light)"},children:s.description||"NO_DETAILED_LOG_AVAILABLE_FOR_NODE."})]}),s.output&&e.jsxs("div",{children:[e.jsx("div",{className:"section-title",style:{color:"var(--mint)"},children:"FINAL_RESOLUTION_OUTPUT"}),e.jsx("div",{style:{fontSize:"11px",color:"var(--mint)",lineHeight:1.6,padding:"16px",border:"1px solid var(--mint)",background:"rgba(0,240,255,0.01)",fontFamily:"var(--font-mono)"},children:s.output})]})]}),e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:20},children:[e.jsxs("div",{className:"card",children:[e.jsx("div",{className:"section-title",children:"METADATA_ARRAY"}),e.jsxs("div",{style:{display:"grid",gap:10,fontSize:"11px",fontFamily:"var(--font-mono)"},children:[e.jsxs("div",{style:{display:"flex",justifyContent:"space-between"},children:[e.jsx("span",{style:{color:"var(--muted)"},children:"MODE:"}),e.jsx("span",{children:s.type?.toUpperCase()})]}),e.jsxs("div",{style:{display:"flex",justifyContent:"space-between"},children:[e.jsx("span",{style:{color:"var(--muted)"},children:"PID:"}),e.jsx("span",{style:{color:"var(--accent)"},children:s.proc_id||"LOCAL"})]}),e.jsxs("div",{style:{display:"flex",justifyContent:"space-between"},children:[e.jsx("span",{style:{color:"var(--muted)"},children:"TX_START:"}),e.jsx("span",{children:new Date(s.created_at).toLocaleString()})]}),s.completed_at&&e.jsxs("div",{style:{display:"flex",justifyContent:"space-between"},children:[e.jsx("span",{style:{color:"var(--muted)"},children:"TX_COMPL:"}),e.jsx("span",{style:{color:"var(--mint)"},children:new Date(s.completed_at).toLocaleString()})]})]})]}),s.depends_on?.length>0&&e.jsxs("div",{className:"card",children:[e.jsx("div",{className:"section-title",children:"NODE_DEPENDENCIES"}),e.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:6},children:s.depends_on.map(i=>e.jsx("span",{style:{fontSize:"9px",padding:"3px 8px",background:"rgba(255,255,255,0.03)",color:"var(--accent)",border:"1px solid var(--accent)",borderRadius:"2px",fontFamily:"var(--font-mono)"},children:i.toUpperCase()},i))})]})]})]})})})]})}function P({data:s,lastUpdated:o,toast:l}){const{tasks:a=[],agents:r=[]}=s||{},[d,p]=c.useState("all"),[i,u]=c.useState(0),[v,_]=c.useState(null),[g,C]=c.useState(""),[y,f]=c.useState(!1),[n,x]=c.useState({id:"",title:"",description:"",priority:"P2",assigned_to:"",type:"dev"}),[j,b]=c.useState(!1),E=async()=>{if(!(!n.id||!n.title)){b(!0);try{await T(n),l("MISSION_OBJECTIVE_STAGED","success"),f(!1),x({id:"",title:"",description:"",priority:"P2",assigned_to:"",type:"dev"})}catch(t){l(t.message,"error")}finally{b(!1)}}},S=a.filter(t=>{if(d!=="all"&&t.status!==(d==="hitl"?"needs_human_decision":d))return!1;if(!g)return!0;const N=g.toLowerCase();return(t.id||"").toLowerCase().includes(N)||(t.title||"").toLowerCase().includes(N)}),h=Math.ceil(S.length/m),I=S.slice(i*m,(i+1)*m);return e.jsxs("div",{className:"fade-in",style:{display:"grid",gap:20},children:[e.jsxs("div",{style:{display:"flex",gap:16,alignItems:"center",flexWrap:"wrap"},children:[e.jsx("input",{className:"input-base",placeholder:"SEARCH_MISSION_ID...",value:g,onChange:t=>{C(t.target.value),u(0)},style:{width:"240px",fontFamily:"var(--font-mono)"}}),e.jsx("div",{style:{display:"flex",gap:4},children:O.map(t=>e.jsx("button",{onClick:()=>{p(t),u(0)},style:{background:d===t?"var(--accent)":"rgba(255,255,255,0.02)",border:"1px solid var(--border)",color:d===t?"#000":"var(--muted)",padding:"6px 12px",borderRadius:"2px",fontSize:"10px",cursor:"pointer",fontWeight:800,textTransform:"uppercase",transition:"all 0.15s",fontFamily:"var(--font-mono)"},children:t},t))}),e.jsx("button",{className:"btn-primary",style:{padding:"8px 16px",marginLeft:"auto"},onClick:()=>f(!y),children:"+ NEW_MISSION"})]}),y&&e.jsxs("div",{className:"card",style:{display:"grid",gridTemplateColumns:"repeat(3, 1fr)",gap:12,background:"rgba(37, 175, 244, 0.03)",borderColor:"var(--accent)"},children:[e.jsx("div",{className:"section-title",style:{gridColumn:"span 3",color:"var(--accent)"},children:"INITIALIZE_MISSION_PARAMETERS"}),e.jsx("input",{className:"input-base",placeholder:"TASK_ID *",value:n.id,onChange:t=>x({...n,id:t.target.value})}),e.jsx("input",{className:"input-base",placeholder:"OBJECTIVE_TITLE *",value:n.title,onChange:t=>x({...n,title:t.target.value}),style:{gridColumn:"span 2"}}),e.jsx("textarea",{className:"input-base",placeholder:"MISSION_DESCRIPTION",value:n.description,onChange:t=>x({...n,description:t.target.value}),style:{gridColumn:"span 3",minHeight:"80px"}}),e.jsxs("select",{className:"input-base",value:n.priority,onChange:t=>x({...n,priority:t.target.value}),children:[e.jsx("option",{value:"P1",children:"P1_CRITICAL"}),e.jsx("option",{value:"P2",children:"P2_NORMAL"}),e.jsx("option",{value:"P3",children:"P3_LOW"})]}),e.jsxs("select",{className:"input-base",value:n.assigned_to,onChange:t=>x({...n,assigned_to:t.target.value}),children:[e.jsx("option",{value:"",children:"NODE_ASSIGNMENT..."}),r.map(t=>e.jsxs("option",{value:t.id,children:[t.emoji," ",t.name.toUpperCase()]},t.id))]}),e.jsx("button",{className:"btn-primary",onClick:E,disabled:j||!n.id||!n.title,style:{gridColumn:"span 1"},children:j?"PROCESSING...":"INITIALIZE"})]}),e.jsx("div",{style:{border:"1px solid var(--border)",background:"#050505"},children:e.jsxs("table",{style:{width:"100%",borderCollapse:"collapse"},children:[e.jsx("thead",{children:e.jsx("tr",{style:{background:"rgba(255,255,255,0.03)",borderBottom:"1px solid var(--border)"},children:["ID","MISSION_OBJECTIVE","NODE","PRI","STATUS","TTL",""].map(t=>e.jsx("th",{style:{padding:"12px 16px",textAlign:"left",fontSize:"9px",color:"var(--muted)",fontWeight:800,textTransform:"uppercase",fontFamily:"var(--font-mono)"},children:t},t))})}),e.jsx("tbody",{children:I.length===0?e.jsx("tr",{children:e.jsx("td",{colSpan:7,style:{padding:"80px",color:"var(--muted)",textAlign:"center",fontSize:"11px",fontFamily:"var(--font-mono)"},children:"SIGNAL_VOID // NO_MATCHING_MISSIONS_FOUND"})}):I.map(t=>e.jsx(L,{task:t,expanded:v===t.id,onToggle:()=>_(v===t.id?null:t.id)},t.id))})]})}),h>1&&e.jsxs("div",{style:{display:"flex",gap:16,alignItems:"center",justifyContent:"center"},children:[e.jsx("button",{className:"btn-secondary",onClick:()=>u(Math.max(0,i-1)),disabled:i===0,style:{padding:"6px 16px",fontSize:"10px"},children:"PREV"}),e.jsxs("span",{style:{fontSize:"10px",color:"var(--muted)",fontFamily:"var(--font-mono)"},children:["PAGE ",i+1," // ",h]}),e.jsx("button",{className:"btn-secondary",onClick:()=>u(Math.min(h-1,i+1)),disabled:i===h-1,style:{padding:"6px 16px",fontSize:"10px"},children:"NEXT"})]})]})}export{P as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a4 as e}from"./vendor-5MxLWm27.js";import{L as E}from"./LastUpdated-BVeFtHFH.js";import{R as n,B as j,C as u,X as p,Y as h,T as y,a as S,d as l,P as z,e as N,f as k,S as F,Z as R,g as U}from"./charts-BrUY2WWl.js";const v={background:"#050505",border:"1px solid rgba(255, 255, 255, 0.1)",borderRadius:"2px",fontSize:"10px",color:"#fff",fontFamily:"var(--font-mono)",padding:"8px 12px"};function w({data:_,lastUpdated:T}){const{velocity:r={},tasks:o=[],agents:d=[]}=_||{},A=r?.daily||[],s=r?.weekly_summary||{},L=r?.metrics||{},b=(()=>{const t=[];for(let a=6;a>=0;a--){const i=new Date;i.setDate(i.getDate()-a);const f=i.toISOString().split("T")[0],x=A.find(D=>D.date===f)||{};t.push({name:i.toLocaleDateString("en-US",{weekday:"short"}).toUpperCase(),completed:x.tasks_completed||0,failed:x.tasks_failed||0,quality:x.avg_quality??0})}return t})(),c={};o.forEach(t=>{const a=t.type||"other";c[a]=(c[a]||0)+1}),Object.entries(c).map(([t,a])=>({name:t,value:a}));const m=s.tasks_completed>0?s.tasks_completed/(s.tasks_completed+s.tasks_failed)*100:0,g=d.filter(t=>o.filter(i=>i.assigned_to===t.id).length>0||t.tasks_completed>0).map(t=>{const a=o.filter(i=>i.assigned_to===t.id);return{name:(t.name||t.id).toUpperCase().slice(0,12),emoji:t.emoji||"🤖",done:a.filter(i=>i.status==="complete").length,active:a.filter(i=>i.status==="in-progress").length,blocked:a.filter(i=>["blocked","needs_human_decision"].includes(i.status)).length,failed:a.filter(i=>i.status==="failed").length,quality:t.quality_score||0,total:t.tasks_completed||0}}).sort((t,a)=>a.done+a.active-(t.done+t.active)),C=d.filter(t=>t.tasks_completed>0||t.quality_score>0).map(t=>({x:t.tasks_completed||0,y:t.quality_score||0,name:t.name,emoji:t.emoji||"🤖",z:40})),I=[...d].sort((t,a)=>(a.tasks_completed||0)-(t.tasks_completed||0)).slice(0,5);return e.jsxs("div",{className:"fade-in",style:{display:"grid",gap:24},children:[e.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(5, 1fr)",gap:16},children:[{l:"THROUGHPUT",v:s.tasks_completed??0,c:"var(--mint)"},{l:"FAILURES",v:s.tasks_failed??0,c:"var(--red)"},{l:"AVG_QUALITY",v:(s.avg_quality??0).toFixed(2),c:"var(--amber)"},{l:"SLA_VIOLATIONS",v:s.sla_breaches??0,c:"var(--purple)"},{l:"DAILY_RATE",v:(L.throughput_rate_tasks_per_day??0).toFixed(1),c:"var(--accent)"}].map(t=>e.jsxs("div",{className:"card",style:{padding:"16px"},children:[e.jsx("div",{className:"section-title",children:t.l}),e.jsx("div",{style:{fontSize:"24px",fontWeight:800,color:t.c,fontFamily:"var(--font-mono)"},children:t.v})]},t.l))}),e.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1.5fr 1fr",gap:24},children:[e.jsxs("div",{className:"card",children:[e.jsx("div",{className:"section-title",children:"NEURAL THROUGHPUT (7D WINDOW)"}),e.jsx(n,{width:"100%",height:240,children:e.jsxs(j,{data:b,margin:{top:10,right:0,left:-25,bottom:0},children:[e.jsx(u,{strokeDasharray:"2 2",stroke:"rgba(255,255,255,0.05)",vertical:!1}),e.jsx(p,{dataKey:"name",tick:{fill:"var(--muted)",fontSize:9,fontFamily:"var(--font-mono)"},axisLine:!1,tickLine:!1}),e.jsx(h,{tick:{fill:"var(--muted)",fontSize:9,fontFamily:"var(--font-mono)"},axisLine:!1,tickLine:!1}),e.jsx(y,{contentStyle:v,cursor:{fill:"rgba(255,255,255,0.03)"}}),e.jsx(S,{verticalAlign:"top",align:"right",iconType:"rect",wrapperStyle:{fontSize:"9px",fontFamily:"var(--font-mono)",paddingBottom:"16px"}}),e.jsx(l,{dataKey:"completed",fill:"var(--mint)",name:"COMPLETED",radius:[2,2,0,0],barSize:20}),e.jsx(l,{dataKey:"failed",fill:"var(--red)",name:"FAILED",radius:[2,2,0,0],barSize:20})]})})]}),e.jsxs("div",{className:"card",style:{textAlign:"center"},children:[e.jsx("div",{className:"section-title",children:"MISSION SUCCESS INDEX"}),e.jsxs("div",{style:{position:"relative",marginTop:20},children:[e.jsx(n,{width:"100%",height:200,children:e.jsx(z,{children:e.jsxs(N,{data:[{name:"Success",value:m},{name:"Remaining",value:100-m}],cx:"50%",cy:"50%",innerRadius:60,outerRadius:80,startAngle:225,endAngle:-45,paddingAngle:0,dataKey:"value",children:[e.jsx(k,{fill:"var(--mint)"}),e.jsx(k,{fill:"rgba(255,255,255,0.03)",stroke:"none"})]})})}),e.jsxs("div",{style:{position:"absolute",top:"55%",left:"50%",transform:"translate(-50%, -50%)"},children:[e.jsxs("div",{style:{fontSize:"32px",fontWeight:800,fontFamily:"var(--font-mono)"},children:[m.toFixed(0),"%"]}),e.jsx("div",{style:{fontSize:"8px",color:"var(--muted)",fontWeight:800},children:"SUCCESS_RATE"})]})]})]})]}),e.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1.5fr 1fr",gap:24},children:[e.jsxs("div",{className:"card",children:[e.jsx("div",{className:"section-title",children:"AGENT WORKLOAD DISTRIBUTION // STACKED"}),e.jsx(n,{width:"100%",height:Math.max(200,g.length*40),children:e.jsxs(j,{data:g,layout:"vertical",margin:{top:0,right:30,left:0,bottom:0},children:[e.jsx(p,{type:"number",hide:!0}),e.jsx(h,{type:"category",dataKey:"name",axisLine:!1,tickLine:!1,tick:{fontSize:10,fill:"#fff",fontFamily:"var(--font-mono)",fontWeight:700},width:100}),e.jsx(y,{contentStyle:v}),e.jsx(S,{verticalAlign:"top",align:"right",iconType:"rect",wrapperStyle:{fontSize:9,fontFamily:"var(--font-mono)",paddingBottom:"16px"}}),e.jsx(l,{dataKey:"done",stackId:"a",fill:"var(--mint)",name:"DONE",barSize:12}),e.jsx(l,{dataKey:"active",stackId:"a",fill:"var(--accent)",name:"ACTIVE"}),e.jsx(l,{dataKey:"blocked",stackId:"a",fill:"var(--purple)",name:"BLOCKED"}),e.jsx(l,{dataKey:"failed",stackId:"a",fill:"var(--red)",name:"FAILED"})]})})]}),e.jsxs("div",{className:"card",children:[e.jsx("div",{className:"section-title",children:"ELITE NODE INDEX"}),e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:0,marginTop:12},children:I.map((t,a)=>e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12,padding:"12px 0",borderBottom:"1px solid var(--border-light)"},children:[e.jsxs("div",{style:{width:"18px",fontSize:"11px",fontWeight:800,color:a===0?"var(--amber)":"var(--muted)",fontFamily:"var(--font-mono)"},children:[a+1,"."]}),e.jsx("div",{style:{fontSize:"18px"},children:t.emoji}),e.jsxs("div",{style:{flex:1,minWidth:0},children:[e.jsx("div",{style:{fontSize:"12px",fontWeight:700},children:t.name.toUpperCase()}),e.jsx("div",{style:{fontSize:"8px",color:"var(--muted)",fontFamily:"var(--font-mono)"},children:t.id})]}),e.jsxs("div",{style:{textAlign:"right"},children:[e.jsx("div",{style:{fontSize:"13px",fontWeight:700,fontFamily:"var(--font-mono)",color:"var(--mint)"},children:t.tasks_completed}),e.jsx("div",{style:{fontSize:"7px",color:"var(--muted)",fontWeight:800},children:"CYCLES"})]})]},t.id))})]})]}),e.jsxs("div",{className:"card",children:[e.jsx("div",{className:"section-title",children:"THROUGHPUT VS QUALITY // SCATTER_MATRIX"}),e.jsx(n,{width:"100%",height:240,children:e.jsxs(F,{margin:{top:20,right:30,left:0,bottom:20},children:[e.jsx(u,{strokeDasharray:"2 2",stroke:"rgba(255,255,255,0.05)"}),e.jsx(p,{type:"number",dataKey:"x",name:"CYCLES",axisLine:!1,tickLine:!1,tick:{fill:"var(--muted)",fontSize:9,fontFamily:"var(--font-mono)"}}),e.jsx(h,{type:"number",dataKey:"y",name:"QUALITY",domain:[0,5],axisLine:!1,tickLine:!1,tick:{fill:"var(--muted)",fontSize:9,fontFamily:"var(--font-mono)"}}),e.jsx(R,{type:"number",dataKey:"z",range:[50,50]}),e.jsx(y,{contentStyle:v,cursor:{strokeDasharray:"3 3"}}),e.jsx(U,{data:C,fill:"var(--accent)",shape:t=>{const{cx:a,cy:i,payload:f}=t;return e.jsxs("g",{children:[e.jsx("rect",{x:a-10,y:i-10,width:20,height:20,fill:"rgba(37, 175, 244, 0.1)",stroke:"var(--accent)",strokeWidth:1}),e.jsx("text",{x:a,y:i+4,textAnchor:"middle",fontSize:10,fill:"#fff",children:f.emoji})]})}})]})})]}),e.jsx("div",{style:{display:"flex",justifyContent:"flex-end"},children:e.jsx(E,{ts:T})})]})}export{w as default};
|