@songsid/agend 2.4.0-beta.15 → 2.4.0-beta.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/accounts-profiles.d.ts +1 -1
- package/dist/accounts-view.d.ts +3 -0
- package/dist/accounts-view.js.map +1 -1
- package/dist/auth-api.js +6 -0
- package/dist/auth-api.js.map +1 -1
- package/dist/backend/claude-code.d.ts +15 -1
- package/dist/backend/claude-code.js +64 -8
- package/dist/backend/claude-code.js.map +1 -1
- package/dist/backend/kiro.js +6 -1
- package/dist/backend/kiro.js.map +1 -1
- package/dist/backend/types.d.ts +8 -0
- package/dist/backend/types.js.map +1 -1
- package/dist/backend-command.d.ts +4 -2
- package/dist/backend-command.js +3 -0
- package/dist/backend-command.js.map +1 -1
- package/dist/browser-backend-signins.d.ts +1 -0
- package/dist/browser-backend-signins.js +3 -1
- package/dist/browser-backend-signins.js.map +1 -1
- package/dist/build-provenance.json +1 -1
- package/dist/classic-channel-manager.d.ts +1 -0
- package/dist/classic-channel-manager.js +4 -1
- package/dist/classic-channel-manager.js.map +1 -1
- package/dist/claude-credential-change.d.ts +22 -0
- package/dist/claude-credential-change.js +47 -0
- package/dist/claude-credential-change.js.map +1 -0
- package/dist/claude-credential-launch.d.ts +63 -0
- package/dist/claude-credential-launch.js +315 -0
- package/dist/claude-credential-launch.js.map +1 -0
- package/dist/claude-credential-runner.d.ts +1 -0
- package/dist/claude-credential-runner.js +56 -0
- package/dist/claude-credential-runner.js.map +1 -0
- package/dist/claude-credential-vault.d.ts +57 -0
- package/dist/claude-credential-vault.js +277 -0
- package/dist/claude-credential-vault.js.map +1 -0
- package/dist/claude-request-observation.d.ts +7 -0
- package/dist/claude-request-observation.js +26 -0
- package/dist/claude-request-observation.js.map +1 -0
- package/dist/claude-setup-token-transport.d.ts +9 -0
- package/dist/claude-setup-token-transport.js +82 -0
- package/dist/claude-setup-token-transport.js.map +1 -0
- package/dist/claude-setup-token.d.ts +51 -0
- package/dist/claude-setup-token.js +83 -0
- package/dist/claude-setup-token.js.map +1 -0
- package/dist/cli-audited.js +15 -12
- package/dist/cli-audited.js.map +1 -1
- package/dist/command-report.d.ts +11 -0
- package/dist/command-report.js +2 -0
- package/dist/command-report.js.map +1 -0
- package/dist/config-validator.js +9 -0
- package/dist/config-validator.js.map +1 -1
- package/dist/config.js +4 -2
- package/dist/config.js.map +1 -1
- package/dist/daemon.d.ts +5 -0
- package/dist/daemon.js +65 -3
- package/dist/daemon.js.map +1 -1
- package/dist/fleet-level-config.d.ts +1 -1
- package/dist/fleet-level-config.js +1 -0
- package/dist/fleet-level-config.js.map +1 -1
- package/dist/fleet-manager.d.ts +53 -2
- package/dist/fleet-manager.js +511 -22
- package/dist/fleet-manager.js.map +1 -1
- package/dist/general-knowledge/skills/web-appearance/SKILL.md +4 -1
- package/dist/general-knowledge/skills/web-dashboard/SKILL.md +25 -6
- package/dist/host-monitoring-config.d.ts +15 -0
- package/dist/host-monitoring-config.js +36 -0
- package/dist/host-monitoring-config.js.map +1 -0
- package/dist/host-monitoring-history-files.d.ts +2 -0
- package/dist/host-monitoring-history-files.js +16 -0
- package/dist/host-monitoring-history-files.js.map +1 -0
- package/dist/host-monitoring-history-policy.d.ts +55 -0
- package/dist/host-monitoring-history-policy.js +93 -0
- package/dist/host-monitoring-history-policy.js.map +1 -0
- package/dist/host-monitoring-history-store.d.ts +52 -0
- package/dist/host-monitoring-history-store.js +176 -0
- package/dist/host-monitoring-history-store.js.map +1 -0
- package/dist/host-monitoring-history-worker.d.ts +1 -0
- package/dist/host-monitoring-history-worker.js +50 -0
- package/dist/host-monitoring-history-worker.js.map +1 -0
- package/dist/host-monitoring-history.d.ts +71 -0
- package/dist/host-monitoring-history.js +265 -0
- package/dist/host-monitoring-history.js.map +1 -0
- package/dist/host-monitoring-platform.d.ts +73 -0
- package/dist/host-monitoring-platform.js +273 -0
- package/dist/host-monitoring-platform.js.map +1 -0
- package/dist/host-monitoring-runtime.d.ts +34 -0
- package/dist/host-monitoring-runtime.js +80 -0
- package/dist/host-monitoring-runtime.js.map +1 -0
- package/dist/host-monitoring-settings-store.d.ts +5 -0
- package/dist/host-monitoring-settings-store.js +49 -0
- package/dist/host-monitoring-settings-store.js.map +1 -0
- package/dist/host-monitoring.d.ts +106 -0
- package/dist/host-monitoring.js +157 -0
- package/dist/host-monitoring.js.map +1 -0
- package/dist/hub/group-policy/resources.d.ts +1 -1
- package/dist/instance-config-impact.js +1 -1
- package/dist/instance-config-impact.js.map +1 -1
- package/dist/instructions.js +1 -0
- package/dist/instructions.js.map +1 -1
- package/dist/locale.d.ts +2 -0
- package/dist/locale.js +13 -1
- package/dist/locale.js.map +1 -1
- package/dist/office-share-page.js +1 -1
- package/dist/office-share-page.js.map +1 -1
- package/dist/profile-signins.d.ts +1 -0
- package/dist/profile-signins.js +3 -1
- package/dist/profile-signins.js.map +1 -1
- package/dist/public-web-gateway.js +6 -0
- package/dist/public-web-gateway.js.map +1 -1
- package/dist/public-web-link.d.ts +21 -2
- package/dist/public-web-link.js +22 -2
- package/dist/public-web-link.js.map +1 -1
- package/dist/runtime-cli-install.js +17 -16
- package/dist/runtime-cli-install.js.map +1 -1
- package/dist/settings-api.d.ts +15 -0
- package/dist/settings-api.js +154 -8
- package/dist/settings-api.js.map +1 -1
- package/dist/settings-baseline.d.ts +1 -0
- package/dist/settings-baseline.js +5 -4
- package/dist/settings-baseline.js.map +1 -1
- package/dist/settings-change.js +10 -0
- package/dist/settings-change.js.map +1 -1
- package/dist/settings-effect.d.ts +2 -0
- package/dist/settings-effect.js +15 -1
- package/dist/settings-effect.js.map +1 -1
- package/dist/topic-commands.d.ts +7 -1
- package/dist/topic-commands.js +98 -88
- package/dist/topic-commands.js.map +1 -1
- package/dist/transcript-monitor.d.ts +1 -0
- package/dist/transcript-monitor.js +18 -0
- package/dist/transcript-monitor.js.map +1 -1
- package/dist/types.d.ts +2 -0
- package/dist/ui/accounts-view.js +16 -8
- package/dist/ui/backend-signin.js +3 -1
- package/dist/ui/chat-commands.js +2 -0
- package/dist/ui/chat-popout-transport.js +49 -19
- package/dist/ui/chat-popout.js +15 -1
- package/dist/ui/chat-store.js +1 -1
- package/dist/ui/claude-credentials.js +123 -0
- package/dist/ui/claude-setup-token.js +36 -0
- package/dist/ui/contact-auth-client.js +7 -2
- package/dist/ui/contact-auth-strings.js +45 -14
- package/dist/ui/contact-authorizations.js +47 -26
- package/dist/ui/contact-needs.js +4 -4
- package/dist/ui/fleet-canvas.js +3 -2
- package/dist/ui/fleet-office-card.js +414 -41
- package/dist/ui/fleet-office-dialogue.js +3 -3
- package/dist/ui/fleet-office-pack.d.ts +67 -1
- package/dist/ui/fleet-office-pack.js +412 -18
- package/dist/ui/fleet-office-play.js +401 -3
- package/dist/ui/fleet-office-skin.js +133 -21
- package/dist/ui/fleet-office-store.js +41 -0
- package/dist/ui/fleet-office-zones.js +34 -9
- package/dist/ui/fleet-office.js +513 -62
- package/dist/ui/host-health-model.js +42 -0
- package/dist/ui/host-health.js +74 -0
- package/dist/ui/office-share-page.js +5 -1
- package/dist/ui/panel-chat.js +146 -46
- package/dist/ui/panel-fleet.js +24 -11
- package/dist/ui/panel-hub.js +5 -1
- package/dist/ui/panel-settings.js +5 -4
- package/dist/ui/preview-popout.js +134 -0
- package/dist/ui/reply-file-preview.js +1 -1
- package/dist/ui/search-dialog.js +8 -1
- package/dist/ui/settings-capabilities.js +2 -0
- package/dist/ui/settings-host-monitoring.js +69 -0
- package/dist/ui/settings-registry.js +4 -1
- package/dist/ui/settings-shared.js +3 -2
- package/dist/ui/shared/accounts.css +8 -4
- package/dist/ui/shared/agent-sheet.js +5 -2
- package/dist/ui/shared/app-route.js +1 -1
- package/dist/ui/shared/app.css +248 -27
- package/dist/ui/shared/app.js +8 -1
- package/dist/ui/shared/chat-strings.js +10 -4
- package/dist/ui/shared/chat-thread.js +42 -10
- package/dist/ui/shared/info-tip.js +64 -0
- package/dist/ui/shared/instance-nav.js +47 -5
- package/dist/ui/shared/jump-idle.js +36 -0
- package/dist/ui/shared/office-dialogue.css +12 -0
- package/dist/ui/shared/preview-panel.js +44 -18
- package/dist/ui/shared/preview-popout.css +11 -0
- package/dist/ui/shared/theme.js +15 -1
- package/dist/ui/shared/ui-menu.js +17 -11
- package/dist/ui/shared/usage-dialog.js +9 -34
- package/dist/ui/shared/view-strings.js +2 -0
- package/dist/usage/i18n-keys.d.ts +1 -1
- package/dist/usage/i18n-keys.js +1 -1
- package/dist/usage/i18n-keys.js.map +1 -1
- package/dist/usage/providers.d.ts +1 -0
- package/dist/usage/providers.js +14 -1
- package/dist/usage/providers.js.map +1 -1
- package/dist/usage/usage-api.js +5 -2
- package/dist/usage/usage-api.js.map +1 -1
- package/dist/web-api.d.ts +6 -1
- package/dist/web-api.js +83 -9
- package/dist/web-api.js.map +1 -1
- package/dist/web-chat-history.d.ts +7 -1
- package/dist/web-chat-history.js +19 -3
- package/dist/web-chat-history.js.map +1 -1
- package/dist/web-claude-credentials.d.ts +31 -0
- package/dist/web-claude-credentials.js +138 -0
- package/dist/web-claude-credentials.js.map +1 -0
- package/dist/web-commands.d.ts +5 -2
- package/dist/web-commands.js +4 -2
- package/dist/web-commands.js.map +1 -1
- package/dist/web-office-skins.d.ts +7 -2
- package/dist/web-office-skins.js +42 -16
- package/dist/web-office-skins.js.map +1 -1
- package/dist/web-session.d.ts +20 -1
- package/dist/web-session.js +27 -0
- package/dist/web-session.js.map +1 -1
- package/dist/web-shell-routes.d.ts +1 -1
- package/dist/web-shell-routes.js +1 -1
- package/dist/web-shell-routes.js.map +1 -1
- package/dist/web-terminal.d.ts +4 -0
- package/dist/web-terminal.js +16 -1
- package/dist/web-terminal.js.map +1 -1
- package/package.json +1 -1
package/dist/web-api.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { historyQuery } from './host-monitoring-history-policy.js';
|
|
2
|
+
import { handleClaudeCredentials } from "./web-claude-credentials.js";
|
|
1
3
|
import { pipeline } from "node:stream/promises";
|
|
2
4
|
import { handleContactAuthorizationApi } from "./contact-auth-api.js";
|
|
3
5
|
import { buildAgentExport, parseAgentExport } from "./agent-export.js";
|
|
@@ -223,7 +225,13 @@ const streamContactProjection = new WeakMap();
|
|
|
223
225
|
function contactNeedsFor(req, url, ctx, base) {
|
|
224
226
|
const ordinary = base.filter(item => !item || typeof item !== "object" || item.type !== "contact");
|
|
225
227
|
const actor = ctx.contactActor?.(req, url);
|
|
226
|
-
|
|
228
|
+
if (actor && ctx.contactNeeds)
|
|
229
|
+
return [...ordinary, ...ctx.contactNeeds(actor)];
|
|
230
|
+
const observer = ctx.contactSuggestionActor?.(req, url);
|
|
231
|
+
// A session identity may see benign room suggestions, never pending approval tickets.
|
|
232
|
+
const suggestions = observer && ctx.contactNeeds ? ctx.contactNeeds(observer).filter(item => item && typeof item === "object"
|
|
233
|
+
&& item.reason === "contact_restricted_suggestion") : [];
|
|
234
|
+
return [...ordinary, ...suggestions];
|
|
227
235
|
}
|
|
228
236
|
/**
|
|
229
237
|
* The task board's rule over the public link: an instance kept out of sight (cross_instance_visibility: hidden) is not
|
|
@@ -1835,6 +1843,7 @@ function handleHostInstall(req, res, url, ctx, path, method) {
|
|
|
1835
1843
|
* or a read session (M-3278: the public link's admin session may) — refused before the body is read, and again after it.
|
|
1836
1844
|
*/
|
|
1837
1845
|
const ACCOUNT_STATUS = {
|
|
1846
|
+
credential_connected: 409,
|
|
1838
1847
|
backend: 400, name: 400, confirm: 400, exists: 409, case_clash: 409, unsafe_root: 409, in_use: 409, users_unknown: 409, signing_in: 409, missing: 404,
|
|
1839
1848
|
unsafe: 409, default_home: 409, failed: 500, unsupported: 400, still_signed_in: 409,
|
|
1840
1849
|
// #3190 Part 3c: a paired computer (the Runtime there decides; these are what the server can say before it asks, or what the computer answered).
|
|
@@ -2617,6 +2626,59 @@ function statusTick(ctx, t) {
|
|
|
2617
2626
|
export function handleWebRequest(req, res, url, ctx) {
|
|
2618
2627
|
const path = url.pathname;
|
|
2619
2628
|
const method = req.method ?? "GET";
|
|
2629
|
+
if (path === "/ui/host-history") {
|
|
2630
|
+
res.setHeader("Cache-Control", "private, no-store");
|
|
2631
|
+
const auth = () => evaluateWebRequest(req, url, ctx.webToken ?? null, ctx.webSessions, { touch: false });
|
|
2632
|
+
const who = auth();
|
|
2633
|
+
if (who.kind !== "allow" || who.via !== "session" || who.session.tier !== "admin") {
|
|
2634
|
+
json(res, 403, { error: "admin_session_required" });
|
|
2635
|
+
return true;
|
|
2636
|
+
}
|
|
2637
|
+
const range = url.searchParams.get('range'), series = url.searchParams.getAll('series');
|
|
2638
|
+
try {
|
|
2639
|
+
if (method !== "GET" || url.search.length > 4096 || url.searchParams.getAll('range').length !== 1 || [...url.searchParams.keys()].some(k => k !== 'range' && k !== 'series'))
|
|
2640
|
+
throw Error();
|
|
2641
|
+
historyQuery(range, series, Date.now());
|
|
2642
|
+
}
|
|
2643
|
+
catch {
|
|
2644
|
+
json(res, 400, { error: "invalid_history_query" });
|
|
2645
|
+
return true;
|
|
2646
|
+
}
|
|
2647
|
+
if (!ctx.hostHistoryQuery) {
|
|
2648
|
+
json(res, 503, { error: "history_unavailable" });
|
|
2649
|
+
return true;
|
|
2650
|
+
}
|
|
2651
|
+
void Promise.resolve().then(() => ctx.hostHistoryQuery(range, series)).then(answer => {
|
|
2652
|
+
if (res.destroyed)
|
|
2653
|
+
return;
|
|
2654
|
+
const current = auth();
|
|
2655
|
+
if (current.kind !== "allow" || current.via !== "session" || current.session.tier !== "admin" || current.session.idHash !== who.session.idHash) {
|
|
2656
|
+
json(res, 403, { error: "admin_session_required" });
|
|
2657
|
+
return;
|
|
2658
|
+
}
|
|
2659
|
+
json(res, 200, answer);
|
|
2660
|
+
}, () => { if (!res.destroyed)
|
|
2661
|
+
json(res, 503, { error: "history_unavailable" }); });
|
|
2662
|
+
return true;
|
|
2663
|
+
}
|
|
2664
|
+
if (path === "/ui/host-health") {
|
|
2665
|
+
res.setHeader("Cache-Control", "private, no-store");
|
|
2666
|
+
const who = evaluateWebRequest(req, url, ctx.webToken ?? null, ctx.webSessions, { touch: false });
|
|
2667
|
+
if (who.kind !== "allow" || who.via !== "session" || who.session.tier !== "admin") {
|
|
2668
|
+
json(res, 403, { error: "admin_session_required" });
|
|
2669
|
+
return true;
|
|
2670
|
+
}
|
|
2671
|
+
if (method !== "GET" || url.search) {
|
|
2672
|
+
json(res, 400, { error: "invalid_host_health_request" });
|
|
2673
|
+
return true;
|
|
2674
|
+
}
|
|
2675
|
+
if (!ctx.hostHealthSnapshot) {
|
|
2676
|
+
json(res, 503, { error: "host_monitoring_unavailable" });
|
|
2677
|
+
return true;
|
|
2678
|
+
}
|
|
2679
|
+
json(res, 200, ctx.hostHealthSnapshot());
|
|
2680
|
+
return true;
|
|
2681
|
+
}
|
|
2620
2682
|
// Auth check for all /ui routes. Defence in depth behind the fleet-manager
|
|
2621
2683
|
// gate: the same session cookie or header token, and an unset token closes
|
|
2622
2684
|
// the panel instead of comparing null against a missing credential.
|
|
@@ -4310,6 +4372,8 @@ export function handleWebRequest(req, res, url, ctx) {
|
|
|
4310
4372
|
// #3292: before the accounts prefix — its Add pattern (`POST /ui/accounts/<backend>`) would read "keep-alive" as a backend.
|
|
4311
4373
|
if (path === "/ui/accounts/keep-alive")
|
|
4312
4374
|
return handleAccountKeepAlive(req, res, url, ctx, method);
|
|
4375
|
+
if (handleClaudeCredentials(req, res, url, ctx))
|
|
4376
|
+
return true;
|
|
4313
4377
|
if (path.startsWith("/ui/accounts/"))
|
|
4314
4378
|
return handleAccountWrite(req, res, url, ctx, path, method);
|
|
4315
4379
|
// #1386: Acknowledge a "Needs you" delivery item — a session write (CSRF, checked by the gate) or the CLI's header
|
|
@@ -4655,17 +4719,27 @@ export function handleWebRequest(req, res, url, ctx) {
|
|
|
4655
4719
|
return;
|
|
4656
4720
|
}
|
|
4657
4721
|
if (id.startsWith("contact-suggest:")) {
|
|
4658
|
-
const actor = ctx.contactActor?.(req, url);
|
|
4659
|
-
if (!actor || !ctx.acknowledgeContactSuggestion) {
|
|
4660
|
-
json(res, 403, { error: "forbidden" });
|
|
4661
|
-
return;
|
|
4662
|
-
}
|
|
4663
4722
|
try {
|
|
4664
|
-
ctx.
|
|
4723
|
+
if (ctx.acknowledgeContactSuggestionFromWeb)
|
|
4724
|
+
ctx.acknowledgeContactSuggestionFromWeb(id.slice("contact-suggest:".length), req, url);
|
|
4725
|
+
else {
|
|
4726
|
+
const actor = ctx.contactActor?.(req, url);
|
|
4727
|
+
if (!actor || !ctx.acknowledgeContactSuggestion)
|
|
4728
|
+
throw Error("verification-required");
|
|
4729
|
+
ctx.acknowledgeContactSuggestion(id.slice("contact-suggest:".length), actor);
|
|
4730
|
+
}
|
|
4665
4731
|
json(res, 200, { acknowledged: true });
|
|
4666
4732
|
}
|
|
4667
|
-
catch {
|
|
4668
|
-
|
|
4733
|
+
catch (err) {
|
|
4734
|
+
const code = err instanceof Error ? err.message : "";
|
|
4735
|
+
if (code === "forbidden" || code === "verification-required")
|
|
4736
|
+
json(res, 403, { error: code, code });
|
|
4737
|
+
else {
|
|
4738
|
+
const raw = err && typeof err === "object" ? err.code : undefined;
|
|
4739
|
+
const cause = typeof raw === "string" && /^[A-Z][A-Z0-9_]{1,48}$/.test(raw) ? raw : "unknown";
|
|
4740
|
+
ctx.logger.error({ code: cause }, "Contact suggestion dismissal could not be saved");
|
|
4741
|
+
json(res, 503, { error: "unavailable", code: "unavailable" });
|
|
4742
|
+
}
|
|
4669
4743
|
}
|
|
4670
4744
|
return;
|
|
4671
4745
|
}
|