release-skill 0.7.3 → 0.7.5

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.
@@ -134,6 +134,7 @@ function codexCrossValidateListEntry(found, action) {
134
134
 
135
135
  const CLAUDE = Object.freeze({
136
136
  id: 'claude',
137
+ skillProjectionSurface: 'platforms/claude-code',
137
138
  distributionType: 'claude-plugin',
138
139
  actionType: 'claude-marketplace-install',
139
140
  // Runtime adapter implementing this platform's marketplace-install action.
@@ -199,6 +200,7 @@ const CLAUDE = Object.freeze({
199
200
 
200
201
  const CODEX = Object.freeze({
201
202
  id: 'codex',
203
+ skillProjectionSurface: 'platforms/codex',
202
204
  distributionType: 'codex-plugin',
203
205
  actionType: 'codex-marketplace-install',
204
206
  adapter: 'plugin-marketplace',
@@ -260,6 +262,7 @@ const CODEX = Object.freeze({
260
262
 
261
263
  const KIMI = Object.freeze({
262
264
  id: 'kimi',
265
+ skillProjectionSurface: 'platforms/kimi-code',
263
266
  distributionType: 'kimi-plugin',
264
267
  actionType: 'kimi-marketplace-install',
265
268
  adapter: 'plugin-marketplace',
@@ -333,6 +336,7 @@ const KIMI = Object.freeze({
333
336
  // (distributionType/actionType/consumer) stays `codebuddy`.
334
337
  const CODEBUDDY = Object.freeze({
335
338
  id: 'codebuddy',
339
+ skillProjectionSurface: 'platforms/workbuddy',
336
340
  distributionType: 'codebuddy-plugin',
337
341
  actionType: 'codebuddy-marketplace-install',
338
342
  adapter: 'plugin-marketplace',
@@ -418,6 +422,7 @@ const VALID_REF_STRENGTHS = new Set(['commit-sha', 'name-ref', 'unfixable']);
418
422
  const VALID_OUTPUT_PROTOCOLS = new Set(['structured', 'text', 'none']);
419
423
  const VALID_IDENTITY_EVIDENCE = new Set(['list-record', 'install-output', 'filesystem-payload', 'human-attestation']);
420
424
  const VALID_DEGRADATION_POLICIES = new Set(['block', 'human-attestation', 'human-attestation-with-fallback']);
425
+ const SKILL_PROJECTION_SURFACE_PATTERN = /^platforms\/[a-z0-9]+(?:-[a-z0-9]+)*$/u;
421
426
 
422
427
  /**
423
428
  * Look up a platform descriptor by id.
@@ -431,6 +436,20 @@ export function getPlatform(id) {
431
436
  return platform;
432
437
  }
433
438
 
439
+ /**
440
+ * Resolve a declared skill projection surface to its public host name.
441
+ * The host is always derived from the descriptor's authoritative
442
+ * `buildAdapter.name`; unknown surfaces fail closed with `null`.
443
+ *
444
+ * @param {string} surfaceId
445
+ * @param {object[]} [registry]
446
+ * @returns {string|null}
447
+ */
448
+ export function resolveSkillProjectionSurfaceHost(surfaceId, registry = PLATFORMS) {
449
+ const platform = registry.find((item) => item.skillProjectionSurface === surfaceId);
450
+ return platform?.buildAdapter?.name ?? null;
451
+ }
452
+
434
453
  /**
435
454
  * Validate a registry (defaults to the module registry). Throws on the first
436
455
  * malformed description so a registry typo fails at import time.
@@ -439,6 +458,7 @@ export function getPlatform(id) {
439
458
  */
440
459
  export function assertRegistry(registry = PLATFORMS) {
441
460
  const seen = new Set();
461
+ const seenSkillProjectionSurfaces = new Set();
442
462
  for (const platform of registry) {
443
463
  const label = platform?.id ?? '<missing id>';
444
464
  if (typeof platform?.id !== 'string' || platform.id.length === 0) {
@@ -490,6 +510,17 @@ export function assertRegistry(registry = PLATFORMS) {
490
510
  if (typeof platform.buildAdapter.name !== 'string' || platform.buildAdapter.name.length === 0) {
491
511
  throw new Error(`platform registry: ${label} buildAdapter needs a non-empty name (its adapter directory name)`);
492
512
  }
513
+ if (typeof platform.skillProjectionSurface !== 'string'
514
+ || !SKILL_PROJECTION_SURFACE_PATTERN.test(platform.skillProjectionSurface)) {
515
+ throw new Error(`platform registry: ${label} skillProjectionSurface must match platforms/<slug>`);
516
+ }
517
+ if (seenSkillProjectionSurfaces.has(platform.skillProjectionSurface)) {
518
+ throw new Error(`platform registry: duplicate skillProjectionSurface "${platform.skillProjectionSurface}"; aliases must be unique`);
519
+ }
520
+ seenSkillProjectionSurfaces.add(platform.skillProjectionSurface);
521
+ if (resolveSkillProjectionSurfaceHost(platform.skillProjectionSurface, registry) !== platform.buildAdapter.name) {
522
+ throw new Error(`platform registry: ${label} skillProjectionSurface must map to buildAdapter.name`);
523
+ }
493
524
  if (!VALID_LIST_OUTPUTS.has(platform.jsonProtocol?.listOutput)) {
494
525
  throw new Error(`platform registry: ${label} has illegal jsonProtocol.listOutput "${platform.jsonProtocol?.listOutput}"`);
495
526
  }