@danieldeusing/seedr 0.1.87 → 0.1.88

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
@@ -3,20 +3,15 @@ export { CodingAgent, ComponentType, RegistryItem, RegistryManifest } from '@see
3
3
 
4
4
  type InstallScope = "project" | "user" | "local";
5
5
  type InstallMethod = "symlink" | "copy";
6
- type ContentStructure = "directory" | "file" | "json-merge" | "plugin";
7
6
  interface ContentTypeConfig {
8
- /** Relative path from agent root (e.g., "skills", "agents") */
7
+ /**
8
+ * Relative path from the agent root (e.g. "skills"). The only field anything
9
+ * reads — `getContentPath` is the sole consumer. Layout facts that looked
10
+ * configurable here (extension, structure, mergeTarget, mergeField) were
11
+ * never read: each handler owns its own format, so the table said one thing
12
+ * and the code did another.
13
+ */
9
14
  path: string;
10
- /** File extension (e.g., ".md") */
11
- extension: string;
12
- /** How content is installed */
13
- structure: ContentStructure;
14
- /** Main file for directories (e.g., "SKILL.md") */
15
- mainFile?: string;
16
- /** For json-merge: target file to merge into */
17
- mergeTarget?: string;
18
- /** For json-merge: field to merge into (e.g., "hooks", "mcpServers") */
19
- mergeField?: string;
20
15
  }
