fix(webui): shorten route descriptions, setup steps, alerts and panel errors

This commit is contained in:
sam committed 2026-10-13 18:10:39 +11:00
1 parent 8a1e07f93e
commit cd983c7877
19 files changed
+78 -79

No files matched your search

+4 -4
View File
@@ -133,7 +133,7 @@ func providerAlerts(providers map[string]config.Provider) []alert.Input {
Org: org.DefaultOrgID, Kind: alert.KindProviderNoKey, Subject: "provider:" + name,
Severity: alert.SeverityAction, Condition: true,
Title: fmt.Sprintf("Provider %q has no usable credential", name),
Body: "Its API key could not be resolved, so models on this provider cannot run. Check its credential in credential bindings.",
Body: "Key unresolved; its models cannot run. Check the binding.",
Link: "/settings/credential-bindings",
})
}
@@ -187,7 +187,7 @@ func unboundAlerts(cfg config.Config) map[org.OrgID][]alert.Input {
out[orgID] = append(out[orgID], alert.Input{
Key: key, Severity: alert.SeverityAction, Condition: true,
Title: fmt.Sprintf("%q is granted but has no credential binding", service),
Body: "Runs that use this service cannot authenticate. Bind a credential to it.",
Body: "Runs cannot authenticate. Bind a credential.",
Link: "/settings/credential-bindings",
})
}
@@ -212,7 +212,7 @@ func (c alertChecks) checkRelease(ctx context.Context) {
active = append(active, alert.Input{
Org: org.DefaultOrgID, Kind: alert.KindReleaseAvailable, Subject: "release",
Severity: alert.SeverityInfo, Condition: true,
Title: "A newer release is available", Body: "Available: " + strings.Join(parts, ", ") + ".",
Title: "Newer release available", Body: "Available: " + strings.Join(parts, ", ") + ".",
Link: "/settings/status",
})
}
@@ -342,7 +342,7 @@ func (w *credentialWatch) observe(ctx context.Context, orgName, service string,
w.reporter.Sync(ctx, rejected, alert.Input{
Key: key, Severity: alert.SeverityAction, Condition: true,
Title: fmt.Sprintf("The credential bound to %q is not working", service),
Body: "Its secret could not be resolved, so runs that use this service cannot authenticate. Check the binding.",
Body: "Secret unresolved; runs cannot authenticate. Check the binding.",
Link: "/settings/credential-bindings",
})
}()
+1 -1
View File
@@ -98,5 +98,5 @@ type unscopedBroker struct{}
func (unscopedBroker) Name() string { return "nats_credential_scope" }
func (unscopedBroker) Check(context.Context) health.Result {
return health.Result{Status: health.StatusDegraded, Detail: "external NATS: agent containers receive the broker token, which reaches every subject; use the embedded broker to scope them to their task"}
return health.Result{Status: health.StatusDegraded, Detail: "external NATS: containers get a broker token that reaches every subject; use the embedded broker"}
}
+2 -2
View File
@@ -68,7 +68,7 @@ func serviceAlert(name string) alert.Input {
Org: org.DefaultOrgID, Kind: alert.KindServiceUnhealthy, Subject: "service:" + name,
Severity: alert.SeverityWarning, Condition: true,
Title: name + " is unhealthy",
Body: fmt.Sprintf("%s has not been healthy for over %d minutes.", name, int(serviceGrace.Minutes())),
Body: fmt.Sprintf("Down for over %d minutes.", int(serviceGrace.Minutes())),
Link: "/settings/status",
}
}
@@ -189,7 +189,7 @@ func policyAlert(p access.Policy) alert.Input {
Org: orgID, Kind: alert.KindPolicyInvalid, Subject: "policy:" + p.ID,
Severity: severity, Condition: true,
Title: fmt.Sprintf("Access policy %s is invalid", p.ID),
Body: fmt.Sprintf("The %s-level policy %s does not compile, so it denies everything at its level until it is fixed.", p.Level, p.ID),
Body: fmt.Sprintf("The %s-level policy %s does not compile and denies everything at that level.", p.Level, p.ID),
Link: "/org/access",
}
}
+23 -23
View File
@@ -25,29 +25,29 @@ type DashboardPage struct {
// dashboard_navigate tool can name.
var dashboardPages = []DashboardPage{
{Path: "/", Label: "Dashboard", Description: "Running work, work needing attention, token spend."},
{Path: "/tasks", Label: "Tasks", Description: "Issues Archie has picked up, and where each one stands."},
{Path: "/workflows", Label: "Workflows", Description: "The routed workflows and their run history."},
{Path: "/settings/skills", Label: "Skills", Description: "The SKILL.md capabilities Archie can activate."},
{Path: "/settings/curators", Label: "Curators", Description: "Scheduled passes that curate Archie's memory and captures."},
{Path: "/events", Label: "Events", Description: "Captured inbound events, how their fields map, and which workflow they start."},
{Path: "/logs", Label: "Logs", Description: "The daemon log stream, filterable by level and component."},
{Path: "/settings/channels", Label: "Channels", Description: "Inbound chat and notification channels, and their state."},
{Path: "/settings/status", Label: "Status", Description: "Update state, configuration sources, and the listen address."},
{Path: "/settings/appearance", Label: "Appearance", Description: "Theme and display preferences."},
{Path: "/settings/task-execution", Label: "Task execution", Description: "Work lifecycle: statuses, operator actions, and budgets."},
{Path: "/settings/models", Label: "Models", Description: "Model roles and the providers backing them."},
{Path: "/settings/repositories", Label: "Repositories", Description: "Repositories Archie watches, and their per-repo gate overrides."},
{Path: "/settings/identities", Label: "Identities", Description: "Persistent actors and lifecycle."},
{Path: "/settings/personas", Label: "Personas", Description: "The system prompts chat runs under, and the default."},
{Path: "/settings/schedules", Label: "Schedules", Description: "Work Archie starts on its own, on a timetable."},
{Path: "/settings/scheduling-policy", Label: "Scheduling policy", Description: "How Archie finds work and labels its state on the forge."},
{Path: "/settings/review", Label: "Review", Description: "How Archie reviews pull requests: precision filtering and operator approval before posting."},
{Path: "/settings/tools", Label: "Tools & MCP", Description: "The tools agents can call, and the MCP servers that add more."},
{Path: "/settings/history", Label: "History", Description: "Every settings change: who made it, when, and what it was before."},
{Path: "/settings/plugins", Label: "Plugins", Description: "Directories Archie loads extensions from at startup."},
{Path: "/settings/secret-engines", Label: "Secret engines", Description: "Available secret engines."},
{Path: "/settings/container-runtime", Label: "Container runtime", Description: "The containers agents run in."},
{Path: "/settings/harness", Label: "Harness", Description: "OAuth credential bindings and the Kit setup terminal."},
{Path: "/tasks", Label: "Tasks", Description: "Picked-up issues and their status."},
{Path: "/workflows", Label: "Workflows", Description: "Workflows and run history."},
{Path: "/settings/skills", Label: "Skills", Description: "Skills Archie can activate."},
{Path: "/settings/curators", Label: "Curators", Description: "Scheduled memory and capture curation."},
{Path: "/events", Label: "Events", Description: "Captured events, field mappings, workflow bindings."},
{Path: "/logs", Label: "Logs", Description: "Daemon log by level and component."},
{Path: "/settings/channels", Label: "Channels", Description: "Chat and notification channels."},
{Path: "/settings/status", Label: "Status", Description: "Update state, config sources, listen address."},
{Path: "/settings/appearance", Label: "Appearance", Description: "Theme, density, motion."},
{Path: "/settings/task-execution", Label: "Task execution", Description: "Statuses, operator actions, budgets."},
{Path: "/settings/models", Label: "Models", Description: "Model aliases and providers."},
{Path: "/settings/repositories", Label: "Repositories", Description: "Watched repositories and gate overrides."},
{Path: "/settings/identities", Label: "Identities", Description: "Actors and their lifecycle."},
{Path: "/settings/personas", Label: "Personas", Description: "Chat system prompts and the default."},
{Path: "/settings/schedules", Label: "Schedules", Description: "Timetabled work."},
{Path: "/settings/scheduling-policy", Label: "Scheduling policy", Description: "Work discovery and forge labels."},
{Path: "/settings/review", Label: "Review", Description: "Pull request review: precision filter and approval."},
{Path: "/settings/tools", Label: "Tools & MCP", Description: "Agent tools and MCP servers."},
{Path: "/settings/history", Label: "History", Description: "Settings changes: who, when, previous value."},
{Path: "/settings/plugins", Label: "Plugins", Description: "Extension directories loaded at startup."},
{Path: "/settings/secret-engines", Label: "Secret engines"},
{Path: "/settings/container-runtime", Label: "Container runtime"},
{Path: "/settings/harness", Label: "Harness", Description: "OAuth credential bindings and setup terminal."},
}
// DashboardPages returns a copy of the dashboard page registry.
+7 -7
View File
@@ -33,19 +33,19 @@ func (s *Server) handleSetup(w http.ResponseWriter, r *http.Request) {
operator := view.Chat.Operator
steps = append(steps, SetupStep{
Title: "Give Archie an identity",
Detail: "The account it commits and comments as.",
Title: "Identity",
Detail: "Account Archie commits as.",
Done: strings.TrimSpace(view.Identity.BotUser) != "",
})
steps = append(steps, SetupStep{
Title: "Connect a repository",
Detail: "Archie polls these for issues assigned to it.",
Title: "Repository",
Detail: "Polled for assigned issues.",
Done: len(view.Repositories) > 0,
})
steps = append(steps, SetupStep{
Title: "Connect a chat channel",
Title: "Chat channel",
Detail: "Chat and approvals.",
Done: view.Chat.ChannelConfigured,
})
@@ -57,8 +57,8 @@ func (s *Server) handleSetup(w http.ResponseWriter, r *http.Request) {
total += n
}
steps = append(steps, SetupStep{
Title: "Run your first task",
Detail: "Assign Archie an issue, or ask it for something in chat.",
Title: "First task",
Detail: "Assign an issue or ask in chat.",
Done: total > 0,
})
}
+1 -1
View File
@@ -205,7 +205,7 @@ func (s *Server) refuseUngated(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "application/json")
w.WriteHeader(http.StatusServiceUnavailable)
_ = json.NewEncoder(w).Encode(health.Report{Status: health.StatusDegraded, Components: []health.Component{{
Name: "access_policies", Status: health.StatusDegraded, Detail: "access policies have not loaded; requests are refused",
Name: "access_policies", Status: health.StatusDegraded, Detail: "policies not loaded; requests refused",
}}})
return
}
+4 -4
View File
@@ -11,8 +11,8 @@ Defaulting to \`null\`.`),null)}function ec(e){return Qs(e)&&!Number.isNaN(e)&&e
`),r=[],i=null,a=null,o=()=>{r.length&&(t.push({kind:`p`,inline:Nd(r.join(` `))}),r=[])},s=()=>{i&&=(t.push({kind:i.tag,items:i.items.map(e=>Nd(e))}),null)};for(let e=0;e<n.length;e++){let c=n[e];if(c.startsWith("```")){o(),s(),a?(t.push({kind:`pre`,code:a.join(`
`)}),a=null):a=[];continue}if(a){a.push(c);continue}let l=Fd(c),u=e+1<n.length?Fd(n[e+1]):null;if(l&&u&&Id(u)&&l.length===u.length){o(),s();let r=[];for(e+=2;e<n.length;e++){let t=Fd(n[e]);if(!t||t.length!==l.length){e--;break}r.push(t)}t.push({kind:`table`,head:l.map(e=>Nd(e)),rows:r.map(e=>e.map(e=>Nd(e)))});continue}if(!c.trim()){o(),s();continue}let d=c.match(/^(#{1,3})\s+(.+)$/);if(d){o(),s(),t.push({kind:`h${d[1].length}`,inline:Nd(d[2])});continue}let f=c.match(/^\s*[-*]\s+(.+)$/),p=c.match(/^\s*\d+[.)]\s+(.+)$/);if(f||p){o();let e=p?`ol`:`ul`;(!i||i.tag!==e)&&(s(),i={tag:e,items:[]}),i.items.push((f||p)[1])}else c.startsWith(`>`)?(o(),s(),t.push({kind:`blockquote`,inline:Nd(c.replace(/^>\s?/,``))})):r.push(c)}return o(),s(),a&&t.push({kind:`pre`,code:a.join(`
`)}),t}function Fd(e){let t=String(e||``).trim();if(!t.includes(`|`))return null;let n=t.replace(/^\|/,``).replace(/\|$/,``).split(`|`).map(e=>e.trim());return n.length>1&&n.every(e=>e!==``)?n:null}function Id(e){return e.every(e=>/^:?-{3,}:?$/.test(e))}var Ld={class:`[overflow-wrap:anywhere]`},Rd={key:0,class:`my-2 overflow-auto rounded-md border border-border bg-background/60 p-3`},zd={class:`font-mono text-[0.85em]`},Bd={key:1,class:`my-3 w-full border-collapse text-[0.92em]`},Vd={key:2,class:`my-2 border-l-[3px] border-primary pl-3 text-fg-muted`},Hd={key:3,class:`mt-1 mb-2 text-xl leading-tight font-semibold tracking-[-0.02em]`},Ud={key:4,class:`mt-1 mb-2 text-lg leading-tight font-semibold tracking-[-0.02em]`},Wd={key:5,class:`mt-1 mb-2 text-base leading-tight font-semibold tracking-[-0.02em]`},Gd={key:6,class:`my-2.5 flex list-disc flex-col gap-1 pl-5`},Kd={key:7,class:`my-2.5 flex list-decimal flex-col gap-1 pl-5`},qd={key:8,class:`mb-2.5 last:mb-0`},Jd=k({__name:`ChatMarkdown`,props:{text:{}},setup(e){let t=e,n=I(()=>Pd(t.text));return(e,t)=>(R(),G(`div`,Ld,[(R(!0),G(H,null,K(n.value,(e,t)=>(R(),G(H,{key:t},[e.kind===`pre`?(R(),G(`pre`,Rd,[W(`code`,zd,V(e.code),1)])):e.kind===`table`?(R(),G(`table`,Bd,[W(`thead`,null,[W(`tr`,null,[(R(!0),G(H,null,K(e.head,(e,t)=>(R(),G(`th`,{key:t,class:`border border-border bg-muted px-2 py-1.5 text-left font-semibold`},[M(jd,{inline:e},null,8,[`inline`])]))),128))])]),W(`tbody`,null,[(R(!0),G(H,null,K(e.rows,(e,t)=>(R(),G(`tr`,{key:t},[(R(!0),G(H,null,K(e,(e,t)=>(R(),G(`td`,{key:t,class:`border border-border px-2 py-1.5 text-left`},[M(jd,{inline:e},null,8,[`inline`])]))),128))]))),128))])])):e.kind===`blockquote`?(R(),G(`blockquote`,Vd,[M(jd,{inline:e.inline},null,8,[`inline`])])):e.kind===`h1`?(R(),G(`h1`,Hd,[M(jd,{inline:e.inline},null,8,[`inline`])])):e.kind===`h2`?(R(),G(`h2`,Ud,[M(jd,{inline:e.inline},null,8,[`inline`])])):e.kind===`h3`?(R(),G(`h3`,Wd,[M(jd,{inline:e.inline},null,8,[`inline`])])):e.kind===`ul`?(R(),G(`ul`,Gd,[(R(!0),G(H,null,K(e.items,(e,t)=>(R(),G(`li`,{key:t},[M(jd,{inline:e},null,8,[`inline`])]))),128))])):e.kind===`ol`?(R(),G(`ol`,Kd,[(R(!0),G(H,null,K(e.items,(e,t)=>(R(),G(`li`,{key:t},[M(jd,{inline:e},null,8,[`inline`])]))),128))])):e.kind===`p`?(R(),G(`p`,qd,[M(jd,{inline:e.inline},null,8,[`inline`])])):L(``,!0)],64))),128))]))}}),Yd={class:`truncate`},Xd=k({__name:`ChatNavChip`,props:{path:{},label:{}},setup(e){return(t,n)=>{let r=je(`RouterLink`);return R(),q(r,{to:e.path,title:`Go to ${e.label||e.path}`,class:`inline-flex max-w-full items-center gap-1.5 rounded-md border border-primary/45 bg-primary-soft px-2.5 py-1 text-xs font-semibold text-link transition-colors hover:border-primary hover:bg-primary/15 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary`},{default:j(()=>[M(z(Gt),{"aria-hidden":`true`,class:`size-3.5 shrink-0`}),W(`span`,Yd,V(e.label||e.path),1)]),_:1},8,[`to`,`title`])}}}),Zd={key:1,class:`flex items-baseline gap-1.5 [overflow-wrap:anywhere]`},Qd={class:`font-semibold text-foreground`},$d={key:0,class:`font-mono text-[0.95em] text-fg-subtle`},ef=k({__name:`ChatToolCall`,props:{tool:{},streaming:{type:Boolean}},setup(e){let t=e,n=I(()=>t.tool.name||t.tool.Name||t.tool.tool||`tool`),r=I(()=>t.tool.parameters||t.tool.Parameters||``),i=I(()=>!!(t.tool.err||t.tool.Err||t.tool.failed)),a=I(()=>t.tool.summary||t.tool.Summary||t.tool.text||t.tool.err||t.tool.Err||(t.streaming?i.value?`failed`:`running…`:`done`));return(t,o)=>e.tool.path?(R(),q(Xd,{key:0,path:e.tool.path,label:e.tool.label},null,8,[`path`,`label`])):(R(),G(`div`,Zd,[M(z(Jn),{"aria-hidden":`true`,class:`size-3.5 shrink-0 self-center text-fg-subtle`}),W(`span`,Qd,V(n.value),1),r.value?(R(),G(`code`,$d,V(r.value),1)):L(``,!0),W(`span`,{class:N(z(Z)(`text-fg-muted`,i.value&&`text-danger`))},V(a.value),3)]))}}),tf={key:0,class:`mb-2 grid gap-0.5 text-xs`},nf={key:1,class:`mb-2 flex flex-wrap gap-1.5`},rf={key:3,class:`whitespace-pre-wrap`},af=k({__name:`ChatBubble`,props:{text:{},tools:{default:()=>[]},media:{default:()=>[]},assistant:{type:Boolean,default:!1},streaming:{type:Boolean,default:!1}},setup(e){return(t,n)=>(R(),G(`div`,{class:N([`flex`,e.assistant?`justify-start`:`justify-end`])},[W(`div`,{class:N(z(Z)(`max-w-[min(78ch,86%)] rounded-[0.85rem] px-4 py-3 leading-normal [overflow-wrap:anywhere]`,e.assistant?`bg-muted`:`bg-primary/15`))},[e.assistant&&e.tools.length?(R(),G(`div`,tf,[(R(!0),G(H,null,K(e.tools,(t,n)=>(R(),q(ef,{key:n,tool:t,streaming:e.streaming},null,8,[`tool`,`streaming`]))),128))])):L(``,!0),e.media.length?(R(),G(`div`,nf,[(R(!0),G(H,null,K(e.media,(e,t)=>(R(),q(wd,{key:t,attachment:e},null,8,[`attachment`]))),128))])):L(``,!0),e.assistant?(R(),q(Jd,{key:2,text:e.text},null,8,[`text`])):(R(),G(`div`,rf,V(e.text),1)),P(t.$slots,`default`)],2)],2))}}),of={class:`text-sm`},sf={class:`font-medium`},cf={key:0,class:`mt-1 text-fg-muted`},lf={key:1,class:`mt-2 flex flex-wrap gap-2`},uf=k({__name:`ChatChooLine truncated
`).map(e=>e.trim()).find(Boolean)||``,r=n.length>Z_?`${n.slice(0,Z_).trimEnd()}…`:n;return{text:r,full:t,truncated:r!==t}}function $_(e){return String(e||`event`).replaceAll(`_`,` `).replace(/\b\w/g,e=>e.toUpperCase())}function ev(e){let t=Number(e);if(!Number.isFinite(t)||t<0)return``;if(t<1e3)return`under 1 s`;let n=t/1e3;if(n<60)return`${n.toFixed(+(n<10))} s`;let r=Math.round(n),i=Math.floor(r/60),a=r%60;if(i<60)return a===0?`${i} min`:`${i} min ${a} s`;let o=Math.floor(i/60),s=i-o*60;return s===0?`${o} h`:`${o} h ${s} min`}function tv(e){let t=Number(e);return!Number.isFinite(t)||t<=0?``:t.toLocaleString(`en-US`)}function nv(e){return typeof e==`string`?e:``}function rv(e={}){let t=e.data||{},n=e.stage||`unknown stage`,r=e.workflow?`${e.workflow} workflow`:``;if(e.kind===`stage_start`)return{title:`Started stage: ${n}`,detail:r};if(e.kind===`stage_finish`){let e=ev(t.duration_ms),i=[r,e&&`ran for ${e}`].filter(Boolean).join(` · `);return{title:t.interrupted?`Stage interrupted: ${n}`:t.skipped?`Skipped stage: ${n}`:t.error?`Stage failed: ${n}`:`Finished stage: ${n}`,detail:[i,nv(t.error),nv(t.when)].filter(Boolean).join(` · `)}}if(e.kind===`task_retried`){let n=Number(t.retry_count);return{title:Number.isFinite(n)&&n>0?`Retry ${n}`:`Retry requested`,detail:[nv(t.previous_stage)&&`after ${nv(t.previous_stage)}`,nv(t.previous_reason)].filter(Boolean).join(`: `)||e.detail||``}}if(e.kind===`agent_finish`){let r=tv(t.iterations),i=tv(t.tokens),a=Number(t.cached_tokens)||0,o=tv((Number(t.prompt_tokens)||0)-a),s=tv(t.completion_tokens),c=tv(t.cached_tokens),l=[r&&`${r} iterations`,i&&`${i} tokens`,o&&`${o} fresh prompt`,s&&`${s} completion`,c&&`${c} cached`,nv(t.model)].filter(Boolean);return{title:`Agent ${nv(t.status)||`finished`}: ${n}`,detail:l.join(` · `)||e.detail||``}}if(e.kind===`remediation_round`){let e=Number(t.of),n=nv(t.author);return{title:`Remediation ${nv(t.round)}${e>0?` of ${e}`:``}`,detail:[n&&`answers ${n}'s review`,t.review_id?`#${nv(t.review_id)}`:``].filter(Boolean).join(` `)}}if(e.kind===`review_approved`){let e=nv(t.pr_number);return{title:`Pull request approved`,detail:[nv(t.author),e&&`#${e}`].filter(Boolean).join(` · `)}}if(e.kind===`step_retried`)return{title:`Attempt ${nv(t.attempt)} of ${nv(t.of)} failed: ${e.stage||`step`}`,detail:nv(t.error),tone:`warn`};if(e.kind===`config_captured`)return{title:`Configuration captured`,detail:`The effective task-runtime configuration for this run.`};if(e.kind===`binding_started`){let e=nv(t.source),n=nv(t.capture_id),r=[{label:`binding ${nv(t.binding_name)||nv(t.binding_id)}`,to:`/events?tab=bindings`},...n?[{label:`captured event`,to:`/events?tab=inspector&capture=${encodeURIComponent(n)}`}]:[]];return t.unsigned===!0?{title:`Started by an unsigned event`,detail:e?`source ${e}`:``,tone:`warn`,links:r}:{title:`Started by an event`,detail:e?`source ${e}`:``,links:r}}if(e.kind===`changes_captured`){let e=t.totals??{},n=Number(e.files);return{title:`Change capture recorded`,detail:[Number.isFinite(n)&&n>0?`${n} file${n===1?``:`s`} changed`:``,t.captured_after?`captured after ${nv(t.captured_after)}`:``].filter(Boolean).join(` · `)}}return{title:$_(e.kind||e.type),detail:e.detail||``}}var iv=[`title`],av=k({__name:`ActivityRow`,props:{event:{}},emits:[`open`],setup(e,{emit:t}){let n=e,r=t,i=e_(),a=I(()=>i.taskIDFor(n.event)),o=I(()=>Q_(n.event));function s(){a.value>0&&r(`open`,a.value)}let c=I(()=>n.event.at?Ng(n.event.at):`—`);return(e,t)=>(R(),q(z(Y_),{class:N(a.value>0?`cursor-pointer`:``),role:a.value>0?`link`:void 0,tabindex:a.value>0?0:void 0,title:a.value>0?`Open task details`:void 0,onClick:s,onKeydown:[yt(Ct(s,[`prevent`]),[`enter`]),yt(Ct(s,[`prevent`]),[`space`])]},{default:j(()=>[M(z(Q),{class:`font-medium`},{default:j(()=>[A(V(z(rv)({...n.event,at:void 0,detail:void 0}).title),1)]),_:1}),M(z(Q),{class:`font-mono`},{default:j(()=>[A(V(a.value>0?`#${a.value}`:`—`),1)]),_:1}),M(z(Q),{class:`w-[55%] max-w-0`},{default:j(()=>[W(`span`,{class:`block truncate`,title:o.value.truncated?o.value.full:void 0},V(o.value.text),9,iv)]),_:1}),M(z(Q),null,{default:j(()=>[A(V(c.value),1)]),_:1})]),_:1},8,[`class`,`role`,`tabindex`,`title`,`onKeydown`]))}}),ov=[{value:`all`,label:`All`},{value:`tasks`,label:`Tasks`},{value:`system`,label:`System`}];function sv(e){return(Number(e?.task_id)||0)>0}function cv(e,t){return t===`tasks`?sv(e):t!==`system`||!sv(e)}function lv(e,t){return e.filter(e=>cv(e,t))}function uv(e,t){return e>0?``:t===`all`?`Waiting for activity`:t===`tasks`?`No task events yet`:`No system events yet`}function dv(e,t){return`${e}:${t??0}`}function fv(e){let t=[];for(let n of e){let e=n.kind||n.type||`event`,r=Number(n.task_id)||0,i=dv(Q_(n).text,r),a=t[t.length-1];a&&a.key===i?(a.count+=1,a.events.push(n)):t.push({key:i,label:e,taskID:r,count:1,representative:n,events:[n]})}return t}var pv={role:`region`,"aria-label":`Live activity`,"aria-live":`polite`},mv={class:`max-h-[28rem] overflow-y-auto`},hv=[`aria-expanded`,`aria-Line truncated
`)){let e=n.indexOf(`:`);if(e<=0)continue;let r=n.slice(0,e).trim();r&&(t[r]=n.slice(e+1).trim())}return t}function Cy(e,t){if(!e.event_type)return{label:`Unidentified`,identified:!1};let n=t.find(t=>t.id===e.event_type);return{label:n?n.name:`Deleted type`,identified:!0}}function wy(e,t){if(!e)return`No event type`;let n=t.find(t=>t.id===e);return n?`${n.source} / ${n.name}`:`Deleted type`}function Ty(e){let t=[...(e.headers||[]).map(e=>`${e.name} = ${e.value}`),...(e.payload||[]).map(e=>e.op===`present`?`${e.path} present`:`${e.path} = ${e.value??``}`)];return t.length?t.join(` · `):`any event`}function Ey(e){return{headers:(e.headers||[]).filter(e=>e.name.trim()!==``).map(e=>({name:e.name.trim(),value:e.value})),payload:(e.payload||[]).filter(e=>e.path.trim()!==``).map(e=>e.op===`present`?{path:e.path.trim(),op:e.op}:{path:e.path.trim(),op:e.op,value:e.value??``})}}var Dy=J([]),Oy=J([]),ky=J(!0),Ay=J(null),jy=J(null),My=J(!1),Ny=J(null);async function Py(){try{let e=await X.eventTypes(xy().workspace);ky.value=e.enabled!==!1,Dy.value=e.event_types||[],Oy.value=e.proposals||[],Ay.value=null}catch(e){Ay.value=e.message||String(e)}}function Fy(e){return{headers:(e.headers||[]).map(e=>({...e})),payload:(e.payload||[]).map(e=>({...e}))}}function Iy(e){Ny.value=null,jy.value=e}function Ly(e){let t=Gy.value.find(t=>String(t.id)===e.sample_id);Iy({mode:`proposal`,id:null,source:e.source,name:``,rule:Fy(e.rule),headersText:``,body:t?.body||``,exampleHeaders:e.headers||{}})}function Ry(e=``){Iy({mode:`paste`,id:null,source:e,name:``,rule:{headers:[],payload:[]},headersText:``,body:``,exampleHeaders:{}})}function zy(e){Iy({mode:`edit`,id:e.id,source:e.source,name:e.name,rule:Fy(e.rule),headersText:``,body:``,exampleHeaders:{}})}function By(){jy.value=null}async function Vy(){let e=jy.value;if(e){My.value=!0;try{if(e.mode===`edit`&&e.id)await X.eventTypeUpdate(e.id,{name:e.name,rule:Ey(e.rule)});else{let t=e.mode===`paste`?Sy(e.headersText):e.exampleHeaders;await X.eventTypeCreate({source:e.source,name:e.name,rule:e.mode===`paste`?void 0:Ey(e.rule),example:{headers:t,body:e.body}})}jy.value=null,await Py()}catch(e){Ny.value=e.message||String(e)}finally{My.value=!1}}}var Hy=J(null);async function Uy(){let e=Hy.value;if(Hy.value=null,e)try{await X.eventTypeDelete(e.id),await Py()}catch(e){Ay.value=e.message||String(e)}}var Wy=100,Gy=J([]),Ky=J(!0),qy=J(null),Jy=J(!0),Yy=J(null);async function Xy(){try{let e=await X.captures(Wy);Ky.value=e.enabled!==!1,Gy.value=e.captures||[],qy.value=null}catch(e){qy.value=e.message||String(e)}finally{Jy.value=!1}}function Zy(e){let t=Gy.value.find(t=>t.id===e);return t&&(Yy.value=t),!!t}function Qy(){Gy.value.length&&(Yy.value=Gy.value[0])}function $y(){he(`captures`,()=>{Xy(),Py()})}var eb=k({__name:`Tabs`,props:{defaultValue:{},orientation:{},dir:{},activationMode:{},modelValue:{},unmountOnHide:{type:Boolean},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},emits:[`update:modelValue`],setup(e,{emit:n}){let r=e,i=n,a=Ot(r,`class`),o=t(a,i);return(e,t)=>(R(),q(z(tl),U({"data-slot":`tabs`,"data-orientation":z(o).orientation||`horizontal`},z(o),{class:z(Z)(`gap-2 group/tabs flex data-horizontal:flex-col`,r.class)}),{default:j(t=>[P(e.$slots,`default`,rt(ke(t)))]),_:3},16,[`data-orientation`,`class`]))}}),tb=k({__name:`TabsContent`,props:{value:{},forceMount:{type:Boolean},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){let t=e,n=Ot(t,`class`);return(e,r)=>(R(),q(z(il),U({"data-slot":`tabs-content`,class:z(Z)(`text-sm flex-1 outline-none`,t.class)},z(n)),{default:j(()=>[P(e.$slots,`default`)]),_:3},16,[`class`]))}}),nb=k({__name:`TabsList`,props:{loop:{type:Boolean},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]},variant:{default:`default`}},setup(e){let t=e,n=Ot(t,`class`,`variant`);return(r,i)=>(R(),q(z(al),U({"data-slot":`tabs-list`,"data-variant":e.variant},z(n),{class:z(Z)(z(ib)({variant:e.variant}),t.class)}),{default:j(()=>[P(r.$slots,`default`)]),_:3},16,[`data-variant`,`class`]))}}),rb=k({__name:`TabsTrigger`,props:{value:{},disabled:{type:Boolean},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){let t=e,n=Ot(t,`class`),r=ce(n);return(e,n)=>(R(),q(z(ol),U({"data-slot":`tabs-trigger`,class:z(Z)(`gap-1.5 rounded-md border border-transparent px-1.5 py-0.5 text-sm font-medium group-data-[variant=default]/tabs-list:data-active:shadow-sm group-data-[variant=line]/tabs-list:data-active:shadow-none [&_svg:not([class*=size-])]:size-4 has-data-[icon=inline-end]:pr-1 has-data-[icon=inline-start]:pl-1 relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center whitespace-nowrap text-foreground/60 transition-all group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointerLine truncated
`).map(e=>e.trim()).find(Boolean)||``,r=n.length>Z_?`${n.slice(0,Z_).trimEnd()}…`:n;return{text:r,full:t,truncated:r!==t}}function $_(e){return String(e||`event`).replaceAll(`_`,` `).replace(/\b\w/g,e=>e.toUpperCase())}function ev(e){let t=Number(e);if(!Number.isFinite(t)||t<0)return``;if(t<1e3)return`under 1 s`;let n=t/1e3;if(n<60)return`${n.toFixed(+(n<10))} s`;let r=Math.round(n),i=Math.floor(r/60),a=r%60;if(i<60)return a===0?`${i} min`:`${i} min ${a} s`;let o=Math.floor(i/60),s=i-o*60;return s===0?`${o} h`:`${o} h ${s} min`}function tv(e){let t=Number(e);return!Number.isFinite(t)||t<=0?``:t.toLocaleString(`en-US`)}function nv(e){return typeof e==`string`?e:``}function rv(e={}){let t=e.data||{},n=e.stage||`unknown stage`,r=e.workflow?`${e.workflow} workflow`:``;if(e.kind===`stage_start`)return{title:`Started stage: ${n}`,detail:r};if(e.kind===`stage_finish`){let e=ev(t.duration_ms),i=[r,e&&`ran for ${e}`].filter(Boolean).join(` · `);return{title:t.interrupted?`Stage interrupted: ${n}`:t.skipped?`Skipped stage: ${n}`:t.error?`Stage failed: ${n}`:`Finished stage: ${n}`,detail:[i,nv(t.error),nv(t.when)].filter(Boolean).join(` · `)}}if(e.kind===`task_retried`){let n=Number(t.retry_count);return{title:Number.isFinite(n)&&n>0?`Retry ${n}`:`Retry requested`,detail:[nv(t.previous_stage)&&`after ${nv(t.previous_stage)}`,nv(t.previous_reason)].filter(Boolean).join(`: `)||e.detail||``}}if(e.kind===`agent_finish`){let r=tv(t.iterations),i=tv(t.tokens),a=Number(t.cached_tokens)||0,o=tv((Number(t.prompt_tokens)||0)-a),s=tv(t.completion_tokens),c=tv(t.cached_tokens),l=[r&&`${r} iterations`,i&&`${i} tokens`,o&&`${o} fresh prompt`,s&&`${s} completion`,c&&`${c} cached`,nv(t.model)].filter(Boolean);return{title:`Agent ${nv(t.status)||`finished`}: ${n}`,detail:l.join(` · `)||e.detail||``}}if(e.kind===`remediation_round`){let e=Number(t.of),n=nv(t.author);return{title:`Remediation ${nv(t.round)}${e>0?` of ${e}`:``}`,detail:[n&&`answers ${n}'s review`,t.review_id?`#${nv(t.review_id)}`:``].filter(Boolean).join(` `)}}if(e.kind===`review_approved`){let e=nv(t.pr_number);return{title:`Pull request approved`,detail:[nv(t.author),e&&`#${e}`].filter(Boolean).join(` · `)}}if(e.kind===`step_retried`)return{title:`Attempt ${nv(t.attempt)} of ${nv(t.of)} failed: ${e.stage||`step`}`,detail:nv(t.error),tone:`warn`};if(e.kind===`config_captured`)return{title:`Configuration captured`,detail:`The effective task-runtime configuration for this run.`};if(e.kind===`binding_started`){let e=nv(t.source),n=nv(t.capture_id),r=[{label:`binding ${nv(t.binding_name)||nv(t.binding_id)}`,to:`/events?tab=bindings`},...n?[{label:`captured event`,to:`/events?tab=inspector&capture=${encodeURIComponent(n)}`}]:[]];return t.unsigned===!0?{title:`Started by an unsigned event`,detail:e?`source ${e}`:``,tone:`warn`,links:r}:{title:`Started by an event`,detail:e?`source ${e}`:``,links:r}}if(e.kind===`changes_captured`){let e=t.totals??{},n=Number(e.files);return{title:`Change capture recorded`,detail:[Number.isFinite(n)&&n>0?`${n} file${n===1?``:`s`} changed`:``,t.captured_after?`captured after ${nv(t.captured_after)}`:``].filter(Boolean).join(` · `)}}return{title:$_(e.kind||e.type),detail:e.detail||``}}var iv=[`title`],av=k({__name:`ActivityRow`,props:{event:{}},emits:[`open`],setup(e,{emit:t}){let n=e,r=t,i=e_(),a=I(()=>i.taskIDFor(n.event)),o=I(()=>Q_(n.event));function s(){a.value>0&&r(`open`,a.value)}let c=I(()=>n.event.at?Ng(n.event.at):`—`);return(e,t)=>(R(),q(z(Y_),{class:N(a.value>0?`cursor-pointer`:``),role:a.value>0?`link`:void 0,tabindex:a.value>0?0:void 0,title:a.value>0?`Open task details`:void 0,onClick:s,onKeydown:[yt(Ct(s,[`prevent`]),[`enter`]),yt(Ct(s,[`prevent`]),[`space`])]},{default:j(()=>[M(z(Q),{class:`font-medium`},{default:j(()=>[A(V(z(rv)({...n.event,at:void 0,detail:void 0}).title),1)]),_:1}),M(z(Q),{class:`font-mono`},{default:j(()=>[A(V(a.value>0?`#${a.value}`:`—`),1)]),_:1}),M(z(Q),{class:`w-[55%] max-w-0`},{default:j(()=>[W(`span`,{class:`block truncate`,title:o.value.truncated?o.value.full:void 0},V(o.value.text),9,iv)]),_:1}),M(z(Q),null,{default:j(()=>[A(V(c.value),1)]),_:1})]),_:1},8,[`class`,`role`,`tabindex`,`title`,`onKeydown`]))}}),ov=[{value:`all`,label:`All`},{value:`tasks`,label:`Tasks`},{value:`system`,label:`System`}];function sv(e){return(Number(e?.task_id)||0)>0}function cv(e,t){return t===`tasks`?sv(e):t!==`system`||!sv(e)}function lv(e,t){return e.filter(e=>cv(e,t))}function uv(e,t){return e>0?``:t===`all`?`Waiting for activity`:t===`tasks`?`No task events yet`:`No system events yet`}function dv(e,t){return`${e}:${t??0}`}function fv(e){let t=[];for(let n of e){let e=n.kind||n.type||`event`,r=Number(n.task_id)||0,i=dv(Q_(n).text,r),a=t[t.length-1];a&&a.key===i?(a.count+=1,a.events.push(n)):t.push({key:i,label:e,taskID:r,count:1,representative:n,events:[n]})}return t}var pv={role:`region`,"aria-label":`Live activity`,"aria-live":`polite`},mv={class:`max-h-[28rem] overflow-y-auto`},hv=[`aria-expanded`,`aria-Line truncated
`)){let e=n.indexOf(`:`);if(e<=0)continue;let r=n.slice(0,e).trim();r&&(t[r]=n.slice(e+1).trim())}return t}function Cy(e,t){if(!e.event_type)return{label:`Unidentified`,identified:!1};let n=t.find(t=>t.id===e.event_type);return{label:n?n.name:`Deleted type`,identified:!0}}function wy(e,t){if(!e)return`No event type`;let n=t.find(t=>t.id===e);return n?`${n.source} / ${n.name}`:`Deleted type`}function Ty(e){let t=[...(e.headers||[]).map(e=>`${e.name} = ${e.value}`),...(e.payload||[]).map(e=>e.op===`present`?`${e.path} present`:`${e.path} = ${e.value??``}`)];return t.length?t.join(` · `):`any event`}function Ey(e){return{headers:(e.headers||[]).filter(e=>e.name.trim()!==``).map(e=>({name:e.name.trim(),value:e.value})),payload:(e.payload||[]).filter(e=>e.path.trim()!==``).map(e=>e.op===`present`?{path:e.path.trim(),op:e.op}:{path:e.path.trim(),op:e.op,value:e.value??``})}}var Dy=J([]),Oy=J([]),ky=J(!0),Ay=J(null),jy=J(null),My=J(!1),Ny=J(null);async function Py(){try{let e=await X.eventTypes(xy().workspace);ky.value=e.enabled!==!1,Dy.value=e.event_types||[],Oy.value=e.proposals||[],Ay.value=null}catch(e){Ay.value=e.message||String(e)}}function Fy(e){return{headers:(e.headers||[]).map(e=>({...e})),payload:(e.payload||[]).map(e=>({...e}))}}function Iy(e){Ny.value=null,jy.value=e}function Ly(e){let t=Gy.value.find(t=>String(t.id)===e.sample_id);Iy({mode:`proposal`,id:null,source:e.source,name:``,rule:Fy(e.rule),headersText:``,body:t?.body||``,exampleHeaders:e.headers||{}})}function Ry(e=``){Iy({mode:`paste`,id:null,source:e,name:``,rule:{headers:[],payload:[]},headersText:``,body:``,exampleHeaders:{}})}function zy(e){Iy({mode:`edit`,id:e.id,source:e.source,name:e.name,rule:Fy(e.rule),headersText:``,body:``,exampleHeaders:{}})}function By(){jy.value=null}async function Vy(){let e=jy.value;if(e){My.value=!0;try{if(e.mode===`edit`&&e.id)await X.eventTypeUpdate(e.id,{name:e.name,rule:Ey(e.rule)});else{let t=e.mode===`paste`?Sy(e.headersText):e.exampleHeaders;await X.eventTypeCreate({source:e.source,name:e.name,rule:e.mode===`paste`?void 0:Ey(e.rule),example:{headers:t,body:e.body}})}jy.value=null,await Py()}catch(e){Ny.value=e.message||String(e)}finally{My.value=!1}}}var Hy=J(null);async function Uy(){let e=Hy.value;if(Hy.value=null,e)try{await X.eventTypeDelete(e.id),await Py()}catch(e){Ay.value=e.message||String(e)}}var Wy=100,Gy=J([]),Ky=J(!0),qy=J(null),Jy=J(!0),Yy=J(null);async function Xy(){try{let e=await X.captures(Wy);Ky.value=e.enabled!==!1,Gy.value=e.captures||[],qy.value=null}catch(e){qy.value=e.message||String(e)}finally{Jy.value=!1}}function Zy(e){let t=Gy.value.find(t=>t.id===e);return t&&(Yy.value=t),!!t}function Qy(){Gy.value.length&&(Yy.value=Gy.value[0])}function $y(){he(`captures`,()=>{Xy(),Py()})}var eb=k({__name:`Tabs`,props:{defaultValue:{},orientation:{},dir:{},activationMode:{},modelValue:{},unmountOnHide:{type:Boolean},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},emits:[`update:modelValue`],setup(e,{emit:n}){let r=e,i=n,a=Ot(r,`class`),o=t(a,i);return(e,t)=>(R(),q(z(tl),U({"data-slot":`tabs`,"data-orientation":z(o).orientation||`horizontal`},z(o),{class:z(Z)(`gap-2 group/tabs flex data-horizontal:flex-col`,r.class)}),{default:j(t=>[P(e.$slots,`default`,rt(ke(t)))]),_:3},16,[`data-orientation`,`class`]))}}),tb=k({__name:`TabsContent`,props:{value:{},forceMount:{type:Boolean},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){let t=e,n=Ot(t,`class`);return(e,r)=>(R(),q(z(il),U({"data-slot":`tabs-content`,class:z(Z)(`text-sm flex-1 outline-none`,t.class)},z(n)),{default:j(()=>[P(e.$slots,`default`)]),_:3},16,[`class`]))}}),nb=k({__name:`TabsList`,props:{loop:{type:Boolean},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]},variant:{default:`default`}},setup(e){let t=e,n=Ot(t,`class`,`variant`);return(r,i)=>(R(),q(z(al),U({"data-slot":`tabs-list`,"data-variant":e.variant},z(n),{class:z(Z)(z(ib)({variant:e.variant}),t.class)}),{default:j(()=>[P(r.$slots,`default`)]),_:3},16,[`data-variant`,`class`]))}}),rb=k({__name:`TabsTrigger`,props:{value:{},disabled:{type:Boolean},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){let t=e,n=Ot(t,`class`),r=ce(n);return(e,n)=>(R(),q(z(ol),U({"data-slot":`tabs-trigger`,class:z(Z)(`gap-1.5 rounded-md border border-transparent px-1.5 py-0.5 text-sm font-medium group-data-[variant=default]/tabs-list:data-active:shadow-sm group-data-[variant=line]/tabs-list:data-active:shadow-none [&_svg:not([class*=size-])]:size-4 has-data-[icon=inline-end]:pr-1 has-data-[icon=inline-start]:pl-1 relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center whitespace-nowrap text-foreground/60 transition-all group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointerLine truncated
`)}};ML.defaultYaml={explicit:!1,version:`1.2`},ML.defaultTags={"!!":`tag:yaml.org,2002:`};function NL(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){let t=`Anchor must not contain whitespace or control characters: ${JSON.stringify(e)}`;throw Error(t)}return!0}function PL(e){let t=new Set;return TL(e,{Value(e,n){n.anchor&&t.add(n.anchor)}}),t}function FL(e,t){for(let n=1;;++n){let r=`${e}${n}`;if(!t.has(r))return r}}function IL(e,t){let n=[],r=new Map,i=null;return{onAnchor:r=>{n.push(r),i??=PL(e);let a=FL(t,i);return i.add(a),a},setAnchors:()=>{for(let e of n){let t=r.get(e);if(typeof t==`object`&&t.anchor&&(_L(t.node)||yL(t.node)))t.node.anchor=t.anchor;else{let t=Error(`Failed to resolve repeated object (this should not happen)`);throw t.source=e,t}}},sourceObjects:r}}function LL(e,t,n,r){if(r&&typeof r==`object`){if(Array.isArray(r))for(let t=0,n=r.length;t<n;++t){let n=r[t],i=LL(e,r,String(t),n);i===void 0?delete r[t]:i!==n&&(r[t]=i)}else if(r instanceof Map)for(let t of Array.from(r.keys())){let n=r.get(t),i=LL(e,r,t,n);i===void 0?r.delete(t):i!==n&&r.set(t,i)}else if(r instanceof Set)for(let t of Array.from(r)){let n=LL(e,r,t,t);n===void 0?r.delete(t):n!==t&&(r.delete(t),r.add(n))}else for(let[t,n]of Object.entries(r)){let i=LL(e,r,t,n);i===void 0?delete r[t]:i!==n&&(r[t]=i)}}return e.call(t,n,r)}function RL(e,t,n){if(Array.isArray(e))return e.map((e,t)=>RL(e,String(t),n));if(e&&typeof e.toJSON==`function`){if(!n||!xL(e))return e.toJSON(t,n);let r={aliasCount:0,count:1,res:void 0};n.anchors.set(e,r),n.onCreate=e=>{r.res=e,delete n.onCreate};let i=e.toJSON(t,n);return n.onCreate&&n.onCreate(i),i}return typeof e==`bigint`&&!n?.keep?Number(e):e}var zL=class{constructor(e){Object.defineProperty(this,fL,{value:e})}clone(){let e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:t,maxAliasCount:n,onAnchor:r,reviver:i}={}){if(!mL(e))throw TypeError(`A document argument is required`);let a={anchors:new Map,doc:e,keep:!0,mapAsMap:t===!0,mapKeyWarned:!1,maxAliasCount:typeof n==`number`?n:100},o=RL(this,``,a);if(typeof r==`function`)for(let{count:e,res:t}of a.anchors.values())r(t,e);return typeof i==`function`?LL(i,{"":o},``,o):o}},BL=class extends zL{constructor(e){super(oL),this.source=e,Object.defineProperty(this,"tag",{set(){throw Error(`Alias nodes cannot have tags`)}})}resolve(e,t){if(t?.maxAliasCount===0)throw ReferenceError(`Alias resolution is disabled`);let n;t?.aliasResolveCache?n=t.aliasResolveCache:(n=[],TL(e,{Node:(e,t)=>{(pL(t)||xL(t))&&n.push(t)}}),t&&(t.aliasResolveCache=n));let r;for(let e of n){if(e===this)break;e.anchor===this.source&&(r=e)}if(r&&t){let{anchors:e,doc:n,maxAliasCount:i}=t,a=e.get(r);if(a||=(RL(r,null,t),e.get(r)),a?.res===void 0)throw ReferenceError(`This should not happen: Alias anchor was not resolved?`);if(i>=0&&(a.count+=1,a.aliasCount===0&&(a.aliasCount=VL(n,r,e)),a.count*a.aliasCount>i))throw ReferenceError(`Excessive alias count indicates a resource exhaustion attack`)}return r}toJSON(e,t){if(!t)return{source:this.source};let n=this.resolve(t.doc,t);if(!n){let e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw ReferenceError(e)}return t.anchors.get(n).res}toString(e,t,n){let r=`*${this.source}`;if(e){if(NL(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){let e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw Error(e)}if(e.implicitKey)return`${r} `}return r}};function VL(e,t,n){if(pL(t)){let r=t.resolve(e),i=n&&r&&n.get(r);return i?i.count*i.aliasCount:0}if(yL(t)){let r=0;for(let i of t.items){let t=VL(e,i,n);t>r&&(r=t)}return r}if(gL(t)){let r=VL(e,t.key,n),i=VL(e,t.value,n);return Math.max(r,i)}return 1}var HL=e=>!e||typeof e!=`function`&&typeof e!=`object`,UL=class extends zL{constructor(e){super(uL),this.value=e}toJSON(e,t){return t?.keep?this.value:RL(this.value,e,t)}toString(){return String(this.value)}};UL.BLOCK_FOLDED=`BLOCK_FOLDED`,UL.BLOCK_LITERAL=`BLOCK_LITERAL`,UL.PLAIN=`PLAIN`,UL.QUOTE_DOUBLE=`QUOTE_DOUBLE`,UL.QUOTE_SINGLE=`QUOTE_SINGLE`;var WL=`tag:yaml.org,2002:`;function GL(e,t,n){if(t){let e=n.filter(e=>e.tag===t),r=e.find(e=>!e.format)??e[0];if(!r)throw Error(`Tag ${t} not found`);return r}return n.find(t=>t.identify?.(e)&&!t.format)}function KL(e,t,n){if(mL(e)&&(e=e.contents),bL(e))return e;if(gL(e)){let t=n.schema[cL].createNode?.(n.schema,null,n);return t.items.push(e),t}(e instanceof String||e instanceof Number||e instanceof Boolean||typeof BigInt<`u`&&e instanceof BigInt)&&(e=e.valueOf());let{aliasDuplicateObjects:r,onAnchor:i,onTagObj:a,schema:o,sourceObjects:s}=n,c;if(r&&e&&typeof e==`object`){if(c=s.get(e),c)return c.anchor??(c.anchor=i(e)),new BL(c.anchor);c={anchor:null,node:null},s.set(e,c)}t?.startsWith(`!!`)&&(t=WL+t.slice(2));let l=GL(e,t,o.tags);if(!l){if(e&&typeof e.toJSON==`function`&&(e=e.toJSON()),!e||typeof e!=`object`){let t=new UL(e);return c&&(c.node=t),t Line truncated
`)?ZL(n,t):n.includes(`
`)?`
@@ -122,7 +122,7 @@ $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,`$1$2`).replace(/\
`)[0]?.trim()||`invalid YAML`}function tH(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function nH(e){return typeof e==`string`&&e.trim()!==``}var rH={class:`flex h-full w-[24rem] flex-col border-l border-border bg-card shadow-xl`},iH={class:`flex items-center gap-2.5 border-b border-border px-4 py-3`},aH={class:`flex size-8 shrink-0 items-center justify-center rounded-md bg-secondary text-primary`},oH={class:`min-w-0 flex-1`},sH={class:`truncate font-mono text-[11px] text-fg-subtle`},cH={class:`flex-1 space-y-5 overflow-y-auto px-4 py-4`},lH={key:0,class:`rounded-md bg-danger/10 px-2.5 py-1.5 text-xs text-danger`,role:`alert`},uH={key:1,class:`space-y-3`},dH={key:0,class:`block space-y-1.5`},fH={id:`switch-on`},pH=[`value`],mH={class:`text-xs font-medium text-muted-foreground`},hH={class:`flex items-center gap-2`},gH={key:1,role:`alert`,class:`text-xs text-danger`},_H={key:2,class:`space-y-1.5`},vH=[`title`],yH={key:4,class:`flex flex-wrap items-center gap-1 pt-0.5`},bH={key:3,class:`divide-y divide-border rounded-md border border-border`},xH=[`title`],SH={key:0,class:`space-y-3`},CH={class:`text-[13px]`},wH={key:0,class:`text-danger`},TH={class:`ml-2 text-xs text-fg-subtle`},EH={key:1,class:`space-y-3`},DH={class:`text-[13px]`},OH={class:`ml-2 text-xs text-fg-subtle`},kH=[`title`],AH={key:0,class:`text-xs text-danger`},jH={class:`space-y-2`},MH={class:`divide-y divide-border rounded-md border border-border`},NH={class:`flex min-h-10 items-center gap-3 px-3 py-1.5`},PH={class:`flex min-h-10 items-center gap-3 px-3 py-1.5`},FH={class:`flex min-h-10 items-center gap-3 px-3 py-1.5`},IH={class:`flex min-h-10 items-center gap-3 px-3 py-1.5`},LH={class:`flex items-center border-t border-border px-4 py-2.5`},RH=k({__name:`StepEditor`,props:{yaml:{},path:{},vocabulary:{},workflows:{},modelAliases:{}},emits:[`update:yaml`,`close`,`remove`],setup(e,{emit:t}){let n=e,r=t,i=I(()=>nV(n.yaml,n.path)??{}),a=I(()=>eV(i.value)),o=I(()=>a.value?.kind??(typeof i.value.type==`string`?i.value.type:``)),s=I(()=>a.value?.branches.map(([e])=>e)??[]),c=I(()=>o.value===`parallel`?2:1);function l(e){r(`update:yaml`,rV(n.yaml,n.path,{...i.value,switch:{...i.value.switch,on:e}}))}let u=J(``),d=J(``);function f(e,t,i=``){try{let a=e===`add`?sV(n.yaml,n.path,t):e===`rename`?cV(n.yaml,n.path,t,i):lV(n.yaml,n.path,t);r(`update:yaml`,a),u.value=``,d.value=``}catch(e){d.value=String(e.message)}}let p=I(()=>n.vocabulary.find(e=>e.name===o.value)),m=I(()=>typeof i.value.settings==`object`&&i.value.settings!==null?i.value.settings:{}),h=I(()=>pV(n.yaml,n.path)),g=I(()=>p.value?.settings&&i.value.settings?GV(i.value.settings,p.value.settings,`settings`):``),_=[`mission`,`workflow`,`message`,`body`,`plan`,`then`,`status`,`detail`,`run`,`rules`],v=/mission|body|detail|plan|rules/;function y(e,t){return[`workflow.call`,`workflow.handoff`].includes(o.value)&&e===`workflow`||o.value===`human.approve`&&e===`then`?`workflow`:o.value===`agent.run`&&e===`model`?`select`:t.type===`string`?t.enum?`select`:v.test(e)?`text`:`line`:t.type===`boolean`?`boolean`:t.type===`integer`||t.type===`number`?`number`:t.type===`array`&&t.items?.type===`string`?`lines`:`yaml`}let b=I(()=>{let e=Object.entries(p.value?.settings?.properties??{}).filter(([e])=>o.value!==`workflow.call`||![`inputs`,`outputs`].includes(e)).map(([e,t])=>({key:e,schema:t,kind:y(e,t),options:o.value===`agent.run`&&e===`model`?n.modelAliases:t.enum??[]})),t=e.filter(e=>_.includes(e.key)&&e.kind!==`boolean`).sort((e,t)=>_.indexOf(e.key)-_.indexOf(t.key))[0],r=e.filter(e=>e!==t);return{lead:t,compact:r.filter(e=>[`workflow`,`select`,`line`,`number`,`boolean`].includes(e.kind)),long:r.filter(e=>[`text`,`lines`,`yaml`].includes(e.kind))}});function x(e){let{id:t,type:i,...a}=e;r(`update:yaml`,rV(n.yaml,n.path,{id:t,type:i,...a}))}function S(e,t){x({...i.value,[e]:t})}function C(e){S(`retry`,{...i.value.retry,...e})}function w(e,t){let n={...m.value,[e]:t};o.value===`workflow.call`&&e===`wait`&&t!==!0&&delete n.outputs,x({...i.value,settings:n})}function ee(e,t){let n={...m.value,[e]:t};o.value===`workflow.call`&&t!==m.value[e]&&(delete n.inputs,delete n.outputs),x({...i.value,settings:n})}let T=I(()=>n.workflows.find(e=>e.id===m.value.workflow)),te=I(()=>Object.entries(hV(T.value?.yaml??``,`inputs`)??{})),E=I(()=>Object.entries(hV(T.value?.yaml??``,`outputs`)??{})),ne=I(()=>Object.entries(hV(n.yaml,`inputs`)??{})),re=I(()=>Object.entries(hV(n.yaml,`outputs`)??{})),ie=I(()=>m.value.inputs??{}),D=I(()=>m.value.outputs??{}),ae=e=>typeof e==`string`&&e.startsWith(`inputs.`),oe=e=>ie.value[e]===void 0?``:String(ie.value[e]);function se(e,t,n){w(`inputs`,{...ie.value,[e]:t===``?void 0:ae(t)?t:IV(t,n??`string`)})}let ce=J(null);function le(e,t){let n=ce.value??b.value.lead?.key;if(!n)return;let r=typeof m.value[n]==`string`?m.value[n]:``,i=`{{ steps.${e}.${t} }}`;w(n,r?`${r.trimEnd()} ${i}`:i)}let ue=J({});function de(e,t){try{w(e,t.trim()?XB(t):void 0),ue.value={...ue.value,[e]:``}}catch(t){ue.val Line truncated
`)[0]}}}let fe=e=>e===void 0?``:ZB(e).trimEnd(),pe=(e,t)=>t.title??e.replaceAll(`_`,` `).replace(/^./,e=>e.toUpperCase()),me=e=>typeof m.value[e]==`string`?m.value[e]:``;return(t,n)=>(R(),G(`aside`,rH,[W(`header`,iH,[W(`span`,aH,[(R(),q(Ue(z(MV)(o.value)),{class:`size-4`}))]),W(`div`,oH,[M(z(O),{"model-value":i.value.id??``,class:`h-7 truncate border-transparent px-1 font-medium shadow-none hover:border-input dark:bg-transparent`,placeholder:z(CV)(o.value),"aria-label":`Step id`,"onUpdate:modelValue":n[0]||=e=>S(`id`,String(e))},null,8,[`model-value`,`placeholder`]),W(`div`,sH,V(o.value),1)]),M(z(Y),{type:`button`,variant:`ghost`,size:`icon-sm`,"aria-label":`Close`,onClick:n[1]||=e=>r(`close`)},{default:j(()=>[M(z(Yn))]),_:1})]),W(`div`,cH,[g.value?(R(),G(`p`,lH,V(g.value),1)):L(``,!0),a.value?(R(),G(`section`,uH,[o.value===`switch`?(R(),G(`label`,dH,[n[18]||=W(`span`,{class:`text-xs font-medium text-muted-foreground`,title:`The value whose case runs; a case named default runs when none matches`},`Switch on`,-1),M(z(O),{"model-value":a.value.on,class:`font-mono`,placeholder:`steps.assess.result.fit`,list:`switch-on`,onChange:n[2]||=e=>l(e.target.value.trim())},null,8,[`model-value`]),W(`datalist`,fH,[(R(!0),G(H,null,K(h.value,e=>(R(),G(`option`,{key:e,value:`steps.${e}.result.`},null,8,pH))),128))])])):L(``,!0),W(`div`,mH,V(o.value===`switch`?`Cases`:`Branches`),1),(R(!0),G(H,null,K(s.value,e=>(R(),G(`div`,{key:e,class:`flex items-center gap-2`},[M(z(O),{"model-value":e,class:N(o.value===`switch`&&`font-mono`),"aria-label":`${o.value===`switch`?`Case`:`Branch`} ${e}`,onChange:t=>f(`rename`,e,t.target.value.trim())},null,8,[`model-value`,`class`,`aria-label`,`onChange`]),M(z(Y),{type:`button`,variant:`ghost`,size:`icon-sm`,"aria-label":`Remove ${e}`,disabled:s.value.length<=c.value,onClick:t=>f(`delete`,e)},{default:j(()=>[M(z(Vn))]),_:1},8,[`aria-label`,`disabled`,`onClick`])]))),128)),W(`div`,hH,[M(z(O),{modelValue:u.value,"onUpdate:modelValue":n[3]||=e=>u.value=e,"aria-label":o.value===`switch`?`New case value`:`New branch name`,placeholder:o.value===`switch`?`Value, or default`:`Branch name`,onKeydown:n[4]||=yt(Ct(e=>f(`add`,u.value.trim()),[`prevent`]),[`enter`])},null,8,[`modelValue`,`aria-label`,`placeholder`]),M(z(Y),{type:`button`,size:`icon-sm`,variant:`outline`,"aria-label":o.value===`switch`?`Add case`:`Add branch`,disabled:!u.value.trim(),onClick:n[5]||=e=>f(`add`,u.value.trim())},{default:j(()=>[M(z(On))]),_:1},8,[`aria-label`,`disabled`])]),d.value?(R(),G(`p`,gH,V(d.value),1)):L(``,!0)])):L(``,!0),b.value.lead?(R(),G(`section`,_H,[W(`div`,{class:`flex items-center gap-1 text-xs font-medium text-muted-foreground`,title:b.value.lead.schema.description},[A(V(pe(b.value.lead.key,b.value.lead.schema))+` `,1),b.value.lead.schema.description?(R(),q(z(on),{key:0,class:`size-3 text-fg-subtle`})):L(``,!0)],8,vH),b.value.lead.kind===`workflow`?(R(),q(RV,{key:0,value:me(b.value.lead.key),workflows:e.workflows,label:pe(b.value.lead.key,b.value.lead.schema),onPick:n[6]||=e=>ee(b.value.lead.key,e)},null,8,[`value`,`workflows`,`label`])):b.value.lead.kind===`select`?(R(),q(z(jI),{key:1,size:`sm`,class:`w-full`,"model-value":me(b.value.lead.key),"onUpdate:modelValue":n[7]||=e=>w(b.value.lead.key,String(e)||void 0)},{default:j(()=>[M(z(MI),{value:``},{default:j(()=>[...n[19]||=[A(`Default`,-1)]]),_:1}),(R(!0),G(H,null,K(b.value.lead.options,e=>(R(),q(z(MI),{key:e,value:e},{default:j(()=>[A(V(e),1)]),_:2},1032,[`value`]))),128))]),_:1},8,[`model-value`])):b.value.lead.kind===`text`?(R(),q(z(au),{key:2,"model-value":me(b.value.lead.key),class:`min-h-40 text-[13px] leading-relaxed`,onFocus:n[8]||=e=>ce.value=b.value.lead.key,"onUpdate:modelValue":n[9]||=e=>w(b.value.lead.key,String(e))},null,8,[`model-value`])):(R(),q(z(O),{key:3,"model-value":me(b.value.lead.key),onFocus:n[10]||=e=>ce.value=b.value.lead.key,"onUpdate:modelValue":n[11]||=e=>w(b.value.lead.key,String(e))},null,8,[`model-value`])),h.value.length&&b.value.lead.kind!==`select`?(R(),G(`div`,yH,[n[20]||=W(`span`,{class:`text-[11px] text-fg-subtle`},`Insert`,-1),(R(!0),G(H,null,K(h.value,e=>(R(),G(H,{key:e},[M(z(Y),{type:`button`,variant:`outline`,size:`xs`,class:`font-mono`,onClick:t=>le(e,`summary`)},{default:j(()=>[A(V(e),1)]),_:2},1032,[`onClick`]),M(z(Y),{type:`button`,variant:`outline`,size:`xs`,class:`font-mono`,onClick:t=>le(e,`result`)},{default:j(()=>[A(V(e)+`.result`,1)]),_:2},1032,[`onClick`])],64))),128))])):L(``,!0)])):L(``,!0),b.value.compact.length?(R(),G(`section`,bH,[(R(!0),G(H,null,K(b.value.compact,t=>(R(),G(`div`,{key:t.key,class:`flex min-h-10 items-center gap-3 px-3 py-1.5`},[W(`span`,{class:`flex flex-1 items-center gap-1 text-[13px]`,title:t.schema.description},[A(V(pe(t.key,t.schema))+` `,1),t.schema.description?(R(),q(z(on),{key:0,class:`size-3 text-fg-subtle`})):L(``,!0)],8,xH),t.kind===`workflow`?(R(),q(RV,{key:0,class:`max-w-48`,value:me(t.key),workflows:e.workflows,label:pe(t.key,t.schema),onPick:e=>ee(t.key,e)},null,8,[`vLine truncated
`):``,class:`min-h-16 font-mono text-xs`,placeholder:`One per line`,"onUpdate:modelValue":t=>w(e.key,String(t).split(`
`).filter(Boolean))},null,8,[`model-value`,`onUpdate:modelValue`])):(R(),G(H,{key:2},[M(z(au),{"model-value":fe(m.value[e.key]),class:`min-h-24 font-mono text-xs`,placeholder:`YAML`,onChange:t=>de(e.key,t.target.value)},null,8,[`model-value`,`onChange`]),ue.value[e.key]?(R(),G(`span`,AH,V(ue.value[e.key]),1)):L(``,!0)],64))]))),128)),W(`section`,jH,[n[37]||=W(`div`,{class:`text-xs font-medium text-muted-foreground`},`Flow`,-1),W(`div`,MH,[W(`label`,NH,[n[31]||=W(`span`,{class:`flex-1 text-[13px]`},`Run only when`,-1),M(z(O),{class:`h-7 w-48 font-mono text-xs`,placeholder:`always`,"model-value":i.value.when??``,"onUpdate:modelValue":n[12]||=e=>S(`when`,String(e))},null,8,[`model-value`])]),W(`label`,PH,[n[34]||=W(`span`,{class:`flex-1 text-[13px]`},`If it fails`,-1),M(z(jI),{size:`sm`,"model-value":i.value.on_failure??``,"onUpdate:modelValue":n[13]||=e=>S(`on_failure`,String(e)||void 0)},{default:j(()=>[M(z(MI),{value:``},{default:j(()=>[...n[32]||=[A(`Park the task`,-1)]]),_:1}),M(z(MI),{value:`continue`},{default:j(()=>[...n[33]||=[A(`Continue`,-1)]]),_:1})]),_:1},8,[`model-value`])]),W(`label`,FH,[n[35]||=W(`span`,{class:`flex-1 text-[13px]`},`Attempts`,-1),M(z(O),{type:`number`,min:`1`,max:`10`,placeholder:`1`,class:`h-7 w-20 text-right text-[13px]`,"model-value":i.value.retry?.attempts??``,"onUpdate:modelValue":n[14]||=e=>C({attempts:String(e)===``?void 0:Number(String(e))})},null,8,[`model-value`])]),W(`label`,IH,[n[36]||=W(`span`,{class:`flex-1 text-[13px]`},`Retry backoff`,-1),M(z(wh),{"model-value":i.value.retry?.backoff??``,units:[`s`,`m`,`h`],"onUpdate:modelValue":n[15]||=e=>C({backoff:e||void 0})},null,8,[`model-value`])])])])]),W(`footer`,LH,[M(z(Y),{type:`button`,variant:`ghost`,size:`sm`,class:`text-danger`,onClick:n[16]||=e=>r(`remove`)},{default:j(()=>[M(z(Vn)),n[38]||=A(`Delete step`,-1)]),_:1}),M(z(Y),{type:`button`,size:`sm`,class:`ml-auto`,onClick:n[17]||=e=>r(`close`)},{default:j(()=>[...n[39]||=[A(`Done`,-1)]]),_:1})])]))}}),zH=`repository_path`;function BH(e,t,n){let r=[];for(let[n,i]of e){let e=t[n];e?.from===`path`&&e.path.trim()&&r.push({name:n,path:e.path.trim(),type:i.type??`string`,required:i.required===!0})}return n.trim()&&r.push({name:zH,path:n.trim(),type:`string`,required:!0}),r}function VH(e){return Array.isArray(e)?`array`:e===null?`null`:typeof e==`boolean`?`bool`:typeof e==`object`?`object`:typeof e}function HH(e,t,n){let r=[];for(let[i,a]of e){let e=t[i],o=a.type??`string`;if(!(e&&(e.from===`path`?e.path.trim():e.value!==``))){a.required&&r.push(`${i} is required`);continue}if(e.from===`path`){let e=n?.failures?.find(e=>e.field_name===i);e&&r.push(`${i}: ${e.reason}`);continue}let s=VH(gb(e.value,o));o!==`any`&&s!==o&&r.push(`${i} is ${o}, but ${JSON.stringify(e.value)} is not`)}return n?.failures?.some(e=>e.field_name===`repository_path`)&&r.push(`the repository path does not resolve`),r}function UH(e,t){let n={};for(let[r,i]of e){let e=t[r];e?.from===`path`&&e.path.trim()?n[r]={param:r}:e?.from===`value`&&e.value!==``&&(n[r]={value:gb(e.value,i.type??`string`)})}return n}function WH(e,t){let n=e=>t.find(t=>t.name===e)?.path??``,r={};for(let[t,i]of Object.entries(e.inputs??{}))r[t]=i.param?{from:`path`,path:n(i.param),value:``}:{from:`value`,path:``,value:typeof i.value==`string`?i.value:JSON.stringify(i.value)};return{rows:r,repositoryPath:n(e.repo_param)}}function GH(e,t=``){return Array.isArray(e)?e.slice(0,3).flatMap((e,n)=>{let r=`${t}[${n}]`;return[r,...GH(e,r)]}):e&&typeof e==`object`?Object.entries(e).flatMap(([e,n])=>{let r=t?`${t}.${e}`:e;return[r,...GH(n,r)]}):[]}function KH(e){try{return e?.body?JSON.parse(e.body):null}catch{return null}}function qH(e){try{let t=JSON.parse(e.headers??`{}`);return Object.fromEntries(Object.entries(t).map(([e,t])=>[e,Array.isArray(t)?t.join(`, `):String(t)]))}catch{return{}}}function JH(e){let t=typeof e==`string`?e:JSON.stringify(e);return t.length>80?`${t.slice(0,80)}…`:t}var YH={class:`flex h-full flex-col`},XH={class:`flex items-center gap-2 border-b border-border px-4 py-3`},ZH={class:`min-w-0 flex-1 truncate text-sm font-medium`},QH={key:0,class:`flex flex-1 items-center justify-center`},$H={class:`space-y-1.5`},eU={key:1,class:`space-y-1.5`},tU=[`title`],nU={class:`space-y-1.5`},rU={id:`bind-paths`},iU=[`value`],aU={class:`divide-y divide-border rounded-md border border-border`},oU={class:`flex items-center gap-1.5 text-xs`},sU={class:`font-mono`},cU={class:`text-fg-subtle`},lU={key:0,class:`text-danger`,title:`Required`},uU={key:2,class:`text-xs text-danger`},dU=[`title`],fU={key:0,class:`space-y-1 px-3 py-2`},pU={key:0,class:`text-xs text-danger`},mU={key:1,class:`truncate font-mono text-xs text-success`},hU={key:1,class:`px-3 py-2 text-xs text-fg-subtle`},gU={class:`space-y-2`},_U={key:0,role:`alert`,class:`text-xs text-danger`},vU={key:1,class:`text-xs text-fg-subtle`},yU={class:`flex gap-2`},bU=`__new__`,xU=k({__name:`BindEvent`,props:{yaml:{},binding:{}},emits:[`back`,`saved`],setup(e,{emit:t}){let n=e,r=t,i= Line truncated
`).filter(Boolean))},null,8,[`model-value`,`onUpdate:modelValue`])):(R(),G(H,{key:2},[M(z(au),{"model-value":fe(m.value[e.key]),class:`min-h-24 font-mono text-xs`,placeholder:`YAML`,onChange:t=>de(e.key,t.target.value)},null,8,[`model-value`,`onChange`]),ue.value[e.key]?(R(),G(`span`,AH,V(ue.value[e.key]),1)):L(``,!0)],64))]))),128)),W(`section`,jH,[n[37]||=W(`div`,{class:`text-xs font-medium text-muted-foreground`},`Flow`,-1),W(`div`,MH,[W(`label`,NH,[n[31]||=W(`span`,{class:`flex-1 text-[13px]`},`Run only when`,-1),M(z(O),{class:`h-7 w-48 font-mono text-xs`,placeholder:`always`,"model-value":i.value.when??``,"onUpdate:modelValue":n[12]||=e=>S(`when`,String(e))},null,8,[`model-value`])]),W(`label`,PH,[n[34]||=W(`span`,{class:`flex-1 text-[13px]`},`If it fails`,-1),M(z(jI),{size:`sm`,"model-value":i.value.on_failure??``,"onUpdate:modelValue":n[13]||=e=>S(`on_failure`,String(e)||void 0)},{default:j(()=>[M(z(MI),{value:``},{default:j(()=>[...n[32]||=[A(`Park the task`,-1)]]),_:1}),M(z(MI),{value:`continue`},{default:j(()=>[...n[33]||=[A(`Continue`,-1)]]),_:1})]),_:1},8,[`model-value`])]),W(`label`,FH,[n[35]||=W(`span`,{class:`flex-1 text-[13px]`},`Attempts`,-1),M(z(O),{type:`number`,min:`1`,max:`10`,placeholder:`1`,class:`h-7 w-20 text-right text-[13px]`,"model-value":i.value.retry?.attempts??``,"onUpdate:modelValue":n[14]||=e=>C({attempts:String(e)===``?void 0:Number(String(e))})},null,8,[`model-value`])]),W(`label`,IH,[n[36]||=W(`span`,{class:`flex-1 text-[13px]`},`Retry backoff`,-1),M(z(wh),{"model-value":i.value.retry?.backoff??``,units:[`s`,`m`,`h`],"onUpdate:modelValue":n[15]||=e=>C({backoff:e||void 0})},null,8,[`model-value`])])])])]),W(`footer`,LH,[M(z(Y),{type:`button`,variant:`ghost`,size:`sm`,class:`text-danger`,onClick:n[16]||=e=>r(`remove`)},{default:j(()=>[M(z(Vn)),n[38]||=A(`Delete step`,-1)]),_:1}),M(z(Y),{type:`button`,size:`sm`,class:`ml-auto`,onClick:n[17]||=e=>r(`close`)},{default:j(()=>[...n[39]||=[A(`Done`,-1)]]),_:1})])]))}}),zH=`repository_path`;function BH(e,t,n){let r=[];for(let[n,i]of e){let e=t[n];e?.from===`path`&&e.path.trim()&&r.push({name:n,path:e.path.trim(),type:i.type??`string`,required:i.required===!0})}return n.trim()&&r.push({name:zH,path:n.trim(),type:`string`,required:!0}),r}function VH(e){return Array.isArray(e)?`array`:e===null?`null`:typeof e==`boolean`?`bool`:typeof e==`object`?`object`:typeof e}function HH(e,t,n){let r=[];for(let[i,a]of e){let e=t[i],o=a.type??`string`;if(!(e&&(e.from===`path`?e.path.trim():e.value!==``))){a.required&&r.push(`${i} is required`);continue}if(e.from===`path`){let e=n?.failures?.find(e=>e.field_name===i);e&&r.push(`${i}: ${e.reason}`);continue}let s=VH(gb(e.value,o));o!==`any`&&s!==o&&r.push(`${i} is ${o}, but ${JSON.stringify(e.value)} is not`)}return n?.failures?.some(e=>e.field_name===`repository_path`)&&r.push(`the repository path does not resolve`),r}function UH(e,t){let n={};for(let[r,i]of e){let e=t[r];e?.from===`path`&&e.path.trim()?n[r]={param:r}:e?.from===`value`&&e.value!==``&&(n[r]={value:gb(e.value,i.type??`string`)})}return n}function WH(e,t){let n=e=>t.find(t=>t.name===e)?.path??``,r={};for(let[t,i]of Object.entries(e.inputs??{}))r[t]=i.param?{from:`path`,path:n(i.param),value:``}:{from:`value`,path:``,value:typeof i.value==`string`?i.value:JSON.stringify(i.value)};return{rows:r,repositoryPath:n(e.repo_param)}}function GH(e,t=``){return Array.isArray(e)?e.slice(0,3).flatMap((e,n)=>{let r=`${t}[${n}]`;return[r,...GH(e,r)]}):e&&typeof e==`object`?Object.entries(e).flatMap(([e,n])=>{let r=t?`${t}.${e}`:e;return[r,...GH(n,r)]}):[]}function KH(e){try{return e?.body?JSON.parse(e.body):null}catch{return null}}function qH(e){try{let t=JSON.parse(e.headers??`{}`);return Object.fromEntries(Object.entries(t).map(([e,t])=>[e,Array.isArray(t)?t.join(`, `):String(t)]))}catch{return{}}}function JH(e){let t=typeof e==`string`?e:JSON.stringify(e);return t.length>80?`${t.slice(0,80)}…`:t}var YH={class:`flex h-full flex-col`},XH={class:`flex items-center gap-2 border-b border-border px-4 py-3`},ZH={class:`min-w-0 flex-1 truncate text-sm font-medium`},QH={key:0,class:`flex flex-1 items-center justify-center`},$H={class:`space-y-1.5`},eU={key:1,class:`space-y-1.5`},tU=[`title`],nU={class:`space-y-1.5`},rU={id:`bind-paths`},iU=[`value`],aU={class:`divide-y divide-border rounded-md border border-border`},oU={class:`flex items-center gap-1.5 text-xs`},sU={class:`font-mono`},cU={class:`text-fg-subtle`},lU={key:0,class:`text-danger`,title:`Required`},uU={key:2,class:`text-xs text-danger`},dU=[`title`],fU={key:0,class:`space-y-1 px-3 py-2`},pU={key:0,class:`text-xs text-danger`},mU={key:1,class:`truncate font-mono text-xs text-success`},hU={key:1,class:`px-3 py-2 text-xs text-fg-subtle`},gU={class:`space-y-2`},_U={key:0,role:`alert`,class:`text-xs text-danger`},vU={key:1,class:`text-xs text-fg-subtle`},yU={class:`flex gap-2`},bU=`__new__`,xU=k({__name:`BindEvent`,props:{yaml:{},binding:{}},emits:[`back`,`saved`],setup(e,{emit:t}){let n=e,r=t,i= Line truncated
`).replace(`
`,`
@@ -149,4 +149,4 @@ Target: ${n}`,EDGE_ORPHANED:e=>`Edge was orphaned (suddenly missing source or ta
Edge: ${e}`,EDGE_NOT_FOUND:e=>`Edge not found
Edge: ${e}`,USEVUEFLOW_OPTIONS:()=>`The options parameter is deprecated and will be removed in the next major version. Please use the id parameter instead`},uQ=class extends Error{constructor(e,...t){super(lQ[e]?.call(lQ,...t)),this.name=`VueFlowError`,this.code=e,this.args=t}};function dQ(e){return`clientX`in e}function fQ(e){return`sourceEvent`in e}function pQ(e,t){let n=dQ(e),r,i;return n?(r=e.clientX,i=e.clientY):`touches`in e&&e.touches.length>0?(r=e.touches[0].clientX,i=e.touches[0].clientY):`changedTouches`in e&&e.changedTouches.length>0?(r=e.changedTouches[0].clientX,i=e.changedTouches[0].clientY):(r=0,i=0),{x:r-(t?.left??0),y:i-(t?.top??0)}}var mQ=()=>typeof navigator<`u`&&(navigator==null?void 0:navigator.userAgent)?.indexOf(`Mac`)>=0;function hQ(e){return{width:e.dimensions?.width??e.width??0,height:e.dimensions?.height??e.height??0}}function gQ(e,t=[1,1]){return{x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}}var _Q=()=>!0;function vQ(e){e?.classList.remove(`valid`,`connecting`,`vue-flow__handle-valid`,`vue-flow__handle-connecting`)}function yQ(e,t,n){let r=[],i={x:e.x-n,y:e.y-n,width:n*2,height:n*2};for(let e of t.values())oZ(i,aZ(e))>0&&r.push(e);return r}var bQ=250;function xQ(e,t,n,r){let i=[],a=1/0,o=yQ(e,n,t+bQ);for(let n of o){let o=[...n.handleBounds?.source??[],...n.handleBounds?.target??[]];for(let s of o){if(r.nodeId===s.nodeId&&r.type===s.type&&r.id===s.id)continue;let{x:o,y:c}=iQ(n,s,s.position,!0),l=Math.sqrt((o-e.x)**2+(c-e.y)**2);l>t||(l<a?(i=[{...s,x:o,y:c}],a=l):l===a&&i.push({...s,x:o,y:c}))}}if(!i.length)return null;if(i.length>1){let e=r.type===`source`?`target`:`source`;return i.find(t=>t.type===e)??i[0]}return i[0]}function SQ(e,{handle:t,connectionMode:n,fromNodeId:r,fromHandleId:i,fromType:a,doc:o,lib:s,flowId:c,isValidConnection:l=_Q},u,d,f,p){let m=a===`target`,h=t?o.querySelector(`.${s}-flow__handle[data-id="${c}-${t?.nodeId}-${t?.id}-${t?.type}"]`):null,{x:g,y:_}=pQ(e),v=o.elementFromPoint(g,_),y=v?.classList.contains(`${s}-flow__handle`)?v:h,b={handleDomNode:y,isValid:!1,connection:null,toHandle:null};if(y){let e=CQ(void 0,y),t=y.getAttribute(`data-nodeid`),a=y.getAttribute(`data-handleid`),o=y.classList.contains(`connectable`),s=y.classList.contains(`connectableend`);if(!t||!e)return b;let c={source:m?t:r,sourceHandle:m?a:i,target:m?r:t,targetHandle:m?i:a};b.connection=c,b.isValid=o&&s&&(n===HX.Strict?m&&e===`source`||!m&&e===`target`:t!==r||a!==i)&&l(c,{nodes:d,edges:u,sourceNode:f(c.source),targetNode:f(c.target)}),b.toHandle=EQ(t,e,a,p,n,!0)}return b}function CQ(e,t){return e||(t?.classList.contains(`target`)?`target`:t?.classList.contains(`source`)?`source`:null)}function wQ(e,t){let n=null;return t?n=`valid`:e&&!t&&(n=`invalid`),n}function TQ(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}function EQ(e,t,n,r,i,a=!1){let o=r.get(e);if(!o)return null;let s=i===HX.Strict?o.handleBounds?.[t]:[...o.handleBounds?.source??[],...o.handleBounds?.target??[]],c=(n?s?.find(e=>e.id===n):s?.[0])??null;return c&&a?{...c,...iQ(o,c,c.position,!0)}:c}var DQ={[zX.Left]:zX.Right,[zX.Right]:zX.Left,[zX.Top]:zX.Bottom,[zX.Bottom]:zX.Top},OQ=[`production`,`prod`];function kQ(e,...t){AQ()&&console.warn(`[Vue Flow]: ${e}`,...t)}function AQ(){return!OQ.includes(`production`)}function jQ(e,t,n,r,i){let a=t.querySelectorAll(`.vue-flow__handle.${e}`);return a?.length?Array.from(a).map(t=>{let a=t.getBoundingClientRect();return{id:t.getAttribute(`data-handleid`),type:e,nodeId:i,position:t.getAttribute(`data-handlepos`),x:(a.left-n.left)/r,y:(a.top-n.top)/r,...sZ(t)}}):null}function MQ(e,t,n,r,i,a=!1,o){i.value=!1,e.selected?(a||e.selected&&t)&&(r([e]),st(()=>{o.blur()})):n([e])}function NQ(e){return z(e)!==void 0}function PQ(e,t,n,r){if(!e||!e.source||!e.target)return n(new uQ(cQ.EDGE_INVALID,e?.id??`[ID UNKNOWN]`)),!1;let i;return i=dZ(e)?e:{...e,id:xZ(e)},i=_Z(i,void 0,r),!SZ(i,t)&&i}function FQ(e,t,n,r,i){if(!t.source||!t.target)return i(new uQ(cQ.EDGE_INVALID,e.id)),!1;if(!n)return i(new uQ(cQ.EDGE_NOT_FOUND,e.id)),!1;let{id:a,...o}=e;return{...o,id:r?xZ(t):a,source:t.source,target:t.target,sourceHandle:t.sourceHandle,targetHandle:t.targetHandle}}function IQ(e,t,n){let r={},i=[];for(let a=0;a<e.length;++a){let o=e[a];if(!fZ(o)){n(new uQ(cQ.NODE_INVALID,o?.id));continue}let s=gZ(o,t(o.id),o.parentNode);o.parentNode&&(r[o.parentNode]=!0),i[a]=s}for(let e of i){let a=t(e.parentNode)||i.find(t=>t.id===e.parentNode);e.parentNode&&!a&&n(new uQ(cQ.NODE_MISSING_PARENT,e.id,e.parentNode)),(e.parentNode||r[e.id])&&(r[e.id]&&(e.isParent=!0),a&&(a.isParent=!0))}return i}function LQ(e,t,n,r,i,a){let o=i,s=r.get(o)||new Map;r.set(o,s.set(n,t)),o=`${i}-${e}`;let c=r.get(o)||new Map;if(r.set(o,c.set(n,t)),a){o=`${i}-${e}-${a}`;let s=r.get(o)||new Map;r.set(o,s.set(n,t))}}function RQ(e,t,n){e.clear();for(let t of n){let{source:n,target:r,sourceHandle:i=null,targetHandle:a=null}=t,o={edgeId:t.id,source:n,target:r,sourceHandle:i,targetHandle:a},s=`${n}-${i}--${r}-${a}`;LQ(`source`,o,`${r}-${a}--Line truncated
`),r=t.split(`
`),i=Array.from({length:n.length+1},()=>Array(r.length+1).fill(0));for(let e=n.length-1;e>=0;e--)for(let t=r.length-1;t>=0;t--)i[e][t]=n[e]===r[t]?i[e+1][t+1]+1:Math.max(i[e+1][t],i[e][t+1]);let a=[],o=0,s=0;for(;o<n.length&&s<r.length;)n[o]===r[s]?(a.push({kind:`same`,text:n[o++]}),s++):i[o+1][s]>=i[o][s+1]?a.push({kind:`del`,text:n[o++]}):a.push({kind:`add`,text:r[s++]});for(;o<n.length;)a.push({kind:`del`,text:n[o++]});for(;s<r.length;)a.push({kind:`add`,text:r[s++]});return a}function t2(e){let t=YB(e).toJS(),n=new Map;for(let r of kV(e).nodes){let{kind:e,path:i,stage:a,occurrence:o}=r.data;if(r.type!==`step`||e!==`step`||!i||a===void 0)continue;let s=t;for(let e of i)s=s?.[e];n.set(`${a}#${o??0}`,{node:r.id,signature:JSON.stringify(s??null)})}return n}function n2(e,t,n){let r=t2(e),i=t2(t),a={};for(let[e,t]of r){let r=i.get(e);r?r.signature!==t.signature&&(a[t.node]=`changed`):a[t.node]=n}return a}var r2={class:`grid h-[calc(100dvh-17rem)] min-h-[26rem] grid-cols-[18rem_1fr] gap-3`},i2={class:`min-h-0 divide-y divide-border overflow-y-auto rounded-lg border border-border`,"aria-label":`Revisions`},a2=[`aria-current`,`onClick`],o2={class:`flex items-center gap-2 text-sm`},s2={class:`font-mono text-xs text-fg-subtle`},c2=[`title`],l2={key:0,class:`px-3 py-2 text-sm text-muted-foreground`},u2={key:0,class:`flex min-h-0 flex-col gap-2`},d2={class:`flex items-center gap-2`},f2={class:`text-xs text-muted-foreground`},p2={key:0,class:`rounded-lg border border-border p-4 text-sm text-muted-foreground`},m2={key:1,class:`min-h-0 flex-1 overflow-auto rounded-lg border border-border py-2 font-mono text-[13px] leading-6`},h2={class:`inline-block w-4 select-none text-fg-subtle`},g2={key:2,class:`grid min-h-0 flex-1 grid-cols-2 gap-3`},_2={class:`flex min-h-0 flex-col gap-1`},v2={class:`text-xs font-medium text-muted-foreground`},y2={class:`min-h-0 flex-1`},b2={class:`flex min-h-0 flex-col gap-1`},x2={class:`min-h-0 flex-1`},S2=k({__name:`WorkflowHistory`,props:it({revisions:{},current:{},error:{}},{selected:{default:0},selectedModifiers:{},mode:{default:`yaml`},modeModifiers:{}}),emits:it([`restore`],[`update:selected`,`update:mode`]),setup(e,{emit:t}){let n=e,r=t,i=Fe(e,`selected`),a=Fe(e,`mode`);F(()=>n.revisions,e=>{e.some(e=>e.version===i.value)||(i.value=(e.find(e=>e.yaml!==n.current)??e[0])?.version??0)},{immediate:!0});let o=I(()=>n.revisions.find(e=>e.version===i.value)),s=I(()=>o.value?.yaml??null),c=I(()=>s.value===null?[]:e2(s.value,n.current)),l=I(()=>s.value!==null&&s.value===n.current),u=I(()=>s.value===null?{}:n2(s.value,n.current,`removed`)),d=I(()=>s.value===null?{}:n2(n.current,s.value,`added`)),f={added:`default`,edited:`secondary`,removed:`destructive`};return(t,n)=>(R(),G(`div`,r2,[W(`ol`,i2,[(R(!0),G(H,null,K(e.revisions,e=>(R(),G(`li`,{key:e.version},[W(`button`,{type:`button`,class:N([`block w-full px-3 py-2 text-left hover:bg-secondary`,e.version===i.value&&`bg-secondary`]),"aria-current":e.version===i.value,onClick:t=>i.value=e.version},[W(`span`,o2,[W(`span`,s2,`v`+V(e.version),1),M(z(At),{variant:f[e.change]},{default:j(()=>[A(V(e.change),1)]),_:2},1032,[`variant`])]),W(`span`,{class:`mt-0.5 block truncate text-xs text-muted-foreground`,title:e.at},V(e.actor||`unknown`)+` · `+V(e.source||`unknown`)+` · `+V(z(Ng)(e.at)),9,c2)],10,a2)]))),128)),e.revisions.length?L(``,!0):(R(),G(`li`,l2,V(e.error||`No recorded changes`),1))]),o.value?(R(),G(`div`,u2,[W(`div`,d2,[M(z(eb),{modelValue:a.value,"onUpdate:modelValue":n[0]||=e=>a.value=e},{default:j(()=>[M(z(nb),null,{default:j(()=>[M(z(rb),{value:`yaml`},{default:j(()=>[...n[2]||=[A(`YAML`,-1)]]),_:1}),M(z(rb),{value:`canvas`},{default:j(()=>[...n[3]||=[A(`Canvas`,-1)]]),_:1})]),_:1})]),_:1},8,[`modelValue`]),W(`span`,f2,V(l.value?`Same as the current definition`:`Compared with the current definition`),1),M(z(Y),{type:`button`,size:`sm`,variant:`outline`,class:`ml-auto`,disabled:s.value===null||l.value,title:s.value===null?`This revision removed the workflow`:void 0,onClick:n[1]||=e=>r(`restore`,s.value)},{default:j(()=>[M(z(jn),{"data-icon":`inline-start`}),n[4]||=A(` Restore this version`,-1)]),_:1},8,[`disabled`,`title`])]),s.value===null?(R(),G(`p`,p2,`Workflow removed in this revision.`)):a.value===`yaml`?(R(),G(`pre`,m2,[W(`code`,null,[(R(!0),G(H,null,K(c.value,(e,t)=>(R(),G(`span`,{key:t,class:N([`block min-h-6 px-3 whitespace-pre-wrap`,{"bg-ok/10":e.kind===`add`,"bg-danger/10 text-danger":e.kind===`del`}])},[W(`span`,h2,V(e.kind===`add`?`+`:e.kind===`del`?`-`:``),1),A(V(e.text),1)],2))),128))])])):(R(),G(`div`,g2,[W(`div`,_2,[W(`span`,v2,`v`+V(o.value.version),1),W(`div`,y2,[M(X0,{yaml:s.value,marks:u.value},null,8,[`yaml`,`marks`])])]),W(`div`,b2,[n[5]||=W(`span`,{class:`text-xs font-medium text-muted-foreground`},`Current`,-1),W(`div`,x2,[M(X0,{yaml:e.current,marks:d.value},null,8,[`yaml`,`marks`])])])]))])):L(``,!0)]))}}),C2=`workflow-definitions`;function w2(e){let t=me(),n=J([]),r=J(``);async function i(){try{n.value=await t.histo Line truncated
`),i=Array.from({length:n.length+1},()=>Array(r.length+1).fill(0));for(let e=n.length-1;e>=0;e--)for(let t=r.length-1;t>=0;t--)i[e][t]=n[e]===r[t]?i[e+1][t+1]+1:Math.max(i[e+1][t],i[e][t+1]);let a=[],o=0,s=0;for(;o<n.length&&s<r.length;)n[o]===r[s]?(a.push({kind:`same`,text:n[o++]}),s++):i[o+1][s]>=i[o][s+1]?a.push({kind:`del`,text:n[o++]}):a.push({kind:`add`,text:r[s++]});for(;o<n.length;)a.push({kind:`del`,text:n[o++]});for(;s<r.length;)a.push({kind:`add`,text:r[s++]});return a}function t2(e){let t=YB(e).toJS(),n=new Map;for(let r of kV(e).nodes){let{kind:e,path:i,stage:a,occurrence:o}=r.data;if(r.type!==`step`||e!==`step`||!i||a===void 0)continue;let s=t;for(let e of i)s=s?.[e];n.set(`${a}#${o??0}`,{node:r.id,signature:JSON.stringify(s??null)})}return n}function n2(e,t,n){let r=t2(e),i=t2(t),a={};for(let[e,t]of r){let r=i.get(e);r?r.signature!==t.signature&&(a[t.node]=`changed`):a[t.node]=n}return a}var r2={class:`grid h-[calc(100dvh-17rem)] min-h-[26rem] grid-cols-[18rem_1fr] gap-3`},i2={class:`min-h-0 divide-y divide-border overflow-y-auto rounded-lg border border-border`,"aria-label":`Revisions`},a2=[`aria-current`,`onClick`],o2={class:`flex items-center gap-2 text-sm`},s2={class:`font-mono text-xs text-fg-subtle`},c2=[`title`],l2={key:0,class:`px-3 py-2 text-sm text-muted-foreground`},u2={key:0,class:`flex min-h-0 flex-col gap-2`},d2={class:`flex items-center gap-2`},f2={class:`text-xs text-muted-foreground`},p2={key:0,class:`rounded-lg border border-border p-4 text-sm text-muted-foreground`},m2={key:1,class:`min-h-0 flex-1 overflow-auto rounded-lg border border-border py-2 font-mono text-[13px] leading-6`},h2={class:`inline-block w-4 select-none text-fg-subtle`},g2={key:2,class:`grid min-h-0 flex-1 grid-cols-2 gap-3`},_2={class:`flex min-h-0 flex-col gap-1`},v2={class:`text-xs font-medium text-muted-foreground`},y2={class:`min-h-0 flex-1`},b2={class:`flex min-h-0 flex-col gap-1`},x2={class:`min-h-0 flex-1`},S2=k({__name:`WorkflowHistory`,props:it({revisions:{},current:{},error:{}},{selected:{default:0},selectedModifiers:{},mode:{default:`yaml`},modeModifiers:{}}),emits:it([`restore`],[`update:selected`,`update:mode`]),setup(e,{emit:t}){let n=e,r=t,i=Fe(e,`selected`),a=Fe(e,`mode`);F(()=>n.revisions,e=>{e.some(e=>e.version===i.value)||(i.value=(e.find(e=>e.yaml!==n.current)??e[0])?.version??0)},{immediate:!0});let o=I(()=>n.revisions.find(e=>e.version===i.value)),s=I(()=>o.value?.yaml??null),c=I(()=>s.value===null?[]:e2(s.value,n.current)),l=I(()=>s.value!==null&&s.value===n.current),u=I(()=>s.value===null?{}:n2(s.value,n.current,`removed`)),d=I(()=>s.value===null?{}:n2(n.current,s.value,`added`)),f={added:`default`,edited:`secondary`,removed:`destructive`};return(t,n)=>(R(),G(`div`,r2,[W(`ol`,i2,[(R(!0),G(H,null,K(e.revisions,e=>(R(),G(`li`,{key:e.version},[W(`button`,{type:`button`,class:N([`block w-full px-3 py-2 text-left hover:bg-secondary`,e.version===i.value&&`bg-secondary`]),"aria-current":e.version===i.value,onClick:t=>i.value=e.version},[W(`span`,o2,[W(`span`,s2,`v`+V(e.version),1),M(z(At),{variant:f[e.change]},{default:j(()=>[A(V(e.change),1)]),_:2},1032,[`variant`])]),W(`span`,{class:`mt-0.5 block truncate text-xs text-muted-foreground`,title:e.at},V(e.actor||`unknown`)+` · `+V(e.source||`unknown`)+` · `+V(z(Ng)(e.at)),9,c2)],10,a2)]))),128)),e.revisions.length?L(``,!0):(R(),G(`li`,l2,V(e.error||`No recorded changes`),1))]),o.value?(R(),G(`div`,u2,[W(`div`,d2,[M(z(eb),{modelValue:a.value,"onUpdate:modelValue":n[0]||=e=>a.value=e},{default:j(()=>[M(z(nb),null,{default:j(()=>[M(z(rb),{value:`yaml`},{default:j(()=>[...n[2]||=[A(`YAML`,-1)]]),_:1}),M(z(rb),{value:`canvas`},{default:j(()=>[...n[3]||=[A(`Canvas`,-1)]]),_:1})]),_:1})]),_:1},8,[`modelValue`]),W(`span`,f2,V(l.value?`Same as the current definition`:`Compared with the current definition`),1),M(z(Y),{type:`button`,size:`sm`,variant:`outline`,class:`ml-auto`,disabled:s.value===null||l.value,title:s.value===null?`Workflow removed`:void 0,onClick:n[1]||=e=>r(`restore`,s.value)},{default:j(()=>[M(z(jn),{"data-icon":`inline-start`}),n[4]||=A(` Restore this version`,-1)]),_:1},8,[`disabled`,`title`])]),s.value===null?(R(),G(`p`,p2,`Workflow removed in this revision.`)):a.value===`yaml`?(R(),G(`pre`,m2,[W(`code`,null,[(R(!0),G(H,null,K(c.value,(e,t)=>(R(),G(`span`,{key:t,class:N([`block min-h-6 px-3 whitespace-pre-wrap`,{"bg-ok/10":e.kind===`add`,"bg-danger/10 text-danger":e.kind===`del`}])},[W(`span`,h2,V(e.kind===`add`?`+`:e.kind===`del`?`-`:``),1),A(V(e.text),1)],2))),128))])])):(R(),G(`div`,g2,[W(`div`,_2,[W(`span`,v2,`v`+V(o.value.version),1),W(`div`,y2,[M(X0,{yaml:s.value,marks:u.value},null,8,[`yaml`,`marks`])])]),W(`div`,b2,[n[5]||=W(`span`,{class:`text-xs font-medium text-muted-foreground`},`Current`,-1),W(`div`,x2,[M(X0,{yaml:e.current,marks:d.value},null,8,[`yaml`,`marks`])])])]))])):L(``,!0)]))}}),C2=`workflow-definitions`;function w2(e){let t=me(),n=J([]),r=J(``);async function i(){try{n.value=await t.history(C2),r.value=``} Line truncated
+21 -22
View File
@@ -58,7 +58,7 @@ const routes = [
component: TasksPage,
meta: {
label: "Tasks",
description: "Issues Archie has picked up, and where each one stands.",
description: "Picked-up issues and their status.",
},
},
{
@@ -73,7 +73,7 @@ const routes = [
component: WorkflowsPage,
meta: {
label: "Workflows",
description: "The routed workflows and their run history.",
description: "Workflows and run history.",
section: "workflows",
},
},
@@ -85,7 +85,7 @@ const routes = [
navPath: "/settings",
settings: true,
label: "Skills",
description: "The SKILL.md capabilities Archie can activate.",
description: "Skills Archie can activate.",
section: "skills",
},
},
@@ -97,7 +97,7 @@ const routes = [
navPath: "/settings",
settings: true,
label: "Curators",
description: "Scheduled passes that curate Archie's memory and captures.",
description: "Scheduled memory and capture curation.",
section: "curators",
},
},
@@ -108,7 +108,7 @@ const routes = [
meta: {
label: "Events",
description:
"Captured inbound events, how their fields map, and which workflow they start.",
"Captured events, field mappings, workflow bindings.",
},
},
{
@@ -130,7 +130,7 @@ const routes = [
component: LogsPage,
meta: {
label: "Logs",
description: "The daemon log stream, filterable by level and component.",
description: "Daemon log by level and component.",
section: "logs",
},
},
@@ -152,7 +152,7 @@ const routes = [
navPath: "/settings",
settings: true,
label: "Task execution",
description: "Work lifecycle: statuses, operator actions, and budgets.",
description: "Statuses, operator actions, budgets.",
section: "settings",
},
},
@@ -164,7 +164,7 @@ const routes = [
navPath: "/settings",
settings: true,
label: "Models",
description: "Model roles and the providers backing them.",
description: "Model aliases and providers.",
section: "settings",
},
},
@@ -177,7 +177,7 @@ const routes = [
settings: true,
label: "Repositories",
description:
"Repositories Archie watches, and their per-repo gate overrides.",
"Watched repositories and gate overrides.",
section: "settings",
},
},
@@ -239,7 +239,7 @@ const routes = [
navPath: "/settings",
settings: true,
label: "Channels",
description: "Inbound chat and notification channels, and their state.",
description: "Chat and notification channels.",
section: "channels",
},
},
@@ -251,7 +251,7 @@ const routes = [
navPath: "/settings",
settings: true,
label: "Personas",
description: "The system prompts chat runs under, and the default.",
description: "Chat system prompts and the default.",
section: "settings",
},
},
@@ -263,7 +263,7 @@ const routes = [
navPath: "/settings",
settings: true,
label: "SOUL",
description: "Archie's user-authored identity and tone.",
description: "Archie's identity and tone.",
section: "settings",
},
},
@@ -275,7 +275,7 @@ const routes = [
navPath: "/settings",
settings: true,
label: "Schedules",
description: "Work Archie starts on its own, on a timetable.",
description: "Timetabled work.",
section: "settings",
},
},
@@ -287,7 +287,7 @@ const routes = [
navPath: "/settings",
settings: true,
label: "Scheduling policy",
description: "How Archie finds work and labels its state on the forge.",
description: "Work discovery and forge labels.",
section: "settings",
},
},
@@ -299,7 +299,7 @@ const routes = [
navPath: "/settings",
settings: true,
label: "Review",
description: "How Archie reviews pull requests: precision filtering and operator approval before posting.",
description: "Pull request review: precision filter and approval.",
section: "settings",
},
},
@@ -311,7 +311,7 @@ const routes = [
navPath: "/settings",
settings: true,
label: "Tools & MCP",
description: "The tools agents can call, and the MCP servers that add more.",
description: "Agent tools and MCP servers.",
section: "settings",
},
},
@@ -323,7 +323,7 @@ const routes = [
navPath: "/settings",
settings: true,
label: "Extensions",
description: "Installed extensions and their grants.",
description: "Installed extensions and grants.",
section: "settings",
},
},
@@ -335,7 +335,7 @@ const routes = [
navPath: "/settings",
settings: true,
label: "Plugins",
description: "Where extension directories are loaded from.",
description: "Extension directories loaded at startup.",
section: "settings",
},
},
@@ -343,7 +343,7 @@ const routes = [
path: "/settings/secret-engines",
name: "settings-secret-engines",
component: SecretEnginesPage,
meta: { navPath: "/settings", settings: true, label: "Secret engines", description: "Available secret engines.", section: "settings" },
meta: { navPath: "/settings", settings: true, label: "Secret engines", section: "settings" },
},
{
path: "/settings/container-runtime",
@@ -353,7 +353,6 @@ const routes = [
navPath: "/settings",
settings: true,
label: "Container runtime",
description: "The containers agents run in.",
section: "settings",
},
},
@@ -384,7 +383,7 @@ const routes = [
navPath: "/settings",
settings: true,
label: "Harness",
description: "OAuth credential bindings and the Kit setup terminal.",
description: "OAuth credential bindings and setup terminal.",
section: "settings",
},
},
@@ -396,7 +395,7 @@ const routes = [
navPath: "/settings",
settings: true,
label: "History",
description: "Every settings change: who made it, when, and what it was before.",
description: "Settings changes: who, when, previous value.",
section: "settings",
},
},
+1 -1
View File
@@ -95,7 +95,7 @@ const pullPolicy = computed({
<DraftHint :kind="KIND" path="max_uptime" />
</div>
</SettingRow>
<SettingRow label="Volume retention" for="cr-ttl" hint="Volume retention.">
<SettingRow label="Volume retention" for="cr-ttl">
<div class="flex flex-wrap items-center gap-3">
<DurationInput id="cr-ttl" v-model="runtime.volume_ttl" :units="['h']" />
<DraftHint :kind="KIND" path="volume_ttl" />
+1 -1
View File
@@ -104,7 +104,7 @@ async function save() {
<p
v-if="needsRestart"
class="rounded-md border border-warn/40 bg-warn-soft px-3 py-2 text-sm text-warn"
>Some changes apply after restart.</p>
>Restart required for some changes.</p>
<p
v-if="invalid.length"
class="rounded-md border border-danger/40 bg-danger-soft px-3 py-2 text-sm text-danger"
+1 -1
View File
@@ -153,7 +153,7 @@ const eyebrow = "mb-1 text-[11px] font-medium tracking-[0.06em] text-fg-subtle u
</SettingRow>
<SettingRow
label="Allow private networks"
hint="Reaches this host's dashboard and Docker API."
hint="Host dashboard and Docker API access."
:tone="tools.web_fetch.allow_private_networks ? 'danger' : 'default'"
>
<div class="flex flex-wrap items-center gap-3">
+1 -1
View File
@@ -38,7 +38,7 @@ const nothingRecorded = computed(
<PanelError
v-else-if="state === null"
title="Could not load this attempt's changed files"
detail="archied did not answer for this attempt. Live updates will try again when the daemon reconnects."
detail="No response. Retries on reconnect."
/>
<Empty v-else-if="undecodable">
+1 -1
View File
@@ -34,7 +34,7 @@ async function copy(): Promise<void> {
size="icon-sm"
class="absolute top-2 right-2 z-10 opacity-0 focus-visible:opacity-100 group-hover/json:opacity-100 group-focus-within/json:opacity-100"
:aria-label="copyError ? 'Copy failed. Retry copying output' : copied ? 'Copied output' : 'Copy output'"
:title="copyError ? 'Could not copy output. Click to retry.' : copied ? 'Copied' : 'Copy output'"
:title="copyError ? 'Copy failed. Retry.' : copied ? 'Copied' : 'Copy output'"
@click="copy"
>
<TriangleAlert v-if="copyError" class="size-4 text-danger" />
+2 -2
View File
@@ -100,7 +100,7 @@ const startedAt = computed(() => {
<PanelError
v-else-if="state === null"
title="Could not load this task's attempts"
detail="archied did not answer for this task's run history. Live updates will try again when the daemon reconnects."
detail="No response. Retries on reconnect."
/>
<template v-else>
<Empty v-if="!attempts.length">
@@ -113,7 +113,7 @@ const startedAt = computed(() => {
<EmptyHeader>
<EmptyTitle>Attempt {{ run.attemptNumber }} is not recorded</EmptyTitle>
<EmptyDescription
>This task recorded attempt
>Recorded attempts:
{{ attempts.map((a) => a.attempt).join(", ") }}.</EmptyDescription
>
</EmptyHeader>
+2 -2
View File
@@ -358,7 +358,7 @@ function requestFromMenu(id: string) {
</DialogHeader>
<div class="flex flex-col gap-2">
<Label for="review-instructions"
>What should the reviewers focus on?</Label
>Review focus</Label
>
<Textarea
id="review-instructions"
@@ -389,7 +389,7 @@ function requestFromMenu(id: string) {
<DialogContent class="sm:max-w-lg">
<DialogHeader>
<DialogTitle>Retry this task?</DialogTitle>
<DialogDescription>Choose where the retry starts.</DialogDescription>
<DialogDescription>Retry from</DialogDescription>
</DialogHeader>
<RadioGroupRoot
v-model="retryMode"
+1 -1
View File
@@ -41,7 +41,7 @@ const rows = computed(() => failingStages(props.stages));
<EmptyHeader>
<EmptyTitle>No failures recorded</EmptyTitle>
<EmptyDescription
>Every stage has completed cleanly so far.</EmptyDescription
>No failures.</EmptyDescription
>
</EmptyHeader>
</Empty>
+2 -2
View File
@@ -130,7 +130,7 @@ const scopedLogs = computed(() => logs.value ? { ...logs.value, entries: (logs.v
<p v-else-if="group.agents.length" class="text-xs text-muted-foreground">{{ group.agents.reduce((sum, agent) => sum + agent.tokens_used, 0).toLocaleString() }} tokens recorded</p>
</section>
<section v-if="suppressed.length" class="space-y-1">
<h3 class="text-xs font-medium text-muted-foreground" title="This was a test run, so these writes were skipped">Skipped in test run</h3>
<h3 class="text-xs font-medium text-muted-foreground">Skipped in test run</h3>
<ul class="divide-y divide-border rounded-md border border-border">
<li v-for="(event, i) in suppressed" :key="i" class="px-3 py-2 text-xs break-words whitespace-pre-wrap">{{ event.detail }}</li>
</ul>
@@ -141,7 +141,7 @@ const scopedLogs = computed(() => logs.value ? { ...logs.value, entries: (logs.v
<ChangeCapture v-for="(capture, i) in captures" :key="i" :capture="capture" :task="task" />
</section>
<section class="space-y-2">
<h3 class="text-xs font-medium text-muted-foreground">Log <span title="Only lines tagged with this stage are shown">· stage-tagged lines</span></h3>
<h3 class="text-xs font-medium text-muted-foreground">Log <span>· stage-tagged lines</span></h3>
<TaskLogs :state="scopedLogs" :attempt="attempt" :filterable="false" />
</section>
</div>
+1 -1
View File
@@ -57,7 +57,7 @@ const CHANGE_VARIANTS = { added: "default", edited: "secondary", removed: "destr
<div class="flex items-center gap-2">
<Tabs v-model="mode"><TabsList><TabsTrigger value="yaml">YAML</TabsTrigger><TabsTrigger value="canvas">Canvas</TabsTrigger></TabsList></Tabs>
<span class="text-xs text-muted-foreground">{{ identical ? "Same as the current definition" : "Compared with the current definition" }}</span>
<Button type="button" size="sm" variant="outline" class="ml-auto" :disabled="then === null || identical" :title="then === null ? 'This revision removed the workflow' : undefined" @click="emit('restore', then!)">
<Button type="button" size="sm" variant="outline" class="ml-auto" :disabled="then === null || identical" :title="then === null ? 'Workflow removed' : undefined" @click="emit('restore', then!)">
<RotateCcw data-icon="inline-start" /> Restore this version</Button>
</div>
<p v-if="then === null" class="rounded-lg border border-border p-4 text-sm text-muted-foreground">Workflow removed in this revision.</p>
+2 -2
View File
@@ -178,11 +178,11 @@ function setNeeds(next: { captures?: boolean; gate_retries?: number }): void {
<div class="text-xs font-medium text-muted-foreground">Run needs</div>
<div class="divide-y divide-border rounded-md border border-border">
<label class="flex min-h-10 items-center gap-3 px-3 py-1.5">
<span class="flex-1 text-[13px]" title="A stage returns structured output through capture tools.">Captures</span>
<span class="flex-1 text-[13px]">Captures</span>
<Switch :model-value="needs.captures === true" @update:model-value="setNeeds({ ...needs, captures: $event || undefined })" />
</label>
<label class="flex min-h-10 items-center gap-3 px-3 py-1.5">
<span class="flex-1 text-[13px]" title="The largest gate-retry budget any stage declares.">Gate retries</span>
<span class="flex-1 text-[13px]">Gate retries</span>
<Input
type="number"
min="0"