@specship/specship-win32-arm64 0.11.7 → 0.11.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/lib/dist/bin/specship.js +7 -7
  2. package/lib/dist/bin/specship.js.map +1 -1
  3. package/lib/dist/commands/{ss-design-implement.md → specship/design-implement.md} +5 -5
  4. package/lib/dist/commands/{ss-design-loop.md → specship/design-loop.md} +6 -6
  5. package/lib/dist/commands/{ss-spec.md → specship/spec.md} +4 -4
  6. package/lib/dist/index.d.ts +1 -1
  7. package/lib/dist/index.js +1 -1
  8. package/lib/dist/installer/instructions-template.js +3 -3
  9. package/lib/dist/installer/instructions-template.js.map +1 -1
  10. package/lib/dist/installer/targets/claude.d.ts +6 -4
  11. package/lib/dist/installer/targets/claude.d.ts.map +1 -1
  12. package/lib/dist/installer/targets/claude.js +69 -17
  13. package/lib/dist/installer/targets/claude.js.map +1 -1
  14. package/lib/dist/mcp/designer-tools.js +1 -1
  15. package/lib/dist/mcp/designer-tools.js.map +1 -1
  16. package/lib/dist/mcp/spec-tools.js +3 -3
  17. package/lib/dist/mcp/spec-tools.js.map +1 -1
  18. package/lib/dist/resolution/domain-gap-seed.d.ts +1 -1
  19. package/lib/dist/resolution/domain-gap-seed.js +1 -1
  20. package/lib/dist/server/chat/classify.js +28 -8
  21. package/lib/dist/server/routes/chat-answer.js +11 -0
  22. package/lib/dist/web/chunk-H723TYYD.js +2 -0
  23. package/lib/dist/web/chunk-HSJNHNOH.js +6 -0
  24. package/lib/dist/web/chunk-KYSTCHAH.js +1 -0
  25. package/lib/dist/web/{chunk-HPKNOV45.js → chunk-OTQR5VFM.js} +1 -1
  26. package/lib/dist/web/chunk-PS6HRYQQ.js +3 -0
  27. package/lib/dist/web/index.html +1 -1
  28. package/lib/dist/web/{main-5B4RR3BC.js → main-FY3HQ4PX.js} +1 -1
  29. package/lib/dist/workflows/defaults/claude-design-implement.yaml +5 -5
  30. package/lib/dist/workflows/defaults/spec-author.yaml +1 -1
  31. package/lib/node_modules/.package-lock.json +1 -1
  32. package/lib/package.json +1 -1
  33. package/package.json +1 -1
  34. package/lib/dist/web/chunk-LIFS4XH2.js +0 -6
  35. package/lib/dist/web/chunk-MADMRWIK.js +0 -3
  36. package/lib/dist/web/chunk-N5WSFE4J.js +0 -2
  37. package/lib/dist/web/chunk-UYOKO7C5.js +0 -1
  38. /package/lib/dist/commands/{ss-check.md → specship/check.md} +0 -0
  39. /package/lib/dist/commands/{ss-explore.md → specship/explore.md} +0 -0
@@ -22,6 +22,24 @@
22
22
  * identical to what the search path expects.
23
23
  */
24
24
  import { extractSubject } from '../routes/chat-answer.js';
25
+ /**
26
+ * Slash-command → intent routing table (CMD-NS-DOC, REQ-CMD-NS-005). Each door
27
+ * is reachable by three tokens: the canonical `/specship:*` namespace form, the
28
+ * legacy flat `/ss-*` form (kept as a deprecation alias), and the bare verb.
29
+ * The check family routes to `drift` — the launch set has no separate
30
+ * gate/health intent. Keys are lowercased to match `cmd`.
31
+ */
32
+ const SLASH_ROUTES = {
33
+ 'specship:spec': 'spec', 'ss-spec': 'spec', spec: 'spec',
34
+ 'specship:explore': 'explore', 'ss-explore': 'explore', explore: 'explore',
35
+ 'specship:check': 'drift', 'ss-check': 'drift', check: 'drift',
36
+ };
37
+ /** Legacy `/ss-*` slash forms → the canonical `/specship:*` command they were renamed to. */
38
+ const RENAMED_SLASH = {
39
+ 'ss-spec': '/specship:spec',
40
+ 'ss-explore': '/specship:explore',
41
+ 'ss-check': '/specship:check',
42
+ };
25
43
  /** A spec-id-shaped token — `REQ-DASH-CHAT-002`, `DOMAIN-LEDGER`, `DASH-CHAT-DOC`. */
26
44
  const SPEC_ID = /\b[A-Za-z][A-Za-z0-9]*(?:-[A-Za-z0-9]+)+\b/;
27
45
  /**
@@ -56,14 +74,16 @@ export function classifyIntent(message) {
56
74
  if (slash) {
57
75
  const cmd = (slash[1] ?? '').toLowerCase();
58
76
  const rest = (slash[2] ?? '').trim();
59
- if (cmd === 'ss-spec' || cmd === 'spec') {
60
- return { intent: 'spec', query: rest, subject: rest || undefined, confident: true };
61
- }
62
- if (cmd === 'ss-explore' || cmd === 'explore') {
63
- return { intent: 'explore', query: rest, subject: rest || undefined, confident: true };
64
- }
65
- if (cmd === 'ss-check' || cmd === 'check') {
66
- return { intent: 'drift', query: rest, subject: rest || undefined, confident: true };
77
+ const routed = SLASH_ROUTES[cmd];
78
+ if (routed) {
79
+ const result = {
80
+ intent: routed, query: rest, subject: rest || undefined, confident: true,
81
+ };
82
+ // Legacy `/ss-*` form → flag it so the answer nudges toward `/specship:*`.
83
+ const renamedTo = RENAMED_SLASH[cmd];
84
+ if (renamedTo)
85
+ result.deprecatedAlias = { from: `/${cmd}`, to: renamedTo };
86
+ return result;
67
87
  }
68
88
  // Unknown slash command → fall through to keyword matching on the subject
69
89
  // (extractSubject has already stripped the leading slash token).
@@ -315,6 +315,17 @@ export function chunkAnswer(answer) {
315
315
  * `ChatSource` (A1) and every result set is stable-sorted (A3).
316
316
  */
