aegisone 1.0.8 → 1.0.10

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 (220) hide show
  1. package/README.md +2 -2
  2. package/bin/aegis.js +5 -0
  3. package/install.ps1 +5 -0
  4. package/install.sh +5 -0
  5. package/package.json +1 -1
  6. package/scripts/bump.mjs +5 -0
  7. package/scripts/bundle.js +5 -0
  8. package/scripts/predist.mjs +7 -0
  9. package/src/child.js +5 -0
  10. package/src/dispatch.js +5 -0
  11. package/src/doctor.js +5 -0
  12. package/src/host.js +5 -0
  13. package/src/permissions.js +5 -0
  14. package/src/probes.js +5 -0
  15. package/src/release.js +5 -0
  16. package/vendor/cli/bin/aegiscode.js +137 -0
  17. package/vendor/cli/package.json +1 -1
  18. package/vendor/cli/scripts/check.mjs +5 -0
  19. package/vendor/cli/scripts/demo.mjs +5 -0
  20. package/vendor/cli/scripts/predist.mjs +29 -2
  21. package/vendor/cli/scripts/runtests.mjs +5 -0
  22. package/vendor/cli/scripts/seal-gate.mjs +76 -0
  23. package/vendor/cli/src/agents.js +5 -0
  24. package/vendor/cli/src/app.js +5 -0
  25. package/vendor/cli/src/art.js +5 -0
  26. package/vendor/cli/src/autonomous.js +23 -0
  27. package/vendor/cli/src/caps.js +5 -0
  28. package/vendor/cli/src/chatflow.js +109 -31
  29. package/vendor/cli/src/checkpoint.js +5 -0
  30. package/vendor/cli/src/clipboard.js +5 -0
  31. package/vendor/cli/src/cloudsync.js +5 -0
  32. package/vendor/cli/src/commands.js +326 -14
  33. package/vendor/cli/src/config.js +5 -0
  34. package/vendor/cli/src/credentials.js +5 -0
  35. package/vendor/cli/src/deps.js +5 -0
  36. package/vendor/cli/src/devrun.js +5 -0
  37. package/vendor/cli/src/diff.js +5 -0
  38. package/vendor/cli/src/diffview.js +5 -0
  39. package/vendor/cli/src/engine.js +5 -0
  40. package/vendor/cli/src/entitlement.js +5 -0
  41. package/vendor/cli/src/events.js +15 -0
  42. package/vendor/cli/src/export.js +5 -0
  43. package/vendor/cli/src/fingerprint.js +5 -0
  44. package/vendor/cli/src/format.js +5 -0
  45. package/vendor/cli/src/fuzzy.js +5 -0
  46. package/vendor/cli/src/gate.js +12 -0
  47. package/vendor/cli/src/history.js +5 -0
  48. package/vendor/cli/src/init.js +5 -0
  49. package/vendor/cli/src/input.js +5 -0
  50. package/vendor/cli/src/keys.js +34 -2
  51. package/vendor/cli/src/limits.js +192 -0
  52. package/vendor/cli/src/markdown.js +5 -0
  53. package/vendor/cli/src/mcp.js +13 -0
  54. package/vendor/cli/src/models.js +5 -0
  55. package/vendor/cli/src/naming.js +5 -0
  56. package/vendor/cli/src/overlays.js +12 -2
  57. package/vendor/cli/src/panels.js +5 -0
  58. package/vendor/cli/src/permissions.js +56 -1
  59. package/vendor/cli/src/ping.js +5 -0
  60. package/vendor/cli/src/presence.js +5 -0
  61. package/vendor/cli/src/provenance.js +238 -0
  62. package/vendor/cli/src/provenance.lock.json +36 -0
  63. package/vendor/cli/src/render.js +5 -0
  64. package/vendor/cli/src/screen.js +5 -0
  65. package/vendor/cli/src/screens.js +53 -37
  66. package/vendor/cli/src/secret.js +5 -0
  67. package/vendor/cli/src/securefs.js +5 -0
  68. package/vendor/cli/src/settings.js +5 -0
  69. package/vendor/cli/src/shared.js +5 -0
  70. package/vendor/cli/src/sharedpaths.js +5 -0
  71. package/vendor/cli/src/signup.js +5 -0
  72. package/vendor/cli/src/summarize.js +5 -0
  73. package/vendor/cli/src/sysdiag.js +587 -0
  74. package/vendor/cli/src/system.js +5 -0
  75. package/vendor/cli/src/theme.js +5 -0
  76. package/vendor/cli/src/title.js +5 -0
  77. package/vendor/cli/src/todos.js +5 -0
  78. package/vendor/cli/src/tokens.js +5 -0
  79. package/vendor/cli/src/topup.js +5 -0
  80. package/vendor/cli/src/update.js +5 -0
  81. package/vendor/cli/vendor/client/aegis.js +5 -0
  82. package/vendor/cli/vendor/client/attest.js +5 -0
  83. package/vendor/cli/vendor/client/authorship-key.js +5 -0
  84. package/vendor/cli/vendor/client/auto-provision.js +5 -0
  85. package/vendor/cli/vendor/client/brain-catalog.js +5 -0
  86. package/vendor/cli/vendor/client/byok-catalog.js +5 -0
  87. package/vendor/cli/vendor/client/credentials.js +5 -0
  88. package/vendor/cli/vendor/client/device-fingerprint.js +5 -0
  89. package/vendor/cli/vendor/client/env-file.js +5 -0
  90. package/vendor/cli/vendor/client/fingerprint.js +5 -0
  91. package/vendor/cli/vendor/client/foreign-memory.js +5 -0
  92. package/vendor/cli/vendor/client/hooks.js +5 -0
  93. package/vendor/cli/vendor/client/model-discovery.js +332 -0
  94. package/vendor/cli/vendor/client/platform.js +5 -0
  95. package/vendor/cli/vendor/client/prefs.js +5 -0
  96. package/vendor/cli/vendor/client/presence-constants.js +5 -0
  97. package/vendor/cli/vendor/client/presence.js +5 -0
  98. package/vendor/cli/vendor/client/record-vault.js +5 -0
  99. package/vendor/cli/vendor/client/session-store.js +5 -0
  100. package/vendor/cli/vendor/client/topup.js +5 -0
  101. package/vendor/cli/vendor/client/touch.js +5 -0
  102. package/vendor/cli/vendor/client/update.js +5 -0
  103. package/vendor/cli/vendor/client/user-models.js +5 -0
  104. package/vendor/cli/vendor/desktop/lib/local/aegis-seal.mjs +5 -0
  105. package/vendor/cli/vendor/desktop/lib/local/agents.js +5 -0
  106. package/vendor/cli/vendor/desktop/lib/local/autonomous.js +5 -0
  107. package/vendor/cli/vendor/desktop/lib/local/context.js +5 -0
  108. package/vendor/cli/vendor/desktop/lib/local/covenant.js +5 -0
  109. package/vendor/cli/vendor/desktop/lib/local/engine.js +129 -0
  110. package/vendor/cli/vendor/desktop/lib/local/entitlement.js +5 -0
  111. package/vendor/cli/vendor/desktop/lib/local/git-scope.js +5 -0
  112. package/vendor/cli/vendor/desktop/lib/local/local.js +5 -0
  113. package/vendor/cli/vendor/desktop/lib/local/prompt.js +5 -0
  114. package/vendor/cli/vendor/desktop/lib/local/queue.js +5 -0
  115. package/vendor/cli/vendor/desktop/lib/local/session-rounds.js +5 -0
  116. package/vendor/cli/vendor/desktop/lib/local/shell.js +88 -9
  117. package/vendor/cli/vendor/desktop/lib/local/tools.js +13 -6
  118. package/vendor/cli/vendor/desktop/lib/local/turn-guard.js +5 -0
  119. package/vendor/cli/vendor/desktop/lib/local/worktree-lock.js +5 -0
  120. package/vendor/cli/vendor/desktop/lib/settings.js +5 -0
  121. package/vendor/cli/vendor/desktop/renderer/usage.js +5 -0
  122. package/vendor/cli/vendor/mcp/server.js +5 -0
  123. package/vendor/cli/vendor/mcp/tools.js +5 -0
  124. package/vendor/cli/vendor/tools/agent-gate.mjs +23 -0
  125. package/vendor/desktop/bin/aegis.js +5 -0
  126. package/vendor/desktop/lib/auto.js +5 -0
  127. package/vendor/desktop/lib/avatar/companion.js +5 -0
  128. package/vendor/desktop/lib/avatar/cosmetics.js +5 -0
  129. package/vendor/desktop/lib/avatar/events.js +5 -0
  130. package/vendor/desktop/lib/avatar/holder-turn.js +5 -0
  131. package/vendor/desktop/lib/avatar/holders.js +5 -0
  132. package/vendor/desktop/lib/avatar/identity.js +5 -0
  133. package/vendor/desktop/lib/avatar/level.js +5 -0
  134. package/vendor/desktop/lib/avatar/mirror.js +5 -0
  135. package/vendor/desktop/lib/avatar/persona.js +5 -0
  136. package/vendor/desktop/lib/avatar/profile.js +5 -0
  137. package/vendor/desktop/lib/avatar/register.js +5 -0
  138. package/vendor/desktop/lib/avatar/store.js +5 -0
  139. package/vendor/desktop/lib/avatar/tiers.js +5 -0
  140. package/vendor/desktop/lib/avatar/transfer.js +5 -0
  141. package/vendor/desktop/lib/avatar/turn.js +5 -0
  142. package/vendor/desktop/lib/avatar/voice.js +5 -0
  143. package/vendor/desktop/lib/avatar/xp.js +5 -0
  144. package/vendor/desktop/lib/deep-link.js +5 -0
  145. package/vendor/desktop/lib/fingerprint.js +5 -0
  146. package/vendor/desktop/lib/local/aegis-seal.mjs +5 -0
  147. package/vendor/desktop/lib/local/agents.js +5 -0
  148. package/vendor/desktop/lib/local/autonomous.js +5 -0
  149. package/vendor/desktop/lib/local/context.js +5 -0
  150. package/vendor/desktop/lib/local/covenant.js +5 -0
  151. package/vendor/desktop/lib/local/engine.js +129 -0
  152. package/vendor/desktop/lib/local/entitlement.js +5 -0
  153. package/vendor/desktop/lib/local/git-scope.js +5 -0
  154. package/vendor/desktop/lib/local/local.js +5 -0
  155. package/vendor/desktop/lib/local/prompt.js +5 -0
  156. package/vendor/desktop/lib/local/queue.js +5 -0
  157. package/vendor/desktop/lib/local/session-rounds.js +5 -0
  158. package/vendor/desktop/lib/local/shell.js +88 -9
  159. package/vendor/desktop/lib/local/telemetry.js +5 -0
  160. package/vendor/desktop/lib/local/tools.js +13 -6
  161. package/vendor/desktop/lib/local/turn-guard.js +5 -0
  162. package/vendor/desktop/lib/local/worktree-lock.js +5 -0
  163. package/vendor/desktop/lib/provider-key-mirror.js +5 -0
  164. package/vendor/desktop/lib/quick-launcher.js +5 -0
  165. package/vendor/desktop/lib/settings.js +5 -0
  166. package/vendor/desktop/lib/sync/memory-queue.js +5 -0
  167. package/vendor/desktop/lib/sync/persist-gate.js +5 -0
  168. package/vendor/desktop/lib/sync/sessions.js +5 -0
  169. package/vendor/desktop/lib/window-state.js +5 -0
  170. package/vendor/desktop/main.js +34 -0
  171. package/vendor/desktop/package.json +1 -1
  172. package/vendor/desktop/preload.js +14 -0
  173. package/vendor/desktop/renderer/app.js +111 -0
  174. package/vendor/desktop/renderer/avatar/assemble.js +5 -0
  175. package/vendor/desktop/renderer/avatar/avatar.css +7 -0
  176. package/vendor/desktop/renderer/avatar/avatar.js +5 -0
  177. package/vendor/desktop/renderer/avatar/cards.js +5 -0
  178. package/vendor/desktop/renderer/avatar/hud.js +5 -0
  179. package/vendor/desktop/renderer/avatar/machine.js +5 -0
  180. package/vendor/desktop/renderer/avatar/pane.js +5 -0
  181. package/vendor/desktop/renderer/avatar/parts.js +5 -0
  182. package/vendor/desktop/renderer/budget.js +5 -0
  183. package/vendor/desktop/renderer/diff.js +5 -0
  184. package/vendor/desktop/renderer/diffview.js +5 -0
  185. package/vendor/desktop/renderer/fingerprint.css +7 -0
  186. package/vendor/desktop/renderer/fingerprint.js +5 -0
  187. package/vendor/desktop/renderer/fonts/fonts.css +7 -0
  188. package/vendor/desktop/renderer/index.html +7 -0
  189. package/vendor/desktop/renderer/markdown.js +5 -0
  190. package/vendor/desktop/renderer/quick.css +7 -0
  191. package/vendor/desktop/renderer/quick.html +7 -0
  192. package/vendor/desktop/renderer/quick.js +5 -0
  193. package/vendor/desktop/renderer/stream-policy.js +5 -0
  194. package/vendor/desktop/renderer/style.css +7 -0
  195. package/vendor/desktop/renderer/transcript-view.js +5 -0
  196. package/vendor/desktop/renderer/usage.js +5 -0
  197. package/vendor/desktop/vendor/aegis.js +5 -0
  198. package/vendor/desktop/vendor/agent-gate.mjs +23 -0
  199. package/vendor/desktop/vendor/attest.js +5 -0
  200. package/vendor/desktop/vendor/authorship-key.js +5 -0
  201. package/vendor/desktop/vendor/auto-provision.js +5 -0
  202. package/vendor/desktop/vendor/brain-catalog.js +5 -0
  203. package/vendor/desktop/vendor/byok-catalog.js +5 -0
  204. package/vendor/desktop/vendor/credentials.js +5 -0
  205. package/vendor/desktop/vendor/device-fingerprint.js +5 -0
  206. package/vendor/desktop/vendor/env-file.js +5 -0
  207. package/vendor/desktop/vendor/fingerprint.js +5 -0
  208. package/vendor/desktop/vendor/foreign-memory.js +5 -0
  209. package/vendor/desktop/vendor/hooks.js +5 -0
  210. package/vendor/desktop/vendor/model-discovery.js +332 -0
  211. package/vendor/desktop/vendor/platform.js +5 -0
  212. package/vendor/desktop/vendor/prefs.js +5 -0
  213. package/vendor/desktop/vendor/presence-constants.js +5 -0
  214. package/vendor/desktop/vendor/presence.js +5 -0
  215. package/vendor/desktop/vendor/record-vault.js +5 -0
  216. package/vendor/desktop/vendor/session-store.js +5 -0
  217. package/vendor/desktop/vendor/topup.js +5 -0
  218. package/vendor/desktop/vendor/touch.js +5 -0
  219. package/vendor/desktop/vendor/update.js +5 -0
  220. package/vendor/desktop/vendor/user-models.js +5 -0
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # AEGISONE
2
2
 
