@ai-plugin-marketplace/core 0.1.0 → 0.3.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.
Files changed (61) hide show
  1. package/dist/config.d.ts +112 -0
  2. package/dist/config.d.ts.map +1 -1
  3. package/dist/config.js +56 -0
  4. package/dist/config.js.map +1 -1
  5. package/dist/core.d.ts +187 -4
  6. package/dist/index.d.ts +4 -4
  7. package/dist/index.d.ts.map +1 -1
  8. package/dist/index.js +2 -2
  9. package/dist/index.js.map +1 -1
  10. package/dist/pipeline/build.d.ts +159 -1
  11. package/dist/pipeline/build.d.ts.map +1 -1
  12. package/dist/pipeline/build.js +413 -9
  13. package/dist/pipeline/build.js.map +1 -1
  14. package/dist/pipeline/discover.d.ts +20 -13
  15. package/dist/pipeline/discover.d.ts.map +1 -1
  16. package/dist/pipeline/discover.js +53 -32
  17. package/dist/pipeline/discover.js.map +1 -1
  18. package/dist/pipeline/init-template.d.ts +16 -5
  19. package/dist/pipeline/init-template.d.ts.map +1 -1
  20. package/dist/pipeline/init-template.js +65 -21
  21. package/dist/pipeline/init-template.js.map +1 -1
  22. package/dist/pipeline/init.d.ts +17 -14
  23. package/dist/pipeline/init.d.ts.map +1 -1
  24. package/dist/pipeline/init.js +23 -15
  25. package/dist/pipeline/init.js.map +1 -1
  26. package/dist/pipeline/load-config.d.ts +62 -2
  27. package/dist/pipeline/load-config.d.ts.map +1 -1
  28. package/dist/pipeline/load-config.js +147 -30
  29. package/dist/pipeline/load-config.js.map +1 -1
  30. package/dist/pipeline/operations.d.ts +15 -3
  31. package/dist/pipeline/operations.d.ts.map +1 -1
  32. package/dist/pipeline/operations.js +25 -4
  33. package/dist/pipeline/operations.js.map +1 -1
  34. package/dist/pipeline/scaffold-refresh.d.ts +80 -0
  35. package/dist/pipeline/scaffold-refresh.d.ts.map +1 -0
  36. package/dist/pipeline/scaffold-refresh.js +152 -0
  37. package/dist/pipeline/scaffold-refresh.js.map +1 -0
  38. package/dist/pipeline/scaffold.d.ts.map +1 -1
  39. package/dist/pipeline/scaffold.js +55 -26
  40. package/dist/pipeline/scaffold.js.map +1 -1
  41. package/dist/pipeline/types.d.ts +51 -3
  42. package/dist/pipeline/types.d.ts.map +1 -1
  43. package/dist/pipeline/types.js +1 -0
  44. package/dist/pipeline/types.js.map +1 -1
  45. package/dist/pipeline/validate.d.ts +12 -2
  46. package/dist/pipeline/validate.d.ts.map +1 -1
  47. package/dist/pipeline/validate.js +342 -38
  48. package/dist/pipeline/validate.js.map +1 -1
  49. package/dist/targets/codex/scaffold.d.ts +31 -0
  50. package/dist/targets/codex/scaffold.d.ts.map +1 -0
  51. package/dist/targets/codex/scaffold.js +47 -0
  52. package/dist/targets/codex/scaffold.js.map +1 -0
  53. package/dist/targets/codex/schemas.d.ts +70 -0
  54. package/dist/targets/codex/schemas.d.ts.map +1 -0
  55. package/dist/targets/codex/schemas.js +153 -0
  56. package/dist/targets/codex/schemas.js.map +1 -0
  57. package/dist/targets/codex/validate.d.ts +25 -0
  58. package/dist/targets/codex/validate.d.ts.map +1 -0
  59. package/dist/targets/codex/validate.js +117 -0
  60. package/dist/targets/codex/validate.js.map +1 -0
  61. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../src/pipeline/build.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAeH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAElD,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAiB,QAAQ,EAAE,MAAM,YAAY,CAAC;AAMrF;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IACjC,2CAA2C;IAC3C,OAAO,EAAE,MAAM,CAAC;IAChB,0FAA0F;IAC1F,MAAM,EAAE,MAAM,CAAC;IACf,+CAA+C;IAC/C,YAAY,EAAE,YAAY,CAAC;IAC3B,oDAAoD;IACpD,MAAM,EAAE,QAAQ,CAAC;IACjB,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H,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,aAAa,EACxB,YAAY,EAAE,SAAS,MAAM,EAAE,GAC9B;IAAE,QAAQ,EAAE,OAAO,EAAE,CAAC;IAAC,aAAa,EAAE,GAAG,CAAC,kBAAkB,CAAC,CAAA;CAAE,CAejE;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,YAAY,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,CAO7E;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,EAAE,CAkBhE;AAED,+FAA+F;AAC/F,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,CAa1D;AAiED;;;;;;;;;;;;;GAaG;AACH,wBAAsB,QAAQ,CAAC,UAAU,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,YAAY,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC,CAyH9F;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM,CAIjE"}
