@netnodeag/kraftwerk 0.81.0 → 0.83.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 +227 -0
- package/dist/cli/boards.d.ts +2 -0
- package/dist/cli/boards.js +486 -0
- package/dist/cli/init.js +2 -0
- package/dist/cli/kraftwerk.js +6 -0
- package/dist/cli/presentations.d.ts +2 -0
- package/dist/cli/presentations.js +261 -0
- package/dist/client/routes.d.ts +32 -0
- package/dist/client/routes.js +32 -0
- package/dist/config.d.ts +35 -0
- package/dist/config.js +33 -2
- package/dist/core/attention.d.ts +2 -2
- package/dist/core/attention.js +22 -2
- package/dist/core/board-wake.d.ts +21 -0
- package/dist/core/board-wake.js +221 -0
- package/dist/core/boards.d.ts +269 -0
- package/dist/core/boards.js +969 -0
- package/dist/core/chat/acp.d.ts +1 -1
- package/dist/core/chat/acp.js +2 -1
- package/dist/core/chat/backend.d.ts +11 -0
- package/dist/core/chat/backend.js +9 -1
- package/dist/core/chat/context.js +25 -4
- package/dist/core/chat/pi.d.ts +1 -1
- package/dist/core/chat/pi.js +2 -1
- package/dist/core/chat/seats.js +3 -2
- package/dist/core/chat/sessions.d.ts +2 -0
- package/dist/core/chat/sessions.js +1 -0
- package/dist/core/chat/state.js +1 -1
- package/dist/core/chat/types.d.ts +11 -1
- package/dist/core/files.d.ts +1 -1
- package/dist/core/files.js +19 -1
- package/dist/core/git.js +5 -1
- package/dist/core/notifications.d.ts +1 -1
- package/dist/core/presentations/browser.d.ts +43 -0
- package/dist/core/presentations/browser.js +53 -0
- package/dist/core/presentations/builtin.d.ts +3 -0
- package/dist/core/presentations/builtin.js +142 -0
- package/dist/core/presentations/chart.d.ts +34 -0
- package/dist/core/presentations/chart.js +159 -0
- package/dist/core/presentations/deck.d.ts +63 -0
- package/dist/core/presentations/deck.js +198 -0
- package/dist/core/presentations/export.d.ts +21 -0
- package/dist/core/presentations/export.js +75 -0
- package/dist/core/presentations/html.d.ts +135 -0
- package/dist/core/presentations/html.js +389 -0
- package/dist/core/presentations/index.d.ts +252 -0
- package/dist/core/presentations/index.js +753 -0
- package/dist/core/presentations/layout.d.ts +47 -0
- package/dist/core/presentations/layout.js +147 -0
- package/dist/core/presentations/markdown.d.ts +49 -0
- package/dist/core/presentations/markdown.js +158 -0
- package/dist/core/presentations/merge.d.ts +26 -0
- package/dist/core/presentations/merge.js +28 -0
- package/dist/core/presentations/presence.d.ts +31 -0
- package/dist/core/presentations/presence.js +131 -0
- package/dist/core/presentations/render.d.ts +33 -0
- package/dist/core/presentations/render.js +318 -0
- package/dist/core/presentations/slots.d.ts +33 -0
- package/dist/core/presentations/slots.js +114 -0
- package/dist/core/presentations/template.d.ts +253 -0
- package/dist/core/presentations/template.js +141 -0
- package/dist/core/presentations/versions.d.ts +30 -0
- package/dist/core/presentations/versions.js +75 -0
- package/dist/core/refs.d.ts +1 -1
- package/dist/core/refs.js +33 -1
- package/dist/core/search.d.ts +22 -0
- package/dist/core/search.js +25 -0
- package/dist/core/settings.d.ts +4 -0
- package/dist/core/settings.js +24 -1
- package/dist/core/trash.d.ts +1 -1
- package/dist/server/api/boards.d.ts +105 -0
- package/dist/server/api/boards.js +160 -0
- package/dist/server/api/chats.d.ts +2 -0
- package/dist/server/api/chats.js +9 -3
- package/dist/server/api/index.d.ts +167 -3
- package/dist/server/api/index.js +4 -0
- package/dist/server/api/presentations.d.ts +66 -0
- package/dist/server/api/presentations.js +185 -0
- package/dist/server/api/socket.js +24 -1
- package/dist/server/api/workspace.d.ts +10 -0
- package/dist/server/api/workspace.js +4 -0
- package/dist/server/push.js +1 -1
- package/dist/server/server.js +3 -0
- package/package.json +6 -2
- package/schema/kraftwerk.schema.json +57 -0
- package/web/dist/assets/{dist-Ba6WSVOB.js → dist-5-ibIscm.js} +1 -1
- package/web/dist/assets/{dist-ENZYo2jZ.js → dist-5lgY5B-M.js} +1 -1
- package/web/dist/assets/{dist-BiU4F98O.js → dist-BJaPgnhj.js} +1 -1
- package/web/dist/assets/{dist-Dy1SvhKC.js → dist-Bar1_NBq.js} +1 -1
- package/web/dist/assets/{dist-AhnSw4hy.js → dist-BxCxboU8.js} +1 -1
- package/web/dist/assets/dist-CDitSY16.js +1 -0
- package/web/dist/assets/{dist-FfKYtQxT.js → dist-CRXT8IL6.js} +1 -1
- package/web/dist/assets/{dist-BK0VhAPQ.js → dist-CXRjiHpl.js} +1 -1
- package/web/dist/assets/{dist-Dx3aajX1.js → dist-CpnB7MfK.js} +1 -1
- package/web/dist/assets/{dist-8IOFzZx-.js → dist-D1VK1YdB.js} +1 -1
- package/web/dist/assets/{dist-cewmjxFi.js → dist-D52LvyO8.js} +1 -1
- package/web/dist/assets/{editor-CZMrhTTL.css → editor-C0_Snnzk.css} +1 -1
- package/web/dist/assets/{editor-CaRa1NMC.js → editor-HCNTXWWs.js} +3 -3
- package/web/dist/assets/index-Dnlu16AL.css +2 -0
- package/web/dist/assets/index-kwWnQOhD.js +473 -0
- package/web/dist/index.html +2 -2
- package/web/dist/assets/dist-lgUK2Fjt.js +0 -1
- package/web/dist/assets/index-Dpzux3OC.js +0 -231
- package/web/dist/assets/index-Dvt-vE1h.css +0 -2
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
import chalk from "chalk";
|
|
2
|
+
import Table from "cli-table3";
|
|
3
|
+
import { readFile } from "node:fs/promises";
|
|
4
|
+
import { createDeck, deleteDeck, exportDeck, getDeck, addComment, listComments, updateComment, initTemplate, listAllDecks, listDecks, listTemplates, } from "../core/presentations/index.js";
|
|
5
|
+
import { initContext as prepare } from "./routines.js";
|
|
6
|
+
import { fmtAgo } from "./workspaces.js";
|
|
7
|
+
/**
|
|
8
|
+
* kraftwerk presentations [list] [--project <slug>] [--all] [--json]
|
|
9
|
+
* kraftwerk presentations show <name> [--project <slug>] [--json] the slides, the template's layouts and slots, the warnings
|
|
10
|
+
* kraftwerk presentations create "<title>" [--project <slug>] [--slug <s>] [--template <t>] [--from <deck.md>]
|
|
11
|
+
* kraftwerk presentations check <name> [--project <slug>] warnings; exits 1 on errors
|
|
12
|
+
* kraftwerk presentations render <name> --pptx|--pdf|--png|--html [--out <dir>] [--width <px>] [--project <slug>]
|
|
13
|
+
* kraftwerk presentations comments <name> [--all] | comment <name> <slide> "<text>" [--slot <box>] | resolve <name> <id> [--reply "<text>"]
|
|
14
|
+
* kraftwerk presentations remove <name> [--project <slug>]
|
|
15
|
+
* kraftwerk presentations templates [--json]; templates init <slug> the templates; a copy of the built-in one to edit
|
|
16
|
+
*
|
|
17
|
+
* Agents write deck.md directly (show prints the folder) and look at the
|
|
18
|
+
* PNGs `render --png` writes. The CLI talks to core, not to the server.
|
|
19
|
+
*/
|
|
20
|
+
const die = (msg) => {
|
|
21
|
+
console.error(chalk.red(msg));
|
|
22
|
+
process.exit(1);
|
|
23
|
+
};
|
|
24
|
+
const refOf = (name, project) => ({ ...(project?.trim() ? { project: project.trim() } : {}), name: name.trim() });
|
|
25
|
+
const printWarnings = (warnings) => {
|
|
26
|
+
for (const w of warnings) {
|
|
27
|
+
const where = `${w.slide ? `slide ${w.slide}` : "deck"}${w.slot ? ` · ${w.slot}` : ""}`;
|
|
28
|
+
console.log(`${w.level === "error" ? chalk.red("error") : chalk.yellow("warn ")} ${chalk.dim(where)} ${w.message}`);
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
function printDeck(d) {
|
|
32
|
+
console.log(`${chalk.bold(d.title)} ${chalk.dim(`(${d.project ? `${d.project}/` : ""}${d.name}, template ${d.template}, ${d.slides} slides)`)}`);
|
|
33
|
+
console.log(chalk.dim(`folder: ${d.path}`));
|
|
34
|
+
if (d.error)
|
|
35
|
+
console.log(chalk.red(`deck.md: ${d.error}`));
|
|
36
|
+
console.log(`\n${chalk.bold("slides")}`);
|
|
37
|
+
d.deck.slides.forEach((s, i) => {
|
|
38
|
+
const first = s.content.split("\n").find((l) => l.trim())?.replace(/^#+\s*/, "") ?? "";
|
|
39
|
+
console.log(` ${chalk.cyan(String(i + 1).padStart(3))} ${chalk.dim(`[${s.layout ?? "default"}]`)} ${first}${s.notes ? chalk.dim(" · notes") : ""}`);
|
|
40
|
+
});
|
|
41
|
+
console.log(`\n${chalk.bold("layouts")} ${chalk.dim(`of template ${d.template}`)}`);
|
|
42
|
+
for (const l of d.layouts)
|
|
43
|
+
console.log(` ${chalk.cyan(l.name.padEnd(12))} ${l.slots.map((s) => `${s.name}${s.required ? "*" : ""}:${s.kind}`).join(" ")}${l.description ? chalk.dim(` ${l.description}`) : ""}`);
|
|
44
|
+
if (d.theme.snippets.length)
|
|
45
|
+
console.log(`\n${chalk.bold("pieces")} ${chalk.dim(`of the theme (HTML for a slot; \`presentations show --json\` has the markup)`)}\n${d.theme.snippets.map((x) => ` ${chalk.cyan(x.name.padEnd(14))} ${chalk.dim(x.description ?? "")}`).join("\n")}`);
|
|
46
|
+
if (d.assets.length)
|
|
47
|
+
console.log(`\n${chalk.bold("assets")}\n${d.assets.map((a) => ` ${a}`).join("\n")}`);
|
|
48
|
+
if (d.exports.length)
|
|
49
|
+
console.log(`\n${chalk.bold("exports")}\n${d.exports.map((a) => ` exports/${a}`).join("\n")}`);
|
|
50
|
+
console.log(`\n${chalk.bold("warnings")}${d.warnings.length ? "" : chalk.dim(" (none)")}`);
|
|
51
|
+
printWarnings(d.warnings);
|
|
52
|
+
}
|
|
53
|
+
export function registerPresentationCommands(program) {
|
|
54
|
+
const cmd = program.command("presentations").alias("decks").description("Slide decks of a project or the workspace: list, show, create, check, render, remove, templates");
|
|
55
|
+
cmd
|
|
56
|
+
.command("list", { isDefault: true })
|
|
57
|
+
.description("List the decks: the workspace's, a project's (--project), or every one (--all)")
|
|
58
|
+
.option("--project <slug>", "A project's decks")
|
|
59
|
+
.option("--all", "Every deck of the workspace and its projects")
|
|
60
|
+
.option("--json", "Machine-readable output")
|
|
61
|
+
.action(async (opts) => {
|
|
62
|
+
await prepare();
|
|
63
|
+
const view = opts.all ? { enabled: true, presentations: await listAllDecks() } : await listDecks(opts.project);
|
|
64
|
+
if (opts.json) {
|
|
65
|
+
console.log(JSON.stringify(view, null, 2));
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
if (!view.enabled)
|
|
69
|
+
die(("error" in view && view.error) || "presentations are off");
|
|
70
|
+
if ("error" in view && view.error)
|
|
71
|
+
die(view.error);
|
|
72
|
+
if (view.presentations.length === 0) {
|
|
73
|
+
console.log(chalk.dim(`No presentations ${opts.project ? `in project ${opts.project}` : opts.all ? "anywhere" : "in the workspace"} yet — \`kraftwerk presentations create "<title>"${opts.project ? ` --project ${opts.project}` : ""}\` starts one.`));
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
const table = new Table({ head: ["deck", "where", "slides", "template", "changed"].map((h) => chalk.bold(h)) });
|
|
77
|
+
for (const p of view.presentations) {
|
|
78
|
+
table.push([`${chalk.cyan(p.title)}\n${chalk.dim(p.name)}`, p.project ? `project ${p.project}` : chalk.dim("workspace"), p.error ? chalk.red(p.error) : String(p.slides), p.template, chalk.dim(fmtAgo(p.updatedAt))]);
|
|
79
|
+
}
|
|
80
|
+
console.log(table.toString());
|
|
81
|
+
});
|
|
82
|
+
cmd
|
|
83
|
+
.command("show")
|
|
84
|
+
.description("One deck: its slides, the template's layouts and slots, the warnings")
|
|
85
|
+
.argument("<name>", "Deck name")
|
|
86
|
+
.option("--project <slug>", "The project the deck belongs to")
|
|
87
|
+
.option("--json", "Machine-readable output")
|
|
88
|
+
.action(async (name, opts) => {
|
|
89
|
+
await prepare();
|
|
90
|
+
const d = await getDeck(refOf(name, opts.project)).catch((err) => die(err.message));
|
|
91
|
+
if (!d)
|
|
92
|
+
return die(`no presentation "${name}"`);
|
|
93
|
+
if (opts.json)
|
|
94
|
+
console.log(JSON.stringify(d, null, 2));
|
|
95
|
+
else
|
|
96
|
+
printDeck(d);
|
|
97
|
+
});
|
|
98
|
+
cmd
|
|
99
|
+
.command("create")
|
|
100
|
+
.description("Create a deck: a starter deck.md, or one from a markdown file (--from)")
|
|
101
|
+
.argument("<title>", "Deck title")
|
|
102
|
+
.option("--project <slug>", "Create it in a project")
|
|
103
|
+
.option("--slug <name>", "Folder name (default: from the title)")
|
|
104
|
+
.option("--template <slug>", "Template (default: default)")
|
|
105
|
+
.option("--from <file>", "A deck.md to start from")
|
|
106
|
+
.option("--json", "Machine-readable output")
|
|
107
|
+
.action(async (title, opts) => {
|
|
108
|
+
await prepare();
|
|
109
|
+
const source = opts.from ? await readFile(opts.from, "utf8").catch(() => die(`cannot read ${opts.from}`)) : undefined;
|
|
110
|
+
const d = await createDeck({ ...(opts.project ? { project: opts.project } : {}), title, ...(opts.slug ? { slug: opts.slug } : {}), ...(opts.template ? { template: opts.template } : {}), ...(source ? { source } : {}) }).catch((err) => die(err.message));
|
|
111
|
+
if (opts.json) {
|
|
112
|
+
console.log(JSON.stringify(d, null, 2));
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
console.log(`${chalk.green("created")} ${chalk.bold(d.title)} ${chalk.dim(`(${d.project ? `${d.project}/` : ""}${d.name})`)}`);
|
|
116
|
+
console.log(chalk.dim(`write ${d.path}/deck.md, pictures into ${d.path}/assets/`));
|
|
117
|
+
printWarnings(d.warnings);
|
|
118
|
+
});
|
|
119
|
+
cmd
|
|
120
|
+
.command("check")
|
|
121
|
+
.description("Check a deck against its template: every warning; exits 1 when there are errors")
|
|
122
|
+
.argument("<name>", "Deck name")
|
|
123
|
+
.option("--project <slug>", "The project the deck belongs to")
|
|
124
|
+
.option("--json", "Machine-readable output")
|
|
125
|
+
.action(async (name, opts) => {
|
|
126
|
+
await prepare();
|
|
127
|
+
const d = await getDeck(refOf(name, opts.project)).catch((err) => die(err.message));
|
|
128
|
+
if (!d)
|
|
129
|
+
return die(`no presentation "${name}"`);
|
|
130
|
+
if (opts.json)
|
|
131
|
+
console.log(JSON.stringify({ name: d.name, project: d.project, slides: d.slides, warnings: d.warnings }, null, 2));
|
|
132
|
+
else if (d.warnings.length === 0)
|
|
133
|
+
console.log(`${chalk.green("ok")} ${d.slides} slides, no warnings`);
|
|
134
|
+
else
|
|
135
|
+
printWarnings(d.warnings);
|
|
136
|
+
if (d.warnings.some((w) => w.level === "error"))
|
|
137
|
+
process.exit(1);
|
|
138
|
+
});
|
|
139
|
+
cmd
|
|
140
|
+
.command("render")
|
|
141
|
+
.description("Write the deck as PPTX, PDF, slide PNGs or one HTML file into its exports/ folder (or --out)")
|
|
142
|
+
.argument("<name>", "Deck name")
|
|
143
|
+
.option("--project <slug>", "The project the deck belongs to")
|
|
144
|
+
.option("--pptx", "PowerPoint file")
|
|
145
|
+
.option("--pdf", "PDF, one page per slide")
|
|
146
|
+
.option("--png", "One PNG per slide (exports/slides/NN.png) — look at them")
|
|
147
|
+
.option("--html", "One self-contained HTML file: present it in any browser, print it to PDF")
|
|
148
|
+
.option("--out <dir>", "Write there instead of exports/")
|
|
149
|
+
.option("--width <px>", "Image width for --png and --pdf (default 1280 / 1600)")
|
|
150
|
+
.option("--json", "Machine-readable output")
|
|
151
|
+
.action(async (name, opts) => {
|
|
152
|
+
await prepare();
|
|
153
|
+
const formats = ["pptx", "pdf", "png", "html"].filter((f) => opts[f]);
|
|
154
|
+
if (formats.length === 0)
|
|
155
|
+
die("say what to write: --pptx, --pdf, --png and/or --html");
|
|
156
|
+
const width = opts.width ? Number(opts.width) : undefined;
|
|
157
|
+
if (width !== undefined && !(width >= 160 && width <= 3840))
|
|
158
|
+
die("--width must be between 160 and 3840");
|
|
159
|
+
const files = [];
|
|
160
|
+
let warnings = [];
|
|
161
|
+
for (const format of formats) {
|
|
162
|
+
const r = await exportDeck(refOf(name, opts.project), format, { ...(opts.out ? { outDir: opts.out } : {}), ...(width ? { width } : {}) }).catch((err) => die(err.message));
|
|
163
|
+
files.push(...r.files);
|
|
164
|
+
warnings = r.warnings;
|
|
165
|
+
}
|
|
166
|
+
if (opts.json) {
|
|
167
|
+
console.log(JSON.stringify({ files, warnings }, null, 2));
|
|
168
|
+
return;
|
|
169
|
+
}
|
|
170
|
+
for (const f of files)
|
|
171
|
+
console.log(`${chalk.green("wrote")} ${f}`);
|
|
172
|
+
printWarnings(warnings);
|
|
173
|
+
});
|
|
174
|
+
/** Who writes: the session's actor (an agent), else human:user. */
|
|
175
|
+
const actor = () => (process.env.KRAFTWERK_ACTOR ?? "").trim() || "human:user";
|
|
176
|
+
cmd
|
|
177
|
+
.command("comments")
|
|
178
|
+
.description("The comments on a deck's slides and boxes: the open ones, or --all")
|
|
179
|
+
.argument("<name>", "Deck name")
|
|
180
|
+
.option("--project <slug>", "The project the deck belongs to")
|
|
181
|
+
.option("--all", "Resolved ones too")
|
|
182
|
+
.option("--json", "Machine-readable output")
|
|
183
|
+
.action(async (name, opts) => {
|
|
184
|
+
await prepare();
|
|
185
|
+
const all = await listComments(refOf(name, opts.project)).catch((err) => die(err.message));
|
|
186
|
+
const shown = opts.all ? all : all.filter((c) => !c.resolved);
|
|
187
|
+
if (opts.json) {
|
|
188
|
+
console.log(JSON.stringify({ comments: shown }, null, 2));
|
|
189
|
+
return;
|
|
190
|
+
}
|
|
191
|
+
if (!shown.length) {
|
|
192
|
+
console.log(chalk.dim(opts.all ? "no comments" : "no open comments"));
|
|
193
|
+
return;
|
|
194
|
+
}
|
|
195
|
+
for (const c of shown) {
|
|
196
|
+
console.log(`${chalk.cyan(c.id)} ${chalk.dim(`slide ${c.n ?? "?"}${c.slot ? ` · ${c.slot}` : ""} · ${c.author} · ${c.at.slice(0, 16).replace("T", " ")}${c.resolved ? " · resolved" : ""}`)}\n ${c.text}`);
|
|
197
|
+
for (const r of c.replies)
|
|
198
|
+
console.log(` ${chalk.dim(`↳ ${r.author}:`)} ${r.text}`);
|
|
199
|
+
}
|
|
200
|
+
});
|
|
201
|
+
cmd
|
|
202
|
+
.command("comment")
|
|
203
|
+
.description("Comment on slide n of a deck, or on one of its boxes (--slot)")
|
|
204
|
+
.argument("<name>", "Deck name")
|
|
205
|
+
.argument("<slide>", "Slide number")
|
|
206
|
+
.argument("<text>", "The comment")
|
|
207
|
+
.option("--project <slug>", "The project the deck belongs to")
|
|
208
|
+
.option("--slot <box>", "The box it is about")
|
|
209
|
+
.action(async (name, slide, text, opts) => {
|
|
210
|
+
await prepare();
|
|
211
|
+
const c = await addComment(refOf(name, opts.project), { slide: Number(slide), text, author: actor(), ...(opts.slot ? { slot: opts.slot } : {}) }).catch((err) => die(err.message));
|
|
212
|
+
console.log(`${chalk.green("commented")} ${c.id} on slide ${c.n}`);
|
|
213
|
+
});
|
|
214
|
+
cmd
|
|
215
|
+
.command("resolve")
|
|
216
|
+
.description("Resolve a comment, answering it with --reply")
|
|
217
|
+
.argument("<name>", "Deck name")
|
|
218
|
+
.argument("<id>", "Comment id (from `presentations comments`)")
|
|
219
|
+
.option("--project <slug>", "The project the deck belongs to")
|
|
220
|
+
.option("--reply <text>", "What was done about it")
|
|
221
|
+
.option("--reopen", "Open it again instead")
|
|
222
|
+
.action(async (name, id, opts) => {
|
|
223
|
+
await prepare();
|
|
224
|
+
await updateComment(refOf(name, opts.project), id, { resolved: !opts.reopen, author: actor(), ...(opts.reply ? { reply: opts.reply } : {}) }).catch((err) => die(err.message));
|
|
225
|
+
console.log(`${chalk.green(opts.reopen ? "reopened" : "resolved")} ${id}`);
|
|
226
|
+
});
|
|
227
|
+
cmd
|
|
228
|
+
.command("remove")
|
|
229
|
+
.description("Move a deck to the trash")
|
|
230
|
+
.argument("<name>", "Deck name")
|
|
231
|
+
.option("--project <slug>", "The project the deck belongs to")
|
|
232
|
+
.action(async (name, opts) => {
|
|
233
|
+
await prepare();
|
|
234
|
+
await deleteDeck(refOf(name, opts.project)).catch((err) => die(err.message));
|
|
235
|
+
console.log(`${chalk.green("removed")} ${name} ${chalk.dim("(in the trash)")}`);
|
|
236
|
+
});
|
|
237
|
+
const templates = cmd.command("templates").description("The templates: the built-in one and the workspace's (templates/<slug>/template.yml under the presentations root)");
|
|
238
|
+
templates
|
|
239
|
+
.command("list", { isDefault: true })
|
|
240
|
+
.description("List the templates with their layouts")
|
|
241
|
+
.option("--json", "Machine-readable output")
|
|
242
|
+
.action(async (opts) => {
|
|
243
|
+
await prepare();
|
|
244
|
+
const list = await listTemplates();
|
|
245
|
+
if (opts.json) {
|
|
246
|
+
console.log(JSON.stringify({ templates: list }, null, 2));
|
|
247
|
+
return;
|
|
248
|
+
}
|
|
249
|
+
for (const t of list)
|
|
250
|
+
console.log(`${chalk.cyan(t.slug.padEnd(14))} ${t.error ? chalk.red(t.error) : `${t.name} ${chalk.dim(`(${t.size}; layouts: ${t.layouts.join(", ")})`)}`}${t.builtin ? chalk.dim(" built-in") : t.path ? chalk.dim(` ${t.path}`) : ""}`);
|
|
251
|
+
});
|
|
252
|
+
templates
|
|
253
|
+
.command("init")
|
|
254
|
+
.description("Write a copy of the built-in template as a workspace template to edit")
|
|
255
|
+
.argument("<slug>", "Template name")
|
|
256
|
+
.action(async (slug) => {
|
|
257
|
+
await prepare();
|
|
258
|
+
const file = await initTemplate(slug).catch((err) => die(err.message));
|
|
259
|
+
console.log(`${chalk.green("wrote")} ${file}`);
|
|
260
|
+
});
|
|
261
|
+
}
|
package/dist/client/routes.d.ts
CHANGED
|
@@ -20,6 +20,12 @@ export declare const ROUTES: {
|
|
|
20
20
|
readonly "agents.skills": readonly ["GET", "/api/agents/:slug/skills"];
|
|
21
21
|
readonly "agents.status": readonly ["GET", "/api/agent-status"];
|
|
22
22
|
readonly "attention.list": readonly ["GET", "/api/attention"];
|
|
23
|
+
readonly "boards.create": readonly ["POST", "/api/boards"];
|
|
24
|
+
readonly "boards.delete": readonly ["DELETE", "/api/boards/:board"];
|
|
25
|
+
readonly "boards.ensure": readonly ["POST", "/api/boards/default"];
|
|
26
|
+
readonly "boards.get": readonly ["GET", "/api/boards/:board"];
|
|
27
|
+
readonly "boards.list": readonly ["GET", "/api/boards"];
|
|
28
|
+
readonly "boards.save": readonly ["PUT", "/api/boards/:board"];
|
|
23
29
|
readonly "channels.create": readonly ["POST", "/api/channels"];
|
|
24
30
|
readonly "channels.delete": readonly ["DELETE", "/api/channels/:slug"];
|
|
25
31
|
readonly "channels.fromChat": readonly ["POST", "/api/channels/from-chat"];
|
|
@@ -104,6 +110,24 @@ export declare const ROUTES: {
|
|
|
104
110
|
readonly "places.get": readonly ["GET", "/api/places/:slug"];
|
|
105
111
|
readonly "places.list": readonly ["GET", "/api/places"];
|
|
106
112
|
readonly "places.save": readonly ["PUT", "/api/places/:slug"];
|
|
113
|
+
readonly "presentations.comment": readonly ["POST", "/api/presentations/:name/comments"];
|
|
114
|
+
readonly "presentations.commentDelete": readonly ["DELETE", "/api/presentations/:name/comments/:id"];
|
|
115
|
+
readonly "presentations.commentSave": readonly ["PUT", "/api/presentations/:name/comments/:id"];
|
|
116
|
+
readonly "presentations.create": readonly ["POST", "/api/presentations"];
|
|
117
|
+
readonly "presentations.delete": readonly ["DELETE", "/api/presentations/:name"];
|
|
118
|
+
readonly "presentations.export": readonly ["GET", "/api/presentations/:name/export", "raw"];
|
|
119
|
+
readonly "presentations.file": readonly ["GET", "/api/presentations/:name/file", "raw"];
|
|
120
|
+
readonly "presentations.get": readonly ["GET", "/api/presentations/:name"];
|
|
121
|
+
readonly "presentations.history": readonly ["GET", "/api/presentations/:name/history"];
|
|
122
|
+
readonly "presentations.links": readonly ["GET", "/api/presentations/:name/links"];
|
|
123
|
+
readonly "presentations.list": readonly ["GET", "/api/presentations"];
|
|
124
|
+
readonly "presentations.presence": readonly ["POST", "/api/presentations/:name/presence"];
|
|
125
|
+
readonly "presentations.save": readonly ["PUT", "/api/presentations/:name"];
|
|
126
|
+
readonly "presentations.slide": readonly ["GET", "/api/presentations/:name/slides/:n", "raw"];
|
|
127
|
+
readonly "presentations.templateFile": readonly ["GET", "/api/presentations/templates/:slug/file", "raw"];
|
|
128
|
+
readonly "presentations.templates": readonly ["GET", "/api/presentations/templates"];
|
|
129
|
+
readonly "presentations.upload": readonly ["POST", "/api/presentations/:name/assets", "upload"];
|
|
130
|
+
readonly "presentations.version": readonly ["GET", "/api/presentations/:name/history/:id"];
|
|
107
131
|
readonly "projects.create": readonly ["POST", "/api/projects"];
|
|
108
132
|
readonly "projects.delete": readonly ["DELETE", "/api/projects/:slug"];
|
|
109
133
|
readonly "projects.get": readonly ["GET", "/api/projects/:slug"];
|
|
@@ -136,6 +160,14 @@ export declare const ROUTES: {
|
|
|
136
160
|
readonly "settings.save": readonly ["PUT", "/api/settings"];
|
|
137
161
|
readonly "skills.get": readonly ["GET", "/api/skills/:name"];
|
|
138
162
|
readonly "skills.list": readonly ["GET", "/api/skills"];
|
|
163
|
+
readonly "tasks.assign": readonly ["POST", "/api/boards/:board/tasks/:task/assign"];
|
|
164
|
+
readonly "tasks.create": readonly ["POST", "/api/boards/:board/tasks"];
|
|
165
|
+
readonly "tasks.delete": readonly ["DELETE", "/api/boards/:board/tasks/:task"];
|
|
166
|
+
readonly "tasks.get": readonly ["GET", "/api/boards/:board/tasks/:task"];
|
|
167
|
+
readonly "tasks.log": readonly ["POST", "/api/boards/:board/tasks/:task/log"];
|
|
168
|
+
readonly "tasks.move": readonly ["POST", "/api/boards/:board/tasks/:task/move"];
|
|
169
|
+
readonly "tasks.pick": readonly ["POST", "/api/boards/:board/pick"];
|
|
170
|
+
readonly "tasks.save": readonly ["PUT", "/api/boards/:board/tasks/:task"];
|
|
139
171
|
readonly "temp.clean": readonly ["DELETE", "/api/temp"];
|
|
140
172
|
readonly "temp.list": readonly ["GET", "/api/temp"];
|
|
141
173
|
readonly "trash.empty": readonly ["DELETE", "/api/trash"];
|
package/dist/client/routes.js
CHANGED
|
@@ -21,6 +21,12 @@ export const ROUTES = {
|
|
|
21
21
|
"agents.skills": ["GET", "/api/agents/:slug/skills"],
|
|
22
22
|
"agents.status": ["GET", "/api/agent-status"],
|
|
23
23
|
"attention.list": ["GET", "/api/attention"],
|
|
24
|
+
"boards.create": ["POST", "/api/boards"],
|
|
25
|
+
"boards.delete": ["DELETE", "/api/boards/:board"],
|
|
26
|
+
"boards.ensure": ["POST", "/api/boards/default"],
|
|
27
|
+
"boards.get": ["GET", "/api/boards/:board"],
|
|
28
|
+
"boards.list": ["GET", "/api/boards"],
|
|
29
|
+
"boards.save": ["PUT", "/api/boards/:board"],
|
|
24
30
|
"channels.create": ["POST", "/api/channels"],
|
|
25
31
|
"channels.delete": ["DELETE", "/api/channels/:slug"],
|
|
26
32
|
"channels.fromChat": ["POST", "/api/channels/from-chat"],
|
|
@@ -105,6 +111,24 @@ export const ROUTES = {
|
|
|
105
111
|
"places.get": ["GET", "/api/places/:slug"],
|
|
106
112
|
"places.list": ["GET", "/api/places"],
|
|
107
113
|
"places.save": ["PUT", "/api/places/:slug"],
|
|
114
|
+
"presentations.comment": ["POST", "/api/presentations/:name/comments"],
|
|
115
|
+
"presentations.commentDelete": ["DELETE", "/api/presentations/:name/comments/:id"],
|
|
116
|
+
"presentations.commentSave": ["PUT", "/api/presentations/:name/comments/:id"],
|
|
117
|
+
"presentations.create": ["POST", "/api/presentations"],
|
|
118
|
+
"presentations.delete": ["DELETE", "/api/presentations/:name"],
|
|
119
|
+
"presentations.export": ["GET", "/api/presentations/:name/export", "raw"],
|
|
120
|
+
"presentations.file": ["GET", "/api/presentations/:name/file", "raw"],
|
|
121
|
+
"presentations.get": ["GET", "/api/presentations/:name"],
|
|
122
|
+
"presentations.history": ["GET", "/api/presentations/:name/history"],
|
|
123
|
+
"presentations.links": ["GET", "/api/presentations/:name/links"],
|
|
124
|
+
"presentations.list": ["GET", "/api/presentations"],
|
|
125
|
+
"presentations.presence": ["POST", "/api/presentations/:name/presence"],
|
|
126
|
+
"presentations.save": ["PUT", "/api/presentations/:name"],
|
|
127
|
+
"presentations.slide": ["GET", "/api/presentations/:name/slides/:n", "raw"],
|
|
128
|
+
"presentations.templateFile": ["GET", "/api/presentations/templates/:slug/file", "raw"],
|
|
129
|
+
"presentations.templates": ["GET", "/api/presentations/templates"],
|
|
130
|
+
"presentations.upload": ["POST", "/api/presentations/:name/assets", "upload"],
|
|
131
|
+
"presentations.version": ["GET", "/api/presentations/:name/history/:id"],
|
|
108
132
|
"projects.create": ["POST", "/api/projects"],
|
|
109
133
|
"projects.delete": ["DELETE", "/api/projects/:slug"],
|
|
110
134
|
"projects.get": ["GET", "/api/projects/:slug"],
|
|
@@ -137,6 +161,14 @@ export const ROUTES = {
|
|
|
137
161
|
"settings.save": ["PUT", "/api/settings"],
|
|
138
162
|
"skills.get": ["GET", "/api/skills/:name"],
|
|
139
163
|
"skills.list": ["GET", "/api/skills"],
|
|
164
|
+
"tasks.assign": ["POST", "/api/boards/:board/tasks/:task/assign"],
|
|
165
|
+
"tasks.create": ["POST", "/api/boards/:board/tasks"],
|
|
166
|
+
"tasks.delete": ["DELETE", "/api/boards/:board/tasks/:task"],
|
|
167
|
+
"tasks.get": ["GET", "/api/boards/:board/tasks/:task"],
|
|
168
|
+
"tasks.log": ["POST", "/api/boards/:board/tasks/:task/log"],
|
|
169
|
+
"tasks.move": ["POST", "/api/boards/:board/tasks/:task/move"],
|
|
170
|
+
"tasks.pick": ["POST", "/api/boards/:board/pick"],
|
|
171
|
+
"tasks.save": ["PUT", "/api/boards/:board/tasks/:task"],
|
|
140
172
|
"temp.clean": ["DELETE", "/api/temp"],
|
|
141
173
|
"temp.list": ["GET", "/api/temp"],
|
|
142
174
|
"trash.empty": ["DELETE", "/api/trash"],
|
package/dist/config.d.ts
CHANGED
|
@@ -135,7 +135,38 @@ export interface EntitiesConfig {
|
|
|
135
135
|
root?: string;
|
|
136
136
|
}
|
|
137
137
|
export declare const ENTITY_KINDS: readonly ["contacts", "places", "events"];
|
|
138
|
+
/**
|
|
139
|
+
* Boards: the work as columns of tasks, one folder per task (task.md, log.md,
|
|
140
|
+
* files) under a board folder — inside a project (projects/<p>/boards/) or
|
|
141
|
+
* at the workspace level under the boards root. Part of the workspace and
|
|
142
|
+
* synced by the workspace git; agents are woken by events on this machine.
|
|
143
|
+
*/
|
|
144
|
+
export interface BoardsConfig {
|
|
145
|
+
/** false keeps the block but turns the feature off. Default: true. */
|
|
146
|
+
enabled?: boolean;
|
|
147
|
+
/** Where the workspace boards live, relative to the project root. Default: kraftwerk-data/boards */
|
|
148
|
+
root?: string;
|
|
149
|
+
/** Default columns for boards that name none (slugs or {slug, label, limit, done, review}). Default: draft, todo, progress, review, done. */
|
|
150
|
+
columns?: unknown;
|
|
151
|
+
}
|
|
152
|
+
export declare const BOARDS_DEFAULT_ROOT = "kraftwerk-data/boards";
|
|
153
|
+
/** Absolute workspace boards root when the feature is on, undefined otherwise. */
|
|
154
|
+
export declare function boardsRootFor(project: ResolvedWorkspace): string | undefined;
|
|
138
155
|
export type EntityKind = (typeof ENTITY_KINDS)[number];
|
|
156
|
+
/**
|
|
157
|
+
* Presentations: slide decks as folders (deck.md, assets/, exports/) under a
|
|
158
|
+
* project (projects/<p>/presentations/) or the workspace root below. Part of
|
|
159
|
+
* the workspace and synced by the workspace git.
|
|
160
|
+
*/
|
|
161
|
+
export interface PresentationsConfig {
|
|
162
|
+
/** false keeps the block but turns the feature off. Default: true. */
|
|
163
|
+
enabled?: boolean;
|
|
164
|
+
/** Where the workspace decks (and templates/) live, relative to the project root. Default: kraftwerk-data/presentations */
|
|
165
|
+
root?: string;
|
|
166
|
+
}
|
|
167
|
+
export declare const PRESENTATIONS_DEFAULT_ROOT = "kraftwerk-data/presentations";
|
|
168
|
+
/** Absolute workspace presentations root when the feature is on, undefined otherwise. */
|
|
169
|
+
export declare function presentationsRootFor(project: ResolvedWorkspace): string | undefined;
|
|
139
170
|
/** Where a kind's files live when its `root` is not set. */
|
|
140
171
|
export declare const entityDefaultRoot: (kind: EntityKind) => string;
|
|
141
172
|
/** Absolute root of a kind when its feature is on, undefined otherwise. */
|
|
@@ -218,6 +249,10 @@ export interface WorkspaceConfig {
|
|
|
218
249
|
places?: EntitiesConfig;
|
|
219
250
|
/** Events: dated entries (one-off), one Markdown file each. Absent = off. */
|
|
220
251
|
events?: EntitiesConfig;
|
|
252
|
+
/** Boards: tasks as folders in columns, per project and workspace-wide. Absent = off. */
|
|
253
|
+
boards?: BoardsConfig;
|
|
254
|
+
/** Presentations: slide decks as folders, per project and workspace-wide. Absent = off. */
|
|
255
|
+
presentations?: PresentationsConfig;
|
|
221
256
|
/** The machine's cloud record lists this workspace. Absent = listed; `enabled: false` leaves it out. */
|
|
222
257
|
cloud?: CloudConfig;
|
|
223
258
|
}
|
package/dist/config.js
CHANGED
|
@@ -97,6 +97,22 @@ export function projectsRootFor(project) {
|
|
|
97
97
|
return path.resolve(project.root, p.root ?? PROJECTS_DEFAULT_ROOT);
|
|
98
98
|
}
|
|
99
99
|
export const ENTITY_KINDS = ["contacts", "places", "events"];
|
|
100
|
+
export const BOARDS_DEFAULT_ROOT = "kraftwerk-data/boards";
|
|
101
|
+
/** Absolute workspace boards root when the feature is on, undefined otherwise. */
|
|
102
|
+
export function boardsRootFor(project) {
|
|
103
|
+
const b = project.config.boards;
|
|
104
|
+
if (!b || b.enabled === false)
|
|
105
|
+
return undefined;
|
|
106
|
+
return path.resolve(project.root, b.root ?? BOARDS_DEFAULT_ROOT);
|
|
107
|
+
}
|
|
108
|
+
export const PRESENTATIONS_DEFAULT_ROOT = "kraftwerk-data/presentations";
|
|
109
|
+
/** Absolute workspace presentations root when the feature is on, undefined otherwise. */
|
|
110
|
+
export function presentationsRootFor(project) {
|
|
111
|
+
const b = project.config.presentations;
|
|
112
|
+
if (!b || b.enabled === false)
|
|
113
|
+
return undefined;
|
|
114
|
+
return path.resolve(project.root, b.root ?? PRESENTATIONS_DEFAULT_ROOT);
|
|
115
|
+
}
|
|
100
116
|
/** Where a kind's files live when its `root` is not set. */
|
|
101
117
|
export const entityDefaultRoot = (kind) => `kraftwerk-data/${kind}`;
|
|
102
118
|
/** Absolute root of a kind when its feature is on, undefined otherwise. */
|
|
@@ -241,7 +257,7 @@ export async function addWorkspaceId(configPath) {
|
|
|
241
257
|
await writeFile(configPath, out);
|
|
242
258
|
return id;
|
|
243
259
|
}
|
|
244
|
-
const KNOWN_KEYS = ["id", "name", "slug", "icon", "color", "port", "workflows", "output", "knowledge", "agents", "skills", "switcher", "git", "repos", "vibeables", "projects", "contacts", "places", "events", "cloud"];
|
|
260
|
+
const KNOWN_KEYS = ["id", "name", "slug", "icon", "color", "port", "workflows", "output", "knowledge", "agents", "skills", "switcher", "git", "repos", "vibeables", "projects", "contacts", "places", "events", "boards", "presentations", "cloud"];
|
|
245
261
|
/**
|
|
246
262
|
* Keys an older kraftwerk understood and this one ignores, so the files
|
|
247
263
|
* that still carry them keep loading: `public:` and `tunnel:` (the
|
|
@@ -308,11 +324,16 @@ async function loadConfig(configPath) {
|
|
|
308
324
|
config[key] = {};
|
|
309
325
|
validateRootBlock(configPath, "vibeables", config[key]);
|
|
310
326
|
}
|
|
311
|
-
else if (key === "projects" || key === "contacts" || key === "places" || key === "events") {
|
|
327
|
+
else if (key === "projects" || key === "contacts" || key === "places" || key === "events" || key === "presentations") {
|
|
312
328
|
if (config[key] === null)
|
|
313
329
|
config[key] = {};
|
|
314
330
|
validateRootBlock(configPath, key, config[key]);
|
|
315
331
|
}
|
|
332
|
+
else if (key === "boards") {
|
|
333
|
+
if (config[key] === null)
|
|
334
|
+
config[key] = {};
|
|
335
|
+
validateBoards(configPath, config[key]);
|
|
336
|
+
}
|
|
316
337
|
else if (key === "cloud") {
|
|
317
338
|
if (config[key] === null)
|
|
318
339
|
config[key] = {};
|
|
@@ -418,6 +439,16 @@ function validateGit(configPath, value) {
|
|
|
418
439
|
* anything outside it — it is what remove/delete operate under, and what
|
|
419
440
|
* the workspace git may stage.
|
|
420
441
|
*/
|
|
442
|
+
/** `boards`: the root block plus `columns`, which core/boards.ts reads (a bad list falls back to the defaults there). */
|
|
443
|
+
function validateBoards(configPath, value) {
|
|
444
|
+
const file = path.basename(configPath);
|
|
445
|
+
if (typeof value !== "object" || value === null || Array.isArray(value))
|
|
446
|
+
throw new Error(`${file}: boards must be a mapping (enabled, root, columns)`);
|
|
447
|
+
const { columns, ...rest } = value;
|
|
448
|
+
if (columns !== undefined && columns !== null && !Array.isArray(columns))
|
|
449
|
+
throw new Error(`${file}: boards.columns must be a list of columns`);
|
|
450
|
+
validateRootBlock(configPath, "boards", rest);
|
|
451
|
+
}
|
|
421
452
|
function validateRootBlock(configPath, block, value) {
|
|
422
453
|
const file = path.basename(configPath);
|
|
423
454
|
if (typeof value !== "object" || value === null || Array.isArray(value)) {
|
package/dist/core/attention.d.ts
CHANGED
|
@@ -33,8 +33,8 @@ export interface AttentionOwner {
|
|
|
33
33
|
export interface AttentionItem {
|
|
34
34
|
/** The request id (live requests) or the notification id (failures). */
|
|
35
35
|
id: string;
|
|
36
|
-
/** runner: routines without a runner, or naming a retired identity of this machine (see routines.ts). */
|
|
37
|
-
kind: "approval" | "question" | "failed" | "runner";
|
|
36
|
+
/** runner: routines without a runner, or naming a retired identity of this machine (see routines.ts); review: a task waits in a review column (boards.ts). */
|
|
37
|
+
kind: "approval" | "question" | "failed" | "runner" | "review";
|
|
38
38
|
/** What is asked, or what went wrong. */
|
|
39
39
|
title: string;
|
|
40
40
|
/** The session it sits in. */
|
package/dist/core/attention.js
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import { listAgents } from "./agents.js";
|
|
2
|
+
import { getBoard, listAllBoards } from "./boards.js";
|
|
2
3
|
import { waitingRequests } from "./chat/sessions.js";
|
|
3
4
|
import { chatHref, listNotifications } from "./notifications.js";
|
|
4
5
|
import { listProjects } from "./projects.js";
|
|
5
6
|
import { runnerFindings } from "./routines.js";
|
|
6
7
|
export async function listAttention() {
|
|
7
|
-
const [agents, projects, notes, runners] = await Promise.all([
|
|
8
|
+
const [agents, projects, notes, runners, boards] = await Promise.all([
|
|
8
9
|
listAgents().catch(() => []),
|
|
9
10
|
listProjects().catch(() => ({ projects: [] })),
|
|
10
11
|
listNotifications().catch(() => ({ items: [] })),
|
|
11
12
|
runnerFindings().catch(() => ({ unassigned: [], retired: [] })),
|
|
13
|
+
listAllBoards().catch(() => []),
|
|
12
14
|
]);
|
|
13
15
|
const agentOf = (slug) => {
|
|
14
16
|
const a = agents.find((x) => x.slug === slug);
|
|
@@ -101,6 +103,24 @@ export async function listAttention() {
|
|
|
101
103
|
routines: these,
|
|
102
104
|
});
|
|
103
105
|
}
|
|
104
|
-
|
|
106
|
+
// Tasks in a review column: the agents are done, a human decides. One item per task, placed in its project (workspace boards: general).
|
|
107
|
+
const review = [];
|
|
108
|
+
for (const b of boards) {
|
|
109
|
+
const detail = await getBoard(b).catch(() => null);
|
|
110
|
+
if (!detail)
|
|
111
|
+
continue;
|
|
112
|
+
const reviewCols = new Set(detail.columns.filter((c) => c.review).map((c) => c.slug));
|
|
113
|
+
for (const t of detail.items.filter((t) => reviewCols.has(t.status))) {
|
|
114
|
+
review.push({
|
|
115
|
+
id: `review:${t.ref}`,
|
|
116
|
+
kind: "review",
|
|
117
|
+
title: `${t.number} ${t.title} waits for your review${t.lastLog ? ` — ${t.lastLog}` : ""}`,
|
|
118
|
+
href: b.project ? `/projects/${b.project}/boards/${b.board}/${t.slug}` : `/boards/${b.board}/${t.slug}`,
|
|
119
|
+
since: t.updatedAt ?? new Date(0).toISOString(),
|
|
120
|
+
owner: b.project ? { project: projectOf(b.project) } : { general: true },
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
const items = [...waiting, ...failed, ...runner, ...review].sort((a, b) => a.since.localeCompare(b.since));
|
|
105
125
|
return { items };
|
|
106
126
|
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/** A chat on the task page: the agent's task session (scope.task) or a chat tagged with the task (meta.task, "work on this"). */
|
|
2
|
+
export interface TaskSession {
|
|
3
|
+
id: string;
|
|
4
|
+
/** The agent slug of a task session; "claude" | "codex" | "pi" for a plain chat tagged with the task. */
|
|
5
|
+
agent: string;
|
|
6
|
+
/** The agent's display name and emoji when it is one of the workspace's agents. */
|
|
7
|
+
name?: string;
|
|
8
|
+
emoji?: string;
|
|
9
|
+
title: string;
|
|
10
|
+
updatedAt: string;
|
|
11
|
+
busy: boolean;
|
|
12
|
+
/** The chat's route in the UI (#/agents/<slug>/chat/<id>, #/projects/<p>/chat/<id>, …). */
|
|
13
|
+
href: string;
|
|
14
|
+
}
|
|
15
|
+
/** The sessions that worked on a task, newest first: what the task page links the log's actors to. */
|
|
16
|
+
export declare function taskSessions(ref: string): Promise<TaskSession[]>;
|
|
17
|
+
/** Consume what was appended since the last run. Serialised: a run that overlaps is queued, never doubled. */
|
|
18
|
+
export declare function consumeTaskEvents(): Promise<number>;
|
|
19
|
+
/** Start consuming the current workspace's task events: on every change signal, on file changes, and every FALLBACK_MS anyway. */
|
|
20
|
+
export declare function startBoardWake(): void;
|
|
21
|
+
export declare function stopBoardWake(): void;
|