@timurproko/a1 0.2.7-dev.792 → 0.2.7-dev.794

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 (103) hide show
  1. package/dist/app/session-shell/session-shell-root.d.ts +2 -0
  2. package/dist/app/session-shell/session-shell.d.ts +1 -0
  3. package/dist/app/session-shell/session-shell.js +10 -0
  4. package/dist/cli/tabs.js +1 -1
  5. package/dist/composition/owned-ui.d.ts +1 -0
  6. package/dist/composition/owned-ui.js +16 -3
  7. package/dist/features/resident-tab/shortcut-declarations.d.ts +1 -1
  8. package/dist/features/resident-tab/shortcut-declarations.js +1 -0
  9. package/dist/foundation/launch-guardian/exit-watcher.d.ts +14 -0
  10. package/dist/foundation/launch-guardian/exit-watcher.js +94 -0
  11. package/dist/foundation/launch-guardian/main.d.ts +2 -1
  12. package/dist/foundation/launch-guardian/main.js +58 -6
  13. package/dist/foundation/process-containment/{native-guardian-containment.d.ts → addon-containment.d.ts} +7 -5
  14. package/dist/foundation/process-containment/addon-containment.js +139 -0
  15. package/dist/foundation/process-containment/addon-process-inspector.d.ts +11 -0
  16. package/dist/foundation/process-containment/addon-process-inspector.js +36 -0
  17. package/dist/foundation/process-containment/addon.d.ts +42 -0
  18. package/dist/foundation/process-containment/addon.js +57 -0
  19. package/dist/foundation/process-containment/artifact.d.ts +1 -1
  20. package/dist/foundation/process-containment/artifact.js +6 -5
  21. package/dist/foundation/process-containment/contracts.d.ts +2 -0
  22. package/dist/foundation/process-containment/index.d.ts +4 -4
  23. package/dist/foundation/process-containment/index.js +3 -3
  24. package/dist/foundation/process-containment/native-process-inspector.d.ts +2 -1
  25. package/dist/foundation/process-containment/native-process-inspector.js +10 -10
  26. package/dist/foundation/release/bootstrap.js +53 -16
  27. package/dist/foundation/release/index.d.ts +1 -1
  28. package/dist/foundation/release/index.js +1 -1
  29. package/dist/foundation/release/release-store.d.ts +12 -0
  30. package/dist/foundation/release/release-store.js +124 -2
  31. package/dist/foundation/resident-tabs/bounded-host-command.d.ts +3 -1
  32. package/dist/foundation/resident-tabs/bounded-host-command.js +6 -2
  33. package/dist/foundation/resident-tabs/bridge-client.d.ts +2 -0
  34. package/dist/foundation/resident-tabs/bridge-client.js +13 -0
  35. package/dist/foundation/resident-tabs/doctor.d.ts +0 -1
  36. package/dist/foundation/resident-tabs/doctor.js +4 -4
  37. package/dist/foundation/resident-tabs/ensure-terminal-host.d.ts +7 -2
  38. package/dist/foundation/resident-tabs/ensure-terminal-host.js +15 -11
  39. package/dist/foundation/resident-tabs/host-entry.d.ts +1 -0
  40. package/dist/foundation/resident-tabs/host-entry.js +17 -0
  41. package/dist/foundation/resident-tabs/index.d.ts +2 -2
  42. package/dist/foundation/resident-tabs/index.js +1 -1
  43. package/dist/foundation/resident-tabs/maintenance.d.ts +5 -4
  44. package/dist/foundation/resident-tabs/maintenance.js +32 -17
  45. package/dist/foundation/resident-tabs/release-holds.d.ts +3 -2
  46. package/dist/foundation/resident-tabs/release-holds.js +16 -7
  47. package/dist/foundation/resident-tabs/settings.d.ts +0 -1
  48. package/dist/foundation/resident-tabs/settings.js +1 -7
  49. package/dist/foundation/resident-tabs/terminal-host-artifact.d.ts +11 -15
  50. package/dist/foundation/resident-tabs/terminal-host-artifact.js +57 -32
  51. package/dist/foundation/session-writer-lock/index.d.ts +1 -3
  52. package/dist/foundation/session-writer-lock/index.js +8 -6
  53. package/dist/integrations/pi/components/shell-editor-autocomplete.js +2 -1
  54. package/dist/integrations/pi/components/shell-shared-facade.d.ts +2 -0
  55. package/dist/native/darwin-arm64/manifest.json +8 -6
  56. package/dist/native/darwin-arm64/process-guardian.node +0 -0
  57. package/dist/native/darwin-arm64/terminal-host-THIRD-PARTY-NOTICES.txt +1 -1
  58. package/dist/native/darwin-arm64/terminal-host.manifest.json +14 -13
  59. package/dist/native/darwin-arm64/terminal-host.node +0 -0
  60. package/dist/native/darwin-x64/manifest.json +9 -7
  61. package/dist/native/darwin-x64/process-guardian.node +0 -0
  62. package/dist/native/darwin-x64/terminal-host-THIRD-PARTY-NOTICES.txt +1 -1
  63. package/dist/native/darwin-x64/terminal-host.manifest.json +15 -14
  64. package/dist/native/darwin-x64/terminal-host.node +0 -0
  65. package/dist/native/linux-x64/manifest.json +8 -6
  66. package/dist/native/linux-x64/process-guardian.node +0 -0
  67. package/dist/native/linux-x64/terminal-host-THIRD-PARTY-NOTICES.txt +1 -1
  68. package/dist/native/linux-x64/terminal-host.manifest.json +14 -13
  69. package/dist/native/linux-x64/{terminal-host → terminal-host.node} +0 -0
  70. package/dist/native/win32-x64/manifest.json +8 -6
  71. package/dist/native/win32-x64/process-guardian.node +0 -0
  72. package/dist/native/win32-x64/terminal-host-THIRD-PARTY-NOTICES.txt +1 -1
  73. package/dist/native/win32-x64/terminal-host.manifest.json +14 -13
  74. package/dist/native/win32-x64/{terminal-host.exe → terminal-host.node} +0 -0
  75. package/dist/product-identity.d.ts +1 -1
  76. package/dist/product-identity.js +1 -1
  77. package/dist/product-identity.json +3 -2
  78. package/dist/runtime-payload-inventory.json +1 -0
  79. package/dist/ui/settings/declarations.d.ts +0 -12
  80. package/dist/ui/settings/declarations.js +0 -10
  81. package/docs/architecture/boundaries.md +10 -9
  82. package/docs/architecture/process-guardian-provenance.md +17 -11
  83. package/docs/architecture/resident-tabs.md +36 -34
  84. package/docs/architecture/terminal-host-provenance.md +5 -3
  85. package/docs/architecture/toolchain.md +6 -6
  86. package/docs/openspec-archive-automation.md +3 -3
  87. package/docs/validation.md +5 -1
  88. package/package.json +1 -1
  89. package/dist/foundation/process-containment/darwin-process-inspector.d.ts +0 -5
  90. package/dist/foundation/process-containment/darwin-process-inspector.js +0 -7
  91. package/dist/foundation/process-containment/native-guardian-containment.js +0 -152
  92. package/dist/foundation/process-containment/windows-process-inspector.d.ts +0 -19
  93. package/dist/foundation/process-containment/windows-process-inspector.js +0 -56
  94. package/dist/native/darwin-arm64/a1_session_lock.node +0 -0
  95. package/dist/native/darwin-arm64/process-guardian +0 -0
  96. package/dist/native/darwin-arm64/terminal-host +0 -0
  97. package/dist/native/darwin-x64/a1_session_lock.node +0 -0
  98. package/dist/native/darwin-x64/process-guardian +0 -0
  99. package/dist/native/darwin-x64/terminal-host +0 -0
  100. package/dist/native/linux-x64/a1_session_lock.node +0 -0
  101. package/dist/native/linux-x64/process-guardian +0 -0
  102. package/dist/native/win32-x64/a1_session_lock.node +0 -0
  103. package/dist/native/win32-x64/process-guardian.exe +0 -0
