[Bug]: local/dsh-plugin — /loopforge and loopforge_status always throw "workingDirectory" without inject
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 75/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- javascript, node.js
Hướng nghiên cứu
Bắt đầu với local/dsh-plugin/index.js và lần theo cwdOf() cùng các vị trí gọi nó trong handle() và tool execute(). Đọc API dịch vụ workingDirectory của DSH để xác nhận cách dịch vụ này phân giải thư mục của một Agent, sau đó kiểm tra khai báo inject của plugin. Hoàn tất khi cả /loopforge và loopforge_status đều hoạt động mà không gặp lỗi injection workingDirectory; báo cáo xác nhận một dự án mới trả về {"found": false} và /loopforge start tạo workflow-state.json.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Component / host
Local — DeepSeek Harness (local/dsh-plugin). The bug-report form has no option for this host yet — another item worth adding, see "Related observations".
Edition
Local Portable
LoopForge version
commit dd56585276d8ecb6e0d6865f55e255194d75f85a — local/dsh-plugin = @tencent/[email protected]
What happened?
The Host bundle installs and activates (application: applied, row @tencent/loopforge-dsh resolves), but both surfaces it registers fail on every call with:
Error: cannot get property "workingDirectory" without inject
- the
loopforge_statusagent tool returns that error instead of{"found": false} /loopforge ...goes through the samecwdOf(), so it fails the same way
So the plugin is unusable on DSH 0.2.2-rc.3, even on a project where the Portable skill is installed.
Reproduction
-
Install the Portable skill into a project (see "Related observations" #1 for why
npx -y loopforge-cli@latestcannot do this today):node <repo>/local/bin/loopforge.mjs skills install dsh --project-root <project> -
Install the bundle into a DSH profile:
dsh plugin --profile <profile> add -w <repo>/local/dsh-plugin -
Restart DSH, then call the
loopforge_statustool from the agent, or type/loopforge status. -
Observe
Error: cannot get property "workingDirectory" without injectinstead of a status result.
Cause
index.js reads workingDirectory as a context property:
const service = agent?.ctx?.workingDirectory
?? agent?.ctx?.get?.('workingDirectory')
?? owner?.ctx?.workingDirectory
?? owner?.ctx?.get?.('workingDirectory')
but declares only:
export const inject = ['commands', 'tools']
In Cordis, reading an un-injected service property throws rather than returning undefined, so the DSH_PROJECT_ROOT / process.cwd() fallbacks are never reached.
Separately, the Agent contract in DSH is { readonly id: SessionId }; workingDirectory.get(session) takes a Session, which the plugin does not have here. workingDirectory.ensure(agent) is the documented way to get a session's directory from an Agent.
Suggested fix
-
Declare the service:
export const inject = ['commands', 'tools', 'workingDirectory'] -
Resolve the directory through the service API:
async function cwdOf(ctx, owner) { const agent = owner?.agent ?? owner const service = ctx.workingDirectory if (agent && typeof service?.ensure === 'function') { try { return resolve(await service.ensure(agent)) } catch {} } return resolve(process.env.DSH_PROJECT_ROOT ?? service?.defaultDirectory ?? process.cwd()) } -
awaitthe two call sites —handle()and the tool'sexecute().
Verified with this patch on DSH 0.2.2-rc.3 (macOS arm64, Node 24.19.0, Python 3.13.3): the tool returns {"found": false} on a fresh project, and /loopforge start <request> creates artifacts/<slug>/workflow-state.json through the skill's scripts/workflow_state.py.
Diagnostics
DSH 0.2.2-rc.3 (desktop runtime), profile-managed
OS macOS 15 arm64
node v24.19.0
python3 3.13.3
bundle @tencent/loopforge-dsh 0.1.0 (link: install from local dir)
error Error: cannot get property "workingDirectory" without inject
Related
- #112 / #120 — feature requests for a DSH host plugin, closed 2026-11-10. This bug is in the plugin that
landed afterwards (local/dsh-plugin), so it is not a re-report of those. - Searched
dshandloopforge-dshin existing issues: nothing covers this injection failure.
Related observations
- npm release lags the docs.
npx -y loopforge-cli@latest skills install dshfails with
argument host: invalid choice: 'dsh' (choose from codebuddy, codex, cursor, claude)on
[email protected](published 2026-09-16), whiledocs/local/usage.mdand
local/dsh-plugin/README.mdboth document that exact command.local/src/devflow_cli/targets/dsh.py
is already in the repo. Either cut a release or mark the DSH rows as "from source until the next release". - Bundle assumes a project-local skill.
SKILL_ROOT = '.dsh/skills/devflow'is hardcoded relative to
the project, but DSH also scans the user root$DSH_HOME/skills. With the skill installed globally,
/loopforgereports "Skill is not installed in this project". A project-first,
$DSH_HOME/skills/devflowfallback would support both layouts. (The skill's Python also requires a
siblingmanifest.jsonin whatever skills root it lives in — DSH ignores that file, so it is safe to
place there.) /devflowis not provided by this bundle.local/dsh-plugin/README.mdlists/devflow <request>
under "restart DSH and use", but the bundle registers only/loopforge; DSH surfaces skills through the
skill tool/catalog rather than as slash commands. Splitting that list into "provided by this bundle" vs
"provided by the skill install" would avoid the impression that both commands come from the plugin.- Issue template.
.github/ISSUE_TEMPLATE/bug_report.ymlhas no "Local — DeepSeek Harness" option
under Component / host, although DSH is a documented supported host.
- Ngôn ngữ chính
- Go
- Star
- 711
- Fork
- 114
- Merge trung bình
- 1 ngày 10 giờ
- Pull request đã merge (30 ngày)
- 116
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của Tencent/LoopForge
-
[Bug] AI 对话切换 Claude Code 必定 400「不支持的执行器」:assistantEngineClaude 与 executorModelCatalogs 键名不一致Có thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
Tencent/LoopForge#986 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 69/100
Tencent/LoopForge#969 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Tencent/LoopForge#900 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug]: 官方镜像未安装 wecom-cli,企业微信通知报「通知服务未安装 wecom-cli」Có thể đã có người làm @newexploreor đã nhận 5 ngày trước. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Tencent/LoopForge#156 · 1 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 54/100
Tencent/LoopForge#994 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của Tencent/LoopForge
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
trufflesecurity/trufflehog#5573 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Type/Improvement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
OpenNSW/nsw-srilanka#1259 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
katzenpost/katzenpost#1287 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
C-bug O-community X-blathers-untriaged
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
cockroachdb/cockroach#176245 · 1 bình luận ·