@songsid/agend 2.4.0-beta.24 → 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 (395) 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-endpoint.js +10 -0
  6. package/dist/agent-endpoint.js.map +1 -1
  7. package/dist/agent-workspace.d.ts +18 -2
  8. package/dist/agent-workspace.js +15 -4
  9. package/dist/agent-workspace.js.map +1 -1
  10. package/dist/backend/antigravity.js +8 -6
  11. package/dist/backend/antigravity.js.map +1 -1
  12. package/dist/backend/claude-code.js +17 -0
  13. package/dist/backend/claude-code.js.map +1 -1
  14. package/dist/backend/claude-usage-credits.d.ts +8 -0
  15. package/dist/backend/claude-usage-credits.js +121 -0
  16. package/dist/backend/claude-usage-credits.js.map +1 -0
  17. package/dist/backend/types.d.ts +30 -0
  18. package/dist/backend/types.js.map +1 -1
  19. package/dist/build-provenance.json +1 -1
  20. package/dist/channel/adapters/discord.js +7 -1
  21. package/dist/channel/adapters/discord.js.map +1 -1
  22. package/dist/channel/tool-router.js +1 -0
  23. package/dist/channel/tool-router.js.map +1 -1
  24. package/dist/cli-audited.js +9 -4
  25. package/dist/cli-audited.js.map +1 -1
  26. package/dist/cli.js +184 -21
  27. package/dist/cli.js.map +1 -1
  28. package/dist/config-validator.js +11 -1
  29. package/dist/config-validator.js.map +1 -1
  30. package/dist/config.js +2 -0
  31. package/dist/config.js.map +1 -1
  32. package/dist/contact-auth-store.d.ts +18 -0
  33. package/dist/contact-auth-store.js +55 -8
  34. package/dist/contact-auth-store.js.map +1 -1
  35. package/dist/contact-auth-types.d.ts +3 -0
  36. package/dist/contact-auth-types.js.map +1 -1
  37. package/dist/contact-change-proposals.d.ts +34 -0
  38. package/dist/contact-change-proposals.js +1 -1
  39. package/dist/contact-change-proposals.js.map +1 -1
  40. package/dist/cross-instance-notice.d.ts +1 -0
  41. package/dist/cross-instance-notice.js +9 -8
  42. package/dist/cross-instance-notice.js.map +1 -1
  43. package/dist/daemon.d.ts +35 -0
  44. package/dist/daemon.js +234 -19
  45. package/dist/daemon.js.map +1 -1
  46. package/dist/delivery-outbox.d.ts +42 -1
  47. package/dist/delivery-outbox.js +194 -20
  48. package/dist/delivery-outbox.js.map +1 -1
  49. package/dist/fleet-context.d.ts +8 -0
  50. package/dist/fleet-lock.d.ts +67 -2
  51. package/dist/fleet-lock.js +236 -2
  52. package/dist/fleet-lock.js.map +1 -1
  53. package/dist/fleet-manager.d.ts +163 -6
  54. package/dist/fleet-manager.js +1136 -75
  55. package/dist/fleet-manager.js.map +1 -1
  56. package/dist/fleet-windows-runtime.d.ts +20 -1
  57. package/dist/fleet-windows-runtime.js +98 -18
  58. package/dist/fleet-windows-runtime.js.map +1 -1
  59. package/dist/general-knowledge/skills/cross-instance-messaging/SKILL.md +7 -0
  60. package/dist/general-knowledge/skills/web-dashboard/SKILL.md +14 -4
  61. package/dist/home-update-lock.d.ts +35 -0
  62. package/dist/home-update-lock.js +81 -0
  63. package/dist/home-update-lock.js.map +1 -0
  64. package/dist/hub/compose/member.d.ts +5 -1
  65. package/dist/hub/compose/member.js +9 -5
  66. package/dist/hub/compose/member.js.map +1 -1
  67. package/dist/hub/member/room-ask.d.ts +5 -0
  68. package/dist/hub/member/room-ask.js +43 -16
  69. package/dist/hub/member/room-ask.js.map +1 -1
  70. package/dist/hub/member/room-mention-feedback.d.ts +2 -0
  71. package/dist/hub/member/room-mention-feedback.js +1 -1
  72. package/dist/hub/member/room-mention-feedback.js.map +1 -1
  73. package/dist/hub/member/room-post-answers.d.ts +2 -0
  74. package/dist/hub/member/room-post-answers.js +1 -1
  75. package/dist/hub/member/room-post-answers.js.map +1 -1
  76. package/dist/hub/member/room-post.d.ts +5 -0
  77. package/dist/hub/member/room-post.js +4 -1
  78. package/dist/hub/member/room-post.js.map +1 -1
  79. package/dist/hub/member/updates.d.ts +7 -1
  80. package/dist/hub/member/updates.js +7 -1
  81. package/dist/hub/member/updates.js.map +1 -1
  82. package/dist/hub/representative.d.ts +7 -0
  83. package/dist/hub/representative.js +38 -5
  84. package/dist/hub/representative.js.map +1 -1
  85. package/dist/install-lock.d.ts +15 -1
  86. package/dist/install-lock.js +16 -8
  87. package/dist/install-lock.js.map +1 -1
  88. package/dist/install-ownership.d.ts +165 -0
  89. package/dist/install-ownership.js +404 -0
  90. package/dist/install-ownership.js.map +1 -0
  91. package/dist/instance-config-impact.js +2 -0
  92. package/dist/instance-config-impact.js.map +1 -1
  93. package/dist/instructions.d.ts +4 -0
  94. package/dist/instructions.js +4 -0
  95. package/dist/instructions.js.map +1 -1
  96. package/dist/local-pane-endpoint.d.ts +4 -1
  97. package/dist/local-pane-endpoint.js +12 -2
  98. package/dist/local-pane-endpoint.js.map +1 -1
  99. package/dist/locale.js +160 -4
  100. package/dist/locale.js.map +1 -1
  101. package/dist/native-agent-admission.d.ts +7 -0
  102. package/dist/native-agent-admission.js +46 -3
  103. package/dist/native-agent-admission.js.map +1 -1
  104. package/dist/native-mcp.d.ts +16 -1
  105. package/dist/native-mcp.js +38 -5
  106. package/dist/native-mcp.js.map +1 -1
  107. package/dist/native-pane-lifecycle.d.ts +9 -0
  108. package/dist/native-pane-lifecycle.js +23 -0
  109. package/dist/native-pane-lifecycle.js.map +1 -1
  110. package/dist/native-pane-manager.d.ts +19 -6
  111. package/dist/native-pane-manager.js +79 -4
  112. package/dist/native-pane-manager.js.map +1 -1
  113. package/dist/needs-you.d.ts +8 -0
  114. package/dist/needs-you.js +1 -0
  115. package/dist/needs-you.js.map +1 -1
  116. package/dist/outbound-handlers.d.ts +12 -0
  117. package/dist/outbound-handlers.js +30 -2
  118. package/dist/outbound-handlers.js.map +1 -1
  119. package/dist/package-preimage.js +4 -0
  120. package/dist/package-preimage.js.map +1 -1
  121. package/dist/pane-port.d.ts +1 -0
  122. package/dist/plist-args.d.ts +9 -0
  123. package/dist/plist-args.js +22 -0
  124. package/dist/plist-args.js.map +1 -0
  125. package/dist/public-preview.d.ts +4 -6
  126. package/dist/public-preview.js +5 -2
  127. package/dist/public-preview.js.map +1 -1
  128. package/dist/public-web-gateway.js +8 -3
  129. package/dist/public-web-gateway.js.map +1 -1
  130. package/dist/public-web-link.d.ts +13 -1
  131. package/dist/public-web-link.js +28 -1
  132. package/dist/public-web-link.js.map +1 -1
  133. package/dist/recover.cjs +2452 -0
  134. package/dist/remote-card-prompt.d.ts +6 -2
  135. package/dist/remote-card-prompt.js +12 -3
  136. package/dist/remote-card-prompt.js.map +1 -1
  137. package/dist/reply-draft.d.ts +12 -0
  138. package/dist/reply-draft.js +81 -0
  139. package/dist/reply-draft.js.map +1 -0
  140. package/dist/request-contact-api.d.ts +15 -0
  141. package/dist/request-contact-api.js +120 -0
  142. package/dist/request-contact-api.js.map +1 -0
  143. package/dist/request-contact-card.d.ts +36 -0
  144. package/dist/request-contact-card.js +206 -0
  145. package/dist/request-contact-card.js.map +1 -0
  146. package/dist/request-contact-gate.d.ts +79 -0
  147. package/dist/request-contact-gate.js +262 -0
  148. package/dist/request-contact-gate.js.map +1 -0
  149. package/dist/request-contact-native.d.ts +52 -0
  150. package/dist/request-contact-native.js +83 -0
  151. package/dist/request-contact-native.js.map +1 -0
  152. package/dist/request-contact-types.d.ts +86 -0
  153. package/dist/request-contact-types.js +7 -0
  154. package/dist/request-contact-types.js.map +1 -0
  155. package/dist/request-context-call-protocol.d.ts +12 -0
  156. package/dist/request-context-call-protocol.js +14 -0
  157. package/dist/request-context-call-protocol.js.map +1 -0
  158. package/dist/request-context-call.d.ts +22 -0
  159. package/dist/request-context-call.js +35 -0
  160. package/dist/request-context-call.js.map +1 -0
  161. package/dist/request-context-drain.d.ts +39 -0
  162. package/dist/request-context-drain.js +159 -0
  163. package/dist/request-context-drain.js.map +1 -0
  164. package/dist/request-context-fence.d.ts +28 -0
  165. package/dist/request-context-fence.js +58 -0
  166. package/dist/request-context-fence.js.map +1 -0
  167. package/dist/request-context-migration.d.ts +64 -0
  168. package/dist/request-context-migration.js +158 -0
  169. package/dist/request-context-migration.js.map +1 -0
  170. package/dist/request-context-pane.d.ts +25 -0
  171. package/dist/request-context-pane.js +48 -0
  172. package/dist/request-context-pane.js.map +1 -0
  173. package/dist/request-context-policy.d.ts +74 -0
  174. package/dist/request-context-policy.js +116 -0
  175. package/dist/request-context-policy.js.map +1 -0
  176. package/dist/request-context-recovery.d.ts +14 -0
  177. package/dist/request-context-recovery.js +56 -0
  178. package/dist/request-context-recovery.js.map +1 -0
  179. package/dist/request-context-relay.d.ts +19 -0
  180. package/dist/request-context-relay.js +63 -0
  181. package/dist/request-context-relay.js.map +1 -0
  182. package/dist/request-context-returns.d.ts +67 -0
  183. package/dist/request-context-returns.js +211 -0
  184. package/dist/request-context-returns.js.map +1 -0
  185. package/dist/request-context-store.d.ts +2 -1
  186. package/dist/request-context-store.js +8 -1
  187. package/dist/request-context-store.js.map +1 -1
  188. package/dist/request-context-turns.d.ts +99 -0
  189. package/dist/request-context-turns.js +215 -0
  190. package/dist/request-context-turns.js.map +1 -0
  191. package/dist/request-context-view.d.ts +33 -0
  192. package/dist/request-context-view.js +36 -0
  193. package/dist/request-context-view.js.map +1 -0
  194. package/dist/request-hub-context.d.ts +130 -0
  195. package/dist/request-hub-context.js +89 -0
  196. package/dist/request-hub-context.js.map +1 -0
  197. package/dist/request-hub-output.d.ts +11 -0
  198. package/dist/request-hub-output.js +21 -0
  199. package/dist/request-hub-output.js.map +1 -0
  200. package/dist/runtime-cli-install.js +13 -11
  201. package/dist/runtime-cli-install.js.map +1 -1
  202. package/dist/runtime-client.d.ts +2 -0
  203. package/dist/runtime-client.js +17 -4
  204. package/dist/runtime-client.js.map +1 -1
  205. package/dist/runtime-coordinator.d.ts +4 -1
  206. package/dist/runtime-coordinator.js +10 -3
  207. package/dist/runtime-coordinator.js.map +1 -1
  208. package/dist/runtime-pane-assets.d.ts +1 -1
  209. package/dist/runtime-pane-assets.js +1 -1
  210. package/dist/runtime-pane-assets.js.map +1 -1
  211. package/dist/runtime-pane-host.d.ts +3 -0
  212. package/dist/runtime-pane-host.js +39 -21
  213. package/dist/runtime-pane-host.js.map +1 -1
  214. package/dist/runtime-pane-link.d.ts +6 -2
  215. package/dist/runtime-pane-link.js +17 -4
  216. package/dist/runtime-pane-link.js.map +1 -1
  217. package/dist/runtime-pane-mcp-relay.d.ts +11 -1
  218. package/dist/runtime-pane-mcp-relay.js +69 -3
  219. package/dist/runtime-pane-mcp-relay.js.map +1 -1
  220. package/dist/runtime-pane-mcp.d.ts +28 -1
  221. package/dist/runtime-pane-mcp.js +92 -15
  222. package/dist/runtime-pane-mcp.js.map +1 -1
  223. package/dist/runtime-pane-port.d.ts +6 -0
  224. package/dist/runtime-pane-port.js +23 -4
  225. package/dist/runtime-pane-port.js.map +1 -1
  226. package/dist/runtime-pane-protocol.d.ts +4 -0
  227. package/dist/runtime-pane-protocol.js +11 -4
  228. package/dist/runtime-pane-protocol.js.map +1 -1
  229. package/dist/runtime-pane-service.d.ts +1 -0
  230. package/dist/runtime-pane-service.js +25 -9
  231. package/dist/runtime-pane-service.js.map +1 -1
  232. package/dist/runtime-pane-stdio-protocol.d.ts +4 -0
  233. package/dist/runtime-pane-stdio-protocol.js +12 -5
  234. package/dist/runtime-pane-stdio-protocol.js.map +1 -1
  235. package/dist/runtime-pane-stdio.js +5 -5
  236. package/dist/runtime-pane-stdio.js.map +1 -1
  237. package/dist/runtime-protocol.d.ts +3 -0
  238. package/dist/runtime-protocol.js.map +1 -1
  239. package/dist/scheduler/scheduler.d.ts +6 -0
  240. package/dist/scheduler/scheduler.js +19 -1
  241. package/dist/scheduler/scheduler.js.map +1 -1
  242. package/dist/scheduler/task-board.d.ts +4 -0
  243. package/dist/scheduler/task-board.js +6 -0
  244. package/dist/scheduler/task-board.js.map +1 -1
  245. package/dist/scheduler/types.d.ts +1 -1
  246. package/dist/service-activation.js +3 -13
  247. package/dist/service-activation.js.map +1 -1
  248. package/dist/service-lock.d.ts +28 -0
  249. package/dist/service-lock.js +85 -0
  250. package/dist/service-lock.js.map +1 -0
  251. package/dist/settings-api.d.ts +6 -0
  252. package/dist/settings-api.js +35 -0
  253. package/dist/settings-api.js.map +1 -1
  254. package/dist/settings-change.js +1 -1
  255. package/dist/settings-change.js.map +1 -1
  256. package/dist/state-lease.d.ts +24 -0
  257. package/dist/state-lease.js +103 -0
  258. package/dist/state-lease.js.map +1 -0
  259. package/dist/tmux-binary.js +1 -1
  260. package/dist/tmux-binary.js.map +1 -1
  261. package/dist/tool-receipt-output.d.ts +2 -0
  262. package/dist/topic-commands.js +21 -1
  263. package/dist/topic-commands.js.map +1 -1
  264. package/dist/transcript-monitor.js +3 -0
  265. package/dist/transcript-monitor.js.map +1 -1
  266. package/dist/tunnel/named-link-test.d.ts +27 -0
  267. package/dist/tunnel/named-link-test.js +41 -0
  268. package/dist/tunnel/named-link-test.js.map +1 -1
  269. package/dist/types.d.ts +7 -0
  270. package/dist/ui/chat-store.js +5 -4
  271. package/dist/ui/fleet-office-card.js +15 -2
  272. package/dist/ui/fleet-office-skin.js +33 -9
  273. package/dist/ui/fleet-office-zones.js +8 -3
  274. package/dist/ui/fleet-office.js +136 -18
  275. package/dist/ui/fleet-task-files.js +1 -1
  276. package/dist/ui/panel-chat.js +15 -2
  277. package/dist/ui/panel-needs.js +22 -2
  278. package/dist/ui/panel-settings.js +22 -8
  279. package/dist/ui/settings-preview-address.js +156 -0
  280. package/dist/ui/settings-registry.js +2 -0
  281. package/dist/ui/settings-strings.js +6 -6
  282. package/dist/ui/shared/app.css +76 -2
  283. package/dist/ui/shared/chat-strings.js +6 -2
  284. package/dist/ui/shared/chat-thread.js +7 -1
  285. package/dist/ui/shared/preview-panel.js +1 -1
  286. package/dist/ui/shared/preview.js +11 -2
  287. package/dist/ui/shared/tokens.css +18 -3
  288. package/dist/ui/shared/ui-confirm.js +5 -4
  289. package/dist/ui/shared/workspace.css +7 -0
  290. package/dist/ui/usage-credits-card.js +84 -0
  291. package/dist/ui/workspace-ignored-strings.js +16 -0
  292. package/dist/ui/workspace-panel.js +15 -6
  293. package/dist/update-card.d.ts +193 -0
  294. package/dist/update-card.js +620 -0
  295. package/dist/update-card.js.map +1 -0
  296. package/dist/update-dispatch.d.ts +16 -1
  297. package/dist/update-dispatch.js +12 -4
  298. package/dist/update-dispatch.js.map +1 -1
  299. package/dist/update-forward.d.ts +73 -0
  300. package/dist/update-forward.js +283 -0
  301. package/dist/update-forward.js.map +1 -0
  302. package/dist/update-idle.d.ts +1 -0
  303. package/dist/update-idle.js +12 -3
  304. package/dist/update-idle.js.map +1 -1
  305. package/dist/update-install.d.ts +2 -1
  306. package/dist/update-install.js +18 -10
  307. package/dist/update-install.js.map +1 -1
  308. package/dist/update-journal.d.ts +351 -0
  309. package/dist/update-journal.js +717 -0
  310. package/dist/update-journal.js.map +1 -0
  311. package/dist/update-launch.js +1 -1
  312. package/dist/update-launch.js.map +1 -1
  313. package/dist/update-npm-env.d.ts +45 -12
  314. package/dist/update-npm-env.js +48 -0
  315. package/dist/update-npm-env.js.map +1 -1
  316. package/dist/update-package-restore.d.ts +75 -0
  317. package/dist/update-package-restore.js +318 -0
  318. package/dist/update-package-restore.js.map +1 -0
  319. package/dist/update-quiescence.d.ts +192 -0
  320. package/dist/update-quiescence.js +330 -0
  321. package/dist/update-quiescence.js.map +1 -0
  322. package/dist/update-readiness-host.d.ts +61 -0
  323. package/dist/update-readiness-host.js +297 -0
  324. package/dist/update-readiness-host.js.map +1 -0
  325. package/dist/update-readiness.d.ts +83 -0
  326. package/dist/update-readiness.js +459 -0
  327. package/dist/update-readiness.js.map +1 -0
  328. package/dist/update-recovery/kit.d.ts +35 -0
  329. package/dist/update-recovery/kit.js +99 -0
  330. package/dist/update-recovery/kit.js.map +1 -0
  331. package/dist/update-recovery/pre-start.d.ts +34 -0
  332. package/dist/update-recovery/pre-start.js +103 -0
  333. package/dist/update-recovery/pre-start.js.map +1 -0
  334. package/dist/update-recovery/recover-main.d.ts +1 -0
  335. package/dist/update-recovery/recover-main.js +4 -0
  336. package/dist/update-recovery/recover-main.js.map +1 -0
  337. package/dist/update-recovery/recover.d.ts +22 -0
  338. package/dist/update-recovery/recover.js +124 -0
  339. package/dist/update-recovery/recover.js.map +1 -0
  340. package/dist/update-recovery/route.d.ts +53 -0
  341. package/dist/update-recovery/route.js +262 -0
  342. package/dist/update-recovery/route.js.map +1 -0
  343. package/dist/update-recovery/runner.d.ts +58 -0
  344. package/dist/update-recovery/runner.js +196 -0
  345. package/dist/update-recovery/runner.js.map +1 -0
  346. package/dist/update-recovery/service-manager.d.ts +39 -0
  347. package/dist/update-recovery/service-manager.js +57 -0
  348. package/dist/update-recovery/service-manager.js.map +1 -0
  349. package/dist/update-restore.d.ts +44 -0
  350. package/dist/update-restore.js +355 -0
  351. package/dist/update-restore.js.map +1 -0
  352. package/dist/update-retained.d.ts +38 -0
  353. package/dist/update-retained.js +91 -0
  354. package/dist/update-retained.js.map +1 -0
  355. package/dist/update-rollback.d.ts +74 -0
  356. package/dist/update-rollback.js +221 -0
  357. package/dist/update-rollback.js.map +1 -0
  358. package/dist/update-settings.d.ts +36 -0
  359. package/dist/update-settings.js +122 -0
  360. package/dist/update-settings.js.map +1 -0
  361. package/dist/update-snapshot-manifest.d.ts +32 -0
  362. package/dist/update-snapshot-manifest.js +65 -0
  363. package/dist/update-snapshot-manifest.js.map +1 -0
  364. package/dist/update-snapshot-scope.d.ts +67 -0
  365. package/dist/update-snapshot-scope.js +172 -0
  366. package/dist/update-snapshot-scope.js.map +1 -0
  367. package/dist/update-snapshot.d.ts +34 -0
  368. package/dist/update-snapshot.js +246 -0
  369. package/dist/update-snapshot.js.map +1 -0
  370. package/dist/update-writers.d.ts +71 -0
  371. package/dist/update-writers.js +235 -0
  372. package/dist/update-writers.js.map +1 -0
  373. package/dist/web-api.d.ts +3 -0
  374. package/dist/web-api.js +43 -8
  375. package/dist/web-api.js.map +1 -1
  376. package/dist/web-chat-history.d.ts +7 -0
  377. package/dist/web-chat-history.js +15 -0
  378. package/dist/web-chat-history.js.map +1 -1
  379. package/dist/web-preview.d.ts +5 -0
  380. package/dist/web-preview.js +1 -1
  381. package/dist/web-preview.js.map +1 -1
  382. package/dist/web-update.d.ts +6 -0
  383. package/dist/windows-agents.d.ts +12 -0
  384. package/dist/windows-agents.js +5 -0
  385. package/dist/windows-agents.js.map +1 -1
  386. package/launcher/agend +4 -1
  387. package/launcher/agend-agent +4 -1
  388. package/launcher/agend-install.cjs +16 -8
  389. package/launcher/install-admission.d.cts +8 -0
  390. package/launcher/npm-allow-scripts.cjs +72 -0
  391. package/launcher/npm-global-prefix.cjs +81 -0
  392. package/launcher/postinstall.cjs +9 -8
  393. package/launcher/runtime-select.cjs +8 -2
  394. package/package.json +3 -2
  395. package/scripts/preinstall-guard.cjs +1 -1
