@songsid/agend 2.4.0-beta.8 → 2.4.0-beta.9

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 (330) hide show
  1. package/dist/auth-api.js +3 -0
  2. package/dist/auth-api.js.map +1 -1
  3. package/dist/backend/cli-runtime-switch.js +1 -26
  4. package/dist/backend/cli-runtime-switch.js.map +1 -1
  5. package/dist/build-provenance.json +1 -1
  6. package/dist/connect/mcp.d.ts +9 -0
  7. package/dist/connect/mcp.js +10 -0
  8. package/dist/connect/mcp.js.map +1 -0
  9. package/dist/connect/stdio.d.ts +1 -1
  10. package/dist/connect/stdio.js +22 -28
  11. package/dist/connect/stdio.js.map +1 -1
  12. package/dist/fleet-manager.d.ts +1 -1
  13. package/dist/fleet-manager.js +11 -16
  14. package/dist/fleet-manager.js.map +1 -1
  15. package/dist/general-knowledge/skills/hub/SKILL.md +78 -4
  16. package/dist/general-knowledge/skills/web-dashboard/SKILL.md +10 -2
  17. package/dist/hub/admin-dashboard.js +17 -1
  18. package/dist/hub/admin-dashboard.js.map +1 -1
  19. package/dist/hub/audit/index.d.ts +2 -0
  20. package/dist/hub/audit/index.js +8 -0
  21. package/dist/hub/audit/index.js.map +1 -1
  22. package/dist/hub/buttons.js +3 -1
  23. package/dist/hub/buttons.js.map +1 -1
  24. package/dist/hub/catalog.d.ts +1 -0
  25. package/dist/hub/catalog.js +6 -4
  26. package/dist/hub/catalog.js.map +1 -1
  27. package/dist/hub/client.d.ts +3 -0
  28. package/dist/hub/client.js +14 -2
  29. package/dist/hub/client.js.map +1 -1
  30. package/dist/hub/compose/member.js +28 -11
  31. package/dist/hub/compose/member.js.map +1 -1
  32. package/dist/hub/compose/server.d.ts +5 -0
  33. package/dist/hub/compose/server.js +91 -10
  34. package/dist/hub/compose/server.js.map +1 -1
  35. package/dist/hub/group-policy/admin-api.d.ts +1 -0
  36. package/dist/hub/group-policy/admin-api.js +1 -1
  37. package/dist/hub/group-policy/admin-api.js.map +1 -1
  38. package/dist/hub/group-policy/admin-dto.d.ts +2 -1
  39. package/dist/hub/group-policy/admin-inventory.d.ts +2 -0
  40. package/dist/hub/group-policy/admin-inventory.js +13 -4
  41. package/dist/hub/group-policy/admin-inventory.js.map +1 -1
  42. package/dist/hub/group-policy/authorization.d.ts +2 -0
  43. package/dist/hub/group-policy/authorization.js +7 -2
  44. package/dist/hub/group-policy/authorization.js.map +1 -1
  45. package/dist/hub/group-policy/resources.d.ts +2 -0
  46. package/dist/hub/group-policy/resources.js +12 -1
  47. package/dist/hub/group-policy/resources.js.map +1 -1
  48. package/dist/hub/http/compose.js +99 -22
  49. package/dist/hub/http/compose.js.map +1 -1
  50. package/dist/hub/http/core.js +27 -3
  51. package/dist/hub/http/core.js.map +1 -1
  52. package/dist/hub/http/deps.d.ts +11 -0
  53. package/dist/hub/http/schema.js +6 -0
  54. package/dist/hub/http/schema.js.map +1 -1
  55. package/dist/hub/mcp/auth.d.ts +3 -0
  56. package/dist/hub/mcp/auth.js +11 -1
  57. package/dist/hub/mcp/auth.js.map +1 -1
  58. package/dist/hub/mcp/catalog.d.ts +44 -0
  59. package/dist/hub/mcp/catalog.js +31 -0
  60. package/dist/hub/mcp/catalog.js.map +1 -0
  61. package/dist/hub/mcp/door-schema.d.ts +7 -0
  62. package/dist/hub/mcp/door-schema.js +20 -0
  63. package/dist/hub/mcp/door-schema.js.map +1 -0
  64. package/dist/hub/mcp/http.d.ts +25 -0
  65. package/dist/hub/mcp/http.js +259 -0
  66. package/dist/hub/mcp/http.js.map +1 -0
  67. package/dist/hub/mcp/policy.d.ts +65 -0
  68. package/dist/hub/mcp/policy.js +153 -0
  69. package/dist/hub/mcp/policy.js.map +1 -0
  70. package/dist/hub/mcp/server.d.ts +3 -0
  71. package/dist/hub/mcp/server.js +32 -0
  72. package/dist/hub/mcp/server.js.map +1 -0
  73. package/dist/hub/mcp/tools.d.ts +31 -0
  74. package/dist/hub/mcp/tools.js +176 -0
  75. package/dist/hub/mcp/tools.js.map +1 -0
  76. package/dist/hub/member/room-ask.d.ts +4 -4
  77. package/dist/hub/member/room-ask.js +12 -0
  78. package/dist/hub/member/room-ask.js.map +1 -1
  79. package/dist/hub/member/room-mention-feedback.d.ts +44 -0
  80. package/dist/hub/member/room-mention-feedback.js +121 -0
  81. package/dist/hub/member/room-mention-feedback.js.map +1 -0
  82. package/dist/hub/member/room-notification.d.ts +9 -0
  83. package/dist/hub/member/room-notification.js +2 -0
  84. package/dist/hub/member/room-notification.js.map +1 -0
  85. package/dist/hub/member/room-post-answers.d.ts +1 -7
  86. package/dist/hub/member/room-post-answers.js.map +1 -1
  87. package/dist/hub/member/room-post.d.ts +3 -0
  88. package/dist/hub/member/room-post.js +9 -1
  89. package/dist/hub/member/room-post.js.map +1 -1
  90. package/dist/hub/pairing.d.ts +15 -1
  91. package/dist/hub/pairing.js +33 -2
  92. package/dist/hub/pairing.js.map +1 -1
  93. package/dist/hub/personal/owner-host.d.ts +76 -0
  94. package/dist/hub/personal/owner-host.js +137 -40
  95. package/dist/hub/personal/owner-host.js.map +1 -1
  96. package/dist/hub/personal/refusals.d.ts +11 -0
  97. package/dist/hub/personal/refusals.js +33 -0
  98. package/dist/hub/personal/refusals.js.map +1 -0
  99. package/dist/hub/personal/runtime-host.d.ts +26 -0
  100. package/dist/hub/personal/runtime-host.js +51 -0
  101. package/dist/hub/personal/runtime-host.js.map +1 -0
  102. package/dist/hub/personal/schema.d.ts +2 -0
  103. package/dist/hub/personal/schema.js +7 -1
  104. package/dist/hub/personal/schema.js.map +1 -1
  105. package/dist/hub/personal/turns.d.ts +39 -0
  106. package/dist/hub/personal/turns.js +221 -0
  107. package/dist/hub/personal/turns.js.map +1 -0
  108. package/dist/hub/personal/types.d.ts +1 -1
  109. package/dist/hub/policy.d.ts +1 -1
  110. package/dist/hub/protocol.d.ts +43 -0
  111. package/dist/hub/protocol.js +16 -4
  112. package/dist/hub/protocol.js.map +1 -1
  113. package/dist/hub/roles/admin-control.js +69 -16
  114. package/dist/hub/roles/admin-control.js.map +1 -1
  115. package/dist/hub/roles/admin-types.d.ts +24 -1
  116. package/dist/hub/roles/allowed-list-control.d.ts +34 -0
  117. package/dist/hub/roles/allowed-list-control.js +179 -0
  118. package/dist/hub/roles/allowed-list-control.js.map +1 -0
  119. package/dist/hub/roles/allowed-list.d.ts +8 -0
  120. package/dist/hub/roles/allowed-list.js +49 -0
  121. package/dist/hub/roles/allowed-list.js.map +1 -0
  122. package/dist/hub/roles/audit-details.d.ts +144 -0
  123. package/dist/hub/roles/audit-details.js +26 -0
  124. package/dist/hub/roles/audit-details.js.map +1 -0
  125. package/dist/hub/roles/authority.d.ts +12 -0
  126. package/dist/hub/roles/authority.js +39 -3
  127. package/dist/hub/roles/authority.js.map +1 -1
  128. package/dist/hub/roles/change.d.ts +3 -1
  129. package/dist/hub/roles/change.js +4 -3
  130. package/dist/hub/roles/change.js.map +1 -1
  131. package/dist/hub/roles/clock.d.ts +3 -0
  132. package/dist/hub/roles/clock.js +1 -1
  133. package/dist/hub/roles/clock.js.map +1 -1
  134. package/dist/hub/roles/cutover-inventory.d.ts +2 -0
  135. package/dist/hub/roles/cutover-inventory.js +8 -1
  136. package/dist/hub/roles/cutover-inventory.js.map +1 -1
  137. package/dist/hub/roles/cutover.d.ts +2 -2
  138. package/dist/hub/roles/cutover.js +3 -4
  139. package/dist/hub/roles/cutover.js.map +1 -1
  140. package/dist/hub/roles/delegation.d.ts +4 -1
  141. package/dist/hub/roles/delegation.js +3 -2
  142. package/dist/hub/roles/delegation.js.map +1 -1
  143. package/dist/hub/roles/expiry-effects.d.ts +8 -0
  144. package/dist/hub/roles/expiry-effects.js +50 -0
  145. package/dist/hub/roles/expiry-effects.js.map +1 -0
  146. package/dist/hub/roles/migrations.d.ts +7 -0
  147. package/dist/hub/roles/migrations.js +44 -0
  148. package/dist/hub/roles/migrations.js.map +1 -0
  149. package/dist/hub/roles/model.d.ts +2 -0
  150. package/dist/hub/roles/model.js +2 -1
  151. package/dist/hub/roles/model.js.map +1 -1
  152. package/dist/hub/roles/overview.d.ts +8 -0
  153. package/dist/hub/roles/overview.js +15 -0
  154. package/dist/hub/roles/overview.js.map +1 -0
  155. package/dist/hub/roles/resource-effects.d.ts +3 -2
  156. package/dist/hub/roles/resource-effects.js +1 -1
  157. package/dist/hub/roles/resource-effects.js.map +1 -1
  158. package/dist/hub/roles/review.d.ts +16 -0
  159. package/dist/hub/roles/review.js +42 -0
  160. package/dist/hub/roles/review.js.map +1 -0
  161. package/dist/hub/roles/writer.d.ts +8 -2
  162. package/dist/hub/roles/writer.js +56 -16
  163. package/dist/hub/roles/writer.js.map +1 -1
  164. package/dist/hub/room-mention-feedback-model.d.ts +12 -0
  165. package/dist/hub/room-mention-feedback-model.js +12 -0
  166. package/dist/hub/room-mention-feedback-model.js.map +1 -0
  167. package/dist/hub/rooms/agents.d.ts +3 -1
  168. package/dist/hub/rooms/agents.js +94 -12
  169. package/dist/hub/rooms/agents.js.map +1 -1
  170. package/dist/hub/rooms/direct-view.d.ts +6 -2
  171. package/dist/hub/rooms/direct-view.js +3 -3
  172. package/dist/hub/rooms/direct-view.js.map +1 -1
  173. package/dist/hub/rooms/service.d.ts +27 -3
  174. package/dist/hub/rooms/service.js +74 -13
  175. package/dist/hub/rooms/service.js.map +1 -1
  176. package/dist/hub/rooms/types.d.ts +3 -1
  177. package/dist/hub/rooms.d.ts +11 -1
  178. package/dist/hub/rooms.js +76 -10
  179. package/dist/hub/rooms.js.map +1 -1
  180. package/dist/hub/runtime.js +1 -1
  181. package/dist/hub/runtime.js.map +1 -1
  182. package/dist/hub/server.d.ts +2 -0
  183. package/dist/hub/server.js +19 -3
  184. package/dist/hub/server.js.map +1 -1
  185. package/dist/hub/session-directory-transition.d.ts +2 -1
  186. package/dist/hub/session-directory-transition.js +10 -3
  187. package/dist/hub/session-directory-transition.js.map +1 -1
  188. package/dist/hub/sessions.d.ts +1 -1
  189. package/dist/hub/sessions.js +14 -10
  190. package/dist/hub/sessions.js.map +1 -1
  191. package/dist/hub/settings-commit.d.ts +32 -1
  192. package/dist/hub/settings-commit.js +11 -4
  193. package/dist/hub/settings-commit.js.map +1 -1
  194. package/dist/hub/settings-directory-ca.js +1 -1
  195. package/dist/hub/settings-directory-ca.js.map +1 -1
  196. package/dist/hub/settings-directory-control.js +7 -7
  197. package/dist/hub/settings-directory-control.js.map +1 -1
  198. package/dist/hub/settings-directory-http.d.ts +2 -0
  199. package/dist/hub/settings-directory-http.js +21 -6
  200. package/dist/hub/settings-directory-http.js.map +1 -1
  201. package/dist/hub/settings-directory-proof.d.ts +5 -1
  202. package/dist/hub/settings-directory-proof.js +27 -9
  203. package/dist/hub/settings-directory-proof.js.map +1 -1
  204. package/dist/hub/settings-directory-recovery.js +2 -1
  205. package/dist/hub/settings-directory-recovery.js.map +1 -1
  206. package/dist/hub/settings-directory-save.d.ts +2 -0
  207. package/dist/hub/settings-directory-save.js +9 -6
  208. package/dist/hub/settings-directory-save.js.map +1 -1
  209. package/dist/hub/types.d.ts +11 -0
  210. package/dist/locale.js +10 -10
  211. package/dist/locale.js.map +1 -1
  212. package/dist/login-controller.d.ts +19 -2
  213. package/dist/login-controller.js +26 -8
  214. package/dist/login-controller.js.map +1 -1
  215. package/dist/runtime-build-info.js +1 -1
  216. package/dist/runtime-build-info.js.map +1 -1
  217. package/dist/runtime-client.js +6 -6
  218. package/dist/runtime-client.js.map +1 -1
  219. package/dist/runtime-coordinator.js +8 -3
  220. package/dist/runtime-coordinator.js.map +1 -1
  221. package/dist/runtime-install.d.ts +3 -1
  222. package/dist/runtime-install.js +5 -3
  223. package/dist/runtime-install.js.map +1 -1
  224. package/dist/runtime-personal-answer-only-probe.d.ts +3 -0
  225. package/dist/runtime-personal-answer-only-probe.js +134 -0
  226. package/dist/runtime-personal-answer-only-probe.js.map +1 -0
  227. package/dist/runtime-personal-answer-only.d.ts +16 -0
  228. package/dist/runtime-personal-answer-only.js +54 -0
  229. package/dist/runtime-personal-answer-only.js.map +1 -0
  230. package/dist/runtime-personal-answer.d.ts +6 -2
  231. package/dist/runtime-personal-answer.js +10 -2
  232. package/dist/runtime-personal-answer.js.map +1 -1
  233. package/dist/runtime-personal-preflight.d.ts +4 -1
  234. package/dist/runtime-personal-preflight.js +50 -4
  235. package/dist/runtime-personal-preflight.js.map +1 -1
  236. package/dist/runtime-personal-profile.d.ts +4 -0
  237. package/dist/runtime-personal-profile.js +11 -0
  238. package/dist/runtime-personal-profile.js.map +1 -1
  239. package/dist/runtime-personal-protocol.d.ts +4 -1
  240. package/dist/runtime-personal-protocol.js +5 -1
  241. package/dist/runtime-personal-protocol.js.map +1 -1
  242. package/dist/runtime-personal-stage.d.ts +1 -0
  243. package/dist/runtime-personal-stage.js +7 -3
  244. package/dist/runtime-personal-stage.js.map +1 -1
  245. package/dist/runtime-protocol.d.ts +1 -1
  246. package/dist/setup-form.js +10 -0
  247. package/dist/setup-form.js.map +1 -1
  248. package/dist/tunnel/lease.d.ts +14 -0
  249. package/dist/tunnel/lease.js +23 -0
  250. package/dist/tunnel/lease.js.map +1 -1
  251. package/dist/ui/backend-signin.js +86 -20
  252. package/dist/ui/chat-activity-groups.js +41 -8
  253. package/dist/ui/chat-activity.js +3 -1
  254. package/dist/ui/chat-tour.js +1 -1
  255. package/dist/ui/fleet-canvas.js +10 -5
  256. package/dist/ui/fleet-office.js +73 -7
  257. package/dist/ui/hub-ai-apps-strings.js +6 -0
  258. package/dist/ui/hub-ai-apps.js +83 -0
  259. package/dist/ui/hub-client.js +19 -2
  260. package/dist/ui/hub-directory-editor-strings.js +2 -2
  261. package/dist/ui/hub-directory-editor.js +1 -0
  262. package/dist/ui/hub-group-policy.js +4 -3
  263. package/dist/ui/hub-group-strings.js +2 -2
  264. package/dist/ui/hub-personal-agent-strings.js +160 -0
  265. package/dist/ui/hub-personal-agent.js +94 -0
  266. package/dist/ui/hub-role-audit.js +39 -0
  267. package/dist/ui/hub-role-forms.js +99 -0
  268. package/dist/ui/hub-role-notices.js +11 -0
  269. package/dist/ui/hub-role-view.js +86 -0
  270. package/dist/ui/hub-roles-strings.js +428 -4
  271. package/dist/ui/hub-roles.js +76 -41
  272. package/dist/ui/hub-room-composer.js +3 -2
  273. package/dist/ui/hub-room-list.js +4 -3
  274. package/dist/ui/hub-room-members.js +4 -2
  275. package/dist/ui/hub-room-settings.js +6 -0
  276. package/dist/ui/hub-room-source-strings.js +17 -0
  277. package/dist/ui/hub-room-source.js +34 -0
  278. package/dist/ui/hub-room-thread.js +10 -4
  279. package/dist/ui/panel-chat.js +4 -4
  280. package/dist/ui/panel-fleet.js +3 -3
  281. package/dist/ui/panel-hub.js +39 -25
  282. package/dist/ui/runtime-commands.d.ts +2 -2
  283. package/dist/ui/runtime-commands.js +7 -4
  284. package/dist/ui/settings-build-version.js +2 -2
  285. package/dist/ui/shared/access-overview.css +1 -1
  286. package/dist/ui/shared/accounts-keepalive.css +1 -1
  287. package/dist/ui/shared/accounts.css +1 -1
  288. package/dist/ui/shared/agent-sheet.js +2 -2
  289. package/dist/ui/shared/app-prefs.js +5 -2
  290. package/dist/ui/shared/app-shell.js +1 -1
  291. package/dist/ui/shared/app-swipe.js +3 -1
  292. package/dist/ui/shared/app.css +124 -40
  293. package/dist/ui/shared/app.js +1 -1
  294. package/dist/ui/shared/chat-thread.js +5 -1
  295. package/dist/ui/shared/chat-work-bar.css +5 -5
  296. package/dist/ui/shared/connector-prompt.d.ts +1 -0
  297. package/dist/ui/shared/connector-prompt.js +10 -0
  298. package/dist/ui/shared/hub-ai-apps.css +12 -0
  299. package/dist/ui/shared/hub-chat.css +9 -2
  300. package/dist/ui/shared/hub-groups.css +1 -1
  301. package/dist/ui/shared/hub-owner.css +5 -5
  302. package/dist/ui/shared/hub-roles.css +98 -26
  303. package/dist/ui/shared/hub-rooms-u2.css +14 -0
  304. package/dist/ui/shared/hub.css +3 -3
  305. package/dist/ui/shared/instance-nav.js +24 -9
  306. package/dist/ui/shared/loading.css +1 -1
  307. package/dist/ui/shared/model-picker.css +2 -2
  308. package/dist/ui/shared/preview-panel-actions.js +1 -1
  309. package/dist/ui/shared/preview-panel.js +2 -2
  310. package/dist/ui/shared/signin.js +27 -12
  311. package/dist/ui/shared/task-board.css +2 -2
  312. package/dist/ui/shared/tokens.css +1 -1
  313. package/dist/ui/shared/ui-toast.js +4 -4
  314. package/dist/ui/shared/usage-dialog.js +43 -4
  315. package/dist/ui/signin.html +4 -2
  316. package/dist/ui/structured-signin.js +64 -12
  317. package/dist/ui/web-terminal/terminal.css +1 -1
  318. package/dist/web-backend-login.d.ts +5 -1
  319. package/dist/web-backend-login.js +8 -2
  320. package/dist/web-backend-login.js.map +1 -1
  321. package/dist/web-prefs.js +2 -0
  322. package/dist/web-prefs.js.map +1 -1
  323. package/dist/windows-cli-worker.d.ts +3 -0
  324. package/dist/windows-cli-worker.js +33 -4
  325. package/dist/windows-cli-worker.js.map +1 -1
  326. package/dist/windows-cli.d.ts +1 -0
  327. package/dist/windows-cli.js +8 -4
  328. package/dist/windows-cli.js.map +1 -1
  329. package/package.json +1 -1
  330. package/templates/runtime-install/install.ps1 +24 -4
