@vtxmacro/cli 2026.8.38 → 2026.8.39

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.
Files changed (3) hide show
  1. package/README.md +10 -10
  2. package/bin/vtx.js +43 -6
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -58,10 +58,10 @@ exposed. Before starting a Trader, confirm that the VTX AI page shows the
58
58
  intended authenticated ChatGPT email and plan. The host reads the live Codex
59
59
  account window: a reached limit pauses new dispatch until its reported reset,
60
60
  while a transient throttle uses a short bounded cooldown.
61
- The selected AI model row shows the open VTX profile's rolling 1-hour, 24-hour,
62
- and 7-day request and reported-token activity for that subscription path.
63
- Account-wide quota percentages remain in safe host diagnostics instead of the
64
- profile-scoped selector.
61
+ The selected AI model row estimates the open VTX profile's attributable
62
+ membership burn rate for that subscription, expressed as equivalent percentage
63
+ points per hour, day, and seven days. Account-wide quota percentages remain in
64
+ safe host diagnostics instead of the profile-scoped selector.
65
65
 
66
66
  ```bash
67
67
  vtx inference-host login
@@ -86,12 +86,12 @@ 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.
89
+ For each VTX profile and lane, **Subscription #1** is tried first and later
90
+ compatible subscriptions follow in the saved Account cascade order.
91
+ Quota/credits exhaustion, unusable authentication, and exhausted recoverable
92
+ provider failures can advance the same logical call. VTX never changes
93
+ provider, model, effort, or response mode, and never cascades a bad request,
94
+ policy rejection, or uncertain dispatch outcome.
95
95
 
96
96
  Automated hosts do not impose a subscription-specific profile-count or
97
97
  concurrency limit by default. Set an explicit positive integer with
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.38",
41
+ package_version: "2026.8.39",
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, 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;
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, 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, 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";
@@ -14646,6 +14646,15 @@ var init_external_inference_contract = __esm({
14646
14646
  response_mode_hint: responseModeSchema,
14647
14647
  binding_state: external_exports.literal("rebind_required")
14648
14648
  });
14649
+ orderedFallbackHostIdsSchema = external_exports.array(identifierSchema).max(127).refine(
14650
+ (values) => new Set(values).size === values.length,
14651
+ { message: "fallback host IDs must be unique" }
14652
+ );
14653
+ externalInferenceFallbackHostIdsSchema = external_exports.strictObject({
14654
+ main: orderedFallbackHostIdsSchema,
14655
+ review: orderedFallbackHostIdsSchema,
14656
+ screener: orderedFallbackHostIdsSchema
14657
+ });
14649
14658
  liveModelControllerSchema = external_exports.discriminatedUnion("kind", [
14650
14659
  nativeModelControllerSchema,
14651
14660
  externalAgentModelControllerSchema
@@ -19496,7 +19505,7 @@ async function logoutCodexSubscription(options) {
19496
19505
  await session.close();
19497
19506
  }
19498
19507
  }
19499
- var CODEX_INFERENCE_PERMISSION_PROFILE, CODEX_REASONING_CONTENT_MAX_UTF8_BYTES, CODEX_REASONING_SUMMARY_MAX_UTF8_BYTES, CODEX_ACCOUNT_PLAN_TYPES, CodexAppServerError, objectOrNull, finiteToken, tokenUsageFromBreakdown, usageFromNotification, validPlanType, nonnegativeSafeIntegerOrNull, nonnegativeFiniteNumberOrNull, parseRateLimitWindow, RATE_LIMIT_REACHED_TYPES, DEFAULT_CODEX_QUOTA_COOLDOWN_MS, MAX_CODEX_QUOTA_COOLDOWN_MS, CODEX_TRANSIENT_RATE_LIMIT_COOLDOWN_MS, parseRateLimitSnapshot, codexRateLimitRetryAtMs, codexAccountRateLimitReached, forbiddenMethod, forbiddenTerminalItem, classifyCodexTurnFailure, scrubbedCodexEnvironment, killWindowsProcessTree, appServerArgs, GUARDIAN_SCRIPT, WINDOWS_RECEIPT_REPLACE_ERROR_CODES, replaceCodexGuardianReceiptFile, writeCodexGuardianSpawnIntent, parseGuardianReceipt, readCodexGuardianReceipt, waitForCodexGuardianState, defaultSpawn, CodexAppServerSession;
19508
+ var CODEX_INFERENCE_PERMISSION_PROFILE, CODEX_REASONING_CONTENT_MAX_UTF8_BYTES, CODEX_REASONING_SUMMARY_MAX_UTF8_BYTES, CODEX_ACCOUNT_PLAN_TYPES, CodexAppServerError, objectOrNull, finiteToken, tokenUsageFromBreakdown, usageFromNotification, validPlanType, nonnegativeSafeIntegerOrNull, nonnegativeFiniteNumberOrNull, parseRateLimitWindow, RATE_LIMIT_REACHED_TYPES, DEFAULT_CODEX_QUOTA_COOLDOWN_MS, MAX_CODEX_QUOTA_COOLDOWN_MS, CODEX_TRANSIENT_RATE_LIMIT_COOLDOWN_MS, parseRateLimitSnapshot, codexRateLimitRetryAtMs, codexAccountRateLimitReached, forbiddenMethod, forbiddenTerminalItem, classifyCodexTurnFailure, scrubbedCodexEnvironment, killWindowsProcessTree, appServerArgs, GUARDIAN_SCRIPT, WINDOWS_RECEIPT_REPLACE_ERROR_CODES, MAX_RETIRED_RESPONSE_IDS, LATE_RESPONSE_SAFE_METHODS, replaceCodexGuardianReceiptFile, writeCodexGuardianSpawnIntent, parseGuardianReceipt, readCodexGuardianReceipt, waitForCodexGuardianState, defaultSpawn, CodexAppServerSession;
19500
19509
  var init_codex_app_server = __esm({
19501
19510
  "lib/inference-host/codex-app-server.ts"() {
19502
19511
  "use strict";
@@ -19959,6 +19968,8 @@ child.once('close', async () => {
19959
19968
  "ENOTEMPTY",
19960
19969
  "EPERM"
19961
19970
  ]);
19971
+ MAX_RETIRED_RESPONSE_IDS = 256;
19972
+ LATE_RESPONSE_SAFE_METHODS = /* @__PURE__ */ new Set(["account/rateLimits/read"]);
19962
19973
  replaceCodexGuardianReceiptFile = async (temporaryPath, receiptPath, options = {}) => {
19963
19974
  const platform = options.platform ?? process.platform;
19964
19975
  const renameFile = options.renameFile ?? rename2;
@@ -20081,6 +20092,7 @@ child.once('close', async () => {
20081
20092
  CodexAppServerSession = class _CodexAppServerSession {
20082
20093
  constructor(options) {
20083
20094
  this.pending = /* @__PURE__ */ new Map();
20095
+ this.retiredResponseIds = /* @__PURE__ */ new Map();
20084
20096
  this.notificationListeners = /* @__PURE__ */ new Set();
20085
20097
  this.fatalListeners = /* @__PURE__ */ new Set();
20086
20098
  this.accountLoginCompletions = /* @__PURE__ */ new Map();
@@ -20219,6 +20231,9 @@ child.once('close', async () => {
20219
20231
  if (typeof id2 === "number" && Number.isSafeInteger(id2) && !("method" in message)) {
20220
20232
  const pending = this.pending.get(id2);
20221
20233
  if (!pending) {
20234
+ const retiredMethod = this.retiredResponseIds.get(id2);
20235
+ this.retiredResponseIds.delete(id2);
20236
+ if (retiredMethod && LATE_RESPONSE_SAFE_METHODS.has(retiredMethod)) return;
20222
20237
  this.failTransport("unexpected_response_id");
20223
20238
  return;
20224
20239
  }
@@ -20283,6 +20298,14 @@ child.once('close', async () => {
20283
20298
  this.pending.clear();
20284
20299
  for (const listener of this.fatalListeners) listener(this.fatalError);
20285
20300
  }
20301
+ retireResponseId(id2, method) {
20302
+ this.retiredResponseIds.set(id2, method);
20303
+ while (this.retiredResponseIds.size > MAX_RETIRED_RESPONSE_IDS) {
20304
+ const oldest = this.retiredResponseIds.keys().next().value;
20305
+ if (typeof oldest !== "number") break;
20306
+ this.retiredResponseIds.delete(oldest);
20307
+ }
20308
+ }
20286
20309
  write(message) {
20287
20310
  if (this.closed || this.fatalError || this.process.exitCode !== null) {
20288
20311
  throw this.fatalError ?? new CodexAppServerError({
@@ -20321,6 +20344,7 @@ child.once('close', async () => {
20321
20344
  const pending = { resolve: resolve6, reject, timer: null, abortCleanup: null };
20322
20345
  pending.timer = setTimeout(() => {
20323
20346
  this.pending.delete(id2);
20347
+ this.retireResponseId(id2, method);
20324
20348
  pending.abortCleanup?.();
20325
20349
  reject(new CodexAppServerError({
20326
20350
  message: "Codex app-server request timed out.",
@@ -20332,6 +20356,7 @@ child.once('close', async () => {
20332
20356
  if (options.signal) {
20333
20357
  const onAbort = () => {
20334
20358
  this.pending.delete(id2);
20359
+ this.retireResponseId(id2, method);
20335
20360
  if (pending.timer) clearTimeout(pending.timer);
20336
20361
  pending.abortCleanup?.();
20337
20362
  reject(new CodexAppServerError({
@@ -22224,9 +22249,21 @@ var init_codex_adapter = __esm({
22224
22249
  dispatchOutcome: checkpoint.dispatchOutcome
22225
22250
  });
22226
22251
  }
22227
- const receipt = await readCodexGuardianReceipt(checkpoint.processReceiptPath);
22228
- if (checkpoint.processState === "terminated" || receipt === null || receipt.state === "terminated") {
22229
- await rm3(checkpoint.processReceiptPath, { force: true });
22252
+ let sharedReceiptStillRequired = true;
22253
+ if (recoveryHooks.loadAll) {
22254
+ try {
22255
+ const checkpoints = await recoveryHooks.loadAll();
22256
+ const receiptPath = resolve3(checkpoint.processReceiptPath);
22257
+ sharedReceiptStillRequired = Object.values(checkpoints).some((candidate) => candidate.attemptId !== attemptId && !candidate.cleanupConfirmed && candidate.processReceiptPath !== null && resolve3(candidate.processReceiptPath) === receiptPath);
22258
+ } catch {
22259
+ sharedReceiptStillRequired = true;
22260
+ }
22261
+ }
22262
+ if (!sharedReceiptStillRequired) {
22263
+ const receipt = await readCodexGuardianReceipt(checkpoint.processReceiptPath);
22264
+ if (checkpoint.processState === "terminated" || receipt === null || receipt.state === "terminated") {
22265
+ await rm3(checkpoint.processReceiptPath, { force: true });
22266
+ }
22230
22267
  }
22231
22268
  }
22232
22269
  await recoveryHooks.clear(attemptId);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vtxmacro/cli",
3
- "version": "2026.8.38",
3
+ "version": "2026.8.39",
4
4
  "description": "VTX Macro CLI, MCP server, and durable subscription inference host.",
5
5
  "type": "module",
6
6
  "license": "UNLICENSED",