@songsid/agend 2.2.0-beta.5 → 2.2.0-beta.6
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/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 +16 -0
- package/dist/backend/claude-code.js +92 -2
- package/dist/backend/claude-code.js.map +1 -1
- package/dist/backend/credential-profile.d.ts +7 -0
- package/dist/backend/credential-profile.js +7 -1
- package/dist/backend/credential-profile.js.map +1 -1
- package/dist/backend/kiro.js +5 -2
- package/dist/backend/kiro.js.map +1 -1
- package/dist/backend/muse.d.ts +41 -0
- package/dist/backend/muse.js +239 -44
- package/dist/backend/muse.js.map +1 -1
- package/dist/backend/types.d.ts +7 -0
- package/dist/backend/types.js.map +1 -1
- 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/channel/adapters/telegram.d.ts +4 -5
- package/dist/channel/adapters/telegram.js +33 -17
- package/dist/channel/adapters/telegram.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/cli.js +25 -10
- package/dist/cli.js.map +1 -1
- package/dist/daemon.js +41 -0
- package/dist/daemon.js.map +1 -1
- package/dist/fleet-context.d.ts +4 -1
- package/dist/fleet-manager.d.ts +82 -5
- package/dist/fleet-manager.js +355 -60
- package/dist/fleet-manager.js.map +1 -1
- package/dist/general-knowledge/skills/credential-profiles/SKILL.md +44 -9
- package/dist/locale.js +14 -2
- package/dist/locale.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 +7 -0
- package/dist/outbound-handlers.js +19 -10
- package/dist/outbound-handlers.js.map +1 -1
- package/dist/restart-progress.d.ts +4 -0
- package/dist/restart-progress.js +7 -0
- package/dist/restart-progress.js.map +1 -1
- package/dist/service-installer.d.ts +31 -0
- package/dist/service-installer.js +41 -2
- package/dist/service-installer.js.map +1 -1
- package/dist/topic-commands.js +3 -1
- package/dist/topic-commands.js.map +1 -1
- package/dist/ui/shared/app-stream.js +21 -4
- package/dist/ui/shared/app.css +5 -2
- package/dist/ui/shared/usage-dialog.js +10 -1
- package/dist/update-install.d.ts +6 -2
- package/dist/update-install.js +8 -2
- package/dist/update-install.js.map +1 -1
- package/dist/update-marker.d.ts +11 -0
- package/dist/update-marker.js +12 -0
- package/dist/update-marker.js.map +1 -1
- package/dist/web-api.d.ts +3 -1
- 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/package.json +1 -1
- package/templates/launchd.plist.ejs +3 -1
- package/templates/systemd.service.ejs +2 -1
package/dist/daemon.js
CHANGED
|
@@ -9,6 +9,7 @@ import { rotateLogIfNeededAsync } from "./logger.js";
|
|
|
9
9
|
import { coredumpFilterLaunchPrefix } from "./coredump-filter.js";
|
|
10
10
|
import { mcpServerState } from "./mcp-liveness.js";
|
|
11
11
|
import { clearPausedMarker, writePausedMarker } from "./pause-marker.js";
|
|
12
|
+
import { writeBackgroundWorkEndedMarker } from "./background-work-ended.js";
|
|
12
13
|
import { TmuxManager, resolveTmuxLogicalSize } from "./tmux-manager.js";
|
|
13
14
|
import { TranscriptMonitor } from "./transcript-monitor.js";
|
|
14
15
|
import { createTranscriptSource } from "./transcript-sources.js";
|
|
@@ -4232,6 +4233,13 @@ export class Daemon extends EventEmitter {
|
|
|
4232
4233
|
if (!backend.quitBlockedByDialog(pane))
|
|
4233
4234
|
return false;
|
|
4234
4235
|
this.logger.warn({ reason }, "The CLI asked to confirm its exit (background work is running) — cancelling that prompt and stopping the process, not answering it");
|
|
4236
|
+
// #1716: the background work is about to be ended — record it where the
|
|
4237
|
+
// stop/restart reply and the instance topic notice can report it, so the
|
|
4238
|
+
// kill is never silent.
|
|
4239
|
+
try {
|
|
4240
|
+
writeBackgroundWorkEndedMarker(this.instanceDir, reason);
|
|
4241
|
+
}
|
|
4242
|
+
catch { /* reporting only */ }
|
|
4235
4243
|
await this.tmux.sendSpecialKey("Escape").catch(() => false);
|
|
4236
4244
|
return true;
|
|
4237
4245
|
}
|
|
@@ -4564,6 +4572,39 @@ export class Daemon extends EventEmitter {
|
|
|
4564
4572
|
this.pauseRequested = false;
|
|
4565
4573
|
return;
|
|
4566
4574
|
}
|
|
4575
|
+
// #1717: an idle pause is AgEnD-initiated and silent — it must not kill
|
|
4576
|
+
// the user's running background work the way an explicit stop may. Defer
|
|
4577
|
+
// this cycle while the backend reports background work; the next idle
|
|
4578
|
+
// tick retries once the task ends. A pane-capture failure proceeds (the
|
|
4579
|
+
// quit-menu handler below stays the backstop), never wedges unpaused.
|
|
4580
|
+
if (this.backend?.backgroundWorkRunning && this.tmux) {
|
|
4581
|
+
const tmux = this.tmux;
|
|
4582
|
+
const windowId = tmux.getWindowId?.();
|
|
4583
|
+
const generation = this.spawnGeneration;
|
|
4584
|
+
let pane = null;
|
|
4585
|
+
try {
|
|
4586
|
+
pane = await tmux.capturePane();
|
|
4587
|
+
}
|
|
4588
|
+
catch { /* capture failed — pause as before, after revalidation */ }
|
|
4589
|
+
// #1730 P2-2: the await yields — the pane read is only valid for the
|
|
4590
|
+
// world it was taken from. Revalidate owner, phase, state and queue
|
|
4591
|
+
// before acting on it; anything that moved defers this cycle.
|
|
4592
|
+
if (this.tmux !== tmux
|
|
4593
|
+
|| this.tmux?.getWindowId?.() !== windowId
|
|
4594
|
+
|| this.spawnGeneration !== generation
|
|
4595
|
+
|| this.getPauseWakeState() !== "active"
|
|
4596
|
+
|| !(this.instanceState === "idle" || (allowStuck && this.instanceState === "stuck"))
|
|
4597
|
+
|| this.pasteQueueDepth > 0) {
|
|
4598
|
+
this.logger.info("Deferring auto-pause: pause preconditions changed during the pane read");
|
|
4599
|
+
this.pauseRequested = false;
|
|
4600
|
+
return;
|
|
4601
|
+
}
|
|
4602
|
+
if (pane !== null && this.backend?.backgroundWorkRunning?.(pane)) {
|
|
4603
|
+
this.logger.info("Deferring auto-pause: background work is still running");
|
|
4604
|
+
this.pauseRequested = false;
|
|
4605
|
+
return;
|
|
4606
|
+
}
|
|
4607
|
+
}
|
|
4567
4608
|
this.pauseWakeState = "pausing";
|
|
4568
4609
|
this.healthCheckPaused = true;
|
|
4569
4610
|
this.freezeRuntimeMonitors();
|