dsh-remote 0.4.3 → 0.4.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.js +4 -2
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -831,8 +831,10 @@ export async function apply(ctx, config) {
|
|
|
831
831
|
if (req.method !== 'POST') return sendJson(res, 405, { ok: false, error: 'method not allowed' })
|
|
832
832
|
try {
|
|
833
833
|
const dp = (ctx && ctx.get && ctx.get('directoryPicker')) || (ctx && ctx.directoryPicker) || null
|
|
834
|
-
if (!dp || typeof dp.
|
|
835
|
-
const
|
|
834
|
+
if (!dp || typeof dp.capability !== 'function') return sendJson(res, 400, { ok: false, error: '本地目录选择器服务不可用(缺少 DSH directory-picker backend)' })
|
|
835
|
+
const cap = await Promise.resolve(dp.capability())
|
|
836
|
+
if (!cap || cap.kind !== 'native' || typeof cap.pick !== 'function') return sendJson(res, 400, { ok: false, error: '本地目录选择器不可用(当前为非原生/浏览后端,请在输入框手动填本地路径)' })
|
|
837
|
+
const picked = await Promise.resolve(cap.pick())
|
|
836
838
|
if (!picked || typeof picked !== 'string') return sendJson(res, 200, { ok: true, cancelled: true })
|
|
837
839
|
return sendJson(res, 200, { ok: true, path: picked })
|
|
838
840
|
} catch (err) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-remote",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.4",
|
|
4
4
|
"description": "Remote-work assistant for DeepSeek Harness: connect SSH (password or key), pick a remote workspace, operate on it with rw_pick_workspace / rw_list_dir / rw_read_file / rw_exec / rw_sync tools, and mirror it to a real local directory (SFTP) so the DSH native workspace can adopt it.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"deepseek-harness",
|