ac4af582301a4e8a29245dbba767eba31334ddf9
6
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
ce1251cc9c |
lessons: the review of 10-11 to 10-13; failed reads, locks, another app's values, guarantee tests, network-free tests, tags and commit bodies move to the code standards
The nightly fold of the review of 10-11 05:20 to 10-14 04:00 (602 commits, tags v0.1.1173 to v0.1.1228, 54 of 56 published). Moved to docs/code-standards.md, each seen a third day or more: - a failed read means unknown ( |
||
|
|
e26d26ab5b |
agent: a Mac app in a folder of /Applications' own, or wherever Spotlight has its bundle id, is found: DeepSeek Harness Desktop in /Applications/AI no longer reads as 未找到 CLI (#2325, sungoku)
sungoku (macOS 15.8.1, magpie 0.1.1253) keeps DeepSeek Harness.app in
/Applications/AI and has no dsh CLI. magpie looked for the bundle in
/Applications and ~/Applications only, so the app wasn't found and dsh's
row said 未找到 CLI (the same gone rule as cjyrainbow's Windows case,
#2177).
macBundles is now the one place a Mac app's bundle is looked for, by
AppVersion/HasApp (dsh, Codex) and macBundle (WorkBuddy): its names in
each app folder, then in each folder one level down that is no bundle
itself (an .app inside another app's bundle doesn't count), then wherever
Spotlight has its bundle id (`mdfind kMDItemCFBundleIdentifier == '<id>'`,
as zedAppPath already finds Zed.app). The bundle's Info.plist must still
carry the app's id. Spotlight's answer is kept 5 minutes per id, because
the Agents page asks on every read and a missing app would otherwise run
mdfind each time. It is never asked in a test binary testenv isolated
(MAGPIE_TEST_SANDBOX), so no package's tests see the developer's own apps
(#1823). The agent TestMain stubs it too. appHere (Claude.app, OpenCode,
Goose: whether their folders are gone) also looks one folder down,
through the same inAppFolders.
Not changed: pencil, t3code, reasonix, claudescience and cursorlocal read
macAppFolders with their own names and still look only at the top level.
Test: TestDshDesktopAppInASubfolder covers no app; an app inside
Other.app (not taken); another bundle id in /Applications/AI (not taken);
sungoku's /Applications/AI/DeepSeek Harness.app (found, 0.2.0-rc.2); and
DSH.app on another folder, found only once Spotlight names it. Broken by
hand three ways, red each time: no subfolder scan, no Spotlight, bundles
inside bundles allowed.
Real mdfind query tried read-only on this Mac: com.apple.Safari ->
/Applications/Safari.app, com.openai.codex -> /Applications/ChatGPT.app.
DeepSeek Harness isn't installed here, so not tried with the real app.
Run in this worktree (origin/main
|
||
|
|
2494517696 |
agent: DeepSeek Harness Desktop installed to a folder of the user's own on Windows is found when it was installed for all users too, or registered only in its Uninstall entry (#2325, cjyrainbow, Andrew0767)
On top of #2279's commit (041e99063), which reads the folder DeepSeek
Harness Desktop's installer registers under HKCU\Software\<guid>.
cjyrainbow installed it to D:\tools\dsh; magpie 0.1.1248 showed
"未找到 CLI" with no switch. Since
|
||
|
|
2a1637f4f6 |
agent: DeepSeek Harness Desktop is wired when installed but never opened, and found in any folder it was installed to on Windows (#2279, liangjinyuan-sihan)
DeepSeek Harness Desktop already reads magpie's route: its lib/main.js
(0.2.0-rc.2, the latest on its update feed, read from download.deepseek.com's
dmg and Windows installer) resolves $DSH_HOME, else ~/.dsh, and runs on
profiles/desktop, so the CLI's wiring applies. Three gaps remained:
- Installed but never opened, there is no ~/.dsh: the row wasn't listed,
and connecting wrote the legacy config.yaml the app never reads. magpie
now writes profiles/desktop/cordis.patch.yml from dsh's own template
(PROFILE_PATCH_TEMPLATE) with its routes; the app's initProfile writes
only missing files, so its first start keeps them. The notice says it
starts on this when first opened (noticeDsh5, in all 5 languages).
Disconnect before that first start removes what magpie made, when
nothing else is there; afterwards only magpie's entries go.
- On Windows the installer lets the user pick the folder and registers it
under HKCU\Software\1bf39983-50d0-5fe0-9ef4-cece76f67c5e InstallLocation
(read from the NSIS script of dsh-latest-windows-x64.exe). magpie reads
that, so a custom folder is found, and the Uninstall entry's
DisplayVersion gives the version shown.
Tests: TestDshDesktopNeverOpened (pick on a never-opened app writes the
desktop profile, a user's key in .credentials.yaml and the user's own start
survive Disconnect, the app's first start is told apart),
TestDshDesktopRegisteredFolder (registry stubbed; exe must be there; WSL
twin has none).
Run on this tree, rebased onto
|
||
|
|
8e0e7d3c40 |
dsh: the desktop app's profile made while magpie runs gets magpie's route within a round, not at magpie's next start (star on Discord)
star on Discord reported DeepSeek Harness Desktop with the red
"已不经过 magpie" line. One way there that a desktop user meets: the
CLI's web profile wired, then the desktop app opened for the first time
while magpie runs. dsh makes profiles/desktop/cordis.patch.yml as its
empty template ([]), dshCheck says the desktop profile has none of
magpie's models (Drift "unwired"), and only dshSync — the catalog sync,
at magpie's start or a catalog change — filled new profiles, so it stayed
so until Reapply or a restart. The reporter's exact detail is cut off in
the screenshot, so this is a likely cause, not a confirmed one.
dshWiredOnce, the 30s serving round, now runs dshFillNewProfiles over a
profile that is dsh's empty template, beside the wired ones: magpie's
route and start go in as the catalog sync would put them. A profile with
entries of its own and no route is the user's and is still left alone.
Run: TestDshDesktopProfileMadeWhileServing fails on the old code ("the
round left the desktop profile bare"), passes with the fix, and checks a
user's own unrouted profile is not written. go test -tags nogui
./internal/agent ./internal/gui under a temp HOME with pinned caches: ok;
go test -race -run TestDsh -count=3: ok. gofmt clean; go vet darwin,
GOOS=linux -tags nogui, GOOS=windows; go build darwin, linux nogui,
windows: ok. Not tried with the real desktop app live.
|
||
|
|
ee3f83b59d |
agents: DeepSeek Harness Desktop installed is no missing dsh CLI — its version shows instead of 未找到 CLI (star on Discord)
star on Discord: "DeepSeek Harness 就是现在已经有桌面版了,但是他还是非要找CLI". With DeepSeek Harness Desktop in use and no dsh on PATH, the Agents page said 未找到 CLI and Install another agent offered npm's dsh: CLIMissing (#843) took ~/.dsh without a CLI for an uninstall. The desktop app (DeepSeek Harness.app, com.deepseek.dsh, 0.2.0-rc.2 from download.deepseek.com) keeps the same ~/.dsh — its own profile, profiles/desktop/cordis.patch.yml, and .credentials.yaml — and needs no CLI; its terminal command (Manage dsh Command…) is optional. - desktopapp.go: dsh's app is known by its bundle id on macOS and by %LOCALAPPDATA%\Programs\DeepSeek Harness\DeepSeek Harness.exe on Windows (electron-builder per-user NSIS, productName DeepSeek Harness, getWindowsInstallationDirName); HasApp says either is installed. - install.go: CLIMissing is false with the agent's desktop app installed, so the GUI row, Install another agent and /api all follow; the app's version shows through the existing CLI().App path. - dsh.go: the restart notice also sees DeepSeek Harness.app running. The red "已不经过 magpie" line in the report is a separate dshCheck finding, not caused by the missing CLI: a desktop-only ~/.dsh shaped from the app's real new-profile template wires cleanly (Check "", no Drift; TestDshDesktopOnlyWired). The reporter's exact detail is cut off in the screenshot and is not reproduced. Run: TestDshDesktopAppIsNoMissingCLI fails on the old code ("with the desktop app: missing true, offered true"; with the Windows path removed, "with the Windows app: missing true, offered true"), passes with the fix. go test -tags nogui ./internal/agent ./internal/gui under a temp HOME with pinned caches: ok. gofmt -l clean; go vet darwin, GOOS=linux -tags nogui, GOOS=windows on both packages; go build darwin, GOOS=linux -tags nogui, GOOS=windows: ok. Not tried: the real desktop app running live (not installed here; its userData isn't redirected by a sandbox HOME), a real Windows install. |