@asm-agent/coding-agent 0.8.8 → 0.9.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/CHANGELOG.md +19 -0
- package/README.md +2 -7
- package/dist/asm-agent-runtime/src/__pycache__/asm_cm_driver.cpython-313.pyc +0 -0
- package/dist/asm-agent-runtime/src/__pycache__/phase76_address_head.cpython-313.pyc +0 -0
- package/dist/asm-agent-runtime/src/rlm/__init__.py +1 -1
- package/dist/asm-agent-runtime/src/rlm/__pycache__/__init__.cpython-312.pyc +0 -0
- package/dist/asm-agent-runtime/src/rlm/__pycache__/__init__.cpython-313.pyc +0 -0
- package/dist/asm-agent-runtime/src/rlm/__pycache__/bash.cpython-312.pyc +0 -0
- package/dist/asm-agent-runtime/src/rlm/__pycache__/bash.cpython-313.pyc +0 -0
- package/dist/asm-agent-runtime/src/rlm/__pycache__/mcp.cpython-312.pyc +0 -0
- package/dist/asm-agent-runtime/src/rlm/__pycache__/mcp_base.cpython-312.pyc +0 -0
- package/dist/asm-agent-runtime/src/rlm/__pycache__/repl.cpython-312.pyc +0 -0
- package/dist/asm-agent-runtime/src/rlm/__pycache__/repl.cpython-313.pyc +0 -0
- package/dist/asm-agent-runtime/src/rlm/__pycache__/skill.cpython-313.pyc +0 -0
- package/dist/asm-agent-runtime/src/rlm/bash.py +94 -31
- package/dist/asm-agent-runtime/src/rlm/repl.md +3 -3
- package/dist/asm-agent-runtime/src/rlm/repl.py +46 -45
- package/dist/asm-agent-runtime/test/__pycache__/test_bash.cpython-313.pyc +0 -0
- package/dist/asm-agent-runtime/test/__pycache__/test_repl.cpython-313.pyc +0 -0
- package/dist/asm-agent-runtime/test/test_bash.py +74 -19
- package/dist/asm-agent-runtime/test/test_repl.py +67 -3
- package/dist/asm-agent-runtime/uv.lock +446 -155
- package/dist/bundle/{anthropic-OFECORE7.js → anthropic-2VRH36LG.js} +2 -2
- package/dist/bundle/{azure-openai-responses-AOVTLR6N.js → azure-openai-responses-COYWHJPT.js} +2 -2
- package/dist/bundle/{bundled-modules-JQCJDEIY.js → bundled-modules-YKMFOFDW.js} +3 -3
- package/dist/bundle/{chunk-JC2TT4MZ.js → chunk-JBR32RCG.js} +4943 -1917
- package/dist/bundle/{chunk-M67RGWDQ.js → chunk-US4QGESM.js} +43 -44
- package/dist/bundle/{chunk-A65OM3TZ.js → chunk-V3BASDCN.js} +1 -1
- package/dist/bundle/{chunk-7TB7CGPV.js → chunk-YL37EJB6.js} +978 -1821
- package/dist/bundle/{cli-main-FNHDQGQD.js → cli-main-D7CFAHKG.js} +3 -3
- package/dist/bundle/cli.js +1 -1
- package/dist/bundle/{google-RVJL6RIQ.js → google-CSTXROSV.js} +1 -1
- package/dist/bundle/{google-vertex-EZTRRRH6.js → google-vertex-MEAR43KB.js} +1 -1
- package/dist/bundle/{main-IYXIIAJN.js → main-NKNJEUDP.js} +3 -3
- package/dist/bundle/{mistral-FSGKSMA7.js → mistral-VAF7JADB.js} +1 -1
- package/dist/bundle/{openai-codex-responses-VM5Y564D.js → openai-codex-responses-RWZ6P4I3.js} +2 -2
- package/dist/bundle/{openai-completions-X46FOQDN.js → openai-completions-CFB3BOTU.js} +3 -3
- package/dist/bundle/{openai-responses-SOQNEPBE.js → openai-responses-4OPGGCBI.js} +2 -2
- package/dist/config.d.ts +0 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +0 -3
- package/dist/config.js.map +1 -1
- package/dist/core/agent-session-config.d.ts +1 -2
- package/dist/core/agent-session-config.d.ts.map +1 -1
- package/dist/core/agent-session-config.js +0 -3
- package/dist/core/agent-session-config.js.map +1 -1
- package/dist/core/agent-session-runtime.d.ts.map +1 -1
- package/dist/core/agent-session-runtime.js +0 -8
- package/dist/core/agent-session-runtime.js.map +1 -1
- package/dist/core/agent-session-services.d.ts +0 -2
- package/dist/core/agent-session-services.d.ts.map +1 -1
- package/dist/core/agent-session-services.js +0 -22
- package/dist/core/agent-session-services.js.map +1 -1
- package/dist/core/agent-session.d.ts +8 -1
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +100 -22
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/kernel/bootstrap.d.ts.map +1 -1
- package/dist/core/kernel/bootstrap.js +1 -1
- package/dist/core/kernel/bootstrap.js.map +1 -1
- package/dist/core/kernel/repl-manager.d.ts +32 -8
- package/dist/core/kernel/repl-manager.d.ts.map +1 -1
- package/dist/core/kernel/repl-manager.js +401 -102
- package/dist/core/kernel/repl-manager.js.map +1 -1
- package/dist/core/kernel/shared.d.ts +11 -7
- package/dist/core/kernel/shared.d.ts.map +1 -1
- package/dist/core/kernel/shared.js +2 -5
- package/dist/core/kernel/shared.js.map +1 -1
- package/dist/core/mcp/mcp-manager.d.ts +4 -2
- package/dist/core/mcp/mcp-manager.d.ts.map +1 -1
- package/dist/core/mcp/mcp-manager.js +9 -7
- package/dist/core/mcp/mcp-manager.js.map +1 -1
- package/dist/core/model-registry.d.ts.map +1 -1
- package/dist/core/model-registry.js +1 -1
- package/dist/core/model-registry.js.map +1 -1
- package/dist/core/prime-inference-auth.d.ts +0 -9
- package/dist/core/prime-inference-auth.d.ts.map +1 -1
- package/dist/core/prime-inference-auth.js +0 -50
- package/dist/core/prime-inference-auth.js.map +1 -1
- package/dist/core/provider-display-names.d.ts.map +1 -1
- package/dist/core/provider-display-names.js +0 -1
- package/dist/core/provider-display-names.js.map +1 -1
- package/dist/core/session-manager.d.ts +0 -4
- package/dist/core/session-manager.d.ts.map +1 -1
- package/dist/core/session-manager.js +0 -22
- package/dist/core/session-manager.js.map +1 -1
- package/dist/core/settings-manager.d.ts +4 -16
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +13 -43
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/slash-commands.d.ts.map +1 -1
- package/dist/core/slash-commands.js +0 -5
- package/dist/core/slash-commands.js.map +1 -1
- package/dist/core/tools/acp-mcp.d.ts +6 -0
- package/dist/core/tools/acp-mcp.d.ts.map +1 -0
- package/dist/core/tools/acp-mcp.js +86 -0
- package/dist/core/tools/acp-mcp.js.map +1 -0
- package/dist/core/tools/index.d.ts +1 -0
- package/dist/core/tools/index.d.ts.map +1 -1
- package/dist/core/tools/index.js +1 -0
- package/dist/core/tools/index.js.map +1 -1
- package/dist/core/tools/ipython.d.ts.map +1 -1
- package/dist/core/tools/ipython.js +9 -4
- package/dist/core/tools/ipython.js.map +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +2 -11
- package/dist/main.js.map +1 -1
- package/dist/modes/acp/acp-mode.d.ts.map +1 -1
- package/dist/modes/acp/acp-mode.js +1 -1
- package/dist/modes/acp/acp-mode.js.map +1 -1
- package/dist/modes/agent-connection/daemon-agent-connection.d.ts +0 -2
- package/dist/modes/agent-connection/daemon-agent-connection.d.ts.map +1 -1
- package/dist/modes/agent-connection/daemon-agent-connection.js +0 -2
- package/dist/modes/agent-connection/daemon-agent-connection.js.map +1 -1
- package/dist/modes/agents-view/agents-view-mode.d.ts.map +1 -1
- package/dist/modes/agents-view/agents-view-mode.js +0 -19
- package/dist/modes/agents-view/agents-view-mode.js.map +1 -1
- package/dist/modes/daemon/daemon-mode.d.ts +1 -10
- package/dist/modes/daemon/daemon-mode.d.ts.map +1 -1
- package/dist/modes/daemon/daemon-mode.js +134 -274
- package/dist/modes/daemon/daemon-mode.js.map +1 -1
- package/dist/modes/daemon/daemon-protocol.d.ts +11 -5
- package/dist/modes/daemon/daemon-protocol.d.ts.map +1 -1
- package/dist/modes/daemon/daemon-protocol.js +6 -8
- package/dist/modes/daemon/daemon-protocol.js.map +1 -1
- package/dist/modes/daemon/daemon-supervisor.d.ts +0 -3
- package/dist/modes/daemon/daemon-supervisor.d.ts.map +1 -1
- package/dist/modes/daemon/daemon-supervisor.js +18 -52
- package/dist/modes/daemon/daemon-supervisor.js.map +1 -1
- package/dist/modes/daemon/daemon-worker-protocol.d.ts +1 -6
- package/dist/modes/daemon/daemon-worker-protocol.d.ts.map +1 -1
- package/dist/modes/daemon/daemon-worker-protocol.js +0 -2
- package/dist/modes/daemon/daemon-worker-protocol.js.map +1 -1
- package/dist/modes/interactive/auth-flows.d.ts +0 -2
- package/dist/modes/interactive/auth-flows.d.ts.map +1 -1
- package/dist/modes/interactive/auth-flows.js +1 -101
- package/dist/modes/interactive/auth-flows.js.map +1 -1
- package/dist/modes/interactive/components/assistant-message.d.ts +6 -1
- package/dist/modes/interactive/components/assistant-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/assistant-message.js +13 -3
- package/dist/modes/interactive/components/assistant-message.js.map +1 -1
- package/dist/modes/interactive/components/footer.d.ts +1 -1
- package/dist/modes/interactive/components/footer.d.ts.map +1 -1
- package/dist/modes/interactive/components/footer.js +2 -2
- package/dist/modes/interactive/components/footer.js.map +1 -1
- package/dist/modes/interactive/components/mermaid.d.ts +12 -0
- package/dist/modes/interactive/components/mermaid.d.ts.map +1 -0
- package/dist/modes/interactive/components/mermaid.js +63 -0
- package/dist/modes/interactive/components/mermaid.js.map +1 -0
- package/dist/modes/interactive/components/settings-selector.d.ts +3 -1
- package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector.js +10 -0
- package/dist/modes/interactive/components/settings-selector.js.map +1 -1
- package/dist/modes/interactive/feature-hints.d.ts.map +1 -1
- package/dist/modes/interactive/feature-hints.js +0 -4
- package/dist/modes/interactive/feature-hints.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +1 -7
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +23 -279
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/utils/version-check.d.ts.map +1 -1
- package/dist/utils/version-check.js +1 -1
- package/dist/utils/version-check.js.map +1 -1
- package/docs/settings.md +1 -31
- package/docs/usage.md +1 -4
- package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
- package/examples/extensions/custom-provider-anthropic/package.json +1 -1
- package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
- package/examples/extensions/sandbox/package-lock.json +2 -2
- package/examples/extensions/sandbox/package.json +1 -1
- package/examples/extensions/with-deps/package-lock.json +2 -2
- package/examples/extensions/with-deps/package.json +1 -1
- package/examples/gpt-6-astra.models.json +24 -0
- package/package.json +6 -5
- package/dist/core/agent-traces.d.ts +0 -130
- package/dist/core/agent-traces.d.ts.map +0 -1
- package/dist/core/agent-traces.js +0 -746
- package/dist/core/agent-traces.js.map +0 -1
- package/dist/core/telemetry.d.ts +0 -92
- package/dist/core/telemetry.d.ts.map +0 -1
- package/dist/core/telemetry.js +0 -633
- package/dist/core/telemetry.js.map +0 -1
|
@@ -66,6 +66,7 @@ const WORKER_STARTUP_GATE_FD = 3;
|
|
|
66
66
|
const DAEMON_COMMAND_TYPES = new Set([
|
|
67
67
|
"ack_result",
|
|
68
68
|
"list",
|
|
69
|
+
"list_agent_peers",
|
|
69
70
|
"list_saved_sessions",
|
|
70
71
|
"create",
|
|
71
72
|
"attach",
|
|
@@ -415,7 +416,6 @@ export class DaemonSupervisor {
|
|
|
415
416
|
commandJournal;
|
|
416
417
|
streamReconstructor = new CompactAssistantStreamReconstructor();
|
|
417
418
|
compactCatchupInProgress = new Set();
|
|
418
|
-
agentPeerSyncQueue = Promise.resolve();
|
|
419
419
|
pendingSessionNames = new Set();
|
|
420
420
|
catalog;
|
|
421
421
|
settingsManager;
|
|
@@ -501,7 +501,6 @@ export class DaemonSupervisor {
|
|
|
501
501
|
if (adoptionFailed) {
|
|
502
502
|
throw adoptionFailure;
|
|
503
503
|
}
|
|
504
|
-
await this.syncAgentPeers().catch((error) => this.log(`Could not synchronize agent peers: ${String(error)}`));
|
|
505
504
|
for (const worker of this.workers.values()) {
|
|
506
505
|
this.scheduleOwnedWorkerCleanup(worker);
|
|
507
506
|
}
|
|
@@ -1203,6 +1202,21 @@ export class DaemonSupervisor {
|
|
|
1203
1202
|
return undefined;
|
|
1204
1203
|
case "list":
|
|
1205
1204
|
return this.handleList(client, command);
|
|
1205
|
+
case "list_agent_peers": {
|
|
1206
|
+
const requester = [...this.workers.values()].find((worker) => worker.descriptor.authenticationToken === command.workerToken);
|
|
1207
|
+
if (!requester)
|
|
1208
|
+
throw new Error("Worker authentication failed");
|
|
1209
|
+
const peers = [...this.workers.values()]
|
|
1210
|
+
.filter((worker) => worker !== requester &&
|
|
1211
|
+
this.isLiveWorker(worker) &&
|
|
1212
|
+
worker.descriptor.lifecycle === "ready" &&
|
|
1213
|
+
worker.client !== undefined)
|
|
1214
|
+
.flatMap((worker) => {
|
|
1215
|
+
const root = worker.summaries.get(worker.descriptor.rootActiveSessionId);
|
|
1216
|
+
return root ? [this.agentPeerSummary(root)] : [];
|
|
1217
|
+
});
|
|
1218
|
+
return success(command.id, command.type, { peers });
|
|
1219
|
+
}
|
|
1206
1220
|
case "list_saved_sessions":
|
|
1207
1221
|
return this.handleSavedSessionList(client, command);
|
|
1208
1222
|
case "create": {
|
|
@@ -1216,7 +1230,6 @@ export class DaemonSupervisor {
|
|
|
1216
1230
|
const response = await this.forwardToWorker(worker, withoutSupervisorCreateFields(command));
|
|
1217
1231
|
if (response.success && isSessionSummary(response.data)) {
|
|
1218
1232
|
await this.refreshWorkerSummaries(worker);
|
|
1219
|
-
await this.syncAgentPeers().catch(() => undefined);
|
|
1220
1233
|
return { ...response, id: command.id, data: this.publicSummary(worker, response.data) };
|
|
1221
1234
|
}
|
|
1222
1235
|
return responseWithId(response, command.id);
|
|
@@ -1771,7 +1784,6 @@ export class DaemonSupervisor {
|
|
|
1771
1784
|
await Promise.all([...this.workers.values()]
|
|
1772
1785
|
.filter((worker) => !this.isWorkerStopping(worker))
|
|
1773
1786
|
.map((worker) => this.refreshWorkerSummaries(worker).catch(() => undefined)));
|
|
1774
|
-
await this.syncAgentPeers().catch((error) => this.log(`Could not synchronize agent peers: ${String(error)}`));
|
|
1775
1787
|
const clientOwnedWorkers = [...this.workers.values()].filter((worker) => !this.isVisibleWorker(worker));
|
|
1776
1788
|
// Stopping workers stay listed (with an honest workerState) because this
|
|
1777
1789
|
// list also feeds busy-daemon safety checks in daemon-launch.
|
|
@@ -1931,7 +1943,6 @@ export class DaemonSupervisor {
|
|
|
1931
1943
|
this.invalidateWorkerSessionInputPauses(worker, "Session worker stopped while input was paused");
|
|
1932
1944
|
this.workers.delete(worker.descriptor.workerId);
|
|
1933
1945
|
this.deleteWorkerDescriptor(worker);
|
|
1934
|
-
await this.syncAgentPeers().catch(() => undefined);
|
|
1935
1946
|
return true;
|
|
1936
1947
|
}
|
|
1937
1948
|
// Fail fast before waiting on anything: only a confirmed-dead process is
|
|
@@ -1981,7 +1992,6 @@ export class DaemonSupervisor {
|
|
|
1981
1992
|
}
|
|
1982
1993
|
worker.launchEnv = undefined;
|
|
1983
1994
|
worker.transientCreateCommand = undefined;
|
|
1984
|
-
await this.syncAgentPeers().catch((error) => this.log(`Could not synchronize agent peers: ${String(error)}`));
|
|
1985
1995
|
}
|
|
1986
1996
|
async launchWorker(command, existing, ownerClientId) {
|
|
1987
1997
|
await this.assertRecoveryAllowed();
|
|
@@ -2065,7 +2075,6 @@ export class DaemonSupervisor {
|
|
|
2065
2075
|
rootActiveSessionId,
|
|
2066
2076
|
ownerClientId: existing?.descriptor.ownerClientId ?? ownerClientId,
|
|
2067
2077
|
sessionDir: createCommand.config?.sessionDir,
|
|
2068
|
-
telemetryDisabled: createCommand.config?.telemetryDisabled,
|
|
2069
2078
|
createdAt: existing?.descriptor.createdAt ?? now,
|
|
2070
2079
|
updatedAt: now,
|
|
2071
2080
|
lifecycle: "starting",
|
|
@@ -2157,7 +2166,6 @@ export class DaemonSupervisor {
|
|
|
2157
2166
|
worker.launchEnv = undefined;
|
|
2158
2167
|
worker.transientCreateCommand = undefined;
|
|
2159
2168
|
}
|
|
2160
|
-
await this.syncAgentPeers().catch((error) => this.log(`Could not synchronize agent peers: ${String(error)}`));
|
|
2161
2169
|
this.broadcastHeartbeatsChanged();
|
|
2162
2170
|
return worker;
|
|
2163
2171
|
}
|
|
@@ -2369,7 +2377,6 @@ export class DaemonSupervisor {
|
|
|
2369
2377
|
worker.descriptor.lifecycle = "recovering";
|
|
2370
2378
|
worker.descriptor.lastError = error.message;
|
|
2371
2379
|
this.persistWorker(worker);
|
|
2372
|
-
void this.syncAgentPeers().catch(() => undefined);
|
|
2373
2380
|
void this.recoverWorker(worker);
|
|
2374
2381
|
}
|
|
2375
2382
|
isWorkerRecoveryEligible(worker) {
|
|
@@ -2417,7 +2424,6 @@ export class DaemonSupervisor {
|
|
|
2417
2424
|
worker.descriptor.lifecycle = "recovering";
|
|
2418
2425
|
worker.descriptor.lastError = disconnectError.message;
|
|
2419
2426
|
this.persistWorker(worker);
|
|
2420
|
-
void this.syncAgentPeers().catch(() => undefined);
|
|
2421
2427
|
void this.recoverWorker(worker);
|
|
2422
2428
|
return;
|
|
2423
2429
|
}
|
|
@@ -2608,7 +2614,6 @@ export class DaemonSupervisor {
|
|
|
2608
2614
|
worker.descriptor.lifecycle = "ready";
|
|
2609
2615
|
worker.descriptor.consecutiveFailures = 0;
|
|
2610
2616
|
this.persistWorker(worker);
|
|
2611
|
-
await this.syncAgentPeers().catch((error) => this.log(`Could not synchronize agent peers after worker recovery: ${String(error)}`));
|
|
2612
2617
|
this.broadcastHeartbeatsChanged();
|
|
2613
2618
|
return;
|
|
2614
2619
|
}
|
|
@@ -2634,7 +2639,6 @@ export class DaemonSupervisor {
|
|
|
2634
2639
|
worker.descriptor.lifecycle = "failed";
|
|
2635
2640
|
worker.descriptor.lastError = "Waiting for a client with fresh runtime context";
|
|
2636
2641
|
this.persistWorker(worker);
|
|
2637
|
-
await this.syncAgentPeers().catch(() => undefined);
|
|
2638
2642
|
return;
|
|
2639
2643
|
}
|
|
2640
2644
|
const safeToKillWorkerProcess = processAlive && processIdentityMatches && worker.descriptor.processStartId !== undefined;
|
|
@@ -2671,7 +2675,6 @@ export class DaemonSupervisor {
|
|
|
2671
2675
|
}
|
|
2672
2676
|
worker.descriptor.lifecycle = "failed";
|
|
2673
2677
|
this.persistWorker(worker);
|
|
2674
|
-
await this.syncAgentPeers().catch(() => undefined);
|
|
2675
2678
|
this.log(`Worker ${worker.descriptor.workerId} failed after three recovery attempts`);
|
|
2676
2679
|
})().finally(() => {
|
|
2677
2680
|
worker.recovery = undefined;
|
|
@@ -2893,29 +2896,6 @@ export class DaemonSupervisor {
|
|
|
2893
2896
|
ignoreSessionId: target.id,
|
|
2894
2897
|
});
|
|
2895
2898
|
}
|
|
2896
|
-
syncAgentPeers() {
|
|
2897
|
-
const sync = this.agentPeerSyncQueue
|
|
2898
|
-
.catch(() => undefined)
|
|
2899
|
-
.then(async () => {
|
|
2900
|
-
const readyWorkers = [...this.workers.values()].filter((worker) => this.isLiveWorker(worker) && worker.descriptor.lifecycle === "ready" && worker.client !== undefined);
|
|
2901
|
-
await Promise.all(readyWorkers.map(async (worker) => {
|
|
2902
|
-
const peers = [
|
|
2903
|
-
...readyWorkers
|
|
2904
|
-
.filter((candidate) => candidate !== worker)
|
|
2905
|
-
.flatMap((candidate) => {
|
|
2906
|
-
const root = candidate.summaries.get(candidate.descriptor.rootActiveSessionId);
|
|
2907
|
-
return root ? [this.agentPeerSummary(root)] : [];
|
|
2908
|
-
}),
|
|
2909
|
-
];
|
|
2910
|
-
const response = await worker.client.requestWorker({ type: "worker_sync_agent_peers", peers }, 5000);
|
|
2911
|
-
if (!response.success) {
|
|
2912
|
-
throw new Error(response.error);
|
|
2913
|
-
}
|
|
2914
|
-
}));
|
|
2915
|
-
});
|
|
2916
|
-
this.agentPeerSyncQueue = sync;
|
|
2917
|
-
return sync;
|
|
2918
|
-
}
|
|
2919
2899
|
isVisibleWorker(worker) {
|
|
2920
2900
|
return worker.descriptor.ownerClientId === undefined;
|
|
2921
2901
|
}
|
|
@@ -3102,7 +3082,6 @@ export class DaemonSupervisor {
|
|
|
3102
3082
|
if (ownedWorker.descriptor.ownerClientId !== this.protocolClientId(client)) {
|
|
3103
3083
|
throw new Error(`Unknown active session: ${command.activeSessionId}`);
|
|
3104
3084
|
}
|
|
3105
|
-
this.assertTelemetryAttachAllowed(ownedWorker, command.telemetryDisabled);
|
|
3106
3085
|
ownedWorker.launchEnv = command.launchEnv ?? ownedWorker.launchEnv;
|
|
3107
3086
|
if (!ownedWorker.client || ownedWorker.descriptor.lifecycle !== "ready") {
|
|
3108
3087
|
if (command.recoveryConfig) {
|
|
@@ -3110,7 +3089,6 @@ export class DaemonSupervisor {
|
|
|
3110
3089
|
...ownedWorker.descriptor.createCommand,
|
|
3111
3090
|
config: {
|
|
3112
3091
|
...command.recoveryConfig,
|
|
3113
|
-
...(ownedWorker.descriptor.telemetryDisabled === true ? { telemetryDisabled: true } : {}),
|
|
3114
3092
|
},
|
|
3115
3093
|
env: command.env,
|
|
3116
3094
|
launchEnv: command.launchEnv,
|
|
@@ -3130,7 +3108,6 @@ export class DaemonSupervisor {
|
|
|
3130
3108
|
}
|
|
3131
3109
|
}
|
|
3132
3110
|
const match = await this.findWorkerForClient(client, command.activeSessionId);
|
|
3133
|
-
this.assertTelemetryAttachAllowed(match.worker, command.telemetryDisabled);
|
|
3134
3111
|
this.requireAvailableWorkerClient(match.worker);
|
|
3135
3112
|
const activeSessionId = match.summary.activeSessionId ?? match.summary.id;
|
|
3136
3113
|
const duplicateValidation = this.currentSnapshotGeneration(match.worker, activeSessionId)?.validation;
|
|
@@ -3277,11 +3254,6 @@ export class DaemonSupervisor {
|
|
|
3277
3254
|
throw error;
|
|
3278
3255
|
}
|
|
3279
3256
|
}
|
|
3280
|
-
assertTelemetryAttachAllowed(worker, telemetryDisabled) {
|
|
3281
|
-
if (telemetryDisabled && worker.descriptor.telemetryDisabled !== true) {
|
|
3282
|
-
throw new Error("Cannot attach to this active agent while telemetry is disabled for the current invocation. Stop the agent and retry so it can restart without telemetry.");
|
|
3283
|
-
}
|
|
3284
|
-
}
|
|
3285
3257
|
cacheLoadedSnapshot(worker, activeSessionId, loaded, observedSnapshotId) {
|
|
3286
3258
|
const currentTranscript = worker.transcriptCaches.get(activeSessionId);
|
|
3287
3259
|
const currentGeneration = this.currentSnapshotGeneration(worker, activeSessionId);
|
|
@@ -3861,16 +3833,12 @@ export class DaemonSupervisor {
|
|
|
3861
3833
|
this.writeSerialized(client, publicPayload);
|
|
3862
3834
|
}
|
|
3863
3835
|
if (outboundType === "session_replaced" || outboundType === "session_closed") {
|
|
3864
|
-
void this.refreshWorkerSummaries(worker)
|
|
3865
|
-
.then(() => this.syncAgentPeers())
|
|
3866
|
-
.catch(() => undefined);
|
|
3836
|
+
void this.refreshWorkerSummaries(worker).catch(() => undefined);
|
|
3867
3837
|
}
|
|
3868
3838
|
else if (sessionEventType === "turn_start" ||
|
|
3869
3839
|
sessionEventType === "turn_end" ||
|
|
3870
3840
|
sessionEventType === "rlm_child_update") {
|
|
3871
|
-
void this.refreshWorkerSummaries(worker)
|
|
3872
|
-
.then(() => this.syncAgentPeers())
|
|
3873
|
-
.catch(() => undefined);
|
|
3841
|
+
void this.refreshWorkerSummaries(worker).catch(() => undefined);
|
|
3874
3842
|
}
|
|
3875
3843
|
if (decodedOutbound?.type === "session_closed" &&
|
|
3876
3844
|
decodedOutbound.reason === "shutdown" &&
|
|
@@ -3884,7 +3852,6 @@ export class DaemonSupervisor {
|
|
|
3884
3852
|
this.invalidateWorkerSessionInputPauses(worker, "Session worker stopped while input was paused");
|
|
3885
3853
|
this.workers.delete(worker.descriptor.workerId);
|
|
3886
3854
|
this.deleteWorkerDescriptor(worker);
|
|
3887
|
-
void this.syncAgentPeers().catch(() => undefined);
|
|
3888
3855
|
}
|
|
3889
3856
|
}
|
|
3890
3857
|
}
|
|
@@ -4380,7 +4347,6 @@ export class DaemonSupervisor {
|
|
|
4380
4347
|
this.deleteWorkerDescriptor(worker);
|
|
4381
4348
|
}
|
|
4382
4349
|
if (!this.shuttingDown) {
|
|
4383
|
-
void this.syncAgentPeers().catch(() => undefined);
|
|
4384
4350
|
this.broadcastHeartbeatsChanged();
|
|
4385
4351
|
}
|
|
4386
4352
|
}
|