@pi-unipi/kanboard 3.0.0-alpha.19 → 3.0.0-alpha.20
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/package.json +7 -7
- package/skills/kanboard/SKILL.md +1 -1
- package/src/commands.ts +21 -6
- package/src/monitor.ts +3 -1
- package/src/reminders.ts +11 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pi-unipi/kanboard",
|
|
3
|
-
"version": "3.0.0-alpha.
|
|
3
|
+
"version": "3.0.0-alpha.20",
|
|
4
4
|
"description": "Kanboard v3 — deferred-work board: CLI/daemon bridge, task runner and skill",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.ts",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"access": "public"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@pi-unipi/core": "3.0.0-alpha.
|
|
34
|
+
"@pi-unipi/core": "3.0.0-alpha.20"
|
|
35
35
|
},
|
|
36
36
|
"peerDependencies": {
|
|
37
37
|
"@earendil-works/pi-coding-agent": "^0.87.1",
|
|
@@ -48,10 +48,10 @@
|
|
|
48
48
|
"themes": []
|
|
49
49
|
},
|
|
50
50
|
"optionalDependencies": {
|
|
51
|
-
"@pi-unipi/kanboard-linux-x64": "3.0.0-alpha.
|
|
52
|
-
"@pi-unipi/kanboard-linux-arm64": "3.0.0-alpha.
|
|
53
|
-
"@pi-unipi/kanboard-darwin-x64": "3.0.0-alpha.
|
|
54
|
-
"@pi-unipi/kanboard-darwin-arm64": "3.0.0-alpha.
|
|
55
|
-
"@pi-unipi/kanboard-win32-x64": "3.0.0-alpha.
|
|
51
|
+
"@pi-unipi/kanboard-linux-x64": "3.0.0-alpha.20",
|
|
52
|
+
"@pi-unipi/kanboard-linux-arm64": "3.0.0-alpha.20",
|
|
53
|
+
"@pi-unipi/kanboard-darwin-x64": "3.0.0-alpha.20",
|
|
54
|
+
"@pi-unipi/kanboard-darwin-arm64": "3.0.0-alpha.20",
|
|
55
|
+
"@pi-unipi/kanboard-win32-x64": "3.0.0-alpha.20"
|
|
56
56
|
}
|
|
57
57
|
}
|
package/skills/kanboard/SKILL.md
CHANGED
|
@@ -16,7 +16,7 @@ Always pass the actor and the project, and call it by absolute path (it may not
|
|
|
16
16
|
be on `PATH`):
|
|
17
17
|
|
|
18
18
|
```sh
|
|
19
|
-
<binary> --actor agent --project <slug> list [--ready] [--json]
|
|
19
|
+
<binary> --actor agent --project <slug> list [--ready] [--all] [--json] # bare list = todo/in_progress/blocked/in_review/done only; --all adds backlog/cancelled/archived
|
|
20
20
|
<binary> --actor agent --project <slug> show <ID>
|
|
21
21
|
<binary> --actor agent --project <slug> next # what would be picked next + why (read-only)
|
|
22
22
|
<binary> --actor agent --project <slug> chain <ID> # upstream deps + downstream dependents
|
package/src/commands.ts
CHANGED
|
@@ -12,7 +12,7 @@ import { promisify } from "node:util";
|
|
|
12
12
|
|
|
13
13
|
import type { ExtensionAPI, ExtensionCommandContext, ExtensionContext, Theme } from "@earendil-works/pi-coding-agent";
|
|
14
14
|
import { truncateToWidth, visibleWidth } from "@earendil-works/pi-tui";
|
|
15
|
-
import { getSettings } from "@pi-unipi/core";
|
|
15
|
+
import { getSettings, sendHarnessUserMessage } from "@pi-unipi/core";
|
|
16
16
|
|
|
17
17
|
import { KanboardCliError, type KanboardCli } from "./bin.js";
|
|
18
18
|
import { DEFAULT_DO_TASKS, DEFAULT_DO_WRITES } from "./guard.js";
|
|
@@ -671,7 +671,10 @@ export async function runStatus(deps: CommandDeps, ctx: ExtensionCommandContext
|
|
|
671
671
|
const slug = currentSlug();
|
|
672
672
|
if (slug) {
|
|
673
673
|
try {
|
|
674
|
-
|
|
674
|
+
// --all: the status view counts every lane; the CLI's bare `list`
|
|
675
|
+
// default (todo/in_progress/blocked/in_review/done) would hide backlog
|
|
676
|
+
// and cancelled here (UNI-62).
|
|
677
|
+
const { tasks, problems } = asTaskList(await client!.run<unknown>(["list", "--all"], {}));
|
|
675
678
|
const counts = tasks.reduce<Record<string, number>>((acc, task) => {
|
|
676
679
|
acc[task.status] = (acc[task.status] ?? 0) + 1;
|
|
677
680
|
return acc;
|
|
@@ -1050,7 +1053,8 @@ async function runShow(deps: CommandDeps, ctx: ExtensionCommandContext, pi: Exte
|
|
|
1050
1053
|
const slug = currentSlug()!;
|
|
1051
1054
|
let tasks: ShowTask[] = [];
|
|
1052
1055
|
try {
|
|
1053
|
-
|
|
1056
|
+
// --all: this display lists every lane; the CLI bare default hides backlog/cancelled (UNI-62).
|
|
1057
|
+
const payload = (await client.run(["list", "--all", "--json"], { cwd: ctx.cwd })) as { tasks?: ShowTask[] };
|
|
1054
1058
|
tasks = payload.tasks ?? [];
|
|
1055
1059
|
} catch (error) {
|
|
1056
1060
|
ctx.ui.notify(`kanboard: show failed — ${error instanceof KanboardCliError ? error.message : String(error)}`, "error");
|
|
@@ -1158,7 +1162,7 @@ export async function taskCompletions(
|
|
|
1158
1162
|
let cache = taskCache.get(client);
|
|
1159
1163
|
if (!cache || Date.now() - cache.at > 5_000) {
|
|
1160
1164
|
try {
|
|
1161
|
-
const payload = (await client.run(["list", "--json"], { cwd: process.cwd() })) as { tasks?: ShowTask[] };
|
|
1165
|
+
const payload = (await client.run(["list", "--all", "--json"], { cwd: process.cwd() })) as { tasks?: ShowTask[] };
|
|
1162
1166
|
cache = { at: Date.now(), tasks: payload.tasks ?? [] };
|
|
1163
1167
|
taskCache.set(client, cache);
|
|
1164
1168
|
} catch {
|
|
@@ -1423,8 +1427,14 @@ export function registerKanboardCommands(pi: ExtensionAPI, deps: CommandDeps): v
|
|
|
1423
1427
|
? !(ctx as unknown as { isIdle: () => boolean }).isIdle!()
|
|
1424
1428
|
: false;
|
|
1425
1429
|
const budget = deps.guard.remaining();
|
|
1426
|
-
|
|
1430
|
+
sendHarnessUserMessage(
|
|
1431
|
+
pi,
|
|
1427
1432
|
doText(slug, client.binary.path, request, budget.slots, budget.writes),
|
|
1433
|
+
{
|
|
1434
|
+
source: "Kanboard",
|
|
1435
|
+
title: "Task budget",
|
|
1436
|
+
synopsis: `slots ${String(budget.slots)} · writes ${String(budget.writes)} · user request included`,
|
|
1437
|
+
},
|
|
1428
1438
|
busy ? { deliverAs: "followUp" } : undefined,
|
|
1429
1439
|
);
|
|
1430
1440
|
deps.guard.noteSent();
|
|
@@ -1459,7 +1469,12 @@ export function registerKanboardCommands(pi: ExtensionAPI, deps: CommandDeps): v
|
|
|
1459
1469
|
const busy = typeof (ctx as unknown as { isIdle?: () => boolean }).isIdle === "function"
|
|
1460
1470
|
? !(ctx as unknown as { isIdle: () => boolean }).isIdle!()
|
|
1461
1471
|
: false;
|
|
1462
|
-
|
|
1472
|
+
sendHarnessUserMessage(
|
|
1473
|
+
pi,
|
|
1474
|
+
autoworkText(slug, client.binary.path),
|
|
1475
|
+
{ source: "Kanboard", title: "Autowork", synopsis: "no budget limits · user request included" },
|
|
1476
|
+
busy ? { deliverAs: "followUp" } : undefined,
|
|
1477
|
+
);
|
|
1463
1478
|
return;
|
|
1464
1479
|
}
|
|
1465
1480
|
if (sub === "stop") {
|
package/src/monitor.ts
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
12
|
import type { Nudge, SettleInfo } from "@pi-unipi/core";
|
|
13
|
-
import { kanboardGlanceLabel } from "@pi-unipi/core";
|
|
13
|
+
import { harnessMetadata, kanboardGlanceLabel } from "@pi-unipi/core";
|
|
14
14
|
|
|
15
15
|
import { ANTI_POISONING_SUFFIX, taskIdsIn } from "./reminders.js";
|
|
16
16
|
import type { KanboardTask } from "./shapes.js";
|
|
@@ -247,6 +247,7 @@ export function createKanboardMonitor(deps: MonitorDeps): KanboardMonitor {
|
|
|
247
247
|
source: "kanboard",
|
|
248
248
|
priority: CLAIMS_PRIORITY,
|
|
249
249
|
customType: CLAIMS_NUDGE_CUSTOM_TYPE,
|
|
250
|
+
details: { unipiHarness: harnessMetadata({ source: "Kanboard", title: "Unfinished task", synopsis: String(target.id), severity: "warning" }, "boundary") },
|
|
250
251
|
content,
|
|
251
252
|
display: true,
|
|
252
253
|
onDelivered: () => {
|
|
@@ -294,6 +295,7 @@ export function createKanboardMonitor(deps: MonitorDeps): KanboardMonitor {
|
|
|
294
295
|
source: "kanboard",
|
|
295
296
|
priority: AUTOWORK_PRIORITY,
|
|
296
297
|
customType: AUTOWORK_NUDGE_CUSTOM_TYPE,
|
|
298
|
+
details: { unipiHarness: harnessMetadata({ source: "Kanboard", title: "Next task", synopsis: String(next.id) }, "boundary") },
|
|
297
299
|
content: `↻ next ready: ${next.id} ${next.displayTitle || next.title || "(untitled)"} — show it, start it, work it (autowork) ${ANTI_POISONING_SUFFIX}`,
|
|
298
300
|
display: true,
|
|
299
301
|
onDelivered: () => {
|
package/src/reminders.ts
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
19
|
import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
|
|
20
|
-
import { isChildProcess } from "@pi-unipi/core";
|
|
20
|
+
import { isChildProcess, harnessToolResultDetails } from "@pi-unipi/core";
|
|
21
21
|
|
|
22
22
|
import { kanboardInvocations, shellSegments } from "./guard.js";
|
|
23
23
|
import type { KanboardTask } from "./shapes.js";
|
|
@@ -196,7 +196,16 @@ export function createProgressTracker(deps: TrackerDeps): ProgressTracker {
|
|
|
196
196
|
r1Count.set(id, (r1Count.get(id) ?? 0) + 1);
|
|
197
197
|
}
|
|
198
198
|
debug(`R1 for ${todo.join(", ")}`);
|
|
199
|
-
|
|
199
|
+
const annotation = `\n\n${r1Text(todo, deps.cliPrefix())}`;
|
|
200
|
+
return {
|
|
201
|
+
content: [...(event.content ?? []), { type: "text", text: annotation }],
|
|
202
|
+
details: harnessToolResultDetails(
|
|
203
|
+
(event as { details?: unknown }).details,
|
|
204
|
+
{ source: "Kanboard", title: "R1 progress reminder", synopsis: `${todo.join(", ")} still Todo`, severity: "warning" },
|
|
205
|
+
"boundary",
|
|
206
|
+
annotation,
|
|
207
|
+
),
|
|
208
|
+
};
|
|
200
209
|
},
|
|
201
210
|
|
|
202
211
|
state() {
|