@howarewoo/pi-subagents 0.0.0-stage → 0.2.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 +63 -0
- package/LICENSE +21 -0
- package/README.md +499 -2
- package/THIRD_PARTY_NOTICES.md +25 -0
- package/docs/advanced-policies.md +78 -0
- package/docs/delegation-contract.md +297 -0
- package/docs/images/subagent-hub.svg +1 -0
- package/docs/images/subagent-profiles.svg +1 -0
- package/docs/images/subagent-widget.svg +1 -0
- package/docs/parity-inventory.md +330 -0
- package/docs/provenance.md +13 -0
- package/docs/releases.md +236 -0
- package/docs/verification.md +430 -0
- package/package.json +64 -4
- package/src/capabilities.ts +39 -0
- package/src/child-execution.ts +459 -0
- package/src/coordinator.ts +1376 -0
- package/src/delegation-types.ts +111 -0
- package/src/hub.ts +612 -0
- package/src/model-adapter.ts +77 -0
- package/src/model-policy.ts +100 -0
- package/src/outcomes.ts +110 -0
- package/src/pi-extended-subagents.ts +673 -0
- package/src/profile-viewer.ts +246 -0
- package/src/profiles.ts +225 -0
- package/src/scheduling.ts +73 -0
- package/src/subagent-widget.ts +115 -0
- package/src/supported-host.ts +26 -0
- package/src/task-input.ts +74 -0
- package/src/task-presentation.ts +165 -0
- package/src/thread.ts +268 -0
- package/src/tool-schemas.ts +165 -0
- package/src/workspace.ts +46 -0
package/docs/releases.md
ADDED
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
# Release guide
|
|
2
|
+
|
|
3
|
+
Publish deliberate, versioned npm releases. GitHub releases use the matching entry from
|
|
4
|
+
`CHANGELOG.md`; Pi owns installation and updates. Publishing executes no live model calls.
|
|
5
|
+
The repository workflows do not publish on ordinary main-branch pushes.
|
|
6
|
+
|
|
7
|
+
## Version and compatibility policy
|
|
8
|
+
|
|
9
|
+
- During 0.x, use a patch for compatible fixes and polish, and a minor for new functionality
|
|
10
|
+
or breaking changes. Label breaking changes and explain migration in the changelog.
|
|
11
|
+
- Move to 1.0 when the public tool and configuration contracts are stable. After 1.0,
|
|
12
|
+
use semantic versioning: major for breaking changes, minor for compatible features,
|
|
13
|
+
patch for compatible fixes.
|
|
14
|
+
- Tool arguments, permissions/grants, configuration, commands and artifact formats are
|
|
15
|
+
user-facing contracts. A small implementation change can still require a breaking release.
|
|
16
|
+
- This pipeline publishes stable versions to npm's `latest` channel. Prerelease versions
|
|
17
|
+
are rejected until a separate channel policy is added.
|
|
18
|
+
- Delegated execution requires **stable Pi 1.5.2 or newer**, including newer stable patch,
|
|
19
|
+
minor and major versions. Standard build metadata has equal precedence. **Tested host:
|
|
20
|
+
Pi 1.5.2**; allowing future stable versions is not a tested compatibility guarantee.
|
|
21
|
+
Below-minimum, prerelease, malformed and unknown hosts fail closed at execution boundaries, not extension registration. Root status,
|
|
22
|
+
stop/cleanup and diagnostics remain available if the host can load the module; arbitrary
|
|
23
|
+
ancient SDK module-load compatibility is not promised. Wildcard host peer dependencies
|
|
24
|
+
remain required by Pi's packaging format, not an execution compatibility promise.
|
|
25
|
+
- Version 0.2.0 introduces this breaking host restriction during 0.x. Migration from 0.1.x:
|
|
26
|
+
drain active tasks, install stable Pi 1.5.2 or newer, update the extension to 0.2.0 and restart Pi.
|
|
27
|
+
Keep host development dependencies pinned and
|
|
28
|
+
verify SDK/CLI lifecycle, permission, cancellation/drain and native rendering behavior
|
|
29
|
+
before changing the minimum or claiming another tested Pi version.
|
|
30
|
+
- Never move a release tag, reuse a published version or overwrite retained user artifacts.
|
|
31
|
+
|
|
32
|
+
## One-time setup
|
|
33
|
+
|
|
34
|
+
A repository owner and an npm package owner must complete these steps. They are not performed
|
|
35
|
+
by the local setup scripts.
|
|
36
|
+
|
|
37
|
+
1. Confirm your npm account can publish `@howarewoo/pi-subagents` in the `@howarewoo` scope.
|
|
38
|
+
The old unscoped `pi-extended-subagents@0.1.0` is already published; this is a new npm package.
|
|
39
|
+
2. Enable GitHub Actions for this repository. Create a GitHub environment named `npm`.
|
|
40
|
+
Require human approval by `howarewoo`, allow self-approval, and restrict deployment refs
|
|
41
|
+
to release tags (`v*`). Do not run a release until this protection is configured.
|
|
42
|
+
Protect `main` with the two CI matrix checks and restrict creation/deletion of `v*` tags
|
|
43
|
+
to release maintainers using repository rulesets.
|
|
44
|
+
3. Bootstrap the package with the first manual npm publish below. A trusted publisher is
|
|
45
|
+
normally configured from an existing package's settings, so do not assume the first
|
|
46
|
+
tag-triggered run can create a new npm package without account setup.
|
|
47
|
+
4. In **`@howarewoo/pi-subagents` → Settings → Trusted publishing**, add GitHub Actions with:
|
|
48
|
+
The old package's trusted publisher does not carry over to the new scoped package.
|
|
49
|
+
|
|
50
|
+
| Field | Value |
|
|
51
|
+
| -------------------- | -------------- |
|
|
52
|
+
| Organization or user | `howarewoo` |
|
|
53
|
+
| Repository | `pi-subagents` |
|
|
54
|
+
| Workflow filename | `release.yml` |
|
|
55
|
+
| Environment name | `npm` |
|
|
56
|
+
|
|
57
|
+
Permit direct `npm publish` if npm presents an allowed-actions selector. The workflow uses
|
|
58
|
+
GitHub-hosted runners and `id-token: write`; no `NPM_TOKEN` secret is needed. Use npm
|
|
59
|
+
11.5.1 or newer for OIDC publishing (the release runner uses Node 24).
|
|
60
|
+
|
|
61
|
+
5. Follow npm's current validation/expiry rules when creating the trusted publisher; create it
|
|
62
|
+
near the next release. After successful OIDC publication, restrict traditional token-based
|
|
63
|
+
publishing and revoke unused automation tokens. Public GitHub/OIDC publication supplies npm
|
|
64
|
+
provenance automatically.
|
|
65
|
+
|
|
66
|
+
See [npm's trusted publishing documentation](https://docs.npmjs.com/trusted-publishers/) for
|
|
67
|
+
current account requirements and troubleshooting. Do not use `npm whoami` to test OIDC: it does
|
|
68
|
+
not validate trusted publishing permissions.
|
|
69
|
+
|
|
70
|
+
The environment, required reviewer/tag restrictions, and repository rulesets are owner
|
|
71
|
+
prerequisites, not settings created by this change. Read-only inspection found no configured
|
|
72
|
+
environments or rulesets; npm trusted-publisher account configuration remains unverified.
|
|
73
|
+
Do not treat the workflow's `environment: npm` declaration as an approval rule: GitHub can
|
|
74
|
+
create an unprotected environment when a job references a new name. Confirm these settings
|
|
75
|
+
before any tag push or manual workflow dispatch.
|
|
76
|
+
|
|
77
|
+
## Repository rename cutover
|
|
78
|
+
|
|
79
|
+
These file changes prepare the rename from `howarewoo/pi-extended-subagents` to
|
|
80
|
+
`howarewoo/pi-subagents`; they do not rename the GitHub repository or configure npm.
|
|
81
|
+
The npm package remains `@howarewoo/pi-subagents`, and the production entrypoint remains
|
|
82
|
+
`src/pi-extended-subagents.ts`. Existing npm installations need no migration.
|
|
83
|
+
|
|
84
|
+
A repository owner must coordinate the following before the next release:
|
|
85
|
+
|
|
86
|
+
1. Rename the GitHub repository to `pi-subagents` and ensure the rename changes are on
|
|
87
|
+
`main`. Do not push release tags or dispatch Release between those steps: the workflow
|
|
88
|
+
guard accepts only `howarewoo/pi-subagents`, and `package.json` must identify the actual
|
|
89
|
+
repository for npm publishing. Do not dispatch old release tags whose workflow still
|
|
90
|
+
checks the previous repository name.
|
|
91
|
+
2. An npm package owner must inspect **`@howarewoo/pi-subagents` → Settings → Trusted
|
|
92
|
+
publishing** and verify the connection for `howarewoo/pi-subagents`, `release.yml` and
|
|
93
|
+
environment `npm`. If the connection needs changing, follow npm's current procedure
|
|
94
|
+
to replace it and its validation/expiry rules. Do not assume GitHub URL redirects prove
|
|
95
|
+
OIDC authorization; the account binding remains unverified until checked and exercised
|
|
96
|
+
by an intentionally authorized release. Retain the protected GitHub `npm` environment
|
|
97
|
+
and release-tag restrictions.
|
|
98
|
+
3. Update local clones after the rename:
|
|
99
|
+
|
|
100
|
+
```sh
|
|
101
|
+
git remote set-url origin https://github.com/howarewoo/pi-subagents.git
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
GitHub redirects the previous web and Git URLs, but do not reuse the old repository
|
|
105
|
+
name: doing so removes those redirects. For Pi Git installations, use the source URL
|
|
106
|
+
actually registered when updating or removing it. If switching to the new URL, let tasks
|
|
107
|
+
drain, remove the old registration, install the new source at the desired version, and
|
|
108
|
+
restart Pi; never load both registrations. Pi's old-source update path is not verified
|
|
109
|
+
by local package checks.
|
|
110
|
+
|
|
111
|
+
4. For the next deliberate release, use a new version and tag containing these changes.
|
|
112
|
+
Run the normal release gates and verify registry integrity, provenance and the GitHub
|
|
113
|
+
release afterward. Do not republish an existing version just to update its repository
|
|
114
|
+
metadata; previously published versions remain unchanged.
|
|
115
|
+
|
|
116
|
+
See [GitHub's rename documentation](https://docs.github.com/en/repositories/creating-and-managing-repositories/renaming-a-repository)
|
|
117
|
+
and [npm's trusted publishing documentation](https://docs.npmjs.com/trusted-publishers/).
|
|
118
|
+
Preparing or merging this PR does not establish the external rename, account setup or a
|
|
119
|
+
successful publish.
|
|
120
|
+
|
|
121
|
+
## Prepare each release
|
|
122
|
+
|
|
123
|
+
1. Start from current `main`, with no unrelated local changes. Review the changes being released.
|
|
124
|
+
2. On a release-preparation branch, update the manifest and lockfile without creating a tag:
|
|
125
|
+
|
|
126
|
+
```sh
|
|
127
|
+
npm version 0.2.0 --no-git-tag-version
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
Choose the actual next version; `0.2.0` includes the breaking minimum-host restriction.
|
|
131
|
+
Preserve existing release tags and historical changelog entries.
|
|
132
|
+
|
|
133
|
+
3. Add a nonempty `## [0.2.0]` entry to the root changelog, using the selected version. Include
|
|
134
|
+
changes, migrations, Pi compatibility, and relevant permission/lifecycle changes. Do not
|
|
135
|
+
promise verification that has not run. Keep the README's installation and migration examples
|
|
136
|
+
current.
|
|
137
|
+
4. Run the local gates:
|
|
138
|
+
|
|
139
|
+
```sh
|
|
140
|
+
npm ci --ignore-scripts
|
|
141
|
+
npm run check
|
|
142
|
+
npm run release:check
|
|
143
|
+
npm run test:package
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
Package smoke testing installs only runtime dependencies, without host peers or lifecycle
|
|
147
|
+
scripts, in a disposable directory. It checks the packed manifest, changelog, license,
|
|
148
|
+
production extension load and tool registration, not live-provider reliability.
|
|
149
|
+
|
|
150
|
+
5. Submit the version/changelog changes as a human-reviewed release PR and merge it after CI.
|
|
151
|
+
These instructions describe maintainer actions; local checks do not commit or publish.
|
|
152
|
+
|
|
153
|
+
CI runs all checks and the package smoke test on Node 22.19.0 and Node 24. It uses pinned Pi
|
|
154
|
+
1.5.2 development packages, not an implied matrix of all Pi versions.
|
|
155
|
+
|
|
156
|
+
## First scoped npm publish only
|
|
157
|
+
|
|
158
|
+
Historical bootstrap for 0.1.1, which is already published. Do not repeat it for 0.2.0;
|
|
159
|
+
use the tag-triggered workflow after verifying the owner prerequisites above.
|
|
160
|
+
|
|
161
|
+
After the scoped-package release PR is merged, check out its exact clean commit and run the local gates
|
|
162
|
+
above. Use an npm account with publishing rights and two-factor authentication:
|
|
163
|
+
|
|
164
|
+
```sh
|
|
165
|
+
npm login
|
|
166
|
+
release_dir="$(mktemp -d)"
|
|
167
|
+
npm pack --pack-destination "$release_dir"
|
|
168
|
+
npm run test:package -- "$release_dir/howarewoo-pi-subagents-0.1.1.tgz"
|
|
169
|
+
npm publish "$release_dir/howarewoo-pi-subagents-0.1.1.tgz" --access public --ignore-scripts
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
Inspect the result with `npm view @howarewoo/pi-subagents@0.1.1 version dist.integrity`.
|
|
173
|
+
Keep the tarball until verified, then remove the temporary directory. This interactive bootstrap
|
|
174
|
+
is separate from GitHub OIDC and does not claim GitHub provenance. Configure the trusted publisher
|
|
175
|
+
before pushing the release tag. The workflow accepts an already-published version only when its
|
|
176
|
+
registry SHA-512 integrity matches the newly verified tarball byte for byte.
|
|
177
|
+
|
|
178
|
+
## Tag and publish
|
|
179
|
+
|
|
180
|
+
From the exact merged release commit (replace the example version as needed):
|
|
181
|
+
|
|
182
|
+
```sh
|
|
183
|
+
git tag -a v0.2.0 -m "Release v0.2.0"
|
|
184
|
+
git push origin v0.2.0
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
`release.yml` accepts tag pushes and manual dispatch on an existing `v*` tag, not branch
|
|
188
|
+
dispatch. Its three GitHub-hosted jobs run in order:
|
|
189
|
+
|
|
190
|
+
1. **validation** has only `contents: read`, no OIDC permission or publishing environment.
|
|
191
|
+
It checks main ancestry, tag/manifest/lockfile versions and changelog, installs dependencies
|
|
192
|
+
with `npm ci --ignore-scripts`, runs the existing checks, packs once, and smoke-tests that
|
|
193
|
+
exact tarball. It uploads package/metadata and notes as separate immutable artifacts.
|
|
194
|
+
2. **publish** depends on validation and requires the protected `npm` environment approval.
|
|
195
|
+
Only this job has `id-token: write`; it has `contents: read`, never `contents: write`.
|
|
196
|
+
It selects the package artifact by validation's exact artifact ID from the current run.
|
|
197
|
+
Before any registry request, the reviewed checked-out, dependency-free publish helper
|
|
198
|
+
requires regular metadata/tarball files, checks the fixed package name, stable version,
|
|
199
|
+
tag, commit and fixed tarball filename, and recomputes SHA-512 against validation's job
|
|
200
|
+
output. A missing or mismatched download is fatal; download-action digest warnings are
|
|
201
|
+
not the publication gate. It neither installs dependencies nor extracts/executes archive
|
|
202
|
+
content, runs tests, or repacks. `npm publish --ignore-scripts` suppresses lifecycle scripts.
|
|
203
|
+
3. **github-release** depends on npm success. It has `contents: write` but no OIDC permission,
|
|
204
|
+
downloads only the selected notes artifact, and creates the GitHub release without checking
|
|
205
|
+
out or executing package code. An existing release remains unchanged.
|
|
206
|
+
|
|
207
|
+
Releases serialize; a later tag does not cancel an active publish. Artifact retention is seven
|
|
208
|
+
days. If artifacts expire, rerun validation and all downstream jobs on the same immutable tag
|
|
209
|
+
rather than substituting an artifact from another run. No executable helper comes from the
|
|
210
|
+
transferred artifact. Separation limits credential exposure during tests/builds; it does not
|
|
211
|
+
prove that a compromised validation job produced trustworthy package bytes. Review the release
|
|
212
|
+
commit and approval evidence before authorizing publication.
|
|
213
|
+
|
|
214
|
+
The artifact behavior follows [GitHub's artifact documentation](https://docs.github.com/en/actions/using-workflows/storing-workflow-data-as-artifacts).
|
|
215
|
+
OIDC still requires the actual npm account setup described above; documentation and job
|
|
216
|
+
permissions alone do not prove that account binding exists.
|
|
217
|
+
|
|
218
|
+
Verify both the npm version/integrity and the GitHub release before announcing it. Test a clean
|
|
219
|
+
Pi install, then `/subagent-profiles`, and confirm the documented update path. No tag, registry publish,
|
|
220
|
+
trusted-publisher setting or fresh installed-package user walkthrough is performed by local CI checks.
|
|
221
|
+
|
|
222
|
+
## Recover a partial or bad release
|
|
223
|
+
|
|
224
|
+
- **Failed before npm publication:** fix the configuration or external prerequisite, then rerun
|
|
225
|
+
the workflow for the same tag. Do not move the tag to a changed commit.
|
|
226
|
+
- **npm published, GitHub release failed:** rerun the failed workflow, or dispatch **Release**
|
|
227
|
+
on the same existing tag. It skips npm publication only when that version's integrity exactly
|
|
228
|
+
matches the verified tarball. An existing GitHub release is left unchanged. A different integrity
|
|
229
|
+
or a registry error stops the workflow; do not bypass the check.
|
|
230
|
+
- **Published contents are wrong:** prepare a new patch (or appropriate breaking version), with
|
|
231
|
+
clear changelog guidance. Deprecate the affected version with an explanatory npm message if
|
|
232
|
+
needed; do not unpublish as the normal rollback strategy.
|
|
233
|
+
- **User rollback:** let tasks finish, explicitly install the last known-good version, then
|
|
234
|
+
restart Pi. For example, `pi install npm:@howarewoo/pi-subagents@0.1.1` if that is the last known-good release.
|
|
235
|
+
Pinning code does not undo incompatible configuration or data changes; follow release-specific
|
|
236
|
+
migration instructions. Reload and shutdown abort/drain active children rather than migrate them.
|