@wrongstack/tools 0.302.2 → 0.305.0

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 (44) hide show
  1. package/dist/builtin.d.ts +6 -0
  2. package/dist/builtin.js +3213 -686
  3. package/dist/codebase-index/binary-frame.d.ts +43 -0
  4. package/dist/codebase-index/codebase-incoming-calls-tool.d.ts +1 -0
  5. package/dist/codebase-index/codebase-index-tool.d.ts +6 -0
  6. package/dist/codebase-index/codebase-outgoing-calls-tool.d.ts +1 -0
  7. package/dist/codebase-index/content-hash.d.ts +66 -0
  8. package/dist/codebase-index/index.js +1597 -153
  9. package/dist/codebase-index/indexer.d.ts +6 -0
  10. package/dist/codebase-index/parser-worker-pool.d.ts +63 -0
  11. package/dist/codebase-index/parser-worker-script.d.ts +42 -0
  12. package/dist/codebase-index/project-server-protocol.d.ts +2 -0
  13. package/dist/codebase-index/project-server.js +1483 -104
  14. package/dist/codebase-index/schema.d.ts +18 -0
  15. package/dist/codebase-index/tree-sitter/queries.d.ts +48 -0
  16. package/dist/codebase-index/tree-sitter/util.d.ts +31 -0
  17. package/dist/codebase-index/tree-sitter/visitor.d.ts +47 -0
  18. package/dist/codebase-index/tree-sitter-parser.d.ts +58 -0
  19. package/dist/codebase-index/vector-search.d.ts +62 -0
  20. package/dist/codebase-index/worker-protocol.d.ts +2 -0
  21. package/dist/codebase-index/worker.js +1452 -73
  22. package/dist/codebase-index/writer-bulk-insert.d.ts +5 -0
  23. package/dist/codebase-index/writer-graph-reader.d.ts +39 -0
  24. package/dist/codebase-index/writer-schema.d.ts +9 -2
  25. package/dist/codebase-index/writer.d.ts +36 -0
  26. package/dist/index.d.ts +4 -3
  27. package/dist/index.js +3258 -727
  28. package/dist/kanban-contract-actions.d.ts +7 -0
  29. package/dist/kanban-task-inputs.d.ts +16 -2
  30. package/dist/kanban-tool-schema.d.ts +2 -2
  31. package/dist/kanban-tool-types.d.ts +39 -2
  32. package/dist/kanban.js +580 -193
  33. package/dist/pack.js +3212 -686
  34. package/dist/plan.d.ts +4 -1
  35. package/dist/plan.js +2701 -18
  36. package/dist/read.js +1559 -103
  37. package/dist/session-kanban.d.ts +94 -1
  38. package/dist/session-kanban.js +308 -44
  39. package/dist/task.d.ts +5 -4
  40. package/dist/task.js +2825 -138
  41. package/dist/todo.d.ts +10 -1
  42. package/dist/todo.js +2474 -30
  43. package/dist/tool-tier.js +3212 -686
  44. package/package.json +8 -4