@@ -135,7 +135,8 @@ register("chat", {
135
135
  pvFail_exited: "its address closed unexpectedly", "pvFail_spawn-failed": "cloudflared could not start for it",
136
136
  "pvFail_no-address": "no address was given for it", pvFail_unreachable: "its address could not be reached",
137
137
  "pvFail_lease-held": "an earlier preview tunnel is still being cleaned up", "pvFail_gateway-failed": "its local listener could not start",
138
- "pvFail_rate-limited": "Cloudflare is limiting new temporary links from this machine — try again in a while",
138
+ "pvFail_rate-limited": "Cloudflare is limiting new temporary links from this machine — try again in a while, or download the file to open it",
139
+ pvFixAddress: "Set up a fixed preview address",
139
140
  "pvFail_provisioning-failed": "Cloudflare refused to create its address right now", "pvFail_process-exited": "cloudflared stopped before it gave an address",
140
141
  "pvFail_bad-address": "Cloudflare gave an address that could not be used",
141
142
  pvFail_unknown: "an unexpected error",
@@ -144,6 +145,7 @@ register("chat", {
144
145
  pvServer_notListening: "Previews are not available on this fleet right now.",
145
146
  previews: "Allow HTML previews",
146
147
  clicked: "Clicked:", clickShow: "Show the message these buttons were on",
148
+ hubOnBehalf:"Relayed for {0} · Hub", hubRequester:"Relayed for a Hub requester · Hub", hubDirectAudience:"The reply may be shown to the person who asked.", hubRoomAudience:"The reply may be shown in the original Hub room.", hubRequestDetails:"Request details", hubRequestIdentifiers:"Hub: {0}\nAsked by: {1}\nRequest ID: {2}\nPermission: none",
147
149
  copy: "Copy", copyMessage: "Copy this reply", copied: "Copied", copyFailed: "Copy failed", wrap: "Wrap", showAll: "Show all {0} lines", showMore: "Show more", showLess: "Show less", showAllShort: "All {0} lines", showMoreShort: "More", jumpLatest: "Latest", newBelow: "{0} new",
148
150
  disconnected: "disconnected", tick_queued: "Waiting behind another message", tick_processing: "Handed to the agent", tick_delivered: "The agent has it", tick_failed: "Not delivered", resend: "Resend", resending: "Resending…", resendFailed: "The message could not be resent. Try again.", resendAttachmentGone: "An attached file is no longer available. Write a new message and attach it again.", resendReplyGone: "The quoted message is no longer available. Write a new message without the quote.", tick_cancelled: "Dropped by Stop", reactedBy: "{0} reacted",
149
151
  promptAnswering: "Answering…", promptGone: "This prompt is no longer open", promptTextPlaceholder: "Your answer", promptTextSend: "Send answer", promptFor: "{0}: {1}",
@@ -308,7 +310,8 @@ register("chat", {
308
310
  pvFail_exited: "它的網址意外關閉了", "pvFail_spawn-failed": "無法為它啟動 cloudflared",
309
311
  "pvFail_no-address": "沒有取得它的網址", pvFail_unreachable: "連不到它的網址",
310
312
  "pvFail_lease-held": "上一個預覽通道還在清理中", "pvFail_gateway-failed": "它的本機監聽無法啟動",
311
- "pvFail_rate-limited": "Cloudflare 正在限制這台機器建立新的臨時連結 — 請過一陣子再試",
313
+ "pvFail_rate-limited": "Cloudflare 正在限制這台機器建立新的臨時連結 — 請過一陣子再試,或下載檔案來開啟",
314
+ pvFixAddress: "設定固定的預覽網址",
312
315
  "pvFail_provisioning-failed": "Cloudflare 目前拒絕建立它的網址", "pvFail_process-exited": "cloudflared 在給出網址前就停止了",
313
316
  "pvFail_bad-address": "Cloudflare 給出的網址無法使用",
314
317
  pvFail_unknown: "發生了未預期的錯誤",
@@ -317,6 +320,7 @@ register("chat", {
317
320
  pvServer_notListening: "這個 fleet 目前無法預覽。",
318
321
  previews: "允許預覽 HTML",
319
322
  clicked: "點選了:", clickShow: "顯示這些按鈕所在的訊息",
323
+ hubOnBehalf:"代 {0} 傳話 · Hub", hubRequester:"代 Hub 提問者傳話", hubDirectAudience:"回覆可能會讓提問的人看到。", hubRoomAudience:"回覆可能會顯示在原本的 Hub 房間。", hubRequestDetails:"請求詳情", hubRequestIdentifiers:"Hub:{0}\n提問的人:{1}\n請求編號:{2}\n權限:無",
320
324
  copy: "複製", copyMessage: "複製這則回覆", copied: "已複製", copyFailed: "複製失敗", wrap: "換行", showAll: "展開全部 {0} 行", showMore: "顯示更多", showLess: "收合", showAllShort: "全部 {0} 行", showMoreShort: "更多", jumpLatest: "最新", newBelow: "{0} 則新訊息",
321
325
  disconnected: "已斷線", tick_queued: "排在前一則訊息之後", tick_processing: "已交給 agent", tick_delivered: "agent 已收到", tick_failed: "沒有送到", resend: "重新傳送", resending: "正在重新傳送…", resendFailed: "無法重新傳送這則訊息,請再試一次。", resendAttachmentGone: "附件已無法使用。請寫一則新訊息,重新附上檔案。", resendReplyGone: "引用的訊息已無法使用。請寫一則不含引用的新訊息。", tick_cancelled: "已被中止取消", reactedBy: "{0} 的回應",
322
326
  promptAnswering: "回覆中…", promptGone: "這個提示已經結束", promptTextPlaceholder: "你的回答", promptTextSend: "送出回答", promptFor: "{0}:{1}",
@@ -359,7 +359,11 @@ export function createThread(list, scroller, opts) {
359
359
  const folded = x.wrap === true ? "" : ` folded${overflows ? " overflows" : ""}`;
360
360
  // M-3339: a ClassicBot room's held-request line carries its contact badge too (the Fleet chat's hook; a Hub passes none).
361
361
  const contact = typeof opts.contactBadge === "function" && x.contactTicket ? String(opts.contactBadge(x) || "") : "";
362
- return `<div class="msg status-line${folded}"><div class="meta">${time}${contact}</div><div class="body"><div class="st-text">${body}</div>${x.wrap === true ? "" : more}${action}</div>${x.bare === true ? "" : tools}</div>`;
362
+ const p=x.requestProvenance;
363
+ // This inert field is emitted only from the validated outbox projection. Label-looking body text stays plain text.
364
+ const provenance=p&&p.version===1&&p.kind==="hub-requester"&&p.authority==="none"&&["person","agent","assistant"].includes(p.actorKind)
365
+ ? `<div class="request-provenance"><strong>${escAttr(p.displayName?trf("chat.hubOnBehalf",p.displayName):tr("chat.hubRequester"))}</strong><p>${escAttr(p.refused===true?text:tr(p.audience==="room"?"chat.hubRoomAudience":"chat.hubDirectAudience"))}</p><details class="n-raw"><summary>${escAttr(tr("chat.hubRequestDetails"))}</summary><div class="n-raw-text">${escAttr(trf("chat.hubRequestIdentifiers",p.hubId,p.actorId,p.rootContextId))}</div>${x.bare===true?"":tools}</details></div>` : "";
366
+ return `<div class="msg status-line${folded}"><div class="meta">${time}${contact}</div>${provenance}${provenance&&p.refused===true?"":`<div class="body"><div class="st-text">${body}</div>${x.wrap === true ? "" : more}${action}</div>`}${x.bare === true || provenance ? "" : tools}</div>`;
363
367
  }
364
368
  /**
365
369
  * #1266: an agent reply's buttons. Labels are text (escaped, never Markdown); the click names the set and the index,
@@ -658,6 +662,8 @@ export function createThread(list, scroller, opts) {
658
662
  stopB.hidden = !going && !reading;
659
663
  banner.hidden = !going || P().bannerAcked();
660
664
  note.textContent = reason != null ? reason : reading ? tr("chat.pvLoading") : going ? (state === "starting" ? tr("chat.pvStarting") : "") : inPanel ? tr("chat.pvInPanel") : a.ok ? "" : a.reason;
665
+ // M-3814: Cloudflare's limit on temporary links — a link to where a fixed preview address is set up.
666
+ if (a.fix && !a.ok && note.textContent === a.reason) { const fix = el("a", "pv-fix", a.fix.label); fix.href = a.fix.href; note.append(" ", fix); }
661
667
  optB.textContent = P().optedIn() ? tr("chat.pvDisallow") : tr("chat.pvAllow");
662
668
  neverB.textContent = P().never() ? tr("chat.pvNeverUndo") : tr("chat.pvNever");
663
669
  };
@@ -528,7 +528,7 @@ export function PreviewPanel({ name, split, msgs, subscribe, keyOf, reveal, down
528
528
  ${going && !P().bannerAcked() ? html`<div class="pv-banner"><span class="pv-banner-text">${P().banner()}</span>
529
529
  <button type="button" class="btn btn-sm btn-ghost pv-ack" title=${P().bannerAckTitle()} onClick=${() => P().ackBanner()}>${P().bannerAckLabel()}</button></div>` : null}
530
530
  ${cdnHost && shown === "preview" ? html`<div class="pv-note pv-cdn-note" role="status">${t("chat.pvCdnNote", cdnHost)}</div>` : null}
531
- ${note && shown === "preview" ? html`<div class="pv-note">${note}${askOptIn ? html` <button type="button" class="btn btn-sm pv-panel-allow" onClick=${allowHere}>${t("chat.pvAllowButton")}</button>` : null}</div>` : null}
531
+ ${note && shown === "preview" ? html`<div class="pv-note">${note}${askOptIn ? html` <button type="button" class="btn btn-sm pv-panel-allow" onClick=${allowHere}>${t("chat.pvAllowButton")}</button>` : null}${a.fix && note === a.reason ? html` <a class="pv-fix" href=${a.fix.href}>${a.fix.label}</a>` : null}</div>` : null}
532
532
  <div class=${`pv-panel-body${listing || shown !== "preview" ? " show-code" : ` w-${device}`}`}>
533
533
  <div class="pv-holder" ref=${holder}></div>
534
534
  ${listing ? html`<${PageList} pages=${pages} current=${pageIdOf(open)} pick=${(p) => { setListing(false); if (p.id !== pageIdOf(open)) show(p.latest); }} />` : null}
@@ -30,12 +30,15 @@
30
30
  var BANNER_ACK_KEY = "agend_html_preview_banner_ack";
31
31
  var BANNER = "Previews run the agent's HTML in an isolated frame. It cannot use your login, but it may be able to send data out. Only preview content you trust. A preview can slow or freeze this tab.";
32
32
 
33
+ /** M-3814: Settings → Access → Sharing, at the fixed address's fields (its preview address is set up just below them). */
34
+ var FIX_HREF = "/settings/access#publicFixedAddress";
33
35
  var cfg = { dashboardOrigin: "", previewOrigin: "", boot: "", reason: "", reasonCode: "", detail: "" };
34
36
  // Why it failed, in English when the app's dictionary has no word for it (chat-strings.js pvFail_*).
35
37
  var FAIL_EN = { exited: "its address closed unexpectedly", "spawn-failed": "cloudflared could not start for it", "no-address": "no address was given for it",
36
38
  unreachable: "its address could not be reached", "lease-held": "an earlier preview tunnel is still being cleaned up", "gateway-failed": "its local listener could not start",
37
39
  // #1767: what cloudflared's exit before an address really was.
38
- "rate-limited": "Cloudflare is limiting new temporary links from this machine — try again in a while",
40
+ // M-3814: the card's Download (or the file's link) still opens it; the notice also links to the fixed preview address.
41
+ "rate-limited": "Cloudflare is limiting new temporary links from this machine — try again in a while, or download the file to open it",
39
42
  "provisioning-failed": "Cloudflare refused to create its address right now", "process-exited": "cloudflared stopped before it gave an address",
40
43
  "bad-address": "Cloudflare gave an address that could not be used" };
41
44
  // #1554: the page's words. `say(key, english, …values)` asks the app's dictionary (init's opts.text) and keeps the
@@ -53,6 +56,8 @@
53
56
  var live = new Map(); // cardKey → { key, iframe, ch, holder, state, … } (at most one: one running preview per page)
54
57
  var listening = false;
55
58
 
59
+ /** A guest's page (the server marks <body data-tier="guest">): Settings is not theirs, so no link there. */
60
+ function guestPage() { try { return root.document.body.getAttribute("data-tier") === "guest"; } catch (e) { return false; } }
56
61
  function now() { return root.performance && typeof root.performance.now === "function" ? root.performance.now() : Date.now(); }
57
62
  function store(kind) { try { return root[kind] || null; } catch (e) { return null; } }
58
63
  function utf8Bytes(s) { try { return new root.TextEncoder().encode(s).length; } catch (e) { return String(s).length * 3; } }
@@ -200,7 +205,11 @@
200
205
  var english = cfg.reasonCode === "publicLinkPreviewFailed" ? "Previews are unavailable on this public link: {0}. The link itself keeps working."
201
206
  : cfg.reason || "Previews are not available here.";
202
207
  var server = cfg.reasonCode ? say("pvServer_" + cfg.reasonCode, english, arg) : "";
203
- return { ok: false, why: "server", reason: server || cfg.reason || say("pvWhyServer", "Previews are not available here.") };
208
+ var out = { ok: false, why: "server", reason: server || cfg.reason || say("pvWhyServer", "Previews are not available here.") };
209
+ // M-3814 (the user's decision): Cloudflare's limit on temporary links (429) — a link to Settings → Access, the
210
+ // fixed address's section, where a fixed preview address (no temporary link at all) is set up.
211
+ if (cfg.reasonCode === "publicLinkPreviewFailed" && cfg.detail === "rate-limited" && !guestPage()) out.fix = { href: FIX_HREF, label: say("pvFixAddress", "Set up a fixed preview address") };
212
+ return out;
204
213
  }
205
214
  var at = root.location && root.location.origin;
206
215
  if (!cfg.dashboardOrigin || at !== cfg.dashboardOrigin) {
@@ -16,7 +16,14 @@
16
16
  * Emoji (#1918 follow-up, the user's tofu boxes): every stack ends with the platforms' colour emoji fonts and the
17
17
  * `emoji` generic (--font-emoji), so an emoji the text fonts lack is drawn by Windows' Segoe UI Emoji, macOS's Apple
18
18
  * Color Emoji or Linux's Noto Color Emoji rather than as a box — for the stock stacks and each theme font
19
- * (app.css: .th-font-system, .th-font-mono). A browser tries the families in order for each character. */
19
+ * (app.css: .th-font-system, .th-font-mono). A browser tries the families in order for each character.
20
+ *
21
+ * M-3796 (the user's grey 🆕 on Win11 Edge): a text font earlier in a stack can carry its own black-and-white glyph for an
22
+ * emoji, and the browser takes it — on Windows, Noto Sans TC draws 🆕 🆗 🆓 🈶, and the font named Menlo there draws ☕ ⚡ ♈.
23
+ * So each stack starts with "AgEnD Emoji": the platform's colour emoji font (local(), nothing downloaded), for emoji
24
+ * only (unicode-range: the emoji planes, the emoji-by-default symbols of the BMP, and the joiners that build sequences).
25
+ * Text keeps its fonts — digits, #, *, ©, ™, ★, ♥, arrows and CJK are outside the range — and a text-style request
26
+ * (U+FE0E) still gets the text glyph. A machine without any of the three fonts skips the face. */
20
27
 
21
28
  @font-face {
22
29
  font-family: "Inter";
@@ -27,11 +34,19 @@
27
34
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2190-2193, U+2212, U+2215, U+FEFF, U+FFFD;
28
35
  }
29
36
 
37
+ @font-face {
38
+ font-family: "AgEnD Emoji";
39
+ src: local("Segoe UI Emoji"), local("SegoeUIEmoji"), local("Apple Color Emoji"), local("AppleColorEmoji"), local("Noto Color Emoji"), local("NotoColorEmoji");
40
+ unicode-range: U+1F000-1FAFF, U+200D, U+FE0F, U+20E3, U+231A-231B, U+23E9-23EC, U+23F0, U+23F3, U+25FD-25FE, U+2614-2615, U+2648-2653, U+267F,
41
+ U+2693, U+26A1, U+26AA-26AB, U+26BD-26BE, U+26C4-26C5, U+26CE, U+26D4, U+26EA, U+26F2-26F3, U+26F5, U+26FA, U+26FD, U+2705, U+270A-270B,
42
+ U+2728, U+274C, U+274E, U+2753-2755, U+2757, U+2795-2797, U+27B0, U+27BF, U+2B1B-2B1C, U+2B50, U+2B55;
43
+ }
44
+
30
45
  :root {
31
46
  /* ── Type ── */
32
47
  --font-emoji: "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", emoji;
33
- --font-ui: Inter, "PingFang TC", "PingFang SC", "Noto Sans TC", "Noto Sans SC", "Noto Sans CJK TC", "Noto Sans CJK SC", "Microsoft JhengHei", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif, var(--font-emoji);
34
- --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace, var(--font-emoji);
48
+ --font-ui: "AgEnD Emoji", Inter, "PingFang TC", "PingFang SC", "Noto Sans TC", "Noto Sans SC", "Noto Sans CJK TC", "Noto Sans CJK SC", "Microsoft JhengHei", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif, var(--font-emoji);
49
+ --font-mono: "AgEnD Emoji", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace, var(--font-emoji);
35
50
  /* M-3216: the two small sizes come from a base the phone layout raises one step; the text-size scopes in app.css
36
51
  (the chat, Details, Fleet, Log, the drawer's agents) scale the same base, so they follow it too. */
37
52
  --fs-3xs-base: 10px; /* M-3226: the two smallest steps (chart labels, badges, counts); font size only */
@@ -6,7 +6,7 @@ import { createStore, useStore } from "./app-store.js";
6
6
  import { Dialog } from "./ui-dialog.js";
7
7
  import { t } from "./app-i18n.js";
8
8
 
9
- /** Pending questions, oldest first: { id, title, message, confirmLabel, danger, resolve }. */
9
+ /** Pending questions, oldest first: { id, title, message, confirmLabel, danger, more, even, resolve }. */
10
10
  export const confirmStore = createStore({ queue: [] });
11
11
  let seq = 0;
12
12
 
@@ -14,11 +14,11 @@ let seq = 0;
14
14
  * Ask. Resolves true for the confirm button, false for Cancel, Esc, the backdrop or ×.
15
15
  * `message` may hold blank lines (paragraphs); it is shown as text.
16
16
  */
17
- export function confirmDialog({ title, message, confirmLabel, danger = false, more = null } = {}) {
17
+ export function confirmDialog({ title, message, confirmLabel, danger = false, more = null, even = false } = {}) {
18
18
  return new Promise((resolve) => {
19
19
  // M-3387: `more` { label, lines } — a list closed under the text until opened (e.g. every tool name a switch stops).
20
20
  const extra = more && more.label && Array.isArray(more.lines) && more.lines.length ? { label: String(more.label), lines: more.lines.map(String) } : null;
21
- const item = { id: ++seq, title: title || t("app.confirmTitle"), message: String(message || ""), confirmLabel: confirmLabel || t("app.confirmOk"), danger, more: extra, resolve };
21
+ const item = { id: ++seq, title: title || t("app.confirmTitle"), message: String(message || ""), confirmLabel: confirmLabel || t("app.confirmOk"), danger, more: extra, even: !!even, resolve };
22
22
  confirmStore.set((s) => ({ queue: [...s.queue, item] }));
23
23
  });
24
24
  }
@@ -37,7 +37,8 @@ export function ConfirmHost() {
37
37
  const q = queue[0];
38
38
  if (!q) return null;
39
39
  const paragraphs = q.message.split(/\n{2,}/);
40
- return html`<${Dialog} key=${q.id} title=${q.title} onClose=${() => answerConfirm(q.id, false)}
40
+ // `even`: the two buttons share the row's width on every screen (as a phone's bottom sheet always does).
41
+ return html`<${Dialog} key=${q.id} title=${q.title} cls=${q.even ? "dlg-even" : ""} onClose=${() => answerConfirm(q.id, false)}
41
42
  actions=${html`<button type="button" class="btn" onClick=${() => answerConfirm(q.id, false)}>${t("app.cancel")}</button>
42
43
  <button type="button" class=${`btn ${q.danger ? "btn-danger" : "btn-primary"}`} data-confirm="yes" onClick=${() => answerConfirm(q.id, true)}>${q.confirmLabel}</button>`}>
43
44
  ${paragraphs.map((p, i) => html`<p key=${i} class="confirm-text">${p}</p>`)}
@@ -18,3 +18,10 @@
18
18
  .ws-viewer-head { display: flex; align-items: center; gap: var(--s-2); margin-bottom: var(--s-2); }
19
19
  .ws-text .ws-ln { color: var(--text-3); user-select: none; padding-right: var(--s-3); }
20
20
  .ws-image { max-width: 100%; height: auto; display: block; border-radius: var(--r-sm); }
21
+ /* M-3765: what git ignores, listed on request (soul.md always): a toggle above the tree, and the entries a little quieter. */
22
+ .ws-ignored-toggle { display: inline-flex; align-items: center; gap: var(--s-2); margin: 0 0 var(--s-2); font-size: var(--fs-sm); color: var(--text-2); cursor: pointer; }
23
+ .ws-entry.is-ignored .ws-name { color: var(--text-2); }
24
+ @media (max-width: 899px), (pointer: coarse) { .ws-ignored-toggle { min-height: var(--tap); } }
25
+ /* M-3765 capture check: a folder in the tree opens as its own listing, never expanded in place, so its chevron points right
26
+ (collapsed); the chevron icon itself points down. */
27
+ .ws-entry.t-dir .ws-entry-btn > .icon { transform: rotate(-90deg); }
@@ -0,0 +1,84 @@
1
+ // M-3757: Claude Code's usage-credits prompt in the standard Needs-you layout, in the UI's language. The server sends the card's
2
+ // `view` (the agent, the model the prompt is about, the model a switch would move to, and whether it is Claude's
3
+ // /model picker) and each option's `role`, read from Claude's own words; this module names them. Claude's own text
4
+ // stays available behind a toggle (the page's), never in the title or on the buttons.
5
+ import { register, t } from "/assets/app-i18n.js";
6
+
7
+ register("ucard", {
8
+ en: {
9
+ title: "{0}: {1} now costs extra. Switch model?", titleStay: "{0}: {1} now costs extra.", titlePicker: "{0}: switching to {1} costs extra.",
10
+ titleShort: "{0} costs extra. Switch model?", titleStayShort: "{0} costs extra.", titlePickerShort: "Switching to {0} costs extra.",
11
+ detail: "{0} uses your plan; keeping {1} bills usage credits.", detailStay: "Keeping {0} bills usage credits.", detailPicker: "Using {0} bills usage credits.",
12
+ switch: "Switch to {0}", credits: "Keep {0}", creditsPicker: "Use {0}",
13
+ notNow: "Not now", keep: "Keep current model", admin: "Ask admin for credits", upgrade: "Upgrade plan",
14
+ showRaw: "Show Claude's text",
15
+ confirmTitle: "Keep {0} on {1}?", confirmTitlePicker: "Move {0} to {1}?",
16
+ confirmMessage: "{0}'s replies may be billed to usage credits, separate from your plan.", confirmLabel: "Continue on credits",
17
+ },
18
+ "zh-TW": {
19
+ title: "{0}:{1} 要另外收費,要換模型嗎?", titleStay: "{0}:{1} 要另外收費。", titlePicker: "{0}:改用 {1} 要另外收費。",
20
+ titleShort: "{0} 要另外收費,要換模型嗎?", titleStayShort: "{0} 要另外收費。", titlePickerShort: "改用 {0} 要另外收費。",
21
+ detail: "{0} 用方案額度;繼續用 {1} 會另外扣點數。", detailStay: "繼續用 {0} 會另外扣點數。", detailPicker: "改用 {0} 會另外扣點數。",
22
+ switch: "換成 {0}", credits: "繼續用 {0}", creditsPicker: "改用 {0}",
23
+ notNow: "先不要", keep: "維持目前模型", admin: "向管理員申請點數", upgrade: "升級方案",
24
+ showRaw: "看 Claude 原文",
25
+ confirmTitle: "讓 {0} 繼續用 {1}?", confirmTitlePicker: "讓 {0} 改用 {1}?",
26
+ confirmMessage: "{0} 之後的回覆可能會另外從用量點數扣款(不在方案內)。", confirmLabel: "繼續(用點數)",
27
+ },
28
+ });
29
+ const tu = (k, ...a) => t(`ucard.${k}`, ...a);
30
+
31
+ /**
32
+ * The card's one-line title. `named: false` where the agent is already named above it (Needs you's agent group): the
33
+ * title then starts at the model, short enough for one line on a phone.
34
+ */
35
+ export function usageCreditsTitle(view, { named = true } = {}) {
36
+ const key = view.picker ? "titlePicker" : view.target ? "title" : "titleStay";
37
+ return named ? tu(key, view.agent, view.model) : tu(`${key}Short`, view.model);
38
+ }
39
+
40
+ /** The one sentence under the title: what each choice means for the bill. */
41
+ export function usageCreditsDetail(view) {
42
+ if (view.picker) return tu("detailPicker", view.model);
43
+ return view.target ? tu("detail", view.target, view.model) : tu("detailStay", view.model);
44
+ }
45
+
46
+ /** One option's button words, by its role; null for a role this page does not know (its own label is shown). */
47
+ function label(view, role) {
48
+ switch (role) {
49
+ case "switch": return view.target ? tu("switch", view.target) : null;
50
+ case "credits": return tu(view.picker ? "creditsPicker" : "credits", view.model);
51
+ case "not-now": return tu("notNow");
52
+ case "keep": return tu("keep");
53
+ case "admin": return tu("admin");
54
+ case "upgrade": return tu("upgrade");
55
+ default: return null;
56
+ }
57
+ }
58
+
59
+ /** A button's weight: the choice that stays on the plan is primary; asking an admin or upgrading is a ghost; the rest secondary. */
60
+ function kindOf(role) {
61
+ if (role === "switch" || role === "keep") return "primary";
62
+ if (role === "admin" || role === "upgrade") return "ghost";
63
+ return "secondary";
64
+ }
65
+
66
+ /**
67
+ * The card's actions as this page shows them: each named by its role (Claude's own label kept for any other), with
68
+ * its weight (`kind`), and the credits choice confirmed in these words. The action ids are the server's, unchanged.
69
+ */
70
+ export function usageCreditsActions(view, actions) {
71
+ return (actions || []).map((a) => {
72
+ const words = label(view, a.role);
73
+ const confirmation = a.role === "credits"
74
+ ? { title: tu(view.picker ? "confirmTitlePicker" : "confirmTitle", view.agent, view.model), message: tu("confirmMessage", view.agent), confirmLabel: tu("confirmLabel"), even: true }
75
+ : a.confirmation;
76
+ const { hint: _hint, ...rest } = a;
77
+ return { ...rest, label: words || a.label, kind: kindOf(a.role), ...(confirmation ? { confirmation } : {}) };
78
+ });
79
+ }
80
+
81
+ /** The button classes for an action's weight (the standard Needs-you and chat buttons). */
82
+ export const kindClass = (kind) => (kind === "primary" ? " btn-primary" : kind === "ghost" ? " btn-ghost" : "");
83
+
84
+ export const showRawLabel = () => tu("showRaw");
@@ -0,0 +1,16 @@
1
+ // M-3765: the Files tab's "show what git ignores" toggle, registered by its own module (workspace-panel.js imports it): a
2
+ // page holding an older cached workspace-strings.js never shows a raw key (the module-skew rule, #3155).
3
+ import { register } from "/assets/app-i18n.js";
4
+
5
+ register("chat", {
6
+ en: {
7
+ wsShowIgnored: "Show git-ignored files",
8
+ wsShowIgnoredTitle: "Also list what .gitignore leaves out, such as build output and dependencies. Secret-looking files stay hidden. soul.md is always listed.",
9
+ wsIgnored: "ignored by git",
10
+ },
11
+ "zh-TW": {
12
+ wsShowIgnored: "顯示 git 忽略的檔案",
13
+ wsShowIgnoredTitle: "一併列出 .gitignore 排除的項目,例如建置輸出和相依套件。看起來像機密的檔案仍會隱藏。soul.md 一律會列出。",
14
+ wsIgnored: "git 已忽略",
15
+ },
16
+ });
@@ -1,7 +1,8 @@
1
1
  // #3153 P1: an agent's Files / Changes in the side panel (read-only) — the folder it works in, as the server's
2
2
  // /ui/workspace answers it (src/agent-workspace.ts: confined to that folder, secrets hidden by name, size limits).
3
3
  // - Changes (the default): git status and the uncommitted diff against HEAD, untracked files included, per file.
4
- // - Files: the folder's tree, one directory at a time (gitignored entries left out), and a read-only viewer — text
4
+ // - Files: the folder's tree, one directory at a time (gitignored entries left out but for soul.md, M-3765; a toggle
5
+ // lists them all, marked), and a read-only viewer — text
5
6
  // with line numbers, an image inline, otherwise why not (binary, too large, hidden, a link).
6
7
  // Refreshed on demand, and when the agent replies (the end of its turn). Nothing here writes to the folder, and
7
8
  // everything is drawn as text nodes: no HTML from the folder is ever parsed.
@@ -15,6 +16,7 @@ import { Icon } from "/assets/ui-icons.js";
15
16
  import { Skeleton } from "/assets/ui-states.js";
16
17
  import { assetUrl } from "/assets/asset-url.js";
17
18
  import "./workspace-strings.js"; // this panel's own words (an older cached chat-strings.js lacks them)
19
+ import "./workspace-ignored-strings.js"; // M-3765: the ignored-files toggle's words (a module of their own: an older cached workspace-strings.js lacks them)
18
20
  import "./workspace-follow-strings.js"; // #3160's words, a module of their own (an older workspace-strings.js lacks them)
19
21
 
20
22
  /** This panel's stylesheets, linked once (a tab opened before an upgrade has an app.css without these rules). */
@@ -95,6 +97,10 @@ export function WorkspacePanel({ open, name, panel, fs, enterFs, leaveFs, onKey,
95
97
  const [current, setCurrent] = useState(null);
96
98
  const [hlEntry, setHlEntry] = useState(null);
97
99
  const [followInfo, setFollowInfo] = useState(null); // { supported, running }
100
+ // M-3765: also list what git ignores (build output, dependencies), each marked; soul.md is listed either way.
101
+ const [showIgnored, setShowIgnored] = useState(false);
102
+ const ignoredRef = useRef(false);
103
+ const listExtra = () => (ignoredRef.current ? "&ignored=1" : "");
98
104
  const gen = useRef(0);
99
105
  const changesGen = useRef(0), dirGen = useRef(0), alive = useRef(true);
100
106
  const actions = useRef(null), autoScroll = useRef(null);
@@ -117,7 +123,7 @@ export function WorkspacePanel({ open, name, panel, fs, enterFs, leaveFs, onKey,
117
123
  const loadDir = async (path, automatic = false) => {
118
124
  const mine = ++gen.current;
119
125
  if (!automatic) { setListing({ state: "loading", path }); setFile(null); }
120
- const r = await read(instance, "list", path);
126
+ const r = await read(instance, "list", path, listExtra());
121
127
  if (!valid(mine, automatic)) return;
122
128
  if (automatic) setTab("files");
123
129
  setFile(null);
@@ -168,7 +174,7 @@ export function WorkspacePanel({ open, name, panel, fs, enterFs, leaveFs, onKey,
168
174
  // The crumbs follow the file without dropping the viewer (loadDir would close it).
169
175
  const loadDirQuiet = async (path, token = gen.current, automatic = false) => {
170
176
  const mine = ++dirGen.current;
171
- const r = await read(instance, "list", path);
177
+ const r = await read(instance, "list", path, listExtra());
172
178
  if (r.ok && mine === dirGen.current && valid(token, automatic)) { setDir(path); setListing({ state: "ready", body: r.body, path }); }
173
179
  };
174
180
  actions.current = { show };
@@ -177,6 +183,7 @@ export function WorkspacePanel({ open, name, panel, fs, enterFs, leaveFs, onKey,
177
183
  useEffect(() => {
178
184
  alive.current = true; gen.current++; dirGen.current++; changesGen.current++;
179
185
  followRef.current = "off"; setFollow("off"); setHistory([]); setCurrent(null); setFile(null); setListing(null); setTab("changes");
186
+ ignoredRef.current = false; setShowIgnored(false);
180
187
  pos.current = { scope: null, turn: null, last: 0 }; pending.current = null;
181
188
  loadChanges();
182
189
  return () => { alive.current = false; gen.current++; dirGen.current++; changesGen.current++; clearTimeout(changesTimer.current); };
@@ -283,7 +290,9 @@ export function WorkspacePanel({ open, name, panel, fs, enterFs, leaveFs, onKey,
283
290
  body.scrollTop += el.getBoundingClientRect().top - body.getBoundingClientRect().top - body.clientHeight / 2;
284
291
  autoScroll.current = body.scrollTop;
285
292
  }} back=${() => { pause(); setFile(null); }} />`
286
- : html`<${Listing} listing=${listing} dir=${dir} hl=${hlEntry} openDir=${userDir} openFile=${userFile} />`}
293
+ : html`<label class="check ws-ignored-toggle" title=${t("chat.wsShowIgnoredTitle")}><input type="checkbox" checked=${showIgnored}
294
+ onChange=${(e) => { pause(); ignoredRef.current = !!e.currentTarget.checked; setShowIgnored(ignoredRef.current); loadDir(dir); }} /><span>${t("chat.wsShowIgnored")}</span></label>
295
+ <${Listing} listing=${listing} dir=${dir} hl=${hlEntry} openDir=${userDir} openFile=${userFile} />`}
287
296
  </div>`}
288
297
  </div>
289
298
  </aside>`;
@@ -342,11 +351,11 @@ function Listing({ listing, hl, openDir, openFile }) {
342
351
  <ul class="ws-entries">${l.entries.map((e) => {
343
352
  const rel = l.path ? `${l.path}/${e.name}` : e.name;
344
353
  const usable = !e.hidden && (e.type === "dir" || e.type === "file");
345
- return html`<li key=${e.name} class=${`ws-entry t-${e.type}${e.hidden ? " is-hidden" : ""}${hl === rel ? " hl" : ""}`}>
354
+ return html`<li key=${e.name} class=${`ws-entry t-${e.type}${e.hidden ? " is-hidden" : ""}${e.ignored ? " is-ignored" : ""}${hl === rel ? " hl" : ""}`}>
346
355
  <button type="button" class="ws-entry-btn" disabled=${!usable} onClick=${() => (e.type === "dir" ? openDir(rel) : openFile(rel))}>
347
356
  <${Icon} name=${e.type === "dir" ? "chevron" : e.type === "symlink" ? "external" : "file"} size=${14} />
348
357
  <span class="ws-name">${e.name}${e.type === "dir" ? "/" : ""}</span>
349
- <span class="ws-meta">${e.hidden ? t("chat.wsHiddenFile") : e.type === "symlink" ? t("chat.wsLink") : e.type === "file" ? size(e.size) : ""}</span>
358
+ <span class="ws-meta">${[e.hidden ? t("chat.wsHiddenFile") : e.type === "symlink" ? t("chat.wsLink") : e.type === "file" ? size(e.size) : "", e.ignored ? t("chat.wsIgnored") : ""].filter(Boolean).join(" · ")}</span>
350
359
  </button></li>`;
351
360
  })}</ul></div>`;
352
361
  }
@@ -0,0 +1,193 @@
1
+ import { type IdleUpdate, type IdleUpdateLaunch } from "./update-idle.js";
2
+ import { readUpdateProgress } from "./update-marker.js";
3
+ import { type UpdatesSettings } from "./update-settings.js";
4
+ export declare const NOT_NOW_MS: number;
5
+ export declare const PICK_WITHIN_MS: number;
6
+ /** Progress-marker name for one local idle launch. The Hub uses its own prefix. */
7
+ export declare function idleUpdateMessageId(id: string): string;
8
+ type IdleMarker = NonNullable<ReturnType<typeof readUpdateProgress>>;
9
+ /**
10
+ * What a leftover `updating` row became. `marker` is already this row's marker, or null.
11
+ * The running version means the install landed. A marker that reached the restart means it was rolled back.
12
+ */
13
+ export declare function idleClaimOutcome(version: string, current: string | null, marker: IdleMarker | null): "done" | "rolled-back" | "failed";
14
+ export type UpdateCardState = "offered" | "not-now" | "scheduled" | "waiting-idle" | "updating" | "done" | "failed" | "cant";
15
+ export type UpdateCardAction = "when-idle" | "now" | "pick-time" | "not-now" | "cancel";
16
+ export type UpdateCardChannel = "alpha" | "beta" | "stable";
17
+ export type UpdateFailCause = "network" | "permission" | "other";
18
+ export interface UpdateCardView {
19
+ version: string;
20
+ channel: UpdateCardChannel;
21
+ installable: boolean;
22
+ notes?: string;
23
+ state: UpdateCardState;
24
+ notNowUntil?: number;
25
+ scheduledAt?: number;
26
+ waitingFor?: string[];
27
+ waitingSince?: number;
28
+ lastAnswer?: {
29
+ action: UpdateCardAction;
30
+ at: number;
31
+ by: string;
32
+ };
33
+ failed?: {
34
+ cause: UpdateFailCause;
35
+ rolledBack: boolean;
36
+ };
37
+ }
38
+ export interface UpdateOfferInput {
39
+ version: string;
40
+ channel: UpdateCardChannel;
41
+ installable: boolean;
42
+ notes?: string;
43
+ }
44
+ export interface UpdateAnswerBody {
45
+ action?: unknown;
46
+ confirm?: unknown;
47
+ at?: unknown;
48
+ }
49
+ export type UpdateAnswerResult = {
50
+ ok: true;
51
+ status: 200;
52
+ card: UpdateCardView | null;
53
+ } | {
54
+ ok: false;
55
+ status: 400;
56
+ body: {
57
+ error: string;
58
+ };
59
+ } | {
60
+ ok: false;
61
+ status: 409;
62
+ body: {
63
+ key: "update_running" | "card_changed";
64
+ error?: string;
65
+ };
66
+ } | {
67
+ ok: false;
68
+ status: 412;
69
+ body: {
70
+ key: "preflight";
71
+ preflight: unknown;
72
+ };
73
+ } | {
74
+ ok: false;
75
+ status: number;
76
+ body: {
77
+ error: string;
78
+ };
79
+ };
80
+ export interface UpdateCardDeps {
81
+ dataDir: string;
82
+ now(): number;
83
+ settings(): UpdatesSettings | undefined;
84
+ /** Display names of agents still working. Unknown is an empty list. */
85
+ busyNames(): string[];
86
+ /** Every agent is idle and nothing is in flight. Pause and pin are applied here, not by the caller. */
87
+ agentsIdle(): boolean;
88
+ /** A Hub row or another update already owns the machine. */
89
+ externalBusy(): boolean;
90
+ /** Today's immediate install. `stillAllowed` is the asking session, checked again at the launch. */
91
+ launchNow(by: string, stillAllowed: () => boolean): Promise<{
92
+ ok: true;
93
+ } | {
94
+ ok: false;
95
+ status: number;
96
+ error: string;
97
+ }>;
98
+ /** Hub "update now": force the waiting Hub row. Absent when this fleet has no Hub queue. */
99
+ launchHubNow?(id: string, stillAllowed: () => boolean): Promise<{
100
+ ok: true;
101
+ } | {
102
+ ok: false;
103
+ status: number;
104
+ error: string;
105
+ }>;
106
+ /** Cancel one waiting Hub row. The local queue is cancelled here. */
107
+ cancelHub?(id: string): void;
108
+ /** Idle launch, the same installer as launchNow, claimed by the queue. `id` names the row and its marker. */
109
+ launchIdle(version: string, control: IdleUpdateLaunch, id: string): Promise<boolean>;
110
+ /** The version this process is running. Null when it cannot be read. */
111
+ currentVersion(): string | null;
112
+ /** The marker this boot adopted, kept after startup clears the file. */
113
+ bootMarker?(): ReturnType<typeof readUpdateProgress>;
114
+ /** Slice 1.2. Absent, or null, allows the action. */
115
+ preflight?(action: UpdateCardAction): {
116
+ preflight: unknown;
117
+ } | null;
118
+ }
119
+ /** A display label for lastAnswer.by. A bare id is never stored. */
120
+ export declare function updateAnswerLabel(label: string | undefined): string;
121
+ /** Which chat line `/update` (not `/update now`) replies with. */
122
+ export declare function updateOfferReply(card: UpdateCardView | null, current: string | null, pinned: boolean): {
123
+ key: string;
124
+ args: string[];
125
+ };
126
+ export declare class UpdateOfferCard {
127
+ private readonly deps;
128
+ private readonly db;
129
+ private readonly queue;
130
+ private stored;
131
+ private stopped;
132
+ /** Cancel/retarget notifies the queue; ignore that echo so it cannot overwrite the card mid-update. */
133
+ private quiet;
134
+ private timer?;
135
+ private readonly answers;
136
+ constructor(deps: UpdateCardDeps);
137
+ close(): void;
138
+ /** Drop an offer the latest check no longer makes. Leaves a wait or an update alone. */
139
+ clearQuietOffer(): void;
140
+ noteOffer(offer: UpdateOfferInput): void;
141
+ /** The immediate path has claimed the machine. Does not overwrite lastAnswer. */
142
+ beginRun(version: string): void;
143
+ /**
144
+ * A progress marker for this run. A marker that started before the run, or names another version, is left alone.
145
+ * Null (no marker) does not settle.
146
+ */
147
+ noteMarker(marker: {
148
+ startedAt: number;
149
+ stage: string;
150
+ version?: string;
151
+ operation?: string;
152
+ cause?: UpdateFailCause;
153
+ } | null): void;
154
+ settleRunning(outcome: {
155
+ state: "done" | "failed";
156
+ cause?: UpdateFailCause;
157
+ rolledBack?: boolean;
158
+ }): void;
159
+ /** A Hub admission is the same card. It does not open a second local queue row. */
160
+ observeHub(row: IdleUpdate): void;
161
+ /** Local scheduled / waiting / updating blocks a second admission. A Hub-owned row does not block itself. */
162
+ blocksAdmission(): boolean;
163
+ view(): UpdateCardView | null;
164
+ tick(): void;
165
+ answer(key: string, by: string, body: UpdateAnswerBody, stillAllowed?: () => boolean): Promise<UpdateAnswerResult>;
166
+ /** The queue row for one idle launch finished. The card follows the row. */
167
+ settleLocal(id: string, state: "done" | "rolled-back" | "failed"): void;
168
+ private apply;
169
+ private cancel;
170
+ private notNow;
171
+ private pickTime;
172
+ private whenIdle;
173
+ private now;
174
+ private launchError;
175
+ private remember;
176
+ private stopWait;
177
+ private retarget;
178
+ private promote;
179
+ private mirrorLocal;
180
+ /** A previous process left an `updating` row. This process did not launch it, so settle it before anyone reads the card. */
181
+ private reconcileIdleClaim;
182
+ private idleMarker;
183
+ private idle;
184
+ private settings;
185
+ private waitMs;
186
+ private ok;
187
+ private toView;
188
+ private arm;
189
+ private path;
190
+ private read;
191
+ private save;
192
+ }
193
+ export {};