@skillkit/cli 1.11.0 → 1.12.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
@@ -1240,6 +1240,16 @@ declare class SkillMdCheckCommand extends Command {
1240
1240
  private scanDir;
1241
1241
  }
1242
1242
 
1243
+ declare class ServeCommand extends Command {
1244
+ static paths: string[][];
1245
+ static usage: clipanion.Usage;
1246
+ port: string;
1247
+ host: string;
1248
+ corsOrigin: string;
1249
+ cacheTtl: string;
1250
+ execute(): Promise<number>;
1251
+ }
1252
+
1243
1253
  declare const loadSkillMetadata: typeof loadSkillMetadata$1;
1244
1254
  declare const saveSkillMetadata: typeof saveSkillMetadata$1;
1245
1255
  declare function getSearchDirs(agentType?: AgentType): string[];
@@ -1247,4 +1257,4 @@ declare function getInstallDir(global?: boolean, agentType?: AgentType): string;
1247
1257
  declare function getAgentConfigPath(agentType?: AgentType): string;
1248
1258
  declare function initProject(agentType?: AgentType): Promise<void>;
1249
1259
 
1250
- export { AICommand, AgentAvailableCommand, AgentCommand, AgentCreateCommand, AgentFromSkillCommand, AgentInstallCommand, AgentListCommand, AgentShowCommand, AgentSyncCommand, AgentTranslateCommand, AgentValidateCommand, AuditCommand, CICDCommand, CheckCommand, CommandAvailableCommand, CommandCmd, CommandInstallCommand, ContextCommand, CreateCommand, DisableCommand, EnableCommand, FindCommand, FixCommand, GuidelineCommand, GuidelineCreateCommand, GuidelineDisableCommand, GuidelineEnableCommand, GuidelineListCommand, GuidelineRemoveCommand, GuidelineShowCommand, HookCommand, HookTemplateApplyCommand, HookTemplateListCommand, HookTemplateShowCommand, InitCommand, InstallCommand, LearnCommand, ListCommand, ManifestAddCommand, ManifestCommand, ManifestGenerateCommand, ManifestInitCommand, ManifestInstallCommand, ManifestRemoveCommand, MarketplaceCommand, MemoryCommand, MeshCommand, MessageCommand, MethodologyCommand, PatternApproveCommand, PatternClusterCommand, PatternExportCommand, PatternFeedbackCommand, PatternImportCommand, PatternRejectCommand, PatternStatusCommand, PauseCommand, PlanCommand, PluginCommand, PrimerCommand, ProfileCommand, ProfileCreateCommand, ProfileListCommand, ProfileRemoveCommand, PublishCommand, PublishSubmitCommand, QuickCommand, ReadCommand, RecommendCommand, RemoveCommand, ResumeCommand, RunCommand, SessionCommand, SessionCompleteCommand, SessionInProgressCommand, SessionListCommand, SessionLoadCommand, SessionNoteCommand, SessionStartCommand, SessionStatusCommand, SettingsCommand, SkillMdCheckCommand, SkillMdInitCommand, SkillMdValidateCommand, StatusCommand, SyncCommand, TeamCommand, TestCommand, TranslateCommand, TreeCommand, UICommand, UpdateCommand, ValidateCommand, WorkflowCreateCommand, WorkflowListCommand, WorkflowPipelineCommand, WorkflowPipelineListCommand, WorkflowRunCommand, getAgentConfigPath, getInstallDir, getSearchDirs, initProject, loadSkillMetadata, saveSkillMetadata };
1260
+ export { AICommand, AgentAvailableCommand, AgentCommand, AgentCreateCommand, AgentFromSkillCommand, AgentInstallCommand, AgentListCommand, AgentShowCommand, AgentSyncCommand, AgentTranslateCommand, AgentValidateCommand, AuditCommand, CICDCommand, CheckCommand, CommandAvailableCommand, CommandCmd, CommandInstallCommand, ContextCommand, CreateCommand, DisableCommand, EnableCommand, FindCommand, FixCommand, GuidelineCommand, GuidelineCreateCommand, GuidelineDisableCommand, GuidelineEnableCommand, GuidelineListCommand, GuidelineRemoveCommand, GuidelineShowCommand, HookCommand, HookTemplateApplyCommand, HookTemplateListCommand, HookTemplateShowCommand, InitCommand, InstallCommand, LearnCommand, ListCommand, ManifestAddCommand, ManifestCommand, ManifestGenerateCommand, ManifestInitCommand, ManifestInstallCommand, ManifestRemoveCommand, MarketplaceCommand, MemoryCommand, MeshCommand, MessageCommand, MethodologyCommand, PatternApproveCommand, PatternClusterCommand, PatternExportCommand, PatternFeedbackCommand, PatternImportCommand, PatternRejectCommand, PatternStatusCommand, PauseCommand, PlanCommand, PluginCommand, PrimerCommand, ProfileCommand, ProfileCreateCommand, ProfileListCommand, ProfileRemoveCommand, PublishCommand, PublishSubmitCommand, QuickCommand, ReadCommand, RecommendCommand, RemoveCommand, ResumeCommand, RunCommand, ServeCommand, SessionCommand, SessionCompleteCommand, SessionInProgressCommand, SessionListCommand, SessionLoadCommand, SessionNoteCommand, SessionStartCommand, SessionStatusCommand, SettingsCommand, SkillMdCheckCommand, SkillMdInitCommand, SkillMdValidateCommand, StatusCommand, SyncCommand, TeamCommand, TestCommand, TranslateCommand, TreeCommand, UICommand, UpdateCommand, ValidateCommand, WorkflowCreateCommand, WorkflowListCommand, WorkflowPipelineCommand, WorkflowPipelineListCommand, WorkflowRunCommand, getAgentConfigPath, getInstallDir, getSearchDirs, initProject, loadSkillMetadata, saveSkillMetadata };
package/dist/index.js CHANGED
@@ -140068,6 +140068,81 @@ var SkillMdCheckCommand = class extends Command51 {
140068
140068
  }
