@nowcrew/daemon 0.6.27 → 0.6.29
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/local-executor.js +2 -3
- package/dist/main.js +0 -0
- package/dist/runtime-startup-error.js +18 -0
- package/package.json +9 -10
package/dist/local-executor.js
CHANGED
|
@@ -28,6 +28,7 @@ import { projectSkillRuntimeDirectories, redactProjectSkillRuntimeRootText, reda
|
|
|
28
28
|
import { diffMemoryPruneNotes, evaluateMemoryPrunePostcondition, inspectMemoryPruneFilesWithinDeadline, parseMemoryPruneTraceId, } from "./memory-prune-diagnostics.js";
|
|
29
29
|
import { createLocalMemoryTelemetry, logLocalMemoryContextPrepareFailure, logLocalMemoryDiagnosticsFailure, } from "./local-memory-telemetry.js";
|
|
30
30
|
import { CodexStartupStageParser } from "./codex-startup-stage.js";
|
|
31
|
+
import { formatRuntimeStartupError } from "./runtime-startup-error.js";
|
|
31
32
|
function memoryPruneFileFactFields(fileFacts) {
|
|
32
33
|
const fields = {};
|
|
33
34
|
for (const [label, fact] of Object.entries(fileFacts)) {
|
|
@@ -756,9 +757,7 @@ async function executeLocalUnlocked(input, callbacks, dependencies) {
|
|
|
756
757
|
await child.cancel?.();
|
|
757
758
|
}
|
|
758
759
|
startupReservation.release();
|
|
759
|
-
throw new Error(
|
|
760
|
-
? `${runtime.name} startup timed out`
|
|
761
|
-
: `${runtime.name} exited before signaling ready (exit ${startupOutcome.exit.exitCode})`);
|
|
760
|
+
throw new Error(formatRuntimeStartupError(runtime.name, startupOutcome, stderrTail, codexStartupStageState.last));
|
|
762
761
|
}
|
|
763
762
|
await runtimeReadyNotification;
|
|
764
763
|
}
|
package/dist/main.js
CHANGED
|
File without changes
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export function formatRuntimeStartupError(runtime, outcome, stderrTail, lastStage) {
|
|
2
|
+
if (outcome.kind === "timeout") {
|
|
3
|
+
const detail = [
|
|
4
|
+
lastStage === null
|
|
5
|
+
? undefined
|
|
6
|
+
: `last_stage=${lastStage.stage} status=${lastStage.status} attempt=${lastStage.attempt}`,
|
|
7
|
+
stderrTail.trim() === "" ? undefined : `stderr: ${stderrTail.trim()}`,
|
|
8
|
+
].filter(Boolean).join("; ");
|
|
9
|
+
return `${runtime} startup timed out${detail === "" ? "" : ` (${detail})`}`;
|
|
10
|
+
}
|
|
11
|
+
const detail = [
|
|
12
|
+
`exit ${outcome.exit.exitCode}`,
|
|
13
|
+
outcome.exit.spawnError === undefined ? undefined : `spawn_error: ${outcome.exit.spawnError}`,
|
|
14
|
+
outcome.exit.terminationSignal === undefined ? undefined : `signal: ${outcome.exit.terminationSignal}`,
|
|
15
|
+
stderrTail.trim() === "" ? undefined : `stderr: ${stderrTail.trim()}`,
|
|
16
|
+
].filter(Boolean).join("; ");
|
|
17
|
+
return `${runtime} exited before signaling ready (${detail})`;
|
|
18
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nowcrew/daemon",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.29",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "crew daemon — 运行在用户机器:拉起/管理 agent 进程,注入 crew CLI,归一化 runtime 事件",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -16,14 +16,6 @@
|
|
|
16
16
|
"publishConfig": {
|
|
17
17
|
"access": "public"
|
|
18
18
|
},
|
|
19
|
-
"scripts": {
|
|
20
|
-
"daemon": "pnpm --filter @nowcrew/cli build && tsx src/main.ts",
|
|
21
|
-
"build": "tsc -p tsconfig.json",
|
|
22
|
-
"codex-home:migrate": "tsx src/runtimes/codex-home-migration-cli.ts",
|
|
23
|
-
"prepublishOnly": "pnpm build && node ../scripts/daemon-release-artifact.mjs --strict-registry",
|
|
24
|
-
"test": "vitest run",
|
|
25
|
-
"typecheck": "tsc --noEmit"
|
|
26
|
-
},
|
|
27
19
|
"dependencies": {
|
|
28
20
|
"@agentclientprotocol/sdk": "1.2.1",
|
|
29
21
|
"@nowcrew/cli": "^0.4.13",
|
|
@@ -42,5 +34,12 @@
|
|
|
42
34
|
"tsx": "^4.19.0",
|
|
43
35
|
"typescript": "^5.6.0",
|
|
44
36
|
"vitest": "^2.1.0"
|
|
37
|
+
},
|
|
38
|
+
"scripts": {
|
|
39
|
+
"daemon": "pnpm --filter @nowcrew/cli build && tsx src/main.ts",
|
|
40
|
+
"build": "tsc -p tsconfig.json",
|
|
41
|
+
"codex-home:migrate": "tsx src/runtimes/codex-home-migration-cli.ts",
|
|
42
|
+
"test": "vitest run",
|
|
43
|
+
"typecheck": "tsc --noEmit"
|
|
45
44
|
}
|
|
46
|
-
}
|
|
45
|
+
}
|