@skillkit/core 1.7.5 → 1.7.6

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
@@ -8237,4 +8237,35 @@ declare function generateSkillsConfig(skills: Skill[], targetAgent: AgentType):
8237
8237
  declare const getAgentSkillsDir: typeof getSkillsDir;
8238
8238
  declare const getAgentConfigFile: typeof getConfigFile;
8239
8239
 
8240
- export { AGENT_CLI_CONFIGS, AGENT_CONFIG, AGENT_DISCOVERY_PATHS, AGENT_FORMAT_MAP, 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 AgentAdapterInfo, type AgentCLIConfig, type AgentCommandFormat, AgentConfig, type AgentDirectoryConfig, type AgentExecutionResult, type AgentFormatCategory, AgentFrontmatter, AgentHook, type AgentHookFormat, type AgentInstance, AgentLocation, AgentMetadata, AgentPermissionMode, type AgentSkillFormat, type AgentStatus, type AgentTranslationOptions, type AgentTranslationResult, 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, CUSTOM_AGENT_FORMAT_MAP, type CanonicalAgent, 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 CrossAgentSkill, type CurrentExecution, CursorTranslator, type CustomAgent, 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, type SkillTranslationOptions, type SkillTranslationResult, 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, agentExists, 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, discoverAgents, discoverAgentsForAgent, discoverAgentsFromPath, discoverAgentsRecursive, discoverGlobalAgents, discoverSkills, dryRunExecutor, estimateTokens, executeWithAgent, exportBundle, extractAgentContent, extractAgentFrontmatter, extractField, extractFrontmatter, extractSkillMetadata, fetchSkillsFromRepo, findAgent, findAllAgents, findAllSkills, findSkill, formatSkillAsPrompt, fromCanonicalAgent, generateSkillsConfig, getAgentCLIConfig, getAgentConfigFile, getAgentConfigPath, getAgentDirectoryConfig, getAgentFilename, getAgentFormat, getAgentSkillsDir, getAgentStats, getAgentTargetDirectory, getAgentsDirectory, getAllProviders, getAllSkillsDirs, getAvailableCLIAgents, getBuiltinPacksDir, getCICDTemplate, getConfigFile, getConfigFormat, getExecutionStrategy, getGlobalConfigPath, getGlobalSkillsDir, getIndexStatus, getInstallDir, getManualExecutionInstructions, getMemoryPaths, getMemoryStatus, getProjectConfigPath, getProvider, getSearchDirs, getSkillsDir, getStackTags, getSupportedTranslationAgents, getTechTags, globalMemoryDirectoryExists, importBundle, initContext, initProject, initializeMemoryDirectory, isAgentCLIAvailable, isAgentCompatible, isGitUrl, isIndexStale, isLocalPath, isPathInside, listCICDTemplates, listWorkflows, loadAgentMetadata, loadConfig, loadContext, loadIndex, loadMetadata, loadPlugin, loadPluginsFromDirectory, loadSkillMetadata, loadWorkflow, loadWorkflowByName, memoryDirectoryExists, parseAgentDir, parseAgentFile, parseShorthand, parseSkill, parseSkillContent, parseSkillContentToCanonical, parseSkillToCanonical, parseSource, parseWorkflow, readAgentContent, readSkillContent, runTestSuite, saveConfig, saveIndex, saveSkillMetadata, saveWorkflow, serializeWorkflow, setSkillEnabled, shellExecutor, skillMdTranslator, supportsAutoDiscovery, supportsSlashCommands, syncToAgent, syncToAllAgents, toCanonicalAgent, translateAgent, translateAgentContent, translateAgents, translateCanonicalAgent, translateSkill, translateSkillFile, translateSkillToAgent, translateSkillToAll, translatorRegistry, validateAgent, validateBuiltinPacks, validatePackDirectory, validatePackManifest, validatePlan, validateSkill, validateSkillContent, validateWorkflow, windsurfTranslator, wrapProgressCallbackWithMemory, writeTranslatedSkill };
8240
+ interface SkillEntry {
8241
+ source: string;
8242
+ skills?: string[];
8243
+ agents?: string[];
8244
+ enabled?: boolean;
8245
+ }
8246
+ interface SkillsManifest {
8247
+ version: number;
8248
+ skills: SkillEntry[];
8249
+ agents?: string[];
8250
+ installMethod?: 'symlink' | 'copy';
8251
+ updatedAt?: string;
8252
+ }
8253
+ declare function findManifestPath(startDir?: string): string | null;
8254
+ declare function loadManifest(manifestPath?: string): SkillsManifest | null;
8255
+ declare function saveManifest(manifest: SkillsManifest, manifestPath?: string): void;
8256
+ declare function addToManifest(source: string, options?: {
8257
+ skills?: string[];
8258
+ agents?: string[];
8259
+ }, manifestPath?: string): SkillsManifest;
8260
+ declare function removeFromManifest(source: string, manifestPath?: string): SkillsManifest | null;
8261
+ declare function initManifest(options?: {
8262
+ agents?: string[];
8263
+ installMethod?: 'symlink' | 'copy';
8264
+ }, manifestPath?: string): SkillsManifest;
8265
+ declare function generateManifestFromInstalled(installedSkills: Array<{
8266
+ name: string;
8267
+ source: string;
8268
+ agents?: string[];
8269
+ }>): SkillsManifest;
8270
+
8271
+ export { AGENT_CLI_CONFIGS, AGENT_CONFIG, AGENT_DISCOVERY_PATHS, AGENT_FORMAT_MAP, 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 AgentAdapterInfo, type AgentCLIConfig, type AgentCommandFormat, AgentConfig, type AgentDirectoryConfig, type AgentExecutionResult, type AgentFormatCategory, AgentFrontmatter, AgentHook, type AgentHookFormat, type AgentInstance, AgentLocation, AgentMetadata, AgentPermissionMode, type AgentSkillFormat, type AgentStatus, type AgentTranslationOptions, type AgentTranslationResult, 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, CUSTOM_AGENT_FORMAT_MAP, type CanonicalAgent, 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 CrossAgentSkill, type CurrentExecution, CursorTranslator, type CustomAgent, 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 SkillEntry, 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, type SkillTranslationOptions, type SkillTranslationResult, SkillTriggerEngine, SkillkitConfig, type SkillsManifest, 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, addToManifest, agentExists, 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, discoverAgents, discoverAgentsForAgent, discoverAgentsFromPath, discoverAgentsRecursive, discoverGlobalAgents, discoverSkills, dryRunExecutor, estimateTokens, executeWithAgent, exportBundle, extractAgentContent, extractAgentFrontmatter, extractField, extractFrontmatter, extractSkillMetadata, fetchSkillsFromRepo, findAgent, findAllAgents, findAllSkills, findManifestPath, findSkill, formatSkillAsPrompt, fromCanonicalAgent, generateManifestFromInstalled, generateSkillsConfig, getAgentCLIConfig, getAgentConfigFile, getAgentConfigPath, getAgentDirectoryConfig, getAgentFilename, getAgentFormat, getAgentSkillsDir, getAgentStats, getAgentTargetDirectory, getAgentsDirectory, getAllProviders, getAllSkillsDirs, getAvailableCLIAgents, getBuiltinPacksDir, getCICDTemplate, getConfigFile, getConfigFormat, getExecutionStrategy, getGlobalConfigPath, getGlobalSkillsDir, getIndexStatus, getInstallDir, getManualExecutionInstructions, getMemoryPaths, getMemoryStatus, getProjectConfigPath, getProvider, getSearchDirs, getSkillsDir, getStackTags, getSupportedTranslationAgents, getTechTags, globalMemoryDirectoryExists, importBundle, initContext, initManifest, initProject, initializeMemoryDirectory, isAgentCLIAvailable, isAgentCompatible, isGitUrl, isIndexStale, isLocalPath, isPathInside, listCICDTemplates, listWorkflows, loadAgentMetadata, loadConfig, loadContext, loadIndex, loadManifest, loadMetadata, loadPlugin, loadPluginsFromDirectory, loadSkillMetadata, loadWorkflow, loadWorkflowByName, memoryDirectoryExists, parseAgentDir, parseAgentFile, parseShorthand, parseSkill, parseSkillContent, parseSkillContentToCanonical, parseSkillToCanonical, parseSource, parseWorkflow, readAgentContent, readSkillContent, removeFromManifest, runTestSuite, saveConfig, saveIndex, saveManifest, saveSkillMetadata, saveWorkflow, serializeWorkflow, setSkillEnabled, shellExecutor, skillMdTranslator, supportsAutoDiscovery, supportsSlashCommands, syncToAgent, syncToAllAgents, toCanonicalAgent, translateAgent, translateAgentContent, translateAgents, translateCanonicalAgent, translateSkill, translateSkillFile, translateSkillToAgent, translateSkillToAll, translatorRegistry, validateAgent, validateBuiltinPacks, validatePackDirectory, validatePackManifest, validatePlan, validateSkill, validateSkillContent, validateWorkflow, windsurfTranslator, wrapProgressCallbackWithMemory, writeTranslatedSkill };
package/dist/index.js CHANGED
@@ -17367,6 +17367,161 @@ function escapeXml(text) {
17367
17367
  }
