@wrongstack/webui 0.281.3 → 0.282.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/dist/assets/{AnalyticsDashboard-Cb08RPms.js → AnalyticsDashboard-BrQc2ss-.js} +1 -1
- package/dist/assets/AutoPhaseView-8NTdnZ0a.js +1 -0
- package/dist/assets/{CodeEditor-CSTcX3Za.js → CodeEditor-C-pJLtUR.js} +1 -1
- package/dist/assets/{DebugDashboard-D6-znhBO.js → DebugDashboard-BHpiEOcf.js} +1 -1
- package/dist/assets/{DesignGalleryView-yKa55dpM.js → DesignGalleryView-M6Hp7s9b.js} +1 -1
- package/dist/assets/KanbanView-nMv98m0N.js +1 -0
- package/dist/assets/{MailboxDetailView-DbX_cNcu.js → MailboxDetailView-g3IQx4DB.js} +1 -1
- package/dist/assets/OfficeMapPanel-D3VE7UCd.js +4 -0
- package/dist/assets/{ProcessMonitor-DvPiHdzj.js → ProcessMonitor-CbfQYneY.js} +1 -1
- package/dist/assets/{QueuePanel-BVvnJXHh.js → QueuePanel-eGK1SSKx.js} +1 -1
- package/dist/assets/{RefreshDebugView-pmMPOier.js → RefreshDebugView-BXq2P3wo.js} +1 -1
- package/dist/assets/{SddBoardView-CGJbbRrh.js → SddBoardView-DvuH4f4e.js} +2 -2
- package/dist/assets/{SddFlowGraph-WW0qCx0t.js → SddFlowGraph-CtMpzU4S.js} +1 -1
- package/dist/assets/SddWizard-G55Yw9Bb.js +1 -0
- package/dist/assets/{SessionsDashboard-VwXvmSxS.js → SessionsDashboard-Dqsrp5CK.js} +1 -1
- package/dist/assets/SkillDetailView-CX9zeWBG.js +2 -0
- package/dist/assets/{SpecsView-BRdxB6rh.js → SpecsView-BnUsqkrG.js} +1 -1
- package/dist/assets/{TerminalPanel-CAcbPNO_.js → TerminalPanel-BCpddej2.js} +1 -1
- package/dist/assets/{chat-store-YPRVJGbn.js → chat-store-CIMOL6-x.js} +1 -1
- package/dist/assets/{i18n-BJCOtLro.js → i18n-CNo6A2vu.js} +1 -1
- package/dist/assets/index-BhO3caLf.js +146 -0
- package/dist/assets/index-D7_FeyCA.css +1 -0
- package/dist/assets/{session-store-Do0MGnXu.js → session-store-DN1UYDL9.js} +1 -1
- package/dist/assets/ui-store-BdOsq6T-.js +1 -0
- package/dist/assets/utils-DBns3uMk.js +1 -0
- package/dist/assets/{vendor-Bhf0nZ3B.js → vendor-Ch4m_qLI.js} +25 -25
- package/dist/assets/{ws-client-D9IQ9580.js → ws-client-BAV7SLzK.js} +1 -1
- package/dist/assets/{xyflow-Bp8EMwkC.js → xyflow-D5_yey7w.js} +3 -3
- package/dist/index.html +9 -9
- package/dist/index.js +6154 -5253
- package/dist/index.js.map +1 -1
- package/dist/server/entry.js +345 -13
- package/dist/server/entry.js.map +1 -1
- package/dist/server/index.js +345 -13
- package/dist/server/index.js.map +1 -1
- package/dist/types.d.ts +18 -3
- package/package.json +6 -6
- package/dist/assets/AutoPhaseView--Ec4Mom8.js +0 -1
- package/dist/assets/OfficeMapPanel-BMxzEv_S.js +0 -4
- package/dist/assets/SddWizard-Cen90k6M.js +0 -1
- package/dist/assets/SkillDetailView-CjUeZv6V.js +0 -2
- package/dist/assets/index-BSuiEQIC.js +0 -145
- package/dist/assets/index-CMiinLaB.css +0 -1
- package/dist/assets/ui-store-D3gGpJWY.js +0 -1
- package/dist/assets/utils-sFCTikqz.js +0 -1
package/dist/server/index.js
CHANGED
|
@@ -5724,7 +5724,16 @@ function setupEvents(deps2) {
|
|
|
5724
5724
|
});
|
|
5725
5725
|
});
|
|
5726
5726
|
events.on("provider.response", (e) => {
|
|
5727
|
-
broadcast2(clients, {
|
|
5727
|
+
broadcast2(clients, {
|
|
5728
|
+
type: "provider.response",
|
|
5729
|
+
payload: sessionPayload2({
|
|
5730
|
+
sessionId: e.sessionId,
|
|
5731
|
+
content: e.content,
|
|
5732
|
+
usage: e.usage,
|
|
5733
|
+
stopReason: e.stopReason,
|
|
5734
|
+
messageId: "current"
|
|
5735
|
+
})
|
|
5736
|
+
});
|
|
5728
5737
|
});
|
|
5729
5738
|
events.on("ctx.pct", (e) => {
|
|
5730
5739
|
broadcast2(clients, {
|
|
@@ -8706,12 +8715,13 @@ function createConnectionHandler(opts) {
|
|
|
8706
8715
|
void opts.sessionStartPayload().then(async (payload) => {
|
|
8707
8716
|
const enriched = { ...payload };
|
|
8708
8717
|
try {
|
|
8709
|
-
const
|
|
8718
|
+
const replay = await opts.loadReplay?.();
|
|
8719
|
+
const live = replay?.messages ?? opts.context.messages ?? [];
|
|
8710
8720
|
const slice = live.length > REPLAY_MESSAGE_CAP ? live.slice(-REPLAY_MESSAGE_CAP) : live;
|
|
8711
8721
|
if (slice.length > 0) {
|
|
8712
8722
|
enriched.replayMessages = slice;
|
|
8713
8723
|
}
|
|
8714
|
-
const total = opts.tokenCounter.total();
|
|
8724
|
+
const total = replay?.usage ?? opts.tokenCounter.total();
|
|
8715
8725
|
if (total.input + total.output + (total.cacheRead ?? 0) + (total.cacheWrite ?? 0) > 0) {
|
|
8716
8726
|
enriched.replayUsage = {
|
|
8717
8727
|
input: total.input,
|
|
@@ -8838,8 +8848,8 @@ async function handleGoalGet(projectRoot, broadcast2) {
|
|
|
8838
8848
|
}
|
|
8839
8849
|
|
|
8840
8850
|
// src/server/handlers/worklist-handlers.ts
|
|
8841
|
-
function sendResult2(ws, ctx,
|
|
8842
|
-
ctx.send(ws, { type:
|
|
8851
|
+
function sendResult2(ws, ctx, ok2, message) {
|
|
8852
|
+
ctx.send(ws, { type: ok2 ? "ok" : "error", message });
|
|
8843
8853
|
}
|
|
8844
8854
|
function sessionPayload(ctx, payload) {
|
|
8845
8855
|
const provided = payload["sessionId"];
|
|
@@ -9060,6 +9070,295 @@ async function handleWorklistMessage(ctx, ws, msg) {
|
|
|
9060
9070
|
}
|
|
9061
9071
|
}
|
|
9062
9072
|
|
|
9073
|
+
// src/server/kanban-routes.ts
|
|
9074
|
+
import {
|
|
9075
|
+
addColumn,
|
|
9076
|
+
addTask,
|
|
9077
|
+
assignTask,
|
|
9078
|
+
copyTaskToBoard,
|
|
9079
|
+
createBoard,
|
|
9080
|
+
duplicateBoard,
|
|
9081
|
+
generateBoardFromDescription,
|
|
9082
|
+
getBoard,
|
|
9083
|
+
getTask,
|
|
9084
|
+
listBoards,
|
|
9085
|
+
moveTask,
|
|
9086
|
+
parseLinesIntoTasks,
|
|
9087
|
+
removeBoard,
|
|
9088
|
+
removeColumn,
|
|
9089
|
+
removeTask,
|
|
9090
|
+
transferTaskToBoard,
|
|
9091
|
+
updateBoard,
|
|
9092
|
+
updateTask
|
|
9093
|
+
} from "@wrongstack/core";
|
|
9094
|
+
function ok(ws, type, data) {
|
|
9095
|
+
send(ws, { type, payload: { success: true, data: data ?? null } });
|
|
9096
|
+
}
|
|
9097
|
+
function fail(ws, type, message) {
|
|
9098
|
+
send(ws, { type, payload: { success: false, error: message } });
|
|
9099
|
+
}
|
|
9100
|
+
async function handleKanbanRoute(ws, msg, ctx) {
|
|
9101
|
+
if (!msg.type.startsWith("kanban.")) return false;
|
|
9102
|
+
const payload = msg.payload;
|
|
9103
|
+
const type = msg.type;
|
|
9104
|
+
try {
|
|
9105
|
+
switch (type) {
|
|
9106
|
+
case "kanban.list":
|
|
9107
|
+
ok(ws, type, await listBoards(ctx.projectRoot));
|
|
9108
|
+
return true;
|
|
9109
|
+
case "kanban.get": {
|
|
9110
|
+
const boardId = payload?.boardId;
|
|
9111
|
+
if (!boardId) {
|
|
9112
|
+
fail(ws, type, "boardId required");
|
|
9113
|
+
return true;
|
|
9114
|
+
}
|
|
9115
|
+
const board = await getBoard(ctx.projectRoot, boardId);
|
|
9116
|
+
board ? ok(ws, type, board) : fail(ws, type, `Board not found: ${boardId}`);
|
|
9117
|
+
return true;
|
|
9118
|
+
}
|
|
9119
|
+
case "kanban.create": {
|
|
9120
|
+
const title = payload?.title;
|
|
9121
|
+
if (!title) {
|
|
9122
|
+
fail(ws, type, "title required");
|
|
9123
|
+
return true;
|
|
9124
|
+
}
|
|
9125
|
+
ok(
|
|
9126
|
+
ws,
|
|
9127
|
+
type,
|
|
9128
|
+
await createBoard(ctx.projectRoot, {
|
|
9129
|
+
title,
|
|
9130
|
+
...payload?.description ? { description: payload.description } : {},
|
|
9131
|
+
...payload?.tags ? { tags: payload.tags } : {},
|
|
9132
|
+
...payload?.columns ? { columns: payload.columns } : {}
|
|
9133
|
+
})
|
|
9134
|
+
);
|
|
9135
|
+
return true;
|
|
9136
|
+
}
|
|
9137
|
+
case "kanban.update": {
|
|
9138
|
+
const boardId = payload?.boardId;
|
|
9139
|
+
if (!boardId) {
|
|
9140
|
+
fail(ws, type, "boardId required");
|
|
9141
|
+
return true;
|
|
9142
|
+
}
|
|
9143
|
+
const board = await updateBoard(ctx.projectRoot, boardId, {
|
|
9144
|
+
...payload?.title ? { title: payload.title } : {},
|
|
9145
|
+
...payload?.description ? { description: payload.description } : {},
|
|
9146
|
+
...payload?.tags ? { tags: payload.tags } : {},
|
|
9147
|
+
...payload?.columns ? { columns: payload.columns } : {}
|
|
9148
|
+
});
|
|
9149
|
+
board ? ok(ws, type, board) : fail(ws, type, `Board not found: ${boardId}`);
|
|
9150
|
+
return true;
|
|
9151
|
+
}
|
|
9152
|
+
case "kanban.duplicate": {
|
|
9153
|
+
const boardId = payload?.boardId;
|
|
9154
|
+
if (!boardId) {
|
|
9155
|
+
fail(ws, type, "boardId required");
|
|
9156
|
+
return true;
|
|
9157
|
+
}
|
|
9158
|
+
const board = await duplicateBoard(ctx.projectRoot, boardId, {
|
|
9159
|
+
...payload?.title ? { title: payload.title } : {},
|
|
9160
|
+
...typeof payload?.includeTasks === "boolean" ? { includeTasks: payload.includeTasks } : {},
|
|
9161
|
+
...typeof payload?.includeCompletedTasks === "boolean" ? { includeCompletedTasks: payload.includeCompletedTasks } : {},
|
|
9162
|
+
...typeof payload?.preserveAssignment === "boolean" ? { preserveAssignment: payload.preserveAssignment } : {}
|
|
9163
|
+
});
|
|
9164
|
+
board ? ok(ws, type, board) : fail(ws, type, `Board not found: ${boardId}`);
|
|
9165
|
+
return true;
|
|
9166
|
+
}
|
|
9167
|
+
case "kanban.delete": {
|
|
9168
|
+
const boardId = payload?.boardId;
|
|
9169
|
+
if (!boardId) {
|
|
9170
|
+
fail(ws, type, "boardId required");
|
|
9171
|
+
return true;
|
|
9172
|
+
}
|
|
9173
|
+
ok(ws, type, { removed: await removeBoard(ctx.projectRoot, boardId) });
|
|
9174
|
+
return true;
|
|
9175
|
+
}
|
|
9176
|
+
case "kanban.generate": {
|
|
9177
|
+
const description = payload?.description;
|
|
9178
|
+
if (!description) {
|
|
9179
|
+
fail(ws, type, "description required");
|
|
9180
|
+
return true;
|
|
9181
|
+
}
|
|
9182
|
+
const board = await createBoard(
|
|
9183
|
+
ctx.projectRoot,
|
|
9184
|
+
generateBoardFromDescription({
|
|
9185
|
+
description,
|
|
9186
|
+
...payload?.title ? { title: payload.title } : {},
|
|
9187
|
+
...payload?.context ? { context: payload.context } : {}
|
|
9188
|
+
})
|
|
9189
|
+
);
|
|
9190
|
+
for (const taskInput of parseLinesIntoTasks(
|
|
9191
|
+
description,
|
|
9192
|
+
board.columns[0]?.id ?? "backlog"
|
|
9193
|
+
)) {
|
|
9194
|
+
await addTask(ctx.projectRoot, board.id, taskInput);
|
|
9195
|
+
}
|
|
9196
|
+
ok(ws, type, await getBoard(ctx.projectRoot, board.id) ?? board);
|
|
9197
|
+
return true;
|
|
9198
|
+
}
|
|
9199
|
+
case "kanban.task.add": {
|
|
9200
|
+
const boardId = payload?.boardId;
|
|
9201
|
+
const title = payload?.title;
|
|
9202
|
+
if (!boardId || !title) {
|
|
9203
|
+
fail(ws, type, "boardId and title required");
|
|
9204
|
+
return true;
|
|
9205
|
+
}
|
|
9206
|
+
const result = await addTask(ctx.projectRoot, boardId, {
|
|
9207
|
+
title,
|
|
9208
|
+
columnId: payload?.columnId ?? "backlog",
|
|
9209
|
+
...payload?.description ? { description: payload.description } : {},
|
|
9210
|
+
...payload?.priority ? { priority: payload.priority } : {},
|
|
9211
|
+
...payload?.assignedAgent ? { assignedAgent: payload.assignedAgent } : {},
|
|
9212
|
+
...payload?.labels ? { labels: payload.labels } : {}
|
|
9213
|
+
});
|
|
9214
|
+
result ? ok(ws, type, result.task) : fail(ws, type, `Board not found: ${boardId}`);
|
|
9215
|
+
return true;
|
|
9216
|
+
}
|
|
9217
|
+
case "kanban.task.update": {
|
|
9218
|
+
const boardId = payload?.boardId;
|
|
9219
|
+
const taskId = payload?.taskId;
|
|
9220
|
+
if (!boardId || !taskId) {
|
|
9221
|
+
fail(ws, type, "boardId and taskId required");
|
|
9222
|
+
return true;
|
|
9223
|
+
}
|
|
9224
|
+
const board = await updateTask(ctx.projectRoot, boardId, taskId, {
|
|
9225
|
+
...payload?.title ? { title: payload.title } : {},
|
|
9226
|
+
...payload?.description ? { description: payload.description } : {},
|
|
9227
|
+
...payload?.columnId ? { columnId: payload.columnId } : {},
|
|
9228
|
+
...payload?.priority ? { priority: payload.priority } : {},
|
|
9229
|
+
...payload?.status ? { status: payload.status } : {},
|
|
9230
|
+
...payload?.assignedAgent ? { assignedAgent: payload.assignedAgent } : {},
|
|
9231
|
+
...payload?.labels ? { labels: payload.labels } : {}
|
|
9232
|
+
});
|
|
9233
|
+
board ? ok(ws, type, findTask(board.tasks, taskId)) : fail(ws, type, "Board or task not found");
|
|
9234
|
+
return true;
|
|
9235
|
+
}
|
|
9236
|
+
case "kanban.task.move": {
|
|
9237
|
+
const boardId = payload?.boardId;
|
|
9238
|
+
const taskId = payload?.taskId;
|
|
9239
|
+
const columnId = payload?.columnId;
|
|
9240
|
+
if (!boardId || !taskId || !columnId) {
|
|
9241
|
+
fail(ws, type, "boardId, taskId, columnId required");
|
|
9242
|
+
return true;
|
|
9243
|
+
}
|
|
9244
|
+
const board = await moveTask(
|
|
9245
|
+
ctx.projectRoot,
|
|
9246
|
+
boardId,
|
|
9247
|
+
taskId,
|
|
9248
|
+
columnId,
|
|
9249
|
+
payload?.order
|
|
9250
|
+
);
|
|
9251
|
+
board ? ok(ws, type, findTask(board.tasks, taskId)) : fail(ws, type, "Move failed");
|
|
9252
|
+
return true;
|
|
9253
|
+
}
|
|
9254
|
+
case "kanban.task.copy":
|
|
9255
|
+
case "kanban.task.transfer": {
|
|
9256
|
+
const boardId = payload?.boardId;
|
|
9257
|
+
const taskId = payload?.taskId;
|
|
9258
|
+
const targetBoardId = payload?.targetBoardId;
|
|
9259
|
+
if (!boardId || !taskId || !targetBoardId) {
|
|
9260
|
+
fail(ws, type, "boardId, taskId, targetBoardId required");
|
|
9261
|
+
return true;
|
|
9262
|
+
}
|
|
9263
|
+
const result = type === "kanban.task.copy" ? await copyTaskToBoard(ctx.projectRoot, boardId, taskId, targetBoardId, {
|
|
9264
|
+
...payload?.targetColumnId ? { targetColumnId: payload.targetColumnId } : {},
|
|
9265
|
+
...typeof payload?.preserveAssignment === "boolean" ? { preserveAssignment: payload.preserveAssignment } : {},
|
|
9266
|
+
...typeof payload?.preserveDependencies === "boolean" ? { preserveDependencies: payload.preserveDependencies } : {}
|
|
9267
|
+
}) : await transferTaskToBoard(ctx.projectRoot, boardId, taskId, targetBoardId, {
|
|
9268
|
+
...payload?.targetColumnId ? { targetColumnId: payload.targetColumnId } : {},
|
|
9269
|
+
...typeof payload?.preserveAssignment === "boolean" ? { preserveAssignment: payload.preserveAssignment } : {},
|
|
9270
|
+
...typeof payload?.preserveDependencies === "boolean" ? { preserveDependencies: payload.preserveDependencies } : {}
|
|
9271
|
+
});
|
|
9272
|
+
result ? ok(ws, type, result.targetBoard) : fail(ws, type, "Board or task not found");
|
|
9273
|
+
return true;
|
|
9274
|
+
}
|
|
9275
|
+
case "kanban.task.assign": {
|
|
9276
|
+
const boardId = payload?.boardId;
|
|
9277
|
+
const taskId = payload?.taskId;
|
|
9278
|
+
if (!boardId || !taskId) {
|
|
9279
|
+
fail(ws, type, "boardId and taskId required");
|
|
9280
|
+
return true;
|
|
9281
|
+
}
|
|
9282
|
+
const board = await assignTask(ctx.projectRoot, boardId, taskId, {
|
|
9283
|
+
...payload?.agentId ? { agentId: payload.agentId } : {},
|
|
9284
|
+
...payload?.name ? { name: payload.name } : {},
|
|
9285
|
+
...payload?.role ? { role: payload.role } : {},
|
|
9286
|
+
...payload?.provider ? { provider: payload.provider } : {},
|
|
9287
|
+
...payload?.model ? { model: payload.model } : {},
|
|
9288
|
+
...payload?.fallbackProfile ? { fallbackProfile: payload.fallbackProfile } : {},
|
|
9289
|
+
...payload?.fallbackModels ? { fallbackModels: payload.fallbackModels } : {},
|
|
9290
|
+
...payload?.tools ? { tools: payload.tools } : {},
|
|
9291
|
+
...payload?.allowedCapabilities ? { allowedCapabilities: payload.allowedCapabilities } : {}
|
|
9292
|
+
});
|
|
9293
|
+
board ? ok(ws, type, findTask(board.tasks, taskId)) : fail(ws, type, "Board or task not found");
|
|
9294
|
+
return true;
|
|
9295
|
+
}
|
|
9296
|
+
case "kanban.task.dispatch":
|
|
9297
|
+
fail(
|
|
9298
|
+
ws,
|
|
9299
|
+
type,
|
|
9300
|
+
"Kanban agent dispatch is only available from the CLI-hosted WebUI runtime."
|
|
9301
|
+
);
|
|
9302
|
+
return true;
|
|
9303
|
+
case "kanban.task.remove": {
|
|
9304
|
+
const boardId = payload?.boardId;
|
|
9305
|
+
const taskId = payload?.taskId;
|
|
9306
|
+
if (!boardId || !taskId) {
|
|
9307
|
+
fail(ws, type, "boardId and taskId required");
|
|
9308
|
+
return true;
|
|
9309
|
+
}
|
|
9310
|
+
const board = await removeTask(ctx.projectRoot, boardId, taskId);
|
|
9311
|
+
board ? ok(ws, type, { removed: true }) : fail(ws, type, "Board or task not found");
|
|
9312
|
+
return true;
|
|
9313
|
+
}
|
|
9314
|
+
case "kanban.task.get": {
|
|
9315
|
+
const boardId = payload?.boardId;
|
|
9316
|
+
const taskId = payload?.taskId;
|
|
9317
|
+
if (!boardId || !taskId) {
|
|
9318
|
+
fail(ws, type, "boardId and taskId required");
|
|
9319
|
+
return true;
|
|
9320
|
+
}
|
|
9321
|
+
const task = await getTask(ctx.projectRoot, boardId, taskId);
|
|
9322
|
+
task ? ok(ws, type, task) : fail(ws, type, "Task not found");
|
|
9323
|
+
return true;
|
|
9324
|
+
}
|
|
9325
|
+
case "kanban.column.add": {
|
|
9326
|
+
const boardId = payload?.boardId;
|
|
9327
|
+
const title = payload?.title;
|
|
9328
|
+
if (!boardId || !title) {
|
|
9329
|
+
fail(ws, type, "boardId and title required");
|
|
9330
|
+
return true;
|
|
9331
|
+
}
|
|
9332
|
+
const result = await addColumn(ctx.projectRoot, boardId, { title });
|
|
9333
|
+
result ? ok(ws, type, result.board.columns) : fail(ws, type, `Board not found: ${boardId}`);
|
|
9334
|
+
return true;
|
|
9335
|
+
}
|
|
9336
|
+
case "kanban.column.remove": {
|
|
9337
|
+
const boardId = payload?.boardId;
|
|
9338
|
+
const columnId = payload?.columnId;
|
|
9339
|
+
if (!boardId || !columnId) {
|
|
9340
|
+
fail(ws, type, "boardId and columnId required");
|
|
9341
|
+
return true;
|
|
9342
|
+
}
|
|
9343
|
+
const board = await removeColumn(ctx.projectRoot, boardId, columnId, {
|
|
9344
|
+
moveTasksToColumnId: payload?.moveTasksToColumnId
|
|
9345
|
+
});
|
|
9346
|
+
board ? ok(ws, type, { removed: true }) : fail(ws, type, `Column not found: ${columnId}`);
|
|
9347
|
+
return true;
|
|
9348
|
+
}
|
|
9349
|
+
default:
|
|
9350
|
+
fail(ws, type, `Unknown kanban message type: ${type}`);
|
|
9351
|
+
return true;
|
|
9352
|
+
}
|
|
9353
|
+
} catch (err) {
|
|
9354
|
+
fail(ws, type, err instanceof Error ? err.message : String(err));
|
|
9355
|
+
return true;
|
|
9356
|
+
}
|
|
9357
|
+
}
|
|
9358
|
+
function findTask(tasks, taskId) {
|
|
9359
|
+
return tasks.find((task) => task.id === taskId || task.id.startsWith(taskId));
|
|
9360
|
+
}
|
|
9361
|
+
|
|
9063
9362
|
// src/server/mailbox-routes.ts
|
|
9064
9363
|
async function handleMailboxRoute(ws, msg, handlers) {
|
|
9065
9364
|
switch (msg.type) {
|
|
@@ -9544,6 +9843,7 @@ function createMessageDispatcher(opts) {
|
|
|
9544
9843
|
if (await handleSpecsRoute(ws, msg, routes.specsRoutes)) return;
|
|
9545
9844
|
if (await handleSddBoardRoute(ws, msg, routes.sddBoardRoutes)) return;
|
|
9546
9845
|
if (await handleSddWizardRoute(ws, msg, routes.sddWizardRoutes)) return;
|
|
9846
|
+
if (await handleKanbanRoute(ws, msg, { projectRoot: state.getProjectRoot() })) return;
|
|
9547
9847
|
if (msg.type.startsWith("worktree.") && await deps2.worktreeHandler.handleMessage(
|
|
9548
9848
|
msg
|
|
9549
9849
|
))
|
|
@@ -9558,7 +9858,10 @@ function createMessageDispatcher(opts) {
|
|
|
9558
9858
|
case "collab.resume":
|
|
9559
9859
|
case "collab.grant_control":
|
|
9560
9860
|
case "collab.inject_tool": {
|
|
9561
|
-
deps2.collabHandler.handleMessage(
|
|
9861
|
+
deps2.collabHandler.handleMessage(
|
|
9862
|
+
ws,
|
|
9863
|
+
msg
|
|
9864
|
+
);
|
|
9562
9865
|
return;
|
|
9563
9866
|
}
|
|
9564
9867
|
// Integrated terminal — interactive pty transport, bypasses the agent loop.
|
|
@@ -9586,7 +9889,10 @@ function createMessageDispatcher(opts) {
|
|
|
9586
9889
|
runLock.set(thisRun);
|
|
9587
9890
|
try {
|
|
9588
9891
|
const maxIt = typeof deps2.context.meta["maxIterations"] === "number" ? deps2.context.meta["maxIterations"] : void 0;
|
|
9589
|
-
const result = await deps2.agent.run(content, {
|
|
9892
|
+
const result = await deps2.agent.run(content, {
|
|
9893
|
+
signal: thisRun.signal,
|
|
9894
|
+
maxIterations: maxIt
|
|
9895
|
+
});
|
|
9590
9896
|
send(ws, {
|
|
9591
9897
|
type: "run.result",
|
|
9592
9898
|
payload: sessionPayload2({
|
|
@@ -9726,22 +10032,43 @@ function createMessageDispatcher(opts) {
|
|
|
9726
10032
|
break;
|
|
9727
10033
|
// Design Studio — shared handlers (design-handlers.ts).
|
|
9728
10034
|
case "design.list":
|
|
9729
|
-
await handleDesignList(ws, {
|
|
10035
|
+
await handleDesignList(ws, {
|
|
10036
|
+
projectRoot: state.getProjectRoot(),
|
|
10037
|
+
agentMeta: deps2.context
|
|
10038
|
+
});
|
|
9730
10039
|
break;
|
|
9731
10040
|
case "design.use":
|
|
9732
|
-
await handleDesignUse(
|
|
10041
|
+
await handleDesignUse(
|
|
10042
|
+
ws,
|
|
10043
|
+
{ projectRoot: state.getProjectRoot(), agentMeta: deps2.context },
|
|
10044
|
+
msg
|
|
10045
|
+
);
|
|
9733
10046
|
break;
|
|
9734
10047
|
case "design.state":
|
|
9735
|
-
await handleDesignState(ws, {
|
|
10048
|
+
await handleDesignState(ws, {
|
|
10049
|
+
projectRoot: state.getProjectRoot(),
|
|
10050
|
+
agentMeta: deps2.context
|
|
10051
|
+
});
|
|
9736
10052
|
break;
|
|
9737
10053
|
case "design.set":
|
|
9738
|
-
await handleDesignSet(
|
|
10054
|
+
await handleDesignSet(
|
|
10055
|
+
ws,
|
|
10056
|
+
{ projectRoot: state.getProjectRoot(), agentMeta: deps2.context },
|
|
10057
|
+
msg
|
|
10058
|
+
);
|
|
9739
10059
|
break;
|
|
9740
10060
|
case "design.materialize":
|
|
9741
|
-
await handleDesignMaterialize(
|
|
10061
|
+
await handleDesignMaterialize(
|
|
10062
|
+
ws,
|
|
10063
|
+
{ projectRoot: state.getProjectRoot(), agentMeta: deps2.context },
|
|
10064
|
+
msg
|
|
10065
|
+
);
|
|
9742
10066
|
break;
|
|
9743
10067
|
case "design.verify":
|
|
9744
|
-
await handleDesignVerify(ws, {
|
|
10068
|
+
await handleDesignVerify(ws, {
|
|
10069
|
+
projectRoot: state.getProjectRoot(),
|
|
10070
|
+
agentMeta: deps2.context
|
|
10071
|
+
});
|
|
9745
10072
|
break;
|
|
9746
10073
|
case "diag.get": {
|
|
9747
10074
|
if (!ensureCurrentSession(ws, msg, "diag.get")) return;
|
|
@@ -11934,6 +12261,11 @@ async function startWebUI(opts = {}) {
|
|
|
11934
12261
|
sessionStartPayload,
|
|
11935
12262
|
tokenCounter,
|
|
11936
12263
|
context,
|
|
12264
|
+
loadReplay: async () => {
|
|
12265
|
+
await session.flush().catch(() => void 0);
|
|
12266
|
+
const data = await sessionStore.load(session.id);
|
|
12267
|
+
return { messages: data.messages, usage: data.usage };
|
|
12268
|
+
},
|
|
11937
12269
|
clients,
|
|
11938
12270
|
pendingConfirms,
|
|
11939
12271
|
autoPhaseHandler,
|