3
- Product version: **1.0.8**
3
+ Product version: **1.0.10**
4
4
 
5
5
  One product, two faces: the terminal (`aegiscode`) and the window (`aegis-desktop`),
6
6
  reached through one command — `aegis` — and released as one version.
@@ -60,7 +60,7 @@ fails, and it never leaves you with "nothing happened". Afterwards: `aegis`
60
60
 
61
61
  ## Size, measured not claimed
62
62
 
63
- Measured size: **2.08 MB** (2,178,611 bytes) with Electron absent — both faces inside.
63
+ Measured size: **2.17 MB** (2,274,903 bytes) with Electron absent — both faces inside.
64
64
 
65
65
  The plan's "~2 MB" was a target, so it is measured here rather than published:
66
66
  `npm pack one/` on this tree, with Electron absent, produces that tarball, and it
package/bin/aegis.js CHANGED
@@ -1,4 +1,9 @@
1
1
  #!/usr/bin/env node
2
+ // SPDX-License-Identifier: AGPL-3.0-or-later
3
+ // Copyright (C) 2026 Niklas Borneklint — AEGIS Code (aegiscode) / Aegiscloud.
4
+ // AEGIS Code (aegiscode) — source: https://github.com/aegisinfo/aegiscode-plugin
5
+ // Conveying a modified copy, or running one as a network service, owes the
6
+ // corresponding source under this licence (§5/§13) — see LICENSING.md.
2
7
  'use strict';
