@pi-unipi/kanboard 2.0.7 → 2.0.8
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/index.ts +79 -0
- package/package.json +4 -3
package/index.ts
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @pi-unipi/kanboard — Extension entry
|
|
3
|
+
*
|
|
4
|
+
* Visualization layer for unipi workflow data.
|
|
5
|
+
* HTTP server with htmx + Alpine.js UI, modular parsers, TUI overlay, and kanban board.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
|
|
9
|
+
import { MODULES, KANBOARD_COMMANDS } from "@pi-unipi/core";
|
|
10
|
+
import { registerCommands } from "./commands.js";
|
|
11
|
+
|
|
12
|
+
/** Package version */
|
|
13
|
+
const VERSION = "0.1.0";
|
|
14
|
+
|
|
15
|
+
export default function (pi: ExtensionAPI): void {
|
|
16
|
+
// Register skills directory
|
|
17
|
+
const skillsDir = new URL("./skills", import.meta.url).pathname;
|
|
18
|
+
|
|
19
|
+
pi.on("resources_discover", async () => {
|
|
20
|
+
return {
|
|
21
|
+
skillPaths: [skillsDir],
|
|
22
|
+
};
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
// Register commands
|
|
26
|
+
registerCommands(pi);
|
|
27
|
+
|
|
28
|
+
// Note: Badge generation on first message is handled by the utility module.
|
|
29
|
+
// Kanboard no longer manages badge generation to avoid duplication.
|
|
30
|
+
|
|
31
|
+
// Register info-screen group
|
|
32
|
+
const registry = globalThis.__unipi_info_registry;
|
|
33
|
+
if (registry) {
|
|
34
|
+
registry.registerGroup({
|
|
35
|
+
id: "kanboard",
|
|
36
|
+
name: "Kanboard",
|
|
37
|
+
icon: "📋",
|
|
38
|
+
priority: 50,
|
|
39
|
+
config: {
|
|
40
|
+
showByDefault: true,
|
|
41
|
+
stats: [
|
|
42
|
+
{ id: "status", label: "Server Status", show: true },
|
|
43
|
+
{ id: "url", label: "URL", show: true },
|
|
44
|
+
{ id: "docs", label: "Documents", show: true },
|
|
45
|
+
{ id: "tasks", label: "Tasks", show: true },
|
|
46
|
+
],
|
|
47
|
+
},
|
|
48
|
+
dataProvider: async () => {
|
|
49
|
+
const { createDefaultRegistry } = await import("./parser/index.js");
|
|
50
|
+
const registry = await createDefaultRegistry();
|
|
51
|
+
const docs = registry.parseAll(".unipi/docs");
|
|
52
|
+
const totalItems = docs.reduce((sum, d) => sum + d.items.length, 0);
|
|
53
|
+
const doneItems = docs.reduce(
|
|
54
|
+
(sum, d) => sum + d.items.filter((i) => i.status === "done").length,
|
|
55
|
+
0,
|
|
56
|
+
);
|
|
57
|
+
|
|
58
|
+
return {
|
|
59
|
+
status: {
|
|
60
|
+
value: "Ready",
|
|
61
|
+
detail: "Server not running (use /unipi:kanboard to start)",
|
|
62
|
+
},
|
|
63
|
+
url: {
|
|
64
|
+
value: "—",
|
|
65
|
+
detail: "Start server to get URL",
|
|
66
|
+
},
|
|
67
|
+
docs: {
|
|
68
|
+
value: String(docs.length),
|
|
69
|
+
detail: `${docs.length} documents parsed`,
|
|
70
|
+
},
|
|
71
|
+
tasks: {
|
|
72
|
+
value: `${doneItems}/${totalItems}`,
|
|
73
|
+
detail: `${totalItems > 0 ? Math.round((doneItems / totalItems) * 100) : 0}% complete`,
|
|
74
|
+
},
|
|
75
|
+
};
|
|
76
|
+
},
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
}
|
package/package.json
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pi-unipi/kanboard",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.8",
|
|
4
4
|
"description": "Visualization layer for unipi workflow — HTTP server with htmx/Alpine.js UI, modular parsers, TUI overlay, and kanban board",
|
|
5
5
|
"type": "module",
|
|
6
|
+
"main": "index.ts",
|
|
6
7
|
"license": "MIT",
|
|
7
8
|
"author": "Neuron Mr White",
|
|
8
9
|
"repository": {
|
|
@@ -44,8 +45,8 @@
|
|
|
44
45
|
"@pi-unipi/core": "*"
|
|
45
46
|
},
|
|
46
47
|
"peerDependencies": {
|
|
47
|
-
"@
|
|
48
|
-
"@
|
|
48
|
+
"@earendil-works/pi-coding-agent": "^0.75.5",
|
|
49
|
+
"@earendil-works/pi-tui": "^0.75.5"
|
|
49
50
|
},
|
|
50
51
|
"devDependencies": {
|
|
51
52
|
"@types/node": "^25.6.0",
|