@aiden-ade/sandbox-agent 0.1.78 → 0.1.79
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 +42 -6
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -15240,7 +15240,7 @@ function describeError(error61) {
|
|
|
15240
15240
|
}
|
|
15241
15241
|
|
|
15242
15242
|
// src/version.ts
|
|
15243
|
-
var AGENT_VERSION = "0.1.
|
|
15243
|
+
var AGENT_VERSION = "0.1.79";
|
|
15244
15244
|
|
|
15245
15245
|
// src/daemon-worktree.ts
|
|
15246
15246
|
var import_node_child_process3 = require("child_process");
|
|
@@ -72840,9 +72840,29 @@ function failureFromError(error61, paths) {
|
|
|
72840
72840
|
stage: "protocol",
|
|
72841
72841
|
message: "Alan's tool service returned an invalid MCP response.",
|
|
72842
72842
|
retryable: false,
|
|
72843
|
-
paths
|
|
72843
|
+
paths,
|
|
72844
|
+
diagnostic: describeReadinessError(error61)
|
|
72844
72845
|
};
|
|
72845
72846
|
}
|
|
72847
|
+
function describeReadinessError(error61) {
|
|
72848
|
+
if (!(error61 instanceof Error)) return String(error61);
|
|
72849
|
+
const parts2 = [];
|
|
72850
|
+
let current = error61;
|
|
72851
|
+
for (let depth = 0; current instanceof Error && depth < 4; depth += 1) {
|
|
72852
|
+
const { name, message } = current;
|
|
72853
|
+
const { code, status } = current;
|
|
72854
|
+
parts2.push(
|
|
72855
|
+
[
|
|
72856
|
+
name,
|
|
72857
|
+
message,
|
|
72858
|
+
code === void 0 ? "" : `code=${String(code)}`,
|
|
72859
|
+
status === void 0 ? "" : `status=${String(status)}`
|
|
72860
|
+
].filter(Boolean).join(" ")
|
|
72861
|
+
);
|
|
72862
|
+
current = current.cause;
|
|
72863
|
+
}
|
|
72864
|
+
return parts2.join(" <- ");
|
|
72865
|
+
}
|
|
72846
72866
|
async function waitBeforeRetry() {
|
|
72847
72867
|
await new Promise((resolve15) => setTimeout(resolve15, RETRY_DELAY_MS2));
|
|
72848
72868
|
}
|
|
@@ -73283,7 +73303,8 @@ async function handleAgentExecute(ctx, payload) {
|
|
|
73283
73303
|
console.warn("[alan-agent] Alan MCP readiness observed failure", {
|
|
73284
73304
|
...correlation,
|
|
73285
73305
|
code: failure.code,
|
|
73286
|
-
stage: failure.stage
|
|
73306
|
+
stage: failure.stage,
|
|
73307
|
+
...failure.diagnostic ? { diagnostic: failure.diagnostic } : {}
|
|
73287
73308
|
});
|
|
73288
73309
|
}
|
|
73289
73310
|
});
|
|
@@ -80510,6 +80531,9 @@ var WebPresenter = class {
|
|
|
80510
80531
|
id: (0, import_node_crypto20.randomUUID)(),
|
|
80511
80532
|
title: APPLICATION_PROBLEM_TITLES[input2.code],
|
|
80512
80533
|
detail: input2.message,
|
|
80534
|
+
// The schema's slot for the technical cause, so the problem carries it
|
|
80535
|
+
// without putting an SDK error message in front of the person.
|
|
80536
|
+
...input2.diagnostic ? { diagnosticsRef: input2.diagnostic } : {},
|
|
80513
80537
|
occurredAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
80514
80538
|
severity: "terminal",
|
|
80515
80539
|
scope: {
|
|
@@ -81095,9 +81119,10 @@ var WSClient = class {
|
|
|
81095
81119
|
|
|
81096
81120
|
// src/sandbox.ts
|
|
81097
81121
|
var RequiredToolsUnavailableError = class extends Error {
|
|
81098
|
-
constructor(code, message) {
|
|
81122
|
+
constructor(code, message, diagnostic) {
|
|
81099
81123
|
super(message);
|
|
81100
81124
|
this.code = code;
|
|
81125
|
+
this.diagnostic = diagnostic;
|
|
81101
81126
|
this.name = "RequiredToolsUnavailableError";
|
|
81102
81127
|
}
|
|
81103
81128
|
};
|
|
@@ -81370,10 +81395,17 @@ async function runSandbox(config2) {
|
|
|
81370
81395
|
lifecycle.warn("sandbox_agent_mcp_readiness_failed", {
|
|
81371
81396
|
backendKind: activeBackendKind,
|
|
81372
81397
|
code: readiness.code,
|
|
81398
|
+
// The protocol branch cannot describe itself; without this the
|
|
81399
|
+
// event names a category and nothing else.
|
|
81400
|
+
...readiness.diagnostic ? { diagnostic: readiness.diagnostic } : {},
|
|
81373
81401
|
stage: readiness.stage,
|
|
81374
81402
|
retryable: readiness.retryable
|
|
81375
81403
|
});
|
|
81376
|
-
throw new RequiredToolsUnavailableError(
|
|
81404
|
+
throw new RequiredToolsUnavailableError(
|
|
81405
|
+
readiness.code,
|
|
81406
|
+
readiness.message,
|
|
81407
|
+
readiness.diagnostic
|
|
81408
|
+
);
|
|
81377
81409
|
}
|
|
81378
81410
|
} else if (currentRunId ?? config2.runId) {
|
|
81379
81411
|
lifecycle.warn("sandbox_agent_mcp_contract_missing", {
|
|
@@ -81464,7 +81496,11 @@ async function runSandbox(config2) {
|
|
|
81464
81496
|
error: errorMessage
|
|
81465
81497
|
};
|
|
81466
81498
|
if (error61 instanceof RequiredToolsUnavailableError) {
|
|
81467
|
-
presenter.onApplicationError({
|
|
81499
|
+
presenter.onApplicationError({
|
|
81500
|
+
code: error61.code,
|
|
81501
|
+
message: error61.message,
|
|
81502
|
+
...error61.diagnostic ? { diagnostic: error61.diagnostic } : {}
|
|
81503
|
+
});
|
|
81468
81504
|
} else {
|
|
81469
81505
|
presenter.onError(errorMessage, false);
|
|
81470
81506
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aiden-ade/sandbox-agent",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.79",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Alan agent runtime — cloud sandbox and local daemon (alan-agent CLI)",
|
|
6
6
|
"bin": {
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
"tsup": "^8.5.1",
|
|
26
26
|
"tsx": "^4.19.0",
|
|
27
27
|
"typescript": "~5.9.3",
|
|
28
|
-
"@alan-ai/
|
|
29
|
-
"@alan-ai/
|
|
28
|
+
"@alan-ai/shared": "0.1.0",
|
|
29
|
+
"@alan-ai/agent-core": "0.1.0"
|
|
30
30
|
},
|
|
31
31
|
"deprecated": "Use @alan-ai-hq/agent-manager instead.",
|
|
32
32
|
"scripts": {
|