@compilr-dev/cli 0.6.1 → 0.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/CHANGELOG.md +104 -0
  2. package/README.md +12 -0
  3. package/dist/commands-v2/handlers/index.js +2 -2
  4. package/dist/compilr-diff-companion.vsix +0 -0
  5. package/dist/index.js +5 -2
  6. package/dist/utils/update-checker.d.ts +6 -1
  7. package/dist/utils/update-checker.js +16 -1
  8. package/package.json +5 -4
  9. package/dist/.tsbuildinfo.app +0 -1
  10. package/dist/.tsbuildinfo.data +0 -1
  11. package/dist/.tsbuildinfo.domain +0 -1
  12. package/dist/.tsbuildinfo.foundation +0 -1
  13. package/dist/guide/guide-content.d.ts +0 -23
  14. package/dist/guide/guide-content.js +0 -196
  15. package/dist/multi-agent/activity.d.ts +0 -21
  16. package/dist/multi-agent/activity.js +0 -34
  17. package/dist/multi-agent/agent-selection.d.ts +0 -55
  18. package/dist/multi-agent/agent-selection.js +0 -90
  19. package/dist/multi-agent/artifacts.d.ts +0 -197
  20. package/dist/multi-agent/artifacts.js +0 -379
  21. package/dist/multi-agent/collision-utils.d.ts +0 -16
  22. package/dist/multi-agent/collision-utils.js +0 -28
  23. package/dist/multi-agent/context-resolver.d.ts +0 -97
  24. package/dist/multi-agent/context-resolver.js +0 -316
  25. package/dist/multi-agent/mention-parser.d.ts +0 -64
  26. package/dist/multi-agent/mention-parser.js +0 -146
  27. package/dist/multi-agent/shared-context.d.ts +0 -293
  28. package/dist/multi-agent/shared-context.js +0 -671
  29. package/dist/multi-agent/skill-requirements.d.ts +0 -66
  30. package/dist/multi-agent/skill-requirements.js +0 -178
  31. package/dist/multi-agent/task-assignment.d.ts +0 -69
  32. package/dist/multi-agent/task-assignment.js +0 -123
  33. package/dist/multi-agent/task-suggestion.d.ts +0 -31
  34. package/dist/multi-agent/task-suggestion.js +0 -72
  35. package/dist/multi-agent/team-agent.d.ts +0 -201
  36. package/dist/multi-agent/team-agent.js +0 -488
  37. package/dist/multi-agent/team.d.ts +0 -286
  38. package/dist/multi-agent/team.js +0 -610
  39. package/dist/multi-agent/tool-config.d.ts +0 -110
  40. package/dist/multi-agent/tool-config.js +0 -661
  41. package/dist/multi-agent/types.d.ts +0 -211
  42. package/dist/multi-agent/types.js +0 -617
  43. package/dist/tools/guide-tool.d.ts +0 -12
  44. package/dist/tools/guide-tool.js +0 -59
