@amaster.ai/employee-runtime-connector 0.1.1-beta.274 → 0.1.1-beta.275
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.
|
@@ -28269,6 +28269,7 @@ function createRunExitClosureExecutor(input) {
|
|
|
28269
28269
|
ingestLog: ingestLog2,
|
|
28270
28270
|
redactProtectedText: redactProtectedText2,
|
|
28271
28271
|
piCompletionOutputStopped: piCompletionOutputStopped2,
|
|
28272
|
+
piOutputAllowsMissingTurnEnd: piOutputAllowsMissingTurnEnd2,
|
|
28272
28273
|
piOutputValidationError: piOutputValidationError2
|
|
28273
28274
|
} = input;
|
|
28274
28275
|
async function execute(inputState, options = {}) {
|
|
@@ -28409,11 +28410,11 @@ function createRunExitClosureExecutor(input) {
|
|
|
28409
28410
|
floodLimitBytes: Math.max(1, readNumber(executionConfig.maxOutputBytes, config.executorMaxOutputBytes)),
|
|
28410
28411
|
outputTokens: readNumber(parsed.usage?.outputTokens, 0)
|
|
28411
28412
|
});
|
|
28412
|
-
const completionOutputStopped = executorKind === "pi" && piCompletionOutputStopped2(
|
|
28413
|
+
const completionOutputStopped = executorKind === "pi" && piCompletionOutputStopped2(execution);
|
|
28413
28414
|
const cleanupDisposition = executorKind === "pi" && execution.cancelled !== true && !hasOutputFlood && !hasMemoryLimit && execution.timedOut !== true && !execution.spawnError && execution.signal === null ? classifyPiTerminalCleanupDisposition({ ...parsed, mcpToolResults }, []) : null;
|
|
28414
28415
|
const parsedForValidation = cleanupDisposition ? { ...parsed, errorMessage: null } : parsed;
|
|
28415
28416
|
const piInvalidOutputError = executorKind === "pi" ? piOutputValidationError2(parsedForValidation, {
|
|
28416
|
-
allowMissingTurnEnd:
|
|
28417
|
+
allowMissingTurnEnd: Boolean(cleanupDisposition) || piOutputAllowsMissingTurnEnd2(execution, parsedForValidation),
|
|
28417
28418
|
allowMissingAssistantOutput: false
|
|
28418
28419
|
}) : null;
|
|
28419
28420
|
const parsedError = hasOutputFlood ? "Run-exit closure output exceeded the configured limit" : hasMemoryLimit ? "Run-exit closure exceeded the configured memory limit" : hasToolExecutionGuard ? "Run-exit closure stopped after the first rejected or invalid tool attempt" : execution.timedOut ? "Run-exit closure timed out" : execution.spawnError ?? piInvalidOutputError ?? parsedForValidation.errorMessage ?? ((execution.exitCode ?? 0) === 0 || cleanupDisposition ? null : `Run-exit closure exited with code ${execution.exitCode ?? "unknown"}`);
|
|
@@ -33692,7 +33693,7 @@ function assertRequiredTaskAttachmentMaterialized(input, materialized) {
|
|
|
33692
33693
|
}
|
|
33693
33694
|
|
|
33694
33695
|
// src/amaster-runtime-daemon.mjs
|
|
33695
|
-
var CONNECTOR_VERSION = "0.1.1-beta.
|
|
33696
|
+
var CONNECTOR_VERSION = "0.1.1-beta.275";
|
|
33696
33697
|
var CONNECTOR_CONTRACT_VERSION = "2026-06-04.v1";
|
|
33697
33698
|
var daemonRequire = createRequire(import.meta.url);
|
|
33698
33699
|
var MAX_CHECKPOINT_BYTES = 20 * 1024 * 1024;
|
|
@@ -37029,7 +37030,7 @@ async function executePiTerminalTextRepairTurn(config, command, executor, execut
|
|
|
37029
37030
|
]);
|
|
37030
37031
|
const completionOutputStopped = piCompletionOutputStopped(execution);
|
|
37031
37032
|
const invalidOutput = piOutputValidationError(parsed, {
|
|
37032
|
-
allowMissingTurnEnd:
|
|
37033
|
+
allowMissingTurnEnd: piOutputAllowsMissingTurnEnd(execution, parsed, { allowTerminalAgentEnd: true }),
|
|
37033
37034
|
completionOutputType: execution.completionOutputType,
|
|
37034
37035
|
completionOutputHasFinalAssistantText: execution.completionOutputHasFinalAssistantText
|
|
37035
37036
|
});
|
|
@@ -37093,6 +37094,7 @@ function runCompletionCoordinator(config) {
|
|
|
37093
37094
|
ingestLog,
|
|
37094
37095
|
redactProtectedText,
|
|
37095
37096
|
piCompletionOutputStopped,
|
|
37097
|
+
piOutputAllowsMissingTurnEnd,
|
|
37096
37098
|
piOutputValidationError
|
|
37097
37099
|
});
|
|
37098
37100
|
const coordinator = createRunCompletionCoordinator(createRunCompletionRuntimePorts({
|
|
@@ -38092,6 +38094,11 @@ function piCompletionCleanupStopped(execution) {
|
|
|
38092
38094
|
function piCompletionOutputStopped(execution) {
|
|
38093
38095
|
return piCompletionCleanupStopped(execution) && PI_COMPLETION_OUTPUT_TYPES.has(readString(execution?.completionOutputType) ?? "") && (execution?.completionOutputType === "approval_required" || execution?.completionOutputHasFinalAssistantText === true);
|
|
38094
38096
|
}
|
|
38097
|
+
function piOutputAllowsMissingTurnEnd(execution, parsed, options = {}) {
|
|
38098
|
+
if (piCompletionOutputStopped(execution)) return true;
|
|
38099
|
+
if (options.allowTerminalAgentEnd === true && parsed?.terminalEventType === "agent_end") return true;
|
|
38100
|
+
return execution?.completionOutputType === "agent_settled" && execution?.completionOutputHasFinalAssistantText === true && execution?.exitCode === 0 && execution?.signal === null;
|
|
38101
|
+
}
|
|
38095
38102
|
function piOutputValidationError(parsed, options = {}) {
|
|
38096
38103
|
if (parsed?.errorMessage) return parsed.errorMessage;
|
|
38097
38104
|
if (options.completionOutputType === "agent_settled" && options.completionOutputHasFinalAssistantText !== true && options.allowMissingFinalAssistantText !== true) {
|
|
@@ -38935,15 +38942,17 @@ async function executeRunCommand(config, command) {
|
|
|
38935
38942
|
);
|
|
38936
38943
|
}
|
|
38937
38944
|
const parsedForValidation = parsed;
|
|
38945
|
+
const effectiveCompletionOutputHasFinalAssistantText = terminalTextRepair?.succeeded === true ? true : execution.completionOutputHasFinalAssistantText;
|
|
38938
38946
|
const piTurnLimitFailure = executor.kind === "pi" && !cancelled && !hasOutputFlood && !hasArgumentAmplification && !hasMemoryLimit && execution.timedOut !== true && !execution.spawnError ? classifyPiTurnLimitResult(parsedForValidation, {
|
|
38939
38947
|
authoritativeTerminalDisposition: Boolean(terminalRunDisposition)
|
|
38940
38948
|
}) : null;
|
|
38941
38949
|
const piInvalidOutputError = executor.kind === "pi" ? piOutputValidationError(parsedForValidation, {
|
|
38942
|
-
|
|
38950
|
+
// Missing turn_end trusts only the raw executor fact; repaired text is used solely by final-text validation.
|
|
38951
|
+
allowMissingTurnEnd: piOutputAllowsMissingTurnEnd(execution, parsedForValidation),
|
|
38943
38952
|
allowMissingAssistantOutput: execution.completionOutputType === "approval_required" || Boolean(terminalRunDisposition),
|
|
38944
38953
|
allowMissingFinalAssistantText: Boolean(terminalRunDisposition),
|
|
38945
38954
|
completionOutputType: execution.completionOutputType,
|
|
38946
|
-
completionOutputHasFinalAssistantText:
|
|
38955
|
+
completionOutputHasFinalAssistantText: effectiveCompletionOutputHasFinalAssistantText
|
|
38947
38956
|
}) : null;
|
|
38948
38957
|
const piOutputFailure = executor.kind === "pi" && !cancelled && !hasOutputFlood && !hasArgumentAmplification && !hasMemoryLimit && execution.timedOut !== true && !execution.spawnError ? classifyPiOutputFailure(parsedForValidation, {
|
|
38949
38958
|
exitCode: execution.exitCode,
|
package/dist/amaster-runtime.mjs
CHANGED
|
@@ -7,7 +7,7 @@ import { homedir, hostname } from "node:os";
|
|
|
7
7
|
import { fileURLToPath } from "node:url";
|
|
8
8
|
import { BUILD_SUPPORTED_CAPABILITIES } from "./amaster-runtime-daemon/capability-registry.mjs";
|
|
9
9
|
|
|
10
|
-
const CONNECTOR_VERSION = "0.1.1-beta.
|
|
10
|
+
const CONNECTOR_VERSION = "0.1.1-beta.275";
|
|
11
11
|
|
|
12
12
|
const CONFIG_KEY_MAP = new Map([
|
|
13
13
|
["server_url", "AMASTER_EMPLOYEE_SERVER_URL"],
|