@elizaos/plugin-agent-orchestrator 0.3.7 → 0.3.8
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/index.js +26 -4
- package/dist/index.js.map +6 -6
- package/dist/services/pty-init.d.ts +3 -1
- package/dist/services/pty-init.d.ts.map +1 -1
- package/dist/services/pty-service.d.ts.map +1 -1
- package/dist/services/pty-spawn.d.ts +2 -0
- package/dist/services/pty-spawn.d.ts.map +1 -1
- package/dist/services/swarm-coordinator.d.ts +2 -0
- package/dist/services/swarm-coordinator.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2234,6 +2234,7 @@ async function initializePTYManager(ctx) {
|
|
|
2234
2234
|
ctx.log(`session_ready event received for ${session.id} (type: ${session.type}, status: ${session.status})`);
|
|
2235
2235
|
ctx.emitEvent(session.id, "ready", { session });
|
|
2236
2236
|
forwardReadyAsTaskComplete(ctx, session);
|
|
2237
|
+
ctx.markTaskDelivered?.(session.id);
|
|
2237
2238
|
});
|
|
2238
2239
|
bunManager.on("session_exit", (id, code) => {
|
|
2239
2240
|
ctx.emitEvent(id, "stopped", { reason: `exit code ${code}` });
|
|
@@ -2313,6 +2314,7 @@ async function initializePTYManager(ctx) {
|
|
|
2313
2314
|
nodeManager.on("session_ready", (session) => {
|
|
2314
2315
|
ctx.emitEvent(session.id, "ready", { session });
|
|
2315
2316
|
forwardReadyAsTaskComplete(ctx, session);
|
|
2317
|
+
ctx.markTaskDelivered?.(session.id);
|
|
2316
2318
|
});
|
|
2317
2319
|
nodeManager.on("blocking_prompt", (session, promptInfo, autoResponded) => {
|
|
2318
2320
|
ctx.emitEvent(session.id, "blocked", { promptInfo, autoResponded });
|
|
@@ -2519,6 +2521,7 @@ function setupDeferredTaskDelivery(ctx, session, task, agentType) {
|
|
|
2519
2521
|
taskSent = true;
|
|
2520
2522
|
if (readyTimeout)
|
|
2521
2523
|
clearTimeout(readyTimeout);
|
|
2524
|
+
ctx.markTaskDelivered?.(sid);
|
|
2522
2525
|
setTimeout(() => sendTaskWithRetry(0), settleMs);
|
|
2523
2526
|
if (ctx.usingBunWorker) {
|
|
2524
2527
|
ctx.manager.removeListener("session_ready", onReady);
|
|
@@ -3214,7 +3217,8 @@ class SwarmCoordinator {
|
|
|
3214
3217
|
autoResolvedCount: 0,
|
|
3215
3218
|
registeredAt: Date.now(),
|
|
3216
3219
|
lastActivityAt: Date.now(),
|
|
3217
|
-
idleCheckCount: 0
|
|
3220
|
+
idleCheckCount: 0,
|
|
3221
|
+
taskDelivered: false
|
|
3218
3222
|
});
|
|
3219
3223
|
this.broadcast({
|
|
3220
3224
|
type: "task_registered",
|
|
@@ -3603,7 +3607,17 @@ class PTYService {
|
|
|
3603
3607
|
if (!coordinator)
|
|
3604
3608
|
return false;
|
|
3605
3609
|
const taskCtx = coordinator.getTaskContext(sessionId);
|
|
3606
|
-
|
|
3610
|
+
if (!taskCtx)
|
|
3611
|
+
return false;
|
|
3612
|
+
return taskCtx.taskDelivered || taskCtx.decisions.length > 0;
|
|
3613
|
+
},
|
|
3614
|
+
markTaskDelivered: (sessionId) => {
|
|
3615
|
+
const coordinator = this.coordinator;
|
|
3616
|
+
if (!coordinator)
|
|
3617
|
+
return;
|
|
3618
|
+
const taskCtx = coordinator.getTaskContext(sessionId);
|
|
3619
|
+
if (taskCtx)
|
|
3620
|
+
taskCtx.taskDelivered = true;
|
|
3607
3621
|
}
|
|
3608
3622
|
});
|
|
3609
3623
|
this.manager = result.manager;
|
|
@@ -3732,7 +3746,15 @@ class PTYService {
|
|
|
3732
3746
|
sendKeysToSession: (id, keys) => this.sendKeysToSession(id, keys),
|
|
3733
3747
|
pushDefaultRules: (id, type) => this.pushDefaultRules(id, type),
|
|
3734
3748
|
toSessionInfo: (s, w) => this.toSessionInfo(s, w),
|
|
3735
|
-
log: (msg) => this.log(msg)
|
|
3749
|
+
log: (msg) => this.log(msg),
|
|
3750
|
+
markTaskDelivered: (sessionId2) => {
|
|
3751
|
+
const coordinator = this.coordinator;
|
|
3752
|
+
if (!coordinator)
|
|
3753
|
+
return;
|
|
3754
|
+
const taskCtx = coordinator.getTaskContext(sessionId2);
|
|
3755
|
+
if (taskCtx)
|
|
3756
|
+
taskCtx.taskDelivered = true;
|
|
3757
|
+
}
|
|
3736
3758
|
};
|
|
3737
3759
|
if (this.usingBunWorker) {
|
|
3738
3760
|
setupOutputBuffer(ctx, session.id);
|
|
@@ -6556,5 +6578,5 @@ export {
|
|
|
6556
6578
|
CodingWorkspaceService
|
|
6557
6579
|
};
|
|
6558
6580
|
|
|
6559
|
-
//# debugId=
|
|
6581
|
+
//# debugId=87DC30F17636D1DA64756E2164756E21
|
|
6560
6582
|
//# sourceMappingURL=index.js.map
|