@songsid/agend 2.3.5-alpha.10 → 2.3.5-alpha.11
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 +14 -0
- package/dist/accounts-view.js +22 -6
- package/dist/accounts-view.js.map +1 -1
- package/dist/agent-cli-instructions.md +2 -2
- package/dist/auth-api.d.ts +48 -16
- package/dist/auth-api.js +99 -32
- package/dist/auth-api.js.map +1 -1
- package/dist/authority/settings-role.d.ts +56 -0
- package/dist/authority/settings-role.js +48 -0
- package/dist/authority/settings-role.js.map +1 -0
- package/dist/backend/claude-code.d.ts +2 -0
- package/dist/backend/claude-code.js +16 -3
- package/dist/backend/claude-code.js.map +1 -1
- package/dist/backend/cli-env-probe.js +6 -2
- package/dist/backend/cli-env-probe.js.map +1 -1
- package/dist/backend/codex.d.ts +5 -3
- package/dist/backend/codex.js +31 -13
- package/dist/backend/codex.js.map +1 -1
- package/dist/backend/credential-profile.d.ts +2 -0
- package/dist/backend/credential-profile.js +2 -0
- package/dist/backend/credential-profile.js.map +1 -1
- package/dist/backend/kiro.js +1 -1
- package/dist/backend/kiro.js.map +1 -1
- package/dist/backend/types.d.ts +5 -1
- package/dist/backend/types.js.map +1 -1
- package/dist/backend-availability.d.ts +15 -0
- package/dist/backend-availability.js +37 -1
- package/dist/backend-availability.js.map +1 -1
- package/dist/build-provenance.json +1 -1
- package/dist/bundled-tmux-guard.d.ts +4 -0
- package/dist/bundled-tmux-guard.js +7 -0
- package/dist/bundled-tmux-guard.js.map +1 -1
- package/dist/claude-auth-status.d.ts +20 -8
- package/dist/claude-auth-status.js +38 -22
- package/dist/claude-auth-status.js.map +1 -1
- package/dist/cli-audited.d.ts +60 -0
- package/dist/cli-audited.js +84 -0
- package/dist/cli-audited.js.map +1 -0
- package/dist/cli-capability.d.ts +36 -5
- package/dist/cli-capability.js +2 -2
- package/dist/cli-capability.js.map +1 -1
- package/dist/cli-caps-module.d.ts +5 -1
- package/dist/cli-caps-module.js +4 -2
- package/dist/cli-caps-module.js.map +1 -1
- package/dist/cli-registry-check.js +16 -2
- package/dist/cli-registry-check.js.map +1 -1
- package/dist/cli-registry.d.ts +56 -4
- package/dist/cli-registry.js +1 -1
- package/dist/cli-registry.js.map +1 -1
- package/dist/cli-spec-antigravity.d.ts +12 -1
- package/dist/cli-spec-antigravity.js +13 -1
- package/dist/cli-spec-antigravity.js.map +1 -1
- package/dist/cli-spec-claude-code.d.ts +9 -0
- package/dist/cli-spec-claude-code.js +4 -2
- package/dist/cli-spec-claude-code.js.map +1 -1
- package/dist/cli-spec-codex.d.ts +10 -1
- package/dist/cli-spec-codex.js +5 -3
- package/dist/cli-spec-codex.js.map +1 -1
- package/dist/cli-spec-grok.d.ts +5 -0
- package/dist/cli-spec-grok.js +6 -1
- package/dist/cli-spec-grok.js.map +1 -1
- package/dist/cli-spec-kiro-cli.d.ts +7 -1
- package/dist/cli-spec-kiro-cli.js +7 -3
- package/dist/cli-spec-kiro-cli.js.map +1 -1
- package/dist/cli-spec-muse.d.ts +2 -0
- package/dist/cli-spec-muse.js +3 -1
- package/dist/cli-spec-muse.js.map +1 -1
- package/dist/cli-spec-opencode.d.ts +11 -1
- package/dist/cli-spec-opencode.js +7 -2
- package/dist/cli-spec-opencode.js.map +1 -1
- package/dist/cli.js +28 -1
- package/dist/cli.js.map +1 -1
- package/dist/daemon.d.ts +3 -0
- package/dist/daemon.js +17 -2
- package/dist/daemon.js.map +1 -1
- package/dist/fleet-context.d.ts +5 -1
- package/dist/fleet-manager.d.ts +337 -69
- package/dist/fleet-manager.js +1247 -355
- package/dist/fleet-manager.js.map +1 -1
- package/dist/fleet-process-handlers.d.ts +1 -1
- package/dist/fleet-process-handlers.js +3 -2
- package/dist/fleet-process-handlers.js.map +1 -1
- package/dist/general-knowledge/skills/concepts/SKILL.md +21 -14
- package/dist/general-knowledge/skills/credential-profiles/SKILL.md +9 -8
- package/dist/general-knowledge/skills/cross-instance-messaging/SKILL.md +9 -1
- package/dist/general-knowledge/skills/web-dashboard/SKILL.md +27 -20
- package/dist/instance-lifecycle.js +4 -2
- package/dist/instance-lifecycle.js.map +1 -1
- package/dist/instructions.js +29 -6
- package/dist/instructions.js.map +1 -1
- package/dist/locale.js +119 -75
- package/dist/locale.js.map +1 -1
- package/dist/login-manager.d.ts +2 -2
- package/dist/login-manager.js +3 -2
- package/dist/login-manager.js.map +1 -1
- package/dist/native-model-catalog.d.ts +20 -0
- package/dist/native-model-catalog.js +107 -2
- package/dist/native-model-catalog.js.map +1 -1
- package/dist/public-web-gateway.js +1 -1
- package/dist/public-web-gateway.js.map +1 -1
- package/dist/runtime-api.d.ts +1 -1
- package/dist/runtime-api.js +104 -12
- package/dist/runtime-api.js.map +1 -1
- package/dist/runtime-autostart.d.ts +61 -0
- package/dist/runtime-autostart.js +161 -0
- package/dist/runtime-autostart.js.map +1 -0
- package/dist/runtime-background.d.ts +200 -0
- package/dist/runtime-background.js +480 -0
- package/dist/runtime-background.js.map +1 -0
- package/dist/runtime-build-info.js +5 -5
- package/dist/runtime-build-info.js.map +1 -1
- package/dist/runtime-cli-background.d.ts +92 -0
- package/dist/runtime-cli-background.js +336 -0
- package/dist/runtime-cli-background.js.map +1 -0
- package/dist/runtime-cli-install.d.ts +148 -8
- package/dist/runtime-cli-install.js +253 -59
- package/dist/runtime-cli-install.js.map +1 -1
- package/dist/runtime-cli.d.ts +8 -1
- package/dist/runtime-cli.js +206 -44
- package/dist/runtime-cli.js.map +1 -1
- package/dist/runtime-client-store.d.ts +11 -0
- package/dist/runtime-client-store.js +20 -5
- package/dist/runtime-client-store.js.map +1 -1
- package/dist/runtime-client.d.ts +23 -1
- package/dist/runtime-client.js +92 -6
- package/dist/runtime-client.js.map +1 -1
- package/dist/runtime-connection.d.ts +1 -1
- package/dist/runtime-connection.js +1 -1
- package/dist/runtime-connection.js.map +1 -1
- package/dist/runtime-coordinator.d.ts +95 -1
- package/dist/runtime-coordinator.js +344 -10
- package/dist/runtime-coordinator.js.map +1 -1
- package/dist/runtime-enroll-notice.d.ts +4 -0
- package/dist/runtime-enroll-notice.js +21 -0
- package/dist/runtime-enroll-notice.js.map +1 -0
- package/dist/runtime-enrollment.d.ts +21 -0
- package/dist/runtime-enrollment.js +52 -0
- package/dist/runtime-enrollment.js.map +1 -0
- package/dist/runtime-pane-native.js +4 -4
- package/dist/runtime-pane-native.js.map +1 -1
- package/dist/runtime-protocol.d.ts +78 -1
- package/dist/runtime-protocol.js +95 -5
- package/dist/runtime-protocol.js.map +1 -1
- package/dist/runtime-remote-accounts.d.ts +12 -0
- package/dist/runtime-remote-accounts.js +56 -5
- package/dist/runtime-remote-accounts.js.map +1 -1
- package/dist/runtime-remote-setup.d.ts +4 -1
- package/dist/runtime-remote-setup.js +4 -1
- package/dist/runtime-remote-setup.js.map +1 -1
- package/dist/runtime-update-controller.d.ts +11 -0
- package/dist/runtime-update-controller.js +56 -4
- package/dist/runtime-update-controller.js.map +1 -1
- package/dist/settings-api.d.ts +13 -1
- package/dist/settings-api.js +39 -3
- package/dist/settings-api.js.map +1 -1
- package/dist/settings-change.d.ts +5 -13
- package/dist/settings-change.js.map +1 -1
- package/dist/settings-confirmation.d.ts +11 -13
- package/dist/settings-confirmation.js +2 -6
- package/dist/settings-confirmation.js.map +1 -1
- package/dist/settings-effect.d.ts +5 -0
- package/dist/settings-effect.js +76 -10
- package/dist/settings-effect.js.map +1 -1
- package/dist/settings-http-confirmation.d.ts +8 -1
- package/dist/settings-http-confirmation.js +39 -13
- package/dist/settings-http-confirmation.js.map +1 -1
- package/dist/settings-request-capability.d.ts +7 -0
- package/dist/settings-request-capability.js +3 -1
- package/dist/settings-request-capability.js.map +1 -1
- package/dist/setup-i18n.js +4 -4
- package/dist/setup-i18n.js.map +1 -1
- package/dist/subagent-records.d.ts +45 -0
- package/dist/subagent-records.js +214 -0
- package/dist/subagent-records.js.map +1 -0
- package/dist/subagent-service.d.ts +27 -0
- package/dist/subagent-service.js +199 -0
- package/dist/subagent-service.js.map +1 -0
- package/dist/tmux-manager.d.ts +2 -2
- package/dist/tmux-manager.js +5 -3
- package/dist/tmux-manager.js.map +1 -1
- package/dist/ui/account-identity.js +7 -5
- package/dist/ui/accounts-keepalive.js +17 -17
- package/dist/ui/accounts-manage.js +34 -34
- package/dist/ui/accounts-view.js +63 -21
- package/dist/ui/agent-runtime-settings.js +1 -1
- package/dist/ui/backend-signin.js +67 -67
- package/dist/ui/chat-msg-actions.js +50 -4
- package/dist/ui/chat-quote.js +256 -0
- package/dist/ui/chat-store.js +9 -4
- package/dist/ui/cli-caps.js +7 -7
- package/dist/ui/credential-profile-select.js +4 -4
- package/dist/ui/general-location.js +1 -1
- package/dist/ui/host-install.js +290 -0
- package/dist/ui/hub-company-join-strings.js +3 -0
- package/dist/ui/hub-company-join.js +20 -2
- package/dist/ui/hub-owner-strings.js +5 -4
- package/dist/ui/hub-pairing-progress-strings.js +1 -1
- package/dist/ui/hub-quick-strings.js +4 -4
- package/dist/ui/machine-signin.js +4 -4
- package/dist/ui/model-picker.js +68 -0
- package/dist/ui/panel-chat.js +73 -13
- package/dist/ui/panel-fleet.js +1 -1
- package/dist/ui/panel-hub.js +8 -4
- package/dist/ui/panel-needs.js +2 -2
- package/dist/ui/panel-runtimes.js +232 -33
- package/dist/ui/panel-windows-cli.js +1 -1
- package/dist/ui/runtime-cli-install.js +99 -20
- package/dist/ui/runtime-commands.d.ts +2 -0
- package/dist/ui/runtime-commands.js +34 -1
- package/dist/ui/runtime-update-status.js +2 -2
- package/dist/ui/search-dialog.js +1 -0
- package/dist/ui/settings-access-strings.js +1 -1
- package/dist/ui/settings-catalog.js +19 -3
- package/dist/ui/settings-confirm.js +2 -2
- package/dist/ui/settings-devices.js +59 -25
- package/dist/ui/settings-dialogs.js +12 -13
- package/dist/ui/settings-guests.js +1 -1
- package/dist/ui/settings-hub-company-join.js +10 -7
- package/dist/ui/settings-hub-connection.js +121 -0
- package/dist/ui/settings-hub-membership.js +1 -1
- package/dist/ui/settings-hub-run.js +5 -6
- package/dist/ui/settings-hub-section.js +3 -6
- package/dist/ui/settings-hub.js +12 -7
- package/dist/ui/settings-layout.js +6 -6
- package/dist/ui/settings-outside.js +87 -19
- package/dist/ui/settings-registry.js +2 -1
- package/dist/ui/settings-revoke-strings.js +28 -0
- package/dist/ui/settings-strings.js +19 -19
- package/dist/ui/settings-web-authority.js +11 -4
- package/dist/ui/shared/accounts.css +11 -1
- package/dist/ui/shared/agend-auth.js +8 -1
- package/dist/ui/shared/app-i18n.js +10 -12
- package/dist/ui/shared/app-session.js +13 -16
- package/dist/ui/shared/app-shell.js +36 -36
- package/dist/ui/shared/app.css +35 -2
- package/dist/ui/shared/chat-strings.js +4 -4
- package/dist/ui/shared/device-roles.js +27 -0
- package/dist/ui/shared/host-install.css +10 -0
- package/dist/ui/shared/hub-owner.css +6 -0
- package/dist/ui/shared/model-picker.css +21 -0
- package/dist/ui/shared/runtime-install.css +26 -1
- package/dist/ui/shared/setup-host-text.js +4 -4
- package/dist/ui/shared/signin-authenticator.js +60 -0
- package/dist/ui/shared/signin.js +45 -25
- package/dist/ui/shared/subagent-row.css +15 -0
- package/dist/ui/shared/usage-dialog.js +1 -1
- package/dist/ui/shared/view-strings.js +7 -7
- package/dist/ui/shared/web-authorize.js +53 -3
- package/dist/ui/signin-authenticator.html +60 -0
- package/dist/ui/structured-signin.js +30 -30
- package/dist/ui/subagent-row.js +72 -0
- package/dist/ui/web-terminal/terminal.js +9 -9
- package/dist/update-launch.js +4 -1
- package/dist/update-launch.js.map +1 -1
- package/dist/update-npm-env.d.ts +70 -0
- package/dist/update-npm-env.js +128 -0
- package/dist/update-npm-env.js.map +1 -0
- package/dist/usage/providers.js +2 -2
- package/dist/usage/providers.js.map +1 -1
- package/dist/web-api.d.ts +33 -4
- package/dist/web-api.js +312 -18
- package/dist/web-api.js.map +1 -1
- package/dist/web-auth.js +1 -1
- package/dist/web-auth.js.map +1 -1
- package/dist/web-channel-echo.js +3 -1
- package/dist/web-channel-echo.js.map +1 -1
- package/dist/web-commands.d.ts +9 -1
- package/dist/web-commands.js +7 -1
- package/dist/web-commands.js.map +1 -1
- package/dist/web-host-install.d.ts +127 -0
- package/dist/web-host-install.js +165 -0
- package/dist/web-host-install.js.map +1 -0
- package/dist/web-remote-access.d.ts +126 -11
- package/dist/web-remote-access.js +267 -34
- package/dist/web-remote-access.js.map +1 -1
- package/dist/web-session.d.ts +11 -3
- package/dist/web-session.js.map +1 -1
- package/dist/web-signin-device.d.ts +16 -0
- package/dist/web-signin-device.js +81 -0
- package/dist/web-signin-device.js.map +1 -0
- package/dist/web-update.js +3 -1
- package/dist/web-update.js.map +1 -1
- package/dist/windows-cli-api.js +2 -1
- package/dist/windows-cli-api.js.map +1 -1
- package/dist/windows-cli-worker.d.ts +14 -0
- package/dist/windows-cli-worker.js +145 -1
- package/dist/windows-cli-worker.js.map +1 -1
- package/dist/windows-cli.d.ts +4 -0
- package/dist/windows-cli.js +9 -1
- package/dist/windows-cli.js.map +1 -1
- package/launcher/agend-install.cjs +16 -3
- package/package.json +1 -1
- package/templates/runtime-install/install.ps1 +219 -12
|
@@ -3,11 +3,13 @@ import { register, t } from "/assets/app-i18n.js";
|
|
|
3
3
|
import { confirmDialog } from "/assets/ui-confirm.js";
|
|
4
4
|
import { ErrorState, Skeleton } from "/assets/ui-states.js";
|
|
5
5
|
import { CLI_CAPS } from "./cli-caps.js";
|
|
6
|
+
import { confirmedWrite } from "./settings-confirm.js";
|
|
6
7
|
|
|
7
8
|
/**
|
|
8
9
|
* #3190 Part 3b: install a CLI on a paired Windows computer, from Settings → Runtime. The page sends only a CLI id; the Runtime on that computer decides the
|
|
9
10
|
* package, the exact version, the folder and the checks. It happens only while that computer's owner has turned the "install" switch on THERE (the page can
|
|
10
|
-
* read the switch, never change it). Claude Code and
|
|
11
|
+
* read the switch, never change it). Only what AgEnD can pin and check: Claude Code, Codex and OpenCode (a pinned npm package) and Antigravity (one pinned download, #3521); the other CLIs
|
|
12
|
+
* show their official command, and why, for the computer's owner to run.
|
|
11
13
|
*/
|
|
12
14
|
register("runtimeInstall", {
|
|
13
15
|
en: { title: "Install a CLI", lead: "Installs the fixed version AgEnD pins, into this Runtime's own folder on that computer. No administrator, no PATH change, no vendor script.",
|
|
@@ -15,6 +17,8 @@ register("runtimeInstall", {
|
|
|
15
17
|
switchOff: "The owner of that computer has not turned this on. On that computer, run:", switchOn: "Allowed by that computer's owner.", switchUntil: "Allowed until {0}.",
|
|
16
18
|
installed: "Installed {0}", installedOther: "Installed {0} (not the version AgEnD installs)", notInstalled: "Not installed", install: "Install {0}", reinstall: "Install pinned {0}", installing: "Installing… this can take a few minutes",
|
|
17
19
|
ask: "Install {0} {1} on {2}? It comes from the official npm registry, is checked against AgEnD's pinned hashes, the registry signatures and the publisher's Windows signature, and is kept in this Runtime's folder on that computer. The install is recorded there.",
|
|
20
|
+
notAudited: "Not yet verified by AgEnD: this version is pinned for its integrity (size, checksum, the publisher's signature), not because AgEnD has audited it.",
|
|
21
|
+
askDownload: "Install {0} {1} on {2}? AgEnD downloads that exact version from the vendor's own address (the vendor's install script is not run), checks its size, its checksum and the publisher's Windows signature, and keeps it in this Runtime's folder on that computer. If any of them does not match, nothing is installed. The install is recorded there.",
|
|
18
22
|
confirm: "Install", done: "{0} {1} is installed.", failed: "The install did not finish: {2}", failedShort: "The install did not finish.", requestFailed: "Could not start the install: {0}",
|
|
19
23
|
othersTitle: "Other CLIs", othersLead: "AgEnD does not install these. The computer's owner can run the vendor's own command in PowerShell on that computer.", needsAdmin: "needs an administrator" },
|
|
20
24
|
"zh-TW": { title: "安裝 CLI", lead: "安裝 AgEnD 固定的版本,裝在那台電腦上 Runtime 自己的資料夾。不需要系統管理員,不改 PATH,也不執行廠商腳本。",
|
|
@@ -22,6 +26,8 @@ register("runtimeInstall", {
|
|
|
22
26
|
switchOff: "那台電腦的主人還沒有開啟這個功能。請在那台電腦執行:", switchOn: "那台電腦的主人已允許。", switchUntil: "已允許,到 {0} 為止。",
|
|
23
27
|
installed: "已安裝 {0}", installedOther: "已安裝 {0}(不是 AgEnD 會安裝的版本)", notInstalled: "尚未安裝", install: "安裝 {0}", reinstall: "安裝固定版本 {0}", installing: "安裝中…可能需要幾分鐘",
|
|
24
28
|
ask: "要在 {2} 安裝 {0} {1} 嗎?它來自官方 npm registry,會比對 AgEnD 內建的雜湊、registry 簽章與發行者的 Windows 數位簽章,並放在那台電腦上 Runtime 自己的資料夾。那台電腦會留下安裝紀錄。",
|
|
29
|
+
notAudited: "尚未經 AgEnD 驗證:這個版本是因為能檢查它的完整性(檔案大小、雜湊、發行者的簽章)才鎖定的,不是 AgEnD 稽核過的版本。",
|
|
30
|
+
askDownload: "要在 {2} 安裝 {0} {1} 嗎?AgEnD 會從廠商自己的網址下載這個固定版本(不執行廠商的安裝腳本),比對檔案大小、雜湊與發行者的 Windows 數位簽章,並放在那台電腦上 Runtime 自己的資料夾。任何一項不符就不會安裝。那台電腦會留下安裝紀錄。",
|
|
25
31
|
confirm: "安裝", done: "{0} {1} 已安裝。", failed: "安裝沒有完成:{2}", failedShort: "安裝沒有完成。", requestFailed: "無法開始安裝:{0}",
|
|
26
32
|
othersTitle: "其他 CLI", othersLead: "AgEnD 不會安裝這些。電腦的主人可以在那台電腦的 PowerShell 執行廠商自己的指令。", needsAdmin: "需要系統管理員" },
|
|
27
33
|
});
|
|
@@ -33,9 +39,9 @@ export const SWITCH_COMMAND = "agend-runtime remote-setup install on --for 2h";
|
|
|
33
39
|
export const INSTALL_CLIS = Object.keys(CLI_CAPS).filter((id) => CLI_CAPS[id].runtimeInstall).map((id) => ({ id, label: CLI_CAPS[id].runtimeName }));
|
|
34
40
|
/** Vendor commands, for the computer's owner to run: AgEnD never sends them anywhere. */
|
|
35
41
|
export const OFFICIAL_COMMANDS = [
|
|
36
|
-
{ id: "grok", label: "Grok", command: "irm https://x.ai/cli/install.ps1 | iex" },
|
|
37
|
-
{ id: "
|
|
38
|
-
{ id: "kiro", label: "Kiro", command: "irm https://cli.kiro.dev/install.ps1 | iex", administrator: true },
|
|
42
|
+
{ id: "grok", label: "Grok", command: "irm https://x.ai/cli/install.ps1 | iex", why: "whyGrok" },
|
|
43
|
+
{ id: "muse", label: "Muse", command: "irm https://dev.meta.ai/install.ps1 | iex", why: "whyMuse" },
|
|
44
|
+
{ id: "kiro", label: "Kiro", command: "irm https://cli.kiro.dev/install.ps1 | iex", administrator: true, why: "whyKiro" },
|
|
39
45
|
];
|
|
40
46
|
/** A computer shows this only when its Runtime says it can (and it is a paired, approved one). */
|
|
41
47
|
/**
|
|
@@ -45,10 +51,63 @@ export const OFFICIAL_COMMANDS = [
|
|
|
45
51
|
export const versionNumber = printed => typeof printed === "string" ? /(?<![\d.])\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?(?![\d.])/.exec(printed)?.[0] ?? null : null;
|
|
46
52
|
export const offersCliInstall = machine => !!machine && !machine.isLocal && machine.runtimeInfo?.capabilities?.includes("cli-install") === true && ["online", "offline"].includes(machine.status);
|
|
47
53
|
|
|
54
|
+
/** -1, 0 or 1: two x.y.z compared number by number (never as text). A prerelease suffix is ignored. Null when either is not a version. */
|
|
55
|
+
export function compareVersions(a, b) {
|
|
56
|
+
const x = /^(\d+)\.(\d+)\.(\d+)/.exec(a || ""), y = /^(\d+)\.(\d+)\.(\d+)/.exec(b || "");
|
|
57
|
+
if (!x || !y) return null;
|
|
58
|
+
for (let i = 1; i <= 3; i++) { const d = Number(x[i]) - Number(y[i]); if (d !== 0) return d < 0 ? -1 : 1; }
|
|
59
|
+
return 0;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
// AGEND-136 (#3521): Update on a computer. The version the Runtime installs is the newest one AgEnD has AUDITED (the pinned table is kept equal to it), so an update is the
|
|
63
|
+
// same pinned, verified install over an older copy — the vendor's own updater never runs there. The page sends the CLI's id, as for an install, and nothing else.
|
|
64
|
+
register("runtimeInstall", {
|
|
65
|
+
en: { update: "Update to {0}", behind: "Installed {0}. AgEnD has audited {1}: Update installs exactly that, with the same checks as an install.",
|
|
66
|
+
current: "Installed {0} — up to date. The newest version AgEnD has audited: {1}.", newer: "Installed {0}, which is newer than {1}, the newest version AgEnD has audited: not verified by AgEnD yet.",
|
|
67
|
+
noUpdate: "Installed {0}. The newest version AgEnD has audited: {1}. This CLI is not updated from here: Install is only for a computer that does not have it yet.",
|
|
68
|
+
askUpdate: "Update {0} on {2} from {3} to {1}? That is the version AgEnD has audited. It comes from the official npm registry, is checked against AgEnD's pinned hashes, the registry signatures and the publisher's Windows signature, and is kept in this Runtime's folder on that computer. The update is recorded there.",
|
|
69
|
+
},
|
|
70
|
+
"zh-TW": { update: "更新到 {0}", behind: "已安裝 {0}。AgEnD 稽核過的版本是 {1}:按「更新」會裝這個版本,檢查和安裝完全一樣。",
|
|
71
|
+
current: "已安裝 {0},是最新的。AgEnD 稽核過的最新版本:{1}。", newer: "已安裝 {0},比 AgEnD 稽核過的最新版本 {1} 還新:尚未經 AgEnD 驗證。",
|
|
72
|
+
noUpdate: "已安裝 {0}。AgEnD 稽核過的最新版本:{1}。這個 CLI 不從這裡更新:「安裝」只給還沒有它的電腦。",
|
|
73
|
+
askUpdate: "要在 {2} 把 {0} 從 {3} 更新到 {1} 嗎?這是 AgEnD 稽核過的版本。它來自官方 npm registry,會比對 AgEnD 內建的雜湊、registry 簽章與發行者的 Windows 數位簽章,並放在那台電腦上 Runtime 自己的資料夾。那台電腦會留下更新紀錄。",
|
|
74
|
+
},
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
// AGEND-153 (the maintainer's decision on #3539): the named exception. Antigravity updates itself and cannot be pinned to a release, so on a computer that already has it the button goes to the
|
|
78
|
+
// vendor's LATEST release — which AgEnD has NOT audited — and says so. The Runtime downloads it from the vendor's own fixed address and checks its checksum and Google's Windows signature first.
|
|
79
|
+
register("runtimeInstall", {
|
|
80
|
+
en: { updateLatest: "Update to latest (not audited by AgEnD)",
|
|
81
|
+
latestInfo: "Installed {0}. AgEnD installs {1}, a version it has audited. Update goes to the latest release the vendor serves, which AgEnD has NOT audited: this CLI updates itself and cannot be pinned.",
|
|
82
|
+
askUpdateLatest: "Update {0} on {1} to the vendor's LATEST release, which AgEnD has NOT audited? This computer downloads the release the vendor's own manifest names (the vendor's update program is not run), checks its checksum and the publisher's Windows signature, and keeps it in this Runtime's folder. If any of them does not match, nothing changes. The update is recorded there.",
|
|
83
|
+
doneLatest: "{0} is now {1}, the latest release the vendor serves (not audited by AgEnD).", cardLabelUpdateLatest: "Update {0} on {1} to the latest release (not audited by AgEnD)" },
|
|
84
|
+
"zh-TW": { updateLatest: "更新到最新版(未經盤點)",
|
|
85
|
+
latestInfo: "已安裝 {0}。AgEnD 會安裝 {1},這是它稽核過的版本。按「更新」會更新到廠商釋出的最新版,這個版本 AgEnD 尚未稽核:這個 CLI 會自己更新,無法指定版本。",
|
|
86
|
+
askUpdateLatest: "要在 {1} 把 {0} 更新到廠商的「最新版」嗎?這個版本 AgEnD 尚未稽核。那台電腦會下載廠商自己的 manifest 指定的版本(不執行廠商的更新程式),比對檔案雜湊與發行者的 Windows 數位簽章,並放在 Runtime 自己的資料夾。任何一項不符就不會改變任何東西。那台電腦會留下更新紀錄。",
|
|
87
|
+
doneLatest: "{0} 現在是 {1},廠商釋出的最新版(未經 AgEnD 盤點)。", cardLabelUpdateLatest: "在 {1} 上把 {0} 更新到最新版(未經 AgEnD 盤點)" },
|
|
88
|
+
});
|
|
89
|
+
|
|
48
90
|
// Ridge #3321 S06 / S09: the words of the loading state and the copyable commands.
|
|
49
91
|
register("runtimeInstall", {
|
|
50
|
-
en: { loading: "Reading this computer's install setting…", copy: "Copy", copied: "Copied", switchCommand: "Command for that computer"
|
|
51
|
-
|
|
92
|
+
en: { loading: "Reading this computer's install setting…", copy: "Copy", copied: "Copied", switchCommand: "Command for that computer",
|
|
93
|
+
cardLabel: "Install {0} on {1}", cardLabelUpdate: "Update {0} on {1}", err_expired: "The install was not confirmed in time.", err_rejected: "The install was turned down.",
|
|
94
|
+
err_stale: "Settings changed before the install could start. Try again.", err_install_confirmation_required: "The install must be confirmed first." },
|
|
95
|
+
"zh-TW": { loading: "正在讀取這台電腦的安裝設定…", copy: "複製", copied: "已複製", switchCommand: "在那台電腦執行的指令",
|
|
96
|
+
cardLabel: "在 {1} 上安裝 {0}", cardLabelUpdate: "在 {1} 上更新 {0}", err_expired: "安裝沒有在時限內確認。", err_rejected: "安裝已被拒絕。",
|
|
97
|
+
err_stale: "安裝開始前設定已經改變。請再試一次。", err_install_confirmation_required: "安裝必須先經過確認。" },
|
|
98
|
+
});
|
|
99
|
+
// AGEND-133 (#3521): why a CLI is not installed from here — AgEnD installs only what it can pin and check (an exact version, its hashes, and who published it).
|
|
100
|
+
register("runtimeInstall", {
|
|
101
|
+
en: {
|
|
102
|
+
whyGrok: "Why not here: Grok's Windows program is not signed by its publisher, so AgEnD could not check who built it, and the vendor script installs whatever version is current.",
|
|
103
|
+
whyMuse: "Why not here: Muse has no package or file with a fixed version AgEnD could check: its launcher installs itself, and updates itself, from the vendor's server.",
|
|
104
|
+
whyKiro: "Why not here: Kiro's Windows installer is an MSI into Program Files, which needs an administrator; the Runtime never has one.",
|
|
105
|
+
},
|
|
106
|
+
"zh-TW": {
|
|
107
|
+
whyGrok: "為什麼不能從這裡安裝:Grok 的 Windows 程式沒有發行者的數位簽章,AgEnD 無法確認是誰建置的;廠商腳本也是裝當下最新的版本。",
|
|
108
|
+
whyMuse: "為什麼不能從這裡安裝:Muse 沒有 AgEnD 能確認的固定版本套件或檔案:它的啟動器會自己從廠商的伺服器安裝、自己更新。",
|
|
109
|
+
whyKiro: "為什麼不能從這裡安裝:Kiro 在 Windows 的安裝程式是裝進 Program Files 的 MSI,需要系統管理員權限,而 Runtime 沒有。",
|
|
110
|
+
},
|
|
52
111
|
});
|
|
53
112
|
/** Ridge #3321 S09: a command to run on that computer — Runtime's labelled command card (runtime-install.css), with Copy. */
|
|
54
113
|
function CommandCard({ label, command }) {
|
|
@@ -59,9 +118,18 @@ function CommandCard({ label, command }) {
|
|
|
59
118
|
<button type="button" class="btn btn-sm" onClick=${copy}>${text(copied ? "copied" : "copy")}</button></div></div>`;
|
|
60
119
|
}
|
|
61
120
|
|
|
121
|
+
/** Why a confirmed install did not start: the computer's own sentence when the gate says `apply_rejected: …`, else the state of the held change, else what the write answered. */
|
|
122
|
+
const refusalOf = (r) => {
|
|
123
|
+
const detail = r.confirmed && r.confirmed.outcome && typeof r.confirmed.outcome.detail === "string" ? /apply_rejected: (.+)$/.exec(r.confirmed.outcome.detail) : null;
|
|
124
|
+
if (detail) return detail[1];
|
|
125
|
+
if (r.confirmed && ["expired", "rejected", "stale"].includes(r.confirmed.state)) return text(`err_${r.confirmed.state}`);
|
|
126
|
+
const code = r.body && r.body.error;
|
|
127
|
+
return code === "install_confirmation_required" ? text("err_install_confirmation_required") : code || `HTTP ${r.status}`;
|
|
128
|
+
};
|
|
129
|
+
|
|
62
130
|
export function CliInstall({ machine, lease, onChanged }) {
|
|
63
131
|
const [view, setView] = useState(null), [error, setError] = useState(""), [note, setNote] = useState(""), [busy, setBusy] = useState(false);
|
|
64
|
-
const last = useRef("");
|
|
132
|
+
const last = useRef(""), latestJob = useRef(false);
|
|
65
133
|
const online = machine.status === "online";
|
|
66
134
|
const path = `/ui/runtimes/machines/${encodeURIComponent(machine.id)}/remote-setup`;
|
|
67
135
|
const load = async () => {
|
|
@@ -87,7 +155,7 @@ export function CliInstall({ machine, lease, onChanged }) {
|
|
|
87
155
|
const before = last.current; last.current = key;
|
|
88
156
|
if (before.endsWith(":installing") && job && job.state !== "installing") {
|
|
89
157
|
const label = INSTALL_CLIS.find(cli => cli.id === job.cli)?.label || job.cli;
|
|
90
|
-
setNote(job.state === "done" ? text("done", label, job.version || "") : job.error ? text("failed", label, job.version || "", job.error) : text("failedShort"));
|
|
158
|
+
setNote(job.state === "done" ? text(latestJob.current && CLI_CAPS[job.cli]?.runtimeUpdateLatest ? "doneLatest" : "done", label, job.version || "") : job.error ? text("failed", label, job.version || "", job.error) : text("failedShort"));
|
|
91
159
|
onChanged?.();
|
|
92
160
|
}
|
|
93
161
|
}, [job]);
|
|
@@ -95,26 +163,36 @@ export function CliInstall({ machine, lease, onChanged }) {
|
|
|
95
163
|
const allowed = switchState?.on === true;
|
|
96
164
|
const row = cli => {
|
|
97
165
|
const entry = (machine.inventory?.clis || []).find(item => item.id === cli.id && item.path);
|
|
98
|
-
const
|
|
166
|
+
const pin = view?.catalog?.find(item => item.id === cli.id), pinned = pin?.version || "", byDownload = pin?.kind === "download", unaudited = pin?.pin === "integrity";
|
|
99
167
|
// What the CLI printed is compared by its version number, whole; the path says nothing (the owner's own copy of the same version is just as installed).
|
|
100
|
-
const found = entry ? versionNumber(entry.version) : null,
|
|
101
|
-
|
|
168
|
+
const found = entry ? versionNumber(entry.version) : null, order = found && pinned ? compareVersions(found, pinned) : null;
|
|
169
|
+
// AGEND-136: at the pinned (= audited) version: up to date. Older: an Update to it. Newer than it: not verified by AgEnD yet, and nothing to install (an install would only put an older copy beside it).
|
|
170
|
+
const upToDate = !!entry && !!pinned && order === 0, behind = !!entry && !!pinned && order === -1, newer = !!entry && !!pinned && order === 1;
|
|
171
|
+
// AGEND-152 (Prism R4 on #3539): install and update are separate facts in the registry. An installed copy of a CLI whose `runtime.update` is not "yes" (Antigravity updates itself, OpenCode's Update
|
|
172
|
+
// is not built) is only shown — its version and the audited one — and never offered a button: an Install over it would be an update by another name.
|
|
173
|
+
const canUpdate = CLI_CAPS[cli.id]?.runtimeUpdate === true, installOnly = !!entry && !canUpdate;
|
|
174
|
+
// AGEND-153: the named exception — installed here and updated to the vendor's latest, whatever the version it has now (it is offered at, below and above the audited one).
|
|
175
|
+
const toLatest = !!entry && canUpdate && CLI_CAPS[cli.id]?.runtimeUpdateLatest === true;
|
|
176
|
+
const state = !entry ? text("notInstalled") : toLatest ? text("latestInfo", entry.version || found || "?", pinned) : installOnly && behind ? text("noUpdate", found, pinned) : upToDate ? text("current", found, pinned) : behind ? text("behind", found, pinned) : newer ? text("newer", found, pinned) : text("installedOther", entry.version || "?");
|
|
102
177
|
const start = async () => {
|
|
103
|
-
if (busy || !pinned) return;
|
|
104
|
-
|
|
178
|
+
if (busy || !pinned || installOnly) return;
|
|
179
|
+
const message = toLatest ? text("askUpdateLatest", cli.label, machine.name) : byDownload ? text("askDownload", cli.label, pinned, machine.name) : behind ? text("askUpdate", cli.label, pinned, machine.name, found) : text("ask", cli.label, pinned, machine.name);
|
|
180
|
+
if (!await confirmDialog({ message, confirmLabel: toLatest ? text("updateLatest") : text(behind ? "update" : "confirm", pinned) })) return;
|
|
105
181
|
if (!lease.current()) return;
|
|
106
|
-
setBusy(true); setError(""); setNote("");
|
|
182
|
+
setBusy(true); setError(""); setNote(""); latestJob.current = toLatest;
|
|
107
183
|
try {
|
|
108
|
-
|
|
109
|
-
|
|
184
|
+
// AGEND-148 (Prism R3 on #3539): through the Settings gate like any change that acts on a computer — held, and (for an administrator who asked for their own code) confirmed with it on
|
|
185
|
+
// the card — and the page sends the CLI's id and nothing else. The computer's own owner-switch is asked on that computer afterwards, as before.
|
|
186
|
+
const label = toLatest ? text("cardLabelUpdateLatest", cli.label, machine.name) : text(behind ? "cardLabelUpdate" : "cardLabel", cli.label, machine.name);
|
|
187
|
+
const response = await confirmedWrite(`/ui/runtimes/machines/${encodeURIComponent(machine.id)}/cli-install`, { method: "POST", body: toLatest ? { cli: cli.id, acceptLatestUnaudited: true } : { cli: cli.id }, label, displaySummary: () => label });
|
|
110
188
|
if (!lease.current()) return;
|
|
111
|
-
if (!response.ok) throw new Error(
|
|
189
|
+
if (!response.ok) throw new Error(refusalOf(response));
|
|
112
190
|
await load();
|
|
113
191
|
} catch (e) { if (lease.current()) setError(text("requestFailed", e.message)); }
|
|
114
192
|
finally { if (lease.current()) setBusy(false); }
|
|
115
193
|
};
|
|
116
|
-
return html`<li key=${cli.id} data-cli=${cli.id}><strong>${cli.label}</strong><span class="note">${state}</span
|
|
117
|
-
${upToDate ? null : html`<button type="button" class="btn btn-sm" disabled=${!allowed || !online || busy || running || !pinned} onClick=${start}>${entry ? text("reinstall", pinned) : text("install", pinned)}</button>`}</li>`;
|
|
194
|
+
return html`<li key=${cli.id} data-cli=${cli.id}><strong>${cli.label}</strong><span class="note">${state}</span>${unaudited ? html`<span class="note runtime-cli-unaudited">${text("notAudited")}</span>` : null}
|
|
195
|
+
${!toLatest && (upToDate || newer || installOnly) ? null : html`<button type="button" class="btn btn-sm" disabled=${!allowed || !online || busy || running || !pinned} onClick=${start}>${toLatest ? text("updateLatest") : behind ? text("update", pinned) : entry ? text("reinstall", pinned) : text("install", pinned)}</button>`}</li>`;
|
|
118
196
|
};
|
|
119
197
|
return html`<div class="runtime-cli-install"><h4>${text("title")}</h4><p class="note">${text("lead")}</p>
|
|
120
198
|
${!online ? html`<p class="note" role="status">${text("offline")}</p>`
|
|
@@ -130,6 +208,7 @@ export function CliInstall({ machine, lease, onChanged }) {
|
|
|
130
208
|
${note ? html`<p class="note" role="status">${note}</p>` : null}
|
|
131
209
|
${error ? html`<p class="runtime-error" role="alert">${error}</p>` : null}`}
|
|
132
210
|
<details class="runtime-cli-install-others"><summary>${text("othersTitle")}</summary><p class="note">${text("othersLead")}</p>
|
|
133
|
-
<ul>${OFFICIAL_COMMANDS.map(item => html`<li key=${item.id}><${CommandCard} label=${item.administrator ? `${item.label} (${text("needsAdmin")})` : item.label} command=${item.command}
|
|
211
|
+
<ul>${OFFICIAL_COMMANDS.map(item => html`<li key=${item.id}><${CommandCard} label=${item.administrator ? `${item.label} (${text("needsAdmin")})` : item.label} command=${item.command} />
|
|
212
|
+
<p class="note runtime-cli-install-why" data-why=${item.id}>${text(item.why)}</p></li>`)}</ul></details>
|
|
134
213
|
</div>`;
|
|
135
214
|
}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export function safeRuntimeOrigin(server: unknown): string;
|
|
2
2
|
export function runtimeConnectCommand(server: unknown): string;
|
|
3
3
|
export function runtimeInstallCommand(server: unknown, scriptSha256: unknown): string;
|
|
4
|
+
export function runtimeEnrollCommand(server: unknown, scriptSha256: unknown, token: unknown, fingerprint: unknown): string;
|
|
5
|
+
export function runtimeInstallOnlyCommand(server: unknown, scriptSha256: unknown): string;
|
|
4
6
|
export function runtimeWindowsConnectCommand(server: unknown): string;
|
|
@@ -4,8 +4,11 @@
|
|
|
4
4
|
*
|
|
5
5
|
* A command only ever contains: the origin the administrator reviewed in step 1 (inert host and port characters, https or loopback
|
|
6
6
|
* http), and, for the install command, the SHA-256 of install.ps1 that the AgEnD server itself reported to this signed-in page. No
|
|
7
|
-
* pairing code,
|
|
7
|
+
* pairing code, credential or flag the page did not choose is ever put in one. The ONE exception is the install command that carries a
|
|
8
|
+
* one-time enrollment token (`runtimeEnrollCommand`): that token is a short-lived (15 minutes), single-use authorisation made by this page for
|
|
9
|
+
* exactly that command; the token and the server fingerprint are checked for their shape here and are inert (single-quoted) characters only.
|
|
8
10
|
*/
|
|
11
|
+
const ENROLL_TOKEN = /^agend_enroll_[A-Za-z0-9_-]{43}$/, SERVER_FINGERPRINT = /^[a-f0-9]{64}$/;
|
|
9
12
|
|
|
10
13
|
/** The origin, only when it is composed of inert hostname/port characters; "" otherwise. Nothing else is placed in a copyable shell command. */
|
|
11
14
|
export function safeRuntimeOrigin(server) {
|
|
@@ -41,6 +44,10 @@ export function runtimeConnectCommand(server) {
|
|
|
41
44
|
* - the first statement (TLS 1.2, which Windows PowerShell 5.1 may not offer by default) touches nothing the check depends on: if it
|
|
42
45
|
* fails, the rest still runs and the rest still refuses.
|
|
43
46
|
* This differs from the shape in the upstream design review (`if (-not $s -or <hash> -ne …) { throw }; iex $s`) for exactly that reason.
|
|
47
|
+
*
|
|
48
|
+
* The script itself decides what happens after the install: in an interactive console it goes on to connect this computer in the same
|
|
49
|
+
* window; anywhere else (a redirected stdin or stdout, -NonInteractive, an AI agent, CI) it only installs and prints the connect command.
|
|
50
|
+
* Nothing about that decision is in this command, so the hash pin covers all of it. The pairing code is never part of a command.
|
|
44
51
|
*/
|
|
45
52
|
export function runtimeInstallCommand(server, scriptSha256) {
|
|
46
53
|
const origin = safeRuntimeOrigin(server);
|
|
@@ -52,8 +59,34 @@ export function runtimeInstallCommand(server, scriptSha256) {
|
|
|
52
59
|
+ `if ($s -and $h -eq '${scriptSha256}') { iex $s } `
|
|
53
60
|
+ `else { Write-Host 'install.ps1 could not be verified against the hash on the AgEnD page (a certificate or download error above is the usual cause: trust this AgEnD certificate, or use the ZIP; otherwise reload the page and copy the command again)' -ForegroundColor Red; throw 'install.ps1 was not run' }`;
|
|
54
61
|
}
|
|
62
|
+
/**
|
|
63
|
+
* The install command with a ONE-TIME enrollment token inside: pasted on ANY computer, or handed to an AI agent running there, it installs the
|
|
64
|
+
* Runtime and connects it with no pairing code and no approval step. The token (and the server fingerprint the Runtime must see before it sends it) are
|
|
65
|
+
* set in two variables that install.ps1 reads and clears at once; `try/finally` clears them again even when the command is refused before install.ps1
|
|
66
|
+
* runs (a thrown error would otherwise skip a trailing clear and leave the token in the PowerShell session). install.ps1 hands the token to the Runtime on
|
|
67
|
+
* its standard input; it is never a command-line argument. The token works once, for 15 minutes, and is revoked from this page; anyone who gets this text
|
|
68
|
+
* while it is valid can connect THEIR computer as your Runtime, so treat it like a password: do not paste it into chats or tickets.
|
|
69
|
+
*/
|
|
70
|
+
export function runtimeEnrollCommand(server, scriptSha256, token, fingerprint) {
|
|
71
|
+
const body = runtimeInstallCommand(server, scriptSha256);
|
|
72
|
+
if (!body || typeof token !== "string" || !ENROLL_TOKEN.test(token) || typeof fingerprint !== "string" || !SERVER_FINGERPRINT.test(fingerprint)) return "";
|
|
73
|
+
// `$LASTEXITCODE` is reset first (a stale value from an earlier command must not look like a failure) and checked last: `powershell -Command` returns 1 only when
|
|
74
|
+
// its last statement failed, so an AI agent or CI step sees a non-zero exit status when the install or the connection did not succeed. Silent and harmless at a prompt.
|
|
75
|
+
return `$global:LASTEXITCODE = 0; $agendEnroll = '${token}'; $agendFingerprint = '${fingerprint}'; try { ${body} } finally { $agendEnroll = $null; $agendFingerprint = $null }; `
|
|
76
|
+
+ `if ($LASTEXITCODE) { Write-Error 'The AgEnD Runtime was not installed or did not connect (the message above says why).' -ErrorAction SilentlyContinue }`;
|
|
77
|
+
}
|
|
55
78
|
/** After the install script: agend-runtime is on the user's PATH. The pairing code is typed into the terminal, never here. */
|
|
56
79
|
export function runtimeWindowsConnectCommand(server) {
|
|
57
80
|
const origin = safeRuntimeOrigin(server);
|
|
58
81
|
return origin ? `agend-runtime connect --server "${origin}"` : "";
|
|
59
82
|
}
|
|
83
|
+
/**
|
|
84
|
+
* The same pinned command, for a person or an agent that wants the install only. `$agendNoConnect = 1` is read by the script (and by nothing
|
|
85
|
+
* else) before it decides whether to connect, and is cleared again afterwards so it does not stay set in that PowerShell window and quietly
|
|
86
|
+
* turn the next, normal command into an install-only one. (If the command is refused before it runs, the clearing is skipped with it; the
|
|
87
|
+
* script says how to clear the variable whenever it is the reason nothing was connected.)
|
|
88
|
+
*/
|
|
89
|
+
export function runtimeInstallOnlyCommand(server, scriptSha256) {
|
|
90
|
+
const command = runtimeInstallCommand(server, scriptSha256);
|
|
91
|
+
return command ? `$agendNoConnect = 1; ${command}; $agendNoConnect = $null` : "";
|
|
92
|
+
}
|
|
@@ -14,7 +14,7 @@ register("runtimeUpdate", {
|
|
|
14
14
|
recovery: "An interrupted update needs a fresh separate installation. Keep the existing profile and pairing.",
|
|
15
15
|
damaged: "This installation could not be verified. Reinstall into a fresh separate folder.",
|
|
16
16
|
running: "Running: {0} / build {1}", last: "Last reported update status; this connection has not confirmed it.",
|
|
17
|
-
repair: "Show reinstall command", repairTitle: "Enable automatic Runtime updates", repairHint: "Run agend-runtime status with the same --profile or AGEND_RUNTIME_HOME as this Runtime, note its profile folder, then close this Runtime. This command selects a fresh separate folder and verifies the installer from this AgEnD, leaving PATH unchanged. The installer prints a full-path
|
|
17
|
+
repair: "Show reinstall command", repairTitle: "Enable automatic Runtime updates", repairHint: "Run agend-runtime status with the same --profile or AGEND_RUNTIME_HOME as this Runtime, note its profile folder, then close this Runtime. This command selects a fresh separate folder and verifies the installer from this AgEnD, leaving PATH unchanged. The installer prints a full-path start command that runs the Runtime in the background; enter that same existing profile folder when asked. Your pairing is kept; no new pairing code is needed.",
|
|
18
18
|
attention: "Runtime update needs attention", open: "Open Runtime settings",
|
|
19
19
|
},
|
|
20
20
|
"zh-TW": {
|
|
@@ -27,7 +27,7 @@ register("runtimeUpdate", {
|
|
|
27
27
|
recovery: "中斷的更新需要重新安裝到獨立目錄。請保留既有設定檔與配對。",
|
|
28
28
|
damaged: "無法驗證此安裝。請重新安裝到全新的獨立目錄。",
|
|
29
29
|
running: "執行中:{0}/組建 {1}", last: "這是上次回報的更新狀態,目前連線尚未確認。",
|
|
30
|
-
repair: "顯示重新安裝指令", repairTitle: "啟用 Runtime 自動更新", repairHint: "沿用此 Runtime 原本的 --profile 或 AGEND_RUNTIME_HOME 執行 agend-runtime status,記下設定檔資料夾,再關閉此 Runtime。指令會選擇全新的獨立目錄,並驗證來自這台 AgEnD 的安裝程式,不會變更 PATH。請執行安裝程式顯示的完整路徑
|
|
30
|
+
repair: "顯示重新安裝指令", repairTitle: "啟用 Runtime 自動更新", repairHint: "沿用此 Runtime 原本的 --profile 或 AGEND_RUNTIME_HOME 執行 agend-runtime status,記下設定檔資料夾,再關閉此 Runtime。指令會選擇全新的獨立目錄,並驗證來自這台 AgEnD 的安裝程式,不會變更 PATH。請執行安裝程式顯示的完整路徑 start 指令(會在背景執行 Runtime),並在詢問時輸入原本的設定檔資料夾;既有配對會保留,不需要新的配對碼。",
|
|
31
31
|
attention: "Runtime 更新需要處理", open: "開啟 Runtime 設定",
|
|
32
32
|
},
|
|
33
33
|
});
|
package/dist/ui/search-dialog.js
CHANGED
|
@@ -16,6 +16,7 @@ import { Skeleton } from "/assets/ui-states.js";
|
|
|
16
16
|
import { goToSetting, searchSettings, settingLabel } from "./settings-registry.js";
|
|
17
17
|
import "./settings-strings.js";
|
|
18
18
|
import "./settings-shared-strings.js"; // the "where" of a result is settings.sec_<section>; sec_agent-defaults is one of these words
|
|
19
|
+
import "./settings-revoke-strings.js"; // a result shows its label: settings.vaRevokeOthers is one of these words (PR #3553 review)
|
|
19
20
|
import "./settings-access-strings.js"; // a result shows its label: settings.webLoginQr is one of these words (#3061)
|
|
20
21
|
|
|
21
22
|
register("search", {
|
|
@@ -23,7 +23,7 @@ register("settings", {
|
|
|
23
23
|
},
|
|
24
24
|
"zh-TW": {
|
|
25
25
|
webLoginQr: "新裝置用其他裝置登入時顯示 QR Code",
|
|
26
|
-
webLoginQrHint: "顯示在新裝置登入頁、8
|
|
26
|
+
webLoginQrHint: "顯示在新裝置登入頁、8 碼裝置登入碼旁邊。裡面只有該頁面的網址和裝置登入碼,沒有任何憑證;核准仍需要已登入並驗證擁有者的裝置。預設關閉;有連接聊天平台的 fleet 不受影響。",
|
|
27
27
|
},
|
|
28
28
|
});
|
|
29
29
|
|
|
@@ -16,9 +16,14 @@ async function getJson(url) {
|
|
|
16
16
|
function cached(url, force = false) {
|
|
17
17
|
const hit = cache.get(url), now = performance.now();
|
|
18
18
|
if (hit && (hit.pending || !force && now - hit.at < TTL_MS)) return hit.pending ?? Promise.resolve(hit.value);
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
const entry = { at: now, value: null, pending: null };
|
|
20
|
+
const pending = getJson(force ? `${url}&refresh=1` : url).then((value) => {
|
|
21
|
+
// Explicit rediscovery/reset may have replaced this request while it waited.
|
|
22
|
+
if (cache.get(url) === entry) cache.set(url, { at: performance.now(), value, pending: null });
|
|
23
|
+
return value;
|
|
24
|
+
}).catch(() => { if (cache.get(url) === entry) cache.delete(url); return null; });
|
|
25
|
+
entry.pending = pending;
|
|
26
|
+
cache.set(url, entry);
|
|
22
27
|
return pending;
|
|
23
28
|
}
|
|
24
29
|
/**
|
|
@@ -80,6 +85,17 @@ export function useModelCatalog(backend, instance, runtime) {
|
|
|
80
85
|
return state.loading && !state.models.length ? undefined : state.models;
|
|
81
86
|
}
|
|
82
87
|
|
|
88
|
+
/** Shared snapshot cache for upgraded fields; accessed through a namespace so old held modules still load. */
|
|
89
|
+
export function readModelCatalog(target) { return readModelCatalogSnapshot(target).then(answer => answer.models); }
|
|
90
|
+
/** Keep source provenance with the shared snapshot; the array-only API remains compatible with older pickers. */
|
|
91
|
+
export function readModelCatalogSnapshot(target) {
|
|
92
|
+
const url = `/ui/models?${new URLSearchParams(target)}`;
|
|
93
|
+
return cached(url).then(answer => { if (!answer || !Array.isArray(answer.models)) throw Error("Model catalog unavailable"); return answer; });
|
|
94
|
+
}
|
|
95
|
+
export function rememberModelCatalog(target, answer) {
|
|
96
|
+
cache.set(`/ui/models?${new URLSearchParams(target)}`, { at: performance.now(), value: answer, pending: null });
|
|
97
|
+
}
|
|
98
|
+
|
|
83
99
|
/** A state that keeps a backend from being chosen (shown, disabled, with why); "unknown" never does. */
|
|
84
100
|
export const BLOCKING_STATES = ["not_installed", "not_signed_in", "too_old"];
|
|
85
101
|
|
|
@@ -79,8 +79,8 @@ function publish() {
|
|
|
79
79
|
totpNotSetUp: view.totp === "not_set_up" && view.state === "pending",
|
|
80
80
|
// Over a link (the leader's ruling (b)): no code here — confirm it in the host computer's own browser, or in General.
|
|
81
81
|
onHost: view.totp === "on_host" && view.state === "pending",
|
|
82
|
-
//
|
|
83
|
-
|
|
82
|
+
// AGEND-122: the owner turned on "Only this computer can authorize": only the AgEnD computer's own browser confirms.
|
|
83
|
+
hostOnly: view.totp === "host_only" && view.state === "pending",
|
|
84
84
|
dismiss: TERMINAL.has(view.state) ? () => forget(view.id) : null,
|
|
85
85
|
// AGEND-118: a request that ended without applying can be sent again (the same write, a new confirmation).
|
|
86
86
|
retry: retry && resendable(view) ? () => resend(view.id) : null,
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
// Refs #3061 (P2a, P2b): Settings → Access & security → Sign-in & authorization → "Devices & sign-in"
|
|
2
|
-
//
|
|
3
|
-
//
|
|
1
|
+
// Refs #3061 (P2a, P2b), AGEND-138: Settings → Access & security → Sign-in & authorization → "Devices & sign-in". On every fleet it is
|
|
2
|
+
// the one list of signed-in devices (GET /ui/devices: every tier, one row each, with its role and whether you may sign it out;
|
|
3
|
+
// "Sign out everywhere" is here too, not in the session menu). Adding a device by its 8-character code is a fleet with no chat
|
|
4
|
+
// connection only. P2b: the signed-in devices — each with how it was approved (sign-in code / device code / host / authenticator),
|
|
5
|
+
// its role (AGEND-138: Owner ✓ / Admin · not verified, the session menu's words) and when it was last active, this one marked, and a Sign out for the others that only the
|
|
4
6
|
// verified owner gets (POST /ui/devices/signout; the server decides, a disabled button is only the page saying so). The QR
|
|
5
7
|
// code on a new device's sign-in page opens this page at ?approve=<code>: the dialog opens with the code filled in — the
|
|
6
8
|
// person still presses Continue and Allow. "Add device" opens a dialog: type the 8-character code a new device is showing on its sign-in page (the
|
|
@@ -19,6 +21,7 @@
|
|
|
19
21
|
import { html, useEffect, useRef, useState } from "/assets/app-html.js";
|
|
20
22
|
import { t, register } from "/assets/app-i18n.js";
|
|
21
23
|
import { Dialog } from "/assets/ui-dialog.js";
|
|
24
|
+
import { roleName } from "/assets/device-roles.js"; // its own file: a retained older web-authorize.js has no roleName (PR #3553 review)
|
|
22
25
|
import { api } from "./settings-confirm.js";
|
|
23
26
|
|
|
24
27
|
register("devices", {
|
|
@@ -41,38 +44,49 @@ register("devices", {
|
|
|
41
44
|
minutes: "{0} minutes", minute: "1 minute",
|
|
42
45
|
listTitle: "Signed-in devices", refresh: "Refresh", approvedBy: "Approved by {0}",
|
|
43
46
|
viaCode: "sign-in code", viaDevice: "device code", viaHost: "this computer", viaTotp: "authenticator app",
|
|
44
|
-
ownerOk: "Owner verified", ownerNo: "Signed in, owner not verified yet",
|
|
45
47
|
signOutOwnerOnly: "Only a device whose owner is verified can sign out another device.",
|
|
46
48
|
signOutTitle: "Sign out this device?", signOutLead: "{0} will have to sign in again.", signOutGo: "Sign out",
|
|
47
49
|
signedOut: "{0} was signed out.", alreadyGone: "That device is already signed out.",
|
|
48
50
|
notSaved: "Signed out for now, but the change could not be saved: a restart may bring the session back. This page cannot repair session storage.",
|
|
49
51
|
authorityOff: "Web authorization is off, so no device is the owner: none can add a device or sign another one out.",
|
|
52
|
+
// AGEND-138: the list on a fleet with a chat connection, and "Sign out everywhere" (moved here from the session menu).
|
|
53
|
+
chatLead: "Every device signed in to this dashboard. You can sign out your own devices and any guest's or read-only one; another admin's devices only that admin can sign out.",
|
|
54
|
+
signOutOtherAdmin: "Only the admin who owns a device can sign it out.",
|
|
55
|
+
lostOther: "That device belongs to another admin: only they can sign it out.",
|
|
56
|
+
signOutAll: "Sign out everywhere", signOutAllTitle: "Sign out everywhere?",
|
|
57
|
+
signOutAllLeadWeb: "Every device is signed out, this one too. You will have to sign in again.",
|
|
58
|
+
signOutAllLeadChat: "This device, your other devices and every guest and read-only session are signed out. Other admins' devices stay signed in. You will have to sign in again.",
|
|
50
59
|
},
|
|
51
60
|
"zh-TW": {
|
|
52
|
-
title: "裝置與登入", lead: "用 8
|
|
61
|
+
title: "裝置與登入", lead: "用 8 碼裝置登入碼讓新裝置登入。在已登入且已驗證擁有者的裝置上,到這裡核准。",
|
|
53
62
|
add: "新增裝置", noCopy: "核准不會複製這台裝置的登入狀態,新裝置會取得自己的工作階段。",
|
|
54
63
|
ownerOnly: "只有已驗證擁有者的裝置才能新增裝置。請使用 AgEnD 電腦,或用驗證器 App 登入。",
|
|
55
|
-
dlgTitle: "新增裝置", dlgLead: "
|
|
56
|
-
codeLabel: "
|
|
57
|
-
confirmTitle: "允許這台裝置登入?", device: "裝置", from: "來源", address: "位址", left: "剩餘時間", code: "
|
|
64
|
+
dlgTitle: "新增裝置", dlgLead: "在新裝置上選「使用其他裝置登入」,再輸入它顯示的裝置登入碼。",
|
|
65
|
+
codeLabel: "新裝置上的裝置登入碼", find: "繼續",
|
|
66
|
+
confirmTitle: "允許這台裝置登入?", device: "裝置", from: "來源", address: "位址", left: "剩餘時間", code: "裝置登入碼",
|
|
58
67
|
fromHost: "這台電腦", fromNetwork: "網路(區網或 tailnet)",
|
|
59
68
|
grants: "只能使用一般的網頁功能,不含擁有者授權;擁有者授權需另外驗證。",
|
|
60
|
-
sameCode: "
|
|
69
|
+
sameCode: "只有新裝置的畫面上顯示的是同一組裝置登入碼時才允許。裝置名稱來自瀏覽器、可能被偽造,請以來源和位址為準。",
|
|
61
70
|
allow: "允許", deny: "拒絕", back: "返回", done: "完成",
|
|
62
71
|
approved: "已核准。新裝置幾秒內就會登入。", denied: "已拒絕。新裝置會收到不能登入的通知。",
|
|
63
|
-
notFound: "
|
|
64
|
-
expired: "
|
|
72
|
+
notFound: "沒有等待中的裝置使用這組裝置登入碼。請確認新裝置上的裝置登入碼;它可能已失效。",
|
|
73
|
+
expired: "這組裝置登入碼已失效。請讓新裝置重新取得。",
|
|
65
74
|
paused: "錯誤次數太多,請 {0} 後再試。", decided: "這個請求已經處理過了。",
|
|
66
75
|
lostOwner: "這台裝置已不能核准登入:它的擁有者驗證已結束。",
|
|
67
76
|
minutes: "{0} 分鐘", minute: "1 分鐘",
|
|
68
77
|
listTitle: "已登入的裝置", refresh: "重新整理", approvedBy: "核准方式:{0}",
|
|
69
|
-
viaCode: "
|
|
70
|
-
ownerOk: "已驗證擁有者", ownerNo: "已登入,尚未驗證擁有者",
|
|
78
|
+
viaCode: "一次性裝置登入碼", viaDevice: "其他裝置核准", viaHost: "主機", viaTotp: "驗證器 App",
|
|
71
79
|
signOutOwnerOnly: "只有已驗證擁有者的裝置才能登出其他裝置。",
|
|
72
80
|
signOutTitle: "登出這台裝置?", signOutLead: "{0} 需要重新登入。", signOutGo: "登出",
|
|
73
81
|
signedOut: "已登出 {0}。", alreadyGone: "這台裝置已經登出了。",
|
|
74
82
|
notSaved: "暫時登出了,但變更沒能儲存:重新啟動後這個工作階段可能會回來。這個頁面無法修復工作階段的儲存問題。",
|
|
75
83
|
authorityOff: "網頁授權已關閉,所以沒有任何裝置是擁有者:不能新增裝置,也不能登出其他裝置。",
|
|
84
|
+
chatLead: "登入這個儀表板的所有裝置。你可以登出自己的裝置,以及任何訪客或唯讀的登入;別的管理者的裝置只有那位管理者本人能登出。",
|
|
85
|
+
signOutOtherAdmin: "只有這台裝置所屬的管理者本人能登出它。",
|
|
86
|
+
lostOther: "那台裝置屬於別的管理者:只有他本人能登出。",
|
|
87
|
+
signOutAll: "全部登出", signOutAllTitle: "全部登出?",
|
|
88
|
+
signOutAllLeadWeb: "所有裝置都會登出,包含這一台,之後需要重新登入。",
|
|
89
|
+
signOutAllLeadChat: "這台裝置、你的其他裝置,以及所有訪客和唯讀的登入都會登出;別的管理者的裝置不受影響。之後需要重新登入。",
|
|
76
90
|
},
|
|
77
91
|
});
|
|
78
92
|
const td = (k, ...v) => t(`devices.${k}`, ...v);
|
|
@@ -105,7 +119,7 @@ export function DevicesCard() {
|
|
|
105
119
|
// step: "code" (type it) | "confirm" (who is asking) | "done" (what happened). `msg`: a line under the field.
|
|
106
120
|
const [dlg, setDlg] = useState(null), [code, setCode] = useState(""), [msg, setMsg] = useState(""), [busy, setBusy] = useState(false), [now, setNow] = useState(Date.now());
|
|
107
121
|
// P2b: the device being signed out (asked to confirm), and the line saying how that went.
|
|
108
|
-
const [out, setOut] = useState(null), [note, setNote] = useState(null);
|
|
122
|
+
const [out, setOut] = useState(null), [note, setNote] = useState(null), [all, setAll] = useState(false);
|
|
109
123
|
const live = useRef({ mounted: true, deepLink: false });
|
|
110
124
|
// The QR link (?approve=<code>) is read once, and taken out of the address so a reload does not open it again and the code
|
|
111
125
|
// does not stay in the history. Only the verified owner gets the dialog; anyone else just sees the card.
|
|
@@ -137,7 +151,8 @@ export function DevicesCard() {
|
|
|
137
151
|
useEffect(() => {
|
|
138
152
|
if (step === "confirm" && expiresAt && now >= expiresAt) { setDlg({ step: "code" }); setMsg(td("expired")); }
|
|
139
153
|
}, [now, step, expiresAt]);
|
|
140
|
-
if (!s
|
|
154
|
+
if (!s) return null;
|
|
155
|
+
const webOnly = s.webOnly === true;
|
|
141
156
|
|
|
142
157
|
const close = () => { setDlg(null); setCode(""); setMsg(""); if (dlg && dlg.step === "done") load(); };
|
|
143
158
|
// A button the page disabled never reaches here in a browser; the guard is for anything that calls it anyway (the server refuses a non-owner regardless).
|
|
@@ -173,7 +188,7 @@ export function DevicesCard() {
|
|
|
173
188
|
};
|
|
174
189
|
|
|
175
190
|
// P2b: sign another device out. The button is only offered to the owner and the server checks again (403 otherwise).
|
|
176
|
-
const askSignOut = (device) => { if (
|
|
191
|
+
const askSignOut = (device) => { if (device.canSignOut && !device.current) { setNote(null); setOut({ handle: device.handle, label: device.label }); } };
|
|
177
192
|
const signOut = async () => {
|
|
178
193
|
const target = out;
|
|
179
194
|
if (!target) return;
|
|
@@ -185,11 +200,22 @@ export function DevicesCard() {
|
|
|
185
200
|
setBusy(false); setOut(null);
|
|
186
201
|
if (r.ok) setNote({ ok: true, text: td("signedOut", target.label) });
|
|
187
202
|
else if (r.status === 404) setNote({ ok: false, text: td("alreadyGone") });
|
|
188
|
-
else if (r.status === 403) setNote({ ok: false, text: td("lostOwner") });
|
|
203
|
+
else if (r.status === 403) setNote({ ok: false, text: td(r.body && r.body.error === "other_admin" ? "lostOther" : "lostOwner") });
|
|
189
204
|
else if (r.body && r.body.error === "not_durable") setNote({ ok: false, text: td("notSaved") });
|
|
190
205
|
else setNote({ ok: false, text: t("app.failed") });
|
|
191
206
|
load();
|
|
192
207
|
};
|
|
208
|
+
// AGEND-138: "Sign out everywhere" (it used to be in the session menu): the server ends what this admin may (all of it for a
|
|
209
|
+
// web-only fleet's owner; on a chat fleet this admin's devices and every guest's and reader's, not another admin's).
|
|
210
|
+
const signOutAll = async () => {
|
|
211
|
+
setBusy(true);
|
|
212
|
+
let r;
|
|
213
|
+
try { r = await api("/auth/sessions", { method: "DELETE" }); } catch { r = { ok: false, status: 0, body: null }; }
|
|
214
|
+
if (!live.current.mounted) return;
|
|
215
|
+
setBusy(false); setAll(false);
|
|
216
|
+
if (r.ok) { globalThis.location.assign("/signin"); return; }
|
|
217
|
+
setNote({ ok: false, text: td(r.status === 403 ? "lostOwner" : "notSaved") });
|
|
218
|
+
};
|
|
193
219
|
// Web authorization off (the server says so): nobody is an owner, whoever is looking — "use the AgEnD computer" would not help.
|
|
194
220
|
const authorityOff = s.authority === false;
|
|
195
221
|
const devices = Array.isArray(s.devices) ? s.devices : [];
|
|
@@ -224,26 +250,34 @@ export function DevicesCard() {
|
|
|
224
250
|
<button type="button" class="btn btn-danger" id="devDeny" disabled=${busy} onClick=${() => decide("deny")}>${td("deny")}</button>
|
|
225
251
|
<button type="button" class="btn btn-primary" id="devAllow" disabled=${busy} onClick=${() => decide("approve")}>${td("allow")}</button>`
|
|
226
252
|
: html`<button type="button" class="btn btn-primary" id="devDoneBtn" onClick=${close}>${td("done")}</button>`;
|
|
227
|
-
|
|
228
|
-
|
|
253
|
+
const blockedWhy = (d) => td(d.signOutBlocked === "other_admin" ? "signOutOtherAdmin" : "signOutOwnerOnly");
|
|
254
|
+
const anyBlocked = devices.some((d) => !d.current && d.canSignOut === false);
|
|
255
|
+
const kinds = devices.filter((d) => d.signOutBlocked === "other_admin").length;
|
|
256
|
+
return html`<section class="card s-devices" id="devicesCard"><header class="s-auth-section-head"><div><h3>${td("title")}</h3><p id="devicesLead">${td(webOnly ? "lead" : "chatLead")}</p></div></header>
|
|
257
|
+
${webOnly ? html`<p class="note" id="devicesNoCopy">${td("noCopy")}</p>` : null}
|
|
229
258
|
${devices.length ? html`<div class="s-dev-listhead"><h4 id="devicesListTitle">${td("listTitle")}</h4>
|
|
230
259
|
<button type="button" class="btn btn-sm" id="devicesRefresh" onClick=${load}>${td("refresh")}</button></div>
|
|
231
260
|
<ul class="s-dev-list" id="devicesList">${devices.map((d) => html`<li class=${`s-dev-row${d.current ? " current" : ""}`} key=${d.handle} data-handle=${d.handle}>
|
|
232
261
|
<div class="s-dev-main">
|
|
233
262
|
<span class="s-dev-name">${d.label}${d.current ? html` <span class="tag" data-this-device="1">${t("app.thisDevice")}</span>` : null}</span>
|
|
234
|
-
<span class="s-dev-meta">${td("approvedBy", viaText(d.via))} · <span data-owner=${d.
|
|
263
|
+
<span class="s-dev-meta">${td("approvedBy", viaText(d.via))} · <span data-owner=${d.verified ? "yes" : "no"} data-role=${d.tier === "admin" ? (d.verified ? "owner" : "admin") : d.tier}>${roleName(d.tier, d.verified)}</span> · ${t("app.lastActive", agoWords(d.lastSeen))}</span>
|
|
235
264
|
</div>
|
|
236
|
-
${d.current ? null : html`<button type="button" class="btn btn-sm btn-danger" data-signout=${d.handle} disabled=${!
|
|
265
|
+
${d.current ? null : html`<button type="button" class="btn btn-sm btn-danger" data-signout=${d.handle} disabled=${!d.canSignOut || busy} title=${d.canSignOut ? undefined : blockedWhy(d)} onClick=${() => askSignOut(d)}>${t("app.signOut")}</button>`}
|
|
237
266
|
</li>`)}</ul>
|
|
238
|
-
${
|
|
267
|
+
${anyBlocked && !authorityOff ? html`<p class="note" id=${kinds ? "devicesSignOutOtherAdmin" : "devicesSignOutOwnerOnly"}>${td(kinds ? "signOutOtherAdmin" : "signOutOwnerOnly")}</p>` : null}
|
|
239
268
|
${note ? html`<p class=${`note ${note.ok ? "" : "error"}`} role=${note.ok ? "status" : "alert"} id="devicesNote">${note.text}</p>` : null}` : null}
|
|
240
|
-
${authorityOff ? html`<p class="note s-va-warn" id="devicesAuthorityOff">${td("authorityOff")}</p>`
|
|
241
|
-
: !s.owner ? html`<p class="note" id="devicesOwnerOnly">${td("ownerOnly")}</p>` : null}
|
|
242
|
-
<div class="save-row"
|
|
269
|
+
${webOnly ? (authorityOff ? html`<p class="note s-va-warn" id="devicesAuthorityOff">${td("authorityOff")}</p>`
|
|
270
|
+
: !s.owner ? html`<p class="note" id="devicesOwnerOnly">${td("ownerOnly")}</p>` : null) : null}
|
|
271
|
+
<div class="save-row">${webOnly ? html`<button type="button" class="btn btn-primary" id="devicesAdd" disabled=${!s.owner} onClick=${open}>${td("add")}</button>` : null}
|
|
272
|
+
${others ? html`<button type="button" class="btn btn-danger" id="devicesSignOutAll" disabled=${!s.canEndOthers || busy} title=${s.canEndOthers ? undefined : td("signOutOwnerOnly")} onClick=${() => setAll(true)}>${td("signOutAll")}</button>` : null}</div>
|
|
243
273
|
${dlg ? html`<${Dialog} title=${td("dlgTitle")} onClose=${close} busy=${busy} actions=${actions}>${body}</${Dialog}>` : null}
|
|
244
274
|
${out ? html`<${Dialog} title=${td("signOutTitle")} onClose=${() => { if (!busy) setOut(null); }} busy=${busy} actions=${html`
|
|
245
275
|
<button type="button" class="btn" id="devSignOutCancel" disabled=${busy} onClick=${() => setOut(null)}>${t("app.cancel")}</button>
|
|
246
276
|
<button type="button" class="btn btn-danger" id="devSignOutGo" disabled=${busy} onClick=${signOut}>${td("signOutGo")}</button>`}>
|
|
247
277
|
<p class="note" id="devSignOutLead">${td("signOutLead", out.label)}</p></${Dialog}>` : null}
|
|
278
|
+
${all ? html`<${Dialog} title=${td("signOutAllTitle")} onClose=${() => { if (!busy) setAll(false); }} busy=${busy} actions=${html`
|
|
279
|
+
<button type="button" class="btn" id="devSignOutAllCancel" disabled=${busy} onClick=${() => setAll(false)}>${t("app.cancel")}</button>
|
|
280
|
+
<button type="button" class="btn btn-danger" id="devSignOutAllGo" disabled=${busy} onClick=${signOutAll}>${td("signOutAll")}</button>`}>
|
|
281
|
+
<p class="note" id="devSignOutAllLead">${td(webOnly ? "signOutAllLeadWeb" : "signOutAllLeadChat")}</p></${Dialog}>` : null}
|
|
248
282
|
</section>`;
|
|
249
283
|
}
|