@songsid/agend 2.3.5-alpha.3 → 2.3.5-alpha.4
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-runtime-api.d.ts +4 -0
- package/dist/agent-runtime-api.js +59 -0
- package/dist/agent-runtime-api.js.map +1 -0
- package/dist/agent-runtime-change.d.ts +74 -0
- package/dist/agent-runtime-change.js +102 -0
- package/dist/agent-runtime-change.js.map +1 -0
- package/dist/auth-api.js +4 -0
- package/dist/auth-api.js.map +1 -1
- package/dist/backend/codex-footer-hints.d.ts +4 -0
- package/dist/backend/codex-footer-hints.js +27 -0
- package/dist/backend/codex-footer-hints.js.map +1 -0
- package/dist/backend/codex.js +8 -10
- package/dist/backend/codex.js.map +1 -1
- package/dist/fleet-manager.d.ts +3 -0
- package/dist/fleet-manager.js +157 -1
- package/dist/fleet-manager.js.map +1 -1
- package/dist/fleet-windows-runtime.d.ts +6 -1
- package/dist/fleet-windows-runtime.js +70 -1
- package/dist/fleet-windows-runtime.js.map +1 -1
- package/dist/office-share-page.js +1 -1
- package/dist/office-share-page.js.map +1 -1
- package/dist/public-web-link.d.ts +6 -0
- package/dist/public-web-link.js +9 -0
- package/dist/public-web-link.js.map +1 -1
- package/dist/runtime-api.js +84 -9
- package/dist/runtime-api.js.map +1 -1
- package/dist/runtime-build-info.d.ts +9 -0
- package/dist/runtime-build-info.js +57 -0
- package/dist/runtime-build-info.js.map +1 -0
- package/dist/runtime-bundle.d.ts +3 -1
- package/dist/runtime-bundle.js +14 -8
- package/dist/runtime-bundle.js.map +1 -1
- package/dist/runtime-cli.d.ts +6 -1
- package/dist/runtime-cli.js +46 -11
- package/dist/runtime-cli.js.map +1 -1
- package/dist/runtime-client-store.d.ts +20 -1
- package/dist/runtime-client-store.js +56 -4
- package/dist/runtime-client-store.js.map +1 -1
- package/dist/runtime-client.d.ts +12 -0
- package/dist/runtime-client.js +43 -7
- package/dist/runtime-client.js.map +1 -1
- package/dist/runtime-connection.d.ts +22 -0
- package/dist/runtime-connection.js +93 -0
- package/dist/runtime-connection.js.map +1 -0
- package/dist/runtime-coordinator.d.ts +9 -0
- package/dist/runtime-coordinator.js +81 -34
- package/dist/runtime-coordinator.js.map +1 -1
- package/dist/runtime-pane-boot.d.ts +7 -0
- package/dist/runtime-pane-boot.js +23 -0
- package/dist/runtime-pane-boot.js.map +1 -1
- package/dist/runtime-protocol.d.ts +13 -0
- package/dist/runtime-protocol.js +18 -0
- package/dist/runtime-protocol.js.map +1 -1
- package/dist/settings-effect.js +1 -1
- package/dist/settings-effect.js.map +1 -1
- package/dist/settings-http-confirmation.d.ts +3 -0
- package/dist/settings-http-confirmation.js +16 -1
- package/dist/settings-http-confirmation.js.map +1 -1
- package/dist/ui/agent-runtime-settings.js +67 -0
- package/dist/ui/agent-runtime.js +20 -2
- package/dist/ui/backend-signin.js +36 -21
- package/dist/ui/native-instance-settings.js +5 -8
- package/dist/ui/panel-chat.js +3 -2
- package/dist/ui/panel-fleet.js +4 -2
- package/dist/ui/panel-runtimes.js +136 -33
- package/dist/ui/panel-settings.js +224 -139
- package/dist/ui/panel-windows-cli.js +77 -41
- package/dist/ui/settings-agent-filters.js +94 -0
- package/dist/ui/settings-appearance.js +122 -23
- package/dist/ui/settings-dialogs.js +5 -5
- package/dist/ui/settings-guests.js +25 -11
- package/dist/ui/settings-layout.js +245 -0
- package/dist/ui/settings-model.js +8 -0
- package/dist/ui/settings-registry.js +5 -3
- package/dist/ui/settings-shortcuts.js +65 -0
- package/dist/ui/settings-strings.js +93 -0
- package/dist/ui/settings-web-authority.js +14 -11
- package/dist/ui/shared/app-shell.js +17 -7
- package/dist/ui/shared/app.css +1022 -12
- package/dist/ui/shared/instance-nav.js +3 -2
- package/dist/ui/shared/machine-name.js +13 -0
- package/dist/ui/shared/settings-width.js +31 -0
- package/dist/ui/shared/tokens.css +1 -0
- package/dist/ui/shared/ui-dialog.js +2 -2
- package/dist/ui/shared/ui-menu.js +3 -3
- package/dist/ui/windows-cli-catalog.js +41 -12
- package/dist/web-api.d.ts +1 -0
- package/dist/web-api.js +3 -0
- package/dist/web-api.js.map +1 -1
- package/dist/windows-agents.d.ts +3 -1
- package/dist/windows-agents.js +13 -10
- package/dist/windows-agents.js.map +1 -1
- package/dist/windows-cli-api.js +2 -1
- package/dist/windows-cli-api.js.map +1 -1
- package/dist/windows-cli-worker.d.ts +1 -0
- package/dist/windows-cli-worker.js +2 -2
- package/dist/windows-cli-worker.js.map +1 -1
- package/dist/windows-cli.d.ts +1 -0
- package/dist/windows-cli.js +7 -2
- package/dist/windows-cli.js.map +1 -1
- package/package.json +1 -1
|
@@ -14,6 +14,7 @@ import { DEFAULT_SCHEMA, impactOf, sameValue } from "./settings-model.js";
|
|
|
14
14
|
import { editsOf, keepDraft, syncStage } from "./settings-draft.js";
|
|
15
15
|
import { resetWebAuthorization } from "/assets/web-authorize.js";
|
|
16
16
|
import "./settings-strings.js";
|
|
17
|
+
import { layoutText } from "./settings-layout.js";
|
|
17
18
|
|
|
18
19
|
const tn = (k, ...v) => t(`settings.${k}`, ...v);
|
|
19
20
|
|
|
@@ -64,7 +65,7 @@ export function WebAuthorityCard({ ctx, staged, disabled = false }) {
|
|
|
64
65
|
syncStage(ctx, "verified_authority", body ? { label: tn("vaTitle"), count: Object.keys(body).length,
|
|
65
66
|
impact: impactOf(ctx.schema || DEFAULT_SCHEMA, "web.verified_authority"), request: { method: "PUT", url: "/api/settings/fleet/web", body: { verified_authority: body } } } : null);
|
|
66
67
|
}, [f, original, overview]);
|
|
67
|
-
const card = (body) => html`<section class="card s-web-authority"><h3>${tn("vaTitle")}</h3><p class="note">${tn("vaHint")}</p>${
|
|
68
|
+
const card = (body) => html`<section class="card s-web-authority"><h3>${tn("vaTitle")}</h3><p class="note s-authority-brief">${layoutText("revAuthorityBrief")}</p>${body}<details class="s-setting-details"><summary>${layoutText("revAuthorityDetails")}</summary><p class="note">${tn("vaHint")}</p><p class="note">${tn("vaEnabledHint")}</p><p class="note">${tn("vaLoopbackOnlyHint")}</p></details></section>`;
|
|
68
69
|
if (failed) return card(html`<p class="note" role="status">${tn("vaLoadFailed")} <button type="button" class="btn btn-sm" onClick=${load}>${t("app.retry")}</button></p>`);
|
|
69
70
|
if (!overview || !f) return card(html`<p class="note">${t("app.loading")}</p>`);
|
|
70
71
|
|
|
@@ -86,26 +87,28 @@ export function WebAuthorityCard({ ctx, staged, disabled = false }) {
|
|
|
86
87
|
|
|
87
88
|
return card(html`<fieldset class="s-va-fields" disabled=${disabled}>
|
|
88
89
|
${stuckOff ? html`<p class="note s-va-warn" role="status" id="vaStuckOff">${tn("vaStuckOff")}</p>` : null}
|
|
89
|
-
<label class=${fc("check", "enabled")}><input id="vaEnabled" type="checkbox" checked=${f.enabled} onChange=${(e) => set({ enabled: e.target.checked })} /><span>${
|
|
90
|
-
<p class="note">${
|
|
91
|
-
<label class=${fc("check", "loopbackOnly")}><input id="vaLoopbackOnly" type="checkbox" checked=${f.loopbackOnly} onChange=${(e) => set({ loopbackOnly: e.target.checked })} /><span>${
|
|
92
|
-
<p class="note">${
|
|
90
|
+
<label class=${fc("check", "enabled")}><input class="s-ui-toggle" id="vaEnabled" type="checkbox" checked=${f.enabled} onChange=${(e) => set({ enabled: e.target.checked })} /><span>${layoutText("revAuthorityEnabled")}</span></label>
|
|
91
|
+
<p class="note">${layoutText("revAuthorityEnabledHint")}</p>
|
|
92
|
+
<label class=${fc("check", "loopbackOnly")}><input class="s-ui-toggle" id="vaLoopbackOnly" type="checkbox" checked=${f.loopbackOnly} onChange=${(e) => set({ loopbackOnly: e.target.checked })} /><span>${layoutText("revAuthorityLocal")}</span></label>
|
|
93
|
+
<p class="note">${layoutText("revAuthorityLocalHint")}</p>
|
|
93
94
|
${warnHosts ? html`<p class="note s-va-warn" role="status" id="vaLanWarning">${tn("vaLanWarning", overview.lanHosts.join(", "))}</p>` : null}
|
|
94
|
-
${overview.namedHost || original.namedLink ? html`<label class=${fc("check", "namedLink")}><input id="vaNamedLink" type="checkbox" checked=${f.namedLink} onChange=${(e) => set({ namedLink: e.target.checked })} /><span>${tn("vaNamedLink", overview.namedHost || "—")}</span></label>
|
|
95
|
-
<p class="note">${tn("vaNamedLinkHint")}</p>` : null}
|
|
96
|
-
${/* §0.3: always shown — any fleet can open the temporary public link with /web. */ ""}
|
|
97
|
-
<label class=${fc("check", "quickLink")}><input id="vaQuickLink" type="checkbox" checked=${f.quickLink} onChange=${(e) => set({ quickLink: e.target.checked })} /><span>${tn("vaQuickLink")}</span></label>
|
|
98
|
-
<p class="note">${tn("vaQuickLinkHint")}</p>
|
|
99
95
|
<div class=${fc("field", "hours")}><label for="vaHours">${tn("vaHours", overview.hours.min, overview.hours.max)}</label>
|
|
100
96
|
<input id="vaHours" type="number" min=${overview.hours.min} max=${overview.hours.max} step="any"
|
|
101
97
|
class=${hoursError ? "invalid" : ""} value=${hoursText} onInput=${(e) => set({ hours: onHoursText(e.target.value) })} />
|
|
102
98
|
<${Feedback} error=${hoursError} />
|
|
103
99
|
${hoursText.trim() === "" ? html`<${InEffect} text=${tn("hoursValue", overview.hours.default)} />` : null}</div>
|
|
100
|
+
<p class="note s-authority-public-warning">${layoutText("revAuthorityPublicWarning")}</p>
|
|
101
|
+
<details class="s-authority-links"><summary>${layoutText("revAuthorityLinks")}</summary><div> ${overview.namedHost || original.namedLink ? html`<label class=${fc("check", "namedLink")}><input class="s-ui-toggle" id="vaNamedLink" type="checkbox" checked=${f.namedLink} onChange=${(e) => set({ namedLink: e.target.checked })} /><span>${tn("vaNamedLink", overview.namedHost || "—")}</span></label>
|
|
102
|
+
<p class="note">${tn("vaNamedLinkHint")}</p>` : null}
|
|
103
|
+
${/* §0.3: always shown — any fleet can open the temporary public link with /web. */ ""}
|
|
104
|
+
<label class=${fc("check", "quickLink")}><input class="s-ui-toggle" id="vaQuickLink" type="checkbox" checked=${f.quickLink} onChange=${(e) => set({ quickLink: e.target.checked })} /><span>${tn("vaQuickLink")}</span></label>
|
|
105
|
+
<p class="note">${tn("vaQuickLinkHint")}</p>
|
|
106
|
+
</div></details>
|
|
104
107
|
<h4>${tn("vaSessionsTitle")}</h4>
|
|
105
108
|
${overview.authorized.length
|
|
106
109
|
? html`<ul class="s-va-sessions" id="vaSessions">${overview.authorized.map((a) => html`<li key=${a.handle} data-handle=${a.handle}>
|
|
107
110
|
<strong>${a.label}</strong> <span class="note">${a.account}</span>${a.named ? html` <span class="note s-va-named">${tn("vaSessionNamed")}</span>` : null}${a.quick ? html` <span class="note s-va-named s-va-quick">${tn("vaSessionQuick")}</span>` : null}<br /><span class="note">${tn("vaSessionUntil", when(a.authorizedAt), when(a.until))}</span></li>`)}</ul>`
|
|
108
111
|
: html`<p class="note" id="vaSessionsNone">${tn("vaSessionsNone")}</p>`}
|
|
109
112
|
</fieldset>
|
|
110
|
-
<div class="save-row"><button type="button" class="btn btn-danger" id="vaRevoke" disabled=${disabled} onClick=${revoke}>${tn("vaRevoke")}</button></div>`);
|
|
113
|
+
<div class="save-row s-authority-revoke"><button type="button" class="btn btn-danger" id="vaRevoke" disabled=${disabled} onClick=${revoke}>${tn("vaRevoke")}</button></div>`);
|
|
111
114
|
}
|
|
@@ -21,6 +21,7 @@ import { useWebAuthorization } from "./web-authorize.js";
|
|
|
21
21
|
import { RightRail, sidePanelStore } from "./side-panel.js";
|
|
22
22
|
import { OwnerCssKeepBar } from "./owner-css.js";
|
|
23
23
|
import { AgentWidget, fleetBinds, sidebarWidget, sidebarWidgetStore } from "./agent-widget.js";
|
|
24
|
+
import { initSettingsContentWidth } from "./settings-width.js";
|
|
24
25
|
|
|
25
26
|
/** Shell state shared with panels: the phone drawer, the collapsed sidebar, extensions a panel module adds. */
|
|
26
27
|
export const shellStore = createStore({ drawer: false, collapsed: readCollapsed(), keyboard: false, dialog: null, side: null, banner: null });
|
|
@@ -127,6 +128,13 @@ export function clampSidebarWidth(w, vw) {
|
|
|
127
128
|
return Math.round(Math.min(max, Math.max(SIDEBAR_W.min, w)));
|
|
128
129
|
}
|
|
129
130
|
function storedSidebarWidth() { try { const v = Number(localStorage.getItem(SIDEBAR_W_KEY)); return Number.isFinite(v) && v > 0 ? v : null; } catch { return null; } }
|
|
131
|
+
|
|
132
|
+
// #2978 merge (stale tabs, quality rule 3): Settings' content width lives in its own module — a tab opened before an
|
|
133
|
+
// upgrade keeps this shell module, and a lazily loaded Settings panel that imported these names from here would fail to
|
|
134
|
+
// load at all. Re-exported, so the shell and its callers are unchanged.
|
|
135
|
+
export { SETTINGS_CONTENT_WIDTH_KEY, SETTINGS_CONTENT_WIDTHS, DEFAULT_SETTINGS_CONTENT_WIDTH, settingsContentWidthStore,
|
|
136
|
+
initSettingsContentWidth, setSettingsContentWidth } from "./settings-width.js";
|
|
137
|
+
|
|
130
138
|
/** { width: px | null } — null: the default width (tokens.css). */
|
|
131
139
|
export const sidebarWidthStore = createStore({ width: null });
|
|
132
140
|
/** Set the width (clamped to this viewport); `save`: this device keeps it. null: back to the default, nothing kept. */
|
|
@@ -422,23 +430,24 @@ function ViewOnlyNav({ route }) {
|
|
|
422
430
|
* This browser's theme and language (#1604: Settings → This device; for the anonymous View reader, the footer's
|
|
423
431
|
* popover). The same stores as ever: AgendTheme (theme.js) and setLang (app-i18n.js) — only where they are shown moved.
|
|
424
432
|
*/
|
|
425
|
-
export function DevicePrefs({ labels = false } = {}) {
|
|
433
|
+
export function DevicePrefs({ labels = false, fields = ["theme", "language", "names"] } = {}) {
|
|
426
434
|
const [theme, setTheme] = useState(typeof AgendTheme !== "undefined" ? AgendTheme.get() : "system");
|
|
427
435
|
const [l, setL] = useState(lang());
|
|
428
436
|
const names = useStore(namesStore); // #1722
|
|
429
437
|
// #1665: what is in force, as it changes — another device's choice arriving while this is open is shown at once.
|
|
430
438
|
useEffect(() => (typeof AgendTheme !== "undefined" && typeof AgendTheme.onChange === "function" ? AgendTheme.onChange(setTheme) : undefined), []);
|
|
431
439
|
useEffect(() => onLang(setL), []);
|
|
440
|
+
const shows = (field) => fields.includes(field);
|
|
432
441
|
return html`<div class=${`prefs${labels ? " labelled" : ""}`}>
|
|
433
|
-
|
|
442
|
+
${shows("theme") ? html`<label class="pref"><${Icon} name="sun" size=${16} /><span class=${labels ? "pref-label" : "sr-only"}>${t("app.theme")}</span>
|
|
434
443
|
<select id=${labels ? "pref-theme" : undefined} value=${theme} aria-label=${t("app.theme")} onChange=${(e) => { setTheme(e.target.value); if (typeof AgendTheme !== "undefined") AgendTheme.set(e.target.value); savePref("theme", e.target.value); }}>
|
|
435
|
-
<option value="system">${t("app.themeSystem")}</option><option value="light">${t("app.themeLight")}</option><option value="dark">${t("app.themeDark")}</option></select></label
|
|
436
|
-
|
|
444
|
+
<option value="system">${t("app.themeSystem")}</option><option value="light">${t("app.themeLight")}</option><option value="dark">${t("app.themeDark")}</option></select></label>` : null}
|
|
445
|
+
${shows("language") ? html`<label class="pref"><${Icon} name="globe" size=${16} /><span class=${labels ? "pref-label" : "sr-only"}>${t("app.language")}</span>
|
|
437
446
|
<select id=${labels ? "pref-lang" : undefined} value=${l} aria-label=${t("app.language")} onChange=${(e) => { setL(e.target.value); setLang(e.target.value); savePref("lang", e.target.value); }}>
|
|
438
|
-
<option value="en">English</option><option value="zh-TW">中文</option></select></label
|
|
439
|
-
|
|
447
|
+
<option value="en">English</option><option value="zh-TW">中文</option></select></label>` : null}
|
|
448
|
+
${shows("names") ? html`<label class="pref"><${Icon} name="user" size=${16} /><span class=${labels ? "pref-label" : "sr-only"}>${t("app.names")}</span>
|
|
440
449
|
<select id=${labels ? "pref-names" : undefined} value=${names.primary} aria-label=${t("app.names")} onChange=${(e) => setNamesPrimary(e.target.value)}>
|
|
441
|
-
<option value="nickname">${t("app.namesNickname")}</option><option value="instance">${t("app.namesInstance")}</option></select></label
|
|
450
|
+
<option value="nickname">${t("app.namesNickname")}</option><option value="instance">${t("app.namesInstance")}</option></select></label>` : null}
|
|
442
451
|
</div>`;
|
|
443
452
|
}
|
|
444
453
|
|
|
@@ -769,6 +778,7 @@ export function Shell({ panels, onNewInstance, viewOnly = false }) {
|
|
|
769
778
|
const nav = useStore(navStore);
|
|
770
779
|
const shell = useStore(shellStore);
|
|
771
780
|
const root = useRef(null);
|
|
781
|
+
useLayoutEffect(() => { initSettingsContentWidth(); }, []);
|
|
772
782
|
usePageTheme(root, nav.route);
|
|
773
783
|
const [, relang] = useState(0);
|
|
774
784
|
// A language switch re-renders everything and gives the panel a new lease (its key includes the language).
|