@songsid/agend 2.2.0-beta.9 → 2.3.0-beta.1
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.js +248 -2
- package/dist/agent-cli.js.map +1 -1
- package/dist/agent-endpoint.d.ts +2 -0
- package/dist/agent-endpoint.js +28 -0
- package/dist/agent-endpoint.js.map +1 -1
- package/dist/agent-file-read.d.ts +30 -0
- package/dist/agent-file-read.js +129 -0
- package/dist/agent-file-read.js.map +1 -0
- package/dist/agent-whats-new.js +20 -1
- 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 +3 -1
- package/dist/auth-api.js +32 -1
- package/dist/auth-api.js.map +1 -1
- package/dist/backend/antigravity.d.ts +33 -0
- package/dist/backend/antigravity.js +129 -21
- package/dist/backend/antigravity.js.map +1 -1
- package/dist/backend/claude-code.d.ts +3 -0
- package/dist/backend/claude-code.js +9 -0
- 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/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 +3 -0
- package/dist/backend/grok.js +9 -0
- package/dist/backend/grok.js.map +1 -1
- package/dist/backend/kiro.d.ts +3 -1
- package/dist/backend/kiro.js +7 -3
- 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.js +10 -2
- package/dist/backend/muse.js.map +1 -1
- package/dist/backend/types.d.ts +24 -0
- 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/channel/adapters/discord.d.ts +14 -0
- package/dist/channel/adapters/discord.js +66 -4
- package/dist/channel/adapters/discord.js.map +1 -1
- package/dist/channel/adapters/telegram.d.ts +26 -1
- package/dist/channel/adapters/telegram.js +98 -7
- package/dist/channel/adapters/telegram.js.map +1 -1
- package/dist/channel/mcp-tools.js +36 -0
- package/dist/channel/mcp-tools.js.map +1 -1
- package/dist/channel/tool-router.d.ts +2 -0
- package/dist/channel/tool-router.js +1 -1
- package/dist/channel/tool-router.js.map +1 -1
- package/dist/channel/types.d.ts +31 -0
- package/dist/cli.js +124 -24
- 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 -0
- 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/daemon.d.ts +9 -0
- package/dist/daemon.js +394 -29
- package/dist/daemon.js.map +1 -1
- package/dist/delivery-outbox.d.ts +8 -1
- package/dist/delivery-outbox.js +6 -2
- package/dist/delivery-outbox.js.map +1 -1
- package/dist/doctor.js +7 -0
- package/dist/doctor.js.map +1 -1
- package/dist/fleet-context.d.ts +12 -0
- package/dist/fleet-manager.d.ts +247 -9
- package/dist/fleet-manager.js +1227 -142
- 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/model-discovery/SKILL.md +4 -1
- package/dist/general-knowledge/skills/web-appearance/SKILL.md +258 -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 +15 -8
- package/dist/instance-avatar.js.map +1 -1
- package/dist/instance-config-impact.js +3 -0
- package/dist/instance-config-impact.js.map +1 -1
- package/dist/instance-lifecycle.js +9 -4
- package/dist/instance-lifecycle.js.map +1 -1
- package/dist/instructions.js +2 -2
- 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/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 +202 -30
- package/dist/locale.js.map +1 -1
- package/dist/log-service.js +10 -2
- package/dist/log-service.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/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 +32 -0
- package/dist/outbound-handlers.js +150 -45
- package/dist/outbound-handlers.js.map +1 -1
- package/dist/outbound-schemas.d.ts +76 -0
- package/dist/outbound-schemas.js +65 -4
- 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-web-gateway.d.ts +2 -0
- package/dist/public-web-gateway.js +25 -1
- package/dist/public-web-gateway.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 +86 -5
- package/dist/reply-buttons-controller.js +271 -7
- 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/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-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 +0 -2
- package/dist/restart-progress.js +0 -2
- package/dist/restart-progress.js.map +1 -1
- package/dist/scheduler/scheduler.d.ts +58 -1
- package/dist/scheduler/scheduler.js +176 -10
- package/dist/scheduler/scheduler.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 +24 -0
- package/dist/service-installer.js +49 -1
- 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 +74 -1
- package/dist/settings-api.js.map +1 -1
- package/dist/settings-change.js +8 -0
- package/dist/settings-change.js.map +1 -1
- package/dist/settings-effect.js +16 -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/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/tool-permissions.js +53 -3
- package/dist/tool-permissions.js.map +1 -1
- package/dist/topic-commands.d.ts +72 -2
- package/dist/topic-commands.js +156 -38
- 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/transcript-jsonl.d.ts +7 -2
- package/dist/transcript-jsonl.js +13 -7
- package/dist/transcript-jsonl.js.map +1 -1
- package/dist/transcript-sources.js +6 -1
- package/dist/transcript-sources.js.map +1 -1
- package/dist/types.d.ts +21 -0
- package/dist/ui/app-effects.js +187 -0
- package/dist/ui/chat-commands.js +1 -0
- package/dist/ui/chat-effect-posters.js +42 -0
- package/dist/ui/chat-effects.js +72 -0
- package/dist/ui/chat-live-replies.js +58 -0
- package/dist/ui/chat-render.js +59 -14
- package/dist/ui/chat-store.js +78 -8
- package/dist/ui/chat-strings.js +43 -16
- package/dist/ui/chat-thread.js +175 -31
- package/dist/ui/chat-tour.js +18 -15
- package/dist/ui/effect-trial-controller.js +119 -0
- package/dist/ui/effect-trial-offer.js +31 -0
- package/dist/ui/effect-trial-panel.js +37 -0
- package/dist/ui/image-lightbox.js +1 -1
- package/dist/ui/panel-chat.js +101 -27
- package/dist/ui/panel-details.js +18 -5
- package/dist/ui/panel-fleet.js +18 -5
- package/dist/ui/panel-log.js +10 -10
- package/dist/ui/panel-needs.js +13 -10
- package/dist/ui/panel-settings.js +66 -12
- package/dist/ui/preview-panel.js +25 -9
- package/dist/ui/settings-appearance.js +325 -0
- package/dist/ui/settings-dialogs.js +11 -6
- package/dist/ui/settings-effects.js +201 -0
- package/dist/ui/settings-model.js +3 -1
- package/dist/ui/settings-mods.js +257 -0
- package/dist/ui/settings-owner-effects.js +80 -0
- package/dist/ui/settings-strings.js +269 -10
- package/dist/ui/settings-token.js +7 -0
- package/dist/ui/settings-wizard.js +5 -3
- package/dist/ui/shared/agend-auth.js +27 -3
- package/dist/ui/shared/agent-widget.js +248 -0
- package/dist/ui/shared/app-i18n.js +3 -1
- package/dist/ui/shared/app-prefs.js +30 -10
- package/dist/ui/shared/app-route.js +23 -1
- package/dist/ui/shared/app-session.js +1 -1
- package/dist/ui/shared/app-shell.js +29 -16
- package/dist/ui/shared/app-store.js +2 -0
- package/dist/ui/shared/app-stream.js +15 -7
- package/dist/ui/shared/app-themes.js +188 -0
- package/dist/ui/shared/app.css +266 -11
- package/dist/ui/shared/app.js +6 -0
- package/dist/ui/shared/card-strings.js +28 -0
- package/dist/ui/shared/effect-app-runtime.js +248 -0
- package/dist/ui/shared/effect-baseline.js +64 -0
- package/dist/ui/shared/effect-chat-runtime.js +154 -0
- package/dist/ui/shared/effect-cursor.js +125 -0
- package/dist/ui/shared/effect-frame.js +127 -0
- package/dist/ui/shared/effect-geometry.js +122 -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 +115 -0
- package/dist/ui/shared/effect-policy.js +137 -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 +162 -0
- package/dist/ui/shared/effect-profiles.js +65 -0
- package/dist/ui/shared/effect-registry.js +496 -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 +34 -0
- package/dist/ui/shared/effect-stock-trust.js +165 -0
- package/dist/ui/shared/effect-trial-source.js +103 -0
- package/dist/ui/shared/effect-trial-stage.js +147 -0
- package/dist/ui/shared/header-tools.js +35 -15
- package/dist/ui/shared/identity-card.js +202 -0
- package/dist/ui/shared/identity-color.js +261 -0
- package/dist/ui/shared/instance-nav.js +22 -14
- package/dist/ui/shared/instance-switch.js +5 -2
- package/dist/ui/shared/owner-css.js +221 -0
- package/dist/ui/shared/owner-effect-prefs.js +117 -0
- package/dist/ui/shared/panel-view.js +96 -12
- package/dist/ui/shared/signin.js +17 -9
- 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/view-strings.js +40 -2
- package/dist/ui/signin.html +9 -3
- 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-launch.d.ts +48 -1
- package/dist/update-launch.js +159 -5
- package/dist/update-launch.js.map +1 -1
- package/dist/usage/providers.d.ts +28 -8
- package/dist/usage/providers.js +96 -41
- package/dist/usage/providers.js.map +1 -1
- package/dist/view-api.d.ts +29 -0
- package/dist/view-api.js +214 -17
- package/dist/view-api.js.map +1 -1
- package/dist/web-api.d.ts +86 -2
- package/dist/web-api.js +1160 -92
- 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 +66 -0
- package/dist/web-appearance-policy.js +94 -0
- package/dist/web-appearance-policy.js.map +1 -0
- package/dist/web-appearance-tools.d.ts +50 -0
- package/dist/web-appearance-tools.js +105 -0
- package/dist/web-appearance-tools.js.map +1 -0
- package/dist/web-appearance-view.d.ts +99 -0
- package/dist/web-appearance-view.js +163 -0
- package/dist/web-appearance-view.js.map +1 -0
- package/dist/web-appearance.d.ts +79 -0
- package/dist/web-appearance.js +298 -0
- package/dist/web-appearance.js.map +1 -0
- package/dist/web-asset-parts.d.ts +98 -0
- package/dist/web-asset-parts.js +133 -0
- package/dist/web-asset-parts.js.map +1 -0
- package/dist/web-auth.js +17 -1
- package/dist/web-auth.js.map +1 -1
- package/dist/web-card.d.ts +96 -0
- package/dist/web-card.js +232 -0
- package/dist/web-card.js.map +1 -0
- package/dist/web-chat-history.d.ts +39 -1
- package/dist/web-chat-history.js +69 -9
- package/dist/web-chat-history.js.map +1 -1
- package/dist/web-commands.d.ts +39 -3
- package/dist/web-commands.js +22 -5
- package/dist/web-commands.js.map +1 -1
- package/dist/web-effect-bundle.d.ts +28 -0
- package/dist/web-effect-bundle.js +126 -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-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 +86 -0
- package/dist/web-effect-service.js +312 -0
- package/dist/web-effect-service.js.map +1 -0
- package/dist/web-effect-tools.d.ts +47 -0
- package/dist/web-effect-tools.js +126 -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 +29 -0
- package/dist/web-effect-upload.js +190 -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 +89 -0
- package/dist/web-effect.js +132 -0
- package/dist/web-effect.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 +25 -0
- package/dist/web-image-meta.js +200 -0
- package/dist/web-image-meta.js.map +1 -0
- 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-mod-agent.d.ts +50 -0
- package/dist/web-mod-agent.js +203 -0
- package/dist/web-mod-agent.js.map +1 -0
- package/dist/web-mod-bundle.d.ts +144 -0
- package/dist/web-mod-bundle.js +464 -0
- package/dist/web-mod-bundle.js.map +1 -0
- package/dist/web-mod-export.d.ts +59 -0
- package/dist/web-mod-export.js +79 -0
- package/dist/web-mod-export.js.map +1 -0
- package/dist/web-mod-store.d.ts +283 -0
- package/dist/web-mod-store.js +624 -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 +180 -0
- package/dist/web-owner-css-store.js +384 -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 +66 -0
- package/dist/web-prefs.js +243 -35
- package/dist/web-prefs.js.map +1 -1
- package/dist/web-preview.d.ts +9 -1
- package/dist/web-preview.js +24 -7
- 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-session.d.ts +14 -0
- package/dist/web-session.js +10 -0
- package/dist/web-session.js.map +1 -1
- package/dist/web-settings-patch.d.ts +18 -0
- package/dist/web-settings-patch.js +51 -0
- package/dist/web-settings-patch.js.map +1 -1
- package/dist/web-shell-routes.d.ts +1 -1
- package/dist/web-shell-routes.js +1 -1
- package/dist/web-shell-routes.js.map +1 -1
- package/dist/web-theme-store.d.ts +218 -0
- package/dist/web-theme-store.js +516 -0
- package/dist/web-theme-store.js.map +1 -0
- package/dist/web-theme.d.ts +121 -0
- package/dist/web-theme.js +407 -0
- package/dist/web-theme.js.map +1 -0
- package/dist/web-upload.d.ts +119 -4
- package/dist/web-upload.js +252 -39
- 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/launcher/install-admission.cjs +61 -6
- package/package.json +3 -3
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { CommandResult } from "./update-install.js";
|
|
2
|
+
import { type PeerBus } from "./systemd-peer-bus.js";
|
|
2
3
|
/** Runtime evidence is independent of the definition on disk. Unknown is never stopped. */
|
|
3
4
|
export interface SystemdRuntime {
|
|
4
5
|
active: string;
|
|
@@ -10,6 +11,31 @@ export interface SystemdRuntime {
|
|
|
10
11
|
killMode: string;
|
|
11
12
|
sendSigkill: boolean;
|
|
12
13
|
}
|
|
13
|
-
|
|
14
|
+
/**
|
|
15
|
+
* #1804: busctl could not reach the bus at all — no D-Bus user bus (a host without dbus-user-session, where systemctl
|
|
16
|
+
* still reaches the manager through `$XDG_RUNTIME_DIR/systemd/private`, a peer socket busctl cannot use: it always sends
|
|
17
|
+
* Hello(), which that socket answers with "Invalid request descriptor"), or no busctl to run. Only then do the readers
|
|
18
|
+
* turn to the private socket (systemd-peer-bus.ts); any other busctl failure keeps its bus-path meaning.
|
|
19
|
+
*/
|
|
20
|
+
export declare function busUnreachable(result: CommandResult): boolean;
|
|
21
|
+
/** One line for a failed command: how it ended, then the first line it printed. */
|
|
22
|
+
export declare function commandFailure(result: CommandResult): string;
|
|
23
|
+
/** The D-Bus channel for one reader: busctl, or — only when busctl cannot reach a bus — the private socket. */
|
|
24
|
+
export type SystemdChannel = {
|
|
25
|
+
ok: true;
|
|
26
|
+
call: (args: string[]) => CommandResult;
|
|
27
|
+
objectPath: string;
|
|
28
|
+
} | {
|
|
29
|
+
ok: false;
|
|
30
|
+
reason: string;
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* #1804: load `name` (LoadUnit) over busctl; if busctl cannot reach a bus at all, over the manager's private socket
|
|
34
|
+
* through `peer` (systemdPeerBus), and every later read of this unit goes the same way. Each failure says which:
|
|
35
|
+
* neither reachable, the call refused on a reachable channel, or no private socket offered.
|
|
36
|
+
*/
|
|
37
|
+
export declare function systemdChannel(run: (command: string, args: string[]) => CommandResult, user: boolean, name: string, peer?: PeerBus): SystemdChannel;
|
|
38
|
+
/** `peer`: the manager's private socket, for a host where busctl cannot reach a bus (#1804). */
|
|
39
|
+
export declare function readSystemdRuntime(run: (command: string, args: string[]) => CommandResult, user: boolean, unit: string, peer?: PeerBus): SystemdRuntime | null;
|
|
14
40
|
export declare const systemdStopped: (s: SystemdRuntime | null) => boolean;
|
|
15
41
|
export declare const systemdRunning: (s: SystemdRuntime | null) => boolean;
|
package/dist/systemd-runtime.js
CHANGED
|
@@ -1,8 +1,74 @@
|
|
|
1
|
-
|
|
1
|
+
import { peerUnreachable } from "./systemd-peer-bus.js";
|
|
2
|
+
/**
|
|
3
|
+
* #1804: busctl could not reach the bus at all — no D-Bus user bus (a host without dbus-user-session, where systemctl
|
|
4
|
+
* still reaches the manager through `$XDG_RUNTIME_DIR/systemd/private`, a peer socket busctl cannot use: it always sends
|
|
5
|
+
* Hello(), which that socket answers with "Invalid request descriptor"), or no busctl to run. Only then do the readers
|
|
6
|
+
* turn to the private socket (systemd-peer-bus.ts); any other busctl failure keeps its bus-path meaning.
|
|
7
|
+
*/
|
|
8
|
+
export function busUnreachable(result) {
|
|
9
|
+
if (result.signal !== null)
|
|
10
|
+
return false;
|
|
11
|
+
if (result.status === null)
|
|
12
|
+
return true;
|
|
13
|
+
return result.status !== 0 && /^Failed to connect to bus\b/m.test(result.stderr);
|
|
14
|
+
}
|
|
15
|
+
/** One line for a failed command: how it ended, then the first line it printed. */
|
|
16
|
+
export function commandFailure(result) {
|
|
17
|
+
const said = (result.stderr || result.stdout).trim().split("\n", 1)[0] ?? "";
|
|
18
|
+
return `${result.signal ? `killed by ${result.signal}` : result.status === null ? "did not run" : `exited ${result.status}`}${said ? `: ${said}` : ""}`;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* #1804: load `name` (LoadUnit) over busctl; if busctl cannot reach a bus at all, over the manager's private socket
|
|
22
|
+
* through `peer` (systemdPeerBus), and every later read of this unit goes the same way. Each failure says which:
|
|
23
|
+
* neither reachable, the call refused on a reachable channel, or no private socket offered.
|
|
24
|
+
*/
|
|
25
|
+
export function systemdChannel(run, user, name, peer) {
|
|
2
26
|
const scope = user ? ["--user"] : [];
|
|
27
|
+
const loadUnit = ["call", "org.freedesktop.systemd1", "/org/freedesktop/systemd1", "org.freedesktop.systemd1.Manager", "LoadUnit", "s", name];
|
|
28
|
+
const viaBusctl = (args) => run("busctl", [...scope, "--json=short", ...args]);
|
|
29
|
+
const objectPath = (r) => {
|
|
30
|
+
if (r.status !== 0 || r.signal !== null)
|
|
31
|
+
return null;
|
|
32
|
+
try {
|
|
33
|
+
const parsed = JSON.parse(r.stdout);
|
|
34
|
+
const path = parsed.type === "o" && Array.isArray(parsed.data) && parsed.data.length === 1 ? parsed.data[0] : null;
|
|
35
|
+
return typeof path === "string" && path.startsWith("/org/freedesktop/systemd1/unit/") ? path : null;
|
|
36
|
+
}
|
|
37
|
+
catch {
|
|
38
|
+
return null;
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
const viaBus = viaBusctl(loadUnit);
|
|
42
|
+
if (!busUnreachable(viaBus)) {
|
|
43
|
+
const path = objectPath(viaBus);
|
|
44
|
+
return path ? { ok: true, call: viaBusctl, objectPath: path } : { ok: false, reason: `busctl could not load ${name} (${commandFailure(viaBus)})` };
|
|
45
|
+
}
|
|
46
|
+
const bus = `the D-Bus ${user ? "user " : ""}bus cannot be reached (busctl ${commandFailure(viaBus)})`;
|
|
47
|
+
if (!peer)
|
|
48
|
+
return { ok: false, reason: `${bus}, and systemd's private socket was not tried` };
|
|
49
|
+
const viaPeer = (args) => peer(user, args);
|
|
50
|
+
const loaded = viaPeer(loadUnit);
|
|
51
|
+
if (peerUnreachable(loaded))
|
|
52
|
+
return { ok: false, reason: `neither busctl nor the systemd${user ? " --user" : ""} manager's private socket can be reached (busctl ${commandFailure(viaBus)}; ${commandFailure(loaded)})` };
|
|
53
|
+
const path = objectPath(loaded);
|
|
54
|
+
return path ? { ok: true, call: viaPeer, objectPath: path } : { ok: false, reason: `${bus}, and systemd could not load ${name} over its private socket (${commandFailure(loaded)})` };
|
|
55
|
+
}
|
|
56
|
+
/** `peer`: the manager's private socket, for a host where busctl cannot reach a bus (#1804). */
|
|
57
|
+
export function readSystemdRuntime(run, user, unit, peer) {
|
|
58
|
+
const name = unit.endsWith(".service") ? unit : `${unit}.service`;
|
|
59
|
+
let channel;
|
|
60
|
+
try {
|
|
61
|
+
channel = systemdChannel(run, user, name, peer);
|
|
62
|
+
}
|
|
63
|
+
catch {
|
|
64
|
+
return null;
|
|
65
|
+
}
|
|
66
|
+
if (!channel.ok)
|
|
67
|
+
return null;
|
|
68
|
+
const { call, objectPath } = channel;
|
|
3
69
|
const bus = (args, type) => {
|
|
4
70
|
try {
|
|
5
|
-
const r =
|
|
71
|
+
const r = call(args);
|
|
6
72
|
if (r.status !== 0 || r.signal !== null)
|
|
7
73
|
return null;
|
|
8
74
|
const parsed = JSON.parse(r.stdout);
|
|
@@ -12,11 +78,7 @@ export function readSystemdRuntime(run, user, unit) {
|
|
|
12
78
|
return null;
|
|
13
79
|
}
|
|
14
80
|
};
|
|
15
|
-
const
|
|
16
|
-
const path = bus(["call", "org.freedesktop.systemd1", "/org/freedesktop/systemd1", "org.freedesktop.systemd1.Manager", "LoadUnit", "s", name], "o");
|
|
17
|
-
if (!Array.isArray(path) || path.length !== 1 || typeof path[0] !== "string" || !path[0].startsWith("/org/freedesktop/systemd1/unit/"))
|
|
18
|
-
return null;
|
|
19
|
-
const prop = (iface, property, type) => bus(["get-property", "org.freedesktop.systemd1", path[0], `org.freedesktop.systemd1.${iface}`, property], type);
|
|
81
|
+
const prop = (iface, property, type) => bus(["get-property", "org.freedesktop.systemd1", objectPath, `org.freedesktop.systemd1.${iface}`, property], type);
|
|
20
82
|
const active = prop("Unit", "ActiveState", "s"), sub = prop("Unit", "SubState", "s");
|
|
21
83
|
const job = prop("Unit", "Job", "(uo)");
|
|
22
84
|
const type = prop("Service", "Type", "s"), killMode = prop("Service", "KillMode", "s");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"systemd-runtime.js","sourceRoot":"","sources":["../src/systemd-runtime.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"systemd-runtime.js","sourceRoot":"","sources":["../src/systemd-runtime.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAgB,MAAM,uBAAuB,CAAC;AActE;;;;;GAKG;AACH,MAAM,UAAU,cAAc,CAAC,MAAqB;IAClD,IAAI,MAAM,CAAC,MAAM,KAAK,IAAI;QAAE,OAAO,KAAK,CAAC;IACzC,IAAI,MAAM,CAAC,MAAM,KAAK,IAAI;QAAE,OAAO,IAAI,CAAC;IACxC,OAAO,MAAM,CAAC,MAAM,KAAK,CAAC,IAAI,8BAA8B,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;AACnF,CAAC;AAED,mFAAmF;AACnF,MAAM,UAAU,cAAc,CAAC,MAAqB;IAClD,MAAM,IAAI,GAAG,CAAC,MAAM,CAAC,MAAM,IAAI,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IAC7E,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,aAAa,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,KAAK,IAAI,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,UAAU,MAAM,CAAC,MAAM,EAAE,GAAG,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;AAC1J,CAAC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M,KAAK,QAAQ,IAAI,CAAC,CAAC,GAAG,KAAK,SAAS,IAAI,CAAC,CAAC,GAAG,GAAG,CAAC,IAAI,CAAC,CAAC,OAAO,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC"}
|
package/dist/tool-permissions.js
CHANGED
|
@@ -29,7 +29,7 @@ import { TOOLS } from "./channel/mcp-tools.js";
|
|
|
29
29
|
/** Everything an agent that is doing the work needs, and nothing that runs the fleet. */
|
|
30
30
|
const WORKER = [
|
|
31
31
|
// Talking to people.
|
|
32
|
-
"reply", "react", "edit_message", "download_attachment",
|
|
32
|
+
"reply", "react", "edit_message", "download_attachment", "close_poll",
|
|
33
33
|
// Talking to peers. `report_result` is why `standard` was never usable as a
|
|
34
34
|
// worker profile: without it the delegate → work → report protocol has no
|
|
35
35
|
// last step. `delegate_task` is here because it creates nothing and needs a
|
|
@@ -44,6 +44,15 @@ const WORKER = [
|
|
|
44
44
|
// Its own things.
|
|
45
45
|
"task", "post_decision", "set_display_name", "set_description", "list_emojis", "set_persona_emoji", "preview_emojis",
|
|
46
46
|
"list_stickers", "preview_stickers",
|
|
47
|
+
// Its own web theme (#1629): no target argument — the caller's own, rate-limited, refused while a person locked it.
|
|
48
|
+
"get_web_theme", "set_web_theme", "set_web_theme_asset", "reset_web_theme",
|
|
49
|
+
// How it appears on the dashboard (#1629 r4 §1): read-only, its own.
|
|
50
|
+
"get_web_appearance", "preview_web_appearance",
|
|
51
|
+
// Its own declarative widgets (#1629 r4-4): no target, the same lock and limits.
|
|
52
|
+
"set_web_widget", "remove_web_widget",
|
|
53
|
+
// Mods (#1629 r4-5b): its own look as a file, and proposing one for a person — never importing.
|
|
54
|
+
"export_web_mod", "propose_web_mod",
|
|
55
|
+
"upload_web_effect", "list_web_effects", "preview_web_effect", "profile_web_effect", "apply_web_effect", "remove_web_effect", "delete_web_effect",
|
|
47
56
|
// Its own schedules. Present here, but not a free hand: scheduleOpRefusal
|
|
48
57
|
// limits a non-coordinator to schedules that target itself and that it
|
|
49
58
|
// created (#895). The target is the control, not whether the tool is listed.
|
|
@@ -78,7 +87,7 @@ export const TOOL_PROFILES = {
|
|
|
78
87
|
worker: WORKER,
|
|
79
88
|
coordinator: [...WORKER, ...ORCHESTRATION],
|
|
80
89
|
general: [
|
|
81
|
-
"reply", "react", "edit_message", "download_attachment",
|
|
90
|
+
"reply", "react", "edit_message", "download_attachment", "close_poll",
|
|
82
91
|
"list_teams", "list_instances", "describe_instance", "get_fleet_status", "get_usage", "get_effort", "list_models",
|
|
83
92
|
// Read-only: what each kiro instance runs on, for explaining a kiro incompatibility.
|
|
84
93
|
"kiro_engine_status",
|
|
@@ -90,12 +99,18 @@ export const TOOL_PROFILES = {
|
|
|
90
99
|
// a dispatcher can choose its own status stamp like any worker.
|
|
91
100
|
"list_emojis", "preview_emojis", "set_persona_emoji",
|
|
92
101
|
"list_stickers", "preview_stickers",
|
|
102
|
+
// Its own web theme (#1629), like its own status stamp. (The read-only appearance tools stay out: this profile is
|
|
103
|
+
// the lean one — a dispatcher reads its theme with get_web_theme.)
|
|
104
|
+
"get_web_theme", "set_web_theme", "set_web_theme_asset", "reset_web_theme",
|
|
93
105
|
],
|
|
94
106
|
standard: [
|
|
95
|
-
"reply", "react", "edit_message",
|
|
107
|
+
"reply", "react", "edit_message", "close_poll",
|
|
96
108
|
"send_to_instance", "broadcast", "list_instances", "describe_instance", "delivery_status",
|
|
97
109
|
"list_decisions", "post_decision", "task", "set_display_name", "set_description", "list_emojis", "set_persona_emoji", "preview_emojis",
|
|
98
110
|
"list_stickers", "preview_stickers",
|
|
111
|
+
"get_web_theme", "set_web_theme", "set_web_theme_asset", "reset_web_theme",
|
|
112
|
+
"get_web_appearance", "preview_web_appearance", "set_web_widget", "remove_web_widget", "export_web_mod", "propose_web_mod",
|
|
113
|
+
"upload_web_effect", "list_web_effects", "preview_web_effect", "profile_web_effect", "apply_web_effect", "remove_web_effect", "delete_web_effect",
|
|
99
114
|
"validate_config", "get_fleet_status", "get_usage", "get_effort", "get_instance_logs", "get_fleet_config", "kiro_engine_status",
|
|
100
115
|
// Self-scheduling, same scope as worker (#895).
|
|
101
116
|
"create_schedule", "list_schedules", "update_schedule", "delete_schedule",
|
|
@@ -201,6 +216,23 @@ export const IPC_TYPE_TOOLS = {
|
|
|
201
216
|
fleet_preview_emojis: "preview_emojis",
|
|
202
217
|
fleet_list_stickers: "list_stickers",
|
|
203
218
|
fleet_preview_stickers: "preview_stickers",
|
|
219
|
+
fleet_get_web_theme: "get_web_theme",
|
|
220
|
+
fleet_set_web_theme: "set_web_theme",
|
|
221
|
+
fleet_set_web_theme_asset: "set_web_theme_asset",
|
|
222
|
+
fleet_reset_web_theme: "reset_web_theme",
|
|
223
|
+
fleet_get_web_appearance: "get_web_appearance",
|
|
224
|
+
fleet_preview_web_appearance: "preview_web_appearance",
|
|
225
|
+
fleet_set_web_widget: "set_web_widget",
|
|
226
|
+
fleet_remove_web_widget: "remove_web_widget",
|
|
227
|
+
fleet_export_web_mod: "export_web_mod",
|
|
228
|
+
fleet_propose_web_mod: "propose_web_mod",
|
|
229
|
+
fleet_upload_web_effect: "upload_web_effect",
|
|
230
|
+
fleet_list_web_effects: "list_web_effects",
|
|
231
|
+
fleet_preview_web_effect: "preview_web_effect",
|
|
232
|
+
fleet_profile_web_effect: "profile_web_effect",
|
|
233
|
+
fleet_apply_web_effect: "apply_web_effect",
|
|
234
|
+
fleet_remove_web_effect: "remove_web_effect",
|
|
235
|
+
fleet_delete_web_effect: "delete_web_effect",
|
|
204
236
|
};
|
|
205
237
|
/**
|
|
206
238
|
* Agent-endpoint ops that never reach its `OP_MAP`.
|
|
@@ -228,6 +260,24 @@ export const EARLY_AGENT_OP_TOOLS = {
|
|
|
228
260
|
"emoji-preview": "preview_emojis",
|
|
229
261
|
stickers: "list_stickers",
|
|
230
262
|
"sticker-preview": "preview_stickers",
|
|
263
|
+
"theme-get": "get_web_theme",
|
|
264
|
+
"theme-set": "set_web_theme",
|
|
265
|
+
"theme-clear": "set_web_theme",
|
|
266
|
+
"theme-asset": "set_web_theme_asset",
|
|
267
|
+
"theme-reset": "reset_web_theme",
|
|
268
|
+
"appearance-get": "get_web_appearance",
|
|
269
|
+
"appearance-preview": "preview_web_appearance",
|
|
270
|
+
"widget-set": "set_web_widget",
|
|
271
|
+
"widget-remove": "remove_web_widget",
|
|
272
|
+
"mod-export": "export_web_mod",
|
|
273
|
+
"mod-propose": "propose_web_mod",
|
|
274
|
+
"effect-upload": "upload_web_effect",
|
|
275
|
+
"effect-list": "list_web_effects",
|
|
276
|
+
"effect-preview": "preview_web_effect",
|
|
277
|
+
"effect-profile": "profile_web_effect",
|
|
278
|
+
"effect-apply": "apply_web_effect",
|
|
279
|
+
"effect-remove": "remove_web_effect",
|
|
280
|
+
"effect-delete": "delete_web_effect",
|
|
231
281
|
};
|
|
232
282
|
/**
|
|
233
283
|
* What to say to an agent that was refused.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-permissions.js","sourceRoot":"","sources":["../src/tool-permissions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAI/C,yFAAyF;AACzF,MAAM,MAAM,GAAsB;IAChC,qBAAqB;IACrB,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,qBAAqB;
|
|
1
|
+
{"version":3,"file":"tool-permissions.js","sourceRoot":"","sources":["../src/tool-permissions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAI/C,yFAAyF;AACzF,MAAM,MAAM,GAAsB;IAChC,qBAAqB;IACrB,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,qBAAqB,EAAE,YAAY;IACrE,4EAA4E;IAC5E,0EAA0E;IAC1E,4EAA4E;IAC5E,2EAA2E;IAC3E,0EA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3B,IAAI,QAAQ,CAAC,MAAM,KAAK,MAAM,IAAI,QAAQ,CAAC,MAAM,KAAK,MAAM,EAAE,CAAC;QAC7D,OAAO,sBAAsB,CAAC,OAAO,EAAE,IAAI,EAAE,MAAM,EACjD,QAAQ,CAAC,MAAM,KAAK,MAAM;YACxB,CAAC,CAAC,mCAAmC,QAAQ,CAAC,MAAM,GAAG;YACvD,CAAC,CAAC,sBAAsB,QAAQ,CAAC,MAAM,eAAe,CAAC,CAAC;IAC9D,CAAC;IACD,IAAI,EAAE,KAAK,QAAQ,IAAI,SAAS,IAAI,SAAS,KAAK,MAAM,EAAE,CAAC;QACzD,OAAO,sBAAsB,CAAC,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,yBAAyB,SAAS,GAAG,CAAC,CAAC;IAC9F,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,+FAA+F;AAC/F,SAAS,sBAAsB,CAAC,OAAoB,EAAE,IAAY,EAAE,MAAc,EAAE,SAAiB;IACnG,OAAO,GAAG,IAAI,wBAAwB,OAAO,6DAA6D;UACtG,yBAAyB,MAAM,yCAAyC,SAAS,IAAI;UACrF,sFAAsF;UACtF,yCAAyC,CAAC;AAChD,CAAC"}
|
package/dist/topic-commands.d.ts
CHANGED
|
@@ -70,6 +70,45 @@ export declare function assignDisplayLabels(entries: {
|
|
|
70
70
|
}[]): Map<string, string>;
|
|
71
71
|
/** Allowed filename for /save and /load (no path separators, no shell/inject chars). */
|
|
72
72
|
export declare const SAVE_FILENAME_RE: RegExp;
|
|
73
|
+
/**
|
|
74
|
+
* #1809: resolve a display label (as shown by `agend ls`) back to a real instance name.
|
|
75
|
+
* Returns the real name on a unique match, `null` when the query does not match any label,
|
|
76
|
+
* or `{ ambiguous: true, realNames }` when two labels are identical under case-folding
|
|
77
|
+
* (e.g. display_names "Prism" and "prism" both fold to "prism").
|
|
78
|
+
* Always case-insensitive. Real names are NOT resolved here — callers must try real names first.
|
|
79
|
+
*/
|
|
80
|
+
export declare function resolveByLabel(query: string, entries: {
|
|
81
|
+
name: string;
|
|
82
|
+
displayName?: string | null;
|
|
83
|
+
}[]): string | null | {
|
|
84
|
+
ambiguous: true;
|
|
85
|
+
realNames: string[];
|
|
86
|
+
};
|
|
87
|
+
/**
|
|
88
|
+
* #1809: full label/name resolution pipeline without process.exit or readline — suitable for
|
|
89
|
+
* unit testing and for callers that want to decide what to do on each outcome.
|
|
90
|
+
*
|
|
91
|
+
* Resolution order:
|
|
92
|
+
* 1. Exact match on real name (case-insensitive) — always wins.
|
|
93
|
+
* 2. Exact match on the display label `agend ls` shows (via `resolveByLabel`).
|
|
94
|
+
* 3. No match → `{ kind: "none" }`.
|
|
95
|
+
*
|
|
96
|
+
* Returns `{ kind: "name", realName }` on success,
|
|
97
|
+
* `{ kind: "ambiguous", realNames }` when two labels are case-identical,
|
|
98
|
+
* or `{ kind: "none" }` when nothing matched.
|
|
99
|
+
*/
|
|
100
|
+
export declare function resolveName(query: string, entries: {
|
|
101
|
+
name: string;
|
|
102
|
+
displayName?: string | null;
|
|
103
|
+
}[]): {
|
|
104
|
+
kind: "name";
|
|
105
|
+
realName: string;
|
|
106
|
+
} | {
|
|
107
|
+
kind: "ambiguous";
|
|
108
|
+
realNames: string[];
|
|
109
|
+
} | {
|
|
110
|
+
kind: "none";
|
|
111
|
+
};
|
|
73
112
|
/** Backends with a native side-question command that does not steer the active turn. */
|
|
74
113
|
export declare const BTW_SUPPORTED_BACKENDS: Set<string>;
|
|
75
114
|
/**
|
|
@@ -86,7 +125,16 @@ export declare function parsePauseWakeCommand(text: string): {
|
|
|
86
125
|
action: "pause" | "wake";
|
|
87
126
|
instance?: string;
|
|
88
127
|
} | null;
|
|
89
|
-
|
|
128
|
+
/**
|
|
129
|
+
* Board 0340ec89: agy's own `/compact` summarizes the conversation (verified live on 1.3.6: "Conversation compacted ·
|
|
130
|
+
* 5 steps summarized", tests/fixtures/agy-1.3.6-compact.pane.txt). agy's release notes add it in 1.3.5, and the 1.3.5
|
|
131
|
+
* binary registers it ("Compact the conversation now (summarize history to free up the context window)"), so 1.3.5 is
|
|
132
|
+
* the floor. AgEnD used to send `/clear` for an agy compact, which wiped the conversation instead. An agy known to be
|
|
133
|
+
* older than that is refused (null), never cleared; an agy whose version is not known yet gets `/compact` (a version
|
|
134
|
+
* without it ignores the line).
|
|
135
|
+
*/
|
|
136
|
+
export declare const AGY_COMPACT_MIN_VERSION = "1.3.5";
|
|
137
|
+
export declare function compactCommandForBackend(backend: string, version?: string | null): string | null;
|
|
90
138
|
/**
|
|
91
139
|
* Backends whose `/compact` verifiably takes custom summarization instructions
|
|
92
140
|
* (#1145). Checked against the real CLIs, not assumed:
|
|
@@ -97,7 +145,7 @@ export declare function compactCommandForBackend(backend: string): string;
|
|
|
97
145
|
* compact into a prompt, so it must never be appended.
|
|
98
146
|
* - grok 1.0.46: the binary answers "/compact takes no arguments."
|
|
99
147
|
* - opencode 1.18: `/compact` calls session.summarize with no text.
|
|
100
|
-
* - kiro-cli: takes none (audit); antigravity
|
|
148
|
+
* - kiro-cli: takes none (audit); antigravity's own /compact (1.3.5+, board 0340ec89) takes none either.
|
|
101
149
|
* - muse 1.4.2: accepts the line (empty session: "nothing to summarize") but
|
|
102
150
|
* no use of the text is verifiable — unsupported until shown otherwise.
|
|
103
151
|
*/
|
|
@@ -179,7 +227,11 @@ export declare class TopicCommands {
|
|
|
179
227
|
* stretch, so the instance cannot be rebound to another bot between the check and the act. The refusal, if any.
|
|
180
228
|
*/
|
|
181
229
|
private tableRefusal;
|
|
230
|
+
/** Where the adapter's fleet-admin list is in fleet.yaml (the fleet's answer; a bare key without it). */
|
|
231
|
+
private adminListKey;
|
|
182
232
|
private sendRefusal;
|
|
233
|
+
/** #1990: a reply in the message's own chat, its place tokens rendered for the world it came from. */
|
|
234
|
+
private placed;
|
|
183
235
|
private getReplyAdapter;
|
|
184
236
|
/**
|
|
185
237
|
* #1346: keep only the owning adapter's copy. When several bots share a
|
|
@@ -194,6 +246,10 @@ export declare class TopicCommands {
|
|
|
194
246
|
private ownedCopy;
|
|
195
247
|
/** Parse and dispatch commands from the General topic */
|
|
196
248
|
handleGeneralCommand(msg: InboundMessage, instanceName?: string): Promise<boolean>;
|
|
249
|
+
/**
|
|
250
|
+
* General's action-first menu. The click owns private issuance; no URL or code exists in this copy.
|
|
251
|
+
*/
|
|
252
|
+
getDashboardMenuText(): string;
|
|
197
253
|
/**
|
|
198
254
|
* Pure, secret-free dashboard/menu copy. Issuance belongs to the private
|
|
199
255
|
* delivery action; rendering or previewing this text cannot retire a code.
|
|
@@ -240,6 +296,15 @@ export declare class TopicCommands {
|
|
|
240
296
|
private autoPauseLineFor;
|
|
241
297
|
/** Send the backend-appropriate compact command to an instance's tmux pane */
|
|
242
298
|
sendCompact(instanceName: string, instructions?: string): Promise<string>;
|
|
299
|
+
/**
|
|
300
|
+
* sendCompact, saying whether the command was handed to the daemon (the web chat follows a sent one to its end,
|
|
301
|
+
* board 003648ac). `notify` runs only when it is about to be handed over; its id rides along so the daemon says when
|
|
302
|
+
* the command reached the pane (`raw_paste_written`). A write the IPC refuses is not sent.
|
|
303
|
+
*/
|
|
304
|
+
compactInstance(instanceName: string, instructions?: string, notify?: () => string | null): {
|
|
305
|
+
sent: boolean;
|
|
306
|
+
text: string;
|
|
307
|
+
};
|
|
243
308
|
/** Whether the instance backend exposes a verified full-reset command. */
|
|
244
309
|
supportsClear(instanceName: string): boolean;
|
|
245
310
|
/**
|
|
@@ -261,6 +326,11 @@ export declare class TopicCommands {
|
|
|
261
326
|
sendBtw(instanceName: string, content: string, msg: Pick<InboundMessage, "chatId" | "messageId" | "username" | "userId" | "threadId" | "adapterId" | "source" | "humanOrigin" | "humanOriginalBody">): string;
|
|
262
327
|
/** Send the backend-appropriate full conversation reset through raw_paste. */
|
|
263
328
|
sendClear(instanceName: string): Promise<string>;
|
|
329
|
+
/** sendClear, saying whether the command was handed to the daemon (board 003648ac: the web chat's card then leaves). */
|
|
330
|
+
clearInstance(instanceName: string): {
|
|
331
|
+
sent: boolean;
|
|
332
|
+
text: string;
|
|
333
|
+
};
|
|
264
334
|
/** Send a backend-appropriate session-save command to a fleet-topic instance. */
|
|
265
335
|
sendSave(instanceName: string, filename: string): Promise<string>;
|
|
266
336
|
private handleRestartCommand;
|