@timurproko/a1 0.1.1-dev.9 → 0.1.5-dev.11

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 (77) hide show
  1. package/README.md +76 -15
  2. package/bin/cli.js +14 -2
  3. package/bin/module-identity.js +132 -0
  4. package/bin/ui.js +10 -0
  5. package/dist/native/darwin-arm64/manifest.json +1 -1
  6. package/dist/native/linux-x64/manifest.json +1 -1
  7. package/dist/native/win32-x64/manifest.json +2 -2
  8. package/dist/native/win32-x64/process-guardian.exe +0 -0
  9. package/dist/src/cli/capabilities.d.ts +15 -0
  10. package/dist/src/cli/capabilities.js +7 -0
  11. package/dist/src/cli/dispatch.d.ts +9 -3
  12. package/dist/src/cli/dispatch.js +104 -16
  13. package/dist/src/cli/index.d.ts +2 -0
  14. package/dist/src/cli/index.js +2 -0
  15. package/dist/src/cli/packages.d.ts +23 -0
  16. package/dist/src/cli/packages.js +84 -0
  17. package/dist/src/foundation/agent-engine-contracts/index.d.ts +1 -0
  18. package/dist/src/foundation/agent-engine-contracts/index.js +1 -0
  19. package/dist/src/foundation/agent-engine-contracts/package-ports.d.ts +54 -0
  20. package/dist/src/foundation/agent-engine-contracts/package-ports.js +31 -0
  21. package/dist/src/foundation/pi-component-adapter/shell-editor-autocomplete.js +1 -1
  22. package/dist/src/foundation/pi-component-adapter/shell-extension-ui.js +1 -1
  23. package/dist/src/foundation/pi-component-adapter/shell-footer-status.js +1 -1
  24. package/dist/src/foundation/pi-component-adapter/shell-presenters-transcript.d.ts +15 -0
  25. package/dist/src/foundation/pi-component-adapter/shell-presenters-transcript.js +34 -1
  26. package/dist/src/foundation/pi-component-adapter/shell-selectors-dialogs.js +1 -1
  27. package/dist/src/foundation/pi-component-adapter/shell-shared-facade.d.ts +1 -1
  28. package/dist/src/foundation/pi-component-adapter/shell-shared-facade.js +1 -1
  29. package/dist/src/foundation/pi-component-adapter/upstream/adjacent/core/keybindings.d.ts +2 -2
  30. package/dist/src/foundation/pi-component-adapter/upstream/adjacent/core/keybindings.js +1 -1
  31. package/dist/src/foundation/pi-component-adapter/upstream/components/countdown-timer.d.ts +1 -1
  32. package/dist/src/foundation/pi-component-adapter/upstream/components/custom-entry.d.ts +1 -1
  33. package/dist/src/foundation/pi-component-adapter/upstream/components/custom-entry.js +1 -1
  34. package/dist/src/foundation/pi-component-adapter/upstream/components/daxnuts.d.ts +1 -1
  35. package/dist/src/foundation/pi-component-adapter/upstream/components/earendil-announcement.d.ts +1 -1
  36. package/dist/src/foundation/pi-component-adapter/upstream/components/earendil-announcement.js +1 -1
  37. package/dist/src/foundation/pi-component-adapter/upstream/components/extension-editor.d.ts +1 -1
  38. package/dist/src/foundation/pi-component-adapter/upstream/components/extension-editor.js +1 -1
  39. package/dist/src/foundation/pi-component-adapter/upstream/components/first-time-setup.d.ts +1 -1
  40. package/dist/src/foundation/pi-component-adapter/upstream/components/first-time-setup.js +1 -1
  41. package/dist/src/foundation/pi-component-adapter/upstream/components/mermaid.js +1 -1
  42. package/dist/src/foundation/pi-component-adapter/upstream/components/owned-editor.d.ts +1 -1
  43. package/dist/src/foundation/pi-component-adapter/upstream/components/owned-editor.js +1 -1
  44. package/dist/src/foundation/pi-component-adapter/upstream/components/scoped-models-selector.d.ts +1 -1
  45. package/dist/src/foundation/pi-component-adapter/upstream/components/scoped-models-selector.js +1 -1
  46. package/dist/src/foundation/pi-component-adapter/upstream/components/session-footer.d.ts +1 -1
  47. package/dist/src/foundation/pi-component-adapter/upstream/components/session-footer.js +1 -1
  48. package/dist/src/foundation/pi-component-adapter/upstream/components/session-selector-search.js +1 -1
  49. package/dist/src/foundation/pi-component-adapter/upstream/components/session-selector.d.ts +1 -1
  50. package/dist/src/foundation/pi-component-adapter/upstream/components/session-selector.js +1 -1
  51. package/dist/src/foundation/pi-component-adapter/upstream/components/skill-invocation-message.d.ts +1 -1
  52. package/dist/src/foundation/pi-component-adapter/upstream/components/skill-invocation-message.js +1 -1
  53. package/dist/src/foundation/pi-component-adapter/upstream/components/status-indicator.d.ts +1 -1
  54. package/dist/src/foundation/pi-component-adapter/upstream/components/status-indicator.js +1 -1
  55. package/dist/src/foundation/pi-component-adapter/upstream/components/tree-selector.d.ts +1 -1
  56. package/dist/src/foundation/pi-component-adapter/upstream/components/tree-selector.js +1 -1
  57. package/dist/src/foundation/pi-component-adapter/upstream/components/trust-selector.d.ts +1 -1
  58. package/dist/src/foundation/pi-component-adapter/upstream/components/trust-selector.js +1 -1
  59. package/dist/src/foundation/pi-component-adapter/upstream/theme/theme.d.ts +1 -1
  60. package/dist/src/foundation/pi-component-adapter/upstream/theme/theme.js +1 -1
  61. package/dist/src/foundation/pi-engine-adapter/adapter.d.ts +8 -1
  62. package/dist/src/foundation/pi-engine-adapter/adapter.js +28 -1
  63. package/dist/src/foundation/pi-engine-adapter/index.d.ts +1 -0
  64. package/dist/src/foundation/pi-engine-adapter/index.js +1 -0
  65. package/dist/src/foundation/pi-engine-adapter/package-integration.d.ts +13 -0
  66. package/dist/src/foundation/pi-engine-adapter/package-integration.js +112 -0
  67. package/dist/src/foundation/pi-engine-adapter/runtime-integration.d.ts +18 -1
  68. package/dist/src/foundation/pi-engine-adapter/runtime-integration.js +37 -2
  69. package/dist/src/foundation/pi-owned-ui-integration/session-shell.js +14 -2
  70. package/dist/src/foundation/pi-tui-runtime-adapter/adapter.js +1 -1
  71. package/dist/src/foundation/release/release.js +26 -2
  72. package/dist/src/foundation/release/update.d.ts +11 -1
  73. package/dist/src/foundation/release/update.js +106 -5
  74. package/docs/architecture/toolchain.md +3 -3
  75. package/docs/ci-release-runbook.md +80 -40
  76. package/docs/features/launch-profiles.md +2 -0
  77. package/package.json +8 -3
