@pi-unipi/kanboard 3.0.0-alpha.16 → 3.0.0-alpha.17
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 +4 -0
- package/package.json +7 -7
- package/skills/kanboard/SKILL.md +19 -10
- package/src/commands.ts +1 -1
- package/src/guard.ts +3 -3
- package/src/settings.ts +0 -19
package/index.ts
CHANGED
|
@@ -416,6 +416,10 @@ export default function (pi: ExtensionAPI) {
|
|
|
416
416
|
// cannot release), and release requires a comment — the next run's resume
|
|
417
417
|
// notice keys on it. Best effort: a dead pid is reaped with "session
|
|
418
418
|
// lost" anyway.
|
|
419
|
+
// Children (subagents, fusion sidekicks, kanboard's own helpers) inherit
|
|
420
|
+
// the lead's session id: their shutdown must never release the lead's
|
|
421
|
+
// claims (a finished subagent used to bounce the lead's task to Todo).
|
|
422
|
+
if (isChildProcess() || process.env.UNIPI_KANBOARD_CHILD) return;
|
|
419
423
|
try {
|
|
420
424
|
const session = sessionId();
|
|
421
425
|
const claims = await ownClaims();
|
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.17",
|
|
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.17"
|
|
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.17",
|
|
52
|
+
"@pi-unipi/kanboard-linux-arm64": "3.0.0-alpha.17",
|
|
53
|
+
"@pi-unipi/kanboard-darwin-x64": "3.0.0-alpha.17",
|
|
54
|
+
"@pi-unipi/kanboard-darwin-arm64": "3.0.0-alpha.17",
|
|
55
|
+
"@pi-unipi/kanboard-win32-x64": "3.0.0-alpha.17"
|
|
56
56
|
}
|
|
57
57
|
}
|
package/skills/kanboard/SKILL.md
CHANGED
|
@@ -22,13 +22,13 @@ be on `PATH`):
|
|
|
22
22
|
<binary> --actor agent --project <slug> chain <ID> # upstream deps + downstream dependents
|
|
23
23
|
<binary> --actor agent --project <slug> search "<text>" [--all] # id/title/body, archived excluded unless --all
|
|
24
24
|
<binary> --actor agent --project <slug> add "<title>" [--status todo] [--after <ID>] [--body-file <f>] [--attach <file>]…
|
|
25
|
-
<binary> --actor agent --project <slug> note <ID> "<text>"
|
|
25
|
+
<binary> --actor agent --project <slug> note <ID> "<text>" [--attach <file>]…
|
|
26
26
|
<binary> --actor agent --project <slug> attach <ID> <file> --note "<what it shows>"
|
|
27
27
|
<binary> --actor agent --project <slug> attachments <ID>
|
|
28
28
|
<binary> --actor agent --project <slug> edit <ID> --title|--body|--labels … # only tasks you created, while in backlog/todo
|
|
29
29
|
<binary> --actor agent --project <slug> start <ID> # todo → in progress, claimed for your session (costs a -do slot)
|
|
30
|
-
<binary> --actor agent --project <slug> finish <ID> --comment "<summary>" # in progress → in review, only a task you started (free)
|
|
31
|
-
<binary> --actor agent --project <slug> move <ID> blocked --comment "<what you need>"
|
|
30
|
+
<binary> --actor agent --project <slug> finish <ID> --comment "<summary>" [--attach <file>]… # in progress → in review, only a task you started (free)
|
|
31
|
+
<binary> --actor agent --project <slug> move <ID> blocked --comment "<what you need>" [--attach <file>]…
|
|
32
32
|
<binary> --actor agent --project <slug> link <ID> --after <DEP>
|
|
33
33
|
<binary> --actor agent --project <slug> unlink <ID> --after <DEP>
|
|
34
34
|
<binary> --actor agent --project <slug> order <ID> --top|--bottom|--before <ID>
|
|
@@ -94,9 +94,8 @@ lists them — read the files there directly if you need one.
|
|
|
94
94
|
cannot continue — `move <ID> blocked --comment "<what you need>"`.
|
|
95
95
|
5. **Work only on the task you were given.** Follow-up work goes to the board as
|
|
96
96
|
a new task in Backlog (`add "<title>"`), optionally `link <new> --after <ID>`.
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
why. You may
|
|
97
|
+
At most `maxSessions` (default 2) sessions may hold tasks in a project at
|
|
98
|
+
once — if the board refuses a `start`, that is why. You may
|
|
100
99
|
block only the task your own session is running (`move <ID> blocked` checks
|
|
101
100
|
`--session`/`UNIPI_KANBOARD_SESSION` against the claim).
|
|
102
101
|
6. **Sidekicks and subagents can read the board but never write it** — every
|
|
@@ -106,7 +105,14 @@ lists them — read the files there directly if you need one.
|
|
|
106
105
|
ready task in the same session — there is no separate worker.)
|
|
107
106
|
7. Use `note <ID> "<text>"` for progress worth remembering (decisions, what you
|
|
108
107
|
verified, what you left undone) — it is the activity log the next reader sees.
|
|
109
|
-
8.
|
|
108
|
+
8. **Write the `finish` / `blocked` comment as the report the user reads.** It
|
|
109
|
+
is shown as the task's status banner and opens in a reader, rendered as
|
|
110
|
+
markdown. Lead with one plain sentence (what you did, or what stops you),
|
|
111
|
+
then short paragraphs or `-` bullets separated by blank lines; put questions
|
|
112
|
+
for the user as a numbered list under `**Need from you:**`. Name files and
|
|
113
|
+
commands in backticks. Do not repeat a note you already wrote — the report
|
|
114
|
+
replaces it. Attach evidence with `--attach <file>`.
|
|
115
|
+
9. Dependencies form a DAG: a task is ready only when every dep reached the chain
|
|
110
116
|
gate (`in_review` by default, `done` when configured). Cancelled deps block
|
|
111
117
|
forever, so unlink or re-plan instead of waiting. `chain <ID>` shows the
|
|
112
118
|
whole line, `next` shows what would be picked and why others wait.
|
|
@@ -126,6 +132,9 @@ but only to write a summary.)
|
|
|
126
132
|
Users attach screenshots, logs and documents in the board UI; they appear in the
|
|
127
133
|
text as markdown with `att:<ID>/<name>` references, and `show <ID> --json` lists
|
|
128
134
|
them under `attachments` with an absolute `path` — read the file from there
|
|
129
|
-
(use your image-reading tool for images). To hand back evidence
|
|
130
|
-
|
|
131
|
-
|
|
135
|
+
(use your image-reading tool for images). To hand back evidence (a screenshot,
|
|
136
|
+
a log, a report), pass `--attach <file>` (repeatable) to `finish`, `move … blocked`
|
|
137
|
+
or `note`, or use `attach <ID> <file> --note "…"`: the file is stored beside the
|
|
138
|
+
board and the comment embeds it, so the user sees the image or file inline. A
|
|
139
|
+
file's path written in the comment is replaced by the embed; otherwise the
|
|
140
|
+
embed is appended. Attaching to a task you started is free.
|
package/src/commands.ts
CHANGED
|
@@ -44,7 +44,7 @@ Priority -p: 1 none · 2 low · 3 medium · 4 high · 5 urgent`;
|
|
|
44
44
|
export function doText(slug: string, cli: string, request: string, slots = DEFAULT_DO_TASKS, writes = DEFAULT_DO_WRITES): string {
|
|
45
45
|
const s = slots === 1 ? "" : "s";
|
|
46
46
|
const ws = writes === 1 ? "" : "s";
|
|
47
|
-
return `[kanboard] For this request you may use the kanboard skill on project ${slug} (CLI: \`${cli} --actor agent --project ${slug} …\`). Budget this session: ${String(slots)} task slot${s} — each \`start\` uses one — and ${String(writes)} board write${ws} (add, edit, link, order, move backlog↔todo, note on tasks you don't hold); /unipi:kanboard-do tops both back up. Always free: reads, and \`finish\`, \`move <ID> blocked --comment\` and \`
|
|
47
|
+
return `[kanboard] For this request you may use the kanboard skill on project ${slug} (CLI: \`${cli} --actor agent --project ${slug} …\`). Budget this session: ${String(slots)} task slot${s} — each \`start\` uses one — and ${String(writes)} board write${ws} (add, edit, link, order, move backlog↔todo, note on tasks you don't hold); /unipi:kanboard-do tops both back up. Always free: reads, and \`finish\`, \`move <ID> blocked --comment\`, \`note\` and \`attach\` on tasks you started. Work the tasks yourself in this session, in whatever mode fits: \`start <ID>\` right before you work it, then \`finish <ID> --comment "<summary>"\` or \`move <ID> blocked --comment "<what you need>"\` — never leave a task you started In Progress. Before starting anything, count the tasks this request needs; if that is more than ${String(slots)}, start nothing — tell me you can do ${String(slots)} now and ask whether to raise the limit (setting kanboard.doTasks) or work in batches. Read a task with \`show <ID>\` before editing or starting it — \`list\` only shows titles and a one-line excerpt. Sidekicks and subagents can read the board but not write it: brief them with the task, then update the board yourself from their report. If the request is unclear, ask me instead of guessing.
|
|
48
48
|
|
|
49
49
|
Request: ${request}`;
|
|
50
50
|
}
|
package/src/guard.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* writes. A `/unipi:kanboard-do` grants task SLOTS (each `start` uses one)
|
|
6
6
|
* and a WRITE budget (add, edit, link, order, move backlog↔todo, note on
|
|
7
7
|
* tasks you don't hold). Always free: reads, and `finish`, `move <ID>
|
|
8
|
-
* blocked` and `
|
|
8
|
+
* blocked`, `note <ID>` and `attach <ID>` on claims this session started — a started task
|
|
9
9
|
* can always be closed. Autowork lifts both budgets (the runaway guard is
|
|
10
10
|
* the per-turn add cap). In child processes every write is refused: the
|
|
11
11
|
* lead updates the board.
|
|
@@ -282,9 +282,9 @@ export function createWriteGuard(options: WriteGuardOptions = {}): WriteGuard {
|
|
|
282
282
|
const id = firstPositional(invocation)!;
|
|
283
283
|
if (await ownsClaim(id)) continue; // closing your own claim is free
|
|
284
284
|
}
|
|
285
|
-
if (invocation.sub === "note" && firstPositional(invocation) !== undefined) {
|
|
285
|
+
if ((invocation.sub === "note" || invocation.sub === "attach") && firstPositional(invocation) !== undefined) {
|
|
286
286
|
const id = firstPositional(invocation)!;
|
|
287
|
-
if (await ownsClaim(id)) continue; // noting your own claim is free
|
|
287
|
+
if (await ownsClaim(id)) continue; // noting on / attaching to your own claim is free
|
|
288
288
|
}
|
|
289
289
|
if (autowork) continue; // autowork: unlimited slots and writes
|
|
290
290
|
if (invocation.sub === "start") {
|
package/src/settings.ts
CHANGED
|
@@ -34,12 +34,6 @@ export interface KanboardSettings {
|
|
|
34
34
|
doTasks: number;
|
|
35
35
|
/** Board writes a /unipi:kanboard-do grants. */
|
|
36
36
|
doWrites: number;
|
|
37
|
-
/** Strategy for unlabelled tasks ("auto" = jev decides, gated by `jevThreshold`). */
|
|
38
|
-
defaultStrategy: "auto" | "none" | "goal" | "ralph" | "swarm" | "graph";
|
|
39
|
-
/** Confidence floor for jev's strategy answer; below it (or missing) the task runs "none". */
|
|
40
|
-
jevThreshold: number;
|
|
41
|
-
/** Plan-first for unlabelled tasks (jev is never asked about plan). */
|
|
42
|
-
defaultPlan: boolean;
|
|
43
37
|
/** Whether a blocked-by-confusion task may ask the user (ask) or must
|
|
44
38
|
* assume-and-note (avoid, the default). */
|
|
45
39
|
blocking: "avoid" | "ask";
|
|
@@ -62,9 +56,6 @@ export const DEFAULT_SETTINGS: KanboardSettings = {
|
|
|
62
56
|
turnAddLimit: 20,
|
|
63
57
|
doTasks: 5,
|
|
64
58
|
doWrites: 10,
|
|
65
|
-
defaultStrategy: "none",
|
|
66
|
-
jevThreshold: 0.8,
|
|
67
|
-
defaultPlan: false,
|
|
68
59
|
blocking: "avoid",
|
|
69
60
|
reminders: true,
|
|
70
61
|
};
|
|
@@ -162,16 +153,6 @@ export function readKanboardSettings(cwd: string = process.cwd()): KanboardSetti
|
|
|
162
153
|
typeof raw.doWrites === "number" && raw.doWrites >= 0 && storedDoWritesSet(cwd)
|
|
163
154
|
? raw.doWrites
|
|
164
155
|
: (storedLegacyDoCredits(cwd) ?? DEFAULT_SETTINGS.doWrites),
|
|
165
|
-
defaultStrategy:
|
|
166
|
-
typeof raw.defaultStrategy === "string" &&
|
|
167
|
-
["auto", "none", "goal", "ralph", "swarm", "graph"].includes(raw.defaultStrategy)
|
|
168
|
-
? (raw.defaultStrategy as KanboardSettings["defaultStrategy"])
|
|
169
|
-
: DEFAULT_SETTINGS.defaultStrategy,
|
|
170
|
-
jevThreshold:
|
|
171
|
-
typeof raw.jevThreshold === "number" && raw.jevThreshold > 0 && raw.jevThreshold <= 1
|
|
172
|
-
? raw.jevThreshold
|
|
173
|
-
: DEFAULT_SETTINGS.jevThreshold,
|
|
174
|
-
defaultPlan: raw.defaultPlan === true,
|
|
175
156
|
blocking: raw.blocking === "ask" ? "ask" : "avoid",
|
|
176
157
|
reminders: raw.reminders !== false,
|
|
177
158
|
};
|