heyio 0.39.1 → 0.40.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.
@@ -376,11 +376,10 @@ export function getActiveAgentTasks() {
376
376
  */
377
377
  async function getOrCreateAgentSession(squadSlug, agent, taskDescription) {
378
378
  const key = agentSessionKey(squadSlug, agent.character_name);
379
- // Determine model based on task complexity vs agent's default tier
379
+ // Determine model: task complexity is sole determinant when task context exists;
380
+ // stored model_tier is only a fallback for ad-hoc sessions without task context.
380
381
  const agentTier = agent.model_tier;
381
- const taskTier = taskDescription ? classifyComplexity(taskDescription) : agentTier;
382
- const tierRank = { high: 3, medium: 2, low: 1 };
383
- const effectiveTier = tierRank[taskTier] >= tierRank[agentTier] ? taskTier : agentTier;
382
+ const effectiveTier = taskDescription ? classifyComplexity(taskDescription) : agentTier;
384
383
  const model = getModelForTier(effectiveTier);
385
384
  // If we have a cached session, check if the model matches AND the agent
386
385
  // hasn't been left in an error state by a previous task. If either is off,
@@ -422,7 +421,7 @@ async function getOrCreateAgentSession(squadSlug, agent, taskDescription) {
422
421
  const wikiSection = wikiPages.length > 0
423
422
  ? `\n\n## Squad Wiki\n${wikiPages.map(p => `### ${p.path}\n${p.content}`).join("\n\n")}`
424
423
  : "";
425
- console.error(`[io] Agent ${agent.character_name}: using model "${model}" (agent tier: ${agentTier}, task tier: ${taskTier}, effective: ${effectiveTier})`);
424
+ console.error(`[io] Agent ${agent.character_name}: using model "${model}" (stored tier: ${agentTier}, effective: ${effectiveTier})`);
426
425
  const universeName = squad.universe
427
426
  ? getUniverse(squad.universe)?.name ?? squad.universe
428
427
  : "Unknown";
@@ -0,0 +1,71 @@
1
+ import { describe, it } from "node:test";
2
+ import assert from "node:assert/strict";
3
+ import { classifyComplexity } from "./model-router.js";
4
+ describe("classifyComplexity", () => {
5
+ describe("high complexity", () => {
6
+ it("returns high when multiple high keywords are present", () => {
7
+ assert.equal(classifyComplexity("Refactor and redesign the auth module"), "high");
8
+ });
9
+ it("returns high with architect + security keywords", () => {
10
+ assert.equal(classifyComplexity("Architect a security overhaul"), "high");
11
+ });
12
+ it("returns high with debug + investigate", () => {
13
+ assert.equal(classifyComplexity("Investigate and debug the memory leak"), "high");
14
+ });
15
+ it("returns high for performance + optimize", () => {
16
+ assert.equal(classifyComplexity("Optimize performance of the query engine"), "high");
17
+ });
18
+ });
19
+ describe("low complexity", () => {
20
+ it("returns low when multiple low keywords are present", () => {
21
+ assert.equal(classifyComplexity("Read the file and check status"), "low");
22
+ });
23
+ it("returns low for simple rename task", () => {
24
+ assert.equal(classifyComplexity("Simple rename of the variable"), "low");
25
+ });
26
+ it("returns low for list + format", () => {
27
+ assert.equal(classifyComplexity("List all entries and format them"), "low");
28
+ });
29
+ it("returns low for delete file + remove file", () => {
30
+ assert.equal(classifyComplexity("Delete file foo.txt and remove file bar.txt"), "low");
31
+ });
32
+ });
33
+ describe("medium complexity", () => {
34
+ it("returns medium for ambiguous description with no keywords", () => {
35
+ assert.equal(classifyComplexity("Update the user profile page"), "medium");
36
+ });
37
+ it("returns medium for empty string", () => {
38
+ assert.equal(classifyComplexity(""), "medium");
39
+ });
40
+ it("returns medium when one high and one low keyword tie", () => {
41
+ // highScore=1, lowScore=1 — both weak, neither wins, falls to default
42
+ assert.equal(classifyComplexity("Debug and check the output"), "medium");
43
+ });
44
+ });
45
+ describe("weak signal tiebreaker", () => {
46
+ it("returns high when single high keyword beats zero low keywords", () => {
47
+ assert.equal(classifyComplexity("Refactor the utils module"), "high");
48
+ });
49
+ it("returns low when single low keyword beats zero high keywords", () => {
50
+ assert.equal(classifyComplexity("Check the build output"), "low");
51
+ });
52
+ });
53
+ describe("case insensitivity", () => {
54
+ it("matches keywords regardless of case", () => {
55
+ assert.equal(classifyComplexity("REFACTOR and REDESIGN everything"), "high");
56
+ });
57
+ it("matches low keywords in mixed case", () => {
58
+ assert.equal(classifyComplexity("FORMAT the List of entries"), "low");
59
+ });
60
+ });
61
+ describe("multi-word keywords", () => {
62
+ it("matches 'delete file' as a single keyword", () => {
63
+ assert.equal(classifyComplexity("Please delete file and copy file"), "low");
64
+ });
65
+ it("does not match partial multi-word keywords", () => {
66
+ // "delete" alone is not a keyword, only "delete file" is
67
+ assert.equal(classifyComplexity("Delete the branch"), "medium");
68
+ });
69
+ });
70
+ });
71
+ //# sourceMappingURL=model-router.test.js.map
@@ -651,7 +651,7 @@ export function createTools(deps) {
651
651
  console.error(`[io] squad_add_agent called: ${slug} — ${role_title}`);
652
652
  try {
653
653
  const agent = deps.addSquadAgent(slug, role_title, charter, model_tier);
654
- return `Agent added to squad "${slug}":\n- **${agent.character_name}** — ${agent.role_title}\n- Personality: ${agent.personality}\n- Model tier: ${agent.model_tier}`;
654
+ return `Agent added to squad "${slug}":\n- **${agent.character_name}** — ${agent.role_title}\n- Personality: ${agent.personality}\n- Model: dynamic (task-based)`;
655
655
  }
656
656
  catch (err) {
657
657
  return `Error adding agent: ${err instanceof Error ? err.message : String(err)}`;
@@ -699,7 +699,7 @@ export function createTools(deps) {
699
699
  const statsStr = st.task_count === 0
700
700
  ? " — 📊 never delegated"
701
701
  : ` — 📊 ${st.task_count} ${st.task_count === 1 ? "task" : "tasks"} · last ${formatRelativeTime(st.last_delegated_at)}`;
702
- return `- **${a.character_name}**${leadBadge}${qaBadge} — ${a.role_title} (${a.model_tier}) — ${a.status}${statsStr}${a.personality ? `\n _${a.personality}_` : ""}`;
702
+ return `- **${a.character_name}**${leadBadge}${qaBadge} — ${a.role_title} (dynamic) — ${a.status}${statsStr}${a.personality ? `\n _${a.personality}_` : ""}`;
703
703
  });
704
704
  const coverage = assessSquadCoverage(agents);
705
705
  const coverageBlock = coverage.warning ? `\n\n${coverage.warning}` : "";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "heyio",
3
- "version": "0.39.1",
3
+ "version": "0.40.0",
4
4
  "description": "IO — a personal AI assistant built on the GitHub Copilot SDK",
5
5
  "bin": {
6
6
  "io": "dist/index.js"
@@ -1 +1 @@
1
- import{d as S,o as T,L as N,c as n,a as e,w as R,v as U,F as g,m as _,t as i,g as h,r as l,q as j,G as m,M as A,j as d,s as L,n as V,b as w,H as F,J as B}from"./index-B3ZOJqJ1.js";import{_ as D}from"./StatusIndicator.vue_vue_type_script_setup_true_lang-DaZufA4t.js";const E={class:"grid h-full min-h-0 gap-5 p-5 xl:grid-cols-[340px_minmax(0,1fr)]"},J={class:"flex min-h-0 flex-col overflow-hidden rounded-lg border border-border bg-card"},M={class:"border-b border-border px-4 py-4"},O={class:"min-h-0 flex-1 overflow-y-auto p-3"},P=["onClick"],z={class:"flex items-start justify-between gap-3"},I={class:"min-w-0 flex-1"},q={class:"truncate text-sm font-medium"},G={class:"mt-1 font-mono text-[10px] uppercase tracking-[0.18em] text-muted-foreground/55"},H={class:"flex items-center gap-2"},W={class:"font-mono text-[10px] uppercase text-muted-foreground/70"},K={class:"mt-2 font-mono text-[10px] text-muted-foreground/45"},Q={class:"grid min-h-0 gap-5 lg:grid-rows-[auto_minmax(180px,0.7fr)_minmax(0,1fr)]"},X={class:"rounded-lg border border-border bg-card p-5"},Y={class:"flex flex-wrap items-start justify-between gap-3"},Z={class:"mt-2 text-lg font-semibold"},ee=["disabled"],te={class:"mt-4 overflow-x-auto rounded-lg border border-white/[0.06] bg-black/30 p-4 font-mono text-xs leading-6 text-foreground/75"},oe={class:"min-h-0 overflow-hidden rounded-lg border border-border bg-card"},se={class:"h-full overflow-y-auto p-4"},re={class:"whitespace-pre-wrap break-words"},ae={key:0,class:"rounded-lg border border-dashed border-border px-4 py-10 text-center font-mono text-xs uppercase tracking-[0.22em] text-muted-foreground/45"},ne={class:"min-h-0 overflow-hidden rounded-lg border border-primary/20 bg-card"},de={class:"h-full overflow-y-auto px-4 py-4 font-mono text-xs leading-6 text-foreground/75"},ie={key:0,class:"py-8 text-center uppercase tracking-[0.22em] text-muted-foreground/45"},le={key:1,class:"py-8 text-center uppercase tracking-[0.22em] text-muted-foreground/45"},me=S({__name:"AgentActivityView",setup(ce){const c=l([]),a=l(""),v=l(null),f=l([]),u=l([]),x=l("");let s=null;const k=j(()=>{const r=x.value.trim().toLowerCase();return r?c.value.filter(t=>`${t.task_id} ${t.agent_slug} ${t.description} ${t.status}`.toLowerCase().includes(r)):c.value});async function y(){const r=await m("/api/tasks");r.ok&&(c.value=(await r.json()).tasks,!a.value&&c.value[0]&&await b(c.value[0].task_id))}async function C(r){s==null||s.close(),u.value=[];const t=await A(`/api/tasks/${encodeURIComponent(r)}/events`);s=new EventSource(t),s.onmessage=o=>{u.value=[...u.value.slice(-120),o.data]},s.onerror=()=>{s==null||s.close(),s=null}}async function b(r){a.value=r;const[t,o]=await Promise.all([m(`/api/tasks/${encodeURIComponent(r)}`),m(`/api/tasks/${encodeURIComponent(r)}/activity`)]);v.value=t.ok?await t.json():null,f.value=o.ok?(await o.json()).activity??[]:[],await C(r)}async function $(){a.value&&(await m(`/api/tasks/${encodeURIComponent(a.value)}/cancel`,{method:"POST"}),await Promise.all([b(a.value),y()]))}return T(y),N(()=>{s==null||s.close()}),(r,t)=>(d(),n("div",E,[e("section",J,[e("div",M,[t[1]||(t[1]=e("div",{class:"mb-3 font-mono text-[10px] uppercase tracking-[0.28em] text-primary"},"Task Activity",-1)),R(e("input",{"onUpdate:modelValue":t[0]||(t[0]=o=>x.value=o),class:"w-full rounded border border-border bg-sidebar px-3 py-2 text-sm text-foreground placeholder:text-muted-foreground/35",placeholder:"Filter by task, agent, or status"},null,512),[[U,x.value]])]),e("div",O,[(d(!0),n(g,null,_(k.value,o=>(d(),n("button",{key:o.task_id,class:L(["mb-2 w-full rounded-lg border px-4 py-3 text-left transition-colors",a.value===o.task_id?"border-primary/40 bg-primary/10":"border-border bg-sidebar/40 hover:bg-white/[0.03]"]),onClick:p=>b(o.task_id)},[e("div",z,[e("div",I,[e("div",q,i(o.description),1),e("div",G,i(o.agent_slug)+" · "+i(o.task_id),1)]),e("div",H,[V(D,{status:w(F)(o.status)},null,8,["status"]),e("span",W,i(o.status),1)])]),e("div",K,i(w(B)(o.started_at)),1)],10,P))),128))])]),e("section",Q,[e("div",X,[e("div",Y,[e("div",null,[t[2]||(t[2]=e("div",{class:"font-mono text-[10px] uppercase tracking-[0.28em] text-accent-foreground"},"Task Detail",-1)),e("div",Z,i(a.value||"Select a task"),1)]),e("button",{class:"rounded border border-destructive/40 px-3 py-1.5 font-mono text-xs text-destructive transition-colors hover:bg-destructive/10",disabled:!a.value,onClick:$},"cancel task",8,ee)]),e("pre",te,i(v.value?JSON.stringify(v.value,null,2):"No task selected."),1)]),e("div",oe,[t[3]||(t[3]=e("div",{class:"border-b border-border px-4 py-3 font-mono text-[10px] uppercase tracking-[0.28em] text-muted-foreground/60"},"Activity log",-1)),e("div",se,[(d(!0),n(g,null,_(f.value,(o,p)=>(d(),n("article",{key:p,class:"mb-3 rounded-lg border border-white/[0.06] bg-sidebar/60 px-4 py-3 font-mono text-xs text-foreground/75"},[e("pre",re,i(JSON.stringify(o,null,2)),1)]))),128)),a.value&&!f.value.length?(d(),n("div",ae,"No activity reported")):h("",!0)])]),e("div",ne,[t[4]||(t[4]=e("div",{class:"border-b border-border px-4 py-3 font-mono text-[10px] uppercase tracking-[0.28em] text-primary"},"Live event preview",-1)),e("div",de,[(d(!0),n(g,null,_(u.value,(o,p)=>(d(),n("div",{key:p,class:"border-b border-border/40 py-2"},i(o),1))),128)),a.value&&!u.value.length?(d(),n("div",ie,"Waiting for live events")):h("",!0),a.value?h("",!0):(d(),n("div",le,"Select a task to attach the stream"))])])])]))}});export{me as default};
1
+ import{d as S,o as T,L as N,c as n,a as e,w as R,v as U,F as g,m as _,t as i,g as h,r as l,q as j,G as m,M as A,j as d,s as L,n as V,b as w,H as F,J as B}from"./index-D1C7prBJ.js";import{_ as D}from"./StatusIndicator.vue_vue_type_script_setup_true_lang-BwmRY2qH.js";const E={class:"grid h-full min-h-0 gap-5 p-5 xl:grid-cols-[340px_minmax(0,1fr)]"},J={class:"flex min-h-0 flex-col overflow-hidden rounded-lg border border-border bg-card"},M={class:"border-b border-border px-4 py-4"},O={class:"min-h-0 flex-1 overflow-y-auto p-3"},P=["onClick"],z={class:"flex items-start justify-between gap-3"},I={class:"min-w-0 flex-1"},q={class:"truncate text-sm font-medium"},G={class:"mt-1 font-mono text-[10px] uppercase tracking-[0.18em] text-muted-foreground/55"},H={class:"flex items-center gap-2"},W={class:"font-mono text-[10px] uppercase text-muted-foreground/70"},K={class:"mt-2 font-mono text-[10px] text-muted-foreground/45"},Q={class:"grid min-h-0 gap-5 lg:grid-rows-[auto_minmax(180px,0.7fr)_minmax(0,1fr)]"},X={class:"rounded-lg border border-border bg-card p-5"},Y={class:"flex flex-wrap items-start justify-between gap-3"},Z={class:"mt-2 text-lg font-semibold"},ee=["disabled"],te={class:"mt-4 overflow-x-auto rounded-lg border border-white/[0.06] bg-black/30 p-4 font-mono text-xs leading-6 text-foreground/75"},oe={class:"min-h-0 overflow-hidden rounded-lg border border-border bg-card"},se={class:"h-full overflow-y-auto p-4"},re={class:"whitespace-pre-wrap break-words"},ae={key:0,class:"rounded-lg border border-dashed border-border px-4 py-10 text-center font-mono text-xs uppercase tracking-[0.22em] text-muted-foreground/45"},ne={class:"min-h-0 overflow-hidden rounded-lg border border-primary/20 bg-card"},de={class:"h-full overflow-y-auto px-4 py-4 font-mono text-xs leading-6 text-foreground/75"},ie={key:0,class:"py-8 text-center uppercase tracking-[0.22em] text-muted-foreground/45"},le={key:1,class:"py-8 text-center uppercase tracking-[0.22em] text-muted-foreground/45"},me=S({__name:"AgentActivityView",setup(ce){const c=l([]),a=l(""),v=l(null),f=l([]),u=l([]),x=l("");let s=null;const k=j(()=>{const r=x.value.trim().toLowerCase();return r?c.value.filter(t=>`${t.task_id} ${t.agent_slug} ${t.description} ${t.status}`.toLowerCase().includes(r)):c.value});async function y(){const r=await m("/api/tasks");r.ok&&(c.value=(await r.json()).tasks,!a.value&&c.value[0]&&await b(c.value[0].task_id))}async function C(r){s==null||s.close(),u.value=[];const t=await A(`/api/tasks/${encodeURIComponent(r)}/events`);s=new EventSource(t),s.onmessage=o=>{u.value=[...u.value.slice(-120),o.data]},s.onerror=()=>{s==null||s.close(),s=null}}async function b(r){a.value=r;const[t,o]=await Promise.all([m(`/api/tasks/${encodeURIComponent(r)}`),m(`/api/tasks/${encodeURIComponent(r)}/activity`)]);v.value=t.ok?await t.json():null,f.value=o.ok?(await o.json()).activity??[]:[],await C(r)}async function $(){a.value&&(await m(`/api/tasks/${encodeURIComponent(a.value)}/cancel`,{method:"POST"}),await Promise.all([b(a.value),y()]))}return T(y),N(()=>{s==null||s.close()}),(r,t)=>(d(),n("div",E,[e("section",J,[e("div",M,[t[1]||(t[1]=e("div",{class:"mb-3 font-mono text-[10px] uppercase tracking-[0.28em] text-primary"},"Task Activity",-1)),R(e("input",{"onUpdate:modelValue":t[0]||(t[0]=o=>x.value=o),class:"w-full rounded border border-border bg-sidebar px-3 py-2 text-sm text-foreground placeholder:text-muted-foreground/35",placeholder:"Filter by task, agent, or status"},null,512),[[U,x.value]])]),e("div",O,[(d(!0),n(g,null,_(k.value,o=>(d(),n("button",{key:o.task_id,class:L(["mb-2 w-full rounded-lg border px-4 py-3 text-left transition-colors",a.value===o.task_id?"border-primary/40 bg-primary/10":"border-border bg-sidebar/40 hover:bg-white/[0.03]"]),onClick:p=>b(o.task_id)},[e("div",z,[e("div",I,[e("div",q,i(o.description),1),e("div",G,i(o.agent_slug)+" · "+i(o.task_id),1)]),e("div",H,[V(D,{status:w(F)(o.status)},null,8,["status"]),e("span",W,i(o.status),1)])]),e("div",K,i(w(B)(o.started_at)),1)],10,P))),128))])]),e("section",Q,[e("div",X,[e("div",Y,[e("div",null,[t[2]||(t[2]=e("div",{class:"font-mono text-[10px] uppercase tracking-[0.28em] text-accent-foreground"},"Task Detail",-1)),e("div",Z,i(a.value||"Select a task"),1)]),e("button",{class:"rounded border border-destructive/40 px-3 py-1.5 font-mono text-xs text-destructive transition-colors hover:bg-destructive/10",disabled:!a.value,onClick:$},"cancel task",8,ee)]),e("pre",te,i(v.value?JSON.stringify(v.value,null,2):"No task selected."),1)]),e("div",oe,[t[3]||(t[3]=e("div",{class:"border-b border-border px-4 py-3 font-mono text-[10px] uppercase tracking-[0.28em] text-muted-foreground/60"},"Activity log",-1)),e("div",se,[(d(!0),n(g,null,_(f.value,(o,p)=>(d(),n("article",{key:p,class:"mb-3 rounded-lg border border-white/[0.06] bg-sidebar/60 px-4 py-3 font-mono text-xs text-foreground/75"},[e("pre",re,i(JSON.stringify(o,null,2)),1)]))),128)),a.value&&!f.value.length?(d(),n("div",ae,"No activity reported")):h("",!0)])]),e("div",ne,[t[4]||(t[4]=e("div",{class:"border-b border-border px-4 py-3 font-mono text-[10px] uppercase tracking-[0.28em] text-primary"},"Live event preview",-1)),e("div",de,[(d(!0),n(g,null,_(u.value,(o,p)=>(d(),n("div",{key:p,class:"border-b border-border/40 py-2"},i(o),1))),128)),a.value&&!u.value.length?(d(),n("div",ie,"Waiting for live events")):h("",!0),a.value?h("",!0):(d(),n("div",le,"Select a task to attach the stream"))])])])]))}});export{me as default};
@@ -1,4 +1,4 @@
1
- import{d as S,k as M,l as O,c as s,a as e,b as i,F as x,m as f,g as b,f as y,w as T,v as I,e as L,n as N,p as $,r as v,q as h,j as n,t as c,s as u,x as j,_ as V,y as g}from"./index-B3ZOJqJ1.js";const B={class:"h-full overflow-y-auto p-3 md:p-5"},D={class:"mx-auto flex h-full max-w-[980px] flex-col overflow-hidden rounded-lg border border-border bg-card"},z={class:"flex shrink-0 items-center justify-between border-b border-border px-5 py-4"},E={class:"flex items-center gap-2"},H=["disabled"],K={key:0,class:"mb-6 rounded-lg border border-primary/20 bg-primary/5 p-6"},P={class:"mt-4 flex flex-wrap gap-2"},q=["onClick"],F={class:"space-y-3"},R={key:0,class:"whitespace-pre-wrap text-sm leading-relaxed"},W=["innerHTML"],A={key:2,class:"mt-2 font-mono text-[10px] uppercase tracking-[0.22em] text-primary/70"},U=["onKeydown"],G={class:"mt-3 flex items-center justify-between gap-3"},J={type:"submit",class:"flex items-center gap-1 rounded bg-primary/15 px-3 py-1.5 font-mono text-xs text-primary transition-colors hover:bg-primary/25"},Z=S({__name:"ChatView",setup(Q){const a=M(),d=v(""),l=v(null),w=["Summarize current squad health","List unread feed items that need action","What schedules should I watch today?","Show recent MCP changes"],p=h(()=>a.messages.length?a.messages:[{id:"welcome",role:"assistant",text:"IO online. What do you need?",createdAt:new Date().toISOString(),streaming:!1}]),_=h(()=>p.value.map(o=>`${o.id}:${o.text.length}:${o.streaming}`).join("|"));function k(){l.value&&(l.value.scrollTop=l.value.scrollHeight)}async function m(){const o=d.value.trim();o&&(d.value="",await a.sendMessage(o))}async function C(o){d.value=o,await g()}return O(_,async()=>{await g(),k()}),(o,r)=>(n(),s("div",B,[e("section",D,[e("div",z,[r[3]||(r[3]=e("div",null,[e("div",{class:"font-mono text-[10px] uppercase tracking-[0.3em] text-primary"},"Command Console"),e("div",{class:"mt-2 text-sm text-foreground/80"},"Direct operator channel into the orchestrator stream.")],-1)),e("div",E,[e("button",{class:"rounded border border-border px-3 py-1.5 font-mono text-xs text-muted-foreground transition-colors hover:border-primary/40 hover:text-primary",onClick:r[0]||(r[0]=t=>i(a).clearMessages())},"clear"),e("button",{class:"rounded border border-destructive/40 px-3 py-1.5 font-mono text-xs text-destructive transition-colors hover:bg-destructive/10",disabled:!i(a).isLoading,onClick:r[1]||(r[1]=t=>i(a).abortRun())},"abort",8,H)])]),e("div",{ref_key:"scrollPanel",ref:l,class:"flex-1 overflow-y-auto px-5 py-5"},[i(a).messages.length?b("",!0):(n(),s("div",K,[r[4]||(r[4]=e("pre",{class:"font-mono text-xs leading-5 text-primary"},`╔════════════════════════════════════╗
1
+ import{d as S,k as M,l as O,c as s,a as e,b as i,F as x,m as f,g as b,f as y,w as T,v as I,e as L,n as N,p as $,r as v,q as h,j as n,t as c,s as u,x as j,_ as V,y as g}from"./index-D1C7prBJ.js";const B={class:"h-full overflow-y-auto p-3 md:p-5"},D={class:"mx-auto flex h-full max-w-[980px] flex-col overflow-hidden rounded-lg border border-border bg-card"},z={class:"flex shrink-0 items-center justify-between border-b border-border px-5 py-4"},E={class:"flex items-center gap-2"},H=["disabled"],K={key:0,class:"mb-6 rounded-lg border border-primary/20 bg-primary/5 p-6"},P={class:"mt-4 flex flex-wrap gap-2"},q=["onClick"],F={class:"space-y-3"},R={key:0,class:"whitespace-pre-wrap text-sm leading-relaxed"},W=["innerHTML"],A={key:2,class:"mt-2 font-mono text-[10px] uppercase tracking-[0.22em] text-primary/70"},U=["onKeydown"],G={class:"mt-3 flex items-center justify-between gap-3"},J={type:"submit",class:"flex items-center gap-1 rounded bg-primary/15 px-3 py-1.5 font-mono text-xs text-primary transition-colors hover:bg-primary/25"},Z=S({__name:"ChatView",setup(Q){const a=M(),d=v(""),l=v(null),w=["Summarize current squad health","List unread feed items that need action","What schedules should I watch today?","Show recent MCP changes"],p=h(()=>a.messages.length?a.messages:[{id:"welcome",role:"assistant",text:"IO online. What do you need?",createdAt:new Date().toISOString(),streaming:!1}]),_=h(()=>p.value.map(o=>`${o.id}:${o.text.length}:${o.streaming}`).join("|"));function k(){l.value&&(l.value.scrollTop=l.value.scrollHeight)}async function m(){const o=d.value.trim();o&&(d.value="",await a.sendMessage(o))}async function C(o){d.value=o,await g()}return O(_,async()=>{await g(),k()}),(o,r)=>(n(),s("div",B,[e("section",D,[e("div",z,[r[3]||(r[3]=e("div",null,[e("div",{class:"font-mono text-[10px] uppercase tracking-[0.3em] text-primary"},"Command Console"),e("div",{class:"mt-2 text-sm text-foreground/80"},"Direct operator channel into the orchestrator stream.")],-1)),e("div",E,[e("button",{class:"rounded border border-border px-3 py-1.5 font-mono text-xs text-muted-foreground transition-colors hover:border-primary/40 hover:text-primary",onClick:r[0]||(r[0]=t=>i(a).clearMessages())},"clear"),e("button",{class:"rounded border border-destructive/40 px-3 py-1.5 font-mono text-xs text-destructive transition-colors hover:bg-destructive/10",disabled:!i(a).isLoading,onClick:r[1]||(r[1]=t=>i(a).abortRun())},"abort",8,H)])]),e("div",{ref_key:"scrollPanel",ref:l,class:"flex-1 overflow-y-auto px-5 py-5"},[i(a).messages.length?b("",!0):(n(),s("div",K,[r[4]||(r[4]=e("pre",{class:"font-mono text-xs leading-5 text-primary"},`╔════════════════════════════════════╗
2
2
  ║ IO // MISSION CONTROL CONSOLE ║
3
3
  ║ route prompts, inspect streams ║
4
4
  ╚════════════════════════════════════╝`,-1)),e("div",P,[(n(),s(x,null,f(w,t=>e("button",{key:t,class:"rounded-full border border-border bg-sidebar px-3 py-1.5 font-mono text-xs text-foreground/75 transition-colors hover:border-primary/40 hover:text-primary",onClick:X=>C(t)},c(t),9,q)),64))])])),e("div",F,[(n(!0),s(x,null,f(p.value,t=>(n(),s("article",{key:t.id,class:u(["flex",t.role==="user"?"justify-end":"justify-start"])},[e("div",{class:u(["max-w-[82%] rounded-lg border px-4 py-3",t.role==="user"?"rounded-br-sm border-primary/20 bg-primary/15 font-mono text-primary":"rounded-bl-sm border-white/[0.06] bg-white/[0.04] text-foreground/75"])},[e("div",{class:u(["mb-2 font-mono text-[10px] uppercase tracking-[0.2em]",t.role==="user"?"text-primary":"text-muted-foreground/60"])},c(t.role),3),t.role==="user"?(n(),s("div",R,c(t.text),1)):(n(),s("div",{key:1,class:"wiki-content text-sm",innerHTML:i(j)(t.text||(t.streaming?"…":""))},null,8,W)),t.streaming?(n(),s("div",A,"streaming…")):b("",!0)],2)],2))),128))])],512),e("form",{class:"shrink-0 border-t border-border px-5 py-4",onSubmit:y(m,["prevent"])},[T(e("textarea",{"onUpdate:modelValue":r[2]||(r[2]=t=>d.value=t),rows:"4",class:"w-full rounded-lg border border-border bg-sidebar px-4 py-3 text-sm text-foreground placeholder:text-muted-foreground/40",placeholder:"Type a prompt for IO. Ctrl+Enter sends.",onKeydown:L(y(m,["ctrl","prevent"]),["enter"])},null,40,U),[[I,d.value]]),e("div",G,[r[6]||(r[6]=e("div",{class:"font-mono text-[11px] text-muted-foreground/55"},"Ctrl+. opens the floating command bar.",-1)),e("button",J,[N(V,{name:"zap",class:"h-3 w-3"}),r[5]||(r[5]=$(" dispatch ",-1))])])],32)])]))}});export{Z as default};
@@ -1 +1 @@
1
- import{d as C,o as S,c as o,a as t,F as b,m as g,r as u,q as j,G as x,j as a,z as F,b as l,B as T,E as h,t as i,s as y,J as M,g as k,n as z,A as B,x as E,T as L,U as N}from"./index-B3ZOJqJ1.js";const O={class:"h-full overflow-y-auto p-5"},V={class:"mx-auto max-w-4xl"},A={key:0,class:"rounded-lg border border-border bg-card px-5 py-10 font-mono text-xs uppercase tracking-[0.22em] text-muted-foreground/50"},I={key:1,class:"rounded-lg border border-dashed border-border bg-card/30 px-5 py-10 font-mono text-xs uppercase tracking-[0.22em] text-muted-foreground/50"},R={key:2,class:"space-y-4"},q={class:"border-b border-border/50 px-5 py-3"},D=["onClick"],H={class:"flex items-start gap-3"},P={class:"mt-1.5 shrink-0"},U={key:0,class:"h-1.5 w-1.5 rounded-full bg-primary",style:{boxShadow:"var(--glow-cyan)"}},$={key:1,class:"h-1.5 w-1.5"},G={class:"min-w-0 flex-1"},J={class:"mb-1 flex flex-wrap items-center gap-1.5"},K={class:"font-mono text-[10px] text-muted-foreground/50"},Q={class:"text-[10px] text-muted-foreground/50"},W={class:"flex items-center justify-between gap-2"},X={class:"font-mono text-[10px] text-muted-foreground/40"},Y={key:0,class:"text-[10px] text-primary/60"},Z={key:0,class:"mt-3 rounded border border-white/[0.06] bg-black/30 p-3 text-xs text-foreground/60"},ee=["innerHTML"],oe=C({__name:"FeedView",setup(te){const f=u([]),m=u({}),c=u(null),p=u(!1),v=j(()=>{var r;const s=new Map;for(const n of f.value){const e=n.squad_slug??"io",d=m.value[e];s.has(e)||s.set(e,{key:e,label:(d==null?void 0:d.name)??N(e),universe:d==null?void 0:d.universe,entries:[]}),(r=s.get(e))==null||r.entries.push(n)}return[...s.values()]});async function _(){p.value=!0;try{const[s,r]=await Promise.all([x("/api/feed?limit=120"),x("/api/squads")]);if(s.ok&&(f.value=(await s.json()).entries),r.ok){const n=await r.json();m.value=Object.fromEntries(n.squads.map(e=>[e.slug??e.id??e.name.toLowerCase(),{name:e.name,universe:e.universe}]))}}finally{p.value=!1}}async function w(s){c.value=c.value===s.id?null:s.id,s.read_at||(await x(`/api/feed/${s.id}/read`,{method:"POST"}).catch(()=>null),s.read_at=new Date().toISOString())}return S(_),(s,r)=>(a(),o("div",O,[t("div",V,[t("div",{class:"mb-5 flex items-center justify-between gap-3"},[r[0]||(r[0]=t("div",null,[t("div",{class:"font-mono text-[10px] uppercase tracking-[0.3em] text-primary"},"Activity Feed"),t("div",{class:"mt-2 text-sm text-foreground/70"},"Unread events keep the cyan indicator and expand inline for detail.")],-1)),t("button",{class:"rounded border border-border px-3 py-1.5 font-mono text-xs text-muted-foreground transition-colors hover:border-primary/40 hover:text-primary",onClick:_},"refresh")]),p.value?(a(),o("div",A,"Syncing feed…")):v.value.length?(a(),o("div",R,[(a(!0),o(b,null,g(v.value,n=>(a(),o("section",{key:n.key,class:"overflow-hidden rounded-lg border border-border bg-card"},[t("div",q,[t("span",{class:"rounded px-1.5 py-0.5 font-mono text-[10px]",style:F({color:l(h)(n.universe),backgroundColor:l(T)(l(h)(n.universe),.15)})},i(n.label),5)]),(a(!0),o(b,null,g(n.entries,e=>(a(),o("article",{key:e.id,class:y(["cursor-pointer border-b border-border/40 px-5 py-4 transition-colors last:border-b-0 hover:bg-white/[0.02]",e.read_at?"":"bg-white/[0.015]"]),onClick:d=>w(e)},[t("div",H,[t("div",P,[e.read_at?(a(),o("div",$)):(a(),o("div",U))]),t("div",G,[t("div",J,[t("span",K,i(e.source_ref??e.instance_id??e.task_id??e.type),1),r[1]||(r[1]=t("span",{class:"font-mono text-[10px] text-muted-foreground/40"},"·",-1)),t("span",Q,i(e.source_type??"IO"),1)]),t("div",{class:y(["mb-1 text-sm leading-snug",e.read_at?"text-foreground/70":"text-foreground"])},i(e.title),3),t("div",W,[t("span",X,i(l(M)(e.created_at)),1),e.body?(a(),o("span",Y,i(c.value===e.id?"▲ collapse":"▼ details"),1)):k("",!0)]),z(L,{"enter-active-class":"duration-150 ease-out","enter-from-class":"opacity-0 -translate-y-1","enter-to-class":"opacity-100 translate-y-0","leave-active-class":"duration-100 ease-in","leave-from-class":"opacity-100 translate-y-0","leave-to-class":"opacity-0 -translate-y-1"},{default:B(()=>[c.value===e.id&&e.body?(a(),o("div",Z,[t("div",{class:"wiki-content text-xs font-mono leading-relaxed",innerHTML:l(E)(e.body)},null,8,ee)])):k("",!0)]),_:2},1024)])])],10,D))),128))]))),128))])):(a(),o("div",I,"No feed activity."))])]))}});export{oe as default};
1
+ import{d as C,o as S,c as o,a as t,F as b,m as g,r as u,q as j,G as x,j as a,z as F,b as l,B as T,E as h,t as i,s as y,J as M,g as k,n as z,A as B,x as E,T as L,U as N}from"./index-D1C7prBJ.js";const O={class:"h-full overflow-y-auto p-5"},V={class:"mx-auto max-w-4xl"},A={key:0,class:"rounded-lg border border-border bg-card px-5 py-10 font-mono text-xs uppercase tracking-[0.22em] text-muted-foreground/50"},I={key:1,class:"rounded-lg border border-dashed border-border bg-card/30 px-5 py-10 font-mono text-xs uppercase tracking-[0.22em] text-muted-foreground/50"},R={key:2,class:"space-y-4"},q={class:"border-b border-border/50 px-5 py-3"},D=["onClick"],H={class:"flex items-start gap-3"},P={class:"mt-1.5 shrink-0"},U={key:0,class:"h-1.5 w-1.5 rounded-full bg-primary",style:{boxShadow:"var(--glow-cyan)"}},$={key:1,class:"h-1.5 w-1.5"},G={class:"min-w-0 flex-1"},J={class:"mb-1 flex flex-wrap items-center gap-1.5"},K={class:"font-mono text-[10px] text-muted-foreground/50"},Q={class:"text-[10px] text-muted-foreground/50"},W={class:"flex items-center justify-between gap-2"},X={class:"font-mono text-[10px] text-muted-foreground/40"},Y={key:0,class:"text-[10px] text-primary/60"},Z={key:0,class:"mt-3 rounded border border-white/[0.06] bg-black/30 p-3 text-xs text-foreground/60"},ee=["innerHTML"],oe=C({__name:"FeedView",setup(te){const f=u([]),m=u({}),c=u(null),p=u(!1),v=j(()=>{var r;const s=new Map;for(const n of f.value){const e=n.squad_slug??"io",d=m.value[e];s.has(e)||s.set(e,{key:e,label:(d==null?void 0:d.name)??N(e),universe:d==null?void 0:d.universe,entries:[]}),(r=s.get(e))==null||r.entries.push(n)}return[...s.values()]});async function _(){p.value=!0;try{const[s,r]=await Promise.all([x("/api/feed?limit=120"),x("/api/squads")]);if(s.ok&&(f.value=(await s.json()).entries),r.ok){const n=await r.json();m.value=Object.fromEntries(n.squads.map(e=>[e.slug??e.id??e.name.toLowerCase(),{name:e.name,universe:e.universe}]))}}finally{p.value=!1}}async function w(s){c.value=c.value===s.id?null:s.id,s.read_at||(await x(`/api/feed/${s.id}/read`,{method:"POST"}).catch(()=>null),s.read_at=new Date().toISOString())}return S(_),(s,r)=>(a(),o("div",O,[t("div",V,[t("div",{class:"mb-5 flex items-center justify-between gap-3"},[r[0]||(r[0]=t("div",null,[t("div",{class:"font-mono text-[10px] uppercase tracking-[0.3em] text-primary"},"Activity Feed"),t("div",{class:"mt-2 text-sm text-foreground/70"},"Unread events keep the cyan indicator and expand inline for detail.")],-1)),t("button",{class:"rounded border border-border px-3 py-1.5 font-mono text-xs text-muted-foreground transition-colors hover:border-primary/40 hover:text-primary",onClick:_},"refresh")]),p.value?(a(),o("div",A,"Syncing feed…")):v.value.length?(a(),o("div",R,[(a(!0),o(b,null,g(v.value,n=>(a(),o("section",{key:n.key,class:"overflow-hidden rounded-lg border border-border bg-card"},[t("div",q,[t("span",{class:"rounded px-1.5 py-0.5 font-mono text-[10px]",style:F({color:l(h)(n.universe),backgroundColor:l(T)(l(h)(n.universe),.15)})},i(n.label),5)]),(a(!0),o(b,null,g(n.entries,e=>(a(),o("article",{key:e.id,class:y(["cursor-pointer border-b border-border/40 px-5 py-4 transition-colors last:border-b-0 hover:bg-white/[0.02]",e.read_at?"":"bg-white/[0.015]"]),onClick:d=>w(e)},[t("div",H,[t("div",P,[e.read_at?(a(),o("div",$)):(a(),o("div",U))]),t("div",G,[t("div",J,[t("span",K,i(e.source_ref??e.instance_id??e.task_id??e.type),1),r[1]||(r[1]=t("span",{class:"font-mono text-[10px] text-muted-foreground/40"},"·",-1)),t("span",Q,i(e.source_type??"IO"),1)]),t("div",{class:y(["mb-1 text-sm leading-snug",e.read_at?"text-foreground/70":"text-foreground"])},i(e.title),3),t("div",W,[t("span",X,i(l(M)(e.created_at)),1),e.body?(a(),o("span",Y,i(c.value===e.id?"▲ collapse":"▼ details"),1)):k("",!0)]),z(L,{"enter-active-class":"duration-150 ease-out","enter-from-class":"opacity-0 -translate-y-1","enter-to-class":"opacity-100 translate-y-0","leave-active-class":"duration-100 ease-in","leave-from-class":"opacity-100 translate-y-0","leave-to-class":"opacity-0 -translate-y-1"},{default:B(()=>[c.value===e.id&&e.body?(a(),o("div",Z,[t("div",{class:"wiki-content text-xs font-mono leading-relaxed",innerHTML:l(E)(e.body)},null,8,ee)])):k("",!0)]),_:2},1024)])])],10,D))),128))]))),128))])):(a(),o("div",I,"No feed activity."))])]))}});export{oe as default};
@@ -1 +1 @@
1
- import{d as g,o as _,c as n,a as e,t as o,F as h,m as y,g as k,b as p,J as b,r as m,q as w,G as x,j as i,s as C}from"./index-B3ZOJqJ1.js";const j={class:"grid h-full min-h-0 gap-5 p-5 xl:grid-cols-[360px_minmax(0,1fr)]"},E={class:"flex min-h-0 flex-col overflow-hidden rounded-lg border border-border bg-card"},I={class:"border-b border-border px-5 py-4"},B={class:"mt-2 flex items-end justify-between gap-3"},F={class:"text-3xl font-semibold"},N={class:"min-h-0 flex-1 overflow-y-auto p-3"},R=["onClick"],S={class:"flex items-center justify-between gap-3"},V={class:"truncate text-sm font-medium"},$={class:"font-mono text-[10px] uppercase tracking-[0.2em] text-accent-foreground"},q={class:"mt-2 text-sm leading-6 text-foreground/65"},D={class:"mt-3 font-mono text-[11px] uppercase tracking-[0.18em] text-muted-foreground/55"},L={key:0,class:"rounded-lg border border-dashed border-border px-4 py-12 text-center font-mono text-xs uppercase tracking-[0.22em] text-muted-foreground/45"},T={class:"flex min-h-0 flex-col overflow-hidden rounded-lg border border-border bg-card"},z={class:"border-b border-border px-6 py-4"},G={class:"mt-2 text-lg font-semibold"},J={class:"min-h-0 flex-1 overflow-y-auto px-6 py-6"},M={key:0,class:"grid gap-5 lg:grid-cols-[1fr_220px]"},P={class:"rounded-lg border border-white/[0.06] bg-sidebar/60 px-5 py-5 text-sm leading-7 text-foreground/75"},A={class:"rounded-lg border border-white/[0.06] bg-sidebar/60 px-5 py-5 font-mono text-xs uppercase tracking-[0.18em] text-muted-foreground/55"},H={class:"mt-2 text-foreground"},K={class:"mt-2 text-accent-foreground"},O={class:"mt-2 text-foreground/80"},Q={key:1,class:"flex h-full items-center justify-center font-mono text-xs uppercase tracking-[0.22em] text-muted-foreground/45"},Y=g({__name:"InboxView",setup(U){const a=m([]),c=m(null),f=m(0),s=w(()=>a.value.find(d=>d.id===c.value)??null);async function u(){var l;const[d,t]=await Promise.all([x("/api/inbox/count"),x("/api/inbox")]);d.ok&&(f.value=(await d.json()).count??0),t.ok&&(a.value=(await t.json()).entries,c.value=((l=a.value[0])==null?void 0:l.id)??null)}async function v(d){await x(`/api/inbox/${d}`,{method:"DELETE"}),await u()}return _(u),(d,t)=>{var l;return i(),n("div",j,[e("section",E,[e("div",I,[t[2]||(t[2]=e("div",{class:"font-mono text-[10px] uppercase tracking-[0.28em] text-accent-foreground"},"Inbox",-1)),e("div",B,[e("div",null,[e("div",F,o(f.value),1),t[1]||(t[1]=e("div",{class:"font-mono text-xs uppercase tracking-[0.18em] text-muted-foreground/55"},"active inbox entries",-1))]),e("button",{class:"rounded border border-border px-3 py-1.5 font-mono text-xs text-muted-foreground transition-colors hover:border-accent-foreground/40 hover:text-accent-foreground",onClick:u},"refresh")])]),e("div",N,[(i(!0),n(h,null,y(a.value,r=>(i(),n("button",{key:r.id,class:C(["mb-2 w-full rounded-lg border px-4 py-4 text-left transition-colors",c.value===r.id?"border-accent-foreground/40 bg-accent-foreground/10":"border-border bg-sidebar/40 hover:bg-white/[0.03]"]),onClick:W=>c.value=r.id},[e("div",S,[e("div",V,o(r.title),1),e("div",$,o(r.type),1)]),e("div",q,o(r.body),1),e("div",D,o(p(b)(r.created_at)),1)],10,R))),128)),a.value.length?k("",!0):(i(),n("div",L,"Inbox is empty"))])]),e("section",T,[e("div",z,[t[3]||(t[3]=e("div",{class:"font-mono text-[10px] uppercase tracking-[0.28em] text-primary"},"Selected message",-1)),e("div",G,o(((l=s.value)==null?void 0:l.title)??"No message selected"),1)]),e("div",J,[s.value?(i(),n("div",M,[e("article",P,o(s.value.body),1),e("aside",A,[t[4]||(t[4]=e("div",null,"source",-1)),e("div",H,o(s.value.source_type??"inbox"),1),t[5]||(t[5]=e("div",{class:"mt-4"},"reference",-1)),e("div",K,o(s.value.source_ref??s.value.squad_slug??"—"),1),t[6]||(t[6]=e("div",{class:"mt-4"},"received",-1)),e("div",O,o(p(b)(s.value.created_at)),1),e("button",{class:"mt-6 w-full rounded border border-destructive/40 px-4 py-2 text-destructive transition-colors hover:bg-destructive/10",onClick:t[0]||(t[0]=r=>v(s.value.id))},"dismiss")])])):(i(),n("div",Q,"Select a message from the left rail"))])])])}}});export{Y as default};
1
+ import{d as g,o as _,c as n,a as e,t as o,F as h,m as y,g as k,b as p,J as b,r as m,q as w,G as x,j as i,s as C}from"./index-D1C7prBJ.js";const j={class:"grid h-full min-h-0 gap-5 p-5 xl:grid-cols-[360px_minmax(0,1fr)]"},E={class:"flex min-h-0 flex-col overflow-hidden rounded-lg border border-border bg-card"},I={class:"border-b border-border px-5 py-4"},B={class:"mt-2 flex items-end justify-between gap-3"},F={class:"text-3xl font-semibold"},N={class:"min-h-0 flex-1 overflow-y-auto p-3"},R=["onClick"],S={class:"flex items-center justify-between gap-3"},V={class:"truncate text-sm font-medium"},$={class:"font-mono text-[10px] uppercase tracking-[0.2em] text-accent-foreground"},q={class:"mt-2 text-sm leading-6 text-foreground/65"},D={class:"mt-3 font-mono text-[11px] uppercase tracking-[0.18em] text-muted-foreground/55"},L={key:0,class:"rounded-lg border border-dashed border-border px-4 py-12 text-center font-mono text-xs uppercase tracking-[0.22em] text-muted-foreground/45"},T={class:"flex min-h-0 flex-col overflow-hidden rounded-lg border border-border bg-card"},z={class:"border-b border-border px-6 py-4"},G={class:"mt-2 text-lg font-semibold"},J={class:"min-h-0 flex-1 overflow-y-auto px-6 py-6"},M={key:0,class:"grid gap-5 lg:grid-cols-[1fr_220px]"},P={class:"rounded-lg border border-white/[0.06] bg-sidebar/60 px-5 py-5 text-sm leading-7 text-foreground/75"},A={class:"rounded-lg border border-white/[0.06] bg-sidebar/60 px-5 py-5 font-mono text-xs uppercase tracking-[0.18em] text-muted-foreground/55"},H={class:"mt-2 text-foreground"},K={class:"mt-2 text-accent-foreground"},O={class:"mt-2 text-foreground/80"},Q={key:1,class:"flex h-full items-center justify-center font-mono text-xs uppercase tracking-[0.22em] text-muted-foreground/45"},Y=g({__name:"InboxView",setup(U){const a=m([]),c=m(null),f=m(0),s=w(()=>a.value.find(d=>d.id===c.value)??null);async function u(){var l;const[d,t]=await Promise.all([x("/api/inbox/count"),x("/api/inbox")]);d.ok&&(f.value=(await d.json()).count??0),t.ok&&(a.value=(await t.json()).entries,c.value=((l=a.value[0])==null?void 0:l.id)??null)}async function v(d){await x(`/api/inbox/${d}`,{method:"DELETE"}),await u()}return _(u),(d,t)=>{var l;return i(),n("div",j,[e("section",E,[e("div",I,[t[2]||(t[2]=e("div",{class:"font-mono text-[10px] uppercase tracking-[0.28em] text-accent-foreground"},"Inbox",-1)),e("div",B,[e("div",null,[e("div",F,o(f.value),1),t[1]||(t[1]=e("div",{class:"font-mono text-xs uppercase tracking-[0.18em] text-muted-foreground/55"},"active inbox entries",-1))]),e("button",{class:"rounded border border-border px-3 py-1.5 font-mono text-xs text-muted-foreground transition-colors hover:border-accent-foreground/40 hover:text-accent-foreground",onClick:u},"refresh")])]),e("div",N,[(i(!0),n(h,null,y(a.value,r=>(i(),n("button",{key:r.id,class:C(["mb-2 w-full rounded-lg border px-4 py-4 text-left transition-colors",c.value===r.id?"border-accent-foreground/40 bg-accent-foreground/10":"border-border bg-sidebar/40 hover:bg-white/[0.03]"]),onClick:W=>c.value=r.id},[e("div",S,[e("div",V,o(r.title),1),e("div",$,o(r.type),1)]),e("div",q,o(r.body),1),e("div",D,o(p(b)(r.created_at)),1)],10,R))),128)),a.value.length?k("",!0):(i(),n("div",L,"Inbox is empty"))])]),e("section",T,[e("div",z,[t[3]||(t[3]=e("div",{class:"font-mono text-[10px] uppercase tracking-[0.28em] text-primary"},"Selected message",-1)),e("div",G,o(((l=s.value)==null?void 0:l.title)??"No message selected"),1)]),e("div",J,[s.value?(i(),n("div",M,[e("article",P,o(s.value.body),1),e("aside",A,[t[4]||(t[4]=e("div",null,"source",-1)),e("div",H,o(s.value.source_type??"inbox"),1),t[5]||(t[5]=e("div",{class:"mt-4"},"reference",-1)),e("div",K,o(s.value.source_ref??s.value.squad_slug??"—"),1),t[6]||(t[6]=e("div",{class:"mt-4"},"received",-1)),e("div",O,o(p(b)(s.value.created_at)),1),e("button",{class:"mt-6 w-full rounded border border-destructive/40 px-4 py-2 text-destructive transition-colors hover:bg-destructive/10",onClick:t[0]||(t[0]=r=>v(s.value.id))},"dismiss")])])):(i(),n("div",Q,"Select a message from the left rail"))])])])}}});export{Y as default};
@@ -1 +1 @@
1
- import{d as y,u as v,o as w,c as i,a as e,t as c,b as r,w as g,v as f,e as h,f as k,g as _,h as C,r as p,i as V,j as d}from"./index-B3ZOJqJ1.js";const E={class:"dark flex h-full items-center justify-center bg-background px-6"},M={class:"w-full max-w-md rounded-lg border border-border bg-card px-8 py-8 shadow-[0_20px_60px_rgba(0,0,0,0.45)]"},S={class:"mt-2 text-sm leading-6 text-muted-foreground"},q={key:0,class:"mt-6 space-y-4"},A={class:"block"},B={class:"block"},K=["onKeydown"],j={key:0,class:"rounded border border-destructive/25 bg-destructive/10 px-4 py-3 text-sm text-destructive"},D=["disabled"],N=y({__name:"LoginView",setup(I){const m=C(),b=V(),o=v(),l=p(""),u=p(""),n=p("");async function x(){n.value="";try{await o.signIn(l.value,u.value);const s=typeof b.query.redirect=="string"?b.query.redirect:"/chat";m.push(s)}catch(s){n.value=s instanceof Error?s.message:"Sign-in failed."}}return w(()=>{o.init()}),(s,t)=>(d(),i("div",E,[e("section",M,[t[5]||(t[5]=e("div",{class:"font-mono text-xl font-bold tracking-tight text-primary text-glow-cyan"},"IO",-1)),t[6]||(t[6]=e("div",{class:"mt-3 text-2xl font-semibold"},"Mission Control Login",-1)),e("p",S,c(r(o).authEnabled?"Authenticate against Supabase to access squads, feed, wiki, and orchestration controls.":"Authentication is disabled for this workspace."),1),r(o).authEnabled?(d(),i("div",q,[e("label",A,[t[3]||(t[3]=e("span",{class:"mb-2 block font-mono text-[11px] uppercase tracking-[0.18em] text-muted-foreground/70"},"email",-1)),g(e("input",{"onUpdate:modelValue":t[0]||(t[0]=a=>l.value=a),type:"email",class:"w-full rounded border border-border bg-sidebar px-4 py-3 text-sm text-foreground"},null,512),[[f,l.value]])]),e("label",B,[t[4]||(t[4]=e("span",{class:"mb-2 block font-mono text-[11px] uppercase tracking-[0.18em] text-muted-foreground/70"},"password",-1)),g(e("input",{"onUpdate:modelValue":t[1]||(t[1]=a=>u.value=a),type:"password",class:"w-full rounded border border-border bg-sidebar px-4 py-3 text-sm text-foreground",onKeydown:h(k(x,["prevent"]),["enter"])},null,40,K),[[f,u.value]])]),n.value?(d(),i("div",j,c(n.value),1)):_("",!0),e("button",{class:"w-full rounded bg-primary/15 px-4 py-3 font-mono text-sm text-primary transition-colors hover:bg-primary/25",disabled:r(o).loading,onClick:x},c(r(o).loading?"connecting…":"sign in"),9,D)])):(d(),i("button",{key:1,class:"mt-6 w-full rounded bg-primary/15 px-4 py-3 font-mono text-sm text-primary transition-colors hover:bg-primary/25",onClick:t[2]||(t[2]=a=>r(m).push("/chat"))},"continue to mission control"))])]))}});export{N as default};
1
+ import{d as y,u as v,o as w,c as i,a as e,t as c,b as r,w as g,v as f,e as h,f as k,g as _,h as C,r as p,i as V,j as d}from"./index-D1C7prBJ.js";const E={class:"dark flex h-full items-center justify-center bg-background px-6"},M={class:"w-full max-w-md rounded-lg border border-border bg-card px-8 py-8 shadow-[0_20px_60px_rgba(0,0,0,0.45)]"},S={class:"mt-2 text-sm leading-6 text-muted-foreground"},q={key:0,class:"mt-6 space-y-4"},A={class:"block"},B={class:"block"},K=["onKeydown"],j={key:0,class:"rounded border border-destructive/25 bg-destructive/10 px-4 py-3 text-sm text-destructive"},D=["disabled"],N=y({__name:"LoginView",setup(I){const m=C(),b=V(),o=v(),l=p(""),u=p(""),n=p("");async function x(){n.value="";try{await o.signIn(l.value,u.value);const s=typeof b.query.redirect=="string"?b.query.redirect:"/chat";m.push(s)}catch(s){n.value=s instanceof Error?s.message:"Sign-in failed."}}return w(()=>{o.init()}),(s,t)=>(d(),i("div",E,[e("section",M,[t[5]||(t[5]=e("div",{class:"font-mono text-xl font-bold tracking-tight text-primary text-glow-cyan"},"IO",-1)),t[6]||(t[6]=e("div",{class:"mt-3 text-2xl font-semibold"},"Mission Control Login",-1)),e("p",S,c(r(o).authEnabled?"Authenticate against Supabase to access squads, feed, wiki, and orchestration controls.":"Authentication is disabled for this workspace."),1),r(o).authEnabled?(d(),i("div",q,[e("label",A,[t[3]||(t[3]=e("span",{class:"mb-2 block font-mono text-[11px] uppercase tracking-[0.18em] text-muted-foreground/70"},"email",-1)),g(e("input",{"onUpdate:modelValue":t[0]||(t[0]=a=>l.value=a),type:"email",class:"w-full rounded border border-border bg-sidebar px-4 py-3 text-sm text-foreground"},null,512),[[f,l.value]])]),e("label",B,[t[4]||(t[4]=e("span",{class:"mb-2 block font-mono text-[11px] uppercase tracking-[0.18em] text-muted-foreground/70"},"password",-1)),g(e("input",{"onUpdate:modelValue":t[1]||(t[1]=a=>u.value=a),type:"password",class:"w-full rounded border border-border bg-sidebar px-4 py-3 text-sm text-foreground",onKeydown:h(k(x,["prevent"]),["enter"])},null,40,K),[[f,u.value]])]),n.value?(d(),i("div",j,c(n.value),1)):_("",!0),e("button",{class:"w-full rounded bg-primary/15 px-4 py-3 font-mono text-sm text-primary transition-colors hover:bg-primary/25",disabled:r(o).loading,onClick:x},c(r(o).loading?"connecting…":"sign in"),9,D)])):(d(),i("button",{key:1,class:"mt-6 w-full rounded bg-primary/15 px-4 py-3 font-mono text-sm text-primary transition-colors hover:bg-primary/25",onClick:t[2]||(t[2]=a=>r(m).push("/chat"))},"continue to mission control"))])]))}});export{N as default};
@@ -1 +1 @@
1
- import{d as V,o as $,D as j,A as w,G as m,r as x,j as n,a as t,n as v,p as U,c as d,w as f,v as h,Q as E,t as a,g as b,f as P,T as A,m as k,z as B,s as _,F as C,_ as S}from"./index-B3ZOJqJ1.js";import{_ as D}from"./SettingsTabs.vue_vue_type_script_setup_true_lang-B7GKSgO5.js";const O={class:"max-w-2xl space-y-4"},z={class:"flex items-center justify-between"},F={class:"grid grid-cols-2 gap-3"},I={class:"mb-1 block font-mono text-[10px] uppercase tracking-wider text-muted-foreground/60"},L=["placeholder"],R={key:0,class:"rounded border border-destructive/25 bg-destructive/10 px-3 py-2 text-sm text-destructive"},H={class:"flex justify-end gap-2"},J={class:"space-y-2"},G={class:"flex items-center gap-3 px-4 py-3"},Q={class:"min-w-0 flex-1"},q={class:"mb-0.5 flex items-center gap-2"},K={class:"text-sm font-medium"},W={class:"rounded bg-white/5 px-1.5 py-0.5 font-mono text-[10px] text-muted-foreground"},X={class:"block truncate font-mono text-[11px] text-muted-foreground/50"},Y=["onClick"],Z=["onClick"],ee={key:0,class:"flex flex-wrap gap-1.5 border-t border-border/40 px-4 py-2"},se=V({__name:"McpView",setup(te){const g=x([]),l=x(!1),s=x({name:"",transport:"stdio",command:""}),i=x("");function u(r){return r.enabled===!1?"disabled":"connected"}function y(r){var e,o;return(e=r.tools)!=null&&e.length?r.tools:(o=r.args)!=null&&o.length?r.args:[]}async function c(){const r=await m("/api/mcp/servers");r.ok&&(g.value=(await r.json()).servers)}async function T(){if(i.value="",!s.value.name.trim()||!s.value.command.trim())return;const r={name:s.value.name.trim()};s.value.transport==="stdio"?r.command=s.value.command.trim():r.url=s.value.command.trim();const e=await m("/api/mcp/servers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)});if(!e.ok){i.value=await e.text()||"Unable to add server.";return}s.value={name:"",transport:"stdio",command:""},l.value=!1,await c()}async function M(r){await m(`/api/mcp/servers/${encodeURIComponent(r)}`,{method:"DELETE"}),await c()}async function N(r,e){await m(`/api/mcp/servers/${encodeURIComponent(r)}/toggle`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({enabled:!e})}),await c()}return $(c),(r,e)=>(n(),j(D,{active:"mcp"},{default:w(()=>[t("div",O,[t("div",z,[e[6]||(e[6]=t("p",{class:"text-xs text-muted-foreground"},"MCP servers extend IO agents with additional tools and data sources.",-1)),t("button",{class:"flex items-center gap-1.5 rounded border border-border px-3 py-1.5 font-mono text-xs text-muted-foreground transition-all hover:border-primary/40 hover:bg-primary/5 hover:text-primary",onClick:e[0]||(e[0]=o=>l.value=!l.value)},[v(S,{name:"plus",class:"h-3 w-3"}),e[5]||(e[5]=U(" Add server ",-1))])]),v(A,{"enter-active-class":"duration-150 ease-out","enter-from-class":"opacity-0 -translate-y-1","enter-to-class":"opacity-100 translate-y-0","leave-active-class":"duration-100 ease-in","leave-from-class":"opacity-100 translate-y-0","leave-to-class":"opacity-0 -translate-y-1"},{default:w(()=>[l.value?(n(),d("form",{key:0,class:"space-y-3 rounded-lg border border-primary/30 bg-primary/[0.04] p-4",onSubmit:P(T,["prevent"])},[e[11]||(e[11]=t("div",{class:"mb-1 font-mono text-xs text-primary/80"},"New MCP Server",-1)),t("div",F,[t("div",null,[e[7]||(e[7]=t("label",{class:"mb-1 block font-mono text-[10px] uppercase tracking-wider text-muted-foreground/60"},"Name",-1)),f(t("input",{"onUpdate:modelValue":e[1]||(e[1]=o=>s.value.name=o),class:"w-full rounded border border-border bg-black/30 px-3 py-1.5 text-xs font-mono placeholder:text-muted-foreground/30",placeholder:"My Server"},null,512),[[h,s.value.name]])]),t("div",null,[e[9]||(e[9]=t("label",{class:"mb-1 block font-mono text-[10px] uppercase tracking-wider text-muted-foreground/60"},"Transport",-1)),f(t("select",{"onUpdate:modelValue":e[2]||(e[2]=o=>s.value.transport=o),class:"w-full rounded border border-border bg-black/30 px-3 py-1.5 text-xs font-mono"},[...e[8]||(e[8]=[t("option",{value:"stdio"},"stdio",-1),t("option",{value:"http"},"HTTP/SSE",-1)])],512),[[E,s.value.transport]])])]),t("div",null,[t("label",I,a(s.value.transport==="stdio"?"Command":"URL"),1),f(t("input",{"onUpdate:modelValue":e[3]||(e[3]=o=>s.value.command=o),class:"w-full rounded border border-border bg-black/30 px-3 py-1.5 text-xs font-mono placeholder:text-muted-foreground/30",placeholder:s.value.transport==="stdio"?"npx @modelcontextprotocol/server-...":"https://..."},null,8,L),[[h,s.value.command]])]),i.value?(n(),d("div",R,a(i.value),1)):b("",!0),t("div",H,[t("button",{type:"button",class:"px-3 py-1.5 font-mono text-xs text-muted-foreground transition-colors hover:text-foreground",onClick:e[4]||(e[4]=o=>l.value=!1)},"Cancel"),e[10]||(e[10]=t("button",{type:"submit",class:"rounded bg-primary/15 px-3 py-1.5 font-mono text-xs text-primary transition-colors hover:bg-primary/25"},"Add",-1))])],32)):b("",!0)]),_:1}),t("div",J,[(n(!0),d(C,null,k(g.value,o=>(n(),d("article",{key:o.name,class:"overflow-hidden rounded-lg border border-border bg-card"},[t("div",G,[t("div",{class:_(["h-2 w-2 shrink-0 rounded-full",u(o)==="connected"?"bg-status-success":"bg-destructive"]),style:B({boxShadow:u(o)==="connected"?"var(--glow-success)":"var(--glow-error)"})},null,6),t("div",Q,[t("div",q,[t("span",K,a(o.name),1),t("span",{class:_(["rounded px-1.5 py-0.5 font-mono text-[10px]",u(o)==="connected"?"bg-status-success/10 text-status-success":"bg-destructive/10 text-destructive"])},a(u(o)),3),t("span",W,a(o.url?"http":"stdio"),1)]),t("code",X,a(o.command??o.url??"—"),1)]),t("button",{class:"rounded border border-border px-2.5 py-1 font-mono text-[10px] text-muted-foreground transition-colors hover:border-primary/40 hover:text-primary",onClick:p=>N(o.name,!!o.enabled)},a(o.enabled===!1?"enable":"disable"),9,Y),t("button",{class:"flex h-7 w-7 shrink-0 items-center justify-center rounded text-muted-foreground/30 transition-colors hover:bg-destructive/10 hover:text-destructive",onClick:p=>M(o.name)},[v(S,{name:"trash",class:"h-3.5 w-3.5"})],8,Z)]),y(o).length?(n(),d("div",ee,[(n(!0),d(C,null,k(y(o),p=>(n(),d("code",{key:p,class:"rounded border border-white/[0.05] bg-white/[0.04] px-1.5 py-0.5 font-mono text-[10px] text-foreground/50"},a(p),1))),128))])):b("",!0)]))),128))])])]),_:1}))}});export{se as default};
1
+ import{d as V,o as $,D as j,A as w,G as m,r as x,j as n,a as t,n as v,p as U,c as d,w as f,v as h,Q as E,t as a,g as b,f as P,T as A,m as k,z as B,s as _,F as C,_ as S}from"./index-D1C7prBJ.js";import{_ as D}from"./SettingsTabs.vue_vue_type_script_setup_true_lang-BE0YBCo4.js";const O={class:"max-w-2xl space-y-4"},z={class:"flex items-center justify-between"},F={class:"grid grid-cols-2 gap-3"},I={class:"mb-1 block font-mono text-[10px] uppercase tracking-wider text-muted-foreground/60"},L=["placeholder"],R={key:0,class:"rounded border border-destructive/25 bg-destructive/10 px-3 py-2 text-sm text-destructive"},H={class:"flex justify-end gap-2"},J={class:"space-y-2"},G={class:"flex items-center gap-3 px-4 py-3"},Q={class:"min-w-0 flex-1"},q={class:"mb-0.5 flex items-center gap-2"},K={class:"text-sm font-medium"},W={class:"rounded bg-white/5 px-1.5 py-0.5 font-mono text-[10px] text-muted-foreground"},X={class:"block truncate font-mono text-[11px] text-muted-foreground/50"},Y=["onClick"],Z=["onClick"],ee={key:0,class:"flex flex-wrap gap-1.5 border-t border-border/40 px-4 py-2"},se=V({__name:"McpView",setup(te){const g=x([]),l=x(!1),s=x({name:"",transport:"stdio",command:""}),i=x("");function u(r){return r.enabled===!1?"disabled":"connected"}function y(r){var e,o;return(e=r.tools)!=null&&e.length?r.tools:(o=r.args)!=null&&o.length?r.args:[]}async function c(){const r=await m("/api/mcp/servers");r.ok&&(g.value=(await r.json()).servers)}async function T(){if(i.value="",!s.value.name.trim()||!s.value.command.trim())return;const r={name:s.value.name.trim()};s.value.transport==="stdio"?r.command=s.value.command.trim():r.url=s.value.command.trim();const e=await m("/api/mcp/servers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)});if(!e.ok){i.value=await e.text()||"Unable to add server.";return}s.value={name:"",transport:"stdio",command:""},l.value=!1,await c()}async function M(r){await m(`/api/mcp/servers/${encodeURIComponent(r)}`,{method:"DELETE"}),await c()}async function N(r,e){await m(`/api/mcp/servers/${encodeURIComponent(r)}/toggle`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({enabled:!e})}),await c()}return $(c),(r,e)=>(n(),j(D,{active:"mcp"},{default:w(()=>[t("div",O,[t("div",z,[e[6]||(e[6]=t("p",{class:"text-xs text-muted-foreground"},"MCP servers extend IO agents with additional tools and data sources.",-1)),t("button",{class:"flex items-center gap-1.5 rounded border border-border px-3 py-1.5 font-mono text-xs text-muted-foreground transition-all hover:border-primary/40 hover:bg-primary/5 hover:text-primary",onClick:e[0]||(e[0]=o=>l.value=!l.value)},[v(S,{name:"plus",class:"h-3 w-3"}),e[5]||(e[5]=U(" Add server ",-1))])]),v(A,{"enter-active-class":"duration-150 ease-out","enter-from-class":"opacity-0 -translate-y-1","enter-to-class":"opacity-100 translate-y-0","leave-active-class":"duration-100 ease-in","leave-from-class":"opacity-100 translate-y-0","leave-to-class":"opacity-0 -translate-y-1"},{default:w(()=>[l.value?(n(),d("form",{key:0,class:"space-y-3 rounded-lg border border-primary/30 bg-primary/[0.04] p-4",onSubmit:P(T,["prevent"])},[e[11]||(e[11]=t("div",{class:"mb-1 font-mono text-xs text-primary/80"},"New MCP Server",-1)),t("div",F,[t("div",null,[e[7]||(e[7]=t("label",{class:"mb-1 block font-mono text-[10px] uppercase tracking-wider text-muted-foreground/60"},"Name",-1)),f(t("input",{"onUpdate:modelValue":e[1]||(e[1]=o=>s.value.name=o),class:"w-full rounded border border-border bg-black/30 px-3 py-1.5 text-xs font-mono placeholder:text-muted-foreground/30",placeholder:"My Server"},null,512),[[h,s.value.name]])]),t("div",null,[e[9]||(e[9]=t("label",{class:"mb-1 block font-mono text-[10px] uppercase tracking-wider text-muted-foreground/60"},"Transport",-1)),f(t("select",{"onUpdate:modelValue":e[2]||(e[2]=o=>s.value.transport=o),class:"w-full rounded border border-border bg-black/30 px-3 py-1.5 text-xs font-mono"},[...e[8]||(e[8]=[t("option",{value:"stdio"},"stdio",-1),t("option",{value:"http"},"HTTP/SSE",-1)])],512),[[E,s.value.transport]])])]),t("div",null,[t("label",I,a(s.value.transport==="stdio"?"Command":"URL"),1),f(t("input",{"onUpdate:modelValue":e[3]||(e[3]=o=>s.value.command=o),class:"w-full rounded border border-border bg-black/30 px-3 py-1.5 text-xs font-mono placeholder:text-muted-foreground/30",placeholder:s.value.transport==="stdio"?"npx @modelcontextprotocol/server-...":"https://..."},null,8,L),[[h,s.value.command]])]),i.value?(n(),d("div",R,a(i.value),1)):b("",!0),t("div",H,[t("button",{type:"button",class:"px-3 py-1.5 font-mono text-xs text-muted-foreground transition-colors hover:text-foreground",onClick:e[4]||(e[4]=o=>l.value=!1)},"Cancel"),e[10]||(e[10]=t("button",{type:"submit",class:"rounded bg-primary/15 px-3 py-1.5 font-mono text-xs text-primary transition-colors hover:bg-primary/25"},"Add",-1))])],32)):b("",!0)]),_:1}),t("div",J,[(n(!0),d(C,null,k(g.value,o=>(n(),d("article",{key:o.name,class:"overflow-hidden rounded-lg border border-border bg-card"},[t("div",G,[t("div",{class:_(["h-2 w-2 shrink-0 rounded-full",u(o)==="connected"?"bg-status-success":"bg-destructive"]),style:B({boxShadow:u(o)==="connected"?"var(--glow-success)":"var(--glow-error)"})},null,6),t("div",Q,[t("div",q,[t("span",K,a(o.name),1),t("span",{class:_(["rounded px-1.5 py-0.5 font-mono text-[10px]",u(o)==="connected"?"bg-status-success/10 text-status-success":"bg-destructive/10 text-destructive"])},a(u(o)),3),t("span",W,a(o.url?"http":"stdio"),1)]),t("code",X,a(o.command??o.url??"—"),1)]),t("button",{class:"rounded border border-border px-2.5 py-1 font-mono text-[10px] text-muted-foreground transition-colors hover:border-primary/40 hover:text-primary",onClick:p=>N(o.name,!!o.enabled)},a(o.enabled===!1?"enable":"disable"),9,Y),t("button",{class:"flex h-7 w-7 shrink-0 items-center justify-center rounded text-muted-foreground/30 transition-colors hover:bg-destructive/10 hover:text-destructive",onClick:p=>M(o.name)},[v(S,{name:"trash",class:"h-3.5 w-3.5"})],8,Z)]),y(o).length?(n(),d("div",ee,[(n(!0),d(C,null,k(y(o),p=>(n(),d("code",{key:p,class:"rounded border border-white/[0.05] bg-white/[0.04] px-1.5 py-0.5 font-mono text-[10px] text-foreground/50"},a(p),1))),128))])):b("",!0)]))),128))])])]),_:1}))}});export{se as default};
@@ -1 +1 @@
1
- import{d as j,o as E,c as d,a as e,s as p,F as S,m as $,g as m,t as o,r as b,q as C,G as _,j as n,b as g,J as f}from"./index-B3ZOJqJ1.js";const N={class:"grid h-full min-h-0 gap-5 p-5 xl:grid-cols-[minmax(0,1fr)_360px]"},B={class:"min-h-0 overflow-hidden rounded-lg border border-border bg-card"},F={class:"border-b border-border px-5 py-4"},I={class:"flex flex-wrap items-center justify-between gap-3"},R={class:"mt-3 flex gap-2"},T={class:"min-h-0 overflow-y-auto px-4 py-4"},V={class:"space-y-3"},D=["onClick"],L={class:"font-mono text-lg text-primary"},M={class:"text-sm font-medium"},O={class:"mt-2 text-sm leading-6 text-foreground/65"},P={class:"font-mono text-xs text-muted-foreground/65"},z={class:"mt-2"},G={key:0,class:"mt-2 text-accent-foreground"},J={key:0,class:"rounded-lg border border-dashed border-border px-4 py-16 text-center font-mono text-xs uppercase tracking-[0.22em] text-muted-foreground/45"},A={class:"flex min-h-0 flex-col overflow-hidden rounded-lg border border-border bg-card"},H={class:"border-b border-border px-5 py-4"},K={class:"mt-2 text-lg font-semibold"},Q={key:0,class:"border-b border-border px-5 py-4"},U={class:"grid grid-cols-2 gap-2 font-mono text-[11px] uppercase tracking-[0.16em]"},W={class:"min-h-0 flex-1 overflow-y-auto p-4"},X={class:"space-y-3"},Y={class:"flex items-center justify-between gap-3 font-mono text-xs uppercase tracking-[0.16em]"},Z={class:"text-muted-foreground/55"},ee={class:"mt-3 text-sm text-foreground/75"},te={class:"mt-1 text-sm text-foreground/55"},re={key:0,class:"mt-3 rounded border border-destructive/25 bg-destructive/10 px-3 py-3 text-sm text-destructive"},oe={key:0,class:"rounded-lg border border-dashed border-border px-4 py-12 text-center font-mono text-xs uppercase tracking-[0.22em] text-muted-foreground/45"},ne=j({__name:"SchedulesView",setup(se){const i=b("io"),y=b({io:[],squads:[]}),l=b(""),u=b([]),c=C(()=>y.value[i.value]),a=C(()=>c.value.find(s=>String(s.id)===l.value)??null);async function v(){const s=await _("/api/schedules");s.ok&&(y.value=await s.json(),!l.value&&c.value[0]&&(l.value=String(c.value[0].id),await x()))}async function x(){if(!a.value){u.value=[];return}const s=await _(`/api/schedules/${i.value}/${a.value.id}/runs`);s.ok&&(u.value=(await s.json()).runs)}async function h(s){a.value&&(await _(`/api/schedules/${i.value}/${a.value.id}/${s}`,{method:"POST"}),await Promise.all([v(),x()]))}async function q(){a.value&&(await _(`/api/schedules/${i.value}/${a.value.id}`,{method:"DELETE"}),l.value="",u.value=[],await v())}async function k(s){var r;i.value=s,l.value=String(((r=y.value[s][0])==null?void 0:r.id)??""),await x()}return E(v),(s,r)=>{var w;return n(),d("div",N,[e("section",B,[e("div",F,[e("div",I,[e("div",null,[r[4]||(r[4]=e("div",{class:"font-mono text-[10px] uppercase tracking-[0.28em] text-primary"},"Schedule Matrix",-1)),e("div",R,[e("button",{class:p(["rounded-full border px-3 py-1.5 font-mono text-[11px] uppercase tracking-[0.16em]",i.value==="io"?"border-primary/40 bg-primary/10 text-primary":"border-border text-muted-foreground"]),onClick:r[0]||(r[0]=t=>k("io"))},"IO",2),e("button",{class:p(["rounded-full border px-3 py-1.5 font-mono text-[11px] uppercase tracking-[0.16em]",i.value==="squads"?"border-accent-foreground/40 bg-accent-foreground/10 text-accent-foreground":"border-border text-muted-foreground"]),onClick:r[1]||(r[1]=t=>k("squads"))},"Squads",2)])]),e("button",{class:"rounded border border-border px-3 py-1.5 font-mono text-xs text-muted-foreground transition-colors hover:border-primary/40 hover:text-primary",onClick:v},"refresh")])]),e("div",T,[e("div",V,[(n(!0),d(S,null,$(c.value,t=>(n(),d("button",{key:t.id,class:p(["grid w-full gap-3 rounded-lg border px-4 py-4 text-left transition-colors lg:grid-cols-[160px_minmax(0,1fr)_170px]",l.value===String(t.id)?"border-primary/40 bg-primary/8":"border-border bg-sidebar/40 hover:bg-white/[0.03]"]),onClick:ae=>{l.value=String(t.id),x()}},[e("div",null,[e("div",L,o(t.cron_expr),1),e("div",{class:p(["mt-1 font-mono text-[10px] uppercase tracking-[0.18em]",t.enabled?"text-status-success":"text-destructive"])},o(t.enabled?"enabled":"paused"),3)]),e("div",null,[e("div",M,o(t.name),1),e("div",O,o(t.prompt),1)]),e("div",P,[e("div",null,"last "+o(t.last_run_at?g(f)(t.last_run_at):"—"),1),e("div",z,"next "+o(t.next_run_at?g(f)(t.next_run_at):"—"),1),t.squad_slug?(n(),d("div",G,o(t.squad_slug),1)):m("",!0)])],10,D))),128)),c.value.length?m("",!0):(n(),d("div",J,"No schedules in this scope"))])])]),e("section",A,[e("div",H,[r[5]||(r[5]=e("div",{class:"font-mono text-[10px] uppercase tracking-[0.28em] text-accent-foreground"},"Run Inspector",-1)),e("div",K,o(((w=a.value)==null?void 0:w.name)??"Select a schedule"),1)]),a.value?(n(),d("div",Q,[e("div",U,[e("button",{class:"rounded border border-border bg-sidebar px-3 py-2 transition-colors hover:border-primary/40 hover:text-primary",onClick:r[2]||(r[2]=t=>h(a.value.enabled?"pause":"resume"))},o(a.value.enabled?"pause":"resume"),1),e("button",{class:"rounded border border-primary/40 bg-primary/10 px-3 py-2 text-primary",onClick:r[3]||(r[3]=t=>h("run-now"))},"run now"),e("button",{class:"col-span-2 rounded border border-destructive/40 px-3 py-2 text-destructive transition-colors hover:bg-destructive/10",onClick:q},"delete")])])):m("",!0),e("div",W,[e("div",X,[(n(!0),d(S,null,$(u.value,t=>(n(),d("article",{key:t.id,class:"rounded-lg border border-white/[0.06] bg-sidebar/60 px-4 py-4"},[e("div",Y,[e("span",{class:p(t.status==="success"?"text-status-success":t.status==="error"?"text-destructive":"text-primary")},o(t.status),3),e("span",Z,o(t.id),1)]),e("div",ee,"started "+o(g(f)(t.started_at)),1),e("div",te,"completed "+o(t.completed_at?g(f)(t.completed_at):"—"),1),t.error_text?(n(),d("div",re,o(t.error_text),1)):m("",!0)]))),128)),a.value&&!u.value.length?(n(),d("div",oe,"No run history yet")):m("",!0)])])])])}}});export{ne as default};
1
+ import{d as j,o as E,c as d,a as e,s as p,F as S,m as $,g as m,t as o,r as b,q as C,G as _,j as n,b as g,J as f}from"./index-D1C7prBJ.js";const N={class:"grid h-full min-h-0 gap-5 p-5 xl:grid-cols-[minmax(0,1fr)_360px]"},B={class:"min-h-0 overflow-hidden rounded-lg border border-border bg-card"},F={class:"border-b border-border px-5 py-4"},I={class:"flex flex-wrap items-center justify-between gap-3"},R={class:"mt-3 flex gap-2"},T={class:"min-h-0 overflow-y-auto px-4 py-4"},V={class:"space-y-3"},D=["onClick"],L={class:"font-mono text-lg text-primary"},M={class:"text-sm font-medium"},O={class:"mt-2 text-sm leading-6 text-foreground/65"},P={class:"font-mono text-xs text-muted-foreground/65"},z={class:"mt-2"},G={key:0,class:"mt-2 text-accent-foreground"},J={key:0,class:"rounded-lg border border-dashed border-border px-4 py-16 text-center font-mono text-xs uppercase tracking-[0.22em] text-muted-foreground/45"},A={class:"flex min-h-0 flex-col overflow-hidden rounded-lg border border-border bg-card"},H={class:"border-b border-border px-5 py-4"},K={class:"mt-2 text-lg font-semibold"},Q={key:0,class:"border-b border-border px-5 py-4"},U={class:"grid grid-cols-2 gap-2 font-mono text-[11px] uppercase tracking-[0.16em]"},W={class:"min-h-0 flex-1 overflow-y-auto p-4"},X={class:"space-y-3"},Y={class:"flex items-center justify-between gap-3 font-mono text-xs uppercase tracking-[0.16em]"},Z={class:"text-muted-foreground/55"},ee={class:"mt-3 text-sm text-foreground/75"},te={class:"mt-1 text-sm text-foreground/55"},re={key:0,class:"mt-3 rounded border border-destructive/25 bg-destructive/10 px-3 py-3 text-sm text-destructive"},oe={key:0,class:"rounded-lg border border-dashed border-border px-4 py-12 text-center font-mono text-xs uppercase tracking-[0.22em] text-muted-foreground/45"},ne=j({__name:"SchedulesView",setup(se){const i=b("io"),y=b({io:[],squads:[]}),l=b(""),u=b([]),c=C(()=>y.value[i.value]),a=C(()=>c.value.find(s=>String(s.id)===l.value)??null);async function v(){const s=await _("/api/schedules");s.ok&&(y.value=await s.json(),!l.value&&c.value[0]&&(l.value=String(c.value[0].id),await x()))}async function x(){if(!a.value){u.value=[];return}const s=await _(`/api/schedules/${i.value}/${a.value.id}/runs`);s.ok&&(u.value=(await s.json()).runs)}async function h(s){a.value&&(await _(`/api/schedules/${i.value}/${a.value.id}/${s}`,{method:"POST"}),await Promise.all([v(),x()]))}async function q(){a.value&&(await _(`/api/schedules/${i.value}/${a.value.id}`,{method:"DELETE"}),l.value="",u.value=[],await v())}async function k(s){var r;i.value=s,l.value=String(((r=y.value[s][0])==null?void 0:r.id)??""),await x()}return E(v),(s,r)=>{var w;return n(),d("div",N,[e("section",B,[e("div",F,[e("div",I,[e("div",null,[r[4]||(r[4]=e("div",{class:"font-mono text-[10px] uppercase tracking-[0.28em] text-primary"},"Schedule Matrix",-1)),e("div",R,[e("button",{class:p(["rounded-full border px-3 py-1.5 font-mono text-[11px] uppercase tracking-[0.16em]",i.value==="io"?"border-primary/40 bg-primary/10 text-primary":"border-border text-muted-foreground"]),onClick:r[0]||(r[0]=t=>k("io"))},"IO",2),e("button",{class:p(["rounded-full border px-3 py-1.5 font-mono text-[11px] uppercase tracking-[0.16em]",i.value==="squads"?"border-accent-foreground/40 bg-accent-foreground/10 text-accent-foreground":"border-border text-muted-foreground"]),onClick:r[1]||(r[1]=t=>k("squads"))},"Squads",2)])]),e("button",{class:"rounded border border-border px-3 py-1.5 font-mono text-xs text-muted-foreground transition-colors hover:border-primary/40 hover:text-primary",onClick:v},"refresh")])]),e("div",T,[e("div",V,[(n(!0),d(S,null,$(c.value,t=>(n(),d("button",{key:t.id,class:p(["grid w-full gap-3 rounded-lg border px-4 py-4 text-left transition-colors lg:grid-cols-[160px_minmax(0,1fr)_170px]",l.value===String(t.id)?"border-primary/40 bg-primary/8":"border-border bg-sidebar/40 hover:bg-white/[0.03]"]),onClick:ae=>{l.value=String(t.id),x()}},[e("div",null,[e("div",L,o(t.cron_expr),1),e("div",{class:p(["mt-1 font-mono text-[10px] uppercase tracking-[0.18em]",t.enabled?"text-status-success":"text-destructive"])},o(t.enabled?"enabled":"paused"),3)]),e("div",null,[e("div",M,o(t.name),1),e("div",O,o(t.prompt),1)]),e("div",P,[e("div",null,"last "+o(t.last_run_at?g(f)(t.last_run_at):"—"),1),e("div",z,"next "+o(t.next_run_at?g(f)(t.next_run_at):"—"),1),t.squad_slug?(n(),d("div",G,o(t.squad_slug),1)):m("",!0)])],10,D))),128)),c.value.length?m("",!0):(n(),d("div",J,"No schedules in this scope"))])])]),e("section",A,[e("div",H,[r[5]||(r[5]=e("div",{class:"font-mono text-[10px] uppercase tracking-[0.28em] text-accent-foreground"},"Run Inspector",-1)),e("div",K,o(((w=a.value)==null?void 0:w.name)??"Select a schedule"),1)]),a.value?(n(),d("div",Q,[e("div",U,[e("button",{class:"rounded border border-border bg-sidebar px-3 py-2 transition-colors hover:border-primary/40 hover:text-primary",onClick:r[2]||(r[2]=t=>h(a.value.enabled?"pause":"resume"))},o(a.value.enabled?"pause":"resume"),1),e("button",{class:"rounded border border-primary/40 bg-primary/10 px-3 py-2 text-primary",onClick:r[3]||(r[3]=t=>h("run-now"))},"run now"),e("button",{class:"col-span-2 rounded border border-destructive/40 px-3 py-2 text-destructive transition-colors hover:bg-destructive/10",onClick:q},"delete")])])):m("",!0),e("div",W,[e("div",X,[(n(!0),d(S,null,$(u.value,t=>(n(),d("article",{key:t.id,class:"rounded-lg border border-white/[0.06] bg-sidebar/60 px-4 py-4"},[e("div",Y,[e("span",{class:p(t.status==="success"?"text-status-success":t.status==="error"?"text-destructive":"text-primary")},o(t.status),3),e("span",Z,o(t.id),1)]),e("div",ee,"started "+o(g(f)(t.started_at)),1),e("div",te,"completed "+o(t.completed_at?g(f)(t.completed_at):"—"),1),t.error_text?(n(),d("div",re,o(t.error_text),1)):m("",!0)]))),128)),a.value&&!u.value.length?(n(),d("div",oe,"No run history yet")):m("",!0)])])])])}}});export{ne as default};
@@ -1 +1 @@
1
- import{d as m,c as p,a as t,n as s,A as r,s as a,b as n,R as d,S as x,j as f,p as l}from"./index-B3ZOJqJ1.js";const b={class:"flex h-full flex-col overflow-hidden"},c={class:"shrink-0 px-4 pb-0 pt-5 md:px-6"},u={class:"flex border-b border-border"},v={class:"flex-1 overflow-y-auto px-4 py-5 md:px-6"},_=m({__name:"SettingsTabs",props:{active:{}},setup(o){return(i,e)=>(f(),p("div",b,[t("div",c,[e[2]||(e[2]=t("h2",{class:"mb-4 text-base font-semibold"},"Settings",-1)),t("div",u,[s(n(d),{to:"/skills",class:a(["-mb-px border-b-2 px-4 py-2 font-mono text-xs font-medium transition-colors",o.active==="skills"?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground"])},{default:r(()=>[...e[0]||(e[0]=[l(" Skills ",-1)])]),_:1},8,["class"]),s(n(d),{to:"/mcp",class:a(["-mb-px border-b-2 px-4 py-2 font-mono text-xs font-medium transition-colors",o.active==="mcp"?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground"])},{default:r(()=>[...e[1]||(e[1]=[l(" MCP Servers ",-1)])]),_:1},8,["class"])])]),t("div",v,[x(i.$slots,"default")])]))}});export{_};
1
+ import{d as m,c as p,a as t,n as s,A as r,s as a,b as n,R as d,S as x,j as f,p as l}from"./index-D1C7prBJ.js";const b={class:"flex h-full flex-col overflow-hidden"},c={class:"shrink-0 px-4 pb-0 pt-5 md:px-6"},u={class:"flex border-b border-border"},v={class:"flex-1 overflow-y-auto px-4 py-5 md:px-6"},_=m({__name:"SettingsTabs",props:{active:{}},setup(o){return(i,e)=>(f(),p("div",b,[t("div",c,[e[2]||(e[2]=t("h2",{class:"mb-4 text-base font-semibold"},"Settings",-1)),t("div",u,[s(n(d),{to:"/skills",class:a(["-mb-px border-b-2 px-4 py-2 font-mono text-xs font-medium transition-colors",o.active==="skills"?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground"])},{default:r(()=>[...e[0]||(e[0]=[l(" Skills ",-1)])]),_:1},8,["class"]),s(n(d),{to:"/mcp",class:a(["-mb-px border-b-2 px-4 py-2 font-mono text-xs font-medium transition-colors",o.active==="mcp"?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground"])},{default:r(()=>[...e[1]||(e[1]=[l(" MCP Servers ",-1)])]),_:1},8,["class"])])]),t("div",v,[x(i.$slots,"default")])]))}});export{_};
@@ -1 +1 @@
1
- import{_}from"./SettingsTabs.vue_vue_type_script_setup_true_lang-B7GKSgO5.js";import{d as w,o as y,D as C,A as S,G as B,r as p,j as a,a as t,c as i,m,z as g,t as r,F as x,s as c,q as z,N as F}from"./index-B3ZOJqJ1.js";const j={class:"max-w-2xl space-y-6"},E={class:"mb-2 flex items-center gap-2"},I={class:"font-mono text-[10px] text-muted-foreground/40"},D={class:"overflow-hidden rounded-lg border border-border"},G={class:"w-36 shrink-0 break-all font-mono text-xs text-foreground/80"},M={class:"flex-1 text-xs leading-relaxed text-muted-foreground"},N=["onClick"],A=w({__name:"SkillsView",setup(O){const f={"File System":"#00d9ff","Code Intelligence":"#5fff87","Git & CI":"#c4a7ff",Communication:"#ffd000"},d=p([]),o=p({}),b=z(()=>{const s=new Map;for(const e of d.value){const l=F(e.name,e.path);s.set(l,[...s.get(l)??[],e])}return[...s.entries()]});async function v(){const s=await B("/api/skills");s.ok&&(d.value=(await s.json()).skills,o.value=Object.fromEntries(d.value.map(e=>[e.slug,o.value[e.slug]??!0])))}function h(s){o.value={...o.value,[s]:!o.value[s]}}return y(v),(s,e)=>(a(),C(_,{active:"skills"},{default:S(()=>[t("div",j,[e[2]||(e[2]=t("p",{class:"text-xs text-muted-foreground"},"Enable or disable capabilities available to IO agents. Built-in skills cannot be removed here; the toggles model the operator deck from the reference design.",-1)),(a(!0),i(x,null,m(b.value,([l,u])=>(a(),i("div",{key:l},[t("div",E,[t("div",{class:"h-1.5 w-1.5 rounded-full",style:g({backgroundColor:f[l]??"#00d9ff"})},null,4),t("span",{class:"font-mono text-[10px] font-semibold uppercase tracking-wider",style:g({color:f[l]??"#00d9ff"})},r(l),5),e[0]||(e[0]=t("div",{class:"h-px flex-1 bg-border/40"},null,-1)),t("span",I,r(u.filter(n=>o.value[n.slug]).length)+"/"+r(u.length),1)]),t("div",D,[(a(!0),i(x,null,m(u,(n,k)=>(a(),i("div",{key:n.slug,class:c(["flex items-center gap-3 bg-card px-4 py-2.5 transition-colors hover:bg-card/80",k>0?"border-t border-border/50":""])},[t("code",G,r(n.name),1),t("span",M,r(n.description),1),e[1]||(e[1]=t("span",{class:"shrink-0 font-mono text-[9px] text-muted-foreground/30"},"built-in",-1)),t("button",{type:"button",class:c(["relative h-4 w-8 shrink-0 rounded-full transition-colors",o.value[n.slug]?"bg-primary":"bg-white/10"]),onClick:V=>h(n.slug)},[t("span",{class:c(["absolute left-0.5 top-0.5 h-3 w-3 rounded-full bg-white transition-transform",o.value[n.slug]?"translate-x-4":"translate-x-0"])},null,2)],10,N)],2))),128))])]))),128))])]),_:1}))}});export{A as default};
1
+ import{_}from"./SettingsTabs.vue_vue_type_script_setup_true_lang-BE0YBCo4.js";import{d as w,o as y,D as C,A as S,G as B,r as p,j as a,a as t,c as i,m,z as g,t as r,F as x,s as c,q as z,N as F}from"./index-D1C7prBJ.js";const j={class:"max-w-2xl space-y-6"},E={class:"mb-2 flex items-center gap-2"},I={class:"font-mono text-[10px] text-muted-foreground/40"},D={class:"overflow-hidden rounded-lg border border-border"},G={class:"w-36 shrink-0 break-all font-mono text-xs text-foreground/80"},M={class:"flex-1 text-xs leading-relaxed text-muted-foreground"},N=["onClick"],A=w({__name:"SkillsView",setup(O){const f={"File System":"#00d9ff","Code Intelligence":"#5fff87","Git & CI":"#c4a7ff",Communication:"#ffd000"},d=p([]),o=p({}),b=z(()=>{const s=new Map;for(const e of d.value){const l=F(e.name,e.path);s.set(l,[...s.get(l)??[],e])}return[...s.entries()]});async function v(){const s=await B("/api/skills");s.ok&&(d.value=(await s.json()).skills,o.value=Object.fromEntries(d.value.map(e=>[e.slug,o.value[e.slug]??!0])))}function h(s){o.value={...o.value,[s]:!o.value[s]}}return y(v),(s,e)=>(a(),C(_,{active:"skills"},{default:S(()=>[t("div",j,[e[2]||(e[2]=t("p",{class:"text-xs text-muted-foreground"},"Enable or disable capabilities available to IO agents. Built-in skills cannot be removed here; the toggles model the operator deck from the reference design.",-1)),(a(!0),i(x,null,m(b.value,([l,u])=>(a(),i("div",{key:l},[t("div",E,[t("div",{class:"h-1.5 w-1.5 rounded-full",style:g({backgroundColor:f[l]??"#00d9ff"})},null,4),t("span",{class:"font-mono text-[10px] font-semibold uppercase tracking-wider",style:g({color:f[l]??"#00d9ff"})},r(l),5),e[0]||(e[0]=t("div",{class:"h-px flex-1 bg-border/40"},null,-1)),t("span",I,r(u.filter(n=>o.value[n.slug]).length)+"/"+r(u.length),1)]),t("div",D,[(a(!0),i(x,null,m(u,(n,k)=>(a(),i("div",{key:n.slug,class:c(["flex items-center gap-3 bg-card px-4 py-2.5 transition-colors hover:bg-card/80",k>0?"border-t border-border/50":""])},[t("code",G,r(n.name),1),t("span",M,r(n.description),1),e[1]||(e[1]=t("span",{class:"shrink-0 font-mono text-[9px] text-muted-foreground/30"},"built-in",-1)),t("button",{type:"button",class:c(["relative h-4 w-8 shrink-0 rounded-full transition-colors",o.value[n.slug]?"bg-primary":"bg-white/10"]),onClick:V=>h(n.slug)},[t("span",{class:c(["absolute left-0.5 top-0.5 h-3 w-3 rounded-full bg-white transition-transform",o.value[n.slug]?"translate-x-4":"translate-x-0"])},null,2)],10,N)],2))),128))])]))),128))])]),_:1}))}});export{A as default};
@@ -0,0 +1 @@
1
+ import{d as w,j as s,c as a,a as e,n as v,z as h,t as i,g as p,s as G,_ as C,A as M,T as H,r as k,q as y,b as R,B as S,C as J,F as f,m as b,D as j,E as K,o as Q,G as _,H as O,I as W,J as X,K as Y}from"./index-D1C7prBJ.js";import{_ as T}from"./StatusIndicator.vue_vue_type_script_setup_true_lang-BwmRY2qH.js";const Z={class:"flex items-center gap-2 rounded px-2 py-1.5 transition-colors hover:bg-white/[0.03]"},ee={class:"flex shrink-0 gap-1"},te={key:0,class:"rounded bg-primary/10 px-1 py-0.5 font-mono text-[9px] leading-none text-primary"},se={key:1,class:"rounded bg-status-success/10 px-1 py-0.5 font-mono text-[9px] leading-none text-status-success"},ne={class:"min-w-0 flex-1"},ae={key:0,class:"block truncate font-mono text-[11px] text-foreground/60"},oe={key:1,class:"font-mono text-[11px] text-muted-foreground/40"},re={key:0,class:"mx-2 mb-1.5 rounded border border-white/[0.06] bg-white/[0.03] px-3 py-2"},ie={class:"text-xs leading-relaxed text-foreground/60"},le={key:0,class:"mt-2 font-mono text-[10px] text-muted-foreground/45"},de=w({__name:"AgentRow",props:{agent:{},universeColor:{}},setup(t){const d=t,r=k(!1),u=y(()=>d.agent.charter||d.agent.role_title||"No charter available.");return(x,o)=>(s(),a("div",{class:"cursor-pointer",onClick:o[0]||(o[0]=l=>r.value=!r.value)},[e("div",Z,[v(T,{status:t.agent.status},null,8,["status"]),e("span",{class:"shrink-0 font-mono text-xs font-medium",style:h({color:t.universeColor})},i(t.agent.character_name),5),e("div",ee,[t.agent.is_lead?(s(),a("span",te,"LEAD")):p("",!0),t.agent.is_qa?(s(),a("span",se,"QA")):p("",!0)]),e("div",ne,[t.agent.current_task?(s(),a("span",ae,"↳ "+i(t.agent.current_task),1)):(s(),a("span",oe,"idle"))]),v(C,{name:"chevron-down",class:G(["h-3 w-3 shrink-0 text-muted-foreground/40 transition-transform",r.value?"rotate-180":""])},null,8,["class"])]),v(H,{"enter-active-class":"duration-150 ease-out","enter-from-class":"opacity-0 -translate-y-1","enter-to-class":"opacity-100 translate-y-0","leave-active-class":"duration-100 ease-in","leave-from-class":"opacity-100 translate-y-0","leave-to-class":"opacity-0 -translate-y-1"},{default:M(()=>[r.value?(s(),a("div",re,[o[1]||(o[1]=e("div",{class:"mb-1 font-mono text-[10px] uppercase tracking-wider text-muted-foreground/60"},"Charter",-1)),e("div",ie,i(u.value),1),t.agent.role_title&&t.agent.charter?(s(),a("div",le,"Role · "+i(t.agent.role_title),1)):p("",!0)])):p("",!0)]),_:1})]))}}),ce={class:"max-w-[120px] truncate text-muted-foreground"},ue=w({__name:"InstancePill",props:{instance:{}},setup(t){const d=t,r=y(()=>J(d.instance.status));return(u,x)=>(s(),a("div",{class:"flex items-center gap-1.5 rounded border px-2 py-1 font-mono text-[10px]",style:h({borderColor:R(S)(r.value,.3),backgroundColor:R(S)(r.value,.08)})},[e("div",{class:"h-1.5 w-1.5 shrink-0 rounded-full",style:h({backgroundColor:r.value})},null,4),e("span",{style:h({color:r.value})},i(t.instance.issue_ref||t.instance.id),5),x[0]||(x[0]=e("span",{class:"text-muted-foreground/50"},"·",-1)),e("span",ce,i(t.instance.branch_name||"detached"),1)],4))}}),me={class:"flex flex-col overflow-hidden rounded-lg border border-border bg-card"},xe={class:"px-4 pb-2.5 pt-3"},pe={class:"mb-2 flex items-start justify-between gap-2"},fe={class:"flex min-w-0 items-center gap-2"},ge={class:"truncate text-sm font-semibold"},ve={key:0,class:"shrink-0 rounded-full bg-destructive px-1.5 py-0.5 font-mono text-[9px] font-bold text-white"},he={class:"truncate font-mono text-[10px] text-muted-foreground/50"},_e={class:"px-2 py-1.5"},be={class:"px-4 py-2.5"},ke={class:"mb-2 flex items-center gap-1.5 font-mono text-[10px] uppercase tracking-wider text-muted-foreground/50"},ye={class:"flex flex-wrap gap-1.5"},we={class:"px-4 py-2.5"},qe={class:"mb-2 flex items-center gap-1.5 font-mono text-[10px] uppercase tracking-wider text-muted-foreground/50"},$e={class:"space-y-1"},Ce={class:"flex-1 text-foreground/60"},Re={class:"shrink-0 font-mono text-muted-foreground/40"},Se=w({__name:"SquadCard",props:{squad:{}},setup(t){const d=t,r=y(()=>K(d.squad.universe)),u=y(()=>d.squad.instances.filter(x=>x.status==="running").length);return(x,o)=>(s(),a("article",me,[e("div",{class:"h-px",style:h({backgroundColor:r.value,opacity:.6})},null,4),e("div",xe,[e("div",pe,[e("div",fe,[v(T,{status:t.squad.status},null,8,["status"]),e("h3",ge,i(t.squad.name),1),t.squad.unread_count>0?(s(),a("span",ve,i(t.squad.unread_count),1)):p("",!0)]),e("span",{class:"shrink-0 rounded px-1.5 py-0.5 font-mono text-[10px]",style:h({color:r.value,backgroundColor:R(S)(r.value,.15)})},i(t.squad.universe),5)]),e("div",he,i(t.squad.project_path),1)]),o[4]||(o[4]=e("div",{class:"mx-3 border-t border-border/50"},null,-1)),e("div",_e,[(s(!0),a(f,null,b(t.squad.agents,l=>(s(),j(de,{key:l.character_name,agent:l,"universe-color":r.value},null,8,["agent","universe-color"]))),128))]),t.squad.instances.length?(s(),a(f,{key:0},[o[0]||(o[0]=e("div",{class:"mx-3 border-t border-border/50"},null,-1)),e("div",be,[e("div",ke,[v(C,{name:"git-branch",class:"h-3 w-3"}),e("span",null,"Instances ("+i(u.value)+"/"+i(t.squad.instances.length)+" running)",1)]),e("div",ye,[(s(!0),a(f,null,b(t.squad.instances,l=>(s(),j(ue,{key:l.id,instance:l},null,8,["instance"]))),128))])])],64)):p("",!0),t.squad.recent_decisions.length?(s(),a(f,{key:1},[o[3]||(o[3]=e("div",{class:"mx-3 border-t border-border/50"},null,-1)),e("div",we,[e("div",qe,[v(C,{name:"sparkles",class:"h-3 w-3"}),o[1]||(o[1]=e("span",null,"Decisions",-1))]),e("div",$e,[(s(!0),a(f,null,b(t.squad.recent_decisions,l=>(s(),a("div",{key:l.id,class:"flex items-baseline gap-2 text-[11px]"},[o[2]||(o[2]=e("span",{class:"shrink-0 font-mono text-muted-foreground/40"},"·",-1)),e("span",Ce,i(l.title),1),e("span",Re,i(l.timestamp),1)]))),128))])])],64)):p("",!0)]))}}),je={class:"h-full overflow-y-auto p-5"},Ie={key:0,class:"mb-4 rounded-lg border border-destructive/25 bg-destructive/10 px-4 py-3 text-sm text-destructive"},Ae={key:1,class:"grid grid-cols-1 gap-4 md:grid-cols-2 xl:grid-cols-3"},Be={key:2,class:"grid grid-cols-1 gap-4 md:grid-cols-2 xl:grid-cols-3"},ze={key:3,class:"flex h-full min-h-[320px] items-center justify-center rounded-lg border border-dashed border-border bg-card/30 font-mono text-xs uppercase tracking-[0.22em] text-muted-foreground/55"},Ne=w({__name:"SquadsView",setup(t){const d=k(!1),r=k(""),u=k([]);async function x(){d.value=!0,r.value="";try{const[o,l]=await Promise.all([_("/api/squads"),_("/api/feed?limit=200")]),g=o.ok?(await o.json()).squads:[],q=new Map;if(l.ok){const m=(await l.json()).entries;for(const c of m)!c.read_at&&c.squad_slug&&q.set(c.squad_slug,(q.get(c.squad_slug)??0)+1)}u.value=await Promise.all(g.map(async m=>{var E;const c=m.slug??m.id??m.name.toLowerCase().replace(/\s+/g,"-"),[I,A]=await Promise.all([_(`/api/squads/${encodeURIComponent(c)}/agents`),_(`/api/squads/${encodeURIComponent(c)}/instances`)]),U=I.ok?(await I.json()).agents:[],F=A.ok?(await A.json()).instances:[],B=U.map(n=>({character_name:n.character_name??"Unnamed Agent",role_title:n.role_title,charter:n.charter??n.role_title,model_tier:n.model_tier??(n.is_lead?"high":"medium"),status:O(n.status),is_lead:!!n.is_lead,is_qa:!!n.is_qa,current_task:n.currentTask??n.current_task??null})),$=F.map(n=>({id:String(n.id),issue_ref:n.issue_ref,branch_name:n.branch_name,status:W(n.status),worktree_path:n.worktree_path})),z=await Promise.all($.slice(0,3).map(n=>_(`/api/squads/${encodeURIComponent(c)}/instances/${encodeURIComponent(n.id)}`))),D=[];for(let n=0;n<z.length;n+=1){const N=z[n];if(!N.ok)continue;const V=await N.json();for(const[L,P]of(V.decisions??[]).slice(0,3).entries())D.push({id:`${((E=$[n])==null?void 0:E.id)??n}-${L}`,title:P.decision??"Decision recorded",timestamp:X(P.created_at)})}return{id:m.id??c,slug:c,name:m.name,project_path:m.project_path??"—",universe:m.universe??"Ghostbusters",status:Y(B,m),unread_count:q.get(c)??0,agents:B,instances:$,recent_decisions:D.slice(0,4)}}))}catch(o){r.value=o instanceof Error?o.message:"Failed to load squads.",u.value=[]}finally{d.value=!1}}return Q(x),(o,l)=>(s(),a("div",je,[r.value?(s(),a("div",Ie,i(r.value),1)):p("",!0),d.value&&!u.value.length?(s(),a("div",Ae,[(s(),a(f,null,b(6,g=>e("div",{key:g,class:"h-64 animate-pulse rounded-lg border border-border bg-card/60"})),64))])):u.value.length?(s(),a("div",Be,[(s(!0),a(f,null,b(u.value,g=>(s(),j(Se,{key:g.id,squad:g},null,8,["squad"]))),128))])):(s(),a("div",ze," No squads discovered. "))]))}});export{Ne as default};
@@ -1 +1 @@
1
- import{d as r,j as s,c as t,F as l,a}from"./index-B3ZOJqJ1.js";const n={class:"relative flex h-3 w-3 shrink-0 items-center justify-center"},u={key:1,class:"status-error-dot h-2 w-2 rounded-full bg-status-error",style:{boxShadow:"var(--glow-error)"}},d={key:2,class:"h-2 w-2 rounded-full bg-status-success",style:{boxShadow:"var(--glow-success)"}},i={key:3,class:"h-2 w-2 rounded-full bg-status-idle opacity-40"},g=r({__name:"StatusIndicator",props:{status:{default:"idle"}},setup(o){return(c,e)=>(s(),t("div",n,[o.status==="working"?(s(),t(l,{key:0},[e[0]||(e[0]=a("div",{class:"status-working-ring absolute h-3 w-3 rounded-full bg-status-working",style:{boxShadow:"var(--glow-cyan)"}},null,-1)),e[1]||(e[1]=a("div",{class:"h-2 w-2 rounded-full bg-status-working",style:{boxShadow:"var(--glow-cyan)"}},null,-1))],64)):o.status==="error"?(s(),t("div",u)):o.status==="success"?(s(),t("div",d)):(s(),t("div",i))]))}});export{g as _};
1
+ import{d as r,j as s,c as t,F as l,a}from"./index-D1C7prBJ.js";const n={class:"relative flex h-3 w-3 shrink-0 items-center justify-center"},u={key:1,class:"status-error-dot h-2 w-2 rounded-full bg-status-error",style:{boxShadow:"var(--glow-error)"}},d={key:2,class:"h-2 w-2 rounded-full bg-status-success",style:{boxShadow:"var(--glow-success)"}},i={key:3,class:"h-2 w-2 rounded-full bg-status-idle opacity-40"},g=r({__name:"StatusIndicator",props:{status:{default:"idle"}},setup(o){return(c,e)=>(s(),t("div",n,[o.status==="working"?(s(),t(l,{key:0},[e[0]||(e[0]=a("div",{class:"status-working-ring absolute h-3 w-3 rounded-full bg-status-working",style:{boxShadow:"var(--glow-cyan)"}},null,-1)),e[1]||(e[1]=a("div",{class:"h-2 w-2 rounded-full bg-status-working",style:{boxShadow:"var(--glow-cyan)"}},null,-1))],64)):o.status==="error"?(s(),t("div",u)):o.status==="success"?(s(),t("div",d)):(s(),t("div",i))]))}});export{g as _};
@@ -1 +1 @@
1
- import{d as F,j as a,c as n,z as T,n as f,_ as b,s as g,p as D,t as m,T as M,A as W,F as w,m as k,D as C,g as j,r as p,O as U,l as q,o as H,a as i,w as P,v as L,b as O,x as A,q as N,G as V,P as E}from"./index-B3ZOJqJ1.js";const G={key:0,class:"overflow-hidden"},S=F({__name:"WikiTreeNode",props:{node:{},selectedPath:{},depth:{default:0}},emits:["select"],setup(t,{emit:u}){const s=u,r=p(!0);return(v,l)=>{const h=U("WikiTreeNode",!0);return a(),n("div",null,[t.node.children.length?(a(),n("button",{key:0,class:"flex w-full items-center gap-1.5 rounded px-2 py-1 text-left font-mono text-xs uppercase tracking-wider text-muted-foreground/70 transition-colors hover:bg-white/[0.03]",style:T({paddingLeft:`${t.depth*12+8}px`}),onClick:l[0]||(l[0]=c=>r.value=!r.value)},[f(b,{name:"chevron-right",class:g(["h-3 w-3 shrink-0 transition-transform",r.value?"rotate-90":""])},null,8,["class"]),D(" "+m(t.node.label),1)],4)):(a(),n("button",{key:1,class:g(["flex w-full items-center gap-1.5 rounded px-2 py-1.5 text-left text-xs transition-colors",t.selectedPath===t.node.path?"bg-primary/10 text-primary":"text-foreground/60 hover:bg-white/[0.03] hover:text-foreground"]),style:T({paddingLeft:`${t.depth*12+8}px`}),onClick:l[1]||(l[1]=c=>t.node.path&&s("select",t.node.path))},m(t.node.label),7)),f(M,{"enter-active-class":"duration-150 ease-out","enter-from-class":"opacity-0 -translate-y-1","enter-to-class":"opacity-100 translate-y-0","leave-active-class":"duration-100 ease-in","leave-from-class":"opacity-100 translate-y-0","leave-to-class":"opacity-0 -translate-y-1"},{default:W(()=>[t.node.children.length&&r.value?(a(),n("div",G,[(a(!0),n(w,null,k(t.node.children,c=>(a(),C(h,{key:c.id,node:c,"selected-path":t.selectedPath,depth:t.depth+1,onSelect:l[2]||(l[2]=x=>s("select",x))},null,8,["node","selected-path","depth"]))),128))])):j("",!0)]),_:1})])}}}),I={class:"relative flex h-full flex-col overflow-hidden md:flex-row"},R={class:"flex shrink-0 items-center gap-2 border-b border-border bg-sidebar px-4 py-2 md:hidden"},_={key:0,class:"absolute left-0 right-0 top-[calc(2.75rem+2.75rem)] z-20 max-h-[60vh] overflow-y-auto border-b border-border bg-sidebar px-2 py-3 md:hidden"},J={class:"hidden w-52 shrink-0 overflow-y-auto border-r border-border px-2 py-4 md:block"},K={class:"flex-1 overflow-y-auto"},Q={key:0,class:"max-w-2xl px-4 py-5 md:px-8 md:py-6"},X={class:"mb-5 text-xl font-semibold"},Y=["innerHTML"],Z={key:1,class:"flex h-full items-center justify-center font-mono text-sm text-muted-foreground/40"},te=F({__name:"WikiView",setup(t){const u=p([]),s=p(""),r=p(null),v=p(""),l=p(!1),h=N(()=>{const o=v.value.trim().toLowerCase();return o?u.value.filter(e=>`${e.path} ${e.title}`.toLowerCase().includes(o)):u.value}),c=N(()=>E(h.value));async function x(){const o=await V("/api/wiki");o.ok&&(u.value=(await o.json()).pages,!s.value&&u.value[0]&&(s.value=u.value[0].path))}async function z(o){if(!o)return;const e=await V(`/api/wiki/${encodeURIComponent(o)}`);e.ok&&(r.value=await e.json())}function B(o){s.value=o,l.value=!1}return q(s,o=>{z(o)}),H(x),(o,e)=>{var $;return a(),n("div",I,[i("div",R,[i("button",{class:"flex items-center gap-1.5 rounded border border-border px-3 py-1.5 font-mono text-xs text-muted-foreground transition-colors hover:bg-white/5 hover:text-foreground",onClick:e[0]||(e[0]=d=>l.value=!l.value)},[f(b,{name:"book",class:"h-3.5 w-3.5"}),i("span",null,m((($=r.value)==null?void 0:$.path)??"Pages"),1),f(b,{name:"chevron-down",class:g(["h-3 w-3 transition-transform",l.value?"rotate-180":""])},null,8,["class"])])]),f(M,{"enter-active-class":"duration-200 ease-out","enter-from-class":"-translate-y-2 opacity-0","enter-to-class":"translate-y-0 opacity-100","leave-active-class":"duration-150 ease-in","leave-from-class":"translate-y-0 opacity-100","leave-to-class":"-translate-y-2 opacity-0"},{default:W(()=>[l.value?(a(),n("div",_,[P(i("input",{"onUpdate:modelValue":e[1]||(e[1]=d=>v.value=d),class:"mb-3 w-full rounded border border-border bg-card px-3 py-2 text-sm text-foreground placeholder:text-muted-foreground/35",placeholder:"Filter pages"},null,512),[[L,v.value]]),(a(!0),n(w,null,k(c.value,d=>(a(),C(S,{key:d.id,node:d,"selected-path":s.value,onSelect:e[2]||(e[2]=y=>B(y))},null,8,["node","selected-path"]))),128))])):j("",!0)]),_:1}),i("aside",J,[P(i("input",{"onUpdate:modelValue":e[3]||(e[3]=d=>v.value=d),class:"mb-3 w-full rounded border border-border bg-sidebar px-3 py-2 text-sm text-foreground placeholder:text-muted-foreground/35",placeholder:"Filter pages"},null,512),[[L,v.value]]),(a(!0),n(w,null,k(c.value,d=>(a(),C(S,{key:d.id,node:d,"selected-path":s.value,onSelect:e[4]||(e[4]=y=>s.value=y)},null,8,["node","selected-path"]))),128))]),i("section",K,[r.value?(a(),n("div",Q,[i("h2",X,m(r.value.path),1),i("div",{class:"wiki-content",innerHTML:O(A)(r.value.content)},null,8,Y)])):(a(),n("div",Z,"Select an article"))])])}}});export{te as default};
1
+ import{d as F,j as a,c as n,z as T,n as f,_ as b,s as g,p as D,t as m,T as M,A as W,F as w,m as k,D as C,g as j,r as p,O as U,l as q,o as H,a as i,w as P,v as L,b as O,x as A,q as N,G as V,P as E}from"./index-D1C7prBJ.js";const G={key:0,class:"overflow-hidden"},S=F({__name:"WikiTreeNode",props:{node:{},selectedPath:{},depth:{default:0}},emits:["select"],setup(t,{emit:u}){const s=u,r=p(!0);return(v,l)=>{const h=U("WikiTreeNode",!0);return a(),n("div",null,[t.node.children.length?(a(),n("button",{key:0,class:"flex w-full items-center gap-1.5 rounded px-2 py-1 text-left font-mono text-xs uppercase tracking-wider text-muted-foreground/70 transition-colors hover:bg-white/[0.03]",style:T({paddingLeft:`${t.depth*12+8}px`}),onClick:l[0]||(l[0]=c=>r.value=!r.value)},[f(b,{name:"chevron-right",class:g(["h-3 w-3 shrink-0 transition-transform",r.value?"rotate-90":""])},null,8,["class"]),D(" "+m(t.node.label),1)],4)):(a(),n("button",{key:1,class:g(["flex w-full items-center gap-1.5 rounded px-2 py-1.5 text-left text-xs transition-colors",t.selectedPath===t.node.path?"bg-primary/10 text-primary":"text-foreground/60 hover:bg-white/[0.03] hover:text-foreground"]),style:T({paddingLeft:`${t.depth*12+8}px`}),onClick:l[1]||(l[1]=c=>t.node.path&&s("select",t.node.path))},m(t.node.label),7)),f(M,{"enter-active-class":"duration-150 ease-out","enter-from-class":"opacity-0 -translate-y-1","enter-to-class":"opacity-100 translate-y-0","leave-active-class":"duration-100 ease-in","leave-from-class":"opacity-100 translate-y-0","leave-to-class":"opacity-0 -translate-y-1"},{default:W(()=>[t.node.children.length&&r.value?(a(),n("div",G,[(a(!0),n(w,null,k(t.node.children,c=>(a(),C(h,{key:c.id,node:c,"selected-path":t.selectedPath,depth:t.depth+1,onSelect:l[2]||(l[2]=x=>s("select",x))},null,8,["node","selected-path","depth"]))),128))])):j("",!0)]),_:1})])}}}),I={class:"relative flex h-full flex-col overflow-hidden md:flex-row"},R={class:"flex shrink-0 items-center gap-2 border-b border-border bg-sidebar px-4 py-2 md:hidden"},_={key:0,class:"absolute left-0 right-0 top-[calc(2.75rem+2.75rem)] z-20 max-h-[60vh] overflow-y-auto border-b border-border bg-sidebar px-2 py-3 md:hidden"},J={class:"hidden w-52 shrink-0 overflow-y-auto border-r border-border px-2 py-4 md:block"},K={class:"flex-1 overflow-y-auto"},Q={key:0,class:"max-w-2xl px-4 py-5 md:px-8 md:py-6"},X={class:"mb-5 text-xl font-semibold"},Y=["innerHTML"],Z={key:1,class:"flex h-full items-center justify-center font-mono text-sm text-muted-foreground/40"},te=F({__name:"WikiView",setup(t){const u=p([]),s=p(""),r=p(null),v=p(""),l=p(!1),h=N(()=>{const o=v.value.trim().toLowerCase();return o?u.value.filter(e=>`${e.path} ${e.title}`.toLowerCase().includes(o)):u.value}),c=N(()=>E(h.value));async function x(){const o=await V("/api/wiki");o.ok&&(u.value=(await o.json()).pages,!s.value&&u.value[0]&&(s.value=u.value[0].path))}async function z(o){if(!o)return;const e=await V(`/api/wiki/${encodeURIComponent(o)}`);e.ok&&(r.value=await e.json())}function B(o){s.value=o,l.value=!1}return q(s,o=>{z(o)}),H(x),(o,e)=>{var $;return a(),n("div",I,[i("div",R,[i("button",{class:"flex items-center gap-1.5 rounded border border-border px-3 py-1.5 font-mono text-xs text-muted-foreground transition-colors hover:bg-white/5 hover:text-foreground",onClick:e[0]||(e[0]=d=>l.value=!l.value)},[f(b,{name:"book",class:"h-3.5 w-3.5"}),i("span",null,m((($=r.value)==null?void 0:$.path)??"Pages"),1),f(b,{name:"chevron-down",class:g(["h-3 w-3 transition-transform",l.value?"rotate-180":""])},null,8,["class"])])]),f(M,{"enter-active-class":"duration-200 ease-out","enter-from-class":"-translate-y-2 opacity-0","enter-to-class":"translate-y-0 opacity-100","leave-active-class":"duration-150 ease-in","leave-from-class":"translate-y-0 opacity-100","leave-to-class":"-translate-y-2 opacity-0"},{default:W(()=>[l.value?(a(),n("div",_,[P(i("input",{"onUpdate:modelValue":e[1]||(e[1]=d=>v.value=d),class:"mb-3 w-full rounded border border-border bg-card px-3 py-2 text-sm text-foreground placeholder:text-muted-foreground/35",placeholder:"Filter pages"},null,512),[[L,v.value]]),(a(!0),n(w,null,k(c.value,d=>(a(),C(S,{key:d.id,node:d,"selected-path":s.value,onSelect:e[2]||(e[2]=y=>B(y))},null,8,["node","selected-path"]))),128))])):j("",!0)]),_:1}),i("aside",J,[P(i("input",{"onUpdate:modelValue":e[3]||(e[3]=d=>v.value=d),class:"mb-3 w-full rounded border border-border bg-sidebar px-3 py-2 text-sm text-foreground placeholder:text-muted-foreground/35",placeholder:"Filter pages"},null,512),[[L,v.value]]),(a(!0),n(w,null,k(c.value,d=>(a(),C(S,{key:d.id,node:d,"selected-path":s.value,onSelect:e[4]||(e[4]=y=>s.value=y)},null,8,["node","selected-path"]))),128))]),i("section",K,[r.value?(a(),n("div",Q,[i("h2",X,m(r.value.path),1),i("div",{class:"wiki-content",innerHTML:O(A)(r.value.content)},null,8,Y)])):(a(),n("div",Z,"Select an article"))])])}}});export{te as default};
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/SquadsView-D2pIRWTM.js","assets/StatusIndicator.vue_vue_type_script_setup_true_lang-DaZufA4t.js","assets/AgentActivityView-BR91djhV.js","assets/SkillsView-DjxwYTH3.js","assets/SettingsTabs.vue_vue_type_script_setup_true_lang-B7GKSgO5.js","assets/McpView-CbbqH6O6.js"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/SquadsView-DpI4RInq.js","assets/StatusIndicator.vue_vue_type_script_setup_true_lang-BwmRY2qH.js","assets/AgentActivityView-D-xGvKsm.js","assets/SkillsView-CobJkgd1.js","assets/SettingsTabs.vue_vue_type_script_setup_true_lang-BE0YBCo4.js","assets/McpView-CbiIag57.js"])))=>i.map(i=>d[i]);
2
2
  (function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const i of s)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerPolicy&&(i.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?i.credentials="include":s.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(s){if(s.ep)return;s.ep=!0;const i=n(s);fetch(s.href,i)}})();/**
3
3
  * @vue/shared v3.5.34
4
4
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
@@ -78,4 +78,4 @@ https://github.com/highlightjs/highlight.js/issues/2277`),he=A,re=P),M===void 0&
78
78
  `);let B;try{B=l&&$e.getLanguage(l)?$e.highlight(D,{language:l,ignoreIllegals:!0}).value:$e.highlightAuto(D).value}catch{B=D.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}const j=l.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;"),q=j?`<span class="text-[10px] text-txt-muted font-mono absolute top-2 right-3 select-none">${j}</span>`:"";n.push(`<div class="relative my-2"><pre class="bg-surface-1 border border-edge rounded-xl p-3 overflow-x-auto"><code class="hljs font-mono text-xs">${B}</code></pre>${q}</div>`),r=!1,l="",a=[]}continue}if(r){a.push(f);continue}if(fh(f)){u(),o=!0,c.push(f);continue}o&&h();const p=f.match(/^####\s+(.+)/),m=f.match(/^###\s+(.+)/),w=f.match(/^##\s+(.+)/),E=f.match(/^#\s+(.+)/);if(p){u(),d(),n.push(`<h4 class="text-sm font-semibold text-gray-200 mt-4 mb-1">${yt(p[1])}</h4>`);continue}if(m){u(),d(),n.push(`<h3 class="text-base font-semibold text-gray-100 mt-5 mb-2">${yt(m[1])}</h3>`);continue}if(w){u(),d(),n.push(`<h2 class="text-lg font-bold text-gray-100 mt-6 mb-2 pb-1 border-b border-gray-800">${yt(w[1])}</h2>`);continue}if(E){u(),d(),n.push(`<h1 class="text-xl font-bold text-gray-100 mt-6 mb-3">${yt(E[1])}</h1>`);continue}if(/^---+$/.test(f.trim())){u(),d(),n.push('<hr class="border-gray-800 my-4" />');continue}const y=f.match(/^[-*+]\s+(.+)/);if(y){s==="ol"&&u(),d(),s||(n.push('<ul class="list-disc list-inside my-2 space-y-1 pl-2">'),s="ul"),n.push(`<li>${yt(y[1])}</li>`);continue}const v=f.match(/^\d+\.\s+(.+)/);if(v){s==="ul"&&u(),d(),s||(n.push('<ol class="list-decimal list-inside my-2 space-y-1 pl-2">'),s="ol"),n.push(`<li>${yt(v[1])}</li>`);continue}const T=f.match(/^>\s?(.*)/);if(T){u(),i||(n.push('<blockquote class="border-l-2 border-txt-muted pl-3 my-2 text-txt-muted italic">'),i=!0),n.push(`<p class="my-0">${yt(T[1])}</p>`);continue}if(f.trim()===""){u(),d(),n.push('<div class="my-2"></div>');continue}u(),d(),n.push(`<p class="my-1">${yt(f)}</p>`)}if(r&&a.length){const f=a.join(`
79
79
  `).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");n.push(`<pre class="bg-gray-900 border border-gray-800 rounded p-3 my-2 overflow-x-auto"><code class="font-mono text-xs text-green-300">${f}</code></pre>`)}return h(),u(),d(),n.join(`
80
80
  `)}function Zv(e){const t=(e??"").toLowerCase();return["error","failed","failure","cancelled","aborted"].some(n=>t.includes(n))?"error":["success","completed","done","healthy"].some(n=>t.includes(n))?"success":["working","running","active","queued","pending","in_progress","processing"].some(n=>t.includes(n))?"working":"idle"}function Xv(e){const t=(e??"").toLowerCase();return["failed","error","aborted","cancelled"].some(n=>t.includes(n))?"failed":["success","completed","merged"].some(n=>t.includes(n))?"success":["pause","idle"].some(n=>t.includes(n))?"paused":"running"}function $l(e){switch((e??"").toLowerCase()){case"gi joe":return"#5fff87";case"thundercats":return"#ffd000";case"a-team":return"#ff6b35";case"ghostbusters":return"#c4a7ff";default:return"#00d9ff"}}function Qv(e){switch(e){case"failed":return"#ff3864";case"success":return"#5fff87";case"paused":return"#8a8a99";default:return"#00d9ff"}}function B_(e,t){const n=e.replace("#","");if(n.length!==6)return e;const r=Number.parseInt(n.slice(0,2),16),s=Number.parseInt(n.slice(2,4),16),i=Number.parseInt(n.slice(4,6),16);return`rgba(${r}, ${s}, ${i}, ${t})`}function gh(e){return(e??"io").replace(/[_/]+/g," ").replace(/-/g," ").replace(/\.[^.]+$/,"").replace(/\w/g,t=>t.toUpperCase())}function mh(e){if(!e)return"just now";const t=new Date(e);if(Number.isNaN(t.getTime()))return e;const n=t.getTime()-Date.now(),r=n<=0,s=Math.abs(n),i=6e4,o=60*i,a=24*o;let l=0,c="m";return s<o?(l=Math.max(1,Math.round(s/i)),c="m"):s<a?(l=Math.round(s/o),c="h"):(l=Math.round(s/a),c="d"),r?`${l}${c} ago`:`in ${l}${c}`}function ew(e,t){const n=`${e} ${t??""}`.toLowerCase();return/(read|write|edit|glob|file|path|fs)/.test(n)?"File System":/(grep|search|code|analy|lint|semantic|test|debug)/.test(n)?"Code Intelligence":/(git|branch|commit|pr|issue|ci|build|release)/.test(n)?"Git & CI":"Communication"}function tw(e){const t=[];for(const n of e){const r=n.path.split("/").filter(Boolean);let s=t,i="";for(const[o,a]of r.entries()){i=i?`${i}/${a}`:a;let l=s.find(c=>c.id===i);l||(l={id:i,label:o===r.length-1?n.title:gh(a),path:o===r.length-1?n.path:void 0,children:[]},s.push(l)),s=l.children}}return t}function nw(e,t){return e.some(n=>n.status==="error")?"error":e.some(n=>n.status==="working")?"working":e.some(n=>n.status==="success")?"success":((t==null?void 0:t.instances_active)??0)>0?"working":"idle"}const H_={key:0,class:"fixed inset-y-0 right-0 z-50 flex w-full flex-col border-l border-border bg-sidebar md:w-[420px]"},F_={class:"flex shrink-0 items-center justify-between border-b border-border px-5 py-4"},q_={class:"flex items-center gap-2"},K_={key:0,class:"rounded-full bg-destructive px-1.5 py-0.5 font-mono text-[9px] font-bold text-white"},W_={class:"flex-1 overflow-y-auto"},V_={key:0,class:"px-5 py-8 font-mono text-xs uppercase tracking-[0.22em] text-muted-foreground/50"},G_={key:1,class:"px-5 py-8 font-mono text-xs uppercase tracking-[0.22em] text-muted-foreground/50"},z_={key:2},J_={class:"sticky top-0 z-10 border-b border-border/40 bg-sidebar/95 px-5 py-2 backdrop-blur"},Y_=["onClick"],Z_={class:"flex items-start gap-3"},X_={class:"mt-1.5 shrink-0"},Q_={key:0,class:"h-1.5 w-1.5 rounded-full bg-primary",style:{boxShadow:"var(--glow-cyan)"}},ev={key:1,class:"h-1.5 w-1.5"},tv={class:"min-w-0 flex-1"},nv={class:"mb-1 flex flex-wrap items-center gap-1.5"},rv={class:"font-mono text-[10px] text-muted-foreground/50"},sv={class:"text-[10px] text-muted-foreground/50"},iv={class:"flex items-center justify-between gap-2"},ov={class:"font-mono text-[10px] text-muted-foreground/40"},av={key:0,class:"text-[10px] text-primary/60"},lv={key:0,class:"mt-2.5 rounded border border-white/[0.06] bg-black/30 p-3 text-xs text-foreground/60"},cv=["innerHTML"],uv=dn({__name:"FeedFlyout",props:{open:{type:Boolean}},emits:["close"],setup(e,{emit:t}){const n=e,r=t,s=Ae([]),i=Ae({}),o=Ae(null),a=Ae(!1),l=Fe(()=>{var d;const h=new Map;for(const f of s.value){const p=f.squad_slug??"io",m=i.value[p];h.has(p)||h.set(p,{key:p,label:(m==null?void 0:m.name)??gh(p),universe:m==null?void 0:m.universe,entries:[]}),(d=h.get(p))==null||d.entries.push(f)}return[...h.values()]});async function c(){a.value=!0;try{const[h,d]=await Promise.all([gt("/api/feed?limit=80"),gt("/api/squads")]);if(h.ok&&(s.value=(await h.json()).entries),d.ok){const f=await d.json();i.value=Object.fromEntries(f.squads.map(p=>[p.slug??p.id??p.name.toLowerCase(),{name:p.name,universe:p.universe}]))}}finally{a.value=!1}}async function u(h){o.value=o.value===h.id?null:h.id,h.read_at||(await gt(`/api/feed/${h.id}/read`,{method:"POST"}).catch(()=>null),h.read_at=new Date().toISOString())}return cn(()=>n.open,h=>{h?c():o.value=null}),(h,d)=>(J(),tr(yd,{to:"body"},[ue(vs,{"enter-active-class":"duration-200 ease-out","enter-from-class":"opacity-0","enter-to-class":"opacity-100","leave-active-class":"duration-150 ease-in","leave-from-class":"opacity-100","leave-to-class":"opacity-0"},{default:Gt(()=>[e.open?(J(),Z("div",{key:0,class:"fixed inset-0 z-40 bg-black/40",onClick:d[0]||(d[0]=f=>r("close"))})):Je("",!0)]),_:1}),ue(vs,{"enter-active-class":"transition-transform duration-300 ease-[cubic-bezier(0.22,1,0.36,1)]","enter-from-class":"translate-x-full","enter-to-class":"translate-x-0","leave-active-class":"transition-transform duration-200 ease-in","leave-from-class":"translate-x-0","leave-to-class":"translate-x-full"},{default:Gt(()=>[e.open?(J(),Z("aside",H_,[$("div",F_,[$("div",q_,[ue(st,{name:"message",class:"h-4 w-4 text-primary"}),d[2]||(d[2]=$("span",{class:"text-sm font-semibold"},"Activity Feed",-1)),s.value.filter(f=>!f.read_at).length?(J(),Z("span",K_,Oe(s.value.filter(f=>!f.read_at).length),1)):Je("",!0)]),$("button",{class:"flex h-7 w-7 items-center justify-center rounded text-muted-foreground transition-colors hover:bg-white/5 hover:text-foreground",onClick:d[1]||(d[1]=f=>r("close"))},[ue(st,{name:"x",class:"h-4 w-4"})])]),$("div",W_,[a.value?(J(),Z("div",V_,"Syncing feed…")):l.value.length?(J(),Z("div",z_,[(J(!0),Z(ge,null,xn(l.value,f=>(J(),Z("section",{key:f.key,class:"border-b border-border/40 last:border-b-0"},[$("div",J_,[$("span",{class:"rounded px-1.5 py-0.5 font-mono text-[10px]",style:zs({color:De($l)(f.universe),backgroundColor:De(B_)(De($l)(f.universe),.15)})},Oe(f.label),5)]),$("div",null,[(J(!0),Z(ge,null,xn(f.entries,p=>(J(),Z("article",{key:p.id,class:ft(["cursor-pointer px-5 py-3.5 transition-colors hover:bg-white/[0.02]",p.read_at?"":"bg-white/[0.015]"]),onClick:m=>u(p)},[$("div",Z_,[$("div",X_,[p.read_at?(J(),Z("div",ev)):(J(),Z("div",Q_))]),$("div",tv,[$("div",nv,[$("span",rv,Oe(p.source_ref??p.instance_id??p.task_id??p.type),1),d[3]||(d[3]=$("span",{class:"font-mono text-[10px] text-muted-foreground/40"},"·",-1)),$("span",sv,Oe(p.source_type??"IO"),1)]),$("div",{class:ft(["mb-1 text-sm leading-snug",p.read_at?"text-foreground/70":"text-foreground"])},Oe(p.title),3),$("div",iv,[$("span",ov,Oe(De(mh)(p.created_at)),1),p.body?(J(),Z("span",av,Oe(o.value===p.id?"▲ collapse":"▼ details"),1)):Je("",!0)]),ue(vs,{"enter-active-class":"duration-150 ease-out","enter-from-class":"opacity-0 -translate-y-1","enter-to-class":"opacity-100 translate-y-0","leave-active-class":"duration-100 ease-in","leave-from-class":"opacity-100 translate-y-0","leave-to-class":"opacity-0 -translate-y-1"},{default:Gt(()=>[o.value===p.id&&p.body?(J(),Z("div",lv,[$("div",{class:"wiki-content text-xs font-mono leading-relaxed",innerHTML:De(ph)(p.body)},null,8,cv)])):Je("",!0)]),_:2},1024)])])],10,Y_))),128))])]))),128))])):(J(),Z("div",G_,"No feed activity."))])])):Je("",!0)]),_:1})]))}}),hv=nu("chat",()=>{const e=Ae([]),t=Ae(!1);let n=null,r=null;function s(d){return e.value.length?d?e.value.find(f=>f.id===d)??null:e.value[e.value.length-1]??null:null}function i(d){const f={id:d.id??crypto.randomUUID(),createdAt:d.createdAt??new Date().toISOString(),streaming:d.streaming??!1,role:d.role,text:d.text,kind:d.kind};return e.value.push(f),f}function o(d,f){const p=s(f??r??void 0);p&&(p.text+=d)}function a(d,f){const p=s(f??r??void 0);p&&(p.streaming=d)}function l(){n==null||n.close(),n=null,r=null,t.value=!1}async function c(d,f=[]){const p=d.trim();if(!p)return;l(),i({role:"user",text:p});const m=i({role:"assistant",text:"",streaming:!0});r=m.id,t.value=!0;const w=await py("/api/events");n=new EventSource(w),n.onmessage=y=>{try{const v=JSON.parse(y.data);if(v.type==="delta"){o(String(v.text??""),m.id);return}if(v.type==="done"){a(!1,m.id),l();return}v.type==="feed"&&i({role:"system",kind:"feed",text:[v.title,v.body].filter(Boolean).join(`
81
- `)||JSON.stringify(v,null,2)})}catch{o(y.data,m.id)}},n.onerror=()=>{m.text||(m.text="stream disconnected"),a(!1,m.id),l()};const E=await gt("/api/message",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({text:p,attachments:f})});if(!E.ok){const y=await E.text();m.text=y||`Request failed (${E.status})`,a(!1,m.id),l()}}async function u(){await gt("/api/orchestrator/abort",{method:"POST"}).catch(()=>null),a(!1),l()}function h(){l(),e.value=[]}return{messages:e,isLoading:t,addMessage:i,appendToLast:o,setLastStreaming:a,sendMessage:c,abortRun:u,clearMessages:h}}),dv={class:"fixed bottom-14 right-0 z-50 flex w-full flex-col md:bottom-10 md:right-4 md:w-[360px]"},fv={key:0,class:"flex h-[380px] flex-col overflow-hidden rounded-t-xl border border-border border-b-0 bg-sidebar"},pv={class:"flex shrink-0 items-center justify-between border-b border-border/50 px-4 py-2.5"},gv={class:"flex items-center gap-2"},mv={key:0,class:"whitespace-pre-wrap"},bv=["innerHTML"],yv={type:"submit",class:"flex shrink-0 items-center gap-1 rounded bg-primary/15 px-2.5 py-1 font-mono text-xs text-primary transition-colors hover:bg-primary/25"},_v=dn({__name:"FloatingChat",setup(e,{expose:t}){const n=hv(),r=Ae(""),s=Ae(!1),i=Ae(null),o=Ae(null),a=Fe(()=>n.messages.length?n.messages:[{id:"welcome",role:"assistant",text:"IO online. What do you need?",createdAt:new Date().toISOString(),streaming:!1}]),l=Fe(()=>a.value.map(f=>`${f.id}:${f.text.length}:${f.streaming}`).join("|"));function c(){o.value&&(o.value.scrollTop=o.value.scrollHeight)}async function u(){const f=r.value.trim();f&&(r.value="",await n.sendMessage(f))}function h(){s.value=!0}function d(){s.value=!1}return cn(s,async f=>{var p;f&&(await er(),(p=i.value)==null||p.focus(),c())}),cn(l,async()=>{s.value&&(await er(),c())}),t({open:h,isOpen:s}),(f,p)=>(J(),Z("div",dv,[ue(vs,{"enter-active-class":"duration-200 ease-out","enter-from-class":"translate-y-2 scale-[0.97] opacity-0","enter-to-class":"translate-y-0 scale-100 opacity-100","leave-active-class":"duration-150 ease-in","leave-from-class":"translate-y-0 scale-100 opacity-100","leave-to-class":"translate-y-2 scale-[0.97] opacity-0"},{default:Gt(()=>[s.value?(J(),Z("div",fv,[$("div",pv,[$("div",gv,[ue(st,{name:"terminal",class:"h-3.5 w-3.5 text-primary"}),p[1]||(p[1]=$("span",{class:"font-mono text-xs text-foreground/70"},"IO Command",-1))]),$("button",{class:"text-muted-foreground/40 transition-colors hover:text-muted-foreground",onClick:d},[ue(st,{name:"chevron-down",class:"h-4 w-4"})])]),$("div",{ref_key:"scrollPanel",ref:o,class:"flex-1 space-y-2.5 overflow-y-auto px-4 py-3"},[(J(!0),Z(ge,null,xn(a.value,m=>(J(),Z("div",{key:m.id,class:ft(["flex",m.role==="user"?"justify-end":"justify-start"])},[$("div",{class:ft(["max-w-[85%] rounded-lg px-3 py-2 text-xs leading-relaxed",m.role==="user"?"rounded-br-sm border border-primary/20 bg-primary/15 font-mono text-primary":"rounded-bl-sm border border-white/[0.06] bg-white/[0.04] text-foreground/75"])},[m.role==="user"?(J(),Z("div",mv,Oe(m.text),1)):(J(),Z("div",{key:1,class:"wiki-content text-xs",innerHTML:De(ph)(m.text||(m.streaming?"…":""))},null,8,bv))],2)],2))),128))],512)])):Je("",!0)]),_:1}),$("div",{class:ft(["overflow-hidden border border-border bg-sidebar",s.value?"rounded-b-xl border-t-0":"rounded-xl"])},[s.value?(J(),Z("form",{key:0,class:"flex items-center gap-2 border-t border-border/50 px-3 py-2.5",onSubmit:Qf(u,["prevent"])},[ud($("input",{ref_key:"inputRef",ref:i,"onUpdate:modelValue":p[0]||(p[0]=m=>r.value=m),type:"text",placeholder:"Command IO...",class:"flex-1 bg-transparent font-mono text-sm text-foreground placeholder:text-muted-foreground/40"},null,512),[[Yf,r.value]]),$("button",yv,[ue(st,{name:"zap",class:"h-3 w-3"}),p[2]||(p[2]=Gc(" send ",-1))])],32)):(J(),Z("button",{key:1,class:"flex w-full items-center gap-2.5 px-4 py-3 text-left transition-colors hover:bg-white/[0.03]",onClick:h},[ue(st,{name:"terminal",class:"h-4 w-4 text-primary",style:{filter:"drop-shadow(0 0 6px #00d9ff88)"}}),p[3]||(p[3]=$("span",{class:"flex-1 font-mono text-sm text-muted-foreground/60"},"Command IO...",-1)),ue(st,{name:"chevron-up",class:"h-4 w-4 text-muted-foreground/30"})]))],2)]))}}),vv={class:"fixed inset-x-0 bottom-0 z-30 flex items-center justify-around border-t border-border bg-sidebar px-2 pb-[env(safe-area-inset-bottom)] pt-1 md:hidden"},wv={key:0,class:"absolute -right-0.5 -top-0.5 flex h-3.5 min-w-3.5 items-center justify-center rounded-full bg-destructive px-0.5 font-mono text-[8px] font-bold leading-none text-white"},Ev={class:"font-mono text-[10px]"},Sv={key:1,class:"absolute bottom-0 left-1/2 h-0.5 w-6 -translate-x-1/2 rounded-full bg-primary"},kv=dn({__name:"MobileNav",setup(e){const t=Io(),n=Ae(0),r=Ae(0);let s=0;const i=[{to:"/squads",label:"Squads",icon:"grid"},{to:"/chat",label:"Chat",icon:"terminal"},{to:"/activity",label:"Activity",icon:"activity"},{to:"/feed",label:"Feed",icon:"message",badge:"feed"},{to:"/wiki",label:"Wiki",icon:"book"},{to:"/skills",label:"Settings",icon:"settings",match:["/skills","/mcp"]}];function o(c){return(c.match??[c.to]).some(h=>t.path.startsWith(h))}function a(c){return c.badge==="feed"?n.value:c.badge==="inbox"?r.value:0}async function l(){try{const[c,u]=await Promise.all([gt("/api/feed/count"),gt("/api/inbox/count")]);c.ok&&(n.value=Number((await c.json()).count??0)),u.ok&&(r.value=Number((await u.json()).count??0))}catch{}}return Zr(()=>{l(),s=window.setInterval(l,15e3)}),Xr(()=>{window.clearInterval(s)}),(c,u)=>(J(),Z("nav",vv,[(J(),Z(ge,null,xn(i,h=>ue(De(Ar),{key:h.to,to:h.to,class:ft(["relative flex flex-col items-center gap-0.5 rounded-lg px-3 py-1.5 transition-colors",o(h)?"text-primary":"text-muted-foreground/50"])},{default:Gt(()=>[a(h)>0?(J(),Z("span",wv,Oe(a(h)),1)):Je("",!0),ue(st,{name:h.icon,class:"h-5 w-5"},null,8,["name"]),$("span",Ev,Oe(h.label),1),o(h)?(J(),Z("div",Sv)):Je("",!0)]),_:2},1032,["to","class"])),64))]))}}),Av={class:"dark flex h-full flex-col overflow-hidden bg-background text-foreground"},Tv={class:"flex shrink-0 items-center justify-between border-b border-border bg-sidebar px-4 py-3 md:px-5"},Rv={class:"flex items-center gap-2"},xv={key:0,class:"absolute -right-1.5 -top-1.5 flex h-4 w-4 items-center justify-center rounded-full bg-destructive font-mono text-[9px] font-bold text-white"},Ov={class:"flex min-h-0 flex-1 overflow-hidden"},Cv={class:"flex min-w-0 flex-1 flex-col overflow-hidden"},Nv={class:"min-h-0 flex-1 overflow-hidden pb-[calc(env(safe-area-inset-bottom)+3.5rem)] md:pb-0"},Iv={class:"hidden shrink-0 border-t border-border bg-sidebar px-5 py-2 md:block"},Pv={class:"flex items-center justify-between font-mono text-[11px]"},Lv={class:"flex items-center gap-4"},$v={class:"flex items-center gap-1.5"},Mv={class:"text-muted-foreground"},jv={class:"text-accent-foreground"},Dv={class:"flex items-center gap-4"},Uv={key:0,class:"flex items-center gap-1.5 text-primary"},Bv={class:"text-muted-foreground/40"},Hv={key:1,class:"h-full"},Fv=dn({__name:"App",setup(e){const t=Io(),n=ui(),r=Ae(null),s=Ae(!1),i=Ae(0),o=Ae(null),a=Ae({squads:0,agents:0,instances:0,runningInstances:0,working:0});let l=0;const c=Fe(()=>t.name!=="login"&&n.isAuthenticated),u=Fe(()=>mh(o.value));function h(){var p;(p=r.value)==null||p.open()}function d(p){(p.metaKey||p.ctrlKey)&&p.key==="."&&(p.preventDefault(),h())}async function f(){try{const[p,m,w]=await Promise.all([gt("/api/feed/count"),gt("/api/squads"),gt("/api/tasks")]);if(p.ok&&(i.value=Number((await p.json()).count??0)),m.ok){const E=await m.json();a.value.squads=E.squads.length,a.value.agents=E.squads.reduce((y,v)=>y+Number(v.agents_count??0),0),a.value.instances=E.squads.reduce((y,v)=>y+Number(v.instances_total??0),0),a.value.runningInstances=E.squads.reduce((y,v)=>y+Number(v.instances_active??0),0)}if(w.ok){const E=await w.json();a.value.working=E.tasks.filter(y=>/running|working|queued|pending|in_progress/i.test(y.status)).length}o.value=new Date().toISOString()}catch{}}return Zr(()=>{n.init(),f(),l=window.setInterval(f,3e4),window.addEventListener("keydown",d)}),Xr(()=>{window.clearInterval(l),window.removeEventListener("keydown",d)}),(p,m)=>(J(),Z("div",Av,[c.value?(J(),Z(ge,{key:0},[$("div",Tv,[m[3]||(m[3]=$("div",{class:"flex items-center gap-3 md:gap-4"},[$("div",{class:"select-none font-mono text-xl font-bold tracking-tight text-primary text-glow-cyan"},"IO"),$("div",{class:"hidden h-4 w-px bg-border md:block"}),$("div",{class:"hidden font-mono text-xs text-muted-foreground md:block"},"Mission Control · Developer AI Assistant")],-1)),$("div",Rv,[$("button",{class:"relative flex items-center gap-2 rounded border border-border px-3 py-1.5 text-sm text-muted-foreground transition-all hover:border-primary/40 hover:bg-primary/5 hover:text-foreground",onClick:m[0]||(m[0]=w=>s.value=!0)},[ue(st,{name:"message",class:"h-4 w-4"}),m[2]||(m[2]=$("span",{class:"text-xs font-medium"},"Feed",-1)),i.value>0?(J(),Z("span",xv,Oe(i.value),1)):Je("",!0)])])]),$("div",Ov,[ue(Ry),$("div",Cv,[$("div",Nv,[ue(De(Qi))])])]),$("div",Iv,[$("div",Pv,[$("div",Lv,[$("div",$v,[ue(st,{name:"circle",class:"h-2 w-2 text-status-success"}),m[4]||(m[4]=$("span",{class:"text-muted-foreground"},"Daemon running",-1))]),m[5]||(m[5]=$("span",{class:"text-muted-foreground/40"},"·",-1)),$("span",Mv,Oe(a.value.squads)+" squads · "+Oe(a.value.agents)+" agents",1),m[6]||(m[6]=$("span",{class:"text-muted-foreground/40"},"·",-1)),$("span",jv,Oe(a.value.runningInstances)+"/"+Oe(a.value.instances)+" instances active",1)]),$("div",Dv,[a.value.working>0?(J(),Z("div",Uv,[ue(st,{name:"activity",class:"h-3 w-3"}),$("span",null,Oe(a.value.working)+" working",1)])):Je("",!0),$("span",Bv,"Last sync: "+Oe(u.value),1)])])]),ue(uv,{open:s.value,onClose:m[1]||(m[1]=w=>s.value=!1)},null,8,["open"]),ue(_v,{ref_key:"floatingChat",ref:r},null,512),ue(kv)],64)):(J(),Z("div",Hv,[ue(De(Qi))]))]))}}),qv="modulepreload",Kv=function(e){return"/"+e},Ml={},Rt=function(t,n,r){let s=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),a=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));s=Promise.allSettled(n.map(l=>{if(l=Kv(l),l in Ml)return;Ml[l]=!0;const c=l.endsWith(".css"),u=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${u}`))return;const h=document.createElement("link");if(h.rel=c?"stylesheet":qv,c||(h.as="script"),h.crossOrigin="",h.href=l,a&&h.setAttribute("nonce",a),document.head.appendChild(h),c)return new Promise((d,f)=>{h.addEventListener("load",d),h.addEventListener("error",()=>f(new Error(`Unable to preload CSS for ${l}`)))})}))}function i(o){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=o,window.dispatchEvent(a),!a.defaultPrevented)throw o}return s.then(o=>{for(const a of o||[])a.status==="rejected"&&i(a.reason);return t().catch(i)})},bh=gg({history:Jp(),routes:[{path:"/",redirect:"/chat"},{path:"/login",name:"login",component:()=>Rt(()=>import("./LoginView-rHOPTQtH.js"),[]),meta:{title:"Login",subtitle:"Authenticate against Supabase",public:!0}},{path:"/chat",name:"chat",component:()=>Rt(()=>import("./ChatView-BEHq7ipI.js"),[]),meta:{title:"Chat",subtitle:"Live orchestrator stream"}},{path:"/squads",name:"squads",component:()=>Rt(()=>import("./SquadsView-D2pIRWTM.js"),__vite__mapDeps([0,1])),meta:{title:"Squads",subtitle:"Project crews and worktrees"}},{path:"/activity",name:"activity",component:()=>Rt(()=>import("./AgentActivityView-BR91djhV.js"),__vite__mapDeps([2,1])),meta:{title:"Activity",subtitle:"Task execution and event stream"}},{path:"/schedules",name:"schedules",component:()=>Rt(()=>import("./SchedulesView-B5U9R5xb.js"),[]),meta:{title:"Schedules",subtitle:"Cron-driven automation matrix"}},{path:"/skills",name:"skills",component:()=>Rt(()=>import("./SkillsView-DjxwYTH3.js"),__vite__mapDeps([3,4])),meta:{title:"Skills",subtitle:"Installed skill manifests and content"}},{path:"/wiki",name:"wiki",component:()=>Rt(()=>import("./WikiView-DK_0MFE6.js"),[]),meta:{title:"Wiki",subtitle:"Workspace knowledge browser"}},{path:"/mcp",name:"mcp",component:()=>Rt(()=>import("./McpView-CbbqH6O6.js"),__vite__mapDeps([5,4])),meta:{title:"MCP",subtitle:"Server registry and transport health"}},{path:"/feed",name:"feed",component:()=>Rt(()=>import("./FeedView-Cr-wMZ0K.js"),[]),meta:{title:"Feed",subtitle:"Notifications and durable activity"}},{path:"/inbox",name:"inbox",component:()=>Rt(()=>import("./InboxView-DYqFsN1q.js"),[]),meta:{title:"Inbox",subtitle:"Operator-facing messages"}}]});bh.beforeEach(async e=>{const t=ui();return await t.init(),e.path==="/"?"/chat":t.authEnabled?!t.user&&e.path!=="/login"&&!e.meta.public?{path:"/login",query:{redirect:e.fullPath}}:t.user&&e.path==="/login"?"/chat":!0:e.path==="/login"?"/chat":!0});const Uo=rp(Fv),Wv=op();Uo.use(Wv);Uo.use(bh);Uo.mount("#app");export{Gt as A,B_ as B,Qv as C,tr as D,$l as E,ge as F,gt as G,Zv as H,Xv as I,mh as J,nw as K,Xr as L,py as M,ew as N,Vv as O,tw as P,zv as Q,Ar as R,Gv as S,vs as T,gh as U,st as _,$ as a,De as b,Z as c,dn as d,Jv as e,Qf as f,Je as g,Yv as h,Io as i,J as j,hv as k,cn as l,xn as m,ue as n,Zr as o,Gc as p,Fe as q,Ae as r,ft as s,Oe as t,ui as u,Yf as v,ud as w,ph as x,er as y,zs as z};
81
+ `)||JSON.stringify(v,null,2)})}catch{o(y.data,m.id)}},n.onerror=()=>{m.text||(m.text="stream disconnected"),a(!1,m.id),l()};const E=await gt("/api/message",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({text:p,attachments:f})});if(!E.ok){const y=await E.text();m.text=y||`Request failed (${E.status})`,a(!1,m.id),l()}}async function u(){await gt("/api/orchestrator/abort",{method:"POST"}).catch(()=>null),a(!1),l()}function h(){l(),e.value=[]}return{messages:e,isLoading:t,addMessage:i,appendToLast:o,setLastStreaming:a,sendMessage:c,abortRun:u,clearMessages:h}}),dv={class:"fixed bottom-14 right-0 z-50 flex w-full flex-col md:bottom-10 md:right-4 md:w-[360px]"},fv={key:0,class:"flex h-[380px] flex-col overflow-hidden rounded-t-xl border border-border border-b-0 bg-sidebar"},pv={class:"flex shrink-0 items-center justify-between border-b border-border/50 px-4 py-2.5"},gv={class:"flex items-center gap-2"},mv={key:0,class:"whitespace-pre-wrap"},bv=["innerHTML"],yv={type:"submit",class:"flex shrink-0 items-center gap-1 rounded bg-primary/15 px-2.5 py-1 font-mono text-xs text-primary transition-colors hover:bg-primary/25"},_v=dn({__name:"FloatingChat",setup(e,{expose:t}){const n=hv(),r=Ae(""),s=Ae(!1),i=Ae(null),o=Ae(null),a=Fe(()=>n.messages.length?n.messages:[{id:"welcome",role:"assistant",text:"IO online. What do you need?",createdAt:new Date().toISOString(),streaming:!1}]),l=Fe(()=>a.value.map(f=>`${f.id}:${f.text.length}:${f.streaming}`).join("|"));function c(){o.value&&(o.value.scrollTop=o.value.scrollHeight)}async function u(){const f=r.value.trim();f&&(r.value="",await n.sendMessage(f))}function h(){s.value=!0}function d(){s.value=!1}return cn(s,async f=>{var p;f&&(await er(),(p=i.value)==null||p.focus(),c())}),cn(l,async()=>{s.value&&(await er(),c())}),t({open:h,isOpen:s}),(f,p)=>(J(),Z("div",dv,[ue(vs,{"enter-active-class":"duration-200 ease-out","enter-from-class":"translate-y-2 scale-[0.97] opacity-0","enter-to-class":"translate-y-0 scale-100 opacity-100","leave-active-class":"duration-150 ease-in","leave-from-class":"translate-y-0 scale-100 opacity-100","leave-to-class":"translate-y-2 scale-[0.97] opacity-0"},{default:Gt(()=>[s.value?(J(),Z("div",fv,[$("div",pv,[$("div",gv,[ue(st,{name:"terminal",class:"h-3.5 w-3.5 text-primary"}),p[1]||(p[1]=$("span",{class:"font-mono text-xs text-foreground/70"},"IO Command",-1))]),$("button",{class:"text-muted-foreground/40 transition-colors hover:text-muted-foreground",onClick:d},[ue(st,{name:"chevron-down",class:"h-4 w-4"})])]),$("div",{ref_key:"scrollPanel",ref:o,class:"flex-1 space-y-2.5 overflow-y-auto px-4 py-3"},[(J(!0),Z(ge,null,xn(a.value,m=>(J(),Z("div",{key:m.id,class:ft(["flex",m.role==="user"?"justify-end":"justify-start"])},[$("div",{class:ft(["max-w-[85%] rounded-lg px-3 py-2 text-xs leading-relaxed",m.role==="user"?"rounded-br-sm border border-primary/20 bg-primary/15 font-mono text-primary":"rounded-bl-sm border border-white/[0.06] bg-white/[0.04] text-foreground/75"])},[m.role==="user"?(J(),Z("div",mv,Oe(m.text),1)):(J(),Z("div",{key:1,class:"wiki-content text-xs",innerHTML:De(ph)(m.text||(m.streaming?"…":""))},null,8,bv))],2)],2))),128))],512)])):Je("",!0)]),_:1}),$("div",{class:ft(["overflow-hidden border border-border bg-sidebar",s.value?"rounded-b-xl border-t-0":"rounded-xl"])},[s.value?(J(),Z("form",{key:0,class:"flex items-center gap-2 border-t border-border/50 px-3 py-2.5",onSubmit:Qf(u,["prevent"])},[ud($("input",{ref_key:"inputRef",ref:i,"onUpdate:modelValue":p[0]||(p[0]=m=>r.value=m),type:"text",placeholder:"Command IO...",class:"flex-1 bg-transparent font-mono text-sm text-foreground placeholder:text-muted-foreground/40"},null,512),[[Yf,r.value]]),$("button",yv,[ue(st,{name:"zap",class:"h-3 w-3"}),p[2]||(p[2]=Gc(" send ",-1))])],32)):(J(),Z("button",{key:1,class:"flex w-full items-center gap-2.5 px-4 py-3 text-left transition-colors hover:bg-white/[0.03]",onClick:h},[ue(st,{name:"terminal",class:"h-4 w-4 text-primary",style:{filter:"drop-shadow(0 0 6px #00d9ff88)"}}),p[3]||(p[3]=$("span",{class:"flex-1 font-mono text-sm text-muted-foreground/60"},"Command IO...",-1)),ue(st,{name:"chevron-up",class:"h-4 w-4 text-muted-foreground/30"})]))],2)]))}}),vv={class:"fixed inset-x-0 bottom-0 z-30 flex items-center justify-around border-t border-border bg-sidebar px-2 pb-[env(safe-area-inset-bottom)] pt-1 md:hidden"},wv={key:0,class:"absolute -right-0.5 -top-0.5 flex h-3.5 min-w-3.5 items-center justify-center rounded-full bg-destructive px-0.5 font-mono text-[8px] font-bold leading-none text-white"},Ev={class:"font-mono text-[10px]"},Sv={key:1,class:"absolute bottom-0 left-1/2 h-0.5 w-6 -translate-x-1/2 rounded-full bg-primary"},kv=dn({__name:"MobileNav",setup(e){const t=Io(),n=Ae(0),r=Ae(0);let s=0;const i=[{to:"/squads",label:"Squads",icon:"grid"},{to:"/chat",label:"Chat",icon:"terminal"},{to:"/activity",label:"Activity",icon:"activity"},{to:"/feed",label:"Feed",icon:"message",badge:"feed"},{to:"/wiki",label:"Wiki",icon:"book"},{to:"/skills",label:"Settings",icon:"settings",match:["/skills","/mcp"]}];function o(c){return(c.match??[c.to]).some(h=>t.path.startsWith(h))}function a(c){return c.badge==="feed"?n.value:c.badge==="inbox"?r.value:0}async function l(){try{const[c,u]=await Promise.all([gt("/api/feed/count"),gt("/api/inbox/count")]);c.ok&&(n.value=Number((await c.json()).count??0)),u.ok&&(r.value=Number((await u.json()).count??0))}catch{}}return Zr(()=>{l(),s=window.setInterval(l,15e3)}),Xr(()=>{window.clearInterval(s)}),(c,u)=>(J(),Z("nav",vv,[(J(),Z(ge,null,xn(i,h=>ue(De(Ar),{key:h.to,to:h.to,class:ft(["relative flex flex-col items-center gap-0.5 rounded-lg px-3 py-1.5 transition-colors",o(h)?"text-primary":"text-muted-foreground/50"])},{default:Gt(()=>[a(h)>0?(J(),Z("span",wv,Oe(a(h)),1)):Je("",!0),ue(st,{name:h.icon,class:"h-5 w-5"},null,8,["name"]),$("span",Ev,Oe(h.label),1),o(h)?(J(),Z("div",Sv)):Je("",!0)]),_:2},1032,["to","class"])),64))]))}}),Av={class:"dark flex h-full flex-col overflow-hidden bg-background text-foreground"},Tv={class:"flex shrink-0 items-center justify-between border-b border-border bg-sidebar px-4 py-3 md:px-5"},Rv={class:"flex items-center gap-2"},xv={key:0,class:"absolute -right-1.5 -top-1.5 flex h-4 w-4 items-center justify-center rounded-full bg-destructive font-mono text-[9px] font-bold text-white"},Ov={class:"flex min-h-0 flex-1 overflow-hidden"},Cv={class:"flex min-w-0 flex-1 flex-col overflow-hidden"},Nv={class:"min-h-0 flex-1 overflow-hidden pb-[calc(env(safe-area-inset-bottom)+3.5rem)] md:pb-0"},Iv={class:"hidden shrink-0 border-t border-border bg-sidebar px-5 py-2 md:block"},Pv={class:"flex items-center justify-between font-mono text-[11px]"},Lv={class:"flex items-center gap-4"},$v={class:"flex items-center gap-1.5"},Mv={class:"text-muted-foreground"},jv={class:"text-accent-foreground"},Dv={class:"flex items-center gap-4"},Uv={key:0,class:"flex items-center gap-1.5 text-primary"},Bv={class:"text-muted-foreground/40"},Hv={key:1,class:"h-full"},Fv=dn({__name:"App",setup(e){const t=Io(),n=ui(),r=Ae(null),s=Ae(!1),i=Ae(0),o=Ae(null),a=Ae({squads:0,agents:0,instances:0,runningInstances:0,working:0});let l=0;const c=Fe(()=>t.name!=="login"&&n.isAuthenticated),u=Fe(()=>mh(o.value));function h(){var p;(p=r.value)==null||p.open()}function d(p){(p.metaKey||p.ctrlKey)&&p.key==="."&&(p.preventDefault(),h())}async function f(){try{const[p,m,w]=await Promise.all([gt("/api/feed/count"),gt("/api/squads"),gt("/api/tasks")]);if(p.ok&&(i.value=Number((await p.json()).count??0)),m.ok){const E=await m.json();a.value.squads=E.squads.length,a.value.agents=E.squads.reduce((y,v)=>y+Number(v.agents_count??0),0),a.value.instances=E.squads.reduce((y,v)=>y+Number(v.instances_total??0),0),a.value.runningInstances=E.squads.reduce((y,v)=>y+Number(v.instances_active??0),0)}if(w.ok){const E=await w.json();a.value.working=E.tasks.filter(y=>/running|working|queued|pending|in_progress/i.test(y.status)).length}o.value=new Date().toISOString()}catch{}}return Zr(()=>{n.init(),f(),l=window.setInterval(f,3e4),window.addEventListener("keydown",d)}),Xr(()=>{window.clearInterval(l),window.removeEventListener("keydown",d)}),(p,m)=>(J(),Z("div",Av,[c.value?(J(),Z(ge,{key:0},[$("div",Tv,[m[3]||(m[3]=$("div",{class:"flex items-center gap-3 md:gap-4"},[$("div",{class:"select-none font-mono text-xl font-bold tracking-tight text-primary text-glow-cyan"},"IO"),$("div",{class:"hidden h-4 w-px bg-border md:block"}),$("div",{class:"hidden font-mono text-xs text-muted-foreground md:block"},"Mission Control · Developer AI Assistant")],-1)),$("div",Rv,[$("button",{class:"relative flex items-center gap-2 rounded border border-border px-3 py-1.5 text-sm text-muted-foreground transition-all hover:border-primary/40 hover:bg-primary/5 hover:text-foreground",onClick:m[0]||(m[0]=w=>s.value=!0)},[ue(st,{name:"message",class:"h-4 w-4"}),m[2]||(m[2]=$("span",{class:"text-xs font-medium"},"Feed",-1)),i.value>0?(J(),Z("span",xv,Oe(i.value),1)):Je("",!0)])])]),$("div",Ov,[ue(Ry),$("div",Cv,[$("div",Nv,[ue(De(Qi))])])]),$("div",Iv,[$("div",Pv,[$("div",Lv,[$("div",$v,[ue(st,{name:"circle",class:"h-2 w-2 text-status-success"}),m[4]||(m[4]=$("span",{class:"text-muted-foreground"},"Daemon running",-1))]),m[5]||(m[5]=$("span",{class:"text-muted-foreground/40"},"·",-1)),$("span",Mv,Oe(a.value.squads)+" squads · "+Oe(a.value.agents)+" agents",1),m[6]||(m[6]=$("span",{class:"text-muted-foreground/40"},"·",-1)),$("span",jv,Oe(a.value.runningInstances)+"/"+Oe(a.value.instances)+" instances active",1)]),$("div",Dv,[a.value.working>0?(J(),Z("div",Uv,[ue(st,{name:"activity",class:"h-3 w-3"}),$("span",null,Oe(a.value.working)+" working",1)])):Je("",!0),$("span",Bv,"Last sync: "+Oe(u.value),1)])])]),ue(uv,{open:s.value,onClose:m[1]||(m[1]=w=>s.value=!1)},null,8,["open"]),ue(_v,{ref_key:"floatingChat",ref:r},null,512),ue(kv)],64)):(J(),Z("div",Hv,[ue(De(Qi))]))]))}}),qv="modulepreload",Kv=function(e){return"/"+e},Ml={},Rt=function(t,n,r){let s=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),a=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));s=Promise.allSettled(n.map(l=>{if(l=Kv(l),l in Ml)return;Ml[l]=!0;const c=l.endsWith(".css"),u=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${u}`))return;const h=document.createElement("link");if(h.rel=c?"stylesheet":qv,c||(h.as="script"),h.crossOrigin="",h.href=l,a&&h.setAttribute("nonce",a),document.head.appendChild(h),c)return new Promise((d,f)=>{h.addEventListener("load",d),h.addEventListener("error",()=>f(new Error(`Unable to preload CSS for ${l}`)))})}))}function i(o){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=o,window.dispatchEvent(a),!a.defaultPrevented)throw o}return s.then(o=>{for(const a of o||[])a.status==="rejected"&&i(a.reason);return t().catch(i)})},bh=gg({history:Jp(),routes:[{path:"/",redirect:"/chat"},{path:"/login",name:"login",component:()=>Rt(()=>import("./LoginView-DNcKxnq-.js"),[]),meta:{title:"Login",subtitle:"Authenticate against Supabase",public:!0}},{path:"/chat",name:"chat",component:()=>Rt(()=>import("./ChatView-DV4zdwDI.js"),[]),meta:{title:"Chat",subtitle:"Live orchestrator stream"}},{path:"/squads",name:"squads",component:()=>Rt(()=>import("./SquadsView-DpI4RInq.js"),__vite__mapDeps([0,1])),meta:{title:"Squads",subtitle:"Project crews and worktrees"}},{path:"/activity",name:"activity",component:()=>Rt(()=>import("./AgentActivityView-D-xGvKsm.js"),__vite__mapDeps([2,1])),meta:{title:"Activity",subtitle:"Task execution and event stream"}},{path:"/schedules",name:"schedules",component:()=>Rt(()=>import("./SchedulesView-uxtLtxEL.js"),[]),meta:{title:"Schedules",subtitle:"Cron-driven automation matrix"}},{path:"/skills",name:"skills",component:()=>Rt(()=>import("./SkillsView-CobJkgd1.js"),__vite__mapDeps([3,4])),meta:{title:"Skills",subtitle:"Installed skill manifests and content"}},{path:"/wiki",name:"wiki",component:()=>Rt(()=>import("./WikiView-DeY1mFGq.js"),[]),meta:{title:"Wiki",subtitle:"Workspace knowledge browser"}},{path:"/mcp",name:"mcp",component:()=>Rt(()=>import("./McpView-CbiIag57.js"),__vite__mapDeps([5,4])),meta:{title:"MCP",subtitle:"Server registry and transport health"}},{path:"/feed",name:"feed",component:()=>Rt(()=>import("./FeedView-BBbnBU_A.js"),[]),meta:{title:"Feed",subtitle:"Notifications and durable activity"}},{path:"/inbox",name:"inbox",component:()=>Rt(()=>import("./InboxView-C_6LL8bG.js"),[]),meta:{title:"Inbox",subtitle:"Operator-facing messages"}}]});bh.beforeEach(async e=>{const t=ui();return await t.init(),e.path==="/"?"/chat":t.authEnabled?!t.user&&e.path!=="/login"&&!e.meta.public?{path:"/login",query:{redirect:e.fullPath}}:t.user&&e.path==="/login"?"/chat":!0:e.path==="/login"?"/chat":!0});const Uo=rp(Fv),Wv=op();Uo.use(Wv);Uo.use(bh);Uo.mount("#app");export{Gt as A,B_ as B,Qv as C,tr as D,$l as E,ge as F,gt as G,Zv as H,Xv as I,mh as J,nw as K,Xr as L,py as M,ew as N,Vv as O,tw as P,zv as Q,Ar as R,Gv as S,vs as T,gh as U,st as _,$ as a,De as b,Z as c,dn as d,Jv as e,Qf as f,Je as g,Yv as h,Io as i,J as j,hv as k,cn as l,xn as m,ue as n,Zr as o,Gc as p,Fe as q,Ae as r,ft as s,Oe as t,ui as u,Yf as v,ud as w,ph as x,er as y,zs as z};
@@ -8,7 +8,7 @@
8
8
  <link rel="preconnect" href="https://fonts.googleapis.com" />
9
9
  <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
10
10
  <link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap" rel="stylesheet">
11
- <script type="module" crossorigin src="/assets/index-B3ZOJqJ1.js"></script>
11
+ <script type="module" crossorigin src="/assets/index-D1C7prBJ.js"></script>
12
12
  <link rel="stylesheet" crossorigin href="/assets/index-DMGoXFX1.css">
13
13
  </head>
14
14
  <body>
@@ -1 +0,0 @@
1
- import{d as w,j as s,c as a,a as e,n as h,z as v,t as l,g as x,s as G,_ as C,A as M,T as H,r as k,q as y,b as R,B as S,C as J,F as f,m as b,D as j,E as K,o as Q,G as _,H as O,I as W,J as X,K as Y}from"./index-B3ZOJqJ1.js";import{_ as P}from"./StatusIndicator.vue_vue_type_script_setup_true_lang-DaZufA4t.js";const Z={class:"flex items-center gap-2 rounded px-2 py-1.5 transition-colors hover:bg-white/[0.03]"},ee={class:"flex shrink-0 gap-1"},te={key:0,class:"rounded bg-primary/10 px-1 py-0.5 font-mono text-[9px] leading-none text-primary"},se={key:1,class:"rounded bg-status-success/10 px-1 py-0.5 font-mono text-[9px] leading-none text-status-success"},ne={class:"rounded bg-white/5 px-1 py-0.5 font-mono text-[9px] uppercase leading-none text-muted-foreground"},ae={class:"min-w-0 flex-1"},oe={key:0,class:"block truncate font-mono text-[11px] text-foreground/60"},re={key:1,class:"font-mono text-[11px] text-muted-foreground/40"},ie={key:0,class:"mx-2 mb-1.5 rounded border border-white/[0.06] bg-white/[0.03] px-3 py-2"},le={class:"text-xs leading-relaxed text-foreground/60"},de={key:0,class:"mt-2 font-mono text-[10px] text-muted-foreground/45"},ce=w({__name:"AgentRow",props:{agent:{},universeColor:{}},setup(t){const d=t,o=k(!1),u=y(()=>(d.agent.model_tier??"medium").toUpperCase()),p=y(()=>d.agent.charter||d.agent.role_title||"No charter available.");return(r,i)=>(s(),a("div",{class:"cursor-pointer",onClick:i[0]||(i[0]=g=>o.value=!o.value)},[e("div",Z,[h(P,{status:t.agent.status},null,8,["status"]),e("span",{class:"shrink-0 font-mono text-xs font-medium",style:v({color:t.universeColor})},l(t.agent.character_name),5),e("div",ee,[t.agent.is_lead?(s(),a("span",te,"LEAD")):x("",!0),t.agent.is_qa?(s(),a("span",se,"QA")):x("",!0),e("span",ne,l(u.value),1)]),e("div",ae,[t.agent.current_task?(s(),a("span",oe,"↳ "+l(t.agent.current_task),1)):(s(),a("span",re,"idle"))]),h(C,{name:"chevron-down",class:G(["h-3 w-3 shrink-0 text-muted-foreground/40 transition-transform",o.value?"rotate-180":""])},null,8,["class"])]),h(H,{"enter-active-class":"duration-150 ease-out","enter-from-class":"opacity-0 -translate-y-1","enter-to-class":"opacity-100 translate-y-0","leave-active-class":"duration-100 ease-in","leave-from-class":"opacity-100 translate-y-0","leave-to-class":"opacity-0 -translate-y-1"},{default:M(()=>[o.value?(s(),a("div",ie,[i[1]||(i[1]=e("div",{class:"mb-1 font-mono text-[10px] uppercase tracking-wider text-muted-foreground/60"},"Charter",-1)),e("div",le,l(p.value),1),t.agent.role_title&&t.agent.charter?(s(),a("div",de,"Role · "+l(t.agent.role_title),1)):x("",!0)])):x("",!0)]),_:1})]))}}),ue={class:"max-w-[120px] truncate text-muted-foreground"},me=w({__name:"InstancePill",props:{instance:{}},setup(t){const d=t,o=y(()=>J(d.instance.status));return(u,p)=>(s(),a("div",{class:"flex items-center gap-1.5 rounded border px-2 py-1 font-mono text-[10px]",style:v({borderColor:R(S)(o.value,.3),backgroundColor:R(S)(o.value,.08)})},[e("div",{class:"h-1.5 w-1.5 shrink-0 rounded-full",style:v({backgroundColor:o.value})},null,4),e("span",{style:v({color:o.value})},l(t.instance.issue_ref||t.instance.id),5),p[0]||(p[0]=e("span",{class:"text-muted-foreground/50"},"·",-1)),e("span",ue,l(t.instance.branch_name||"detached"),1)],4))}}),pe={class:"flex flex-col overflow-hidden rounded-lg border border-border bg-card"},xe={class:"px-4 pb-2.5 pt-3"},ge={class:"mb-2 flex items-start justify-between gap-2"},fe={class:"flex min-w-0 items-center gap-2"},he={class:"truncate text-sm font-semibold"},ve={key:0,class:"shrink-0 rounded-full bg-destructive px-1.5 py-0.5 font-mono text-[9px] font-bold text-white"},_e={class:"truncate font-mono text-[10px] text-muted-foreground/50"},be={class:"px-2 py-1.5"},ye={class:"px-4 py-2.5"},ke={class:"mb-2 flex items-center gap-1.5 font-mono text-[10px] uppercase tracking-wider text-muted-foreground/50"},we={class:"flex flex-wrap gap-1.5"},qe={class:"px-4 py-2.5"},$e={class:"mb-2 flex items-center gap-1.5 font-mono text-[10px] uppercase tracking-wider text-muted-foreground/50"},Ce={class:"space-y-1"},Re={class:"flex-1 text-foreground/60"},Se={class:"shrink-0 font-mono text-muted-foreground/40"},je=w({__name:"SquadCard",props:{squad:{}},setup(t){const d=t,o=y(()=>K(d.squad.universe)),u=y(()=>d.squad.instances.filter(p=>p.status==="running").length);return(p,r)=>(s(),a("article",pe,[e("div",{class:"h-px",style:v({backgroundColor:o.value,opacity:.6})},null,4),e("div",xe,[e("div",ge,[e("div",fe,[h(P,{status:t.squad.status},null,8,["status"]),e("h3",he,l(t.squad.name),1),t.squad.unread_count>0?(s(),a("span",ve,l(t.squad.unread_count),1)):x("",!0)]),e("span",{class:"shrink-0 rounded px-1.5 py-0.5 font-mono text-[10px]",style:v({color:o.value,backgroundColor:R(S)(o.value,.15)})},l(t.squad.universe),5)]),e("div",_e,l(t.squad.project_path),1)]),r[4]||(r[4]=e("div",{class:"mx-3 border-t border-border/50"},null,-1)),e("div",be,[(s(!0),a(f,null,b(t.squad.agents,i=>(s(),j(ce,{key:i.character_name,agent:i,"universe-color":o.value},null,8,["agent","universe-color"]))),128))]),t.squad.instances.length?(s(),a(f,{key:0},[r[0]||(r[0]=e("div",{class:"mx-3 border-t border-border/50"},null,-1)),e("div",ye,[e("div",ke,[h(C,{name:"git-branch",class:"h-3 w-3"}),e("span",null,"Instances ("+l(u.value)+"/"+l(t.squad.instances.length)+" running)",1)]),e("div",we,[(s(!0),a(f,null,b(t.squad.instances,i=>(s(),j(me,{key:i.id,instance:i},null,8,["instance"]))),128))])])],64)):x("",!0),t.squad.recent_decisions.length?(s(),a(f,{key:1},[r[3]||(r[3]=e("div",{class:"mx-3 border-t border-border/50"},null,-1)),e("div",qe,[e("div",$e,[h(C,{name:"sparkles",class:"h-3 w-3"}),r[1]||(r[1]=e("span",null,"Decisions",-1))]),e("div",Ce,[(s(!0),a(f,null,b(t.squad.recent_decisions,i=>(s(),a("div",{key:i.id,class:"flex items-baseline gap-2 text-[11px]"},[r[2]||(r[2]=e("span",{class:"shrink-0 font-mono text-muted-foreground/40"},"·",-1)),e("span",Re,l(i.title),1),e("span",Se,l(i.timestamp),1)]))),128))])])],64)):x("",!0)]))}}),Ie={class:"h-full overflow-y-auto p-5"},Ae={key:0,class:"mb-4 rounded-lg border border-destructive/25 bg-destructive/10 px-4 py-3 text-sm text-destructive"},Be={key:1,class:"grid grid-cols-1 gap-4 md:grid-cols-2 xl:grid-cols-3"},ze={key:2,class:"grid grid-cols-1 gap-4 md:grid-cols-2 xl:grid-cols-3"},De={key:3,class:"flex h-full min-h-[320px] items-center justify-center rounded-lg border border-dashed border-border bg-card/30 font-mono text-xs uppercase tracking-[0.22em] text-muted-foreground/55"},Ne=w({__name:"SquadsView",setup(t){const d=k(!1),o=k(""),u=k([]);async function p(){d.value=!0,o.value="";try{const[r,i]=await Promise.all([_("/api/squads"),_("/api/feed?limit=200")]),g=r.ok?(await r.json()).squads:[],q=new Map;if(i.ok){const m=(await i.json()).entries;for(const c of m)!c.read_at&&c.squad_slug&&q.set(c.squad_slug,(q.get(c.squad_slug)??0)+1)}u.value=await Promise.all(g.map(async m=>{var U;const c=m.slug??m.id??m.name.toLowerCase().replace(/\s+/g,"-"),[I,A]=await Promise.all([_(`/api/squads/${encodeURIComponent(c)}/agents`),_(`/api/squads/${encodeURIComponent(c)}/instances`)]),T=I.ok?(await I.json()).agents:[],F=A.ok?(await A.json()).instances:[],B=T.map(n=>({character_name:n.character_name??"Unnamed Agent",role_title:n.role_title,charter:n.charter??n.role_title,model_tier:n.model_tier??(n.is_lead?"high":"medium"),status:O(n.status),is_lead:!!n.is_lead,is_qa:!!n.is_qa,current_task:n.currentTask??n.current_task??null})),$=F.map(n=>({id:String(n.id),issue_ref:n.issue_ref,branch_name:n.branch_name,status:W(n.status),worktree_path:n.worktree_path})),z=await Promise.all($.slice(0,3).map(n=>_(`/api/squads/${encodeURIComponent(c)}/instances/${encodeURIComponent(n.id)}`))),D=[];for(let n=0;n<z.length;n+=1){const E=z[n];if(!E.ok)continue;const L=await E.json();for(const[V,N]of(L.decisions??[]).slice(0,3).entries())D.push({id:`${((U=$[n])==null?void 0:U.id)??n}-${V}`,title:N.decision??"Decision recorded",timestamp:X(N.created_at)})}return{id:m.id??c,slug:c,name:m.name,project_path:m.project_path??"—",universe:m.universe??"Ghostbusters",status:Y(B,m),unread_count:q.get(c)??0,agents:B,instances:$,recent_decisions:D.slice(0,4)}}))}catch(r){o.value=r instanceof Error?r.message:"Failed to load squads.",u.value=[]}finally{d.value=!1}}return Q(p),(r,i)=>(s(),a("div",Ie,[o.value?(s(),a("div",Ae,l(o.value),1)):x("",!0),d.value&&!u.value.length?(s(),a("div",Be,[(s(),a(f,null,b(6,g=>e("div",{key:g,class:"h-64 animate-pulse rounded-lg border border-border bg-card/60"})),64))])):u.value.length?(s(),a("div",ze,[(s(!0),a(f,null,b(u.value,g=>(s(),j(je,{key:g.id,squad:g},null,8,["squad"]))),128))])):(s(),a("div",De," No squads discovered. "))]))}});export{Ne as default};