@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
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
// The Session menu (#1018; once in the retired shell.js): who is signed in on this device,
|
|
2
|
-
//
|
|
1
|
+
// The Session menu (#1018; once in the retired shell.js): who is signed in on this device, its role, and signing out.
|
|
2
|
+
// AGEND-138 (#3486): the other signed-in devices are not listed here any more — Settings → Devices has the full list (and
|
|
3
|
+
// "Sign out everywhere"), so an admin gets a "Manage devices" link to it. A guest or read-only session has no Settings, so
|
|
4
|
+
// its own "Sign out everywhere" (its account's devices) stays here.
|
|
3
5
|
// It reads /auth/session when the page starts and each time the menu is opened — a person's action, not a timer.
|
|
4
6
|
import { html, useEffect, useRef, useState } from "./app-html.js";
|
|
5
7
|
import { Icon } from "./ui-icons.js";
|
|
6
8
|
import { t, lang } from "./app-i18n.js";
|
|
7
|
-
import { AuthorizeChip } from "./web-authorize.js";
|
|
9
|
+
import { AuthorizeChip, useWebAuthorization } from "./web-authorize.js";
|
|
10
|
+
import { roleName } from "./device-roles.js"; // its own file: a retained older web-authorize.js has no roleName (PR #3553 review)
|
|
8
11
|
|
|
9
12
|
async function getJson(url) {
|
|
10
13
|
try {
|
|
@@ -14,23 +17,19 @@ async function getJson(url) {
|
|
|
14
17
|
}
|
|
15
18
|
const clock = (ms) => new Date(ms).toLocaleTimeString(lang() === "zh-TW" ? "zh-TW" : undefined, { hour: "2-digit", minute: "2-digit" });
|
|
16
19
|
const span = (ms) => { const m = Math.max(1, Math.round(ms / 60000)); return m >= 90 ? `${Math.round(m / 60)} h` : `${m} min`; };
|
|
17
|
-
const ago = (ms) => { const m = Math.round((Date.now() - ms) / 60000); return m < 1 ? t("app.justNow") : m < 90 ? t("app.minAgo", m) : t("app.hrAgo", Math.round(m / 60)); };
|
|
18
20
|
|
|
19
21
|
export function SessionMenu() {
|
|
20
22
|
const [me, setMe] = useState(undefined); // undefined: not read yet; null: signed out
|
|
21
|
-
const [
|
|
22
|
-
// #3061 (P2b): on a web-only fleet only the verified owner ends the OTHER devices (the server says so with the list and
|
|
23
|
-
// refuses anyone else regardless); a session that is not one still sees them and can sign itself out.
|
|
24
|
-
const [mayEndOthers, setMayEndOthers] = useState(true);
|
|
23
|
+
const [others, setOthers] = useState(0); // a non-admin session's other devices (its account's): all it can end here
|
|
25
24
|
const [open, setOpen] = useState(false);
|
|
26
25
|
const [error, setError] = useState(false);
|
|
26
|
+
const auth = useWebAuthorization(); // AGEND-138: the role line below (the chip shares this one read)
|
|
27
27
|
const btn = useRef(null), pop = useRef(null);
|
|
28
28
|
async function refresh() {
|
|
29
29
|
const m = await getJson("/auth/session");
|
|
30
30
|
setMe(m);
|
|
31
|
-
const s = m ? await getJson("/auth/sessions") : null;
|
|
32
|
-
|
|
33
|
-
setMayEndOthers(!(s && s.canEndOthers === false));
|
|
31
|
+
const s = m && m.tier !== "admin" ? await getJson("/auth/sessions") : null;
|
|
32
|
+
setOthers(s && Array.isArray(s.sessions) ? s.sessions.filter((x) => !x.current).length : 0);
|
|
34
33
|
}
|
|
35
34
|
useEffect(() => { refresh(); }, []);
|
|
36
35
|
useEffect(() => {
|
|
@@ -49,7 +48,6 @@ export function SessionMenu() {
|
|
|
49
48
|
}
|
|
50
49
|
const onKey = (e) => { if (e.key === "Escape") { e.preventDefault(); e.stopPropagation(); setOpen(false); btn.current && btn.current.focus(); } };
|
|
51
50
|
const label = me ? t("app.session") : t("app.signIn");
|
|
52
|
-
const rows = sessions || [];
|
|
53
51
|
return html`<div class="session">
|
|
54
52
|
<button ref=${btn} type="button" class="side-row" aria-haspopup="dialog" aria-expanded=${open ? "true" : "false"}
|
|
55
53
|
onClick=${() => { const next = !open; setOpen(next); if (next) refresh(); }}>
|
|
@@ -58,13 +56,12 @@ export function SessionMenu() {
|
|
|
58
56
|
${!me ? html`<h3>${t("app.signedOut")}</h3><a class="btn" href=${`/signin?next=${encodeURIComponent(location.pathname)}`}>${t("app.signIn")}</a>` : html`
|
|
59
57
|
<h3>${t("app.signedIn")} · ${me.label}</h3>
|
|
60
58
|
<p class="sub">${t("app.expires", clock(me.expiresAt), span(me.idleMs))}</p>
|
|
59
|
+
${me.tier === "guest" || me.tier === "read" || (me.tier === "admin" && auth.st) ? html`<p class="role" data-role=${me.tier === "admin" ? (auth.st.state === "verified" ? "owner" : "admin") : me.tier}><span class="sub">${t("webauth.role")}</span> <strong>${roleName(me.tier, !!auth.st && auth.st.state === "verified")}</strong></p>` : null}
|
|
61
60
|
<${AuthorizeChip} />
|
|
62
|
-
${rows.length > 1 ? html`<h3>${t("app.devices")}</h3><ul class="devices">${rows.map(s => html`<li key=${s.handle}>
|
|
63
|
-
<span class="grow"><span class="name">${s.label}${s.current ? ` · ${t("app.thisDevice")}` : ""}</span><span class="when">${t("app.lastActive", ago(s.lastSeen))}</span></span>
|
|
64
|
-
${s.current || !mayEndOthers ? null : html`<button type="button" class="btn btn-sm danger" onClick=${() => act("DELETE", `/auth/sessions/${encodeURIComponent(s.handle)}`, refresh)}>${t("app.signOut")}</button>`}</li>`)}</ul>` : null}
|
|
65
61
|
<div class="row">
|
|
66
62
|
<button type="button" class="btn" onClick=${() => act("POST", "/auth/logout", () => { location.href = "/signin"; })}><${Icon} name="user" size=${16} />${t("app.signOut")}</button>
|
|
67
|
-
${
|
|
63
|
+
${me.tier === "admin" ? html`<a class="btn" id="manageDevices" href="/settings/access">${t("app.manageDevices")}</a>`
|
|
64
|
+
: others > 0 ? html`<button type="button" class="btn danger" onClick=${() => act("DELETE", "/auth/sessions", () => { location.href = "/signin"; })}>${t("app.signOutAll")}</button>` : null}
|
|
68
65
|
</div>`}
|
|
69
66
|
${error ? html`<p class="err" role="alert">${t("app.failed")}</p>` : null}
|
|
70
67
|
</div>` : null}
|
|
@@ -18,7 +18,6 @@ import { ErrorState, Skeleton } from "./ui-states.js";
|
|
|
18
18
|
import { Dialog } from "./ui-dialog.js";
|
|
19
19
|
import { InstanceNav, RosterNav, namesStore, setNamesPrimary } from "./instance-nav.js";
|
|
20
20
|
import { usageRailStore } from "./header-tools.js";
|
|
21
|
-
import { useWebAuthorization } from "./web-authorize.js";
|
|
22
21
|
import { RightRail, sidePanelStore } from "./side-panel.js";
|
|
23
22
|
import { OwnerCssKeepBar } from "./owner-css.js";
|
|
24
23
|
import { UpdateLine } from "./app-update.js";
|
|
@@ -463,8 +462,8 @@ function Sidebar({ route, onNewInstance, viewOnly }) {
|
|
|
463
462
|
<nav data-trust="navigation" class="side-nav" aria-label=${t("app.menu")}>
|
|
464
463
|
${overview}
|
|
465
464
|
${navLink("needs", NEEDS_PATH, "inbox", t("app.needsNav"), needsCount)}
|
|
466
|
-
${/* #2910 D2: a web-only fleet (no chat connection) has Notices — what General would have said. */
|
|
467
|
-
app.connections === 0 && app.notices && app.notices.enabled ? navLink("notices", NOTICES_PATH, "bell", t("app.noticesNav"), app.notices.unread | 0, "app.noticesCount") : null}
|
|
465
|
+
${/* #2910 D2: a web-only fleet (no chat connection) has Notices — what General would have said. AGEND-122: a chat fleet too, while one is unread (a confirmation from another device that nothing else could carry). */
|
|
466
|
+
(app.connections === 0 || (app.notices && app.notices.unread > 0)) && app.notices && app.notices.enabled ? navLink("notices", NOTICES_PATH, "bell", t("app.noticesNav"), app.notices.unread | 0, "app.noticesCount") : null}
|
|
468
467
|
${searchOffered(canCreate) ? searchRow() : null}
|
|
469
468
|
${canCreate && onNewInstance ? html`<button type="button" class="side-row side-new" onClick=${onNewInstance}><${Icon} name="plus" /><span class="grow">${t("app.newAgent")}</span></button>` : null}
|
|
470
469
|
</nav>
|
|
@@ -640,6 +639,17 @@ const mmss = (ms) => { const s = Math.max(0, Math.ceil(ms / 1000)); return `${Ma
|
|
|
640
639
|
* corner, except in Settings itself, which shows the same cards in its column, right under the operation (`inline`),
|
|
641
640
|
* so they never cover it (alpha.2 sweep).
|
|
642
641
|
*/
|
|
642
|
+
// #3511: the immutable diff stays in the Fleet's locale; this known line is display-only in the page's locale.
|
|
643
|
+
// Own dictionary also works when app-i18n.js was cached before the Hub connection flow shipped.
|
|
644
|
+
register("pendingHub", {
|
|
645
|
+
en: { connect: "Connect this Fleet to Hub {0} using your company account. Agent sharing stays separate." },
|
|
646
|
+
"zh-TW": { connect: "以公司帳號將這個 Fleet 連接到 Hub {0}。分享 Agent 需另外選擇。" },
|
|
647
|
+
});
|
|
648
|
+
function pendingSummaryLine(line) {
|
|
649
|
+
if (typeof line !== "string") return line;
|
|
650
|
+
const known = /^(?:Connect this Fleet to Hub (.+) using your company account\. Agent sharing stays separate\.|以公司帳號將這個 Fleet 連接到 Hub (.+)。分享 Agent 需另外選擇。)$/.exec(line);
|
|
651
|
+
return known ? t("pendingHub.connect", known[1] ?? known[2]) : line;
|
|
652
|
+
}
|
|
643
653
|
export function PendingChanges({ inline = false } = {}) {
|
|
644
654
|
const { pendingChanges } = useStore(appStore);
|
|
645
655
|
const list = pendingChanges || [];
|
|
@@ -664,7 +674,7 @@ export function PendingChanges({ inline = false } = {}) {
|
|
|
664
674
|
${p.state === "pending" ? html`<span class="pending-left">${t("app.pendingLeft", mmss(p.deadline - NOW()))}</span>` : null}
|
|
665
675
|
${p.dismiss ? html`<button type="button" class="icon-btn" aria-label=${t("app.close")} title=${t("app.close")} onClick=${p.dismiss}><${Icon} name="close" size=${14} /></button>` : null}</div>
|
|
666
676
|
${p.label ? html`<div class="pending-label">${p.label}</div>` : null}
|
|
667
|
-
${Array.isArray(p.summary) && p.summary.length ? html`<ul class="pending-summary">${p.summary.map((line, i) => html`<li key=${i}>${line}</li>`)}</ul>` : null}
|
|
677
|
+
${Array.isArray(p.summary) && p.summary.length ? html`<details class="pending-details"><summary>${t("pendingHost.details")}</summary><ul class="pending-summary">${p.summary.map((line, i) => html`<li key=${i}>${String(pendingSummaryLine(line)).replace(/\\([\\`*_~[\]()<>|])/g, "$1")}</li>`)}</ul></details>` : null}
|
|
668
678
|
${p.state === "pending" ? html`<${PendingHow} p=${p} />` : null}
|
|
669
679
|
${(p.state === "applying" || p.state === "applied") && p.confirmation && p.confirmation.kind === "web" ? html`<p class="note">${t("app.pendingWeb")}</p>` : null}
|
|
670
680
|
${p.state !== "pending" && p.state !== "applying" && p.state !== "applied" ? html`<${PendingEnded} p=${p} />` : null}
|
|
@@ -698,9 +708,8 @@ function whereText(where) {
|
|
|
698
708
|
/**
|
|
699
709
|
* #2868: how a pending change is confirmed, in the order a person can act on it. First where: the General card (naming
|
|
700
710
|
* the platform it was posted on), or the host's command when no General could take it. Then, when this browser could
|
|
701
|
-
* confirm it itself (the server's read says so:
|
|
702
|
-
*
|
|
703
|
-
* "Advanced".
|
|
711
|
+
* confirm it itself (the server's read says so: AGEND-122's rule), "Apply now", or the admin's own authenticator code.
|
|
712
|
+
* The host's command otherwise sits folded under "Advanced" (never on a page that is not the AgEnD computer's own).
|
|
704
713
|
*/
|
|
705
714
|
// alpha.6 feedback #2c (the user's decision hmsg-77256f66): a change no General could take says WHY, in plain words, and what
|
|
706
715
|
// would let it through — never "type this command on the host". The host's command stays folded under Advanced, a last resort.
|
|
@@ -720,6 +729,7 @@ register("pendingHost", {
|
|
|
720
729
|
post_failed_do: "Check General's chat connection in Settings → Chat & connections, then make the change again.",
|
|
721
730
|
unknown: "No General could take the confirm card for this change.",
|
|
722
731
|
go: "Open",
|
|
732
|
+
details: "Change details",
|
|
723
733
|
codeLead: "Enter the 6-digit code from your authenticator app to confirm this change.",
|
|
724
734
|
codeLabel: "Authenticator code", codeGo: "Confirm",
|
|
725
735
|
codeWrong: "That code is not right. Use the current code in your authenticator app.",
|
|
@@ -730,10 +740,9 @@ register("pendingHost", {
|
|
|
730
740
|
// AGEND-118: the one next step this device can take, by state; the other ways are folded under "Other ways to confirm".
|
|
731
741
|
applyLead: "Press Apply now to confirm this change from this browser.", applyRefused: "This browser can't apply it here now. Use one of the other ways to confirm.",
|
|
732
742
|
cantHere: "This device can't confirm this change yet.",
|
|
733
|
-
setupLead: "
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
hostBrowser: "This change opens a link to this fleet, so only the browser on the computer running AgEnD can confirm it. Do it there.",
|
|
743
|
+
setupLead: "You asked for your authenticator code to confirm changes from other devices, but your authenticator app is gone. Set it up again on the computer running AgEnD (Settings → Access & security), or turn that switch off there.",
|
|
744
|
+
onHost: "A change that opens a public link can't be confirmed over a link. Confirm it from a direct connection, or in the browser on the computer running AgEnD.",
|
|
745
|
+
hostOnly: "Only the computer running AgEnD can confirm changes here: “Only this computer can authorize” is turned on. Confirm it in the browser on that computer.",
|
|
737
746
|
more: "Other ways to confirm",
|
|
738
747
|
moreHost: "On the computer running AgEnD, open AgEnD in its own browser and press Apply now on this card.",
|
|
739
748
|
},
|
|
@@ -752,19 +761,19 @@ register("pendingHost", {
|
|
|
752
761
|
post_failed_do: "請到「設定 → 聊天與連線」檢查 General 的連線,再重新做一次這項變更。",
|
|
753
762
|
unknown: "這項變更沒有 General 可以接收確認卡。",
|
|
754
763
|
go: "前往",
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
764
|
+
details: "變更明細",
|
|
765
|
+
codeLead: "輸入驗證器 App 的 6 位數驗證碼,就能確認這項變更。",
|
|
766
|
+
codeLabel: "6 位數驗證碼(驗證器 App)", codeGo: "確認",
|
|
767
|
+
codeWrong: "驗證碼不正確,請使用驗證器 App 目前顯示的 6 位數驗證碼。",
|
|
758
768
|
codePaused: "錯誤次數太多,請 {0} 分鐘後再試。",
|
|
759
|
-
codeNotHere: "
|
|
760
|
-
codeUnavailable: "
|
|
769
|
+
codeNotHere: "這個頁面已無法用驗證碼確認這項變更。",
|
|
770
|
+
codeUnavailable: "無法檢查驗證碼,請再試一次。",
|
|
761
771
|
codeChanged: "這項變更已不是這裡顯示的內容,請重新整理頁面再確認一次。",
|
|
762
772
|
applyLead: "按「立即套用」,就能在這個瀏覽器確認這項變更。", applyRefused: "這個瀏覽器現在無法直接套用,請改用其他確認方式。",
|
|
763
773
|
cantHere: "你目前在這台裝置還無法直接確認這項變更。",
|
|
764
|
-
setupLead: "
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
hostBrowser: "這項變更會開放一條連到這個 fleet 的連結,只有執行 AgEnD 的那台電腦上的瀏覽器能確認。請到那裡操作。",
|
|
774
|
+
setupLead: "你開啟了「從其他裝置確認變更時要我的驗證碼」,但你的驗證器 App 已經不見了。請到執行 AgEnD 的那台電腦,在「設定 → 存取與安全」重新設定,或在那裡關閉這個開關。",
|
|
775
|
+
onHost: "會開放公開連結的變更無法透過連結確認。請改用直接連線,或在執行 AgEnD 的那台電腦的瀏覽器中確認。",
|
|
776
|
+
hostOnly: "目前只有執行 AgEnD 的那台電腦能確認變更(已開啟「只有這台電腦可以授權」)。請到那台電腦的瀏覽器確認。",
|
|
768
777
|
more: "其他確認方式",
|
|
769
778
|
moreHost: "到執行 AgEnD 的那台電腦,用它自己的瀏覽器開啟 AgEnD,在這張卡上按「立即套用」。",
|
|
770
779
|
},
|
|
@@ -836,45 +845,36 @@ function PendingCode({ p }) {
|
|
|
836
845
|
* tells the person to run it (style guide rule 9), and has no Copy for it.
|
|
837
846
|
*/
|
|
838
847
|
function PendingHow({ p }) {
|
|
839
|
-
const a = useWebAuthorization();
|
|
840
848
|
const [refused, setRefused] = useState(false);
|
|
841
849
|
const c = p.confirmation || {}, cmd = `agend settings confirm ${p.id}`;
|
|
842
850
|
const cli = c.kind === "host_cli";
|
|
843
851
|
const why = cli && PENDING_HOST_REASONS.includes(c.reason) ? c.reason : null;
|
|
844
852
|
const go = why && Object.hasOwn(PENDING_HOST_GO, why) ? PENDING_HOST_GO[why] : null;
|
|
845
853
|
const apply = async () => { setRefused(false); const r = await p.applyNow(); if (!r || !r.ok) setRefused(true); };
|
|
846
|
-
|
|
854
|
+
// AGEND-122: a page that is not the AgEnD computer's own browser never shows the host command.
|
|
855
|
+
const advanced = p.remote ? null : html`<details class="pending-host"><summary>${t("app.pendingAdvanced")}</summary><code>${cmd}</code></details>`;
|
|
847
856
|
const goLink = go ? html` <a class="btn btn-sm" href=${settingsPath(go)}>${t("pendingHost.go")}</a>` : null;
|
|
848
857
|
const whyDo = (why || cli) ? html`<p class="note pending-why">${t(`pendingHost.${why || "unknown"}`)}${why ? html` ${t(`pendingHost.${why}_do`)}${goLink}` : null}</p>` : null;
|
|
849
|
-
// The change is waiting for a General's card (or it is still being sent): that card is the step.
|
|
850
|
-
|
|
851
|
-
const mode = p.applyNow ? "apply" : p.confirmWithCode ? "code" : p.totpNotSetUp ? "setup" : p.onHost ? "link" : p.hostBrowser ? "hostBrowser" : "none";
|
|
858
|
+
// The change is waiting for a General's card (or it is still being sent): that card is the step.
|
|
859
|
+
const mode = p.applyNow ? "apply" : p.confirmWithCode ? "code" : p.totpNotSetUp ? "setup" : p.onHost ? "link" : p.hostOnly ? "hostOnly" : "none";
|
|
852
860
|
if (!cli && (mode === "none" || mode === "apply")) {
|
|
853
|
-
const route = !p.applyNow && a.st;
|
|
854
|
-
const canAsk = route && a.st.state === "none" && (a.st.reason === "not_authorized" || a.st.reason === "authorization_expired");
|
|
855
|
-
const asking = route && a.st.state === "pending";
|
|
856
861
|
const lead = c.kind === "posting" ? t("app.pendingPosting") : t("app.pendingChatWhere", whereText(c.where));
|
|
857
862
|
return html`<p class="note">${lead}</p>
|
|
858
863
|
${p.applyNow ? html`<div class="pending-self"><span class="note">${t("app.pendingSelf")}</span>
|
|
859
864
|
<button type="button" class="btn btn-sm btn-primary" onClick=${apply}>${t("app.pendingApplyNow")}</button></div>` : null}
|
|
860
865
|
${refused && !p.applyNow ? html`<p class="note" role="status">${t("app.pendingApplyRefused")}</p>` : null}
|
|
861
|
-
${canAsk ? html`<div class="pending-self"><span class="note">${t("app.pendingAuthorize")}</span>
|
|
862
|
-
<button type="button" class="btn btn-sm" onClick=${a.ask}>${t("webauth.authorize")}</button></div>` : null}
|
|
863
|
-
${asking ? html`<p class="note">${t("webauth.waiting", mmss(a.left))}</p>` : null}
|
|
864
|
-
${a.notice && (canAsk || asking) ? html`<p class="note" role="status">${a.notice}</p>` : null}
|
|
865
866
|
${advanced}`;
|
|
866
867
|
}
|
|
867
868
|
const next = mode === "apply" ? html`<div class="pending-self"><span class="note">${t("pendingHost.applyLead")}</span>
|
|
868
869
|
<button type="button" class="btn btn-sm btn-primary" onClick=${apply}>${t("app.pendingApplyNow")}</button></div>`
|
|
869
870
|
: mode === "code" ? html`<${PendingCode} p=${p} />`
|
|
870
871
|
: mode === "setup" ? html`<p class="note pending-cant">${t("pendingHost.cantHere")}</p>
|
|
871
|
-
<
|
|
872
|
-
<a class="btn btn-sm btn-primary" href=${settingsPath("access")}>${t("pendingHost.setupGo")}</a></div>`
|
|
872
|
+
<p class="note pending-code-setup">${t("pendingHost.setupLead")}</p>`
|
|
873
873
|
: mode === "link" ? html`<p class="note pending-on-host">${t("pendingHost.onHost")}</p>`
|
|
874
|
-
: mode === "
|
|
874
|
+
: mode === "hostOnly" ? html`<p class="note pending-host-only">${t("pendingHost.hostOnly")}</p>`
|
|
875
875
|
: html`${refused ? html`<p class="note" role="status">${t("pendingHost.applyRefused")}</p>` : null}${whyDo}`;
|
|
876
876
|
// What is not the step: shown folded only where there is something to say besides the command.
|
|
877
|
-
const others = mode === "setup" || mode === "link"
|
|
877
|
+
const others = mode === "setup" || mode === "link";
|
|
878
878
|
return html`${next}
|
|
879
879
|
${others ? html`<details class="pending-host pending-others"><summary>${t("pendingHost.more")}</summary><div class="pending-more">
|
|
880
880
|
${whyDo}
|
package/dist/ui/shared/app.css
CHANGED
|
@@ -249,7 +249,7 @@ html:has(.shell), html:has(.shell) body { overflow: hidden; }
|
|
|
249
249
|
.session { position: relative; }
|
|
250
250
|
.pop {
|
|
251
251
|
position: absolute; left: 0; right: 0; bottom: calc(100% + var(--s-1)); z-index: 30; display: flex; flex-direction: column; gap: var(--s-2);
|
|
252
|
-
padding: var(--s-3); border-radius: var(--r-md); background: var(--
|
|
252
|
+
padding: var(--s-3); border-radius: var(--r-md); background: var(--bg); border: 1px solid var(--border); box-shadow: var(--shadow-2); font-size: var(--fs-sm);
|
|
253
253
|
}
|
|
254
254
|
.pop h3 { font-size: var(--fs-sm); font-weight: var(--fw-semibold); }
|
|
255
255
|
.pop .sub, .pop .when { color: var(--text-3); font-size: var(--fs-xs); }
|
|
@@ -257,6 +257,10 @@ html:has(.shell), html:has(.shell) body { overflow: hidden; }
|
|
|
257
257
|
.pop .devices .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; }
|
|
258
258
|
.pop .row { display: flex; gap: var(--s-2); flex-wrap: wrap; }
|
|
259
259
|
.pop .err { color: var(--danger); }
|
|
260
|
+
.pop .role { margin: 0; display: flex; gap: var(--s-2); align-items: baseline; flex-wrap: wrap; }
|
|
261
|
+
.pop .webauth-rebind-form { display: flex; flex-direction: column; gap: var(--s-2); margin-top: var(--s-1); }
|
|
262
|
+
.pop .webauth-rebind-form .note, .pop .webauth-rebind-form .err { margin: 0; }
|
|
263
|
+
.pop .webauth-rebind-field { flex: 1; min-width: 0; } /* the shared .field input (token-sized), not a one-off box */
|
|
260
264
|
|
|
261
265
|
.dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; background: var(--text-3); display: inline-block; }
|
|
262
266
|
.dot.ok { background: var(--ok); }
|
|
@@ -961,6 +965,14 @@ img.amb-p { object-fit: contain; }
|
|
|
961
965
|
.msg-quote .quote-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
962
966
|
.msg-menu { position: fixed; z-index: 60; min-width: 180px; padding: var(--s-1); border-radius: var(--r-md); background: var(--surface);
|
|
963
967
|
box-shadow: var(--shadow-2); display: flex; flex-direction: column; }
|
|
968
|
+
/* M-2789: the 「引用」 pill on a selected passage (chat-quote.js) — the message menu's look, one item, its pointer at the
|
|
969
|
+
passage's end; readable on white and dark alike (the shared border and shadow tokens). A phone's is a 44-px tap. */
|
|
970
|
+
.msg-menu.quote-pop { min-width: 0; padding: 2px; border: 1px solid var(--border-strong); overflow: visible; }
|
|
971
|
+
.quote-pop .quote-pick { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; white-space: nowrap; }
|
|
972
|
+
.quote-pop.is-phone .quote-pick { min-height: var(--tap); padding: 10px 14px; }
|
|
973
|
+
.quote-pop .quote-tip { position: absolute; width: 10px; height: 10px; background: var(--surface); transform: rotate(45deg); pointer-events: none; }
|
|
974
|
+
.quote-pop .quote-tip.down { bottom: -6px; border-right: 1px solid var(--border-strong); border-bottom: 1px solid var(--border-strong); }
|
|
975
|
+
.quote-pop .quote-tip.up { top: -6px; border-left: 1px solid var(--border-strong); border-top: 1px solid var(--border-strong); }
|
|
964
976
|
.msg[data-key] { transition: transform var(--t-fast); }
|
|
965
977
|
.msg.swipe-ready { box-shadow: 3px 0 0 var(--accent); border-radius: var(--r-sm); } /* let go now: a reply */
|
|
966
978
|
@media (max-width: 899px) {
|
|
@@ -1279,6 +1291,13 @@ img.amb-p { object-fit: contain; }
|
|
|
1279
1291
|
.row-item .btn, .s-row .btn, .n-actions .btn { min-height: var(--tap); }
|
|
1280
1292
|
.s-row .icon-btn { min-width: var(--tap); min-height: var(--tap); }
|
|
1281
1293
|
.p-settings .s-company-join :is(.field input, .btn) { min-height: var(--tap); }
|
|
1294
|
+
/* AGEND-122: Owner verification's own buttons, dialog fields and switches are phone tap targets (style guide rule 7); the Devices
|
|
1295
|
+
card's primary action beside it matches (one primary button height on the page). */
|
|
1296
|
+
.p-settings .s-outside :is(.save-row .btn, .field input, label.check), .p-settings .s-devices .save-row .btn, .p-settings .s-web-authority .save-row .btn { min-height: var(--tap); }
|
|
1297
|
+
/* PR #3553 review: the session menu's own controls (Sign out, Manage devices, Re-bind, its code box and Bind) are phone tap targets
|
|
1298
|
+
too — the shared --tap token, one height for every button of a kind; the Web authority card's Revoke matches the Devices card's
|
|
1299
|
+
buttons beside it (one danger-button height on the page). */
|
|
1300
|
+
.pop :is(.btn, .field input) { min-height: var(--tap); }
|
|
1282
1301
|
.s-update .s-update-row .btn { min-height: var(--tap); } /* M-2738: the Version and update card's buttons */
|
|
1283
1302
|
.kv { flex-direction: column; align-items: flex-start; gap: 2px; }
|
|
1284
1303
|
}
|
|
@@ -1763,7 +1782,7 @@ textarea.s-yaml { white-space: pre; overflow-x: auto; }
|
|
|
1763
1782
|
.pending-actions { display: flex; justify-content: flex-end; }
|
|
1764
1783
|
.pending-self { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-2); }
|
|
1765
1784
|
.pending-self > .note { flex: 1 1 16rem; min-width: 0; }
|
|
1766
|
-
.pending-host summary { cursor: pointer; color: var(--text-2); font-size: var(--fs-xs); }
|
|
1785
|
+
.pending-host summary, .pending-details summary { cursor: pointer; color: var(--text-2); font-size: var(--fs-xs); }
|
|
1767
1786
|
/* AGEND-118: the other ways to confirm, folded under one summary. */
|
|
1768
1787
|
.pending-more { display: flex; flex-direction: column; gap: var(--s-2); margin-top: var(--s-2); }
|
|
1769
1788
|
.pending-host code { display: block; margin-top: var(--s-1); font-size: var(--fs-xs); overflow-wrap: anywhere; user-select: all; }
|
|
@@ -4193,3 +4212,17 @@ html.oo-immersive .p-fleet > .panel-body { z-index: 50; }
|
|
|
4193
4212
|
.s-hub-section .hub-retention input { min-width: 0; max-width: 100%; min-height: var(--tap); font-size: var(--fs-md); }
|
|
4194
4213
|
.s-hub-section .hub-retention button { align-self: flex-start; max-width: 100%; min-height: var(--tap); white-space: normal; }
|
|
4195
4214
|
}
|
|
4215
|
+
|
|
4216
|
+
/* S-119: the existing company, manual and sharing controls share one Settings card. */
|
|
4217
|
+
.s-hub-connection { display: flex; flex-direction: column; gap: var(--s-4); min-width: 0; }
|
|
4218
|
+
.s-hub-connection > .s-group-head { padding: 0; flex-wrap: wrap; cursor: default; text-transform: none; letter-spacing: normal; }
|
|
4219
|
+
.s-hub-connection > .s-group-head h3 { margin: 0; font-size: var(--fs-lg); }
|
|
4220
|
+
.s-hub-connection .hub-connection-summary .field { min-width: 0; overflow-wrap: anywhere; }
|
|
4221
|
+
.s-hub-connection .s-ui-disclosure > summary { cursor: pointer; }
|
|
4222
|
+
@media (max-width: 899px), (pointer: coarse) {
|
|
4223
|
+
.s-hub-connection :is(.btn, input:not([type="checkbox"]), .check, .hub-exposure-main, summary) { min-height: var(--tap); }
|
|
4224
|
+
.s-hub-connection .btn { min-width: var(--tap); }
|
|
4225
|
+
.s-hub-connection .field-row { flex-wrap: wrap; }
|
|
4226
|
+
.s-hub-connection .field-row > .btn-primary { width: 100%; }
|
|
4227
|
+
.s-hub-connection .hub-fp .btn { white-space: normal; }
|
|
4228
|
+
}
|
|
@@ -30,7 +30,7 @@ register("chat", {
|
|
|
30
30
|
you: "You", sending: "Sending…", uploadingFile: "Uploading {0}", uploadWaiting: "waiting", uploadFailed: "failed",
|
|
31
31
|
uploadNoConnection: "the upload was cut off — check the connection", sendNoConnection: "it did not reach AgEnD — check the connection", notSentBecause: "Not sent: {0}", deleteUnsent: "Delete",
|
|
32
32
|
sendFailure_wake_capacity: "No slot is free to wake this instance. Retry when another instance is idle.",
|
|
33
|
-
sendFailure_wake_credentials: "The instance could not sign in.
|
|
33
|
+
sendFailure_wake_credentials: "The instance could not sign in. Connect its AI account in Settings → Agents → AI accounts and API keys → Accounts, or send /login in chat, then retry.",
|
|
34
34
|
sendFailure_wake_timeout: "The instance did not become ready in time. Retry, or check its status in Fleet.",
|
|
35
35
|
sendFailure_instance_stopped: "This instance was stopped or removed. Start it from the agent's chat menu → Start instance, then retry.",
|
|
36
36
|
sendFailure_delivery_unavailable: "The instance could not receive this message. Check its status in Fleet, then retry.",
|
|
@@ -46,7 +46,7 @@ register("chat", {
|
|
|
46
46
|
compactTimeout: "No sign that compaction finished within {0} minutes — check the agent's own chat.",
|
|
47
47
|
compactLost: "Can't follow this compaction: the command did not reach the agent, or the agent stopped or changed backend.",
|
|
48
48
|
compactNotCompacted: "kiro did not compact the conversation: it was too short, or the compaction was stopped.",
|
|
49
|
-
cmdChoose: "Choose", cmdCurrent: "current", cmdSignIn: "
|
|
49
|
+
cmdChoose: "Choose", cmdCurrent: "current", cmdSignIn: "Connect account", cmdSignInTo: "Connect your {0} account", chipCompact: "Compact", chipClear: "Clear…", chipContext: "Context {0}% used",
|
|
50
50
|
chipModel: "Model: {0} — choose another", chipEffort: "Effort: {0} — choose another",
|
|
51
51
|
cmd_ctx: "Context use, model and effort", cmd_compact: "Compact the conversation", cmd_clear: "Clear the conversation (asks first)",
|
|
52
52
|
cmd_model: "Show or switch the model", cmd_backend: "Switch the CLI backend, then model and effort (restarts)", cmd_effort: "Show or set the reasoning effort", cmd_cancel: "Stop the current reply",
|
|
@@ -197,7 +197,7 @@ register("chat", {
|
|
|
197
197
|
you: "你", sending: "傳送中…", uploadingFile: "正在上傳 {0}", uploadWaiting: "等待中", uploadFailed: "失敗",
|
|
198
198
|
uploadNoConnection: "上傳中斷了,請檢查網路連線", sendNoConnection: "沒有送到 AgEnD,請檢查網路連線", notSentBecause: "沒有送出:{0}", deleteUnsent: "刪除",
|
|
199
199
|
sendFailure_wake_capacity: "目前沒有空位可喚醒這個 Agent。請等其他 Agent 閒置後重試。",
|
|
200
|
-
sendFailure_wake_credentials: "Agent 無法登入。請到設定 → Agents →「AI
|
|
200
|
+
sendFailure_wake_credentials: "Agent 無法登入。請到設定 → Agents →「AI 帳號與 API 金鑰」→「帳號」連接 AI 帳號,或在聊天傳 /login,再重試。",
|
|
201
201
|
sendFailure_wake_timeout: "Agent 未能及時就緒。請重試,或到 Fleet 查看它的狀態。",
|
|
202
202
|
sendFailure_instance_stopped: "這個 Agent 已停止或移除。請先從該 agent 的聊天選單按「啟動 Agent」,再重試。",
|
|
203
203
|
sendFailure_delivery_unavailable: "Agent 目前無法接收這則訊息。請到 Fleet 查看它的狀態,再重試。",
|
|
@@ -213,7 +213,7 @@ register("chat", {
|
|
|
213
213
|
compactTimeout: "{0} 分鐘內沒有看到壓縮完成的紀錄,請到 Agent 自己的對話確認。",
|
|
214
214
|
compactLost: "無法再追蹤這次壓縮:指令沒有送到 Agent,或 Agent 已停止、換了後端。",
|
|
215
215
|
compactNotCompacted: "kiro 沒有壓縮對話:對話太短,或壓縮被中止了。",
|
|
216
|
-
cmdChoose: "選擇", cmdCurrent: "目前", cmdSignIn: "
|
|
216
|
+
cmdChoose: "選擇", cmdCurrent: "目前", cmdSignIn: "連接帳號", cmdSignInTo: "連接 {0} 帳號", chipCompact: "壓縮", chipClear: "清空…", chipContext: "已用 {0}% 的 context",
|
|
217
217
|
chipModel: "模型:{0}——選擇其他", chipEffort: "推理強度:{0}——選擇其他",
|
|
218
218
|
cmd_ctx: "context 用量、模型與推理強度", cmd_compact: "壓縮對話", cmd_clear: "清空對話(會先確認)",
|
|
219
219
|
cmd_model: "查看或切換模型", cmd_backend: "切換 CLI backend,再選模型和推理強度(會重新啟動)", cmd_effort: "查看或設定推理強度", cmd_cancel: "停止目前的回覆",
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
// AGEND-138 (PR #3553 review): the four roles a sign-in can have, and the session menu's "Manage devices" word — in a module of
|
|
2
|
+
// their own on purpose. The session menu (app-session.js, statically imported by the shell) and Settings → Devices read them; a
|
|
3
|
+
// tab that still holds the previous web-authorize.js / app-i18n.js must not be linked against a NEW named export or a missing
|
|
4
|
+
// key (an ESM `import { roleName }` from the old file is a SyntaxError that stops the whole shell). This file's URL is new, so
|
|
5
|
+
// no tab holds an older copy of it; web-authorize.js and app-i18n.js no longer carry these words (a key lives in one file).
|
|
6
|
+
// The pattern is settings-shared-strings.js / settings-access-strings.js (#3087, #3061).
|
|
7
|
+
import { register, t } from "./app-i18n.js";
|
|
8
|
+
|
|
9
|
+
register("webauth", {
|
|
10
|
+
en: { role: "Role", roleOwner: "Owner ✓", roleAdminUnverified: "Admin · not verified", roleGuest: "Guest", roleRead: "Read-only" },
|
|
11
|
+
"zh-TW": { role: "角色", roleOwner: "擁有者 ✓", roleAdminUnverified: "管理者 · 未驗證", roleGuest: "訪客", roleRead: "唯讀" },
|
|
12
|
+
});
|
|
13
|
+
register("app", {
|
|
14
|
+
en: { manageDevices: "Manage devices" },
|
|
15
|
+
"zh-TW": { manageDevices: "管理裝置" },
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* A sign-in's role as one of four words — the session menu's and Settings → Devices' alike. `tier` is the session's (admin /
|
|
20
|
+
* read / guest); `verified`: its owner authorization is valid now (this computer's code sign-in or a chat account's confirm).
|
|
21
|
+
* Only an admin can be an owner; an admin without that is "Admin · not verified".
|
|
22
|
+
*/
|
|
23
|
+
export function roleName(tier, verified) {
|
|
24
|
+
if (tier === "guest") return t("webauth.roleGuest");
|
|
25
|
+
if (tier === "read") return t("webauth.roleRead");
|
|
26
|
+
return verified ? t("webauth.roleOwner") : t("webauth.roleAdminUnverified");
|
|
27
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/* Feature-owned support for the existing confirmation card, including a cached shell/stylesheet. */
|
|
2
|
+
@media (max-width: 899px), (pointer: coarse) {
|
|
3
|
+
.pending-stack .pending-code-input,
|
|
4
|
+
.pending-stack .pending-code .btn,
|
|
5
|
+
.pending-stack .pending-actions .btn {
|
|
6
|
+
min-height: var(--tap);
|
|
7
|
+
min-width: var(--tap);
|
|
8
|
+
}
|
|
9
|
+
.pending-stack .pending-code-input { font-size: var(--fs-lg); }
|
|
10
|
+
}
|
|
@@ -49,3 +49,9 @@
|
|
|
49
49
|
.hub-page-lead { margin: 0; }
|
|
50
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
51
|
@media (max-width: 600px) { .hub-home-list .side-new, .hub-crumb { min-height: var(--tap); } .hub-crumb { min-width: var(--tap); } }
|
|
52
|
+
|
|
53
|
+
/* S-119: the existing group/invitation authority is discoverable before the manual pairing flow. */
|
|
54
|
+
.hub-admin-access { display: flex; flex-direction: column; gap: var(--s-3); }
|
|
55
|
+
.hub-admin-access .field-row { flex-wrap: wrap; }
|
|
56
|
+
.hub-admin-access h4 { margin: 0; }
|
|
57
|
+
.hub-admin-manual > .card { border: 0; }
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/* Feature stylesheet: an upgraded lazy panel remains usable with cached app.css. */
|
|
2
|
+
.model-refresh { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s-1); }
|
|
3
|
+
.model-refresh > .btn { width: auto; gap: var(--s-2); }
|
|
4
|
+
.model-refresh .error-state { align-self: stretch; }
|
|
5
|
+
.cmd-head-actions, .model-entry-row { display: flex; align-items: center; gap: var(--s-2); }
|
|
6
|
+
.cmd-model-more { display: flex; justify-content: flex-start; }
|
|
7
|
+
.cmd-card .cmd-choices .btn:disabled { text-decoration: none; opacity: 0.5; }
|
|
8
|
+
.cmd-card .cmd-choices .btn.current { border-color: var(--accent); color: var(--accent); }
|
|
9
|
+
.cmd-card.cmd-model .cmd-choices .btn.current::before { content: "✓"; }
|
|
10
|
+
.model-entry-row { display: none; }
|
|
11
|
+
@media (max-width: 899px) {
|
|
12
|
+
.model-refresh .btn, .cmd-card .btn, .cmd-card .icon-btn { min-height: var(--tap); min-width: var(--tap); }
|
|
13
|
+
.chat-model-entry { display: none; }
|
|
14
|
+
.model-entry-row { display: flex; flex-wrap: wrap; padding: var(--s-1) var(--s-2); border-bottom: 1px solid var(--border); }
|
|
15
|
+
.p-chat .composer-box { border: 1px solid var(--border); }
|
|
16
|
+
.model-entry-row .btn { border-radius: var(--r-full); min-height: var(--tap); min-width: var(--tap); max-width: 100%; overflow-wrap: anywhere; }
|
|
17
|
+
/* The latest button lives in a dedicated dock row, clear of message text and the command/composer content. */
|
|
18
|
+
.p-chat .jump-dock { position: static; height: auto; display: flex; justify-content: center; padding: var(--s-1); }
|
|
19
|
+
.p-chat .jump-dock:empty { display: none; }
|
|
20
|
+
.p-chat .jump-latest { position: static; transform: none; min-height: var(--tap); }
|
|
21
|
+
}
|
|
@@ -8,7 +8,9 @@
|
|
|
8
8
|
.runtime-command-label { display: block; margin: 0 0 6px; font-size: var(--fs-sm); color: var(--text-2); }
|
|
9
9
|
.runtime-command-row { display: flex; align-items: flex-start; gap: 8px; min-width: 0; }
|
|
10
10
|
.runtime-command-row .btn { flex: none; }
|
|
11
|
-
.runtime-command-text { flex: 1; min-width: 0; margin: 0; padding:
|
|
11
|
+
.runtime-command-text { flex: 1; min-width: 0; max-height: 4.8em; margin: 0; padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); font-family: var(--font-mono); font-size: var(--fs-xs); line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; overflow-x: auto; overflow-y: auto; user-select: all; }
|
|
12
|
+
.runtime-more-details { margin: 4px 0 8px; }
|
|
13
|
+
.runtime-more-details summary { cursor: pointer; color: var(--text-2); font-size: var(--fs-xs); }
|
|
12
14
|
.runtime-command-text code { font: inherit; }
|
|
13
15
|
@media (max-width: 600px) { .runtime-command-row { flex-direction: column; align-items: stretch; } .runtime-command-row .btn { align-self: flex-start; } }
|
|
14
16
|
.runtime-installer-hash code { overflow-wrap: anywhere; font-family: var(--font-mono); }
|
|
@@ -28,3 +30,26 @@
|
|
|
28
30
|
.runtime-update-notice { margin-block: .75rem; padding: .6rem .8rem; border-inline-start: 3px solid var(--border, #777); }
|
|
29
31
|
.runtime-update-notice p { margin-block: .25rem; overflow-wrap: anywhere; }
|
|
30
32
|
.runtime-update-notice[role="alert"] { border-inline-start-color: var(--warning, #b87218); }
|
|
33
|
+
/* the one-time install command's card, and the notice that a computer joined with it. */
|
|
34
|
+
.runtime-enroll-card h4 { margin: 0 0 var(--s-3); font-size: var(--fs-md); }
|
|
35
|
+
.runtime-enroll-card.is-used .runtime-pair-status { color: var(--ok); }
|
|
36
|
+
.runtime-enroll-card.is-expired .runtime-pair-status, .runtime-enroll-card.is-revoked .runtime-pair-status { color: var(--warn); }
|
|
37
|
+
.runtime-enroll-clock { font-variant-numeric: tabular-nums; }
|
|
38
|
+
/* the shared straight bar (.lbar in app.css), with the 3px it takes added to the padding */
|
|
39
|
+
.runtime-enroll-warning { --lbar-color: var(--warn); padding: var(--s-2) var(--s-3) var(--s-2) calc(var(--s-3) + 3px); background: var(--warn-bg); }
|
|
40
|
+
.runtime-enroll-ended { margin: 0 0 var(--s-2); padding: var(--s-3); border: 1px solid var(--warn); border-radius: var(--r-sm); background: var(--warn-bg); }
|
|
41
|
+
.runtime-joined { display: flex; align-items: flex-start; gap: var(--s-3); margin: 0 0 var(--s-3); padding: var(--s-3) var(--s-4); border: 1px solid var(--warn); border-radius: var(--r-md); background: var(--warn-bg); }
|
|
42
|
+
.runtime-joined-text { flex: 1; min-width: 0; }
|
|
43
|
+
.runtime-joined h4 { margin: 0 0 var(--s-1); font-size: var(--fs-md); }
|
|
44
|
+
.runtime-joined .note { margin: 0; font-size: var(--fs-sm); overflow-wrap: anywhere; }
|
|
45
|
+
.runtime-joined-actions { display: flex; flex-wrap: wrap; gap: var(--s-2); flex: none; }
|
|
46
|
+
@media (max-width: 600px) { .runtime-joined { flex-wrap: wrap; } .runtime-joined-actions { width: 100%; } }
|
|
47
|
+
/* the approval dialog's large pairing fingerprint, the "N computers are waiting" bar and the same-name hint. Tokens only; the bar and the
|
|
48
|
+
hint are the shared straight left bar (.lbar). */
|
|
49
|
+
.runtime-approve-fingerprint { margin: 0; padding: var(--s-3) 0; font-family: var(--font-mono); font-size: var(--fs-xl); line-height: var(--lh-xl); font-weight: var(--fw-semibold); letter-spacing: .08em; color: var(--text); overflow-wrap: anywhere; }
|
|
50
|
+
.runtime-pending-banner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--s-3); margin: 0 0 var(--s-4); padding: var(--s-2) 0 var(--s-2) var(--s-3); --lbar-color: var(--warn); --lbar-inset: 0; font-size: var(--fs-sm); color: var(--text); }
|
|
51
|
+
.runtime-same-name { --lbar-color: var(--warn); --lbar-inset: 0; padding-left: var(--s-3); color: var(--text-2); }
|
|
52
|
+
@media (max-width: 600px) { .runtime-open-policy { min-height: var(--tap); } }
|
|
53
|
+
/* AGEND-154 (Prism P2-3 on #3552): the Install / Update buttons of a paired computer's CLI list (.btn.btn-sm = 30px) are phone tap targets — 44px high and wide (the house --tap), on the same
|
|
54
|
+
breakpoints as the shared phone rules. Here, not only in app.css, so a tab that kept an older app.css still gets them (this file is linked by panel-runtimes.js itself). Tokens only: no inline style. */
|
|
55
|
+
@media (max-width: 899px), (pointer: coarse) { .runtime-cli-install-list li .btn { min-height: var(--tap, 44px); min-width: var(--tap, 44px); } }
|
|
@@ -10,11 +10,11 @@
|
|
|
10
10
|
*/
|
|
11
11
|
export const HOST_MESSAGES = [
|
|
12
12
|
// The code page (setup-host.ts redeem / afterFailure / the cookie gate).
|
|
13
|
-
["incorrect — {0} attempts left", "
|
|
14
|
-
["incorrect — {0} attempt left", "
|
|
13
|
+
["incorrect — {0} attempts left", "設定碼不正確 —— 還可以再試 {0} 次"],
|
|
14
|
+
["incorrect — {0} attempt left", "設定碼不正確 —— 還可以再試 {0} 次"],
|
|
15
15
|
["too many failed attempts — run `agend setup` again on the host", "錯誤次數太多 —— 請在主機上再執行一次 `agend setup`"],
|
|
16
|
-
["enter the setup code", "
|
|
17
|
-
["enter the setup code first", "
|
|
16
|
+
["enter the setup code", "請輸入設定碼"],
|
|
17
|
+
["enter the setup code first", "請先輸入設定碼"],
|
|
18
18
|
["cross-site request rejected", "已拒絕跨站請求"],
|
|
19
19
|
["not found", "找不到"],
|
|
20
20
|
// Finishing (setup-host.ts finishSetup / status).
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
// TEMPORARY (#3486): the minimum page for trying "sign in with your own authenticator" by hand; the leader's sign-in page replaces it.
|
|
2
|
+
// It posts {account, code} to /auth/totp and reads the answer as docs/SECURITY.md says: 200 signed in; 401 wrong_code (one answer for a
|
|
3
|
+
// wrong code, a name that is nobody's and an admin with no app); 429 paused (retryAfterMs); 404 not available here; 5xx unavailable.
|
|
4
|
+
(function () {
|
|
5
|
+
"use strict";
|
|
6
|
+
const T = {
|
|
7
|
+
en: {
|
|
8
|
+
title: "Sign in with your authenticator", lead: "Use the authenticator app you set up in AgEnD for your own account.",
|
|
9
|
+
account: "Your account name", code: "6-digit code", submit: "Sign in", working: "Signing in…",
|
|
10
|
+
hint: "Your account name is your chat handle or user id, shown in Settings → Access & security → Owner verification. No authenticator yet? Use the sign-in code from chat instead.",
|
|
11
|
+
back: "Use a sign-in code instead",
|
|
12
|
+
refused: "That did not work. Check the account name and the newest code in your app (and that the phone's clock is right).",
|
|
13
|
+
refused_hint: "If you are sure the code is right, sign-in may be limited for a while: use the 8-character sign-in code instead, or a device you have signed in from before.",
|
|
14
|
+
paused: "Too many wrong tries. Try again in {duration}.", minutes: "{0} minutes", minute: "1 minute", hours: "{0} hours", hour: "1 hour",
|
|
15
|
+
closed: "Signing in with an authenticator is not available here.", failed: "Could not sign in. Try again.", network: "Cannot reach AgEnD. Check the connection.",
|
|
16
|
+
},
|
|
17
|
+
"zh-TW": {
|
|
18
|
+
title: "用驗證器登入", lead: "請使用你在 AgEnD 為自己帳號設定的驗證器 App。",
|
|
19
|
+
account: "你的帳號名稱", code: "6 位數驗證碼", submit: "登入", working: "登入中…",
|
|
20
|
+
hint: "帳號名稱是你的聊天帳號代號或使用者 ID,可在「設定 → 存取與安全 → 擁有者驗證」看到。還沒設定驗證器?請改用聊天傳來的登入碼。",
|
|
21
|
+
back: "改用登入碼",
|
|
22
|
+
refused: "無法登入。請確認帳號名稱,以及 App 裡最新的驗證碼(和手機時間是否正確)。",
|
|
23
|
+
refused_hint: "如果確定驗證碼正確,可能暫時被限制了:請改用 8 碼登入碼,或用之前登入過的裝置。",
|
|
24
|
+
paused: "錯誤次數太多,請 {duration} 後再試。", minutes: "{0} 分鐘", minute: "1 分鐘", hours: "{0} 小時", hour: "1 小時",
|
|
25
|
+
closed: "這裡無法使用驗證器登入。", failed: "無法登入,請再試一次。", network: "連不上 AgEnD,請檢查連線。",
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
const lang = /^zh/i.test(navigator.language || "") ? "zh-TW" : "en";
|
|
29
|
+
const t = (k) => T[lang][k] || T.en[k] || k;
|
|
30
|
+
const $ = (id) => document.getElementById(id);
|
|
31
|
+
document.documentElement.lang = lang === "zh-TW" ? "zh-Hant" : "en";
|
|
32
|
+
document.querySelectorAll("[data-i18n]").forEach((el) => { el.textContent = t(el.getAttribute("data-i18n")); });
|
|
33
|
+
// A web-only fleet has one admin: no name to give.
|
|
34
|
+
const webOnly = new URLSearchParams(location.search).get("webonly") === "1" || document.body.getAttribute("data-web-only") === "1";
|
|
35
|
+
if (webOnly) $("accountRow").hidden = true;
|
|
36
|
+
const duration = (ms) => {
|
|
37
|
+
const minutes = Math.max(1, Math.ceil(ms / 60000));
|
|
38
|
+
if (minutes < 60) return minutes === 1 ? t("minute") : t("minutes").replace("{0}", String(minutes));
|
|
39
|
+
const hours = Math.ceil(minutes / 60);
|
|
40
|
+
return hours === 1 ? t("hour") : t("hours").replace("{0}", String(hours));
|
|
41
|
+
};
|
|
42
|
+
$("form").addEventListener("submit", async (event) => {
|
|
43
|
+
event.preventDefault();
|
|
44
|
+
const button = $("go"), msg = $("msg");
|
|
45
|
+
msg.textContent = ""; button.disabled = true; button.textContent = t("working");
|
|
46
|
+
try {
|
|
47
|
+
const r = await fetch("/auth/totp", {
|
|
48
|
+
method: "POST", credentials: "same-origin", headers: { "Content-Type": "application/json" },
|
|
49
|
+
body: JSON.stringify(webOnly ? { code: $("code").value } : { account: $("account").value, code: $("code").value }),
|
|
50
|
+
});
|
|
51
|
+
if (r.ok) { location.replace("/ui"); return; }
|
|
52
|
+
if (r.status === 429) {
|
|
53
|
+
let wait = Number(r.headers.get("Retry-After")) * 1000;
|
|
54
|
+
try { const body = await r.json(); if (Number.isFinite(body && body.retryAfterMs)) wait = body.retryAfterMs; } catch { /* the header's */ }
|
|
55
|
+
msg.textContent = t("paused").replace("{duration}", duration(Number.isFinite(wait) && wait > 0 ? wait : 60000));
|
|
56
|
+
} else msg.textContent = r.status === 401 ? `${t("refused")} ${t("refused_hint")}` : r.status === 404 ? t("closed") : t("failed");
|
|
57
|
+
} catch { msg.textContent = t("network"); }
|
|
58
|
+
button.disabled = false; button.textContent = t("submit"); $("code").select();
|
|
59
|
+
});
|
|
60
|
+
})();
|