@threadbase-sh/scanner 0.24.7 → 0.24.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.
- package/README.md +25 -0
- package/dist/cli.js +1 -1
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -377,6 +377,31 @@ npm run build # build ESM + CJS + types
|
|
|
377
377
|
npm run lint # type check
|
|
378
378
|
```
|
|
379
379
|
|
|
380
|
+
### Capturing live Copilot events
|
|
381
|
+
|
|
382
|
+
The Copilot parser was written against a hand-sanitized fixture.
|
|
383
|
+
`scripts/capture-copilot-events.mjs` turns a real session into a safe fixture and reports the shapes the parser still has to confirm.
|
|
384
|
+
|
|
385
|
+
1. Start one Copilot CLI session and, in it, do all of these:
|
|
386
|
+
- answer an `ask_user` question;
|
|
387
|
+
- approve a shell command;
|
|
388
|
+
- deny a shell command and type feedback;
|
|
389
|
+
- cancel a prompt with Esc, if the CLI allows it.
|
|
390
|
+
2. Run the script on that session's `events.jsonl` (under the Copilot home's `session-state/<session id>/`; a session directory works too).
|
|
391
|
+
The script never scans for sessions itself, makes no network call, and writes only under `__fixtures__/copilot/live/`.
|
|
392
|
+
```bash
|
|
393
|
+
node scripts/capture-copilot-events.mjs <path to events.jsonl> --out __fixtures__/copilot/live/<name>.jsonl
|
|
394
|
+
```
|
|
395
|
+
3. Read the `REVIEW BEFORE COMMIT` notice it prints, then skim the output file.
|
|
396
|
+
Ids, home paths, usernames, hostnames, emails and token-shaped strings are redacted; free text you typed is kept as is.
|
|
397
|
+
4. Print the shape report:
|
|
398
|
+
```bash
|
|
399
|
+
node scripts/capture-copilot-events.mjs __fixtures__/copilot/live/<name>.jsonl --report
|
|
400
|
+
```
|
|
401
|
+
5. Paste the report output, not the raw file, back to the maintainer.
|
|
402
|
+
|
|
403
|
+
`npm test` runs every `*.jsonl` in that directory through the real parser (`__tests__/copilot-live-fixtures.test.ts`) and is skipped while there are none.
|
|
404
|
+
|
|
380
405
|
## Contributing
|
|
381
406
|
|
|
382
407
|
Small bugfixes and parser improvements are welcome. For design changes, please open an issue first to discuss the shape before opening a PR.
|