@@ -0,0 +1,7 @@
1
+ import type { KanbanToolInput, KanbanToolOutput } from './kanban-tool-types.js';
2
+ /**
3
+ * Handle a contract-map action, or return `undefined` when the action belongs
4
+ * to another handler. Mirrors the shape of `handleKanbanDetailAction`.
5
+ */
6
+ export declare function handleKanbanContractAction(projectRoot: string, input: KanbanToolInput, actor: string | undefined): Promise<KanbanToolOutput | undefined>;
7
+ //# sourceMappingURL=kanban-contract-actions.d.ts.map
@@ -18,12 +18,14 @@ export declare function taskInput(input: KanbanToolInput): {
18
18
  order?: number;
19
19
  retryPolicy?: "exponential" | "incremental" | "off";
20
20
  costCeilingUsd?: number;
21
+ atomic?: boolean;
21
22
  childTaskIds?: string[];
22
23
  successCriteria?: {
23
24
  id: `${string}-${string}-${string}-${string}-${string}`;
24
25
  description: string;
25
- type: 'manual';
26
+ type: "command" | "file_exists" | "file_matches" | "git_diff" | "manual" | "metric" | "test";
26
27
  status: "failed" | "passed" | "pending" | "skipped";
28
+ notes?: string;
27
29
  }[];
28
30
  goalMetrics?: {
29
31
  id: `${string}-${string}-${string}-${string}-${string}`;
@@ -49,10 +51,20 @@ export declare function taskInput(input: KanbanToolInput): {
49
51
  system: string;
50
52
  graphId?: string;
51
53
  specId?: string;
54
+ specRequirementId?: string;
52
55
  phaseId?: string;
53
56
  };
54
57
  };
55
- /** Union of the single `dependencyTaskId` and the multi `dependsOn[]` inputs. */
58
+ /**
59
+ * Union of the single `dependencyTaskId` and the multi `dependsOn[]` inputs.
60
+ *
61
+ * Returns `undefined` only when neither was supplied, so an explicit
62
+ * `dependsOn: []` CLEARS the list instead of being silently ignored. It used to
63
+ * collapse empty to `undefined`, which meant a dependency added by mistake
64
+ * could never be taken back from the tool surface: `dependency-incomplete`
65
+ * then held the card out of Running for good, and the only escapes were
66
+ * finishing work nobody wanted or deleting the blocking card outright.
67
+ */
56
68
  export declare function mergedDependsOn(input: KanbanToolInput): string[] | undefined;
57
69
  export declare function taskPatch(input: KanbanToolInput): {
58
70
  title: string | undefined;
@@ -66,6 +78,8 @@ export declare function taskPatch(input: KanbanToolInput): {
66
78
  labels: string[] | undefined;
67
79
  assignedAgent: string | undefined;
68
80
  dependsOn?: string[] | undefined;
81
+ atomic?: boolean;
82
+ childTaskIds?: string[];
69
83
  estimatedHours?: number;
70
84
  actualHours?: number;
71
85
  };
@@ -1,5 +1,5 @@
1
1
  import type { JSONSchema } from '@wrongstack/core/types';
2
- export declare const KANBAN_TOOL_DESCRIPTION = "Manage and audit project-scoped multi-kanban boards through the shared IPC Kanban server and its SQLite store. Managed cards enforce fully specified details and adjacent Backlog \u2192 Todo \u2192 Running \u2192 Review \u2192 Done transitions with persistent comments and evidence. Successful board access records live agent/session presence. Use verify_completion to validate a task against its success criteria and persist the verification report. Use split_atomic to split a task into child tasks with parent.atomic=true in a single atomic board mutation, enforcing subtree verification before the parent can complete.";
3
- export declare const KANBAN_TOOL_USAGE_HINT = "Use this for durable project kanban state. Reassess with get_board whenever evidence changes; agents may add, update, split, merge, reprioritize, or remove tasks so the board remains a live plan. Presence includes active/last-seen session and agent metadata. For managed boards, fully fill card details, use transition_task after every material step, attach truthful evidence, and never use update_task/move_task to bypass lifecycle guards. Worker completion enters Review; only passed acceptance criteria plus review evidence allow Done. Use verify_completion to generate a verification report (persisted automatically) and split_atomic to atomically create child subtasks with the atomic flag pre-set.";
2
+ export declare const KANBAN_TOOL_DESCRIPTION = "Durable project task boards: create and move cards, record checks, notes, links and assignments. The board is a record of the work, not a permit for it \u2014 nothing here gates other tools. Managed boards additionally enforce ordered Backlog \u2192 Todo \u2192 Running \u2192 Review \u2192 Done transitions; release_managed_lifecycle turns that off.";
3
+ export declare const KANBAN_TOOL_USAGE_HINT = "Track substantial or multi-step work so it survives the session; a trivial edit or a question needs no card. Work stays on ONE board: call list_boards first and add_task to the board this project already uses. create_board is for a genuinely separate line of work, not for each new piece of it \u2014 a second board splits the same effort in two, and a board holding a single card is the usual sign. Common flow: list_boards or search_tasks to orient, add_task to record work, start_task when you begin, update_check with checkStatus \"passed\" to tick acceptance criteria (read their ids from get_task), then transition_task. On a managed board a refused transition names the field it wants \u2014 supply it and retry. When the acceptance criterion is something a machine can run, say so: set checkType (\"command\", \"test\", \"file_exists\", \"file_matches\", \"git_diff\", \"metric\") and put the command, pattern or path in checkNotes, then verify_completion executes it and the result is real evidence. Leave checkType off (or \"manual\") only for criteria that genuinely need a human eye \u2014 a manual check records your assertion, it does not test anything.";
4
4
  export declare const KANBAN_INPUT_SCHEMA: JSONSchema;
5
5
  //# sourceMappingURL=kanban-tool-schema.d.ts.map
@@ -1,6 +1,6 @@
1
1
  import type { SerializedTaskGraph } from '@wrongstack/core/types';
2
- import type { AssignKanbanTaskInput, KanbanAgentRunStatus, KanbanBoard, KanbanBoardSummary, KanbanCompletionGateEnforcement, KanbanDecompositionSubtask, KanbanEvent, KanbanLifecycleStage, KanbanOrchestrationSnapshot, KanbanQueueHealth, KanbanSearchResult, KanbanTask, KanbanTaskPriority, KanbanTaskStatus, KanbanTaskType, KanbanVerificationReport } from '@wrongstack/kanban';
3
- export type KanbanAction = 'list_boards' | 'get_board' | 'create_board' | 'duplicate_board' | 'update_board' | 'adopt_managed_lifecycle' | 'delete_board' | 'generate_board' | 'export_markdown' | 'export_task_graph' | 'sync_task_graph' | 'create_from_graph' | 'import_session_tasks' | 'search_tasks' | 'ready_tasks' | 'snapshot' | 'add_column' | 'update_column' | 'delete_column' | 'add_task' | 'split_task' | 'merge_tasks' | 'copy_task' | 'transfer_task' | 'get_task' | 'update_task' | 'transition_task' | 'repair_managed_projection' | 'move_task' | 'delete_task' | 'set_chain' | 'get_chain' | 'claim_task' | 'release_task' | 'assign_task' | 'mark_assignment' | 'heartbeat_assignment' | 'recover_stale' | 'events' | 'queue_health' | 'add_dependency' | 'add_goal_metric' | 'update_goal_metric' | 'add_check' | 'update_check' | 'add_note' | 'add_link' | 'verify_completion' | 'split_atomic' | 'assess_atomicity' | 'propose_decomposition';
2
+ import type { AssignKanbanTaskInput, KanbanAgentRunStatus, KanbanBoard, KanbanBoardSummary, KanbanCompletionGateEnforcement, KanbanContractEdgeType, KanbanContractEnforcement, KanbanContractGraph, KanbanContractGraphEnforcement, KanbanContractGraphEvaluation, KanbanContractNodeKind, KanbanContractNodeState, KanbanDecompositionSubtask, KanbanEvent, KanbanLifecycleStage, KanbanOrchestrationSnapshot, KanbanQueueHealth, KanbanSearchResult, KanbanTask, KanbanTaskPriority, KanbanTaskStatus, KanbanTaskType, KanbanVerificationReport, KanbanWorkbenchSnapshot } from '@wrongstack/kanban';
3
+ export type KanbanAction = 'list_boards' | 'get_board' | 'create_board' | 'duplicate_board' | 'update_board' | 'adopt_managed_lifecycle' | 'release_managed_lifecycle' | 'delete_board' | 'generate_board' | 'export_markdown' | 'export_task_graph' | 'sync_task_graph' | 'create_from_graph' | 'import_session_tasks' | 'search_tasks' | 'ready_tasks' | 'snapshot' | 'workbench' | 'add_column' | 'update_column' | 'delete_column' | 'add_task' | 'split_task' | 'merge_tasks' | 'copy_task' | 'transfer_task' | 'get_task' | 'start_task' | 'update_task' | 'transition_task' | 'repair_managed_projection' | 'move_task' | 'delete_task' | 'set_chain' | 'get_chain' | 'claim_task' | 'release_task' | 'assign_task' | 'mark_assignment' | 'heartbeat_assignment' | 'recover_stale' | 'events' | 'queue_health' | 'add_dependency' | 'add_goal_metric' | 'update_goal_metric' | 'add_check' | 'update_check' | 'remove_check' | 'add_note' | 'add_link' | 'verify_completion' | 'split_atomic' | 'assess_atomicity' | 'propose_decomposition' | 'get_contract_graph' | 'configure_contract_graph' | 'upsert_contract_node' | 'remove_contract_node' | 'add_contract_edge' | 'remove_contract_edge';
4
4
  export interface KanbanToolInput extends Omit<AssignKanbanTaskInput, 'status'> {
5
5
  action: KanbanAction;
6
6
  boardId?: string | undefined;
@@ -9,6 +9,10 @@ export interface KanbanToolInput extends Omit<AssignKanbanTaskInput, 'status'> {
9
9
  targetBoardId?: string | undefined;
10
10
  taskIds?: string[] | undefined;
11
11
  chainId?: string | undefined;
12
+ fromNodeId?: string | undefined;
13
+ toNodeId?: string | undefined;
14
+ baseline?: string | number | undefined;
15
+ threshold?: string | number | undefined;
12
16
  title?: string | undefined;
13
17
  description?: string | undefined;
14
18
  dueDate?: string | undefined;
@@ -43,6 +47,30 @@ export interface KanbanToolInput extends Omit<AssignKanbanTaskInput, 'status'> {
43
47
  checkId?: string | undefined;
44
48
  checkDescription?: string | undefined;
45
49
  checkStatus?: 'pending' | 'passed' | 'failed' | 'skipped' | undefined;
50
+ /**
51
+ * Verifier type for an acceptance criterion. Narrower than `KanbanCheckType`
52
+ * on purpose: only the types the default deterministic registry can actually
53
+ * run are offered, so a criterion this tool creates never reports
54
+ * `skipped — no verifier plugin registered`.
55
+ */
56
+ checkType?: 'manual' | 'command' | 'test' | 'file_exists' | 'file_matches' | 'git_diff' | 'metric' | undefined;
57
+ /** Executable body for a non-manual `checkType`; plugins read it before the description. */
58
+ checkNotes?: string | undefined;
59
+ contractEnforcement?: KanbanContractGraphEnforcement | undefined;
60
+ contractNodeId?: string | undefined;
61
+ contractNodeKind?: KanbanContractNodeKind | undefined;
62
+ contractNodeTitle?: string | undefined;
63
+ contractNodeDescription?: string | undefined;
64
+ contractNodeState?: KanbanContractNodeState | undefined;
65
+ contractNodeEnforcement?: KanbanContractEnforcement | undefined;
66
+ contractCheckId?: string | undefined;
67
+ contractMetricId?: string | undefined;
68
+ contractWaiverReason?: string | undefined;
69
+ contractEdgeId?: string | undefined;
70
+ contractEdgeFrom?: string | undefined;
71
+ contractEdgeTo?: string | undefined;
72
+ contractEdgeType?: KanbanContractEdgeType | undefined;
73
+ contractEdgeRationale?: string | undefined;
46
74
  note?: string | undefined;
47
75
  author?: string | undefined;
48
76
  url?: string | undefined;
@@ -88,6 +116,7 @@ export interface KanbanToolInput extends Omit<AssignKanbanTaskInput, 'status'> {
88
116
  taskGraph?: unknown;
89
117
  graphId?: string | undefined;
90
118
  specId?: string | undefined;
119
+ specRequirementId?: string | undefined;
91
120
  sourceSystem?: string | undefined;
92
121
  phaseId?: string | undefined;
93
122
  preserveOriginTaskIds?: boolean | undefined;
@@ -95,7 +124,12 @@ export interface KanbanToolInput extends Omit<AssignKanbanTaskInput, 'status'> {
95
124
  archiveMissingTasks?: boolean | undefined;
96
125
  preserveManualDependencies?: boolean | undefined;
97
126
  /** Full dependency id list for add_task/update_task (superset of dependencyTaskId). */
127
+ /** `update_task`: an explicit `[]` clears every dependency. */
98
128
  dependsOn?: string[] | undefined;
129
+ /** `update_task`: mark a card a composite parent, or `false` to make it a leaf again. */
130
+ atomic?: boolean | undefined;
131
+ /** `update_task`: an explicit `[]` detaches every child from a composite parent. */
132
+ childTaskIds?: string[] | undefined;
99
133
  /** Estimated effort in hours for add_task/update_task. */
100
134
  estimatedHours?: number | undefined;
101
135
  /** Actual effort in hours for add_task/update_task. */
@@ -129,7 +163,10 @@ export interface KanbanToolOutput {
129
163
  children?: KanbanTask[] | undefined;
130
164
  chain?: KanbanTask[] | undefined;
131
165
  snapshot?: KanbanOrchestrationSnapshot | undefined;
166
+ workbench?: KanbanWorkbenchSnapshot | undefined;
132
167
  taskGraph?: SerializedTaskGraph | undefined;
133
168
  markdown?: string | undefined;
169
+ contractGraph?: KanbanContractGraph | null | undefined;
170
+ contractEvaluation?: KanbanContractGraphEvaluation | undefined;
134
171
  }
135
172
  //# sourceMappingURL=kanban-tool-types.d.ts.map