@songsid/agend 2.3.5-alpha.10 → 2.3.5-alpha.12

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 (319) hide show
  1. package/dist/accounts-view.d.ts +17 -0
  2. package/dist/accounts-view.js +24 -8
  3. package/dist/accounts-view.js.map +1 -1
  4. package/dist/agent-cli-instructions.md +2 -2
  5. package/dist/auth-api.d.ts +48 -16
  6. package/dist/auth-api.js +83 -32
  7. package/dist/auth-api.js.map +1 -1
  8. package/dist/authority/settings-role.d.ts +56 -0
  9. package/dist/authority/settings-role.js +48 -0
  10. package/dist/authority/settings-role.js.map +1 -0
  11. package/dist/backend/claude-code.d.ts +2 -0
  12. package/dist/backend/claude-code.js +32 -6
  13. package/dist/backend/claude-code.js.map +1 -1
  14. package/dist/backend/cli-env-probe.js +6 -2
  15. package/dist/backend/cli-env-probe.js.map +1 -1
  16. package/dist/backend/codex.d.ts +5 -3
  17. package/dist/backend/codex.js +31 -13
  18. package/dist/backend/codex.js.map +1 -1
  19. package/dist/backend/credential-profile.d.ts +18 -0
  20. package/dist/backend/credential-profile.js +46 -0
  21. package/dist/backend/credential-profile.js.map +1 -1
  22. package/dist/backend/kiro.js +1 -1
  23. package/dist/backend/kiro.js.map +1 -1
  24. package/dist/backend/muse.d.ts +3 -1
  25. package/dist/backend/muse.js +31 -1
  26. package/dist/backend/muse.js.map +1 -1
  27. package/dist/backend/types.d.ts +17 -1
  28. package/dist/backend/types.js.map +1 -1
  29. package/dist/backend-availability.d.ts +15 -0
  30. package/dist/backend-availability.js +37 -1
  31. package/dist/backend-availability.js.map +1 -1
  32. package/dist/build-provenance.json +1 -1
  33. package/dist/bundled-tmux-guard.d.ts +4 -0
  34. package/dist/bundled-tmux-guard.js +7 -0
  35. package/dist/bundled-tmux-guard.js.map +1 -1
  36. package/dist/claude-auth-status.d.ts +20 -8
  37. package/dist/claude-auth-status.js +38 -22
  38. package/dist/claude-auth-status.js.map +1 -1
  39. package/dist/cli-audited.d.ts +60 -0
  40. package/dist/cli-audited.js +84 -0
  41. package/dist/cli-audited.js.map +1 -0
  42. package/dist/cli-capability.d.ts +36 -5
  43. package/dist/cli-capability.js +2 -2
  44. package/dist/cli-capability.js.map +1 -1
  45. package/dist/cli-caps-module.d.ts +5 -1
  46. package/dist/cli-caps-module.js +4 -2
  47. package/dist/cli-caps-module.js.map +1 -1
  48. package/dist/cli-registry-check.js +16 -2
  49. package/dist/cli-registry-check.js.map +1 -1
  50. package/dist/cli-registry.d.ts +56 -4
  51. package/dist/cli-registry.js +1 -1
  52. package/dist/cli-registry.js.map +1 -1
  53. package/dist/cli-spec-antigravity.d.ts +12 -1
  54. package/dist/cli-spec-antigravity.js +13 -1
  55. package/dist/cli-spec-antigravity.js.map +1 -1
  56. package/dist/cli-spec-claude-code.d.ts +9 -0
  57. package/dist/cli-spec-claude-code.js +4 -2
  58. package/dist/cli-spec-claude-code.js.map +1 -1
  59. package/dist/cli-spec-codex.d.ts +10 -1
  60. package/dist/cli-spec-codex.js +5 -3
  61. package/dist/cli-spec-codex.js.map +1 -1
  62. package/dist/cli-spec-grok.d.ts +5 -0
  63. package/dist/cli-spec-grok.js +6 -1
  64. package/dist/cli-spec-grok.js.map +1 -1
  65. package/dist/cli-spec-kiro-cli.d.ts +7 -1
  66. package/dist/cli-spec-kiro-cli.js +7 -3
  67. package/dist/cli-spec-kiro-cli.js.map +1 -1
  68. package/dist/cli-spec-muse.d.ts +2 -0
  69. package/dist/cli-spec-muse.js +3 -1
  70. package/dist/cli-spec-muse.js.map +1 -1
  71. package/dist/cli-spec-opencode.d.ts +11 -1
  72. package/dist/cli-spec-opencode.js +7 -2
  73. package/dist/cli-spec-opencode.js.map +1 -1
  74. package/dist/cli.js +28 -1
  75. package/dist/cli.js.map +1 -1
  76. package/dist/create-host-account.d.ts +17 -0
  77. package/dist/create-host-account.js +47 -0
  78. package/dist/create-host-account.js.map +1 -0
  79. package/dist/daemon.d.ts +26 -0
  80. package/dist/daemon.js +131 -10
  81. package/dist/daemon.js.map +1 -1
  82. package/dist/delivery-outbox.js +7 -0
  83. package/dist/delivery-outbox.js.map +1 -1
  84. package/dist/fleet-context.d.ts +5 -1
  85. package/dist/fleet-manager.d.ts +363 -71
  86. package/dist/fleet-manager.js +1374 -367
  87. package/dist/fleet-manager.js.map +1 -1
  88. package/dist/fleet-process-handlers.d.ts +1 -1
  89. package/dist/fleet-process-handlers.js +3 -2
  90. package/dist/fleet-process-handlers.js.map +1 -1
  91. package/dist/general-knowledge/skills/concepts/SKILL.md +21 -14
  92. package/dist/general-knowledge/skills/credential-profiles/SKILL.md +9 -8
  93. package/dist/general-knowledge/skills/cross-instance-messaging/SKILL.md +9 -1
  94. package/dist/general-knowledge/skills/kiro-engine-migration/SKILL.md +1 -1
  95. package/dist/general-knowledge/skills/web-dashboard/SKILL.md +27 -20
  96. package/dist/instance-lifecycle.js +33 -3
  97. package/dist/instance-lifecycle.js.map +1 -1
  98. package/dist/instructions.js +29 -6
  99. package/dist/instructions.js.map +1 -1
  100. package/dist/locale.js +125 -81
  101. package/dist/locale.js.map +1 -1
  102. package/dist/login-manager.d.ts +2 -2
  103. package/dist/login-manager.js +3 -2
  104. package/dist/login-manager.js.map +1 -1
  105. package/dist/native-model-catalog.d.ts +20 -0
  106. package/dist/native-model-catalog.js +107 -2
  107. package/dist/native-model-catalog.js.map +1 -1
  108. package/dist/public-web-gateway.js +1 -1
  109. package/dist/public-web-gateway.js.map +1 -1
  110. package/dist/public-web-link.d.ts +5 -0
  111. package/dist/public-web-link.js +8 -0
  112. package/dist/public-web-link.js.map +1 -1
  113. package/dist/runtime-api.d.ts +1 -1
  114. package/dist/runtime-api.js +104 -12
  115. package/dist/runtime-api.js.map +1 -1
  116. package/dist/runtime-autostart.d.ts +61 -0
  117. package/dist/runtime-autostart.js +161 -0
  118. package/dist/runtime-autostart.js.map +1 -0
  119. package/dist/runtime-background.d.ts +200 -0
  120. package/dist/runtime-background.js +480 -0
  121. package/dist/runtime-background.js.map +1 -0
  122. package/dist/runtime-build-info.js +5 -5
  123. package/dist/runtime-build-info.js.map +1 -1
  124. package/dist/runtime-cli-background.d.ts +92 -0
  125. package/dist/runtime-cli-background.js +336 -0
  126. package/dist/runtime-cli-background.js.map +1 -0
  127. package/dist/runtime-cli-install.d.ts +148 -8
  128. package/dist/runtime-cli-install.js +253 -59
  129. package/dist/runtime-cli-install.js.map +1 -1
  130. package/dist/runtime-cli.d.ts +8 -1
  131. package/dist/runtime-cli.js +206 -44
  132. package/dist/runtime-cli.js.map +1 -1
  133. package/dist/runtime-client-store.d.ts +11 -0
  134. package/dist/runtime-client-store.js +20 -5
  135. package/dist/runtime-client-store.js.map +1 -1
  136. package/dist/runtime-client.d.ts +23 -1
  137. package/dist/runtime-client.js +92 -6
  138. package/dist/runtime-client.js.map +1 -1
  139. package/dist/runtime-connection.d.ts +1 -1
  140. package/dist/runtime-connection.js +1 -1
  141. package/dist/runtime-connection.js.map +1 -1
  142. package/dist/runtime-coordinator.d.ts +95 -1
  143. package/dist/runtime-coordinator.js +344 -10
  144. package/dist/runtime-coordinator.js.map +1 -1
  145. package/dist/runtime-enroll-notice.d.ts +4 -0
  146. package/dist/runtime-enroll-notice.js +21 -0
  147. package/dist/runtime-enroll-notice.js.map +1 -0
  148. package/dist/runtime-enrollment.d.ts +21 -0
  149. package/dist/runtime-enrollment.js +52 -0
  150. package/dist/runtime-enrollment.js.map +1 -0
  151. package/dist/runtime-pane-native.js +4 -4
  152. package/dist/runtime-pane-native.js.map +1 -1
  153. package/dist/runtime-protocol.d.ts +78 -1
  154. package/dist/runtime-protocol.js +95 -5
  155. package/dist/runtime-protocol.js.map +1 -1
  156. package/dist/runtime-remote-accounts.d.ts +12 -0
  157. package/dist/runtime-remote-accounts.js +56 -5
  158. package/dist/runtime-remote-accounts.js.map +1 -1
  159. package/dist/runtime-remote-setup.d.ts +4 -1
  160. package/dist/runtime-remote-setup.js +4 -1
  161. package/dist/runtime-remote-setup.js.map +1 -1
  162. package/dist/runtime-update-controller.d.ts +11 -0
  163. package/dist/runtime-update-controller.js +56 -4
  164. package/dist/runtime-update-controller.js.map +1 -1
  165. package/dist/settings-api.d.ts +13 -1
  166. package/dist/settings-api.js +44 -20
  167. package/dist/settings-api.js.map +1 -1
  168. package/dist/settings-change.d.ts +5 -13
  169. package/dist/settings-change.js.map +1 -1
  170. package/dist/settings-confirmation.d.ts +11 -13
  171. package/dist/settings-confirmation.js +2 -6
  172. package/dist/settings-confirmation.js.map +1 -1
  173. package/dist/settings-effect.d.ts +5 -0
  174. package/dist/settings-effect.js +76 -10
  175. package/dist/settings-effect.js.map +1 -1
  176. package/dist/settings-http-confirmation.d.ts +8 -1
  177. package/dist/settings-http-confirmation.js +39 -13
  178. package/dist/settings-http-confirmation.js.map +1 -1
  179. package/dist/settings-request-capability.d.ts +7 -0
  180. package/dist/settings-request-capability.js +3 -1
  181. package/dist/settings-request-capability.js.map +1 -1
  182. package/dist/setup-i18n.js +4 -4
  183. package/dist/setup-i18n.js.map +1 -1
  184. package/dist/signin-keepalive.d.ts +25 -1
  185. package/dist/signin-keepalive.js +44 -1
  186. package/dist/signin-keepalive.js.map +1 -1
  187. package/dist/subagent-records.d.ts +45 -0
  188. package/dist/subagent-records.js +214 -0
  189. package/dist/subagent-records.js.map +1 -0
  190. package/dist/subagent-service.d.ts +27 -0
  191. package/dist/subagent-service.js +199 -0
  192. package/dist/subagent-service.js.map +1 -0
  193. package/dist/tmux-manager.d.ts +2 -2
  194. package/dist/tmux-manager.js +5 -3
  195. package/dist/tmux-manager.js.map +1 -1
  196. package/dist/ui/account-identity.js +7 -5
  197. package/dist/ui/accounts-keepalive.js +17 -17
  198. package/dist/ui/accounts-manage.js +34 -34
  199. package/dist/ui/accounts-view.js +68 -24
  200. package/dist/ui/agent-runtime-settings.js +1 -1
  201. package/dist/ui/backend-signin.js +67 -67
  202. package/dist/ui/chat-msg-actions.js +50 -4
  203. package/dist/ui/chat-quote.js +256 -0
  204. package/dist/ui/chat-store.js +9 -4
  205. package/dist/ui/cli-caps.js +7 -7
  206. package/dist/ui/credential-profile-select.js +4 -4
  207. package/dist/ui/general-location.js +1 -1
  208. package/dist/ui/host-install.js +290 -0
  209. package/dist/ui/hub-company-join-strings.js +3 -0
  210. package/dist/ui/hub-company-join.js +20 -2
  211. package/dist/ui/hub-owner-strings.js +5 -4
  212. package/dist/ui/hub-pairing-progress-strings.js +1 -1
  213. package/dist/ui/hub-quick-strings.js +4 -4
  214. package/dist/ui/hub-strings.js +6 -6
  215. package/dist/ui/machine-signin.js +4 -4
  216. package/dist/ui/model-picker.js +68 -0
  217. package/dist/ui/panel-chat.js +74 -13
  218. package/dist/ui/panel-fleet.js +8 -2
  219. package/dist/ui/panel-hub.js +8 -4
  220. package/dist/ui/panel-needs.js +2 -2
  221. package/dist/ui/panel-runtimes.js +232 -33
  222. package/dist/ui/panel-settings.js +7 -1
  223. package/dist/ui/panel-windows-cli.js +1 -1
  224. package/dist/ui/runtime-cli-install.js +99 -20
  225. package/dist/ui/runtime-commands.d.ts +2 -0
  226. package/dist/ui/runtime-commands.js +34 -1
  227. package/dist/ui/runtime-update-status.js +2 -2
  228. package/dist/ui/search-dialog.js +1 -0
  229. package/dist/ui/settings-access-overview.js +167 -0
  230. package/dist/ui/settings-access-strings.js +1 -1
  231. package/dist/ui/settings-catalog.js +19 -3
  232. package/dist/ui/settings-confirm.js +2 -2
  233. package/dist/ui/settings-devices.js +59 -25
  234. package/dist/ui/settings-dialogs.js +12 -13
  235. package/dist/ui/settings-guests.js +1 -1
  236. package/dist/ui/settings-hub-company-join.js +10 -7
  237. package/dist/ui/settings-hub-connection.js +121 -0
  238. package/dist/ui/settings-hub-membership.js +1 -1
  239. package/dist/ui/settings-hub-run.js +5 -6
  240. package/dist/ui/settings-hub-section.js +3 -6
  241. package/dist/ui/settings-hub.js +12 -7
  242. package/dist/ui/settings-layout.js +9 -7
  243. package/dist/ui/settings-outside.js +87 -19
  244. package/dist/ui/settings-registry.js +2 -1
  245. package/dist/ui/settings-revoke-strings.js +28 -0
  246. package/dist/ui/settings-strings.js +25 -25
  247. package/dist/ui/settings-web-authority.js +11 -4
  248. package/dist/ui/shared/accounts.css +11 -1
  249. package/dist/ui/shared/agend-auth.js +8 -1
  250. package/dist/ui/shared/app-i18n.js +10 -12
  251. package/dist/ui/shared/app-session.js +13 -16
  252. package/dist/ui/shared/app-shell.js +37 -37
  253. package/dist/ui/shared/app-store.js +2 -0
  254. package/dist/ui/shared/app.css +85 -14
  255. package/dist/ui/shared/chat-render.js +17 -5
  256. package/dist/ui/shared/chat-strings.js +4 -4
  257. package/dist/ui/shared/device-roles.js +27 -0
  258. package/dist/ui/shared/host-install.css +10 -0
  259. package/dist/ui/shared/hub-owner.css +6 -0
  260. package/dist/ui/shared/model-picker.css +21 -0
  261. package/dist/ui/shared/runtime-install.css +26 -1
  262. package/dist/ui/shared/setup-host-text.js +4 -4
  263. package/dist/ui/shared/signin.js +171 -64
  264. package/dist/ui/shared/subagent-row.css +15 -0
  265. package/dist/ui/shared/usage-dialog.js +28 -16
  266. package/dist/ui/shared/view-strings.js +7 -7
  267. package/dist/ui/shared/web-authorize.js +54 -4
  268. package/dist/ui/signin.html +19 -8
  269. package/dist/ui/structured-signin.js +30 -30
  270. package/dist/ui/subagent-row.js +72 -0
  271. package/dist/ui/web-terminal/terminal.js +9 -9
  272. package/dist/update-launch.js +4 -1
  273. package/dist/update-launch.js.map +1 -1
  274. package/dist/update-npm-env.d.ts +70 -0
  275. package/dist/update-npm-env.js +128 -0
  276. package/dist/update-npm-env.js.map +1 -0
  277. package/dist/usage/format-rich.js +1 -1
  278. package/dist/usage/format-rich.js.map +1 -1
  279. package/dist/usage/providers.js +2 -2
  280. package/dist/usage/providers.js.map +1 -1
  281. package/dist/usage/usage-api.d.ts +8 -2
  282. package/dist/usage/usage-api.js +12 -5
  283. package/dist/usage/usage-api.js.map +1 -1
  284. package/dist/web-api.d.ts +38 -4
  285. package/dist/web-api.js +370 -18
  286. package/dist/web-api.js.map +1 -1
  287. package/dist/web-auth.js +1 -1
  288. package/dist/web-auth.js.map +1 -1
  289. package/dist/web-backend-login.d.ts +2 -0
  290. package/dist/web-backend-login.js.map +1 -1
  291. package/dist/web-channel-echo.js +3 -1
  292. package/dist/web-channel-echo.js.map +1 -1
  293. package/dist/web-commands.d.ts +9 -1
  294. package/dist/web-commands.js +7 -1
  295. package/dist/web-commands.js.map +1 -1
  296. package/dist/web-host-install.d.ts +127 -0
  297. package/dist/web-host-install.js +165 -0
  298. package/dist/web-host-install.js.map +1 -0
  299. package/dist/web-remote-access.d.ts +194 -11
  300. package/dist/web-remote-access.js +458 -34
  301. package/dist/web-remote-access.js.map +1 -1
  302. package/dist/web-session.d.ts +11 -3
  303. package/dist/web-session.js.map +1 -1
  304. package/dist/web-signin-device.d.ts +16 -0
  305. package/dist/web-signin-device.js +81 -0
  306. package/dist/web-signin-device.js.map +1 -0
  307. package/dist/web-update.js +3 -1
  308. package/dist/web-update.js.map +1 -1
  309. package/dist/windows-cli-api.js +2 -1
  310. package/dist/windows-cli-api.js.map +1 -1
  311. package/dist/windows-cli-worker.d.ts +14 -0
  312. package/dist/windows-cli-worker.js +145 -1
  313. package/dist/windows-cli-worker.js.map +1 -1
  314. package/dist/windows-cli.d.ts +4 -0
  315. package/dist/windows-cli.js +9 -1
  316. package/dist/windows-cli.js.map +1 -1
  317. package/launcher/agend-install.cjs +16 -3
  318. package/package.json +1 -1
  319. package/templates/runtime-install/install.ps1 +219 -12
