Install the Rust CLI as `oa` only, and say when `oa` is shadowed
The installer took the `openagents` name: it linked `~/.openagents/bin/openagents`
at the Rust binary and symlinked that onto PATH, ahead of the TypeScript CLI
installed under nvm. Scripts, agent tool calls, and the coder's own `openagents`
tool all invoke that name, and the Rust build implements a strict subset of the
commands, so `openagents issue reopen` began failing with `unrecognized
subcommand` in workflows that had always worked. Taking the name is a claim of
parity the binary cannot make yet.
It now installs `oa` and nothing else, and removes an `openagents` link left by
an earlier run -- but only where the link points into our own download
directory, so an `openagents` that resolves anywhere else is never touched.
The installer also now reports when `oa` will not run what it just wrote. Two
cases, both of which it can see and neither of which it could before:
- another `oa` earlier on PATH, found by comparing the resolved path against
the installed one;
- an alias or function named `oa` in the shell rc file. That one is the
reason this check exists. Aliases and functions beat PATH in an interactive
shell, the installer runs non-interactively so `command -v` cannot see
them, and no output from either binary says which one answered -- so the
symptom is a CLI that reports a version it is not running. Grepping the rc
file is the only way to catch it from inside the installer.
It reports and never edits: the alias may be deliberate, and rewriting someone's
shell config silently is worse than the shadowing it would fix.
Refs openagents#90.
Install the Rust CLI as `oa` only, and say when `oa` is shadowed
Deploy story
What this commit did to the running system — joined from the forge receipt chain, the part a commit page elsewhere cannot show.
Not deployed through the forge lane
No push, promotion, build, or deploy receipt references this commit (receipts are scanned over a bounded recent window). Changes shipped by full node replacement carry their proof in the release gate receipt instead.
Changed files
-
modified
priv/static/install.sh -
modified
test/openagents_web/install_script_test.exs
Diff
2 files changed, +96 -11
priv/static/install.sh modified +87 -10
@@ -303,13 +303,39 @@ fi
| 303 | 303 |
|
| 304 | 304 |
|
| 305 | 305 |
|
| 306 |
|
|
| 307 |
|
|
| 308 |
|
|
| 309 |
|
|
| 310 |
|
|
| 311 |
|
|
| 312 |
|
|
| 313 |
|
|
| 314 |
|
|
| 315 |
|
|
| 316 |
|
|
| 317 |
|
|
| 318 |
|
|
| 319 |
|
|
| 320 |
|
|
| 321 |
|
|
| 322 |
|
|
| 323 |
|
|
| 324 |
|
|
| 325 |
|
|
| 326 |
|
|
| 327 |
|
|
| 328 |
|
|
| 329 |
|
|
| 330 |
|
|
| 331 |
|
|
| 332 |
|
|
| 306 | 333 |
|
| 307 | 334 |
|
| 308 |
|
|
| 309 |
|
|
| 310 |
|
|
| 311 |
|
|
| 312 |
|
|
| 335 |
|
|
| 336 |
|
|
| 337 |
|
|
| 338 |
|
|
| 313 | 339 |
|
| 314 | 340 |
|
| 315 | 341 |
|
@@ -319,9 +345,9 @@ else
| 319 | 345 |
|
| 320 | 346 |
|
| 321 | 347 |
|
| 322 |
|
|
| 323 | 348 |
|
| 324 |
|
|
| 349 |
|
|
| 350 |
|
|
| 325 | 351 |
|
| 326 | 352 |
|
| 327 | 353 |
|
@@ -332,10 +358,8 @@ SYMLINK_CREATED=""
| 332 | 358 |
|
| 333 | 359 |
|
| 334 | 360 |
|
| 335 |
|
|
| 336 | 361 |
|
| 337 | 362 |
|
| 338 |
|
|
| 339 | 363 |
|
| 340 | 364 |
|
| 341 | 365 |
|
@@ -379,6 +403,59 @@ export PATH="$HOME/.openagents/bin:$PATH"
| 379 | 403 |
|
| 380 | 404 |
|
| 381 | 405 |
|
| 406 |
|
|
| 407 |
|
|
| 408 |
|
|
| 409 |
|
|
| 410 |
|
|
| 411 |
|
|
| 412 |
|
|
| 413 |
|
|
| 414 |
|
|
| 415 |
|
|
| 416 |
|
|
| 417 |
|
|
| 418 |
|
|
| 419 |
|
|
| 420 |
|
|
| 421 |
|
|
| 422 |
|
|
| 423 |
|
|
| 424 |
|
|
| 425 |
|
|
| 426 |
|
|
| 427 |
|
|
| 428 |
|
|
| 429 |
|
|
| 430 |
|
|
| 431 |
|
|
| 432 |
|
|
| 433 |
|
|
| 434 |
|
|
| 435 |
|
|
| 436 |
|
|
| 437 |
|
|
| 438 |
|
|
| 439 |
|
|
| 440 |
|
|
| 441 |
|
|
| 442 |
|
|
| 443 |
|
|
| 444 |
|
|
| 445 |
|
|
| 446 |
|
|
| 447 |
|
|
| 448 |
|
|
| 449 |
|
|
| 450 |
|
|
| 451 |
|
|
| 382 | 452 |
|
| 383 | 453 |
|
| 384 |
|
|
| 454 |
|
|
| 455 |
|
|
| 456 |
|
|
| 457 |
|
|
| 458 |
|
|
| 459 |
|
|
| 460 |
|
|
| 461 |
|
test/openagents_web/install_script_test.exs modified +9 -1
@@ -61,7 +61,15 @@ defmodule OpenAgentsWeb.InstallScriptTest do
| 61 | 61 |
|
| 62 | 62 |
|
| 63 | 63 |
|
| 64 |
|
|
| 64 |
|
|
| 65 |
|
|
| 66 |
|
|
| 67 |
|
|
| 68 |
|
|
| 69 |
|
|
| 70 |
|
|
| 71 |
|
|
| 72 |
|
|
| 65 | 73 |
|
| 66 | 74 |
|
| 67 | 75 |
|