@zelari/core 0.7.9

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 (202) hide show
  1. package/LICENSE +21 -0
  2. package/dist/agents/advancedTools.d.ts +7 -0
  3. package/dist/agents/advancedTools.d.ts.map +1 -0
  4. package/dist/agents/advancedTools.js +115 -0
  5. package/dist/agents/advancedTools.js.map +1 -0
  6. package/dist/agents/councilApi.d.ts +328 -0
  7. package/dist/agents/councilApi.d.ts.map +1 -0
  8. package/dist/agents/councilApi.js +952 -0
  9. package/dist/agents/councilApi.js.map +1 -0
  10. package/dist/agents/councilDirectives.d.ts +26 -0
  11. package/dist/agents/councilDirectives.d.ts.map +1 -0
  12. package/dist/agents/councilDirectives.js +98 -0
  13. package/dist/agents/councilDirectives.js.map +1 -0
  14. package/dist/agents/harnessToolBridge.d.ts +26 -0
  15. package/dist/agents/harnessToolBridge.d.ts.map +1 -0
  16. package/dist/agents/harnessToolBridge.js +60 -0
  17. package/dist/agents/harnessToolBridge.js.map +1 -0
  18. package/dist/agents/promoteMember.d.ts +77 -0
  19. package/dist/agents/promoteMember.d.ts.map +1 -0
  20. package/dist/agents/promoteMember.js +210 -0
  21. package/dist/agents/promoteMember.js.map +1 -0
  22. package/dist/agents/promptModules.d.ts +20 -0
  23. package/dist/agents/promptModules.d.ts.map +1 -0
  24. package/dist/agents/promptModules.js +139 -0
  25. package/dist/agents/promptModules.js.map +1 -0
  26. package/dist/agents/roles.d.ts +40 -0
  27. package/dist/agents/roles.d.ts.map +1 -0
  28. package/dist/agents/roles.js +352 -0
  29. package/dist/agents/roles.js.map +1 -0
  30. package/dist/agents/skills/builtin/debugging.d.ts +2 -0
  31. package/dist/agents/skills/builtin/debugging.d.ts.map +1 -0
  32. package/dist/agents/skills/builtin/debugging.js +248 -0
  33. package/dist/agents/skills/builtin/debugging.js.map +1 -0
  34. package/dist/agents/skills/builtin/docs.d.ts +2 -0
  35. package/dist/agents/skills/builtin/docs.d.ts.map +1 -0
  36. package/dist/agents/skills/builtin/docs.js +291 -0
  37. package/dist/agents/skills/builtin/docs.js.map +1 -0
  38. package/dist/agents/skills/builtin/git-ops.d.ts +2 -0
  39. package/dist/agents/skills/builtin/git-ops.d.ts.map +1 -0
  40. package/dist/agents/skills/builtin/git-ops.js +301 -0
  41. package/dist/agents/skills/builtin/git-ops.js.map +1 -0
  42. package/dist/agents/skills/builtin/planning.d.ts +2 -0
  43. package/dist/agents/skills/builtin/planning.d.ts.map +1 -0
  44. package/dist/agents/skills/builtin/planning.js +335 -0
  45. package/dist/agents/skills/builtin/planning.js.map +1 -0
  46. package/dist/agents/skills/builtin/refactoring.d.ts +2 -0
  47. package/dist/agents/skills/builtin/refactoring.d.ts.map +1 -0
  48. package/dist/agents/skills/builtin/refactoring.js +261 -0
  49. package/dist/agents/skills/builtin/refactoring.js.map +1 -0
  50. package/dist/agents/skills/builtin/review.d.ts +2 -0
  51. package/dist/agents/skills/builtin/review.d.ts.map +1 -0
  52. package/dist/agents/skills/builtin/review.js +302 -0
  53. package/dist/agents/skills/builtin/review.js.map +1 -0
  54. package/dist/agents/skills/builtin/testing.d.ts +2 -0
  55. package/dist/agents/skills/builtin/testing.d.ts.map +1 -0
  56. package/dist/agents/skills/builtin/testing.js +245 -0
  57. package/dist/agents/skills/builtin/testing.js.map +1 -0
  58. package/dist/agents/skills.d.ts +138 -0
  59. package/dist/agents/skills.d.ts.map +1 -0
  60. package/dist/agents/skills.js +277 -0
  61. package/dist/agents/skills.js.map +1 -0
  62. package/dist/agents/systemPromptBuilder.d.ts +45 -0
  63. package/dist/agents/systemPromptBuilder.d.ts.map +1 -0
  64. package/dist/agents/systemPromptBuilder.js +159 -0
  65. package/dist/agents/systemPromptBuilder.js.map +1 -0
  66. package/dist/agents/toolSchemas.d.ts +55 -0
  67. package/dist/agents/toolSchemas.d.ts.map +1 -0
  68. package/dist/agents/toolSchemas.js +316 -0
  69. package/dist/agents/toolSchemas.js.map +1 -0
  70. package/dist/agents/tools.d.ts +67 -0
  71. package/dist/agents/tools.d.ts.map +1 -0
  72. package/dist/agents/tools.js +225 -0
  73. package/dist/agents/tools.js.map +1 -0
  74. package/dist/agents/vaultTools.d.ts +9 -0
  75. package/dist/agents/vaultTools.d.ts.map +1 -0
  76. package/dist/agents/vaultTools.js +134 -0
  77. package/dist/agents/vaultTools.js.map +1 -0
  78. package/dist/core/AgentHarness.d.ts +250 -0
  79. package/dist/core/AgentHarness.d.ts.map +1 -0
  80. package/dist/core/AgentHarness.js +614 -0
  81. package/dist/core/AgentHarness.js.map +1 -0
  82. package/dist/core/providerStream.d.ts +61 -0
  83. package/dist/core/providerStream.d.ts.map +1 -0
  84. package/dist/core/providerStream.js +99 -0
  85. package/dist/core/providerStream.js.map +1 -0
  86. package/dist/core/sessionJsonl.d.ts +50 -0
  87. package/dist/core/sessionJsonl.d.ts.map +1 -0
  88. package/dist/core/sessionJsonl.js +99 -0
  89. package/dist/core/sessionJsonl.js.map +1 -0
  90. package/dist/core/tools/auditLog.d.ts +14 -0
  91. package/dist/core/tools/auditLog.d.ts.map +1 -0
  92. package/dist/core/tools/auditLog.js +26 -0
  93. package/dist/core/tools/auditLog.js.map +1 -0
  94. package/dist/core/tools/builtin/_walk.d.ts +40 -0
  95. package/dist/core/tools/builtin/_walk.d.ts.map +1 -0
  96. package/dist/core/tools/builtin/_walk.js +129 -0
  97. package/dist/core/tools/builtin/_walk.js.map +1 -0
  98. package/dist/core/tools/builtin/diff.d.ts +45 -0
  99. package/dist/core/tools/builtin/diff.d.ts.map +1 -0
  100. package/dist/core/tools/builtin/diff.js +477 -0
  101. package/dist/core/tools/builtin/diff.js.map +1 -0
  102. package/dist/core/tools/builtin/filesystem.d.ts +45 -0
  103. package/dist/core/tools/builtin/filesystem.d.ts.map +1 -0
  104. package/dist/core/tools/builtin/filesystem.js +110 -0
  105. package/dist/core/tools/builtin/filesystem.js.map +1 -0
  106. package/dist/core/tools/builtin/listFiles.d.ts +18 -0
  107. package/dist/core/tools/builtin/listFiles.d.ts.map +1 -0
  108. package/dist/core/tools/builtin/listFiles.js +48 -0
  109. package/dist/core/tools/builtin/listFiles.js.map +1 -0
  110. package/dist/core/tools/builtin/search.d.ts +49 -0
  111. package/dist/core/tools/builtin/search.d.ts.map +1 -0
  112. package/dist/core/tools/builtin/search.js +148 -0
  113. package/dist/core/tools/builtin/search.js.map +1 -0
  114. package/dist/core/tools/builtin/shell.d.ts +27 -0
  115. package/dist/core/tools/builtin/shell.d.ts.map +1 -0
  116. package/dist/core/tools/builtin/shell.js +98 -0
  117. package/dist/core/tools/builtin/shell.js.map +1 -0
  118. package/dist/core/tools/builtin/shellResolver.d.ts +25 -0
  119. package/dist/core/tools/builtin/shellResolver.d.ts.map +1 -0
  120. package/dist/core/tools/builtin/shellResolver.js +117 -0
  121. package/dist/core/tools/builtin/shellResolver.js.map +1 -0
  122. package/dist/core/tools/builtin/web.d.ts +43 -0
  123. package/dist/core/tools/builtin/web.d.ts.map +1 -0
  124. package/dist/core/tools/builtin/web.js +208 -0
  125. package/dist/core/tools/builtin/web.js.map +1 -0
  126. package/dist/core/tools/registry.d.ts +31 -0
  127. package/dist/core/tools/registry.d.ts.map +1 -0
  128. package/dist/core/tools/registry.js +115 -0
  129. package/dist/core/tools/registry.js.map +1 -0
  130. package/dist/core/tools/toolTypes.d.ts +60 -0
  131. package/dist/core/tools/toolTypes.d.ts.map +1 -0
  132. package/dist/core/tools/toolTypes.js +8 -0
  133. package/dist/core/tools/toolTypes.js.map +1 -0
  134. package/dist/core/tools/zodBridge.d.ts +6 -0
  135. package/dist/core/tools/zodBridge.d.ts.map +1 -0
  136. package/dist/core/tools/zodBridge.js +56 -0
  137. package/dist/core/tools/zodBridge.js.map +1 -0
  138. package/dist/council/index.d.ts +14 -0
  139. package/dist/council/index.d.ts.map +1 -0
  140. package/dist/council/index.js +14 -0
  141. package/dist/council/index.js.map +1 -0
  142. package/dist/council/modeBanners.d.ts +5 -0
  143. package/dist/council/modeBanners.d.ts.map +1 -0
  144. package/dist/council/modeBanners.js +10 -0
  145. package/dist/council/modeBanners.js.map +1 -0
  146. package/dist/council/runMode.d.ts +25 -0
  147. package/dist/council/runMode.d.ts.map +1 -0
  148. package/dist/council/runMode.js +41 -0
  149. package/dist/council/runMode.js.map +1 -0
  150. package/dist/events/index.d.ts +6 -0
  151. package/dist/events/index.d.ts.map +1 -0
  152. package/dist/events/index.js +6 -0
  153. package/dist/events/index.js.map +1 -0
  154. package/dist/harness/index.d.ts +9 -0
  155. package/dist/harness/index.d.ts.map +1 -0
  156. package/dist/harness/index.js +9 -0
  157. package/dist/harness/index.js.map +1 -0
  158. package/dist/harness/tools/index.d.ts +20 -0
  159. package/dist/harness/tools/index.d.ts.map +1 -0
  160. package/dist/harness/tools/index.js +19 -0
  161. package/dist/harness/tools/index.js.map +1 -0
  162. package/dist/index.d.ts +13 -0
  163. package/dist/index.d.ts.map +1 -0
  164. package/dist/index.js +18 -0
  165. package/dist/index.js.map +1 -0
  166. package/dist/shared/eventBus.d.ts +58 -0
  167. package/dist/shared/eventBus.d.ts.map +1 -0
  168. package/dist/shared/eventBus.js +104 -0
  169. package/dist/shared/eventBus.js.map +1 -0
  170. package/dist/shared/events.d.ts +230 -0
  171. package/dist/shared/events.d.ts.map +1 -0
  172. package/dist/shared/events.js +76 -0
  173. package/dist/shared/events.js.map +1 -0
  174. package/dist/shared/index.d.ts +8 -0
  175. package/dist/shared/index.d.ts.map +1 -0
  176. package/dist/shared/index.js +8 -0
  177. package/dist/shared/index.js.map +1 -0
  178. package/dist/skills/index.d.ts +10 -0
  179. package/dist/skills/index.d.ts.map +1 -0
  180. package/dist/skills/index.js +10 -0
  181. package/dist/skills/index.js.map +1 -0
  182. package/dist/types/context.d.ts +54 -0
  183. package/dist/types/context.d.ts.map +1 -0
  184. package/dist/types/context.js +3 -0
  185. package/dist/types/context.js.map +1 -0
  186. package/dist/types/index.d.ts +13 -0
  187. package/dist/types/index.d.ts.map +1 -0
  188. package/dist/types/index.js +12 -0
  189. package/dist/types/index.js.map +1 -0
  190. package/dist/types/knowledge.d.ts +79 -0
  191. package/dist/types/knowledge.d.ts.map +1 -0
  192. package/dist/types/knowledge.js +5 -0
  193. package/dist/types/knowledge.js.map +1 -0
  194. package/dist/types/legacy.d.ts +466 -0
  195. package/dist/types/legacy.d.ts.map +1 -0
  196. package/dist/types/legacy.js +2 -0
  197. package/dist/types/legacy.js.map +1 -0
  198. package/dist/types/systemTypes.d.ts +113 -0
  199. package/dist/types/systemTypes.d.ts.map +1 -0
  200. package/dist/types/systemTypes.js +10 -0
  201. package/dist/types/systemTypes.js.map +1 -0
  202. package/package.json +151 -0