@@ -11,25 +11,134 @@ export declare const MANAGED_CLI_ROOT_ENV = "AGEND_MANAGED_CLI_ROOT";
11
11
  export declare const managedCliRoot: (pairingDirectory: string) => string;
12
12
  /** The CLIs this Runtime installs (cli-registry.ts: `runtime.install`); the table below must have a pinned entry for each, and for no other. */
13
13
  export type InstallableCliId = RuntimeCliWith<"install">;
14
- export interface InstallableCli {
14
+ interface InstallableBase {
15
15
  id: InstallableCliId;
16
- /** The package to install and the exact version, never "latest". Its hashes below belong to exactly this version. */
17
- spec: string;
16
+ /** The exact version, never "latest". Everything pinned in the entry belongs to exactly this version. */
18
17
  version: string;
19
- /** Registry sha512 of each package that lands, by node_modules path inside the install folder. */
20
- integrity: Readonly<Record<string, string>>;
21
18
  /** Where the runnable file is, relative to the install folder, and who must have signed it. */
22
19
  native: {
23
20
  path: string;
24
21
  signer: ExpectedSigner;
25
22
  };
26
23
  }
24
+ /** An npm package and the registry's sha512 of every package that lands, by node_modules path inside the install folder. */
25
+ export interface NpmInstallableCli extends InstallableBase {
26
+ kind: "npm";
27
+ spec: string;
28
+ integrity: Readonly<Record<string, string>>;
29
+ }
30
+ /**
31
+ * A single file at one exact address (the vendor's own versioned, immutable file): its size and sha512 (lower-case hex) are pinned. It is saved as `native.path` inside the install
32
+ * folder. The address is ours; the server and the page never supply one.
33
+ */
34
+ export interface DownloadInstallableCli extends InstallableBase {
35
+ kind: "download";
36
+ url: string;
37
+ bytes: number;
38
+ sha512: string;
39
+ /** AGEND-153: the size is not known beforehand (the vendor's manifest does not carry it): `bytes` is then the most the file may be, not its exact size. Only a release read from `LATEST_UNAUDITED`. */
40
+ anySize?: true;
41
+ }
42
+ export type InstallableCli = NpmInstallableCli | DownloadInstallableCli;
27
43
  /** The certificate subject's CN and O that must both be exactly this (not a prefix, not a pattern). */
28
44
  export interface ExpectedSigner {
29
45
  cn: string;
30
46
  o: string;
31
47
  }
32
- export declare const INSTALLABLE_CLIS: Readonly<Record<InstallableCliId, InstallableCli>>;
48
+ export declare const INSTALLABLE_CLIS: Readonly<{
49
+ "claude-code": {
50
+ id: "claude-code";
51
+ kind: "npm";
52
+ spec: string;
53
+ version: string;
54
+ integrity: {
55
+ "node_modules/@anthropic-ai/claude-code": string;
56
+ "node_modules/@anthropic-ai/claude-code-win32-x64": string;
57
+ };
58
+ native: {
59
+ path: string;
60
+ signer: {
61
+ cn: string;
62
+ o: string;
63
+ };
64
+ };
65
+ };
66
+ codex: {
67
+ id: "codex";
68
+ kind: "npm";
69
+ spec: string;
70
+ version: string;
71
+ integrity: {
72
+ "node_modules/@openai/codex": string;
73
+ "node_modules/@openai/codex-win32-x64": string;
74
+ };
75
+ native: {
76
+ path: string;
77
+ signer: {
78
+ cn: string;
79
+ o: string;
80
+ };
81
+ };
82
+ };
83
+ antigravity: {
84
+ id: "antigravity";
85
+ kind: "download";
86
+ version: string;
87
+ url: string;
88
+ bytes: number;
89
+ sha512: string;
90
+ native: {
91
+ path: string;
92
+ signer: {
93
+ cn: string;
94
+ o: string;
95
+ };
96
+ };
97
+ };
98
+ opencode: {
99
+ id: "opencode";
100
+ kind: "npm";
101
+ spec: string;
102
+ version: string;
103
+ integrity: {
104
+ "node_modules/opencode-ai": string;
105
+ "node_modules/opencode-windows-x64": string;
106
+ "node_modules/opencode-windows-x64-baseline": string;
107
+ };
108
+ native: {
109
+ path: string;
110
+ signer: {
111
+ cn: string;
112
+ o: string;
113
+ };
114
+ };
115
+ };
116
+ }>;
117
+ /**
118
+ * AGEND-153: where the newest release of a CLI whose Update is the named exception comes from. `manifest`: the vendor's own release information, one fixed address; `file`: the only shape of address
119
+ * a file may have (the vendor's own versioned, immutable storage path; capture 1 is the version, which must be the manifest's `version`); `maxBytes`: the most the file may be (the manifest names no size).
120
+ * Nothing the server or the page sends is ever part of any of it. tests/runtime-cli-install-latest-153.test.ts pins that this table and the registry's `runtime.update` of kind `latest-unaudited` name the same CLIs.
121
+ */
122
+ export declare const LATEST_UNAUDITED: Readonly<{
123
+ antigravity: {
124
+ manifest: string;
125
+ file: RegExp;
126
+ maxBytes: number;
127
+ };
128
+ }>;
129
+ export type LatestCliId = keyof typeof LATEST_UNAUDITED;
130
+ export declare const isLatestCli: (id: unknown) => id is LatestCliId;
131
+ /** One release a vendor manifest named, after every check of its shape. */
132
+ export interface LatestRelease {
133
+ version: string;
134
+ url: string;
135
+ sha512: string;
136
+ }
137
+ /**
138
+ * The vendor manifest as text → the release it names, or null for anything that is not exactly that: a JSON object whose `version` is three plain numbers, whose `sha512` is 128 hex digits, and whose
139
+ * `url` is the vendor's fixed address pattern for that very version. Extra fields are ignored (the vendor may add some); none of them is used.
140
+ */
141
+ export declare function parseLatestManifest(id: LatestCliId, text: string): LatestRelease | null;
33
142
  /**
34
143
  * A certificate subject as Windows prints it (`CN="Anthropic, PBC", O="Anthropic, PBC", L=..., C=US`) as a list of [type, value]. A value is either plain
35
144
  * (up to the next comma; `\\` escapes the next character) or in double quotes (a comma inside is part of the value, `""` is one quote). Anything it cannot
@@ -92,14 +201,32 @@ export interface InstallDeps {
92
201
  gate?: () => void;
93
202
  /** How long to wait before trying again to release the lock when a release failed (default 1 s). Tests shorten it. */
94
203
  releaseRetryMs?: number;
204
+ /** Tests only: a pinned download entry with a small file in place of the real one (the real pin is hundreds of MB). Production never sets it; nothing from the server can. */
205
+ pins?: Partial<Readonly<Record<InstallableCliId, InstallableCli>>>;
95
206
  }