@@ -1,13 +1,20 @@
1
1
  # CI and release operations
2
2
 
3
- GitHub Actions is the only automation platform. Two required checks protect the branches:
3
+ GitHub Actions is the only automation platform. Three refs are protected:
4
4
 
5
- | Branch | Required check | Produced by |
5
+ | Ref | Protection | Produced by |
6
6
  | --- | --- | --- |
7
- | `develop` | `Development validation required` | `.github/workflows/ci.yml` |
8
- | `master` | `Stable candidate required` | `.github/workflows/certify-stable.yml` |
7
+ | `develop` | `Development validation required` on every pull request | `.github/workflows/ci.yml` |
8
+ | `master` | cannot be deleted or force-updated | ruleset only |
9
+ | `refs/tags/v*` | cannot be deleted or moved | ruleset only |
9
10
 
10
- These are job display names. If you rename one, update the ruleset definition, this runbook, and the live ruleset together.
11
+ Publishing is one workflow, `.github/workflows/release.yml`, triggered by pushes
12
+ rather than dispatched by hand.
13
+
14
+ `develop` is where work lands. `master` records what the npm `latest` tag serves:
15
+ the release fast-forwards it to the commit it published, and nothing else ever
16
+ writes it. There is no promotion to arrange and nothing to keep in sync — `master`
17
+ is an effect of publishing, not a step before it.
11
18
 
