@hongmaple0820/scale-engine 0.7.2 → 0.8.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 (207) hide show
  1. package/dist/adapters/ClaudeCodeAdapter.js +5 -3
  2. package/dist/adapters/ClaudeCodeAdapter.js.map +1 -1
  3. package/dist/adapters/CodexAdapter.js +5 -3
  4. package/dist/adapters/CodexAdapter.js.map +1 -1
  5. package/dist/adapters/CursorAdapter.js +5 -3
  6. package/dist/adapters/CursorAdapter.js.map +1 -1
  7. package/dist/adapters/GeminiAdapter.js +5 -3
  8. package/dist/adapters/GeminiAdapter.js.map +1 -1
  9. package/dist/adapters/HermesAdapter.js +5 -3
  10. package/dist/adapters/HermesAdapter.js.map +1 -1
  11. package/dist/adapters/OpenClawAdapter.js +5 -3
  12. package/dist/adapters/OpenClawAdapter.js.map +1 -1
  13. package/dist/adapters/OpenCodeAdapter.js +5 -3
  14. package/dist/adapters/OpenCodeAdapter.js.map +1 -1
  15. package/dist/adapters/QCoderAdapter.js +5 -3
  16. package/dist/adapters/QCoderAdapter.js.map +1 -1
  17. package/dist/adapters/TraeAdapter.js +5 -3
  18. package/dist/adapters/TraeAdapter.js.map +1 -1
  19. package/dist/adapters/VSCAdapter.js +5 -3
  20. package/dist/adapters/VSCAdapter.js.map +1 -1
  21. package/dist/adapters/WorkBuddyAdapter.js +5 -3
  22. package/dist/adapters/WorkBuddyAdapter.js.map +1 -1
  23. package/dist/agents/AgentChannel.d.ts +43 -0
  24. package/dist/agents/AgentChannel.js +136 -0
  25. package/dist/agents/AgentChannel.js.map +1 -0
  26. package/dist/agents/AgentCoordinator.d.ts +29 -0
  27. package/dist/agents/AgentCoordinator.js +136 -0
  28. package/dist/agents/AgentCoordinator.js.map +1 -0
  29. package/dist/agents/AgentDispatcher.d.ts +24 -0
  30. package/dist/agents/AgentDispatcher.js +112 -0
  31. package/dist/agents/AgentDispatcher.js.map +1 -0
  32. package/dist/agents/AgentManager.d.ts +14 -0
  33. package/dist/agents/AgentManager.js +85 -0
  34. package/dist/agents/AgentManager.js.map +1 -0
  35. package/dist/agents/AgentPool.d.ts +59 -0
  36. package/dist/agents/AgentPool.js +192 -0
  37. package/dist/agents/AgentPool.js.map +1 -0
  38. package/dist/agents/AgentRegistry.d.ts +20 -0
  39. package/dist/agents/AgentRegistry.js +36 -0
  40. package/dist/agents/AgentRegistry.js.map +1 -0
  41. package/dist/agents/AgentSourceLoader.d.ts +73 -0
  42. package/dist/agents/AgentSourceLoader.js +101 -0
  43. package/dist/agents/AgentSourceLoader.js.map +1 -0
  44. package/dist/agents/IAgent.d.ts +53 -0
  45. package/dist/agents/IAgent.js +4 -0
  46. package/dist/agents/IAgent.js.map +1 -0
  47. package/dist/agents/definitions/debugger.d.ts +2 -0
  48. package/dist/agents/definitions/debugger.js +6 -0
  49. package/dist/agents/definitions/debugger.js.map +1 -0
  50. package/dist/agents/definitions/doc-writer.d.ts +2 -0
  51. package/dist/agents/definitions/doc-writer.js +6 -0
  52. package/dist/agents/definitions/doc-writer.js.map +1 -0
  53. package/dist/agents/definitions/implementer.d.ts +2 -0
  54. package/dist/agents/definitions/implementer.js +6 -0
  55. package/dist/agents/definitions/implementer.js.map +1 -0
  56. package/dist/agents/definitions/planner.d.ts +2 -0
  57. package/dist/agents/definitions/planner.js +6 -0
  58. package/dist/agents/definitions/planner.js.map +1 -0
  59. package/dist/agents/definitions/researcher.d.ts +2 -0
  60. package/dist/agents/definitions/researcher.js +6 -0
  61. package/dist/agents/definitions/researcher.js.map +1 -0
  62. package/dist/agents/definitions/reviewer.d.ts +2 -0
  63. package/dist/agents/definitions/reviewer.js +6 -0
  64. package/dist/agents/definitions/reviewer.js.map +1 -0
  65. package/dist/agents/definitions/security.d.ts +2 -0
  66. package/dist/agents/definitions/security.js +6 -0
  67. package/dist/agents/definitions/security.js.map +1 -0
  68. package/dist/agents/definitions/tester.d.ts +2 -0
  69. package/dist/agents/definitions/tester.js +6 -0
  70. package/dist/agents/definitions/tester.js.map +1 -0
  71. package/dist/agents/index.d.ts +23 -0
  72. package/dist/agents/index.js +44 -0
  73. package/dist/agents/index.js.map +1 -0
  74. package/dist/agents/profiles.d.ts +26 -0
  75. package/dist/agents/profiles.js +197 -0
  76. package/dist/agents/profiles.js.map +1 -0
  77. package/dist/agents/types.d.ts +262 -0
  78. package/dist/agents/types.js +4 -0
  79. package/dist/agents/types.js.map +1 -0
  80. package/dist/api/cli.js +121 -3
  81. package/dist/api/cli.js.map +1 -1
  82. package/dist/api/doctor.js +0 -2
  83. package/dist/api/doctor.js.map +1 -1
  84. package/dist/api/mcp.js +0 -5
  85. package/dist/api/mcp.js.map +1 -1
  86. package/dist/artifact/fsm.js +3 -5
  87. package/dist/artifact/fsm.js.map +1 -1
  88. package/dist/artifact/sqliteStore.js +1 -14
  89. package/dist/artifact/sqliteStore.js.map +1 -1
  90. package/dist/artifact/store.js +2 -4
  91. package/dist/artifact/store.js.map +1 -1
  92. package/dist/artifact/types.d.ts +94 -1
  93. package/dist/artifact/types.js +0 -3
  94. package/dist/artifact/types.js.map +1 -1
  95. package/dist/context/AntiPatternRegistry.d.ts +38 -0
  96. package/dist/context/AntiPatternRegistry.js +203 -0
  97. package/dist/context/AntiPatternRegistry.js.map +1 -0
  98. package/dist/context/CavemanCompressor.d.ts +20 -0
  99. package/dist/context/CavemanCompressor.js +14 -0
  100. package/dist/context/CavemanCompressor.js.map +1 -0
  101. package/dist/context/ContextBuilder.js +132 -4
  102. package/dist/context/ContextBuilder.js.map +1 -1
  103. package/dist/context/SessionStartSequence.d.ts +54 -0
  104. package/dist/context/SessionStartSequence.js +153 -0
  105. package/dist/context/SessionStartSequence.js.map +1 -0
  106. package/dist/core/container.js +4 -2
  107. package/dist/core/container.js.map +1 -1
  108. package/dist/core/eventBus.js +5 -6
  109. package/dist/core/eventBus.js.map +1 -1
  110. package/dist/dashboard/DashboardServer.js +3 -6
  111. package/dist/dashboard/DashboardServer.js.map +1 -1
  112. package/dist/dashboard/index.d.ts +2 -0
  113. package/dist/dashboard/index.js +2 -0
  114. package/dist/dashboard/index.js.map +1 -0
  115. package/dist/dashboard/server.d.ts +52 -0
  116. package/dist/dashboard/server.js +83 -0
  117. package/dist/dashboard/server.js.map +1 -0
  118. package/dist/evolution/AutoDefectCreator.js +2 -4
  119. package/dist/evolution/AutoDefectCreator.js.map +1 -1
  120. package/dist/evolution/BehaviorTracker.js +3 -5
  121. package/dist/evolution/BehaviorTracker.js.map +1 -1
  122. package/dist/evolution/EvolutionEngine.js +3 -14
  123. package/dist/evolution/EvolutionEngine.js.map +1 -1
  124. package/dist/evolution/EvolutionEvaluator.js +1 -4
  125. package/dist/evolution/EvolutionEvaluator.js.map +1 -1
  126. package/dist/evolution/LessonValidator.js +0 -4
  127. package/dist/evolution/LessonValidator.js.map +1 -1
  128. package/dist/evolution/PatternExtractor.d.ts +40 -0
  129. package/dist/evolution/PatternExtractor.js +83 -0
  130. package/dist/evolution/PatternExtractor.js.map +1 -0
  131. package/dist/evolution/SkillCreator.d.ts +75 -0
  132. package/dist/evolution/SkillCreator.js +219 -0
  133. package/dist/evolution/SkillCreator.js.map +1 -0
  134. package/dist/fsm/FSMAgentBridge.js +11 -13
  135. package/dist/fsm/FSMAgentBridge.js.map +1 -1
  136. package/dist/guardrails/DetectorEnhanced.js +32 -30
  137. package/dist/guardrails/DetectorEnhanced.js.map +1 -1
  138. package/dist/guardrails/GateEvaluator.d.ts +18 -0
  139. package/dist/guardrails/GateEvaluator.js +129 -0
  140. package/dist/guardrails/GateEvaluator.js.map +1 -0
  141. package/dist/guardrails/Gateway.js +6 -7
  142. package/dist/guardrails/Gateway.js.map +1 -1
  143. package/dist/guardrails/ReviewEnforcer.d.ts +52 -0
  144. package/dist/guardrails/ReviewEnforcer.js +117 -0
  145. package/dist/guardrails/ReviewEnforcer.js.map +1 -0
  146. package/dist/guardrails/advancedDetectors.js +33 -31
  147. package/dist/guardrails/advancedDetectors.js.map +1 -1
  148. package/dist/guardrails/detectors.js +76 -16
  149. package/dist/guardrails/detectors.js.map +1 -1
  150. package/dist/hooks/HookDeployer.js +2 -3
  151. package/dist/hooks/HookDeployer.js.map +1 -1
  152. package/dist/hooks/HookGeneratorEnhanced.js +2 -3
  153. package/dist/hooks/HookGeneratorEnhanced.js.map +1 -1
  154. package/dist/index.d.ts +20 -2
  155. package/dist/index.js +19 -2
  156. package/dist/index.js.map +1 -1
  157. package/dist/knowledge/KnowledgeBase.d.ts +26 -0
  158. package/dist/knowledge/KnowledgeBase.js +109 -8
  159. package/dist/knowledge/KnowledgeBase.js.map +1 -1
  160. package/dist/knowledge/SQLiteKnowledgeBase.js +1 -3
  161. package/dist/knowledge/SQLiteKnowledgeBase.js.map +1 -1
  162. package/dist/knowledge/UbiquitousLanguageManager.d.ts +49 -0
  163. package/dist/knowledge/UbiquitousLanguageManager.js +133 -0
  164. package/dist/knowledge/UbiquitousLanguageManager.js.map +1 -0
  165. package/dist/routing/ModelRouter.js +0 -2
  166. package/dist/routing/ModelRouter.js.map +1 -1
  167. package/dist/skills/ExternalSkills.d.ts +3 -0
  168. package/dist/skills/ExternalSkills.js +20 -0
  169. package/dist/skills/ExternalSkills.js.map +1 -0
  170. package/dist/skills/GrillingSessionSkill.d.ts +65 -0
  171. package/dist/skills/GrillingSessionSkill.js +113 -0
  172. package/dist/skills/GrillingSessionSkill.js.map +1 -0
  173. package/dist/skills/GrillingTemplates.d.ts +7 -0
  174. package/dist/skills/GrillingTemplates.js +38 -0
  175. package/dist/skills/GrillingTemplates.js.map +1 -0
  176. package/dist/skills/SkillDiscovery.d.ts +45 -20
  177. package/dist/skills/SkillDiscovery.js +201 -117
  178. package/dist/skills/SkillDiscovery.js.map +1 -1
  179. package/dist/skills/SkillExecutor.js +1 -3
  180. package/dist/skills/SkillExecutor.js.map +1 -1
  181. package/dist/skills/SkillInstaller.d.ts +40 -0
  182. package/dist/skills/SkillInstaller.js +112 -0
  183. package/dist/skills/SkillInstaller.js.map +1 -0
  184. package/dist/skills/SkillRegistry.js +1 -2
  185. package/dist/skills/SkillRegistry.js.map +1 -1
  186. package/dist/skills/TriggerEngine.js +3 -5
  187. package/dist/skills/TriggerEngine.js.map +1 -1
  188. package/dist/skills/index.d.ts +3 -0
  189. package/dist/skills/index.js +3 -0
  190. package/dist/skills/index.js.map +1 -1
  191. package/dist/tasks/IssueTriageFSM.d.ts +26 -0
  192. package/dist/tasks/IssueTriageFSM.js +107 -0
  193. package/dist/tasks/IssueTriageFSM.js.map +1 -0
  194. package/dist/tasks/TaskEngine.js +1 -5
  195. package/dist/tasks/TaskEngine.js.map +1 -1
  196. package/dist/workflows/DAGBuilder.d.ts +52 -0
  197. package/dist/workflows/DAGBuilder.js +169 -0
  198. package/dist/workflows/DAGBuilder.js.map +1 -0
  199. package/dist/workflows/WorkflowExecutor.js +2 -4
  200. package/dist/workflows/WorkflowExecutor.js.map +1 -1
  201. package/dist/workflows/WorkflowOrchestrator.d.ts +48 -0
  202. package/dist/workflows/WorkflowOrchestrator.js +181 -0
  203. package/dist/workflows/WorkflowOrchestrator.js.map +1 -0
  204. package/dist/workflows/index.d.ts +2 -4
  205. package/dist/workflows/index.js +4 -4
  206. package/dist/workflows/index.js.map +1 -1
  207. package/package.json +2 -2
