60b10c69a7f68e87a08ce2909e4e6dd67ae4b672
1048
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
fefe3f658c |
library: DS Bot gets MCP servers, skills and instructions in its own DSH home (#5897)
sunset on Discord: DS Bot (ds-bot) can be given a magpie model, but the Library's MCP page offered no DS Bot. It had no target in targetOf and was listed "not looked at (#5897)" in noLibrary. DS Bot's desktop app runs its own DSH (0.2.2-rc.1 in DS Bot 0.3.8) with DSH_HOME at its data folder (agent.dsbotHome; app/src/main.mjs) and boots the profile ds-bot (app/src/profile.mjs) with dsh-base's bundles. Read from github.com/Fei2411/DS-Bot and the npm packages at 0.2.2-rc.1: - dsh-agent-instructions reads $DSH_HOME/AGENTS.md (then CLAUDE.md); - dsh-skill-filesystem reads $DSH_HOME/skills and ~/.agents/skills, and a project's .agents/skills; - dsh-mcp-client is in the app's installation (a dependency of @deepseek-ai/dsh in app/package-lock.json), so a patch list's insert row naming it loads, as in dsh; DS Bot's own bundle patch disables none of these. So ds-bot gets dsh's target on its own home: AGENTS.md, skills, and MCP rows in every profile's patch list (agent.DshPatchFiles, which globs profiles/*/cordis.patch.yml, profiles/ds-bot's included). It reads ~/.agents/skills too (readsShared) and .agents/skills in a project. #5624: when DSH_HOME names DS Bot's folder, the dsh agent's home is DS Bot's. The Library's dsh target now steps back there (agent.DshAppHome), so the two agents' rows are never written into one patch list under two names. This doesn't fix #5624's model wiring. Run (all at 3b47e8745 rebased on |
||
|
|
8e1534f5f9 |
sessions: read LiveAgent's sessions (#6741)
Usage › Sessions and the Sessions page now list LiveAgent's sessions
with their title, time, model, tokens and cost, and show their
conversation.
- Where: K-brain keeps each session at
<root>/sessions/<project>/<id>/session.jsonl (older ones right under
sessions/). sessions/.runs and sessions/.deleted-history are skipped.
- Root: $LIVEAGENT_HOME, then $K_BRAIN_HOME, then
~/.liveagent/data-dir.json, then ~/.liveagent. The rule now lives in
sessions.LiveAgentDirIn, and agent.liveAgentDir calls it, so it has
one owner.
- Reading: K-brain rewrites the file whole, so it is parsed whole. The
first line is session_meta (id, title, cwd, running totals).
- Tokens:
- Each reply's own usage counts on the day it came back.
- What the totals (model_usage, else usage_in/usage_cached/usage_out)
hold beyond those replies, such as a compaction's call or a rewound
reply, counts on the last message's day, together with sub_usage.
- Cache reads and writes are taken out of prompt_tokens.
- Forks: a fork's copies of its source's messages (seq <= fork_seq) are
the source's, and count in neither the fork's messages nor its totals.
- Subagents: a subagent's own session (task-<parent>-<task>, task_id
set) is filed under its parent with its activity, but no tokens,
because its spend is the parent's sub_usage already.
- Not added:
- a Calls reader: the gateway's own record of LiveAgent's calls
carries no session id, so it would count them twice;
- resume and delete: LiveAgent has no resume command.
- Skills: SkillsManager read (skill://<name>/SKILL.md) and Read of a
skill path are counted.
Run (mote, mote-run, at
|
||
|
|
d67ccbd3c7 |
agent: a provider named magpie at another machine's address is not this magpie's Alma wiring
Alex on Discord: any provider named magpie in Alma, one pointing at a
magpie on a VPS included, was taken as this magpie's own, and the Agents
page said "Alma no longer goes through magpie, its config was changed".
almaMagpie now takes a provider by the name magpie only when its base URL
is on this machine (onAnotherMachine, as ZCode's check does). One at
another machine's address is the user's own provider and left alone; the
second match, an OpenAI-shaped provider at this gateway, is unchanged.
Run (mote), at base f1a4de736; rebased onto
|
||
|
|
4f94b8a829 |
grok: context_window is the model's window; Long conversations goes in auto_compact_threshold_percent (@xiancrong on X)
magpie wrote Long conversations' compaction threshold into each [model."magpie/..."] table's context_window. Grok Build reads context_window as the model's whole window and compacts at a percent of it: auto_compact_threshold_percent in [model.<id>], else [session]'s, else 85 (xai-org/grok-build 559751fd: xai-grok-shell/src/util/config/resolve/compaction.rs, DEFAULT_AUTO_COMPACT_THRESHOLD_PERCENT and resolve_auto_compact_threshold_percent; GROK_AUTO_COMPACT_THRESHOLD_PERCENT above all). So a 1M model held to 300K compacted at 255K and never had its real window. Now context_window is the catalog's whole window, and where magpie has it compact (grokCompactAt, the old grokWindow rule: the model's or provider's threshold, else settings.Working, none under Full window) goes in as auto_compact_threshold_percent of the window written, rounded down, at least 1 (grokPercent). None leaves Grok's own 85. - A table an older magpie wrote with the threshold as its window, on record in grok:<path>:windows, gets the whole window back. - A percent the user set in one of magpie's tables stays: what magpie gave is stashed in grok:<path>:percents, and one it has no record of giving is the user's (grokOwnPercent). A context_window set by hand still stays (grokOwnWindow). - A [session] auto_compact_threshold_percent is the user's for every model, so magpie writes no per-model one over it. Siblings: Codex (codexcat) already writes context_window and auto_compact_token_limit apart, and Claude Code has CLAUDE_CODE_MAX_CONTEXT_TOKENS beside CLAUDE_CODE_AUTO_COMPACT_WINDOW. Grok App (grokapp.go) writes the model's own window. Only Grok Build had the threshold in its window key. Run: - At cfca72eaf (this change on |
||
|
|
6abea5f8e8 |
agent: Antigravity's app on Windows is found by its installer's registration (JJasonsun on Discord)
On Windows magpie's Agents page showed agy but not Antigravity's desktop
app, which macOS finds right after install. desktopApps["antigravity"]
knew only the macOS bundle, so on Windows the app was found only by
~/.gemini/antigravity/agyhub_summaries_proto.pb, which a fresh install
hasn't written (the Windows box's real 2.30.0 install has no
~/.gemini/antigravity at all).
Google's Antigravity-x64.exe (2.32.1, antigravity.google/download) is
electron-builder's per-user NSIS installer (app-64.7z, SpiderBanner,
package name antigravity). The real 2.30.0 install on xiaomi-gpu is
%LOCALAPPDATA%\Programs\antigravity\Antigravity.exe, registered under
HKCU\Software\121a0be4-63bd-531e-acf8-fc3924c7e984 (InstallLocation) and
its Uninstall entry (DisplayIcon ...\Antigravity.exe,0, DisplayVersion
2.30.0, no InstallLocation). The guid is the UUID v5 of
com.google.antigravity in electron-builder's namespace, as dsh's is. The
entry now has win and guid, so AppVersion reads the registered version
(the 2.15 gate still holds) and HasApp finds the default folder too.
Linux ships only a tarball to unpack anywhere, with no desktop entry of
its own, so Linux keeps the backend-file rule.
Run:
- Windows (xiaomi-gpu, real HKCU and 2.30.0 install, sandbox
USERPROFILE/HOME/APPDATA/LOCALAPPDATA, PATH without agy): `magpie ls`
from origin/main's desktopapp.go lists no Antigravity; from this tree
it lists Antigravity.
- win-run go test -count=1 -timeout 45m ./internal/agent: every
TestAntigravity* and the new test pass; 36 reds, 35 of them listed
in #6068 (Windows CI only compiles tests), and
TestEveryFieldLabelHasTUIZh (Hermes profile labels from outside the
test home), filed as #6972. None touch desktop apps' detection.
- mote: go test -count=1 ./internal/agent ok; go vet ./...,
GOOS=linux go vet -tags nogui ./..., GOOS=windows go vet ./... ok;
gofmt -l clean.
Broken by hand: origin/main's desktopapp.go with the new test ->
TestAntigravityWindowsAppRegistered red ("guid \"\""; with that check
skipped, "AppVersion \"\"").
Not tried: the gateway wiring again on Windows in this change (
|
||
|
|
7c3e68908f |
claude-desktop: a model past 200K and under 1M runs at its own window in the Code tab (RQuantum198888 on X)
A GPT set to "Each model's most · 872K" still showed 200K in Claude. Claude Desktop 5.11492 starts its Code tab's Claude Code with CLAUDE_CODE_MAX_CONTEXT_TOKENS=200000 in its --settings file, and flag settings come before the 872000 magpie writes to ~/.claude/settings.json. |
||
|
|
c9e8422fa8 |
agent: a field label with no TUI Chinese fails internal/agent's tests
A new agent field's label with no entry in internal/tui's zh map left TestEveryWordHasZh red on main twice ( |
||
|
|
618bfc1a95 |
kimi: pick Kimi Code's subagent pool and its effort (XiaoLing_Arisa on X)
XiaoLing_Arisa asked on X for Kimi Code's subagent pool (子代理池) on the
Agents page: which models its subagents may run on, and how hard they
think. Kimi Code 2.x keeps them in config.toml's [secondary_model]:
default_model (the legacy `model` stands for it), the pool
[secondary_model.models] ("alias" = "when to use it") and default_effort.
- internal/agent/kimi_secondary.go: three fields, subagent_model,
subagent_pool and subagent_effort, written the way Kimi Code takes
them. Its validator refuses a pool that lacks the default, a name with
no [models."…"] table, and an effort a pool model can't take, so a
default goes into the pool, a pool without the default gets its first,
and only the levels every pool model takes are offered
(kimiPoolLevels). A magpie model goes in only while [providers.magpie]
is there. Keys are set in place; hints, other keys and comments stay.
Before Sync or Unwire drops a magpie model table, its name leaves the
section (kimiPruneSecondary). The default goes back to the user's own
(stashed at kimi:<path>:secondary) or to the pool's first, and an empty
section goes. The user's own pool of their own models is never touched.
kimi-cli (legacy) has no such section. A stopped WSL distro shows none
of the three, since each reads the config (#3896).
- GUI: the three fields form one Subagents line in the opened row: the
model, then the effort (disabled until a model is set), then a
multi-pick pool menu that stays open between ticks. The model's tick
can't be removed. The picker's note says an unset model runs each
subagent on the lead's model. The line is drawn by kimisub.js, which
Details imports before its first slide so the sheet measures it.
- Size budgets +457 (reason in core_budget_test.go). Translations in
zh, zh-TW, ja and de. kimisub.js is added to old-webkit's list of
scripts loaded on demand. The Kimi bullet in agent-wiring.md is
updated.
Run at this tree on mica (mica-run):
- go test -tags nogui -count=1 ./internal/agent ./internal/gui: ok,
including TestKimiSubagentPool*, TestWSLColdPlaceOpensNothing and
TestCoreScriptBudget. An earlier run of these packages found the cold
read and the budget overrun; both are fixed here.
- go vet ./... on darwin, GOOS=linux go vet -tags nogui ./... and
GOOS=windows go vet ./...: ok. go build: ok. gofmt -l .: empty.
- GUI: kimi-subagent-pool passes 20 of 20 (Chromium and WebKit, 5
languages, 1100 and 560px). kimi-thinking passes. agent-details-ready,
old-webkit and i18n-keys have 35 reds, and origin/main
|
||
|
|
255ccdd7ca |
omp: a Protocol row picks the API magpie's models are asked on (imty42 on X)
omp's models.yml had magpie's provider on openai-completions with no way
to change it: ompKept treated the provider's api as magpie's, so an api
typed there was written back on the next sync, and omp's row had no
protocol as Pi's has. An auto/* group whose members don't all take
Responses (provider.GroupAPI) could only be asked on Chat.
- omp's row gets the Protocol row Pi has (protocolField, now shared with
Pi's piProtocolField): each model's own (unpicked, as before),
openai-completions, openai-responses or anthropic-messages. omp takes
each for the provider and a model (KnownApi in pi-catalog types.ts and
the api enum of models-config-schema-bundle.ts, omp 18.9.1). The pick
is kept per place and agent folder, so each profile has its own.
`magpie omp protocol openai-responses` sets it from the CLI.
- ompOn puts the provider and every chat model on the pick: Chat and
Responses with no api of their own and thinking mode effort; Messages
at the gateway's root with budget, or anthropic-adaptive for a Claude
that thinks only adaptively. Image models stay on openai-images.
- The provider's api typed into models.yml by hand now stays and shows
as picked (ompAPIKept, the same api:<path>:wanted record as Pi's); a
pick made after it replaces it.
Unchanged: unpicked, Responses-native models and groups whose members
all take Responses already went on openai-responses per model.
Run at this head (3d0cadfce, the same tree; only this message differs),
on mote:
- gofmt -l internal/agent: nothing. go vet ./..., GOOS=linux go vet
-tags nogui ./..., GOOS=windows go vet ./...: rc 0. go build, linux
nogui and windows builds: rc 0.
- go test -tags nogui -count=1 -timeout 45m ./... in a sandbox HOME
under suite.lock: rc 0, 103 packages ok, no FAIL.
- Broken by hand: without ompAPIKept, TestOmpProtocolPicked is red
("an api typed by hand: file openai-completions, field \"\"").
- Real omp 18.9.1 in a sandbox HOME against a stand-in server: with the
provider on openai-responses a group model posted to /v1/responses;
a model on anthropic-messages at the root posted to /v1/messages.
Not tried: the GUI suite (no GUI file changed; the Protocol row is the
generic one Pi's uses, shown for any agent with a protocol field), and
omp against the real gateway with a real auto group.
Not changed: a model's api typed by hand in omp's models.yml is still
magpie's (the model list is magpie's whole); site docs for omp.
|
||
|
|
90d7ea9331 |
agent: a new agent named nowhere in the Library fails internal/agent's tests
TestEveryAgentInLibrary (internal/library) went red on main for a new agent four times: |
||
|
|
00b2c11a6b |
agent: Open Code Review (ocr) is an agent magpie sets up (@AlanWang1027713 on X)
Open Code Review (github.com/alibaba/open-code-review, npm @alibaba-group/open-code-review) is a Go CLI, `ocr`, that reviews a diff with a model. Its Claude Code, Codex, Cursor, Kimi Code and OpenCode plugins and its skills all run that command, which reads ~/.opencodereview/config.json on every run. Picking one of magpie's models on its row writes a custom provider "magpie" there (protocol openai, the gateway's /v1, a key naming Open Code Review, the model) and points provider at it. The user's own provider and model are stashed and come back on Disconnect, which also drops a custom_providers left empty. A model of the user's own can be picked too (written the way `ocr config model` writes it). Check reports a hand-edited url or key, or a removed entry. The `ocr` command counts only under a folder named for Open Code Review, since other programs share the name. WSL distros get the row too (cold distros not opened). Its User-Agent, open-code-review/<version>, already counts as this agent. CLI update via npm. Docs, READMEs, site and icon (OCR's own logo, Apache-2.0). Run (mica, at 593517bf0; origin/main has one unrelated usage commit since): - go test ./internal/agent -run 'TestOCR|WSL|Wsl|TestOwnProviderNamedAsMagpies|TestHandWiredMagpieProviderSiblings|TestAgentOf|TestEveryAgentNamedByItsKey|TestMarkedLinesEveryAgent': ok - gofmt -l: clean; GOOS=linux go vet -tags nogui ./... and GOOS=windows go vet ./...: ok - Broken by hand: url dropped from Check -> TestOCRWiring red; stash turned off -> red at the Disconnect restore. TestWSLColdPlaceOpensNothing went red before the row's options were given an asleep path. - Real e2e in a sandbox HOME: npm-installed ocr v1.13.10 (7e5ce06c) darwin/arm64, magpie built from this tree, a fake OpenAI upstream that calls tools. `magpie agents` lists the row with the user's deepseek/deepseek-chat; `magpie open-code-review magpie/fake/m1` wrote the entry and kept the user's keys and settings; `ocr llm test`: connection ok, tool-call round trip verified; `ocr review` on a repo with a nil dereference: 2 findings "[bug · high]" through magpie (8 /v1/chat/completions calls, UA open-code-review/v1.13.10, model m1, its six review tools); `magpie usage` counts them under Open Code Review; `magpie open-code-review default` put deepseek/deepseek-chat back and removed custom_providers. - Full suite: not run before this push (ship at once; mote was running another session's suite). It runs on mica right after, at this head. Not tried: a real vendor model behind magpie; WSL and Windows/Linux machines for real; the Claude Code / OpenCode plugin path itself (it runs the same `ocr`); an ocr installed by the curl script outside a folder named for it is found by ~/.opencodereview only. |
||
|
|
593517bf00 |
codex: T3 Code's threads on magpie stay on magpie (xxxxpouqqs on X)
xxxxpouqqs on X: "t3code 每次重新会话都出现类似于 The 'codex-2/gpt-6.1-sol'
model is not supported when using Codex with a ChatGPT account".
Cause: T3 Code's magpie · Codex instance runs Codex in ~/.codex on
magpie with `-c model_provider="magpie"` alone, so config.toml names no
magpie. At the next Sync, bringBack took every thread on magpie for a
leftover and moved it to the provider config.toml names (openai), in
state_5.sqlite and in the rollout. Codex resumes a thread on the
provider it was started on, so reopening a T3 thread sent magpie's
model id to ChatGPT. codexRetagOpenThreads (the Codex app's app-server
restart) moved locked or loaded ones the same way.
Fix:
- t3CodexRunsIn(home, dir): T3's magpie-codex instance runs Codex in
this home (no homePath, or one naming it; $T3CODE_HOME honoured; an
unreadable settings file counts as yes).
- bringBack then moves only threads another client started; a thread
whose originator is T3's stays on magpie (sessions.CodexThreadsBy
reads originator and model; a failed read moves nothing).
- codexRetagOpenThreads keeps T3's threads the same way
(RetagLoadedCodexThreadsBut).
Old threads: a T3-started thread an earlier magpie moved to the
current provider with a magpie model id (one with "/") is moved back to
magpie at the next Sync, for every user; a T3 thread started on OpenAI
with OpenAI's own model stays. Nothing to do but update.
Run (worktree at
|
||
|
|
ce16633367 |
tune: a Codex card locked by config.toml's own compact limit hands it to magpie on a click (sufeng1894 on X)
sufeng1894 asked why Codex's compaction threshold can no longer be set by hand. The card said config.toml's model_auto_compact_token_limit wins, and the background row said features.async_compaction's model_async_compact_threshold_percent wins: both locked, and nothing on the card did anything about it. Cause. Only the old tune card ( |
||
|
|
8a017b5837 |
agent: a connect-only plugin whose connect returns only merged objects is connected (plugins#1230)
A connect-only agent plugin is refused with "connect returned no keys to
write" when connect returns nothing. The check counted connect's result
after merged() had taken the plugin's merge keys out of it, so a plugin
whose only keys are objects it lists under `merge` was refused although
those objects' members are exactly what gets written. Lorca's plugin
(plugins#1230) hit it once it dropped its one plain key, changed_at,
which it dropped because unwire left `{"changed_at": {}}` in the user's
credentials.json. Now the merged members count as keys to write.
Run (mote):
- go test -count=1 ./internal/agent ./internal/agentplug: ok.
- go vet ./internal/agent, with GOOS=windows and GOOS=linux: ok. gofmt -l:
clean.
- A scratch test (not committed) loading plugins#1230's lorca.agent.js at
883ea48: connect and unwire with no credentials.json leave "{}"; with
{"anthropic":"k"} and with a file that has custom:gemini and a
changed_at map, unwire gives the file back as it was.
Broken by hand: origin/main's plugged.go with the new
TestPluggedConnectOnlyMergedOnly: "connect returned no keys to write".
Not tried: the real Lorca app reading the file.
|
||
|
|
ac4a4cf849 |
sessions: opening Sessions waits on no WSL listing it already has (shangyuan0818 on X)
shangyuan0818 (X, third round, after v0.1.4091 and v0.1.4255): on Windows, Usage -> Sessions opened only after a fixed ~20s when sessions were long. The long sessions were not the cause. Goroutine dumps of the reporter's case on the Windows box showed four waits on WSL on the page's first asks: - agent.Looks -> Clients -> All -> wslDistros: a blocking wslRefresh, `wsl -l -q` (10s timeout) once its list is a minute old, then `wsl -l --running -q` (10s) every time. A WSL that answers slowly but answers is never marked hung, so each open after a minute idle waited for both: about 18s, every time. ClientsIn drops WSL's agents anyway, so Clients now reads only this machine's (local()). - gui agentsHere (the web-mode own-sessions gate) called agent.All the same way. It now calls agent.AllKnown: this machine's agents and WSL's as last listed (wslDistrosWithin(0)), never waiting on wsl.exe. - sessions.wslFilesAs waited wslFirstWait (3s) afresh on each read while the first listing was pending, so list, stats and overview each waited 3s in turn. The 3s is now counted once, from when the first listing started. - provider.copilotCLILogin waited copilotWSLWait (2s) on every re-read of a distro's Copilot sign-in, every copilotWSLAge (20s), though it had an answer. A re-read now answers the last read at once; only the first read waits. Timed on Windows 11 (xiaomi-gpu), sandbox HOME with a 90 MB Claude JSONL and a 32 MB Codex rollout, a fake wsl.exe whose -l -q answers "Ubuntu" after 8s and whose --running hangs; /api/sessions list+stats+overview together, opened 20s after start, then 70s apart: |
||
|
|
5ba53b2392 |
agent: dsh and Pi ask a Gemini 3+ on Messages adaptively, so Xhigh reaches it as xhigh (#6778)
larryhaonlp: DSH's Xhigh on agy-cli/gemini-4-hydrogen through
magpie-anthropic reached agy-cli as high, and a compat
forceAdaptiveThinking: true added by hand in dsh went on restart.
Cause, from the installed sources (dsh 0.2.1-rc.2's and Pi 1.4.0's
pi-ai, anthropic-messages.js and simple-options.js): without
compat.forceAdaptiveThinking pi-ai asks a budget through
adjustMaxTokensForThinking, whose clampReasoning turns xhigh and max into
high (16384), and agy-cli's requestedEffort reads a budget of 16384 as
high. With the switch it sends thinking adaptive plus output_config.effort
from thinkingLevelMap, which agy-cli reads first. magpie wrote the switch
only for Claude that thinks only adaptively and GLM-5.2/5.3.
- gateway.AsksAdaptively is the one rule: adaptiveOnly, AdaptiveWithEffort
or a Gemini 3 or later (geminiGeneration, the rule geminiLevelBody
already turns a budget into adaptive + effort by). dsh's dshKindConfig
and Pi's piModelOn (both cases) use it. Pi now also gets the switch for
GLM-5.2/5.3, which it lacked (same clamp).
- omp is left on AdaptiveThinking, said in omp.go: its budget isn't
clamped (ANTHROPIC_THINKING xhigh and max are 32768, read as xhigh), and
its anthropic-adaptive mode turns thinking off by leaving thinking out at
the lowest effort, which a model that can stop thinking takes as on.
- The user's own values: dshKeepCompat kept a hand-set switch magpie
doesn't write, but magpie's own switch won over the user's. magpie
writes its switches only as true (omitempty), so a false in the file is
the user's, and now stays.
- The restart: dsh-settings' importLegacyDocument imports
~/.dsh/settings.yaml into the profile dsh starts on and renames it
.imported; magpie writes settings.yaml again with routes that had no
hand-set compat, so each start of dsh took it out of the profile.
dshProfilesCompat carries the profiles' hand-set compat into
settings.yaml's routes, by the same dshKeepCompat.
Existing users: KeepDshWired's sync (30s) and Pi's sync rewrite magpie's
routes, so forceAdaptiveThinking: true lands on a Gemini 3+ there with no
action; a false the user set stays. Pi's models.json provider block is
magpie's own and is written whole, as before.
Run (mote; sandbox HOME):
- go test -tags nogui ./internal/agent -run the new tests and the dsh,
Pi and omp compat tests (TestDshMaxReachesOutputEffortModels,
TestDshRefreshKeepsHandSetCompat, TestDshKeepCompatNotAcrossProtocols,
Pi.*API, Omp): ok
- gofmt -l: clean
- Shipped before the whole ./internal/agent and ./internal/gateway run and
vet (darwin, linux, windows) finished: it was still going on mote, over
its cores, and mica's disk was full. A red there gets its own fix or
issue.
Broken by hand:
- the new tests at origin/main
|
||
|
|
ccae8e8211 |
claude-desktop: a 1M model runs at 1M in the Code tab again (fwxkogaia on X)
Claude Desktop 5.11492 (released 11-13) starts its Code tab's Claude Code
with CLAUDE_CODE_MAX_CONTEXT_TOKENS=200000 in its --settings file whenever
the provider routes models itself, the gateway included (Fcn=2e5 and Lcn in
index.chunk-xV3fJhc7.js; 4.16336 had no such value). Flag settings come
before ~/.claude/settings.json, so the window magpie writes there no longer
reached the Code tab, and every model picked by its plain entry ran at 200K,
a 1M one too. No magpie change caused it: nothing in v0.1.4300..v0.1.4322
touched what Desktop is told about 1M.
Claude Code takes a "[1m]" id for 1M whatever that variable says (pT in
2.1.322). magpie's profile now gets Desktop's own "Use 1M wherever it's
available" (modelPrefer1mContext: true, 3p only, Desktop 1.28929+) once, on
a switch on and from Sync, as toolSearchEnabled is (desktopSeedPrefer1M):
Desktop then shows a model it offers a 1M entry for by that entry alone
(D5n: prefer1m on every supports1m entry) and hands Claude Code its [1m] id.
Desktop offers that entry only for a row whose max_input_tokens is 1M or
more, so nothing smaller changes. The user's own value, false too, or their
taking it away, stays theirs. Compaction is as before: the working window,
or the whole window under Full window.
Not fixable this way: a model between 200K and 1M (a 272K or 400K GPT)
still runs at Desktop's 200K; only a managed policy setting comes before
flag settings, and magpie writes none.
Run (mote, at this tree):
- go test ./internal/agent -run TestClaudeDesktop: ok
- TestClaudeDesktopPrefers1M red with desktopSeedPrefer1M returning nil
("switch on: modelPrefer1mContext <nil>"), green with it
- go vet ./internal/agent for darwin, linux, windows: ok; gofmt -l: clean
- go test -timeout 45m ./... at base
|
||
|
|
e97271f027 |
agents: a client of a Remote magpie can connect new agents the remote has connected (KoiLx0 on X)
KoiLx0 runs one magpie as a client of another, through a gateway key, and had to switch every agent on by hand on the client before it took the remote's models. A Remote magpie's editor now has "Connect new agents to this remote" (自动接入新 agent) under Advanced, off by default. It is kept per computer in the stash (remote.<id>.connectAgents), not in providers.json, so a synced or shared providers list doesn't turn it on anywhere else. No server-side key permission. With it on, the follow loop (FollowRemotePicks, every 5 minutes, and at once when the switch is turned on) connects an agent installed here that the remote has connected, on the remote's pick (connectFromRemote), and records it as <agent>.remote.auto = on. An agent the user disconnected here is never connected again: - one with the Agents page's Disconnect mark, connected or not before; - one recorded on that is no longer connected (taken out by hand in its file, or by any other route) is recorded off. An agent magpie put back on quit (quit.restored) is left to RewireOnStart and not taken for a disconnect. Connecting it by hand records on again. The follow throttle's time is now under a mutex, since the save handler resets it from another goroutine. The switch shows in /api/providers as connectAgents and is saved as connectAgents (a save that leaves it out keeps it; a provider that isn't a Remote magpie is refused it). Advanced opens on its own while it is on. docs/subsystems/providers-accounts.md says all of this. app.js stays within its budget (TestCoreScriptBudget): the Remote magpie's three ticks (MCP servers, skills and prompts, agents) and their save are one loop, which the new switch costs less than it saves. Run: - mote, go test -tags nogui -count=1 -timeout 45m ./... with the first draft of app.js: every package ok but internal/gui, where only TestCoreScriptBudget failed (1087333 > 1086971). After the loop, rebased on origin/main |
||
|
|
19794cc10c |
serve: a headless magpie follows a Remote magpie's agent picks (KoiLx0 on X)
v0.1.4298 made a client magpie follow the models a Remote magpie's agents are on (agent.FollowRemotePicks), but only the app's Library loop (library.KeepLinked) ran it. `magpie serve` and `magpie serve --web` followed the remote's model list and efforts (the long-poll in the gateway) and never a pick changed on the remote. Both now run agent.KeepFollowingRemote, which calls FollowRemotePicks every 30s; it still asks the remote at most every 5 minutes, and only while a Remote magpie is added. Run at this head, on mica: - go test -timeout 45m ./internal/agent/ ./internal/cli/: ok - go vet; GOOS=linux go vet -tags nogui; GOOS=windows go vet: ok - Real use: two sandbox magpies (R with a fake OpenAI upstream and a gateway key, C with R as remote-magpie "office"), both `magpie serve`. Claude Code connected on R to openai/gpt-5.5: C recorded claude.model.remote at start. R's Claude Code moved to openai/gpt-5.4-mini at 15:41; C's ~/.claude/settings.json followed at 15:45:49 (the 5-minute step). Efforts set on R (low,high) and a new upstream model reached C's /v1/models, Codex's magpie-models.json and Claude Code's model list within seconds to about a minute, before and after this change. Not broken by hand: the loop is a ticker around FollowRemotePicks, whose following is covered by remote_picks_test.go. Not tried: Windows and Linux real boxes. |
||
|
|
10ce59144f |
claude: a connected Claude Code starts straight into a session (KoiLx0 on X)
KoiLx0 on X: a Claude Code that magpie connected, on a computer where it
had never run, still opened on the theme picker and the sign-in choice.
Claude Code shows its first-run steps while its global config
(~/.claude.json, $CLAUDE_CONFIG_DIR/.claude.json, or a non-empty legacy
.config.json beside settings.json) lacks hasCompletedOnboarding, which
nothing wrote.
- Connecting Claude Code (and a Sync of one connected before) writes
hasCompletedOnboarding: true into that file beside the user's other
keys, and records that magpie wrote it (claude.onboarded in the stash,
per place).
- Disconnecting takes out only the mark magpie wrote, and only while the
file has no oauthAccount or lastOnboardingVersion of Claude Code's own.
- A file that already has the mark (the user's own first run) is never
touched; one that can't be read or parsed is left alone (edit.SetJSON
writes nothing), and the connect still succeeds.
- The Claude launch profile (claude#launch) is left out; it passes its
own --settings.
- The per-folder trust prompt is Claude Code's and stays.
Run at this head (rebased on
|
||
|
|
c4d64a70b2 |
agent: Codex's config holds only keys Codex knows, checked against its schema (#6828)
hatanokokoroyo (#6828) and Nietzsche_Li on X: Codex 0.169 warns on every launch that `disable_response_storage` is ignored, and `codex --strict-config` refuses to start, with magpie 0.1.4291. The key isn't magpie's. `git log --all -S disable_response_storage` finds it in no commit, and nothing in the tree writes it. Codex removed it in openai/codex#3212 (0.30.0, 2025-09); magpie's Codex paths assume 0.133 or later, so none needs it. CC Switch wrote it in its Codex presets until 4.0.28, which stops writing it and clears it on the next switch (cc-switch#7524), and relays' setup pages still tell users to add it. magpie's CC Switch import reads only the model provider. Since magpie can't show it wrote the line, the user's line is left as it is. So this adds the guard: testdata holds Codex rust-v0.169.0's own config.schema.json (descriptions, defaults and enums stripped, 86KB), and TestCodexConfigHoldsOnlyKeysCodexKnows walks it over the config magpie writes, in place and as the magpie.config.toml profile, from an empty config and from a CC Switch one, after setting a model, an effort, subagents and memories and a sync. A key Codex has removed or never had fails it. A user config holding the line keeps it, once, and it is the only unknown key. Run at this tree (mote): go test -run TestCodexConfigHoldsOnlyKeysCodexKnows -v ./internal/agent PASS; go test ./internal/agent ok; go test . ok; GOOS=linux and GOOS=windows go vet ./internal/agent ok; gofmt -l clean. Broken by hand: codex.go writing disable_response_storage beside the effort: the test went red naming the key; restored, green. Not run: the whole suite (a test file and testdata only, in one package). |
||
|
|
b9c385286b |
agent: the disconnect preview reads no sign-ins, so macOS never asks "Keychain Not Found"
jasonz3g on X (macOS, two Claude accounts): clicking Claude Code on the Agents page made macOS ask "Keychain Not Found — A keychain cannot be found to store …" (Cancel / Reset To Defaults), dozens of times. The Agents page loads a disconnect preview each time an agent's box shows: DisconnectPreview runs Disconnect on a copy, in a subprocess whose HOME is a temporary folder. Claude Code's Disconnect builds the model list (buildModels -> CatalogFor -> provider.All -> Accounts -> rememberLogins -> liveLogin), which read the Claude sign-in with `security find-generic-password`, and Cursor's too. On a Mac the keychain is found through HOME, and the temporary one has none. With a copy of real ~/.claude and ~/.config/magpie, the dry run ran security three times under the temporary HOME, started Devin's CLI there, and rewrote held/lapsed in the copy's logins.json. previewEnv now sets MAGPIE_NO_ACCOUNTS=1, which every keychain read and write, liveLogin and askClaudeStatus already honour. The dry run of the same real copy then runs no security and no CLI, and the agent's ~/.claude files come out byte for byte the same as before (diff -r), so the preview shows the same changes. Run: - TestDisconnectPreviewReadsNoSignIns (new), red on the old code (security find-generic-password -s Claude Code-credentials ... twice), green after; its second half checks the fixture does reach the keychain out of the dry run. - go test ./internal/agent -count=1 -timeout 45m: ok on mica (macOS) and on WSL Ubuntu (magpie-desktop); GOOS=linux and GOOS=windows go vet ./internal/agent ok; gofmt -l clean. - Real binary, dry run of `claude` on a copy of real ~/.claude and ~/.config/magpie with logging security/claude stubs: 3 security calls before, none after. Not tried: the GUI dialog itself (no display over ssh); the reporter's own accounts. |
||
|
|
b1dd96ab14 |
agents: a client of a Remote magpie starts its agents on the remote's models and follows them (KoiLx0 on X)
KoiLx0 runs several computers on one remote magpie and had to set every agent's models again on each of them, and again whenever the remote changed. Routing groups already reach a client (a group is a model of the remote's list, TestRemoteMagpieNewGroupServedBesidePicks); the agents' picks did not. - The remote tells, per connected agent, each model field's catalog ref at GET /v1/magpie/agent-models (gateway.SharedAgentModels, agent.SharedModels). Guarded as the Library is: this computer, or a full-access key of a magpie shared on the network; a held key is refused (readonly_test), and another machine without a key gets 401 (TestNetworkGatewayGuardsEveryRoute). - An agent connected here starts on those picks where this magpie lists them as <remote id>/<ref> (How "remote", after "again" and "joined"; the Agents page says "as on the remote magpie", in all five languages). - A field taken from the remote, or found on its pick, is recorded in the stash and follows the remote's change every 5 minutes (FollowRemotePicks from library.KeepLinked). A model picked here is the user's: the record goes, and the field is left alone until it is on the remote's pick again. A pick this magpie doesn't list is skipped. - app.js budget: no raise. The new line's 76 bytes come from same and alike sharing one string (CONN_WAS) and the native joined case returning plain instead of the same t() again. Run at this head (rebased on |
||
|
|
13e8002641 |
claude-desktop: two providers' Claude model read "Opus 5.5 · agy-cli", not the id's tail (onkashiko on X)
Claude Desktop names a row listed as magpie-<n>.anthropic.claude-opus-5-5
after its own catalog ("Opus 5.5"), whatever display_name says, so
agy-cli's and another provider's claude-opus-5-5 read alike and Desktop
5.11492 told them apart by the part of the ids that differs: "Opus 5.5
(…<n>.anthropic.claude-opu…)" (xVn/wVn in its app.asar). Only an
inferenceModels entry's labelOverride comes before the catalog's name,
and Desktop never suffixes such a label (keep in xVn).
magpie now writes the profile's inferenceModels, each row's display_name
as labelOverride, while two rows are named after one Claude model of
Desktop's catalog (desktopNamesClash), not only while a tier is picked.
The ids are unchanged. As with a tier's list, Desktop reads it at start
and its menu stays as listed until the next start; the Agents row's
Restart shows.
desktopNames' own fallback for two rows display_name still leaves alike
(one provider's models named alike) is now the model's id, "Z · D (z2)",
not the whole catalog id; two providers of one name keep the catalog id.
Claude Science takes the same names.
Run (mote, at origin/main
|
||
|
|
b26f16ee24 |
agent: Alma has one magpie provider, whichever side turned it on
realLemonawa on X: Alma has its own Magpie preset, and magpie's Alma
agent adds a provider of its own, so turning on both left two.
Alma's preset card claims the provider whose id is "magpie" (Alma
origin/main: forPredef / getProviderForPredefined, provPredefBody in
desktop-native settings_providers_detail.go). magpie's provider is now
made under that id (with the preset's icon), so Alma's card shows it set
up and offers no second one. When a provider has that id already (a
user's own elsewhere), magpie makes one as before and leaves it alone.
almaMagpie already took a Magpie set up in Alma first (same gateway
host) as magpie's, so the row showed connected and nothing was added.
What was wrong was switching off: almaSet("") DELETEd whichever
provider it had matched, the user's own preset included. Now a provider
magpie didn't make (name not "magpie") is kept: only the default model
and image refs that point at it are taken back, as before, and it is
turned off again only if it was off when magpie turned it on
(alma.wasoff in the stash). Sync no longer rewrites its model list after
the switch-off.
Tests: TestAlmaOneMagpie (internal/agent/alma_test.go), against the
fake Alma, whose POST now honours an id and answers a taken id with
Alma's 500 "UNIQUE constraint failed":
- set up in Alma first: connected, no second provider, switch-off sends
no DELETE, the preset stays on, sync after off writes nothing
- turned off in Alma: enabled on connect, disabled again on switch-off
- none in Alma: created under id "magpie", removed on switch-off
- preset id taken by another host: left alone, a new one made
Red on the old alma.go: "the user's own Magpie was removed:
[PUT /api/settings DELETE /api/providers/magpie]". Broken by hand:
without the id, "none in Alma" fails ("not under the preset's id");
without the Sync skip, "sync after off wrote [PUT
/api/providers/magpie/models]".
Real Alma (alma-server from /Applications/Alma.app, sandbox HOME and
ALMA_DATA_DIR, port 23917, never the live one): the preset's own POST
body creates id "magpie"; a second POST with that id is refused
500 UNIQUE constraint failed; PUT {"enabled":false} turns it off; DELETE
204; magpie's POST body with id "magpie" and type openai is kept as
sent.
Run at this tree (rebased on origin/main
|
||
|
|
99a54fa874 |
agent: agy's own /model pick no longer costs settings.json its model, and each thinking level is a model in agy (LolingVerse on X)
agy's /model writes its pick into settings.json ("model": "magpie/…")
even when started with --settings magpie-settings.json. The next Sync's
migrate took that for an older magpie's wiring and put back the old
stash: a stale model and "modelProvider": "gemini", or nothing, which
took the user's own model and provider out. That is the wrong restore
point the reporter saw. While magpie-settings.json is already on one of
magpie's models, such a pick is now moved into magpie's file (what agy
starts on next), and settings.json's model goes back to the one
connect.was kept when magpie was switched on, or out. The old stash is
no longer read for it.
agy 1.5.9 turns /effort away for every custom model, one with a
thinkingLevel too. A custom model's thinkingLevel takes low, medium or
high, and agy sends it as generationConfig.thinkingConfig.thinkingLevel,
which the gateway already asks over the row's effort (agyLevelAsked). A
model with two or more of those levels now has a custom model per
level, magpie/<ref>:<level>. The row's model field shows such a pick as
its model, so the switch stays on (agyLevelOf).
Run:
- TestAgyOwnPickKeepsSettings is red on the old agy.go. The levels part
fails with "level low:". The pick part, with the levels cut out,
fails with settings.json {"model":"stale","modelProvider":"gemini"}.
It is green on the new code.
- go test -count=1 ./internal/agent ./internal/cli on mote: ok (agent 259s, cli 67s) at base
|
||
|
|
4a4424ea84 |
codex: the takeover note names the phone connection the Codex app loses, beside Keep on ChatGPT (Mugenrikka on X)
Mugenrikka on X: once the Codex quota was used up, Codex opened through magpie stopped connecting to the phone and the account's profile could no longer be opened. Cause. This is the used-up takeover (#540, codex.out): with the active ChatGPT account held, magpie becomes Codex's provider without requires_openai_auth, so the app-server's getAuthStatus/account/read answer no account (codex-rs app-server get_account builds the account from the provider). ChatGPT.app 26.1029's main process then takes the host as an "execution-storage" identity, not a "chatgpt" one (its early-bootstrap: authMethod chatgpt/chatgptAuthTokens -> chatgpt; authMethod null and requiresOpenaiAuth false -> execution-storage), and "Connect your phone" (remote control) and the profile go with it. magpie never touches auth.json; the sign-in is still there. Nothing can keep both. With requires_openai_auth = true the app reads the account again, but its composer gate then greys Send for every model while the account's /wham/usage says not allowed (checked in |
||
|
|
2649d5d727 |
agents: Dim alpha (dima) is an agent, started on magpie's gateway (T_t__biu on X)
Dim alpha (arcships/dim, npm dimcode-alpha, command dima) gets a row on
the Agents page. Picking a magpie model there starts dima with the
variables Dim documents for any OpenAI-compatible endpoint
(docs/design/model-startup.md): DIM_BASE_URL (gateway /v1),
DIM_API_FORMAT=openai-compatible, DIM_API_KEY (magpie-dim), DIM_MODEL
and both DIM_MAX_*_TOKENS (the catalog's, else 128000/32000). They hold
for that run only; Dim's saved Providers, settings and database are not
written. The pick is in magpie's own dim.json; a dima function in the
user's shell profiles runs `magpie dim run`, and the row gives the
command for an open terminal. Picking Dim's own (or Disconnect) removes
both. Nothing signs in to, reads or proxies Dim's own account or the
DimAgent subscription (removed at its vendor's request, v0.1.471).
Run:
- mica, at this tree (rebased on
|
||
|
|
9cd5f36521 |
antigravity: retired, the built-in and its plugin both ask Google nothing; Antigravity is served by your own agy (agy-cli)
Google bans accounts it sees on Code Assist through Antigravity's own
client. magpie offered that route twice, the built-in and
@magpie-community/opencode-antigravity-auth, and anyone who picked
Antigravity in magpie took it by default (the owner, 11-15: 全部下线,改推
agy-cli).
- retiredBuiltins has antigravity. googleLogins lists no account of a
subscription its plugin serves, so no list, usage read, quota read or
request goes to Google with a built-in Antigravity account (the usage
loop in subscription_usage.go had no gate of its own). The mover reads
googleSavedLogins, so saved accounts still move.
- The mover's min is 0.2.0 (on the plugins dist index, b8bf5a57): that
version sends nothing, answers every request 410 ModelDeprecated
("model has been retired", which modelRetired reads, so a group asks its
next member) naming Antigravity (local agy CLI) and
`magpie plugin add @magpie-community/opencode-agy-cli-auth`, and turns
sign-in away. It left the plugins registry (003a38ff).
- Gemini CLI's route, on the same code, is unchanged.
- The built-in's code stays for now (shared with Gemini CLI); taking it
out is #6723. Its 123 tests serve it again for their run through
provider.AntigravityBuiltinForTest(), a counter BuiltinRetired reads.
- README (en, zh) and site docs subscriptions (en, zh, ja) point to
Antigravity through the user's own agy CLI. AGENTS.md and
provider-plugins.md say why and that neither route comes back.
What users lose: Antigravity with Google accounts signed in to magpie, and
rotating several of them. agy-cli serves the one account the user's agy is
signed in to, and needs agy installed.
Tests: TestRetiredAntigravityAsksGoogleNothing saves an Antigravity
account and checks googleLogins/googleAccountOf give nothing, the mover
still carries it, usage has no Antigravity card and the fake Google was
asked nothing, and Gemini's account still lists. Broken by hand (the
PluginServes gate removed from googleLogins): red,
"googleLogins(antigravity) = 1 accounts".
Run (mote/mica, at this change on origin/main
|
||
|
|
a5e3972a71 |
agent: the Codex account the user keeps Codex on is never taken over when held, so the app shows it, not "magpie" (davezfr on X)
davezfr on X, after v0.1.4216 ( |
||
|
|
f1c9014cd9 |
wsl, masking: a hung WSL or a slow local model no longer holds requests
vsoullai on X (0.1.4190, Windows): the gateway froze. Each request waited 15s in turn on the local masking model, routing was held 30s and got a 504, and a stopped WSL distro's probe dragged everything down until redactModel and WSL were turned off. #6167 (Codex held 30s then 504, fixed by restarting WSL) and #4856 (masking timeouts, 504s) are the same. WSL (internal/agent/wsl.go, wsl_links.go): - wsl's lock was held through wsl.exe and through the stat of \\wsl.localhost\<distro>, which can't be cancelled. The GUI's look held it, and every request's Codex/Claude stand-in, wslUp, distroAt and Copilot's WSL folders queued behind it. - A look (wslRefresh) now runs wsl.exe, the probes and the stat outside the lock. Looks take turns on wslRefreshMu, and the lock only guards reads and writes. - wslRoot's stat is bounded (wslRootWait 5s); a distro whose / can't be opened fails its probe and is tried again later. - What a request asks never waits on a look. "Which distros run" is asked single-flight in the background and waited for at most wslRunningWait (2s). A distro wsl.exe hasn't named as running counts as stopped, so nothing opens or wakes a distro on a guess. - Copilot's WSL sign-in (internal/provider/copilot_cli.go) is read the same way: single-flight, waited for at most copilotWSLWait (2s), with the last answer kept. Before, its own mutex queued every request behind the first one's read. Masking (internal/masking/masking.go): - With redactModel on, each request waited up to strictWait (15s). In a burst the backlog grew and the requests waited one after another. - Once a strict request runs out its wait with texts unread, the model is "behind". The next requests then wait only defaultWait (2s) until a request is read whole or a minute passes (behind, waitFor). The rules still mask everything the model hasn't read. Docs: docs/subsystems/agent-wiring.md (WSL twins) and gateway-routing.md (masking). Run: - New tests, on mote, -race -count=3: TestWSLHangHoldsNoRequest (wsl.exe --running, a distro's probe, the stat; each hang injected), TestWSLRootHangFailsProbe, TestCopilotWSLHangHoldsNoRequest and TestStrictModelBehindWaitsTheDefault, with the other WSL, Copilot WSL and masking tests. All ok. - Broken by hand: the same tests on the old code (origin/main's files with only the new tests added). Each WSL hang case failed ("a Codex stand-in waited on a hung WSL past 2.2s", "the GUI's look didn't wait on the hung WSL"). The Copilot test failed ("13 requests waited on a hung WSL past 2.2s"). The masking test failed ("request 2 after the model fell behind waited 2.0s"). - Full suite on mica at f08597a58 (this change on |
||
|
|
ec8125e680 |
agent: Kimi Code's thinking level is picked in Agents
@apple_test_src on X: every other agent has a reasoning-effort pick,
Kimi Code didn't. Kimi Code 2.x keeps its startup level in
config.toml's [thinking] table (read from @moonshot-ai/kimi-code 2.6.2's
source: ThinkingConfigSchema, persistModelSelection,
thinkingEffortFromConfig). The new "thinking" field writes it the way
Kimi's own /model does: off = enabled=false (effort kept), a level =
enabled=true + effort, Default removes both keys (and the table when
empty). Options come from the chosen model's support_efforts /
default_effort / capabilities, overrides first; "off" is left out for
an always_thinking model; unknown model or unreadable file gives
off/low/medium/high. A cold WSL place reads nothing (#3896). The legacy
Python kimi-cli gets on/off through its top-level default_thinking.
Run:
- Real Kimi Code 2.6.2 on mote, sandbox HOME and
KIMI_CODE_HOME, fake chat server, config written by this field's Set:
Default sent thinking {enabled, effort medium (model default)}, off
sent {type: disabled}, low and max sent those efforts.
- mica-run at bba704222 (rebased on
|
||
|
|
df4578438e |
models: a model listed bare takes what models.dev says, audio too
Parlevent_ on X: Gemini served through magpie from Vertex AI was listed
as taking text and images only, never audio. Vertex AI's models, and a
relay's, come from a list that says nothing of what a model takes, so
the entry had no input kinds and every agent's fallback said
text+image (provider.Entry.Modalities' Images branch).
catalog.InputsOf is now what most of models.dev's providers list a
model with, by bare id, as SeesImages, ContextOf and the others are
voted. provider.InputsOf uses it when the model's own source said
nothing of input (InputModalities and ImageInput both nil); a source's
own word, a plugin's included, still stands, and the image kind still
follows Images (the user's override included). The GUI's model row and
every agent's list read it through the Entry. OpenCode is now told
audio, video and pdf where the model takes them (its modalities enum
holds all five), not text+image only.
So Vertex AI's gemini-3.5-flash is text, image, audio, video, pdf;
gpt-oss-120b-maas there is text; a relay's bare gemini-3.5-flash is the
same as Vertex AI's. A model models.dev doesn't know stays unknown.
Also: a video sent to a bare-listed model models.dev lists without
video is now refused at magpie ("does not support video input") as it
is for a model whose own list says so, where it went upstream before.
Run (mica, mica-run):
- the new tests: TestGeminiTakesAudioWhereverServed (provider),
TestInputsOf (catalog), TestOpenCodeInputs (agent): green; red on
|
||
|
|
04ca2afab2 |
netproxy: Auto reads a Linux desktop's proxy, GNOME's and KDE's (#4147)
On Linux, Auto read no system proxy at all (system_other.go answered none), so with Clash Verge's system proxy on, magpie opened from the desktop's menu, with no *_PROXY, went direct and Settings said "No system proxy found". The user had to type the proxy into magpie and take it out again when they turned the proxy off. system_linux.go reads the desktop's own setting, where its apps and Clash Verge (sysproxy-rs) put it: - GNOME (and Cinnamon, MATE, Budgie): `gsettings list-recursively org.gnome.system.proxy`, mode 'manual' only; HTTPS over HTTP over SOCKS, ignore-hosts as the bypass list. - KDE: ~/.config/kioslaverc (XDG_CONFIG_HOME), ProxyType=1 only, its "http://127.0.0.1 7897" address form, NoProxyFor unless reversed. Read first on a KDE session, else after GNOME's. No gsettings, or no GNOME proxy schema, is none; a gsettings that fails otherwise is a failed read, which keeps the last good one as on macOS. PAC ('auto', ProxyType=2/3) is not read, as on macOS and Windows. Codex's view is unchanged on Linux: its reqwest reads no desktop setting there, so codexProxyFor takes no system proxy unless on macOS or Windows (codexSystem), with test cases that fail without it. Not a timezone or language guess (the X ask from jimlee0824v2): it is wrong for anyone travelling, on a VPN or a TUN, and the system's proxy is what says whether one is on. Run: - red on the old code: TestSystemReadsGnome, TestSystemReadsKDE and TestSystemWithoutDesktopProxy (3 of 3); the two Linux cases of TestCodexProxyFor with the old codex_proxy.go. - real gsettings on Ubuntu 24.04 (WSL magpie-desktop) under dbus-run-session with a temp XDG_CONFIG_HOME set to manual 127.0.0.1:7897: system() gave http://127.0.0.1:7897, bypass [localhost 127.0.0.0/8 ::1]. The distro's own setting not touched. - mica-run: go test ./internal/netproxy ./internal/agent ok; go vet of both for darwin, GOOS=linux and GOOS=windows ok. - wsl-run: go test -run 'Proxy|Gsettings|Kioslaverc|TestSystem|Codex' ./internal/netproxy ./internal/agent ok. - win-run: go test ./internal/netproxy ok. - gofmt -l clean. Not tried: a real KDE session (fixture from sysproxy-rs' format), the GUI on a Linux desktop. |
||
|
|
411769e9c7 |
library: GitHub Copilot gets the Library's instructions with VS Code or JetBrains alone
@codealc on X (0.1.3827, Windows, Codex with Copilot as the provider): 资源库 › 指令 has no way to give GitHub Copilot instructions. The only Copilot row was Copilot CLI's, listed only when the CLI was detected (settings.json or the copilot command) and not uninstalled, so a user of Copilot in VS Code or JetBrains saw none. Which file Copilot reads, from each surface's own source: - Copilot CLI 1.0.95: $COPILOT_HOME/copilot-instructions.md, else ~/.copilot/copilot-instructions.md (run for real, below). - VS Code (microsoft/vscode d95071e96, promptsServiceImpl / computeAutomaticInstructions): ~/.copilot/copilot-instructions.md, plus ~/.copilot/instructions/**/*.instructions.md; its docs' reference table gives the same for the Copilot harness's user scope. - GitHub Copilot for JetBrains 1.21.0 (javap of the plugin's classes): getCopilotCliHomePath() (COPILOT_HOME, else ~/.copilot) + copilot-instructions.md. So Copilot CLI's agent now has shared "GitHub Copilot" (as Cursor CLI's ~/.cursor is the Cursor editor's) and a sharedApp check: VS Code, VS Code Insiders, or the JetBrains plugin is here. agent.SharedRead says so; SharedHere is true with it even before ~/.copilot exists, and targetsAsleep keeps a CLIMissing agent whose folder such an app still reads. The Library's row is named GitHub Copilot; the agent stays Copilot CLI on the Agents page. SharedName also names Copilot CLI's chats in Sessions, which are now "GitHub Copilot" as Cursor CLI's are "Cursor". The user's own text in copilot-instructions.md stays outside magpie's block, and comes back whole when magpie's instructions are emptied. Tests (internal/library/copilot_shared_test.go): row named GitHub Copilot; VS Code alone (no ~/.copilot) gets the row and the file written without making Copilot CLI detected; JetBrains plugin alone; the user's own file kept; CLI uninstalled with VS Code still here keeps the row, with nothing reading it drops it; COPILOT_HOME followed. TestCursorIsCursorCLI and TestCursorFolderFromTheEditorIsNotTheCLI now allow Copilot beside Cursor. Run: - The six new tests on the old code (source files checked out from |
||
|
|
0b8c4bfc34 |
agent: Claude Code's permission mode is set in magpie and kept (EricChenChannel on X)
The report: "every time I configure settings.json it is overwritten and
reset" for permissions.defaultMode = bypassPermissions.
Cause, reproduced in a sandbox HOME with Claude Code 2.1.316: magpie's
writes to ~/.claude/settings.json are key-level and kept the user's
permissions block. Claude Code itself drops the mode: it ignores
bypassPermissions at launch unless skipDangerousModePermissionPrompt is
true, and its auto-mode nudge and /config write defaultMode over it.
Change:
- agent.Field gets Own: the user's own setting of the agent. Apply does
not record it, Disconnect neither clears nor restores it, Pick never
connects the agent for it, magpieValueIn is false for it, and profiles
(Fields, ApplyFields, InUse) and the WSL copy leave it alone. So the
mode outlives disconnecting magpie and switching profiles.
- Claude Code's permission_mode field (default, acceptEdits, plan, auto,
dontAsk, bypassPermissions; "" removes the key) writes
permissions.defaultMode, and bypassPermissions also writes
skipDangerousModePermissionPrompt: true so Claude Code honours it.
- GUI: own fields go in agentJSON.own, apart from fields, and
agentcompact.js draws them in an Advanced fold (collapsed) under the
agent's settings, with the app menu (no <select>). app.js unchanged.
Labels in en, zh, zh-TW, ja, de (zh: 高级 › 权限模式 › 跳过权限确认).
- docs/subsystems/agent-wiring.md: Fields and options row.
Run at this tree (base
|
||
|
|
ed82d8fab1 |
agent: a plugin's connect is given magpie's decision models as decisionModels
An agent plugin's connect() got only chat models in `models`, and
/v1/models leaves decision models out too, so a plugin had no way to
learn magpie's Jev, Clef or plugin `decides` models, though
/v1/systemone and /v1/decisions answer them (baranwang on X,
tweet 2121551068022915149).
connect's input now has `decisionModels`, apart from `models`:
provider.OfferedDeciders (what /v1/models lists under
X-Magpie-Deciders), then the decision routing groups, each
{ id, name, provider | group: true,
endpoints: ["/v1/systemone", "/v1/decisions"] }, [] for none.
`models` and /v1/models are unchanged. Docs: reference.md,
agent-wiring.md, site plugins page (en, zh, ja) and llms-full.txt.
Run at 87f358b70's tree rebased on
|
||
|
|
9f4e1120f3 |
agent: a Codex not connected is never pointed at magpie for account failover
TylerBai_loveai on X (tweet 2121532671180632290): with several ChatGPT accounts added in magpie and Codex not connected, Codex's requests went through magpie anyway; only adding Codex in Agents, then Disconnect, put it back. Cause: Sync's `failover` in codex.go wrote `openai_base_url = "http://127.0.0.1:3425/backend-api/codex"` (stash codex.failover), or pointed a CC Switch OpenAI mirror's base_url at the gateway (codex.mirror_failover), for any Codex signed in to ChatGPT with another of its accounts on (#1385), on every start and Sync, unless the user had disconnected Codex or turned on "Only switch Codex's sign-in". The row said not connected while every request went through magpie. Fix: failover writes nothing any more. A Codex that isn't wired or using magpie as its provider gets what failover wrote before taken out by Sync: the marked base URL, or the mirror's base_url. A base URL the user wrote by hand has no mark and stays (#856). Failover between Codex accounts comes with connecting Codex. modelOptions no longer counts failover as through magpie, so a pick of Codex's own model on the Agents page doesn't go via magpie. codexProxyOK (the proxy probe only failover waited for) is gone. The CLI's and GUI's switch-only lines, reference.md and the subsystem pages say failover is for a connected Codex. Users already affected: the first Sync after updating (magpie's start) removes the marked openai_base_url or mirror base_url, and the route change restarts Codex's app-server; Codex then goes straight to OpenAI on its own sign-in. A thread opened while it was on magpie keeps its provider until reopened, as after Disconnect. Tests: - TestCodexNotConnectedStaysOffMagpie: two spare accounts on, Codex not connected; SyncCatalog, Sync twice and a model pick leave no base URL, no model_provider, not Wired/FailingOver/CodexOwnOnly. - TestCodexFailoverFromBeforeTakenOut: a marked base URL and a marked mirror base_url from before are taken out, bytes restored exactly. - TestCodexSwitchOnlyKeepsCodexOffTheGateway, the CC Switch mirror, disconnect-stays and proxy/EndFailover tests reworked to seed the old state by hand; TestCodexFailoverHeldWhileProxyDoesNotPassOn deleted with codexProxyOK. Red on the old code (old codex.go + codex_proxy.go, new tests, mote): TestCodexNotConnectedStaysOffMagpie, TestCodexFailoverFromBeforeTakenOut and TestCodexSwitchOnlyKeepsCodexOffTheGateway fail with the reporter's line `openai_base_url = "http://127.0.0.1:3425/backend-api/codex"`; TestCodexCCSwitchOfficialOpenAIMirror fails with the mirror pointed at magpie. Run (mote; mica's disk is full, 100% with other sessions' runs, and mote's load was ~17-25 of 18): - At base |
||
|
|
81825ed81d |
agent: fx gets each model's reasoning levels through magpie (@beillusyn on X)
fx through magpie had no effort to pick: magpie wrote its models into
fx's settings without levels, so fx sent no reasoning_effort and every
model ran at its vendor's default.
fx 0.0.17 reads a model's reasoning_efforts in model_metadata (level
name to request fields, listed in /effort and Ctrl+T). magpie now writes
each model's catalog levels there, weakest first, each asked as
{"reasoning_effort": <level>}. Levels fx refuses are left out: auto,
adaptive, default (its word for "none picked"), names outside
[A-Za-z0-9._-]{1,64}, duplicates, and past 16 a model. With no level
picked fx sends none and the vendor's default applies, as before.
fx 0.0.16 refuses an unknown model_metadata key (UnknownField) and with
it the whole settings file, so the levels are written only when fx at
the place says 0.0.17 or later (~/.local/bin/fx, else fx on PATH; a
version not 0.x is the JSON viewer also named fx). An unknown version
gets no levels, and a sync after fx is upgraded writes them. fx's own
effort setting (top level and per workspace) is the user's and stays.
Left alone: fx inside a WSL distro has no version probe, so it gets no
levels (#6636).
Run:
- go test ./internal/agent -run 'TestFx|TestWSL' on mica: ok.
TestFxEfforts (exact ordered JSON at 0.0.17, the user's effort and
workspace effort kept, levels gone at 0.0.16 and unknown, back at
0.0.18), TestFxEffortNames, TestFxVersionIsTheAgents.
- Broken by hand, each red: fxTakesEfforts always true (TestFxEfforts),
no 0.x check (TestFxVersionIsTheAgents), a sorted map for the levels
(the order checks).
- Real fx on mica, sandbox HOME, magpie-written settings, a fake chat
completions server: fx 0.0.17 dev (3c8fab37) --effort high sent
reasoning_effort high; no effort sent none; --effort xhigh on a model
without it said so and sent none; --effort none sent "none". fx 0.0.16
with the levels failed with UnknownField; without them it worked.
fxVersion read the real binaries as "0.0.17" (takes levels) and
"0.0.16" (doesn't).
- Full suite on mote (mica out of disk) at
|
||
|
|
667ac8bd6f |
settings: a look at one setting takes the shared settings, not a copy
settings.Load() copies the whole Settings (clone + deepCopy of every map and slice) for each caller. 133 places read one field of it and threw the rest away: the proxy for every outgoing request (netproxy), the GitHub token, the China mirror switch, a model's output cap, wire or price on a gateway request. With a real account in the tray, Load's clone was 26.6 MB of the 318 MB the process allocated in its first seven minutes, most of it through netproxy.For on each request. Each of them now reads settings.Shared(), the read-only settings every caller is given for the same settings.json. Only reads were changed: a scalar field (string, bool, int, float) or a map field's index read. A caller that keeps a whole map or slice, or calls a method on the settings, still takes Load's copy. |
||
|
|
6cc70b2b3c |
agent: deskCatalog cleans an absolute /-spelled path too (#4785)
Dopetaiga's 3751d6cb3 made ownCatalog clean an absolute catalog path, so a /-spelled one names magpie's list on Windows. deskCatalog, the same predicate for the Codex app's list, still joined dir onto an absolute path and never matched one. With the app gone, Sync left model_catalog_json naming a list it had removed. It now has the same shape; the WSL spelling keeps its branch. Run on Windows 11 (xiaomi-gpu, win-run, -tags nogui): TestCodexSyncMendsGoneCatalog, TestCodexDesktopListSlashSpelled (new), TestCodexOwnCatalogGoneNotPutBack and TestCodexDesktopList.* are ok at this tree. With main's codex.go, not_the_provider and the new test are red. With 3751d6cb3's codex.go (ownCatalog fixed, deskCatalog not), only the new test is red. On macOS the bug is not visible (/ is the native spelling there). Batch record (ggbdpq's five patches #3254 #3356 #4258 #6391 #4785 and the two follow-ups), on mica through suite.lock: - At 8c58d9b0b (base |
||
|
|
f62e93b8aa |
agent: Claude's Unwire gives up the stashed model in every case (#4258)
The #4258 patch kept the model in the stash until the write that puts it back or takes magpie's out has gone through. When neither write runs (the stash kept one of magpie's models and the user has picked their own since), the model stayed stashed after the Unwire. Before the patch, unroute's unstash always took it out. It is now forgotten after the switch in every case that returns nil, which is main's behaviour with #4258's ordering. Run (mica, at this tree): TestClaudeDisconnectLeavesNoModelStashed is ok here and ok at main's claude.go, codex.go and stash.go. With 46b365337's claude.go alone it is red ("the stash still holds a model after the Unwire: relay/glm-4.6"). TestDisconnectFailureKeepsStashedOriginals is ok. gofmt -l clean; go vet of internal/{provider,davsync,agent} on darwin, GOOS=windows and GOOS=linux is ok. Not changed: the other agents' restore paths, filed as #6601. |
||
|
|
f12a1f79d8 |
agent: ownCatalog cleans an absolute /-spelled catalog path on Windows (#4785)
A config.toml naming the catalog with an absolute /-spelled path was not recognised as magpie's own: the raw string matched neither the base-name ref nor the \ spelling, so Sync left the key in and Codex could not load its config once the list was gone. Clean the absolute path too; on Windows that turns its slashes into the native ones. The WSL spelling keeps its own branch. |
||
|
|
1dbd3bb07c |
agent: a Disconnect whose restore write fails leaves the originals stashed
skygunner (#4258): Claude and Codex unroute took the stashed originals
out of the stash before the config write that puts them back, so a write
that failed (a full disk, a file a watcher held) lost them for good, and
a retry had nothing to put back. The same shape was in Claude's
putClouds, and the model's original was taken out before the write that
restores or replaces it, which comes after unroute.
The originals are read with peek and taken out by forgetValues only once
the write has gone through, each only while it is still the value peeked:
one a concurrent change wrote since stays stashed. The model stays stashed
for the caller: Unwire takes it out after its write, and picking a model
of the agent's own after it.
A file that doesn't parse is copied aside before it is written over, as
it was (lastgood.KeepUnparsed); a change reports nothing new. The same
take-out-before-put-back shape in the other agents' restore paths (agy,
antigravity, cline, claudedesktop, astrbot) is left as it is.
Run (worktree at base
|
||
|
|
c51b0ca9fa |
sessions: the Antigravity app connected to WSL has its usage read from the distro (@guyng35955 on X)
@guyng35955 on X: on Windows, with the Antigravity app connected to a
WSL Ubuntu, magpie showed no Antigravity usage.
Why. Antigravity 2.x (dist/wsl.js and languageServer.js in its
app.asar) runs a Linux language server in the distro when it is
connected to WSL ($HOME/.antigravity-server/bin/<version>/
language_server, started through wsl.exe with --app_data_dir
antigravity), so the conversations go to the distro's
~/.gemini/antigravity, not %USERPROFILE%\.gemini\antigravity. magpie
read Antigravity's conversations only from this computer's folder:
- sessions.wslAgents had no antigravity (nor agy, whose
~/.gemini/antigravity-cli in a distro wasn't read either);
- internal/agent kept a distro for the Sessions page only when one of
wslKinds or the Copilot CLI's folder was there, so a distro with only
the app's data never reached sessions.WSLHomes;
- and, found on the Windows box: no SQLite database under
\\wsl.localhost opens in place. Every form (file: URI, plain path,
mode=ro, provider.OpenReadOnly) answers SQLITE_BUSY after its 3s
busy_timeout, since the share doesn't take the locks a WAL database
needs. So listing the files alone would have shown nothing still.
What changed.
- agent: wslKept keeps a distro with ~/.gemini/antigravity(-insiders),
and the probe looks for them (no agent row for them).
- sessions: wslAgents reads the app's conversations (insiders under
their own key) and agy's in a distro; their summary rows name the
distro's folders as Linux does (agyFolder with goos "linux", so
/home/me/site, not a Windows path). The distro's calls count in
Calls (wslFiles("antigravity"), wslCallFiles("agy")). The listing
kept on disk (sessions-wsl.json) carries each file's row, rev and
read-only, so a stopped distro keeps its titles and folders. A
distro's ~/.gemini that is this computer's own (a link) is read once,
as this computer's (sameDir).
- sessions: openAppStore opens agy's and the app's databases read only
in place, or, under \\wsl.localhost or \\wsl$, as OpenUntouched does
(immutable with no -wal, else from a copy of the db and its -wal).
- docs/subsystems/agent-wiring.md says which distros are kept for reads
only.
Not changed: session-read consent ("allow selected" names agents found
on this computer) doesn't look in WSL, as before for every WSL agent.
OpenCode's and ZCode's SQLite readers aren't used for a distro (not in
wslAgents), so they keep provider.OpenReadOnly.
Run (at the tree rebased on dc85a7ca5; then rebased on
|
||
|
|
c5b40bf898 |
claude-desktop: after Use Claude Magpie the lit row is Claude Magpie, and its Code tab's row says it is on magpie (xMopf7RF on X)
xMopf7RF on X, 0.1.4111: clicking Use Claude Magpie seemed to connect their own Claude Desktop, and left "Claude Code · Claude Magpie" saying "Not connected · uses its own settings" with its switch off. The wiring was right: with the Separate app on, connecting claude-desktop writes only Claude-Magpie-3p's config (desktopSets), and the user's own Desktop is left alone. The page said otherwise twice: - the row that turned on was still named Claude Desktop. While the Separate app is on, state() now names the claude-desktop row Claude Magpie (desktopiso.Name), since that is the only config it wires. - the claude#magpie-desktop row is not wired itself, and need not be: Desktop's Code tab runs Claude Code with CLAUDE_CODE_PROVIDER_MANAGED_BY_HOST, so its requests go through Claude Magpie whatever that folder's settings.json says. While Claude Magpie is on magpie, the row carries twinCode (agent.DesktopTwinCode) and its line, lit, says "On magpie through Claude Magpie" (en, zh, zh-TW, ja, de). The core script budget goes up 67 for that one connectLine line, cut to the shortest words that say it; the Agents rows draw it, so there is no page to move it to. docs/subsystems/agent-wiring.md says both. Tests: - TestClaudeMagpieCodeTabRowIsOnThroughIt (agent): DesktopTwinCode only for claude#magpie-desktop, only while Claude Magpie is on magpie. - TestClaudeMagpieRowsAfterUseClaudeMagpie (gui): sandbox HOME, POST connect after turning the Separate app on: the wired row is named Claude Magpie, the Code tab row has twinCode, the user's own Desktop config is unchanged and no Claude-3p folder is made. - desktop-twin-code.test.cjs: clicks Use Claude Magpie; no lit row is named Claude Desktop, the Code tab row's line is lit and fits, the click doesn't scroll; en/zh/zh-TW/ja/de, 1100 and 640 wide, Chromium and WebKit. Run (mica; mote's load was over its cores), at |
||
|
|
14f0046e7d |
agent: Pi's offered thinking levels are kept per stamp, as the model lists are
v0.1.4108 kept the drift poll's "is this value magpie's" answers. After it, real accounts on mote (acgui6, w75, the window open) showed the poll's cost had moved into Pi's Values: piOffered on every Drift, every 15s. Each call walked the agent's model list and built the model's whole models.json entry, which reads settings again under GroupHasNative. That was 23 MB of the window's three minutes. piOffered is now kept per agent and model in a stampedLists, as sharedModels is: built again when provider.StampNow moves, or a minute after it was. Its callers (Pi-like Values, their effort options, Aside) only read it. Run: TestPiOfferedKeptPerStamp (new), TestThinkingWithoutLevels* and the Pi tests on mica. Broken by hand (the kept entry dropped on every call): red, "built again while nothing changed". Suite on mica at this commit: gofmt clean; go vet internal/agent for darwin, linux and windows; go test ./internal/agent ok (281.1s). |
||
|
|
8ce32d7008 |
agent: the window's drift poll remembers which values are magpie's per stamp
/api/drift runs every agent's Drift every 15s while the window is up. Each Drift asked every field's whole option list whether a value is one of magpie's, and the model lists under them are built again once a minute. With real accounts on mote (acgui6, w74), that was 27 MB of the 50 MB magpie allocated in three minutes with the window open. DriftShown, which only /api/drift calls, keeps magpieValueIn's answer per agent, field, value and settings while provider.StampNow stays the same, 5 minutes at most. Drift is unchanged for Reapply, rewiring, a launch and /api/state, which act on the answer. A provider resting or a model retired by its date is something the stamp can't see. The window's drift row now shows that within 5 minutes, not 1. Run: TestDriftShownAsksAValueOncePerStamp and the Drift tests on mica. Broken by hand (the memo never hit): red, "five polls built the options 5 times, want 1". Suite on mica at |
||
|
|
70bd270ae2 |
agents: Antigravity says how its own sign-in's models come back on magpie (T_t__biu on X)
T_t__biu on X: once magpie wires the Antigravity app, the Gemini models of
their own signed-in Google account leave the app's model list. Cause: magpie
connects the app through Google's Enterprise Gateway (gateway block in
~/.gemini/config/config.json and ~/.antigravity/settings.json). On a gateway
the app's language server runs in AUTH_MODE_ENTERPRISE_GATEWAY and drops the
Google sign-in (Google's docs: the two can't be used at once), so Code
Assist's fetchAvailableModels, which listed the account's models, is never
asked. No key in the file keeps both.
What does keep them: the same Google account signed in under magpie's
Antigravity subscription (the antigravity-auth plugin). The gateway's
antigravity catalog then lists that account's own models beside magpie's,
on that account's quota, pooled with any other Google account added there.
The notice shown on connecting now says so while magpie has no Antigravity
account (provider.Logins("antigravity") empty); with one, it reads as
before. Translated in zh, zh-TW, ja, de; the site's Antigravity page (en,
zh, ja), llms-full.txt and docs/subsystems/agent-wiring.md say the same,
and the subsystem page names what is not built: keeping the app's own
sign-in and adding magpie's models beside it would need the backend's
Code Assist endpoint (--cloud_code_endpoint / CLOUD_CODE_URL) pointed at
magpie.
Run at this head (base
|
||
|
|
db9d6507bb |
dsh: a thinking level set on magpie's route by hand is what its sessions start on
ming_li52905 on X set a level per route in dsh's config:
providers:
magpie-responses:
reasoning: high
and magpie "overwrote" it. magpie never dropped the key. llm-pi-ai starts
a route's models on profile.reasoning only when the session names no
effort (options.reasoningEffort ?? profile.reasoning, dsh-llm-pi-ai
0.2.2-rc.3). agent-default-model's reasoningEffort, which magpie's
thinking setting writes, is the effort every new session names, so the
user's level never applied.
Now the route's own level wins over magpie's one default:
- A start magpie writes on such a route (switch, set) carries no effort
of magpie's.
- A sync or round takes out an effort magpie wrote there before
(dshStartYields). magpie keeps what it last wrote into each list's
start (dsh-effort:<file> in the stash), so an effort dsh saved itself
(a composer pick, #1392) is the user's and stays. When the home layer
mirrors a profile's start, it takes that profile's record too.
- Thinking reads the route's level when the start names none, and
setting it writes the route's reasoning wherever it is set: each
profile, the home layer, settings.yaml. It writes no reasoningEffort.
- A route without a level still gets magpie's effort, as before.
Tests: TestDshRouteLevelOfTheUsersOwn (sync, round stability, a switch
away and back, thinking set, dsh's own saved effort kept),
TestDshRouteLevelInTheHomeLayer, TestDshRouteWithoutLevelTakesMagpiesEffort.
Run:
- The three tests at the old dsh.go: red (start keeps "medium" over
high, thinking reads medium, thinking low leaves the level).
- Broken by hand, each red: the record check ignored (dsh's own effort
stripped); Get not reading the level; the round's dshStartYields
removed (both level tests red).
- go test -count=1 ./internal/agent on mote: ok (237.9s).
- GOOS=linux go vet -tags nogui and GOOS=windows go vet of
./internal/agent on mote: ok. gofmt -l: clean.
Not run: the full ./... suite. mote's suite lock had four full runs
queued ahead of it. The change is internal/agent only.
Not tried: a real dsh. The precedence comes from dsh-llm-pi-ai
0.2.2-rc.3's source, not from a session.
Risk: a start written before this release has no record. If its effort
differs from a route level the user set, it is taken for magpie's and
removed once, even if dsh had saved it.
|