specpi 0.22.1 → 0.24.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/CHANGELOG.md +21 -0
- package/NPM_RELEASE.md +4 -2
- package/README.md +27 -100
- package/SECURITY_MODEL.md +13 -7
- package/THIRD_PARTY.md +16 -7
- package/extensions/tool-wishlist/verification.mjs +4 -0
- package/package.json +4 -1
- package/scripts/packages.mjs +40 -0
- package/scripts/specpi.mjs +24 -6
- package/templates/settings.json +3 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.24.0 - 2026-09-16
|
|
4
|
+
|
|
5
|
+
- Replace `pi-subagents@0.67.0` in the default base with first-party `specpi-delegation@0.2.0`, and add `specpi-experiments@0.1.0`. The base is now seven pinned packages; the other five are unchanged.
|
|
6
|
+
- Correct the delegation documentation: the package activates at Pi startup whenever a model is configured, and `/delegate off` turns it off. Earlier drafts of this entry and of the package's own README, security notes and guide described it as opt-in, which the extension, its tool description and its startup test all contradict.
|
|
7
|
+
- Publish SpecPi's own bounded delegation as an independent Pi package. Child sessions get three read-only tools over a source snapshot frozen when the batch starts — no shell, edits, network or nested delegation — under fixed ceilings that local settings may lower and never raise. Delegation activates at Pi startup whenever a model is configured, and `/delegate off` turns it off for the session. The extraction drops the Command Guard admission path, which SpecPi no longer ships, so the reported guard posture is `absent`.
|
|
8
|
+
- Publish the retired `/experiment` command as an independent Pi package. An experiment is a detached Git worktree created at `HEAD`, closed by exporting a patch or discarding it; the base worktree, its index and its uncommitted changes are never touched. `/experiment recover` reconciles records against what Git tracks and never deletes a directory Git still tracks.
|
|
9
|
+
- Both packages carry no production dependencies and were extracted under MIT from SpecPi 0.20.1, immediately before commit `4f5461d`.
|
|
10
|
+
- Add the HarnessTax study (Pan, Yang, Arabzadeh, Chiang, Stoica and Zaharia; UC Berkeley Sky Lab and Arena, 16 September 2026) to the research page, credited and linked, with all 21 model-harness pairs drawn as cost-success figures from the data published with the study.
|
|
11
|
+
- Measure what SpecPi adds to Pi's first model call rather than assuming Pi's economy survives configuration. `scripts/measure-context.mjs` reads the request a real Pi process sends and counts tool definitions, tool-schema characters and instruction characters the way the study defines them. The base sends 23,710 characters against stock Pi's 5,521, about 4.3x, still under half of Codex and about a quarter of Claude Code. The figure omits the four third-party pins, so it is a floor.
|
|
12
|
+
- Gate the two heaviest optional packages behind a saved preference that ships off. Pi sends every active tool's schema on every request of a session, so Browser QA's fourteen tools (about 8.7 KB) and delegation's one (about 4.4 KB) were charged to projects that never used them. `/browser on` and `/delegate on` enable them for a session; `/browser startup on` and `/delegate startup on` save that choice. A default session's first call falls from 23,710 characters to 10,536, from 4.3x stock Pi to 1.9x.
|
|
13
|
+
- Bump `specpi-browser-qa` to 0.2.0 and `specpi-delegation` to 0.2.0 for that change, and move the base pins to match. `specpi-experiments` is unchanged at 0.1.0.
|
|
14
|
+
- Measure Oh My Pi on the same terms and add it to the first-call chart. The fork sends 65,843 characters across 11 tools, about 11.9x stock Pi and six times a default SpecPi, which puts a configured Pi fork between Codex and Claude Code. `scripts/measure-context.mjs --omp=<path to its cli.js>` takes that row; it needs Bun and is skipped without the flag, so Oh My Pi is not a dependency of this repository.
|
|
15
|
+
- Remove Chat's `pi-subagents` frontend: the fleet adapter, its RPC bridge, its result cards and its configuration UI. Chat's existing delegation panel now covers the default base, including per-worker Stop. Package settings cover web access alone.
|
|
16
|
+
|
|
17
|
+
## 0.23.0 - 2026-09-14
|
|
18
|
+
|
|
19
|
+
- Replace the BetterWright default with independently published `specpi-browser-qa@0.1.0`: 14 QA-focused interaction, accessibility, diagnostic, and visual-regression tools, not general-browser feature parity. The other five package pins and Chat 0.8.1 are unchanged.
|
|
20
|
+
- Confirmed install/update runs the installed package's Node bin for Chromium setup and offline readiness checks. `--skip-browser-install` now skips that setup; `--skip-package-install` still skips all acquisition and preserves an existing base. Doctor checks real rendering, pixel comparison, and accessibility without downloads. OS libraries require manual installation; Bun is neither required nor removed.
|
|
21
|
+
- Migrate BetterWright entries using existing package ownership restoration: remove only unchanged SpecPi additions, restore pre-existing entries, and preserve user edits and downloaded tools. No personal browser/profile/cookie or private Pi data migration. Managed configuration rolls back on failure; package and browser-cache bytes may survive failure and uninstall.
|
|
22
|
+
- The Browser QA source was extracted and released independently as 0.1.0 before this integration; its published package is unchanged.
|
|
23
|
+
|
|
3
24
|
## 0.22.1 - 2026-09-14
|
|
4
25
|
|
|
5
26
|
- Remove `pi-lens` from the default base. The other six package pins are unchanged. Normal managed updates remove unchanged Lens entries added by SpecPi; pre-existing or user-modified entries and downloaded files remain. `--skip-package-install` preserves the old base. Restart Pi and Chat connections to unload Lens.
|
package/NPM_RELEASE.md
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
# npm release
|
|
2
2
|
|
|
3
|
+
This guide covers the root `specpi` package. Each package under `packages/` releases independently, with its own release process, tag prefix and publish workflow: [Browser QA](packages/browser-qa/NPM_RELEASE.md) (`browser-qa-v*`), [Delegation](packages/delegation/NPM_RELEASE.md) (`delegation-v*`) and [Experiments](packages/experiments/NPM_RELEASE.md) (`experiments-v*`). Package-only releases do not invoke the root publisher.
|
|
4
|
+
|
|
3
5
|
Publishing, tags, deprecation, ownership changes and GitHub Releases require explicit human approval. Publication is a post-merge operation: never publish from an unmerged commit. npm versions are immutable.
|
|
4
6
|
|
|
5
7
|
## Prepare
|
|
6
8
|
|
|
7
|
-
1. Choose an unused version; update `package.json`, the dated `CHANGELOG.md` entry, README, and the website. Check Chat's version and VSIX download links. Preserve historical changelog entries.
|
|
9
|
+
1. This candidate is SpecPi **0.23.0**, paired with the unchanged Chat **0.8.1** VSIX. Browser QA **0.1.0** is already independently published; do not republish or edit its source as part of this release. Choose an unused version; update `package.json`, the dated `CHANGELOG.md` entry, README, and the website. Check Chat's version and VSIX download links. Preserve historical changelog entries.
|
|
8
10
|
2. Validate:
|
|
9
11
|
|
|
10
12
|
```sh
|
|
@@ -18,7 +20,7 @@ Publishing, tags, deprecation, ownership changes and GitHub Releases require exp
|
|
|
18
20
|
git diff --check
|
|
19
21
|
```
|
|
20
22
|
|
|
21
|
-
Installer/Pi lifecycle tests must use disposable state, never a live profile. `check:base` requires network access and verifies the real six-package base with isolated home/configuration paths. Review all default version changes, upstream lifecycle scripts, compatibility, and notices in `THIRD_PARTY.md`. Local dry runs disable provenance because they lack GitHub OIDC.
|
|
23
|
+
Installer/Pi lifecycle tests must use disposable state, never a live profile. `check:base` requires network access and verifies the real six-package base with isolated home/configuration paths. The base check now invokes the installed Browser QA Node bin for Chromium setup and offline doctor checks; scope `PLAYWRIGHT_BROWSERS_PATH` to a disposable test cache. Verify setup skip, core-only behavior, failure rollback, and BetterWright ownership migration in the installer regressions. Browser-cache/package bytes are outside managed rollback and uninstall. Review all default version changes, upstream lifecycle scripts, compatibility, and notices in `THIRD_PARTY.md`. Local dry runs disable provenance because they lack GitHub OIDC.
|
|
22
24
|
|
|
23
25
|
3. Review the diff, exact package manifest and artifact; obtain fresh read-only review for lifecycle, permissions and packaging changes.
|
|
24
26
|
4. After approval and passing PR checks, merge to `main`, then create the matching `v<version>` tag at the merge commit. Build Chat's VSIX with `npm --prefix vscode run package` and attach it to the GitHub Release. Publish the release to start the npm workflow and approve the protected `npm` environment if it requests review. Verify the website deployment and download links. If publication cannot complete, revert the release merge and use a new version for the next attempt.
|
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
<h1 align="center">SpecPi</h1>
|
|
6
6
|
|
|
7
|
-
<p align="center">Pi
|
|
7
|
+
<p align="center">A Pi harness setup, built to specification.</p>
|
|
8
8
|
|
|
9
9
|
<p align="center">
|
|
10
10
|
<a href="https://www.npmjs.com/package/specpi"><img src="https://img.shields.io/npm/v/specpi?style=flat-square&color=084bdb" alt="npm version"></a>
|
|
@@ -13,127 +13,58 @@
|
|
|
13
13
|
</p>
|
|
14
14
|
|
|
15
15
|
<p align="center">
|
|
16
|
-
<a href="
|
|
16
|
+
<a href="https://tannermidd.github.io/SpecPi/">Website</a> · <a href="https://tannermidd.github.io/SpecPi/wiki/">Documentation</a> · <a href="https://github.com/TannerMidd/SpecPi/releases">Releases</a>
|
|
17
17
|
</p>
|
|
18
18
|
|
|
19
19
|
<p align="center">
|
|
20
20
|
<a href="https://tannermidd.github.io/SpecPi/#vscode-chat">
|
|
21
21
|
<picture>
|
|
22
|
-
<source media="(prefers-color-scheme: dark)" srcset="https://tannermidd.github.io/SpecPi/media/specpi-chat.png">
|
|
23
|
-
<img src="https://tannermidd.github.io/SpecPi/media/specpi-chat-light.png" width="1100" alt="SpecPi Chat
|
|
22
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://tannermidd.github.io/SpecPi/media/specpi-chat-showcase-dark.png">
|
|
23
|
+
<img src="https://tannermidd.github.io/SpecPi/media/specpi-chat-showcase-light.png" width="1100" alt="SpecPi Chat in VS Code: an open file beside the chat panel discussing a focused change.">
|
|
24
24
|
</picture>
|
|
25
25
|
</a>
|
|
26
26
|
</p>
|
|
27
27
|
<p align="center"><sub>SpecPi Chat · Example workspace</sub></p>
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
---
|
|
30
30
|
|
|
31
|
-
|
|
32
|
-
| --------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------- |
|
|
33
|
-
| Declare files and directories with `/scope`. Review drift as the task progresses. | Record recurring problems locally. Choose a change through `/harness-improvement` and verify it. | Chat, attach files, follow subagents, review approvals, and inspect changes in VS Code. |
|
|
31
|
+
SpecPi is a small base for the [Pi coding agent](https://pi.dev/), assembled from deliberate choices about how the agent should work — not a curated marketplace.
|
|
34
32
|
|
|
35
|
-
|
|
33
|
+
Two first-party extensions set the terms: **scope control**, which holds each task to the files it declared, and an **improvement loop**, which turns recurring friction into tested, evidence-backed harness changes instead of accumulated prompts and workarounds. Around them sit seven hand-picked packages, each pinned to an exact version and verified before any transaction completes, and **SpecPi Chat**, a VS Code frontend for working beside the agent.
|
|
36
34
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
Requires Node.js 22.19+, Git, npm, and an existing Pi installation on PATH. The complete base is tested with Pi **0.84.4**; `pi-goal-x` currently declares Pi `>=0.83.0 <0.85.0` compatibility.
|
|
40
|
-
|
|
41
|
-
```sh
|
|
42
|
-
npm install --global specpi@latest
|
|
43
|
-
specpi plan
|
|
44
|
-
specpi install
|
|
45
|
-
specpi doctor
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
Inspect the plan, confirm the install, then restart Pi. SpecPi installs two first-party extensions, the improvement skill, a marked working agreement, and the packages below using `pi install`. Provider and model settings are preserved. There are no additional SpecPi extensions, themes, shell profiles, tool wrappers, or browser bootstrap scripts.
|
|
49
|
-
|
|
50
|
-
<details>
|
|
51
|
-
<summary>Source checkouts, alternate Pi paths, and core-only installs</summary>
|
|
52
|
-
|
|
53
|
-
For this checkout, run `node scripts/specpi.mjs` in place of `specpi`. `PI_CODING_AGENT_DIR` selects an alternate destination; `SPECPI_PI` selects a Pi CLI path. `specpi install --skip-package-install` installs only the first-party core for offline use and testing. A plain `pi install npm:specpi` loads only the packaged first-party resources; use the SpecPi installer above for the complete base, and avoid installing the same first-party resources both ways.
|
|
54
|
-
|
|
55
|
-
</details>
|
|
56
|
-
|
|
57
|
-
## Default packages
|
|
58
|
-
|
|
59
|
-
These are installed on every normal install and update. Exact versions live in [`templates/settings.json`](templates/settings.json); SpecPi merges only the package entries, preserving unrelated configuration and existing resource filters.
|
|
60
|
-
|
|
61
|
-
| Package | Pinned version | Purpose |
|
|
62
|
-
| ----------------------------------------------------------------------------------------------------------------- | -------------- | ------------------------------------------------------ |
|
|
63
|
-
| [pi-web-access](https://github.com/nicobailon/pi-web-access) | 0.29.0 | Web search and page retrieval |
|
|
64
|
-
| [betterwright](https://github.com/BetterWright/betterwright) | 2.8.1 | Browser automation |
|
|
65
|
-
| [pi-subagents](https://github.com/nicobailon/pi-subagents) | 0.67.0 | Subagents and delegation |
|
|
66
|
-
| [pi-goal-x](https://github.com/tmonk/pi-goal-x) | 0.31.2 | Persistent goals and progress |
|
|
67
|
-
| [@sreetej510/pi-usage](https://github.com/Sreetej510/pi-extensions/tree/main/extensions/pi-usage) | 0.10.0 | Provider usage reporting |
|
|
68
|
-
| [@gotgenes/pi-permission-system](https://github.com/gotgenes/pi-packages/tree/main/packages/pi-permission-system) | 32.0.2 | Tool permission policies |
|
|
69
|
-
|
|
70
|
-
The effective commands are `pi install npm:<package>@<version>` for each row, including the scoped names. These packages supply their own extensions, tools, skills, and prompts according to their upstream defaults. SpecPi does not add a second implementation or configure their policies.
|
|
35
|
+
The setup optimizes for four things:
|
|
71
36
|
|
|
72
|
-
|
|
37
|
+
- **Control** — declared scope, tool permissions, and confirmation-gated lifecycle commands
|
|
38
|
+
- **Accuracy** — exact pins, checksum-tracked state, rollback on failure, and evidence over claims
|
|
39
|
+
- **Improvement** — local observations become bounded, verified changes through `/harness-improvement`
|
|
40
|
+
- **Efficiency** — subagent delegation, persistent goals, and browser QA handled by the right tools
|
|
73
41
|
|
|
74
|
-
|
|
42
|
+
Everything it manages is declared, versioned, and reversible.
|
|
75
43
|
|
|
76
|
-
##
|
|
77
|
-
|
|
78
|
-
[SpecPi Chat](https://github.com/TannerMidd/SpecPi/blob/main/vscode/README.md) provides the chat sidebar, file and image attachments, conversation history, tool output, package commands, and approval dialogs. Version **0.8.1** lets you edit global or project permission settings, confirm changes, and keep a backup. The VSIX remains separate from the npm harness package.
|
|
79
|
-
|
|
80
|
-
Download the [0.8.1 VSIX](https://github.com/TannerMidd/SpecPi/releases/download/v0.22.1/specpi-chat-0.8.1.vsix), then run **Extensions: Install from VSIX…** in VS Code. Install/update SpecPi separately, then restart Pi in Chat to reload its extensions.
|
|
81
|
-
|
|
82
|
-
[Download Chat](https://github.com/TannerMidd/SpecPi/releases/download/v0.22.1/specpi-chat-0.8.1.vsix) · [Chat guide](https://github.com/TannerMidd/SpecPi/blob/main/vscode/GUIDE.md) · [Build from source](https://github.com/TannerMidd/SpecPi/blob/main/vscode/DEVELOPMENT.md)
|
|
83
|
-
|
|
84
|
-
## Scope
|
|
85
|
-
|
|
86
|
-
Declare the files and directories a task should touch with `/scope set`, then use `/scope status` to review drift.
|
|
87
|
-
|
|
88
|
-
<details>
|
|
89
|
-
<summary>Scope commands</summary>
|
|
90
|
-
|
|
91
|
-
- `/scope set`: declare project-relative files or directories, one per line.
|
|
92
|
-
- `/scope status`: review declared paths, pending drift, and snapshot uncertainty.
|
|
93
|
-
- `/scope add <path>` or `/scope remove <path>`: change the declared scope.
|
|
94
|
-
- `/scope accept <path>`: acknowledge a finding without adding that path to scope.
|
|
95
|
-
- `/scope recheck`: deliberately refresh the baseline after an uncertain snapshot.
|
|
96
|
-
- `/scope clear`: turn monitoring off.
|
|
97
|
-
- `/scope task`: import the active improvement contract's paths explicitly.
|
|
98
|
-
|
|
99
|
-
</details>
|
|
100
|
-
|
|
101
|
-
Interactive writes and edits outside scope ask before proceeding. In headless mode they are recorded as pending. Other tools are checked afterward against bounded Git snapshots. Scope is a drift monitor, not a sandbox: shell commands and custom tools can already have changed files when drift is reported. State follows the current Pi session branch.
|
|
102
|
-
|
|
103
|
-
## Harness improvement loop
|
|
104
|
-
|
|
105
|
-
<picture>
|
|
106
|
-
<source media="(prefers-color-scheme: dark)" srcset="https://tannermidd.github.io/SpecPi/media/improvement-workflow-dark.svg">
|
|
107
|
-
<img src="https://tannermidd.github.io/SpecPi/media/improvement-workflow.svg" width="1200" alt="Observe a recurring gap, select one change, modify the harness, test it, retire with evidence, and review later outcomes.">
|
|
108
|
-
</picture>
|
|
109
|
-
|
|
110
|
-
1. Enable local observations with `/wishlist on`; collection is off by default. `/wishlist off` stops it.
|
|
111
|
-
2. Review recurring gaps with `/wishlist` and select one through `/harness-improvement` in a complete SpecPi source checkout.
|
|
112
|
-
3. Follow the `specpi-improve` skill: record a bounded contract, implement the smallest sufficient change, and gather direct acceptance evidence.
|
|
113
|
-
4. `finish_harness_improvement` verifies the selected contract, source changes, repository checks, and registered capability validators before retirement.
|
|
114
|
-
5. Review the journal with `/wishlist history <gap-id>`. A regression returns the item for human selection; it never authorizes an automatic fix.
|
|
115
|
-
|
|
116
|
-
Observations are leads, not permission. Records stay local, use sanitized summaries and salted identifiers, and are never uploaded automatically. Pi still sends model requests to your selected provider. `/wishlist outcome <gap-id>` records the human's assessment of a local retirement.
|
|
44
|
+
## Install
|
|
117
45
|
|
|
118
|
-
|
|
46
|
+
Requires Node.js 22.19+, Git, npm, and an existing Pi installation on PATH.
|
|
119
47
|
|
|
120
48
|
```sh
|
|
121
49
|
npm install --global specpi@latest
|
|
122
50
|
specpi plan
|
|
123
|
-
specpi
|
|
51
|
+
specpi install
|
|
124
52
|
specpi doctor
|
|
125
|
-
specpi uninstall
|
|
126
53
|
```
|
|
127
54
|
|
|
128
|
-
|
|
55
|
+
`plan` shows what will change without modifying anything. Restart Pi after install.
|
|
129
56
|
|
|
130
|
-
|
|
57
|
+
Full setup options, package details, and requirements: [website](https://tannermidd.github.io/SpecPi/#install).
|
|
131
58
|
|
|
132
|
-
|
|
59
|
+
## Where things live
|
|
133
60
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
61
|
+
| | |
|
|
62
|
+
| --- | --- |
|
|
63
|
+
| [Packages](https://tannermidd.github.io/SpecPi/#packages) | The seven pinned packages and what each provides |
|
|
64
|
+
| [Scope control](https://tannermidd.github.io/SpecPi/wiki/#scope) | `/scope` commands and drift monitoring |
|
|
65
|
+
| [Improvement loop](https://tannermidd.github.io/SpecPi/#loop) | Local wishlist, `/harness-improvement`, and retirement with evidence |
|
|
66
|
+
| [SpecPi Chat](https://tannermidd.github.io/SpecPi/#vscode-chat) | VS Code frontend and VSIX install · [Chat guide](https://github.com/TannerMidd/SpecPi/blob/main/vscode/README.md) |
|
|
67
|
+
| [Updating](https://tannermidd.github.io/SpecPi/#updating) | Update, uninstall, and migration notes |
|
|
137
68
|
|
|
138
69
|
## Development
|
|
139
70
|
|
|
@@ -141,12 +72,8 @@ Uninstall restores package entries that still match SpecPi's recorded changes an
|
|
|
141
72
|
npm install --ignore-scripts --omit=peer --no-package-lock
|
|
142
73
|
node --test tests/workflow-controls.test.mjs tests/workflow-controls-extension.test.mjs
|
|
143
74
|
npm run check
|
|
144
|
-
npm run check:pi-package
|
|
145
|
-
npm run check:base
|
|
146
75
|
```
|
|
147
76
|
|
|
148
|
-
Installer tests use disposable Pi directories
|
|
149
|
-
|
|
150
|
-
The website is static HTML and CSS in `site/`. After installing the pinned Playwright browser with `npx --no-install playwright install chromium`, run `npm run check:site` to check versions, links, and desktop, tablet, and mobile layouts. GitHub Pages deploys it from `main` after those checks pass.
|
|
77
|
+
Installer tests use disposable Pi directories — never test against a live Pi installation. Publication follows the [release procedure](NPM_RELEASE.md).
|
|
151
78
|
|
|
152
79
|
[Security model](SECURITY_MODEL.md) · [Third-party components](THIRD_PARTY.md) · [Release notes](CHANGELOG.md) · [MIT License](LICENSE)
|
package/SECURITY_MODEL.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Security model
|
|
2
2
|
|
|
3
|
-
SpecPi provides scope monitoring and an explicit harness improvement loop, and installs six
|
|
3
|
+
SpecPi provides scope monitoring and an explicit harness improvement loop, and installs six pinned packages as its default base. Extensions run as trusted code with Pi's permissions. Scope is not an OS sandbox or a general command guard. Use OS isolation for hostile code.
|
|
4
4
|
|
|
5
5
|
## Scope monitoring
|
|
6
6
|
|
|
@@ -20,22 +20,28 @@ Wishlist records remain local under `<agent-dir>/specpi/`. Sanitization and salt
|
|
|
20
20
|
|
|
21
21
|
Package acquisition requests exact npm dependency saves through the child process environment and verifies the installed top-level versions before completing the transaction. A mismatch fails the operation and triggers managed-state rollback. Upstream transitive dependency ranges remain outside this pinning guarantee.
|
|
22
22
|
|
|
23
|
-
`plan` is read-only. Installation, updates, and removal require confirmation or `--yes`. SpecPi manages its two first-party extension families, improvement skill, manifest, AGENTS marker block, and the six package entries listed in `templates/settings.json`. Normal install/update runs `pi install npm:<name>@<pin>` for every default package. Only package entries are merged; existing resource filters and unrelated settings are retained. `--skip-package-install` allows a core-only install or preserves an already configured base during update. No new shell profile integration is installed.
|
|
23
|
+
`plan` is read-only. Installation, updates, and removal require confirmation or `--yes`. SpecPi manages its two first-party extension families, improvement skill, manifest, AGENTS marker block, and the six package entries listed in `templates/settings.json`. Normal install/update runs `pi install npm:<name>@<pin>` for every default package. Only package entries are merged; existing resource filters and unrelated settings are retained. `--skip-package-install` allows a core-only install or preserves an already configured base during update, skipping Chromium setup too. Confirmed install/update otherwise invokes the installed Browser QA Node bin with bounded subprocesses to download Chromium and check readiness. `--skip-browser-install` skips that setup only; doctor still checks readiness. SpecPi never passes `--with-deps`, auto-installs OS libraries, or installs/removes Bun. No new shell profile integration is installed.
|
|
24
24
|
|
|
25
|
-
Managed configuration and files are locked and backed up before mutation; first-party writes are atomic and checksum-tracked. Failure restores the saved configuration and first-party files. Package acquisition runs upstream package-manager scripts and may leave downloads, dependency changes, or external script effects even after configuration rollback. Those effects are outside SpecPi's transaction. Updates require `--force` before replacing modified retained resources. Retired resources are backed up before deactivation; pre-install files are restored where ownership records identify them. Old runtime directories are moved into backups without inspecting their contents. Backups and private evidence remain after uninstall and can contain sensitive local material.
|
|
25
|
+
Managed configuration and files are locked and backed up before mutation; first-party writes are atomic and checksum-tracked. Failure restores the saved configuration and first-party files. Package acquisition runs upstream package-manager scripts and may leave downloads, dependency changes, or external script effects even after configuration rollback. Those effects, including downloaded browser-cache bytes, are outside SpecPi's transaction and survive uninstall. Updates require `--force` before replacing modified retained resources. Retired resources are backed up before deactivation; pre-install files are restored where ownership records identify them. Old runtime directories are moved into backups without inspecting their contents. Backups and private evidence remain after uninstall and can contain sensitive local material.
|
|
26
26
|
|
|
27
27
|
Legacy migration restores only recorded settings ownership, preserves differing user values, and removes only the SpecPi shell marker block before applying the new base. The installer does not enumerate or modify authentication, provider credential stores, trust, sessions, missions, history, or unrelated private evidence. Normal updates deliberately reapply the default package pins, retaining the original entry for removal. Uninstall restores only package entries that still match the last installed value; user edits are preserved. Downloaded packages and tools are not deleted. Resources that SpecPi never owned require separate human management.
|
|
28
28
|
|
|
29
|
+
## Browser QA package
|
|
30
|
+
|
|
31
|
+
`packages/browser-qa` is an independently released Node-native Pi package extracted from the retired browser tools. The installer acquires the immutable `specpi-browser-qa@0.2.0` release through Pi; its source and dependencies are not bundled in SpecPi's npm artifact. Its fourteen tools ship withdrawn: until a human runs `/browser on`, or saves `/browser startup on`, Pi is offered no browser tool and the model cannot launch a browser at all. Delegation ships off on the same basis, so neither package's tools reach a default session. Its explicit setup downloads Playwright Chromium, and its doctor performs offline rendering, image-comparison and accessibility smoke checks. It uses package-local dependency resolution and the standard Playwright browser cache rather than SpecPi's retired managed runtime. No Pi settings, credentials or personal profiles are migrated. The ephemeral context is not OS/network isolation; pages can reach localhost and private networks. See the package's [security documentation](packages/browser-qa/SECURITY.md) for artifact retention, best-effort redaction, permission and cleanup limits. This is QA tooling, not general-browser feature parity. BetterWright remains optional/manual. Normal updates restore recorded pre-existing entries and remove only unchanged SpecPi-added BetterWright entries; modified entries, personal browsers, profiles, cookies, and user-owned tools are not migrated or deleted.
|
|
32
|
+
|
|
29
33
|
## VS Code frontend
|
|
30
34
|
|
|
31
|
-
SpecPi Chat is a separate VSIX, retained alongside the npm harness. It launches Pi only in a trusted filesystem workspace and communicates over local RPC. Provider credentials stay with Pi. The frontend manages only its own workspace-storage conversation catalog and sessions for user-directed history, branching, and export; it does not import unrelated Pi histories. Attachments, images, webview messages, and file navigation are validated and bounded. Rendered model and tool output is untrusted text, never executable HTML.
|
|
35
|
+
SpecPi Chat is a separate VSIX, retained alongside the npm harness. It launches Pi only in a trusted filesystem workspace and communicates over local RPC. Provider credentials stay with Pi. Sign-in is delegated rather than implemented: Chat can start the configured Pi executable in a user-visible VS Code terminal, without RPC flags or a session, and Pi alone prompts, runs any OAuth flow, and writes `auth.json`. Chat sends no input to that terminal, reads no credential store, runs no Pi auth subcommand, and accepts no credential over RPC; it observes only the terminal's closure, and restarts the connection so Pi re-resolves its catalogue. Its sign-in prompt is derived from Pi's own available-model list and missing-credential error text. The frontend manages only its own workspace-storage conversation catalog and sessions for user-directed history, branching, and export; it does not import unrelated Pi histories. Attachments, images, webview messages, and file navigation are validated and bounded. Rendered model and tool output is untrusted text, never executable HTML.
|
|
36
|
+
|
|
37
|
+
Approval replies are tied to the current conversation, client, and request ID. Disconnect, cancellation, and expiry never grant permission. Multiline package approval context is shown in the dialog body; requests exceeding the display budget are cancelled rather than approved against incomplete context. The Permissions editor can change only the package's documented global/project `config.json`, with bounded UTF-8/schema validation, explicit native confirmation, connection/scope binding, stale-revision checks, private backups, and atomic replacement. It reads no permission logs, trust decisions, credentials, or agent frontmatter. Symlinks, hardlinks, and special files are refused. Backups remain local and may contain sensitive policy; another same-user process can still race filesystem operations. Saving does not claim runtime activation: the user can restart the selected chat and inspect `/permission-system show`. Global/project changes may affect other chats as upstream reloads them; session approvals are cleared by restart. Delegated agent activity comes from a read-only, connection-local widget the delegation package publishes; Chat registers no tools or commands of its own for it. The VSIX does not install packages or duplicate their enforcement; only Permission System configuration has an explicit editing UI. TUI-only custom components are outside Pi's RPC rendering support.
|
|
32
38
|
|
|
33
|
-
|
|
39
|
+
The optional **Destructive guard** preset replaces the complete global configuration draft; it never merges with the old global rules or options. The user can preview/edit the replacement or undo it without a write. Saving uses the same native confirmation, bound global destination, backup, and atomic replacement as ordinary settings edits. The preset asks by default, adds explicit destructive-command denials, disables YOLO and logging, and clears the authorizer chain. It performs no project-policy or agent-definition inspection and no additional directory enumeration. This is a configuration template, not independent enforcement or a claim that global settings override every runtime scope. Project/per-agent policies and session approvals remain upstream-controlled, including 32.0.2's ordered-map merging behavior. Case-sensitive patterns can block benign uses and miss scripts, alternative executable spellings, or unconfigured shell tools. Restart after saving and inspect effective policy; the template is not a sandbox.
|
|
34
40
|
|
|
35
41
|
## Upstream package boundary
|
|
36
42
|
|
|
37
|
-
The
|
|
43
|
+
The seven packages add their own extensions, tools, prompts, skills, network connections, filesystem operations, and subprocesses under their upstream defaults. They are not confined by the improvement loop's selection requirement. Permission System owns tool policies; SpecPi does not inject a duplicate guard or claim its coverage. Delegation starts real Pi child sessions in the same process tree, restricted to a frozen source snapshot and three read-only tools; experiments run the user's own `git` and create worktrees on disk. Neither is an OS sandbox. See [delegation](packages/delegation/SECURITY.md) and [experiments](packages/experiments/SECURITY.md). `pi-lens` and `pi-background-tasks` (including its Anthropic provider wrapper) are no longer part of the default base. Normal updates remove only unchanged entries originally added by SpecPi; pre-existing or modified entries and downloaded bytes remain. `--skip-package-install` preserves the old base. Restart Pi and Chat connections to unload retired extensions. Independently retained installations remain trusted upstream code; retained Pi Lens can still apply configured formatting/autofixes. Web access and usage reporting can contact services and use credentials through their upstream implementations. SpecPi's local-only wishlist collection policy does not describe all activity of those packages.
|
|
38
44
|
|
|
39
|
-
Top-level versions are pinned; upstream transitive dependency ranges are not frozen by SpecPi. `doctor` reads configured pins and installed package metadata
|
|
45
|
+
Top-level versions are pinned; upstream transitive dependency ranges are not frozen by SpecPi. `doctor` reads configured pins and installed package metadata, then invokes the installed Browser QA bin for real offline rendering, pixel-comparison, and accessibility checks when the managed base includes it. Doctor never downloads a browser, and missing Chromium or OS libraries fail with recovery guidance. It does not validate provider access or browser readiness for independently retained BetterWright. Core-only installations do not run browser checks. `check:base` acquires the packages, checks combined resource loading and Chat RPC startup, and exercises upstream approval, denial, and cancellation with synthetic context. It uses temporary home/configuration directories and sends no model prompt. The base check also exercises Node-only Chromium setup and offline Browser QA readiness; authenticated services, OS isolation, and every upstream tool's behavior remain outside that check. See [THIRD_PARTY.md](THIRD_PARTY.md) for sources and compatibility limits.
|
|
40
46
|
|
|
41
47
|
Manifests, source checkouts, Pi, dependencies, and the operating system are trusted inputs. Validation rejects unexpected managed resource paths and symlinked managed paths; it does not claim protection against another process changing files during an operation. Repository and release checks use isolated temporary Pi directories.
|
package/THIRD_PARTY.md
CHANGED
|
@@ -9,29 +9,38 @@ Development fixtures pin Pi packages to **0.84.4** and TypeBox to **1.3.7**. Hos
|
|
|
9
9
|
|
|
10
10
|
Development formatting uses Prettier **3.9.6** (MIT), ESLint **10.9.1** (MIT), `@stylistic/eslint-plugin` **5.10.0** (MIT), `@typescript-eslint/parser` **8.68.0** (BSD-2-Clause), and TypeScript **6.0.3** (Apache-2.0). Exact versions are recorded in `package.json`; installed packages retain upstream notices. Git and Node.js are external prerequisites.
|
|
11
11
|
|
|
12
|
-
## Default
|
|
12
|
+
## Default packages
|
|
13
13
|
|
|
14
|
-
Reviewed on 2026-09-
|
|
14
|
+
Reviewed on 2026-09-16 against published npm metadata and integrity-verified source archives. All seven top-level packages declare the MIT license. Pins are authoritative in `templates/settings.json`.
|
|
15
15
|
|
|
16
16
|
SpecPi requests exact npm dependency saves for these pins and checks installed top-level versions before completing installation. The override applies to package acquisition without changing the user's global npm configuration.
|
|
17
17
|
|
|
18
18
|
| Package | Version | Upstream |
|
|
19
19
|
| ------------------------------ | ------- | ------------------------------------------------------------------------- |
|
|
20
20
|
| pi-web-access | 0.29.0 | [nicobailon/pi-web-access](https://github.com/nicobailon/pi-web-access) |
|
|
21
|
-
|
|
|
22
|
-
|
|
|
21
|
+
| specpi-browser-qa | 0.2.0 | [TannerMidd/SpecPi](https://github.com/TannerMidd/SpecPi/tree/browser-qa-v0.1.0/packages/browser-qa) |
|
|
22
|
+
| specpi-delegation | 0.2.0 | [TannerMidd/SpecPi](https://github.com/TannerMidd/SpecPi/tree/main/packages/delegation) |
|
|
23
|
+
| specpi-experiments | 0.1.0 | [TannerMidd/SpecPi](https://github.com/TannerMidd/SpecPi/tree/main/packages/experiments) |
|
|
23
24
|
| pi-goal-x | 0.31.2 | [tmonk/pi-goal-x](https://github.com/tmonk/pi-goal-x) |
|
|
24
25
|
| @sreetej510/pi-usage | 0.10.0 | [Sreetej510/pi-extensions](https://github.com/Sreetej510/pi-extensions) |
|
|
25
26
|
| @gotgenes/pi-permission-system | 32.0.2 | [gotgenes/pi-packages](https://github.com/gotgenes/pi-packages) |
|
|
26
27
|
|
|
27
|
-
Transitive dependencies and their notices remain in Pi's npm installation tree. Top-level pins do not freeze upstream dependency ranges or constitute a full transitive security audit. Pi invokes npm with its upstream package-management semantics, including dependency lifecycle scripts.
|
|
28
|
+
Transitive dependencies and their notices remain in Pi's npm installation tree. Top-level pins do not freeze upstream dependency ranges or constitute a full transitive security audit. Pi invokes npm with its upstream package-management semantics, including dependency lifecycle scripts. Browser QA has no install hook: confirmed SpecPi install/update explicitly invokes its installed Node setup bin, unless acquisition or browser setup is skipped. It downloads package-pinned Chromium without installing OS libraries. BetterWright is optional/manual and retains its own Bun-based setup; SpecPi neither removes Bun nor deletes user-owned tools. Usage reporting and web packages make their own provider/service connections. Consult upstream licenses and security policies before redistributing their components.
|
|
28
29
|
|
|
29
30
|
Pi Lens is no longer a default package. Normal updates retire only unchanged entries added by SpecPi; independent or modified entries and downloaded bytes remain, with their upstream notices. Restart Pi to unload Lens.
|
|
30
31
|
|
|
31
|
-
The combined base is tested with Pi 0.84.4. Pi Goal X declares Pi `>=0.83.0 <0.85.0`; compatibility with newer hosts is not assumed. SpecPi's former custom browser, structural-search,
|
|
32
|
+
The combined base is tested with Pi 0.84.4. Pi Goal X declares Pi `>=0.83.0 <0.85.0`; compatibility with newer hosts is not assumed. SpecPi's former custom browser, structural-search, background-task, and command-guard implementations, DonSeTch, and Pi themes have been removed. Its delegation and experiment implementations were not discarded: they now ship as the independent `specpi-delegation` and `specpi-experiments` packages described below. Removal restores owned package settings but does not delete downloaded upstream packages or tools. Retired private runtimes remain in local backups with their notices.
|
|
33
|
+
|
|
34
|
+
## Standalone delegation and experiments
|
|
35
|
+
|
|
36
|
+
`packages/delegation` and `packages/experiments` are first-party packages extracted from SpecPi's own retired harness code under MIT. Neither bundles third-party runtime code or declares a production dependency; every runtime import is a Node builtin or a Pi-supplied optional peer. Experiments invokes the user's own `git` as an external program through Pi's `exec` seam; Git is not bundled, vendored or version-pinned. Delegation's extraction drops the Command Guard admission path, which SpecPi no longer ships, and reports its guard posture as `absent`. See their dependency notices and security boundaries: [delegation](packages/delegation/THIRD_PARTY.md) / [boundary](packages/delegation/SECURITY.md), [experiments](packages/experiments/THIRD_PARTY.md) / [boundary](packages/experiments/SECURITY.md).
|
|
37
|
+
|
|
38
|
+
## Standalone browser QA
|
|
39
|
+
|
|
40
|
+
The separately released `packages/browser-qa` source reuses the retired QA implementation with Playwright 1.62.1, axe-core and its Playwright adapter 4.13.0, pixelmatch 7.2.0, and pngjs 7.0.0. These are that package's exact runtime dependencies, acquired separately by Pi for the default base, not bundled in SpecPi's npm artifact. See its [dependency notices](packages/browser-qa/THIRD_PARTY.md) and [security boundary](packages/browser-qa/SECURITY.md). Setup uses Node and explicitly downloads Chromium; no Bun or install hook is used. The 0.1.0 registry tarball was integrity-verified against `sha512-lilvlRgSbvNxnueO+CxCvlGI6wqrdtshCLmNkaBAa+P8+6c/aQvB27fP5n3KIFylABchKe7x6vzf3tHleNSikg==`; source tag: `browser-qa-v0.1.0`. Published package bytes are unchanged by this integration. Browser-cache bytes and downloaded packages survive managed rollback and uninstall.
|
|
32
41
|
|
|
33
42
|
## Website and README
|
|
34
43
|
|
|
35
44
|
The website uses the bundled IBM Plex Sans and Plex Mono fonts under the SIL Open Font License 1.1; see [`site/fonts/LICENSE.txt`](https://github.com/TannerMidd/SpecPi/blob/main/site/fonts/LICENSE.txt). The website's scripts and diagrams are first-party code and assets. The README loads public package/license badges from Shields.io and build status from GitHub. Website fonts and media are not included in the npm package.
|
|
36
45
|
|
|
37
|
-
SpecPi Chat 0.8.
|
|
46
|
+
SpecPi Chat 0.8.3 is a separately packaged VS Code extension with no bundled runtime dependencies. It uses VS Code's host APIs and Pi's RPC protocol. Generic tool output, visible custom messages, widgets, and dialogs stay owned by their upstream packages. Playwright **1.62.1** (Apache-2.0, [Microsoft Playwright](https://github.com/microsoft/playwright)) is a pinned development dependency for Chat's rendering tests; its browser is used for those checks and is not shipped in either artifact. The default Browser QA package independently uses the same pinned Playwright version for its runtime. Chat's global Destructive guard preset is a full replacement configuration reviewed against Permission System 32.0.2's schema and native pattern semantics. No upstream patch, new dependency, policy-layer merger, or independent command evaluator is included. See [the security model](SECURITY_MODEL.md) for its limits.
|
|
@@ -48,6 +48,10 @@ export const SOURCE_ROOT_FILES = Object.freeze([
|
|
|
48
48
|
const EXCLUDED_DIRECTORY_NAMES = new Set([
|
|
49
49
|
".git",
|
|
50
50
|
".next",
|
|
51
|
+
// Test and packaging scratch output. It lands at the repository root, and
|
|
52
|
+
// also under vscode/ whenever a check runs with that as its cwd, so it does
|
|
53
|
+
// fall inside the scanned SOURCE_DIRECTORIES.
|
|
54
|
+
".specpi-test",
|
|
51
55
|
"build",
|
|
52
56
|
"coverage",
|
|
53
57
|
"desktop",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "specpi",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.24.0",
|
|
4
4
|
"description": "Scope control and a human-selected harness improvement loop for Pi",
|
|
5
5
|
"author": "Tanner Middleton",
|
|
6
6
|
"repository": {
|
|
@@ -83,6 +83,9 @@
|
|
|
83
83
|
"check:pi-package": "node scripts/check-pi-package.mjs",
|
|
84
84
|
"check:base": "node scripts/check-base-packages.mjs",
|
|
85
85
|
"check:site": "node scripts/check-site.mjs",
|
|
86
|
+
"check:browser-qa": "npm --prefix packages/browser-qa run check",
|
|
87
|
+
"check:delegation": "npm --prefix packages/delegation run check",
|
|
88
|
+
"check:experiments": "npm --prefix packages/experiments run check",
|
|
86
89
|
"check:vscode": "npm --prefix vscode run check",
|
|
87
90
|
"prepublishOnly": "npm run check",
|
|
88
91
|
"check": "npm run format:check && npm run check:syntax && npm test && npm run check:package && npm run check:vscode"
|
package/scripts/packages.mjs
CHANGED
|
@@ -8,6 +8,46 @@ export const basePackages = JSON.parse(
|
|
|
8
8
|
fs.readFileSync(new URL("../templates/settings.json", import.meta.url), "utf8"),
|
|
9
9
|
).packages;
|
|
10
10
|
|
|
11
|
+
// Invoke only the installed, pinned package's Node bin; never npx, Bun, or OS dependency setup.
|
|
12
|
+
export function runBrowserQA(agentDir, command) {
|
|
13
|
+
if (!["setup", "doctor"].includes(command)) {
|
|
14
|
+
throw new Error(`Unsupported Browser QA command: ${command}`);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
const root = path.join(agentDir, "npm", "node_modules", "specpi-browser-qa");
|
|
18
|
+
try {
|
|
19
|
+
const installed = JSON.parse(fs.readFileSync(path.join(root, "package.json"), "utf8"));
|
|
20
|
+
if (
|
|
21
|
+
installed.name !== "specpi-browser-qa" ||
|
|
22
|
+
installed.version !== "0.2.0" ||
|
|
23
|
+
installed.bin?.["specpi-browser-qa"] !== "./bin/browser-qa.mjs"
|
|
24
|
+
) {
|
|
25
|
+
throw new Error("Missing or changed pinned Browser QA bin metadata");
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const bin = path.join(root, "bin", "browser-qa.mjs");
|
|
29
|
+
const relative = path.relative(fs.realpathSync(root), fs.realpathSync(bin));
|
|
30
|
+
if (path.isAbsolute(relative) || relative === ".." || relative.startsWith(`..${path.sep}`)) {
|
|
31
|
+
throw new Error("Browser QA bin escapes its package directory");
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
const result = spawnSync(process.execPath, [bin, command], {
|
|
35
|
+
cwd: agentDir,
|
|
36
|
+
env: { ...process.env, PI_CODING_AGENT_DIR: agentDir },
|
|
37
|
+
stdio: "inherit",
|
|
38
|
+
windowsHide: true,
|
|
39
|
+
timeout: command === "setup" ? 690_000 : 75_000,
|
|
40
|
+
});
|
|
41
|
+
if (result.error || result.status !== 0) {
|
|
42
|
+
throw new Error(result.error?.message || `exit ${result.signal ?? result.status}`);
|
|
43
|
+
}
|
|
44
|
+
} catch (error) {
|
|
45
|
+
throw new Error(
|
|
46
|
+
`Browser QA ${command} failed: ${error.message}. Retry specpi install (or specpi update if already installed) for Chromium setup; install missing OS libraries manually. Doctor never downloads browsers.`,
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
11
51
|
export function packageChanges(before, after) {
|
|
12
52
|
return basePackages.map((source) => {
|
|
13
53
|
const identity = packageIdentity(source);
|
package/scripts/specpi.mjs
CHANGED
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
import { validateCapabilityRegistry } from "../extensions/tool-wishlist/registry.mjs";
|
|
23
23
|
import { runValidator } from "../extensions/tool-wishlist/validators.mjs";
|
|
24
24
|
import { acquireSpecPiLock } from "./lock.mjs";
|
|
25
|
-
import { basePackages, checkBasePackages, installBasePackages, packageChanges } from "./packages.mjs";
|
|
25
|
+
import { basePackages, checkBasePackages, installBasePackages, packageChanges, runBrowserQA } from "./packages.mjs";
|
|
26
26
|
|
|
27
27
|
const repoRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..");
|
|
28
28
|
const VERSION = JSON.parse(fs.readFileSync(path.join(repoRoot, "package.json"), "utf8")).version;
|
|
@@ -56,9 +56,10 @@ Usage:
|
|
|
56
56
|
specpi doctor
|
|
57
57
|
specpi uninstall [--yes]
|
|
58
58
|
|
|
59
|
-
Installs /scope, the harness improvement loop, and six pinned
|
|
59
|
+
Installs /scope, the harness improvement loop, and six pinned packages.
|
|
60
60
|
The base is tested with Pi 0.84.4. Run specpi plan to see package versions.
|
|
61
61
|
--skip-package-install installs only the core, or preserves an existing base on update.
|
|
62
|
+
--skip-browser-install skips Chromium setup, not package acquisition or doctor checks.
|
|
62
63
|
--force replaces modified retained resources after backing them up.
|
|
63
64
|
SPECPI_PI selects a Pi CLI path instead of pi on PATH.
|
|
64
65
|
PI_CODING_AGENT_DIR overrides the default ~/.pi/agent destination.`);
|
|
@@ -66,7 +67,7 @@ PI_CODING_AGENT_DIR overrides the default ~/.pi/agent destination.`);
|
|
|
66
67
|
|
|
67
68
|
function parseArgs(argv) {
|
|
68
69
|
const command = argv[0] || "help";
|
|
69
|
-
// Obsolete
|
|
70
|
+
// Obsolete tool/shell flags remain accepted for older automation.
|
|
70
71
|
const known = new Set([
|
|
71
72
|
"--yes",
|
|
72
73
|
"--force",
|
|
@@ -86,6 +87,7 @@ function parseArgs(argv) {
|
|
|
86
87
|
yes: argv.includes("--yes"),
|
|
87
88
|
force: argv.includes("--force"),
|
|
88
89
|
skipPackages: argv.includes("--skip-package-install"),
|
|
90
|
+
skipBrowser: argv.includes("--skip-browser-install"),
|
|
89
91
|
};
|
|
90
92
|
}
|
|
91
93
|
|
|
@@ -195,7 +197,12 @@ function printPlan(options = {}) {
|
|
|
195
197
|
}
|
|
196
198
|
|
|
197
199
|
console.log(
|
|
198
|
-
|
|
200
|
+
options.skipPackages || options.skipBrowser
|
|
201
|
+
? "Chromium setup skipped; doctor still checks Browser QA when included in the managed base."
|
|
202
|
+
: "After package acquisition, run the installed Browser QA Node bin to download Chromium and verify offline rendering, pixel comparison, and accessibility. No Bun or OS library installation.",
|
|
203
|
+
);
|
|
204
|
+
console.log(
|
|
205
|
+
"Only package settings are merged. No theme or shell integration. Wishlist collection starts off. Backups precede mutation; downloaded packages, browser-cache bytes and upstream script effects cannot be rolled back or removed by uninstall.",
|
|
199
206
|
);
|
|
200
207
|
}
|
|
201
208
|
|
|
@@ -319,6 +326,10 @@ async function mutate(options, operation) {
|
|
|
319
326
|
throw new Error(packageErrors.join("\n"));
|
|
320
327
|
}
|
|
321
328
|
|
|
329
|
+
if (!options.skipBrowser) {
|
|
330
|
+
runBrowserQA(agentDir, "setup");
|
|
331
|
+
}
|
|
332
|
+
|
|
322
333
|
packageState = {
|
|
323
334
|
basePackages,
|
|
324
335
|
packagesKeyBeforeExists: Object.hasOwn(before, "packages"),
|
|
@@ -416,7 +427,7 @@ async function mutate(options, operation) {
|
|
|
416
427
|
}
|
|
417
428
|
|
|
418
429
|
console.log(
|
|
419
|
-
"Local wishlist and other private evidence were preserved. Restart Pi to unload retired resources.",
|
|
430
|
+
"Local wishlist and other private evidence were preserved. Downloaded packages and browser-cache bytes remain after uninstall. Restart Pi to unload retired resources.",
|
|
420
431
|
);
|
|
421
432
|
} catch (error) {
|
|
422
433
|
const failures = [];
|
|
@@ -437,7 +448,7 @@ async function mutate(options, operation) {
|
|
|
437
448
|
}
|
|
438
449
|
|
|
439
450
|
throw new Error(
|
|
440
|
-
`${transaction ? "SpecPi-managed changes rolled back: " : ""}${error.message}${acquisitionStarted ? "; downloaded packages and upstream install-script effects may remain" : ""}${failures.length ? `; rollback errors: ${failures.join("; ")}` : ""}`,
|
|
451
|
+
`${transaction ? "SpecPi-managed changes rolled back: " : ""}${error.message}${acquisitionStarted ? "; downloaded packages, browser-cache bytes and upstream install-script effects may remain" : ""}${failures.length ? `; rollback errors: ${failures.join("; ")}` : ""}`,
|
|
441
452
|
);
|
|
442
453
|
} finally {
|
|
443
454
|
releaseLock();
|
|
@@ -458,6 +469,13 @@ async function doctor() {
|
|
|
458
469
|
const errors = [];
|
|
459
470
|
if (manifest.basePackages?.length) {
|
|
460
471
|
errors.push(...checkBasePackages(agentDir, readJson(settingsPath, {})));
|
|
472
|
+
if (manifest.basePackages.includes("npm:specpi-browser-qa@0.2.0")) {
|
|
473
|
+
try {
|
|
474
|
+
runBrowserQA(agentDir, "doctor");
|
|
475
|
+
} catch (error) {
|
|
476
|
+
errors.push(error.message);
|
|
477
|
+
}
|
|
478
|
+
}
|
|
461
479
|
} else {
|
|
462
480
|
console.log("Core-only installation: default package installation was skipped.");
|
|
463
481
|
}
|
package/templates/settings.json
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"packages": [
|
|
3
3
|
"npm:pi-web-access@0.29.0",
|
|
4
|
-
"npm:
|
|
5
|
-
"npm:
|
|
4
|
+
"npm:specpi-browser-qa@0.2.0",
|
|
5
|
+
"npm:specpi-delegation@0.2.0",
|
|
6
|
+
"npm:specpi-experiments@0.1.0",
|
|
6
7
|
"npm:pi-goal-x@0.31.2",
|
|
7
8
|
"npm:@sreetej510/pi-usage@0.10.0",
|
|
8
9
|
"npm:@gotgenes/pi-permission-system@32.0.2"
|