dsh-plugin-container 0.4.6 → 0.5.0

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/README.md CHANGED
@@ -11,6 +11,9 @@ A DSH sidebar panel for managing containers on macOS: Docker (colima / Docker De
11
11
  - Two providers, Docker and Apple container, with runtime status and context switching
12
12
  - Containers, images, volumes, networks, Compose, and commands
13
13
  - Start / stop / restart / delete containers; pull / push / build / inspect / delete images
14
+ - **Pull** with an optional architecture (`linux/amd64` / `linux/arm64`); a pasted `docker pull nginx` works too
15
+ - **Build** an image from a project folder chosen with a folder picker: the form checks the folder, finds Dockerfiles, suggests a tag, and previews the command
16
+ - **Push** an image: pick a target such as `username/app:tag` or `ghcr.io/username/app:tag`; it is tagged first when the name differs, with login hints and a clear message when the registry rejects the push
14
17
  - Logs, inspect, and live follow
15
18
  - **Attach**: `docker attach` for Docker; `container exec` for Apple
16
19
  - **Exec**: open a shell inside a container (`docker exec -it <id> /bin/sh`)
@@ -52,8 +55,6 @@ Do not enable source-path mode and npm-package mode at the same time.
52
55
  - Logs / Follow / Inspect
53
56
  - Attach: take over the container's main process
54
57
  - Exec: open a new shell inside the container
55
- - Build: build an image from an absolute context path and optional Dockerfile
56
- - Push: push an image to its registry
57
58
  - Ask AI / Diagnose: starts a separate DSH session that calls the read-only container tools
58
59
  4. The Images tab shows architecture and can start a container directly from an image
59
60
 
@@ -89,11 +90,11 @@ npm publish --access public --provenance
89
90
  ```bash
90
91
  npm install
91
92
  npm run build # src/client -> lib/client.js
92
- npm test # 47 tests
93
+ npm test # 53 tests
93
94
  npm pack # pre-release check
94
95
  ```
95
96
 
96
- > The plugin has no runtime dependency on `@deepseek-ai/dsh-tools`. Its tools are registered as plain host definitions, so installing it cannot shadow the host's `tools` service. Do not add it to `dependencies` or `peerDependencies`.
97
+ > `@deepseek-ai/dsh-tools` is provided by the host app. **Do not** add it to `dependencies` or `peerDependencies`. Otherwise installing the plugin puts an older copy in the profile's `node_modules`, which shadows the host's own version, leaves the `tools` service missing, and DSH fails to start. Keep it in `devDependencies` only.
97
98
 
98
99
  Layout:
99
100
 
@@ -101,6 +102,7 @@ Layout:
101
102
  index.js Host entry
102
103
  cordis.patch.yml Bundle install patch
103
104
  src/host/service.js Provider routing + Docker
105
+ src/host/images.js Image push/build validation
104
106
  src/host/apple.js Apple container
105
107
  src/host/attach.js Attach/Exec PTY
106
108
  src/host/tools.js Read-only agent tools
package/README.zh-CN.md CHANGED
@@ -11,6 +11,9 @@ DSH 左栏容器面板:管理 macOS 上的 Docker(colima / Docker Desktop /
11
11
  - Docker / Apple container 双 provider,运行时状态、上下文切换
12
12
  - 容器、镜像、卷、网络、Compose、命令
13
13
  - 容器启动/停止/重启/删除,镜像 pull/push/build/inspect/delete
14
+ - **拉取镜像**:可选指定架构(`linux/amd64` / `linux/arm64`),也可以直接粘贴 `docker pull nginx` 整条命令
15
+ - **构建镜像**:用文件夹选择器选择项目目录,表单会实时检查目录、识别 Dockerfile、推荐镜像名,并预览将执行的命令
16
+ - **推送镜像**:选择目标名,如 `用户名/app:tag` 或 `ghcr.io/用户名/app:tag`;名字不同时会先打标签,带登录提示,被仓库拒绝时给出明确说明
14
17
  - 查看日志、inspect、实时 follow
15
18
  - **Attach**:Docker `docker attach`;Apple `container exec`
16
19
  - **Exec**:进入容器内部 shell(`docker exec -it <id> /bin/sh`)
@@ -52,8 +55,6 @@ node scripts/install-profile.mjs --home "$HOME/.dsh" --profile desktop
52
55
  - 日志 / Follow / Inspect
53
56
  - Attach:接管容器主进程
54
57
  - Exec:在容器内开一个新 shell
55
- - Build:用绝对路径构建上下文和可选 Dockerfile 构建镜像
56
- - Push:把镜像推送到 registry
57
58
  - 问 AI / 诊断:新建独立 DSH 会话,调用只读容器工具
58
59
  4. 镜像 tab 可查看架构,或直接用镜像启动容器
59
60
 
@@ -89,11 +90,11 @@ npm publish --access public --provenance
89
90
  ```bash
90
91
  npm install
91
92
  npm run build # src/client -> lib/client.js
92
- npm test # 47 tests
93
+ npm test # 53 tests
93
94
  npm pack # 发布前检查
94
95
  ```
95
96
 
96
- > 插件没有对 `@deepseek-ai/dsh-tools` 的运行时依赖。工具使用宿主提供的普通定义注册,因此不会在 profile 里覆盖宿主的 `tools` 服务。不要把它加进 `dependencies` 或 `peerDependencies`。
97
+ > `@deepseek-ai/dsh-tools` 由宿主应用提供,**不要**加进 `dependencies` / `peerDependencies`。否则安装插件时会在 profile 的 `node_modules` 里装一份旧版,盖住宿主自带的版本,导致 `tools` 服务缺失、DSH 启动失败。它只放在 `devDependencies`。
97
98
 
98
99
  主要结构:
99
100
 
@@ -101,6 +102,7 @@ npm pack # 发布前检查
101
102
  index.js Host 入口
102
103
  cordis.patch.yml bundle 安装 patch
103
104
  src/host/service.js provider 路由 + Docker
105
+ src/host/images.js 镜像 push/build 校验
104
106
  src/host/apple.js Apple container
105
107
  src/host/attach.js Attach/Exec PTY
106
108
  src/host/tools.js 只读 Agent Tools