@julianpedro/plugin-dev-ai-hub-common 0.1.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.
@@ -0,0 +1,13 @@
1
+ 'use strict';
2
+
3
+ var schemas = require('./schemas.cjs.js');
4
+ var installPaths = require('./installPaths.cjs.js');
5
+
6
+
7
+
8
+ exports.AiAssetFrontmatterSchema = schemas.AiAssetFrontmatterSchema;
9
+ exports.AiToolEnum = schemas.AiToolEnum;
10
+ exports.AssetTypeEnum = schemas.AssetTypeEnum;
11
+ exports.getInstallPath = installPaths.getInstallPath;
12
+ exports.getInstallPathsForAsset = installPaths.getInstallPathsForAsset;
13
+ //# sourceMappingURL=index.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;"}
@@ -0,0 +1,179 @@
1
+ import { z } from 'zod';
2
+
3
+ type AssetType = 'instruction' | 'agent' | 'skill' | 'workflow';
4
+ type AiTool = 'all' | 'github-copilot' | 'claude-code' | 'google-gemini' | 'cursor';
5
+ /** Lightweight summary returned by list endpoints — no markdown content. */
6
+ interface AiAssetSummary {
7
+ id: string;
8
+ providerId: string;
9
+ name: string;
10
+ /** Human-readable display name. Falls back to `name` when not set. */
11
+ label?: string;
12
+ description: string;
13
+ type: AssetType;
14
+ tools: AiTool[];
15
+ tags: string[];
16
+ author: string;
17
+ icon?: string;
18
+ version: string;
19
+ installCount: number;
20
+ syncedAt: string;
21
+ createdAt: string;
22
+ updatedAt: string;
23
+ }
24
+ interface AiAsset {
25
+ id: string;
26
+ providerId: string;
27
+ name: string;
28
+ /** Human-readable display name. Falls back to `name` when not set. */
29
+ label?: string;
30
+ description: string;
31
+ type: AssetType;
32
+ tools: AiTool[];
33
+ tags: string[];
34
+ author: string;
35
+ icon?: string;
36
+ version: string;
37
+ /** Override the install path for all tools */
38
+ installPath?: string;
39
+ /** Override the install path per tool */
40
+ installPaths?: Record<string, string>;
41
+ /** Pure markdown content from the .md file, never modified */
42
+ content: string;
43
+ /** Raw YAML of the metadata file */
44
+ yamlRaw: string;
45
+ /** Extra metadata stored from the envelope (e.g. resources for skills) */
46
+ metadata?: Record<string, unknown>;
47
+ /**
48
+ * Content of bundled resource files for skills (path → file content).
49
+ * Only populated for assets of type `skill` that declare `resources` in the envelope.
50
+ */
51
+ resourcesContent?: Record<string, string>;
52
+ /** Path of the .yaml file in the repository */
53
+ yamlPath: string;
54
+ /** Path of the .md file in the repository */
55
+ mdPath: string;
56
+ repoUrl: string;
57
+ branch: string;
58
+ commitSha?: string;
59
+ installCount: number;
60
+ syncedAt: string;
61
+ createdAt: string;
62
+ updatedAt: string;
63
+ }
64
+ interface AiAssetListResponse {
65
+ items: AiAssetSummary[];
66
+ totalCount: number;
67
+ page: number;
68
+ pageSize: number;
69
+ }
70
+ interface AiHubProvider {
71
+ id: string;
72
+ type: 'github' | 'bitbucket' | 'azure-devops' | 'gitlab' | 'git';
73
+ target: string;
74
+ branch: string;
75
+ lastSync?: string;
76
+ lastCommit?: string;
77
+ status: 'idle' | 'syncing' | 'error';
78
+ error?: string;
79
+ assetCount: number;
80
+ }
81
+ interface AiHubStats {
82
+ totalAssets: number;
83
+ byType: Record<AssetType, number>;
84
+ byTool: Record<string, number>;
85
+ byProvider: Record<string, number>;
86
+ lastSync?: string;
87
+ }
88
+ interface AssetListFilter {
89
+ type?: AssetType;
90
+ tool?: string;
91
+ tags?: string[];
92
+ search?: string;
93
+ providerId?: string;
94
+ page?: number;
95
+ pageSize?: number;
96
+ }
97
+
98
+ declare const AiToolEnum: z.ZodEnum<["all", "github-copilot", "claude-code", "google-gemini", "cursor"]>;
99
+ declare const AssetTypeEnum: z.ZodEnum<["instruction", "agent", "skill", "workflow"]>;
100
+ /**
101
+ * Schema for the YAML metadata file (.yaml) that acts as an envelope.
102
+ * The actual asset content lives in the referenced .md file.
103
+ */
104
+ declare const AiAssetFrontmatterSchema: z.ZodObject<{
105
+ /** Path to the .md content file, relative to the .yaml file directory.
106
+ * If omitted, the parser falls back to <same-name>.md by convention. */
107
+ content: z.ZodOptional<z.ZodString>;
108
+ name: z.ZodString;
109
+ /** Human-readable display label shown in the UI. Falls back to `name` when omitted. */
110
+ label: z.ZodOptional<z.ZodString>;
111
+ description: z.ZodString;
112
+ type: z.ZodEnum<["instruction", "agent", "skill", "workflow"]>;
113
+ tools: z.ZodArray<z.ZodEnum<["all", "github-copilot", "claude-code", "google-gemini", "cursor"]>, "many">;
114
+ tags: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
115
+ author: z.ZodDefault<z.ZodOptional<z.ZodString>>;
116
+ icon: z.ZodOptional<z.ZodString>;
117
+ version: z.ZodDefault<z.ZodOptional<z.ZodString>>;
118
+ updatedAt: z.ZodOptional<z.ZodString>;
119
+ installPath: z.ZodOptional<z.ZodString>;
120
+ installPaths: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
121
+ resources: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
122
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
123
+ /** Path to the .md content file, relative to the .yaml file directory.
124
+ * If omitted, the parser falls back to <same-name>.md by convention. */
125
+ content: z.ZodOptional<z.ZodString>;
126
+ name: z.ZodString;
127
+ /** Human-readable display label shown in the UI. Falls back to `name` when omitted. */
128
+ label: z.ZodOptional<z.ZodString>;
129
+ description: z.ZodString;
130
+ type: z.ZodEnum<["instruction", "agent", "skill", "workflow"]>;
131
+ tools: z.ZodArray<z.ZodEnum<["all", "github-copilot", "claude-code", "google-gemini", "cursor"]>, "many">;
132
+ tags: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
133
+ author: z.ZodDefault<z.ZodOptional<z.ZodString>>;
134
+ icon: z.ZodOptional<z.ZodString>;
135
+ version: z.ZodDefault<z.ZodOptional<z.ZodString>>;
136
+ updatedAt: z.ZodOptional<z.ZodString>;
137
+ installPath: z.ZodOptional<z.ZodString>;
138
+ installPaths: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
139
+ resources: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
140
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
141
+ /** Path to the .md content file, relative to the .yaml file directory.
142
+ * If omitted, the parser falls back to <same-name>.md by convention. */
143
+ content: z.ZodOptional<z.ZodString>;
144
+ name: z.ZodString;
145
+ /** Human-readable display label shown in the UI. Falls back to `name` when omitted. */
146
+ label: z.ZodOptional<z.ZodString>;
147
+ description: z.ZodString;
148
+ type: z.ZodEnum<["instruction", "agent", "skill", "workflow"]>;
149
+ tools: z.ZodArray<z.ZodEnum<["all", "github-copilot", "claude-code", "google-gemini", "cursor"]>, "many">;
150
+ tags: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
151
+ author: z.ZodDefault<z.ZodOptional<z.ZodString>>;
152
+ icon: z.ZodOptional<z.ZodString>;
153
+ version: z.ZodDefault<z.ZodOptional<z.ZodString>>;
154
+ updatedAt: z.ZodOptional<z.ZodString>;
155
+ installPath: z.ZodOptional<z.ZodString>;
156
+ installPaths: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
157
+ resources: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
158
+ }, z.ZodTypeAny, "passthrough">>;
159
+ type AiAssetFrontmatter = z.infer<typeof AiAssetFrontmatterSchema>;
160
+
161
+ interface InstallPathOverrides {
162
+ /** Single path override — applies to all tools when installPaths has no entry for the tool */
163
+ installPath?: string;
164
+ /** Per-tool path overrides — highest priority */
165
+ installPaths?: Record<string, string>;
166
+ }
167
+ /**
168
+ * Returns the recommended install path for an asset in a given tool's workspace.
169
+ * Resolution order: installPaths[tool] > installPath > built-in convention.
170
+ */
171
+ declare function getInstallPath(type: AssetType, tool: AiTool | string, name: string, overrides?: InstallPathOverrides): string;
172
+ /**
173
+ * Returns install paths for all tools in the asset's tools list.
174
+ * If tools contains 'all', returns paths for every known tool.
175
+ */
176
+ declare function getInstallPathsForAsset(type: AssetType, tools: (AiTool | string)[], name: string, overrides?: InstallPathOverrides): Record<string, string>;
177
+
178
+ export { AiAssetFrontmatterSchema, AiToolEnum, AssetTypeEnum, getInstallPath, getInstallPathsForAsset };
179
+ export type { AiAsset, AiAssetFrontmatter, AiAssetListResponse, AiAssetSummary, AiHubProvider, AiHubStats, AiTool, AssetListFilter, AssetType, InstallPathOverrides };
@@ -0,0 +1,3 @@
1
+ export { AiAssetFrontmatterSchema, AiToolEnum, AssetTypeEnum } from './schemas.esm.js';
2
+ export { getInstallPath, getInstallPathsForAsset } from './installPaths.esm.js';
3
+ //# sourceMappingURL=index.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -0,0 +1,58 @@
1
+ 'use strict';
2
+
3
+ function toSlug(name) {
4
+ return name.toLowerCase().replace(/\s+/g, "-").replace(/[^a-z0-9-_]/g, "");
5
+ }
6
+ const CONVENTIONS = {
7
+ instruction: {
8
+ "claude-code": (name) => `.claude/rules/${name}.md`,
9
+ "github-copilot": (name) => `.github/instructions/${name}.instructions.md`,
10
+ "google-gemini": (_) => `GEMINI.md`,
11
+ "cursor": (name) => `.cursor/rules/${name}.mdc`,
12
+ "all": (name) => `.ai/instructions/${name}.md`,
13
+ "default": (name) => `.ai/instructions/${name}.md`
14
+ },
15
+ agent: {
16
+ "claude-code": (name) => `.claude/agents/${name}.md`,
17
+ "github-copilot": (name) => `.github/agents/${name}.agent.md`,
18
+ "google-gemini": (_) => `GEMINI.md`,
19
+ "cursor": (name) => `.cursor/rules/${name}.mdc`,
20
+ "all": (name) => `.ai/agents/${name}.md`,
21
+ "default": (name) => `.ai/agents/${name}.md`
22
+ },
23
+ skill: {
24
+ "claude-code": (name) => `.claude/skills/${name}/SKILL.md`,
25
+ "github-copilot": (name) => `.claude/skills/${name}/SKILL.md`,
26
+ "google-gemini": (name) => `.claude/skills/${name}/SKILL.md`,
27
+ "cursor": (name) => `.cursor/skills/${name}/SKILL.md`,
28
+ "all": (name) => `.claude/skills/${name}/SKILL.md`,
29
+ "default": (name) => `.claude/skills/${name}/SKILL.md`
30
+ },
31
+ workflow: {
32
+ "claude-code": (name) => `.claude/workflows/${name}.md`,
33
+ "github-copilot": (name) => `.github/workflows/${name}.workflow.md`,
34
+ "google-gemini": (name) => `.gemini/workflows/${name}.md`,
35
+ "cursor": (name) => `.cursor/rules/${name}.mdc`,
36
+ "all": (name) => `.ai/workflows/${name}.md`,
37
+ "default": (name) => `.ai/workflows/${name}.md`
38
+ }
39
+ };
40
+ function getInstallPath(type, tool, name, overrides) {
41
+ if (overrides?.installPaths?.[tool]) return overrides.installPaths[tool];
42
+ if (overrides?.installPath) return overrides.installPath;
43
+ const slug = toSlug(name);
44
+ const toolConventions = CONVENTIONS[type];
45
+ const fn = toolConventions[tool] ?? toolConventions.default;
46
+ return fn(slug);
47
+ }
48
+ function getInstallPathsForAsset(type, tools, name, overrides) {
49
+ const ALL_TOOLS = ["claude-code", "github-copilot", "google-gemini", "cursor"];
50
+ const resolvedTools = tools.includes("all") ? ALL_TOOLS : tools;
51
+ return Object.fromEntries(
52
+ resolvedTools.map((tool) => [tool, getInstallPath(type, tool, name, overrides)])
53
+ );
54
+ }
55
+
56
+ exports.getInstallPath = getInstallPath;
57
+ exports.getInstallPathsForAsset = getInstallPathsForAsset;
58
+ //# sourceMappingURL=installPaths.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"installPaths.cjs.js","sources":["../src/installPaths.ts"],"sourcesContent":["import type { AssetType, AiTool } from './types';\n\n/** Sanitize asset name for use in file paths */\nfunction toSlug(name: string): string {\n return name.toLowerCase().replace(/\\s+/g, '-').replace(/[^a-z0-9-_]/g, '');\n}\n\n/**\n * Convention table: (type, tool) → install path template.\n * Returns the recommended filesystem path for an asset given the target tool.\n *\n * Priority: installPaths[tool] > installPath > convention below.\n */\nconst CONVENTIONS: Record<AssetType, Record<AiTool | 'default', (name: string) => string>> = {\n instruction: {\n 'claude-code': name => `.claude/rules/${name}.md`,\n 'github-copilot': name => `.github/instructions/${name}.instructions.md`,\n 'google-gemini': _ => `GEMINI.md`,\n 'cursor': name => `.cursor/rules/${name}.mdc`,\n 'all': name => `.ai/instructions/${name}.md`,\n 'default': name => `.ai/instructions/${name}.md`,\n },\n agent: {\n 'claude-code': name => `.claude/agents/${name}.md`,\n 'github-copilot': name => `.github/agents/${name}.agent.md`,\n 'google-gemini': _ => `GEMINI.md`,\n 'cursor': name => `.cursor/rules/${name}.mdc`,\n 'all': name => `.ai/agents/${name}.md`,\n 'default': name => `.ai/agents/${name}.md`,\n },\n skill: {\n 'claude-code': name => `.claude/skills/${name}/SKILL.md`,\n 'github-copilot': name => `.claude/skills/${name}/SKILL.md`,\n 'google-gemini': name => `.claude/skills/${name}/SKILL.md`,\n 'cursor': name => `.cursor/skills/${name}/SKILL.md`,\n 'all': name => `.claude/skills/${name}/SKILL.md`,\n 'default': name => `.claude/skills/${name}/SKILL.md`,\n },\n workflow: {\n 'claude-code': name => `.claude/workflows/${name}.md`,\n 'github-copilot': name => `.github/workflows/${name}.workflow.md`,\n 'google-gemini': name => `.gemini/workflows/${name}.md`,\n 'cursor': name => `.cursor/rules/${name}.mdc`,\n 'all': name => `.ai/workflows/${name}.md`,\n 'default': name => `.ai/workflows/${name}.md`,\n },\n};\n\nexport interface InstallPathOverrides {\n /** Single path override — applies to all tools when installPaths has no entry for the tool */\n installPath?: string;\n /** Per-tool path overrides — highest priority */\n installPaths?: Record<string, string>;\n}\n\n/**\n * Returns the recommended install path for an asset in a given tool's workspace.\n * Resolution order: installPaths[tool] > installPath > built-in convention.\n */\nexport function getInstallPath(\n type: AssetType,\n tool: AiTool | string,\n name: string,\n overrides?: InstallPathOverrides,\n): string {\n if (overrides?.installPaths?.[tool]) return overrides.installPaths[tool];\n if (overrides?.installPath) return overrides.installPath;\n\n const slug = toSlug(name);\n const toolConventions = CONVENTIONS[type];\n const fn = toolConventions[tool as AiTool] ?? toolConventions.default;\n return fn(slug);\n}\n\n/**\n * Returns install paths for all tools in the asset's tools list.\n * If tools contains 'all', returns paths for every known tool.\n */\nexport function getInstallPathsForAsset(\n type: AssetType,\n tools: (AiTool | string)[],\n name: string,\n overrides?: InstallPathOverrides,\n): Record<string, string> {\n const ALL_TOOLS: AiTool[] = ['claude-code', 'github-copilot', 'google-gemini', 'cursor'];\n const resolvedTools = tools.includes('all') ? ALL_TOOLS : tools;\n\n return Object.fromEntries(\n resolvedTools.map(tool => [tool, getInstallPath(type, tool, name, overrides)]),\n );\n}\n"],"names":[],"mappings":";;AAGA,SAAS,OAAO,IAAA,EAAsB;AACpC,EAAA,OAAO,IAAA,CAAK,aAAY,CAAE,OAAA,CAAQ,QAAQ,GAAG,CAAA,CAAE,OAAA,CAAQ,cAAA,EAAgB,EAAE,CAAA;AAC3E;AAQA,MAAM,WAAA,GAAuF;AAAA,EAC3F,WAAA,EAAa;AAAA,IACX,aAAA,EAAkB,CAAA,IAAA,KAAQ,CAAA,cAAA,EAAiB,IAAI,CAAA,GAAA,CAAA;AAAA,IAC/C,gBAAA,EAAkB,CAAA,IAAA,KAAQ,CAAA,qBAAA,EAAwB,IAAI,CAAA,gBAAA,CAAA;AAAA,IACtD,iBAAkB,CAAA,CAAA,KAAQ,CAAA,SAAA,CAAA;AAAA,IAC1B,QAAA,EAAkB,CAAA,IAAA,KAAQ,CAAA,cAAA,EAAiB,IAAI,CAAA,IAAA,CAAA;AAAA,IAC/C,KAAA,EAAkB,CAAA,IAAA,KAAQ,CAAA,iBAAA,EAAoB,IAAI,CAAA,GAAA,CAAA;AAAA,IAClD,SAAA,EAAkB,CAAA,IAAA,KAAQ,CAAA,iBAAA,EAAoB,IAAI,CAAA,GAAA;AAAA,GACpD;AAAA,EACA,KAAA,EAAO;AAAA,IACL,aAAA,EAAkB,CAAA,IAAA,KAAQ,CAAA,eAAA,EAAkB,IAAI,CAAA,GAAA,CAAA;AA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return name.toLowerCase().replace(/\s+/g, "-").replace(/[^a-z0-9-_]/g, "");
3
+ }
4
+ const CONVENTIONS = {
5
+ instruction: {
6
+ "claude-code": (name) => `.claude/rules/${name}.md`,
7
+ "github-copilot": (name) => `.github/instructions/${name}.instructions.md`,
8
+ "google-gemini": (_) => `GEMINI.md`,
9
+ "cursor": (name) => `.cursor/rules/${name}.mdc`,
10
+ "all": (name) => `.ai/instructions/${name}.md`,
11
+ "default": (name) => `.ai/instructions/${name}.md`
12
+ },
13
+ agent: {
14
+ "claude-code": (name) => `.claude/agents/${name}.md`,
15
+ "github-copilot": (name) => `.github/agents/${name}.agent.md`,
16
+ "google-gemini": (_) => `GEMINI.md`,
17
+ "cursor": (name) => `.cursor/rules/${name}.mdc`,
18
+ "all": (name) => `.ai/agents/${name}.md`,
19
+ "default": (name) => `.ai/agents/${name}.md`
20
+ },
21
+ skill: {
22
+ "claude-code": (name) => `.claude/skills/${name}/SKILL.md`,
23
+ "github-copilot": (name) => `.claude/skills/${name}/SKILL.md`,
24
+ "google-gemini": (name) => `.claude/skills/${name}/SKILL.md`,
25
+ "cursor": (name) => `.cursor/skills/${name}/SKILL.md`,
26
+ "all": (name) => `.claude/skills/${name}/SKILL.md`,
27
+ "default": (name) => `.claude/skills/${name}/SKILL.md`
28
+ },
29
+ workflow: {
30
+ "claude-code": (name) => `.claude/workflows/${name}.md`,
31
+ "github-copilot": (name) => `.github/workflows/${name}.workflow.md`,
32
+ "google-gemini": (name) => `.gemini/workflows/${name}.md`,
33
+ "cursor": (name) => `.cursor/rules/${name}.mdc`,
34
+ "all": (name) => `.ai/workflows/${name}.md`,
35
+ "default": (name) => `.ai/workflows/${name}.md`
36
+ }
37
+ };
38
+ function getInstallPath(type, tool, name, overrides) {
39
+ if (overrides?.installPaths?.[tool]) return overrides.installPaths[tool];
40
+ if (overrides?.installPath) return overrides.installPath;
41
+ const slug = toSlug(name);
42
+ const toolConventions = CONVENTIONS[type];
43
+ const fn = toolConventions[tool] ?? toolConventions.default;
44
+ return fn(slug);
45
+ }
46
+ function getInstallPathsForAsset(type, tools, name, overrides) {
47
+ const ALL_TOOLS = ["claude-code", "github-copilot", "google-gemini", "cursor"];
48
+ const resolvedTools = tools.includes("all") ? ALL_TOOLS : tools;
49
+ return Object.fromEntries(
50
+ resolvedTools.map((tool) => [tool, getInstallPath(type, tool, name, overrides)])
51
+ );
52
+ }
53
+
54
+ export { getInstallPath, getInstallPathsForAsset };
55
+ //# sourceMappingURL=installPaths.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"installPaths.esm.js","sources":["../src/installPaths.ts"],"sourcesContent":["import type { AssetType, AiTool } from './types';\n\n/** Sanitize asset name for use in file paths */\nfunction toSlug(name: string): string {\n return name.toLowerCase().replace(/\\s+/g, '-').replace(/[^a-z0-9-_]/g, '');\n}\n\n/**\n * Convention table: (type, tool) → install path template.\n * Returns the recommended filesystem path for an asset given the target tool.\n *\n * Priority: installPaths[tool] > installPath > convention below.\n */\nconst CONVENTIONS: Record<AssetType, Record<AiTool | 'default', (name: string) => string>> = {\n instruction: {\n 'claude-code': name => `.claude/rules/${name}.md`,\n 'github-copilot': name => `.github/instructions/${name}.instructions.md`,\n 'google-gemini': _ => `GEMINI.md`,\n 'cursor': name => `.cursor/rules/${name}.mdc`,\n 'all': name => `.ai/instructions/${name}.md`,\n 'default': name => `.ai/instructions/${name}.md`,\n },\n agent: {\n 'claude-code': name => `.claude/agents/${name}.md`,\n 'github-copilot': name => `.github/agents/${name}.agent.md`,\n 'google-gemini': _ => `GEMINI.md`,\n 'cursor': name => `.cursor/rules/${name}.mdc`,\n 'all': name => `.ai/agents/${name}.md`,\n 'default': name => `.ai/agents/${name}.md`,\n },\n skill: {\n 'claude-code': name => `.claude/skills/${name}/SKILL.md`,\n 'github-copilot': name => `.claude/skills/${name}/SKILL.md`,\n 'google-gemini': name => `.claude/skills/${name}/SKILL.md`,\n 'cursor': name => `.cursor/skills/${name}/SKILL.md`,\n 'all': name => `.claude/skills/${name}/SKILL.md`,\n 'default': name => `.claude/skills/${name}/SKILL.md`,\n },\n workflow: {\n 'claude-code': name => `.claude/workflows/${name}.md`,\n 'github-copilot': name => `.github/workflows/${name}.workflow.md`,\n 'google-gemini': name => `.gemini/workflows/${name}.md`,\n 'cursor': name => `.cursor/rules/${name}.mdc`,\n 'all': name => `.ai/workflows/${name}.md`,\n 'default': name => `.ai/workflows/${name}.md`,\n },\n};\n\nexport interface InstallPathOverrides {\n /** Single path override — applies to all tools when installPaths has no entry for the tool */\n installPath?: string;\n /** Per-tool path overrides — highest priority */\n installPaths?: Record<string, string>;\n}\n\n/**\n * Returns the recommended install path for an asset in a given tool's workspace.\n * Resolution order: installPaths[tool] > installPath > built-in convention.\n */\nexport function getInstallPath(\n type: AssetType,\n tool: AiTool | string,\n name: string,\n overrides?: InstallPathOverrides,\n): string {\n if (overrides?.installPaths?.[tool]) return overrides.installPaths[tool];\n if (overrides?.installPath) return overrides.installPath;\n\n const slug = toSlug(name);\n const toolConventions = CONVENTIONS[type];\n const fn = toolConventions[tool as AiTool] ?? toolConventions.default;\n return fn(slug);\n}\n\n/**\n * Returns install paths for all tools in the asset's tools list.\n * If tools contains 'all', returns paths for every known tool.\n */\nexport function getInstallPathsForAsset(\n type: AssetType,\n tools: (AiTool | string)[],\n name: string,\n overrides?: InstallPathOverrides,\n): Record<string, string> {\n const ALL_TOOLS: AiTool[] = ['claude-code', 'github-copilot', 'google-gemini', 'cursor'];\n const resolvedTools = tools.includes('all') ? ALL_TOOLS : tools;\n\n return Object.fromEntries(\n resolvedTools.map(tool => [tool, getInstallPath(type, tool, name, overrides)]),\n );\n}\n"],"names":[],"mappings":"AAGA,SAAS,OAAO,IAAA,EAAsB;AACpC,EAAA,OAAO,IAAA,CAAK,aAAY,CAAE,OAAA,CAAQ,QAAQ,GAAG,CAAA,CAAE,OAAA,CAAQ,cAAA,EAAgB,EAAE,CAAA;AAC3E;AAQA,MAAM,WAAA,GAAuF;AAAA,EAC3F,WAAA,EA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,YAAY,IAAI,CAAA;AACxC,EAAA,MAAM,EAAA,GAAK,eAAA,CAAgB,IAAc,CAAA,IAAK,eAAA,CAAgB,OAAA;AAC9D,EAAA,OAAO,GAAG,IAAI,CAAA;AAChB;AAMO,SAAS,uBAAA,CACd,IAAA,EACA,KAAA,EACA,IAAA,EACA,SAAA,EACwB;AACxB,EAAA,MAAM,SAAA,GAAsB,CAAC,aAAA,EAAe,gBAAA,EAAkB,iBAAiB,QAAQ,CAAA;AACvF,EAAA,MAAM,aAAA,GAAgB,KAAA,CAAM,QAAA,CAAS,KAAK,IAAI,SAAA,GAAY,KAAA;AAE1D,EAAA,OAAO,MAAA,CAAO,WAAA;AAAA,IACZ,aAAA,CAAc,GAAA,CAAI,CAAA,IAAA,KAAQ,CAAC,IAAA,EAAM,cAAA,CAAe,IAAA,EAAM,IAAA,EAAM,IAAA,EAAM,SAAS,CAAC,CAAC;AAAA,GAC/E;AACF;;;;"}
@@ -0,0 +1,43 @@
1
+ 'use strict';
2
+
3
+ var zod = require('zod');
4
+
5
+ const AiToolEnum = zod.z.enum([
6
+ "all",
7
+ "github-copilot",
8
+ "claude-code",
9
+ "google-gemini",
10
+ "cursor"
11
+ ]);
12
+ const AssetTypeEnum = zod.z.enum([
13
+ "instruction",
14
+ "agent",
15
+ "skill",
16
+ "workflow"
17
+ ]);
18
+ const AiAssetFrontmatterSchema = zod.z.object({
19
+ /** Path to the .md content file, relative to the .yaml file directory.
20
+ * If omitted, the parser falls back to <same-name>.md by convention. */
21
+ content: zod.z.string().optional(),
22
+ name: zod.z.string().min(1).max(200),
23
+ /** Human-readable display label shown in the UI. Falls back to `name` when omitted. */
24
+ label: zod.z.string().min(1).max(200).optional(),
25
+ description: zod.z.string().min(1).max(500),
26
+ type: AssetTypeEnum,
27
+ tools: zod.z.array(AiToolEnum).min(1),
28
+ tags: zod.z.array(zod.z.string()).optional().default([]),
29
+ author: zod.z.string().optional().default("Unknown"),
30
+ icon: zod.z.string().optional(),
31
+ version: zod.z.string().optional().default("1.0.0"),
32
+ updatedAt: zod.z.string().optional(),
33
+ // install path overrides
34
+ installPath: zod.z.string().optional(),
35
+ installPaths: zod.z.record(zod.z.string()).optional(),
36
+ // skill-specific
37
+ resources: zod.z.array(zod.z.string()).optional()
38
+ }).passthrough();
39
+
40
+ exports.AiAssetFrontmatterSchema = AiAssetFrontmatterSchema;
41
+ exports.AiToolEnum = AiToolEnum;
42
+ exports.AssetTypeEnum = AssetTypeEnum;
43
+ //# sourceMappingURL=schemas.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schemas.cjs.js","sources":["../src/schemas.ts"],"sourcesContent":["import { z } from 'zod';\n\nexport const AiToolEnum = z.enum([\n 'all',\n 'github-copilot',\n 'claude-code',\n 'google-gemini',\n 'cursor',\n]);\n\nexport const AssetTypeEnum = z.enum([\n 'instruction',\n 'agent',\n 'skill',\n 'workflow',\n]);\n\n/**\n * Schema for the YAML metadata file (.yaml) that acts as an envelope.\n * The actual asset content lives in the referenced .md file.\n */\nexport const AiAssetFrontmatterSchema = z\n .object({\n /** Path to the .md content file, relative to the .yaml file directory.\n * If omitted, the parser falls back to <same-name>.md by convention. */\n content: z.string().optional(),\n name: z.string().min(1).max(200),\n /** Human-readable display label shown in the UI. Falls back to `name` when omitted. */\n label: z.string().min(1).max(200).optional(),\n description: z.string().min(1).max(500),\n type: AssetTypeEnum,\n tools: z.array(AiToolEnum).min(1),\n tags: z.array(z.string()).optional().default([]),\n author: z.string().optional().default('Unknown'),\n icon: z.string().optional(),\n version: z.string().optional().default('1.0.0'),\n updatedAt: z.string().optional(),\n // install path overrides\n installPath: z.string().optional(),\n installPaths: z.record(z.string()).optional(),\n // skill-specific\n resources: z.array(z.string()).optional(),\n })\n .passthrough();\n\nexport type AiAssetFrontmatter = z.infer<typeof AiAssetFrontmatterSchema>;\n"],"names":["z"],"mappings":";;;;AAEO,MAAM,UAAA,GAAaA,MAAE,IAAA,CAAK;AAAA,EAC/B,KAAA;AAAA,EACA,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EAAS;AAAA,EACjC,cAAcA,KAAA,CAAE,MAAA,CAAOA,MAAE,MAAA,EAAQ,EAAE,QAAA,EAAS;AAAA;AAAA,EAE5C,WAAWA,KAAA,CAAE,KAAA,CAAMA,MAAE,MAAA,EAAQ,EAAE,QAAA;AACjC,CAAC,EACA,WAAA;;;;;;"}
@@ -0,0 +1,39 @@
1
+ import { z } from 'zod';
2
+
3
+ const AiToolEnum = z.enum([
4
+ "all",
5
+ "github-copilot",
6
+ "claude-code",
7
+ "google-gemini",
8
+ "cursor"
9
+ ]);
10
+ const AssetTypeEnum = z.enum([
11
+ "instruction",
12
+ "agent",
13
+ "skill",
14
+ "workflow"
15
+ ]);
16
+ const AiAssetFrontmatterSchema = z.object({
17
+ /** Path to the .md content file, relative to the .yaml file directory.
18
+ * If omitted, the parser falls back to <same-name>.md by convention. */
19
+ content: z.string().optional(),
20
+ name: z.string().min(1).max(200),
21
+ /** Human-readable display label shown in the UI. Falls back to `name` when omitted. */
22
+ label: z.string().min(1).max(200).optional(),
23
+ description: z.string().min(1).max(500),
24
+ type: AssetTypeEnum,
25
+ tools: z.array(AiToolEnum).min(1),
26
+ tags: z.array(z.string()).optional().default([]),
27
+ author: z.string().optional().default("Unknown"),
28
+ icon: z.string().optional(),
29
+ version: z.string().optional().default("1.0.0"),
30
+ updatedAt: z.string().optional(),
31
+ // install path overrides
32
+ installPath: z.string().optional(),
33
+ installPaths: z.record(z.string()).optional(),
34
+ // skill-specific
35
+ resources: z.array(z.string()).optional()
36
+ }).passthrough();
37
+
38
+ export { AiAssetFrontmatterSchema, AiToolEnum, AssetTypeEnum };
39
+ //# sourceMappingURL=schemas.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schemas.esm.js","sources":["../src/schemas.ts"],"sourcesContent":["import { z } from 'zod';\n\nexport const AiToolEnum = z.enum([\n 'all',\n 'github-copilot',\n 'claude-code',\n 'google-gemini',\n 'cursor',\n]);\n\nexport const AssetTypeEnum = z.enum([\n 'instruction',\n 'agent',\n 'skill',\n 'workflow',\n]);\n\n/**\n * Schema for the YAML metadata file (.yaml) that acts as an envelope.\n * The actual asset content lives in the referenced .md file.\n */\nexport const AiAssetFrontmatterSchema = z\n .object({\n /** Path to the .md content file, relative to the .yaml file directory.\n * If omitted, the parser falls back to <same-name>.md by convention. */\n content: z.string().optional(),\n name: z.string().min(1).max(200),\n /** Human-readable display label shown in the UI. Falls back to `name` when omitted. */\n label: z.string().min(1).max(200).optional(),\n description: z.string().min(1).max(500),\n type: AssetTypeEnum,\n tools: z.array(AiToolEnum).min(1),\n tags: z.array(z.string()).optional().default([]),\n author: z.string().optional().default('Unknown'),\n icon: z.string().optional(),\n version: z.string().optional().default('1.0.0'),\n updatedAt: z.string().optional(),\n // install path overrides\n installPath: z.string().optional(),\n installPaths: z.record(z.string()).optional(),\n // skill-specific\n resources: z.array(z.string()).optional(),\n })\n .passthrough();\n\nexport type AiAssetFrontmatter = z.infer<typeof AiAssetFrontmatterSchema>;\n"],"names":[],"mappings":";;AAEO,MAAM,UAAA,GAAa,EAAE,IAAA,CAAK;AAAA,EAC/B,KAAA;AAAA,EACA,gBAAA;AAAA,EACA,aAAA;AAAA,EACA,eAAA;AAAA,EACA;AACF,CAAC;AAEM,MAAM,aAAA,GAAgB,EAAE,IAAA,CAAK;AAAA,EAClC,aAAA;AAAA,EACA,OAAA;AAAA,EACA,OAAA;AAAA,EACA;AACF,CAAC;AAMM,MAAM,wBAAA,GAA2B,EACrC,MAAA,CAAO;AAAA;AAAA;AAAA,EAGN,OAAA,EAAS,CAAA,CAAE,MAAA,EAAO,CAAE,QAAA,EAAS;AAAA,EAC7B,IAAA,EAAM,EAAE,MAAA,EAAO,CAAE,IAAI,CAAC,CAAA,CAAE,IAAI,GAAG,CAAA;AAAA;AAAA,EAE/B,KAAA,EAAO,CAAA,CAAE,MAAA,EAAO,CAAE,GAAA,CAAI,CAAC,CAAA,CAAE,GAAA,CAAI,GAAG,CAAA,CAAE,QAAA,EAAS;AAAA,EAC3C,WAAA,EAAa,EAAE,MAAA,EAAO,CAAE,IAAI,CAAC,CAAA,CAAE,IAAI,GAAG,CAAA;AAAA,EACtC,IAAA,EAAM,aAAA;AAAA,EACN,OAAO,CAAA,CAAE,KAAA,CAAM,UAAU,CAAA,CAAE,IAAI,CAAC,CAAA;AAAA,EAChC,IAAA,EAAM,CAAA,CAAE,KAAA,CAAM,CAAA,CAAE,MAAA,EAAQ,CAAA,CAAE,QAAA,EAAS,CAAE,OAAA,CAAQ,EAAE,CAAA;AAAA,EAC/C,QAAQ,CAAA,CAAE,MAAA,GAAS,QAAA,EAAS,CAAE,QAAQ,SAAS,CAAA;AAAA,EAC/C,IAAA,EAAM,CAAA,CAAE,MAAA,EAAO,CAAE,QAAA,EAAS;AAAA,EAC1B,SAAS,CAAA,CAAE,MAAA,GAAS,QAAA,EAAS,CAAE,QAAQ,OAAO,CAAA;AAAA,EAC9C,SAAA,EAAW,CAAA,CAAE,MAAA,EAAO,CAAE,QAAA,EAAS;AAAA;AAAA,EAE/B,WAAA,EAAa,CAAA,CAAE,MAAA,EAAO,CAAE,QAAA,EAAS;AAAA,EACjC,cAAc,CAAA,CAAE,MAAA,CAAO,EAAE,MAAA,EAAQ,EAAE,QAAA,EAAS;AAAA;AAAA,EAE5C,WAAW,CAAA,CAAE,KAAA,CAAM,EAAE,MAAA,EAAQ,EAAE,QAAA;AACjC,CAAC,EACA,WAAA;;;;"}
package/package.json ADDED
@@ -0,0 +1,66 @@
1
+ {
2
+ "name": "@julianpedro/plugin-dev-ai-hub-common",
3
+ "version": "0.1.6",
4
+ "description": "Common types and schemas for Dev AI Hub",
5
+ "license": "Apache-2.0",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "https://github.com/JulianPedro/backstage-dev-ai-hub"
9
+ },
10
+ "main": "dist/index.cjs.js",
11
+ "types": "dist/index.d.ts",
12
+ "publishConfig": {
13
+ "access": "public",
14
+ "main": "dist/index.cjs.js",
15
+ "module": "dist/index.esm.js",
16
+ "types": "dist/index.d.ts"
17
+ },
18
+ "exports": {
19
+ ".": {
20
+ "import": "./dist/index.esm.js",
21
+ "require": "./dist/index.cjs.js",
22
+ "types": "./dist/index.d.ts",
23
+ "default": "./dist/index.cjs.js"
24
+ },
25
+ "./package.json": "./package.json"
26
+ },
27
+ "files": [
28
+ "dist"
29
+ ],
30
+ "backstage": {
31
+ "role": "common-library",
32
+ "pluginId": "dev-ai-hub",
33
+ "pluginPackages": [
34
+ "@julianpedro/plugin-dev-ai-hub",
35
+ "@julianpedro/plugin-dev-ai-hub-backend",
36
+ "@julianpedro/plugin-dev-ai-hub-common",
37
+ "@julianpedro/plugin-dev-ai-hub-node"
38
+ ]
39
+ },
40
+ "scripts": {
41
+ "build": "backstage-cli package build",
42
+ "clean": "backstage-cli package clean",
43
+ "lint": "backstage-cli package lint",
44
+ "prepack": "backstage-cli package prepack",
45
+ "postpack": "backstage-cli package postpack",
46
+ "test": "backstage-cli package test --passWithNoTests",
47
+ "tsc": "tsc --noEmit"
48
+ },
49
+ "dependencies": {
50
+ "zod": "^3.22.0"
51
+ },
52
+ "devDependencies": {
53
+ "@backstage/cli": "*",
54
+ "@types/jest": "^29.0.0",
55
+ "jest": "^29.0.0",
56
+ "jest-environment-jsdom": "^29.0.0"
57
+ },
58
+ "typesVersions": {
59
+ "*": {
60
+ "package.json": [
61
+ "package.json"
62
+ ]
63
+ }
64
+ },
65
+ "module": "dist/index.esm.js"
66
+ }