specpilot 2.7.1 → 2.9.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.
Files changed (45) hide show
  1. package/README.md +10 -6
  2. package/dist/commands/init.d.ts.map +1 -1
  3. package/dist/commands/init.js +31 -92
  4. package/dist/commands/init.js.map +1 -1
  5. package/dist/commands/serve.d.ts +3 -1
  6. package/dist/commands/serve.d.ts.map +1 -1
  7. package/dist/commands/serve.js +55 -6
  8. package/dist/commands/serve.js.map +1 -1
  9. package/dist/utils/addSpecsQuestions.d.ts +16 -0
  10. package/dist/utils/addSpecsQuestions.d.ts.map +1 -1
  11. package/dist/utils/addSpecsQuestions.js +28 -1
  12. package/dist/utils/addSpecsQuestions.js.map +1 -1
  13. package/dist/utils/gitClone.d.ts +62 -0
  14. package/dist/utils/gitClone.d.ts.map +1 -0
  15. package/dist/utils/gitClone.js +222 -0
  16. package/dist/utils/gitClone.js.map +1 -0
  17. package/dist/utils/initQuestions.d.ts +57 -0
  18. package/dist/utils/initQuestions.d.ts.map +1 -0
  19. package/dist/utils/initQuestions.js +49 -0
  20. package/dist/utils/initQuestions.js.map +1 -0
  21. package/dist/utils/projectRegistry.d.ts +65 -0
  22. package/dist/utils/projectRegistry.d.ts.map +1 -0
  23. package/dist/utils/projectRegistry.js +242 -0
  24. package/dist/utils/projectRegistry.js.map +1 -0
  25. package/dist/utils/specFileGenerator.d.ts +5 -4
  26. package/dist/utils/specFileGenerator.d.ts.map +1 -1
  27. package/dist/utils/specFileGenerator.js +53 -28
  28. package/dist/utils/specFileGenerator.js.map +1 -1
  29. package/dist/utils/specGenerator.d.ts +5 -0
  30. package/dist/utils/specGenerator.d.ts.map +1 -1
  31. package/dist/utils/specGenerator.js +7 -0
  32. package/dist/utils/specGenerator.js.map +1 -1
  33. package/dist/utils/specServer.d.ts +8 -2
  34. package/dist/utils/specServer.d.ts.map +1 -1
  35. package/dist/utils/specServer.js +284 -19
  36. package/dist/utils/specServer.js.map +1 -1
  37. package/dist/utils/specSetup.d.ts +69 -4
  38. package/dist/utils/specSetup.d.ts.map +1 -1
  39. package/dist/utils/specSetup.js +226 -18
  40. package/dist/utils/specSetup.js.map +1 -1
  41. package/package.json +1 -1
  42. package/ui/app.css +135 -9
  43. package/ui/app.js +301 -67
  44. package/ui/index.html +60 -8
  45. package/ui/route.js +179 -3
package/README.md CHANGED
@@ -76,7 +76,7 @@ This AI-assisted approach ensures comprehensive, high-quality specifications tai
76
76
  | `list` | Show available templates |
77
77
  | `migrate` | Convert legacy `.project-spec` folder (rarely needed) |
78
78
  | `refine [desc]` | Refine project specifications |
79
- | `serve [folders...]` | Serve a local web UI over the `.specs/` of this project, or of each folder named (task moves, and guided setup of a named folder without `.specs/`, unless `--read-only`) |
79
+ | `serve [folders...]` | Serve a local web UI over the `.specs/` of this project, or of each folder named; open more from the page, remembered in `~/.specpilot/projects.json` (task moves, guided setup of a folder without `.specs/`, unless `--read-only`) |
80
80
 
81
81
  > **Tip — command aliases:** All commands have a short alias you can use instead of the full name.
82
82
  > `init` → `i`  ·  `validate` → `v`  ·  `migrate` → `m`  ·  `list` → `ls`  ·  `refine` → `ref`  ·  `archive` → `ar`  ·  `add-specs` → `add`  ·  `backfill` → `bf`
@@ -116,7 +116,7 @@ specpilot validate --fix
116
116
 
117
117
  ## specpilot serve
118
118
 
119
- Serve a local web UI over a project's `.specs/`, where you can also move tasks between Backlog and Current Sprint, and set up `.specs/` in a folder that has none yet. With no folders it serves the project you run it from (the folder that contains `.specs/`); name one or more folders to serve those instead, all from one server. Press Ctrl+C to stop.
119
+ Serve a local web UI over a project's `.specs/`, where you can also move tasks between Backlog and Current Sprint, set up `.specs/` in a folder that has none yet, and open more projects. With no folders it serves the project you run it from (the folder that contains `.specs/`); name one or more folders to serve those instead, all from one server, or open them later from the page. Press Ctrl+C to stop.
120
120
 
