@alan-ai-hq/agent-manager 0.1.108 → 0.1.109
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.cjs +19 -19
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -14913,9 +14913,9 @@ var NEGATIVE_RESOLUTION_TTL_MS = 15e3;
|
|
|
14913
14913
|
var negativeResolutionExpiry = /* @__PURE__ */ new Map();
|
|
14914
14914
|
var cachedLoginShellEnv = null;
|
|
14915
14915
|
var MAX_CLI_PROBE_OUTPUT_CHARS = 256 * 1024;
|
|
14916
|
-
function appendCliProbeOutput(current, chunk) {
|
|
14917
|
-
if (current.length >=
|
|
14918
|
-
return current + chunk.slice(0,
|
|
14916
|
+
function appendCliProbeOutput(current, chunk, limit) {
|
|
14917
|
+
if (current.length >= limit) return current;
|
|
14918
|
+
return current + chunk.slice(0, limit - current.length);
|
|
14919
14919
|
}
|
|
14920
14920
|
function parseEnvOutput(output2) {
|
|
14921
14921
|
const loginEnv = {};
|
|
@@ -15010,6 +15010,7 @@ function runCliProbeAsync(executable, env, args = ["--version"], timeoutMs = 3e3
|
|
|
15010
15010
|
}
|
|
15011
15011
|
const useShell = isWin && command === executable && !/[\\/]/.test(executable);
|
|
15012
15012
|
const closeStdin = spawnOptions?.closeStdin === true;
|
|
15013
|
+
const maxOutputChars = spawnOptions?.maxOutputChars ?? MAX_CLI_PROBE_OUTPUT_CHARS;
|
|
15013
15014
|
let child;
|
|
15014
15015
|
try {
|
|
15015
15016
|
child = (0, import_node_child_process.spawn)(command, commandArgs, {
|
|
@@ -15029,10 +15030,10 @@ function runCliProbeAsync(executable, env, args = ["--version"], timeoutMs = 3e3
|
|
|
15029
15030
|
let stdout = "";
|
|
15030
15031
|
let stderr = "";
|
|
15031
15032
|
child.stdout?.setEncoding("utf8").on("data", (chunk) => {
|
|
15032
|
-
stdout = appendCliProbeOutput(stdout, chunk);
|
|
15033
|
+
stdout = appendCliProbeOutput(stdout, chunk, maxOutputChars);
|
|
15033
15034
|
});
|
|
15034
15035
|
child.stderr?.setEncoding("utf8").on("data", (chunk) => {
|
|
15035
|
-
stderr = appendCliProbeOutput(stderr, chunk);
|
|
15036
|
+
stderr = appendCliProbeOutput(stderr, chunk, MAX_CLI_PROBE_OUTPUT_CHARS);
|
|
15036
15037
|
});
|
|
15037
15038
|
child.once("error", (error61) => resolve16({ status: null, stdout, stderr, error: error61 }));
|
|
15038
15039
|
child.once(
|
|
@@ -15536,7 +15537,7 @@ function describeError(error61) {
|
|
|
15536
15537
|
}
|
|
15537
15538
|
|
|
15538
15539
|
// src/version.ts
|
|
15539
|
-
var AGENT_VERSION = "0.1.
|
|
15540
|
+
var AGENT_VERSION = "0.1.109";
|
|
15540
15541
|
|
|
15541
15542
|
// src/daemon-workspace.ts
|
|
15542
15543
|
var import_node_child_process3 = require("child_process");
|
|
@@ -35442,16 +35443,6 @@ var WORKFLOW_ALWAYS_ALLOWED_BUILTIN_TOOLS = [
|
|
|
35442
35443
|
"list_prototypes",
|
|
35443
35444
|
"get_prototype"
|
|
35444
35445
|
];
|
|
35445
|
-
var LEGACY_WORKFLOW_BUILTIN_TOOLS = {
|
|
35446
|
-
list_document_comments: "get_document",
|
|
35447
|
-
list_artifact_comments: "get_artifact",
|
|
35448
|
-
list_epic_comments: "get_epic",
|
|
35449
|
-
// Renamed when the thread reply became platform-neutral (Slack + Microsoft Teams).
|
|
35450
|
-
slack_reply_in_thread: "reply_in_thread"
|
|
35451
|
-
};
|
|
35452
|
-
function normalizeWorkflowToolId(id) {
|
|
35453
|
-
return LEGACY_WORKFLOW_BUILTIN_TOOLS[id] ?? id;
|
|
35454
|
-
}
|
|
35455
35446
|
function createWorkflowToolsFilter(workflowTools) {
|
|
35456
35447
|
const hasFilter = !!workflowTools && workflowTools.length > 0;
|
|
35457
35448
|
if (!hasFilter) {
|
|
@@ -35463,7 +35454,7 @@ function createWorkflowToolsFilter(workflowTools) {
|
|
|
35463
35454
|
}
|
|
35464
35455
|
const tools = workflowTools;
|
|
35465
35456
|
const mcpServerIds = new Set(tools.filter((t) => t.type === "mcp").map((t) => t.id));
|
|
35466
|
-
const builtinToolIds = tools.filter((t) => t.type === "builtin" || t.type === "integration").map((t) =>
|
|
35457
|
+
const builtinToolIds = tools.filter((t) => t.type === "builtin" || t.type === "integration").map((t) => t.id);
|
|
35467
35458
|
return {
|
|
35468
35459
|
hasFilter: true,
|
|
35469
35460
|
isMcpServerAllowed: (serverName) => mcpServerIds.has(serverName),
|
|
@@ -35957,6 +35948,7 @@ var APPLICATION_PROBLEM_CODES = [
|
|
|
35957
35948
|
"app.mcp.protocol_invalid",
|
|
35958
35949
|
"app.mcp.tools_missing",
|
|
35959
35950
|
"app.mcp.provider_not_loaded",
|
|
35951
|
+
"app.runtime.outdated",
|
|
35960
35952
|
"app.internal"
|
|
35961
35953
|
];
|
|
35962
35954
|
var alanProblemScopeSchema = external_exports.object({
|
|
@@ -35993,6 +35985,7 @@ var APPLICATION_PROBLEM_TITLES = {
|
|
|
35993
35985
|
"app.mcp.protocol_invalid": "Alan tools returned an invalid response",
|
|
35994
35986
|
"app.mcp.tools_missing": "Required Alan tools are missing",
|
|
35995
35987
|
"app.mcp.provider_not_loaded": "The provider did not load Alan tools",
|
|
35988
|
+
"app.runtime.outdated": "Runtime update required",
|
|
35996
35989
|
"app.internal": "Application error"
|
|
35997
35990
|
};
|
|
35998
35991
|
var APPLICATION_PROBLEM_RECOVERY = {
|
|
@@ -36046,6 +36039,10 @@ var APPLICATION_PROBLEM_RECOVERY = {
|
|
|
36046
36039
|
action: "approve_tools_and_retry",
|
|
36047
36040
|
safe: true
|
|
36048
36041
|
},
|
|
36042
|
+
// The peer runtime predates the dispatch contract this server speaks. Nothing
|
|
36043
|
+
// on the server can fix that; the user must update the desktop app or restart
|
|
36044
|
+
// the cloud environment so the current agent binary is launched.
|
|
36045
|
+
"app.runtime.outdated": { mode: "after_user_action", action: "update_runtime", safe: true },
|
|
36049
36046
|
"app.internal": { mode: "manual", action: "retry", safe: false }
|
|
36050
36047
|
};
|
|
36051
36048
|
var alanProblemBaseShape = {
|
|
@@ -49943,7 +49940,7 @@ async function probeJsonOrTextModels(executable, env, argSets, options) {
|
|
|
49943
49940
|
probeEnv,
|
|
49944
49941
|
args,
|
|
49945
49942
|
timeoutMs,
|
|
49946
|
-
options?.closeStdin ? { closeStdin:
|
|
49943
|
+
options?.closeStdin || options?.maxOutputChars ? { closeStdin: options?.closeStdin, maxOutputChars: options?.maxOutputChars } : void 0
|
|
49947
49944
|
);
|
|
49948
49945
|
if (!result || result.error || result.status !== 0 || !result.stdout.trim()) continue;
|
|
49949
49946
|
try {
|
|
@@ -49953,6 +49950,7 @@ async function probeJsonOrTextModels(executable, env, argSets, options) {
|
|
|
49953
49950
|
const models = extractModelIdsFromJson(parsed);
|
|
49954
49951
|
if (models.length > 0) return models;
|
|
49955
49952
|
} catch {
|
|
49953
|
+
if (/^\s*[{[]/.test(result.stdout)) continue;
|
|
49956
49954
|
const labeled = extractModelIdsFromLabeledList(result.stdout);
|
|
49957
49955
|
if (labeled.length > 0) return labeled;
|
|
49958
49956
|
const models = extractModelIdsFromText(result.stdout);
|
|
@@ -50188,7 +50186,9 @@ async function discoverCursorAgentModels(executable, env) {
|
|
|
50188
50186
|
]);
|
|
50189
50187
|
}
|
|
50190
50188
|
async function discoverCodexModels(executable, env) {
|
|
50191
|
-
return probeJsonOrTextModels(executable, env, [["debug", "models"]]
|
|
50189
|
+
return probeJsonOrTextModels(executable, env, [["debug", "models"]], {
|
|
50190
|
+
maxOutputChars: 1024 * 1024
|
|
50191
|
+
});
|
|
50192
50192
|
}
|
|
50193
50193
|
async function discoverClaudeModels(executable, env) {
|
|
50194
50194
|
const fromCli = await probeJsonOrTextModels(executable, env, [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alan-ai-hq/agent-manager",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.109",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Alan agent runtime — cloud sandbox and local daemon (alan-agent CLI)",
|
|
6
6
|
"bin": {
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
"tsx": "^4.19.0",
|
|
28
28
|
"typescript": "~5.9.3",
|
|
29
29
|
"@alan-ai/agent-core": "0.1.0",
|
|
30
|
-
"@alan-ai/
|
|
31
|
-
"@alan-ai/
|
|
30
|
+
"@alan-ai/shared": "0.1.0",
|
|
31
|
+
"@alan-ai/sandbox-runtime-spec": "0.1.0"
|
|
32
32
|
},
|
|
33
33
|
"scripts": {
|
|
34
34
|
"build": "tsup",
|