@nathapp/nax 0.35.0 → 0.36.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.
Files changed (50) hide show
  1. package/bin/nax.ts +18 -9
  2. package/dist/nax.js +1283 -662
  3. package/package.json +1 -1
  4. package/src/agents/adapters/aider.ts +135 -0
  5. package/src/agents/adapters/gemini.ts +177 -0
  6. package/src/agents/adapters/opencode.ts +106 -0
  7. package/src/agents/claude-decompose.ts +3 -3
  8. package/src/agents/index.ts +2 -0
  9. package/src/agents/registry.ts +6 -2
  10. package/src/agents/version-detection.ts +109 -0
  11. package/src/cli/agents.ts +87 -0
  12. package/src/cli/config.ts +28 -14
  13. package/src/cli/constitution.ts +0 -92
  14. package/src/cli/generate.ts +1 -1
  15. package/src/cli/index.ts +1 -0
  16. package/src/constitution/generator.ts +0 -33
  17. package/src/constitution/index.ts +2 -1
  18. package/src/constitution/loader.ts +1 -13
  19. package/src/context/builder.ts +1 -2
  20. package/src/context/elements.ts +1 -12
  21. package/src/context/generator.ts +4 -0
  22. package/src/context/generators/codex.ts +28 -0
  23. package/src/context/generators/gemini.ts +28 -0
  24. package/src/context/index.ts +2 -1
  25. package/src/context/test-scanner.ts +1 -1
  26. package/src/context/types.ts +1 -1
  27. package/src/interaction/chain.ts +17 -1
  28. package/src/pipeline/stages/execution.ts +25 -40
  29. package/src/pipeline/stages/routing.ts +8 -2
  30. package/src/precheck/checks-agents.ts +63 -0
  31. package/src/precheck/checks.ts +3 -0
  32. package/src/precheck/index.ts +2 -0
  33. package/src/prompts/builder.ts +13 -6
  34. package/src/prompts/sections/conventions.ts +5 -7
  35. package/src/prompts/sections/isolation.ts +7 -7
  36. package/src/prompts/sections/role-task.ts +64 -64
  37. package/src/review/orchestrator.ts +11 -1
  38. package/src/routing/strategies/llm-prompts.ts +1 -1
  39. package/src/routing/strategies/llm.ts +3 -3
  40. package/src/tdd/index.ts +2 -3
  41. package/src/tdd/isolation.ts +0 -13
  42. package/src/tdd/orchestrator.ts +5 -0
  43. package/src/tdd/prompts.ts +1 -231
  44. package/src/tdd/rectification-gate.ts +2 -46
  45. package/src/tdd/session-runner.ts +4 -49
  46. package/src/tdd/verdict.ts +154 -9
  47. package/src/utils/git.ts +49 -0
  48. package/src/verification/parser.ts +0 -10
  49. package/src/verification/rectification-loop.ts +2 -51
  50. package/src/worktree/dispatcher.ts +0 -59
package/bin/nax.ts CHANGED
@@ -43,9 +43,9 @@ import { join } from "node:path";
43
43
  import chalk from "chalk";
44
44
  import { Command } from "commander";
45
45
 
46
- import { checkAgentHealth, getAllAgentNames } from "../src/agents";
47
46
  import {
48
47
  acceptCommand,
48
+ agentsListCommand,
49
49
  analyzeFeature,
50
50
  displayCostMetrics,
51
51
  displayFeatureStatus,
@@ -605,16 +605,25 @@ program
605
605
  // ── agents ───────────────────────────────────────────
606
606
  program
607
607
  .command("agents")
608
- .description("Check available coding agents")
609
- .action(async () => {
610
- const health = await checkAgentHealth();
608
+ .description("List available coding agents with status and capabilities")
609
+ .option("-d, --dir <path>", "Project directory", process.cwd())
610
+ .action(async (options) => {
611
+ // Validate directory path
612
+ let workdir: string;
613
+ try {
614
+ workdir = validateDirectory(options.dir);
615
+ } catch (err) {
616
+ console.error(chalk.red(`Invalid directory: ${(err as Error).message}`));
617
+ process.exit(1);
618
+ }
611
619
 
612
- console.log(chalk.bold("\nCoding Agents:\n"));
613
- for (const agent of health) {
614
- const status = agent.installed ? chalk.green("✅ installed") : chalk.red("❌ not found");
615
- console.log(` ${agent.displayName.padEnd(15)} ${status}`);
620
+ try {
621
+ const config = await loadConfig(workdir);
622
+ await agentsListCommand(config, workdir);
623
+ } catch (err) {
624
+ console.error(chalk.red(`Error: ${(err as Error).message}`));
625
+ process.exit(1);
616
626
  }
617
- console.log();
618
627
  });
619
628
 
620
629
  // ── config ───────────────────────────────────────────