dsh-panel-hello 1.0.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 +57 -0
- package/cordis.patch.yml +5 -0
- package/lib/client.js +74 -0
- package/lib/index.js +4 -0
- package/package.json +32 -0
package/README.md
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# dsh-panel-hello
|
|
2
|
+
|
|
3
|
+
A tiny [DeepSeek Harness](https://github.com/deepseek-ai/DeepSeek-Harness) web
|
|
4
|
+
plugin example: a floating panel in the bottom-right of the dsh web UI that
|
|
5
|
+
displays **hello! word~**.
|
|
6
|
+
|
|
7
|
+
## What it is
|
|
8
|
+
|
|
9
|
+
- A **profile plugin bundle**: `dsh.bundle.patch` points at `cordis.patch.yml`,
|
|
10
|
+
which inserts the `panel-hello` row into the host composition.
|
|
11
|
+
- A **web client plugin**: the package manifest declares
|
|
12
|
+
`dsh.client.platform: "web"` and exports `./client`, so
|
|
13
|
+
`@deepseek-ai/dsh-client-modules` serves `lib/client.js` to the browser and
|
|
14
|
+
the shell mounts it. The bundle registers a React card into the
|
|
15
|
+
`shell.overlay` slot — a list seat that floats above every column and is
|
|
16
|
+
purely additive (it never replaces a shipped surface).
|
|
17
|
+
|
|
18
|
+
No build step: `lib/client.js` is already in the exact
|
|
19
|
+
`window.__ModuleLoader__.load({ id, factory })` format the web shell loads,
|
|
20
|
+
and the plugin has zero dependencies (`require("react")` resolves from the
|
|
21
|
+
shell's module table).
|
|
22
|
+
|
|
23
|
+
## Install
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
# local checkout / this example:
|
|
27
|
+
dsh plugin --profile web add ./dsh-panel-hello
|
|
28
|
+
|
|
29
|
+
# once published to npm, anyone can:
|
|
30
|
+
dsh plugin --profile web add dsh-panel-hello
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
`dsh plugin` forwards to pnpm in the profile directory and reconciles
|
|
34
|
+
`dsh.profile.bundles`, so the bundle patch applies on the next boot.
|
|
35
|
+
|
|
36
|
+
## Activate
|
|
37
|
+
|
|
38
|
+
Plugin-set changes take effect on restart (client bundles are composed into
|
|
39
|
+
`window.__DSH_BOOT__` at boot). Restart the web app, then hard-refresh the
|
|
40
|
+
page: a card pinned to the bottom-right shows **hello! word~**.
|
|
41
|
+
|
|
42
|
+
## Layout
|
|
43
|
+
|
|
44
|
+
```
|
|
45
|
+
dsh-panel-hello/
|
|
46
|
+
package.json # dsh.bundle.patch + dsh.client.platform: web + exports ./client
|
|
47
|
+
cordis.patch.yml # inserts the host-composition row
|
|
48
|
+
lib/index.js # host half (no host behavior — browser-only plugin)
|
|
49
|
+
lib/client.js # browser half: the panel bundle (this is the shipped format)
|
|
50
|
+
README.md
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Remove
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
dsh plugin --profile web remove dsh-panel-hello
|
|
57
|
+
```
|
package/cordis.patch.yml
ADDED
package/lib/client.js
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
// dsh-panel-hello client bundle: a floating panel in the DeepSeek Harness web UI.
|
|
2
|
+
//
|
|
3
|
+
// This IS the shipped bundle format the web shell expects (see the
|
|
4
|
+
// @deepseek-ai/dsh-client-modules contract): a module registered through
|
|
5
|
+
// window.__ModuleLoader__.load({ id, factory }) whose factory `require`s its
|
|
6
|
+
// dependencies from the shell's module table and returns the plugin's module
|
|
7
|
+
// exports (apply + inject). No build step is required for this example —
|
|
8
|
+
// zero dependencies, so the factory body IS the bundle.
|
|
9
|
+
window.__ModuleLoader__.load({
|
|
10
|
+
id: "dsh-panel-hello",
|
|
11
|
+
factory: (require) => {
|
|
12
|
+
var module = { exports: {} };
|
|
13
|
+
var exports = module.exports;
|
|
14
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
15
|
+
|
|
16
|
+
const react = require("react");
|
|
17
|
+
|
|
18
|
+
// A small card pinned to the bottom-right of the frame. It rides the
|
|
19
|
+
// frame-wide `shell.overlay` seat (declared by ui-layout), which floats
|
|
20
|
+
// above every column at z-index 20; the card positions itself inside that
|
|
21
|
+
// layer, so no global z-index fight is needed.
|
|
22
|
+
function HelloPanel() {
|
|
23
|
+
return react.createElement(
|
|
24
|
+
"div",
|
|
25
|
+
{
|
|
26
|
+
"data-hello-panel": true,
|
|
27
|
+
style: {
|
|
28
|
+
position: "absolute",
|
|
29
|
+
right: "16px",
|
|
30
|
+
bottom: "16px",
|
|
31
|
+
padding: "14px 18px",
|
|
32
|
+
borderRadius: "12px",
|
|
33
|
+
background: "var(--dsw-alias-button-elevated-fill, #1e293b)",
|
|
34
|
+
color: "var(--dsw-alias-label-primary, #f8fafc)",
|
|
35
|
+
border: "1px solid var(--dsw-alias-border-l2, rgba(255,255,255,0.12))",
|
|
36
|
+
boxShadow: "0 6px 24px rgba(0, 0, 0, 0.35)",
|
|
37
|
+
fontFamily: "inherit",
|
|
38
|
+
fontSize: "14px",
|
|
39
|
+
lineHeight: "20px",
|
|
40
|
+
userSelect: "none"
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
react.createElement(
|
|
44
|
+
"div",
|
|
45
|
+
{ style: { fontWeight: 600, fontSize: "13px", opacity: 0.75, marginBottom: "4px", letterSpacing: "0.02em" } },
|
|
46
|
+
"Hello Panel"
|
|
47
|
+
),
|
|
48
|
+
react.createElement("div", { style: { fontWeight: 500 } }, "hello! word~")
|
|
49
|
+
);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
const inject = ["slots"];
|
|
53
|
+
|
|
54
|
+
function apply(ctx) {
|
|
55
|
+
// Wait for ui-layout to declare `shell.overlay`, then register this
|
|
56
|
+
// entry. `shell.overlay` is a list slot, so the panel is additive —
|
|
57
|
+
// it never shadows or replaces any shipped surface.
|
|
58
|
+
ctx.effect(
|
|
59
|
+
() =>
|
|
60
|
+
ctx.slots.inject("shell.overlay", () =>
|
|
61
|
+
ctx.slots.register(
|
|
62
|
+
{ name: "shell.overlay", id: "dsh-panel-hello", order: 100 },
|
|
63
|
+
HelloPanel
|
|
64
|
+
)
|
|
65
|
+
),
|
|
66
|
+
"dsh-panel-hello: register hello panel"
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
exports.apply = apply;
|
|
71
|
+
exports.inject = inject;
|
|
72
|
+
return module.exports;
|
|
73
|
+
}
|
|
74
|
+
});
|
package/lib/index.js
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "dsh-panel-hello",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "A tiny DeepSeek Harness web plugin example: a floating panel in the web UI that says hello! word~",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "lib/index.js",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": "./lib/index.js",
|
|
9
|
+
"./client": "./lib/client.js",
|
|
10
|
+
"./package.json": "./package.json"
|
|
11
|
+
},
|
|
12
|
+
"files": [
|
|
13
|
+
"lib",
|
|
14
|
+
"cordis.patch.yml",
|
|
15
|
+
"README.md"
|
|
16
|
+
],
|
|
17
|
+
"license": "MIT",
|
|
18
|
+
"keywords": [
|
|
19
|
+
"deepseek-harness",
|
|
20
|
+
"dsh",
|
|
21
|
+
"plugin",
|
|
22
|
+
"cordis"
|
|
23
|
+
],
|
|
24
|
+
"dsh": {
|
|
25
|
+
"bundle": {
|
|
26
|
+
"patch": "./cordis.patch.yml"
|
|
27
|
+
},
|
|
28
|
+
"client": {
|
|
29
|
+
"platform": "web"
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|