@songsid/agend 2.3.5-alpha.6 → 2.3.5-alpha.8
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.
- package/dist/accounts-view.d.ts +17 -0
- package/dist/accounts-view.js +33 -6
- package/dist/accounts-view.js.map +1 -1
- package/dist/apply-job.d.ts +5 -0
- package/dist/apply-job.js +10 -3
- package/dist/apply-job.js.map +1 -1
- package/dist/auth-api.d.ts +1 -1
- package/dist/auth-api.js +15 -2
- package/dist/auth-api.js.map +1 -1
- package/dist/authority/web-authority.d.ts +13 -0
- package/dist/authority/web-authority.js +12 -0
- package/dist/authority/web-authority.js.map +1 -1
- package/dist/backend/claude-code.js +47 -9
- package/dist/backend/claude-code.js.map +1 -1
- package/dist/backend/kiro.js +1 -1
- package/dist/backend/kiro.js.map +1 -1
- package/dist/build-provenance.json +1 -1
- package/dist/channel/access-manager.d.ts +1 -6
- package/dist/channel/access-manager.js +4 -94
- package/dist/channel/access-manager.js.map +1 -1
- package/dist/channel/adapters/discord.d.ts +0 -2
- package/dist/channel/adapters/discord.js +0 -8
- package/dist/channel/adapters/discord.js.map +1 -1
- package/dist/channel/adapters/telegram.d.ts +0 -3
- package/dist/channel/adapters/telegram.js +1 -30
- package/dist/channel/adapters/telegram.js.map +1 -1
- package/dist/channel/types.d.ts +0 -2
- package/dist/cli.js +1 -19
- package/dist/cli.js.map +1 -1
- package/dist/config-validator.js +2 -1
- package/dist/config-validator.js.map +1 -1
- package/dist/fleet-manager.d.ts +84 -3
- package/dist/fleet-manager.js +494 -51
- package/dist/fleet-manager.js.map +1 -1
- package/dist/general-knowledge/skills/concepts/SKILL.md +22 -7
- package/dist/general-knowledge/steering/core-rules.md +7 -5
- package/dist/hub/buttons.js +4 -2
- package/dist/hub/buttons.js.map +1 -1
- package/dist/hub/catalog.d.ts +2 -2
- package/dist/hub/catalog.js +233 -48
- package/dist/hub/catalog.js.map +1 -1
- package/dist/hub/client.js +2 -0
- package/dist/hub/client.js.map +1 -1
- package/dist/hub/compose/member.d.ts +6 -0
- package/dist/hub/compose/member.js +9 -1
- package/dist/hub/compose/member.js.map +1 -1
- package/dist/hub/compose/server.d.ts +11 -1
- package/dist/hub/compose/server.js +70 -3
- package/dist/hub/compose/server.js.map +1 -1
- package/dist/hub/directory/directory.d.ts +1 -1
- package/dist/hub/directory/directory.js +32 -23
- package/dist/hub/directory/directory.js.map +1 -1
- package/dist/hub/directory/index.d.ts +1 -1
- package/dist/hub/directory/types.d.ts +8 -2
- package/dist/hub/directory/types.js.map +1 -1
- package/dist/hub/group-policy/admin-api.d.ts +30 -0
- package/dist/hub/group-policy/admin-api.js +83 -0
- package/dist/hub/group-policy/admin-api.js.map +1 -0
- package/dist/hub/group-policy/admin-context.d.ts +23 -0
- package/dist/hub/group-policy/admin-context.js +52 -0
- package/dist/hub/group-policy/admin-context.js.map +1 -0
- package/dist/hub/group-policy/admin-control.d.ts +34 -0
- package/dist/hub/group-policy/admin-control.js +258 -0
- package/dist/hub/group-policy/admin-control.js.map +1 -0
- package/dist/hub/group-policy/admin-dto.d.ts +243 -0
- package/dist/hub/group-policy/admin-dto.js +55 -0
- package/dist/hub/group-policy/admin-dto.js.map +1 -0
- package/dist/hub/group-policy/admin-facts.d.ts +17 -0
- package/dist/hub/group-policy/admin-facts.js +33 -0
- package/dist/hub/group-policy/admin-facts.js.map +1 -0
- package/dist/hub/group-policy/admin-impact.d.ts +51 -0
- package/dist/hub/group-policy/admin-impact.js +88 -0
- package/dist/hub/group-policy/admin-impact.js.map +1 -0
- package/dist/hub/group-policy/admin-inventory.d.ts +24 -0
- package/dist/hub/group-policy/admin-inventory.js +72 -0
- package/dist/hub/group-policy/admin-inventory.js.map +1 -0
- package/dist/hub/group-policy/admin-read.d.ts +21 -0
- package/dist/hub/group-policy/admin-read.js +90 -0
- package/dist/hub/group-policy/admin-read.js.map +1 -0
- package/dist/hub/group-policy/authorization.d.ts +60 -0
- package/dist/hub/group-policy/authorization.js +292 -0
- package/dist/hub/group-policy/authorization.js.map +1 -0
- package/dist/hub/group-policy/impact-inventory.d.ts +21 -0
- package/dist/hub/group-policy/impact-inventory.js +75 -0
- package/dist/hub/group-policy/impact-inventory.js.map +1 -0
- package/dist/hub/group-policy/resources.d.ts +22 -2
- package/dist/hub/group-policy/resources.js +119 -25
- package/dist/hub/group-policy/resources.js.map +1 -1
- package/dist/hub/group-policy/store.d.ts +19 -2
- package/dist/hub/group-policy/store.js +66 -5
- package/dist/hub/group-policy/store.js.map +1 -1
- package/dist/hub/group-policy/welcome.d.ts +36 -0
- package/dist/hub/group-policy/welcome.js +55 -0
- package/dist/hub/group-policy/welcome.js.map +1 -0
- package/dist/hub/http/compose.d.ts +2 -0
- package/dist/hub/http/compose.js +133 -12
- package/dist/hub/http/compose.js.map +1 -1
- package/dist/hub/http/core.d.ts +23 -3
- package/dist/hub/http/core.js +138 -5
- package/dist/hub/http/core.js.map +1 -1
- package/dist/hub/http/deps.d.ts +10 -0
- package/dist/hub/member/pairing-api.d.ts +2 -0
- package/dist/hub/member/pairing-api.js +1 -0
- package/dist/hub/member/pairing-api.js.map +1 -1
- package/dist/hub/member/pairing-notices.d.ts +18 -0
- package/dist/hub/member/pairing-notices.js +58 -0
- package/dist/hub/member/pairing-notices.js.map +1 -0
- package/dist/hub/pairing-notices.d.ts +47 -0
- package/dist/hub/pairing-notices.js +241 -0
- package/dist/hub/pairing-notices.js.map +1 -0
- package/dist/hub/pairing.d.ts +33 -1
- package/dist/hub/pairing.js +315 -15
- package/dist/hub/pairing.js.map +1 -1
- package/dist/hub/policy.d.ts +3 -1
- package/dist/hub/policy.js +13 -6
- package/dist/hub/policy.js.map +1 -1
- package/dist/hub/protocol.d.ts +32 -0
- package/dist/hub/protocol.js +6 -1
- package/dist/hub/protocol.js.map +1 -1
- package/dist/hub/rooms.d.ts +1 -0
- package/dist/hub/rooms.js +76 -26
- package/dist/hub/rooms.js.map +1 -1
- package/dist/hub/runtime.d.ts +4 -1
- package/dist/hub/runtime.js +11 -0
- package/dist/hub/runtime.js.map +1 -1
- package/dist/hub/server.js +4 -0
- package/dist/hub/server.js.map +1 -1
- package/dist/hub/sessions.js +2 -1
- package/dist/hub/sessions.js.map +1 -1
- package/dist/hub/store.d.ts +10 -1
- package/dist/hub/store.js +7 -4
- package/dist/hub/store.js.map +1 -1
- package/dist/hub/types.d.ts +15 -2
- package/dist/locale.js +48 -36
- package/dist/locale.js.map +1 -1
- package/dist/login-controller.d.ts +9 -1
- package/dist/login-controller.js +20 -1
- package/dist/login-controller.js.map +1 -1
- package/dist/login-flows.js +4 -2
- package/dist/login-flows.js.map +1 -1
- package/dist/office-share-page.js +1 -1
- package/dist/office-share-page.js.map +1 -1
- package/dist/outbound-handlers.js +1 -1
- package/dist/outbound-handlers.js.map +1 -1
- package/dist/quickstart-api.js +2 -2
- package/dist/quickstart-api.js.map +1 -1
- package/dist/reply-buttons-controller.d.ts +5 -1
- package/dist/reply-buttons-controller.js +8 -4
- package/dist/reply-buttons-controller.js.map +1 -1
- package/dist/reply-buttons.d.ts +6 -2
- package/dist/reply-buttons.js +7 -3
- package/dist/reply-buttons.js.map +1 -1
- package/dist/runtime-api.js +10 -2
- package/dist/runtime-api.js.map +1 -1
- package/dist/settings-api.d.ts +2 -1
- package/dist/settings-api.js +7 -5
- package/dist/settings-api.js.map +1 -1
- package/dist/settings-change.d.ts +10 -0
- package/dist/settings-change.js +17 -1
- package/dist/settings-change.js.map +1 -1
- package/dist/settings-confirmation.d.ts +25 -1
- package/dist/settings-confirmation.js +11 -3
- package/dist/settings-confirmation.js.map +1 -1
- package/dist/settings-effect.js +18 -6
- package/dist/settings-effect.js.map +1 -1
- package/dist/settings-http-confirmation.d.ts +21 -0
- package/dist/settings-http-confirmation.js +74 -3
- package/dist/settings-http-confirmation.js.map +1 -1
- package/dist/signin-keepalive.d.ts +2 -0
- package/dist/signin-keepalive.js +30 -2
- package/dist/signin-keepalive.js.map +1 -1
- package/dist/structured-signin.js +3 -1
- package/dist/structured-signin.js.map +1 -1
- package/dist/tips.js +4 -4
- package/dist/tips.js.map +1 -1
- package/dist/types.d.ts +2 -0
- package/dist/types.js.map +1 -1
- package/dist/ui/accounts-keepalive.js +14 -8
- package/dist/ui/accounts-manage.js +31 -13
- package/dist/ui/accounts-view.js +93 -35
- package/dist/ui/backend-signin.js +22 -4
- package/dist/ui/general-location.js +28 -14
- package/dist/ui/hub-chat-store.js +2 -1
- package/dist/ui/hub-client.js +43 -3
- package/dist/ui/hub-grant-strings.js +13 -0
- package/dist/ui/hub-group-policy.js +170 -0
- package/dist/ui/hub-group-strings.js +97 -0
- package/dist/ui/hub-owner-strings.js +6 -2
- package/dist/ui/hub-pairing-progress-strings.js +15 -0
- package/dist/ui/hub-quick-pairing.js +202 -0
- package/dist/ui/hub-quick-strings.js +43 -0
- package/dist/ui/hub-read-strings.js +7 -0
- package/dist/ui/hub-strings.js +4 -2
- package/dist/ui/hub-welcome.js +99 -0
- package/dist/ui/panel-hub.js +115 -33
- package/dist/ui/panel-log.js +2 -2
- package/dist/ui/panel-runtimes.js +14 -6
- package/dist/ui/panel-settings.js +12 -21
- package/dist/ui/runtime-cli-install.js +24 -4
- package/dist/ui/settings-apply.js +12 -5
- package/dist/ui/settings-confirm.js +28 -0
- package/dist/ui/settings-devices.js +8 -12
- package/dist/ui/settings-dialogs.js +3 -1
- package/dist/ui/settings-hub-membership.js +24 -10
- package/dist/ui/settings-hub-section.js +60 -0
- package/dist/ui/settings-hub.js +58 -13
- package/dist/ui/settings-layout.js +6 -2
- package/dist/ui/settings-named-test.js +2 -2
- package/dist/ui/settings-outside.js +1 -1
- package/dist/ui/settings-quota-notice.js +8 -6
- package/dist/ui/settings-registry.js +3 -0
- package/dist/ui/settings-restart-strings.js +17 -0
- package/dist/ui/settings-strings.js +12 -10
- package/dist/ui/shared/accounts-keepalive.css +11 -6
- package/dist/ui/shared/accounts.css +68 -18
- package/dist/ui/shared/app-i18n.js +7 -2
- package/dist/ui/shared/app-route.js +1 -1
- package/dist/ui/shared/app-shell.js +114 -7
- package/dist/ui/shared/app.css +16 -0
- package/dist/ui/shared/chat-strings.js +8 -8
- package/dist/ui/shared/hub-groups.css +26 -0
- package/dist/ui/shared/hub-owner.css +2 -2
- package/dist/ui/shared/hub-signin.css +24 -0
- package/dist/ui/shared/hub.css +1 -0
- package/dist/ui/shared/setup-host-text.js +4 -1
- package/dist/ui/shared/signin.js +3 -1
- package/dist/ui/shared/usage-dialog.js +3 -72
- package/dist/ui/shared/usage-meter.js +84 -0
- package/dist/ui/shared/view-strings.js +4 -4
- package/dist/ui/shared/web-authorize.js +4 -4
- package/dist/ui/structured-signin.js +16 -8
- package/dist/update-marker.d.ts +2 -0
- package/dist/update-marker.js.map +1 -1
- package/dist/usage/providers.d.ts +1 -0
- package/dist/usage/providers.js +13 -9
- package/dist/usage/providers.js.map +1 -1
- package/dist/web-api.d.ts +10 -1
- package/dist/web-api.js +40 -11
- package/dist/web-api.js.map +1 -1
- package/dist/web-backend-login.d.ts +16 -2
- package/dist/web-backend-login.js +14 -0
- package/dist/web-backend-login.js.map +1 -1
- package/dist/web-notices.d.ts +9 -0
- package/dist/web-notices.js +19 -0
- package/dist/web-notices.js.map +1 -1
- package/dist/web-remote-access.d.ts +6 -0
- package/dist/web-remote-access.js +10 -1
- package/dist/web-remote-access.js.map +1 -1
- package/dist/web-shell-routes.d.ts +1 -1
- package/dist/web-shell-routes.js +1 -1
- package/dist/web-shell-routes.js.map +1 -1
- package/dist/web-terminal.d.ts +7 -0
- package/dist/web-terminal.js +14 -2
- package/dist/web-terminal.js.map +1 -1
- package/dist/windows-cli-api.d.ts +8 -0
- package/dist/windows-cli-api.js +10 -0
- package/dist/windows-cli-api.js.map +1 -1
- package/package.json +2 -1
package/dist/ui/hub-strings.js
CHANGED
|
@@ -5,13 +5,14 @@ import { register, t } from "/assets/app-i18n.js";
|
|
|
5
5
|
|
|
6
6
|
register("hub", {
|
|
7
7
|
en: {
|
|
8
|
+
allowOnHub: "Allow someone to ask…",
|
|
8
9
|
preview: "Preview: the Hub connection isn't available in this build yet, so nothing here leaves this page.",
|
|
9
10
|
// The member's switcher
|
|
10
11
|
myFleet: "My fleet", hub: "Hub", openHubTab: "Open {0} in a new tab", switcher: "Workspace",
|
|
11
12
|
// The Hub's own pages
|
|
12
13
|
askTitle: "Ask", askEmpty: "No agents you can ask yet", askHint: "When an owner shares an agent with you, it appears here with who allowed it.",
|
|
13
14
|
exposuresTitle: "My exposures", exposuresEmpty: "You don't share any agents yet",
|
|
14
|
-
exposuresHint: "Share an agent from your own fleet: Settings →
|
|
15
|
+
exposuresHint: "Share an agent from your own fleet: Settings → Hub → Connect to a Hub.",
|
|
15
16
|
adminTitle: "Administration",
|
|
16
17
|
// The Hub workspace (S3b): sign-in, Ask, My exposures, Administration
|
|
17
18
|
signedOutHub: "Not signed in", signOut: "Sign out", signInTitle: "Sign in to the Hub",
|
|
@@ -79,11 +80,12 @@ register("hub", {
|
|
|
79
80
|
errNotPaired: "Connect to a Hub first.", withdrawPending: "Withdrawn here. The Hub will be told when it can be reached.",
|
|
80
81
|
},
|
|
81
82
|
"zh-TW": {
|
|
83
|
+
allowOnHub: "允許他人提問…",
|
|
82
84
|
preview: "預覽:這個版本還不能真正連線到 Hub,這裡的操作不會離開這個頁面。",
|
|
83
85
|
myFleet: "我的 Fleet", hub: "Hub", openHubTab: "在新分頁開啟 {0}", switcher: "工作區",
|
|
84
86
|
askTitle: "提問", askEmpty: "目前還沒有你可以提問的 Agent", askHint: "有人把 Agent 開放給你之後,它會出現在這裡,並註明是誰授權的。",
|
|
85
87
|
exposuresTitle: "我的公開 Agent", exposuresEmpty: "你還沒有公開任何 Agent",
|
|
86
|
-
exposuresHint: "請在自己的 Fleet 公開 Agent:設定 →
|
|
88
|
+
exposuresHint: "請在自己的 Fleet 公開 Agent:設定 → Hub → 連線到 Hub。",
|
|
87
89
|
adminTitle: "管理",
|
|
88
90
|
signedOutHub: "尚未登入", signOut: "登出", signInTitle: "登入 Hub",
|
|
89
91
|
signInLead: "請使用組織帳號登入。密碼只送給目錄服務驗證,不會被保存。",
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
// #3298 S-89: the signed-in welcome on a Hub with group permissions — two large entries, "Chat with an agent" and "Connect your
|
|
2
|
+
// fleet", shaped by what this person may do now (no actions / ask only / full). It is a DISPLAY of the server's welcome
|
|
3
|
+
// projection (GET /hub/v1/me/welcome): it grants nothing, and every chat, pairing or sharing action asks the server again.
|
|
4
|
+
// An answer the directory couldn't give is "can't be checked right now" with Retry, never a cached yes. Shared components:
|
|
5
|
+
// PageHead, card, btn, tag, note, Skeleton/ErrorState; the two cards sit in .hub-welcome (hub.css: a two-up grid, one column
|
|
6
|
+
// on a phone).
|
|
7
|
+
import { html, useEffect, useRef, useState } from "/assets/app-html.js";
|
|
8
|
+
import { PageHead } from "/assets/page-head.js";
|
|
9
|
+
import { ErrorState, Skeleton } from "/assets/ui-states.js";
|
|
10
|
+
import { navigate } from "/assets/app-nav.js";
|
|
11
|
+
import { hubClient, hubName } from "./hub-client.js";
|
|
12
|
+
import { hg } from "./hub-group-strings.js";
|
|
13
|
+
import { hr } from "./hub-read-strings.js";
|
|
14
|
+
import { OwnedFleetRevoke, QuickPairingGuide } from "./hub-quick-pairing.js";
|
|
15
|
+
|
|
16
|
+
const FLEET_STATUS = { active: "fleetActive", suspended: "fleetPaused", revoked: "fleetRevoked", unknown: "fleetUnknown" };
|
|
17
|
+
|
|
18
|
+
/** Why an entry is unavailable, in the person's words. */
|
|
19
|
+
export function reasonText(entry, fallback) {
|
|
20
|
+
if (!entry) return hg(fallback);
|
|
21
|
+
if (entry.state === "unknown") return hg("unknown");
|
|
22
|
+
const r = entry.reason;
|
|
23
|
+
return hg(r === "person-denied" ? "deniedPerson" : r === "ineligible" ? "ineligible" : r === "suspended" ? "suspended" : fallback);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* `onChats` opens the chat list (the caller's own navigation). `askable` is how many agents are shared with this person
|
|
28
|
+
* (the catalog's own count), so a new owner with nothing shared reads "No agents have been shared with you yet".
|
|
29
|
+
*/
|
|
30
|
+
export function HubWelcome({ name, quick = false, onChats = () => navigate("/ui/hub?chats=1") }) {
|
|
31
|
+
const c = hubClient();
|
|
32
|
+
const [w, setW] = useState(null), [askable, setAskable] = useState(null), [error, setError] = useState(null);
|
|
33
|
+
const live = useRef(true), generation = useRef(0), retry = useRef(null);
|
|
34
|
+
const load = async () => {
|
|
35
|
+
if (!live.current) return;
|
|
36
|
+
clearTimeout(retry.current); retry.current = null;
|
|
37
|
+
const mine = ++generation.current;
|
|
38
|
+
const current = () => live.current && mine === generation.current;
|
|
39
|
+
const failed = (r, reason = "unknown") => {
|
|
40
|
+
if (!current()) return;
|
|
41
|
+
setError(r.code === "backpressure" ? "busy" : reason);
|
|
42
|
+
if (r.code === "backpressure") {
|
|
43
|
+
const seconds = Number(r.retryAfter);
|
|
44
|
+
retry.current = setTimeout(() => { if (current()) void load(); },
|
|
45
|
+
(Number.isFinite(seconds) && seconds > 0 ? Math.max(1, Math.min(300, seconds)) : 10) * 1000);
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
setError(null); setW(null); setAskable(null);
|
|
49
|
+
try {
|
|
50
|
+
const [r, cat] = await Promise.all([c.welcome(), typeof c.catalog === "function" ? c.catalog() : Promise.resolve(null)]);
|
|
51
|
+
if (!current()) return;
|
|
52
|
+
if (!r.ok) { failed(r); return; }
|
|
53
|
+
if (cat && !cat.ok && (r.mode === "legacy" || r.chat?.state === "allow")) { failed(cat, "catalogUnavailable"); return; }
|
|
54
|
+
setW(r); setAskable(cat && Array.isArray(cat.askable) ? cat.askable.length : null);
|
|
55
|
+
} catch { failed({ code: "unreachable" }); }
|
|
56
|
+
};
|
|
57
|
+
useEffect(() => { live.current = true; void load(); return () => {
|
|
58
|
+
live.current = false; generation.current++; clearTimeout(retry.current);
|
|
59
|
+
}; }, []);
|
|
60
|
+
const refresh = async () => { const r = await c.welcome(); if (live.current && r.ok) setW(r); };
|
|
61
|
+
const head = html`<${PageHead} title=${hg("welcomeTitle", name || "")} scope=${hubName() || "Hub"} lead=${hg("welcomeLead")} />`;
|
|
62
|
+
if (error) return html`<div class="col hub-welcome-page">${head}${error === "busy"
|
|
63
|
+
? html`<p class="note" role="status" data-welcome="busy">${hr("busy")}</p>`
|
|
64
|
+
: html`<${ErrorState} message=${error === "catalogUnavailable" ? hr(error) : hg(error)} onRetry=${load} />`}</div>`;
|
|
65
|
+
if (!w) return html`<div class="col hub-welcome-page">${head}<div class="hub-welcome"><section class="card"><${Skeleton} variant="rows" lines=${3} /></section><section class="card"><${Skeleton} variant="rows" lines=${3} /></section></div></div>`;
|
|
66
|
+
const legacy = w.mode === "legacy";
|
|
67
|
+
const chat = w.chat || {}, connect = w.connect || {};
|
|
68
|
+
const chatOk = legacy || chat.state === "allow", connectOk = !legacy && connect.state === "allow";
|
|
69
|
+
const fleets = Array.isArray(connect.fleets) ? connect.fleets : [], max = Number(connect.maxFleets) || 0;
|
|
70
|
+
const quickOn = quick && c.quickPairingV1;
|
|
71
|
+
const used = fleets.filter((f) => f.status !== "revoked").length;
|
|
72
|
+
const atLimit = connectOk && max > 0 && used >= max;
|
|
73
|
+
const noActions = !legacy && chat.state !== "allow" && connect.state !== "allow" && chat.state !== "unknown" && connect.state !== "unknown";
|
|
74
|
+
const unknown = !legacy && (chat.state === "unknown" || connect.state === "unknown");
|
|
75
|
+
return html`<div class="col hub-welcome-page">${head}
|
|
76
|
+
${noActions ? html`<p class="note" role="status" data-welcome="no-actions">${hg("noActions")} ${hg("contactAdmin")}</p>` : null}
|
|
77
|
+
${unknown ? html`<p class="note" role="status" data-welcome="unknown">${hg("unknown")} <button type="button" class="btn btn-sm" onClick=${load}>${hg("retry")}</button></p>` : null}
|
|
78
|
+
<div class="hub-welcome">
|
|
79
|
+
<section class=${`card hub-welcome-card${chatOk ? "" : " is-off"}`} data-entry="chat" aria-disabled=${chatOk ? "false" : "true"}>
|
|
80
|
+
<h3>${hg("chatTitle")}</h3><p class="note">${hg("chatHint")}</p>
|
|
81
|
+
${chatOk ? html`${askable === 0 ? html`<p class="note" data-welcome="nothing-shared">${hg("chatNone")}</p>` : null}
|
|
82
|
+
<div class="hub-welcome-actions"><button type="button" class="btn btn-primary" onClick=${onChats}>${hg("chatGo")}</button></div>`
|
|
83
|
+
: html`<p class="note">${reasonText(chat, "contactAdmin")}</p>`}
|
|
84
|
+
</section>
|
|
85
|
+
<section class=${`card hub-welcome-card${connectOk ? "" : " is-off"}`} data-entry="connect" aria-disabled=${connectOk ? "false" : "true"}>
|
|
86
|
+
<h3>${hg("connectTitle")}</h3><p class="note">${hg("connectHint")}</p>
|
|
87
|
+
${connectOk && max > 0 ? html`<p class="note" data-welcome="fleets">${hg("connectFleets", used, max)}</p>` : null}
|
|
88
|
+
${fleets.length ? html`<ul class="hub-welcome-fleets">${fleets.map((f) => html`<li key=${f.id}><span class="hub-fp-full">${f.label || f.id}</span> <span class=${`tag${f.status === "active" ? " ok" : f.status === "suspended" || f.status === "unknown" ? " warn" : ""}`} data-fleet-status=${f.status}>${hg(FLEET_STATUS[f.status] || "fleetUnknown")}</span>
|
|
89
|
+
${quickOn ? html`<${OwnedFleetRevoke} fleet=${f} onRevoked=${load} />` : null}</li>`)}</ul>` : null}
|
|
90
|
+
${legacy ? html`<p class="note">${hg("connectManual")}</p>`
|
|
91
|
+
: !connectOk ? html`<p class="note">${chat.state === "allow" && connect.reason === "no-group" ? hg("connectNotIncluded") : reasonText(connect, "contactAdmin")}</p>`
|
|
92
|
+
: atLimit ? html`<p class="note" data-welcome="limit">${hg("connectLimit")}</p>`
|
|
93
|
+
: !quick || !c.quickPairingV1 ? html`<p class="note">${hg("connectManual")}</p>` : null}
|
|
94
|
+
${quickOn ? html`<${QuickPairingGuide} allowed=${connectOk && !atLimit} publishAllowed=${w.publish?.state === "allow"} onConnected=${refresh} />` : null}
|
|
95
|
+
</section>
|
|
96
|
+
</div>
|
|
97
|
+
${!legacy && w.publish && w.publish.state !== "allow" && connectOk ? html`<p class="note" data-welcome="publish">${hg("publishNot")}</p>` : null}
|
|
98
|
+
</div>`;
|
|
99
|
+
}
|
package/dist/ui/panel-hub.js
CHANGED
|
@@ -6,14 +6,15 @@
|
|
|
6
6
|
// What people see is what the server says now: every list is read fresh, every change is checked again by the server
|
|
7
7
|
// (who, the revision shown, the directory), and a conflict reloads the list instead of guessing.
|
|
8
8
|
import { html, useEffect, useLayoutEffect, useMemo, useRef, useState } from "/assets/app-html.js";
|
|
9
|
-
import { PanelHeader, setTitle } from "/assets/app-shell.js";
|
|
10
|
-
import { lang, t } from "/assets/app-i18n.js";
|
|
9
|
+
import { PanelHeader, closeDrawer, setTitle } from "/assets/app-shell.js";
|
|
10
|
+
import { lang, register, t } from "/assets/app-i18n.js";
|
|
11
11
|
import { createStore, useStore } from "/assets/app-store.js";
|
|
12
12
|
import { navigate, navStore } from "/assets/app-nav.js";
|
|
13
13
|
import { Empty, ErrorState, Skeleton } from "/assets/ui-states.js";
|
|
14
14
|
import { Icon } from "/assets/ui-icons.js";
|
|
15
15
|
import { confirmDialog } from "/assets/ui-confirm.js";
|
|
16
16
|
import { Dialog } from "/assets/ui-dialog.js";
|
|
17
|
+
import { PairingNotices } from "./hub-quick-pairing.js";
|
|
17
18
|
import { Menu } from "/assets/ui-menu.js";
|
|
18
19
|
import { toast } from "/assets/ui-toast.js";
|
|
19
20
|
// #3226 B: the chat is the fleet chat's own drawing (PR A's shared modules), in the fleet chat's words.
|
|
@@ -26,11 +27,27 @@ import { compareGroups, hubClient } from "./hub-client.js";
|
|
|
26
27
|
import { hw, linkHubCss } from "./hub-strings.js";
|
|
27
28
|
import { hc, linkHubChatCss } from "./hub-chat-strings.js";
|
|
28
29
|
import { ho, linkHubOwnerCss } from "./hub-owner-strings.js";
|
|
30
|
+
import { hg } from "./hub-grant-strings.js";
|
|
29
31
|
import { createHubChatStore } from "./hub-chat-store.js";
|
|
30
32
|
import { QuotaBanner, QuotaCard, QuotaChip, QuotaVisibilityRow } from "./hub-quota.js";
|
|
31
33
|
import { PageHead } from "/assets/page-head.js";
|
|
32
34
|
import { bindRoomFeedback, bootHubPreview, downloadHtml, draftWithLine, panelOpenFor, roomPanelKey, roomPanelOpts, setHubPreviewOptIn } from "./hub-preview.js";
|
|
33
35
|
import { PendingFiles, hf, pageCarriesFiles, roomTakesFiles, uploadChosen } from "./hub-attachments.js";
|
|
36
|
+
// #3298 S-89 (experimental): the group permissions editor and the signed-in welcome are their own LAZY modules, loaded only
|
|
37
|
+
// when the Hub's session says "group-policy-v1" and this tab's client has the calls — a Hub without them never serves or loads them.
|
|
38
|
+
// The one group-permissions sentence this module draws itself (shown when the lazy modules are NOT loaded: this Hub lacks them).
|
|
39
|
+
register("hubGroupsNote", {
|
|
40
|
+
en: { unavailable: "Group permissions aren't available on this Hub yet. Update the Hub, then try again." },
|
|
41
|
+
"zh-TW": { unavailable: "這個 Hub 還沒有群組權限。請更新 Hub 後再試。" },
|
|
42
|
+
});
|
|
43
|
+
const groupPolicyOn = (session, client) => !!session && Array.isArray(session.features) && session.features.includes("group-policy-v1")
|
|
44
|
+
&& !!client && client.groupPolicyV1 === true;
|
|
45
|
+
function LazyGroups({ pick, props }) {
|
|
46
|
+
const [C, setC] = useState(null), [failed, setFailed] = useState(false);
|
|
47
|
+
useEffect(() => { let live = true; Promise.all([import("./hub-welcome.js"), import("./hub-group-policy.js"), import("./hub-group-strings.js")])
|
|
48
|
+
.then(([w, p, g]) => { if (live) setC(() => pick({ ...w, ...p, ...g })); }, () => { if (live) setFailed(true); }); return () => { live = false; }; }, []);
|
|
49
|
+
return failed ? null : C ? html`<${C} ...${props} />` : html`<${Skeleton} variant="rows" lines=${3} />`;
|
|
50
|
+
}
|
|
34
51
|
|
|
35
52
|
const TITLES = { ask: "askTitle", exposures: "exposuresTitle", admin: "adminTitle" };
|
|
36
53
|
/** P1 room polling: at most once per ten seconds, one request at a time, paused while the page is hidden (hub.md §5). */
|
|
@@ -82,15 +99,17 @@ export function HubPanel({ route }) {
|
|
|
82
99
|
let body = tab === "ask" ? roomParam() ? html`<${HubRoomLoading} />`
|
|
83
100
|
: html`<${PanelHeader} title=${hc("chats")} /><div class="hub-home"><${Skeleton} variant="rows" lines=${4} /></div>`
|
|
84
101
|
: html`<${Skeleton} variant="rows" lines=${4} />`;
|
|
85
|
-
|
|
86
|
-
|
|
102
|
+
// Signed out: the sign-in page alone (no panel header, no chat chrome).
|
|
103
|
+
if (s === null) return html`<div data-effect-panel="hub" class="panel p-hub p-hub-signin"><${HubSignIn} /></div>`;
|
|
104
|
+
if (s) body = tab === "ask" ? html`<${HubChats} />` : tab === "exposures" ? html`<${HubMine} />` : html`<${HubAdmin} admin=${!!s.admin} />`;
|
|
105
|
+
const notices = s?.features?.includes("quick-pairing-v1") && hubClient().quickPairingV1 ? html`<${PairingNotices} admin=${!!s.admin} />` : null;
|
|
87
106
|
// The chats draw their own header (the room's); the other pages keep the panel's.
|
|
88
|
-
if (s !== null && tab === "ask") return html`<div data-effect-panel="hub" class="panel p-hub p-hub-ask"><div data-trust="panel-content" class="panel-body hub-chat-body">${body}</div></div>`;
|
|
107
|
+
if (s !== null && tab === "ask") return html`<div data-effect-panel="hub" class="panel p-hub p-hub-ask"><div data-trust="panel-content" class="panel-body hub-chat-body">${notices}${body}</div></div>`;
|
|
89
108
|
// #3226 C: My shared agents and Administration are Settings-like pages (their own PageHead under the panel's header).
|
|
90
109
|
const pageTitle = tab === "exposures" ? hc("mine") : tab === "admin" ? hc("admin") : hw(TITLES[tab]);
|
|
91
110
|
return html`<div data-effect-panel="hub" class=${`panel p-hub p-hub-${tab}`}>
|
|
92
111
|
<${PanelHeader} title=${s ? pageTitle : hw(TITLES[tab])} />
|
|
93
|
-
<div data-trust="panel-content" class=${`panel-body ${s ? "hub-page-body" : "hub-body"}`}>${body}</div>
|
|
112
|
+
<div data-trust="panel-content" class=${`panel-body ${s ? "hub-page-body" : "hub-body"}`}>${notices}${body}</div>
|
|
94
113
|
</div>`;
|
|
95
114
|
}
|
|
96
115
|
|
|
@@ -113,13 +132,44 @@ export function HubSessionMenu() {
|
|
|
113
132
|
</div>`;
|
|
114
133
|
}
|
|
115
134
|
|
|
135
|
+
/**
|
|
136
|
+
* alpha.6 feedback: the signed-out Hub is a sign-in page, in AgEnD's own sign-in style (signin.html: one centred card
|
|
137
|
+
* on the page's background, the brand, the fields, a primary button) — none of the chat app around it: while it is on
|
|
138
|
+
* screen the shell's sidebar and tabs are hidden (not just covered, so focus and screen readers skip them too).
|
|
139
|
+
* Its stylesheet is its own (/assets/hub-signin.css): a tab holding an older hub.css still draws it.
|
|
140
|
+
*/
|
|
141
|
+
function linkHubSigninCss(doc = typeof document !== "undefined" ? document : null) {
|
|
142
|
+
try {
|
|
143
|
+
if (!doc || !doc.head || doc.querySelector('link[data-hub-signin-css="1"]')) return;
|
|
144
|
+
const link = doc.createElement("link");
|
|
145
|
+
link.setAttribute("rel", "stylesheet"); link.setAttribute("href", "/assets/hub-signin.css"); link.setAttribute("data-hub-signin-css", "1");
|
|
146
|
+
doc.head.appendChild(link);
|
|
147
|
+
} catch { /* the page still works without it */ }
|
|
148
|
+
}
|
|
116
149
|
function HubSignIn() {
|
|
150
|
+
useEffect(() => {
|
|
151
|
+
linkHubSigninCss();
|
|
152
|
+
// #3318 review F1: signed out from the phone drawer's session menu (or a session that ended while it was open), the
|
|
153
|
+
// drawer would stay open with <main> inert under it — and this page, inside <main>, would take no input while the
|
|
154
|
+
// sidebar and scrim that used to close it are hidden or covered. The sign-in page closes it.
|
|
155
|
+
closeDrawer();
|
|
156
|
+
const body = typeof document !== "undefined" ? document.body : null;
|
|
157
|
+
if (body) body.classList.add("hub-signed-out");
|
|
158
|
+
return () => { if (body) body.classList.remove("hub-signed-out"); };
|
|
159
|
+
}, []);
|
|
160
|
+
const name = typeof document !== "undefined" ? (document.body.dataset.hubName || "") : "";
|
|
117
161
|
const [form, setForm] = useState({ login: "", password: "" });
|
|
118
162
|
const [busy, setBusy] = useState(false);
|
|
119
163
|
const [msg, setMsg] = useState(null);
|
|
120
164
|
const submit = async (e) => {
|
|
121
165
|
e.preventDefault();
|
|
122
|
-
if (busy
|
|
166
|
+
if (busy) return;
|
|
167
|
+
// The button is always ready (a disabled one reads as grey, "broken"): an empty field just takes the focus.
|
|
168
|
+
if (!form.login.trim() || !form.password) {
|
|
169
|
+
const doc = typeof document !== "undefined" ? document : null;
|
|
170
|
+
doc?.getElementById(!form.login.trim() ? "hubLogin" : "hubPassword")?.focus();
|
|
171
|
+
return;
|
|
172
|
+
}
|
|
123
173
|
setBusy(true); setMsg(null);
|
|
124
174
|
const r = await hubClient().signIn(form.login.trim(), form.password);
|
|
125
175
|
setBusy(false);
|
|
@@ -127,18 +177,21 @@ function HubSignIn() {
|
|
|
127
177
|
setForm((f) => ({ ...f, password: "" }));
|
|
128
178
|
setMsg(r.code === "backpressure" ? hw("errBusyHub") : r.code === "unavailable" ? hw("errDirectory") : hw("errSignIn"));
|
|
129
179
|
};
|
|
130
|
-
return html`<section class="
|
|
131
|
-
<
|
|
132
|
-
<
|
|
133
|
-
<
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
<
|
|
137
|
-
value=${form.
|
|
138
|
-
<
|
|
180
|
+
return html`<main class="hub-signin-page"><section class="hub-signin hub-signin-card" aria-labelledby="hubSignInTitle">
|
|
181
|
+
<div class="hub-signin-brand"><strong>${t("hubShell.brand")}</strong>${name ? html`<span>${name}</span>` : null}</div>
|
|
182
|
+
<h1 id="hubSignInTitle">${hw("signInTitle")}</h1>
|
|
183
|
+
<p class="hub-signin-lead">${hw("signInLead")}</p>
|
|
184
|
+
<form class="hub-signin-form" onSubmit=${submit}>
|
|
185
|
+
<label for="hubLogin">${hw("login")}</label>
|
|
186
|
+
<input id="hubLogin" autocomplete="username" spellcheck=${false} autocapitalize="none"
|
|
187
|
+
value=${form.login} onInput=${(e) => { const v = e.target.value; setForm((f) => ({ ...f, login: v })); }} />
|
|
188
|
+
<label for="hubPassword">${hw("password")}</label>
|
|
189
|
+
<input id="hubPassword" type="password" autocomplete="current-password"
|
|
190
|
+
value=${form.password} onInput=${(e) => { const v = e.target.value; setForm((f) => ({ ...f, password: v })); }} />
|
|
191
|
+
<button type="submit" class="hub-signin-go" disabled=${busy}>${hw("signIn")}</button>
|
|
139
192
|
</form>
|
|
140
|
-
|
|
141
|
-
</section>`;
|
|
193
|
+
<p class="hub-signin-msg" role=${msg ? "alert" : undefined}>${msg || ""}</p>
|
|
194
|
+
</section></main>`;
|
|
142
195
|
}
|
|
143
196
|
|
|
144
197
|
/** Load a list from the client; `reload` reads it again. null while loading, { error } on failure. */
|
|
@@ -160,7 +213,10 @@ function useRead(read) {
|
|
|
160
213
|
export const ROOMS_MS = 30_000;
|
|
161
214
|
export function refreshRooms() {
|
|
162
215
|
return roomsReading ??= hubClient().rooms().then((r) => {
|
|
163
|
-
|
|
216
|
+
// With group permissions on, a person whose groups don't include chatting is refused the list: that is their access, shown
|
|
217
|
+
// by the welcome, not a failure (Cairn #3372) — the list stays empty and quiet. Every chat action still asks the server.
|
|
218
|
+
if (!r.ok && (r.code === "denied" || r.code === "revoked") && groupPolicyOn(session, hubClient())) roomsStore.set({ loaded: true, rooms: [], error: null, denied: true });
|
|
219
|
+
else roomsStore.set(r.ok ? { loaded: true, rooms: r.rooms || [], error: null } : { ...roomsStore.get(), loaded: true, error: errText(r) });
|
|
164
220
|
}, () => roomsStore.set({ ...roomsStore.get(), loaded: true, error: hw("errFailed") })).finally(() => { roomsReading = null; });
|
|
165
221
|
}
|
|
166
222
|
/** Keeps the list fresh while something shows it (every ROOMS_MS, paused while the page is hidden). */
|
|
@@ -208,7 +264,7 @@ export function HubNav({ onPick } = {}) {
|
|
|
208
264
|
<div class="hub-sec">${hc("chats")}</div>
|
|
209
265
|
${rs.error ? html`<${ErrorState} message=${rs.error} onRetry=${refreshRooms} />` : null}
|
|
210
266
|
${!rs.loaded ? html`<${Skeleton} variant="rows" lines=${4} />` : null}
|
|
211
|
-
${rs.loaded && !rs.error && !rs.rooms.length ? html`<p class="note hub-list-empty">${hc("noChatsHint")}</p>` : null}
|
|
267
|
+
${rs.loaded && !rs.error && !rs.denied && !rs.rooms.length ? html`<p class="note hub-list-empty">${hc("noChatsHint")}</p>` : null}
|
|
212
268
|
${rs.rooms.length && !shown.length ? html`<p class="note hub-list-empty">${hc("noMatch")}</p>` : null}
|
|
213
269
|
<ul class="hub-rooms" role="list">${shown.map((r) => html`<li key=${r.id}>
|
|
214
270
|
<a class=${`hub-room-row${current === r.id ? " active" : ""}${r.state === "closed" ? " closed" : ""}`} href=${roomPath(r.id)} aria-current=${current === r.id ? "page" : undefined} onClick=${(e) => pick(e, r)}>
|
|
@@ -259,17 +315,21 @@ function NewChatDialog({ onClose }) {
|
|
|
259
315
|
function HubChats() {
|
|
260
316
|
useStore(navStore); // ?room= changes without a new route
|
|
261
317
|
const rs = useRooms();
|
|
318
|
+
const s = useSession();
|
|
319
|
+
const [picking, setPicking] = useState(false);
|
|
262
320
|
useEffect(() => { linkHubChatCss(); }, []);
|
|
263
321
|
const id = roomParam();
|
|
264
322
|
const room = id ? rs.rooms.find((r) => r.id === id) || (rs.loaded ? { id, exposureName: "", ownerName: "", features: [] } : null) : null;
|
|
265
323
|
if (id && room) return html`<${HubRoomView} key=${id} room=${room} />`;
|
|
266
324
|
if (id) return html`<${HubRoomLoading} error=${rs.error} />`;
|
|
267
325
|
return html`<${PanelHeader} title=${hc("chats")} />
|
|
268
|
-
<div class
|
|
326
|
+
<div class=${`hub-home${groupPolicyOn(s, hubClient()) ? " has-welcome" : ""}`}>
|
|
269
327
|
<div class="hub-home-list"><${HubNav} /></div>
|
|
270
|
-
|
|
328
|
+
${groupPolicyOn(s, hubClient()) ? html`<div class="hub-home-pick hub-home-welcome"><${LazyGroups} pick=${(m) => m.HubWelcome} props=${{ name: s.displayName, quick: s.features.includes("quick-pairing-v1"), onChats: () => setPicking(true) }} /></div>`
|
|
329
|
+
: html`<div class="hub-home-pick center">${!rs.loaded ? html`<${Skeleton} variant="rows" lines=${4} />` : rs.error && !rs.rooms.length ? html`<${ErrorState} message=${rs.error} onRetry=${refreshRooms} />` : !rs.rooms.length
|
|
271
330
|
? html`<${Empty} icon="chat" title=${hc("noChats")} hint=${hc("noChatsHint")} />`
|
|
272
|
-
: html`<${Empty} icon="chat" title=${hc("choose")} hint=${hc("chooseHint")} />`}</div
|
|
331
|
+
: html`<${Empty} icon="chat" title=${hc("choose")} hint=${hc("chooseHint")} />`}</div>`}
|
|
332
|
+
${picking ? html`<${NewChatDialog} onClose=${() => setPicking(false)} />` : null}
|
|
273
333
|
</div>`;
|
|
274
334
|
}
|
|
275
335
|
|
|
@@ -539,10 +599,10 @@ function HubMine() {
|
|
|
539
599
|
const [pairings, reloadPairings] = useRead(() => hubClient().pairings());
|
|
540
600
|
const [msg, setMsg] = useState(null);
|
|
541
601
|
useEffect(() => { linkHubChatCss(); linkHubOwnerCss(); }, []);
|
|
542
|
-
const act = async (fn, after = reload) => {
|
|
602
|
+
const act = async (fn, after = reload, refused = (r) => setMsg(errText(r))) => {
|
|
543
603
|
setMsg(null);
|
|
544
604
|
const r = await fn();
|
|
545
|
-
if (!r.ok)
|
|
605
|
+
if (!r.ok) refused(r);
|
|
546
606
|
await after();
|
|
547
607
|
return r;
|
|
548
608
|
};
|
|
@@ -576,7 +636,9 @@ function HubMine() {
|
|
|
576
636
|
|
|
577
637
|
/** One shared agent: who may ask (allow, revoke), whether askers see its quota (G), who asked lately, pause. */
|
|
578
638
|
function HubAgentPage({ x, act, msg }) {
|
|
579
|
-
|
|
639
|
+
// #3338: this page is reached only through catalog.mine; the link opens a form, never a grant.
|
|
640
|
+
// Read the closed intent once on this keyed agent page, so cancel/save/reloads never reopen it.
|
|
641
|
+
const [allowing, setAllowing] = useState(() => x.state === "published" && new URLSearchParams(location.search).get("grant") === "1");
|
|
580
642
|
const [activity, reloadActivity] = useRead(() => readActivity(x.id));
|
|
581
643
|
const revoke = async (g) => {
|
|
582
644
|
if (!(await confirmDialog({ message: hw("revokeAsk", g.subjectName || g.subjectLogin), confirmLabel: hw("revoke"), danger: true }))) return;
|
|
@@ -614,26 +676,30 @@ function HubAgentPage({ x, act, msg }) {
|
|
|
614
676
|
${shared ? html`<section class="card hub-danger"><h3>${ho("pauseTitle")}</h3><p class="note">${ho("pauseLead")}</p>
|
|
615
677
|
<div class="field-row"><button type="button" class="btn btn-sm btn-danger" onClick=${freeze}>${ho("pauseGo")}</button></div></section>` : null}
|
|
616
678
|
</div>
|
|
617
|
-
${allowing ? html`<${AllowDialog} x=${x} act=${act} onClose=${() => setAllowing(false)} />` : null}
|
|
679
|
+
${allowing && shared ? html`<${AllowDialog} x=${x} act=${act} onClose=${() => setAllowing(false)} />` : null}
|
|
618
680
|
</div>`;
|
|
619
681
|
}
|
|
620
682
|
|
|
621
683
|
function AllowDialog({ x, act, onClose }) {
|
|
622
684
|
const [form, setForm] = useState({ login: "", days: 7 });
|
|
623
685
|
const [busy, setBusy] = useState(false);
|
|
686
|
+
const [error, setError] = useState(null);
|
|
624
687
|
const submit = async (e) => {
|
|
625
688
|
e && e.preventDefault && e.preventDefault();
|
|
626
689
|
if (busy || !form.login.trim()) return;
|
|
690
|
+
setError(null);
|
|
627
691
|
setBusy(true);
|
|
628
|
-
const r = await act(() => hubClient().grant({ exposureId: x.id, exposureRevision: x.revision, login: form.login.trim(), days: form.days })
|
|
692
|
+
const r = await act(() => hubClient().grant({ exposureId: x.id, exposureRevision: x.revision, login: form.login.trim(), days: form.days }), undefined,
|
|
693
|
+
(r) => setError(r.code === "not-found" ? hg("recipientRefused") : r.code === "unavailable" ? hg("directoryUnavailable") : errText(r)));
|
|
629
694
|
setBusy(false);
|
|
630
695
|
if (r && r.ok) onClose();
|
|
631
696
|
};
|
|
632
697
|
return html`<${Dialog} title=${ho("allowTitle", x.displayName)} onClose=${onClose}
|
|
633
698
|
actions=${html`<button type="button" class="btn" onClick=${onClose}>${hw("pickCancel")}</button><button type="button" class="btn btn-primary" disabled=${busy || !form.login.trim()} onClick=${submit}>${ho("allowGo")}</button>`}>
|
|
634
699
|
<form class="form hub-grant" onSubmit=${submit}>
|
|
700
|
+
${error ? html`<p class="err" role="alert">${error}</p>` : null}
|
|
635
701
|
<label class="field"><span>${ho("allowLogin")}</span><input autocomplete="off" spellcheck=${false} autocapitalize="none" value=${form.login}
|
|
636
|
-
onInput=${(e) => { const v = e.target.value; setForm((f) => ({ ...f, login: v })); }} /><small class="note">${ho("allowLoginHint")}</small></label>
|
|
702
|
+
onInput=${(e) => { const v = e.target.value; setError(null); setForm((f) => ({ ...f, login: v })); }} /><small class="note">${ho("allowLoginHint")}</small></label>
|
|
637
703
|
<label class="field"><span>${ho("allowDays")}</span><select value=${String(form.days)} onChange=${(e) => { const v = Number(e.target.value); setForm((f) => ({ ...f, days: v })); }}>
|
|
638
704
|
${DAYS.map((d) => html`<option value=${String(d)}>${hw("days", d)}</option>`)}</select></label>
|
|
639
705
|
</form>
|
|
@@ -642,10 +708,22 @@ function AllowDialog({ x, act, onClose }) {
|
|
|
642
708
|
|
|
643
709
|
// ── Administration ──
|
|
644
710
|
function HubAdmin({ admin }) {
|
|
711
|
+
useStore(navStore); // ?view= changes without a new route
|
|
712
|
+
const s = useSession();
|
|
645
713
|
if (!admin) return html`<div class="center hub-empty"><${Empty} icon="key" title=${hw("adminOnly")} hint=${hw("adminOnlyHint")} /></div>`;
|
|
646
|
-
return html`<${
|
|
714
|
+
if (groupPolicyOn(s, hubClient()) && adminView() === "groups") return html`<${LazyGroups} pick=${(m) => m.HubGroupPolicyPage} props=${{}} />`;
|
|
715
|
+
// Reached from a fleet's Settings link on a Hub (or a tab) without group permissions: say so instead of a silent admin page.
|
|
716
|
+
const unavailable = adminView() === "groups" && !groupPolicyOn(s, hubClient());
|
|
717
|
+
return html`${unavailable ? html`<p class="note" role="status" data-groups="unavailable">${t("hubGroupsNote.unavailable")}</p>` : null}
|
|
718
|
+
<${HubAdminPage} groups=${groupPolicyOn(s, hubClient())} />`;
|
|
719
|
+
}
|
|
720
|
+
/** #3298 S-89: Administration's sub-page (?view=groups: Group permissions), from the page's own address. */
|
|
721
|
+
function adminView() { try { return new URLSearchParams(location.search).get("view") || ""; } catch { return ""; } }
|
|
722
|
+
/** #3298 S-89: the prominent entry to Group permissions at the top of Administration (discovery without docs). */
|
|
723
|
+
function GroupPermissionsEntry() {
|
|
724
|
+
return html`<${LazyGroups} pick=${(m) => m.GroupPermissionsCard} props=${{}} />`;
|
|
647
725
|
}
|
|
648
|
-
function HubAdminPage() {
|
|
726
|
+
function HubAdminPage({ groups = false } = {}) {
|
|
649
727
|
const [view, reload] = useRead(() => hubClient().adminOverview());
|
|
650
728
|
const [login, setLogin] = useState("");
|
|
651
729
|
const [offer, setOffer] = useState(null);
|
|
@@ -657,7 +735,7 @@ function HubAdminPage() {
|
|
|
657
735
|
setMsg(null);
|
|
658
736
|
const r = await hubClient().createPairing(login.trim());
|
|
659
737
|
if (!r.ok) { setMsg(errText(r)); return; }
|
|
660
|
-
setOffer({ code: r.code, expiresAt: r.expiresAt, login: login.trim() }); setLogin(""); reload();
|
|
738
|
+
setOffer({ code: r.code, expiresAt: r.expiresAt, memberOrigin: r.memberOrigin, login: login.trim() }); setLogin(""); reload();
|
|
661
739
|
};
|
|
662
740
|
const approve = async (p) => {
|
|
663
741
|
if (!(await confirmDialog({ message: hw("approveAsk", compareGroups(p.fingerprint)), confirmLabel: hw("approve") }))) return;
|
|
@@ -679,6 +757,7 @@ function HubAdminPage() {
|
|
|
679
757
|
const fleets = view.fleets || [], pairings = view.pairings || [];
|
|
680
758
|
return html`<div class="col hub-owner hub-admin"><${PageHead} title=${hc("admin")} scope=${ho("scopeHub")} lead=${ho("adminLead")} />
|
|
681
759
|
<div class="s-section-layout">
|
|
760
|
+
${groups ? html`<${GroupPermissionsEntry} />` : null}
|
|
682
761
|
${view.error ? html`<${ErrorState} message=${view.error} onRetry=${reload} />` : null}
|
|
683
762
|
${msg ? html`<p class="err" role="alert">${msg}</p>` : null}
|
|
684
763
|
<section class="card"><h3>${ho("pairSteps")}</h3>
|
|
@@ -686,7 +765,10 @@ function HubAdminPage() {
|
|
|
686
765
|
<li class=${offer || pairings.length ? "done" : "now"}><div class="hub-step-body"><span><b>${ho("stepCode")}</b><small class="note">${ho("stepCodeHint")}</small></span>
|
|
687
766
|
<form class="hub-step-form" onSubmit=${create}><label class="field"><span class="sr-only">${ho("ownerLogin")}</span><input placeholder=${ho("ownerLogin")} autocomplete="off" spellcheck=${false} autocapitalize="none" value=${login} onInput=${(e) => setLogin(e.target.value)} /></label>
|
|
688
767
|
<button type="submit" class="btn btn-sm" disabled=${!login.trim()}>${ho("makeCode")}</button></form>
|
|
689
|
-
${offer ? html`<div class="hub-offer" role="status"><small class="note">${ho("codeFor", offer.login)}</small><code class="hub-code">${offer.code}</code><small class="note">${hw("expires", when(offer.expiresAt))}</small
|
|
768
|
+
${offer ? html`<div class="hub-offer" role="status"><small class="note">${ho("codeFor", offer.login)}</small><code class="hub-code">${offer.code}</code><small class="note">${hw("expires", when(offer.expiresAt))}</small>
|
|
769
|
+
${offer.memberOrigin ? html`<div class="field"><span>${ho("memberAddress")}</span><span class="hub-origin"><code>${offer.memberOrigin}</code></span><small class="note">${ho("memberAddressHint")}</small></div>
|
|
770
|
+
<button type="button" class="btn btn-sm" onClick=${async () => { const ok = await copyText(`${ho("memberAddress")}: ${offer.memberOrigin}\n${ho("codeFor", offer.login)}: ${offer.code}\n${hw("expires", when(offer.expiresAt))}`); toast(ho(ok ? "handoffCopied" : "handoffCopyFailed"), !ok); }}><${Icon} name="copy" size=${14} />${ho("copyHandoff")}</button>`
|
|
771
|
+
: html`<small class="note">${ho("memberAddressMissing")}</small>`}</div>` : null}</div></li>
|
|
690
772
|
<li class=${pairings.some((p) => p.ownerConfirmed) ? "done" : pairings.length ? "now" : ""}><div class="hub-step-body"><span><b>${ho("stepOwner")}</b><small class="note">${ho("stepOwnerHint")}</small></span></div></li>
|
|
691
773
|
<li class=${pairings.some((p) => p.ownerConfirmed && !p.adminApproved) ? "now" : ""}><div class="hub-step-body"><span><b>${ho("stepApprove")}</b><small class="note">${ho("stepApproveHint")}</small></span></div></li>
|
|
692
774
|
</ol>
|
package/dist/ui/panel-log.js
CHANGED
|
@@ -29,7 +29,7 @@ register("log", {
|
|
|
29
29
|
en: {
|
|
30
30
|
offTitle: "The Log is off",
|
|
31
31
|
offBody: "Turn it on to see each agent's work step by step: what it was asked, its replies, every tool call with its arguments and result, errors, and fleet events. It reads the agent's own transcript only while this tab is open, and masks secret values.",
|
|
32
|
-
enable: "Turn on the Log", enabling: "Waiting for a fleet admin to confirm it
|
|
32
|
+
enable: "Turn on the Log", enabling: "Waiting for a fleet admin to confirm it — the confirmation card says where…", enabled: "The Log is on.",
|
|
33
33
|
enableFailed: "The Log was not turned on: {0}", offPublic: "A fleet admin can turn it on in Settings → Web dashboard.",
|
|
34
34
|
unsupported: "{0} has no transcript AgEnD can read, so this Log shows fleet events only. View shows its screen.",
|
|
35
35
|
kiroWhy: "kiro's own steps are shown only when AgEnD can prove which conversation it is in now. {0} Fleet events are shown meanwhile.",
|
|
@@ -68,7 +68,7 @@ register("log", {
|
|
|
68
68
|
"zh-TW": {
|
|
69
69
|
offTitle: "紀錄未開啟",
|
|
70
70
|
offBody: "開啟後可逐步看到每個 agent 的工作:收到的要求、回覆、每次工具呼叫的參數與結果、錯誤,以及 fleet 事件。只在這個分頁開著時讀取 agent 自己的對話紀錄,機密值會遮蔽。",
|
|
71
|
-
enable: "開啟紀錄", enabling: "等待 fleet admin
|
|
71
|
+
enable: "開啟紀錄", enabling: "等待 fleet admin 確認,確認卡片上有說明確認方式…", enabled: "紀錄已開啟。",
|
|
72
72
|
enableFailed: "紀錄沒有開啟:{0}", offPublic: "fleet admin 可以在「設定 → 網頁儀表板」開啟。",
|
|
73
73
|
unsupported: "{0} 沒有 AgEnD 讀得到的對話紀錄,所以這裡只顯示 fleet 事件。「檢視」可以看它的畫面。",
|
|
74
74
|
kiroWhy: "只有在 AgEnD 能證明 kiro 目前所在的對話時,才會顯示它自己的步驟。{0}目前先顯示 fleet 事件。",
|
|
@@ -170,7 +170,7 @@ function MachineCard({ machine, busy, action, openDiagnostics, probe, repairUpda
|
|
|
170
170
|
!local && status !== "revoked" && {key:"rename",label:machineText("rename"),icon:"edit",onSelect:()=>setEditing(true)},
|
|
171
171
|
!local && status !== "revoked" && {key:"revoke",label:machineText("revoke"),icon:"close",danger:true,onSelect:()=>action(machine,"revoke")}];
|
|
172
172
|
return html`<article class=${`runtime-machine${local ? " runtime-native-local" : ""}${revoked ? " is-revoked" : ""}`} data-machine-id=${local ? "local" : machine.id}>
|
|
173
|
-
<header><span class="runtime-machine-icon"><${Icon} name="fleet" size=${22} /></span><div><h3>${machine.name}${revoked ? null : html`<span class="runtime-kind">${machineText(local ? "localBadge" : "pairedBadge")}</span>`}</h3><p>${machine.platform === "win32" ? "Windows" : machine.platform || machineText("unknown")}${machine.hostname && machine.hostname !== machine.name ? ` · ${machine.hostname}` : ""} · ${machineText("cliCount",clis.length)}</p></div><span class=${`runtime-status is-${status}`}><span class="windows-cli-dot"></span>${machineText(["available","online","offline","pending","revoked"].includes(status) ? status : "unknown")}</span></header>
|
|
173
|
+
<header><span class="runtime-machine-icon"><${Icon} name="fleet" size=${22} /></span><div><h3>${machine.name}${revoked ? null : html`<span class="runtime-kind">${machineText(local ? "localBadge" : "pairedBadge")}</span>`}</h3><p>${machine.platform === "win32" ? "Windows" : machine.platform || machineText("unknown")}${machine.hostname && machine.hostname !== machine.name ? ` · ${machine.hostname}` : ""} · ${machineText((clis.length) === 1 ? "cliCountOne" : "cliCount",clis.length)}</p></div><span class=${`runtime-status is-${status}`}><span class="windows-cli-dot"></span>${machineText(["available","online","offline","pending","revoked"].includes(status) ? status : "unknown")}</span></header>
|
|
174
174
|
${!local && !revoked && machine.runtimeCompatibility === "incompatible" ? html`<p class="runtime-reinstall" role="alert">${machineText("needsReinstall")}</p>` : null}
|
|
175
175
|
${!local && !revoked && status !== "pending" ? html`<${RuntimeUpdateNotice} machine=${machine} onRepair=${() => repairUpdate(machine)} />` : null}
|
|
176
176
|
${revoked ? null : html`<p class="runtime-inventory-time note">${machine.inventoryUpdatedAt ? machineText("inventoryAt",machineTime(machine.inventoryUpdatedAt)) : machineText("neverDetected")}</p>`}
|
|
@@ -183,7 +183,9 @@ function MachineCard({ machine, busy, action, openDiagnostics, probe, repairUpda
|
|
|
183
183
|
<${Menu} cls="runtime-machine-menu" label=${machineText("machineActions",machine.name)} disabled=${busy} items=${menuItems} />
|
|
184
184
|
</div>
|
|
185
185
|
${info ? html`<${Dialog} title=${`${machineText("machineInfo")} · ${machine.name}`} onClose=${()=>setInfo(false)}><dl class="runtime-machine-facts"><dt>${machineText("machineName")}</dt><dd>${machine.name}</dd><dt>${machineText("hostName")}</dt><dd>${machine.hostname || machine.inventory?.hostname || machineText("unknown")}</dd><dt>${machineText("platform")}</dt><dd>${machine.platform === "win32" ? "Windows" : machine.platform}</dd>${local ? html`<dt>${machineText("home")}</dt><dd>${machine.inventory?.home || machineText("unknown")}</dd>` : html`<dt>${machineText("version")}</dt><dd class="runtime-reported-version">${machine.runtimeInfo?.version || machineText(machine.runtimeInfo ? "versionUnreadable" : "versionNotReported")}</dd>${machine.runtimeInfo ? html`<dt>${machineText("buildId")}</dt><dd class="runtime-reported-build"><code>${machine.runtimeInfo?.buildId || machineText("buildUnavailable")}</code></dd><dt>${machineText("protocols")}</dt><dd>${machine.runtimeInfo?.protocolVersions?.map(v=>`v${v}`).join(", ") || machineText("protocolUnknown")}</dd>` : null}<dt>${machineText("compatibility")}</dt><dd class="runtime-compatibility">${machineText(["compatible","legacy","incompatible"].includes(machine.runtimeCompatibility) ? machine.runtimeCompatibility : "protocolUnknown")}</dd>${machine.runtimeInfo ? html`<dt>${machineText("capabilities")}</dt><dd>${machine.runtimeInfo?.capabilities?.map(capability=>["exec","mcp","panes"].includes(capability) ? machineText(`capability_${capability}`) : capability === "credential-profiles" ? machineText("capability_credentialProfiles") : capability).join(" · ") || machineText("unknown")}</dd>` : null}<dt>${machineText("lastSeenLabel")}</dt><dd>${machineTime(machine.lastSeenAt)}</dd><dt>${machineText("identity")}</dt><dd><code>${machine.id}</code></dd>`}</dl></${Dialog}>` : null}
|
|
186
|
-
${editing ? html`<${Dialog} title=${machineText("rename")} onClose=${()=>setEditing(false)} busy=${busy}
|
|
186
|
+
${editing ? html`<${Dialog} title=${machineText("rename")} onClose=${()=>setEditing(false)} busy=${busy}
|
|
187
|
+
actions=${html`<button type="button" class="btn" disabled=${busy} onClick=${()=>setEditing(false)}>${machineText("cancel")}</button><button class="btn btn-primary" type="submit" form=${`runtime-rename-${machine.id}`} disabled=${busy || !name.trim()}>${machineText("save")}</button>`}>
|
|
188
|
+
<form id=${`runtime-rename-${machine.id}`} class="runtime-rename" onSubmit=${event=>{event.preventDefault();if(name.trim())void action(machine,"rename",{name:name.trim()}).then(ok=>{if(ok)setEditing(false);});}}><label class="field"><span>${machineText("name")}</span><input value=${name} maxLength=${100} onInput=${event=>setName(event.target.value)} /></label></form></${Dialog}>` : null}
|
|
187
189
|
</article>`;
|
|
188
190
|
}
|
|
189
191
|
function RuntimeDiagnosticsDialog({ navKey, machineId, machine, enabled, drafts, session, taskLease, onChanged, onClose }) {
|
|
@@ -399,7 +401,7 @@ export function RuntimesPanel({navKey}) {
|
|
|
399
401
|
if(typeof document !== "undefined")lease.timeout(() => document.getElementById(`runtime-install-tab-${tabItems[next].id}`)?.focus(),0);
|
|
400
402
|
};
|
|
401
403
|
const installTabs=html`<div class="s-page-tabs runtime-install-tabs" role="tablist" aria-label=${machineText("installMethod")}>${tabItems.map((item,index) => html`<button key=${item.id} id=${`runtime-install-tab-${item.id}`} type="button" role="tab" class=${tab === item.id ? "on" : ""} aria-selected=${tab === item.id ? "true" : "false"} aria-controls="runtime-install-panel" tabindex=${tab === item.id ? 0 : -1} onClick=${() => setTab(item.id)} onKeyDown=${event => tabKeys(event,index)}>${item.label}</button>`)}</div>`;
|
|
402
|
-
const addressStep=step(1,machineText("server"),html`<input type="url" aria-label=${machineText("server")} value=${server} disabled=${busy === "download"} spellcheck=${false} onInput=${event => setServer(event.target.value)}
|
|
404
|
+
const addressStep=step(1,machineText("server"),html`<div class="field"><input type="url" aria-label=${machineText("server")} value=${server} disabled=${busy === "download"} spellcheck=${false} onInput=${event => setServer(event.target.value)} /></div><p class="note">${machineText("serverHint")}</p>${command ? null : html`<p role="alert">${machineText("serverInvalid")}</p>`}`);
|
|
403
405
|
const approveStep=step(4,machineText("stepApprove"),html`<p class="note">${machineText("stepApproveHint")}</p>`);
|
|
404
406
|
const windowsSteps=html`${addressStep}
|
|
405
407
|
${step(2,machineText("stepInstall"),html`<p class="note">${machineText("stepInstallHint")}</p>
|
|
@@ -410,10 +412,10 @@ export function RuntimesPanel({navKey}) {
|
|
|
410
412
|
${approveStep}`;
|
|
411
413
|
const zipSteps=html`${addressStep}
|
|
412
414
|
${step(2,machineText("stepDownload"),html`<p class="note">${machineText("stepZipHint")}</p>${download()}${downloadedFor ? html`<p class="note" role="status">${machineText("downloadedFor",downloadedFor)}</p>` : null}`)}
|
|
413
|
-
${step(3,machineText("stepLaunch"),html`<p class="note">${machineText("stepLaunchHint")}</p>${command ? html`<details class="runtime-manual-command"><summary>${machineText("manualCommand")}</summary><label><span>${machineText("command")}</span><input class="runtime-command" value=${command} readOnly=${true} spellcheck=${false} /></label><p class="note">${machineText("manualMultiHint")}</p></details>` : null}`)}
|
|
415
|
+
${step(3,machineText("stepLaunch"),html`<p class="note">${machineText("stepLaunchHint")}</p>${command ? html`<details class="runtime-manual-command"><summary>${machineText("manualCommand")}</summary><label class="field"><span>${machineText("command")}</span><input class="runtime-command" value=${command} readOnly=${true} spellcheck=${false} /></label><p class="note">${machineText("manualMultiHint")}</p></details>` : null}`)}
|
|
414
416
|
${approveStep}`;
|
|
415
417
|
|
|
416
|
-
const computers = html`<section class="runtime-computers"><div class="runtime-computers-heading"><h3>${machineText("computersTitle")}</h3><div class="note">${state.data ? machineText("machineCount",allMachines.length) : !state.error ? html`<${Skeleton} variant="inline" lines=${1} />` : "—"}</div></div>
|
|
418
|
+
const computers = html`<section class="runtime-computers"><div class="runtime-computers-heading"><h3>${machineText("computersTitle")}</h3><div class="note">${state.data ? machineText((allMachines.length) === 1 ? "machineCountOne" : "machineCount",allMachines.length) : !state.error ? html`<${Skeleton} variant="inline" lines=${1} />` : "—"}</div></div>
|
|
417
419
|
<section class="runtime-machines" aria-label=${machineText("machines")}>${!state.data && !state.error ? html`<${Skeleton} variant="cards" lines=${2} label=${machineText("loading")} />` : allMachines.map(machine=>html`<${MachineCard} key=${machine.isLocal ? "local" : machine.id} lease=${lease} onChanged=${state.refresh} machine=${machine} busy=${!!busy || !!machine.probing} action=${action} openDiagnostics=${openDiagnostics} probe=${probeTarget} repairUpdate=${setRepairMachine} />`)}</section>
|
|
418
420
|
${repairMachine ? html`<${Dialog} title=${runtimeUpdateText("repairTitle")} onClose=${() => setRepairMachine(null)}>
|
|
419
421
|
<p>${runtimeUpdateText("repairHint")}</p>
|
|
@@ -430,9 +432,15 @@ export function RuntimesPanel({navKey}) {
|
|
|
430
432
|
${error || state.error ? html`<div class="runtime-error" role="alert"><p>${error || state.error}</p>${state.data && state.error ? html`<p>${machineText("seenCached")}</p>` : null}<button type="button" class="btn btn-sm" onClick=${state.refresh}>${machineText("retry")}</button></div>` : null}
|
|
431
433
|
${pairing ? html`<section class="runtime-pairing" aria-label=${machineText("pairing")}><header><h3>${machineText("pairing")}</h3><p class="note">${machineText("pairingHint")}</p></header><div class="runtime-pairing-body"><div class="runtime-install">${installTabs}<div id="runtime-install-panel" class="runtime-install-panel" role="tabpanel" aria-labelledby=${`runtime-install-tab-${tab}`} data-install-method=${tab}><ol class="runtime-steps">
|
|
432
434
|
${tab === "windows" ? windowsSteps : zipSteps}
|
|
433
|
-
</ol></div></div><aside class=${`runtime-pair-card${awaitingApproval ? " is-pending" : ""}`}><label><span>${machineText("pairingCode")}</span><div class="runtime-pair-code-row"><input class="runtime-pair-code" value=${pairing.code} readOnly=${true} spellcheck=${false} autocomplete="off" /><button type="button" class="btn btn-sm" onClick=${copyCode}><${Icon} name="copy" size=${15} />${machineText(copied ? "codeCopied" : "copyCode")}</button></div></label><p class="note">${machineText("expires",machineTime(pairing.expiresAt))}</p><p class="runtime-pair-status" role="status"><span class="windows-cli-dot"></span>${machineText(awaitingApproval ? "pairingApprove" : "pairingWait")}</p><div class="runtime-pair-actions"><button type="button" class="btn btn-sm" disabled=${!!busy} onClick=${connect}>${machineText("newCode")}</button><button type="button" class="btn btn-ghost btn-sm" onClick=${() => setPairing(null)}>${machineText("closeCode")}</button></div></aside></div></section>` : null}
|
|
435
|
+
</ol></div></div><aside class=${`runtime-pair-card${awaitingApproval ? " is-pending" : ""}`}><label class="field"><span>${machineText("pairingCode")}</span><div class="runtime-pair-code-row"><input class="runtime-pair-code" value=${pairing.code} readOnly=${true} spellcheck=${false} autocomplete="off" /><button type="button" class="btn btn-sm" onClick=${copyCode}><${Icon} name="copy" size=${15} />${machineText(copied ? "codeCopied" : "copyCode")}</button></div></label><p class="note">${machineText("expires",machineTime(pairing.expiresAt))}</p><p class="runtime-pair-status" role="status"><span class="windows-cli-dot"></span>${machineText(awaitingApproval ? "pairingApprove" : "pairingWait")}</p><div class="runtime-pair-actions"><button type="button" class="btn btn-sm" disabled=${!!busy} onClick=${connect}>${machineText("newCode")}</button><button type="button" class="btn btn-ghost btn-sm" onClick=${() => setPairing(null)}>${machineText("closeCode")}</button></div></aside></div></section>` : null}
|
|
434
436
|
<${RuntimeSwitches} lease=${lease} onChanged=${state.refresh} computers=${computers} />
|
|
435
437
|
${diagnosticMachineId !== null ? html`<${RuntimeDiagnosticsDialog} key=${diagnosticMachineId || "local"} navKey=${navKey} machineId=${diagnosticMachineId} machine=${target} enabled=${diagnosticMachineId !== "" || windowsCli} drafts=${drafts.current} session=${taskSessions.current.get(diagnosticMachineId)} taskLease=${lease} onChanged=${state.refresh} onClose=${()=>setDiagnosticMachineId(null)} />` : null}
|
|
436
438
|
<p class="note runtime-operations-note">${machineText("operationsNote")}</p>
|
|
437
439
|
</section>`;
|
|
438
440
|
}
|
|
441
|
+
|
|
442
|
+
// Ridge #3321 S17: one computer, one CLI — not "1 computers", "1 CLIs".
|
|
443
|
+
register("machines", {
|
|
444
|
+
en: { cliCountOne: "{0} CLI", machineCountOne: "{0} computer" },
|
|
445
|
+
"zh-TW": { cliCountOne: "{0} 個 CLI", machineCountOne: "{0} 台電腦" },
|
|
446
|
+
});
|