@@ -1,3 +1,4 @@
1
+ import {hp,personalAgentQuestionHint} from "./hub-personal-agent-strings.js";
1
2
  import * as ownerEntryWords from "./hub-owner-strings.js";
2
3
  import * as companyViews from "./hub-company-join.js";
3
4
  import { hj, joinError } from "./hub-company-join-strings.js";
@@ -22,6 +23,7 @@ import { confirmDialog } from "/assets/ui-confirm.js";
22
23
  import { Dialog } from "/assets/ui-dialog.js";
23
24
  import { PairingNotices } from "./hub-quick-pairing.js";
24
25
  import { dn } from "./hub-directory-notice-strings.js";
26
+ import { RoleNotices, roleNoticesOffered, roleNoticeLead } from "./hub-role-notices.js";
25
27
  import { DirectoryNotices, directoryNoticesOffered } from "./hub-directory-notices.js";
26
28
  import { Menu } from "/assets/ui-menu.js";
27
29
  import { toast } from "/assets/ui-toast.js";
@@ -43,6 +45,7 @@ import { HubRoomPage } from "./hub-room-thread.js";
43
45
  import { TextSizeButton } from "/assets/header-tools.js";
44
46
  import { HubNotifyToggle, clearHubMeId, noteHubMeId, rememberedMeId, startHubRoomNotifier } from "./hub-room-notify.js";
