@atlaswork/atlascode 0.1.137 → 0.1.139
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/atlasweb-carrier.json +1 -1
- package/dist/cli.js +78 -55
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -83917,6 +83917,7 @@ function createMcpConnectionManager() {
|
|
|
83917
83917
|
const connections = new Map;
|
|
83918
83918
|
const pending = new Set;
|
|
83919
83919
|
const pendingConnects = new Map;
|
|
83920
|
+
const pendingChildren = new Map;
|
|
83920
83921
|
const connectFailures = new Map;
|
|
83921
83922
|
function fail(name, config, error, authFailure = false) {
|
|
83922
83923
|
const conn = {
|
|
@@ -83949,6 +83950,7 @@ function createMcpConnectionManager() {
|
|
|
83949
83950
|
args: finalArgs,
|
|
83950
83951
|
env
|
|
83951
83952
|
});
|
|
83953
|
+
pendingChildren.set(name, child);
|
|
83952
83954
|
let stderrOutput = "";
|
|
83953
83955
|
const stderrHandler = (data) => {
|
|
83954
83956
|
if (stderrOutput.length < 64 * 1024 * 1024) {
|
|
@@ -84086,6 +84088,7 @@ function createMcpConnectionManager() {
|
|
|
84086
84088
|
return await connectStdio(name, config, opts);
|
|
84087
84089
|
} finally {
|
|
84088
84090
|
pending.delete(name);
|
|
84091
|
+
pendingChildren.delete(name);
|
|
84089
84092
|
}
|
|
84090
84093
|
}
|
|
84091
84094
|
async function closeConnection(name) {
|
|
@@ -84106,6 +84109,10 @@ function createMcpConnectionManager() {
|
|
|
84106
84109
|
for (const name of [...connections.keys()]) {
|
|
84107
84110
|
await manager.close(name);
|
|
84108
84111
|
}
|
|
84112
|
+
for (const [name, child] of [...pendingChildren]) {
|
|
84113
|
+
pendingChildren.delete(name);
|
|
84114
|
+
await terminateChild(name, child);
|
|
84115
|
+
}
|
|
84109
84116
|
},
|
|
84110
84117
|
getPendingServerNames: () => [...pending],
|
|
84111
84118
|
markBlocked
|
|
@@ -94653,6 +94660,22 @@ async function runHeadless(inputPrompt, options) {
|
|
|
94653
94660
|
if (teammateDrainRequested > 0) {
|
|
94654
94661
|
logForDebugging2(`[headless] teammate lifecycle exit guard: forcing process exit after drain (requested=${teammateDrainRequested})`);
|
|
94655
94662
|
}
|
|
94663
|
+
{
|
|
94664
|
+
const mcpExitCount = mcpManager.list().filter((c) => c.type === "connected").length + mcpManager.getPendingServerNames().length;
|
|
94665
|
+
if (mcpExitCount > 0) {
|
|
94666
|
+
const mcpTeardownBudgetMs = Math.max(2000, 750 * mcpExitCount);
|
|
94667
|
+
const mcpTeardownTimer = setTimeout(() => {
|
|
94668
|
+
logForDebugging2(`[headless] MCP teardown failsafe: closeAll exceeded ${mcpTeardownBudgetMs}ms, forcing exit 0`);
|
|
94669
|
+
process.exit(0);
|
|
94670
|
+
}, mcpTeardownBudgetMs);
|
|
94671
|
+
mcpTeardownTimer.unref();
|
|
94672
|
+
try {
|
|
94673
|
+
await mcpManager.closeAll();
|
|
94674
|
+
} finally {
|
|
94675
|
+
clearTimeout(mcpTeardownTimer);
|
|
94676
|
+
}
|
|
94677
|
+
}
|
|
94678
|
+
}
|
|
94656
94679
|
await flushDebugSink();
|
|
94657
94680
|
if (teammateDrainRequested > 0) {
|
|
94658
94681
|
await new Promise((resolve) => setTimeout(resolve, 2000));
|
|
@@ -135357,57 +135380,6 @@ var init_bootstrapState = __esm(() => {
|
|
|
135357
135380
|
};
|
|
135358
135381
|
});
|
|
135359
135382
|
|
|
135360
|
-
// src/tui/bootstrapStatePort.ts
|
|
135361
|
-
function createKernelBootstrapStatePort() {
|
|
135362
|
-
return {
|
|
135363
|
-
addInvokedSkill,
|
|
135364
|
-
clearInvokedSkillsForAgent,
|
|
135365
|
-
getInvokedSkillsForAgent,
|
|
135366
|
-
flushInteractionTime,
|
|
135367
|
-
getLastInteractionTime,
|
|
135368
|
-
updateLastInteractionTime,
|
|
135369
|
-
getActiveTimeCounter,
|
|
135370
|
-
getAgentColorMap,
|
|
135371
|
-
getLocCounter,
|
|
135372
|
-
getInitialMainLoopModel,
|
|
135373
|
-
getMainLoopModelOverride,
|
|
135374
|
-
setMainLoopModelOverride,
|
|
135375
|
-
getIsRemoteMode,
|
|
135376
|
-
setIsRemoteMode,
|
|
135377
|
-
getTurnClassifierCount,
|
|
135378
|
-
getTurnClassifierDurationMs,
|
|
135379
|
-
getTurnHookCount,
|
|
135380
|
-
getTurnHookDurationMs,
|
|
135381
|
-
getTurnToolCount,
|
|
135382
|
-
getTurnToolDurationMs,
|
|
135383
|
-
resetTurnClassifierDuration,
|
|
135384
|
-
resetTurnHookDuration,
|
|
135385
|
-
resetTurnToolDuration,
|
|
135386
|
-
addToTurnHookDuration,
|
|
135387
|
-
addToTurnClassifierDuration,
|
|
135388
|
-
clearSystemPromptSectionState,
|
|
135389
|
-
getSystemPromptSectionCache,
|
|
135390
|
-
setSystemPromptSectionCacheEntry
|
|
135391
|
-
};
|
|
135392
|
-
}
|
|
135393
|
-
function createKernelBootstrapNoopSeam() {
|
|
135394
|
-
return {
|
|
135395
|
-
addSlowOperation: (description, durationMs) => {
|
|
135396
|
-
addSlowOperation(description, durationMs);
|
|
135397
|
-
},
|
|
135398
|
-
waitForScrollIdle: () => waitForScrollIdle(),
|
|
135399
|
-
setLastAPIRequest: (params) => {
|
|
135400
|
-
setLastAPIRequest(params);
|
|
135401
|
-
},
|
|
135402
|
-
setLastAPIRequestMessages: (messages) => {
|
|
135403
|
-
setLastAPIRequestMessages(messages);
|
|
135404
|
-
}
|
|
135405
|
-
};
|
|
135406
|
-
}
|
|
135407
|
-
var init_bootstrapStatePort = __esm(() => {
|
|
135408
|
-
init_bootstrapState();
|
|
135409
|
-
});
|
|
135410
|
-
|
|
135411
135383
|
// node_modules/semver/internal/constants.js
|
|
135412
135384
|
var require_constants = __commonJS(function(exports, module) {
|
|
135413
135385
|
var SEMVER_SPEC_VERSION = "2.0.0";
|
|
@@ -337667,6 +337639,9 @@ async function gracefulShutdown(exitCode = 0, reason = "other", options) {
|
|
|
337667
337639
|
} catch {
|
|
337668
337640
|
clearTimeout(cleanupTimeoutId);
|
|
337669
337641
|
}
|
|
337642
|
+
try {
|
|
337643
|
+
await getMcpConnectionManager().closeAll();
|
|
337644
|
+
} catch {}
|
|
337670
337645
|
try {
|
|
337671
337646
|
await executeSessionEndHooks(reason, {
|
|
337672
337647
|
...options,
|
|
@@ -337699,6 +337674,7 @@ var init_gracefulShutdown = __esm(() => {
|
|
|
337699
337674
|
init_dec();
|
|
337700
337675
|
init_osc();
|
|
337701
337676
|
init_cleanupRegistry3();
|
|
337677
|
+
init_mcp3();
|
|
337702
337678
|
init_debug();
|
|
337703
337679
|
init_diagLogs();
|
|
337704
337680
|
init_envUtils2();
|
|
@@ -442928,8 +442904,6 @@ function createCoreDependencies2(backendConfig) {
|
|
|
442928
442904
|
getOriginalCwd: () => getOriginalCwd(),
|
|
442929
442905
|
setCwdState: (cwd) => setCwdState(cwd)
|
|
442930
442906
|
});
|
|
442931
|
-
setKernelBootstrapState(createKernelBootstrapStatePort());
|
|
442932
|
-
setKernelBootstrapNoopSeam(createKernelBootstrapNoopSeam());
|
|
442933
442907
|
return {
|
|
442934
442908
|
modelProvider,
|
|
442935
442909
|
sandbox,
|
|
@@ -442971,7 +442945,6 @@ var init_factory = __esm(() => {
|
|
|
442971
442945
|
init_bootstrap();
|
|
442972
442946
|
init_bootstrapState();
|
|
442973
442947
|
init_injection();
|
|
442974
|
-
init_bootstrapStatePort();
|
|
442975
442948
|
init_platform3();
|
|
442976
442949
|
init_configDir();
|
|
442977
442950
|
init_filesystem2();
|
|
@@ -503153,7 +503126,57 @@ init_shared();
|
|
|
503153
503126
|
init_memory();
|
|
503154
503127
|
init_injection();
|
|
503155
503128
|
init_executionComposition();
|
|
503156
|
-
|
|
503129
|
+
|
|
503130
|
+
// src/tui/bootstrapStatePort.ts
|
|
503131
|
+
init_bootstrapState();
|
|
503132
|
+
function createKernelBootstrapStatePort() {
|
|
503133
|
+
return {
|
|
503134
|
+
addInvokedSkill,
|
|
503135
|
+
clearInvokedSkillsForAgent,
|
|
503136
|
+
getInvokedSkillsForAgent,
|
|
503137
|
+
flushInteractionTime,
|
|
503138
|
+
getLastInteractionTime,
|
|
503139
|
+
updateLastInteractionTime,
|
|
503140
|
+
getActiveTimeCounter,
|
|
503141
|
+
getAgentColorMap,
|
|
503142
|
+
getLocCounter,
|
|
503143
|
+
getInitialMainLoopModel,
|
|
503144
|
+
getMainLoopModelOverride,
|
|
503145
|
+
setMainLoopModelOverride,
|
|
503146
|
+
getIsRemoteMode,
|
|
503147
|
+
setIsRemoteMode,
|
|
503148
|
+
getTurnClassifierCount,
|
|
503149
|
+
getTurnClassifierDurationMs,
|
|
503150
|
+
getTurnHookCount,
|
|
503151
|
+
getTurnHookDurationMs,
|
|
503152
|
+
getTurnToolCount,
|
|
503153
|
+
getTurnToolDurationMs,
|
|
503154
|
+
resetTurnClassifierDuration,
|
|
503155
|
+
resetTurnHookDuration,
|
|
503156
|
+
resetTurnToolDuration,
|
|
503157
|
+
addToTurnHookDuration,
|
|
503158
|
+
addToTurnClassifierDuration,
|
|
503159
|
+
clearSystemPromptSectionState,
|
|
503160
|
+
getSystemPromptSectionCache,
|
|
503161
|
+
setSystemPromptSectionCacheEntry
|
|
503162
|
+
};
|
|
503163
|
+
}
|
|
503164
|
+
function createKernelBootstrapNoopSeam() {
|
|
503165
|
+
return {
|
|
503166
|
+
addSlowOperation: (description, durationMs) => {
|
|
503167
|
+
addSlowOperation(description, durationMs);
|
|
503168
|
+
},
|
|
503169
|
+
waitForScrollIdle: () => waitForScrollIdle(),
|
|
503170
|
+
setLastAPIRequest: (params) => {
|
|
503171
|
+
setLastAPIRequest(params);
|
|
503172
|
+
},
|
|
503173
|
+
setLastAPIRequestMessages: (messages) => {
|
|
503174
|
+
setLastAPIRequestMessages(messages);
|
|
503175
|
+
}
|
|
503176
|
+
};
|
|
503177
|
+
}
|
|
503178
|
+
|
|
503179
|
+
// src/atlascode/compose.ts
|
|
503157
503180
|
init_executor();
|
|
503158
503181
|
init_permissions3();
|
|
503159
503182
|
init_task2();
|
package/package.json
CHANGED