@songsid/agend 2.3.5-alpha.8 → 2.3.5-alpha.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/accounts-profiles.d.ts +6 -0
- package/dist/accounts-profiles.js +16 -0
- package/dist/accounts-profiles.js.map +1 -1
- package/dist/agent-cli-instructions.md +1 -1
- package/dist/agent-cli.js +5 -2
- package/dist/agent-cli.js.map +1 -1
- package/dist/agent-whats-new.js +5 -0
- package/dist/agent-whats-new.js.map +1 -1
- package/dist/authority/company-join.d.ts +16 -0
- package/dist/authority/company-join.js +37 -0
- package/dist/authority/company-join.js.map +1 -0
- package/dist/authority/hub-initialization.d.ts +13 -0
- package/dist/authority/hub-initialization.js +30 -0
- package/dist/authority/hub-initialization.js.map +1 -0
- package/dist/backend/claude-code.d.ts +1 -0
- package/dist/backend/claude-code.js +13 -0
- package/dist/backend/claude-code.js.map +1 -1
- package/dist/backend/types.d.ts +4 -0
- package/dist/backend/types.js.map +1 -1
- package/dist/build-provenance.json +1 -1
- package/dist/channel/mcp-tools.js +2 -2
- package/dist/channel/mcp-tools.js.map +1 -1
- package/dist/claude-model-minimum.d.ts +7 -0
- package/dist/claude-model-minimum.js +16 -0
- package/dist/claude-model-minimum.js.map +1 -0
- package/dist/daemon.d.ts +43 -1
- package/dist/daemon.js +176 -27
- package/dist/daemon.js.map +1 -1
- package/dist/decision-list.d.ts +2 -0
- package/dist/decision-list.js +1 -1
- package/dist/decision-list.js.map +1 -1
- package/dist/fleet-manager.d.ts +50 -1
- package/dist/fleet-manager.js +306 -32
- package/dist/fleet-manager.js.map +1 -1
- package/dist/general-knowledge/skills/concepts/SKILL.md +14 -3
- package/dist/general-knowledge/skills/delegation-playbook/SKILL.md +4 -1
- package/dist/hub/client.js +2 -0
- package/dist/hub/client.js.map +1 -1
- package/dist/hub/compose/member.js +1 -1
- package/dist/hub/compose/member.js.map +1 -1
- package/dist/hub/compose/server.d.ts +48 -1
- package/dist/hub/compose/server.js +30 -5
- package/dist/hub/compose/server.js.map +1 -1
- package/dist/hub/directory/directory.d.ts +2 -0
- package/dist/hub/directory/directory.js +49 -4
- package/dist/hub/directory/directory.js.map +1 -1
- package/dist/hub/directory/types.d.ts +2 -0
- package/dist/hub/directory/types.js.map +1 -1
- package/dist/hub/enrollment-budget.d.ts +6 -0
- package/dist/hub/enrollment-budget.js +24 -0
- package/dist/hub/enrollment-budget.js.map +1 -0
- package/dist/hub/group-policy/authorization.d.ts +5 -0
- package/dist/hub/group-policy/authorization.js +24 -1
- package/dist/hub/group-policy/authorization.js.map +1 -1
- package/dist/hub/http/compose.js +62 -8
- package/dist/hub/http/compose.js.map +1 -1
- package/dist/hub/http/core.d.ts +2 -0
- package/dist/hub/http/core.js +10 -1
- package/dist/hub/http/core.js.map +1 -1
- package/dist/hub/http/deps.d.ts +3 -0
- package/dist/hub/http/schema.js +4 -0
- package/dist/hub/http/schema.js.map +1 -1
- package/dist/hub/init/browser-certificate.d.ts +6 -1
- package/dist/hub/init/browser-certificate.js +22 -1
- package/dist/hub/init/browser-certificate.js.map +1 -1
- package/dist/hub/init/initializer.d.ts +11 -1
- package/dist/hub/init/initializer.js +202 -83
- package/dist/hub/init/initializer.js.map +1 -1
- package/dist/hub/init/layout.js +1 -1
- package/dist/hub/init/layout.js.map +1 -1
- package/dist/hub/init/text.js +2 -2
- package/dist/hub/init/text.js.map +1 -1
- package/dist/hub/init/types.d.ts +32 -4
- package/dist/hub/init/types.js.map +1 -1
- package/dist/hub/init/web-audit-import.d.ts +12 -0
- package/dist/hub/init/web-audit-import.js +39 -0
- package/dist/hub/init/web-audit-import.js.map +1 -0
- package/dist/hub/init/web-audit.d.ts +30 -0
- package/dist/hub/init/web-audit.js +42 -0
- package/dist/hub/init/web-audit.js.map +1 -0
- package/dist/hub/init/web-error.d.ts +6 -0
- package/dist/hub/init/web-error.js +8 -0
- package/dist/hub/init/web-error.js.map +1 -0
- package/dist/hub/init/web-http.d.ts +9 -0
- package/dist/hub/init/web-http.js +103 -0
- package/dist/hub/init/web-http.js.map +1 -0
- package/dist/hub/init/web.d.ts +118 -0
- package/dist/hub/init/web.js +428 -0
- package/dist/hub/init/web.js.map +1 -0
- package/dist/hub/init/wizard.js +1 -3
- package/dist/hub/init/wizard.js.map +1 -1
- package/dist/hub/join/client.d.ts +35 -0
- package/dist/hub/join/client.js +112 -0
- package/dist/hub/join/client.js.map +1 -0
- package/dist/hub/join/descriptor.d.ts +45 -0
- package/dist/hub/join/descriptor.js +52 -0
- package/dist/hub/join/descriptor.js.map +1 -0
- package/dist/hub/join/fleet-authority.d.ts +2 -0
- package/dist/hub/join/fleet-authority.js +3 -0
- package/dist/hub/join/fleet-authority.js.map +1 -0
- package/dist/hub/join/http.d.ts +8 -0
- package/dist/hub/join/http.js +112 -0
- package/dist/hub/join/http.js.map +1 -0
- package/dist/hub/join/invitation.d.ts +28 -0
- package/dist/hub/join/invitation.js +28 -0
- package/dist/hub/join/invitation.js.map +1 -0
- package/dist/hub/join/local-journal.d.ts +84 -0
- package/dist/hub/join/local-journal.js +65 -0
- package/dist/hub/join/local-journal.js.map +1 -0
- package/dist/hub/join/local.d.ts +116 -0
- package/dist/hub/join/local.js +419 -0
- package/dist/hub/join/local.js.map +1 -0
- package/dist/hub/join/private.d.ts +3 -0
- package/dist/hub/join/private.js +46 -0
- package/dist/hub/join/private.js.map +1 -0
- package/dist/hub/join/protocol.d.ts +69 -0
- package/dist/hub/join/protocol.js +96 -0
- package/dist/hub/join/protocol.js.map +1 -0
- package/dist/hub/join/receipt.d.ts +42 -0
- package/dist/hub/join/receipt.js +75 -0
- package/dist/hub/join/receipt.js.map +1 -0
- package/dist/hub/join/service.d.ts +177 -0
- package/dist/hub/join/service.js +564 -0
- package/dist/hub/join/service.js.map +1 -0
- package/dist/hub/join/store.d.ts +97 -0
- package/dist/hub/join/store.js +87 -0
- package/dist/hub/join/store.js.map +1 -0
- package/dist/hub/join/trust.d.ts +13 -0
- package/dist/hub/join/trust.js +68 -0
- package/dist/hub/join/trust.js.map +1 -0
- package/dist/hub/member/pairing-api.js +6 -1
- package/dist/hub/member/pairing-api.js.map +1 -1
- package/dist/hub/member/pairing-notices.js +6 -4
- package/dist/hub/member/pairing-notices.js.map +1 -1
- package/dist/hub/pairing-notices.d.ts +3 -3
- package/dist/hub/pairing-notices.js +13 -8
- package/dist/hub/pairing-notices.js.map +1 -1
- package/dist/hub/pairing.d.ts +6 -0
- package/dist/hub/pairing.js +6 -6
- package/dist/hub/pairing.js.map +1 -1
- package/dist/hub/protocol.d.ts +29 -0
- package/dist/hub/protocol.js +3 -1
- package/dist/hub/protocol.js.map +1 -1
- package/dist/hub/room-read-pacer.d.ts +14 -0
- package/dist/hub/room-read-pacer.js +51 -0
- package/dist/hub/room-read-pacer.js.map +1 -0
- package/dist/hub/rooms.d.ts +7 -1
- package/dist/hub/rooms.js +25 -13
- package/dist/hub/rooms.js.map +1 -1
- package/dist/hub/runtime.d.ts +4 -0
- package/dist/hub/runtime.js +2 -0
- package/dist/hub/runtime.js.map +1 -1
- package/dist/hub/server.d.ts +3 -0
- package/dist/hub/server.js +14 -0
- package/dist/hub/server.js.map +1 -1
- package/dist/hub/session-directory-transition.d.ts +48 -0
- package/dist/hub/session-directory-transition.js +118 -0
- package/dist/hub/session-directory-transition.js.map +1 -0
- package/dist/hub/session-epoch.d.ts +16 -0
- package/dist/hub/session-epoch.js +50 -0
- package/dist/hub/session-epoch.js.map +1 -0
- package/dist/hub/sessions.d.ts +13 -0
- package/dist/hub/sessions.js +36 -16
- package/dist/hub/sessions.js.map +1 -1
- package/dist/hub/settings-api.d.ts +50 -0
- package/dist/hub/settings-api.js +92 -0
- package/dist/hub/settings-api.js.map +1 -0
- package/dist/hub/settings-commit.d.ts +95 -0
- package/dist/hub/settings-commit.js +490 -0
- package/dist/hub/settings-commit.js.map +1 -0
- package/dist/hub/settings-directory-decision.d.ts +433 -0
- package/dist/hub/settings-directory-decision.js +236 -0
- package/dist/hub/settings-directory-decision.js.map +1 -0
- package/dist/hub/settings-directory-proof.d.ts +77 -0
- package/dist/hub/settings-directory-proof.js +303 -0
- package/dist/hub/settings-directory-proof.js.map +1 -0
- package/dist/hub/store.d.ts +2 -1
- package/dist/hub/store.js +2 -1
- package/dist/hub/store.js.map +1 -1
- package/dist/hub/types.d.ts +4 -2
- package/dist/hub-host-settings.d.ts +48 -0
- package/dist/hub-host-settings.js +85 -0
- package/dist/hub-host-settings.js.map +1 -0
- package/dist/instance-lifecycle.d.ts +3 -0
- package/dist/instance-lifecycle.js +4 -0
- package/dist/instance-lifecycle.js.map +1 -1
- package/dist/locale.js +32 -14
- package/dist/locale.js.map +1 -1
- package/dist/outbound-schemas.d.ts +2 -0
- package/dist/outbound-schemas.js +4 -2
- package/dist/outbound-schemas.js.map +1 -1
- package/dist/pane-port.d.ts +1 -1
- package/dist/profile-signins.d.ts +107 -0
- package/dist/profile-signins.js +249 -0
- package/dist/profile-signins.js.map +1 -0
- package/dist/scheduler/db.d.ts +10 -0
- package/dist/scheduler/db.js +38 -11
- package/dist/scheduler/db.js.map +1 -1
- package/dist/scheduler/types.d.ts +6 -1
- package/dist/settings-api.d.ts +7 -0
- package/dist/settings-api.js +197 -2
- package/dist/settings-api.js.map +1 -1
- package/dist/settings-confirmation.d.ts +1 -1
- package/dist/settings-confirmation.js +1 -1
- package/dist/settings-confirmation.js.map +1 -1
- package/dist/settings-effect.js +58 -0
- package/dist/settings-effect.js.map +1 -1
- package/dist/settings-http-confirmation.d.ts +3 -0
- package/dist/settings-http-confirmation.js +8 -5
- package/dist/settings-http-confirmation.js.map +1 -1
- package/dist/settings-request-capability.d.ts +5 -0
- package/dist/settings-request-capability.js +6 -1
- package/dist/settings-request-capability.js.map +1 -1
- package/dist/structured-signin-transport.d.ts +20 -2
- package/dist/structured-signin-transport.js +57 -6
- package/dist/structured-signin-transport.js.map +1 -1
- package/dist/team-membership.d.ts +7 -0
- package/dist/team-membership.js +10 -0
- package/dist/team-membership.js.map +1 -0
- package/dist/tmux-manager.d.ts +1 -1
- package/dist/tmux-manager.js +4 -1
- package/dist/tmux-manager.js.map +1 -1
- package/dist/topic-commands.js +1 -1
- package/dist/topic-commands.js.map +1 -1
- package/dist/ui/backend-signin.js +51 -15
- package/dist/ui/hub-attachments.js +3 -3
- package/dist/ui/hub-chat-strings.js +2 -0
- package/dist/ui/hub-client.js +9 -3
- package/dist/ui/hub-company-join-strings.js +74 -0
- package/dist/ui/hub-company-join.js +119 -0
- package/dist/ui/hub-group-policy.js +7 -2
- package/dist/ui/hub-owner-strings.js +8 -8
- package/dist/ui/hub-quick-pairing.js +15 -8
- package/dist/ui/hub-quick-strings.js +3 -3
- package/dist/ui/hub-this-hub.js +112 -0
- package/dist/ui/hub-welcome.js +8 -5
- package/dist/ui/panel-hub.js +178 -26
- package/dist/ui/panel-needs.js +1 -1
- package/dist/ui/settings-hub-company-join.js +90 -0
- package/dist/ui/settings-hub-membership.js +2 -1
- package/dist/ui/settings-hub-preview.js +74 -0
- package/dist/ui/settings-hub-run.js +60 -0
- package/dist/ui/settings-hub-section.js +4 -2
- package/dist/ui/settings-registry.js +2 -0
- package/dist/ui/shared/app-i18n.js +1 -1
- package/dist/ui/shared/app-shell.js +21 -17
- package/dist/ui/shared/app.css +9 -8
- package/dist/ui/shared/chat-strings.js +13 -13
- package/dist/ui/shared/hub-chat.css +12 -0
- package/dist/ui/shared/hub-groups.css +2 -0
- package/dist/ui/shared/hub-owner.css +19 -1
- package/dist/ui/shared/hub.css +7 -1
- package/dist/ui/structured-signin.js +24 -6
- package/dist/update-dispatch.d.ts +32 -4
- package/dist/update-dispatch.js +146 -16
- package/dist/update-dispatch.js.map +1 -1
- package/dist/update-launch.d.ts +1 -1
- package/dist/update-launch.js +2 -2
- package/dist/update-launch.js.map +1 -1
- package/dist/view-api.d.ts +2 -8
- package/dist/view-api.js +3 -9
- package/dist/view-api.js.map +1 -1
- package/dist/web-api.d.ts +2 -0
- package/dist/web-api.js +66 -9
- package/dist/web-api.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
// M-2682 (leader, cid-hubname-ui): fleet Settings → Hub → "Run this Hub" (host owner, on a fleet with an initialized Hub).
|
|
2
|
+
// The switch behind hub.enabled, saved and confirmed like the retention card. Stopping the Hub signs everyone out of it and
|
|
3
|
+
// stops every shared agent's chats there, so turning it off asks once first (the shared confirmation, as for a restart);
|
|
4
|
+
// turning it on doesn't. Own lazy module with its own words, so an older tab's strings still work.
|
|
5
|
+
import { html, useEffect, useState } from "/assets/app-html.js";
|
|
6
|
+
import { Skeleton } from "/assets/ui-states.js";
|
|
7
|
+
import { register, t } from "/assets/app-i18n.js";
|
|
8
|
+
import { confirmDialog } from "/assets/ui-confirm.js";
|
|
9
|
+
import { api, confirmedWrite } from "./settings-confirm.js";
|
|
10
|
+
register("hubRun", {
|
|
11
|
+
en: {
|
|
12
|
+
title: "Run this Hub", on: "This Hub is running",
|
|
13
|
+
hint: "When this is off, the Hub stops: nobody can sign in to it, and chats with shared agents wait until it runs again. Its settings, people and records are kept.",
|
|
14
|
+
stopTitle: "Stop this Hub?", stopAsk: "Everyone signed in to the Hub is signed out, and chats with shared agents stop until you turn it on again. Nothing is deleted.",
|
|
15
|
+
stopGo: "Stop the Hub", saved_on: "The Hub is starting.", saved_off: "The Hub is stopped.",
|
|
16
|
+
busy: "Another change to the Hub's settings is still finishing. Try again in a moment.",
|
|
17
|
+
failed: "The change could not be saved. Reload and try again.",
|
|
18
|
+
unavailable: "This switch applies once this fleet's Hub is set up.",
|
|
19
|
+
},
|
|
20
|
+
"zh-TW": {
|
|
21
|
+
title: "執行這個 Hub", on: "這個 Hub 正在執行",
|
|
22
|
+
hint: "關閉後 Hub 會停止:沒有人能登入,與分享的 Agent 的對話會暫停,直到再次開啟。設定、人員和紀錄都會保留。",
|
|
23
|
+
stopTitle: "要停止這個 Hub 嗎?", stopAsk: "所有登入 Hub 的人都會被登出,與分享的 Agent 的對話會暫停,直到你再次開啟。不會刪除任何資料。",
|
|
24
|
+
stopGo: "停止 Hub", saved_on: "Hub 正在啟動。", saved_off: "Hub 已停止。",
|
|
25
|
+
busy: "Hub 設定的另一項變更還在完成中,請稍後再試。",
|
|
26
|
+
failed: "無法儲存這項變更。請重新整理後再試。",
|
|
27
|
+
unavailable: "這個 Fleet 的 Hub 設定完成後,才能使用這個開關。",
|
|
28
|
+
},
|
|
29
|
+
});
|
|
30
|
+
const copy = (key) => t(`hubRun.${key}`);
|
|
31
|
+
|
|
32
|
+
export function HubRunSettings() {
|
|
33
|
+
const [view, setView] = useState(null), [busy, setBusy] = useState(false), [messageKey, setMessageKey] = useState("");
|
|
34
|
+
useEffect(() => {
|
|
35
|
+
let live = true;
|
|
36
|
+
api("/api/settings/hub/run").then((r) => {
|
|
37
|
+
if (!live) return;
|
|
38
|
+
if (r.ok && r.body?.initialized) setView(r.body); else setMessageKey("unavailable");
|
|
39
|
+
}, () => { if (live) setMessageKey("unavailable"); });
|
|
40
|
+
return () => { live = false; };
|
|
41
|
+
}, []);
|
|
42
|
+
const toggle = async (e) => {
|
|
43
|
+
const on = e.target.checked;
|
|
44
|
+
e.target.checked = !on; // the saved state stays shown until the save answers
|
|
45
|
+
if (!view || busy) return;
|
|
46
|
+
if (!on && !(await confirmDialog({ title: copy("stopTitle"), message: copy("stopAsk"), confirmLabel: copy("stopGo"), danger: true }))) return;
|
|
47
|
+
setBusy(true); setMessageKey("");
|
|
48
|
+
try {
|
|
49
|
+
const r = await confirmedWrite("/api/settings/hub/run", { method: "PUT", label: copy("title"), body: { enabled: on } });
|
|
50
|
+
if (r.ok && r.body?.ok) { setView(r.body); setMessageKey(r.body.enabled ? "saved_on" : "saved_off"); }
|
|
51
|
+
else setMessageKey((/^apply_rejected: ([a-z_]+)$/.exec(r.confirmed?.outcome?.detail ?? "")?.[1] ?? r.body?.error) === "busy" ? "busy" : "failed"); // #3451
|
|
52
|
+
} catch { setMessageKey("failed"); } finally { setBusy(false); }
|
|
53
|
+
};
|
|
54
|
+
return html`<section class="card hub-run-settings"><h3>${copy("title")}</h3>
|
|
55
|
+
<p class="note">${copy("hint")}</p>
|
|
56
|
+
${!view && !messageKey ? html`<${Skeleton} variant="form" lines=${2} />` : null}
|
|
57
|
+
${view ? html`<label class="check"><input type="checkbox" class="s-ui-toggle" id="hubRunOn" checked=${view.enabled} disabled=${busy} onChange=${toggle} /> ${copy("on")}</label>` : null}
|
|
58
|
+
${messageKey ? html`<p role="status" class=${messageKey === "busy" || messageKey === "failed" ? "err" : "note"}>${copy(messageKey)}</p>` : null}
|
|
59
|
+
</section>`;
|
|
60
|
+
}
|
|
@@ -53,8 +53,10 @@ export function HubSection({ overPublicLink, hubHost, hubOrigin }) {
|
|
|
53
53
|
if (overPublicLink) return html`<section class="card s-group" id="hub-public-link"><p class="note">${hubSectionText("publicLink")}</p></section>`;
|
|
54
54
|
return html`<div class="s-hub-section">
|
|
55
55
|
<${Lazy} load=${() => import("./settings-hub-membership.js")} pick=${(m) => m.HubMembershipSettings} />
|
|
56
|
-
${hubHost ? html`<${Lazy} load=${() => import("./settings-hub-
|
|
57
|
-
<${Lazy} load=${() => import("./settings-hub-
|
|
56
|
+
${hubHost ? html`<${Lazy} load=${() => import("./settings-hub-run.js")} pick=${(m) => m.HubRunSettings} />
|
|
57
|
+
<${Lazy} load=${() => import("./settings-hub-retention.js")} pick=${(m) => m.HubRetentionSettings} />
|
|
58
|
+
<${Lazy} load=${() => import("./settings-hub-browser-certificate.js")} pick=${(m) => m.HubBrowserCertificateSettings} />
|
|
59
|
+
<${Lazy} load=${() => import("./settings-hub-preview.js")} pick=${(m) => m.HubPreviewSettings} />` : null}
|
|
58
60
|
${groupsHref ? html`<${GroupPermissionsRow} href=${groupsHref} />` : null}
|
|
59
61
|
</div>`;
|
|
60
62
|
}
|
|
@@ -17,6 +17,8 @@ const ROWS = [
|
|
|
17
17
|
["general.location", "agent-defaults", "#general-location", null, null, ["general", "windows", "paired PC", "host", "location"], ["General", "Windows", "電腦", "主機", "執行位置"], L("Run General on", "General 執行位置")],
|
|
18
18
|
// alpha.6 feedback (#2): "hub" found nothing — Settings → Hub's cards. Connect to a Hub is drawn once membership is on.
|
|
19
19
|
["hub.membership", "hub", "#hubMemberEnabled", null, "hub_member.enabled", ["hub", "team hub", "membership", "connect", "join", "pair", "share agents"], ["Hub", "團隊 Hub", "成員", "連線", "加入", "配對", "分享"], L("Allow this fleet to connect to a Hub", "允許這個 Fleet 連線至 Hub")],
|
|
20
|
+
["hub.company-address", "hub", "#hubCompanyAddress", null, null, ["hub", "company account", "company link", "sign in", "connect", "join"], ["Hub", "公司帳號", "公司連結", "登入", "連接", "加入"], L("Hub address or company link", "Hub 位址或公司連結")],
|
|
21
|
+
["hub.company-name", "hub", "#hubCompanyFleetName", null, null, ["fleet", "name", "hub", "company"], ["Fleet", "名稱", "Hub", "公司"], L("Fleet name", "Fleet 名稱")],
|
|
20
22
|
["hub.connect", "hub", "#hub-connect", null, null, ["hub", "connect to a hub", "pairing code", "hub address", "fingerprint", "pair", "unpair", "disconnect", "join"], ["Hub", "連線至 Hub", "配對碼", "Hub 位址", "指紋", "配對", "解除配對", "中斷連線", "加入"], L("Connect to a Hub", "連線至 Hub")],
|
|
21
23
|
["quota.notices", "notifications", "#quota-notices", null, "defaults.quota_notice", ["usage", "quota", "notifications", "remaining", "weekly"], ["用量", "額度", "提醒", "通知", "剩餘"], L("Quota notices", "用量提醒")],
|
|
22
24
|
// You · Preferences
|
|
@@ -161,6 +161,6 @@ register("app", {
|
|
|
161
161
|
search: "搜尋", searchTitle: "搜尋聊天、agent 之間的訊息與任務({0})",
|
|
162
162
|
confirmTitle: "請確認", confirmOk: "繼續", cancel: "取消",
|
|
163
163
|
sidePanelLeave: "不儲存就離開「{0}」?你在那裡的修改會遺失。", sidePanelDiscard: "捨棄修改",
|
|
164
|
-
needs_reason_kiro_choice: "Kiro 需要你決定", needs_reason_hang: "沒有回應", needs_reason_exited: "已結束", needs_reason_assist: "在終端機上等待", needs_reason_question: "正在問你問題", needs_reason_permission: "需要權限", needs_reason_dangerous_command: "危險指令待確認", needs_reason_login: "需要登入", needs_reason_dialog: "停在對話框", needs_reason_terminal_input: "可能在等輸入", needs_reason_auth_paused: "已暫停:需要登入", needs_reason_backend_signin: "後端需要登入", needs_reason_config_invalid: "設定檔需要處理", needs_reason_hub_proposal: "Hub 提議操作:請在本機檢視", needs_reason_hub_execution_hold: "Hub 工作已暫停:請在本機檢視", needs_reason_hub_unavailable: "Hub 未在執行", needs_reason_config_fallback: "正在使用儲存的設定副本", config_history_edit: "{0} 第 {1} 行、第 {2} 欄:{3}。AgEnD 仍使用先前的設定執行。下次重新啟動會改用 {4} 儲存的有效副本。請修正 YAML 錯誤;AgEnD 未更動此檔案。", config_history_no_history: "{0} 第 {1} 行、第 {2} 欄:{3}。AgEnD 仍使用先前的設定執行。沒有可用的有效副本,下次重新啟動將無法自動恢復。請在重新啟動前修正 YAML 錯誤;AgEnD 未更動此檔案。", config_history_fallback: "{0} 第 {1} 行、第 {2} 欄:{3}。AgEnD 已使用 {4} 儲存的有效副本啟動。請修正 YAML 錯誤並重新載入設定。AgEnD 未更動磁碟上的檔案。", needs_reason_general_windows_offline: "General 所在的 Windows 電腦已離線", needs_reason_general_location_hold: "General 執行位置", needs_reason_native_pane_hold: "Windows
|
|
164
|
+
needs_reason_kiro_choice: "Kiro 需要你決定", needs_reason_hang: "沒有回應", needs_reason_exited: "已結束", needs_reason_assist: "在終端機上等待", needs_reason_question: "正在問你問題", needs_reason_permission: "需要權限", needs_reason_dangerous_command: "危險指令待確認", needs_reason_login: "需要登入", needs_reason_dialog: "停在對話框", needs_reason_terminal_input: "可能在等輸入", needs_reason_auth_paused: "已暫停:需要登入", needs_reason_backend_signin: "後端需要登入", needs_reason_config_invalid: "設定檔需要處理", needs_reason_hub_proposal: "Hub 提議操作:請在本機檢視", needs_reason_hub_execution_hold: "Hub 工作已暫停:請在本機檢視", needs_reason_hub_unavailable: "Hub 未在執行", needs_reason_config_fallback: "正在使用儲存的設定副本", config_history_edit: "{0} 第 {1} 行、第 {2} 欄:{3}。AgEnD 仍使用先前的設定執行。下次重新啟動會改用 {4} 儲存的有效副本。請修正 YAML 錯誤;AgEnD 未更動此檔案。", config_history_no_history: "{0} 第 {1} 行、第 {2} 欄:{3}。AgEnD 仍使用先前的設定執行。沒有可用的有效副本,下次重新啟動將無法自動恢復。請在重新啟動前修正 YAML 錯誤;AgEnD 未更動此檔案。", config_history_fallback: "{0} 第 {1} 行、第 {2} 欄:{3}。AgEnD 已使用 {4} 儲存的有效副本啟動。請修正 YAML 錯誤並重新載入設定。AgEnD 未更動磁碟上的檔案。", needs_reason_general_windows_offline: "General 所在的 Windows 電腦已離線", needs_reason_general_location_hold: "General 執行位置", needs_reason_native_pane_hold: "Windows Agent 需要處理", needs_reason_crashed: "已崩潰", needs_reason_usage_limit: "用量已達上限 · 恢復時間未知", needs_reason_delivery_uncertain: "無法確認是否送達", needs_reason_delivery_failed: "傳送失敗", needs_reason_missed_offline: "AgEnD 離線時錯過", needs_reason_task_review: "等你確認", needs_reason_task_blocked: "卡住,在問你",
|
|
165
165
|
},
|
|
166
166
|
});
|
|
@@ -347,9 +347,10 @@ function hubMarks() {
|
|
|
347
347
|
return { hub: tokens.includes("hub"), member: tokens.includes("member") };
|
|
348
348
|
}
|
|
349
349
|
/**
|
|
350
|
-
* The Hub workspace's sidebar
|
|
351
|
-
*
|
|
352
|
-
*
|
|
350
|
+
* The Hub workspace's sidebar — cid-hub-shell-parity (the user's approved mockup): the fleet dashboard's own, so the two
|
|
351
|
+
* read as one product (style guide rule 1). The brand is one line ("AgEnD Hub"; the Hub's name, when it has one, is its
|
|
352
|
+
* tooltip — never a second line, never repeated); the rows, the conversation list and the foot come from the Hub's lazy
|
|
353
|
+
* module (HubSide, HubFoot). An older Hub module without them gets its HubNav and session row, or the three page links.
|
|
353
354
|
*/
|
|
354
355
|
function HubSidebar({ route }) {
|
|
355
356
|
const name = String(document.body?.dataset?.hubName || "").trim();
|
|
@@ -358,28 +359,31 @@ function HubSidebar({ route }) {
|
|
|
358
359
|
aria-current=${tab === key ? "page" : undefined} onClick=${closeDrawer}><${Icon} name=${icon} /><span class="grow">${t(`hubShell.${key}`)}</span></a>`;
|
|
359
360
|
return html`<aside id="sidebar" class="sidebar" aria-label=${t("app.menu")}>
|
|
360
361
|
<div class="side-head" data-trust="navigation">
|
|
361
|
-
<a class="brand
|
|
362
|
-
<button type="button" class="icon-btn side-collapse" onClick=${toggleSidebar} aria-label=${narrow() ? t("app.closeMenu") : t("app.collapse")} title=${narrow() ? t("app.closeMenu") : t("app.collapse")} aria-controls="sidebar"><${Icon} name
|
|
362
|
+
<a class="brand" href="/ui/hub" title=${name || undefined} onClick=${closeDrawer}>${t("hubShell.brand")}</a>
|
|
363
|
+
<button type="button" class="icon-btn side-collapse" onClick=${toggleSidebar} aria-label=${narrow() ? t("app.closeMenu") : t("app.collapse")} title=${narrow() ? t("app.closeMenu") : t("app.collapse")} aria-controls="sidebar"><${Icon} name=${narrow() ? "close" : "sidebar"} /></button>
|
|
363
364
|
</div>
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
</nav>
|
|
367
|
-
<div class="side-foot" data-trust="navigation"><${HubSessionSlot} /></div>
|
|
365
|
+
<${HubSideSlot} fallback=${html`<nav data-trust="navigation" class="side-nav" aria-label=${t("app.menu")}>${row("ask", "/ui/hub", "chat")}${row("exposures", "/ui/hub/exposures", "globe")}${row("admin", "/ui/hub/admin", "key")}</nav>`} />
|
|
366
|
+
<div class="side-foot" data-trust="navigation"><${HubFootSlot} /></div>
|
|
368
367
|
<${SidebarResize} />
|
|
369
368
|
</aside>`;
|
|
370
369
|
}
|
|
371
|
-
/**
|
|
372
|
-
|
|
370
|
+
/** The Hub's lazy module (panel-hub.js) for the sidebar's parts — imported where it mounts (the browser keeps one copy). */
|
|
371
|
+
const loadHubModule = () => import("/ui/js/panel-hub.js");
|
|
372
|
+
/** The rows and conversation list (HubSide); an older module's HubNav inside the nav; `fallback` until it loads, or when it has neither. */
|
|
373
|
+
function HubSideSlot({ fallback }) {
|
|
373
374
|
const [mod, setMod] = useState(null);
|
|
374
375
|
const [none, setNone] = useState(false);
|
|
375
|
-
useEffect(() => { let live = true;
|
|
376
|
-
|
|
376
|
+
useEffect(() => { let live = true; loadHubModule().then((m) => { if (!live) return; if (m.HubSide || m.HubNav) setMod(() => m); else setNone(true); }, () => { if (live) setNone(true); }); return () => { live = false; }; }, []);
|
|
377
|
+
if (mod && mod.HubSide) return html`<${mod.HubSide} onPick=${closeDrawer} />`;
|
|
378
|
+
if (mod && mod.HubNav) return html`<nav data-trust="navigation" class="side-nav hub-side-nav" aria-label=${t("app.menu")}><${mod.HubNav} onPick=${closeDrawer} /></nav>`;
|
|
379
|
+
return none ? fallback : null;
|
|
377
380
|
}
|
|
378
|
-
/** The
|
|
379
|
-
function
|
|
381
|
+
/** The foot (HubFoot: Settings and the session row); an older module's session row. */
|
|
382
|
+
function HubFootSlot() {
|
|
380
383
|
const [mod, setMod] = useState(null);
|
|
381
|
-
useEffect(() => { let live = true;
|
|
382
|
-
|
|
384
|
+
useEffect(() => { let live = true; loadHubModule().then((m) => { if (live && (m.HubFoot || m.HubSessionMenu)) setMod(() => m); }, () => {}); return () => { live = false; }; }, []);
|
|
385
|
+
if (!mod) return null;
|
|
386
|
+
return mod.HubFoot ? html`<${mod.HubFoot} />` : html`<${mod.HubSessionMenu} />`;
|
|
383
387
|
}
|
|
384
388
|
/** A member fleet's "My fleet ↔ Hub" switcher: its module loads only on a member page, and shows only once paired. */
|
|
385
389
|
function HubSwitcherSlot() {
|
package/dist/ui/shared/app.css
CHANGED
|
@@ -420,7 +420,7 @@ html:has(.shell), html:has(.shell) body { overflow: hidden; }
|
|
|
420
420
|
.dlg-box { display: flex; flex-direction: column; max-height: 85vh; }
|
|
421
421
|
.dlg-box:focus { outline: none; } /* the open dialog's first stop (ui-dialog.js): no ring; Tab moves on with one */
|
|
422
422
|
.dlg-head { display: flex; align-items: center; gap: var(--s-2); padding: var(--s-4) var(--s-3) var(--s-2) var(--s-5); }
|
|
423
|
-
.dlg-title { flex: 1; font-size: var(--fs-lg); font-weight: var(--fw-semibold); }
|
|
423
|
+
.dlg-title { flex: 1; font-size: var(--fs-lg); font-weight: var(--fw-semibold); overflow-wrap: anywhere; }
|
|
424
424
|
.dlg-body { padding: var(--s-2) var(--s-5) var(--s-4); overflow-y: auto; display: flex; flex-direction: column; gap: var(--s-3); }
|
|
425
425
|
.dlg-actions { display: flex; justify-content: flex-end; gap: var(--s-2); padding: var(--s-3) var(--s-5) var(--s-5); }
|
|
426
426
|
/* A drawer (ui-dialog.js `drawer`): on a desk, the right edge at full height, the page in view beside it. A phone keeps
|
|
@@ -550,12 +550,12 @@ html:has(.shell), html:has(.shell) body { overflow: hidden; }
|
|
|
550
550
|
.s-setting-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px 20px; min-width: 0; padding: 14px 0; }
|
|
551
551
|
.s-setting-row + .s-setting-row { border-top: 1px solid var(--border); }
|
|
552
552
|
.s-setting-row .note { margin: 5px 0 0; }
|
|
553
|
-
.p-settings input.s-ui-toggle { appearance: none; position: relative; display: inline-block; flex: none; width: 38px; height: 22px; min-height: 0; margin: 0; padding: 0; border: 1px solid var(--border-strong); border-radius: 20px; background: var(--surface-3, var(--surface-2)); cursor: pointer; }
|
|
554
|
-
.p-settings input.s-ui-toggle::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--text-3); transition: transform var(--t-fast); }
|
|
555
|
-
.p-settings input.s-ui-toggle:checked { background: var(--accent); border-color: var(--accent); }
|
|
556
|
-
.p-settings input.s-ui-toggle:checked::after { background: var(--on-accent, #fff); transform: translateX(16px); }
|
|
557
|
-
.p-settings input.s-ui-toggle:disabled { cursor: default; opacity: 0.55; }
|
|
558
|
-
.p-settings input.s-ui-toggle:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
|
|
553
|
+
.p-settings input.s-ui-toggle, .p-hub input.s-ui-toggle { appearance: none; position: relative; display: inline-block; flex: none; width: 38px; height: 22px; min-height: 0; margin: 0; padding: 0; border: 1px solid var(--border-strong); border-radius: 20px; background: var(--surface-3, var(--surface-2)); cursor: pointer; }
|
|
554
|
+
.p-settings input.s-ui-toggle::after, .p-hub input.s-ui-toggle::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--text-3); transition: transform var(--t-fast); }
|
|
555
|
+
.p-settings input.s-ui-toggle:checked, .p-hub input.s-ui-toggle:checked { background: var(--accent); border-color: var(--accent); }
|
|
556
|
+
.p-settings input.s-ui-toggle:checked::after, .p-hub input.s-ui-toggle:checked::after { background: var(--on-accent, #fff); transform: translateX(16px); }
|
|
557
|
+
.p-settings input.s-ui-toggle:disabled, .p-hub input.s-ui-toggle:disabled { cursor: default; opacity: 0.55; }
|
|
558
|
+
.p-settings input.s-ui-toggle:focus-visible, .p-hub input.s-ui-toggle:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
|
|
559
559
|
.s-classic-area { display: flex; flex-direction: column; gap: 16px; }
|
|
560
560
|
.s-classic-area > .s-ap-group { margin-bottom: 0; }
|
|
561
561
|
@media (max-width: 600px) {
|
|
@@ -1266,6 +1266,7 @@ img.amb-p { object-fit: contain; }
|
|
|
1266
1266
|
.dlg-actions .btn { flex: 1; min-height: var(--tap); }
|
|
1267
1267
|
.row-item .btn, .s-row .btn, .n-actions .btn { min-height: var(--tap); }
|
|
1268
1268
|
.s-row .icon-btn { min-width: var(--tap); min-height: var(--tap); }
|
|
1269
|
+
.p-settings .s-company-join :is(.field input, .btn) { min-height: var(--tap); }
|
|
1269
1270
|
.kv { flex-direction: column; align-items: flex-start; gap: 2px; }
|
|
1270
1271
|
}
|
|
1271
1272
|
@media (prefers-reduced-motion: reduce) {
|
|
@@ -1793,7 +1794,7 @@ textarea.s-yaml { white-space: pre; overflow-x: auto; }
|
|
|
1793
1794
|
.signin-browser-actions { display: flex; flex: 1; flex-wrap: wrap; justify-content: flex-end; gap: var(--s-2); min-width: 0; }
|
|
1794
1795
|
.signin-browser-actions .btn { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
|
|
1795
1796
|
@media (pointer: coarse), (max-width: 899px) {
|
|
1796
|
-
.signin-browser :is(button, a), .signin-browser-actions .btn { min-height: var(--tap); }
|
|
1797
|
+
.signin-browser :is(button, a), .signin-browser-actions .btn, .signin-browser ~ .note .btn { min-height: var(--tap); }
|
|
1797
1798
|
}
|
|
1798
1799
|
@media (max-width: 899px) {
|
|
1799
1800
|
.grid2 { grid-template-columns: minmax(0, 1fr); }
|
|
@@ -176,15 +176,15 @@ register("chat", {
|
|
|
176
176
|
nativeBusy: "Windows CLI 正在執行其他任務,完成後即可傳送;輸入內容會保留。",
|
|
177
177
|
nativeBlocked: "上次 Windows 執行的結束狀態不明。請先確認相關程序已停止,再解除鎖定。",
|
|
178
178
|
nativeRecover: "已確認程序停止,解除鎖定",
|
|
179
|
-
paneHostUpgrade: "這台 Windows 的終端主機仍使用舊版轉接器。請先停止這台電腦的 Windows
|
|
180
|
-
paneCodexSessionUnconfirmed: "無法確認 Windows Codex
|
|
181
|
-
paneSessionUnconfirmed: "無法確認 Windows Claude
|
|
179
|
+
paneHostUpgrade: "這台 Windows 的終端主機仍使用舊版轉接器。請先停止這台電腦的 Windows Agent,重新啟動 Windows,再按「啟動」。已儲存的對話會保留。",
|
|
180
|
+
paneCodexSessionUnconfirmed: "無法確認 Windows Codex 已儲存的對話。這個 Agent 已停止,管理員可以開始新對話。",
|
|
181
|
+
paneSessionUnconfirmed: "無法確認 Windows Claude 已儲存的對話。這個 Agent 已停止,管理員可以開始新對話。",
|
|
182
182
|
paneNewConversation: "開始新對話",
|
|
183
183
|
paneNewConversationConfirm: "要為 {0} 開始新對話嗎?原本的對話識別碼會保留在收據中,也不會重送舊輸入。",
|
|
184
|
-
paneRecoveryNeeded: "無法確認上一個 Windows
|
|
184
|
+
paneRecoveryNeeded: "無法確認上一個 Windows 終端是否已結束。已儲存的對話會保留,也不會重送舊輸入。管理員可在停止這個 Agent 的 Windows 程序後復原。",
|
|
185
185
|
paneRecover: "復原已儲存的對話",
|
|
186
|
-
paneRecoverConfirm: "復原 {0}
|
|
187
|
-
paneProcessesStopped: "
|
|
186
|
+
paneRecoverConfirm: "復原 {0},不重送先前的輸入。請確認這個 Agent 在 Windows 上的所有程序都已停止,再按「啟動」接續已儲存的對話。",
|
|
187
|
+
paneProcessesStopped: "我已停止這個 Agent 在 Windows 上的所有程序。",
|
|
188
188
|
paneRecoverConfirmed: "已停止程序,復原對話",
|
|
189
189
|
nativeComposerHint: "Enter 送出 · Shift+Enter 換行",
|
|
190
190
|
nativeComposerHintTouch: "Return 換行 · 按「送出」傳送",
|
|
@@ -210,8 +210,8 @@ register("chat", {
|
|
|
210
210
|
|
|
211
211
|
cmdConfirm: "清空", cmdConfirmBackend: "切換並重新啟動", cmdRunning: "執行 /{0} 中…", cmdNotCommand: "這裡沒有這個指令——按 Enter 會當成一般訊息送出。", cmdNotGuests: "訪客在這裡不能使用這個指令。", cmdDismiss: "關閉", cmdCommands: "指令",
|
|
212
212
|
compactRunning: "壓縮中…", compactDone: "✅ 對話已壓縮", compactUnknown: "這個後端不會回報壓縮何時完成。",
|
|
213
|
-
compactTimeout: "{0}
|
|
214
|
-
compactLost: "
|
|
213
|
+
compactTimeout: "{0} 分鐘內沒有看到壓縮完成的紀錄,請到 Agent 自己的對話確認。",
|
|
214
|
+
compactLost: "無法再追蹤這次壓縮:指令沒有送到 Agent,或 Agent 已停止、換了後端。",
|
|
215
215
|
compactNotCompacted: "kiro 沒有壓縮對話:對話太短,或壓縮被中止了。",
|
|
216
216
|
cmdChoose: "選擇", cmdCurrent: "目前", cmdSignIn: "登入", cmdSignInTo: "登入 {0}", chipCompact: "壓縮", chipClear: "清空…", chipContext: "已用 {0}% 的 context",
|
|
217
217
|
chipModel: "模型:{0}——選擇其他", chipEffort: "推理強度:{0}——選擇其他",
|
|
@@ -237,7 +237,7 @@ register("chat", {
|
|
|
237
237
|
pvChanged: "預覽已停止——訊息內容變了。請再預覽一次。", pvTruncated: "內容被截斷——請 agent 改用 .html 檔案傳送。",
|
|
238
238
|
pvLoading: "正在讀取檔案…", pvAttOver: "這個檔案超過 50 MB,不提供預覽,請下載後開啟。",
|
|
239
239
|
pvLarge: "這個檔案比較大({0}),仍要預覽嗎?", pvAnyway: "仍要預覽",
|
|
240
|
-
pvAttGone: "
|
|
240
|
+
pvAttGone: "這裡已無法取得這個檔案(檔案已變更,或 Fleet 已重新啟動)。請 agent 再傳一次。",
|
|
241
241
|
pvAttFailed: "無法讀取這個檔案,請再試一次。",
|
|
242
242
|
pvBannerAck: "我知道了", pvBannerAckTitle: "隱藏這則提醒,直到下次登入",
|
|
243
243
|
attGone: "AgEnD 重新啟動後找不到這個檔案(已移動、刪除或變更)。請 agent 再傳一次。", attUnavailable: "無法取得", yesterdayAt: "昨天 {0}",
|
|
@@ -269,17 +269,17 @@ register("chat", {
|
|
|
269
269
|
pvWhyOptin: "還沒允許 HTML 預覽。可從這張卡片的 ⋯ 選單或「設定 → 偏好設定」允許。",
|
|
270
270
|
pvWhyOptinPanel: "還沒允許 HTML 預覽。",
|
|
271
271
|
pvWhyNever: "這台裝置在這個工作階段已關閉預覽。",
|
|
272
|
-
pvWhyOrigin: "預覽已關閉:這個頁面位於 {0}
|
|
272
|
+
pvWhyOrigin: "預覽已關閉:這個頁面位於 {0},但 Fleet 認為它位於 {1}(有會改寫 Host 的反向代理)。請讓外部 Host 原樣傳入,或設定 web.preview_origin。",
|
|
273
273
|
pvUnknownAddress: "未知的網址", pvWhyServer: "這裡無法使用預覽。",
|
|
274
274
|
pvHtmlOver: "這段 HTML 超過 50 MB,不提供預覽,請下載後開啟。",
|
|
275
275
|
pvNoAnswer: "無法預覽:預覽在 3 秒內沒有回應。如果先前的預覽卡住了,它可能還在執行——請在新分頁開啟儀表板。透過 SSH 使用時,也要轉送預覽的連接埠。",
|
|
276
276
|
pvStoppedAnswering: "預覽沒有回應,已將它關閉。", pvSwitchedOff: "這台裝置已關閉預覽。",
|
|
277
|
-
pvAnother: "另一個預覽已開始。", pvWrongBoot: "
|
|
277
|
+
pvAnother: "另一個預覽已開始。", pvWrongBoot: "無法預覽:預覽連接埠上回應的不是這個 Fleet。",
|
|
278
278
|
pvBanner: "預覽會在隔離的框架裡執行 agent 的 HTML。它無法使用你的登入,但可能把資料傳出去。只預覽你信任的內容。預覽可能讓這個分頁變慢或卡住。",
|
|
279
|
-
pvServer_fleetOff: "
|
|
279
|
+
pvServer_fleetOff: "這個 Fleet 已關閉預覽(web.preview: false)。", pvServer_unchecked: "無法確認這個網址。",
|
|
280
280
|
pvServer_noPort: "預覽沒有可用的連接埠:請設定 web.preview_port(health_port 已是最大的連接埠)。",
|
|
281
281
|
pvServer_notListed: "{0} 不提供預覽:請把這個網址(含連接埠)加入 web.allowed_hosts,並設定 web.preview_origin。",
|
|
282
|
-
pvServer_needOrigin: "
|
|
282
|
+
pvServer_needOrigin: "透過通道或反向代理開啟儀表板時,預覽需要設定 web.preview_origin。",
|
|
283
283
|
pvServer_needHttps: "以 https 開啟儀表板時,預覽需要 https 的 web.preview_origin。",
|
|
284
284
|
pvServer_sameOrigin: "預覽的來源不能和儀表板相同。",
|
|
285
285
|
pvServer_publicLink: "公開連結的預覽已關閉(web.preview_on_public_link: false)。要預覽,請在執行 AgEnD 的那台機器上開啟儀表板。",
|
|
@@ -84,3 +84,15 @@
|
|
|
84
84
|
|
|
85
85
|
/* An HTML block's Download needs the preview (#3226 E): not offered in the Hub's thread until then. */
|
|
86
86
|
.hub-scroller .pv-dl { display: none; }
|
|
87
|
+
/* cid-hub-shell-parity: the Hub's sidebar is the dashboard's own (side-row, side-new, side-label, side-foot, prefs-pop);
|
|
88
|
+
only what the Hub adds is here — its conversation filter, the list's count and empty line, and its foot's two parts. */
|
|
89
|
+
.hub-side-rooms .hub-rooms { padding: 0 var(--s-1); }
|
|
90
|
+
.hub-side-filter { display: flex; align-items: center; gap: var(--s-2); margin: 0 var(--s-2) var(--s-2); padding: 0 var(--s-2);
|
|
91
|
+
background: var(--surface); border-radius: var(--r-sm); color: var(--text-3); }
|
|
92
|
+
.hub-side-filter input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--text); padding: 7px 0; font: inherit; font-size: var(--fs-sm); outline: none; }
|
|
93
|
+
.hub-side-rooms .inst-head > .count { padding: var(--s-3) var(--s-3) var(--s-1); color: var(--text-3); font-size: var(--fs-xs); }
|
|
94
|
+
.side-foot > .hub-prefs { flex: 1; min-width: 0; }
|
|
95
|
+
.side-foot > .hub-session-row, .hub-session-row > .menu, .hub-session-row > .menu > .side-row { width: 100%; min-width: 0; }
|
|
96
|
+
/* The foot is the sidebar's bottom: its session menu opens upward (as the dashboard's), never below the screen. */
|
|
97
|
+
.hub-session-row .hub-session-menu .menu-list { top: auto; bottom: calc(100% + 6px); left: auto; right: 0; max-width: calc(var(--sidebar-w, 260px) - 2 * var(--s-2)); }
|
|
98
|
+
|
|
@@ -24,3 +24,5 @@
|
|
|
24
24
|
.hub-group-fleets { display: inline-flex; align-items: center; gap: var(--s-1); }
|
|
25
25
|
.hub-group-fleets input { width: 4.5em; }
|
|
26
26
|
.hub-groups-impact ul { margin: var(--s-1) 0 var(--s-2); padding-left: var(--s-4); }
|
|
27
|
+
/* A phone's Remove is a full touch target whichever line it wraps onto (Fable #3424 N1: its size followed the font). */
|
|
28
|
+
@media (max-width: 899px) { .hub-rows .s-row.hub-row.hub-group-row > .btn { min-height: var(--tap); min-width: var(--tap); } }
|
|
@@ -3,6 +3,9 @@
|
|
|
3
3
|
/* ── My shared agents and Administration (#3226 C): Settings' page layout ── */
|
|
4
4
|
.hub-page-body { padding: var(--s-4) max(var(--s-5), env(safe-area-inset-right)) var(--s-6) max(var(--s-5), env(safe-area-inset-left)); }
|
|
5
5
|
.hub-owner { width: 100%; max-width: 860px; min-width: 0; margin: 0 auto; display: flex; flex-direction: column; gap: var(--s-3); }
|
|
6
|
+
/* The page body is the gutter (the dashboard's: 20 px, 16 px on a phone); its column adds none — a .col's own padding
|
|
7
|
+
on top of it was a double gutter (Argon #11: 32 px on a phone). */
|
|
8
|
+
.hub-page-body > .col { padding: 0; }
|
|
6
9
|
.hub-crumb { display: inline-flex; align-items: center; gap: var(--s-1); color: var(--text-2); font-size: var(--fs-sm); text-decoration: none; width: fit-content; }
|
|
7
10
|
.hub-rows { display: flex; flex-direction: column; gap: var(--s-2); margin-top: var(--s-2); }
|
|
8
11
|
.hub-rows .s-row.hub-row { display: flex; align-items: center; gap: var(--s-3); flex-wrap: nowrap; background: var(--surface-2); }
|
|
@@ -26,8 +29,23 @@
|
|
|
26
29
|
.hub-steps > li.now::before { background: var(--text); color: var(--bg); }
|
|
27
30
|
.hub-step-body > span { display: flex; flex-direction: column; gap: 2px; }
|
|
28
31
|
.hub-step-form { display: flex; gap: var(--s-2); align-items: center; flex-wrap: wrap; width: 100%; }
|
|
29
|
-
.hub-step-form .field { margin: 0; flex: 1; min-width:
|
|
32
|
+
.hub-step-form .field { margin: 0; flex: 1 1 14em; min-width: 14em; } /* a phone: the button wraps under the field, never squeezing it */
|
|
30
33
|
.hub-steps .hub-offer { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: start; margin: 0; padding: 0; }
|
|
31
34
|
.hub-steps > li::before { align-self: flex-start; margin-top: 1px; }
|
|
32
35
|
.hub-steps .hub-offer > * { text-align: start; align-self: flex-start; justify-self: start; margin-left: 0; } /* hub.css's `.hub-steps small` auto margin would push a short line right */
|
|
33
36
|
@media (max-width: 899px) { .hub-page-body { padding: var(--s-3) var(--s-4) var(--s-6); } }
|
|
37
|
+
/* M-2682: Administration → This Hub — the name form, then what identifies this Hub (labels left; stacked on a phone). */
|
|
38
|
+
.hub-this-form .field { max-width: 32em; }
|
|
39
|
+
.hub-this-actions { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-2); }
|
|
40
|
+
.hub-this-facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: var(--s-2) var(--s-4); margin: var(--s-4) 0 0; }
|
|
41
|
+
.hub-this-facts dt { color: var(--text-2); }
|
|
42
|
+
.hub-this-facts dd { margin: 0; min-width: 0; display: flex; flex-direction: column; gap: var(--s-1); overflow-wrap: anywhere; }
|
|
43
|
+
@media (max-width: 899px) {
|
|
44
|
+
.hub-this-facts { grid-template-columns: minmax(0, 1fr); gap: var(--s-1); }
|
|
45
|
+
.hub-this-facts dd { margin-bottom: var(--s-2); }
|
|
46
|
+
/* A phone's Administration: every button and text field is a full touch target, so one class combination keeps one height. */
|
|
47
|
+
.hub-admin .btn, .hub-admin .field input { min-height: var(--tap); }
|
|
48
|
+
}
|
|
49
|
+
.hub-page-lead { margin: 0; }
|
|
50
|
+
/* A phone's page-level controls are tap targets (--tap): the chats home's New chat row and a sub-page's crumb. */
|
|
51
|
+
@media (max-width: 600px) { .hub-home-list .side-new, .hub-crumb { min-height: var(--tap); } .hub-crumb { min-width: var(--tap); } }
|
package/dist/ui/shared/hub.css
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/* AgEnD Hub P1, slice 3: the Hub pages' own stylesheet, linked by their lazy modules (hub-strings.js linkHubCss), so a
|
|
2
2
|
tab opened before an upgrade (an app.css without these rules) draws them the same. Never loaded while the Hub is off. */
|
|
3
|
-
.hub-brand-name { color: var(--text-2); font-weight: var(--fw-medium); }
|
|
4
3
|
.hub-switch { display: flex; gap: 2px; margin: 0 var(--s-3) var(--s-2); padding: 2px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface-2); }
|
|
5
4
|
.hub-switch-item { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: var(--s-1); min-height: 28px; padding: 0 var(--s-2);
|
|
6
5
|
border-radius: var(--r-sm); font-size: var(--fs-sm); color: var(--text-2); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
@@ -13,6 +12,9 @@ a.hub-switch-item:focus-visible { outline: 2px solid var(--focus); outline-offse
|
|
|
13
12
|
.hub-state { display: grid; gap: var(--s-2); margin-top: var(--s-3); }
|
|
14
13
|
.hub-state h4 { margin: 0; display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; }
|
|
15
14
|
.hub-origin code { overflow-wrap: anywhere; }
|
|
15
|
+
@media (max-width: 899px) {
|
|
16
|
+
.p-hub .hub-company-join > .check, .p-hub .hub-company-join > details > summary { min-height: var(--tap); }
|
|
17
|
+
}
|
|
16
18
|
.hub-fp { display: grid; gap: var(--s-1); }
|
|
17
19
|
.hub-fp-label { font-size: var(--fs-sm); color: var(--text-2); }
|
|
18
20
|
.hub-fp-groups { font-family: var(--font-mono); font-size: var(--fs-md); letter-spacing: .04em; word-spacing: .3em; overflow-wrap: anywhere; }
|
|
@@ -41,6 +43,10 @@ a.hub-switch-item:focus-visible { outline: 2px solid var(--focus); outline-offse
|
|
|
41
43
|
.hub-ask, .hub-mine, .hub-admin { display: grid; gap: var(--s-3); align-content: start; }
|
|
42
44
|
.hub-body > * { width: 100%; max-width: 860px; min-width: 0; }
|
|
43
45
|
.hub-body .card { margin-bottom: 0; }
|
|
46
|
+
/* The Notices page (the only place the security notices show, Argon #5): the card wears the page's own card frame (the
|
|
47
|
+
Settings layout's), the whole height of the page — no 38vh box scrolling inside it there. */
|
|
48
|
+
.hub-notices-col > .hub-security-notices { margin: 0; padding: 20px; border: 1px solid var(--border); border-radius: 10px; box-shadow: none; max-height: none; overflow: visible; }
|
|
49
|
+
@media (max-width: 600px) { .hub-notices-col > .hub-security-notices { padding: 16px; } }
|
|
44
50
|
@media (max-width: 899px) { .hub-body { padding: var(--s-3) var(--s-4) var(--s-6); } }
|
|
45
51
|
.hub-signin { max-width: 420px; }
|
|
46
52
|
.hub-signin h2 { margin: 0 0 var(--s-1); }
|
|
@@ -22,6 +22,9 @@ export const SIGNIN_STRINGS = {
|
|
|
22
22
|
error_backend_signin_local_only: "Backend sign-in is available only on this computer. Use the local setup page, or sign in later.",
|
|
23
23
|
error_signin_session_expired: "This setup session has ended. Reopen setup on the host.",
|
|
24
24
|
error_expired: "This login attempt expired. Start a new attempt.",
|
|
25
|
+
error_busy: "Another sign-in is already running. Finish or cancel it, then try again.",
|
|
26
|
+
error_signin_busy: "Another sign-in is already running. Finish or cancel it, then try again.",
|
|
27
|
+
error_signin_profile_unknown: "This account is not in the list. Add it with + Add account in Settings → Accounts, then sign in.",
|
|
25
28
|
error_auth_unconfirmed: "The CLI exited, but credentials could not be verified. Retry or sign in later.",
|
|
26
29
|
error_provider_rejected: "The provider rejected this sign-in. Retry or sign in later.",
|
|
27
30
|
// #3190 Part 3c: a profile on a paired computer (the dashboard's Accounts view).
|
|
@@ -56,6 +59,9 @@ export const SIGNIN_STRINGS = {
|
|
|
56
59
|
error_backend_signin_local_only: "後端登入只能在這台電腦上進行。請使用本機的設定頁,或稍後登入。",
|
|
57
60
|
error_signin_session_expired: "這個設定工作階段已結束。請在主機上重新開啟設定。",
|
|
58
61
|
error_expired: "這次登入已過期。請重新開始。",
|
|
62
|
+
error_busy: "已有另一個登入正在進行。請等它結束或先取消,再試一次。",
|
|
63
|
+
error_signin_busy: "已有另一個登入正在進行。請等它結束或先取消,再試一次。",
|
|
64
|
+
error_signin_profile_unknown: "清單裡沒有這個帳號。請先在 設定 → 帳號 用 + 新增帳號 加入,再登入。",
|
|
59
65
|
error_auth_unconfirmed: "CLI 已結束,但無法確認憑證。請重試或稍後登入。",
|
|
60
66
|
error_provider_rejected: "平台拒絕了這次登入。請重試或稍後登入。",
|
|
61
67
|
// #3190 Part 3c:配對電腦上的憑證設定檔(儀表板的「帳號」頁)。
|
|
@@ -79,8 +85,19 @@ const pageLang = doc => /^zh/i.test(doc?.documentElement?.lang || "") ? "zh-TW"
|
|
|
79
85
|
* `machine` (#3190 Part 3c): these cards are for ONE credential profile on a paired computer (the endpoint carries `?machine=&profile=`). The dialog around them says
|
|
80
86
|
* so, so the setup page's heading and lead are not repeated; there is no "sign in later" (this is an explicit request); and a sign-in again asks nothing about
|
|
81
87
|
* Kiro (Claude Code's own sign-in replaces the login; it signs nothing out first).
|
|
88
|
+
*
|
|
89
|
+
* `dashboard` (#3321 S01, S12): the cards are inside the dashboard, where the dialog's own title names the CLI and the question "Sign in again?" is asked in the dashboard's
|
|
90
|
+
* own confirmation (`ask`) — the setup page's heading, lead and "You can continue setup" are not repeated, and the browser's `confirm()` is not used.
|
|
91
|
+
*
|
|
92
|
+
* `dialog: true` (#3212, named accounts on this host): the cards are inside Settings → Accounts' sign-in dialog for ONE account, which says WHICH account in its title; it
|
|
93
|
+
* is the same screen for the default account and a named one. So the rest of what the first-install page needs is left out too: no "Check sign-ins" button (the cards read
|
|
94
|
+
* themselves every second) and no "Sign in later" (nothing would remember it). `focus` (a backend id) then shows only that backend's card: the default account's checklist may
|
|
95
|
+
* hold others. The setup page and the installer's `?backend_signins=` list do not pass `dialog`, and look as they did.
|
|
96
|
+
*
|
|
97
|
+
* `started` (run id → void): called with the id of the run a press of Sign in in THESE cards started (not one that was already running when they were drawn). The account dialog
|
|
98
|
+
* keeps it, to end exactly that run when it closes.
|
|
82
99
|
*/
|
|
83
|
-
export function mountStructuredSignIns(root, { endpoint, fetcher = fetch, changed = () => {}, lang, machine = false, ask, dashboard = false } = {}) {
|
|
100
|
+
export function mountStructuredSignIns(root, { endpoint, fetcher = fetch, changed = () => {}, lang, machine = false, ask, dashboard = false, dialog = false, focus, started = () => {} } = {}) {
|
|
84
101
|
const doc = root.ownerDocument;
|
|
85
102
|
let view = null, busy = false, disposed = false, timer = null, generation = 0, message = "", rendered = "";
|
|
86
103
|
const language = () => (lang ? lang() : pageLang(doc)) === "zh-TW" ? "zh-TW" : "en";
|
|
@@ -102,7 +119,7 @@ export function mountStructuredSignIns(root, { endpoint, fetcher = fetch, change
|
|
|
102
119
|
async function perform(data) {
|
|
103
120
|
if (busy || disposed) return;
|
|
104
121
|
busy = true; generation++; message = ""; render();
|
|
105
|
-
try { const next = await request(data); if (!disposed) accept(next); }
|
|
122
|
+
try { const next = await request(data); if (!disposed) { accept(next); if (data?.operation === "start" && typeof next?.login?.id === "string") started(next.login.id); } }
|
|
106
123
|
catch (error) { if (!disposed) message = String(error?.message || "error"); }
|
|
107
124
|
finally { busy = false; if (!disposed) render(); }
|
|
108
125
|
}
|
|
@@ -114,8 +131,9 @@ export function mountStructuredSignIns(root, { endpoint, fetcher = fetch, change
|
|
|
114
131
|
// "continue setup" are not repeated there.
|
|
115
132
|
if (!machine && !dashboard) { el("h2", tr("heading")); el("p", tr("lead")); }
|
|
116
133
|
if (message) { const alert = el("p", errorText(message)); alert.setAttribute("role", "alert"); }
|
|
117
|
-
|
|
118
|
-
|
|
134
|
+
// In the account dialog the cards read themselves every second, so there is no Check sign-ins — except when the first read failed and there is nothing to show: then it is the Retry.
|
|
135
|
+
if (!view) { if (!dialog || message) button(root, tr("check"), () => perform({ operation: "refresh" })); return; }
|
|
136
|
+
for (const backend of dialog && focus ? view.selected.filter(b => b === focus) : view.selected) {
|
|
119
137
|
const card = el("section"); card.dataset.backend = backend;
|
|
120
138
|
el("h3", name(backend), card);
|
|
121
139
|
const state = view.states[backend], pending = view.pending.includes(backend), skipped = view.skipped.includes(backend);
|
|
@@ -158,9 +176,9 @@ export function mountStructuredSignIns(root, { endpoint, fetcher = fetch, change
|
|
|
158
176
|
await perform({ operation: "start", backend, relogin });
|
|
159
177
|
});
|
|
160
178
|
}
|
|
161
|
-
if (pending && !skipped && !machine) button(card, tr("later"), () => perform({ operation: "skip", backend }));
|
|
179
|
+
if (pending && !skipped && !machine && !dialog) button(card, tr("later"), () => perform({ operation: "skip", backend }));
|
|
162
180
|
}
|
|
163
|
-
button(root, tr("check"), () => perform({ operation: "refresh" }));
|
|
181
|
+
if (!dialog) button(root, tr("check"), () => perform({ operation: "refresh" }));
|
|
164
182
|
if (view.ready && !machine && !dashboard) el("p", tr("ready"));
|
|
165
183
|
}
|
|
166
184
|
async function poll() {
|
|
@@ -1,16 +1,39 @@
|
|
|
1
1
|
export interface DispatchDeps {
|
|
2
|
-
|
|
2
|
+
/** `env.PATH` (#3440) replaces PATH for that one program: an npm is asked in the PATH the update will run with. */
|
|
3
|
+
run(command: string, args: string[], timeoutMs: number, env?: {
|
|
4
|
+
PATH: string;
|
|
5
|
+
}): Promise<{
|
|
3
6
|
status: number | null;
|
|
4
7
|
stdout: string;
|
|
5
8
|
}>;
|
|
6
9
|
readFile(path: string): Promise<string>;
|
|
7
10
|
realpath(path: string): Promise<string>;
|
|
11
|
+
/** An executable file there (#3440). */
|
|
12
|
+
isExecutable?(path: string): Promise<boolean>;
|
|
13
|
+
/** The package directory this code runs from — whose global root the npm asked must have (#3440). Null: unknown. */
|
|
14
|
+
packageDir?: string | null;
|
|
15
|
+
/** The Node running this process (#3440): the npm beside it is a candidate when AgEnD runs on a plain Node. */
|
|
16
|
+
execPath?: string;
|
|
17
|
+
/** This process's PATH (#3440): where PATH's `npm` lives. */
|
|
18
|
+
pathEnv?: string;
|
|
8
19
|
}
|
|
9
20
|
export declare const defaultDispatchDeps: DispatchDeps;
|
|
21
|
+
/**
|
|
22
|
+
* #3440: the `npm` beside a POSIX global install of this package: `<prefix>/lib/node_modules/@songsid/agend` →
|
|
23
|
+
* `<prefix>/bin/npm`, run by `<prefix>/bin/node`. npm takes its global prefix from the Node that runs it, and its
|
|
24
|
+
* `#!/usr/bin/env node` would pick PATH's Node — the same system one that hid the install — so the prefix's own Node runs
|
|
25
|
+
* it explicitly. Null for anything else (a checkout, a Windows prefix). (From the 雲晴家 fleet operator's patch.)
|
|
26
|
+
*/
|
|
27
|
+
export declare function colocatedNpm(packageDir: string | null | undefined, platform?: NodeJS.Platform): {
|
|
28
|
+
command: string;
|
|
29
|
+
args: string[];
|
|
30
|
+
} | null;
|
|
31
|
+
/** `npmDir` (#3440): the directory of the npm that proved this install — the update runs with it first on PATH. */
|
|
10
32
|
export type InstalledAgend = {
|
|
11
33
|
ok: true;
|
|
12
34
|
agend: string;
|
|
13
35
|
version: string;
|
|
36
|
+
npmDir?: string;
|
|
14
37
|
} | {
|
|
15
38
|
ok: false;
|
|
16
39
|
reason: string;
|
|
@@ -19,10 +42,15 @@ export type InstalledAgend = {
|
|
|
19
42
|
export declare function resolveInstalledAgend(deps?: DispatchDeps): Promise<InstalledAgend>;
|
|
20
43
|
/**
|
|
21
44
|
* `<installed agend> update`, 2 s from now, from a detached `sh`. Service callers must wrap it in an independent scope before launch. The
|
|
22
|
-
* path is a positional argument, never spliced into the script.
|
|
45
|
+
* path is a positional argument, never spliced into the script. #3440: the agend's own bin directory (`<prefix>/bin`,
|
|
46
|
+
* where its `npm` and `node` live) goes first on PATH, so the CLI's npm checks and install use the npm that installed
|
|
47
|
+
* it, not a system npm the service's PATH happens to list first. (From the 雲晴家 fleet operator's patch.) That also puts
|
|
48
|
+
* every global package's bin ahead of the system tools for the updater's run — as in an nvm user's own shell.
|
|
23
49
|
*/
|
|
24
|
-
export declare const DELAYED_UPDATE_SCRIPT = "sleep 2 && exec \"$1\" update";
|
|
25
|
-
|
|
50
|
+
export declare const DELAYED_UPDATE_SCRIPT = "sleep 2 && PATH=\"${1%/*}:$PATH\" && export PATH && exec \"$1\" update";
|
|
51
|
+
/** #3443 review: with the proving npm's directory (`$2`, data) ahead of the agend's own — it may hold no npm (a custom prefix). */
|
|
52
|
+
export declare const DELAYED_UPDATE_SCRIPT_NPM = "sleep 2 && PATH=\"$2:${1%/*}:$PATH\" && export PATH && exec \"$1\" update";
|
|
53
|
+
export declare function updateCommand(agend: string, npmDir?: string): {
|
|
26
54
|
command: string;
|
|
27
55
|
args: string[];
|
|
28
56
|
};
|