@songsid/agend 2.4.0-beta.21 → 2.4.0-beta.23
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/agent-whats-new.js +6 -0
- package/dist/agent-whats-new.js.map +1 -1
- package/dist/auth-api.d.ts +2 -0
- package/dist/auth-api.js +5 -2
- package/dist/auth-api.js.map +1 -1
- package/dist/authority/web-authority.d.ts +17 -3
- package/dist/authority/web-authority.js +56 -3
- package/dist/authority/web-authority.js.map +1 -1
- package/dist/backend/claude-code.js +3 -0
- package/dist/backend/claude-code.js.map +1 -1
- package/dist/build-provenance.json +1 -1
- package/dist/cache-ledger.d.ts +23 -21
- package/dist/cache-ledger.js +70 -6
- package/dist/cache-ledger.js.map +1 -1
- package/dist/cache-prices.d.ts +8 -6
- package/dist/cache-prices.js +12 -5
- package/dist/cache-prices.js.map +1 -1
- package/dist/cache-service.d.ts +9 -5
- package/dist/cache-service.js +202 -50
- package/dist/cache-service.js.map +1 -1
- package/dist/channel/mcp-tools.js +8 -1
- package/dist/channel/mcp-tools.js.map +1 -1
- package/dist/classic-channel-manager.d.ts +1 -1
- package/dist/classic-channel-manager.js +2 -2
- package/dist/classic-channel-manager.js.map +1 -1
- package/dist/cli-audited.js +2 -1
- package/dist/cli-audited.js.map +1 -1
- package/dist/cli.js +4 -1
- package/dist/cli.js.map +1 -1
- package/dist/contact-auth-api.js +3 -1
- package/dist/contact-auth-api.js.map +1 -1
- package/dist/contact-auth-policy.js +1 -1
- package/dist/contact-auth-policy.js.map +1 -1
- package/dist/contact-auth-service.js +8 -2
- package/dist/contact-auth-service.js.map +1 -1
- package/dist/contact-auth-store.d.ts +31 -2
- package/dist/contact-auth-store.js +106 -12
- package/dist/contact-auth-store.js.map +1 -1
- package/dist/contact-auth-types.d.ts +3 -2
- package/dist/contact-auth-types.js.map +1 -1
- package/dist/contact-change-proposals.d.ts +18 -1
- package/dist/contact-change-proposals.js +41 -6
- package/dist/contact-change-proposals.js.map +1 -1
- package/dist/contact-state-view.d.ts +103 -0
- package/dist/contact-state-view.js +80 -0
- package/dist/contact-state-view.js.map +1 -0
- package/dist/daemon.d.ts +31 -0
- package/dist/daemon.js +149 -2
- package/dist/daemon.js.map +1 -1
- package/dist/delivery-outbox.d.ts +10 -0
- package/dist/delivery-outbox.js +21 -0
- package/dist/delivery-outbox.js.map +1 -1
- package/dist/fleet-manager.d.ts +183 -15
- package/dist/fleet-manager.js +628 -96
- package/dist/fleet-manager.js.map +1 -1
- package/dist/general-knowledge/skills/admin/SKILL.md +52 -0
- package/dist/general-knowledge/skills/concepts/SKILL.md +14 -17
- package/dist/general-knowledge/skills/cross-instance-messaging/SKILL.md +6 -3
- package/dist/general-knowledge/skills/hub/SKILL.md +12 -4
- package/dist/general-knowledge/skills/web-dashboard/SKILL.md +54 -9
- package/dist/general-knowledge/skills/worker-collaboration/SKILL.md +1 -1
- package/dist/general-role.d.ts +1 -1
- package/dist/general-role.js +1 -0
- package/dist/general-role.js.map +1 -1
- package/dist/hub/agent-pictures-model.d.ts +128 -0
- package/dist/hub/agent-pictures-model.js +43 -4
- package/dist/hub/agent-pictures-model.js.map +1 -1
- package/dist/hub/agent-pictures.d.ts +14 -2
- package/dist/hub/agent-pictures.js +65 -12
- package/dist/hub/agent-pictures.js.map +1 -1
- package/dist/hub/client.d.ts +2 -0
- package/dist/hub/client.js +14 -2
- package/dist/hub/client.js.map +1 -1
- package/dist/hub/compose/member.d.ts +6 -2
- package/dist/hub/compose/member.js +19 -6
- package/dist/hub/compose/member.js.map +1 -1
- package/dist/hub/compose/server.d.ts +5 -5
- package/dist/hub/compose/server.js +6 -3
- package/dist/hub/compose/server.js.map +1 -1
- package/dist/hub/group-policy/resources.d.ts +1 -1
- package/dist/hub/http/compose.d.ts +3 -0
- package/dist/hub/http/compose.js +14 -7
- package/dist/hub/http/compose.js.map +1 -1
- package/dist/hub/http/deps.d.ts +1 -0
- package/dist/hub/http/schema.js +2 -1
- package/dist/hub/http/schema.js.map +1 -1
- package/dist/hub/init/text.js +1 -1
- package/dist/hub/mcp/policy.d.ts +1 -1
- package/dist/hub/member/agent-pictures.d.ts +34 -1
- package/dist/hub/member/agent-pictures.js +80 -9
- package/dist/hub/member/agent-pictures.js.map +1 -1
- package/dist/hub/member/room-ask.d.ts +22 -1
- package/dist/hub/member/room-ask.js +99 -5
- package/dist/hub/member/room-ask.js.map +1 -1
- package/dist/hub/member/room-asker-store.d.ts +48 -0
- package/dist/hub/member/room-asker-store.js +181 -0
- package/dist/hub/member/room-asker-store.js.map +1 -0
- package/dist/hub/protocol.d.ts +152 -0
- package/dist/hub/protocol.js +6 -1
- package/dist/hub/protocol.js.map +1 -1
- package/dist/hub/question-close-model.d.ts +17 -0
- package/dist/hub/question-close-model.js +7 -0
- package/dist/hub/question-close-model.js.map +1 -0
- package/dist/hub/representative.d.ts +15 -0
- package/dist/hub/representative.js +64 -1
- package/dist/hub/representative.js.map +1 -1
- package/dist/hub/room-asker-identity-model.d.ts +53 -0
- package/dist/hub/room-asker-identity-model.js +14 -0
- package/dist/hub/room-asker-identity-model.js.map +1 -0
- package/dist/hub/room-asker-identity.d.ts +22 -0
- package/dist/hub/room-asker-identity.js +43 -0
- package/dist/hub/room-asker-identity.js.map +1 -0
- package/dist/hub/rooms/agents.js +16 -0
- package/dist/hub/rooms/agents.js.map +1 -1
- package/dist/hub/rooms/asker-identity.d.ts +21 -0
- package/dist/hub/rooms/asker-identity.js +86 -0
- package/dist/hub/rooms/asker-identity.js.map +1 -0
- package/dist/hub/rooms/direct-view.js +1 -0
- package/dist/hub/rooms/direct-view.js.map +1 -1
- package/dist/hub/rooms/office.d.ts +18 -0
- package/dist/hub/rooms/office.js +3 -1
- package/dist/hub/rooms/office.js.map +1 -1
- package/dist/hub/rooms/service.d.ts +6 -0
- package/dist/hub/rooms/service.js +19 -0
- package/dist/hub/rooms/service.js.map +1 -1
- package/dist/hub/rooms/types.d.ts +1 -1
- package/dist/hub/rooms.d.ts +3 -0
- package/dist/hub/rooms.js +27 -1
- package/dist/hub/rooms.js.map +1 -1
- package/dist/hub/server.js +12 -2
- package/dist/hub/server.js.map +1 -1
- package/dist/hub/types.d.ts +3 -2
- package/dist/hub-character-plan.d.ts +47 -0
- package/dist/hub-character-plan.js +70 -0
- package/dist/hub-character-plan.js.map +1 -0
- package/dist/hub-contact-windows.d.ts +13 -1
- package/dist/hub-contact-windows.js +35 -2
- package/dist/hub-contact-windows.js.map +1 -1
- package/dist/hub-picture-reduce.d.ts +21 -1
- package/dist/hub-picture-reduce.js +65 -13
- package/dist/hub-picture-reduce.js.map +1 -1
- package/dist/hub-picture-worker.js +12 -4
- package/dist/hub-picture-worker.js.map +1 -1
- package/dist/human-delivery-receipts.d.ts +12 -2
- package/dist/human-delivery-receipts.js +19 -4
- package/dist/human-delivery-receipts.js.map +1 -1
- package/dist/instructions.d.ts +1 -1
- package/dist/instructions.js +1 -1
- package/dist/instructions.js.map +1 -1
- package/dist/locale.js +367 -275
- package/dist/locale.js.map +1 -1
- package/dist/ls-rows.d.ts +2 -0
- package/dist/ls-rows.js.map +1 -1
- package/dist/needs-you.d.ts +4 -0
- package/dist/needs-you.js +3 -2
- package/dist/needs-you.js.map +1 -1
- package/dist/office-share-page.js +1 -1
- package/dist/office-share-page.js.map +1 -1
- package/dist/outbound-handlers.d.ts +8 -0
- package/dist/outbound-handlers.js +56 -7
- package/dist/outbound-handlers.js.map +1 -1
- package/dist/outbound-schemas.d.ts +2 -1
- package/dist/outbound-schemas.js +3 -2
- package/dist/outbound-schemas.js.map +1 -1
- package/dist/public-web-gateway.js +18 -0
- package/dist/public-web-gateway.js.map +1 -1
- package/dist/reply-buttons-controller.d.ts +2 -1
- package/dist/reply-buttons-controller.js +1 -1
- package/dist/reply-buttons-controller.js.map +1 -1
- package/dist/runtime-cli-install.js +4 -4
- package/dist/runtime-cli-install.js.map +1 -1
- package/dist/tips.js +3 -3
- package/dist/tool-permissions.js +1 -1
- package/dist/tool-permissions.js.map +1 -1
- package/dist/ui/accounts-keepalive.js +2 -1
- package/dist/ui/agent-export-strings.js +1 -1
- package/dist/ui/agent-page-strings.js +5 -5
- package/dist/ui/chat-activity.js +2 -1
- package/dist/ui/chat-pins.js +2 -1
- package/dist/ui/claude-credentials.js +2 -1
- package/dist/ui/contact-auth-client.js +2 -2
- package/dist/ui/contact-auth-strings.js +28 -17
- package/dist/ui/contact-authorizations.js +6 -4
- package/dist/ui/contact-needs.js +6 -1
- package/dist/ui/contact-permissions.js +6 -4
- package/dist/ui/contact-tool-groups.js +1 -1
- package/dist/ui/contact-verify-need.js +46 -0
- package/dist/ui/fleet-cache.js +7 -6
- package/dist/ui/fleet-canvas.js +1 -1
- package/dist/ui/fleet-office-card.js +26 -2
- package/dist/ui/fleet-office-layout.js +2 -2
- package/dist/ui/fleet-office-skin.js +26 -6
- package/dist/ui/fleet-office-view.js +32 -0
- package/dist/ui/fleet-office-zones.js +22 -9
- package/dist/ui/fleet-office.js +92 -29
- package/dist/ui/fleet-org.js +9 -4
- package/dist/ui/fleet-tab-icons.js +19 -0
- package/dist/ui/fleet-task-activity.js +2 -1
- package/dist/ui/fleet-task-common.js +2 -2
- package/dist/ui/fleet-task-view.js +2 -1
- package/dist/ui/fleet-usage.js +8 -7
- package/dist/ui/hub-admin-overview.js +3 -2
- package/dist/ui/hub-agent-intro.js +2 -1
- package/dist/ui/hub-assistant-admin.js +2 -1
- package/dist/ui/hub-chat-strings.js +1 -1
- package/dist/ui/hub-directory-notices.js +2 -1
- package/dist/ui/hub-enrolment-code.js +2 -1
- package/dist/ui/hub-my-agents-strings.js +2 -2
- package/dist/ui/hub-my-agents.js +3 -2
- package/dist/ui/hub-quick-pairing.js +2 -1
- package/dist/ui/hub-role-audit.js +2 -1
- package/dist/ui/hub-role-forms.js +3 -2
- package/dist/ui/hub-role-view.js +3 -2
- package/dist/ui/hub-roles.js +2 -1
- package/dist/ui/hub-room-agent-strings.js +2 -1
- package/dist/ui/hub-room-list.js +2 -1
- package/dist/ui/hub-room-office.js +70 -2
- package/dist/ui/hub-room-owner-requests.js +2 -1
- package/dist/ui/hub-room-pins.js +2 -1
- package/dist/ui/hub-room-presence.js +5 -0
- package/dist/ui/hub-room-strings.js +2 -2
- package/dist/ui/hub-room-thread.js +1 -1
- package/dist/ui/log-row.js +4 -3
- package/dist/ui/office-share-dialog.js +2 -1
- package/dist/ui/office-share-page.js +2 -1
- package/dist/ui/page-share-dialog.js +3 -2
- package/dist/ui/panel-chat.js +2 -1
- package/dist/ui/panel-details.js +2 -1
- package/dist/ui/panel-fleet.js +15 -10
- package/dist/ui/panel-hub.js +2 -1
- package/dist/ui/panel-log.js +3 -3
- package/dist/ui/panel-needs.js +31 -3
- package/dist/ui/panel-notices.js +2 -1
- package/dist/ui/panel-runtimes.js +4 -3
- package/dist/ui/panel-windows-cli.js +3 -2
- package/dist/ui/runtime-cli-install.js +3 -2
- package/dist/ui/runtime-update-status.js +1 -1
- package/dist/ui/settings-access-strings.js +1 -1
- package/dist/ui/settings-appearance.js +2 -1
- package/dist/ui/settings-guests.js +4 -3
- package/dist/ui/settings-hub-member-address.js +2 -1
- package/dist/ui/settings-hub-setup-strings.js +1 -1
- package/dist/ui/settings-hub-setup.js +2 -1
- package/dist/ui/settings-hub-web-address.js +2 -1
- package/dist/ui/settings-hub.js +2 -1
- package/dist/ui/settings-layout.js +2 -2
- package/dist/ui/settings-named-test.js +16 -16
- package/dist/ui/settings-public-session-strings.js +2 -2
- package/dist/ui/settings-revoke-strings.js +1 -1
- package/dist/ui/settings-shared-strings.js +2 -2
- package/dist/ui/settings-strings.js +40 -40
- package/dist/ui/settings-update.js +2 -1
- package/dist/ui/settings-web-authority.js +2 -1
- package/dist/ui/shared/agent-sheet.js +2 -1
- package/dist/ui/shared/app-session.js +4 -3
- package/dist/ui/shared/app-shell.js +7 -3
- package/dist/ui/shared/app.css +60 -11
- package/dist/ui/shared/chat-strings.js +8 -8
- package/dist/ui/shared/chat-time.js +7 -4
- package/dist/ui/shared/clock-text.js +57 -0
- package/dist/ui/shared/device-roles.js +6 -5
- package/dist/ui/shared/instance-nav.js +31 -2
- package/dist/ui/shared/usage-dialog.js +2 -1
- package/dist/ui/shared/view-strings.js +13 -9
- package/dist/ui/shared/web-authorize.js +3 -2
- package/dist/ui/subagent-row.js +2 -1
- package/dist/web-api.d.ts +15 -2
- package/dist/web-api.js +62 -13
- package/dist/web-api.js.map +1 -1
- package/dist/web-login.d.ts +6 -1
- package/dist/web-login.js +8 -3
- package/dist/web-login.js.map +1 -1
- package/dist/web-session-authorization.d.ts +3 -0
- package/dist/web-session-authorization.js +1 -1
- package/dist/web-session-authorization.js.map +1 -1
- package/package.json +1 -1
|
@@ -4,7 +4,7 @@ register("hubMyAgents", {
|
|
|
4
4
|
offlineShort:"Offline · last seen {0}", knownShared:"{0} shared", oldCountOne:"1 Fleet needs an update to share agents from here.", oldCount:"{0} Fleets need an update to share agents from here.", namesMore:"{0} and {1} more", lead:"The agents you can share on this Hub, and who may ask each one.", refresh:"Refresh", refreshing:"Checking…", fleet:"Fleet", connected:"Connected", offline:"This Fleet is offline. Shown as last seen at {0}.", count:"{0} of {1} shared", select:"Select all", general:"Your Fleet's General. It can manage this Fleet.", classic:"ClassicBot room", classicHint:"Hub questions and answers are not posted in its Discord or Telegram room, and the room's chat is not copied to the Hub. It is one agent with one memory: it may use what it learned in the room when it answers here.",
|
|
5
5
|
old:"Update this Fleet to share agents from here.", update:"Update this Fleet", updateHint:"On that computer, open Settings → Hub and check its connection and version.", off:"Sharing from the Hub page is turned off in this Fleet's Settings → Hub.", denied:"Your Hub administrator hasn't allowed you to share agents.", unknown:"The Hub could not check whether sharing is allowed. Refresh to check.", remote:"This kind of agent can't answer Hub questions yet.", unavailable:"This agent cannot answer Hub questions right now.", limit:"This Fleet already shares 64 agents, the most allowed.", suspended:"This Fleet is paused on this Hub.", revoked:"This Fleet was removed from this Hub.",
|
|
6
6
|
lapsed:"Its backend or folder changed since you shared it, so Hub questions are refused until you share it again. The people who may ask it stay.", shareAgain:"Share again", needsReshare:"Needs re-share", kept:"(kept)",
|
|
7
|
-
shared:"Shared", nobody:"nobody may ask yet", setWho:"Choose who may ask", pictureDiscLarge:"Its avatar is too large for the Hub (limit 64 KB). On your Fleet, pick a smaller picture, or a PNG that AgEnD can shrink, in this agent's View → Edit profile → Avatar.", picturePortraitLarge:"Its identity-card portrait is too large for the Hub (limit 512 KB, including its avatar). On your Fleet, pick a smaller picture, or a PNG that AgEnD can shrink, in this agent's View → Edit profile → Identity card → Portrait.", peopleOne:"1 person may ask", people:"{0} people may ask", subjects:"{0} people, groups or teams may ask", paused:"Paused", sharing:"Sharing…", stopping:"Stopping…", uncertain:"Not confirmed yet: this Fleet hasn't answered. Refresh to check.", refused:"Not shared: {0}", changed:"This list changed. It has been refreshed; tick again.",
|
|
7
|
+
shared:"Shared", nobody:"nobody may ask yet", setWho:"Choose who may ask", pictureDiscLarge:"Its avatar is too large for the Hub (limit 64 KB). On your Fleet, pick a smaller picture, or a PNG that AgEnD can shrink, in this agent's View → Edit profile → Avatar.", picturePortraitLarge:"Its identity-card portrait is too large for the Hub (limit 512 KB, including its avatar). On your Fleet, pick a smaller picture, or a PNG that AgEnD can shrink, in this agent's View → Edit profile → Identity card → Portrait.", pictureCharacterLarge:"Its own character from your office's skin pack is too large for the Hub (limit 512 KB with its avatar and portrait), so room offices draw it as the plain figure. In that pack, give it a smaller set: fewer or smaller frames.", peopleOne:"1 person may ask", people:"{0} people may ask", subjects:"{0} people, groups or teams may ask", paused:"Paused", sharing:"Sharing…", stopping:"Stopping…", uncertain:"Not confirmed yet: this Fleet hasn't answered. Refresh to check.", refused:"Not shared: {0}", changed:"This list changed. It has been refreshed; tick again.",
|
|
8
8
|
shareOne:"Share 1 agent", stopOne:"Stop sharing 1 agent", stopTitleOne:"Stop sharing 1 agent?", accessTitleOne:"1 agent is shared. Who may ask it?", share:"Share {0} agents", stop:"Stop sharing {0} agents", mixed:"Share {0} · Stop sharing {1}", apply:"Apply changes", cancel:"Cancel", stopTitle:"Stop sharing {0} agents?", stopBody:"People will no longer be able to ask: {0}. Their lists of who may ask are cleared.", stopHint:"To keep the lists and only stop answers for now, pause sharing instead.", stopGo:"Stop sharing", pause:"Pause instead", pauseOne:"Pause sharing", later:"Decide later", accessTitle:"{0} agents are shared. Who may ask them?", accessLead:"Nobody can ask them until you choose.", same:"The same people for all {0}", each:"Choose for each agent", choose:"Choose who may ask", previousMixed:"Use the list it had before", previous:"Use the list it had before ({0} people)", used:"The previous list is saved.", saved:"Saved", saveFailed:"Could not save access for {0}. Check the current agent and try again.", personal:"On my own computer", details:"Open {0}",
|
|
9
9
|
empty:"You don't have an agent on this Hub yet.", already:"You can already ask other people's agents: open Chats, or @mention an agent in a room.", emptyLead:"To have an agent of your own that colleagues can ask:", personalOff:"Personal agents are turned off on this Hub. Ask your Hub administrator.", fleetLead:"If you run AgEnD, share the agents in it.", connectDenied:"Ask your Hub administrator to let you connect a Fleet.", apps:"Your own Claude Code or Codex can also use this Hub for you. That is for asking and posting as you. Colleagues can't ask it.", appsLink:"My AI apps", failed:"The list could not be read. Refresh to try again.",
|
|
10
10
|
},
|
|
@@ -12,7 +12,7 @@ register("hubMyAgents", {
|
|
|
12
12
|
offlineShort:"離線 · 最後上線 {0}", knownShared:"已分享 {0}", oldCountOne:"有 1 個 Fleet 需要更新,才能從這裡分享 Agent。", oldCount:"有 {0} 個 Fleet 需要更新,才能從這裡分享 Agent。", namesMore:"{0} 等 {1} 個", lead:"可以分享到這個 Hub 的 Agent,以及誰可以向它們提問。", refresh:"重新整理", refreshing:"確認中…", fleet:"Fleet", connected:"已連接", offline:"這個 Fleet 目前離線,顯示的是 {0} 的狀態。", count:"已分享 {0} / {1}", select:"全選", general:"你的 Fleet 的 General,可以管理這個 Fleet。", classic:"ClassicBot 房間", classicHint:"Hub 的提問與回答不會貼到它的 Discord 或 Telegram 房間,房間的聊天也不會複製到 Hub。但它是同一個 Agent、同一份記憶:在這裡回答時,可能用到它在房間裡得知的內容。",
|
|
13
13
|
old:"請更新這個 Fleet,才能從這裡分享 Agent。", update:"更新這個 Fleet", updateHint:"請到那台電腦的「設定 → Hub」,確認連接狀態與版本。", off:"這個 Fleet 的「設定 → Hub」關閉了從 Hub 頁面分享。", denied:"Hub 管理員還沒有允許你分享 Agent。", unknown:"Hub 目前無法確認是否允許分享,請重新整理確認。", remote:"這種 Agent 還不能回答 Hub 的提問。", unavailable:"這個 Agent 目前無法回答 Hub 的提問。", limit:"這個 Fleet 已經分享 64 個 Agent,達到上限。", suspended:"這個 Fleet 在這個 Hub 已暫停。", revoked:"這個 Fleet 已從這個 Hub 移除。",
|
|
14
14
|
lapsed:"分享之後它的後端或資料夾換了,重新分享之前 Hub 的提問都會被拒絕。可以提問的人會保留。", shareAgain:"重新分享", needsReshare:"需要重新分享", kept:"(會保留)",
|
|
15
|
-
shared:"分享中", nobody:"還沒有人可以問", setWho:"設定誰可以問", pictureDiscLarge:"它的頭像太大,Hub 無法顯示(上限 64 KB)。請在你的 Fleet 上,於這個 Agent 的「檢視 → 編輯個人資料 → 頭像」換一張較小的圖片,或改用 AgEnD 能自動縮小的 PNG。", picturePortraitLarge:"它的身分卡肖像太大,Hub 無法顯示(上限 512 KB,含頭像)。請在你的 Fleet 上,於這個 Agent 的「檢視 → 編輯個人資料 → 身分卡 → 肖像」換一張較小的圖片,或改用 AgEnD 能自動縮小的 PNG。", peopleOne:"1 人可以提問", people:"{0} 人可以提問", subjects:"{0} 個人員、群組或團隊可以提問", paused:"已暫停", sharing:"分享中…", stopping:"停止中…", uncertain:"還沒有確認:這個 Fleet 尚未回應,請重新整理確認。", refused:"沒有分享:{0}", changed:"清單已有變動並重新整理,請重新勾選。",
|
|
15
|
+
shared:"分享中", nobody:"還沒有人可以問", setWho:"設定誰可以問", pictureDiscLarge:"它的頭像太大,Hub 無法顯示(上限 64 KB)。請在你的 Fleet 上,於這個 Agent 的「檢視 → 編輯個人資料 → 頭像」換一張較小的圖片,或改用 AgEnD 能自動縮小的 PNG。", picturePortraitLarge:"它的身分卡肖像太大,Hub 無法顯示(上限 512 KB,含頭像)。請在你的 Fleet 上,於這個 Agent 的「檢視 → 編輯個人資料 → 身分卡 → 肖像」換一張較小的圖片,或改用 AgEnD 能自動縮小的 PNG。", pictureCharacterLarge:"它在你辦公室外觀包裡的專屬角色太大,Hub 無法顯示(上限 512 KB,含頭像與肖像),房間辦公室會改用一般人物。請在那個外觀包裡給它較小的角色:較少或較小的影格。", peopleOne:"1 人可以提問", people:"{0} 人可以提問", subjects:"{0} 個人員、群組或團隊可以提問", paused:"已暫停", sharing:"分享中…", stopping:"停止中…", uncertain:"還沒有確認:這個 Fleet 尚未回應,請重新整理確認。", refused:"沒有分享:{0}", changed:"清單已有變動並重新整理,請重新勾選。",
|
|
16
16
|
shareOne:"分享 1 個 Agent", stopOne:"停止分享 1 個 Agent", stopTitleOne:"要停止分享 1 個 Agent 嗎?", accessTitleOne:"已分享 1 個 Agent。誰可以問它?", share:"分享 {0} 個 Agent", stop:"停止分享 {0} 個 Agent", mixed:"分享 {0} 個 · 停止分享 {1} 個", apply:"套用變更", cancel:"取消", stopTitle:"要停止分享 {0} 個 Agent 嗎?", stopBody:"同仁將無法再問:{0}。這些 Agent 的「可以提問的人」名單會被清除。", stopHint:"如果只是暫時不回答、想保留名單,請改用「暫停分享」。", stopGo:"停止分享", pause:"改為暫停", pauseOne:"暫停分享", later:"稍後再決定", accessTitle:"已分享 {0} 個 Agent。誰可以問它們?", accessLead:"在你選擇之前,沒有人可以問它們。", same:"{0} 個都用同一份名單", each:"每個 Agent 分開選", choose:"選擇誰可以提問", previousMixed:"沿用之前的名單", previous:"沿用之前的名單({0} 人)", used:"已儲存之前的名單。", saved:"已儲存", saveFailed:"無法儲存 {0} 的提問權限,請確認目前的 Agent 後再試。", personal:"在我的電腦上", details:"開啟 {0}",
|
|
17
17
|
empty:"你在這個 Hub 還沒有自己的 Agent。", already:"你現在就可以問別人的 Agent:到「對話」,或在房間裡 @ 一個 Agent。", emptyLead:"想要有自己的 Agent 讓同仁提問:", personalOff:"這個 Hub 還沒有開啟個人 Agent,請洽 Hub 管理員。", fleetLead:"如果你有在使用 AgEnD,可以分享裡面的 Agent。", connectDenied:"請 Hub 管理員允許你連接 Fleet。", apps:"你自己的 Claude Code 或 Codex 也可以替你使用這個 Hub,用來提問和發言;同仁不能問它。", appsLink:"我的 AI App", failed:"無法讀取清單,請重新整理再試。",
|
|
18
18
|
}
|
package/dist/ui/hub-my-agents.js
CHANGED
|
@@ -7,8 +7,9 @@ import { ms } from "./hub-my-agents-strings.js";
|
|
|
7
7
|
import { rowAvailability, rowKey, shareRows, reconcileSharing } from "./hub-my-agents-model.js";
|
|
8
8
|
import { HubGrantPicker } from "./hub-grant-picker.js";
|
|
9
9
|
import { assetUrl } from "/assets/asset-url.js";
|
|
10
|
+
import { clockFormat } from "/assets/clock-text.js";
|
|
10
11
|
const tone = name => { let h = 0; for (const c of name) h = (h * 31 + c.codePointAt(0)) >>> 0; return h % 6; };
|
|
11
|
-
const shortSeen = at => Number.isFinite(at) ?
|
|
12
|
+
const shortSeen = at => Number.isFinite(at) ? clockFormat({ month: "short", day: "numeric", hour: "2-digit", minute: "2-digit", hourCycle: "h23" }, lang() === "zh-TW" ? "zh-TW" : "en-GB").format(at) : "—";
|
|
12
13
|
const Avatar = ({ name }) => html`<span class=${`hub-av sm t${tone(name)}`} aria-hidden="true">${[...name][0] || "?"}</span>`;
|
|
13
14
|
const mc = (key, n) => ms(n === 1 ? `${key}One` : key, n);
|
|
14
15
|
const STORE = "agend.hub.owner-sharing";
|
|
@@ -140,7 +141,7 @@ export function HubMyAgents({ client, scope, shared = [], policy = false, person
|
|
|
140
141
|
: html`<small class="note">${ms(row.current.state !== "published" ? "paused" : "shared")} · ${summary(row.current)}</small>`) : null}
|
|
141
142
|
${row.shared && row.current && fleet.picturesTooLarge?.[row.current.id]?.length
|
|
142
143
|
// M-3533 R2b (Lumen): a picture its Fleet shows but the Hub cannot take says so here, to its owner alone.
|
|
143
|
-
? fleet.picturesTooLarge[row.current.id].map(slot => html`<small class="note hub-agent-picture-large" data-picture-large=${slot}>${ms(slot === "disc" ? "pictureDiscLarge" : "picturePortraitLarge")}</small>`) : null}
|
|
144
|
+
? fleet.picturesTooLarge[row.current.id].map(slot => html`<small class="note hub-agent-picture-large" data-picture-large=${slot}>${ms(slot === "disc" ? "pictureDiscLarge" : slot === "character" ? "pictureCharacterLarge" : "picturePortraitLarge")}</small>`) : null}
|
|
144
145
|
${row.shared && row.exposure?.lapsed === true && row.instance ? html`<small class="note hub-agent-lapsed" role="status">${ms("lapsed")}</small>
|
|
145
146
|
<button type="button" class="btn btn-sm hub-agent-share-again" data-share-again=${row.instance} disabled=${busy || !!waiting.length} onClick=${() => shareAgain(row, fleet)}>${ms("shareAgain")}</button>` : null}
|
|
146
147
|
${status ? html`<small class=${status.state === "refused" ? "err" : "note"} role="status">${status.state === "uncertain" ? ms("uncertain") : status.state === "refused" ? status.code === "stale-list" ? ms("changed") : ms("refused", ms(({ "not-allowed": "denied", "switched-off": "off", "limit": "limit", "not-shareable": "unavailable" })[status.code] || "unavailable")) : ms(status.instance ? "sharing" : "stopping")}</small>` : null}</span>
|
|
@@ -10,12 +10,13 @@ import { hq } from "./hub-quick-strings.js";
|
|
|
10
10
|
import { hr } from "./hub-read-strings.js";
|
|
11
11
|
import { linkHubCss } from "./hub-strings.js";
|
|
12
12
|
import { linkHubOwnerCss } from "./hub-owner-strings.js";
|
|
13
|
+
import { dateTimeText } from "/assets/clock-text.js";
|
|
13
14
|
/** A member Settings reader opts into code rows only alongside this renderer. */
|
|
14
15
|
export const pairingNoticesV3 = true;
|
|
15
16
|
|
|
16
17
|
const reason = (r) => hq(r.code === "expired" ? "expired" : r.code === "conflict" ? "conflict" : r.code === "backpressure" ? "limit"
|
|
17
18
|
: r.code === "denied" || r.code === "revoked" ? "denied" : r.code === "unavailable" || r.code === "unreachable" ? "unavailable" : "failed");
|
|
18
|
-
const time = (at) => { try { return
|
|
19
|
+
const time = (at) => { try { return dateTimeText(at, { dateStyle: "medium", timeStyle: "short" }, lang() === "zh-TW" ? "zh-TW" : "en"); } catch { return dateTimeText(at); } };
|
|
19
20
|
|
|
20
21
|
/** The page controls its own attempt only. The separate fleet-local proof is never performed by this component. */
|
|
21
22
|
export function QuickPairingGuide({ allowed = false, publishAllowed = false, onConnected = () => {} }) {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import {html,useEffect,useRef,useState} from "/assets/app-html.js";
|
|
2
2
|
import {hr} from "./hub-roles-strings.js";
|
|
3
3
|
import {auditActor,auditAction,auditCsv,auditResult,auditSentence,valueLines,roleAuditActions} from "./hub-role-view.js";
|
|
4
|
+
import { dateTimeText } from "/assets/clock-text.js";
|
|
4
5
|
export function RoleAudit({client}){
|
|
5
6
|
const enhanced=client.roleAuditFiltersV1===true;
|
|
6
7
|
const [page,setPage]=useState(null),[error,setError]=useState(null),[busy,setBusy]=useState(false),[exporting,setExporting]=useState(false),[filters,setFilters]=useState({}),[draft,setDraft]=useState({from:"",to:"",person:"",action:""}),[people,setPeople]=useState([]),[actions,setActions]=useState(()=>[...roleAuditActions]);
|
|
@@ -32,7 +33,7 @@ export function RoleAudit({client}){
|
|
|
32
33
|
<label class="field"><span>${hr("filterAction")}</span><select value=${draft.action} disabled=${busy||exporting} onChange=${e=>setDraft({...draft,action:e.target.value})}><option value="">${hr("all")}</option>${actions.map(action=>html`<option key=${action} value=${action}>${auditAction(action)}</option>`)}</select></label><button type="submit" class="btn" disabled=${busy||exporting}>${hr("filter")}</button></form>`:null}
|
|
33
34
|
${error?html`<p class="err" role="alert">${error}</p><button type="button" class="btn" disabled=${busy||exporting} onClick=${()=>load(null,filters)}>${hr("retry")}</button>`:null}${!page&&!error?html`<p role="status">${hr("loading")}</p>`:null}
|
|
34
35
|
<div class="hub-team-table-wrap"><table class="hub-team-table hub-role-audit"><thead><tr><th>${hr("when")}</th><th>${hr("who")}</th><th>${hr("action")}</th><th>${hr("result")}</th></tr></thead><tbody>
|
|
35
|
-
${page?.rows?.map(row=>html`<tr key=${row.id}><td class="hub-role-audit-when"><time datetime=${new Date(row.at).toISOString()}>${
|
|
36
|
+
${page?.rows?.map(row=>html`<tr key=${row.id}><td class="hub-role-audit-when"><time datetime=${new Date(row.at).toISOString()}>${dateTimeText(row.at)}</time></td><td class="hub-role-audit-who">${auditActor(row)}</td><td class="hub-role-audit-action">
|
|
36
37
|
${row.details?html`<details><summary>${auditSentence(row)}</summary><div class="grid2 hub-role-audit-values">${["before","after"].map(side=>html`<div key=${side}><strong>${hr(side)}</strong><ul>${valueLines(row.details[side]).map((line,i)=>html`<li key=${i}>${line}</li>`)}</ul></div>`)}</div></details>`:auditSentence(row)}</td>
|
|
37
38
|
<td class="hub-role-audit-result"><span class=${`tag ${row.result==="denied"?"warn":["completed","allowed"].includes(row.result)?"ok":"danger"}`}>${auditResult(row.result)}</span></td></tr>`)}</tbody></table></div>
|
|
38
39
|
${page&&!page.rows.length?html`<p class="note">${hr("empty")}</p>`:null}${page?.nextCursor?html`<div class="hub-role-actions"><button type="button" class="btn" disabled=${busy||exporting} onClick=${()=>load(page.nextCursor)}>${hr("more")}</button></div>`:null}</section>`;
|
|
@@ -4,6 +4,7 @@ import {PeopleSearch} from "./hub-subject-picker.js";
|
|
|
4
4
|
import {GroupSearch} from "./hub-group-search.js";
|
|
5
5
|
import {hr} from "./hub-roles-strings.js";
|
|
6
6
|
import {personKey,personName,roleName,roleDescription,permissionGroups,management,changeLines,reviewImpact,scopeName,valueLines} from "./hub-role-view.js";
|
|
7
|
+
import { dateTimeText } from "/assets/clock-text.js";
|
|
7
8
|
const copy=value=>structuredClone(value);
|
|
8
9
|
const dateValue=at=>at?new Date(at-new Date(at).getTimezoneOffset()*60000).toISOString().slice(0,16):"";
|
|
9
10
|
export function RoleSearch({client,kind,onPick,disabled,id}){
|
|
@@ -45,8 +46,8 @@ export function Review({view,checked}){
|
|
|
45
46
|
${line.after?.description!==undefined?html`<p>${hr("rolePurpose")}: ${line.before?.description||"–"} → ${line.after.description||"–"}</p>`:null}
|
|
46
47
|
${line.after?.defaultMaxFleets!==undefined?html`<p>${hr("quota")}: ${line.before?.defaultMaxFleets??"–"} → ${line.after.defaultMaxFleets}</p>`:null}
|
|
47
48
|
${line.after?.scope?html`<p>${hr("scope")}: ${line.before?.scope?scopeName(line.before.scope):"–"} → ${scopeName(line.after.scope)}</p>
|
|
48
|
-
${line.after.startsAt||line.before?.startsAt?html`<p>${hr("start")}: ${line.before?.startsAt?
|
|
49
|
-
<p>${hr("ends")}: ${line.before?.expiresAt?
|
|
49
|
+
${line.after.startsAt||line.before?.startsAt?html`<p>${hr("start")}: ${line.before?.startsAt?dateTimeText(line.before.startsAt):"–"} → ${line.after.startsAt?dateTimeText(line.after.startsAt):"–"}</p>`:null}
|
|
50
|
+
<p>${hr("ends")}: ${line.before?.expiresAt?dateTimeText(line.before.expiresAt):hr("noEnd")} → ${line.after.expiresAt?dateTimeText(line.after.expiresAt):hr("noEnd")}</p>
|
|
50
51
|
${line.after.maxFleets!==null||line.before?.maxFleets!=null?html`<p>${hr("override")}: ${line.before?.maxFleets??"–"} → ${line.after.maxFleets??"–"}</p>`:null}`:null}
|
|
51
52
|
${line.deleted?html`<p class="note">${hr("deleteAssignments",line.removedAssignments)}</p>`:null}</section>`)}
|
|
52
53
|
${!lines.length?html`<p>${hr("nothingChanged")}</p>`:null}
|
package/dist/ui/hub-role-view.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/** Display projections only. Policy keys, permissions and checked writes remain server-owned. */
|
|
2
2
|
import {hr} from "./hub-roles-strings.js";
|
|
3
|
+
import { dateTimeText } from "/assets/clock-text.js";
|
|
3
4
|
export const personKey=p=>`${p?.realm}/${p?.objectId}`;
|
|
4
5
|
export const management=["fleets.manage","join.manage","roles.assign","audit.view","hub.admin"];
|
|
5
6
|
export const permissionGroups=[{key:"usingHub",permissions:["ask_agents","publish_agents","pair_fleet"]},{key:"theirTeam",permissions:["team.view","team.usage"]},{key:"runningHub",permissions:["fleets.manage","join.manage","roles.assign","audit.view"]}];
|
|
@@ -73,8 +74,8 @@ export function valueLines(value){
|
|
|
73
74
|
if(value.permissions)lines.push(value.permissions.map(p=>hr(p)).join(" · "));
|
|
74
75
|
if(value.defaultMaxFleets!==undefined)lines.push(`${hr("quota")}: ${value.defaultMaxFleets}`);
|
|
75
76
|
if(value.subject)lines.push(value.subject.name||hr("unknownPerson"));if(value.scope)lines.push(scopeName(value.scope));
|
|
76
|
-
if(value.startsAt)lines.push(`${hr("start")}: ${
|
|
77
|
-
if(value.expiresAt!==undefined)lines.push(`${hr("ends")}: ${value.expiresAt?
|
|
77
|
+
if(value.startsAt)lines.push(`${hr("start")}: ${dateTimeText(value.startsAt)}`);
|
|
78
|
+
if(value.expiresAt!==undefined)lines.push(`${hr("ends")}: ${value.expiresAt?dateTimeText(value.expiresAt):hr("noEnd")}`);
|
|
78
79
|
if(value.maxFleets!=null)lines.push(`${hr("override")}: ${value.maxFleets}`);
|
|
79
80
|
if(value.rolesActive!==undefined)lines.push(hr(value.rolesActive?"on":"off"));
|
|
80
81
|
return lines;
|
package/dist/ui/hub-roles.js
CHANGED
|
@@ -5,6 +5,7 @@ import {hr,linkRoleCss} from "./hub-roles-strings.js";
|
|
|
5
5
|
import {RoleWizard,AssignPanel,PermissionSections,Review} from "./hub-role-forms.js";
|
|
6
6
|
import {RoleAudit} from "./hub-role-audit.js";
|
|
7
7
|
import {personKey,personName,roleName,roleDescription,assignedSubjects,assignmentCount,subjectId,scopeName,roleError} from "./hub-role-view.js";
|
|
8
|
+
import { dateTimeText } from "/assets/clock-text.js";
|
|
8
9
|
const copy=value=>structuredClone(value);
|
|
9
10
|
function Tabs({items,value,onChange,disabled=false,label}){
|
|
10
11
|
return html`<div class="hub-role-tabs" role="tablist" aria-label=${label}>${items.map(item=>html`<button key=${item.key} type="button" role="tab" tabindex=${item.key===value?0:-1} onKeyDown=${e=>{const at=items.findIndex(row=>row.key===value),keys={ArrowRight:(at+1)%items.length,ArrowLeft:(at+items.length-1)%items.length,Home:0,End:items.length-1};if(Object.hasOwn(keys,e.key)){e.preventDefault();const next=keys[e.key];onChange(items[next].key);(e.currentTarget||e.target).parentNode.querySelectorAll('[role="tab"]')[next]?.focus();}}} aria-selected=${item.key===value} class=${item.key===value?"is-active":""} disabled=${disabled} onClick=${()=>onChange(item.key)}>${item.label}</button>`)}</div>`;
|
|
@@ -27,7 +28,7 @@ function PersonRoles({view,subject,busy,onBack,onEdit,onRemove}){
|
|
|
27
28
|
const row=assignedSubjects(view).find(row=>row.id===subjectId(subject)),own=subject.kind==="person"&&personKey(subject.person)===personKey(view.actor),canAssign=view.management.includes("roles.assign");
|
|
28
29
|
return html`<section class="card hub-role-person"><button type="button" class="btn btn-sm" disabled=${busy} onClick=${onBack}>‹ ${hr("people")}</button><h2>${row?.name||hr("unknownPerson")}${own?html` <span class="tag">${hr("you")}</span>`:null}</h2>${own?html`<p class="s-info">${hr("selfHelp")}</p>`:null}
|
|
29
30
|
<ul class="hub-rows">${row?.fixed?html`<li class="s-row hub-row"><span class="hub-row-text"><strong>${hr("admin")}</strong><small class="note">${hr("firstAdminHelp")}</small></span></li>`:null}
|
|
30
|
-
${row?.assignments.map(a=>html`<li class="s-row hub-row" key=${a.id}><span class="hub-row-text"><strong>${roleName(view.policy.roles.find(r=>r.id===a.roleId),view)}</strong><small class="note">${scopeName(a.scope)} · ${a.expiresAt?
|
|
31
|
+
${row?.assignments.map(a=>html`<li class="s-row hub-row" key=${a.id}><span class="hub-row-text"><strong>${roleName(view.policy.roles.find(r=>r.id===a.roleId),view)}</strong><small class="note">${scopeName(a.scope)} · ${a.expiresAt?dateTimeText(a.expiresAt):hr("noEnd")}</small></span>
|
|
31
32
|
${canAssign?html`<div class="s-actions"><button type="button" class="btn btn-sm" disabled=${busy||own} onClick=${()=>onEdit(a)}>${hr("edit")}</button><button type="button" class="btn btn-sm danger" disabled=${busy||own} onClick=${()=>onRemove(a)}>${hr("remove")}</button></div>`:null}</li>`)}</ul></section>`;
|
|
32
33
|
}
|
|
33
34
|
function RolePage({view,role,busy,canEdit,canAssign,onBack,onAssign,onEdit,onDelete,onPerson}){
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// M-3118: independent namespace so a cached room dictionary can still render new stop events.
|
|
2
2
|
import { register, t, lang } from "/assets/app-i18n.js";
|
|
3
|
+
import { timeText } from "/assets/clock-text.js";
|
|
3
4
|
register("hubRoomAgent", {
|
|
4
5
|
en: {
|
|
5
6
|
all: "Agents can't use @All agents. This message was not sent to other agents.",
|
|
@@ -23,6 +24,6 @@ export function agentStopText(system) {
|
|
|
23
24
|
if (!system || !["all", "ambiguous", "depth", "rate", "capacity"].includes(system.reason)) return null;
|
|
24
25
|
if (system.reason !== "rate") return hra(system.reason, String(system.name || ""));
|
|
25
26
|
if (!Number.isSafeInteger(system.retryAt) || system.retryAt < 0) return null;
|
|
26
|
-
const time =
|
|
27
|
+
const time = timeText(Math.ceil(system.retryAt / 60_000) * 60_000, { hour: "2-digit", minute: "2-digit" }, lang());
|
|
27
28
|
return hra("rate", String(system.name || ""), time);
|
|
28
29
|
}
|
package/dist/ui/hub-room-list.js
CHANGED
|
@@ -17,6 +17,7 @@ import { Menu } from "/assets/ui-menu.js";
|
|
|
17
17
|
import { Icon } from "/assets/ui-icons.js";
|
|
18
18
|
import "./hub-room-strings.js";
|
|
19
19
|
import { presenceDot } from "./hub-room-presence.js";
|
|
20
|
+
import { timeText } from "/assets/clock-text.js";
|
|
20
21
|
|
|
21
22
|
const tr = (key, ...a) => t(`hubRoom.${key}`, ...a);
|
|
22
23
|
/** The Fleet sidebar's own words for favourites (view.*, with named values; agentRow.*): no Hub copy of them. */
|
|
@@ -90,7 +91,7 @@ export function rowView(r) {
|
|
|
90
91
|
const listTime = (ms) => {
|
|
91
92
|
if (!ms) return "";
|
|
92
93
|
const d = new Date(ms), now = new Date();
|
|
93
|
-
return d.toDateString() === now.toDateString() ? d
|
|
94
|
+
return d.toDateString() === now.toDateString() ? timeText(d, { hour: "2-digit", minute: "2-digit" }) : d.toLocaleDateString(undefined, { month: "numeric", day: "numeric" });
|
|
94
95
|
};
|
|
95
96
|
|
|
96
97
|
/**
|
|
@@ -9,7 +9,7 @@ import { lang } from "/assets/app-i18n.js";
|
|
|
9
9
|
import { createLease } from "/assets/app-ctx.js";
|
|
10
10
|
import { Skeleton, ErrorState } from "/assets/ui-states.js";
|
|
11
11
|
import { hroom } from "./hub-room-strings.js";
|
|
12
|
-
import { agentPictureSrc, presenceView } from "./hub-room-presence.js";
|
|
12
|
+
import { agentCharacterSrc, agentPictureSrc, presenceView } from "./hub-room-presence.js";
|
|
13
13
|
|
|
14
14
|
/** How often a shown office is read again (the share page's POLL_MS). */
|
|
15
15
|
export const ROOM_OFFICE_POLL_MS = 5000;
|
|
@@ -33,6 +33,73 @@ const safeKey = (name) => (RESERVED(name) ? `\u2060${name}` : name);
|
|
|
33
33
|
const clip = (text, n) => { const c = [...text]; return c.length > n ? `${c.slice(0, n - 1).join("")}…` : text; };
|
|
34
34
|
const STORAGE_PREFIX = "agend_hub_room_office:";
|
|
35
35
|
|
|
36
|
+
/**
|
|
37
|
+
* M-3533 R2c: an agent's own character in a room office is fitted into the built-in figure's box (fleet-office-skin.js
|
|
38
|
+
* charBox: 48 × 66), kept in proportion, never larger — one scale for everyone in the room (Lumen's choice, B, over the
|
|
39
|
+
* pack's own scale: at 64 × 96 a robot stood twice a figure's height and crossed its area's edge and name). Its feet stay
|
|
40
|
+
* on the seat, as a figure's. Drawn unsmoothed, as the Fleet office draws every strip.
|
|
41
|
+
*/
|
|
42
|
+
export const CHARACTER_FIT = { w: 48, h: 66 };
|
|
43
|
+
/**
|
|
44
|
+
* An agent's character as the drawing takes it (a checked pack's strips, fleet-office-pack.js), its pictures at `src(pose,
|
|
45
|
+
* hash)`, each fitted into CHARACTER_FIT; null when it has none or a strip is not a well-formed one.
|
|
46
|
+
*/
|
|
47
|
+
export function characterSet(character, src) {
|
|
48
|
+
if (!character || typeof character !== "object") return null;
|
|
49
|
+
const out = {};
|
|
50
|
+
for (const [pose, st] of Object.entries(character)) {
|
|
51
|
+
const url = st && src(pose, st.sha256);
|
|
52
|
+
const nums = st && ["frames", "w", "h", "fps", "ax", "ay", "dw", "dh"].every((k) => typeof st[k] === "number" && Number.isFinite(st[k]));
|
|
53
|
+
if (!url || !nums || !(st.frames >= 1 && st.dw > 0 && st.dh > 0)) return null;
|
|
54
|
+
const k = Math.min(1, CHARACTER_FIT.w / st.dw, CHARACTER_FIT.h / st.dh);
|
|
55
|
+
out[pose] = { src: url, frames: st.frames, w: st.w, h: st.h, fps: st.fps, ax: st.ax, ay: st.ay, dw: st.dw * k, dh: st.dh * k,
|
|
56
|
+
...(Array.isArray(st.durations) ? { durations: st.durations } : {}), ...(st.once === true ? { once: true } : {}), ...(typeof st.loopFrom === "number" ? { loopFrom: st.loopFrom } : {}) };
|
|
57
|
+
}
|
|
58
|
+
return Object.keys(out).length ? out : null;
|
|
59
|
+
}
|
|
60
|
+
/** A picture loaded for the drawing (an Image once it has loaded; null if it fails). */
|
|
61
|
+
const loadImage = (url) => new Promise((resolve) => {
|
|
62
|
+
if (typeof Image !== "function") { resolve(null); return; }
|
|
63
|
+
const im = new Image();
|
|
64
|
+
im.onload = () => resolve(im); im.onerror = () => resolve(null);
|
|
65
|
+
im.src = url;
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* M-3533 R2c: the room's agents' own characters, each drawn only once all its pictures have loaded (an agent is drawn wholly
|
|
70
|
+
* with its set or wholly as the figure). `instances` the drawing's (named), `load` an image loader (tests).
|
|
71
|
+
*/
|
|
72
|
+
export function useCharacters(roomId, instances, load = loadImage) {
|
|
73
|
+
const [images, setImages] = useState(() => new Map());
|
|
74
|
+
const wanted = useMemo(() => {
|
|
75
|
+
const sets = new Map();
|
|
76
|
+
for (const i of Array.isArray(instances) ? instances : []) {
|
|
77
|
+
const set = i && i.member ? characterSet(i.character, (pose, hash) => agentCharacterSrc(roomId, i.member, pose, hash)) : null;
|
|
78
|
+
if (set) sets.set(i.name, set);
|
|
79
|
+
}
|
|
80
|
+
return sets;
|
|
81
|
+
}, [roomId, instances]);
|
|
82
|
+
const urls = useMemo(() => [...new Set([...wanted.values()].flatMap((set) => Object.values(set).map((st) => st.src)))].sort(), [wanted]);
|
|
83
|
+
useEffect(() => {
|
|
84
|
+
let live = true;
|
|
85
|
+
const missing = urls.filter((u) => !images.has(u));
|
|
86
|
+
for (const u of missing) load(u).then((im) => { if (live) setImages((m) => new Map(m).set(u, im)); });
|
|
87
|
+
return () => { live = false; };
|
|
88
|
+
}, [urls.join("\n")]);
|
|
89
|
+
// Each read of the room makes new objects: the drawing gets a new skin only when the characters themselves change.
|
|
90
|
+
const sig = JSON.stringify([...wanted]);
|
|
91
|
+
return useMemo(() => {
|
|
92
|
+
const sets = Object.create(null), ready = new Map();
|
|
93
|
+
for (const [name, set] of wanted) {
|
|
94
|
+
const strips = Object.values(set);
|
|
95
|
+
if (!strips.every((st) => images.get(st.src))) continue;
|
|
96
|
+
sets[name] = set;
|
|
97
|
+
for (const st of strips) ready.set(st.src, images.get(st.src));
|
|
98
|
+
}
|
|
99
|
+
return Object.keys(sets).length ? { sets, images: ready } : null;
|
|
100
|
+
}, [sig, images]);
|
|
101
|
+
}
|
|
102
|
+
|
|
36
103
|
/** The Office drawing, loaded once on first use (the Hub serves it; a fleet page has it already). */
|
|
37
104
|
let drawing = null;
|
|
38
105
|
export const loadDrawing = () => (drawing ??= Promise.all([import("./fleet-office.js"), import("./fleet-org.js")])
|
|
@@ -175,6 +242,7 @@ export function RoomOffice({ client, roomId, members, onMention = null, onOpenCh
|
|
|
175
242
|
}, [lease, attempt]);
|
|
176
243
|
const shown = useMemo(() => (d ? named(d, members) : null), [d, members]);
|
|
177
244
|
holder.d = shown;
|
|
245
|
+
const characters = useCharacters(roomId, shown?.instances);
|
|
178
246
|
const view = useMemo(() => (kit && shown ? kit.buildOrgView(shown.org, officeApp(shown)) : null), [kit, shown]);
|
|
179
247
|
const memberOf = (name) => {
|
|
180
248
|
const id = shown?.instances.find((i) => i.name === name)?.member;
|
|
@@ -198,6 +266,6 @@ export function RoomOffice({ client, roomId, members, onMention = null, onOpenCh
|
|
|
198
266
|
...(onOpenChat && m.canAsk === true ? [{ label: hroom("chatOneToOneShort"), title: hroom("chatOneToOne"), run: () => onOpenChat(m) }] : [])];
|
|
199
267
|
return acts.length > 1 ? acts : acts[0] || null; } : null}
|
|
200
268
|
cardPhoto=${(name) => { const i = shown.instances.find((x) => x.name === name); return i?.member ? agentPictureSrc(roomId, i.member, "portrait", i.picture?.portrait) : null; }}
|
|
201
|
-
foldBar=${true} more=${more} onMore=${onMore} officesKey=${`${shown.offices?.offices?.[0]?.skin ?? ""}\n${shown.offices?.offices?.[0]?.members?.join("\n") ?? ""}`} />
|
|
269
|
+
foldBar=${true} more=${more} onMore=${onMore} characters=${characters} officesKey=${`${shown.offices?.offices?.[0]?.skin ?? ""}\n${shown.offices?.offices?.[0]?.members?.join("\n") ?? ""}`} />
|
|
202
270
|
</div>`;
|
|
203
271
|
}
|
|
@@ -3,12 +3,13 @@ import { Dialog } from "/assets/ui-dialog.js";
|
|
|
3
3
|
import { RoomPicker } from "./hub-room-new.js";
|
|
4
4
|
import { hrq } from "./hub-room-owner-requests-strings.js";
|
|
5
5
|
import { hn } from "./hub-room-new-strings.js";
|
|
6
|
+
import { dateTimeText } from "/assets/clock-text.js";
|
|
6
7
|
|
|
7
8
|
export function ownerRequestError(result, owner) {
|
|
8
9
|
if (result?.code === "owner-not-taking-requests") return hrq("ownerOff", owner);
|
|
9
10
|
if (result?.code === "request-open") return hrq("already", owner);
|
|
10
11
|
if (result?.code === "request-limit" && Number.isSafeInteger(result.resetsAt) && result.resetsAt > 0 && result.resetsAt <= 8.64e15) {
|
|
11
|
-
const time =
|
|
12
|
+
const time = dateTimeText(result.resetsAt, { month: "numeric", day: "numeric", hour: "2-digit", minute: "2-digit" });
|
|
12
13
|
return hrq("limit", time);
|
|
13
14
|
}
|
|
14
15
|
return hrq("failed");
|
package/dist/ui/hub-room-pins.js
CHANGED
|
@@ -9,11 +9,12 @@ import { lang, t } from "/assets/app-i18n.js";
|
|
|
9
9
|
import { Dialog } from "/assets/ui-dialog.js";
|
|
10
10
|
import { Icon } from "/assets/ui-icons.js";
|
|
11
11
|
import { hroom } from "./hub-room-strings.js";
|
|
12
|
+
import { dateTimeText } from "/assets/clock-text.js";
|
|
12
13
|
|
|
13
14
|
/** The Hub's limit per person per room (src/hub/rooms/service.ts ROOM_PINS_MAX). */
|
|
14
15
|
export const ROOM_PINS_MAX = 50;
|
|
15
16
|
|
|
16
|
-
const when = (ms) => { const d = new Date(ms); return Number.isFinite(d.getTime()) ? d
|
|
17
|
+
const when = (ms) => { const d = new Date(ms); return Number.isFinite(d.getTime()) ? dateTimeText(d, { dateStyle: "medium", timeStyle: "short" }, lang()) : ""; };
|
|
17
18
|
const snippet = (s, n = 40) => { const one = String(s || "").replace(/\s+/g, " ").trim(); return one.length > n ? `${one.slice(0, n - 1)}…` : one; };
|
|
18
19
|
const textOf = (m) => String(m?.text || "");
|
|
19
20
|
const filesOf = (m) => (Array.isArray(m?.files) ? m.files.map((f) => f && f.name).filter(Boolean) : []);
|
|
@@ -133,3 +133,8 @@ export function agentPictureSrc(roomId, exposureId, slot, hash) {
|
|
|
133
133
|
return roomId && exposureId && typeof hash === "string" && /^[a-f0-9]{64}$/.test(hash)
|
|
134
134
|
? `/hub/v1/rooms/${encodeURIComponent(roomId)}/agents/${encodeURIComponent(exposureId)}/picture/${slot}?v=${hash}` : null;
|
|
135
135
|
}
|
|
136
|
+
/** M-3533 R2c: one pose of an agent's own character in this room (its strip's picture), as agentPictureSrc; null when none. */
|
|
137
|
+
export function agentCharacterSrc(roomId, exposureId, pose, hash) {
|
|
138
|
+
return roomId && exposureId && typeof pose === "string" && /^[A-Za-z]{1,16}$/.test(pose) && typeof hash === "string" && /^[a-f0-9]{64}$/.test(hash)
|
|
139
|
+
? `/hub/v1/rooms/${encodeURIComponent(roomId)}/agents/${encodeURIComponent(exposureId)}/character/${pose}?v=${hash}` : null;
|
|
140
|
+
}
|
|
@@ -40,7 +40,7 @@ register("hubRoom", {
|
|
|
40
40
|
searchResults: "Results", searchRooms: "Rooms and chats", searchBadgeRoom: "Room", searchBadgeChat: "Chat", searchCount: "{0} results",
|
|
41
41
|
searchOlder: "Search older messages", searchKeys: "↑↓ move · Enter open · Esc close", jumpMissing: "That message is no longer in this room.",
|
|
42
42
|
filterPh: "Filter: name or owner", filterClear: "Clear the filter",
|
|
43
|
-
laterAnswer: "{0} ({1}) · answers after they come online", noAnswer: "No answer", noAnswerReshare: "This agent is unavailable right now. Its owner needs to share it again.", noAnswerUnanswered:"No answer: The agent finished without answering here", noAnswerStopped: "No answer: {0} stopped sharing this agent.",
|
|
43
|
+
laterAnswer: "{0} ({1}) · answers after they come online", noAnswer: "No answer", noAnswerReshare: "This agent is unavailable right now. Its owner needs to share it again.", noAnswerUnanswered:"No answer: The agent finished without answering here", noAnswerDeclined: "The owner chose not to answer this question.", noAnswerStopped: "No answer: {0} stopped sharing this agent.",
|
|
44
44
|
workingOne: "{0} is working on it", workingMany: "{0} agents are working",
|
|
45
45
|
waitBehindOne: "Waiting: {0} is answering another question first", waitBehindMany: "Waiting: {0} has {1} questions to answer first",
|
|
46
46
|
waitBusy: "Waiting: {0} is busy with other work", waitPaused: "Waiting: {0} is paused; it gets your question when it resumes",
|
|
@@ -197,7 +197,7 @@ register("hubRoom", {
|
|
|
197
197
|
searchResults: "結果", searchRooms: "房間與聊天", searchBadgeRoom: "房間", searchBadgeChat: "聊天", searchCount: "{0} 筆結果",
|
|
198
198
|
searchOlder: "搜尋更早的訊息", searchKeys: "↑↓ 移動 · Enter 開啟 · Esc 關閉", jumpMissing: "這則訊息已不在這個房間裡。",
|
|
199
199
|
filterPh: "篩選:名稱或擁有者", filterClear: "清除篩選",
|
|
200
|
-
laterAnswer: "{0}({1})· 上線後回答", noAnswer: "沒有回答", noAnswerReshare: "這個 Agent 暫時無法回答,擁有者需要重新分享。", noAnswerUnanswered:"沒有回答:Agent 已結束處理,但沒有在這裡回答。", noAnswerStopped: "沒有回答:{0} 已停止分享這個 Agent。",
|
|
200
|
+
laterAnswer: "{0}({1})· 上線後回答", noAnswer: "沒有回答", noAnswerReshare: "這個 Agent 暫時無法回答,擁有者需要重新分享。", noAnswerUnanswered:"沒有回答:Agent 已結束處理,但沒有在這裡回答。", noAnswerDeclined: "擁有者決定不處理這題。", noAnswerStopped: "沒有回答:{0} 已停止分享這個 Agent。",
|
|
201
201
|
workingOne: "{0} 正在處理", workingMany: "{0} 個 Agent 正在處理",
|
|
202
202
|
waitBehindOne: "等待中:{0} 正在先回答另一個問題", waitBehindMany: "等待中:{0} 前面還有 {1} 個問題",
|
|
203
203
|
waitBusy: "等待中:{0} 正在處理其他工作", waitPaused: "等待中:{0} 已暫停,恢復後會收到你的問題",
|
|
@@ -211,7 +211,7 @@ export function toThreadMessages(messages, { meId, ids, direct = false, expanded
|
|
|
211
211
|
...(!direct && Array.isArray(m.reactions) && m.reactions.length ? { reactionBar: reactionBar(m.reactions, { meId, names }) } : {}),
|
|
212
212
|
...(!direct && kind !== "person" && m.buttons ? { buttons: roomButtons(m.buttons, meId) } : {}),
|
|
213
213
|
...(quotedId ? { replyTo: { boot: BOOT, id: num(quotedId), sender: quoted ? authorLine(quoted.author, quoted.author?.id === meId, direct) : "", text: quoted ? String(quoted.text || "").slice(0, 120) : "" } } : {}),
|
|
214
|
-
...(m.stage === "not-answered" && !(kind === "person" && m.reasonCode === "share-needs-reshare") ? { text: m.reasonCode === "share-needs-reshare" ? hroom("noAnswerReshare") : m.reasonCode === "owner-stopped-sharing" ? hroom("noAnswerStopped", author.owner?.name || "") : m.reasonCode==="finished-without-answer"?hroom("noAnswerUnanswered"):hroom("noAnswer") } : {}) });
|
|
214
|
+
...(m.stage === "not-answered" && !(kind === "person" && m.reasonCode === "share-needs-reshare") ? { text: m.reasonCode === "owner-declined" ? hroom("noAnswerDeclined") : m.reasonCode === "share-needs-reshare" ? hroom("noAnswerReshare") : m.reasonCode === "owner-stopped-sharing" ? hroom("noAnswerStopped", author.owner?.name || "") : m.reasonCode==="finished-without-answer"?hroom("noAnswerUnanswered"):hroom("noAnswer") } : {}) });
|
|
215
215
|
if (kind === "person" && m.stage === "not-answered" && m.reasonCode === "share-needs-reshare")
|
|
216
216
|
out.push({ boot: BOOT, id: num(`unavailable:${m.id}`), role: "status", sender: "", text: hroom("noAnswerReshare"), bare: true, wrap: true });
|
|
217
217
|
if (foldAfter) out.push({ boot: BOOT, id: num(`expand:${foldAfter.arg}`), role: "status", sender: "", text: "", bare: true, fold: true, action: foldAfter });
|
package/dist/ui/log-row.js
CHANGED
|
@@ -7,6 +7,7 @@ import { register, t } from "/assets/app-i18n.js";
|
|
|
7
7
|
import { Icon } from "/assets/ui-icons.js";
|
|
8
8
|
import "/assets/chat-strings.js";
|
|
9
9
|
import { chatTime, chatTimeFull } from "/assets/chat-time.js";
|
|
10
|
+
import { unitText } from "/assets/clock-text.js";
|
|
10
11
|
|
|
11
12
|
register("log", {
|
|
12
13
|
en: {
|
|
@@ -129,11 +130,11 @@ function size(bytes) {
|
|
|
129
130
|
}
|
|
130
131
|
function duration(ms) {
|
|
131
132
|
if (!(ms >= 0)) return "";
|
|
132
|
-
if (ms < 1000) return
|
|
133
|
+
if (ms < 1000) return unitText(ms, "ms");
|
|
133
134
|
const s = ms / 1000;
|
|
134
|
-
if (s < 60) return
|
|
135
|
+
if (s < 60) return unitText(s < 10 ? s.toFixed(1) : Math.round(s), "s");
|
|
135
136
|
const m = Math.floor(s / 60);
|
|
136
|
-
return `${m
|
|
137
|
+
return `${unitText(m, "m")} ${unitText(Math.round(s - m * 60), "s")}`;
|
|
137
138
|
}
|
|
138
139
|
const eventLabel = (type) => { const k = `log.ev_${type}`; const v = t(k); return v === k ? String(type).replace(/_/g, " ") : v; };
|
|
139
140
|
|
|
@@ -10,6 +10,7 @@ import { html, useEffect, useState } from "/assets/app-html.js";
|
|
|
10
10
|
import { t, register } from "/assets/app-i18n.js";
|
|
11
11
|
import { Dialog } from "/assets/ui-dialog.js";
|
|
12
12
|
import { toast } from "/assets/ui-toast.js";
|
|
13
|
+
import { clockFormat } from "/assets/clock-text.js";
|
|
13
14
|
|
|
14
15
|
register("oshare", {
|
|
15
16
|
en: {
|
|
@@ -40,7 +41,7 @@ register("oshare", {
|
|
|
40
41
|
const to = (k, ...v) => t(`oshare.${k}`, ...v);
|
|
41
42
|
const DURATIONS = [["m15", 15], ["m30", 30], ["h1", 60], ["h2", 120], ["h4", 240], ["h8", 480], ["h24", 1440]];
|
|
42
43
|
const JSON_HEADERS = { "Content-Type": "application/json" };
|
|
43
|
-
const when = (ms) => { try { return
|
|
44
|
+
const when = (ms) => { try { return clockFormat({ month: "short", day: "numeric", hour: "2-digit", minute: "2-digit" }, undefined).format(new Date(ms)); } catch { return ""; } };
|
|
44
45
|
|
|
45
46
|
/** What a refusal says (the host's `error` and `reason`). */
|
|
46
47
|
export function refusalText(d) {
|
|
@@ -12,6 +12,7 @@ import { buildOrgView } from "./fleet-org.js";
|
|
|
12
12
|
import { createTrafficStore, POLL_MS } from "./fleet-traffic.js";
|
|
13
13
|
import { Office } from "./fleet-office.js";
|
|
14
14
|
import { ALL_ID } from "./fleet-office-overview.js";
|
|
15
|
+
import { clockFormat } from "/assets/clock-text.js";
|
|
15
16
|
|
|
16
17
|
register("share", {
|
|
17
18
|
en: { title: "Office", live: "Live view", ends: "until {0}", readOnly: "Read-only: names and states only.", ended: "This Office link has ended.", loading: "Loading the office…", offline: "Can't reach the office right now. Trying again…" },
|
|
@@ -111,7 +112,7 @@ export function appFromState(d) {
|
|
|
111
112
|
}
|
|
112
113
|
|
|
113
114
|
const clock = (ms) => {
|
|
114
|
-
try { return
|
|
115
|
+
try { return clockFormat({ hour: "2-digit", minute: "2-digit" }, undefined).format(new Date(ms)); } catch { return ""; }
|
|
115
116
|
};
|
|
116
117
|
|
|
117
118
|
export function SharePage({ base, timers = globalThis, pollMs = POLL_MS }) {
|
|
@@ -8,6 +8,7 @@ import { html, useEffect, useState } from "/assets/app-html.js";
|
|
|
8
8
|
import { t, register } from "/assets/app-i18n.js";
|
|
9
9
|
import { Dialog } from "/assets/ui-dialog.js";
|
|
10
10
|
import { toast } from "/assets/ui-toast.js";
|
|
11
|
+
import { clockFormat } from "/assets/clock-text.js";
|
|
11
12
|
|
|
12
13
|
register("pshare", {
|
|
13
14
|
en: {
|
|
@@ -56,10 +57,10 @@ register("pshare", {
|
|
|
56
57
|
const tp = (k, ...v) => t(`pshare.${k}`, ...v);
|
|
57
58
|
export const DURATIONS = [["m15", 15], ["h1", 60], ["h8", 480], ["h24", 1440]];
|
|
58
59
|
const JSON_HEADERS = { "Content-Type": "application/json" };
|
|
59
|
-
const when = (ms) => { try { return
|
|
60
|
+
const when = (ms) => { try { return clockFormat({ hour: "2-digit", minute: "2-digit" }, undefined).format(new Date(ms)); } catch { return ""; } };
|
|
60
61
|
/** The end of a share for the bar: the time today, with the day when it is not today (a share may last 24 h). */
|
|
61
62
|
const until = (ms) => { const d = new Date(ms), now = new Date(); return d.toDateString() === now.toDateString() ? when(ms) : whenLong(ms); };
|
|
62
|
-
const whenLong = (ms) => { try { return
|
|
63
|
+
const whenLong = (ms) => { try { return clockFormat({ month: "short", day: "numeric", hour: "2-digit", minute: "2-digit" }, undefined).format(new Date(ms)); } catch { return ""; } };
|
|
63
64
|
|
|
64
65
|
/** What a refusal says (the host's `error` and `reason`). */
|
|
65
66
|
export function refusalText(d) {
|
package/dist/ui/panel-chat.js
CHANGED
|
@@ -107,7 +107,7 @@ register("chatPhone", {
|
|
|
107
107
|
en: { goTo: "Go to", thisChat: "This chat", verifiedUntil: "Verified · speaks as you until {0}", needsToast: "{0} needs you", ctxHide: "Hide this for now" },
|
|
108
108
|
"zh-TW": { goTo: "前往", thisChat: "這個對話", verifiedUntil: "已驗證 · 以你的身分發言到 {0}", needsToast: "{0} 正在等你回應", ctxHide: "這次先不提醒" },
|
|
109
109
|
});
|
|
110
|
-
const untilClock = (ms) => { try { return
|
|
110
|
+
const untilClock = (ms) => { try { return timeText(ms, { hour: "2-digit", minute: "2-digit" }, []); } catch { return ""; } };
|
|
111
111
|
/** A Needs-you item's identity: its nonce, else its id, else what it says. */
|
|
112
112
|
const needKey = (item) => String(item?.nonce || item?.id || JSON.stringify(item || null));
|
|
113
113
|
/**
|
|
@@ -244,6 +244,7 @@ export function linkWorkBarCss(doc = typeof document !== "undefined" ? document
|
|
|
244
244
|
linkWorkBarCss();
|
|
245
245
|
|
|
246
246
|
import { activityDrawCtx, activityInfo, activityInfoStore, activityOffered, activityPrefs, composeActivity, mountActivity, observeActivity, setActivityOn, setActivityThinking } from "./chat-activity.js";
|
|
247
|
+
import { timeText } from "/assets/clock-text.js";
|
|
247
248
|
/** The composer's textarea (#2342: text put back into it is a step Ctrl+Z goes back from). */
|
|
248
249
|
const composers = new Map(); // agent → current mounted refs, never a retained thread's stale closure
|
|
249
250
|
const composerField = (name) => composers.get(name)?.input.current || null;
|
package/dist/ui/panel-details.js
CHANGED
|
@@ -36,6 +36,7 @@ import { AgentCategoryNav, AgentPageHead, AgentSettingsPanels, agentKind, catego
|
|
|
36
36
|
import { ContactPermissionsPanel } from "./contact-permissions.js";
|
|
37
37
|
import "./agent-page-strings.js";
|
|
38
38
|
import { pt } from "./agent-page-strings.js";
|
|
39
|
+
import { timeText } from "/assets/clock-text.js";
|
|
39
40
|
|
|
40
41
|
// Local registration also works when this lazy page is paired with retained string modules.
|
|
41
42
|
register("agentNavigation", { en: { backToChat: "Back to chat" }, "zh-TW": { backToChat: "回到聊天" } });
|
|
@@ -195,7 +196,7 @@ function DetailsView({ name, inst, navKey, exec, awaiting }) {
|
|
|
195
196
|
${loaded(d.instruction_files)}
|
|
196
197
|
<${InstanceBoardWork} name=${name} onOpen=${(id) => navigate(`/ui/fleet?card=${encodeURIComponent(id)}`)} />
|
|
197
198
|
<section class="card"><h3>${t("chat.dActivity")}</h3>${d.recent_activity?.length ? d.recent_activity.map((a, i) => html`<div key=${i} class="activity">
|
|
198
|
-
<span class="mono muted">${a.timestamp ?
|
|
199
|
+
<span class="mono muted">${a.timestamp ? timeText(`${a.timestamp.replace(" ", "T")}Z`, { hour: "2-digit", minute: "2-digit" }, []) : ""}</span>
|
|
199
200
|
<span class="ev">${a.event}</span> ${a.summary || ""}</div>`) : html`<p class="note">${t("chat.dNoActivity")}</p>`}</section>`;
|
|
200
201
|
}
|
|
201
202
|
const actions = items.filter((i) => i && ["start", "restart", "stop", "pause", "wake"].includes(i.key));
|
package/dist/ui/panel-fleet.js
CHANGED
|
@@ -24,6 +24,7 @@ import { ContactAuthorizations } from "./contact-authorizations.js";
|
|
|
24
24
|
import { Dialog } from "/assets/ui-dialog.js";
|
|
25
25
|
import { Empty, ErrorState, Skeleton } from "/assets/ui-states.js";
|
|
26
26
|
import { Icon } from "/assets/ui-icons.js";
|
|
27
|
+
import { TabIcon } from "./fleet-tab-icons.js";
|
|
27
28
|
import { toast } from "/assets/ui-toast.js";
|
|
28
29
|
import { confirmDialog } from "/assets/ui-confirm.js";
|
|
29
30
|
import { confirmedWrite, selfConfirmed } from "./settings-confirm.js";
|
|
@@ -33,6 +34,7 @@ import { CacheReport } from "./fleet-cache.js";
|
|
|
33
34
|
import { UsageTab } from "./fleet-usage.js";
|
|
34
35
|
import { BackendSelect, ModelSelect } from "./settings-dialogs.js";
|
|
35
36
|
import { TaskBoardTab } from "./fleet-tasks.js";
|
|
37
|
+
import { dateTimeText } from "/assets/clock-text.js";
|
|
36
38
|
|
|
37
39
|
/** #2015: one of the largest processes as text: "python3 18.1 GB (dev-a)". */
|
|
38
40
|
export function memoryHogText(p) {
|
|
@@ -77,9 +79,9 @@ register("fleet", {
|
|
|
77
79
|
hostMemory_top: "最大:{0}", hostMemory_ownerFleet: "fleet 本身", hostMemory_ownerTmux: "tmux", hostMemory_ownerOther: "不屬於任何 Agent",
|
|
78
80
|
title: "Fleet", tasks: "任務", schedules: "排程", teams: "團隊", org: "組織圖", cache: "快取", usage: "用量", "host-health": "主機狀態",
|
|
79
81
|
docs: "文件", docsNewTab: "文件(在新分頁開啟)",
|
|
80
|
-
newSchedule: "新增排程", newTeam: "
|
|
82
|
+
newSchedule: "新增排程", newTeam: "新增團隊",
|
|
81
83
|
noSchedules: "還沒有排程", noSchedulesHint: "用 cron 自動執行例行工作。",
|
|
82
|
-
noTeams: "
|
|
84
|
+
noTeams: "還沒有團隊", noTeamsHint: "把 Agent 分組一起工作。", countSchedules: "{0} 個排程", countTeams: "{0} 個團隊", countSchedule: "1 個排程", countTeam: "1 個團隊",
|
|
83
85
|
delete: "刪除", on: "開", off: "關", cancel: "取消", create: "建立", creating: "建立中…", save: "儲存變更",
|
|
84
86
|
taskDesc: "說明", cron: "Cron 表示式", message: "訊息", target: "目標 Agent", label: "標籤", teamName: "Team 名稱", members: "成員",
|
|
85
87
|
schedOnce: "一次 · {0}", schedNext: "下次 {0}", schedRetrying: "重試中", schedDisabled: "已停用", schedSilent: "靜默", schedTz: "時區:{0}",
|
|
@@ -89,9 +91,9 @@ register("fleet", {
|
|
|
89
91
|
cronEveryMinute: "每分鐘", cronEveryMinutes: "每 {0} 分鐘", cronEveryHours: "每 {0} 小時", cronDaily: "每天 {0}",
|
|
90
92
|
cronWeekdays: "每週一到五 {0}", cronDays: "每週{0} {1}", cronMonthly: "每月 {0} 日 {1}", dayNames: "日,一,二,三,四,五,六", dayJoin: "、",
|
|
91
93
|
scheduleFieldsRequired: "必須填寫 Cron、訊息與目標 Agent", teamFieldsRequired: "必須填寫名稱並選擇至少一名成員",
|
|
92
|
-
deleteSchedule: "確定刪除此排程嗎?", deleteTeam: "
|
|
93
|
-
teamCreated: "Team 已建立", teamDeleted: "Team 已刪除", teamUpdated: "Team 已更新", edit: "編輯", editTeam: "
|
|
94
|
-
teamNoRename: "
|
|
94
|
+
deleteSchedule: "確定刪除此排程嗎?", deleteTeam: "確定刪除團隊「{0}」嗎?", scheduleCreated: "排程已建立", scheduleDeleted: "排程已刪除",
|
|
95
|
+
teamCreated: "Team 已建立", teamDeleted: "Team 已刪除", teamUpdated: "Team 已更新", edit: "編輯", editTeam: "編輯團隊",
|
|
96
|
+
teamNoRename: "不支援重新命名:請建立新的團隊,再刪除這個。",
|
|
95
97
|
backend: "Backend",
|
|
96
98
|
newInstance: "新增 Agent", directory: "目錄", directoryHint: "可留空——留空會自動建立工作區", topic: "名稱", topicHint: "預設取自目錄名稱",
|
|
97
99
|
topicRequired: "目錄留空時必須填寫名稱", description: "說明", descriptionHint: "這個 Agent 做什麼", model: "模型", modelHint: "例如 sonnet、opus、gpt-5",
|
|
@@ -105,7 +107,8 @@ const DOCS_SITE = "https://songsid.github.io/AgEnD";
|
|
|
105
107
|
export function docsUrl(language = lang()) {
|
|
106
108
|
return `${DOCS_SITE}${language === "zh-TW" ? "/zh-tw" : ""}/docs/web-guide/`;
|
|
107
109
|
}
|
|
108
|
-
|
|
110
|
+
// M-3722: one icon each (a phone's tabs are icons only): Cache, Usage and Host health no longer share "chart" (fleet-tab-icons.js).
|
|
111
|
+
const ICONS = { tasks: "tasks", schedules: "clock", teams: "team", org: "org", cache: "database", usage: "gauge", authorizations: "key", "host-health": "pulse" };
|
|
109
112
|
const BACKENDS = ["claude-code", "codex", "opencode", "kiro-cli", "antigravity", "grok", "muse"];
|
|
110
113
|
|
|
111
114
|
async function api(method, path, body, lease) {
|
|
@@ -232,7 +235,7 @@ export function FleetPanel({ route, navKey }) {
|
|
|
232
235
|
else if (a.left < n.left) nav.scrollLeft -= n.left - a.left;
|
|
233
236
|
}, [phone, tab, admin, wide]);
|
|
234
237
|
const tabs = (cls) => html`<nav data-trust="panel-navigation" class=${cls} aria-label=${t("fleet.title")}>${visibleTabs.map(k => html`<a key=${k} href=${fleetPath(k)} class=${`seg-item${k === tab ? " active" : ""}`}
|
|
235
|
-
aria-current=${k === tab ? "page" : undefined}><${
|
|
238
|
+
aria-current=${k === tab ? "page" : undefined}><${TabIcon} name=${ICONS[k]} size=${16} /><span>${t(`fleet.${k}`)}</span></a>`)}</nav>`;
|
|
236
239
|
return html`<div ref=${root} data-effect-panel="fleet" class="panel p-fleet">
|
|
237
240
|
${/* M-2542: the tabs share the title row (PanelHeader's nav slot, as the instance tabs do) when everything fits
|
|
238
241
|
there (useTabsInHeader), saving a line; otherwise — a phone, a narrow window, a long host memory warning — they
|
|
@@ -240,8 +243,10 @@ export function FleetPanel({ route, navKey }) {
|
|
|
240
243
|
and chosen here rather than by CSS: a previous release's app.css, cached in an open tab, has no rule for the
|
|
241
244
|
header slot — this way either stylesheet lays both out (smoke-2542 SKEW). */ ""}
|
|
242
245
|
${/* M-3166 (Argon 5, the user's OK of round 2): a phone's Fleet is two rows — its tabs in the header's row (☰, then the
|
|
243
|
-
tabs; the title, search, docs and text size give way: app.css), then the page's own tools.
|
|
244
|
-
|
|
246
|
+
tabs; the title, search, docs and text size give way: app.css), then the page's own tools.
|
|
247
|
+
M-3722: eight tabs no longer fit beside ☰ at 390 px (Authorizations, Host health). On a phone the header is ☰ and
|
|
248
|
+
this page's name, then every tab as an icon, each a whole touch target (app.css): nothing scrolls off. */ ""}
|
|
249
|
+
<${PanelHeader} title=${phone && !wide ? t(`fleet.${tab}`) : t("fleet.title")} sub=${sub} nav=${wide ? tabs("fleet-tabs") : phone ? tabs("seg fleet-phone-tabs") : null}><${DocsLink} /><${HeaderTools} navKey=${navKey} /></${PanelHeader}>
|
|
245
250
|
${wide || phone ? null : tabs("seg fleet-tabs-row")}
|
|
246
251
|
<div data-trust="panel-content" class="panel-body"><div class=${`col${tab === "tasks" || tab === "org" || tab === "cache" || tab === "usage" || tab === "authorizations" || tab === "host-health" ? " col-wide" : ""}`}><${Body} lease=${lease} /></div></div>
|
|
247
252
|
</div>`;
|
|
@@ -622,7 +627,7 @@ export function CreateInstanceDialog({ onClose }) {
|
|
|
622
627
|
const cliLabel = productLabel(f.backend) || `${t("fleet.fleetDefault")} (${productLabel(defaultBackend)})`;
|
|
623
628
|
const backendField = windows ? html`<div class="field"><div class="cli-discovery-heading"><span>${tr("backend")}</span>${native && !machineId ? html`<button type="button" class="btn btn-ghost btn-sm" disabled=${discovery.loading} onClick=${discovery.refresh}><${Icon} name="restart" size=${14} />${detectionText("refresh")}</button>` : null}</div>
|
|
624
629
|
<div aria-busy=${!machineId && discovery.loading ? "true" : "false"}>${native ? html`<${CliPicker} label=${tr("backend")} value=${f.backend} choices=${nativeChoices} onChange=${value => { setCredentialProfile(""); setF(x => ({...x,backend:value,model:""})); }} disabled=${!nativeChoices.length || !!machineId && machine?.status !== "online"} />` : null}</div>
|
|
625
|
-
${machineId ? html`<p class="note">${tr(!nativeChoices.length ? "noRemoteCli" : "remotePolicy")}</p>${machine?.inventoryUpdatedAt ? html`<p class="note">${t("runtime.inventoryAt",
|
|
630
|
+
${machineId ? html`<p class="note">${tr(!nativeChoices.length ? "noRemoteCli" : "remotePolicy")}</p>${machine?.inventoryUpdatedAt ? html`<p class="note">${t("runtime.inventoryAt",dateTimeText(machine.inventoryUpdatedAt))}</p>` : null}` : html`<${WindowsCliDiscoveryStatus} state=${discovery} />`}
|
|
626
631
|
${!machineId && native && !discovery.loading && !discovery.error ? html`<p class="note">${!nativeChoices.length ? tr("noCli") : tr("nativeHint")}</p>` : null}
|
|
627
632
|
${machineId ? html`<${ClaudeAccountSelect} id="native-create-claude-account" machine=${machine} backend=${f.backend} value=${credentialProfile} onChange=${setCredentialProfile} disabled=${machine?.status !== "online"} />` : null}</div>`
|
|
628
633
|
: html`${field(tr("backend"),backends ? html`<${CliPicker} label=${tr("backend")} value=${f.backend} choices=${[{value:"",label:t("fleet.fleetDefault")},...backends.filter(b => backendState(b) !== "not_installed" && !b.deprecated).map(b => ({value:b.name,label:productLabel(b.name),disabled:backendBlocked(b),description:backendNote(b)}))]} onChange=${value => { setCredentialProfile(""); setF(x => ({...x,backend:value,model:""})); }} />` : html`<div role="status" aria-busy="true"><${Skeleton} lines=${1} /><span class="note">${tr("loadingClis")}</span></div>`)}${hostAccount ? html`<${AccountSelect} id="create-host-account" backend=${hostBackend} value=${credentialProfile} onChange=${setCredentialProfile} creating=${true} />` : null}`;
|