kantban-cli 0.1.12 → 0.1.13

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.
@@ -720,7 +720,7 @@ var PromoteSignalSchema = z19.object({
720
720
 
721
721
  // ../types/dist/pipeline-session.schema.js
722
722
  import { z as z20 } from "zod";
723
- var InvocationTypeSchema = z20.enum(["heavy", "light", "advisor", "stuck_detection", "orchestrator"]);
723
+ var InvocationTypeSchema = z20.enum(["heavy", "light", "advisor", "stuck_detection", "orchestrator", "replanner"]);
724
724
  var ExitReasonSchema = z20.enum(["moved", "stalled", "error", "max_iterations", "stopped", "deleted"]);
725
725
  var PipelineSessionSchema = z20.object({
726
726
  id: z20.string().uuid(),
@@ -3284,6 +3284,8 @@ var PROMPT_BUDGETS = {
3284
3284
  ticket_details: 1500,
3285
3285
  comments: 2e3,
3286
3286
  transition_rules: 500,
3287
+ transition_history: 1e3,
3288
+ dependency_requirements: 500,
3287
3289
  linked_documents: 2e3,
3288
3290
  metadata: 200
3289
3291
  };
@@ -3467,91 +3469,92 @@ After completing your work, commit all changes to your worktree branch.
3467
3469
  `);
3468
3470
  parts.push(truncateToTokens(meta.runMemoryContent, PROMPT_BUDGETS.run_memory));
3469
3471
  }
3470
- parts.push(`## Current Ticket
3472
+ const ticketParts = [];
3473
+ ticketParts.push(`## Current Ticket
3471
3474
  `);
3472
- parts.push(`**Title:** ${ticketContext.ticket.title}`);
3473
- parts.push(`**Ticket ID:** ${ticketContext.ticket.id}`);
3474
- parts.push(`**Ticket Number:** ${String(ticketContext.ticket.ticket_number)}`);
3475
+ ticketParts.push(`**Title:** ${ticketContext.ticket.title}`);
3476
+ ticketParts.push(`**Ticket ID:** ${ticketContext.ticket.id}`);
3477
+ ticketParts.push(`**Ticket Number:** ${String(ticketContext.ticket.ticket_number)}`);
3475
3478
  if (ticketContext.ticket.description) {
3476
- parts.push(`
3477
- ${truncateToTokens(ticketContext.ticket.description, PROMPT_BUDGETS.ticket_details)}`);
3479
+ ticketParts.push(`
3480
+ ${ticketContext.ticket.description}`);
3478
3481
  }
3479
3482
  if (ticketContext.ticket.assignee) {
3480
- parts.push(`**Assignee:** ${ticketContext.ticket.assignee.name}`);
3483
+ ticketParts.push(`**Assignee:** ${ticketContext.ticket.assignee.name}`);
3481
3484
  }
3482
3485
  if (ticketContext.ticket.column) {
3483
- parts.push(`**Current Column:** ${ticketContext.ticket.column.name} (${ticketContext.ticket.column.type})`);
3486
+ ticketParts.push(`**Current Column:** ${ticketContext.ticket.column.name} (${ticketContext.ticket.column.type})`);
3484
3487
  }
3485
3488
  if (ticketContext.ticket.backward_transitions > 0) {
3486
- parts.push(`**Backward Transitions:** ${String(ticketContext.ticket.backward_transitions)}`);
3489
+ ticketParts.push(`**Backward Transitions:** ${String(ticketContext.ticket.backward_transitions)}`);
3487
3490
  }
3488
3491
  if (ticketContext.field_values.length > 0) {
3489
- parts.push(`
3492
+ ticketParts.push(`
3490
3493
  ## Field Values
3491
3494
  `);
3492
3495
  for (const fv of ticketContext.field_values) {
3493
- parts.push(`- **${fv.field_name}:** ${fv.value !== null ? JSON.stringify(fv.value) : "(not set)"}`);
3496
+ ticketParts.push(`- **${fv.field_name}:** ${fv.value !== null ? JSON.stringify(fv.value) : "(not set)"}`);
3494
3497
  }
3495
3498
  }
3496
3499
  if (ticketContext.parent) {
3497
- parts.push(`
3500
+ ticketParts.push(`
3498
3501
  ## Parent Ticket
3499
3502
  `);
3500
- parts.push(`- #${String(ticketContext.parent.ticket_number)}: ${ticketContext.parent.title}`);
3503
+ ticketParts.push(`- #${String(ticketContext.parent.ticket_number)}: ${ticketContext.parent.title}`);
3501
3504
  }
3502
3505
  if (ticketContext.children.length > 0) {
3503
- parts.push(`
3506
+ ticketParts.push(`
3504
3507
  ## Child Tickets
3505
3508
  `);
3506
3509
  for (const child of ticketContext.children) {
3507
- parts.push(`- #${String(child.ticket_number)}: ${child.title}${child.column_name ? ` (${child.column_name})` : ""}`);
3510
+ ticketParts.push(`- #${String(child.ticket_number)}: ${child.title}${child.column_name ? ` (${child.column_name})` : ""}`);
3508
3511
  }
3509
3512
  }
3510
3513
  if (ticketContext.transitions.length > 0) {
3511
- parts.push(`
3514
+ ticketParts.push(`
3512
3515
  ## Transition History
3513
3516
  `);
3514
3517
  let transitionTokens = 0;
3515
- const TRANSITION_BUDGET = 1e3;
3516
3518
  for (const t of ticketContext.transitions) {
3517
3519
  let line = `- ${t.from ?? "Backlog"} \u2192 ${t.to}`;
3518
3520
  if (t.handoff) line += ` (handoff: ${JSON.stringify(t.handoff)})`;
3519
3521
  const lineTokens = estimateTokens(line);
3520
- if (transitionTokens + lineTokens > TRANSITION_BUDGET) {
3521
- parts.push(`- [...truncated \u2014 ${String(ticketContext.transitions.length)} total transitions]`);
3522
+ if (transitionTokens + lineTokens > PROMPT_BUDGETS.transition_history) {
3523
+ ticketParts.push(`- [...truncated \u2014 ${String(ticketContext.transitions.length)} total transitions]`);
3522
3524
  break;
3523
3525
  }
3524
- parts.push(line);
3526
+ ticketParts.push(line);
3525
3527
  transitionTokens += lineTokens;
3526
3528
  }
3527
3529
  }
3528
3530
  if (ticketContext.ticket_links.length > 0) {
3529
- parts.push(`
3531
+ ticketParts.push(`
3530
3532
  ## Ticket Links
3531
3533
  `);
3532
3534
  const blockers = ticketContext.ticket_links.filter((l) => l.direction === "inward" && l.link_type === "blocks");
3533
3535
  const blocking = ticketContext.ticket_links.filter((l) => l.direction === "outward" && l.link_type === "blocks");
3534
3536
  const related = ticketContext.ticket_links.filter((l) => l.link_type === "relates_to");
3535
3537
  if (blockers.length > 0) {
3536
- parts.push(`**Blocked by:**`);
3538
+ ticketParts.push(`**Blocked by:**`);
3537
3539
  for (const l of blockers) {
3538
3540
  const status = l.resolved ? "(resolved)" : "UNRESOLVED";
3539
- parts.push(`- #${String(l.ticket_number)}: ${l.title} [${l.column_name ?? "backlog"}] ${status}`);
3541
+ ticketParts.push(`- #${String(l.ticket_number)}: ${l.title} [${l.column_name ?? "backlog"}] ${status}`);
3540
3542
  }
3541
3543
  }
3542
3544
  if (blocking.length > 0) {
3543
- parts.push(`**Blocks:**`);
3545
+ ticketParts.push(`**Blocks:**`);
3544
3546
  for (const l of blocking) {
3545
- parts.push(`- #${String(l.ticket_number)}: ${l.title} [${l.column_name ?? "backlog"}]`);
3547
+ ticketParts.push(`- #${String(l.ticket_number)}: ${l.title} [${l.column_name ?? "backlog"}]`);
3546
3548
  }
3547
3549
  }
3548
3550
  if (related.length > 0) {
3549
- parts.push(`**Related:**`);
3551
+ ticketParts.push(`**Related:**`);
3550
3552
  for (const l of related) {
3551
- parts.push(`- #${String(l.ticket_number)}: ${l.title}`);
3553
+ ticketParts.push(`- #${String(l.ticket_number)}: ${l.title}`);
3552
3554
  }
3553
3555
  }
3554
3556
  }
3557
+ parts.push(truncateToTokens(ticketParts.join("\n"), PROMPT_BUDGETS.ticket_details));
3555
3558
  if (ticketContext.comments.length > 0) {
3556
3559
  parts.push(`
3557
3560
  ## Comments
@@ -3568,7 +3571,7 @@ ${truncateToTokens(ticketContext.ticket.description, PROMPT_BUDGETS.ticket_detai
3568
3571
  parts.push(`
3569
3572
  ## Dependency & Field Requirements
3570
3573
  `);
3571
- parts.push(ticketContext.dependency_requirements);
3574
+ parts.push(truncateToTokens(ticketContext.dependency_requirements, PROMPT_BUDGETS.dependency_requirements));
3572
3575
  }
3573
3576
  if (ticketContext.linked_documents.length > 0) {
3574
3577
  parts.push(`
@@ -4057,4 +4060,4 @@ export {
4057
4060
  generateGateProxyMcpConfig,
4058
4061
  cleanupGateProxyConfigs
4059
4062
  };
4060
- //# sourceMappingURL=chunk-MTPUHYZV.js.map
4063
+ //# sourceMappingURL=chunk-FKIFDPKK.js.map