@vtxmacro/cli 2026.8.29 → 2026.8.30
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 +36 -17
- 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.
|
|
41
|
+
package_version: "2026.8.30",
|
|
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_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;
|
|
19104
|
+
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;
|
|
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_CONTENT_MAX_UTF8_BYTES = 32768;
|
|
19110
19111
|
CODEX_REASONING_SUMMARY_MAX_UTF8_BYTES = 32768;
|
|
19111
19112
|
CODEX_ACCOUNT_PLAN_TYPES = [
|
|
19112
19113
|
"free",
|
|
@@ -20259,8 +20260,8 @@ child.once('close', async () => {
|
|
|
20259
20260
|
developerInstructions: options.systemPrompt,
|
|
20260
20261
|
config: {
|
|
20261
20262
|
model_reasoning_effort: options.requestedReasoningEffort,
|
|
20262
|
-
model_reasoning_summary: "
|
|
20263
|
-
show_raw_agent_reasoning:
|
|
20263
|
+
model_reasoning_summary: "none",
|
|
20264
|
+
show_raw_agent_reasoning: true,
|
|
20264
20265
|
hide_agent_reasoning: false,
|
|
20265
20266
|
web_search: "disabled",
|
|
20266
20267
|
features: {
|
|
@@ -20332,7 +20333,7 @@ child.once('close', async () => {
|
|
|
20332
20333
|
let terminal = null;
|
|
20333
20334
|
let completedReasoningObserved = false;
|
|
20334
20335
|
let completedReasoningSequence = 0;
|
|
20335
|
-
const
|
|
20336
|
+
const completedReasoningContent = /* @__PURE__ */ new Map();
|
|
20336
20337
|
let terminalResolve;
|
|
20337
20338
|
let terminalReject;
|
|
20338
20339
|
const terminalPromise = new Promise((resolve6, reject) => {
|
|
@@ -20400,7 +20401,7 @@ child.once('close', async () => {
|
|
|
20400
20401
|
if (method === "thread/settings/updated") {
|
|
20401
20402
|
const settings = objectOrNull(params.threadSettings);
|
|
20402
20403
|
const permission = objectOrNull(settings?.activePermissionProfile);
|
|
20403
|
-
if (!settings || settings.model !== request.requestedModel || settings.modelProvider !== "openai" || settings.effort !== request.requestedReasoningEffort || settings.summary !== "
|
|
20404
|
+
if (!settings || settings.model !== request.requestedModel || settings.modelProvider !== "openai" || settings.effort !== request.requestedReasoningEffort || settings.summary !== "none" || String(settings.cwd || "") !== request.workspacePath || settings.approvalPolicy !== "never" || permission?.id !== CODEX_INFERENCE_PERMISSION_PROFILE || permission.extends !== null) {
|
|
20404
20405
|
terminalReject(new CodexAppServerError({
|
|
20405
20406
|
message: "Codex effective turn settings changed after dispatch.",
|
|
20406
20407
|
category: "adapter",
|
|
@@ -20456,9 +20457,9 @@ child.once('close', async () => {
|
|
|
20456
20457
|
completedReasoningObserved = true;
|
|
20457
20458
|
const itemId = String(item.id || params.itemId || "").trim();
|
|
20458
20459
|
const itemKey = itemId ? `id:${itemId}` : `sequence:${completedReasoningSequence++}`;
|
|
20459
|
-
|
|
20460
|
+
completedReasoningContent.set(
|
|
20460
20461
|
itemKey,
|
|
20461
|
-
Array.isArray(item.
|
|
20462
|
+
Array.isArray(item.content) ? item.content : []
|
|
20462
20463
|
);
|
|
20463
20464
|
}
|
|
20464
20465
|
}
|
|
@@ -20500,7 +20501,7 @@ child.once('close', async () => {
|
|
|
20500
20501
|
model: request.requestedModel,
|
|
20501
20502
|
serviceTier: "default",
|
|
20502
20503
|
effort: request.requestedReasoningEffort,
|
|
20503
|
-
summary: "
|
|
20504
|
+
summary: "none",
|
|
20504
20505
|
outputSchema: request.outputSchema
|
|
20505
20506
|
}, {
|
|
20506
20507
|
timeoutMs: remaining(),
|
|
@@ -20689,10 +20690,10 @@ child.once('close', async () => {
|
|
|
20689
20690
|
const fallbackMessages = items.filter((item) => item?.type === "agentMessage" && item.phase == null);
|
|
20690
20691
|
const answerItem = finalMessages.at(-1) ?? fallbackMessages.at(-1);
|
|
20691
20692
|
const text = typeof answerItem?.text === "string" ? answerItem.text : "";
|
|
20692
|
-
const
|
|
20693
|
-
const
|
|
20694
|
-
const
|
|
20695
|
-
const
|
|
20693
|
+
const reasoningContentSections = completedReasoningObserved ? [...completedReasoningContent.values()] : items.flatMap((item) => item?.type === "reasoning" && Array.isArray(item.content) ? [item.content] : []);
|
|
20694
|
+
const reasoningContentParts = reasoningContentSections.flatMap((content) => content.filter((part) => typeof part === "string" && part.trim().length > 0));
|
|
20695
|
+
const reasoningContentCandidate = reasoningContentParts.length > 0 ? reasoningContentParts.join("\n\n") : null;
|
|
20696
|
+
const reasoningContent = reasoningContentCandidate !== null && Buffer.byteLength(reasoningContentCandidate, "utf8") <= CODEX_REASONING_CONTENT_MAX_UTF8_BYTES ? reasoningContentCandidate : null;
|
|
20696
20697
|
const usage = threadUsage ?? rawResponseUsage;
|
|
20697
20698
|
const responseIdentity = adapterResponseId ?? turnId;
|
|
20698
20699
|
if (!text || !usage || !responseIdentity) {
|
|
@@ -20706,7 +20707,8 @@ child.once('close', async () => {
|
|
|
20706
20707
|
}
|
|
20707
20708
|
return {
|
|
20708
20709
|
text,
|
|
20709
|
-
|
|
20710
|
+
reasoningContent,
|
|
20711
|
+
reasoningSummary: null,
|
|
20710
20712
|
requestedModel: request.requestedModel,
|
|
20711
20713
|
effectiveModel: request.thread.effectiveModel,
|
|
20712
20714
|
requestedReasoningEffort: request.requestedReasoningEffort,
|
|
@@ -21013,6 +21015,7 @@ var init_codex_adapter = __esm({
|
|
|
21013
21015
|
});
|
|
21014
21016
|
turnResultReceiptSchema = external_exports.strictObject({
|
|
21015
21017
|
text: external_exports.string().min(1).max(MAX_PROMPT_BYTES2),
|
|
21018
|
+
reasoningContent: external_exports.string().min(1).max(CODEX_REASONING_CONTENT_MAX_UTF8_BYTES).nullable().optional().transform((value) => value ?? null),
|
|
21016
21019
|
reasoningSummary: external_exports.string().min(1).max(CODEX_REASONING_SUMMARY_MAX_UTF8_BYTES).nullable().optional().transform((value) => value ?? null),
|
|
21017
21020
|
requestedModel: external_exports.string().regex(CODEX_MODEL_NAME_PATTERN),
|
|
21018
21021
|
effectiveModel: external_exports.string().regex(CODEX_MODEL_NAME_PATTERN),
|
|
@@ -21025,7 +21028,7 @@ var init_codex_adapter = __esm({
|
|
|
21025
21028
|
timeToFirstTokenMs: external_exports.number().int().nonnegative().max(Number.MAX_SAFE_INTEGER).nullable(),
|
|
21026
21029
|
terminalStatus: external_exports.literal("completed")
|
|
21027
21030
|
}).superRefine((value, context) => {
|
|
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) {
|
|
21031
|
+
if (value.reasoningContent != null && utf8Bytes(value.reasoningContent) > CODEX_REASONING_CONTENT_MAX_UTF8_BYTES || 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) {
|
|
21029
21032
|
context.addIssue({ code: "custom", message: "Invalid Codex recovery usage or identity." });
|
|
21030
21033
|
}
|
|
21031
21034
|
});
|
|
@@ -29107,6 +29110,8 @@ var init_runner = __esm({
|
|
|
29107
29110
|
providerResponseSchemaVersion: null,
|
|
29108
29111
|
providerResponseMaxUtf8Bytes: null,
|
|
29109
29112
|
providerResponseTextMaxUtf8Bytes: null,
|
|
29113
|
+
providerReasoningContentMaxUtf8Bytes: null,
|
|
29114
|
+
providerReasoningContentSupported: false,
|
|
29110
29115
|
providerReasoningSummaryMaxUtf8Bytes: null,
|
|
29111
29116
|
providerReasoningSummarySupported: false
|
|
29112
29117
|
};
|
|
@@ -29116,6 +29121,7 @@ var init_runner = __esm({
|
|
|
29116
29121
|
const properties = objectRecord(outputSchema.properties);
|
|
29117
29122
|
const schemaVersionProperty = objectRecord(properties?.schema_version);
|
|
29118
29123
|
const responseTextProperty = objectRecord(properties?.response_text);
|
|
29124
|
+
const reasoningContentProperty = objectRecord(properties?.reasoning_content);
|
|
29119
29125
|
const reasoningSummaryProperty = objectRecord(properties?.reasoning_summary);
|
|
29120
29126
|
const schemaVersion = schemaVersionProperty?.const;
|
|
29121
29127
|
const requiredFields = outputSchema.required;
|
|
@@ -29125,18 +29131,22 @@ var init_runner = __esm({
|
|
|
29125
29131
|
"finish_reason",
|
|
29126
29132
|
"refusal_status"
|
|
29127
29133
|
];
|
|
29134
|
+
const providerReasoningContentSupported = reasoningContentProperty !== null;
|
|
29128
29135
|
const providerReasoningSummarySupported = reasoningSummaryProperty !== null;
|
|
29129
|
-
const expectedFields = providerReasoningSummarySupported ? [...baseExpectedFields, "reasoning_summary"] : baseExpectedFields;
|
|
29136
|
+
const expectedFields = providerReasoningContentSupported ? [...baseExpectedFields, "reasoning_content"] : providerReasoningSummarySupported ? [...baseExpectedFields, "reasoning_summary"] : baseExpectedFields;
|
|
29130
29137
|
const responseMaxUtf8Bytes = positiveUtf8ByteLimit(
|
|
29131
29138
|
outputSchema["x-vtx-max-utf8-bytes"]
|
|
29132
29139
|
);
|
|
29133
29140
|
const responseTextMaxUtf8Bytes = positiveUtf8ByteLimit(
|
|
29134
29141
|
responseTextProperty?.["x-vtx-max-utf8-bytes"]
|
|
29135
29142
|
);
|
|
29143
|
+
const reasoningContentMaxUtf8Bytes = positiveUtf8ByteLimit(
|
|
29144
|
+
reasoningContentProperty?.["x-vtx-max-utf8-bytes"]
|
|
29145
|
+
);
|
|
29136
29146
|
const reasoningSummaryMaxUtf8Bytes = positiveUtf8ByteLimit(
|
|
29137
29147
|
reasoningSummaryProperty?.["x-vtx-max-utf8-bytes"]
|
|
29138
29148
|
);
|
|
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) {
|
|
29149
|
+
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 || providerReasoningContentSupported && reasoningContentMaxUtf8Bytes === null || providerReasoningSummarySupported && reasoningSummaryMaxUtf8Bytes === null || providerReasoningContentSupported && providerReasoningSummarySupported || responseMaxUtf8Bytes === null) {
|
|
29140
29150
|
throw new InferenceHostRunnerError(
|
|
29141
29151
|
"invalid_output_schema",
|
|
29142
29152
|
"The provider-response output schema does not match the canonical envelope structure."
|
|
@@ -29151,6 +29161,8 @@ var init_runner = __esm({
|
|
|
29151
29161
|
providerResponseSchemaVersion: schemaVersion,
|
|
29152
29162
|
providerResponseMaxUtf8Bytes: responseMaxUtf8Bytes,
|
|
29153
29163
|
providerResponseTextMaxUtf8Bytes: responseTextMaxUtf8Bytes,
|
|
29164
|
+
providerReasoningContentMaxUtf8Bytes: reasoningContentMaxUtf8Bytes,
|
|
29165
|
+
providerReasoningContentSupported,
|
|
29154
29166
|
providerReasoningSummaryMaxUtf8Bytes: reasoningSummaryMaxUtf8Bytes,
|
|
29155
29167
|
providerReasoningSummarySupported
|
|
29156
29168
|
};
|
|
@@ -30085,6 +30097,12 @@ var init_runner = __esm({
|
|
|
30085
30097
|
"Codex response text exceeds the immutable provider-response UTF-8 byte limit."
|
|
30086
30098
|
);
|
|
30087
30099
|
}
|
|
30100
|
+
if (outputContract.providerReasoningContentSupported && outputContract.providerReasoningContentMaxUtf8Bytes !== null && adapterResult.reasoningContent !== null && Buffer.byteLength(adapterResult.reasoningContent, "utf8") > outputContract.providerReasoningContentMaxUtf8Bytes) {
|
|
30101
|
+
throw new InferenceHostRunnerError(
|
|
30102
|
+
"output_schema_reasoning_content_too_large",
|
|
30103
|
+
"Codex reasoning content exceeds the immutable provider-response UTF-8 byte limit."
|
|
30104
|
+
);
|
|
30105
|
+
}
|
|
30088
30106
|
if (outputContract.providerReasoningSummarySupported && outputContract.providerReasoningSummaryMaxUtf8Bytes !== null && adapterResult.reasoningSummary !== null && Buffer.byteLength(adapterResult.reasoningSummary, "utf8") > outputContract.providerReasoningSummaryMaxUtf8Bytes) {
|
|
30089
30107
|
throw new InferenceHostRunnerError(
|
|
30090
30108
|
"output_schema_reasoning_summary_too_large",
|
|
@@ -30096,6 +30114,7 @@ var init_runner = __esm({
|
|
|
30096
30114
|
response_text: adapterResult.text,
|
|
30097
30115
|
finish_reason: finishReason,
|
|
30098
30116
|
refusal_status: refusalStatus,
|
|
30117
|
+
...outputContract.providerReasoningContentSupported ? { reasoning_content: adapterResult.reasoningContent } : {},
|
|
30099
30118
|
...outputContract.providerReasoningSummarySupported ? { reasoning_summary: adapterResult.reasoningSummary } : {}
|
|
30100
30119
|
};
|
|
30101
30120
|
validateOutput(outputContract.providerResponseSchema, providerResponse);
|