1ccacad63281094de8a3372d5a507d38f9969e5c
4
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
d1f8d8aae7 |
agent: Cherry Studio adds magpie through its providers link (plugins#865)
Cherry Studio (CherryHQ) shows on the Agents page, and with
`magpie cherrystudio`, on macOS, Windows and Linux. Its row is the link
its main process takes, cherrystudio://providers/api-keys?v=1&data=, with
the gateway at <gw>/v1 as an OpenAI-compatible provider named magpie and
the named key agentKeyAt("cherrystudio"). Cherry Studio asks the user to
confirm it. magpie writes nothing into its store. "Added" is read
untouched from its 2.x database (Data/cherrystudio.sqlite, user_provider),
in the default userData and every one boot-config.json moved it to. A
database or boot-config that can't be read, or a 1.x userData (Local
Storage, no database), is unknown. The data is standard base64, because
Cherry Studio swaps raw + and / before parsing and back after. /api/open
lets that link through. aionui's database status is generalized into
dbStatus{has} so both apps share it. Icon: Cherry Studio's own logo, not
cherryin-color (a different product).
Run (mote, at this change on origin/main c66cdbea9; then rebased on
|
||
|
|
3fd7e16983 |
agent: PenguinHarness is installed from the Agents page and served by magpie with nothing to set up
rankyurky asked on Discord #feedback for PenguinHarness (npm @prismshadow/penguin-cli, command penguin). Every value comes from Penguin's own source (0.2.17): - Config: $PENGUIN_HOME (else ~/.penguin/data, every OS) / $PENGUIN_PROJECT_ID (else default_project) /.project_config.toml. magpie writes [providers.magpie] (base_url, client_type, api_key), one [[models]] entry per magpie model (context_window, vision, max_tokens, [models.pricing] in usd_per_mtok) and default_model in Penguin's own inline spelling. Penguin's server reads the file again when its mtime changes, so no restart; a default naming no entry is refused by Penguin, so Check fails when one is missing. - A file magpie creates is 0600 in a 0700 folder, as Penguin keeps it. Disconnect restores the user's own default_model (or none), drops a magpie vision model, and removes the file when magpie made it. Penguin's own entries, providers and command_policy rules are kept. - A sync that changes nothing writes nothing (bytes and mtime kept), so Penguin's watcher isn't woken. - Install: curl -fsSL https://penguin.ooo/install.sh | sh, or irm https://penguin.ooo/install.ps1 | iex on Windows; update: npm, or penguin update --yes for the tarball, except on Windows where update.ts refuses it. - WSL: a penguin kind with no restart notice; the WSL test now expects an empty Notice for a kind with no restart. - agentenv: PENGUIN_HOME, PENGUIN_PROJECT_ID; the project id is in NotPaths, or appdir dropped a value like "work" as a relative path. - edit.SetTOMLArrayTables: replaces every [[name]] entry with key = value (with child tables) by blocks, or removes them; blank lines between replaced entries go with them, and an unchanged result isn't written. - GUI: penguin-color.svg icon; README (en, zh-CN), docs/reference.md and docs/subsystems/agent-wiring.md. Run (worktree at |
||
|
|
4b1994ad31 |
agent: AionUi, added through its add-provider link
seven7032 on Discord asked how to connect AionUi to magpie. AionUi
keeps its providers in its own SQLite database
(<userData>/aionui/aionui-backend.db, WAL mode), each key encrypted, so
there is no config file for magpie to write. The one supported way in
is its deeplink. AionUi 2.2.2's main process parses it
(parseDeepLinkUrl), and its renderer opens Settings -> Model with the
add form filled in, which the user confirms:
aionui://add-provider?api_key=magpie-aionui&base_url=<gw>/v1&name=magpie&platform=custom
The AionUi row works the way Cindy's and Lody's do:
- Add magpie opens that link. /api/open allows the aionui://add-provider?
prefix only. `magpie aionui add` opens it from the CLI.
- The key is agentKeyAt("aionui"), so it becomes the LAN key while
sharing is on (added to TestPinnedGatewayKeyForEveryWriter).
- "custom" is AionUi's OpenAI-compatible platform. Its base URLs end in
/v1, as its own OpenAI preset's does.
- Added reads providers.base_url for the gateway's address without
touching the database (sessions.OpenUntouched, from the previous
commit). A database that can't be read is unknown, never "not added".
The last read is kept while the database and its log keep their size
and time, for 15s at most, so the Agents poll doesn't copy a running
AionUi's database every time.
- It is detected by userData/aionui (os.UserConfigDir()/AionUi on every
OS).
- As with Cindy and Lody, the TUI leaves the row out (nothing to pick).
Tests:
- TestAionUiLink: the link's exact bytes.
- TestAionUiLinkParsedAs2_2_2: runs the link through
testdata/aionui/deeplink-2.2.2.js, which is parseDeepLinkUrl copied
byte for byte from 2.2.2's app.asar (out/main/index.js 50995-51021)
plus the renderer's add-provider mapping and the form prefill. The
result is action add-provider, route /settings/model, and the form gets
platform custom, the /v1 base URL and the key.
- TestAionUiHas: a fixture database built from 2.2.2's real providers
schema (taken from the database 2.2.2 made at first start). It covers
none, another gateway, a row present only in the log of a running app,
and a closed app, and checks that AionUi's folder is unchanged each
time.
- TestAionUiUnreadableIsUnknown, TestAionUiStatusRereadsOnChange,
TestAionUiDetect, TestAionUiImportRow (GUI: the row, unknown status,
and /api/open refusing other aionui:// links).
- import-row.test.cjs gains the AionUi row (icon, known status in each
language, the click opens the exact link, and it fits at 420px), in
chromium and webkit across en, zh, zh-TW, ja and de. The same file
now waits for the rows to settle before its alignment check: under
load 105 one run caught Cindy's button mid-resize at 193.4px beside
the picker's 194.4px. The old file passed 3/3 alone, so it is a
timing assumption, not a layout bug.
Run at 18041fc5b (this change on origin/main
|
||
|
|
e2b3eb7406 |
agent: an npm -g agent under mise's Node says its version and updates with that Node's npm, not "can't tell how it was installed" (flp on Discord)
On Windows with Node managed by mise, the Agents page read "无法判断安装方式" for an agent installed with npm install -g. howInstalled decided from the binary's path, and a mise shim leads nowhere near node_modules: on a Mac or Linux it is a symlink to the mise binary; on Windows a copy of mise-shim.exe (exe mode, the default), a .cmd plus a bash script running `mise x --` (file), or a hard or symbolic link to mise.exe. A shim is now recognised (a link to mise, or a file in mise's shims folder: parent "mise", a .mode file, or MISE_DATA_DIR/shims) and mise is asked which program it runs, `mise which <cmd>` from the home folder; how it was installed is read from that program. On Windows mise names npm's extensionless sh script, so the .cmd beside it is used. The update runs that Node version's own npm with --prefix, then `mise reshim`: on Windows npm install -g makes no shim for a new command (seen on the box), mise's Unix npm wrapper reshims itself, so it is harmless there. Siblings: - asdf shims (scripts with "# asdf-plugin:" and `exec asdf exec`) are asked with `asdf which` the same way; asdf-nodejs's npm reshims itself and asdf has no Windows build. - proc.UserBinDirs on Windows also looks in mise's shims folder (MISE_DATA_DIR, else XDG_DATA_HOME\mise, which mise follows on Windows, else %LOCALAPPDATA%\mise) for an agent PATH doesn't reach. - Install side: npmIn accepts npm.exe beside node as well as npm.cmd. - WSL agents get no update path (CLI skips them) and wsl.go's probe already lists mise/asdf shims: unchanged. - MISE_DATA_DIR and ASDF_DIR join agentenv.Vars, so a test sandbox clears them (TestFolderVarsAreListed). Fixtures are real bytes: internal/agent/testdata/mise-windows from mise 2026.10.7 on the Windows box (file-mode snow.cmd and snow, .mode files, npm's snow.cmd/snow in the Node folder); the Mac layout and the asdf shim's text from mise 2026.10.7 and asdf 0.20.2 release binaries in a sandbox home. Run: - flp's own layout (where.exe claude: installs\node\24.20.0\claude, claude.cmd, shims\claude.exe; mise which claude names the extensionless script): TestMiseShimWindowsFiveAgents covers claude, pi, codex, opencode and codebuddy through shims\<cmd>.exe; run on the Windows box, red with the fix removed by hand, green restored. - go test -tags nogui ./internal/agent ./internal/proc -run 'Shim|HowInstalled|UpdateCLI|NpmIn|InstalledVersion'; with installedAt skipping the shim by hand TestMiseShimIsNodesNpm, TestUpdateCLIThroughMiseShim and TestAsdfShimIsNodesNpm go red, green again restored. - Real mise on the Mac (sandbox home, mise 2026.10.7, node 22.23.3, snow-ai): detection through the real shim and `mise which`, and a real update 0.9.1 -> 0.9.2 through UpdateCLI. - Real mise on Windows (the box, sandbox USERPROFILE/LOCALAPPDATA, mise 2026.10.7, node 22.23.3, snow-ai): the Windows test binary's unit tests (TestMiseShimWindows, TestHowInstalledWindowsShim, TestNpmIn) pass; a temporary test through the real shim in exe, file and hardlink modes found npm.cmd --prefix <node>, version 0.9.2; after npm install -g snow-ai@0.9.1 a real UpdateCLI took it to 0.9.2 and reshimmed; snow.exe ran 0.9.2. Symlink mode was not tried (needs developer mode); it is the link-to-mise case the Mac covers. flp's own machine was not tried. - go test -tags nogui -timeout 40m ./...; gofmt -l; GOOS=linux and GOOS=windows go vet -tags nogui ./... |