@exagone313/dsh-podman 1.5.1 → 1.6.1
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/dist/client/container-card-workspace.d.ts +1 -0
- package/dist/client/container-card-workspace.js +2 -2
- package/dist/client/container-panel-scope.d.ts +13 -0
- package/dist/client/container-panel-scope.js +45 -0
- package/dist/client/containers-tab.d.ts +26 -0
- package/dist/client/containers-tab.js +39 -0
- package/dist/client/index.js +673 -295
- package/dist/client/locales.d.ts +1 -1
- package/dist/client/locales.js +12 -0
- package/dist/client/plugin-navigation.d.ts +24 -0
- package/dist/client/plugin-navigation.js +44 -0
- package/dist/client/podman-containers-guide.d.ts +5 -0
- package/dist/client/podman-containers-guide.js +73 -0
- package/dist/client/podman-containers-styles.d.ts +5 -0
- package/dist/client/podman-containers-styles.js +33 -0
- package/dist/client/podman-containers.d.ts +11 -0
- package/dist/client/podman-containers.js +113 -0
- package/dist/fs-guard.d.ts +2 -0
- package/dist/fs-guard.js +14 -0
- package/dist/fs-key.d.ts +1 -0
- package/dist/fs-key.js +26 -0
- package/dist/fs-provider.js +121 -70
- package/dist/generated/version.d.ts +2 -2
- package/dist/generated/version.js +2 -2
- package/dist/guest-rpc.d.ts +2 -1
- package/dist/guest-rpc.js +13 -6
- package/docs/install-dsh-and-dsh-podman.md +3 -1
- package/docs/install-dsh-and-dsh-podman.zh.md +2 -1
- package/docs/usage.md +38 -17
- package/docs/usage.zh.md +24 -4
- package/package.json +6 -1
package/dist/fs-provider.js
CHANGED
|
@@ -4,7 +4,35 @@
|
|
|
4
4
|
import { detectLineEndings, DIFF_BASIS_MAX_BYTES, fsError, guestChunks, guestStat, guestStatResponse, guestTextChunks, guestVersion, normalizeLineEndings, readDiffBasis, readGuestText, resolveGuestPath, restoreLineEndings, throwIfAborted, unaryGuest, writeGuestFile, } from "./guest-rpc.js";
|
|
5
5
|
import { hostListDir, hostLstat, hostReadByteRange, hostReadBytes, hostReadText, hostRefuse, hostStat, hostTarget, hostTextChunks, isHostTarget, } from "./host-fs.js";
|
|
6
6
|
import { isProjectSkillPath, isUserSkillPath } from "./skill-roots.js";
|
|
7
|
+
import { guardDecision } from "./fs-guard.js";
|
|
8
|
+
import { normalizeFsKey } from "./fs-key.js";
|
|
7
9
|
import { isAbsolute, join, resolve as resolvePath } from "node:path";
|
|
10
|
+
// Overlapping mutations of one target must not both observe the same version
|
|
11
|
+
// and then both write: each guarded mutation holds a per-target lock across
|
|
12
|
+
// stat → check → write, so a second one sees the version the first left behind.
|
|
13
|
+
// Different targets never wait on each other. The entry is dropped when its
|
|
14
|
+
// chain settles, so the map does not grow with every path the session touched.
|
|
15
|
+
const targetLocks = new Map();
|
|
16
|
+
async function withTargetLock(key, run) {
|
|
17
|
+
const previous = targetLocks.get(key) ?? Promise.resolve();
|
|
18
|
+
let release;
|
|
19
|
+
const gate = new Promise((resolve) => {
|
|
20
|
+
release = resolve;
|
|
21
|
+
});
|
|
22
|
+
// Queued, not the gate itself: the next caller awaits a promise that settles
|
|
23
|
+
// only when this mutation has finished, whatever its outcome.
|
|
24
|
+
const queued = previous.then(() => gate);
|
|
25
|
+
targetLocks.set(key, queued);
|
|
26
|
+
await previous;
|
|
27
|
+
try {
|
|
28
|
+
return await run();
|
|
29
|
+
}
|
|
30
|
+
finally {
|
|
31
|
+
release();
|
|
32
|
+
if (targetLocks.get(key) === queued)
|
|
33
|
+
targetLocks.delete(key);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
8
36
|
export function createFilesystemProvider(resolver, options = {}) {
|
|
9
37
|
const projectsRoot = options.projectsRoot ?? "";
|
|
10
38
|
const userRoots = {
|
|
@@ -23,7 +51,10 @@ export function createFilesystemProvider(resolver, options = {}) {
|
|
|
23
51
|
return {
|
|
24
52
|
resolve: async (path, opts) => {
|
|
25
53
|
throwIfAborted(opts?.signal, "resolve");
|
|
26
|
-
|
|
54
|
+
// Collapse the aliases one path can arrive under (a doubled slash, a "."
|
|
55
|
+
// segment, a trailing slash) before anything keys on it, so a read
|
|
56
|
+
// through one spelling satisfies the read-before-write guard for another.
|
|
57
|
+
const resolved = normalizeFsKey(resolveGuestPath(path, opts?.cwd));
|
|
27
58
|
// An explicit container targets that container's guest; the harness's own
|
|
28
59
|
// tools never pass one and keep the session workspace's default.
|
|
29
60
|
const container = typeof opts?.container === "string"
|
|
@@ -109,42 +140,52 @@ export function createFilesystemProvider(resolver, options = {}) {
|
|
|
109
140
|
if (isHostTarget(target))
|
|
110
141
|
hostRefuse("write", target);
|
|
111
142
|
throwIfAborted(signal, "write");
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
// this backend creates it. (The harness's fs-local reports
|
|
120
|
-
// FS_STALE_VERSION here; a path the session read and something else
|
|
121
|
-
// removed must stay writable, so the container tools create it.)
|
|
122
|
-
if (current.exists && currentVersion !== expected.version) {
|
|
123
|
-
throw fsError("FS_STALE_VERSION", `cannot write "${target.displayPath}": file changed since it was read`);
|
|
143
|
+
// The stat, the guard, and the write are one critical section: a second
|
|
144
|
+
// mutation of this path waits here instead of observing the same version
|
|
145
|
+
// and overwriting this one. Different paths never share the lock.
|
|
146
|
+
return await withTargetLock(target.targetKey, async () => {
|
|
147
|
+
const current = await guestStatResponse(target, signal);
|
|
148
|
+
if (current.exists && current.isDir) {
|
|
149
|
+
throw fsError("FS_NOT_REGULAR_FILE", `cannot write "${target.displayPath}": not a regular file`);
|
|
124
150
|
}
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
151
|
+
const currentVersion = current.exists
|
|
152
|
+
? guestVersion(current)
|
|
153
|
+
: undefined;
|
|
154
|
+
if (expected?.kind === "replaceIfVersion") {
|
|
155
|
+
// A file that is gone is a new file: creating it destroys nothing, so
|
|
156
|
+
// this backend creates it (the decision reports that as missing).
|
|
157
|
+
// (The harness's fs-local reports FS_STALE_VERSION here; a path the
|
|
158
|
+
// session read and something else removed must stay writable, so the
|
|
159
|
+
// container tools create it.)
|
|
160
|
+
if (guardDecision(expected.version, currentVersion) === "stale") {
|
|
161
|
+
throw fsError("FS_STALE_VERSION", `cannot write "${target.displayPath}": file changed since it was read`);
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
else if (expected?.kind === "createIfAbsent" && current.exists) {
|
|
165
|
+
throw fsError("FS_NOT_OBSERVED", `cannot overwrite existing "${target.displayPath}" without reading it first`);
|
|
166
|
+
}
|
|
167
|
+
// The basis is gated on both sides: an incoming or existing file at or
|
|
168
|
+
// above the limit yields `before: null` and the consumer falls back to a
|
|
169
|
+
// whole-file diff, so writing one byte into a huge file does not read the
|
|
170
|
+
// whole file back just for presentation. Both sides are LF-normalized so
|
|
171
|
+
// a CRLF overwrite does not read as every line changed.
|
|
172
|
+
const rawBasis = current.exists &&
|
|
173
|
+
Buffer.byteLength(content, "utf8") < DIFF_BASIS_MAX_BYTES &&
|
|
174
|
+
Number(current.size ?? 0) < DIFF_BASIS_MAX_BYTES
|
|
175
|
+
? await readDiffBasis(target, signal)
|
|
176
|
+
: null;
|
|
177
|
+
const before = rawBasis === null
|
|
178
|
+
? null
|
|
179
|
+
: normalizeLineEndings(rawBasis);
|
|
180
|
+
await writeGuestFile(target.binding, target.targetKey, content, { create: true, truncate: true }, signal);
|
|
181
|
+
const after = await guestStatResponse(target, signal);
|
|
182
|
+
return {
|
|
183
|
+
operation: current.exists ? "update" : "create",
|
|
184
|
+
version: guestVersion(after),
|
|
185
|
+
before,
|
|
186
|
+
after: normalizeLineEndings(content),
|
|
187
|
+
};
|
|
188
|
+
});
|
|
148
189
|
},
|
|
149
190
|
stat: (target, signal) => isHostTarget(target)
|
|
150
191
|
? hostStat(target, signal)
|
|
@@ -203,40 +244,50 @@ export function createFilesystemProvider(resolver, options = {}) {
|
|
|
203
244
|
if (isHostTarget(target))
|
|
204
245
|
hostRefuse("edit", target);
|
|
205
246
|
throwIfAborted(signal, "edit");
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
247
|
+
// stat → check → read → write is one critical section, like writeText:
|
|
248
|
+
// overlapping edits of this path queue here rather than both matching
|
|
249
|
+
// against the same version.
|
|
250
|
+
return await withTargetLock(target.targetKey, async () => {
|
|
251
|
+
const current = await guestStatResponse(target, signal);
|
|
252
|
+
const currentVersion = current.exists
|
|
253
|
+
? guestVersion(current)
|
|
254
|
+
: undefined;
|
|
255
|
+
const decision = guardDecision(expected?.version, currentVersion);
|
|
256
|
+
if (decision === "missing") {
|
|
257
|
+
// A file removed after it was read is gone rather than stale; report
|
|
258
|
+
// the harness's not-found code, the one its read tool also uses.
|
|
259
|
+
throw fsError("FS_NOT_FOUND", `cannot edit "${target.displayPath}": not found`);
|
|
260
|
+
}
|
|
261
|
+
if (current.isDir) {
|
|
262
|
+
throw fsError("FS_NOT_REGULAR_FILE", `cannot edit "${target.displayPath}": not a regular file`);
|
|
263
|
+
}
|
|
264
|
+
if (decision === "stale") {
|
|
265
|
+
throw fsError("FS_STALE_VERSION", `cannot edit "${target.displayPath}": file changed since it was read`);
|
|
266
|
+
}
|
|
267
|
+
const raw = await readGuestText(target, signal);
|
|
268
|
+
const before = normalizeLineEndings(raw);
|
|
269
|
+
const lineEndings = detectLineEndings(raw);
|
|
270
|
+
const oldNorm = normalizeLineEndings(typeof edit.oldString === "string" ? edit.oldString : "");
|
|
271
|
+
if (oldNorm.length === 0) {
|
|
272
|
+
throw fsError("FS_EDIT_NOT_FOUND", "old_string must be a non-empty string");
|
|
273
|
+
}
|
|
274
|
+
const newNorm = normalizeLineEndings(typeof edit.newString === "string" ? edit.newString : "");
|
|
275
|
+
const occurrences = before.split(oldNorm).length - 1;
|
|
276
|
+
if (occurrences === 0) {
|
|
277
|
+
throw fsError("FS_EDIT_NOT_FOUND", `old_string was not found in "${target.displayPath}"`);
|
|
278
|
+
}
|
|
279
|
+
if (!edit.replaceAll && occurrences > 1) {
|
|
280
|
+
throw fsError("FS_AMBIGUOUS_EDIT", `old_string matched ${occurrences} times in "${target.displayPath}"; provide a more specific old_string or set replace_all to true`);
|
|
281
|
+
}
|
|
282
|
+
const after = before.split(oldNorm).join(newNorm);
|
|
283
|
+
await writeGuestFile(target.binding, target.targetKey, restoreLineEndings(after, lineEndings), { create: true, truncate: true }, signal);
|
|
284
|
+
const afterInfo = await guestStatResponse(target, signal);
|
|
285
|
+
return {
|
|
286
|
+
version: guestVersion(afterInfo),
|
|
287
|
+
before,
|
|
288
|
+
after,
|
|
289
|
+
};
|
|
290
|
+
});
|
|
240
291
|
},
|
|
241
292
|
// Watching would need a watcher inside each workspace's container (inotify
|
|
242
293
|
// in the guest, or host-side polling of every open tree node), and every
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "1.
|
|
2
|
-
export declare const GIT_COMMIT = "
|
|
1
|
+
export declare const VERSION = "1.6.1";
|
|
2
|
+
export declare const GIT_COMMIT = "50e2fb6";
|
package/dist/guest-rpc.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { FsError, type FsErrorCode } from "@deepseek-ai/dsh-fs";
|
|
1
2
|
import { type WorkspaceBinding, WorkspaceResolver } from "./workspace-binding.js";
|
|
2
3
|
export declare function resolveGuestPath(path: string, sessionCwd: unknown): string;
|
|
3
4
|
export declare function resolveGuestCwd(cwd: unknown, sessionCwd: unknown): string | undefined;
|
|
@@ -9,7 +10,7 @@ export declare const DIFF_BASIS_MAX_BYTES: number;
|
|
|
9
10
|
export declare function normalizeLineEndings(content: string): string;
|
|
10
11
|
export declare function detectLineEndings(raw: string): "CRLF" | "LF";
|
|
11
12
|
export declare function restoreLineEndings(content: string, endings: "CRLF" | "LF"): string;
|
|
12
|
-
export declare function fsError(code:
|
|
13
|
+
export declare function fsError(code: FsErrorCode, message: string): FsError;
|
|
13
14
|
export declare function throwIfAborted(signal: AbortSignal | undefined, verb: string): void;
|
|
14
15
|
export declare function withGuestAuth<T>(binding: WorkspaceBinding, run: (guest: any, token: string) => Promise<T>): Promise<T>;
|
|
15
16
|
export declare function guestChunks(target: any, range: {
|
package/dist/guest-rpc.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// SPDX-FileCopyrightText: 2026 Elouan Martinet <exa@elou.world>
|
|
2
2
|
//
|
|
3
3
|
// SPDX-License-Identifier: MIT
|
|
4
|
+
import { FsError } from "@deepseek-ai/dsh-fs";
|
|
4
5
|
import { metadata, workspaceSlug, } from "./workspace-binding.js";
|
|
5
6
|
import { grpc } from "./grpc/runtime-client.js";
|
|
6
7
|
import { discardUnneededSpill, outputReader, SPILL_ROOT, } from "./output-reader.js";
|
|
@@ -85,10 +86,12 @@ export function restoreLineEndings(content, endings) {
|
|
|
85
86
|
? content
|
|
86
87
|
: normalizeLineEndings(content).split("\n").join("\r\n");
|
|
87
88
|
}
|
|
89
|
+
// fsError builds the harness's typed filesystem failure, so the tool layer can
|
|
90
|
+
// route on the code and append its own remedy (`remediateFsError` appends the
|
|
91
|
+
// re-read step to FS_STALE_VERSION). A plain Error carrying a code string would
|
|
92
|
+
// be indistinguishable from a transport failure there.
|
|
88
93
|
export function fsError(code, message) {
|
|
89
|
-
|
|
90
|
-
error.code = code;
|
|
91
|
-
return error;
|
|
94
|
+
return new FsError(message, code);
|
|
92
95
|
}
|
|
93
96
|
// The harness's FS_ABORTED: a caller that already cancelled must fail before
|
|
94
97
|
// any I/O.
|
|
@@ -213,8 +216,12 @@ export async function* guestTextChunks(target, signal) {
|
|
|
213
216
|
yield tail;
|
|
214
217
|
}
|
|
215
218
|
catch (error) {
|
|
216
|
-
//
|
|
217
|
-
//
|
|
219
|
+
// An already-typed failure — our own FS_NOT_TEXT/FS_ABORTED, or one a
|
|
220
|
+
// caller raised — keeps its identity. A fatal TextDecoder failure is a
|
|
221
|
+
// TypeError, which is the only thing wrapped here (as FS_NOT_TEXT); any
|
|
222
|
+
// other transport error passes through unchanged, as before.
|
|
223
|
+
if (error instanceof FsError)
|
|
224
|
+
throw error;
|
|
218
225
|
if (error instanceof TypeError) {
|
|
219
226
|
throw fsError("FS_NOT_TEXT", `cannot read "${target.displayPath}": invalid UTF-8 text`);
|
|
220
227
|
}
|
|
@@ -234,7 +241,7 @@ export async function readDiffBasis(target, signal) {
|
|
|
234
241
|
return await readGuestText(target, signal);
|
|
235
242
|
}
|
|
236
243
|
catch (error) {
|
|
237
|
-
if (error.code === "FS_NOT_TEXT")
|
|
244
|
+
if (error instanceof FsError && error.code === "FS_NOT_TEXT")
|
|
238
245
|
return null;
|
|
239
246
|
throw error;
|
|
240
247
|
}
|
|
@@ -17,6 +17,8 @@ The goal of this guide is to install:
|
|
|
17
17
|
- the dsh-podman plugin in dsh, which replaces host filesystem and shell access
|
|
18
18
|
- the dsh-podman orchestrator, a separate Podman container that integrates with
|
|
19
19
|
Podman
|
|
20
|
+
- the dsh-podman gateway, a container used for publishing container ports on
|
|
21
|
+
localhost
|
|
20
22
|
|
|
21
23
|
Note that if there is existing installation data at `~/.dsh`, it will be reused.
|
|
22
24
|
|
|
@@ -50,7 +52,7 @@ could be added in the future.
|
|
|
50
52
|
dsh-podman plugin, has access to the Podman socket and manages containers and
|
|
51
53
|
other resources; it runs in a container; referred to later as _orchestrator_
|
|
52
54
|
- **dsh-podman gateway**: the host-network container that publishes guest pod
|
|
53
|
-
ports on the host's loopback; referred to later as _gateway_
|
|
55
|
+
ports on the host's loopback (localhost); referred to later as _gateway_
|
|
54
56
|
- **Podman socket**: while the Podman client can be used without a daemon, it is
|
|
55
57
|
still possible to enable management through a socket, which is required by the
|
|
56
58
|
orchestrator to work as if it were running on the host system
|
|
@@ -16,6 +16,7 @@ SPDX-License-Identifier: MIT
|
|
|
16
16
|
Podman 容器中运行
|
|
17
17
|
- dsh 中的 dsh-podman 插件,它取代了宿主的文件系统和 shell 访问
|
|
18
18
|
- dsh-podman 编排器,一个与 Podman 集成的独立 Podman 容器
|
|
19
|
+
- dsh-podman gateway,一个用于在 localhost 上发布容器端口的容器
|
|
19
20
|
|
|
20
21
|
请注意,如果 `~/.dsh` 中已有安装数据,它将被复用。
|
|
21
22
|
|
|
@@ -40,7 +41,7 @@ SPDX-License-Identifier: MIT
|
|
|
40
41
|
- **dsh-podman 编排器**:接收来自 dsh-podman 插件连接的守护进程,可访问 Podman
|
|
41
42
|
套接字并管理容器和其他资源;它在容器中运行;下文简称 _orchestrator_
|
|
42
43
|
- **dsh-podman gateway**:运行在主机网络上的容器,把 guest pod
|
|
43
|
-
|
|
44
|
+
端口发布到主机回环地址(localhost);下文简称 _gateway_
|
|
44
45
|
- **Podman 套接字**:虽然 Podman
|
|
45
46
|
客户端可以在没有守护进程的情况下使用,但仍然可以通过套接字启用管理,这是编排器以仿佛在主机系统上运行的方式工作所必需的
|
|
46
47
|
- **guest 容器**:由 dsh-podman 编排器创建的容器,与 dsh 工作区相关联
|
package/docs/usage.md
CHANGED
|
@@ -630,23 +630,22 @@ its **Recreate**/**Remove** actions.
|
|
|
630
630
|
|
|
631
631
|
## Podman terminal
|
|
632
632
|
|
|
633
|
-
The plugin owns a **Podman terminal** right-Sidebar tab
|
|
634
|
-
|
|
635
|
-
terminal
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
to **Ctrl+Shift
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
offers.
|
|
633
|
+
The plugin owns a **Podman terminal** right-Sidebar tab. It replaces the
|
|
634
|
+
built-in dsh terminal with its own implementation: the plugin's bundle patch
|
|
635
|
+
disables the stock terminal row and registers this one instead, so the terminal
|
|
636
|
+
shown in the Sidebar is dsh-podman's. Open it from the right Sidebar's new-tab
|
|
637
|
+
guide — the card is **New terminal** — or press **Ctrl+\`**; the tab is named
|
|
638
|
+
after the shell it runs (`bash`, `sh`, …). If the built-in terminal is enabled
|
|
639
|
+
again, the plugin falls back to **Ctrl+Shift+\`**; the agent's `terminal` tool
|
|
640
|
+
is unaffected. It always runs in the session's own workspace — each workspace
|
|
641
|
+
has its own side panes and terminals — so the start form only asks for a
|
|
642
|
+
container and then a shell, and a shell can run in the default container or in a
|
|
643
|
+
named one. If the session's directory names no known workspace the form reports
|
|
644
|
+
that instead of guessing; the harness's own Terminal always uses that
|
|
645
|
+
workspace's default container. The container and shell you last started are
|
|
646
|
+
remembered in the browser's local storage and preselected while they are still
|
|
647
|
+
available — a container that disappeared falls back to the default, and a shell
|
|
648
|
+
the image no longer ships falls back to the first one the container offers.
|
|
650
649
|
|
|
651
650
|
The shell list is discovered **inside the chosen container**: candidate names
|
|
652
651
|
are looked up on that container's PATH (`command -v`) and merged with
|
|
@@ -662,6 +661,28 @@ the screen. Closing the tab leaves the shell retained for a while (until the
|
|
|
662
661
|
host reaps it); **Reconnect** starts a fresh shell in the current selection.
|
|
663
662
|
Closing or recreating a container drops its terminals, so reconnect afterwards.
|
|
664
663
|
|
|
664
|
+
## Workspace containers panel
|
|
665
|
+
|
|
666
|
+
The plugin also owns a **Containers** right-Sidebar tab, separate from the
|
|
667
|
+
Podman terminal. Open it from the right Sidebar's new-tab menu: the **Workspace
|
|
668
|
+
containers** card sits right after **New terminal**, and picking it opens the
|
|
669
|
+
panel in that tab's place. The same panel opens from its **Containers** command.
|
|
670
|
+
|
|
671
|
+
The panel lists only containers from the current session's workspace: the host
|
|
672
|
+
resolves the workspace from the session once, through the same route the
|
|
673
|
+
terminal uses, and other workspaces, the workspace-less PTC container and rows
|
|
674
|
+
without a workspace never appear. If the session belongs to no known workspace,
|
|
675
|
+
the panel says so instead of listing anything. Its header is the workspace block
|
|
676
|
+
from the settings card — the workspace name, a button copying its UUID, its
|
|
677
|
+
running-container count, and **Add container** / **Remove containers** with the
|
|
678
|
+
same confirmations. Each row carries the container's name, state and age and the
|
|
679
|
+
same labelled fields as the settings card — environment and secret environment
|
|
680
|
+
variables, mounts, PATH additions and published ports — with **Edit**,
|
|
681
|
+
**Recreate** and **Remove**. A **More settings…** button in the header opens
|
|
682
|
+
this plugin's settings card — under **Plugins** → **Installed** — when the
|
|
683
|
+
harness serves the **Plugins** panel; without it the button is hidden. Images,
|
|
684
|
+
storage, defaults and the version status stay on that settings card.
|
|
685
|
+
|
|
665
686
|
## Podman operator mode
|
|
666
687
|
|
|
667
688
|
The plugin ships an **agent preset** named _Podman operator mode_ (id
|
package/docs/usage.zh.md
CHANGED
|
@@ -517,10 +517,13 @@ chip 输入框(输入名称并按空格/逗号,或粘贴列表,以添加
|
|
|
517
517
|
|
|
518
518
|
## Podman 终端
|
|
519
519
|
|
|
520
|
-
插件自带一个右侧边栏的 **Podman
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
520
|
+
插件自带一个右侧边栏的 **Podman 终端**标签页,以自身实现取代 dsh
|
|
521
|
+
自带的终端:插件的 bundle patch
|
|
522
|
+
会禁用内置终端界面并改为注册这个终端,因此侧边栏中显示的就是 dsh-podman
|
|
523
|
+
的终端。可从右侧边栏的“新建标签页”指南中打开(卡片名为**新建终端**),或按
|
|
524
|
+
**Ctrl+\`**;标签页以所运行的 shell
|
|
525
|
+
命名(`bash`、`sh`等)。若重新启用内置终端,插件会回退到
|
|
526
|
+
**Ctrl+Shift+\`**;agent 的 `terminal`
|
|
524
527
|
工具不受影响。它始终在会话所在的工作区中运行——每个工作区都有自己的侧边栏和终端——因此启动表单只需选择容器和
|
|
525
528
|
shell,既可在默认容器中运行,也可在命名容器中运行;若会话目录不属于任何已知工作区,表单会直接提示而不是猜测。harness
|
|
526
529
|
自带的终端始终使用该工作区的默认容器。上次启动所使用的容器与 shell
|
|
@@ -539,6 +542,23 @@ shell。启动前还会再次校验所选 shell。
|
|
|
539
542
|
仍会保留一段时间(直到主机回收);**重新连接**会在当前选择中启动一个新的
|
|
540
543
|
shell。关闭或重建容器会丢弃其终端,之后请重新连接。
|
|
541
544
|
|
|
545
|
+
## 工作区容器面板
|
|
546
|
+
|
|
547
|
+
插件还自带一个右侧边栏的 **容器** 标签页,与 Podman
|
|
548
|
+
终端相互独立。可从右侧边栏的新建标签页菜单中打开:**工作区容器** 卡片紧跟在
|
|
549
|
+
**新建终端** 之后,选择该卡片会在该标签页的位置打开面板。也可从 **容器**
|
|
550
|
+
命令打开。
|
|
551
|
+
|
|
552
|
+
面板只列出当前会话所在工作区的容器:主机通过终端所使用的同一路由从会话解析工作区一次,其他工作区、无工作区的
|
|
553
|
+
PTC
|
|
554
|
+
容器以及没有工作区的行都不会出现。若会话不属于任何已知工作区,面板会直接说明而不会列出任何内容。面板标题栏就是设置卡片中的工作区区块:工作区名称、复制其
|
|
555
|
+
UUID 的按钮、正在运行的容器数量,以及带有相同确认流程的 **添加容器** /
|
|
556
|
+
**移除容器**。每个容器行显示名称、状态与创建时间,并与设置卡片一样带有完整的带标签字段——环境变量与机密环境变量、挂载、PATH
|
|
557
|
+
追加项与已发布端口——并提供 **编辑**、**重建** 与 **移除**。当 harness 提供
|
|
558
|
+
**插件** 面板时,标题栏的 **更多设置…** 按钮会打开本插件的设置卡片(位于
|
|
559
|
+
**插件** →
|
|
560
|
+
**已安装**);没有该面板时该按钮会隐藏。镜像、存储、默认值与版本状态仍在该设置卡片中。
|
|
561
|
+
|
|
542
562
|
## Podman 操作员模式
|
|
543
563
|
|
|
544
564
|
插件附带一个名为 _Podman operator mode_(id `podman-ops`)的 **agent
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@exagone313/dsh-podman",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.1",
|
|
4
4
|
"description": "Podman-backed execution for DeepSeek Harness (dsh).",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -79,6 +79,7 @@
|
|
|
79
79
|
"@deepseek-ai/dsh-client-ui-sidebar-right": "0.2.1-rc.2",
|
|
80
80
|
"@deepseek-ai/dsh-client-ui-slots": "0.2.1-rc.2",
|
|
81
81
|
"@deepseek-ai/dsh-client-ui-tool": "0.2.1-rc.2",
|
|
82
|
+
"@deepseek-ai/dsh-fs": "0.2.1-rc.2",
|
|
82
83
|
"@deepseek-ai/dsh-subprocess": "0.2.1-rc.2",
|
|
83
84
|
"@deepseek-ai/schemastery": "3.18.5",
|
|
84
85
|
"@types/node": "^26.6.5",
|
|
@@ -108,6 +109,7 @@
|
|
|
108
109
|
"@deepseek-ai/dsh-client-ui-sidebar-right": "0.2.1-rc.2",
|
|
109
110
|
"@deepseek-ai/dsh-client-ui-slots": "0.2.1-rc.2",
|
|
110
111
|
"@deepseek-ai/dsh-client-ui-tool": "0.2.1-rc.2",
|
|
112
|
+
"@deepseek-ai/dsh-fs": "0.2.1-rc.2",
|
|
111
113
|
"@deepseek-ai/dsh-subprocess": "0.2.1-rc.2",
|
|
112
114
|
"@deepseek-ai/schemastery": "3.18.5",
|
|
113
115
|
"react": "^18.2.0"
|
|
@@ -146,6 +148,9 @@
|
|
|
146
148
|
"@deepseek-ai/dsh-client-ui-tool": {
|
|
147
149
|
"optional": true
|
|
148
150
|
},
|
|
151
|
+
"@deepseek-ai/dsh-fs": {
|
|
152
|
+
"optional": true
|
|
153
|
+
},
|
|
149
154
|
"@deepseek-ai/dsh-subprocess": {
|
|
150
155
|
"optional": true
|
|
151
156
|
},
|