agent-nuvira 1.37.2 → 1.38.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 (38) hide show
  1. package/README.md +4 -0
  2. package/dist/agents/agents/runner.d.ts +82 -0
  3. package/dist/agents/agents/runner.d.ts.map +1 -1
  4. package/dist/agents/agents/runner.js +523 -1
  5. package/dist/agents/agents/runner.js.map +1 -1
  6. package/dist/agents/orchestrator.d.ts +30 -0
  7. package/dist/agents/orchestrator.d.ts.map +1 -1
  8. package/dist/agents/orchestrator.js +78 -7
  9. package/dist/agents/orchestrator.js.map +1 -1
  10. package/dist/cli/eval.d.ts +28 -0
  11. package/dist/cli/eval.d.ts.map +1 -0
  12. package/dist/cli/eval.js +224 -0
  13. package/dist/cli/eval.js.map +1 -0
  14. package/dist/cli/router.d.ts.map +1 -1
  15. package/dist/cli/router.js +4 -0
  16. package/dist/cli/router.js.map +1 -1
  17. package/dist/index.d.ts +3 -0
  18. package/dist/index.d.ts.map +1 -1
  19. package/dist/index.js +3 -0
  20. package/dist/index.js.map +1 -1
  21. package/dist/learning/error-repair.d.ts +4 -1
  22. package/dist/learning/error-repair.d.ts.map +1 -1
  23. package/dist/learning/error-repair.js +61 -6
  24. package/dist/learning/error-repair.js.map +1 -1
  25. package/dist/learning/eval-framework.d.ts +231 -0
  26. package/dist/learning/eval-framework.d.ts.map +1 -0
  27. package/dist/learning/eval-framework.js +954 -0
  28. package/dist/learning/eval-framework.js.map +1 -0
  29. package/dist/web-dashboard/server.d.ts.map +1 -1
  30. package/dist/web-dashboard/server.js +32 -0
  31. package/dist/web-dashboard/server.js.map +1 -1
  32. package/package.json +1 -1
  33. package/src/web-dashboard/public/assets/index-DlQgCJgF.js +135 -0
  34. package/src/web-dashboard/public/assets/{index-WVBA85-3.js.map → index-DlQgCJgF.js.map} +1 -1
  35. package/src/web-dashboard/public/assets/index-GNtw2Ztg.css +1 -0
  36. package/src/web-dashboard/public/index.html +2 -2
  37. package/src/web-dashboard/public/assets/index-B08nDkSB.css +0 -1
  38. package/src/web-dashboard/public/assets/index-WVBA85-3.js +0 -135
package/README.md CHANGED
@@ -52,6 +52,10 @@ agent-nuvira config list
52
52
  - **MCP (Model Context Protocol) integration** — connect to databases, APIs, and file systems via MCP servers with SSE transport support
53
53
  - **AST-aware code editing** — structural analysis engine understands functions, classes, methods across JS/TS/Python/Go/Rust
54
54
  - **Auto error-repair engine** — automatic diagnosis and repair of test failures with configurable retry budgets
55
+ - **Cross-platform dependency installer (Runner)** — auto-detects 11 manifest types (npm/pnpm/yarn with
56
+ lockfile-first priority, pip, bundler, cargo, go, composer, dart pub), installs missing project dependencies
57
+ on failed commands, and bootstrap-installs missing package managers (npm, pip, bundler, cargo, go, composer,
58
+ dart, Homebrew) via brew/apt/dnf/yum/winget/choco/rustup — no manual setup required
55
59
  - **A2A (Agent-to-Agent) Protocol** — inter-agent communication standard for multi-machine collaboration
56
60
  - **CI/CD headless mode** — `buff ci` for automated pipelines with GitHub Actions integration
57
61
  - **npm publishing & one-line install** — `npx agent-nuvira` and `npx buff` for zero-setup onboarding
@@ -40,6 +40,36 @@ export interface RunResult {
40
40
  duration: number;
41
41
  /** Error message if execSync threw */
42
42
  error?: string;
43
+ /** Whether dependencies were auto-installed before a retry */
44
+ dependencyInstallAttempted?: boolean;
45
+ /** Whether the dependency install succeeded */
46
+ dependencyInstallSucceeded?: boolean;
47
+ /** Package manager / tool used for the install (e.g. 'npm', 'brew', 'winget') */
48
+ dependencyInstallTool?: string;
49
+ /** Whether the tool itself had to be installed first (e.g. Homebrew) */
50
+ dependencyInstallToolInstalled?: boolean;
51
+ }
52
+ /** A detected dependency-install plan for a project */
53
+ export interface InstallPlan {
54
+ /** The package-manager tool to run (e.g. 'npm', 'pip', 'brew', 'cargo') */
55
+ tool: string;
56
+ /** The full install command to execute */
57
+ command: string;
58
+ /** The manifest file that triggered the plan */
59
+ manifest: string;
60
+ }
61
+ /** Result of a dependency-install attempt (including tool bootstrapping) */
62
+ export interface DependencyInstallResult {
63
+ /** Whether the install succeeded */
64
+ success: boolean;
65
+ /** The install command that was attempted */
66
+ command: string;
67
+ /** The package-manager tool used */
68
+ tool?: string;
69
+ /** Whether the tool itself was installed first */
70
+ toolInstalled?: boolean;
71
+ /** Human-readable detail for logs */
72
+ message?: string;
43
73
  }