3
8
 
4
9
  /**
package/install.ps1 CHANGED
@@ -1,3 +1,8 @@
1
+ # SPDX-License-Identifier: AGPL-3.0-or-later
2
+ # Copyright (C) 2026 Niklas Borneklint — AEGIS Code (aegiscode) / Aegiscloud.
3
+ # AEGIS Code (aegiscode) — source: https://github.com/aegisinfo/aegiscode-plugin
4
+ # Conveying a modified copy, or running one as a network service, owes the
5
+ # corresponding source under this licence (§5/§13) — see LICENSING.md.
1
6
  <#
2
7
  .SYNOPSIS
3
8
  AEGISONE installer (Windows) — plan ON6 (D2, D3).
package/install.sh CHANGED
@@ -1,4 +1,9 @@
1
1
  #!/bin/sh
2
+ # SPDX-License-Identifier: AGPL-3.0-or-later
3
+ # Copyright (C) 2026 Niklas Borneklint — AEGIS Code (aegiscode) / Aegiscloud.
4
+ # AEGIS Code (aegiscode) — source: https://github.com/aegisinfo/aegiscode-plugin
5
+ # Conveying a modified copy, or running one as a network service, owes the
6
+ # corresponding source under this licence (§5/§13) — see LICENSING.md.
2
7
  # AEGISONE installer — plan ON6 (D2, D3).
3
8
  #
4
9
  # Two steps, in this order:
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "aegisone",
3
3
  "productName": "AEGISONE",
4
- "version": "1.0.8",
4
+ "version": "1.0.10",
5
5
  "description": "AEGISONE — one product, two faces. `aegis` opens the window when there is nothing else to do and runs the terminal otherwise; `aegiscode` keeps behaving exactly as it always has.",
6
6
  "author": {
7
7
  "name": "AEGIS Code",
package/scripts/bump.mjs CHANGED
@@ -1,4 +1,9 @@
1
1
  #!/usr/bin/env node
2
+ // SPDX-License-Identifier: AGPL-3.0-or-later
3
+ // Copyright (C) 2026 Niklas Borneklint — AEGIS Code (aegiscode) / Aegiscloud.
4
+ // AEGIS Code (aegiscode) — source: https://github.com/aegisinfo/aegiscode-plugin
5
+ // Conveying a modified copy, or running one as a network service, owes the
6
+ // corresponding source under this licence (§5/§13) — see LICENSING.md.
2
7
  /**
3
8
  * AEGISONE — the bump: ONE command, ONE version, three manifests, one README
4
9
  * line (plan D4, ON3 step 1).
package/scripts/bundle.js CHANGED
@@ -1,3 +1,8 @@
1
+ // SPDX-License-Identifier: AGPL-3.0-or-later
2
+ // Copyright (C) 2026 Niklas Borneklint — AEGIS Code (aegiscode) / Aegiscloud.
3
+ // AEGIS Code (aegiscode) — source: https://github.com/aegisinfo/aegiscode-plugin
4
+ // Conveying a modified copy, or running one as a network service, owes the
5
+ // corresponding source under this licence (§5/§13) — see LICENSING.md.
1
6
  'use strict';
2
7
 
3
8
  /**
@@ -1,4 +1,9 @@
1
1
  #!/usr/bin/env node
2
+ // SPDX-License-Identifier: AGPL-3.0-or-later
3
+ // Copyright (C) 2026 Niklas Borneklint — AEGIS Code (aegiscode) / Aegiscloud.
4
+ // AEGIS Code (aegiscode) — source: https://github.com/aegisinfo/aegiscode-plugin
5
+ // Conveying a modified copy, or running one as a network service, owes the
6
+ // corresponding source under this licence (§5/§13) — see LICENSING.md.
2
7
  /**
3
8
  * AEGISONE — the ONLY vendoring stager (plan D6).
4
9
  *
@@ -125,6 +130,8 @@ export const MANIFEST = [
125
130
  note: 'the BYOK model additions the server catalog does not name' },
126
131
  { src: 'client/user-models.js', shapes: ['mirror', 'flat'],
127
132
  note: 'the models the USER declares, in one file both hosts read (requires ./credentials.js)' },
133
+ { src: 'client/model-discovery.js', shapes: ['mirror', 'flat'],
134
+ note: 'asks the vendor what it serves, so adding a new model is not a memory test (requires ./user-models.js)' },
128
135
  { src: 'client/hooks.js', shapes: ['mirror', 'flat'],
129
136
  note: 'the shared hook layer behind /hooks and the repo guard installer' },
130
137
  { src: 'client/platform.js', shapes: ['mirror', 'flat'],
package/src/child.js CHANGED
@@ -1,3 +1,8 @@
1
+ // SPDX-License-Identifier: AGPL-3.0-or-later
2
+ // Copyright (C) 2026 Niklas Borneklint — AEGIS Code (aegiscode) / Aegiscloud.
3
+ // AEGIS Code (aegiscode) — source: https://github.com/aegisinfo/aegiscode-plugin
4
+ // Conveying a modified copy, or running one as a network service, owes the
5
+ // corresponding source under this licence (§5/§13) — see LICENSING.md.
1
6
  'use strict';
2
7
 
3
8
  /**
package/src/dispatch.js CHANGED
@@ -1,3 +1,8 @@
1
+ // SPDX-License-Identifier: AGPL-3.0-or-later
2
+ // Copyright (C) 2026 Niklas Borneklint — AEGIS Code (aegiscode) / Aegiscloud.
3
+ // AEGIS Code (aegiscode) — source: https://github.com/aegisinfo/aegiscode-plugin
4
+ // Conveying a modified copy, or running one as a network service, owes the
5
+ // corresponding source under this licence (§5/§13) — see LICENSING.md.
1
6
  'use strict';
2
7
 
3
8
  /**
package/src/doctor.js CHANGED
@@ -1,3 +1,8 @@
1
+ // SPDX-License-Identifier: AGPL-3.0-or-later
2
+ // Copyright (C) 2026 Niklas Borneklint — AEGIS Code (aegiscode) / Aegiscloud.
3
+ // AEGIS Code (aegiscode) — source: https://github.com/aegisinfo/aegiscode-plugin
4
+ // Conveying a modified copy, or running one as a network service, owes the
5
+ // corresponding source under this licence (§5/§13) — see LICENSING.md.
1
6
  'use strict';
2
7
 
3
8
  /**
package/src/host.js CHANGED
@@ -1,3 +1,8 @@
1
+ // SPDX-License-Identifier: AGPL-3.0-or-later
2
+ // Copyright (C) 2026 Niklas Borneklint — AEGIS Code (aegiscode) / Aegiscloud.
3
+ // AEGIS Code (aegiscode) — source: https://github.com/aegisinfo/aegiscode-plugin
4
+ // Conveying a modified copy, or running one as a network service, owes the
5
+ // corresponding source under this licence (§5/§13) — see LICENSING.md.
1
6
  'use strict';
2
7
 
3
8
  /**
@@ -1,3 +1,8 @@
1
+ // SPDX-License-Identifier: AGPL-3.0-or-later
2
+ // Copyright (C) 2026 Niklas Borneklint — AEGIS Code (aegiscode) / Aegiscloud.
3
+ // AEGIS Code (aegiscode) — source: https://github.com/aegisinfo/aegiscode-plugin
4
+ // Conveying a modified copy, or running one as a network service, owes the
5
+ // corresponding source under this licence (§5/§13) — see LICENSING.md.
1
6
  'use strict';
2
7
 
3
8
  /**
package/src/probes.js CHANGED
@@ -1,3 +1,8 @@
1
+ // SPDX-License-Identifier: AGPL-3.0-or-later
2
+ // Copyright (C) 2026 Niklas Borneklint — AEGIS Code (aegiscode) / Aegiscloud.
3
+ // AEGIS Code (aegiscode) — source: https://github.com/aegisinfo/aegiscode-plugin
4
+ // Conveying a modified copy, or running one as a network service, owes the
5
+ // corresponding source under this licence (§5/§13) — see LICENSING.md.
1
6
  'use strict';
2
7
 
3
8
  /**
package/src/release.js CHANGED
@@ -1,3 +1,8 @@
1
+ // SPDX-License-Identifier: AGPL-3.0-or-later
2
+ // Copyright (C) 2026 Niklas Borneklint — AEGIS Code (aegiscode) / Aegiscloud.
3
+ // AEGIS Code (aegiscode) — source: https://github.com/aegisinfo/aegiscode-plugin
4
+ // Conveying a modified copy, or running one as a network service, owes the
5
+ // corresponding source under this licence (§5/§13) — see LICENSING.md.
1
6
  'use strict';
2
7
 
3
8
  /**
@@ -1,4 +1,9 @@
1
1
  #!/usr/bin/env node
2
+ // SPDX-License-Identifier: AGPL-3.0-or-later
3
+ // Copyright (C) 2026 Niklas Borneklint — AEGIS Code (aegiscode) / Aegiscloud.
4
+ // AEGIS Code (aegiscode) — source: https://github.com/aegisinfo/aegiscode-plugin
5
+ // Conveying a modified copy, or running one as a network service, owes the
6
+ // corresponding source under this licence (§5/§13) — see LICENSING.md.
2
7
  'use strict';
3
8
 
4
9
  /**
@@ -76,6 +81,12 @@ Code protection (the agent-key gate on aegiscodex-dev / aegiscode-plugin):
76
81
  aegiscode gate lock-status the server-side half of the lock
77
82
  aegiscode gate help all subcommands and their flags
78
83
 
84
+ Provenance (this binary, and whether it is still the published one):
85
+ aegiscode provenance licence, source, and a self-check of
86
+ this build against the published seal
87
+ (--json for scripts; exit 1 if a
88
+ sealed unit has moved)
89
+
79
90
  Options:
80
91
  -m, --model <id> pin a model id (see /models; default: server choice)
81
92
  --base <url> API base (default $AEGIS_API_BASE or aegiscloud.org)
@@ -191,6 +202,13 @@ function parseArgs(argv) {
191
202
  opts.commandArg = sub;
192
203
  opts.commandArgv = argv.slice(argv[1] && !argv[1].startsWith('-') ? 2 : 1);
193
204
  argv = [];
205
+ } else if (head === 'provenance') {
206
+ // Same position-0 rule and the same reason as `gate`: it is a one-shot
207
+ // question about THIS BINARY, not a prompt that happens to start with the
208
+ // word. Unlike `gate` the tail needs no passthrough — the only flag it
209
+ // takes is `--json`, which this parser already owns.
210
+ opts.command = 'provenance';
211
+ argv = argv.slice(1);
194
212
  } else if (head === 'topup') {
195
213
  // Same position-0 rule and the same reason as `gate`: the one argument is
196
214
  // the amount (`aegiscode topup 20`), never a prompt whose text happens to
@@ -291,6 +309,53 @@ function parseArgs(argv) {
291
309
  return opts;
292
310
  }
293
311
 
312
+ /**
313
+ * `aegiscode provenance` — what this binary is, and whether its safety files are
314
+ * the ones that were published.
315
+ *
316
+ * The use case is a user (or an auditor, or a script) holding an install they
317
+ * did not build: `npm i -g aegiscode`, a tarball mailed to them, a rebuilt fork.
318
+ * It answers with the licence, the copyright holder, the source URL, and the
319
+ * result of the startup self-check against `src/provenance.lock.json`.
320
+ *
321
+ * Exit codes: 0 = identity intact and safety files verified; 1 = a safety file
322
+ * has moved, or the manifest is missing and the install therefore cannot be
323
+ * verified at all (absence is a failure — see src/provenance.js for why the
324
+ * cheap attack must be the loud one). A fork that has deliberately rebuilt is
325
+ * expected to regenerate the manifest and exit 0 naming itself; one that has
326
+ * not now says so instead of staying silent.
327
+ */
328
+ function runProvenance(opts = {}) {
329
+ const pkg = require(path.join(__dirname, '..', 'package.json'));
330
+ const provenance = require('../src/provenance.js');
331
+ const described = provenance.describe({ version: pkg.version });
332
+ if (opts.json) {
333
+ process.stdout.write(
334
+ JSON.stringify(
335
+ {
336
+ product: provenance.IDENTITY.product,
337
+ bin: provenance.IDENTITY.bin,
338
+ version: pkg.version,
339
+ license: provenance.IDENTITY.license,
340
+ source: provenance.IDENTITY.source,
341
+ homepage: provenance.IDENTITY.homepage,
342
+ copyright: provenance.IDENTITY.copyright,
343
+ safety: {
344
+ ok: described.report.ok,
345
+ checked: described.report.checked,
346
+ problems: described.report.problems,
347
+ },
348
+ },
349
+ null,
350
+ 2
351
+ ) + '\n'
352
+ );
353
+ return described.ok ? 0 : 1;
354
+ }
355
+ process.stdout.write(described.text);
356
+ return described.ok ? 0 : 1;
357
+ }
358
+
294
359
  /**
295
360
  * Account subcommands: the in-band way to give this host a key.
296
361
  *
@@ -450,6 +515,42 @@ async function main(argv = process.argv.slice(2)) {
450
515
  return 0;
451
516
  }
452
517
 
518
+ // ── interlock (see src/limits.js) ────────────────────────────────────────
519
+ //
520
+ // The second gate, and it runs before every subcommand dispatch below — gate,
521
+ // mcp, autonomous, provenance, the session — because a check that ran after
522
+ // the dispatch it is supposed to stop is a check that reports instead of
523
+ // gating.
524
+ //
525
+ // It asks whether the safety files are still the sealed set *as a whole*, and
526
+ // when they are not it says exactly one bland thing — naming no file, no cause
527
+ // and no remedy — and refuses the privileged subcommands (`gate`,
528
+ // `provenance`, `mcp`), so the build that failed the check cannot use the
529
+ // gate's own key management or report on itself. Sessions still start, marked
530
+ // `AEGIS_REDUCED_MODE=1` for modules that opt-in.
531
+ //
532
+ // Deliberately NOT switchable by environment variable: a gate with a
533
+ // documented off switch is a gate the manipulator reads about in the same file
534
+ // as the gate. Re-sealing is a manual act —
535
+ // `node tools/provenance.mjs lock --write` — and a tree that is mid-edit trips
536
+ // this on purpose.
537
+ //
538
+ // This call site is the EARLIEST refusal, not the only one. `armed()` is
539
+ // asked again, independently, by each module that owns one of these
540
+ // privileges — src/gate.js, src/mcp.js, src/autonomous.js,
541
+ // src/permissions.js — because a check invoked from exactly one place is
542
+ // removed by deleting one line, and this is the file a manipulator is already
543
+ // editing. Deleting the block below leaves four refusals behind, in four files
544
+ // the sealed set covers.
545
+ let interlockFired = false;
546
+ try {
547
+ const limits = require('../src/limits.js');
548
+ interlockFired = limits.armed();
549
+ if (interlockFired && limits.isPrivileged(opts.command)) return limits.refuse();
550
+ } catch {
551
+ /* a gate must never be the reason the program fails to start */
552
+ }
553
+
453
554
  // ── the shared env file, before any credential is resolved ───────────────
