Repository navigation
fix(experts): share one agents home for publish and execution - #68
Merged
Merged
Conversation
When DSH_HOME is set and DSH_AGENTS_HOME is not, published presets were written under $DSH_HOME/agents while preset reads and the execution guard still opened ~/.agents and failed as a missing legacy preset.
Owner
|
非常感谢,已经合并到main |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary / 摘要
Expert publish and the execution guard now use one agents directory. If
DSH_AGENTS_HOMEis unset andDSH_HOMEis set, presets are written and read under$DSH_HOME/agentsinstead of~/.agents. That removes the旧目录预设ENOENT that happened when a team preset was published on the persisted home and later opened from the user home. Unrestricted execution still requires an explicit permission choice. The removeddeploy/dockerrecipe is not restored.Related Issues / 关联 Issue
Refs #55
The docker recipe and the decision not to default
DSH_PERMISSION_MODEtodanger-full-accessare already on main (489f8bad08and the self-hosted README section). This change only closes the remaining agents-home split. It does not by itself make a container's bash tool work without a sandbox backend.Type / 类型
Platforms / 影响平台
The lookup is the same on every OS. It matters most for a self-hosted process that sets
DSH_HOMEand does not setDSH_AGENTS_HOME.Verification / 验证
Node.js 22.23.2 (CI pin). I mirrored
.github/workflows/ci.ymllocally on Linux: thechangesjob,check(corepack yarn install --immutable,corepack yarn check), andweb-source-check(pnpm install, build, typecheck, versions, Playwright Chromium, browser tests, integration, library, office, workbenches, quality analysis, tabular, runtime-isolated, enterprise identity).corepack yarn check:layoutcorepack yarn typecheckcorepack yarn testcorepack yarn check(fails on unmodifiedmaintoo, see below)Regression test:
node --test --test-concurrency=1 --test-name-pattern='publish and the execution guard read' tests/integration/expert-manager.test.mjsfailed. The unscoped preset dir was~/.agents/..., while the manager had published under$DSH_HOME/agents/....tests/integration/expert-manager.test.mjsis 29 pass, 0 fail;corepack pnpm --filter workdsh-plugin-experts typecheckpasses.Local CI mirror on this branch (
bb58979e08):changes,yarn install --immutable, and everyweb-source-checkstep (build, typecheck, versions, Playwright, browser tests, library, office, workbenches, quality, tabular, runtime-isolated, enterprise identity) exit 0.pnpm test:integration: 147/147 pass, including the new test. One earlier run had a single failure in the unchanged DOCX import idempotency case inoffice-import.test.mjs(two imports gave differentoperationIddigests); it passed on rerun and in isolation, so I read it as flaky rather than related.Baseline failure, same on unmodified
main(81527723ab):corepack yarn checkfails on both this branch andmainwith the same assertion:apps/desktop/tests/owned-process.spec.ts> "kills a real tool descendant that ignores SIGTERM even after its parent exits",expected NaN to be greater than 0at line 16 (1 failed, 163 passed, 2 skipped on both). That spec is outside this diff and looks specific to my Linux runner. Because of it,enterprise-plugin(whichneeds: check) was not run locally.desktop-windows,desktop-macospackaging (other OS) andpublish-desktop-release(tag-only).Release Notes / 发布说明
Self-hosted experts follow
$DSH_HOME/agentswhenDSH_AGENTS_HOMEis unset, including execution of a published team preset. SetDSH_AGENTS_HOMEonly when that directory is also on persistent storage. Permission mode is unchanged: WorkDSH does not silently select unrestricted execution.AI assistance: implementation and the regression test were drafted with Grok in a local worktree. No GitHub writes were made from that session.