@vtxmacro/cli 2026.8.28 → 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 +45 -16
- 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: {
|
|
@@ -20330,6 +20331,9 @@ child.once('close', async () => {
|
|
|
20330
20331
|
let adapterResponseId = null;
|
|
20331
20332
|
let firstTokenAt = null;
|
|
20332
20333
|
let terminal = null;
|
|
20334
|
+
let completedReasoningObserved = false;
|
|
20335
|
+
let completedReasoningSequence = 0;
|
|
20336
|
+
const completedReasoningContent = /* @__PURE__ */ new Map();
|
|
20333
20337
|
let terminalResolve;
|
|
20334
20338
|
let terminalReject;
|
|
20335
20339
|
const terminalPromise = new Promise((resolve6, reject) => {
|
|
@@ -20397,7 +20401,7 @@ child.once('close', async () => {
|
|
|
20397
20401
|
if (method === "thread/settings/updated") {
|
|
20398
20402
|
const settings = objectOrNull(params.threadSettings);
|
|
20399
20403
|
const permission = objectOrNull(settings?.activePermissionProfile);
|
|
20400
|
-
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) {
|
|
20401
20405
|
terminalReject(new CodexAppServerError({
|
|
20402
20406
|
message: "Codex effective turn settings changed after dispatch.",
|
|
20403
20407
|
category: "adapter",
|
|
@@ -20449,6 +20453,15 @@ child.once('close', async () => {
|
|
|
20449
20453
|
}));
|
|
20450
20454
|
return;
|
|
20451
20455
|
}
|
|
20456
|
+
if (method === "item/completed" && item.type === "reasoning") {
|
|
20457
|
+
completedReasoningObserved = true;
|
|
20458
|
+
const itemId = String(item.id || params.itemId || "").trim();
|
|
20459
|
+
const itemKey = itemId ? `id:${itemId}` : `sequence:${completedReasoningSequence++}`;
|
|
20460
|
+
completedReasoningContent.set(
|
|
20461
|
+
itemKey,
|
|
20462
|
+
Array.isArray(item.content) ? item.content : []
|
|
20463
|
+
);
|
|
20464
|
+
}
|
|
20452
20465
|
}
|
|
20453
20466
|
const observedUsage = usageFromNotification(method, params);
|
|
20454
20467
|
if (method === "rawResponse/completed") {
|
|
@@ -20488,7 +20501,7 @@ child.once('close', async () => {
|
|
|
20488
20501
|
model: request.requestedModel,
|
|
20489
20502
|
serviceTier: "default",
|
|
20490
20503
|
effort: request.requestedReasoningEffort,
|
|
20491
|
-
summary: "
|
|
20504
|
+
summary: "none",
|
|
20492
20505
|
outputSchema: request.outputSchema
|
|
20493
20506
|
}, {
|
|
20494
20507
|
timeoutMs: remaining(),
|
|
@@ -20677,12 +20690,10 @@ child.once('close', async () => {
|
|
|
20677
20690
|
const fallbackMessages = items.filter((item) => item?.type === "agentMessage" && item.phase == null);
|
|
20678
20691
|
const answerItem = finalMessages.at(-1) ?? fallbackMessages.at(-1);
|
|
20679
20692
|
const text = typeof answerItem?.text === "string" ? answerItem.text : "";
|
|
20680
|
-
const
|
|
20681
|
-
|
|
20682
|
-
|
|
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;
|
|
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;
|
|
20686
20697
|
const usage = threadUsage ?? rawResponseUsage;
|
|
20687
20698
|
const responseIdentity = adapterResponseId ?? turnId;
|
|
20688
20699
|
if (!text || !usage || !responseIdentity) {
|
|
@@ -20696,7 +20707,8 @@ child.once('close', async () => {
|
|
|
20696
20707
|
}
|
|
20697
20708
|
return {
|
|
20698
20709
|
text,
|
|
20699
|
-
|
|
20710
|
+
reasoningContent,
|
|
20711
|
+
reasoningSummary: null,
|
|
20700
20712
|
requestedModel: request.requestedModel,
|
|
20701
20713
|
effectiveModel: request.thread.effectiveModel,
|
|
20702
20714
|
requestedReasoningEffort: request.requestedReasoningEffort,
|
|
@@ -21003,6 +21015,7 @@ var init_codex_adapter = __esm({
|
|
|
21003
21015
|
});
|
|
21004
21016
|
turnResultReceiptSchema = external_exports.strictObject({
|
|
21005
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),
|
|
21006
21019
|
reasoningSummary: external_exports.string().min(1).max(CODEX_REASONING_SUMMARY_MAX_UTF8_BYTES).nullable().optional().transform((value) => value ?? null),
|
|
21007
21020
|
requestedModel: external_exports.string().regex(CODEX_MODEL_NAME_PATTERN),
|
|
21008
21021
|
effectiveModel: external_exports.string().regex(CODEX_MODEL_NAME_PATTERN),
|
|
@@ -21015,7 +21028,7 @@ var init_codex_adapter = __esm({
|
|
|
21015
21028
|
timeToFirstTokenMs: external_exports.number().int().nonnegative().max(Number.MAX_SAFE_INTEGER).nullable(),
|
|
21016
21029
|
terminalStatus: external_exports.literal("completed")
|
|
21017
21030
|
}).superRefine((value, context) => {
|
|
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) {
|
|
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) {
|
|
21019
21032
|
context.addIssue({ code: "custom", message: "Invalid Codex recovery usage or identity." });
|
|
21020
21033
|
}
|
|
21021
21034
|
});
|
|
@@ -29097,6 +29110,8 @@ var init_runner = __esm({
|
|
|
29097
29110
|
providerResponseSchemaVersion: null,
|
|
29098
29111
|
providerResponseMaxUtf8Bytes: null,
|
|
29099
29112
|
providerResponseTextMaxUtf8Bytes: null,
|
|
29113
|
+
providerReasoningContentMaxUtf8Bytes: null,
|
|
29114
|
+
providerReasoningContentSupported: false,
|
|
29100
29115
|
providerReasoningSummaryMaxUtf8Bytes: null,
|
|
29101
29116
|
providerReasoningSummarySupported: false
|
|
29102
29117
|
};
|
|
@@ -29106,6 +29121,7 @@ var init_runner = __esm({
|
|
|
29106
29121
|
const properties = objectRecord(outputSchema.properties);
|
|
29107
29122
|
const schemaVersionProperty = objectRecord(properties?.schema_version);
|
|
29108
29123
|
const responseTextProperty = objectRecord(properties?.response_text);
|
|
29124
|
+
const reasoningContentProperty = objectRecord(properties?.reasoning_content);
|
|
29109
29125
|
const reasoningSummaryProperty = objectRecord(properties?.reasoning_summary);
|
|
29110
29126
|
const schemaVersion = schemaVersionProperty?.const;
|
|
29111
29127
|
const requiredFields = outputSchema.required;
|
|
@@ -29115,18 +29131,22 @@ var init_runner = __esm({
|
|
|
29115
29131
|
"finish_reason",
|
|
29116
29132
|
"refusal_status"
|
|
29117
29133
|
];
|
|
29134
|
+
const providerReasoningContentSupported = reasoningContentProperty !== null;
|
|
29118
29135
|
const providerReasoningSummarySupported = reasoningSummaryProperty !== null;
|
|
29119
|
-
const expectedFields = providerReasoningSummarySupported ? [...baseExpectedFields, "reasoning_summary"] : baseExpectedFields;
|
|
29136
|
+
const expectedFields = providerReasoningContentSupported ? [...baseExpectedFields, "reasoning_content"] : providerReasoningSummarySupported ? [...baseExpectedFields, "reasoning_summary"] : baseExpectedFields;
|
|
29120
29137
|
const responseMaxUtf8Bytes = positiveUtf8ByteLimit(
|
|
29121
29138
|
outputSchema["x-vtx-max-utf8-bytes"]
|
|
29122
29139
|
);
|
|
29123
29140
|
const responseTextMaxUtf8Bytes = positiveUtf8ByteLimit(
|
|
29124
29141
|
responseTextProperty?.["x-vtx-max-utf8-bytes"]
|
|
29125
29142
|
);
|
|
29143
|
+
const reasoningContentMaxUtf8Bytes = positiveUtf8ByteLimit(
|
|
29144
|
+
reasoningContentProperty?.["x-vtx-max-utf8-bytes"]
|
|
29145
|
+
);
|
|
29126
29146
|
const reasoningSummaryMaxUtf8Bytes = positiveUtf8ByteLimit(
|
|
29127
29147
|
reasoningSummaryProperty?.["x-vtx-max-utf8-bytes"]
|
|
29128
29148
|
);
|
|
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) {
|
|
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) {
|
|
29130
29150
|
throw new InferenceHostRunnerError(
|
|
29131
29151
|
"invalid_output_schema",
|
|
29132
29152
|
"The provider-response output schema does not match the canonical envelope structure."
|
|
@@ -29141,6 +29161,8 @@ var init_runner = __esm({
|
|
|
29141
29161
|
providerResponseSchemaVersion: schemaVersion,
|
|
29142
29162
|
providerResponseMaxUtf8Bytes: responseMaxUtf8Bytes,
|
|
29143
29163
|
providerResponseTextMaxUtf8Bytes: responseTextMaxUtf8Bytes,
|
|
29164
|
+
providerReasoningContentMaxUtf8Bytes: reasoningContentMaxUtf8Bytes,
|
|
29165
|
+
providerReasoningContentSupported,
|
|
29144
29166
|
providerReasoningSummaryMaxUtf8Bytes: reasoningSummaryMaxUtf8Bytes,
|
|
29145
29167
|
providerReasoningSummarySupported
|
|
29146
29168
|
};
|
|
@@ -30075,6 +30097,12 @@ var init_runner = __esm({
|
|
|
30075
30097
|
"Codex response text exceeds the immutable provider-response UTF-8 byte limit."
|
|
30076
30098
|
);
|
|
30077
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
|
+
}
|
|
30078
30106
|
if (outputContract.providerReasoningSummarySupported && outputContract.providerReasoningSummaryMaxUtf8Bytes !== null && adapterResult.reasoningSummary !== null && Buffer.byteLength(adapterResult.reasoningSummary, "utf8") > outputContract.providerReasoningSummaryMaxUtf8Bytes) {
|
|
30079
30107
|
throw new InferenceHostRunnerError(
|
|
30080
30108
|
"output_schema_reasoning_summary_too_large",
|
|
@@ -30086,6 +30114,7 @@ var init_runner = __esm({
|
|
|
30086
30114
|
response_text: adapterResult.text,
|
|
30087
30115
|
finish_reason: finishReason,
|
|
30088
30116
|
refusal_status: refusalStatus,
|
|
30117
|
+
...outputContract.providerReasoningContentSupported ? { reasoning_content: adapterResult.reasoningContent } : {},
|
|
30089
30118
|
...outputContract.providerReasoningSummarySupported ? { reasoning_summary: adapterResult.reasoningSummary } : {}
|
|
30090
30119
|
};
|
|
30091
30120
|
validateOutput(outputContract.providerResponseSchema, providerResponse);
|