@sideboard-ai/core 0.1.156 → 0.1.158

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.
Files changed (32) hide show
  1. package/dist/{abletime-JSTJLXAW.js → abletime-BEIDJG7W.js} +5 -1
  2. package/dist/{abletime-H7LPGIP2.js → abletime-GWZE6OYM.js} +5 -1
  3. package/dist/{agents-IY4CSPWV.js → agents-E3ZPWZRS.js} +2 -2
  4. package/dist/{agents-2FTZAXO3.js → agents-RGE7PSUY.js} +4 -4
  5. package/dist/{chunk-TI6UMRWK.js → chunk-3SUZMPGL.js} +5 -4
  6. package/dist/{chunk-NVXVEGGM.js → chunk-5U4NZLBH.js} +4 -0
  7. package/dist/{chunk-CJQLPPEJ.js → chunk-A7QXLYBN.js} +1 -1
  8. package/dist/{chunk-XLU7DXHH.js → chunk-BLRHO7XQ.js} +54 -5
  9. package/dist/{chunk-MSFPM5VK.js → chunk-CVR4RJ6G.js} +3 -2
  10. package/dist/{chunk-JOK4XWBG.js → chunk-DVJBO3M7.js} +87 -3
  11. package/dist/{chunk-UA3YZKRX.js → chunk-EPQIOAAY.js} +25 -5
  12. package/dist/{chunk-OLE2BLIX.js → chunk-FBFIOVDH.js} +457 -106
  13. package/dist/{chunk-2SDMENAL.js → chunk-JV4VNFMS.js} +1 -1
  14. package/dist/{chunk-7EIPEPAH.js → chunk-KYKNFJK5.js} +484 -105
  15. package/dist/{chunk-FDCFXMDG.js → chunk-N27GVFZY.js} +87 -3
  16. package/dist/{coordinator-prompt-D2FHU5IZ.js → coordinator-prompt-26IJU2AV.js} +1 -1
  17. package/dist/{coordinator-prompt-UZDNIVP7.js → coordinator-prompt-GZESIQNH.js} +3 -3
  18. package/dist/{global-workspace-5WZVSWNT.js → global-workspace-5BIW26YR.js} +1 -1
  19. package/dist/{global-workspace-MR75BDBY.js → global-workspace-REI55FZ6.js} +3 -3
  20. package/dist/index.cjs +1405 -560
  21. package/dist/index.d.cts +138 -4
  22. package/dist/index.d.ts +138 -4
  23. package/dist/index.js +609 -274
  24. package/dist/mcp/run-stdio.cjs +1253 -500
  25. package/dist/mcp/run-stdio.js +525 -226
  26. package/dist/{orchestrator-LXO2CDOG.js → orchestrator-J727WIJY.js} +6 -6
  27. package/dist/{orchestrator-G4WKJG5Y.js → orchestrator-ZVW2AC6B.js} +3 -3
  28. package/dist/{plan-file-OZEBFSGQ.js → plan-file-I24VJVP2.js} +2 -2
  29. package/dist/{workspaces-RP32AW6X.js → workspaces-NYSM2EPX.js} +1 -1
  30. package/dist/{workspaces-HO4EQNNM.js → workspaces-OCEPZXFD.js} +3 -3
  31. package/dist/{worktree-PEWDAX5O.js → worktree-VTMBZKY6.js} +2 -2
  32. package/package.json +1 -1
@@ -226,6 +226,27 @@ function labelsOf(record) {
226
226
  return rec ? firstString(rec, ["name", "title", "label"]) : "";
227
227
  }).filter(Boolean);
228
228
  }
