@vtxmacro/cli 2026.10.25 → 2026.10.26
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/bin/vtx-mcp.js +1 -1
- package/bin/vtx-service-bootstrap.js +20 -1
- package/bin/vtx.js +111 -8
- package/package.json +1 -1
package/bin/vtx-mcp.js
CHANGED
|
@@ -37,7 +37,7 @@ var init_define_VTX_PI_MODEL_POLICY = __esm({
|
|
|
37
37
|
var agent_cli_release_default;
|
|
38
38
|
var init_agent_cli_release = __esm({
|
|
39
39
|
"agent-cli-release.json"() {
|
|
40
|
-
agent_cli_release_default = { package_name: "@vtxmacro/cli", package_version: "2026.10.
|
|
40
|
+
agent_cli_release_default = { package_name: "@vtxmacro/cli", package_version: "2026.10.26", codex_package_name: "@openai/codex", codex_version: "0.155.0", copilot_sdk_package_name: "@github/copilot-sdk", copilot_sdk_version: "1.0.0-beta.8", copilot_cli_package_name: "@github/copilot", copilot_cli_version: "1.0.80", deepseek_harness_version: "0.1.1-rc.2", deepseek_harness_packages: ["@deepseek-ai/dsh-agent", "@deepseek-ai/dsh-agent-instructions", "@deepseek-ai/dsh-agent-loop", "@deepseek-ai/dsh-agent-spine-demo", "@deepseek-ai/dsh-anonymous-user-id", "@deepseek-ai/dsh-atomic-write", "@deepseek-ai/dsh-attachment", "@deepseek-ai/dsh-brand", "@deepseek-ai/dsh-code-runtime", "@deepseek-ai/dsh-credentials", "@deepseek-ai/dsh-fs", "@deepseek-ai/dsh-goal", "@deepseek-ai/dsh-goal-round-driver", "@deepseek-ai/dsh-home-paths", "@deepseek-ai/dsh-invariants", "@deepseek-ai/dsh-jobs", "@deepseek-ai/dsh-jobs-local", "@deepseek-ai/dsh-launch-environment", "@deepseek-ai/dsh-llm", "@deepseek-ai/dsh-llm-deepseek", "@deepseek-ai/dsh-llm-retry", "@deepseek-ai/dsh-output-retention", "@deepseek-ai/dsh-sandbox", "@deepseek-ai/dsh-sandbox-policy", "@deepseek-ai/dsh-scope", "@deepseek-ai/dsh-session", "@deepseek-ai/dsh-session-checkpoint-policy", "@deepseek-ai/dsh-session-persistence", "@deepseek-ai/dsh-session-persistence-jsonl", "@deepseek-ai/dsh-session-projection", "@deepseek-ai/dsh-session-title", "@deepseek-ai/dsh-settings", "@deepseek-ai/dsh-shell", "@deepseek-ai/dsh-shell-env", "@deepseek-ai/dsh-skill", "@deepseek-ai/dsh-skill-filesystem", "@deepseek-ai/dsh-subprocess", "@deepseek-ai/dsh-system-prompt", "@deepseek-ai/dsh-timeout", "@deepseek-ai/dsh-tool-bash", "@deepseek-ai/dsh-tool-goal", "@deepseek-ai/dsh-tool-jobs", "@deepseek-ai/dsh-tool-skill", "@deepseek-ai/dsh-tools", "@deepseek-ai/dsh-typert-protocol", "@deepseek-ai/dsh-user-approval"], deepseek_cordis_package_name: "@deepseek-ai/cordis", deepseek_cordis_version: "4.0.1", deepseek_support_packages: { "@deepseek-ai/cordis-plugin-timer": "1.1.3" }, platforms: { "linux-x64": { package_name: "@openai/codex-linux-x64", target: "x86_64-unknown-linux-musl", binary_name: "codex", sha256: "660e159a49e823ac8e5986cb238f73158ce4b957d40d9292f8de90862644b501" }, "win32-x64": { package_name: "@openai/codex-win32-x64", target: "x86_64-pc-windows-msvc", binary_name: "codex.exe", sha256: "e4c11374bd9de8ad5c3b7617fd4654bb7839901edb0863f9930666863c7a021b" } }, pi_coding_agent_package_name: "@earendil-works/pi-coding-agent", pi_ai_package_name: "@earendil-works/pi-ai", pi_version: "0.85.1", pi_support_packages: ["@earendil-works/pi-agent-core", "@earendil-works/pi-telemetry", "@earendil-works/pi-tui", "@earendil-works/chord"], grok_version: "1.0.30", grok_platforms: { "linux-x64": { package_name: "@xai-official/grok-linux-x64", binary_name: "grok", sha256: "504dd6546ab991b75d36698242875ce461489cd1f8cd84285873cb55bd5c7d54" }, "win32-x64": { package_name: "@xai-official/grok-win32-x64", binary_name: "grok.exe", sha256: "48736d1a4342a801ea26d0ecde4c516b653f791399065adaa55973f83abd8867" } } };
|
|
41
41
|
}
|
|
42
42
|
});
|
|
43
43
|
|
|
@@ -14,7 +14,7 @@ import { dirname as dirname4, relative as relative4, resolve as resolve4 } from
|
|
|
14
14
|
import { fileURLToPath } from "node:url";
|
|
15
15
|
|
|
16
16
|
// agent-cli-release.json
|
|
17
|
-
var agent_cli_release_default = { package_name: "@vtxmacro/cli", package_version: "2026.10.
|
|
17
|
+
var agent_cli_release_default = { package_name: "@vtxmacro/cli", package_version: "2026.10.26", codex_package_name: "@openai/codex", codex_version: "0.155.0", copilot_sdk_package_name: "@github/copilot-sdk", copilot_sdk_version: "1.0.0-beta.8", copilot_cli_package_name: "@github/copilot", copilot_cli_version: "1.0.80", deepseek_harness_version: "0.1.1-rc.2", deepseek_harness_packages: ["@deepseek-ai/dsh-agent", "@deepseek-ai/dsh-agent-instructions", "@deepseek-ai/dsh-agent-loop", "@deepseek-ai/dsh-agent-spine-demo", "@deepseek-ai/dsh-anonymous-user-id", "@deepseek-ai/dsh-atomic-write", "@deepseek-ai/dsh-attachment", "@deepseek-ai/dsh-brand", "@deepseek-ai/dsh-code-runtime", "@deepseek-ai/dsh-credentials", "@deepseek-ai/dsh-fs", "@deepseek-ai/dsh-goal", "@deepseek-ai/dsh-goal-round-driver", "@deepseek-ai/dsh-home-paths", "@deepseek-ai/dsh-invariants", "@deepseek-ai/dsh-jobs", "@deepseek-ai/dsh-jobs-local", "@deepseek-ai/dsh-launch-environment", "@deepseek-ai/dsh-llm", "@deepseek-ai/dsh-llm-deepseek", "@deepseek-ai/dsh-llm-retry", "@deepseek-ai/dsh-output-retention", "@deepseek-ai/dsh-sandbox", "@deepseek-ai/dsh-sandbox-policy", "@deepseek-ai/dsh-scope", "@deepseek-ai/dsh-session", "@deepseek-ai/dsh-session-checkpoint-policy", "@deepseek-ai/dsh-session-persistence", "@deepseek-ai/dsh-session-persistence-jsonl", "@deepseek-ai/dsh-session-projection", "@deepseek-ai/dsh-session-title", "@deepseek-ai/dsh-settings", "@deepseek-ai/dsh-shell", "@deepseek-ai/dsh-shell-env", "@deepseek-ai/dsh-skill", "@deepseek-ai/dsh-skill-filesystem", "@deepseek-ai/dsh-subprocess", "@deepseek-ai/dsh-system-prompt", "@deepseek-ai/dsh-timeout", "@deepseek-ai/dsh-tool-bash", "@deepseek-ai/dsh-tool-goal", "@deepseek-ai/dsh-tool-jobs", "@deepseek-ai/dsh-tool-skill", "@deepseek-ai/dsh-tools", "@deepseek-ai/dsh-typert-protocol", "@deepseek-ai/dsh-user-approval"], deepseek_cordis_package_name: "@deepseek-ai/cordis", deepseek_cordis_version: "4.0.1", deepseek_support_packages: { "@deepseek-ai/cordis-plugin-timer": "1.1.3" }, platforms: { "linux-x64": { package_name: "@openai/codex-linux-x64", target: "x86_64-unknown-linux-musl", binary_name: "codex", sha256: "660e159a49e823ac8e5986cb238f73158ce4b957d40d9292f8de90862644b501" }, "win32-x64": { package_name: "@openai/codex-win32-x64", target: "x86_64-pc-windows-msvc", binary_name: "codex.exe", sha256: "e4c11374bd9de8ad5c3b7617fd4654bb7839901edb0863f9930666863c7a021b" } }, pi_coding_agent_package_name: "@earendil-works/pi-coding-agent", pi_ai_package_name: "@earendil-works/pi-ai", pi_version: "0.85.1", pi_support_packages: ["@earendil-works/pi-agent-core", "@earendil-works/pi-telemetry", "@earendil-works/pi-tui", "@earendil-works/chord"], grok_version: "1.0.30", grok_platforms: { "linux-x64": { package_name: "@xai-official/grok-linux-x64", binary_name: "grok", sha256: "504dd6546ab991b75d36698242875ce461489cd1f8cd84285873cb55bd5c7d54" }, "win32-x64": { package_name: "@xai-official/grok-win32-x64", binary_name: "grok.exe", sha256: "48736d1a4342a801ea26d0ecde4c516b653f791399065adaa55973f83abd8867" } } };
|
|
18
18
|
|
|
19
19
|
// lib/runtime-policy.generated.json
|
|
20
20
|
var runtime_policy_generated_default = {
|
|
@@ -1405,6 +1405,7 @@ var CANDLE_TIMEFRAME_SECONDS = {
|
|
|
1405
1405
|
};
|
|
1406
1406
|
var AI_COST_ESTIMATE_PERIOD_DAYS = 30;
|
|
1407
1407
|
var SECONDS_PER_AI_COST_ESTIMATE_PERIOD = SECONDS_PER_DAY * AI_COST_ESTIMATE_PERIOD_DAYS;
|
|
1408
|
+
var EXIT_CODE_TEMPFAIL = 75;
|
|
1408
1409
|
var INFERENCE_HOST_PROCESS_LOCK_RECORD_SCHEMA_VERSION = 2;
|
|
1409
1410
|
var INFERENCE_HOST_RECLAIM_GUARD_CREATE_PASSES = 2;
|
|
1410
1411
|
var LINUX_PROC_STAT_COMM_TERMINATOR_CHARS = 2;
|
|
@@ -3103,8 +3104,26 @@ var runInferenceHostServiceBootstrap = async (manifestPathValue, dependencies =
|
|
|
3103
3104
|
live.supervisor = runSupervisor(manifest.executable, supervisorArguments(script, manifestPath));
|
|
3104
3105
|
return live.supervisor;
|
|
3105
3106
|
};
|
|
3107
|
+
const launcherProtocol = dependencies.launcherProtocol ?? process.env.VTX_INFERENCE_HOST_LAUNCHER_PROTOCOL === "1";
|
|
3108
|
+
const handOffToLauncher = async (plan) => {
|
|
3109
|
+
const candidate = { ...plan.candidate, selected_at: now().toISOString() };
|
|
3110
|
+
await atomicWriteSelection(manifestPath, candidate);
|
|
3111
|
+
await rm4(rejectionPathFor(manifestPath), { force: true }).catch(() => void 0);
|
|
3112
|
+
await prunePrivateReleases(manifestPath, [candidate, plan.active]).catch(
|
|
3113
|
+
async () => await appendBootstrapLog(
|
|
3114
|
+
manifest.log_path,
|
|
3115
|
+
"service_release_cleanup_deferred",
|
|
3116
|
+
{ package_version: candidate.package_version }
|
|
3117
|
+
).catch(() => void 0)
|
|
3118
|
+
);
|
|
3119
|
+
await appendBootstrapLog(manifest.log_path, "service_release_handoff", {
|
|
3120
|
+
package_version: candidate.package_version
|
|
3121
|
+
}).catch(() => void 0);
|
|
3122
|
+
return EXIT_CODE_TEMPFAIL;
|
|
3123
|
+
};
|
|
3106
3124
|
let updatePlan = await checkUpdate();
|
|
3107
3125
|
while (await shouldRun()) {
|
|
3126
|
+
if (updatePlan.candidate && launcherProtocol) return await handOffToLauncher(updatePlan);
|
|
3108
3127
|
if (updatePlan.candidate) {
|
|
3109
3128
|
const candidate = { ...updatePlan.candidate, selected_at: now().toISOString() };
|
|
3110
3129
|
await rm4(runtimePathFor(manifestPath), { force: true });
|
package/bin/vtx.js
CHANGED
|
@@ -113,7 +113,7 @@ var init_routing = __esm({
|
|
|
113
113
|
var agent_cli_release_default;
|
|
114
114
|
var init_agent_cli_release = __esm({
|
|
115
115
|
"agent-cli-release.json"() {
|
|
116
|
-
agent_cli_release_default = { package_name: "@vtxmacro/cli", package_version: "2026.10.
|
|
116
|
+
agent_cli_release_default = { package_name: "@vtxmacro/cli", package_version: "2026.10.26", codex_package_name: "@openai/codex", codex_version: "0.155.0", copilot_sdk_package_name: "@github/copilot-sdk", copilot_sdk_version: "1.0.0-beta.8", copilot_cli_package_name: "@github/copilot", copilot_cli_version: "1.0.80", deepseek_harness_version: "0.1.1-rc.2", deepseek_harness_packages: ["@deepseek-ai/dsh-agent", "@deepseek-ai/dsh-agent-instructions", "@deepseek-ai/dsh-agent-loop", "@deepseek-ai/dsh-agent-spine-demo", "@deepseek-ai/dsh-anonymous-user-id", "@deepseek-ai/dsh-atomic-write", "@deepseek-ai/dsh-attachment", "@deepseek-ai/dsh-brand", "@deepseek-ai/dsh-code-runtime", "@deepseek-ai/dsh-credentials", "@deepseek-ai/dsh-fs", "@deepseek-ai/dsh-goal", "@deepseek-ai/dsh-goal-round-driver", "@deepseek-ai/dsh-home-paths", "@deepseek-ai/dsh-invariants", "@deepseek-ai/dsh-jobs", "@deepseek-ai/dsh-jobs-local", "@deepseek-ai/dsh-launch-environment", "@deepseek-ai/dsh-llm", "@deepseek-ai/dsh-llm-deepseek", "@deepseek-ai/dsh-llm-retry", "@deepseek-ai/dsh-output-retention", "@deepseek-ai/dsh-sandbox", "@deepseek-ai/dsh-sandbox-policy", "@deepseek-ai/dsh-scope", "@deepseek-ai/dsh-session", "@deepseek-ai/dsh-session-checkpoint-policy", "@deepseek-ai/dsh-session-persistence", "@deepseek-ai/dsh-session-persistence-jsonl", "@deepseek-ai/dsh-session-projection", "@deepseek-ai/dsh-session-title", "@deepseek-ai/dsh-settings", "@deepseek-ai/dsh-shell", "@deepseek-ai/dsh-shell-env", "@deepseek-ai/dsh-skill", "@deepseek-ai/dsh-skill-filesystem", "@deepseek-ai/dsh-subprocess", "@deepseek-ai/dsh-system-prompt", "@deepseek-ai/dsh-timeout", "@deepseek-ai/dsh-tool-bash", "@deepseek-ai/dsh-tool-goal", "@deepseek-ai/dsh-tool-jobs", "@deepseek-ai/dsh-tool-skill", "@deepseek-ai/dsh-tools", "@deepseek-ai/dsh-typert-protocol", "@deepseek-ai/dsh-user-approval"], deepseek_cordis_package_name: "@deepseek-ai/cordis", deepseek_cordis_version: "4.0.1", deepseek_support_packages: { "@deepseek-ai/cordis-plugin-timer": "1.1.3" }, platforms: { "linux-x64": { package_name: "@openai/codex-linux-x64", target: "x86_64-unknown-linux-musl", binary_name: "codex", sha256: "660e159a49e823ac8e5986cb238f73158ce4b957d40d9292f8de90862644b501" }, "win32-x64": { package_name: "@openai/codex-win32-x64", target: "x86_64-pc-windows-msvc", binary_name: "codex.exe", sha256: "e4c11374bd9de8ad5c3b7617fd4654bb7839901edb0863f9930666863c7a021b" } }, pi_coding_agent_package_name: "@earendil-works/pi-coding-agent", pi_ai_package_name: "@earendil-works/pi-ai", pi_version: "0.85.1", pi_support_packages: ["@earendil-works/pi-agent-core", "@earendil-works/pi-telemetry", "@earendil-works/pi-tui", "@earendil-works/chord"], grok_version: "1.0.30", grok_platforms: { "linux-x64": { package_name: "@xai-official/grok-linux-x64", binary_name: "grok", sha256: "504dd6546ab991b75d36698242875ce461489cd1f8cd84285873cb55bd5c7d54" }, "win32-x64": { package_name: "@xai-official/grok-win32-x64", binary_name: "grok.exe", sha256: "48736d1a4342a801ea26d0ecde4c516b653f791399065adaa55973f83abd8867" } } };
|
|
117
117
|
}
|
|
118
118
|
});
|
|
119
119
|
|
|
@@ -1598,6 +1598,9 @@ var init_constants = __esm({
|
|
|
1598
1598
|
// Tools a Grok tool-validation summary lists before truncating.
|
|
1599
1599
|
max_grok_tool_summaries: 8,
|
|
1600
1600
|
max_recent_failures: 32,
|
|
1601
|
+
// Resolved claim failures one host heartbeat reports; a host that collects
|
|
1602
|
+
// more reports the oldest it dropped as a count.
|
|
1603
|
+
max_heartbeat_claim_failures: 32,
|
|
1601
1604
|
max_status_bindings: 512,
|
|
1602
1605
|
max_validation_error_codes: 128,
|
|
1603
1606
|
max_discarded_fields: 128,
|
|
@@ -21293,7 +21296,7 @@ var init_runtime_policy_generated2 = __esm({
|
|
|
21293
21296
|
});
|
|
21294
21297
|
|
|
21295
21298
|
// lib/external-inference-contract.ts
|
|
21296
|
-
var EXTERNAL_INFERENCE_CONTRACT_VERSION, EXTERNAL_INFERENCE_CONTROLLER_SCHEMA_VERSION, EXTERNAL_INFERENCE_CONTROLLER_SCHEMA_VERSION_V2, EXTERNAL_INFERENCE_ADVERTISEMENT_SCHEMA_VERSION, EXTERNAL_INFERENCE_ENVELOPE_SCHEMA_VERSION, EXTERNAL_INFERENCE_COMPRESSED_INPUT_ENVELOPE_SCHEMA_VERSION, EXTERNAL_INFERENCE_JOB_INPUT_SCHEMA_VERSION, LEGACY_EXTERNAL_INFERENCE_JOB_INPUT_SCHEMA_VERSION, EXTERNAL_INFERENCE_USAGE_SCHEMA_VERSION, EXTERNAL_INFERENCE_INPUT_HASH_DOMAIN, MAX_EXTERNAL_INFERENCE_STATUS_HOSTS, MAX_PROFILE_EXTERNAL_INFERENCE_FALLBACKS_PER_LANE, MAX_GENERATION, MAX_SAFE_INTEGER, MAX_PROMPT_BYTES, MAX_IMMUTABLE_JOB_INPUT_BYTES, MAX_CANDIDATE_PLAINTEXT_BYTES, MAX_CIPHERTEXT_CHARS, PROVIDER_RESET_MAX_MS, MAX_GROK_TOOL_SUMMARIES, STDERR_OBSERVATION_CAP_BYTES, MAX_TURN_DECISION_OPERATION_IDS, SHA256_K, rotateRight, sha256BytesHex, sha256Utf8Hex, computeImmutableJobInputSha256, identifierSchema, operationIdentifierSchema, sha256HexSchema, generationSchema, zeroBasedGenerationSchema, nonNegativeSafeIntegerSchema, positiveSafeIntegerSchema, sqlIntegerTokenCountSchema, timestampSchema, safeCodeSchema, processExitCodeSchema, externalInferenceAdapterIdSchema, reasoningEffortSchema, modelNameSchema, displayNameSchema, authenticatedAccountEmailSchema, protocolVersionSchema, base64UrlAlphabet, isCanonicalBase64Url, base64Url32BytesSchema, base64UrlNonceSchema, base64UrlCiphertextSchema, claimHandleSchema, boundedJsonTextSchema, boundedPromptTextSchema, laneSchema, botModeSchema, executionModeSchema, responseModeSchema, controlModeSchema, dispatchOutcomeSchema, responseOutcomeSchema, nativeModelControllerSchema, legacyExternalAgentModelControllerSchema, externalAgentModelControllerSchema, boundExternalAgentModelControllerSchema, externalAgentUnboundControllerSchema, externalAgentUnboundControllerV2Schema, orderedFallbackHostIdsSchema, externalInferenceFallbackHostIdsSchema, liveModelControllerSchema, snapshotModelControllerSchema, modelIdentityMappingSchema, advertisedModelSchema, hostAdvertisementSchema, envelopeAadSchema, validateEnvelopeAad, commonEnvelopeShape, sealedKeyWrapEnvelopeSchema, sealedInputEnvelopeSchema, sealedCandidateEnvelopeSchema, sealedEnvelopeSchema, screenerCandidateRuntimeBindingSchema, screenerClientLeaseBindingSchema, screenerRuntimeBindingSchema, serverRuntimeBindingSchema, clientRuntimeBindingSchema, runtimeBindingSchema, immutableJobInputSchema, canonicalizeJsonValue, serializeImmutableJobInput, reportedTokenUsageSchema, unavailableTokenUsageSchema, tokenUsageSchema, grokToolValidationDiagnosticSchema, grokResponseIdentityDiagnosticSchema, agentTurnReceiptSchema, agentConnectRequestSchema, agentNextRequestSchema, agentHeartbeatRequestSchema, emptyAgentNextResultSchema, claimedAgentNextResultSchema, agentNextResultSchema, agentCompleteRequestSchema, agentFailRequestSchema, requestedModelSelectionSchema, completedModelProvenanceSchema, attemptModelProvenanceSchema, providerWeeklyQuotaReadSchema, hostRuntimeRecoverySchema, hostHeartbeatRequestSchema, jobClaimRequestBaseShape, jobClaimRequestSchema, emptyJobClaimSchema, claimedJobSchema, claimedDispatchIntentSchema, batchedJobClaimSchema, timedBatchedJobClaimSchema, jobClaimResultSchema, attemptStartRequestSchema, jobHeartbeatRequestSchema, continueHeartbeatDirectiveSchema, cancelHeartbeatDirectiveSchema, jobHeartbeatResultSchema, adapterOutcomeEvidenceSchema, completionBaseShape, validateCompletion, providerResponseCompletionSchema, decisionCandidateCompletionSchema, jobCompleteRequestSchema, codexProcessExitDiagnosticsSchema, jobFailRequestSchema, jobCancelRequestSchema, jobCancellationReceiptSchema, jobDeliveryRequestSchema, deliveryBaseShape, validateDeliveryCandidate, providerResponseDeliverySchema, decisionCandidateDeliverySchema, jobDeliveryResultSchema, jobConsumptionRequestSchema, jobConsumptionReceiptSchema, jobStateSchema, jobStatusReadSchema, hostStatusReadSchema, controllerBindingStatusReadSchema, queueStatusReadSchema, outcomeStatusReadSchema, externalInferenceVolumeWindowReadSchema, externalInferenceFailureCountReadSchema, externalInferenceHostDiagnosticsReadSchema, externalInferenceProfileActivityReadSchema, externalInferenceStatusReadSchema, nativeResearchEvidenceSourceSchema, externalAgentResearchEvidenceSourceSchema, researchEvidenceSourceSchema, reportedResearchTokenUsageSchema, unavailableResearchTokenUsageSchema, researchTokenUsageSchema, externalInferenceProductLineageBaseShape, traderExternalInferenceProductLineageSchema, decisionChatExternalInferenceProductLineageSchema, screenerExternalInferenceProductLineageSchema, externalInferenceProductLineageSchema, normalProductLinkageSchema, evidenceMaterializationMarkerSchema, deliveredExternalAgentSourceIdentitySchema, deliveredRequestEvidenceSchema, researchEvidenceBaseShape, researchEvidenceBaseSchema, validateExactUtf8, validateResearchEvidence, providerResponseResearchEvidenceSchema, decisionCandidateResearchEvidenceSchema, researchEvidenceSchema;
|
|
21299
|
+
var EXTERNAL_INFERENCE_CONTRACT_VERSION, EXTERNAL_INFERENCE_CONTROLLER_SCHEMA_VERSION, EXTERNAL_INFERENCE_CONTROLLER_SCHEMA_VERSION_V2, EXTERNAL_INFERENCE_ADVERTISEMENT_SCHEMA_VERSION, EXTERNAL_INFERENCE_ENVELOPE_SCHEMA_VERSION, EXTERNAL_INFERENCE_COMPRESSED_INPUT_ENVELOPE_SCHEMA_VERSION, EXTERNAL_INFERENCE_JOB_INPUT_SCHEMA_VERSION, LEGACY_EXTERNAL_INFERENCE_JOB_INPUT_SCHEMA_VERSION, EXTERNAL_INFERENCE_USAGE_SCHEMA_VERSION, EXTERNAL_INFERENCE_INPUT_HASH_DOMAIN, MAX_EXTERNAL_INFERENCE_STATUS_HOSTS, MAX_PROFILE_EXTERNAL_INFERENCE_FALLBACKS_PER_LANE, MAX_GENERATION, MAX_SAFE_INTEGER, MAX_PROMPT_BYTES, MAX_IMMUTABLE_JOB_INPUT_BYTES, MAX_CANDIDATE_PLAINTEXT_BYTES, MAX_CIPHERTEXT_CHARS, PROVIDER_RESET_MAX_MS, MAX_GROK_TOOL_SUMMARIES, STDERR_OBSERVATION_CAP_BYTES, MAX_TURN_DECISION_OPERATION_IDS, SHA256_K, rotateRight, sha256BytesHex, sha256Utf8Hex, computeImmutableJobInputSha256, identifierSchema, operationIdentifierSchema, sha256HexSchema, generationSchema, zeroBasedGenerationSchema, nonNegativeSafeIntegerSchema, positiveSafeIntegerSchema, sqlIntegerTokenCountSchema, timestampSchema, safeCodeSchema, processExitCodeSchema, externalInferenceAdapterIdSchema, reasoningEffortSchema, modelNameSchema, displayNameSchema, authenticatedAccountEmailSchema, protocolVersionSchema, base64UrlAlphabet, isCanonicalBase64Url, base64Url32BytesSchema, base64UrlNonceSchema, base64UrlCiphertextSchema, claimHandleSchema, boundedJsonTextSchema, boundedPromptTextSchema, laneSchema, botModeSchema, executionModeSchema, responseModeSchema, controlModeSchema, dispatchOutcomeSchema, responseOutcomeSchema, nativeModelControllerSchema, legacyExternalAgentModelControllerSchema, externalAgentModelControllerSchema, boundExternalAgentModelControllerSchema, externalAgentUnboundControllerSchema, externalAgentUnboundControllerV2Schema, orderedFallbackHostIdsSchema, externalInferenceFallbackHostIdsSchema, liveModelControllerSchema, snapshotModelControllerSchema, modelIdentityMappingSchema, advertisedModelSchema, hostAdvertisementSchema, envelopeAadSchema, validateEnvelopeAad, commonEnvelopeShape, sealedKeyWrapEnvelopeSchema, sealedInputEnvelopeSchema, sealedCandidateEnvelopeSchema, sealedEnvelopeSchema, screenerCandidateRuntimeBindingSchema, screenerClientLeaseBindingSchema, screenerRuntimeBindingSchema, serverRuntimeBindingSchema, clientRuntimeBindingSchema, runtimeBindingSchema, immutableJobInputSchema, canonicalizeJsonValue, serializeImmutableJobInput, reportedTokenUsageSchema, unavailableTokenUsageSchema, tokenUsageSchema, grokToolValidationDiagnosticSchema, grokResponseIdentityDiagnosticSchema, agentTurnReceiptSchema, agentConnectRequestSchema, agentNextRequestSchema, agentHeartbeatRequestSchema, emptyAgentNextResultSchema, claimedAgentNextResultSchema, agentNextResultSchema, agentCompleteRequestSchema, agentFailRequestSchema, requestedModelSelectionSchema, completedModelProvenanceSchema, attemptModelProvenanceSchema, providerWeeklyQuotaReadSchema, hostRuntimeRecoverySchema, claimResolutionSchema, httpStatusCodeSchema, hostClaimTransportFailureSchema, hostClaimTransportFailureReportSchema, hostHeartbeatRequestSchema, jobClaimRequestBaseShape, jobClaimRequestSchema, emptyJobClaimSchema, claimedJobSchema, claimedDispatchIntentSchema, batchedJobClaimSchema, timedBatchedJobClaimSchema, jobClaimResultSchema, attemptStartRequestSchema, jobHeartbeatRequestSchema, continueHeartbeatDirectiveSchema, cancelHeartbeatDirectiveSchema, jobHeartbeatResultSchema, adapterOutcomeEvidenceSchema, completionBaseShape, validateCompletion, providerResponseCompletionSchema, decisionCandidateCompletionSchema, jobCompleteRequestSchema, codexProcessExitDiagnosticsSchema, jobFailRequestSchema, jobCancelRequestSchema, jobCancellationReceiptSchema, jobDeliveryRequestSchema, deliveryBaseShape, validateDeliveryCandidate, providerResponseDeliverySchema, decisionCandidateDeliverySchema, jobDeliveryResultSchema, jobConsumptionRequestSchema, jobConsumptionReceiptSchema, jobStateSchema, jobStatusReadSchema, hostStatusReadSchema, controllerBindingStatusReadSchema, queueStatusReadSchema, outcomeStatusReadSchema, externalInferenceVolumeWindowReadSchema, externalInferenceFailureCountReadSchema, externalInferenceClaimTransportFailureCountReadSchema, externalInferenceHostDiagnosticsReadSchema, externalInferenceProfileActivityReadSchema, externalInferenceStatusReadSchema, nativeResearchEvidenceSourceSchema, externalAgentResearchEvidenceSourceSchema, researchEvidenceSourceSchema, reportedResearchTokenUsageSchema, unavailableResearchTokenUsageSchema, researchTokenUsageSchema, externalInferenceProductLineageBaseShape, traderExternalInferenceProductLineageSchema, decisionChatExternalInferenceProductLineageSchema, screenerExternalInferenceProductLineageSchema, externalInferenceProductLineageSchema, normalProductLinkageSchema, evidenceMaterializationMarkerSchema, deliveredExternalAgentSourceIdentitySchema, deliveredRequestEvidenceSchema, researchEvidenceBaseShape, researchEvidenceBaseSchema, validateExactUtf8, validateResearchEvidence, providerResponseResearchEvidenceSchema, decisionCandidateResearchEvidenceSchema, researchEvidenceSchema;
|
|
21297
21300
|
var init_external_inference_contract = __esm({
|
|
21298
21301
|
"lib/external-inference-contract.ts"() {
|
|
21299
21302
|
"use strict";
|
|
@@ -22270,6 +22273,24 @@ var init_external_inference_contract = __esm({
|
|
|
22270
22273
|
pending_attempts: nonNegativeSafeIntegerSchema,
|
|
22271
22274
|
pending_claim: external_exports.boolean()
|
|
22272
22275
|
});
|
|
22276
|
+
claimResolutionSchema = external_exports.enum(["replayed", "retired", "drained"]);
|
|
22277
|
+
httpStatusCodeSchema = external_exports.number().int().min(HTTP_STATUS_MIN).max(HTTP_STATUS_MAX);
|
|
22278
|
+
hostClaimTransportFailureSchema = external_exports.strictObject({
|
|
22279
|
+
claim_request_id: operationIdentifierSchema,
|
|
22280
|
+
failed_at: timestampSchema,
|
|
22281
|
+
failure_code: safeCodeSchema,
|
|
22282
|
+
http_status_code: httpStatusCodeSchema.nullable(),
|
|
22283
|
+
response_body_bytes: nonNegativeSafeIntegerSchema.nullable(),
|
|
22284
|
+
body_cut: external_exports.boolean(),
|
|
22285
|
+
attempts: positiveSafeIntegerSchema,
|
|
22286
|
+
resolution: claimResolutionSchema,
|
|
22287
|
+
resolved_at: timestampSchema
|
|
22288
|
+
});
|
|
22289
|
+
hostClaimTransportFailureReportSchema = external_exports.strictObject({
|
|
22290
|
+
entries: external_exports.array(hostClaimTransportFailureSchema).min(1).max(EXTERNAL_INFERENCE_LIMITS.max_heartbeat_claim_failures),
|
|
22291
|
+
// Failed requests dropped, oldest first, because the host's buffer was full.
|
|
22292
|
+
dropped: nonNegativeSafeIntegerSchema
|
|
22293
|
+
});
|
|
22273
22294
|
hostHeartbeatRequestSchema = external_exports.strictObject({
|
|
22274
22295
|
schema_version: external_exports.literal("external_inference_host_heartbeat_v1"),
|
|
22275
22296
|
contract_version: external_exports.literal(EXTERNAL_INFERENCE_CONTRACT_VERSION),
|
|
@@ -22283,6 +22304,7 @@ var init_external_inference_contract = __esm({
|
|
|
22283
22304
|
available_slots: nonNegativeSafeIntegerSchema,
|
|
22284
22305
|
provider_weekly_quota: providerWeeklyQuotaReadSchema.nullable().optional(),
|
|
22285
22306
|
runtime_recovery: hostRuntimeRecoverySchema.optional(),
|
|
22307
|
+
claim_transport_failures: hostClaimTransportFailureReportSchema.optional(),
|
|
22286
22308
|
provider_quota_recovery: external_exports.strictObject({
|
|
22287
22309
|
source: external_exports.literal("codex_app_server"),
|
|
22288
22310
|
observed_at: timestampSchema
|
|
@@ -22863,6 +22885,15 @@ var init_external_inference_contract = __esm({
|
|
|
22863
22885
|
count: positiveSafeIntegerSchema,
|
|
22864
22886
|
last_observed_at: timestampSchema
|
|
22865
22887
|
});
|
|
22888
|
+
externalInferenceClaimTransportFailureCountReadSchema = external_exports.strictObject({
|
|
22889
|
+
failure_code: safeCodeSchema,
|
|
22890
|
+
http_status_code: httpStatusCodeSchema.nullable(),
|
|
22891
|
+
body_cut: external_exports.boolean(),
|
|
22892
|
+
resolution: claimResolutionSchema,
|
|
22893
|
+
count: positiveSafeIntegerSchema,
|
|
22894
|
+
attempts: positiveSafeIntegerSchema,
|
|
22895
|
+
last_failed_at: timestampSchema
|
|
22896
|
+
});
|
|
22866
22897
|
externalInferenceHostDiagnosticsReadSchema = external_exports.strictObject({
|
|
22867
22898
|
host_id: identifierSchema,
|
|
22868
22899
|
active_attempts: nonNegativeSafeIntegerSchema,
|
|
@@ -22872,7 +22903,8 @@ var init_external_inference_contract = __esm({
|
|
|
22872
22903
|
last_hour: externalInferenceVolumeWindowReadSchema,
|
|
22873
22904
|
last_day: externalInferenceVolumeWindowReadSchema,
|
|
22874
22905
|
last_week: externalInferenceVolumeWindowReadSchema,
|
|
22875
|
-
recent_failures: external_exports.array(externalInferenceFailureCountReadSchema).max(EXTERNAL_INFERENCE_LIMITS.max_recent_failures)
|
|
22906
|
+
recent_failures: external_exports.array(externalInferenceFailureCountReadSchema).max(EXTERNAL_INFERENCE_LIMITS.max_recent_failures),
|
|
22907
|
+
claim_transport_failures: external_exports.array(externalInferenceClaimTransportFailureCountReadSchema).max(EXTERNAL_INFERENCE_LIMITS.max_recent_failures)
|
|
22876
22908
|
});
|
|
22877
22909
|
externalInferenceProfileActivityReadSchema = external_exports.strictObject({
|
|
22878
22910
|
last_hour: externalInferenceVolumeWindowReadSchema,
|
|
@@ -25758,6 +25790,7 @@ var init_mcp_client = __esm({
|
|
|
25758
25790
|
#providerCreditsSupported = false;
|
|
25759
25791
|
#agentAnalysisDurationSupported = false;
|
|
25760
25792
|
#runtimeRecoveryDiagnosticsSupported = false;
|
|
25793
|
+
#claimTransportFailureReportsSupported = false;
|
|
25761
25794
|
#providerHttpStatusTools = /* @__PURE__ */ new Set();
|
|
25762
25795
|
#grokToolValidationTools = /* @__PURE__ */ new Set();
|
|
25763
25796
|
#grokResponseIdentityTools = /* @__PURE__ */ new Set();
|
|
@@ -25803,6 +25836,9 @@ var init_mcp_client = __esm({
|
|
|
25803
25836
|
supportsRuntimeRecoveryDiagnostics() {
|
|
25804
25837
|
return this.#runtimeRecoveryDiagnosticsSupported;
|
|
25805
25838
|
}
|
|
25839
|
+
supportsClaimTransportFailureReports() {
|
|
25840
|
+
return this.#claimTransportFailureReportsSupported;
|
|
25841
|
+
}
|
|
25806
25842
|
supportsAgentAnalysisDuration() {
|
|
25807
25843
|
return this.#agentAnalysisDurationSupported;
|
|
25808
25844
|
}
|
|
@@ -25876,6 +25912,10 @@ var init_mcp_client = __esm({
|
|
|
25876
25912
|
"inference.host.heartbeat",
|
|
25877
25913
|
["runtime_recovery"]
|
|
25878
25914
|
);
|
|
25915
|
+
this.#claimTransportFailureReportsSupported = advertisesFields(
|
|
25916
|
+
"inference.host.heartbeat",
|
|
25917
|
+
["claim_transport_failures"]
|
|
25918
|
+
);
|
|
25879
25919
|
this.#providerQuotaRecoverySupported = advertisesFields(
|
|
25880
25920
|
"inference.host.heartbeat",
|
|
25881
25921
|
["provider_quota_recovery"]
|
|
@@ -36351,6 +36391,24 @@ var init_runner = __esm({
|
|
|
36351
36391
|
let drainReason = "stopped";
|
|
36352
36392
|
let terminalRecoveryFailureCode = null;
|
|
36353
36393
|
let acknowledgedRecoveryDiagnostic = null;
|
|
36394
|
+
const claimFailures = [];
|
|
36395
|
+
let claimFailuresDropped = 0;
|
|
36396
|
+
const boundClaimFailures = () => {
|
|
36397
|
+
while (claimFailures.length > EXTERNAL_INFERENCE_LIMITS.max_heartbeat_claim_failures) {
|
|
36398
|
+
const resolved = claimFailures.findIndex((record5) => record5.resolution !== void 0);
|
|
36399
|
+
claimFailures.splice(resolved >= 0 ? resolved : 0, 1);
|
|
36400
|
+
claimFailuresDropped += 1;
|
|
36401
|
+
}
|
|
36402
|
+
};
|
|
36403
|
+
const resolveClaimFailures = (resolution, unresolved) => {
|
|
36404
|
+
for (const record5 of claimFailures) {
|
|
36405
|
+
if (record5.resolution === void 0 && unresolved(record5)) {
|
|
36406
|
+
record5.resolution = resolution;
|
|
36407
|
+
record5.resolved_at = isoAt(now());
|
|
36408
|
+
}
|
|
36409
|
+
}
|
|
36410
|
+
boundClaimFailures();
|
|
36411
|
+
};
|
|
36354
36412
|
let receipt;
|
|
36355
36413
|
let mcp;
|
|
36356
36414
|
const active = /* @__PURE__ */ new Map();
|
|
@@ -36955,7 +37013,14 @@ var init_runner = __esm({
|
|
|
36955
37013
|
pending_claim: Boolean(current.pending_claim_request)
|
|
36956
37014
|
};
|
|
36957
37015
|
const parsedDiagnostic = hostRuntimeRecoverySchema.safeParse(diagnostic);
|
|
37016
|
+
resolveClaimFailures("retired", (record5) => record5.claim_request_id !== current.pending_claim_request?.claim_request_id);
|
|
37017
|
+
if (status === "draining") resolveClaimFailures("drained", () => true);
|
|
37018
|
+
const claimFailureReport = hostClaimTransportFailureReportSchema.safeParse({
|
|
37019
|
+
entries: claimFailures.filter((record5) => record5.resolution !== void 0).slice(0, EXTERNAL_INFERENCE_LIMITS.max_heartbeat_claim_failures),
|
|
37020
|
+
dropped: claimFailuresDropped
|
|
37021
|
+
});
|
|
36958
37022
|
request = {
|
|
37023
|
+
...mcp.supportsClaimTransportFailureReports?.() === true && claimFailureReport.success ? { claim_transport_failures: claimFailureReport.data } : {},
|
|
36959
37024
|
...mcp.supportsRuntimeRecoveryDiagnostics?.() === true && parsedDiagnostic.success && JSON.stringify(parsedDiagnostic.data) !== acknowledgedRecoveryDiagnostic ? { runtime_recovery: parsedDiagnostic.data } : {},
|
|
36960
37025
|
schema_version: "external_inference_host_heartbeat_v1",
|
|
36961
37026
|
contract_version: EXTERNAL_INFERENCE_CONTRACT_VERSION,
|
|
@@ -37012,6 +37077,15 @@ var init_runner = __esm({
|
|
|
37012
37077
|
if (request.runtime_recovery) {
|
|
37013
37078
|
acknowledgedRecoveryDiagnostic = JSON.stringify(request.runtime_recovery);
|
|
37014
37079
|
}
|
|
37080
|
+
if (request.claim_transport_failures) {
|
|
37081
|
+
const reported = request.claim_transport_failures;
|
|
37082
|
+
for (const entry of reported.entries) {
|
|
37083
|
+
const index = claimFailures.findIndex((record5) => record5.claim_request_id === entry.claim_request_id && record5.failed_at === entry.failed_at);
|
|
37084
|
+
if (index >= 0) claimFailures.splice(index, 1);
|
|
37085
|
+
else claimFailuresDropped = Math.max(0, claimFailuresDropped - 1);
|
|
37086
|
+
}
|
|
37087
|
+
claimFailuresDropped = Math.max(0, claimFailuresDropped - reported.dropped);
|
|
37088
|
+
}
|
|
37015
37089
|
if (result.host.status === "revoked" || result.host.status === "offline" && !allowOfflineProjection) {
|
|
37016
37090
|
const error48 = new InferenceHostRunnerError(
|
|
37017
37091
|
result.host.status === "revoked" ? "host_revoked" : "host_offline",
|
|
@@ -37699,16 +37773,45 @@ var init_runner = __esm({
|
|
|
37699
37773
|
}
|
|
37700
37774
|
);
|
|
37701
37775
|
assertClaimResult(request, claim);
|
|
37776
|
+
resolveClaimFailures(
|
|
37777
|
+
"replayed",
|
|
37778
|
+
(record5) => record5.claim_request_id === request.claim_request_id
|
|
37779
|
+
);
|
|
37702
37780
|
} catch (error48) {
|
|
37781
|
+
const failureCode = safeFailureCode(
|
|
37782
|
+
error48 instanceof ExternalInferenceMcpError ? error48.code : "",
|
|
37783
|
+
"claim_failed"
|
|
37784
|
+
);
|
|
37785
|
+
const httpStatusCode = error48 instanceof ExternalInferenceMcpError ? error48.httpStatusCode : null;
|
|
37703
37786
|
if (claimTiming) emitDiagnostic("claim_request_failed", {
|
|
37704
37787
|
claim_request_id: request.claim_request_id,
|
|
37705
|
-
failure_code:
|
|
37706
|
-
|
|
37707
|
-
"claim_failed"
|
|
37708
|
-
),
|
|
37709
|
-
http_status_code: error48 instanceof ExternalInferenceMcpError ? error48.httpStatusCode : null,
|
|
37788
|
+
failure_code: failureCode,
|
|
37789
|
+
http_status_code: httpStatusCode,
|
|
37710
37790
|
client_timing: claimTiming
|
|
37711
37791
|
});
|
|
37792
|
+
if (!this.options.signal?.aborted) {
|
|
37793
|
+
const open4 = claimFailures.find((record5) => record5.resolution === void 0 && record5.claim_request_id === request.claim_request_id);
|
|
37794
|
+
const responseBodyBytes = claimTiming?.response_body_bytes ?? null;
|
|
37795
|
+
const bodyCut = failureCode === "network_error" && (responseBodyBytes ?? 0) > 0;
|
|
37796
|
+
if (open4) {
|
|
37797
|
+
open4.attempts = Math.min(Number.MAX_SAFE_INTEGER, open4.attempts + 1);
|
|
37798
|
+
if (bodyCut) open4.body_cut = true;
|
|
37799
|
+
if (responseBodyBytes !== null) {
|
|
37800
|
+
open4.response_body_bytes = Math.max(open4.response_body_bytes ?? 0, responseBodyBytes);
|
|
37801
|
+
}
|
|
37802
|
+
} else {
|
|
37803
|
+
claimFailures.push({
|
|
37804
|
+
claim_request_id: request.claim_request_id,
|
|
37805
|
+
failed_at: isoAt(claimCallStartedAtMs),
|
|
37806
|
+
failure_code: failureCode,
|
|
37807
|
+
http_status_code: httpStatusCode,
|
|
37808
|
+
response_body_bytes: responseBodyBytes,
|
|
37809
|
+
body_cut: bodyCut,
|
|
37810
|
+
attempts: 1
|
|
37811
|
+
});
|
|
37812
|
+
boundClaimFailures();
|
|
37813
|
+
}
|
|
37814
|
+
}
|
|
37712
37815
|
if (!this.options.signal?.aborted && request.schema_version === "external_inference_job_claim_v3" && error48 instanceof ExternalInferenceMcpError && error48.serverFailureCode === "schema_validation") {
|
|
37713
37816
|
batchClaimVersion = INFERENCE_JOB_CLAIM_SCHEMA_VERSION.V2;
|
|
37714
37817
|
await mutateReceipt((current) => ({
|