454
555
  //
455
556
  // `~/.aegiscode/.env` read into process.env once. This is what makes key
@@ -618,8 +719,44 @@ async function main(argv = process.argv.slice(2)) {
618
719
  });
619
720
  }
620
721
 
722
+ // What this binary is, and whether its safety files are the published ones.
723
+ // Dispatched before a session is built, like `gate`/`fingerprint`: it is a
724
+ // question about this install, it must work with no terminal at all (an audit
725
+ // script), and it must not depend on a credential being configured. It is NOT
726
+ // part of the startup path — the runtime self-check that warns on stderr is in
727
+ // src/provenance.js and runs below, for sessions.
728
+ //
729
+ // The interlock below runs first and can make `provenance` unavailable, which
730
+ // is not an oversight: a build that fails the silent gate does not get to
731
+ // report on itself.
732
+ if (opts.command === 'provenance' && !interlockFired) {
733
+ return runProvenance({ json: opts.json });
734
+ }
735
+
621
736
  const { createApp } = require('../src/app.js');
622
737
 
738
+ // ── provenance self-check (one stderr line, never fatal) ─────────────────
739
+ //
740
+ // A build whose gate, permission evaluator, approval classes or runner were
741
+ // edited announces it, once, before the session starts — instead of importing
742
+ // the neutered file and saying nothing. Never throws and never blocks: a
743
+ // diagnostic that can stop the program it reports on is worse than none (see
744
+ // src/provenance.js, which also records why a MISSING manifest is a failure
745
+ // rather than a pass). A development tree silences it with
746
+ // AEGIS_NO_PROVENANCE_CHECK=1 — and the silence is printed at the time, so it
747
+ // is a fact on the record rather than a quiet default.
748
+ //
749
+ // Skipped when the interlock has already fired: that path emits exactly one
750
+ // bland line, and following it with a more descriptive one would hand back
751
+ // everything the bland line withheld.
752
+ if (!interlockFired) try {
753
+ const provenance = require('../src/provenance.js');
754
+ const line = provenance.warning(provenance.selfCheck());
755
+ if (line) process.stderr.write(line);
756
+ } catch {
757
+ /* a diagnostic must never be the reason a session fails to start */
758
+ }
759
+
623
760
  // ── presence beacon (aegis1 /api/v1/heartbeat) ───────────────────────────