@@ -23,7 +23,7 @@ import { convertClaudeHooksYamlToGeminiJson } from '../targets/gemini/transform.
23
23
  import { bundleGeminiPlugin } from '../targets/gemini/bundle.js';
24
24
  import { bundleKiroPlugin } from '../targets/kiro/bundle.js';
25
25
  import { discoverPlugins } from './discover.js';
26
- import { loadPluginConfig } from './load-config.js';
26
+ import { createConfigCache, loadPluginConfig, loadWorkspaceConfig } from './load-config.js';
27
27
  import { applyJsonSentinel } from './sentinel.js';
28
28
  import { runValidate } from './validate.js';
29
29
  /** First existing hooks YAML candidate (`claude.yaml`, then `claude.yml`), or `undefined`. */
@@ -110,9 +110,317 @@ export function computeDistBundles(pluginDir, distDir, envelope) {
110
110
  }
111
111
  return bundles;
112
112
  }
113
- // TODO(spec §4.3): sidecar sentinels for strict-schema dist artifacts (Gemini
114
- // `gemini-extension.json`, Kiro `.kiro/agents/*.json`) are deferred to preserve dist byte-parity
115
- // with the committed oracle. Adding them requires regenerating the oracle in the template repo.
113
+ /** Where each registry-backed target's `marketplace.json` lives, relative to the repo root. */
114
+ const REGISTRY_REL_PATHS = {
115
+ claude: ['.claude-plugin', 'marketplace.json'],
116
+ cursor: ['.cursor-plugin', 'marketplace.json'],
117
+ codex: ['.agents', 'plugins', 'marketplace.json'],
118
+ };
119
+ /**
120
+ * Absolute paths of every registry the toolkit MANAGES under a repo root (one per registry-backed
121
+ * target), regardless of whether the current envelope produces it. Used to detect **orphaned**
122
+ * registries — a committed `marketplace.json` for a target no longer declared by any plugin —
123
+ * which `runBuild` removes and the validator flags as stale. Shared so build and validate agree
124
+ * on exactly which files generation owns (and never touch anything else).
125
+ */
126
+ export function managedRegistryPaths(repoRoot) {
127
+ return Object.values(REGISTRY_REL_PATHS).map((rel) => path.join(repoRoot, ...rel));
128
+ }
129
+ /** Default Codex plugin category when none is otherwise specified (design spec §"Codex"). */
130
+ const CODEX_DEFAULT_CATEGORY = 'Productivity';
131
+ /**
132
+ * Serialize a registry object as 2-space JSON with a trailing newline — byte-stable with the
133
+ * `registerInMarketplace`/dist serialization so freshness compares cleanly.
134
+ */
135
+ function serializeRegistry(obj) {
136
+ return `${JSON.stringify(obj, null, 2)}\n`;
137
+ }
138
+ /**
139
+ * Build a Claude/Cursor (string-source) registry object from the workspace metadata and the
140
+ * plugins whose envelope includes `target`. Entry shape:
141
+ * `{ name, source, description?, tags? }` — `description`/`tags` keys are omitted when absent
142
+ * (never serialized as `undefined`).
143
+ */
144
+ function buildStringSourceRegistry(workspace, plugins) {
145
+ const { marketplace } = workspace;
146
+ const registry = { name: marketplace.name };
147
+ if (marketplace.owner !== undefined) {
148
+ registry['owner'] = marketplace.owner;
149
+ }
150
+ if (marketplace.description !== undefined) {
151
+ registry['metadata'] = { description: marketplace.description };
152
+ }
153
+ registry['plugins'] = plugins.map((p) => {
154
+ const entry = { name: p.name, source: p.source };
155
+ if (p.description !== undefined)
156
+ entry['description'] = p.description;
157
+ if (p.keywords !== undefined)
158
+ entry['tags'] = [...p.keywords];
159
+ return entry;
160
+ });
161
+ return registry;
162
+ }
163
+ /**
164
+ * Build the Codex (object-source) registry object. Entry shape:
165
+ * `{ name, source: { source: 'local', path }, policy: { installation, authentication }, category }`.
166
+ * `interface.displayName` defaults to `marketplace.name`; `category` defaults to
167
+ * `'Productivity'` (design spec §"Codex").
168
+ */
169
+ function buildCodexRegistry(workspace, plugins) {
170
+ const { marketplace } = workspace;
171
+ return {
172
+ name: marketplace.name,
173
+ interface: { displayName: marketplace.name },
174
+ plugins: plugins.map((p) => ({
175
+ name: p.name,
176
+ source: { source: 'local', path: p.source },
177
+ policy: { installation: 'AVAILABLE', authentication: 'ON_INSTALL' },
178
+ category: CODEX_DEFAULT_CATEGORY,
179
+ })),
180
+ };
181
+ }
182
+ /**
183
+ * Compute the generated marketplace registries for a repo, **without writing**. The single source
184
+ * of truth shared by `runBuild` (which writes `expectedContent`) and the freshness check (which
185
+ * compares the on-disk bytes against it).
186
+ *
187
+ * A registry file is produced for each registry-backed target (`claude` → `.claude-plugin/`,
188
+ * `cursor` → `.cursor-plugin/`, `codex` → `.agents/plugins/`) that appears in **at least one**
189
+ * plugin's envelope. Each registry lists exactly the plugins whose envelope includes that target,
190
+ * in the order given (callers pass plugins sorted by discovery). Registries are sentinel-less.
191
+ *
192
+ * @param repoRoot - Absolute repo root (where the registries live).
193
+ * @param plugins - Discovered plugins with name/source/envelope/description/keywords.
194
+ * @param workspace - The validated `aipm.workspace.ts` metadata.
195
+ */
196
+ export function computeRegistryArtifacts(repoRoot, plugins, workspace) {
197
+ const artifacts = [];
198
+ for (const target of ['claude', 'cursor', 'codex']) {
199
+ const members = plugins.filter((p) => p.envelope.includes(target));
200
+ if (members.length === 0)
201
+ continue; // no plugin declares this target → no registry file
202
+ const obj = target === 'codex'
203
+ ? buildCodexRegistry(workspace, members)
204
+ : buildStringSourceRegistry(workspace, members);
205
+ artifacts.push({
206
+ target,
207
+ absPath: path.join(repoRoot, ...REGISTRY_REL_PATHS[target]),
208
+ expectedContent: serializeRegistry(obj),
209
+ });
210
+ }
211
+ return artifacts;
212
+ }
213
+ /**
214
+ * Assemble the {@link RegistryPluginInfo} for every discovered plugin under `repoRoot`, loading
215
+ * each plugin's `aipm.config.ts` for its envelope, description, and keywords. Shared by `runBuild`
216
+ * and the freshness check so both feed `computeRegistryArtifacts` identical input.
217
+ *
218
+ * @param repoRoot - Absolute repo root (the base for the `./`-prefixed `source`).
219
+ * @param pluginDirs - Absolute plugin directories (already discovery-sorted).
220
+ */
221
+ export async function collectRegistryPlugins(repoRoot, pluginDirs, cache) {
222
+ const infos = [];
223
+ for (const pluginDir of pluginDirs) {
224
+ const config = await loadPluginConfig(pluginDir, cache);
225
+ const source = `./${path.relative(repoRoot, pluginDir).split(path.sep).join('/')}`;
226
+ infos.push({
227
+ name: path.basename(pluginDir),
228
+ source,
229
+ envelope: config.targets,
230
+ ...(config.description !== undefined ? { description: config.description } : {}),
231
+ ...(config.keywords !== undefined ? { keywords: config.keywords } : {}),
232
+ });
233
+ }
234
+ return infos;
235
+ }
236
+ // ---------------------------------------------------------------------------
237
+ // Single-artifact-host repo-root native emission (Gemini / Kiro)
238
+ // ---------------------------------------------------------------------------
239
+ /**
240
+ * The hosts that have NO multi-plugin marketplace concept: each installs exactly ONE
241
+ * extension/power per repo, read from the **repo root**. `gemini extensions install <git>` reads a
242
+ * root `gemini-extension.json`; Kiro "Add from GitHub" reads a root `POWER.md`. Because the repo
243
+ * root has a single slot per host, at most one plugin may declare each — see the N=1 gate below.
244
+ */
245
+ const SINGLE_ARTIFACT_HOSTS = ['gemini', 'kiro'];
246
+ /** Repo-root-relative path of the sidecar that tracks the toolkit-generated root file set. */
247
+ const ROOT_MANIFEST_REL = ['.aipm', 'generated-root.json'];
248
+ /** Absolute path of the generated-root sidecar manifest under `repoRoot`. */
249
+ export function rootManifestPath(repoRoot) {
250
+ return path.join(repoRoot, ...ROOT_MANIFEST_REL);
251
+ }
252
+ /**
253
+ * Bundle each single-artifact host into a fresh temp dir, returning the per-host destination dir.
254
+ * The bundlers `rmSync` their destDir (gemini/bundle.ts, kiro/bundle.ts), so they MUST be pointed
255
+ * at a throwaway temp directory — never the repo root or any real dir. Mirrors the
256
+ * `regenerate`/temp pattern used by {@link computeDistBundles}.
257
+ */
258
+ function bundleHostToTemp(host, pluginDir) {
259
+ const tempDir = fs.mkdtempSync(path.join(os.tmpdir(), `aipm-root-${host}-`));
260
+ if (host === 'gemini') {
261
+ bundleGeminiPlugin(pluginDir, tempDir);
262
+ }
263
+ else {
264
+ bundleKiroPlugin(pluginDir, tempDir);
265
+ }
266
+ return tempDir;
267
+ }
268
+ /**
269
+ * Build a hard `single-artifact-host` finding. Repo-scoped (no owning plugin): the ambiguity is a
270
+ * property of the whole repo's plugin set, not any one plugin.
271
+ */
272
+ function singleArtifactHostFinding(host, declarers) {
273
+ const list = [...declarers].sort().join(', ');
274
+ return {
275
+ severity: 'hard',
276
+ code: 'single-artifact-host',
277
+ message: `Host '${host}' installs ONE extension/power per repo from the repo root, but ${String(declarers.length)} plugins declare it: [${list}]. ` +
278
+ `Its root artifact is NOT emitted while this ambiguity stands.`,
279
+ hint: `Remove '${host}' from all but one plugin's targets in aipm.config.ts so a single plugin owns the repo-root ${host} artifact.`,
280
+ };
281
+ }
282
+ /**
283
+ * Compute the repo-root native artifacts for the single-artifact hosts (`gemini`, `kiro`),
284
+ * **without writing**. The single source of truth shared by `runBuild` (which writes the files,
285
+ * applies the collision guard, and orphan-removes) and the freshness check (which compares disk to
286
+ * these bytes). Bundling happens into a throwaway temp dir — the repo root is never passed to a
287
+ * bundler, so the bundlers' `rmSync(destDir)` can never touch repo-root state.
288
+ *
289
+ * **N=1 gate (`single-artifact-host`).** For each host, count the plugins whose envelope declares
290
+ * it. Exactly one declarer → emit that plugin's bundled files at the repo root. More than one →
291
+ * emit a hard `single-artifact-host` finding and emit NOTHING for that host (the toolkit can't pick
292
+ * which plugin owns the single root slot). Zero → nothing to emit (and no finding). The two hosts
293
+ * are independent: a repo where plugin A declares `gemini` and plugin B declares `kiro` emits both
294
+ * (a root `gemini-extension.json` and a root `POWER.md` — distinct files).
295
+ *
296
+ * @param repoRoot - Absolute repo root (where the artifacts live). Accepted for signature
297
+ * parallelism with {@link computeRegistryArtifacts}; the bundlers read only the plugin dir.
298
+ * @param plugins - Discovered plugins with name/source/envelope (the registry plugin infos already
299
+ * collected for {@link computeRegistryArtifacts}). Each `source` resolves the plugin dir.
300
+ * @param _workspace - The validated workspace metadata. Unused by the bundlers today; accepted for
301
+ * parallelism with the registry compute signature and to future-proof host metadata injection.
302
+ */
303
+ export function computeRootArtifacts(repoRoot, plugins, _workspace) {
304
+ const files = [];
305
+ const trackedPaths = new Set();
306
+ const findings = [];
307
+ for (const host of SINGLE_ARTIFACT_HOSTS) {
308
+ const declarers = plugins.filter((p) => p.envelope.includes(host));
309
+ if (declarers.length === 0)
310
+ continue; // no plugin declares this host → nothing to emit
311
+ if (declarers.length > 1) {
312
+ // N>1 gate: ambiguous owner. Suppress emission and flag.
313
+ findings.push(singleArtifactHostFinding(host, declarers.map((p) => p.name)));
314
+ continue;
315
+ }
316
+ // Exactly one declarer: bundle it into temp, then capture its files as repo-root artifacts.
317
+ const declarer = declarers[0];
318
+ if (declarer === undefined)
319
+ continue; // unreachable (length === 1), satisfies noUncheckedIndexedAccess
320
+ // `source` is `./<rel>` POSIX from the repo root; resolve to the absolute plugin dir.
321
+ const pluginDir = path.resolve(repoRoot, declarer.source);
322
+ let tempDir;
323
+ try {
324
+ tempDir = bundleHostToTemp(host, pluginDir);
325
+ for (const rel of collectFilesRelative(tempDir)) {
326
+ // Tracked set is POSIX-separated (stable across platforms; the freshness oracle and
327
+ // sidecar compare against this exact form).
328
+ const relPosix = rel.split(path.sep).join('/');
329
+ trackedPaths.add(relPosix);
330
+ files.push({
331
+ relPath: relPosix,
332
+ host,
333
+ content: fs.readFileSync(path.join(tempDir, rel)),
334
+ });
335
+ }
336
+ }
337
+ finally {
338
+ if (tempDir !== undefined && fs.existsSync(tempDir)) {
339
+ fs.rmSync(tempDir, { recursive: true });
340
+ }
341
+ }
342
+ }
343
+ return { files, trackedPaths: [...trackedPaths].sort(), findings };
344
+ }
345
+ /**
346
+ * Build a hard `root-artifact-collision` finding for a repo-root path the toolkit would generate
347
+ * but which is already occupied by a file it does NOT track as previously-generated (so the file
348
+ * belongs to the host software / the author). Repo-scoped — names the offending path.
349
+ */
350
+ function rootCollisionFinding(host, relPath) {
351
+ return {
352
+ severity: 'hard',
353
+ code: 'root-artifact-collision',
354
+ message: `Cannot emit the repo-root '${host}' artifact: '${relPath}' already exists and is not toolkit-generated. ` +
355
+ `Generation refuses to overwrite repo-root state it does not own.`,
356
+ hint: `Move or remove '${relPath}' (or, if it is stale toolkit output, add it to ${ROOT_MANIFEST_REL.join('/')}) and re-run \`aipm build\`.`,
357
+ };
358
+ }
359
+ /**
360
+ * Detect repo-root collisions for the freshly computed {@link RootArtifacts}, given the PRIOR
361
+ * tracked set. A file collides when it exists on disk AND its repo-root-relative path is NOT in the
362
+ * prior tracked set — i.e. it is not something the toolkit previously created, so it belongs to the
363
+ * host/author and must not be clobbered (safety guard 3). A clean repo (no pre-existing root files)
364
+ * never collides. Collision is evaluated PER HOST: if any of a host's files collide, that host is
365
+ * suppressed entirely (no partial writes) and a single finding names the first offending path.
366
+ *
367
+ * Returns the collision findings plus the set of hosts that collided (so the caller can skip
368
+ * writing/tracking their files). Pure — no I/O beyond `existsSync`.
369
+ */
370
+ export function detectRootCollisions(repoRoot, artifacts, priorTracked) {
371
+ const priorSet = new Set(priorTracked);
372
+ const findings = [];
373
+ const collidedHosts = new Set();
374
+ for (const file of artifacts.files) {
375
+ if (collidedHosts.has(file.host))
376
+ continue; // already flagged this host's first collision
377
+ const abs = path.join(repoRoot, ...file.relPath.split('/'));
378
+ if (fs.existsSync(abs) && !priorSet.has(file.relPath)) {
379
+ findings.push(rootCollisionFinding(file.host, file.relPath));
380
+ collidedHosts.add(file.host);
381
+ }
382
+ }
383
+ return { findings, collidedHosts };
384
+ }
385
+ /**
386
+ * Serialize the generated-root sidecar manifest. Shape: `{ version: 1, paths: string[] }` where
387
+ * `paths` is the sorted set of repo-root-relative POSIX paths the toolkit generated (the sidecar
388
+ * itself is NOT listed — it is tracked separately and always lives at {@link rootManifestPath}).
389
+ * 2-space JSON + trailing newline, byte-stable so the freshness compare is exact.
390
+ */
391
+ export function serializeRootManifest(trackedPaths) {
392
+ // Canonicalize (dedupe + sort) so the bytes are identical regardless of caller. The freshness
393
+ // oracle in validate.ts collects one entry per emitting host, so a path shared by both the gemini
394
+ // and kiro bundles (e.g. `skills/<name>/SKILL.md`) appears twice; build passes a deduped set.
395
+ // Without deduping here, those two callers would serialize differently and the sidecar would read
396
+ // as perpetually stale (a false `freshness` finding).
397
+ return `${JSON.stringify({ version: 1, paths: [...new Set(trackedPaths)].sort() }, null, 2)}\n`;
398
+ }
399
+ /**
400
+ * Read the prior generated-root sidecar manifest, returning the tracked-path set it recorded.
401
+ * Returns an empty array when the sidecar is absent or unparseable — a missing/corrupt sidecar is
402
+ * treated as "nothing tracked yet" (a clean first build), and the collision guard then protects any
403
+ * pre-existing root files. POSIX-separated paths are returned as-is.
404
+ */
405
+ export function readRootManifestPaths(repoRoot) {
406
+ const manifestPath = rootManifestPath(repoRoot);
407
+ if (!fs.existsSync(manifestPath))
408
+ return [];
409
+ try {
410
+ const parsed = JSON.parse(fs.readFileSync(manifestPath, 'utf-8'));
411
+ if (typeof parsed === 'object' &&
412
+ parsed !== null &&
413
+ 'paths' in parsed &&
414
+ Array.isArray(parsed.paths)) {
415
+ const { paths } = parsed;
416
+ return paths.filter((p) => typeof p === 'string');
417
+ }
418
+ }
419
+ catch {
420
+ // Corrupt sidecar → treat as nothing tracked; the collision guard protects existing files.
421
+ }
422
+ return [];
423
+ }
116
424
  /** Collect every file path under `dir`, relative to `dir`. Returns `[]` if `dir` is absent. */
