@teamscala/service-boot 0.23.311 → 0.23.313

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 CHANGED
@@ -6,7 +6,7 @@
6
6
  },
7
7
  "name": "@teamscala/service-boot",
8
8
  "type": "module",
9
- "version": "0.23.311",
9
+ "version": "0.23.313",
10
10
  "sideEffects": false,
11
11
  "files": [
12
12
  "src"
@@ -2,6 +2,7 @@
2
2
  * @system service-boot
3
3
  * @status handwritten
4
4
  * @edit edit directly
5
+ * @indivisible-unit
5
6
  *
6
7
  * CLI-AGNOSTIC task-sync CORE — the bridge between a lane's native task list
7
8
  * (Claude Code TodoWrite, OpenCode todowrite, future CLIs) and the `work_items`
@@ -2,6 +2,7 @@
2
2
  * @system service-boot
3
3
  * @status handwritten
4
4
  * @edit edit directly
5
+ * @indivisible-unit
5
6
  *
6
7
  * CLI-AGNOSTIC task-sync CORE — the bridge between a lane's native task list
7
8
  * (Claude Code TodoWrite, OpenCode todowrite, future CLIs) and the `work_items`
@@ -442,6 +443,11 @@ export const taskSyncRouter = {
442
443
  const pane = raw.lane?.pane ?? headerPane;
443
444
  const headerSession = ctx.headers?.get("x-lane-session") ?? null;
444
445
  const session = raw.lane?.session ?? headerSession;
446
+ // parent_id via header: bindLane has no .input() schema so ORPC does not parse the body (headers are the reliable transport, same as pane/session) — body parent_id was always undefined, which is why adoption silently never happened.
447
+ const headerWorkItem = ctx.headers?.get("x-lane-work-item") ?? null;
448
+ // cli_kind via header for the same reason (body not parsed) — without it
449
+ // every adopting lane is mis-attributed as claude-code.
450
+ const headerWorkKind = ctx.headers?.get("x-lane-cli-kind") ?? null;
445
451
  if (!session) {
446
452
  const { ORPCError } = await import("@orpc/server");
447
453
  throw new ORPCError("BAD_REQUEST", {
@@ -451,7 +457,7 @@ export const taskSyncRouter = {
451
457
  const lane: LaneIdentity = {
452
458
  pane,
453
459
  session,
454
- cli_kind: raw.lane?.cli_kind ?? "claude-code",
460
+ cli_kind: (raw.lane?.cli_kind ?? headerWorkKind ?? "claude-code") as LaneIdentity["cli_kind"],
455
461
  role: raw.lane?.role ?? "agent",
456
462
  organisation_id: raw.lane?.organisation_id,
457
463
  };
@@ -495,7 +501,7 @@ export const taskSyncRouter = {
495
501
  // nothing. Falls through to create for an exploratory lane (no
496
502
  // workItemId) or a project parent (kind:"project"), so existing behaviour
497
503
  // is unchanged on those paths.
498
- const adopted = await adoptAssignmentTask(prisma, raw.parent_id, {
504
+ const adopted = await adoptAssignmentTask(prisma, raw.parent_id ?? headerWorkItem, {
499
505
  ...lane,
500
506
  session,
501
507
  });