140069
140069
  };
140070
140070
 
140071
+ // src/commands/serve.ts
140072
+ init_onboarding();
140073
+ import { Command as Command52, Option as Option50 } from "clipanion";
140074
+ var ServeCommand = class extends Command52 {
140075
+ static paths = [["serve"], ["server"]];
140076
+ static usage = Command52.Usage({
140077
+ description: "Start the SkillKit REST API server for skill discovery",
140078
+ details: `
140079
+ Launches a local HTTP server that exposes the SkillKit skill catalog
140080
+ via a REST API. Useful for integrating with other tools, building
140081
+ custom UIs, or enabling agent-native skill discovery.
140082
+ `,
140083
+ examples: [
140084
+ ["Start server on default port", "$0 serve"],
140085
+ ["Start on custom port", "$0 serve --port 8080"],
140086
+ ["Start with custom CORS", '$0 serve --cors "http://localhost:3000"']
140087
+ ]
140088
+ });
140089
+ port = Option50.String("--port,-p", "3737", {
140090
+ description: "Port to listen on"
140091
+ });
140092
+ host = Option50.String("--host,-H", "0.0.0.0", {
140093
+ description: "Host to bind to"
140094
+ });
140095
+ corsOrigin = Option50.String("--cors", "*", {
140096
+ description: "CORS allowed origin"
140097
+ });
140098
+ cacheTtl = Option50.String("--cache-ttl", "86400000", {
140099
+ description: "Cache TTL in milliseconds"
140100
+ });
140101
+ async execute() {
140102
+ header("SkillKit API Server");
140103
+ const skills = (skills_default.skills || []).map((skill) => ({
140104
+ name: skill.name,
140105
+ description: skill.description,
140106
+ source: skill.source || "",
140107
+ repo: skill.repo,
140108
+ tags: skill.tags,
140109
+ category: skill.category
140110
+ }));
140111
+ step(`Loading ${skills.length} skills from marketplace`);
140112
+ const portNum = parseInt(this.port, 10) || 3737;
140113
+ const cacheTtlMs = parseInt(this.cacheTtl, 10) || 864e5;
140114
+ try {
140115
+ const { startServer } = await import("@skillkit/api");
140116
+ await startServer({
140117
+ port: portNum,
140118
+ host: this.host,
140119
+ corsOrigin: this.corsOrigin,
140120
+ cacheTtlMs,
140121
+ skills
140122
+ });
140123
+ step(`Server running at ${colors.cyan(`http://${this.host}:${portNum}`)}`);
140124
+ console.log("");
140125
+ console.log(colors.muted("Endpoints:"));
140126
+ console.log(colors.muted(` GET /health - Server health check`));
140127
+ console.log(colors.muted(` GET /search?q=... - Search skills`));
140128
+ console.log(colors.muted(` POST /search - Search with filters`));
140129
+ console.log(colors.muted(` GET /skills/:o/:r/:id - Get specific skill`));
140130
+ console.log(colors.muted(` GET /trending - Top skills`));
140131
+ console.log(colors.muted(` GET /categories - Skill categories`));
140132
+ console.log(colors.muted(` GET /cache/stats - Cache statistics`));
140133
+ console.log("");
140134
+ console.log(colors.muted("Press Ctrl+C to stop"));
140135
+ await new Promise(() => {
140136
+ });
140137
+ } catch (err) {
140138
+ const message = err instanceof Error ? err.message : String(err);
140139
+ console.error(colors.error(`Failed to start server: ${message}`));
140140
+ return 1;
140141
+ }
140142
+ return 0;
140143
+ }
140144
+ };
140145
+
140071
140146
  // src/index.ts
140072
140147
  init_helpers();
140073
140148
  export {
@@ -140143,6 +140218,7 @@ export {
140143
140218
  RemoveCommand,
140144
140219
  ResumeCommand,
140145
140220
  RunCommand,
140221
+ ServeCommand,
140146
140222
  SessionCommand,
140147
140223
  SessionCompleteCommand,
140148
140224
  SessionInProgressCommand,