@amaster.ai/employee-runtime-connector 0.1.1-beta.114 → 0.1.1-beta.116
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.
|
@@ -9468,11 +9468,14 @@ function parseCodexJsonl(stdout) {
|
|
|
9468
9468
|
let summary = "";
|
|
9469
9469
|
let errorMessage = null;
|
|
9470
9470
|
let terminalEvent = null;
|
|
9471
|
+
let terminalEventIndex = null;
|
|
9472
|
+
let eventIndex = -1;
|
|
9471
9473
|
const mcpToolResults = [];
|
|
9472
9474
|
const usage = { inputTokens: 0, cachedInputTokens: 0, outputTokens: 0 };
|
|
9473
9475
|
for (const rawLine of String(stdout ?? "").split(/\r?\n/)) {
|
|
9474
9476
|
const event = parseJsonLine(rawLine.trim());
|
|
9475
9477
|
if (!event) continue;
|
|
9478
|
+
eventIndex += 1;
|
|
9476
9479
|
if (event.type === "thread.started") {
|
|
9477
9480
|
sessionId = readString(event.thread_id) ?? sessionId;
|
|
9478
9481
|
continue;
|
|
@@ -9487,6 +9490,7 @@ function parseCodexJsonl(stdout) {
|
|
|
9487
9490
|
}
|
|
9488
9491
|
if (event.type === "turn.completed") {
|
|
9489
9492
|
terminalEvent = "completed";
|
|
9493
|
+
terminalEventIndex = eventIndex;
|
|
9490
9494
|
const eventUsage = asRecord(event.usage);
|
|
9491
9495
|
usage.inputTokens = readNumber(eventUsage.input_tokens, usage.inputTokens);
|
|
9492
9496
|
usage.cachedInputTokens = readNumber(eventUsage.cached_input_tokens, usage.cachedInputTokens);
|
|
@@ -9509,6 +9513,8 @@ function parseCodexJsonl(stdout) {
|
|
|
9509
9513
|
summary,
|
|
9510
9514
|
usage,
|
|
9511
9515
|
errorMessage: terminalEvent === "completed" ? null : errorMessage,
|
|
9516
|
+
terminalEventType: terminalEvent === "completed" ? "turn_end" : null,
|
|
9517
|
+
terminalEventIndex: terminalEvent === "completed" ? terminalEventIndex : null,
|
|
9512
9518
|
...uniqueMcpToolResults.length > 0 ? { mcpToolResults: uniqueMcpToolResults } : {}
|
|
9513
9519
|
};
|
|
9514
9520
|
}
|
|
@@ -13132,7 +13138,7 @@ var source_acquisition_compatibility_default = {
|
|
|
13132
13138
|
};
|
|
13133
13139
|
|
|
13134
13140
|
// src/amaster-runtime-daemon.mjs
|
|
13135
|
-
var CONNECTOR_VERSION = "0.1.1-beta.
|
|
13141
|
+
var CONNECTOR_VERSION = "0.1.1-beta.116";
|
|
13136
13142
|
var CONNECTOR_CONTRACT_VERSION = "2026-06-04.v1";
|
|
13137
13143
|
var SOURCE_ACQUISITION_CAPABILITY = source_acquisition_compatibility_default.profileVersion;
|
|
13138
13144
|
var daemonRequire = createRequire(import.meta.url);
|
|
@@ -16330,6 +16336,13 @@ function runtimeConnectorErrorCode(error) {
|
|
|
16330
16336
|
const details = asRecord(body.details);
|
|
16331
16337
|
return readString(details.code) ?? readString(body.code);
|
|
16332
16338
|
}
|
|
16339
|
+
function commandFailureErrorCode(error) {
|
|
16340
|
+
const explicit = readString(asRecord(error).code);
|
|
16341
|
+
if (explicit && /^[a-z][a-z0-9_]{0,127}$/.test(explicit)) return explicit;
|
|
16342
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
16343
|
+
const prefix = message.match(/^(codex_managed_mcp_[a-z0-9_]{1,109})(?::|$)/)?.[1];
|
|
16344
|
+
return prefix && /^[a-z][a-z0-9_]{0,127}$/.test(prefix) ? prefix : null;
|
|
16345
|
+
}
|
|
16333
16346
|
function terminalCommandStatusFromCompletionCheckError(error) {
|
|
16334
16347
|
if (runtimeConnectorErrorCode(error) !== "runtime_completion_check_command_not_acknowledged") {
|
|
16335
16348
|
return null;
|
|
@@ -19090,7 +19103,7 @@ async function processCommand(config, command) {
|
|
|
19090
19103
|
} catch (err) {
|
|
19091
19104
|
const sourcePurpose = Object.keys(commandSourceAcquisitionProfile(command)).length > 0;
|
|
19092
19105
|
const message = sourcePurpose ? readString(asRecord(err).code) ?? "source_acquisition_executor_failed" : err instanceof Error ? err.message : String(err);
|
|
19093
|
-
const errorCode =
|
|
19106
|
+
const errorCode = commandFailureErrorCode(err);
|
|
19094
19107
|
const runtimeArtifacts = !sourcePurpose && Array.isArray(asRecord(err).receipts) ? asRecord(err).receipts.map(asRecord) : [];
|
|
19095
19108
|
await ingestLog(config, command, "system", "error", message);
|
|
19096
19109
|
await completeCommand(config, command, "failed", {
|
package/dist/amaster-runtime.mjs
CHANGED
|
@@ -6,7 +6,7 @@ import { basename, dirname, join, resolve } from "node:path";
|
|
|
6
6
|
import { homedir, hostname } from "node:os";
|
|
7
7
|
import { fileURLToPath } from "node:url";
|
|
8
8
|
|
|
9
|
-
const CONNECTOR_VERSION = "0.1.1-beta.
|
|
9
|
+
const CONNECTOR_VERSION = "0.1.1-beta.116";
|
|
10
10
|
|
|
11
11
|
const CAPABILITIES = [
|
|
12
12
|
"remote_registration",
|