coding-friend-cli 1.33.0 → 1.33.1

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.
@@ -1,8 +1,6 @@
1
1
  import {
2
2
  memoryConfigMenu
3
3
  } from "./chunk-NZKIYVIK.js";
4
- import "./chunk-LK6HFD35.js";
5
- import "./chunk-RZRT7NGT.js";
6
4
  import {
7
5
  findStatuslineHookPath,
8
6
  getCurrentAccountEmail,
@@ -413,6 +411,68 @@ async function editAutoApprove(globalCfg, localCfg) {
413
411
  log.dim("Docs: https://cf.dinhanhthi.com/docs/reference/auto-approve/");
414
412
  }
415
413
  }
414
+ function buildCodexConfig(input2) {
415
+ return {
416
+ enabled: input2.enabled,
417
+ modes: input2.modes,
418
+ effort: input2.effort
419
+ };
420
+ }
421
+ async function editCodex(globalCfg, localCfg) {
422
+ const current = localCfg?.codex ?? globalCfg?.codex;
423
+ const defaults = DEFAULT_CONFIG.codex;
424
+ if (current !== void 0) {
425
+ log.dim(
426
+ `Current: enabled=${current.enabled}, modes=${(current.modes ?? []).join(",") || "(none)"}, effort=${current.effort}`
427
+ );
428
+ }
429
+ const enabled = await confirm({
430
+ message: "Enable Codex as 6th specialist in /cf-review? (requires `codex` CLI in PATH)",
431
+ default: current?.enabled ?? defaults.enabled
432
+ });
433
+ const modes = await checkbox({
434
+ message: "Which review modes should Codex run in?",
435
+ choices: [
436
+ { name: "QUICK (\u22643 files, \u226450 lines)", value: "QUICK" },
437
+ { name: "STANDARD (4\u201310 files or 51\u2013300 lines)", value: "STANDARD" },
438
+ {
439
+ name: "DEEP (>10 files, >300 lines, or sensitive paths)",
440
+ value: "DEEP"
441
+ }
442
+ ],
443
+ default: current?.modes ?? defaults.modes
444
+ });
445
+ if (modes.length === 0) {
446
+ log.dim(
447
+ "Warning: no modes selected \u2014 Codex will never run. Select at least one mode."
448
+ );
449
+ }
450
+ const effort = await select({
451
+ message: "Codex reasoning effort level:",
452
+ choices: [
453
+ { name: "minimal \u2014 fastest, least thorough", value: "minimal" },
454
+ { name: "low", value: "low" },
455
+ { name: "medium (default)", value: "medium" },
456
+ { name: "high", value: "high" },
457
+ { name: "xhigh \u2014 slowest, most thorough", value: "xhigh" }
458
+ ],
459
+ default: current?.effort ?? defaults.effort
460
+ });
461
+ const scope = await askScope();
462
+ if (scope === "back") return;
463
+ const codexCfg = buildCodexConfig({ enabled, modes, effort });
464
+ writeToScope(scope, { codex: codexCfg });
465
+ if (enabled) {
466
+ log.dim(
467
+ "Tip: make sure `codex` CLI is installed \u2014 `npm install -g @openai/codex`"
468
+ );
469
+ log.dim(
470
+ "Docs: https://cf.dinhanhthi.com/docs/configuration/config-json/#codex"
471
+ );
472
+ } else {
473
+ log.dim("Codex disabled.");
474
+ }
475
+ }
416
476
  async function editStatusline() {
417
477
  const hookResult = findStatuslineHookPath();
418
478
  if (!hookResult) {
@@ -626,6 +686,8 @@ async function configCommand() {
626
686
  globalCfg,
627
687
  localCfg
628
688
  );
689
+ const codexScope = getScopeLabel("codex", globalCfg, localCfg);
690
+ const codexEnabled = getMergedValue("codex", globalCfg, localCfg)?.enabled;
629
691
  const statuslineStatus = isStatuslineConfigured() ? chalk.green("configured") : chalk.yellow("not configured");
630
692
  const completionStatus = hasShellCompletion() ? chalk.green("installed") : chalk.yellow("not installed");
631
693
  const projectRules = getExistingRules(claudeLocalSettingsPath());
@@ -666,6 +728,11 @@ async function configCommand() {
666
728
  value: "autoApprove",
667
729
  description: " Auto-approve safe tool calls, block destructive ones, prompt for ambiguous"
668
730
  },
731
+ {
732
+ name: `Codex cross-engine review ${formatScopeLabel(codexScope)}${codexEnabled !== void 0 ? ` (${codexEnabled ? "enabled" : "disabled"})` : ""}`,
733
+ value: "codex",
734
+ description: " Enable OpenAI Codex as 6th specialist in /cf-review (opt-in)"
735
+ },
669
736
  {
670
737
  name: `Statusline (${statuslineStatus})`,
671
738
  value: "statusline",
@@ -709,6 +776,9 @@ async function configCommand() {
709
776
  case "autoApprove":
710
777
  await editAutoApprove(globalCfg, localCfg);
711
778
  break;
779
+ case "codex":
780
+ await editCodex(globalCfg, localCfg);
781
+ break;
712
782
  case "statusline":
713
783
  await editStatusline();
714
784
  break;
@@ -725,6 +795,9 @@ async function configCommand() {
725
795
  console.log();
726
796
  }
727
797
  }
798
+
728
799
  export {
800
+ buildCodexConfig,
801
+ editCodex,
729
802
  configCommand
730
803
  };
@@ -0,0 +1,22 @@
1
+ import {
2
+ buildCodexConfig,
3
+ configCommand,
4
+ editCodex
5
+ } from "./chunk-OV4AUDXL.js";
6
+ import "./chunk-NZKIYVIK.js";
7
+ import "./chunk-LK6HFD35.js";
8
+ import "./chunk-RZRT7NGT.js";
9
+ import "./chunk-XOHLBLN2.js";
10
+ import "./chunk-OYPOADCX.js";
11
+ import "./chunk-DMJCO6LJ.js";
12
+ import "./chunk-Z5Q533UG.js";
13
+ import "./chunk-TWKNGPBO.js";
14
+ import "./chunk-EVGXUDX4.js";
15
+ import "./chunk-NREZK463.js";
16
+ import "./chunk-O27FVQFU.js";
17
+ import "./chunk-5UVDWG5L.js";
18
+ export {
19
+ buildCodexConfig,
20
+ configCommand,
21
+ editCodex
22
+ };
package/dist/index.js CHANGED
@@ -30,11 +30,11 @@ program.command("enable").description("Re-enable the Coding Friend plugin").opti
30
30
  await enableCommand(opts);
31
31
  });
32
32
  program.command("init").description("Initialize coding-friend in current project").action(async () => {
33
- const { initCommand } = await import("./init-QZG3RV5S.js");
33
+ const { initCommand } = await import("./init-HS4EXSXW.js");
34
34
  await initCommand();
35
35
  });
36
36
  program.command("config").description("Manage Coding Friend configuration").action(async () => {
37
- const { configCommand } = await import("./config-TAYQIBPL.js");
37
+ const { configCommand } = await import("./config-2OJTBZU2.js");
38
38
  await configCommand();
39
39
  });
40
40
  program.command("host").description("Build and serve learning docs as a static website").argument("[path]", "path to docs folder").option("-p, --port <port>", "port number", "3333").action(async (path, opts) => {
@@ -1,3 +1,6 @@
1
+ import {
2
+ editCodex
3
+ } from "./chunk-OV4AUDXL.js";
1
4
  import {
2
5
  ensureMemoryBuilt,
3
6
  isMemoryInitialized,
@@ -741,6 +744,8 @@ async function initMenu(gitAvailable) {
741
744
  globalCfg,
742
745
  localCfg
743
746
  );
747
+ const codexScope = getScopeLabel("codex", globalCfg, localCfg);
748
+ const codexEnabled = getMergedValue("codex", globalCfg, localCfg)?.enabled;
744
749
  const projectRules = getExistingRules(claudeLocalSettingsPath());
745
750
  const userRules = getExistingRules(claudeSettingsPath());
746
751
  const allRules = getAllRules();
@@ -792,6 +797,11 @@ async function initMenu(gitAvailable) {
792
797
  value: "autoApprove",
793
798
  description: " Auto-approve safe tool calls, block destructive ones, prompt for ambiguous"
794
799
  },
800
+ {
801
+ name: `Codex cross-engine review ${formatScopeLabel(codexScope)}${codexEnabled !== void 0 ? ` (${codexEnabled ? "enabled" : "disabled"})` : ""}`,
802
+ value: "codex",
803
+ description: " Enable OpenAI Codex as 6th specialist in /cf-review (opt-in)"
804
+ },
795
805
  {
796
806
  name: `Permissions (${permissionStatus} rules)`,
797
807
  value: "permissions",
@@ -860,6 +870,9 @@ async function initMenu(gitAvailable) {
860
870
  }
861
871
  break;
862
872
  }
873
+ case "codex":
874
+ await editCodex(globalCfg, localCfg);
875
+ break;
863
876
  case "permissions": {
864
877
  const learnCfg = localCfg?.learn ?? globalCfg?.learn;
865
878
  const learnOutputDir = learnCfg?.outputDir || `${docsDir}/learn`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "coding-friend-cli",
3
- "version": "1.33.0",
3
+ "version": "1.33.1",
4
4
  "description": "CLI for coding-friend — host learning docs, setup MCP server, initialize projects",
5
5
  "type": "module",
6
6
  "bin": {