@vtxmacro/cli 2026.9.1 → 2026.9.2

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.
@@ -16,7 +16,7 @@ import { fileURLToPath } from "node:url";
16
16
  // agent-cli-release.json
17
17
  var agent_cli_release_default = {
18
18
  package_name: "@vtxmacro/cli",
19
- package_version: "2026.9.1",
19
+ package_version: "2026.9.2",
20
20
  codex_package_name: "@openai/codex",
21
21
  codex_version: "0.147.0",
22
22
  copilot_sdk_package_name: "@github/copilot-sdk",
package/bin/vtx.js CHANGED
@@ -47,7 +47,7 @@ var init_agent_cli_release = __esm({
47
47
  "agent-cli-release.json"() {
48
48
  agent_cli_release_default = {
49
49
  package_name: "@vtxmacro/cli",
50
- package_version: "2026.9.1",
50
+ package_version: "2026.9.2",
51
51
  codex_package_name: "@openai/codex",
52
52
  codex_version: "0.147.0",
53
53
  copilot_sdk_package_name: "@github/copilot-sdk",
@@ -34398,19 +34398,7 @@ var init_runner = __esm({
34398
34398
  "The persisted same-attempt recovery scope is invalid."
34399
34399
  );
34400
34400
  }
34401
- if (!options.resumeReceipt) {
34402
- await options.updateReceipt((current) => {
34403
- const pendingClaimRequest = options.claimRequest && current.pending_claim_request?.claim_request_id === options.claimRequest.claim_request_id ? null : current.pending_claim_request ?? null;
34404
- return {
34405
- ...current,
34406
- pending_claim_request: pendingClaimRequest,
34407
- attempts: { ...current.attempts, [attemptId]: attemptReceipt },
34408
- updated_at: isoAt(now())
34409
- };
34410
- });
34411
- options.onClaimPersisted?.();
34412
- }
34413
- const updateAttempt = async (changes) => {
34401
+ const persistAttempt = async (changes, clearPendingClaim = false) => {
34414
34402
  const nextAttemptReceipt = validateAttemptReceipt({
34415
34403
  ...attemptReceipt,
34416
34404
  ...changes,
@@ -34419,9 +34407,11 @@ var init_runner = __esm({
34419
34407
  attemptReceipt = nextAttemptReceipt;
34420
34408
  await options.updateReceipt((current) => ({
34421
34409
  ...current,
34410
+ pending_claim_request: clearPendingClaim && options.claimRequest && current.pending_claim_request?.claim_request_id === options.claimRequest.claim_request_id ? null : current.pending_claim_request ?? null,
34422
34411
  attempts: { ...current.attempts, [attemptId]: nextAttemptReceipt },
34423
34412
  updated_at: isoAt(now())
34424
34413
  }));
34414
+ if (clearPendingClaim) options.onClaimPersisted?.();
34425
34415
  };
34426
34416
  const removeAttempt = async () => {
34427
34417
  await options.updateReceipt((current) => {
@@ -34429,11 +34419,21 @@ var init_runner = __esm({
34429
34419
  delete attempts[attemptId];
34430
34420
  return {
34431
34421
  ...current,
34422
+ pending_claim_request: options.claimRequest && current.pending_claim_request?.claim_request_id === options.claimRequest.claim_request_id ? null : current.pending_claim_request ?? null,
34432
34423
  attempts,
34433
34424
  updated_at: isoAt(now())
34434
34425
  };
34435
34426
  });
34427
+ options.onClaimPersisted?.();
34436
34428
  };
34429
+ let outputContract = null;
34430
+ let inputValidationError;
34431
+ try {
34432
+ this.validateImmutableSelection(jobInput);
34433
+ outputContract = parseOutputContract(jobInput);
34434
+ } catch (error48) {
34435
+ inputValidationError = error48;
34436
+ }
34437
34437
  if (attemptReceipt.phase === "claimed") {
34438
34438
  const attemptDeadlineAtMs = Math.min(
34439
34439
  Date.parse(claim.deadline_at),
@@ -34493,6 +34493,9 @@ var init_runner = __esm({
34493
34493
  retry_count: retryCount,
34494
34494
  next_delay_ms: retryDelayMs
34495
34495
  });
34496
+ if (!options.resumeReceipt) {
34497
+ await persistAttempt({ phase: "claimed" }, true);
34498
+ }
34496
34499
  await options.sleep(retryDelayMs, signal);
34497
34500
  return "retry_claimed";
34498
34501
  }
@@ -34514,7 +34517,13 @@ var init_runner = __esm({
34514
34517
  );
34515
34518
  providerDispatchNotAfterMs = startCallCompletedAtMs + conservativeRemainingMs;
34516
34519
  }
34517
- await updateAttempt({ phase: "started" });
34520
+ }
34521
+ if (attemptReceipt.phase !== "dispatched") {
34522
+ const providerDispatchable = inputValidationError === void 0 && outputContract !== null;
34523
+ await persistAttempt({
34524
+ phase: providerDispatchable ? "dispatched" : "started",
34525
+ dispatch_outcome: providerDispatchable ? "outcome_unknown" : "not_dispatched"
34526
+ }, !options.resumeReceipt);
34518
34527
  }
34519
34528
  let adapterResult;
34520
34529
  let heartbeatFailure;
@@ -34547,7 +34556,7 @@ var init_runner = __esm({
34547
34556
  sequence,
34548
34557
  observed_at: isoAt(now())
34549
34558
  };
34550
- await updateAttempt({ job_heartbeat_sequence: sequence });
34559
+ await persistAttempt({ job_heartbeat_sequence: sequence });
34551
34560
  const heartbeatDeadlineAtMs = Date.parse(claim.deadline_at);
34552
34561
  const directive = await retryExact(
34553
34562
  () => mcp.callTool(
@@ -34581,12 +34590,13 @@ var init_runner = __esm({
34581
34590
  await heartbeatLoop;
34582
34591
  };
34583
34592
  try {
34584
- this.validateImmutableSelection(jobInput);
34585
- const outputContract = parseOutputContract(jobInput);
34586
- await updateAttempt({
34587
- phase: "dispatched",
34588
- dispatch_outcome: "outcome_unknown"
34589
- });
34593
+ if (inputValidationError !== void 0) throw inputValidationError;
34594
+ if (outputContract === null) {
34595
+ throw new InferenceHostRunnerError(
34596
+ "invalid_output_schema",
34597
+ "The external inference output contract is unavailable."
34598
+ );
34599
+ }
34590
34600
  if (options.resumeReceipt?.phase === "dispatched" && !sameAttemptRecovery) {
34591
34601
  throw new CodexAppServerError({
34592
34602
  message: `${adapterId} cannot prove the exact result of the interrupted attempt.`,
@@ -34622,7 +34632,7 @@ var init_runner = __esm({
34622
34632
  },
34623
34633
  signal: attemptAbort.signal
34624
34634
  });
34625
- await updateAttempt({
34635
+ await persistAttempt({
34626
34636
  phase: "dispatched",
34627
34637
  dispatch_outcome: "confirmed_dispatched"
34628
34638
  });
@@ -34742,7 +34752,7 @@ var init_runner = __esm({
34742
34752
  response_mode: "decision_candidate",
34743
34753
  decision_candidate_sha256: resultEnvelope.plaintext_sha256
34744
34754
  });
34745
- await updateAttempt({
34755
+ await persistAttempt({
34746
34756
  phase: "terminal_pending",
34747
34757
  terminal_operation_id: completionId,
34748
34758
  terminal_request: completion
@@ -34814,7 +34824,7 @@ var init_runner = __esm({
34814
34824
  effectiveEffort: adapterResult?.effectiveReasoningEffort ?? classified.effectiveEffort
34815
34825
  } : classified;
34816
34826
  const dispatchOutcome = heartbeatAmbiguous ? "outcome_unknown" : error48 instanceof CodexAppServerError ? error48.dispatchOutcome : failure.dispatchOutcome;
34817
- await updateAttempt({
34827
+ await persistAttempt({
34818
34828
  phase: dispatchOutcome === "not_dispatched" ? "started" : "dispatched",
34819
34829
  dispatch_outcome: dispatchOutcome
34820
34830
  });
@@ -34866,7 +34876,7 @@ var init_runner = __esm({
34866
34876
  }),
34867
34877
  failed_at: isoAt(now())
34868
34878
  });
34869
- await updateAttempt({
34879
+ await persistAttempt({
34870
34880
  phase: "terminal_pending",
34871
34881
  terminal_operation_id: failureId,
34872
34882
  terminal_request: failureRequest
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vtxmacro/cli",
3
- "version": "2026.9.1",
3
+ "version": "2026.9.2",
4
4
  "description": "VTX Macro CLI, MCP server, and durable external inference host.",
5
5
  "type": "module",
6
6
  "license": "UNLICENSED",