44
74
  /**
45
75
  * RunnerAgent — Executes shell commands and captures output.
@@ -73,6 +103,58 @@ export declare class RunnerAgent extends Agent {
73
103
  * Execute a command directly on the host machine.
74
104
  * Validates the command first, and falls back to LLM suggestion if the command is not available.
75
105
  */
106
+ /**
107
+ * Heuristic: does this failure look like a missing dependency?
108
+ * Matches common "Cannot find module", "command not found", and ENOENT errors.
109
+ */
110
+ private looksLikeMissingDependency;
111
+ /**
112
+ * Detect which package manager a project needs based on its manifest files.
113
+ * Supports npm/yarn/pnpm, pip (requirements/setup/pyproject), bundler,
114
+ * cargo, go, composer, and dart pub.
115
+ */
116
+ private detectInstallPlan;
117
+ /**
118
+ * Check whether a CLI tool is available on PATH (cross-platform).
119
+ */
120
+ private commandExists;
121
+ /**
122
+ * Bootstrap-install a missing package-manager tool so that the project's
123
+ * dependencies can be installed. Handles Homebrew, winget, choco, npm,
124
+ * pip, cargo, and more — installing the tool itself if it is missing.
125
+ */
126
+ private installTool;
127
+ /** Install Node.js (which bundles npm) via the platform package manager. */
128
+ private installNodeViaPlatform;
129
+ /** Install Python via the platform package manager (so pip can be bootstrapped). */
130
+ private installPythonViaPlatform;
131
+ /** Install Ruby via the platform package manager. */
132
+ private installRubyViaPlatform;
133
+ /** Install PHP via the platform package manager. */
134
+ private installPhpViaPlatform;
135
+ /** Install Go via the platform package manager. */
136
+ private installGoViaPlatform;
137
+ /**
138
+ * Run an install command and return its outcome.
139
+ */
140
+ private runInstallCommand;
141
+ /**
142
+ * When no manifest exists, detect a missing interpreter/tool from the failed
143
+ * command itself (e.g. "python3 script.py" → python3 → install Python).
144
+ * This lets the runner install bare tools even in manifest-less directories.
145
+ */
146
+ private detectToolFromCommand;
147
+ /**
148
+ * Install dependencies for the project using the appropriate package manager
149
+ * (npm, pip, brew, cargo, etc.). If the package manager itself is missing,
150
+ * it is bootstrap-installed first (e.g. Homebrew on macOS, winget on Windows).
151
+ * When no manifest is present, falls back to installing the missing
152
+ * interpreter/tool referenced by the failed command.
153
+ *
154
+ * Controlled by context.metadata.autoInstallTools !== false — set to false
155
+ * to only attempt the install command without installing missing tools.
156
+ */
157
+ private installDependencies;
76
158
  private executeOnHost;
77
159
  /**
78
160
  * Fallback: ask the LLM what command to run based on the project context.
@@ -1 +1 @@
1
- {"version":3,"file":"runner.d.ts","sourceRoot":"","sources":["../../../src/agents/agents/runner.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAMH,OAAO,EAAE,KAAK,EAAE,KAAK,YAAY,EAAE,KAAK,WAAW,EAAE,MAAM,aAAa,CAAC;AACzE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAgB7C;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB,6CAA6C;IAC7C,OAAO,EAAE,OAAO,CAAC;IACjB,0CAA0C;IAC1C,OAAO,EAAE,MAAM,CAAC;IAChB,wBAAwB;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,sBAAsB;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,qBAAqB;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,+BAA+B;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,sCAAsC;IACtC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,qBAAa,WAAY,SAAQ,KAAK;IACpC,QAAQ,CAAC,IAAI,YAAY;IACzB,QAAQ,CAAC,WAAW,iDAAiD;IAErE,+DAA+D;IAC/D,OAAO,CAAC,QAAQ,CAAC,CAAY;IAEvB,OAAO,CAAC,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,SAAS,GAAG,OAAO,CAAC,WA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