@cerebriline/core 4.100.240 → 4.100.242

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 (64) hide show
  1. package/assets/skills/README.md +14 -0
  2. package/assets/skills/build-project/SKILL.md +103 -0
  3. package/assets/skills/docker-compose-deploy/SKILL.md +239 -0
  4. package/assets/skills/librarian/SKILL.md +177 -0
  5. package/assets/skills/mandatory-qa-prompt-and-issue-resolution/SKILL.md +58 -0
  6. package/assets/skills/run-project/SKILL.md +103 -0
  7. package/assets/skills/sdd-discuss/SKILL.md +129 -0
  8. package/assets/skills/sdd-execute/SKILL.md +146 -0
  9. package/assets/skills/sdd-plan/SKILL.md +140 -0
  10. package/assets/skills/sdd-quick/SKILL.md +40 -0
  11. package/assets/skills/sdd-status/SKILL.md +75 -0
  12. package/assets/skills/sdd-verify/SKILL.md +122 -0
  13. package/assets/skills/sdd-wizard/SKILL.md +105 -0
  14. package/assets/skills/tdd-coverage/SKILL.md +88 -0
  15. package/assets/skills/tdd-gen/SKILL.md +82 -0
  16. package/assets/skills/tdd-test/SKILL.md +61 -0
  17. package/assets/skills/tdd-wizard/SKILL.md +162 -0
  18. package/dist/document-reader-child.js +23 -0
  19. package/dist/extensions/config/bundled-skills.d.ts +24 -0
  20. package/dist/extensions/config/index.d.ts +2 -1
  21. package/dist/extensions/config/unified-config-file-watcher.d.ts +15 -0
  22. package/dist/extensions/config/user-instruction-config-loader.d.ts +15 -0
  23. package/dist/extensions/tools/executors/document/ebook.d.ts +10 -0
  24. package/dist/extensions/tools/executors/document/formats.d.ts +25 -0
  25. package/dist/extensions/tools/executors/document/ocr.d.ts +8 -0
  26. package/dist/extensions/tools/executors/document/read-job.d.ts +68 -0
  27. package/dist/extensions/tools/executors/document/read-process.d.ts +52 -0
  28. package/dist/extensions/tools/executors/document/read-protocol.d.ts +65 -0
  29. package/dist/extensions/tools/executors/document/recognition.d.ts +14 -5
  30. package/dist/extensions/tools/executors/document-extract.d.ts +120 -1
  31. package/dist/extensions/tools/librarian-tools.d.ts +32 -0
  32. package/dist/extensions/tools/library-import-run.d.ts +79 -0
  33. package/dist/extensions/tools/library-tools.d.ts +88 -0
  34. package/dist/extensions/tools/memory-tools.d.ts +41 -0
  35. package/dist/extensions/tools/sdd-tool.d.ts +215 -0
  36. package/dist/extensions/tools/team/create-agent-tool.d.ts +5 -4
  37. package/dist/hub/daemon/entry.js +607 -603
  38. package/dist/hub/index.js +595 -591
  39. package/dist/index.d.ts +17 -1
  40. package/dist/index.js +1080 -695
  41. package/dist/services/global-settings.d.ts +9 -0
  42. package/dist/services/llms/provider-settings.d.ts +15 -15
  43. package/dist/services/retrieval/catalogue.d.ts +397 -0
  44. package/dist/services/retrieval/chunker.d.ts +44 -0
  45. package/dist/services/retrieval/embedding-client.d.ts +78 -0
  46. package/dist/services/retrieval/fingerprint.d.ts +21 -0
  47. package/dist/services/retrieval/firecrawl.d.ts +77 -0
  48. package/dist/services/retrieval/lancedb-runtime.d.ts +84 -0
  49. package/dist/services/retrieval/lancedb-runtime.manifest.d.ts +17 -0
  50. package/dist/services/retrieval/library-store.d.ts +148 -0
  51. package/dist/services/retrieval/library.d.ts +139 -0
  52. package/dist/services/retrieval/memory-recall.d.ts +97 -0
  53. package/dist/services/retrieval/memory.d.ts +184 -0
  54. package/dist/services/retrieval/retrieve.d.ts +85 -0
  55. package/dist/services/retrieval/running-heads.d.ts +38 -0
  56. package/dist/services/retrieval/tar-extract.d.ts +14 -0
  57. package/dist/services/retrieval/tar-write.d.ts +20 -0
  58. package/dist/services/retrieval/vector-index.d.ts +82 -0
  59. package/dist/services/sdd/sdd-engine.d.ts +248 -0
  60. package/dist/services/telemetry/index.js +1 -1
  61. package/dist/types/config.d.ts +7 -0
  62. package/dist/types/session.d.ts +2 -0
  63. package/package.json +4 -4
  64. package/dist/extensions/tools/code-intel.d.ts +0 -131