117
425
  export function collectFilesRelative(dir) {
118
426
  if (!fs.existsSync(dir))
@@ -142,10 +450,10 @@ function writeFileEnsuringDir(absPath, content) {
142
450
  * Build a single plugin: load envelope, emit in-plugin hook JSONs and dist bundles, and return
143
451
  * the `BuildResult` (without running validation — the caller orchestrates §5.4 validation once).
144
452
  */
145
- async function buildOnePlugin(pluginDir, distDir) {
453
+ async function buildOnePlugin(pluginDir, distDir, cache) {
146
454
  const start = performance.now();
147
455
  const pluginName = path.basename(pluginDir);
148
- const config = await loadPluginConfig(pluginDir);
456
+ const config = await loadPluginConfig(pluginDir, cache);
149
457
  const envelope = config.targets;
150
458
  const artifacts = [];
151
459
  // ── In-plugin-dir generated hook JSONs (sentinel-carrying) ────────────────
@@ -168,7 +476,7 @@ async function buildOnePlugin(pluginDir, distDir) {
168
476
  });
169
477
  }
170
478
  }
171
- // cursor / vercel emit no mechanical build output — nothing to do.
479
+ // codex / cursor / vercel emit no mechanical build output — nothing to do.
172
480
  return {
173
481
  plugin: pluginName,
174
482
  pluginDir,
@@ -194,10 +502,106 @@ async function buildOnePlugin(pluginDir, distDir) {
194
502
  * a transform fails, or (when `failFast`) post-build validation reports hard findings.
195
503
  */
196
504
  export async function runBuild(targetPath, opts) {
197
- const { pluginDirs, distDir } = discoverPlugins(targetPath);
505
+ const { repoRoot, pluginDirs, distDir } = await discoverPlugins(targetPath);
506
+ // One per-invocation config memo shared across the build loop and registry collection, so each
507
+ // plugin's aipm.config.ts is transpiled once rather than reloaded per phase (see ConfigCache).
508
+ const configCache = createConfigCache();
198
509
  const results = [];
199
510
  for (const pluginDir of pluginDirs) {
200
- results.push(await buildOnePlugin(pluginDir, distDir));
511
+ results.push(await buildOnePlugin(pluginDir, distDir, configCache));
512
+ }
513
+ // ── Marketplace registries (opt-in via aipm.workspace.ts at the repo root) ──
514
+ // When the repo has opted into registry generation, the three marketplace.json files are
515
+ // GENERATED here (subsuming the hand-authored registries + validateMarketplaceRegistration).
516
+ // Registries are repo-level, so we compute them from EVERY plugin under the repo root — not just
517
+ // the one a single-plugin `targetPath` named — so a partial build never drops sibling entries.
518
+ // Re-discovering from `repoRoot` (rather than reusing `pluginDirs`, which holds only the named
519
+ // plugin for single-plugin input) is what makes the registry repo-complete. When no
520
+ // `aipm.workspace.ts` is present, generation does nothing and the registries stay hand-authored.
521
+ const workspace = await loadWorkspaceConfig(repoRoot);
522
+ if (workspace !== undefined) {
523
+ // For repo-root input, pluginDirs already covers the whole repo — reuse it (and the warm
524
+ // config cache) instead of re-discovering and reloading. Only single-plugin input needs a
525
+ // repo-wide re-scan to make the registry repo-complete.
526
+ const isRepoRoot = path.resolve(targetPath) === repoRoot;
527
+ const allPluginDirs = isRepoRoot ? pluginDirs : (await discoverPlugins(repoRoot)).pluginDirs;
528
+ const registryPlugins = await collectRegistryPlugins(repoRoot, allPluginDirs, configCache);
529
+ const registries = computeRegistryArtifacts(repoRoot, registryPlugins, workspace);
530
+ const expectedPaths = new Set(registries.map((r) => r.absPath));
531
+ for (const registry of registries) {
532
+ writeFileEnsuringDir(registry.absPath, registry.expectedContent);
533
+ }
534
+ // Remove ORPHANED registries: a managed `marketplace.json` for a target no longer declared by
535
+ // any plugin (e.g. the last `claude` plugin was dropped). Without this, a stale generated
536
+ // registry would linger in the working tree and stay committed. Only the toolkit-managed
537
+ // registry paths are ever touched.
538
+ for (const orphan of managedRegistryPaths(repoRoot)) {
539
+ if (!expectedPaths.has(orphan) && fs.existsSync(orphan)) {
540
+ fs.rmSync(orphan);
541
+ }
542
+ }
543
+ // Record the generated registries as repo-level artifacts on every built plugin's result so
544
+ // they surface in BuildResult regardless of which plugin a single-plugin build targeted.
545
+ for (const result of results) {
546
+ for (const registry of registries) {
547
+ result.artifacts.push({ path: registry.absPath, target: registry.target });
548
+ }
549
+ }
550
+ // ── Single-artifact-host repo-root native emission (gemini / kiro) ──────────
551
+ // These hosts install ONE extension/power per repo from the repo ROOT and have no marketplace
552
+ // concept, so the artifact is emitted at the repo root (not under dist/). Like registries, this
553
+ // is repo-level and computed from EVERY plugin so the N=1 gate sees the whole repo. The emit is
554
+ // safety-guarded: bundling happens in temp (never against repoRoot), a collision guard refuses
555
+ // to overwrite non-generated root files, and orphan removal is bounded to the prior tracked set
556
+ // recorded in the committed sidecar manifest.
557
+ const priorTracked = readRootManifestPaths(repoRoot);
558
+ const root = computeRootArtifacts(repoRoot, registryPlugins, workspace);
559
+ const { collidedHosts } = detectRootCollisions(repoRoot, root, priorTracked);
560
+ // The tracked set is only the paths we actually WRITE — files of a collided (suppressed) host
561
+ // are neither written nor tracked, so orphan removal can never delete a host-owned collider.
562
+ const writtenTracked = new Set();
563
+ const emittedHosts = new Set();
564
+ for (const file of root.files) {
565
+ if (collidedHosts.has(file.host))
566
+ continue;
567
+ const abs = path.join(repoRoot, ...file.relPath.split('/'));
568
+ fs.mkdirSync(path.dirname(abs), { recursive: true });
569
+ fs.writeFileSync(abs, file.content);
570
+ writtenTracked.add(file.relPath);
571
+ emittedHosts.add(file.host);
572
+ for (const result of results) {
573
+ result.artifacts.push({ path: abs, target: file.host });
574
+ }
575
+ }
576
+ // Orphan removal: any path in the PRIOR tracked set that is no longer generated this run is a
577
+ // path the toolkit previously created and now owns the right to delete (e.g. the gemini plugin
578
+ // was dropped, or a second gemini plugin disabled emission via the N=1 gate). Bounded strictly
579
+ // to `priorTracked` — we never delete a file we did not previously record as generated.
580
+ for (const rel of priorTracked) {
581
+ if (writtenTracked.has(rel))
582
+ continue;
583
+ const abs = path.join(repoRoot, ...rel.split('/'));
584
+ if (fs.existsSync(abs))
585
+ fs.rmSync(abs);
586
+ }
587
+ // Write/update the sidecar manifest (itself a generated, freshness-checked artifact). When the
588
+ // tracked set is empty AND no sidecar existed, skip writing so a repo that never used these
589
+ // hosts stays free of an empty `.aipm/` dir; otherwise keep it in sync (including emptying it).
590
+ const manifestAbs = rootManifestPath(repoRoot);
591
+ const trackedSorted = [...writtenTracked].sort();
592
+ if (trackedSorted.length > 0 || fs.existsSync(manifestAbs)) {
593
+ writeFileEnsuringDir(manifestAbs, serializeRootManifest(trackedSorted));
594
+ // The sidecar spans hosts but `GeneratedFile.target` is singular; attribute it to an
595
+ // actually-emitted host (deterministic order), and only when something was emitted this run.
596
+ // When the manifest is being emptied via orphan removal, no host produced it — don't record
597
+ // it as a host artifact.
598
+ const sidecarHost = ['gemini', 'kiro'].find((h) => emittedHosts.has(h));
599
+ if (sidecarHost !== undefined) {
600
+ for (const result of results) {
601
+ result.artifacts.push({ path: manifestAbs, target: sidecarHost });
602
+ }
603
+ }
604
+ }
201
605
  }
202
606
  // §5.4: build runs validate before returning success. Skip freshness here — we just wrote the
203
607
  // artifacts, so they are fresh by construction; running it would be redundant work.
@@ -1 +1 @@
1
- {"version":3,"file":"build.js","sourceRoot":"","sources":["../../src/pipeline/build.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,OAAO,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AACtE,OAAO,EAAE,kCAAkC,EAAE,MAAM,gCAAgC,CAAC;AACpF,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAE7D,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAElD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAyB5C,8FAA8F;AAC9F,SAAS,aAAa,CAAC,SAAiB;IACtC,KAAK,MAAM,IAAI,IAAI,CAAC,aAAa,EAAE,YAAY,CAAC,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aAAa,EAAE,IAAI,EAAE,CAAC,CAAC;IAC1E,IAAI,IAAI,EAAE,QAAQ,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC;QACzC,MAAM,YAAY,GAAG,UAAU,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,KAAK,MAAM,CAAC,CAAC;QAC9E,MAAM,OAAO,GAAG,YAAY;aACzB,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC,MAAM,IAAI,GAAG,KAAK,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,OAAO,EAAE,CAAC;aAC5D,IAAI,CAAC,IAAI,CAAC,CAAC;QACd,MAAM,IAAI,KAAK,CACb,kBAAkB,MAAM,CAAC,YAAY,CAAC,MAAM,CAAC,iCAAiC,OAAO,EAAE,CACxF,CAAC;IACJ,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,sBAAsB,CAAC,MAAkB;IACvD,MAAM,OAAO,GAAG,EAAE,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,MAAM,EAAE,EAAE,iBAAiB,CAAC,CAAC,CAAC;IAC1E,MAAM,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;IAC3B,OAAO,OAAO,CAAC;AACjB,CAAC"}
@@ -1,37 +1,44 @@
1
1
  /**
2
2
  * Plugin discovery: resolve a `targetPath` (plugin dir or repo root) to the list of plugin
3
- * directories to operate on plus the `dist/` output root. Shared by the build (§5.2) and
3
+ * directories to operate on plus the dist output root. Shared by the build (§5.2) and
4
4
  * validate (§5.3) orchestrators so they detect topology identically.
5
5
  *
6
6
  * Detection rules (§8.1 "Why one build signature"):
7
- * - **Repo root** — `targetPath` contains a `plugins/` directory. Every immediate subdirectory
8
- * of `plugins/` that contains an `aipm.config.ts` is a plugin; `dist/` sits at `<root>/dist`.
7
+ * - **Repo root** — `targetPath` contains the configured plugins root (default `plugins/`), or an
8
+ * `aipm.repo.ts`. Every immediate subdirectory of the plugins root that contains an
9
+ * `aipm.config.ts` is a plugin; generated bundles sit at the configured dist root
10
+ * (default `<root>/dist`).
9
11
  * - **Single plugin** — otherwise `targetPath` is treated as a single plugin directory. The repo
10
- * root is the plugin's grandparent (`repoRoot = dirname(dirname(pluginDir))`) and `dist/` sits
11
- * there. A missing `aipm.config.ts` is **not** a discovery error: it is deferred to the
12
- * config loader so the validate orchestrator can report it as an `envelope-invalid` finding
13
- * (§10.1 step 1) and the build orchestrator can throw a descriptive error.
12
+ * root is the plugin's grandparent (`repoRoot = dirname(dirname(pluginDir))`) and the dist root
13
+ * is resolved from that repo root's config. A missing `aipm.config.ts` is **not** a discovery
14
+ * error: it is deferred to the config loader so the validate orchestrator can report it as an
15
+ * `envelope-invalid` finding (§10.1 step 1) and the build orchestrator can throw a descriptive
16
+ * error.
14
17
  *
15
18
  * Repo-root detection is tried first so a real repo root is never misread as a single plugin.
16
19
  *
20
+ * The plugins root and dist root are read from an optional `aipm.repo.ts` at the repo root
21
+ * (embedded-marketplace support). Absent that file, they default to `plugins/` and `dist/`, so a
22
+ * repo with no repo config behaves exactly as before.
23
+ *
17
24
  * @see docs/specs/architecture.md §8.1, §3.2 (repository topology), §10.1 (validation order)
18
25
  */
19
26
  /** Result of resolving a `targetPath` to concrete plugin directories and a dist root. */
20
27
  export interface Discovery {
21
- /** Absolute repo root (where `dist/` lives). */
28
+ /** Absolute repo root (where the configured plugins/dist roots live). */
22
29
  repoRoot: string;
23
- /** Absolute `dist/` output directory. */
30
+ /** Absolute dist output directory (the configured dist root under the repo root). */
24
31
  distDir: string;
25
32
  /** Absolute plugin directories to operate on (length 1 for single-plugin input). */
26
33
  pluginDirs: string[];
27
34
  }
28
35
  /**
29
- * Resolve `targetPath` to the plugins to build/validate and the `dist/` root.
36
+ * Resolve `targetPath` to the plugins to build/validate and the dist root.
30
37
  *
31
38
  * @param targetPath - Absolute path to a single plugin directory or a repo root.
32
39
  * @returns The resolved discovery.
33
- * @throws {Error} If `targetPath` is neither a plugin directory nor a repo root with a
34
- * `plugins/` directory.
40
+ * @throws {Error} If `targetPath` does not exist.
41
+ * @throws {ConfigLoadError} If a present `aipm.repo.ts` cannot be imported or fails validation.
35
42
  */
36
- export declare function discoverPlugins(targetPath: string): Discovery;
43
+ export declare function discoverPlugins(targetPath: string): Promise<Discovery>;
37
44
  //# sourceMappingURL=discover.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"discover.d.ts","sourceRoot":"","sources":["../../src/pipeline/discover.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAOH,yFAAyF;AACzF,MAAM,WAAW,SAAS;IACxB,gDAAgD;IAChD,QAAQ,EAAE,MAAM,CAAC;IACjB,yCAAyC;IACzC,OAAO,EAAE,MAAM,CAAC;IAChB,oFAAoF;IACpF,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB;AAOD;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAAC,UAAU,EAAE,MAAM,GAAG,SAAS,CAsC7D"}
1
+ {"version":3,"file":"discover.d.ts","sourceRoot":"","sources":["../../src/pipeline/discover.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAOH,yFAAyF;AACzF,MAAM,WAAW,SAAS;IACxB,yEAAyE;IACzE,QAAQ,EAAE,MAAM,CAAC;IACjB,qFAAqF;IACrF,OAAO,EAAE,MAAM,CAAC;IAChB,oFAAoF;IACpF,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB;AAYD;;;;;;;GAOG;AACH,wBAAsB,eAAe,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC,CAgD5E"}