624
761
  //
625
762
  // "Who is running aegiscode right now" — the admin panel's presence card.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "aegiscode",
3
3
  "productName": "AEGIS Code",
4
- "version": "7.0.0",
4
+ "version": "7.0.2",
5
5
  "description": "aegiscode — the command-line version of AEGIS Desktop. The shared tool surface in your shell, over the same thin transport and tool registry as the MCP plugin and the desktop app. Ships transport + UI only; no brain.",
6
6
  "author": {
7
7
  "name": "AEGIS Code",
@@ -1,4 +1,9 @@
1
1
  #!/usr/bin/env node
2
+ // SPDX-License-Identifier: AGPL-3.0-or-later
3
+ // Copyright (C) 2026 Niklas Borneklint — AEGIS Code (aegiscode) / Aegiscloud.
4
+ // AEGIS Code (aegiscode) — source: https://github.com/aegisinfo/aegiscode-plugin
5
+ // Conveying a modified copy, or running one as a network service, owes the
6
+ // corresponding source under this licence (§5/§13) — see LICENSING.md.
2
7
  /**
3
8
  * Syntax-check every file `node --check` should gate on, and report all of
4
9
  * them. Replaces the POSIX loop
@@ -1,4 +1,9 @@
1
1
  #!/usr/bin/env node
2
+ // SPDX-License-Identifier: AGPL-3.0-or-later
3
+ // Copyright (C) 2026 Niklas Borneklint — AEGIS Code (aegiscode) / Aegiscloud.
4
+ // AEGIS Code (aegiscode) — source: https://github.com/aegisinfo/aegiscode-plugin
5
+ // Conveying a modified copy, or running one as a network service, owes the
6
+ // corresponding source under this licence (§5/§13) — see LICENSING.md.
2
7
  /**
3
8
  * Renders a canned session to stdout — banner, a prompt, a streamed answer with
4
9
  * markdown, the accounting line, and the status bar.
@@ -1,4 +1,9 @@
1
1
  #!/usr/bin/env node
2
+ // SPDX-License-Identifier: AGPL-3.0-or-later
3
+ // Copyright (C) 2026 Niklas Borneklint — AEGIS Code (aegiscode) / Aegiscloud.
4
+ // AEGIS Code (aegiscode) — source: https://github.com/aegisinfo/aegiscode-plugin
5
+ // Conveying a modified copy, or running one as a network service, owes the
6
+ // corresponding source under this licence (§5/§13) — see LICENSING.md.
2
7
  /**
3
8
  * Pre-publish staging for the `aegiscode` package — a THIN WRAPPER.
4
9
  *
@@ -6,7 +11,8 @@
6
11
  * `one/scripts/predist.mjs` in AEGISONE's phase ON2 (plan D6): one manifest,
7
12
  * two shapes. This file used to hold its own list of forty repo-relative
8
13
  * modules, kept in sync with `desktop/scripts/predist.mjs` by discipline alone.
9
- * It now holds no list at all.
14
+ * It now holds no list at all, and its length is a test
15
+ * (`test/one-vendor.test.mjs`: wrappers stay under eighty lines).
10
16
  *
11
17
  * Everything the CLI needs is unchanged as seen from outside: `npm run predist`,
12
18
  * `prepublishOnly`, `precheck` and `pretest` still run this file, it still
@@ -14,6 +20,11 @@
14
20
  * same proof lines (the staged registry loads standalone, the editor layer
15
21
  * resolves the STAGED server, the staged gate module loads).
16
22
  *
23
+ * It also REFUSES to stage from a tree whose safety files are not the sealed
24
+ * ones — the publish gate, which lives beside this file (`./seal-gate.mjs`)
25
+ * because a gate is not a manifest and this file has a line budget. That is the
26
+ * one moment the question can be asked from outside the artifact.
27
+ *
17
28
  * If the shared stager is not reachable the file is missing — this directory is
18
29
  * inside the published tarball, where `one/` is not shipped, and running predist
19
30
  * there is meaningless anyway (the vendor tree it would build is already in the
@@ -21,11 +32,27 @@
21
32
  */
22
33
  import path from 'node:path';
23
34
  import { fileURLToPath, pathToFileURL } from 'node:url';
35
+ import { sealGate } from './seal-gate.mjs';
24
36
 
25
37
  const HERE = path.dirname(fileURLToPath(import.meta.url));
26
38
  const SHARED = path.join(HERE, '..', '..', 'one', 'scripts', 'predist.mjs');
27
39
 
28
40
  async function main() {
41
+ const gate = sealGate();
42
+ if (!gate.ok && !process.env.AEGIS_ALLOW_UNSEALED) {
43
+ process.stderr.write(
44
+ `${gate.line}\n` +
45
+ `cut: refusing to stage a package from it. Reseal the tree deliberately, or set ` +
46
+ `AEGIS_ALLOW_UNSEALED=1 to stage a build that is known not to be the published one.\n`
47
+ );
48
+ return 1;
49
+ }
50
+ process.stderr.write(
51
+ gate.ok
52
+ ? `${gate.line}\n`
53
+ : `${gate.line}\ncut: AEGIS_ALLOW_UNSEALED is set — staging anyway; this artifact will ` +
54
+ `not match the published manifest.\n`
55
+ );
29
56
  let shared;
30
57
  try {
31
58
  shared = await import(pathToFileURL(SHARED).href);
@@ -45,4 +72,4 @@ if (process.argv[1] && path.resolve(process.argv[1]) === fileURLToPath(import.me
45
72
  process.exitCode = await main();
46
73
  }
47
74
 
48
- export { main };
75
+ export { main, sealGate };
@@ -1,4 +1,9 @@
1
1
  #!/usr/bin/env node
2
+ // SPDX-License-Identifier: AGPL-3.0-or-later
3
+ // Copyright (C) 2026 Niklas Borneklint — AEGIS Code (aegiscode) / Aegiscloud.
4
+ // AEGIS Code (aegiscode) — source: https://github.com/aegisinfo/aegiscode-plugin
5
+ // Conveying a modified copy, or running one as a network service, owes the
6
+ // corresponding source under this licence (§5/§13) — see LICENSING.md.
2
7
  /**
3
8
  * Run every `test/cli-*.test.mjs` and report all of them.
4
9
  *
@@ -0,0 +1,76 @@
1
+ // SPDX-License-Identifier: AGPL-3.0-or-later
2
+ // Copyright (C) 2026 Niklas Borneklint — AEGIS Code (aegiscode) / Aegiscloud.
3
+ // AEGIS Code (aegiscode) — source: https://github.com/aegisinfo/aegiscode-plugin
4
+ // Conveying a modified copy, or running one as a network service, owes the
5
+ // corresponding source under this licence (§5/§13) — see LICENSING.md.
6
+ /**
7
+ * The publish gate — the half of the provenance story that is a control rather
8
+ * than a deterrent.
9
+ *
10
+ * `cli/src/limits.js` and `cli/src/provenance.js` live INSIDE the package they
11
+ * guard, so whoever edits the safety files can also delete the lines that would
12
+ * have noticed. That is not fixable from within the package, and pretending
13
+ * otherwise is the mistake both gates already refuse to make in their own
14
+ * headers. Staging a tarball is the one moment the question can be asked from
15
+ * OUTSIDE the artifact — on the maintainer's machine, before the bytes are
16
+ * copied — which makes this the only point at which a modified tree is STOPPED
17
+ * instead of merely reported on.
18
+ *
19
+ * Both gates are asked, and separately on purpose: the interlock's set covers
20
+ * `src/limits.js` itself while the manifest does not, and the manifest covers
21
+ * the entry point while the interlock lists a different set. A tree has to
22
+ * satisfy both to be staged.
23
+ *
24
+ * It lives in its own file rather than inline in `predist.mjs` because that
25
+ * file is a THIN WRAPPER by contract — `test/one-vendor.test.mjs` fails it
26
+ * above eighty lines, and the manifest it used to hold is exactly the
27
+ * duplication that rule exists to prevent. A gate is not a manifest, but the
28
+ * rule is a line count, and the honest way to satisfy it is to move the gate
29
+ * out rather than to raise the limit for it.
30
+ *
31
+ * Importing this file stages nothing.
32
+ */
33
+
34
+ import path from 'node:path';
35
+ import { createRequire } from 'node:module';
36
+ import { fileURLToPath } from 'node:url';
37
+
38
+ const HERE = path.dirname(fileURLToPath(import.meta.url));
39
+ const CLI_ROOT = path.join(HERE, '..');
40
+ const require = createRequire(import.meta.url);
41
+
42
+ /**
43
+ * Ask both gates about the tree that is about to be staged.
44
+ *
45
+ * @returns {{ ok: boolean, line: string }} `line` is what the maintainer reads;
46
+ * it may name files, because a maintainer is who it is talking to. The RUNTIME
47
+ * reports are the ones that must not (see cli/src/provenance.js).
48
+ */
49
+ function sealGate() {
50
+ let limits;
51
+ let provenance;
52
+ try {
53
+ limits = require(path.join(CLI_ROOT, 'src', 'limits.js'));
54
+ provenance = require(path.join(CLI_ROOT, 'src', 'provenance.js'));
55
+ } catch (error) {
56
+ return {
57
+ ok: false,
58
+ line: `cut: the safety modules are unreadable (${(error && error.message) || error}).`,
59
+ };
60
+ }
61
+ const interlock = limits.check();
62
+ if (interlock.tripped) {
63
+ return {
64
+ ok: false,
65
+ line: `cut: the sealed set has moved (${interlock.code}) — this tree is not the published one.`,
66
+ };
67
+ }
68
+ const report = provenance.selfCheck();
69
+ if (!report.ok) return { ok: false, line: `cut: ${report.problems.join('; ')}` };
70
+ return {
71
+ ok: true,
72
+ line: `cut: ${report.checked} sealed units verified — this tree is the published one.`,
73
+ };
74
+ }
75
+
76
+ export { sealGate };
@@ -1,3 +1,8 @@
1
+ // SPDX-License-Identifier: AGPL-3.0-or-later
2
+ // Copyright (C) 2026 Niklas Borneklint — AEGIS Code (aegiscode) / Aegiscloud.
3
+ // AEGIS Code (aegiscode) — source: https://github.com/aegisinfo/aegiscode-plugin
4
+ // Conveying a modified copy, or running one as a network service, owes the
5
+ // corresponding source under this licence (§5/§13) — see LICENSING.md.
1
6
  'use strict';
2
7
 
3
8
  /**
@@ -1,3 +1,8 @@
1
+ // SPDX-License-Identifier: AGPL-3.0-or-later
2
+ // Copyright (C) 2026 Niklas Borneklint — AEGIS Code (aegiscode) / Aegiscloud.
3
+ // AEGIS Code (aegiscode) — source: https://github.com/aegisinfo/aegiscode-plugin
4
+ // Conveying a modified copy, or running one as a network service, owes the
5
+ // corresponding source under this licence (§5/§13) — see LICENSING.md.
1
6
  'use strict';
2
7
 
3
8
  /**
@@ -1,3 +1,8 @@
1
+ // SPDX-License-Identifier: AGPL-3.0-or-later
2
+ // Copyright (C) 2026 Niklas Borneklint — AEGIS Code (aegiscode) / Aegiscloud.
3
+ // AEGIS Code (aegiscode) — source: https://github.com/aegisinfo/aegiscode-plugin
4
+ // Conveying a modified copy, or running one as a network service, owes the
5
+ // corresponding source under this licence (§5/§13) — see LICENSING.md.
1
6
  'use strict';
2
7
 
3
8
  const { caps, detect, cells, padCells } = require('./caps.js');
@@ -1,3 +1,8 @@
1
+ // SPDX-License-Identifier: AGPL-3.0-or-later
2
+ // Copyright (C) 2026 Niklas Borneklint — AEGIS Code (aegiscode) / Aegiscloud.
3
+ // AEGIS Code (aegiscode) — source: https://github.com/aegisinfo/aegiscode-plugin
4
+ // Conveying a modified copy, or running one as a network service, owes the
5
+ // corresponding source under this licence (§5/§13) — see LICENSING.md.
1
6
  'use strict';
2
7
 
3
8
  /**
@@ -30,11 +35,20 @@ const path = require('node:path');
30
35
  const { queue, autonomous } = require('./deps.js');
31
36
  const { createEngine } = require('./engine.js');
32
37
  const { fmtElapsed } = require('./format.js');
38
+ const limits = require('./limits.js');
33
39
 
34
40
  const SUBCOMMANDS = new Set([
35
41
  'add', 'list', 'run', 'proceed', 'reconcile', 'clear', 'retry', 'help',
36
42
  ]);
37
43
 
44
+ /**
45
+ * The verbs that RUN something. `add`, `list` and `clear` decide nothing and
46
+ * stay available on a build that failed the interlock; these four act — `retry`
47
+ * re-arms a failed task, `reconcile` can chain straight into a drain, and
48
+ * `run`/`proceed` are the drain. See the guard in `runQueueCommand`.
49
+ */
50
+ const EXECUTES = new Set(['run', 'proceed', 'retry', 'reconcile']);
51
+
38
52
  /**
39
53
  * Parse the subcommand's own argv. Deliberately its own tiny parser rather than
40
54
  * bin/aegiscode.js's: the top-level parser owns the one-shot/session flags, and
@@ -228,6 +242,15 @@ async function runQueueCommand(command, argv, io = {}) {
228
242
  return command === 'help' ? 0 : 2;
229
243
  }
230
244
 
245
+ // The interlock, asked here as well as at the entry point, and it is asked
246
+ // about the verbs that EXECUTE. This is the one surface where a machine acts
247
+ // with nobody answering: no prompt, no human to refuse a tool call, stdin on
248
+ // /dev/null under a timer. A build that is not the published one does not get
249
+ // to run a queue through it — it may still read `list` and append with `add`,
250
+ // because those decide nothing, but `run`/`proceed`/`retry` and installing the
251
+ // timer that repeats them are refused. See src/limits.js.
252
+ if (EXECUTES.has(command) && limits.armed()) return limits.refuse();
253
+
231
254
  const cwd = args.flags.cwd ? path.resolve(String(args.flags.cwd)) : process.cwd();
232
255
 
233
256
  if (command === 'add') {
@@ -1,3 +1,8 @@
1
+ // SPDX-License-Identifier: AGPL-3.0-or-later
2
+ // Copyright (C) 2026 Niklas Borneklint — AEGIS Code (aegiscode) / Aegiscloud.
3
+ // AEGIS Code (aegiscode) — source: https://github.com/aegisinfo/aegiscode-plugin
4
+ // Conveying a modified copy, or running one as a network service, owes the
5
+ // corresponding source under this licence (§5/§13) — see LICENSING.md.
1
6
  'use strict';
2
7
 
3
8
  /**