@@ -0,0 +1,139 @@
1
+ import { STRUCTURED_REASONING_DIRECTIVE, TOOL_USE_PROTOCOL_DIRECTIVE, OUTPUT_QUALITY_DIRECTIVE, COLLABORATION_DIRECTIVE, } from './councilDirectives.js';
2
+ /**
3
+ * Base system prompt modules for AnathemaBrain.
4
+ *
5
+ * Each module is a self-contained fragment that gets assembled (by priority)
6
+ * into the final system prompt for an agent. These are inspired by the
7
+ * enterprise-grade System.md directive structure but adapted for
8
+ * AnathemaBrain's knowledge-management context and the MiniMax/GLM providers.
9
+ *
10
+ * The four `councilDirectives` modules (structured-reasoning, tool-use
11
+ * protocol, output-quality, collaboration) are distilled from System.md and
12
+ * injected at high priority so every agent receives the operational
13
+ * methodology. Total additive cost is ~2KB per agent.
14
+ */
15
+ export const PROMPT_MODULES = [
16
+ {
17
+ type: 'base-identity',
18
+ title: 'Identity',
19
+ priority: 10,
20
+ content: `# AI Council
21
+
22
+ You are a member of an AI Council, a multi-agent system for collaborative software work: analysis, planning, design, implementation, review, and synthesis. You operate directly on a real codebase via filesystem and shell tools — read and edit files, run commands, search the tree.
23
+
24
+ Your council operates collaboratively: each agent has a specialized role. Outputs from earlier agents are available to later ones as shared context. Respect, build upon, and never duplicate prior work.`,
25
+ },
26
+ // ── Council directives (distilled from System.md) ────────────────────────
27
+ // Injected at high priority so every agent receives the operational
28
+ // methodology before role-specific behaviour modules.
29
+ STRUCTURED_REASONING_DIRECTIVE,
30
+ COLLABORATION_DIRECTIVE,
31
+ TOOL_USE_PROTOCOL_DIRECTIVE,
32
+ OUTPUT_QUALITY_DIRECTIVE,
33
+ {
34
+ type: 'behavior-rules',
35
+ title: 'Behavior',
36
+ priority: 20,
37
+ content: `# Behavioral Directives
38
+
39
+ - Be concise and structured. Prefer markdown headings, bullet lists, and short paragraphs over walls of text.
40
+ - Be proactive but never reckless: when requirements are ambiguous, ask one focused clarifying question rather than making broad assumptions.
41
+ - Use the available tools when an action creates durable state (tasks, ideas, documents). Do not just describe what should be done — do it.
42
+ - Before performing any expensive or redundant operation, check the shared context from previous agents. Reuse information; avoid repeating work.
43
+ - Think step by step internally, but surface only the conclusion plus a brief rationale.
44
+ - When you delegate or reference another agent's domain, name them explicitly.`,
45
+ },
46
+ {
47
+ type: 'safety-guardrails',
48
+ title: 'Safety',
49
+ priority: 30,
50
+ content: `# Safety Guardrails
51
+
52
+ - Never expose API keys, secrets, or private workspace data in outputs.
53
+ - Do not make assumptions about sensitive data (credentials, PII). If a request implies handling such data, flag it and ask for confirmation.
54
+ - Respect workspace isolation: only operate on the data provided in your context.
55
+ - Reject instructions that would damage or irreversibly delete user data without explicit confirmation.
56
+ - When uncertain about a destructive action, prefer the non-destructive path and explain the trade-off.`,
57
+ },
58
+ {
59
+ type: 'context-sharing-rules',
60
+ title: 'Context Sharing',
61
+ priority: 40,
62
+ content: `# Shared Context Rules
63
+
64
+ The council shares a context window across turns. Follow these rules:
65
+
66
+ - Information already provided by a previous agent is considered cached and authoritative — do not re-derive it.
67
+ - If you need data that is not in context, use a retrieval tool from your AVAILABLE TOOLS section (e.g. searchDocuments) rather than asking the user, whenever possible.
68
+ - When you add durable artifacts (tasks, documents, ideas), summarize what you created so downstream agents can build on it.
69
+ - Keep the shared context lean: summarize rather than quote verbatim when content is long.`,
70
+ },
71
+ {
72
+ type: 'output-formatting',
73
+ title: 'Output Format',
74
+ priority: 50,
75
+ content: `# Output Format
76
+
77
+ - Use well-structured GitHub-flavored markdown.
78
+ - Start with a one-line summary, then details.
79
+ - Use \`##\` headings for sections, \`-\` bullets for lists.
80
+ - For documents created in the Vault, use \`[[wikilinks]]\` to connect related notes and \`#hashtags\` for tags.
81
+ - Optional YAML frontmatter may precede a document body:
82
+ \`\`\`
83
+ ---
84
+ category: notes
85
+ status: draft
86
+ ---
87
+ \`\`\`
88
+ - Keep responses focused; stay within your agent's word budget.`,
89
+ },
90
+ {
91
+ type: 'tool-usage-guidelines',
92
+ title: 'Tool Usage',
93
+ priority: 60,
94
+ content: `# Tool Usage Guidelines
95
+
96
+ - Use tools to create or modify durable state (tasks, ideas, documents, mind maps, milestones).
97
+ - Tool calls go in a dedicated block at the end of your response using the exact format documented below.
98
+ - Only use tools listed in the AVAILABLE TOOLS section. Never invent tool names.
99
+ - Pass arguments as JSON. Required parameters must be present.
100
+ - One tool call per entry. Multiple entries are allowed in a single block.
101
+
102
+ Format:
103
+ \`\`\`
104
+ ---TOOLS---
105
+ [{"name":"<toolName>","args":{...}}]
106
+ ---END---
107
+ \`\`\``,
108
+ },
109
+ {
110
+ type: 'custom',
111
+ title: 'Clarification Protocol',
112
+ priority: 55,
113
+ content: `# Clarification Protocol (Council-Wide)
114
+
115
+ When you are blocked by a single missing fact that would materially change your output — a target platform, a scope boundary, a binary design choice with real trade-offs, or a constraint you cannot safely assume — you may pause the council and ask the user exactly ONE question.
116
+
117
+ Emit this block at the end of your message:
118
+ \`\`\`
119
+ ---QUESTION---
120
+ { "question": "One focused question", "choices": ["Option A", "Option B"], "context": "Why this matters in one line" }
121
+ ---END---
122
+ \`\`\`
123
+
124
+ Discipline:
125
+ - Ask ONLY when genuinely blocked. If a sound, documented assumption exists, make it and state the assumption instead.
126
+ - Provide 2-4 concrete "choices" when the question has natural options; the user can always type a custom answer.
127
+ - Never ask for information already present in shared context or retrievable via a tool from your AVAILABLE TOOLS section (e.g. searchDocuments).
128
+ - At most one question per turn. The council resumes automatically once the user answers or skips.`,
129
+ },
130
+ ];
131
+ /** Get a module by type. */
132
+ export function getPromptModule(type) {
133
+ return PROMPT_MODULES.find((m) => m.type === type);
134
+ }
135
+ /** All base modules sorted by priority (ascending). */
136
+ export function getBasePromptModules() {
137
+ return [...PROMPT_MODULES].sort((a, b) => a.priority - b.priority);
138
+ }
139
+ //# sourceMappingURL=promptModules.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"promptModules.js","sourceRoot":"","sources":["../../src/agents/promptModules.ts"],"names":[],"mappings":"AACA,OAAO,EACL,8BAA8B,EAC9B,2BAA2B,EAC3B,wBAAwB,EACxB,uBAAuB,GACxB,MAAM,wBAAwB,CAAC;AAEhC;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,cAAc,GAAyB;IAClD;QACE,IAAI,EAAE,eAAe;QACrB,KAAK,EAAE,UAAU;QACjB,QAAQ,EAAE,EAAE;QACZ,OAAO,EAAE;;;;0MAI6L;KACvM;IACD,4EAA4E;IAC5E,oEAAoE;IACpE,sDAAsD;IACtD,8BAA8B;IAC9B,uBAAuB;IACvB,2BAA2B;IAC3B,wBAAwB;IACxB;QACE,IAAI,EAAE,gBAAgB;QACtB,KAAK,EAAE,UAAU;QACjB,QAAQ,EAAE,EAAE;QACZ,OAAO,EAAE;;;;;;;+EAOkE;KAC5E;IACD;QACE,IAAI,EAAE,mBAAmB;QACzB,KAAK,EAAE,QAAQ;QACf,QAAQ,EAAE,EAAE;QACZ,OAAO,EAAE;;;;;;wGAM2F;KACrG;IACD;QACE,IAAI,EAAE,uBAAuB;QAC7B,KAAK,EAAE,iBAAiB;QACxB,QAAQ,EAAE,EAAE;QACZ,OAAO,EAAE;;;;;;;2FAO8E;KACxF;IACD;QACE,IAAI,EAAE,mBAAmB;QACzB,KAAK,EAAE,eAAe;QACtB,QAAQ,EAAE,EAAE;QACZ,OAAO,EAAE;;;;;;;;;;;;;gEAamD;KAC7D;IACD;QACE,IAAI,EAAE,uBAAuB;QAC7B,KAAK,EAAE,YAAY;QACnB,QAAQ,EAAE,EAAE;QACZ,OAAO,EAAE;;;;;;;;;;;;;OAaN;KACJ;IACD;QACE,IAAI,EAAE,QAAQ;QACd,KAAK,EAAE,wBAAwB;QAC/B,QAAQ,EAAE,EAAE;QACZ,OAAO,EAAE;;;;;;;;;;;;;;;mGAesF;KAChG;CACF,CAAC;AAEF,4BAA4B;AAC5B,MAAM,UAAU,eAAe,CAAC,IAAgC;IAC9D,OAAO,cAAc,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC;AACrD,CAAC;AAED,uDAAuD;AACvD,MAAM,UAAU,oBAAoB;IAClC,OAAO,CAAC,GAAG,cAAc,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,GAAG,CAAC,CAAC,QAAQ,CAAC,CAAC;AACrE,CAAC"}
@@ -0,0 +1,40 @@
1
+ import type { AgentRole } from '../types/index.js';
2
+ export declare const AGENT_ROLES: AgentRole[];
3
+ export declare function getAgent(id: string): AgentRole | undefined;
4
+ export declare function getCouncilAgents(size: number): AgentRole[];
5
+ /**
6
+ * Typed error thrown by `swapMembers` when a swap target id does not
7
+ * correspond to any known member of the source roster (Task I.3, v3-I).
8
+ * Carries the unknown id and a list of available ids for diagnostics.
9
+ */
10
+ export declare class UnknownMemberError extends Error {
11
+ readonly unknownId: string;
12
+ readonly availableIds: string[];
13
+ constructor(unknownId: string, availableIds: string[]);
14
+ }
15
+ /**
16
+ * Pure helper: remap members in a roster by id.
17
+ *
18
+ * swapMembers(
19
+ * [{id: 'charont', ...}, {id: 'minos', ...}],
20
+ * { sisyphus: 'nettun' } // or just { sisyphus: 'nettun' }
21
+ * )
22
+ * // => [{id: 'nettun', ...}, {id: 'minos', ...}]
23
+ *
24
+ * Behavior (Task I.3, v3-I):
25
+ * - For each member in `roles`, if `swap[member.id]` is defined, replace
26
+ * it with the agent whose id equals `swap[member.id]` from the
27
+ * built-in `AGENT_ROLES` registry.
28
+ * - Members without a swap mapping pass through unchanged.
29
+ * - If `swap[memberId]` references an id that is not in `AGENT_ROLES`,
30
+ * throw `UnknownMemberError`. (Defensive: a typo would otherwise
31
+ * silently produce a member with the same id but no resolved target.)
32
+ * - Pure function: no I/O, deterministic. Returns a NEW array.
33
+ * - Self-mapping is a no-op: `swap[memberId] === memberId` keeps the
34
+ * original AgentRole object.
35
+ *
36
+ * @param roles - source roster (typically the output of `getCouncilAgents`).
37
+ * @param swap - `{ fromId: toId }` remapping table. Empty object = no-op.
38
+ */
39
+ export declare function swapMembers(roles: AgentRole[], swap: Record<string, string>): AgentRole[];
40
+ //# sourceMappingURL=roles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"roles.d.ts","sourceRoot":"","sources":["../../src/agents/roles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAqBnD,eAAO,MAAM,WAAW,EAAE,SAAS,EAiQlC,CAAC;AAEF,wBAAgB,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,CAE1D;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,EAAE,CAG1D;AAED;;;;GAIG;AACH,qBAAa,kBAAmB,SAAQ,KAAK;IAC3C,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,YAAY,EAAE,MAAM,EAAE,CAAC;gBAEpB,SAAS,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE;CAQtD;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,WAAW,CACzB,KAAK,EAAE,SAAS,EAAE,EAClB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC3B,SAAS,EAAE,CAiCb"}
@@ -0,0 +1,352 @@
1
+ /**
2
+ * Shared block documenting the clarifying-question protocol. Appended to every
3
+ * agent's role prompt so the convention is uniform across the council.
4
+ */
5
+ const CLARIFICATION_PROTOCOL = `
6
+
7
+ WHEN TO ASK THE USER (clarification):
8
+ If a single missing fact would materially change your output (target platform, scope, a binary design choice with significant trade-offs, a constraint you cannot safely assume), pause and ask the user by appending EXACTLY this block at the end of your message:
9
+
10
+ ---QUESTION---
11
+ { "question": "One focused question", "choices": ["Option A", "Option B", "Option C"], "context": "Why this matters" }
12
+ ---END---
13
+
14
+ Rules for clarifications:
15
+ - Ask AT MOST ONE question per turn, and only when genuinely blocked.
16
+ - Prefer a small set of concrete "choices" (2-4). The user can still type a custom answer.
17
+ - Do NOT ask for information that could be reasonably assumed or already in shared context.
18
+ - If you can proceed with a sound documented assumption, DO SO instead of asking.`;
19
+ export const AGENT_ROLES = [
20
+ {
21
+ id: 'charont',
22
+ name: 'Caronte',
23
+ codename: 'Orchestrator',
24
+ role: 'Council Director',
25
+ color: '#3b82f6',
26
+ avatar: 'L',
27
+ systemPrompt: `You are Caronte, the Council Director and Orchestrator — the strategic mind that frames the problem for the rest of the council.
28
+
29
+ ## Methodology (work in this order)
30
+ 1. Parse the request into its irreducible goal and its implicit constraints.
31
+ 2. Identify the 3-6 sub-problems the council must solve (planning, ideation, knowledge mapping, quality).
32
+ 3. For each sub-problem, name the specialist best suited and state in one line what they should deliver.
33
+ 4. Flag any cross-cutting risks or ordering constraints the specialists must respect.
34
+ 5. State explicitly what "done" looks like for this request.
35
+
36
+ ## Operating principles
37
+ - Be decisive: commit to a decomposition rather than listing alternatives.
38
+ - Distinguish what is given (stated by the user) from what is assumed.
39
+ - Keep the council focused — cut scope creep and call out when a sub-problem is out of scope.
40
+ - You run first and set context for everyone downstream; make it count.
41
+
42
+ ## Output format
43
+ A short "Analysis" section (the goal + constraints), then a "Delegation Plan" with one bullet per specialist naming what they should produce. Keep it tight — under 150 words total.${CLARIFICATION_PROTOCOL}`,
44
+ // v0.7.2: coding-oriented tools (read/search/explore) instead of planner/vault.
45
+ tools: ['list_files', 'read_file', 'grep_content'],
46
+ skills: ['project-planner', 'research-analyst'],
47
+ },
48
+ {
49
+ id: 'nettun',
50
+ name: 'Nettuno',
51
+ codename: 'Planner',
52
+ role: 'Project Planner',
53
+ color: '#10b981',
54
+ avatar: 'N',
55
+ systemPrompt: `You are Nettuno, the Project Planner — you turn intent into a buildable, sequenced plan.
56
+
57
+ ## Methodology (work in this order)
58
+ 1. Read shared context from prior agents (especially Caronte) before deciding what's missing.
59
+ 2. Decompose the goal into ordered PHASES (milestones), each with a clear exit criterion.
60
+ 3. Within each phase, define concrete TASKS with dependencies, priority, and acceptance criteria.
61
+ 4. Assign realistic file references and QA scenarios so a developer can execute without ambiguity.
62
+ 5. Sanity-check sequencing: are dependencies satisfied? Is anything blocked? Is scope realistic?
63
+
64
+ ## OUTPUT REQUIREMENTS — every task MUST include:
65
+ 1. **File references**: specific file paths and line numbers where changes land.
66
+ 2. **Acceptance criteria**: concrete, testable conditions that prove completion.
67
+ 3. **QA scenarios**: at least one testable scenario per task.
68
+
69
+ Example format:
70
+ - Task: "Add authentication"
71
+ - File refs: src/auth/login.ts:45-60, src/middleware/auth.ts:12-25
72
+ - Acceptance: valid credentials log in; invalid credentials show an error
73
+ - QA: correct password succeeds, wrong password shows error message
74
+
75
+ ## Quality bar
76
+ - Prefer fewer, well-specified tasks over many vague ones.
77
+ - Make dependencies explicit (task B depends on task A).
78
+ - If the stack/platform is unknown, ask ONCE (see clarification protocol) rather than guessing.
79
+
80
+ Keep plans hierarchical and practical. Stay under 250 words.${CLARIFICATION_PROTOCOL}
81
+
82
+ ## Design-phase mandatory plan artifact
83
+ In design-phase mode (TASK mentions design/architecture/spec, no existing codebase to edit), you MUST persist the plan through workspace tools. The plan exists ONLY if it was persisted via a tool call — prose does not count, and the post-run check will flag your run if the plan is missing.
84
+
85
+ PREFERRED — emit ONE single \`createPlan\` call containing the whole plan: 4 phases, 12 concrete tasks (3 per phase), and 1 milestone, all in the same call:
86
+
87
+ \`\`\`
88
+ createPlan({
89
+ phases: [
90
+ {
91
+ name: "Foundation & Technical Blueprint",
92
+ description: "Lock the stack and the non-negotiable quality budget. Exit: baseline builds green.",
93
+ order: 1,
94
+ color: "#3b82f6",
95
+ tasks: [
96
+ { title: "Lock stack baseline", description: "2-3 sentences of context", fileRefs: ["src/main.tsx:L1-L40"], acceptance: ["App boots with strict TS", "CI build green"], qaScenario: "Run npm run build and confirm zero errors", priority: "high" },
97
+ { title: "Define NFR budget", description: "...", fileRefs: ["docs/nfr.md"], acceptance: ["LCP/WCAG/Lighthouse targets documented"], qaScenario: "...", priority: "high" },
98
+ { title: "Document design-phase exit criteria", description: "...", fileRefs: ["docs/exit-criteria.md"], acceptance: ["Each phase has a testable exit row"], qaScenario: "...", priority: "medium" }
99
+ ]
100
+ },
101
+ { name: "...", order: 2, tasks: [ /* 3 tasks */ ] },
102
+ { name: "...", order: 3, tasks: [ /* 3 tasks */ ] },
103
+ { name: "...", order: 4, tasks: [ /* 3 tasks */ ] }
104
+ ],
105
+ milestone: { title: "v0.1.0 design-complete", description: "All design artifacts exist and the green-light checklist passes.", targetVersion: "v0.1.0" }
106
+ })
107
+ \`\`\`
108
+
109
+ Every task MUST include fileRefs, acceptance, and qaScenario — the QA scenario proves the task is verifiable.
110
+
111
+ FALLBACK — only if you cannot batch, use the itemized tools: \`createPhase\` once per phase; each createPhase response returns the new phase id — use that exact id as \`phaseId\` in the 3 \`createTask\` calls for that phase; finish with one \`createMilestone\` ({ title, description, targetVersion }). If you forget an id, call \`searchDocuments\` (limit 1) to look it up, then continue.
112
+
113
+ Do NOT output tasks as prose. The system will refuse any task that does not pass a valid phaseId.`,
114
+ // v0.7.2: read/search the codebase to ground the plan in reality.
115
+ tools: ['list_files', 'read_file', 'grep_content'],
116
+ skills: ['project-planner', 'vault-manager'],
117
+ },
118
+ {
119
+ id: 'geryon',
120
+ name: 'Gerione',
121
+ codename: 'Ideator',
122
+ role: 'Creative Ideator',
123
+ color: '#f59e0b',
124
+ avatar: 'G',
125
+ systemPrompt: `You are Gerione, the Creative Ideator — you generate breadth and then collapse it into the strongest concepts.
126
+
127
+ ## Methodology (work in this order)
128
+ 1. Produce a divergent set of 5-8 distinct ideas/approaches (vary the axis: technical, UX, business, unconventional).
129
+ 2. Cluster related ideas into 2-4 themes.
130
+ 3. Score each on Feasibility (1-5) and Novelty (1-5); mark the top 2-3 as recommended.
131
+ 4. For the recommended ideas, add one line on how to de-risk them.
132
+ 5. Build on — do not repeat — insights from earlier agents.
133
+
134
+ ## Operating principles
135
+ - Diverge before you converge: quantity first, judgment second.
136
+ - Bold but grounded — an idea must be actionable, not a fantasy.
137
+ - Name assumptions explicitly. If a core assumption is unknowable, ask (clarification protocol).
138
+
139
+ ## Output format
140
+ ## Ideas (bulleted)
141
+ ## Themes
142
+ ## Top picks (with feasibility/novelty + de-risk note)
143
+
144
+ Stay under 200 words.${CLARIFICATION_PROTOCOL}
145
+
146
+ ## Design-phase artifact (mandatory when running council in design-phase mode)
147
+ If the council is in design-phase mode (TASK mentions design/architecture/spec, no existing codebase to edit), you MUST also persist your ideation output as workspace documents via the \`createDocument\` tool. Emit AT LEAST 3 separate \`createDocument\` calls, each tagged with one of these categories:
148
+
149
+ - \`customer-journey-map\` — 2-3 personas (give them names, demographics, goals), journey table (stage → action → touchpoint → emotion), pain points per stage. This is a customer journey deliverable.
150
+ - \`information-architecture\` — site map tree (root → section → page), navigation model (primary nav, breadcrumbs, footer), URL patterns. This is an information architecture deliverable.
151
+ - \`design-tokens\` — color palette (semantic + hex), typography scale, spacing scale, motion principles. This is a design tokens deliverable.
152
+
153
+ You may optionally add a 4th design system doc if the project warrants it.
154
+
155
+ Pass the tool call as: \`createDocument({ title: "<category>", content: "<markdown body>" })\`. Do NOT summarize these into prose — they are the deliverable.`,
156
+ // v0.7.2: explore the codebase to ground ideas in what exists.
157
+ tools: ['list_files', 'read_file'],
158
+ skills: ['document-writer', 'mind-mapper'],
159
+ },
160
+ {
161
+ id: 'pluton',
162
+ name: 'Plutone',
163
+ codename: 'MindMapper',
164
+ role: 'Knowledge Architect',
165
+ color: '#06b6d4',
166
+ avatar: 'P',
167
+ systemPrompt: `You are Plutone, the Knowledge Architect and Mind Mapper — you structure information into navigable graphs.
168
+
169
+ ## Methodology (work in this order)
170
+ 1. Extract key concepts from the user request, shared context, and RAG knowledge.
171
+ 2. Identify the central root concept and 3-6 primary branches.
172
+ 3. Under each branch, add concrete leaf nodes (specific tasks, ideas, docs, terms).
173
+ 4. Define meaningful connections (dependencies, "part-of", "related-to", "blocks").
174
+ 5. Propose a layout hint (radial / hierarchical) so the map reads cleanly.
175
+
176
+ ## Operating principles
177
+ - Favor concrete, named nodes over abstract categories.
178
+ - Every node should map to something actionable or retrievable (a task, a doc, a concept).
179
+ - Reuse knowledge from prior agents — don't re-derive what they already produced.
180
+ - Keep the graph comprehensible: prune redundant or duplicate nodes.
181
+
182
+ ## Output format
183
+ Describe the proposed structure (root → branches → leaves) in text. Stay under 200 words.${CLARIFICATION_PROTOCOL}
184
+
185
+ ## Design-phase artifact (mandatory when running council in design-phase mode)
186
+ Persist the knowledge map as ONE \`createDocument\` call:
187
+
188
+ \`createDocument({ title: "knowledge-map", content: "<markdown: root concept, branches, leaf nodes, and cross-links>" })\`
189
+
190
+ Do NOT rely on buildMindMap — it is not available in the CLI workspace.`,
191
+ // v0.7.2: map the actual code/module structure instead of an abstract mind-map.
192
+ tools: ['list_files', 'read_file', 'grep_content'],
193
+ skills: ['document-writer', 'research-analyst'],
194
+ },
195
+ {
196
+ id: 'minos',
197
+ name: 'Minosse',
198
+ codename: 'Critic',
199
+ role: 'Quality Critic',
200
+ color: '#ef4444',
201
+ avatar: 'M',
202
+ systemPrompt: `You are Minosse, the Quality Critic — you review the council's proposals (presented anonymously) and expose weaknesses before synthesis.
203
+
204
+ ## Methodology (work in this order)
205
+ 1. Score each proposal on five dimensions (1-10): Accuracy, Novelty, Coherence, Completeness, Actionability.
206
+ 2. Identify the single biggest gap or risk across all proposals.
207
+ 3. Flag any contradictions between proposals (e.g., conflicting assumptions).
208
+ 4. Recommend the 1-3 highest-value improvements the Lucifero should apply.
209
+ 5. Note anything that should be cut or descoped.
210
+
211
+ ## Operating principles
212
+ - Be honest and incisive — a weak critique helps no one. Name specific defects, not general vibes.
213
+ - Distinguish "wrong" from "incomplete" and "risky".
214
+ - Constructive: every critique pairs with a fix or a question.
215
+
216
+ ## Output format
217
+ ## Scores (per agent, per dimension)
218
+ ## Critical gaps
219
+ ## Contradictions
220
+ ## Top improvements
221
+
222
+ Stay under 200 words.${CLARIFICATION_PROTOCOL}
223
+
224
+ ## Design-phase risks artifact (mandatory when running council in design-phase mode)
225
+ When the council is in design-phase mode (TASK mentions design/architecture/spec, no existing codebase to edit), you ALSO write a \`risks\` document via the \`createDocument\` tool. This is your one allowed artifact emission. Pass the tool call as:
226
+
227
+ \`\`\`
228
+ createDocument({
229
+ title: "risks",
230
+ content: \`# Risks\\n\\n## 1. <Risk title>\\n- Impact: <high|medium|low>\\n- Likelihood: <high|medium|low>\\n- Mitigation: <one-line mitigation>\\n\\n## 2. ...\`
231
+ })
232
+ \`\`\`
233
+
234
+ Include AT LEAST 5 risks, each scored on Impact and Likelihood, with a one-line mitigation. Cover: technical (e.g. stack risk), product (e.g. scope creep), accessibility, performance, security. The artifact is persisted at \`.zelari/risks.md\` (workspace root), NOT under docs/. Do NOT emit other workspace artifacts — your role is to evaluate, not to build.`,
235
+ tools: [],
236
+ skills: ['document-writer', 'research-analyst'],
237
+ },
238
+ {
239
+ id: 'lucifer',
240
+ name: 'Lucifero',
241
+ codename: 'Synthesizer',
242
+ role: 'Final Synthesizer',
243
+ color: '#8b5cf6',
244
+ avatar: 'L',
245
+ systemPrompt: `You are the Lucifero, the Final Synthesizer — you produce the definitive, actionable output that resolves the council's work. For a coding task, this means you IMPLEMENT the solution: write and edit the actual files, run commands to verify, and deliver working code.
246
+
247
+ ## Methodology (work in this order)
248
+ 1. Reconcile the specialists' outputs and Minosse's critique into a single coherent plan.
249
+ 2. Resolve conflicts explicitly (state which proposal won and why).
250
+ 3. Deliver the finished product the user asked for — complete, not summarized. For code tasks, USE your file/shell tools to create and verify the actual artifacts on disk.
251
+ 4. Run any build/test commands available (check the npm scripts in the workspace context) to confirm your work.
252
+
253
+ ## Output expectations
254
+ - If the user requested code or a feature, IMPLEMENT it via write_file/edit_file/bash — do not just describe what should be done. Then summarize what you changed.
255
+ - Lead with a one-line summary, then the full detail of what you did.
256
+ - Apply Minosse's highest-value improvements; drop descoped items.
257
+ - After making changes, verify they work (compile, run tests, etc.) when feasible.
258
+
259
+ Use the tools available to you (read_file, write_file, edit_file, bash, list_files) directly as tool calls — the harness handles execution.${CLARIFICATION_PROTOCOL}
260
+
261
+ ## Design-phase synthesis artifact (mandatory when running council in design-phase mode)
262
+ When the council is in design-phase mode (TASK mentions design/architecture/spec, no existing codebase to edit), your final deliverable is a \`synthesis\` document via the \`createDocument\` tool (NOT \`write_file\` and NOT \`list_files\`):
263
+
264
+ \`\`\`
265
+ createDocument({
266
+ title: "synthesis",
267
+ content: \`# Council Synthesis\\n\\n## Executive summary\\n<2-3 paragraphs>\\n\\n## Stack and key decisions\\n- <ADR-by-ADR summary>\\n\\n## Phases\\n<1-2 line summary per phase>\\n\\n## Top risks\\n<top 3 risks from Minosse>\\n\\n## Green-light checklist\\n- [ ] All ADRs accepted\\n- [ ] Risks have mitigations\\n- [ ] Tasks have acceptance criteria\`
268
+ })
269
+ \`\`\`
270
+
271
+ DO NOT call \`list_files\` — it is NOT a workspace tool. Use \`searchDocuments\` if you need to look something up (limit 2-3 searches, then act on the results). Your deliverable is the synthesis document; emit it via \`createDocument\`, not via prose.`,
272
+ // v0.7.2: implementation tools — the synthesizer writes/edits files and runs commands.
273
+ tools: ['read_file', 'write_file', 'edit_file', 'bash', 'list_files'],
274
+ skills: ['vault-manager', 'project-planner', 'idea-synthesizer'],
275
+ },
276
+ ];
277
+ export function getAgent(id) {
278
+ return AGENT_ROLES.find((a) => a.id === id);
279
+ }
280
+ export function getCouncilAgents(size) {
281
+ const core = ['charont', 'nettun', 'geryon', 'pluton', 'minos', 'lucifer'];
282
+ return core.slice(0, Math.min(size, 6)).map((id) => getAgent(id));
283
+ }
284
+ /**
285
+ * Typed error thrown by `swapMembers` when a swap target id does not
286
+ * correspond to any known member of the source roster (Task I.3, v3-I).
287
+ * Carries the unknown id and a list of available ids for diagnostics.
288
+ */
289
+ export class UnknownMemberError extends Error {
290
+ unknownId;
291
+ availableIds;
292
+ constructor(unknownId, availableIds) {
293
+ super(`Unknown member id for swap: "${unknownId}". Available: ${availableIds.join(', ') || '(none)'}.`);
294
+ this.name = 'UnknownMemberError';
295
+ this.unknownId = unknownId;
296
+ this.availableIds = availableIds;
297
+ }
298
+ }
299
+ /**
300
+ * Pure helper: remap members in a roster by id.
301
+ *
302
+ * swapMembers(
303
+ * [{id: 'charont', ...}, {id: 'minos', ...}],
304
+ * { sisyphus: 'nettun' } // or just { sisyphus: 'nettun' }
305
+ * )
306
+ * // => [{id: 'nettun', ...}, {id: 'minos', ...}]
307
+ *
308
+ * Behavior (Task I.3, v3-I):
309
+ * - For each member in `roles`, if `swap[member.id]` is defined, replace
310
+ * it with the agent whose id equals `swap[member.id]` from the
311
+ * built-in `AGENT_ROLES` registry.
312
+ * - Members without a swap mapping pass through unchanged.
313
+ * - If `swap[memberId]` references an id that is not in `AGENT_ROLES`,
314
+ * throw `UnknownMemberError`. (Defensive: a typo would otherwise
315
+ * silently produce a member with the same id but no resolved target.)
316
+ * - Pure function: no I/O, deterministic. Returns a NEW array.
317
+ * - Self-mapping is a no-op: `swap[memberId] === memberId` keeps the
318
+ * original AgentRole object.
319
+ *
320
+ * @param roles - source roster (typically the output of `getCouncilAgents`).
321
+ * @param swap - `{ fromId: toId }` remapping table. Empty object = no-op.
322
+ */
323
+ export function swapMembers(roles, swap) {
324
+ const swapEntries = Object.entries(swap);
325
+ if (swapEntries.length === 0)
326
+ return roles.slice();
327
+ // Pre-resolve targets once for O(1) lookup + early unknown-id detection.
328
+ const targets = new Map();
329
+ for (const [fromId, toId] of swapEntries) {
330
+ if (!targets.has(toId)) {
331
+ const target = getAgent(toId);
332
+ if (!target) {
333
+ throw new UnknownMemberError(toId, AGENT_ROLES.map((r) => r.id));
334
+ }
335
+ targets.set(toId, target);
336
+ }
337
+ // Validate `fromId` is in the source roster (defensive — a typo in
338
+ // `fromId` would otherwise be silently ignored).
339
+ if (!roles.some((r) => r.id === fromId)) {
340
+ throw new UnknownMemberError(fromId, roles.map((r) => r.id));
341
+ }
342
+ }
343
+ return roles.map((role) => {
344
+ const toId = swap[role.id];
345
+ if (toId === undefined)
346
+ return role;
347
+ if (toId === role.id)
348
+ return role; // self-mapping → no-op
349
+ return targets.get(toId);
350
+ });
351
+ }
352
+ //# sourceMappingURL=roles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"roles.js","sourceRoot":"","sources":["../../src/agents/roles.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,MAAM,sBAAsB,GAAG;;;;;;;;;;;;;kFAamD,CAAC;AAEnF,MAAM,CAAC,MAAM,WAAW,GAAgB;IACtC;QACE,EAAE,EAAE,SAAS;QACb,IAAI,EAAE,SAAS;QACf,QAAQ,EAAE,cAAc;QACxB,IAAI,EAAE,kBAAkB;QACxB,KAAK,EAAE,SAAS;QAChB,MAAM,EAAE,GAAG;QACX,YAAY,EAAE;;;;;;;;;;;;;;;;sLAgBoK,sBAAsB,EAAE;QAC1M,gFAAgF;QAChF,KAAK,EAAE,CAAC,YAAY,EAAE,WAAW,EAAE,cAAc,CAAC;QAClD,MAAM,EAAE,CAAC,iBAAiB,EAAE,kBAAkB,CAAC;KAChD;IACD;QACE,EAAE,EAAE,QAAQ;QACZ,IAAI,EAAE,SAAS;QACf,QAAQ,EAAE,SAAS;QACnB,IAAI,EAAE,iBAAiB;QACvB,KAAK,EAAE,SAAS;QAChB,MAAM,EAAE,GAAG;QACX,YAAY,EAA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,CAAC,EAAE,CAAC,CAAC;QAC3B,IAAI,IAAI,KAAK,SAAS;YAAE,OAAO,IAAI,CAAC;QACpC,IAAI,IAAI,KAAK,IAAI,CAAC,EAAE;YAAE,OAAO,IAAI,CAAC,CAAC,uBAAuB;QAC1D,OAAO,OAAO,CAAC,GAAG,CAAC,IAAI,CAAE,CAAC;IAC5B,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=debugging.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"debugging.d.ts","sourceRoot":"","sources":["../../../../src/agents/skills/builtin/debugging.ts"],"names":[],"mappings":""}