@songsid/agend 2.2.0 → 2.2.5
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 +284 -2
- package/dist/agent-cli.js.map +1 -1
- package/dist/agent-endpoint.d.ts +2 -0
- package/dist/agent-endpoint.js +29 -0
- package/dist/agent-endpoint.js.map +1 -1
- package/dist/agent-file-read.d.ts +38 -0
- package/dist/agent-file-read.js +317 -0
- package/dist/agent-file-read.js.map +1 -0
- package/dist/agent-whats-new.d.ts +11 -0
- package/dist/agent-whats-new.js +34 -2
- package/dist/agent-whats-new.js.map +1 -1
- package/dist/atomic-write.js +9 -1
- package/dist/atomic-write.js.map +1 -1
- package/dist/auth-api.d.ts +30 -1
- package/dist/auth-api.js +61 -12
- 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/antigravity.js +3 -3
- package/dist/backend/antigravity.js.map +1 -1
- 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/launch-effort.js +1 -1
- package/dist/backend/launch-effort.js.map +1 -1
- package/dist/backend/muse.js +10 -2
- package/dist/backend/muse.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-client-retirement.d.ts +5 -0
- package/dist/channel/adapters/discord-client-retirement.js +57 -0
- package/dist/channel/adapters/discord-client-retirement.js.map +1 -0
- package/dist/channel/adapters/discord.d.ts +11 -0
- package/dist/channel/adapters/discord.js +66 -6
- package/dist/channel/adapters/discord.js.map +1 -1
- package/dist/channel/adapters/telegram.d.ts +8 -1
- package/dist/channel/adapters/telegram.js +74 -4
- package/dist/channel/adapters/telegram.js.map +1 -1
- package/dist/channel/mcp-tools.js +48 -2
- package/dist/channel/mcp-tools.js.map +1 -1
- package/dist/channel/types.d.ts +21 -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 +142 -110
- package/dist/cli.js.map +1 -1
- package/dist/config-validator.js +119 -4
- package/dist/config-validator.js.map +1 -1
- package/dist/daemon.d.ts +10 -0
- package/dist/daemon.js +327 -31
- 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 +15 -0
- package/dist/fleet-manager.d.ts +514 -12
- package/dist/fleet-manager.js +1885 -163
- package/dist/fleet-manager.js.map +1 -1
- package/dist/fleet-process-handlers.d.ts +18 -0
- package/dist/fleet-process-handlers.js +69 -0
- package/dist/fleet-process-handlers.js.map +1 -0
- 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 +492 -0
- package/dist/general-knowledge/skills/web-dashboard/SKILL.md +482 -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-avatar.js +3 -0
- package/dist/instance-avatar.js.map +1 -1
- package/dist/instance-config-impact.js +6 -1
- package/dist/instance-config-impact.js.map +1 -1
- package/dist/instance-lifecycle.d.ts +2 -0
- package/dist/instance-lifecycle.js +20 -10
- package/dist/instance-lifecycle.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/needs-you-hub.d.ts +4 -0
- package/dist/needs-you-hub.js +31 -6
- package/dist/needs-you-hub.js.map +1 -1
- package/dist/needs-you.d.ts +1 -13
- package/dist/needs-you.js +3 -37
- package/dist/needs-you.js.map +1 -1
- package/dist/outbound-handlers.d.ts +15 -0
- package/dist/outbound-handlers.js +152 -11
- package/dist/outbound-handlers.js.map +1 -1
- package/dist/outbound-schemas.d.ts +228 -4
- package/dist/outbound-schemas.js +147 -1
- package/dist/outbound-schemas.js.map +1 -1
- package/dist/public-web-gateway.js +21 -1
- 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/repo-worktree-guard.d.ts +36 -0
- package/dist/repo-worktree-guard.js +143 -0
- package/dist/repo-worktree-guard.js.map +1 -0
- 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 +70 -1
- package/dist/scheduler/scheduler.js +256 -17
- 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 +23 -0
- package/dist/settings-api.js +233 -2
- package/dist/settings-api.js.map +1 -1
- package/dist/settings-change.js +112 -0
- package/dist/settings-change.js.map +1 -1
- package/dist/settings-effect.js +32 -2
- package/dist/settings-effect.js.map +1 -1
- package/dist/settings-http-confirmation.js +5 -0
- package/dist/settings-http-confirmation.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 +100 -2
- package/dist/tool-permissions.js.map +1 -1
- package/dist/topic-commands.d.ts +17 -7
- package/dist/topic-commands.js +39 -21
- package/dist/topic-commands.js.map +1 -1
- package/dist/topic-link.d.ts +128 -0
- package/dist/topic-link.js +269 -0
- package/dist/topic-link.js.map +1 -0
- package/dist/types.d.ts +61 -1
- package/dist/ui/app-effects.js +245 -0
- package/dist/ui/chat-ambient.js +307 -0
- package/dist/ui/chat-effect-posters.js +42 -0
- package/dist/ui/chat-effects.js +160 -0
- package/dist/ui/chat-live-replies.js +58 -0
- package/dist/ui/chat-render.js +25 -7
- package/dist/ui/chat-store.js +41 -13
- package/dist/ui/chat-strings.js +86 -2
- package/dist/ui/chat-thread.js +204 -37
- package/dist/ui/chat-tour.js +1 -1
- package/dist/ui/effect-trial-controller.js +124 -0
- package/dist/ui/effect-trial-offer.js +31 -0
- package/dist/ui/effect-trial-panel.js +40 -0
- 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/image-lightbox.js +1 -1
- package/dist/ui/panel-chat.js +252 -58
- package/dist/ui/panel-details.js +20 -6
- package/dist/ui/panel-fleet.js +45 -19
- package/dist/ui/panel-log.js +6 -6
- package/dist/ui/panel-needs.js +3 -3
- package/dist/ui/panel-settings.js +58 -13
- package/dist/ui/preview-panel.js +25 -9
- package/dist/ui/preview.js +3 -2
- package/dist/ui/settings-appearance.js +349 -0
- package/dist/ui/settings-catalog.js +92 -0
- package/dist/ui/settings-dialogs.js +40 -12
- package/dist/ui/settings-effects.js +202 -0
- 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 +271 -0
- package/dist/ui/settings-owner-effects.js +80 -0
- package/dist/ui/settings-strings.js +335 -10
- package/dist/ui/settings-web-authority.js +91 -0
- package/dist/ui/shared/agend-auth.js +28 -4
- package/dist/ui/shared/agent-widget.js +248 -0
- package/dist/ui/shared/app-i18n.js +6 -2
- package/dist/ui/shared/app-prefs.js +34 -13
- package/dist/ui/shared/app-route.js +42 -2
- package/dist/ui/shared/app-session.js +3 -1
- package/dist/ui/shared/app-shell.js +119 -41
- package/dist/ui/shared/app-store.js +28 -1
- package/dist/ui/shared/app-stream.js +14 -7
- package/dist/ui/shared/app-themes.js +206 -0
- package/dist/ui/shared/app.css +566 -5
- package/dist/ui/shared/app.js +23 -10
- package/dist/ui/shared/card-strings.js +32 -0
- package/dist/ui/shared/effect-app-runtime.js +297 -0
- package/dist/ui/shared/effect-baseline.js +64 -0
- package/dist/ui/shared/effect-chat-runtime.js +167 -0
- package/dist/ui/shared/effect-cursor.js +125 -0
- package/dist/ui/shared/effect-frame.js +146 -0
- package/dist/ui/shared/effect-geometry.js +137 -0
- package/dist/ui/shared/effect-host-style.js +10 -0
- package/dist/ui/shared/effect-owner-regions.js +74 -0
- package/dist/ui/shared/effect-owner-source.js +122 -0
- package/dist/ui/shared/effect-policy.js +151 -0
- package/dist/ui/shared/effect-poster-reader.js +98 -0
- package/dist/ui/shared/effect-posters.js +117 -0
- package/dist/ui/shared/effect-profiler.js +184 -0
- package/dist/ui/shared/effect-profiles.js +65 -0
- package/dist/ui/shared/effect-registry.js +543 -0
- package/dist/ui/shared/effect-runtime-loader.js +234 -0
- package/dist/ui/shared/effect-safety.js +153 -0
- package/dist/ui/shared/effect-stock-snapshot.js +43 -0
- package/dist/ui/shared/effect-stock-trust.js +217 -0
- package/dist/ui/shared/effect-trial-shadow.js +62 -0
- package/dist/ui/shared/effect-trial-source.js +103 -0
- package/dist/ui/shared/effect-trial-stage.js +170 -0
- package/dist/ui/shared/effect-trial.css +40 -0
- package/dist/ui/shared/fx-motion.js +67 -0
- package/dist/ui/shared/header-tools.js +1 -1
- package/dist/ui/shared/identity-card.js +273 -0
- package/dist/ui/shared/identity-color.js +261 -0
- package/dist/ui/shared/instance-nav.js +215 -41
- package/dist/ui/shared/owner-css.js +250 -0
- package/dist/ui/shared/owner-effect-prefs.js +117 -0
- package/dist/ui/shared/panel-view.js +103 -10
- package/dist/ui/shared/signin.js +2 -0
- package/dist/ui/shared/tokens.css +9 -3
- package/dist/ui/shared/ui-dialog.js +1 -1
- package/dist/ui/shared/ui-icons.js +3 -0
- package/dist/ui/shared/ui-menu.js +1 -1
- package/dist/ui/shared/ui-toast.js +1 -1
- package/dist/ui/shared/usage-dialog.js +22 -2
- package/dist/ui/shared/view-strings.js +98 -2
- package/dist/ui/shared/web-authorize.js +151 -0
- package/dist/ui/signin.html +1 -0
- 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 +68 -0
- package/dist/view-api.js +249 -8
- 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 +117 -7
- package/dist/web-api.js +1283 -70
- package/dist/web-api.js.map +1 -1
- package/dist/web-appearance-limits.d.ts +82 -0
- package/dist/web-appearance-limits.js +83 -0
- package/dist/web-appearance-limits.js.map +1 -0
- package/dist/web-appearance-policy.d.ts +64 -0
- package/dist/web-appearance-policy.js +87 -0
- package/dist/web-appearance-policy.js.map +1 -0
- package/dist/web-appearance-tools.d.ts +53 -0
- package/dist/web-appearance-tools.js +124 -0
- package/dist/web-appearance-tools.js.map +1 -0
- package/dist/web-appearance-view.d.ts +124 -0
- package/dist/web-appearance-view.js +278 -0
- package/dist/web-appearance-view.js.map +1 -0
- package/dist/web-appearance.d.ts +93 -0
- package/dist/web-appearance.js +373 -0
- package/dist/web-appearance.js.map +1 -0
- package/dist/web-asset-parts.d.ts +93 -0
- package/dist/web-asset-parts.js +133 -0
- package/dist/web-asset-parts.js.map +1 -0
- package/dist/web-auth.js +20 -2
- package/dist/web-auth.js.map +1 -1
- package/dist/web-card.d.ts +110 -0
- package/dist/web-card.js +266 -0
- package/dist/web-card.js.map +1 -0
- 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 +63 -0
- package/dist/web-chat-history.js +109 -6
- 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.d.ts +28 -0
- package/dist/web-effect-bundle.js +171 -0
- package/dist/web-effect-bundle.js.map +1 -0
- package/dist/web-effect-canonical.d.ts +8 -0
- package/dist/web-effect-canonical.js +27 -0
- package/dist/web-effect-canonical.js.map +1 -0
- package/dist/web-effect-library.d.ts +114 -0
- package/dist/web-effect-library.js +530 -0
- package/dist/web-effect-library.js.map +1 -0
- 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-poster.d.ts +8 -0
- package/dist/web-effect-poster.js +52 -0
- package/dist/web-effect-poster.js.map +1 -0
- package/dist/web-effect-profiles.d.ts +118 -0
- package/dist/web-effect-profiles.js +180 -0
- package/dist/web-effect-profiles.js.map +1 -0
- package/dist/web-effect-service.d.ts +93 -0
- package/dist/web-effect-service.js +335 -0
- package/dist/web-effect-service.js.map +1 -0
- package/dist/web-effect-tools.d.ts +48 -0
- package/dist/web-effect-tools.js +129 -0
- package/dist/web-effect-tools.js.map +1 -0
- package/dist/web-effect-trials.d.ts +86 -0
- package/dist/web-effect-trials.js +204 -0
- package/dist/web-effect-trials.js.map +1 -0
- package/dist/web-effect-upload.d.ts +27 -0
- package/dist/web-effect-upload.js +185 -0
- package/dist/web-effect-upload.js.map +1 -0
- package/dist/web-effect-worker.d.ts +8 -0
- package/dist/web-effect-worker.js +170 -0
- package/dist/web-effect-worker.js.map +1 -0
- package/dist/web-effect.d.ts +103 -0
- package/dist/web-effect.js +153 -0
- package/dist/web-effect.js.map +1 -0
- 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 +87 -0
- package/dist/web-identity-color.js +209 -0
- package/dist/web-identity-color.js.map +1 -0
- package/dist/web-identity-palette.d.ts +113 -0
- package/dist/web-identity-palette.js +84 -0
- package/dist/web-identity-palette.js.map +1 -0
- package/dist/web-image-meta.d.ts +38 -0
- package/dist/web-image-meta.js +262 -0
- package/dist/web-image-meta.js.map +1 -0
- 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 +50 -0
- package/dist/web-mod-agent.js +207 -0
- package/dist/web-mod-agent.js.map +1 -0
- package/dist/web-mod-bundle.d.ts +157 -0
- package/dist/web-mod-bundle.js +529 -0
- package/dist/web-mod-bundle.js.map +1 -0
- package/dist/web-mod-export.d.ts +68 -0
- package/dist/web-mod-export.js +100 -0
- package/dist/web-mod-export.js.map +1 -0
- package/dist/web-mod-store.d.ts +289 -0
- package/dist/web-mod-store.js +638 -0
- package/dist/web-mod-store.js.map +1 -0
- package/dist/web-org.d.ts +3 -3
- package/dist/web-org.js +11 -17
- package/dist/web-org.js.map +1 -1
- package/dist/web-owner-css-store.d.ts +222 -0
- package/dist/web-owner-css-store.js +440 -0
- package/dist/web-owner-css-store.js.map +1 -0
- package/dist/web-owner-css.d.ts +58 -0
- package/dist/web-owner-css.js +552 -0
- package/dist/web-owner-css.js.map +1 -0
- package/dist/web-prefs.d.ts +62 -0
- package/dist/web-prefs.js +232 -36
- package/dist/web-prefs.js.map +1 -1
- package/dist/web-preview.d.ts +15 -3
- package/dist/web-preview.js +28 -9
- 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 +67 -2
- package/dist/web-settings-patch.js +196 -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 +273 -0
- package/dist/web-settings-tools.js.map +1 -0
- package/dist/web-shell-routes.d.ts +2 -2
- package/dist/web-shell-routes.js +2 -2
- package/dist/web-shell-routes.js.map +1 -1
- package/dist/web-theme-store.d.ts +257 -0
- package/dist/web-theme-store.js +627 -0
- package/dist/web-theme-store.js.map +1 -0
- package/dist/web-theme.d.ts +123 -0
- package/dist/web-theme.js +416 -0
- package/dist/web-theme.js.map +1 -0
- package/dist/web-upload.d.ts +13 -0
- package/dist/web-upload.js +39 -3
- package/dist/web-upload.js.map +1 -1
- package/dist/web-widget.d.ts +72 -0
- package/dist/web-widget.js +245 -0
- package/dist/web-widget.js.map +1 -0
- package/dist/workflow-templates/default.md +1 -1
- package/package.json +1 -1
- package/templates/systemd.service.ejs +8 -0
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* #1990: links to another topic. One place builds "a link to instance X's place (or a world's General) on surface S"
|
|
3
|
+
* from what the adapters already know — Discord guild/channel ids, the Telegram supergroup id, its public @username
|
|
4
|
+
* when it has one, and topic ids — and messages name such a place through a token that each surface renders in its own
|
|
5
|
+
* form, or as plain text when the reader could not open the target.
|
|
6
|
+
*
|
|
7
|
+
* Discord `<#channel>` (clickable in place); in a DM, `https://discord.com/channels/<guild>/<channel>`
|
|
8
|
+
* Telegram `https://t.me/<username>/<topic>` (public group) or `https://t.me/c/<id without -100>/<topic>`, carried by
|
|
9
|
+
* a `text_link` entity on plain text — no parse mode, so nothing in the text needs escaping
|
|
10
|
+
* plain the label alone (a suffix token disappears)
|
|
11
|
+
*
|
|
12
|
+
* The forms are the documented ones; no real client was driven (#1990: the user checks them on the 2.3 beta).
|
|
13
|
+
*/
|
|
14
|
+
export interface WorldPlace {
|
|
15
|
+
type: "discord" | "telegram" | string;
|
|
16
|
+
/** Discord: the guild id. Telegram: the supergroup id (-100…). */
|
|
17
|
+
groupId?: string;
|
|
18
|
+
/** Telegram: the group's public @username (without the @), when it has one — then links work for non-members too. */
|
|
19
|
+
username?: string;
|
|
20
|
+
}
|
|
21
|
+
/** A world's place, for links: its platform, its group and (Telegram) the group's public @username once read. */
|
|
22
|
+
export declare function worldPlaceOf(world: {
|
|
23
|
+
type: string;
|
|
24
|
+
groupId: string;
|
|
25
|
+
adapter?: {
|
|
26
|
+
groupUsername?(groupId: string): string | undefined;
|
|
27
|
+
};
|
|
28
|
+
}): WorldPlace;
|
|
29
|
+
export declare const SNOWFLAKE: RegExp;
|
|
30
|
+
/** t.me/c/ links take a supergroup's id without its -100 prefix; anything else has no such link. */
|
|
31
|
+
export declare function telegramInternalId(chatId: string): string | undefined;
|
|
32
|
+
/** A link to a message (a prompt's own buttons), or undefined when none can be built for this platform/place. */
|
|
33
|
+
export declare function messageLink(place: WorldPlace, at: {
|
|
34
|
+
chatId: string;
|
|
35
|
+
threadId?: string;
|
|
36
|
+
messageId?: string;
|
|
37
|
+
}): string | undefined;
|
|
38
|
+
/**
|
|
39
|
+
* A browser URL to a topic or channel. Telegram's General topic (1) gets one only when `general` is set: an
|
|
40
|
+
* instance's link never points at General.
|
|
41
|
+
*/
|
|
42
|
+
export declare function topicUrl(place: WorldPlace | undefined, topicId: string | undefined, opts?: {
|
|
43
|
+
general?: boolean;
|
|
44
|
+
}): string | undefined;
|
|
45
|
+
/** A way to the instance's own thread: Discord's channel mention (clickable in place), Telegram's topic link. */
|
|
46
|
+
export declare function instanceLink(place: WorldPlace, topicId: string | undefined): string | undefined;
|
|
47
|
+
/** What a token points at: a world's General, or an instance's topic/room. */
|
|
48
|
+
export type PlaceTarget = {
|
|
49
|
+
kind: "general";
|
|
50
|
+
} | {
|
|
51
|
+
kind: "instance";
|
|
52
|
+
name: string;
|
|
53
|
+
};
|
|
54
|
+
/** How a surface reaches a target: a Discord mention, or a URL. Undefined: the reader gets plain text. */
|
|
55
|
+
export type PlaceLink = {
|
|
56
|
+
mention: string;
|
|
57
|
+
} | {
|
|
58
|
+
url: string;
|
|
59
|
+
};
|
|
60
|
+
/** A Telegram `text_link` entity: UTF-16 offsets, which is what a JS string's indices are. */
|
|
61
|
+
export interface TextLink {
|
|
62
|
+
offset: number;
|
|
63
|
+
length: number;
|
|
64
|
+
url: string;
|
|
65
|
+
}
|
|
66
|
+
/** "web": like Telegram, the label carries the link (a range of the text), here an in-app route (webRoute). */
|
|
67
|
+
export type PlaceSurface = "discord" | "telegram" | "web" | "plain";
|
|
68
|
+
/** Name a place in a message: rendered as `label` linked to the target, or as `label` alone. */
|
|
69
|
+
export declare function placeRef(target: PlaceTarget, label: string): string;
|
|
70
|
+
/**
|
|
71
|
+
* A link appended to a message (" → General"): the message's own words stay as they are, and when the place cannot
|
|
72
|
+
* be linked the suffix disappears with its leading space.
|
|
73
|
+
*/
|
|
74
|
+
export declare function placeSuffix(target: PlaceTarget, label: string): string;
|
|
75
|
+
export declare function hasPlaceRefs(text: string): boolean;
|
|
76
|
+
/**
|
|
77
|
+
* Render every token for one surface. `resolve` says how this reader reaches a target (undefined: plain text). The
|
|
78
|
+
* text outside tokens is copied unchanged; `textLinks` is non-empty only on Telegram.
|
|
79
|
+
*/
|
|
80
|
+
export declare function renderPlaceRefs(text: string, surface: PlaceSurface, resolve: (target: PlaceTarget) => PlaceLink | undefined): {
|
|
81
|
+
text: string;
|
|
82
|
+
textLinks: TextLink[];
|
|
83
|
+
};
|
|
84
|
+
/**
|
|
85
|
+
* #1990: an in-app route of the web app for an instance — its chat, or its terminal View — as the web client parses it
|
|
86
|
+
* (src/ui/shared/app-route.js chatPath / viewPath). Undefined for a name no route takes.
|
|
87
|
+
*/
|
|
88
|
+
export declare function webRoute(panel: "chat" | "view", name: string): string | undefined;
|
|
89
|
+
export declare const WEB_TEXT_LINKS_MAX = 16;
|
|
90
|
+
/**
|
|
91
|
+
* #1990: links as the web keeps them — on a status line or a prompt, ranges of its text that open an instance's chat
|
|
92
|
+
* or View in the app. Whatever is not exactly that (out of the text, overlapping, not such a route) is dropped; an
|
|
93
|
+
* empty result is undefined.
|
|
94
|
+
*/
|
|
95
|
+
export declare function webTextLinks(raw: unknown, text: string): TextLink[] | undefined;
|
|
96
|
+
/** Every token as its label, suffixes gone: what a surface that renders no links shows. */
|
|
97
|
+
export declare function stripPlaceRefs(text: string): string;
|
|
98
|
+
/** Text links that lie wholly inside [start, end), re-based to start; one that crosses the boundary is dropped. */
|
|
99
|
+
export declare function textLinksWithin(links: readonly TextLink[], start: number, end: number): TextLink[];
|
|
100
|
+
export interface MembershipSource {
|
|
101
|
+
isGroupMember?(groupId: string, userId: string): Promise<boolean>;
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Whether a DM recipient may get links into a group: only a confirmed member (#1990 — never link to what the reader
|
|
105
|
+
* cannot open). One read per (group, user) per `ttlMs`, bounded by `deadlineMs`; a non-member, an error, a timeout or
|
|
106
|
+
* an adapter that cannot tell all mean "no" (plain text). Answers are cached, failures included, so a refusing
|
|
107
|
+
* platform is asked again only after the TTL; concurrent asks share one read.
|
|
108
|
+
*/
|
|
109
|
+
export declare class GroupMembership {
|
|
110
|
+
private readonly opts;
|
|
111
|
+
private readonly answers;
|
|
112
|
+
private readonly reads;
|
|
113
|
+
constructor(opts?: {
|
|
114
|
+
now: () => number;
|
|
115
|
+
ttlMs?: number;
|
|
116
|
+
deadlineMs?: number;
|
|
117
|
+
maxEntries?: number;
|
|
118
|
+
});
|
|
119
|
+
isMember(source: MembershipSource, groupId: string, userId: string): Promise<boolean>;
|
|
120
|
+
private read;
|
|
121
|
+
}
|
|
122
|
+
/** #1990: refusals that send the person to General — their reply carries a link to it. */
|
|
123
|
+
export declare const GENERAL_POINTING_REFUSALS: ReadonlySet<string>;
|
|
124
|
+
/**
|
|
125
|
+
* Text from outside (an agent's message, a pane line, a dialog's description) as a place-token-free argument: a
|
|
126
|
+
* message that interpolates it must not let it name a place of its own.
|
|
127
|
+
*/
|
|
128
|
+
export declare function noPlaceMarkers(text: string): string;
|
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* #1990: links to another topic. One place builds "a link to instance X's place (or a world's General) on surface S"
|
|
3
|
+
* from what the adapters already know — Discord guild/channel ids, the Telegram supergroup id, its public @username
|
|
4
|
+
* when it has one, and topic ids — and messages name such a place through a token that each surface renders in its own
|
|
5
|
+
* form, or as plain text when the reader could not open the target.
|
|
6
|
+
*
|
|
7
|
+
* Discord `<#channel>` (clickable in place); in a DM, `https://discord.com/channels/<guild>/<channel>`
|
|
8
|
+
* Telegram `https://t.me/<username>/<topic>` (public group) or `https://t.me/c/<id without -100>/<topic>`, carried by
|
|
9
|
+
* a `text_link` entity on plain text — no parse mode, so nothing in the text needs escaping
|
|
10
|
+
* plain the label alone (a suffix token disappears)
|
|
11
|
+
*
|
|
12
|
+
* The forms are the documented ones; no real client was driven (#1990: the user checks them on the 2.3 beta).
|
|
13
|
+
*/
|
|
14
|
+
/** A world's place, for links: its platform, its group and (Telegram) the group's public @username once read. */
|
|
15
|
+
export function worldPlaceOf(world) {
|
|
16
|
+
const username = world.groupId ? world.adapter?.groupUsername?.(world.groupId) : undefined;
|
|
17
|
+
return { type: world.type, ...(world.groupId ? { groupId: world.groupId } : {}), ...(username ? { username } : {}) };
|
|
18
|
+
}
|
|
19
|
+
export const SNOWFLAKE = /^\d{5,25}$/;
|
|
20
|
+
/** A Telegram @username as the platform allows it: 4–32 of [A-Za-z0-9_], starting with a letter. */
|
|
21
|
+
const TELEGRAM_USERNAME = /^[A-Za-z][A-Za-z0-9_]{3,31}$/;
|
|
22
|
+
/** t.me/c/ links take a supergroup's id without its -100 prefix; anything else has no such link. */
|
|
23
|
+
export function telegramInternalId(chatId) {
|
|
24
|
+
const m = /^-100(\d+)$/.exec(chatId);
|
|
25
|
+
return m ? m[1] : undefined;
|
|
26
|
+
}
|
|
27
|
+
/** The t.me path prefix of a group: `<username>` for a public one, `c/<id>` for a private supergroup. */
|
|
28
|
+
function telegramGroupPath(place, chatId = place.groupId ?? "") {
|
|
29
|
+
if (place.username && TELEGRAM_USERNAME.test(place.username) && chatId === place.groupId)
|
|
30
|
+
return place.username;
|
|
31
|
+
const internal = telegramInternalId(chatId);
|
|
32
|
+
return internal ? `c/${internal}` : undefined;
|
|
33
|
+
}
|
|
34
|
+
/** A link to a message (a prompt's own buttons), or undefined when none can be built for this platform/place. */
|
|
35
|
+
export function messageLink(place, at) {
|
|
36
|
+
if (!at.messageId)
|
|
37
|
+
return undefined;
|
|
38
|
+
if (place.type === "discord") {
|
|
39
|
+
const channel = at.threadId ?? at.chatId;
|
|
40
|
+
if (!place.groupId || !SNOWFLAKE.test(place.groupId) || !SNOWFLAKE.test(channel) || !SNOWFLAKE.test(at.messageId))
|
|
41
|
+
return undefined;
|
|
42
|
+
return `https://discord.com/channels/${place.groupId}/${channel}/${at.messageId}`;
|
|
43
|
+
}
|
|
44
|
+
if (place.type === "telegram") {
|
|
45
|
+
const path = telegramGroupPath(place, at.chatId);
|
|
46
|
+
if (!path || !/^\d+$/.test(at.messageId))
|
|
47
|
+
return undefined;
|
|
48
|
+
const topic = at.threadId && at.threadId !== "1" && /^\d+$/.test(at.threadId) ? `${at.threadId}/` : "";
|
|
49
|
+
return `https://t.me/${path}/${topic}${at.messageId}`;
|
|
50
|
+
}
|
|
51
|
+
return undefined;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* A browser URL to a topic or channel. Telegram's General topic (1) gets one only when `general` is set: an
|
|
55
|
+
* instance's link never points at General.
|
|
56
|
+
*/
|
|
57
|
+
export function topicUrl(place, topicId, opts = {}) {
|
|
58
|
+
if (!place || !topicId)
|
|
59
|
+
return undefined;
|
|
60
|
+
if (place.type === "discord") {
|
|
61
|
+
if (!place.groupId || !SNOWFLAKE.test(place.groupId) || !SNOWFLAKE.test(topicId))
|
|
62
|
+
return undefined;
|
|
63
|
+
return `https://discord.com/channels/${place.groupId}/${topicId}`;
|
|
64
|
+
}
|
|
65
|
+
if (place.type === "telegram") {
|
|
66
|
+
const path = telegramGroupPath(place);
|
|
67
|
+
if (!path || !/^\d+$/.test(topicId) || (topicId === "1" && !opts.general))
|
|
68
|
+
return undefined;
|
|
69
|
+
return `https://t.me/${path}/${topicId}`;
|
|
70
|
+
}
|
|
71
|
+
return undefined;
|
|
72
|
+
}
|
|
73
|
+
/** A way to the instance's own thread: Discord's channel mention (clickable in place), Telegram's topic link. */
|
|
74
|
+
export function instanceLink(place, topicId) {
|
|
75
|
+
if (!topicId)
|
|
76
|
+
return undefined;
|
|
77
|
+
if (place.type === "discord")
|
|
78
|
+
return SNOWFLAKE.test(topicId) ? `<#${topicId}>` : undefined;
|
|
79
|
+
return topicUrl(place, topicId);
|
|
80
|
+
}
|
|
81
|
+
// Private-use code points: no normal text carries them, and a stray one is never taken for a token.
|
|
82
|
+
const OPEN = "";
|
|
83
|
+
const MID = "";
|
|
84
|
+
const CLOSE = "";
|
|
85
|
+
const TOKEN = /([^-]*)([^-]*)/g;
|
|
86
|
+
const MARKERS = /[-]/g;
|
|
87
|
+
function encodeTarget(target) {
|
|
88
|
+
return target.kind === "general" ? "g" : `i:${encodeURIComponent(target.name)}`;
|
|
89
|
+
}
|
|
90
|
+
function decodeTarget(payload) {
|
|
91
|
+
if (payload === "g")
|
|
92
|
+
return { kind: "general" };
|
|
93
|
+
if (!payload.startsWith("i:"))
|
|
94
|
+
return undefined;
|
|
95
|
+
try {
|
|
96
|
+
const name = decodeURIComponent(payload.slice(2));
|
|
97
|
+
return name ? { kind: "instance", name } : undefined;
|
|
98
|
+
}
|
|
99
|
+
catch {
|
|
100
|
+
return undefined;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
/** Name a place in a message: rendered as `label` linked to the target, or as `label` alone. */
|
|
104
|
+
export function placeRef(target, label) {
|
|
105
|
+
return `${OPEN}${encodeTarget(target)}${MID}${label.replace(MARKERS, "")}${CLOSE}`;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* A link appended to a message (" → General"): the message's own words stay as they are, and when the place cannot
|
|
109
|
+
* be linked the suffix disappears with its leading space.
|
|
110
|
+
*/
|
|
111
|
+
export function placeSuffix(target, label) {
|
|
112
|
+
return ` ${OPEN}s|${encodeTarget(target)}${MID}${label.replace(MARKERS, "")}${CLOSE}`;
|
|
113
|
+
}
|
|
114
|
+
export function hasPlaceRefs(text) {
|
|
115
|
+
return text.includes(OPEN);
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Render every token for one surface. `resolve` says how this reader reaches a target (undefined: plain text). The
|
|
119
|
+
* text outside tokens is copied unchanged; `textLinks` is non-empty only on Telegram.
|
|
120
|
+
*/
|
|
121
|
+
export function renderPlaceRefs(text, surface, resolve) {
|
|
122
|
+
if (!hasPlaceRefs(text))
|
|
123
|
+
return { text, textLinks: [] };
|
|
124
|
+
const textLinks = [];
|
|
125
|
+
let out = "";
|
|
126
|
+
let last = 0;
|
|
127
|
+
for (const m of text.matchAll(TOKEN)) {
|
|
128
|
+
let before = text.slice(last, m.index);
|
|
129
|
+
last = m.index + m[0].length;
|
|
130
|
+
const suffix = m[1].startsWith("s|");
|
|
131
|
+
const target = decodeTarget(suffix ? m[1].slice(2) : m[1]);
|
|
132
|
+
const label = m[2];
|
|
133
|
+
const link = target && label && surface !== "plain" ? resolve(target) : undefined;
|
|
134
|
+
if (!link) {
|
|
135
|
+
// A suffix is all link: without one it goes, with the space placeSuffix put before it.
|
|
136
|
+
if (suffix)
|
|
137
|
+
before = before.endsWith(" ") ? before.slice(0, -1) : before;
|
|
138
|
+
out += before + (suffix ? "" : label);
|
|
139
|
+
continue;
|
|
140
|
+
}
|
|
141
|
+
out += before;
|
|
142
|
+
const arrow = suffix ? "→ " : "";
|
|
143
|
+
if (surface === "discord") {
|
|
144
|
+
// A mention is clickable in place; a URL (a DM) in angle brackets so Discord adds no embed.
|
|
145
|
+
const ref = "mention" in link ? link.mention : `<${link.url}>`;
|
|
146
|
+
out += suffix ? `${arrow}${ref}` : `${label} (${ref})`;
|
|
147
|
+
}
|
|
148
|
+
else if ("url" in link) {
|
|
149
|
+
out += arrow;
|
|
150
|
+
textLinks.push({ offset: out.length, length: label.length, url: link.url });
|
|
151
|
+
out += label;
|
|
152
|
+
}
|
|
153
|
+
else {
|
|
154
|
+
out += arrow + label;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
out += text.slice(last);
|
|
158
|
+
return { text: out, textLinks };
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* #1990: an in-app route of the web app for an instance — its chat, or its terminal View — as the web client parses it
|
|
162
|
+
* (src/ui/shared/app-route.js chatPath / viewPath). Undefined for a name no route takes.
|
|
163
|
+
*/
|
|
164
|
+
export function webRoute(panel, name) {
|
|
165
|
+
if (!name || name.length > 128 || /[/\\\u0000-\u001f\u007f]/.test(name) || name === "." || name.includes(".."))
|
|
166
|
+
return undefined;
|
|
167
|
+
return panel === "chat" ? `/ui/chat/${encodeURIComponent(name)}` : `/view/${encodeURIComponent(name)}`;
|
|
168
|
+
}
|
|
169
|
+
const WEB_ROUTE = /^\/(?:ui\/chat|view)\/[^/?#\s]+$/;
|
|
170
|
+
export const WEB_TEXT_LINKS_MAX = 16;
|
|
171
|
+
/**
|
|
172
|
+
* #1990: links as the web keeps them — on a status line or a prompt, ranges of its text that open an instance's chat
|
|
173
|
+
* or View in the app. Whatever is not exactly that (out of the text, overlapping, not such a route) is dropped; an
|
|
174
|
+
* empty result is undefined.
|
|
175
|
+
*/
|
|
176
|
+
export function webTextLinks(raw, text) {
|
|
177
|
+
if (!Array.isArray(raw))
|
|
178
|
+
return undefined;
|
|
179
|
+
const out = [];
|
|
180
|
+
let end = 0;
|
|
181
|
+
for (const l of raw.slice(0, WEB_TEXT_LINKS_MAX)) {
|
|
182
|
+
if (!l || typeof l !== "object")
|
|
183
|
+
continue;
|
|
184
|
+
const { offset, length, url } = l;
|
|
185
|
+
if (!Number.isSafeInteger(offset) || !Number.isSafeInteger(length) || typeof url !== "string")
|
|
186
|
+
continue;
|
|
187
|
+
const o = offset, n = length;
|
|
188
|
+
if (o < end || n < 1 || o + n > text.length || !WEB_ROUTE.test(url))
|
|
189
|
+
continue;
|
|
190
|
+
try {
|
|
191
|
+
decodeURIComponent(url);
|
|
192
|
+
}
|
|
193
|
+
catch {
|
|
194
|
+
continue;
|
|
195
|
+
}
|
|
196
|
+
out.push({ offset: o, length: n, url });
|
|
197
|
+
end = o + n;
|
|
198
|
+
}
|
|
199
|
+
return out.length ? out : undefined;
|
|
200
|
+
}
|
|
201
|
+
/** Every token as its label, suffixes gone: what a surface that renders no links shows. */
|
|
202
|
+
export function stripPlaceRefs(text) {
|
|
203
|
+
return renderPlaceRefs(text, "plain", () => undefined).text;
|
|
204
|
+
}
|
|
205
|
+
/** Text links that lie wholly inside [start, end), re-based to start; one that crosses the boundary is dropped. */
|
|
206
|
+
export function textLinksWithin(links, start, end) {
|
|
207
|
+
return links.filter(l => l.offset >= start && l.offset + l.length <= end).map(l => ({ ...l, offset: l.offset - start }));
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* Whether a DM recipient may get links into a group: only a confirmed member (#1990 — never link to what the reader
|
|
211
|
+
* cannot open). One read per (group, user) per `ttlMs`, bounded by `deadlineMs`; a non-member, an error, a timeout or
|
|
212
|
+
* an adapter that cannot tell all mean "no" (plain text). Answers are cached, failures included, so a refusing
|
|
213
|
+
* platform is asked again only after the TTL; concurrent asks share one read.
|
|
214
|
+
*/
|
|
215
|
+
export class GroupMembership {
|
|
216
|
+
opts;
|
|
217
|
+
answers = new Map();
|
|
218
|
+
reads = new Map();
|
|
219
|
+
constructor(opts = { now: () => performance.now() }) {
|
|
220
|
+
this.opts = opts;
|
|
221
|
+
}
|
|
222
|
+
async isMember(source, groupId, userId) {
|
|
223
|
+
if (!source.isGroupMember || !groupId || !userId)
|
|
224
|
+
return false;
|
|
225
|
+
const key = `${groupId}\u0000${userId}`;
|
|
226
|
+
const ttl = this.opts.ttlMs ?? 10 * 60_000;
|
|
227
|
+
const cached = this.answers.get(key);
|
|
228
|
+
if (cached && this.opts.now() - cached.at < ttl)
|
|
229
|
+
return cached.member;
|
|
230
|
+
const pending = this.reads.get(key);
|
|
231
|
+
if (pending)
|
|
232
|
+
return pending;
|
|
233
|
+
const read = this.read(source, groupId, userId).then(member => {
|
|
234
|
+
this.answers.delete(key); // re-insert: the map's order is its age, for the bound below
|
|
235
|
+
this.answers.set(key, { member, at: this.opts.now() });
|
|
236
|
+
const max = this.opts.maxEntries ?? 1000;
|
|
237
|
+
while (this.answers.size > max)
|
|
238
|
+
this.answers.delete(this.answers.keys().next().value);
|
|
239
|
+
return member;
|
|
240
|
+
}).finally(() => this.reads.delete(key));
|
|
241
|
+
this.reads.set(key, read);
|
|
242
|
+
return read;
|
|
243
|
+
}
|
|
244
|
+
read(source, groupId, userId) {
|
|
245
|
+
const deadlineMs = this.opts.deadlineMs ?? 5_000;
|
|
246
|
+
return new Promise(resolve => {
|
|
247
|
+
const timer = setTimeout(() => resolve(false), deadlineMs);
|
|
248
|
+
timer.unref?.();
|
|
249
|
+
let asked;
|
|
250
|
+
try {
|
|
251
|
+
asked = source.isGroupMember(groupId, userId);
|
|
252
|
+
}
|
|
253
|
+
catch {
|
|
254
|
+
asked = Promise.resolve(false);
|
|
255
|
+
}
|
|
256
|
+
asked.then(member => { clearTimeout(timer); resolve(member === true); }, () => { clearTimeout(timer); resolve(false); });
|
|
257
|
+
});
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
/** #1990: refusals that send the person to General — their reply carries a link to it. */
|
|
261
|
+
export const GENERAL_POINTING_REFUSALS = new Set(["cmd.use_in_general", "profile.general_only"]);
|
|
262
|
+
/**
|
|
263
|
+
* Text from outside (an agent's message, a pane line, a dialog's description) as a place-token-free argument: a
|
|
264
|
+
* message that interpolates it must not let it name a place of its own.
|
|
265
|
+
*/
|
|
266
|
+
export function noPlaceMarkers(text) {
|
|
267
|
+
return text.replace(MARKERS, "");
|
|
268
|
+
}
|
|
269
|
+
//# sourceMappingURL=topic-link.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"topic-link.js","sourceRoot":"","sources":["../src/topic-link.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAUH,iHAAiH;AACjH,MAAM,UAAU,YAAY,CAAC,KAA2G;IACtI,MAAM,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,EAAE,aAAa,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IAC3F,OAAO,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC;AACvH,CAAC;AAED,MAAM,CAAC,MAAM,SAA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EAAE,MAAM,CAAC,CAAC;YAAC,CAAC;YAAC,MAAM,CAAC;gBAAC,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;YAAC,CAAC;YACjG,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,GAAG,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,KAAK,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,GAAG,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC3H,CAAC,CAAC,CAAC;IACL,CAAC;CACF;AAED,0FAA0F;AAC1F,MAAM,CAAC,MAAM,yBAAyB,GAAwB,IAAI,GAAG,CAAC,CAAC,oBAAoB,EAAE,sBAAsB,CAAC,CAAC,CAAC;AAEtH;;;GAGG;AACH,MAAM,UAAU,cAAc,CAAC,IAAY;IACzC,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;AACnC,CAAC"}
|
package/dist/types.d.ts
CHANGED
|
@@ -345,6 +345,12 @@ export interface WebConfig {
|
|
|
345
345
|
echo_to_channel?: boolean;
|
|
346
346
|
/** Show the AI subscription usage panel on /view and serve /api/ai-usage (default true). */
|
|
347
347
|
usage_panel?: boolean;
|
|
348
|
+
/**
|
|
349
|
+
* #2122: serve the usage report (Fleet → Usage, GET /ui/usage-report) over the temporary public link too (default
|
|
350
|
+
* false). It is up to 400 days of per-agent, per-model, per-profile activity and amounts — more than the live quota
|
|
351
|
+
* rail or the cache report the link already shows. Guests never get it.
|
|
352
|
+
*/
|
|
353
|
+
usage_report_on_public_link?: boolean;
|
|
348
354
|
/**
|
|
349
355
|
* #1937: the largest file the web chat takes, in MB (whole number, 1–500; default 50). Never more than
|
|
350
356
|
* upload_max_total_mb; over the public link a file is at most 95 MB whatever this says (the quick tunnel's limit).
|
|
@@ -378,7 +384,7 @@ export interface WebConfig {
|
|
|
378
384
|
/**
|
|
379
385
|
* #1620: how long a web session lasts. Only the LOCAL surface (the dashboard reached directly — loopback, a LAN, a
|
|
380
386
|
* tailnet) is configurable; a public-link session's limits stay fixed. Hours, 1 ≤ idle_hours ≤ absolute_hours ≤ 720;
|
|
381
|
-
* defaults
|
|
387
|
+
* defaults 48 (absolute, from sign-in) and 48 (idle, since the last use; #1670). Shortening applies to existing sessions.
|
|
382
388
|
*/
|
|
383
389
|
session?: {
|
|
384
390
|
local?: {
|
|
@@ -404,6 +410,60 @@ export interface WebConfig {
|
|
|
404
410
|
* instead of it; web.preview: false turns previews off everywhere.
|
|
405
411
|
*/
|
|
406
412
|
preview_on_public_link?: boolean;
|
|
413
|
+
/**
|
|
414
|
+
* #1629: agents' own web themes and effects. `agent_edit` (default true): false refuses every agent appearance write,
|
|
415
|
+
* fleet-wide; what is stored stays, and people can still reset and lock.
|
|
416
|
+
*/
|
|
417
|
+
themes?: {
|
|
418
|
+
agent_edit?: boolean;
|
|
419
|
+
};
|
|
420
|
+
/**
|
|
421
|
+
* #1629 r4.1 Q3 (b): the identity card's upload limits and each agent's picture quota. Defaults: portrait
|
|
422
|
+
* 1024×1536 / 1536 KiB, banner 1600×600 / 768 KiB, quota 8 files / 4 MiB. A value outside its hard bound is clamped
|
|
423
|
+
* (and warned about); a change applies to new uploads only.
|
|
424
|
+
*/
|
|
425
|
+
appearance?: import("./web-appearance-limits.js").AppearanceLimitsConfig;
|
|
426
|
+
/**
|
|
427
|
+
* #1920: guest web sign-in — a non-admin signed in as their own Discord or Telegram account, seeing only the instances
|
|
428
|
+
* they already use in chat (derived on every request). Default off.
|
|
429
|
+
*/
|
|
430
|
+
guests?: WebGuestsConfig;
|
|
431
|
+
/**
|
|
432
|
+
* #1939: when a signed-in web session's messages carry authority (docs/design/1939-verified-web-sessions.md §3).
|
|
433
|
+
* S1 records it in receipts only; no agent acts on it yet.
|
|
434
|
+
*/
|
|
435
|
+
verified_authority?: WebVerifiedAuthorityConfig;
|
|
436
|
+
}
|
|
437
|
+
/** #1939: fleet.yaml `web.verified_authority` (docs/design/1939-verified-web-sessions.md §0, §3, §10). */
|
|
438
|
+
export interface WebVerifiedAuthorityConfig {
|
|
439
|
+
/**
|
|
440
|
+
* The server switch (§10): web messages carry authority only while it is on (default true, §0.1). Turning it off makes
|
|
441
|
+
* every web authority read as none at once; turning it back on never brings back authority given before.
|
|
442
|
+
*/
|
|
443
|
+
enabled?: boolean;
|
|
444
|
+
/** "Only this computer can authorize": only loopback requests qualify (default false: LAN and tailnet too). */
|
|
445
|
+
loopback_only?: boolean;
|
|
446
|
+
/** A session's authorization lasts this many hours after it was given, 1–48 (default 48). */
|
|
447
|
+
max_session_hours?: number;
|
|
448
|
+
}
|
|
449
|
+
/** #1920: fleet.yaml `web.guests`. */
|
|
450
|
+
export interface WebGuestsConfig {
|
|
451
|
+
/** Guest sign-in at all (default false). Turning it off ends every guest session. */
|
|
452
|
+
enabled?: boolean;
|
|
453
|
+
/** Guests may chat (default true); false: read-only. */
|
|
454
|
+
chat?: boolean;
|
|
455
|
+
/**
|
|
456
|
+
* An `open` connection's guests reach nothing until an admin names instances here, per connection id (the user's
|
|
457
|
+
* decision: least privilege, since an open group has no list of people).
|
|
458
|
+
*/
|
|
459
|
+
open_instances?: Record<string, string[]>;
|
|
460
|
+
/** An admin's narrowing, per `<connection id>:<user id>`: intersected with the derived scope, never widening it. */
|
|
461
|
+
narrow?: Record<string, string[]>;
|
|
462
|
+
/** A guest session's limits: absolute 1–24 h (default 12), idle 15–720 min (default 120). */
|
|
463
|
+
session?: {
|
|
464
|
+
absolute_hours?: number;
|
|
465
|
+
idle_minutes?: number;
|
|
466
|
+
};
|
|
407
467
|
}
|
|
408
468
|
/** `login:` section — remote /login behaviour. */
|
|
409
469
|
export interface LoginConfig {
|