@@ -0,0 +1,192 @@
1
+ // SCALE Engine — Agent Pool (v0.8.0)
2
+ // Agent 实例池管理:生命周期、任务分配、状态跟踪
3
+ import { defaultProfileRegistry } from './profiles.js';
4
+ // ============================================================================
5
+ // AgentPool 实现
6
+ // ============================================================================
7
+ export class AgentPool {
8
+ constructor(registry, modelRouter, eventBus) {
9
+ this.agents = new Map();
10
+ this.seq = 0;
11
+ this.registry = registry ?? defaultProfileRegistry;
12
+ this.modelRouter = modelRouter;
13
+ this.eventBus = eventBus;
14
+ }
15
+ // ========== 实例管理 ==========
16
+ /** 创建 Agent 实例 */
17
+ spawn(profileId) {
18
+ const profile = this.registry.get(profileId);
19
+ if (!profile) {
20
+ throw new Error(`Profile not found: ${profileId}`);
21
+ }
22
+ const id = `AGENT-${profileId}-${++this.seq}`;
23
+ const model = this.resolveModel(profile);
24
+ const runtime = {
25
+ id,
26
+ profile,
27
+ status: 'idle',
28
+ model,
29
+ startedAt: Date.now(),
30
+ outputArtifacts: [],
31
+ messages: [],
32
+ retryCount: 0
33
+ };
34
+ this.agents.set(id, runtime);
35
+ if (this.eventBus) {
36
+ this.eventBus.emit('agent.spawned', { agentId: id, profileId }, {});
37
+ }
38
+ return runtime;
39
+ }
40
+ /** 获取空闲 Agent */
41
+ getIdleAgents(profileId) {
42
+ return Array.from(this.agents.values())
43
+ .filter(a => a.status === 'idle')
44
+ .filter(a => !profileId || a.profile.id === profileId);
45
+ }
46
+ /** 获取 Agent */
47
+ getAgent(agentId) {
48
+ return this.agents.get(agentId);
49
+ }
50
+ // ========== 任务分配 ==========
51
+ /** 分配任务 */
52
+ assignTask(agentId, taskId) {
53
+ const agent = this.agents.get(agentId);
54
+ if (!agent) {
55
+ throw new Error(`Agent not found: ${agentId}`);
56
+ }
57
+ if (agent.status !== 'idle') {
58
+ throw new Error(`Agent not available (status: ${agent.status})`);
59
+ }
60
+ agent.status = 'running';
61
+ agent.assignedTask = taskId;
62
+ if (this.eventBus) {
63
+ this.eventBus.emit('agent.task_assigned', { agentId, taskId }, {});
64
+ }
65
+ }
66
+ /** 完成任务 */
67
+ complete(agentId, outputArtifacts) {
68
+ const agent = this.agents.get(agentId);
69
+ if (!agent) {
70
+ throw new Error(`Agent not found: ${agentId}`);
71
+ }
72
+ agent.status = 'completed';
73
+ agent.completedAt = Date.now();
74
+ agent.outputArtifacts = outputArtifacts;
75
+ if (this.eventBus) {
76
+ this.eventBus.emit('agent.completed', { agentId, outputs: outputArtifacts }, {});
77
+ }
78
+ }
79
+ /** 任务失败 */
80
+ fail(agentId, reason) {
81
+ const agent = this.agents.get(agentId);
82
+ if (!agent) {
83
+ throw new Error(`Agent not found: ${agentId}`);
84
+ }
85
+ agent.status = 'failed';
86
+ agent.completedAt = Date.now();
87
+ agent.retryCount++;
88
+ if (this.eventBus) {
89
+ this.eventBus.emit('agent.failed', { agentId, reason, retryCount: agent.retryCount }, {});
90
+ }
91
+ }
92
+ /** 阻塞 Agent */
93
+ block(agentId, blockedBy) {
94
+ const agent = this.agents.get(agentId);
95
+ if (!agent) {
96
+ throw new Error(`Agent not found: ${agentId}`);
97
+ }
98
+ agent.status = 'blocked';
99
+ agent.blockedBy = blockedBy;
100
+ if (this.eventBus) {
101
+ this.eventBus.emit('agent.blocked', { agentId, blockedBy }, {});
102
+ }
103
+ }
104
+ /** 解除阻塞 */
105
+ unblock(agentId) {
106
+ const agent = this.agents.get(agentId);
107
+ if (!agent || agent.status !== 'blocked')
108
+ return;
109
+ agent.status = 'idle';
110
+ agent.blockedBy = undefined;
111
+ if (this.eventBus) {
112
+ this.eventBus.emit('agent.unblocked', { agentId }, {});
113
+ }
114
+ }
115
+ // ========== 资源回收 ==========
116
+ /** 回收 Agent */
117
+ recycle(agentId) {
118
+ const agent = this.agents.get(agentId);
119
+ if (!agent)
120
+ return;
121
+ this.agents.delete(agentId);
122
+ if (this.eventBus) {
123
+ this.eventBus.emit('agent.recycled', { agentId }, {});
124
+ }
125
+ }
126
+ /** 批量回收已完成的 Agent */
127
+ recycleCompleted() {
128
+ const toRecycle = Array.from(this.agents.values())
129
+ .filter(a => a.status === 'completed' || a.status === 'failed')
130
+ .map(a => a.id);
131
+ for (const id of toRecycle) {
132
+ this.recycle(id);
133
+ }
134
+ return toRecycle;
135
+ }
136
+ // ========== 状态查询 ==========
137
+ /** 获取状态 */
138
+ getStatus(agentId) {
139
+ return this.agents.get(agentId)?.status ?? null;
140
+ }
141
+ /** 获取所有 Agent */
142
+ listAll() {
143
+ return Array.from(this.agents.values());
144
+ }
145
+ /** 获取活跃 Agent 数量 */
146
+ getActiveCount() {
147
+ return this.listAll().filter(a => a.status === 'running' || a.status === 'blocked').length;
148
+ }
149
+ /** 获取 Agent 执行结果 */
150
+ getResult(agentId) {
151
+ const agent = this.agents.get(agentId);
152
+ if (!agent)
153
+ return null;
154
+ return {
155
+ agentId: agent.id,
156
+ status: agent.status,
157
+ outputArtifacts: agent.outputArtifacts,
158
+ duration: agent.completedAt ? agent.completedAt - agent.startedAt : 0,
159
+ retryCount: agent.retryCount
160
+ };
161
+ }
162
+ // ========== Private Methods ==========
163
+ /** 解析模型配置 */
164
+ resolveModel(profile) {
165
+ // 如果有 ModelRouter,使用它选择模型
166
+ if (this.modelRouter) {
167
+ const routed = this.modelRouter.route({
168
+ taskComplexity: profile.preferredModel === 'powerful' ? 0.8 :
169
+ profile.preferredModel === 'fast' ? 0.3 : 0.5,
170
+ artifactType: 'Task'
171
+ });
172
+ // 从模型名称推断 provider
173
+ const provider = routed.name.includes('claude') ? 'anthropic' :
174
+ routed.name.includes('gpt') ? 'openai' : 'anthropic';
175
+ return {
176
+ provider,
177
+ modelId: routed.name,
178
+ tier: routed.tier === 'local' ? 'fast' : routed.tier
179
+ };
180
+ }
181
+ // 默认模型配置
182
+ const defaultModels = {
183
+ 'fast': { provider: 'anthropic', modelId: 'claude-haiku-4', tier: 'fast' },
184
+ 'balanced': { provider: 'anthropic', modelId: 'claude-sonnet-4', tier: 'balanced' },
185
+ 'powerful': { provider: 'anthropic', modelId: 'claude-opus-4', tier: 'powerful' }
186
+ };
187
+ return defaultModels[profile.preferredModel] || defaultModels['balanced'];
188
+ }
189
+ }
190
+ /** 默认 Pool 实例 */
191
+ export const defaultAgentPool = new AgentPool();
192
+ //# sourceMappingURL=AgentPool.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AgentPool.js","sourceRoot":"","sources":["../../src/agents/AgentPool.ts"],"names":[],"mappings":"AAAA,qCAAqC;AACrC,6BAA6B;AAK7B,OAAO,EAAwB,sBAAsB,EAAE,MAAM,eAAe,CAAA;AAsB5E,+EAA+E;AAC/E,eAAe;AACf,+EAA+E;AAE/E,MAAM,OAAO,SAAS;IAOpB,YACE,QAA+B,EAC/B,WAA0B,EAC1B,QAAoB;QATd,WAAM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,SAAS,EAAE,CAAA"}
@@ -0,0 +1,20 @@
1
+ import type { AgentProfile, AgentDomain } from './types.js';
2
+ export interface IAgentRegistry {
3
+ register(profile: AgentProfile): void;
4
+ get(id: string): AgentProfile | undefined;
5
+ getByDomain(domain: AgentDomain): AgentProfile[];
6
+ getByRole(role: string): AgentProfile[];
7
+ list(): string[];
8
+ getAll(): AgentProfile[];
9
+ }
10
+ export declare class AgentRegistry implements IAgentRegistry {
11
+ private profiles;
12
+ constructor(initialProfiles?: AgentProfile[]);
13
+ register(profile: AgentProfile): void;
14
+ get(id: string): AgentProfile | undefined;
15
+ getByDomain(domain: AgentDomain): AgentProfile[];
16
+ getByRole(role: string): AgentProfile[];
17
+ list(): string[];
18
+ getAll(): AgentProfile[];
19
+ }
20
+ export declare const DEFAULT_REGISTRY: AgentRegistry;
@@ -0,0 +1,36 @@
1
+ // SCALE Engine — Agent Registry
2
+ // Profile 注册与查询
3
+ import { PROFESSIONAL_AGENTS } from './profiles.js';
4
+ import { logger } from '../core/logger.js';
5
+ export class AgentRegistry {
6
+ constructor(initialProfiles = PROFESSIONAL_AGENTS) {
7
+ this.profiles = new Map();
8
+ for (const profile of initialProfiles) {
9
+ this.register(profile);
10
+ }
11
+ }
12
+ register(profile) {
13
+ if (this.profiles.has(profile.id)) {
14
+ throw new Error(`Agent profile already registered: ${profile.id}`);
15
+ }
16
+ this.profiles.set(profile.id, profile);
17
+ logger.debug({ profileId: profile.id, domain: profile.domain }, 'Agent profile registered');
18
+ }
19
+ get(id) {
20
+ return this.profiles.get(id);
21
+ }
22
+ getByDomain(domain) {
23
+ return Array.from(this.profiles.values()).filter(p => p.domain === domain);
24
+ }
25
+ getByRole(role) {
26
+ return Array.from(this.profiles.values()).filter(p => p.inheritsRole === role);
27
+ }
28
+ list() {
29
+ return Array.from(this.profiles.keys());
30
+ }
31
+ getAll() {
32
+ return Array.from(this.profiles.values());
33
+ }
34
+ }
35
+ export const DEFAULT_REGISTRY = new AgentRegistry();
36
+ //#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AY;QACpB,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,YAAY,KAAK,IAAI,CAAC,CAAA;IAChF,CAAC;IAED,IAAI;QACF,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAA;IACzC,CAAC;IAED,MAAM;QACJ,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAA;IAC3C,CAAC;CACF;AAED,MAAM,CAAC,MAAM,gBAAgB,GAAG,IAAI,aAAa,EAAE,CAAA"}
@@ -0,0 +1,73 @@
1
+ import type { AgentProfile } from './types.js';
2
+ import { AgentProfileRegistry } from './profiles.js';
3
+ export interface YAMLAgentDefinition {
4
+ id: string;
5
+ name: string;
6
+ description?: string;
7
+ domain: string;
8
+ emoji?: string;
9
+ color?: string;
10
+ identity?: {
11
+ role: string;
12
+ personality: string;
13
+ memory: string;
14
+ experience: string;
15
+ };
16
+ missions?: Array<{
17
+ name: string;
18
+ description: string;
19
+ priority: 'critical' | 'high' | 'normal';
20
+ }>;
21
+ rules?: Array<{
22
+ name: string;
23
+ description: string;
24
+ enforcement: 'block' | 'warn' | 'suggest';
25
+ }>;
26
+ inheritsRole: string;
27
+ capabilities: string[];
28
+ preferredModel: string;
29
+ deliverables?: Array<{
30
+ name: string;
31
+ template: string;
32
+ format: 'markdown' | 'code' | 'json' | 'yaml';
33
+ }>;
34
+ workflow?: Array<{
35
+ stepId: string;
36
+ name: string;
37
+ description: string;
38
+ outputs?: string[];
39
+ }>;
40
+ successMetrics?: Array<{
41
+ name: string;
42
+ target: string;
43
+ measurement: string;
44
+ }>;
45
+ outputFormat?: {
46
+ fileTypes: string[];
47
+ style: string;
48
+ };
49
+ collaboration?: {
50
+ reportsTo?: string;
51
+ sharesWith: string[];
52
+ };
53
+ }
54
+ export interface IAgentSourceLoader {
55
+ loadFromDirectory(dir: string): AgentProfile[];
56
+ loadFromFile(filePath: string): AgentProfile | null;
57
+ loadFromYAML(content: string): AgentProfile | null;
58
+ validateDefinition(def: YAMLAgentDefinition): boolean;
59
+ }
60
+ export declare class AgentSourceLoader implements IAgentSourceLoader {
61
+ private registry;
62
+ constructor(registry?: AgentProfileRegistry);
63
+ loadFromDirectory(dir: string): AgentProfile[];
64
+ loadFromFile(filePath: string): AgentProfile | null;
65
+ loadFromYAML(content: string): AgentProfile | null;
66
+ validateDefinition(def: YAMLAgentDefinition): boolean;
67
+ private convertDefinition;
68
+ exportToYAML(profile: AgentProfile): string;
69
+ }
70
+ export declare const defaultAgentSourceLoader: AgentSourceLoader;
71
+ export declare function loadAgentsFromDirectory(dir: string): AgentProfile[];
72
+ export declare function loadAgentFromFile(filePath: string): AgentProfile | null;
73
+ export declare function exportProfileToYAML(profile: AgentProfile): string;
@@ -0,0 +1,101 @@
1
+ // SCALE Engine — Agent Source Loader (v0.9.0)
2
+ // 从外部 YAML 文件加载 Agent Profile 定义
3
+ import { existsSync, readdirSync, readFileSync } from 'node:fs';
4
+ import { join, extname } from 'node:path';
5
+ import * as yaml from 'js-yaml';
6
+ import { defaultProfileRegistry } from './profiles.js';
7
+ import { logger } from '../core/logger.js';
8
+ export class AgentSourceLoader {
9
+ constructor(registry = defaultProfileRegistry) { this.registry = registry; }
10
+ loadFromDirectory(dir) {
11
+ if (!existsSync(dir)) {
12
+ logger.warn({ dir }, 'Agent source directory not found');
13
+ return [];
14
+ }
15
+ const profiles = [];
16
+ const entries = readdirSync(dir, { withFileTypes: true });
17
+ for (const entry of entries) {
18
+ if (entry.isDirectory()) {
19
+ profiles.push(...this.loadFromDirectory(join(dir, entry.name)));
20
+ }
21
+ else if (entry.isFile() && (extname(entry.name) === '.yaml' || extname(entry.name) === '.yml')) {
22
+ const profile = this.loadFromFile(join(dir, entry.name));
23
+ if (profile) {
24
+ profiles.push(profile);
25
+ try {
26
+ this.registry.register(profile);
27
+ }
28
+ catch { }
29
+ }
30
+ }
31
+ }
32
+ return profiles;
33
+ }
34
+ loadFromFile(filePath) {
35
+ if (!existsSync(filePath))
36
+ return null;
37
+ try {
38
+ return this.loadFromYAML(readFileSync(filePath, 'utf-8'));
39
+ }
40
+ catch {
41
+ return null;
42
+ }
43
+ }
44
+ loadFromYAML(content) {
45
+ try {
46
+ const def = yaml.load(content);
47
+ if (!this.validateDefinition(def))
48
+ return null;
49
+ return this.convertDefinition(def);
50
+ }
51
+ catch {
52
+ return null;
53
+ }
54
+ }
55
+ validateDefinition(def) {
56
+ const required = ['id', 'name', 'domain', 'inheritsRole', 'capabilities'];
57
+ for (const f of required)
58
+ if (!def[f])
59
+ return false;
60
+ const validDomains = ['frontend', 'backend', 'testing', 'ui-design', 'operations', 'product', 'code-review', 'security', 'documentation', 'planning', 'exploration', 'database', 'performance', 'architecture'];
61
+ if (!validDomains.includes(def.domain))
62
+ return false;
63
+ return true;
64
+ }
65
+ convertDefinition(def) {
66
+ const profile = {
67
+ id: def.id, name: def.name, description: def.description ?? '',
68
+ domain: def.domain, inheritsRole: def.inheritsRole,
69
+ capabilities: def.capabilities, preferredModel: def.preferredModel || 'balanced'
70
+ };
71
+ if (def.emoji)
72
+ profile.emoji = def.emoji;
73
+ if (def.color)
74
+ profile.color = def.color;
75
+ if (def.identity)
76
+ profile.identity = def.identity;
77
+ if (def.missions)
78
+ profile.missions = def.missions;
79
+ if (def.rules)
80
+ profile.rules = def.rules;
81
+ if (def.outputFormat)
82
+ profile.outputFormat = def.outputFormat;
83
+ if (def.deliverables)
84
+ profile.deliverables = def.deliverables;
85
+ if (def.workflow)
86
+ profile.workflow = def.workflow;
87
+ if (def.successMetrics)
88
+ profile.successMetrics = def.successMetrics;
89
+ if (def.collaboration)
90
+ profile.collaboration = def.collaboration;
91
+ return profile;
92
+ }
93
+ exportToYAML(profile) {
94
+ return yaml.dump(profile);
95
+ }
96
+ }
97
+ export const defaultAgentSourceLoader = new AgentSourceLoader();
98
+ export function loadAgentsFromDirectory(dir) { return defaultAgentSourceLoader.loadFromDirectory(dir); }
99
+ export function loadAgentFromFile(filePath) { return defaultAgentSourceLoader.loadFromFile(filePath); }
100
+ export function exportProfileToYAML(profile) { return defaultAgentSourceLoader.exportToYAML(profile); }
101
+ //# sourceMappingURL=AgentSourceLoader.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AgentSourceLoader.js","sourceRoot":"","sources":["../../src/agents/AgentSourceLoader.ts"],"names":[],"mappings":"AAAA,8CAA8C;AAC9C,iCAAiC;AAEjC,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAC/D,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACzC,OAAO,KAAK,IAAI,MAAM,SAAS,CAAA;AAE/B,OAAO,EAAwB,sBAAsB,EAAE,MAAM,eAAe,CAAA;AAC5E,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAA;AA6B1C,MAAM,OAAO,iBAAiB;IAE5B,YAAY,WAAiC,sBAAsB,IAAI,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAA,CAAC,CAAC;IAEjG,iBAAiB,CAAC,GAAW;QAC3B,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;YAAC,MAAM,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,EAAE,kCAAkC,CAAC,CAAC;YAAC,OAAO,EAAE,CAAA;QAAC,CAAC;QAC7F,MAAM,QAAQ,GAAmB,EAAE,CAAA;QACnC,MAAM,OAAO,GAAG,WAAW,CAAC,GAAG,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,CAAA;QACzD,KAAK,MAAM,KAAK,IAAI,OAAO,EAAE,CAAC;YAC5B,IAAI,KAAK,CAAC,WAAW,EAAE,EAAE,CAAC;gBAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,IA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AE,OAAO,CAAC,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAA;QACjD,IAAI,GAAG,CAAC,KAAK;YAAE,OAAO,CAAC,KAAK,GAAG,GAAG,CAAC,KAAK,CAAA;QACxC,IAAI,GAAG,CAAC,YAAY;YAAE,OAAO,CAAC,YAAY,GAAG,GAAG,CAAC,YAAY,CAAA;QAC7D,IAAI,GAAG,CAAC,YAAY;YAAE,OAAO,CAAC,YAAY,GAAG,GAAG,CAAC,YAAY,CAAA;QAC7D,IAAI,GAAG,CAAC,QAAQ;YAAE,OAAO,CAAC,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAA;QACjD,IAAI,GAAG,CAAC,cAAc;YAAE,OAAO,CAAC,cAAc,GAAG,GAAG,CAAC,cAAc,CAAA;QACnE,IAAI,GAAG,CAAC,aAAa;YAAE,OAAO,CAAC,aAAa,GAAG,GAAG,CAAC,aAAa,CAAA;QAChE,OAAO,OAAO,CAAA;IAChB,CAAC;IAED,YAAY,CAAC,OAAqB;QAChC,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;IAC3B,CAAC;CACF;AAED,MAAM,CAAC,MAAM,wBAAwB,GAAG,IAAI,iBAAiB,EAAE,CAAA;AAC/D,MAAM,UAAU,uBAAuB,CAAC,GAAW,IAAoB,OAAO,wBAAwB,CAAC,iBAAiB,CAAC,GAAG,CAAC,CAAA,CAAC,CAAC;AAC/H,MAAM,UAAU,iBAAiB,CAAC,QAAgB,IAAyB,OAAO,wBAAwB,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAA,CAAC,CAAC;AACnI,MAAM,UAAU,mBAAmB,CAAC,OAAqB,IAAY,OAAO,wBAAwB,CAAC,YAAY,CAAC,OAAO,CAAC,CAAA,CAAC,CAAC"}
@@ -0,0 +1,53 @@
1
+ import type { ArtifactId } from '../artifact/types.js';
2
+ import type { Token } from '../core/container.js';
3
+ export interface AgentCapability {
4
+ name: string;
5
+ description: string;
6
+ inputs: string[];
7
+ outputs: string[];
8
+ }
9
+ export interface AgentTaskContext {
10
+ sessionId: string;
11
+ parentArtifactId?: ArtifactId;
12
+ userInput: string;
13
+ workingDirectory: string;
14
+ techStack?: string[];
15
+ constraints?: Record<string, unknown>;
16
+ }
17
+ export interface AgentResult {
18
+ success: boolean;
19
+ output?: string;
20
+ artifactsCreated?: ArtifactId[];
21
+ error?: string;
22
+ durationMs: number;
23
+ modelUsed: string;
24
+ tokensUsed?: number;
25
+ }
26
+ export interface AgentDefinition {
27
+ id: string;
28
+ name: string;
29
+ description: string;
30
+ triggers: string[];
31
+ capabilities: AgentCapability[];
32
+ toolAllowlist: string[];
33
+ toolDenylist?: string[];
34
+ modelPreference: 'haiku' | 'sonnet' | 'opus';
35
+ maxConcurrency: number;
36
+ timeoutMs?: number;
37
+ priority: number;
38
+ }
39
+ export interface IAgent {
40
+ readonly definition: AgentDefinition;
41
+ execute(context: AgentTaskContext): Promise<AgentResult>;
42
+ canHandle(userInput: string): boolean;
43
+ getConfidence(userInput: string): number;
44
+ }
45
+ export interface IAgentManager {
46
+ register(definition: AgentDefinition, implementation?: IAgent): void;
47
+ dispatch(context: AgentTaskContext): Promise<AgentResult>;
48
+ findBestAgent(userInput: string): AgentDefinition | null;
49
+ listAll(): AgentDefinition[];
50
+ getById(id: string): IAgent | undefined;
51
+ hasHandler(userInput: string): boolean;
52
+ }
53
+ export declare const AGENT_MANAGER_TOKEN: Token<IAgentManager>;
@@ -0,0 +1,4 @@
1
+ // SCALE Engine — Agent System Interface
2
+ // Purpose: Define contracts for subagent delegation
3
+ export const AGENT_MANAGER_TOKEN = Symbol('AgentManager');
4
+ //# sourceMappingURL=IAgent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IAgent.js","sourceRoot":"","sources":["../../src/agents/IAgent.ts"],"names":[],"mappings":"AAAA,wCAAwC;AACxC,oDAAoD;AA6DpD,MAAM,CAAC,MAAM,mBAAmB,GAAG,MAAM,CAAC,cAAc,CAAyB,CAAA"}
@@ -0,0 +1,2 @@
1
+ import type { AgentDefinition } from '../IAgent.js';
2
+ export declare const DEBUGGER_AGENT: AgentDefinition;
@@ -0,0 +1,6 @@
1
+ export const DEBUGGER_AGENT = {
2
+ id: 'debugger', name: 'Debugger', description: 'Debugging agent',
3
+ triggers: ['debug', 'fix'], capabilities: [{ name: 'debug', description: 'Debug', inputs: [], outputs: [] }],
4
+ toolAllowlist: ['Read', 'Grep', 'Bash'], modelPreference: 'sonnet', maxConcurrency: 2, priority: 12,
5
+ };
6
+ //# sourceMappingURL=debugger.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"debugger.js","sourceRoot":"","sources":["../../../src/agents/definitions/debugger.ts"],"names":[],"mappings":"AACA,MAAM,CAAC,MAAM,cAAc,GAAoB;IAC7C,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,UAAU,EAAE,WAAW,EAAE,iBAAiB;IAChE,QAAQ,EAAE,CAAC,OAAO,EAAE,KAAK,CAAC,EAAE,YAAY,EAAE,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;IAC5G,aAAa,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,eAAe,EAAE,QAAQ,EAAE,cAAc,EAAE,CAAC,EAAE,QAAQ,EAAE,EAAE;CACpG,CAAA"}
@@ -0,0 +1,2 @@
1
+ import type { AgentDefinition } from '../IAgent.js';
2
+ export declare const DOC_WRITER_AGENT: AgentDefinition;
@@ -0,0 +1,6 @@
1
+ export const DOC_WRITER_AGENT = {
2
+ id: 'doc-writer', name: 'Doc Writer', description: 'Documentation agent',
3
+ triggers: ['document', 'readme'], capabilities: [{ name: 'doc', description: 'Documentation', inputs: [], outputs: [] }],
4
+ toolAllowlist: ['Read', 'Write'], modelPreference: 'haiku', maxConcurrency: 3, priority: 3,
5
+ };
6
+ //# sourceMappingURL=doc-writer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"doc-writer.js","sourceRoot":"","sources":["../../../src/agents/definitions/doc-writer.ts"],"names":[],"mappings":"AACA,MAAM,CAAC,MAAM,gBAAgB,GAAoB;IAC/C,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,YAAY,EAAE,WAAW,EAAE,qBAAqB;IACxE,QAAQ,EAAE,CAAC,UAAU,EAAE,QAAQ,CAAC,EAAE,YAAY,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;IACxH,aAAa,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,eAAe,EAAE,OAAO,EAAE,cAAc,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC;CAC3F,CAAA"}
@@ -0,0 +1,2 @@
1
+ import type { AgentDefinition } from '../IAgent.js';
2
+ export declare const IMPLEMENTER_AGENT: AgentDefinition;
@@ -0,0 +1,6 @@
1
+ export const IMPLEMENTER_AGENT = {
2
+ id: 'implementer', name: 'Implementer', description: 'Implementation agent',
3
+ triggers: ['implement', 'code'], capabilities: [{ name: 'implement', description: 'Implement', inputs: [], outputs: [] }],
4
+ toolAllowlist: ['Read', 'Edit', 'Write'], modelPreference: 'sonnet', maxConcurrency: 2, priority: 8,
5
+ };
6
+ //# sourceMappingURL=implementer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"implementer.js","sourceRoot":"","sources":["../../../src/agents/definitions/implementer.ts"],"names":[],"mappings":"AACA,MAAM,CAAC,MAAM,iBAAiB,GAAoB;IAChD,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,aAAa,EAAE,WAAW,EAAE,sBAAsB;IAC3E,QAAQ,EAAE,CAAC,WAAW,EAAE,MAAM,CAAC,EAAE,YAAY,EAAE,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;IACzH,aAAa,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,eAAe,EAAE,QAAQ,EAAE,cAAc,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC;CACpG,CAAA"}
@@ -0,0 +1,2 @@
1
+ import type { AgentDefinition } from '../IAgent.js';
2
+ export declare const PLANNER_AGENT: AgentDefinition;
@@ -0,0 +1,6 @@
1
+ export const PLANNER_AGENT = {
2
+ id: 'planner', name: 'Planner', description: 'Planning agent',
3
+ triggers: ['plan', 'design'], capabilities: [{ name: 'plan', description: 'Plan', inputs: [], outputs: [] }],
4
+ toolAllowlist: ['Read', 'Grep'], modelPreference: 'opus', maxConcurrency: 1, priority: 10,
5
+ };
6
+ //# sourceMappingURL=planner.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"planner.js","sourceRoot":"","sources":["../../../src/agents/definitions/planner.ts"],"names":[],"mappings":"AACA,MAAM,CAAC,MAAM,aAAa,GAAoB;IAC5C,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE,WAAW,EAAE,gBAAgB;IAC7D,QAAQ,EAAE,CAAC,MAAM,EAAE,QAAQ,CAAC,EAAE,YAAY,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;IAC5G,aAAa,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,eAAe,EAAE,MAAM,EAAE,cAAc,EAAE,CAAC,EAAE,QAAQ,EAAE,EAAE;CAC1F,CAAA"}
@@ -0,0 +1,2 @@
1
+ import type { AgentDefinition } from '../IAgent.js';
2
+ export declare const RESEARCHER_AGENT: AgentDefinition;
@@ -0,0 +1,6 @@
1
+ export const RESEARCHER_AGENT = {
2
+ id: 'researcher', name: 'Researcher', description: 'Research agent',
3
+ triggers: ['search', 'find'], capabilities: [{ name: 'research', description: 'Research', inputs: [], outputs: [] }],
4
+ toolAllowlist: ['Glob', 'Grep'], modelPreference: 'haiku', maxConcurrency: 3, priority: 5,
5
+ };
6
+ //# sourceMappingURL=researcher.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"researcher.js","sourceRoot":"","sources":["../../../src/agents/definitions/researcher.ts"],"names":[],"mappings":"AACA,MAAM,CAAC,MAAM,gBAAgB,GAAoB;IAC/C,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,YAAY,EAAE,WAAW,EAAE,gBAAgB;IACnE,QAAQ,EAAE,CAAC,QAAQ,EAAE,MAAM,CAAC,EAAE,YAAY,EAAE,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;IACpH,aAAa,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,eAAe,EAAE,OAAO,EAAE,cAAc,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC;CAC1F,CAAA"}
@@ -0,0 +1,2 @@
1
+ import type { AgentDefinition } from '../IAgent.js';
2
+ export declare const REVIEWER_AGENT: AgentDefinition;
@@ -0,0 +1,6 @@
1
+ export const REVIEWER_AGENT = {
2
+ id: 'reviewer', name: 'Reviewer', description: 'Review agent',
3
+ triggers: ['review', 'check'], capabilities: [{ name: 'review', description: 'Review', inputs: [], outputs: [] }],
4
+ toolAllowlist: ['Read', 'Grep'], modelPreference: 'sonnet', maxConcurrency: 2, priority: 7,
5
+ };
6
+ //# sourceMappingURL=reviewer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reviewer.js","sourceRoot":"","sources":["../../../src/agents/definitions/reviewer.ts"],"names":[],"mappings":"AACA,MAAM,CAAC,MAAM,cAAc,GAAoB;IAC7C,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,UAAU,EAAE,WAAW,EAAE,cAAc;IAC7D,QAAQ,EAAE,CAAC,QAAQ,EAAE,OAAO,CAAC,EAAE,YAAY,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;IACjH,aAAa,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,eAAe,EAAE,QAAQ,EAAE,cAAc,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC;CAC3F,CAAA"}
@@ -0,0 +1,2 @@
1
+ import type { AgentDefinition } from '../IAgent.js';
2
+ export declare const SECURITY_AGENT: AgentDefinition;
@@ -0,0 +1,6 @@
1
+ export const SECURITY_AGENT = {
2
+ id: 'security', name: 'Security', description: 'Security agent',
3
+ triggers: ['security', 'audit'], capabilities: [{ name: 'security', description: 'Security', inputs: [], outputs: [] }],
4
+ toolAllowlist: ['Read', 'Grep'], modelPreference: 'opus', maxConcurrency: 1, priority: 15,
5
+ };
6
+ //# sourceMappingURL=security.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"security.js","sourceRoot":"","sources":["../../../src/agents/definitions/security.ts"],"names":[],"mappings":"AACA,MAAM,CAAC,MAAM,cAAc,GAAoB;IAC7C,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,UAAU,EAAE,WAAW,EAAE,gBAAgB;IAC/D,QAAQ,EAAE,CAAC,UAAU,EAAE,OAAO,CAAC,EAAE,YAAY,EAAE,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;IACvH,aAAa,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,eAAe,EAAE,MAAM,EAAE,cAAc,EAAE,CAAC,EAAE,QAAQ,EAAE,EAAE;CAC1F,CAAA"}
@@ -0,0 +1,2 @@
1
+ import type { AgentDefinition } from '../IAgent.js';
2
+ export declare const TESTER_AGENT: AgentDefinition;
@@ -0,0 +1,6 @@
1
+ export const TESTER_AGENT = {
2
+ id: 'tester', name: 'Tester', description: 'Testing agent',
3
+ triggers: ['test', 'tdd'], capabilities: [{ name: 'test', description: 'Test', inputs: [], outputs: [] }],
4
+ toolAllowlist: ['Read', 'Edit', 'Write', 'Bash'], modelPreference: 'sonnet', maxConcurrency: 2, priority: 9,
5
+ };
6
+ //# sourceMappingURL=tester.js.map