@vtxmacro/cli 2026.9.32 → 2026.9.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/bin/vtx-service-bootstrap.js +1 -1
- package/bin/vtx.js +109 -20
- package/package.json +1 -1
|
@@ -16,7 +16,7 @@ import { fileURLToPath } from "node:url";
|
|
|
16
16
|
// agent-cli-release.json
|
|
17
17
|
var agent_cli_release_default = {
|
|
18
18
|
package_name: "@vtxmacro/cli",
|
|
19
|
-
package_version: "2026.9.
|
|
19
|
+
package_version: "2026.9.34",
|
|
20
20
|
codex_package_name: "@openai/codex",
|
|
21
21
|
codex_version: "0.153.3",
|
|
22
22
|
copilot_sdk_package_name: "@github/copilot-sdk",
|
package/bin/vtx.js
CHANGED
|
@@ -77,7 +77,7 @@ var init_agent_cli_release = __esm({
|
|
|
77
77
|
"agent-cli-release.json"() {
|
|
78
78
|
agent_cli_release_default = {
|
|
79
79
|
package_name: "@vtxmacro/cli",
|
|
80
|
-
package_version: "2026.9.
|
|
80
|
+
package_version: "2026.9.34",
|
|
81
81
|
codex_package_name: "@openai/codex",
|
|
82
82
|
codex_version: "0.153.3",
|
|
83
83
|
copilot_sdk_package_name: "@github/copilot-sdk",
|
|
@@ -14722,7 +14722,7 @@ var init_zod = __esm({
|
|
|
14722
14722
|
});
|
|
14723
14723
|
|
|
14724
14724
|
// lib/external-inference-contract.ts
|
|
14725
|
-
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, SHA256_INITIAL_STATE, SHA256_ROUND_CONSTANTS, 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, agentTurnReceiptSchema, agentConnectRequestSchema, agentNextRequestSchema, agentHeartbeatRequestSchema, emptyAgentNextResultSchema, claimedAgentNextResultSchema, agentNextResultSchema, agentCompleteRequestSchema, agentFailRequestSchema, requestedModelSelectionSchema, completedModelProvenanceSchema, attemptModelProvenanceSchema, providerWeeklyQuotaReadSchema, 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;
|
|
14725
|
+
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, SHA256_INITIAL_STATE, SHA256_ROUND_CONSTANTS, 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, 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;
|
|
14726
14726
|
var init_external_inference_contract = __esm({
|
|
14727
14727
|
"lib/external-inference-contract.ts"() {
|
|
14728
14728
|
"use strict";
|
|
@@ -15516,10 +15516,25 @@ var init_external_inference_contract = __esm({
|
|
|
15516
15516
|
(value) => value.prior_dispatch || value.completed_response_count === 0,
|
|
15517
15517
|
{ message: "Completed responses require prior dispatch." }
|
|
15518
15518
|
);
|
|
15519
|
+
grokResponseIdentityDiagnosticSchema = external_exports.strictObject({
|
|
15520
|
+
schema_version: external_exports.literal("external_inference_grok_response_identity_v1"),
|
|
15521
|
+
reason: external_exports.enum(["invalid_id", "model_mismatch", "changed_id"]),
|
|
15522
|
+
route: external_exports.enum(["/responses", "/chat/completions"]),
|
|
15523
|
+
response_event: external_exports.enum(["response.created", "response.in_progress", "response.completed", "chat.completion.chunk", "other"]),
|
|
15524
|
+
id_present: external_exports.boolean(),
|
|
15525
|
+
id_matches_previous: external_exports.boolean().nullable(),
|
|
15526
|
+
model_present: external_exports.boolean(),
|
|
15527
|
+
model_matches_requested: external_exports.boolean(),
|
|
15528
|
+
model_sha256: sha256HexSchema.nullable()
|
|
15529
|
+
}).refine(
|
|
15530
|
+
(value) => value.model_present === (value.model_sha256 !== null) && (!value.model_matches_requested || value.model_present) && (value.id_matches_previous !== true || value.id_present) && (value.reason === "invalid_id" ? !value.id_present : value.reason === "model_mismatch" ? value.id_present && !value.model_matches_requested : value.id_present && value.model_matches_requested && value.id_matches_previous === false),
|
|
15531
|
+
{ message: "Grok response identity observations must match their rejection reason." }
|
|
15532
|
+
);
|
|
15519
15533
|
agentTurnReceiptSchema = external_exports.strictObject({
|
|
15520
15534
|
terminal_status: external_exports.enum(["completed", "failed"]),
|
|
15521
15535
|
failure_code: safeCodeSchema.nullable(),
|
|
15522
15536
|
grok_tool_validation: grokToolValidationDiagnosticSchema.optional(),
|
|
15537
|
+
grok_response_identity: grokResponseIdentityDiagnosticSchema.optional(),
|
|
15523
15538
|
dispatch_outcome: external_exports.enum(["not_dispatched", "outcome_unknown"]).optional(),
|
|
15524
15539
|
turn_id: external_exports.string().uuid(),
|
|
15525
15540
|
agent_run_id: identifierSchema,
|
|
@@ -15537,8 +15552,11 @@ var init_external_inference_contract = __esm({
|
|
|
15537
15552
|
{ message: "Agent decision operation IDs must be unique." }
|
|
15538
15553
|
)
|
|
15539
15554
|
}).refine(
|
|
15540
|
-
(value) => value.grok_tool_validation === void 0 ? value.dispatch_outcome === void 0 : value.terminal_status === "failed" && value.failure_code === `grok_tool_isolation_${value.grok_tool_validation.reason}` && value.dispatch_outcome === (value.grok_tool_validation.prior_dispatch ? "outcome_unknown" : "not_dispatched") && value.effective_model === null && value.effective_reasoning_effort === null && value.adapter_request_id === null && value.adapter_response_id === null && value.usage.availability === "unavailable",
|
|
15555
|
+
(value) => value.grok_tool_validation === void 0 ? value.grok_response_identity !== void 0 || value.dispatch_outcome === void 0 : value.grok_response_identity === void 0 && value.terminal_status === "failed" && value.failure_code === `grok_tool_isolation_${value.grok_tool_validation.reason}` && value.dispatch_outcome === (value.grok_tool_validation.prior_dispatch ? "outcome_unknown" : "not_dispatched") && value.effective_model === null && value.effective_reasoning_effort === null && value.adapter_request_id === null && value.adapter_response_id === null && value.usage.availability === "unavailable",
|
|
15541
15556
|
{ message: "Grok diagnostics must match the failed Agent turn and dispatch outcome." }
|
|
15557
|
+
).refine(
|
|
15558
|
+
(value) => value.grok_response_identity === void 0 || value.terminal_status === "failed" && value.failure_code === "grok_provider_identity_mismatch" && value.dispatch_outcome === "outcome_unknown" && value.grok_tool_validation === void 0 && value.effective_model === null && value.effective_reasoning_effort === null && value.adapter_request_id === null && value.adapter_response_id === null && value.usage.availability === "unavailable",
|
|
15559
|
+
{ message: "Grok response identity diagnostics require an unaccepted dispatched Agent turn." }
|
|
15542
15560
|
).refine(
|
|
15543
15561
|
(value) => value.terminal_status === "failed" ? value.failure_code !== null : value.failure_code === null && value.effective_model !== null && value.effective_reasoning_effort !== null && value.adapter_response_id !== null,
|
|
15544
15562
|
{ message: "Agent terminal evidence is incomplete." }
|
|
@@ -16038,6 +16056,7 @@ var init_external_inference_contract = __esm({
|
|
|
16038
16056
|
provider_dispatch_freshness_remaining_ms: nonNegativeSafeIntegerSchema.nullable().optional(),
|
|
16039
16057
|
process_exit: codexProcessExitDiagnosticsSchema.nullable().optional(),
|
|
16040
16058
|
grok_tool_validation: grokToolValidationDiagnosticSchema.optional(),
|
|
16059
|
+
grok_response_identity: grokResponseIdentityDiagnosticSchema.optional(),
|
|
16041
16060
|
membership_disposition: external_exports.enum([
|
|
16042
16061
|
"retry_same_host",
|
|
16043
16062
|
"cascade_cooldown",
|
|
@@ -16047,6 +16066,9 @@ var init_external_inference_contract = __esm({
|
|
|
16047
16066
|
]).optional(),
|
|
16048
16067
|
failed_at: timestampSchema
|
|
16049
16068
|
}).superRefine((value, context) => {
|
|
16069
|
+
if (value.grok_response_identity !== void 0 && (value.failure_code !== "grok_provider_identity_mismatch" || value.outcome.dispatch_outcome !== "outcome_unknown" || value.grok_tool_validation !== void 0)) {
|
|
16070
|
+
context.addIssue({ code: "custom", message: "Grok response identity diagnostics require an unaccepted dispatched attempt.", path: ["grok_response_identity"] });
|
|
16071
|
+
}
|
|
16050
16072
|
if (value.grok_tool_validation !== void 0 && (value.failure_code !== `grok_tool_isolation_${value.grok_tool_validation.reason}` || value.outcome.dispatch_outcome !== (value.grok_tool_validation.prior_dispatch ? "outcome_unknown" : "not_dispatched"))) {
|
|
16051
16073
|
context.addIssue({ code: "custom", message: "Grok diagnostics must match the failure and dispatch outcome.", path: ["grok_tool_validation"] });
|
|
16052
16074
|
}
|
|
@@ -19976,6 +19998,7 @@ var init_mcp_client = __esm({
|
|
|
19976
19998
|
#initialized = false;
|
|
19977
19999
|
#providerQuotaRecoverySupported = false;
|
|
19978
20000
|
#grokToolValidationTools = /* @__PURE__ */ new Set();
|
|
20001
|
+
#grokResponseIdentityTools = /* @__PURE__ */ new Set();
|
|
19979
20002
|
supportsGrokToolValidationDiagnostics(tool) {
|
|
19980
20003
|
return this.#grokToolValidationTools.has(tool);
|
|
19981
20004
|
}
|
|
@@ -19988,6 +20011,18 @@ var init_mcp_client = __esm({
|
|
|
19988
20011
|
}
|
|
19989
20012
|
return this.supportsGrokToolValidationDiagnostics(tool);
|
|
19990
20013
|
}
|
|
20014
|
+
supportsGrokResponseIdentityDiagnostics(tool) {
|
|
20015
|
+
return this.#grokResponseIdentityTools.has(tool);
|
|
20016
|
+
}
|
|
20017
|
+
async refreshGrokResponseIdentitySupport(tool, options = {}) {
|
|
20018
|
+
if (this.supportsGrokResponseIdentityDiagnostics(tool)) return true;
|
|
20019
|
+
try {
|
|
20020
|
+
await this.initialize(options);
|
|
20021
|
+
} catch {
|
|
20022
|
+
return false;
|
|
20023
|
+
}
|
|
20024
|
+
return this.supportsGrokResponseIdentityDiagnostics(tool);
|
|
20025
|
+
}
|
|
19991
20026
|
supportsProviderQuotaRecovery() {
|
|
19992
20027
|
return this.#providerQuotaRecoverySupported;
|
|
19993
20028
|
}
|
|
@@ -20052,20 +20087,27 @@ var init_mcp_client = __esm({
|
|
|
20052
20087
|
const heartbeatSchema = listed.tools.find(
|
|
20053
20088
|
(tool) => tool.name === "inference.agent.assignment.heartbeat"
|
|
20054
20089
|
)?.inputSchema;
|
|
20055
|
-
const advertisesDiagnosticReceipt = (value, depth = 0) => {
|
|
20090
|
+
const advertisesDiagnosticReceipt = (value, field, depth = 0) => {
|
|
20056
20091
|
if (depth > 4 || !value || typeof value !== "object" || Array.isArray(value)) return false;
|
|
20057
20092
|
const node = value;
|
|
20058
20093
|
const properties = node.properties;
|
|
20059
|
-
if (properties && typeof properties === "object" && Object.hasOwn(properties,
|
|
20094
|
+
if (properties && typeof properties === "object" && Object.hasOwn(properties, field) && Object.hasOwn(properties, "dispatch_outcome")) return true;
|
|
20060
20095
|
if (typeof node.$ref === "string" && /^#\/\$defs\/[^/]+$/u.test(node.$ref)) {
|
|
20061
20096
|
const definition = node.$ref.slice("#/$defs/".length).replace(/~1/gu, "/").replace(/~0/gu, "~");
|
|
20062
|
-
return advertisesDiagnosticReceipt(heartbeatSchema?.$defs?.[definition], depth + 1);
|
|
20097
|
+
return advertisesDiagnosticReceipt(heartbeatSchema?.$defs?.[definition], field, depth + 1);
|
|
20063
20098
|
}
|
|
20064
|
-
return Array.isArray(node.anyOf) && node.anyOf.some((branch) => advertisesDiagnosticReceipt(branch, depth + 1));
|
|
20099
|
+
return Array.isArray(node.anyOf) && node.anyOf.some((branch) => advertisesDiagnosticReceipt(branch, field, depth + 1));
|
|
20065
20100
|
};
|
|
20066
|
-
if (advertisesDiagnosticReceipt(heartbeatSchema?.properties?.turn_receipt)) {
|
|
20101
|
+
if (advertisesDiagnosticReceipt(heartbeatSchema?.properties?.turn_receipt, "grok_tool_validation")) {
|
|
20067
20102
|
this.#grokToolValidationTools.add("inference.agent.assignment.heartbeat");
|
|
20068
20103
|
}
|
|
20104
|
+
this.#grokResponseIdentityTools.clear();
|
|
20105
|
+
if (advertisesFields("inference.job.fail", ["grok_response_identity"])) {
|
|
20106
|
+
this.#grokResponseIdentityTools.add("inference.job.fail");
|
|
20107
|
+
}
|
|
20108
|
+
if (advertisesDiagnosticReceipt(heartbeatSchema?.properties?.turn_receipt, "grok_response_identity")) {
|
|
20109
|
+
this.#grokResponseIdentityTools.add("inference.agent.assignment.heartbeat");
|
|
20110
|
+
}
|
|
20069
20111
|
this.#initialized = true;
|
|
20070
20112
|
}
|
|
20071
20113
|
async callTool(name, argumentsValue, options = {}) {
|
|
@@ -21666,6 +21708,7 @@ var init_codex_app_server = __esm({
|
|
|
21666
21708
|
this.rateLimits = options.rateLimits ?? null;
|
|
21667
21709
|
this.processExit = options.processExit ?? null;
|
|
21668
21710
|
this.grokToolValidation = options.grokToolValidation ?? null;
|
|
21711
|
+
this.grokResponseIdentity = options.grokResponseIdentity ?? null;
|
|
21669
21712
|
}
|
|
21670
21713
|
};
|
|
21671
21714
|
objectOrNull = (value) => value !== null && typeof value === "object" && !Array.isArray(value) ? value : null;
|
|
@@ -34523,6 +34566,7 @@ var init_grok_transport_proxy = __esm({
|
|
|
34523
34566
|
this.rejectionStatus = null;
|
|
34524
34567
|
this.terminalFailure = null;
|
|
34525
34568
|
this.toolValidationFailure = null;
|
|
34569
|
+
this.responseIdentityFailure = null;
|
|
34526
34570
|
const upstream = new URL(options.upstreamBaseUrl);
|
|
34527
34571
|
if (upstream.protocol !== "https:" || upstream.username || upstream.password || upstream.search || upstream.hash || !options.requestedModel || typeof options.expectedSystemPrompt !== "string" || !Number.isSafeInteger(options.deadlineAtMs) || options.providerDispatchNotAfterMs !== void 0 && !Number.isSafeInteger(options.providerDispatchNotAfterMs) || !Number.isSafeInteger(options.maxRequestBytes) || options.maxRequestBytes < 1 || !Number.isSafeInteger(options.maxResponseBytes) || options.maxResponseBytes < 1 || new Set(options.allowedToolNames).size !== options.allowedToolNames.length || options.allowedToolNames.some((name) => !name)) throw new Error("grok_proxy_invalid_configuration");
|
|
34528
34572
|
}
|
|
@@ -34794,7 +34838,28 @@ var init_grok_transport_proxy = __esm({
|
|
|
34794
34838
|
const event = record3(JSON.parse(data4));
|
|
34795
34839
|
const native = route === "/responses" ? record3(event.response) : event;
|
|
34796
34840
|
if (native.id !== void 0 || native.model !== void 0) {
|
|
34797
|
-
if (typeof native.id !== "string" || !native.id || native.model !== this.options.requestedModel || id2 && native.id !== id2)
|
|
34841
|
+
if (typeof native.id !== "string" || !native.id || native.model !== this.options.requestedModel || id2 && native.id !== id2) {
|
|
34842
|
+
const idPresent = typeof native.id === "string" && native.id.length > 0;
|
|
34843
|
+
const modelPresent = typeof native.model === "string" && native.model.length > 0;
|
|
34844
|
+
const modelMatches = native.model === this.options.requestedModel;
|
|
34845
|
+
const eventType = route === "/responses" ? event.type : event.object;
|
|
34846
|
+
this.responseIdentityFailure = grokResponseIdentityDiagnosticSchema.parse({
|
|
34847
|
+
schema_version: "external_inference_grok_response_identity_v1",
|
|
34848
|
+
reason: !idPresent ? "invalid_id" : !modelMatches ? "model_mismatch" : "changed_id",
|
|
34849
|
+
route,
|
|
34850
|
+
response_event: ["response.created", "response.in_progress", "response.completed", "chat.completion.chunk"].includes(String(eventType)) ? eventType : "other",
|
|
34851
|
+
id_present: idPresent,
|
|
34852
|
+
id_matches_previous: id2 ? native.id === id2 : null,
|
|
34853
|
+
model_present: modelPresent,
|
|
34854
|
+
model_matches_requested: modelMatches,
|
|
34855
|
+
model_sha256: modelPresent ? createHash6("sha256").update(native.model).digest("hex") : null
|
|
34856
|
+
});
|
|
34857
|
+
try {
|
|
34858
|
+
this.options.onResponseIdentityFailure?.(this.responseIdentityFailure);
|
|
34859
|
+
} catch {
|
|
34860
|
+
}
|
|
34861
|
+
throw new Error("grok_provider_identity_mismatch");
|
|
34862
|
+
}
|
|
34798
34863
|
id2 = native.id;
|
|
34799
34864
|
model = String(native.model);
|
|
34800
34865
|
}
|
|
@@ -34960,7 +35025,11 @@ var init_grok_runtime = __esm({
|
|
|
34960
35025
|
'preferred_method = "oidc"',
|
|
34961
35026
|
"[cli]",
|
|
34962
35027
|
"auto_update = false",
|
|
35028
|
+
// Model-catalog backend search is independent of the ACP tool profile.
|
|
35029
|
+
// Pin it off before request construction: Provider has no tools and Agent
|
|
35030
|
+
// may use only the assignment-scoped VTX tools.
|
|
34963
35031
|
"[features]",
|
|
35032
|
+
"backend_tools = false",
|
|
34964
35033
|
"telemetry = false",
|
|
34965
35034
|
"turn_summary = false",
|
|
34966
35035
|
"title_refresh = false",
|
|
@@ -35657,6 +35726,12 @@ var init_grok_adapter = __esm({
|
|
|
35657
35726
|
onProviderDispatch: provider?.onProviderDispatch,
|
|
35658
35727
|
signal: input.signal,
|
|
35659
35728
|
fetchImpl: this.options.fetchImpl,
|
|
35729
|
+
onResponseIdentityFailure: (diagnostic) => this.options.emitDiagnosticEvent?.({
|
|
35730
|
+
event: "grok_response_identity_failed",
|
|
35731
|
+
attempt_id: provider?.attemptId ?? null,
|
|
35732
|
+
control_mode: provider ? "provider" : "agent",
|
|
35733
|
+
...diagnostic
|
|
35734
|
+
}),
|
|
35660
35735
|
onToolValidationFailure: (diagnostic) => this.options.emitDiagnosticEvent?.({
|
|
35661
35736
|
event: "grok_tool_validation_failed",
|
|
35662
35737
|
attempt_id: provider?.attemptId ?? null,
|
|
@@ -35781,7 +35856,8 @@ var init_grok_adapter = __esm({
|
|
|
35781
35856
|
httpStatusCode: proxy?.rejectionStatus,
|
|
35782
35857
|
retryable: false,
|
|
35783
35858
|
dispatchOutcome: outcome,
|
|
35784
|
-
grokToolValidation: proxy?.toolValidationFailure ?? null
|
|
35859
|
+
grokToolValidation: proxy?.toolValidationFailure ?? null,
|
|
35860
|
+
grokResponseIdentity: proxy?.responseIdentityFailure ?? null
|
|
35785
35861
|
});
|
|
35786
35862
|
} finally {
|
|
35787
35863
|
try {
|
|
@@ -37283,8 +37359,8 @@ var init_runner = __esm({
|
|
|
37283
37359
|
init_mcp_client();
|
|
37284
37360
|
init_config();
|
|
37285
37361
|
init_oauth();
|
|
37286
|
-
terminalFailureRequiresManualRecovery = (error48) => (error48.terminalEvidence !== null || error48.grokToolValidation != null) && !error48.retryable && error48.category !== "auth" && !["quota_exceeded", "codex_rate_limited", "provider_rate_limited"].includes(error48.code);
|
|
37287
|
-
canReplayFencedAgentTerminal = (state, fence) => state?.schema_version === "vtx_inference_agent_runtime_v3" && state.adapter_id === fence.adapter_id && state.host_id === fence.host_id && state.assignment.assignment_id === fence.assignment_id && state.pending_turn?.terminal_receipt?.terminal_status === "failed" && state.pending_turn.terminal_receipt.failure_code === fence.failure_code && (fence.dispatch_outcome !== "outcome_unknown" || state.pending_turn.terminal_receipt.grok_tool_validation?.prior_dispatch === true && state.pending_turn.terminal_receipt.dispatch_outcome === "outcome_unknown");
|
|
37362
|
+
terminalFailureRequiresManualRecovery = (error48) => (error48.terminalEvidence !== null || error48.grokToolValidation != null || error48.grokResponseIdentity != null) && !error48.retryable && error48.category !== "auth" && !["quota_exceeded", "codex_rate_limited", "provider_rate_limited"].includes(error48.code);
|
|
37363
|
+
canReplayFencedAgentTerminal = (state, fence) => state?.schema_version === "vtx_inference_agent_runtime_v3" && state.adapter_id === fence.adapter_id && state.host_id === fence.host_id && state.assignment.assignment_id === fence.assignment_id && state.pending_turn?.terminal_receipt?.terminal_status === "failed" && state.pending_turn.terminal_receipt.failure_code === fence.failure_code && (fence.dispatch_outcome !== "outcome_unknown" || (state.pending_turn.terminal_receipt.grok_tool_validation?.prior_dispatch === true || state.pending_turn.terminal_receipt.grok_response_identity != null) && state.pending_turn.terminal_receipt.dispatch_outcome === "outcome_unknown");
|
|
37288
37364
|
RUNTIME_RECEIPT_SCHEMA_VERSION = "vtx_inference_host_runtime_v1";
|
|
37289
37365
|
ATTEMPT_RECEIPT_SCHEMA_VERSION = "vtx_inference_attempt_receipt_v1";
|
|
37290
37366
|
CLAIM_DISPATCH_BATCH_SIZE = 16;
|
|
@@ -40461,6 +40537,11 @@ var init_runner = __esm({
|
|
|
40461
40537
|
signal,
|
|
40462
40538
|
deadlineAtMs: Date.parse(jobInput.evidence_expires_at)
|
|
40463
40539
|
}) === true);
|
|
40540
|
+
const identityDiagnostic = heartbeatFailure === void 0 && effectiveError instanceof CodexAppServerError && failure2.code === "grok_provider_identity_mismatch" && dispatchOutcome === "outcome_unknown" ? effectiveError.grokResponseIdentity ?? null : null;
|
|
40541
|
+
const sendIdentityDiagnostic = identityDiagnostic !== null && (mcp.supportsGrokResponseIdentityDiagnostics?.("inference.job.fail") === true || await mcp.refreshGrokResponseIdentitySupport?.("inference.job.fail", {
|
|
40542
|
+
signal,
|
|
40543
|
+
deadlineAtMs: Date.parse(jobInput.evidence_expires_at)
|
|
40544
|
+
}) === true);
|
|
40464
40545
|
const failureRequest = jobFailRequestSchema.parse({
|
|
40465
40546
|
schema_version: "external_inference_job_fail_v1",
|
|
40466
40547
|
contract_version: EXTERNAL_INFERENCE_CONTRACT_VERSION,
|
|
@@ -40502,6 +40583,7 @@ var init_runner = __esm({
|
|
|
40502
40583
|
provider_dispatch_freshness_remaining_ms: providerDispatchFreshnessRemainingMs,
|
|
40503
40584
|
...processExit ? { process_exit: processExit } : {},
|
|
40504
40585
|
...sendGrokDiagnostic ? { grok_tool_validation: grokDiagnostic } : {},
|
|
40586
|
+
...sendIdentityDiagnostic ? { grok_response_identity: identityDiagnostic } : {},
|
|
40505
40587
|
membership_disposition: membershipFailureDisposition({
|
|
40506
40588
|
...failure2,
|
|
40507
40589
|
dispatchOutcome
|
|
@@ -40573,6 +40655,7 @@ var init_runner = __esm({
|
|
|
40573
40655
|
}
|
|
40574
40656
|
};
|
|
40575
40657
|
createInferenceAgentControlClient = (mcp) => ({
|
|
40658
|
+
supportsGrokResponseIdentityDiagnostics: async (options = {}) => mcp.supportsGrokResponseIdentityDiagnostics?.("inference.agent.assignment.heartbeat") === true || await mcp.refreshGrokResponseIdentitySupport?.("inference.agent.assignment.heartbeat", options) === true,
|
|
40576
40659
|
supportsGrokToolValidationDiagnostics: async (options = {}) => mcp.supportsGrokToolValidationDiagnostics?.("inference.agent.assignment.heartbeat") === true || await mcp.refreshGrokToolValidationSupport?.("inference.agent.assignment.heartbeat", options) === true,
|
|
40577
40660
|
nextAssignment: async (request, options) => {
|
|
40578
40661
|
const result2 = await mcp.callTool("inference.agent.assignment.next", {
|
|
@@ -41120,11 +41203,13 @@ var init_runner = __esm({
|
|
|
41120
41203
|
return nextWakeAtMs;
|
|
41121
41204
|
} catch (error48) {
|
|
41122
41205
|
const diagnostic = error48 instanceof CodexAppServerError && error48.grokToolValidation && error48.code === `grok_tool_isolation_${error48.grokToolValidation.reason}` && error48.dispatchOutcome === (error48.grokToolValidation.prior_dispatch ? "outcome_unknown" : "not_dispatched") && await this.options.controlClient.supportsGrokToolValidationDiagnostics?.({}) === true ? error48.grokToolValidation : null;
|
|
41123
|
-
|
|
41206
|
+
const identityDiagnostic = error48 instanceof CodexAppServerError && error48.grokResponseIdentity && error48.code === "grok_provider_identity_mismatch" && error48.dispatchOutcome === "outcome_unknown" && await this.options.controlClient.supportsGrokResponseIdentityDiagnostics?.({}) === true ? error48.grokResponseIdentity : null;
|
|
41207
|
+
const hasDiagnostic = diagnostic != null || identityDiagnostic != null;
|
|
41208
|
+
if (error48 instanceof CodexAppServerError && error48.dispatchOutcome === "not_dispatched" && error48.terminalEvidence === null && !hasDiagnostic) {
|
|
41124
41209
|
state = { ...state, pending_turn: null, updated_at: nowIso() };
|
|
41125
41210
|
await writeInferenceAgentRuntimeState(this.options.statePath, state);
|
|
41126
41211
|
}
|
|
41127
|
-
if (state.pending_turn && !state.pending_turn.terminal_receipt && error48 instanceof CodexAppServerError && (
|
|
41212
|
+
if (state.pending_turn && !state.pending_turn.terminal_receipt && error48 instanceof CodexAppServerError && (hasDiagnostic || error48.terminalEvidence !== null || error48.dispatchOutcome === "confirmed_dispatched" && ["provider_rate_limited", "codex_rate_limited", "quota_exceeded"].includes(error48.code))) {
|
|
41128
41213
|
state = { ...state, pending_turn: {
|
|
41129
41214
|
...state.pending_turn,
|
|
41130
41215
|
terminal_receipt: {
|
|
@@ -41133,19 +41218,23 @@ var init_runner = __esm({
|
|
|
41133
41218
|
turn_id: state.pending_turn.turn_id,
|
|
41134
41219
|
agent_run_id: state.thread?.threadId ?? state.pending_turn.turn_id,
|
|
41135
41220
|
requested_model: assignment.model_id,
|
|
41136
|
-
effective_model:
|
|
41221
|
+
effective_model: hasDiagnostic ? null : error48.terminalEvidence?.effectiveModel ?? null,
|
|
41137
41222
|
requested_reasoning_effort: assignment.reasoning_effort,
|
|
41138
|
-
effective_reasoning_effort:
|
|
41223
|
+
effective_reasoning_effort: hasDiagnostic ? null : error48.terminalEvidence?.effectiveReasoningEffort ?? null,
|
|
41139
41224
|
started_at: state.pending_turn.started_at,
|
|
41140
41225
|
completed_at: nowIso(),
|
|
41141
|
-
adapter_request_id:
|
|
41142
|
-
adapter_response_id:
|
|
41143
|
-
usage: !
|
|
41226
|
+
adapter_request_id: hasDiagnostic ? null : error48.terminalEvidence?.adapterRequestId ?? null,
|
|
41227
|
+
adapter_response_id: hasDiagnostic ? null : error48.terminalEvidence?.adapterResponseId ?? null,
|
|
41228
|
+
usage: !hasDiagnostic && error48.usage ? reportedTokenUsage(error48.usage, this.options.adapterId) : {
|
|
41144
41229
|
schema_version: EXTERNAL_INFERENCE_USAGE_SCHEMA_VERSION,
|
|
41145
41230
|
availability: "unavailable",
|
|
41146
41231
|
reason_code: "terminal_usage_unavailable"
|
|
41147
41232
|
},
|
|
41148
41233
|
decision_operation_ids: [...state.pending_turn.decision_operation_ids],
|
|
41234
|
+
...identityDiagnostic ? {
|
|
41235
|
+
grok_response_identity: identityDiagnostic,
|
|
41236
|
+
dispatch_outcome: "outcome_unknown"
|
|
41237
|
+
} : {},
|
|
41149
41238
|
...diagnostic ? {
|
|
41150
41239
|
grok_tool_validation: diagnostic,
|
|
41151
41240
|
dispatch_outcome: error48.dispatchOutcome === "not_dispatched" ? "not_dispatched" : "outcome_unknown"
|
|
@@ -44611,7 +44700,7 @@ Waiting for approval...
|
|
|
44611
44700
|
process.stdout.write(text);
|
|
44612
44701
|
}))(`${JSON.stringify(event)}
|
|
44613
44702
|
`) : adapterId === "codex" || adapterId === "grok-build" ? (event) => {
|
|
44614
|
-
if (!["codex_app_server_closed", "codex_app_server_session_started", "grok_tool_validation_failed"].includes(
|
|
44703
|
+
if (!["codex_app_server_closed", "codex_app_server_session_started", "grok_tool_validation_failed", "grok_response_identity_failed"].includes(
|
|
44615
44704
|
String(event.event ?? "")
|
|
44616
44705
|
)) return;
|
|
44617
44706
|
(dependencies.emitStderr ?? ((text) => {
|