castle-web-cli 0.4.125 → 0.4.126

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.
@@ -9,6 +9,7 @@ export interface PromptTask {
9
9
  status: string;
10
10
  progress: number;
11
11
  notes: string;
12
+ item?: string;
12
13
  error?: string;
13
14
  blockedBy?: string[];
14
15
  }
@@ -16,6 +17,62 @@ export interface PromptSibling {
16
17
  title: string;
17
18
  status: string;
18
19
  }
20
+ export interface RouterPlanOpts {
21
+ fileText?: string;
22
+ pendingDurables?: PlanNomination[];
23
+ finishedWork?: PlanFinishedWork[];
24
+ notices?: string[];
25
+ }
26
+ export interface PlanNomination {
27
+ taskId: string;
28
+ taskTitle: string;
29
+ text: string;
30
+ }
31
+ export interface PlanFinishedWork {
32
+ item: string;
33
+ what: string;
34
+ files?: string[];
35
+ knobs?: string[];
36
+ at?: string;
37
+ }
38
+ export interface TaskPlanOpts {
39
+ fileText?: string;
40
+ item?: string;
41
+ finishedWork?: PlanFinishedWork[];
42
+ }
43
+ export declare function truncateToBytes(line: string, budget: number): string;
44
+ export type PlanOpVerb = "decide" | "open" | "tried" | "now" | "identity";
45
+ export interface PlanOpSource {
46
+ kind: "user" | "task";
47
+ id?: string;
48
+ quote?: string;
49
+ }
50
+ export interface PlanOpSources {
51
+ taskReports?: Map<string, string>;
52
+ userMessages?: string[];
53
+ }
54
+ export interface PlanOp {
55
+ verb: PlanOpVerb;
56
+ remove: boolean;
57
+ label: string;
58
+ text: string;
59
+ source?: PlanOpSource;
60
+ }
61
+ export interface PlanOpParse {
62
+ ops: PlanOp[];
63
+ unparsed: string[];
64
+ }
65
+ export declare function quoteMatches(fragment: string, sourceText: string): boolean;
66
+ export declare function parsePlanOps(body: string): PlanOpParse;
67
+ export interface PlanOpsApplied {
68
+ text: string;
69
+ applied: number;
70
+ notices: string[];
71
+ }
72
+ export declare function applyPlanOps(fileText: string, ops: PlanOp[], sources?: PlanOpSources): PlanOpsApplied;
73
+ export declare function renderPlanDigest(plan: RouterPlanOpts, tasks: PromptTask[]): string;
74
+ export declare function planOpenQuestionLines(fileText: string): string[];
75
+ export declare function renderTaskPlanSlice(fileText: string, item: string | undefined, finishedWork?: PlanFinishedWork[]): string;
19
76
  export declare function buildRouterPrompt(opts: {
20
77
  deckLabel: string;
21
78
  quickReference?: string;
@@ -23,6 +80,7 @@ export declare function buildRouterPrompt(opts: {
23
80
  deckContents?: string;
24
81
  messages: PromptMessage[];
25
82
  tasks: PromptTask[];
83
+ plan?: RouterPlanOpts;
26
84
  instruction: string;
27
85
  }): string;
28
86
  export declare function userTurnInstruction(opts: {
@@ -37,11 +95,13 @@ export declare function buildTaskPrompt(opts: {
37
95
  prompt: string;
38
96
  progressPath: string;
39
97
  notesPath: string;
98
+ handoffPath: string;
40
99
  depsSummary?: string;
41
100
  backend?: "cursor" | "claude" | "smith";
42
101
  deckTree?: string;
43
102
  deckContents?: string;
44
103
  quickReference?: string;
45
104
  siblings?: PromptSibling[];
105
+ plan?: TaskPlanOpts;
46
106
  }): string;
47
107
  export declare const CLAUDE_TASK_SYSTEM_REMINDER = "Castle background task agent: work autonomously to completion -- never pause to ask questions or wait for confirmation; finish the task end-to-end, then stop. Prefer the quickest viable change that fully does the job.";