@@ -1,15 +1,17 @@
1
1
  {
2
- "schema": "a1-process-guardian-artifact-v1",
3
- "protocolVersion": 1,
2
+ "schema": "a1-process-guardian-artifact-v2",
3
+ "kind": "node-addon",
4
+ "nodeApi": 9,
5
+ "protocolVersion": 2,
4
6
  "crateVersion": "0.1.0-dev",
5
7
  "platform": "darwin",
6
8
  "architecture": "arm64",
7
9
  "capability": "supported",
8
- "builtAt": "2026-10-17T13:02:46.502Z",
10
+ "builtAt": "2026-10-18T08:41:09.288Z",
9
11
  "artifact": {
10
- "filename": "process-guardian",
11
- "sha256": "47e9052599983a6bb0078ce6203ba18d71bec0b7b94e6a49019d11d46c3fbeca",
12
- "size": 410368
12
+ "filename": "process-guardian.node",
13
+ "sha256": "a87eaaffcd986b624c8b044b756446cc1bdaf4334a1775b97820542fe34f9fb7",
14
+ "size": 456080
13
15
  },
14
16
  "provenance": {
15
17
  "language": "Rust",
@@ -1,6 +1,6 @@
1
1
  Third-party notices for the A1 terminal host
2
2
 
3
- The terminal-host executable and its session-writer lock include the following components.
3
+ The terminal-host Node-API addon includes the following components.
4
4
 
5
5
  ==============================================================================
6
6
  anyhow 1.0.104
@@ -1,5 +1,7 @@
1
1
  {
2
- "schema": "a1-terminal-host-artifact-v1",
2
+ "schema": "a1-terminal-host-artifact-v2",
3
+ "kind": "node-addon",
4
+ "nodeApi": 9,
3
5
  "protocolVersion": 1,
4
6
  "generation": 1,
5
7
  "crateVersion": "0.1.0-dev",
@@ -7,21 +9,21 @@
7
9
  "architecture": "arm64",
8
10
  "target": "aarch64-apple-darwin",
9
11
  "capability": "supported",
10
- "builtAt": "2026-10-17T13:07:42.805Z",
12
+ "builtAt": "2026-10-18T08:43:27.368Z",
11
13
  "artifact": {
12
- "filename": "terminal-host",
13
- "sha256": "da3e4930eb0249992da208ac2ab8f38f882388e810a7bcc0c48152f03b245129",
14
- "size": 5337024
14
+ "filename": "terminal-host.node",
15
+ "sha256": "af7b9fee2efa8478c728465031e73fb316b6b7012d11de0364130b0acd1b6e62",
16
+ "size": 5173904
15
17
  },
16
- "sessionLock": {
17
- "filename": "a1_session_lock.node",
18
- "sha256": "44682ec58d0de84a447535fa579fa847ffbc332a446cc60fd02e52b73716a03e",
19
- "size": 577680
18
+ "entry": {
19
+ "filename": "dist/foundation/resident-tabs/host-entry.js",
20
+ "sha256": "4b1f702cc9980ffa531cf3e9963b884eaa35120d04d5c195ea3308f501d8d557",
21
+ "size": 1315
20
22
  },
21
23
  "notices": {
22
24
  "filename": "terminal-host-THIRD-PARTY-NOTICES.txt",
23
- "sha256": "fca50b98ad080b268a21267295bc8367ffdb0652b9f6a1cb26a81e35f8e58d05",
24
- "size": 540069
25
+ "sha256": "5f18fd5d1863f7282c9c3e249b9a25df1b454d26cc737b92b3360ca877e50120",
26
+ "size": 540046
25
27
  },
26
28
  "provenance": {
27
29
  "language": "Rust",
@@ -34,8 +36,7 @@
34
36
  "zigVersion": "0.15.2",
35
37
  "rustVersion": "rustc 1.99.1 (58cf8f9c3 2026-10-13)",
36
38
  "features": {
37
- "executable": [],
38
- "sessionLock": [
39
+ "addon": [
39
40
  "node-addon"
40
41
  ]
41
42
  },
@@ -1,21 +1,23 @@
1
1
  {
2
- "schema": "a1-process-guardian-artifact-v1",
3
- "protocolVersion": 1,
2
+ "schema": "a1-process-guardian-artifact-v2",
3
+ "kind": "node-addon",
4
+ "nodeApi": 9,
5
+ "protocolVersion": 2,
4
6
  "crateVersion": "0.1.0-dev",
5
7
  "platform": "darwin",
6
8
  "architecture": "x64",
7
9
  "capability": "supported",
8
- "builtAt": "2026-10-17T13:02:52.732Z",
10
+ "builtAt": "2026-10-18T08:41:16.359Z",
9
11
  "artifact": {
10
- "filename": "process-guardian",
11
- "sha256": "80ac279b688fe2642c43a40669ff35afc478fc5a8bda7f6cc2ac88a98431a4ce",
12
- "size": 394768
12
+ "filename": "process-guardian.node",
13
+ "sha256": "783a65f0de287a1c02cd5429dbe97bc8633f4cc8a7b92e3e961180b9bdcff814",
14
+ "size": 444248
13
15
  },
14
16
  "provenance": {
15
17
  "language": "Rust",
16
18
  "cargoLock": "native/process-guardian/Cargo.lock",
17
19
  "sourceRoot": "native/process-guardian",
18
20
  "signatureStatus": "ci-attestation-required",
19
- "identityCheck": "executed"
21
+ "identityCheck": "mach-o-header"
20
22
  }
21
23
  }
@@ -1,6 +1,6 @@
1
1
  Third-party notices for the A1 terminal host
2
2
 
3
- The terminal-host executable and its session-writer lock include the following components.
3
+ The terminal-host Node-API addon includes the following components.
4
4
 
5
5
  ==============================================================================
6
6
  anyhow 1.0.104
@@ -1,5 +1,7 @@
1
1
  {
2
- "schema": "a1-terminal-host-artifact-v1",
2
+ "schema": "a1-terminal-host-artifact-v2",
3
+ "kind": "node-addon",
4
+ "nodeApi": 9,
3
5
  "protocolVersion": 1,
4
6
  "generation": 1,
5
7
  "crateVersion": "0.1.0-dev",
@@ -7,21 +9,21 @@
7
9
  "architecture": "x64",
8
10
  "target": "x86_64-apple-darwin",
9
11
  "capability": "supported",
10
- "builtAt": "2026-10-17T13:11:38.751Z",
12
+ "builtAt": "2026-10-18T08:45:43.907Z",
11
13
  "artifact": {
12
- "filename": "terminal-host",
13
- "sha256": "d1b524a5bd2da42a36e40f9b2e7c27b1d0143ecff88982fea9a20ac0367472e8",
14
- "size": 5815872
14
+ "filename": "terminal-host.node",
15
+ "sha256": "1a5465ea12ecfe76d5f0c8fd5c11dee99597b4206a7e9ece01b37fc5c477c211",
16
+ "size": 5656912
15
17
  },
16
- "sessionLock": {
17
- "filename": "a1_session_lock.node",
18
- "sha256": "d1418e81a3c8f48139b90aff322d2d860eab3e033cb8d25ff7760cc9e3331555",
19
- "size": 516344
18
+ "entry": {
19
+ "filename": "dist/foundation/resident-tabs/host-entry.js",
20
+ "sha256": "4b1f702cc9980ffa531cf3e9963b884eaa35120d04d5c195ea3308f501d8d557",
21
+ "size": 1315
20
22
  },
21
23
  "notices": {
22
24
  "filename": "terminal-host-THIRD-PARTY-NOTICES.txt",
23
- "sha256": "4b96f6f99efd3091fad24422c9cfade9b40a96c6b4b9c97b38ec1de05c290991",
24
- "size": 552243
25
+ "sha256": "ebddf265d324c1393ba2f52b5fa411709ae2179bfe1aa7bb5bd84f0adc4ccef0",
26
+ "size": 552220
25
27
  },
26
28
  "provenance": {
27
29
  "language": "Rust",
@@ -34,12 +36,11 @@
34
36
  "zigVersion": "0.15.2",
35
37
  "rustVersion": "rustc 1.99.1 (58cf8f9c3 2026-10-13)",
36
38
  "features": {
37
- "executable": [],
38
- "sessionLock": [
39
+ "addon": [
39
40
  "node-addon"
40
41
  ]
41
42
  },
42
43
  "signatureStatus": "ci-attestation-required",
43
- "identityCheck": "executed"
44
+ "identityCheck": "mach-o-header"
44
45
  }
45
46
  }
@@ -1,15 +1,17 @@
1
1
  {
2
- "schema": "a1-process-guardian-artifact-v1",
3
- "protocolVersion": 1,
2
+ "schema": "a1-process-guardian-artifact-v2",
3
+ "kind": "node-addon",
4
+ "nodeApi": 9,
5
+ "protocolVersion": 2,
4
6
  "crateVersion": "0.1.0-dev",
5
7
  "platform": "linux",
6
8
  "architecture": "x64",
7
9
  "capability": "supported",
8
- "builtAt": "2026-10-17T13:02:43.567Z",
10
+ "builtAt": "2026-10-18T08:40:48.343Z",
9
11
  "artifact": {
10
- "filename": "process-guardian",
11
- "sha256": "94a96fa9d5178a1949d05c6d6cc9504f3030cd49a096cd9db20dd29860ea5884",
12
- "size": 411760
12
+ "filename": "process-guardian.node",
13
+ "sha256": "118e5954e3864672bd8482ab7edf419cb27dcdf2533720316979b7f5cc5a53a5",
14
+ "size": 491520
13
15
  },
14
16
  "provenance": {
15
17
  "language": "Rust",
@@ -1,6 +1,6 @@
1
1
  Third-party notices for the A1 terminal host
2
2
 
3
- The terminal-host executable and its session-writer lock include the following components.
3
+ The terminal-host Node-API addon includes the following components.
4
4
 
5
5
  ==============================================================================
6
6
  anyhow 1.0.104
@@ -1,5 +1,7 @@
1
1
  {
2
- "schema": "a1-terminal-host-artifact-v1",
2
+ "schema": "a1-terminal-host-artifact-v2",
3
+ "kind": "node-addon",
4
+ "nodeApi": 9,
3
5
  "protocolVersion": 1,
4
6
  "generation": 1,
5
7
  "crateVersion": "0.1.0-dev",
@@ -7,21 +9,21 @@
7
9
  "architecture": "x64",
8
10
  "target": "x86_64-unknown-linux-gnu",
9
11
  "capability": "supported",
10
- "builtAt": "2026-10-17T13:05:45.852Z",
12
+ "builtAt": "2026-10-18T08:43:45.076Z",
11
13
  "artifact": {
12
- "filename": "terminal-host",
13
- "sha256": "9be29443a6ea4ce4718a93539adf9fb38dd6fdc0beb110485cd01a1fc93e5918",
14
- "size": 6435192
14
+ "filename": "terminal-host.node",
15
+ "sha256": "843b10ab29eddf859a74a97875ba646a90917d9ec78445474895bb64f6e0772a",
16
+ "size": 6353496
15
17
  },
16
- "sessionLock": {
17
- "filename": "a1_session_lock.node",
18
- "sha256": "bae1affd0d1ce906258afbc97f762796630c73ab314846d10b6a5bd0fe63f54f",
19
- "size": 740560
18
+ "entry": {
19
+ "filename": "dist/foundation/resident-tabs/host-entry.js",
20
+ "sha256": "4b1f702cc9980ffa531cf3e9963b884eaa35120d04d5c195ea3308f501d8d557",
21
+ "size": 1315
20
22
  },
21
23
  "notices": {
22
24
  "filename": "terminal-host-THIRD-PARTY-NOTICES.txt",
23
- "sha256": "526eb656e7fb47474bcfb07cf922a95a4920d6c4130478902e3c8ea5bb805e04",
24
- "size": 577577
25
+ "sha256": "c3c1874dfdc10608f46e7576486b7eb6f43eb85460ce7b81db02e6db32af1cc2",
26
+ "size": 577554
25
27
  },
26
28
  "provenance": {
27
29
  "language": "Rust",
@@ -34,8 +36,7 @@
34
36
  "zigVersion": "0.15.2",
35
37
  "rustVersion": "rustc 1.99.1 (58cf8f9c3 2026-10-13)",
36
38
  "features": {
37
- "executable": [],
38
- "sessionLock": [
39
+ "addon": [
39
40
  "node-addon"
40
41
  ]
41
42
  },
@@ -1,15 +1,17 @@
1
1
  {
2
- "schema": "a1-process-guardian-artifact-v1",
3
- "protocolVersion": 1,
2
+ "schema": "a1-process-guardian-artifact-v2",
3
+ "kind": "node-addon",
4
+ "nodeApi": 9,
5
+ "protocolVersion": 2,
4
6
  "crateVersion": "0.1.0-dev",
5
7
  "platform": "win32",
6
8
  "architecture": "x64",
7
9
  "capability": "supported",
8
- "builtAt": "2026-10-17T13:03:20.189Z",
10
+ "builtAt": "2026-10-18T08:41:31.607Z",
9
11
  "artifact": {
10
- "filename": "process-guardian.exe",
11
- "sha256": "231de38cbd11f08c493027290c523c589d8ffbfa61d9a8e6b55c2300ed50dbad",
12
- "size": 288256
12
+ "filename": "process-guardian.node",
13
+ "sha256": "6299956800f1ab62f2e5bb4a1e4d61dbd45ce70a7711cbb9aca8f23033bdbbaf",
14
+ "size": 402432
13
15
  },
14
16
  "provenance": {
15
17
  "language": "Rust",
@@ -1,6 +1,6 @@
1
1
  Third-party notices for the A1 terminal host
2
2
 
3
- The terminal-host executable and its session-writer lock include the following components.
3
+ The terminal-host Node-API addon includes the following components.
4
4
 
5
5
  ==============================================================================
6
6
  anyhow 1.0.104
@@ -1,5 +1,7 @@
1
1
  {
2
- "schema": "a1-terminal-host-artifact-v1",
2
+ "schema": "a1-terminal-host-artifact-v2",
3
+ "kind": "node-addon",
4
+ "nodeApi": 9,
3
5
  "protocolVersion": 1,
4
6
  "generation": 1,
5
7
  "crateVersion": "0.1.0-dev",
@@ -7,21 +9,21 @@
7
9
  "architecture": "x64",
8
10
  "target": "x86_64-pc-windows-msvc",
9
11
  "capability": "supported",
10
- "builtAt": "2026-10-17T13:09:09.866Z",
12
+ "builtAt": "2026-10-18T08:44:54.428Z",
11
13
  "artifact": {
12
- "filename": "terminal-host.exe",
13
- "sha256": "0b6770b00388985dc7e65e6f8fffc93eec60f85621462e388c8b25d30a0bf3c8",
14
- "size": 5740544
14
+ "filename": "terminal-host.node",
15
+ "sha256": "de82227898a90a6ec6bda0c8b503148388d3769ef4ab7f1176e56c8472b76232",
16
+ "size": 5617664
15
17
  },
16
- "sessionLock": {
17
- "filename": "a1_session_lock.node",
18
- "sha256": "a4f2407b6166aa5e12b07548c286acf2e9a744a1f58fef2bfcab2cddbad1dca1",
19
- "size": 1996288
18
+ "entry": {
19
+ "filename": "dist/foundation/resident-tabs/host-entry.js",
20
+ "sha256": "4b1f702cc9980ffa531cf3e9963b884eaa35120d04d5c195ea3308f501d8d557",
21
+ "size": 1315
20
22
  },
21
23
  "notices": {
22
24
  "filename": "terminal-host-THIRD-PARTY-NOTICES.txt",
23
- "sha256": "9e80136b62106ac672162dacbd0d6eb2a94b3318e597e40dfcf70c4920c34b00",
24
- "size": 555140
25
+ "sha256": "127b8634dc7f47d9b8c250ff281e028daeac7729290da4f41cf1a1eeafdb76ca",
26
+ "size": 555117
25
27
  },
26
28
  "provenance": {
27
29
  "language": "Rust",
@@ -34,8 +36,7 @@
34
36
  "zigVersion": "0.15.2",
35
37
  "rustVersion": "rustc 1.99.1 (58cf8f9c3 2026-10-13)",
36
38
  "features": {
37
- "executable": [],
38
- "sessionLock": [
39
+ "addon": [
39
40
  "node-addon"
40
41
  ]
41
42
  },
@@ -5,7 +5,7 @@ declare const ENDPOINT_KEYS: readonly ["windowsPipeStem", "unixSocketFilename",
5
5
  declare const MANIFEST_KEYS: readonly ["releaseFilename", "packageFilename"];
6
6
  declare const PROTOCOL_KEYS: readonly ["namespace", "controlEnvelope", "supervisorSchema", "nativeHostSchema", "structuredAgentSchema", "controlStoreSchema", "promptHistorySchema", "releaseCohortSchema", "updateJournalSchema"];
7
7
  declare const EVIDENCE_KEYS: readonly ["nativeSpikeSchema", "terminalProvenanceSchema", "terminalProofSchema", "stableReleaseSchema", "previewReleaseSchema", "releaseCertificationSchema", "previewPlatformVerdictSchema", "piSourceLedgerSchema", "piComponentParitySchema", "piEventFrameParitySchema", "startupTraceSchema", "dependencyLayerSchema", "dependencyLayerCertificationSchema", "runtimePayloadSchema"];
8
- declare const ARTIFACT_KEYS: readonly ["cliEntry", "supervisorEntry", "guardianEntry", "uiEntry", "nativeExecutable", "nativeCrate", "processGuardianExecutable", "releaseTarballStem", "diagnosticStem"];
8
+ declare const ARTIFACT_KEYS: readonly ["cliEntry", "supervisorEntry", "guardianEntry", "uiEntry", "terminalHostAddon", "terminalHostEntry", "nativeCrate", "processGuardianAddon", "releaseTarballStem", "diagnosticStem"];
9
9
  type StringRecord<Keys extends readonly string[]> = {
10
10
  readonly [Key in Keys[number]]: string;
11
11
  };
@@ -9,7 +9,7 @@ const ENDPOINT_KEYS = ["windowsPipeStem", "unixSocketFilename", "metadataFilenam
9
9
  const MANIFEST_KEYS = ["releaseFilename", "packageFilename"];
10
10
  const PROTOCOL_KEYS = ["namespace", "controlEnvelope", "supervisorSchema", "nativeHostSchema", "structuredAgentSchema", "controlStoreSchema", "promptHistorySchema", "releaseCohortSchema", "updateJournalSchema"];
11
11
  const EVIDENCE_KEYS = ["nativeSpikeSchema", "terminalProvenanceSchema", "terminalProofSchema", "stableReleaseSchema", "previewReleaseSchema", "releaseCertificationSchema", "previewPlatformVerdictSchema", "piSourceLedgerSchema", "piComponentParitySchema", "piEventFrameParitySchema", "startupTraceSchema", "dependencyLayerSchema", "dependencyLayerCertificationSchema", "runtimePayloadSchema"];
12
- const ARTIFACT_KEYS = ["cliEntry", "supervisorEntry", "guardianEntry", "uiEntry", "nativeExecutable", "nativeCrate", "processGuardianExecutable", "releaseTarballStem", "diagnosticStem"];
12
+ const ARTIFACT_KEYS = ["cliEntry", "supervisorEntry", "guardianEntry", "uiEntry", "terminalHostAddon", "terminalHostEntry", "nativeCrate", "processGuardianAddon", "releaseTarballStem", "diagnosticStem"];
13
13
  const ROOT_KEYS = ["schema", "displayName", "commandName", "packageName", "filesystem", "environment", "state", "endpoint", "manifest", "protocol", "evidence", "artifacts"];
14
14
  export function validateProductIdentity(value) {
15
15
  const root = exactObject(value, ROOT_KEYS, "product identity");
@@ -87,9 +87,10 @@
87
87
  "supervisorEntry": "bin/supervisor.js",
88
88
  "guardianEntry": "bin/guardian.js",
89
89
  "uiEntry": "bin/ui.js",
90
- "nativeExecutable": "terminal-host",
90
+ "terminalHostAddon": "terminal-host",
91
+ "terminalHostEntry": "host-entry",
91
92
  "nativeCrate": "terminal-host",
92
- "processGuardianExecutable": "process-guardian",
93
+ "processGuardianAddon": "process-guardian",
93
94
  "releaseTarballStem": "timurproko-a1",
94
95
  "diagnosticStem": "a1"
95
96
  }
@@ -8,6 +8,7 @@
8
8
  "bin/ui.js",
9
9
  "bin/update-recovery.js",
10
10
  "bin/warmup.js",
11
+ "dist/foundation/launch-guardian/exit-watcher.js",
11
12
  "dist/foundation/startup/startup-descriptor.js",
12
13
  "dist/integrations/pi/startup-public.js"
13
14
  ],
@@ -176,18 +176,6 @@ export declare const OWNED_SETTING_DECLARATIONS: Readonly<{
176
176
  defaultValue: 8;
177
177
  allowedValues: readonly [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16];
178
178
  }>;
179
- readonly tabsMax: Readonly<{
180
- id: "tabsMax";
181
- label: "Maximum tabs";
182
- section: Readonly<{
183
- id: "tabs";
184
- title: "Tabs";
185
- }>;
186
- description: "Maximum resident A1 tabs kept in the shared strip.";
187
- application: "live";
188
- defaultValue: 10;
189
- allowedValues: readonly number[];
190
- }>;
191
179
  readonly tabsAutoName: Readonly<{
192
180
  id: "tabsAutoName";
193
181
  label: "Auto name";
@@ -10,7 +10,6 @@ const APPEARANCE_SECTION = Object.freeze({ id: "appearance", title: "Appearance"
10
10
  const SCROLL_SECTION = Object.freeze({ id: "scroll", title: "Scroll" });
11
11
  const AGENT_SECTION = Object.freeze({ id: "agent", title: "Agent" });
12
12
  const TABS_SECTION = Object.freeze({ id: "tabs", title: "Tabs" });
13
- const TABS_MAX_CHOICES = Object.freeze(Array.from({ length: 50 }, (_, index) => index + 1));
14
13
  /**
15
14
  * Every A1 setting, keyed by its id. The table is the one declaration: ids, defaults, and allowed
16
15
  * values are read from it, and `OwnedSettingValueOf` derives each getter's type from it.
@@ -137,15 +136,6 @@ export const OWNED_SETTING_DECLARATIONS = Object.freeze({
137
136
  defaultValue: 8,
138
137
  allowedValues: Object.freeze([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]),
139
138
  }),
140
- tabsMax: Object.freeze({
141
- id: "tabsMax",
142
- label: "Maximum tabs",
143
- section: TABS_SECTION,
144
- description: "Maximum resident A1 tabs kept in the shared strip.",
145
- application: "live",
146
- defaultValue: 10,
147
- allowedValues: TABS_MAX_CHOICES,
148
- }),
149
139
  tabsAutoName: Object.freeze({
150
140
  id: "tabsAutoName",
151
141
  label: "Auto name",
@@ -7,23 +7,24 @@ Every interactive command uses this profile-neutral lifecycle path:
7
7
  ```text
8
8
  mutable a1 entry
9
9
  -> verified immutable release
10
- -> Node launch guardian and authenticated launch-instance registration
11
- -> native process guardian and per-instance containment
12
- -> profile-aware owned-UI runtime selection
10
+ -> Node launch guardian loading the verified process-guardian addon
11
+ -> addon-held per-instance containment and profile-aware runtime selection
13
12
  -> owned Pi-backed composition, with A1 surfaces enabled only for bare a1
14
13
  ```
15
14
 
16
15
  Launch-instance ownership is plural. The supervisor tracks any number of independently authenticated `a1` and `a1 pi` instances and never uses one product-wide foreground mutex. Closing one instance closes only its verified process tree. Persisted rows alone do not prove liveness, and uncertainty never authorizes terminating an unrelated process.
17
16
 
18
- Neither guardian reads ordinary terminal input, parses or relays runtime output, renders cells, infers frames, synthesizes terminal responses, or emits display control. Both profiles use the same owned rendering and input pipeline. Bare `a1` exposes A1-owned surfaces; `a1 pi` withholds those surfaces and uses Pi's ordinary profile root. The private guardian boundary carries only bounded identity, readiness, stop, and outcome data.
17
+ The launch guardian and process-guardian addon do not read ordinary terminal input, parse or relay runtime output, render cells, infer frames, or synthesize terminal responses. Their only terminal output is the bounded reset and sanitized armed exit notice after runtime failure. Both profiles use the same owned rendering and input pipeline. Bare `a1` exposes A1-owned surfaces; `a1 pi` withholds those surfaces and uses Pi's ordinary profile root. The containment boundary carries only bounded identity, readiness, stop, and outcome data.
18
+
19
+ A detached Node exit watcher sits outside the launch guardian's containment. It waits for the guardian, performs bounded Unix process-group cleanup, and may deliver the same claimed exit notice. A kill aimed at every Node runtime also kills this watcher; the accepted loss of the notice and Unix fallback cleanup in that case is documented in [`process-guardian-provenance.md`](process-guardian-provenance.md), and A1 starts no native executable to close that gap.
19
20
 
20
21
  The owned Pi-backed surface is not an arbitrary-CLI terminal multiplexer. A feature that requires resident arbitrary CLI sessions, internal tabs, terminal-state reconnection, or A1-authoritative scrollback must introduce and certify the separate composed-terminal authority rather than reactivating the retired transparent attachment path.
21
22
 
22
23
  ## Current module responsibilities
23
24
 
24
25
  - `lifecycle`: dependency-free launch-instance, process identity, state transition, outcome, and control-command contracts.
25
- - `process-containment`: artifact verification, OS-verifiable process inspection, containment adapters, and bounded graceful/forced cleanup; it owns no terminal content.
26
- - `launch-guardian`: one profile-neutral instance coordinator above runtime selection.
26
+ - `process-containment`: process-guardian addon loading and artifact verification, OS-verifiable process inspection, in-process containment adapters, and bounded graceful/forced cleanup; it owns no terminal content.
27
+ - `launch-guardian`: one profile-neutral Node instance coordinator above runtime selection, plus the fixed Node exit-watcher entry used only for owner-death cleanup and the armed notice.
27
28
  - `protocol`: additive control handshake, bounded line framing, authenticated launch-instance commands, typed stop intent, snapshots, and command results.
28
29
  - `launch`: resolves the effective profile home and the history-specific data root. Composition uses its public path resolver to select `~/.a1/data` for history unless `A1_DATA_DIR` is explicit; global control/release/runtime/cache paths stay unchanged.
29
30
  - `prompt-history`: narrowly typed user-input retention in separate profile-owned databases under `~/.a1/data/history` (or `<A1_DATA_DIR>/history`), with bounded worker queues and no supervisor/control-store payloads. It receives a resolved root rather than importing launch-feature internals; it never probes, imports, or deletes the former platform-default history. The editor's owned history state machine remains inside the Pi component boundary; the session UI only coordinates snapshots and classified submissions.
@@ -32,14 +33,14 @@ The owned Pi-backed surface is not an arbitrary-CLI terminal multiplexer. A feat
32
33
  - `supervisor`: endpoint identity, plural cohort ownership, per-instance reconciliation, and aggregate release shutdown coordination. It owns no terminal surface.
33
34
  - `pi-engine-adapter`, `pi-component-adapter`, and `pi-tui-runtime-adapter`: isolate pinned Pi engine and presentation knowledge behind neutral contracts; product features do not import them directly. Inside the engine adapter, one process-level engine host owns what is process-wide (the HTTP dispatcher, the theme singletons, the one-time changelog and package-update announcements, the startup trace) and is the only place sessions are created, so every session id is unique per process.
34
35
  - `session-shell` (`src/app/session-shell`): the application layer that composes the feature owners, the UI foundations, and the three Pi adapters into the interactive session; only composition imports it. Its render root assembles semantic document and dock rows, while its focused viewport controller owns follow state, pointer routing, selection, and interaction timers. Owned-app route lifecycle belongs to the neutral `ui-apps` owner and is only hosted by the session shell.
35
- - release/update/bootstrap: package-derived immutable release identity, process-guardian integrity, cohort selection, durable update transactions, rollback, and dependency-light command entry. After an unsuccessful bare-A1 child exit, the bootstrap restores owned terminal modes; neither guardian emits terminal controls.
36
+ - release/update/bootstrap: package-derived immutable release identity, native-addon integrity, cohort selection, durable update transactions, rollback, and dependency-light command entry. Before certified fast-path reuse it checks every recorded product file is present; a missing or altered file is replaced only from the matching installed package when its size and digest reproduce the approved release, followed by full verification. Dependency layers keep their separate verification and repair policy. After an unsuccessful bare-A1 child exit, the launch owner or its Node watcher restores owned terminal modes and emits only the armed bounded notice.
36
37
  - `terminal-cleanup`: bounded, idempotent emergency restoration and fatal-exit diagnostics for an explicitly owned terminal. It does not inspect commands, relay terminal input/output, or emulate terminal state. The owned UI installs its fatal boundary before terminal activation; packaged bootstrap and checkout launch provide the surviving-owner fallback. Fatal records retain at most ten 16 KiB records with trusted classifications and code locations, never prompts, attachments, raw input, credentials, or arbitrary exception messages.
37
38
 
38
39
  ## Dependency direction
39
40
 
40
41
  Terminal boundaries are application-agnostic. They may not select behavior from executable names, arguments, CLI-specific environment variables, or visible text. Production code may not import private Pi distribution APIs or use a Pi-specific terminal workaround.
41
42
 
42
- The JavaScript product path has no PTY or terminal-emulator dependency. Reintroducing `node-pty`, xterm state, custom input encoders, mode/query trackers, cadence-derived frame inference, or renderer/projection code requires an approved capability change and cannot become a second terminal authority. The Rust process guardian is a lifecycle-only native boundary and is independent from the held composed terminal host.
43
+ The JavaScript product path has no PTY or terminal-emulator dependency. Reintroducing `node-pty`, xterm state, custom input encoders, mode/query trackers, cadence-derived frame inference, or renderer/projection code requires an approved capability change and cannot become a second terminal authority. The Rust process guardian is a lifecycle-only Node-API addon loaded by the launch guardian and is independent from the terminal-host Node-API addon. No A1-built executable is part of the production process surface.
43
44
 
44
45
  `scripts/governance/check-architecture.mjs` enforces the structural parts of these boundaries. Cross-cutting rationale belongs here; implementation history belongs in Git and archived OpenSpec changes.
45
46
 
@@ -61,7 +62,7 @@ Default future agents and composed hosts are children of the originating bare-`a
61
62
 
62
63
  The structured-agent runtime uses a versioned adapter hello and feature negotiation before readiness. Runtime state must use typed events, commands, snapshots, cancellation, and recovery evidence. It must not infer structured semantics from terminal text, terminal timing, or visual content and must not own pseudoterminals or renderer state.
63
64
 
64
- The terminal-host protocol boundary may carry only bounded typed control and semantic lifecycle messages. Pseudoterminal bytes, per-event child input, rendered cells, cell grids, framebuffers, and screen buffers are forbidden across it. Console host executables and packaging live outside the current JavaScript production owners and remain unavailable until the isolated in-terminal proof passes; replacing them with a lightweight custom parser/renderer is forbidden. A desktop-native window and GPU application shell are postponed and are not required for the terminal-hosted product.
65
+ The JavaScript-to-native terminal-host boundary carries only the fixed role arguments, host command, return code, session-lock calls, and typed semantic bridge data. `host-entry.js` does not touch Node's stdin/stdout streams; pseudoterminal bytes, per-event child input, rendered cells, cell grids, framebuffers, and screen buffers remain inside the addon's native roles and their bounded native IPC. The verified addon and fixed entry are the packaged production host; no console host executable exists. Replacing libghostty-vt with a lightweight custom parser/renderer is forbidden. A desktop-native window and GPU application shell are postponed and are not required for the terminal-hosted product.
65
66
 
66
67
  Resource queues, retained state, evidence, logs, and diagnostics follow `docs/architecture/resource-and-data-policy.md`. Terminal content and authentication material are never control-store records. Unknown data is potentially sensitive by default and must be rejected or redacted before persistence.
67
68
 
@@ -1,29 +1,35 @@
1
1
  # Process guardian provenance
2
2
 
3
- A1 launch-instance containment uses a standalone native executable named `process-guardian`. The approved implementation is a separate Rust crate at `native/process-guardian`; it is not a Node-API addon and does not reuse or resume the held composed terminal-host implementation.
3
+ A1 launch-instance containment uses the Node-API 9 addon `process-guardian.node`. The approved implementation is the separate Rust crate at `native/process-guardian`; it produces no product executable. The foreground Node launch guardian loads the addon and holds the containment boundary in-process.
4
4
 
5
5
  ## Boundary
6
6
 
7
- The executable owns platform process containment and launches one immutable `a1-ui` runtime with inherited terminal handles. It does not create a PTY, read ordinary terminal input, capture or parse runtime output, render, or relay terminal bytes. Its private parent/child coordination is restricted to bounded lifecycle and identity data.
7
+ The addon owns platform process containment and launches one immutable A1 UI runtime with inherited terminal handles. It also provides native process-start inspection, terminal-mode capture and restoration, exit-notice delivery, and the bounded process-wait and process-group operations used by the exit watcher. It does not create a PTY, read ordinary terminal input, capture or parse runtime output, render, or relay terminal bytes.
8
8
 
9
- On Windows it uses `windows-sys 0.61.2` to create a Job Object, enables `JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE`, assigns the runtime before resuming it, denies silent breakaway by never enabling breakaway limits, monitors the verified Node parent process, and terminates remaining job members after root or parent exit.
9
+ On Windows it uses `windows-sys 0.61.2` to create a Job Object, enables `JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE`, and creates the runtime directly in that job through `PROC_THREAD_ATTRIBUTE_JOB_LIST`. The runtime is a job member from its first instruction; the former suspended-create, assign, and resume sequence is gone. Ordinary jobs do not enable breakaway, and closing the addon-held job handle terminates remaining members.
10
10
 
11
- On Linux and macOS it creates a dedicated POSIX process group before exec, transfers foreground-terminal ownership only when a terminal is present, monitors the verified parent, applies bounded TERM/KILL cleanup to that group, and restores the prior foreground group. Linux derives process start identity from procfs. macOS derives it from the native `proc_pidinfo(PROC_PIDTBSDINFO)` start timestamp; PID liveness alone is never treated as identity.
11
+ On Linux and macOS it uses `posix_spawn` to create a dedicated process group, transfers foreground-terminal ownership only when a terminal is present, applies bounded TERM/KILL cleanup to that group, and restores the prior foreground group. Linux derives process start identity from procfs. macOS derives it from `proc_pidinfo(PROC_PIDTBSDINFO)`; PID liveness alone is never treated as identity.
12
+
13
+ ## Exit watcher
14
+
15
+ After the contained runtime starts, the launch guardian starts `dist/foundation/launch-guardian/exit-watcher.js` in another Node runtime outside the guardian's containment. The watcher waits for the guardian, performs bounded Unix process-group cleanup when needed, and claims and delivers the armed exit notice with the captured terminal modes. On Windows the addon creates that Node process outside both the runtime job and the guardian's inherited job; on Unix it remains in the terminal session so terminal hang-up reaches it naturally. The guardian itself delivers the notice on ordinary completion, and claim-by-rename ensures only one owner can print it.
16
+
17
+ There is one accepted gap: a machine-wide kill aimed at every Node process, such as `taskkill /IM node.exe` or `pkill node`, kills the watcher together with the guardian and runtime. No exit notice is then printed and, on Unix, non-Node descendants left in the runtime process group are not signalled by the watcher. A1 does not work around that case by starting an A1-built executable. Terminal closure, `Ctrl+Break`, guardian failure, runtime termination, and a kill aimed only at the guardian remain covered.
12
18
 
13
19
  ## Artifact contract
14
20
 
15
- Release builds place the exact executable at:
21
+ Release builds place the addon at:
16
22
 
17
23
  ```text
18
- dist/native/win32-x64/process-guardian.exe
19
- dist/native/linux-x64/process-guardian
20
- dist/native/darwin-x64/process-guardian
21
- dist/native/darwin-arm64/process-guardian
24
+ dist/native/win32-x64/process-guardian.node
25
+ dist/native/linux-x64/process-guardian.node
26
+ dist/native/darwin-x64/process-guardian.node
27
+ dist/native/darwin-arm64/process-guardian.node
22
28
  ```
23
29
 
24
- The publication `guardians` job builds them on `windows-2025`, `ubuntu-24.04`, and `macos-15` (arm64); the macOS arm64 job also cross-compiles the x64 guardian with `--target x86_64-apple-darwin`, and its manifest records whether the identity was observed by execution or only from the Mach-O header.
30
+ The publication `guardians` job builds them on `windows-2025`, `ubuntu-24.04`, and `macos-15` arm64; the macOS arm64 job also cross-compiles x64 with `--target x86_64-apple-darwin`. A native build is identified by loading the addon into Node and reading `version()`. When the producing runner cannot load the cross-compiled x64 addon, its manifest records only the observed Mach-O architecture.
25
31
 
26
- Each supported artifact must be named in the release integrity manifest with target triple, crate version, guardian protocol version, SHA-256, byte size, build provenance, and signature/attestation status. The build marks a platform supported only after its native containment integration runs on that platform. A missing, altered, incompatible, unsupported, or wrong-platform artifact is a concise containment launch error; A1 never silently falls back to PID-only cleanup.
32
+ Each `a1-process-guardian-artifact-v2` manifest records `kind: "node-addon"`, Node-API 9, target platform and architecture, crate and protocol versions, SHA-256, byte size, build provenance, and signature/attestation status. A supported artifact is verified before loading. A missing, altered, incompatible, unsupported, or wrong-platform artifact is a concise containment launch error; A1 never silently falls back to PID-only cleanup. If a certified immutable release file disappears or changes, bootstrap restores it only from a matching installed package whose source bytes reproduce the certified size and digest, then verifies the complete release again.
27
33
 
28
34
  ## Licensing
29
35