229
+ function commentsOf(record) {
230
+ const raw = record.comments ?? record.notes ?? record.discussion;
231
+ const out = [];
232
+ for (const item of asList(raw)) {
233
+ const rec = asRecord2(item);
234
+ if (!rec) continue;
235
+ const body = firstString(rec, ["body", "text", "comment", "content", "message"]);
236
+ if (!body) continue;
237
+ const user = firstString(asRecord2(rec.user) ?? asRecord2(rec.author), ["name", "display_name"]) || firstString(rec, ["user_name", "author"]);
238
+ const comment = { body };
239
+ const id = firstString(rec, ["id", "comment_id"]);
240
+ if (id) comment.id = id;
241
+ const url = firstString(rec, ["url", "permalink"]);
242
+ if (url) comment.url = url;
243
+ const createdAt = firstString(rec, ["created_at", "createdAt", "created"]);
244
+ if (createdAt) comment.createdAt = createdAt;
245
+ if (user) comment.user = user;
246
+ out.push(comment);
247
+ }
248
+ return out;
249
+ }
229
250
  function assigneeOf(record) {
230
251
  const nested = firstRecord(record, ["assignee", "assigned_to", "user", "owner"]);
231
252
  const name = firstString(nested, ["name", "display_name", "full_name", "email"]) || firstString(record, ["assignee_name", "assigneeName"]);
@@ -259,7 +280,8 @@ function mapAbleTimeTask(raw, host) {
259
280
  projectId: firstString(nested, ["project_id", "projectId"]) || firstString(asRecord2(nested.project), ["id"]) || void 0,
260
281
  categoryId: firstString(nested, ["category_id", "categoryId"]) || firstString(asRecord2(nested.category), ["id"]) || void 0,
261
282
  assignee: assigneeOf(nested),
262
- labels: labelsOf(nested)
283
+ labels: labelsOf(nested),
284
+ comments: commentsOf(nested)
263
285
  };
264
286
  }