@@ -0,0 +1,215 @@
1
+ /**
2
+ * The `sdd` tool: the spec-driven engine, as the model sees it.
3
+ *
4
+ * One tool with an `action`, not twenty tools: every tool's schema is paid
5
+ * for in every request, and these are used one at a time. Every answer ends
6
+ * with the step that is due, so the model never has to work out its place.
7
+ */
8
+ import { type AgentTool } from "@cerebriline/shared";
9
+ import { SddEngine } from "../../services/sdd/sdd-engine";
10
+ export declare const SDD_TOOL_NAME = "sdd";
11
+ export declare const SDD_ACTIONS: readonly ["next", "status", "set_project", "add_requirement", "update_requirement", "add_decision", "add_knowledge", "capture", "add_milestone", "update_milestone", "approve", "plan_milestone", "add_slices", "remove_slice", "plan_slice", "replan_slice", "start_task", "complete_task", "block_task", "complete_slice", "validate_milestone", "complete_milestone", "quick"];
12
+ export type SddAction = (typeof SDD_ACTIONS)[number];
13
+ export declare const SDD_TOOL_DESCRIPTION = "Spec-driven development: the project's plan and where the work stands, kept in a database in the project (.sdd/). Use it for every step of a planned build; do not keep the plan in your head or in files of your own.\n\nCall with action \"next\" whenever you are unsure what to do: it answers with the one step that is due and everything that step needs. Every other action ends by telling you the next step too. A step out of turn is refused with the reason.\n\nActions:\n- next, status: where things stand. Change nothing.\n- set_project {name, description, agreements}\n- add_requirement {title, description}; update_requirement {id, status: active | validated | deferred | out_of_scope}\n- add_decision {title, choice, why}; add_knowledge {text}; capture {text} (a thought for later)\n- add_milestone {title, context}; update_milestone {title, context}\n- approve {what: \"requirements\" | \"roadmap\"}: only after the user has said yes to them.\n- plan_milestone {slices: [{title, goal, demo, depends: [\"S01\"], requirements: [\"R001\"]}]}\n- add_slices {slices}: more slices on an approved roadmap, when the user agreed to more scope. remove_slice {slice, reason}: take off one that has no work in it.\n- plan_slice {research, tasks: [{title, steps, files: [], verify, expect}]}\n- replan_slice {reason, tasks}: after a blocker; done tasks are kept.\n- start_task; complete_task {summary, evidence}; block_task {reason}\n- complete_slice {summary, uat: [{check, result: \"pass\" | \"fail\" | \"needs_human\", note}]}\n- validate_milestone {verdict: \"pass\" | \"needs_remediation\", findings, remediation: [slices]}\n- complete_milestone {summary}\n- quick {title, summary}: record a small change made outside the plan.\n\nevidence is the real output of the task's verify command, run in the workspace. Never write it from memory.";
14
+ export declare const SDD_TOOL_INPUT_SCHEMA: {
15
+ readonly type: "object";
16
+ readonly properties: {
17
+ readonly action: {
18
+ readonly type: "string";
19
+ readonly enum: readonly ["next", "status", "set_project", "add_requirement", "update_requirement", "add_decision", "add_knowledge", "capture", "add_milestone", "update_milestone", "approve", "plan_milestone", "add_slices", "remove_slice", "plan_slice", "replan_slice", "start_task", "complete_task", "block_task", "complete_slice", "validate_milestone", "complete_milestone", "quick"];
20
+ };
21
+ readonly name: {
22
+ readonly type: "string";
23
+ };
24
+ readonly title: {
25
+ readonly type: "string";
26
+ };
27
+ readonly description: {
28
+ readonly type: "string";
29
+ };
30
+ readonly agreements: {
31
+ readonly type: "string";
32
+ };
33
+ readonly context: {
34
+ readonly type: "string";
35
+ };
36
+ readonly text: {
37
+ readonly type: "string";
38
+ };
39
+ readonly id: {
40
+ readonly type: "string";
41
+ readonly description: "A requirement id, e.g. R003.";
42
+ };
43
+ readonly status: {
44
+ readonly type: "string";
45
+ readonly enum: readonly ["active", "validated", "deferred", "out_of_scope"];
46
+ };
47
+ readonly choice: {
48
+ readonly type: "string";
49
+ };
50
+ readonly why: {
51
+ readonly type: "string";
52
+ };
53
+ readonly what: {
54
+ readonly type: "string";
55
+ readonly enum: readonly ["requirements", "roadmap"];
56
+ };
57
+ readonly slice: {
58
+ readonly type: "string";
59
+ readonly description: "A slice, e.g. S02. Leave out for the one that is due.";
60
+ };
61
+ readonly task: {
62
+ readonly type: "string";
63
+ readonly description: "A task, e.g. T03. Leave out for the one that is due.";
64
+ };
65
+ readonly slices: {
66
+ readonly type: "array";
67
+ readonly items: {
68
+ readonly type: "object";
69
+ readonly properties: {
70
+ readonly title: {
71
+ readonly type: "string";
72
+ };
73
+ readonly goal: {
74
+ readonly type: "string";
75
+ };
76
+ readonly demo: {
77
+ readonly type: "string";
78
+ readonly description: "What shows that the slice works.";
79
+ };
80
+ readonly depends: {
81
+ readonly type: "array";
82
+ readonly items: {
83
+ readonly type: "string";
84
+ };
85
+ };
86
+ readonly requirements: {
87
+ readonly type: "array";
88
+ readonly items: {
89
+ readonly type: "string";
90
+ };
91
+ };
92
+ };
93
+ readonly required: readonly ["title"];
94
+ };
95
+ };
96
+ readonly remediation: {
97
+ readonly type: "array";
98
+ readonly items: {
99
+ readonly type: "object";
100
+ readonly properties: {
101
+ readonly title: {
102
+ readonly type: "string";
103
+ };
104
+ readonly goal: {
105
+ readonly type: "string";
106
+ };
107
+ readonly demo: {
108
+ readonly type: "string";
109
+ readonly description: "What shows that the slice works.";
110
+ };
111
+ readonly depends: {
112
+ readonly type: "array";
113
+ readonly items: {
114
+ readonly type: "string";
115
+ };
116
+ };
117
+ readonly requirements: {
118
+ readonly type: "array";
119
+ readonly items: {
120
+ readonly type: "string";
121
+ };
122
+ };
123
+ };
124
+ readonly required: readonly ["title"];
125
+ };
126
+ };
127
+ readonly research: {
128
+ readonly type: "string";
129
+ };
130
+ readonly tasks: {
131
+ readonly type: "array";
132
+ readonly items: {
133
+ readonly type: "object";
134
+ readonly properties: {
135
+ readonly title: {
136
+ readonly type: "string";
137
+ };
138
+ readonly steps: {
139
+ readonly type: "string";
140
+ };
141
+ readonly files: {
142
+ readonly type: "array";
143
+ readonly items: {
144
+ readonly type: "string";
145
+ };
146
+ };
147
+ readonly verify: {
148
+ readonly type: "string";
149
+ readonly description: "The one command whose output proves the task.";
150
+ };
151
+ readonly expect: {
152
+ readonly type: "string";
153
+ };
154
+ };
155
+ readonly required: readonly ["title", "steps", "verify"];
156
+ };
157
+ };
158
+ readonly reason: {
159
+ readonly type: "string";
160
+ };
161
+ readonly summary: {
162
+ readonly type: "string";
163
+ };
164
+ readonly evidence: {
165
+ readonly type: "string";
166
+ };
167
+ readonly uat: {
168
+ readonly type: "array";
169
+ readonly items: {
170
+ readonly type: "object";
171
+ readonly properties: {
172
+ readonly check: {
173
+ readonly type: "string";
174
+ };
175
+ readonly result: {
176
+ readonly type: "string";
177
+ readonly enum: readonly ["pass", "fail", "needs_human"];
178
+ };
179
+ readonly note: {
180
+ readonly type: "string";
181
+ };
182
+ };
183
+ readonly required: readonly ["check", "result"];
184
+ };
185
+ };
186
+ readonly verdict: {
187
+ readonly type: "string";
188
+ readonly enum: readonly ["pass", "needs_remediation"];
189
+ };
190
+ readonly findings: {
191
+ readonly type: "string";
192
+ };
193
+ };
194
+ readonly required: readonly ["action"];
195
+ };
196
+ export interface SddToolOptions {
197
+ /** The project the plan belongs to. */
198
+ cwd: string;
199
+ onError?: (message: string, error: unknown) => void;
200
+ }
201
+ /** Run one action. Returns what happened, without the next step. */
202
+ export declare function runSddAction(engine: SddEngine, input: Record<string, unknown>): string;
203
+ export declare function createSddTool(options: SddToolOptions): AgentTool;
204
+ /** The spec-driven skills, any one of which brings the tool with it. */
205
+ export declare const SDD_SKILL_NAMES: readonly ["sdd-wizard", "sdd-discuss", "sdd-plan", "sdd-execute", "sdd-verify", "sdd-quick", "sdd-status"];
206
+ /** Whether the user has any of the spec-driven skills turned on. */
207
+ export declare function isSddEnabled(): boolean;
208
+ /**
209
+ * The tool, when a spec-driven skill is on. The skills are what tell the
210
+ * model how to work this way; without one the tool would be a cost in every
211
+ * request and no use.
212
+ */
213
+ export declare function createSddTools(options: SddToolOptions & {
214
+ log?: (message: string) => void;
215
+ }): AgentTool[];
@@ -7,10 +7,11 @@
7
7
  * directory is not somewhere it would guess, and the VS Code editor that knows
8
8
  * both is reachable only by a human with a mouse.
9
9
  *
10
- * A tool rather than a skill because skills have to be installed by hand --
11
- * `resolveSkillsConfigSearchPaths` looks only in the workspace and the Cline
12
- * data directory -- so a skill that teaches this would need the user to already
13
- * know the thing it was going to tell them.
10
+ * A tool rather than a skill because, when this was written, skills had to be
11
+ * installed by hand, so a skill that taught this would have needed the user to
12
+ * already know the thing it was going to tell them. Skills can ship with the
13
+ * product now (`bundled-skills.ts`); the tool stays, since it also writes the
14
+ * file.
14
15
  */
15
16
  import { type AgentTool } from "@cerebriline/shared";
16
17
  import { z } from "zod";