@wrongstack/tools 0.1.9 → 0.2.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 (65) hide show
  1. package/dist/audit.js +19 -17
  2. package/dist/audit.js.map +1 -1
  3. package/dist/bash.js +2 -80
  4. package/dist/bash.js.map +1 -1
  5. package/dist/batch-tool-use.js +1 -1
  6. package/dist/batch-tool-use.js.map +1 -1
  7. package/dist/builtin.js +3002 -2867
  8. package/dist/builtin.js.map +1 -1
  9. package/dist/diff.js +8 -3
  10. package/dist/diff.js.map +1 -1
  11. package/dist/document.js +31 -5
  12. package/dist/document.js.map +1 -1
  13. package/dist/edit.js +1 -3
  14. package/dist/edit.js.map +1 -1
  15. package/dist/exec.js +26 -82
  16. package/dist/exec.js.map +1 -1
  17. package/dist/fetch.js +5 -1
  18. package/dist/fetch.js.map +1 -1
  19. package/dist/format.js +24 -18
  20. package/dist/format.js.map +1 -1
  21. package/dist/git.js +6 -6
  22. package/dist/git.js.map +1 -1
  23. package/dist/glob.js.map +1 -1
  24. package/dist/grep.js +23 -23
  25. package/dist/grep.js.map +1 -1
  26. package/dist/index.d.ts +37 -1
  27. package/dist/index.js +310 -169
  28. package/dist/index.js.map +1 -1
  29. package/dist/install.js +31 -20
  30. package/dist/install.js.map +1 -1
  31. package/dist/json.js +4 -1
  32. package/dist/json.js.map +1 -1
  33. package/dist/lint.js +19 -17
  34. package/dist/lint.js.map +1 -1
  35. package/dist/logs.js +25 -22
  36. package/dist/logs.js.map +1 -1
  37. package/dist/memory.js.map +1 -1
  38. package/dist/mode.js +5 -1
  39. package/dist/mode.js.map +1 -1
  40. package/dist/outdated.js +10 -7
  41. package/dist/outdated.js.map +1 -1
  42. package/dist/patch.js +4 -9
  43. package/dist/patch.js.map +1 -1
  44. package/dist/read.js +5 -1
  45. package/dist/read.js.map +1 -1
  46. package/dist/replace.js +43 -30
  47. package/dist/replace.js.map +1 -1
  48. package/dist/scaffold.js +35 -20
  49. package/dist/scaffold.js.map +1 -1
  50. package/dist/search.js +5 -1
  51. package/dist/search.js.map +1 -1
  52. package/dist/test.js +17 -15
  53. package/dist/test.js.map +1 -1
  54. package/dist/todo.js.map +1 -1
  55. package/dist/tool-help.js +10 -8
  56. package/dist/tool-help.js.map +1 -1
  57. package/dist/tool-search.js.map +1 -1
  58. package/dist/tool-use.js +1 -1
  59. package/dist/tool-use.js.map +1 -1
  60. package/dist/tree.js +9 -1
  61. package/dist/tree.js.map +1 -1
  62. package/dist/typecheck.js +17 -15
  63. package/dist/typecheck.js.map +1 -1
  64. package/dist/write.js.map +1 -1
  65. package/package.json +2 -2
package/dist/index.d.ts CHANGED
@@ -9,6 +9,7 @@ export { execTool } from './exec.js';
9
9
  export { fetchTool } from './fetch.js';
10
10
  export { searchTool } from './search.js';
11
11
  export { todoTool } from './todo.js';
12
+ import { Tool } from '@wrongstack/core';
12
13
  export { gitTool } from './git.js';
13
14
  export { patchTool } from './patch.js';
14
15
  export { jsonTool } from './json.js';
@@ -31,4 +32,39 @@ export { toolHelpTool } from './tool-help.js';
31
32
  export { forgetTool, rememberTool } from './memory.js';
32
33
  export { createModeTool } from './mode.js';
33
34
  export { builtinTools } from './builtin.js';
34
- import '@wrongstack/core';
35
+
36
+ /**
37
+ * `planTool` — the LLM-callable counterpart to the `/plan` slash command.
38
+ *
39
+ * Plans capture strategic, multi-step approaches that survive across
40
+ * session resumes (unlike todos, which are tactical and per-turn).
41
+ * Storage path comes from `ctx.meta['plan.path']` — the CLI seeds this
42
+ * during startup so the tool always knows where to read/write.
43
+ *
44
+ * One tool, multiple actions, JSON in/out. The action discriminates the
45
+ * operation so the LLM can do show / add / start / done / remove / clear
46
+ * via a single tool registration instead of bloating the surface with
47
+ * six near-identical tools.
48
+ */
49
+ interface PlanInput {
50
+ action: 'show' | 'add' | 'start' | 'done' | 'remove' | 'clear';
51
+ /** Required for add. */
52
+ title?: string;
53
+ /** Optional detail line for add. */
54
+ details?: string;
55
+ /** Required for start/done/remove — accepts plan item id OR 1-based index OR title substring. */
56
+ target?: string;
57
+ }
58
+ interface PlanOutput {
59
+ ok: boolean;
60
+ message: string;
61
+ /** Formatted plan after the operation. Same string the user sees from `/plan show`. */
62
+ plan: string;
63
+ /** Total item count after the operation. */
64
+ count: number;
65
+ /** Number of items not in 'done' status. */
66
+ open: number;
67
+ }
68
+ declare const planTool: Tool<PlanInput, PlanOutput>;
69
+
70
+ export { planTool };