@skillkit/core 1.11.0 → 1.13.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.
package/dist/index.d.ts CHANGED
@@ -4150,16 +4150,61 @@ interface MemorySearchResult {
4150
4150
  matchedTags: string[];
4151
4151
  }
4152
4152
 
4153
+ /**
4154
+ * Auto-compression callback type
4155
+ */
4156
+ type AutoCompressCallback = (observations: Observation[]) => Promise<void>;
4157
+ /**
4158
+ * Observation store options
4159
+ */
4160
+ interface ObservationStoreOptions {
4161
+ compressionThreshold?: number;
4162
+ autoCompress?: boolean;
4163
+ onThresholdReached?: AutoCompressCallback;
4164
+ }
4153
4165
  declare class ObservationStore {
4154
4166
  private readonly filePath;
4167
+ private readonly projectPath;
4155
4168
  private data;
4156
4169
  private sessionId;
4157
- constructor(projectPath: string, sessionId?: string);
4170
+ private compressionThreshold;
4171
+ private autoCompress;
4172
+ private onThresholdReached?;
4173
+ private compressionInProgress;
4174
+ constructor(projectPath: string, sessionId?: string, options?: ObservationStoreOptions);
4158
4175
  private ensureDir;
4159
4176
  private load;
4160
4177
  private createEmpty;
4161
4178
  private save;
4162
4179
  add(type: ObservationType, content: ObservationContent, agent: AgentType, relevance?: number): Observation;
4180
+ /**
4181
+ * Check if auto-compression should trigger
4182
+ */
4183
+ private checkAutoCompression;
4184
+ /**
4185
+ * Set auto-compression callback
4186
+ */
4187
+ setAutoCompressCallback(callback: AutoCompressCallback): void;
4188
+ /**
4189
+ * Enable/disable auto-compression
4190
+ */
4191
+ setAutoCompress(enabled: boolean): void;
4192
+ /**
4193
+ * Set compression threshold
4194
+ */
4195
+ setCompressionThreshold(threshold: number): void;
4196
+ /**
4197
+ * Get compression threshold
4198
+ */
4199
+ getCompressionThreshold(): number;
4200
+ /**
4201
+ * Check if threshold is reached
4202
+ */
4203
+ isThresholdReached(): boolean;
4204
+ /**
4205
+ * Get project path
4206
+ */
4207
+ getProjectPath(): string;
4163
4208
  getAll(): Observation[];
4164
4209
  getByType(type: ObservationType): Observation[];
4165
4210
  getByRelevance(minRelevance: number): Observation[];
@@ -4861,6 +4906,646 @@ declare class MemoryInjector {
4861
4906
  */
4862
4907
  declare function createMemoryInjector(projectPath: string, projectName?: string, projectContext?: ProjectContext): MemoryInjector;
4863
4908
 
4909
+ /**
4910
+ * Memory Hooks Types
4911
+ *
4912
+ * Types for Claude Code lifecycle hooks that integrate with SkillKit memory.
4913
+ */
4914
+
4915
+ /**
4916
+ * Claude Code hook event types
4917
+ */
4918
+ type ClaudeCodeHookEvent = 'SessionStart' | 'SessionResume' | 'SessionEnd' | 'PreToolUse' | 'PostToolUse' | 'UserPromptSubmit' | 'PreCompact' | 'Notification' | 'Stop';
4919
+ /**
4920
+ * Tool use event for PostToolUse hook
4921
+ */
4922
+ interface ToolUseEvent {
4923
+ tool_name: string;
4924
+ tool_input: Record<string, unknown>;
4925
+ tool_result?: string;
4926
+ is_error?: boolean;
4927
+ duration_ms?: number;
4928
+ }
4929
+ /**
4930
+ * Session start event context
4931
+ */
4932
+ interface SessionStartContext {
4933
+ session_id: string;
4934
+ project_path: string;
4935
+ agent: AgentType;
4936
+ timestamp: string;
4937
+ working_directory?: string;
4938
+ }
4939
+ /**
4940
+ * Session end event context
4941
+ */
4942
+ interface SessionEndContext {
4943
+ session_id: string;
4944
+ project_path: string;
4945
+ agent: AgentType;
4946
+ timestamp: string;
4947
+ duration_ms?: number;
4948
+ tool_calls_count?: number;
4949
+ }
4950
+ /**
4951
+ * Memory hook configuration
4952
+ */
4953
+ interface MemoryHookConfig {
4954
+ enabled: boolean;
4955
+ autoInjectOnSessionStart: boolean;
4956
+ autoCaptureToolUse: boolean;
4957
+ autoCompressOnSessionEnd: boolean;
4958
+ minRelevanceForCapture: number;
4959
+ maxTokensForInjection: number;
4960
+ compressionThreshold: number;
4961
+ capturePatterns?: string[];
4962
+ excludeTools?: string[];
4963
+ }
4964
+ /**
4965
+ * Default memory hook configuration
4966
+ */
4967
+ declare const DEFAULT_MEMORY_HOOK_CONFIG: MemoryHookConfig;
4968
+ /**
4969
+ * Session start hook result
4970
+ */
4971
+ interface SessionStartResult {
4972
+ injected: boolean;
4973
+ learnings: Learning[];
4974
+ tokenCount: number;
4975
+ formattedContent: string;
4976
+ }
4977
+ /**
4978
+ * Tool use capture result
4979
+ */
4980
+ interface ToolUseCaptureResult {
4981
+ captured: boolean;
4982
+ observation?: Observation;
4983
+ reason?: string;
4984
+ }
4985
+ /**
4986
+ * Session end hook result
4987
+ */
4988
+ interface SessionEndResult {
4989
+ compressed: boolean;
4990
+ observationCount: number;
4991
+ learningCount: number;
4992
+ learnings: Learning[];
4993
+ }
4994
+ /**
4995
+ * Hook script output format for Claude Code
4996
+ */
4997
+ interface ClaudeCodeHookOutput {
4998
+ continue: boolean;
4999
+ message?: string;
5000
+ inject?: string;
5001
+ suppress?: boolean;
5002
+ }
5003
+ /**
5004
+ * Memory hook statistics
5005
+ */
5006
+ interface MemoryHookStats {
5007
+ sessionId: string;
5008
+ startedAt: string;
5009
+ observationsCaptured: number;
5010
+ learningsInjected: number;
5011
+ tokensUsed: number;
5012
+ toolCallsCaptured: number;
5013
+ errorsRecorded: number;
5014
+ solutionsRecorded: number;
5015
+ }
5016
+
5017
+ /**
5018
+ * Session Start Hook
5019
+ *
5020
+ * Injects relevant memories when a Claude Code session starts.
5021
+ * This hook runs at the beginning of each session to provide context
5022
+ * from previous sessions.
5023
+ */
5024
+
5025
+ /**
5026
+ * Session Start Hook Handler
5027
+ *
5028
+ * Retrieves and formats relevant memories for injection at session start.
5029
+ */
5030
+ declare class SessionStartHook {
5031
+ private config;
5032
+ private projectPath;
5033
+ private agent;
5034
+ constructor(projectPath: string, agent?: AgentType, config?: Partial<MemoryHookConfig>);
5035
+ /**
5036
+ * Execute the session start hook
5037
+ */
5038
+ execute(context: SessionStartContext): Promise<SessionStartResult>;
5039
+ /**
5040
+ * Generate Claude Code hook output format
5041
+ */
5042
+ generateHookOutput(context: SessionStartContext): Promise<ClaudeCodeHookOutput>;
5043
+ /**
5044
+ * Generate hook output from pre-computed result (avoids double execution)
5045
+ */
5046
+ generateHookOutputFromResult(result: SessionStartResult): ClaudeCodeHookOutput;
5047
+ /**
5048
+ * Format learnings for injection into Claude Code context
5049
+ */
5050
+ private formatInjection;
5051
+ /**
5052
+ * Get configuration
5053
+ */
5054
+ getConfig(): MemoryHookConfig;
5055
+ /**
5056
+ * Update configuration
5057
+ */
5058
+ setConfig(config: Partial<MemoryHookConfig>): void;
5059
+ }
5060
+ /**
5061
+ * Create a session start hook handler
5062
+ */
5063
+ declare function createSessionStartHook(projectPath: string, agent?: AgentType, config?: Partial<MemoryHookConfig>): SessionStartHook;
5064
+ /**
5065
+ * Execute session start hook (standalone function for scripts)
5066
+ */
5067
+ declare function executeSessionStartHook(projectPath: string, context: SessionStartContext, config?: Partial<MemoryHookConfig>): Promise<SessionStartResult>;
5068
+
5069
+ /**
5070
+ * Post Tool Use Hook
5071
+ *
5072
+ * Captures tool outcomes as observations after each tool use in Claude Code.
5073
+ * This enables automatic memory capture without manual intervention.
5074
+ */
5075
+
5076
+ /**
5077
+ * Post Tool Use Hook Handler
5078
+ *
5079
+ * Captures tool outcomes and stores them as observations.
5080
+ */
5081
+ declare class PostToolUseHook {
5082
+ private config;
5083
+ private agent;
5084
+ private store;
5085
+ private pendingErrors;
5086
+ constructor(projectPath: string, agent?: AgentType, config?: Partial<MemoryHookConfig>, sessionId?: string);
5087
+ /**
5088
+ * Execute the post tool use hook
5089
+ */
5090
+ execute(event: ToolUseEvent): Promise<ToolUseCaptureResult>;
5091
+ /**
5092
+ * Generate Claude Code hook output format
5093
+ */
5094
+ generateHookOutput(event: ToolUseEvent): Promise<ClaudeCodeHookOutput>;
5095
+ /**
5096
+ * Generate hook output from pre-computed result (avoids double execution)
5097
+ */
5098
+ generateHookOutputFromResult(event: ToolUseEvent, result: ToolUseCaptureResult): ClaudeCodeHookOutput;
5099
+ /**
5100
+ * Get configuration
5101
+ */
5102
+ getConfig(): MemoryHookConfig;
5103
+ /**
5104
+ * Update configuration
5105
+ */
5106
+ setConfig(config: Partial<MemoryHookConfig>): void;
5107
+ /**
5108
+ * Record an error explicitly
5109
+ */
5110
+ recordError(error: string, context: string): Observation;
5111
+ /**
5112
+ * Record a solution explicitly
5113
+ */
5114
+ recordSolution(solution: string, context: string, relatedError?: string): Observation;
5115
+ /**
5116
+ * Record a decision explicitly
5117
+ */
5118
+ recordDecision(decision: string, options: string[], context: string): Observation;
5119
+ /**
5120
+ * Record file modifications
5121
+ */
5122
+ recordFileChange(files: string[], action: string, context: string): Observation;
5123
+ /**
5124
+ * Get pending errors that haven't been resolved
5125
+ */
5126
+ getPendingErrors(): Array<{
5127
+ error: string;
5128
+ timestamp: string;
5129
+ }>;
5130
+ /**
5131
+ * Clear old pending errors (older than 30 minutes)
5132
+ */
5133
+ clearOldPendingErrors(): number;
5134
+ /**
5135
+ * Get observation store
5136
+ */
5137
+ getStore(): ObservationStore;
5138
+ /**
5139
+ * Get observation count
5140
+ */
5141
+ getObservationCount(): number;
5142
+ private shouldExcludeTool;
5143
+ private calculateRelevance;
5144
+ private getObservationType;
5145
+ private extractContent;
5146
+ private summarizeInput;
5147
+ private extractContext;
5148
+ private extractFiles;
5149
+ private generateErrorId;
5150
+ private findMatchingSolution;
5151
+ }
5152
+ /**
5153
+ * Create a post tool use hook handler
5154
+ */
5155
+ declare function createPostToolUseHook(projectPath: string, agent?: AgentType, config?: Partial<MemoryHookConfig>, sessionId?: string): PostToolUseHook;
5156
+ /**
5157
+ * Execute post tool use hook (standalone function for scripts)
5158
+ */
5159
+ declare function executePostToolUseHook(projectPath: string, event: ToolUseEvent, config?: Partial<MemoryHookConfig>, sessionId?: string): Promise<ToolUseCaptureResult>;
5160
+
5161
+ /**
5162
+ * Session End Hook
5163
+ *
5164
+ * Compresses observations to learnings when a Claude Code session ends.
5165
+ * This enables automatic memory consolidation without manual intervention.
5166
+ */
5167
+
5168
+ /**
5169
+ * Session End Hook Handler
5170
+ *
5171
+ * Compresses observations collected during the session into learnings.
5172
+ */
5173
+ declare class SessionEndHook {
5174
+ private config;
5175
+ private projectPath;
5176
+ private agent;
5177
+ constructor(projectPath: string, agent?: AgentType, config?: Partial<MemoryHookConfig>);
5178
+ /**
5179
+ * Execute the session end hook
5180
+ */
5181
+ execute(context: SessionEndContext): Promise<SessionEndResult>;
5182
+ /**
5183
+ * Generate Claude Code hook output format
5184
+ */
5185
+ generateHookOutput(context: SessionEndContext): Promise<ClaudeCodeHookOutput>;
5186
+ /**
5187
+ * Generate hook output from pre-computed result (avoids double execution)
5188
+ */
5189
+ generateHookOutputFromResult(result: SessionEndResult): ClaudeCodeHookOutput;
5190
+ /**
5191
+ * Force compression regardless of settings
5192
+ */
5193
+ forceCompress(sessionId?: string): Promise<SessionEndResult>;
5194
+ /**
5195
+ * Preview what would be compressed (dry-run)
5196
+ */
5197
+ preview(sessionId?: string): Promise<{
5198
+ wouldCompress: boolean;
5199
+ observationCount: number;
5200
+ estimatedLearnings: number;
5201
+ observationTypes: Record<string, number>;
5202
+ }>;
5203
+ /**
5204
+ * Get configuration
5205
+ */
5206
+ getConfig(): MemoryHookConfig;
5207
+ /**
5208
+ * Update configuration
5209
+ */
5210
+ setConfig(config: Partial<MemoryHookConfig>): void;
5211
+ }
5212
+ /**
5213
+ * Create a session end hook handler
5214
+ */
5215
+ declare function createSessionEndHook(projectPath: string, agent?: AgentType, config?: Partial<MemoryHookConfig>): SessionEndHook;
5216
+ /**
5217
+ * Execute session end hook (standalone function for scripts)
5218
+ */
5219
+ declare function executeSessionEndHook(projectPath: string, context: SessionEndContext, config?: Partial<MemoryHookConfig>): Promise<SessionEndResult>;
5220
+
5221
+ /**
5222
+ * Memory Hook Manager
5223
+ *
5224
+ * Unified manager for all memory lifecycle hooks.
5225
+ * Provides a single interface for session memory management.
5226
+ */
5227
+
5228
+ /**
5229
+ * Memory Hook Manager
5230
+ *
5231
+ * Coordinates all memory hooks for a session.
5232
+ */
5233
+ declare class MemoryHookManager {
5234
+ private config;
5235
+ private projectPath;
5236
+ private agent;
5237
+ private sessionId;
5238
+ private startedAt;
5239
+ private sessionStartHook;
5240
+ private postToolUseHook;
5241
+ private sessionEndHook;
5242
+ private stats;
5243
+ constructor(projectPath: string, agent?: AgentType, config?: Partial<MemoryHookConfig>, sessionId?: string);
5244
+ /**
5245
+ * Handle session start
5246
+ */
5247
+ onSessionStart(workingDirectory?: string): Promise<ClaudeCodeHookOutput>;
5248
+ /**
5249
+ * Handle tool use
5250
+ */
5251
+ onToolUse(event: ToolUseEvent): Promise<ClaudeCodeHookOutput>;
5252
+ /**
5253
+ * Handle session end
5254
+ */
5255
+ onSessionEnd(toolCallsCount?: number): Promise<ClaudeCodeHookOutput>;
5256
+ /**
5257
+ * Record an error manually
5258
+ */
5259
+ recordError(error: string, context: string): Observation;
5260
+ /**
5261
+ * Record a solution manually
5262
+ */
5263
+ recordSolution(solution: string, context: string, relatedError?: string): Observation;
5264
+ /**
5265
+ * Record a decision manually
5266
+ */
5267
+ recordDecision(decision: string, options: string[], context: string): Observation;
5268
+ /**
5269
+ * Record file changes manually
5270
+ */
5271
+ recordFileChange(files: string[], action: string, context: string): Observation;
5272
+ /**
5273
+ * Force compression (regardless of threshold)
5274
+ */
5275
+ forceCompress(): Promise<Learning[]>;
5276
+ /**
5277
+ * Preview compression without executing
5278
+ */
5279
+ previewCompression(): Promise<{
5280
+ wouldCompress: boolean;
5281
+ observationCount: number;
5282
+ estimatedLearnings: number;
5283
+ observationTypes: Record<string, number>;
5284
+ }>;
5285
+ /**
5286
+ * Get current stats
5287
+ */
5288
+ getStats(): MemoryHookStats;
5289
+ /**
5290
+ * Get session ID
5291
+ */
5292
+ getSessionId(): string;
5293
+ /**
5294
+ * Get observation count
5295
+ */
5296
+ getObservationCount(): number;
5297
+ /**
5298
+ * Get pending errors
5299
+ */
5300
+ getPendingErrors(): Array<{
5301
+ error: string;
5302
+ timestamp: string;
5303
+ }>;
5304
+ /**
5305
+ * Get configuration
5306
+ */
5307
+ getConfig(): MemoryHookConfig;
5308
+ /**
5309
+ * Update configuration
5310
+ */
5311
+ setConfig(config: Partial<MemoryHookConfig>): void;
5312
+ /**
5313
+ * Check if auto-compression should trigger
5314
+ */
5315
+ private checkAutoCompression;
5316
+ /**
5317
+ * Generate Claude Code hooks.json configuration
5318
+ */
5319
+ generateClaudeCodeHooksConfig(): Record<string, unknown>;
5320
+ }
5321
+ /**
5322
+ * Create a memory hook manager
5323
+ */
5324
+ declare function createMemoryHookManager(projectPath: string, agent?: AgentType, config?: Partial<MemoryHookConfig>, sessionId?: string): MemoryHookManager;
5325
+
5326
+ /**
5327
+ * CLAUDE.md Auto-Updater
5328
+ *
5329
+ * Automatically updates CLAUDE.md with learnings from memory.
5330
+ * Populates the LEARNED section with high-effectiveness insights.
5331
+ */
5332
+
5333
+ /**
5334
+ * Update options
5335
+ */
5336
+ interface ClaudeMdUpdateOptions {
5337
+ minEffectiveness?: number;
5338
+ maxLearnings?: number;
5339
+ includeGlobal?: boolean;
5340
+ preserveManualEntries?: boolean;
5341
+ sectionTitle?: string;
5342
+ addTimestamp?: boolean;
5343
+ }
5344
+ /**
5345
+ * Parsed CLAUDE.md structure
5346
+ */
5347
+ interface ParsedClaudeMd {
5348
+ content: string;
5349
+ sections: Map<string, {
5350
+ start: number;
5351
+ end: number;
5352
+ content: string;
5353
+ }>;
5354
+ hasLearnedSection: boolean;
5355
+ learnedSectionContent?: string;
5356
+ learnedSectionRange?: {
5357
+ start: number;
5358
+ end: number;
5359
+ };
5360
+ }
5361
+ /**
5362
+ * Update result
5363
+ */
5364
+ interface ClaudeMdUpdateResult {
5365
+ updated: boolean;
5366
+ path: string;
5367
+ learningsAdded: number;
5368
+ learningSummaries: string[];
5369
+ previousLearnings: number;
5370
+ }
5371
+ /**
5372
+ * CLAUDE.md Updater
5373
+ *
5374
+ * Manages automatic updates to CLAUDE.md with learnings from memory.
5375
+ */
5376
+ declare class ClaudeMdUpdater {
5377
+ private projectPath;
5378
+ private claudeMdPath;
5379
+ constructor(projectPath: string, claudeMdPath?: string);
5380
+ /**
5381
+ * Parse CLAUDE.md to extract structure
5382
+ */
5383
+ parse(): ParsedClaudeMd;
5384
+ /**
5385
+ * Get learnings to add to CLAUDE.md
5386
+ */
5387
+ getLearningsForClaudeMd(options?: ClaudeMdUpdateOptions): Learning[];
5388
+ /**
5389
+ * Format learnings as CLAUDE.md LEARNED section
5390
+ */
5391
+ formatLearnedSection(learnings: Learning[], options?: ClaudeMdUpdateOptions): string;
5392
+ /**
5393
+ * Update CLAUDE.md with learnings
5394
+ */
5395
+ update(options?: ClaudeMdUpdateOptions): ClaudeMdUpdateResult;
5396
+ /**
5397
+ * Preview update without writing
5398
+ */
5399
+ preview(options?: ClaudeMdUpdateOptions): {
5400
+ learnings: Learning[];
5401
+ formattedSection: string;
5402
+ wouldUpdate: boolean;
5403
+ };
5404
+ /**
5405
+ * Check if CLAUDE.md exists
5406
+ */
5407
+ exists(): boolean;
5408
+ /**
5409
+ * Get CLAUDE.md path
5410
+ */
5411
+ getPath(): string;
5412
+ private categorizeLearnings;
5413
+ private formatLearningTitle;
5414
+ private extractSummary;
5415
+ private extractManualEntries;
5416
+ private combineWithManualEntries;
5417
+ private countLearnings;
5418
+ private createNewClaudeMd;
5419
+ }
5420
+ /**
5421
+ * Create a CLAUDE.md updater
5422
+ */
5423
+ declare function createClaudeMdUpdater(projectPath: string, claudeMdPath?: string): ClaudeMdUpdater;
5424
+ /**
5425
+ * Update CLAUDE.md with learnings (standalone function)
5426
+ */
5427
+ declare function updateClaudeMd(projectPath: string, options?: ClaudeMdUpdateOptions): ClaudeMdUpdateResult;
5428
+ /**
5429
+ * Sync global CLAUDE.md with global learnings
5430
+ */
5431
+ declare function syncGlobalClaudeMd(options?: ClaudeMdUpdateOptions): ClaudeMdUpdateResult;
5432
+
5433
+ /**
5434
+ * Progressive Disclosure System
5435
+ *
5436
+ * Implements 3-layer token-optimized retrieval for efficient context usage:
5437
+ * - Layer 1: Index (titles, timestamps, IDs) - ~50-100 tokens
5438
+ * - Layer 2: Timeline (context around observations) - ~200 tokens
5439
+ * - Layer 3: Details (full content) - ~500-1000 tokens
5440
+ */
5441
+ /**
5442
+ * Index entry (Layer 1)
5443
+ * Minimal information for fast scanning
5444
+ */
5445
+ interface IndexEntry {
5446
+ id: string;
5447
+ title: string;
5448
+ timestamp: string;
5449
+ tags: string[];
5450
+ scope: 'project' | 'global';
5451
+ effectiveness?: number;
5452
+ useCount: number;
5453
+ }
5454
+ /**
5455
+ * Timeline entry (Layer 2)
5456
+ * Context around the learning with activity timeline
5457
+ */
5458
+ interface TimelineEntry extends IndexEntry {
5459
+ excerpt: string;
5460
+ frameworks?: string[];
5461
+ patterns?: string[];
5462
+ sourceCount: number;
5463
+ lastUsed?: string;
5464
+ activityTimeline?: ActivityPoint[];
5465
+ }
5466
+ /**
5467
+ * Activity point for timeline
5468
+ */
5469
+ interface ActivityPoint {
5470
+ timestamp: string;
5471
+ type: 'created' | 'used' | 'updated' | 'rated';
5472
+ description?: string;
5473
+ }
5474
+ /**
5475
+ * Details entry (Layer 3)
5476
+ * Full content with all metadata
5477
+ */
5478
+ interface DetailsEntry extends TimelineEntry {
5479
+ content: string;
5480
+ sourceObservations?: string[];
5481
+ metadata?: Record<string, unknown>;
5482
+ }
5483
+ /**
5484
+ * Progressive disclosure options
5485
+ */
5486
+ interface ProgressiveDisclosureOptions {
5487
+ includeGlobal?: boolean;
5488
+ minRelevance?: number;
5489
+ maxResults?: number;
5490
+ }
5491
+ /**
5492
+ * Progressive Disclosure Manager
5493
+ *
5494
+ * Provides 3-layer retrieval for optimal token usage.
5495
+ */
5496
+ declare class ProgressiveDisclosureManager {
5497
+ private projectStore;
5498
+ private globalStore;
5499
+ constructor(projectPath: string, projectName?: string);
5500
+ /**
5501
+ * Layer 1: Get index of all learnings
5502
+ * Minimal tokens (~50-100 per entry)
5503
+ */
5504
+ getIndex(options?: ProgressiveDisclosureOptions): IndexEntry[];
5505
+ /**
5506
+ * Layer 2: Get timeline entries for specific IDs
5507
+ * Medium tokens (~200 per entry)
5508
+ */
5509
+ getTimeline(ids: string[], options?: ProgressiveDisclosureOptions): TimelineEntry[];
5510
+ /**
5511
+ * Layer 3: Get full details for specific IDs
5512
+ * High tokens (~500-1000 per entry)
5513
+ */
5514
+ getDetails(ids: string[], options?: ProgressiveDisclosureOptions): DetailsEntry[];
5515
+ /**
5516
+ * Smart retrieval with automatic layer selection
5517
+ * Uses minimum tokens needed to satisfy the query.
5518
+ *
5519
+ * Note: tokensUsed reflects cumulative cost of the retrieval operation
5520
+ * (index lookup + any deeper layer fetches), not just the returned entries.
5521
+ * This is intentional since progressive disclosure requires scanning
5522
+ * the index first before fetching timeline/details.
5523
+ */
5524
+ smartRetrieve(query: string, tokenBudget?: number, options?: ProgressiveDisclosureOptions): {
5525
+ layer: 1 | 2 | 3;
5526
+ entries: IndexEntry[] | TimelineEntry[] | DetailsEntry[];
5527
+ tokensUsed: number;
5528
+ tokensRemaining: number;
5529
+ };
5530
+ /**
5531
+ * Estimate tokens for a given layer and count
5532
+ */
5533
+ estimateTokens(layer: 1 | 2 | 3, count: number): number;
5534
+ /**
5535
+ * Format entries for injection
5536
+ */
5537
+ formatForInjection(entries: IndexEntry[] | TimelineEntry[] | DetailsEntry[], layer: 1 | 2 | 3): string;
5538
+ private toIndexEntry;
5539
+ private toTimelineEntry;
5540
+ private toDetailsEntry;
5541
+ private buildActivityTimeline;
5542
+ private findRelevantIds;
5543
+ }
5544
+ /**
5545
+ * Create a progressive disclosure manager
5546
+ */
5547
+ declare function createProgressiveDisclosureManager(projectPath: string, projectName?: string): ProgressiveDisclosureManager;
5548
+
4864
5549
  /**
4865
5550
  * Team Collaboration Types
4866
5551
  */
@@ -10703,6 +11388,27 @@ declare class HybridSearchPipeline {
10703
11388
  declare function createHybridSearchPipeline(config?: Partial<LocalModelConfig>): HybridSearchPipeline;
10704
11389
  declare function hybridSearch(skills: SkillSummary[], query: string, options?: Partial<HybridSearchOptions>): Promise<HybridSearchResponse>;
10705
11390
 
11391
+ interface ParsedEntry {
11392
+ name: string;
11393
+ url: string;
11394
+ description: string;
11395
+ category: string;
11396
+ }
11397
+ declare class CommunityRegistry implements ExternalRegistry {
11398
+ private skillsMdPath?;
11399
+ name: string;
11400
+ private entries;
11401
+ private loaded;
11402
+ constructor(skillsMdPath?: string | undefined);
11403
+ private load;
11404
+ private parse;
11405
+ search(query: string, options?: {
11406
+ limit?: number;
11407
+ }): Promise<ExternalSkill[]>;
11408
+ getAll(): ParsedEntry[];
11409
+ getCategories(): string[];
11410
+ }
11411
+
10706
11412
  interface ExternalSkill {
10707
11413
  name: string;
10708
11414
  description: string;
@@ -10736,6 +11442,7 @@ declare class GitHubSkillRegistry implements ExternalRegistry {
10736
11442
  timeoutMs?: number;
10737
11443
  }): Promise<ExternalSkill[]>;
10738
11444
  }
11445
+
10739
11446
  declare class FederatedSearch {
10740
11447
  private registries;
10741
11448
  addRegistry(registry: ExternalRegistry): void;
@@ -10744,4 +11451,106 @@ declare class FederatedSearch {
10744
11451
  }): Promise<FederatedResult>;
10745
11452
  }
10746
11453
 
10747
- export { AGENT_CLI_CONFIGS, AGENT_CONFIG, AGENT_DISCOVERY_PATHS, AGENT_FORMAT_MAP, AGENT_INSTRUCTION_TEMPLATES, AGENT_SKILL_FORMATS, type AIConfig, type AIGenerateOptions, AIManager, type AIProvider, AISearch, type AISearchOptions, type AISearchResult, AISkillGenerator, ALL_AGENT_DISCOVERY_PATHS, APIBasedCompressor, type APICompressionConfig, type ActivatedSkill, type AdvancedScore, type AgentAdapterInfo, type AgentCLIConfig, type AgentCommandFormat, AgentConfig, type AgentDirectoryConfig, type AgentExecutionResult, type AgentFormatCategory, AgentFrontmatter, AgentHook, type AgentHookFormat, type AgentInstance, type AgentInstructionTemplate, AgentLocation, AgentMetadata, AgentPermissionMode, type AgentPipeline, type AgentSkillFormat, type AgentStatus, type AgentTranslationOptions, type AgentTranslationResult, AgentType, type AssertionResult, type AuditEvent, type AuditEventType, type AuditExportOptions, AuditLogger, type AuditQuery, type AuditStats, BUILTIN_PIPELINES, BaseAIProvider, type BenchmarkResult, BitbucketProvider, type BundleManifest, CATEGORY_RELEVANCE_PROMPT, CATEGORY_TAXONOMY, CIConfig, CIRCLECI_CONFIG_TEMPLATE, CONTEXT_DIR, CONTEXT_FILE, CUSTOM_AGENT_FORMAT_MAP, type CanonicalAgent, type CanonicalSkill, type CategoryMapping, type CategoryScore, type CategoryStats, type CheckpointHandler, type CheckpointResponse, type ClarityScore, type CloneOptions, type CloneResult, CodeConvention, type CommandArg, type CommandBundle, type CommandContext, type CommandEvent, type CommandEventListener, CommandGenerator, type CommandGeneratorOptions, type CommandHandler, type CommandPlugin, CommandRegistry, type CommandRegistryOptions, type CommandResult, type CommandSearchOptions, type CommandValidationResult, type CompletenessResult, type CompressedLearning, type CompressionEngine, type CompressionOptions, type CompressionResult, type ConnectorAnalysis, type ConnectorCategory, ConnectorCategorySchema, type ConnectorConfig, ConnectorConfigSchema, type ConnectorMapping, ConnectorMappingSchema, type ConnectorPlaceholder, ConnectorPlaceholderSchema, type ContextCategory, type ContextExportOptions, type ContextImportOptions, type ContextLoadOptions, ContextLoader, ContextManager, ContextSync, type ContextSyncOptions, CopilotTranslator, type CrossAgentSkill, type CurrentExecution, CursorTranslator, type CustomAgent, DEFAULT_CACHE_TTL, DEFAULT_CHUNKING_CONFIG, DEFAULT_CONTEXT_CATEGORIES, DEFAULT_GUIDELINE_CONFIG, DEFAULT_HYBRID_CONFIG, DEFAULT_LEARNING_CONFIG, DEFAULT_MEMORY_CONFIG, DEFAULT_PROFILE_CONFIG, DEFAULT_REASONING_CONFIG, DEFAULT_SCORING_WEIGHTS, DEFAULT_SKILL_SOURCES, DependencyInfo, Detection, type DetectionSource, type DiscoveredSkill, DockerConfig, EXPLANATION_PROMPT, EmbeddingService, type EmbeddingServiceStats, EnvConfig, type EvolvingPattern, type ExecutableSkill, type ExecutableTask, type ExecutableTaskType, type ExecutionContext, type ExecutionFlow, type ExecutionFlowConfig, ExecutionFlowSchema, type ExecutionHistory, ExecutionManager, type ExecutionMode, type ExecutionModeConfig, type ExecutionOptions, type ExecutionProgressCallback, type ExecutionProgressEvent, type ExecutionStep, ExecutionStepSchema, type ExecutionStepStatus, ExecutionStepStatusSchema, type ExecutionStrategy, type ExecutionTaskStatus, type ExpandedQuery, type ExplainedMatch, type ExplainedMatchDetails, type ExplainedRecommendation, type ExplainedScoredSkill, type ExternalRegistry, type ExternalSkill, type FederatedResult, FederatedSearch, type FeedbackResult, type FlowMetrics, type FlowSummary, type FormatCategory, type FormatTranslator, type FreshnessResult, GITHUB_ACTION_TEMPLATE, GITLAB_CI_TEMPLATE, type GenerateOptions, type GeneratedInstruction, type GeneratedSkill, type GitAnalysisOptions, type GitAnalysisResult, type GitAnalysisSummary, type GitCommit, type GitFileChange, GitHubProvider, GitHubSkillRegistry, GitLabProvider, GitProvider, type GitProviderAdapter, type Guideline, type GuidelineCategory, type GuidelineConfig, type HookConfig, type HookContext, type HookError, type HookEvent, type HookEventListener, HookManager, type HookManagerOptions, type HookTriggerResult, type HybridSearchOptions, HybridSearchPipeline, type HybridSearchResponse, type HybridSearchResult, INDEX_CACHE_HOURS, INDEX_PATH, type ImportOptions, type IndexBuildCallback, type IndexBuildProgress, type IndexSource, type InjectedMemory, type InjectionMode, type InjectionOptions, type InjectionResult, type InstallOptions, type InstallResult, type InstalledPackInfo, type InstalledSkillInfo, type IssueSeverity, KNOWN_SKILL_REPOS, type LLMResponse, type LearnedPattern, type LearnedSkillOutput, type Learning, type LearningConfig, LearningConsolidator, LearningStore, type LearningStoreData, type LoadedContext, type LocalModelConfig, LocalModelConfigSchema, LocalModelManager, LocalProvider, MARKETPLACE_CACHE_FILE, MODEL_REGISTRY, MarketplaceAggregator, type MarketplaceConfig, type MarketplaceIndex, type MarketplaceSearchOptions, type MarketplaceSearchResult, type MarketplaceSkill, type MatchCategory, type MatchReason, type MatcherFunction, MemoryCompressor, type MemoryConfig, MemoryEnabledEngine, type MemoryEnabledEngineOptions, type MemoryFull, type MemoryIndex, MemoryIndexStore, MemoryInjector, MemoryObserver, type MemoryObserverConfig, type MemoryPaths, type MemoryPreview, type MemorySearchOptions, type MemorySearchResult, type MemoryStatus, type MemorySummary, type MessageHandler, type MessageType, MethodologyLoader, MethodologyManager, type MethodologyManagerOptions, type MethodologyPack, type MethodologySearchQuery, type MethodologySearchResult, type MethodologySkill, type MethodologySkillMetadata, type MethodologyState, type MethodologySyncResult, MockAIProvider, type ModeCapabilities, type ModeDetectionResult, type ObservableEvent, type ObservableEventType, type Observation, type ObservationContent, ObservationStore, type ObservationStoreData, type ObservationType, type OperationalProfile, type OrchestratorOptions, type OrchestratorTaskStatus, type OrchestratorTeamConfig, PRE_COMMIT_CONFIG_TEMPLATE, PRE_COMMIT_HOOK_TEMPLATE, PROJECT_TYPE_HINTS, PackageManager, type ParseOptions, type PatternCategory, type PatternDomain, type PatternExtractionResult, type PatternGenerateOptions, type PatternStore, type PipelineStage, type PlaceholderMatch, type PlaceholderReplacement, type PlanEvent, type PlanEventListener, type PlanExecutionOptions, type PlanExecutionResult, PlanExecutor, PlanGenerator, PlanParser, type PlanResult, type PlanStatus, type PlanStep, type PlanTask, type PlanTaskFiles, type PlanTaskResult, type PlanValidationResult, PlanValidator, type Plugin, type PluginConfig, type PluginContext, type PluginHooks, PluginLoader, PluginManager, type PluginMetadata, PrimerAnalysis, PrimerAnalyzer, PrimerGenerator, PrimerLanguage, type PrimerOptions, type PrimerResult, type ProfileConfig, type ProfileName, ProjectContext, ProjectDetector, ProjectPatterns, type ProjectProfile, ProjectStack, ProjectStructure, type ProviderPlugin, type QualityScore, QueryExpander, type RRFInput, type RRFRanking, type RankerResult, RateLimitError, type ReasoningCacheEntry, type ReasoningConfig, ReasoningEngine, type ReasoningEngineStats, type ReasoningPrompt, type ReasoningProvider, ReasoningProviderSchema, type ReasoningRecommendOptions, ReasoningRecommendationEngine, type ReasoningRecommendationResult, type RecommendHybridSearchOptions, type RecommendHybridSearchResult, type RecommendOptions, RecommendationEngine, type RecommendationResult, type RegisteredCommand, type RegistrySkill, type RelatedSkillResult, type RelationType, type RerankerInput, type RerankerOutput, type ReviewIssue, type ReviewResult, type ReviewStage, type ReviewStageName, RuleBasedCompressor, SEARCH_PLANNING_PROMPT, SESSION_FILE, SKILL_DISCOVERY_PATHS, SKILL_MATCH_PROMPT, STANDARD_PLACEHOLDERS, type ScoredSkill, type ScoringWeights, type SearchOptions, type SearchPlan, type SearchResult, type SearchableSkill, type SessionContext, type SessionDecision, type SessionFile, SessionManager, type SessionMessage, type SessionState, type SessionSummary, type SessionTask, type ShareOptions, type SharedSkill, Skill, SkillBundle, type SkillChunk, SkillChunkSchema, type SkillEmbedding, type SkillEntry, type SkillExample, SkillExecutionEngine, type SkillExecutionEvent, type SkillExecutionResult, type SkillExecutor, type SkillExecutorOptions, SkillFrontmatter, type SkillGraph, type SkillHook, type SkillIndex, SkillLocation, SkillMdTranslator, SkillMetadata, type SkillNode, SkillPreferences, type SkillRelation, type SkillSource, SkillSummary, type SkillTestCase, type SkillTestSuite, type SkillToSubagentOptions, type SkillTranslationOptions, type SkillTranslationResult, type SkillTree, SkillTreeSchema, SkillTriggerEngine, SkillkitConfig, type SkillsManifest, type SlashCommand, type SlashCommandResult, type SpecificityScore, type StepDefinition, type StepExecutor, type StepType, type StructureScore, type StructuredPlan, type SyncOptions, type SyncReport, type SyncResult, TAG_TO_CATEGORY, TAG_TO_TECH, TASK_TEMPLATES, TREE_FILE_NAME, type Task, type TaskEvent, type TaskEventListener, type TaskExecutionResult, type TaskFiles, type TaskFilter, TaskManager, type TaskPlan, type TaskResult, type TaskStatus, type TaskStep, type TaskTemplate, type Team, type TeamConfig, type TeamEvent, type TeamEventListener, TeamManager, type TeamMember, type TeamMessage, TeamMessageBus, TeamOrchestrator, type TeamRegistry, type TeamStatus, type TestAssertion, type TestAssertionType, type TestCaseResult, type TestProgressEvent, type TestResult, type TestRunnerOptions, type TestSuiteResult, TranslatableSkillFrontmatter, type TranslationOptions, type TranslationPath, type TranslationResult, type TranslatorPlugin, TranslatorRegistry, TreeGenerator, type TreeGeneratorOptions, type TreeNode, TreeNodeSchema, type TreePath, type TreeReasoningResult, type TreeSearchQuery, type TreeSearchResult, type TreeTraversalStep, type TriggerEngineOptions, type UpdateOptions, type ValidationError, type ValidationIssue, type ValidationResult, type ValidationWarning, type ValidatorOptions, type VectorSearchResult, VectorStore, type VectorStoreConfig, type VerificationRule, WORKFLOWS_DIR, WORKFLOW_EXTENSION, type WaveExecutionStatus, type WellKnownIndex, WellKnownProvider, type WellKnownSkill, WindsurfTranslator, type Workflow, type WorkflowExecution, type WorkflowExecutionStatus, WorkflowOrchestrator, type WorkflowProgressCallback, type WorkflowSkill, type WorkflowWave, addCustomGuideline, addCustomProfile, addPattern, addToManifest, agentExists, analyzeForPrimer, analyzeGitHistory, analyzePlaceholders, analyzePrimer, analyzeProject, applyConnectorConfig, applyPositionAwareBlending, approvePattern, benchmarkSkill, buildCategoryRelevancePrompt, buildExplanationPrompt, buildSearchPlanPrompt, buildSkillGraph, buildSkillIndex, buildSkillMatchPrompt, calculateBaseSkillsUrl, calculatePercentile, canTranslate, clusterPatterns, compareTreeVersions, computeRRFScore, copilotTranslator, createAPIBasedCompressor, createCommandGenerator, createCommandRegistry, createConnectorConfig, createContextLoader, createContextManager, createContextSync, createEmbeddingService, createExecutionEngine, createExecutionManager, createHookManager, createHybridSearchPipeline, createMarketplaceAggregator, createMemoryCompressor, createMemoryEnabledEngine, createMemoryInjector, createMemoryObserver, createMessageBus, createMethodologyLoader, createMethodologyManager, createModeAwareExecutor, createPlanExecutor, createPlanGenerator, createPlanParser, createPlanValidator, createPluginManager, createQueryExpander, createReasoningEngine, createReasoningRecommendationEngine, createRecommendationEngine, createRuleBasedCompressor, createSessionFile, createSessionManager, createSimulatedSkillExecutor, createSkillBundle, createSkillExecutor, createTaskManager, createTeamManager, createTeamOrchestrator, createTestSuiteFromFrontmatter, createTriggerEngine, createVectorStore, createWorkflowOrchestrator, createWorkflowTemplate, cursorTranslator, deserializeGraph, deserializeTree, detectCategory, detectExecutionMode, detectPlaceholders, detectProvider, detectSkillFormat, disableGuideline, discoverAgents, discoverAgentsForAgent, discoverAgentsFromPath, discoverAgentsRecursive, discoverGlobalAgents, discoverSkills, dryRunExecutor, enableGuideline, estimateTokens, evaluateSkillContent, evaluateSkillDirectory, evaluateSkillFile, executeWithAgent, expandQuerySimple, exportBundle, exportPatternsAsJson, extractAgentContent, extractAgentFrontmatter, extractField, extractFrontmatter, extractJsonFromResponse, extractPatternsFromSession, extractSkillMetadata, fetchSkillsFromRepo, findAgent, findAllAgents, findAllSkills, findManifestPath, findSkill, findSkillsByRelationType, findSkillsInCategory, formatBytes, formatSkillAsPrompt, fromCanonicalAgent, fuseWithRRF, generateComparisonNotes, generateConnectorsMarkdown, generateManifestFromInstalled, generatePatternReport, generatePrimer, generatePrimerForAgent, generateRecommendations, generateSkillFromPatterns, generateSkillTree, generateSkillsConfig, generateSubagentFromSkill, generateWellKnownIndex, generateWellKnownStructure, getActiveProfile, getAgentCLIConfig, getAgentConfigFile, getAgentConfigPath, getAgentDirectoryConfig, getAgentFilename, getAgentFormat, getAgentSkillsDir, getAgentStats, getAgentTargetDirectory, getAgentsDirectory, getAllCategories, getAllGuidelines, getAllPatterns, getAllProfiles, getAllProviders, getAllSkillsDirs, getApprovedPatterns, getAvailableCLIAgents, getBuiltinGuidelines, getBuiltinPacksDir, getBuiltinPipeline, getBuiltinPipelines, getBuiltinProfiles, getCICDTemplate, getCategoryStats, getConfigFile, getConfigFormat, getDefaultConfigPath, getDefaultModelDir, getDefaultStorePath, getEnabledGuidelineContent, getEnabledGuidelines, getEvolvingPattern, getEvolvingPatternsByDomain, getExecutionStrategy, getGitCommits, getGlobalConfigPath, getGlobalSkillsDir, getGrade, getGuideline, getGuidelineContent, getGuidelinesByCategory, getHighConfidencePatterns, getIndexStatus, getInstallDir, getLowConfidencePatterns, getManualExecutionInstructions, getMemoryPaths, getMemoryStatus, getModeDescription, getMostRecentSession, getMostUsedPatterns, getPattern, getPatternStats, getPatternsByCategory, getPlaceholderInfo, getProfile, getProfileContext, getProfileNames, getProjectConfigPath, getProvider, getQualityGrade, getRankFromScore, getRecentBugFixes, getRecentRefactors, getRelatedSkills, getSearchDirs, getSkillPath, getSkillsDir, getStackTags, getStandaloneAlternative, getSupportedTranslationAgents, getTechTags, globalMemoryDirectoryExists, hybridSearch, importBundle, importPatternsFromJson, initContext, initManifest, initProject, initializeMemoryDirectory, isAgentCLIAvailable, isAgentCompatible, isBuiltinGuideline, isBuiltinProfile, isGitUrl, isGuidelineEnabled, isHighQuality, isIndexStale, isLocalPath, isPathInside, listCICDTemplates, listSessions, listWorkflows, loadAgentMetadata, loadAndConvertSkill, loadConfig, loadContext, loadGuidelineConfig, loadIndex, loadLearningConfig, loadManifest, loadMetadata, loadPatternStore, loadPlugin, loadPluginsFromDirectory, loadProfileConfig, loadSessionFile, loadSkillMetadata, loadTree, loadWorkflow, loadWorkflowByName, memoryDirectoryExists, mergePatterns, mergeRankings, normalizeScores, parseAgentDir, parseAgentFile, parseShorthand, parseSkill, parseSkillContent, parseSkillContentToCanonical, parseSkillToCanonical, parseSource, parseWorkflow, readAgentContent, readSkillContent, recordFailure, recordSuccess, rejectPattern, removeCustomGuideline, removeCustomProfile, removeFromManifest, removePattern, replacePlaceholders, requireCapability, requireEnhancedMode, runTestSuite, saveConfig, saveGeneratedSkill, saveGuidelineConfig, saveIndex, saveLearningConfig, saveManifest, savePatternStore, saveProfileConfig, saveSessionFile, saveSkillMetadata, saveTree, saveWorkflow, serializeGraph, serializeTree, serializeWorkflow, setActiveProfile, setSkillEnabled, shellExecutor, skillMdTranslator, skillToSubagent, suggestMappingsFromMcp, supportsAutoDiscovery, supportsSlashCommands, syncToAgent, syncToAllAgents, toCanonicalAgent, translateAgent, translateAgentContent, translateAgents, translateCanonicalAgent, translateSkill, translateSkillFile, translateSkillToAgent, translateSkillToAll, translatorRegistry, treeToMarkdown, treeToText, updateSessionFile, validateAgent, validateBuiltinPacks, validateCategoryScore, validateConnectorConfig, validatePackDirectory, validatePackManifest, validatePlan, validateSearchPlan, validateSkill, validateSkillContent, validateWorkflow, weightedCombine, windsurfTranslator, wrapProgressCallbackWithMemory, writeTranslatedSkill };
11454
+ interface CacheStats {
11455
+ hits: number;
11456
+ misses: number;
11457
+ size: number;
11458
+ maxSize: number;
11459
+ hitRate: number;
11460
+ }
11461
+ interface CacheOptions {
11462
+ maxSize?: number;
11463
+ ttlMs?: number;
11464
+ }
11465
+ interface CacheBackend<V = unknown> {
11466
+ get(key: string): V | undefined;
11467
+ set(key: string, value: V): void;
11468
+ delete(key: string): boolean;
11469
+ has(key: string): boolean;
11470
+ clear(): void;
11471
+ stats(): CacheStats;
11472
+ }
11473
+
11474
+ declare class MemoryCache<V = unknown> implements CacheBackend<V> {
11475
+ private store;
11476
+ private maxSize;
11477
+ private ttlMs;
11478
+ private hitCount;
11479
+ private missCount;
11480
+ constructor(options?: CacheOptions);
11481
+ get(key: string): V | undefined;
11482
+ set(key: string, value: V): void;
11483
+ delete(key: string): boolean;
11484
+ has(key: string): boolean;
11485
+ clear(): void;
11486
+ stats(): CacheStats;
11487
+ private evictLRU;
11488
+ }
11489
+
11490
+ interface RankableSkill {
11491
+ name: string;
11492
+ description?: string;
11493
+ content?: string;
11494
+ stars?: number;
11495
+ installs?: number;
11496
+ references?: string[];
11497
+ }
11498
+ interface RankedSkill<T extends RankableSkill = RankableSkill> {
11499
+ skill: T;
11500
+ score: number;
11501
+ breakdown: ScoreBreakdown;
11502
+ }
11503
+ interface ScoreBreakdown {
11504
+ contentAvailability: number;
11505
+ queryMatch: number;
11506
+ popularity: number;
11507
+ referenceScore: number;
11508
+ }
11509
+ declare class RelevanceRanker {
11510
+ rank<T extends RankableSkill>(skills: T[], query?: string): RankedSkill<T>[];
11511
+ private score;
11512
+ private scoreContent;
11513
+ private scoreQuery;
11514
+ private scorePopularity;
11515
+ private scoreReferences;
11516
+ }
11517
+
11518
+ interface SkillReference {
11519
+ path: string;
11520
+ type: 'example' | 'doc' | 'resource' | 'asset';
11521
+ name: string;
11522
+ }
11523
+ interface ParsedSkillContent {
11524
+ frontmatter: Record<string, unknown>;
11525
+ body: string;
11526
+ references: SkillReference[];
11527
+ raw: string;
11528
+ }
11529
+ declare function discoverReferences(skillDir: string): SkillReference[];
11530
+ declare function stripFrontmatter(raw: string): {
11531
+ frontmatter: Record<string, unknown>;
11532
+ body: string;
11533
+ };
11534
+ declare function parseSkillMd(raw: string, skillDir?: string): ParsedSkillContent;
11535
+
11536
+ interface RuntimeSkillSource {
11537
+ owner: string;
11538
+ repo: string;
11539
+ }
11540
+ interface FetchedSkill {
11541
+ source: RuntimeSkillSource;
11542
+ skillId: string;
11543
+ parsed: ParsedSkillContent;
11544
+ fetchedAt: number;
11545
+ }
11546
+ declare class SkillInjector {
11547
+ private cache;
11548
+ constructor(cacheTtlMs?: number);
11549
+ fetch(source: string, skillId: string): Promise<FetchedSkill>;
11550
+ inject(source: string, skillId: string): Promise<string>;
11551
+ private fetchRawSkillMd;
11552
+ clearCache(): void;
11553
+ cacheStats(): CacheStats;
11554
+ }
11555
+
11556
+ export { AGENT_CLI_CONFIGS, AGENT_CONFIG, AGENT_DISCOVERY_PATHS, AGENT_FORMAT_MAP, AGENT_INSTRUCTION_TEMPLATES, AGENT_SKILL_FORMATS, type AIConfig, type AIGenerateOptions, AIManager, type AIProvider, AISearch, type AISearchOptions, type AISearchResult, AISkillGenerator, ALL_AGENT_DISCOVERY_PATHS, APIBasedCompressor, type APICompressionConfig, type ActivatedSkill, type ActivityPoint, type AdvancedScore, type AgentAdapterInfo, type AgentCLIConfig, type AgentCommandFormat, AgentConfig, type AgentDirectoryConfig, type AgentExecutionResult, type AgentFormatCategory, AgentFrontmatter, AgentHook, type AgentHookFormat, type AgentInstance, type AgentInstructionTemplate, AgentLocation, AgentMetadata, AgentPermissionMode, type AgentPipeline, type AgentSkillFormat, type AgentStatus, type AgentTranslationOptions, type AgentTranslationResult, AgentType, type AssertionResult, type AuditEvent, type AuditEventType, type AuditExportOptions, AuditLogger, type AuditQuery, type AuditStats, type AutoCompressCallback, BUILTIN_PIPELINES, BaseAIProvider, type BenchmarkResult, BitbucketProvider, type BundleManifest, CATEGORY_RELEVANCE_PROMPT, CATEGORY_TAXONOMY, CIConfig, CIRCLECI_CONFIG_TEMPLATE, CONTEXT_DIR, CONTEXT_FILE, CUSTOM_AGENT_FORMAT_MAP, type CacheBackend, type CacheOptions, type CacheStats, type CanonicalAgent, type CanonicalSkill, type CategoryMapping, type CategoryScore, type CategoryStats, type CheckpointHandler, type CheckpointResponse, type ClarityScore, type ClaudeCodeHookEvent, type ClaudeCodeHookOutput, type ClaudeMdUpdateOptions, type ClaudeMdUpdateResult, ClaudeMdUpdater, type CloneOptions, type CloneResult, CodeConvention, type CommandArg, type CommandBundle, type CommandContext, type CommandEvent, type CommandEventListener, CommandGenerator, type CommandGeneratorOptions, type CommandHandler, type CommandPlugin, CommandRegistry, type CommandRegistryOptions, type CommandResult, type CommandSearchOptions, type CommandValidationResult, CommunityRegistry, type CompletenessResult, type CompressedLearning, type CompressionEngine, type CompressionOptions, type CompressionResult, type ConnectorAnalysis, type ConnectorCategory, ConnectorCategorySchema, type ConnectorConfig, ConnectorConfigSchema, type ConnectorMapping, ConnectorMappingSchema, type ConnectorPlaceholder, ConnectorPlaceholderSchema, type ContextCategory, type ContextExportOptions, type ContextImportOptions, type ContextLoadOptions, ContextLoader, ContextManager, ContextSync, type ContextSyncOptions, CopilotTranslator, type CrossAgentSkill, type CurrentExecution, CursorTranslator, type CustomAgent, DEFAULT_CACHE_TTL, DEFAULT_CHUNKING_CONFIG, DEFAULT_CONTEXT_CATEGORIES, DEFAULT_GUIDELINE_CONFIG, DEFAULT_HYBRID_CONFIG, DEFAULT_LEARNING_CONFIG, DEFAULT_MEMORY_CONFIG, DEFAULT_MEMORY_HOOK_CONFIG, DEFAULT_PROFILE_CONFIG, DEFAULT_REASONING_CONFIG, DEFAULT_SCORING_WEIGHTS, DEFAULT_SKILL_SOURCES, DependencyInfo, type DetailsEntry, Detection, type DetectionSource, type DiscoveredSkill, DockerConfig, EXPLANATION_PROMPT, EmbeddingService, type EmbeddingServiceStats, EnvConfig, type EvolvingPattern, type ExecutableSkill, type ExecutableTask, type ExecutableTaskType, type ExecutionContext, type ExecutionFlow, type ExecutionFlowConfig, ExecutionFlowSchema, type ExecutionHistory, ExecutionManager, type ExecutionMode, type ExecutionModeConfig, type ExecutionOptions, type ExecutionProgressCallback, type ExecutionProgressEvent, type ExecutionStep, ExecutionStepSchema, type ExecutionStepStatus, ExecutionStepStatusSchema, type ExecutionStrategy, type ExecutionTaskStatus, type ExpandedQuery, type ExplainedMatch, type ExplainedMatchDetails, type ExplainedRecommendation, type ExplainedScoredSkill, type ExternalRegistry, type ExternalSkill, type FederatedResult, FederatedSearch, type FeedbackResult, type FetchedSkill, type FlowMetrics, type FlowSummary, type FormatCategory, type FormatTranslator, type FreshnessResult, GITHUB_ACTION_TEMPLATE, GITLAB_CI_TEMPLATE, type GenerateOptions, type GeneratedInstruction, type GeneratedSkill, type GitAnalysisOptions, type GitAnalysisResult, type GitAnalysisSummary, type GitCommit, type GitFileChange, GitHubProvider, GitHubSkillRegistry, GitLabProvider, GitProvider, type GitProviderAdapter, type Guideline, type GuidelineCategory, type GuidelineConfig, type HookConfig, type HookContext, type HookError, type HookEvent, type HookEventListener, HookManager, type HookManagerOptions, type HookTriggerResult, type HybridSearchOptions, HybridSearchPipeline, type HybridSearchResponse, type HybridSearchResult, INDEX_CACHE_HOURS, INDEX_PATH, type ImportOptions, type IndexBuildCallback, type IndexBuildProgress, type IndexEntry, type IndexSource, type InjectedMemory, type InjectionMode, type InjectionOptions, type InjectionResult, type InstallOptions, type InstallResult, type InstalledPackInfo, type InstalledSkillInfo, type IssueSeverity, KNOWN_SKILL_REPOS, type LLMResponse, type LearnedPattern, type LearnedSkillOutput, type Learning, type LearningConfig, LearningConsolidator, LearningStore, type LearningStoreData, type LoadedContext, type LocalModelConfig, LocalModelConfigSchema, LocalModelManager, LocalProvider, MARKETPLACE_CACHE_FILE, MODEL_REGISTRY, MarketplaceAggregator, type MarketplaceConfig, type MarketplaceIndex, type MarketplaceSearchOptions, type MarketplaceSearchResult, type MarketplaceSkill, type MatchCategory, type MatchReason, type MatcherFunction, MemoryCache, MemoryCompressor, type MemoryConfig, MemoryEnabledEngine, type MemoryEnabledEngineOptions, type MemoryFull, type MemoryHookConfig, MemoryHookManager, type MemoryHookStats, type MemoryIndex, MemoryIndexStore, MemoryInjector, MemoryObserver, type MemoryObserverConfig, type MemoryPaths, type MemoryPreview, type MemorySearchOptions, type MemorySearchResult, type MemoryStatus, type MemorySummary, type MessageHandler, type MessageType, MethodologyLoader, MethodologyManager, type MethodologyManagerOptions, type MethodologyPack, type MethodologySearchQuery, type MethodologySearchResult, type MethodologySkill, type MethodologySkillMetadata, type MethodologyState, type MethodologySyncResult, MockAIProvider, type ModeCapabilities, type ModeDetectionResult, type ObservableEvent, type ObservableEventType, type Observation, type ObservationContent, ObservationStore, type ObservationStoreData, type ObservationStoreOptions, type ObservationType, type OperationalProfile, type OrchestratorOptions, type OrchestratorTaskStatus, type OrchestratorTeamConfig, PRE_COMMIT_CONFIG_TEMPLATE, PRE_COMMIT_HOOK_TEMPLATE, PROJECT_TYPE_HINTS, PackageManager, type ParseOptions, type ParsedClaudeMd, type ParsedSkillContent, type PatternCategory, type PatternDomain, type PatternExtractionResult, type PatternGenerateOptions, type PatternStore, type PipelineStage, type PlaceholderMatch, type PlaceholderReplacement, type PlanEvent, type PlanEventListener, type PlanExecutionOptions, type PlanExecutionResult, PlanExecutor, PlanGenerator, PlanParser, type PlanResult, type PlanStatus, type PlanStep, type PlanTask, type PlanTaskFiles, type PlanTaskResult, type PlanValidationResult, PlanValidator, type Plugin, type PluginConfig, type PluginContext, type PluginHooks, PluginLoader, PluginManager, type PluginMetadata, PostToolUseHook, PrimerAnalysis, PrimerAnalyzer, PrimerGenerator, PrimerLanguage, type PrimerOptions, type PrimerResult, type ProfileConfig, type ProfileName, ProgressiveDisclosureManager, type ProgressiveDisclosureOptions, ProjectContext, ProjectDetector, ProjectPatterns, type ProjectProfile, ProjectStack, ProjectStructure, type ProviderPlugin, type QualityScore, QueryExpander, type RRFInput, type RRFRanking, type RankableSkill, type RankedSkill, type RankerResult, RateLimitError, type ReasoningCacheEntry, type ReasoningConfig, ReasoningEngine, type ReasoningEngineStats, type ReasoningPrompt, type ReasoningProvider, ReasoningProviderSchema, type ReasoningRecommendOptions, ReasoningRecommendationEngine, type ReasoningRecommendationResult, type RecommendHybridSearchOptions, type RecommendHybridSearchResult, type RecommendOptions, RecommendationEngine, type RecommendationResult, type RegisteredCommand, type RegistrySkill, type RelatedSkillResult, type RelationType, RelevanceRanker, type RerankerInput, type RerankerOutput, type ReviewIssue, type ReviewResult, type ReviewStage, type ReviewStageName, RuleBasedCompressor, type RuntimeSkillSource, SEARCH_PLANNING_PROMPT, SESSION_FILE, SKILL_DISCOVERY_PATHS, SKILL_MATCH_PROMPT, STANDARD_PLACEHOLDERS, type ScoreBreakdown, type ScoredSkill, type ScoringWeights, type SearchOptions, type SearchPlan, type SearchResult, type SearchableSkill, type SessionContext, type SessionDecision, type SessionEndContext, SessionEndHook, type SessionEndResult, type SessionFile, SessionManager, type SessionMessage, type SessionStartContext, SessionStartHook, type SessionStartResult, type SessionState, type SessionSummary, type SessionTask, type ShareOptions, type SharedSkill, Skill, SkillBundle, type SkillChunk, SkillChunkSchema, type SkillEmbedding, type SkillEntry, type SkillExample, SkillExecutionEngine, type SkillExecutionEvent, type SkillExecutionResult, type SkillExecutor, type SkillExecutorOptions, SkillFrontmatter, type SkillGraph, type SkillHook, type SkillIndex, SkillInjector, SkillLocation, SkillMdTranslator, SkillMetadata, type SkillNode, SkillPreferences, type SkillReference, type SkillRelation, type SkillSource, SkillSummary, type SkillTestCase, type SkillTestSuite, type SkillToSubagentOptions, type SkillTranslationOptions, type SkillTranslationResult, type SkillTree, SkillTreeSchema, SkillTriggerEngine, SkillkitConfig, type SkillsManifest, type SlashCommand, type SlashCommandResult, type SpecificityScore, type StepDefinition, type StepExecutor, type StepType, type StructureScore, type StructuredPlan, type SyncOptions, type SyncReport, type SyncResult, TAG_TO_CATEGORY, TAG_TO_TECH, TASK_TEMPLATES, TREE_FILE_NAME, type Task, type TaskEvent, type TaskEventListener, type TaskExecutionResult, type TaskFiles, type TaskFilter, TaskManager, type TaskPlan, type TaskResult, type TaskStatus, type TaskStep, type TaskTemplate, type Team, type TeamConfig, type TeamEvent, type TeamEventListener, TeamManager, type TeamMember, type TeamMessage, TeamMessageBus, TeamOrchestrator, type TeamRegistry, type TeamStatus, type TestAssertion, type TestAssertionType, type TestCaseResult, type TestProgressEvent, type TestResult, type TestRunnerOptions, type TestSuiteResult, type TimelineEntry, type ToolUseCaptureResult, type ToolUseEvent, TranslatableSkillFrontmatter, type TranslationOptions, type TranslationPath, type TranslationResult, type TranslatorPlugin, TranslatorRegistry, TreeGenerator, type TreeGeneratorOptions, type TreeNode, TreeNodeSchema, type TreePath, type TreeReasoningResult, type TreeSearchQuery, type TreeSearchResult, type TreeTraversalStep, type TriggerEngineOptions, type UpdateOptions, type ValidationError, type ValidationIssue, type ValidationResult, type ValidationWarning, type ValidatorOptions, type VectorSearchResult, VectorStore, type VectorStoreConfig, type VerificationRule, WORKFLOWS_DIR, WORKFLOW_EXTENSION, type WaveExecutionStatus, type WellKnownIndex, WellKnownProvider, type WellKnownSkill, WindsurfTranslator, type Workflow, type WorkflowExecution, type WorkflowExecutionStatus, WorkflowOrchestrator, type WorkflowProgressCallback, type WorkflowSkill, type WorkflowWave, addCustomGuideline, addCustomProfile, addPattern, addToManifest, agentExists, analyzeForPrimer, analyzeGitHistory, analyzePlaceholders, analyzePrimer, analyzeProject, applyConnectorConfig, applyPositionAwareBlending, approvePattern, benchmarkSkill, buildCategoryRelevancePrompt, buildExplanationPrompt, buildSearchPlanPrompt, buildSkillGraph, buildSkillIndex, buildSkillMatchPrompt, calculateBaseSkillsUrl, calculatePercentile, canTranslate, clusterPatterns, compareTreeVersions, computeRRFScore, copilotTranslator, createAPIBasedCompressor, createClaudeMdUpdater, createCommandGenerator, createCommandRegistry, createConnectorConfig, createContextLoader, createContextManager, createContextSync, createEmbeddingService, createExecutionEngine, createExecutionManager, createHookManager, createHybridSearchPipeline, createMarketplaceAggregator, createMemoryCompressor, createMemoryEnabledEngine, createMemoryHookManager, createMemoryInjector, createMemoryObserver, createMessageBus, createMethodologyLoader, createMethodologyManager, createModeAwareExecutor, createPlanExecutor, createPlanGenerator, createPlanParser, createPlanValidator, createPluginManager, createPostToolUseHook, createProgressiveDisclosureManager, createQueryExpander, createReasoningEngine, createReasoningRecommendationEngine, createRecommendationEngine, createRuleBasedCompressor, createSessionEndHook, createSessionFile, createSessionManager, createSessionStartHook, createSimulatedSkillExecutor, createSkillBundle, createSkillExecutor, createTaskManager, createTeamManager, createTeamOrchestrator, createTestSuiteFromFrontmatter, createTriggerEngine, createVectorStore, createWorkflowOrchestrator, createWorkflowTemplate, cursorTranslator, deserializeGraph, deserializeTree, detectCategory, detectExecutionMode, detectPlaceholders, detectProvider, detectSkillFormat, disableGuideline, discoverAgents, discoverAgentsForAgent, discoverAgentsFromPath, discoverAgentsRecursive, discoverGlobalAgents, discoverReferences, discoverSkills, dryRunExecutor, enableGuideline, estimateTokens, evaluateSkillContent, evaluateSkillDirectory, evaluateSkillFile, executePostToolUseHook, executeSessionEndHook, executeSessionStartHook, executeWithAgent, expandQuerySimple, exportBundle, exportPatternsAsJson, extractAgentContent, extractAgentFrontmatter, extractField, extractFrontmatter, extractJsonFromResponse, extractPatternsFromSession, extractSkillMetadata, fetchSkillsFromRepo, findAgent, findAllAgents, findAllSkills, findManifestPath, findSkill, findSkillsByRelationType, findSkillsInCategory, formatBytes, formatSkillAsPrompt, fromCanonicalAgent, fuseWithRRF, generateComparisonNotes, generateConnectorsMarkdown, generateManifestFromInstalled, generatePatternReport, generatePrimer, generatePrimerForAgent, generateRecommendations, generateSkillFromPatterns, generateSkillTree, generateSkillsConfig, generateSubagentFromSkill, generateWellKnownIndex, generateWellKnownStructure, getActiveProfile, getAgentCLIConfig, getAgentConfigFile, getAgentConfigPath, getAgentDirectoryConfig, getAgentFilename, getAgentFormat, getAgentSkillsDir, getAgentStats, getAgentTargetDirectory, getAgentsDirectory, getAllCategories, getAllGuidelines, getAllPatterns, getAllProfiles, getAllProviders, getAllSkillsDirs, getApprovedPatterns, getAvailableCLIAgents, getBuiltinGuidelines, getBuiltinPacksDir, getBuiltinPipeline, getBuiltinPipelines, getBuiltinProfiles, getCICDTemplate, getCategoryStats, getConfigFile, getConfigFormat, getDefaultConfigPath, getDefaultModelDir, getDefaultStorePath, getEnabledGuidelineContent, getEnabledGuidelines, getEvolvingPattern, getEvolvingPatternsByDomain, getExecutionStrategy, getGitCommits, getGlobalConfigPath, getGlobalSkillsDir, getGrade, getGuideline, getGuidelineContent, getGuidelinesByCategory, getHighConfidencePatterns, getIndexStatus, getInstallDir, getLowConfidencePatterns, getManualExecutionInstructions, getMemoryPaths, getMemoryStatus, getModeDescription, getMostRecentSession, getMostUsedPatterns, getPattern, getPatternStats, getPatternsByCategory, getPlaceholderInfo, getProfile, getProfileContext, getProfileNames, getProjectConfigPath, getProvider, getQualityGrade, getRankFromScore, getRecentBugFixes, getRecentRefactors, getRelatedSkills, getSearchDirs, getSkillPath, getSkillsDir, getStackTags, getStandaloneAlternative, getSupportedTranslationAgents, getTechTags, globalMemoryDirectoryExists, hybridSearch, importBundle, importPatternsFromJson, initContext, initManifest, initProject, initializeMemoryDirectory, isAgentCLIAvailable, isAgentCompatible, isBuiltinGuideline, isBuiltinProfile, isGitUrl, isGuidelineEnabled, isHighQuality, isIndexStale, isLocalPath, isPathInside, listCICDTemplates, listSessions, listWorkflows, loadAgentMetadata, loadAndConvertSkill, loadConfig, loadContext, loadGuidelineConfig, loadIndex, loadLearningConfig, loadManifest, loadMetadata, loadPatternStore, loadPlugin, loadPluginsFromDirectory, loadProfileConfig, loadSessionFile, loadSkillMetadata, loadTree, loadWorkflow, loadWorkflowByName, memoryDirectoryExists, mergePatterns, mergeRankings, normalizeScores, parseAgentDir, parseAgentFile, parseShorthand, parseSkill, parseSkillContent, parseSkillContentToCanonical, parseSkillMd, parseSkillToCanonical, parseSource, parseWorkflow, readAgentContent, readSkillContent, recordFailure, recordSuccess, rejectPattern, removeCustomGuideline, removeCustomProfile, removeFromManifest, removePattern, replacePlaceholders, requireCapability, requireEnhancedMode, runTestSuite, saveConfig, saveGeneratedSkill, saveGuidelineConfig, saveIndex, saveLearningConfig, saveManifest, savePatternStore, saveProfileConfig, saveSessionFile, saveSkillMetadata, saveTree, saveWorkflow, serializeGraph, serializeTree, serializeWorkflow, setActiveProfile, setSkillEnabled, shellExecutor, skillMdTranslator, skillToSubagent, stripFrontmatter, suggestMappingsFromMcp, supportsAutoDiscovery, supportsSlashCommands, syncGlobalClaudeMd, syncToAgent, syncToAllAgents, toCanonicalAgent, translateAgent, translateAgentContent, translateAgents, translateCanonicalAgent, translateSkill, translateSkillFile, translateSkillToAgent, translateSkillToAll, translatorRegistry, treeToMarkdown, treeToText, updateClaudeMd, updateSessionFile, validateAgent, validateBuiltinPacks, validateCategoryScore, validateConnectorConfig, validatePackDirectory, validatePackManifest, validatePlan, validateSearchPlan, validateSkill, validateSkillContent, validateWorkflow, weightedCombine, windsurfTranslator, wrapProgressCallbackWithMemory, writeTranslatedSkill };