12
19
  ## How much validation runs when
13
20
 
@@ -15,53 +22,86 @@ These are job display names. If you rename one, update the ruleset definition, t
15
22
  | --- | --- |
16
23
  | Docs or specs only | OpenSpec strict lint, nothing else |
17
24
  | Any code PR into `develop` | Fast tier: typecheck, architecture checks, unit/contract tests |
18
- | Preview candidate (`next`) | Fast tier + package gates: content, clean install, dependency policy |
19
- | Stable candidate (`latest`) | Complete suite on Windows, Linux, and macOS + physical evidence |
20
-
21
- Need more coverage for a risky preview? Dispatch the candidate with `full: true`, or run the **Full regression** workflow on demand.
22
-
23
- ## Publish a preview to npm `next`
25
+ | Preview publish (`next`) | Fast tier + package gates on Windows, Linux, and macOS |
26
+ | Stable publish (`latest`) | Complete suite on Windows, Linux, and macOS |
24
27
 
25
- One command from a clean `develop` checkout runs the whole chain candidate build, publish, registry verification:
28
+ Need more coverage for something risky? Run the **Full regression** workflow on
29
+ demand.
26
30
 
27
- ```sh
28
- npm run release:next
29
- ```
31
+ ## Previews publish themselves
30
32
 
31
- It dispatches the same trusted workflows below and never publishes local bytes. The manual steps remain the reference path:
33
+ Every push to `develop` publishes a preview to the npm `next` tag. Nothing to
34
+ dispatch and nothing to approve.
32
35
 
33
- 1. Make sure `Development validation required` is green on the `develop` tip.
34
- 2. Dispatch **Build npm next candidate** with the exact commit and `confirm_candidate=build-uncertified-next-candidate`.
35
- 3. Check the resulting `candidate-evidence.json`: gates passed, package integrity matches.
36
- 4. Approve the `npm-publish` environment and dispatch **Publish npm next** with the candidate run id.
36
+ The version is stamped at publish time `<major.minor.patch>-dev.<run number>`,
37
+ derived from whatever `package.json` declares and is never written back to the
38
+ repository. `develop` therefore carries one open prerelease version between
39
+ releases, and no commit is ever spent on a preview.
37
40
 
38
- The publisher uploads the exact validated tarball it never rebuilds. Candidates expire after 14 days; an expired or mismatched artifact means building a new candidate, not patching the old one.
41
+ One consequence worth knowing: a push that would republish an existing version
42
+ fails early, before anything is packed.
39
43
 
40
- ## Publish a stable release to npm `latest`
44
+ ## Cutting a stable release
41
45
 
42
- 1. Commit the final version to `develop` (clean tree, version not yet on the registry).
43
- 2. Dispatch **Build stable candidate** — it packs once and validates the same bytes on all three platforms.
44
- 3. Dispatch **Certify stable physical platforms** on the dedicated isolated workers (they set `PHYSICAL_WORKER_ISOLATED=true` and run under the `stable-physical` environment). Never run physical host probes on a developer workstation.
45
- 4. Dispatch **Certify stable candidate** with both run ids. `Stable candidate required` passes only when every verdict binds the same commit, version, and digest.
46
- 5. Merge that exact commit to `master`, tag it `v<version>`, and dispatch **Publish npm stable**, then approve `npm-publish`.
46
+ One command, from a clean `develop` that matches its remote:
47
47
 