121
121
  ```bash
122
122
  specpilot serve # this project, at http://127.0.0.1:4321
@@ -129,13 +129,17 @@ specpilot serve ../new-project # no .specs/ there yet: the page sets it up (or
129
129
  | ------------- | ------- | ---------------------------------------------------------------------------------------- |
130
130
  | `--port <n>` | `4321` | Port to listen on (127.0.0.1 only) |
131
131
  | `--poll <ms>` | `1000` | Change-detection interval in ms (minimum 250); polling runs only while a page is open |
132
- | `--read-only` | | No task moves and no guided setup: the UI only reads, with no drag handles and no write routes |
132
+ | `--read-only` | | No task moves, no guided setup, no opening folders and no registry: the UI only reads, with no drag handles and no write routes |
133
133
  | `--open` | | Open the UI in the default browser |
134
134
 
135
- - **Several projects**: name any folders; one without `.specs/` is served too and offers guided setup (below). They are numbered in command-line order from 0 (`../api` is project 0, `../web` is project 1), and that number is the `?project=<n>` on the server's `/api/` routes and the `#1/...` at the start of a page link for any project after the first (no number means project 0). Each project keeps its own tasks, files and live reload; a move changes only that project's `tasks.md`. The list is fixed when the server starts: the page cannot add a folder, and nothing is saved outside your projects.
135
+ - **Several projects**: name any folders; one without `.specs/` is served too and offers guided setup (below). They are numbered in command-line order from 0 (`../api` is project 0, `../web` is project 1), and that number is the `?project=<n>` on the server's `/api/` routes and the `#1/...` at the start of a page link for any project after the first (no number means project 0). Each project keeps its own tasks, files and live reload; a move changes only that project's `tasks.md`. Folders opened from the page (below) get the next numbers; a number never changes while the server runs, and one server holds at most 20 projects.
136
136
  - **Task moves**: drag a row, or use `Alt+Up/Down` to reorder and `Alt+Left/Right` to move between Backlog and Current Sprint. A move changes exactly one line of `.specs/planning/tasks.md` and nothing else, and offers Undo; Completed rows do not move. If the file changed on disk since the page loaded, the move is refused and the page redraws. Start with `--read-only` to turn moves off.