45
47
  import { hroom } from "./hub-room-strings.js";
48
+ import { ha as hApps } from "./hub-ai-apps-strings.js";
46
49
  import { hr } from "./hub-read-strings.js";
47
50
  import { ht } from "./hub-teams-strings.js";
48
51
  import { ho, linkHubOwnerCss } from "./hub-owner-strings.js";
@@ -60,8 +63,8 @@ const ha = key => t(`hubAccess.${key}`);
60
63
  // Kept with the fresh renderer: retained owner dictionaries do not know this label.
61
64
  // M-3162: Administration's tabs (Lumen's names: "Manage" holds today's long page; "This Hub" its name already).
62
65
  register("hubAdminTabs", {
63
- en: { label: "Administration", overview: "Overview", manage: "Manage", teams: "Teams", groups: "Groups", roles: "Roles and permissions", thisHub: "This Hub" },
64
- "zh-TW": { label: "管理", overview: "總覽", manage: "管理項目", teams: "團隊", groups: "群組", roles: "角色與權限", thisHub: "這個 Hub" },
66
+ en: { label: "Administration", overview: "Overview", manage: "Manage", teams: "Teams", groups: "Groups", roles: "Roles and permissions",allowedList:"Allowed list", thisHub: "This Hub" },
67
+ "zh-TW": { label: "管理", overview: "總覽", manage: "管理項目", teams: "團隊", groups: "群組", roles: "角色與權限",allowedList:"允許清單", thisHub: "這個 Hub" },
65
68
  });
