@songsid/agend 2.4.0-beta.23 → 2.4.0-beta.25

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 (499) hide show
  1. package/README.md +1 -1
  2. package/README.zh-TW.md +1 -1
  3. package/dist/agend-home.js +5 -5
  4. package/dist/agend-home.js.map +1 -1
  5. package/dist/agent-cli-instructions.md +4 -3
  6. package/dist/agent-cli.js +32 -2
  7. package/dist/agent-cli.js.map +1 -1
  8. package/dist/agent-endpoint.js +10 -0
  9. package/dist/agent-endpoint.js.map +1 -1
  10. package/dist/agent-file-read.js +2 -2
  11. package/dist/agent-file-read.js.map +1 -1
  12. package/dist/agent-whats-new.js +11 -1
  13. package/dist/agent-whats-new.js.map +1 -1
  14. package/dist/agent-workspace.d.ts +18 -2
  15. package/dist/agent-workspace.js +15 -4
  16. package/dist/agent-workspace.js.map +1 -1
  17. package/dist/backend/antigravity.js +8 -6
  18. package/dist/backend/antigravity.js.map +1 -1
  19. package/dist/backend/claude-code.d.ts +15 -0
  20. package/dist/backend/claude-code.js +25 -3
  21. package/dist/backend/claude-code.js.map +1 -1
  22. package/dist/backend/claude-mcp-carry.d.ts +63 -0
  23. package/dist/backend/claude-mcp-carry.js +242 -0
  24. package/dist/backend/claude-mcp-carry.js.map +1 -0
  25. package/dist/backend/claude-usage-credits.d.ts +8 -0
  26. package/dist/backend/claude-usage-credits.js +121 -0
  27. package/dist/backend/claude-usage-credits.js.map +1 -0
  28. package/dist/backend/types.d.ts +30 -0
  29. package/dist/backend/types.js.map +1 -1
  30. package/dist/build-provenance.json +1 -1
  31. package/dist/channel/adapters/discord.js +7 -1
  32. package/dist/channel/adapters/discord.js.map +1 -1
  33. package/dist/channel/mcp-tools.js +7 -6
  34. package/dist/channel/mcp-tools.js.map +1 -1
  35. package/dist/channel/tool-router.js +1 -0
  36. package/dist/channel/tool-router.js.map +1 -1
  37. package/dist/cli-audited.js +9 -4
  38. package/dist/cli-audited.js.map +1 -1
  39. package/dist/cli.js +184 -21
  40. package/dist/cli.js.map +1 -1
  41. package/dist/config-validator.js +17 -1
  42. package/dist/config-validator.js.map +1 -1
  43. package/dist/config.js +2 -0
  44. package/dist/config.js.map +1 -1
  45. package/dist/contact-auth-store.d.ts +18 -0
  46. package/dist/contact-auth-store.js +55 -8
  47. package/dist/contact-auth-store.js.map +1 -1
  48. package/dist/contact-auth-types.d.ts +3 -0
  49. package/dist/contact-auth-types.js.map +1 -1
  50. package/dist/contact-change-proposals.d.ts +34 -0
  51. package/dist/contact-change-proposals.js +1 -1
  52. package/dist/contact-change-proposals.js.map +1 -1
  53. package/dist/cross-instance-notice.d.ts +1 -0
  54. package/dist/cross-instance-notice.js +9 -8
  55. package/dist/cross-instance-notice.js.map +1 -1
  56. package/dist/daemon.d.ts +46 -0
  57. package/dist/daemon.js +299 -33
  58. package/dist/daemon.js.map +1 -1
  59. package/dist/dashboard-permissions.d.ts +8 -0
  60. package/dist/dashboard-permissions.js +8 -0
  61. package/dist/dashboard-permissions.js.map +1 -1
  62. package/dist/delivery-outbox.d.ts +56 -1
  63. package/dist/delivery-outbox.js +254 -22
  64. package/dist/delivery-outbox.js.map +1 -1
  65. package/dist/fleet-context.d.ts +8 -0
  66. package/dist/fleet-lock.d.ts +67 -2
  67. package/dist/fleet-lock.js +236 -2
  68. package/dist/fleet-lock.js.map +1 -1
  69. package/dist/fleet-manager.d.ts +177 -6
  70. package/dist/fleet-manager.js +1203 -75
  71. package/dist/fleet-manager.js.map +1 -1
  72. package/dist/fleet-windows-runtime.d.ts +20 -1
  73. package/dist/fleet-windows-runtime.js +98 -18
  74. package/dist/fleet-windows-runtime.js.map +1 -1
  75. package/dist/general-knowledge/skills/concepts/SKILL.md +22 -9
  76. package/dist/general-knowledge/skills/credential-profiles/SKILL.md +6 -0
  77. package/dist/general-knowledge/skills/cross-instance-messaging/SKILL.md +7 -0
  78. package/dist/general-knowledge/skills/fleet-config/SKILL.md +3 -3
  79. package/dist/general-knowledge/skills/instance-lifecycle/SKILL.md +1 -1
  80. package/dist/general-knowledge/skills/task-board/SKILL.md +17 -0
  81. package/dist/general-knowledge/skills/web-appearance/SKILL.md +4 -0
  82. package/dist/general-knowledge/skills/web-dashboard/SKILL.md +35 -7
  83. package/dist/home-update-lock.d.ts +35 -0
  84. package/dist/home-update-lock.js +81 -0
  85. package/dist/home-update-lock.js.map +1 -0
  86. package/dist/hub/compose/member.d.ts +5 -1
  87. package/dist/hub/compose/member.js +9 -5
  88. package/dist/hub/compose/member.js.map +1 -1
  89. package/dist/hub/group-policy/resources.d.ts +1 -1
  90. package/dist/hub/member/room-ask.d.ts +5 -0
  91. package/dist/hub/member/room-ask.js +43 -16
  92. package/dist/hub/member/room-ask.js.map +1 -1
  93. package/dist/hub/member/room-mention-feedback.d.ts +2 -0
  94. package/dist/hub/member/room-mention-feedback.js +1 -1
  95. package/dist/hub/member/room-mention-feedback.js.map +1 -1
  96. package/dist/hub/member/room-post-answers.d.ts +2 -0
  97. package/dist/hub/member/room-post-answers.js +1 -1
  98. package/dist/hub/member/room-post-answers.js.map +1 -1
  99. package/dist/hub/member/room-post.d.ts +5 -0
  100. package/dist/hub/member/room-post.js +4 -1
  101. package/dist/hub/member/room-post.js.map +1 -1
  102. package/dist/hub/member/updates.d.ts +7 -1
  103. package/dist/hub/member/updates.js +7 -1
  104. package/dist/hub/member/updates.js.map +1 -1
  105. package/dist/hub/representative.d.ts +7 -0
  106. package/dist/hub/representative.js +38 -5
  107. package/dist/hub/representative.js.map +1 -1
  108. package/dist/install-lock.d.ts +15 -1
  109. package/dist/install-lock.js +16 -8
  110. package/dist/install-lock.js.map +1 -1
  111. package/dist/install-ownership.d.ts +165 -0
  112. package/dist/install-ownership.js +404 -0
  113. package/dist/install-ownership.js.map +1 -0
  114. package/dist/instance-config-impact.js +2 -0
  115. package/dist/instance-config-impact.js.map +1 -1
  116. package/dist/instance-lifecycle.d.ts +2 -0
  117. package/dist/instance-lifecycle.js +29 -1
  118. package/dist/instance-lifecycle.js.map +1 -1
  119. package/dist/instructions.d.ts +4 -0
  120. package/dist/instructions.js +4 -0
  121. package/dist/instructions.js.map +1 -1
  122. package/dist/local-pane-endpoint.d.ts +4 -1
  123. package/dist/local-pane-endpoint.js +12 -2
  124. package/dist/local-pane-endpoint.js.map +1 -1
  125. package/dist/locale.js +170 -4
  126. package/dist/locale.js.map +1 -1
  127. package/dist/native-agent-admission.d.ts +7 -0
  128. package/dist/native-agent-admission.js +46 -3
  129. package/dist/native-agent-admission.js.map +1 -1
  130. package/dist/native-mcp.d.ts +16 -1
  131. package/dist/native-mcp.js +38 -5
  132. package/dist/native-mcp.js.map +1 -1
  133. package/dist/native-pane-lifecycle.d.ts +9 -0
  134. package/dist/native-pane-lifecycle.js +23 -0
  135. package/dist/native-pane-lifecycle.js.map +1 -1
  136. package/dist/native-pane-manager.d.ts +19 -6
  137. package/dist/native-pane-manager.js +79 -4
  138. package/dist/native-pane-manager.js.map +1 -1
  139. package/dist/needs-you-hub.d.ts +3 -0
  140. package/dist/needs-you-hub.js +31 -5
  141. package/dist/needs-you-hub.js.map +1 -1
  142. package/dist/needs-you.d.ts +22 -1
  143. package/dist/needs-you.js +6 -0
  144. package/dist/needs-you.js.map +1 -1
  145. package/dist/office-share-page.js +1 -1
  146. package/dist/office-share-page.js.map +1 -1
  147. package/dist/office-share.js +2 -1
  148. package/dist/office-share.js.map +1 -1
  149. package/dist/outbound-handlers.d.ts +12 -0
  150. package/dist/outbound-handlers.js +59 -8
  151. package/dist/outbound-handlers.js.map +1 -1
  152. package/dist/outbound-schemas.d.ts +3 -0
  153. package/dist/outbound-schemas.js +7 -5
  154. package/dist/outbound-schemas.js.map +1 -1
  155. package/dist/package-preimage.js +4 -0
  156. package/dist/package-preimage.js.map +1 -1
  157. package/dist/pane-port.d.ts +1 -0
  158. package/dist/plist-args.d.ts +9 -0
  159. package/dist/plist-args.js +22 -0
  160. package/dist/plist-args.js.map +1 -0
  161. package/dist/public-preview.d.ts +4 -6
  162. package/dist/public-preview.js +5 -2
  163. package/dist/public-preview.js.map +1 -1
  164. package/dist/public-web-gateway.js +11 -3
  165. package/dist/public-web-gateway.js.map +1 -1
  166. package/dist/public-web-link.d.ts +13 -1
  167. package/dist/public-web-link.js +28 -1
  168. package/dist/public-web-link.js.map +1 -1
  169. package/dist/recover.cjs +2452 -0
  170. package/dist/remote-card-prompt.d.ts +6 -2
  171. package/dist/remote-card-prompt.js +12 -3
  172. package/dist/remote-card-prompt.js.map +1 -1
  173. package/dist/reply-draft.d.ts +12 -0
  174. package/dist/reply-draft.js +81 -0
  175. package/dist/reply-draft.js.map +1 -0
  176. package/dist/request-contact-api.d.ts +15 -0
  177. package/dist/request-contact-api.js +120 -0
  178. package/dist/request-contact-api.js.map +1 -0
  179. package/dist/request-contact-card.d.ts +36 -0
  180. package/dist/request-contact-card.js +206 -0
  181. package/dist/request-contact-card.js.map +1 -0
  182. package/dist/request-contact-gate.d.ts +79 -0
  183. package/dist/request-contact-gate.js +262 -0
  184. package/dist/request-contact-gate.js.map +1 -0
  185. package/dist/request-contact-native.d.ts +52 -0
  186. package/dist/request-contact-native.js +83 -0
  187. package/dist/request-contact-native.js.map +1 -0
  188. package/dist/request-contact-types.d.ts +86 -0
  189. package/dist/request-contact-types.js +7 -0
  190. package/dist/request-contact-types.js.map +1 -0
  191. package/dist/request-context-call-protocol.d.ts +12 -0
  192. package/dist/request-context-call-protocol.js +14 -0
  193. package/dist/request-context-call-protocol.js.map +1 -0
  194. package/dist/request-context-call.d.ts +22 -0
  195. package/dist/request-context-call.js +35 -0
  196. package/dist/request-context-call.js.map +1 -0
  197. package/dist/request-context-compatibility.d.ts +20 -0
  198. package/dist/request-context-compatibility.js +74 -0
  199. package/dist/request-context-compatibility.js.map +1 -0
  200. package/dist/request-context-drain.d.ts +39 -0
  201. package/dist/request-context-drain.js +159 -0
  202. package/dist/request-context-drain.js.map +1 -0
  203. package/dist/request-context-fence.d.ts +28 -0
  204. package/dist/request-context-fence.js +58 -0
  205. package/dist/request-context-fence.js.map +1 -0
  206. package/dist/request-context-migration.d.ts +64 -0
  207. package/dist/request-context-migration.js +158 -0
  208. package/dist/request-context-migration.js.map +1 -0
  209. package/dist/request-context-pane.d.ts +25 -0
  210. package/dist/request-context-pane.js +48 -0
  211. package/dist/request-context-pane.js.map +1 -0
  212. package/dist/request-context-policy.d.ts +74 -0
  213. package/dist/request-context-policy.js +116 -0
  214. package/dist/request-context-policy.js.map +1 -0
  215. package/dist/request-context-protocol.d.ts +137 -0
  216. package/dist/request-context-protocol.js +38 -0
  217. package/dist/request-context-protocol.js.map +1 -0
  218. package/dist/request-context-recovery.d.ts +14 -0
  219. package/dist/request-context-recovery.js +56 -0
  220. package/dist/request-context-recovery.js.map +1 -0
  221. package/dist/request-context-relay.d.ts +19 -0
  222. package/dist/request-context-relay.js +63 -0
  223. package/dist/request-context-relay.js.map +1 -0
  224. package/dist/request-context-returns.d.ts +67 -0
  225. package/dist/request-context-returns.js +211 -0
  226. package/dist/request-context-returns.js.map +1 -0
  227. package/dist/request-context-store.d.ts +26 -0
  228. package/dist/request-context-store.js +144 -0
  229. package/dist/request-context-store.js.map +1 -0
  230. package/dist/request-context-turns.d.ts +99 -0
  231. package/dist/request-context-turns.js +215 -0
  232. package/dist/request-context-turns.js.map +1 -0
  233. package/dist/request-context-view.d.ts +33 -0
  234. package/dist/request-context-view.js +36 -0
  235. package/dist/request-context-view.js.map +1 -0
  236. package/dist/request-hub-context.d.ts +130 -0
  237. package/dist/request-hub-context.js +89 -0
  238. package/dist/request-hub-context.js.map +1 -0
  239. package/dist/request-hub-output.d.ts +11 -0
  240. package/dist/request-hub-output.js +21 -0
  241. package/dist/request-hub-output.js.map +1 -0
  242. package/dist/runtime-cli-install.js +13 -11
  243. package/dist/runtime-cli-install.js.map +1 -1
  244. package/dist/runtime-client.d.ts +2 -0
  245. package/dist/runtime-client.js +17 -4
  246. package/dist/runtime-client.js.map +1 -1
  247. package/dist/runtime-coordinator.d.ts +4 -1
  248. package/dist/runtime-coordinator.js +10 -3
  249. package/dist/runtime-coordinator.js.map +1 -1
  250. package/dist/runtime-pane-assets.d.ts +1 -1
  251. package/dist/runtime-pane-assets.js +1 -1
  252. package/dist/runtime-pane-assets.js.map +1 -1
  253. package/dist/runtime-pane-host.d.ts +3 -0
  254. package/dist/runtime-pane-host.js +39 -21
  255. package/dist/runtime-pane-host.js.map +1 -1
  256. package/dist/runtime-pane-link.d.ts +6 -2
  257. package/dist/runtime-pane-link.js +17 -4
  258. package/dist/runtime-pane-link.js.map +1 -1
  259. package/dist/runtime-pane-mcp-relay.d.ts +11 -1
  260. package/dist/runtime-pane-mcp-relay.js +69 -3
  261. package/dist/runtime-pane-mcp-relay.js.map +1 -1
  262. package/dist/runtime-pane-mcp.d.ts +28 -1
  263. package/dist/runtime-pane-mcp.js +92 -15
  264. package/dist/runtime-pane-mcp.js.map +1 -1
  265. package/dist/runtime-pane-port.d.ts +6 -0
  266. package/dist/runtime-pane-port.js +23 -4
  267. package/dist/runtime-pane-port.js.map +1 -1
  268. package/dist/runtime-pane-protocol.d.ts +4 -0
  269. package/dist/runtime-pane-protocol.js +11 -4
  270. package/dist/runtime-pane-protocol.js.map +1 -1
  271. package/dist/runtime-pane-service.d.ts +1 -0
  272. package/dist/runtime-pane-service.js +25 -9
  273. package/dist/runtime-pane-service.js.map +1 -1
  274. package/dist/runtime-pane-stdio-protocol.d.ts +4 -0
  275. package/dist/runtime-pane-stdio-protocol.js +12 -5
  276. package/dist/runtime-pane-stdio-protocol.js.map +1 -1
  277. package/dist/runtime-pane-stdio.js +5 -5
  278. package/dist/runtime-pane-stdio.js.map +1 -1
  279. package/dist/runtime-protocol.d.ts +3 -0
  280. package/dist/runtime-protocol.js.map +1 -1
  281. package/dist/scheduler/db.js +26 -0
  282. package/dist/scheduler/db.js.map +1 -1
  283. package/dist/scheduler/scheduler.d.ts +6 -0
  284. package/dist/scheduler/scheduler.js +19 -1
  285. package/dist/scheduler/scheduler.js.map +1 -1
  286. package/dist/scheduler/task-board-text.d.ts +2 -0
  287. package/dist/scheduler/task-board-text.js +12 -0
  288. package/dist/scheduler/task-board-text.js.map +1 -1
  289. package/dist/scheduler/task-board.d.ts +106 -2
  290. package/dist/scheduler/task-board.js +248 -24
  291. package/dist/scheduler/task-board.js.map +1 -1
  292. package/dist/scheduler/task-files.d.ts +80 -0
  293. package/dist/scheduler/task-files.js +357 -0
  294. package/dist/scheduler/task-files.js.map +1 -0
  295. package/dist/scheduler/types.d.ts +1 -1
  296. package/dist/service-activation.js +3 -13
  297. package/dist/service-activation.js.map +1 -1
  298. package/dist/service-lock.d.ts +28 -0
  299. package/dist/service-lock.js +85 -0
  300. package/dist/service-lock.js.map +1 -0
  301. package/dist/settings-api.d.ts +8 -0
  302. package/dist/settings-api.js +41 -1
  303. package/dist/settings-api.js.map +1 -1
  304. package/dist/settings-baseline.d.ts +1 -0
  305. package/dist/settings-baseline.js +1 -1
  306. package/dist/settings-baseline.js.map +1 -1
  307. package/dist/settings-change.js +1 -1
  308. package/dist/settings-change.js.map +1 -1
  309. package/dist/settings-effect.d.ts +2 -0
  310. package/dist/settings-effect.js +5 -1
  311. package/dist/settings-effect.js.map +1 -1
  312. package/dist/state-lease.d.ts +24 -0
  313. package/dist/state-lease.js +103 -0
  314. package/dist/state-lease.js.map +1 -0
  315. package/dist/task-attach-client.d.ts +43 -0
  316. package/dist/task-attach-client.js +125 -0
  317. package/dist/task-attach-client.js.map +1 -0
  318. package/dist/task-board-tool.d.ts +12 -0
  319. package/dist/task-board-tool.js +107 -6
  320. package/dist/task-board-tool.js.map +1 -1
  321. package/dist/task-file-limits.d.ts +15 -0
  322. package/dist/task-file-limits.js +21 -0
  323. package/dist/task-file-limits.js.map +1 -0
  324. package/dist/tmux-binary.js +1 -1
  325. package/dist/tmux-binary.js.map +1 -1
  326. package/dist/tool-permissions.d.ts +32 -0
  327. package/dist/tool-permissions.js +63 -0
  328. package/dist/tool-permissions.js.map +1 -1
  329. package/dist/tool-receipt-output.d.ts +2 -0
  330. package/dist/topic-commands.js +21 -1
  331. package/dist/topic-commands.js.map +1 -1
  332. package/dist/transcript-monitor.js +3 -0
  333. package/dist/transcript-monitor.js.map +1 -1
  334. package/dist/tunnel/named-link-test.d.ts +27 -0
  335. package/dist/tunnel/named-link-test.js +41 -0
  336. package/dist/tunnel/named-link-test.js.map +1 -1
  337. package/dist/types.d.ts +13 -0
  338. package/dist/ui/agent-details-settings.js +7 -5
  339. package/dist/ui/agent-who-can-use-strings.js +125 -0
  340. package/dist/ui/agent-who-can-use.js +238 -0
  341. package/dist/ui/chat-store.js +5 -4
  342. package/dist/ui/fleet-office-card.js +37 -6
  343. package/dist/ui/fleet-office-editor.js +5 -5
  344. package/dist/ui/fleet-office-pack.d.ts +10 -0
  345. package/dist/ui/fleet-office-pack.js +65 -2
  346. package/dist/ui/fleet-office-skin.js +75 -17
  347. package/dist/ui/fleet-office-store.js +33 -2
  348. package/dist/ui/fleet-office-vehicles.js +130 -0
  349. package/dist/ui/fleet-office-zones.js +13 -4
  350. package/dist/ui/fleet-office.js +245 -46
  351. package/dist/ui/fleet-task-activity.js +9 -82
  352. package/dist/ui/fleet-task-archive.js +111 -0
  353. package/dist/ui/fleet-task-card.js +6 -4
  354. package/dist/ui/fleet-task-common.js +2 -2
  355. package/dist/ui/fleet-task-edit.js +8 -1
  356. package/dist/ui/fleet-task-files.js +196 -0
  357. package/dist/ui/fleet-task-md.js +98 -0
  358. package/dist/ui/fleet-task-menu.js +1 -1
  359. package/dist/ui/fleet-task-stats.js +2 -2
  360. package/dist/ui/fleet-task-view.js +12 -8
  361. package/dist/ui/fleet-tasks.js +42 -18
  362. package/dist/ui/panel-chat.js +15 -2
  363. package/dist/ui/panel-details.js +3 -1
  364. package/dist/ui/panel-needs.js +25 -5
  365. package/dist/ui/panel-settings.js +37 -9
  366. package/dist/ui/settings-preview-address.js +156 -0
  367. package/dist/ui/settings-registry.js +3 -0
  368. package/dist/ui/settings-shared-strings.js +9 -0
  369. package/dist/ui/settings-shared.js +6 -1
  370. package/dist/ui/settings-strings.js +6 -6
  371. package/dist/ui/shared/app-i18n.js +2 -2
  372. package/dist/ui/shared/app-needs.js +8 -1
  373. package/dist/ui/shared/app.css +131 -5
  374. package/dist/ui/shared/chat-strings.js +10 -6
  375. package/dist/ui/shared/chat-thread.js +7 -1
  376. package/dist/ui/shared/preview-panel.js +1 -1
  377. package/dist/ui/shared/preview.js +11 -2
  378. package/dist/ui/shared/task-board.css +64 -0
  379. package/dist/ui/shared/tokens.css +18 -3
  380. package/dist/ui/shared/ui-confirm.js +5 -4
  381. package/dist/ui/shared/workspace.css +7 -0
  382. package/dist/ui/usage-credits-card.js +84 -0
  383. package/dist/ui/workspace-ignored-strings.js +16 -0
  384. package/dist/ui/workspace-panel.js +15 -6
  385. package/dist/update-card.d.ts +193 -0
  386. package/dist/update-card.js +620 -0
  387. package/dist/update-card.js.map +1 -0
  388. package/dist/update-dispatch.d.ts +16 -1
  389. package/dist/update-dispatch.js +12 -4
  390. package/dist/update-dispatch.js.map +1 -1
  391. package/dist/update-forward.d.ts +73 -0
  392. package/dist/update-forward.js +283 -0
  393. package/dist/update-forward.js.map +1 -0
  394. package/dist/update-idle.d.ts +1 -0
  395. package/dist/update-idle.js +12 -3
  396. package/dist/update-idle.js.map +1 -1
  397. package/dist/update-install.d.ts +2 -1
  398. package/dist/update-install.js +18 -10
  399. package/dist/update-install.js.map +1 -1
  400. package/dist/update-journal.d.ts +351 -0
  401. package/dist/update-journal.js +717 -0
  402. package/dist/update-journal.js.map +1 -0
  403. package/dist/update-launch.js +1 -1
  404. package/dist/update-launch.js.map +1 -1
  405. package/dist/update-npm-env.d.ts +45 -12
  406. package/dist/update-npm-env.js +48 -0
  407. package/dist/update-npm-env.js.map +1 -1
  408. package/dist/update-package-restore.d.ts +75 -0
  409. package/dist/update-package-restore.js +318 -0
  410. package/dist/update-package-restore.js.map +1 -0
  411. package/dist/update-quiescence.d.ts +192 -0
  412. package/dist/update-quiescence.js +330 -0
  413. package/dist/update-quiescence.js.map +1 -0
  414. package/dist/update-readiness-host.d.ts +61 -0
  415. package/dist/update-readiness-host.js +297 -0
  416. package/dist/update-readiness-host.js.map +1 -0
  417. package/dist/update-readiness.d.ts +83 -0
  418. package/dist/update-readiness.js +459 -0
  419. package/dist/update-readiness.js.map +1 -0
  420. package/dist/update-recovery/kit.d.ts +35 -0
  421. package/dist/update-recovery/kit.js +99 -0
  422. package/dist/update-recovery/kit.js.map +1 -0
  423. package/dist/update-recovery/pre-start.d.ts +34 -0
  424. package/dist/update-recovery/pre-start.js +103 -0
  425. package/dist/update-recovery/pre-start.js.map +1 -0
  426. package/dist/update-recovery/recover-main.d.ts +1 -0
  427. package/dist/update-recovery/recover-main.js +4 -0
  428. package/dist/update-recovery/recover-main.js.map +1 -0
  429. package/dist/update-recovery/recover.d.ts +22 -0
  430. package/dist/update-recovery/recover.js +124 -0
  431. package/dist/update-recovery/recover.js.map +1 -0
  432. package/dist/update-recovery/route.d.ts +53 -0
  433. package/dist/update-recovery/route.js +262 -0
  434. package/dist/update-recovery/route.js.map +1 -0
  435. package/dist/update-recovery/runner.d.ts +58 -0
  436. package/dist/update-recovery/runner.js +196 -0
  437. package/dist/update-recovery/runner.js.map +1 -0
  438. package/dist/update-recovery/service-manager.d.ts +39 -0
  439. package/dist/update-recovery/service-manager.js +57 -0
  440. package/dist/update-recovery/service-manager.js.map +1 -0
  441. package/dist/update-restore.d.ts +44 -0
  442. package/dist/update-restore.js +355 -0
  443. package/dist/update-restore.js.map +1 -0
  444. package/dist/update-retained.d.ts +38 -0
  445. package/dist/update-retained.js +91 -0
  446. package/dist/update-retained.js.map +1 -0
  447. package/dist/update-rollback.d.ts +74 -0
  448. package/dist/update-rollback.js +221 -0
  449. package/dist/update-rollback.js.map +1 -0
  450. package/dist/update-settings.d.ts +36 -0
  451. package/dist/update-settings.js +122 -0
  452. package/dist/update-settings.js.map +1 -0
  453. package/dist/update-snapshot-manifest.d.ts +32 -0
  454. package/dist/update-snapshot-manifest.js +65 -0
  455. package/dist/update-snapshot-manifest.js.map +1 -0
  456. package/dist/update-snapshot-scope.d.ts +67 -0
  457. package/dist/update-snapshot-scope.js +172 -0
  458. package/dist/update-snapshot-scope.js.map +1 -0
  459. package/dist/update-snapshot.d.ts +34 -0
  460. package/dist/update-snapshot.js +246 -0
  461. package/dist/update-snapshot.js.map +1 -0
  462. package/dist/update-writers.d.ts +71 -0
  463. package/dist/update-writers.js +235 -0
  464. package/dist/update-writers.js.map +1 -0
  465. package/dist/web-api.d.ts +6 -0
  466. package/dist/web-api.js +140 -22
  467. package/dist/web-api.js.map +1 -1
  468. package/dist/web-chat-history.d.ts +7 -0
  469. package/dist/web-chat-history.js +15 -0
  470. package/dist/web-chat-history.js.map +1 -1
  471. package/dist/web-office-acts.d.ts +16 -0
  472. package/dist/web-office-acts.js +27 -9
  473. package/dist/web-office-acts.js.map +1 -1
  474. package/dist/web-office-pack-read.js +1 -1
  475. package/dist/web-office-pack-read.js.map +1 -1
  476. package/dist/web-office-skins.d.ts +5 -3
  477. package/dist/web-office-skins.js +20 -16
  478. package/dist/web-office-skins.js.map +1 -1
  479. package/dist/web-preview.d.ts +5 -0
  480. package/dist/web-preview.js +1 -1
  481. package/dist/web-preview.js.map +1 -1
  482. package/dist/web-settings-patch.d.ts +27 -0
  483. package/dist/web-settings-patch.js +67 -0
  484. package/dist/web-settings-patch.js.map +1 -1
  485. package/dist/web-update.d.ts +6 -0
  486. package/dist/windows-agents.d.ts +12 -0
  487. package/dist/windows-agents.js +5 -0
  488. package/dist/windows-agents.js.map +1 -1
  489. package/dist/workflow-templates/default.md +1 -0
  490. package/launcher/agend +4 -1
  491. package/launcher/agend-agent +4 -1
  492. package/launcher/agend-install.cjs +16 -8
  493. package/launcher/install-admission.d.cts +8 -0
  494. package/launcher/npm-allow-scripts.cjs +72 -0
  495. package/launcher/npm-global-prefix.cjs +81 -0
  496. package/launcher/postinstall.cjs +9 -8
  497. package/launcher/runtime-select.cjs +8 -2
  498. package/package.json +3 -2
  499. package/scripts/preinstall-guard.cjs +1 -1
