@vtxmacro/cli 2026.8.26 → 2026.8.28

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 (2) hide show
  1. package/bin/vtx.js +79 -16
  2. package/package.json +1 -1
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.26",
41
+ package_version: "2026.8.28",
42
42
  codex_package_name: "@openai/codex",
43
43
  codex_version: "0.147.0",
44
44
  platforms: {
@@ -19101,12 +19101,13 @@ async function logoutCodexSubscription(options) {
19101
19101
  await session.close();
19102
19102
  }
19103
19103
  }
19104
- var CODEX_INFERENCE_PERMISSION_PROFILE, 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;
19104
+ var CODEX_INFERENCE_PERMISSION_PROFILE, 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;
19105
19105
  var init_codex_app_server = __esm({
19106
19106
  "lib/inference-host/codex-app-server.ts"() {
19107
19107
  "use strict";
19108
19108
  init_config();
19109
19109
  CODEX_INFERENCE_PERMISSION_PROFILE = "vtx_inference_readonly";
19110
+ CODEX_REASONING_SUMMARY_MAX_UTF8_BYTES = 32768;
19110
19111
  CODEX_ACCOUNT_PLAN_TYPES = [
19111
19112
  "free",
19112
19113
  "go",
@@ -20258,6 +20259,9 @@ child.once('close', async () => {
20258
20259
  developerInstructions: options.systemPrompt,
20259
20260
  config: {
20260
20261
  model_reasoning_effort: options.requestedReasoningEffort,
20262
+ model_reasoning_summary: "detailed",
20263
+ show_raw_agent_reasoning: false,
20264
+ hide_agent_reasoning: false,
20261
20265
  web_search: "disabled",
20262
20266
  features: {
20263
20267
  apps: false,
@@ -20393,7 +20397,7 @@ child.once('close', async () => {
20393
20397
  if (method === "thread/settings/updated") {
20394
20398
  const settings = objectOrNull(params.threadSettings);
20395
20399
  const permission = objectOrNull(settings?.activePermissionProfile);
20396
- if (!settings || settings.model !== request.requestedModel || settings.modelProvider !== "openai" || settings.effort !== request.requestedReasoningEffort || String(settings.cwd || "") !== request.workspacePath || settings.approvalPolicy !== "never" || permission?.id !== CODEX_INFERENCE_PERMISSION_PROFILE || permission.extends !== null) {
20400
+ if (!settings || settings.model !== request.requestedModel || settings.modelProvider !== "openai" || settings.effort !== request.requestedReasoningEffort || settings.summary !== "detailed" || String(settings.cwd || "") !== request.workspacePath || settings.approvalPolicy !== "never" || permission?.id !== CODEX_INFERENCE_PERMISSION_PROFILE || permission.extends !== null) {
20397
20401
  terminalReject(new CodexAppServerError({
20398
20402
  message: "Codex effective turn settings changed after dispatch.",
20399
20403
  category: "adapter",
@@ -20484,6 +20488,7 @@ child.once('close', async () => {
20484
20488
  model: request.requestedModel,
20485
20489
  serviceTier: "default",
20486
20490
  effort: request.requestedReasoningEffort,
20491
+ summary: "detailed",
20487
20492
  outputSchema: request.outputSchema
20488
20493
  }, {
20489
20494
  timeoutMs: remaining(),
@@ -20672,6 +20677,12 @@ child.once('close', async () => {
20672
20677
  const fallbackMessages = items.filter((item) => item?.type === "agentMessage" && item.phase == null);
20673
20678
  const answerItem = finalMessages.at(-1) ?? fallbackMessages.at(-1);
20674
20679
  const text = typeof answerItem?.text === "string" ? answerItem.text : "";
20680
+ const reasoningSummaryParts = items.flatMap((item) => {
20681
+ if (item?.type !== "reasoning" || !Array.isArray(item.summary)) return [];
20682
+ return item.summary.filter((part) => typeof part === "string" && part.trim().length > 0);
20683
+ });
20684
+ const reasoningSummaryCandidate = reasoningSummaryParts.length > 0 ? reasoningSummaryParts.join("\n\n") : null;
20685
+ const reasoningSummary = reasoningSummaryCandidate !== null && Buffer.byteLength(reasoningSummaryCandidate, "utf8") <= CODEX_REASONING_SUMMARY_MAX_UTF8_BYTES ? reasoningSummaryCandidate : null;
20675
20686
  const usage = threadUsage ?? rawResponseUsage;
20676
20687
  const responseIdentity = adapterResponseId ?? turnId;
20677
20688
  if (!text || !usage || !responseIdentity) {
@@ -20685,6 +20696,7 @@ child.once('close', async () => {
20685
20696
  }
20686
20697
  return {
20687
20698
  text,
20699
+ reasoningSummary,
20688
20700
  requestedModel: request.requestedModel,
20689
20701
  effectiveModel: request.thread.effectiveModel,
20690
20702
  requestedReasoningEffort: request.requestedReasoningEffort,
@@ -20991,6 +21003,7 @@ var init_codex_adapter = __esm({
20991
21003
  });
20992
21004
  turnResultReceiptSchema = external_exports.strictObject({
20993
21005
  text: external_exports.string().min(1).max(MAX_PROMPT_BYTES2),
21006
+ reasoningSummary: external_exports.string().min(1).max(CODEX_REASONING_SUMMARY_MAX_UTF8_BYTES).nullable().optional().transform((value) => value ?? null),
20994
21007
  requestedModel: external_exports.string().regex(CODEX_MODEL_NAME_PATTERN),
20995
21008
  effectiveModel: external_exports.string().regex(CODEX_MODEL_NAME_PATTERN),
20996
21009
  requestedReasoningEffort: external_exports.string().regex(CODEX_REASONING_EFFORT_PATTERN),
@@ -21002,7 +21015,7 @@ var init_codex_adapter = __esm({
21002
21015
  timeToFirstTokenMs: external_exports.number().int().nonnegative().max(Number.MAX_SAFE_INTEGER).nullable(),
21003
21016
  terminalStatus: external_exports.literal("completed")
21004
21017
  }).superRefine((value, context) => {
21005
- if (value.usage.cachedInputTokens > value.usage.inputTokens || value.usage.reasoningOutputTokens > value.usage.outputTokens || value.usage.totalTokens !== value.usage.inputTokens + value.usage.outputTokens || value.effectiveModel !== value.requestedModel || value.effectiveReasoningEffort !== value.requestedReasoningEffort) {
21018
+ if (value.reasoningSummary != null && utf8Bytes(value.reasoningSummary) > CODEX_REASONING_SUMMARY_MAX_UTF8_BYTES || value.usage.cachedInputTokens > value.usage.inputTokens || value.usage.reasoningOutputTokens > value.usage.outputTokens || value.usage.totalTokens !== value.usage.inputTokens + value.usage.outputTokens || value.effectiveModel !== value.requestedModel || value.effectiveReasoningEffort !== value.requestedReasoningEffort) {
21006
21019
  context.addIssue({ code: "custom", message: "Invalid Codex recovery usage or identity." });
21007
21020
  }
21008
21021
  });
@@ -28711,14 +28724,24 @@ var init_runner = __esm({
28711
28724
  return models;
28712
28725
  };
28713
28726
  FileInferenceHostRuntimeReceiptStore = class {
28714
- constructor(path) {
28727
+ constructor(path, readPrivateFile = readInferencePrivateFile) {
28715
28728
  this.path = path;
28729
+ this.readPrivateFile = readPrivateFile;
28716
28730
  }
28717
28731
  async read() {
28718
- const raw = await readInferencePrivateFile(
28719
- this.path,
28720
- "Inference host runtime receipt file"
28721
- );
28732
+ let raw = null;
28733
+ for (let attempt = 0; attempt < 3; attempt += 1) {
28734
+ try {
28735
+ raw = await this.readPrivateFile(
28736
+ this.path,
28737
+ "Inference host runtime receipt file"
28738
+ );
28739
+ break;
28740
+ } catch (error48) {
28741
+ const changedDuringRead = error48 instanceof Error && error48.message === "Inference host runtime receipt file changed while it was opened.";
28742
+ if (!changedDuringRead || attempt === 2) throw error48;
28743
+ }
28744
+ }
28722
28745
  if (raw === null) return null;
28723
28746
  try {
28724
28747
  return validateRuntimeReceipt(JSON.parse(raw));
@@ -29073,7 +29096,9 @@ var init_runner = __esm({
29073
29096
  providerResponseSchema: null,
29074
29097
  providerResponseSchemaVersion: null,
29075
29098
  providerResponseMaxUtf8Bytes: null,
29076
- providerResponseTextMaxUtf8Bytes: null
29099
+ providerResponseTextMaxUtf8Bytes: null,
29100
+ providerReasoningSummaryMaxUtf8Bytes: null,
29101
+ providerReasoningSummarySupported: false
29077
29102
  };
29078
29103
  }
29079
29104
  const definitions = objectRecord(outputSchema.$defs);
@@ -29081,21 +29106,27 @@ var init_runner = __esm({
29081
29106
  const properties = objectRecord(outputSchema.properties);
29082
29107
  const schemaVersionProperty = objectRecord(properties?.schema_version);
29083
29108
  const responseTextProperty = objectRecord(properties?.response_text);
29109
+ const reasoningSummaryProperty = objectRecord(properties?.reasoning_summary);
29084
29110
  const schemaVersion = schemaVersionProperty?.const;
29085
29111
  const requiredFields = outputSchema.required;
29086
- const expectedFields = [
29112
+ const baseExpectedFields = [
29087
29113
  "schema_version",
29088
29114
  "response_text",
29089
29115
  "finish_reason",
29090
29116
  "refusal_status"
29091
29117
  ];
29118
+ const providerReasoningSummarySupported = reasoningSummaryProperty !== null;
29119
+ const expectedFields = providerReasoningSummarySupported ? [...baseExpectedFields, "reasoning_summary"] : baseExpectedFields;
29092
29120
  const responseMaxUtf8Bytes = positiveUtf8ByteLimit(
29093
29121
  outputSchema["x-vtx-max-utf8-bytes"]
29094
29122
  );
29095
29123
  const responseTextMaxUtf8Bytes = positiveUtf8ByteLimit(
29096
29124
  responseTextProperty?.["x-vtx-max-utf8-bytes"]
29097
29125
  );
29098
- if (outputSchema.type !== "object" || outputSchema.additionalProperties !== false || !Array.isArray(requiredFields) || !requiredFields.every((field) => typeof field === "string") || [...requiredFields].sort().join("\0") !== expectedFields.sort().join("\0") || properties === null || !exactObjectKeys(properties, expectedFields) || adapterSchema === null || typeof schemaVersion !== "string" || schemaVersion !== jobInput.output_schema_version || responseTextMaxUtf8Bytes === null || responseMaxUtf8Bytes === null) {
29126
+ const reasoningSummaryMaxUtf8Bytes = positiveUtf8ByteLimit(
29127
+ reasoningSummaryProperty?.["x-vtx-max-utf8-bytes"]
29128
+ );
29129
+ if (outputSchema.type !== "object" || outputSchema.additionalProperties !== false || !Array.isArray(requiredFields) || !requiredFields.every((field) => typeof field === "string") || [...requiredFields].sort().join("\0") !== expectedFields.sort().join("\0") || properties === null || !exactObjectKeys(properties, expectedFields) || adapterSchema === null || typeof schemaVersion !== "string" || schemaVersion !== jobInput.output_schema_version || responseTextMaxUtf8Bytes === null || providerReasoningSummarySupported && reasoningSummaryMaxUtf8Bytes === null || responseMaxUtf8Bytes === null) {
29099
29130
  throw new InferenceHostRunnerError(
29100
29131
  "invalid_output_schema",
29101
29132
  "The provider-response output schema does not match the canonical envelope structure."
@@ -29109,7 +29140,9 @@ var init_runner = __esm({
29109
29140
  providerResponseSchema: outputSchema,
29110
29141
  providerResponseSchemaVersion: schemaVersion,
29111
29142
  providerResponseMaxUtf8Bytes: responseMaxUtf8Bytes,
29112
- providerResponseTextMaxUtf8Bytes: responseTextMaxUtf8Bytes
29143
+ providerResponseTextMaxUtf8Bytes: responseTextMaxUtf8Bytes,
29144
+ providerReasoningSummaryMaxUtf8Bytes: reasoningSummaryMaxUtf8Bytes,
29145
+ providerReasoningSummarySupported
29113
29146
  };
29114
29147
  };
29115
29148
  safeFailureCode = (value, fallback) => {
@@ -30042,11 +30075,18 @@ var init_runner = __esm({
30042
30075
  "Codex response text exceeds the immutable provider-response UTF-8 byte limit."
30043
30076
  );
30044
30077
  }
30078
+ if (outputContract.providerReasoningSummarySupported && outputContract.providerReasoningSummaryMaxUtf8Bytes !== null && adapterResult.reasoningSummary !== null && Buffer.byteLength(adapterResult.reasoningSummary, "utf8") > outputContract.providerReasoningSummaryMaxUtf8Bytes) {
30079
+ throw new InferenceHostRunnerError(
30080
+ "output_schema_reasoning_summary_too_large",
30081
+ "Codex reasoning summary exceeds the immutable provider-response UTF-8 byte limit."
30082
+ );
30083
+ }
30045
30084
  const providerResponse = {
30046
30085
  schema_version: outputContract.providerResponseSchemaVersion,
30047
30086
  response_text: adapterResult.text,
30048
30087
  finish_reason: finishReason,
30049
- refusal_status: refusalStatus
30088
+ refusal_status: refusalStatus,
30089
+ ...outputContract.providerReasoningSummarySupported ? { reasoning_summary: adapterResult.reasoningSummary } : {}
30050
30090
  };
30051
30091
  validateOutput(outputContract.providerResponseSchema, providerResponse);
30052
30092
  sealedPlaintext = JSON.stringify(providerResponse);
@@ -30949,7 +30989,7 @@ async function runInferenceHostCli(argv2, env = process.env, dependencies = {})
30949
30989
  return { exitCode: 0, stdout: INFERENCE_HOST_HELP, stderr: "" };
30950
30990
  }
30951
30991
  const parsed = parseInferenceHostArgs(argv2, env);
30952
- const config2 = resolveInferenceHostConfig(env);
30992
+ const config2 = await resolveInferenceHostCommandConfig(parsed, env);
30953
30993
  if (parsed.command === "login") {
30954
30994
  return await login(config2, parsed, env, dependencies, warnings);
30955
30995
  }
@@ -31016,7 +31056,7 @@ async function runInferenceHostCli(argv2, env = process.env, dependencies = {})
31016
31056
  };
31017
31057
  }
31018
31058
  }
31019
- var INFERENCE_HOST_CLI_VERSION, runtimeReceiptPath, codexRecoveryPath, codexGuardianReceiptRoot, revocationCheckpointPath, foregroundHostLockPath, AGENT_HEARTBEAT_INTERVAL_MS, AGENT_HEARTBEAT_MAX_RETRY_DELAY_MS, retryableAgentHeartbeatError, assertRevocationCheckpoint, readRevocationCheckpoint, writeRevocationCheckpoint, clearRevocationCheckpoint, render, INFERENCE_HOST_HELP, parsePositiveInteger, parseInferenceHostArgs, defaultOpenBrowser, defaultRegisterLifecycleSignalHandlers, lifecycleCancellation, configuredCredentialStore, accountKeyForState, assertCredentialMatchesState2, revocationCheckpointForCredential, assertRevocationCheckpointMatchesLocalIdentity, fileExistsPrivately, inspectCodexAuthentication, clearLocalRuntimeArtifacts, assertDurableServiceUninstalled, assertLocalRuntimeArtifactsMayBeDiscarded, defaultRunForeground, login, codexLogin, codexLogout, localStatus, doctor, cleanupLogin, runHost, defaultReadStdin, parseAgentStdin, agentOperationId, agentSession, agentConnect, agentRun, agentNext, agentComplete, agentFail, withAgentCommandLock, serviceCommand;
31059
+ var INFERENCE_HOST_CLI_VERSION, runtimeReceiptPath, codexRecoveryPath, codexGuardianReceiptRoot, revocationCheckpointPath, foregroundHostLockPath, AGENT_HEARTBEAT_INTERVAL_MS, AGENT_HEARTBEAT_MAX_RETRY_DELAY_MS, retryableAgentHeartbeatError, assertRevocationCheckpoint, readRevocationCheckpoint, writeRevocationCheckpoint, clearRevocationCheckpoint, render, INFERENCE_HOST_HELP, parsePositiveInteger, parseInferenceHostArgs, defaultOpenBrowser, defaultRegisterLifecycleSignalHandlers, lifecycleCancellation, configuredCredentialStore, accountKeyForState, assertCredentialMatchesState2, revocationCheckpointForCredential, assertRevocationCheckpointMatchesLocalIdentity, fileExistsPrivately, inspectCodexAuthentication, clearLocalRuntimeArtifacts, assertDurableServiceUninstalled, assertLocalRuntimeArtifactsMayBeDiscarded, defaultRunForeground, login, codexLogin, codexLogout, localStatus, doctor, cleanupLogin, runHost, defaultReadStdin, parseAgentStdin, agentOperationId, agentSession, agentConnect, agentRun, agentNext, agentComplete, agentFail, withAgentCommandLock, serviceCommand, hasExplicitCredentialStoreConfiguration, commandUsesInstalledServiceCredentials, resolveInferenceHostCommandConfig;
31020
31060
  var init_cli = __esm({
31021
31061
  "lib/inference-host/cli.ts"() {
31022
31062
  "use strict";
@@ -32484,6 +32524,29 @@ Waiting for approval...
32484
32524
  }
32485
32525
  throw new Error("Usage: vtx inference-host service <install|start|stop|status|logs|uninstall>.");
32486
32526
  };
32527
+ hasExplicitCredentialStoreConfiguration = (env) => Boolean(
32528
+ String(env.VTX_INFERENCE_HOST_CREDENTIAL_STORE || "").trim() || String(env.VTX_INFERENCE_HOST_CREDENTIAL_FILE || "").trim()
32529
+ );
32530
+ commandUsesInstalledServiceCredentials = (parsed) => parsed.command === "status" || parsed.command === "doctor" || parsed.command === "service" && parsed.serviceAction === "install";
32531
+ resolveInferenceHostCommandConfig = async (parsed, env) => {
32532
+ const baseConfig = resolveInferenceHostConfig(env);
32533
+ if (!commandUsesInstalledServiceCredentials(parsed) || hasExplicitCredentialStoreConfiguration(env)) {
32534
+ return baseConfig;
32535
+ }
32536
+ const manifestPath = `${baseConfig.statePath}.service.json`;
32537
+ const manifest = await readInferenceHostServiceManifest(manifestPath);
32538
+ if (!manifest) return baseConfig;
32539
+ const installedConfig = resolveInferenceHostConfig({
32540
+ ...env,
32541
+ ...manifest.runtime_environment
32542
+ });
32543
+ if (resolve5(installedConfig.statePath) !== resolve5(baseConfig.statePath)) {
32544
+ throw new Error(
32545
+ "Installed inference-host service manifest does not match the requested local state path."
32546
+ );
32547
+ }
32548
+ return installedConfig;
32549
+ };
32487
32550
  }
32488
32551
  });
32489
32552
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vtxmacro/cli",
3
- "version": "2026.8.26",
3
+ "version": "2026.8.28",
4
4
  "description": "VTX Macro CLI, MCP server, and durable subscription inference host.",
5
5
  "type": "module",
6
6
  "license": "UNLICENSED",