@compilr-dev/cli 0.5.10 → 0.5.12

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.
package/dist/agent.js CHANGED
@@ -9,7 +9,7 @@ import { Agent, ContextManager, DEFAULT_CONTEXT_CONFIG, createTaskTool, createSu
9
9
  import { isAutoCompactEnabled, isDelegationEnabled, getSetting } from './settings/index.js';
10
10
  import { getApiKey } from './utils/credentials.js';
11
11
  import { createToolRegistry, createMinimalToolRegistry, getDirectTools, getMetaTools, initializeMetaTools, getToolIndexForSystemPrompt, getFilteredToolIndexForSystemPrompt, getToolStats, setMetaToolFilter, createToolFallback, getRegisteredMetaTools, } from './tools.js';
12
- import { TOOL_GROUPS } from './multi-agent/tool-config.js';
12
+ import { TOOL_GROUPS } from '@compilr-dev/sdk';
13
13
  import { setCapabilityManager } from './multi-agent/capability-loader.js';
14
14
  import { getAgentRegistry } from './agents/registry.js';
15
15
  import { SystemPromptBuilder } from './system-prompt/index.js';
@@ -148,7 +148,7 @@ export function saveCurrentTeam(team) {
148
148
  // Save shared context
149
149
  checkpointer.saveSharedContext(projectId, team.sharedContext);
150
150
  // Save artifacts
151
- team.artifactStore.save();
151
+ checkpointer.saveArtifactStore(projectId, team.artifactStore);
152
152
  }
153
153
  /**
154
154
  * Load the team for the current project.
@@ -502,7 +502,7 @@ export async function handleProjectSwitch(oldProjectId, agent, teamOptions, agen
502
502
  try {
503
503
  checkpointer.saveTeam(oldProjectId, teamOptions.team);
504
504
  checkpointer.saveSharedContext(oldProjectId, teamOptions.team.sharedContext);
505
- teamOptions.team.artifactStore.save();
505
+ checkpointer.saveArtifactStore(oldProjectId, teamOptions.team.artifactStore);
506
506
  }
507
507
  catch {
508
508
  // Best effort - continue even if save fails
@@ -6,8 +6,7 @@
6
6
  */
7
7
  import type { Agent, ContextManager } from '@compilr-dev/sdk';
8
8
  import type { TerminalUI, AgentMessage } from '../ui/terminal-ui.js';
9
- import type { AgentTeam } from '../multi-agent/index.js';
10
- import type { BackgroundSessionInfo } from '../multi-agent/types.js';
9
+ import type { AgentTeam, BackgroundSessionInfo } from '@compilr-dev/sdk';
11
10
  export type { BackgroundSessionInfo };
12
11
  /**
13
12
  * Context passed to V2 command handlers.
Binary file
package/dist/index.js CHANGED
@@ -883,12 +883,33 @@ async function main() {
883
883
  // Provider Detection
884
884
  // =============================================================================
885
885
  function detectProvider() {
886
+ // Check env vars first (fastest)
886
887
  if (process.env.ANTHROPIC_API_KEY)
887
888
  return 'claude';
888
889
  if (process.env.OPENAI_API_KEY)
889
890
  return 'openai';
890
891
  if (process.env.GOOGLE_AI_API_KEY)
891
892
  return 'gemini';
893
+ // Check credential store (keys set via /keys)
894
+ if (hasApiKey('anthropic'))
895
+ return 'claude';
896
+ if (hasApiKey('openai'))
897
+ return 'openai';
898
+ if (hasApiKey('google'))
899
+ return 'gemini';
900
+ if (hasApiKey('together'))
901
+ return 'together';
902
+ if (hasApiKey('groq'))
903
+ return 'groq';
904
+ if (hasApiKey('fireworks'))
905
+ return 'fireworks';
906
+ if (hasApiKey('perplexity'))
907
+ return 'perplexity';
908
+ if (hasApiKey('openrouter'))
909
+ return 'openrouter';
910
+ // Ollama doesn't need a key — check if it's likely available
911
+ if (hasApiKey('ollama'))
912
+ return 'ollama';
892
913
  // Default to claude
893
914
  return 'claude';
894
915
  }
@@ -5,7 +5,7 @@
5
5
  * (set by agent.ts during createAgent()). Provides a high-level function
6
6
  * for slash command handlers to load capability packs required by a skill.
7
7
  */
8
- import { SKILL_REQUIREMENTS } from './skill-requirements.js';
8
+ import { SKILL_REQUIREMENTS } from '@compilr-dev/sdk';
9
9
  // =============================================================================
10
10
  // Module-level state
11
11
  // =============================================================================
@@ -13,10 +13,7 @@
13
13
  * ├── index.json
14
14
  * └── {id}.json
15
15
  */
16
- import type { SerializedTeamAgent, TeamMetadata } from './types.js';
17
- import { AgentTeam, type AgentTeamConfig } from './team.js';
18
- import { SharedContextManager } from './shared-context.js';
19
- import { ArtifactStore } from './artifacts.js';
16
+ import { AgentTeam, ArtifactStore, SharedContextManager, type AgentTeamConfig, type SerializedTeamAgent, type TeamMetadata } from '@compilr-dev/sdk';
20
17
  /**
21
18
  * TeamCheckpointer handles persistence for multi-agent teams
22
19
  */
@@ -107,6 +104,10 @@ export declare class TeamCheckpointer {
107
104
  * The ArtifactStore handles its own persistence
108
105
  */
109
106
  getArtifactStore(projectId: number | null): ArtifactStore;
107
+ /**
108
+ * Save an artifact store to disk for a project
109
+ */
110
+ saveArtifactStore(projectId: number | null, store: ArtifactStore): void;
110
111
  /**
111
112
  * Check if artifacts exist for this project
112
113
  */
@@ -15,9 +15,7 @@
15
15
  */
16
16
  import * as fs from 'node:fs';
17
17
  import * as path from 'node:path';
18
- import { AgentTeam } from './team.js';
19
- import { SharedContextManager } from './shared-context.js';
20
- import { ArtifactStore } from './artifacts.js';
18
+ import { AgentTeam, ArtifactStore, SharedContextManager, } from '@compilr-dev/sdk';
21
19
  import { getActiveTerminalSessionId } from './session-registry.js';
22
20
  const ARTIFACTS_DIR = 'artifacts';
23
21
  /**
@@ -341,11 +339,33 @@ export class TeamCheckpointer {
341
339
  * The ArtifactStore handles its own persistence
342
340
  */
343
341
  getArtifactStore(projectId) {
342
+ const store = new ArtifactStore();
344
343
  const artifactsPath = this.getArtifactsPath(projectId);
345
- const store = new ArtifactStore(artifactsPath);
346
- store.load(); // Load existing artifacts
344
+ const dataFile = path.join(artifactsPath, 'artifacts.json');
345
+ if (fs.existsSync(dataFile)) {
346
+ try {
347
+ const raw = fs.readFileSync(dataFile, 'utf-8');
348
+ const data = JSON.parse(raw);
349
+ store.restore(data);
350
+ }
351
+ catch {
352
+ // Corrupted file — start fresh
353
+ }
354
+ }
347
355
  return store;
348
356
  }
357
+ /**
358
+ * Save an artifact store to disk for a project
359
+ */
360
+ saveArtifactStore(projectId, store) {
361
+ const artifactsPath = this.getArtifactsPath(projectId);
362
+ if (!fs.existsSync(artifactsPath)) {
363
+ fs.mkdirSync(artifactsPath, { recursive: true });
364
+ }
365
+ const dataFile = path.join(artifactsPath, 'artifacts.json');
366
+ const serialized = store.serialize();
367
+ fs.writeFileSync(dataFile, JSON.stringify(serialized, null, 2));
368
+ }
349
369
  /**
350
370
  * Check if artifacts exist for this project
351
371
  */
@@ -1,64 +1,11 @@
1
1
  /**
2
- * Custom Agent Definitions
2
+ * Custom Agent Definitions - CLI Filesystem Layer
3
3
  *
4
- * Enables users to create custom specialized agents beyond predefined templates.
5
- * Custom agents have user-defined names, specialties, and personalities.
4
+ * Pure logic (types, validation, generation) lives in @compilr-dev/sdk.
5
+ * This file provides CLI-specific filesystem operations for loading/saving.
6
6
  */
7
- import { type ToolConfig, type ToolProfile } from './tool-config.js';
8
- import type { ModelTier } from '../models/index.js';
9
- export interface CustomAgentDefinition {
10
- id: string;
11
- displayName: string;
12
- specialty: string;
13
- personality?: string;
14
- mascot: string;
15
- createdAt: string;
16
- toolConfig?: ToolConfig;
17
- enabledSkills?: string[];
18
- modelTier?: ModelTier;
19
- }
20
- export type { ToolConfig, ToolProfile };
21
- /**
22
- * Mascots available for custom agents.
23
- * These are distinct from predefined role mascots.
24
- */
25
- export declare const CUSTOM_MASCOTS: string[];
26
- /**
27
- * Assign a mascot from the available pool.
28
- * Avoids mascots already in use by other custom agents.
29
- */
30
- export declare function assignMascot(existingAgents: CustomAgentDefinition[]): string;
31
- /**
32
- * Generate system prompt for a custom agent.
33
- * Uses a template-based approach (no LLM call).
34
- * Includes tool awareness if the agent has tool restrictions.
35
- */
36
- export declare function generateCustomAgentSystemPrompt(agent: CustomAgentDefinition): string;
37
- /**
38
- * Get the tool filter (list of allowed tools) for a custom agent.
39
- * Returns undefined for full access (no filtering).
40
- */
41
- export declare function getCustomAgentToolFilter(agent: CustomAgentDefinition): string[] | undefined;
42
- /**
43
- * Get the profile display name for a custom agent.
44
- */
45
- export declare function getCustomAgentProfileLabel(agent: CustomAgentDefinition): string;
46
- /**
47
- * Validate agent ID format.
48
- * Must be lowercase letters, numbers, and underscores.
49
- * Must start with a letter.
50
- */
51
- export declare function validateAgentId(id: string): {
52
- valid: boolean;
53
- error?: string;
54
- };
55
- /**
56
- * Check if agent ID is already in use.
57
- */
58
- export declare function isAgentIdTaken(id: string, existingCustomAgents: CustomAgentDefinition[], teamAgentIds: string[], predefinedRoleIds: string[]): {
59
- taken: boolean;
60
- reason?: string;
61
- };
7
+ import { type CustomAgentDefinition } from '@compilr-dev/sdk';
8
+ export { type CustomAgentDefinition, type TeamToolConfig as ToolConfig, type ToolProfile, CUSTOM_MASCOTS, assignMascot, generateCustomAgentSystemPrompt, getCustomAgentToolFilter, getCustomAgentProfileLabel, validateAgentId, isAgentIdTaken, createCustomAgentDefinition, } from '@compilr-dev/sdk';
62
9
  /**
63
10
  * Load custom agents from project directory.
64
11
  * Returns empty array if file doesn't exist.
@@ -77,7 +24,3 @@ export declare function addCustomAgent(projectPath: string, agent: CustomAgentDe
77
24
  * Remove a custom agent by ID and save.
78
25
  */
79
26
  export declare function removeCustomAgent(projectPath: string, agentId: string): boolean;
80
- /**
81
- * Create a new CustomAgentDefinition with auto-assigned mascot.
82
- */
83
- export declare function createCustomAgentDefinition(id: string, displayName: string, specialty: string, personality: string | undefined, existingAgents: CustomAgentDefinition[], toolConfig?: ToolConfig, enabledSkills?: string[], modelTier?: ModelTier): CustomAgentDefinition;
@@ -1,125 +1,18 @@
1
1
  /**
2
- * Custom Agent Definitions
2
+ * Custom Agent Definitions - CLI Filesystem Layer
3
3
  *
4
- * Enables users to create custom specialized agents beyond predefined templates.
5
- * Custom agents have user-defined names, specialties, and personalities.
4
+ * Pure logic (types, validation, generation) lives in @compilr-dev/sdk.
5
+ * This file provides CLI-specific filesystem operations for loading/saving.
6
6
  */
7
7
  import * as fs from 'fs';
8
8
  import * as path from 'path';
9
- import { createDefaultToolConfig, getToolsForProfile, generateToolAwarenessPrompt, PROFILE_INFO, } from './tool-config.js';
10
- // Current storage version
11
- const STORAGE_VERSION = 2;
12
- // =============================================================================
13
- // Mascot Pool for Custom Agents
14
- // =============================================================================
15
- /**
16
- * Mascots available for custom agents.
17
- * These are distinct from predefined role mascots.
18
- */
19
- export const CUSTOM_MASCOTS = [
20
- '[⊡_⊡]', '[⊞_⊞]', '[⊟_⊟]', '[⊠_⊠]',
21
- '[⋈_⋈]', '[⋐_⋐]', '[⋑_⋑]', '[⋒_⋒]',
22
- '[◌_◌]', '[◍_◍]', '[●_●]', '[◐_◐]',
23
- '[◑_◑]', '[◒_◒]', '[◓_◓]', '[◔_◔]',
24
- ];
25
- /**
26
- * Assign a mascot from the available pool.
27
- * Avoids mascots already in use by other custom agents.
28
- */
29
- export function assignMascot(existingAgents) {
30
- const usedMascots = new Set(existingAgents.map(a => a.mascot));
31
- const available = CUSTOM_MASCOTS.filter(m => !usedMascots.has(m));
32
- if (available.length > 0) {
33
- return available[0];
34
- }
35
- // Fall back to random selection if all are used
36
- return CUSTOM_MASCOTS[Math.floor(Math.random() * CUSTOM_MASCOTS.length)];
37
- }
38
- // =============================================================================
39
- // System Prompt Generation
40
- // =============================================================================
41
- /**
42
- * Generate system prompt for a custom agent.
43
- * Uses a template-based approach (no LLM call).
44
- * Includes tool awareness if the agent has tool restrictions.
45
- */
46
- export function generateCustomAgentSystemPrompt(agent) {
47
- const lines = [
48
- `You are a ${agent.displayName} specialized in ${agent.specialty}.`,
49
- ];
50
- if (agent.personality) {
51
- lines.push('');
52
- lines.push(`Your approach: ${agent.personality}`);
53
- }
54
- lines.push('');
55
- lines.push('Focus on your area of expertise. When questions fall outside your specialty, suggest which team member might be better suited to help.');
56
- // Add tool awareness if agent has tool restrictions
57
- const toolConfig = agent.toolConfig ?? createDefaultToolConfig();
58
- if (toolConfig.profile !== 'full') {
59
- lines.push('');
60
- lines.push('---');
61
- lines.push('');
62
- lines.push(generateToolAwarenessPrompt(toolConfig));
63
- }
64
- return lines.join('\n');
65
- }
66
- /**
67
- * Get the tool filter (list of allowed tools) for a custom agent.
68
- * Returns undefined for full access (no filtering).
69
- */
70
- export function getCustomAgentToolFilter(agent) {
71
- const toolConfig = agent.toolConfig ?? createDefaultToolConfig();
72
- return getToolsForProfile(toolConfig.profile, toolConfig.customGroups);
73
- }
74
- /**
75
- * Get the profile display name for a custom agent.
76
- */
77
- export function getCustomAgentProfileLabel(agent) {
78
- const toolConfig = agent.toolConfig ?? createDefaultToolConfig();
79
- const info = PROFILE_INFO[toolConfig.profile];
80
- return info.label;
81
- }
82
- // =============================================================================
83
- // Validation
84
- // =============================================================================
85
- /**
86
- * Validate agent ID format.
87
- * Must be lowercase letters, numbers, and underscores.
88
- * Must start with a letter.
89
- */
90
- export function validateAgentId(id) {
91
- if (!id || id.trim() === '') {
92
- return { valid: false, error: 'Agent ID is required' };
93
- }
94
- if (id.length > 20) {
95
- return { valid: false, error: 'Agent ID must be 20 characters or less' };
96
- }
97
- if (!/^[a-z][a-z0-9_]*$/.test(id)) {
98
- return { valid: false, error: 'Must be lowercase letters, numbers, underscore (start with letter)' };
99
- }
100
- return { valid: true };
101
- }
102
- /**
103
- * Check if agent ID is already in use.
104
- */
105
- export function isAgentIdTaken(id, existingCustomAgents, teamAgentIds, predefinedRoleIds) {
106
- // Check predefined roles
107
- if (predefinedRoleIds.includes(id)) {
108
- return { taken: true, reason: `"${id}" is a predefined role` };
109
- }
110
- // Check team agents
111
- if (teamAgentIds.includes(id)) {
112
- return { taken: true, reason: `"${id}" is already in your team` };
113
- }
114
- // Check custom agents
115
- if (existingCustomAgents.some(a => a.id === id)) {
116
- return { taken: true, reason: `"${id}" already exists as a custom agent` };
117
- }
118
- return { taken: false };
119
- }
9
+ import { createDefaultToolConfig, } from '@compilr-dev/sdk';
120
10
  // =============================================================================
121
- // Storage
11
+ // Re-exports from SDK (for backward compatibility)
122
12
  // =============================================================================
13
+ export { CUSTOM_MASCOTS, assignMascot, generateCustomAgentSystemPrompt, getCustomAgentToolFilter, getCustomAgentProfileLabel, validateAgentId, isAgentIdTaken, createCustomAgentDefinition, } from '@compilr-dev/sdk';
14
+ // Current storage version
15
+ const STORAGE_VERSION = 2;
123
16
  const CUSTOM_AGENTS_FILENAME = 'custom-agents.json';
124
17
  const COMPILR_DIR = '.compilr';
125
18
  /**
@@ -139,13 +32,12 @@ function ensureCompilrDir(projectPath) {
139
32
  }
140
33
  /**
141
34
  * Migrate a v1 agent to v2 format.
142
- * Adds default toolConfig (full access) and empty enabledSkills.
143
35
  */
144
36
  function migrateAgentV1toV2(agent) {
145
37
  return {
146
38
  ...agent,
147
39
  toolConfig: agent.toolConfig ?? createDefaultToolConfig(),
148
- enabledSkills: agent.enabledSkills ?? [], // Empty = all skills
40
+ enabledSkills: agent.enabledSkills ?? [],
149
41
  };
150
42
  }
151
43
  /**
@@ -165,14 +57,12 @@ export function loadCustomAgents(projectPath) {
165
57
  // Migrate v1 agents to v2 format if needed
166
58
  if (data.version < STORAGE_VERSION) {
167
59
  const migratedAgents = agents.map(migrateAgentV1toV2);
168
- // Save migrated agents
169
60
  saveCustomAgents(projectPath, migratedAgents);
170
61
  return migratedAgents;
171
62
  }
172
63
  return agents;
173
64
  }
174
65
  catch {
175
- // If file is corrupted, return empty array
176
66
  return [];
177
67
  }
178
68
  }
@@ -201,7 +91,7 @@ export function addCustomAgent(projectPath, agent) {
201
91
  */
202
92
  export function removeCustomAgent(projectPath, agentId) {
203
93
  const agents = loadCustomAgents(projectPath);
204
- const index = agents.findIndex(a => a.id === agentId);
94
+ const index = agents.findIndex((a) => a.id === agentId);
205
95
  if (index === -1) {
206
96
  return false;
207
97
  }
@@ -209,19 +99,3 @@ export function removeCustomAgent(projectPath, agentId) {
209
99
  saveCustomAgents(projectPath, agents);
210
100
  return true;
211
101
  }
212
- /**
213
- * Create a new CustomAgentDefinition with auto-assigned mascot.
214
- */
215
- export function createCustomAgentDefinition(id, displayName, specialty, personality, existingAgents, toolConfig, enabledSkills, modelTier) {
216
- return {
217
- id,
218
- displayName,
219
- specialty,
220
- personality: personality || undefined,
221
- mascot: assignMascot(existingAgents),
222
- createdAt: new Date().toISOString(),
223
- toolConfig: toolConfig ?? createDefaultToolConfig(),
224
- enabledSkills: enabledSkills ?? [], // Empty = all skills
225
- modelTier: modelTier ?? 'balanced', // Default tier
226
- };
227
- }
@@ -1,152 +1,11 @@
1
1
  /**
2
- * Delegation Tracker (Phase 3d-beta - Coordinator Mode)
2
+ * Delegation Tracker - CLI Singleton Wrapper
3
3
  *
4
- * Tracks active delegations from the coordinator to background specialists.
5
- * Maintains a completion event queue so the coordinator can be notified
6
- * when specialists finish their work.
7
- *
8
- * Pattern follows PendingRequestsManager (singleton, event-based).
4
+ * The DelegationTracker class lives in @compilr-dev/sdk.
5
+ * This file provides CLI-specific singleton access.
9
6
  */
10
- import { EventEmitter } from 'events';
11
- export type DelegationStatus = 'pending' | 'running' | 'completed' | 'failed' | 'cancelled';
12
- export interface Delegation {
13
- /** Unique delegation ID (del_<uuid>) */
14
- id: string;
15
- /** Agent that initiated the delegation (always 'default' for now) */
16
- coordinatorId: string;
17
- /** Target specialist agent ID (e.g., 'arch', 'dev', 'qa') */
18
- targetAgentId: string;
19
- /** Task description sent to the specialist */
20
- task: string;
21
- /** What the specialist is expected to produce */
22
- expectedOutput?: string;
23
- /** Associated todo index (if any) */
24
- todoIndex?: number;
25
- /** Current status */
26
- status: DelegationStatus;
27
- /** Result (set on completion or failure) */
28
- result?: DelegationResult;
29
- /** When the delegation was created */
30
- createdAt: Date;
31
- /** When the delegation completed */
32
- completedAt?: Date;
33
- }
34
- export interface DelegationResult {
35
- /** Whether the task completed successfully */
36
- success: boolean;
37
- /** Brief outcome summary */
38
- summary: string;
39
- /** Artifact IDs created by the specialist */
40
- artifactIds: string[];
41
- /** Error message (if failed) */
42
- error?: string;
43
- }
44
- export interface CompletionEvent {
45
- /** The delegation ID */
46
- delegationId: string;
47
- /** The specialist that completed the work */
48
- agentId: string;
49
- /** Completion status */
50
- status: 'completed' | 'failed';
51
- /** Result details */
52
- result: DelegationResult;
53
- /** When the event was generated */
54
- timestamp: Date;
55
- }
56
- export interface CreateDelegationOptions {
57
- /** Agent that initiated the delegation */
58
- coordinatorId: string;
59
- /** Target specialist agent ID */
60
- targetAgentId: string;
61
- /** Task description */
62
- task: string;
63
- /** Expected output description */
64
- expectedOutput?: string;
65
- /** Associated todo index */
66
- todoIndex?: number;
67
- }
68
- export interface DelegationStats {
69
- total: number;
70
- pending: number;
71
- running: number;
72
- completed: number;
73
- failed: number;
74
- cancelled: number;
75
- }
76
- export interface DelegationTrackerEvents {
77
- /** Emitted when a new delegation is created */
78
- 'delegation-created': (delegation: Delegation) => void;
79
- /** Emitted when a delegation completes successfully */
80
- 'delegation-completed': (event: CompletionEvent) => void;
81
- /** Emitted when a delegation fails */
82
- 'delegation-failed': (event: CompletionEvent) => void;
83
- /** Emitted when delegation counts change */
84
- 'count-changed': (stats: DelegationStats) => void;
85
- }
86
- export declare class DelegationTracker extends EventEmitter {
87
- private readonly delegations;
88
- private readonly completionQueue;
89
- /**
90
- * Create a new delegation.
91
- */
92
- create(options: CreateDelegationOptions): Delegation;
93
- /**
94
- * Update a delegation's status.
95
- */
96
- updateStatus(id: string, status: DelegationStatus): void;
97
- /**
98
- * Mark a delegation as completed with a result.
99
- */
100
- complete(id: string, result: DelegationResult): void;
101
- /**
102
- * Mark a delegation as failed.
103
- */
104
- fail(id: string, error: string): void;
105
- /**
106
- * Mark a delegation as cancelled.
107
- */
108
- cancel(id: string): void;
109
- /**
110
- * Cancel all active delegations for a specific agent.
111
- */
112
- cancelAllForAgent(agentId: string): number;
113
- /**
114
- * Get a delegation by ID.
115
- */
116
- get(id: string): Delegation | undefined;
117
- /**
118
- * Get all delegations targeting a specific agent.
119
- */
120
- getByAgent(agentId: string): Delegation[];
121
- /**
122
- * Get all active (pending or running) delegations.
123
- */
124
- getActive(): Delegation[];
125
- /**
126
- * Get all delegations.
127
- */
128
- getAll(): Delegation[];
129
- /**
130
- * Check if there are pending completion events.
131
- */
132
- hasCompletionEvents(): boolean;
133
- /**
134
- * Drain all completion events (removes them from queue).
135
- */
136
- drainCompletionEvents(): CompletionEvent[];
137
- /**
138
- * Peek at completion events without removing them.
139
- */
140
- peekCompletionEvents(): CompletionEvent[];
141
- /**
142
- * Get delegation statistics.
143
- */
144
- getStats(): DelegationStats;
145
- /**
146
- * Clear all delegations and completion events.
147
- */
148
- clear(): void;
149
- }
7
+ export { DelegationTracker, type Delegation, type DelegationStatus, type DelegationResult, type CompletionEvent, type CreateDelegationOptions, type DelegationStats, type DelegationTrackerEvents, } from '@compilr-dev/sdk';
8
+ import { DelegationTracker } from '@compilr-dev/sdk';
150
9
  /**
151
10
  * Get the singleton DelegationTracker instance.
152
11
  */