317
317
  export function answerForIntent(cg, classified, detailCap = DETAIL_CAP) {
318
+ const base = dispatchIntent(cg, classified, detailCap);
319
+ // Deprecation nudge (CMD-NS-DOC, REQ-CMD-NS-005): a legacy `/ss-*` form still
320
+ // routes, but the answer names the `/specship:*` command it was renamed to.
321
+ if (classified.deprecatedAlias) {
322
+ const { from, to } = classified.deprecatedAlias;
323
+ return { ...base, answer: `Note: \`${from}\` was renamed to \`${to}\`.\n\n${base.answer}` };
324
+ }
325
+ return base;
326
+ }
327
+ /** The intent→query dispatch (see `answerForIntent`, which wraps this). */
328
+ function dispatchIntent(cg, classified, detailCap = DETAIL_CAP) {
318
329
  const query = classified.query.trim();
319
330
  switch (classified.intent) {
320
331
  case 'callers':
@@ -0,0 +1,2 @@
1
+ import{a as K,b as J,c as X}from"./chunk-7656MA24.js";import{a as W}from"./chunk-P62EJGSF.js";import{a as q}from"./chunk-YNYVOPWF.js";import{a as U}from"./chunk-5NTGUSXJ.js";import{a as Z}from"./chunk-QIZ65CGB.js";import{a as Q}from"./chunk-IOB4JJT4.js";import{c as V,d as j}from"./chunk-DOKZOFKM.js";import{a as H,c as _}from"./chunk-DTWIJ3GJ.js";import{a as A}from"./chunk-JGDK6YKG.js";import{a as L}from"./chunk-TWVVIWKO.js";import{Aa as l,Ga as T,I as E,Ia as b,Ka as c,M as C,N as y,Ta as w,Ua as M,Va as s,W as R,Wa as x,Xa as v,Ya as O,bb as N,ea as r,gb as z,ib as I,ka as $,lb as m,qa as G,ra as u,sa as g,ua as D,va as S,vb as B,wa as k,xa as p,ya as a,za as o,zb as Y}from"./chunk-SYGIPC2P.js";import"./chunk-Q7L6LLAK.js";var te=()=>[0,1,2,3],ne=()=>[0,1,2,3,4],F=(i,t)=>t.id;function ie(i,t){if(i&1&&s(0),i&2){let e=c();v(" ",e.fmt$(e.lastSessionCostStat().value)," ")}}function ae(i,t){i&1&&s(0," \xA0 ")}function oe(i,t){if(i&1&&l(0,"app-sparkline",11),i&2){let e=c();p("data",e.lastSessionCostStat().series)("width",64)("height",22)("fill",!0)}}function re(i,t){if(i&1&&l(0,"app-delta",12),i&2){let e=c();p("value",e.lastSessionCostStat().delta)("invert",!0)}}function se(i,t){if(i&1&&s(0),i&2){let e=c();v(" ",e.toolCallsStat().value.toLocaleString()," ")}}function le(i,t){i&1&&s(0," \xA0 ")}function de(i,t){if(i&1&&l(0,"app-sparkline",14),i&2){let e=c();p("data",e.toolCallsStat().series)("width",64)("height",22)("fill",!0)}}function pe(i,t){if(i&1&&l(0,"app-delta",12),i&2){let e=c();p("value",e.toolCallsStat().delta)("invert",!0)}}function ce(i,t){if(i&1&&s(0),i&2){let e=c();v(" ",e.subagentPctStat().value,"% ")}}function me(i,t){i&1&&s(0," \xA0 ")}function ue(i,t){if(i&1&&l(0,"app-sparkline",16),i&2){let e=c();p("data",e.subagentPctStat().series)("width",64)("height",22)("fill",!0)}}function ge(i,t){if(i&1&&l(0,"app-delta",12),i&2){let e=c();p("value",e.subagentPctStat().delta)("invert",!0)}}function he(i,t){if(i&1&&s(0),i&2){let e=c();v(" ",e.driftStat().value," ")}}function be(i,t){i&1&&s(0," \xA0 ")}function ve(i,t){if(i&1&&(a(0,"span",72),s(1),o()),i&2){let e=t.$implicit;r(),x(e)}}function xe(i,t){if(i&1){let e=T();a(0,"button",63),b("click",function(){let d=C(e).$implicit,h=c();return y(h.go(d.route))}),a(1,"div",64)(2,"span",65),l(3,"app-icon",66),o(),a(4,"div",67)(5,"div",68),s(6),o(),a(7,"code",69),s(8),o()()(),a(9,"div",70),s(10),o(),a(11,"div",71),S(12,ve,2,1,"span",72,D),o()()}if(i&2){let e=t.$implicit;G("aria-label",e.label+" door \u2014 "+e.cmd+". "+e.blurb),r(2),w("color",e.color)("background","color-mix(in srgb, "+e.color+" 14%, transparent)"),r(),p("name",e.icon)("size",15),r(3),v("",e.label," door"),r(),w("color",e.color),r(),x(e.cmd),r(2),x(e.blurb),r(2),k(e.subs)}}function _e(i,t){i&1&&(a(0,"span",32),s(1,"seed"),o())}function fe(i,t){if(i&1&&(a(0,"span",39),s(1),o()),i&2){let e=c();r(),v(" ",e.urgentTipCount()," urgent ")}}function Ce(i,t){i&1&&l(0,"div",73)}function ye(i,t){i&1&&S(0,Ce,1,0,"div",73,D),i&2&&k(N(0,te))}function Se(i,t){i&1&&(a(0,"div",42),s(1,"No tips yet. Run more sessions to populate."),o())}function ke(i,t){if(i&1&&(a(0,"code",80),s(1),o()),i&2){let e=c().$implicit;r(),x(e.fix)}}function we(i,t){if(i&1&&(a(0,"span",87),s(1),o()),i&2){let e=c().$implicit,n=c(2);w("color",n.tipSevColor(e.severity)),r(),x(e.saving)}}function Me(i,t){if(i&1){let e=T();a(0,"div",75)(1,"div",76),l(2,"app-icon",66),o(),a(3,"div",77)(4,"div",78),s(5),o(),a(6,"div",79),u(7,ke,2,1,"code",80),l(8,"span",81),u(9,we,2,3,"span",82),o()(),a(10,"div",83)(11,"button",84),b("click",function(){C(e);let d=c(2);return y(d.go("tips"))}),s(12,"Apply"),o(),a(13,"button",85),b("click",function(){let d=C(e).$implicit,h=c(2);return y(h.dismissTip(d.id))}),l(14,"app-icon",86),o()()()}if(i&2){let e=t.$implicit,n=c(2);w("border-left-color",n.tipSevColor(e.severity)),r(),w("color",n.tipSevColor(e.severity)),r(),p("name",n.tipIcon(e))("size",14),r(3),x(e.title),r(2),g(e.fix?7:-1),r(2),g(e.saving?9:-1),r(5),p("size",12)}}function Pe(i,t){if(i&1&&S(0,Me,15,10,"div",74,F),i&2){let e=c();k(e.visibleTips())}}function Ee(i,t){i&1&&l(0,"div",47)}function Te(i,t){i&1&&(a(0,"div",48),s(1," No tool calls in the selected window. "),o())}function De(i,t){if(i&1){let e=T();a(0,"app-treemap",88),b("pick",function(){C(e);let d=c();return y(d.go("heatmap"))}),o()}if(i&2){let e=c();p("items",e.treemapItems())("height",116)("selKey",null)}}function Oe(i,t){i&1&&l(0,"div",89)}function ze(i,t){i&1&&S(0,Oe,1,0,"div",89,D),i&2&&k(N(0,ne))}function Ie(i,t){i&1&&(a(0,"div",42),s(1,"No prompts ingested for this range."),o())}function Re(i,t){i&1&&l(0,"app-icon",94),i&2&&p("size",11)}function Ne(i,t){if(i&1){let e=T();a(0,"div",91),b("click",function(){C(e);let d=c(2);return y(d.go("sessions"))})("keydown.enter",function(){C(e);let d=c(2);return y(d.go("sessions"))})("keydown.space",function(){C(e);let d=c(2);return y(d.go("sessions"))}),a(1,"div",92)(2,"div",93),u(3,Re,1,1,"app-icon",94),s(4),o(),a(5,"div",95),l(6,"app-bar",96),o()(),a(7,"div",97)(8,"div",98),s(9),o(),a(10,"div",99),s(11),z(12,"number"),o()()()}if(i&2){let e=t.$implicit,n=c(2);r(3),g(e.is_sidechain?3:-1),r(),v(" ",e.text||"(no text)"," "),r(2),p("frac",n.promptFrac(e.cost_usd))("color",n.promptBarColor(e.cost_usd))("height",4),r(2),w("color",e.cost_usd/n.maxPromptCost()>.7?"var(--error)":"var(--text-primary)"),M("expensive",e.cost_usd/n.maxPromptCost()>.7),r(),v(" ",n.fmt$(e.cost_usd)," "),r(2),O(" ",n.fmtK(n.promptTotalTokens(e))," \xB7 ",I(12,12,n.promptCacheRate(e)*100,"1.0-0"),"% ")}}function Fe(i,t){if(i&1&&S(0,Ne,13,15,"div",90,F),i&2){let e=c();k(e.topPrompts())}}function $e(i,t){i&1&&l(0,"div",61)}function Ge(i,t){if(i&1&&(a(0,"div",100)(1,"div",101),s(2),z(3,"number"),o(),a(4,"div",102)(5,"div",23),s(6,"cache read rate"),o(),l(7,"app-delta",12),o()(),l(8,"div",103),a(9,"div",104)(10,"div",105)(11,"div",106),s(12,"Creation tokens"),o(),a(13,"div",107),s(14),o(),a(15,"div",108),s(16,"ephemeral"),o()(),a(17,"div",105)(18,"div",106),s(19,"Read tokens"),o(),a(20,"div",107),s(21),o(),a(22,"div",108),s(23,"charged at ~10%"),o()(),a(24,"div",105)(25,"div",106),s(26,"Saved this week"),o(),a(27,"div",109),s(28),o(),a(29,"div",108),s(30,"vs no cache"),o()(),a(31,"div",105)(32,"div",106),s(33,"WoW"),o(),a(34,"div",109),s(35),z(36,"number"),o(),a(37,"div",108),s(38,"more reuse"),o()()()),i&2){let e=c(),n=e.cache.state().data;r(2),v("",I(3,8,n.readRate*100,"1.0-0"),"%"),r(5),p("value",n.wowDelta)("invert",!1),r(7),x(e.fmtK(n.creationTokens)),r(7),x(e.fmtK(n.readTokens)),r(7),x(e.fmt$(n.dollarsSaved)),r(7),O(" ",n.wowDelta>=0?"+":"","",I(36,11,n.wowDelta*100,"1.0-0"),"% ")}}var ee=class i{api=E(L);router=E(V);projects=E(A);conn=E(H);range=R("week");rangeOptions=[{value:"today",label:"Today"},{value:"week",label:"This week"},{value:"month",label:"This month"},{value:"all",label:"All time"}];status=_(this.api,()=>`/api/status${this.projects.projectQuery()}`);miniGraphSearch=_(this.api,()=>`/api/graph/search?q=on&limit=18${this.projects.projectQuery("&")}`);tips=_(this.api,()=>"/api/claude/tips");heatmap=_(this.api,()=>`/api/claude/heatmap?range=${this.range()}`);costs=_(this.api,()=>`/api/claude/costs?range=${this.range()}`);cache=_(this.api,()=>`/api/claude/cache?range=${this.range()}`);sessions=_(this.api,()=>`/api/claude/sessions?range=${this.range()}&limit=10`);stats=_(this.api,()=>`/api/claude/stats?range=${this.range()}`);EMPTY_METRIC={value:0,delta:0,series:[]};lastSessionCostStat=m(()=>this.stats.state().data?.lastSessionCost??this.EMPTY_METRIC);toolCallsStat=m(()=>this.stats.state().data?.toolCalls??this.EMPTY_METRIC);subagentPctStat=m(()=>this.stats.state().data?.subagentPct??this.EMPTY_METRIC);driftStat=m(()=>this.stats.state().data?.drift??this.EMPTY_METRIC);lastSession=m(()=>(this.sessions.state().data?.sessions??[])[0]??null);lastSessionCost=m(()=>this.lastSession()?.total_cost_usd??0);toolCallCount=m(()=>(this.heatmap.state().data?.tools??[]).reduce((e,n)=>e+(n.calls??0),0));subagentShare=m(()=>{let t=this.heatmap.state().data?.subagents??[],e=t.find(f=>f.type==="subagent"),n=t.find(f=>f.type==="main"),d=e?.cost??0,h=n?.cost??0,P=d+h;return P>0?Math.round(d/P*100):0});driftCount=m(()=>this.status.state().data?.drift??0);nodeCountLabel=m(()=>this.status.state().data?.nodeCount??0);urgentTipCount=m(()=>(this.tips.state().data?.tips??[]).filter(e=>e.severity==="error").length);dismissedTips=R(new Set);dismissTip(t){this.dismissedTips.update(e=>{let n=new Set(e);return n.add(t),n})}isTipDismissed(t){return this.dismissedTips().has(t)}visibleTips=m(()=>{let t=this.dismissedTips();return(this.tips.state().data?.tips??[]).filter(e=>!t.has(e.id)).slice(0,4)});treemapItems=m(()=>{let t=(this.heatmap.state().data?.files??[]).slice(0,30);if(!t.length)return[];let e=Math.max(1,...t.map(n=>n.resultBytes&&n.calls?n.resultBytes/n.calls:0));return t.map(n=>{let d=n.calls>0?n.resultBytes/n.calls:0,h=Math.min(1,d/e);return{key:n.path,label:K(n.path),value:n.calls,intensity:h,sub:n.calls+" calls",title:`${n.path}
2
+ ${n.calls} calls \xB7 ${this.fmtK(Math.round(d))}/call`}})});topPrompts=m(()=>(this.costs.state().data?.topPrompts??[]).slice(0,8));maxPromptCost=m(()=>Math.max(.01,...this.topPrompts().map(t=>t.cost_usd??0)));rangeTotal=m(()=>(this.costs.state().data?.series??[]).reduce((e,n)=>e+(n.cost??0),0));liveSource=m(()=>this.conn.online()?"live":"offline");miniGraphSource=m(()=>(this.miniGraphSearch.state().data?.results?.length??0)>0?"api":"seed");miniGraphNodes=m(()=>{let t=this.miniGraphSearch.state().data?.results??[];return t.length>0?je(t.slice(0,18).map(e=>({id:e.node.id,label:e.node.name,sub:e.node.filePath?.split("/").slice(-2).join("/"),kind:e.node.kind}))):Be});miniGraphEdges=m(()=>{if(this.miniGraphSource()==="api"){let t=this.miniGraphNodes(),e=[];for(let n=1;n<t.length;n++){let d=t[Math.floor(Math.random()*n)],h=t[n];d&&h&&e.push({from:d.id,to:h.id,kind:"calls"})}return e}return Ve});onMiniGraphPick(t){this.router.navigate(["/graph"],{queryParams:{focus:t}})}doors=[{id:"intent",label:"Intent",cmd:"/specship:spec",icon:"book",color:"var(--node-spec)",route:"specs",blurb:"View, author, implement, review, or extend a spec \u2014 the whole lifecycle.",subs:["new","fast","implement","review","triage","behaviour","domain"]},{id:"reads",label:"Reads",cmd:"/specship:explore",icon:"search",color:"var(--accent)",route:"graph",blurb:"Explore an area, trace a flow, or get a change\u2019s blast radius.",subs:["explore","flow","impact"]},{id:"gate",label:"Gate & health",cmd:"/specship:check",icon:"check",color:"var(--warn)",route:"drift",blurb:"Run the enforcement gate, review drift, repair links, or see code-health.",subs:["gate","drifted","fix","relink","health"]}];setRange(t){this.range.set(t)}go(t){this.router.navigate(["/"+t])}fmt$(t){return"$"+t.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})}fmtK(t){return t>=1e6?(t/1e6).toFixed(1)+"M":t>=1e3?(t/1e3).toFixed(t>=1e4?0:1)+"k":String(t)}promptCacheRate(t){let e=(t.input_tokens??0)+(t.cache_creation_tokens??0)+(t.cache_read_tokens??0);return e>0?(t.cache_read_tokens??0)/e:0}promptTotalTokens(t){return(t.input_tokens??0)+(t.output_tokens??0)+(t.cache_creation_tokens??0)+(t.cache_read_tokens??0)}promptBarColor(t){return t/this.maxPromptCost()>.7?"var(--error)":"var(--accent)"}promptFrac(t){return Math.max(0,Math.min(1,t/this.maxPromptCost()))}tipSevColor(t){return t==="error"?"var(--error)":t==="warn"?"var(--warn)":"var(--info)"}tipIcon(t){return t.icon?t.icon:t.severity==="error"?"cancel":t.severity==="warn"?"warn":"info"}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=$({type:i,selectors:[["app-dashboard"]],decls:133,vars:49,consts:[[1,"scroll-y","dashboard"],["icon","dashboard","title","Dashboard",3,"sub"],["actions",""],["size","sm",3,"change","options","value"],[1,"stat-grid"],["type","button",1,"stat-tile",3,"click"],[1,"row","gap-8","stat-eyebrow"],["name","coins",2,"color","var(--accent)",3,"size"],[1,"eyebrow",2,"letter-spacing","0.04em"],[1,"row","stat-value-row"],[1,"stat-value","tabular"],["color","var(--accent)",3,"data","width","height","fill"],[3,"value","invert"],["name","wrench",2,"color","var(--node-spec)",3,"size"],["color","var(--node-spec)",3,"data","width","height","fill"],["name","bot",2,"color","var(--node-code)",3,"size"],["color","var(--node-code)",3,"data","width","height","fill"],["name","drift",2,"color","var(--warn)",3,"size"],[1,"card","card-pad","doors-card"],[1,"row","doors-head"],[1,"row","gap-8"],["name","command",2,"color","var(--node-spec)",3,"size"],[2,"font-weight","600","font-size","12.5px"],[1,"muted",2,"font-size","11px"],[1,"doors-grid"],["type","button",1,"door-tile"],[1,"center-grid"],[1,"card","graph-card"],[1,"card-head"],[1,"card-title","row","gap-8"],["name","graph",2,"color","var(--accent)",3,"size"],[1,"muted",2,"font-size","11px","font-weight","400"],["title","No graph data yet \u2014 illustrative",1,"pill","seed-pill"],["routerLink","/graph",1,"btn","btn-ghost","btn-xs"],["name","arrowRight",3,"size"],[1,"mini-graph"],[3,"nodeClick","nodes","edges"],[1,"card","tips-card"],["name","tips",2,"color","var(--warn)",3,"size"],[1,"pill",2,"font-size","10px","background","var(--error-soft)","color","var(--error)"],["routerLink","/tips",1,"btn","btn-ghost","btn-xs"],[1,"scroll-y","tips-body"],[1,"tip-empty"],[1,"card","card-pad","heatmap-card"],[1,"row","heatmap-head"],["name","flame",2,"color","var(--warn)",3,"size"],["routerLink","/heatmap",1,"btn","btn-ghost","btn-xs"],[1,"skel",2,"height","116px","border-radius","7px"],[1,"tip-empty",2,"height","116px","display","grid","place-items","center"],[3,"items","height","selKey"],[1,"row","gap-10","heatmap-legend"],[1,"muted",2,"font-size","10px"],[1,"heatmap-gradient"],[1,"muted",2,"font-size","9.5px"],[1,"bottom-grid"],[1,"card","card-pad","prompts-card"],[1,"row","prompts-head"],["routerLink","/costs",1,"btn","btn-ghost","btn-xs"],[1,"col"],[1,"card","card-pad","cache-card"],["name","database",2,"color","var(--node-route)",3,"size"],[1,"skel",2,"height","70px","border-radius","5px"],[1,"dash-footer","mono","muted"],["type","button",1,"door-tile",3,"click"],[1,"row","door-top"],[1,"door-ic"],[3,"name","size"],[1,"door-titles"],[1,"door-label"],[1,"mono","door-cmd"],[1,"door-blurb"],[1,"door-subs"],[1,"door-sub"],[1,"skel",2,"height","64px","border-radius","8px"],[1,"tip-row",3,"border-left-color"],[1,"tip-row"],[1,"tip-sev-icon"],[1,"grow","tip-body-col",2,"min-width","0"],[1,"tip-title"],[1,"row","gap-8","tip-meta-row"],[1,"mono","tip-fix"],[1,"grow"],[1,"pill",2,"font-size","10px","color","inherit","background","transparent",3,"color"],[1,"row","gap-4",2,"flex-shrink","0"],["type","button",1,"btn","btn-secondary","btn-xs",3,"click"],["type","button","title","Dismiss",1,"btn","btn-ghost","btn-xs",3,"click"],["name","x",3,"size"],[1,"pill",2,"font-size","10px","color","inherit","background","transparent"],[3,"pick","items","height","selKey"],[1,"skel",2,"height","26px","margin","4px 0","border-radius","4px"],["role","button","tabindex","0",1,"prompt-row"],["role","button","tabindex","0",1,"prompt-row",3,"click","keydown.enter","keydown.space"],[1,"grow","prompt-left",2,"min-width","0"],[1,"prompt-text"],["name","bot",2,"color","var(--node-code)","margin-right","5px","vertical-align","-1px",3,"size"],[2,"margin-top","4px","width","70%"],[3,"frac","color","height"],[1,"prompt-right"],[1,"mono","tabular","prompt-cost"],[1,"mono","muted",2,"font-size","10px"],[1,"row","cache-headline"],[1,"tabular","cache-rate"],[2,"padding-bottom","3px"],[1,"cache-divider"],[1,"cache-kv-grid"],[1,"kv"],[1,"kv-label"],[1,"kv-value","mono","tabular"],[1,"kv-sub","mono","muted"],[1,"kv-value","mono","tabular",2,"color","var(--success)"]],template:function(e,n){e&1&&(a(0,"div",0)(1,"app-page-head",1)(2,"div",2)(3,"app-segmented",3),b("change",function(h){return n.setRange(h)}),o()()(),a(4,"div",4)(5,"button",5),b("click",function(){return n.go("sessions")}),a(6,"div",6),l(7,"app-icon",7),a(8,"span",8),s(9,"Last session cost"),o()(),a(10,"div",9)(11,"div",10),u(12,ie,1,1)(13,ae,1,0),o(),u(14,oe,1,4,"app-sparkline",11),o(),u(15,re,1,2,"app-delta",12),o(),a(16,"button",5),b("click",function(){return n.go("heatmap")}),a(17,"div",6),l(18,"app-icon",13),a(19,"span",8),s(20),o()(),a(21,"div",9)(22,"div",10),u(23,se,1,1)(24,le,1,0),o(),u(25,de,1,4,"app-sparkline",14),o(),u(26,pe,1,2,"app-delta",12),o(),a(27,"button",5),b("click",function(){return n.go("heatmap")}),a(28,"div",6),l(29,"app-icon",15),a(30,"span",8),s(31,"Subagent spend"),o()(),a(32,"div",9)(33,"div",10),u(34,ce,1,1)(35,me,1,0),o(),u(36,ue,1,4,"app-sparkline",16),o(),u(37,ge,1,2,"app-delta",12),o(),a(38,"button",5),b("click",function(){return n.go("drift")}),a(39,"div",6),l(40,"app-icon",17),a(41,"span",8),s(42,"Drift queue"),o()(),a(43,"div",9)(44,"div",10),u(45,he,1,1)(46,be,1,0),o()()()(),a(47,"div",18)(48,"div",19)(49,"div",20),l(50,"app-icon",21),a(51,"span",22),s(52,"Command doors"),o(),a(53,"span",23),s(54,"\xB7 your whole SpecShip command surface, in Claude Code"),o()()(),a(55,"div",24),S(56,xe,14,12,"button",25,F),o()(),a(58,"div",26)(59,"div",27)(60,"div",28)(61,"div",29),l(62,"app-icon",30),a(63,"span"),s(64,"Recent neighborhood"),o(),a(65,"span",31),s(66,"\xB7 last edited files"),o(),u(67,_e,2,0,"span",32),o(),a(68,"a",33),s(69," Open graph "),l(70,"app-icon",34),o()(),a(71,"div",35)(72,"app-graph-canvas",36),b("nodeClick",function(h){return n.onMiniGraphPick(h)}),o()()(),a(73,"div",37)(74,"div",28)(75,"div",29),l(76,"app-icon",38),a(77,"span"),s(78,"Tips"),o(),u(79,fe,2,1,"span",39),o(),a(80,"a",40),s(81,"All"),o()(),a(82,"div",41),u(83,ye,2,1)(84,Se,2,0,"div",42)(85,Pe,2,0),o()()(),a(86,"div",43)(87,"div",44)(88,"div",20),l(89,"app-icon",45),a(90,"span",22),s(91,"Tool-call heatmap"),o(),a(92,"span",23),s(93,"\xB7 area = calls, color = tokens / call"),o()(),a(94,"a",46),s(95," Open heatmap "),l(96,"app-icon",34),o()(),u(97,Ee,1,0,"div",47)(98,Te,2,0,"div",48)(99,De,1,3,"app-treemap",49),a(100,"div",50)(101,"span",51),s(102,"tokens / call"),o(),l(103,"div",52),a(104,"span",53),s(105,"efficient \u2192 wasteful"),o()()(),a(106,"div",54)(107,"div",55)(108,"div",56)(109,"div",20),l(110,"app-icon",7),a(111,"span",22),s(112,"Recent prompts"),o(),a(113,"span",23),s(114,"\xB7 by cost"),o()(),a(115,"a",57),s(116,"Cost ranking"),o()(),a(117,"div",58),u(118,ze,2,1)(119,Ie,2,0,"div",42)(120,Fe,2,0),o()(),a(121,"div",59)(122,"div",20),l(123,"app-icon",60),a(124,"span",22),s(125,"Cache analytics"),o()(),u(126,$e,1,0,"div",61)(127,Ge,39,14),o()(),a(128,"footer",62),s(129),a(130,"span"),s(131,"\u25CF"),o(),s(132),o()()),e&2&&(r(),p("sub","specship \xB7 "+n.nodeCountLabel().toLocaleString()+" nodes \xB7 last session "+n.fmt$(n.lastSessionCost())),r(2),p("options",n.rangeOptions)("value",n.range()),r(4),p("size",13),r(4),M("skel",n.stats.state().loading),r(),g(n.stats.state().loading?13:12),r(2),g(n.lastSessionCostStat().series.length>0?14:-1),r(),g(n.lastSessionCostStat().delta!==0?15:-1),r(3),p("size",13),r(2),v("Tool calls \xB7 ",n.range()),r(2),M("skel",n.stats.state().loading),r(),g(n.stats.state().loading?24:23),r(2),g(n.toolCallsStat().series.length>0?25:-1),r(),g(n.toolCallsStat().delta!==0?26:-1),r(3),p("size",13),r(4),M("skel",n.stats.state().loading),r(),g(n.stats.state().loading?35:34),r(2),g(n.subagentPctStat().series.length>0?36:-1),r(),g(n.subagentPctStat().delta!==0?37:-1),r(3),p("size",13),r(4),M("skel",n.stats.state().loading),r(),g(n.stats.state().loading?46:45),r(5),p("size",14),r(6),k(n.doors),r(6),p("size",14),r(5),g(n.miniGraphSource()==="seed"?67:-1),r(3),p("size",11),r(2),p("nodes",n.miniGraphNodes())("edges",n.miniGraphEdges()),r(4),p("size",14),r(3),g(n.urgentTipCount()>0?79:-1),r(4),g(n.tips.state().loading?83:n.visibleTips().length===0?84:85),r(6),p("size",14),r(7),p("size",11),r(),g(n.heatmap.state().loading?97:n.treemapItems().length===0?98:99),r(13),p("size",14),r(8),g(n.costs.state().loading?118:n.topPrompts().length===0?119:120),r(5),p("size",14),r(3),g(n.cache.state().loading?126:n.cache.state().data?127:-1),r(3),O(" ",n.range()," window total: ",n.fmt$(n.rangeTotal())," \xB7 "),r(),M("dot-live",n.liveSource()==="live")("dot-mock",n.liveSource()==="offline"),r(2),v(" ",n.liveSource()==="live"?"Live":"Offline"," "))},dependencies:[j,Y,U,Q,q,W,J,X,Z,B],styles:['@charset "UTF-8";[_nghost-%COMP%]{display:contents}.dashboard[_ngcontent-%COMP%]{flex:1;padding:18px;color:var(--text-primary);background:var(--bg-canvas)}.stat-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-bottom:14px}.stat-tile[_ngcontent-%COMP%]{text-align:left;padding:11px 13px;cursor:pointer;background:var(--bg-panel);border:1px solid var(--border-subtle);border-radius:var(--r-lg);display:flex;flex-direction:column;gap:6px;color:var(--text-primary);font-family:inherit;transition:background .1s,border-color .1s}.stat-tile[_ngcontent-%COMP%]:hover{background:var(--bg-panel-2);border-color:var(--border-strong)}.stat-eyebrow[_ngcontent-%COMP%]{color:var(--text-muted)}.stat-value-row[_ngcontent-%COMP%]{justify-content:space-between;align-items:flex-end;gap:8px}.stat-value[_ngcontent-%COMP%]{font-size:23px;font-weight:650;letter-spacing:-.02em;line-height:1;min-height:23px}.doors-card[_ngcontent-%COMP%]{margin-bottom:14px}.doors-head[_ngcontent-%COMP%]{margin-bottom:12px}.doors-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}@media(max-width:760px){.doors-grid[_ngcontent-%COMP%]{grid-template-columns:1fr}}.door-tile[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px;text-align:left;padding:12px 13px;border:1px solid var(--border-subtle);border-radius:var(--r-lg);background:var(--bg-panel-2);cursor:pointer;transition:border-color .12s,transform .12s}.door-tile[_ngcontent-%COMP%]:hover{border-color:var(--border-strong);transform:translateY(-1px)}.door-tile[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--border-focus);outline-offset:2px}.door-top[_ngcontent-%COMP%]{gap:10px;align-items:center}.door-ic[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;border-radius:8px;flex-shrink:0}.door-titles[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1px;min-width:0}.door-label[_ngcontent-%COMP%]{font-weight:650;font-size:12.5px;color:var(--text-primary)}.door-cmd[_ngcontent-%COMP%]{font-size:11.5px}.door-blurb[_ngcontent-%COMP%]{font-size:11.5px;line-height:1.45;color:var(--text-secondary)}.door-subs[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:4px;margin-top:auto}.door-sub[_ngcontent-%COMP%]{font-family:ui-monospace,Geist Mono,monospace;font-size:10px;padding:2px 6px;border-radius:5px;color:var(--text-muted);background:var(--bg-hover);border:1px solid var(--border-subtle)}.center-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:2fr 1fr;gap:12px;margin-bottom:14px}.graph-card[_ngcontent-%COMP%], .tips-card[_ngcontent-%COMP%]{height:340px;display:flex;flex-direction:column;background:var(--bg-panel);border:1px solid var(--border-subtle);border-radius:var(--r-lg);overflow:hidden}.card-head[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;padding:11px 13px;border-bottom:1px solid var(--border-subtle);flex-shrink:0}.card-title[_ngcontent-%COMP%]{font-weight:600;font-size:12.5px;display:inline-flex;align-items:center;gap:8px}.mini-graph[_ngcontent-%COMP%]{flex:1;min-height:0;overflow:hidden;border-bottom-left-radius:var(--r-lg);border-bottom-right-radius:var(--r-lg)}.mini-graph[_ngcontent-%COMP%] app-graph-canvas[_ngcontent-%COMP%]{display:block;width:100%;height:100%}.seed-pill[_ngcontent-%COMP%]{color:var(--warn);background:var(--warn-soft);font-size:9.5px;font-weight:600;padding:1px 6px}.tips-body[_ngcontent-%COMP%]{flex:1;padding:10px;display:flex;flex-direction:column;gap:8px;min-height:0}.tip-empty[_ngcontent-%COMP%]{color:var(--text-muted);font-size:12px;text-align:center;padding:12px}.tip-row[_ngcontent-%COMP%]{display:flex;gap:10px;padding:10px 12px;border-radius:8px;background:var(--bg-panel-2);border:1px solid var(--border-subtle);border-left-width:2.5px;animation:_ngcontent-%COMP%_slideInRight .2s ease;flex-shrink:0}.tip-sev-icon[_ngcontent-%COMP%]{flex-shrink:0;margin-top:1px}.tip-body-col[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:0}.tip-title[_ngcontent-%COMP%]{font-size:12.5px;font-weight:550;line-height:1.35;text-wrap:pretty}.tip-meta-row[_ngcontent-%COMP%]{margin-top:7px}.tip-fix[_ngcontent-%COMP%]{font-size:10.5px;color:var(--text-secondary);background:var(--bg-canvas);padding:2px 6px;border-radius:4px;border:1px solid var(--border-subtle);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:220px}.heatmap-card[_ngcontent-%COMP%]{margin-bottom:14px}.heatmap-head[_ngcontent-%COMP%]{justify-content:space-between;margin-bottom:10px}.heatmap-legend[_ngcontent-%COMP%]{margin-top:9px;align-items:center}.heatmap-gradient[_ngcontent-%COMP%]{width:96px;height:6px;border-radius:999px;background:linear-gradient(90deg,var(--node-route),var(--warn),var(--error))}.bottom-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:1.4fr 1fr;gap:12px}.prompts-card[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:0}.prompts-head[_ngcontent-%COMP%]{justify-content:space-between;margin-bottom:6px}.prompt-row[_ngcontent-%COMP%]{display:flex;gap:10px;padding:7px 4px;border-radius:6px;cursor:pointer;align-items:center}.prompt-row[_ngcontent-%COMP%]:hover{background:var(--bg-hover)}.prompt-text[_ngcontent-%COMP%]{font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.prompt-right[_ngcontent-%COMP%]{text-align:right;flex-shrink:0}.prompt-cost[_ngcontent-%COMP%]{font-size:12px;font-weight:600}.prompt-cost.expensive[_ngcontent-%COMP%]{color:var(--error)}.cache-card[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:12px}.cache-headline[_ngcontent-%COMP%]{align-items:flex-end;gap:10px}.cache-rate[_ngcontent-%COMP%]{font-size:38px;font-weight:700;letter-spacing:-.03em;line-height:.9;color:var(--node-route)}.cache-divider[_ngcontent-%COMP%]{height:1px;background:var(--border-subtle)}.cache-kv-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:10px 14px}.kv[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1px}.kv-label[_ngcontent-%COMP%]{color:var(--text-muted);font-size:10.5px}.kv-value[_ngcontent-%COMP%]{font-size:15px;font-weight:600}.kv-sub[_ngcontent-%COMP%]{font-size:9.5px}.dash-footer[_ngcontent-%COMP%]{margin-top:16px;text-align:right;font-size:10px}.dot-live[_ngcontent-%COMP%]{color:var(--success)}.dot-mock[_ngcontent-%COMP%]{color:var(--warn)}@keyframes _ngcontent-%COMP%_slideInRight{0%{opacity:0;transform:translate(14px)}to{opacity:1;transform:translate(0)}}'],changeDetection:0})},Be=[{id:"s-1",label:"validateSession",sub:"src/auth.ts",kind:"function",x:0,y:0},{id:"s-2",label:"checkExpiry",sub:"src/auth.ts",kind:"method",x:-180,y:-70},{id:"s-3",label:"signToken",sub:"src/auth.ts",kind:"function",x:-180,y:50},{id:"s-4",label:"AuthRoute",sub:"src/routes/auth.ts",kind:"route",x:200,y:-90},{id:"s-5",label:"login",sub:"src/routes/auth.ts",kind:"function",x:200,y:30},{id:"s-6",label:"logout",sub:"src/routes/auth.ts",kind:"function",x:230,y:110},{id:"s-7",label:"auth.test.ts",sub:"test/auth.test.ts",kind:"test",x:-240,y:140},{id:"s-8",label:"session.test.ts",sub:"test/session.test.ts",kind:"test",x:-100,y:180},{id:"s-9",label:"REQ-AUTH-005",sub:"reject expired tokens",kind:"spec",state:"drifted",x:30,y:-180},{id:"s-10",label:"REQ-AUTH-001",sub:"sign session tokens",kind:"spec",state:"verified",x:-150,y:-190},{id:"s-11",label:"User",sub:"src/types/user.ts",kind:"class",x:-340,y:-10},{id:"s-12",label:"Session",sub:"src/types/session.ts",kind:"class",x:60,y:130},{id:"s-13",label:"jwtSign",sub:"src/lib/jwt.ts",kind:"function",x:-340,y:80},{id:"s-14",label:"jwtVerify",sub:"src/lib/jwt.ts",kind:"function",x:350,y:-10},{id:"s-15",label:"tokenStore",sub:"src/db/tokens.ts",kind:"function",x:350,y:90}],Ve=[{from:"s-1",to:"s-2",kind:"calls"},{from:"s-1",to:"s-3",kind:"calls"},{from:"s-4",to:"s-5",kind:"calls"},{from:"s-4",to:"s-6",kind:"calls"},{from:"s-5",to:"s-1",kind:"calls"},{from:"s-6",to:"s-1",kind:"calls"},{from:"s-3",to:"s-13",kind:"calls"},{from:"s-2",to:"s-14",kind:"calls"},{from:"s-1",to:"s-12",kind:"references"},{from:"s-5",to:"s-11",kind:"references"},{from:"s-9",to:"s-1",kind:"implements"},{from:"s-10",to:"s-3",kind:"implements"},{from:"s-7",to:"s-1",kind:"references"},{from:"s-8",to:"s-12",kind:"references"},{from:"s-14",to:"s-15",kind:"calls"}];function je(i){if(i.length===0)return[];let t=i[0],e=i.slice(1),n=[{id:t.id,label:t.label,sub:t.sub,kind:t.kind,x:0,y:0}],d=220;for(let h=0;h<e.length;h++){let P=h/e.length*Math.PI*2-Math.PI/2,f=e[h];n.push({id:f.id,label:f.label,sub:f.sub,kind:f.kind,x:Math.cos(P)*d,y:Math.sin(P)*d})}return n}export{ee as Dashboard};
@@ -0,0 +1,6 @@
1
+ import{a as j}from"./chunk-G7VZT5KB.js";import{a as re}from"./chunk-YWIRU745.js";import{a as ae}from"./chunk-JLOJCDIY.js";import{a as oe}from"./chunk-PZSU53SS.js";import{a as $,b as ie}from"./chunk-WBJ5VEB5.js";import{a as ne}from"./chunk-SQPYSOV6.js";import{c as Y}from"./chunk-DOKZOFKM.js";import{a as te,c as V}from"./chunk-DTWIJ3GJ.js";import{a as ee}from"./chunk-JGDK6YKG.js";import{a as Z}from"./chunk-TWVVIWKO.js";import{Aa as s,Ga as M,I as y,Ia as b,Ka as c,M as v,N as C,Oa as U,Pa as K,Qa as X,R as B,T as O,Ta as w,Ua as D,Va as l,W as f,Wa as _,Xa as h,Ya as J,aa as R,ea as o,ka as z,lb as x,ra as g,sa as u,va as S,wa as k,xa as p,ya as d,yb as F,za as a,zb as I}from"./chunk-SYGIPC2P.js";import"./chunk-Q7L6LLAK.js";var A=null,xe="self.onmessage = () => {};";function de(){return A||(typeof window<"u"&&!window.MonacoEnvironment&&(window.MonacoEnvironment={getWorker:(n,t)=>{let e=new Blob([xe],{type:"text/javascript"}),i=URL.createObjectURL(e);return new Worker(i,{name:t||"monaco-noop"})}}),A=import("./chunk-FMV5PXRC.js"),A)}var le=!1;function ce(n){le||(le=!0,ve(n))}function se(n,t){let e=[],i=t.getValue().split(`
2
+ `),r=null,m=new Map,E=/<!--\s*id\s*:\s*([^\s-][^\s]*)\s*-->/,_e=/^#{1,6}\s+/;for(let T=0;T<i.length;T++){let N=i[T]??"",L=T+1,G=N.match(E);if(G&&G[1]){r!==null&&e.push({severity:n.MarkerSeverity.Warning,message:`Stranded <!-- id: ${r.id} -->: no heading follows on line ${r.line+1}.`,startLineNumber:r.line+1,startColumn:1,endLineNumber:r.line+1,endColumn:(i[r.line]??"").length+1,code:"spec_stranded_id"});let P=G[1];r={id:P,line:T};let Q=m.get(P);Q!==void 0?e.push({severity:n.MarkerSeverity.Warning,message:`Duplicate spec ID "${P}" \u2014 first seen on line ${Q+1}. The second occurrence will be silently lost by the parser.`,startLineNumber:L,startColumn:N.indexOf(P)+1,endLineNumber:L,endColumn:N.indexOf(P)+P.length+1,code:"spec_duplicate_id"}):m.set(P,T);continue}_e.test(N)&&(r===null?e.push({severity:n.MarkerSeverity.Error,message:"This heading has no embedded ID. Add `<!-- id: REQ-X -->` on the line above it \u2014 required by the SpecShip parser.",startLineNumber:L,startColumn:1,endLineNumber:L,endColumn:N.length+1,code:"spec_missing_id"}):r=null)}n.editor.setModelMarkers(t,"specship-spec",e)}function ve(n){n.languages.registerCompletionItemProvider("markdown",{provideCompletionItems:(t,e)=>{let i=t.getWordUntilPosition(e),r={startLineNumber:e.lineNumber,endLineNumber:e.lineNumber,startColumn:i.startColumn,endColumn:i.endColumn},m=n.languages.CompletionItemKind,E=n.languages.CompletionItemInsertTextRule;return{suggestions:[{label:"req",kind:m.Snippet,insertText:["<!-- id: REQ-${1:AREA}-${2:001} -->","## ${3:Title MUST be concrete}","","${4:Body \u2014 describe the contract, not the implementation.}","","## Acceptance","<!-- id: REQ-${1:AREA}-${2:001}.A1 -->","- ${5:First testable acceptance criterion}","$0"].join(`
3
+ `),insertTextRules:E.InsertAsSnippet,documentation:"Insert a full requirement (heading + acceptance) with embedded IDs.",detail:"SpecShip \xB7 requirement",range:r},{label:"doc",kind:m.Snippet,insertText:["---","id: ${1:AREA}-DOC","title: ${2:Title}","owner: ${3:team-or-person}","priority: ${4|high,medium,low|}","---","","<!-- id: ${1:AREA}-DOC -->","# ${2:Title}","","${5:One-paragraph summary of what this document covers.}","$0"].join(`
4
+ `),insertTextRules:E.InsertAsSnippet,documentation:"Insert a new spec document with frontmatter.",detail:"SpecShip \xB7 document",range:r},{label:"accept",kind:m.Snippet,insertText:["## Acceptance","<!-- id: ${1:REQ-X}.A1 -->","- ${2:First testable acceptance criterion}","<!-- id: ${1:REQ-X}.A2 -->","- ${3:Second testable acceptance criterion}","$0"].join(`
5
+ `),insertTextRules:E.InsertAsSnippet,documentation:"Insert an Acceptance section with two ID-d bullets.",detail:"SpecShip \xB7 acceptance",range:r},{label:"impl",kind:m.Snippet,insertText:["implementations:"," - ${1:src/path/to/file.ts}:${2:QualifiedSymbol}","$0"].join(`
6
+ `),insertTextRules:E.InsertAsSnippet,documentation:"Insert an implementations block linking the spec to code.",detail:"SpecShip \xB7 implementations",range:r}]}},triggerCharacters:["r","d","a","i"]})}var Ce=["host"];function fe(n,t){if(n&1&&(d(0,"span",5),l(1),a()),n&2){let e=c();p("title",e.path),o(),_(e.path)}}function be(n,t){n&1&&(d(0,"div",15),l(1,"Loading editor\u2026"),a())}var W=class n{sanitizer=y(F);destroyRef=y(B);value="";path="";valueChange=new O;validationChange=new O;save=new O;cancel=new O;hostRef;loading=f(!0);currentValue=f("");errorCount=f(0);warningCount=f(0);dirty=f(!1);previewHtml=x(()=>this.sanitizer.bypassSecurityTrustHtml(j(this.currentValue()||"")));tokenCount=x(()=>Math.max(1,Math.round((this.currentValue()||"").length/4)));statusLabel=x(()=>{let t=this.errorCount(),e=this.warningCount();return t>0?`${t} error${t===1?"":"s"}`:e>0?`${e} warning${e===1?"":"s"}`:"clean"});statusKind=x(()=>this.errorCount()>0?"error":this.warningCount()>0?"warn":"ok");monaco=null;editor=null;model=null;diagnosticsTimer=null;async ngAfterViewInit(){this.currentValue.set(this.value);try{let t=await de();this.monaco=t,ce(t),this.model=t.editor.createModel(this.value,"markdown"),this.editor=t.editor.create(this.hostRef.nativeElement,{model:this.model,theme:this.preferDark()?"vs-dark":"vs",automaticLayout:!0,wordWrap:"on",minimap:{enabled:!1},scrollBeyondLastLine:!1,renderWhitespace:"none",fontSize:13,lineNumbers:"on",folding:!1,tabSize:2,insertSpaces:!0,contextmenu:!1}),this.editor.onDidChangeModelContent(()=>this.handleEdit()),this.runDiagnosticsNow(),this.loading.set(!1)}catch(t){console.error("[spec-editor] failed to load Monaco",t),this.loading.set(!1)}this.destroyRef.onDestroy(()=>this.dispose())}ngOnDestroy(){this.dispose()}onSave(){this.save.emit()}onCancel(){this.cancel.emit()}handleEdit(){if(!this.model)return;let t=this.model.getValue();this.currentValue.set(t),this.dirty.set(t!==this.value),this.valueChange.emit(t),this.diagnosticsTimer!==null&&clearTimeout(this.diagnosticsTimer),this.diagnosticsTimer=setTimeout(()=>this.runDiagnosticsNow(),500)}runDiagnosticsNow(){if(!this.monaco||!this.model)return;se(this.monaco,this.model);let t=this.monaco.editor.getModelMarkers({resource:this.model.uri,owner:"specship-spec"}),e=t.filter(r=>r.severity===this.monaco.MarkerSeverity.Error).length,i=t.filter(r=>r.severity===this.monaco.MarkerSeverity.Warning).length;this.errorCount.set(e),this.warningCount.set(i),this.validationChange.emit({errors:e,warnings:i})}preferDark(){if(typeof window>"u")return!1;try{return window.matchMedia("(prefers-color-scheme: dark)").matches}catch{return!1}}dispose(){this.diagnosticsTimer!==null&&(clearTimeout(this.diagnosticsTimer),this.diagnosticsTimer=null),this.editor?.dispose(),this.editor=null,this.model?.dispose(),this.model=null}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=z({type:n,selectors:[["app-spec-editor"]],viewQuery:function(e,i){if(e&1&&U(Ce,7),e&2){let r;K(r=X())&&(i.hostRef=r.first)}},inputs:{value:"value",path:"path"},outputs:{valueChange:"valueChange",validationChange:"validationChange",save:"save",cancel:"cancel"},decls:23,vars:16,consts:[["host",""],[1,"editor-shell","col"],[1,"toolbar","row","gap-8"],["name","memory",3,"size"],[1,"title"],[1,"path","mono",3,"title"],[1,"grow"],[1,"status-pill"],[1,"dot"],[1,"tokens","mono","tabular","muted",3,"title"],["type","button",1,"btn","btn-secondary","btn-sm",3,"click"],["type","button",1,"btn","btn-primary","btn-sm",3,"click","disabled","title"],["name","check",3,"size"],[1,"panes","row"],[1,"editor-pane"],[1,"loading"],[1,"monaco-host"],[1,"preview-pane","md-content",3,"innerHTML"]],template:function(e,i){e&1&&(d(0,"div",1)(1,"div",2),s(2,"app-icon",3),d(3,"span",4),l(4,"Spec editor"),a(),g(5,fe,2,2,"span",5),s(6,"span",6),d(7,"span",7),s(8,"span",8),l(9),a(),d(10,"span",9),l(11),a(),d(12,"button",10),b("click",function(){return i.onCancel()}),l(13," Cancel "),a(),d(14,"button",11),b("click",function(){return i.onSave()}),s(15,"app-icon",12),l(16," Save "),a()(),d(17,"div",13)(18,"div",14),g(19,be,2,0,"div",15),s(20,"div",16,0),a(),s(22,"div",17),a()()),e&2&&(o(2),p("size",14),o(3),u(i.path?5:-1),o(2),D("ok",i.statusKind()==="ok")("warn",i.statusKind()==="warn")("error",i.statusKind()==="error"),o(2),h(" ",i.statusLabel()," "),o(),p("title","~"+i.tokenCount()+" tokens (rough estimate)"),o(),h(" ~",i.tokenCount(),"t "),o(3),p("disabled",!i.dirty()||i.errorCount()>0)("title",i.errorCount()>0?"Fix errors before saving":i.dirty()?"Save changes":"No changes to save"),o(),p("size",13),o(4),u(i.loading()?19:-1),o(3),p("innerHTML",i.previewHtml(),R))},dependencies:[I],styles:['@charset "UTF-8";[_nghost-%COMP%]{display:flex;flex:1;min-height:0}.editor-shell[_ngcontent-%COMP%]{flex:1;min-height:0;border:1px solid var(--border-subtle);border-radius:10px;overflow:hidden;background:var(--bg-panel)}.toolbar[_ngcontent-%COMP%]{align-items:center;padding:8px 12px;border-bottom:1px solid var(--border-subtle);background:var(--bg-panel);flex-wrap:wrap;row-gap:6px}.toolbar[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-size:12.5px;font-weight:650;color:var(--text-primary)}.toolbar[_ngcontent-%COMP%] .path[_ngcontent-%COMP%]{font-size:11px;color:var(--text-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:320px}.toolbar[_ngcontent-%COMP%] .tokens[_ngcontent-%COMP%]{font-size:10.5px;color:var(--text-muted)}.status-pill[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:6px;font-size:11px;font-weight:600;padding:3px 9px;border-radius:999px;white-space:nowrap}.status-pill[_ngcontent-%COMP%] .dot[_ngcontent-%COMP%]{width:7px;height:7px;border-radius:50%}.status-pill.ok[_ngcontent-%COMP%]{color:var(--success);background:var(--success-soft)}.status-pill.ok[_ngcontent-%COMP%] .dot[_ngcontent-%COMP%]{background:var(--success)}.status-pill.warn[_ngcontent-%COMP%]{color:var(--warn);background:var(--warn-soft)}.status-pill.warn[_ngcontent-%COMP%] .dot[_ngcontent-%COMP%]{background:var(--warn)}.status-pill.error[_ngcontent-%COMP%]{color:var(--error);background:var(--error-soft)}.status-pill.error[_ngcontent-%COMP%] .dot[_ngcontent-%COMP%]{background:var(--error)}.panes[_ngcontent-%COMP%]{flex:1;min-height:0}.editor-pane[_ngcontent-%COMP%]{flex:1;min-width:0;min-height:0;position:relative;border-right:1px solid var(--border-subtle)}.loading[_ngcontent-%COMP%]{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;color:var(--text-muted);font-size:12px;background:var(--bg-canvas);z-index:1}.monaco-host[_ngcontent-%COMP%]{position:absolute;inset:0}.preview-pane[_ngcontent-%COMP%]{flex:1;min-width:0;min-height:0;padding:14px 18px;overflow:auto;background:var(--bg-canvas)}.preview-pane.md-content[_ngcontent-%COMP%] .md-h1[_ngcontent-%COMP%]{font-size:15px;font-weight:650;color:var(--text-primary);letter-spacing:-.01em;margin:0 0 10px}.preview-pane.md-content[_ngcontent-%COMP%] .md-h2[_ngcontent-%COMP%]{font-size:13px;font-weight:650;color:var(--text-primary);letter-spacing:-.005em;margin:18px 0 6px;padding-bottom:4px;border-bottom:1px solid var(--border-subtle)}.preview-pane.md-content[_ngcontent-%COMP%] .md-h3[_ngcontent-%COMP%]{font-size:12px;font-weight:650;color:var(--text-primary);margin:14px 0 6px}.preview-pane.md-content[_ngcontent-%COMP%] .md-h4[_ngcontent-%COMP%]{font-size:10.5px;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:var(--text-muted);margin:12px 0 4px}.preview-pane.md-content[_ngcontent-%COMP%] .md-p[_ngcontent-%COMP%]{font-size:12.5px;line-height:1.6;color:var(--text-secondary);margin:0 0 4px;overflow-wrap:anywhere}.preview-pane.md-content[_ngcontent-%COMP%] .md-p[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{color:var(--text-primary)}.preview-pane.md-content[_ngcontent-%COMP%] .md-list[_ngcontent-%COMP%], .preview-pane.md-content[_ngcontent-%COMP%] .md-ol[_ngcontent-%COMP%]{padding:0;margin:4px 0 6px}.preview-pane.md-content[_ngcontent-%COMP%] .md-list[_ngcontent-%COMP%] li[_ngcontent-%COMP%], .preview-pane.md-content[_ngcontent-%COMP%] .md-ol[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{position:relative;padding:2px 0 2px 22px;font-size:12.5px;line-height:1.6;color:var(--text-secondary);overflow-wrap:anywhere}.preview-pane.md-content[_ngcontent-%COMP%] .md-list[_ngcontent-%COMP%] li[_ngcontent-%COMP%] strong[_ngcontent-%COMP%], .preview-pane.md-content[_ngcontent-%COMP%] .md-ol[_ngcontent-%COMP%] li[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{color:var(--text-primary)}.preview-pane.md-content[_ngcontent-%COMP%] .md-list[_ngcontent-%COMP%]{list-style:none}.preview-pane.md-content[_ngcontent-%COMP%] .md-list[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:before{content:"\\2022";position:absolute;left:6px;top:2px;color:var(--text-faint)}.preview-pane.md-content[_ngcontent-%COMP%] .md-ol[_ngcontent-%COMP%]{list-style:none;counter-reset:md-ol}.preview-pane.md-content[_ngcontent-%COMP%] .md-ol[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{counter-increment:md-ol}.preview-pane.md-content[_ngcontent-%COMP%] .md-ol[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:before{content:counter(md-ol) ".";position:absolute;left:0;top:2px;color:var(--text-faint);font-family:var(--font-mono);font-size:11.5px;min-width:18px;text-align:right}.preview-pane.md-content[_ngcontent-%COMP%] .md-spacer[_ngcontent-%COMP%]{height:6px}.preview-pane.md-content[_ngcontent-%COMP%] .md-import[_ngcontent-%COMP%]{display:inline-block;font-size:11.5px;color:var(--node-route);background:var(--node-route-soft);padding:2px 8px;border-radius:5px;margin:4px 0}.preview-pane.md-content[_ngcontent-%COMP%] .md-inline-code[_ngcontent-%COMP%]{font-size:11.5px;background:var(--bg-canvas);padding:1px 6px;border-radius:4px;border:1px solid var(--border-subtle);color:var(--node-spec)}.preview-pane.md-content[_ngcontent-%COMP%] .md-blockquote[_ngcontent-%COMP%]{margin:6px 0;padding:8px 12px;border-left:3px solid var(--accent);background:var(--accent-soft);color:var(--text-secondary);font-size:12.5px;line-height:1.55;border-radius:0 6px 6px 0}.preview-pane.md-content[_ngcontent-%COMP%] .md-pre[_ngcontent-%COMP%]{position:relative;margin:8px 0 10px;padding:12px 14px;background:var(--bg-panel);border:1px solid var(--border-subtle);border-radius:8px;overflow-x:auto}.preview-pane.md-content[_ngcontent-%COMP%] .md-pre[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{display:block;font-size:11.5px;line-height:1.55;color:var(--text-primary);white-space:pre}.preview-pane.md-content[_ngcontent-%COMP%] .md-pre-lang[_ngcontent-%COMP%]{position:absolute;top:6px;right:10px;font-size:10px;font-weight:600;color:var(--text-muted);text-transform:lowercase;background:var(--bg-canvas);padding:1px 6px;border-radius:4px;border:1px solid var(--border-subtle)}.preview-pane.md-content[_ngcontent-%COMP%] .md-table-scroll[_ngcontent-%COMP%]{overflow-x:auto;margin:10px 0;border:1px solid var(--border-subtle);border-radius:8px}.preview-pane.md-content[_ngcontent-%COMP%] .md-table[_ngcontent-%COMP%]{width:100%;border-collapse:collapse;font-size:11.5px}.preview-pane.md-content[_ngcontent-%COMP%] .md-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%], .preview-pane.md-content[_ngcontent-%COMP%] .md-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:8px 12px;text-align:left;vertical-align:top;border-bottom:1px solid var(--border-subtle)}.preview-pane.md-content[_ngcontent-%COMP%] .md-table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{background:var(--bg-panel);font-weight:650;color:var(--text-primary);font-size:10.5px;text-transform:uppercase;letter-spacing:.04em;border-bottom:1px solid var(--border-strong);white-space:nowrap}.preview-pane.md-content[_ngcontent-%COMP%] .md-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{color:var(--text-secondary)}.preview-pane.md-content[_ngcontent-%COMP%] .md-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:last-child td[_ngcontent-%COMP%]{border-bottom:0}.preview-pane.md-content[_ngcontent-%COMP%] .md-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:hover{background:var(--bg-hover)}.preview-pane.md-content[_ngcontent-%COMP%] > [_ngcontent-%COMP%]:first-child{margin-top:0}'],changeDetection:0})};function he(n,t){n&1&&(d(0,"div",14),l(1),a()),n&2&&(o(),_(t))}function ye(n,t){if(n&1){let e=M();d(0,"div",0),b("click",function(){v(e);let r=c();return C(r.onBackdropClick())}),a(),d(1,"div",1)(2,"header",2)(3,"div",3)(4,"div",4),l(5,"Draft a new spec with Claude"),a(),d(6,"div",5),l(7,"Describe the feature in one sentence. Claude takes it from there."),a()(),d(8,"button",6),b("click",function(){v(e);let r=c();return C(r.onCloseClick())}),s(9,"app-icon",7),a()(),d(10,"div",8)(11,"label",9),l(12,"Feature description"),a(),d(13,"textarea",10),b("input",function(r){v(e);let m=c();return C(m.onDescriptionInput(r))}),a(),d(14,"div",11),l(15,"This will run in Claude Code:"),a(),d(16,"pre",12),l(17),a()(),d(18,"footer",13),g(19,he,2,1,"div",14),s(20,"span",15),d(21,"button",16),b("click",function(){v(e);let r=c();return C(r.onCopyToClipboard())}),s(22,"app-icon",17),l(23," Copy prompt "),a(),d(24,"button",18),b("click",function(){v(e);let r=c();return C(r.onOpenInClaude())}),s(25,"app-icon",19),l(26," Open in Claude Code "),a()()()}if(n&2){let e,i=c();o(9),p("size",16),o(4),p("value",i.description()),o(4),_(i.slashCommand()),o(2),u((e=i.toast())?19:-1,e),o(2),p("disabled",!i.canSubmit()),o(),p("size",13),o(2),p("disabled",!i.canSubmit()),o(),p("size",13)}}var H=class n{open=!1;close=new O;description=f("");toast=f(null);slashCommand=x(()=>{let t=this.description().trim();return t?`/specship:spec new "${t.replace(/"/g,'\\"')}"`:"/specship:spec new"});canSubmit=x(()=>this.description().trim().length>0);onDescriptionInput(t){let e=t.target;this.description.set(e.value)}onBackdropClick(){this.dismiss()}onCloseClick(){this.dismiss()}async onOpenInClaude(){if(!this.canSubmit())return;let t=this.slashCommand();await this.writeToClipboard(t);try{window.location.href=`claude://prompt?text=${encodeURIComponent(t)}`,this.flashToast("Opening Claude Code\u2026 (also copied to clipboard)")}catch{this.flashToast("Claude Code handler unavailable \u2014 prompt copied to clipboard.")}}async onCopyToClipboard(){if(!this.canSubmit())return;let t=this.slashCommand(),e=await this.writeToClipboard(t);this.flashToast(e?"Copied! Switch to Claude Code and paste.":"Could not access clipboard \u2014 copy the prompt manually.")}async writeToClipboard(t){if(!navigator.clipboard)return!1;try{return await navigator.clipboard.writeText(t),!0}catch{return!1}}flashToast(t){this.toast.set(t),setTimeout(()=>this.toast.set(null),2500)}dismiss(){this.description.set(""),this.toast.set(null),this.close.emit()}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=z({type:n,selectors:[["app-draft-with-claude-modal"]],inputs:{open:"open"},outputs:{close:"close"},decls:1,vars:1,consts:[["role","presentation",1,"backdrop",3,"click"],["role","dialog","aria-labelledby","draft-modal-title","aria-modal","true",1,"modal"],[1,"head"],[1,"title-block"],["id","draft-modal-title",1,"title"],[1,"sub"],["type","button","aria-label","Close",1,"close",3,"click"],["name","x",3,"size"],[1,"body"],["for","draft-description",1,"field-label"],["id","draft-description","rows","3","placeholder","e.g. Failed payment retries should back off with T+1d, T+3d, T+7d then downgrade the account.","autofocus","",1,"field",3,"input","value"],[1,"preview-label"],[1,"preview","mono"],[1,"foot"],[1,"toast"],[1,"grow"],["type","button",1,"btn","btn-secondary","btn-sm",3,"click","disabled"],["name","copy",3,"size"],["type","button",1,"btn","btn-primary","btn-sm",3,"click","disabled"],["name","external",3,"size"]],template:function(e,i){e&1&&g(0,ye,27,8),e&2&&u(i.open?0:-1)},dependencies:[I],styles:[".backdrop[_ngcontent-%COMP%]{position:fixed;inset:0;background:#00000080;z-index:100;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px)}.modal[_ngcontent-%COMP%]{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);width:min(560px,100vw - 32px);max-height:calc(100vh - 64px);background:var(--bg-panel);border:1px solid var(--border-subtle);border-radius:12px;box-shadow:0 24px 48px #0006;z-index:101;display:flex;flex-direction:column;overflow:hidden}.head[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:12px;padding:16px 18px;border-bottom:1px solid var(--border-subtle)}.head[_ngcontent-%COMP%] .title-block[_ngcontent-%COMP%]{flex:1;min-width:0}.head[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-size:14.5px;font-weight:650;color:var(--text-primary);letter-spacing:-.01em}.head[_ngcontent-%COMP%] .sub[_ngcontent-%COMP%]{font-size:12px;color:var(--text-secondary);margin-top:2px;line-height:1.45}.head[_ngcontent-%COMP%] .close[_ngcontent-%COMP%]{appearance:none;background:transparent;border:0;width:28px;height:28px;border-radius:6px;color:var(--text-muted);cursor:pointer;display:inline-flex;align-items:center;justify-content:center;transition:background .12s,color .12s}.head[_ngcontent-%COMP%] .close[_ngcontent-%COMP%]:hover{background:var(--bg-hover);color:var(--text-primary)}.head[_ngcontent-%COMP%] .close[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--accent);outline-offset:1px}.body[_ngcontent-%COMP%]{padding:16px 18px;display:flex;flex-direction:column;gap:10px;overflow-y:auto}.field-label[_ngcontent-%COMP%]{font-size:11px;font-weight:600;color:var(--text-muted);text-transform:uppercase;letter-spacing:.04em}.field[_ngcontent-%COMP%]{width:100%;box-sizing:border-box;padding:10px 12px;background:var(--bg-canvas);border:1px solid var(--border-subtle);border-radius:8px;color:var(--text-primary);font-family:var(--font-ui);font-size:13px;line-height:1.5;resize:vertical}.field[_ngcontent-%COMP%]:focus{outline:2px solid var(--accent);outline-offset:1px;border-color:transparent}.preview-label[_ngcontent-%COMP%]{font-size:11px;color:var(--text-muted);margin-top:4px}.preview[_ngcontent-%COMP%]{margin:0;padding:10px 12px;background:var(--bg-canvas);border:1px solid var(--border-subtle);border-radius:8px;font-size:11.5px;line-height:1.5;color:var(--node-spec);font-family:var(--font-mono);white-space:pre-wrap;word-break:break-all}.foot[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;padding:12px 18px;border-top:1px solid var(--border-subtle);background:var(--bg-canvas);flex-wrap:wrap}.foot[_ngcontent-%COMP%] .grow[_ngcontent-%COMP%]{flex:1}.toast[_ngcontent-%COMP%]{font-size:11.5px;color:var(--success);background:var(--success-soft);padding:4px 10px;border-radius:999px;white-space:nowrap}"],changeDetection:0})};var Me=(n,t)=>t.path,q=(n,t)=>t.id,we=(n,t)=>t.briefId;function Pe(n,t){n&1&&s(0,"app-pick-project-empty",0)}function Oe(n,t){if(n&1&&(s(0,"span",6),d(1,"span",17),l(2),a()),n&2){let e=c();o(2),h("",e.summary.conflicts," \u26A0")}}function Se(n,t){if(n&1&&(d(0,"div",8)(1,"span")(2,"b",15),l(3),a(),l(4," ideas"),a(),d(5,"span",16),l(6,"\u2192"),a(),d(7,"span")(8,"b",15),l(9),a(),l(10," specs"),a(),d(11,"span",16),l(12,"\u2192"),a(),d(13,"span")(14,"b",15),l(15),a(),l(16," impl \xB7 "),d(17,"b",15),l(18),a(),l(19," ver"),a(),g(20,Oe,3,1),a()),n&2){let e=t;o(3),_(e.summary.ideas),o(6),_(e.summary.specified),o(6),_(e.summary.links.implemented),o(3),_(e.summary.links.verified),o(2),u(e.summary.conflicts>0?20:-1)}}function ke(n,t){n&1&&s(0,"app-empty",10)}function Ee(n,t){if(n&1&&(d(0,"span",22),l(1),a()),n&2){let e=c().$implicit,i=c(2);o(),h(" ",i.driftCountForGroup(e)," ")}}function Te(n,t){if(n&1){let e=M();d(0,"div",25),b("click",function(){let r=v(e).$implicit,m=c(4);return C(m.open(r.id))})("keydown.enter",function(){let r=v(e).$implicit,m=c(4);return C(m.open(r.id))})("keydown.space",function(){let r=v(e).$implicit,m=c(4);return C(m.open(r.id))}),s(1,"span",26),d(2,"div",27)(3,"div",28),l(4),a(),d(5,"div",29),l(6),a()()()}if(n&2){let e=t.$implicit,i=c(4);D("selected",i.sel()===e.id),o(),w("background",i.stateColorFor(e.kind)),o(2),w("color",i.sel()===e.id?"var(--accent)":"var(--text-primary)"),o(),_(e.id),o(2),_(e.title)}}function ze(n,t){if(n&1&&(d(0,"div",23),S(1,Te,7,8,"div",24,q),a()),n&2){let e=c().$implicit;o(),k(e.specs)}}function De(n,t){if(n&1){let e=M();d(0,"div",18),b("click",function(){let r=v(e).$implicit,m=c(2);return C(m.toggleGroup(r.path))}),s(1,"app-icon",19)(2,"app-icon",20),d(3,"span",21),l(4),a(),g(5,Ee,2,1,"span",22),a(),g(6,ze,3,0,"div",23)}if(n&2){let e=t.$implicit,i=c(2);o(),p("name",i.isGroupOpen(e.path)?"chevronDown":"chevronRight")("size",12),o(),p("size",13),o(2),_(e.title),o(),u(i.driftCountForGroup(e)>0?5:-1),o(),u(i.isGroupOpen(e.path)?6:-1)}}function Ie(n,t){if(n&1){let e=M();d(0,"div",34),b("click",function(){let r=v(e).$implicit,m=c(3);return C(m.select(r.briefId))}),s(1,"span",35),d(2,"div",27)(3,"div",29),l(4),a()()()}if(n&2){let e=t.$implicit,i=c(3);D("selected",i.sel()===e.briefId),o(4),_(e.title)}}function $e(n,t){if(n&1&&(d(0,"div",30)(1,"span",31),l(2,"IDEAS"),a(),d(3,"span",32),l(4),a()(),S(5,Ie,5,3,"div",33,we)),n&2){let e=c(2);o(4),_(e.ideas().length),o(),k(e.ideas())}}function Ne(n,t){if(n&1&&(d(0,"div",36),l(1),a()),n&2){let e=c();o(),h("Loading source for ",e.id,"\u2026")}}function Re(n,t){if(n&1){let e=M();d(0,"app-spec-editor",40),b("valueChange",function(r){v(e);let m=c(4);return C(m.onEditorValueChange(r))})("save",function(){v(e);let r=c(4);return C(r.onEditorSave())})("cancel",function(){v(e);let r=c(4);return C(r.onEditorCancel())}),a()}if(n&2){let e=c(),i=c(3);p("value",i.editingSource())("path",e.sourcePath)}}function Ve(n,t){n&1&&(d(0,"div",38),l(1),a()),n&2&&(o(),_(t))}function Le(n,t){n&1&&(d(0,"div",39),l(1,"Saving\u2026"),a())}function Fe(n,t){if(n&1&&(g(0,Ne,2,1,"div",36)(1,Re,1,2,"app-spec-editor",37),g(2,Ve,2,1,"div",38),g(3,Le,2,0,"div",39)),n&2){let e,i=c(3);u(i.editingSource()===null?0:1),o(2),u((e=i.saveError())?2:-1,e),o(),u(i.saving()?3:-1)}}function je(n,t){if(n&1&&g(0,Fe,4,3),n&2){let e,i=c(2);u((e=i.selectedSpec())?0:-1,e)}}function Ae(n,t){if(n&1&&(d(0,"app-pill"),l(1),a()),n&2){let e=c();o(),_(e.priority)}}function We(n,t){if(n&1&&(d(0,"div",47)(1,"div",48),l(2,"Owner"),a(),d(3,"div",49),l(4),a()()),n&2){let e=c();o(4),_(e.owner)}}function He(n,t){if(n&1&&(d(0,"details",52)(1,"summary",65),l(2,"Brainstorm"),a(),s(3,"div",66),a()),n&2){let e=c(3);o(3),p("innerHTML",e.briefHtml(),R)}}function qe(n,t){if(n&1&&s(0,"span",74),n&2){let e=t.$implicit,i=c(4);w("background",i.critColor(e.state)),D("pending",e.state==="pending"),p("title",e.id+" \xB7 "+i.stateLabel(e.state))}}function Ge(n,t){n&1&&s(0,"app-icon",77),n&2&&p("name",t)("size",12)}function Qe(n,t){if(n&1&&s(0,"span",81),n&2){let e=c().$implicit,i=c(4);w("border-color",i.critColor(e.state))}}function Be(n,t){if(n&1&&(d(0,"div",75)(1,"span",76),g(2,Ge,1,2,"app-icon",77)(3,Qe,1,2,"span",78),a(),d(4,"span",79),l(5),a(),d(6,"span",80),l(7),a()()),n&2){let e,i=t.$implicit,r=t.$index,m=c(4);w("border-top",r>0?"1px solid var(--border-subtle)":"none"),o(),w("background",m.critBg(i.state))("color",m.critColor(i.state)),p("title",m.stateLabel(i.state)),o(),u((e=m.critIcon(i.state))?2:3,e),o(3),h("A",r+1),o(2),_(i.title)}}function Ue(n,t){if(n&1&&(d(0,"div",67)(1,"span",68),l(2,"Acceptance criteria"),a(),s(3,"span",6),d(4,"span",69),l(5),a()(),d(6,"div",70),S(7,qe,1,5,"span",71,q),a(),d(9,"div",72),S(10,Be,8,10,"div",73,q),a()),n&2){let e=c(3);o(4),w("color",e.metCount()===e.criteria().length?"var(--success)":"var(--text-muted)"),o(),J(" ",e.metCount()," / ",e.criteria().length," met "),o(2),k(e.criteria()),o(3),k(e.criteria())}}function Ke(n,t){n&1&&s(0,"div",53)}function Xe(n,t){if(n&1&&(d(0,"app-pill",84),l(1),a()),n&2){let e=c().$implicit;o(),h("",e.driftAxis," drift")}}function Je(n,t){if(n&1&&(d(0,"div",83),s(1,"app-state-pill",44),g(2,Xe,2,1,"app-pill",84),d(3,"span",85),l(4),a(),d(5,"app-pill"),l(6),a(),d(7,"button",86),s(8,"app-icon",62),l(9," Reveal "),a()()),n&2){let e=t.$implicit,i=t.$index;w("border-top",i>0?"1px solid var(--border-subtle)":"none"),o(),p("state",e.state),o(),u(e.driftAxis?2:-1),o(2),_(e.targetQualifiedName),o(2),_(e.provenance),o(2),p("size",12)}}function Ye(n,t){if(n&1&&(d(0,"div",54),S(1,Je,10,7,"div",82,q),a()),n&2){let e=c(3);o(),k(e.selectedLinks())}}function Ze(n,t){n&1&&(d(0,"div",55),s(1,"app-icon",87),d(2,"div",88),l(3," Orphaned \u2014 no code implements this requirement yet "),a()()),n&2&&(o(),p("size",16))}function et(n,t){n&1&&(d(0,"div",64),l(1),a()),n&2&&(o(),_(t))}function tt(n,t){if(n&1){let e=M();d(0,"div",12)(1,"div",41)(2,"span",42),l(3),a(),s(4,"app-copy-btn",43)(5,"div",6)(6,"app-state-pill",44),g(7,Ae,2,1,"app-pill"),a(),d(8,"h1",45),l(9),a(),d(10,"div",46)(11,"div",47)(12,"div",48),l(13,"Kind"),a(),d(14,"div",49),l(15),a()(),g(16,We,5,1,"div",47),d(17,"div",47)(18,"div",48),l(19,"Doc"),a(),d(20,"div",49),l(21),a()(),d(22,"div",47)(23,"div",48),l(24,"Siblings"),a(),d(25,"div",49),l(26),a()(),d(27,"div",47)(28,"div",48),l(29,"Links"),a(),d(30,"div",49),l(31),a()()(),d(32,"div",50),l(33,"Requirement"),a(),s(34,"div",51),g(35,He,4,1,"details",52),g(36,Ue,12,4),d(37,"div",50),l(38,"Linked code"),a(),g(39,Ke,1,0,"div",53)(40,Ye,3,0,"div",54)(41,Ze,4,1,"div",55),d(42,"div",56)(43,"button",57),s(44,"app-icon",58),l(45," Implement "),a(),d(46,"button",59),s(47,"app-icon",60),l(48," Verify "),a(),d(49,"button",61),b("click",function(){v(e);let r=c(2);return C(r.onEditClick())}),s(50,"app-icon",62),l(51," Edit spec "),a(),d(52,"button",61),b("click",function(){let r=v(e),m=c(2);return C(m.goToGraph(r.id))}),s(53,"app-icon",63),l(54," Show in graph "),a()(),g(55,et,2,1,"div",64),a()}if(n&2){let e,i=t,r=c(2);o(3),_(i.id),o(),p("text",i.id),o(2),p("state",i.kind),o(),u(i.priority?7:-1),o(2),_(i.title),o(6),_(i.kind),o(),u(i.owner?16:-1),o(5),_(i.sourcePath.replace("specs/","")),o(5),h("",r.selectedSiblings().length," reqs"),o(5),_(r.selectedLinks().length),o(3),p("innerHTML",r.renderBody(i.body),R),o(),u(r.briefResource.state().data?35:-1),o(),u(r.criteria().length>0?36:-1),o(3),u(r.detailResource.state().loading?39:r.selectedLinks().length>0?40:41),o(5),p("size",13),o(3),p("size",13),o(3),p("size",13),o(3),p("size",13),o(2),u((e=r.saveError())?55:-1,e)}}function nt(n,t){n&1&&(d(0,"app-empty",13)(1,"code",89),l(2,"specship init -i"),a()())}function it(n,t){if(n&1){let e=M();d(0,"div",1)(1,"div",2)(2,"div",3),s(3,"app-icon",4),d(4,"span",5),l(5,"Specs"),a(),s(6,"span",6),d(7,"span",7),l(8),a()(),g(9,Se,21,5,"div",8),d(10,"div",9),g(11,ke,1,0,"app-empty",10),S(12,De,7,6,null,null,Me),g(14,$e,7,1),a()(),d(15,"div",11),g(16,je,1,1)(17,tt,56,19,"div",12)(18,nt,3,0,"app-empty",13),a()(),d(19,"app-draft-with-claude-modal",14),b("close",function(){v(e);let r=c();return C(r.onDraftModalClose())}),a()}if(n&2){let e,i,r=c();o(3),p("size",15),o(5),h(" ",r.resource.state().loading?"\u2026":r.totalCount()+" reqs"," "),o(),u((e=r.funnel())?9:-1,e),o(2),u(r.groups().length===0&&!r.resource.state().loading?11:-1),o(),k(r.groups()),o(2),u(r.ideas().length>0?14:-1),o(2),u(r.editing()?16:(i=r.selectedSpec())?17:18,i),o(3),p("open",r.draftModalOpen())}}function ge(n){return n.replace(/<!--[\s\S]*?-->/g,"")}var ot={verified:"check",implemented:"check",completed:"check",drifted:"drift",broken:"cancel",orphaned:"cancel",failed:"cancel"};function rt(n){return n.length?n.some(t=>t.state==="broken")?"broken":n.some(t=>t.state==="orphaned")?"orphaned":n.some(t=>t.state==="drifted")?"drifted":n.every(t=>t.state==="verified")?"verified":"implemented":"pending"}var ue=class n{api=y(Z);projects=y(ee);router=y(Y);conn=y(te);sanitizer=y(F);resource=V(this.api,()=>`/api/specs${this.projects.projectQuery()}`);funnelResource=V(this.api,()=>`/api/spec/funnel${this.projects.projectQuery()}`);funnel=x(()=>this.funnelResource.state().data??null);ideas=x(()=>this.funnel()?.ideas??[]);detailResource=V(this.api,()=>{let t=this.sel();return t?`/api/spec/${encodeURIComponent(t)}${this.projects.projectQuery()}`:null});briefResource=V(this.api,()=>{let t=this.sel();return t?`/api/spec/${encodeURIComponent(t)}/brief${this.projects.projectQuery()}`:null});briefHtml=x(()=>this.renderBody(this.briefResource.state().data?.markdown??""));sel=f(null);expandedGroups=f(new Set);editing=f(!1);editingSource=f(null);editingDirty=f(!1);saving=f(!1);saveError=f(null);draftModalOpen=f(!1);STATE=$;groups=x(()=>{let t=(this.resource.state().data?.specs??[]).filter(i=>i.kind!=="brief"),e=new Map;for(let i of t){let r=i.sourcePath||"(unknown)";e.has(r)||e.set(r,{path:r,title:r.replace(/^specs\//,""),specs:[]}),e.get(r).specs.push(i)}return[...e.values()]});totalCount=x(()=>this.groups().reduce((t,e)=>t+e.specs.length,0));selectedSpec=x(()=>{let t=this.sel();return t?(this.resource.state().data?.specs??[]).find(i=>i.id===t)??null:null});selectedLinks=x(()=>this.detailResource.state().data?.links??[]);criteria=x(()=>{let t=this.detailResource.state().data,e=t?.childLinks??{};return(t?.children??[]).filter(i=>i.kind==="acceptance").map(i=>{let r=rt(e[i.id]??[]);return{id:i.id,title:ge(i.title).trim(),state:r,met:r==="verified"}})});metCount=x(()=>this.criteria().filter(t=>t.met).length);critIcon(t){return ot[t]??null}critColor(t){return $[t]?.color??"var(--text-muted)"}critBg(t){return $[t]?.bg??"rgba(255,255,255,0.05)"}stateLabel(t){return $[t]?.label??t}selectedSiblings=x(()=>{let t=this.selectedSpec();if(!t)return[];let e=this.groups().find(i=>i.path===t.sourcePath);return e?e.specs.filter(i=>i.id!==t.id):[]});isGroupOpen(t){return!this.expandedGroups().has("closed:"+t)}toggleGroup(t){this.expandedGroups.update(e=>{let i="closed:"+t,r=new Set(e);return r.has(i)?r.delete(i):r.add(i),r})}driftCountForGroup(t){let e=this.selectedSpec();return!e||e.sourcePath!==t.path?0:this.selectedLinks().filter(i=>["drifted","broken","orphaned"].includes(i.state)).length}stateColorFor(t){return $[t]?.color??"var(--node-spec)"}select(t){this.editing()&&(this.editing.set(!1),this.editingSource.set(null),this.editingDirty.set(!1)),this.sel.set(t)}renderBody(t){return this.sanitizer.bypassSecurityTrustHtml(j(ge(t)))}goToGraph(t){this.router.navigate(["/graph"],{queryParams:{focus:"spec:"+t}})}open(t){this.router.navigate(["/specs",t])}async onEditClick(){let t=this.selectedSpec();if(t){this.saveError.set(null),this.editing.set(!0),this.editingSource.set(null);try{let e=this.projects.projectQuery(),i=await this.api.get(`/api/spec/${encodeURIComponent(t.id)}${e}`);this.editingSource.set(i.source??t.body)}catch(e){this.saveError.set(`Couldn't load source: ${e instanceof Error?e.message:String(e)}`),this.editing.set(!1)}}}onEditorValueChange(t){this.editingSource.set(t),this.editingDirty.set(!0)}async onEditorSave(){let t=this.selectedSpec(),e=this.editingSource();if(!(!t||e===null)){if(!this.conn.online()){this.saveError.set("Offline \u2014 reconnect to save your changes");return}this.saving.set(!0),this.saveError.set(null);try{let i=this.projects.projectQuery();await this.api.put(`/api/spec/${encodeURIComponent(t.id)}${i}`,{content:e}),this.editing.set(!1),this.editingDirty.set(!1),this.editingSource.set(null),this.resource.refetch()}catch(i){this.saveError.set(`Save failed: ${i instanceof Error?i.message:String(i)}`)}finally{this.saving.set(!1)}}}onEditorCancel(){this.editingDirty()&&!window.confirm("Discard unsaved changes?")||(this.editing.set(!1),this.editingSource.set(null),this.editingDirty.set(!1),this.saveError.set(null))}onDraftWithClaudeClick(){this.draftModalOpen.set(!0)}onDraftModalClose(){this.draftModalOpen.set(!1)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=z({type:n,selectors:[["app-specs"]],decls:2,vars:1,consts:[["surface","Specs"],[1,"specs-shell"],[1,"tree-col"],[1,"tree-header","row","gap-8"],["name","book",2,"color","var(--accent)",3,"size"],[2,"font-weight","600","font-size","13px"],[1,"grow"],[1,"muted","tabular",2,"font-size","11px"],["aria-label","Spec lifecycle funnel",1,"row","gap-8",2,"padding","6px 12px","border-bottom","1px solid var(--border-subtle)","font-size","11px","color","var(--text-secondary)"],[1,"scroll-y","tree-scroll"],["icon","book","title","No specs found","body","Run specship init -i against a project with a specs/ directory."],[1,"detail-col","col"],[1,"scroll-y","detail-scroll"],["icon","book","title","Pick a spec from the tree","body","Or run specship init -i to index your specs/ folder if you haven't yet."],[3,"close","open"],[2,"color","var(--text-primary)"],[2,"color","var(--text-muted)"],[2,"color","var(--warn)"],[1,"doc-row","row","gap-6",3,"click"],[2,"color","var(--text-muted)",3,"name","size"],["name","book",2,"color","var(--node-spec)",3,"size"],[1,"mono","grow","doc-name"],[1,"pill",2,"font-size","9.5px","color","var(--warn)","background","var(--warn-soft)"],[1,"group-body"],["role","button","tabindex","0",1,"req-row","row","gap-6",3,"selected"],["role","button","tabindex","0",1,"req-row","row","gap-6",3,"click","keydown.enter","keydown.space"],[1,"pill-dot",2,"flex-shrink","0"],[1,"grow",2,"min-width","0"],[1,"mono","req-id"],[1,"muted","req-title"],[1,"row","gap-6",2,"padding","10px 12px 2px","font-size","11px","color","var(--text-muted)"],[1,"mono","grow",2,"letter-spacing","0.5px"],[1,"tabular",2,"font-size","10.5px"],[1,"req-row","row","gap-6",3,"selected"],[1,"req-row","row","gap-6",3,"click"],[1,"pill-dot",2,"background","var(--text-muted)","flex-shrink","0"],[1,"loading-detail"],[3,"value","path"],[1,"save-error"],[1,"save-status"],[3,"valueChange","save","cancel","value","path"],[1,"row","gap-8",2,"margin-bottom","4px"],[1,"mono",2,"font-size","12px","color","var(--node-spec)"],[3,"text"],[3,"state"],[1,"detail-title"],[1,"meta-row","row"],[1,"meta-item"],[1,"muted",2,"font-size","10.5px"],[1,"mono",2,"font-size","12.5px","margin-top","1px"],[1,"eyebrow",2,"margin-bottom","8px"],[1,"detail-body","md-content",3,"innerHTML"],[1,"brief-panel"],[1,"skel",2,"height","42px","border-radius","8px","margin-bottom","22px"],[1,"card",2,"overflow","hidden","margin-bottom","22px"],[1,"card","card-pad","orphan-card"],[1,"row","gap-8",2,"flex-wrap","wrap"],["type","button",1,"btn","btn-primary","btn-sm"],["name","play",3,"size"],["type","button",1,"btn","btn-secondary","btn-sm"],["name","check",3,"size"],["type","button",1,"btn","btn-secondary","btn-sm",3,"click"],["name","reveal",3,"size"],["name","graph",3,"size"],[1,"save-error",2,"margin-top","16px"],[1,"eyebrow","brief-summary"],[1,"detail-body","brief-body","md-content",3,"innerHTML"],[1,"row","crit-head"],[1,"eyebrow"],[1,"mono","tabular","crit-rollup"],[1,"crit-bars"],[1,"crit-seg",3,"pending","background","title"],[1,"card","crit-card"],[1,"row","gap-10","crit-row",3,"border-top"],[1,"crit-seg",3,"title"],[1,"row","gap-10","crit-row"],[1,"crit-mark",3,"title"],[3,"name","size"],[1,"crit-dot",3,"border-color"],[1,"mono","crit-id"],[1,"crit-text"],[1,"crit-dot"],[1,"row","gap-10","link-row",3,"border-top"],[1,"row","gap-10","link-row"],["color","var(--warn)","bg","var(--warn-soft)"],[1,"mono","grow","link-target"],["type","button",1,"btn","btn-ghost","btn-xs"],["name","drift",3,"size"],[2,"margin-top","6px","font-size","12.5px"],["action","",1,"mono",2,"font-size","11.5px","color","var(--accent)","background","var(--bg-canvas)","padding","5px 10px","border-radius","6px","border","1px solid var(--border-subtle)"]],template:function(e,i){e&1&&g(0,Pe,1,0,"app-pick-project-empty",0)(1,it,20,7),e&2&&u(i.resource.state().noProject?0:1)},dependencies:[ne,I,W,H,re,ie,ae,oe],styles:['@charset "UTF-8";[_nghost-%COMP%]{display:contents}.specs-shell[_ngcontent-%COMP%]{flex:1;display:flex;min-height:0}.tree-col[_ngcontent-%COMP%]{width:280px;flex-shrink:0;border-right:1px solid var(--border-subtle);background:var(--bg-panel);display:flex;flex-direction:column;min-height:0}.tree-header[_ngcontent-%COMP%]{padding:11px 12px;border-bottom:1px solid var(--border-subtle);align-items:center}.tree-scroll[_ngcontent-%COMP%]{flex:1;padding:6px}.doc-row[_ngcontent-%COMP%]{padding:6px 8px;border-radius:6px;cursor:pointer;color:var(--text-secondary);align-items:center}.doc-row[_ngcontent-%COMP%]:hover{background:var(--bg-hover)}.doc-name[_ngcontent-%COMP%]{font-size:12px;color:var(--text-primary);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.group-body[_ngcontent-%COMP%]{margin-left:14px;border-left:1px solid var(--border-subtle);padding-left:6px}.req-row[_ngcontent-%COMP%]{padding:5px 8px;border-radius:6px;cursor:pointer;align-items:flex-start;background:transparent}.req-row[_ngcontent-%COMP%]:not(.selected):hover{background:var(--bg-hover)}.req-row.selected[_ngcontent-%COMP%]{background:var(--accent-soft)}.req-id[_ngcontent-%COMP%]{font-size:11px}.req-title[_ngcontent-%COMP%]{font-size:10.5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.detail-col[_ngcontent-%COMP%]{flex:1;min-width:0}.detail-scroll[_ngcontent-%COMP%]{flex:1;padding:22px}.detail-title[_ngcontent-%COMP%]{font-size:22px;font-weight:650;letter-spacing:-.01em;margin:2px 0 14px;text-wrap:pretty}.meta-row[_ngcontent-%COMP%]{gap:18px;padding:10px 0;border-top:1px solid var(--border-subtle);border-bottom:1px solid var(--border-subtle);margin-bottom:18px;flex-wrap:wrap}.detail-body[_ngcontent-%COMP%]{font-size:13.5px;line-height:1.65;color:var(--text-secondary);margin-bottom:22px;text-wrap:pretty}.brief-panel[_ngcontent-%COMP%]{border:1px solid var(--border-subtle);border-radius:8px;padding:0 12px;margin-bottom:22px;background:var(--bg-panel)}.brief-summary[_ngcontent-%COMP%]{padding:10px 0;cursor:pointer;list-style:none;display:flex;align-items:center;gap:6px;-webkit-user-select:none;user-select:none;margin-bottom:0}.brief-summary[_ngcontent-%COMP%]::-webkit-details-marker{display:none}.brief-summary[_ngcontent-%COMP%]:before{content:"\\25b6";font-size:8px;color:var(--text-muted);transition:transform .15s}details[open][_ngcontent-%COMP%] > .brief-summary[_ngcontent-%COMP%]:before{transform:rotate(90deg)}.brief-body[_ngcontent-%COMP%]{margin-bottom:12px}.link-row[_ngcontent-%COMP%]{padding:10px 12px}.crit-head[_ngcontent-%COMP%]{margin-bottom:8px;gap:10px;align-items:center}.crit-rollup[_ngcontent-%COMP%]{font-size:11px}.crit-bars[_ngcontent-%COMP%]{display:flex;gap:4px;margin-bottom:10px}.crit-seg[_ngcontent-%COMP%]{flex:1;height:4px;border-radius:999px;opacity:.9}.crit-seg.pending[_ngcontent-%COMP%]{opacity:.25}.crit-card[_ngcontent-%COMP%]{overflow:hidden;margin-bottom:22px}.crit-row[_ngcontent-%COMP%]{padding:10px 12px;align-items:center}.crit-mark[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;border-radius:5px;flex-shrink:0}.crit-dot[_ngcontent-%COMP%]{width:7px;height:7px;border-radius:50%;border:1.6px solid currentColor;box-sizing:border-box}.crit-id[_ngcontent-%COMP%]{font-size:10px;color:var(--text-muted);flex-shrink:0;width:22px}.crit-text[_ngcontent-%COMP%]{font-size:13px;color:var(--text-secondary);line-height:1.45}.link-target[_ngcontent-%COMP%]{font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.orphan-card[_ngcontent-%COMP%]{text-align:center;color:var(--error);margin-bottom:22px;border-color:#f2555a4d}.loading-detail[_ngcontent-%COMP%]{padding:40px 18px;color:var(--text-muted);font-size:13px;text-align:center}.save-error[_ngcontent-%COMP%]{padding:10px 14px;border:1px solid rgba(255,90,90,.35);background:var(--error-soft);color:var(--error);border-radius:8px;font-size:12.5px;line-height:1.5}.save-status[_ngcontent-%COMP%]{margin-top:8px;color:var(--text-muted);font-size:12px}.md-content[_ngcontent-%COMP%] .md-h1[_ngcontent-%COMP%]{font-size:15px;font-weight:650;color:var(--text-primary);letter-spacing:-.01em;margin:0 0 10px}.md-content[_ngcontent-%COMP%] .md-h2[_ngcontent-%COMP%]{font-size:13px;font-weight:650;color:var(--text-primary);letter-spacing:-.005em;margin:18px 0 6px;padding-bottom:4px;border-bottom:1px solid var(--border-subtle)}.md-content[_ngcontent-%COMP%] .md-h3[_ngcontent-%COMP%]{font-size:12px;font-weight:650;color:var(--text-primary);margin:14px 0 6px}.md-content[_ngcontent-%COMP%] .md-h4[_ngcontent-%COMP%]{font-size:10.5px;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:var(--text-muted);margin:12px 0 4px}.md-content[_ngcontent-%COMP%] .md-p[_ngcontent-%COMP%]{font-size:12.5px;line-height:1.6;color:var(--text-secondary);margin:0 0 4px;overflow-wrap:anywhere}.md-content[_ngcontent-%COMP%] .md-p[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{color:var(--text-primary)}.md-content[_ngcontent-%COMP%] .md-list[_ngcontent-%COMP%], .md-content[_ngcontent-%COMP%] .md-ol[_ngcontent-%COMP%]{padding:0;margin:4px 0 6px}.md-content[_ngcontent-%COMP%] .md-list[_ngcontent-%COMP%] li[_ngcontent-%COMP%], .md-content[_ngcontent-%COMP%] .md-ol[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{position:relative;padding:2px 0 2px 22px;font-size:12.5px;line-height:1.6;color:var(--text-secondary);overflow-wrap:anywhere}.md-content[_ngcontent-%COMP%] .md-list[_ngcontent-%COMP%] li[_ngcontent-%COMP%] strong[_ngcontent-%COMP%], .md-content[_ngcontent-%COMP%] .md-ol[_ngcontent-%COMP%] li[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{color:var(--text-primary)}.md-content[_ngcontent-%COMP%] .md-list[_ngcontent-%COMP%]{list-style:none}.md-content[_ngcontent-%COMP%] .md-list[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:before{content:"\\2022";position:absolute;left:6px;top:2px;color:var(--text-faint)}.md-content[_ngcontent-%COMP%] .md-ol[_ngcontent-%COMP%]{list-style:none;counter-reset:md-ol}.md-content[_ngcontent-%COMP%] .md-ol[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{counter-increment:md-ol}.md-content[_ngcontent-%COMP%] .md-ol[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:before{content:counter(md-ol) ".";position:absolute;left:0;top:2px;color:var(--text-faint);font-family:var(--font-mono);font-size:11.5px;min-width:18px;text-align:right}.md-content[_ngcontent-%COMP%] .md-spacer[_ngcontent-%COMP%]{height:6px}.md-content[_ngcontent-%COMP%] .md-import[_ngcontent-%COMP%]{display:inline-block;font-size:11.5px;color:var(--node-route);background:var(--node-route-soft);padding:2px 8px;border-radius:5px;margin:4px 0}.md-content[_ngcontent-%COMP%] .md-inline-code[_ngcontent-%COMP%]{font-size:11.5px;background:var(--bg-canvas);padding:1px 6px;border-radius:4px;border:1px solid var(--border-subtle);color:var(--node-spec)}.md-content[_ngcontent-%COMP%] .md-blockquote[_ngcontent-%COMP%]{margin:6px 0;padding:8px 12px;border-left:3px solid var(--accent);background:var(--accent-soft);color:var(--text-secondary);font-size:12.5px;line-height:1.55;border-radius:0 6px 6px 0}.md-content[_ngcontent-%COMP%] .md-pre[_ngcontent-%COMP%]{position:relative;margin:8px 0 10px;padding:12px 14px;background:var(--bg-canvas);border:1px solid var(--border-subtle);border-radius:8px;overflow-x:auto;max-width:100%}.md-content[_ngcontent-%COMP%] .md-pre[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{display:block;font-size:11.5px;line-height:1.55;color:var(--text-primary);white-space:pre}.md-content[_ngcontent-%COMP%] .md-pre-lang[_ngcontent-%COMP%]{position:absolute;top:6px;right:10px;font-size:10px;font-weight:600;color:var(--text-muted);text-transform:lowercase;background:var(--bg-panel);padding:1px 6px;border-radius:4px;border:1px solid var(--border-subtle)}.md-content[_ngcontent-%COMP%] .md-table-scroll[_ngcontent-%COMP%]{max-width:100%;overflow-x:auto;margin:10px 0;border:1px solid var(--border-subtle);border-radius:8px}.md-content[_ngcontent-%COMP%] .md-table[_ngcontent-%COMP%]{width:100%;border-collapse:collapse;font-size:11.5px}.md-content[_ngcontent-%COMP%] .md-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%], .md-content[_ngcontent-%COMP%] .md-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:8px 12px;text-align:left;vertical-align:top;border-bottom:1px solid var(--border-subtle)}.md-content[_ngcontent-%COMP%] .md-table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{background:var(--bg-panel);font-weight:650;color:var(--text-primary);font-size:10.5px;text-transform:uppercase;letter-spacing:.04em;border-bottom:1px solid var(--border-strong);white-space:nowrap}.md-content[_ngcontent-%COMP%] .md-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{color:var(--text-secondary)}.md-content[_ngcontent-%COMP%] .md-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:last-child td[_ngcontent-%COMP%]{border-bottom:0}.md-content[_ngcontent-%COMP%] .md-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:hover{background:var(--bg-hover)}.md-content[_ngcontent-%COMP%] > [_ngcontent-%COMP%]:first-child{margin-top:0}'],changeDetection:0})};export{ue as Specs};
@@ -0,0 +1 @@
1
+ import{a as U}from"./chunk-NKPK3BR3.js";import{a as G}from"./chunk-G7VZT5KB.js";import{a as q}from"./chunk-YWIRU745.js";import{a as Q}from"./chunk-JLOJCDIY.js";import{a as B}from"./chunk-PZSU53SS.js";import{a as h,b as j}from"./chunk-WBJ5VEB5.js";import{a as N,c as $,d as V}from"./chunk-DOKZOFKM.js";import{c as A}from"./chunk-DTWIJ3GJ.js";import{a as F}from"./chunk-JGDK6YKG.js";import{a as R}from"./chunk-TWVVIWKO.js";import{Aa as s,Ga as P,I as v,Ia as C,Ka as c,M as f,N as b,Ta as M,Ua as w,Va as l,W as E,Wa as _,Xa as y,Ya as O,aa as T,ea as i,ka as z,lb as m,qa as I,ra as g,sa as u,va as k,wa as S,xa as p,ya as a,yb as L,za as r,zb as H}from"./chunk-SYGIPC2P.js";import"./chunk-Q7L6LLAK.js";var D=(n,e)=>e.id;function W(n,e){n&1&&(a(0,"div",1),s(1,"div",3)(2,"div",4)(3,"div",5)(4,"div",6)(5,"div",7),r())}function X(n,e){if(n&1&&(a(0,"app-empty",2)(1,"a",8),s(2,"app-icon",9),l(3," Back to Specs "),r()()),n&2){let t=c();p("body","No spec matches "+t.specId()+"."),i(2),p("size",12)}}function Y(n,e){if(n&1&&(a(0,"app-pill",20),l(1),r()),n&2){let t=c();p("color","var(--node-code)")("bg","var(--node-code-soft)"),i(),_(t.priority)}}function Z(n,e){if(n&1&&(a(0,"span",22),l(1,"owned by "),a(2,"span",37),l(3),r()()),n&2){let t=c();i(3),_(t.owner)}}function ee(n,e){if(n&1&&(a(0,"span",22),l(1),r()),n&2){let t=c(2);i(),y("verified ",t.relTime(e))}}function te(n,e){if(n&1&&s(0,"span",43),n&2){let t=e.$implicit,o=c(3);M("background",o.critColor(t.state)),w("pending",t.state==="pending"),p("title",t.id+" \xB7 "+o.stateLabel(t.state))}}function ne(n,e){n&1&&s(0,"app-icon",45),n&2&&p("name",e)("size",12)}function ie(n,e){if(n&1&&s(0,"span",49),n&2){let t=c().$implicit,o=c(3);M("border-color",o.critColor(t.state))}}function oe(n,e){if(n&1&&(a(0,"div",42)(1,"span",44),g(2,ne,1,2,"app-icon",45)(3,ie,1,2,"span",46),r(),a(4,"span",47),l(5),r(),a(6,"span",48),l(7),r()()),n&2){let t,o=e.$implicit,d=e.$index,x=c(3);i(),M("background",x.critBg(o.state))("color",x.critColor(o.state)),p("title",x.stateLabel(o.state)),i(),u((t=x.critIcon(o.state))?2:3,t),i(3),y("A",d+1),i(2),_(o.title)}}function re(n,e){if(n&1&&(a(0,"section",23)(1,"div",26)(2,"div",24),l(3,"Acceptance criteria"),r(),a(4,"div",38),l(5),r()(),a(6,"div",39),k(7,te,1,5,"span",40,D),r(),a(9,"div",41),k(10,oe,8,8,"div",42,D),r()()),n&2){let t=c(2);i(4),w("all-met",t.metCount()===t.criteria().length),i(),O(" ",t.metCount()," / ",t.criteria().length," met "),i(2),S(t.criteria()),i(3),S(t.criteria())}}function ae(n,e){if(n&1&&(a(0,"div",27),l(1),r()),n&2){let t=c(2);i(),O("",t.links().length," ",t.links().length===1?"symbol":"symbols")}}function de(n,e){if(n&1&&(a(0,"div",28),l(1,"No linked code yet \u2014 run "),a(2,"span",50),l(3),r(),l(4," to link it."),r()),n&2){let t,o=c(2);i(3),y("/specship:spec implement ",(t=o.spec())==null?null:t.id)}}function le(n,e){if(n&1&&(a(0,"app-pill"),l(1),r()),n&2){let t=c().$implicit;i(),_(t.provenance)}}function ce(n,e){if(n&1){let t=P();a(0,"div",51),s(1,"app-state-pill",52),a(2,"span",53),l(3),r(),s(4,"span",54),g(5,le,2,1,"app-pill"),a(6,"button",55),C("click",function(){let d=f(t).$implicit,x=c(3);return b(x.revealLink(d))}),s(7,"app-icon",56),l(8," Reveal "),r()()}if(n&2){let t=e.$implicit,o=c(3);i(),p("state",t.state),i(2),_(o.linkTarget(t)),i(2),u(t.provenance?5:-1),i(),I("aria-label","Reveal "+o.linkTarget(t)),i(),p("size",12)}}function pe(n,e){if(n&1&&(a(0,"div",29),k(1,ce,9,5,"div",51,D),r()),n&2){let t=c(2);i(),S(t.links())}}function se(n,e){if(n&1){let t=P();a(0,"div",10)(1,"a",11),s(2,"app-icon",12),l(3," Specs "),r(),a(4,"span",13),l(5,"/"),r(),a(6,"span",14),l(7),r(),a(8,"span",13),l(9,"\xB7"),r(),a(10,"span",15),l(11),r(),s(12,"app-copy-btn",16),r(),a(13,"h1",17),l(14),r(),a(15,"div",18),s(16,"app-state-pill",19),g(17,Y,2,3,"app-pill",20),a(18,"span",21),l(19),r(),g(20,Z,4,1,"span",22),g(21,ee,2,1,"span",22),r(),a(22,"section",23)(23,"div",24),l(24,"Requirement"),r(),s(25,"div",25),r(),g(26,re,12,4,"section",23),a(27,"section",23)(28,"div",26)(29,"div",24),l(30,"Linked code"),r(),g(31,ae,2,2,"div",27),r(),g(32,de,5,1,"div",28)(33,pe,3,0,"div",29),r(),a(34,"div",30)(35,"button",31),C("click",function(){f(t);let d=c();return b(d.onImplement())}),s(36,"app-icon",32),l(37),r(),a(38,"button",33),C("click",function(){f(t);let d=c();return b(d.onVerify())}),s(39,"app-icon",34),l(40),r(),a(41,"button",33),C("click",function(){f(t);let d=c();return b(d.onEdit())}),s(42,"app-icon",35),l(43," Edit spec "),r(),a(44,"button",33),C("click",function(){f(t);let d=c();return b(d.onShowInGraph())}),s(45,"app-icon",36),l(46," Show in graph "),r()()}if(n&2){let t,o=e,d=c();i(2),p("size",13),i(5),_(o.sourcePath),i(4),_(o.id),i(),p("text",o.id),i(2),_(o.title),i(2),p("state",d.overallState())("withDot",!0),i(),u(o.priority?17:-1),i(2),_(o.kind),i(),u(o.owner?20:-1),i(),u((t=d.verifiedAt())?21:-1,t),i(4),p("innerHTML",d.bodyHtml(),T),i(),u(d.criteria().length>0?26:-1),i(5),u(d.links().length>0?31:-1),i(),u(d.links().length===0?32:33),i(4),p("size",12),i(),y(" ",d.copied()==="implement"?"Copied!":"Implement"," "),i(2),p("size",12),i(),y(" ",d.copied()==="verify"?"Copied!":"Verify"," "),i(2),p("size",12),i(3),p("size",12)}}function K(n){return n.replace(/<!--[\s\S]*?-->/g,"")}var me=["broken","orphaned","drifted","drafted","implementing","implemented","verified"],xe={verified:"check",implemented:"check",completed:"check",drifted:"drift",broken:"cancel",orphaned:"cancel",failed:"cancel"};function ge(n){return n.length?n.some(e=>e.state==="broken")?"broken":n.some(e=>e.state==="orphaned")?"orphaned":n.some(e=>e.state==="drifted")?"drifted":n.every(e=>e.state==="verified")?"verified":"implemented":"pending"}var J=class n{api=v(R);projects=v(F);router=v($);route=v(N);sanitizer=v(L);paramMap=U(this.route.paramMap,{initialValue:this.route.snapshot.paramMap});specId=m(()=>this.paramMap().get("id")??"");detail=A(this.api,()=>{let e=this.specId();return e?`/api/spec/${encodeURIComponent(e)}${this.projects.projectQuery()}`:null});loading=m(()=>this.detail.state().loading);spec=m(()=>this.detail.state().data?.spec??null);links=m(()=>this.detail.state().data?.links??[]);children=m(()=>this.detail.state().data?.children??[]);childLinks=m(()=>this.detail.state().data?.childLinks??{});notFound=m(()=>!this.loading()&&!!this.specId()&&!this.spec());overallState=m(()=>{let e=this.links();if(!e.length)return"drafted";for(let t of me)if(e.some(o=>o.state===t))return t;return"implemented"});verifiedAt=m(()=>{let e=this.links().filter(t=>t.state==="verified").map(t=>t.updatedAt);return e.length?Math.max(...e):null});criteria=m(()=>{let e=this.childLinks();return this.children().filter(t=>t.kind==="acceptance").map(t=>{let o=e[t.id]??[],d=ge(o);return{id:t.id,title:K(t.title).trim(),state:d,hasLinks:o.length>0,met:d==="verified"}})});metCount=m(()=>this.criteria().filter(e=>e.met).length);critIcon(e){return xe[e]??null}critColor(e){return h[e]?.color??"var(--text-muted)"}critBg(e){return h[e]?.bg??"rgba(255,255,255,0.05)"}bodyHtml=m(()=>this.sanitizer.bypassSecurityTrustHtml(G(K(this.spec()?.body??""))));stateColor(e){return h[e]?.color??"var(--node-spec)"}stateLabel(e){return h[e]?.label??e}relTime(e){let t=Date.now()-e,o=Math.max(0,Math.round(t/1e3));if(o<60)return`${o}s ago`;let d=Math.round(o/60);if(d<60)return`${d}m ago`;let x=Math.round(d/60);return x<24?`${x}h ago`:`${Math.round(x/24)}d ago`}linkTarget(e){return`${e.targetFilePath}:${e.targetQualifiedName}`}copied=E(null);copyCmd(e,t){try{navigator.clipboard?.writeText(e)}catch{}this.copied.set(t),setTimeout(()=>{this.copied()===t&&this.copied.set(null)},1800)}onImplement(){let e=this.spec()?.id;e&&this.copyCmd(`/specship:spec implement ${e}`,"implement")}onVerify(){this.copyCmd("/specship:check","verify")}onEdit(){this.router.navigate(["/specs"])}onShowInGraph(){let e=this.spec()?.id;this.router.navigate(["/graph"],{queryParams:e?{focus:"spec:"+e}:{}})}revealLink(e){this.router.navigate(["/graph"],{queryParams:{focus:this.linkTarget(e)}})}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=z({type:n,selectors:[["app-spec-detail"]],decls:4,vars:1,consts:[[1,"scroll-y","spec-detail"],[1,"sd-skel"],["icon","book","title","Spec not found",3,"body"],[1,"skel",2,"height","16px","width","220px","border-radius","5px"],[1,"skel",2,"height","34px","width","60%","border-radius","7px","margin-top","14px"],[1,"skel",2,"height","20px","width","340px","border-radius","6px","margin-top","12px"],[1,"skel",2,"height","120px","border-radius","10px","margin-top","22px"],[1,"skel",2,"height","160px","border-radius","10px","margin-top","14px"],["action","","routerLink","/specs",1,"btn","btn-secondary","btn-sm"],["name","arrowRight",3,"size"],[1,"sd-crumb"],["routerLink","/specs",1,"sd-back"],["name","chevronLeft",3,"size"],[1,"sd-sep"],[1,"mono","sd-path"],[1,"mono","sd-id"],["label","Copy spec id",3,"text"],[1,"sd-title"],[1,"sd-meta"],[3,"state","withDot"],[3,"color","bg"],[1,"sd-meta-kind"],[1,"sd-meta-dim"],[1,"sd-section"],[1,"sd-eyebrow"],[1,"sd-prose",3,"innerHTML"],[1,"sd-section-head"],[1,"sd-count"],[1,"sd-empty-row"],[1,"sd-links"],[1,"sd-actions"],["type","button",1,"btn","btn-primary","btn-sm",3,"click"],["name","play",3,"size"],["type","button",1,"btn","btn-secondary","btn-sm",3,"click"],["name","check",3,"size"],["name","book",3,"size"],["name","graph",3,"size"],[1,"sd-meta-owner"],[1,"sd-rollup"],[1,"sd-crit-bars"],[1,"sd-crit-seg",3,"pending","background","title"],[1,"sd-criteria"],[1,"sd-crit"],[1,"sd-crit-seg",3,"title"],[1,"sd-crit-mark",3,"title"],[3,"name","size"],[1,"sd-crit-dot",3,"border-color"],[1,"sd-crit-id","mono"],[1,"sd-crit-text"],[1,"sd-crit-dot"],[1,"mono"],[1,"sd-link"],[3,"state"],[1,"mono","sd-link-target"],[1,"grow"],["type","button",1,"btn","btn-ghost","btn-xs",3,"click"],["name","reveal",3,"size"]],template:function(t,o){if(t&1&&(a(0,"div",0),g(1,W,6,0,"div",1)(2,X,4,2,"app-empty",2)(3,se,47,21),r()),t&2){let d;i(),u(o.loading()?1:o.notFound()?2:(d=o.spec())?3:-1,d)}},dependencies:[V,H,j,Q,B,q],styles:['@charset "UTF-8";[_nghost-%COMP%]{display:contents}.spec-detail[_ngcontent-%COMP%]{flex:1;padding:22px 26px 40px;color:var(--text-primary);background:var(--bg-canvas);max-width:920px}.sd-skel[_ngcontent-%COMP%]{display:flex;flex-direction:column}.sd-crumb[_ngcontent-%COMP%]{display:flex;align-items:center;gap:7px;font-size:12px;color:var(--text-muted);margin-bottom:12px}.sd-back[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:3px;color:var(--text-secondary);text-decoration:none;cursor:pointer}.sd-back[_ngcontent-%COMP%]:hover{color:var(--text-primary)}.sd-sep[_ngcontent-%COMP%]{color:var(--text-faint)}.sd-path[_ngcontent-%COMP%]{color:var(--text-secondary)}.sd-id[_ngcontent-%COMP%]{color:var(--node-spec)}.sd-title[_ngcontent-%COMP%]{font-size:24px;font-weight:650;letter-spacing:-.02em;line-height:1.18;margin:0 0 12px;color:var(--text-primary)}.sd-meta[_ngcontent-%COMP%]{display:flex;align-items:center;flex-wrap:wrap;gap:10px;margin-bottom:26px;font-size:12px}.sd-meta-kind[_ngcontent-%COMP%]{font-size:11px;color:var(--text-secondary);background:var(--bg-hover);border:1px solid var(--border-subtle);padding:2px 8px;border-radius:5px}.sd-meta-dim[_ngcontent-%COMP%]{color:var(--text-muted)}.sd-meta-owner[_ngcontent-%COMP%]{color:var(--text-secondary)}.sd-section[_ngcontent-%COMP%]{margin-bottom:24px}.sd-section-head[_ngcontent-%COMP%]{display:flex;align-items:baseline;justify-content:space-between;margin-bottom:10px}.sd-eyebrow[_ngcontent-%COMP%]{font-size:10.5px;font-weight:650;letter-spacing:.09em;text-transform:uppercase;color:var(--text-muted);margin-bottom:10px}.sd-section-head[_ngcontent-%COMP%] .sd-eyebrow[_ngcontent-%COMP%]{margin-bottom:0}.sd-prose[_ngcontent-%COMP%]{font-size:14px;line-height:1.62;color:var(--text-secondary)}.sd-prose[_ngcontent-%COMP%] [_ngcontent-%COMP%]:global(strong){color:var(--text-primary);font-weight:600}.sd-prose[_ngcontent-%COMP%] [_ngcontent-%COMP%]:global(code){font-family:ui-monospace,Geist Mono,monospace;font-size:.86em;color:var(--node-spec);background:var(--node-spec-soft);padding:1px 5px;border-radius:4px}.sd-prose[_ngcontent-%COMP%] [_ngcontent-%COMP%]:global(p){margin:0 0 10px}.sd-rollup[_ngcontent-%COMP%]{font-size:11px;font-weight:600;color:var(--text-muted);font-family:ui-monospace,monospace}.sd-rollup.all-met[_ngcontent-%COMP%]{color:var(--success)}.sd-crit-bars[_ngcontent-%COMP%]{display:flex;gap:4px;margin-bottom:12px}.sd-crit-seg[_ngcontent-%COMP%]{flex:1;height:4px;border-radius:999px;opacity:.9}.sd-crit-seg.pending[_ngcontent-%COMP%]{opacity:.25}.sd-criteria[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:6px}.sd-crit[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;padding:10px 12px;border-radius:8px;background:var(--bg-panel);border:1px solid var(--border-subtle)}.sd-crit-mark[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;border-radius:5px;flex-shrink:0}.sd-crit-dot[_ngcontent-%COMP%]{width:7px;height:7px;border-radius:50%;border:1.6px solid currentColor;box-sizing:border-box}.sd-crit-id[_ngcontent-%COMP%]{font-size:10px;color:var(--text-muted);flex-shrink:0;width:22px}.sd-crit-text[_ngcontent-%COMP%]{font-size:13px;color:var(--text-secondary);line-height:1.45}.sd-count[_ngcontent-%COMP%]{font-size:11px;color:var(--text-muted);font-family:ui-monospace,monospace}.sd-empty-row[_ngcontent-%COMP%]{font-size:12.5px;color:var(--text-muted);padding:12px;border-radius:8px;background:var(--bg-panel);border:1px dashed var(--border-subtle)}.sd-empty-row[_ngcontent-%COMP%] .mono[_ngcontent-%COMP%]{color:var(--text-secondary)}.sd-links[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:5px}.sd-link[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;padding:9px 12px;border-radius:8px;background:var(--bg-panel);border:1px solid var(--border-subtle);font-size:12.5px}.sd-link-state[_ngcontent-%COMP%]{display:inline-flex;align-items:center;flex-shrink:0}.sd-link-target[_ngcontent-%COMP%]{color:var(--text-primary)}.grow[_ngcontent-%COMP%]{flex:1}.sd-prov[_ngcontent-%COMP%]{font-size:10px;color:var(--text-muted);background:var(--bg-hover);border:1px solid var(--border-subtle);padding:1px 6px;border-radius:4px}.sd-link-statelabel[_ngcontent-%COMP%]{font-size:11px;font-weight:600}.sd-actions[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:8px;margin-top:28px;padding-top:18px;border-top:1px solid var(--border-subtle)}.mono[_ngcontent-%COMP%]{font-family:ui-monospace,Geist Mono,monospace}'],changeDetection:0})};export{J as SpecDetail};
@@ -1 +1 @@
1
- import{a as V}from"./chunk-YWIRU745.js";import{a as A}from"./chunk-JLOJCDIY.js";import{a as N}from"./chunk-5NTGUSXJ.js";import{b as B}from"./chunk-WBJ5VEB5.js";import{a as $}from"./chunk-SQPYSOV6.js";import{c as k}from"./chunk-DOKZOFKM.js";import{c as z}from"./chunk-DTWIJ3GJ.js";import{a as I}from"./chunk-JGDK6YKG.js";import{a as R}from"./chunk-TWVVIWKO.js";import{Aa as m,Ea as P,Fa as M,Ga as E,I as y,Ia as S,Ka as s,M as h,N as w,Va as r,Wa as x,Xa as v,Ya as b,bb as O,ea as i,ka as T,lb as _,ra as d,sa as p,ua as F,va as f,wa as u,xa as l,ya as o,za as a,zb as j}from"./chunk-SYGIPC2P.js";import{a as C,b as D}from"./chunk-Q7L6LLAK.js";var q=()=>[0,1,2],G=(e,t)=>t.type,J=(e,t)=>t.id,K=(e,t)=>t.specId+t.symbol;function L(e,t){e&1&&m(0,"app-pick-project-empty",0)}function U(e,t){e&1&&m(0,"div",7)}function W(e,t){e&1&&f(0,U,1,0,"div",7,F),e&2&&u(O(0,q))}function X(e,t){e&1&&(o(0,"div",5),r(1,"No domain data \u2014 run "),o(2,"code"),r(3,"specship index"),a(),r(4," first."),a())}function Y(e,t){e&1&&(o(0,"app-empty",6)(1,"button",8),m(2,"app-icon",9),r(3," Capture knowledge "),a()()),e&2&&(i(2),l("size",12))}function Z(e,t){if(e&1&&(o(0,"div",16),r(1),a()),e&2){let n=s().$implicit;i(),x(n.body)}}function ee(e,t){if(e&1&&(o(0,"div",24),r(1),a()),e&2){let n=t.$implicit;i(),b("governs ",n.specId," \u2192 ",n.symbol)}}function te(e,t){if(e&1&&(o(0,"div",18),f(1,ee,2,2,"div",24,K),a()),e&2){let n=s().$implicit;i(),u(n.governs)}}function ne(e,t){e&1&&m(0,"app-state-pill",20),e&2&&l("state",t)}function ie(e,t){e&1&&(o(0,"app-pill",4),r(1,"No linked code yet"),a()),e&2&&l("color","var(--text-muted)")("bg","var(--bg-elevated)")}function oe(e,t){if(e&1){let n=E();o(0,"button",25),S("click",function(){h(n);let g=s(5);return w(g.review())}),m(1,"app-icon",26),r(2," Review "),a()}e&2&&(i(),l("size",12))}function ae(e,t){if(e&1&&(o(0,"div",13)(1,"div",14)(2,"div",15),r(3),a(),d(4,Z,2,1,"div",16),o(5,"div",17),r(6),a(),d(7,te,3,0,"div",18),a(),o(8,"div",19),d(9,ne,1,1,"app-state-pill",20)(10,ie,2,2,"app-pill",4),o(11,"div",21),d(12,oe,3,1,"button",22),o(13,"button",23),m(14,"app-icon",9),r(15," Capture "),a()()()()),e&2){let n,c=t.$implicit,g=s(4);i(3),x(c.title),i(),p(c.body?4:-1),i(2),x(c.id),i(),p(c.governs.length?7:-1),i(2),p((n=g.stateOf(c))?9:c.state==="none"&&c.governs.length===0?10:-1,n),i(3),p(g.needsReview(c)?12:-1),i(2),l("size",12)}}function re(e,t){if(e&1&&(o(0,"section",10)(1,"div",11),r(2),o(3,"span",12),r(4),a()(),f(5,ae,16,7,"div",13,J),a()),e&2){let n=t.$implicit;i(2),v("",n.label," "),i(2),x(n.facts.length),i(),u(n.facts)}}function ce(e,t){if(e&1&&f(0,re,7,2,"section",10,G),e&2){let n=s(2);u(n.sections())}}function le(e,t){if(e&1&&(o(0,"div",1)(1,"app-page-head",2),P(2,3),o(3,"app-pill",4),r(4),a(),o(5,"app-pill",4),r(6),a(),M(),a(),d(7,W,2,1)(8,X,5,0,"div",5)(9,Y,4,1,"app-empty",6)(10,ce,2,0),a()),e&2){let n=s();i(3),l("color","var(--success)")("bg","var(--success-soft)"),i(),v("",n.coverage().documented," documented"),i(),l("color","var(--warn)")("bg","var(--warn-soft)"),i(),b("",n.coverage().gaps," gap",n.coverage().gaps===1?"":"s"),i(),p(n.resource.state().loading?7:n.data()?n.isEmpty()?9:10:8)}}var H=[{type:"term",label:"Terms"},{type:"rule",label:"Rules"},{type:"decision",label:"Decisions"},{type:"constraint",label:"Constraints"},{type:"other",label:"Other"}],Q=class e{api=y(R);projects=y(I);router=y(k);resource=z(this.api,()=>`/api/domain${this.projects.projectQuery()}`);data=_(()=>this.resource.state().data);coverage=_(()=>this.data()?.coverage??{documented:0,gaps:0});sections=_(()=>{let t=this.data();return t?H.map(n=>D(C({},n),{facts:t.factsByType[n.type]??[]})).filter(n=>n.facts.length>0):[]});total=_(()=>{let t=this.data();return t?H.reduce((n,c)=>n+(t.factsByType[c.type]?.length??0),0):0});isEmpty=_(()=>{let t=this.resource.state();return!t.loading&&!t.noProject&&t.data!=null&&this.total()===0});stateOf(t){return t.state==="none"?null:t.state}needsReview(t){return t.state==="drifted"}review(){this.router.navigate(["/drift"])}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=T({type:e,selectors:[["app-domain"]],decls:2,vars:1,consts:[["surface","The domain layer"],[1,"page","scroll-y"],["icon","book","title","Domain","sub","Human-confirmed knowledge \u2014 terms, rules, decisions, constraints"],["actions",""],[3,"color","bg"],[1,"empty"],["icon","book","title","No domain knowledge captured yet","body","Document the terms, rules, decisions, and constraints that the code can't tell you. Run /ss-spec domain to capture the first fact."],[1,"skel","card-skel"],["action","","type","button","title","Run /ss-spec domain to capture a domain fact",1,"btn","btn-primary","btn-sm"],["name","plus",3,"size"],[1,"sig","card"],[1,"sig-head"],[1,"n"],[1,"fact"],[1,"fact-main"],[1,"fact-title"],[1,"fact-body"],[1,"fact-id","mono"],[1,"fact-governs"],[1,"fact-side"],[3,"state"],[1,"fact-actions","row","gap-6"],["type","button",1,"btn","btn-secondary","btn-sm"],["type","button","title","Run /ss-spec domain to refine this fact",1,"btn","btn-secondary","btn-sm"],[1,"fact-governs-row","mono"],["type","button",1,"btn","btn-secondary","btn-sm",3,"click"],["name","drift",3,"size"]],template:function(n,c){n&1&&d(0,L,1,0,"app-pick-project-empty",0)(1,le,11,8,"div",1),n&2&&p(c.resource.state().noProject?0:1)},dependencies:[N,A,B,V,j,$],styles:[".page[_ngcontent-%COMP%]{padding:20px 24px 48px}.empty[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:8px;text-align:center;padding:64px 24px;color:var(--text-muted)}.empty[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{font-family:var(--font-mono, monospace);font-size:.92em}.card-skel[_ngcontent-%COMP%]{height:120px;border-radius:12px;margin-bottom:12px}.sig[_ngcontent-%COMP%]{padding:0;margin-bottom:14px;overflow:hidden}.sig-head[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;padding:12px 16px;font-size:13px;font-weight:600;border-bottom:1px solid var(--border, color-mix(in srgb, var(--text) 12%, transparent))}.sig-head[_ngcontent-%COMP%] .n[_ngcontent-%COMP%]{font-size:11px;font-weight:600;color:var(--text-muted);background:var(--bg-elevated, color-mix(in srgb, var(--text) 7%, transparent));border-radius:999px;padding:1px 8px}.fact[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:16px;padding:12px 16px;border-top:1px solid var(--border-subtle, color-mix(in srgb, var(--text) 6%, transparent))}.fact[_ngcontent-%COMP%]:first-of-type{border-top:none}.fact-main[_ngcontent-%COMP%]{min-width:0;flex:1}.fact-title[_ngcontent-%COMP%]{font-size:13px;font-weight:600;color:var(--text)}.fact-body[_ngcontent-%COMP%]{margin-top:3px;font-size:12.5px;line-height:1.5;color:var(--text-secondary, var(--text-muted))}.fact-id[_ngcontent-%COMP%]{margin-top:5px;font-size:11px;color:var(--text-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.fact-governs[_ngcontent-%COMP%]{margin-top:6px;display:flex;flex-direction:column;gap:2px}.fact-governs-row[_ngcontent-%COMP%]{font-size:11px;color:var(--text-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.fact-side[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-end;gap:8px;flex:0 0 auto}.fact-actions[_ngcontent-%COMP%]{flex-wrap:wrap;justify-content:flex-end}.mono[_ngcontent-%COMP%]{font-family:var(--font-mono, ui-monospace, monospace)}"],changeDetection:0})};export{Q as Domain};
1
+ import{a as V}from"./chunk-YWIRU745.js";import{a as A}from"./chunk-JLOJCDIY.js";import{a as N}from"./chunk-5NTGUSXJ.js";import{b as B}from"./chunk-WBJ5VEB5.js";import{a as $}from"./chunk-SQPYSOV6.js";import{c as k}from"./chunk-DOKZOFKM.js";import{c as z}from"./chunk-DTWIJ3GJ.js";import{a as I}from"./chunk-JGDK6YKG.js";import{a as R}from"./chunk-TWVVIWKO.js";import{Aa as m,Ea as P,Fa as M,Ga as E,I as y,Ia as S,Ka as s,M as D,N as w,Va as r,Wa as x,Xa as v,Ya as b,bb as O,ea as i,ka as T,lb as _,ra as d,sa as p,ua as F,va as f,wa as u,xa as l,ya as o,za as a,zb as j}from"./chunk-SYGIPC2P.js";import{a as C,b as h}from"./chunk-Q7L6LLAK.js";var q=()=>[0,1,2],G=(e,t)=>t.type,J=(e,t)=>t.id,K=(e,t)=>t.specId+t.symbol;function L(e,t){e&1&&m(0,"app-pick-project-empty",0)}function U(e,t){e&1&&m(0,"div",7)}function W(e,t){e&1&&f(0,U,1,0,"div",7,F),e&2&&u(O(0,q))}function X(e,t){e&1&&(o(0,"div",5),r(1,"No domain data \u2014 run "),o(2,"code"),r(3,"specship index"),a(),r(4," first."),a())}function Y(e,t){e&1&&(o(0,"app-empty",6)(1,"button",8),m(2,"app-icon",9),r(3," Capture knowledge "),a()()),e&2&&(i(2),l("size",12))}function Z(e,t){if(e&1&&(o(0,"div",16),r(1),a()),e&2){let n=s().$implicit;i(),x(n.body)}}function ee(e,t){if(e&1&&(o(0,"div",24),r(1),a()),e&2){let n=t.$implicit;i(),b("governs ",n.specId," \u2192 ",n.symbol)}}function te(e,t){if(e&1&&(o(0,"div",18),f(1,ee,2,2,"div",24,K),a()),e&2){let n=s().$implicit;i(),u(n.governs)}}function ne(e,t){e&1&&m(0,"app-state-pill",20),e&2&&l("state",t)}function ie(e,t){e&1&&(o(0,"app-pill",4),r(1,"No linked code yet"),a()),e&2&&l("color","var(--text-muted)")("bg","var(--bg-elevated)")}function oe(e,t){if(e&1){let n=E();o(0,"button",25),S("click",function(){D(n);let g=s(5);return w(g.review())}),m(1,"app-icon",26),r(2," Review "),a()}e&2&&(i(),l("size",12))}function ae(e,t){if(e&1&&(o(0,"div",13)(1,"div",14)(2,"div",15),r(3),a(),d(4,Z,2,1,"div",16),o(5,"div",17),r(6),a(),d(7,te,3,0,"div",18),a(),o(8,"div",19),d(9,ne,1,1,"app-state-pill",20)(10,ie,2,2,"app-pill",4),o(11,"div",21),d(12,oe,3,1,"button",22),o(13,"button",23),m(14,"app-icon",9),r(15," Capture "),a()()()()),e&2){let n,c=t.$implicit,g=s(4);i(3),x(c.title),i(),p(c.body?4:-1),i(2),x(c.id),i(),p(c.governs.length?7:-1),i(2),p((n=g.stateOf(c))?9:c.state==="none"&&c.governs.length===0?10:-1,n),i(3),p(g.needsReview(c)?12:-1),i(2),l("size",12)}}function re(e,t){if(e&1&&(o(0,"section",10)(1,"div",11),r(2),o(3,"span",12),r(4),a()(),f(5,ae,16,7,"div",13,J),a()),e&2){let n=t.$implicit;i(2),v("",n.label," "),i(2),x(n.facts.length),i(),u(n.facts)}}function ce(e,t){if(e&1&&f(0,re,7,2,"section",10,G),e&2){let n=s(2);u(n.sections())}}function le(e,t){if(e&1&&(o(0,"div",1)(1,"app-page-head",2),P(2,3),o(3,"app-pill",4),r(4),a(),o(5,"app-pill",4),r(6),a(),M(),a(),d(7,W,2,1)(8,X,5,0,"div",5)(9,Y,4,1,"app-empty",6)(10,ce,2,0),a()),e&2){let n=s();i(3),l("color","var(--success)")("bg","var(--success-soft)"),i(),v("",n.coverage().documented," documented"),i(),l("color","var(--warn)")("bg","var(--warn-soft)"),i(),b("",n.coverage().gaps," gap",n.coverage().gaps===1?"":"s"),i(),p(n.resource.state().loading?7:n.data()?n.isEmpty()?9:10:8)}}var H=[{type:"term",label:"Terms"},{type:"rule",label:"Rules"},{type:"decision",label:"Decisions"},{type:"constraint",label:"Constraints"},{type:"other",label:"Other"}],Q=class e{api=y(R);projects=y(I);router=y(k);resource=z(this.api,()=>`/api/domain${this.projects.projectQuery()}`);data=_(()=>this.resource.state().data);coverage=_(()=>this.data()?.coverage??{documented:0,gaps:0});sections=_(()=>{let t=this.data();return t?H.map(n=>h(C({},n),{facts:t.factsByType[n.type]??[]})).filter(n=>n.facts.length>0):[]});total=_(()=>{let t=this.data();return t?H.reduce((n,c)=>n+(t.factsByType[c.type]?.length??0),0):0});isEmpty=_(()=>{let t=this.resource.state();return!t.loading&&!t.noProject&&t.data!=null&&this.total()===0});stateOf(t){return t.state==="none"?null:t.state}needsReview(t){return t.state==="drifted"}review(){this.router.navigate(["/drift"])}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=T({type:e,selectors:[["app-domain"]],decls:2,vars:1,consts:[["surface","The domain layer"],[1,"page","scroll-y"],["icon","book","title","Domain","sub","Human-confirmed knowledge \u2014 terms, rules, decisions, constraints"],["actions",""],[3,"color","bg"],[1,"empty"],["icon","book","title","No domain knowledge captured yet","body","Document the terms, rules, decisions, and constraints that the code can't tell you. Run /specship:spec domain to capture the first fact."],[1,"skel","card-skel"],["action","","type","button","title","Run /specship:spec domain to capture a domain fact",1,"btn","btn-primary","btn-sm"],["name","plus",3,"size"],[1,"sig","card"],[1,"sig-head"],[1,"n"],[1,"fact"],[1,"fact-main"],[1,"fact-title"],[1,"fact-body"],[1,"fact-id","mono"],[1,"fact-governs"],[1,"fact-side"],[3,"state"],[1,"fact-actions","row","gap-6"],["type","button",1,"btn","btn-secondary","btn-sm"],["type","button","title","Run /specship:spec domain to refine this fact",1,"btn","btn-secondary","btn-sm"],[1,"fact-governs-row","mono"],["type","button",1,"btn","btn-secondary","btn-sm",3,"click"],["name","drift",3,"size"]],template:function(n,c){n&1&&d(0,L,1,0,"app-pick-project-empty",0)(1,le,11,8,"div",1),n&2&&p(c.resource.state().noProject?0:1)},dependencies:[N,A,B,V,j,$],styles:[".page[_ngcontent-%COMP%]{padding:20px 24px 48px}.empty[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:8px;text-align:center;padding:64px 24px;color:var(--text-muted)}.empty[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{font-family:var(--font-mono, monospace);font-size:.92em}.card-skel[_ngcontent-%COMP%]{height:120px;border-radius:12px;margin-bottom:12px}.sig[_ngcontent-%COMP%]{padding:0;margin-bottom:14px;overflow:hidden}.sig-head[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;padding:12px 16px;font-size:13px;font-weight:600;border-bottom:1px solid var(--border, color-mix(in srgb, var(--text) 12%, transparent))}.sig-head[_ngcontent-%COMP%] .n[_ngcontent-%COMP%]{font-size:11px;font-weight:600;color:var(--text-muted);background:var(--bg-elevated, color-mix(in srgb, var(--text) 7%, transparent));border-radius:999px;padding:1px 8px}.fact[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:16px;padding:12px 16px;border-top:1px solid var(--border-subtle, color-mix(in srgb, var(--text) 6%, transparent))}.fact[_ngcontent-%COMP%]:first-of-type{border-top:none}.fact-main[_ngcontent-%COMP%]{min-width:0;flex:1}.fact-title[_ngcontent-%COMP%]{font-size:13px;font-weight:600;color:var(--text)}.fact-body[_ngcontent-%COMP%]{margin-top:3px;font-size:12.5px;line-height:1.5;color:var(--text-secondary, var(--text-muted))}.fact-id[_ngcontent-%COMP%]{margin-top:5px;font-size:11px;color:var(--text-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.fact-governs[_ngcontent-%COMP%]{margin-top:6px;display:flex;flex-direction:column;gap:2px}.fact-governs-row[_ngcontent-%COMP%]{font-size:11px;color:var(--text-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.fact-side[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-end;gap:8px;flex:0 0 auto}.fact-actions[_ngcontent-%COMP%]{flex-wrap:wrap;justify-content:flex-end}.mono[_ngcontent-%COMP%]{font-family:var(--font-mono, ui-monospace, monospace)}"],changeDetection:0})};export{Q as Domain};
@@ -0,0 +1,3 @@
1
+ import{a as W}from"./chunk-JLOJCDIY.js";import{a as G}from"./chunk-YV5LB22R.js";import{b as U}from"./chunk-WBJ5VEB5.js";import{a as Q}from"./chunk-IOB4JJT4.js";import{a as K}from"./chunk-TWVVIWKO.js";import{Aa as x,Ga as k,I as O,Ia as h,Ka as s,M as v,N as y,Ra as N,Sa as H,Ta as R,Ua as B,Va as l,W as w,Wa as u,Xa as g,Ya as $,aa as z,ea as i,ka as V,lb as D,qa as T,qb as L,ra as p,sa as _,ta as F,ua as A,va as C,wa as f,xa as m,ya as o,yb as j,za as a,zb as q}from"./chunk-SYGIPC2P.js";import{a as S,b as M}from"./chunk-Q7L6LLAK.js";var te=["listEl"],ne=(t,n)=>n.name,Z=(t,n)=>n.qualifiedName,ie=(t,n)=>n.target,oe=(t,n)=>n.cmd;function ae(t,n){if(t&1&&(o(0,"div",22),x(1,"div",24),a()),t&2){let e=s().$implicit,r=s();i(),m("innerHTML",r.renderMd(e.text),z)}}function re(t,n){if(t&1&&(o(0,"div",39)(1,"div",40),l(2,"output"),a(),o(3,"div",41),l(4),a()()),t&2){let e=s().$implicit;i(4),u(e.output)}}function le(t,n){if(t&1){let e=k();o(0,"div",31)(1,"button",32),h("click",function(){let d=v(e).$implicit,c=s(3).$implicit,b=s();return y(b.toggleToolCall(c,d))}),x(2,"app-icon",33)(3,"app-icon",34),o(4,"span",35),l(5),o(6,"span",36),l(7),a()(),o(8,"span",37),x(9,"app-icon",38),l(10),a()(),p(11,re,5,1,"div",39),a()}if(t&2){let e=n.$implicit;i(),T("aria-expanded",e.open),i(),m("name",e.open?"chevronDown":"chevronRight")("size",12),i(),m("size",12),i(2),g(" ",e.name),i(2),g("(",e.input,")"),i(2),m("size",9),i(),g(" ",e.status," "),i(),_(e.open?11:-1)}}function de(t,n){if(t&1&&C(0,le,12,9,"div",31,ne),t&2){let e=s(2).$implicit;f(e.tools)}}function se(t,n){if(t&1&&l(0),t&2){let e=s(2).$implicit;g(":",e.line)}}function ce(t,n){if(t&1&&(l(0),p(1,se,1,1)),t&2){let e=s().$implicit;g(" \xB7 ",e.filePath),i(),_(e.line?1:-1)}}function pe(t,n){if(t&1&&l(0),t&2){let e=s().$implicit;g(" \xB7 ",e.ref," ")}}function _e(t,n){if(t&1&&(o(0,"div",47),l(1),a()),t&2){let e=s(3).$implicit;i(),u(e.detail.signature)}}function me(t,n){if(t&1&&(o(0,"pre",48),l(1),a()),t&2){let e=s(3).$implicit;i(),u(e.detail.body)}}function xe(t,n){if(t&1&&(o(0,"div",51),l(1),o(2,"span",36),l(3),a()()),t&2){let e=n.$implicit;i(),g("",e.name," "),i(2),$("",e.filePath,":",e.line)}}function ue(t,n){if(t&1&&(o(0,"div",49)(1,"div",50),l(2,"callers"),a(),C(3,xe,4,3,"div",51,Z),a()),t&2){let e=s(3).$implicit;i(3),f(e.detail.callers)}}function ge(t,n){if(t&1&&(o(0,"div",51),l(1),o(2,"span",36),l(3),a()()),t&2){let e=n.$implicit;i(),g("",e.name," "),i(2),$("",e.filePath,":",e.line)}}function he(t,n){if(t&1&&(o(0,"div",49)(1,"div",50),l(2,"callees"),a(),C(3,ge,4,3,"div",51,Z),a()),t&2){let e=s(3).$implicit;i(3),f(e.detail.callees)}}function Ce(t,n){if(t&1&&(p(0,_e,2,1,"div",47),p(1,me,2,1,"pre",48),p(2,ue,5,0,"div",49),p(3,he,5,0,"div",49)),t&2){let e=s(2).$implicit;_(e.detail!=null&&e.detail.signature?0:-1),i(),_(e.detail!=null&&e.detail.body?1:-1),i(),_(!(e.detail==null||e.detail.callers==null)&&e.detail.callers.length?2:-1),i(),_(!(e.detail==null||e.detail.callees==null)&&e.detail.callees.length?3:-1)}}function fe(t,n){if(t&1&&(o(0,"pre",48),l(1),a()),t&2){let e=s(3).$implicit;i(),u(e.detail.body)}}function be(t,n){if(t&1&&(o(0,"div",52)(1,"span",53),l(2),a(),x(3,"app-state-pill",54),a()),t&2){let e=n.$implicit;i(2),u(e.target),i(),m("state",e.state)}}function ve(t,n){if(t&1&&(o(0,"div",49)(1,"div",50),l(2,"links"),a(),C(3,be,4,2,"div",52,ie),a()),t&2){let e=s(3).$implicit;i(3),f(e.detail.links)}}function ye(t,n){if(t&1&&(p(0,fe,2,1,"pre",48),p(1,ve,5,0,"div",49)),t&2){let e=s(2).$implicit;_(e.detail!=null&&e.detail.body?0:-1),i(),_(!(e.detail==null||e.detail.links==null)&&e.detail.links.length?1:-1)}}function we(t,n){if(t&1&&(o(0,"pre",48),l(1),a()),t&2){let e=s(3).$implicit;i(),u(e.detail.body)}}function ke(t,n){if(t&1&&p(0,we,2,1,"pre",48),t&2){let e=s(2).$implicit;_(e.detail!=null&&e.detail.body?0:-1)}}function Se(t,n){if(t&1&&(o(0,"div",46),p(1,Ce,4,4)(2,ye,2,2)(3,ke,1,1),a()),t&2){let e=s().$implicit;i(),_(e.kind==="symbol"?1:e.kind==="spec"?2:3)}}function Me(t,n){if(t&1){let e=k();o(0,"div",43)(1,"button",44),h("click",function(){let d=v(e).$index,c=s(3).$index,b=s();return y(b.toggleDetail(c,d))}),x(2,"app-icon",33),o(3,"span",35),l(4),o(5,"span",36),p(6,ce,2,2)(7,pe,1,1),a()(),o(8,"span",45),l(9),a()(),p(10,Se,4,1,"div",46),a()}if(t&2){let e=n.$implicit,r=n.$index,d=s(3).$index,c=s();i(),T("aria-expanded",c.isDetailOpen(d,r)),i(),m("name",c.isDetailOpen(d,r)?"chevronDown":"chevronRight")("size",12),i(2),g(" ",e.label),i(2),_(e.filePath?6:7),i(3),u(e.kind),i(),_(c.isDetailOpen(d,r)?10:-1)}}function Te(t,n){if(t&1&&(o(0,"div",30)(1,"div",42),l(2),a(),C(3,Me,11,7,"div",43,F),a()),t&2){let e=s(2).$implicit;i(2),g("Retrieved detail \xB7 ",e.sources.length),i(),f(e.sources)}}function Ee(t,n){if(t&1&&(o(0,"div",23)(1,"div",25),x(2,"app-logo-mark",26),o(3,"span",27),l(4,"specship"),a()(),o(5,"div",28),x(6,"div",29),p(7,de,2,0),p(8,Te,5,1,"div",30),a()()),t&2){let e=s().$implicit,r=s();i(2),m("size",22)("glow",!1),i(4),m("innerHTML",r.renderMd(e.text),z),i(),_(e.tools!=null&&e.tools.length?7:-1),i(),_(e.sources!=null&&e.sources.length?8:-1)}}function Pe(t,n){if(t&1&&p(0,ae,2,1,"div",22)(1,Ee,9,5,"div",23),t&2){let e=n.$implicit;_(e.role==="user"?0:1)}}function Oe(t,n){t&1&&(o(0,"div",5),x(1,"span",55),l(2," thinking with specship context\u2026 "),a())}function ze(t,n){if(t&1&&(o(0,"span",59),l(1),a()),t&2){let e=s().$implicit;i(),u(e.arg)}}function Fe(t,n){if(t&1){let e=k();o(0,"button",57),h("click",function(){let d=v(e).$implicit,c=s(2);return y(c.pickSlash(d.cmd))}),o(1,"span",58),l(2),a(),p(3,ze,2,1,"span",59),o(4,"span",60),l(5),a()()}if(t&2){let e=n.$implicit;i(2),u(e.cmd),i(),_(e.arg?3:-1),i(2),u(e.desc)}}function $e(t,n){if(t&1&&(o(0,"div",8),C(1,Fe,6,3,"button",56,oe),a()),t&2){let e=s();i(),f(e.filteredSlash())}}function De(t,n){if(t&1){let e=k();o(0,"div",20)(1,"button",61),h("click",function(){v(e);let d=s();return y(d.toggleContext())}),x(2,"app-icon",62),a()()}t&2&&(i(2),m("size",14))}function Ie(t,n){if(t&1){let e=k();o(0,"div",77)(1,"button",81),h("click",function(){let d=v(e).$implicit,c=s(2);return y(c.toggleTool(d))}),x(2,"span",82),a(),o(3,"span",83),l(4),a()()}if(t&2){let e=n.$implicit,r=s(2);i(),B("on",r.enabledTools().has(e)),T("aria-pressed",r.enabledTools().has(e))("aria-label",e+(r.enabledTools().has(e)?" enabled":" disabled")),i(2),R("color",r.enabledTools().has(e)?"var(--text-primary)":"var(--text-muted)"),i(),u(e)}}function Ve(t,n){if(t&1){let e=k();o(0,"aside",21)(1,"div",63)(2,"span",64),l(3,"Context"),a(),o(4,"button",65),h("click",function(){v(e);let d=s();return y(d.toggleContext())}),x(5,"app-icon",66),a()(),o(6,"div",67)(7,"div",68),x(8,"app-icon",69),o(9,"div",70)(10,"div",71),l(11,"Project"),a(),o(12,"div",72),l(13,"~/dev/specship"),a()()(),o(14,"div",68),x(15,"app-icon",73),o(16,"div",70)(17,"div",71),l(18,"Indexed files"),a(),o(19,"div",74),l(20),a()()(),o(21,"div",68),x(22,"app-icon",75),o(23,"div",70)(24,"div",71),l(25,"Drift queue"),a(),o(26,"div",74),l(27,"\u2013 links"),a()()(),o(28,"div",76),l(29,"MCP tools"),a(),C(30,Ie,5,7,"div",77,A),a(),o(32,"div",78)(33,"div",79),l(34,"Tool access"),a(),o(35,"app-segmented",80),h("change",function(d){v(e);let c=s();return y(c.setToolAccess(d))}),a()()()}if(t&2){let e=s();i(5),m("size",13),i(3),m("size",13),i(7),m("size",13),i(5),u(e.api.isConfigured?"\u2013":"offline"),i(2),m("size",13),i(8),f(e.mcpTools),i(5),m("value",e.toolAccess())("options",e.toolAccessOptions)}}var J=[{cmd:"/specship:spec",arg:"REQ-ID | new <desc>",desc:"Intent door \u2014 view, author, implement, or review a spec"},{cmd:"/specship:explore",arg:"symbols | from\u2192to",desc:"Reads door \u2014 explore an area, trace a flow, or get impact"},{cmd:"/specship:check",arg:"(gate) | drifted | health",desc:"Gate & health door \u2014 run the gate, review drift, or see health"}],X=["specship_explore","specship_search","specship_spec","specship_link_verify"],Y=class t{sanitizer=O(j);api=O(K);listEl=L("listEl");closeStream;messages=w([{role:"assistant",text:`Hi \u2014 ask anything about your specs, code, or recent Claude Code sessions.
2
+
3
+ Try **/specship:spec REQ-AUTH-005** to inspect a requirement, or **/specship:explore validateSession** to walk its callers.`}]);draft=w("");thinking=w(!1);contextCollapsed=w(!1);enabledTools=w(new Set(X));toolAccess=w("safe");slashCommands=J;mcpTools=X;toolAccessOptions=[{value:"ask",label:"Ask"},{value:"safe",label:"Auto-safe"},{value:"all",label:"All"}];showSlash=D(()=>{let n=this.draft();return n.startsWith("/")&&!n.includes(" ")});filteredSlash=D(()=>{let n=this.draft();return J.filter(e=>e.cmd.startsWith(n))});setDraft(n){this.draft.set(n)}onKey(n){n.key==="Enter"&&!n.shiftKey&&(n.preventDefault(),this.send())}send(){let n=this.draft().trim();if(!n)return;this.draft.set(""),this.messages.update(d=>[...d,{role:"user",text:n}]),this.thinking.set(!0),this.scrollToBottom();let e=this.messages().length;this.messages.update(d=>[...d,{role:"assistant",text:"",tools:[]}]),this.closeStream?.();let r="/api/chat/stream?question="+encodeURIComponent(n);this.closeStream=this.api.openEventStream(r,(d,c)=>this.onStreamEvent(e,d,c),()=>this.endStream(),["thinking","tool","result_summary","chunk","done"])}onStreamEvent(n,e,r){switch(e){case"tool":{let d=r??{};this.patchMsg(n,c=>M(S({},c),{tools:[...c.tools??[],{name:d.name??"",input:d.input??"",output:"",status:"ok"}]}));break}case"result_summary":{let d=r??{},c=d.sourceCount??0,b=d.found?`${c} source${c===1?"":"s"} returned`:"no matches in the index";this.patchMsg(n,E=>{let P=E.tools??[];return P.length===0?E:M(S({},E),{tools:P.map((I,ee)=>ee===P.length-1?M(S({},I),{output:b}):I)})});break}case"chunk":{let c=(r??{}).text??"";this.patchMsg(n,b=>M(S({},b),{text:b.text+c})),this.scrollToBottom();break}case"done":{let d=r??{};d.sources?.length&&this.patchMsg(n,c=>M(S({},c),{sources:d.sources})),this.endStream();break}}}patchMsg(n,e){this.messages.update(r=>r.map((d,c)=>c===n?e(d):d))}endStream(){this.thinking.set(!1),this.closeStream?.(),this.closeStream=void 0,this.scrollToBottom()}ngOnDestroy(){this.closeStream?.(),this.closeStream=void 0}pickSlash(n){this.draft.set(n+" ")}toggleTool(n){this.enabledTools.update(e=>{let r=new Set(e);return r.has(n)?r.delete(n):r.add(n),r})}setToolAccess(n){this.toolAccess.set(n)}toggleContext(){this.contextCollapsed.update(n=>!n)}toggleToolCall(n,e){e.open=!e.open,this.messages.update(r=>[...r])}openDetails=w(new Set);detailKey(n,e){return`${n}:${e}`}isDetailOpen(n,e){return this.openDetails().has(this.detailKey(n,e))}toggleDetail(n,e){let r=this.detailKey(n,e);this.openDetails.update(d=>{let c=new Set(d);return c.has(r)?c.delete(r):c.add(r),c})}renderMd(n){let e=n.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\*\*(.+?)\*\*/g,'<strong style="color:var(--text-primary)">$1</strong>').replace(/`(.+?)`/g,'<code class="mono" style="font-size:12px;background:var(--bg-canvas);padding:1px 5px;border-radius:4px;border:1px solid var(--border-subtle);color:var(--node-spec)">$1</code>').replace(/\n\n/g,"<br/><br/>").replace(/\n/g,"<br/>");return this.sanitizer.bypassSecurityTrustHtml(e)}scrollToBottom(){setTimeout(()=>{let n=this.listEl()?.nativeElement;n&&(n.scrollTop=n.scrollHeight)},0)}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=V({type:t,selectors:[["app-chat"]],viewQuery:function(e,r){e&1&&N(r.listEl,te,5),e&2&&H()},decls:29,vars:8,consts:[["listEl",""],[1,"chat-page"],[1,"chat-col"],[1,"thread","scroll-y"],[1,"thread-inner"],[1,"row","gap-8","muted","thinking"],[1,"composer"],[1,"composer-inner"],["role","listbox","aria-label","Slash commands",1,"slash-menu"],[1,"composer-box","row"],["type","button","title","Attach files or spec IDs",1,"btn","btn-ghost","btn-sm","attach-btn"],["name","paperclip",3,"size"],["placeholder","Ask with specship context\u2026 / for commands, Tab to complete spec IDs","rows","1",1,"composer-ta",3,"input","keydown","value"],["type","button","aria-label","Send message",1,"btn","btn-primary","btn-sm","send-btn",3,"click","disabled"],["name","send",3,"size"],[1,"composer-footer","row","gap-8"],[1,"row","gap-6"],["name","bot",3,"size"],[1,"muted",2,"font-size","10.5px"],[1,"grow"],[1,"ctx-collapsed"],["aria-label","Context panel",1,"ctx-panel","col"],[1,"msg-user"],[1,"msg-assistant"],[1,"bubble-user",3,"innerHTML"],[1,"row","gap-8","asst-meta"],["aria-hidden","true",3,"size","glow"],[2,"font-size","12px","font-weight","600"],[1,"asst-body"],[1,"bubble-asst",3,"innerHTML"],[1,"detail-list"],[1,"tool-call"],["type","button",1,"tool-header","row","gap-8",3,"click"],[2,"color","var(--text-muted)",3,"name","size"],["name","wrench",2,"color","var(--node-code)",3,"size"],[1,"mono","grow",2,"font-size","11.5px"],[1,"muted"],[1,"pill",2,"font-size","9.5px","color","var(--success)","background","var(--success-soft)"],["name","check",3,"size"],[1,"tool-output"],[1,"mono","muted",2,"font-size","10.5px","margin-bottom","3px"],[1,"mono",2,"font-size","11.5px","color","var(--text-secondary)"],[1,"eyebrow",2,"margin","4px 0 2px"],[1,"source-detail"],["type","button",1,"detail-header","row","gap-8",3,"click"],[1,"pill",2,"font-size","9.5px","color","var(--text-muted)","background","var(--bg-canvas)"],[1,"detail-body"],[1,"mono","detail-sig"],[1,"mono","detail-src"],[1,"detail-rel"],[1,"mono","muted","detail-rel-label"],[1,"mono","detail-rel-item"],[1,"row","gap-8","detail-rel-item"],[1,"mono","grow"],[3,"state"],[1,"thinking-dot"],["type","button","role","option",1,"slash-item","row","gap-8"],["type","button","role","option",1,"slash-item","row","gap-8",3,"click"],[1,"mono",2,"font-size","12px","color","var(--accent)"],[1,"mono","muted",2,"font-size","11px"],[1,"muted","grow",2,"font-size","11px","text-align","right"],["type","button","title","Show context",1,"btn","btn-ghost","btn-xs",3,"click"],["name","chevronLeft",3,"size"],[1,"ctx-header","row"],[1,"eyebrow","grow"],["type","button",1,"btn","btn-ghost","btn-xs",3,"click"],["name","chevronRight",3,"size"],[1,"ctx-body","scroll-y"],[1,"ctx-row","row","gap-8"],["name","folder",2,"color","var(--text-muted)","flex-shrink","0",3,"size"],[2,"min-width","0"],[1,"muted",2,"font-size","10px"],[1,"mono",2,"font-size","11.5px","overflow","hidden","text-overflow","ellipsis","white-space","nowrap"],["name","box",2,"color","var(--text-muted)","flex-shrink","0",3,"size"],[1,"mono",2,"font-size","11.5px"],["name","drift",2,"color","var(--warn)","flex-shrink","0",3,"size"],[1,"eyebrow",2,"margin","16px 0 8px"],[1,"row","gap-8",2,"padding","5px 0"],[1,"ctx-footer"],[1,"eyebrow",2,"margin-bottom","6px"],["size","sm",3,"change","value","options"],["type","button",1,"toggle-btn",3,"click"],[1,"toggle-thumb"],[1,"mono",2,"font-size","11px"]],template:function(e,r){e&1&&(o(0,"div",1)(1,"div",2)(2,"div",3,0)(4,"div",4),C(5,Pe,2,1,null,null,F),p(7,Oe,3,0,"div",5),a()(),o(8,"div",6)(9,"div",7),p(10,$e,3,0,"div",8),o(11,"div",9)(12,"button",10),x(13,"app-icon",11),a(),o(14,"textarea",12),h("input",function(c){return r.setDraft(c.target.value)})("keydown",function(c){return r.onKey(c)}),a(),o(15,"button",13),h("click",function(){return r.send()}),x(16,"app-icon",14),a()(),o(17,"div",15)(18,"div",16)(19,"app-pill"),x(20,"app-icon",17),l(21," Opus 4 "),a(),o(22,"span",18),l(23,"single thread \xB7 this project"),a()(),x(24,"span",19),o(25,"span",18),l(26,"Enter to send \xB7 Shift+Enter for newline"),a()()()()(),p(27,De,3,1,"div",20)(28,Ve,36,7,"aside",21),a()),e&2&&(i(5),f(r.messages()),i(2),_(r.thinking()?7:-1),i(3),_(r.showSlash()&&r.filteredSlash().length>0?10:-1),i(3),m("size",15),i(),m("value",r.draft()),i(),m("disabled",!r.draft().trim()),i(),m("size",14),i(4),m("size",10),i(7),_(r.contextCollapsed()?27:28))},dependencies:[q,W,Q,U,G],styles:["[_nghost-%COMP%]{display:flex;flex:1;min-height:0}.chat-page[_ngcontent-%COMP%]{display:flex;flex:1;min-height:0;min-width:0}.chat-col[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex:1;min-width:0;min-height:0}.thread[_ngcontent-%COMP%]{flex:1;padding:20px 24px;overflow-y:auto}.thread-inner[_ngcontent-%COMP%]{max-width:760px;margin:0 auto}.msg-user[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;margin-bottom:18px}.bubble-user[_ngcontent-%COMP%]{max-width:76%;background:var(--bg-elevated);border:1px solid var(--border-subtle);border-radius:12px 12px 4px;padding:9px 13px;font-size:13.5px;line-height:1.55}.msg-assistant[_ngcontent-%COMP%]{margin-bottom:22px}.asst-meta[_ngcontent-%COMP%]{align-items:center;margin-bottom:8px}.asst-logo[_ngcontent-%COMP%]{display:inline-grid;place-items:center;width:22px;height:22px;border-radius:50%;background:var(--accent);color:#fff;font-size:11px;font-weight:700;flex-shrink:0}.asst-body[_ngcontent-%COMP%]{padding-left:30px}.bubble-asst[_ngcontent-%COMP%]{font-size:13.5px;line-height:1.62;color:var(--text-secondary);text-wrap:pretty;margin-bottom:4px}.tool-call[_ngcontent-%COMP%]{border:1px solid var(--border-subtle);border-radius:7px;margin-top:8px;overflow:hidden;background:var(--bg-canvas)}.tool-header[_ngcontent-%COMP%]{width:100%;background:transparent;border:none;cursor:pointer;padding:6px 10px;text-align:left;color:inherit;font-family:var(--font-ui)}.tool-header[_ngcontent-%COMP%]:hover{background:var(--bg-hover)}.tool-header[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}.tool-output[_ngcontent-%COMP%]{padding:8px 10px 10px 30px;border-top:1px solid var(--border-subtle)}.detail-list[_ngcontent-%COMP%]{margin-top:10px;display:flex;flex-direction:column;gap:6px}.source-detail[_ngcontent-%COMP%]{border:1px solid var(--border-subtle);border-radius:7px;overflow:hidden;background:var(--bg-canvas)}.detail-header[_ngcontent-%COMP%]{width:100%;background:transparent;border:none;cursor:pointer;padding:6px 10px;text-align:left;color:inherit;font-family:var(--font-ui)}.detail-header[_ngcontent-%COMP%]:hover{background:var(--bg-hover)}.detail-header[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}.detail-body[_ngcontent-%COMP%]{padding:8px 10px 10px;border-top:1px solid var(--border-subtle);display:flex;flex-direction:column;gap:8px}.detail-sig[_ngcontent-%COMP%]{font-size:11.5px;color:var(--node-code);white-space:pre-wrap;word-break:break-word}.detail-src[_ngcontent-%COMP%]{margin:0;padding:8px 10px;font-size:11.5px;line-height:1.5;color:var(--text-secondary);background:var(--bg-base);border:1px solid var(--border-subtle);border-radius:5px;overflow-x:auto;white-space:pre;max-height:320px;overflow-y:auto}.detail-rel-label[_ngcontent-%COMP%]{font-size:10.5px;margin-bottom:3px}.detail-rel-item[_ngcontent-%COMP%]{font-size:11.5px;color:var(--text-secondary);padding:1px 0}.thinking[_ngcontent-%COMP%]{padding-left:30px;font-size:12px}.thinking-dot[_ngcontent-%COMP%]{width:6px;height:6px;border-radius:50%;background:var(--accent);animation:skeleton 1s infinite;flex-shrink:0}.composer[_ngcontent-%COMP%]{padding:12px 24px 18px;border-top:1px solid var(--border-subtle);flex-shrink:0}.composer-inner[_ngcontent-%COMP%]{max-width:760px;margin:0 auto;position:relative}.composer-box[_ngcontent-%COMP%]{align-items:flex-end;background:var(--bg-panel);border:1px solid var(--border-subtle);border-radius:12px;padding:8px;gap:8px}.attach-btn[_ngcontent-%COMP%]{padding:7px;flex-shrink:0}.send-btn[_ngcontent-%COMP%]{padding:7px 10px;flex-shrink:0}.composer-ta[_ngcontent-%COMP%]{flex:1;resize:none;background:transparent;border:none;outline:none;color:var(--text-primary);font-size:13.5px;font-family:var(--font-ui);line-height:1.5;padding:5px 2px;max-height:120px}.composer-ta[_ngcontent-%COMP%]::placeholder{color:var(--text-muted)}.composer-footer[_ngcontent-%COMP%]{margin-top:8px;align-items:center}.slash-menu[_ngcontent-%COMP%]{position:absolute;bottom:100%;left:0;margin-bottom:8px;background:var(--bg-elevated);border:1px solid var(--border-strong);border-radius:8px;box-shadow:var(--shadow-pop);padding:5px;width:320px;z-index:10}.slash-item[_ngcontent-%COMP%]{width:100%;background:transparent;border:none;cursor:pointer;padding:6px 9px;border-radius:5px;text-align:left;color:inherit;font-family:var(--font-ui)}.slash-item[_ngcontent-%COMP%]:hover{background:var(--bg-hover)}.slash-item[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}.ctx-collapsed[_ngcontent-%COMP%]{width:40px;flex-shrink:0;border-left:1px solid var(--border-subtle);display:flex;justify-content:center;padding-top:12px}.ctx-panel[_ngcontent-%COMP%]{width:264px;flex-shrink:0;border-left:1px solid var(--border-subtle);background:var(--bg-panel);display:flex;flex-direction:column;min-height:0}.ctx-header[_ngcontent-%COMP%]{padding:11px 13px;border-bottom:1px solid var(--border-subtle);align-items:center}.ctx-body[_ngcontent-%COMP%]{flex:1;padding:13px;overflow-y:auto;min-height:0}.ctx-row[_ngcontent-%COMP%]{padding:5px 0;align-items:flex-start}.ctx-footer[_ngcontent-%COMP%]{padding:12px;border-top:1px solid var(--border-subtle)}.toggle-btn[_ngcontent-%COMP%]{width:30px;height:17px;border-radius:999px;border:none;cursor:pointer;padding:2px;background:var(--bg-elevated);display:flex;justify-content:flex-start;align-items:center;transition:background .12s,justify-content .12s;flex-shrink:0}.toggle-btn.on[_ngcontent-%COMP%]{background:var(--accent);justify-content:flex-end}.toggle-btn[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.toggle-thumb[_ngcontent-%COMP%]{width:13px;height:13px;border-radius:50%;background:#fff;flex-shrink:0}.eyebrow[_ngcontent-%COMP%]{color:var(--text-muted);font-size:10.5px;font-weight:700;letter-spacing:.06em;text-transform:uppercase}.muted[_ngcontent-%COMP%]{color:var(--text-muted)}.mono[_ngcontent-%COMP%]{font-family:var(--font-mono)}.pill[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:5px;font-size:11px;font-weight:600;padding:3px 9px;border-radius:999px;line-height:1.4;white-space:nowrap}.grow[_ngcontent-%COMP%]{flex:1}"],changeDetection:0})};export{Y as Chat};
@@ -142,5 +142,5 @@
142
142
  })();
