@songsid/agend 2.4.0-beta.24 → 2.4.0-beta.25
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/README.md +1 -1
- package/README.zh-TW.md +1 -1
- package/dist/agend-home.js +5 -5
- package/dist/agend-home.js.map +1 -1
- package/dist/agent-endpoint.js +10 -0
- package/dist/agent-endpoint.js.map +1 -1
- package/dist/agent-workspace.d.ts +18 -2
- package/dist/agent-workspace.js +15 -4
- package/dist/agent-workspace.js.map +1 -1
- package/dist/backend/antigravity.js +8 -6
- package/dist/backend/antigravity.js.map +1 -1
- package/dist/backend/claude-code.js +17 -0
- package/dist/backend/claude-code.js.map +1 -1
- package/dist/backend/claude-usage-credits.d.ts +8 -0
- package/dist/backend/claude-usage-credits.js +121 -0
- package/dist/backend/claude-usage-credits.js.map +1 -0
- package/dist/backend/types.d.ts +30 -0
- package/dist/backend/types.js.map +1 -1
- package/dist/build-provenance.json +1 -1
- package/dist/channel/adapters/discord.js +7 -1
- package/dist/channel/adapters/discord.js.map +1 -1
- package/dist/channel/tool-router.js +1 -0
- package/dist/channel/tool-router.js.map +1 -1
- package/dist/cli-audited.js +9 -4
- package/dist/cli-audited.js.map +1 -1
- package/dist/cli.js +184 -21
- package/dist/cli.js.map +1 -1
- package/dist/config-validator.js +11 -1
- package/dist/config-validator.js.map +1 -1
- package/dist/config.js +2 -0
- package/dist/config.js.map +1 -1
- package/dist/contact-auth-store.d.ts +18 -0
- package/dist/contact-auth-store.js +55 -8
- package/dist/contact-auth-store.js.map +1 -1
- package/dist/contact-auth-types.d.ts +3 -0
- package/dist/contact-auth-types.js.map +1 -1
- package/dist/contact-change-proposals.d.ts +34 -0
- package/dist/contact-change-proposals.js +1 -1
- package/dist/contact-change-proposals.js.map +1 -1
- package/dist/cross-instance-notice.d.ts +1 -0
- package/dist/cross-instance-notice.js +9 -8
- package/dist/cross-instance-notice.js.map +1 -1
- package/dist/daemon.d.ts +35 -0
- package/dist/daemon.js +234 -19
- package/dist/daemon.js.map +1 -1
- package/dist/delivery-outbox.d.ts +42 -1
- package/dist/delivery-outbox.js +194 -20
- package/dist/delivery-outbox.js.map +1 -1
- package/dist/fleet-context.d.ts +8 -0
- package/dist/fleet-lock.d.ts +67 -2
- package/dist/fleet-lock.js +236 -2
- package/dist/fleet-lock.js.map +1 -1
- package/dist/fleet-manager.d.ts +163 -6
- package/dist/fleet-manager.js +1136 -75
- package/dist/fleet-manager.js.map +1 -1
- package/dist/fleet-windows-runtime.d.ts +20 -1
- package/dist/fleet-windows-runtime.js +98 -18
- package/dist/fleet-windows-runtime.js.map +1 -1
- package/dist/general-knowledge/skills/cross-instance-messaging/SKILL.md +7 -0
- package/dist/general-knowledge/skills/web-dashboard/SKILL.md +14 -4
- package/dist/home-update-lock.d.ts +35 -0
- package/dist/home-update-lock.js +81 -0
- package/dist/home-update-lock.js.map +1 -0
- package/dist/hub/compose/member.d.ts +5 -1
- package/dist/hub/compose/member.js +9 -5
- package/dist/hub/compose/member.js.map +1 -1
- package/dist/hub/member/room-ask.d.ts +5 -0
- package/dist/hub/member/room-ask.js +43 -16
- package/dist/hub/member/room-ask.js.map +1 -1
- package/dist/hub/member/room-mention-feedback.d.ts +2 -0
- package/dist/hub/member/room-mention-feedback.js +1 -1
- package/dist/hub/member/room-mention-feedback.js.map +1 -1
- package/dist/hub/member/room-post-answers.d.ts +2 -0
- package/dist/hub/member/room-post-answers.js +1 -1
- package/dist/hub/member/room-post-answers.js.map +1 -1
- package/dist/hub/member/room-post.d.ts +5 -0
- package/dist/hub/member/room-post.js +4 -1
- package/dist/hub/member/room-post.js.map +1 -1
- package/dist/hub/member/updates.d.ts +7 -1
- package/dist/hub/member/updates.js +7 -1
- package/dist/hub/member/updates.js.map +1 -1
- package/dist/hub/representative.d.ts +7 -0
- package/dist/hub/representative.js +38 -5
- package/dist/hub/representative.js.map +1 -1
- package/dist/install-lock.d.ts +15 -1
- package/dist/install-lock.js +16 -8
- package/dist/install-lock.js.map +1 -1
- package/dist/install-ownership.d.ts +165 -0
- package/dist/install-ownership.js +404 -0
- package/dist/install-ownership.js.map +1 -0
- package/dist/instance-config-impact.js +2 -0
- package/dist/instance-config-impact.js.map +1 -1
- package/dist/instructions.d.ts +4 -0
- package/dist/instructions.js +4 -0
- package/dist/instructions.js.map +1 -1
- package/dist/local-pane-endpoint.d.ts +4 -1
- package/dist/local-pane-endpoint.js +12 -2
- package/dist/local-pane-endpoint.js.map +1 -1
- package/dist/locale.js +160 -4
- package/dist/locale.js.map +1 -1
- package/dist/native-agent-admission.d.ts +7 -0
- package/dist/native-agent-admission.js +46 -3
- package/dist/native-agent-admission.js.map +1 -1
- package/dist/native-mcp.d.ts +16 -1
- package/dist/native-mcp.js +38 -5
- package/dist/native-mcp.js.map +1 -1
- package/dist/native-pane-lifecycle.d.ts +9 -0
- package/dist/native-pane-lifecycle.js +23 -0
- package/dist/native-pane-lifecycle.js.map +1 -1
- package/dist/native-pane-manager.d.ts +19 -6
- package/dist/native-pane-manager.js +79 -4
- package/dist/native-pane-manager.js.map +1 -1
- package/dist/needs-you.d.ts +8 -0
- package/dist/needs-you.js +1 -0
- package/dist/needs-you.js.map +1 -1
- package/dist/outbound-handlers.d.ts +12 -0
- package/dist/outbound-handlers.js +30 -2
- package/dist/outbound-handlers.js.map +1 -1
- package/dist/package-preimage.js +4 -0
- package/dist/package-preimage.js.map +1 -1
- package/dist/pane-port.d.ts +1 -0
- package/dist/plist-args.d.ts +9 -0
- package/dist/plist-args.js +22 -0
- package/dist/plist-args.js.map +1 -0
- package/dist/public-preview.d.ts +4 -6
- package/dist/public-preview.js +5 -2
- package/dist/public-preview.js.map +1 -1
- package/dist/public-web-gateway.js +8 -3
- package/dist/public-web-gateway.js.map +1 -1
- package/dist/public-web-link.d.ts +13 -1
- package/dist/public-web-link.js +28 -1
- package/dist/public-web-link.js.map +1 -1
- package/dist/recover.cjs +2452 -0
- package/dist/remote-card-prompt.d.ts +6 -2
- package/dist/remote-card-prompt.js +12 -3
- package/dist/remote-card-prompt.js.map +1 -1
- package/dist/reply-draft.d.ts +12 -0
- package/dist/reply-draft.js +81 -0
- package/dist/reply-draft.js.map +1 -0
- package/dist/request-contact-api.d.ts +15 -0
- package/dist/request-contact-api.js +120 -0
- package/dist/request-contact-api.js.map +1 -0
- package/dist/request-contact-card.d.ts +36 -0
- package/dist/request-contact-card.js +206 -0
- package/dist/request-contact-card.js.map +1 -0
- package/dist/request-contact-gate.d.ts +79 -0
- package/dist/request-contact-gate.js +262 -0
- package/dist/request-contact-gate.js.map +1 -0
- package/dist/request-contact-native.d.ts +52 -0
- package/dist/request-contact-native.js +83 -0
- package/dist/request-contact-native.js.map +1 -0
- package/dist/request-contact-types.d.ts +86 -0
- package/dist/request-contact-types.js +7 -0
- package/dist/request-contact-types.js.map +1 -0
- package/dist/request-context-call-protocol.d.ts +12 -0
- package/dist/request-context-call-protocol.js +14 -0
- package/dist/request-context-call-protocol.js.map +1 -0
- package/dist/request-context-call.d.ts +22 -0
- package/dist/request-context-call.js +35 -0
- package/dist/request-context-call.js.map +1 -0
- package/dist/request-context-drain.d.ts +39 -0
- package/dist/request-context-drain.js +159 -0
- package/dist/request-context-drain.js.map +1 -0
- package/dist/request-context-fence.d.ts +28 -0
- package/dist/request-context-fence.js +58 -0
- package/dist/request-context-fence.js.map +1 -0
- package/dist/request-context-migration.d.ts +64 -0
- package/dist/request-context-migration.js +158 -0
- package/dist/request-context-migration.js.map +1 -0
- package/dist/request-context-pane.d.ts +25 -0
- package/dist/request-context-pane.js +48 -0
- package/dist/request-context-pane.js.map +1 -0
- package/dist/request-context-policy.d.ts +74 -0
- package/dist/request-context-policy.js +116 -0
- package/dist/request-context-policy.js.map +1 -0
- package/dist/request-context-recovery.d.ts +14 -0
- package/dist/request-context-recovery.js +56 -0
- package/dist/request-context-recovery.js.map +1 -0
- package/dist/request-context-relay.d.ts +19 -0
- package/dist/request-context-relay.js +63 -0
- package/dist/request-context-relay.js.map +1 -0
- package/dist/request-context-returns.d.ts +67 -0
- package/dist/request-context-returns.js +211 -0
- package/dist/request-context-returns.js.map +1 -0
- package/dist/request-context-store.d.ts +2 -1
- package/dist/request-context-store.js +8 -1
- package/dist/request-context-store.js.map +1 -1
- package/dist/request-context-turns.d.ts +99 -0
- package/dist/request-context-turns.js +215 -0
- package/dist/request-context-turns.js.map +1 -0
- package/dist/request-context-view.d.ts +33 -0
- package/dist/request-context-view.js +36 -0
- package/dist/request-context-view.js.map +1 -0
- package/dist/request-hub-context.d.ts +130 -0
- package/dist/request-hub-context.js +89 -0
- package/dist/request-hub-context.js.map +1 -0
- package/dist/request-hub-output.d.ts +11 -0
- package/dist/request-hub-output.js +21 -0
- package/dist/request-hub-output.js.map +1 -0
- package/dist/runtime-cli-install.js +13 -11
- package/dist/runtime-cli-install.js.map +1 -1
- package/dist/runtime-client.d.ts +2 -0
- package/dist/runtime-client.js +17 -4
- package/dist/runtime-client.js.map +1 -1
- package/dist/runtime-coordinator.d.ts +4 -1
- package/dist/runtime-coordinator.js +10 -3
- package/dist/runtime-coordinator.js.map +1 -1
- package/dist/runtime-pane-assets.d.ts +1 -1
- package/dist/runtime-pane-assets.js +1 -1
- package/dist/runtime-pane-assets.js.map +1 -1
- package/dist/runtime-pane-host.d.ts +3 -0
- package/dist/runtime-pane-host.js +39 -21
- package/dist/runtime-pane-host.js.map +1 -1
- package/dist/runtime-pane-link.d.ts +6 -2
- package/dist/runtime-pane-link.js +17 -4
- package/dist/runtime-pane-link.js.map +1 -1
- package/dist/runtime-pane-mcp-relay.d.ts +11 -1
- package/dist/runtime-pane-mcp-relay.js +69 -3
- package/dist/runtime-pane-mcp-relay.js.map +1 -1
- package/dist/runtime-pane-mcp.d.ts +28 -1
- package/dist/runtime-pane-mcp.js +92 -15
- package/dist/runtime-pane-mcp.js.map +1 -1
- package/dist/runtime-pane-port.d.ts +6 -0
- package/dist/runtime-pane-port.js +23 -4
- package/dist/runtime-pane-port.js.map +1 -1
- package/dist/runtime-pane-protocol.d.ts +4 -0
- package/dist/runtime-pane-protocol.js +11 -4
- package/dist/runtime-pane-protocol.js.map +1 -1
- package/dist/runtime-pane-service.d.ts +1 -0
- package/dist/runtime-pane-service.js +25 -9
- package/dist/runtime-pane-service.js.map +1 -1
- package/dist/runtime-pane-stdio-protocol.d.ts +4 -0
- package/dist/runtime-pane-stdio-protocol.js +12 -5
- package/dist/runtime-pane-stdio-protocol.js.map +1 -1
- package/dist/runtime-pane-stdio.js +5 -5
- package/dist/runtime-pane-stdio.js.map +1 -1
- package/dist/runtime-protocol.d.ts +3 -0
- package/dist/runtime-protocol.js.map +1 -1
- package/dist/scheduler/scheduler.d.ts +6 -0
- package/dist/scheduler/scheduler.js +19 -1
- package/dist/scheduler/scheduler.js.map +1 -1
- package/dist/scheduler/task-board.d.ts +4 -0
- package/dist/scheduler/task-board.js +6 -0
- package/dist/scheduler/task-board.js.map +1 -1
- package/dist/scheduler/types.d.ts +1 -1
- package/dist/service-activation.js +3 -13
- package/dist/service-activation.js.map +1 -1
- package/dist/service-lock.d.ts +28 -0
- package/dist/service-lock.js +85 -0
- package/dist/service-lock.js.map +1 -0
- package/dist/settings-api.d.ts +6 -0
- package/dist/settings-api.js +35 -0
- package/dist/settings-api.js.map +1 -1
- package/dist/settings-change.js +1 -1
- package/dist/settings-change.js.map +1 -1
- package/dist/state-lease.d.ts +24 -0
- package/dist/state-lease.js +103 -0
- package/dist/state-lease.js.map +1 -0
- package/dist/tmux-binary.js +1 -1
- package/dist/tmux-binary.js.map +1 -1
- package/dist/tool-receipt-output.d.ts +2 -0
- package/dist/topic-commands.js +21 -1
- package/dist/topic-commands.js.map +1 -1
- package/dist/transcript-monitor.js +3 -0
- package/dist/transcript-monitor.js.map +1 -1
- package/dist/tunnel/named-link-test.d.ts +27 -0
- package/dist/tunnel/named-link-test.js +41 -0
- package/dist/tunnel/named-link-test.js.map +1 -1
- package/dist/types.d.ts +7 -0
- package/dist/ui/chat-store.js +5 -4
- package/dist/ui/fleet-office-card.js +15 -2
- package/dist/ui/fleet-office-skin.js +33 -9
- package/dist/ui/fleet-office-zones.js +8 -3
- package/dist/ui/fleet-office.js +136 -18
- package/dist/ui/fleet-task-files.js +1 -1
- package/dist/ui/panel-chat.js +15 -2
- package/dist/ui/panel-needs.js +22 -2
- package/dist/ui/panel-settings.js +22 -8
- package/dist/ui/settings-preview-address.js +156 -0
- package/dist/ui/settings-registry.js +2 -0
- package/dist/ui/settings-strings.js +6 -6
- package/dist/ui/shared/app.css +76 -2
- package/dist/ui/shared/chat-strings.js +6 -2
- package/dist/ui/shared/chat-thread.js +7 -1
- package/dist/ui/shared/preview-panel.js +1 -1
- package/dist/ui/shared/preview.js +11 -2
- package/dist/ui/shared/tokens.css +18 -3
- package/dist/ui/shared/ui-confirm.js +5 -4
- package/dist/ui/shared/workspace.css +7 -0
- package/dist/ui/usage-credits-card.js +84 -0
- package/dist/ui/workspace-ignored-strings.js +16 -0
- package/dist/ui/workspace-panel.js +15 -6
- package/dist/update-card.d.ts +193 -0
- package/dist/update-card.js +620 -0
- package/dist/update-card.js.map +1 -0
- package/dist/update-dispatch.d.ts +16 -1
- package/dist/update-dispatch.js +12 -4
- package/dist/update-dispatch.js.map +1 -1
- package/dist/update-forward.d.ts +73 -0
- package/dist/update-forward.js +283 -0
- package/dist/update-forward.js.map +1 -0
- package/dist/update-idle.d.ts +1 -0
- package/dist/update-idle.js +12 -3
- package/dist/update-idle.js.map +1 -1
- package/dist/update-install.d.ts +2 -1
- package/dist/update-install.js +18 -10
- package/dist/update-install.js.map +1 -1
- package/dist/update-journal.d.ts +351 -0
- package/dist/update-journal.js +717 -0
- package/dist/update-journal.js.map +1 -0
- package/dist/update-launch.js +1 -1
- package/dist/update-launch.js.map +1 -1
- package/dist/update-npm-env.d.ts +45 -12
- package/dist/update-npm-env.js +48 -0
- package/dist/update-npm-env.js.map +1 -1
- package/dist/update-package-restore.d.ts +75 -0
- package/dist/update-package-restore.js +318 -0
- package/dist/update-package-restore.js.map +1 -0
- package/dist/update-quiescence.d.ts +192 -0
- package/dist/update-quiescence.js +330 -0
- package/dist/update-quiescence.js.map +1 -0
- package/dist/update-readiness-host.d.ts +61 -0
- package/dist/update-readiness-host.js +297 -0
- package/dist/update-readiness-host.js.map +1 -0
- package/dist/update-readiness.d.ts +83 -0
- package/dist/update-readiness.js +459 -0
- package/dist/update-readiness.js.map +1 -0
- package/dist/update-recovery/kit.d.ts +35 -0
- package/dist/update-recovery/kit.js +99 -0
- package/dist/update-recovery/kit.js.map +1 -0
- package/dist/update-recovery/pre-start.d.ts +34 -0
- package/dist/update-recovery/pre-start.js +103 -0
- package/dist/update-recovery/pre-start.js.map +1 -0
- package/dist/update-recovery/recover-main.d.ts +1 -0
- package/dist/update-recovery/recover-main.js +4 -0
- package/dist/update-recovery/recover-main.js.map +1 -0
- package/dist/update-recovery/recover.d.ts +22 -0
- package/dist/update-recovery/recover.js +124 -0
- package/dist/update-recovery/recover.js.map +1 -0
- package/dist/update-recovery/route.d.ts +53 -0
- package/dist/update-recovery/route.js +262 -0
- package/dist/update-recovery/route.js.map +1 -0
- package/dist/update-recovery/runner.d.ts +58 -0
- package/dist/update-recovery/runner.js +196 -0
- package/dist/update-recovery/runner.js.map +1 -0
- package/dist/update-recovery/service-manager.d.ts +39 -0
- package/dist/update-recovery/service-manager.js +57 -0
- package/dist/update-recovery/service-manager.js.map +1 -0
- package/dist/update-restore.d.ts +44 -0
- package/dist/update-restore.js +355 -0
- package/dist/update-restore.js.map +1 -0
- package/dist/update-retained.d.ts +38 -0
- package/dist/update-retained.js +91 -0
- package/dist/update-retained.js.map +1 -0
- package/dist/update-rollback.d.ts +74 -0
- package/dist/update-rollback.js +221 -0
- package/dist/update-rollback.js.map +1 -0
- package/dist/update-settings.d.ts +36 -0
- package/dist/update-settings.js +122 -0
- package/dist/update-settings.js.map +1 -0
- package/dist/update-snapshot-manifest.d.ts +32 -0
- package/dist/update-snapshot-manifest.js +65 -0
- package/dist/update-snapshot-manifest.js.map +1 -0
- package/dist/update-snapshot-scope.d.ts +67 -0
- package/dist/update-snapshot-scope.js +172 -0
- package/dist/update-snapshot-scope.js.map +1 -0
- package/dist/update-snapshot.d.ts +34 -0
- package/dist/update-snapshot.js +246 -0
- package/dist/update-snapshot.js.map +1 -0
- package/dist/update-writers.d.ts +71 -0
- package/dist/update-writers.js +235 -0
- package/dist/update-writers.js.map +1 -0
- package/dist/web-api.d.ts +3 -0
- package/dist/web-api.js +43 -8
- package/dist/web-api.js.map +1 -1
- package/dist/web-chat-history.d.ts +7 -0
- package/dist/web-chat-history.js +15 -0
- package/dist/web-chat-history.js.map +1 -1
- package/dist/web-preview.d.ts +5 -0
- package/dist/web-preview.js +1 -1
- package/dist/web-preview.js.map +1 -1
- package/dist/web-update.d.ts +6 -0
- package/dist/windows-agents.d.ts +12 -0
- package/dist/windows-agents.js +5 -0
- package/dist/windows-agents.js.map +1 -1
- package/launcher/agend +4 -1
- package/launcher/agend-agent +4 -1
- package/launcher/agend-install.cjs +16 -8
- package/launcher/install-admission.d.cts +8 -0
- package/launcher/npm-allow-scripts.cjs +72 -0
- package/launcher/npm-global-prefix.cjs +81 -0
- package/launcher/postinstall.cjs +9 -8
- package/launcher/runtime-select.cjs +8 -2
- package/package.json +3 -2
- package/scripts/preinstall-guard.cjs +1 -1
|
@@ -131,7 +131,7 @@ function HtmlPreview({ f }) {
|
|
|
131
131
|
: blocked ? null
|
|
132
132
|
: html`<button type="button" class="btn btn-sm btn-primary" onClick=${() => void run(false)}><${Icon} name="play" size=${14} />${t("taskfiles.preview")}</button>`}
|
|
133
133
|
</div>
|
|
134
|
-
<div class="pv-note tf-note" role="status">${note || (blocked ? here.reason : "")}</div>
|
|
134
|
+
<div class="pv-note tf-note" role="status">${note || (blocked ? here.reason : "")}${!note && blocked && here.fix ? html` <a class="pv-fix" href=${here.fix.href}>${here.fix.label}</a>` : null}</div>
|
|
135
135
|
${going && !P.bannerAcked() ? html`<div class="pv-banner" role="note"><span class="pv-banner-text">${P.banner()}</span>
|
|
136
136
|
<button type="button" class="btn btn-sm btn-ghost pv-ack" title=${P.bannerAckTitle()} onClick=${() => { P.ackBanner(); redraw((n) => n + 1); }}>${P.bannerAckLabel()}</button></div>` : null}
|
|
137
137
|
<div class="pv-holder tf-holder" ref=${holder}></div>
|
package/dist/ui/panel-chat.js
CHANGED
|
@@ -245,6 +245,7 @@ linkWorkBarCss();
|
|
|
245
245
|
|
|
246
246
|
import { activityDrawCtx, activityInfo, activityInfoStore, activityOffered, activityPrefs, composeActivity, mountActivity, observeActivity, setActivityOn, setActivityThinking } from "./chat-activity.js";
|
|
247
247
|
import { timeText } from "/assets/clock-text.js";
|
|
248
|
+
import { usageCreditsActions, usageCreditsTitle, usageCreditsDetail, kindClass, showRawLabel } from "./usage-credits-card.js";
|
|
248
249
|
/** The composer's textarea (#2342: text put back into it is a step Ctrl+Z goes back from). */
|
|
249
250
|
const composers = new Map(); // agent → current mounted refs, never a retained thread's stale closure
|
|
250
251
|
const composerField = (name) => composers.get(name)?.input.current || null;
|
|
@@ -1280,13 +1281,25 @@ function QuickActions({ name, inst, lease }) {
|
|
|
1280
1281
|
function Prompts({ name }) {
|
|
1281
1282
|
const list = store.promptsFor(name);
|
|
1282
1283
|
if (!list.length) return null;
|
|
1283
|
-
return html`<div data-trust="permission" class="prompts" aria-live="polite">${list.map(p => html`<div key=${p.nonce} class=${`prompt${p.resolved ? " done" : ""}`} role="group" aria-label=${p.text}>
|
|
1284
|
+
return html`<div data-trust="permission" class="prompts" aria-live="polite">${list.map(p => p.view && p.view.kind === "usage-credits" && !p.resolved ? html`<${UsageCreditsPrompt} key=${p.nonce} p=${p} />` : html`<div key=${p.nonce} class=${`prompt${p.resolved ? " done" : ""}`} role="group" aria-label=${p.text}>
|
|
1284
1285
|
<div class="txt">${p.resolved ? (p.outcome || t("chat.promptGone")) : textLinkSegments(p.text, p.links).map(sg => sg.href ? html`<a data-trust="link" class="st-link" href=${sg.href}>${sg.text}</a>` : sg.text)}</div>
|
|
1285
|
-
${p.resolved ? null : html`<div class="acts">${p.actions.filter(a => !a.input).map(a => html`<button key=${a.id} type="button" class="btn" disabled=${!!p.busy} onClick=${() => store.answerPrompt(p, a.id)}>${a.label}</button>`)}
|
|
1286
|
+
${p.resolved ? null : html`<div class="acts">${p.actions.filter(a => !a.input).map(a => html`<button key=${a.id} type="button" class="btn" disabled=${!!p.busy} onClick=${() => store.answerPrompt(p, a.id)}>${a.label}${a.hint ? html`<span class="btn-hint">${a.hint}</span>` : null}</button>`)}
|
|
1286
1287
|
${p.busy && !p.confirming ? html`<span class="wait">${t("chat.promptAnswering")}</span>` : null}</div>`}
|
|
1287
1288
|
${p.resolved ? null : p.actions.filter(a => a.input).map(a => html`<${PromptText} key=${a.id} p=${p} action=${a} />`)}</div>`)}</div>`;
|
|
1288
1289
|
}
|
|
1289
1290
|
|
|
1291
|
+
/** M-3757: Claude's usage-credits prompt, as in Needs you: the question naming the agent, one sentence on the bill, Claude's own words folded, its choices. */
|
|
1292
|
+
function UsageCreditsPrompt({ p }) {
|
|
1293
|
+
const title = usageCreditsTitle(p.view);
|
|
1294
|
+
return html`<div class="prompt prompt-usage-credits" role="group" aria-label=${title}>
|
|
1295
|
+
<div class="txt"><strong>${title}</strong></div>
|
|
1296
|
+
<div class="txt prompt-detail">${usageCreditsDetail(p.view)}</div>
|
|
1297
|
+
<details class="n-raw"><summary>${showRawLabel()}</summary><pre class="n-raw-text">${p.view.raw || p.text}</pre></details>
|
|
1298
|
+
<div class="acts">${usageCreditsActions(p.view, p.actions).filter(a => !a.input).map(a => html`<button key=${a.id} type="button" class=${`btn btn-sm${kindClass(a.kind)}`} disabled=${!!p.busy} onClick=${() => store.answerPrompt(p, a.id)}>${a.label}</button>`)}
|
|
1299
|
+
${p.busy && !p.confirming ? html`<span class="wait">${t("chat.promptAnswering")}</span>` : null}</div>
|
|
1300
|
+
</div>`;
|
|
1301
|
+
}
|
|
1302
|
+
|
|
1290
1303
|
/** #2675: a prompt's typed answer (a kiro question card's "answer in words"): a box and its send button. */
|
|
1291
1304
|
function PromptText({ p, action }) {
|
|
1292
1305
|
const [text, setText] = useState("");
|
package/dist/ui/panel-needs.js
CHANGED
|
@@ -27,6 +27,7 @@ import { toast } from "/assets/ui-toast.js";
|
|
|
27
27
|
import { confirmDialog } from "/assets/ui-confirm.js";
|
|
28
28
|
import { notifyStore, notifySupport, configDetail, reasonText, refreshNotify, setNotify } from "/assets/app-needs.js";
|
|
29
29
|
import { openSignIn, signInOffered } from "./backend-signin.js";
|
|
30
|
+
import { usageCreditsActions, usageCreditsTitle, usageCreditsDetail, kindClass, showRawLabel } from "./usage-credits-card.js";
|
|
30
31
|
import { decideProposal, installProposals } from "./agent-proposals.js";
|
|
31
32
|
import { GeneralLocation } from "./general-location.js";
|
|
32
33
|
import { runtimeUpdateText } from "./runtime-update-status.js";
|
|
@@ -254,13 +255,16 @@ function NeedsItem({ item, nowMs, owner }) {
|
|
|
254
255
|
const p = item.type === "prompt" && item.nonce && owner ? owner.state.prompts[item.nonce] : null;
|
|
255
256
|
const fallback = item.nonce ? c.prompts[item.nonce] : undefined;
|
|
256
257
|
const promptBusy = p ? p.busy || p.resolved : !!fallback;
|
|
258
|
+
// M-3757: Claude's usage-credits prompt, compact: a one-line title, its options named by what they do, its own words folded.
|
|
259
|
+
const ucView = item.type === "prompt" && item.view && item.view.kind === "usage-credits" ? item.view : null;
|
|
260
|
+
const shownActions = ucView ? usageCreditsActions(ucView, item.actions) : item.actions;
|
|
257
261
|
const answer = async (action) => {
|
|
258
262
|
const store = chatOwner();
|
|
259
263
|
if (store) { store.answerByNonce(item, action); return; }
|
|
260
264
|
// Only before Chat has booted: the page's own claim on this nonce, taken now (synchronously), kept until the
|
|
261
265
|
// server's list drops the prompt (or the answer fails).
|
|
262
266
|
if (claims.get().prompts[item.nonce]) return;
|
|
263
|
-
const confirmation =
|
|
267
|
+
const confirmation = shownActions?.find(a => a.id === action)?.confirmation;
|
|
264
268
|
setClaim("prompts", item.nonce, confirmation ? "confirming" : "busy");
|
|
265
269
|
if (confirmation && !await confirmDialog({ ...confirmation, danger: true })) {
|
|
266
270
|
setClaim("prompts", item.nonce, null);
|
|
@@ -328,6 +332,22 @@ function NeedsItem({ item, nowMs, owner }) {
|
|
|
328
332
|
setClaim("acks", hubKey, ok ? "done" : null);
|
|
329
333
|
toast(ok ? tn("hubRetryDone") : res && res.status === 404 ? tn("hubRetryGone") : res && res.status === 409 ? tn("hubRetryNot") : t("app.failed"), ok);
|
|
330
334
|
};
|
|
335
|
+
const answering = (p ? p.busy && !p.confirming : fallback === "busy");
|
|
336
|
+
// M-3757: Claude's usage-credits prompt in the standard layout: the question, one sentence on the bill, Claude's own
|
|
337
|
+
// words folded, then its choices (named by what they do) and Open chat.
|
|
338
|
+
if (ucView) return html`<article data-trust="permission" class="n-item n-usage-credits">
|
|
339
|
+
<span class="n-icon"><${Icon} name=${ICON[item.type] || "alert"} size=${18} /></span>
|
|
340
|
+
<div class="n-body">
|
|
341
|
+
<div class="n-title"><strong>${usageCreditsTitle(ucView, { named: false })}</strong><span class="n-age">${age(item.since, nowMs)}</span></div>
|
|
342
|
+
<p class="n-detail">${usageCreditsDetail(ucView)}</p>
|
|
343
|
+
<details class="n-raw"><summary>${showRawLabel()}</summary><pre class="n-raw-text">${ucView.raw}</pre></details>
|
|
344
|
+
<div class="n-actions">
|
|
345
|
+
${shownActions.filter((a) => !a.input).map((a) => html`<button key=${a.id} type="button" class=${`btn btn-sm${kindClass(a.kind)}`}
|
|
346
|
+
disabled=${promptBusy} onClick=${() => answer(a.id)}>${answering ? tn("answering") : a.label}</button>`)}
|
|
347
|
+
${item.instance ? html`<a class="btn btn-sm btn-ghost" href=${chatPath(item.instance)}>${tn("open")}</a>` : null}
|
|
348
|
+
</div>
|
|
349
|
+
</div>
|
|
350
|
+
</article>`;
|
|
331
351
|
return html`<article data-trust="permission" class=${`n-item${BAD.has(item.reason) ? " bad" : ""}`}>
|
|
332
352
|
<span class="n-icon"><${Icon} name=${ICON[item.type] || "alert"} size=${18} /></span>
|
|
333
353
|
<div class="n-body">
|
|
@@ -340,7 +360,7 @@ function NeedsItem({ item, nowMs, owner }) {
|
|
|
340
360
|
${item.type==='host'?(item.hostAlert?html`<${HostAlertActions} record=${item.hostAlert}/>`:html`<a class="btn btn-sm" href=${fleetPath('host-health')}>${hostAlertText('open')}</a>`):null}
|
|
341
361
|
<div class="n-actions">
|
|
342
362
|
${item.type === "prompt" && Array.isArray(item.actions) ? item.actions.filter((a) => !a.input).map((a) => html`<button key=${a.id} type="button" class="btn btn-sm"
|
|
343
|
-
disabled=${promptBusy} onClick=${() => answer(a.id)}>${(p ? p.busy && !p.confirming : fallback === "busy") ? tn("answering") : a.label}</button>`) : null}
|
|
363
|
+
disabled=${promptBusy} onClick=${() => answer(a.id)}>${(p ? p.busy && !p.confirming : fallback === "busy") ? tn("answering") : a.label}${a.hint ? html`<span class="btn-hint">${a.hint}</span>` : null}</button>`) : null}
|
|
344
364
|
${item.type === "hub" && item.hubRetry ? html`<button type="button" class="btn btn-sm btn-primary" disabled=${!!hubAck || !!closeAck} onClick=${retryHub}>
|
|
345
365
|
<${Icon} name="restart" size=${14} />${hubAck === "busy" ? tn("hubRetrying") : tn("hubRetry")}</button>` : null}
|
|
346
366
|
${item.type === "hub" && item.hubClose ? html`<button type="button" class="btn btn-sm hub-close" disabled=${!!closeAck || !!hubAck} onClick=${closeHub}>${tn(closeAck === "busy" ? "hubClosing" : "hubClose")}</button>` : null}
|
|
@@ -72,6 +72,7 @@ import { DevicesCard } from "./settings-devices.js";
|
|
|
72
72
|
import { AccessOverview, accessOverviewLabel } from "./settings-access-overview.js";
|
|
73
73
|
import { HubSection, hubSectionText } from "./settings-hub-section.js";
|
|
74
74
|
import { NamedLinkTest, setTypedTunnelToken } from "./settings-named-test.js";
|
|
75
|
+
import { FixedPreviewAddress, bareHost, previewHostPlaceholder, previewPortOf } from "./settings-preview-address.js";
|
|
75
76
|
import { SignInList } from "./backend-signin.js";
|
|
76
77
|
import { AccountsView, defaultsBackendOptions } from "./accounts-view.js"; // #3212: SignInList stays exported for a page that still imports it
|
|
77
78
|
import { ProviderMark } from "./provider-marks.js";
|
|
@@ -163,6 +164,10 @@ export function SettingsPanel({ route, navKey }) {
|
|
|
163
164
|
const stagedRef = useRef(staged);
|
|
164
165
|
stagedRef.current = staged;
|
|
165
166
|
const [dialog, setDialog] = useState(null); // { kind, ...props, key: navKey }
|
|
167
|
+
// M-3814: a section's open tab for this navigation, kept across the reload that remounts it after a save (its key
|
|
168
|
+
// moves with loadedAt): saving on Access → Sharing no longer drops back to Overview a moment later.
|
|
169
|
+
const tabMemory = useRef({ navKey: null, tabs: {} });
|
|
170
|
+
if (tabMemory.current.navKey !== navKey) tabMemory.current = { navKey, tabs: {} };
|
|
166
171
|
const [search, setSearch] = useState("");
|
|
167
172
|
// #2347: each section's draft while it is edited (settings-draft.js), and the epoch that remounts the sections when
|
|
168
173
|
// the drafts go: a Save that went through whole, or Discard. A Save that failed keeps them (what did not land is staged
|
|
@@ -399,7 +404,7 @@ export function SettingsPanel({ route, navKey }) {
|
|
|
399
404
|
// #2347: sections read `staged` (each change as staged, its extra fields kept: Guests carries its whole draft) and
|
|
400
405
|
// `drafts` to come back to their edits; `draftEpoch` moves on Discard and after a Save to start them from what is saved.
|
|
401
406
|
const ctx = data && !data.error ? makeCtx(data, setData, stage, unstage, reload, reloadLive, () => mount.current(),
|
|
402
|
-
{ drafts: drafts.current, draftEpoch, staged, savingDrafts: () => submitted.current,
|
|
407
|
+
{ drafts: drafts.current, draftEpoch, staged, savingDrafts: () => submitted.current, tabMemory: tabMemory.current,
|
|
403
408
|
savingStaged: () => (submitted.current || operationActive() ? submittedStaged.current : null) }) : null;
|
|
404
409
|
// #1519 P7: "Connect a chat app" on the first-run card elsewhere came here for the wizard: it opens once the data is in.
|
|
405
410
|
// #2347: it writes a connection and an agent at once — not while a fleet.yaml edit waits to be saved.
|
|
@@ -1332,7 +1337,9 @@ export function uploadMbInEffect(web) {
|
|
|
1332
1337
|
}
|
|
1333
1338
|
function WebSection({ ctx, staged, part = "all" }) {
|
|
1334
1339
|
const { schema } = ctx;
|
|
1335
|
-
const
|
|
1340
|
+
const memory = ctx.tabMemory || null;
|
|
1341
|
+
const [accessTab, setAccessTab] = useSettingsTabs("access", (memory && memory.tabs.access) || "overview");
|
|
1342
|
+
useEffect(() => { if (memory) memory.tabs.access = accessTab; }, [accessTab, memory]);
|
|
1336
1343
|
const web = ctx.fleet.web || {}, local = (web.session && web.session.local) || {}, term = ctx.fleet.web_terminal || {};
|
|
1337
1344
|
const plSession = (web.session && web.session.public_link) || {}; // #3708
|
|
1338
1345
|
// M-3278 (decision 7933bf90): over the public link an admin edits these as anywhere (Guests and Web authority included);
|
|
@@ -1347,7 +1354,7 @@ function WebSection({ ctx, staged, part = "all" }) {
|
|
|
1347
1354
|
levels: web.office_levels !== false, // #2661: on by default
|
|
1348
1355
|
cdn: web.preview_cdn === true, // #2911 (7): off by default
|
|
1349
1356
|
loginQr: web.login_qr === true, // #3061 (P2b): off by default
|
|
1350
|
-
pub: { allow_public: (web.public_link && web.public_link.allow_public) ?? true, ttl_minutes: (web.public_link && web.public_link.ttl_minutes) ?? 120, protocol: (web.public_link && web.public_link.protocol) ?? "http2", hostname: (web.public_link && web.public_link.hostname) ?? "", tunnel_token_env: (web.public_link && web.public_link.tunnel_token_env) ?? "", origin_port: (web.public_link && web.public_link.origin_port) ?? 19282, auto_open: (web.public_link && web.public_link.auto_open) ?? false },
|
|
1357
|
+
pub: { allow_public: (web.public_link && web.public_link.allow_public) ?? true, ttl_minutes: (web.public_link && web.public_link.ttl_minutes) ?? 120, protocol: (web.public_link && web.public_link.protocol) ?? "http2", hostname: (web.public_link && web.public_link.hostname) ?? "", tunnel_token_env: (web.public_link && web.public_link.tunnel_token_env) ?? "", origin_port: (web.public_link && web.public_link.origin_port) ?? 19282, auto_open: (web.public_link && web.public_link.auto_open) ?? false, preview_hostname: (web.public_link && web.public_link.preview_hostname) ?? "" },
|
|
1351
1358
|
session: { absolute_hours: local.absolute_hours ?? null, idle_hours: local.idle_hours ?? null },
|
|
1352
1359
|
plSession: { absolute_hours: plSession.absolute_hours ?? null, idle_minutes: plSession.idle_minutes ?? null },
|
|
1353
1360
|
terminal: { enabled: term.enabled ?? null, ttl_minutes: term.ttl_minutes ?? null },
|
|
@@ -1355,7 +1362,7 @@ function WebSection({ ctx, staged, part = "all" }) {
|
|
|
1355
1362
|
const text = (v) => (v === null || v === undefined ? "" : String(v));
|
|
1356
1363
|
/** #2347: a field's row class: `s-dirty` while it differs from what is saved (the draft may come from before). */
|
|
1357
1364
|
const savedForm = useMemo(() => ({ notify: String(original.notify), echo: original.echo, log: original.log, thinking: original.thinking, usagePub: original.usagePub, levels: original.levels, cdn: original.cdn, loginQr: original.loginQr, pub: original.pub.allow_public,
|
|
1358
|
-
ttl: String(original.pub.ttl_minutes), protocol: original.pub.protocol, hostname: original.pub.hostname, originPort: String(original.pub.origin_port),
|
|
1365
|
+
ttl: String(original.pub.ttl_minutes), protocol: original.pub.protocol, hostname: original.pub.hostname, originPort: String(original.pub.origin_port), previewHost: original.pub.preview_hostname,
|
|
1359
1366
|
abs: text(original.session.absolute_hours), idle: text(original.session.idle_hours),
|
|
1360
1367
|
plAbs: text(original.plSession.absolute_hours), plIdle: text(original.plSession.idle_minutes), termOn: original.terminal.enabled !== false,
|
|
1361
1368
|
termTtl: text(original.terminal.ttl_minutes), autoOpen: original.pub.auto_open }), []);
|
|
@@ -1371,7 +1378,7 @@ function WebSection({ ctx, staged, part = "all" }) {
|
|
|
1371
1378
|
echo: pick(pending, "echo_to_channel", original.echo), log: pick(pending, "log_tab", original.log), thinking: pick(pending, "log_thinking", original.thinking), usagePub: pick(pending, "usage_report_on_public_link", original.usagePub),
|
|
1372
1379
|
levels: pick(pending, "office_levels", original.levels), cdn: pick(pending, "preview_cdn", original.cdn), loginQr: pick(pending, "login_qr", original.loginQr),
|
|
1373
1380
|
pub: pick(pub, "allow_public", original.pub.allow_public), ttl: String(pick(pub, "ttl_minutes", original.pub.ttl_minutes)), protocol: pick(pub, "protocol", original.pub.protocol),
|
|
1374
|
-
hostname: pick(pub, "hostname", original.pub.hostname), originPort: String(pick(pub, "origin_port", original.pub.origin_port)), autoOpen: pick(pub, "auto_open", original.pub.auto_open),
|
|
1381
|
+
hostname: pick(pub, "hostname", original.pub.hostname), originPort: String(pick(pub, "origin_port", original.pub.origin_port)), previewHost: pick(pub, "preview_hostname", original.pub.preview_hostname), autoOpen: pick(pub, "auto_open", original.pub.auto_open),
|
|
1375
1382
|
abs: text(pick(session, "absolute_hours", original.session.absolute_hours)), idle: text(pick(session, "idle_hours", original.session.idle_hours)),
|
|
1376
1383
|
plAbs: text(pick(plPending, "absolute_hours", original.plSession.absolute_hours)), plIdle: text(pick(plPending, "idle_minutes", original.plSession.idle_minutes)),
|
|
1377
1384
|
termOn: pick(terminal, "enabled", original.terminal.enabled) !== false, termTtl: text(pick(terminal, "ttl_minutes", original.terminal.ttl_minutes)),
|
|
@@ -1396,6 +1403,10 @@ function WebSection({ ctx, staged, part = "all" }) {
|
|
|
1396
1403
|
const plAbsNow = Math.min(plAbsQuick, abs), plIdleNow = Math.min(plIdleQuick, plAbsNow * 60, idle * 60);
|
|
1397
1404
|
const errors = {
|
|
1398
1405
|
hostname: f.hostname && !/^(?:https:\/\/)?[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)+\/?$/.test(f.hostname) ? "namedHostnameInvalid" : "",
|
|
1406
|
+
// M-3814: the fixed preview address — a separate name on the same tunnel, only beside a fixed hostname.
|
|
1407
|
+
previewHost: !String(f.previewHost || "").trim() ? ""
|
|
1408
|
+
: !/^(?:https:\/\/)?[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)+\/?$/.test(String(f.previewHost).trim()) ? "namedHostnameInvalid"
|
|
1409
|
+
: !named ? "previewHostNeedsHostname" : bareHost(f.previewHost) === bareHost(f.hostname) ? "previewHostSame" : "",
|
|
1399
1410
|
originPort: !Number.isInteger(Number(f.originPort)) || Number(f.originPort) < 1024 || Number(f.originPort) > 65535 ? "namedPortInvalid" : "",
|
|
1400
1411
|
// #named-link-ttl: a fixed hostname (named tunnel) allows up to 7 days, or 0 = no expiry; a quick tunnel 1–480.
|
|
1401
1412
|
ttl: String(f.ttl).trim() === "" || !Number.isInteger(Number(f.ttl)) || Number(f.ttl) < (named ? 0 : 1) || Number(f.ttl) > (named ? 10080 : 480)
|
|
@@ -1412,7 +1423,7 @@ function WebSection({ ctx, staged, part = "all" }) {
|
|
|
1412
1423
|
// #2347: invalid text keeps the draft unsaved and Save waiting ("Fix 1 field to save"); no older valid draft is sent.
|
|
1413
1424
|
if (overPublicLink) return;
|
|
1414
1425
|
if (!ready) {
|
|
1415
|
-
const at = { hostname: "#publicWebHostname", originPort: "#publicWebOriginPort", ttl: "#publicWebTtl", abs: "#webSessionAbsolute", idle: "#webSessionIdle",
|
|
1426
|
+
const at = { hostname: "#publicWebHostname", previewHost: "#publicWebPreviewHostname", originPort: "#publicWebOriginPort", ttl: "#publicWebTtl", abs: "#webSessionAbsolute", idle: "#webSessionIdle",
|
|
1416
1427
|
plAbs: "#webPublicSessionAbsolute", plIdle: "#webPublicSessionIdle",
|
|
1417
1428
|
termTtl: "#webTerminalTtl" }[Object.keys(errors).find((k) => errors[k])];
|
|
1418
1429
|
syncStage(ctx, "web", { label: tn("webSettingsLabel"), invalid: tn(Object.values(errors).find(Boolean)), section: "access", target: at });
|
|
@@ -1422,7 +1433,7 @@ function WebSection({ ctx, staged, part = "all" }) {
|
|
|
1422
1433
|
// reference adopts the standard env key; mounting or editing an unrelated field never rewrites credentials.
|
|
1423
1434
|
const tokenEnv = f.hostname === original.pub.hostname ? original.pub.tunnel_token_env
|
|
1424
1435
|
: f.hostname ? original.pub.tunnel_token_env || "AGEND_CLOUDFLARE_TUNNEL_TOKEN" : "";
|
|
1425
|
-
const publicPatch = changedFields({ allow_public: f.pub, ttl_minutes: Number(f.ttl), protocol: f.protocol, hostname: f.hostname, tunnel_token_env: tokenEnv, origin_port: Number(f.originPort), auto_open: f.autoOpen }, original.pub);
|
|
1436
|
+
const publicPatch = changedFields({ allow_public: f.pub, ttl_minutes: Number(f.ttl), protocol: f.protocol, hostname: f.hostname, tunnel_token_env: tokenEnv, origin_port: Number(f.originPort), auto_open: f.autoOpen, preview_hostname: String(f.previewHost || "").trim() }, original.pub);
|
|
1426
1437
|
const sessionPatch = changedFields({ absolute_hours: value(f.abs), idle_hours: value(f.idle) }, original.session);
|
|
1427
1438
|
const plSessionPatch = changedFields({ absolute_hours: value(f.plAbs), idle_minutes: value(f.plIdle) }, original.plSession);
|
|
1428
1439
|
// The checkbox shows the default (on) for an unset key: only a real toggle is written; on again = back to the default.
|
|
@@ -1578,12 +1589,15 @@ function WebSection({ ctx, staged, part = "all" }) {
|
|
|
1578
1589
|
${lock(html`<section class="card s-public-entry"><h3>${layoutText("revPublicEntry")}</h3>
|
|
1579
1590
|
<label class=${fc("check", "pub")}><input id="publicWebLink" type="checkbox" checked=${f.pub} onChange=${(e) => set("pub")(e.target.checked)} /><span>${tn("publicLink")}</span><${Impact} schema=${schema} field="web.public_link.allow_public" /></label>
|
|
1580
1591
|
<p class="note">${tn("publicLinkHint")}</p>
|
|
1581
|
-
<div class="grid2">
|
|
1592
|
+
<div class="grid2" id="publicFixedAddress">
|
|
1582
1593
|
<div class=${fc("field", "hostname")}><label for="publicWebHostname">${tn("namedHostname")}</label><input id="publicWebHostname" type="text" value=${f.hostname} placeholder="agend.example.com" class=${errors.hostname ? "invalid" : ""} onInput=${(e) => set("hostname")(e.target.value)} /><${Feedback} error=${errors.hostname} /></div>
|
|
1583
1594
|
<div class=${fc("field", "originPort")}><label for="publicWebOriginPort">${tn("namedOriginPort")}</label><input id="publicWebOriginPort" type="number" min="1024" max="65535" value=${f.originPort} class=${errors.originPort ? "invalid" : ""} onInput=${(e) => set("originPort")(e.target.value)} /><${Feedback} error=${errors.originPort} /></div>
|
|
1584
1595
|
</div>
|
|
1585
1596
|
<p class="note">${tn("namedTunnelHint")} <a href="https://github.com/songsid/AgEnD/blob/main/docs/named-tunnel.md" target="_blank" rel="noopener noreferrer">${tn("namedTunnelSetup")}</a></p>
|
|
1586
1597
|
${String(f.hostname || "").trim() ? html`<${NamedLinkTest} hostname=${f.hostname} port=${f.originPort} protocol=${f.protocol} />` : null}
|
|
1598
|
+
${!named && !String(f.previewHost || "").trim() ? html`<p class="fixed-preview-needs lbar" id="publicPreviewNeedsFixed" role="note">${tn("previewNeedsFixedHost")}</p>` : null}
|
|
1599
|
+
${named || String(f.previewHost || "").trim() ? html`<${FixedPreviewAddress} field=${html`<div class=${fc("field", "previewHost")}><label for="publicWebPreviewHostname">${tn("previewHostname")}<${Impact} schema=${schema} field="web.public_link.preview_hostname" /></label><input id="publicWebPreviewHostname" type="text" value=${f.previewHost} placeholder=${previewHostPlaceholder(f.hostname)} class=${errors.previewHost ? "invalid" : ""} onInput=${(e) => set("previewHost")(e.target.value)} /><${Feedback} error=${errors.previewHost} /></div>`}
|
|
1600
|
+
hostname=${String(f.previewHost || "").trim()} placeholder=${previewHostPlaceholder(f.hostname)} originPort=${f.originPort} saved=${bareHost(f.previewHost) !== "" && bareHost(f.previewHost) === bareHost(web.public_link && web.public_link.preview_hostname)} port=${previewPortOf(ctx.fleet)} />` : null}
|
|
1587
1601
|
<div class="grid2">
|
|
1588
1602
|
<div class=${fc("field", "ttl")}><label for="publicWebTtl">${tn(named ? "publicTtlNamed" : "publicTtl")}</label><input id="publicWebTtl" type="number" min=${named ? "0" : "1"} max=${named ? "10080" : "480"} step="1" class=${errors.ttl ? "invalid" : ""} value=${f.ttl} onInput=${(e) => set("ttl")(e.target.value)} /><${Feedback} error=${errors.ttl} /></div>
|
|
1589
1603
|
<div class=${fc("field", "protocol")}><label for="publicWebProtocol">${tn("publicProtocol")}</label><${Select} id="publicWebProtocol" value=${f.protocol} onChange=${set("protocol")} options=${["http2", "quic", "auto"]} /></div>
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
// M-3814 (the user, 2026-11-26): Settings → Access → the fixed address's preview address. Over a fixed link, HTML
|
|
2
|
+
// previews used to open a temporary Cloudflare address each time, which Cloudflare sometimes limits (429). With
|
|
3
|
+
// `web.public_link.preview_hostname` they use a second published route on the same tunnel, to the preview port; the
|
|
4
|
+
// one manual step is that route (Cloudflare adds its DNS record itself). **Check** proves the saved address reaches
|
|
5
|
+
// this AgEnD's previews through the open fixed link; it starts nothing. The server answers closed step codes only.
|
|
6
|
+
import { html, useRef, useState } from "/assets/app-html.js";
|
|
7
|
+
import { register, t } from "/assets/app-i18n.js";
|
|
8
|
+
import { useLease } from "/assets/app-ctx.js";
|
|
9
|
+
import { api } from "./settings-confirm.js";
|
|
10
|
+
|
|
11
|
+
register("settings", {
|
|
12
|
+
en: {
|
|
13
|
+
previewHostname: "Preview address (optional)",
|
|
14
|
+
previewHostNeedsHostname: "A preview address needs the fixed public hostname above.",
|
|
15
|
+
previewHostSame: "Use a different name from the fixed hostname: a preview on the dashboard's own name could use its sign-in.",
|
|
16
|
+
pvaLead: "HTML previews over the fixed public link use a second address on the same tunnel. Without one, AgEnD opens a temporary Cloudflare link for previews, and Cloudflare sometimes limits those.",
|
|
17
|
+
pvaStepsTitle: "Set it up once in Cloudflare",
|
|
18
|
+
pvaStep1: "In Cloudflare, open “Networking” → “Tunnels”, click your tunnel, then press “Routes” → “Add route” → “Published application” (Cloudflare's own buttons).",
|
|
19
|
+
pvaStep2: "In the “Hostname” field: {0}",
|
|
20
|
+
pvaStep2Any: "In the “Hostname” field: a name such as {0}",
|
|
21
|
+
pvaStep3: "In the “Service URL” field: http://127.0.0.1:{0} (the preview's own port, not {1})",
|
|
22
|
+
pvaStep4: "Press “Add route” to save. Cloudflare adds the DNS record by itself.",
|
|
23
|
+
pvaStep5: "Fill in the address here and save. With the public link open (send /web), press “Check preview address”.",
|
|
24
|
+
pvaCheck: "Check preview address",
|
|
25
|
+
pvaNeedsAddress: "Fill in the preview address first.",
|
|
26
|
+
previewNeedsFixedHost: "HTML previews over the public link use a temporary Cloudflare link. To give them a fixed preview address, fill in the fixed public hostname above first.",
|
|
27
|
+
pvaChecking: "Checking… (up to about a minute)",
|
|
28
|
+
pvaBusy: "A check is already running. Try again when it ends.",
|
|
29
|
+
pvaFailed: "The check could not run. Try again.",
|
|
30
|
+
pvaNotRun: "Not checked (an earlier step failed).",
|
|
31
|
+
pvaStep_values: "The preview address is saved",
|
|
32
|
+
pvaStep_link: "The public link is open",
|
|
33
|
+
pvaResultFor: "Check of {0}",
|
|
34
|
+
pvaStep_dns: "Found in DNS",
|
|
35
|
+
pvaStep_reach: "Reaches this AgEnD's previews",
|
|
36
|
+
"pva_values_not-set": "No preview address is saved.",
|
|
37
|
+
"pva_values_not-saved": "Save first: Check uses the saved address.",
|
|
38
|
+
"pva_link_link-closed": "Open the public link (/web), then check again: the preview address only answers while the public link is open.",
|
|
39
|
+
"pva_link_no-listener": "Previews are off or not running on this AgEnD.",
|
|
40
|
+
"pva_dns_dns-missing": "{0} does not exist yet. Add the Published application route for {0} on this tunnel (step 1).",
|
|
41
|
+
"pva_dns_dns-failed": "This machine could not look up {0}: this machine's network may block DNS. Ask the network administrator.",
|
|
42
|
+
pva_reach_ok: "It works: previews over the public link use this address.",
|
|
43
|
+
"pva_reach_wrong-service": "Cloudflare answered but could not reach the service: make the route's service http://127.0.0.1:{1} (HTTP, not HTTPS).",
|
|
44
|
+
"pva_reach_other-page": "{0} answered with another page: point its route to this tunnel, with the service http://127.0.0.1:{1}.",
|
|
45
|
+
"pva_reach_route-missing": "{0} is not routed to this tunnel. Add the Published application route for {0} (step 1).",
|
|
46
|
+
"pva_reach_self-unreachable": "The tunnel is connected, but this machine's network can't open {0} (some networks filter new domains). From another network, such as a phone on mobile data, it may still work.",
|
|
47
|
+
"pva_reach_reach-failed": "{0} did not answer as expected. Try again in a while; if it repeats, check {0} on the tunnel's page in Cloudflare.",
|
|
48
|
+
pvaTimeout: "The check took too long and was stopped. Check again; if it repeats, check this machine's network.",
|
|
49
|
+
},
|
|
50
|
+
"zh-TW": {
|
|
51
|
+
previewHostname: "預覽網址(選用)",
|
|
52
|
+
previewHostNeedsHostname: "預覽網址需要先填上方的固定公開網域。",
|
|
53
|
+
previewHostSame: "請用和固定網域不同的名稱:預覽若用儀表板自己的網域,可能用到它的登入。",
|
|
54
|
+
pvaLead: "透過固定的公開連結看 HTML 預覽時,會用同一條通道上的第二個網址。沒有設定的話,AgEnD 會為預覽另開一條 Cloudflare 臨時連結,而 Cloudflare 有時會限制這類連結。",
|
|
55
|
+
pvaStepsTitle: "在 Cloudflare 設定一次",
|
|
56
|
+
pvaStep1: "在 Cloudflare 打開「Networking」→「Tunnels」,點你的通道,再按「Routes」→「Add route」→「Published application」(Cloudflare 畫面上的英文按鈕)。",
|
|
57
|
+
pvaStep2: "「Hostname」欄填 {0}",
|
|
58
|
+
pvaStep2Any: "「Hostname」欄填一個名稱,例如 {0}",
|
|
59
|
+
pvaStep3: "「Service URL」欄填 http://127.0.0.1:{0}(預覽專用的埠,不是 {1})",
|
|
60
|
+
pvaStep4: "按「Add route」儲存。Cloudflare 會自動新增 DNS 記錄。",
|
|
61
|
+
pvaStep5: "在這裡填上網址並儲存。公開連結開著時(傳 /web 開啟),按「檢查預覽網址」。",
|
|
62
|
+
pvaCheck: "檢查預覽網址",
|
|
63
|
+
pvaNeedsAddress: "先填好預覽網址。",
|
|
64
|
+
previewNeedsFixedHost: "透過公開連結的 HTML 預覽會用 Cloudflare 臨時連結。要改用固定的預覽網址,請先填上方的固定公開網域。",
|
|
65
|
+
pvaChecking: "檢查中…(最多約 1 分鐘)",
|
|
66
|
+
pvaBusy: "已經有一個檢查在進行,請等它結束再試。",
|
|
67
|
+
pvaFailed: "檢查沒有執行成功,請再試一次。",
|
|
68
|
+
pvaNotRun: "未檢查(前面的步驟失敗)。",
|
|
69
|
+
pvaStep_values: "預覽網址已儲存",
|
|
70
|
+
pvaStep_link: "公開連結已開啟",
|
|
71
|
+
pvaResultFor: "{0} 的檢查結果",
|
|
72
|
+
pvaStep_dns: "查得到",
|
|
73
|
+
pvaStep_reach: "連得到這台 AgEnD 的預覽",
|
|
74
|
+
"pva_values_not-set": "還沒有儲存預覽網址。",
|
|
75
|
+
"pva_values_not-saved": "請先儲存:檢查用的是已儲存的網址。",
|
|
76
|
+
"pva_link_link-closed": "請先開啟公開連結(/web)再檢查:預覽網址只在公開連結開著時回應。",
|
|
77
|
+
"pva_link_no-listener": "這台 AgEnD 的預覽已關閉或沒有在執行。",
|
|
78
|
+
"pva_dns_dns-missing": "{0} 還不存在。請在這條通道新增 {0} 的 Published application 路由(第 1 步)。",
|
|
79
|
+
"pva_dns_dns-failed": "這台主機查不到 {0}:這台主機所在的網路可能擋了 DNS。請洽網路管理員。",
|
|
80
|
+
pva_reach_ok: "正常:透過公開連結的預覽會用這個網址。",
|
|
81
|
+
"pva_reach_wrong-service": "Cloudflare 有回應,但連不到服務:請把路由的 service 設成 http://127.0.0.1:{1}(HTTP,不是 HTTPS)。",
|
|
82
|
+
"pva_reach_other-page": "{0} 回應了別的頁面:請把它的路由指向這條通道,service 設成 http://127.0.0.1:{1}。",
|
|
83
|
+
"pva_reach_route-missing": "{0} 沒有路由到這條通道。請新增 {0} 的 Published application 路由(第 1 步)。",
|
|
84
|
+
"pva_reach_self-unreachable": "通道已連上,但這台主機所在的網路打不開 {0}(有些網路會擋新的網域)。從其他網路(例如手機行動網路)可能可以正常使用。",
|
|
85
|
+
"pva_reach_reach-failed": "{0} 沒有如預期回應。請過一陣子再試;如果一直這樣,請到 Cloudflare 的通道頁檢查 {0}。",
|
|
86
|
+
pvaTimeout: "檢查太久,已經停止。請再檢查一次;如果一直這樣,請檢查這台主機所在的網路。",
|
|
87
|
+
},
|
|
88
|
+
});
|
|
89
|
+
const tn = (k, ...v) => t(`settings.${k}`, ...v);
|
|
90
|
+
const STEPS = ["values", "link", "dns", "reach"];
|
|
91
|
+
|
|
92
|
+
/** A hostname as the server reads it: no https://, no trailing slash, lower case. */
|
|
93
|
+
export function bareHost(value) {
|
|
94
|
+
return String(value ?? "").trim().replace(/^https:\/\//i, "").replace(/\/$/, "").toLowerCase();
|
|
95
|
+
}
|
|
96
|
+
/** What the field suggests: preview.<the fixed hostname>. */
|
|
97
|
+
export function previewHostPlaceholder(hostname) {
|
|
98
|
+
const host = bareHost(hostname);
|
|
99
|
+
return host ? `preview.${host}` : "preview.agend.example.com";
|
|
100
|
+
}
|
|
101
|
+
/** The preview listener's port, as the fleet resolves it (web-preview.ts previewSettings): preview_port, else web port + 1. */
|
|
102
|
+
export function previewPortOf(fleet) {
|
|
103
|
+
const set = fleet && fleet.web && fleet.web.preview_port;
|
|
104
|
+
if (Number.isInteger(set) && set > 0) return set;
|
|
105
|
+
const hp = Number.isInteger(fleet && fleet.health_port) ? fleet.health_port : 19280;
|
|
106
|
+
return hp > 0 && hp + 1 <= 65535 ? hp + 1 : null;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/** The field, the one route step, and Check (on the saved address). */
|
|
110
|
+
export function FixedPreviewAddress({ field, hostname, saved, port, placeholder, originPort }) {
|
|
111
|
+
const lease = useLease("fixed-preview-check");
|
|
112
|
+
const [busy, setBusy] = useState(false);
|
|
113
|
+
const [result, setResult] = useState(null);
|
|
114
|
+
const [note, setNote] = useState("");
|
|
115
|
+
const running = useRef(false);
|
|
116
|
+
const host = bareHost(hostname);
|
|
117
|
+
const run = async () => {
|
|
118
|
+
if (running.current) return;
|
|
119
|
+
running.current = true; setBusy(true); setNote(""); setResult(null);
|
|
120
|
+
try {
|
|
121
|
+
// The server knows what is saved (this page's copy may be from before a save): it answers "not-saved" for another.
|
|
122
|
+
const r = await api("/api/settings/public-link/preview-test", { method: "POST", body: JSON.stringify({ hostname: host }) });
|
|
123
|
+
if (!lease.current()) return;
|
|
124
|
+
if (r.status === 409) setNote(tn("pvaBusy"));
|
|
125
|
+
else if (!r.ok || !Array.isArray(r.body?.steps)) setNote(tn("pvaFailed"));
|
|
126
|
+
else setResult(r.body);
|
|
127
|
+
} catch { if (lease.current()) setNote(tn("pvaFailed")); }
|
|
128
|
+
finally { running.current = false; if (lease.current()) setBusy(false); }
|
|
129
|
+
};
|
|
130
|
+
const shown = result?.hostname || host || "—", shownPort = result?.port ?? port ?? "—";
|
|
131
|
+
return html`<div class="fixed-preview" id="publicPreviewAddress">
|
|
132
|
+
${field}
|
|
133
|
+
<p class="note">${tn("pvaLead")}</p>
|
|
134
|
+
<details class="fixed-preview-steps" open=${!saved}>
|
|
135
|
+
<summary>${tn("pvaStepsTitle")}</summary>
|
|
136
|
+
<ol>
|
|
137
|
+
<li>${tn("pvaStep1")}</li>
|
|
138
|
+
<li>${host ? tn("pvaStep2", host) : tn("pvaStep2Any", placeholder || "preview.agend.example.com")}</li>
|
|
139
|
+
<li>${tn("pvaStep3", port ?? "—", originPort || "19282")}</li>
|
|
140
|
+
<li>${tn("pvaStep4")}</li>
|
|
141
|
+
<li>${tn("pvaStep5")}</li>
|
|
142
|
+
</ol>
|
|
143
|
+
</details>
|
|
144
|
+
<div class="save-row"><button type="button" class="btn btn-sm" id="previewAddressCheck" disabled=${busy || !host} onClick=${run}>${busy ? tn("pvaChecking") : tn("pvaCheck")}</button>${!host ? html`<span class="note fixed-preview-why" id="previewAddressCheckWhy">${tn("pvaNeedsAddress")}</span>` : null}</div>
|
|
145
|
+
${note ? html`<p class="note" role="status">${note}</p>` : null}
|
|
146
|
+
${result ? html`<p class="note fixed-preview-result" id="previewAddressResultFor"><strong>${tn("pvaResultFor", shown)}</strong></p>` : null}
|
|
147
|
+
${result ? html`<ol class="named-test-steps" role="status" aria-live="polite">${STEPS.map((step) => {
|
|
148
|
+
const r = result.steps.find((s) => s.step === step);
|
|
149
|
+
const mark = !r ? "–" : r.ok ? "✓" : "✗";
|
|
150
|
+
// A passed step says it once (its line is the finding); the last one says it works; a failed one says what to do.
|
|
151
|
+
const said = !r ? tn("pvaNotRun") : r.code === "timeout" ? tn("pvaTimeout") : r.ok && step !== "reach" ? "" : tn(`pva_${step}_${r.code}`, shown, shownPort);
|
|
152
|
+
return html`<li key=${step} class=${!r ? "nt-skip" : r.ok ? "nt-ok" : "nt-fail"} data-step=${step} data-code=${r ? r.code : ""}>
|
|
153
|
+
<span class="nt-mark" aria-hidden="true">${mark}</span> <strong>${tn(`pvaStep_${step}`, shown, shownPort)}</strong>${said ? ` — ${said}` : ""}</li>`;
|
|
154
|
+
})}</ol>` : null}
|
|
155
|
+
</div>`;
|
|
156
|
+
}
|
|
@@ -124,6 +124,8 @@ const ROWS = [
|
|
|
124
124
|
["access.terminal-ttl", "access", "#webTerminalTtl", "settings.webTerminalTtl", "web_terminal.ttl_minutes", ["terminal minutes", "terminal", "ttl"], ["終端機", "分鐘"]],
|
|
125
125
|
["access.public-link", "access", "#publicWebLink", "settings.publicLink", "web.public_link.allow_public", ["public link", "share", "tunnel", "cloudflare", "trycloudflare"], ["公開連結", "分享", "tunnel"]],
|
|
126
126
|
["access.hostname", "access", "#publicWebHostname", "settings.namedHostname", "web.public_link.hostname", ["fixed address", "domain", "hostname", "named tunnel", "https"], ["固定網址", "網域", "主機名稱", "具名 tunnel"]],
|
|
127
|
+
// M-3814: shown with a fixed hostname (or while it is set).
|
|
128
|
+
["access.preview-address", "access", "#publicWebPreviewHostname", null, "web.public_link.preview_hostname", ["preview address", "preview", "html preview", "fixed address", "429"], ["預覽網址", "預覽", "固定網址"], L("Preview address", "預覽網址")],
|
|
127
129
|
["access.origin-port", "access", "#publicWebOriginPort", "settings.namedOriginPort", "web.public_link.origin_port", ["port", "origin port", "fixed address"], ["連接埠", "port", "固定網址"]],
|
|
128
130
|
["access.public-ttl", "access", "#publicWebTtl", "settings.publicTtl", "web.public_link.ttl_minutes", ["public link minutes", "how long", "ttl", "no expiry", "expire"], ["公開連結", "分鐘", "多久", "不過期", "到期"]],
|
|
129
131
|
// Shown with a fixed hostname (a named tunnel), or while it is set.
|
|
@@ -25,10 +25,10 @@ register("settings", {
|
|
|
25
25
|
publicAutoOpenNeedsHostname: "Needs a fixed hostname — untick it, or keep the hostname.",
|
|
26
26
|
publicProtocol: "Tunnel protocol",
|
|
27
27
|
namedHostname: "Fixed public hostname (optional)",
|
|
28
|
-
namedOriginPort: "
|
|
28
|
+
namedOriginPort: "Port for the fixed address",
|
|
29
29
|
namedHostnameInvalid: "Enter a DNS hostname or HTTPS root URL.",
|
|
30
30
|
namedPortInvalid: "Use an integer port from 1024 to 65535.",
|
|
31
|
-
namedTunnelHint: "
|
|
31
|
+
namedTunnelHint: "Leave the hostname blank for a temporary public link. Cloudflare points to this port. Opening, expiry and sign-in still apply.",
|
|
32
32
|
namedTunnelSetup: "How to set this up",
|
|
33
33
|
namedToken: "Cloudflare connector token",
|
|
34
34
|
namedTokenHint: "Stored privately, never shown again. Format checked locally; Cloudflare credentials and routing are checked when opening. Saving or clearing closes the current public link.",
|
|
@@ -704,11 +704,11 @@ register("settings", {
|
|
|
704
704
|
bots: "機器人",
|
|
705
705
|
classicChannels: "ClassicBot 頻道",
|
|
706
706
|
noClassic: "沒有 ClassicBot 頻道 — 在聊天中用 /start 建立。",
|
|
707
|
-
publicLink: "
|
|
707
|
+
publicLink: "提供臨時公開連結",
|
|
708
708
|
publicLinkHint: "每次都需管理員明確啟用。Cloudflare 終止 TLS;登入者具有完整網頁管理權限。HTML 預覽會另開一條臨時通道,除非設定 web.preview_on_public_link: false。",
|
|
709
709
|
publicTtl: "公開連結分鐘數(1–480)",
|
|
710
710
|
publicTtlNamed: "公開連結分鐘數(0–10080;0 = 不到期)",
|
|
711
|
-
publicTtlNamedHint: "設定固定網域時,連結最長可開 7 天(10080 分鐘);設 0
|
|
711
|
+
publicTtlNamedHint: "設定固定網域時,連結最長可開 7 天(10080 分鐘);設 0 就不會到期,直到關閉或 AgEnD 停止。每次登入仍需裝置登入碼。修改後的期限從下次開啟起生效;要結束目前的連結,請按「關閉」。",
|
|
712
712
|
publicTtlQuickRange: "臨時通道只能設 1–480 分鐘。請調低,或設定固定網域以使用更長時間。",
|
|
713
713
|
publicTtlNamedRange: "設定固定網域時:請輸入 1 到 10080 的整數,或 0 代表不到期。",
|
|
714
714
|
publicAutoOpen: "AgEnD 啟動時重新開啟公開連結",
|
|
@@ -716,10 +716,10 @@ register("settings", {
|
|
|
716
716
|
publicAutoOpenNeedsHostname: "需要固定網域——請取消勾選,或保留網域。",
|
|
717
717
|
publicProtocol: "通道協定",
|
|
718
718
|
namedHostname: "固定公開網域(選用)",
|
|
719
|
-
namedOriginPort: "
|
|
719
|
+
namedOriginPort: "固定網址用的埠",
|
|
720
720
|
namedHostnameInvalid: "請輸入 DNS 網域名稱或 HTTPS 根網址。",
|
|
721
721
|
namedPortInvalid: "請使用 1024 到 65535 的整數連接埠。",
|
|
722
|
-
namedTunnelHint: "
|
|
722
|
+
namedTunnelHint: "網域留空時使用臨時的公開連結。Cloudflare 那邊要指到這個埠;仍須開啟公開連結,並遵守到期及登入規則。",
|
|
723
723
|
namedTunnelSetup: "設定教學",
|
|
724
724
|
namedToken: "Cloudflare 連接器 token",
|
|
725
725
|
namedTokenHint: "私密儲存,不會讀回。儲存時只檢查格式,開啟時才確認憑證與路由。設定或清除會關閉目前的公開連結。",
|
package/dist/ui/shared/app.css
CHANGED
|
@@ -644,6 +644,8 @@ html:has(.shell), html:has(.shell) body { overflow: hidden; }
|
|
|
644
644
|
.dlg-title { flex: 1; font-size: var(--fs-lg); font-weight: var(--fw-semibold); overflow-wrap: anywhere; }
|
|
645
645
|
.dlg-body { padding: var(--s-2) var(--s-5) var(--s-4); overflow-y: auto; display: flex; flex-direction: column; gap: var(--s-3); }
|
|
646
646
|
.dlg-actions { display: flex; justify-content: flex-end; gap: var(--s-2); padding: var(--s-3) var(--s-5) var(--s-5); }
|
|
647
|
+
.dlg-even .dlg-actions .btn { flex: 1 1 0; min-width: 0; }
|
|
648
|
+
.dlg-even .confirm-text { text-wrap: balance; }
|
|
647
649
|
/* A drawer (ui-dialog.js `drawer`): on a desk, the right edge at full height, the page in view beside it. A phone keeps
|
|
648
650
|
the bottom sheet (the rules below are for 900 px and up only). */
|
|
649
651
|
@media (min-width: 900px) and (pointer: fine), (min-width: 900px) and (pointer: none), (min-width: 900px) and (min-height: 501px), (min-width: 1024px) {
|
|
@@ -1104,6 +1106,20 @@ html.lb-open .scroller { overflow: hidden; }
|
|
|
1104
1106
|
.pv-label { font-size: var(--fs-xs); font-weight: var(--fw-bold); color: var(--text-2); margin-right: auto; font-family: var(--font-mono); }
|
|
1105
1107
|
.pv-note { font-size: var(--fs-xs); color: var(--text-3); margin-top: 6px; }
|
|
1106
1108
|
.pv-note:empty { display: none; }
|
|
1109
|
+
/* M-3814: the 429 notice's link to the fixed preview address (Settings → Access). */
|
|
1110
|
+
.pv-note .pv-fix { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
|
|
1111
|
+
/* Chinese wraps between words, not inside one (建立, 查得到, 使用). */
|
|
1112
|
+
:lang(zh) .pv-note, :lang(zh) .fixed-preview, :lang(zh) .s-public-entry .note { word-break: keep-all; overflow-wrap: anywhere; }
|
|
1113
|
+
/* M-3814: the fixed preview address's Cloudflare step, under the fixed hostname. */
|
|
1114
|
+
.fixed-preview { margin-top: var(--s-3); }
|
|
1115
|
+
/* No fixed public hostname yet: why there is no preview field — body-size, set apart (the 429 link lands here). */
|
|
1116
|
+
.fixed-preview-needs { margin: var(--s-2) 0; padding: 8px var(--s-3) 8px calc(var(--s-3) + 3px); border-radius: var(--r-sm); background: var(--surface-2); color: var(--text); --lbar-color: var(--accent); } /* the bar: .lbar (#2330) */
|
|
1117
|
+
:lang(zh) .fixed-preview-needs { word-break: keep-all; overflow-wrap: anywhere; }
|
|
1118
|
+
.fixed-preview-steps { margin: var(--s-2) 0; }
|
|
1119
|
+
.fixed-preview-steps summary { cursor: pointer; padding: 6px 0; }
|
|
1120
|
+
.fixed-preview-steps ol { margin: var(--s-1) 0 0; padding-left: 1.6em; list-style: decimal; font-size: var(--fs-sm); overflow-wrap: anywhere; }
|
|
1121
|
+
.fixed-preview-steps li + li { margin-top: 4px; }
|
|
1122
|
+
.fixed-preview .save-row .fixed-preview-why { margin: 0 0 0 var(--s-2); align-self: center; }
|
|
1107
1123
|
.pv-banner { margin-top: var(--s-2); padding: var(--s-2) var(--s-3); border-radius: var(--r-sm); font-size: var(--fs-xs); background: var(--warn-bg); border: 1px solid var(--warn-line);
|
|
1108
1124
|
display: flex; align-items: flex-start; gap: var(--s-2); }
|
|
1109
1125
|
.pv-banner[hidden] { display: none; }
|
|
@@ -1134,7 +1150,7 @@ html.lb-open .scroller { overflow: hidden; }
|
|
|
1134
1150
|
.p-chat > .panel-head { --bg: var(--chrome-bg); --surface: var(--chrome-surface); --text: var(--chrome-text); --text-2: var(--chrome-text-2); --accent: var(--chrome-accent); background: var(--bg); color: var(--text); }
|
|
1135
1151
|
.p-chat.th { background: var(--bg); color: var(--text); }
|
|
1136
1152
|
.p-chat.th .msg.user .body { border-radius: var(--bubble-radius, var(--r-xl)); }
|
|
1137
|
-
.p-chat.th-font-system .thread, .p-chat.th-font-system .composer textarea, .p-chat.th-font-system .composer-ph { font-family: system-ui, -apple-system, "Segoe UI", sans-serif, var(--font-emoji); }
|
|
1153
|
+
.p-chat.th-font-system .thread, .p-chat.th-font-system .composer textarea, .p-chat.th-font-system .composer-ph { font-family: "AgEnD Emoji", system-ui, -apple-system, "Segoe UI", sans-serif, var(--font-emoji); }
|
|
1138
1154
|
.p-chat.th-font-mono .thread, .p-chat.th-font-mono .composer textarea, .p-chat.th-font-mono .composer-ph { font-family: var(--font-mono); }
|
|
1139
1155
|
.p-chat.th-bubble-thin .msg.user .body { box-shadow: inset 0 0 0 1px var(--border); }
|
|
1140
1156
|
.p-chat.th-bubble-accent .msg.user .body { box-shadow: inset 0 0 0 1px var(--accent); }
|
|
@@ -1333,6 +1349,22 @@ img.amb-p { object-fit: contain; }
|
|
|
1333
1349
|
.st-link { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
|
|
1334
1350
|
.st-link:hover { text-decoration-thickness: 2px; }
|
|
1335
1351
|
.prompt .acts { display: flex; gap: var(--s-2); margin-top: var(--s-2); align-items: center; flex-wrap: wrap; }
|
|
1352
|
+
/* M-3757: a plain subtitle under a CLI choice's own words (what it means for the plan). */
|
|
1353
|
+
.btn:has(> .btn-hint) { flex-direction: column; align-items: flex-start; text-align: left; height: auto; }
|
|
1354
|
+
.btn .btn-hint { display: block; font-size: var(--fs-xs); font-weight: 400; color: var(--text-2); white-space: normal; }
|
|
1355
|
+
/* M-3757: Claude's text, folded under the detail line (Needs you and the chat). */
|
|
1356
|
+
.n-raw { margin-top: var(--s-1); font-size: var(--fs-xs); color: var(--text-2); }
|
|
1357
|
+
.n-raw > summary { cursor: pointer; width: fit-content; }
|
|
1358
|
+
.n-raw-text { margin: var(--s-1) 0 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: var(--fs-xs); color: var(--text-2); }
|
|
1359
|
+
.prompt .prompt-detail { color: var(--text-2); }
|
|
1360
|
+
/* The bill sentence wraps at spaces and punctuation only (never inside 「另外」), balanced so no stub is left alone. */
|
|
1361
|
+
.n-usage-credits .n-detail, .prompt-usage-credits .prompt-detail { word-break: keep-all; overflow-wrap: anywhere; text-wrap: balance; }
|
|
1362
|
+
.prompt-usage-credits > .txt:first-child { text-wrap: balance; }
|
|
1363
|
+
/* Phone and touch: the fold and the chat prompt's choices are tap targets, as .n-actions buttons are. */
|
|
1364
|
+
@media (max-width: 899px), (pointer: coarse) {
|
|
1365
|
+
.n-raw > summary { min-height: var(--tap); line-height: var(--tap); }
|
|
1366
|
+
.prompt-usage-credits .acts .btn { min-height: var(--tap); }
|
|
1367
|
+
}
|
|
1336
1368
|
.prompt .wait { font-size: var(--fs-xs); color: var(--text-3); }
|
|
1337
1369
|
/* #2675: a prompt's typed answer. 16px keeps iOS from zooming in on focus (#1612). */
|
|
1338
1370
|
.prompt .prompt-text { display: flex; gap: var(--s-2); margin-top: var(--s-2); }
|
|
@@ -2700,6 +2732,13 @@ strong.org-name { font-size: var(--fs-sm); color: var(--text); }
|
|
|
2700
2732
|
.oo-card.sheet .oo-card-close { width: var(--tap); height: var(--tap); margin: -6px -8px 0 0; }
|
|
2701
2733
|
.oo-card.sheet .oo-card-actions .btn { flex: 1; min-height: var(--tap); justify-content: center; }
|
|
2702
2734
|
.oo-card.sheet .oo-card-actions { flex-wrap: wrap; }
|
|
2735
|
+
/* #4504: the card's pose preview — a labelled picker and Replay (a small button) on one row: the picker shrinks, Replay keeps its size. */
|
|
2736
|
+
.oo-card-preview { display: flex; align-items: center; gap: var(--s-2); margin-top: var(--s-2); }
|
|
2737
|
+
.oo-card-preview label { display: flex; align-items: center; gap: var(--s-1); flex: 1; min-width: 0; }
|
|
2738
|
+
.oo-card-preview select { flex: 1; min-width: 0; }
|
|
2739
|
+
.oo-card-preview .btn { flex: none; }
|
|
2740
|
+
/* #4508 review: on the sheet, a fingertip's 44 px like the actions row; the select keeps 16 px text from the coarse-pointer rule at the top. */
|
|
2741
|
+
.oo-card.sheet .oo-card-preview select, .oo-card.sheet .oo-card-preview .btn { min-height: var(--tap); }
|
|
2703
2742
|
.oo-card-grip { width: 36px; height: 4px; margin: 0 auto var(--s-2); border-radius: var(--r-full); background: var(--surface-2); }
|
|
2704
2743
|
/* M-3633: a sheet whose content scrolls scrolls natively (pan-y); its grip is then the handle that closes it — kept at
|
|
2705
2744
|
its top, a fingertip tall (the bar drawn in the middle of it), never taken by the browser (touch-action none). */
|
|
@@ -2809,6 +2848,23 @@ button.oo-tile-label:focus-visible { outline: 2px solid var(--focus); outline-of
|
|
|
2809
2848
|
.oo-desks:focus-within { position: absolute; z-index: 7; left: var(--s-2); bottom: var(--s-2); width: auto; height: auto; max-height: 40%; margin: 0; padding: var(--s-1); clip: auto; overflow-y: auto;
|
|
2810
2849
|
display: inline-flex; flex-wrap: wrap; gap: 4px; max-width: calc(100% - 2 * var(--s-2)); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); white-space: normal; }
|
|
2811
2850
|
.oo-desk { font-size: var(--fs-xs); padding: 2px 6px; border-radius: var(--r-sm); background: var(--bg); color: var(--text); border: 1px solid var(--border); }
|
|
2851
|
+
/* M-3665: zoomed too far out to read the name tags (a phone's whole office, about 30 %: 3 px), the names show here — a row
|
|
2852
|
+
of chips over the stage's foot, scrolling sideways, each a whole touch target that opens that person's card. */
|
|
2853
|
+
.oo[data-tags-off] .oo-desks { position: absolute; z-index: 5; left: var(--s-2); right: var(--s-2); bottom: var(--s-2); width: auto; height: auto; max-height: none;
|
|
2854
|
+
margin: 0; padding: var(--s-1); clip: auto; overflow-x: auto; overflow-y: hidden; display: flex; flex-wrap: nowrap; gap: var(--s-1); max-width: none; white-space: nowrap;
|
|
2855
|
+
background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-full); overscroll-behavior-x: contain; } /* flat: no shadow (leader's check) */
|
|
2856
|
+
.oo[data-tags-off] .oo-desks > li { flex: none; }
|
|
2857
|
+
.oo[data-tags-off] .oo-desks > li[data-call] { order: -1; } /* a call first, in view, its chip in the warning colour */
|
|
2858
|
+
.oo[data-tags-off] .oo-desks > li[data-call] .oo-desk { border-color: var(--warn); }
|
|
2859
|
+
/* More to scroll (data-more-left/right, desksCue): the row's edge fades, as the zone pills' does — never a chip cut short. */
|
|
2860
|
+
.oo[data-tags-off] .oo-desks[data-more-right] { -webkit-mask-image: linear-gradient(to right, currentColor calc(100% - 32px), transparent); mask-image: linear-gradient(to right, currentColor calc(100% - 32px), transparent); }
|
|
2861
|
+
.oo[data-tags-off] .oo-desks[data-more-left] { -webkit-mask-image: linear-gradient(to left, currentColor calc(100% - 32px), transparent); mask-image: linear-gradient(to left, currentColor calc(100% - 32px), transparent); }
|
|
2862
|
+
.oo[data-tags-off] .oo-desks[data-more-left][data-more-right] { -webkit-mask-image: linear-gradient(to right, transparent, currentColor 32px, currentColor calc(100% - 32px), transparent); mask-image: linear-gradient(to right, transparent, currentColor 32px, currentColor calc(100% - 32px), transparent); }
|
|
2863
|
+
/* #4466 Hide names: the zoomed-out row keeps only the callers (as their tags do); nobody calling, no row. */
|
|
2864
|
+
.oo[data-tags-off][data-names-off] .oo-desks > li:not([data-call]) { display: none; }
|
|
2865
|
+
.oo[data-tags-off][data-names-off] .oo-desks:not(:has(> li[data-call])) { display: none; }
|
|
2866
|
+
.oo[data-tags-off] .oo-stage .oo-snacks { bottom: calc(var(--s-2) + var(--tap) + var(--s-4)); } /* the snack tray above the row */
|
|
2867
|
+
.oo[data-tags-off] .oo-desk { display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 var(--s-3); border-radius: var(--r-full); font-size: var(--fs-sm); }
|
|
2812
2868
|
.oo-desk:focus-visible { outline: none; border-color: var(--focus); box-shadow: inset 0 -2px 0 var(--focus); }
|
|
2813
2869
|
/* #2513: Edit layout (fleet-office-layout.js) — an SVG over the canvas (placed and sized through the CSSOM), its 1280×720
|
|
2814
2870
|
grid, the areas, corridors and a handle for each seat, item, the door and waypoint; its bar sticks to the stage's foot. */
|
|
@@ -2928,6 +2984,9 @@ html.oo-immersive .p-fleet > .panel-body { z-index: 50; }
|
|
|
2928
2984
|
.oo-zone-pills[data-more-right] { -webkit-mask-image: linear-gradient(to right, currentColor calc(100% - 32px), transparent); mask-image: linear-gradient(to right, currentColor calc(100% - 32px), transparent); }
|
|
2929
2985
|
.oo-zone-pills[data-more-left] { -webkit-mask-image: linear-gradient(to left, currentColor calc(100% - 32px), transparent); mask-image: linear-gradient(to left, currentColor calc(100% - 32px), transparent); }
|
|
2930
2986
|
.oo-zone-pills[data-more-left][data-more-right] { -webkit-mask-image: linear-gradient(to right, transparent, currentColor 32px, currentColor calc(100% - 32px), transparent); mask-image: linear-gradient(to right, transparent, currentColor 32px, currentColor calc(100% - 32px), transparent); }
|
|
2987
|
+
/* M-3665: in the row under the stage the chips wrap to a second line rather than scroll off its edge ("Nap cor…"
|
|
2988
|
+
was cut on a phone): every area's whole name and count is in view. */
|
|
2989
|
+
.oo > .oo-zone-pills, .oo > .oo-zone-pills[data-more-left], .oo > .oo-zone-pills[data-more-right] { flex-wrap: wrap; overflow-x: visible; border-radius: var(--r-lg); -webkit-mask-image: none; mask-image: none; }
|
|
2931
2990
|
.oo-snacks { left: var(--s-2); bottom: max(var(--s-2), env(safe-area-inset-bottom, 0px)); max-width: calc(100% - 2 * var(--s-2)); }
|
|
2932
2991
|
.oo-stage:has(.oo-zone-pills) .oo-snacks { bottom: calc(max(var(--s-2), env(safe-area-inset-bottom, 0px)) + 52px); }
|
|
2933
2992
|
}
|
|
@@ -2941,7 +3000,7 @@ html.oo-immersive .p-fleet > .panel-body { z-index: 50; }
|
|
|
2941
3000
|
.oo-sheet :is(.oo-sheet-bar > *, .oo-sheet-live) { min-height: var(--tap); }
|
|
2942
3001
|
.oo-sheet :is(.oo-pick, .check) { display: flex; align-items: center; gap: var(--s-2); font-size: var(--fs-sm); color: var(--text); }
|
|
2943
3002
|
.oo-sheet .oo-pick { justify-content: space-between; }
|
|
2944
|
-
.oo-sheet .oo-pick .tb-select { width: 62%; min-height: var(--tap); font-size: var(--fs-md); }
|
|
3003
|
+
.oo-sheet .oo-pick .tb-select { width: 62%; max-width: none; min-height: var(--tap); font-size: var(--fs-md); } /* M-3743: not the bar's 150 px cap ("Pop-up window" was cut) */
|
|
2945
3004
|
.oo-sheet .dlg-x { width: var(--tap); height: var(--tap); }
|
|
2946
3005
|
/* M-3556: more below the fold fades out at the sheet's foot, over the rows (data-more: set while not at the end). */
|
|
2947
3006
|
.oo-sheet .dlg-body[data-more]::after { content: ""; position: sticky; bottom: calc(-1 * var(--s-4)); flex: none; display: block; height: 48px;
|
|
@@ -5474,3 +5533,18 @@ html.oo-immersive .p-fleet > .panel-body { z-index: 50; }
|
|
|
5474
5533
|
|
|
5475
5534
|
/* M-3678: the new owner stop action follows the phone tap target. */
|
|
5476
5535
|
@media (max-width: 899px), (pointer: coarse) and (max-height: 500px) and (max-width: 1023px) { .n-actions .hub-close { min-height: var(--tap); min-width: var(--tap); } }
|
|
5536
|
+
|
|
5537
|
+
/* H: provenance stays outside the collapsible message, with the existing flat notice disclosure. */
|
|
5538
|
+
.request-provenance { color: var(--text-2); margin-bottom: var(--s-2); overflow-wrap: anywhere; }
|
|
5539
|
+
.request-provenance strong { color: var(--text); font-size: inherit; font-weight: 600; }
|
|
5540
|
+
.request-provenance p { margin: var(--s-1) 0; }
|
|
5541
|
+
.request-provenance .n-raw { margin: var(--s-1) 0; }
|
|
5542
|
+
.request-provenance summary { cursor: pointer; list-style: disclosure-closed inside; }
|
|
5543
|
+
.request-provenance details[open] > summary { list-style-type: disclosure-open; }
|
|
5544
|
+
.request-provenance .msg-tools { opacity: 1; }
|
|
5545
|
+
.request-provenance .n-raw-text { white-space: pre-wrap; overflow-wrap: anywhere; }
|
|
5546
|
+
|
|
5547
|
+
@media (max-width: 899px), (pointer: coarse) and (max-height: 500px) and (max-width: 1023px) {
|
|
5548
|
+
.request-provenance summary { min-height: var(--tap); display: list-item; padding-block: var(--s-3); }
|
|
5549
|
+
.request-provenance .msg-tools button { min-height: var(--tap); min-width: var(--tap); }
|
|
5550
|
+
}
|