17368
17368
  var getAgentSkillsDir = getSkillsDir;
17369
17369
  var getAgentConfigFile = getConfigFile;
17370
+
17371
+ // src/manifest/index.ts
17372
+ import { readFileSync as readFileSync25, writeFileSync as writeFileSync18, existsSync as existsSync33 } from "fs";
17373
+ import { join as join34, dirname as dirname12 } from "path";
17374
+ import { parse as parseYaml12, stringify as stringifyYaml9 } from "yaml";
17375
+ var MANIFEST_FILENAMES = [".skills", ".skills.yaml", ".skills.yml", "skills.yaml"];
17376
+ function findManifestPath(startDir = process.cwd()) {
17377
+ let dir = startDir;
17378
+ while (dir !== dirname12(dir)) {
17379
+ for (const filename of MANIFEST_FILENAMES) {
17380
+ const manifestPath = join34(dir, filename);
17381
+ if (existsSync33(manifestPath)) {
17382
+ return manifestPath;
17383
+ }
17384
+ }
17385
+ dir = dirname12(dir);
17386
+ }
17387
+ return null;
17388
+ }
17389
+ function loadManifest(manifestPath) {
17390
+ const path2 = manifestPath || findManifestPath();
17391
+ if (!path2 || !existsSync33(path2)) {
17392
+ return null;
17393
+ }
17394
+ try {
17395
+ const content = readFileSync25(path2, "utf-8");
17396
+ const parsed = parseYaml12(content);
17397
+ if (!parsed || typeof parsed !== "object") {
17398
+ return null;
17399
+ }
17400
+ return {
17401
+ version: parsed.version || 1,
17402
+ skills: normalizeSkills(parsed.skills || []),
17403
+ agents: parsed.agents,
17404
+ installMethod: parsed.installMethod,
17405
+ updatedAt: parsed.updatedAt
17406
+ };
17407
+ } catch {
17408
+ return null;
17409
+ }
17410
+ }
17411
+ function normalizeSkills(skills) {
17412
+ return skills.map((skill) => {
17413
+ if (typeof skill === "string") {
17414
+ const parts = skill.split("/");
17415
+ if (parts.length >= 3) {
17416
+ return {
17417
+ source: `${parts[0]}/${parts[1]}`,
17418
+ skills: [parts.slice(2).join("/")],
17419
+ enabled: true
17420
+ };
17421
+ }
17422
+ return { source: skill, enabled: true };
17423
+ }
17424
+ if (typeof skill === "object" && skill !== null) {
17425
+ const entry = skill;
17426
+ return {
17427
+ source: String(entry.source || ""),
17428
+ skills: entry.skills,
17429
+ agents: entry.agents,
17430
+ enabled: entry.enabled !== false
17431
+ };
17432
+ }
17433
+ return { source: "", enabled: false };
17434
+ }).filter((s) => s.source);
17435
+ }
17436
+ function saveManifest(manifest, manifestPath) {
17437
+ const path2 = manifestPath || join34(process.cwd(), ".skills");
17438
+ const content = stringifyYaml9({
17439
+ version: manifest.version || 1,
17440
+ skills: manifest.skills.map((s) => {
17441
+ if (!s.skills && !s.agents && s.enabled !== false) {
17442
+ return s.source;
17443
+ }
17444
+ return s;
17445
+ }),
17446
+ ...manifest.agents && { agents: manifest.agents },
17447
+ ...manifest.installMethod && { installMethod: manifest.installMethod },
17448
+ updatedAt: (/* @__PURE__ */ new Date()).toISOString()
17449
+ });
17450
+ writeFileSync18(path2, content, "utf-8");
17451
+ }
17452
+ function addToManifest(source, options, manifestPath) {
17453
+ const existing = loadManifest(manifestPath) || {
17454
+ version: 1,
17455
+ skills: []
17456
+ };
17457
+ const existingIndex = existing.skills.findIndex((s) => s.source === source);
17458
+ if (existingIndex >= 0) {
17459
+ existing.skills[existingIndex] = {
17460
+ ...existing.skills[existingIndex],
17461
+ ...options,
17462
+ enabled: true
17463
+ };
17464
+ } else {
17465
+ existing.skills.push({
17466
+ source,
17467
+ ...options,
17468
+ enabled: true
17469
+ });
17470
+ }
17471
+ saveManifest(existing, manifestPath);
17472
+ return existing;
17473
+ }
17474
+ function removeFromManifest(source, manifestPath) {
17475
+ const existing = loadManifest(manifestPath);
17476
+ if (!existing) {
17477
+ return null;
17478
+ }
17479
+ existing.skills = existing.skills.filter((s) => s.source !== source);
17480
+ saveManifest(existing, manifestPath);
17481
+ return existing;
17482
+ }
17483
+ function initManifest(options, manifestPath) {
17484
+ const manifest = {
17485
+ version: 1,
17486
+ skills: [],
17487
+ ...options,
17488
+ updatedAt: (/* @__PURE__ */ new Date()).toISOString()
17489
+ };
17490
+ saveManifest(manifest, manifestPath);
17491
+ return manifest;
17492
+ }
17493
+ function generateManifestFromInstalled(installedSkills) {
17494
+ const skillsBySource = /* @__PURE__ */ new Map();
17495
+ for (const skill of installedSkills) {
17496
+ if (!skill.source) continue;
17497
+ const existing = skillsBySource.get(skill.source);
17498
+ if (existing) {
17499
+ existing.skills.push(skill.name);
17500
+ if (skill.agents) {
17501
+ skill.agents.forEach((a) => existing.agents.add(a));
17502
+ }
17503
+ } else {
17504
+ skillsBySource.set(skill.source, {
17505
+ skills: [skill.name],
17506
+ agents: new Set(skill.agents || [])
17507
+ });
17508
+ }
17509
+ }
17510
+ const skills = [];
17511
+ for (const [source, data] of skillsBySource) {
17512
+ skills.push({
17513
+ source,
17514
+ skills: data.skills.length > 0 ? data.skills : void 0,
17515
+ agents: data.agents.size > 0 ? Array.from(data.agents) : void 0,
17516
+ enabled: true
17517
+ });
17518
+ }
17519
+ return {
17520
+ version: 1,
17521
+ skills,
17522
+ updatedAt: (/* @__PURE__ */ new Date()).toISOString()
17523
+ };
17524
+ }
17370
17525
  export {
17371
17526
  AGENT_CLI_CONFIGS,
17372
17527
  AGENT_CONFIG,
@@ -17462,6 +17617,7 @@ export {
17462
17617
  WORKFLOW_EXTENSION,
17463
17618
  WindsurfTranslator,
17464
17619
  WorkflowOrchestrator,
17620
+ addToManifest,
17465
17621
  agentExists,
17466
17622
  analyzeProject,
17467
17623
  buildSkillIndex,
@@ -17523,9 +17679,11 @@ export {
17523
17679
  findAgent,
17524
17680
  findAllAgents,
17525
17681
  findAllSkills,
17682
+ findManifestPath,
17526
17683
  findSkill,
17527
17684
  formatSkillAsPrompt,
17528
17685
  fromCanonicalAgent,
17686
+ generateManifestFromInstalled,
17529
17687
  generateSkillsConfig,
17530
17688
  getAgentCLIConfig,
17531
17689
  getAgentConfigFile,
@@ -17562,6 +17720,7 @@ export {
17562
17720
  globalMemoryDirectoryExists,
17563
17721
  importBundle,
17564
17722
  initContext,
17723
+ initManifest,
17565
17724
  initProject,
17566
17725
  initializeMemoryDirectory,
17567
17726
  isAgentCLIAvailable,
@@ -17576,6 +17735,7 @@ export {
17576
17735
  loadConfig,
17577
17736
  loadContext,
17578
17737
  loadIndex,
17738
+ loadManifest,
17579
17739
  loadMetadata,
17580
17740
  loadPlugin,
17581
17741
  loadPluginsFromDirectory,
@@ -17594,9 +17754,11 @@ export {
17594
17754
  parseWorkflow,
17595
17755
  readAgentContent,
17596
17756
  readSkillContent,
17757
+ removeFromManifest,
17597
17758
  runTestSuite,
17598
17759
  saveConfig,
17599
17760
  saveIndex,
17761
+ saveManifest,
17600
17762
  saveSkillMetadata,
17601
17763
  saveWorkflow,
17602
17764
  serializeWorkflow,