137
- - **Guided setup**: a folder you name that has no `.specs/` shows, instead of the views, the questions `specpilot add-specs` asks (project type, language and framework when they are not detected, API paradigm, handle, IDE), and one button. It then creates exactly what `add-specs` creates for those answers. Files outside `.specs/` that already exist (your own `.gitattributes`, `CLAUDE.md`, `.vscode/settings.json`, a command file) are never changed: the page lists them before you submit and after, and `specpilot backfill` adds missing SpecPilot sections to kept instruction and command files (a kept `.gitattributes` does not get the `merge=union` lines). Setup is offered only for folders named on the command line, not for the current-directory default, which still needs `.specs/` (`specpilot serve .` names it). The request is protected like a task move. While it runs, the files are generated into a `.specpilot-setup-<id>/` folder inside the project, which is removed when done; if a run is interrupted, the next `specpilot serve` removes that folder (and only that folder, recognised by its marker file).
138
- - **Nothing else is written**: in a project with `.specs/`, its `.specs/planning/tasks.md` is the only file the server can change; in a named folder without `.specs/`, setup creates new files and changes none; everything else is read on every request.
137
+ - **Guided setup**: a folder you name that has no `.specs/` shows, instead of the views, a Start Guided Setup button. It starts a chat that asks the questions `specpilot add-specs` asks (project type, language and framework when they are not detected, API paradigm, handle, IDE) one at a time: a friendly line per question with the CLI's own question under it, chips or a field with Continue and Skip, step dividers and a progress bar, then a recap of your answers by step with the files that will be written folded inside, before anything is created. Tap any answer, in the thread or the recap, to change it; you come straight back. It then creates exactly what `add-specs` creates for those answers. A handle that would be refused is caught where you type it. Your answers stay in the page while it is open; they are not saved anywhere. Files outside `.specs/` that already exist (your own `.gitattributes`, `CLAUDE.md`, `.vscode/settings.json`, a command file) are never changed: the recap's file list marks them (`Already here, will be kept`) and the page lists them again afterwards, and `specpilot backfill` adds missing SpecPilot sections to kept instruction and command files (a kept `.gitattributes` does not get the `merge=union` lines). Setup is offered only for folders named on the command line, not for the current-directory default, which still needs `.specs/` (`specpilot serve .` names it). The request is protected like a task move. While it runs, the files are generated into a `.specpilot-setup-<id>/` folder inside the project, which is removed when done; if a run is interrupted, the next `specpilot serve` removes that folder (and only that folder, recognised by its marker file).
138
+ - **Home**: the logo at the top of the left rail (or the `h` key, or `#home`) shows "Your specs, as a board.", an Open a Project Folder button and your Recent projects (path, last-opened time and, for projects already open, the git branch); click one to open it. `specpilot serve` still starts on the first project's Tasks view, and `--read-only` has no Home.
139
+ - **Open a project from the page**: the `+` tile in the left rail opens a sheet; type a folder path (`/Users/you/project` or `~/project`) and Open, and the folder is served alongside the others, with guided setup if it has no `.specs/`. Folders you open this way are listed under Recent projects next time, remembered in `~/.specpilot/projects.json` (path, last-opened time and a pinned flag, at most 50; the file is created the first time you open a folder from the page, and folders named on the command line are added to it only once it exists). Remove from list forgets a folder without touching it. The home folder, the root of a drive and folders already open are refused; a `projects.json` that cannot be read is left exactly as it is, and the page and the terminal say so. The request is protected like a task move.
140
+ - **Start a new project from the page**: Start a New Project on Home opens the same chat: name the project to start, then it asks for the parent folder (`/Users/you/dev` or `~/dev`) and the questions `specpilot init` asks, one at a time, then shows your answers and the files that will be written, and creates `<parent>/<name>`, writes the files `init` writes there and opens it on its onboarding prompt. An existing folder is used only if it is empty; one with content is refused (open it from the Folder tab to add `.specs/` to it). The parent must already exist and cannot be your home folder itself, the root of a drive, or a `.specs/` folder or anything under one. A project name that would be refused is caught where you type it. For a Brownfield project the four project-context questions are not asked, because `init` writes those answers only for Greenfield. Nothing that exists is changed, a run that fails removes what it created, and no `git init` is run. Not offered here: `--specs-name` and `--dry-run`.
141
+ - **Clone a repository from the page**: Clone a Repository on Home (or the Clone tab of the same sheet) asks for a repository URL, a parent folder and a folder name (leave it empty for the repository's name), runs your installed `git clone` and opens the result: on Tasks when the repository has `.specs/`, in guided setup when it has none. Accepted URLs: `https://host/path`, `git@host:path` and `ssh://host/path`; an https URL must not contain a user name or password (git uses your credential helper and ssh keys, as in a terminal), so for Azure DevOps drop the `org@` part. Submodules are not cloned, and there is no branch or depth option. The target folder must not exist or must be empty; the parent follows the rules of Start a New Project. As you type or paste the URL, Folder name is filled with the repository's name until you type one yourself. While the clone runs the sheet shows a moving bar and the elapsed time (no percentage yet). git is never asked a question it would wait on: a repository that needs a login it cannot get fails with git's own message, its last `fatal:` line with the line before it, for example `Host key verification failed. fatal: Could not read from remote repository.`, and a clone is stopped after 10 minutes. The page cannot accept an ssh host key for you: for a host you have never connected to, run `ssh -T git@host` once in a terminal, then clone again. Your ssh setup is used as it is; SpecPilot sets no ssh option on macOS and Linux. One clone runs at a time. A clone that fails, is stopped, or is cancelled (Cancel, Escape, closing the tab, Ctrl+C) removes what it downloaded; on Ctrl+C the server waits at most 5 seconds for that. Needs `git` on your `PATH`. This is the only time SpecPilot starts another program for the page and the only time it uses the network. On Windows ssh is put in batch mode (unless you have set `GIT_SSH_COMMAND`, `GIT_SSH` or `core.sshCommand`), and a stopped clone can leave git's helper process running until it ends by itself, and the clean-up can then fail on a file that helper still holds; the message says so.
142
+ - **Nothing else is written**: in a project with `.specs/`, its `.specs/planning/tasks.md` is the only file the server can change; in a named folder without `.specs/`, setup creates new files and changes none; a new project is one new folder (or an empty one) with new files; a clone is one new folder (or an empty one) filled by `git clone`; `~/.specpilot/projects.json` is the one file written outside your projects; everything else is read on every request.
139
143
  - **Loopback only**: binds 127.0.0.1 only; rejects any Host header other than `127.0.0.1:<port>` or `localhost:<port>` (403).
140
144
  - **Live reload**: polls allowlisted files with `stat()` every `--poll` ms while a page is open, and pushes changed paths on `/api/events`; open pages update in place.
141
145
  - **What it shows**: `.specs/`, `CLAUDE.md`, `AGENTS.md`, `.github/copilot-instructions.md`, `.claude/commands/`, `.claude/skills/` and `.github/prompts/`, as the files' own text.
@@ -1 +1 @@
1
- {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AAYA,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,wBAAsB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,iBAkWnE"}
1
+ {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AAgBA,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,wBAAsB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,iBAkSnE"}
@@ -48,29 +48,21 @@ const templateEngine_1 = require("../utils/templateEngine");
48
48
  const specGenerator_1 = require("../utils/specGenerator");
49
49
  const logger_1 = require("../utils/logger");
50
50
  const slashCommandGenerator_1 = require("../utils/slashCommandGenerator");
51
+ const addSpecsQuestions_1 = require("../utils/addSpecsQuestions");
52
+ const initQuestions_1 = require("../utils/initQuestions");
51
53
  async function initCommand(name, options) {
52
54
  const logger = new logger_1.Logger();
53
55
  try {
54
- // Validate project name
55
- if (!name || name.trim() === '') {
56
- logger.displayError('Invalid Project Name', 'Project name is required and cannot be empty\n\n💡 Usage: specpilot init <project-name>');
57
- process.exit(1);
58
- }
59
- const projectName = name.trim();
60
- // Validate project name length (npm limit)
61
- if (projectName.length > 214) {
62
- logger.displayError('Invalid Project Name', 'Project name must be 214 characters or fewer');
63
- process.exit(1);
64
- }
65
- // Validate project name with allowlist (prevents filesystem issues and Handlebars template injection)
66
- if (!/^[a-zA-Z0-9][a-zA-Z0-9._-]*$/.test(projectName)) {
67
- logger.displayError('Invalid Project Name', 'Project name must start with a letter or number and contain only letters, numbers, dots, hyphens, and underscores\n\n💡 Example: my-project, app_v2, project.name');
56
+ // Validate project name (required, npm's length limit, allowlist: the shared rule, BL-075)
57
+ const projectName = (name || '').trim();
58
+ const nameProblem = (0, initQuestions_1.projectNameError)(projectName);
59
+ if (nameProblem) {
60
+ logger.displayError('Invalid Project Name', nameProblem.message + (nameProblem.hint ? `\n\n${nameProblem.hint}` : ''));
68
61
  process.exit(1);
69
62
  }
70
63
  // Validate supported language
71
- const supportedLanguages = ['typescript', 'javascript', 'python', 'kotlin', 'swift'];
72
- if (!supportedLanguages.includes(options.lang)) {
73
- logger.displayError('Unsupported Language', `Language "${options.lang}" is not supported\n\n💡 Supported languages: ${supportedLanguages.join(', ')}`);
64
+ if (!addSpecsQuestions_1.SUPPORTED_LANGUAGES.includes(options.lang)) {
65
+ logger.displayError('Unsupported Language', `Language "${options.lang}" is not supported\n\n💡 Supported languages: ${addSpecsQuestions_1.SUPPORTED_LANGUAGES.join(', ')}`);
74
66
  process.exit(1);
75
67
  }
76
68
  // Dry-run: list files that would be created without writing them
@@ -134,11 +126,8 @@ async function initCommand(name, options) {
134
126
  const typeResponse = await inquirer_1.default.prompt([{
135
127
  type: 'list',
136
128
  name: 'projectType',
137
- message: 'Is this a greenfield or brownfield project?',
138
- choices: [
139
- { name: 'Greenfield — new project, writing code from scratch', value: 'greenfield' },
140
- { name: 'Brownfield — existing codebase, initializing specs retroactively', value: 'brownfield' },
141
- ],
129
+ message: addSpecsQuestions_1.PROJECT_TYPE_MESSAGE,
130
+ choices: initQuestions_1.INIT_PROJECT_TYPE_CHOICES,
142
131
  }]);
143
132
  projectType = typeResponse.projectType;
144
133
  }
@@ -150,7 +139,7 @@ async function initCommand(name, options) {
150
139
  const response = await inquirer_1.default.prompt([{
151
140
  type: 'list',
152
141
  name: 'framework',
153
- message: 'Choose a framework:',
142
+ message: addSpecsQuestions_1.FRAMEWORK_MESSAGE,
154
143
  choices: ['none', ...frameworks]
155
144
  }]);
156
145
  framework = response.framework === 'none' ? undefined : response.framework;
@@ -162,13 +151,8 @@ async function initCommand(name, options) {
162
151
  const paradigmResponse = await inquirer_1.default.prompt([{
163
152
  type: 'list',
164
153
  name: 'apiParadigm',
165
- message: 'What API paradigm does this project use?',
166
- choices: [
167
- { name: 'REST / OpenAPI — HTTP endpoints, JSON responses', value: 'rest' },
168
- { name: 'CLI — command-line tool with commands and flags', value: 'cli' },
169
- { name: 'GraphQL — schema-first query/mutation API', value: 'graphql' },
170
- { name: 'None — skip api.yaml (UI library, mobile app, etc.)', value: 'none' },
171
- ],
154
+ message: addSpecsQuestions_1.API_PARADIGM_MESSAGE,
155
+ choices: addSpecsQuestions_1.API_PARADIGM_CHOICES,
172
156
  }]);
173
157
  apiParadigm = paradigmResponse.apiParadigm;
174
158
  }
@@ -181,7 +165,7 @@ async function initCommand(name, options) {
181
165
  const nameResponse = await inquirer_1.default.prompt([{
182
166
  type: 'input',
183
167
  name: 'developerName',
184
- message: `Your short handle is used as a prefix in task IDs (e.g. CD-jsmith-001) and prompt IDs\n (e.g. PROMPT-jsmith-001) to avoid collisions when multiple devs share the same spec files.\n Use your GitHub, GitLab, or Bitbucket username, or any short tag of your choice [${osUsername}]:`,
168
+ message: (0, addSpecsQuestions_1.handleMessage)(osUsername),
185
169
  }]);
186
170
  handle = nameResponse.developerName.trim();
187
171
  if (!handle)
@@ -195,37 +179,25 @@ async function initCommand(name, options) {
195
179
  const ideResponse = await inquirer_1.default.prompt([{
196
180
  type: 'list',
197
181
  name: 'ide',
198
- message: 'Select your AI IDE/Agent for SpecPilot context:',
199
- choices: [
200
- { name: 'GitHub Copilot', value: 'vscode' },
201
- { name: 'Cursor', value: 'Cursor' },
202
- { name: 'Windsurf', value: 'Windsurf' },
203
- { name: 'Antigravity', value: 'Antigravity' },
204
- { name: 'Claude Code', value: 'claude-code' },
205
- { name: 'Codex', value: 'Codex' },
206
- ]
182
+ message: addSpecsQuestions_1.IDE_MESSAGE,
183
+ choices: addSpecsQuestions_1.IDE_CHOICES,
207
184
  }]);
208
185
  ide = ideResponse.ide;
209
186
  }
210
- // Project context questions (helps AI generate better specs)
211
- const NOT_SPECIFIED = 'Not specified — use your judgment and mark as [ASSUMPTION]';
212
- let projectContext = {
213
- whatItDoes: NOT_SPECIFIED,
214
- targetUsers: NOT_SPECIFIED,
215
- expectedScale: NOT_SPECIFIED,
216
- constraints: NOT_SPECIFIED,
217
- };
187
+ // Project context questions (helps AI generate better specs); an empty answer becomes NOT_SPECIFIED in initOptions()
188
+ let projectContext = { whatItDoes: '', targetUsers: '', expectedScale: '', constraints: '' };
218
189
  if (options.prompts) {
219
190
  console.log('');
220
191
  console.log(chalk_1.default.blue.bold('📋 Project Context') + chalk_1.default.gray(' (helps AI generate better specs)'));
221
192
  console.log('');
222
193
  // Mandatory question — re-prompt if empty
194
+ const [required, ...optional] = initQuestions_1.CONTEXT_QUESTIONS;
223
195
  let whatItDoes = '';
224
196
  while (!whatItDoes.trim()) {
225
197
  const descResponse = await inquirer_1.default.prompt([{
226
198
  type: 'input',
227
- name: 'whatItDoes',
228
- message: 'What does your project do? (required):',
199
+ name: required.key,
200
+ message: required.message,
229
201
  }]);
230
202
  whatItDoes = descResponse.whatItDoes.trim();
231
203
  if (!whatItDoes) {
@@ -233,35 +205,14 @@ async function initCommand(name, options) {
233
205
  }
234
206
  }
235
207
  // Optional questions — Enter to skip
236
- const optionalResponse = await inquirer_1.default.prompt([
237
- {
238
- type: 'input',
239
- name: 'targetUsers',
240
- message: 'Who are the target users? (Enter to skip):',
241
- default: '',
242
- filter: (val) => val.trim(),
243
- },
244
- {
245
- type: 'input',
246
- name: 'expectedScale',
247
- message: 'What\'s the expected scale? (Enter to skip):',
248
- default: '',
249
- filter: (val) => val.trim(),
250
- },
251
- {
252
- type: 'input',
253
- name: 'constraints',
254
- message: 'Any key constraints or requirements? (Enter to skip):',
255
- default: '',
256
- filter: (val) => val.trim(),
257
- },
258
- ]);
259
- projectContext = {
260
- whatItDoes,
261
- targetUsers: optionalResponse.targetUsers || NOT_SPECIFIED,
262
- expectedScale: optionalResponse.expectedScale || NOT_SPECIFIED,
263
- constraints: optionalResponse.constraints || NOT_SPECIFIED,
264
- };
208
+ const optionalResponse = await inquirer_1.default.prompt(optional.map(q => ({
209
+ type: 'input',
210
+ name: q.key,
211
+ message: q.message,
212
+ default: '',
213
+ filter: (val) => val.trim(),
214
+ })));
215
+ projectContext = { whatItDoes, targetUsers: optionalResponse.targetUsers, expectedScale: optionalResponse.expectedScale, constraints: optionalResponse.constraints };
265
216
  }
266
217
  // Create project directory
267
218
  const targetDir = (0, path_1.join)(options.dir, projectName);
@@ -318,19 +269,7 @@ async function initCommand(name, options) {
318
269
  const templateEngine = new templateEngine_1.TemplateEngine();
319
270
  const specGenerator = new specGenerator_1.SpecGenerator(templateEngine);
320
271
  // Generate .specs directory structure
321
- const result = await specGenerator.generateSpecs({
322
- projectName,
323
- language: options.lang,
324
- framework,
325
- targetDir,
326
- specsName: options.specsName,
327
- author: developerName,
328
- ide,
329
- mode: 'new',
330
- projectType,
331
- apiParadigm,
332
- projectContext,
333
- });
272
+ const result = await specGenerator.generateSpecs((0, initQuestions_1.initOptions)(targetDir, projectName, { language: options.lang, framework, projectType, apiParadigm, handle: developerName, ide, ...projectContext }, options.specsName));
334
273
  const { onboardingPrompt } = result;
335
274
  if (ide.toLowerCase() === 'codex')
336
275
  console.log(slashCommandGenerator_1.CODEX_PROMPTS_NOTICE);
@@ -1 +1 @@
1
- {"version":3,"file":"init.js","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqBA,kCAkWC;AAvXD,+BAAqC;AACrC,2BAAyD;AACzD,4CAAoB;AACpB,kDAA0B;AAC1B,wDAAgC;AAChC,8CAAgC;AAChC,oDAA+D;AAC/D,4DAAyD;AACzD,0DAAmE;AACnE,4CAAyC;AACzC,0EAAsE;AAW/D,KAAK,UAAU,WAAW,CAAC,IAAY,EAAE,OAAoB;IAClE,MAAM,MAAM,GAAG,IAAI,eAAM,EAAE,CAAC;IAE5B,IAAI,CAAC;QACH,wBAAwB;QACxB,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC;YAChC,MAAM,CAAC,YAAY,CAAC,sBAAsB,EAAE,yFAAyF,CAAC,CAAC;YACvI,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;QAED,MAAM,WAAW,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC;QAEhC,2CAA2C;QAC3C,IAAI,WAAW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AAgB,CAAC,CAAC,CAAC;QAC1C,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QAChB,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,IAAI,CAAC,oBAAoB,YAAY,+BAA+B,CAAC,CAAC,CAAC;QACzF,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,IAAI,CAAC,IAAI,CAAC,oDAAoD,CAAC,CAAC,CAAC;IAErF,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,CAAC,YAAY,CAAC,uBAAuB,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC;QACvG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC"}
@@ -4,10 +4,12 @@ export interface ServeOptions {
4
4
  readOnly?: boolean;
5
5
  open?: boolean;
6
6
  }
7
+ /** Longest a stop signal waits for a running clone to be killed and cleaned up. */
8
+ export declare const STOP_CLONE_MS = 5000;
7
9
  /**
8
10
  * Runs until Ctrl+C; exits the process with 1 on any startup error. `folders` empty = the current
9
11
  * directory (BL-054), which must contain `.specs/`; a named folder without one is served for guided
10
- * setup (BL-055).
12
+ * setup (BL-055). More folders can be opened from the page and are remembered in the registry (BL-067).
11
13
  */
12
14
  export declare function serveCommand(folders: string[], options: ServeOptions): Promise<void>;
13
15
  //# sourceMappingURL=serve.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"serve.d.ts","sourceRoot":"","sources":["../../src/commands/serve.ts"],"names":[],"mappings":"AAUA,MAAM,WAAW,YAAY;IAC3B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAiBD;;;;GAIG;AACH,wBAAsB,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CA+E1F"}
1
+ {"version":3,"file":"serve.d.ts","sourceRoot":"","sources":["../../src/commands/serve.ts"],"names":[],"mappings":"AAWA,MAAM,WAAW,YAAY;IAC3B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAID,mFAAmF;AACnF,eAAO,MAAM,aAAa,OAAO,CAAC;AAclC;;;;GAIG;AACH,wBAAsB,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAsH1F"}
@@ -3,6 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.STOP_CLONE_MS = void 0;
6
7
  exports.serveCommand = serveCommand;
7
8
  const chalk_1 = __importDefault(require("chalk"));
8
9
  const child_process_1 = require("child_process");
@@ -10,10 +11,13 @@ const fs_1 = require("fs");
10
11
  const path_1 = require("path");
11
12
  const specServer_1 = require("../utils/specServer");
12
13
  const specSetup_1 = require("../utils/specSetup");
14
+ const projectRegistry_1 = require("../utils/projectRegistry");
13
15
  const logger_1 = require("../utils/logger");
14
16
  const packageJson = require('../../package.json');
15
17
  const DEFAULT_PORT = 4321;
16
18
  const DEFAULT_POLL_MS = 1000;
19
+ /** Longest a stop signal waits for a running clone to be killed and cleaned up. */
20
+ exports.STOP_CLONE_MS = 5000;
17
21
  const MIN_POLL_MS = 250;
18
22
  /** Open `url` in the default browser. The URL is built here, never taken from input. */
19
23
  function openBrowser(url, logger) {
@@ -27,13 +31,13 @@ function openBrowser(url, logger) {
27
31
  /**
28
32
  * Runs until Ctrl+C; exits the process with 1 on any startup error. `folders` empty = the current
29
33
  * directory (BL-054), which must contain `.specs/`; a named folder without one is served for guided
30
- * setup (BL-055).
34
+ * setup (BL-055). More folders can be opened from the page and are remembered in the registry (BL-067).
31
35
  */
32
36
  async function serveCommand(folders, options) {
33
37
  const logger = new logger_1.Logger();
34
38
  const roots = [];
35
39
  if (!folders.length) {
36
- const root = process.cwd();
40
+ const root = (0, fs_1.realpathSync)(process.cwd()); // like a named folder, so "already served" compares like for like (BL-067)
37
41
  if (!(0, fs_1.existsSync)((0, path_1.join)(root, '.specs'))) {
38
42
  logger.error('No .specs/ folder in this directory. Run `specpilot serve` from a project root, `specpilot init` first, or `specpilot serve .` to set one up in the browser.');
39
43
  return process.exit(1);
@@ -73,9 +77,27 @@ async function serveCommand(folders, options) {
73
77
  for (const dir of (0, specSetup_1.removeStaleStaging)(root))
74
78
  console.log(`Removed ${dir}/, left by an interrupted setup.`);
75
79
  }
80
+ // The registry (BL-067): the folders named here are recorded only when the file already exists, so
81
+ // plain `specpilot serve` never creates one; a file that cannot be used is said so and left alone.
82
+ const home = (0, projectRegistry_1.homeDir)();
83
+ const registry = options.readOnly ? undefined : (0, projectRegistry_1.registryPath)(home);
84
+ let registryNote = null;
85
+ if (registry) {
86
+ const read = (0, projectRegistry_1.readRegistry)(registry);
87
+ if (read.error !== null)
88
+ registryNote = `${(0, specServer_1.displayRoot)(registry, home)} could not be read (${read.error}). It was left as it is; projects opened in this run are not remembered.`;
89
+ else if (read.exists) {
90
+ try {
91
+ (0, projectRegistry_1.writeRegistry)(registry, roots.reduce((entries, root) => (0, projectRegistry_1.upsertEntry)(entries, root, new Date()), read.entries));
92
+ }
93
+ catch (err) {
94
+ registryNote = `${(0, specServer_1.displayRoot)(registry, home)} could not be written (${err.message}). It was left as it is; projects opened in this run are not remembered.`;
95
+ }
96
+ }
97
+ }
76
98
  let handle;
77
99
  try {
78
- handle = await (0, specServer_1.startSpecServer)(roots, port, packageJson.version, { pollMs, readOnly: !!options.readOnly, named, log: m => logger.warn(m) });
100
+ handle = await (0, specServer_1.startSpecServer)(roots, port, packageJson.version, { pollMs, readOnly: !!options.readOnly, named, registry, log: m => logger.warn(m) });
79
101
  }
80
102
  catch (err) {
81
103
  if (err.code === 'EADDRINUSE') {
@@ -101,10 +123,37 @@ async function serveCommand(folders, options) {
101
123
  : empty.length
102
124
  ? 'Tasks can be moved in the page (only .specs/planning/tasks.md is written), and a folder without .specs/ can be set up there (new files only). Open pages update when a spec file changes. Press Ctrl+C to stop.'
103
125
  : 'Tasks can be moved in the page (only .specs/planning/tasks.md is written). Open pages update when a spec file changes. Press Ctrl+C to stop.'));
126
+ if (registry)
127
+ console.log(chalk_1.default.gray(`Folders opened in the page are remembered in ${(0, specServer_1.displayRoot)(registry, home)}.`));
128
+ if (registryNote)
129
+ console.log(registryNote);
104
130
  if (options.open)
105
131
  openBrowser(url, logger);
106
- process.once('SIGINT', () => {
107
- void handle.close().then(() => process.exit(0));
108
- });
132
+ // Ctrl+C, `kill` and a closed terminal end the same way. A clone runs in its own session and would
133
+ // outlive the server, so the signals stay handled until it is stopped and cleaned up (BL-PM-002),
134
+ // for at most STOP_CLONE_MS; after that a second signal ends the process at once, as before.
135
+ const signals = ['SIGINT', 'SIGTERM', 'SIGHUP'];
136
+ let stopping = false;
137
+ const stop = () => {
138
+ if (stopping)
139
+ return;
140
+ stopping = true;
141
+ let cap;
142
+ const capped = new Promise(r => (cap = setTimeout(() => r(false), exports.STOP_CLONE_MS)));
143
+ void Promise.race([handle.stopClone().then(() => true), capped])
144
+ .then(stopped => {
145
+ clearTimeout(cap);
146
+ for (const signal of signals)
147
+ process.removeListener(signal, stop);
148
+ if (!stopped) {
149
+ logger.warn(`The clone could not be cleaned up within ${exports.STOP_CLONE_MS / 1000} seconds. Its folder may be left behind.`);
150
+ return process.exit(0);
151
+ }
152
+ return handle.close();
153
+ })
154
+ .then(() => process.exit(0));
155
+ };
156
+ for (const signal of signals)
157
+ process.on(signal, stop);
109
158
  }
110
159
  //# sourceMappingUR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CAAC,KAAK,CAAC,EAAE,qBAAa,CAAC,CAAC,CAAC,CAAC;QAC5F,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,SAAS,EAAE,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,CAAC;aAC7D,IAAI,CAAC,OAAO,CAAC,EAAE;YACd,YAAY,CAAC,GAAG,CAAC,CAAC;YAClB,KAAK,MAAM,MAAM,IAAI,OAAO;gBAAE,OAAO,CAAC,cAAc,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;YACnE,IAAI,CAAC,OAAO,EAAE,CAAC;gBACb,MAAM,CAAC,IAAI,CAAC,4CAA4C,qBAAa,GAAG,IAAI,0CAA0C,CAAC,CAAC;gBACxH,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YACzB,CAAC;YACD,OAAO,MAAM,CAAC,KAAK,EAAE,CAAC;QACxB,CAAC,CAAC;aACD,IAAI,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;IACjC,CAAC,CAAC;IACF,KAAK,MAAM,MAAM,IAAI,OAAO;QAAE,OAAO,CAAC,EAAE,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;AACzD,CAAC"}
@@ -1,5 +1,21 @@
1
1
  import { ProjectInfo } from './projectDetector';
2
2
  import { SpecGeneratorOptions } from './specGenerator';
3
+ /** The steps `specpilot serve` asks the questions in, named as init.specpilot.dev names them (BL-PM-004). */
4
+ export declare const SETUP_STEPS: string[];
5
+ /**
6
+ * The chat's friendly line for each question, a short recap label and, for a typed answer, the field's
7
+ * example (REQ-002.H.27). `{language}` is filled by the page with the language choice's text. The CLI's own
8
+ * message is shown under the line, verbatim; none of this reaches the terminal.
9
+ */
10
+ export declare const QUESTION_CHAT: Record<string, {
11
+ chat: string;
12
+ label: string;
13
+ placeholder?: string;
14
+ }>;
15
+ /** The questions in the order the chat asks them, each with its step (the page's parent-folder question comes first). */
16
+ export declare const CHAT_ORDER: [string, string][];
17
+ /** Question key → its step. */
18
+ export declare const QUESTION_STEPS: Record<string, string>;
3
19
  export declare const SUPPORTED_LANGUAGES: string[];
4
20
  export declare const PROJECT_TYPE_MESSAGE = "Is this a greenfield or brownfield project?";
5
21
  export declare const PROJECT_TYPE_CHOICES: {
@@ -1 +1 @@
1
- {"version":3,"file":"addSpecsQuestions.d.ts","sourceRoot":"","sources":["../../src/utils/addSpecsQuestions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAKvD,eAAO,MAAM,mBAAmB,UAA4D,CAAC;AAE7F,eAAO,MAAM,oBAAoB,gDAAgD,CAAC;AAClF,eAAO,MAAM,oBAAoB;;;GAGhC,CAAC;AAEF,eAAO,MAAM,gBAAgB,uBAAuB,CAAC;AACrD,eAAO,MAAM,iBAAiB,wBAAwB,CAAC;AAEvD,eAAO,MAAM,oBAAoB,6CAA6C,CAAC;AAC/E,eAAO,MAAM,oBAAoB;;;GAKhC,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,YAAY,MAAM,WAC2O,CAAC;AAE5R,eAAO,MAAM,WAAW,oDAAoD,CAAC;AAC7E,eAAO,MAAM,WAAW;;;GAOvB,CAAC;AAEF,0DAA0D;AAC1D,eAAO,MAAM,YAAY,GAAI,MAAM,WAAW,WAAuF,CAAC;AAEtI,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,YAAY,GAAG,YAAY,CAAC;IACzC,WAAW,CAAC,EAAE,MAAM,GAAG,KAAK,GAAG,SAAS,GAAG,MAAM,CAAC;IAClD,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;CACb;AAED,wGAAwG;AACxG,wBAAgB,e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AO,MAAM,YAAY,GAAI,MAAM,WAAW,WAAuF,CAAC;AAEtI,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,YAAY,GAAG,YAAY,CAAC;IACzC,WAAW,CAAC,EAAE,MAAM,GAAG,KAAK,GAAG,SAAS,GAAG,MAAM,CAAC;IAClD,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;CACb;AAED,wGAAwG;AACxG,wBAAgB,eAAe,CAC7B,UAAU,EAAE,MAAM,EAClB,WAAW,EAAE,WAAW,GAAG,IAAI,EAC/B,OAAO,EAAE,eAAe,EACxB,QAAQ,EAAE,oBAAoB,CAAC,UAAU,CAAC,GAAG,IAAI,GAChD,oBAAoB,CAgBtB"}
@@ -1,9 +1,36 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.detectedLine = exports.IDE_CHOICES = exports.IDE_MESSAGE = exports.handleMessage = exports.API_PARADIGM_CHOICES = exports.API_PARADIGM_MESSAGE = exports.FRAMEWORK_MESSAGE = exports.LANGUAGE_MESSAGE = exports.PROJECT_TYPE_CHOICES = exports.PROJECT_TYPE_MESSAGE = exports.SUPPORTED_LANGUAGES = void 0;
3
+ exports.detectedLine = exports.IDE_CHOICES = exports.IDE_MESSAGE = exports.handleMessage = exports.API_PARADIGM_CHOICES = exports.API_PARADIGM_MESSAGE = exports.FRAMEWORK_MESSAGE = exports.LANGUAGE_MESSAGE = exports.PROJECT_TYPE_CHOICES = exports.PROJECT_TYPE_MESSAGE = exports.SUPPORTED_LANGUAGES = exports.QUESTION_STEPS = exports.CHAT_ORDER = exports.QUESTION_CHAT = exports.SETUP_STEPS = void 0;
4
4
  exports.addSpecsOptions = addSpecsOptions;
5
5
  // What `specpilot add-specs` asks, and how its answers become generator options: one copy, used by
6
6
  // the command's inquirer prompts and by `specpilot serve`'s guided setup (BL-055, ARCH-003.19).
7
+ /** The steps `specpilot serve` asks the questions in, named as init.specpilot.dev names them (BL-PM-004). */
8
+ exports.SETUP_STEPS = ['Project identity', 'Platform & IDE', 'Target users', 'Scale & deploy', 'Architecture & data', 'Constraints & non-goals'];
9
+ /**
10
+ * The chat's friendly line for each question, a short recap label and, for a typed answer, the field's
11
+ * example (REQ-002.H.27). `{language}` is filled by the page with the language choice's text. The CLI's own
12
+ * message is shown under the line, verbatim; none of this reaches the terminal.
13
+ */
14
+ exports.QUESTION_CHAT = {
15
+ projectType: { chat: 'Got it. Is this a new build, or are we adding specs to an existing codebase?', label: 'Type' },
16
+ whatItDoes: { chat: 'Describe it in plain words. As short or as detailed as you like.', label: 'What it does', placeholder: 'A tracker for courier parcels with live status for customers' },
17
+ handle: { chat: "Last thing for this part: your short handle? Optional. It prefixes task IDs, like CD-jsmith-001. Skip and I'll use your OS username.", label: 'Handle', placeholder: 'e.g. jsmith' },
18
+ language: { chat: 'Which language is it in?', label: 'Language' },
19
+ framework: { chat: 'Any framework on top of {language}?', label: 'Framework' },
20
+ ide: { chat: 'Which AI IDE do you use, so I can write its context files?', label: 'AI IDE' },
21
+ targetUsers: { chat: "Who's going to use it? Optional.", label: 'Users', placeholder: 'Couriers and the customers waiting for parcels' },
22
+ expectedScale: { chat: "What's the expected scale? Optional.", label: 'Scale', placeholder: 'About 5,000 parcels a day in one city' },
23
+ apiParadigm: { chat: 'What kind of API does it expose? This decides whether api.yaml is written.', label: 'API' },
24
+ constraints: { chat: 'Any key constraints or requirements? Optional.', label: 'Constraints', placeholder: 'Must work offline on cheap Android phones' },
25
+ };
26
+ /** The questions in the order the chat asks them, each with its step (the page's parent-folder question comes first). */
27
+ exports.CHAT_ORDER = [
28
+ ['projectType', exports.SETUP_STEPS[0]], ['whatItDoes', exports.SETUP_STEPS[0]], ['handle', exports.SETUP_STEPS[0]],
29
+ ['language', exports.SETUP_STEPS[1]], ['framework', exports.SETUP_STEPS[1]], ['ide', exports.SETUP_STEPS[1]],
30
+ ['targetUsers', exports.SETUP_STEPS[2]], ['expectedScale', exports.SETUP_STEPS[3]], ['apiParadigm', exports.SETUP_STEPS[4]], ['constraints', exports.SETUP_STEPS[5]],
31
+ ];
32
+ /** Question key → its step. */
33
+ exports.QUESTION_STEPS = Object.fromEntries(exports.CHAT_ORDER);
7
34
  exports.SUPPORTED_LANGUAGES = ['typescript', 'javascript', 'python', 'kotlin', 'swift'];
8
35
  exports.PROJECT_TYPE_MESSAGE = 'Is this a greenfield or brownfield project?';
9
36
  exports.PROJECT_TYPE_CHOICES = [
@@ -1 +1 @@
1
- {"version":3,"file":"addSpecsQuestions.js","sourceRoot":"","sources":["../../src/utils/addSpecsQuestions.ts"],"names":[],"mappings":";;;AAmDA,0CAqBC;AArED,mGAAmG;AACnG,gGAAgG;AAEnF,QAAA,mBAAmB,GAAG,CAAC,YAAY,EAAE,YAAY,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;AAEhF,QAAA,oBAAoB,GAAG,6CAA6C,CAAC;AACrE,QAAA,oBAAoB,GAAG;IAClC,EAAE,IAAI,EAAE,kEAAkE,EAAE,KAAK,EAAE,YAAY,EAAE;IACjG,EAAE,IAAI,EAAE,qDAAqD,EAAE,KAAK,EAAE,YAAY,EAAE;CACrF,CAAC;AAEW,QAAA,gBAAgB,GAAG,oBAAoB,CAAC;AACxC,QAAA,iBAAiB,GAAG,qBAAqB,CAAC;AAE1C,QAAA,oBAAoB,GAAG,0CAA0C,CAAC;AAClE,QAAA,oBAAoB,GAAG;IAClC,EAAE,IAAI,EAAE,iDAAiD,EAAE,KAAK,EAAE,MAAM,EAAE;IAC1E,EAAE,IAAI,EAAE,iDAAiD,EAAE,KAAK,EAAE,KAAK,EAAE;IACzE,EAAE,IAAI,EAAE,2CAA2C,EAAE,KAAK,EAAE,SAAS,EAAE;IACvE,EAAE,IAAI,EAAE,qDAAqD,EAAE,KAAK,EAAE,MAAM,EAAE;CAC/E,CAAC;AAEK,MAAM,aAA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