48
- Stable artifacts expire after 30 days. The same rule as previews applies: publication still requires exact certified bytes. Never upload locally rebuilt bytes, and never route around certification by rebuilding inside a publisher.
48
+ ```sh
49
+ npm run release -- patch # or minor, major, or an exact x.y.z
50
+ ```
49
51
 
50
- ## When something fails
52
+ It lands `x.y.z` on `develop` through a pull request that merges itself, waits for
53
+ that publication to succeed, and then lands `x.y.(z+1)-dev.0` so previews resume
54
+ immediately. It publishes nothing itself and creates no tag.
51
55
 
52
- - **PR validation fails:** fix the code and push. Do not mark a failed tier optional.
53
- - **Candidate validation fails:** discard the candidate and build a new one after the fix.
54
- - **Physical worker fails:** fix or replace the worker, then rerun the full physical evidence for the candidate.
55
- - **Publisher fails before npm accepted the bytes:** diagnose and retry with the same candidate while it is unexpired and the version is still unpublished.
56
- - **Publisher is uncertain after npm accepted the bytes:** stop. Check the registry for the version, tag, and digest. Repair a dist-tag only as a separate reviewed operation — never republish.
56
+ Landing the stable version is what publishes. The same pipeline sees a commit
57
+ declaring a stable version and runs its stable form: build the process guardian on
58
+ all three platforms, pack once, run the complete suite against those exact bytes on
59
+ all three platforms, publish to npm `latest` with provenance from the
60
+ `npm-publish` environment, and only then write the tag `vx.y.z`, record the GitHub
61
+ Release, and fast-forward `master`.
57
62
 
58
- ## Why the rulesets look the way they do
63
+ That order is the point. A release that fails leaves no tag, no release, and no
64
+ moved branch — only a red run. Nothing ever advertises a version that does not
65
+ exist on the registry.
59
66
 
60
- One person maintains this repository, and GitHub does not let a PR author approve their own PR. Requiring even one approval would therefore deadlock the authorized solo-maintainer path — no PR could ever merge. So both rulesets require a pull request, a green required check, and resolved review threads, but set required approving reviews to zero.
67
+ Rules that do not bend:
61
68
 
62
- - `develop` does not require the branch to be up to date: once a PR is approved and green, it merges even if unrelated work landed first — no re-validation loop.
63
- - `master` does require it: a stable promotion always validates the exact final state.
69
+ - **Never upload locally rebuilt bytes.** The publisher uploads the artifact the
70
+ validation ran against, and re-checks its digest before and after.
71
+ - **Never route around validation by rebuilding inside a publisher.** The publish
72
+ job has no checkout of dependencies, no build, and no pack step.
73
+ - **Never move a release tag.** A wrong tag is superseded by the next version, not
74
+ repointed. The tag is written by the publication itself, so it exists only for
75
+ versions that shipped.
64
76
 
65
- If a second maintainer joins, raise the approval count. Do not add a direct-push bypass as a shortcut, and never weaken the force-push or deletion protection.
77
+ ## When something fails
66
78
 