66
69
  const hat = (key) => t(`hubAdminTabs.${key}`);
67
70
  register("hubGrantStatus", {
@@ -177,9 +180,9 @@ export function HubPanel({ route }) {
177
180
  return stop;
178
181
  }, [s && s.login]);
179
182
  // Join takes precedence over other query views. Rooms and Group permissions otherwise name their own pages.
180
- const pageName = companyPage ? hj("title") : tab === "exposures" ? hc("mine") : tab === "admin" ? view === "teams" ? ht("title") : hc("admin") : view === "notices" ? hc("noticesTitle")
183
+ const pageName = companyPage ? hj("title") : tab === "ask" && view === "ai-apps" ? hApps("title") : tab === "ask" && view === "app-consent" ? hApps("consentHeading") : tab === "exposures" ? hc("mine") : tab === "admin" ? view === "teams" ? ht("title") : view==="allowed-list"?hat("allowedList") : (view==="roles"||view==="groups"&&rolesOn(s,hubClient()))?hat("roles"):hc("admin") : view === "notices" ? hc("noticesTitle")
181
184
  : view === "invitations" ? hroom("invitationsTitle") : view === "teams" ? ht("mine") : hc("chats");
182
- useEffect(() => { if (companyPage || !(tab === "ask" && roomParam()) && !(tab === "admin" && view === "groups")) setTitle(pageName); }, [tab, view, pageName, roomParam(), companyPage]);
185
+ useEffect(() => { if (companyPage || !(tab === "ask" && roomParam()) && !(tab === "admin" && (view === "groups"&&!rolesOn(s,hubClient())||view==="allowed-list"))) setTitle(pageName); }, [tab, view, pageName, roomParam(), companyPage]);
183
186
  let body = tab === "ask" ? roomParam() ? html`<${HubRoomLoading} />`
184
187
  : html`<${PanelHeader} title=${hc("chats")} /><div class="hub-home"><${Skeleton} variant="rows" lines=${4} /></div>`
185
188
  : html`<${Skeleton} variant="rows" lines=${4} />`;
@@ -189,12 +192,16 @@ export function HubPanel({ route }) {
189
192
  if (s) body = tab === "ask" ? html`<${HubChats} />` : tab === "exposures" ? html`<${HubMine} />` : html`<${HubAdmin} admin=${!!s.admin} />`;
190
193
  if (s && tab === "ask" && joinRequest()) return html`<div data-effect-panel="hub" class="panel p-hub p-hub-join">
191
194
  <${PanelHeader} title=${hj("title")} /><div data-trust="panel-content" class="panel-body hub-page-body"><${HubCompanyJoinPage} session=${s} /></div></div>`;
195
+ if (s && tab === "ask" && ["ai-apps", "app-consent"].includes(view) && s.features?.includes("mcp-apps-v1")) return html`<div data-effect-panel="hub" class="panel p-hub p-hub-ai-apps">
196
+ <${PanelHeader} title=${pageName}/><div data-trust="panel-content" class="panel-body hub-page-body"><div class="col hub-owner">
197
+ <${LazyRoomPart} load=${()=>import("./hub-ai-apps.js")} name=${view==="app-consent"?"AppConsentPage":"MyAiAppsPage"}
198
+ props=${{client:hubClient(),person:s.displayName,request:new URLSearchParams(location.search).get("request")||""}}/></div></div></div>`;
192
199
  // Security notices stay on their own page. The bound join branch above never renders the chat or notices page.
193
200
  if (s && tab === "ask" && view === "notices" && noticesOffered(s)) return html`<div data-effect-panel="hub" class="panel p-hub p-hub-notices">
194
201
  <${PanelHeader} title=${hc("noticesTitle")}><span class="hub-head-tools"><${HubNotifyToggle} /></span></${PanelHeader}><div data-trust="panel-content" class="panel-body hub-page-body">
195
- <div class="col hub-owner hub-notices-col"><p class="s-page-lead hub-page-lead">${directoryNoticesOffered(s, hubClient()) ? dn("pageLead") : hc("noticesLead")}</p>
196
- ${pairingNoticesOffered(s) ? html`<${PairingNotices} admin=${!!s.admin} empty=${directoryNoticesOffered(s, hubClient()) ? null : html`<${Empty} icon="bell" title=${hc("noNotices")} />`} />` : null}
197
- ${directoryNoticesOffered(s, hubClient()) ? html`<${DirectoryNotices} client=${hubClient()} />` : null}</div></div></div>`;
202
+ <div class="col hub-owner hub-notices-col"><p class="s-page-lead hub-page-lead">${roleNoticesOffered(s, hubClient()) ? roleNoticeLead() : directoryNoticesOffered(s, hubClient()) ? dn("pageLead") : hc("noticesLead")}</p>
203
+ ${pairingNoticesOffered(s) ? html`<${PairingNotices} admin=${!!s.admin} empty=${directoryNoticesOffered(s, hubClient()) || roleNoticesOffered(s, hubClient()) ? null : html`<${Empty} icon="bell" title=${hc("noNotices")} />`} />` : null}
204
+ ${directoryNoticesOffered(s, hubClient()) ? html`<${DirectoryNotices} client=${hubClient()} />` : null}${roleNoticesOffered(s, hubClient()) ? html`<${RoleNotices} client=${hubClient()} />` : null}</div></div></div>`;
198
205
  // M-3092: the owner's invitations (spec §8), a page of the chats like Notices.
199
206
  if (s && tab === "ask" && view === "invitations" && roomsLive()) return html`<div data-effect-panel="hub" class="panel p-hub p-hub-invitations">
200
207
  <${PanelHeader} title=${hroom("invitationsTitle")} /><div data-trust="panel-content" class="panel-body hub-page-body"><div class="col hub-owner">
@@ -223,6 +230,7 @@ export function HubSessionMenu() {
223
230
  // #3226 B: My shared agents and Administration are secondary — in this menu, not the main surface.
224
231
  const items = [
225
232
  { key: "mine", label: hc("mine"), icon: "globe", onSelect: () => navigate("/ui/hub/exposures") },
233
+ ...(s.features?.includes("mcp-apps-v1") ? [{ key:"ai-apps",label:hApps("title"),icon:"globe",onSelect:()=>navigate("/ui/hub?view=ai-apps") }] : []),
226
234
  { key: "admin", label: hc("admin"), icon: "key", onSelect: () => navigate("/ui/hub/admin") },
227
235
  { key: "out", label: hw("signOut"), icon: "user", onSelect: out, disabled: busy },
228
236
  ];
@@ -360,7 +368,7 @@ export const NOTICES_PATH = "/ui/hub?view=notices";
360
368
  export const INVITATIONS_PATH = "/ui/hub?view=invitations";
361
369
  export const MY_TEAMS_PATH = "/ui/hub?view=teams";
362
370
  const pairingNoticesOffered = (s) => !!s && Array.isArray(s.features) && s.features.includes("quick-pairing-v1") && !!hubClient().quickPairingV1;
363
- const noticesOffered = s => pairingNoticesOffered(s) || directoryNoticesOffered(s, hubClient());
371
+ const noticesOffered = s => pairingNoticesOffered(s) || directoryNoticesOffered(s, hubClient()) || roleNoticesOffered(s, hubClient());
364
372
  const initial = (name) => (String(name || "?").trim()[0] || "?").toUpperCase();
365
373
  const AV_TONES = 6;
366
374
  const tone = (name) => { let h = 0; for (const c of String(name || "")) h = (h * 31 + c.codePointAt(0)) >>> 0; return h % AV_TONES; };
@@ -612,7 +620,7 @@ function ChatLauncher() {
612
620
  const rows = [
613
621
  ...chats.map((r) => ({ key: r.id, name: r.assistant ? hroom("hubAssistant") : r.name, sub: r.assistant ? hroom("providedByHub") : r.agent?.owner?.name ? hc("launchOwner", r.agent.owner.name) : "",
614
622
  href: roomPath(r.id), online: r.assistant ? (r.presence || "idle") !== "unavailable" : r.agent?.presence === "online" })),
615
- ...askable.filter((it) => !shownIn.has(it.exposure.id)).map((it) => ({ key: it.grant.id, name: it.exposure.displayName, sub: hc("launchOwner", it.ownerName || "—"), ask: it })),
623
+ ...askable.filter((it) => !shownIn.has(it.exposure.id)).map((it) => ({ key: it.grant.id, name: it.exposure.displayName, sub: it.exposure.answerOnly ? hp("answerOnlyAsker") : hc("launchOwner", it.ownerName || "—"), ask: it })),
616
624
  ...inRooms,
617
625
  ];
618
626
  const needle = q.trim().toLowerCase();
@@ -772,8 +780,8 @@ function HubRoomView({ room: given }) {
772
780
  const showRail = wide && rail && !panelOpen;
773
781
  return html`<div class=${`hub-chat${showRail ? " with-rail" : ""}`} ref=${split}>
774
782
  <section class="hub-chat-main" aria-label=${name}>
775
- <header class="hub-chat-head" data-trust="panel-content">${back}<${Avatar} name=${name} size="sm" />
776
- <span class="hub-chat-title"><strong>${name}</strong><span class="s">${room.ownerName ? hc("answersFor", room.ownerName) : ""}</span></span>
783
+ <header class=${`hub-chat-head${room.answerOnly?" hub-answer-only-head":""}`} data-trust="panel-content">${back}<${Avatar} name=${name} size="sm" />
784
+ <span class="hub-chat-title"><strong>${name}</strong><span class=${`s${room.answerOnly?" hub-answer-only-note":""}`}>${room.answerOnly?hp("answerOnlyAsker"):room.ownerName ? hc("answersFor", room.ownerName) : ""}</span></span>
777
785
  ${tag}
778
786
  <button type="button" class="icon-btn" aria-pressed=${wide ? String(showRail) : undefined} aria-label=${hc("showInfo")} title=${hc("showInfo")} onClick=${toggleInfo}><${Icon} name="info" /></button>
779
787
  <span class="hub-head-tools"><${TextSizeButton} /></span>
@@ -885,7 +893,7 @@ function HubThread({ store, name, panelKey, threadRef, extra = null, emptyView =
885
893
  ${store.error() === "backpressure" ? html`<p class="hub-banner warn" role="status">${hr("busy")}</p>`
886
894
  : !loaded && store.error() ? html`<${ErrorState} message=${errText({ code: store.error() })} onRetry=${() => store.refresh()} />` : null}
887
895
  ${empty && loaded && !store.closed() && emptyView ? html`<div class="center hub-room-empty">${emptyView}</div>` : null}
888
- ${empty && loaded && !store.closed() && !emptyView ? html`<div class="center hub-room-empty"><${Empty} icon="chat" title=${hc("emptyRoom", name)} hint=${`${hc("emptyRoomHint", store.room().ownerName || name)}${lang() === "zh-TW" ? "" : " "}${hw("roomShared")}`} /></div>` : null}
896
+ ${empty && loaded && !store.closed() && !emptyView ? html`<div class="center hub-room-empty"><${Empty} icon="chat" title=${hc("emptyRoom", name)} hint=${personalAgentQuestionHint(store.room())??`${hc("emptyRoomHint", store.room().ownerName || name)}${lang() === "zh-TW" ? "" : " "}${hw("roomShared")}`} /></div>` : null}
889
897
  <div class="jump-dock">${jump.show ? html`<button data-trust="thread-control" type="button" class="jump-latest" onClick=${() => th.current && th.current.jumpLatest()}>
890
898
  <${Icon} name="down" size=${16} />${jump.unseen > 0 ? t("chat.newBelow", jump.unseen) : t("chat.jumpLatest")}</button>` : null}</div>
891
899
  </div>`;
@@ -967,6 +975,7 @@ function HubMine() {
967
975
  <div class="s-section-layout">
968
976
  ${/* M-3190: 「我的 Fleet」 moved here from 對話 — the person's Fleets and the steps to connect one. */ ""}
969
977
  ${groupPolicyOn(session, hubClient()) ? html`<${LazyGroups} pick=${(m) => m.MyFleetsCard || (() => null)} props=${{ quick: session.features.includes("quick-pairing-v1"), admin: session.admin === true, features: session.features }} />` : null}
978
+ ${session?.features?.includes("personal-agents-v1") ? html`<${LazyRoomPart} load=${() => import("./hub-personal-agent.js")} name="HubPersonalAgent" props=${{client:hubClient(),scope:session.csrf,onSaved:reload}} />` : null}
970
979
  ${roomsLive() ? html`<${LazyRoomPart} load=${() => import("./hub-invitations.js")} name="InvitationsList" props=${{ client: hubClient(), heading: true }} />` : null}
971
980
  ${msg ? html`<p class="err" role="alert">${msg}</p>` : null}
972
981
  ${!pairings ? html`<${Skeleton} lines=${2} />` : pairings.error ? html`<${ErrorState} message=${pairings.error} onRetry=${reloadPairings} />` : null}
@@ -1116,12 +1125,13 @@ function HubAdmin({ admin }) {
1116
1125
  const overview = !overviewGone && s?.features?.includes("admin-dashboard-v1") && typeof hubClient()?.adminDashboard === "function";
1117
1126
  const tabs = [admin && overview ? "overview" : null, canManage ? "manage" : null, admin && teams ? "teams" : null, roles && canRole ? "roles" : admin && groups ? "groups" : null, admin ? "this-hub" : null].filter(Boolean);
1118
1127
  const view = adminView();
1119
- const selected = roles && view === "groups" ? "roles" : ADMIN_TAB_VIEWS[view];
1128
+ const selected = roles && ["groups","allowed-list"].includes(view) ? "roles" : ADMIN_TAB_VIEWS[view];
1120
1129
  const current = view === "" ? tabs[0] : tabs.includes(selected) ? selected : tabs[0];
1121
1130
  const bar = html`<${AdminTabs} tabs=${tabs} current=${current} />`;
1122
1131
  if (current === "overview") return html`${bar}<div class="col hub-owner hub-admin-ov-col"><${LazyRoomPart} load=${() => import("./hub-admin-overview.js")} name="HubAdminOverview"
1123
1132
  props=${{ client: hubClient(), onOpen: openAdminTab, onGone: () => { setOverviewGone(true); openAdminTab("manage"); } }} /></div>`;
1124
- if (current === "this-hub") return html`${bar}${directory && view === "directory" ? html`<${LazyDirectory} session=${s} />` : html`<div class="col hub-owner"><${LazyThisHub} directory=${directory} /></div>`}`;
1133
+ if (current === "this-hub") return html`${bar}${directory && view === "directory" ? html`<${LazyDirectory} session=${s} />` : html`<div class="col hub-owner"><div class="s-section-layout"><${LazyThisHub} directory=${directory} />${s?.features?.includes("mcp-apps-v1")?html`<${LazyRoomPart} load=${()=>import("./hub-ai-apps.js")} name="AiAppsAdminCard" props=${{client:hubClient()}}/>`:null}</div></div>`}`;
1134
+ if(current==="roles"&&view==="allowed-list"&&admin&&groups)return html`${bar}<${LazyGroups} pick=${m=>m.HubGroupPolicyPage} props=${{roleShortcut:true}} />`;
1125
1135
  if (current === "roles") return html`${bar}<div class="col hub-owner"><${LazyRoomPart} load=${() => import("./hub-roles.js")} name="HubRoles" props=${{client:hubClient()}} /></div>`;
1126
1136
  if (current === "groups") return html`${bar}<${LazyGroups} pick=${(m) => m.HubGroupPolicyPage} props=${{}} />`;
1127
1137
  if (current === "teams") return html`${bar}<div class="col hub-owner"><h2 class="sr-only">${ht("title")}</h2><${LazyRoomPart} load=${() => import("./hub-teams.js")} name="HubTeamsPage" props=${{ client: hubClient(), mode: "admin", person: s?.person }} /></div>`;
@@ -1165,7 +1175,10 @@ function GroupPermissionsEntry() {
1165
1175
  }
1166
1176
  function HubAdminPage({ groups = false, companyJoin = false, directory = false } = {}) {
1167
1177
  const assistantSession = useSession();
1178
+ const fullAdmin=assistantSession?.admin===true;
1168
1179
  const [view, reload] = useRead(() => hubClient().adminOverview());
1180
+ const canFleets=Array.isArray(view?.permissions)?view.permissions.includes("fleets.manage"):fullAdmin;
1181
+ const canJoin=Array.isArray(view?.permissions)?view.permissions.includes("join.manage"):fullAdmin;
1169
1182
  const [needsOnly, setNeedsOnly] = useState(false); // M-3137: Connected fleets' "Needs update" filter
1170
1183
  const [canRecommend, setCanRecommend] = useState(false); // M-3141: this Hub serves the recommended-version setting
1171
1184
  const [login, setLogin] = useState("");
@@ -1211,17 +1224,18 @@ function HubAdminPage({ groups = false, companyJoin = false, directory = false }
1211
1224
  const ManualFrame = accessEntry ? "details" : "div";
1212
1225
  return html`<div class="col hub-owner hub-admin">${lead}
1213
1226
  <div class="s-section-layout">
1214
- ${groups && !accessEntry ? html`<${GroupPermissionsEntry} />` : null}
1215
- ${companyJoin ? html`<${CompanyJoinAdminCard} entry=${accessEntry} groups=${groups} />` : null}
1227
+ ${fullAdmin && groups && !accessEntry ? html`<${GroupPermissionsEntry} />` : null}
1228
+ ${canJoin && companyJoin ? html`<${CompanyJoinAdminCard} entry=${accessEntry} groups=${groups} />` : null}
1216
1229
  ${/* Lumen's order: Let colleagues join → Teams → Rooms → Room assistant → Connected fleets → pairing. */ ""}
1217
- ${teamsLive() ? html`<${LazyRoomPart} load=${() => import("./hub-teams.js")} name="HubTeamsEntry" props=${{ client: hubClient() }} />` : null}
1218
- ${roomsLive() ? html`<${LazyRoomPart} load=${() => import("./hub-admin-rooms.js")} name="AdminRooms" props=${{ client: hubClient() }} />` : null}
1219
- ${assistantSession?.features?.includes("room-assistant-v1") && hubClient().assistantAdminV1 === true ? html`<${LazyAssistantAdmin} />` : null}
1230
+ ${fullAdmin && session?.features?.includes("personal-agents-v1") ? html`<${LazyRoomPart} load=${() => import("./hub-personal-agent.js")} name="HubPersonalAgentAdmin" props=${{client:hubClient(),scope:session.csrf}} />` : null}
1231
+ ${fullAdmin && teamsLive() ? html`<${LazyRoomPart} load=${() => import("./hub-teams.js")} name="HubTeamsEntry" props=${{ client: hubClient() }} />` : null}
1232
+ ${fullAdmin && roomsLive() ? html`<${LazyRoomPart} load=${() => import("./hub-admin-rooms.js")} name="AdminRooms" props=${{ client: hubClient() }} />` : null}
1233
+ ${fullAdmin && assistantSession?.features?.includes("room-assistant-v1") && hubClient().assistantAdminV1 === true ? html`<${LazyAssistantAdmin} />` : null}
1220
1234
  ${view.error ? html`<${ErrorState} message=${view.error} onRetry=${reload} />` : null}
1221
1235
  ${msg ? html`<p class="err" role="alert">${msg}</p>` : null}
1222
1236
  ${/* M-3141 (versions spec §3.1): the recommended version, a small card above the list. */ ""}
1223
- ${hasVersions(fleets) ? html`<${RecommendedVersionCard} client=${hubClient()} onSaved=${reload} onAvailable=${setCanRecommend} />` : null}
1224
- <section class="card hub-fleet-list" id="hub-admin-fleets"><h3>${ho("pairedFleets", fleets.filter((f) => f.status !== "revoked").length)}</h3>
1237
+ ${fullAdmin && hasVersions(fleets) ? html`<${RecommendedVersionCard} client=${hubClient()} onSaved=${reload} onAvailable=${setCanRecommend} />` : null}
1238
+ ${canFleets?html`<section class="card hub-fleet-list" id="hub-admin-fleets"><h3>${ho("pairedFleets", fleets.filter((f) => f.status !== "revoked").length)}</h3>
1225
1239
  ${/* M-3137 (versions spec §2.2): the summary line and its filter, when this Hub reports versions. */ ""}
1226
1240
  ${hasVersions(fleets) ? html`<${FleetVersionsSummary} fleets=${fleets} recommended=${view.recommendedVersion ?? null} canRecommend=${canRecommend} filtered=${needsOnly} onFilter=${setNeedsOnly} />` : null}
1227
1241
  ${/* M-3145 (§4.2): "Update {n} Fleets that allow it", while at least one qualifies. */ ""}
@@ -1241,8 +1255,8 @@ function HubAdminPage({ groups = false, companyJoin = false, directory = false }
1241
1255
  return html`${current.length ? html`<div class="hub-rows">${current.map(row)}</div>` : html`<p class="note">${ho("noFleets")}</p>`}
1242
1256
  ${revoked.length ? html`<details class="s-ui-disclosure hub-fleets-revoked"><summary>${t("hubFleetList.revoked", revoked.length)}</summary><div class="hub-rows">${revoked.map(row)}</div></details>` : null}`;
1243
1257
  })() : html`<p class="note">${ho("noFleets")}</p>`}
1244
- </section>
1245
- <${ManualFrame} class=${accessEntry ? "s-ui-disclosure hub-admin-manual" : ""} open=${accessEntry && (!!offer || pairings.some(p => p.ownerConfirmed && !p.adminApproved))}>${accessEntry ? html`<summary>${ho("manualAdvanced")}</summary>` : null}<section class="card"><h3>${ho("pairSteps")}</h3>
1258
+ </section>`:null}
1259
+ ${canJoin?html`<${ManualFrame} class=${accessEntry ? "s-ui-disclosure hub-admin-manual" : ""} open=${accessEntry && (!!offer || pairings.some(p => p.ownerConfirmed && !p.adminApproved))}>${accessEntry ? html`<summary>${ho("manualAdvanced")}</summary>` : null}<section class="card"><h3>${ho("pairSteps")}</h3>
1246
1260
  <ol class="hub-steps">
1247
1261
  <li class=${offer || pairings.length ? "done" : "now"}><div class="hub-step-body"><span><b>${ho("stepCode")}</b><small class="note">${ho("stepCodeHint")}</small></span>
1248
1262
  <form class="hub-step-form" onSubmit=${create}><label class="field"><span class="sr-only">${ho("ownerLogin")}</span><input id="hubOwnerLogin" placeholder=${ho("ownerLogin")} autocomplete="off" spellcheck=${false} autocapitalize="none" value=${login} onInput=${(e) => setLogin(e.target.value)} /></label>
@@ -1262,8 +1276,8 @@ function HubAdminPage({ groups = false, companyJoin = false, directory = false }
1262
1276
  : p.ownerConfirmed ? html`<button type="button" class="btn btn-sm btn-primary" disabled=${!p.fingerprint} onClick=${() => approve(p)}>${ho("approveGo")}</button>`
1263
1277
  : html`<span class="tag warn">${ho("waitingOwner")}</span>`}
1264
1278
  </div>`)}</div>` : null}
1265
- </section></${ManualFrame}>
1266
- <${LazyThisHub} directory=${directory} />
1279
+ </section></${ManualFrame}>`:null}
1280
+ ${fullAdmin?html`<${LazyThisHub} directory=${directory} />`:null}
1267
1281
  </div></div>`;
1268
1282
  }
1269
1283
 
@@ -1,6 +1,6 @@
1
1
  export function safeRuntimeOrigin(server: unknown): string;
2
2
  export function runtimeConnectCommand(server: unknown): string;
3
- export function runtimeInstallCommand(server: unknown, scriptSha256: unknown): string;
4
- export function runtimeEnrollCommand(server: unknown, scriptSha256: unknown, token: unknown, fingerprint: unknown): string;
3
+ export function runtimeInstallCommand(server: unknown, scriptSha256: unknown, mode?: "personal"): string;
4
+ export function runtimeEnrollCommand(server: unknown, scriptSha256: unknown, token: unknown, fingerprint: unknown, mode?: "personal"): string;
5
5
  export function runtimeInstallOnlyCommand(server: unknown, scriptSha256: unknown): string;
6
6
  export function runtimeWindowsConnectCommand(server: unknown): string;
@@ -49,15 +49,18 @@ export function runtimeConnectCommand(server) {
49
49
  * window; anywhere else (a redirected stdin or stdout, -NonInteractive, an AI agent, CI) it only installs and prints the connect command.
50
50
  * Nothing about that decision is in this command, so the hash pin covers all of it. The pairing code is never part of a command.
51
51
  */
52
- export function runtimeInstallCommand(server, scriptSha256) {
52
+ export function runtimeInstallCommand(server, scriptSha256, mode = "") {
53
53
  const origin = safeRuntimeOrigin(server);
54
54
  if (!origin || typeof scriptSha256 !== "string" || !/^[a-f0-9]{64}$/.test(scriptSha256)) return "";
55
+ const failed = mode === "personal"
56
+ ? "An error about a certificate or trust means this computer doesn't trust this Hub yet. Ask your Hub administrator. Don't change security settings to get past it. If this was not a certificate error, get a new command and try again."
57
+ : "install.ps1 could not be verified against the hash on the AgEnD page (a certificate or download error above is the usual cause: trust this AgEnD certificate, or use the ZIP; otherwise reload the page and copy the command again)";
55
58
  return `[Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor 3072; `
56
59
  + `$agend = '${origin}'; $s = $null; $h = $null; `
57
60
  + `$s = (iwr "$agend/runtime/install.ps1" -UseBasicParsing).Content; `
58
61
  + `$h = (-join ([Security.Cryptography.SHA256]::Create().ComputeHash([Text.Encoding]::UTF8.GetBytes($s)) | % { $_.ToString('x2') })); `
59
62
  + `if ($s -and $h -eq '${scriptSha256}') { iex $s } `
60
- + `else { Write-Host 'install.ps1 could not be verified against the hash on the AgEnD page (a certificate or download error above is the usual cause: trust this AgEnD certificate, or use the ZIP; otherwise reload the page and copy the command again)' -ForegroundColor Red; throw 'install.ps1 was not run' }`;
63
+ + `else { Write-Host '${failed.replaceAll("'", "''")}' -ForegroundColor Red; throw 'install.ps1 was not run' }`;
61
64
  }
62
65
  /**
63
66
  * The install command with a ONE-TIME enrollment token inside: pasted on ANY computer, or handed to an AI agent running there, it installs the
@@ -67,8 +70,8 @@ export function runtimeInstallCommand(server, scriptSha256) {
67
70
  * its standard input; it is never a command-line argument. The token works once, for 15 minutes, and is revoked from this page; anyone who gets this text
68
71
  * while it is valid can connect THEIR computer as your Runtime, so treat it like a password: do not paste it into chats or tickets.
69
72
  */
70
- export function runtimeEnrollCommand(server, scriptSha256, token, fingerprint) {
71
- const body = runtimeInstallCommand(server, scriptSha256);
73
+ export function runtimeEnrollCommand(server, scriptSha256, token, fingerprint, mode = "") {
74
+ const body = runtimeInstallCommand(server, scriptSha256, mode);
72
75
  if (!body || typeof token !== "string" || !ENROLL_TOKEN.test(token) || typeof fingerprint !== "string" || !SERVER_FINGERPRINT.test(fingerprint)) return "";
73
76
  // `$LASTEXITCODE` is reset first (a stale value from an earlier command must not look like a failure) and checked last: `powershell -Command` returns 1 only when
74
77
  // its last statement failed, so an AI agent or CI step sees a non-zero exit status when the install or the connection did not succeed. Silent and harmless at a prompt.
@@ -8,9 +8,9 @@ register("installedBuild", {
8
8
  const copy = (key, ...args) => t(`installedBuild.${key}`, ...args);
9
9
  const releases = "https://github.com/songsid/AgEnD/releases";
10
10
  export function SettingsBuildVersion({ version, build }) {
11
- const [narrow, setNarrow] = useState(() => globalThis.matchMedia?.("(max-width: 899px)").matches ?? false);
11
+ const [narrow, setNarrow] = useState(() => globalThis.matchMedia?.("(max-width: 899px), (pointer: coarse) and (max-height: 500px) and (max-width: 1023px)").matches ?? false);
12
12
  useEffect(() => {
13
- const media = globalThis.matchMedia?.("(max-width: 899px)"); if (!media) return;
13
+ const media = globalThis.matchMedia?.("(max-width: 899px), (pointer: coarse) and (max-height: 500px) and (max-width: 1023px)"); if (!media) return;
14
14
  const sync = () => setNarrow(media.matches); media.addEventListener("change", sync); sync();
15
15
  return () => media.removeEventListener("change", sync);
16
16
  }, []);
@@ -11,7 +11,7 @@
11
11
  .p-settings .s-ov { display: flex; flex-direction: column; gap: var(--s-5); }
12
12
  .p-settings .s-ov-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: var(--s-4); align-items: stretch; } /* S-120: card bottoms (their footers) aligned */
13
13
  .p-settings .s-ov-devices { grid-row: span 2; }
14
- @media (max-width: 900px) { .p-settings .s-ov-grid { grid-template-columns: minmax(0, 1fr); } .p-settings .s-ov-devices { grid-row: auto; } }
14
+ @media (max-width: 899px), (pointer: coarse) and (max-height: 500px) and (max-width: 1023px) { .p-settings .s-ov-grid { grid-template-columns: minmax(0, 1fr); } .p-settings .s-ov-devices { grid-row: auto; } }
15
15
  .p-settings .s-ov-card { margin: 0; display: flex; flex-direction: column; gap: 10px; }
16
16
  .p-settings .s-ov-title { display: flex; align-items: center; gap: 8px; margin: 0; }
17
17
  .p-settings .s-ov-title > svg { color: var(--accent); flex: none; }
@@ -12,7 +12,7 @@
12
12
  .s-account-keepalive .s-keepalive-fallback { display: flex; align-items: center; gap: var(--s-2); }
13
13
 
14
14
  /* AGEND-250 (UI gate, rule 7): on a phone the switch is tapped through its label, which is --tap high, and the ⓘ is a --tap box whose 18px circle is drawn inside it (the gate measures the element's own box, so the circle is a pseudo-element). */
15
- @media (max-width: 899px) {
15
+ @media (max-width: 899px), (pointer: coarse) and (max-height: 500px) and (max-width: 1023px) {
16
16
  .s-account-keepalive .check { min-height: var(--tap); }
17
17
  .s-account-keepalive .s-i .s-tipbtn { position: relative; width: var(--tap); height: var(--tap); border-color: transparent; }
18
18
  .s-account-keepalive .s-i .s-tipbtn::before { content: ""; position: absolute; inset: calc((var(--tap) - 18px) / 2); border: 1px solid var(--border-strong); border-radius: var(--r-full); }
@@ -91,7 +91,7 @@ button.s-account-used { display: inline-flex; align-items: center; gap: var(--s-
91
91
 
92
92
  /* AGEND-250 (#3771 review; UI gate, style guide rule 7): on a phone every control of the account cards is a tap target (--tap high). Antigravity made a fourth card with an Add account button and a Fleet-default select; the
93
93
  gate's ratchet lets no small control be added, so these are made tap-high for every card (the three listed allowances for them are gone from ui-gate-tap-allowlist.json). The buttons of one kind share one height, so all of them grow. */
94
- @media (max-width: 899px) {
94
+ @media (max-width: 899px), (pointer: coarse) and (max-height: 500px) and (max-width: 1023px) {
95
95
  .s-account-head .s-account-add, .s-account-machine-head .s-account-add { min-height: var(--tap); min-width: var(--tap); }
96
96
  .s-accounts .s-account-default select { min-height: var(--tap); }
97
97
  }
@@ -43,11 +43,11 @@ register("agentSheet", {
43
43
 
44
44
  /** A phone's width (the shell's own: max-width 899 px), kept current as the window is resized. */
45
45
  export function usePhone() {
46
- const read = () => typeof matchMedia === "function" && matchMedia("(max-width: 899px)").matches;
46
+ const read = () => typeof matchMedia === "function" && matchMedia("(max-width: 899px), (pointer: coarse) and (max-height: 500px) and (max-width: 1023px)").matches;
47
47
  const [on, setOn] = useState(read);
48
48
  useEffect(() => {
49
49
  if (typeof matchMedia !== "function") return undefined;
50
- const mq = matchMedia("(max-width: 899px)"), changed = () => setOn(mq.matches);
50
+ const mq = matchMedia("(max-width: 899px), (pointer: coarse) and (max-height: 500px) and (max-width: 1023px)"), changed = () => setOn(mq.matches);
51
51
  changed(); mq.addEventListener?.("change", changed);
52
52
  return () => mq.removeEventListener?.("change", changed);
53
53
  }, []);
@@ -31,7 +31,10 @@ export const SYNCED = {
31
31
  "nav.collapsed": { ls: "agend_instance_collapsed", ...json },
32
32
  "nav.filter": { ls: "agend_instance_filter", ...json },
33
33
  "nav.favorites": { ls: "agend_favorites", ...json }, // #1664
34
- "nav.density": { ls: "agend_nav_density", toLocal: (v) => (v === "compact" ? v : null), fromLocal: (s) => (s === "compact" ? s : undefined) },
34
+ // M-3252: the desktop sidebar's density, and the phone drawer's own. Both values are cached: a choice is not the same as
35
+ // none (none: the layout's default — the desktop 精簡, the phone 詳細).
36
+ "nav.density": { ls: "agend_nav_density", toLocal: (v) => (v === "compact" || v === "detailed" ? v : null), fromLocal: (s) => (s === "compact" || s === "detailed" ? s : undefined) },
37
+ "nav.densityPhone": { ls: "agend_nav_density_phone", toLocal: (v) => (v === "compact" || v === "detailed" ? v : null), fromLocal: (s) => (s === "compact" || s === "detailed" ? s : undefined) },
35
38
  "nav.sort": { ls: "agend_nav_sort", ...json }, // #2179
36
39
  "preview.optIn": { ls: "agend_html_preview", toLocal: (v) => (v ? "on" : null), fromLocal: (s) => (s === "on" ? true : undefined) },
37
40
  "names.primary": { ls: "agend_names_primary", toLocal: (v) => (v === "instance" ? v : null), fromLocal: (s) => (s === "instance" ? s : undefined) }, // #1722
@@ -87,7 +90,7 @@ const listeners = new Set();
87
90
  // this page's own in prefInForce) but not sent: `held` keeps it until savePrefsHeld sends them all, or discardHeldPrefs
88
91
  // puts back what the host has (the same path as another device's change: apply and onPrefsChanged).
89
92
  // Only keys Settings itself changes (a card's own size, card.sizeByInstance, is set from the card, outside Settings).
90
- export const HELD_KEYS = Object.freeze(new Set(["theme", "lang", "names.primary", "nav.density", "preview.optIn", "fx.show", "color.show", "color.off", "card.size"]));
93
+ export const HELD_KEYS = Object.freeze(new Set(["theme", "lang", "names.primary", "nav.density", "nav.densityPhone", "preview.optIn", "fx.show", "color.show", "color.off", "card.size"]));
91
94
  let holding = 0;
92
95
  const held = new Map(); // key → value chosen in Settings, shown here, not saved yet
93
96
  const heldFrom = new Map(); // key → its cached form before it was held (a choice back to it is no change)
@@ -124,7 +124,7 @@ const searchRow = () => html`<button type="button" class="side-row side-search"
124
124
  aria-keyshortcuts=${isMacLike() ? "Meta+K" : "Control+K"}><${Icon} name="search" /><span class="grow">${t("app.search")}</span><kbd class="kbd-hint" aria-hidden="true">${searchShortcut()}</kbd></button>`;
125
125
 
126
126
  function readCollapsed() { try { return localStorage.getItem("agend_sidebar") === "hidden"; } catch { return false; } }
127
- const narrow = () => typeof matchMedia === "function" && matchMedia("(max-width: 899px)").matches;
127
+ const narrow = () => typeof matchMedia === "function" && matchMedia("(max-width: 899px), (pointer: coarse) and (max-height: 500px) and (max-width: 1023px)").matches;
128
128
 
129
129
  // ── #1722: the sidebar's width — this device's (the #1665 split: a width depends on the screen), through the CSSOM ──
130
130
  export const SIDEBAR_W = { min: 200, max: 480, def: 260, step: 16, mainMin: 480 };
@@ -18,7 +18,9 @@ function owns(el) {
18
18
  if (el.isContentEditable || (el.getAttribute && el.getAttribute("contenteditable") === "true")) return true;
19
19
  const cl = el.classList;
20
20
  return !!cl && (cl.contains("xterm") || cl.contains("composer") || cl.contains("composer-box") || cl.contains("pv-panel")
21
- || cl.contains("lb") || cl.contains("csv-card") || cl.contains("codeblock"));
21
+ || cl.contains("lb") || cl.contains("csv-card") || cl.contains("codeblock")
22
+ // M-3253: the Office's and the org chart's stages pan themselves (with their canvas, controls and the Office's card inside).
23
+ || cl.contains("oo-stage") || cl.contains("oc-stage"));
22
24
  }
23
25
  /** Scrolls sideways (and has room to): the gesture is the content's. */
24
26
  function scrollsSideways(el, win) {