265
287
  function toAbleTimeIssueInfo(task) {
@@ -352,16 +374,24 @@ async function createAbleTimeTask(input, opts) {
352
374
  if (!title) throw new Error("AbleTime task title is required");
353
375
  const project = await resolveAbleTimeProject(input.projectId, opts);
354
376
  const category = resolveAbleTimeCategory(project, input.categoryId);
377
+ const parent = input.parent?.trim();
378
+ const descriptionParts = [
379
+ parent ? `Spin-off of ${parent}.` : null,
380
+ input.description?.trim() || null
381
+ ].filter(Boolean);
355
382
  const raw = await callAbleTimeTool(
356
383
  "create_task",
357
384
  {
358
385
  title,
359
- description: input.description?.trim() || void 0,
386
+ description: descriptionParts.join("\n\n") || void 0,
360
387
  state: input.state ?? "todo",
361
388
  project: project.id,
362
389
  project_id: project.id,
363
390
  category: category?.id,
364
- category_id: category?.id
391
+ category_id: category?.id,
392
+ parent,
393
+ parent_id: parent,
394
+ related_task_id: parent
365
395
  },
366
396
  opts
367
397
  );
@@ -369,6 +399,58 @@ async function createAbleTimeTask(input, opts) {
369
399
  if (!task) throw new Error("AbleTime create_task returned no task");
370
400
  return task;
371
401
  }
402
+ async function commentAbleTimeTask(input, opts) {
403
+ const id = input.id.trim();
404
+ const body = input.body.trim();
405
+ if (!id) throw new Error("AbleTime task id is required");
406
+ if (!body) throw new Error("AbleTime comment body is required");
407
+ const raw = await callAbleTimeTool(
408
+ "create_comment",
409
+ { id, task_id: id, task: id, body, comment: body, text: body },
410
+ opts
411
+ );
412
+ const rec = asRecord2(raw);
413
+ return {
414
+ id: rec ? firstString(rec, ["id", "comment_id"]) || void 0 : void 0,
415
+ body: rec ? firstString(rec, ["body", "text", "comment"]) || body : body
416
+ };
417
+ }
418
+ async function updateAbleTimeTask(input, opts) {
419
+ const id = input.id.trim();
420
+ if (!id) throw new Error("AbleTime task id is required");
421
+ const title = input.title?.trim();
422
+ const description = input.description;
423
+ const state = input.state?.trim();
424
+ if (!title && description === void 0 && !state) {
425
+ throw new Error("abletime_update_task needs at least one of title, description, state");
426
+ }
427
+ if (state) {
428
+ await callAbleTimeTool(
429
+ "set_task_state",
430
+ { id, task_id: id, task: id, state },
431
+ opts
432
+ ).catch(async () => {
433
+ await callAbleTimeTool(
434
+ "update_task",
435
+ { id, task_id: id, title, description, state },
436
+ opts
437
+ );
438
+ });
439
+ }
440
+ if (title || description !== void 0) {
441
+ await callAbleTimeTool(
442
+ "update_task",
443
+ {
444
+ id,
445
+ task_id: id,
446
+ ...title ? { title } : {},
447
+ ...description !== void 0 ? { description } : {}
448
+ },
449
+ opts
450
+ );
451
+ }
452
+ return getAbleTimeTask(id, opts);
453
+ }
372
454
  async function resolveAbleTimeProject(projectId, opts) {
373
455
  const wanted = projectId?.trim().toLowerCase();
374
456
  const fromOrientation = (await getAbleTimeOrientation(opts).catch(() => null))?.projects ?? [];
@@ -457,6 +539,8 @@ export {
457
539
  searchAbleTimeTasks,
458
540
  getAbleTimeTask,
459
541
  createAbleTimeTask,
542
+ commentAbleTimeTask,
543
+ updateAbleTimeTask,
460
544
  ensureAbleTimeTask,
461
545
  listAbleTimeAssignedIssues,
462
546
  verifyAbleTimeConnection
@@ -7,7 +7,7 @@ import {
7
7
  enrichWorkspacesWithGithub,
8
8
  ensureGlobalCoordinatorCwd,
9
9
  formatWorkspaceInventory
10
- } from "./chunk-MSFPM5VK.js";
10
+ } from "./chunk-CVR4RJ6G.js";
11
11
  import "./chunk-LQMFCS54.js";
12
12
  import "./chunk-JRH62XC4.js";
13
13
  import "./chunk-3BWVOUQG.js";
@@ -9,9 +9,9 @@ import {
9
9
  enrichWorkspacesWithGithub,
10
10
  ensureGlobalCoordinatorCwd,
11
11
  formatWorkspaceInventory
12
- } from "./chunk-TI6UMRWK.js";
13
- import "./chunk-CJQLPPEJ.js";
14
- import "./chunk-NVXVEGGM.js";
12
+ } from "./chunk-3SUZMPGL.js";
13
+ import "./chunk-A7QXLYBN.js";
14
+ import "./chunk-5U4NZLBH.js";
15
15
  import "./chunk-LZQULFIT.js";
16
16
  import "./chunk-SYFVUF2C.js";
17
17
  import "./chunk-FNQNJOHY.js";
@@ -15,7 +15,7 @@ import {
15
15
  orchestratorSessionPoisonedByBuiltins,
16
16
  slackCoordinatorSourceRef,
17
17
  takenTeamSlugsForOrchestration
18
- } from "./chunk-MSFPM5VK.js";
18
+ } from "./chunk-CVR4RJ6G.js";
19
19
  import "./chunk-LQMFCS54.js";
20
20
  import "./chunk-JRH62XC4.js";
21
21
  import "./chunk-3BWVOUQG.js";
@@ -17,9 +17,9 @@ import {
17
17
  orchestratorSessionPoisonedByBuiltins,
18
18
  slackCoordinatorSourceRef,
19
19
  takenTeamSlugsForOrchestration
20
- } from "./chunk-TI6UMRWK.js";
21
- import "./chunk-CJQLPPEJ.js";
22
- import "./chunk-NVXVEGGM.js";
20
+ } from "./chunk-3SUZMPGL.js";
21
+ import "./chunk-A7QXLYBN.js";
22
+ import "./chunk-5U4NZLBH.js";
23
23
  import "./chunk-LZQULFIT.js";
24
24
  import "./chunk-SYFVUF2C.js";
25
25
  import "./chunk-FNQNJOHY.js";