@exagone313/dsh-podman 1.2.1 → 1.3.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/dist/card-route.d.ts +8 -0
- package/dist/card-route.js +19 -8
- package/dist/client/ContainerCard.js +147 -110
- package/dist/client/card-protocol.d.ts +4 -0
- package/dist/client/card-protocol.js +34 -0
- package/dist/client/container-card-caches.d.ts +1 -1
- package/dist/client/container-card-caches.js +19 -17
- package/dist/client/container-card-config.d.ts +47 -0
- package/dist/client/container-card-config.js +160 -0
- package/dist/client/container-card-controller.d.ts +35 -3
- package/dist/client/container-card-controller.js +263 -41
- package/dist/client/container-card-create-modal.d.ts +5 -1
- package/dist/client/container-card-create-modal.js +111 -94
- package/dist/client/container-card-defaults.d.ts +16 -0
- package/dist/client/container-card-defaults.js +147 -0
- package/dist/client/container-card-dialog-styles.d.ts +7 -0
- package/dist/client/container-card-dialog-styles.js +70 -0
- package/dist/client/container-card-dialog.d.ts +12 -0
- package/dist/client/container-card-dialog.js +47 -0
- package/dist/client/container-card-directory-styles.d.ts +1 -1
- package/dist/client/container-card-directory-styles.js +5 -5
- package/dist/client/container-card-directory.js +8 -7
- package/dist/client/container-card-edit-modal.d.ts +39 -0
- package/dist/client/container-card-edit-modal.js +29 -0
- package/dist/client/container-card-editors.d.ts +5 -2
- package/dist/client/container-card-editors.js +109 -134
- package/dist/client/container-card-field-styles.d.ts +7 -0
- package/dist/client/container-card-field-styles.js +63 -0
- package/dist/client/container-card-form.d.ts +47 -0
- package/dist/client/container-card-form.js +61 -0
- package/dist/client/container-card-group.d.ts +9 -0
- package/dist/client/container-card-group.js +22 -0
- package/dist/client/container-card-images.d.ts +6 -2
- package/dist/client/container-card-images.js +63 -23
- package/dist/client/container-card-paths.js +43 -52
- package/dist/client/container-card-ports.d.ts +3 -4
- package/dist/client/container-card-ports.js +74 -38
- package/dist/client/container-card-resources.d.ts +38 -0
- package/dist/client/container-card-resources.js +73 -0
- package/dist/client/container-card-row.d.ts +11 -19
- package/dist/client/container-card-row.js +122 -122
- package/dist/client/container-card-secrets.d.ts +31 -3
- package/dist/client/container-card-secrets.js +174 -56
- package/dist/client/container-card-shared.d.ts +173 -6
- package/dist/client/container-card-shared.js +616 -57
- package/dist/client/container-card-status.d.ts +18 -0
- package/dist/client/container-card-status.js +166 -0
- package/dist/client/container-card-styles.d.ts +49 -7
- package/dist/client/container-card-styles.js +396 -40
- package/dist/client/container-card-table-styles.d.ts +15 -0
- package/dist/client/container-card-table-styles.js +237 -0
- package/dist/client/container-card-tabs-styles.d.ts +5 -0
- package/dist/client/container-card-tabs-styles.js +46 -0
- package/dist/client/container-card-toast.d.ts +5 -0
- package/dist/client/container-card-toast.js +10 -0
- package/dist/client/container-card-volumes.d.ts +1 -0
- package/dist/client/container-card-volumes.js +14 -19
- package/dist/client/container-card-workspace.d.ts +8 -12
- package/dist/client/container-card-workspace.js +76 -14
- package/dist/client/index.js +6488 -3474
- package/dist/client/locales.d.ts +10 -1
- package/dist/client/locales.js +268 -114
- package/dist/client/relative-time.d.ts +10 -0
- package/dist/client/relative-time.js +74 -0
- package/dist/client/slot-contract.d.ts +8 -0
- package/dist/client/tool-views.js +1 -1
- package/dist/container-env.js +1 -1
- package/dist/env-rows.d.ts +9 -11
- package/dist/env-rows.js +72 -40
- package/dist/generated/version.d.ts +2 -2
- package/dist/generated/version.js +2 -2
- package/dist/guest-terminal.js +1 -1
- package/dist/mount-enums.d.ts +11 -0
- package/dist/mount-enums.js +60 -0
- package/dist/subprocess.js +1 -1
- package/dist/terminal-sessions.js +2 -2
- package/dist/terminal-shells.js +1 -1
- package/dist/tool-handlers.js +1 -1
- package/dist/workspace-binding.js +2 -2
- package/docs/architecture.md +4 -4
- package/docs/architecture.zh.md +1 -1
- package/docs/configuration.md +26 -25
- package/docs/configuration.zh.md +13 -11
- package/docs/development-prompt.md +7 -7
- package/docs/development-prompt.zh.md +7 -7
- package/docs/development.md +20 -16
- package/docs/development.zh.md +17 -16
- package/docs/install-dsh-and-dsh-podman.md +13 -12
- package/docs/install-dsh-and-dsh-podman.zh.md +13 -9
- package/docs/usage.md +189 -39
- package/docs/usage.zh.md +148 -29
- package/package.json +5 -1
- package/dist/client/container-card-default-env.d.ts +0 -10
- package/dist/client/container-card-default-env.js +0 -69
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type CardState } from "./container-card-controller.js";
|
|
2
|
+
import { type Translate } from "./locales.js";
|
|
3
|
+
import { type ReactNode } from "react";
|
|
4
|
+
export declare function StatusSection(props: {
|
|
5
|
+
t: Translate;
|
|
6
|
+
dshVersion: string;
|
|
7
|
+
version: string;
|
|
8
|
+
commit: string;
|
|
9
|
+
versionState: CardState["versionState"];
|
|
10
|
+
orchestratorVersion: string;
|
|
11
|
+
orchestratorCommit: string;
|
|
12
|
+
orchestratorReady: boolean;
|
|
13
|
+
orchestratorKnown: boolean;
|
|
14
|
+
gatewayState: CardState["gatewayState"];
|
|
15
|
+
gatewayVersion: string;
|
|
16
|
+
gatewayCommit: string;
|
|
17
|
+
gatewayVersionState: CardState["gatewayVersionState"];
|
|
18
|
+
}): ReactNode;
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
// SPDX-FileCopyrightText: 2026 Elouan Martinet <exa@elou.world>
|
|
3
|
+
//
|
|
4
|
+
// SPDX-License-Identifier: MIT
|
|
5
|
+
// The Status tab: one table naming every component the card knows about — the
|
|
6
|
+
// harness, this plugin and the two daemons it talks to — with the state each
|
|
7
|
+
// one reports, its version and its commit, and the button that copies the lines
|
|
8
|
+
// for a bug report. The State column carries the runtime state and, beside it,
|
|
9
|
+
// the version comparison: a component the plugin runs alongside reads "ready"
|
|
10
|
+
// plus "different versions", one the plugin cannot talk to reads "incompatible".
|
|
11
|
+
// The reload that re-reads the snapshot sits at the bottom of the page, below
|
|
12
|
+
// the tabs, so it stays reachable from every tab.
|
|
13
|
+
import { CardGroup } from "./container-card-group.js";
|
|
14
|
+
import { countLabel, StatusChip, Subsection, } from "./container-card-shared.js";
|
|
15
|
+
import { TABLE_CARD_CLASS, TABLE_CLASS, } from "./container-card-table-styles.js";
|
|
16
|
+
import { missingValue } from "./container-card-styles.js";
|
|
17
|
+
import { Button, writeClipboard } from "@deepseek-ai/dsh-client-ui-primitives";
|
|
18
|
+
import { useEffect, useRef, useState } from "react";
|
|
19
|
+
// One cell of the version table: the landed body scale, while the responsive
|
|
20
|
+
// stylesheet owns its padding and the hairlines between rows.
|
|
21
|
+
const versionCell = {
|
|
22
|
+
fontSize: "13px",
|
|
23
|
+
lineHeight: "20px",
|
|
24
|
+
color: "var(--dsw-alias-label-primary)",
|
|
25
|
+
};
|
|
26
|
+
// A commit is an opaque hash, so it reads in the mono face and one step down
|
|
27
|
+
// from the component it belongs to.
|
|
28
|
+
const versionCommit = {
|
|
29
|
+
...versionCell,
|
|
30
|
+
color: "var(--dsw-alias-label-secondary)",
|
|
31
|
+
fontFamily: "var(--dsw-alias-font-mono, ui-monospace, monospace)",
|
|
32
|
+
};
|
|
33
|
+
// A state chip and the divergence chip beside it, on one wrapping line.
|
|
34
|
+
const stateLine = {
|
|
35
|
+
display: "inline-flex",
|
|
36
|
+
flexWrap: "wrap",
|
|
37
|
+
alignItems: "center",
|
|
38
|
+
gap: "6px",
|
|
39
|
+
};
|
|
40
|
+
// The table is spaced off the section title above it.
|
|
41
|
+
const versionTable = {
|
|
42
|
+
marginTop: "12px",
|
|
43
|
+
};
|
|
44
|
+
// The chip a version comparison earns: a compatible difference is a warning, a
|
|
45
|
+
// major mismatch an error, and an exact match no chip at all.
|
|
46
|
+
function versionNote(state) {
|
|
47
|
+
if (state === "major-mismatch") {
|
|
48
|
+
return { tone: "error", label: "versionIncompatible" };
|
|
49
|
+
}
|
|
50
|
+
if (state === "minor-mismatch") {
|
|
51
|
+
return { tone: "warn", label: "versionCompatibleDifferent" };
|
|
52
|
+
}
|
|
53
|
+
return undefined;
|
|
54
|
+
}
|
|
55
|
+
export function StatusSection(props) {
|
|
56
|
+
const { t, dshVersion, version, commit, versionState, orchestratorVersion, orchestratorCommit, orchestratorReady, orchestratorKnown, gatewayState, gatewayVersion, gatewayCommit, gatewayVersionState, } = props;
|
|
57
|
+
const [copyState, setCopyState] = useState("idle");
|
|
58
|
+
const copyResetTimer = useRef();
|
|
59
|
+
// Copies the version lines as displayed, so a user can paste them into a bug
|
|
60
|
+
// report without transcribing anything.
|
|
61
|
+
const copyVersions = async () => {
|
|
62
|
+
const lines = [
|
|
63
|
+
`${t("dsh")} ${dshVersion || t("valueMissing")}`,
|
|
64
|
+
`${t("cardTitle")} ${version}${commit ? ` · ${commit}` : ""}`,
|
|
65
|
+
`${t("orchestrator")} ${orchestratorVersion || t("valueMissing")}${orchestratorCommit ? ` · ${orchestratorCommit}` : ""}`,
|
|
66
|
+
`${t("gateway")} ${gatewayState === "running"
|
|
67
|
+
? `${gatewayVersion}${gatewayCommit ? ` · ${gatewayCommit}` : ""}`
|
|
68
|
+
: gatewayState === "incompatible"
|
|
69
|
+
? t("gatewayIncompatible")
|
|
70
|
+
: t("gatewayNotRunning")}`,
|
|
71
|
+
];
|
|
72
|
+
setCopyState((await writeClipboard(lines.join("\n"))) ? "copied" : "failed");
|
|
73
|
+
if (copyResetTimer.current !== undefined) {
|
|
74
|
+
clearTimeout(copyResetTimer.current);
|
|
75
|
+
}
|
|
76
|
+
copyResetTimer.current = setTimeout(() => setCopyState("idle"), 1500);
|
|
77
|
+
};
|
|
78
|
+
// The reset timer is cancelled on unmount, so it cannot fire against an
|
|
79
|
+
// unmounted component.
|
|
80
|
+
useEffect(() => () => {
|
|
81
|
+
if (copyResetTimer.current !== undefined) {
|
|
82
|
+
clearTimeout(copyResetTimer.current);
|
|
83
|
+
}
|
|
84
|
+
}, []);
|
|
85
|
+
// How many version lines the snapshot actually knows, so the header states a
|
|
86
|
+
// real count rather than the four rows it always renders.
|
|
87
|
+
const knownVersions = [
|
|
88
|
+
dshVersion,
|
|
89
|
+
version,
|
|
90
|
+
orchestratorVersion,
|
|
91
|
+
gatewayState === "running" ? gatewayVersion : "",
|
|
92
|
+
].filter((line) => line !== "").length;
|
|
93
|
+
// The gateway's runtime state alone: the version comparison rides the State
|
|
94
|
+
// cell beside it, except when the state already reads as the incompatibility.
|
|
95
|
+
const gatewayRowState = gatewayState === "running"
|
|
96
|
+
? { tone: "ok", label: "stateReady" }
|
|
97
|
+
: gatewayState === "incompatible"
|
|
98
|
+
? { tone: "error", label: "versionIncompatible" }
|
|
99
|
+
: gatewayState === "absent"
|
|
100
|
+
? { tone: "warn", label: "stateAbsent" }
|
|
101
|
+
: { tone: "muted", label: "stateUnknown" };
|
|
102
|
+
// The orchestrator's state, refined by the comparison: an orchestrator whose
|
|
103
|
+
// versions are incompatible refuses every call, so its state names that rather
|
|
104
|
+
// than repeating "not ready" beside a second "incompatible" chip. A compatible
|
|
105
|
+
// difference leaves the state alone and rides beside it.
|
|
106
|
+
const orchestratorNote = versionNote(versionState);
|
|
107
|
+
const orchestratorRowState = !orchestratorKnown
|
|
108
|
+
? { tone: "muted", label: "stateUnknown" }
|
|
109
|
+
: !orchestratorReady
|
|
110
|
+
? orchestratorNote?.tone === "error"
|
|
111
|
+
? { tone: "error", label: "versionIncompatible" }
|
|
112
|
+
: { tone: "error", label: "stateNotReady" }
|
|
113
|
+
: { tone: "ok", label: "stateReady" };
|
|
114
|
+
const componentRows = [
|
|
115
|
+
{
|
|
116
|
+
key: "dsh",
|
|
117
|
+
component: t("dsh"),
|
|
118
|
+
state: dshVersion === ""
|
|
119
|
+
? { tone: "muted", label: "stateUnknown" }
|
|
120
|
+
: { tone: "ok", label: "stateReady" },
|
|
121
|
+
version: dshVersion,
|
|
122
|
+
commit: "",
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
key: "plugin",
|
|
126
|
+
component: t("cardTitle"),
|
|
127
|
+
// This plugin is not a separate daemon, so it reports no runtime state;
|
|
128
|
+
// its version is the reference the other rows are compared against.
|
|
129
|
+
version,
|
|
130
|
+
commit,
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
key: "orchestrator",
|
|
134
|
+
component: t("orchestrator"),
|
|
135
|
+
state: orchestratorRowState,
|
|
136
|
+
versionNote: orchestratorRowState.label === "versionIncompatible"
|
|
137
|
+
? undefined
|
|
138
|
+
: orchestratorNote,
|
|
139
|
+
version: orchestratorVersion,
|
|
140
|
+
commit: orchestratorCommit,
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
key: "gateway",
|
|
144
|
+
component: t("gateway"),
|
|
145
|
+
state: gatewayRowState,
|
|
146
|
+
versionNote: gatewayState === "running"
|
|
147
|
+
? versionNote(gatewayVersionState)
|
|
148
|
+
: undefined,
|
|
149
|
+
version: gatewayVersion,
|
|
150
|
+
commit: gatewayCommit,
|
|
151
|
+
},
|
|
152
|
+
];
|
|
153
|
+
return (_jsx(CardGroup, { title: t("groupStatusTitle"), summary: countLabel(t, knownVersions, "countVersionOne", "countVersionMany"),
|
|
154
|
+
// The version table is always listed, so the card always has content.
|
|
155
|
+
hasContent: true, className: TABLE_CARD_CLASS, children: _jsx(Subsection, { title: t("versionsTitle"), action: _jsx(Button, { variant: "outline", size: "sm", onClick: () => void copyVersions(), children: copyState === "copied"
|
|
156
|
+
? t("copied")
|
|
157
|
+
: copyState === "failed"
|
|
158
|
+
? t("copyFailed")
|
|
159
|
+
: t("copyVersions") }), children: _jsxs("table", { className: TABLE_CLASS, style: versionTable, children: [_jsx("thead", { children: _jsxs("tr", { children: [_jsx("th", { scope: "col", children: t("columnComponent") }), _jsx("th", { scope: "col", children: t("columnState") }), _jsx("th", { scope: "col", children: t("columnVersion") }), _jsx("th", { scope: "col", children: t("columnCommit") })] }) }), _jsx("tbody", { children: componentRows.map((row) => (_jsxs("tr", { children: [_jsx("td", { "data-label": t("columnComponent"), style: versionCell, children: row.component }), _jsx("td", { "data-label": t("columnState"), style: versionCell, children: _jsxs("span", { style: stateLine, children: [row.state === undefined
|
|
160
|
+
? _jsx("span", { style: missingValue, children: t("valueMissing") })
|
|
161
|
+
: (_jsx(StatusChip, { tone: row.state.tone, label: t(row.state.label) })), row.versionNote === undefined ? null : (_jsx(StatusChip, { tone: row.versionNote.tone, label: t(row.versionNote.label) }))] }) }), _jsx("td", { "data-label": t("columnVersion"), style: versionCell, children: row.version === ""
|
|
162
|
+
? _jsx("span", { style: missingValue, children: t("valueMissing") })
|
|
163
|
+
: row.version }), _jsx("td", { "data-label": t("columnCommit"), style: versionCommit, children: row.commit === ""
|
|
164
|
+
? _jsx("span", { style: missingValue, children: t("valueMissing") })
|
|
165
|
+
: row.commit })] }, row.key))) })] }) }) }));
|
|
166
|
+
}
|
|
@@ -1,15 +1,57 @@
|
|
|
1
|
+
export declare const cardTitle: React.CSSProperties;
|
|
1
2
|
export declare const sectionTitle: React.CSSProperties;
|
|
3
|
+
export declare const pageColumn: React.CSSProperties;
|
|
4
|
+
export declare const card: React.CSSProperties;
|
|
5
|
+
export declare const cardList: React.CSSProperties;
|
|
6
|
+
export declare const cardContent: React.CSSProperties;
|
|
7
|
+
export declare const actionRow: React.CSSProperties;
|
|
8
|
+
export declare const rowMain: React.CSSProperties;
|
|
9
|
+
export declare const rowName: React.CSSProperties;
|
|
10
|
+
export declare const rowActions: React.CSSProperties;
|
|
11
|
+
export declare const destructiveAction: React.CSSProperties;
|
|
12
|
+
export type ActionEmphasis = "warn" | "business" | "success";
|
|
13
|
+
export declare const warnAction: React.CSSProperties;
|
|
14
|
+
export declare const businessAction: React.CSSProperties;
|
|
15
|
+
export declare const successAction: React.CSSProperties;
|
|
16
|
+
export declare const emphasisAction: Record<ActionEmphasis, React.CSSProperties>;
|
|
17
|
+
export declare const cardRow: React.CSSProperties;
|
|
18
|
+
export declare const cardBlockRow: React.CSSProperties;
|
|
19
|
+
export declare const blockWrapper: React.CSSProperties;
|
|
20
|
+
export declare const headerRule: React.CSSProperties;
|
|
21
|
+
export declare const blockFields: React.CSSProperties;
|
|
22
|
+
export declare const fieldGroup: React.CSSProperties;
|
|
23
|
+
export declare const fieldGroupLabel: React.CSSProperties;
|
|
24
|
+
export declare const fieldLine: React.CSSProperties;
|
|
25
|
+
export declare const statusStrip: React.CSSProperties;
|
|
26
|
+
export declare const tabPanel: React.CSSProperties;
|
|
27
|
+
export declare const editorTitle: React.CSSProperties;
|
|
28
|
+
export declare const rowMeta: React.CSSProperties;
|
|
29
|
+
export declare const rowDivider: React.CSSProperties;
|
|
30
|
+
export declare const headerCount: React.CSSProperties;
|
|
31
|
+
export declare const workspaceStatus: React.CSSProperties;
|
|
32
|
+
export declare const statusMuted: React.CSSProperties;
|
|
33
|
+
export declare const statusChip: React.CSSProperties;
|
|
34
|
+
export declare const imageFields: React.CSSProperties;
|
|
35
|
+
export declare const imageFieldLabel: React.CSSProperties;
|
|
36
|
+
export declare const imageFieldValue: React.CSSProperties;
|
|
37
|
+
export declare const missingValue: React.CSSProperties;
|
|
38
|
+
export declare const imageFieldOwnLine: React.CSSProperties;
|
|
2
39
|
export declare const banner: React.CSSProperties;
|
|
3
40
|
export declare const greyId: React.CSSProperties;
|
|
4
41
|
export declare const hint: React.CSSProperties;
|
|
5
42
|
export declare const fieldLabel: React.CSSProperties;
|
|
6
|
-
export declare const
|
|
7
|
-
export declare const
|
|
8
|
-
export declare const
|
|
9
|
-
export declare const
|
|
43
|
+
export declare const containerNameHeading: React.CSSProperties;
|
|
44
|
+
export declare const editorGroup: React.CSSProperties;
|
|
45
|
+
export declare const envRow: React.CSSProperties;
|
|
46
|
+
export declare const envField: React.CSSProperties;
|
|
47
|
+
export declare const envFieldLabel: React.CSSProperties;
|
|
48
|
+
export declare const fieldHint: React.CSSProperties;
|
|
49
|
+
export declare const mountField: React.CSSProperties;
|
|
50
|
+
export declare const mountKindField: React.CSSProperties;
|
|
51
|
+
export declare const footerStack: React.CSSProperties;
|
|
52
|
+
export declare const dirtyBadge: React.CSSProperties;
|
|
53
|
+
export declare const dirtyBadgeSlot: React.CSSProperties;
|
|
10
54
|
export declare const footerRow: React.CSSProperties;
|
|
11
|
-
export declare const tableStyle: React.CSSProperties;
|
|
12
|
-
export declare const thStyle: React.CSSProperties;
|
|
13
|
-
export declare const tdStyle: React.CSSProperties;
|
|
14
55
|
export declare const imageSelect: React.CSSProperties;
|
|
15
56
|
export declare const fieldSelect: React.CSSProperties;
|
|
57
|
+
export declare const slotSelect: React.CSSProperties;
|