@staff0rd/assist 0.786.1 → 0.788.0

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/dist/index.js CHANGED
@@ -6,7 +6,7 @@ import { Command } from "commander";
6
6
  // package.json
7
7
  var package_default = {
8
8
  name: "@staff0rd/assist",
9
- version: "0.786.1",
9
+ version: "0.788.0",
10
10
  type: "module",
11
11
  main: "dist/index.js",
12
12
  bin: {
@@ -36046,9 +36046,10 @@ async function ensureCodexAvailable() {
36046
36046
  }
36047
36047
 
36048
36048
  // src/commands/review/planCodexReviewer.ts
36049
- async function planCodexReviewer(codexPath) {
36049
+ async function planCodexReviewer(codexPath, slotAssigned) {
36050
36050
  const cached = cachedReviewerResult("codex", codexPath);
36051
36051
  if (cached) return { kind: "cached", cached };
36052
+ if (slotAssigned) return { kind: "run" };
36052
36053
  const status2 = await ensureCodexAvailable();
36053
36054
  if (status2 === "available") return { kind: "run" };
36054
36055
  return { kind: "skipped" };
@@ -36192,6 +36193,11 @@ The review request is at: ${requestPath}
36192
36193
  `;
36193
36194
  }
36194
36195
 
36196
+ // src/commands/review/buildCodexModelArgs.ts
36197
+ function buildCodexModelArgs() {
36198
+ return buildLitellmCodexArgs(loadConfig().review?.codexModel);
36199
+ }
36200
+
36195
36201
  // src/commands/review/runClaudeReviewer.ts
36196
36202
  import { writeFileSync as writeFileSync41 } from "fs";
36197
36203
 
@@ -36551,27 +36557,6 @@ async function runClaudeReviewer(spec) {
36551
36557
  );
36552
36558
  }
36553
36559
 
36554
- // src/commands/review/resolveClaude.ts
36555
- function resolveClaude(args) {
36556
- if (args.cached) return Promise.resolve(args.cached);
36557
- const spinner = args.multi?.create(
36558
- `${reviewerLabel("claude", args.override?.model)} \u2014 starting`
36559
- );
36560
- return runClaudeReviewer({
36561
- name: "claude",
36562
- reviewDir: args.reviewDir,
36563
- stdin: args.stdin,
36564
- outputPath: args.claudePath,
36565
- spinner,
36566
- override: args.override
36567
- });
36568
- }
36569
-
36570
- // src/commands/review/buildCodexModelArgs.ts
36571
- function buildCodexModelArgs() {
36572
- return buildLitellmCodexArgs(loadConfig().review?.codexModel);
36573
- }
36574
-
36575
36560
  // src/commands/review/runCodexReviewer.ts
36576
36561
  import { existsSync as existsSync66, unlinkSync as unlinkSync18 } from "fs";
36577
36562
 
@@ -36643,22 +36628,52 @@ async function runCodexReviewer(spec) {
36643
36628
  );
36644
36629
  }
36645
36630
 
36631
+ // src/commands/review/runSlot.ts
36632
+ function runSlot(harness, spec) {
36633
+ if (harness === "claude") return runClaudeReviewer(spec);
36634
+ return runCodexReviewer({
36635
+ name: spec.name,
36636
+ stdin: spec.stdin,
36637
+ outputPath: spec.outputPath,
36638
+ spinner: spec.spinner,
36639
+ override: spec.override ?? buildCodexModelArgs()
36640
+ });
36641
+ }
36642
+
36643
+ // src/commands/review/resolveClaude.ts
36644
+ function resolveClaude(args) {
36645
+ if (args.cached) return Promise.resolve(args.cached);
36646
+ const override = args.slot?.override;
36647
+ const spinner = args.multi?.create(
36648
+ `${reviewerLabel("claude", override?.model)} \u2014 starting`
36649
+ );
36650
+ return runSlot(args.slot?.harness ?? "claude", {
36651
+ name: "claude",
36652
+ reviewDir: args.reviewDir,
36653
+ stdin: args.stdin,
36654
+ outputPath: args.claudePath,
36655
+ spinner,
36656
+ override
36657
+ });
36658
+ }
36659
+
36646
36660
  // src/commands/review/resolveCodex.ts
36647
36661
  function resolveCodex(args) {
36648
36662
  if (args.plan.kind === "cached") return Promise.resolve(args.plan.cached);
36649
36663
  if (args.plan.kind === "skipped") {
36650
36664
  return Promise.resolve(skippedCodexResult(args.codexPath));
36651
36665
  }
36652
- const override = args.override ?? buildCodexModelArgs();
36666
+ const override = args.slot?.override ?? buildCodexModelArgs();
36653
36667
  const spinner = args.multi?.create(
36654
36668
  `${reviewerLabel("codex", override.model)} \u2014 starting`
36655
36669
  );
36656
- return runCodexReviewer({
36670
+ return runSlot(args.slot?.harness ?? "codex", {
36657
36671
  name: "codex",
36672
+ reviewDir: args.reviewDir,
36658
36673
  stdin: args.stdin,
36659
36674
  outputPath: args.codexPath,
36660
- override,
36661
- spinner
36675
+ spinner,
36676
+ override
36662
36677
  });
36663
36678
  }
36664
36679
 
@@ -36670,14 +36685,15 @@ async function runReviewers(reviewDir, claudePath, codexPath, stdinPrompt, optio
36670
36685
  stdin: stdinPrompt,
36671
36686
  cached: options2.cachedClaude,
36672
36687
  multi: options2.multi,
36673
- override: options2.models.claude
36688
+ slot: options2.models.claude
36674
36689
  });
36675
36690
  const codexPromise = resolveCodex({
36691
+ reviewDir,
36676
36692
  codexPath,
36677
36693
  stdin: stdinPrompt,
36678
36694
  plan: options2.codexPlan,
36679
36695
  multi: options2.multi,
36680
- override: options2.models.codex
36696
+ slot: options2.models.codex
36681
36697
  });
36682
36698
  const results = await Promise.all([claudePromise, codexPromise]);
36683
36699
  const anyFresh = options2.cachedClaude === null || options2.codexPlan.kind !== "cached";
@@ -36761,11 +36777,12 @@ async function synthesise(paths, options2) {
36761
36777
  printSummary2(paths.synthesisPath);
36762
36778
  return cached;
36763
36779
  }
36764
- const { multi, override } = options2;
36780
+ const { multi, slot } = options2;
36781
+ const override = slot?.override;
36765
36782
  const spinner = multi?.create(
36766
36783
  `${reviewerLabel("synthesis", override?.model)} \u2014 starting`
36767
36784
  );
36768
- const result = await runClaudeReviewer({
36785
+ const result = await runSlot(slot?.harness ?? "claude", {
36769
36786
  name: "synthesis",
36770
36787
  reviewDir: paths.reviewDir,
36771
36788
  stdin: buildSynthesisStdin(
@@ -36819,7 +36836,7 @@ async function runAndSynthesise(args) {
36819
36836
  }
36820
36837
  const synthesisResult = await synthesise(paths, {
36821
36838
  multi,
36822
- override: args.models.claude
36839
+ slot: args.models.synthesis
36823
36840
  });
36824
36841
  if (synthesisResult.exitCode !== 0) failures.push(synthesisResult);
36825
36842
  return { ok: synthesisResult.exitCode === 0, failures };
@@ -36852,7 +36869,10 @@ function reportFailures(failures, usingSpinner) {
36852
36869
  }
36853
36870
  async function runReviewPipeline(paths, options2) {
36854
36871
  const cachedClaude = cachedReviewerResult("claude", paths.claudePath);
36855
- const codexPlan = await planCodexReviewer(paths.codexPath);
36872
+ const codexPlan = await planCodexReviewer(
36873
+ paths.codexPath,
36874
+ options2.models?.codex !== void 0
36875
+ );
36856
36876
  const ui = createUi(useSpinnerUi(options2.verbose));
36857
36877
  try {
36858
36878
  const outcome = await runAndSynthesise({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@staff0rd/assist",
3
- "version": "0.786.1",
3
+ "version": "0.788.0",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "bin": {