dsh-taskboard 0.5.2 → 0.5.4

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.
@@ -378,6 +378,8 @@ export type ExecutionRecord = {
378
378
  export type TaskModel = {
379
379
  provider: string
380
380
  model: string
381
+ /** Thinking intensity / reasoning effort (optional; e.g. 'low', 'medium', 'high', 'none'). */
382
+ reasoningEffort?: string
381
383
  }
382
384
 
383
385
  /** One task on the board. */
@@ -385,7 +387,7 @@ export type TaskRecord = {
385
387
  id: string
386
388
  title: string
387
389
  description: string
388
- /** The prompt sent to a fresh session on execution; falls back to title+description. */
390
+ /** Extra execution prompt; the execution session receives title+description+prompt. */
389
391
  prompt: string
390
392
  /** Owning project: a DSH workspace id. */
391
393
  workspaceId: string
@@ -598,13 +600,14 @@ export function normalizeExecution(
598
600
  }
599
601
 
600
602
  /**
601
- * The effective prompt of a task: explicit prompt, or title+description.
603
+ * The effective prompt of a task: title+description, with the explicit
604
+ * prompt appended when set — title+description+prompt.
602
605
  * @param task - the task.
603
606
  */
604
607
  export function effectivePrompt(task: TaskRecord): string {
605
- if (task.prompt.length > 0) return task.prompt
606
608
  const head = task.title
607
- return task.description.length > 0 ? `${head}\n\n${task.description}` : head
609
+ const body = task.description.length > 0 ? `${head}\n\n${task.description}` : head
610
+ return task.prompt.length > 0 ? `${body}\n\n${task.prompt}` : body
608
611
  }
609
612
 
610
613
  /**
@@ -637,8 +640,8 @@ export function syncClaim(task: TaskRecord, to: TaskStatus, now: number, holder?
637
640
  }
638
641
 
639
642
  /**
640
- * Validate and normalize a pinned model: `{ provider, model }`, both
641
- * non-empty trimmed strings.
643
+ * Validate and normalize a pinned model: `{ provider, model, reasoningEffort? }`,
644
+ * provider and model must be non-empty trimmed strings.
642
645
  * @param raw - the raw input.
643
646
  * @returns the normalized model.
644
647
  * @throws when the shape or the fields are invalid.
@@ -647,7 +650,7 @@ export function normalizeModel(raw: unknown): TaskModel {
647
650
  if (typeof raw !== 'object' || raw === null) {
648
651
  throw new Error('model must be { provider: string, model: string }')
649
652
  }
650
- const { provider, model } = raw as { provider?: unknown; model?: unknown }
653
+ const { provider, model, reasoningEffort } = raw as { provider?: unknown; model?: unknown; reasoningEffort?: unknown }
651
654
  if (typeof provider !== 'string' || typeof model !== 'string') {
652
655
  throw new Error('model must be { provider: string, model: string }')
653
656
  }
@@ -656,7 +659,8 @@ export function normalizeModel(raw: unknown): TaskModel {
656
659
  if (p.length === 0 || m.length === 0) {
657
660
  throw new Error('model.provider and model.model must be non-empty strings')
658
661
  }
659
- return { provider: p, model: m }
662
+ const eff = typeof reasoningEffort === 'string' && reasoningEffort.trim().length > 0 ? reasoningEffort.trim() : undefined
663
+ return { provider: p, model: m, ...(eff !== undefined ? { reasoningEffort: eff } : {}) }
660
664
  }
661
665
 
662
666
  // ---------------------------------------------------------------------------
@@ -6,4 +6,4 @@
6
6
  */
7
7
 
8
8
  /** The package version (must equal package.json "version"). */
9
- export const PLUGIN_VERSION = '0.5.2'
9
+ export const PLUGIN_VERSION = '0.5.4'