21
16
  interface CodingAgentConfig {
22
17
  /** Display name (e.g., "Claude Code") */
@@ -48,9 +43,15 @@ interface InstalledItem {
48
43
  installedAt: string;
49
44
  }
50
45
 
46
+ /**
47
+ * Where each agent keeps what. The deprecated `gemini` id shares Antigravity's
48
+ * layout, so an old flag or an unmigrated item still installs to the right place.
49
+ */
51
50
  declare const CODING_AGENTS: Record<CodingAgent, CodingAgentConfig>;
51
+ /** The agents `--agents all` expands to: canonical ids only. */
52
52
  declare const ALL_AGENTS: CodingAgent[];
53
53
  declare function getAgentConfig(agent: CodingAgent): CodingAgentConfig;
54
+ /** The agent's skills directory. Used by detection and `init`. */
54
55
  declare function getAgentPath(agent: CodingAgent, scope: "project" | "user", cwd?: string): string;
55
56
 
56
57
  declare function loadManifest(): Promise<RegistryManifest>;
@@ -59,6 +60,10 @@ declare function listItems(type?: ComponentType): Promise<RegistryItem[]>;
59
60
  declare function searchItems(query: string): Promise<RegistryItem[]>;
60
61
  /**
61
62
  * Fetch the main content file for an item (e.g., SKILL.md).
63
+ *
64
+ * A local checkout is read directly. Remote content goes through
65
+ * `fetchItemToDestination` into a temporary directory so it is subject to the
66
+ * same pinning and digest verification as a full install.
62
67
  */
63
68
  declare function getItemContent(item: RegistryItem): Promise<string>;
64
69
 
@@ -73,49 +78,6 @@ declare function installSkill(item: RegistryItem, agents: CodingAgent[], scope:
73
78
  declare function uninstallSkill(slug: string, agent: CodingAgent, scope: InstallScope, cwd?: string): Promise<boolean>;
74
79
  declare function getInstalledSkills(agent: CodingAgent, scope: InstallScope, cwd?: string): Promise<string[]>;
75
80
 
76
- /**
77
- * Strategy pattern interfaces for skill conversion.
78
- *
79
- * Each AI tool has a converter that transforms the canonical (Claude) format
80
- * to the tool-specific format.
81
- */
82
- interface SkillFrontmatter {
83
- name?: string;
84
- description?: string;
85
- "allowed-tools"?: string[];
86
- [key: string]: unknown;
87
- }
88
- interface ParsedSkill {
89
- frontmatter: SkillFrontmatter;
90
- body: string;
91
- raw: string;
92
- }
93
-
94
- /**
95
- * Skill Converter Registry
96
- *
97
- * Strategy pattern implementation for converting skills between AI tool formats.
98
- * The canonical format is Claude Code's markdown with YAML frontmatter.
99
- *
100
- * To add a new tool:
101
- * 1. Create a new converter file (e.g., newtool.ts)
102
- * 2. Implement the SkillConverter interface
103
- * 3. Add it to the converters registry below
104
- */
105
-
106
- /**
107
- * Parse skill markdown content into frontmatter and body.
108
- */
109
- declare function parseSkillMarkdown(content: string): ParsedSkill;
110
- /**
111
- * Convert skill content to a specific tool format using the Strategy pattern.
112
- *
113
- * @param content - Raw skill content in canonical (Claude) format
114
- * @param targetTool - The AI tool to convert for
115
- * @returns Converted content string
116
- */
117
- declare function convertSkillToTool(content: string, targetTool: CodingAgent): string;
118
-
119
81
  interface DetectedAgent {
120
82
  agent: CodingAgent;
121
83
  scope: InstallScope;
@@ -125,4 +87,4 @@ declare function detectInstalledAgents(cwd?: string): Promise<DetectedAgent[]>;
125
87
  declare function detectProjectAgents(cwd?: string): Promise<CodingAgent[]>;
126
88
  declare function isAgentInstalled(agent: CodingAgent, scope: InstallScope, cwd?: string): Promise<boolean>;
127
89
 
128
- export { ALL_AGENTS, CODING_AGENTS, type CodingAgentConfig, type InstallMethod, type InstallOptions, type InstallScope, type InstalledItem, convertSkillToTool, detectInstalledAgents, detectProjectAgents, getAgentConfig, getAgentPath, getInstalledSkills, getItem, getItemContent, installSkill, isAgentInstalled, listItems, loadManifest, parseSkillMarkdown, searchItems, uninstallSkill };
90
+ export { ALL_AGENTS, CODING_AGENTS, type CodingAgentConfig, type InstallMethod, type InstallOptions, type InstallScope, type InstalledItem, detectInstalledAgents, detectProjectAgents, getAgentConfig, getAgentPath, getInstalledSkills, getItem, getItemContent, installSkill, isAgentInstalled, listItems, loadManifest, searchItems, uninstallSkill };
package/dist/index.js CHANGED
@@ -15,114 +15,10 @@ import {
15
15
  loadManifest,
16
16
  searchItems,
17
17
  uninstallSkill
18
- } from "./chunk-77M7PGDO.js";
19
-
20
- // src/converters/index.ts
21
- import matter from "gray-matter";
22
-
23
- // src/converters/claude.ts
24
- var claudeConverter = {
25
- convert(skill) {
26
- return skill.raw;
27
- }
28
- };
29
-
30
- // src/converters/copilot.ts
31
- var copilotConverter = {
32
- convert(skill) {
33
- const { frontmatter, body } = skill;
34
- const lines = [];
35
- if (frontmatter.name) {
36
- lines.push(`# ${frontmatter.name}`, "");
37
- }
38
- if (frontmatter.description) {
39
- lines.push(frontmatter.description, "");
40
- }
41
- lines.push(body);
42
- return lines.join("\n");
43
- }
44
- };
45
-
46
- // src/converters/gemini.ts
47
- var geminiConverter = {
48
- convert(skill) {
49
- const { frontmatter, body } = skill;
50
- const lines = [];
51
- if (frontmatter.name) {
52
- lines.push(`# ${frontmatter.name}`, "");
53
- }
54
- if (frontmatter.description) {
55
- lines.push(`> ${frontmatter.description}`, "");
56
- }
57
- lines.push("## Instructions", "", body);
58
- return lines.join("\n");
59
- }
60
- };
61
-
62
- // src/converters/codex.ts
63
- var codexConverter = {
64
- convert(skill) {
65
- const { frontmatter, body } = skill;
66
- const lines = [];
67
- lines.push("# Agent Instructions", "");
68
- if (frontmatter.name) {
69
- lines.push(`**Name:** ${frontmatter.name}`);
70
- }
71
- if (frontmatter.description) {
72
- lines.push(`**Description:** ${frontmatter.description}`);
73
- }
74
- if (frontmatter.name || frontmatter.description) {
75
- lines.push("");
76
- }
77
- lines.push("## Behavior", "", body);
78
- return lines.join("\n");
79
- }
80
- };
81
-
82
- // src/converters/opencode.ts
83
- var opencodeConverter = {
84
- convert(skill) {
85
- const { frontmatter, body } = skill;
86
- const lines = [];
87
- if (frontmatter.name) {
88
- lines.push(`# ${frontmatter.name}`, "");
89
- }
90
- if (frontmatter.description) {
91
- lines.push(frontmatter.description, "");
92
- }
93
- lines.push("---", "", body);
94
- return lines.join("\n");
95
- }
96
- };
97
-
98
- // src/converters/index.ts
99
- var converters = {
100
- claude: claudeConverter,
101
- copilot: copilotConverter,
102
- gemini: geminiConverter,
103
- codex: codexConverter,
104
- opencode: opencodeConverter
105
- };
106
- function parseSkillMarkdown(content) {
107
- const { data, content: body } = matter(content);
108
- return {
109
- frontmatter: data,
110
- body: body.trim(),
111
- raw: content
112
- };
113
- }
114
- function convertSkillToTool(content, targetTool) {
115
- const converter = converters[targetTool];
116
- if (!converter) {
117
- return content;
118
- }
119
- const skill = parseSkillMarkdown(content);
120
- return converter.convert(skill);
121
- }
18
+ } from "./chunk-WJEBBHTL.js";
122
19
  export {
123
20
  ALL_AGENTS,
124
21
  CODING_AGENTS,
125
- convertSkillToTool,
126
22
  detectInstalledAgents,
127
23
  detectProjectAgents,
128
24
  getAgentConfig,
@@ -134,7 +30,6 @@ export {
134
30
  isAgentInstalled,
135
31
  listItems,
136
32
  loadManifest,
137
- parseSkillMarkdown,
138
33
  searchItems,
139
34
  uninstallSkill
140
35
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@danieldeusing/seedr",
3
- "version": "0.1.87",
3
+ "version": "0.1.88",
4
4
  "description": "Seed your projects with AI configurations",
5
5
  "type": "module",
6
6
  "bin": {
@@ -30,20 +30,18 @@
30
30
  "@clack/prompts": "^1.0.1",
31
31
  "chalk": "^5.3.0",
32
32
  "commander": "^14.0.0",
33
- "gray-matter": "^4.0.3",
34
- "inquirer": "^13.0.0",
35
33
  "ora": "^9.0.0"
36
34
  },
37
35
  "devDependencies": {
38
36
  "@seedr/shared": "workspace:*",
39
- "@types/inquirer": "^9.0.7",
40
37
  "@types/node": "^25.0.0",
41
38
  "@vitest/coverage-v8": "^4.1.0",
42
39
  "memfs": "^4.14.0",
43
40
  "tsup": "^8.3.0",
44
41
  "tsx": "^4.19.0",
45
42
  "typescript": "^5.7.0",
46
- "vitest": "^4.1.0"
43
+ "vitest": "^4.1.0",
44
+ "@seedr/registry-ops": "workspace:*"
47
45
  },
48
46
  "keywords": [
49
47
  "ai",