96
- /** What a child npm may see: the Windows basics and the user's proxy/certificate settings, nothing else (same idea as nativeCliEnvironment). */
207
+ /** What any child of an install may see: the Windows basics and the user's proxy/certificate settings, nothing else (same idea as nativeCliEnvironment). */
208
+ export declare function passThroughEnvironment(source: NodeJS.ProcessEnv): NodeJS.ProcessEnv;
209
+ /** What a child npm may see: the pass-through environment plus npm's own settings. */
97
210
  export declare function installEnvironment(source: NodeJS.ProcessEnv, cache: string, config?: NpmConfigFiles, prefix?: string): NodeJS.ProcessEnv;
98
211
  /** The two controlled npm configuration files: npm refuses one file for both levels ("double-loading"), so the same text is written twice. */
99
212
  export interface NpmConfigFiles {
100
213
  user: string;
101
214
  global: string;
102
215
  }
216
+ /**
217
+ * The one command a pinned download runs, fixed text. The address and the file travel in the environment (AGEND_DOWNLOAD_URL / AGEND_DOWNLOAD_FILE), never in this text, and both come from
218
+ * the pin in the table. It is Windows PowerShell's own `Invoke-WebRequest`, so the computer's proxy and its certificate store (a company that inspects TLS) apply as they do for the
219
+ * user's own downloads. Nothing it fetched is run. AGEND-154 (Prism P2-2 on #3552): it follows NO redirect (`-MaximumRedirection 0`, where Windows PowerShell 5.1 would follow five; a 3xx answer is then an error, which is `exit 1`): the fixed address is the only place the
220
+ * file may come from, so an official starting address cannot hand the fetch to another origin. The sha512 and the signer checks below are unchanged. What it saved is only believed after the Runtime has checked its size and sha512 against the pin and Windows has checked its signature.
221
+ */
222
+ export declare const DOWNLOAD_COMMAND: string;
223
+ /**
224
+ * AGEND-153: the one command that reads the vendor's release information, fixed text like `DOWNLOAD_COMMAND`: the address travels in the environment (AGEND_DOWNLOAD_URL), it is Windows PowerShell's own
225
+ * `Invoke-WebRequest` (the computer's proxy and certificate store apply; AGEND-154: no redirect is followed and a 3xx fails, as for `DOWNLOAD_COMMAND`), and what it fetched is only printed. The Runtime parses the output as data (`parseLatestManifest`); nothing in it is run.
226
+ */
227
+ export declare const MANIFEST_COMMAND: string;
228
+ /** sha512 of a file as lower-case hex, read as a stream (the download can be hundreds of MB). */
229
+ export declare const sha512OfFile: (file: string) => Promise<string>;
103
230
  /** Windows' own answer about who signed a file (Get-AuthenticodeSignature through Windows PowerShell; the path travels in the environment, never in the command text). */
