@vtxmacro/cli 2026.8.27 → 2026.8.29

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 +49 -9
  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.27",
41
+ package_version: "2026.8.29",
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,
@@ -20326,6 +20330,9 @@ child.once('close', async () => {
20326
20330
  let adapterResponseId = null;
20327
20331
  let firstTokenAt = null;
20328
20332
  let terminal = null;
20333
+ let completedReasoningObserved = false;
20334
+ let completedReasoningSequence = 0;
20335
+ const completedReasoningSummaries = /* @__PURE__ */ new Map();
20329
20336
  let terminalResolve;
20330
20337
  let terminalReject;
20331
20338
  const terminalPromise = new Promise((resolve6, reject) => {
@@ -20393,7 +20400,7 @@ child.once('close', async () => {
20393
20400
  if (method === "thread/settings/updated") {
20394
20401
  const settings = objectOrNull(params.threadSettings);
20395
20402
  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) {
20403
+ 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
20404
  terminalReject(new CodexAppServerError({
20398
20405
  message: "Codex effective turn settings changed after dispatch.",
20399
20406
  category: "adapter",
@@ -20445,6 +20452,15 @@ child.once('close', async () => {
20445
20452
  }));
20446
20453
  return;
20447
20454
  }
20455
+ if (method === "item/completed" && item.type === "reasoning") {
20456
+ completedReasoningObserved = true;
20457
+ const itemId = String(item.id || params.itemId || "").trim();
20458
+ const itemKey = itemId ? `id:${itemId}` : `sequence:${completedReasoningSequence++}`;
20459
+ completedReasoningSummaries.set(
20460
+ itemKey,
20461
+ Array.isArray(item.summary) ? item.summary : []
20462
+ );
20463
+ }
20448
20464
  }
20449
20465
  const observedUsage = usageFromNotification(method, params);
20450
20466
  if (method === "rawResponse/completed") {
@@ -20484,6 +20500,7 @@ child.once('close', async () => {
20484
20500
  model: request.requestedModel,
20485
20501
  serviceTier: "default",
20486
20502
  effort: request.requestedReasoningEffort,
20503
+ summary: "detailed",
20487
20504
  outputSchema: request.outputSchema
20488
20505
  }, {
20489
20506
  timeoutMs: remaining(),
@@ -20672,6 +20689,10 @@ child.once('close', async () => {
20672
20689
  const fallbackMessages = items.filter((item) => item?.type === "agentMessage" && item.phase == null);
20673
20690
  const answerItem = finalMessages.at(-1) ?? fallbackMessages.at(-1);
20674
20691
  const text = typeof answerItem?.text === "string" ? answerItem.text : "";
20692
+ const reasoningSummarySections = completedReasoningObserved ? [...completedReasoningSummaries.values()] : items.flatMap((item) => item?.type === "reasoning" && Array.isArray(item.summary) ? [item.summary] : []);
20693
+ const reasoningSummaryParts = reasoningSummarySections.flatMap((summary) => summary.filter((part) => typeof part === "string" && part.trim().length > 0));
20694
+ const reasoningSummaryCandidate = reasoningSummaryParts.length > 0 ? reasoningSummaryParts.join("\n\n") : null;
20695
+ const reasoningSummary = reasoningSummaryCandidate !== null && Buffer.byteLength(reasoningSummaryCandidate, "utf8") <= CODEX_REASONING_SUMMARY_MAX_UTF8_BYTES ? reasoningSummaryCandidate : null;
20675
20696
  const usage = threadUsage ?? rawResponseUsage;
20676
20697
  const responseIdentity = adapterResponseId ?? turnId;
20677
20698
  if (!text || !usage || !responseIdentity) {
@@ -20685,6 +20706,7 @@ child.once('close', async () => {
20685
20706
  }
20686
20707
  return {
20687
20708
  text,
20709
+ reasoningSummary,
20688
20710
  requestedModel: request.requestedModel,
20689
20711
  effectiveModel: request.thread.effectiveModel,
20690
20712
  requestedReasoningEffort: request.requestedReasoningEffort,
@@ -20991,6 +21013,7 @@ var init_codex_adapter = __esm({
20991
21013
  });
20992
21014
  turnResultReceiptSchema = external_exports.strictObject({
20993
21015
  text: external_exports.string().min(1).max(MAX_PROMPT_BYTES2),
21016
+ reasoningSummary: external_exports.string().min(1).max(CODEX_REASONING_SUMMARY_MAX_UTF8_BYTES).nullable().optional().transform((value) => value ?? null),
20994
21017
  requestedModel: external_exports.string().regex(CODEX_MODEL_NAME_PATTERN),
20995
21018
  effectiveModel: external_exports.string().regex(CODEX_MODEL_NAME_PATTERN),
20996
21019
  requestedReasoningEffort: external_exports.string().regex(CODEX_REASONING_EFFORT_PATTERN),
@@ -21002,7 +21025,7 @@ var init_codex_adapter = __esm({
21002
21025
  timeToFirstTokenMs: external_exports.number().int().nonnegative().max(Number.MAX_SAFE_INTEGER).nullable(),
21003
21026
  terminalStatus: external_exports.literal("completed")
21004
21027
  }).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) {
21028
+ 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
21029
  context.addIssue({ code: "custom", message: "Invalid Codex recovery usage or identity." });
21007
21030
  }
21008
21031
  });
@@ -29083,7 +29106,9 @@ var init_runner = __esm({
29083
29106
  providerResponseSchema: null,
29084
29107
  providerResponseSchemaVersion: null,
29085
29108
  providerResponseMaxUtf8Bytes: null,
29086
- providerResponseTextMaxUtf8Bytes: null
29109
+ providerResponseTextMaxUtf8Bytes: null,
29110
+ providerReasoningSummaryMaxUtf8Bytes: null,
29111
+ providerReasoningSummarySupported: false
29087
29112
  };
29088
29113
  }
29089
29114
  const definitions = objectRecord(outputSchema.$defs);
@@ -29091,21 +29116,27 @@ var init_runner = __esm({
29091
29116
  const properties = objectRecord(outputSchema.properties);
29092
29117
  const schemaVersionProperty = objectRecord(properties?.schema_version);
29093
29118
  const responseTextProperty = objectRecord(properties?.response_text);
29119
+ const reasoningSummaryProperty = objectRecord(properties?.reasoning_summary);
29094
29120
  const schemaVersion = schemaVersionProperty?.const;
29095
29121
  const requiredFields = outputSchema.required;
29096
- const expectedFields = [
29122
+ const baseExpectedFields = [
29097
29123
  "schema_version",
29098
29124
  "response_text",
29099
29125
  "finish_reason",
29100
29126
  "refusal_status"
29101
29127
  ];
29128
+ const providerReasoningSummarySupported = reasoningSummaryProperty !== null;
29129
+ const expectedFields = providerReasoningSummarySupported ? [...baseExpectedFields, "reasoning_summary"] : baseExpectedFields;
29102
29130
  const responseMaxUtf8Bytes = positiveUtf8ByteLimit(
29103
29131
  outputSchema["x-vtx-max-utf8-bytes"]
29104
29132
  );
29105
29133
  const responseTextMaxUtf8Bytes = positiveUtf8ByteLimit(
29106
29134
  responseTextProperty?.["x-vtx-max-utf8-bytes"]
29107
29135
  );
29108
- 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) {
29136
+ const reasoningSummaryMaxUtf8Bytes = positiveUtf8ByteLimit(
29137
+ reasoningSummaryProperty?.["x-vtx-max-utf8-bytes"]
29138
+ );
29139
+ 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) {
29109
29140
  throw new InferenceHostRunnerError(
29110
29141
  "invalid_output_schema",
29111
29142
  "The provider-response output schema does not match the canonical envelope structure."
@@ -29119,7 +29150,9 @@ var init_runner = __esm({
29119
29150
  providerResponseSchema: outputSchema,
29120
29151
  providerResponseSchemaVersion: schemaVersion,
29121
29152
  providerResponseMaxUtf8Bytes: responseMaxUtf8Bytes,
29122
- providerResponseTextMaxUtf8Bytes: responseTextMaxUtf8Bytes
29153
+ providerResponseTextMaxUtf8Bytes: responseTextMaxUtf8Bytes,
29154
+ providerReasoningSummaryMaxUtf8Bytes: reasoningSummaryMaxUtf8Bytes,
29155
+ providerReasoningSummarySupported
29123
29156
  };
29124
29157
  };
29125
29158
  safeFailureCode = (value, fallback) => {
@@ -30052,11 +30085,18 @@ var init_runner = __esm({
30052
30085
  "Codex response text exceeds the immutable provider-response UTF-8 byte limit."
30053
30086
  );
30054
30087
  }
30088
+ if (outputContract.providerReasoningSummarySupported && outputContract.providerReasoningSummaryMaxUtf8Bytes !== null && adapterResult.reasoningSummary !== null && Buffer.byteLength(adapterResult.reasoningSummary, "utf8") > outputContract.providerReasoningSummaryMaxUtf8Bytes) {
30089
+ throw new InferenceHostRunnerError(
30090
+ "output_schema_reasoning_summary_too_large",
30091
+ "Codex reasoning summary exceeds the immutable provider-response UTF-8 byte limit."
30092
+ );
30093
+ }
30055
30094
  const providerResponse = {
30056
30095
  schema_version: outputContract.providerResponseSchemaVersion,
30057
30096
  response_text: adapterResult.text,
30058
30097
  finish_reason: finishReason,
30059
- refusal_status: refusalStatus
30098
+ refusal_status: refusalStatus,
30099
+ ...outputContract.providerReasoningSummarySupported ? { reasoning_summary: adapterResult.reasoningSummary } : {}
30060
30100
  };
30061
30101
  validateOutput(outputContract.providerResponseSchema, providerResponse);
30062
30102
  sealedPlaintext = JSON.stringify(providerResponse);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vtxmacro/cli",
3
- "version": "2026.8.27",
3
+ "version": "2026.8.29",
4
4
  "description": "VTX Macro CLI, MCP server, and durable subscription inference host.",
5
5
  "type": "module",
6
6
  "license": "UNLICENSED",