@vexdo/cli 0.2.3 → 0.2.4

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/dist/index.js +11 -4
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -16,6 +16,7 @@ var DEFAULT_REVIEW_MODEL = "claude-haiku-4-5-20251001";
16
16
  var DEFAULT_MAX_ITERATIONS = 3;
17
17
  var DEFAULT_AUTO_SUBMIT = false;
18
18
  var DEFAULT_CODEX_MODEL = "gpt-4o";
19
+ var DEFAULT_CODEX_BASE_BRANCH = "main";
19
20
  function isRecord(value) {
20
21
  return typeof value === "object" && value !== null;
21
22
  }
@@ -93,14 +94,16 @@ function parseMaxConcurrent(value) {
93
94
  }
94
95
  function parseCodex(value) {
95
96
  if (value === void 0) {
96
- return { model: DEFAULT_CODEX_MODEL };
97
+ return { model: DEFAULT_CODEX_MODEL, base_branch: DEFAULT_CODEX_BASE_BRANCH };
97
98
  }
98
99
  if (!isRecord(value)) {
99
100
  throw new Error("codex must be an object");
100
101
  }
101
102
  const modelRaw = readObjectField(value, "model");
102
103
  const model = modelRaw === void 0 ? DEFAULT_CODEX_MODEL : requireString(modelRaw, "codex.model");
103
- return { model };
104
+ const baseBranchRaw = readObjectField(value, "base_branch");
105
+ const base_branch = baseBranchRaw === void 0 ? DEFAULT_CODEX_BASE_BRANCH : requireString(baseBranchRaw, "codex.base_branch");
106
+ return { model, base_branch };
104
107
  }
105
108
  function findProjectRoot(startDir = process.cwd()) {
106
109
  let current = path.resolve(startDir);
@@ -1224,7 +1227,11 @@ async function checkCodexAvailable() {
1224
1227
  }
1225
1228
  }
1226
1229
  async function submitTask(prompt, options) {
1227
- const args = ["cloud", "exec", "--env", options?.envId ?? "", prompt];
1230
+ const args = ["cloud", "exec", "--env", options?.envId ?? ""];
1231
+ if (options?.branch) {
1232
+ args.push("--branch", options.branch);
1233
+ }
1234
+ args.push(prompt);
1228
1235
  const result = await runCodexCommand(args, { cwd: options?.cwd });
1229
1236
  const sessionId = parseSessionId(result.stdout);
1230
1237
  if (result.exitCode !== 0 || !sessionId) {
@@ -2282,7 +2289,7 @@ async function runStart(taskFile, options) {
2282
2289
  }
2283
2290
  const envId = options.dryRun ? void 0 : resolveCodexEnvId(step.service, serviceCfg.env_id);
2284
2291
  scopedLogger.info("Submitting to Codex Cloud...");
2285
- const submissionSession = stepState.session_id ?? await submitTask(step.spec, { cwd: serviceRoot, envId });
2292
+ const submissionSession = stepState.session_id ?? await submitTask(step.spec, { cwd: serviceRoot, envId, branch: config.codex.base_branch });
2286
2293
  await updateStep(projectRoot, task.id, step.service, { session_id: submissionSession });
2287
2294
  const execution = await runCloudReviewLoop({
2288
2295
  taskId: task.id,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vexdo/cli",
3
- "version": "0.2.3",
3
+ "version": "0.2.4",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "bin": {