@skillkit/core 1.10.0 → 1.11.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 +42 -1
- package/dist/index.js +148 -37
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -10703,4 +10703,45 @@ declare class HybridSearchPipeline {
|
|
|
10703
10703
|
declare function createHybridSearchPipeline(config?: Partial<LocalModelConfig>): HybridSearchPipeline;
|
|
10704
10704
|
declare function hybridSearch(skills: SkillSummary[], query: string, options?: Partial<HybridSearchOptions>): Promise<HybridSearchResponse>;
|
|
10705
10705
|
|
|
10706
|
-
export { AGENT_CLI_CONFIGS, AGENT_CONFIG, AGENT_DISCOVERY_PATHS, AGENT_FORMAT_MAP, AGENT_INSTRUCTION_TEMPLATES, AGENT_SKILL_FORMATS, type AIConfig, type AIGenerateOptions, AIManager, type AIProvider, AISearch, type AISearchOptions, type AISearchResult, AISkillGenerator, ALL_AGENT_DISCOVERY_PATHS, APIBasedCompressor, type APICompressionConfig, type ActivatedSkill, type AdvancedScore, type AgentAdapterInfo, type AgentCLIConfig, type AgentCommandFormat, AgentConfig, type AgentDirectoryConfig, type AgentExecutionResult, type AgentFormatCategory, AgentFrontmatter, AgentHook, type AgentHookFormat, type AgentInstance, type AgentInstructionTemplate, AgentLocation, AgentMetadata, AgentPermissionMode, type AgentPipeline, type AgentSkillFormat, type AgentStatus, type AgentTranslationOptions, type AgentTranslationResult, AgentType, type AssertionResult, type AuditEvent, type AuditEventType, type AuditExportOptions, AuditLogger, type AuditQuery, type AuditStats, BUILTIN_PIPELINES, BaseAIProvider, type BenchmarkResult, BitbucketProvider, type BundleManifest, CATEGORY_RELEVANCE_PROMPT, CATEGORY_TAXONOMY, CIConfig, CIRCLECI_CONFIG_TEMPLATE, CONTEXT_DIR, CONTEXT_FILE, CUSTOM_AGENT_FORMAT_MAP, type CanonicalAgent, type CanonicalSkill, type CategoryMapping, type CategoryScore, type CategoryStats, type CheckpointHandler, type CheckpointResponse, type ClarityScore, type CloneOptions, type CloneResult, CodeConvention, type CommandArg, type CommandBundle, type CommandContext, type CommandEvent, type CommandEventListener, CommandGenerator, type CommandGeneratorOptions, type CommandHandler, type CommandPlugin, CommandRegistry, type CommandRegistryOptions, type CommandResult, type CommandSearchOptions, type CommandValidationResult, type CompletenessResult, type CompressedLearning, type CompressionEngine, type CompressionOptions, type CompressionResult, type ConnectorAnalysis, type ConnectorCategory, ConnectorCategorySchema, type ConnectorConfig, ConnectorConfigSchema, type ConnectorMapping, ConnectorMappingSchema, type ConnectorPlaceholder, ConnectorPlaceholderSchema, type ContextCategory, type ContextExportOptions, type ContextImportOptions, type ContextLoadOptions, ContextLoader, ContextManager, ContextSync, type ContextSyncOptions, CopilotTranslator, type CrossAgentSkill, type CurrentExecution, CursorTranslator, type CustomAgent, DEFAULT_CACHE_TTL, DEFAULT_CHUNKING_CONFIG, DEFAULT_CONTEXT_CATEGORIES, DEFAULT_GUIDELINE_CONFIG, DEFAULT_HYBRID_CONFIG, DEFAULT_LEARNING_CONFIG, DEFAULT_MEMORY_CONFIG, DEFAULT_PROFILE_CONFIG, DEFAULT_REASONING_CONFIG, DEFAULT_SCORING_WEIGHTS, DEFAULT_SKILL_SOURCES, DependencyInfo, Detection, type DetectionSource, type DiscoveredSkill, DockerConfig, EXPLANATION_PROMPT, EmbeddingService, type EmbeddingServiceStats, EnvConfig, type EvolvingPattern, type ExecutableSkill, type ExecutableTask, type ExecutableTaskType, type ExecutionContext, type ExecutionFlow, type ExecutionFlowConfig, ExecutionFlowSchema, type ExecutionHistory, ExecutionManager, type ExecutionMode, type ExecutionModeConfig, type ExecutionOptions, type ExecutionProgressCallback, type ExecutionProgressEvent, type ExecutionStep, ExecutionStepSchema, type ExecutionStepStatus, ExecutionStepStatusSchema, type ExecutionStrategy, type ExecutionTaskStatus, type ExpandedQuery, type ExplainedMatch, type ExplainedMatchDetails, type ExplainedRecommendation, type ExplainedScoredSkill, type FeedbackResult, type FlowMetrics, type FlowSummary, type FormatCategory, type FormatTranslator, type FreshnessResult, GITHUB_ACTION_TEMPLATE, GITLAB_CI_TEMPLATE, type GenerateOptions, type GeneratedInstruction, type GeneratedSkill, type GitAnalysisOptions, type GitAnalysisResult, type GitAnalysisSummary, type GitCommit, type GitFileChange, GitHubProvider, GitLabProvider, GitProvider, type GitProviderAdapter, type Guideline, type GuidelineCategory, type GuidelineConfig, type HookConfig, type HookContext, type HookError, type HookEvent, type HookEventListener, HookManager, type HookManagerOptions, type HookTriggerResult, type HybridSearchOptions, HybridSearchPipeline, type HybridSearchResponse, type HybridSearchResult, INDEX_CACHE_HOURS, INDEX_PATH, type ImportOptions, type IndexBuildCallback, type IndexBuildProgress, type IndexSource, type InjectedMemory, type InjectionMode, type InjectionOptions, type InjectionResult, type InstallOptions, type InstallResult, type InstalledPackInfo, type InstalledSkillInfo, type IssueSeverity, KNOWN_SKILL_REPOS, type LLMResponse, type LearnedPattern, type LearnedSkillOutput, type Learning, type LearningConfig, LearningConsolidator, LearningStore, type LearningStoreData, type LoadedContext, type LocalModelConfig, LocalModelConfigSchema, LocalModelManager, LocalProvider, MARKETPLACE_CACHE_FILE, MODEL_REGISTRY, MarketplaceAggregator, type MarketplaceConfig, type MarketplaceIndex, type MarketplaceSearchOptions, type MarketplaceSearchResult, type MarketplaceSkill, type MatchCategory, type MatchReason, type MatcherFunction, MemoryCompressor, type MemoryConfig, MemoryEnabledEngine, type MemoryEnabledEngineOptions, type MemoryFull, type MemoryIndex, MemoryIndexStore, MemoryInjector, MemoryObserver, type MemoryObserverConfig, type MemoryPaths, type MemoryPreview, type MemorySearchOptions, type MemorySearchResult, type MemoryStatus, type MemorySummary, type MessageHandler, type MessageType, MethodologyLoader, MethodologyManager, type MethodologyManagerOptions, type MethodologyPack, type MethodologySearchQuery, type MethodologySearchResult, type MethodologySkill, type MethodologySkillMetadata, type MethodologyState, type MethodologySyncResult, MockAIProvider, type ModeCapabilities, type ModeDetectionResult, type ObservableEvent, type ObservableEventType, type Observation, type ObservationContent, ObservationStore, type ObservationStoreData, type ObservationType, type OperationalProfile, type OrchestratorOptions, type OrchestratorTaskStatus, type OrchestratorTeamConfig, PRE_COMMIT_CONFIG_TEMPLATE, PRE_COMMIT_HOOK_TEMPLATE, PROJECT_TYPE_HINTS, PackageManager, type ParseOptions, type PatternCategory, type PatternDomain, type PatternExtractionResult, type PatternGenerateOptions, type PatternStore, type PipelineStage, type PlaceholderMatch, type PlaceholderReplacement, type PlanEvent, type PlanEventListener, type PlanExecutionOptions, type PlanExecutionResult, PlanExecutor, PlanGenerator, PlanParser, type PlanResult, type PlanStatus, type PlanStep, type PlanTask, type PlanTaskFiles, type PlanTaskResult, type PlanValidationResult, PlanValidator, type Plugin, type PluginConfig, type PluginContext, type PluginHooks, PluginLoader, PluginManager, type PluginMetadata, PrimerAnalysis, PrimerAnalyzer, PrimerGenerator, PrimerLanguage, type PrimerOptions, type PrimerResult, type ProfileConfig, type ProfileName, ProjectContext, ProjectDetector, ProjectPatterns, type ProjectProfile, ProjectStack, ProjectStructure, type ProviderPlugin, type QualityScore, QueryExpander, type RRFInput, type RRFRanking, type RankerResult, type ReasoningCacheEntry, type ReasoningConfig, ReasoningEngine, type ReasoningEngineStats, type ReasoningPrompt, type ReasoningProvider, ReasoningProviderSchema, type ReasoningRecommendOptions, ReasoningRecommendationEngine, type ReasoningRecommendationResult, type RecommendHybridSearchOptions, type RecommendHybridSearchResult, type RecommendOptions, RecommendationEngine, type RecommendationResult, type RegisteredCommand, type RegistrySkill, type RelatedSkillResult, type RelationType, type RerankerInput, type RerankerOutput, type ReviewIssue, type ReviewResult, type ReviewStage, type ReviewStageName, RuleBasedCompressor, SEARCH_PLANNING_PROMPT, SESSION_FILE, SKILL_DISCOVERY_PATHS, SKILL_MATCH_PROMPT, STANDARD_PLACEHOLDERS, type ScoredSkill, type ScoringWeights, type SearchOptions, type SearchPlan, type SearchResult, type SearchableSkill, type SessionContext, type SessionDecision, type SessionFile, SessionManager, type SessionMessage, type SessionState, type SessionSummary, type SessionTask, type ShareOptions, type SharedSkill, Skill, SkillBundle, type SkillChunk, SkillChunkSchema, type SkillEmbedding, type SkillEntry, type SkillExample, SkillExecutionEngine, type SkillExecutionEvent, type SkillExecutionResult, type SkillExecutor, type SkillExecutorOptions, SkillFrontmatter, type SkillGraph, type SkillHook, type SkillIndex, SkillLocation, SkillMdTranslator, SkillMetadata, type SkillNode, SkillPreferences, type SkillRelation, type SkillSource, SkillSummary, type SkillTestCase, type SkillTestSuite, type SkillToSubagentOptions, type SkillTranslationOptions, type SkillTranslationResult, type SkillTree, SkillTreeSchema, SkillTriggerEngine, SkillkitConfig, type SkillsManifest, type SlashCommand, type SlashCommandResult, type SpecificityScore, type StepDefinition, type StepExecutor, type StepType, type StructureScore, type StructuredPlan, type SyncOptions, type SyncReport, type SyncResult, TAG_TO_CATEGORY, TAG_TO_TECH, TASK_TEMPLATES, TREE_FILE_NAME, type Task, type TaskEvent, type TaskEventListener, type TaskExecutionResult, type TaskFiles, type TaskFilter, TaskManager, type TaskPlan, type TaskResult, type TaskStatus, type TaskStep, type TaskTemplate, type Team, type TeamConfig, type TeamEvent, type TeamEventListener, TeamManager, type TeamMember, type TeamMessage, TeamMessageBus, TeamOrchestrator, type TeamRegistry, type TeamStatus, type TestAssertion, type TestAssertionType, type TestCaseResult, type TestProgressEvent, type TestResult, type TestRunnerOptions, type TestSuiteResult, TranslatableSkillFrontmatter, type TranslationOptions, type TranslationPath, type TranslationResult, type TranslatorPlugin, TranslatorRegistry, TreeGenerator, type TreeGeneratorOptions, type TreeNode, TreeNodeSchema, type TreePath, type TreeReasoningResult, type TreeSearchQuery, type TreeSearchResult, type TreeTraversalStep, type TriggerEngineOptions, type UpdateOptions, type ValidationError, type ValidationIssue, type ValidationResult, type ValidationWarning, type ValidatorOptions, type VectorSearchResult, VectorStore, type VectorStoreConfig, type VerificationRule, WORKFLOWS_DIR, WORKFLOW_EXTENSION, type WaveExecutionStatus, type WellKnownIndex, WellKnownProvider, type WellKnownSkill, WindsurfTranslator, type Workflow, type WorkflowExecution, type WorkflowExecutionStatus, WorkflowOrchestrator, type WorkflowProgressCallback, type WorkflowSkill, type WorkflowWave, addCustomGuideline, addCustomProfile, addPattern, addToManifest, agentExists, analyzeForPrimer, analyzeGitHistory, analyzePlaceholders, analyzePrimer, analyzeProject, applyConnectorConfig, applyPositionAwareBlending, approvePattern, benchmarkSkill, buildCategoryRelevancePrompt, buildExplanationPrompt, buildSearchPlanPrompt, buildSkillGraph, buildSkillIndex, buildSkillMatchPrompt, calculateBaseSkillsUrl, calculatePercentile, canTranslate, clusterPatterns, compareTreeVersions, computeRRFScore, copilotTranslator, createAPIBasedCompressor, createCommandGenerator, createCommandRegistry, createConnectorConfig, createContextLoader, createContextManager, createContextSync, createEmbeddingService, createExecutionEngine, createExecutionManager, createHookManager, createHybridSearchPipeline, createMarketplaceAggregator, createMemoryCompressor, createMemoryEnabledEngine, createMemoryInjector, createMemoryObserver, createMessageBus, createMethodologyLoader, createMethodologyManager, createModeAwareExecutor, createPlanExecutor, createPlanGenerator, createPlanParser, createPlanValidator, createPluginManager, createQueryExpander, createReasoningEngine, createReasoningRecommendationEngine, createRecommendationEngine, createRuleBasedCompressor, createSessionFile, createSessionManager, createSimulatedSkillExecutor, createSkillBundle, createSkillExecutor, createTaskManager, createTeamManager, createTeamOrchestrator, createTestSuiteFromFrontmatter, createTriggerEngine, createVectorStore, createWorkflowOrchestrator, createWorkflowTemplate, cursorTranslator, deserializeGraph, deserializeTree, detectCategory, detectExecutionMode, detectPlaceholders, detectProvider, detectSkillFormat, disableGuideline, discoverAgents, discoverAgentsForAgent, discoverAgentsFromPath, discoverAgentsRecursive, discoverGlobalAgents, discoverSkills, dryRunExecutor, enableGuideline, estimateTokens, evaluateSkillContent, evaluateSkillDirectory, evaluateSkillFile, executeWithAgent, expandQuerySimple, exportBundle, exportPatternsAsJson, extractAgentContent, extractAgentFrontmatter, extractField, extractFrontmatter, extractJsonFromResponse, extractPatternsFromSession, extractSkillMetadata, fetchSkillsFromRepo, findAgent, findAllAgents, findAllSkills, findManifestPath, findSkill, findSkillsByRelationType, findSkillsInCategory, formatBytes, formatSkillAsPrompt, fromCanonicalAgent, fuseWithRRF, generateComparisonNotes, generateConnectorsMarkdown, generateManifestFromInstalled, generatePatternReport, generatePrimer, generatePrimerForAgent, generateRecommendations, generateSkillFromPatterns, generateSkillTree, generateSkillsConfig, generateSubagentFromSkill, generateWellKnownIndex, generateWellKnownStructure, getActiveProfile, getAgentCLIConfig, getAgentConfigFile, getAgentConfigPath, getAgentDirectoryConfig, getAgentFilename, getAgentFormat, getAgentSkillsDir, getAgentStats, getAgentTargetDirectory, getAgentsDirectory, getAllCategories, getAllGuidelines, getAllPatterns, getAllProfiles, getAllProviders, getAllSkillsDirs, getApprovedPatterns, getAvailableCLIAgents, getBuiltinGuidelines, getBuiltinPacksDir, getBuiltinPipeline, getBuiltinPipelines, getBuiltinProfiles, getCICDTemplate, getCategoryStats, getConfigFile, getConfigFormat, getDefaultConfigPath, getDefaultModelDir, getDefaultStorePath, getEnabledGuidelineContent, getEnabledGuidelines, getEvolvingPattern, getEvolvingPatternsByDomain, getExecutionStrategy, getGitCommits, getGlobalConfigPath, getGlobalSkillsDir, getGrade, getGuideline, getGuidelineContent, getGuidelinesByCategory, getHighConfidencePatterns, getIndexStatus, getInstallDir, getLowConfidencePatterns, getManualExecutionInstructions, getMemoryPaths, getMemoryStatus, getModeDescription, getMostRecentSession, getMostUsedPatterns, getPattern, getPatternStats, getPatternsByCategory, getPlaceholderInfo, getProfile, getProfileContext, getProfileNames, getProjectConfigPath, getProvider, getQualityGrade, getRankFromScore, getRecentBugFixes, getRecentRefactors, getRelatedSkills, getSearchDirs, getSkillPath, getSkillsDir, getStackTags, getStandaloneAlternative, getSupportedTranslationAgents, getTechTags, globalMemoryDirectoryExists, hybridSearch, importBundle, importPatternsFromJson, initContext, initManifest, initProject, initializeMemoryDirectory, isAgentCLIAvailable, isAgentCompatible, isBuiltinGuideline, isBuiltinProfile, isGitUrl, isGuidelineEnabled, isHighQuality, isIndexStale, isLocalPath, isPathInside, listCICDTemplates, listSessions, listWorkflows, loadAgentMetadata, loadAndConvertSkill, loadConfig, loadContext, loadGuidelineConfig, loadIndex, loadLearningConfig, loadManifest, loadMetadata, loadPatternStore, loadPlugin, loadPluginsFromDirectory, loadProfileConfig, loadSessionFile, loadSkillMetadata, loadTree, loadWorkflow, loadWorkflowByName, memoryDirectoryExists, mergePatterns, mergeRankings, normalizeScores, parseAgentDir, parseAgentFile, parseShorthand, parseSkill, parseSkillContent, parseSkillContentToCanonical, parseSkillToCanonical, parseSource, parseWorkflow, readAgentContent, readSkillContent, recordFailure, recordSuccess, rejectPattern, removeCustomGuideline, removeCustomProfile, removeFromManifest, removePattern, replacePlaceholders, requireCapability, requireEnhancedMode, runTestSuite, saveConfig, saveGeneratedSkill, saveGuidelineConfig, saveIndex, saveLearningConfig, saveManifest, savePatternStore, saveProfileConfig, saveSessionFile, saveSkillMetadata, saveTree, saveWorkflow, serializeGraph, serializeTree, serializeWorkflow, setActiveProfile, setSkillEnabled, shellExecutor, skillMdTranslator, skillToSubagent, suggestMappingsFromMcp, supportsAutoDiscovery, supportsSlashCommands, syncToAgent, syncToAllAgents, toCanonicalAgent, translateAgent, translateAgentContent, translateAgents, translateCanonicalAgent, translateSkill, translateSkillFile, translateSkillToAgent, translateSkillToAll, translatorRegistry, treeToMarkdown, treeToText, updateSessionFile, validateAgent, validateBuiltinPacks, validateCategoryScore, validateConnectorConfig, validatePackDirectory, validatePackManifest, validatePlan, validateSearchPlan, validateSkill, validateSkillContent, validateWorkflow, weightedCombine, windsurfTranslator, wrapProgressCallbackWithMemory, writeTranslatedSkill };
|
|
10706
|
+
interface ExternalSkill {
|
|
10707
|
+
name: string;
|
|
10708
|
+
description: string;
|
|
10709
|
+
source: string;
|
|
10710
|
+
registry: string;
|
|
10711
|
+
path?: string;
|
|
10712
|
+
stars?: number;
|
|
10713
|
+
updatedAt?: string;
|
|
10714
|
+
}
|
|
10715
|
+
interface ExternalRegistry {
|
|
10716
|
+
name: string;
|
|
10717
|
+
search(query: string, options?: {
|
|
10718
|
+
limit?: number;
|
|
10719
|
+
timeoutMs?: number;
|
|
10720
|
+
}): Promise<ExternalSkill[]>;
|
|
10721
|
+
}
|
|
10722
|
+
interface FederatedResult {
|
|
10723
|
+
skills: ExternalSkill[];
|
|
10724
|
+
registries: string[];
|
|
10725
|
+
total: number;
|
|
10726
|
+
query: string;
|
|
10727
|
+
}
|
|
10728
|
+
declare class RateLimitError extends Error {
|
|
10729
|
+
constructor(registry: string);
|
|
10730
|
+
}
|
|
10731
|
+
declare class GitHubSkillRegistry implements ExternalRegistry {
|
|
10732
|
+
name: string;
|
|
10733
|
+
private baseUrl;
|
|
10734
|
+
search(query: string, options?: {
|
|
10735
|
+
limit?: number;
|
|
10736
|
+
timeoutMs?: number;
|
|
10737
|
+
}): Promise<ExternalSkill[]>;
|
|
10738
|
+
}
|
|
10739
|
+
declare class FederatedSearch {
|
|
10740
|
+
private registries;
|
|
10741
|
+
addRegistry(registry: ExternalRegistry): void;
|
|
10742
|
+
search(query: string, options?: {
|
|
10743
|
+
limit?: number;
|
|
10744
|
+
}): Promise<FederatedResult>;
|
|
10745
|
+
}
|
|
10746
|
+
|
|
10747
|
+
export { AGENT_CLI_CONFIGS, AGENT_CONFIG, AGENT_DISCOVERY_PATHS, AGENT_FORMAT_MAP, AGENT_INSTRUCTION_TEMPLATES, AGENT_SKILL_FORMATS, type AIConfig, type AIGenerateOptions, AIManager, type AIProvider, AISearch, type AISearchOptions, type AISearchResult, AISkillGenerator, ALL_AGENT_DISCOVERY_PATHS, APIBasedCompressor, type APICompressionConfig, type ActivatedSkill, type AdvancedScore, type AgentAdapterInfo, type AgentCLIConfig, type AgentCommandFormat, AgentConfig, type AgentDirectoryConfig, type AgentExecutionResult, type AgentFormatCategory, AgentFrontmatter, AgentHook, type AgentHookFormat, type AgentInstance, type AgentInstructionTemplate, AgentLocation, AgentMetadata, AgentPermissionMode, type AgentPipeline, type AgentSkillFormat, type AgentStatus, type AgentTranslationOptions, type AgentTranslationResult, AgentType, type AssertionResult, type AuditEvent, type AuditEventType, type AuditExportOptions, AuditLogger, type AuditQuery, type AuditStats, BUILTIN_PIPELINES, BaseAIProvider, type BenchmarkResult, BitbucketProvider, type BundleManifest, CATEGORY_RELEVANCE_PROMPT, CATEGORY_TAXONOMY, CIConfig, CIRCLECI_CONFIG_TEMPLATE, CONTEXT_DIR, CONTEXT_FILE, CUSTOM_AGENT_FORMAT_MAP, type CanonicalAgent, type CanonicalSkill, type CategoryMapping, type CategoryScore, type CategoryStats, type CheckpointHandler, type CheckpointResponse, type ClarityScore, type CloneOptions, type CloneResult, CodeConvention, type CommandArg, type CommandBundle, type CommandContext, type CommandEvent, type CommandEventListener, CommandGenerator, type CommandGeneratorOptions, type CommandHandler, type CommandPlugin, CommandRegistry, type CommandRegistryOptions, type CommandResult, type CommandSearchOptions, type CommandValidationResult, type CompletenessResult, type CompressedLearning, type CompressionEngine, type CompressionOptions, type CompressionResult, type ConnectorAnalysis, type ConnectorCategory, ConnectorCategorySchema, type ConnectorConfig, ConnectorConfigSchema, type ConnectorMapping, ConnectorMappingSchema, type ConnectorPlaceholder, ConnectorPlaceholderSchema, type ContextCategory, type ContextExportOptions, type ContextImportOptions, type ContextLoadOptions, ContextLoader, ContextManager, ContextSync, type ContextSyncOptions, CopilotTranslator, type CrossAgentSkill, type CurrentExecution, CursorTranslator, type CustomAgent, DEFAULT_CACHE_TTL, DEFAULT_CHUNKING_CONFIG, DEFAULT_CONTEXT_CATEGORIES, DEFAULT_GUIDELINE_CONFIG, DEFAULT_HYBRID_CONFIG, DEFAULT_LEARNING_CONFIG, DEFAULT_MEMORY_CONFIG, DEFAULT_PROFILE_CONFIG, DEFAULT_REASONING_CONFIG, DEFAULT_SCORING_WEIGHTS, DEFAULT_SKILL_SOURCES, DependencyInfo, Detection, type DetectionSource, type DiscoveredSkill, DockerConfig, EXPLANATION_PROMPT, EmbeddingService, type EmbeddingServiceStats, EnvConfig, type EvolvingPattern, type ExecutableSkill, type ExecutableTask, type ExecutableTaskType, type ExecutionContext, type ExecutionFlow, type ExecutionFlowConfig, ExecutionFlowSchema, type ExecutionHistory, ExecutionManager, type ExecutionMode, type ExecutionModeConfig, type ExecutionOptions, type ExecutionProgressCallback, type ExecutionProgressEvent, type ExecutionStep, ExecutionStepSchema, type ExecutionStepStatus, ExecutionStepStatusSchema, type ExecutionStrategy, type ExecutionTaskStatus, type ExpandedQuery, type ExplainedMatch, type ExplainedMatchDetails, type ExplainedRecommendation, type ExplainedScoredSkill, type ExternalRegistry, type ExternalSkill, type FederatedResult, FederatedSearch, type FeedbackResult, type FlowMetrics, type FlowSummary, type FormatCategory, type FormatTranslator, type FreshnessResult, GITHUB_ACTION_TEMPLATE, GITLAB_CI_TEMPLATE, type GenerateOptions, type GeneratedInstruction, type GeneratedSkill, type GitAnalysisOptions, type GitAnalysisResult, type GitAnalysisSummary, type GitCommit, type GitFileChange, GitHubProvider, GitHubSkillRegistry, GitLabProvider, GitProvider, type GitProviderAdapter, type Guideline, type GuidelineCategory, type GuidelineConfig, type HookConfig, type HookContext, type HookError, type HookEvent, type HookEventListener, HookManager, type HookManagerOptions, type HookTriggerResult, type HybridSearchOptions, HybridSearchPipeline, type HybridSearchResponse, type HybridSearchResult, INDEX_CACHE_HOURS, INDEX_PATH, type ImportOptions, type IndexBuildCallback, type IndexBuildProgress, type IndexSource, type InjectedMemory, type InjectionMode, type InjectionOptions, type InjectionResult, type InstallOptions, type InstallResult, type InstalledPackInfo, type InstalledSkillInfo, type IssueSeverity, KNOWN_SKILL_REPOS, type LLMResponse, type LearnedPattern, type LearnedSkillOutput, type Learning, type LearningConfig, LearningConsolidator, LearningStore, type LearningStoreData, type LoadedContext, type LocalModelConfig, LocalModelConfigSchema, LocalModelManager, LocalProvider, MARKETPLACE_CACHE_FILE, MODEL_REGISTRY, MarketplaceAggregator, type MarketplaceConfig, type MarketplaceIndex, type MarketplaceSearchOptions, type MarketplaceSearchResult, type MarketplaceSkill, type MatchCategory, type MatchReason, type MatcherFunction, MemoryCompressor, type MemoryConfig, MemoryEnabledEngine, type MemoryEnabledEngineOptions, type MemoryFull, type MemoryIndex, MemoryIndexStore, MemoryInjector, MemoryObserver, type MemoryObserverConfig, type MemoryPaths, type MemoryPreview, type MemorySearchOptions, type MemorySearchResult, type MemoryStatus, type MemorySummary, type MessageHandler, type MessageType, MethodologyLoader, MethodologyManager, type MethodologyManagerOptions, type MethodologyPack, type MethodologySearchQuery, type MethodologySearchResult, type MethodologySkill, type MethodologySkillMetadata, type MethodologyState, type MethodologySyncResult, MockAIProvider, type ModeCapabilities, type ModeDetectionResult, type ObservableEvent, type ObservableEventType, type Observation, type ObservationContent, ObservationStore, type ObservationStoreData, type ObservationType, type OperationalProfile, type OrchestratorOptions, type OrchestratorTaskStatus, type OrchestratorTeamConfig, PRE_COMMIT_CONFIG_TEMPLATE, PRE_COMMIT_HOOK_TEMPLATE, PROJECT_TYPE_HINTS, PackageManager, type ParseOptions, type PatternCategory, type PatternDomain, type PatternExtractionResult, type PatternGenerateOptions, type PatternStore, type PipelineStage, type PlaceholderMatch, type PlaceholderReplacement, type PlanEvent, type PlanEventListener, type PlanExecutionOptions, type PlanExecutionResult, PlanExecutor, PlanGenerator, PlanParser, type PlanResult, type PlanStatus, type PlanStep, type PlanTask, type PlanTaskFiles, type PlanTaskResult, type PlanValidationResult, PlanValidator, type Plugin, type PluginConfig, type PluginContext, type PluginHooks, PluginLoader, PluginManager, type PluginMetadata, PrimerAnalysis, PrimerAnalyzer, PrimerGenerator, PrimerLanguage, type PrimerOptions, type PrimerResult, type ProfileConfig, type ProfileName, ProjectContext, ProjectDetector, ProjectPatterns, type ProjectProfile, ProjectStack, ProjectStructure, type ProviderPlugin, type QualityScore, QueryExpander, type RRFInput, type RRFRanking, type RankerResult, RateLimitError, type ReasoningCacheEntry, type ReasoningConfig, ReasoningEngine, type ReasoningEngineStats, type ReasoningPrompt, type ReasoningProvider, ReasoningProviderSchema, type ReasoningRecommendOptions, ReasoningRecommendationEngine, type ReasoningRecommendationResult, type RecommendHybridSearchOptions, type RecommendHybridSearchResult, type RecommendOptions, RecommendationEngine, type RecommendationResult, type RegisteredCommand, type RegistrySkill, type RelatedSkillResult, type RelationType, type RerankerInput, type RerankerOutput, type ReviewIssue, type ReviewResult, type ReviewStage, type ReviewStageName, RuleBasedCompressor, SEARCH_PLANNING_PROMPT, SESSION_FILE, SKILL_DISCOVERY_PATHS, SKILL_MATCH_PROMPT, STANDARD_PLACEHOLDERS, type ScoredSkill, type ScoringWeights, type SearchOptions, type SearchPlan, type SearchResult, type SearchableSkill, type SessionContext, type SessionDecision, type SessionFile, SessionManager, type SessionMessage, type SessionState, type SessionSummary, type SessionTask, type ShareOptions, type SharedSkill, Skill, SkillBundle, type SkillChunk, SkillChunkSchema, type SkillEmbedding, type SkillEntry, type SkillExample, SkillExecutionEngine, type SkillExecutionEvent, type SkillExecutionResult, type SkillExecutor, type SkillExecutorOptions, SkillFrontmatter, type SkillGraph, type SkillHook, type SkillIndex, SkillLocation, SkillMdTranslator, SkillMetadata, type SkillNode, SkillPreferences, type SkillRelation, type SkillSource, SkillSummary, type SkillTestCase, type SkillTestSuite, type SkillToSubagentOptions, type SkillTranslationOptions, type SkillTranslationResult, type SkillTree, SkillTreeSchema, SkillTriggerEngine, SkillkitConfig, type SkillsManifest, type SlashCommand, type SlashCommandResult, type SpecificityScore, type StepDefinition, type StepExecutor, type StepType, type StructureScore, type StructuredPlan, type SyncOptions, type SyncReport, type SyncResult, TAG_TO_CATEGORY, TAG_TO_TECH, TASK_TEMPLATES, TREE_FILE_NAME, type Task, type TaskEvent, type TaskEventListener, type TaskExecutionResult, type TaskFiles, type TaskFilter, TaskManager, type TaskPlan, type TaskResult, type TaskStatus, type TaskStep, type TaskTemplate, type Team, type TeamConfig, type TeamEvent, type TeamEventListener, TeamManager, type TeamMember, type TeamMessage, TeamMessageBus, TeamOrchestrator, type TeamRegistry, type TeamStatus, type TestAssertion, type TestAssertionType, type TestCaseResult, type TestProgressEvent, type TestResult, type TestRunnerOptions, type TestSuiteResult, TranslatableSkillFrontmatter, type TranslationOptions, type TranslationPath, type TranslationResult, type TranslatorPlugin, TranslatorRegistry, TreeGenerator, type TreeGeneratorOptions, type TreeNode, TreeNodeSchema, type TreePath, type TreeReasoningResult, type TreeSearchQuery, type TreeSearchResult, type TreeTraversalStep, type TriggerEngineOptions, type UpdateOptions, type ValidationError, type ValidationIssue, type ValidationResult, type ValidationWarning, type ValidatorOptions, type VectorSearchResult, VectorStore, type VectorStoreConfig, type VerificationRule, WORKFLOWS_DIR, WORKFLOW_EXTENSION, type WaveExecutionStatus, type WellKnownIndex, WellKnownProvider, type WellKnownSkill, WindsurfTranslator, type Workflow, type WorkflowExecution, type WorkflowExecutionStatus, WorkflowOrchestrator, type WorkflowProgressCallback, type WorkflowSkill, type WorkflowWave, addCustomGuideline, addCustomProfile, addPattern, addToManifest, agentExists, analyzeForPrimer, analyzeGitHistory, analyzePlaceholders, analyzePrimer, analyzeProject, applyConnectorConfig, applyPositionAwareBlending, approvePattern, benchmarkSkill, buildCategoryRelevancePrompt, buildExplanationPrompt, buildSearchPlanPrompt, buildSkillGraph, buildSkillIndex, buildSkillMatchPrompt, calculateBaseSkillsUrl, calculatePercentile, canTranslate, clusterPatterns, compareTreeVersions, computeRRFScore, copilotTranslator, createAPIBasedCompressor, createCommandGenerator, createCommandRegistry, createConnectorConfig, createContextLoader, createContextManager, createContextSync, createEmbeddingService, createExecutionEngine, createExecutionManager, createHookManager, createHybridSearchPipeline, createMarketplaceAggregator, createMemoryCompressor, createMemoryEnabledEngine, createMemoryInjector, createMemoryObserver, createMessageBus, createMethodologyLoader, createMethodologyManager, createModeAwareExecutor, createPlanExecutor, createPlanGenerator, createPlanParser, createPlanValidator, createPluginManager, createQueryExpander, createReasoningEngine, createReasoningRecommendationEngine, createRecommendationEngine, createRuleBasedCompressor, createSessionFile, createSessionManager, createSimulatedSkillExecutor, createSkillBundle, createSkillExecutor, createTaskManager, createTeamManager, createTeamOrchestrator, createTestSuiteFromFrontmatter, createTriggerEngine, createVectorStore, createWorkflowOrchestrator, createWorkflowTemplate, cursorTranslator, deserializeGraph, deserializeTree, detectCategory, detectExecutionMode, detectPlaceholders, detectProvider, detectSkillFormat, disableGuideline, discoverAgents, discoverAgentsForAgent, discoverAgentsFromPath, discoverAgentsRecursive, discoverGlobalAgents, discoverSkills, dryRunExecutor, enableGuideline, estimateTokens, evaluateSkillContent, evaluateSkillDirectory, evaluateSkillFile, executeWithAgent, expandQuerySimple, exportBundle, exportPatternsAsJson, extractAgentContent, extractAgentFrontmatter, extractField, extractFrontmatter, extractJsonFromResponse, extractPatternsFromSession, extractSkillMetadata, fetchSkillsFromRepo, findAgent, findAllAgents, findAllSkills, findManifestPath, findSkill, findSkillsByRelationType, findSkillsInCategory, formatBytes, formatSkillAsPrompt, fromCanonicalAgent, fuseWithRRF, generateComparisonNotes, generateConnectorsMarkdown, generateManifestFromInstalled, generatePatternReport, generatePrimer, generatePrimerForAgent, generateRecommendations, generateSkillFromPatterns, generateSkillTree, generateSkillsConfig, generateSubagentFromSkill, generateWellKnownIndex, generateWellKnownStructure, getActiveProfile, getAgentCLIConfig, getAgentConfigFile, getAgentConfigPath, getAgentDirectoryConfig, getAgentFilename, getAgentFormat, getAgentSkillsDir, getAgentStats, getAgentTargetDirectory, getAgentsDirectory, getAllCategories, getAllGuidelines, getAllPatterns, getAllProfiles, getAllProviders, getAllSkillsDirs, getApprovedPatterns, getAvailableCLIAgents, getBuiltinGuidelines, getBuiltinPacksDir, getBuiltinPipeline, getBuiltinPipelines, getBuiltinProfiles, getCICDTemplate, getCategoryStats, getConfigFile, getConfigFormat, getDefaultConfigPath, getDefaultModelDir, getDefaultStorePath, getEnabledGuidelineContent, getEnabledGuidelines, getEvolvingPattern, getEvolvingPatternsByDomain, getExecutionStrategy, getGitCommits, getGlobalConfigPath, getGlobalSkillsDir, getGrade, getGuideline, getGuidelineContent, getGuidelinesByCategory, getHighConfidencePatterns, getIndexStatus, getInstallDir, getLowConfidencePatterns, getManualExecutionInstructions, getMemoryPaths, getMemoryStatus, getModeDescription, getMostRecentSession, getMostUsedPatterns, getPattern, getPatternStats, getPatternsByCategory, getPlaceholderInfo, getProfile, getProfileContext, getProfileNames, getProjectConfigPath, getProvider, getQualityGrade, getRankFromScore, getRecentBugFixes, getRecentRefactors, getRelatedSkills, getSearchDirs, getSkillPath, getSkillsDir, getStackTags, getStandaloneAlternative, getSupportedTranslationAgents, getTechTags, globalMemoryDirectoryExists, hybridSearch, importBundle, importPatternsFromJson, initContext, initManifest, initProject, initializeMemoryDirectory, isAgentCLIAvailable, isAgentCompatible, isBuiltinGuideline, isBuiltinProfile, isGitUrl, isGuidelineEnabled, isHighQuality, isIndexStale, isLocalPath, isPathInside, listCICDTemplates, listSessions, listWorkflows, loadAgentMetadata, loadAndConvertSkill, loadConfig, loadContext, loadGuidelineConfig, loadIndex, loadLearningConfig, loadManifest, loadMetadata, loadPatternStore, loadPlugin, loadPluginsFromDirectory, loadProfileConfig, loadSessionFile, loadSkillMetadata, loadTree, loadWorkflow, loadWorkflowByName, memoryDirectoryExists, mergePatterns, mergeRankings, normalizeScores, parseAgentDir, parseAgentFile, parseShorthand, parseSkill, parseSkillContent, parseSkillContentToCanonical, parseSkillToCanonical, parseSource, parseWorkflow, readAgentContent, readSkillContent, recordFailure, recordSuccess, rejectPattern, removeCustomGuideline, removeCustomProfile, removeFromManifest, removePattern, replacePlaceholders, requireCapability, requireEnhancedMode, runTestSuite, saveConfig, saveGeneratedSkill, saveGuidelineConfig, saveIndex, saveLearningConfig, saveManifest, savePatternStore, saveProfileConfig, saveSessionFile, saveSkillMetadata, saveTree, saveWorkflow, serializeGraph, serializeTree, serializeWorkflow, setActiveProfile, setSkillEnabled, shellExecutor, skillMdTranslator, skillToSubagent, suggestMappingsFromMcp, supportsAutoDiscovery, supportsSlashCommands, syncToAgent, syncToAllAgents, toCanonicalAgent, translateAgent, translateAgentContent, translateAgents, translateCanonicalAgent, translateSkill, translateSkillFile, translateSkillToAgent, translateSkillToAll, translatorRegistry, treeToMarkdown, treeToText, updateSessionFile, validateAgent, validateBuiltinPacks, validateCategoryScore, validateConnectorConfig, validatePackDirectory, validatePackManifest, validatePlan, validateSearchPlan, validateSkill, validateSkillContent, validateWorkflow, weightedCombine, windsurfTranslator, wrapProgressCallbackWithMemory, writeTranslatedSkill };
|
package/dist/index.js
CHANGED
|
@@ -284,7 +284,7 @@ var init_local_models = __esm({
|
|
|
284
284
|
if (done) break;
|
|
285
285
|
const canContinue = fileStream.write(Buffer.from(value));
|
|
286
286
|
if (!canContinue) {
|
|
287
|
-
await new Promise((
|
|
287
|
+
await new Promise((resolve6) => fileStream.once("drain", resolve6));
|
|
288
288
|
}
|
|
289
289
|
downloaded += value.length;
|
|
290
290
|
onProgress?.({
|
|
@@ -295,8 +295,8 @@ var init_local_models = __esm({
|
|
|
295
295
|
});
|
|
296
296
|
}
|
|
297
297
|
fileStream.end();
|
|
298
|
-
await new Promise((
|
|
299
|
-
fileStream.on("finish",
|
|
298
|
+
await new Promise((resolve6, reject) => {
|
|
299
|
+
fileStream.on("finish", resolve6);
|
|
300
300
|
fileStream.on("error", reject);
|
|
301
301
|
});
|
|
302
302
|
await fs.promises.rename(tempPath, modelPath);
|
|
@@ -3658,7 +3658,7 @@ function getConfigFormat(agent) {
|
|
|
3658
3658
|
|
|
3659
3659
|
// src/skills.ts
|
|
3660
3660
|
import { existsSync, readdirSync, readFileSync } from "fs";
|
|
3661
|
-
import { join, basename } from "path";
|
|
3661
|
+
import { join, basename, resolve, sep } from "path";
|
|
3662
3662
|
import { parse as parseYaml } from "yaml";
|
|
3663
3663
|
var SKILL_DISCOVERY_PATHS = [
|
|
3664
3664
|
"skills",
|
|
@@ -3971,8 +3971,9 @@ function validateSkill(skillPath) {
|
|
|
3971
3971
|
return { valid: errors.length === 0, errors, warnings };
|
|
3972
3972
|
}
|
|
3973
3973
|
function isPathInside(child, parent) {
|
|
3974
|
-
const
|
|
3975
|
-
|
|
3974
|
+
const resolved = resolve(child);
|
|
3975
|
+
const resolvedParent = resolve(parent);
|
|
3976
|
+
return resolved === resolvedParent || resolved.startsWith(resolvedParent + sep);
|
|
3976
3977
|
}
|
|
3977
3978
|
|
|
3978
3979
|
// src/config.ts
|
|
@@ -4368,7 +4369,7 @@ var BitbucketProvider = class {
|
|
|
4368
4369
|
|
|
4369
4370
|
// src/providers/local.ts
|
|
4370
4371
|
import { existsSync as existsSync6, statSync, realpathSync } from "fs";
|
|
4371
|
-
import { join as join6, resolve, basename as basename5 } from "path";
|
|
4372
|
+
import { join as join6, resolve as resolve2, basename as basename5 } from "path";
|
|
4372
4373
|
import { homedir as homedir2 } from "os";
|
|
4373
4374
|
var LocalProvider = class {
|
|
4374
4375
|
type = "local";
|
|
@@ -4382,7 +4383,7 @@ var LocalProvider = class {
|
|
|
4382
4383
|
if (source.startsWith("~/")) {
|
|
4383
4384
|
expandedPath = join6(homedir2(), source.slice(2));
|
|
4384
4385
|
}
|
|
4385
|
-
const absolutePath =
|
|
4386
|
+
const absolutePath = resolve2(expandedPath);
|
|
4386
4387
|
const dirName = basename5(absolutePath);
|
|
4387
4388
|
return {
|
|
4388
4389
|
owner: "local",
|
|
@@ -4438,7 +4439,7 @@ var LocalProvider = class {
|
|
|
4438
4439
|
|
|
4439
4440
|
// src/providers/wellknown.ts
|
|
4440
4441
|
import { existsSync as existsSync7, mkdirSync as mkdirSync2, writeFileSync as writeFileSync2, rmSync as rmSync4 } from "fs";
|
|
4441
|
-
import { join as join7, basename as basename6, resolve as
|
|
4442
|
+
import { join as join7, basename as basename6, resolve as resolve3, sep as sep2 } from "path";
|
|
4442
4443
|
import { tmpdir as tmpdir4 } from "os";
|
|
4443
4444
|
import { randomUUID as randomUUID4 } from "crypto";
|
|
4444
4445
|
function sanitizeSkillName(name) {
|
|
@@ -4521,9 +4522,9 @@ var WellKnownProvider = class {
|
|
|
4521
4522
|
continue;
|
|
4522
4523
|
}
|
|
4523
4524
|
const skillDir = join7(tempDir, safeName);
|
|
4524
|
-
const resolvedSkillDir =
|
|
4525
|
-
const resolvedTempDir =
|
|
4526
|
-
if (!resolvedSkillDir.startsWith(resolvedTempDir +
|
|
4525
|
+
const resolvedSkillDir = resolve3(skillDir);
|
|
4526
|
+
const resolvedTempDir = resolve3(tempDir);
|
|
4527
|
+
if (!resolvedSkillDir.startsWith(resolvedTempDir + sep2) && resolvedSkillDir !== resolvedTempDir) {
|
|
4527
4528
|
continue;
|
|
4528
4529
|
}
|
|
4529
4530
|
mkdirSync2(skillDir, { recursive: true });
|
|
@@ -4591,7 +4592,7 @@ function generateWellKnownIndex(skills) {
|
|
|
4591
4592
|
}
|
|
4592
4593
|
function generateWellKnownStructure(outputDir, skills) {
|
|
4593
4594
|
const wellKnownDir = join7(outputDir, ".well-known", "skills");
|
|
4594
|
-
const resolvedWellKnownDir =
|
|
4595
|
+
const resolvedWellKnownDir = resolve3(wellKnownDir);
|
|
4595
4596
|
mkdirSync2(wellKnownDir, { recursive: true });
|
|
4596
4597
|
const indexSkills = [];
|
|
4597
4598
|
const skillPaths = [];
|
|
@@ -4601,8 +4602,8 @@ function generateWellKnownStructure(outputDir, skills) {
|
|
|
4601
4602
|
continue;
|
|
4602
4603
|
}
|
|
4603
4604
|
const skillDir = join7(wellKnownDir, safeName);
|
|
4604
|
-
const resolvedSkillDir =
|
|
4605
|
-
if (!resolvedSkillDir.startsWith(resolvedWellKnownDir +
|
|
4605
|
+
const resolvedSkillDir = resolve3(skillDir);
|
|
4606
|
+
if (!resolvedSkillDir.startsWith(resolvedWellKnownDir + sep2) && resolvedSkillDir !== resolvedWellKnownDir) {
|
|
4606
4607
|
continue;
|
|
4607
4608
|
}
|
|
4608
4609
|
mkdirSync2(skillDir, { recursive: true });
|
|
@@ -8402,7 +8403,7 @@ var SkillExecutionEngine = class {
|
|
|
8402
8403
|
const startTime = /* @__PURE__ */ new Date();
|
|
8403
8404
|
const taskId = task.id || randomUUID7();
|
|
8404
8405
|
try {
|
|
8405
|
-
await new Promise((
|
|
8406
|
+
await new Promise((resolve6) => setTimeout(resolve6, 100));
|
|
8406
8407
|
const endTime = /* @__PURE__ */ new Date();
|
|
8407
8408
|
return {
|
|
8408
8409
|
taskId,
|
|
@@ -8739,7 +8740,7 @@ async function executeWithAgent(agentType, prompt, options = {}) {
|
|
|
8739
8740
|
});
|
|
8740
8741
|
}
|
|
8741
8742
|
async function executeCommand(command, args, options = {}) {
|
|
8742
|
-
return new Promise((
|
|
8743
|
+
return new Promise((resolve6) => {
|
|
8743
8744
|
const startTime = Date.now();
|
|
8744
8745
|
let stdout = "";
|
|
8745
8746
|
let stderr = "";
|
|
@@ -8762,7 +8763,7 @@ async function executeCommand(command, args, options = {}) {
|
|
|
8762
8763
|
});
|
|
8763
8764
|
child.on("error", (error) => {
|
|
8764
8765
|
if (timeoutId) clearTimeout(timeoutId);
|
|
8765
|
-
|
|
8766
|
+
resolve6({
|
|
8766
8767
|
success: false,
|
|
8767
8768
|
output: stdout,
|
|
8768
8769
|
error: error.message,
|
|
@@ -8772,7 +8773,7 @@ async function executeCommand(command, args, options = {}) {
|
|
|
8772
8773
|
});
|
|
8773
8774
|
child.on("close", (code) => {
|
|
8774
8775
|
if (timeoutId) clearTimeout(timeoutId);
|
|
8775
|
-
|
|
8776
|
+
resolve6({
|
|
8776
8777
|
success: code === 0 && !timedOut,
|
|
8777
8778
|
output: stdout,
|
|
8778
8779
|
error: timedOut ? "Execution timed out" : stderr || void 0,
|
|
@@ -8967,7 +8968,7 @@ function createSimulatedSkillExecutor(options = {}) {
|
|
|
8967
8968
|
const { delay = 100, shouldFail, onExecute } = options;
|
|
8968
8969
|
return async (skillName, _config) => {
|
|
8969
8970
|
onExecute?.(skillName);
|
|
8970
|
-
await new Promise((
|
|
8971
|
+
await new Promise((resolve6) => setTimeout(resolve6, delay));
|
|
8971
8972
|
const failed = shouldFail?.(skillName) ?? false;
|
|
8972
8973
|
return {
|
|
8973
8974
|
success: !failed,
|
|
@@ -9416,12 +9417,12 @@ function assertEnvVarSet(assertion, startTime) {
|
|
|
9416
9417
|
};
|
|
9417
9418
|
}
|
|
9418
9419
|
async function checkPortAvailable(port) {
|
|
9419
|
-
return new Promise((
|
|
9420
|
+
return new Promise((resolve6) => {
|
|
9420
9421
|
const server = createServer();
|
|
9421
|
-
server.once("error", () =>
|
|
9422
|
+
server.once("error", () => resolve6(false));
|
|
9422
9423
|
server.once("listening", () => {
|
|
9423
9424
|
server.close();
|
|
9424
|
-
|
|
9425
|
+
resolve6(true);
|
|
9425
9426
|
});
|
|
9426
9427
|
server.listen(port, "127.0.0.1");
|
|
9427
9428
|
});
|
|
@@ -13195,7 +13196,7 @@ function createTeamManager(projectPath) {
|
|
|
13195
13196
|
|
|
13196
13197
|
// src/team/bundle.ts
|
|
13197
13198
|
import { existsSync as existsSync27, readFileSync as readFileSync17, writeFileSync as writeFileSync15, mkdirSync as mkdirSync16, readdirSync as readdirSync6, statSync as statSync3 } from "fs";
|
|
13198
|
-
import { join as join26, basename as basename9, resolve as
|
|
13199
|
+
import { join as join26, basename as basename9, resolve as resolve4, relative, dirname as dirname8, sep as sep3 } from "path";
|
|
13199
13200
|
import { createHash } from "crypto";
|
|
13200
13201
|
var BUNDLE_VERSION = 1;
|
|
13201
13202
|
var SkillBundle = class {
|
|
@@ -13360,7 +13361,7 @@ function importBundle(bundlePath, targetDir, options = {}) {
|
|
|
13360
13361
|
try {
|
|
13361
13362
|
const content = readFileSync17(bundlePath, "utf-8");
|
|
13362
13363
|
const data = JSON.parse(content);
|
|
13363
|
-
const absoluteTargetDir =
|
|
13364
|
+
const absoluteTargetDir = resolve4(targetDir);
|
|
13364
13365
|
for (const skill of data.manifest.skills) {
|
|
13365
13366
|
if (!skill.name || skill.name.includes("/") || skill.name.includes("\\") || skill.name === ".." || skill.name === "." || skill.name.startsWith(".")) {
|
|
13366
13367
|
errors.push(`Skill has invalid name: ${skill.name}`);
|
|
@@ -13372,9 +13373,9 @@ function importBundle(bundlePath, targetDir, options = {}) {
|
|
|
13372
13373
|
continue;
|
|
13373
13374
|
}
|
|
13374
13375
|
const skillDir = join26(absoluteTargetDir, skill.name);
|
|
13375
|
-
const resolvedSkillDir =
|
|
13376
|
+
const resolvedSkillDir = resolve4(skillDir);
|
|
13376
13377
|
const relativeToTarget = relative(absoluteTargetDir, resolvedSkillDir);
|
|
13377
|
-
if (relativeToTarget.startsWith("..") || relativeToTarget.startsWith(
|
|
13378
|
+
if (relativeToTarget.startsWith("..") || relativeToTarget.startsWith(sep3)) {
|
|
13378
13379
|
errors.push(`Skill "${skill.name}" would escape target directory`);
|
|
13379
13380
|
continue;
|
|
13380
13381
|
}
|
|
@@ -13387,9 +13388,9 @@ function importBundle(bundlePath, targetDir, options = {}) {
|
|
|
13387
13388
|
}
|
|
13388
13389
|
const files = parseSkillContent2(skillContent);
|
|
13389
13390
|
for (const [filePath, fileContent] of Object.entries(files)) {
|
|
13390
|
-
const fullPath =
|
|
13391
|
+
const fullPath = resolve4(skillDir, filePath);
|
|
13391
13392
|
const relativeToSkill = relative(skillDir, fullPath);
|
|
13392
|
-
if (relativeToSkill.startsWith("..") || relativeToSkill.startsWith(
|
|
13393
|
+
if (relativeToSkill.startsWith("..") || relativeToSkill.startsWith(sep3)) {
|
|
13393
13394
|
errors.push(`Skill "${skill.name}" contains invalid file path: ${filePath}`);
|
|
13394
13395
|
continue;
|
|
13395
13396
|
}
|
|
@@ -17856,8 +17857,8 @@ var PlanExecutor = class {
|
|
|
17856
17857
|
pause() {
|
|
17857
17858
|
if (!this.isPaused) {
|
|
17858
17859
|
this.isPaused = true;
|
|
17859
|
-
this.resumePromise = new Promise((
|
|
17860
|
-
this.resumeResolve =
|
|
17860
|
+
this.resumePromise = new Promise((resolve6) => {
|
|
17861
|
+
this.resumeResolve = resolve6;
|
|
17861
17862
|
});
|
|
17862
17863
|
this.emit("plan:paused", {});
|
|
17863
17864
|
}
|
|
@@ -20541,7 +20542,7 @@ function loadAndConvertSkill(skill, options) {
|
|
|
20541
20542
|
|
|
20542
20543
|
// src/skill-translator.ts
|
|
20543
20544
|
import { readFileSync as readFileSync25, existsSync as existsSync36, writeFileSync as writeFileSync19, mkdirSync as mkdirSync20 } from "fs";
|
|
20544
|
-
import { join as join37, basename as basename12, dirname as dirname12, resolve as
|
|
20545
|
+
import { join as join37, basename as basename12, dirname as dirname12, resolve as resolve5, relative as relative3, isAbsolute as isAbsolute2 } from "path";
|
|
20545
20546
|
import { parse as parseYaml11, stringify as stringifyYaml8 } from "yaml";
|
|
20546
20547
|
var AGENT_SKILL_FORMATS = Object.fromEntries(
|
|
20547
20548
|
Object.entries(AGENT_CONFIG).map(([agent, config]) => [
|
|
@@ -20780,8 +20781,8 @@ function writeTranslatedSkill(result, rootDir, options) {
|
|
|
20780
20781
|
};
|
|
20781
20782
|
}
|
|
20782
20783
|
try {
|
|
20783
|
-
const rootPath =
|
|
20784
|
-
const filePath =
|
|
20784
|
+
const rootPath = resolve5(rootDir);
|
|
20785
|
+
const filePath = resolve5(rootDir, result.targetDir, result.filename);
|
|
20785
20786
|
const targetPath = dirname12(filePath);
|
|
20786
20787
|
const relPath = relative3(rootPath, filePath);
|
|
20787
20788
|
if (relPath.startsWith("..") || isAbsolute2(relPath)) {
|
|
@@ -21930,7 +21931,7 @@ var AGENT_INSTRUCTION_TEMPLATES = {
|
|
|
21930
21931
|
|
|
21931
21932
|
// src/primer/analyzer.ts
|
|
21932
21933
|
import { existsSync as existsSync39, readFileSync as readFileSync28, readdirSync as readdirSync11 } from "fs";
|
|
21933
|
-
import { join as join40, basename as basename14, relative as relative4, sep as
|
|
21934
|
+
import { join as join40, basename as basename14, relative as relative4, sep as sep4 } from "path";
|
|
21934
21935
|
var PACKAGE_MANAGER_FILES = {
|
|
21935
21936
|
"package-lock.json": "npm",
|
|
21936
21937
|
"pnpm-lock.yaml": "pnpm",
|
|
@@ -22418,7 +22419,7 @@ var PrimerAnalyzer = class {
|
|
|
22418
22419
|
let files = 0;
|
|
22419
22420
|
let directories = 0;
|
|
22420
22421
|
for (const file of this.files) {
|
|
22421
|
-
if (file.includes(
|
|
22422
|
+
if (file.includes(sep4)) {
|
|
22422
22423
|
directories++;
|
|
22423
22424
|
}
|
|
22424
22425
|
files++;
|
|
@@ -25458,7 +25459,7 @@ var ExecutionManager = class {
|
|
|
25458
25459
|
this.metrics.stepMetrics.set(stepName, existing);
|
|
25459
25460
|
}
|
|
25460
25461
|
delay(ms) {
|
|
25461
|
-
return new Promise((
|
|
25462
|
+
return new Promise((resolve6) => setTimeout(resolve6, ms));
|
|
25462
25463
|
}
|
|
25463
25464
|
};
|
|
25464
25465
|
function createExecutionManager(config) {
|
|
@@ -25657,6 +25658,113 @@ init_vector_store();
|
|
|
25657
25658
|
init_rrf();
|
|
25658
25659
|
init_expansion();
|
|
25659
25660
|
init_hybrid();
|
|
25661
|
+
|
|
25662
|
+
// src/registry/index.ts
|
|
25663
|
+
var RateLimitError = class extends Error {
|
|
25664
|
+
constructor(registry) {
|
|
25665
|
+
super(`Rate limited by ${registry} API. Authenticate with a token or wait before retrying.`);
|
|
25666
|
+
this.name = "RateLimitError";
|
|
25667
|
+
}
|
|
25668
|
+
};
|
|
25669
|
+
var GitHubSkillRegistry = class {
|
|
25670
|
+
name = "github";
|
|
25671
|
+
baseUrl = "https://api.github.com";
|
|
25672
|
+
async search(query, options) {
|
|
25673
|
+
const limit = options?.limit ?? 20;
|
|
25674
|
+
const timeoutMs = options?.timeoutMs ?? 1e4;
|
|
25675
|
+
const searchQuery = `SKILL.md ${query} in:path,file`;
|
|
25676
|
+
const controller = new AbortController();
|
|
25677
|
+
const timer = setTimeout(() => controller.abort(), timeoutMs);
|
|
25678
|
+
try {
|
|
25679
|
+
const headers = {
|
|
25680
|
+
Accept: "application/vnd.github.v3+json",
|
|
25681
|
+
"User-Agent": "skillkit-cli"
|
|
25682
|
+
};
|
|
25683
|
+
const token = process.env.GITHUB_TOKEN || process.env.GH_TOKEN;
|
|
25684
|
+
if (token) {
|
|
25685
|
+
headers.Authorization = `Bearer ${token}`;
|
|
25686
|
+
}
|
|
25687
|
+
const response = await fetch(
|
|
25688
|
+
`${this.baseUrl}/search/code?q=${encodeURIComponent(searchQuery)}&per_page=${limit}`,
|
|
25689
|
+
{
|
|
25690
|
+
headers,
|
|
25691
|
+
signal: controller.signal
|
|
25692
|
+
}
|
|
25693
|
+
);
|
|
25694
|
+
clearTimeout(timer);
|
|
25695
|
+
if (!response.ok) {
|
|
25696
|
+
if (response.status === 403) {
|
|
25697
|
+
throw new RateLimitError(this.name);
|
|
25698
|
+
}
|
|
25699
|
+
return [];
|
|
25700
|
+
}
|
|
25701
|
+
const data = await response.json();
|
|
25702
|
+
if (!data.items) return [];
|
|
25703
|
+
const seen = /* @__PURE__ */ new Set();
|
|
25704
|
+
const skills = [];
|
|
25705
|
+
for (const item of data.items) {
|
|
25706
|
+
const repo = item.repository.full_name;
|
|
25707
|
+
if (seen.has(repo)) continue;
|
|
25708
|
+
seen.add(repo);
|
|
25709
|
+
const pathParts = item.path.split("/");
|
|
25710
|
+
const skillName = pathParts.length > 1 ? pathParts[pathParts.length - 2] : repo.split("/").pop() || repo;
|
|
25711
|
+
skills.push({
|
|
25712
|
+
name: skillName,
|
|
25713
|
+
description: item.repository.description || "",
|
|
25714
|
+
source: item.repository.html_url,
|
|
25715
|
+
registry: this.name,
|
|
25716
|
+
path: item.path,
|
|
25717
|
+
stars: item.repository.stargazers_count,
|
|
25718
|
+
updatedAt: item.repository.updated_at
|
|
25719
|
+
});
|
|
25720
|
+
}
|
|
25721
|
+
return skills;
|
|
25722
|
+
} catch (err) {
|
|
25723
|
+
clearTimeout(timer);
|
|
25724
|
+
if (err instanceof RateLimitError) throw err;
|
|
25725
|
+
return [];
|
|
25726
|
+
}
|
|
25727
|
+
}
|
|
25728
|
+
};
|
|
25729
|
+
var FederatedSearch = class {
|
|
25730
|
+
registries = [];
|
|
25731
|
+
addRegistry(registry) {
|
|
25732
|
+
this.registries.push(registry);
|
|
25733
|
+
}
|
|
25734
|
+
async search(query, options) {
|
|
25735
|
+
const limit = options?.limit ?? 20;
|
|
25736
|
+
const results = await Promise.allSettled(
|
|
25737
|
+
this.registries.map((r) => r.search(query, { limit }))
|
|
25738
|
+
);
|
|
25739
|
+
const allSkills = [];
|
|
25740
|
+
const activeRegistries = [];
|
|
25741
|
+
for (let i = 0; i < results.length; i++) {
|
|
25742
|
+
const result = results[i];
|
|
25743
|
+
if (result.status === "fulfilled" && result.value.length > 0) {
|
|
25744
|
+
allSkills.push(...result.value);
|
|
25745
|
+
activeRegistries.push(this.registries[i].name);
|
|
25746
|
+
} else if (result.status === "rejected" && result.reason instanceof RateLimitError) {
|
|
25747
|
+
throw result.reason;
|
|
25748
|
+
}
|
|
25749
|
+
}
|
|
25750
|
+
const seen = /* @__PURE__ */ new Set();
|
|
25751
|
+
const deduplicated = [];
|
|
25752
|
+
for (const skill of allSkills) {
|
|
25753
|
+
const key = `${skill.source}:${skill.name}`;
|
|
25754
|
+
if (!seen.has(key)) {
|
|
25755
|
+
seen.add(key);
|
|
25756
|
+
deduplicated.push(skill);
|
|
25757
|
+
}
|
|
25758
|
+
}
|
|
25759
|
+
deduplicated.sort((a, b) => (b.stars ?? 0) - (a.stars ?? 0));
|
|
25760
|
+
return {
|
|
25761
|
+
skills: deduplicated.slice(0, limit),
|
|
25762
|
+
registries: activeRegistries,
|
|
25763
|
+
total: deduplicated.length,
|
|
25764
|
+
query
|
|
25765
|
+
};
|
|
25766
|
+
}
|
|
25767
|
+
};
|
|
25660
25768
|
export {
|
|
25661
25769
|
AGENT_CLI_CONFIGS,
|
|
25662
25770
|
AGENT_CONFIG,
|
|
@@ -25713,9 +25821,11 @@ export {
|
|
|
25713
25821
|
ExecutionManager,
|
|
25714
25822
|
ExecutionStepSchema,
|
|
25715
25823
|
ExecutionStepStatusSchema,
|
|
25824
|
+
FederatedSearch,
|
|
25716
25825
|
GITHUB_ACTION_TEMPLATE,
|
|
25717
25826
|
GITLAB_CI_TEMPLATE,
|
|
25718
25827
|
GitHubProvider,
|
|
25828
|
+
GitHubSkillRegistry,
|
|
25719
25829
|
GitLabProvider,
|
|
25720
25830
|
GitProvider,
|
|
25721
25831
|
HookManager,
|
|
@@ -25753,6 +25863,7 @@ export {
|
|
|
25753
25863
|
PrimerGenerator,
|
|
25754
25864
|
ProjectDetector,
|
|
25755
25865
|
QueryExpander,
|
|
25866
|
+
RateLimitError,
|
|
25756
25867
|
ReasoningEngine,
|
|
25757
25868
|
ReasoningProviderSchema,
|
|
25758
25869
|
ReasoningRecommendationEngine,
|