@gleanwork/pluginpack 0.5.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.
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/cli.ts"],"sourcesContent":["import { promises as fs, readFileSync } from \"node:fs\";\nimport path from \"node:path\";\nimport { Command, Option } from \"commander\";\nimport { build } from \"./build.js\";\nimport { clean, prune } from \"./cleanup.js\";\nimport { loadConfig } from \"./config.js\";\nimport { diffTarget } from \"./diff.js\";\nimport { validateOutput } from \"./validate.js\";\nimport type { TargetName } from \"./types.js\";\n\nconst targets = [\"cursor\", \"claude\", \"antigravity\", \"copilot\"] as const;\n\nasync function main(): Promise<void> {\n const program = createProgram();\n await program.parseAsync(process.argv);\n}\n\nfunction createProgram(): Command {\n const program = new Command();\n const pkg = readPackageJson();\n\n program.name(\"pluginpack\").description(pkg.description).version(pkg.version);\n\n program\n .command(\"init\")\n .description(\n \"Create a starter pluginpack.config.ts and source plugin layout.\",\n )\n .action(init);\n\n program\n .command(\"build\")\n .description(\n \"Compile configured source plugins into target-native plugin payloads.\",\n )\n .usage(\n \"[--target cursor|claude|antigravity|copilot] [--out-dir <path>] [--dry-run]\",\n )\n .addOption(\n new Option(\n \"--target <target>\",\n \"Build only one configured target.\",\n ).choices([...targets]),\n )\n .option(\n \"--out-dir <path>\",\n \"Override the configured output directory for the selected target.\",\n )\n .option(\n \"--dry-run\",\n \"Resolve and print planned managed output paths without writing files.\",\n )\n .action(\n async (options: {\n target?: TargetName;\n outDir?: string;\n dryRun?: boolean;\n }) => {\n const artifacts = await build({\n target: options.target,\n outDir: options.outDir,\n dryRun: options.dryRun,\n });\n for (const artifact of artifacts) {\n console.log(\n `${options.dryRun ? \"Would write\" : \"Wrote\"} ${artifact.managedPaths.length} managed files for ${artifact.target} -> ${artifact.outDir}`,\n );\n if (options.dryRun) {\n for (const managedPath of artifact.managedPaths) {\n console.log(` ${managedPath}`);\n }\n }\n }\n },\n );\n\n program\n .command(\"validate\")\n .description(\n \"Validate an existing target output directory for native manifest, path, and frontmatter requirements.\",\n )\n .usage(\"--target cursor|claude|antigravity|copilot [--dir <path>]\")\n .requiredOption(\n \"--target <target>\",\n \"Required target validator.\",\n parseTarget,\n )\n .option(\n \"--dir <path>\",\n \"Directory to validate. Defaults to the configured target outDir.\",\n )\n .action(async (options: { target: TargetName; dir?: string }) => {\n let dir = options.dir;\n if (!dir) {\n const project = await loadConfig();\n const targetConfig = project.config.targets[options.target];\n if (!targetConfig) {\n throw new Error(`Target \"${options.target}\" is not configured.`);\n }\n dir = targetConfig.outDir;\n }\n const result = await validateOutput(options.target, dir);\n for (const issue of result.issues) {\n const stream = issue.level === \"error\" ? console.error : console.warn;\n stream(`${issue.level}: ${issue.message}`);\n }\n if (!result.ok) {\n process.exitCode = 1;\n return;\n }\n console.log(\"Validation passed.\");\n });\n\n program\n .command(\"diff\")\n .description(\n \"Build into a temporary directory and compare generated managed files with an existing target repo.\",\n )\n .usage(\"--target cursor|claude|antigravity|copilot --against <path>\")\n .requiredOption(\n \"--target <target>\",\n \"Required target to build and compare.\",\n parseTarget,\n )\n .requiredOption(\n \"--against <path>\",\n \"Existing target repo or output directory to compare against.\",\n )\n .action(async (options: { target: TargetName; against: string }) => {\n const result = await diffTarget({\n target: options.target,\n against: options.against,\n });\n if (result.ok) {\n console.log(\"Managed files match.\");\n return;\n }\n console.log(\"Managed files differ:\");\n for (const entry of result.entries) {\n console.log(` ${entry.type.padEnd(7)} ${entry.path}`);\n }\n process.exitCode = 1;\n });\n\n program\n .command(\"prune\")\n .description(\n \"Remove stale managed files that are no longer emitted by the current config.\",\n )\n .usage(\"[--target cursor|claude|antigravity|copilot] [--dry-run]\")\n .addOption(\n new Option(\n \"--target <target>\",\n \"Prune only one configured target.\",\n ).choices([...targets]),\n )\n .option(\"--dry-run\", \"Print stale managed files without deleting them.\")\n .option(\n \"--force\",\n \"Delete even paths that resolve inside the source tree or config.\",\n )\n .action(\n async (options: {\n target?: TargetName;\n dryRun?: boolean;\n force?: boolean;\n }) => {\n const results = await prune(options);\n printCleanupResults(results, options.dryRun ? \"Would prune\" : \"Pruned\");\n },\n );\n\n program\n .command(\"clean\")\n .description(\"Remove all managed files for configured target outputs.\")\n .usage(\"[--target cursor|claude|antigravity|copilot] [--dry-run]\")\n .addOption(\n new Option(\n \"--target <target>\",\n \"Clean only one configured target.\",\n ).choices([...targets]),\n )\n .option(\"--dry-run\", \"Print managed files without deleting them.\")\n .option(\n \"--force\",\n \"Delete even paths that resolve inside the source tree or config.\",\n )\n .action(\n async (options: {\n target?: TargetName;\n dryRun?: boolean;\n force?: boolean;\n }) => {\n const results = await clean(options);\n printCleanupResults(\n results,\n options.dryRun ? \"Would clean\" : \"Cleaned\",\n );\n },\n );\n\n program\n .command(\"docs\")\n .description(\n \"Generate the README CLI reference section from command metadata.\",\n )\n .option(\"--check\", \"Fail if README.md is not up to date.\")\n .action(async (options: { check?: boolean }) => {\n const readmePath = path.resolve(\"README.md\");\n const current = await fs.readFile(readmePath, \"utf8\");\n const next = replaceGeneratedSection(\n current,\n renderCliReference(program),\n );\n if (options.check) {\n if (next !== current) {\n console.error(\n \"README.md CLI reference is out of date. Run pluginpack docs.\",\n );\n process.exitCode = 1;\n } else {\n console.log(\"README.md CLI reference is up to date.\");\n }\n return;\n }\n await fs.writeFile(readmePath, next);\n console.log(\"Updated README.md CLI reference.\");\n });\n\n return program;\n}\n\nfunction printCleanupResults(\n results: Awaited<ReturnType<typeof prune>>,\n verb: string,\n): void {\n for (const result of results) {\n console.log(\n `${verb} ${result.entries.length} managed files for ${result.target} -> ${result.outDir}`,\n );\n for (const entry of result.entries) {\n console.log(` ${entry.path}`);\n }\n }\n}\n\nasync function init(): Promise<void> {\n const configPath = path.resolve(\"pluginpack.config.ts\");\n if (await exists(configPath)) {\n throw new Error(\"pluginpack.config.ts already exists.\");\n }\n await fs.mkdir(path.resolve(\"plugins\", \"example\", \"skills\", \"example\"), {\n recursive: true,\n });\n await fs.writeFile(configPath, starterConfig());\n await fs.writeFile(\n path.resolve(\"plugins\", \"example\", \"plugin.pluginpack.json\"),\n `${JSON.stringify(\n {\n description: \"Example plugin generated by pluginpack init\",\n },\n null,\n 2,\n )}\\n`,\n );\n await fs.writeFile(\n path.resolve(\"plugins\", \"example\", \"skills\", \"example\", \"SKILL.md\"),\n starterSkill(),\n );\n console.log(\"Created pluginpack.config.ts and plugins/example.\");\n}\n\nfunction parseTarget(value: string): TargetName {\n if (\n value !== \"cursor\" &&\n value !== \"claude\" &&\n value !== \"antigravity\" &&\n value !== \"copilot\"\n ) {\n throw new Error(\"Expected cursor, claude, antigravity, or copilot.\");\n }\n return value;\n}\n\nfunction replaceGeneratedSection(readme: string, content: string): string {\n const start = \"<!-- pluginpack-cli:start -->\";\n const end = \"<!-- pluginpack-cli:end -->\";\n const startIndex = readme.indexOf(start);\n const endIndex = readme.indexOf(end);\n if (startIndex === -1 || endIndex === -1 || endIndex < startIndex) {\n throw new Error(\"README.md is missing pluginpack CLI marker comments.\");\n }\n return `${readme.slice(0, startIndex + start.length)}\\n\\n${content}\\n${readme.slice(endIndex)}`;\n}\n\nfunction readPackageJson(): { version: string; description: string } {\n const packageJson = JSON.parse(\n readFileSync(new URL(\"../package.json\", import.meta.url), \"utf8\"),\n ) as { version?: unknown; description?: unknown };\n if (typeof packageJson.version !== \"string\") {\n throw new Error(\"package.json is missing a string version.\");\n }\n if (typeof packageJson.description !== \"string\") {\n throw new Error(\"package.json is missing a string description.\");\n }\n return { version: packageJson.version, description: packageJson.description };\n}\n\nfunction renderCliReference(program: Command): string {\n const lines = [\"## CLI Reference\", \"\"];\n for (const command of program.commands) {\n if (command.name() === \"help\") {\n continue;\n }\n lines.push(\n `### \\`${command.name()}\\``,\n \"\",\n command.description(),\n \"\",\n \"```bash\",\n commandUsage(command),\n \"```\",\n \"\",\n );\n const visibleOptions = command.options.filter(\n (option) => option.flags !== \"-h, --help\",\n );\n if (visibleOptions.length > 0) {\n lines.push(\"Options:\", \"\");\n for (const option of visibleOptions) {\n lines.push(`- \\`${option.flags}\\`: ${option.description}`);\n }\n lines.push(\"\");\n }\n const examples = commandExamples(command.name());\n if (examples.length > 0) {\n lines.push(\"Examples:\", \"\");\n for (const example of examples) {\n lines.push(`- \\`${example}\\``);\n }\n lines.push(\"\");\n }\n const exitCodes = commandExitCodes(command.name());\n if (exitCodes.length > 0) {\n lines.push(\"Exit codes:\", \"\");\n for (const exitCode of exitCodes) {\n lines.push(`- ${exitCode}`);\n }\n lines.push(\"\");\n }\n }\n return lines.join(\"\\n\").trimEnd();\n}\n\nfunction commandUsage(command: Command): string {\n const usage = command.usage();\n return usage\n ? `pluginpack ${command.name()} ${usage}`\n : `pluginpack ${command.name()}`;\n}\n\nfunction commandExamples(commandName: string): string[] {\n switch (commandName) {\n case \"init\":\n return [\"pluginpack init\"];\n case \"build\":\n return [\n \"pluginpack build\",\n \"pluginpack build --target cursor\",\n \"pluginpack build --target claude --dry-run\",\n ];\n case \"validate\":\n return [\"pluginpack validate --target cursor --dir ../cursor-plugins\"];\n case \"diff\":\n return [\"pluginpack diff --target cursor --against ../cursor-plugins\"];\n case \"prune\":\n return [\"pluginpack prune\", \"pluginpack prune --target claude --dry-run\"];\n case \"clean\":\n return [\"pluginpack clean\", \"pluginpack clean --target cursor --dry-run\"];\n case \"docs\":\n return [\"pluginpack docs\", \"pluginpack docs --check\"];\n default:\n return [];\n }\n}\n\nfunction commandExitCodes(commandName: string): string[] {\n switch (commandName) {\n case \"init\":\n return [\n \"0 when files are created\",\n \"1 when files already exist or cannot be written\",\n ];\n case \"build\":\n return [\n \"0 when all selected targets build\",\n \"1 when config, source resolution, or file output fails\",\n ];\n case \"validate\":\n return [\"0 when validation passes\", \"1 when validation finds errors\"];\n case \"diff\":\n return [\n \"0 when managed files match\",\n \"1 when managed files differ or the command fails\",\n ];\n case \"prune\":\n return [\n \"0 when stale managed files are removed or listed\",\n \"1 when config, source resolution, or cleanup fails\",\n ];\n case \"clean\":\n return [\n \"0 when managed files are removed or listed\",\n \"1 when config, manifest loading, or cleanup fails\",\n ];\n case \"docs\":\n return [\n \"0 when docs are current or updated\",\n \"1 when --check finds stale docs\",\n ];\n default:\n return [];\n }\n}\n\nasync function exists(filePath: string): Promise<boolean> {\n try {\n await fs.access(filePath);\n return true;\n } catch {\n return false;\n }\n}\n\nfunction starterConfig(): string {\n return `import { defineConfig } from \"@gleanwork/pluginpack\";\n\nexport default defineConfig({\n name: \"example-plugins\",\n version: \"0.1.0\",\n metadata: {\n description: \"Example pluginpack plugin marketplace\",\n author: { name: \"Example\" },\n license: \"MIT\"\n },\n targets: {\n cursor: {\n outDir: \"dist/cursor\",\n plugins: {\n example: { from: [\"example\"] }\n }\n },\n claude: {\n outDir: \"dist/claude\",\n plugins: {\n example: { from: [\"example\"] }\n }\n },\n antigravity: {\n outDir: \"dist/antigravity\",\n plugins: {\n example: { from: [\"example\"] }\n }\n },\n copilot: {\n outDir: \"dist/copilot\",\n plugins: {\n example: { from: [\"example\"] }\n }\n }\n }\n});\n`;\n}\n\nfunction starterSkill(): string {\n return `---\nname: example\ndescription: Example skill generated by pluginpack init.\n---\n\n# Example\n\nUse this skill as a starting point.\n`;\n}\n\nmain().catch((error: unknown) => {\n console.error((error as Error).message);\n process.exit(1);\n});\n"],"mappings":";;;;;;;;;;;AAAA,SAAS,YAAY,IAAI,oBAAoB;AAC7C,OAAO,UAAU;AACjB,SAAS,SAAS,cAAc;AAQhC,IAAM,UAAU,CAAC,UAAU,UAAU,eAAe,SAAS;AAE7D,eAAe,OAAsB;AACnC,QAAM,UAAU,cAAc;AAC9B,QAAM,QAAQ,WAAW,QAAQ,IAAI;AACvC;AAEA,SAAS,gBAAyB;AAChC,QAAM,UAAU,IAAI,QAAQ;AAC5B,QAAM,MAAM,gBAAgB;AAE5B,UAAQ,KAAK,YAAY,EAAE,YAAY,IAAI,WAAW,EAAE,QAAQ,IAAI,OAAO;AAE3E,UACG,QAAQ,MAAM,EACd;AAAA,IACC;AA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A;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAsCT;AAEA,SAAS,eAAuB;AAC9B,SAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAST;AAEA,KAAK,EAAE,MAAM,CAAC,UAAmB;AAC/B,UAAQ,MAAO,MAAgB,OAAO;AACtC,UAAQ,KAAK,CAAC;AAChB,CAAC;","names":[]}
@@ -0,0 +1,299 @@
1
+ import { z } from 'zod';
2
+
3
+ declare const authorSchema: z.ZodObject<{
4
+ name: z.ZodString;
5
+ email: z.ZodOptional<z.ZodString>;
6
+ url: z.ZodOptional<z.ZodString>;
7
+ }, z.core.$strip>;
8
+ declare const metadataSchema: z.ZodObject<{
9
+ displayName: z.ZodOptional<z.ZodString>;
10
+ description: z.ZodOptional<z.ZodString>;
11
+ author: z.ZodOptional<z.ZodObject<{
12
+ name: z.ZodString;
13
+ email: z.ZodOptional<z.ZodString>;
14
+ url: z.ZodOptional<z.ZodString>;
15
+ }, z.core.$strip>>;
16
+ owner: z.ZodOptional<z.ZodObject<{
17
+ name: z.ZodString;
18
+ email: z.ZodOptional<z.ZodString>;
19
+ url: z.ZodOptional<z.ZodString>;
20
+ }, z.core.$strip>>;
21
+ homepage: z.ZodOptional<z.ZodString>;
22
+ repository: z.ZodOptional<z.ZodString>;
23
+ license: z.ZodOptional<z.ZodString>;
24
+ logo: z.ZodOptional<z.ZodString>;
25
+ keywords: z.ZodOptional<z.ZodArray<z.ZodString>>;
26
+ category: z.ZodOptional<z.ZodString>;
27
+ tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
28
+ }, z.core.$strip>;
29
+ declare const emittedPluginSchema: z.ZodObject<{
30
+ from: z.ZodArray<z.ZodString>;
31
+ path: z.ZodOptional<z.ZodString>;
32
+ version: z.ZodOptional<z.ZodString>;
33
+ description: z.ZodOptional<z.ZodString>;
34
+ displayName: z.ZodOptional<z.ZodString>;
35
+ manifest: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
36
+ components: z.ZodOptional<z.ZodArray<z.ZodString>>;
37
+ }, z.core.$strip>;
38
+ declare const targetSchema: z.ZodObject<{
39
+ outDir: z.ZodString;
40
+ marketplaceDir: z.ZodOptional<z.ZodString>;
41
+ pluginRoot: z.ZodOptional<z.ZodString>;
42
+ version: z.ZodOptional<z.ZodString>;
43
+ plugins: z.ZodRecord<z.ZodString, z.ZodObject<{
44
+ from: z.ZodArray<z.ZodString>;
45
+ path: z.ZodOptional<z.ZodString>;
46
+ version: z.ZodOptional<z.ZodString>;
47
+ description: z.ZodOptional<z.ZodString>;
48
+ displayName: z.ZodOptional<z.ZodString>;
49
+ manifest: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
50
+ components: z.ZodOptional<z.ZodArray<z.ZodString>>;
51
+ }, z.core.$strip>>;
52
+ manifest: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
53
+ ignoredDiffPaths: z.ZodOptional<z.ZodArray<z.ZodString>>;
54
+ }, z.core.$strip>;
55
+ declare const configSchema: z.ZodObject<{
56
+ name: z.ZodString;
57
+ version: z.ZodString;
58
+ source: z.ZodOptional<z.ZodObject<{
59
+ plugins: z.ZodOptional<z.ZodString>;
60
+ skills: z.ZodOptional<z.ZodString>;
61
+ rootPlugin: z.ZodOptional<z.ZodObject<{
62
+ displayName: z.ZodOptional<z.ZodString>;
63
+ author: z.ZodOptional<z.ZodObject<{
64
+ name: z.ZodString;
65
+ email: z.ZodOptional<z.ZodString>;
66
+ url: z.ZodOptional<z.ZodString>;
67
+ }, z.core.$strip>>;
68
+ owner: z.ZodOptional<z.ZodObject<{
69
+ name: z.ZodString;
70
+ email: z.ZodOptional<z.ZodString>;
71
+ url: z.ZodOptional<z.ZodString>;
72
+ }, z.core.$strip>>;
73
+ homepage: z.ZodOptional<z.ZodString>;
74
+ repository: z.ZodOptional<z.ZodString>;
75
+ license: z.ZodOptional<z.ZodString>;
76
+ logo: z.ZodOptional<z.ZodString>;
77
+ keywords: z.ZodOptional<z.ZodArray<z.ZodString>>;
78
+ category: z.ZodOptional<z.ZodString>;
79
+ tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
80
+ id: z.ZodOptional<z.ZodString>;
81
+ name: z.ZodOptional<z.ZodString>;
82
+ description: z.ZodOptional<z.ZodString>;
83
+ }, z.core.$strip>>;
84
+ }, z.core.$strip>>;
85
+ metadata: z.ZodOptional<z.ZodObject<{
86
+ displayName: z.ZodOptional<z.ZodString>;
87
+ description: z.ZodOptional<z.ZodString>;
88
+ author: z.ZodOptional<z.ZodObject<{
89
+ name: z.ZodString;
90
+ email: z.ZodOptional<z.ZodString>;
91
+ url: z.ZodOptional<z.ZodString>;
92
+ }, z.core.$strip>>;
93
+ owner: z.ZodOptional<z.ZodObject<{
94
+ name: z.ZodString;
95
+ email: z.ZodOptional<z.ZodString>;
96
+ url: z.ZodOptional<z.ZodString>;
97
+ }, z.core.$strip>>;
98
+ homepage: z.ZodOptional<z.ZodString>;
99
+ repository: z.ZodOptional<z.ZodString>;
100
+ license: z.ZodOptional<z.ZodString>;
101
+ logo: z.ZodOptional<z.ZodString>;
102
+ keywords: z.ZodOptional<z.ZodArray<z.ZodString>>;
103
+ category: z.ZodOptional<z.ZodString>;
104
+ tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
105
+ }, z.core.$strip>>;
106
+ targets: z.ZodObject<{
107
+ claude: z.ZodOptional<z.ZodObject<{
108
+ outDir: z.ZodString;
109
+ marketplaceDir: z.ZodOptional<z.ZodString>;
110
+ pluginRoot: z.ZodOptional<z.ZodString>;
111
+ version: z.ZodOptional<z.ZodString>;
112
+ plugins: z.ZodRecord<z.ZodString, z.ZodObject<{
113
+ from: z.ZodArray<z.ZodString>;
114
+ path: z.ZodOptional<z.ZodString>;
115
+ version: z.ZodOptional<z.ZodString>;
116
+ description: z.ZodOptional<z.ZodString>;
117
+ displayName: z.ZodOptional<z.ZodString>;
118
+ manifest: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
119
+ components: z.ZodOptional<z.ZodArray<z.ZodString>>;
120
+ }, z.core.$strip>>;
121
+ manifest: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
122
+ ignoredDiffPaths: z.ZodOptional<z.ZodArray<z.ZodString>>;
123
+ }, z.core.$strip>>;
124
+ copilot: z.ZodOptional<z.ZodObject<{
125
+ outDir: z.ZodString;
126
+ marketplaceDir: z.ZodOptional<z.ZodString>;
127
+ pluginRoot: z.ZodOptional<z.ZodString>;
128
+ version: z.ZodOptional<z.ZodString>;
129
+ plugins: z.ZodRecord<z.ZodString, z.ZodObject<{
130
+ from: z.ZodArray<z.ZodString>;
131
+ path: z.ZodOptional<z.ZodString>;
132
+ version: z.ZodOptional<z.ZodString>;
133
+ description: z.ZodOptional<z.ZodString>;
134
+ displayName: z.ZodOptional<z.ZodString>;
135
+ manifest: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
136
+ components: z.ZodOptional<z.ZodArray<z.ZodString>>;
137
+ }, z.core.$strip>>;
138
+ manifest: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
139
+ ignoredDiffPaths: z.ZodOptional<z.ZodArray<z.ZodString>>;
140
+ }, z.core.$strip>>;
141
+ cursor: z.ZodOptional<z.ZodObject<{
142
+ outDir: z.ZodString;
143
+ marketplaceDir: z.ZodOptional<z.ZodString>;
144
+ pluginRoot: z.ZodOptional<z.ZodString>;
145
+ version: z.ZodOptional<z.ZodString>;
146
+ plugins: z.ZodRecord<z.ZodString, z.ZodObject<{
147
+ from: z.ZodArray<z.ZodString>;
148
+ path: z.ZodOptional<z.ZodString>;
149
+ version: z.ZodOptional<z.ZodString>;
150
+ description: z.ZodOptional<z.ZodString>;
151
+ displayName: z.ZodOptional<z.ZodString>;
152
+ manifest: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
153
+ components: z.ZodOptional<z.ZodArray<z.ZodString>>;
154
+ }, z.core.$strip>>;
155
+ manifest: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
156
+ ignoredDiffPaths: z.ZodOptional<z.ZodArray<z.ZodString>>;
157
+ }, z.core.$strip>>;
158
+ antigravity: z.ZodOptional<z.ZodObject<{
159
+ outDir: z.ZodString;
160
+ marketplaceDir: z.ZodOptional<z.ZodString>;
161
+ pluginRoot: z.ZodOptional<z.ZodString>;
162
+ version: z.ZodOptional<z.ZodString>;
163
+ plugins: z.ZodRecord<z.ZodString, z.ZodObject<{
164
+ from: z.ZodArray<z.ZodString>;
165
+ path: z.ZodOptional<z.ZodString>;
166
+ version: z.ZodOptional<z.ZodString>;
167
+ description: z.ZodOptional<z.ZodString>;
168
+ displayName: z.ZodOptional<z.ZodString>;
169
+ manifest: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
170
+ components: z.ZodOptional<z.ZodArray<z.ZodString>>;
171
+ }, z.core.$strip>>;
172
+ manifest: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
173
+ ignoredDiffPaths: z.ZodOptional<z.ZodArray<z.ZodString>>;
174
+ }, z.core.$strip>>;
175
+ }, z.core.$strip>;
176
+ }, z.core.$strip>;
177
+ declare const sourcePluginManifestSchema: z.ZodObject<{
178
+ displayName: z.ZodOptional<z.ZodString>;
179
+ author: z.ZodOptional<z.ZodObject<{
180
+ name: z.ZodString;
181
+ email: z.ZodOptional<z.ZodString>;
182
+ url: z.ZodOptional<z.ZodString>;
183
+ }, z.core.$strip>>;
184
+ owner: z.ZodOptional<z.ZodObject<{
185
+ name: z.ZodString;
186
+ email: z.ZodOptional<z.ZodString>;
187
+ url: z.ZodOptional<z.ZodString>;
188
+ }, z.core.$strip>>;
189
+ homepage: z.ZodOptional<z.ZodString>;
190
+ repository: z.ZodOptional<z.ZodString>;
191
+ license: z.ZodOptional<z.ZodString>;
192
+ logo: z.ZodOptional<z.ZodString>;
193
+ keywords: z.ZodOptional<z.ZodArray<z.ZodString>>;
194
+ category: z.ZodOptional<z.ZodString>;
195
+ tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
196
+ name: z.ZodOptional<z.ZodString>;
197
+ description: z.ZodOptional<z.ZodString>;
198
+ mcpServers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
199
+ }, z.core.$strip>;
200
+
201
+ type Author = z.infer<typeof authorSchema>;
202
+ type Metadata = z.infer<typeof metadataSchema>;
203
+ type EmittedPluginConfig = z.infer<typeof emittedPluginSchema>;
204
+ type TargetConfig = z.infer<typeof targetSchema>;
205
+ type PluginpackConfig = z.infer<typeof configSchema>;
206
+ type SourcePluginManifest = z.infer<typeof sourcePluginManifestSchema>;
207
+
208
+ type TargetName = "claude" | "copilot" | "cursor" | "antigravity";
209
+ type SourcePlugin = {
210
+ id: string;
211
+ dir: string;
212
+ manifest: SourcePluginManifest;
213
+ componentRoots?: Partial<Record<string, string>>;
214
+ includeStaticFiles?: boolean;
215
+ };
216
+ interface SourceProvider {
217
+ listPlugins(): Promise<Map<string, SourcePlugin>>;
218
+ readPluginFiles(pluginId: string, target: TargetName): Promise<Map<string, FileValue>>;
219
+ readMcpServers(pluginId: string): Promise<Record<string, unknown> | undefined>;
220
+ }
221
+ type ResolvedProject = {
222
+ rootDir: string;
223
+ configPath: string;
224
+ config: PluginpackConfig;
225
+ sourceRoot: string;
226
+ plugins: Map<string, SourcePlugin>;
227
+ source: SourceProvider;
228
+ };
229
+ type FileValue = string | Buffer;
230
+ type Artifact = {
231
+ target: TargetName;
232
+ outDir: string;
233
+ files: Map<string, FileValue>;
234
+ managedPaths: string[];
235
+ };
236
+ type BuildOptions = {
237
+ cwd?: string;
238
+ configPath?: string;
239
+ target?: TargetName;
240
+ outDir?: string;
241
+ dryRun?: boolean;
242
+ };
243
+ type ValidationIssue = {
244
+ level: "error" | "warning";
245
+ message: string;
246
+ };
247
+ type ValidationResult = {
248
+ ok: boolean;
249
+ issues: ValidationIssue[];
250
+ };
251
+ type DiffEntry = {
252
+ type: "added" | "changed" | "removed";
253
+ path: string;
254
+ };
255
+ type DiffResult = {
256
+ ok: boolean;
257
+ entries: DiffEntry[];
258
+ };
259
+ type CleanupEntry = {
260
+ type: "deleted" | "stale";
261
+ target: TargetName;
262
+ path: string;
263
+ };
264
+ type CleanupResult = {
265
+ target: TargetName;
266
+ outDir: string;
267
+ entries: CleanupEntry[];
268
+ };
269
+
270
+ declare function defineConfig(config: PluginpackConfig): PluginpackConfig;
271
+ declare function loadConfig(cwd?: string, configPath?: string): Promise<ResolvedProject>;
272
+
273
+ declare function build(options?: BuildOptions): Promise<Artifact[]>;
274
+
275
+ declare function prune(options?: {
276
+ cwd?: string;
277
+ configPath?: string;
278
+ target?: TargetName;
279
+ dryRun?: boolean;
280
+ force?: boolean;
281
+ }): Promise<CleanupResult[]>;
282
+ declare function clean(options?: {
283
+ cwd?: string;
284
+ configPath?: string;
285
+ target?: TargetName;
286
+ dryRun?: boolean;
287
+ force?: boolean;
288
+ }): Promise<CleanupResult[]>;
289
+
290
+ declare function diffTarget(options: {
291
+ cwd?: string;
292
+ configPath?: string;
293
+ target: TargetName;
294
+ against: string;
295
+ }): Promise<DiffResult>;
296
+
297
+ declare function validateOutput(target: TargetName, dir: string): Promise<ValidationResult>;
298
+
299
+ export { type Artifact, type Author, type BuildOptions, type CleanupEntry, type CleanupResult, type DiffResult, type EmittedPluginConfig, type Metadata, type PluginpackConfig, type TargetConfig, type TargetName, type ValidationResult, build, clean, defineConfig, diffTarget, loadConfig, prune, validateOutput };
package/dist/index.js ADDED
@@ -0,0 +1,20 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ build,
4
+ clean,
5
+ defineConfig,
6
+ diffTarget,
7
+ loadConfig,
8
+ prune,
9
+ validateOutput
10
+ } from "./chunk-HR2ZVYJA.js";
11
+ export {
12
+ build,
13
+ clean,
14
+ defineConfig,
15
+ diffTarget,
16
+ loadConfig,
17
+ prune,
18
+ validateOutput
19
+ };
20
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
package/package.json ADDED
@@ -0,0 +1,108 @@
1
+ {
2
+ "name": "@gleanwork/pluginpack",
3
+ "version": "0.5.0",
4
+ "description": "Compile one source of agent plugins — skills, commands, hooks, and MCP servers — into the native plugin format each AI app expects.",
5
+ "keywords": [
6
+ "agent-skills",
7
+ "ai-agents",
8
+ "claude-code",
9
+ "cursor",
10
+ "plugins",
11
+ "skills",
12
+ "pluginpack",
13
+ "antigravity",
14
+ "copilot",
15
+ "mcp"
16
+ ],
17
+ "homepage": "https://github.com/gleanwork/pluginpack#readme",
18
+ "bugs": {
19
+ "url": "https://github.com/gleanwork/pluginpack/issues"
20
+ },
21
+ "repository": {
22
+ "type": "git",
23
+ "url": "git+https://github.com/gleanwork/pluginpack.git"
24
+ },
25
+ "license": "MIT",
26
+ "author": {
27
+ "name": "Glean",
28
+ "url": "https://glean.com"
29
+ },
30
+ "type": "module",
31
+ "exports": {
32
+ ".": {
33
+ "types": "./dist/index.d.ts",
34
+ "import": "./dist/index.js"
35
+ }
36
+ },
37
+ "bin": {
38
+ "pluginpack": "dist/cli.js"
39
+ },
40
+ "files": [
41
+ "assets",
42
+ "dist",
43
+ "CHANGELOG.md",
44
+ "LICENSE",
45
+ "README.md"
46
+ ],
47
+ "scripts": {
48
+ "build": "tsup",
49
+ "check": "npm run test:all",
50
+ "dev": "tsx src/cli.ts",
51
+ "docs": "npm run docs:check",
52
+ "docs:check": "node dist/cli.js docs --check && markdown-code check",
53
+ "docs:sync": "node dist/cli.js docs && markdown-code sync",
54
+ "format": "prettier --write \"**/*.{ts,json,md,yml,yaml}\"",
55
+ "format:check": "prettier --check \"**/*.{ts,json,md,yml,yaml}\"",
56
+ "lint": "eslint .",
57
+ "lint:fix": "eslint . --fix",
58
+ "prepublishOnly": "npm run check && npm pack --dry-run",
59
+ "release": "release-it",
60
+ "test": "vitest run",
61
+ "test:all": "npm run format:check && npm run lint && npm run typecheck && npm run test && npm run build && npm run docs",
62
+ "typecheck": "tsc --noEmit",
63
+ "pretest": "npm run build"
64
+ },
65
+ "dependencies": {
66
+ "commander": "^14.0.3",
67
+ "fast-glob": "^3.3.3",
68
+ "gray-matter": "^4.0.3",
69
+ "jiti": "^2.7.0",
70
+ "zod": "^4.4.3"
71
+ },
72
+ "devDependencies": {
73
+ "@eslint/js": "^9.39.4",
74
+ "@types/node": "^24.10.1",
75
+ "ajv": "^8.20.0",
76
+ "ajv-formats": "^3.0.1",
77
+ "bintastic": "^4.0.2",
78
+ "eslint": "^9.39.4",
79
+ "fixturify-project": "^7.1.3",
80
+ "markdown-code": "^1.1.0",
81
+ "prettier": "^3.8.3",
82
+ "release-it": "^20.0.1",
83
+ "sort-package-json": "^3.6.1",
84
+ "tsup": "^8.5.1",
85
+ "typescript": "^5.9.3",
86
+ "typescript-eslint": "^8.60.0",
87
+ "vitest": "^4.0.14"
88
+ },
89
+ "engines": {
90
+ "node": ">=24.15.0"
91
+ },
92
+ "publishConfig": {
93
+ "access": "public",
94
+ "registry": "https://registry.npmjs.org"
95
+ },
96
+ "release-it": {
97
+ "git": {
98
+ "tagName": "v${version}"
99
+ },
100
+ "github": {
101
+ "release": true,
102
+ "tokenRef": "GITHUB_AUTH"
103
+ },
104
+ "npm": {
105
+ "publish": true
106
+ }
107
+ }
108
+ }