@1aboveio/skills 0.19.0 → 0.19.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@1aboveio/skills",
3
- "version": "0.19.0",
3
+ "version": "0.19.1",
4
4
  "description": "Install the 1AboveIO first-party skill groups through the native Skills CLI.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -8,7 +8,7 @@
8
8
  "id": "first-party",
9
9
  "type": "first-party",
10
10
  "package": "@1aboveio/skills",
11
- "version": "0.19.0",
11
+ "version": "0.19.1",
12
12
  "updatePolicy": "pinned-npm-version",
13
13
  "members": [
14
14
  {
@@ -208,7 +208,7 @@
208
208
  "sourceId": "first-party",
209
209
  "sourceType": "first-party",
210
210
  "package": "@1aboveio/skills",
211
- "version": "0.19.0",
211
+ "version": "0.19.1",
212
212
  "installPath": null,
213
213
  "members": [
214
214
  "harness-runtime",
@@ -244,7 +244,7 @@
244
244
  "sourceId": "first-party",
245
245
  "sourceType": "first-party",
246
246
  "package": "@1aboveio/skills",
247
- "version": "0.19.0",
247
+ "version": "0.19.1",
248
248
  "installPath": null,
249
249
  "members": [
250
250
  "harness-runtime",
@@ -290,7 +290,7 @@
290
290
  "sourceId": "first-party",
291
291
  "sourceType": "first-party",
292
292
  "package": "@1aboveio/skills",
293
- "version": "0.19.0",
293
+ "version": "0.19.1",
294
294
  "installPath": null,
295
295
  "members": [
296
296
  "harness-runtime",
@@ -323,7 +323,7 @@
323
323
  "sourceId": "first-party",
324
324
  "sourceType": "first-party",
325
325
  "package": "@1aboveio/skills",
326
- "version": "0.19.0",
326
+ "version": "0.19.1",
327
327
  "installPath": null,
328
328
  "members": [
329
329
  "harness-runtime",
@@ -366,7 +366,7 @@
366
366
  "sourceId": "first-party",
367
367
  "sourceType": "first-party",
368
368
  "package": "@1aboveio/skills",
369
- "version": "0.19.0",
369
+ "version": "0.19.1",
370
370
  "installPath": null,
371
371
  "members": [
372
372
  "harness-runtime",
@@ -394,7 +394,7 @@
394
394
  "sourceId": "first-party",
395
395
  "sourceType": "first-party",
396
396
  "package": "@1aboveio/skills",
397
- "version": "0.19.0",
397
+ "version": "0.19.1",
398
398
  "installPath": null,
399
399
  "members": [
400
400
  "harness-runtime",
@@ -432,7 +432,7 @@
432
432
  "sourceId": "first-party",
433
433
  "sourceType": "first-party",
434
434
  "package": "@1aboveio/skills",
435
- "version": "0.19.0",
435
+ "version": "0.19.1",
436
436
  "installPath": null,
437
437
  "members": [
438
438
  "harness-runtime",
@@ -460,7 +460,7 @@
460
460
  "sourceId": "first-party",
461
461
  "sourceType": "first-party",
462
462
  "package": "@1aboveio/skills",
463
- "version": "0.19.0",
463
+ "version": "0.19.1",
464
464
  "installPath": null,
465
465
  "members": [
466
466
  "harness-runtime",
@@ -498,7 +498,7 @@
498
498
  "sourceId": "first-party",
499
499
  "sourceType": "first-party",
500
500
  "package": "@1aboveio/skills",
501
- "version": "0.19.0",
501
+ "version": "0.19.1",
502
502
  "installPath": null,
503
503
  "members": [
504
504
  "harness-runtime",
@@ -526,7 +526,7 @@
526
526
  "sourceId": "first-party",
527
527
  "sourceType": "first-party",
528
528
  "package": "@1aboveio/skills",
529
- "version": "0.19.0",
529
+ "version": "0.19.1",
530
530
  "installPath": null,
531
531
  "members": [
532
532
  "harness-runtime",
@@ -564,7 +564,7 @@
564
564
  "sourceId": "first-party",
565
565
  "sourceType": "first-party",
566
566
  "package": "@1aboveio/skills",
567
- "version": "0.19.0",
567
+ "version": "0.19.1",
568
568
  "installPath": null,
569
569
  "members": [
570
570
  "harness-runtime",
@@ -596,7 +596,7 @@
596
596
  "sourceId": "first-party",
597
597
  "sourceType": "first-party",
598
598
  "package": "@1aboveio/skills",
599
- "version": "0.19.0",
599
+ "version": "0.19.1",
600
600
  "installPath": null,
601
601
  "members": [
602
602
  "harness-runtime",
@@ -636,7 +636,7 @@
636
636
  "sourceId": "first-party",
637
637
  "sourceType": "first-party",
638
638
  "package": "@1aboveio/skills",
639
- "version": "0.19.0",
639
+ "version": "0.19.1",
640
640
  "installPath": null,
641
641
  "members": [
642
642
  "harness-runtime"
@@ -662,7 +662,7 @@
662
662
  "sourceId": "first-party",
663
663
  "sourceType": "first-party",
664
664
  "package": "@1aboveio/skills",
665
- "version": "0.19.0",
665
+ "version": "0.19.1",
666
666
  "installPath": null,
667
667
  "members": [
668
668
  "harness-runtime"
@@ -694,7 +694,7 @@
694
694
  "sourceId": "first-party",
695
695
  "sourceType": "first-party",
696
696
  "package": "@1aboveio/skills",
697
- "version": "0.19.0",
697
+ "version": "0.19.1",
698
698
  "installPath": null,
699
699
  "members": [
700
700
  "harness-runtime",
@@ -749,7 +749,7 @@
749
749
  "sourceId": "first-party",
750
750
  "sourceType": "first-party",
751
751
  "package": "@1aboveio/skills",
752
- "version": "0.19.0",
752
+ "version": "0.19.1",
753
753
  "installPath": null,
754
754
  "members": [
755
755
  "harness-runtime",
@@ -119,7 +119,7 @@ export const WORKFLOW_TRUSTED_SOURCES = deepFreeze({
119
119
  id: 'first-party',
120
120
  type: 'first-party',
121
121
  package: '@1aboveio/skills',
122
- version: '0.19.0',
122
+ version: '0.19.1',
123
123
  },
124
124
  matt: {
125
125
  id: 'matt-pocock',
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: e2e-test
3
3
  description: "Playwright end-to-end standard: the 3-tier suite (render-health / functional / journey), generated route manifest, presentation sweep, and CI route gates. Use when browser routes or user flows ship or change, or a Playwright test flakes. NOT for non-browser tests, defining what to test (ensure-coverage), or the curated ALIVE/DEAD gate (smoke)."
4
+ disable-model-invocation: true
4
5
  ---
5
6
 
6
7
  # E2E Testing Standard
@@ -383,7 +383,7 @@
383
383
  "id": "first-party",
384
384
  "type": "first-party",
385
385
  "package": "@1aboveio/skills",
386
- "version": "0.19.0"
386
+ "version": "0.19.1"
387
387
  },
388
388
  "contentDigest": "eff6c7b5931bce5b2265a619bccddd371a89df6ce7bc2edc74f11d00060a71dd",
389
389
  "digestExcludes": []
@@ -396,9 +396,9 @@
396
396
  "id": "first-party",
397
397
  "type": "first-party",
398
398
  "package": "@1aboveio/skills",
399
- "version": "0.19.0"
399
+ "version": "0.19.1"
400
400
  },
401
- "contentDigest": "08230dc57a53d6526692b50138038abbd80abce1a067e01c52ad6acc182caf7e",
401
+ "contentDigest": "d97abeff7bdc5ae2e4be2f631d09dba46d4753ce1e67334793364329af59f066",
402
402
  "digestExcludes": []
403
403
  },
404
404
  {
@@ -409,9 +409,9 @@
409
409
  "id": "first-party",
410
410
  "type": "first-party",
411
411
  "package": "@1aboveio/skills",
412
- "version": "0.19.0"
412
+ "version": "0.19.1"
413
413
  },
414
- "contentDigest": "9eea7bfba348ddaea1b934c9a7fabdd9b101df8a146e1c93e947da4d335f1d98",
414
+ "contentDigest": "00cfdd3e5bfbc3e37b1369ad93aae91161e671829760a8867ea9be25047ba461",
415
415
  "digestExcludes": []
416
416
  },
417
417
  {
@@ -422,7 +422,7 @@
422
422
  "id": "first-party",
423
423
  "type": "first-party",
424
424
  "package": "@1aboveio/skills",
425
- "version": "0.19.0"
425
+ "version": "0.19.1"
426
426
  },
427
427
  "contentDigest": "58b0556228a9271cf9e33727a05fc08a4fdfd29512ec0936b169f0a55d60e6ef",
428
428
  "digestExcludes": []
@@ -435,7 +435,7 @@
435
435
  "id": "first-party",
436
436
  "type": "first-party",
437
437
  "package": "@1aboveio/skills",
438
- "version": "0.19.0"
438
+ "version": "0.19.1"
439
439
  },
440
440
  "contentDigest": "38347c30820ba7e8b10433aeb351b7df4fa457b143e4a109293ab53fda961459",
441
441
  "digestExcludes": []
@@ -448,9 +448,9 @@
448
448
  "id": "first-party",
449
449
  "type": "first-party",
450
450
  "package": "@1aboveio/skills",
451
- "version": "0.19.0"
451
+ "version": "0.19.1"
452
452
  },
453
- "contentDigest": "d32add939c8c673e3bb096dfc95a5aadfa31115c3a854b3a4e0eb3fed1b49794",
453
+ "contentDigest": "d7daa7080dbaefcd13f3d17a811bd5ad64d7cb9f7506b29b7d3558243bfd3683",
454
454
  "digestExcludes": []
455
455
  },
456
456
  {
@@ -461,9 +461,9 @@
461
461
  "id": "first-party",
462
462
  "type": "first-party",
463
463
  "package": "@1aboveio/skills",
464
- "version": "0.19.0"
464
+ "version": "0.19.1"
465
465
  },
466
- "contentDigest": "125318612fe3fd70354ba5393a7019b3e6db5acc14a0d3f653a31f6b06a2e267",
466
+ "contentDigest": "01c192d8b4fd416af4ea02e8000e5fce0cee723a6ac2f8c0c48372087e1a262e",
467
467
  "digestExcludes": []
468
468
  },
469
469
  {
@@ -474,7 +474,7 @@
474
474
  "id": "first-party",
475
475
  "type": "first-party",
476
476
  "package": "@1aboveio/skills",
477
- "version": "0.19.0"
477
+ "version": "0.19.1"
478
478
  },
479
479
  "contentDigest": "ffba0c83491676794c74721f4c6dbae430f5bc186e5a55f0764e29eaeb13829b",
480
480
  "digestExcludes": []
@@ -487,7 +487,7 @@
487
487
  "id": "first-party",
488
488
  "type": "first-party",
489
489
  "package": "@1aboveio/skills",
490
- "version": "0.19.0"
490
+ "version": "0.19.1"
491
491
  },
492
492
  "contentDigest": "f048fd00c69f2dc666fc7a3096cfeee6dfba73933bfb69602f3f0e26159798cc",
493
493
  "digestExcludes": []
@@ -500,7 +500,7 @@
500
500
  "id": "first-party",
501
501
  "type": "first-party",
502
502
  "package": "@1aboveio/skills",
503
- "version": "0.19.0"
503
+ "version": "0.19.1"
504
504
  },
505
505
  "contentDigest": "90a7c4e1ad6da1e632ea2c5259e4967ffebb84353adccbca8dfc5d6bc50b60c1",
506
506
  "digestExcludes": []
@@ -513,15 +513,15 @@
513
513
  "id": "first-party",
514
514
  "type": "first-party",
515
515
  "package": "@1aboveio/skills",
516
- "version": "0.19.0"
516
+ "version": "0.19.1"
517
517
  },
518
- "contentDigest": "16dcd5bc2b40c8ae7cf6bc41eadd943264b03e70162c3da85624f11a2112bf56",
518
+ "contentDigest": "03b9c17251069f297b55577809eb3c49291650d95effd6a00348807eb8944e91",
519
519
  "digestExcludes": [
520
520
  "coherence/workflow.json"
521
521
  ]
522
522
  }
523
523
  ],
524
- "releaseIdentity": "6f89ee339ca1319fbd167658b1dbb66a1357b482463ba829bf22bf7b0c7c28a3",
524
+ "releaseIdentity": "3dec5c21fb1bfc991338f1d62b4c91d3967e2ff28f04ba412ec50e74b28a2122",
525
525
  "lifecycleAuthority": "native-skills-cli",
526
526
  "repairRecipe": {
527
527
  "id": "engineering-workflow-dependency-first",
@@ -579,7 +579,7 @@
579
579
  "sourceId": "first-party",
580
580
  "sourceType": "first-party",
581
581
  "package": "@1aboveio/skills",
582
- "version": "0.19.0",
582
+ "version": "0.19.1",
583
583
  "installPath": null,
584
584
  "members": [
585
585
  "harness-runtime",
@@ -597,7 +597,7 @@
597
597
  "commands": [
598
598
  {
599
599
  "transport": "npm",
600
- "command": "npx @1aboveio/skills@0.19.0 install --group engineering-workflow --yes"
600
+ "command": "npx @1aboveio/skills@0.19.1 install --group engineering-workflow --yes"
601
601
  }
602
602
  ],
603
603
  "onFailure": {
@@ -119,7 +119,7 @@ export const WORKFLOW_TRUSTED_SOURCES = deepFreeze({
119
119
  id: 'first-party',
120
120
  type: 'first-party',
121
121
  package: '@1aboveio/skills',
122
- version: '0.19.0',
122
+ version: '0.19.1',
123
123
  },
124
124
  matt: {
125
125
  id: 'matt-pocock',
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: ensure-coverage
3
3
  description: "Define or audit behavior-first test criteria — ACs, required test levels, evidence expectations, mock/integration/E2E policy — across three axes: breadth (Coverage Ledger), depth (over-mocking), presentation (perceivability of browser surfaces). NOT the merge verdict on a PR (review-pr), authoring browser tests (e2e-test), or driving issues to PRs (resolve-issues)."
4
+ disable-model-invocation: true
4
5
  ---
5
6
 
6
7
  # Ensure Coverage
@@ -237,7 +237,7 @@
237
237
  "id": "first-party",
238
238
  "type": "first-party",
239
239
  "package": "@1aboveio/skills",
240
- "version": "0.19.0"
240
+ "version": "0.19.1"
241
241
  }
242
242
  },
243
243
  {
@@ -248,7 +248,7 @@
248
248
  "id": "first-party",
249
249
  "type": "first-party",
250
250
  "package": "@1aboveio/skills",
251
- "version": "0.19.0"
251
+ "version": "0.19.1"
252
252
  }
253
253
  },
254
254
  {
@@ -259,7 +259,7 @@
259
259
  "id": "first-party",
260
260
  "type": "first-party",
261
261
  "package": "@1aboveio/skills",
262
- "version": "0.19.0"
262
+ "version": "0.19.1"
263
263
  }
264
264
  },
265
265
  {
@@ -270,7 +270,7 @@
270
270
  "id": "first-party",
271
271
  "type": "first-party",
272
272
  "package": "@1aboveio/skills",
273
- "version": "0.19.0"
273
+ "version": "0.19.1"
274
274
  }
275
275
  },
276
276
  {
@@ -281,7 +281,7 @@
281
281
  "id": "first-party",
282
282
  "type": "first-party",
283
283
  "package": "@1aboveio/skills",
284
- "version": "0.19.0"
284
+ "version": "0.19.1"
285
285
  }
286
286
  },
287
287
  {
@@ -292,7 +292,7 @@
292
292
  "id": "first-party",
293
293
  "type": "first-party",
294
294
  "package": "@1aboveio/skills",
295
- "version": "0.19.0"
295
+ "version": "0.19.1"
296
296
  }
297
297
  },
298
298
  {
@@ -303,7 +303,7 @@
303
303
  "id": "first-party",
304
304
  "type": "first-party",
305
305
  "package": "@1aboveio/skills",
306
- "version": "0.19.0"
306
+ "version": "0.19.1"
307
307
  }
308
308
  },
309
309
  {
@@ -314,7 +314,7 @@
314
314
  "id": "first-party",
315
315
  "type": "first-party",
316
316
  "package": "@1aboveio/skills",
317
- "version": "0.19.0"
317
+ "version": "0.19.1"
318
318
  }
319
319
  },
320
320
  {
@@ -325,7 +325,7 @@
325
325
  "id": "first-party",
326
326
  "type": "first-party",
327
327
  "package": "@1aboveio/skills",
328
- "version": "0.19.0"
328
+ "version": "0.19.1"
329
329
  }
330
330
  },
331
331
  {
@@ -336,7 +336,7 @@
336
336
  "id": "first-party",
337
337
  "type": "first-party",
338
338
  "package": "@1aboveio/skills",
339
- "version": "0.19.0"
339
+ "version": "0.19.1"
340
340
  }
341
341
  },
342
342
  {
@@ -347,7 +347,7 @@
347
347
  "id": "first-party",
348
348
  "type": "first-party",
349
349
  "package": "@1aboveio/skills",
350
- "version": "0.19.0"
350
+ "version": "0.19.1"
351
351
  }
352
352
  }
