@songsid/agend 2.4.0-beta.15 → 2.4.0-beta.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/accounts-profiles.d.ts +1 -1
- package/dist/accounts-view.d.ts +3 -0
- package/dist/accounts-view.js.map +1 -1
- package/dist/auth-api.js +6 -0
- package/dist/auth-api.js.map +1 -1
- package/dist/backend/claude-code.d.ts +15 -1
- package/dist/backend/claude-code.js +64 -8
- package/dist/backend/claude-code.js.map +1 -1
- package/dist/backend/kiro.js +6 -1
- package/dist/backend/kiro.js.map +1 -1
- package/dist/backend/types.d.ts +8 -0
- package/dist/backend/types.js.map +1 -1
- package/dist/backend-command.d.ts +4 -2
- package/dist/backend-command.js +3 -0
- package/dist/backend-command.js.map +1 -1
- package/dist/browser-backend-signins.d.ts +1 -0
- package/dist/browser-backend-signins.js +3 -1
- package/dist/browser-backend-signins.js.map +1 -1
- package/dist/build-provenance.json +1 -1
- package/dist/classic-channel-manager.d.ts +1 -0
- package/dist/classic-channel-manager.js +4 -1
- package/dist/classic-channel-manager.js.map +1 -1
- package/dist/claude-credential-change.d.ts +22 -0
- package/dist/claude-credential-change.js +47 -0
- package/dist/claude-credential-change.js.map +1 -0
- package/dist/claude-credential-launch.d.ts +63 -0
- package/dist/claude-credential-launch.js +315 -0
- package/dist/claude-credential-launch.js.map +1 -0
- package/dist/claude-credential-runner.d.ts +1 -0
- package/dist/claude-credential-runner.js +56 -0
- package/dist/claude-credential-runner.js.map +1 -0
- package/dist/claude-credential-vault.d.ts +57 -0
- package/dist/claude-credential-vault.js +277 -0
- package/dist/claude-credential-vault.js.map +1 -0
- package/dist/claude-request-observation.d.ts +7 -0
- package/dist/claude-request-observation.js +26 -0
- package/dist/claude-request-observation.js.map +1 -0
- package/dist/claude-setup-token-transport.d.ts +9 -0
- package/dist/claude-setup-token-transport.js +82 -0
- package/dist/claude-setup-token-transport.js.map +1 -0
- package/dist/claude-setup-token.d.ts +51 -0
- package/dist/claude-setup-token.js +83 -0
- package/dist/claude-setup-token.js.map +1 -0
- package/dist/cli-audited.js +15 -12
- package/dist/cli-audited.js.map +1 -1
- package/dist/command-report.d.ts +11 -0
- package/dist/command-report.js +2 -0
- package/dist/command-report.js.map +1 -0
- package/dist/config-validator.js +9 -0
- package/dist/config-validator.js.map +1 -1
- package/dist/config.js +4 -2
- package/dist/config.js.map +1 -1
- package/dist/daemon.d.ts +5 -0
- package/dist/daemon.js +65 -3
- package/dist/daemon.js.map +1 -1
- package/dist/fleet-level-config.d.ts +1 -1
- package/dist/fleet-level-config.js +1 -0
- package/dist/fleet-level-config.js.map +1 -1
- package/dist/fleet-manager.d.ts +53 -2
- package/dist/fleet-manager.js +511 -22
- package/dist/fleet-manager.js.map +1 -1
- package/dist/general-knowledge/skills/web-appearance/SKILL.md +4 -1
- package/dist/general-knowledge/skills/web-dashboard/SKILL.md +25 -6
- package/dist/host-monitoring-config.d.ts +15 -0
- package/dist/host-monitoring-config.js +36 -0
- package/dist/host-monitoring-config.js.map +1 -0
- package/dist/host-monitoring-history-files.d.ts +2 -0
- package/dist/host-monitoring-history-files.js +16 -0
- package/dist/host-monitoring-history-files.js.map +1 -0
- package/dist/host-monitoring-history-policy.d.ts +55 -0
- package/dist/host-monitoring-history-policy.js +93 -0
- package/dist/host-monitoring-history-policy.js.map +1 -0
- package/dist/host-monitoring-history-store.d.ts +52 -0
- package/dist/host-monitoring-history-store.js +176 -0
- package/dist/host-monitoring-history-store.js.map +1 -0
- package/dist/host-monitoring-history-worker.d.ts +1 -0
- package/dist/host-monitoring-history-worker.js +50 -0
- package/dist/host-monitoring-history-worker.js.map +1 -0
- package/dist/host-monitoring-history.d.ts +71 -0
- package/dist/host-monitoring-history.js +265 -0
- package/dist/host-monitoring-history.js.map +1 -0
- package/dist/host-monitoring-platform.d.ts +73 -0
- package/dist/host-monitoring-platform.js +273 -0
- package/dist/host-monitoring-platform.js.map +1 -0
- package/dist/host-monitoring-runtime.d.ts +34 -0
- package/dist/host-monitoring-runtime.js +80 -0
- package/dist/host-monitoring-runtime.js.map +1 -0
- package/dist/host-monitoring-settings-store.d.ts +5 -0
- package/dist/host-monitoring-settings-store.js +49 -0
- package/dist/host-monitoring-settings-store.js.map +1 -0
- package/dist/host-monitoring.d.ts +106 -0
- package/dist/host-monitoring.js +157 -0
- package/dist/host-monitoring.js.map +1 -0
- package/dist/hub/group-policy/resources.d.ts +1 -1
- package/dist/instance-config-impact.js +1 -1
- package/dist/instance-config-impact.js.map +1 -1
- package/dist/instructions.js +1 -0
- package/dist/instructions.js.map +1 -1
- package/dist/locale.d.ts +2 -0
- package/dist/locale.js +13 -1
- package/dist/locale.js.map +1 -1
- package/dist/office-share-page.js +1 -1
- package/dist/office-share-page.js.map +1 -1
- package/dist/profile-signins.d.ts +1 -0
- package/dist/profile-signins.js +3 -1
- package/dist/profile-signins.js.map +1 -1
- package/dist/public-web-gateway.js +6 -0
- package/dist/public-web-gateway.js.map +1 -1
- package/dist/public-web-link.d.ts +21 -2
- package/dist/public-web-link.js +22 -2
- package/dist/public-web-link.js.map +1 -1
- package/dist/runtime-cli-install.js +17 -16
- package/dist/runtime-cli-install.js.map +1 -1
- package/dist/settings-api.d.ts +15 -0
- package/dist/settings-api.js +154 -8
- package/dist/settings-api.js.map +1 -1
- package/dist/settings-baseline.d.ts +1 -0
- package/dist/settings-baseline.js +5 -4
- package/dist/settings-baseline.js.map +1 -1
- package/dist/settings-change.js +10 -0
- package/dist/settings-change.js.map +1 -1
- package/dist/settings-effect.d.ts +2 -0
- package/dist/settings-effect.js +15 -1
- package/dist/settings-effect.js.map +1 -1
- package/dist/topic-commands.d.ts +7 -1
- package/dist/topic-commands.js +98 -88
- package/dist/topic-commands.js.map +1 -1
- package/dist/transcript-monitor.d.ts +1 -0
- package/dist/transcript-monitor.js +18 -0
- package/dist/transcript-monitor.js.map +1 -1
- package/dist/types.d.ts +2 -0
- package/dist/ui/accounts-view.js +16 -8
- package/dist/ui/backend-signin.js +3 -1
- package/dist/ui/chat-commands.js +2 -0
- package/dist/ui/chat-popout-transport.js +49 -19
- package/dist/ui/chat-popout.js +15 -1
- package/dist/ui/chat-store.js +1 -1
- package/dist/ui/claude-credentials.js +123 -0
- package/dist/ui/claude-setup-token.js +36 -0
- package/dist/ui/contact-auth-client.js +7 -2
- package/dist/ui/contact-auth-strings.js +45 -14
- package/dist/ui/contact-authorizations.js +47 -26
- package/dist/ui/contact-needs.js +4 -4
- package/dist/ui/fleet-canvas.js +3 -2
- package/dist/ui/fleet-office-card.js +414 -41
- package/dist/ui/fleet-office-dialogue.js +3 -3
- package/dist/ui/fleet-office-pack.d.ts +67 -1
- package/dist/ui/fleet-office-pack.js +412 -18
- package/dist/ui/fleet-office-play.js +401 -3
- package/dist/ui/fleet-office-skin.js +133 -21
- package/dist/ui/fleet-office-store.js +41 -0
- package/dist/ui/fleet-office-zones.js +34 -9
- package/dist/ui/fleet-office.js +513 -62
- package/dist/ui/host-health-model.js +42 -0
- package/dist/ui/host-health.js +74 -0
- package/dist/ui/office-share-page.js +5 -1
- package/dist/ui/panel-chat.js +146 -46
- package/dist/ui/panel-fleet.js +24 -11
- package/dist/ui/panel-hub.js +5 -1
- package/dist/ui/panel-settings.js +5 -4
- package/dist/ui/preview-popout.js +134 -0
- package/dist/ui/reply-file-preview.js +1 -1
- package/dist/ui/search-dialog.js +8 -1
- package/dist/ui/settings-capabilities.js +2 -0
- package/dist/ui/settings-host-monitoring.js +69 -0
- package/dist/ui/settings-registry.js +4 -1
- package/dist/ui/settings-shared.js +3 -2
- package/dist/ui/shared/accounts.css +8 -4
- package/dist/ui/shared/agent-sheet.js +5 -2
- package/dist/ui/shared/app-route.js +1 -1
- package/dist/ui/shared/app.css +248 -27
- package/dist/ui/shared/app.js +8 -1
- package/dist/ui/shared/chat-strings.js +10 -4
- package/dist/ui/shared/chat-thread.js +42 -10
- package/dist/ui/shared/info-tip.js +64 -0
- package/dist/ui/shared/instance-nav.js +47 -5
- package/dist/ui/shared/jump-idle.js +36 -0
- package/dist/ui/shared/office-dialogue.css +12 -0
- package/dist/ui/shared/preview-panel.js +44 -18
- package/dist/ui/shared/preview-popout.css +11 -0
- package/dist/ui/shared/theme.js +15 -1
- package/dist/ui/shared/ui-menu.js +17 -11
- package/dist/ui/shared/usage-dialog.js +9 -34
- package/dist/ui/shared/view-strings.js +2 -0
- package/dist/usage/i18n-keys.d.ts +1 -1
- package/dist/usage/i18n-keys.js +1 -1
- package/dist/usage/i18n-keys.js.map +1 -1
- package/dist/usage/providers.d.ts +1 -0
- package/dist/usage/providers.js +14 -1
- package/dist/usage/providers.js.map +1 -1
- package/dist/usage/usage-api.js +5 -2
- package/dist/usage/usage-api.js.map +1 -1
- package/dist/web-api.d.ts +6 -1
- package/dist/web-api.js +83 -9
- package/dist/web-api.js.map +1 -1
- package/dist/web-chat-history.d.ts +7 -1
- package/dist/web-chat-history.js +19 -3
- package/dist/web-chat-history.js.map +1 -1
- package/dist/web-claude-credentials.d.ts +31 -0
- package/dist/web-claude-credentials.js +138 -0
- package/dist/web-claude-credentials.js.map +1 -0
- package/dist/web-commands.d.ts +5 -2
- package/dist/web-commands.js +4 -2
- package/dist/web-commands.js.map +1 -1
- package/dist/web-office-skins.d.ts +7 -2
- package/dist/web-office-skins.js +42 -16
- package/dist/web-office-skins.js.map +1 -1
- package/dist/web-session.d.ts +20 -1
- package/dist/web-session.js +27 -0
- package/dist/web-session.js.map +1 -1
- package/dist/web-shell-routes.d.ts +1 -1
- package/dist/web-shell-routes.js +1 -1
- package/dist/web-shell-routes.js.map +1 -1
- package/dist/web-terminal.d.ts +4 -0
- package/dist/web-terminal.js +16 -1
- package/dist/web-terminal.js.map +1 -1
- package/package.json +1 -1
|
@@ -79,28 +79,45 @@ register("contactAuth", {
|
|
|
79
79
|
"action_origin-clear": "Retained origin cleared",
|
|
80
80
|
action_policy: "Settings changed", action_approve: "Approved", action_decline: "Declined", "action_grant-add": "Contact allowed", "action_grant-remove": "Contact removed",
|
|
81
81
|
// Tickets
|
|
82
|
-
ticket: "Contact request #{0}", forwarded: "Forwarded (approved)",
|
|
82
|
+
ticketTitle: "Contact request", ticket: "Contact request #{0}", forwarded: "Forwarded (approved)",
|
|
83
83
|
state_pending: "Waiting for approval", state_approved: "Approved", state_delivered: "Forwarded", state_declined: "Declined", state_expired: "Expired", state_unknown: "Unknown",
|
|
84
84
|
verb_send_to_instance: "message", verb_delegate_task: "task", verb_request_information: "question", verb_broadcast: "broadcast", verb_report_result: "report",
|
|
85
85
|
from: "From {0}", via: "Via {0}", to: "To {0}", origin_unknown: "Origin unknown", origin_mixed: "Earlier non-admin request",
|
|
86
86
|
"reason_earlier-non-admin": "This agent's retained history includes non-admin input, so this contact needs approval.",
|
|
87
87
|
"reason_unknown-origin": "This agent's retained history has an unknown origin, so this contact needs approval.",
|
|
88
|
-
|
|
88
|
+
// M-3385: under the reason — what an approval leaves as it is, and the one way this agent stops needing approval.
|
|
89
|
+
resetNote: "Approving forwards only this request and leaves the receiving agent's origin unchanged. For this agent's contacts to stop needing approval, a managing administrator can clear its retained origin in its Permissions; it never resets on its own.",
|
|
89
90
|
created: "Asked {0}", expires: "Expires {0}", decided: "{0} by {1}",
|
|
90
|
-
approveOnce: "Approve once", decline: "Decline",
|
|
91
|
-
|
|
91
|
+
approveOnce: "Approve once", decline: "Decline", alsoAllowUntil: "Until", alsoAllowUses: "Uses (empty: no limit)",
|
|
92
|
+
// M-3385: what the card's parts do, said where they are.
|
|
93
|
+
// M-3385 (the user, 11-20): short visible words; the detail in an ⓘ (ui-style-guide rule 14).
|
|
94
|
+
alsoAllow: "Forward requests like this from now on",
|
|
95
|
+
alsoAllowMore: "{0}'s {1} requests from {2} to {3} will be forwarded without asking. This adds an allowed contact to {3}'s Permissions, until the date or the number of uses you set; you can remove it there at any time.",
|
|
96
|
+
alsoAllowAbout: "About forwarding requests like this",
|
|
97
|
+
messageLabel: "What it asks",
|
|
98
|
+
expiresPending: "Expires {0}: a request waits {1} minutes for a decision. After that nothing is forwarded, even if it was approved.",
|
|
99
|
+
decidedNote: "Approve = forward this request once.",
|
|
100
|
+
decidedNoteMore: "The receiving agent's later contacts are judged by its own history only; this approval doesn't carry the requester's origin forward. So if its own history allows it, the receiving agent may pass the approved content on to other agents without another approval.",
|
|
101
|
+
decidedNoteAbout: "About approving",
|
|
92
102
|
deliveryNote: "Forwarded means the request was delivered, not that the work is done.",
|
|
93
103
|
// Fleet → Authorizations
|
|
94
|
-
pageTitle: "Authorizations", pageLead: "
|
|
104
|
+
pageTitle: "Authorizations", pageLead: "Contact requests from ClassicBot rooms to other agents.",
|
|
95
105
|
filterStatus: "Show", filter_pending: "Waiting", filter_all: "All", filterAgent: "Agent", filterAny: "Any",
|
|
96
106
|
filterPerson: "Only {0}", filterPersonClear: "Show everyone",
|
|
97
|
-
empty: "No requests.", emptyPending: "Nothing is waiting for approval.", more: "Show more",
|
|
107
|
+
emptyHint: "Contact requests from restricted ClassicBot rooms to other agents appear here.", viewAll: "View all records", empty: "No requests.", emptyPending: "Nothing is waiting for approval.", more: "Show more",
|
|
98
108
|
decideFailed: "Couldn't record the decision.", alreadyDecided: "This request was decided elsewhere. It has been reloaded.",
|
|
99
109
|
// Needs you / suggestion
|
|
100
|
-
needsTitle: "{0} wants to contact {1}", needsOpen: "Open",
|
|
110
|
+
needsTitle: "{0} wants to contact {1}", needsOpen: "Open in Authorizations",
|
|
101
111
|
suggestTitle: "We suggest switching this room to restricted mode",
|
|
102
112
|
suggestGroup: "{0} existing ClassicBot room(s) can switch to restricted mode",
|
|
103
113
|
suggestBody: "Requests from people who aren't admins to other agents would wait for approval first.",
|
|
114
|
+
laterRefresh: "This page’s write verification failed. Reopen the dashboard at its own address, refresh it, then choose Later again.",
|
|
115
|
+
laterSignedOut: "Your session has ended. Sign in again, then choose Later.",
|
|
116
|
+
laterVerify: "Verify your administrator identity in Sign-in status, then choose Later. Nothing was hidden.",
|
|
117
|
+
laterForbidden: "This account is not an administrator for this room. Sign in with that room’s administrator account, then try again.",
|
|
118
|
+
laterMissing: "This reminder or its action is no longer available. Refresh this page, then try again.",
|
|
119
|
+
laterNetwork: "Could not reach AgEnD. Check your connection, then choose Later again.",
|
|
120
|
+
laterUnavailable: "Could not save this reminder. Check free space and file permissions on the AgEnD host, then try again.",
|
|
104
121
|
suggestSwitch: "Switch this room", suggestView: "See the impact and allowed contacts", suggestLater: "Later",
|
|
105
122
|
},
|
|
106
123
|
"zh-TW": {
|
|
@@ -168,26 +185,40 @@ register("contactAuth", {
|
|
|
168
185
|
"action_origin-clear": "已清除保留的來源",
|
|
169
186
|
historyTitle: "紀錄", historyNone: "目前沒有紀錄。",
|
|
170
187
|
action_policy: "設定已變更", action_approve: "已核准", action_decline: "已拒絕", "action_grant-add": "已加入常用轉交", "action_grant-remove": "已移除常用轉交",
|
|
171
|
-
ticket: "聯絡申請 #{0}", forwarded: "已准轉交",
|
|
188
|
+
ticketTitle: "聯絡申請", ticket: "聯絡申請 #{0}", forwarded: "已准轉交",
|
|
172
189
|
state_pending: "等待核准", state_approved: "已核准", state_delivered: "已准轉交", state_declined: "已拒絕", state_expired: "已過期", state_unknown: "狀態不明",
|
|
173
190
|
verb_send_to_instance: "訊息", verb_delegate_task: "交辦工作", verb_request_information: "詢問", verb_broadcast: "廣播", verb_report_result: "回報結果",
|
|
174
191
|
from: "來自 {0}", via: "經由 {0}", to: "給 {0}", origin_unknown: "來源不明", origin_mixed: "先前有非管理員的請求",
|
|
175
192
|
"reason_earlier-non-admin": "這個 Agent 保留的歷史含有非管理員輸入,因此這次聯絡需要核准。",
|
|
176
193
|
"reason_unknown-origin": "這個 Agent 保留的歷史來源不明,因此這次聯絡需要核准。",
|
|
177
|
-
resetNote: "
|
|
194
|
+
resetNote: "核准只會轉交這一筆,接收 Agent 的來源維持原狀。若要讓這個 Agent 之後的聯絡不再需要核准,具管理權限的管理員可以在它的「權限」頁清除保留的來源;來源不會自動重設。",
|
|
178
195
|
created: "{0} 提出", expires: "{0} 到期", decided: "{1} 於 {0} 處理",
|
|
179
|
-
approveOnce: "核准這一次", decline: "拒絕",
|
|
180
|
-
|
|
196
|
+
approveOnce: "核准這一次", decline: "拒絕", alsoAllowUntil: "到期時間", alsoAllowUses: "次數(留空表示不限)",
|
|
197
|
+
alsoAllow: "之後同樣的請求也直接轉交",
|
|
198
|
+
alsoAllowMore: "之後 {0} 從 {2} 發給 {3} 的{1}請求會直接轉交,不必再核准。這會在 {3} 的權限頁新增一筆常用轉交,到你設定的到期時間或次數用完為止;隨時可以在那裡移除。",
|
|
199
|
+
alsoAllowAbout: "「同樣的請求也直接轉交」的說明",
|
|
200
|
+
messageLabel: "請求內容",
|
|
201
|
+
expiresPending: "{0} 到期:申請只等待 {1} 分鐘,逾時後即使已核准也不會轉交。",
|
|
202
|
+
decidedNote: "核准=只轉交這一次。",
|
|
203
|
+
decidedNoteMore: "接收 Agent 之後聯絡其他 Agent 時,只看它自己原本的歷史,這次核准不會把提問者的來源帶過去;因此,如果它自己的歷史允許,它可以把已核准的內容繼續轉交給其他 Agent,不必再次取得核准。",
|
|
204
|
+
decidedNoteAbout: "核准的說明",
|
|
181
205
|
deliveryNote: "「已准轉交」表示請求已送達,不代表工作已完成。",
|
|
182
|
-
pageTitle: "授權", pageLead: "ClassicBot 房間對其他 Agent
|
|
206
|
+
pageTitle: "授權", pageLead: "ClassicBot 房間對其他 Agent 提出的聯絡申請與核准紀錄。",
|
|
183
207
|
filterStatus: "顯示", filter_pending: "等待中", filter_all: "全部", filterAgent: "Agent", filterAny: "任何",
|
|
184
208
|
filterPerson: "只看 {0}", filterPersonClear: "顯示所有人",
|
|
185
|
-
empty: "沒有請求。", emptyPending: "沒有等待核准的請求。", more: "顯示更多",
|
|
209
|
+
emptyHint: "當受限模式的 ClassicBot 房間向其他 Agent 提出聯絡申請時,會顯示在這裡。", viewAll: "查看全部紀錄", empty: "沒有請求。", emptyPending: "沒有等待核准的請求。", more: "顯示更多",
|
|
186
210
|
decideFailed: "無法記錄這個決定。", alreadyDecided: "這個請求已在其他地方處理,已重新載入。",
|
|
187
|
-
needsTitle: "{0} 想聯絡 {1}", needsOpen: "
|
|
211
|
+
needsTitle: "{0} 想聯絡 {1}", needsOpen: "在「授權」頁開啟",
|
|
188
212
|
suggestTitle: "建議將這個房間切換為受限模式",
|
|
189
213
|
suggestGroup: "{0} 個既有 ClassicBot 房間可以切換為受限模式",
|
|
190
214
|
suggestBody: "非管理員對其他 Agent 的請求,將先經過核准才會送出。",
|
|
215
|
+
laterRefresh: "這個頁面的寫入驗證未通過。請從儀表板原網址開啟並重新整理,再按「稍後」。",
|
|
216
|
+
laterSignedOut: "登入已失效。請重新登入,再按「稍後」。",
|
|
217
|
+
laterVerify: "請先在「登入狀態」驗證管理員身分,再按「稍後」。提醒尚未隱藏。",
|
|
218
|
+
laterForbidden: "這個帳號不是該房間的管理員。請以該房間的管理員帳號登入後再試。",
|
|
219
|
+
laterMissing: "這則提醒或操作已不存在。請重新整理頁面後再試。",
|
|
220
|
+
laterNetwork: "無法連上 AgEnD。請確認網路連線,再按「稍後」。",
|
|
221
|
+
laterUnavailable: "無法儲存這則提醒。請檢查 AgEnD 主機的可用空間與檔案權限後再試。",
|
|
191
222
|
suggestSwitch: "切換這個房間", suggestView: "查看影響與常用轉交", suggestLater: "稍後",
|
|
192
223
|
},
|
|
193
224
|
});
|
|
@@ -12,6 +12,8 @@ import { register } from "/assets/app-i18n.js";
|
|
|
12
12
|
import { appStore, useStore } from "/assets/app-store.js";
|
|
13
13
|
import { toast } from "/assets/ui-toast.js";
|
|
14
14
|
import { Skeleton, ErrorState, Empty } from "/assets/ui-states.js";
|
|
15
|
+
import { labelOf } from "/assets/instance-nav.js";
|
|
16
|
+
import { InfoTip } from "/assets/info-tip.js";
|
|
15
17
|
import { ca } from "./contact-auth-strings.js";
|
|
16
18
|
import { decideTicket, getTicket, listTickets, personKey, shortTicketId } from "./contact-auth-client.js";
|
|
17
19
|
|
|
@@ -25,6 +27,8 @@ const TONE = { pending: "warn", approved: "ok", delivered: "ok", declined: "bad"
|
|
|
25
27
|
const stateOf = (s) => (Object.prototype.hasOwnProperty.call(TONE, s) ? s : "unknown");
|
|
26
28
|
const label = (p) => (p && (p.label || p.userId)) || "";
|
|
27
29
|
/** datetime-local's value for a time `days` from now (the browser's own zone). */
|
|
30
|
+
/** M-3385: how long a request waits for a decision (its expiry from when it was asked), in whole minutes; 0 if unknown. */
|
|
31
|
+
const waitMinutes = (tk) => { const ms = Date.parse(tk.expiresAt) - Date.parse(tk.createdAt); return Number.isFinite(ms) && ms > 0 ? Math.round(ms / 60_000) : 0; };
|
|
28
32
|
const localIn = (days) => { const d = new Date(Date.now() + days * 864e5); d.setSeconds(0, 0); return new Date(d.getTime() - d.getTimezoneOffset() * 6e4).toISOString().slice(0, 16); };
|
|
29
33
|
|
|
30
34
|
/** One request: what it is, who asked, and — for its approver, while it waits — the decision. */
|
|
@@ -33,11 +37,14 @@ export function TicketCard({ ticket, onChange, onPerson, focus = false }) {
|
|
|
33
37
|
const [allow, setAllow] = useState(false);
|
|
34
38
|
const [until, setUntil] = useState(() => localIn(7));
|
|
35
39
|
const [uses, setUses] = useState("");
|
|
40
|
+
const { instances } = useStore(appStore);
|
|
41
|
+
const agentLabel = (name) => labelOf((instances || []).find((i) => i.name === name) || { name });
|
|
42
|
+
const personLabel = label;
|
|
36
43
|
const tk = ticket, st = stateOf(tk.state);
|
|
37
44
|
const decide = async (decision) => {
|
|
38
45
|
if (busy) return;
|
|
39
46
|
const n = uses.trim() === "" ? null : Math.max(1, Math.floor(Number(uses)));
|
|
40
|
-
const grant = decision === "approve-once" && allow && until ? { expiresAt: new Date(until).toISOString(), remainingUses: Number.isFinite(n) ? n : null } : undefined;
|
|
47
|
+
const grant = decision === "approve-once" && allow && until && tk.origin?.kind === "human" && (tk.origin?.people || []).length === 1 ? { expiresAt: new Date(until).toISOString(), remainingUses: Number.isFinite(n) ? n : null } : undefined;
|
|
41
48
|
setBusy(true);
|
|
42
49
|
const r = await decideTicket(tk.id, { revision: tk.revision, decision, ...(grant ? { grant } : {}) });
|
|
43
50
|
setBusy(false);
|
|
@@ -51,27 +58,41 @@ export function TicketCard({ ticket, onChange, onPerson, focus = false }) {
|
|
|
51
58
|
toast(ca(r.code === "forbidden" ? "forbidden" : r.code === "unavailable" ? "unavailable" : "decideFailed"), false);
|
|
52
59
|
};
|
|
53
60
|
const people = tk.origin?.people || [];
|
|
61
|
+
const grantable = tk.origin?.kind === "human" && people.length === 1;
|
|
62
|
+
// M-3385: when it was decided; or, while it waits, how long it waits and that nothing is forwarded after that.
|
|
63
|
+
const endsText = tk.decidedAt ? ca("decided", when(tk.decidedAt), personLabel(tk.decidedBy))
|
|
64
|
+
: st === "pending" && waitMinutes(tk) ? ca("expiresPending", when(tk.expiresAt), waitMinutes(tk)) : ca("expires", when(tk.expiresAt));
|
|
54
65
|
const originText = tk.origin?.kind === "unknown" ? ca("origin_unknown") : tk.origin?.kind === "mixed" ? ca("origin_mixed") : "";
|
|
55
|
-
return html`<article class=${`card contact-ticket${focus ? " focus" : ""}`} data-ticket=${tk.id} data-state=${st}>
|
|
56
|
-
<div class="contact-ticket-head"><strong
|
|
57
|
-
<span class="
|
|
58
|
-
<
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
${
|
|
66
|
-
|
|
66
|
+
return html`<article class=${`card contact-ticket${st === "pending" || focus ? " lbar" : ""}${focus ? " focus" : ""}`} data-ticket=${tk.id} data-state=${st}>
|
|
67
|
+
<div class="contact-ticket-head"><strong>${ca("ticketTitle")}</strong><code class="contact-ticket-id" title=${tk.id}>#${shortTicketId(tk.id)}</code>
|
|
68
|
+
<span class="tag contact-ticket-verb">${ca(`verb_${tk.verb}`)}</span><span class=${`tag contact-ticket-state${TONE[st] === "warn" ? " warn" : TONE[st] === "ok" ? " s-state ok" : TONE[st] === "bad" ? " s-state bad" : ""}`}>${ca(`state_${st}`)}</span></div>
|
|
69
|
+
<div class="contact-ticket-meta">
|
|
70
|
+
<div class="contact-ticket-route"><span>${ca("from", "")}</span><span class="contact-agent-chip" title=${tk.source}>${agentLabel(tk.source)}</span>
|
|
71
|
+
<span>→ ${ca("to", "")}</span><span class="contact-agent-chip" title=${tk.target}>${agentLabel(tk.target)}</span></div>
|
|
72
|
+
<div class="contact-ticket-origin">${people.map((p) => html`<button type="button" class="link-btn" title=${ca("filterPerson", personLabel(p))}
|
|
73
|
+
onClick=${() => onPerson?.(p)}>${personLabel(p)}</button>`)}${originText ? html`<span class="tag warn">${originText}</span>` : null}
|
|
74
|
+
${tk.origin?.chain?.length ? html`<span class="contact-hop-chain"><span>${ca("via", "")}</span>${tk.origin.chain.map((name, i) => html`${i ? html`<span aria-hidden="true">→</span>` : null}<span class="contact-hop" title=${name}>${agentLabel(name)}</span>`)}</span>` : null}</div>
|
|
75
|
+
</div>
|
|
76
|
+
${tk.message ? html`<div class="contact-ticket-message-box"><p class="contact-ticket-label">${ca("messageLabel")}</p><pre class="contact-ticket-message">${tk.message}</pre></div>` : null}
|
|
77
|
+
<div class="contact-ticket-foot">
|
|
78
|
+
<div class="contact-ticket-times"><span class="contact-time-item" title=${ca("created", when(tk.createdAt))}>${ca("created", when(tk.createdAt))}</span>
|
|
79
|
+
<span class=${`contact-time-item${!tk.decidedAt && st === "pending" && waitMinutes(tk) ? " contact-time-wait" : ""}`} title=${endsText}>${endsText}</span></div>
|
|
80
|
+
${st === "delivered" ? html`<p class="note">${ca("deliveryNote")}</p>` : null}
|
|
81
|
+
${REASONS.has(tk.reason) ? html`<p class="note contact-reason" data-reason=${tk.reason}>${ca(`reason_${tk.reason}`)}${st === "pending" ? html` ${ca("resetNote")}` : null}</p>` : null}
|
|
82
|
+
</div>
|
|
67
83
|
${tk.canDecide && st === "pending" ? html`<div class="contact-decide">
|
|
68
|
-
|
|
69
|
-
<
|
|
70
|
-
${allow ? html`<div class="field-row contact-allow">
|
|
84
|
+
${/* M-3385 (the user, 11-20: easy to read but too long): one short visible line; what an approval means onward is in its ⓘ. */ ""}
|
|
85
|
+
<p class="note contact-decided-note">${ca("decidedNote")} <${InfoTip} text=${ca("decidedNoteMore")} label=${ca("decidedNoteAbout")} /></p>
|
|
86
|
+
${allow && grantable ? html`<div class="field-row contact-allow">
|
|
71
87
|
<label class="field"><span>${ca("alsoAllowUntil")}</span><input class="input" type="datetime-local" value=${until} disabled=${busy} onInput=${(e) => setUntil(e.currentTarget.value)} /></label>
|
|
72
88
|
<label class="field"><span>${ca("alsoAllowUses")}</span><input class="input" type="number" min="1" inputmode="numeric" value=${uses} disabled=${busy} onInput=${(e) => setUses(e.currentTarget.value)} /></label></div>` : null}
|
|
73
|
-
<div class="
|
|
74
|
-
<button type="button" class="btn btn-sm" disabled=${busy} onClick=${() => void decide("decline")}>${ca("decline")}</button
|
|
89
|
+
<div class="contact-decide-controls"><button type="button" class="btn btn-sm btn-primary" disabled=${busy} onClick=${() => void decide("approve-once")}>${ca("approveOnce")}</button>
|
|
90
|
+
<button type="button" class="btn btn-sm danger" disabled=${busy} onClick=${() => void decide("decline")}>${ca("decline")}</button>
|
|
91
|
+
${/* M-3385: a standing grant is one person's — offered only for a request from exactly one person (the server refuses
|
|
92
|
+
any other: invalid-grant-origin), and said in full: who, what kind, from where to where; where it lives under the row. */ ""}
|
|
93
|
+
${grantable ? html`<span class="contact-toggle-pair"><label class="check contact-toggle"><input type="checkbox" checked=${allow} disabled=${busy} onChange=${(e) => setAllow(e.currentTarget.checked)} />
|
|
94
|
+
<span>${ca("alsoAllow")}</span></label><${InfoTip} cls="contact-allow-info" text=${ca("alsoAllowMore", personLabel(people[0]), ca(`verb_${tk.verb}`), agentLabel(tk.source), agentLabel(tk.target))}
|
|
95
|
+
label=${ca("alsoAllowAbout")} /></span>` : null}</div>
|
|
75
96
|
</div>` : null}
|
|
76
97
|
</article>`;
|
|
77
98
|
}
|
|
@@ -107,18 +128,18 @@ export function ContactAuthorizations() {
|
|
|
107
128
|
const names = (instances || []).map((i) => i.name).filter(Boolean).sort();
|
|
108
129
|
const list = page.items.filter((x) => !focus || x.id !== focus.id);
|
|
109
130
|
return html`<div class="contact-auth-page">
|
|
110
|
-
<p class="
|
|
111
|
-
<div class="
|
|
112
|
-
<div class="seg" role="group" aria-label=${ca("filterStatus")}>${["pending", "all"].map((s) => html`<button key=${s} type="button" class=${`
|
|
131
|
+
<p class="s-page-lead">${ca("pageLead")}</p>
|
|
132
|
+
<div class="us-bar-top contact-filters">
|
|
133
|
+
<div class="seg-inline" role="group" aria-label=${ca("filterStatus")}>${["pending", "all"].map((s) => html`<button key=${s} type="button" class=${`btn btn-sm${status === s ? " btn-primary" : ""}`}
|
|
113
134
|
aria-pressed=${status === s ? "true" : "false"} onClick=${() => setStatus(s)}>${ca(`filter_${s}`)}</button>`)}</div>
|
|
114
|
-
<label class="
|
|
115
|
-
<option value="">${ca("filterAny")}</option>${names.map((n) => html`<option key=${n} value=${n}>${n}</option>`)}</select></label>
|
|
116
|
-
${person ? html`<
|
|
135
|
+
<label class="us-group contact-agent-filter"><span>${ca("filterAgent")}</span><select value=${agent} onChange=${(e) => setAgent(e.currentTarget.value)}>
|
|
136
|
+
<option value="">${ca("filterAny")}</option>${names.map((n) => html`<option key=${n} value=${n}>${labelOf((instances || []).find((i) => i.name === n))}</option>`)}</select></label>
|
|
137
|
+
${person ? html`<span class="chip contact-person-filter"><span>${ca("filterPerson", label(person))}</span><button type="button" class="chip-x" aria-label=${ca("filterPersonClear")} title=${ca("filterPersonClear")} onClick=${() => setPerson(null)}>×</button></span>` : null}
|
|
117
138
|
</div>
|
|
118
139
|
${focus ? html`<${TicketCard} ticket=${focus} focus=${true} onChange=${replace} onPerson=${setPerson} />` : null}
|
|
119
|
-
${page.loading ? html`<${Skeleton} lines=${
|
|
140
|
+
${page.loading ? html`<${Skeleton} variant="cards" lines=${2} label=${ca("loading")} />`
|
|
120
141
|
: page.error && !page.items.length ? (page.error === "forbidden" ? html`<p class="note">${ca("forbidden")}</p>` : html`<${ErrorState} message=${ca(page.error === "unavailable" ? "unavailable" : "loadFailed")} onRetry=${() => void read()} />`)
|
|
121
|
-
: !list.length && !focus ? html`<${Empty} icon="key" title=${ca(status === "pending" ? "emptyPending" : "empty")} />`
|
|
142
|
+
: !list.length && !focus ? html`<${Empty} icon="key" title=${ca(status === "pending" ? "emptyPending" : "empty")} hint=${ca("emptyHint")} action=${status === "pending" ? html`<button type="button" class="btn btn-sm" onClick=${() => setStatus("all")}>${ca("viewAll")}</button>` : null} />`
|
|
122
143
|
: html`<div class="contact-ticket-list">${list.map((tk) => html`<${TicketCard} key=${tk.id} ticket=${tk} onChange=${replace} onPerson=${setPerson} />`)}</div>`}
|
|
123
144
|
${page.next ? html`<div class="field-row"><button type="button" class="btn btn-sm" onClick=${() => void read(page.next)}>${ca("more")}</button></div>` : null}
|
|
124
145
|
</div>`;
|
package/dist/ui/contact-needs.js
CHANGED
|
@@ -13,7 +13,7 @@ import { Icon } from "/assets/ui-icons.js";
|
|
|
13
13
|
import { toast } from "/assets/ui-toast.js";
|
|
14
14
|
import { confirmDialog } from "/assets/ui-confirm.js";
|
|
15
15
|
import { ca } from "./contact-auth-strings.js";
|
|
16
|
-
import { getPermissions, getTicket, putPermissions } from "./contact-auth-client.js";
|
|
16
|
+
import { getPermissions, getTicket, putPermissions, dismissSuggestion } from "./contact-auth-client.js";
|
|
17
17
|
import { TicketCard } from "./contact-authorizations.js";
|
|
18
18
|
import { notCovered, wouldDisableMore, wouldDisableText } from "./contact-permissions.js";
|
|
19
19
|
|
|
@@ -59,10 +59,10 @@ function SuggestionNeed({ item }) {
|
|
|
59
59
|
const later = async () => {
|
|
60
60
|
if (busy) return;
|
|
61
61
|
setBusy(true);
|
|
62
|
-
|
|
63
|
-
try { const r = await fetch("/ui/needs/ack", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ id: item.id }) }); ok = r.ok; } catch { ok = false; }
|
|
62
|
+
const r = await dismissSuggestion(item.id);
|
|
64
63
|
setBusy(false);
|
|
65
|
-
if (!ok) toast(ca("
|
|
64
|
+
if (!r.ok) toast(ca(r.status === 401 ? "laterSignedOut" : r.code === "csrf" || r.code === "cross-site" ? "laterRefresh" : r.code === "verification-required" ? "laterVerify"
|
|
65
|
+
: r.code === "forbidden" ? "laterForbidden" : r.code === "missing" ? "laterMissing" : r.status === 0 ? "laterNetwork" : "laterUnavailable"), false, { detail: true });
|
|
66
66
|
};
|
|
67
67
|
return html`<div class="n-title"><strong>${ca("suggestTitle")}</strong></div>
|
|
68
68
|
<p class="n-detail">${name}: ${ca("suggestBody")}</p>
|
package/dist/ui/fleet-canvas.js
CHANGED
|
@@ -20,10 +20,11 @@ import { modelSwitchText, modelName, observationLabel } from "/assets/model-obse
|
|
|
20
20
|
// #2182: routed around the cards and through the boxes' doors by libavoid in a worker (fleet-route-scene.js), each
|
|
21
21
|
// line from card to card; the lanes are the fallback.
|
|
22
22
|
import { html, useEffect, useLayoutEffect, useMemo, useRef, useState } from "/assets/app-html.js";
|
|
23
|
-
import { appStore } from "/assets/app-store.js";
|
|
23
|
+
import { appStore, guestPage } from "/assets/app-store.js";
|
|
24
24
|
import { t, register } from "/assets/app-i18n.js";
|
|
25
25
|
import { chatPath } from "/assets/app-route.js";
|
|
26
26
|
import { navigate } from "/assets/app-nav.js";
|
|
27
|
+
import { openOfficeChatWindow } from "./chat-popout.js";
|
|
27
28
|
import { Empty, Skeleton } from "/assets/ui-states.js";
|
|
28
29
|
import { Icon } from "/assets/ui-icons.js";
|
|
29
30
|
import { avatarOf, firstCharacter, namesOf } from "/assets/instance-nav.js";
|
|
@@ -512,7 +513,7 @@ export function OrgCanvas({ org, app, lease }) {
|
|
|
512
513
|
</div>
|
|
513
514
|
${mode === "canvas" && live && keyOpen ? html`<${Legend} />` : null}
|
|
514
515
|
${mode === "list" ? html`<${OrgChart} org=${org} app=${app} bare=${true} sending=${sending} />`
|
|
515
|
-
: mode === "office" ? html`<${Office} view=${view} traffic=${live ? traffic : null} q=${q} lease=${lease} onOpen=${
|
|
516
|
+
: mode === "office" ? html`<${Office} view=${view} traffic=${live ? traffic : null} q=${q} lease=${lease} onOpen=${guestPage() ? null : openOfficeChatWindow}
|
|
516
517
|
more=${officeSheet && officeMore} onMore=${officeSheet ? setOfficeMore : null} live=${live} onLive=${setLive} />`
|
|
517
518
|
: html`<${Canvas} view=${view} folded=${folded} onFold=${onFold} q=${q} jump=${jump} traffic=${live ? traffic : null} />`}
|
|
518
519
|
</div>`;
|