@songsid/agend 2.4.0-alpha.1 → 2.4.0-alpha.2

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 (235) hide show
  1. package/README.md +1 -1
  2. package/README.zh-TW.md +1 -1
  3. package/dist/agent-whats-new.js +2 -0
  4. package/dist/agent-whats-new.js.map +1 -1
  5. package/dist/auth-api.js +3 -1
  6. package/dist/auth-api.js.map +1 -1
  7. package/dist/backend/claude-code.js +4 -0
  8. package/dist/backend/claude-code.js.map +1 -1
  9. package/dist/backend/types.d.ts +6 -0
  10. package/dist/backend/types.js.map +1 -1
  11. package/dist/backend-availability.d.ts +1 -1
  12. package/dist/backend-availability.js +28 -1
  13. package/dist/backend-availability.js.map +1 -1
  14. package/dist/browser-backend-signins.d.ts +7 -1
  15. package/dist/browser-backend-signins.js +8 -4
  16. package/dist/browser-backend-signins.js.map +1 -1
  17. package/dist/build-provenance.json +1 -1
  18. package/dist/channel/mcp-tools.js +1 -1
  19. package/dist/channel/mcp-tools.js.map +1 -1
  20. package/dist/config-validator.js +47 -7
  21. package/dist/config-validator.js.map +1 -1
  22. package/dist/daemon.d.ts +3 -0
  23. package/dist/daemon.js +4 -0
  24. package/dist/daemon.js.map +1 -1
  25. package/dist/fleet-manager.d.ts +33 -4
  26. package/dist/fleet-manager.js +143 -61
  27. package/dist/fleet-manager.js.map +1 -1
  28. package/dist/general-knowledge/skills/credential-profiles/SKILL.md +19 -0
  29. package/dist/hub/audit/index.js +12 -5
  30. package/dist/hub/audit/index.js.map +1 -1
  31. package/dist/hub/catalog.d.ts +6 -0
  32. package/dist/hub/catalog.js +14 -4
  33. package/dist/hub/catalog.js.map +1 -1
  34. package/dist/hub/client.js +2 -0
  35. package/dist/hub/client.js.map +1 -1
  36. package/dist/hub/compose/member.d.ts +2 -0
  37. package/dist/hub/compose/member.js +11 -2
  38. package/dist/hub/compose/member.js.map +1 -1
  39. package/dist/hub/compose/server.js +2 -1
  40. package/dist/hub/compose/server.js.map +1 -1
  41. package/dist/hub/enrolment-code.d.ts +126 -0
  42. package/dist/hub/enrolment-code.js +266 -0
  43. package/dist/hub/enrolment-code.js.map +1 -0
  44. package/dist/hub/group-policy/admin-impact.js +4 -2
  45. package/dist/hub/group-policy/admin-impact.js.map +1 -1
  46. package/dist/hub/group-policy/admin-inventory.js +6 -6
  47. package/dist/hub/group-policy/admin-inventory.js.map +1 -1
  48. package/dist/hub/group-policy/authorization.d.ts +16 -2
  49. package/dist/hub/group-policy/authorization.js +69 -5
  50. package/dist/hub/group-policy/authorization.js.map +1 -1
  51. package/dist/hub/group-policy/impact-inventory.js +3 -3
  52. package/dist/hub/group-policy/impact-inventory.js.map +1 -1
  53. package/dist/hub/group-policy/resources.d.ts +40 -1
  54. package/dist/hub/group-policy/resources.js +51 -13
  55. package/dist/hub/group-policy/resources.js.map +1 -1
  56. package/dist/hub/group-policy/store.d.ts +6 -0
  57. package/dist/hub/group-policy/store.js +49 -4
  58. package/dist/hub/group-policy/store.js.map +1 -1
  59. package/dist/hub/http/compose.js +30 -6
  60. package/dist/hub/http/compose.js.map +1 -1
  61. package/dist/hub/init/text.js +2 -2
  62. package/dist/hub/init/text.js.map +1 -1
  63. package/dist/hub/init/web.d.ts +7 -0
  64. package/dist/hub/init/web.js +6 -1
  65. package/dist/hub/init/web.js.map +1 -1
  66. package/dist/hub/join/local.d.ts +27 -0
  67. package/dist/hub/join/local.js +70 -5
  68. package/dist/hub/join/local.js.map +1 -1
  69. package/dist/hub/join/receipt.d.ts +1 -0
  70. package/dist/hub/join/receipt.js +1 -1
  71. package/dist/hub/join/receipt.js.map +1 -1
  72. package/dist/hub/join/service.d.ts +92 -6
  73. package/dist/hub/join/service.js +199 -28
  74. package/dist/hub/join/service.js.map +1 -1
  75. package/dist/hub/join/store.d.ts +2 -1
  76. package/dist/hub/join/store.js +7 -7
  77. package/dist/hub/join/store.js.map +1 -1
  78. package/dist/hub/member/exposure-api.d.ts +2 -0
  79. package/dist/hub/member/exposure-api.js +3 -2
  80. package/dist/hub/member/exposure-api.js.map +1 -1
  81. package/dist/hub/member/exposures.d.ts +4 -0
  82. package/dist/hub/member/exposures.js +12 -2
  83. package/dist/hub/member/exposures.js.map +1 -1
  84. package/dist/hub/member/pairing-notices.js +8 -6
  85. package/dist/hub/member/pairing-notices.js.map +1 -1
  86. package/dist/hub/pairing-notices.d.ts +5 -2
  87. package/dist/hub/pairing-notices.js +38 -13
  88. package/dist/hub/pairing-notices.js.map +1 -1
  89. package/dist/hub/pairing.d.ts +7 -2
  90. package/dist/hub/protocol.d.ts +47 -0
  91. package/dist/hub/protocol.js +3 -1
  92. package/dist/hub/protocol.js.map +1 -1
  93. package/dist/hub/server.js +15 -1
  94. package/dist/hub/server.js.map +1 -1
  95. package/dist/hub/types.d.ts +12 -4
  96. package/dist/hub-pairing-summary.js +1 -1
  97. package/dist/hub-pairing-summary.js.map +1 -1
  98. package/dist/instance-config-impact.js +4 -0
  99. package/dist/instance-config-impact.js.map +1 -1
  100. package/dist/instance-lifecycle.js +4 -0
  101. package/dist/instance-lifecycle.js.map +1 -1
  102. package/dist/locale.js +6 -2
  103. package/dist/locale.js.map +1 -1
  104. package/dist/log-service.d.ts +62 -6
  105. package/dist/log-service.js +135 -28
  106. package/dist/log-service.js.map +1 -1
  107. package/dist/log-steps-agy-grok.d.ts +74 -0
  108. package/dist/log-steps-agy-grok.js +440 -0
  109. package/dist/log-steps-agy-grok.js.map +1 -0
  110. package/dist/log-steps.d.ts +62 -3
  111. package/dist/log-steps.js +188 -22
  112. package/dist/log-steps.js.map +1 -1
  113. package/dist/log-transcript-paths.d.ts +29 -0
  114. package/dist/log-transcript-paths.js +109 -0
  115. package/dist/log-transcript-paths.js.map +1 -0
  116. package/dist/login-controller.d.ts +17 -3
  117. package/dist/login-controller.js +57 -5
  118. package/dist/login-controller.js.map +1 -1
  119. package/dist/login-window-lock.d.ts +20 -8
  120. package/dist/login-window-lock.js +35 -16
  121. package/dist/login-window-lock.js.map +1 -1
  122. package/dist/outbound-handlers.d.ts +14 -0
  123. package/dist/outbound-handlers.js +49 -1
  124. package/dist/outbound-handlers.js.map +1 -1
  125. package/dist/profile-signins.d.ts +2 -0
  126. package/dist/profile-signins.js +1 -1
  127. package/dist/profile-signins.js.map +1 -1
  128. package/dist/settings-api.d.ts +34 -0
  129. package/dist/settings-api.js +184 -6
  130. package/dist/settings-api.js.map +1 -1
  131. package/dist/settings-change.js +38 -1
  132. package/dist/settings-change.js.map +1 -1
  133. package/dist/settings-effect.js +14 -0
  134. package/dist/settings-effect.js.map +1 -1
  135. package/dist/tool-progress.d.ts +7 -0
  136. package/dist/tool-progress.js +21 -9
  137. package/dist/tool-progress.js.map +1 -1
  138. package/dist/types.d.ts +13 -0
  139. package/dist/ui/accounts-view.js +14 -4
  140. package/dist/ui/agent-details-settings.js +2 -2
  141. package/dist/ui/agent-page-strings.js +2 -2
  142. package/dist/ui/backend-signin.js +47 -14
  143. package/dist/ui/chat-activity-groups.js +225 -0
  144. package/dist/ui/chat-activity.js +355 -0
  145. package/dist/ui/chat-popout-header.js +35 -0
  146. package/dist/ui/chat-popout-transport.js +80 -0
  147. package/dist/ui/chat-popout.js +63 -0
  148. package/dist/ui/chat-quote.js +3 -1
  149. package/dist/ui/chat-store.js +45 -4
  150. package/dist/ui/chat-workspace-gestures.js +177 -0
  151. package/dist/ui/chat-workspace-navigation.js +34 -10
  152. package/dist/ui/chat-workspace.js +96 -32
  153. package/dist/ui/host-install.js +2 -2
  154. package/dist/ui/hub-agent-copy.js +7 -7
  155. package/dist/ui/hub-chat-strings.js +3 -3
  156. package/dist/ui/hub-client.js +77 -17
  157. package/dist/ui/hub-company-join-strings.js +12 -10
  158. package/dist/ui/hub-company-join.js +52 -39
  159. package/dist/ui/hub-confirm-place.js +44 -0
  160. package/dist/ui/hub-directory-editor-strings.js +3 -3
  161. package/dist/ui/hub-directory-notice-strings.js +1 -1
  162. package/dist/ui/hub-enrolment-code-strings.js +44 -0
  163. package/dist/ui/hub-enrolment-code.js +159 -0
  164. package/dist/ui/hub-group-search.js +82 -0
  165. package/dist/ui/hub-group-strings.js +8 -8
  166. package/dist/ui/hub-join-approval.js +31 -0
  167. package/dist/ui/hub-join-code-input.js +66 -0
  168. package/dist/ui/hub-join-queue.js +62 -0
  169. package/dist/ui/hub-join-steps.js +231 -0
  170. package/dist/ui/hub-joincode-flow-strings.js +22 -0
  171. package/dist/ui/hub-owner-strings.js +9 -9
  172. package/dist/ui/hub-pairing-progress-strings.js +1 -1
  173. package/dist/ui/hub-quick-pairing.js +8 -4
  174. package/dist/ui/hub-quick-strings.js +11 -11
  175. package/dist/ui/hub-share-refused.js +17 -0
  176. package/dist/ui/hub-strings.js +61 -61
  177. package/dist/ui/hub-this-hub.js +2 -2
  178. package/dist/ui/hub-welcome.js +26 -5
  179. package/dist/ui/image-annotate.js +283 -0
  180. package/dist/ui/image-lightbox.js +26 -6
  181. package/dist/ui/log-row.js +327 -0
  182. package/dist/ui/panel-chat.js +151 -12
  183. package/dist/ui/panel-details.js +14 -6
  184. package/dist/ui/panel-hub.js +42 -13
  185. package/dist/ui/panel-log.js +9 -154
  186. package/dist/ui/panel-settings.js +48 -11
  187. package/dist/ui/search-dialog.js +1 -0
  188. package/dist/ui/settings-access-overview.js +1 -1
  189. package/dist/ui/settings-hub-browser-certificate.js +3 -3
  190. package/dist/ui/settings-hub-company-join.js +41 -30
  191. package/dist/ui/settings-hub-connection.js +8 -5
  192. package/dist/ui/settings-hub-membership.js +3 -3
  193. package/dist/ui/settings-hub-section.js +1 -1
  194. package/dist/ui/settings-hub-setup-strings.js +6 -6
  195. package/dist/ui/settings-hub-setup.js +44 -6
  196. package/dist/ui/settings-hub.js +35 -10
  197. package/dist/ui/settings-layout.js +6 -4
  198. package/dist/ui/settings-public-session-strings.js +37 -0
  199. package/dist/ui/settings-registry.js +4 -0
  200. package/dist/ui/settings-strings.js +2 -2
  201. package/dist/ui/shared/app-shell.js +16 -10
  202. package/dist/ui/shared/app.css +195 -30
  203. package/dist/ui/shared/app.js +8 -1
  204. package/dist/ui/shared/chat-render.js +11 -2
  205. package/dist/ui/shared/chat-thread.js +20 -3
  206. package/dist/ui/shared/chat-work-bar.css +7 -0
  207. package/dist/ui/shared/chat-workspace-model.js +39 -9
  208. package/dist/ui/shared/hub-owner.css +8 -0
  209. package/dist/ui/shared/identity-color.js +9 -3
  210. package/dist/ui/shared/image-annotate.css +45 -0
  211. package/dist/ui/shared/instance-nav.js +59 -22
  212. package/dist/ui/shared/pane-geometry.js +29 -0
  213. package/dist/ui/shared/signin.js +2 -2
  214. package/dist/ui/shared/tokens.css +14 -0
  215. package/dist/ui/shared/ui-menu.js +22 -7
  216. package/dist/ui/signin.html +1 -1
  217. package/dist/ui/structured-signin.js +11 -4
  218. package/dist/web-api.d.ts +1 -0
  219. package/dist/web-api.js +34 -4
  220. package/dist/web-api.js.map +1 -1
  221. package/dist/web-backend-login.d.ts +9 -3
  222. package/dist/web-backend-login.js +7 -4
  223. package/dist/web-backend-login.js.map +1 -1
  224. package/dist/web-chat-history.d.ts +11 -0
  225. package/dist/web-chat-history.js +9 -1
  226. package/dist/web-chat-history.js.map +1 -1
  227. package/dist/web-guest-access.js +2 -2
  228. package/dist/web-guest-access.js.map +1 -1
  229. package/dist/web-session.d.ts +31 -3
  230. package/dist/web-session.js +25 -4
  231. package/dist/web-session.js.map +1 -1
  232. package/dist/web-settings-patch.d.ts +8 -2
  233. package/dist/web-settings-patch.js +22 -10
  234. package/dist/web-settings-patch.js.map +1 -1
  235. package/package.json +1 -1
