@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
package/dist/ui/shared/signin.js
CHANGED
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
safe: "Page looks wrong after signing in?", safe_body: "Your custom CSS may be hiding something. Add ?safe=1 to the end of the address to load the page without it, then fix it or turn it off in Settings → Look.",
|
|
20
20
|
refused: "The code is invalid or no longer works. Send /web in General, then press a sign-in button for a new code.",
|
|
21
21
|
// #3270: the code in the opened link did not work (expired, used, or the fleet restarted). It is never put back in the box.
|
|
22
|
-
autofail: "The automatic sign-in did not work — its code has expired or was already used.
|
|
22
|
+
autofail: "The automatic sign-in did not work — its code has expired or was already used. To sign in again on this computer, run agend web in a terminal: it opens a new sign-in link.",
|
|
23
23
|
unconfirmed: "Sign-in could not be confirmed. Get a new code and try again; if it keeps failing, contact the operator.",
|
|
24
24
|
paused: "Too many wrong codes — sign-in is paused for a few minutes.",
|
|
25
25
|
network: "Could not reach AgEnD. Check the connection and try again.",
|
|
@@ -30,6 +30,13 @@
|
|
|
30
30
|
hint_web: "On the AgEnD computer, run agend web --code to get a sign-in code.",
|
|
31
31
|
refused_web: "The code is invalid or no longer works. Run agend web --code on the AgEnD computer for a new one.",
|
|
32
32
|
resend_refused_web: "A new code could not be sent. Run agend web --code on the AgEnD computer for one.",
|
|
33
|
+
// S-117 story 1: on this computer (a loopback address) — sign in again here, never "send /web" (no chat may be
|
|
34
|
+
// connected yet). A Windows browser here is a WSL install's: its desktop shortcut opens the page with a new code.
|
|
35
|
+
hint_local: "On this computer, run agend web in a terminal: it opens the sign-in page and shows a new device sign-in code.",
|
|
36
|
+
hint_local_win: "On this computer, open the \u201cAgEnD 儀表板\u201d shortcut on the desktop: it opens the sign-in page with a new device sign-in code. Or run agend web in a WSL terminal.",
|
|
37
|
+
refused_local: "The code is invalid or no longer works. On this computer, run agend web in a terminal for a new one.",
|
|
38
|
+
refused_local_win: "The code is invalid or no longer works. On this computer, open the \u201cAgEnD 儀表板\u201d shortcut on the desktop for a new one.",
|
|
39
|
+
autofail_local_win: "The automatic sign-in did not work — its code has expired or was already used. To sign in again on this computer, open the \u201cAgEnD 儀表板\u201d shortcut on the desktop, or run agend web in a WSL terminal.",
|
|
33
40
|
// #3008: through the link "Allow connections from outside" opened — the authenticator app's code (the leader's wording).
|
|
34
41
|
label_outside: "Authenticator code", lead_outside: "Open your authenticator app and enter the 6-digit code for AgEnD.",
|
|
35
42
|
hint_outside: "Lost your phone? On the AgEnD computer, choose \u201cSet up again\u201d.",
|
|
@@ -48,35 +55,40 @@
|
|
|
48
55
|
},
|
|
49
56
|
"zh-TW": {
|
|
50
57
|
signout_unsaved: "暫時登出了,但變更沒能儲存:重新啟動後這個工作階段可能會回來。這個頁面無法修復工作階段的儲存問題。",
|
|
51
|
-
checking: "正在確認登入狀態…", title: "登入 AgEnD", lead: "
|
|
52
|
-
label: "
|
|
58
|
+
checking: "正在確認登入狀態…", title: "登入 AgEnD", lead: "輸入裝置登入碼。",
|
|
59
|
+
label: "一次性裝置登入碼", submit: "登入", working: "登入中…",
|
|
53
60
|
hint: "沒收到?在 General 傳 /web,再按登入按鈕取碼。",
|
|
54
61
|
nobot: "沒有聊天 bot?", nobot_body: "請管理員在 AgEnD 電腦執行 agend web --code。",
|
|
55
62
|
safe: "登入後畫面不對勁?", safe_body: "可能是你的自訂 CSS 把東西藏起來了。在網址最後加上 ?safe=1,就會不套用它地載入;再到「設定 → 外觀」修正或關閉。",
|
|
56
|
-
refused: "
|
|
57
|
-
autofail: "
|
|
63
|
+
refused: "裝置登入碼無效或已失效。請在 General 傳 /web,再按登入按鈕取新碼。",
|
|
64
|
+
autofail: "自動登入沒有成功:這個連結的裝置登入碼已過期或已用過。在這台電腦重新登入:在終端機執行 agend web,它會開啟新的登入連結。",
|
|
58
65
|
unconfirmed: "登入暫時無法確認。請重新取碼再試;若仍失敗,請聯絡管理員。",
|
|
59
66
|
paused: "錯誤次數過多,登入暫停幾分鐘。",
|
|
60
67
|
network: "連不上 AgEnD,請檢查連線後再試。",
|
|
61
|
-
resend: "
|
|
62
|
-
resend_wait: "
|
|
63
|
-
resend_refused: "
|
|
64
|
-
hint_web: "在 AgEnD 電腦上執行 agend web --code
|
|
65
|
-
refused_web: "
|
|
66
|
-
resend_refused_web: "
|
|
67
|
-
|
|
68
|
+
resend: "傳一組新的裝置登入碼給我", resent: "新的裝置登入碼已私訊給你,請在上方輸入。",
|
|
69
|
+
resend_wait: "剛剛才要過裝置登入碼,請稍候再試。",
|
|
70
|
+
resend_refused: "無法傳送新的裝置登入碼。請用 /web 再要一個。",
|
|
71
|
+
hint_web: "在 AgEnD 電腦上執行 agend web --code 取得裝置登入碼。",
|
|
72
|
+
refused_web: "裝置登入碼無效或已失效。請在 AgEnD 電腦上執行 agend web --code 取得新碼。",
|
|
73
|
+
resend_refused_web: "無法傳送新的裝置登入碼。請在 AgEnD 電腦上執行 agend web --code 取得。",
|
|
74
|
+
hint_local: "在這台電腦重新登入:在終端機執行 agend web,它會開啟登入頁並顯示新的裝置登入碼。",
|
|
75
|
+
hint_local_win: "在這台電腦重新登入:點桌面上的「AgEnD 儀表板」捷徑,它會開啟登入頁並帶上新的裝置登入碼;或在 WSL 終端機執行 agend web。",
|
|
76
|
+
refused_local: "裝置登入碼無效或已失效。請在這台電腦的終端機執行 agend web 取得新的裝置登入碼。",
|
|
77
|
+
refused_local_win: "裝置登入碼無效或已失效。請點桌面上的「AgEnD 儀表板」捷徑取得新的裝置登入碼。",
|
|
78
|
+
autofail_local_win: "自動登入沒有成功:這個連結的裝置登入碼已過期或已用過。在這台電腦重新登入:點桌面上的「AgEnD 儀表板」捷徑;或在 WSL 終端機執行 agend web。",
|
|
79
|
+
label_outside: "6 位數驗證碼(驗證器 App)", lead_outside: "打開驗證器 App,輸入 AgEnD 的 6 位數驗證碼。",
|
|
68
80
|
hint_outside: "手機遺失?請在 AgEnD 電腦上選「重新設定」。",
|
|
69
|
-
refused_outside: "
|
|
81
|
+
refused_outside: "驗證碼不對。請確認手機時間正確,並輸入最新的驗證碼。",
|
|
70
82
|
paused_outside: "錯誤次數太多,請 {duration} 後再試。",
|
|
71
83
|
minutes: "{0} 分鐘", minute: "1 分鐘", hours: "{0} 小時", hour: "1 小時",
|
|
72
84
|
another: "使用其他裝置登入", dev_title: "使用其他裝置登入",
|
|
73
|
-
dev_lead: "在已登入且已驗證擁有者的裝置上,開啟「設定 →
|
|
85
|
+
dev_lead: "在已登入且已驗證擁有者的裝置上,開啟「設定 → 存取與安全」,在「裝置與登入」選「新增裝置」,輸入這組裝置登入碼。",
|
|
74
86
|
dev_waiting: "等待核准中… {time} 後失效。", dev_approved: "已核准,登入中…",
|
|
75
|
-
dev_expired: "
|
|
76
|
-
dev_busy: "目前等待核准的裝置太多,請稍後再試。", dev_limited: "
|
|
77
|
-
dev_unavailable: "這裡無法使用其他裝置登入。", dev_failed: "
|
|
87
|
+
dev_expired: "這組裝置登入碼已失效。", dev_denied: "這個請求已被拒絕。", dev_new: "取得新的裝置登入碼", dev_back: "返回",
|
|
88
|
+
dev_busy: "目前等待核准的裝置太多,請稍後再試。", dev_limited: "要求裝置登入碼的次數太多,請 {duration} 後再試。",
|
|
89
|
+
dev_unavailable: "這裡無法使用其他裝置登入。", dev_failed: "無法取得裝置登入碼。請檢查連線後再試。",
|
|
78
90
|
dev_lost: "連不上 AgEnD,仍在重試…",
|
|
79
|
-
dev_qr: "也可以用已登入且已驗證擁有者的裝置掃描這個 QR Code
|
|
91
|
+
dev_qr: "也可以用已登入且已驗證擁有者的裝置掃描這個 QR Code。裡面只有這個頁面的網址和上面的裝置登入碼,沒有其他東西。",
|
|
80
92
|
},
|
|
81
93
|
};
|
|
82
94
|
const lang = /^zh/i.test(navigator.language || "") ? "zh-TW" : "en";
|
|
@@ -92,7 +104,15 @@
|
|
|
92
104
|
const loginQr = deviceLogin && document.body.getAttribute("data-login-qr") === "1";
|
|
93
105
|
// Reserve the gated action while the form is still hidden, so ending the session read does not resize the card.
|
|
94
106
|
if (deviceLogin) $("another").hidden = false;
|
|
95
|
-
|
|
107
|
+
// S-117 story 1: a chat fleet whose chat is not connected yet (<body data-no-chat="1">) has the web-only words too —
|
|
108
|
+
// never "send /web" — and nothing else of a web-only fleet's (no authenticator or other-device sign-in from that).
|
|
109
|
+
const noChat = webOnly || (!!document.body && document.body.getAttribute("data-no-chat") === "1");
|
|
110
|
+
// S-117 story 1: this computer (a loopback address) has its own words first — sign in again here; a Windows browser
|
|
111
|
+
// here (a WSL install) is pointed at its desktop shortcut. Only words change: the page issues nothing itself (D3).
|
|
112
|
+
const local = !outside && /^(localhost|127(\.\d{1,3}){3}|\[?::1\]?)$/i.test((typeof location !== "undefined" && location.hostname) || "");
|
|
113
|
+
const win = local && /Windows/i.test((typeof navigator !== "undefined" && navigator.userAgent) || "");
|
|
114
|
+
const t = (k) => (outside && (T[lang][`${k}_outside`] || T.en[`${k}_outside`])) || (win && (T[lang][`${k}_local_win`] || T.en[`${k}_local_win`]))
|
|
115
|
+
|| (local && (T[lang][`${k}_local`] || T.en[`${k}_local`])) || (noChat && (T[lang][`${k}_web`] || T.en[`${k}_web`])) || T[lang][k] || T.en[k] || k;
|
|
96
116
|
/** A wait as words: "15 minutes" / 「15 分鐘」, "2 hours" / 「2 小時」 (rounded up). */
|
|
97
117
|
const duration = (ms) => {
|
|
98
118
|
const minutes = Math.max(1, Math.ceil(ms / 60000));
|
|
@@ -101,7 +121,7 @@
|
|
|
101
121
|
return hours === 1 ? t("hour") : t("hours").replace("{0}", String(hours));
|
|
102
122
|
};
|
|
103
123
|
// …and no "No chat bot?" help: the hint above already is it.
|
|
104
|
-
if (
|
|
124
|
+
if (noChat || local) document.querySelectorAll("details.help").forEach((d) => { if (d.querySelector && d.querySelector('[data-i18n="nobot"]')) d.hidden = true; });
|
|
105
125
|
document.documentElement.lang = lang === "zh-TW" ? "zh-Hant" : "en";
|
|
106
126
|
$("checking").setAttribute?.("aria-label", t("checking"));
|
|
107
127
|
if (outside) {
|
|
@@ -146,14 +166,14 @@
|
|
|
146
166
|
} catch { /* nothing to clean */ }
|
|
147
167
|
// The command in the "No chat bot?" help is a <code> that never breaks across lines (a break inside "--code" reads as
|
|
148
168
|
// two dashes and a word, alpha.2 sweep); the text around it is text.
|
|
149
|
-
const CMD =
|
|
169
|
+
const CMD = /agend web(?: --code)?/;
|
|
150
170
|
document.querySelectorAll("[data-i18n]").forEach((el) => {
|
|
151
171
|
const text = t(el.getAttribute("data-i18n"));
|
|
152
|
-
const
|
|
153
|
-
if (
|
|
172
|
+
const m = CMD.exec(text);
|
|
173
|
+
if (!m) { el.textContent = text; return; }
|
|
154
174
|
const code = document.createElement("code");
|
|
155
|
-
code.textContent =
|
|
156
|
-
el.replaceChildren(text.slice(0,
|
|
175
|
+
code.textContent = m[0];
|
|
176
|
+
el.replaceChildren(text.slice(0, m.index), code, text.slice(m.index + m[0].length));
|
|
157
177
|
});
|
|
158
178
|
|
|
159
179
|
// An old deep link, /ui#instance=<name> (#1408 §3): the fragment never reaches the server, and the sign-in page is
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/* Optional chat progress disclosure; its own lazy stylesheet survives an older cached app.css. */
|
|
2
|
+
.subagent-progress { border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); margin-block: var(--s-2); }
|
|
3
|
+
.subagent-progress > summary { min-height: var(--tap); display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); padding: var(--s-2) var(--s-3); cursor: pointer; font-weight: var(--fw-medium); }
|
|
4
|
+
.subagent-progress > summary .note { margin-inline-start: auto; font-weight: var(--fw-regular); }
|
|
5
|
+
.subagent-scroll { max-height: 32vh; overflow: auto; padding: 0 var(--s-3) var(--s-3); overscroll-behavior: contain; }
|
|
6
|
+
.subagent-group + .subagent-group, .subagent-item + .subagent-item { border-block-start: 1px solid var(--border); margin-block-start: var(--s-3); padding-block-start: var(--s-3); }
|
|
7
|
+
.subagent-parent { overflow-wrap: anywhere; margin-block: var(--s-2); }
|
|
8
|
+
.subagent-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: var(--s-2); }
|
|
9
|
+
.subagent-head strong { overflow-wrap: anywhere; }
|
|
10
|
+
.subagent-item p { white-space: pre-wrap; overflow-wrap: anywhere; margin-block: var(--s-2); }
|
|
11
|
+
.subagent-report { color: var(--text-2); }
|
|
12
|
+
|
|
13
|
+
.subagent-progress > summary::before { content: "▸"; flex: none; }
|
|
14
|
+
.subagent-progress[open] > summary::before { transform: rotate(90deg); }
|
|
15
|
+
.subagent-scroll-hint { margin: 0 var(--s-3) var(--s-2); }
|
|
@@ -307,7 +307,7 @@ export function UsageBody({ owner }) {
|
|
|
307
307
|
${compact ? compactGroups(providers).map((g) => html`<${CompactGroup} key=${g.base} group=${g}
|
|
308
308
|
line=${({ p, i }) => (expanded.has(key(p)) ? card(p, i) : html`<${CompactRow} key=${key(p)} p=${p} onExpand=${() => toggleOne(key(p))} />`)} />`)
|
|
309
309
|
: providers.map((p, i) => card(p, i))}
|
|
310
|
-
<div class="u-foot"><span class="note" title=${new Date(data.fetchedAt).toLocaleString()}>${updatedAgo(data.fetchedAt)}
|
|
310
|
+
<div class="u-foot"><span class="note" title=${new Date(data.fetchedAt).toLocaleString()}>${failed ? html`${updatedAgo(data.fetchedAt)} · <span class="u-refresh-failed" role="status">${tn("usageRefreshFailed")}</span>` : data.refreshing ? html`<span class="u-refreshing">${tn("usageRefreshing")}</span>` : updatedAgo(data.fetchedAt)}</span>
|
|
311
311
|
${byAgent() ? html`<a class="btn btn-ghost btn-sm u-by-agent" href="/ui/fleet/usage" title=${tn("usageByAgentTitle")}>${tn("usageByAgent")}</a>` : null}
|
|
312
312
|
<button type="button" class="btn btn-sm" onClick=${() => load(true)}>${tn("usageRefresh")}</button></div>`;
|
|
313
313
|
}
|
|
@@ -39,7 +39,7 @@ register("view", {
|
|
|
39
39
|
"usageUpdated": "updated",
|
|
40
40
|
"usageUpdatedAgo": "Updated {age} ago",
|
|
41
41
|
"usageUpdatedJustNow": "Updated just now",
|
|
42
|
-
"usageRefreshing": "
|
|
42
|
+
"usageRefreshing": "Updating…",
|
|
43
43
|
"usageRefreshFailed": "Couldn't refresh — showing the last numbers",
|
|
44
44
|
"usageMinutes": "{n} min",
|
|
45
45
|
"usageHours": "{n} h",
|
|
@@ -143,8 +143,8 @@ register("view", {
|
|
|
143
143
|
"usage.hint.grok_no_login": "auth.json has no usable login. Run `grok login`.",
|
|
144
144
|
"usage.hint.login_kiro": "Log in with the Kiro CLI (`kiro-cli`).",
|
|
145
145
|
"usage.hint.kiro_signed_out": "Signed out — run `kiro-cli` to log in.",
|
|
146
|
-
"usage.hint.claude_profile_signed_out": "Not
|
|
147
|
-
"usage.hint.claude_profile_signed_out_chat": "Not
|
|
146
|
+
"usage.hint.claude_profile_signed_out": "Not connected — connect it in Settings → Agents → AI accounts and API keys → Accounts.",
|
|
147
|
+
"usage.hint.claude_profile_signed_out_chat": "Not connected — connect it in Settings → Agents → AI accounts and API keys → Accounts, or with `{0}`.",
|
|
148
148
|
"usage.hint.token_refreshing": "Token refreshing — try again in a moment.",
|
|
149
149
|
"usage.hint.subscription_no_credit": "Subscription — no credit usage to report.",
|
|
150
150
|
"usage.hint.no_quota_account": "No quota information available for this account type.",
|
|
@@ -296,7 +296,7 @@ register("view", {
|
|
|
296
296
|
"displayName": "顯示名稱",
|
|
297
297
|
"role": "角色",
|
|
298
298
|
"description": "描述",
|
|
299
|
-
"saveHint": "儲存需要已登入的 session。請在 AgEnD bot 傳 /web
|
|
299
|
+
"saveHint": "儲存需要已登入的 session。請在 AgEnD bot 傳 /web 取得裝置登入碼。",
|
|
300
300
|
"helpTitle": "📖 使用說明",
|
|
301
301
|
"help1": "在清單裡選一個 Agent:它的即時終端畫面會顯示在這裡。",
|
|
302
302
|
"help2": "點群組名稱可以收合或展開。",
|
|
@@ -399,7 +399,7 @@ register("view", {
|
|
|
399
399
|
"usage.note.busiest_model": "{0} 個模型中用量最高者",
|
|
400
400
|
"usage.note.busiest_models": "{0} 個模型中用量最高者",
|
|
401
401
|
"usage.note.used_limit_unit": "{0} / {1} {2}",
|
|
402
|
-
"usage.note.bonus_codes": "{0} / {1} {2} · {3}
|
|
402
|
+
"usage.note.bonus_codes": "{0} / {1} {2} · {3} 組兌換碼",
|
|
403
403
|
"usage.metric.agy_claude_others": "Claude 與其他模型",
|
|
404
404
|
"usage.metric.agy_claude_others_session": "Claude 與其他模型(Session)",
|
|
405
405
|
"usage.metric.agy_claude_others_weekly": "Claude 與其他模型(每週)",
|
|
@@ -415,8 +415,8 @@ register("view", {
|
|
|
415
415
|
"usage.hint.grok_no_login": "auth.json 沒有可用的登入資料。請執行 `grok login`。",
|
|
416
416
|
"usage.hint.login_kiro": "請使用 Kiro CLI(`kiro-cli`)登入。",
|
|
417
417
|
"usage.hint.kiro_signed_out": "目前已登出;請執行 `kiro-cli` 登入。",
|
|
418
|
-
"usage.hint.claude_profile_signed_out": "
|
|
419
|
-
"usage.hint.claude_profile_signed_out_chat": "
|
|
418
|
+
"usage.hint.claude_profile_signed_out": "尚未連接;請到設定 → Agents →「AI 帳號與 API 金鑰」→「帳號」連接 AI 帳號。",
|
|
419
|
+
"usage.hint.claude_profile_signed_out_chat": "尚未連接;請到設定 → Agents →「AI 帳號與 API 金鑰」→「帳號」連接 AI 帳號,或用 `{0}` 連接。",
|
|
420
420
|
"usage.hint.token_refreshing": "Token 更新中 — 請稍候再試。",
|
|
421
421
|
"usage.hint.subscription_no_credit": "訂閱方案沒有可回報的額度用量。",
|
|
422
422
|
"usage.hint.no_quota_account": "此帳號類型沒有可用的額度資訊。",
|
|
@@ -15,7 +15,7 @@ register("webauth", {
|
|
|
15
15
|
reason_disabled: "Web authority is turned off.",
|
|
16
16
|
reason_loopback_only: "Only this computer can authorize, and this browser is not on it.",
|
|
17
17
|
reason_no_account: "This browser has no chat-account identity. Open General in Telegram or Discord and send /web to sign in as your account.",
|
|
18
|
-
reason_host_sign_in: "This browser no longer has this computer's admin authority.
|
|
18
|
+
reason_host_sign_in: "This browser no longer has this computer's admin authority. Re-bind it with a new sign-in code from this computer.",
|
|
19
19
|
reason_not_admin: "Your account is not a fleet admin here.",
|
|
20
20
|
reason_not_admin_session: "Guests can't authorize.",
|
|
21
21
|
reason_token_rotated: "The dashboard's token changed: sign in again.",
|
|
@@ -34,6 +34,17 @@ register("webauth", {
|
|
|
34
34
|
authorizeWhy: "Not verified: authorize this browser to speak as you",
|
|
35
35
|
notVerifiedWhy: "Not verified: {0}",
|
|
36
36
|
waitingShort: "Waiting for your Confirm ({0})",
|
|
37
|
+
// AGEND-138: sign this browser in again, in place, with a fresh code from this computer.
|
|
38
|
+
rebind: "Re-bind",
|
|
39
|
+
rebindHow: "On this computer, run agend web --code and enter the sign-in code it prints.",
|
|
40
|
+
rebindCode: "Sign-in code from agend web --code",
|
|
41
|
+
rebindPlaceholder: "XXXX-XXXX",
|
|
42
|
+
rebindGo: "Bind",
|
|
43
|
+
rebindWorking: "Binding…",
|
|
44
|
+
rebindRefused: "That sign-in code didn't work. Run agend web --code again for a new one.",
|
|
45
|
+
rebindPaused: "Too many wrong codes. Wait a moment, then try again.",
|
|
46
|
+
rebindUnconfirmed: "The fleet could not confirm the sign-in. Try again with a new sign-in code.",
|
|
47
|
+
rebindNetwork: "Could not reach the fleet. Try again.",
|
|
37
48
|
},
|
|
38
49
|
"zh-TW": {
|
|
39
50
|
verified: "已驗證 · 以你的身分發言到 {0}",
|
|
@@ -44,7 +55,7 @@ register("webauth", {
|
|
|
44
55
|
reason_disabled: "網頁授權已關閉。",
|
|
45
56
|
reason_loopback_only: "只有這台電腦可以授權,而這個瀏覽器不在這台電腦上。",
|
|
46
57
|
reason_no_account: "這個瀏覽器沒有聊天帳號身分。請到 Telegram 或 Discord 的 General 傳送 /web,以你的帳號登入。",
|
|
47
|
-
reason_host_sign_in: "
|
|
58
|
+
reason_host_sign_in: "這個瀏覽器已沒有這台電腦的管理者授權。請用這台電腦的新登入碼重新綁定。",
|
|
48
59
|
reason_not_admin: "你的帳號在這裡不是 fleet 管理者。",
|
|
49
60
|
reason_not_admin_session: "訪客無法授權。",
|
|
50
61
|
reason_token_rotated: "儀表板的 token 已變更:請重新登入。",
|
|
@@ -63,6 +74,16 @@ register("webauth", {
|
|
|
63
74
|
authorizeWhy: "未驗證:授權這個瀏覽器以你的身分發言",
|
|
64
75
|
notVerifiedWhy: "未驗證:{0}",
|
|
65
76
|
waitingShort: "等待確認({0})",
|
|
77
|
+
rebind: "重新綁定",
|
|
78
|
+
rebindHow: "在這台電腦執行 agend web --code,輸入它顯示的登入碼。",
|
|
79
|
+
rebindCode: "agend web --code 取得的登入碼",
|
|
80
|
+
rebindPlaceholder: "XXXX-XXXX",
|
|
81
|
+
rebindGo: "綁定",
|
|
82
|
+
rebindWorking: "綁定中…",
|
|
83
|
+
rebindRefused: "這組登入碼不能用。請重新執行 agend web --code 取得新碼。",
|
|
84
|
+
rebindPaused: "錯誤次數太多,請稍候再試。",
|
|
85
|
+
rebindUnconfirmed: "fleet 無法確認這次登入。請用新的登入碼再試一次。",
|
|
86
|
+
rebindNetwork: "連不上 fleet,請再試一次。",
|
|
66
87
|
},
|
|
67
88
|
});
|
|
68
89
|
const tn = (k, ...v) => t(`webauth.${k}`, ...v);
|
|
@@ -213,6 +234,35 @@ export function ComposerAuth() {
|
|
|
213
234
|
? html` · <a href="/settings/access" title=${why}>${tn("settings")}</a>` : null}</span>`;
|
|
214
235
|
}
|
|
215
236
|
|
|
237
|
+
/**
|
|
238
|
+
* AGEND-138: "Re-bind" — a browser whose host sign-in lost this computer's admin authority (a revocation, or the
|
|
239
|
+
* authorization ran out) signs in again right here: run `agend web --code` on this computer, type the code, and the
|
|
240
|
+
* page reloads as the new session. The code is the proof; there is deliberately no code-free button, because a request
|
|
241
|
+
* from this computer (127.0.0.1, which a program on Windows reaching into WSL also is) doesn't say who is using it.
|
|
242
|
+
*/
|
|
243
|
+
export function Rebind() {
|
|
244
|
+
const [open, setOpen] = useState(false), [code, setCode] = useState(""), [busy, setBusy] = useState(false), [msg, setMsg] = useState("");
|
|
245
|
+
const submit = async (e) => {
|
|
246
|
+
e.preventDefault();
|
|
247
|
+
if (busy || !code.trim()) return;
|
|
248
|
+
setBusy(true); setMsg("");
|
|
249
|
+
try {
|
|
250
|
+
const r = await fetch("/auth/login", { method: "POST", credentials: "same-origin", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ code: code.trim() }) });
|
|
251
|
+
if (r.ok) { resetWebAuthorization(); globalThis.location.reload(); return; }
|
|
252
|
+
setMsg(tn(r.status === 429 ? "rebindPaused" : r.status >= 500 ? "rebindUnconfirmed" : "rebindRefused"));
|
|
253
|
+
} catch { setMsg(tn("rebindNetwork")); }
|
|
254
|
+
setBusy(false);
|
|
255
|
+
};
|
|
256
|
+
if (!open) return html`<button type="button" class="btn webauth-rebind" onClick=${() => setOpen(true)}>${tn("rebind")}</button>`;
|
|
257
|
+
return html`<form class="webauth-rebind-form" onSubmit=${submit}>
|
|
258
|
+
<p class="note">${tn("rebindHow")}</p>
|
|
259
|
+
<div class="row"><div class="field webauth-rebind-field"><input type="text" class="webauth-rebind-code" value=${code} onInput=${(e) => setCode(e.target.value)} autocomplete="off" autocapitalize="characters" spellcheck=${false}
|
|
260
|
+
aria-label=${tn("rebindCode")} placeholder=${tn("rebindPlaceholder")} disabled=${busy} /></div>
|
|
261
|
+
<button type="submit" class="btn" disabled=${busy || !code.trim()}>${busy ? tn("rebindWorking") : tn("rebindGo")}</button></div>
|
|
262
|
+
${msg ? html`<p class="err" role="alert">${msg}</p>` : null}
|
|
263
|
+
</form>`;
|
|
264
|
+
}
|
|
265
|
+
|
|
216
266
|
function body(a) {
|
|
217
267
|
const st = a.st;
|
|
218
268
|
if (st.state === "verified") return html`<span class="webauth-ok">✓ ${tn("verified", clock(st.until))}</span>`;
|
|
@@ -221,5 +271,5 @@ function body(a) {
|
|
|
221
271
|
return html`<span class="note">${tn("notVerified")} ·</span> <button type="button" class="btn btn-sm" onClick=${a.ask}>${tn("authorize")}</button>`;
|
|
222
272
|
const why = REASONS.includes(st.reason) ? tn(`reason_${st.reason}`) : tn("reason_other");
|
|
223
273
|
// The fix, where there is one the person can take here: the switch lives in Settings → Web.
|
|
224
|
-
return html`<span class="note">${tn("notVerified")}: ${why}</span>${fixable(st.reason) ? html` <a href="/settings/access">${tn("settings")}</a>` : null}`;
|
|
274
|
+
return html`<span class="note">${tn("notVerified")}: ${why}</span>${fixable(st.reason) ? html` <a href="/settings/access">${tn("settings")}</a>` : null}${st.reason === "host_sign_in" ? html` <${Rebind} />` : null}`;
|
|
225
275
|
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
6
|
+
<meta name="referrer" content="no-referrer">
|
|
7
|
+
<meta name="robots" content="noindex">
|
|
8
|
+
<title>AgEnD — Sign in with an authenticator</title>
|
|
9
|
+
<!--app-icon-->
|
|
10
|
+
<link rel="icon" href="/favicon.ico" sizes="16x16 32x32 64x64">
|
|
11
|
+
<link rel="icon" href="/favicon.svg" type="image/svg+xml" sizes="any">
|
|
12
|
+
<link rel="apple-touch-icon" href="/apple-touch-icon.png" sizes="180x180">
|
|
13
|
+
<!--/app-icon-->
|
|
14
|
+
<script src="/assets/theme.js"></script>
|
|
15
|
+
<link rel="stylesheet" href="/assets/tokens.css">
|
|
16
|
+
<style>
|
|
17
|
+
/* TEMPORARY (#3486): the minimum page the core needs to be tried by hand. The leader's sign-in page replaces it — it only has to POST
|
|
18
|
+
{account, code} to /auth/totp (see docs/SECURITY.md). Same tokens as the sign-in page; nothing else is shared. */
|
|
19
|
+
* { box-sizing: border-box; }
|
|
20
|
+
body { margin: 0; min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px;
|
|
21
|
+
background: var(--bg); color: var(--text); font: var(--fw-regular) var(--fs-md)/var(--lh-md) var(--font-ui); -webkit-font-smoothing: antialiased; }
|
|
22
|
+
main { width: 100%; max-width: 380px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 28px 24px; }
|
|
23
|
+
.brand { margin: 0 0 18px; font-size: var(--fs-lg); font-weight: var(--fw-bold); }
|
|
24
|
+
h1 { margin: 0 0 6px; font-size: var(--fs-xl); font-weight: var(--fw-semibold); }
|
|
25
|
+
p { margin: 0 0 18px; color: var(--text-2); }
|
|
26
|
+
label { display: block; margin: 12px 0 6px; font-size: var(--fs-sm); color: var(--text-2); font-weight: var(--fw-medium); }
|
|
27
|
+
input { width: 100%; padding: 12px; font: 600 20px/1 var(--font-mono); text-align: center; background: var(--bg); color: var(--text);
|
|
28
|
+
border: 1px solid var(--border-strong); border-radius: var(--r-sm); }
|
|
29
|
+
#code { letter-spacing: .18em; }
|
|
30
|
+
input:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px var(--accent-dim); }
|
|
31
|
+
button { width: 100%; margin-top: 14px; padding: 12px; font: var(--fw-semibold) var(--fs-md) var(--font-ui); color: var(--on-accent); background: var(--accent-fill);
|
|
32
|
+
border: 0; border-radius: var(--r-full); cursor: pointer; }
|
|
33
|
+
button:disabled { opacity: .6; cursor: default; }
|
|
34
|
+
#msg { min-height: 1.5em; margin-top: 14px; font-size: var(--fs-sm); color: var(--danger); }
|
|
35
|
+
.hint { margin-top: 18px; font-size: var(--fs-xs); color: var(--text-3); }
|
|
36
|
+
.back { display: block; margin-top: 12px; font-size: var(--fs-sm); color: var(--text-2); text-align: center; }
|
|
37
|
+
[hidden] { display: none !important; }
|
|
38
|
+
</style>
|
|
39
|
+
</head>
|
|
40
|
+
<body>
|
|
41
|
+
<main class="signin-card">
|
|
42
|
+
<div class="brand">AgEnD</div>
|
|
43
|
+
<form id="form" autocomplete="off">
|
|
44
|
+
<h1 data-i18n="title">Sign in with your authenticator</h1>
|
|
45
|
+
<p data-i18n="lead">Use the authenticator app you set up in AgEnD for your own account.</p>
|
|
46
|
+
<div id="accountRow">
|
|
47
|
+
<label for="account" data-i18n="account">Your account name</label>
|
|
48
|
+
<input id="account" name="account" autocomplete="username" autocapitalize="off" autocorrect="off" spellcheck="false" maxlength="128" style="letter-spacing:0">
|
|
49
|
+
</div>
|
|
50
|
+
<label for="code" data-i18n="code">6-digit code</label>
|
|
51
|
+
<input id="code" name="code" inputmode="numeric" autocomplete="one-time-code" pattern="[0-9 ]*" maxlength="7" placeholder="123456" required>
|
|
52
|
+
<button id="go" type="submit" data-i18n="submit">Sign in</button>
|
|
53
|
+
<div id="msg" role="alert" aria-live="polite"></div>
|
|
54
|
+
<div class="hint" data-i18n="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.</div>
|
|
55
|
+
<a class="back" href="/signin" data-i18n="back">Use a sign-in code instead</a>
|
|
56
|
+
</form>
|
|
57
|
+
</main>
|
|
58
|
+
<script src="/assets/signin-authenticator.js"></script>
|
|
59
|
+
</body>
|
|
60
|
+
</html>
|
|
@@ -2,75 +2,75 @@
|
|
|
2
2
|
// #2726: in English and 繁體中文 — served alone to the setup page (no dashboard i18n there), so its words live here.
|
|
3
3
|
export const SIGNIN_STRINGS = {
|
|
4
4
|
en: {
|
|
5
|
-
heading: "
|
|
6
|
-
lead: "Use the controls here; no terminal typing is needed for Kiro, Claude Code or Codex. You can
|
|
7
|
-
check: "Check
|
|
8
|
-
consoleOnly: "Use the explicit console fallback, or
|
|
9
|
-
openProvider: "
|
|
10
|
-
cancel: "Cancel
|
|
11
|
-
relogin: "
|
|
12
|
-
field_code: "Paste the
|
|
13
|
-
phase_method: "method", phase_code: "code", phase_start_url: "start URL", phase_region: "region", phase_authorization: "authorization",
|
|
5
|
+
heading: "Connect your AI accounts",
|
|
6
|
+
lead: "Use the controls here; no terminal typing is needed for Kiro, Claude Code or Codex. Each one finishes on the provider's official website. You can connect them later from the dashboard.",
|
|
7
|
+
check: "Check connections", skipped: "Connect later · remains in Needs you", valid: "Connected ✓", notInstalled: "Not installed on this host",
|
|
8
|
+
consoleOnly: "Use the explicit console fallback, or connect later.", needed: "Not connected", waiting: "Waiting for the CLI…", login: "Connecting: {0}",
|
|
9
|
+
openProvider: "Finish on the provider's official website", deviceCode: "Authorization code:", answerSent: "Answer sent. Waiting for the next screen; it will not be sent twice.",
|
|
10
|
+
cancel: "Cancel connecting", signIn: "Connect account", signInAgain: "Reconnect", later: "Connect later", submit: "Submit {0}",
|
|
11
|
+
relogin: "Reconnect {0}? It disconnects its current account first.", reloginReplace: "Reconnect {0}? The new connection replaces the account it uses now.", ready: "You can continue setup.",
|
|
12
|
+
field_code: "Paste the authorization code", field_start_url: "Organization Start URL", field_region: "AWS region",
|
|
13
|
+
phase_method: "method", phase_code: "authorization code", phase_start_url: "start URL", phase_region: "region", phase_authorization: "authorization",
|
|
14
14
|
choice_organization: "Your organization", choice_subscription: "Claude subscription",
|
|
15
15
|
antigravity: "Antigravity (console fallback)",
|
|
16
|
-
error: "Could not
|
|
16
|
+
error: "Could not connect the account. Check status, retry, or connect later.",
|
|
17
17
|
error_unsupported_prompt: "This CLI screen is not supported. Cancel and use the console fallback.",
|
|
18
18
|
error_cleanup_failed: "The login process could not be confirmed closed. Close it on the host and restart setup before retrying.",
|
|
19
19
|
error_signin_cleanup_failed: "The login process could not be confirmed closed. Close it on the host and restart setup before retrying.",
|
|
20
20
|
error_signin_action_stale: "That prompt changed or was already answered. Refresh its status; do not submit it again.",
|
|
21
21
|
error_signin_console_only: "This backend uses the explicit console fallback.",
|
|
22
|
-
error_backend_signin_local_only: "
|
|
22
|
+
error_backend_signin_local_only: "AI accounts can be connected only on this computer. Use the local setup page, or connect later.",
|
|
23
23
|
error_signin_session_expired: "This setup session has ended. Reopen setup on the host.",
|
|
24
24
|
error_expired: "This login attempt expired. Start a new attempt.",
|
|
25
25
|
error_busy: "Another sign-in is already running. Finish or cancel it, then try again.",
|
|
26
26
|
error_signin_busy: "Another sign-in is already running. Finish or cancel it, then try again.",
|
|
27
|
-
error_signin_profile_unknown: "This account is not in the list. Add it with + Add account in Settings → Accounts, then
|
|
28
|
-
error_auth_unconfirmed: "The CLI exited, but credentials could not be verified. Retry or
|
|
29
|
-
error_provider_rejected: "The provider rejected this
|
|
27
|
+
error_signin_profile_unknown: "This account is not in the list. Add it with + Add account in Settings → Accounts, then connect it.",
|
|
28
|
+
error_auth_unconfirmed: "The CLI exited, but credentials could not be verified. Retry or connect later.",
|
|
29
|
+
error_provider_rejected: "The provider rejected this authorization. Retry or connect later.",
|
|
30
30
|
// #3190 Part 3c: a profile on a paired computer (the dashboard's Accounts view).
|
|
31
31
|
error_machine_unknown: "That computer is not paired any more.",
|
|
32
32
|
error_machine_offline: "That computer is offline. Start its Runtime, then try again.",
|
|
33
33
|
error_machine_unsupported: "That computer's Runtime is too old to sign in from here. Update the Runtime on it, then try again.",
|
|
34
34
|
error_machine_accounts_off: "The owner of that computer has not allowed this. On that computer run: agend-runtime remote-setup accounts on",
|
|
35
35
|
error_machine_unreachable: "That computer did not answer. Check its Runtime window, then try again.",
|
|
36
|
-
error_machine_profile_not_owned: "This account was not created by AgEnD's Runtime, so it can only be
|
|
36
|
+
error_machine_profile_not_owned: "This account was not created by AgEnD's Runtime, so it can only be connected on that computer: agend-runtime login claude-code NAME",
|
|
37
37
|
error_machine_busy: "Another sign-in is already running on that computer.",
|
|
38
38
|
error_invalid_machine_target: "That is not a valid account on a computer.",
|
|
39
39
|
error_machine_transport_failed: "That computer could not complete the sign-in. Check its Runtime window, then try again.",
|
|
40
40
|
},
|
|
41
41
|
"zh-TW": {
|
|
42
|
-
heading: "
|
|
43
|
-
lead: "用這裡的按鈕操作;Kiro、Claude Code 和 Codex
|
|
44
|
-
check: "
|
|
45
|
-
consoleOnly: "
|
|
46
|
-
openProvider: "
|
|
47
|
-
cancel: "
|
|
48
|
-
relogin: "
|
|
49
|
-
field_code: "
|
|
50
|
-
phase_method: "選擇方式", phase_code: "
|
|
42
|
+
heading: "連接你的 AI 帳號",
|
|
43
|
+
lead: "用這裡的按鈕操作;Kiro、Claude Code 和 Codex 都不需要在終端機輸入,各自會前往官方網站完成授權。也可以之後再從儀表板連接。",
|
|
44
|
+
check: "檢查連接狀態", skipped: "稍後連接 · 會留在「等你回應」", valid: "已連接 ✓", notInstalled: "這台主機上沒有安裝",
|
|
45
|
+
consoleOnly: "請改用主控台備援,或稍後連接。", needed: "尚未連接", waiting: "等待 CLI 回應…", login: "連接中:{0}",
|
|
46
|
+
openProvider: "前往官方網站完成授權", deviceCode: "授權碼:", answerSent: "已送出。等待下一個畫面;不會重複送出。",
|
|
47
|
+
cancel: "取消連接", signIn: "連接帳號", signInAgain: "重新連接", later: "稍後連接", submit: "送出{0}",
|
|
48
|
+
relogin: "要重新連接 {0} 嗎?會先撤銷目前帳號的連接。", reloginReplace: "要重新連接 {0} 嗎?新的連接會取代目前使用的帳號。", ready: "可以繼續設定了。",
|
|
49
|
+
field_code: "貼上取得的授權碼", field_start_url: "組織的 Start URL", field_region: "AWS 區域",
|
|
50
|
+
phase_method: "選擇方式", phase_code: "授權碼", phase_start_url: "Start URL", phase_region: "區域", phase_authorization: "授權",
|
|
51
51
|
choice_organization: "你的組織", choice_subscription: "Claude 訂閱",
|
|
52
52
|
antigravity: "Antigravity(主控台備援)",
|
|
53
|
-
error: "
|
|
53
|
+
error: "無法連接帳號。請檢查狀態、重試,或稍後連接。",
|
|
54
54
|
error_unsupported_prompt: "不支援這個 CLI 畫面。請取消並改用主控台備援。",
|
|
55
55
|
error_cleanup_failed: "無法確認登入程序已關閉。請在主機上關閉它,並重新開始設定後再試。",
|
|
56
56
|
error_signin_cleanup_failed: "無法確認登入程序已關閉。請在主機上關閉它,並重新開始設定後再試。",
|
|
57
57
|
error_signin_action_stale: "這個畫面已改變或已回答過。請重新整理狀態,不要再送一次。",
|
|
58
58
|
error_signin_console_only: "這個後端使用主控台備援。",
|
|
59
|
-
error_backend_signin_local_only: "
|
|
59
|
+
error_backend_signin_local_only: "AI 帳號只能在這台電腦上連接。請使用本機的設定頁,或稍後連接。",
|
|
60
60
|
error_signin_session_expired: "這個設定工作階段已結束。請在主機上重新開啟設定。",
|
|
61
61
|
error_expired: "這次登入已過期。請重新開始。",
|
|
62
62
|
error_busy: "已有另一個登入正在進行。請等它結束或先取消,再試一次。",
|
|
63
63
|
error_signin_busy: "已有另一個登入正在進行。請等它結束或先取消,再試一次。",
|
|
64
|
-
error_signin_profile_unknown: "清單裡沒有這個帳號。請先在 設定 → 帳號 用 + 新增帳號
|
|
65
|
-
error_auth_unconfirmed: "CLI
|
|
66
|
-
error_provider_rejected: "
|
|
64
|
+
error_signin_profile_unknown: "清單裡沒有這個帳號。請先在 設定 → 帳號 用 + 新增帳號 加入,再連接。",
|
|
65
|
+
error_auth_unconfirmed: "CLI 已結束,但無法確認憑證。請重試或稍後連接。",
|
|
66
|
+
error_provider_rejected: "平台拒絕了這次授權。請重試或稍後連接。",
|
|
67
67
|
// #3190 Part 3c:配對電腦上的憑證設定檔(儀表板的「帳號」頁)。
|
|
68
68
|
error_machine_unknown: "那台電腦已不再配對。",
|
|
69
69
|
error_machine_offline: "那台電腦離線了。請先啟動它的 Runtime,再試一次。",
|
|
70
70
|
error_machine_unsupported: "那台電腦的 Runtime 太舊,無法在這裡登入。請先更新它的 Runtime,再試一次。",
|
|
71
71
|
error_machine_accounts_off: "那台電腦的擁有者尚未允許這件事。請在那台電腦上執行:agend-runtime remote-setup accounts on",
|
|
72
72
|
error_machine_unreachable: "那台電腦沒有回應。請檢查它的 Runtime 視窗,再試一次。",
|
|
73
|
-
error_machine_profile_not_owned: "這個帳號不是 AgEnD 的 Runtime
|
|
73
|
+
error_machine_profile_not_owned: "這個帳號不是 AgEnD 的 Runtime 建立的,只能在那台電腦上連接:agend-runtime login claude-code NAME",
|
|
74
74
|
error_machine_busy: "那台電腦上已經有另一個登入在進行。",
|
|
75
75
|
error_invalid_machine_target: "這不是電腦上的有效帳號。",
|
|
76
76
|
error_machine_transport_failed: "那台電腦沒有完成這次登入。請檢查它的 Runtime 視窗,再試一次。",
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
// Optional admin-only observation. No entries in the chat ledger; no child execution/approval controls.
|
|
2
|
+
import { html, useEffect, useRef, useState } from "/assets/app-html.js";
|
|
3
|
+
import { register, t } from "/assets/app-i18n.js";
|
|
4
|
+
import { ErrorState } from "/assets/ui-states.js";
|
|
5
|
+
register("subagents", {
|
|
6
|
+
en: { title: "Subagents", completed: "{0} finished", running: "{0} running", unknown: "{0} unconfirmed", parent: "Main Agent task: {0}", turn: "Main Agent task turn: {0}", done: "Finished", live: "Running", unsure: "Unconfirmed", seconds: "{0} s", elapsed: "{0} s elapsed", note: "A subagent's report is not the main Agent's final answer.", gap: "Some records are missing or no longer current. Their state is unconfirmed.", failed: "Subagent status could not be checked.", fallback: "Subagent", scroll: "Scroll to see all child runs.", bound: "Up to 16 recent child runs are shown." },
|
|
7
|
+
"zh-TW": { title: "子 Agent", completed: "{0} 已完成", running: "{0} 執行中", unknown: "{0} 待確認", parent: "主 Agent 工作:{0}", turn: "主 Agent 工作回合:{0}", done: "已完成", live: "執行中", unsure: "待確認", seconds: "{0} 秒", elapsed: "已經過 {0} 秒", note: "子 Agent 的回報不是主 Agent 的最終答覆。", gap: "部分紀錄缺漏或已不再是目前的紀錄,狀態待確認。", failed: "暫時無法確認子 Agent 的狀態。", fallback: "子 Agent", scroll: "捲動檢視所有子工作回合。", bound: "最多顯示最近 16 個子工作回合。" },
|
|
8
|
+
});
|
|
9
|
+
const copy = (key, ...args) => t("subagents." + key, ...args);
|
|
10
|
+
const uncertain = rows => rows.map(({ summary, durationMs, ...row }) => ({ ...row, state: "unknown" }));
|
|
11
|
+
// New servers supply immutable evidence deadlines. An old cached server must also stay bounded:
|
|
12
|
+
// use the original launch time, never a client arrival/retry/page-open time.
|
|
13
|
+
const visible = (rows, now) => rows.filter(r => {
|
|
14
|
+
const deadline = Number.isFinite(r.expiresAt) ? r.expiresAt : Number.isFinite(r.startedAt) ? r.startedAt + 120000 : 0;
|
|
15
|
+
return now < deadline;
|
|
16
|
+
});
|
|
17
|
+
/** One physical fetch at a time; unmount/name changes retire the continuation, not just the timer. */
|
|
18
|
+
export function observeSubagents(name, { fetcher = fetch, changed, setTimer = setTimeout, clearTimer = clearTimeout } = {}) {
|
|
19
|
+
let live = true, busy = false, timer = null, abort = null, state = { owner: null, runs: [], error: false };
|
|
20
|
+
const publish = value => { if (live) { state = value; changed(value); } };
|
|
21
|
+
const schedule = () => { if (live) timer = setTimer(read, 6000); };
|
|
22
|
+
async function read() {
|
|
23
|
+
if (!live || busy) return;
|
|
24
|
+
if (timer !== null) { clearTimer(timer); timer = null; }
|
|
25
|
+
busy = true; abort = typeof AbortController === "function" ? new AbortController() : null;
|
|
26
|
+
let denied = false;
|
|
27
|
+
try {
|
|
28
|
+
const res = await fetcher("/ui/subagents?instance=" + encodeURIComponent(name), { credentials: "same-origin", signal: abort?.signal });
|
|
29
|
+
if (!live) return;
|
|
30
|
+
if ([401, 403, 404].includes(res.status)) { denied = true; publish({ owner: null, runs: [], error: false }); return; }
|
|
31
|
+
if (!res.ok) throw Error("unavailable");
|
|
32
|
+
const body = await res.json(); if (!live) return;
|
|
33
|
+
if (body?.subagents !== 1 || !Array.isArray(body.runs) || body.runs.length > 16) throw Error("incompatible");
|
|
34
|
+
if (!body.owner) publish({ owner: null, runs: [], error: false });
|
|
35
|
+
else if (body.status !== "ok") {
|
|
36
|
+
const prior = body.owner === state.owner && state.runs.length > 0;
|
|
37
|
+
// Optional evidence is often absent on mature/unsupported transcripts. Do not invent a failure row
|
|
38
|
+
// before this owner has any proved child work; previously observed work still becomes unconfirmed.
|
|
39
|
+
publish({ owner: body.owner, runs: prior ? uncertain(state.runs) : [], error: prior });
|
|
40
|
+
}
|
|
41
|
+
else publish({ owner: body.owner, runs: body.runs, error: false });
|
|
42
|
+
} catch { if (live) publish({ ...state, runs: uncertain(state.runs), error: true }); }
|
|
43
|
+
finally { busy = false; abort = null; if (!denied) schedule(); }
|
|
44
|
+
}
|
|
45
|
+
void read();
|
|
46
|
+
return { retry: read, stop() { live = false; if (timer !== null) clearTimer(timer); abort?.abort(); } };
|
|
47
|
+
}
|
|
48
|
+
function styles() {
|
|
49
|
+
if (document.querySelector('link[href="/assets/subagent-row.css"]')) return;
|
|
50
|
+
const link = document.createElement("link"); link.rel = "stylesheet"; link.href = "/assets/subagent-row.css"; document.head.appendChild(link);
|
|
51
|
+
}
|
|
52
|
+
export function SubagentRow({ name }) {
|
|
53
|
+
const [value, setValue] = useState({ owner: null, runs: [], error: false }), [tick, setTick] = useState(Date.now());
|
|
54
|
+
const observer = useRef(null);
|
|
55
|
+
useEffect(() => { styles(); setValue({ owner: null, runs: [], error: false }); const o = observeSubagents(name, { changed: setValue }); observer.current = o; return () => { o.stop(); observer.current = null; }; }, [name]);
|
|
56
|
+
const runs = visible(value.runs, Date.now());
|
|
57
|
+
useEffect(() => { if (!runs.length) return; const id = setInterval(() => setTick(Date.now()), 1000); return () => clearInterval(id); }, [value, runs.length]);
|
|
58
|
+
// An error cannot keep expired work alive. The next ordinary poll can reveal newly proved work.
|
|
59
|
+
if (!runs.length) return null;
|
|
60
|
+
const counts = ["completed", "running", "unknown"].map(s => { const n = runs.filter(r => r.state === s).length; return n ? copy(s, n) : null; }).filter(Boolean);
|
|
61
|
+
const groups = new Map();
|
|
62
|
+
for (const row of runs) { if (!groups.has(row.parentTurn)) groups.set(row.parentTurn, []); groups.get(row.parentTurn).push(row); }
|
|
63
|
+
return html`<details class="subagent-progress" data-trust="subagent-observation"><summary><span>${copy("title")}</span><span class="note">${counts.join(" · ")}</span></summary><p class="note subagent-scroll-hint">${copy("scroll")}</p><div class="subagent-scroll">
|
|
64
|
+
${value.error ? html`<${ErrorState} message=${copy("failed")} onRetry=${() => observer.current?.retry()} />` : null}
|
|
65
|
+
${[...groups].map(([turn, rows]) => html`<section key=${turn} class="subagent-group"><p class="note subagent-parent">${rows[0].parentTask ? copy("parent", rows[0].parentTask) : copy("turn", new Date(Math.min(...rows.map(r => r.parentStartedAt))).toLocaleString())}</p>
|
|
66
|
+
${rows.map(r => html`<article key=${r.key} class="subagent-item"><div class="subagent-head"><strong>${r.name || copy("fallback")}</strong>${r.type ? html`<span class="note">${r.type}</span>` : null}<span class="tag">${copy(r.state === "completed" ? "done" : r.state === "running" ? "live" : "unsure")}</span></div>
|
|
67
|
+
<p>${r.task}</p>${r.state === "completed" && Number.isFinite(r.durationMs) ? html`<p class="note">${copy("seconds", (r.durationMs / 1000).toFixed(1).replace(/\.0$/, ""))}</p>` : r.state === "running" ? html`<p class="note">${copy("elapsed", Math.max(0, Math.floor((tick - r.startedAt) / 1000)))}</p>` : null}
|
|
68
|
+
${r.state === "completed" && r.summary ? html`<p class="subagent-report">${r.summary}</p>` : null}</article>`)}
|
|
69
|
+
</section>`)}
|
|
70
|
+
${runs.some(r => r.state === "unknown") ? html`<p class="note">${copy("gap")}</p>` : null}<p class="note">${copy("note")}</p>${runs.length >= 16 ? html`<p class="note">${copy("bound")}</p>` : null}
|
|
71
|
+
</div></details>`;
|
|
72
|
+
}
|