@myagentroam/node 0.10.61 → 0.10.63
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/connector.js +106 -873
- package/dist/database.js +4 -2
- package/dist/runner/claude-code-runner.js +15 -1
- package/dist/runner/mar-agent/managed-run-controller.js +126 -521
- package/dist/runner/mar-agent/session-runtime-registry.js +271 -0
- package/dist/runner/mar-agent/session-runtime.js +282 -0
- package/dist/service/conversation-hosting-lifecycle-service.js +195 -0
- package/dist/service/conversation-observation.js +240 -0
- package/dist/service/goal-continuation-coordinator.js +622 -0
- package/dist/service/native-session-watch-service.js +88 -270
- package/dist/service/restart-session-restorer.js +1 -1
- package/dist/service/runner-interaction-service.js +27 -1
- package/dist/service/scheduled-session-coordinator.js +119 -48
- package/dist/service/session-lifecycle-service.js +5 -2
- package/package.json +4 -4
package/dist/database.js
CHANGED
|
@@ -363,13 +363,14 @@ export class NodeDatabase {
|
|
|
363
363
|
if (current === undefined || current['pin_order'] === null)
|
|
364
364
|
throw new Error('SESSION_NOT_PINNED');
|
|
365
365
|
const order = numberValue(current, 'pin_order');
|
|
366
|
+
const workspaceId = stringValue(current, 'workspace_id');
|
|
366
367
|
const adjacent = this.raw
|
|
367
368
|
.prepare(direction === 'up'
|
|
368
369
|
? 'SELECT id, pin_order FROM agent_sessions WHERE workspace_id = ? AND pin_order < ? ORDER BY pin_order DESC LIMIT 1'
|
|
369
370
|
: 'SELECT id, pin_order FROM agent_sessions WHERE workspace_id = ? AND pin_order > ? ORDER BY pin_order ASC LIMIT 1')
|
|
370
|
-
.get(
|
|
371
|
+
.get(workspaceId, order);
|
|
371
372
|
if (adjacent === undefined)
|
|
372
|
-
return;
|
|
373
|
+
return workspaceId;
|
|
373
374
|
this.raw.exec('BEGIN IMMEDIATE');
|
|
374
375
|
try {
|
|
375
376
|
this.raw
|
|
@@ -384,6 +385,7 @@ export class NodeDatabase {
|
|
|
384
385
|
this.raw.exec('ROLLBACK');
|
|
385
386
|
throw error;
|
|
386
387
|
}
|
|
388
|
+
return workspaceId;
|
|
387
389
|
}
|
|
388
390
|
deleteSessionRecord(sessionId) {
|
|
389
391
|
this.raw.exec('BEGIN IMMEDIATE');
|
|
@@ -249,7 +249,21 @@ export class ClaudeCodeRunner extends AbstractRunner {
|
|
|
249
249
|
}
|
|
250
250
|
return deduplicateDirectSessions(sessions);
|
|
251
251
|
}
|
|
252
|
-
stop() {
|
|
252
|
+
stop() {
|
|
253
|
+
for (const approval of this.execution.approvals.values()) {
|
|
254
|
+
clearTimeout(approval.timer);
|
|
255
|
+
approval.resolve('REJECTED');
|
|
256
|
+
}
|
|
257
|
+
this.execution.approvals.clear();
|
|
258
|
+
for (const pending of this.execution.userInputs.values()) {
|
|
259
|
+
clearTimeout(pending.timer);
|
|
260
|
+
pending.reject('NODE_STOPPED');
|
|
261
|
+
}
|
|
262
|
+
this.execution.userInputs.clear();
|
|
263
|
+
for (const run of this.execution.runs.values())
|
|
264
|
+
run.handle.cancel();
|
|
265
|
+
this.execution.runs.clear();
|
|
266
|
+
}
|
|
253
267
|
start(input) {
|
|
254
268
|
return this.client.start(input);
|
|
255
269
|
}
|