@songsid/agend 2.1.2-beta.42 → 2.1.2-beta.43
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/fleet-manager.js +5 -1
- package/dist/fleet-manager.js.map +1 -1
- package/dist/general-instance.d.ts +9 -0
- package/dist/general-instance.js +11 -0
- package/dist/general-instance.js.map +1 -0
- package/dist/instance-lifecycle.js +6 -0
- package/dist/instance-lifecycle.js.map +1 -1
- package/dist/outbound-handlers.js +5 -0
- package/dist/outbound-handlers.js.map +1 -1
- package/dist/topic-commands.js +8 -0
- package/dist/topic-commands.js.map +1 -1
- package/package.json +1 -1
package/dist/fleet-manager.js
CHANGED
|
@@ -50,6 +50,7 @@ import { validateFleetConfig } from "./config-validator.js";
|
|
|
50
50
|
import { readLastInboundAt } from "./daemon.js";
|
|
51
51
|
import { clearPausedMarker } from "./pause-marker.js";
|
|
52
52
|
import { releaseProcessFleetLock } from "./fleet-lock.js";
|
|
53
|
+
import { GENERAL_PAUSE_ERROR, isGeneralInstance } from "./general-instance.js";
|
|
53
54
|
import { getTmuxSession } from "./config.js";
|
|
54
55
|
export function resolveReplyThreadId(argsThreadId, instanceConfig) {
|
|
55
56
|
if (typeof argsThreadId === "string" && argsThreadId.length > 0) {
|
|
@@ -704,7 +705,7 @@ export class FleetManager {
|
|
|
704
705
|
const victims = selectLruEvictions(warm, cap, {
|
|
705
706
|
exclude,
|
|
706
707
|
isEvicting: name => this.warmCapEvicting.has(name),
|
|
707
|
-
isGeneral: name => this.fleetConfig
|
|
708
|
+
isGeneral: name => isGeneralInstance(this.fleetConfig, name),
|
|
708
709
|
isIdle: name => this.getInstanceExecutionState(name) === "idle",
|
|
709
710
|
lastInboundAt: name => readLastInboundAt(this.getInstanceDir(name)) ?? 0,
|
|
710
711
|
});
|
|
@@ -878,6 +879,9 @@ export class FleetManager {
|
|
|
878
879
|
this.enforceWarmCap(name); // manual wake still respects the fleet warm cap
|
|
879
880
|
return "awake";
|
|
880
881
|
}
|
|
882
|
+
if (isGeneralInstance(this.fleetConfig, name)) {
|
|
883
|
+
throw new Error(GENERAL_PAUSE_ERROR);
|
|
884
|
+
}
|
|
881
885
|
await this.lifecycle.pause(name);
|
|
882
886
|
return this.lifecycle.isPaused(name) ? "paused" : "not_idle";
|
|
883
887
|
}
|