104
231
  export declare const windowsSignerOf: (file: string, run?: (file: string, args: string[], options: {
105
232
  cwd: string;
@@ -132,7 +259,13 @@ export declare function managedInstallRoot(from?: string): string | null;
132
259
  * - One deadline covers every step. The Runtime stopping ends it as `cancelled`; the deadline ends it as `timed-out`.
133
260
  * - The new folder replaces an old one by moving the old one aside (`<version>.old`), never by deleting it first: if the swap fails, the old one is moved back.
134
261
  */
135
- export declare function installManagedCli(id: unknown, deps: InstallDeps): Promise<InstallResult>;
262
+ export declare function installManagedCli(id: unknown, deps: InstallDeps, latest?: LatestRelease): Promise<InstallResult>;
263
+ /**
264
+ * AGEND-153: Update to the vendor's newest release (the named exception; `LATEST_UNAUDITED`). Reads the vendor's manifest from its one fixed address, checks its shape (`parseLatestManifest`), and
265
+ * installs that release exactly as a pinned download is installed (`installManagedCli`): size ceiling, sha512 against the manifest, the Authenticode signer, the lock, the swap. A manifest that cannot
266
+ * be read or is not the expected shape refuses the update before anything is written. The Runtime's live admission (`gate`) is asked before the fetch, as before every other step.
267
+ */
268
+ export declare function updateManagedCliToLatest(id: unknown, deps: InstallDeps): Promise<InstallResult>;
136
269
  /** What an install answers: the version that landed and where its program is; `ended` only when the lock could not be given back yet (settles when it has been). */
137
270
  export interface InstallResult {
138
271
  version: string;
@@ -152,4 +285,11 @@ export declare function managedInstaller(deps: Omit<InstallDeps, "signal" | "gat
152
285
  ended?: Promise<unknown>;
153
286
  }>;
154
287
  running(): boolean;
288
+ /** AGEND-153: the CLIs whose Update goes to the vendor's newest release (the named exception), and that update. */
289
+ knowsLatest(cli: string): boolean;
290
+ update(cli: string, gate?: () => void): Promise<{
291
+ version: string;
292
+ ended?: Promise<unknown>;
293
+ }>;
155
294
  };
295
+ export {};