@vm0/runner 3.18.0 → 3.18.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/index.js +17 -12
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -3656,25 +3656,30 @@ var Runner = class _Runner {
|
|
|
3656
3656
|
logger14.log(` Executing job ${context.runId}...`);
|
|
3657
3657
|
logger14.log(` Prompt: ${context.prompt.substring(0, 100)}...`);
|
|
3658
3658
|
logger14.log(` Compose version: ${context.agentComposeVersionId}`);
|
|
3659
|
+
let exitCode = 1;
|
|
3660
|
+
let error;
|
|
3659
3661
|
try {
|
|
3660
3662
|
const result = await executeJob(context, this.config);
|
|
3663
|
+
exitCode = result.exitCode;
|
|
3664
|
+
error = result.error;
|
|
3661
3665
|
logger14.log(
|
|
3662
|
-
` Job ${context.runId} execution completed with exit code ${
|
|
3666
|
+
` Job ${context.runId} execution completed with exit code ${exitCode}`
|
|
3663
3667
|
);
|
|
3664
|
-
if (
|
|
3665
|
-
logger14.error(` Job ${context.runId} failed: ${
|
|
3668
|
+
if (exitCode !== 0 && error) {
|
|
3669
|
+
logger14.error(` Job ${context.runId} failed: ${error}`);
|
|
3666
3670
|
}
|
|
3667
3671
|
} catch (err) {
|
|
3668
|
-
|
|
3672
|
+
error = err instanceof Error ? err.message : "Unknown execution error";
|
|
3669
3673
|
logger14.error(` Job ${context.runId} execution failed: ${error}`);
|
|
3670
|
-
const result = await completeJob(
|
|
3671
|
-
this.config.server.url,
|
|
3672
|
-
context,
|
|
3673
|
-
1,
|
|
3674
|
-
error
|
|
3675
|
-
);
|
|
3676
|
-
logger14.log(` Job ${context.runId} reported as ${result.status}`);
|
|
3677
3674
|
}
|
|
3675
|
+
logger14.log(
|
|
3676
|
+
` Calling complete API for job ${context.runId} with exitCode=${exitCode}`
|
|
3677
|
+
);
|
|
3678
|
+
const completeResult = await withRunnerTiming(
|
|
3679
|
+
"complete",
|
|
3680
|
+
() => completeJob(this.config.server.url, context, exitCode, error)
|
|
3681
|
+
);
|
|
3682
|
+
logger14.log(` Job ${context.runId} reported as ${completeResult.status}`);
|
|
3678
3683
|
}
|
|
3679
3684
|
};
|
|
3680
3685
|
|
|
@@ -4669,7 +4674,7 @@ var snapshotCommand = new Command5("snapshot").description("Generate a Firecrack
|
|
|
4669
4674
|
);
|
|
4670
4675
|
|
|
4671
4676
|
// src/index.ts
|
|
4672
|
-
var version = true ? "3.18.
|
|
4677
|
+
var version = true ? "3.18.1" : "0.1.0";
|
|
4673
4678
|
program.name("vm0-runner").version(version).description("Self-hosted runner for VM0 agents");
|
|
4674
4679
|
program.addCommand(startCommand);
|
|
4675
4680
|
program.addCommand(doctorCommand);
|