ac4af582301a4e8a29245dbba767eba31334ddf9
2
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
b1e8eb15a6 |
agent: the function agy in a POSIX profile is agy(), which dash reads
magpie put bash's `function agy {` in ~/.bashrc and ~/.zshrc (and a WSL
distro's). On fnOS ~/.profile reads ~/.bashrc, so sh -lc, which is dash
there, read it too and stopped at a syntax error; Codync's SSH probe
failed (ljlwlcz on X, v0.1.3336). Both POSIX bodies, agyFunction's and
agyDistroFunction's, now open with `agy() {`. The keyword was there so an
alias named agy isn't expanded where the function is defined; that guard
is now an `unalias agy 2>/dev/null || true` on the line before, since a
shell expands aliases a line at a time. Blocks already in a profile are
rewritten between their markers the next time magpie writes them.
Run (mote, macOS; wsl-run, Ubuntu 24.04 where /bin/sh is dash):
- TestAgyFunctionInEveryPOSIXShell (new): each POSIX body read after an
alias agy by dash, sh, bash, zsh (mksh/busybox when present), then agy
run: here falls through to the agy on PATH, the distro one passes the
key, gateway and --model. Green on mote and in WSL.
- Broken by hand: with the old `function agy {` head it is red in dash
(exit 2, both bodies); with `agy() {` and no unalias it is red in dash,
sh (bash posix) and zsh.
- go test -timeout 45m ./internal/agent ./internal/update ./internal/cli:
ok on mote. gofmt -l clean; go vet for darwin, linux, windows ok.
Not run: the full suite, a real fnOS box, Codync itself.
|
||
|
|
9ae7912210 |
agent: plain agy starts Antigravity CLI on magpie in a new terminal
agy takes magpie's gateway, key (GEMINI_API_KEY, GOOGLE_GEMINI_BASE_URL)
and --model only from how it is started, so a user on magpie had to copy
the launch command at every start (bestony on Discord). Now:
- magpie agy run [args…] execs the real agy with the env and --model when
agy's settings.json is on magpie's model (a --model/-model the user
gives wins), and runs agy untouched otherwise. On Windows agy is a child
through proc and its exit code is passed through. It refuses when "agy"
on PATH resolves to magpie itself. magpie agy env prints what run adds
(PowerShell's function reads it, since the desktop exe has no console).
- update.ShellFunction puts a function named agy in a marked block
(# >>> magpie agy >>> … # <<< magpie agy <<<) of each shell profile
cliShells finds: .zshrc (ZDOTDIR), the bash profile a terminal reads
(.bash_profile, or .bash_login/.profile on macOS when that is missing),
config.fish once its folder exists, and the PowerShell 7 / Windows
PowerShell profiles where the execution policy runs them. Only the block
is written, in place, temp-and-rename, CRLF and BOM kept; a profile that
can't be read is not written; only files inside the home are. The
function falls back to `command agy` when the magpie it names is gone.
- Set to a magpie model writes the block, stepping out takes it out (the
file comes back byte for byte), and Sync at start writes it for users
already wired.
- Notice, Launch tooltip and the connect panel say plain agy works in a
new terminal, with the command for a terminal open now. Strings in
i18n.js for zh, zh-TW, ja, de. docs/reference.md and
docs/subsystems/agent-wiring.md updated.
Run at this head (base
|