@@ -1,8 +1,24 @@
1
1
  /** First setup only, on this computer's D3 host page. Every effect reauthorizes on the server. */
2
2
  import { html, useEffect, useRef, useState } from "/assets/app-html.js";
3
+ import { register, t } from "/assets/app-i18n.js";
3
4
  import { Skeleton, ErrorState } from "/assets/ui-states.js";
4
5
  import { api } from "./settings-confirm.js";
5
6
  import { hs, setupError } from "./settings-hub-setup-strings.js";
7
+ // These words travel with the new renderer, even when the tab retains the setup dictionary.
8
+ register("hubSetupReady", {
9
+ en: {
10
+ hint: "The settings are saved. This page checks startup automatically; once the Hub is ready, sign in with the designated directory account.",
11
+ checking: "Checking whether the Hub is ready…", ready: "The Hub is ready. You can open sign-in.",
12
+ waiting: "The Hub isn't ready yet. Check the Hub's status on this computer, then check again here.",
13
+ check: "Check again",
14
+ },
15
+ "zh-TW": {
16
+ hint: "設定已儲存。這個頁面會自動檢查啟動狀態;Hub 就緒後,請以指定的目錄帳號登入。",
17
+ checking: "正在確認 Hub 是否就緒…", ready: "Hub 已就緒,可以開啟登入。",
18
+ waiting: "Hub 尚未就緒。請檢查這台電腦上的 Hub 狀態,再回到這裡檢查。", check: "再次檢查",
19
+ },
20
+ });
21
+ const readyText = key => t(`hubSetupReady.${key}`);
6
22
  const PREFIX = "/api/settings/hub/setup";
