@vtxmacro/cli 2026.8.54 → 2026.8.55
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.js +66 -22
- package/package.json +1 -1
package/bin/vtx.js
CHANGED
|
@@ -47,7 +47,7 @@ var init_agent_cli_release = __esm({
|
|
|
47
47
|
"agent-cli-release.json"() {
|
|
48
48
|
agent_cli_release_default = {
|
|
49
49
|
package_name: "@vtxmacro/cli",
|
|
50
|
-
package_version: "2026.8.
|
|
50
|
+
package_version: "2026.8.55",
|
|
51
51
|
codex_package_name: "@openai/codex",
|
|
52
52
|
codex_version: "0.147.0",
|
|
53
53
|
copilot_sdk_package_name: "@github/copilot-sdk",
|
|
@@ -14442,7 +14442,7 @@ var init_zod = __esm({
|
|
|
14442
14442
|
});
|
|
14443
14443
|
|
|
14444
14444
|
// lib/external-inference-contract.ts
|
|
14445
|
-
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_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, 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, 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, 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;
|
|
14445
|
+
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_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, 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, 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;
|
|
14446
14446
|
var init_external_inference_contract = __esm({
|
|
14447
14447
|
"lib/external-inference-contract.ts"() {
|
|
14448
14448
|
"use strict";
|
|
@@ -14457,6 +14457,7 @@ var init_external_inference_contract = __esm({
|
|
|
14457
14457
|
EXTERNAL_INFERENCE_USAGE_SCHEMA_VERSION = "external_inference_usage_v1";
|
|
14458
14458
|
EXTERNAL_INFERENCE_INPUT_HASH_DOMAIN = "vtx.external-inference.input-sha256.v1\0";
|
|
14459
14459
|
MAX_EXTERNAL_INFERENCE_STATUS_HOSTS = 640;
|
|
14460
|
+
MAX_PROFILE_EXTERNAL_INFERENCE_FALLBACKS_PER_LANE = 127;
|
|
14460
14461
|
MAX_GENERATION = 2147483647;
|
|
14461
14462
|
MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER;
|
|
14462
14463
|
MAX_PROMPT_BYTES = 3e5;
|
|
@@ -14738,7 +14739,7 @@ var init_external_inference_contract = __esm({
|
|
|
14738
14739
|
control_mode_hint: controlModeSchema,
|
|
14739
14740
|
binding_state: external_exports.literal("rebind_required")
|
|
14740
14741
|
});
|
|
14741
|
-
orderedFallbackHostIdsSchema = external_exports.array(identifierSchema).max(
|
|
14742
|
+
orderedFallbackHostIdsSchema = external_exports.array(identifierSchema).max(MAX_PROFILE_EXTERNAL_INFERENCE_FALLBACKS_PER_LANE).refine(
|
|
14742
14743
|
(values) => new Set(values).size === values.length,
|
|
14743
14744
|
{ message: "fallback host IDs must be unique" }
|
|
14744
14745
|
);
|
|
@@ -15816,6 +15817,8 @@ var init_external_inference_contract = __esm({
|
|
|
15816
15817
|
authenticated_account_identity: safeCodeSchema.nullable().optional(),
|
|
15817
15818
|
authenticated_account_email: authenticatedAccountEmailSchema.nullable().optional(),
|
|
15818
15819
|
authenticated_account_plan: safeCodeSchema.nullable().optional(),
|
|
15820
|
+
account_identity_status: external_exports.enum(["reported", "not_reported"]).default("not_reported"),
|
|
15821
|
+
membership_identity_sha256: sha256HexSchema.nullable().optional(),
|
|
15819
15822
|
adapter: externalInferenceAdapterIdSchema,
|
|
15820
15823
|
status: external_exports.enum(["online", "degraded", "offline", "draining", "revoked"]),
|
|
15821
15824
|
host_generation: generationSchema,
|
|
@@ -15829,7 +15832,8 @@ var init_external_inference_contract = __esm({
|
|
|
15829
15832
|
lane: laneSchema,
|
|
15830
15833
|
controller: liveModelControllerSchema,
|
|
15831
15834
|
availability: external_exports.enum(["available", "host_offline", "model_unavailable", "rebind_required"]),
|
|
15832
|
-
reason_code: safeCodeSchema.nullable()
|
|
15835
|
+
reason_code: safeCodeSchema.nullable(),
|
|
15836
|
+
membership_host_ids: external_exports.array(identifierSchema).max(MAX_PROFILE_EXTERNAL_INFERENCE_FALLBACKS_PER_LANE + 1).default([])
|
|
15833
15837
|
});
|
|
15834
15838
|
queueStatusReadSchema = external_exports.strictObject({
|
|
15835
15839
|
queued: nonNegativeSafeIntegerSchema,
|
|
@@ -33467,6 +33471,7 @@ var init_runner = __esm({
|
|
|
33467
33471
|
}
|
|
33468
33472
|
throw lastError;
|
|
33469
33473
|
};
|
|
33474
|
+
let advertisementHandoff = null;
|
|
33470
33475
|
const publishAdvertisement = async (health, forceAdvance, retryRemote = true, allowDefinitiveReseed = true) => {
|
|
33471
33476
|
let advertisement = receipt.pending_advertisement;
|
|
33472
33477
|
if (!advertisement) {
|
|
@@ -33515,6 +33520,11 @@ var init_runner = __esm({
|
|
|
33515
33520
|
}
|
|
33516
33521
|
const tool = receipt.registered ? "inference.host.advertise" : "inference.host.register";
|
|
33517
33522
|
let result2;
|
|
33523
|
+
let releaseAdvertisementHandoff;
|
|
33524
|
+
const currentAdvertisementHandoff = new Promise((resolve6) => {
|
|
33525
|
+
releaseAdvertisementHandoff = resolve6;
|
|
33526
|
+
});
|
|
33527
|
+
advertisementHandoff = currentAdvertisementHandoff;
|
|
33518
33528
|
try {
|
|
33519
33529
|
const advertiseOperation = () => mcp.callTool(
|
|
33520
33530
|
tool,
|
|
@@ -33522,6 +33532,15 @@ var init_runner = __esm({
|
|
|
33522
33532
|
{ signal: this.options.signal }
|
|
33523
33533
|
);
|
|
33524
33534
|
result2 = retryRemote ? await retryExact(advertiseOperation, { signal: this.options.signal }) : await advertiseOperation();
|
|
33535
|
+
assertAdvertisementResult(advertisement, result2);
|
|
33536
|
+
await mutateReceipt((current) => ({
|
|
33537
|
+
...current,
|
|
33538
|
+
registered: true,
|
|
33539
|
+
advertisement_generation: result2.host.advertisement_generation,
|
|
33540
|
+
advertisement_expires_at: advertisement.expires_at,
|
|
33541
|
+
pending_advertisement: current.pending_advertisement?.operation_id === advertisement.operation_id ? null : current.pending_advertisement,
|
|
33542
|
+
updated_at: isoAt(now())
|
|
33543
|
+
}));
|
|
33525
33544
|
} catch (error48) {
|
|
33526
33545
|
const definitivelyNotApplied = error48 instanceof ExternalInferenceMcpError ? error48.definitivelyNotApplied : Boolean(error48 && typeof error48 === "object" && error48.definitivelyNotApplied === true);
|
|
33527
33546
|
const expectedGeneration = receipt.registered ? receipt.advertisement_generation + 1 : receipt.advertisement_generation;
|
|
@@ -33534,16 +33553,12 @@ var init_runner = __esm({
|
|
|
33534
33553
|
return await publishAdvertisement(health, forceAdvance, retryRemote, false);
|
|
33535
33554
|
}
|
|
33536
33555
|
throw error48;
|
|
33556
|
+
} finally {
|
|
33557
|
+
releaseAdvertisementHandoff();
|
|
33558
|
+
if (advertisementHandoff === currentAdvertisementHandoff) {
|
|
33559
|
+
advertisementHandoff = null;
|
|
33560
|
+
}
|
|
33537
33561
|
}
|
|
33538
|
-
assertAdvertisementResult(advertisement, result2);
|
|
33539
|
-
await mutateReceipt((current) => ({
|
|
33540
|
-
...current,
|
|
33541
|
-
registered: true,
|
|
33542
|
-
advertisement_generation: result2.host.advertisement_generation,
|
|
33543
|
-
advertisement_expires_at: advertisement.expires_at,
|
|
33544
|
-
pending_advertisement: current.pending_advertisement?.operation_id === advertisement.operation_id ? null : current.pending_advertisement,
|
|
33545
|
-
updated_at: isoAt(now())
|
|
33546
|
-
}));
|
|
33547
33562
|
};
|
|
33548
33563
|
const wasRegistered = receipt.registered;
|
|
33549
33564
|
await publishAdvertisement("healthy", wasRegistered);
|
|
@@ -33658,10 +33673,24 @@ var init_runner = __esm({
|
|
|
33658
33673
|
if (drainRequested || hostHeartbeatAbort.signal.aborted) return;
|
|
33659
33674
|
const heartbeatStartedAt = now();
|
|
33660
33675
|
observeHostHeartbeatGap(heartbeatStartedAt);
|
|
33676
|
+
const pendingAdvertisementHandoff = advertisementHandoff;
|
|
33677
|
+
if (pendingAdvertisementHandoff !== null) {
|
|
33678
|
+
try {
|
|
33679
|
+
await Promise.race([
|
|
33680
|
+
pendingAdvertisementHandoff,
|
|
33681
|
+
sleep4(settings.hostHeartbeatMs, hostHeartbeatAbort.signal)
|
|
33682
|
+
]);
|
|
33683
|
+
} catch (error48) {
|
|
33684
|
+
if (hostHeartbeatAbort.signal.aborted || drainRequested) return;
|
|
33685
|
+
throw error48;
|
|
33686
|
+
}
|
|
33687
|
+
}
|
|
33688
|
+
if (drainRequested || hostHeartbeatAbort.signal.aborted) return;
|
|
33689
|
+
const heartbeatAttemptedAt = now();
|
|
33661
33690
|
const attemptedAdvertisementGeneration = receipt.advertisement_generation;
|
|
33662
33691
|
try {
|
|
33663
33692
|
const expiresAt = receipt.advertisement_expires_at ? Date.parse(receipt.advertisement_expires_at) : 0;
|
|
33664
|
-
const refreshPendingAcrossExpiry = receipt.pending_advertisement !== null && expiresAt <=
|
|
33693
|
+
const refreshPendingAcrossExpiry = receipt.pending_advertisement !== null && expiresAt <= heartbeatAttemptedAt;
|
|
33665
33694
|
await hostHeartbeat(
|
|
33666
33695
|
"healthy",
|
|
33667
33696
|
{ signal: hostHeartbeatAbort.signal },
|
|
@@ -53931,11 +53960,11 @@ var init_error_surface_contract = __esm({
|
|
|
53931
53960
|
);
|
|
53932
53961
|
let message;
|
|
53933
53962
|
if (resolvedReason === "private_node_stale") {
|
|
53934
|
-
message = `\u26A0\uFE0F The ${orderLabel} was not sent: Hyperliquid
|
|
53963
|
+
message = `\u26A0\uFE0F The ${orderLabel} was not sent: VTX could not verify this profile's signing-key authorization because required Hyperliquid account data was stale. No order was submitted, and the signing key was not rejected. VTX will try again automatically if the trader is running; no action is required.`;
|
|
53935
53964
|
} else if (resolvedReason === "signer_validation_unavailable") {
|
|
53936
|
-
message = `\u26A0\uFE0F The ${orderLabel} was not sent:
|
|
53965
|
+
message = `\u26A0\uFE0F The ${orderLabel} was not sent: VTX could not verify this profile's signing-key authorization because required Hyperliquid account data was temporarily unavailable. No order was submitted, and the signing key was not rejected. VTX will try again automatically if the trader is running; no action is required.`;
|
|
53937
53966
|
} else if (resolvedReason === "wallet_not_authorized") {
|
|
53938
|
-
message = `\u26A0\uFE0F The ${orderLabel} was not sent: the signing key is not authorized for the configured wallet.`;
|
|
53967
|
+
message = `\u26A0\uFE0F The ${orderLabel} was not sent: Hyperliquid confirmed that the signing key is not authorized for the configured wallet. No order was submitted. Stop the trader, then reconnect the correct wallet and signing key in System.`;
|
|
53939
53968
|
} else if (resolvedReason === "credentials_missing") {
|
|
53940
53969
|
message = `\u26A0\uFE0F The ${orderLabel} was not sent: a wallet address and authorized signing key are required for trading.`;
|
|
53941
53970
|
} else if (resolvedReason === "local_safety_block") {
|
|
@@ -54856,13 +54885,28 @@ var init_hyperliquid_client = __esm({
|
|
|
54856
54885
|
throw new Error("Malformed Hyperliquid userRole response.");
|
|
54857
54886
|
}
|
|
54858
54887
|
const response = payload;
|
|
54859
|
-
const role =
|
|
54860
|
-
if (!role) {
|
|
54888
|
+
const role = response.role;
|
|
54889
|
+
if (typeof role !== "string" || !["missing", "user", "agent", "vault", "subAccount"].includes(role)) {
|
|
54890
|
+
throw new Error("Malformed Hyperliquid userRole response.");
|
|
54891
|
+
}
|
|
54892
|
+
const rawData = response.data;
|
|
54893
|
+
if (["missing", "user", "vault"].includes(role)) {
|
|
54894
|
+
if (rawData !== void 0 && rawData !== null) {
|
|
54895
|
+
throw new Error("Malformed Hyperliquid userRole response.");
|
|
54896
|
+
}
|
|
54897
|
+
return { role, data: null };
|
|
54898
|
+
}
|
|
54899
|
+
if (!rawData || typeof rawData !== "object" || Array.isArray(rawData)) {
|
|
54900
|
+
throw new Error("Malformed Hyperliquid userRole response.");
|
|
54901
|
+
}
|
|
54902
|
+
const data = rawData;
|
|
54903
|
+
const addressKey = role === "agent" ? "user" : "master";
|
|
54904
|
+
if (typeof data[addressKey] !== "string" || !/^0x[0-9a-f]{40}$/i.test(data[addressKey])) {
|
|
54861
54905
|
throw new Error("Malformed Hyperliquid userRole response.");
|
|
54862
54906
|
}
|
|
54863
54907
|
return {
|
|
54864
54908
|
role,
|
|
54865
|
-
data
|
|
54909
|
+
data
|
|
54866
54910
|
};
|
|
54867
54911
|
};
|
|
54868
54912
|
fetchBrowserAccountState2 = async (input) => {
|
|
@@ -55961,7 +56005,7 @@ var init_hyperliquid_signer_binding = __esm({
|
|
|
55961
56005
|
} catch (error48) {
|
|
55962
56006
|
if (input.signal?.aborted) throw error48;
|
|
55963
56007
|
throw new RuntimeExecutionError(
|
|
55964
|
-
"
|
|
56008
|
+
"VTX could not verify this profile's signing-key authorization because required Hyperliquid account data was temporarily unavailable. The signing key was not rejected. Try again later; reconnecting is not required.",
|
|
55965
56009
|
"signer_validation_unavailable"
|
|
55966
56010
|
);
|
|
55967
56011
|
}
|
|
@@ -55976,7 +56020,7 @@ var init_hyperliquid_signer_binding = __esm({
|
|
|
55976
56020
|
if (signerRole === "agent") {
|
|
55977
56021
|
const masterWallet = extractRoleAddress(
|
|
55978
56022
|
roleResponse.data,
|
|
55979
|
-
["user"
|
|
56023
|
+
["user"]
|
|
55980
56024
|
);
|
|
55981
56025
|
if (masterWallet === walletAddress) {
|
|
55982
56026
|
return {
|