@@ -72,6 +72,7 @@ import { DevicesCard } from "./settings-devices.js";
72
72
  import { AccessOverview, accessOverviewLabel } from "./settings-access-overview.js";
73
73
  import { HubSection, hubSectionText } from "./settings-hub-section.js";
74
74
  import { NamedLinkTest, setTypedTunnelToken } from "./settings-named-test.js";
75
+ import { FixedPreviewAddress, bareHost, previewHostPlaceholder, previewPortOf } from "./settings-preview-address.js";
75
76
  import { SignInList } from "./backend-signin.js";
76
77
  import { AccountsView, defaultsBackendOptions } from "./accounts-view.js"; // #3212: SignInList stays exported for a page that still imports it
77
78
  import { ProviderMark } from "./provider-marks.js";
@@ -163,6 +164,10 @@ export function SettingsPanel({ route, navKey }) {
163
164
  const stagedRef = useRef(staged);
164
165
  stagedRef.current = staged;
165
166
  const [dialog, setDialog] = useState(null); // { kind, ...props, key: navKey }
167
+ // M-3814: a section's open tab for this navigation, kept across the reload that remounts it after a save (its key
168
+ // moves with loadedAt): saving on Access → Sharing no longer drops back to Overview a moment later.
169
+ const tabMemory = useRef({ navKey: null, tabs: {} });
170
+ if (tabMemory.current.navKey !== navKey) tabMemory.current = { navKey, tabs: {} };
166
171
  const [search, setSearch] = useState("");
167
172
  // #2347: each section's draft while it is edited (settings-draft.js), and the epoch that remounts the sections when
168
173
  // the drafts go: a Save that went through whole, or Discard. A Save that failed keeps them (what did not land is staged
@@ -399,7 +404,7 @@ export function SettingsPanel({ route, navKey }) {
399
404
  // #2347: sections read `staged` (each change as staged, its extra fields kept: Guests carries its whole draft) and
400
405
  // `drafts` to come back to their edits; `draftEpoch` moves on Discard and after a Save to start them from what is saved.
401
406
  const ctx = data && !data.error ? makeCtx(data, setData, stage, unstage, reload, reloadLive, () => mount.current(),
402
- { drafts: drafts.current, draftEpoch, staged, savingDrafts: () => submitted.current,
407
+ { drafts: drafts.current, draftEpoch, staged, savingDrafts: () => submitted.current, tabMemory: tabMemory.current,
403
408
  savingStaged: () => (submitted.current || operationActive() ? submittedStaged.current : null) }) : null;
404
409
  // #1519 P7: "Connect a chat app" on the first-run card elsewhere came here for the wizard: it opens once the data is in.
405
410
  // #2347: it writes a connection and an agent at once — not while a fleet.yaml edit waits to be saved.
@@ -1098,6 +1103,9 @@ function taskBoardDefaults(d, f) {
1098
1103
  if (w[field] === false || hasOwn(tb, key)) out[key] = w[field]; else delete out[key];
1099
1104
  }
1100
1105
  if (w.wakeLeader !== saved.wakeLeader) { if (w.wakeLeader) out.leader = w.wakeLeader; else delete out.leader; }
1106
+ // M-3668: the archive age is kept as saved unless changed (nothing saved stays absent: the form shows the default).
1107
+ const days = f ? f.archiveDays : archiveForm(d).archiveDays;
1108
+ if (Number(days) !== Number(archiveForm(d).archiveDays)) out.archive_after_days = Number(days);
1101
1109
  return out;
1102
1110
  }
1103
1111
  /**
@@ -1108,6 +1116,13 @@ function wakesForm(d) {
1108
1116
  const tb = d.task_board || {};
1109
1117
  return { wakeComment: tb.comment_wakes !== false, wakeProgress: tb.progress_wakes !== false, wakeLeader: typeof tb.leader === "string" ? tb.leader.trim() : "" };
1110
1118
  }
1119
+ /** M-3668: `defaults.task_board.archive_after_days` as the form holds it (unset or not a whole number 0–3650: the default, 3). */
1120
+ const ARCHIVE_DAYS_DEFAULT = 3;
1121
+ function archiveForm(d) {
1122
+ const v = (d.task_board || {}).archive_after_days;
1123
+ return { archiveDays: String(Number.isInteger(v) && v >= 0 && v <= 3650 ? v : ARCHIVE_DAYS_DEFAULT) };
1124
+ }
1125
+ const daysInRange = (v) => { const n = Number(v); return String(v).trim() !== "" && Number.isInteger(n) && n >= 0 && n <= 3650 ? "" : "archiveRange"; };
1111
1126
  const minutesInRange = (v) => { const n = Number(v); return String(v).trim() !== "" && Number.isFinite(n) && n >= 1 && n <= 1440 ? "" : "livenessRange"; };
1112
1127
 
1113
1128
  /** General's form, from the saved defaults (`d`) and ClassicBot's (`c`). */
@@ -1125,6 +1140,8 @@ function generalForm(d, c, fleet = {}, schema = {}) {
1125
1140
  ...livenessForm(d),
1126
1141
  // Which task board news wakes an agent.
1127
1142
  ...wakesForm(d),
1143
+ // M-3668: when a finished card leaves the board.
1144
+ ...archiveForm(d),
1128
1145
  // #2347 §10 review: unset startup concurrency is automatic (deriveSpawnConcurrency: 2–10 by free memory and cores),
1129
1146
  // not 10 — an empty field, and a save that leaves it unset (the defaults merge replaces `startup` whole).
1130
1147
  concurrency: startup.concurrency == null ? "" : String(startup.concurrency), stagger: String(startup.stagger_delay_ms ?? 500),
@@ -1161,6 +1178,7 @@ function General({ ctx, part = "all" }) {
1161
1178
  const errors = {
1162
1179
  auto: nonNegative(f.auto), hang: positive(f.hang),
1163
1180
  liveQuiet: minutesInRange(f.liveQuiet), livePrompt: minutesInRange(f.livePrompt), liveCrash: minutesInRange(f.liveCrash),
1181
+ archiveDays: daysInRange(f.archiveDays),
1164
1182
  concurrency: f.concurrency.trim() !== "" && (!Number.isInteger(num(f.concurrency)) || num(f.concurrency) < 1 || num(f.concurrency) > 20) ? "concurrencyRange" : "",
1165
1183
  stagger: !Number.isFinite(num(f.stagger)) || f.stagger.trim() === "" || num(f.stagger) < 0 || num(f.stagger) > 30000 ? "staggerRange" : "",
1166
1184
  };
@@ -1174,7 +1192,7 @@ function General({ ctx, part = "all" }) {
1174
1192
  useEffect(() => {
1175
1193
  if (!ready) {
1176
1194
  // Where it is (#2382 review): the bar in another section names it and goes there.
1177
- const at = { auto: "#g-auto", hang: "#g-hang", concurrency: "#g-conc", stagger: "#g-stag", liveQuiet: "#g-live-quiet", livePrompt: "#g-live-prompt", liveCrash: "#g-live-crash" }[Object.keys(errors).find((k) => errors[k])];
1195
+ const at = { auto: "#g-auto", hang: "#g-hang", concurrency: "#g-conc", stagger: "#g-stag", liveQuiet: "#g-live-quiet", livePrompt: "#g-live-prompt", liveCrash: "#g-live-crash", archiveDays: "#g-archive-days" }[Object.keys(errors).find((k) => errors[k])];
1178
1196
  syncStage(ctx, "defaults:invalid", { label: tn("updateDefaults"), invalid: tn(firstError), section: "agent-defaults", target: at });
1179
1197
  return;
1180
1198
  }
@@ -1244,6 +1262,7 @@ function General({ ctx, part = "all" }) {
1244
1262
  return { liveOn: !hasOwn(lv, "enabled"), liveQuiet: !hasOwn(lv, "quiet_minutes"), livePrompt: !hasOwn(lv, "prompt_minutes"), liveCrash: !hasOwn(lv, "crash_grace_minutes") }; })(),
1245
1263
  // Each wake switch nobody set is the built-in default (on; no leader).
1246
1264
  wakeComment: !hasOwn(d.task_board || {}, "comment_wakes"), wakeProgress: !hasOwn(d.task_board || {}, "progress_wakes"), wakeLeader: !hasOwn(d.task_board || {}, "leader"),
1265
+ archiveDays: !hasOwn(d.task_board || {}, "archive_after_days"),
1247
1266
  };
1248
1267
  const fromDefaults = (k, value, target) => ({ text: valueText(value, k), builtin: !hasOwn(d, k), from: inAgentDefaults(target) });
1249
1268
  const L = (text, field, id) => html`<${Label} text=${text} schema=${schema} field=${field} htmlFor=${id} />`;
@@ -1318,7 +1337,9 @@ export function uploadMbInEffect(web) {
1318
1337
  }
1319
1338
  function WebSection({ ctx, staged, part = "all" }) {
1320
1339
  const { schema } = ctx;
1321
- const [accessTab, setAccessTab] = useSettingsTabs("access", "overview");
1340
+ const memory = ctx.tabMemory || null;
1341
+ const [accessTab, setAccessTab] = useSettingsTabs("access", (memory && memory.tabs.access) || "overview");
1342
+ useEffect(() => { if (memory) memory.tabs.access = accessTab; }, [accessTab, memory]);
1322
1343
  const web = ctx.fleet.web || {}, local = (web.session && web.session.local) || {}, term = ctx.fleet.web_terminal || {};
1323
1344
  const plSession = (web.session && web.session.public_link) || {}; // #3708
1324
1345
  // M-3278 (decision 7933bf90): over the public link an admin edits these as anywhere (Guests and Web authority included);
@@ -1333,7 +1354,7 @@ function WebSection({ ctx, staged, part = "all" }) {
1333
1354
  levels: web.office_levels !== false, // #2661: on by default
1334
1355
  cdn: web.preview_cdn === true, // #2911 (7): off by default
1335
1356
  loginQr: web.login_qr === true, // #3061 (P2b): off by default
1336
- pub: { allow_public: (web.public_link && web.public_link.allow_public) ?? true, ttl_minutes: (web.public_link && web.public_link.ttl_minutes) ?? 120, protocol: (web.public_link && web.public_link.protocol) ?? "http2", hostname: (web.public_link && web.public_link.hostname) ?? "", tunnel_token_env: (web.public_link && web.public_link.tunnel_token_env) ?? "", origin_port: (web.public_link && web.public_link.origin_port) ?? 19282, auto_open: (web.public_link && web.public_link.auto_open) ?? false },
1357
+ pub: { allow_public: (web.public_link && web.public_link.allow_public) ?? true, ttl_minutes: (web.public_link && web.public_link.ttl_minutes) ?? 120, protocol: (web.public_link && web.public_link.protocol) ?? "http2", hostname: (web.public_link && web.public_link.hostname) ?? "", tunnel_token_env: (web.public_link && web.public_link.tunnel_token_env) ?? "", origin_port: (web.public_link && web.public_link.origin_port) ?? 19282, auto_open: (web.public_link && web.public_link.auto_open) ?? false, preview_hostname: (web.public_link && web.public_link.preview_hostname) ?? "" },
1337
1358
  session: { absolute_hours: local.absolute_hours ?? null, idle_hours: local.idle_hours ?? null },
1338
1359
  plSession: { absolute_hours: plSession.absolute_hours ?? null, idle_minutes: plSession.idle_minutes ?? null },
1339
1360
  terminal: { enabled: term.enabled ?? null, ttl_minutes: term.ttl_minutes ?? null },
@@ -1341,7 +1362,7 @@ function WebSection({ ctx, staged, part = "all" }) {
1341
1362
  const text = (v) => (v === null || v === undefined ? "" : String(v));
1342
1363
  /** #2347: a field's row class: `s-dirty` while it differs from what is saved (the draft may come from before). */
1343
1364
  const savedForm = useMemo(() => ({ notify: String(original.notify), echo: original.echo, log: original.log, thinking: original.thinking, usagePub: original.usagePub, levels: original.levels, cdn: original.cdn, loginQr: original.loginQr, pub: original.pub.allow_public,
1344
- ttl: String(original.pub.ttl_minutes), protocol: original.pub.protocol, hostname: original.pub.hostname, originPort: String(original.pub.origin_port),
1365
+ ttl: String(original.pub.ttl_minutes), protocol: original.pub.protocol, hostname: original.pub.hostname, originPort: String(original.pub.origin_port), previewHost: original.pub.preview_hostname,
1345
1366
  abs: text(original.session.absolute_hours), idle: text(original.session.idle_hours),
1346
1367
  plAbs: text(original.plSession.absolute_hours), plIdle: text(original.plSession.idle_minutes), termOn: original.terminal.enabled !== false,
1347
1368
  termTtl: text(original.terminal.ttl_minutes), autoOpen: original.pub.auto_open }), []);
@@ -1357,7 +1378,7 @@ function WebSection({ ctx, staged, part = "all" }) {
1357
1378
  echo: pick(pending, "echo_to_channel", original.echo), log: pick(pending, "log_tab", original.log), thinking: pick(pending, "log_thinking", original.thinking), usagePub: pick(pending, "usage_report_on_public_link", original.usagePub),
1358
1379
  levels: pick(pending, "office_levels", original.levels), cdn: pick(pending, "preview_cdn", original.cdn), loginQr: pick(pending, "login_qr", original.loginQr),
1359
1380
  pub: pick(pub, "allow_public", original.pub.allow_public), ttl: String(pick(pub, "ttl_minutes", original.pub.ttl_minutes)), protocol: pick(pub, "protocol", original.pub.protocol),
1360
- hostname: pick(pub, "hostname", original.pub.hostname), originPort: String(pick(pub, "origin_port", original.pub.origin_port)), autoOpen: pick(pub, "auto_open", original.pub.auto_open),
1381
+ hostname: pick(pub, "hostname", original.pub.hostname), originPort: String(pick(pub, "origin_port", original.pub.origin_port)), previewHost: pick(pub, "preview_hostname", original.pub.preview_hostname), autoOpen: pick(pub, "auto_open", original.pub.auto_open),
1361
1382
  abs: text(pick(session, "absolute_hours", original.session.absolute_hours)), idle: text(pick(session, "idle_hours", original.session.idle_hours)),
1362
1383
  plAbs: text(pick(plPending, "absolute_hours", original.plSession.absolute_hours)), plIdle: text(pick(plPending, "idle_minutes", original.plSession.idle_minutes)),
1363
1384
  termOn: pick(terminal, "enabled", original.terminal.enabled) !== false, termTtl: text(pick(terminal, "ttl_minutes", original.terminal.ttl_minutes)),
@@ -1382,6 +1403,10 @@ function WebSection({ ctx, staged, part = "all" }) {
1382
1403
  const plAbsNow = Math.min(plAbsQuick, abs), plIdleNow = Math.min(plIdleQuick, plAbsNow * 60, idle * 60);
1383
1404
  const errors = {
1384
1405
  hostname: f.hostname && !/^(?:https:\/\/)?[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)+\/?$/.test(f.hostname) ? "namedHostnameInvalid" : "",
1406
+ // M-3814: the fixed preview address — a separate name on the same tunnel, only beside a fixed hostname.
1407
+ previewHost: !String(f.previewHost || "").trim() ? ""
1408
+ : !/^(?:https:\/\/)?[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)+\/?$/.test(String(f.previewHost).trim()) ? "namedHostnameInvalid"
1409
+ : !named ? "previewHostNeedsHostname" : bareHost(f.previewHost) === bareHost(f.hostname) ? "previewHostSame" : "",
1385
1410
  originPort: !Number.isInteger(Number(f.originPort)) || Number(f.originPort) < 1024 || Number(f.originPort) > 65535 ? "namedPortInvalid" : "",
1386
1411
  // #named-link-ttl: a fixed hostname (named tunnel) allows up to 7 days, or 0 = no expiry; a quick tunnel 1–480.
1387
1412
  ttl: String(f.ttl).trim() === "" || !Number.isInteger(Number(f.ttl)) || Number(f.ttl) < (named ? 0 : 1) || Number(f.ttl) > (named ? 10080 : 480)
@@ -1398,7 +1423,7 @@ function WebSection({ ctx, staged, part = "all" }) {
1398
1423
  // #2347: invalid text keeps the draft unsaved and Save waiting ("Fix 1 field to save"); no older valid draft is sent.
1399
1424
  if (overPublicLink) return;
1400
1425
  if (!ready) {
1401
- const at = { hostname: "#publicWebHostname", originPort: "#publicWebOriginPort", ttl: "#publicWebTtl", abs: "#webSessionAbsolute", idle: "#webSessionIdle",
1426
+ const at = { hostname: "#publicWebHostname", previewHost: "#publicWebPreviewHostname", originPort: "#publicWebOriginPort", ttl: "#publicWebTtl", abs: "#webSessionAbsolute", idle: "#webSessionIdle",
1402
1427
  plAbs: "#webPublicSessionAbsolute", plIdle: "#webPublicSessionIdle",
1403
1428
  termTtl: "#webTerminalTtl" }[Object.keys(errors).find((k) => errors[k])];
1404
1429
  syncStage(ctx, "web", { label: tn("webSettingsLabel"), invalid: tn(Object.values(errors).find(Boolean)), section: "access", target: at });
@@ -1408,7 +1433,7 @@ function WebSection({ ctx, staged, part = "all" }) {
1408
1433
  // reference adopts the standard env key; mounting or editing an unrelated field never rewrites credentials.
1409
1434
  const tokenEnv = f.hostname === original.pub.hostname ? original.pub.tunnel_token_env
1410
1435
  : f.hostname ? original.pub.tunnel_token_env || "AGEND_CLOUDFLARE_TUNNEL_TOKEN" : "";
1411
- const publicPatch = changedFields({ allow_public: f.pub, ttl_minutes: Number(f.ttl), protocol: f.protocol, hostname: f.hostname, tunnel_token_env: tokenEnv, origin_port: Number(f.originPort), auto_open: f.autoOpen }, original.pub);
1436
+ const publicPatch = changedFields({ allow_public: f.pub, ttl_minutes: Number(f.ttl), protocol: f.protocol, hostname: f.hostname, tunnel_token_env: tokenEnv, origin_port: Number(f.originPort), auto_open: f.autoOpen, preview_hostname: String(f.previewHost || "").trim() }, original.pub);
1412
1437
  const sessionPatch = changedFields({ absolute_hours: value(f.abs), idle_hours: value(f.idle) }, original.session);
1413
1438
  const plSessionPatch = changedFields({ absolute_hours: value(f.plAbs), idle_minutes: value(f.plIdle) }, original.plSession);
1414
1439
  // The checkbox shows the default (on) for an unset key: only a real toggle is written; on again = back to the default.
@@ -1564,12 +1589,15 @@ function WebSection({ ctx, staged, part = "all" }) {
1564
1589
  ${lock(html`<section class="card s-public-entry"><h3>${layoutText("revPublicEntry")}</h3>
1565
1590
  <label class=${fc("check", "pub")}><input id="publicWebLink" type="checkbox" checked=${f.pub} onChange=${(e) => set("pub")(e.target.checked)} /><span>${tn("publicLink")}</span><${Impact} schema=${schema} field="web.public_link.allow_public" /></label>
1566
1591
  <p class="note">${tn("publicLinkHint")}</p>
1567
- <div class="grid2">
1592
+ <div class="grid2" id="publicFixedAddress">
1568
1593
  <div class=${fc("field", "hostname")}><label for="publicWebHostname">${tn("namedHostname")}</label><input id="publicWebHostname" type="text" value=${f.hostname} placeholder="agend.example.com" class=${errors.hostname ? "invalid" : ""} onInput=${(e) => set("hostname")(e.target.value)} /><${Feedback} error=${errors.hostname} /></div>
1569
1594
  <div class=${fc("field", "originPort")}><label for="publicWebOriginPort">${tn("namedOriginPort")}</label><input id="publicWebOriginPort" type="number" min="1024" max="65535" value=${f.originPort} class=${errors.originPort ? "invalid" : ""} onInput=${(e) => set("originPort")(e.target.value)} /><${Feedback} error=${errors.originPort} /></div>
1570
1595
  </div>
1571
1596
  <p class="note">${tn("namedTunnelHint")} <a href="https://github.com/songsid/AgEnD/blob/main/docs/named-tunnel.md" target="_blank" rel="noopener noreferrer">${tn("namedTunnelSetup")}</a></p>
1572
1597
  ${String(f.hostname || "").trim() ? html`<${NamedLinkTest} hostname=${f.hostname} port=${f.originPort} protocol=${f.protocol} />` : null}
1598
+ ${!named && !String(f.previewHost || "").trim() ? html`<p class="fixed-preview-needs lbar" id="publicPreviewNeedsFixed" role="note">${tn("previewNeedsFixedHost")}</p>` : null}
1599
+ ${named || String(f.previewHost || "").trim() ? html`<${FixedPreviewAddress} field=${html`<div class=${fc("field", "previewHost")}><label for="publicWebPreviewHostname">${tn("previewHostname")}<${Impact} schema=${schema} field="web.public_link.preview_hostname" /></label><input id="publicWebPreviewHostname" type="text" value=${f.previewHost} placeholder=${previewHostPlaceholder(f.hostname)} class=${errors.previewHost ? "invalid" : ""} onInput=${(e) => set("previewHost")(e.target.value)} /><${Feedback} error=${errors.previewHost} /></div>`}
1600
+ hostname=${String(f.previewHost || "").trim()} placeholder=${previewHostPlaceholder(f.hostname)} originPort=${f.originPort} saved=${bareHost(f.previewHost) !== "" && bareHost(f.previewHost) === bareHost(web.public_link && web.public_link.preview_hostname)} port=${previewPortOf(ctx.fleet)} />` : null}
1573
1601
  <div class="grid2">
1574
1602
  <div class=${fc("field", "ttl")}><label for="publicWebTtl">${tn(named ? "publicTtlNamed" : "publicTtl")}</label><input id="publicWebTtl" type="number" min=${named ? "0" : "1"} max=${named ? "10080" : "480"} step="1" class=${errors.ttl ? "invalid" : ""} value=${f.ttl} onInput=${(e) => set("ttl")(e.target.value)} /><${Feedback} error=${errors.ttl} /></div>
1575
1603
  <div class=${fc("field", "protocol")}><label for="publicWebProtocol">${tn("publicProtocol")}</label><${Select} id="publicWebProtocol" value=${f.protocol} onChange=${set("protocol")} options=${["http2", "quic", "auto"]} /></div>
@@ -0,0 +1,156 @@
1
+ // M-3814 (the user, 2026-11-26): Settings → Access → the fixed address's preview address. Over a fixed link, HTML
2
+ // previews used to open a temporary Cloudflare address each time, which Cloudflare sometimes limits (429). With
3
+ // `web.public_link.preview_hostname` they use a second published route on the same tunnel, to the preview port; the
4
+ // one manual step is that route (Cloudflare adds its DNS record itself). **Check** proves the saved address reaches
5
+ // this AgEnD's previews through the open fixed link; it starts nothing. The server answers closed step codes only.
6
+ import { html, useRef, useState } from "/assets/app-html.js";
7
+ import { register, t } from "/assets/app-i18n.js";
8
+ import { useLease } from "/assets/app-ctx.js";
9
+ import { api } from "./settings-confirm.js";
10
+
11
+ register("settings", {
12
+ en: {
13
+ previewHostname: "Preview address (optional)",
14
+ previewHostNeedsHostname: "A preview address needs the fixed public hostname above.",
15
+ previewHostSame: "Use a different name from the fixed hostname: a preview on the dashboard's own name could use its sign-in.",
16
+ pvaLead: "HTML previews over the fixed public link use a second address on the same tunnel. Without one, AgEnD opens a temporary Cloudflare link for previews, and Cloudflare sometimes limits those.",
17
+ pvaStepsTitle: "Set it up once in Cloudflare",
18
+ pvaStep1: "In Cloudflare, open “Networking” → “Tunnels”, click your tunnel, then press “Routes” → “Add route” → “Published application” (Cloudflare's own buttons).",
19
+ pvaStep2: "In the “Hostname” field: {0}",
20
+ pvaStep2Any: "In the “Hostname” field: a name such as {0}",
21
+ pvaStep3: "In the “Service URL” field: http://127.0.0.1:{0} (the preview's own port, not {1})",
22
+ pvaStep4: "Press “Add route” to save. Cloudflare adds the DNS record by itself.",
23
+ pvaStep5: "Fill in the address here and save. With the public link open (send /web), press “Check preview address”.",
24
+ pvaCheck: "Check preview address",
25
+ pvaNeedsAddress: "Fill in the preview address first.",
26
+ previewNeedsFixedHost: "HTML previews over the public link use a temporary Cloudflare link. To give them a fixed preview address, fill in the fixed public hostname above first.",
27
+ pvaChecking: "Checking… (up to about a minute)",
28
+ pvaBusy: "A check is already running. Try again when it ends.",
29
+ pvaFailed: "The check could not run. Try again.",
30
+ pvaNotRun: "Not checked (an earlier step failed).",
31
+ pvaStep_values: "The preview address is saved",
32
+ pvaStep_link: "The public link is open",
33
+ pvaResultFor: "Check of {0}",
34
+ pvaStep_dns: "Found in DNS",
35
+ pvaStep_reach: "Reaches this AgEnD's previews",
36
+ "pva_values_not-set": "No preview address is saved.",
37
+ "pva_values_not-saved": "Save first: Check uses the saved address.",
38
+ "pva_link_link-closed": "Open the public link (/web), then check again: the preview address only answers while the public link is open.",
39
+ "pva_link_no-listener": "Previews are off or not running on this AgEnD.",
40
+ "pva_dns_dns-missing": "{0} does not exist yet. Add the Published application route for {0} on this tunnel (step 1).",
41
+ "pva_dns_dns-failed": "This machine could not look up {0}: this machine's network may block DNS. Ask the network administrator.",
42
+ pva_reach_ok: "It works: previews over the public link use this address.",
43
+ "pva_reach_wrong-service": "Cloudflare answered but could not reach the service: make the route's service http://127.0.0.1:{1} (HTTP, not HTTPS).",
44
+ "pva_reach_other-page": "{0} answered with another page: point its route to this tunnel, with the service http://127.0.0.1:{1}.",
45
+ "pva_reach_route-missing": "{0} is not routed to this tunnel. Add the Published application route for {0} (step 1).",
46
+ "pva_reach_self-unreachable": "The tunnel is connected, but this machine's network can't open {0} (some networks filter new domains). From another network, such as a phone on mobile data, it may still work.",
47
+ "pva_reach_reach-failed": "{0} did not answer as expected. Try again in a while; if it repeats, check {0} on the tunnel's page in Cloudflare.",
48
+ pvaTimeout: "The check took too long and was stopped. Check again; if it repeats, check this machine's network.",
49
+ },
50
+ "zh-TW": {
51
+ previewHostname: "預覽網址(選用)",
52
+ previewHostNeedsHostname: "預覽網址需要先填上方的固定公開網域。",
53
+ previewHostSame: "請用和固定網域不同的名稱:預覽若用儀表板自己的網域,可能用到它的登入。",
54
+ pvaLead: "透過固定的公開連結看 HTML 預覽時,會用同一條通道上的第二個網址。沒有設定的話,AgEnD 會為預覽另開一條 Cloudflare 臨時連結,而 Cloudflare 有時會限制這類連結。",
55
+ pvaStepsTitle: "在 Cloudflare 設定一次",
56
+ pvaStep1: "在 Cloudflare 打開「Networking」→「Tunnels」,點你的通道,再按「Routes」→「Add route」→「Published application」(Cloudflare 畫面上的英文按鈕)。",
57
+ pvaStep2: "「Hostname」欄填 {0}",
58
+ pvaStep2Any: "「Hostname」欄填一個名稱,例如 {0}",
59
+ pvaStep3: "「Service URL」欄填 http://127.0.0.1:{0}(預覽專用的埠,不是 {1})",
60
+ pvaStep4: "按「Add route」儲存。Cloudflare 會自動新增 DNS 記錄。",
61
+ pvaStep5: "在這裡填上網址並儲存。公開連結開著時(傳 /web 開啟),按「檢查預覽網址」。",
62
+ pvaCheck: "檢查預覽網址",
63
+ pvaNeedsAddress: "先填好預覽網址。",
64
+ previewNeedsFixedHost: "透過公開連結的 HTML 預覽會用 Cloudflare 臨時連結。要改用固定的預覽網址,請先填上方的固定公開網域。",
65
+ pvaChecking: "檢查中…(最多約 1 分鐘)",
66
+ pvaBusy: "已經有一個檢查在進行,請等它結束再試。",
67
+ pvaFailed: "檢查沒有執行成功,請再試一次。",
68
+ pvaNotRun: "未檢查(前面的步驟失敗)。",
69
+ pvaStep_values: "預覽網址已儲存",
70
+ pvaStep_link: "公開連結已開啟",
71
+ pvaResultFor: "{0} 的檢查結果",
72
+ pvaStep_dns: "查得到",
73
+ pvaStep_reach: "連得到這台 AgEnD 的預覽",
74
+ "pva_values_not-set": "還沒有儲存預覽網址。",
75
+ "pva_values_not-saved": "請先儲存:檢查用的是已儲存的網址。",
76
+ "pva_link_link-closed": "請先開啟公開連結(/web)再檢查:預覽網址只在公開連結開著時回應。",
77
+ "pva_link_no-listener": "這台 AgEnD 的預覽已關閉或沒有在執行。",
78
+ "pva_dns_dns-missing": "{0} 還不存在。請在這條通道新增 {0} 的 Published application 路由(第 1 步)。",
79
+ "pva_dns_dns-failed": "這台主機查不到 {0}:這台主機所在的網路可能擋了 DNS。請洽網路管理員。",
80
+ pva_reach_ok: "正常:透過公開連結的預覽會用這個網址。",
81
+ "pva_reach_wrong-service": "Cloudflare 有回應,但連不到服務:請把路由的 service 設成 http://127.0.0.1:{1}(HTTP,不是 HTTPS)。",
82
+ "pva_reach_other-page": "{0} 回應了別的頁面:請把它的路由指向這條通道,service 設成 http://127.0.0.1:{1}。",
83
+ "pva_reach_route-missing": "{0} 沒有路由到這條通道。請新增 {0} 的 Published application 路由(第 1 步)。",
84
+ "pva_reach_self-unreachable": "通道已連上,但這台主機所在的網路打不開 {0}(有些網路會擋新的網域)。從其他網路(例如手機行動網路)可能可以正常使用。",
85
+ "pva_reach_reach-failed": "{0} 沒有如預期回應。請過一陣子再試;如果一直這樣,請到 Cloudflare 的通道頁檢查 {0}。",
86
+ pvaTimeout: "檢查太久,已經停止。請再檢查一次;如果一直這樣,請檢查這台主機所在的網路。",
87
+ },
88
+ });
89
+ const tn = (k, ...v) => t(`settings.${k}`, ...v);
90
+ const STEPS = ["values", "link", "dns", "reach"];
91
+
92
+ /** A hostname as the server reads it: no https://, no trailing slash, lower case. */
93
+ export function bareHost(value) {
94
+ return String(value ?? "").trim().replace(/^https:\/\//i, "").replace(/\/$/, "").toLowerCase();
95
+ }
96
+ /** What the field suggests: preview.<the fixed hostname>. */
97
+ export function previewHostPlaceholder(hostname) {
98
+ const host = bareHost(hostname);
99
+ return host ? `preview.${host}` : "preview.agend.example.com";
100
+ }
101
+ /** The preview listener's port, as the fleet resolves it (web-preview.ts previewSettings): preview_port, else web port + 1. */
102
+ export function previewPortOf(fleet) {
103
+ const set = fleet && fleet.web && fleet.web.preview_port;
104
+ if (Number.isInteger(set) && set > 0) return set;
105
+ const hp = Number.isInteger(fleet && fleet.health_port) ? fleet.health_port : 19280;
106
+ return hp > 0 && hp + 1 <= 65535 ? hp + 1 : null;
107
+ }
108
+
109
+ /** The field, the one route step, and Check (on the saved address). */
110
+ export function FixedPreviewAddress({ field, hostname, saved, port, placeholder, originPort }) {
111
+ const lease = useLease("fixed-preview-check");
112
+ const [busy, setBusy] = useState(false);
113
+ const [result, setResult] = useState(null);
114
+ const [note, setNote] = useState("");
115
+ const running = useRef(false);
116
+ const host = bareHost(hostname);
117
+ const run = async () => {
118
+ if (running.current) return;
119
+ running.current = true; setBusy(true); setNote(""); setResult(null);
120
+ try {
121
+ // The server knows what is saved (this page's copy may be from before a save): it answers "not-saved" for another.
122
+ const r = await api("/api/settings/public-link/preview-test", { method: "POST", body: JSON.stringify({ hostname: host }) });
123
+ if (!lease.current()) return;
124
+ if (r.status === 409) setNote(tn("pvaBusy"));
125
+ else if (!r.ok || !Array.isArray(r.body?.steps)) setNote(tn("pvaFailed"));
126
+ else setResult(r.body);
127
+ } catch { if (lease.current()) setNote(tn("pvaFailed")); }
128
+ finally { running.current = false; if (lease.current()) setBusy(false); }
129
+ };
130
+ const shown = result?.hostname || host || "—", shownPort = result?.port ?? port ?? "—";
131
+ return html`<div class="fixed-preview" id="publicPreviewAddress">
132
+ ${field}
133
+ <p class="note">${tn("pvaLead")}</p>
134
+ <details class="fixed-preview-steps" open=${!saved}>
135
+ <summary>${tn("pvaStepsTitle")}</summary>
136
+ <ol>
137
+ <li>${tn("pvaStep1")}</li>
138
+ <li>${host ? tn("pvaStep2", host) : tn("pvaStep2Any", placeholder || "preview.agend.example.com")}</li>
139
+ <li>${tn("pvaStep3", port ?? "—", originPort || "19282")}</li>
140
+ <li>${tn("pvaStep4")}</li>
141
+ <li>${tn("pvaStep5")}</li>
142
+ </ol>
143
+ </details>
144
+ <div class="save-row"><button type="button" class="btn btn-sm" id="previewAddressCheck" disabled=${busy || !host} onClick=${run}>${busy ? tn("pvaChecking") : tn("pvaCheck")}</button>${!host ? html`<span class="note fixed-preview-why" id="previewAddressCheckWhy">${tn("pvaNeedsAddress")}</span>` : null}</div>
145
+ ${note ? html`<p class="note" role="status">${note}</p>` : null}
146
+ ${result ? html`<p class="note fixed-preview-result" id="previewAddressResultFor"><strong>${tn("pvaResultFor", shown)}</strong></p>` : null}
147
+ ${result ? html`<ol class="named-test-steps" role="status" aria-live="polite">${STEPS.map((step) => {
148
+ const r = result.steps.find((s) => s.step === step);
149
+ const mark = !r ? "–" : r.ok ? "✓" : "✗";
150
+ // A passed step says it once (its line is the finding); the last one says it works; a failed one says what to do.
151
+ const said = !r ? tn("pvaNotRun") : r.code === "timeout" ? tn("pvaTimeout") : r.ok && step !== "reach" ? "" : tn(`pva_${step}_${r.code}`, shown, shownPort);
152
+ return html`<li key=${step} class=${!r ? "nt-skip" : r.ok ? "nt-ok" : "nt-fail"} data-step=${step} data-code=${r ? r.code : ""}>
153
+ <span class="nt-mark" aria-hidden="true">${mark}</span> <strong>${tn(`pvaStep_${step}`, shown, shownPort)}</strong>${said ? ` — ${said}` : ""}</li>`;
154
+ })}</ol>` : null}
155
+ </div>`;
156
+ }
@@ -90,6 +90,7 @@ const ROWS = [
90
90
  ["defaults.liveness-crash", "agent-defaults", "#g-live-crash", "settings.livenessCrash", "defaults.task_board.liveness.crash_grace_minutes", ["crashed", "crash grace", "minutes"], ["當掉", "恢復"]],
91
91
  ["defaults.wake-comment", "agent-defaults", "#g-wake-comment", "settings.wakesComment", "defaults.task_board.comment_wakes", ["comment", "mention", "@", "wake", "task board", "card"], ["留言", "提及", "叫醒", "任務板", "卡片"]],
92
92
  ["defaults.wake-progress", "agent-defaults", "#g-wake-progress", "settings.wakesProgress", "defaults.task_board.progress_wakes", ["progress", "finished", "watchers", "dispatcher", "wake", "task board", "card"], ["進度", "完成", "關注者", "派工者", "叫醒", "任務板", "卡片"]],
93
+ ["defaults.task-archive", "agent-defaults", "#g-archive-days", "settings.archiveTitle", "defaults.task_board.archive_after_days", ["archive", "archived", "finished", "done", "days", "task board", "card"], ["封存", "完成", "天", "任務板", "卡片"]],
93
94
  ["defaults.wake-leader", "agent-defaults", "#g-wake-leader", "settings.wakesLeader", "defaults.task_board.leader", ["leader", "task board leader", "lead", "progress", "task board"], ["看板負責人", "leader", "負責人", "進度", "任務板"]],
94
95
  ["defaults.concurrency", "agent-defaults", "#g-conc", "settings.concurrency", "startup.concurrency", ["startup", "concurrency", "parallel", "spawn"], ["啟動", "並行"]],
95
96
  ["defaults.project-roots", "agent-defaults", "#g-roots", "settings.projectRootsTitle", "project_roots", ["project roots", "folders", "directory", "where agents work", "working directory"], ["專案資料夾", "資料夾", "目錄", "工作目錄"]],
@@ -123,6 +124,8 @@ const ROWS = [
123
124
  ["access.terminal-ttl", "access", "#webTerminalTtl", "settings.webTerminalTtl", "web_terminal.ttl_minutes", ["terminal minutes", "terminal", "ttl"], ["終端機", "分鐘"]],
124
125
  ["access.public-link", "access", "#publicWebLink", "settings.publicLink", "web.public_link.allow_public", ["public link", "share", "tunnel", "cloudflare", "trycloudflare"], ["公開連結", "分享", "tunnel"]],
125
126
  ["access.hostname", "access", "#publicWebHostname", "settings.namedHostname", "web.public_link.hostname", ["fixed address", "domain", "hostname", "named tunnel", "https"], ["固定網址", "網域", "主機名稱", "具名 tunnel"]],
127
+ // M-3814: shown with a fixed hostname (or while it is set).
128
+ ["access.preview-address", "access", "#publicWebPreviewHostname", null, "web.public_link.preview_hostname", ["preview address", "preview", "html preview", "fixed address", "429"], ["預覽網址", "預覽", "固定網址"], L("Preview address", "預覽網址")],
126
129
  ["access.origin-port", "access", "#publicWebOriginPort", "settings.namedOriginPort", "web.public_link.origin_port", ["port", "origin port", "fixed address"], ["連接埠", "port", "固定網址"]],
127
130
  ["access.public-ttl", "access", "#publicWebTtl", "settings.publicTtl", "web.public_link.ttl_minutes", ["public link minutes", "how long", "ttl", "no expiry", "expire"], ["公開連結", "分鐘", "多久", "不過期", "到期"]],
128
131
  // Shown with a fixed hostname (a named tunnel), or while it is set.
@@ -58,6 +58,11 @@ register("settings", {
58
58
  wakesLeader: "Board leader",
59
59
  wakesLeaderNone: "No leader",
60
60
  wakesLeaderGone: "{0} (not an agent of this fleet)",
61
+ // M-3668: when finished cards leave the board.
62
+ archiveTitle: "Archive finished cards after",
63
+ archiveUnit: "days (0 = never)",
64
+ archiveHint: "A finished or cancelled main task leaves its project's board this many days after it finished. It waits in the project's Archive list, search still finds it, and moving it to To do brings it back. Nothing is deleted. 0 keeps every finished card on the board.",
65
+ archiveRange: "A whole number of days from 0 to 3650.",
61
66
  wakesLeaderHint: "Hears the progress of cards that are in no project, and of cards whose project has no lead of its own. No leader: only such a card's dispatcher and watchers hear it.",
62
67
  hostTag: "this host", switchOn: "On", switchOff: "Off", hangUnit: "minutes without output → alert", tipLabel: "About \u201c{0}\u201d",
63
68
  usageCount: "{0}/{1} in use", usageOwn: "{0} custom", usagePartly: "{0} partly custom", usageMany: "{0} agents",
@@ -140,6 +145,10 @@ register("settings", {
140
145
  wakesLeader: "看板負責人",
141
146
  wakesLeaderNone: "不指定",
142
147
  wakesLeaderGone: "{0}(不是這個 Fleet 的 Agent)",
148
+ archiveTitle: "完成的卡片封存於",
149
+ archiveUnit: "天後(0 = 不封存)",
150
+ archiveHint: "完成或取消的主任務,完成這麼多天後就離開專案看板,移到專案的封存清單;搜尋仍找得到,移回「待辦」即可重新開啟,不會刪除任何卡片。設為 0 時,完成的卡片都留在看板上。",
151
+ archiveRange: "請輸入 0 到 3650 之間的整數天數。",
143
152
  wakesLeaderHint: "沒有專案的卡片、以及專案沒有自己負責人的卡片,進度會通知這個 Agent。不指定:這類卡片只有派工者和關注者會收到。",
144
153
  hostTag: "此主機", switchOn: "開", switchOff: "關", hangUnit: "分鐘沒輸出就提醒", tipLabel: "「{0}」的說明",
145
154
  usageCount: "{0}/{1} 套用中", usageOwn: "{0} 自訂", usagePartly: "{0} 部分自訂", usageMany: "{0} 個 Agent",
@@ -87,11 +87,13 @@ export const FIELDS = Object.freeze({
87
87
  liveness: { keys: ["liveOn", "liveQuiet", "livePrompt", "liveCrash"], path: "defaults.task_board" },
88
88
  // Which task board news wakes an agent (fleet-level; no agent overrides it; read at every card write, so it applies at once).
89
89
  taskWakes: { keys: ["wakeComment", "wakeProgress", "wakeLeader"], path: "defaults.task_board" },
90
+ // M-3668: how many days after it finished a main task leaves the board (fleet-level; read at every board read).
91
+ taskArchive: { keys: ["archiveDays"], path: "defaults.task_board" },
90
92
  concurrency: { keys: ["concurrency"], path: "fleet.spawn_concurrency" },
91
93
  stagger: { keys: ["stagger"], path: "fleet.spawn_stagger_ms" },
92
94
  });
93
95
  /** How many fields the Advanced drawer holds (the title says so). */
94
- export const ADVANCED_COUNT = 12;
96
+ export const ADVANCED_COUNT = 13;
95
97
 
96
98
  /** The parts of a field that agents override one by one (one part: the field itself). */
97
99
  const partsOf = (spec) => spec.parts || [{ keys: spec.keys, own: spec.own, owns: spec.owns }];
@@ -383,6 +385,9 @@ export function SharedAgentSettings({ ctx, form }) {
383
385
  <div key=${k} class="s-hang-row"><${Switch} id=${id} name=${tn(label)} checked=${f[k]} onChange=${set(k)} /><span>${tn(label)}</span></div><${Info}>${tn(hint)}</${Info}>`)}
384
386
  <div class="s-hang-row"><label for="g-wake-leader">${tn("wakesLeader")}</label>
385
387
  <${Select} id="g-wake-leader" value=${f.wakeLeader} onChange=${set("wakeLeader")} options=${leaderOptions} /></div><${Info}>${tn("wakesLeaderHint")}</${Info}>${note("taskWakes")}</div>
388
+ <div id="g-archive" class=${fc("field", "archiveDays")}>${head("taskArchive", "g-archive-days", tn("archiveTitle"), null, { mark: mark("archiveDays") })}
389
+ <div class="s-hang-row"><input id="g-archive-days" type="number" min="0" max="3650" step="1" class=${errors.archiveDays ? "invalid" : ""} value=${f.archiveDays} onInput=${(e) => set("archiveDays")(e.target.value)} />
390
+ <span class="s-unit">${tn("archiveUnit")}</span></div><${Feedback} error=${errors.archiveDays} /><${Info}>${tn("archiveHint")}</${Info}>${note("taskArchive")}</div>
386
391
  <div class=${fc("field", "concurrency")}>${head("concurrency", "g-conc", tn("concurrency"), tn("tipConcurrency"), { mark: mark("concurrency") })}
387
392
  <input id="g-conc" type="number" min="1" max="20" step="1" class=${errors.concurrency ? "invalid" : ""} value=${f.concurrency} onInput=${(e) => set("concurrency")(e.target.value)} />
388
393
  <${Feedback} error=${errors.concurrency} warning=${warnings.concurrency} />${f.concurrency.trim() === "" ? html`<${InEffect} text=${tn("concurrencyAuto")} tip=${defaultTip} />` : null}${note("concurrency")}</div>
@@ -25,10 +25,10 @@ register("settings", {
25
25
  publicAutoOpenNeedsHostname: "Needs a fixed hostname — untick it, or keep the hostname.",
26
26
  publicProtocol: "Tunnel protocol",
27
27
  namedHostname: "Fixed public hostname (optional)",
28
- namedOriginPort: "Named tunnel origin port",
28
+ namedOriginPort: "Port for the fixed address",
29
29
  namedHostnameInvalid: "Enter a DNS hostname or HTTPS root URL.",
30
30
  namedPortInvalid: "Use an integer port from 1024 to 65535.",
31
- namedTunnelHint: "Blank hostname uses a quick tunnel. Named routes point to this loopback port. Opening, expiry and sign-in still apply.",
31
+ namedTunnelHint: "Leave the hostname blank for a temporary public link. Cloudflare points to this port. Opening, expiry and sign-in still apply.",
32
32
  namedTunnelSetup: "How to set this up",
33
33
  namedToken: "Cloudflare connector token",
34
34
  namedTokenHint: "Stored privately, never shown again. Format checked locally; Cloudflare credentials and routing are checked when opening. Saving or clearing closes the current public link.",
@@ -704,11 +704,11 @@ register("settings", {
704
704
  bots: "機器人",
705
705
  classicChannels: "ClassicBot 頻道",
706
706
  noClassic: "沒有 ClassicBot 頻道 — 在聊天中用 /start 建立。",
707
- publicLink: "提供臨時公開網頁連結",
707
+ publicLink: "提供臨時公開連結",
708
708
  publicLinkHint: "每次都需管理員明確啟用。Cloudflare 終止 TLS;登入者具有完整網頁管理權限。HTML 預覽會另開一條臨時通道,除非設定 web.preview_on_public_link: false。",
709
709
  publicTtl: "公開連結分鐘數(1–480)",
710
710
  publicTtlNamed: "公開連結分鐘數(0–10080;0 = 不到期)",
711
- publicTtlNamedHint: "設定固定網域時,連結最長可開 7 天(10080 分鐘);設 0 則不會到期,直到關閉或 AgEnD 停止。每次登入仍需裝置登入碼。修改後的期限從下次開啟起生效;要結束目前的連結,請按「關閉」。",
711
+ publicTtlNamedHint: "設定固定網域時,連結最長可開 7 天(10080 分鐘);設 0 就不會到期,直到關閉或 AgEnD 停止。每次登入仍需裝置登入碼。修改後的期限從下次開啟起生效;要結束目前的連結,請按「關閉」。",
712
712
  publicTtlQuickRange: "臨時通道只能設 1–480 分鐘。請調低,或設定固定網域以使用更長時間。",
713
713
  publicTtlNamedRange: "設定固定網域時:請輸入 1 到 10080 的整數,或 0 代表不到期。",
714
714
  publicAutoOpen: "AgEnD 啟動時重新開啟公開連結",
@@ -716,10 +716,10 @@ register("settings", {
716
716
  publicAutoOpenNeedsHostname: "需要固定網域——請取消勾選,或保留網域。",
717
717
  publicProtocol: "通道協定",
718
718
  namedHostname: "固定公開網域(選用)",
719
- namedOriginPort: "固定通道本機連接埠",
719
+ namedOriginPort: "固定網址用的埠",
720
720
  namedHostnameInvalid: "請輸入 DNS 網域名稱或 HTTPS 根網址。",
721
721
  namedPortInvalid: "請使用 1024 到 65535 的整數連接埠。",
722
- namedTunnelHint: "網域留空時使用臨時通道。固定通道的路由需指向此本機連接埠;仍須開啟連結,並遵守到期及登入規則。",
722
+ namedTunnelHint: "網域留空時使用臨時的公開連結。Cloudflare 那邊要指到這個埠;仍須開啟公開連結,並遵守到期及登入規則。",
723
723
  namedTunnelSetup: "設定教學",
724
724
  namedToken: "Cloudflare 連接器 token",
725
725
  namedTokenHint: "私密儲存,不會讀回。儲存時只檢查格式,開啟時才確認憑證與路由。設定或清除會關閉目前的公開連結。",
@@ -121,7 +121,7 @@ register("app", {
121
121
  confirmTitle: "Please confirm", confirmOk: "Continue", cancel: "Cancel",
122
122
  sidePanelLeave: "Leave {0} without saving? Your changes there will be lost.", sidePanelDiscard: "Discard changes",
123
123
  // The server's own wording (src/locale.ts needs.reason.*), so the web says what Discord says.
124
- needs_reason_kiro_choice: "Kiro needs your decision", needs_reason_hang: "Not responding", needs_reason_exited: "Exited", needs_reason_assist: "Waiting at its terminal", needs_reason_question: "Asking you a question", needs_reason_permission: "Permission needed", needs_reason_dangerous_command: "Dangerous command waiting", needs_reason_login: "Waiting to connect its AI account", needs_reason_dialog: "Waiting at a dialog", needs_reason_terminal_input: "May be waiting for input", needs_reason_auth_paused: "Paused: AI account not connected", needs_reason_host_health: "Host health", needs_reason_stale_auth: "Codex needs a restart", needs_stale_auth_detail: "Codex cannot refresh this agent’s current sign-in. Restart the agent; sign in again only if Codex asks.", needs_reason_backend_signin: "AI account needs connecting", needs_reason_config_invalid: "Configuration file needs attention", needs_reason_hub_proposal: "Hub action proposed: review locally", needs_reason_hub_execution_hold: "Hub work held: review locally", needs_reason_hub_share_lapsed: "Hub share needs to be shared again: its backend or folder changed", needs_reason_hub_unavailable: "Hub not running", needs_reason_config_fallback: "Running on stored configuration", config_history_edit: "{0}, line {1}, column {2}: {3}. AgEnD is still running on the previous settings. The next restart would use the stored valid copy from {4}. Correct the YAML error; the file has not been changed by AgEnD.", config_history_no_history: "{0}, line {1}, column {2}: {3}. AgEnD is still running on the previous settings. No stored valid copy is available, so the next restart cannot recover automatically. Correct the YAML error before restarting; the file has not been changed by AgEnD.", config_history_fallback: "{0}, line {1}, column {2}: {3}. AgEnD started using the stored valid copy from {4}. Correct the YAML error and reload the settings. The file on disk has not been changed by AgEnD.", needs_reason_general_windows_offline: "General’s Windows PC is offline", needs_reason_general_location_hold: "Run General on", needs_reason_native_pane_hold: "Windows agent needs attention", needs_reason_model_switch: "Claude model switched", needs_reason_crashed: "Crashed", needs_reason_backend_missing: "AI CLI not installed", needs_reason_usage_limit: "Usage limit reached · reset time unknown", needs_reason_delivery_uncertain: "Could not confirm delivery", needs_reason_delivery_failed: "Delivery failed", needs_reason_missed_offline: "Missed while AgEnD was offline", needs_reason_task_review: "Waiting for your confirmation", needs_reason_task_blocked: "Blocked: asks you", needs_reason_task_stalled: "Its assignee went quiet",
124
+ needs_reason_kiro_choice: "Kiro needs your decision", needs_reason_hang: "Not responding", needs_reason_exited: "Exited", needs_reason_assist: "Waiting at its terminal", needs_reason_question: "Asking you a question", needs_reason_permission: "Permission needed", needs_reason_dangerous_command: "Dangerous command waiting", needs_reason_login: "Waiting to connect its AI account", needs_reason_dialog: "Waiting at a dialog", needs_reason_terminal_input: "May be waiting for input", needs_reason_auth_paused: "Paused: AI account not connected", needs_reason_host_health: "Host health", needs_reason_stale_auth: "Codex needs a restart", needs_stale_auth_detail: "Codex cannot refresh this agent’s current sign-in. Restart the agent; sign in again only if Codex asks.", needs_reason_backend_signin: "AI account needs connecting", needs_reason_config_invalid: "Configuration file needs attention", needs_reason_hub_proposal: "Hub action proposed: review locally", needs_reason_hub_execution_hold: "Hub work held: review locally", needs_reason_hub_share_lapsed: "Hub share needs to be shared again: its backend or folder changed", needs_reason_hub_unavailable: "Hub not running", needs_reason_config_fallback: "Running on stored configuration", config_history_edit: "{0}, line {1}, column {2}: {3}. AgEnD is still running on the previous settings. The next restart would use the stored valid copy from {4}. Correct the YAML error; the file has not been changed by AgEnD.", config_history_no_history: "{0}, line {1}, column {2}: {3}. AgEnD is still running on the previous settings. No stored valid copy is available, so the next restart cannot recover automatically. Correct the YAML error before restarting; the file has not been changed by AgEnD.", config_history_fallback: "{0}, line {1}, column {2}: {3}. AgEnD started using the stored valid copy from {4}. Correct the YAML error and reload the settings. The file on disk has not been changed by AgEnD.", needs_reason_general_windows_offline: "General’s Windows PC is offline", needs_reason_general_location_hold: "Run General on", needs_reason_native_pane_hold: "Windows agent needs attention", needs_reason_model_switch: "Claude model switched", needs_reason_crashed: "Crashed", needs_reason_backend_missing: "AI CLI not installed", needs_reason_mcp_missing: "MCP servers missing after an AI account switch", needs_mcp_missing_detail: "{0} ({1} → {2})", needs_mcp_missing_sep: ", ", needs_reason_usage_limit: "Usage limit reached · reset time unknown", needs_reason_delivery_uncertain: "Could not confirm delivery", needs_reason_delivery_failed: "Delivery failed", needs_reason_missed_offline: "Missed while AgEnD was offline", needs_reason_task_review: "Waiting for your confirmation", needs_reason_task_blocked: "Blocked: asks you", needs_reason_task_stalled: "Its assignee went quiet",
125
125
  },
126
126
  "zh-TW": {
127
127
  brand: "AgEnD", fleet: "Fleet", fleetOverview: "Fleet 概覽", view: "檢視", settings: "設定", instances: "Agent", newInstance: "新增 Agent", newAgent: "新增 Agent",
@@ -171,6 +171,6 @@ register("app", {
171
171
  search: "搜尋", searchTitle: "搜尋聊天、agent 之間的訊息與任務({0})",
172
172
  confirmTitle: "請確認", confirmOk: "繼續", cancel: "取消",
173
173
  sidePanelLeave: "不儲存就離開「{0}」?你在那裡的修改會遺失。", sidePanelDiscard: "捨棄修改",
174
- needs_reason_kiro_choice: "Kiro 需要你決定", needs_reason_hang: "沒有回應", needs_reason_exited: "已結束", needs_reason_assist: "在終端機上等待", needs_reason_question: "正在問你問題", needs_reason_permission: "需要權限", needs_reason_dangerous_command: "危險指令待確認", needs_reason_login: "等待連接 AI 帳號", needs_reason_dialog: "停在對話框", needs_reason_terminal_input: "可能在等輸入", needs_reason_auth_paused: "已暫停:AI 帳號未連接", needs_reason_host_health: "主機狀態", needs_reason_stale_auth: "Codex 需要重新啟動", needs_stale_auth_detail: "Codex 無法更新這個 Agent 執行中使用的登入。請重新啟動 Agent;只有 Codex 要求時才需要重新登入。", needs_reason_backend_signin: "需要連接 AI 帳號", needs_reason_config_invalid: "設定檔需要處理", needs_reason_hub_proposal: "Hub 提議操作:請在本機檢視", needs_reason_hub_execution_hold: "Hub 工作已暫停:請在本機檢視", needs_reason_hub_share_lapsed: "Hub 分享需要重新分享:它的後端或資料夾換了", needs_reason_hub_unavailable: "Hub 未在執行", needs_reason_config_fallback: "正在使用儲存的設定副本", config_history_edit: "{0} 第 {1} 行、第 {2} 欄:{3}。AgEnD 仍使用先前的設定執行。下次重新啟動會改用 {4} 儲存的有效副本。請修正 YAML 錯誤;AgEnD 未更動此檔案。", config_history_no_history: "{0} 第 {1} 行、第 {2} 欄:{3}。AgEnD 仍使用先前的設定執行。沒有可用的有效副本,下次重新啟動將無法自動恢復。請在重新啟動前修正 YAML 錯誤;AgEnD 未更動此檔案。", config_history_fallback: "{0} 第 {1} 行、第 {2} 欄:{3}。AgEnD 已使用 {4} 儲存的有效副本啟動。請修正 YAML 錯誤並重新載入設定。AgEnD 未更動磁碟上的檔案。", needs_reason_general_windows_offline: "General 所在的 Windows 電腦已離線", needs_reason_general_location_hold: "General 執行位置", needs_reason_native_pane_hold: "Windows Agent 需要處理", needs_reason_model_switch: "Claude 模型已切換", needs_reason_crashed: "已崩潰", needs_reason_backend_missing: "AI CLI 沒有安裝", needs_reason_usage_limit: "用量已達上限 · 恢復時間未知", needs_reason_delivery_uncertain: "無法確認是否送達", needs_reason_delivery_failed: "傳送失敗", needs_reason_missed_offline: "AgEnD 離線時錯過", needs_reason_task_review: "等你確認", needs_reason_task_blocked: "卡住,在問你", needs_reason_task_stalled: "接手者很久沒有動靜",
174
+ needs_reason_kiro_choice: "Kiro 需要你決定", needs_reason_hang: "沒有回應", needs_reason_exited: "已結束", needs_reason_assist: "在終端機上等待", needs_reason_question: "正在問你問題", needs_reason_permission: "需要權限", needs_reason_dangerous_command: "危險指令待確認", needs_reason_login: "等待連接 AI 帳號", needs_reason_dialog: "停在對話框", needs_reason_terminal_input: "可能在等輸入", needs_reason_auth_paused: "已暫停:AI 帳號未連接", needs_reason_host_health: "主機狀態", needs_reason_stale_auth: "Codex 需要重新啟動", needs_stale_auth_detail: "Codex 無法更新這個 Agent 執行中使用的登入。請重新啟動 Agent;只有 Codex 要求時才需要重新登入。", needs_reason_backend_signin: "需要連接 AI 帳號", needs_reason_config_invalid: "設定檔需要處理", needs_reason_hub_proposal: "Hub 提議操作:請在本機檢視", needs_reason_hub_execution_hold: "Hub 工作已暫停:請在本機檢視", needs_reason_hub_share_lapsed: "Hub 分享需要重新分享:它的後端或資料夾換了", needs_reason_hub_unavailable: "Hub 未在執行", needs_reason_config_fallback: "正在使用儲存的設定副本", config_history_edit: "{0} 第 {1} 行、第 {2} 欄:{3}。AgEnD 仍使用先前的設定執行。下次重新啟動會改用 {4} 儲存的有效副本。請修正 YAML 錯誤;AgEnD 未更動此檔案。", config_history_no_history: "{0} 第 {1} 行、第 {2} 欄:{3}。AgEnD 仍使用先前的設定執行。沒有可用的有效副本,下次重新啟動將無法自動恢復。請在重新啟動前修正 YAML 錯誤;AgEnD 未更動此檔案。", config_history_fallback: "{0} 第 {1} 行、第 {2} 欄:{3}。AgEnD 已使用 {4} 儲存的有效副本啟動。請修正 YAML 錯誤並重新載入設定。AgEnD 未更動磁碟上的檔案。", needs_reason_general_windows_offline: "General 所在的 Windows 電腦已離線", needs_reason_general_location_hold: "General 執行位置", needs_reason_native_pane_hold: "Windows Agent 需要處理", needs_reason_model_switch: "Claude 模型已切換", needs_reason_crashed: "已崩潰", needs_reason_backend_missing: "AI CLI 沒有安裝", needs_reason_mcp_missing: "切換 AI 帳號後缺少 MCP 伺服器", needs_mcp_missing_detail: "{0}({1} → {2})", needs_mcp_missing_sep: "、", needs_reason_usage_limit: "用量已達上限 · 恢復時間未知", needs_reason_delivery_uncertain: "無法確認是否送達", needs_reason_delivery_failed: "傳送失敗", needs_reason_missed_offline: "AgEnD 離線時錯過", needs_reason_task_review: "等你確認", needs_reason_task_blocked: "卡住,在問你", needs_reason_task_stalled: "接手者很久沒有動靜",
175
175
  },
176
176
  });
@@ -11,7 +11,12 @@ import { modelSwitchText } from "./model-observation.js";
11
11
  // The toggle asks Notification.requestPermission() on that click only. Not offered on a phone (the constructor is
12
12
  // missing or throws there; Discord's notification is the one to rely on) or on a plain-HTTP LAN address.
13
13
  import { appStore, createStore } from "./app-store.js";
14
- import { t } from "./app-i18n.js";
14
+ import { register, t } from "./app-i18n.js";
15
+ // M-3749: a tab that retains an older app-i18n.js still words the missing-MCP item (registered by its consumer, too).
16
+ register("app", {
17
+ en: { needs_reason_mcp_missing: "MCP servers missing after an AI account switch", needs_mcp_missing_detail: "{0} ({1} → {2})", needs_mcp_missing_sep: ", " },
18
+ "zh-TW": { needs_reason_mcp_missing: "切換 AI 帳號後缺少 MCP 伺服器", needs_mcp_missing_detail: "{0}({1} → {2})", needs_mcp_missing_sep: "、" },
19
+ });
15
20
 
16
21
  const STORE_KEY = "agend_needs_notify";
17
22
  const TERMINAL_WAIT_MS = 5000;
@@ -62,6 +67,8 @@ export async function setNotify(on, env = globalThis) {
62
67
 
63
68
  export const configDetail = (item) => {
64
69
  if (item.modelSwitch) return modelSwitchText(item.modelSwitch);
70
+ // M-3749: the missing MCP servers in the page's language (zh: 「、」 and 「()」).
71
+ if (item.mcpMissing && Array.isArray(item.mcpMissing.names)) return t("app.needs_mcp_missing_detail", item.mcpMissing.names.join(t("app.needs_mcp_missing_sep")), item.mcpMissing.from, item.mcpMissing.to);
65
72
  const issue = item.configIssue;
66
73
  return issue ? t(`app.config_history_${issue.mode === "fallback" ? "fallback" : issue.time ? "edit" : "no_history"}`, issue.file, issue.line, issue.column, issue.reason, issue.time || "") : item.detail;
67
74
  };