7
23
  const REF = /^[A-Za-z0-9_-]{32}$/;
8
24
  export function hubSetupMarked(doc = typeof document !== "undefined" ? document : null) {
@@ -51,7 +67,7 @@ function Field({ name, form, update, type = "text", hint, required = true, max =
51
67
  export function HubSetupSettings() {
52
68
  const [view, setView] = useState(null), [step, setStep] = useState(0), [form, setForm] = useState(defaults), [busy, setBusy] = useState(false), [error, setFailureCode] = useState(""),
53
69
  [probe, setProbe] = useState(null), [fingerprints, setFingerprints] = useState([]), [caChecked, setCaChecked] = useState(false), [caError, setCaError] = useState(false),
54
- [review, setReview] = useState(null), [created, setCreated] = useState(null), [uncertain, setUncertain] = useState(false);
70
+ [review, setReview] = useState(null), [created, setCreated] = useState(null), [uncertain, setUncertain] = useState(false), [readiness, setReadiness] = useState("checking"), [readAttempt, setReadAttempt] = useState(0);
55
71
  const life = useRef(0), running = useRef(false), requests = useRef(new Set()), draft = useRef(null), probeRef = useRef(null), caGeneration = useRef(0);
56
72
  const current = n => n === life.current && hubSetupMarked() && !(typeof window !== "undefined" && window.AgendAuth?.sessionEnded?.());
57
73
  const send = async (action, body, signal) => {
@@ -79,7 +95,7 @@ export function HubSetupSettings() {
79
95
  setView(v); setForm(f => ({ ...f, coexistence: v.existingFleet ? "" : "dedicated" }));
80
96
  }, e => { if (current(n)) setFailureCode(e.code || "unavailable"); }).finally(() => requests.current.delete(abort));
81
97
  const off = typeof window !== "undefined" ? window.AgendAuth?.onSessionEnd?.(() => {
82
- life.current++; for (const r of requests.current) r.abort(); setForm(defaults()); setReview(null); setProbe(null); setFailureCode("denied");
98
+ life.current++; for (const r of requests.current) r.abort(); setForm(defaults()); setReview(null); setProbe(null); setCreated(null); setFailureCode("denied");
83
99
  }) : null;
84
100
  return () => { life.current++; off?.(); for (const r of requests.current) r.abort(); cancelRef(draft.current); cancelRef(probeRef.current); draft.current = null; probeRef.current = null; };
85
101
  }, []);
@@ -90,6 +106,26 @@ export function HubSetupSettings() {
90
106
  setupCaFingerprints(form.caPem).then(fps => { if (generation === caGeneration.current) setFingerprints(fps); }, () => { if (generation === caGeneration.current) setCaError(true); });
91
107
  return () => { caGeneration.current++; };
92
108
  }, [form.ca, form.caPem]);
109
+ useEffect(() => {
110
+ if (!created) return;
111
+ const n = life.current, abort = new AbortController();
112
+ let live = true, timer, attempts = 0;
113
+ requests.current.add(abort); setReadiness("checking");
114
+ const checkReady = async () => {
115
+ if (!live || !current(n)) return;
116
+ try {
117
+ const v = await send("", undefined, abort.signal);
118
+ if (!live || !current(n)) return;
119
+ const same = v?.v === 1 && v.initialized === true && v.runtime?.hubId === created.hubId && v.runtime?.webOrigin === created.webOrigin;
120
+ if (same && v.runtime.state === "ready") { setReadiness("ready"); return; }
121
+ // A finite read-only check. Missing fields on an older server never mean ready.
122
+ if (same && v.runtime.state === "starting" && ++attempts < 30) timer = setTimeout(checkReady, 2000);
123
+ else setReadiness("waiting");
124
+ } catch { if (live && current(n)) setReadiness("waiting"); }
125
+ };
126
+ void checkReady();
127
+ return () => { live = false; clearTimeout(timer); abort.abort(); requests.current.delete(abort); };
128
+ }, [created, readAttempt]);
93
129
  const update = (name, value) => {
94
130
  clearDraft(); setFailureCode("");
95
131
  if (["url", "ca"].includes(name)) { clearProbe(); setCaChecked(false); setFingerprints([]); }
@@ -139,8 +175,8 @@ export function HubSetupSettings() {
139
175
  try {
140
176
  const r = await send("/commit", { ref }, signal);
141
177
  if (!current(n)) return;
142
- if (r?.ok !== true || r.webOrigin !== review.webOrigin) throw { code: "uncertain" };
143
- setCreated({ webOrigin: review.webOrigin }); setReview(null); setForm(defaults());
178
+ if (r?.ok !== true || typeof r.hubId !== "string" || !r.hubId || r.webOrigin !== review.webOrigin) throw { code: "uncertain" };
179
+ setCreated({ hubId: r.hubId, webOrigin: review.webOrigin }); setReview(null); setForm(defaults());
144
180
  } catch { if (current(n)) { setUncertain(true); setReview(null); setForm(defaults()); setFailureCode("uncertain"); } }
145
181
  });
146
182
  const cancel = () => { clearDraft(); clearProbe(); setForm({ ...defaults(), coexistence: view?.existingFleet ? "" : "dedicated" }); setStep(0); setFailureCode(""); };
@@ -148,11 +184,13 @@ export function HubSetupSettings() {
148
184
  const message = error === "unsupported" || error === "caInvalid" || error === "uncertain" ? hs(error) : setupError(error);
149
185
  const titles = ["title", "hub", "directory", "administrator", "review"];
150
186
  return html`<section class="card s-group hub-setup" id="hub-setup"><h3>${hs(created ? "created" : "title")}</h3>
151
- <p class="note">${hs(created ? "createdHint" : "hint")}</p>
187
+ <p class="note">${created ? readyText("hint") : hs("hint")}</p>
152
188
  ${!view && !error ? html`<${Skeleton} variant="form" lines=${2} />` : null}
153
189
  ${error ? html`<${ErrorState} message=${message} />` : null}
154
190
  ${blocked || uncertain || error === "unsupported" || (!view && error) ? html`<p class="note">${blocked ? hs(blocked) : ""}</p><div class="s-row"><a class="btn" href="/settings/hub">${hs("reload")}</a></div>` : null}
155
- ${created ? html`<div class="s-row"><a class="btn btn-primary" href=${created.webOrigin + "/ui/hub"} target="_blank" rel="noopener noreferrer">${hs("open")}</a><a class="btn" href="/settings/hub">${hs("reload")}</a></div>` : null}
191
+ ${created ? html`<p class="note" role="status">${readyText(readiness)}</p>
192
+ <div class="s-row">${readiness === "ready" ? html`<a class="btn btn-primary" href=${created.webOrigin + "/ui/hub"} target="_blank" rel="noopener noreferrer">${hs("open")}</a>`
193
+ : readiness === "waiting" ? html`<button type="button" class="btn" onClick=${() => setReadAttempt(n => n + 1)}>${readyText("check")}</button>` : null}</div>` : null}
156
194
  ${view && !blocked && !created && !uncertain && !error?.match(/^(unsupported|denied|host_session_required)$/) ? step === 0 ? html`<div class="s-row"><button class="btn" onClick=${() => setStep(1)}>${hs("start")}</button></div>` : html`
157
195
  <p class="note" role="status">${step} / 4 · ${hs(titles[step])}</p>
158
196
  <form class="form" onSubmit=${step === 3 ? prepare : step === 4 ? e => e.preventDefault() : next}>
@@ -12,7 +12,11 @@ import { compareGroups, hubClient, safeWebOrigin, ADDRESS_HINT, CODE_HINT } from
12
12
  import { hw, linkHubCss } from "./hub-strings.js";
13
13
  import { guidanceFor } from "./hub-provider-guidance.js";
14
14
  import { AGENT_CHOICE } from "./hub-agent-copy.js";
15
+ import { hr } from "./hub-share-refused.js";
15
16
  import { PairingNotices } from "./hub-quick-pairing.js";
17
+ import * as noticeViews from "./hub-quick-pairing.js";
18
+ import { appStore, useStore } from "/assets/app-store.js";
19
+ import { confirmPlace, pendingView } from "./hub-confirm-place.js";
16
20
  import { hq } from "./hub-quick-strings.js";
17
21
  import { hp } from "./hub-pairing-progress-strings.js";
18
22
 
@@ -90,9 +94,11 @@ export function HubConnectCard({ embedded = false, onPairing, labels = {}, prefi
90
94
  useEffect(() => {
91
95
  linkHubCss();
92
96
  live.current = true;
97
+ const releaseNotices = noticeViews.pairingNoticesV3 === true && typeof client.usePairingNoticeVersion === "function"
98
+ ? client.usePairingNoticeVersion(3) : () => {};
93
99
  readPairing();
94
100
  const off = client.subscribe((p) => { if (live.current) setPairing(p); });
95
- return () => { live.current = false; generation.current++; activePending.current = null; off(); };
101
+ return () => { live.current = false; generation.current++; activePending.current = null; off(); if (typeof releaseNotices === "function") releaseNotices(); };
96
102
  }, []);
97
103
  const act = async (fn) => {
98
104
  if (busy) return;
@@ -215,30 +221,47 @@ export function HubConnectCard({ embedded = false, onPairing, labels = {}, prefi
215
221
  * shared under the older restricted mode says so and offers "Share again" (a new, confirmed revision).
216
222
  */
217
223
  function HubExposures({ client, pairing }) {
224
+ const store = useStore(appStore);
218
225
  const [rows, setRows] = useState(null);
219
226
  const [readError, setReadError] = useState(false);
220
227
  const [busy, setBusy] = useState(null);
221
228
  const [msg, setMsg] = useState(null);
222
- const live = useRef(true);
223
- const load = () => { setReadError(false); return client.exposures().then((r) => { if (live.current) setRows(r); }, () => { if (live.current) setReadError(true); }); };
229
+ const live = useRef(true), seq = useRef(0), polling = useRef(false), busyRef = useRef(null);
230
+ // Only the newest read lands (a slower older answer never overwrites a newer one). A background read (below) keeps the
231
+ // rows it has on a failure instead of turning the list into an error.
232
+ const load = (background = false) => {
233
+ const n = ++seq.current; if (!background) setReadError(false);
234
+ return client.exposures().then((r) => { if (live.current && n === seq.current) { setRows(r); setReadError(false); } },
235
+ () => { if (live.current && n === seq.current && !background) setReadError(true); });
236
+ };
224
237
  useEffect(() => { live.current = true; load(); return () => { live.current = false; }; }, []);
238
+ // M-3007 (Prism #3763 r1): a share the Hub refuses (or later accepts) changes the rows with no action on this page, so
239
+ // they are read again on the card's own visible pairing poll: each poll hands this list a new `pairing` (no second
240
+ // subscription). One read per tick at most, none while one is in flight or a switch is being saved. This component is
241
+ // keyed by the binding, so a different connection never sees them, and an unmounted one reads nothing.
242
+ const first = useRef(true);
243
+ useEffect(() => {
244
+ if (first.current) { first.current = false; return; }
245
+ if (!live.current || polling.current || busyRef.current) return;
246
+ polling.current = true; load(true).finally(() => { polling.current = false; });
247
+ }, [pairing]);
225
248
  const toggle = async (row, on) => {
226
249
  if (busy) return;
227
- setBusy(row.agent); setMsg(null);
250
+ setBusy(row.agent); busyRef.current = row.agent; setMsg(null);
228
251
  try {
229
252
  const r = await client.setExposed(row.agent, on, row.revision, on ? AGENT_CHOICE : null);
230
253
  if (!live.current) return;
231
254
  if (!r.ok) { setMsg({ error: true, text: hw(PUBLISH_ERRORS[r.error] || "errUnsaved") }); if (r.error === "conflict") await load(); return; }
232
255
  if (!on && r.remote === "pending") setMsg({ error: false, text: hw("withdrawPending") });
233
256
  if (r.pending) {
234
- const pending = { agent: row.agent, revision: row.revision, on };
257
+ const pending = { agent: row.agent, revision: row.revision, on, id: r.pending.id || null };
235
258
  setMsg({ error: false, text: hw("pendingSent"), pending });
236
259
  const settled = () => { if (live.current) { setMsg(current => current?.pending === pending ? null : current); load(); } };
237
260
  if (r.settled?.then) r.settled.then(settled, settled);
238
261
  }
239
262
  await load();
240
263
  } catch { if (live.current) setMsg({ error: true, text: hw("errUnsaved") }); }
241
- finally { if (live.current) setBusy(null); }
264
+ finally { busyRef.current = null; if (live.current) setBusy(null); }
242
265
  };
243
266
  // An older client's settled promise may be absent: the matching saved projection also retires the old hint.
244
267
  useEffect(() => {
@@ -254,23 +277,25 @@ function HubExposures({ client, pairing }) {
254
277
  ${rows && !rows.length ? html`<p class="note">${hw("noAgents")}</p>` : null}
255
278
  ${rows && rows.length ? html`<ul class="hub-exposure-list">${rows.map((row) => html`<li key=${row.agent} class=${`hub-exposure${row.state === "published" ? " is-shared" : ""}`}>
256
279
  <label class="hub-exposure-main">
257
- <input class="s-ui-toggle" type="checkbox" role="switch" checked=${row.state === "published"} aria-label=${hw("share", row.display)}
258
- disabled=${busy !== null || !!row.pending || row.state === "frozen" || (row.state !== "published" && !row.enforceable)}
280
+ <input class="s-ui-toggle" type="checkbox" role="switch" checked=${row.state === "published" && row.reason !== "hub_refused"} aria-label=${hw("share", row.display)}
281
+ disabled=${busy !== null || !!row.pending || row.state === "frozen" || row.reason === "hub_refused" || (row.state !== "published" && !row.enforceable)}
259
282
  onChange=${(e) => toggle(row, e.target.checked)} />
260
283
  <span class="hub-exposure-name">${row.display}${row.display !== row.agent ? html` <small><code>${row.agent}</code></small>` : null}</span>
261
284
  </label>
262
285
  ${row.pending ? html`<small class="hub-exposure-why hub-exposure-pending">${hw("waitingConfirm")}</small>`
263
286
  : row.state === "frozen" ? html`<small class="hub-exposure-why">${hw("frozen")}</small>`
264
287
  : !row.enforceable && row.state !== "published" ? html`<small class="hub-exposure-why">${hw(row.reason === "delivery_unavailable" ? "agentDeliveryUnavailable" : "agentNotShareable")}</small>`
288
+ : row.reason === "hub_refused" ? html`<small class="hub-exposure-why hub-exposure-refused">${hr("note")}
289
+ <button type="button" class="btn btn-sm" disabled=${busy !== null} onClick=${() => toggle(row, false)}>${hr("withdraw")}</button></small>`
265
290
  : row.reason === "republish_required" ? html`<small class="hub-exposure-why hub-exposure-republish">${hw("republishRequired")}
266
291
  <button type="button" class="btn btn-sm" disabled=${busy !== null} onClick=${() => toggle(row, true)}>${hw("shareAgain")}</button></small>`
267
292
  : row.policy && row.policy.dataView === AGENT_CHOICE.dataViewId ? html`<small class="hub-exposure-why">${hw("agentShared")}</small>`
268
293
  : row.policy ? html`<small class="hub-exposure-why">${hw("policy", row.policy.dataView, row.policy.tools.join(", ") || "—")}</small>` : null}
269
294
  ${!row.enforceable && row.state !== "frozen" && guidanceFor(row.reason)
270
295
  ? html`<small class="hub-exposure-why hub-provider-guidance">${hw(guidanceFor(row.reason))}</small>` : null}
271
- ${row.state === "published" && !row.pending && /^[a-f0-9-]{36}$/.test(row.exposureId || "") && safeWebOrigin(pairing)
296
+ ${row.state === "published" && row.reason !== "hub_refused" && !row.pending && /^[a-f0-9-]{36}$/.test(row.exposureId || "") && safeWebOrigin(pairing)
272
297
  ? html`<div class="field-row"><a class="btn btn-sm" href=${`${safeWebOrigin(pairing)}/ui/hub/exposures?agent=${encodeURIComponent(row.exposureId)}&grant=1`} target="_blank" rel="noopener noreferrer">${allowOnHubLabel()}</a></div>` : null}
273
298
  </li>`)}</ul>` : null}
274
- ${msg ? html`<p class=${msg.error ? "err" : "note"} role=${msg.error ? "alert" : "status"}>${msg.text}</p>` : null}
299
+ ${msg ? html`<p class=${msg.error ? "err" : "note"} role=${msg.error ? "alert" : "status"}>${msg.pending ? confirmPlace("share", pendingView(store, msg.pending.id)) : msg.text}</p>` : null}
275
300
  </div>`;
276
301
  }
@@ -16,7 +16,7 @@ register("settingsLayout", {
16
16
  "lead_web-dashboard": "Manage fleet-wide dashboard features, branding and resource limits.",
17
17
  lead_access: "Manage sign-in, web authority, guests and sharing.",
18
18
  lead_advanced: "Inspect and edit fleet configuration, with effective values kept separate.",
19
- lead_hub: "Connect this fleet to a team Hub, compare its fingerprint, and choose which agents to share there.",
19
+ lead_hub: "Connect this fleet to a team Hub and choose which agents to share there.",
20
20
  lead_notifications: "Choose when account usage reminders are sent, and to whom.",
21
21
  editor: "Configuration editor", effective: "Effective settings (read only)",
22
22
  aiAccounts: "AI accounts and keys", aiAccountsHint: "Connected AI accounts and supported provider keys on the AgEnD host. Windows CLI status is shown under Runtime.",
@@ -32,7 +32,7 @@ register("settingsLayout", {
32
32
  "lead_web-dashboard": "管理整個 Fleet 的網頁功能、品牌與資源限制。",
33
33
  lead_access: "管理登入、網頁授權、訪客與對外分享。",
34
34
  lead_advanced: "檢視與編輯 Fleet 設定,並區分目前生效的唯讀內容。",
35
- lead_hub: "將這個 Fleet 連線至團隊 Hub、比對指紋,並選擇要在那裡分享的 Agent。",
35
+ lead_hub: "將這個 Fleet 連接到團隊 Hub,並選擇要在那裡分享的 Agent。",
36
36
  lead_notifications: "設定帳號用量提醒的時機與傳送對象。",
37
37
  editor: "設定編輯器", effective: "生效設定(唯讀)",
38
38
  aiAccounts: "AI 帳號與金鑰", aiAccountsHint: "管理 AgEnD 主機上連接的 AI 帳號與支援的供應商金鑰;Windows CLI 狀態請到 Runtime 查看。",
@@ -168,6 +168,8 @@ register("settingsLayout", {
168
168
  "en": {
169
169
  "revDashboard_log": "Agent log tab",
170
170
  "revDashboardHint_log": "Show prompts, replies, tool steps and fleet events. Secrets are masked; public links can also see it. Enabling needs confirmation.",
171
+ "revDashboard_thinking": "Show thinking (admin only, off by default)",
172
+ "revDashboardHint_thinking": "Add the model's thinking to an agent's chat activity block and the Log. Only a signed-in admin receives it; never the public link or a guest. Also asks Claude Code to write thinking summaries, which can change what a turn costs.",
171
173
  "revDashboard_usagePub": "Usage over the public link",
172
174
  "revDashboardHint_usagePub": "Offer the fleet usage report over the temporary public link. Guests never see it.",
173
175
  "revDashboard_levels": "Office levels",
@@ -177,7 +179,6 @@ register("settingsLayout", {
177
179
  "revDetails": "Details",
178
180
  "revAccessPolicy": "Loosening access needs fleet administrator confirmation. Tightening applies at once.",
179
181
  "revLoginSessions": "Sign-in sessions",
180
- "revPublicSessionLimit": "Public-link sessions are capped at 8 hours, end after 30 minutes idle and never outlive the link.",
181
182
  "revSessionDetails": "Session rules and notifications",
182
183
  "revRelatedAccess": "Other access settings",
183
184
  "revRelatedGuests": "Choose who can sign in and which agents they see.",
@@ -207,6 +208,8 @@ register("settingsLayout", {
207
208
  "zh-TW": {
208
209
  "revDashboard_log": "Agent 紀錄分頁",
209
210
  "revDashboardHint_log": "顯示提示、回覆、工具步驟與 Fleet 事件;機密值會遮蔽,公開連結也看得到。開啟需確認。",
211
+ "revDashboard_thinking": "顯示思考(僅 admin,預設關閉)",
212
+ "revDashboardHint_thinking": "把模型的思考加進 Agent 聊天裡的活動區塊與紀錄分頁;只有登入的 admin 會收到,公開連結和訪客一律不會。同時會請 Claude Code 寫出思考摘要,這可能改變每一輪的花費。",
210
213
  "revDashboard_usagePub": "公開連結提供用量報告",
211
214
  "revDashboardHint_usagePub": "透過臨時公開連結提供 Fleet 用量報告;訪客一律看不到。",
212
215
  "revDashboard_levels": "辦公室等級",
@@ -216,7 +219,6 @@ register("settingsLayout", {
216
219
  "revDetails": "詳細說明",
217
220
  "revAccessPolicy": "放寬存取需要 Fleet 管理員確認;收緊的變更立即生效。",
218
221
  "revLoginSessions": "登入工作階段",
219
- "revPublicSessionLimit": "公開連結的工作階段最長 8 小時、閒置 30 分鐘登出,也不會超過連結期限。",
220
222
  "revSessionDetails": "工作階段與通知規則",
221
223
  "revRelatedAccess": "其他存取設定",
222
224
  "revRelatedGuests": "管理可登入的訪客與可見 Agent。",
@@ -0,0 +1,37 @@
1
+ // #3708: the words of the public link's own session limits (Settings → Access & security → Sign-in), in a file of their own
2
+ // for the reason settings-access-strings.js gives: settings-strings.js / settings-layout.js / settings-access-strings.js can
3
+ // already sit in an open tab from before the upgrade (Fleet and search import them), and the browser hands that old copy back
4
+ // to the new Settings page, so a key only a new copy had would read as the raw `settings.…` key. This file's URL is new.
5
+ // Every module that reads one of these keys imports it (panel-settings.js, settings-registry.js, search-dialog.js).
6
+ import { register } from "/assets/app-i18n.js";
7
+
8
+ register("settings", {
9
+ en: {
10
+ publicSessionTitle: "Over the public link",
11
+ publicSessionAbsolute: "Session length, hours (1–168)",
12
+ publicSessionIdle: "Sign out after unused for, minutes (5–1440)",
13
+ publicSessionAbsoluteRange: "Must be a number of hours from 1 to 168",
14
+ publicSessionIdleRange: "Must be a number of minutes from 5 to 1440",
15
+ publicSessionIdleOver: "Must not exceed the public link's session length",
16
+ publicSessionQuick: "quick tunnel: at most 8 h / 30 min",
17
+ publicSessionNeedsHostname: "Longer than 30 minutes unused or 8 hours in all needs a fixed hostname (a named tunnel, under Sharing). On a quick tunnel the address is new each time and anyone who gets it can reach the sign-in page, so these values can only shorten the limits there.",
18
+ publicSessionCeiling: "A session is also never longer than the account's own limits: an admin's the session length above, a guest's the guest settings. A link with an end time ends its sessions with it.",
19
+ publicSessionTip: "A longer limit keeps a browser signed in to your fleet from the internet for longer. If a phone is lost or a browser is left signed in on a shared computer, whoever holds it can act as you until the session ends. Keep it short unless you use the dashboard from a phone often, and remove a lost device under Devices. Shortening ends the sessions it now outlives at once; lengthening needs your confirmation.",
20
+ publicSessionHint: "For sign-ins at the dashboard's own address (this computer, the LAN, a tailnet). An admin's session over the public link also never lasts longer than these settings (a guest's follows the guest settings). Shortening ends the sessions it now outlives; lengthening applies to new sign-ins and to an existing one's idle time on its next use. Empty = the default.",
21
+ publicSessionLimitNote: "Public-link sessions have their own limits below (8 hours, 30 minutes unused by default) and never outlive the link.",
22
+ },
23
+ "zh-TW": {
24
+ publicSessionTitle: "透過公開連結",
25
+ publicSessionAbsolute: "登入時效,小時(1–168)",
26
+ publicSessionIdle: "閒置後登出,分鐘(5–1440)",
27
+ publicSessionAbsoluteRange: "必須是 1 到 168 之間的小時數",
28
+ publicSessionIdleRange: "必須是 5 到 1440 之間的分鐘數",
29
+ publicSessionIdleOver: "不能超過公開連結的登入時效",
30
+ publicSessionQuick: "臨時通道:最多 8 小時/30 分鐘",
31
+ publicSessionNeedsHostname: "要超過閒置 30 分鐘或總共 8 小時,需要固定網域(具名通道,在「分享」設定)。臨時通道每次網址都不同,拿到網址的人都能打開登入頁,所以在臨時通道上這兩個值只能縮短限制。",
32
+ publicSessionCeiling: "工作階段也不會超過該帳號本身的限制:管理員依上面的 session 時長,訪客依訪客設定。有結束時間的連結結束時,它的工作階段也一起結束。",
33
+ publicSessionTip: "限制越長,瀏覽器透過網際網路保持登入你的 fleet 的時間就越久。如果手機遺失,或在共用電腦上忘了登出,拿到它的人在工作階段結束前都能以你的身分操作。除非你常用手機開儀表板,否則建議保持短一點;裝置遺失時,請到「裝置」移除它。縮短會立刻結束已超過新限制的工作階段;延長需要你確認。",
34
+ publicSessionHint: "適用於從儀表板本身網址登入的 session(本機、區域網路、tailnet)。管理員透過公開連結的 session 也不會超過這裡的設定(訪客依訪客設定)。縮短會讓已超過新限制的 session 結束;延長會套用到新的登入,以及既有 session 下次使用時的閒置時間。留空 = 預設值。",
35
+ publicSessionLimitNote: "公開連結的工作階段有自己的限制(預設 8 小時、閒置 30 分鐘,見下方),也不會超過連結期限。",
36
+ },
37
+ });
@@ -8,6 +8,7 @@ import { navigate } from "/assets/app-nav.js";
8
8
  import "./settings-strings.js";
9
9
  import "./settings-shared-strings.js"; // search shows these labels from outside Settings (dailyTips, hangEnabled, crossInstanceVisibility)
10
10
  import "./settings-revoke-strings.js"; // settings.vaRevokeOthers, the revoke button's label (a file of its own: PR #3553 review)
11
+ import "./settings-public-session-strings.js"; // #3708: publicSessionAbsolute / publicSessionIdle (a file of its own)
11
12
  import "./settings-access-strings.js"; // …and this one (webLoginQr), added by Access & security (#3061)
12
13
  import "/assets/chat-strings.js";
13
14
  import { GUESTS_SETTINGS } from "./settings-guests.js";
@@ -85,6 +86,7 @@ const ROWS = [
85
86
  ["chat.classic-guilds", "chat", "#g-guilds", "settings.allowedGuilds", "classic.allowed_guilds", ["discord server", "guild", "allowed servers"], ["Discord 伺服器", "伺服器"]],
86
87
  // Fleet · Web dashboard
87
88
  ["dash.log-tab", "web-dashboard", "#webLogTab", "settings.webLogTab", "web.log_tab", ["log tab", "steps", "log"], ["Log 分頁", "紀錄", "步驟"]],
89
+ ["dash.log-thinking", "web-dashboard", "#webLogThinking", "settings.webLogThinking", "web.log_thinking", ["thinking", "activity", "chat timeline", "reasoning"], ["思考", "活動", "聊天時間軸"]],
88
90
  ["dash.usage-public", "web-dashboard", "#webUsagePublic", "settings.webUsagePublic", "web.usage_report_on_public_link", ["usage", "public link", "cost", "tokens"], ["用量", "公開連結", "費用"]],
89
91
  ["dash.preview-cdn", "web-dashboard", "#webPreviewCdn", "settings.webPreviewCdn", "web.preview_cdn", ["cdn", "libraries", "html preview", "chart", "jsdelivr", "cdnjs"], ["CDN", "函式庫", "HTML 預覽", "圖表"]],
90
92
  ["dash.office-levels", "web-dashboard", "#webOfficeLevels", "settings.webOfficeLevels", "web.office_levels", ["office", "level", "badge", "profile card"], ["辦公室", "等級", "徽章", "名片"]],
@@ -94,6 +96,8 @@ const ROWS = [
94
96
  // Fleet · Access & security
95
97
  ["access.session-absolute", "access", "#webSessionAbsolute", "settings.sessionAbsolute", "web.session.local.absolute_hours", ["session", "sign in", "hours", "expire", "logout"], ["session", "登入", "時數", "到期"]],
96
98
  ["access.session-idle", "access", "#webSessionIdle", "settings.sessionIdle", "web.session.local.idle_hours", ["session", "idle", "unused", "hours"], ["session", "閒置", "時數"]],
99
+ ["access.public-session-absolute", "access", "#webPublicSessionAbsolute", "settings.publicSessionAbsolute", "web.session.public_link.absolute_hours", ["session", "public link", "tunnel", "hours", "expire"], ["session", "公開連結", "登入時效", "時數"]],
100
+ ["access.public-session-idle", "access", "#webPublicSessionIdle", "settings.publicSessionIdle", "web.session.public_link.idle_minutes", ["session", "public link", "idle", "unused", "minutes", "phone"], ["session", "公開連結", "閒置", "分鐘", "手機"]],
97
101
  ["access.terminal", "access", "#webTerminalEnabled", "settings.webTerminalEnabled", "web_terminal.enabled", ["browser terminal", "terminal", "login", "shell"], ["瀏覽器終端機", "終端機", "登入"]],
98
102
  ["access.terminal-ttl", "access", "#webTerminalTtl", "settings.webTerminalTtl", "web_terminal.ttl_minutes", ["terminal minutes", "terminal", "ttl"], ["終端機", "分鐘"]],
99
103
  ["access.public-link", "access", "#publicWebLink", "settings.publicLink", "web.public_link.allow_public", ["public link", "share", "tunnel", "cloudflare", "trycloudflare"], ["公開連結", "分享", "tunnel"]],
@@ -47,6 +47,7 @@ register("settings", {
47
47
  webPreviewCdn: "HTML previews may load libraries from cdnjs / jsDelivr",
48
48
  webPreviewCdnHint: "The page's scripts may load libraries from cdnjs (/ajax/libs/) and jsDelivr (/npm/); those requests leave this machine, so the CDN sees them, and a page could use them to send data out. Scripts, styles and fonts only — a preview still cannot fetch or post anything. Off by default; applies to the next preview started, on the public link too.",
49
49
  webUsagePublic: "Usage report over the public link", webUsagePublicHint: "Fleet → Usage (up to 400 days of each agent's tokens, requests, messages and API-equivalent amounts) is offered over the temporary public link too. Off by default; guests never see it. Applies at once.",
50
+ webLogThinking: "Show thinking (admin only, off by default)", webLogThinkingHint: "Adds the model's thinking to an agent's chat activity block (the block itself follows each agent's tool progress setting) and to the Log. Claude Code: AgEnD then also asks it to write thinking summaries, which apply from the agent's next start and can change what a turn costs. Only a signed-in admin on this dashboard ever receives it — never the public link or a guest. Thinking can hold things a person would not say aloud; secret values are still masked. While this is off, Claude's settings are left alone.",
50
51
  webLogTab: "Log tab: each agent's steps", webLogTabHint: "Shows each instance's prompts, replies, tool calls and results, and fleet events in its Log tab, read from its own transcript only while the tab is open. Secret values are masked. Also over the public link. Turning it on waits for a fleet admin's confirmation.",
51
52
  general: "General Settings",
52
53
  advanced: "Advanced",
@@ -517,7 +518,6 @@ register("settings", {
517
518
  webLead: "How the web dashboard behaves. A change that loosens access (longer sessions, the browser terminal back on or for longer, the public link) waits for a fleet admin to confirm it: in General in Telegram or Discord, or here on the dashboard where its card offers that; one that tightens it applies at once.",
518
519
  webPublicRefused: "Web settings can't be changed over a public link. Open the dashboard at its own address to change them.",
519
520
  webSessionTitle: "Sign-in sessions",
520
- webSessionHint: "For sign-ins at the dashboard's own address (this computer, the LAN, a tailnet). Over a public link (a temporary one or your permanent link), a session lasts at most 8 h, ends after 30 min idle and never outlives the link; an admin's also never lasts longer than these settings (a guest's follows the guest settings). Shortening ends the sessions it now outlives; lengthening applies to new sign-ins and to an existing one's idle time on its next use. Empty = the default.",
521
521
  sessionAbsolute: "Session length, hours (1–720)",
522
522
  sessionIdle: "Sign out after unused for, hours (1–720)",
523
523
  sessionRange: "Must be a number of hours from 1 to 720",
@@ -733,6 +733,7 @@ register("settings", {
733
733
  webPreviewCdn: "HTML 預覽可從 cdnjs / jsDelivr 載入函式庫",
734
734
  webPreviewCdnHint: "頁面的指令碼可以從 cdnjs(/ajax/libs/)和 jsDelivr(/npm/)載入函式庫;這些請求會離開這台電腦,CDN 會看到它們,頁面也可能藉此把資料傳出去。只限指令碼、樣式與字型——預覽仍然無法擷取或送出任何資料。預設關閉;之後開始的預覽才會套用,公開連結也一樣。",
735
735
  webUsagePublic: "透過公開連結提供用量報告", webUsagePublicHint: "Fleet → 用量(最多 400 天、每個 agent 的 token、請求、訊息與依牌價換算的 API 等值)也會透過臨時公開連結提供。預設關閉;訪客一律看不到。變更立即生效。",
736
+ webLogThinking: "顯示思考(僅 admin,預設關閉)", webLogThinkingHint: "把模型的思考加進 Agent 聊天裡的活動區塊(區塊本身依各 Agent 的工具進度設定決定)與紀錄分頁。Claude Code:開啟後 AgEnD 也會請它寫出思考摘要,從該 Agent 下次啟動起生效,並可能改變每一輪的花費。只有在這個儀表板登入的 admin 才會收到——公開連結和訪客一律不會。思考可能包含人不會直接說出口的內容;機密值仍會遮蔽。關閉時不會動 Claude 的設定。",
736
737
  webLogTab: "紀錄分頁:每個 agent 的步驟", webLogTabHint: "在每個 Agent 的「紀錄」分頁顯示提示、回覆、工具呼叫與結果,以及 fleet 事件;只在分頁開著時從它自己的對話紀錄讀取。機密值會遮蔽。公開連結也看得到。開啟需 fleet admin 確認。",
737
738
  general: "一般設定",
738
739
  advanced: "進階",
@@ -1176,7 +1177,6 @@ register("settings", {
1176
1177
  webLead: "網頁儀表板的行為。放寬存取的變更(延長 session、重新開啟或延長瀏覽器終端機、公開連結)需要 fleet admin 確認:在 Telegram 或 Discord 的 General,或在儀表板上卡片提供確認的地方;收緊的變更會立即套用。",
1177
1178
  webPublicRefused: "無法透過公開連結變更網頁設定。請從儀表板本身的網址開啟後再變更。",
1178
1179
  webSessionTitle: "登入 session",
1179
- webSessionHint: "適用於從儀表板本身網址登入的 session(本機、區域網路、tailnet)。透過公開連結(臨時連結或你的固定網域)的 session 最長 8 小時、閒置 30 分鐘就結束,也不會超過連結本身;管理員的 session 也不會超過這裡的設定(訪客依訪客設定)。縮短會讓已超過新限制的 session 結束;延長會套用到新的登入,以及既有 session 下次使用時的閒置時間。留空 = 預設值。",
1180
1180
  sessionAbsolute: "Session 時長,小時(1–720)",
1181
1181
  sessionIdle: "閒置多久後登出,小時(1–720)",
1182
1182
  sessionRange: "必須是 1 到 720 之間的小時數",
@@ -340,8 +340,8 @@ export function signInHref() {
340
340
 
341
341
  // ── AgEnD Hub P1 (docs/design/hub-ui-client.md): the page's mark, set by the listener that served it ──
342
342
  register("hubShell", {
343
- en: { brand: "AgEnD Hub", ask: "Ask", exposures: "My exposures", admin: "Administration" },
344
- "zh-TW": { brand: "AgEnD Hub", ask: "提問", exposures: "我的公開 Agent", admin: "管理" },
343
+ en: { brand: "AgEnD Hub", ask: "Ask", exposures: "My shared agents", admin: "Administration" },
344
+ "zh-TW": { brand: "AgEnD Hub", ask: "提問", exposures: "我分享的 Agent", admin: "管理" },
345
345
  });
346
346
  function hubMarks() {
347
347
  const tokens = String((typeof document !== "undefined" && document.body?.dataset?.hub) || "").split(/\s+/);
@@ -543,6 +543,8 @@ export function PanelHeader({ title, sub, children, headingRef, nav, notice, pag
543
543
  const admin = useCanCreate();
544
544
  const canCreate = admin && !!newInstanceOpener;
545
545
  const pane = paneContext.usePane?.();
546
+ if (!pane && shell.popout && openInstanceOf(navStore.get().route) && shell.popoutHeader) return html`<${shell.popoutHeader} title=${title} sub=${sub} headingRef=${headingRef} nav=${nav}
547
+ notice=${notice} pageControls=${pageControls} pageActions=${pageActions} />`;
546
548
  if (pane?.Header) return html`<${pane.Header} title=${title} sub=${sub} headingRef=${headingRef} nav=${nav} notice=${notice}
547
549
  pageControls=${pageControls} pageActions=${pageActions} />`;
548
550
  return html`<header data-trust="header" class=${`panel-head${shell.collapsed ? " collapsed" : ""}`}>
@@ -669,7 +671,7 @@ register("pendingSummary", {
669
671
  "hub.run.stop": "Stop this fleet's Hub and pause chats with shared agents. Valid sign-ins can resume when it runs again. Nothing is deleted.",
670
672
  "hub.preview.on": "Serve HTML previews on this Hub at port {0}.",
671
673
  "hub.preview.off": "Stop serving HTML previews on this Hub.",
672
- "hub.membership.enable": "Enable this fleet's Hub membership. Pairing and sharing an agent are separate choices.",
674
+ "hub.membership.enable": "Enable this fleet's Hub membership. Connecting and sharing an agent are separate choices.",
673
675
  "hub.membership.disable": "Disable this fleet's Hub membership. New Hub work and answer disclosure stop; existing agent conversations remain.",
674
676
  "hub.companyJoin.confirm": "Connect this Fleet to Hub {0} using your company account. Agent sharing stays separate.",
675
677
  "hub.companyJoin.repair": "Replace the saved identity of Hub {0} using the new company link. This does not connect a Fleet.",
@@ -682,7 +684,7 @@ register("pendingSummary", {
682
684
  "hub.pairing.summary.connect": "Connect this fleet to the Hub at {0}",
683
685
  "hub.pairing.summary.approval": "It asks the Hub's owner and administrator to approve it",
684
686
  "hub.pairing.summary.confirm": "Confirm the pairing fingerprint for {0}",
685
- "hub.pairing.summary.disconnect": "Disconnect this fleet from the Hub at {0} ({1}, pairing {2})",
687
+ "hub.pairing.summary.disconnect": "Remove this fleet's connection to the Hub at {0} ({1}, connection {2})",
686
688
  "hub.pairing.summary.withdraw": "Every agent shared there is withdrawn; the Hub's administrator revokes the fleet there",
687
689
  "settings_confirm.summary.default": "default", "settings_confirm.summary.absent": "absent", "settings_confirm.summary.fingerprint": "fingerprint",
688
690
  "settings_confirm.summary.text_chars": "{0} characters", "settings_confirm.summary.text_none": "not set",
@@ -710,7 +712,7 @@ register("pendingSummary", {
710
712
  "hub.run.stop": "停止這個 Fleet 的 Hub,暫停與分享的 Agent 的對話。再次執行後,仍有效的登入狀態可以恢復。不會刪除任何資料。",
711
713
  "hub.preview.on": "在這個 Hub 的連接埠 {0} 提供 HTML 預覽。",
712
714
  "hub.preview.off": "停止在這個 Hub 提供 HTML 預覽。",
713
- "hub.membership.enable": "啟用這個 Fleet 的 Hub 成員功能。配對與分享 Agent 需另外選擇。",
715
+ "hub.membership.enable": "啟用這個 Fleet 的 Hub 成員功能。連接與分享 Agent 需另外選擇。",
714
716
  "hub.membership.disable": "停用這個 Fleet 的 Hub 成員功能。停止新的 Hub 工作與回答傳送;既有 Agent 對話會保留。",
715
717
  "hub.companyJoin.confirm": "以公司帳號將這個 Fleet 連接到 Hub {0}。分享 Agent 需另外選擇。",
716
718
  "hub.companyJoin.repair": "使用新的公司連結,更換 Hub {0} 已儲存的身分。這項操作不會連接 Fleet。",
@@ -723,7 +725,7 @@ register("pendingSummary", {
723
725
  "hub.pairing.summary.connect": "將這個 Fleet 連接到 {0} 的 Hub",
724
726
  "hub.pairing.summary.approval": "需要 Hub 的擁有者與管理員核准",
725
727
  "hub.pairing.summary.confirm": "確認 {0} 的配對指紋",
726
- "hub.pairing.summary.disconnect": "中斷這個 Fleet 與 {0} 的 Hub 連接({1},配對 {2})",
728
+ "hub.pairing.summary.disconnect": "移除這個 Fleet 與 {0} 的 Hub 連接({1},連接 {2})",
727
729
  "hub.pairing.summary.withdraw": "撤下所有分享到該 Hub 的 Agent;由 Hub 管理員在該處撤銷這個 Fleet",
728
730
  "settings_confirm.summary.default": "預設", "settings_confirm.summary.absent": "未設定", "settings_confirm.summary.fingerprint": "指紋",
729
731
  "settings_confirm.summary.text_chars": "{0} 字", "settings_confirm.summary.text_none": "未設定",
@@ -1246,10 +1248,11 @@ export function Shell({ panels, onNewInstance, viewOnly = false }) {
1246
1248
  const guest = guestPage(); // #1920: a guest's page — no operations, pending changes or owner CSS (#2855: usage, yes)
1247
1249
  // AgEnD Hub P1 (S3b): a Hub workspace has none of the fleet's lines, rails, tabs or bars (their endpoints are the fleet's).
1248
1250
  const hub = hubMarks().hub;
1249
- const cls = ["shell", shell.collapsed ? "sb-collapsed" : "", shell.drawer ? "sb-open" : "", shell.keyboard ? "kb-open" : "", guest ? "guest" : ""].filter(Boolean).join(" ");
1251
+ const popout = shell.popout === true && !!openInstanceOf(nav.route);
1252
+ const cls = ["shell", popout ? "chat-popout" : "", shell.collapsed ? "sb-collapsed" : "", shell.drawer ? "sb-open" : "", shell.keyboard ? "kb-open" : "", guest ? "guest" : ""].filter(Boolean).join(" ");
1250
1253
  return html`<div ref=${root} class=${cls}>
1251
1254
  <a data-trust="navigation" class="skip" href="#main">${t("app.skip")}</a>
1252
- <${Sidebar} route=${nav.route} onNewInstance=${onNewInstance} viewOnly=${viewOnly} />
1255
+ ${popout ? null : html`<${Sidebar} route=${nav.route} onNewInstance=${onNewInstance} viewOnly=${viewOnly} />`}
1253
1256
  <div class="scrim" onClick=${closeDrawer} aria-hidden="true"></div>
1254
1257
  <main id="main" class="main" tabindex="-1" inert=${shell.drawer && narrow() ? true : undefined}>
1255
1258
  <${ConnectionLine} />
@@ -1261,8 +1264,8 @@ export function Shell({ panels, onNewInstance, viewOnly = false }) {
1261
1264
  ${viewOnly || guest || hub || !shell.banner ? null : html`<${shell.banner} />`}
1262
1265
  ${shell.workspaceHost ? html`<${shell.workspaceHost} nav=${nav} panels=${panels} />` : html`<${Outlet} route=${nav.route} seq=${nav.seq} panels=${panels} />`}
1263
1266
  </main>
1264
- ${hub ? null : html`<${RightRail} route=${nav.route} />`}
1265
- ${hub ? null : html`<${BottomTabs} route=${nav.route} viewOnly=${viewOnly} />`}
1267
+ ${hub || popout ? null : html`<${RightRail} route=${nav.route} />`}
1268
+ ${hub || popout ? null : html`<${BottomTabs} route=${nav.route} viewOnly=${viewOnly} />`}
1266
1269
  ${shell.dialog ? html`<${shell.dialog.Component} ...${shell.dialog.props} onClose=${closeDialog} />` : null}
1267
1270
  ${viewOnly || guest || hub || (nav.route && nav.route.panel === "settings") ? null : html`<${PendingChanges} />`}
1268
1271
  <${ConfirmHost} />
@@ -1271,3 +1274,6 @@ export function Shell({ panels, onNewInstance, viewOnly = false }) {
1271
1274
  <${Toasts} />
1272
1275
  </div>`;
1273
1276
  }
1277
+
1278
+ // Optional presentation handshake: retained shells keep their ordinary single-chat frame.
1279
+ Shell.popoutVersion = 1;