353
353
  ],
@@ -468,7 +468,7 @@
468
468
  "sourceId": "first-party",
469
469
  "sourceType": "first-party",
470
470
  "package": "@1aboveio/skills",
471
- "version": "0.19.0",
471
+ "version": "0.19.1",
472
472
  "installPath": null,
473
473
  "members": [
474
474
  "harness-runtime",
@@ -486,7 +486,7 @@
486
486
  "commands": [
487
487
  {
488
488
  "transport": "npm",
489
- "command": "npx @1aboveio/skills@0.19.0 install --group engineering-workflow --yes"
489
+ "command": "npx @1aboveio/skills@0.19.1 install --group engineering-workflow --yes"
490
490
  }
491
491
  ],
492
492
  "onFailure": {
@@ -3412,7 +3412,7 @@ export const WORKFLOW_PREFLIGHT_COMMANDS = Object.freeze([
3412
3412
 
3413
3413
  const WORKFLOW_VERIFIER_URL = new URL('../../engineering-runtime/scripts/workflow-coherence.mjs', import.meta.url)
3414
3414
  const WORKFLOW_FALLBACK_POLICY_URL = new URL('../generated/workflow-repair-policy.json', import.meta.url)
3415
- export const WORKFLOW_TRUSTED_FALLBACK_POLICY_SHA256 = '27d1fb2d0bdf9ca37933dff2f0e1863d95f9f147baecbbce9dd3553a4c71a915'
3415
+ export const WORKFLOW_TRUSTED_FALLBACK_POLICY_SHA256 = '916d7e26b51f761140a1d9377810b27f9f51c482fc63a220bb0fbcc34d2eee7a'
3416
3416
  const WORKFLOW_REPAIR_RECIPE_REFERENCE = Object.freeze({
3417
3417
  id: 'engineering-workflow-dependency-first',
3418
3418
  generatedFrom: 'skills/distribution/generated/recipes.json',
@@ -51,8 +51,13 @@ git commit -m "chore(release): <nextVersion>"
51
51
  `apply.mjs` requires the confirmed plan's `changelogMarkdown` on stdin, writes
52
52
  that section, and bumps the discovered identity files. It refuses a missing or
53
53
  empty changelog section rather than silently replacing the plan with a bare
54
- version heading. If the human edited the notes, write the confirmed markdown
55
- to stdin instead of the raw plan field.
54
+ version heading. When the plan names `skills/distribution/manifest.json`, it
55
+ delegates to `distribution.mjs version-cut`; that operation updates the public
56
+ npm identity, trusted installed-workflow identity and fallback hash together,
57
+ then regenerates the repository's deterministic distribution artifacts. If any
58
+ step fails it restores every identity and generated file before returning.
59
+ If the human edited the notes, write the confirmed markdown to stdin instead
60
+ of the raw plan field.
56
61
 
57
62
  Then:
58
63
 
@@ -28,14 +28,22 @@ workflow publishes on `release: published` rather than on tag push, note that
28
28
 
29
29
  ## 3. Version files
30
30
 
31
- List identity files present at the repo root (and only those):
31
+ First check for `skills/distribution/manifest.json` with exactly one `public-npm`
32
+ render target and `skills/distribution/scripts/distribution.mjs`. That manifest is
33
+ the release identity when present; record it and use the distribution-aware cut in
34
+ `apply.mjs`. It takes precedence over a private root `package.json` with no version,
35
+ because adding a synthetic root version would not change what the publisher ships.
36
+
37
+ Otherwise, list identity files present at the repo root (and only those):
32
38
 
33
39
  - `package.json` (and `package-lock.json` when it exists)
34
40
  - `pyproject.toml`
35
41
  - `VERSION`
36
42
 
37
- Do not bump nested workspace packages unless the human names them. The cut
38
- must stay metadata-only.
43
+ Do not bump other nested workspace packages unless the human names them. The cut
44
+ must stay metadata-only. A distribution-aware cut may also update trusted runtime
45
+ identity constants, test fixtures that pin that identity, and deterministic generated
46
+ policy/inventory artifacts; those are version metadata, not product behavior.
39
47
 
40
48
  ## 4. Baseline
41
49
 
@@ -7,8 +7,9 @@
7
7
  // Exit: 0 ok · 1 IO/parse failed · 2 usage
8
8
  import { existsSync, readFileSync, writeFileSync } from 'node:fs'
9
9
  import { join } from 'node:path'
10
+ import { spawnSync } from 'node:child_process'
10
11
  import { isMainModule } from '../../engineering-runtime/scripts/main-module.mjs'
11
- import { discoverVersionFiles, parseSemver } from './plan.mjs'
12
+ import { DISTRIBUTION_MANIFEST, discoverVersionFiles, parseSemver } from './plan.mjs'
12
13
 
13
14
  export function insertChangelog(markdown, { version, date, section }) {
14
15
  const heading = `## [${version}] - ${date}`
@@ -90,11 +91,32 @@ export function bumpPyproject(text, version) {
90
91
  return out.join('\n')
91
92
  }
92
93
 
94
+ export function cutDistributionVersion({ version, cwd }) {
95
+ const script = join(cwd, 'skills/distribution/scripts/distribution.mjs')
96
+ const result = spawnSync(process.execPath, [script, 'version-cut', '--version', version, '--repo-root', cwd, '--json'], {
97
+ cwd,
98
+ encoding: 'utf8',
99
+ })
100
+ if (result.status !== 0) {
101
+ const error = new Error(result.stderr.trim() || 'distribution version cut failed')
102
+ error.exitCode = result.status || 1
103
+ throw error
104
+ }
105
+ const parsed = JSON.parse(result.stdout)
106
+ if (!Array.isArray(parsed.changed) || parsed.changed.length === 0) {
107
+ const error = new Error('distribution version cut returned no changed files')
108
+ error.exitCode = 1
109
+ throw error
110
+ }
111
+ return parsed.changed
112
+ }
113
+
93
114
  export function applyRelease({
94
115
  version,
95
116
  date,
96
117
  cwd = process.cwd(),
97
118
  changelogSection = null,
119
+ cutDistribution = cutDistributionVersion,
98
120
  now = new Date(),
99
121
  } = {}) {
100
122
  if (!parseSemver(version)) {
@@ -115,6 +137,11 @@ export function applyRelease({
115
137
  writeFileSync(changelogPath, insertChangelog(previous, { version, date: stamp, section: changelogSection }))
116
138
  changed.push('CHANGELOG.md')
117
139
 
140
+ if (files.includes(DISTRIBUTION_MANIFEST)) {
141
+ changed.push(...cutDistribution({ version, cwd }))
142
+ return { version, date: stamp, changed: [...new Set(changed)] }
143
+ }
144
+
118
145
  if (files.includes('package.json')) {
119
146
  writeFileSync(join(cwd, 'package.json'), bumpPackageJson(readFileSync(join(cwd, 'package.json'), 'utf8'), version))
120
147
  changed.push('package.json')
@@ -22,6 +22,7 @@ const SECTION_BY_TYPE = {
22
22
  }
23
23
  const INTERNAL_TYPES = new Set(['build', 'chore', 'ci', 'docs', 'style', 'test'])
24
24
  const SECTION_ORDER = ['Breaking', 'Added', 'Changed', 'Removed', 'Fixed', 'Security']
25
+ export const DISTRIBUTION_MANIFEST = 'skills/distribution/manifest.json'
25
26
 
26
27
  export function parseSemver(input) {
27
28
  const match = SEMVER_RE.exec(String(input || '').trim())
@@ -104,7 +105,24 @@ export function renderChangelog({ version, date, changes }) {
104
105
  return `${lines.join('\n')}\n`
105
106
  }
106
107
 
108
+ function distributionVersion(text) {
109
+ try {
110
+ const manifest = JSON.parse(text)
111
+ const targets = (manifest.sources ?? [])
112
+ .flatMap((source) => source.renderTargets ?? [])
113
+ .filter((target) => target.id === 'public-npm')
114
+ if (targets.length !== 1 || !parseSemver(targets[0].version)) return null
115
+ return formatVersion(parseSemver(targets[0].version))
116
+ } catch {
117
+ return null
118
+ }
119
+ }
120
+
107
121
  export function discoverVersionFiles(root) {
122
+ const distributionPath = join(root, DISTRIBUTION_MANIFEST)
123
+ if (existsSync(distributionPath) && distributionVersion(readFileSync(distributionPath, 'utf8'))) {
124
+ return [DISTRIBUTION_MANIFEST]
125
+ }
108
126
  const files = []
109
127
  for (const name of ['package.json', 'package-lock.json', 'pyproject.toml', 'VERSION']) {
110
128
  if (existsSync(join(root, name))) files.push(name)
@@ -113,6 +131,9 @@ export function discoverVersionFiles(root) {
113
131
  }
114
132
 
115
133
  export function currentVersionFromFiles(root, files = discoverVersionFiles(root)) {
134
+ if (files.includes(DISTRIBUTION_MANIFEST)) {
135
+ return distributionVersion(readFileSync(join(root, DISTRIBUTION_MANIFEST), 'utf8'))
136
+ }
116
137
  if (files.includes('package.json')) {
117
138
  const pkg = JSON.parse(readFileSync(join(root, 'package.json'), 'utf8'))
118
139
  const parsed = parseSemver(pkg.version)
@@ -146,12 +167,19 @@ function versionFilesAt(sha, cwd) {
146
167
  .split('\n')
147
168
  .map((line) => line.trim())
148
169
  .filter(Boolean))
170
+ if (tree.has(DISTRIBUTION_MANIFEST)) {
171
+ const version = distributionVersion(git(['show', `${sha}:${DISTRIBUTION_MANIFEST}`], cwd))
172
+ if (version) return [DISTRIBUTION_MANIFEST]
173
+ }
149
174
  return ['package.json', 'package-lock.json', 'pyproject.toml', 'VERSION']
150
175
  .filter((name) => tree.has(name))
151
176
  }
152
177
 
153
178
  function versionFromGitFiles(sha, files, cwd) {
154
179
  const contents = (path) => git(['show', `${sha}:${path}`], cwd)
180
+ if (files.includes(DISTRIBUTION_MANIFEST)) {
181
+ return distributionVersion(contents(DISTRIBUTION_MANIFEST))
182
+ }
155
183
  if (files.includes('package.json')) {
156
184
  const parsed = parseSemver(JSON.parse(contents('package.json')).version)
157
185
  if (parsed) return formatVersion(parsed)