zzzmmmnn/dsh-openkapsel0

dsh-openkapsel

DSH 的 OpenKapsel 远程工作区桥接插件,通过工具调用操作远程工作区的文件、终端等。

AI 分析

核心用途是让 DSH 能够直接操控远程的 OpenKapsel 工作区。适合需要跨设备管理文件、执行 Shell 命令及同步上下文的开发者。

套件
dsh-openkapsel
版本
0.6.0
授權
MIT
最近更新
2026年9月9日

安裝

此插件尚未提供可驗證的 bundle,或相容性檢查未通過。請先閱讀倉庫說明。 閱讀完整 README ↗

Usage

  1. kapsel_config(workspace_url, control_token) stores credentials in this DSH session's private plugin state, then selects or creates an active root Plan for mutation attribution. Re-run it to switch workspaces or rotate credentials.
  2. skill("openkapsel-rest") loads the authoritative REST reference before nontrivial operations.
  3. Operate through the remote tools:
ToolPurpose
kapsel_config / kapsel_statusConfigure or inspect the active workspace
kapsel_plan_updateUpdate, reparent, cancel, or complete a Plan with a structured debrief
kapsel_fs_list / kapsel_fs_read / kapsel_fs_statRead-side filesystem
kapsel_fs_write / kapsel_fs_replaceRemote text write/edit
kapsel_shell_exec / kapsel_task_outputRun and poll a remote Shell task
kapsel_httpContext, Memory, sharing, preview, schedules, and other REST surfaces

kapsel_http.json is always a JSON object. Endpoint fields belong inside it, not beside it. Context-management endpoints are handled specially because their plan_id fields describe the Context graph rather than ordinary operation attribution; prefer kapsel_plan_update for Plan changes.

Each DSH agent is keyed separately by agent.id. Credentials live under $DSH_HOME/state/dsh-openkapsel//.openkapsel.env; active Plan and taskname values are held in an agent-keyed WeakMap. The local project cwd is not used for credentials or remote-workspace selection. An absolute stateDir plugin option can replace the default private state root.

For a recorded mutation, taskname is resolved from the current tool call, then the selected active Plan/session value, then the value set by kapsel_config, then the plugin's preset configuration, and finally dsh. Empty and whitespace-only values do not suppress this fallback. The active Plan is selected automatically when plan_id is omitted; selecting a persisted Plan after a Host restart also restores that Plan's taskname. A missing or blank message receives a short default operation message.