@vtxmacro/cli 2026.8.32 → 2026.8.34
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/README.md +7 -0
- package/bin/vtx.js +115 -11
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -86,6 +86,13 @@ distinct. Use `service uninstall --instance <name>` to remove one worker;
|
|
|
86
86
|
unqualified `service uninstall` removes the whole supervisor. The legacy
|
|
87
87
|
unqualified host commands continue to target `default`.
|
|
88
88
|
|
|
89
|
+
For one VTX account and adapter, the selected host is tried first and other
|
|
90
|
+
compatible memberships follow in setup order. Quota/credits exhaustion,
|
|
91
|
+
unusable authentication, and exhausted recoverable provider failures can
|
|
92
|
+
advance the same logical call. VTX never changes provider, model, effort, or
|
|
93
|
+
response mode, and never cascades a bad request, policy rejection, or uncertain
|
|
94
|
+
dispatch outcome.
|
|
95
|
+
|
|
89
96
|
Automated hosts do not impose a subscription-specific profile-count or
|
|
90
97
|
concurrency limit by default. Set an explicit positive integer with
|
|
91
98
|
`--max-concurrency` when you want a local limit. Every active turn shares the live subscription
|
package/bin/vtx.js
CHANGED
|
@@ -38,7 +38,7 @@ var init_agent_cli_release = __esm({
|
|
|
38
38
|
"agent-cli-release.json"() {
|
|
39
39
|
agent_cli_release_default = {
|
|
40
40
|
package_name: "@vtxmacro/cli",
|
|
41
|
-
package_version: "2026.8.
|
|
41
|
+
package_version: "2026.8.34",
|
|
42
42
|
codex_package_name: "@openai/codex",
|
|
43
43
|
codex_version: "0.147.0",
|
|
44
44
|
platforms: {
|
|
@@ -14375,7 +14375,7 @@ var init_zod = __esm({
|
|
|
14375
14375
|
});
|
|
14376
14376
|
|
|
14377
14377
|
// lib/external-inference-contract.ts
|
|
14378
|
-
var EXTERNAL_INFERENCE_CONTRACT_VERSION, EXTERNAL_INFERENCE_CONTROLLER_SCHEMA_VERSION, EXTERNAL_INFERENCE_ADVERTISEMENT_SCHEMA_VERSION, EXTERNAL_INFERENCE_ENVELOPE_SCHEMA_VERSION, EXTERNAL_INFERENCE_JOB_INPUT_SCHEMA_VERSION, EXTERNAL_INFERENCE_USAGE_SCHEMA_VERSION, EXTERNAL_INFERENCE_INPUT_HASH_DOMAIN, MAX_EXTERNAL_INFERENCE_STATUS_HOSTS, MAX_GENERATION, MAX_SAFE_INTEGER, MAX_PROMPT_BYTES, MAX_IMMUTABLE_JOB_INPUT_BYTES, MAX_CANDIDATE_PLAINTEXT_BYTES, MAX_CIPHERTEXT_CHARS, SHA256_INITIAL_STATE, SHA256_ROUND_CONSTANTS, rotateRight, sha256BytesHex, sha256Utf8Hex, computeImmutableJobInputSha256, identifierSchema, operationIdentifierSchema, sha256HexSchema, generationSchema, zeroBasedGenerationSchema, nonNegativeSafeIntegerSchema, positiveSafeIntegerSchema, sqlIntegerTokenCountSchema, timestampSchema, safeCodeSchema, externalInferenceAdapterIdSchema, reasoningEffortSchema, modelNameSchema, displayNameSchema, authenticatedAccountEmailSchema, protocolVersionSchema, base64UrlAlphabet, isCanonicalBase64Url, base64Url32BytesSchema, base64UrlNonceSchema, base64UrlCiphertextSchema, claimHandleSchema, boundedJsonTextSchema, boundedPromptTextSchema, laneSchema, botModeSchema, executionModeSchema, responseModeSchema, dispatchOutcomeSchema, responseOutcomeSchema, nativeModelControllerSchema, externalAgentModelControllerSchema, externalAgentUnboundControllerSchema, liveModelControllerSchema, snapshotModelControllerSchema, modelIdentityMappingSchema, advertisedModelSchema, hostAdvertisementSchema, envelopeAadSchema, validateEnvelopeAad, commonEnvelopeShape, sealedKeyWrapEnvelopeSchema, sealedInputEnvelopeSchema, sealedCandidateEnvelopeSchema, sealedEnvelopeSchema, screenerCandidateRuntimeBindingSchema, screenerClientLeaseBindingSchema, screenerRuntimeBindingSchema, serverRuntimeBindingSchema, clientRuntimeBindingSchema, runtimeBindingSchema, immutableJobInputSchema, canonicalizeJsonValue, serializeImmutableJobInput, reportedTokenUsageSchema, unavailableTokenUsageSchema, tokenUsageSchema, agentConnectRequestSchema, agentNextRequestSchema, agentHeartbeatRequestSchema, emptyAgentNextResultSchema, claimedAgentNextResultSchema, agentNextResultSchema, agentCompleteRequestSchema, agentFailRequestSchema, requestedModelSelectionSchema, completedModelProvenanceSchema, attemptModelProvenanceSchema, providerWeeklyQuotaReadSchema, hostHeartbeatRequestSchema, jobClaimRequestSchema, emptyJobClaimSchema, claimedJobSchema, jobClaimResultSchema, attemptStartRequestSchema, jobHeartbeatRequestSchema, continueHeartbeatDirectiveSchema, cancelHeartbeatDirectiveSchema, jobHeartbeatResultSchema, adapterOutcomeEvidenceSchema, completionBaseShape, validateCompletion, providerResponseCompletionSchema, decisionCandidateCompletionSchema, jobCompleteRequestSchema, 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;
|
|
14378
|
+
var EXTERNAL_INFERENCE_CONTRACT_VERSION, EXTERNAL_INFERENCE_CONTROLLER_SCHEMA_VERSION, EXTERNAL_INFERENCE_ADVERTISEMENT_SCHEMA_VERSION, EXTERNAL_INFERENCE_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_GENERATION, MAX_SAFE_INTEGER, MAX_PROMPT_BYTES, MAX_IMMUTABLE_JOB_INPUT_BYTES, MAX_CANDIDATE_PLAINTEXT_BYTES, MAX_CIPHERTEXT_CHARS, SHA256_INITIAL_STATE, SHA256_ROUND_CONSTANTS, rotateRight, sha256BytesHex, sha256Utf8Hex, computeImmutableJobInputSha256, identifierSchema, operationIdentifierSchema, sha256HexSchema, generationSchema, zeroBasedGenerationSchema, nonNegativeSafeIntegerSchema, positiveSafeIntegerSchema, sqlIntegerTokenCountSchema, timestampSchema, safeCodeSchema, externalInferenceAdapterIdSchema, reasoningEffortSchema, modelNameSchema, displayNameSchema, authenticatedAccountEmailSchema, protocolVersionSchema, base64UrlAlphabet, isCanonicalBase64Url, base64Url32BytesSchema, base64UrlNonceSchema, base64UrlCiphertextSchema, claimHandleSchema, boundedJsonTextSchema, boundedPromptTextSchema, laneSchema, botModeSchema, executionModeSchema, responseModeSchema, dispatchOutcomeSchema, responseOutcomeSchema, nativeModelControllerSchema, externalAgentModelControllerSchema, externalAgentUnboundControllerSchema, liveModelControllerSchema, snapshotModelControllerSchema, modelIdentityMappingSchema, advertisedModelSchema, hostAdvertisementSchema, envelopeAadSchema, validateEnvelopeAad, commonEnvelopeShape, sealedKeyWrapEnvelopeSchema, sealedInputEnvelopeSchema, sealedCandidateEnvelopeSchema, sealedEnvelopeSchema, screenerCandidateRuntimeBindingSchema, screenerClientLeaseBindingSchema, screenerRuntimeBindingSchema, serverRuntimeBindingSchema, clientRuntimeBindingSchema, runtimeBindingSchema, immutableJobInputSchema, canonicalizeJsonValue, serializeImmutableJobInput, reportedTokenUsageSchema, unavailableTokenUsageSchema, tokenUsageSchema, agentConnectRequestSchema, agentNextRequestSchema, agentHeartbeatRequestSchema, emptyAgentNextResultSchema, claimedAgentNextResultSchema, agentNextResultSchema, agentCompleteRequestSchema, agentFailRequestSchema, requestedModelSelectionSchema, completedModelProvenanceSchema, attemptModelProvenanceSchema, providerWeeklyQuotaReadSchema, hostHeartbeatRequestSchema, jobClaimRequestSchema, emptyJobClaimSchema, claimedJobSchema, jobClaimResultSchema, attemptStartRequestSchema, jobHeartbeatRequestSchema, continueHeartbeatDirectiveSchema, cancelHeartbeatDirectiveSchema, jobHeartbeatResultSchema, adapterOutcomeEvidenceSchema, completionBaseShape, validateCompletion, providerResponseCompletionSchema, decisionCandidateCompletionSchema, jobCompleteRequestSchema, 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;
|
|
14379
14379
|
var init_external_inference_contract = __esm({
|
|
14380
14380
|
"lib/external-inference-contract.ts"() {
|
|
14381
14381
|
"use strict";
|
|
@@ -14384,7 +14384,8 @@ var init_external_inference_contract = __esm({
|
|
|
14384
14384
|
EXTERNAL_INFERENCE_CONTROLLER_SCHEMA_VERSION = "external_inference_controller_v1";
|
|
14385
14385
|
EXTERNAL_INFERENCE_ADVERTISEMENT_SCHEMA_VERSION = "external_inference_advertisement_v1";
|
|
14386
14386
|
EXTERNAL_INFERENCE_ENVELOPE_SCHEMA_VERSION = "external_inference_envelope_v1";
|
|
14387
|
-
EXTERNAL_INFERENCE_JOB_INPUT_SCHEMA_VERSION = "
|
|
14387
|
+
EXTERNAL_INFERENCE_JOB_INPUT_SCHEMA_VERSION = "external_inference_job_input_v2";
|
|
14388
|
+
LEGACY_EXTERNAL_INFERENCE_JOB_INPUT_SCHEMA_VERSION = "external_inference_job_input_v1";
|
|
14388
14389
|
EXTERNAL_INFERENCE_USAGE_SCHEMA_VERSION = "external_inference_usage_v1";
|
|
14389
14390
|
EXTERNAL_INFERENCE_INPUT_HASH_DOMAIN = "vtx.external-inference.input-sha256.v1\0";
|
|
14390
14391
|
MAX_EXTERNAL_INFERENCE_STATUS_HOSTS = 640;
|
|
@@ -14538,6 +14539,7 @@ var init_external_inference_contract = __esm({
|
|
|
14538
14539
|
["analysis_run_id", values.analysis_run_id],
|
|
14539
14540
|
["cycle_id", values.cycle_id],
|
|
14540
14541
|
["request_id", values.request_id],
|
|
14542
|
+
...values.use_case !== void 0 && values.role !== void 0 ? [["use_case", values.use_case], ["role", values.role]] : [],
|
|
14541
14543
|
["system_prompt", values.system_prompt],
|
|
14542
14544
|
["user_prompt", values.user_prompt],
|
|
14543
14545
|
["context_json", values.context_json],
|
|
@@ -14865,16 +14867,34 @@ var init_external_inference_contract = __esm({
|
|
|
14865
14867
|
});
|
|
14866
14868
|
runtimeBindingSchema = external_exports.discriminatedUnion("binding_kind", [
|
|
14867
14869
|
serverRuntimeBindingSchema,
|
|
14868
|
-
clientRuntimeBindingSchema
|
|
14870
|
+
clientRuntimeBindingSchema,
|
|
14871
|
+
external_exports.strictObject({
|
|
14872
|
+
binding_kind: external_exports.literal("historical_chat"),
|
|
14873
|
+
bot_mode: external_exports.literal("assistant"),
|
|
14874
|
+
confirmed_active: external_exports.literal(false),
|
|
14875
|
+
bot_run_id: identifierSchema,
|
|
14876
|
+
analysis_run_id: identifierSchema,
|
|
14877
|
+
cycle_id: identifierSchema,
|
|
14878
|
+
runtime_contract_generation: generationSchema,
|
|
14879
|
+
trade_decision_id: positiveSafeIntegerSchema,
|
|
14880
|
+
decision_chat_generation: nonNegativeSafeIntegerSchema,
|
|
14881
|
+
source_invocation_public_id: identifierSchema,
|
|
14882
|
+
source_attempt_public_id: identifierSchema
|
|
14883
|
+
})
|
|
14869
14884
|
]);
|
|
14870
14885
|
immutableJobInputSchema = external_exports.strictObject({
|
|
14871
|
-
schema_version: external_exports.
|
|
14886
|
+
schema_version: external_exports.union([
|
|
14887
|
+
external_exports.literal(LEGACY_EXTERNAL_INFERENCE_JOB_INPUT_SCHEMA_VERSION),
|
|
14888
|
+
external_exports.literal(EXTERNAL_INFERENCE_JOB_INPUT_SCHEMA_VERSION)
|
|
14889
|
+
]),
|
|
14872
14890
|
contract_version: external_exports.literal(EXTERNAL_INFERENCE_CONTRACT_VERSION),
|
|
14873
14891
|
job_id: identifierSchema,
|
|
14874
14892
|
owner_id: positiveSafeIntegerSchema,
|
|
14875
14893
|
profile_id: positiveSafeIntegerSchema,
|
|
14876
14894
|
stable_bot_id: identifierSchema,
|
|
14877
14895
|
request_id: identifierSchema,
|
|
14896
|
+
use_case: external_exports.enum(["trader", "decision_chat", "screener"]).optional(),
|
|
14897
|
+
role: external_exports.enum(["primary", "review", "chat", "candidate"]).optional(),
|
|
14878
14898
|
lane: laneSchema,
|
|
14879
14899
|
execution_mode: executionModeSchema,
|
|
14880
14900
|
host_id: identifierSchema,
|
|
@@ -14911,7 +14931,14 @@ var init_external_inference_contract = __esm({
|
|
|
14911
14931
|
deadline_at: timestampSchema,
|
|
14912
14932
|
evidence_expires_at: timestampSchema
|
|
14913
14933
|
}).superRefine((value, context) => {
|
|
14914
|
-
if (value.
|
|
14934
|
+
if (value.schema_version === EXTERNAL_INFERENCE_JOB_INPUT_SCHEMA_VERSION) {
|
|
14935
|
+
if (value.use_case === void 0 || value.role === void 0) {
|
|
14936
|
+
context.addIssue({ code: "custom", message: "v2 job input requires immutable use_case and role" });
|
|
14937
|
+
}
|
|
14938
|
+
} else if (value.use_case !== void 0 || value.role !== void 0) {
|
|
14939
|
+
context.addIssue({ code: "custom", message: "v1 job input cannot contain v2 product identity" });
|
|
14940
|
+
}
|
|
14941
|
+
if (value.runtime_binding.binding_kind !== value.execution_mode && !(value.runtime_binding.binding_kind === "historical_chat" && value.execution_mode === "server" && value.use_case === "decision_chat")) {
|
|
14915
14942
|
context.addIssue({ code: "custom", message: "runtime binding must match execution_mode", path: ["runtime_binding", "binding_kind"] });
|
|
14916
14943
|
}
|
|
14917
14944
|
if (value.lane === "screener" && value.runtime_binding.bot_mode !== "trader") {
|
|
@@ -14953,6 +14980,8 @@ var init_external_inference_contract = __esm({
|
|
|
14953
14980
|
analysis_run_id: value.runtime_binding.analysis_run_id,
|
|
14954
14981
|
cycle_id: value.runtime_binding.cycle_id,
|
|
14955
14982
|
request_id: value.request_id,
|
|
14983
|
+
use_case: value.schema_version === EXTERNAL_INFERENCE_JOB_INPUT_SCHEMA_VERSION ? value.use_case : void 0,
|
|
14984
|
+
role: value.schema_version === EXTERNAL_INFERENCE_JOB_INPUT_SCHEMA_VERSION ? value.role : void 0,
|
|
14956
14985
|
system_prompt: value.system_prompt,
|
|
14957
14986
|
user_prompt: value.user_prompt,
|
|
14958
14987
|
context_json: value.context_json,
|
|
@@ -15414,6 +15443,13 @@ var init_external_inference_contract = __esm({
|
|
|
15414
15443
|
failure_category: safeCodeSchema,
|
|
15415
15444
|
failure_code: safeCodeSchema,
|
|
15416
15445
|
retryable: external_exports.boolean(),
|
|
15446
|
+
membership_disposition: external_exports.enum([
|
|
15447
|
+
"retry_same_host",
|
|
15448
|
+
"cascade_cooldown",
|
|
15449
|
+
"cascade_disable",
|
|
15450
|
+
"fail_request",
|
|
15451
|
+
"quarantine_ambiguous"
|
|
15452
|
+
]).optional(),
|
|
15417
15453
|
failed_at: timestampSchema
|
|
15418
15454
|
}).superRefine((value, context) => {
|
|
15419
15455
|
if (value.outcome.response_outcome !== "none") {
|
|
@@ -15423,6 +15459,9 @@ var init_external_inference_contract = __esm({
|
|
|
15423
15459
|
if (value.attempt_status !== expectedStatus) {
|
|
15424
15460
|
context.addIssue({ code: "custom", message: "attempt_status must match dispatch outcome", path: ["attempt_status"] });
|
|
15425
15461
|
}
|
|
15462
|
+
if (value.outcome.dispatch_outcome === "outcome_unknown" && value.membership_disposition !== void 0 && value.membership_disposition !== "quarantine_ambiguous") {
|
|
15463
|
+
context.addIssue({ code: "custom", message: "outcome-unknown failures must be quarantined", path: ["membership_disposition"] });
|
|
15464
|
+
}
|
|
15426
15465
|
if (value.outcome.dispatch_outcome === "not_dispatched") {
|
|
15427
15466
|
if (value.model.effective_model !== null || value.model.effective_reasoning_effort !== null) {
|
|
15428
15467
|
context.addIssue({ code: "custom", message: "not-dispatched failures cannot report effective model provenance", path: ["model"] });
|
|
@@ -19394,6 +19433,14 @@ var init_codex_app_server = __esm({
|
|
|
19394
19433
|
const details = objectOrNull(structured[variant]);
|
|
19395
19434
|
const rawStatus = details?.httpStatusCode;
|
|
19396
19435
|
const httpStatusCode = Number.isSafeInteger(rawStatus) && Number(rawStatus) >= 100 && Number(rawStatus) <= 599 ? Number(rawStatus) : null;
|
|
19436
|
+
if (httpStatusCode === 401) {
|
|
19437
|
+
return {
|
|
19438
|
+
code: "auth_expired",
|
|
19439
|
+
category: "auth",
|
|
19440
|
+
retryable: false,
|
|
19441
|
+
httpStatusCode
|
|
19442
|
+
};
|
|
19443
|
+
}
|
|
19397
19444
|
if (httpStatusCode === 429) {
|
|
19398
19445
|
return {
|
|
19399
19446
|
code: "codex_rate_limited",
|
|
@@ -19402,10 +19449,43 @@ var init_codex_app_server = __esm({
|
|
|
19402
19449
|
httpStatusCode
|
|
19403
19450
|
};
|
|
19404
19451
|
}
|
|
19452
|
+
if (httpStatusCode !== null && httpStatusCode >= 400 && httpStatusCode < 500 && httpStatusCode !== 408 && httpStatusCode !== 425) {
|
|
19453
|
+
const semanticText = JSON.stringify(details || {}).toLowerCase();
|
|
19454
|
+
if (httpStatusCode === 402 || /(quota|credit|spend|payment|subscription.*limit)/u.test(semanticText)) {
|
|
19455
|
+
return {
|
|
19456
|
+
code: "quota_exceeded",
|
|
19457
|
+
category: "model",
|
|
19458
|
+
retryable: false,
|
|
19459
|
+
httpStatusCode
|
|
19460
|
+
};
|
|
19461
|
+
}
|
|
19462
|
+
if (httpStatusCode === 403 && /(auth|account|workspace|billing|entitlement)/u.test(semanticText)) {
|
|
19463
|
+
return {
|
|
19464
|
+
code: "auth_expired",
|
|
19465
|
+
category: "auth",
|
|
19466
|
+
retryable: false,
|
|
19467
|
+
httpStatusCode
|
|
19468
|
+
};
|
|
19469
|
+
}
|
|
19470
|
+
if (httpStatusCode === 403 && /(policy|safety|cyber)/u.test(semanticText)) {
|
|
19471
|
+
return {
|
|
19472
|
+
code: "codex_policy_rejected",
|
|
19473
|
+
category: "adapter",
|
|
19474
|
+
retryable: false,
|
|
19475
|
+
httpStatusCode
|
|
19476
|
+
};
|
|
19477
|
+
}
|
|
19478
|
+
return {
|
|
19479
|
+
code: httpStatusCode === 400 ? "codex_bad_request" : "codex_http_client_error",
|
|
19480
|
+
category: "adapter",
|
|
19481
|
+
retryable: false,
|
|
19482
|
+
httpStatusCode
|
|
19483
|
+
};
|
|
19484
|
+
}
|
|
19405
19485
|
return {
|
|
19406
19486
|
code,
|
|
19407
19487
|
category: "adapter",
|
|
19408
|
-
retryable: httpStatusCode === null ?
|
|
19488
|
+
retryable: httpStatusCode === null ? true : httpStatusCode === 408 || httpStatusCode === 425 || httpStatusCode >= 500,
|
|
19409
19489
|
httpStatusCode
|
|
19410
19490
|
};
|
|
19411
19491
|
}
|
|
@@ -20453,7 +20533,7 @@ child.once('close', async () => {
|
|
|
20453
20533
|
category: error48.category,
|
|
20454
20534
|
code: error48.code,
|
|
20455
20535
|
retryable: error48.retryable,
|
|
20456
|
-
dispatchOutcome: requestWritten ?
|
|
20536
|
+
dispatchOutcome: requestWritten ? "outcome_unknown" : "not_dispatched",
|
|
20457
20537
|
cause: error48
|
|
20458
20538
|
}));
|
|
20459
20539
|
});
|
|
@@ -20656,7 +20736,7 @@ child.once('close', async () => {
|
|
|
20656
20736
|
category: error48.category,
|
|
20657
20737
|
code: error48.code,
|
|
20658
20738
|
retryable: error48.retryable,
|
|
20659
|
-
dispatchOutcome:
|
|
20739
|
+
dispatchOutcome: "outcome_unknown",
|
|
20660
20740
|
cause: error48
|
|
20661
20741
|
});
|
|
20662
20742
|
}
|
|
@@ -22433,7 +22513,7 @@ var init_crypto = __esm({
|
|
|
22433
22513
|
decryptExternalInferenceJobInput = (jobKey, input, expectedIdentity) => {
|
|
22434
22514
|
const envelope = sealedInputEnvelopeSchema.parse(input);
|
|
22435
22515
|
assertIdentity(envelope.aad, expectedIdentity);
|
|
22436
|
-
if (envelope.aad.direction !== "input" || envelope.aad.payload_schema_version !== EXTERNAL_INFERENCE_JOB_INPUT_SCHEMA_VERSION || envelope.aad.attempt_id !== null) {
|
|
22516
|
+
if (envelope.aad.direction !== "input" || envelope.aad.payload_schema_version !== EXTERNAL_INFERENCE_JOB_INPUT_SCHEMA_VERSION && envelope.aad.payload_schema_version !== LEGACY_EXTERNAL_INFERENCE_JOB_INPUT_SCHEMA_VERSION || envelope.aad.attempt_id !== null) {
|
|
22437
22517
|
throw new ExternalInferenceEnvelopeError(
|
|
22438
22518
|
"identity_mismatch",
|
|
22439
22519
|
"External inference input envelope context is invalid."
|
|
@@ -22457,6 +22537,12 @@ var init_crypto = __esm({
|
|
|
22457
22537
|
);
|
|
22458
22538
|
}
|
|
22459
22539
|
const job = immutableJobInputSchema.parse(rawJob);
|
|
22540
|
+
if (envelope.aad.payload_schema_version !== job.schema_version) {
|
|
22541
|
+
throw new ExternalInferenceEnvelopeError(
|
|
22542
|
+
"identity_mismatch",
|
|
22543
|
+
"External inference input schema identity is inconsistent."
|
|
22544
|
+
);
|
|
22545
|
+
}
|
|
22460
22546
|
if (!Buffer.from(serializeImmutableJobInput(job)).equals(plaintext)) {
|
|
22461
22547
|
throw new ExternalInferenceEnvelopeError(
|
|
22462
22548
|
"invalid_job_input",
|
|
@@ -28821,7 +28907,7 @@ function createDefaultInferenceHostRunnerDependencies(options) {
|
|
|
28821
28907
|
envelopePublicKey: options.envelopePublicKey
|
|
28822
28908
|
};
|
|
28823
28909
|
}
|
|
28824
|
-
var import_ajv, RUNTIME_RECEIPT_SCHEMA_VERSION, ATTEMPT_RECEIPT_SCHEMA_VERSION, DEFAULT_ADVERTISEMENT_TTL_MS, DEFAULT_ADVERTISEMENT_REFRESH_LEAD_MS, DEFAULT_HOST_HEARTBEAT_MS, DEFAULT_PROVIDER_RATE_LIMIT_REFRESH_MS, DEFAULT_ATTEMPT_HEARTBEAT_MS, DEFAULT_DRAIN_TIMEOUT_MS, DEFAULT_REMOTE_RETRY_LIMIT, MIN_SLEEP_MS, DEFAULT_CODEX_ACCOUNT_COOLDOWN_MS, MIN_CLAIM_START_WINDOW_MS, UNBOUNDED_AVAILABLE_SLOTS, buildCodexInferenceAdvertisedModels, FileInferenceHostRuntimeReceiptStore, InferenceHostRecoveryRequiredError, InferenceHostRunnerError, defaultSleep, abortError, defaultRegisterSignalHandlers, safeInteger, exactObjectKeys, validIso, validateAttemptReceipt, validateRuntimeReceipt, sha256, stableOperationId, buildAttemptStartRequest, isoAt, providerWeeklyQuotaFromRateLimits, finitePositiveOption, validateRunnerOptions, assertLocalCredentialIdentity, retryableRemoteError, remoteRetryAfterMs, controlPlaneFatal, defaultValidateOutput, objectRecord, positiveUtf8ByteLimit, assertCompilableOutputSchema, parseOutputContract, safeFailureCode, exactJson2, runnerIdentityMismatch, assertAdvertisementResult, assertHostHeartbeatResult, assertClaimResult, assertStartResult, assertJobHeartbeatResult, assertTerminalResult, classifyFailure, ambiguousHeartbeatTransport, reportedTokenUsage, reportedUsage, InferenceHostRunner;
|
|
28910
|
+
var import_ajv, RUNTIME_RECEIPT_SCHEMA_VERSION, ATTEMPT_RECEIPT_SCHEMA_VERSION, DEFAULT_ADVERTISEMENT_TTL_MS, DEFAULT_ADVERTISEMENT_REFRESH_LEAD_MS, DEFAULT_HOST_HEARTBEAT_MS, DEFAULT_PROVIDER_RATE_LIMIT_REFRESH_MS, DEFAULT_ATTEMPT_HEARTBEAT_MS, DEFAULT_DRAIN_TIMEOUT_MS, DEFAULT_REMOTE_RETRY_LIMIT, MIN_SLEEP_MS, DEFAULT_CODEX_ACCOUNT_COOLDOWN_MS, MIN_CLAIM_START_WINDOW_MS, UNBOUNDED_AVAILABLE_SLOTS, buildCodexInferenceAdvertisedModels, FileInferenceHostRuntimeReceiptStore, InferenceHostRecoveryRequiredError, InferenceHostRunnerError, defaultSleep, abortError, defaultRegisterSignalHandlers, safeInteger, exactObjectKeys, validIso, validateAttemptReceipt, validateRuntimeReceipt, sha256, stableOperationId, buildAttemptStartRequest, isoAt, providerWeeklyQuotaFromRateLimits, finitePositiveOption, validateRunnerOptions, assertLocalCredentialIdentity, retryableRemoteError, remoteRetryAfterMs, controlPlaneFatal, defaultValidateOutput, objectRecord, positiveUtf8ByteLimit, assertCompilableOutputSchema, parseOutputContract, membershipFailureDisposition, safeFailureCode, exactJson2, runnerIdentityMismatch, assertAdvertisementResult, assertHostHeartbeatResult, assertClaimResult, assertStartResult, assertJobHeartbeatResult, assertTerminalResult, classifyFailure, ambiguousHeartbeatTransport, reportedTokenUsage, reportedUsage, InferenceHostRunner;
|
|
28825
28911
|
var init_runner = __esm({
|
|
28826
28912
|
"lib/inference-host/runner.ts"() {
|
|
28827
28913
|
"use strict";
|
|
@@ -29323,6 +29409,20 @@ var init_runner = __esm({
|
|
|
29323
29409
|
providerReasoningSummarySupported
|
|
29324
29410
|
};
|
|
29325
29411
|
};
|
|
29412
|
+
membershipFailureDisposition = (failure) => {
|
|
29413
|
+
if (failure.dispatchOutcome === "outcome_unknown") return "quarantine_ambiguous";
|
|
29414
|
+
if (failure.category === "auth" || ["auth_expired", "managed_chatgpt_auth_required", "invalid_account_metadata"].includes(failure.code)) return "cascade_disable";
|
|
29415
|
+
if (failure.category === "quota" || ["quota_exceeded", "codex_rate_limited"].includes(failure.code)) return "cascade_cooldown";
|
|
29416
|
+
if (failure.retryable && (["adapter", "network", "transport"].includes(failure.category) || failure.code === "rpc_timeout")) return "retry_same_host";
|
|
29417
|
+
if (["model_unavailable", "reasoning_effort_unavailable"].includes(failure.code)) return "cascade_cooldown";
|
|
29418
|
+
if ([
|
|
29419
|
+
"codex_http_connection_failed",
|
|
29420
|
+
"codex_response_stream_connection_failed",
|
|
29421
|
+
"codex_response_stream_disconnected",
|
|
29422
|
+
"codex_provider_retry_exhausted"
|
|
29423
|
+
].includes(failure.code)) return "cascade_cooldown";
|
|
29424
|
+
return "fail_request";
|
|
29425
|
+
};
|
|
29326
29426
|
safeFailureCode = (value, fallback) => {
|
|
29327
29427
|
const normalized = value.trim().toLowerCase().replace(/[^a-z0-9._-]+/gu, "_").slice(0, 96);
|
|
29328
29428
|
return /^[a-z0-9]/u.test(normalized) ? normalized : fallback;
|
|
@@ -30561,6 +30661,10 @@ var init_runner = __esm({
|
|
|
30561
30661
|
failure_category: failure.category,
|
|
30562
30662
|
failure_code: failure.code,
|
|
30563
30663
|
retryable: failure.retryable,
|
|
30664
|
+
membership_disposition: membershipFailureDisposition({
|
|
30665
|
+
...failure,
|
|
30666
|
+
dispatchOutcome
|
|
30667
|
+
}),
|
|
30564
30668
|
failed_at: isoAt(now())
|
|
30565
30669
|
});
|
|
30566
30670
|
await updateAttempt({
|