specpilot 2.20.0 → 2.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +35 -14
- package/dist/cli.js +6 -2
- package/dist/cli.js.map +1 -1
- package/dist/commands/add-specs.d.ts +1 -0
- package/dist/commands/add-specs.d.ts.map +1 -1
- package/dist/commands/add-specs.js +8 -2
- package/dist/commands/add-specs.js.map +1 -1
- package/dist/commands/backfill.js +8 -9
- package/dist/commands/backfill.js.map +1 -1
- package/dist/commands/init.d.ts +1 -0
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +10 -4
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/refine.d.ts.map +1 -1
- package/dist/commands/refine.js +6 -1
- package/dist/commands/refine.js.map +1 -1
- package/dist/commands/serve.d.ts +1 -1
- package/dist/commands/serve.d.ts.map +1 -1
- package/dist/commands/serve.js +22 -7
- package/dist/commands/serve.js.map +1 -1
- package/dist/commands/validate.d.ts.map +1 -1
- package/dist/commands/validate.js +4 -0
- package/dist/commands/validate.js.map +1 -1
- package/dist/core/chatFlow.js +1 -1
- package/dist/core/chatFlow.js.map +1 -1
- package/dist/core/ideConfig.d.ts +0 -1
- package/dist/core/ideConfig.d.ts.map +1 -1
- package/dist/core/ideConfig.js +1 -2
- package/dist/core/ideConfig.js.map +1 -1
- package/dist/core/render.d.ts +2 -0
- package/dist/core/render.d.ts.map +1 -1
- package/dist/core/render.js +1 -0
- package/dist/core/render.js.map +1 -1
- package/dist/core/slashCommands.js +7 -7
- package/dist/core/specFiles.js +8 -6
- package/dist/core/specFiles.js.map +1 -1
- package/dist/core/templateEngine.d.ts +1 -0
- package/dist/core/templateEngine.d.ts.map +1 -1
- package/dist/core/templateEngine.js +4 -0
- package/dist/core/templateEngine.js.map +1 -1
- package/dist/utils/addSpecsQuestions.d.ts +7 -0
- package/dist/utils/addSpecsQuestions.d.ts.map +1 -1
- package/dist/utils/addSpecsQuestions.js +7 -1
- package/dist/utils/addSpecsQuestions.js.map +1 -1
- package/dist/utils/folderPicker.d.ts.map +1 -1
- package/dist/utils/folderPicker.js +3 -1
- package/dist/utils/folderPicker.js.map +1 -1
- package/dist/utils/ideConfigGenerator.d.ts +2 -8
- package/dist/utils/ideConfigGenerator.d.ts.map +1 -1
- package/dist/utils/ideConfigGenerator.js +2 -9
- package/dist/utils/ideConfigGenerator.js.map +1 -1
- package/dist/utils/mcpLocal.js +1 -1
- package/dist/utils/mcpLocal.js.map +1 -1
- package/dist/utils/nodeCheck.d.ts +20 -0
- package/dist/utils/nodeCheck.d.ts.map +1 -0
- package/dist/utils/nodeCheck.js +50 -0
- package/dist/utils/nodeCheck.js.map +1 -0
- package/dist/utils/projectRegistry.d.ts +2 -0
- package/dist/utils/projectRegistry.d.ts.map +1 -1
- package/dist/utils/projectRegistry.js +3 -1
- package/dist/utils/projectRegistry.js.map +1 -1
- package/dist/utils/slashCommandGenerator.d.ts.map +1 -1
- package/dist/utils/slashCommandGenerator.js +12 -0
- package/dist/utils/slashCommandGenerator.js.map +1 -1
- package/dist/utils/specArchiver.d.ts +17 -4
- package/dist/utils/specArchiver.d.ts.map +1 -1
- package/dist/utils/specArchiver.js +20 -4
- package/dist/utils/specArchiver.js.map +1 -1
- package/dist/utils/specBackfiller.d.ts +19 -12
- package/dist/utils/specBackfiller.d.ts.map +1 -1
- package/dist/utils/specBackfiller.js +54 -56
- package/dist/utils/specBackfiller.js.map +1 -1
- package/dist/utils/specPaths.d.ts.map +1 -1
- package/dist/utils/specPaths.js +5 -2
- package/dist/utils/specPaths.js.map +1 -1
- package/dist/utils/specServer.d.ts +24 -0
- package/dist/utils/specServer.d.ts.map +1 -1
- package/dist/utils/specServer.js +205 -62
- package/dist/utils/specServer.js.map +1 -1
- package/dist/utils/specValidator.d.ts +6 -0
- package/dist/utils/specValidator.d.ts.map +1 -1
- package/dist/utils/specValidator.js +153 -8
- package/dist/utils/specValidator.js.map +1 -1
- package/dist/utils/taskMover.d.ts +9 -3
- package/dist/utils/taskMover.d.ts.map +1 -1
- package/dist/utils/taskMover.js +42 -18
- package/dist/utils/taskMover.js.map +1 -1
- package/package.json +3 -3
- package/ui/app.css +107 -11
- package/ui/app.js +320 -43
- package/ui/index.html +41 -23
- package/ui/route.js +41 -12
package/ui/index.html
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="utf-8">
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
6
|
-
<title>SpecPilot
|
|
6
|
+
<title>SpecPilot</title>
|
|
7
7
|
<meta name="theme-color" content="#0f172a">
|
|
8
8
|
<!-- specpilot-token -->
|
|
9
9
|
<!-- specpilot-mcp -->
|
|
@@ -45,6 +45,8 @@
|
|
|
45
45
|
<symbol id="i-spark" viewBox="0 0 24 24"><path d="M12 3l1.7 4.8L18.5 9.5l-4.8 1.7L12 16l-1.7-4.8L5.5 9.5l4.8-1.7z"/><path d="M18 15.5l.8 2.2 2.2.8-2.2.8-.8 2.2-.8-2.2-2.2-.8 2.2-.8z"/></symbol>
|
|
46
46
|
</defs>
|
|
47
47
|
</symbol>
|
|
48
|
+
<symbol id="i-copy" viewBox="0 0 24 24"><rect x="8" y="8" width="12" height="12" rx="2"/><path d="M16 8V5a1 1 0 0 0-1-1H5a1 1 0 0 0-1 1v10a1 1 0 0 0 1 1h3"/></symbol>
|
|
49
|
+
<symbol id="i-grid" viewBox="0 0 24 24"><rect x="3" y="3" width="7" height="7" rx="1"/><rect x="14" y="3" width="7" height="7" rx="1"/><rect x="3" y="14" width="7" height="7" rx="1"/><rect x="14" y="14" width="7" height="7" rx="1"/></symbol>
|
|
48
50
|
<symbol id="i-board" viewBox="0 0 24 24"><rect x="3" y="4" width="5" height="16" rx="1"/><rect x="10" y="4" width="5" height="10" rx="1"/><rect x="17" y="4" width="4" height="13" rx="1"/></symbol>
|
|
49
51
|
<symbol id="i-map" viewBox="0 0 24 24"><path d="M3 6l6-2 6 2 6-2v14l-6 2-6-2-6 2z"/><path d="M9 4v14M15 6v14"/></symbol>
|
|
50
52
|
<symbol id="i-req" viewBox="0 0 24 24"><path d="M9 6h11M9 12h11M9 18h11"/><path d="M4 6l1 1 2-2M4 12l1 1 2-2M4 18l1 1 2-2"/></symbol>
|
|
@@ -57,7 +59,6 @@
|
|
|
57
59
|
<symbol id="i-dots" viewBox="0 0 24 24"><path d="M5 12h.01M12 12h.01M19 12h.01"/></symbol>
|
|
58
60
|
<symbol id="i-archive" viewBox="0 0 24 24"><rect x="3" y="4" width="18" height="4" rx="1"/><path d="M5 8v11a1 1 0 001 1h12a1 1 0 001-1V8M10 12h4"/></symbol>
|
|
59
61
|
<symbol id="i-gear" viewBox="0 0 24 24"><circle cx="12" cy="12" r="3"/><path d="M19.4 15a1.7 1.7 0 00.3 1.8l.1.1a2 2 0 11-2.8 2.8l-.1-.1a1.7 1.7 0 00-1.8-.3 1.7 1.7 0 00-1 1.5V21a2 2 0 11-4 0v-.1a1.7 1.7 0 00-1.1-1.5 1.7 1.7 0 00-1.8.3l-.1.1a2 2 0 11-2.8-2.8l.1-.1a1.7 1.7 0 00.3-1.8 1.7 1.7 0 00-1.5-1H3a2 2 0 110-4h.1a1.7 1.7 0 001.5-1.1 1.7 1.7 0 00-.3-1.8l-.1-.1a2 2 0 112.8-2.8l.1.1a1.7 1.7 0 001.8.3H9a1.7 1.7 0 001-1.5V3a2 2 0 114 0v.1a1.7 1.7 0 001 1.5 1.7 1.7 0 001.8-.3l.1-.1a2 2 0 112.8 2.8l-.1.1a1.7 1.7 0 00-.3 1.8V9a1.7 1.7 0 001.5 1H21a2 2 0 110 4h-.1a1.7 1.7 0 00-1.5 1z"/></symbol>
|
|
60
|
-
<symbol id="i-sun" viewBox="0 0 24 24"><circle cx="12" cy="12" r="4"/><path d="M12 2v2M12 20v2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M2 12h2M20 12h2M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4"/></symbol>
|
|
61
62
|
<symbol id="i-x" viewBox="0 0 24 24"><path d="M6 6l12 12M18 6L6 18"/></symbol>
|
|
62
63
|
<symbol id="i-warn" viewBox="0 0 24 24"><path d="M12 4l9 16H3z"/><path d="M12 10v4M12 17h.01"/></symbol>
|
|
63
64
|
<symbol id="i-info" viewBox="0 0 24 24"><circle cx="12" cy="12" r="9"/><path d="M12 11v5M12 8h.01"/></symbol>
|
|
@@ -71,10 +72,14 @@
|
|
|
71
72
|
<symbol id="i-chev" viewBox="0 0 24 24"><path d="M9 6l6 6-6 6"/></symbol>
|
|
72
73
|
<symbol id="i-arrow" viewBox="0 0 24 24"><path d="M5 12h14M13 6l6 6-6 6"/></symbol>
|
|
73
74
|
<symbol id="i-check" viewBox="0 0 24 24"><path d="M5 12l5 5L20 7"/></symbol>
|
|
74
|
-
<symbol id="i-power" viewBox="0 0 24 24"><path d="M12 3v9M6.3 6.3a8 8 0 1 0 11.4 0"/></symbol>
|
|
75
75
|
</defs></svg>
|
|
76
76
|
|
|
77
77
|
<a class="skip" href="#content">Skip to Content</a>
|
|
78
|
+
<div class="nodebar" id="nodeBar" role="status" hidden><!-- BL-190, REQ-002.H.78: the server's Node.js has known holes -->
|
|
79
|
+
<svg class="ico" aria-hidden="true" focusable="false"><use href="#i-shield"/></svg>
|
|
80
|
+
<p><span class="nb-long" id="nodeLong"></span><span class="nb-short" id="nodeShort"></span> <a id="nodeLink" target="_blank" rel="noopener noreferrer"><span class="nb-long">Read the advisory</span><span class="nb-short">Advisory</span></a></p>
|
|
81
|
+
<button type="button" id="nodeX" aria-label="Dismiss"><svg class="ico" aria-hidden="true" focusable="false"><use href="#i-x"/></svg></button>
|
|
82
|
+
</div>
|
|
78
83
|
<div class="win" id="win">
|
|
79
84
|
<nav class="rail" id="rail" aria-label="Projects">
|
|
80
85
|
<svg class="logo" aria-hidden="true" focusable="false"><use href="#logo"/></svg>
|
|
@@ -83,17 +88,17 @@
|
|
|
83
88
|
<div class="rlist" id="projList" role="group" aria-label="Open projects"></div>
|
|
84
89
|
<button class="tile act" id="addBtn" aria-label="Add a project" data-tip="Add a project" hidden><svg aria-hidden="true" focusable="false"><use href="#i-plus"/></svg></button>
|
|
85
90
|
<div class="rfoot">
|
|
86
|
-
<button class="tile ghost" id="
|
|
87
|
-
<button class="tile ghost" id="quitBtn" aria-label="Quit SpecPilot" data-tip="Quit SpecPilot" hidden><svg aria-hidden="true" focusable="false"><use href="#i-power"/></svg></button>
|
|
91
|
+
<button class="tile ghost" id="setBtn" aria-label="Settings" data-tip="Settings" aria-haspopup="menu" aria-expanded="false" aria-controls="setMenu"><svg aria-hidden="true" focusable="false"><use href="#i-gear"/></svg></button>
|
|
88
92
|
</div>
|
|
89
93
|
</nav>
|
|
90
94
|
<aside class="src" id="src">
|
|
91
95
|
<div class="top"><b id="curGrp" translate="no"></b><span class="br mono" id="curBranch" translate="no"></span></div>
|
|
92
96
|
<button class="search" id="palBtn"><svg class="ico ico-13" aria-hidden="true" focusable="false"><use href="#i-search"/></svg>Search<kbd>⌘K</kbd></button>
|
|
93
97
|
<div class="snav">
|
|
98
|
+
<button class="srow on" data-v="overview"><svg aria-hidden="true" focusable="false"><use href="#i-grid"/></svg><span class="t">Overview</span></button>
|
|
94
99
|
<div class="grp" id="gPlan">Plan</div>
|
|
95
100
|
<div role="group" aria-labelledby="gPlan">
|
|
96
|
-
<button class="srow
|
|
101
|
+
<button class="srow" data-v="board"><svg aria-hidden="true" focusable="false"><use href="#i-board"/></svg><span class="t">Tasks</span><span class="meta" translate="no">tasks.md</span></button>
|
|
97
102
|
<button class="srow" data-v="file" data-f="planning/roadmap.md"><svg aria-hidden="true" focusable="false"><use href="#i-map"/></svg><span class="t">Roadmap</span><span class="meta" translate="no">roadmap.md</span></button>
|
|
98
103
|
<button class="srow" data-v="file" data-f="project/requirements.md"><svg aria-hidden="true" focusable="false"><use href="#i-req"/></svg><span class="t">Requirements</span><span class="meta" translate="no">requirements.md</span></button>
|
|
99
104
|
</div>
|
|
@@ -104,11 +109,11 @@
|
|
|
104
109
|
<button class="srow" data-v="file" data-f="quality/tests.md"><svg aria-hidden="true" focusable="false"><use href="#i-test"/></svg><span class="t">Tests</span><span class="meta" translate="no">quality/</span></button>
|
|
105
110
|
<button class="srow" data-v="security"><svg aria-hidden="true" focusable="false"><use href="#i-shield"/></svg><span class="t">Security</span><span class="meta" translate="no">security/</span></button>
|
|
106
111
|
</div>
|
|
107
|
-
<div class="grp" id="gAuto">
|
|
112
|
+
<div class="grp" id="gAuto">Agent Guidance</div>
|
|
108
113
|
<div role="group" aria-labelledby="gAuto">
|
|
109
114
|
<button class="srow" data-v="instructions"><svg aria-hidden="true" focusable="false"><use href="#i-file"/></svg><span class="t">Instructions</span><span class="meta" id="insMeta" translate="no"></span></button>
|
|
110
|
-
<button class="srow" data-v="commands"><svg aria-hidden="true" focusable="false"><use href="#i-term"/></svg><span class="t">Commands</span
|
|
111
|
-
<button class="srow" data-v="skills"><svg aria-hidden="true" focusable="false"><use href="#i-spark"/></svg><span class="t">Skills</span
|
|
115
|
+
<button class="srow" data-v="commands"><svg aria-hidden="true" focusable="false"><use href="#i-term"/></svg><span class="t">Commands</span></button>
|
|
116
|
+
<button class="srow" data-v="skills"><svg aria-hidden="true" focusable="false"><use href="#i-spark"/></svg><span class="t">Skills</span></button>
|
|
112
117
|
</div>
|
|
113
118
|
</div>
|
|
114
119
|
<div class="foot"><span class="v" id="footAddr" title="Local server, read-only" translate="no"></span><span class="v ml-auto" id="footVer" translate="no"></span></div>
|
|
@@ -130,23 +135,34 @@
|
|
|
130
135
|
<!-- HOME (BL-PM-001): the mockup's #s-welcome column, cut down to what is built and true today -->
|
|
131
136
|
<section class="view welcome" id="v-home" aria-labelledby="wTitle">
|
|
132
137
|
<div class="brand"><svg class="logo" aria-hidden="true" focusable="false"><use href="#logo"/></svg><svg class="wordmark" role="img" aria-label="SpecPilot" focusable="false"><use href="#wordmark"/></svg></div>
|
|
133
|
-
<div><h1 id="wTitle">
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
<div class="
|
|
138
|
+
<div><h1 id="wTitle">The command center for your spec-driven projects.</h1><p class="lead">SpecPilot reads the <span class="mono" translate="no">.specs/</span> folder of any project on this machine and lays it out in one place: the tasks, the architecture, the test plan, the security model, and the instructions, commands and skills your AI IDE works from. Your AI IDE keeps doing the coding.</p></div>
|
|
139
|
+
<!-- BL-165: two columns in a wide window, one under the other in a narrow one -->
|
|
140
|
+
<div class="wcol">
|
|
141
|
+
<div class="cta">
|
|
142
|
+
<button type="button" class="btn pri big" id="homeOpen">Open a Project Folder</button>
|
|
143
|
+
<div class="alt"><button type="button" class="btn line" id="homeNew">Start a New Project</button><button type="button" class="btn line" id="homeClone">Clone a Repository</button></div>
|
|
144
|
+
</div>
|
|
145
|
+
<div class="gl recents"><div class="gh">Recent projects <span class="cnt" id="homePath" translate="no"></span></div><div class="box" id="homeBox"></div></div>
|
|
146
|
+
</div>
|
|
147
|
+
<div class="wcol">
|
|
148
|
+
<div class="gl benefits"><div class="box">
|
|
149
|
+
<div class="row"><span class="ic2"><svg class="ico" aria-hidden="true" focusable="false"><use href="#i-test"/></svg></span><div class="body"><div class="ttl">Tests and security, not just tasks</div><div class="det">Your test plan, threat model and security decisions sit next to the work they apply to, so you see them before you merge, not after.</div></div></div>
|
|
150
|
+
<div class="row"><span class="ic2"><svg class="ico" aria-hidden="true" focusable="false"><use href="#i-folder"/></svg></span><div class="body"><div class="ttl">Files are the truth</div><div class="det">Every view is read from <span class="mono" translate="no">.specs/</span> and git. Every action writes a file you could have edited by hand.</div></div></div>
|
|
151
|
+
<div class="row"><span class="ic2"><svg class="ico" aria-hidden="true" focusable="false"><use href="#i-shield"/></svg></span><div class="body"><div class="ttl">Nothing leaves this machine</div><div class="det">Runs on localhost, no account, no telemetry. No <span class="mono" translate="no">.specs/</span> yet? Your AI IDE writes one for you.</div></div></div>
|
|
152
|
+
</div></div>
|
|
153
|
+
<!-- BL-PM-007: unless specpilot serve --no-mcp (BL-105) -->
|
|
154
|
+
<div class="gl" id="homeMcp" hidden><div class="gh">Connect Your AI IDE <span class="cnt">optional</span></div><div class="seg ides" role="radiogroup" aria-label="Your AI IDE" id="mcpIde"></div><div class="box"><div class="mcp"><pre class="v" id="mcpLine" translate="no"></pre><button type="button" class="btn sm" id="mcpCopy">Copy</button></div></div><p class="note" id="mcpNote"></p></div>
|
|
137
155
|
</div>
|
|
138
|
-
<div class="gl benefits"><div class="box">
|
|
139
|
-
<div class="row"><span class="ic2"><svg class="ico" aria-hidden="true" focusable="false"><use href="#i-folder"/></svg></span><div class="body"><div class="ttl">Files are the truth</div><div class="det">Every view is read from <span class="mono" translate="no">.specs/</span> and git. Every action writes a file you could have edited by hand.</div></div></div>
|
|
140
|
-
<div class="row"><span class="ic2"><svg class="ico" aria-hidden="true" focusable="false"><use href="#i-shield"/></svg></span><div class="body"><div class="ttl">Nothing leaves this machine</div><div class="det">Runs on localhost, no account, no telemetry. No <span class="mono" translate="no">.specs/</span> yet? Your AI IDE writes one for you.</div></div></div>
|
|
141
|
-
</div></div>
|
|
142
|
-
<div class="gl recents"><div class="gh">Recent projects <span class="cnt" id="homePath" translate="no"></span></div><div class="box" id="homeBox"></div></div>
|
|
143
|
-
<!-- BL-PM-007: unless specpilot serve --no-mcp (BL-105) -->
|
|
144
|
-
<div class="gl" id="homeMcp" hidden><div class="gh">Connect Your AI IDE <span class="cnt">optional, one line</span></div><div class="box"><div class="mcp"><code class="v" id="mcpLine" translate="no"></code><button type="button" class="btn sm" id="mcpCopy">Copy</button></div></div><p class="note" id="mcpNote"></p></div>
|
|
145
156
|
<div class="fine"><i aria-hidden="true"></i><span>Server running on <span class="mono" id="homeAddr" translate="no"></span> · <span id="homeVer" translate="no"></span></span></div>
|
|
146
157
|
</section>
|
|
147
158
|
|
|
148
159
|
<!-- TASKS: the rows of planning/tasks.md, from readSpecs() -->
|
|
149
|
-
|
|
160
|
+
<!-- OVERVIEW (BL-171, REQ-002.H.76): the landing; cards from the payload and roadmap.md, each left out when empty -->
|
|
161
|
+
<section class="view on" id="v-overview">
|
|
162
|
+
<div class="ovgrid" id="ovBox"></div>
|
|
163
|
+
</section>
|
|
164
|
+
|
|
165
|
+
<section class="view" id="v-board">
|
|
150
166
|
<div class="gl" id="gRaw" hidden></div>
|
|
151
167
|
<div class="gl" id="gHead" hidden role="status" aria-live="polite"></div>
|
|
152
168
|
<div class="gl" id="gConv"></div>
|
|
@@ -178,7 +194,7 @@
|
|
|
178
194
|
<p class="note">Nothing is created yet. The folder is made by your IDE in step 3, only at this path.</p>
|
|
179
195
|
</div>
|
|
180
196
|
<div class="warnbox" id="suOff" hidden><span aria-hidden="true">!</span><span>This server was started with <span class="mono" translate="no">--no-mcp</span>, so your IDE cannot reach it. Restart with <span class="mono" translate="no">specpilot serve</span> and come back here.</span></div>
|
|
181
|
-
<div class="gl step" id="suConnect"><div class="gh"><span class="n">1</span>Connect your AI IDE<span class="st" id="suStatus" role="status"></span></div><div class="box pre" id="suConfigBox"><pre id="suConfig" translate="no"></pre><button type="button" class="btn sm" id="suConfigCopy">Copy</button></div><p class="note" id="suMcpNote"></p></div>
|
|
197
|
+
<div class="gl step" id="suConnect"><div class="gh"><span class="n">1</span>Connect your AI IDE<span class="st" id="suStatus" role="status"></span></div><div class="seg ides" role="radiogroup" aria-label="Your AI IDE" id="suIde"></div><div class="box pre" id="suConfigBox"><pre id="suConfig" translate="no"></pre><button type="button" class="btn sm" id="suConfigCopy">Copy</button></div><p class="note" id="suMcpNote"></p></div>
|
|
182
198
|
<div class="gl step" id="suTell"><div class="gh"><span class="n">2</span>Tell it what to do</div><div class="box line"><code id="suPrompt" translate="no"></code><button type="button" class="btn sm" id="suPromptCopy">Copy</button></div></div>
|
|
183
199
|
<div class="gl step" id="suProgress"><div class="gh"><span class="n">3</span>Progress</div><p class="note">Updates by itself as your IDE calls the server. Nothing here to click.</p>
|
|
184
200
|
<ol class="steps"><li class="wait"><i aria-hidden="true"></i>Read the code</li><li class="wait"><i aria-hidden="true"></i>Answer the questions</li><li class="wait"><i aria-hidden="true"></i>Write the files</li><li class="wait"><i aria-hidden="true"></i>Validate</li></ol></div>
|
|
@@ -212,6 +228,7 @@
|
|
|
212
228
|
</div>
|
|
213
229
|
|
|
214
230
|
<aside class="insp" id="insp" aria-label="Details"></aside>
|
|
231
|
+
<div id="inspGrip" role="separator" aria-orientation="vertical" aria-controls="insp" aria-label="Resize Details" tabindex="0"></div>
|
|
215
232
|
</main>
|
|
216
233
|
</div>
|
|
217
234
|
|
|
@@ -249,7 +266,7 @@
|
|
|
249
266
|
|
|
250
267
|
<!-- ARCHIVE COMPLETED (BL-TB-06, D8): what the action does, the gates that apply, a box to tick for each that warns -->
|
|
251
268
|
<div class="veil" id="archVeil"><div class="sheet task" role="dialog" aria-modal="true" aria-labelledby="archTitle" tabindex="-1">
|
|
252
|
-
<div class="sh"><div><h2 id="archTitle">Archive oldest Completed rows</h2><p>Moves the oldest rows of <span class="mono" translate="no">## Completed</span> in <span class="mono" translate="no">planning/tasks.md</span> into a dated block at the end of <span class="mono" translate="no">planning/tasks-archive.md</span>, as <span class="mono" translate="no">specpilot archive</span> does. The newest
|
|
269
|
+
<div class="sh"><div><h2 id="archTitle">Archive oldest Completed rows</h2><p>Moves the oldest rows of <span class="mono" translate="no">## Completed</span> in <span class="mono" translate="no">planning/tasks.md</span> into a dated block at the end of <span class="mono" translate="no">planning/tasks-archive.md</span>, as <span class="mono" translate="no">specpilot archive</span> does. The newest rows stay; <span class="mono" translate="no">prompts.md</span> is not touched.</p></div></div>
|
|
253
270
|
<form class="sb" id="archForm" autocomplete="off">
|
|
254
271
|
<div class="gl"><div class="gh">Checks</div><div class="box" id="archGates"></div></div>
|
|
255
272
|
<p class="err" id="archErr" role="alert" hidden></p>
|
|
@@ -268,6 +285,7 @@
|
|
|
268
285
|
<div class="veil pal-veil" id="palVeil"><div class="pal"><input id="palIn" type="search" name="q" aria-label="Search views, spec files and tasks" placeholder="Jump to a view, spec file or task…" autocomplete="off" spellcheck="false"><ul id="palList"></ul></div></div>
|
|
269
286
|
<!-- CARD MENU (BL-TB-11): a task card's actions, built from the move table of /api/specs -->
|
|
270
287
|
<div class="idemenu cardmenu" id="cardMenu" role="menu" aria-label="Task actions" hidden></div>
|
|
288
|
+
<div class="idemenu cardmenu" id="setMenu" role="menu" aria-label="Settings" hidden><button type="button" role="menuitem" id="themeBtn">Light appearance</button><button type="button" role="menuitem" id="quitBtn" hidden>Quit SpecPilot…</button></div>
|
|
271
289
|
<div class="toast" id="toast" role="status" aria-live="polite"></div>
|
|
272
290
|
</body>
|
|
273
291
|
</html>
|
package/ui/route.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/* Hash routing for the serve UI, kept free of the DOM so Jest can require it.
|
|
3
3
|
Loaded as /assets/route.js in the browser. */
|
|
4
4
|
(function (root) {
|
|
5
|
-
const VIEWS=['board','explorer','security','instructions','commands','skills'];
|
|
5
|
+
const VIEWS=['overview','board','explorer','security','instructions','commands','skills'];
|
|
6
6
|
const esc=s=>String(s).replace(/[&<>"']/g,c=>({'&':'&','<':'<','>':'>','"':'"',"'":'''}[c]));
|
|
7
7
|
|
|
8
8
|
/* "#file/quality/tests.md" → {project:0, view:'file', sub:'quality/tests.md', missing:false}.
|
|
@@ -14,14 +14,18 @@ const esc=s=>String(s).replace(/[&<>"']/g,c=>({'&':'&','<':'<','>':'>'
|
|
|
14
14
|
same terms: both belong to no project, so an index before them and anything after is ignored;
|
|
15
15
|
without `home` they are unknown views. A `count` of 0 (no project served, BL-080) keeps those two
|
|
16
16
|
and sends every other hash, the empty one included, to Home; the boot call passes Infinity. */
|
|
17
|
-
function resolveRoute(hash,files,count,home){
|
|
18
|
-
|
|
17
|
+
function resolveRoute(hash,files,count,home,closed){
|
|
18
|
+
// BL-166: `closed` lists retired project indices; "project 0" below reads as the first open one, and a closed index goes Home
|
|
19
|
+
closed=closed||[];
|
|
20
|
+
let first=0;while(first<(count||1)&&closed.includes(first))first++;
|
|
21
|
+
let h=String(hash||'').replace(/^#/,''),project=first;
|
|
19
22
|
const m=/^(\d+)\/(.*)$/.exec(h);
|
|
20
23
|
const top=/^(home|new)(\/|$)/.exec(m?m[2]:h);
|
|
21
|
-
if(home&&top)return {project:
|
|
22
|
-
if(home&&count===0)return {project:
|
|
24
|
+
if(home&&top)return {project:first,view:top[1],sub:'',missing:false};
|
|
25
|
+
if(home&&(count===0||first>=count))return {project:first,view:'home',sub:'',missing:false};
|
|
23
26
|
if(m){
|
|
24
|
-
if(!/^(0|[1-9][0-9]*)$/.test(m[1])||Number(m[1])>=(count||1))return {project:
|
|
27
|
+
if(!/^(0|[1-9][0-9]*)$/.test(m[1])||Number(m[1])>=(count||1))return {project:first,view:'overview',sub:'',missing:false};
|
|
28
|
+
if(home&&closed.includes(Number(m[1])))return {project:first,view:'home',sub:'',missing:false};
|
|
25
29
|
project=Number(m[1]);h=m[2];
|
|
26
30
|
}
|
|
27
31
|
const ix=h.indexOf('/');
|
|
@@ -30,7 +34,7 @@ function resolveRoute(hash,files,count,home){
|
|
|
30
34
|
try{sub=decodeURIComponent(sub);}catch(e){}
|
|
31
35
|
if(view==='file'&&sub)return {project,view:'file',sub,missing:!Object.prototype.hasOwnProperty.call(files||{},sub)};
|
|
32
36
|
if(VIEWS.includes(view))return {project,view,sub,missing:false};
|
|
33
|
-
return {project,view:'
|
|
37
|
+
return {project,view:'overview',sub:'',missing:false}; // Overview is the landing (BL-171, REQ-002.H.76)
|
|
34
38
|
}
|
|
35
39
|
|
|
36
40
|
/* The whole content of a view whose file is gone: its path, and that it no longer exists. */
|
|
@@ -101,11 +105,11 @@ function openOutcome(status,res,created){
|
|
|
101
105
|
return {project:null,specs:null,toast:res.error||`Nothing was ${did} (HTTP ${status}).`};
|
|
102
106
|
}
|
|
103
107
|
|
|
104
|
-
/* The view a live-reload payload forces, or null to stay: setup when .specs/ is gone,
|
|
108
|
+
/* The view a live-reload payload forces, or null to stay: setup when .specs/ is gone, Overview (BL-171) when it
|
|
105
109
|
appeared while the setup view was shown. Home and the new-project chat belong to no project, so they never move. */
|
|
106
110
|
function reloadView(curView,hadSpecs,hasSpecs){
|
|
107
111
|
if(!hasSpecs&&curView!=='setup'&&curView!=='home'&&curView!=='new')return 'setup';
|
|
108
|
-
if(!hadSpecs&&hasSpecs&&curView==='setup')return '
|
|
112
|
+
if(!hadSpecs&&hasSpecs&&curView==='setup')return 'overview';
|
|
109
113
|
return null;
|
|
110
114
|
}
|
|
111
115
|
|
|
@@ -190,12 +194,37 @@ function flowBody(list,answers){
|
|
|
190
194
|
return body;
|
|
191
195
|
}
|
|
192
196
|
|
|
193
|
-
/* The one line
|
|
197
|
+
/* The one line Claude Code's .mcp.json takes (BL-PM-007); serve.ts prints the same line. */
|
|
194
198
|
function mcpConfigLine(host,token){
|
|
195
199
|
return JSON.stringify({mcpServers:{'specpilot-local':{type:'http',url:`http://${host}/mcp`,headers:{'X-SpecPilot-Token':token}}}});
|
|
196
200
|
}
|
|
197
|
-
|
|
198
|
-
|
|
201
|
+
/* Each IDE's file, config and note for /mcp (BL-157, REQ-002.H.68), from its own docs read 2026-11-09. `token` is the
|
|
202
|
+
page's token, or null when the server took SPECPILOT_MCP_TOKEN, whose value the page never holds. */
|
|
203
|
+
const MCP_IDES=['Claude Code','Cursor','VS Code','Windsurf','Codex','Antigravity'];
|
|
204
|
+
function mcpConfig(ide,host,token){
|
|
205
|
+
const url=`http://${host}/mcp`,ph='<SPECPILOT_MCP_TOKEN value>';
|
|
206
|
+
const d={
|
|
207
|
+
'Claude Code':{file:'.mcp.json',env:'${SPECPILOT_MCP_TOKEN}'},
|
|
208
|
+
'Cursor':{file:'.cursor/mcp.json',env:'${env:SPECPILOT_MCP_TOKEN}',body:k=>({mcpServers:{'specpilot-local':{url,headers:{'X-SpecPilot-Token':k}}}})},
|
|
209
|
+
'VS Code':{file:'.vscode/mcp.json',env:'${env:SPECPILOT_MCP_TOKEN}',body:k=>({servers:{'specpilot-local':{type:'http',url,headers:{'X-SpecPilot-Token':k}}}})},
|
|
210
|
+
'Windsurf':{file:'~/.codeium/windsurf/mcp_config.json',user:true,body:k=>({mcpServers:{'specpilot-local':{serverUrl:url,headers:{'X-SpecPilot-Token':k}}}})},
|
|
211
|
+
'Codex':{file:'~/.codex/config.toml',user:true},
|
|
212
|
+
'Antigravity':{file:'.agents/mcp_config.json',body:k=>({mcpServers:{'specpilot-local':{serverUrl:url,headers:{'X-SpecPilot-Token':k}}}})},
|
|
213
|
+
}[ide];
|
|
214
|
+
if(!d)return null;
|
|
215
|
+
const f=d.file,k=token!==null?token:(d.env||ph);
|
|
216
|
+
const text=ide==='Codex'
|
|
217
|
+
?`[mcp_servers.specpilot-local]\nurl = "${url}"\n`+(token!==null?`http_headers = { "X-SpecPilot-Token" = "${token}" }`:'env_http_headers = { "X-SpecPilot-Token" = "SPECPILOT_MCP_TOKEN" }')
|
|
218
|
+
:JSON.stringify(d.body?d.body(k):JSON.parse(mcpConfigLine(host,k)),null,2);
|
|
219
|
+
const note=token!==null?(d.user?`Add this to ${f}. The token changes each time specpilot serve starts.`:`Add this to ${f} in your project, and add ${f} to .gitignore. The token changes each time specpilot serve starts.`)
|
|
220
|
+
:ide==='Codex'?`Add this to ${f}. Codex reads SPECPILOT_MCP_TOKEN from the environment.`
|
|
221
|
+
:d.env?`Add this to ${f} in your project. ${ide} fills in SPECPILOT_MCP_TOKEN from the environment.`
|
|
222
|
+
:d.user?`Add this to ${f}, and put your SPECPILOT_MCP_TOKEN value in place of ${ph}.`
|
|
223
|
+
:`Add this to ${f} in your project, put your SPECPILOT_MCP_TOKEN value in place of ${ph}, and add ${f} to .gitignore.`;
|
|
224
|
+
return {file:f,text,note};
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
const api={mcpConfigLine,mcpConfig,MCP_IDES,resolveRoute,goneHtml,when,editorUrl,cursorPromptUrl,onboardingPrompt,recentHtml,openOutcome,reloadView,repoNameFromUrl,CLONE_STAGES,cloneStatus,cloneProgress,projectLabel,
|
|
199
228
|
projectNameError,handleError,HANDLE_PATTERN,flowValue,answered,flowQuestions,flowBody};
|
|
200
229
|
if(typeof module==='object'&&module.exports)module.exports=api;else Object.assign(root,api);
|
|
201
230
|
})(this);
|