@@ -1,286 +0,0 @@
1
- /**
2
- * AgentTeam - Multi-agent orchestration
3
- *
4
- * Manages a team of persistent agents:
5
- * - Agent switching ($name prefix)
6
- * - Isolated contexts per agent
7
- * - Team-level persistence
8
- * - Event notifications
9
- */
10
- import type { Agent, AgentConfig } from '@compilr-dev/sdk';
11
- import { TeamAgent } from './team-agent.js';
12
- import type { TeamAgentConfig, SerializedTeam, TeamEventHandler, AgentRole } from './types.js';
13
- import type { ModelTier } from '../models/index.js';
14
- import { SharedContextManager } from './shared-context.js';
15
- import { ArtifactStore } from './artifacts.js';
16
- import type { CustomAgentDefinition } from './custom-agents.js';
17
- /**
18
- * Configuration for creating an AgentTeam
19
- */
20
- export interface AgentTeamConfig {
21
- /**
22
- * Team name (for display and persistence)
23
- */
24
- name?: string;
25
- /**
26
- * Factory function to create Agent instances
27
- * The team uses this to create agents with consistent configuration
28
- * @param config - Agent configuration
29
- * @param systemPromptAddition - Additional system prompt content
30
- * @param useMinimalSystemPrompt - Use minimal system prompt
31
- * @param noTools - Skip tool registration
32
- * @param toolFilter - Limit which tools this agent can use
33
- * @param modelTier - Model tier for this agent (fast/balanced/powerful)
34
- */
35
- agentFactory: (config: Partial<AgentConfig>, systemPromptAddition?: string, useMinimalSystemPrompt?: boolean, noTools?: boolean, toolFilter?: string[], modelTier?: ModelTier) => Promise<Agent>;
36
- /**
37
- * Initial agents to add to the team (optional)
38
- * If not provided, starts with just the default agent
39
- */
40
- initialAgents?: TeamAgentConfig[];
41
- /**
42
- * Event handler for team events
43
- */
44
- onEvent?: TeamEventHandler;
45
- /**
46
- * Shared context manager (optional, created if not provided)
47
- */
48
- sharedContext?: SharedContextManager;
49
- /**
50
- * Artifact store (optional, created if not provided)
51
- */
52
- artifactStore?: ArtifactStore;
53
- }
54
- /**
55
- * AgentTeam orchestrates multiple persistent agents
56
- */
57
- export declare class AgentTeam {
58
- /**
59
- * Team name
60
- */
61
- readonly name: string;
62
- /**
63
- * Map of agent ID to TeamAgent
64
- */
65
- private readonly agents;
66
- /**
67
- * Currently active agent ID
68
- */
69
- private _activeAgentId;
70
- /**
71
- * Coordinator agent ID (optional)
72
- */
73
- private _coordinatorId?;
74
- /**
75
- * Factory for creating agents
76
- */
77
- private readonly agentFactory;
78
- /**
79
- * Event handler
80
- */
81
- private readonly onEvent?;
82
- /**
83
- * Shared context manager for cross-agent knowledge sharing
84
- */
85
- private readonly _sharedContext;
86
- /**
87
- * Artifact store for team artifacts
88
- */
89
- private readonly _artifactStore;
90
- /**
91
- * Track handoff source: targetAgentId → sourceAgentId
92
- * Used for one-hop prevention (agents that were handed a task
93
- * cannot re-hand it off, except back to the coordinator)
94
- */
95
- private readonly _handedFrom;
96
- /**
97
- * Creation timestamp
98
- */
99
- private readonly createdAt;
100
- /**
101
- * Last updated timestamp
102
- */
103
- private updatedAt;
104
- constructor(config: AgentTeamConfig);
105
- /**
106
- * Get the currently active agent ID
107
- */
108
- get activeAgentId(): string;
109
- /**
110
- * Get the coordinator agent ID (if set)
111
- */
112
- get coordinatorId(): string | undefined;
113
- /**
114
- * Get the shared context manager
115
- */
116
- get sharedContext(): SharedContextManager;
117
- /**
118
- * Get the artifact store
119
- */
120
- get artifactStore(): ArtifactStore;
121
- /**
122
- * Get the currently active TeamAgent
123
- */
124
- getActive(): TeamAgent;
125
- /**
126
- * Get the currently active Agent instance
127
- * Returns null if not initialized
128
- */
129
- getActiveAgent(): Agent | null;
130
- /**
131
- * Get a specific TeamAgent by ID
132
- */
133
- get(id: string): TeamAgent | undefined;
134
- /**
135
- * Set the agent instance for the default TeamAgent
136
- * Used when the agent is created before the team
137
- */
138
- setDefaultAgent(agent: Agent): void;
139
- /**
140
- * Check if an agent exists in the team
141
- */
142
- has(id: string): boolean;
143
- /**
144
- * Get all agent IDs
145
- */
146
- getAgentIds(): string[];
147
- /**
148
- * Get all TeamAgents
149
- */
150
- getAll(): TeamAgent[];
151
- /**
152
- * Get team size (number of agents)
153
- */
154
- get size(): number;
155
- /**
156
- * Add a new agent to the team
157
- */
158
- addAgent(config: TeamAgentConfig): Promise<TeamAgent>;
159
- /**
160
- * Add an agent from a predefined role
161
- * @param role - The predefined role
162
- * @param id - Optional custom ID (defaults to role name)
163
- * @param modelTier - Optional model tier override (defaults to role's default tier)
164
- */
165
- addAgentFromRole(role: AgentRole, id?: string, modelTier?: ModelTier): Promise<TeamAgent>;
166
- /**
167
- * Add a custom agent from a CustomAgentDefinition
168
- */
169
- addCustomAgent(def: CustomAgentDefinition): Promise<TeamAgent>;
170
- /**
171
- * Remove an agent from the team
172
- */
173
- removeAgent(id: string): boolean;
174
- /**
175
- * Clear conversation history for all agents in the team
176
- * Used by /reset command to start fresh
177
- */
178
- clearAllHistories(): void;
179
- /**
180
- * Callback for checking in-progress tasks when switching agents
181
- * Set by the REPL to provide task counts for warnings
182
- */
183
- private _getInProgressTasksCallback?;
184
- /**
185
- * Set the callback for getting in-progress tasks
186
- * Used by REPL to integrate with todo list and work items
187
- */
188
- setInProgressTasksCallback(callback: (agentId: string) => {
189
- todos: string[];
190
- workItems: string[];
191
- }): void;
192
- /**
193
- * Switch to a different agent
194
- */
195
- switchTo(id: string): Promise<TeamAgent>;
196
- /**
197
- * Set the coordinator agent
198
- */
199
- setCoordinator(id: string | undefined): void;
200
- /**
201
- * Check if an agent is the coordinator
202
- * The default agent is considered coordinator if no explicit coordinator is set.
203
- */
204
- isCoordinator(id: string): boolean;
205
- /**
206
- * Check if the active agent is the coordinator
207
- * The default agent is considered coordinator if no explicit coordinator is set.
208
- */
209
- isActiveCoordinator(): boolean;
210
- /**
211
- * Change an agent's model tier
212
- * This updates the tier and reinitializes the agent with the new model.
213
- * Conversation history is preserved.
214
- *
215
- * @param id - The agent ID
216
- * @param newTier - The new model tier
217
- * @returns The updated TeamAgent
218
- */
219
- changeAgentTier(id: string, newTier: ModelTier): Promise<TeamAgent>;
220
- /**
221
- * Initialize all agents (lazy initialization)
222
- */
223
- initializeAll(): Promise<void>;
224
- /**
225
- * Initialize only the active agent
226
- */
227
- initializeActive(): Promise<Agent>;
228
- /**
229
- * Parse a message for $agent prefix and switch if needed
230
- * Returns the message without the prefix and whether a switch occurred
231
- */
232
- parseAndSwitch(message: string): Promise<{
233
- message: string;
234
- switched: boolean;
235
- agentId: string;
236
- }>;
237
- /**
238
- * Get autocomplete suggestions for $agent prefix
239
- */
240
- getAgentSuggestions(prefix: string): Array<{
241
- id: string;
242
- label: string;
243
- }>;
244
- /**
245
- * Record that sourceAgent handed off to targetAgent.
246
- * Used for one-hop prevention.
247
- */
248
- recordHandoff(targetAgentId: string, sourceAgentId: string): void;
249
- /**
250
- * Check if an agent was handed a task (i.e., is a handoff target).
251
- * If true, this agent cannot re-hand off (except back to coordinator).
252
- */
253
- wasHandedTo(agentId: string): boolean;
254
- /**
255
- * Get the source agent that handed off to the given agent.
256
- */
257
- getHandoffSource(agentId: string): string | undefined;
258
- /**
259
- * Clear handoff tracking for an agent (after it completes its task).
260
- */
261
- clearHandoffRecord(agentId: string): void;
262
- /**
263
- * Serialize the team for persistence
264
- */
265
- serialize(): SerializedTeam;
266
- /**
267
- * Restore team state from serialized data
268
- */
269
- static restore(data: SerializedTeam, agentFactory: AgentTeamConfig['agentFactory'], onEvent?: TeamEventHandler, options?: {
270
- sharedContext?: SharedContextManager;
271
- artifactStore?: ArtifactStore;
272
- }): AgentTeam;
273
- /**
274
- * Emit a team event
275
- */
276
- private emit;
277
- /**
278
- * Build and update the team roster in shared context
279
- * Called when team composition or active agent changes
280
- */
281
- updateTeamRoster(): void;
282
- /**
283
- * Build the team roster from current agents
284
- */
285
- private buildTeamRoster;
286
- }