67
- Ruleset mutation is a separate administrative operation: run `node scripts/check-github-rulesets.mjs` to see the diff, and apply only when a maintainer explicitly confirms with `--apply --confirm apply-a1-ci-rulesets`.
79
+ - **PR validation fails:** fix the code and push. Do not mark a failed tier optional.
80
+ - **Preview publish fails:** fix and push again; the next push publishes the next
81
+ run number. Nothing needs cleaning up.
82
+ - **Stable publish fails:** nothing was recorded — no tag, no release, no moved
83
+ branch. Fix the cause and release the next version. The failed version number is
84
+ spent, because `develop` has already moved past it.
85
+ - **Stable publish is uncertain after npm accepted the bytes:** stop. Check the
86
+ registry for the version, tag, and digest. Repair a dist-tag only as a separate
87
+ reviewed operation — never republish.
88
+
89
+ ## Why the ruleset looks the way it does
90
+
91
+ One person maintains this repository, and GitHub does not let a PR author approve
92
+ their own PR. Requiring even one approval would deadlock the authorized
93
+ solo-maintainer path — no PR could ever merge. So the `develop` ruleset requires a
94
+ pull request, a green required check, and resolved review threads, but sets required
95
+ approving reviews to zero. It does not require the branch to be up to date: once a
96
+ PR is green it merges even if unrelated work landed first, with no re-validation
97
+ loop.
98
+
99
+ The `master` and tag rulesets carry no checks at all. Both only ever receive a commit
100
+ that has already been validated and published, so what matters about them is that
101
+ neither can be rewritten. Requiring a pull request on `master` would stop the release
102
+ from recording itself there.
103
+
104
+ Do not add a direct-push bypass as a shortcut, and never weaken the force-push or
105
+ deletion protection. Ruleset mutation is a separate administrative operation: run
106
+ `node scripts/check-github-rulesets.mjs` to see the diff, and apply only when a
107
+ maintainer explicitly confirms with `--apply --confirm apply-a1-ci-rulesets`.
@@ -8,6 +8,8 @@
8
8
  | `a1 pi` | Untouched vanilla Pi fallback and comparison oracle | ordinary `~/.pi/agent` |
9
9
  | `a1 sandbox` | Unchanged isolated vanilla Pi profile for experiments | `~/.a1/sandbox` |
10
10
 
11
+ `a1 pi` and `a1 sandbox` are development instruments: one compares A1 against pinned Pi, the other tries resources against an isolated profile. Prerelease builds — what `a1 update:next` installs — expose them. A release build does not, and does not recognize the words: what it exposes is bare `a1` plus the maintenance and package commands. Working in this repository is unaffected, because `npm start:pi` and `npm run start:sandbox` prepare the profile and launch directly rather than through the command line.
12
+
11
13
  There is no `a1 agent` command. The former `a1 ui` subcommand is removed. Bare `a1` is the owned agent product surface and remains the entry point when multi-agent UX is introduced.
12
14
 
13
15
  ## First launch
package/package.json CHANGED
@@ -1,12 +1,18 @@
1
1
  {
2
2
  "name": "@timurproko/a1",
3
- "version": "0.1.1-dev.9",
3
+ "version": "0.1.5-dev.11",
4
4
  "description": "Standalone terminal workspace for supervised native and managed agents",
5
5
  "type": "module",
6
6
  "packageManager": "npm@11.13.0",
7
7
  "bin": {
8
8
  "a1": "bin/cli.js"
9
9
  },
10
+ "imports": {
11
+ "#pi-tui": [
12
+ "./node_modules/@earendil-works/pi-coding-agent/node_modules/@earendil-works/pi-tui/dist/index.js",
13
+ "@earendil-works/pi-tui"
14
+ ]
15
+ },
10
16
  "files": [
11
17
  "bin",
12
18
  "dist",
@@ -27,8 +33,7 @@
27
33
  "check:deprecated": "node scripts/check-deprecated-dependencies.mjs",
28
34
  "branches:prune": "node scripts/prune-merged-branches.mjs",
29
35
  "check": "npm run test:fast",
30
- "publish:next": "tsx scripts/publish-next.ts",
31
- "release:next": "node scripts/release-next.mjs",
36
+ "release": "node scripts/release.mjs",
32
37
  "test": "npm run test:fast",
33
38
  "test:fast": "node scripts/run-validation-tier.mjs typecheck fast",
34
39
  "test:scope": "node scripts/run-validation-tier.mjs",