dsh-todo-float-ball 0.8.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/lib/index.js ADDED
@@ -0,0 +1,36 @@
1
+ // dsh-todo-float-ball - host half.
2
+ // Minimal dual-face mount pattern (identical to the verified dsh-font-enhancer):
3
+ // the host registers a loopback-only health route so the bundle has a real
4
+ // cordis activate (inject=['webServer']); the visual work lives in lib/client.js,
5
+ // mounted by the client-modules system once the host activates. Works on both
6
+ // web and desktop profiles.
7
+
8
+ var SETTINGS_PREFIX = "/dsh-todo-float-ball";
9
+
10
+ export var name = "dsh-todo-float-ball";
11
+ export var inject = ["webServer"];
12
+
13
+ function isLoopback(req) {
14
+ var a = (req.socket && req.socket.remoteAddress) || "";
15
+ var n = a.toLowerCase();
16
+ if (n === "::1") return true;
17
+ if (n.startsWith("::ffff:")) return n.slice(7).startsWith("127.");
18
+ return n.startsWith("127.");
19
+ }
20
+
21
+ export function apply(ctx) {
22
+ ctx.logger.info("dsh-todo-float-ball: host half mounted (health api + client)");
23
+ ctx.effect(function () {
24
+ var h1 = ctx.webServer.register({ kind: "exact", path: SETTINGS_PREFIX + "/health", handler: function (req, res) {
25
+ if (!isLoopback(req)) { res.writeHead(403); res.end(); return; }
26
+ res.writeHead(200, { "content-type": "application/json; charset=utf-8" });
27
+ res.end(JSON.stringify({ ok: true, plugin: "dsh-todo-float-ball", version: "0.1.0" }));
28
+ }});
29
+ var h2 = ctx.webServer.register({ kind: "exact", path: SETTINGS_PREFIX + "/client-alive", handler: function (req, res) {
30
+ ctx.logger.info("dsh-todo-float-ball: CLIENT-ALIVE ping received from browser");
31
+ res.writeHead(200, { "content-type": "application/json; charset=utf-8" });
32
+ res.end(JSON.stringify({ ok: true }));
33
+ }});
34
+ return function () { h1(); h2(); };
35
+ }, "dsh-todo-float-ball: health routes");
36
+ }
package/package.json ADDED
@@ -0,0 +1,55 @@
1
+ {
2
+ "name": "dsh-todo-float-ball",
3
+ "version": "0.8.0",
4
+ "description": "DSH todo 悬浮球:常驻可拖动悬浮球实时显示当前会话 todo_write 任务清单进度(总数/完成数/进行中),Shadow DOM 样式隔离,点击折叠/展开完整清单,状态颜色(待办灰/进行中橙脉动/完成绿)。数据双路同步:MutationObserver 抓官方 todo 面板为主 + 拦截会话投影帧为辅。双端可用(Desktop 桌面端 + Web 网页端)。",
5
+ "type": "module",
6
+ "main": "lib/index.js",
7
+ "sideEffects": false,
8
+ "engines": {
9
+ "node": ">=18"
10
+ },
11
+ "exports": {
12
+ ".": "./lib/index.js",
13
+ "./client": "./lib/client.js",
14
+ "./package.json": "./package.json"
15
+ },
16
+ "files": [
17
+ "lib/**/*.js",
18
+ "cordis.patch.yml",
19
+ "README.md",
20
+ "README.zh.md",
21
+ "CHANGELOG.md",
22
+ "docs/*.md",
23
+ "LICENSE"
24
+ ],
25
+ "license": "MIT",
26
+ "repository": {
27
+ "type": "git",
28
+ "url": "git+https://github.com/loyalchiiina/dsh-todo-float-ball.git"
29
+ },
30
+ "homepage": "https://github.com/loyalchiiina/dsh-todo-float-ball#readme",
31
+ "bugs": {
32
+ "url": "https://github.com/loyalchiiina/dsh-todo-float-ball/issues"
33
+ },
34
+ "keywords": [
35
+ "dsh-plugin",
36
+ "deepseek-harness",
37
+ "todo",
38
+ "悬浮球",
39
+ "float-ball",
40
+ "task-list",
41
+ "progress",
42
+ "ui"
43
+ ],
44
+ "dsh": {
45
+ "bundle": {
46
+ "patch": "./cordis.patch.yml"
47
+ },
48
+ "client": {
49
+ "inject": [
50
+ "@deepseek-ai/dsh-client-runtime"
51
+ ],
52
+ "platform": "web"
53
+ }
54
+ }
55
+ }