@songsid/agend 2.2.0-beta.2 → 2.2.0-beta.20
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 +40 -24
- package/README.zh-TW.md +40 -24
- package/dist/agent-cli-instructions.md +6 -2
- package/dist/agent-cli.js +15 -7
- package/dist/agent-cli.js.map +1 -1
- package/dist/agent-endpoint.js +3 -0
- package/dist/agent-endpoint.js.map +1 -1
- package/dist/agent-whats-new.js +16 -4
- package/dist/agent-whats-new.js.map +1 -1
- package/dist/auth-api.d.ts +3 -1
- package/dist/auth-api.js +17 -1
- package/dist/auth-api.js.map +1 -1
- package/dist/backend/antigravity.d.ts +33 -0
- package/dist/backend/antigravity.js +126 -18
- package/dist/backend/antigravity.js.map +1 -1
- package/dist/backend/claude-carry.d.ts +22 -0
- package/dist/backend/claude-carry.js +170 -0
- package/dist/backend/claude-carry.js.map +1 -0
- package/dist/backend/claude-code.d.ts +65 -2
- package/dist/backend/claude-code.js +226 -33
- package/dist/backend/claude-code.js.map +1 -1
- package/dist/backend/codex-metadata.d.ts +33 -0
- package/dist/backend/codex-metadata.js +122 -18
- package/dist/backend/codex-metadata.js.map +1 -1
- package/dist/backend/codex.d.ts +3 -0
- package/dist/backend/codex.js +17 -1
- package/dist/backend/codex.js.map +1 -1
- package/dist/backend/credential-profile.d.ts +40 -3
- package/dist/backend/credential-profile.js +113 -5
- package/dist/backend/credential-profile.js.map +1 -1
- package/dist/backend/effort-metadata.d.ts +37 -1
- package/dist/backend/effort-metadata.js +86 -15
- package/dist/backend/effort-metadata.js.map +1 -1
- package/dist/backend/grok.d.ts +4 -0
- package/dist/backend/grok.js +14 -0
- package/dist/backend/grok.js.map +1 -1
- package/dist/backend/kiro.d.ts +27 -1
- package/dist/backend/kiro.js +63 -10
- package/dist/backend/kiro.js.map +1 -1
- package/dist/backend/launch-effort.d.ts +61 -0
- package/dist/backend/launch-effort.js +170 -0
- package/dist/backend/launch-effort.js.map +1 -0
- package/dist/backend/muse.d.ts +84 -0
- package/dist/backend/muse.js +449 -53
- package/dist/backend/muse.js.map +1 -1
- package/dist/backend/types.d.ts +48 -2
- package/dist/backend/types.js +12 -1
- package/dist/backend/types.js.map +1 -1
- package/dist/backend-command.d.ts +91 -0
- package/dist/backend-command.js +122 -0
- package/dist/backend-command.js.map +1 -0
- package/dist/background-work-ended.d.ts +18 -0
- package/dist/background-work-ended.js +30 -0
- package/dist/background-work-ended.js.map +1 -0
- package/dist/cache-service.d.ts +2 -0
- package/dist/cache-service.js +2 -1
- package/dist/cache-service.js.map +1 -1
- package/dist/channel/adapters/discord.d.ts +26 -1
- package/dist/channel/adapters/discord.js +103 -3
- package/dist/channel/adapters/discord.js.map +1 -1
- package/dist/channel/adapters/telegram.d.ts +35 -3
- package/dist/channel/adapters/telegram.js +122 -23
- package/dist/channel/adapters/telegram.js.map +1 -1
- package/dist/channel/mcp-tools.js +5 -3
- package/dist/channel/mcp-tools.js.map +1 -1
- package/dist/channel/message-edit-errors.d.ts +5 -0
- package/dist/channel/message-edit-errors.js +24 -0
- package/dist/channel/message-edit-errors.js.map +1 -0
- package/dist/channel/telegram-markdown.d.ts +6 -0
- package/dist/channel/telegram-markdown.js +104 -0
- package/dist/channel/telegram-markdown.js.map +1 -0
- package/dist/channel/tool-router.d.ts +2 -0
- package/dist/channel/tool-router.js +6 -5
- package/dist/channel/tool-router.js.map +1 -1
- package/dist/channel/types.d.ts +46 -4
- package/dist/cli.js +184 -34
- package/dist/cli.js.map +1 -1
- package/dist/command-table.d.ts +2 -2
- package/dist/command-table.js +5 -2
- package/dist/command-table.js.map +1 -1
- package/dist/compact-watch.d.ts +86 -0
- package/dist/compact-watch.js +288 -0
- package/dist/compact-watch.js.map +1 -0
- package/dist/config-validator.js +55 -5
- package/dist/config-validator.js.map +1 -1
- package/dist/config.d.ts +1 -0
- package/dist/config.js +2 -1
- package/dist/config.js.map +1 -1
- package/dist/cross-instance-envelope.js +2 -0
- package/dist/cross-instance-envelope.js.map +1 -1
- package/dist/daemon.d.ts +129 -1
- package/dist/daemon.js +754 -94
- package/dist/daemon.js.map +1 -1
- package/dist/delivery-outbox.d.ts +64 -8
- package/dist/delivery-outbox.js +315 -24
- package/dist/delivery-outbox.js.map +1 -1
- package/dist/delivery-reconciliation.d.ts +18 -1
- package/dist/delivery-reconciliation.js +67 -2
- package/dist/delivery-reconciliation.js.map +1 -1
- package/dist/doctor.js +7 -0
- package/dist/doctor.js.map +1 -1
- package/dist/fleet-context.d.ts +12 -1
- package/dist/fleet-manager.d.ts +392 -19
- package/dist/fleet-manager.js +2030 -275
- package/dist/fleet-manager.js.map +1 -1
- package/dist/forged-envelope-scan.d.ts +4 -3
- package/dist/forged-envelope-scan.js +4 -3
- package/dist/forged-envelope-scan.js.map +1 -1
- package/dist/general-knowledge/skills/credential-profiles/SKILL.md +84 -16
- package/dist/general-knowledge/skills/cross-instance-messaging/SKILL.md +16 -1
- package/dist/general-knowledge/skills/model-discovery/SKILL.md +4 -1
- package/dist/general-knowledge/skills/worker-collaboration/SKILL.md +4 -0
- package/dist/host-memory.d.ts +10 -0
- package/dist/host-memory.js +33 -1
- package/dist/host-memory.js.map +1 -1
- package/dist/human-delivery-receipts.d.ts +83 -0
- package/dist/human-delivery-receipts.js +194 -0
- package/dist/human-delivery-receipts.js.map +1 -0
- package/dist/install-lock.d.ts +18 -1
- package/dist/install-lock.js +30 -3
- package/dist/install-lock.js.map +1 -1
- package/dist/instance-avatar.d.ts +5 -4
- package/dist/instance-avatar.js +12 -8
- package/dist/instance-avatar.js.map +1 -1
- package/dist/instance-config-impact.js +1 -0
- package/dist/instance-config-impact.js.map +1 -1
- package/dist/instance-lifecycle.d.ts +25 -6
- package/dist/instance-lifecycle.js +76 -27
- package/dist/instance-lifecycle.js.map +1 -1
- package/dist/instructions.d.ts +1 -1
- package/dist/instructions.js +3 -3
- package/dist/instructions.js.map +1 -1
- package/dist/kiro-compact-pane.d.ts +38 -0
- package/dist/kiro-compact-pane.js +57 -0
- package/dist/kiro-compact-pane.js.map +1 -0
- package/dist/kiro-log-gate.d.ts +42 -0
- package/dist/kiro-log-gate.js +39 -0
- package/dist/kiro-log-gate.js.map +1 -0
- package/dist/launchd-handoff.d.ts +43 -0
- package/dist/launchd-handoff.js +56 -0
- package/dist/launchd-handoff.js.map +1 -0
- package/dist/locale.js +268 -42
- package/dist/locale.js.map +1 -1
- package/dist/log-service.d.ts +99 -0
- package/dist/log-service.js +243 -0
- package/dist/log-service.js.map +1 -0
- package/dist/log-steps.d.ts +169 -0
- package/dist/log-steps.js +858 -0
- package/dist/log-steps.js.map +1 -0
- package/dist/login-controller.d.ts +20 -3
- package/dist/login-controller.js +71 -19
- package/dist/login-controller.js.map +1 -1
- package/dist/login-flows.d.ts +5 -2
- package/dist/login-flows.js +5 -4
- package/dist/login-flows.js.map +1 -1
- package/dist/login-shell.d.ts +21 -0
- package/dist/login-shell.js +98 -0
- package/dist/login-shell.js.map +1 -0
- package/dist/memory-pressure.d.ts +13 -1
- package/dist/memory-pressure.js +50 -10
- package/dist/memory-pressure.js.map +1 -1
- package/dist/needs-you-hub.js +2 -0
- package/dist/needs-you-hub.js.map +1 -1
- package/dist/needs-you-live.d.ts +6 -0
- package/dist/needs-you-live.js +23 -3
- package/dist/needs-you-live.js.map +1 -1
- package/dist/outbound-handlers.d.ts +100 -0
- package/dist/outbound-handlers.js +277 -93
- package/dist/outbound-handlers.js.map +1 -1
- package/dist/outbound-schemas.d.ts +30 -15
- package/dist/outbound-schemas.js +23 -5
- package/dist/outbound-schemas.js.map +1 -1
- package/dist/provider-probe.d.ts +29 -0
- package/dist/provider-probe.js +198 -2
- package/dist/provider-probe.js.map +1 -1
- package/dist/public-link-progress.d.ts +1 -1
- package/dist/public-link-progress.js +8 -2
- package/dist/public-link-progress.js.map +1 -1
- package/dist/public-preview.d.ts +101 -0
- package/dist/public-preview.js +236 -0
- package/dist/public-preview.js.map +1 -0
- package/dist/public-web-gateway.d.ts +2 -0
- package/dist/public-web-gateway.js +20 -6
- package/dist/public-web-gateway.js.map +1 -1
- package/dist/public-web-link.d.ts +24 -1
- package/dist/public-web-link.js +63 -9
- package/dist/public-web-link.js.map +1 -1
- package/dist/quickstart-api.d.ts +1 -1
- package/dist/quickstart-api.js +8 -6
- package/dist/quickstart-api.js.map +1 -1
- package/dist/quickstart.d.ts +12 -0
- package/dist/quickstart.js +36 -6
- package/dist/quickstart.js.map +1 -1
- package/dist/reply-buttons-controller.d.ts +89 -5
- package/dist/reply-buttons-controller.js +273 -8
- package/dist/reply-buttons-controller.js.map +1 -1
- package/dist/reply-buttons.d.ts +48 -3
- package/dist/reply-buttons.js +105 -10
- package/dist/reply-buttons.js.map +1 -1
- package/dist/reply-polls.d.ts +85 -0
- package/dist/reply-polls.js +154 -0
- package/dist/reply-polls.js.map +1 -0
- package/dist/restart-guard.d.ts +6 -3
- package/dist/restart-guard.js +6 -3
- package/dist/restart-guard.js.map +1 -1
- package/dist/restart-progress.d.ts +33 -2
- package/dist/restart-progress.js +30 -2
- package/dist/restart-progress.js.map +1 -1
- package/dist/sd-notify.d.ts +22 -1
- package/dist/sd-notify.js +63 -10
- package/dist/sd-notify.js.map +1 -1
- package/dist/service-activation.d.ts +15 -7
- package/dist/service-activation.js +42 -26
- package/dist/service-activation.js.map +1 -1
- package/dist/service-installer.d.ts +55 -0
- package/dist/service-installer.js +90 -3
- package/dist/service-installer.js.map +1 -1
- package/dist/service-plan.d.ts +11 -0
- package/dist/service-plan.js +23 -0
- package/dist/service-plan.js.map +1 -1
- package/dist/settings-api.js +14 -4
- package/dist/settings-api.js.map +1 -1
- package/dist/settings-change.js +4 -2
- package/dist/settings-change.js.map +1 -1
- package/dist/settings-effect.js +2 -0
- package/dist/settings-effect.js.map +1 -1
- package/dist/spawn-gate.js +5 -1
- package/dist/spawn-gate.js.map +1 -1
- package/dist/spawn-hold-reply.d.ts +12 -0
- package/dist/spawn-hold-reply.js +39 -0
- package/dist/spawn-hold-reply.js.map +1 -0
- package/dist/systemd-peer-bus.d.ts +95 -0
- package/dist/systemd-peer-bus.js +430 -0
- package/dist/systemd-peer-bus.js.map +1 -0
- package/dist/systemd-runtime.d.ts +27 -1
- package/dist/systemd-runtime.js +69 -7
- package/dist/systemd-runtime.js.map +1 -1
- package/dist/tips.js +1 -1
- package/dist/tips.js.map +1 -1
- package/dist/tool-permissions.js +3 -3
- package/dist/tool-permissions.js.map +1 -1
- package/dist/tool-progress.js +3 -2
- package/dist/tool-progress.js.map +1 -1
- package/dist/topic-commands.d.ts +71 -4
- package/dist/topic-commands.js +167 -34
- package/dist/topic-commands.js.map +1 -1
- package/dist/transcript-delta-reader.d.ts +3 -3
- package/dist/transcript-delta-reader.js +8 -8
- package/dist/transcript-delta-reader.js.map +1 -1
- package/dist/transcript-jsonl.d.ts +85 -3
- package/dist/transcript-jsonl.js +156 -13
- package/dist/transcript-jsonl.js.map +1 -1
- package/dist/transcript-monitor.d.ts +11 -0
- package/dist/transcript-monitor.js +61 -13
- package/dist/transcript-monitor.js.map +1 -1
- package/dist/transcript-sources.d.ts +24 -0
- package/dist/transcript-sources.js +211 -56
- package/dist/transcript-sources.js.map +1 -1
- package/dist/tunnel/cloudflared.d.ts +7 -15
- package/dist/tunnel/cloudflared.js +36 -1
- package/dist/tunnel/cloudflared.js.map +1 -1
- package/dist/tunnel/purpose-lane.d.ts +5 -1
- package/dist/tunnel/purpose-lane.js +14 -7
- package/dist/tunnel/purpose-lane.js.map +1 -1
- package/dist/tunnel/types.d.ts +5 -1
- package/dist/tunnel/types.js.map +1 -1
- package/dist/turn-resume.d.ts +2 -0
- package/dist/turn-resume.js +1 -1
- package/dist/turn-resume.js.map +1 -1
- package/dist/types.d.ts +22 -0
- package/dist/ui/chat-commands.js +1 -0
- package/dist/ui/chat-mentions.js +63 -0
- package/dist/ui/chat-render.js +80 -10
- package/dist/ui/chat-store.js +70 -6
- package/dist/ui/chat-strings.js +62 -32
- package/dist/ui/chat-thread.js +199 -24
- package/dist/ui/chat-time.js +80 -0
- package/dist/ui/chat-tour.js +17 -14
- package/dist/ui/panel-chat.js +45 -21
- package/dist/ui/panel-details.js +2 -0
- package/dist/ui/panel-fleet.js +213 -58
- package/dist/ui/panel-log.js +428 -0
- package/dist/ui/panel-needs.js +14 -10
- package/dist/ui/panel-settings.js +82 -17
- package/dist/ui/preview-panel.js +55 -15
- package/dist/ui/preview-status.js +28 -0
- package/dist/ui/preview.js +44 -3
- package/dist/ui/settings-dialogs.js +11 -6
- package/dist/ui/settings-model.js +3 -1
- package/dist/ui/settings-strings.js +32 -12
- package/dist/ui/settings-token.js +8 -1
- package/dist/ui/settings-wizard.js +5 -3
- package/dist/ui/shared/app-i18n.js +41 -15
- package/dist/ui/shared/app-prefs.js +250 -0
- package/dist/ui/shared/app-route.js +6 -1
- package/dist/ui/shared/app-shell.js +165 -8
- package/dist/ui/shared/app-store.js +5 -1
- package/dist/ui/shared/app-stream.js +26 -5
- package/dist/ui/shared/app.css +170 -30
- package/dist/ui/shared/app.js +11 -1
- package/dist/ui/shared/fonts/README.md +1 -1
- package/dist/ui/shared/header-tools.js +83 -13
- package/dist/ui/shared/instance-nav.js +178 -51
- package/dist/ui/shared/instance-switch.js +8 -5
- package/dist/ui/shared/panel-view.js +21 -4
- package/dist/ui/shared/signin.js +15 -9
- package/dist/ui/shared/theme.js +39 -7
- package/dist/ui/shared/tokens.css +1 -1
- package/dist/ui/shared/ui-icons.js +2 -0
- package/dist/ui/shared/usage-dialog.js +23 -5
- package/dist/ui/shared/view-strings.js +40 -4
- package/dist/ui/signin.html +8 -3
- package/dist/unrecognised-prompt.d.ts +23 -0
- package/dist/unrecognised-prompt.js +74 -0
- package/dist/unrecognised-prompt.js.map +1 -0
- package/dist/update-check.d.ts +31 -0
- package/dist/update-check.js +47 -0
- package/dist/update-check.js.map +1 -1
- package/dist/update-install.d.ts +13 -1
- package/dist/update-install.js +16 -4
- package/dist/update-install.js.map +1 -1
- package/dist/update-launch.d.ts +48 -1
- package/dist/update-launch.js +159 -5
- package/dist/update-launch.js.map +1 -1
- package/dist/update-marker.d.ts +51 -0
- package/dist/update-marker.js +61 -0
- package/dist/update-marker.js.map +1 -1
- 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 +62 -13
- package/dist/usage/providers.js +256 -68
- package/dist/usage/providers.js.map +1 -1
- package/dist/usage/statusline-usage.d.ts +6 -2
- package/dist/usage/statusline-usage.js +10 -4
- package/dist/usage/statusline-usage.js.map +1 -1
- package/dist/view-api.js +31 -9
- package/dist/view-api.js.map +1 -1
- package/dist/web-api.d.ts +82 -4
- package/dist/web-api.js +632 -88
- package/dist/web-api.js.map +1 -1
- package/dist/web-auth.js +5 -2
- package/dist/web-auth.js.map +1 -1
- package/dist/web-chat-history.d.ts +26 -1
- package/dist/web-chat-history.js +47 -8
- package/dist/web-chat-history.js.map +1 -1
- package/dist/web-commands.d.ts +41 -5
- package/dist/web-commands.js +25 -7
- package/dist/web-commands.js.map +1 -1
- package/dist/web-login.d.ts +14 -0
- package/dist/web-login.js +4 -2
- package/dist/web-login.js.map +1 -1
- package/dist/web-mentions.d.ts +44 -0
- package/dist/web-mentions.js +75 -0
- package/dist/web-mentions.js.map +1 -0
- package/dist/web-prefs.d.ts +81 -0
- package/dist/web-prefs.js +297 -0
- package/dist/web-prefs.js.map +1 -0
- package/dist/web-preview.d.ts +14 -1
- package/dist/web-preview.js +35 -13
- package/dist/web-preview.js.map +1 -1
- package/dist/web-profile.d.ts +32 -0
- package/dist/web-profile.js +132 -0
- package/dist/web-profile.js.map +1 -0
- package/dist/web-reply-files.d.ts +45 -0
- package/dist/web-reply-files.js +223 -0
- package/dist/web-reply-files.js.map +1 -0
- package/dist/web-schedules.d.ts +12 -0
- package/dist/web-schedules.js +34 -0
- package/dist/web-schedules.js.map +1 -0
- package/dist/web-server-drain.d.ts +10 -0
- package/dist/web-server-drain.js +50 -0
- package/dist/web-server-drain.js.map +1 -0
- package/dist/web-session.d.ts +14 -0
- package/dist/web-session.js +11 -1
- package/dist/web-session.js.map +1 -1
- package/dist/web-settings-patch.d.ts +3 -1
- package/dist/web-settings-patch.js +4 -1
- package/dist/web-settings-patch.js.map +1 -1
- package/dist/web-shell-routes.d.ts +4 -0
- package/dist/web-shell-routes.js +9 -0
- package/dist/web-shell-routes.js.map +1 -1
- package/dist/web-upload.d.ts +135 -7
- package/dist/web-upload.js +315 -51
- package/dist/web-upload.js.map +1 -1
- package/launcher/install-admission.cjs +61 -6
- package/package.json +3 -3
- package/templates/launchd.plist.ejs +3 -1
- package/templates/systemd.service.ejs +2 -1
|
@@ -31,6 +31,9 @@ export type ShellRoute = {
|
|
|
31
31
|
} | {
|
|
32
32
|
panel: "details";
|
|
33
33
|
instance: string;
|
|
34
|
+
} | {
|
|
35
|
+
panel: "log";
|
|
36
|
+
instance: string;
|
|
34
37
|
};
|
|
35
38
|
/** What a path is: the app shell (with its route), a malformed shell path (400), or not the shell at all (null). */
|
|
36
39
|
export type ShellMatch = {
|
|
@@ -60,4 +63,5 @@ export declare function isWebPageNavigation(path: string): boolean;
|
|
|
60
63
|
/** The app's client-side paths, for links the server builds (#1386 links, the tour). */
|
|
61
64
|
export declare function chatPath(instance: string): string;
|
|
62
65
|
export declare function viewPath(instance: string): string;
|
|
66
|
+
export declare function logPath(instance: string): string;
|
|
63
67
|
export declare function detailsPath(instance: string): string;
|
package/dist/web-shell-routes.js
CHANGED
|
@@ -54,6 +54,12 @@ export function shellRoute(method, path) {
|
|
|
54
54
|
const fleet = /^\/ui\/fleet\/([^/]+)$/.exec(path);
|
|
55
55
|
if (fleet)
|
|
56
56
|
return FLEET_TABS.includes(fleet[1]) ? { kind: "shell", route: { panel: "fleet", tab: fleet[1] } } : null;
|
|
57
|
+
// #1218: one instance's Log.
|
|
58
|
+
const log = /^\/ui\/log\/([^/]+)$/.exec(path);
|
|
59
|
+
if (log) {
|
|
60
|
+
const name = decodeSegment(log[1]);
|
|
61
|
+
return name !== null && isSafeInstanceName(name) ? { kind: "shell", route: { panel: "log", instance: name } } : { kind: "malformed" };
|
|
62
|
+
}
|
|
57
63
|
const chat = /^\/ui\/chat\/([^/]+)$/.exec(path);
|
|
58
64
|
if (chat) {
|
|
59
65
|
const name = decodeSegment(chat[1]);
|
|
@@ -100,6 +106,9 @@ export function chatPath(instance) {
|
|
|
100
106
|
export function viewPath(instance) {
|
|
101
107
|
return `/view/${encodeURIComponent(instance)}`;
|
|
102
108
|
}
|
|
109
|
+
export function logPath(instance) {
|
|
110
|
+
return `/ui/log/${encodeURIComponent(instance)}`;
|
|
111
|
+
}
|
|
103
112
|
export function detailsPath(instance) {
|
|
104
113
|
return `/ui/fleet/agent/${encodeURIComponent(instance)}`;
|
|
105
114
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"web-shell-routes.js","sourceRoot":"","sources":["../src/web-shell-routes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,CAAU,CAAC;AAE7F,uHAAuH;AACvH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,UAAU,CAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"web-shell-routes.js","sourceRoot":"","sources":["../src/web-shell-routes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,CAAU,CAAC;AAE7F,uHAAuH;AACvH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,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;IACtC,OAAO,WAAW,kBAAkB,CAAC,QAAQ,CAAC,EAAE,CAAC;AACnD,CAAC;AACD,MAAM,UAAU,WAAW,CAAC,QAAgB;IAC1C,OAAO,mBAAmB,kBAAkB,CAAC,QAAQ,CAAC,EAAE,CAAC;AAC3D,CAAC"}
|
package/dist/web-upload.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { openSync } from "node:fs";
|
|
2
|
+
/** #1937: the defaults; `web.upload_max_file_mb` / `web.upload_max_total_mb` change the two sizes (uploadLimits()). */
|
|
1
3
|
export declare const UPLOAD_LIMITS: {
|
|
2
4
|
/** One file. */
|
|
3
5
|
readonly maxFileBytes: number;
|
|
@@ -6,10 +8,79 @@ export declare const UPLOAD_LIMITS: {
|
|
|
6
8
|
/** All files on one message together. */
|
|
7
9
|
readonly maxTotalBytes: number;
|
|
8
10
|
};
|
|
11
|
+
/** #1937: what `web.upload_max_file_mb` and `web.upload_max_total_mb` may be — whole MB (MiB). */
|
|
12
|
+
export declare const UPLOAD_MB_RANGE: {
|
|
13
|
+
readonly min: 1;
|
|
14
|
+
readonly max: 500;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* #1937: one file over the public link. A Cloudflare quick tunnel carries a request body of about 100 MB at most, and
|
|
18
|
+
* one upload is one request, so whatever the config says, a file through the tunnel stays under that.
|
|
19
|
+
*/
|
|
20
|
+
export declare const PUBLIC_LINK_MAX_FILE_BYTES: number;
|
|
21
|
+
export interface UploadLimits {
|
|
22
|
+
maxFileBytes: number;
|
|
23
|
+
maxFiles: number;
|
|
24
|
+
maxTotalBytes: number;
|
|
25
|
+
/** The public link lowered the per-file cap below the configured one (its 413 says why). */
|
|
26
|
+
publicLinkCapped?: true;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* #1937: the limits in force — the one source the upload route, the send, the served-file cap, the page's own check
|
|
30
|
+
* and its words all read. A file is never allowed more than a whole message is; over the public link a file is at most
|
|
31
|
+
* PUBLIC_LINK_MAX_FILE_BYTES. Read on every request, so `agend reload` applies a change to the next upload.
|
|
32
|
+
*/
|
|
33
|
+
export declare function uploadLimits(web: {
|
|
34
|
+
upload_max_file_mb?: unknown;
|
|
35
|
+
upload_max_total_mb?: unknown;
|
|
36
|
+
} | null | undefined, opts?: {
|
|
37
|
+
publicLink?: boolean;
|
|
38
|
+
}): UploadLimits;
|
|
39
|
+
/** A size in MB as the limits are worded ("50", "2.5"). */
|
|
40
|
+
export declare function mbText(bytes: number): string;
|
|
41
|
+
/** #1937: the 413 for one file, from the limits in force (never a constant's number). */
|
|
42
|
+
export declare function fileTooLargeText(limits: UploadLimits): string;
|
|
43
|
+
/** #1937: how long an upload may go without a byte before it is dropped (its partial file with it). */
|
|
44
|
+
export declare const UPLOAD_STALL_MS = 60000;
|
|
45
|
+
/** #1937: the longest one upload may take, start to end (at 95 MB, about 54 KB/s on average). */
|
|
46
|
+
export declare const UPLOAD_MAX_MS: number;
|
|
47
|
+
/** #1937: what a listener allows for receiving one request — above UPLOAD_MAX_MS, so an upload's own clocks decide. */
|
|
48
|
+
export declare const UPLOAD_REQUEST_TIMEOUT_MS: number;
|
|
49
|
+
/** #1937: the one route whose body may take long to arrive (its own clocks bound it). */
|
|
50
|
+
export declare function isUploadRequest(req: {
|
|
51
|
+
method?: string;
|
|
52
|
+
url?: string;
|
|
53
|
+
}): boolean;
|
|
54
|
+
/**
|
|
55
|
+
* #1937: every other request keeps the listener's old bound on receiving it — not whole within `ms`, its connection is
|
|
56
|
+
* dropped (what `server.requestTimeout` did before it was raised for uploads).
|
|
57
|
+
*/
|
|
58
|
+
export declare function limitRequestReceive(req: {
|
|
59
|
+
complete?: boolean;
|
|
60
|
+
socket?: {
|
|
61
|
+
destroy(): void;
|
|
62
|
+
} | null;
|
|
63
|
+
once?(event: "close", fn: () => void): unknown;
|
|
64
|
+
}, ms: number): void;
|
|
9
65
|
/** How long an uploaded file waits to be sent with a message before its id stops working. */
|
|
10
66
|
export declare const UPLOAD_TTL_MS: number;
|
|
11
67
|
/** An upload no message has taken yet is stored under this prefix; it drops the prefix when a message takes it. */
|
|
12
68
|
export declare const PENDING_PREFIX = "web-pending-";
|
|
69
|
+
/** #1937: an upload's bytes stream into this file first (pending prefix: a restart's sweep removes one left behind). */
|
|
70
|
+
export declare const PART_SUFFIX = ".part";
|
|
71
|
+
/**
|
|
72
|
+
* #1937: a new, empty part file in `inboxDir` (made private, 0700), created exclusively, 0600, never through a link.
|
|
73
|
+
* Its bytes are written through `fd` (never by reopening the name); the caller closes it. `discard()` removes the part
|
|
74
|
+
* and the directories made for it, when they are still empty — an upload that ends in nothing leaves nothing behind
|
|
75
|
+
* (an instance deleted while its body was arriving gets no inbox made back, #1252 review P2-3).
|
|
76
|
+
*/
|
|
77
|
+
export declare function createPartFile(inboxDir: string, open?: typeof openSync): {
|
|
78
|
+
path: string;
|
|
79
|
+
fd: number;
|
|
80
|
+
discard(): void;
|
|
81
|
+
};
|
|
82
|
+
/** Remove a file of ours, if it is still there; never throws. */
|
|
83
|
+
export declare function removeQuietly(path: string): void;
|
|
13
84
|
/** The largest file the dashboard will serve back (a reply attachment can be anything the agent made). */
|
|
14
85
|
export declare const MAX_SERVED_BYTES: number;
|
|
15
86
|
export type UploadKind = "photo" | "document";
|
|
@@ -18,12 +89,31 @@ export interface SniffedType {
|
|
|
18
89
|
mime: string;
|
|
19
90
|
ext: string;
|
|
20
91
|
}
|
|
92
|
+
/** #1900: any other file, as Discord and Telegram take it — a download (application/octet-stream), never shown. */
|
|
93
|
+
export declare const OTHER_FILE_MIME = "application/octet-stream";
|
|
94
|
+
/** The extension an upload of an unread type is stored under: its own, lower-cased, if short and plain; else .bin. */
|
|
95
|
+
export declare function storedExtension(name: string): string;
|
|
21
96
|
/**
|
|
22
|
-
* The type of an upload, from its bytes. Images by signature (PNG, JPEG, GIF, WebP), PDF by `%PDF-`,
|
|
23
|
-
*
|
|
24
|
-
*
|
|
97
|
+
* The type of an upload, from its bytes. Images by signature (PNG, JPEG, GIF, WebP), PDF by `%PDF-`, text when it is
|
|
98
|
+
* valid UTF-8 with no NUL byte and not markup. #1900: anything else (an archive, an office file, a binary, HTML, SVG …)
|
|
99
|
+
* is taken too, as a document the dashboard only offers as a download. Null only for an empty file.
|
|
25
100
|
*/
|
|
26
101
|
export declare function sniffUpload(bytes: Uint8Array, name: string): SniffedType | null;
|
|
102
|
+
/**
|
|
103
|
+
* #1937: sniffUpload() as the bytes stream in — the upload is written to disk chunk by chunk, never held whole. Keeps
|
|
104
|
+
* the first bytes (every signature is in the first 12), whether a NUL was seen, and whether everything so far is
|
|
105
|
+
* valid UTF-8 (a streaming decoder: a character split across two chunks is still one character).
|
|
106
|
+
*/
|
|
107
|
+
export declare class UploadSniffer {
|
|
108
|
+
private head;
|
|
109
|
+
private size;
|
|
110
|
+
private nul;
|
|
111
|
+
private utf8;
|
|
112
|
+
private readonly decoder;
|
|
113
|
+
push(chunk: Uint8Array): this;
|
|
114
|
+
/** The type of everything pushed (call once, at the end); null for an empty file. */
|
|
115
|
+
result(name: string): SniffedType | null;
|
|
116
|
+
}
|
|
27
117
|
/** A file name as a label only: no directory, no control characters, no leading dots, bounded. */
|
|
28
118
|
export declare function displayName(raw: string | undefined | null, fallback: string): string;
|
|
29
119
|
/** Any lone surrogate replaced by U+FFFD, so the name always encodes. */
|
|
@@ -57,6 +147,11 @@ export interface ServedFile {
|
|
|
57
147
|
/** The instance whose chat shows it. */
|
|
58
148
|
instance: string;
|
|
59
149
|
kind: UploadKind;
|
|
150
|
+
/**
|
|
151
|
+
* #1770: a reply file's snapshot (workspaces/<instance>/web-files): the fleet's own copy, kept as long as its message
|
|
152
|
+
* — outside the served-id cap, and removed from disk when the message leaves the history (dropServed).
|
|
153
|
+
*/
|
|
154
|
+
snapshot?: true;
|
|
60
155
|
}
|
|
61
156
|
export declare const isFileId: (id: string) => boolean;
|
|
62
157
|
/** Images the browser may show inline; everything else is served as a download. */
|
|
@@ -76,10 +171,15 @@ export declare class WebFileLedger {
|
|
|
76
171
|
private readonly served;
|
|
77
172
|
private readonly now;
|
|
78
173
|
private readonly maxServed;
|
|
174
|
+
/** #1937: the limits in force (the fleet's config, read each time): the send's count and total, the served-file cap. */
|
|
175
|
+
readonly limits: () => UploadLimits;
|
|
79
176
|
constructor(opts?: {
|
|
80
177
|
now?: () => number;
|
|
81
178
|
maxServed?: number;
|
|
179
|
+
limits?: () => UploadLimits;
|
|
82
180
|
});
|
|
181
|
+
/** #1937: the largest file served back — MAX_SERVED_BYTES, or more when a file that large may be uploaded. */
|
|
182
|
+
maxServedBytes(): number;
|
|
83
183
|
/**
|
|
84
184
|
* Store an upload in `inboxDir` under a name chosen here and register it. The directory is made
|
|
85
185
|
* private (0700), the file 0600, written exclusively (never over an existing file).
|
|
@@ -91,6 +191,16 @@ export declare class WebFileLedger {
|
|
|
91
191
|
name: string;
|
|
92
192
|
type: SniffedType;
|
|
93
193
|
}): UploadEntry;
|
|
194
|
+
/**
|
|
195
|
+
* #1937: register an upload that was streamed to `partPath` (createPartFile(), in the inbox it belongs to): it is
|
|
196
|
+
* linked under its stored name — never over an existing file — and the part goes. The part is removed on failure too.
|
|
197
|
+
*/
|
|
198
|
+
storeUploadedFile(input: {
|
|
199
|
+
instance: string;
|
|
200
|
+
partPath: string;
|
|
201
|
+
name: string;
|
|
202
|
+
type: SniffedType;
|
|
203
|
+
}): UploadEntry;
|
|
94
204
|
/**
|
|
95
205
|
* The uploads a message names, all or nothing: each must exist, belong to this instance, not be
|
|
96
206
|
* expired and be waiting for a message; together within the per-message limits. On success they are
|
|
@@ -128,6 +238,7 @@ export declare class WebFileLedger {
|
|
|
128
238
|
mime?: string;
|
|
129
239
|
instance: string;
|
|
130
240
|
kind?: UploadKind;
|
|
241
|
+
snapshot?: boolean;
|
|
131
242
|
}): ServedFile | null;
|
|
132
243
|
/**
|
|
133
244
|
* The bytes of a served file, re-checked at read time: opened without following a symlink, still a
|
|
@@ -137,6 +248,16 @@ export declare class WebFileLedger {
|
|
|
137
248
|
file: ServedFile;
|
|
138
249
|
bytes: Buffer;
|
|
139
250
|
} | null;
|
|
251
|
+
/**
|
|
252
|
+
* #1937: a served file opened for streaming whole, with read()'s checks on the open descriptor (no symlink followed,
|
|
253
|
+
* a regular file, the device + inode and size it was registered with). The caller closes `fd`. Null when any fails.
|
|
254
|
+
*/
|
|
255
|
+
open(id: string): {
|
|
256
|
+
file: ServedFile;
|
|
257
|
+
fd: number;
|
|
258
|
+
} | null;
|
|
259
|
+
/** #1937: what is served under an id (no file is opened: open() and read() check the file itself). */
|
|
260
|
+
servedFile(id: string): ServedFile | null;
|
|
140
261
|
/** #1589: a served file that is audio or video (MEDIA_MIME), or null — the file route plays those by range. */
|
|
141
262
|
mediaOf(id: string): ServedFile | null;
|
|
142
263
|
/**
|
|
@@ -155,14 +276,21 @@ export declare class WebFileLedger {
|
|
|
155
276
|
* nothing is served under the id, or it is an upload no message has taken (web-pending-…): that is never kept.
|
|
156
277
|
*/
|
|
157
278
|
storablePath(id: string): string | null;
|
|
158
|
-
/**
|
|
279
|
+
/**
|
|
280
|
+
* #1565: these ids are no longer shown (their message left the history's window): nothing is served under them.
|
|
281
|
+
* #1770: a snapshot goes from disk with them — the file registered, still that file (device + inode), never a link.
|
|
282
|
+
*/
|
|
159
283
|
dropServed(ids: Iterable<string>): void;
|
|
284
|
+
/** #1770: the ids of an instance's snapshots served now — what a fleet start's sweep keeps. */
|
|
285
|
+
heldSnapshots(instance: string): Set<string>;
|
|
160
286
|
/**
|
|
161
287
|
* #1565: serve again, under the id it had, a file a message showed before the fleet restarted — only if it still
|
|
162
288
|
* passes every check: an id of ours in shape; never an upload no message took (web-pending-…); the path itself not a
|
|
163
289
|
* symlink, and a regular file within MAX_SERVED_BYTES; its real path inside this instance's inbox
|
|
164
|
-
* (`workspaces/<instance>/inbox`, itself not a link elsewhere)
|
|
165
|
-
*
|
|
290
|
+
* (`workspaces/<instance>/inbox`, itself not a link elsewhere) — or (#1770) inside its reply snapshots
|
|
291
|
+
* (`webFilesDir`, `workspaces/<instance>/web-files`, the same checks), then served as a snapshot again. Null when any
|
|
292
|
+
* check fails (the message then shows the name as unavailable). (Within maxServedBytes(): #1937.) Fetched by id only, as ever: the stored path is the
|
|
293
|
+
* fleet's own file, never a request's.
|
|
166
294
|
*/
|
|
167
295
|
restoreServed(entry: {
|
|
168
296
|
id: unknown;
|
|
@@ -170,7 +298,7 @@ export declare class WebFileLedger {
|
|
|
170
298
|
name?: unknown;
|
|
171
299
|
mime?: unknown;
|
|
172
300
|
kind?: unknown;
|
|
173
|
-
}, instance: string, inboxDir: string): ServedFile | null;
|
|
301
|
+
}, instance: string, inboxDir: string, webFilesDir?: string): ServedFile | null;
|
|
174
302
|
/** Forget an instance's files (it was deleted). The files themselves are its workspace's to remove. */
|
|
175
303
|
forget(instance: string): void;
|
|
176
304
|
/**
|