143
143
  </script>
144
144
  <app-root></app-root>
145
- <link rel="modulepreload" href="chunk-2IVSOVQZ.js"><link rel="modulepreload" href="chunk-YV5LB22R.js"><link rel="modulepreload" href="chunk-DOKZOFKM.js"><link rel="modulepreload" href="chunk-DTWIJ3GJ.js"><link rel="modulepreload" href="chunk-JGDK6YKG.js"><link rel="modulepreload" href="chunk-TWVVIWKO.js"><link rel="modulepreload" href="chunk-SYGIPC2P.js"><link rel="modulepreload" href="chunk-Q7L6LLAK.js"><script src="main-5B4RR3BC.js" type="module"></script></body>
145
+ <link rel="modulepreload" href="chunk-2IVSOVQZ.js"><link rel="modulepreload" href="chunk-YV5LB22R.js"><link rel="modulepreload" href="chunk-DOKZOFKM.js"><link rel="modulepreload" href="chunk-DTWIJ3GJ.js"><link rel="modulepreload" href="chunk-JGDK6YKG.js"><link rel="modulepreload" href="chunk-TWVVIWKO.js"><link rel="modulepreload" href="chunk-SYGIPC2P.js"><link rel="modulepreload" href="chunk-Q7L6LLAK.js"><script src="main-FY3HQ4PX.js" type="module"></script></body>
146
146
  </html>