@skillkit/core 1.4.0 → 1.6.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
@@ -161,6 +161,9 @@ declare const SkillkitConfig: z.ZodObject<{
161
161
  enabledSkills: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
162
162
  disabledSkills: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
163
163
  autoSync: z.ZodDefault<z.ZodBoolean>;
164
+ cacheDir: z.ZodOptional<z.ZodString>;
165
+ marketplaceSources: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
166
+ defaultTimeout: z.ZodOptional<z.ZodNumber>;
164
167
  }, "strip", z.ZodTypeAny, {
165
168
  version: 1;
166
169
  agent: "claude-code" | "codex" | "cursor" | "antigravity" | "opencode" | "gemini-cli" | "amp" | "clawdbot" | "droid" | "github-copilot" | "goose" | "kilo" | "kiro-cli" | "roo" | "trae" | "windsurf" | "universal";
@@ -168,6 +171,9 @@ declare const SkillkitConfig: z.ZodObject<{
168
171
  skillsDir?: string | undefined;
169
172
  enabledSkills?: string[] | undefined;
170
173
  disabledSkills?: string[] | undefined;
174
+ cacheDir?: string | undefined;
175
+ marketplaceSources?: string[] | undefined;
176
+ defaultTimeout?: number | undefined;
171
177
  }, {
172
178
  version: 1;
173
179
  agent?: "claude-code" | "codex" | "cursor" | "antigravity" | "opencode" | "gemini-cli" | "amp" | "clawdbot" | "droid" | "github-copilot" | "goose" | "kilo" | "kiro-cli" | "roo" | "trae" | "windsurf" | "universal" | undefined;
@@ -175,6 +181,9 @@ declare const SkillkitConfig: z.ZodObject<{
175
181
  enabledSkills?: string[] | undefined;
176
182
  disabledSkills?: string[] | undefined;
177
183
  autoSync?: boolean | undefined;
184
+ cacheDir?: string | undefined;
185
+ marketplaceSources?: string[] | undefined;
186
+ defaultTimeout?: number | undefined;
178
187
  }>;
179
188
  type SkillkitConfig = z.infer<typeof SkillkitConfig>;
180
189
  interface InstallOptions {
@@ -247,7 +256,7 @@ declare function isPathInside(child: string, parent: string): boolean;
247
256
 
248
257
  declare function getProjectConfigPath(): string;
249
258
  declare function getGlobalConfigPath(): string;
250
- declare function loadConfig(): SkillkitConfig;
259
+ declare function loadConfig(global?: boolean): SkillkitConfig;
251
260
  declare function saveConfig(config: SkillkitConfig, global?: boolean): void;
252
261
  declare function getSearchDirs(adapter: AgentAdapterInfo): string[];
253
262
  declare function getInstallDir(adapter: AgentAdapterInfo, global?: boolean): string;
@@ -3171,6 +3180,56 @@ declare function getExecutionStrategy(agentType: AgentType): ExecutionStrategy;
3171
3180
  */
3172
3181
  declare function getManualExecutionInstructions(agentType: AgentType, skillPath: string): string;
3173
3182
 
3183
+ /**
3184
+ * Skill Executor for Workflows
3185
+ *
3186
+ * Provides a real skill executor that finds skills by name
3187
+ * and executes them using available agent CLIs.
3188
+ */
3189
+
3190
+ /**
3191
+ * Options for creating a skill executor
3192
+ */
3193
+ interface SkillExecutorOptions {
3194
+ /** Project path to search for skills */
3195
+ projectPath?: string;
3196
+ /** Preferred agent to use for execution */
3197
+ preferredAgent?: AgentType;
3198
+ /** Timeout for skill execution (ms) */
3199
+ timeout?: number;
3200
+ /** Whether to fall back to other agents if preferred is unavailable */
3201
+ fallbackToAvailable?: boolean;
3202
+ /** Callback for execution events */
3203
+ onExecutionEvent?: (event: SkillExecutionEvent) => void;
3204
+ }
3205
+ /**
3206
+ * Skill execution event
3207
+ */
3208
+ interface SkillExecutionEvent {
3209
+ type: 'skill_found' | 'skill_not_found' | 'agent_selected' | 'execution_start' | 'execution_complete';
3210
+ skillName: string;
3211
+ agent?: AgentType;
3212
+ message?: string;
3213
+ success?: boolean;
3214
+ error?: string;
3215
+ }
3216
+ /**
3217
+ * Create a skill executor for workflow orchestration
3218
+ *
3219
+ * This returns a function compatible with the WorkflowOrchestrator's SkillExecutor type.
3220
+ */
3221
+ declare function createSkillExecutor(options?: SkillExecutorOptions): SkillExecutor;
3222
+ /**
3223
+ * Create a simulated skill executor for testing/dry-run
3224
+ *
3225
+ * This executor doesn't actually run skills but simulates execution.
3226
+ */
3227
+ declare function createSimulatedSkillExecutor(options?: {
3228
+ delay?: number;
3229
+ shouldFail?: (skillName: string) => boolean;
3230
+ onExecute?: (skillName: string) => void;
3231
+ }): SkillExecutor;
3232
+
3174
3233
  /**
3175
3234
  * Skill Testing Framework Types
3176
3235
  *
@@ -4403,4 +4462,3190 @@ declare class MemoryInjector {
4403
4462
  */
4404
4463
  declare function createMemoryInjector(projectPath: string, projectName?: string, projectContext?: ProjectContext): MemoryInjector;
4405
4464
 
4406
- export { AGENT_CLI_CONFIGS, AGENT_FORMAT_MAP, APIBasedCompressor, type APICompressionConfig, type AgentAdapterInfo, type AgentCLIConfig, AgentConfig, type AgentExecutionResult, AgentType, type AssertionResult, BitbucketProvider, CIRCLECI_CONFIG_TEMPLATE, CONTEXT_DIR, CONTEXT_FILE, type CanonicalSkill, type CheckpointHandler, type CheckpointResponse, type CloneOptions, type CloneResult, type CommandResult, type CompressedLearning, type CompressionEngine, type CompressionOptions, type CompressionResult, type ContextCategory, type ContextExportOptions, type ContextImportOptions, type ContextLoadOptions, ContextLoader, ContextManager, ContextSync, type ContextSyncOptions, CopilotTranslator, type CurrentExecution, CursorTranslator, DEFAULT_CACHE_TTL, DEFAULT_CONTEXT_CATEGORIES, DEFAULT_MEMORY_CONFIG, DEFAULT_SCORING_WEIGHTS, DEFAULT_SKILL_SOURCES, DependencyInfo, Detection, type DetectionSource, type DiscoveredSkill, type ExecutableSkill, type ExecutableTask, type ExecutableTaskType, type ExecutionHistory, type ExecutionOptions, type ExecutionProgressCallback, type ExecutionProgressEvent, type ExecutionStrategy, type ExecutionTaskStatus, type FormatCategory, type FormatTranslator, type FreshnessResult, GITHUB_ACTION_TEMPLATE, GITLAB_CI_TEMPLATE, GitHubProvider, GitLabProvider, GitProvider, type GitProviderAdapter, INDEX_CACHE_HOURS, INDEX_PATH, type IndexSource, type InjectedMemory, type InjectionOptions, type InjectionResult, type InstallOptions, KNOWN_SKILL_REPOS, type Learning, LearningConsolidator, LearningStore, type LearningStoreData, type LoadedContext, LocalProvider, MARKETPLACE_CACHE_FILE, MarketplaceAggregator, type MarketplaceConfig, type MarketplaceIndex, type MarketplaceSearchOptions, type MarketplaceSearchResult, type MarketplaceSkill, type MatchCategory, type MatchReason, 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 ObservableEvent, type ObservableEventType, type Observation, type ObservationContent, ObservationStore, type ObservationStoreData, type ObservationType, PRE_COMMIT_CONFIG_TEMPLATE, PRE_COMMIT_HOOK_TEMPLATE, PROJECT_TYPE_HINTS, ProjectContext, ProjectDetector, ProjectPatterns, type ProjectProfile, ProjectStack, type RecommendOptions, RecommendationEngine, type RecommendationResult, type RegistrySkill, RuleBasedCompressor, SESSION_FILE, SKILL_DISCOVERY_PATHS, type ScoredSkill, type ScoringWeights, type SearchOptions, type SearchResult, type SessionDecision, SessionManager, type SessionState, type SessionTask, Skill, SkillExecutionEngine, type SkillExecutionResult, type SkillExecutor, SkillFrontmatter, type SkillIndex, SkillLocation, SkillMdTranslator, SkillMetadata, SkillPreferences, type SkillSource, SkillSummary, type SkillTestCase, type SkillTestSuite, SkillkitConfig, type SyncOptions, type SyncReport, type SyncResult, TAG_TO_TECH, type TaskExecutionResult, type TaskStatus, type TestAssertion, type TestAssertionType, type TestCaseResult, type TestProgressEvent, type TestRunnerOptions, type TestSuiteResult, TranslatableSkillFrontmatter, type TranslationOptions, type TranslationPath, type TranslationResult, TranslatorRegistry, type UpdateOptions, type VerificationRule, WORKFLOWS_DIR, WORKFLOW_EXTENSION, type WaveExecutionStatus, WindsurfTranslator, type Workflow, type WorkflowExecution, type WorkflowExecutionStatus, WorkflowOrchestrator, type WorkflowProgressCallback, type WorkflowSkill, type WorkflowWave, analyzeProject, buildSkillIndex, canTranslate, copilotTranslator, createAPIBasedCompressor, createContextLoader, createContextManager, createContextSync, createExecutionEngine, createMarketplaceAggregator, createMemoryCompressor, createMemoryEnabledEngine, createMemoryInjector, createMemoryObserver, createRecommendationEngine, createRuleBasedCompressor, createSessionManager, createTestSuiteFromFrontmatter, createWorkflowOrchestrator, createWorkflowTemplate, cursorTranslator, detectProvider, detectSkillFormat, discoverSkills, estimateTokens, executeWithAgent, extractField, extractFrontmatter, fetchSkillsFromRepo, findAllSkills, findSkill, formatSkillAsPrompt, getAgentCLIConfig, getAgentConfigPath, getAllProviders, getAvailableCLIAgents, getCICDTemplate, getExecutionStrategy, getGlobalConfigPath, getIndexStatus, getInstallDir, getManualExecutionInstructions, getMemoryPaths, getMemoryStatus, getProjectConfigPath, getProvider, getSearchDirs, getStackTags, getSupportedTranslationAgents, getTechTags, globalMemoryDirectoryExists, initContext, initProject, initializeMemoryDirectory, isAgentCLIAvailable, isGitUrl, isIndexStale, isLocalPath, isPathInside, listCICDTemplates, listWorkflows, loadConfig, loadContext, loadIndex, loadMetadata, loadSkillMetadata, loadWorkflow, loadWorkflowByName, memoryDirectoryExists, parseShorthand, parseSkill, parseSkillContent, parseSource, parseWorkflow, readSkillContent, runTestSuite, saveConfig, saveIndex, saveSkillMetadata, saveWorkflow, serializeWorkflow, setSkillEnabled, skillMdTranslator, syncToAgent, syncToAllAgents, translateSkill, translateSkillFile, translatorRegistry, validateSkill, validateWorkflow, windsurfTranslator, wrapProgressCallbackWithMemory };
4465
+ /**
4466
+ * Team Collaboration Types
4467
+ */
4468
+
4469
+ /**
4470
+ * Team member information
4471
+ */
4472
+ interface TeamMember {
4473
+ id: string;
4474
+ name: string;
4475
+ email?: string;
4476
+ role: 'admin' | 'contributor' | 'viewer';
4477
+ joinedAt: string;
4478
+ }
4479
+ /**
4480
+ * Shared skill metadata
4481
+ */
4482
+ interface SharedSkill {
4483
+ name: string;
4484
+ version: string;
4485
+ description?: string;
4486
+ author: string;
4487
+ sharedAt: string;
4488
+ updatedAt: string;
4489
+ source: string;
4490
+ tags?: string[];
4491
+ agents: AgentType[];
4492
+ downloads?: number;
4493
+ rating?: number;
4494
+ }
4495
+ /**
4496
+ * Team configuration
4497
+ */
4498
+ interface TeamConfig {
4499
+ /** Team identifier */
4500
+ teamId: string;
4501
+ /** Team name */
4502
+ teamName: string;
4503
+ /** Team registry URL (git repo or registry endpoint) */
4504
+ registryUrl: string;
4505
+ /** Authentication method */
4506
+ auth?: {
4507
+ type: 'token' | 'ssh' | 'none';
4508
+ token?: string;
4509
+ keyPath?: string;
4510
+ };
4511
+ /** Auto-sync interval in minutes (0 = disabled) */
4512
+ autoSyncInterval?: number;
4513
+ /** Members list (for admin features) */
4514
+ members?: TeamMember[];
4515
+ }
4516
+ /**
4517
+ * Team registry containing shared skills
4518
+ */
4519
+ interface TeamRegistry {
4520
+ version: number;
4521
+ teamId: string;
4522
+ teamName: string;
4523
+ skills: SharedSkill[];
4524
+ updatedAt: string;
4525
+ createdAt: string;
4526
+ }
4527
+ /**
4528
+ * Bundle manifest for exporting skills
4529
+ */
4530
+ interface BundleManifest {
4531
+ version: number;
4532
+ name: string;
4533
+ description?: string;
4534
+ author: string;
4535
+ createdAt: string;
4536
+ skills: {
4537
+ name: string;
4538
+ path: string;
4539
+ agents: AgentType[];
4540
+ }[];
4541
+ totalSize: number;
4542
+ }
4543
+ /**
4544
+ * Options for sharing a skill
4545
+ */
4546
+ interface ShareOptions {
4547
+ /** Skill name to share */
4548
+ skillName: string;
4549
+ /** Description override */
4550
+ description?: string;
4551
+ /** Tags to add */
4552
+ tags?: string[];
4553
+ /** Target agents (default: all compatible) */
4554
+ agents?: AgentType[];
4555
+ /** Visibility level */
4556
+ visibility?: 'team' | 'public';
4557
+ }
4558
+ /**
4559
+ * Options for importing skills
4560
+ */
4561
+ interface ImportOptions {
4562
+ /** Overwrite existing skills */
4563
+ overwrite?: boolean;
4564
+ /** Target agents to install for */
4565
+ agents?: AgentType[];
4566
+ /** Dry run mode */
4567
+ dryRun?: boolean;
4568
+ }
4569
+
4570
+ /**
4571
+ * Team Manager
4572
+ *
4573
+ * Manages team skill sharing and collaboration
4574
+ */
4575
+
4576
+ /**
4577
+ * Team Manager for collaboration features
4578
+ */
4579
+ declare class TeamManager {
4580
+ private projectPath;
4581
+ private config;
4582
+ private registry;
4583
+ constructor(projectPath: string);
4584
+ /**
4585
+ * Initialize team configuration
4586
+ */
4587
+ init(config: Omit<TeamConfig, 'teamId'>): Promise<TeamConfig>;
4588
+ /**
4589
+ * Load existing team configuration
4590
+ */
4591
+ load(): TeamConfig | null;
4592
+ /**
4593
+ * Get current config
4594
+ */
4595
+ getConfig(): TeamConfig | null;
4596
+ /**
4597
+ * Get current registry
4598
+ */
4599
+ getRegistry(): TeamRegistry | null;
4600
+ /**
4601
+ * Share a skill to the team registry
4602
+ */
4603
+ shareSkill(options: ShareOptions): Promise<SharedSkill>;
4604
+ /**
4605
+ * List all shared skills in the team registry
4606
+ */
4607
+ listSharedSkills(): SharedSkill[];
4608
+ /**
4609
+ * Search shared skills
4610
+ */
4611
+ searchSkills(query: string): SharedSkill[];
4612
+ /**
4613
+ * Import a shared skill from the team registry
4614
+ */
4615
+ importSkill(skillName: string, options?: ImportOptions): Promise<{
4616
+ success: boolean;
4617
+ path?: string;
4618
+ error?: string;
4619
+ }>;
4620
+ /**
4621
+ * Sync with remote registry
4622
+ */
4623
+ sync(): Promise<{
4624
+ added: string[];
4625
+ updated: string[];
4626
+ removed: string[];
4627
+ }>;
4628
+ /**
4629
+ * Remove a skill from the team registry
4630
+ */
4631
+ removeSkill(skillName: string): boolean;
4632
+ private generateTeamId;
4633
+ private saveConfig;
4634
+ private loadRegistry;
4635
+ private saveRegistry;
4636
+ private findLocalSkill;
4637
+ private getAuthor;
4638
+ private detectCompatibleAgents;
4639
+ private extractFrontmatter;
4640
+ private parseYaml;
4641
+ private toYaml;
4642
+ }
4643
+ /**
4644
+ * Create a team manager instance
4645
+ */
4646
+ declare function createTeamManager(projectPath: string): TeamManager;
4647
+
4648
+ /**
4649
+ * Skill Bundle
4650
+ *
4651
+ * Package multiple skills into a shareable bundle
4652
+ */
4653
+
4654
+ /**
4655
+ * Skill Bundle class for creating and managing skill bundles
4656
+ */
4657
+ declare class SkillBundle {
4658
+ private manifest;
4659
+ private skills;
4660
+ constructor(name: string, author: string, description?: string);
4661
+ /**
4662
+ * Add a skill to the bundle
4663
+ */
4664
+ addSkill(skillPath: string, agents?: AgentType[]): void;
4665
+ /**
4666
+ * Remove a skill from the bundle
4667
+ */
4668
+ removeSkill(skillName: string): boolean;
4669
+ /**
4670
+ * Get bundle manifest
4671
+ */
4672
+ getManifest(): BundleManifest;
4673
+ /**
4674
+ * Get all skill names in bundle
4675
+ */
4676
+ getSkillNames(): string[];
4677
+ /**
4678
+ * Get skill content by name
4679
+ */
4680
+ getSkillContent(skillName: string): string | undefined;
4681
+ /**
4682
+ * Calculate bundle checksum
4683
+ */
4684
+ getChecksum(): string;
4685
+ private readSkillContent;
4686
+ private detectAgents;
4687
+ }
4688
+ /**
4689
+ * Create a new skill bundle
4690
+ */
4691
+ declare function createSkillBundle(name: string, author: string, description?: string): SkillBundle;
4692
+ /**
4693
+ * Export a bundle to a file
4694
+ */
4695
+ declare function exportBundle(bundle: SkillBundle, outputPath: string): {
4696
+ success: boolean;
4697
+ path?: string;
4698
+ error?: string;
4699
+ };
4700
+ /**
4701
+ * Import a bundle from a file
4702
+ */
4703
+ declare function importBundle(bundlePath: string, targetDir: string, options?: {
4704
+ overwrite?: boolean;
4705
+ }): {
4706
+ success: boolean;
4707
+ imported: string[];
4708
+ errors: string[];
4709
+ };
4710
+
4711
+ /**
4712
+ * Plugin System Types
4713
+ */
4714
+
4715
+ /**
4716
+ * Plugin metadata
4717
+ */
4718
+ interface PluginMetadata {
4719
+ /** Unique plugin identifier */
4720
+ name: string;
4721
+ /** Plugin version (semver) */
4722
+ version: string;
4723
+ /** Human-readable description */
4724
+ description?: string;
4725
+ /** Plugin author */
4726
+ author?: string;
4727
+ /** Plugin homepage or repository URL */
4728
+ homepage?: string;
4729
+ /** Required SkillKit version */
4730
+ skillkitVersion?: string;
4731
+ /** Plugin dependencies */
4732
+ dependencies?: string[];
4733
+ /** Plugin keywords for discovery */
4734
+ keywords?: string[];
4735
+ }
4736
+ /**
4737
+ * Plugin lifecycle hooks
4738
+ */
4739
+ interface PluginHooks {
4740
+ /** Called when a skill is installed */
4741
+ onSkillInstall?: (skill: CanonicalSkill, agent: AgentType) => Promise<void>;
4742
+ /** Called when a skill is removed */
4743
+ onSkillRemove?: (skillName: string, agent: AgentType) => Promise<void>;
4744
+ /** Called when skills are synced */
4745
+ onSync?: (agents: AgentType[]) => Promise<void>;
4746
+ /** Called before translation */
4747
+ beforeTranslate?: (skill: CanonicalSkill, targetAgent: AgentType) => Promise<CanonicalSkill>;
4748
+ /** Called after translation */
4749
+ afterTranslate?: (content: string, targetAgent: AgentType) => Promise<string>;
4750
+ /** Called when plugin is loaded */
4751
+ onLoad?: (context: PluginContext) => Promise<void>;
4752
+ /** Called when plugin is unloaded */
4753
+ onUnload?: () => Promise<void>;
4754
+ }
4755
+ /**
4756
+ * Translator plugin - adds support for new agent formats
4757
+ */
4758
+ interface TranslatorPlugin {
4759
+ type: 'translator';
4760
+ /** Agent type this translator handles */
4761
+ agentType: AgentType | string;
4762
+ /** The translator implementation */
4763
+ translator: FormatTranslator;
4764
+ }
4765
+ /**
4766
+ * Provider plugin - adds support for new skill sources
4767
+ */
4768
+ interface ProviderPlugin {
4769
+ type: 'provider';
4770
+ /** Provider name (e.g., 'bitbucket', 's3') */
4771
+ providerName: string;
4772
+ /** The provider implementation */
4773
+ provider: GitProviderAdapter;
4774
+ }
4775
+ /**
4776
+ * Command plugin - adds new CLI commands
4777
+ */
4778
+ interface CommandPlugin {
4779
+ type: 'command';
4780
+ /** Command name */
4781
+ name: string;
4782
+ /** Command aliases */
4783
+ aliases?: string[];
4784
+ /** Command description */
4785
+ description: string;
4786
+ /** Command options */
4787
+ options?: Array<{
4788
+ name: string;
4789
+ description: string;
4790
+ type: 'string' | 'boolean' | 'number';
4791
+ required?: boolean;
4792
+ default?: unknown;
4793
+ }>;
4794
+ /** Command handler */
4795
+ handler: (args: Record<string, unknown>, context: PluginContext) => Promise<number>;
4796
+ }
4797
+ /**
4798
+ * Plugin context passed to plugins
4799
+ */
4800
+ interface PluginContext {
4801
+ /** Project path */
4802
+ projectPath: string;
4803
+ /** SkillKit version */
4804
+ skillkitVersion: string;
4805
+ /** Plugin configuration */
4806
+ config: PluginConfig;
4807
+ /** Logger instance */
4808
+ log: {
4809
+ info: (message: string) => void;
4810
+ warn: (message: string) => void;
4811
+ error: (message: string) => void;
4812
+ debug: (message: string) => void;
4813
+ };
4814
+ /** Get a registered translator by agent type */
4815
+ getTranslator: (agentType: AgentType) => FormatTranslator | undefined;
4816
+ /** Get a registered provider by name */
4817
+ getProvider: (name: string) => GitProviderAdapter | undefined;
4818
+ }
4819
+ /**
4820
+ * Plugin configuration
4821
+ */
4822
+ interface PluginConfig {
4823
+ /** Plugin-specific settings */
4824
+ settings?: Record<string, unknown>;
4825
+ /** Whether plugin is enabled */
4826
+ enabled?: boolean;
4827
+ }
4828
+ /**
4829
+ * Main plugin interface
4830
+ */
4831
+ interface Plugin {
4832
+ /** Plugin metadata */
4833
+ metadata: PluginMetadata;
4834
+ /** Plugin hooks */
4835
+ hooks?: PluginHooks;
4836
+ /** Translator extensions */
4837
+ translators?: TranslatorPlugin[];
4838
+ /** Provider extensions */
4839
+ providers?: ProviderPlugin[];
4840
+ /** Command extensions */
4841
+ commands?: CommandPlugin[];
4842
+ /** Plugin initialization */
4843
+ init?: (context: PluginContext) => Promise<void>;
4844
+ /** Plugin cleanup */
4845
+ destroy?: () => Promise<void>;
4846
+ }
4847
+
4848
+ /**
4849
+ * Plugin Manager
4850
+ *
4851
+ * Manages plugin registration, lifecycle, and execution
4852
+ */
4853
+
4854
+ /**
4855
+ * Plugin Manager class
4856
+ */
4857
+ declare class PluginManager {
4858
+ private projectPath;
4859
+ private plugins;
4860
+ private translators;
4861
+ private providers;
4862
+ private commands;
4863
+ private hooks;
4864
+ private state;
4865
+ private context;
4866
+ constructor(projectPath: string);
4867
+ /**
4868
+ * Register a plugin
4869
+ */
4870
+ register(plugin: Plugin): Promise<void>;
4871
+ /**
4872
+ * Unregister a plugin
4873
+ */
4874
+ unregister(name: string): Promise<void>;
4875
+ /**
4876
+ * Get a registered plugin
4877
+ */
4878
+ getPlugin(name: string): Plugin | undefined;
4879
+ /**
4880
+ * Get all registered plugins
4881
+ */
4882
+ getAllPlugins(): Plugin[];
4883
+ /**
4884
+ * Get plugin metadata for all plugins
4885
+ */
4886
+ listPlugins(): PluginMetadata[];
4887
+ /**
4888
+ * Get a translator by agent type
4889
+ */
4890
+ getTranslator(agentType: AgentType | string): FormatTranslator | undefined;
4891
+ /**
4892
+ * Get all registered translators
4893
+ */
4894
+ getAllTranslators(): Map<string, FormatTranslator>;
4895
+ /**
4896
+ * Get a provider by name
4897
+ */
4898
+ getProvider(name: string): GitProviderAdapter | undefined;
4899
+ /**
4900
+ * Get all registered providers
4901
+ */
4902
+ getAllProviders(): Map<string, GitProviderAdapter>;
4903
+ /**
4904
+ * Get a command by name
4905
+ */
4906
+ getCommand(name: string): CommandPlugin | undefined;
4907
+ /**
4908
+ * Get all registered commands
4909
+ */
4910
+ getAllCommands(): CommandPlugin[];
4911
+ /**
4912
+ * Execute hooks for an event
4913
+ */
4914
+ executeHook<K extends keyof PluginHooks>(hookName: K, ...args: Parameters<NonNullable<PluginHooks[K]>>): Promise<void>;
4915
+ /**
4916
+ * Execute beforeTranslate hooks (returns transformed skill)
4917
+ */
4918
+ executeBeforeTranslate(skill: CanonicalSkill, targetAgent: AgentType): Promise<CanonicalSkill>;
4919
+ /**
4920
+ * Execute afterTranslate hooks (returns transformed content)
4921
+ */
4922
+ executeAfterTranslate(content: string, targetAgent: AgentType): Promise<string>;
4923
+ /**
4924
+ * Set plugin configuration
4925
+ */
4926
+ setPluginConfig(name: string, config: PluginConfig): void;
4927
+ /**
4928
+ * Get plugin configuration
4929
+ */
4930
+ getPluginConfig(name: string): PluginConfig | undefined;
4931
+ /**
4932
+ * Enable a plugin
4933
+ */
4934
+ enablePlugin(name: string): void;
4935
+ /**
4936
+ * Disable a plugin
4937
+ */
4938
+ disablePlugin(name: string): void;
4939
+ /**
4940
+ * Check if plugin is enabled
4941
+ */
4942
+ isPluginEnabled(name: string): boolean;
4943
+ private loadState;
4944
+ private saveState;
4945
+ private createContext;
4946
+ }
4947
+ /**
4948
+ * Create a plugin manager instance
4949
+ */
4950
+ declare function createPluginManager(projectPath: string): PluginManager;
4951
+
4952
+ /**
4953
+ * Plugin Loader
4954
+ *
4955
+ * Loads plugins from various sources:
4956
+ * - Local files
4957
+ * - npm packages
4958
+ * - Git repositories
4959
+ */
4960
+
4961
+ /**
4962
+ * Plugin Loader class
4963
+ */
4964
+ declare class PluginLoader {
4965
+ /**
4966
+ * Load a plugin from a file path
4967
+ */
4968
+ loadFromFile(filePath: string): Promise<Plugin>;
4969
+ /**
4970
+ * Load a plugin from an npm package
4971
+ */
4972
+ loadFromPackage(packageName: string): Promise<Plugin>;
4973
+ /**
4974
+ * Load a plugin from a JSON definition (for simple plugins)
4975
+ */
4976
+ loadFromJson(jsonPath: string): Plugin;
4977
+ /**
4978
+ * Scan a directory for plugins
4979
+ */
4980
+ scanDirectory(dirPath: string): Promise<PluginMetadata[]>;
4981
+ /**
4982
+ * Validate a plugin structure
4983
+ */
4984
+ private validatePlugin;
4985
+ }
4986
+ /**
4987
+ * Load a plugin from a file
4988
+ */
4989
+ declare function loadPlugin(source: string): Promise<Plugin>;
4990
+ /**
4991
+ * Load all plugins from a directory
4992
+ */
4993
+ declare function loadPluginsFromDirectory(dirPath: string): Promise<Plugin[]>;
4994
+
4995
+ /**
4996
+ * Methodology Framework Types
4997
+ *
4998
+ * Defines types for methodology packs, skills, and the management system.
4999
+ * SkillKit's methodology framework is composable, community-driven, and
5000
+ * methodology-agnostic (supports TDD, BDD, DDD, or custom approaches).
5001
+ */
5002
+
5003
+ /**
5004
+ * Methodology pack manifest - defines a collection of related skills
5005
+ */
5006
+ interface MethodologyPack {
5007
+ /** Pack name (e.g., 'testing', 'debugging') */
5008
+ name: string;
5009
+ /** Semantic version */
5010
+ version: string;
5011
+ /** Human-readable description */
5012
+ description: string;
5013
+ /** Skills included in this pack */
5014
+ skills: string[];
5015
+ /** Tags for discovery */
5016
+ tags: string[];
5017
+ /** Agent compatibility ('all' or specific agents) */
5018
+ compatibility: ('all' | AgentType)[];
5019
+ /** Author information */
5020
+ author?: string;
5021
+ /** Repository/homepage URL */
5022
+ repository?: string;
5023
+ /** License */
5024
+ license?: string;
5025
+ /** Pack dependencies (other packs) */
5026
+ dependencies?: string[];
5027
+ }
5028
+ /**
5029
+ * Methodology skill - a skill within a methodology pack
5030
+ */
5031
+ interface MethodologySkill {
5032
+ /** Unique skill identifier */
5033
+ id: string;
5034
+ /** Human-readable name */
5035
+ name: string;
5036
+ /** Skill description */
5037
+ description: string;
5038
+ /** Skill version */
5039
+ version: string;
5040
+ /** Parent pack name */
5041
+ pack: string;
5042
+ /** Tags for discovery */
5043
+ tags: string[];
5044
+ /** File path to SKILL.md content */
5045
+ path: string;
5046
+ /** Raw SKILL.md content */
5047
+ content: string;
5048
+ /** Skill metadata from frontmatter */
5049
+ metadata: MethodologySkillMetadata;
5050
+ }
5051
+ /**
5052
+ * Skill metadata from SKILL.md frontmatter
5053
+ */
5054
+ interface MethodologySkillMetadata {
5055
+ /** Skill triggers/keywords for activation */
5056
+ triggers?: string[];
5057
+ /** Related skills that work well together */
5058
+ relatedSkills?: string[];
5059
+ /** Difficulty level */
5060
+ difficulty?: 'beginner' | 'intermediate' | 'advanced';
5061
+ /** Estimated time to apply (in minutes) */
5062
+ estimatedTime?: number;
5063
+ /** Prerequisites (other skills or knowledge) */
5064
+ prerequisites?: string[];
5065
+ /** Custom metadata */
5066
+ [key: string]: unknown;
5067
+ }
5068
+ /**
5069
+ * Installed methodology state
5070
+ */
5071
+ interface MethodologyState {
5072
+ /** State format version */
5073
+ version: number;
5074
+ /** Installed packs */
5075
+ installedPacks: Record<string, InstalledPackInfo>;
5076
+ /** Installed skills (for individual skill installs) */
5077
+ installedSkills: Record<string, InstalledSkillInfo>;
5078
+ /** Last sync timestamp */
5079
+ lastSync?: string;
5080
+ }
5081
+ /**
5082
+ * Information about an installed pack
5083
+ */
5084
+ interface InstalledPackInfo {
5085
+ /** Pack version */
5086
+ version: string;
5087
+ /** Installation timestamp */
5088
+ installedAt: string;
5089
+ /** Skills installed from this pack */
5090
+ skills: string[];
5091
+ /** Whether auto-sync is enabled */
5092
+ autoSync?: boolean;
5093
+ }
5094
+ /**
5095
+ * Information about an installed skill
5096
+ */
5097
+ interface InstalledSkillInfo {
5098
+ /** Skill version */
5099
+ version: string;
5100
+ /** Pack name (if installed from pack) */
5101
+ pack?: string;
5102
+ /** Installation timestamp */
5103
+ installedAt: string;
5104
+ /** Agents synced to */
5105
+ syncedAgents: AgentType[];
5106
+ }
5107
+ /**
5108
+ * Options for methodology manager
5109
+ */
5110
+ interface MethodologyManagerOptions {
5111
+ /** Project path */
5112
+ projectPath: string;
5113
+ /** Custom packs directory */
5114
+ packsDir?: string;
5115
+ /** Whether to auto-sync on install */
5116
+ autoSync?: boolean;
5117
+ }
5118
+ /**
5119
+ * Result of pack/skill installation
5120
+ */
5121
+ interface InstallResult {
5122
+ /** Whether installation succeeded */
5123
+ success: boolean;
5124
+ /** Installed items */
5125
+ installed: string[];
5126
+ /** Skipped items (already installed) */
5127
+ skipped: string[];
5128
+ /** Failed items with error messages */
5129
+ failed: Array<{
5130
+ name: string;
5131
+ error: string;
5132
+ }>;
5133
+ }
5134
+ /**
5135
+ * Result of skill sync operation
5136
+ */
5137
+ interface MethodologySyncResult {
5138
+ /** Whether sync succeeded */
5139
+ success: boolean;
5140
+ /** Skills synced */
5141
+ synced: Array<{
5142
+ skill: string;
5143
+ agents: AgentType[];
5144
+ }>;
5145
+ /** Skills that failed to sync */
5146
+ failed: Array<{
5147
+ skill: string;
5148
+ agent: AgentType;
5149
+ error: string;
5150
+ }>;
5151
+ }
5152
+ /**
5153
+ * Pack validation result
5154
+ */
5155
+ interface ValidationResult {
5156
+ /** Whether validation passed */
5157
+ valid: boolean;
5158
+ /** Validation errors */
5159
+ errors: ValidationError[];
5160
+ /** Validation warnings */
5161
+ warnings: ValidationWarning[];
5162
+ }
5163
+ /**
5164
+ * Validation error
5165
+ */
5166
+ interface ValidationError {
5167
+ /** Error code */
5168
+ code: string;
5169
+ /** Error message */
5170
+ message: string;
5171
+ /** Path to the problematic item */
5172
+ path?: string;
5173
+ /** Line number (if applicable) */
5174
+ line?: number;
5175
+ }
5176
+ /**
5177
+ * Validation warning
5178
+ */
5179
+ interface ValidationWarning {
5180
+ /** Warning code */
5181
+ code: string;
5182
+ /** Warning message */
5183
+ message: string;
5184
+ /** Recommendation */
5185
+ recommendation?: string;
5186
+ }
5187
+ /**
5188
+ * Methodology search query
5189
+ */
5190
+ interface MethodologySearchQuery {
5191
+ /** Search term */
5192
+ query?: string;
5193
+ /** Filter by tags */
5194
+ tags?: string[];
5195
+ /** Filter by pack name */
5196
+ pack?: string;
5197
+ /** Filter by difficulty */
5198
+ difficulty?: MethodologySkillMetadata['difficulty'];
5199
+ /** Filter by agent compatibility */
5200
+ agent?: AgentType;
5201
+ }
5202
+ /**
5203
+ * Methodology search result
5204
+ */
5205
+ interface MethodologySearchResult {
5206
+ /** Matching skills */
5207
+ skills: MethodologySkill[];
5208
+ /** Matching packs */
5209
+ packs: MethodologyPack[];
5210
+ /** Total count */
5211
+ total: number;
5212
+ }
5213
+
5214
+ /**
5215
+ * Methodology Loader
5216
+ *
5217
+ * Loads methodology packs and skills from the built-in packs directory
5218
+ * and custom locations.
5219
+ */
5220
+
5221
+ /**
5222
+ * Methodology Loader class
5223
+ */
5224
+ declare class MethodologyLoader {
5225
+ private packsDir;
5226
+ private loadedPacks;
5227
+ private loadedSkills;
5228
+ constructor(customPacksDir?: string);
5229
+ /**
5230
+ * Load all available packs
5231
+ */
5232
+ loadAllPacks(): Promise<MethodologyPack[]>;
5233
+ /**
5234
+ * Load a specific pack by name
5235
+ */
5236
+ loadPack(packName: string): Promise<MethodologyPack | null>;
5237
+ /**
5238
+ * Load all skills from a pack
5239
+ */
5240
+ loadPackSkills(packName: string): Promise<MethodologySkill[]>;
5241
+ /**
5242
+ * Load a specific skill
5243
+ */
5244
+ loadSkill(packName: string, skillName: string): Promise<MethodologySkill | null>;
5245
+ /**
5246
+ * Get skill by full ID (pack/skill)
5247
+ */
5248
+ getSkillById(skillId: string): Promise<MethodologySkill | null>;
5249
+ /**
5250
+ * Search skills by query
5251
+ */
5252
+ searchSkills(query: string): Promise<MethodologySkill[]>;
5253
+ /**
5254
+ * Get skills by tag
5255
+ */
5256
+ getSkillsByTag(tag: string): Promise<MethodologySkill[]>;
5257
+ /**
5258
+ * Get built-in packs directory path
5259
+ */
5260
+ getPacksDir(): string;
5261
+ /**
5262
+ * Check if a pack exists
5263
+ */
5264
+ packExists(packName: string): boolean;
5265
+ /**
5266
+ * Clear cache
5267
+ */
5268
+ clearCache(): void;
5269
+ }
5270
+ /**
5271
+ * Create a methodology loader instance
5272
+ */
5273
+ declare function createMethodologyLoader(customPacksDir?: string): MethodologyLoader;
5274
+ /**
5275
+ * Get the built-in packs directory
5276
+ */
5277
+ declare function getBuiltinPacksDir(): string;
5278
+
5279
+ /**
5280
+ * Methodology Manager
5281
+ *
5282
+ * Manages methodology pack installation, syncing, and lifecycle.
5283
+ */
5284
+
5285
+ /**
5286
+ * Methodology Manager class
5287
+ */
5288
+ declare class MethodologyManager {
5289
+ private projectPath;
5290
+ private loader;
5291
+ private state;
5292
+ private autoSync;
5293
+ constructor(options: MethodologyManagerOptions);
5294
+ /**
5295
+ * Install a methodology pack
5296
+ */
5297
+ installPack(packName: string): Promise<InstallResult>;
5298
+ /**
5299
+ * Install all available packs
5300
+ */
5301
+ installAllPacks(): Promise<InstallResult>;
5302
+ /**
5303
+ * Install a single skill by ID
5304
+ */
5305
+ installSkill(skillId: string): Promise<InstallResult>;
5306
+ /**
5307
+ * Uninstall a pack
5308
+ */
5309
+ uninstallPack(packName: string): Promise<void>;
5310
+ /**
5311
+ * Uninstall a skill
5312
+ */
5313
+ uninstallSkill(skillId: string): Promise<void>;
5314
+ /**
5315
+ * Sync a pack to all detected agents
5316
+ */
5317
+ syncPack(packName: string, agents?: AgentType[]): Promise<MethodologySyncResult>;
5318
+ /**
5319
+ * Sync a skill to all detected agents
5320
+ */
5321
+ syncSkill(skillId: string, agents?: AgentType[]): Promise<MethodologySyncResult>;
5322
+ /**
5323
+ * Sync all installed skills
5324
+ */
5325
+ syncAll(agents?: AgentType[]): Promise<MethodologySyncResult>;
5326
+ /**
5327
+ * List installed packs
5328
+ */
5329
+ listInstalledPacks(): Array<{
5330
+ name: string;
5331
+ version: string;
5332
+ skills: string[];
5333
+ }>;
5334
+ /**
5335
+ * List installed skills
5336
+ */
5337
+ listInstalledSkills(): Array<{
5338
+ id: string;
5339
+ version: string;
5340
+ pack?: string;
5341
+ syncedAgents: AgentType[];
5342
+ }>;
5343
+ /**
5344
+ * List available packs (not yet installed)
5345
+ */
5346
+ listAvailablePacks(): Promise<MethodologyPack[]>;
5347
+ /**
5348
+ * Search methodology skills
5349
+ */
5350
+ search(query: MethodologySearchQuery): Promise<MethodologySearchResult>;
5351
+ /**
5352
+ * Get the loader instance
5353
+ */
5354
+ getLoader(): MethodologyLoader;
5355
+ private loadState;
5356
+ private saveState;
5357
+ private installSkillLocally;
5358
+ private removeSkillLocally;
5359
+ private writeSkillToAgent;
5360
+ private detectAgents;
5361
+ }
5362
+ /**
5363
+ * Create a methodology manager instance
5364
+ */
5365
+ declare function createMethodologyManager(options: MethodologyManagerOptions): MethodologyManager;
5366
+
5367
+ /**
5368
+ * Methodology Validator
5369
+ *
5370
+ * Validates methodology packs and skills for correctness and completeness.
5371
+ */
5372
+
5373
+ /**
5374
+ * Validates a methodology pack manifest
5375
+ */
5376
+ declare function validatePackManifest(pack: unknown): ValidationResult;
5377
+ /**
5378
+ * Validates SKILL.md content
5379
+ */
5380
+ declare function validateSkillContent(content: string): ValidationResult;
5381
+ /**
5382
+ * Validates a pack directory structure
5383
+ */
5384
+ declare function validatePackDirectory(packPath: string): ValidationResult;
5385
+ /**
5386
+ * Validates all built-in packs
5387
+ */
5388
+ declare function validateBuiltinPacks(packsDir: string): Map<string, ValidationResult>;
5389
+ /**
5390
+ * Extract skill metadata from SKILL.md frontmatter
5391
+ */
5392
+ declare function extractSkillMetadata(content: string): Record<string, unknown>;
5393
+
5394
+ /**
5395
+ * Hooks & Automatic Triggering System Types
5396
+ *
5397
+ * Provides event-driven skill activation across all supported agents.
5398
+ */
5399
+
5400
+ /**
5401
+ * Hook events that can trigger skill activation
5402
+ */
5403
+ type HookEvent = 'session:start' | 'session:resume' | 'session:end' | 'file:open' | 'file:save' | 'file:create' | 'file:delete' | 'task:start' | 'task:complete' | 'commit:pre' | 'commit:post' | 'error:occur' | 'test:fail' | 'test:pass' | 'build:start' | 'build:fail' | 'build:success';
5404
+ /**
5405
+ * How to inject the skill when triggered
5406
+ */
5407
+ type InjectionMode = 'content' | 'reference' | 'prompt';
5408
+ /**
5409
+ * Skill hook configuration
5410
+ */
5411
+ interface SkillHook {
5412
+ /** Unique identifier for this hook */
5413
+ id: string;
5414
+ /** Event that triggers this hook */
5415
+ event: HookEvent;
5416
+ /** Pattern to match (e.g., "*.test.ts", "src/**\/*.tsx") */
5417
+ matcher?: string | RegExp;
5418
+ /** Skills to activate when triggered */
5419
+ skills: string[];
5420
+ /** How to inject the skill */
5421
+ inject: InjectionMode;
5422
+ /** Priority (higher = earlier execution) */
5423
+ priority?: number;
5424
+ /** Condition expression (optional) */
5425
+ condition?: string;
5426
+ /** Whether hook is enabled */
5427
+ enabled: boolean;
5428
+ /** Agent-specific overrides */
5429
+ agentOverrides?: Partial<Record<AgentType, Partial<SkillHook>>>;
5430
+ /** Metadata */
5431
+ metadata?: Record<string, unknown>;
5432
+ }
5433
+ /**
5434
+ * Context provided when a hook is triggered
5435
+ */
5436
+ interface HookContext {
5437
+ /** The event that was triggered */
5438
+ event: HookEvent;
5439
+ /** What triggered the event (filename, command, etc.) */
5440
+ trigger: string;
5441
+ /** Project path */
5442
+ projectPath: string;
5443
+ /** Target agent */
5444
+ agent: AgentType;
5445
+ /** Additional metadata */
5446
+ metadata?: Record<string, unknown>;
5447
+ /** Timestamp */
5448
+ timestamp: Date;
5449
+ }
5450
+ /**
5451
+ * Result of activating a skill via hook
5452
+ */
5453
+ interface ActivatedSkill {
5454
+ /** Skill ID */
5455
+ skillId: string;
5456
+ /** Hook that activated it */
5457
+ hookId: string;
5458
+ /** Injection mode used */
5459
+ injectionMode: InjectionMode;
5460
+ /** The skill content (if injection mode is 'content') */
5461
+ content?: string;
5462
+ /** The skill reference (if injection mode is 'reference') */
5463
+ reference?: string;
5464
+ /** Activation timestamp */
5465
+ activatedAt: Date;
5466
+ }
5467
+ /**
5468
+ * Hook trigger result
5469
+ */
5470
+ interface HookTriggerResult {
5471
+ /** Event that was triggered */
5472
+ event: HookEvent;
5473
+ /** Hooks that matched */
5474
+ matchedHooks: SkillHook[];
5475
+ /** Skills that were activated */
5476
+ activatedSkills: ActivatedSkill[];
5477
+ /** Any errors that occurred */
5478
+ errors: HookError[];
5479
+ /** Total execution time in ms */
5480
+ executionTimeMs: number;
5481
+ }
5482
+ /**
5483
+ * Hook error
5484
+ */
5485
+ interface HookError {
5486
+ hookId: string;
5487
+ skillId?: string;
5488
+ message: string;
5489
+ stack?: string;
5490
+ }
5491
+ /**
5492
+ * Hook configuration file format
5493
+ */
5494
+ interface HookConfig {
5495
+ version: number;
5496
+ hooks: SkillHook[];
5497
+ defaults?: {
5498
+ inject?: InjectionMode;
5499
+ priority?: number;
5500
+ enabled?: boolean;
5501
+ };
5502
+ }
5503
+ /**
5504
+ * Agent-specific hook format generator
5505
+ */
5506
+ interface AgentHookFormat {
5507
+ /** Agent type */
5508
+ agent: AgentType;
5509
+ /** Generate hook configuration for this agent */
5510
+ generate(hooks: SkillHook[]): string | Record<string, unknown>;
5511
+ /** Parse agent-specific hook format */
5512
+ parse(content: string | Record<string, unknown>): SkillHook[];
5513
+ /** File path for hook configuration */
5514
+ configPath: string;
5515
+ }
5516
+ /**
5517
+ * Hook manager options
5518
+ */
5519
+ interface HookManagerOptions {
5520
+ /** Project path */
5521
+ projectPath: string;
5522
+ /** Path to hooks configuration file */
5523
+ configPath?: string;
5524
+ /** Whether to auto-load hooks on init */
5525
+ autoLoad?: boolean;
5526
+ /** Default injection mode */
5527
+ defaultInjectionMode?: InjectionMode;
5528
+ }
5529
+ /**
5530
+ * Trigger engine options
5531
+ */
5532
+ interface TriggerEngineOptions {
5533
+ /** Project path */
5534
+ projectPath: string;
5535
+ /** Whether to enable file watching */
5536
+ watchFiles?: boolean;
5537
+ /** Debounce time for file events (ms) */
5538
+ debounceMs?: number;
5539
+ }
5540
+ /**
5541
+ * Hook event listener
5542
+ */
5543
+ type HookEventListener = (event: HookEvent, context: HookContext, result: HookTriggerResult) => void | Promise<void>;
5544
+ /**
5545
+ * Matcher function type
5546
+ */
5547
+ type MatcherFunction = (trigger: string, context: HookContext) => boolean;
5548
+
5549
+ /**
5550
+ * Hook Manager
5551
+ *
5552
+ * Manages skill hooks for automatic triggering across all supported agents.
5553
+ */
5554
+
5555
+ /**
5556
+ * HookManager - Manages skill hooks for automatic triggering
5557
+ */
5558
+ declare class HookManager {
5559
+ private hooks;
5560
+ private listeners;
5561
+ private options;
5562
+ constructor(options: HookManagerOptions);
5563
+ /**
5564
+ * Register a new hook
5565
+ */
5566
+ registerHook(hook: Omit<SkillHook, 'id'> & {
5567
+ id?: string;
5568
+ }): SkillHook;
5569
+ /**
5570
+ * Unregister a hook by ID
5571
+ */
5572
+ unregisterHook(id: string): boolean;
5573
+ /**
5574
+ * Get a hook by ID
5575
+ */
5576
+ getHook(id: string): SkillHook | undefined;
5577
+ /**
5578
+ * Get all hooks
5579
+ */
5580
+ getAllHooks(): SkillHook[];
5581
+ /**
5582
+ * Get hooks for a specific event
5583
+ */
5584
+ getHooksForEvent(event: HookEvent): SkillHook[];
5585
+ /**
5586
+ * Update a hook
5587
+ */
5588
+ updateHook(id: string, updates: Partial<SkillHook>): SkillHook | undefined;
5589
+ /**
5590
+ * Enable a hook
5591
+ */
5592
+ enableHook(id: string): boolean;
5593
+ /**
5594
+ * Disable a hook
5595
+ */
5596
+ disableHook(id: string): boolean;
5597
+ /**
5598
+ * Trigger hooks for an event
5599
+ */
5600
+ trigger(event: HookEvent, context: HookContext): Promise<HookTriggerResult>;
5601
+ /**
5602
+ * Add event listener
5603
+ */
5604
+ addListener(listener: HookEventListener): void;
5605
+ /**
5606
+ * Remove event listener
5607
+ */
5608
+ removeListener(listener: HookEventListener): void;
5609
+ /**
5610
+ * Load hooks from config file
5611
+ */
5612
+ load(): void;
5613
+ /**
5614
+ * Save hooks to config file
5615
+ */
5616
+ save(): void;
5617
+ /**
5618
+ * Generate agent-specific hook configuration
5619
+ */
5620
+ generateAgentHooks(agent: AgentType): string | Record<string, unknown>;
5621
+ /**
5622
+ * Generate Claude Code hooks.json format
5623
+ */
5624
+ private generateClaudeCodeHooks;
5625
+ /**
5626
+ * Map SkillKit events to Claude Code events
5627
+ */
5628
+ private mapToClaudeCodeEvent;
5629
+ /**
5630
+ * Generate Claude Code command for a hook
5631
+ */
5632
+ private generateClaudeCommand;
5633
+ /**
5634
+ * Generate Cursor rules with hooks
5635
+ */
5636
+ private generateCursorHooks;
5637
+ /**
5638
+ * Generate OpenCode hooks
5639
+ */
5640
+ private generateOpenCodeHooks;
5641
+ /**
5642
+ * Generate generic AGENTS.md injection for unsupported agents
5643
+ */
5644
+ private generateGenericHooks;
5645
+ /**
5646
+ * Check if trigger matches the pattern
5647
+ */
5648
+ private matchesTrigger;
5649
+ /**
5650
+ * Evaluate condition expression
5651
+ */
5652
+ private evaluateCondition;
5653
+ /**
5654
+ * Resolve a value from context
5655
+ */
5656
+ private resolveValue;
5657
+ /**
5658
+ * Apply agent-specific overrides to a hook
5659
+ */
5660
+ private applyAgentOverrides;
5661
+ /**
5662
+ * Activate a skill from a hook
5663
+ */
5664
+ private activateSkill;
5665
+ /**
5666
+ * Load skill content (placeholder - integrates with skill loader)
5667
+ */
5668
+ private loadSkillContent;
5669
+ /**
5670
+ * Notify all listeners of a trigger event
5671
+ */
5672
+ private notifyListeners;
5673
+ }
5674
+ /**
5675
+ * Create a HookManager instance
5676
+ */
5677
+ declare function createHookManager(options: HookManagerOptions): HookManager;
5678
+
5679
+ /**
5680
+ * Skill Trigger Engine
5681
+ *
5682
+ * Monitors events and triggers skill activation based on configured hooks.
5683
+ */
5684
+
5685
+ /**
5686
+ * SkillTriggerEngine - Monitors events and triggers skill activation
5687
+ */
5688
+ declare class SkillTriggerEngine {
5689
+ private hookManager;
5690
+ private options;
5691
+ private watchers;
5692
+ private listeners;
5693
+ private isRunning;
5694
+ private currentAgent;
5695
+ constructor(hookManager: HookManager, options: TriggerEngineOptions);
5696
+ /**
5697
+ * Start the trigger engine
5698
+ */
5699
+ start(agent?: AgentType): void;
5700
+ /**
5701
+ * Stop the trigger engine
5702
+ */
5703
+ stop(): void;
5704
+ /**
5705
+ * Set the current agent
5706
+ */
5707
+ setAgent(agent: AgentType): void;
5708
+ /**
5709
+ * Manually trigger an event
5710
+ */
5711
+ triggerEvent(event: HookEvent, trigger: string, metadata?: Record<string, unknown>): Promise<HookTriggerResult>;
5712
+ /**
5713
+ * Trigger file:open event
5714
+ */
5715
+ triggerFileOpen(filePath: string): Promise<HookTriggerResult>;
5716
+ /**
5717
+ * Trigger file:save event
5718
+ */
5719
+ triggerFileSave(filePath: string): Promise<HookTriggerResult>;
5720
+ /**
5721
+ * Trigger file:create event
5722
+ */
5723
+ triggerFileCreate(filePath: string): Promise<HookTriggerResult>;
5724
+ /**
5725
+ * Trigger file:delete event
5726
+ */
5727
+ triggerFileDelete(filePath: string): Promise<HookTriggerResult>;
5728
+ /**
5729
+ * Trigger task:start event
5730
+ */
5731
+ triggerTaskStart(taskName: string, taskId?: string): Promise<HookTriggerResult>;
5732
+ /**
5733
+ * Trigger task:complete event
5734
+ */
5735
+ triggerTaskComplete(taskName: string, taskId?: string, success?: boolean): Promise<HookTriggerResult>;
5736
+ /**
5737
+ * Trigger commit:pre event
5738
+ */
5739
+ triggerPreCommit(message?: string): Promise<HookTriggerResult>;
5740
+ /**
5741
+ * Trigger commit:post event
5742
+ */
5743
+ triggerPostCommit(commitHash?: string, message?: string): Promise<HookTriggerResult>;
5744
+ /**
5745
+ * Trigger error:occur event
5746
+ */
5747
+ triggerError(error: Error | string, context?: string): Promise<HookTriggerResult>;
5748
+ /**
5749
+ * Trigger test:fail event
5750
+ */
5751
+ triggerTestFail(testName: string, error?: string): Promise<HookTriggerResult>;
5752
+ /**
5753
+ * Trigger test:pass event
5754
+ */
5755
+ triggerTestPass(testName: string): Promise<HookTriggerResult>;
5756
+ /**
5757
+ * Trigger build:start event
5758
+ */
5759
+ triggerBuildStart(command?: string): Promise<HookTriggerResult>;
5760
+ /**
5761
+ * Trigger build:fail event
5762
+ */
5763
+ triggerBuildFail(error?: string): Promise<HookTriggerResult>;
5764
+ /**
5765
+ * Trigger build:success event
5766
+ */
5767
+ triggerBuildSuccess(): Promise<HookTriggerResult>;
5768
+ /**
5769
+ * Add event listener
5770
+ */
5771
+ addListener(listener: HookEventListener): void;
5772
+ /**
5773
+ * Remove event listener
5774
+ */
5775
+ removeListener(listener: HookEventListener): void;
5776
+ /**
5777
+ * Check if engine is running
5778
+ */
5779
+ isActive(): boolean;
5780
+ /**
5781
+ * Start file watcher
5782
+ */
5783
+ private startFileWatcher;
5784
+ /**
5785
+ * Stop file watcher
5786
+ */
5787
+ private stopFileWatcher;
5788
+ /**
5789
+ * Check if a path should be ignored
5790
+ */
5791
+ private shouldIgnore;
5792
+ }
5793
+ /**
5794
+ * Create a SkillTriggerEngine instance
5795
+ */
5796
+ declare function createTriggerEngine(hookManager: HookManager, options: TriggerEngineOptions): SkillTriggerEngine;
5797
+
5798
+ /**
5799
+ * Team Orchestration Types
5800
+ *
5801
+ * Types for multi-agent team coordination with task assignment and review workflows.
5802
+ */
5803
+
5804
+ /**
5805
+ * Team status
5806
+ */
5807
+ type TeamStatus = 'forming' | 'working' | 'reviewing' | 'completing' | 'shutdown';
5808
+ /**
5809
+ * Agent instance status
5810
+ */
5811
+ type AgentStatus = 'idle' | 'planning' | 'executing' | 'reviewing' | 'shutdown_requested' | 'shutdown';
5812
+ /**
5813
+ * Orchestrator task status
5814
+ */
5815
+ type OrchestratorTaskStatus = 'pending' | 'assigned' | 'planning' | 'plan_pending' | 'approved' | 'in_progress' | 'review' | 'completed' | 'failed';
5816
+ /**
5817
+ * Message type
5818
+ */
5819
+ type MessageType = 'direct' | 'broadcast' | 'plan_submit' | 'plan_approve' | 'plan_reject' | 'shutdown_request' | 'shutdown_approve' | 'task_assign' | 'task_update' | 'review_request' | 'review_complete';
5820
+ /**
5821
+ * Review stage name
5822
+ */
5823
+ type ReviewStageName = 'spec-compliance' | 'code-quality' | 'security' | 'testing' | 'custom';
5824
+ /**
5825
+ * Issue severity
5826
+ */
5827
+ type IssueSeverity = 'critical' | 'important' | 'minor';
5828
+ /**
5829
+ * Team orchestrator configuration
5830
+ */
5831
+ interface OrchestratorTeamConfig {
5832
+ /** Team name */
5833
+ name: string;
5834
+ /** Leader agent type */
5835
+ leaderAgent: AgentType;
5836
+ /** Teammate agent types */
5837
+ teammateAgents?: AgentType[];
5838
+ /** Auto-spawn teammates */
5839
+ autoSpawn?: boolean;
5840
+ /** Require plan approval before execution */
5841
+ requirePlanApproval?: boolean;
5842
+ /** Review stages to apply */
5843
+ reviewStages?: ReviewStageName[];
5844
+ /** Timeout for tasks (ms) */
5845
+ taskTimeout?: number;
5846
+ /** Metadata */
5847
+ metadata?: Record<string, unknown>;
5848
+ }
5849
+ /**
5850
+ * Team instance
5851
+ */
5852
+ interface Team {
5853
+ /** Unique team ID */
5854
+ id: string;
5855
+ /** Team name */
5856
+ name: string;
5857
+ /** Leader agent */
5858
+ leader: AgentInstance;
5859
+ /** Teammate agents */
5860
+ teammates: AgentInstance[];
5861
+ /** Team tasks */
5862
+ tasks: Task[];
5863
+ /** Team status */
5864
+ status: TeamStatus;
5865
+ /** Creation time */
5866
+ createdAt: Date;
5867
+ /** Configuration */
5868
+ config: OrchestratorTeamConfig;
5869
+ /** Metadata */
5870
+ metadata?: Record<string, unknown>;
5871
+ }
5872
+ /**
5873
+ * Agent instance
5874
+ */
5875
+ interface AgentInstance {
5876
+ /** Unique agent ID */
5877
+ id: string;
5878
+ /** Agent role */
5879
+ role: 'leader' | 'teammate';
5880
+ /** Agent type */
5881
+ agentType: AgentType;
5882
+ /** Agent status */
5883
+ status: AgentStatus;
5884
+ /** Current task ID */
5885
+ currentTask?: string;
5886
+ /** Spawn time */
5887
+ spawnedAt: Date;
5888
+ /** Last activity time */
5889
+ lastActivityAt: Date;
5890
+ /** Metadata */
5891
+ metadata?: Record<string, unknown>;
5892
+ }
5893
+ /**
5894
+ * Task files specification
5895
+ */
5896
+ interface TaskFiles {
5897
+ /** Files to create */
5898
+ create?: string[];
5899
+ /** Files to modify */
5900
+ modify?: string[];
5901
+ /** Test files */
5902
+ test?: string[];
5903
+ }
5904
+ /**
5905
+ * Plan step
5906
+ */
5907
+ interface PlanStep {
5908
+ /** Step number */
5909
+ number: number;
5910
+ /** Step description */
5911
+ description: string;
5912
+ /** Step type */
5913
+ type: 'test' | 'verify' | 'implement' | 'commit' | 'review';
5914
+ /** Code snippet (optional) */
5915
+ code?: string;
5916
+ /** Command to run (optional) */
5917
+ command?: string;
5918
+ /** Expected output (optional) */
5919
+ expectedOutput?: string;
5920
+ }
5921
+ /**
5922
+ * Task plan
5923
+ */
5924
+ interface TaskPlan {
5925
+ /** Plan steps */
5926
+ steps: PlanStep[];
5927
+ /** Estimated time in minutes */
5928
+ estimatedMinutes?: number;
5929
+ /** Plan submission time */
5930
+ submittedAt: Date;
5931
+ /** Plan approval time */
5932
+ approvedAt?: Date;
5933
+ /** Rejection reason */
5934
+ rejectionReason?: string;
5935
+ /** Approver ID */
5936
+ approvedBy?: string;
5937
+ }
5938
+ /**
5939
+ * Task result
5940
+ */
5941
+ interface TaskResult {
5942
+ /** Whether task succeeded */
5943
+ success: boolean;
5944
+ /** Output/summary */
5945
+ output: string;
5946
+ /** Files created */
5947
+ filesCreated?: string[];
5948
+ /** Files modified */
5949
+ filesModified?: string[];
5950
+ /** Test results */
5951
+ testResults?: TestResult[];
5952
+ /** Completion time */
5953
+ completedAt: Date;
5954
+ /** Errors if any */
5955
+ errors?: string[];
5956
+ }
5957
+ /**
5958
+ * Test result
5959
+ */
5960
+ interface TestResult {
5961
+ /** Test name */
5962
+ name: string;
5963
+ /** Whether test passed */
5964
+ passed: boolean;
5965
+ /** Error message */
5966
+ error?: string;
5967
+ /** Duration in ms */
5968
+ durationMs?: number;
5969
+ }
5970
+ /**
5971
+ * Task
5972
+ */
5973
+ interface Task {
5974
+ /** Unique task ID */
5975
+ id: string;
5976
+ /** Task name */
5977
+ name: string;
5978
+ /** Task description */
5979
+ description: string;
5980
+ /** Full specification */
5981
+ spec: string;
5982
+ /** Files involved */
5983
+ files: TaskFiles;
5984
+ /** Assigned agent ID */
5985
+ assignee?: string;
5986
+ /** Task status */
5987
+ status: OrchestratorTaskStatus;
5988
+ /** Task plan */
5989
+ plan?: TaskPlan;
5990
+ /** Task result */
5991
+ result?: TaskResult;
5992
+ /** Priority (higher = more important) */
5993
+ priority?: number;
5994
+ /** Dependencies (task IDs) */
5995
+ dependencies?: string[];
5996
+ /** Creation time */
5997
+ createdAt: Date;
5998
+ /** Last update time */
5999
+ updatedAt: Date;
6000
+ /** Metadata */
6001
+ metadata?: Record<string, unknown>;
6002
+ }
6003
+ /**
6004
+ * Review issue
6005
+ */
6006
+ interface ReviewIssue {
6007
+ /** Issue severity */
6008
+ severity: IssueSeverity;
6009
+ /** Issue description */
6010
+ description: string;
6011
+ /** File path */
6012
+ file?: string;
6013
+ /** Line number */
6014
+ line?: number;
6015
+ /** Suggested fix */
6016
+ suggestion?: string;
6017
+ }
6018
+ /**
6019
+ * Review result
6020
+ */
6021
+ interface ReviewResult {
6022
+ /** Whether review passed */
6023
+ passed: boolean;
6024
+ /** Review issues */
6025
+ issues: ReviewIssue[];
6026
+ /** Summary */
6027
+ summary: string;
6028
+ /** Reviewer ID */
6029
+ reviewerId?: string;
6030
+ /** Review time */
6031
+ reviewedAt: Date;
6032
+ }
6033
+ /**
6034
+ * Review stage
6035
+ */
6036
+ interface ReviewStage {
6037
+ /** Stage name */
6038
+ name: ReviewStageName;
6039
+ /** Stage prompt */
6040
+ prompt: string;
6041
+ /** Required to pass */
6042
+ required: boolean;
6043
+ /** Reviewer (leader or specific agent) */
6044
+ reviewer?: 'leader' | string;
6045
+ }
6046
+ /**
6047
+ * Team message
6048
+ */
6049
+ interface TeamMessage {
6050
+ /** Message ID */
6051
+ id: string;
6052
+ /** Message type */
6053
+ type: MessageType;
6054
+ /** Sender agent ID */
6055
+ from: string;
6056
+ /** Recipient agent ID (for direct messages) */
6057
+ to?: string;
6058
+ /** Message content */
6059
+ content: string;
6060
+ /** Related task ID */
6061
+ taskId?: string;
6062
+ /** Metadata */
6063
+ metadata?: Record<string, unknown>;
6064
+ /** Timestamp */
6065
+ timestamp: Date;
6066
+ }
6067
+ /**
6068
+ * Task filter
6069
+ */
6070
+ interface TaskFilter {
6071
+ /** Filter by status */
6072
+ status?: OrchestratorTaskStatus | OrchestratorTaskStatus[];
6073
+ /** Filter by assignee */
6074
+ assignee?: string;
6075
+ /** Filter by priority */
6076
+ minPriority?: number;
6077
+ /** Include completed tasks */
6078
+ includeCompleted?: boolean;
6079
+ }
6080
+ /**
6081
+ * Team orchestrator options
6082
+ */
6083
+ interface OrchestratorOptions {
6084
+ /** Project path */
6085
+ projectPath: string;
6086
+ /** Default review stages */
6087
+ defaultReviewStages?: ReviewStage[];
6088
+ /** Require plan approval by default */
6089
+ requirePlanApproval?: boolean;
6090
+ /** Task timeout (ms) */
6091
+ taskTimeout?: number;
6092
+ /** Enable methodology integration */
6093
+ enableMethodology?: boolean;
6094
+ /** Verbose logging */
6095
+ verbose?: boolean;
6096
+ }
6097
+ /**
6098
+ * Plan result
6099
+ */
6100
+ interface PlanResult {
6101
+ /** Whether all tasks completed */
6102
+ success: boolean;
6103
+ /** Task results */
6104
+ taskResults: Map<string, TaskResult>;
6105
+ /** Failed tasks */
6106
+ failedTasks: string[];
6107
+ /** Total duration (ms) */
6108
+ durationMs: number;
6109
+ }
6110
+ /**
6111
+ * Message handler
6112
+ */
6113
+ type MessageHandler = (message: TeamMessage) => void | Promise<void>;
6114
+ /**
6115
+ * Task event
6116
+ */
6117
+ type TaskEvent = 'task:created' | 'task:assigned' | 'task:plan_submitted' | 'task:plan_approved' | 'task:plan_rejected' | 'task:started' | 'task:completed' | 'task:failed';
6118
+ /**
6119
+ * Team event
6120
+ */
6121
+ type TeamEvent = 'team:created' | 'team:teammate_spawned' | 'team:teammate_shutdown' | 'team:shutdown';
6122
+ /**
6123
+ * Task event listener
6124
+ */
6125
+ type TaskEventListener = (event: TaskEvent, task: Task) => void | Promise<void>;
6126
+ /**
6127
+ * Team event listener
6128
+ */
6129
+ type TeamEventListener = (event: TeamEvent, team: Team, agent?: AgentInstance) => void | Promise<void>;
6130
+
6131
+ /**
6132
+ * Task Manager
6133
+ *
6134
+ * Manages tasks within a team with status tracking and assignment.
6135
+ */
6136
+
6137
+ /**
6138
+ * TaskManager - Manages team tasks
6139
+ */
6140
+ declare class TaskManager {
6141
+ private tasks;
6142
+ private listeners;
6143
+ /**
6144
+ * Create a new task
6145
+ */
6146
+ createTask(name: string, description: string, spec: string, options?: {
6147
+ files?: TaskFiles;
6148
+ priority?: number;
6149
+ dependencies?: string[];
6150
+ metadata?: Record<string, unknown>;
6151
+ }): Task;
6152
+ /**
6153
+ * Get a task by ID
6154
+ */
6155
+ getTask(taskId: string): Task | undefined;
6156
+ /**
6157
+ * Get all tasks
6158
+ */
6159
+ getAllTasks(): Task[];
6160
+ /**
6161
+ * List tasks with optional filter
6162
+ */
6163
+ listTasks(filter?: TaskFilter): Task[];
6164
+ /**
6165
+ * Assign a task to an agent
6166
+ */
6167
+ assignTask(taskId: string, agentId: string): Task | undefined;
6168
+ /**
6169
+ * Unassign a task
6170
+ */
6171
+ unassignTask(taskId: string): Task | undefined;
6172
+ /**
6173
+ * Submit a plan for a task
6174
+ */
6175
+ submitPlan(taskId: string, plan: Omit<TaskPlan, 'submittedAt'>): Task | undefined;
6176
+ /**
6177
+ * Approve a task plan
6178
+ */
6179
+ approvePlan(taskId: string, approverId: string): Task | undefined;
6180
+ /**
6181
+ * Reject a task plan
6182
+ */
6183
+ rejectPlan(taskId: string, reason: string): Task | undefined;
6184
+ /**
6185
+ * Start a task (mark as in progress)
6186
+ */
6187
+ startTask(taskId: string): Task | undefined;
6188
+ /**
6189
+ * Mark task as under review
6190
+ */
6191
+ markForReview(taskId: string): Task | undefined;
6192
+ /**
6193
+ * Complete a task
6194
+ */
6195
+ completeTask(taskId: string, result: TaskResult): Task | undefined;
6196
+ /**
6197
+ * Fail a task
6198
+ */
6199
+ failTask(taskId: string, errors: string[]): Task | undefined;
6200
+ /**
6201
+ * Update task status
6202
+ */
6203
+ updateStatus(taskId: string, status: OrchestratorTaskStatus): Task | undefined;
6204
+ /**
6205
+ * Delete a task
6206
+ */
6207
+ deleteTask(taskId: string): boolean;
6208
+ /**
6209
+ * Get tasks by status
6210
+ */
6211
+ getTasksByStatus(status: OrchestratorTaskStatus): Task[];
6212
+ /**
6213
+ * Get tasks for an agent
6214
+ */
6215
+ getTasksForAgent(agentId: string): Task[];
6216
+ /**
6217
+ * Get pending tasks (unassigned)
6218
+ */
6219
+ getPendingTasks(): Task[];
6220
+ /**
6221
+ * Get next available task for assignment
6222
+ */
6223
+ getNextTask(): Task | undefined;
6224
+ /**
6225
+ * Check if all tasks are complete
6226
+ */
6227
+ allTasksComplete(): boolean;
6228
+ /**
6229
+ * Get completion stats
6230
+ */
6231
+ getStats(): {
6232
+ total: number;
6233
+ pending: number;
6234
+ inProgress: number;
6235
+ completed: number;
6236
+ failed: number;
6237
+ };
6238
+ /**
6239
+ * Add event listener
6240
+ */
6241
+ addListener(listener: TaskEventListener): void;
6242
+ /**
6243
+ * Remove event listener
6244
+ */
6245
+ removeListener(listener: TaskEventListener): void;
6246
+ /**
6247
+ * Emit task event
6248
+ */
6249
+ private emit;
6250
+ /**
6251
+ * Clear all tasks
6252
+ */
6253
+ clear(): void;
6254
+ /**
6255
+ * Export tasks to JSON
6256
+ */
6257
+ toJSON(): Task[];
6258
+ /**
6259
+ * Import tasks from JSON
6260
+ */
6261
+ fromJSON(tasks: Task[]): void;
6262
+ }
6263
+ /**
6264
+ * Create a TaskManager instance
6265
+ */
6266
+ declare function createTaskManager(): TaskManager;
6267
+
6268
+ /**
6269
+ * Team Message Bus
6270
+ *
6271
+ * Handles inter-agent communication within a team.
6272
+ */
6273
+
6274
+ /**
6275
+ * TeamMessageBus - Handles team communication
6276
+ */
6277
+ declare class TeamMessageBus {
6278
+ private messages;
6279
+ private handlers;
6280
+ private globalHandlers;
6281
+ private maxMessages;
6282
+ constructor(options?: {
6283
+ maxMessages?: number;
6284
+ });
6285
+ /**
6286
+ * Send a direct message to a specific agent
6287
+ */
6288
+ send(from: string, to: string, content: string, options?: {
6289
+ type?: MessageType;
6290
+ taskId?: string;
6291
+ metadata?: Record<string, unknown>;
6292
+ }): Promise<TeamMessage>;
6293
+ /**
6294
+ * Broadcast a message to all agents
6295
+ */
6296
+ broadcast(from: string, content: string, options?: {
6297
+ taskId?: string;
6298
+ metadata?: Record<string, unknown>;
6299
+ }): Promise<TeamMessage>;
6300
+ /**
6301
+ * Submit a plan for approval
6302
+ */
6303
+ submitPlan(from: string, leaderId: string, taskId: string, planSummary: string): Promise<TeamMessage>;
6304
+ /**
6305
+ * Approve a plan
6306
+ */
6307
+ approvePlan(leaderId: string, teammateId: string, taskId: string, feedback?: string): Promise<TeamMessage>;
6308
+ /**
6309
+ * Reject a plan
6310
+ */
6311
+ rejectPlan(leaderId: string, teammateId: string, taskId: string, reason: string): Promise<TeamMessage>;
6312
+ /**
6313
+ * Request shutdown
6314
+ */
6315
+ requestShutdown(from: string, leaderId: string, reason?: string): Promise<TeamMessage>;
6316
+ /**
6317
+ * Approve shutdown
6318
+ */
6319
+ approveShutdown(leaderId: string, agentId: string): Promise<TeamMessage>;
6320
+ /**
6321
+ * Send task assignment notification
6322
+ */
6323
+ notifyTaskAssignment(leaderId: string, agentId: string, taskId: string, taskSummary: string): Promise<TeamMessage>;
6324
+ /**
6325
+ * Request review
6326
+ */
6327
+ requestReview(from: string, reviewerId: string, taskId: string, details: string): Promise<TeamMessage>;
6328
+ /**
6329
+ * Complete review
6330
+ */
6331
+ completeReview(reviewerId: string, agentId: string, taskId: string, result: string, passed: boolean): Promise<TeamMessage>;
6332
+ /**
6333
+ * Register a message handler for an agent
6334
+ */
6335
+ registerHandler(agentId: string, handler: MessageHandler): void;
6336
+ /**
6337
+ * Unregister a message handler
6338
+ */
6339
+ unregisterHandler(agentId: string, handler: MessageHandler): void;
6340
+ /**
6341
+ * Register a global message handler (receives all messages)
6342
+ */
6343
+ registerGlobalHandler(handler: MessageHandler): void;
6344
+ /**
6345
+ * Unregister a global handler
6346
+ */
6347
+ unregisterGlobalHandler(handler: MessageHandler): void;
6348
+ /**
6349
+ * Get messages for an agent
6350
+ */
6351
+ getMessagesForAgent(agentId: string): TeamMessage[];
6352
+ /**
6353
+ * Get messages from an agent
6354
+ */
6355
+ getMessagesFromAgent(agentId: string): TeamMessage[];
6356
+ /**
6357
+ * Get messages for a task
6358
+ */
6359
+ getMessagesForTask(taskId: string): TeamMessage[];
6360
+ /**
6361
+ * Get all messages
6362
+ */
6363
+ getAllMessages(): TeamMessage[];
6364
+ /**
6365
+ * Get recent messages
6366
+ */
6367
+ getRecentMessages(count: number): TeamMessage[];
6368
+ /**
6369
+ * Get messages by type
6370
+ */
6371
+ getMessagesByType(type: MessageType): TeamMessage[];
6372
+ /**
6373
+ * Get conversation between two agents
6374
+ */
6375
+ getConversation(agent1: string, agent2: string): TeamMessage[];
6376
+ /**
6377
+ * Clear all messages
6378
+ */
6379
+ clear(): void;
6380
+ /**
6381
+ * Add a message to the history
6382
+ */
6383
+ private addMessage;
6384
+ /**
6385
+ * Notify handlers for a specific agent
6386
+ */
6387
+ private notifyHandlers;
6388
+ /**
6389
+ * Notify global handlers
6390
+ */
6391
+ private notifyGlobalHandlers;
6392
+ /**
6393
+ * Get message count
6394
+ */
6395
+ get messageCount(): number;
6396
+ }
6397
+ /**
6398
+ * Create a TeamMessageBus instance
6399
+ */
6400
+ declare function createMessageBus(options?: {
6401
+ maxMessages?: number;
6402
+ }): TeamMessageBus;
6403
+
6404
+ /**
6405
+ * Team Orchestrator
6406
+ *
6407
+ * Coordinates multi-agent teams with task assignment, plan approval, and review workflows.
6408
+ */
6409
+
6410
+ /**
6411
+ * TeamOrchestrator - Coordinates multi-agent teams
6412
+ */
6413
+ declare class TeamOrchestrator {
6414
+ private teams;
6415
+ private taskManagers;
6416
+ private messageBuses;
6417
+ private listeners;
6418
+ private options;
6419
+ constructor(options: OrchestratorOptions);
6420
+ /**
6421
+ * Spawn a new team
6422
+ */
6423
+ spawnTeam(config: OrchestratorTeamConfig): Promise<Team>;
6424
+ /**
6425
+ * Spawn a teammate agent
6426
+ */
6427
+ spawnTeammate(teamId: string, agentType: AgentType): Promise<AgentInstance>;
6428
+ /**
6429
+ * Get a team by ID
6430
+ */
6431
+ getTeam(teamId: string): Team | undefined;
6432
+ /**
6433
+ * Get all teams
6434
+ */
6435
+ getAllTeams(): Team[];
6436
+ /**
6437
+ * Get task manager for a team
6438
+ */
6439
+ getTaskManager(teamId: string): TaskManager | undefined;
6440
+ /**
6441
+ * Get message bus for a team
6442
+ */
6443
+ getMessageBus(teamId: string): TeamMessageBus | undefined;
6444
+ /**
6445
+ * Create a task in a team
6446
+ */
6447
+ createTask(teamId: string, name: string, description: string, spec: string, options?: Parameters<TaskManager['createTask']>[3]): Promise<Task>;
6448
+ /**
6449
+ * Assign a task to an agent
6450
+ */
6451
+ assignTask(teamId: string, taskId: string, agentId: string): Promise<Task | undefined>;
6452
+ /**
6453
+ * List tasks in a team
6454
+ */
6455
+ listTasks(teamId: string, filter?: TaskFilter): Task[];
6456
+ /**
6457
+ * Submit a plan for a task
6458
+ */
6459
+ submitPlan(teamId: string, taskId: string, plan: Omit<TaskPlan, 'submittedAt'>): Promise<Task | undefined>;
6460
+ /**
6461
+ * Approve a task plan
6462
+ */
6463
+ approvePlan(teamId: string, taskId: string): Promise<Task | undefined>;
6464
+ /**
6465
+ * Reject a task plan
6466
+ */
6467
+ rejectPlan(teamId: string, taskId: string, reason: string): Promise<Task | undefined>;
6468
+ /**
6469
+ * Request agent shutdown
6470
+ */
6471
+ requestShutdown(teamId: string, agentId: string, reason?: string): Promise<void>;
6472
+ /**
6473
+ * Approve agent shutdown
6474
+ */
6475
+ approveShutdown(teamId: string, agentId: string): Promise<void>;
6476
+ /**
6477
+ * Send a message
6478
+ */
6479
+ send(teamId: string, from: string, to: string, content: string, taskId?: string): Promise<void>;
6480
+ /**
6481
+ * Broadcast a message
6482
+ */
6483
+ broadcast(teamId: string, from: string, content: string): Promise<void>;
6484
+ /**
6485
+ * Run review on a task
6486
+ */
6487
+ runReview(teamId: string, taskId: string, stage: ReviewStage, _implementation: string): Promise<ReviewResult>;
6488
+ /**
6489
+ * Execute a full plan with all tasks
6490
+ */
6491
+ executePlan(teamId: string): Promise<PlanResult>;
6492
+ /**
6493
+ * Shutdown a team
6494
+ */
6495
+ shutdownTeam(teamId: string): Promise<void>;
6496
+ /**
6497
+ * Get team stats
6498
+ */
6499
+ getTeamStats(teamId: string): {
6500
+ agents: {
6501
+ total: number;
6502
+ active: number;
6503
+ idle: number;
6504
+ };
6505
+ tasks: ReturnType<TaskManager['getStats']>;
6506
+ messages: number;
6507
+ } | undefined;
6508
+ /**
6509
+ * Add event listener
6510
+ */
6511
+ addListener(listener: TeamEventListener): void;
6512
+ /**
6513
+ * Remove event listener
6514
+ */
6515
+ removeListener(listener: TeamEventListener): void;
6516
+ /**
6517
+ * Find an agent in a team
6518
+ */
6519
+ private findAgent;
6520
+ /**
6521
+ * Emit team event
6522
+ */
6523
+ private emit;
6524
+ }
6525
+ /**
6526
+ * Create a TeamOrchestrator instance
6527
+ */
6528
+ declare function createTeamOrchestrator(options: OrchestratorOptions): TeamOrchestrator;
6529
+
6530
+ /**
6531
+ * Structured Plan Types
6532
+ *
6533
+ * Types for bite-sized task plans with structured execution.
6534
+ * Supports parsing, validation, and execution of development plans.
6535
+ */
6536
+ /**
6537
+ * Step type in a task
6538
+ */
6539
+ type StepType = 'test' | 'verify' | 'implement' | 'commit' | 'review' | 'setup' | 'cleanup';
6540
+ /**
6541
+ * Plan status
6542
+ */
6543
+ type PlanStatus = 'draft' | 'ready' | 'executing' | 'paused' | 'completed' | 'failed' | 'cancelled';
6544
+ /**
6545
+ * Task step within a plan task
6546
+ */
6547
+ interface TaskStep {
6548
+ /** Step number */
6549
+ number: number;
6550
+ /** Step description */
6551
+ description: string;
6552
+ /** Step type */
6553
+ type: StepType;
6554
+ /** Code snippet (optional) */
6555
+ code?: string;
6556
+ /** Programming language for code */
6557
+ language?: string;
6558
+ /** Command to run (optional) */
6559
+ command?: string;
6560
+ /** Expected output (optional) */
6561
+ expectedOutput?: string;
6562
+ /** Whether this step is critical (failure stops execution) */
6563
+ critical?: boolean;
6564
+ /** Metadata */
6565
+ metadata?: Record<string, unknown>;
6566
+ }
6567
+ /**
6568
+ * Task files specification
6569
+ */
6570
+ interface PlanTaskFiles {
6571
+ /** Files to create */
6572
+ create?: string[];
6573
+ /** Files to modify */
6574
+ modify?: string[];
6575
+ /** Test files */
6576
+ test?: string[];
6577
+ /** Files to delete */
6578
+ delete?: string[];
6579
+ }
6580
+ /**
6581
+ * Task within a structured plan
6582
+ */
6583
+ interface PlanTask {
6584
+ /** Task ID */
6585
+ id: number;
6586
+ /** Task name */
6587
+ name: string;
6588
+ /** Task description */
6589
+ description?: string;
6590
+ /** Files involved */
6591
+ files: PlanTaskFiles;
6592
+ /** Steps to complete the task */
6593
+ steps: TaskStep[];
6594
+ /** Estimated time in minutes (target: 2-5 min) */
6595
+ estimatedMinutes?: number;
6596
+ /** Dependencies (task IDs that must complete first) */
6597
+ dependencies?: number[];
6598
+ /** Tags for categorization */
6599
+ tags?: string[];
6600
+ /** Priority (higher = more important) */
6601
+ priority?: number;
6602
+ /** Assigned agent type */
6603
+ assignee?: string;
6604
+ /** Task status */
6605
+ status?: 'pending' | 'in_progress' | 'completed' | 'failed' | 'skipped';
6606
+ /** Completion result */
6607
+ result?: PlanTaskResult;
6608
+ /** Metadata */
6609
+ metadata?: Record<string, unknown>;
6610
+ }
6611
+ /**
6612
+ * Task result after execution
6613
+ */
6614
+ interface PlanTaskResult {
6615
+ /** Whether task succeeded */
6616
+ success: boolean;
6617
+ /** Output summary */
6618
+ output: string;
6619
+ /** Files created */
6620
+ filesCreated?: string[];
6621
+ /** Files modified */
6622
+ filesModified?: string[];
6623
+ /** Errors if any */
6624
+ errors?: string[];
6625
+ /** Duration in milliseconds */
6626
+ durationMs?: number;
6627
+ /** Completion timestamp */
6628
+ completedAt: Date;
6629
+ }
6630
+ /**
6631
+ * Structured plan
6632
+ */
6633
+ interface StructuredPlan {
6634
+ /** Plan name */
6635
+ name: string;
6636
+ /** Version */
6637
+ version?: string;
6638
+ /** Goal/objective */
6639
+ goal: string;
6640
+ /** Architecture description */
6641
+ architecture?: string;
6642
+ /** Tech stack */
6643
+ techStack?: string[];
6644
+ /** Tasks in the plan */
6645
+ tasks: PlanTask[];
6646
+ /** Plan status */
6647
+ status: PlanStatus;
6648
+ /** Creation timestamp */
6649
+ createdAt: Date;
6650
+ /** Last update timestamp */
6651
+ updatedAt?: Date;
6652
+ /** Link to design document */
6653
+ designDoc?: string;
6654
+ /** Author */
6655
+ author?: string;
6656
+ /** Tags */
6657
+ tags?: string[];
6658
+ /** Metadata */
6659
+ metadata?: Record<string, unknown>;
6660
+ }
6661
+ /**
6662
+ * Validation issue
6663
+ */
6664
+ interface ValidationIssue {
6665
+ /** Issue type */
6666
+ type: 'error' | 'warning' | 'info';
6667
+ /** Issue message */
6668
+ message: string;
6669
+ /** Related task ID */
6670
+ taskId?: number;
6671
+ /** Related step number */
6672
+ stepNumber?: number;
6673
+ /** Suggestion for fix */
6674
+ suggestion?: string;
6675
+ }
6676
+ /**
6677
+ * Validation result
6678
+ */
6679
+ interface PlanValidationResult {
6680
+ /** Whether the plan is valid */
6681
+ valid: boolean;
6682
+ /** Validation issues */
6683
+ issues: ValidationIssue[];
6684
+ /** Statistics */
6685
+ stats: {
6686
+ /** Total tasks */
6687
+ totalTasks: number;
6688
+ /** Total steps */
6689
+ totalSteps: number;
6690
+ /** Estimated total time in minutes */
6691
+ estimatedMinutes: number;
6692
+ /** Tasks with tests */
6693
+ tasksWithTests: number;
6694
+ /** Tasks with commits */
6695
+ tasksWithCommits: number;
6696
+ /** Average steps per task */
6697
+ avgStepsPerTask: number;
6698
+ };
6699
+ }
6700
+ /**
6701
+ * Plan parse options
6702
+ */
6703
+ interface ParseOptions {
6704
+ /** Strict mode (fail on warnings) */
6705
+ strict?: boolean;
6706
+ /** Validate after parsing */
6707
+ validate?: boolean;
6708
+ /** Default step type */
6709
+ defaultStepType?: StepType;
6710
+ }
6711
+ /**
6712
+ * Plan generation options
6713
+ */
6714
+ interface GenerateOptions {
6715
+ /** Target task size in minutes */
6716
+ targetTaskMinutes?: number;
6717
+ /** Include tests in every task */
6718
+ includeTests?: boolean;
6719
+ /** Include commits after each task */
6720
+ includeCommits?: boolean;
6721
+ /** Tech stack to use */
6722
+ techStack?: string[];
6723
+ /** Author name */
6724
+ author?: string;
6725
+ }
6726
+ /**
6727
+ * Plan execution options
6728
+ */
6729
+ interface PlanExecutionOptions {
6730
+ /** Dry run (don't actually execute) */
6731
+ dryRun?: boolean;
6732
+ /** Stop on first error */
6733
+ stopOnError?: boolean;
6734
+ /** Parallel execution (for independent tasks) */
6735
+ parallel?: boolean;
6736
+ /** Timeout per task in milliseconds */
6737
+ taskTimeout?: number;
6738
+ /** Progress callback */
6739
+ onProgress?: (taskId: number, step: number, status: string) => void;
6740
+ /** Task complete callback */
6741
+ onTaskComplete?: (task: PlanTask, result: PlanTaskResult) => void;
6742
+ }
6743
+ /**
6744
+ * Plan execution result
6745
+ */
6746
+ interface PlanExecutionResult {
6747
+ /** Whether the plan completed successfully */
6748
+ success: boolean;
6749
+ /** Tasks that completed */
6750
+ completedTasks: number[];
6751
+ /** Tasks that failed */
6752
+ failedTasks: number[];
6753
+ /** Tasks that were skipped */
6754
+ skippedTasks: number[];
6755
+ /** Total duration in milliseconds */
6756
+ durationMs: number;
6757
+ /** Task results */
6758
+ taskResults: Map<number, PlanTaskResult>;
6759
+ /** Errors */
6760
+ errors?: string[];
6761
+ }
6762
+ /**
6763
+ * Plan event types
6764
+ */
6765
+ type PlanEvent = 'plan:created' | 'plan:updated' | 'plan:validated' | 'plan:execution_started' | 'plan:task_started' | 'plan:task_completed' | 'plan:task_failed' | 'plan:execution_completed' | 'plan:execution_failed' | 'plan:execution_cancelled' | 'plan:paused' | 'plan:resumed';
6766
+ /**
6767
+ * Plan event listener
6768
+ */
6769
+ type PlanEventListener = (event: PlanEvent, plan: StructuredPlan, task?: PlanTask, result?: PlanTaskResult) => void | Promise<void>;
6770
+
6771
+ /**
6772
+ * Plan Parser
6773
+ *
6774
+ * Parses markdown plans into structured StructuredPlan format.
6775
+ * Supports multiple plan formats and extracts tasks, steps, and metadata.
6776
+ */
6777
+
6778
+ /**
6779
+ * PlanParser - Parse markdown plans to structured format
6780
+ */
6781
+ declare class PlanParser {
6782
+ private defaultStepType;
6783
+ constructor(options?: {
6784
+ defaultStepType?: StepType;
6785
+ });
6786
+ /**
6787
+ * Parse a markdown plan into structured format
6788
+ */
6789
+ parse(markdown: string, _options?: ParseOptions): StructuredPlan;
6790
+ /**
6791
+ * Parse files from a line
6792
+ */
6793
+ private parseFiles;
6794
+ /**
6795
+ * Extract file paths from a string
6796
+ */
6797
+ private extractFilePaths;
6798
+ /**
6799
+ * Infer step type from description
6800
+ */
6801
+ private inferStepType;
6802
+ /**
6803
+ * Finalize a step
6804
+ */
6805
+ private finalizeStep;
6806
+ /**
6807
+ * Finalize a task
6808
+ */
6809
+ private finalizeTask;
6810
+ /**
6811
+ * Parse a plan file from path
6812
+ */
6813
+ parseFile(filePath: string, options?: ParseOptions): Promise<StructuredPlan>;
6814
+ }
6815
+ /**
6816
+ * Create a PlanParser instance
6817
+ */
6818
+ declare function createPlanParser(options?: {
6819
+ defaultStepType?: StepType;
6820
+ }): PlanParser;
6821
+
6822
+ /**
6823
+ * Plan Validator
6824
+ *
6825
+ * Validates structured plans for completeness, correctness, and best practices.
6826
+ */
6827
+
6828
+ /**
6829
+ * Validation options
6830
+ */
6831
+ interface ValidatorOptions {
6832
+ /** Maximum task duration in minutes */
6833
+ maxTaskMinutes?: number;
6834
+ /** Minimum task duration in minutes */
6835
+ minTaskMinutes?: number;
6836
+ /** Require tests in each task */
6837
+ requireTests?: boolean;
6838
+ /** Require commits in each task */
6839
+ requireCommits?: boolean;
6840
+ /** Maximum steps per task */
6841
+ maxStepsPerTask?: number;
6842
+ /** Minimum steps per task */
6843
+ minStepsPerTask?: number;
6844
+ /** Require file specifications */
6845
+ requireFiles?: boolean;
6846
+ /** Strict mode (treat warnings as errors) */
6847
+ strict?: boolean;
6848
+ }
6849
+ /**
6850
+ * PlanValidator - Validate structured plans
6851
+ */
6852
+ declare class PlanValidator {
6853
+ private options;
6854
+ constructor(options?: ValidatorOptions);
6855
+ /**
6856
+ * Validate a structured plan
6857
+ */
6858
+ validate(plan: StructuredPlan): PlanValidationResult;
6859
+ /**
6860
+ * Validate plan-level fields
6861
+ */
6862
+ private validatePlanFields;
6863
+ /**
6864
+ * Validate tasks
6865
+ */
6866
+ private validateTasks;
6867
+ /**
6868
+ * Validate task fields
6869
+ */
6870
+ private validateTaskFields;
6871
+ /**
6872
+ * Validate task steps
6873
+ */
6874
+ private validateTaskSteps;
6875
+ /**
6876
+ * Validate dependencies
6877
+ */
6878
+ private validateDependencies;
6879
+ /**
6880
+ * Find circular dependencies
6881
+ */
6882
+ private findCircularDependencies;
6883
+ /**
6884
+ * Calculate plan statistics
6885
+ */
6886
+ private calculateStats;
6887
+ /**
6888
+ * Quick validation check (just returns valid/invalid)
6889
+ */
6890
+ isValid(plan: StructuredPlan): boolean;
6891
+ /**
6892
+ * Get errors only
6893
+ */
6894
+ getErrors(plan: StructuredPlan): ValidationIssue[];
6895
+ /**
6896
+ * Get warnings only
6897
+ */
6898
+ getWarnings(plan: StructuredPlan): ValidationIssue[];
6899
+ }
6900
+ /**
6901
+ * Create a PlanValidator instance
6902
+ */
6903
+ declare function createPlanValidator(options?: ValidatorOptions): PlanValidator;
6904
+ /**
6905
+ * Quick validation helper
6906
+ */
6907
+ declare function validatePlan(plan: StructuredPlan, options?: ValidatorOptions): PlanValidationResult;
6908
+
6909
+ /**
6910
+ * Plan Generator
6911
+ *
6912
+ * Generates structured plans and converts them to markdown format.
6913
+ */
6914
+
6915
+ /**
6916
+ * Task template for common patterns
6917
+ */
6918
+ interface TaskTemplate {
6919
+ name: string;
6920
+ description: string;
6921
+ steps: Array<{
6922
+ type: StepType;
6923
+ description: string;
6924
+ code?: string;
6925
+ command?: string;
6926
+ }>;
6927
+ estimatedMinutes: number;
6928
+ }
6929
+ /**
6930
+ * Common task templates
6931
+ */
6932
+ declare const TASK_TEMPLATES: Record<string, TaskTemplate>;
6933
+ /**
6934
+ * PlanGenerator - Generate and format structured plans
6935
+ */
6936
+ declare class PlanGenerator {
6937
+ private options;
6938
+ constructor(options?: GenerateOptions);
6939
+ /**
6940
+ * Create a new empty plan
6941
+ */
6942
+ createPlan(name: string, goal: string): StructuredPlan;
6943
+ /**
6944
+ * Add a task to a plan
6945
+ */
6946
+ addTask(plan: StructuredPlan, name: string, options?: {
6947
+ description?: string;
6948
+ files?: PlanTaskFiles;
6949
+ steps?: Partial<TaskStep>[];
6950
+ estimatedMinutes?: number;
6951
+ dependencies?: number[];
6952
+ tags?: string[];
6953
+ priority?: number;
6954
+ }): PlanTask;
6955
+ /**
6956
+ * Add a task from a template
6957
+ */
6958
+ addTaskFromTemplate(plan: StructuredPlan, templateName: keyof typeof TASK_TEMPLATES | string, customization?: {
6959
+ name?: string;
6960
+ description?: string;
6961
+ files?: PlanTaskFiles;
6962
+ dependencies?: number[];
6963
+ tags?: string[];
6964
+ }): PlanTask | undefined;
6965
+ /**
6966
+ * Generate markdown from a structured plan
6967
+ */
6968
+ toMarkdown(plan: StructuredPlan): string;
6969
+ /**
6970
+ * Generate a plan from a simple task list
6971
+ */
6972
+ fromTaskList(name: string, goal: string, taskNames: string[], options?: {
6973
+ architecture?: string;
6974
+ techStack?: string[];
6975
+ template?: keyof typeof TASK_TEMPLATES;
6976
+ }): StructuredPlan;
6977
+ /**
6978
+ * Clone a plan
6979
+ */
6980
+ clonePlan(plan: StructuredPlan, newName?: string): StructuredPlan;
6981
+ /**
6982
+ * Merge two plans
6983
+ */
6984
+ mergePlans(plan1: StructuredPlan, plan2: StructuredPlan, newName?: string): StructuredPlan;
6985
+ }
6986
+ /**
6987
+ * Create a PlanGenerator instance
6988
+ */
6989
+ declare function createPlanGenerator(options?: GenerateOptions): PlanGenerator;
6990
+
6991
+ /**
6992
+ * Plan Executor
6993
+ *
6994
+ * Executes structured plans with progress tracking and event handling.
6995
+ */
6996
+
6997
+ /**
6998
+ * Step executor function type
6999
+ */
7000
+ type StepExecutor = (step: TaskStep, task: PlanTask, plan: StructuredPlan) => Promise<{
7001
+ success: boolean;
7002
+ output: string;
7003
+ error?: string;
7004
+ }>;
7005
+ /**
7006
+ * PlanExecutor - Execute structured plans
7007
+ */
7008
+ declare class PlanExecutor {
7009
+ private listeners;
7010
+ private stepExecutor?;
7011
+ private abortController?;
7012
+ private isPaused;
7013
+ private resumePromise?;
7014
+ private resumeResolve?;
7015
+ constructor(options?: {
7016
+ stepExecutor?: StepExecutor;
7017
+ });
7018
+ /**
7019
+ * Set the step executor
7020
+ */
7021
+ setStepExecutor(executor: StepExecutor): void;
7022
+ /**
7023
+ * Execute a plan
7024
+ */
7025
+ execute(plan: StructuredPlan, options?: PlanExecutionOptions): Promise<PlanExecutionResult>;
7026
+ /**
7027
+ * Execute a single task
7028
+ */
7029
+ private executeTask;
7030
+ /**
7031
+ * Execute with timeout
7032
+ */
7033
+ private executeWithTimeout;
7034
+ /**
7035
+ * Build dependency graph
7036
+ */
7037
+ private buildDependencyGraph;
7038
+ /**
7039
+ * Get execution order using topological sort
7040
+ */
7041
+ private getExecutionOrder;
7042
+ /**
7043
+ * Check if dependencies are completed
7044
+ */
7045
+ private checkDependencies;
7046
+ /**
7047
+ * Pause execution
7048
+ */
7049
+ pause(): void;
7050
+ /**
7051
+ * Resume execution
7052
+ */
7053
+ resume(): void;
7054
+ /**
7055
+ * Cancel execution
7056
+ */
7057
+ cancel(): void;
7058
+ /**
7059
+ * Wait if paused
7060
+ */
7061
+ private waitIfPaused;
7062
+ /**
7063
+ * Add event listener
7064
+ */
7065
+ addListener(listener: PlanEventListener): void;
7066
+ /**
7067
+ * Remove event listener
7068
+ */
7069
+ removeListener(listener: PlanEventListener): void;
7070
+ /**
7071
+ * Emit event
7072
+ */
7073
+ private emit;
7074
+ /**
7075
+ * Check if currently executing
7076
+ */
7077
+ isExecuting(): boolean;
7078
+ /**
7079
+ * Check if paused
7080
+ */
7081
+ isPausedState(): boolean;
7082
+ }
7083
+ /**
7084
+ * Create a PlanExecutor instance
7085
+ */
7086
+ declare function createPlanExecutor(options?: {
7087
+ stepExecutor?: StepExecutor;
7088
+ }): PlanExecutor;
7089
+ /**
7090
+ * Default step executor (dry run)
7091
+ */
7092
+ declare const dryRunExecutor: StepExecutor;
7093
+ /**
7094
+ * Shell step executor (runs commands)
7095
+ */
7096
+ declare const shellExecutor: StepExecutor;
7097
+
7098
+ /**
7099
+ * Command Types
7100
+ *
7101
+ * Type definitions for slash commands and agent integration.
7102
+ */
7103
+
7104
+ /**
7105
+ * Command argument definition
7106
+ */
7107
+ interface CommandArg {
7108
+ /** Argument name */
7109
+ name: string;
7110
+ /** Argument description */
7111
+ description: string;
7112
+ /** Whether the argument is required */
7113
+ required?: boolean;
7114
+ /** Default value */
7115
+ default?: string;
7116
+ /** Argument type */
7117
+ type?: 'string' | 'number' | 'boolean' | 'file' | 'choice';
7118
+ /** Valid choices (for type: 'choice') */
7119
+ choices?: string[];
7120
+ /** Validation pattern (regex) */
7121
+ pattern?: string;
7122
+ }
7123
+ /**
7124
+ * Slash command definition
7125
+ */
7126
+ interface SlashCommand {
7127
+ /** Command name (without slash) */
7128
+ name: string;
7129
+ /** Command description */
7130
+ description: string;
7131
+ /** Skill to invoke when command is executed */
7132
+ skill: string;
7133
+ /** Alternative names for the command */
7134
+ aliases?: string[];
7135
+ /** Whether to disable model invocation (user-only) */
7136
+ disableModelInvocation?: boolean;
7137
+ /** Command arguments */
7138
+ args?: CommandArg[];
7139
+ /** Category for grouping */
7140
+ category?: string;
7141
+ /** Usage examples */
7142
+ examples?: string[];
7143
+ /** Tags for filtering */
7144
+ tags?: string[];
7145
+ /** Priority for ordering */
7146
+ priority?: number;
7147
+ /** Whether the command is hidden from help */
7148
+ hidden?: boolean;
7149
+ /** Metadata */
7150
+ metadata?: Record<string, unknown>;
7151
+ }
7152
+ /**
7153
+ * Command execution context
7154
+ */
7155
+ interface CommandContext {
7156
+ /** The command being executed */
7157
+ command: SlashCommand;
7158
+ /** Parsed arguments */
7159
+ args: Record<string, unknown>;
7160
+ /** Agent executing the command */
7161
+ agent: AgentType;
7162
+ /** Working directory */
7163
+ cwd: string;
7164
+ /** Environment variables */
7165
+ env?: Record<string, string>;
7166
+ /** Additional context */
7167
+ metadata?: Record<string, unknown>;
7168
+ }
7169
+ /**
7170
+ * Command execution result
7171
+ */
7172
+ interface SlashCommandResult {
7173
+ /** Whether execution succeeded */
7174
+ success: boolean;
7175
+ /** Output message */
7176
+ output?: string;
7177
+ /** Error message if failed */
7178
+ error?: string;
7179
+ /** Data returned by the command */
7180
+ data?: unknown;
7181
+ /** Duration in milliseconds */
7182
+ durationMs?: number;
7183
+ }
7184
+ /**
7185
+ * Command handler function
7186
+ */
7187
+ type CommandHandler = (context: CommandContext) => Promise<SlashCommandResult>;
7188
+ /**
7189
+ * Registered command with handler
7190
+ */
7191
+ interface RegisteredCommand extends SlashCommand {
7192
+ /** Command handler function */
7193
+ handler?: CommandHandler;
7194
+ /** Whether the command is enabled */
7195
+ enabled: boolean;
7196
+ /** Source of the command (plugin, skill, etc.) */
7197
+ source?: string;
7198
+ }
7199
+ /**
7200
+ * Command registry options
7201
+ */
7202
+ interface CommandRegistryOptions {
7203
+ /** Allow command overrides */
7204
+ allowOverrides?: boolean;
7205
+ /** Validate commands on registration */
7206
+ validateOnRegister?: boolean;
7207
+ /** Default handler for commands without one */
7208
+ defaultHandler?: CommandHandler;
7209
+ }
7210
+ /**
7211
+ * Command generator options
7212
+ */
7213
+ interface CommandGeneratorOptions {
7214
+ /** Target agent */
7215
+ agent: AgentType;
7216
+ /** Include hidden commands */
7217
+ includeHidden?: boolean;
7218
+ /** Include disabled commands */
7219
+ includeDisabled?: boolean;
7220
+ /** Output format */
7221
+ format?: 'markdown' | 'json' | 'native';
7222
+ /** Custom template */
7223
+ template?: string;
7224
+ }
7225
+ /**
7226
+ * Command search options
7227
+ */
7228
+ interface CommandSearchOptions {
7229
+ /** Search query */
7230
+ query?: string;
7231
+ /** Filter by category */
7232
+ category?: string;
7233
+ /** Filter by tags */
7234
+ tags?: string[];
7235
+ /** Include hidden commands */
7236
+ includeHidden?: boolean;
7237
+ /** Include disabled commands */
7238
+ includeDisabled?: boolean;
7239
+ /** Maximum results */
7240
+ limit?: number;
7241
+ }
7242
+ /**
7243
+ * Command validation result
7244
+ */
7245
+ interface CommandValidationResult {
7246
+ /** Whether the command is valid */
7247
+ valid: boolean;
7248
+ /** Validation errors */
7249
+ errors: string[];
7250
+ /** Validation warnings */
7251
+ warnings: string[];
7252
+ }
7253
+ /**
7254
+ * Agent command format
7255
+ */
7256
+ interface AgentCommandFormat {
7257
+ /** Agent type */
7258
+ agent: AgentType;
7259
+ /** File extension */
7260
+ extension: string;
7261
+ /** Directory for commands */
7262
+ directory: string;
7263
+ /** Whether agent supports slash commands */
7264
+ supportsSlashCommands: boolean;
7265
+ /** Whether agent supports command files */
7266
+ supportsCommandFiles: boolean;
7267
+ /** Template for generating commands */
7268
+ template?: string;
7269
+ }
7270
+ /**
7271
+ * Command event types
7272
+ */
7273
+ type CommandEvent = 'command:registered' | 'command:unregistered' | 'command:enabled' | 'command:disabled' | 'command:executed' | 'command:failed';
7274
+ /**
7275
+ * Command event listener
7276
+ */
7277
+ type CommandEventListener = (event: CommandEvent, command: RegisteredCommand, result?: SlashCommandResult) => void;
7278
+ /**
7279
+ * Command import/export format
7280
+ */
7281
+ interface CommandBundle {
7282
+ /** Bundle version */
7283
+ version: string;
7284
+ /** Commands in the bundle */
7285
+ commands: SlashCommand[];
7286
+ /** Bundle metadata */
7287
+ metadata?: {
7288
+ name?: string;
7289
+ description?: string;
7290
+ author?: string;
7291
+ createdAt?: Date;
7292
+ };
7293
+ }
7294
+
7295
+ /**
7296
+ * Command Registry
7297
+ *
7298
+ * Central registry for managing slash commands.
7299
+ */
7300
+
7301
+ /**
7302
+ * CommandRegistry - Central registry for slash commands
7303
+ */
7304
+ declare class CommandRegistry {
7305
+ private commands;
7306
+ private aliases;
7307
+ private listeners;
7308
+ private options;
7309
+ constructor(options?: CommandRegistryOptions);
7310
+ /**
7311
+ * Register a command
7312
+ */
7313
+ register(command: SlashCommand, handler?: CommandHandler, source?: string): void;
7314
+ /**
7315
+ * Register multiple commands
7316
+ */
7317
+ registerAll(commands: SlashCommand[], handler?: CommandHandler, source?: string): void;
7318
+ /**
7319
+ * Unregister a command
7320
+ */
7321
+ unregister(name: string): boolean;
7322
+ /**
7323
+ * Get a command by name or alias
7324
+ */
7325
+ get(name: string): RegisteredCommand | undefined;
7326
+ /**
7327
+ * Check if a command exists
7328
+ */
7329
+ has(name: string): boolean;
7330
+ /**
7331
+ * Get all registered commands
7332
+ */
7333
+ getAll(includeDisabled?: boolean): RegisteredCommand[];
7334
+ /**
7335
+ * Search commands
7336
+ */
7337
+ search(options?: CommandSearchOptions): RegisteredCommand[];
7338
+ /**
7339
+ * Enable a command
7340
+ */
7341
+ enable(name: string): boolean;
7342
+ /**
7343
+ * Disable a command
7344
+ */
7345
+ disable(name: string): boolean;
7346
+ /**
7347
+ * Execute a command
7348
+ */
7349
+ execute(name: string, context: Omit<CommandContext, 'command'>): Promise<SlashCommandResult>;
7350
+ /**
7351
+ * Validate a command
7352
+ */
7353
+ validate(command: SlashCommand): CommandValidationResult;
7354
+ /**
7355
+ * Get categories
7356
+ */
7357
+ getCategories(): string[];
7358
+ /**
7359
+ * Get commands by category
7360
+ */
7361
+ getByCategory(category: string): RegisteredCommand[];
7362
+ /**
7363
+ * Export commands to bundle
7364
+ */
7365
+ export(includeDisabled?: boolean): CommandBundle;
7366
+ /**
7367
+ * Import commands from bundle
7368
+ */
7369
+ import(bundle: CommandBundle, handler?: CommandHandler, source?: string): number;
7370
+ /**
7371
+ * Clear all commands
7372
+ */
7373
+ clear(): void;
7374
+ /**
7375
+ * Get command count
7376
+ */
7377
+ get size(): number;
7378
+ /**
7379
+ * Add event listener
7380
+ */
7381
+ addListener(listener: CommandEventListener): void;
7382
+ /**
7383
+ * Remove event listener
7384
+ */
7385
+ removeListener(listener: CommandEventListener): void;
7386
+ /**
7387
+ * Emit event
7388
+ */
7389
+ private emit;
7390
+ }
7391
+ /**
7392
+ * Create a CommandRegistry instance
7393
+ */
7394
+ declare function createCommandRegistry(options?: CommandRegistryOptions): CommandRegistry;
7395
+
7396
+ /**
7397
+ * Command Generator
7398
+ *
7399
+ * Generates agent-specific slash commands from skills.
7400
+ */
7401
+
7402
+ /**
7403
+ * CommandGenerator - Generate agent-specific commands
7404
+ */
7405
+ declare class CommandGenerator {
7406
+ private options;
7407
+ constructor(options?: Partial<CommandGeneratorOptions>);
7408
+ /**
7409
+ * Get agent command format
7410
+ */
7411
+ getAgentFormat(agent: AgentType): AgentCommandFormat;
7412
+ /**
7413
+ * Generate command from skill
7414
+ */
7415
+ fromSkill(skill: CanonicalSkill, commandName?: string): SlashCommand;
7416
+ /**
7417
+ * Generate commands from multiple skills
7418
+ */
7419
+ fromSkills(skills: CanonicalSkill[]): SlashCommand[];
7420
+ /**
7421
+ * Generate Claude Code command file
7422
+ */
7423
+ generateClaudeCommand(command: SlashCommand | RegisteredCommand): string;
7424
+ /**
7425
+ * Generate Claude Code commands
7426
+ */
7427
+ generateClaudeCommands(commands: (SlashCommand | RegisteredCommand)[]): Map<string, string>;
7428
+ /**
7429
+ * Generate Cursor rules with @-mention syntax
7430
+ */
7431
+ generateCursorRules(commands: (SlashCommand | RegisteredCommand)[]): string;
7432
+ /**
7433
+ * Generate OpenCode commands
7434
+ */
7435
+ generateOpenCodeCommands(commands: (SlashCommand | RegisteredCommand)[]): Map<string, string>;
7436
+ /**
7437
+ * Generate Copilot commands (agent skills format)
7438
+ */
7439
+ generateCopilotCommands(commands: (SlashCommand | RegisteredCommand)[]): Map<string, string>;
7440
+ /**
7441
+ * Generate commands for any agent
7442
+ */
7443
+ generate(commands: (SlashCommand | RegisteredCommand)[], agent: AgentType): Map<string, string> | string;
7444
+ /**
7445
+ * Generate JSON manifest of commands
7446
+ */
7447
+ generateManifest(commands: (SlashCommand | RegisteredCommand)[]): string;
7448
+ /**
7449
+ * Check if command should be included
7450
+ */
7451
+ private shouldInclude;
7452
+ /**
7453
+ * Slugify a string for command name
7454
+ */
7455
+ private slugify;
7456
+ /**
7457
+ * Infer category from skill
7458
+ */
7459
+ private inferCategory;
7460
+ /**
7461
+ * Generate usage examples
7462
+ */
7463
+ private generateExamples;
7464
+ }
7465
+ /**
7466
+ * Create a CommandGenerator instance
7467
+ */
7468
+ declare function createCommandGenerator(options?: Partial<CommandGeneratorOptions>): CommandGenerator;
7469
+ /**
7470
+ * Get agent format info
7471
+ */
7472
+ declare function getAgentFormat(agent: AgentType): AgentCommandFormat;
7473
+ /**
7474
+ * Check if agent supports slash commands
7475
+ */
7476
+ declare function supportsSlashCommands(agent: AgentType): boolean;
7477
+
7478
+ interface AIProvider {
7479
+ name: string;
7480
+ search(query: string, skills: SearchableSkill[]): Promise<AISearchResult[]>;
7481
+ generateSkill(example: SkillExample): Promise<GeneratedSkill>;
7482
+ }
7483
+ interface SearchableSkill {
7484
+ name: string;
7485
+ description?: string;
7486
+ content: string;
7487
+ tags?: string[];
7488
+ source?: string;
7489
+ }
7490
+ interface AISearchResult {
7491
+ skill: SearchableSkill;
7492
+ relevance: number;
7493
+ reasoning: string;
7494
+ }
7495
+ interface SkillExample {
7496
+ description: string;
7497
+ context?: string;
7498
+ codeExamples?: string[];
7499
+ expectedBehavior?: string;
7500
+ targetAgent?: string;
7501
+ }
7502
+ interface GeneratedSkill {
7503
+ name: string;
7504
+ description: string;
7505
+ content: string;
7506
+ tags: string[];
7507
+ confidence: number;
7508
+ reasoning: string;
7509
+ }
7510
+ interface AIConfig {
7511
+ provider: 'anthropic' | 'openai' | 'none';
7512
+ apiKey?: string;
7513
+ model?: string;
7514
+ maxTokens?: number;
7515
+ temperature?: number;
7516
+ }
7517
+ interface AISearchOptions {
7518
+ limit?: number;
7519
+ minRelevance?: number;
7520
+ includeReasoning?: boolean;
7521
+ }
7522
+ interface AIGenerateOptions {
7523
+ targetAgent?: string;
7524
+ includeTests?: boolean;
7525
+ includeDocumentation?: boolean;
7526
+ }
7527
+
7528
+ declare class AISearch {
7529
+ private provider;
7530
+ constructor(provider: AIProvider);
7531
+ search(query: string, skills: SearchableSkill[], options?: AISearchOptions): Promise<AISearchResult[]>;
7532
+ searchByIntent(intent: string, skills: SearchableSkill[], options?: AISearchOptions): Promise<AISearchResult[]>;
7533
+ findSimilar(skill: SearchableSkill, allSkills: SearchableSkill[], options?: AISearchOptions): Promise<AISearchResult[]>;
7534
+ }
7535
+
7536
+ declare class AISkillGenerator {
7537
+ private provider;
7538
+ constructor(provider: AIProvider);
7539
+ generate(example: SkillExample, options?: AIGenerateOptions): Promise<GeneratedSkill>;
7540
+ generateFromCode(code: string, description: string, options?: AIGenerateOptions): Promise<GeneratedSkill>;
7541
+ generateFromTemplate(templateName: string, variables: Record<string, string>, options?: AIGenerateOptions): Promise<GeneratedSkill>;
7542
+ private addAgentMetadata;
7543
+ validateGenerated(skill: GeneratedSkill): {
7544
+ valid: boolean;
7545
+ errors: string[];
7546
+ };
7547
+ }
7548
+
7549
+ declare class AIManager {
7550
+ private config;
7551
+ private provider;
7552
+ private search;
7553
+ private generator;
7554
+ constructor(config: AIConfig);
7555
+ searchSkills(query: string, skills: SearchableSkill[], options?: AISearchOptions): Promise<AISearchResult[]>;
7556
+ searchByIntent(intent: string, skills: SearchableSkill[], options?: AISearchOptions): Promise<AISearchResult[]>;
7557
+ findSimilar(skill: SearchableSkill, allSkills: SearchableSkill[], options?: AISearchOptions): Promise<AISearchResult[]>;
7558
+ generateSkill(example: SkillExample, options?: AIGenerateOptions): Promise<GeneratedSkill>;
7559
+ generateFromCode(code: string, description: string, options?: AIGenerateOptions): Promise<GeneratedSkill>;
7560
+ generateFromTemplate(templateName: string, variables: Record<string, string>, options?: AIGenerateOptions): Promise<GeneratedSkill>;
7561
+ validateGenerated(skill: GeneratedSkill): {
7562
+ valid: boolean;
7563
+ errors: string[];
7564
+ };
7565
+ private createProvider;
7566
+ getProviderName(): string;
7567
+ updateConfig(config: Partial<AIConfig>): void;
7568
+ }
7569
+
7570
+ declare abstract class BaseAIProvider implements AIProvider {
7571
+ abstract name: string;
7572
+ abstract search(query: string, skills: SearchableSkill[]): Promise<AISearchResult[]>;
7573
+ abstract generateSkill(example: SkillExample): Promise<GeneratedSkill>;
7574
+ protected buildSearchPrompt(query: string, skills: SearchableSkill[]): string;
7575
+ protected buildGeneratePrompt(example: SkillExample): string;
7576
+ protected parseSearchResponse(response: string, skills: SearchableSkill[]): AISearchResult[];
7577
+ protected parseGenerateResponse(response: string): GeneratedSkill;
7578
+ }
7579
+
7580
+ declare class MockAIProvider extends BaseAIProvider {
7581
+ name: string;
7582
+ search(query: string, skills: SearchableSkill[]): Promise<AISearchResult[]>;
7583
+ generateSkill(example: SkillExample): Promise<GeneratedSkill>;
7584
+ private buildReasoning;
7585
+ private generateName;
7586
+ private generateTags;
7587
+ private generateContent;
7588
+ }
7589
+
7590
+ type AuditEventType = 'skill.install' | 'skill.uninstall' | 'skill.sync' | 'skill.translate' | 'skill.execute' | 'team.create' | 'team.share' | 'team.import' | 'team.sync' | 'bundle.create' | 'bundle.export' | 'bundle.import' | 'plugin.install' | 'plugin.uninstall' | 'plugin.enable' | 'plugin.disable' | 'workflow.execute' | 'ai.search' | 'ai.generate';
7591
+ interface AuditEvent {
7592
+ id: string;
7593
+ timestamp: Date;
7594
+ type: AuditEventType;
7595
+ user?: string;
7596
+ action: string;
7597
+ resource: string;
7598
+ details?: Record<string, unknown>;
7599
+ success: boolean;
7600
+ error?: string;
7601
+ duration?: number;
7602
+ }
7603
+ interface AuditQuery {
7604
+ types?: AuditEventType[];
7605
+ user?: string;
7606
+ resource?: string;
7607
+ startDate?: Date;
7608
+ endDate?: Date;
7609
+ success?: boolean;
7610
+ limit?: number;
7611
+ offset?: number;
7612
+ }
7613
+ interface AuditStats {
7614
+ totalEvents: number;
7615
+ successRate: number;
7616
+ eventsByType: Record<AuditEventType, number>;
7617
+ recentErrors: AuditEvent[];
7618
+ topResources: Array<{
7619
+ resource: string;
7620
+ count: number;
7621
+ }>;
7622
+ }
7623
+ interface AuditExportOptions {
7624
+ format: 'json' | 'csv' | 'text';
7625
+ query?: AuditQuery;
7626
+ }
7627
+
7628
+ declare class AuditLogger {
7629
+ private logFile;
7630
+ private buffer;
7631
+ private flushInterval;
7632
+ private flushing;
7633
+ constructor(logDir: string);
7634
+ log(type: AuditEventType, action: string, resource: string, details?: Record<string, unknown>, success?: boolean, error?: string, duration?: number): Promise<void>;
7635
+ query(query?: AuditQuery): Promise<AuditEvent[]>;
7636
+ stats(): Promise<AuditStats>;
7637
+ export(options: AuditExportOptions): Promise<string>;
7638
+ clear(olderThan?: Date): Promise<number>;
7639
+ flush(): Promise<void>;
7640
+ private doFlush;
7641
+ destroy(): Promise<void>;
7642
+ private startAutoFlush;
7643
+ private loadEvents;
7644
+ private saveEvents;
7645
+ private filterEvents;
7646
+ private generateId;
7647
+ private toCsv;
7648
+ private toText;
7649
+ }
7650
+
7651
+ export { AGENT_CLI_CONFIGS, AGENT_FORMAT_MAP, type AIConfig, type AIGenerateOptions, AIManager, type AIProvider, AISearch, type AISearchOptions, type AISearchResult, AISkillGenerator, APIBasedCompressor, type APICompressionConfig, type ActivatedSkill, type AgentAdapterInfo, type AgentCLIConfig, type AgentCommandFormat, AgentConfig, type AgentExecutionResult, type AgentHookFormat, type AgentInstance, type AgentStatus, AgentType, type AssertionResult, type AuditEvent, type AuditEventType, type AuditExportOptions, AuditLogger, type AuditQuery, type AuditStats, BaseAIProvider, BitbucketProvider, type BundleManifest, CIRCLECI_CONFIG_TEMPLATE, CONTEXT_DIR, CONTEXT_FILE, type CanonicalSkill, type CheckpointHandler, type CheckpointResponse, type CloneOptions, type CloneResult, 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 CompressedLearning, type CompressionEngine, type CompressionOptions, type CompressionResult, type ContextCategory, type ContextExportOptions, type ContextImportOptions, type ContextLoadOptions, ContextLoader, ContextManager, ContextSync, type ContextSyncOptions, CopilotTranslator, type CurrentExecution, CursorTranslator, DEFAULT_CACHE_TTL, DEFAULT_CONTEXT_CATEGORIES, DEFAULT_MEMORY_CONFIG, DEFAULT_SCORING_WEIGHTS, DEFAULT_SKILL_SOURCES, DependencyInfo, Detection, type DetectionSource, type DiscoveredSkill, type ExecutableSkill, type ExecutableTask, type ExecutableTaskType, type ExecutionHistory, type ExecutionOptions, type ExecutionProgressCallback, type ExecutionProgressEvent, type ExecutionStrategy, type ExecutionTaskStatus, type FormatCategory, type FormatTranslator, type FreshnessResult, GITHUB_ACTION_TEMPLATE, GITLAB_CI_TEMPLATE, type GenerateOptions, type GeneratedSkill, GitHubProvider, GitLabProvider, GitProvider, type GitProviderAdapter, type HookConfig, type HookContext, type HookError, type HookEvent, type HookEventListener, HookManager, type HookManagerOptions, type HookTriggerResult, INDEX_CACHE_HOURS, INDEX_PATH, type ImportOptions, type IndexSource, type InjectedMemory, type InjectionMode, type InjectionOptions, type InjectionResult, type InstallOptions, type InstallResult, type InstalledPackInfo, type InstalledSkillInfo, type IssueSeverity, KNOWN_SKILL_REPOS, type Learning, LearningConsolidator, LearningStore, type LearningStoreData, type LoadedContext, LocalProvider, MARKETPLACE_CACHE_FILE, 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 ObservableEvent, type ObservableEventType, type Observation, type ObservationContent, ObservationStore, type ObservationStoreData, type ObservationType, type OrchestratorOptions, type OrchestratorTaskStatus, type OrchestratorTeamConfig, PRE_COMMIT_CONFIG_TEMPLATE, PRE_COMMIT_HOOK_TEMPLATE, PROJECT_TYPE_HINTS, type ParseOptions, 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, ProjectContext, ProjectDetector, ProjectPatterns, type ProjectProfile, ProjectStack, type ProviderPlugin, type RecommendOptions, RecommendationEngine, type RecommendationResult, type RegisteredCommand, type RegistrySkill, type ReviewIssue, type ReviewResult, type ReviewStage, type ReviewStageName, RuleBasedCompressor, SESSION_FILE, SKILL_DISCOVERY_PATHS, type ScoredSkill, type ScoringWeights, type SearchOptions, type SearchResult, type SearchableSkill, type SessionDecision, SessionManager, type SessionState, type SessionTask, type ShareOptions, type SharedSkill, Skill, SkillBundle, type SkillExample, SkillExecutionEngine, type SkillExecutionEvent, type SkillExecutionResult, type SkillExecutor, type SkillExecutorOptions, SkillFrontmatter, type SkillHook, type SkillIndex, SkillLocation, SkillMdTranslator, SkillMetadata, SkillPreferences, type SkillSource, SkillSummary, type SkillTestCase, type SkillTestSuite, SkillTriggerEngine, SkillkitConfig, type SlashCommand, type SlashCommandResult, type StepExecutor, type StepType, type StructuredPlan, type SyncOptions, type SyncReport, type SyncResult, TAG_TO_TECH, TASK_TEMPLATES, 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, type TriggerEngineOptions, type UpdateOptions, type ValidationError, type ValidationIssue, type ValidationResult, type ValidationWarning, type ValidatorOptions, type VerificationRule, WORKFLOWS_DIR, WORKFLOW_EXTENSION, type WaveExecutionStatus, WindsurfTranslator, type Workflow, type WorkflowExecution, type WorkflowExecutionStatus, WorkflowOrchestrator, type WorkflowProgressCallback, type WorkflowSkill, type WorkflowWave, analyzeProject, buildSkillIndex, canTranslate, copilotTranslator, createAPIBasedCompressor, createCommandGenerator, createCommandRegistry, createContextLoader, createContextManager, createContextSync, createExecutionEngine, createHookManager, createMarketplaceAggregator, createMemoryCompressor, createMemoryEnabledEngine, createMemoryInjector, createMemoryObserver, createMessageBus, createMethodologyLoader, createMethodologyManager, createPlanExecutor, createPlanGenerator, createPlanParser, createPlanValidator, createPluginManager, createRecommendationEngine, createRuleBasedCompressor, createSessionManager, createSimulatedSkillExecutor, createSkillBundle, createSkillExecutor, createTaskManager, createTeamManager, createTeamOrchestrator, createTestSuiteFromFrontmatter, createTriggerEngine, createWorkflowOrchestrator, createWorkflowTemplate, cursorTranslator, detectProvider, detectSkillFormat, discoverSkills, dryRunExecutor, estimateTokens, executeWithAgent, exportBundle, extractField, extractFrontmatter, extractSkillMetadata, fetchSkillsFromRepo, findAllSkills, findSkill, formatSkillAsPrompt, getAgentCLIConfig, getAgentConfigPath, getAgentFormat, getAllProviders, getAvailableCLIAgents, getBuiltinPacksDir, getCICDTemplate, getExecutionStrategy, getGlobalConfigPath, getIndexStatus, getInstallDir, getManualExecutionInstructions, getMemoryPaths, getMemoryStatus, getProjectConfigPath, getProvider, getSearchDirs, getStackTags, getSupportedTranslationAgents, getTechTags, globalMemoryDirectoryExists, importBundle, initContext, initProject, initializeMemoryDirectory, isAgentCLIAvailable, isGitUrl, isIndexStale, isLocalPath, isPathInside, listCICDTemplates, listWorkflows, loadConfig, loadContext, loadIndex, loadMetadata, loadPlugin, loadPluginsFromDirectory, loadSkillMetadata, loadWorkflow, loadWorkflowByName, memoryDirectoryExists, parseShorthand, parseSkill, parseSkillContent, parseSource, parseWorkflow, readSkillContent, runTestSuite, saveConfig, saveIndex, saveSkillMetadata, saveWorkflow, serializeWorkflow, setSkillEnabled, shellExecutor, skillMdTranslator, supportsSlashCommands, syncToAgent, syncToAllAgents, translateSkill, translateSkillFile, translatorRegistry, validateBuiltinPacks, validatePackDirectory, validatePackManifest, validatePlan, validateSkill, validateSkillContent, validateWorkflow, windsurfTranslator, wrapProgressCallbackWithMemory };