@songsid/agend 2.3.0-beta.1 → 2.3.0-beta.10
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-cli-instructions.md +5 -2
- package/dist/agent-cli.js +43 -7
- package/dist/agent-cli.js.map +1 -1
- package/dist/agent-endpoint.js +4 -0
- package/dist/agent-endpoint.js.map +1 -1
- package/dist/agent-file-read.d.ts +14 -6
- package/dist/agent-file-read.js +207 -19
- package/dist/agent-file-read.js.map +1 -1
- package/dist/agent-whats-new.d.ts +11 -0
- package/dist/agent-whats-new.js +29 -15
- package/dist/agent-whats-new.js.map +1 -1
- package/dist/auth-api.d.ts +30 -1
- package/dist/auth-api.js +45 -13
- package/dist/auth-api.js.map +1 -1
- package/dist/authority/authority-state.d.ts +38 -0
- package/dist/authority/authority-state.js +114 -0
- package/dist/authority/authority-state.js.map +1 -0
- package/dist/authority/session-authorizations.d.ts +43 -0
- package/dist/authority/session-authorizations.js +102 -0
- package/dist/authority/session-authorizations.js.map +1 -0
- package/dist/authority/web-authority.d.ts +120 -0
- package/dist/authority/web-authority.js +157 -0
- package/dist/authority/web-authority.js.map +1 -0
- package/dist/backend/claude-code.d.ts +2 -2
- package/dist/backend/claude-code.js +10 -5
- package/dist/backend/claude-code.js.map +1 -1
- package/dist/backend/types.d.ts +14 -0
- package/dist/backend/types.js +25 -0
- package/dist/backend/types.js.map +1 -1
- package/dist/backend-availability.d.ts +120 -0
- package/dist/backend-availability.js +396 -0
- package/dist/backend-availability.js.map +1 -0
- package/dist/backend-command.d.ts +21 -3
- package/dist/backend-command.js +23 -4
- package/dist/backend-command.js.map +1 -1
- package/dist/bundled-skills.d.ts +14 -0
- package/dist/bundled-skills.js +29 -0
- package/dist/bundled-skills.js.map +1 -0
- package/dist/cache-analysis.d.ts +47 -1
- package/dist/cache-analysis.js +68 -8
- package/dist/cache-analysis.js.map +1 -1
- package/dist/cache-ledger.d.ts +16 -3
- package/dist/cache-ledger.js +33 -13
- package/dist/cache-ledger.js.map +1 -1
- package/dist/cache-report-tool.d.ts +17 -0
- package/dist/cache-report-tool.js +40 -0
- package/dist/cache-report-tool.js.map +1 -0
- package/dist/cache-service.d.ts +70 -3
- package/dist/cache-service.js +178 -17
- package/dist/cache-service.js.map +1 -1
- package/dist/channel/adapters/discord.d.ts +7 -0
- package/dist/channel/adapters/discord.js +35 -0
- package/dist/channel/adapters/discord.js.map +1 -1
- package/dist/channel/mcp-tools.js +22 -10
- package/dist/channel/mcp-tools.js.map +1 -1
- package/dist/channel/types.d.ts +6 -0
- package/dist/classic-channel-manager.d.ts +10 -5
- package/dist/classic-channel-manager.js +12 -9
- package/dist/classic-channel-manager.js.map +1 -1
- package/dist/cli.js +130 -31
- package/dist/cli.js.map +1 -1
- package/dist/config-validator.js +103 -4
- package/dist/config-validator.js.map +1 -1
- package/dist/daemon.d.ts +7 -0
- package/dist/daemon.js +63 -16
- package/dist/daemon.js.map +1 -1
- package/dist/decision-list.d.ts +25 -0
- package/dist/decision-list.js +30 -0
- package/dist/decision-list.js.map +1 -0
- package/dist/delivery-outbox.d.ts +10 -0
- package/dist/delivery-outbox.js +12 -1
- package/dist/delivery-outbox.js.map +1 -1
- package/dist/fleet-context.d.ts +10 -0
- package/dist/fleet-manager.d.ts +417 -11
- package/dist/fleet-manager.js +1387 -109
- package/dist/fleet-manager.js.map +1 -1
- package/dist/fleet-traffic.d.ts +74 -0
- package/dist/fleet-traffic.js +196 -0
- package/dist/fleet-traffic.js.map +1 -0
- package/dist/general-knowledge/skills/credential-profiles/SKILL.md +20 -5
- package/dist/general-knowledge/skills/cross-instance-messaging/SKILL.md +6 -1
- package/dist/general-knowledge/skills/multi-channel/SKILL.md +3 -2
- package/dist/general-knowledge/skills/persona-emoji/SKILL.md +1 -1
- package/dist/general-knowledge/skills/web-appearance/SKILL.md +257 -23
- package/dist/general-knowledge/skills/web-dashboard/SKILL.md +476 -0
- package/dist/general-knowledge/skills/worker-collaboration/SKILL.md +1 -1
- package/dist/human-delivery-receipts.d.ts +24 -1
- package/dist/human-delivery-receipts.js +64 -11
- package/dist/human-delivery-receipts.js.map +1 -1
- package/dist/instance-config-impact.js +3 -1
- package/dist/instance-config-impact.js.map +1 -1
- package/dist/instance-names.d.ts +4 -0
- package/dist/instance-names.js +12 -0
- package/dist/instance-names.js.map +1 -0
- package/dist/instructions.d.ts +12 -1
- package/dist/instructions.js +13 -2
- package/dist/instructions.js.map +1 -1
- package/dist/locale.js +100 -8
- package/dist/locale.js.map +1 -1
- package/dist/ls-attach-resolve.d.ts +95 -0
- package/dist/ls-attach-resolve.js +174 -0
- package/dist/ls-attach-resolve.js.map +1 -0
- package/dist/memory-hogs.d.ts +27 -0
- package/dist/memory-hogs.js +124 -0
- package/dist/memory-hogs.js.map +1 -0
- package/dist/outbound-handlers.d.ts +10 -0
- package/dist/outbound-handlers.js +122 -2
- package/dist/outbound-handlers.js.map +1 -1
- package/dist/outbound-schemas.d.ts +164 -4
- package/dist/outbound-schemas.js +99 -3
- package/dist/outbound-schemas.js.map +1 -1
- package/dist/public-web-gateway.js +8 -2
- package/dist/public-web-gateway.js.map +1 -1
- package/dist/public-web-link.d.ts +9 -0
- package/dist/public-web-link.js +8 -0
- package/dist/public-web-link.js.map +1 -1
- package/dist/quickstart-api.d.ts +10 -1
- package/dist/quickstart-api.js +12 -4
- package/dist/quickstart-api.js.map +1 -1
- package/dist/reply-buttons-controller.d.ts +4 -0
- package/dist/reply-buttons-controller.js +2 -2
- package/dist/reply-buttons-controller.js.map +1 -1
- package/dist/restart-progress.d.ts +65 -1
- package/dist/restart-progress.js +236 -10
- package/dist/restart-progress.js.map +1 -1
- package/dist/rollout-index.d.ts +5 -0
- package/dist/rollout-index.js +26 -5
- package/dist/rollout-index.js.map +1 -1
- package/dist/scheduler/scheduler.d.ts +12 -0
- package/dist/scheduler/scheduler.js +83 -10
- package/dist/scheduler/scheduler.js.map +1 -1
- package/dist/service-installer.d.ts +2 -1
- package/dist/service-installer.js +18 -3
- package/dist/service-installer.js.map +1 -1
- package/dist/settings-api.d.ts +19 -0
- package/dist/settings-api.js +137 -2
- package/dist/settings-api.js.map +1 -1
- package/dist/settings-change.js +104 -0
- package/dist/settings-change.js.map +1 -1
- package/dist/settings-effect.js +17 -1
- package/dist/settings-effect.js.map +1 -1
- package/dist/tmux-manager.d.ts +5 -0
- package/dist/tmux-manager.js +16 -0
- package/dist/tmux-manager.js.map +1 -1
- package/dist/tool-permissions.d.ts +4 -6
- package/dist/tool-permissions.js +53 -5
- package/dist/tool-permissions.js.map +1 -1
- package/dist/topic-commands.d.ts +7 -1
- package/dist/topic-commands.js +18 -4
- package/dist/topic-commands.js.map +1 -1
- package/dist/types.d.ts +48 -1
- package/dist/ui/app-effects.js +77 -31
- package/dist/ui/chat-ambient.js +307 -0
- package/dist/ui/chat-effect-posters.js +8 -8
- package/dist/ui/chat-effects.js +101 -13
- package/dist/ui/chat-render.js +5 -2
- package/dist/ui/chat-strings.js +59 -6
- package/dist/ui/chat-thread.js +149 -21
- package/dist/ui/effect-trial-controller.js +13 -8
- package/dist/ui/effect-trial-panel.js +19 -16
- package/dist/ui/fleet-cache.js +23 -1
- package/dist/ui/fleet-canvas-layout.js +111 -0
- package/dist/ui/fleet-canvas.js +525 -0
- package/dist/ui/fleet-org.js +27 -12
- package/dist/ui/fleet-traffic.js +343 -0
- package/dist/ui/fleet-usage.js +401 -0
- package/dist/ui/panel-chat.js +127 -49
- package/dist/ui/panel-details.js +2 -1
- package/dist/ui/panel-fleet.js +41 -16
- package/dist/ui/panel-settings.js +26 -8
- package/dist/ui/preview.js +3 -2
- package/dist/ui/settings-appearance.js +42 -18
- package/dist/ui/settings-catalog.js +92 -0
- package/dist/ui/settings-dialogs.js +40 -12
- package/dist/ui/settings-effects.js +4 -3
- package/dist/ui/settings-guests.js +117 -0
- package/dist/ui/settings-learn.js +25 -0
- package/dist/ui/settings-model.js +15 -6
- package/dist/ui/settings-mods.js +23 -9
- package/dist/ui/settings-owner-effects.js +9 -9
- package/dist/ui/settings-strings.js +120 -42
- package/dist/ui/settings-web-authority.js +91 -0
- package/dist/ui/shared/agend-auth.js +1 -1
- package/dist/ui/shared/app-i18n.js +4 -2
- package/dist/ui/shared/app-prefs.js +5 -4
- package/dist/ui/shared/app-route.js +1 -1
- package/dist/ui/shared/app-session.js +2 -0
- package/dist/ui/shared/app-shell.js +75 -9
- package/dist/ui/shared/app-store.js +26 -1
- package/dist/ui/shared/app-stream.js +3 -1
- package/dist/ui/shared/app-themes.js +24 -6
- package/dist/ui/shared/app.css +364 -16
- package/dist/ui/shared/app.js +21 -14
- package/dist/ui/shared/card-strings.js +4 -0
- package/dist/ui/shared/effect-app-runtime.js +68 -19
- package/dist/ui/shared/effect-chat-runtime.js +16 -3
- package/dist/ui/shared/effect-frame.js +26 -7
- package/dist/ui/shared/effect-geometry.js +24 -9
- package/dist/ui/shared/effect-policy.js +21 -7
- package/dist/ui/shared/effect-profiler.js +31 -9
- package/dist/ui/shared/effect-registry.js +87 -48
- package/dist/ui/shared/effect-stock-snapshot.js +9 -0
- package/dist/ui/shared/effect-stock-trust.js +62 -10
- package/dist/ui/shared/effect-trial-shadow.js +62 -0
- package/dist/ui/shared/effect-trial-source.js +1 -1
- package/dist/ui/shared/effect-trial-stage.js +54 -31
- package/dist/ui/shared/effect-trial.css +40 -0
- package/dist/ui/shared/fx-motion.js +67 -0
- package/dist/ui/shared/identity-card.js +75 -4
- package/dist/ui/shared/identity-color.js +3 -3
- package/dist/ui/shared/instance-nav.js +194 -28
- package/dist/ui/shared/panel-view.js +24 -4
- package/dist/ui/shared/tokens.css +9 -3
- package/dist/ui/shared/ui-icons.js +1 -0
- package/dist/ui/shared/usage-dialog.js +22 -2
- package/dist/ui/shared/view-strings.js +68 -2
- package/dist/ui/shared/web-authorize.js +151 -0
- package/dist/ui/signin.html +1 -1
- package/dist/ui/web-terminal/terminal.css +4 -4
- package/dist/usage/providers.d.ts +28 -0
- package/dist/usage/providers.js +126 -36
- package/dist/usage/providers.js.map +1 -1
- package/dist/usage-report.d.ts +158 -0
- package/dist/usage-report.js +226 -0
- package/dist/usage-report.js.map +1 -0
- package/dist/usage-rollup.d.ts +51 -0
- package/dist/usage-rollup.js +168 -0
- package/dist/usage-rollup.js.map +1 -0
- package/dist/view-api.d.ts +39 -0
- package/dist/view-api.js +65 -4
- package/dist/view-api.js.map +1 -1
- package/dist/web-ambient.d.ts +72 -0
- package/dist/web-ambient.js +161 -0
- package/dist/web-ambient.js.map +1 -0
- package/dist/web-api.d.ts +69 -5
- package/dist/web-api.js +362 -45
- package/dist/web-api.js.map +1 -1
- package/dist/web-appearance-policy.d.ts +4 -6
- package/dist/web-appearance-policy.js +5 -12
- package/dist/web-appearance-policy.js.map +1 -1
- package/dist/web-appearance-tools.d.ts +3 -0
- package/dist/web-appearance-tools.js +22 -3
- package/dist/web-appearance-tools.js.map +1 -1
- package/dist/web-appearance-view.d.ts +27 -2
- package/dist/web-appearance-view.js +129 -14
- package/dist/web-appearance-view.js.map +1 -1
- package/dist/web-appearance.d.ts +17 -3
- package/dist/web-appearance.js +82 -7
- package/dist/web-appearance.js.map +1 -1
- package/dist/web-asset-parts.d.ts +5 -10
- package/dist/web-asset-parts.js +3 -3
- package/dist/web-asset-parts.js.map +1 -1
- package/dist/web-auth.js +3 -1
- package/dist/web-auth.js.map +1 -1
- package/dist/web-card.d.ts +14 -0
- package/dist/web-card.js +40 -6
- package/dist/web-card.js.map +1 -1
- package/dist/web-channel-echo.d.ts +7 -1
- package/dist/web-channel-echo.js +6 -2
- package/dist/web-channel-echo.js.map +1 -1
- package/dist/web-chat-history.d.ts +46 -0
- package/dist/web-chat-history.js +80 -3
- package/dist/web-chat-history.js.map +1 -1
- package/dist/web-commands.d.ts +1 -0
- package/dist/web-effect-bootstrap.d.ts +12 -0
- package/dist/web-effect-bootstrap.js +49 -0
- package/dist/web-effect-bootstrap.js.map +1 -0
- package/dist/web-effect-bundle.js +46 -1
- package/dist/web-effect-bundle.js.map +1 -1
- package/dist/web-effect-playback.d.ts +30 -0
- package/dist/web-effect-playback.js +71 -0
- package/dist/web-effect-playback.js.map +1 -0
- package/dist/web-effect-profiles.d.ts +4 -4
- package/dist/web-effect-service.d.ts +11 -4
- package/dist/web-effect-service.js +28 -5
- package/dist/web-effect-service.js.map +1 -1
- package/dist/web-effect-tools.d.ts +1 -0
- package/dist/web-effect-tools.js +8 -5
- package/dist/web-effect-tools.js.map +1 -1
- package/dist/web-effect-trials.d.ts +4 -4
- package/dist/web-effect-trials.js +6 -6
- package/dist/web-effect-trials.js.map +1 -1
- package/dist/web-effect-upload.d.ts +2 -4
- package/dist/web-effect-upload.js +3 -8
- package/dist/web-effect-upload.js.map +1 -1
- package/dist/web-effect-worker.d.ts +1 -1
- package/dist/web-effect-worker.js +2 -2
- package/dist/web-effect-worker.js.map +1 -1
- package/dist/web-effect.d.ts +14 -0
- package/dist/web-effect.js +21 -0
- package/dist/web-effect.js.map +1 -1
- package/dist/web-guest-access.d.ts +125 -0
- package/dist/web-guest-access.js +234 -0
- package/dist/web-guest-access.js.map +1 -0
- package/dist/web-guest-rooms.d.ts +82 -0
- package/dist/web-guest-rooms.js +135 -0
- package/dist/web-guest-rooms.js.map +1 -0
- package/dist/web-identity-color.d.ts +1 -1
- package/dist/web-identity-color.js +2 -2
- package/dist/web-identity-color.js.map +1 -1
- package/dist/web-identity-palette.d.ts +1 -1
- package/dist/web-identity-palette.js +2 -2
- package/dist/web-identity-palette.js.map +1 -1
- package/dist/web-login.d.ts +47 -0
- package/dist/web-login.js +115 -0
- package/dist/web-login.js.map +1 -1
- package/dist/web-mod-agent.d.ts +1 -1
- package/dist/web-mod-agent.js +12 -8
- package/dist/web-mod-agent.js.map +1 -1
- package/dist/web-mod-bundle.d.ts +14 -1
- package/dist/web-mod-bundle.js +68 -3
- package/dist/web-mod-bundle.js.map +1 -1
- package/dist/web-mod-export.d.ts +9 -0
- package/dist/web-mod-export.js +21 -0
- package/dist/web-mod-export.js.map +1 -1
- package/dist/web-mod-store.d.ts +7 -1
- package/dist/web-mod-store.js +21 -7
- package/dist/web-mod-store.js.map +1 -1
- package/dist/web-prefs.d.ts +14 -0
- package/dist/web-prefs.js +24 -4
- package/dist/web-prefs.js.map +1 -1
- package/dist/web-preview.d.ts +6 -2
- package/dist/web-preview.js +4 -2
- package/dist/web-preview.js.map +1 -1
- package/dist/web-returning-device.d.ts +41 -0
- package/dist/web-returning-device.js +57 -5
- package/dist/web-returning-device.js.map +1 -1
- package/dist/web-session-authorization.d.ts +132 -0
- package/dist/web-session-authorization.js +193 -0
- package/dist/web-session-authorization.js.map +1 -0
- package/dist/web-session.d.ts +70 -10
- package/dist/web-session.js +137 -22
- package/dist/web-session.js.map +1 -1
- package/dist/web-settings-patch.d.ts +49 -2
- package/dist/web-settings-patch.js +145 -1
- package/dist/web-settings-patch.js.map +1 -1
- package/dist/web-settings-tools.d.ts +89 -0
- package/dist/web-settings-tools.js +270 -0
- package/dist/web-settings-tools.js.map +1 -0
- 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-theme-store.d.ts +39 -0
- package/dist/web-theme-store.js +122 -11
- package/dist/web-theme-store.js.map +1 -1
- package/dist/web-theme.d.ts +2 -0
- package/dist/web-theme.js +10 -1
- package/dist/web-theme.js.map +1 -1
- package/dist/workflow-templates/default.md +1 -1
- package/package.json +1 -1
- package/templates/systemd.service.ejs +8 -0
package/dist/web-api.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type HumanOrigin } from "./human-delivery-receipts.js";
|
|
2
|
+
import { type HumanAuthority, type WebAuthorityResult, type WebPeer } from "./authority/web-authority.js";
|
|
2
3
|
import type { CachedImage } from "./web-images.js";
|
|
3
4
|
import type { SettingsExecution } from "./settings-transaction.js";
|
|
4
5
|
import type { PaneContextSource } from "./pane-context-cache.js";
|
|
@@ -13,17 +14,16 @@ import type { LifecycleCreateArgs } from "./instance-lifecycle.js";
|
|
|
13
14
|
import { type PreviewAvailability } from "./web-preview.js";
|
|
14
15
|
import { type WebChatHistory } from "./web-chat-history.js";
|
|
15
16
|
import { type WebFileLedger } from "./web-upload.js";
|
|
16
|
-
import type { WebSessionStore } from "./web-session.js";
|
|
17
|
+
import type { WebSessionStore, SessionRecord } from "./web-session.js";
|
|
17
18
|
import { type WebPrefsStore } from "./web-prefs.js";
|
|
18
19
|
import { type WebAccount } from "./web-profile.js";
|
|
19
20
|
import { type MentionNames, type MentionQuery } from "./web-mentions.js";
|
|
20
21
|
import type { ExplicitInstanceRemoval } from "./instance-removal.js";
|
|
21
22
|
/**
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
* the eviction the dead entry leaks forever, and without the try/catch a
|
|
25
|
-
* single dead client breaks delivery to every client iterated after it.
|
|
23
|
+
* #1920 §5.2: one event for the guests' streams only, each as projected for it — a message that has just become what
|
|
24
|
+
* its channel saw (an admin's page already has it, unchanged).
|
|
26
25
|
*/
|
|
26
|
+
export declare function broadcastToGuests(clients: Set<ServerResponse>, event: string, data: unknown, onError?: (err: unknown) => void): void;
|
|
27
27
|
export declare function broadcastSseEvent(clients: Set<ServerResponse>, event: string, data: unknown, onError?: (err: unknown) => void, id?: string): void;
|
|
28
28
|
/** One SSE frame; `id` (a chat message's) lets a reconnecting EventSource say what it last saw. */
|
|
29
29
|
export declare function sseFrame(event: string, data: unknown, id?: string): string;
|
|
@@ -32,6 +32,14 @@ export declare const SSE_HEARTBEAT_MS = 10000;
|
|
|
32
32
|
/** Minimal interface — only what web-api needs from FleetManager. */
|
|
33
33
|
export interface WebApiContext {
|
|
34
34
|
readonly webToken: string | null;
|
|
35
|
+
/** #2072: what this host can run (the published snapshot); absent in a hand-built context. */
|
|
36
|
+
backendAvailabilityRows?(): import("./backend-availability.js").BackendAvailability[];
|
|
37
|
+
/** #2072: a backend's cached model catalog, for an instance's own account when one is named; never a probe. */
|
|
38
|
+
modelCatalogFor?(backend: string, instance: string | null): Array<{
|
|
39
|
+
id: string;
|
|
40
|
+
label: string;
|
|
41
|
+
description?: string;
|
|
42
|
+
}>;
|
|
35
43
|
/** Absent in a hand-built context: cookies are then simply not a credential, the header token still is. */
|
|
36
44
|
readonly webSessions?: WebSessionStore | null;
|
|
37
45
|
readonly dataDir: string;
|
|
@@ -41,9 +49,11 @@ export interface WebApiContext {
|
|
|
41
49
|
group_id?: number | string;
|
|
42
50
|
mode?: string;
|
|
43
51
|
};
|
|
52
|
+
health_port?: number;
|
|
44
53
|
web?: {
|
|
45
54
|
echo_to_channel?: boolean;
|
|
46
55
|
usage_panel?: boolean;
|
|
56
|
+
usage_report_on_public_link?: boolean;
|
|
47
57
|
upload_max_file_mb?: number;
|
|
48
58
|
upload_max_total_mb?: number;
|
|
49
59
|
};
|
|
@@ -113,6 +123,8 @@ export interface WebApiContext {
|
|
|
113
123
|
* many channels were posted to. Never rejects the web send on failure.
|
|
114
124
|
*/
|
|
115
125
|
sendClassicWebEcho?(instance: string, text: string, sender?: string): Promise<number>;
|
|
126
|
+
/** #1920 §5.2: a web message's channel copy was sent — guests of that channel may see it now. */
|
|
127
|
+
webMessageInChannel?(instance: string, messageId: string): void;
|
|
116
128
|
/** false: definitely not delivered (the instance's IPC is gone, or it was restarted meanwhile). */
|
|
117
129
|
deliverToInstance(instanceName: string, payload: Record<string, unknown>): Promise<boolean | void>;
|
|
118
130
|
deliverHumanToInstance?(instanceName: string, payload: Record<string, unknown>, origin: HumanOrigin, originalBody: string): Promise<boolean | void>;
|
|
@@ -120,6 +132,7 @@ export interface WebApiContext {
|
|
|
120
132
|
/** Current owned pane reader shared with status; absent means context is unavailable. */
|
|
121
133
|
getPaneContextSource?(name: string): PaneContextSource | null;
|
|
122
134
|
/** #1306: which preview origin this /ui load may frame (Host and the TLS signal only); absent: previews off. */
|
|
135
|
+
readonly effectBoot?: string;
|
|
123
136
|
previewForUi?(hostHeader: string | undefined, secure: boolean): PreviewAvailability & {
|
|
124
137
|
boot: string | null;
|
|
125
138
|
};
|
|
@@ -177,10 +190,21 @@ export interface WebApiContext {
|
|
|
177
190
|
needsYouItems?(): unknown[];
|
|
178
191
|
/** #1389: the org chart's structure (fleet.yaml's teams, General, descriptions, thread links); absent: an empty chart. */
|
|
179
192
|
orgChart?(): unknown;
|
|
193
|
+
/** #1918: in-flight and recently finished cross-instance traffic, bounded (fleet-traffic.ts). */
|
|
194
|
+
trafficSnapshot?(): {
|
|
195
|
+
now: string;
|
|
196
|
+
items: unknown[];
|
|
197
|
+
delegations?: unknown[];
|
|
198
|
+
};
|
|
180
199
|
/** #1218: an instance's Log steps, read on demand (null: no such instance; `{ enabled: false }`: the Log is off). */
|
|
181
200
|
logSteps?(name: string, q: import("./log-service.js").LogQuery): Promise<unknown>;
|
|
182
201
|
/** #1468: the prompt-cache expiry analysis for a window ("24h" | "7d" | "30d"); absent: not offered. */
|
|
183
202
|
cacheReport?(window: string): Promise<unknown>;
|
|
203
|
+
/** #2122: the usage report (Fleet → Usage); absent: not offered. */
|
|
204
|
+
usageReport?(params: {
|
|
205
|
+
range: import("./usage-report.js").UsageRange;
|
|
206
|
+
group: import("./usage-report.js").UsageGroup;
|
|
207
|
+
}): Promise<unknown>;
|
|
184
208
|
/** #1269: an instance's chat command from the web chat (web-commands.ts); absent: not offered. */
|
|
185
209
|
webCommand?(input: {
|
|
186
210
|
instance: string;
|
|
@@ -190,10 +214,41 @@ export interface WebApiContext {
|
|
|
190
214
|
}, opts: {
|
|
191
215
|
publicLink: boolean;
|
|
192
216
|
person?: WebPerson;
|
|
217
|
+
authority?: HumanAuthority;
|
|
193
218
|
}): Promise<{
|
|
194
219
|
status: number;
|
|
195
220
|
body: unknown;
|
|
196
221
|
}>;
|
|
222
|
+
/** #1939 S2b: "Authorize this browser" — the Confirm card in the account's DM; and what the app shows for this browser. */
|
|
223
|
+
requestSessionAuthorization?(input: {
|
|
224
|
+
session: SessionRecord | null;
|
|
225
|
+
gateway: boolean;
|
|
226
|
+
peer: WebPeer;
|
|
227
|
+
}): Promise<{
|
|
228
|
+
ok: true;
|
|
229
|
+
expiresInMs: number;
|
|
230
|
+
} | {
|
|
231
|
+
ok: false;
|
|
232
|
+
refusal: string;
|
|
233
|
+
retryAfterMs?: number;
|
|
234
|
+
}>;
|
|
235
|
+
webSessionAuthorization?(input: {
|
|
236
|
+
session: SessionRecord | null;
|
|
237
|
+
gateway: boolean;
|
|
238
|
+
peer: WebPeer;
|
|
239
|
+
}): {
|
|
240
|
+
state: string;
|
|
241
|
+
until?: number;
|
|
242
|
+
expiresInMs?: number;
|
|
243
|
+
reason?: string;
|
|
244
|
+
};
|
|
245
|
+
/** #1939 S1: the design's §3 for one request (`instance` once the body names it); absent: web carries no authority. */
|
|
246
|
+
webAuthority?(input: {
|
|
247
|
+
session: SessionRecord | null;
|
|
248
|
+
gateway: boolean;
|
|
249
|
+
peer: WebPeer;
|
|
250
|
+
instance?: string;
|
|
251
|
+
}): WebAuthorityResult;
|
|
197
252
|
/**
|
|
198
253
|
* #1827: a web person — for the account a session is bound to (none: the operator) — as agents and chats see them.
|
|
199
254
|
* Absent: everyone is "web-user", as before.
|
|
@@ -223,6 +278,8 @@ export interface WebApiContext {
|
|
|
223
278
|
key: string;
|
|
224
279
|
userId: string;
|
|
225
280
|
name: string;
|
|
281
|
+
guest?: true;
|
|
282
|
+
authority?: HumanAuthority;
|
|
226
283
|
}): Promise<{
|
|
227
284
|
status: number;
|
|
228
285
|
error?: string;
|
|
@@ -325,6 +382,8 @@ export type PublicPreviewForUi = PreviewAvailability & {
|
|
|
325
382
|
detail?: string;
|
|
326
383
|
};
|
|
327
384
|
export interface AppShellContext {
|
|
385
|
+
/** #2118: independent trusted opaque effect document, never HTML-preview consent or listener state. */
|
|
386
|
+
readonly effectBoot?: string;
|
|
328
387
|
previewForUi?(hostHeader: string | undefined, secure: boolean): (PreviewAvailability & {
|
|
329
388
|
boot: string | null;
|
|
330
389
|
}) | null;
|
|
@@ -344,6 +403,11 @@ export interface AppShellContext {
|
|
|
344
403
|
readonly ownerCss?: OwnerCssStore;
|
|
345
404
|
readonly webToken?: string | null;
|
|
346
405
|
readonly webSessions?: WebApiContext["webSessions"];
|
|
406
|
+
/** #1920 phase 3: a guest's page says who it is signed in as (its web name and platform), for its "Guest" chip. */
|
|
407
|
+
guestBadge?(owner: WebAccount): {
|
|
408
|
+
name: string;
|
|
409
|
+
platform: string;
|
|
410
|
+
};
|
|
347
411
|
}
|
|
348
412
|
export type AppShellMode = "full" | "view-only";
|
|
349
413
|
/** The app shell page for one entry, under the panels' CSP; it may frame exactly <preview origin>/frame, and only
|