@codyswann/lisa 5.14.3 → 6.0.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.
Files changed (104) hide show
  1. package/cdk/copy-overwrite/eslint.cdk.ts +7 -161
  2. package/cdk/copy-overwrite/tsconfig.eslint.json +5 -1
  3. package/dist/configs/jest/base.d.ts +2 -2
  4. package/dist/configs/jest/index.d.ts +5 -6
  5. package/dist/configs/jest/index.d.ts.map +1 -1
  6. package/dist/configs/jest/index.js +5 -6
  7. package/dist/configs/jest/index.js.map +1 -1
  8. package/dist/core/nightly-e2e-guard-behavior-certificate.js +2 -2
  9. package/dist/core/nightly-e2e-guard-behavior-certificate.js.map +1 -1
  10. package/dist/core/upstream-evidence-manifest.d.ts.map +1 -1
  11. package/dist/core/upstream-evidence-manifest.js +33 -18
  12. package/dist/core/upstream-evidence-manifest.js.map +1 -1
  13. package/expo/copy-overwrite/eslint.expo.ts +17 -18
  14. package/expo/copy-overwrite/tsconfig.eslint.json +5 -1
  15. package/harper-fabric/copy-overwrite/tsconfig.eslint.json +5 -1
  16. package/nestjs/copy-overwrite/eslint.nestjs.ts +7 -161
  17. package/nestjs/copy-overwrite/tsconfig.eslint.json +5 -1
  18. package/nestjs/copy-overwrite/tsconfig.spec.json +2 -3
  19. package/package.json +7 -9
  20. package/phaser/copy-overwrite/tsconfig.eslint.json +5 -1
  21. package/plugins/lisa/.claude-plugin/plugin.json +1 -1
  22. package/plugins/lisa/.codex-plugin/plugin.json +1 -1
  23. package/plugins/lisa-agy/plugin.json +1 -1
  24. package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
  25. package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
  26. package/plugins/lisa-cdk-agy/plugin.json +1 -1
  27. package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
  28. package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
  29. package/plugins/lisa-cdk-devin/.claude-plugin/plugin.json +1 -1
  30. package/plugins/lisa-cdk-devin/.devin-plugin/plugin.json +1 -1
  31. package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
  32. package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
  33. package/plugins/lisa-devin/.claude-plugin/plugin.json +1 -1
  34. package/plugins/lisa-devin/.devin-plugin/plugin.json +1 -1
  35. package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
  36. package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
  37. package/plugins/lisa-expo-agy/plugin.json +1 -1
  38. package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
  39. package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
  40. package/plugins/lisa-expo-devin/.claude-plugin/plugin.json +1 -1
  41. package/plugins/lisa-expo-devin/.devin-plugin/plugin.json +1 -1
  42. package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
  43. package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
  44. package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
  45. package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
  46. package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
  47. package/plugins/lisa-harper-fabric-devin/.claude-plugin/plugin.json +1 -1
  48. package/plugins/lisa-harper-fabric-devin/.devin-plugin/plugin.json +1 -1
  49. package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
  50. package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
  51. package/plugins/lisa-nestjs-agy/plugin.json +1 -1
  52. package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
  53. package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
  54. package/plugins/lisa-nestjs-devin/.claude-plugin/plugin.json +1 -1
  55. package/plugins/lisa-nestjs-devin/.devin-plugin/plugin.json +1 -1
  56. package/plugins/lisa-phaser/.claude-plugin/plugin.json +1 -1
  57. package/plugins/lisa-phaser/.codex-plugin/plugin.json +1 -1
  58. package/plugins/lisa-phaser-agy/plugin.json +1 -1
  59. package/plugins/lisa-phaser-copilot/.claude-plugin/plugin.json +1 -1
  60. package/plugins/lisa-phaser-cursor/.claude-plugin/plugin.json +1 -1
  61. package/plugins/lisa-phaser-devin/.claude-plugin/plugin.json +1 -1
  62. package/plugins/lisa-phaser-devin/.devin-plugin/plugin.json +1 -1
  63. package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
  64. package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
  65. package/plugins/lisa-rails-agy/plugin.json +1 -1
  66. package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
  67. package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
  68. package/plugins/lisa-rails-devin/.claude-plugin/plugin.json +1 -1
  69. package/plugins/lisa-rails-devin/.devin-plugin/plugin.json +1 -1
  70. package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
  71. package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
  72. package/plugins/lisa-typescript-agy/plugin.json +1 -1
  73. package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
  74. package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
  75. package/plugins/lisa-typescript-devin/.claude-plugin/plugin.json +1 -1
  76. package/plugins/lisa-typescript-devin/.devin-plugin/plugin.json +1 -1
  77. package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
  78. package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
  79. package/plugins/lisa-wiki-agy/plugin.json +1 -1
  80. package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
  81. package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
  82. package/plugins/lisa-wiki-devin/.claude-plugin/plugin.json +1 -1
  83. package/plugins/lisa-wiki-devin/.devin-plugin/plugin.json +1 -1
  84. package/scripts/check-learnings-budget.ts +4 -4
  85. package/scripts/check-self-dependency-pin.mjs +172 -5
  86. package/scripts/check-typecheck-tests.mjs +88 -20
  87. package/scripts/push-self-pin-raise.sh +79 -0
  88. package/scripts/raise-self-dependency-pin.mjs +166 -0
  89. package/scripts/two-channel-couplings.json +125 -9
  90. package/scripts/update-node-version.ts +1 -1
  91. package/scripts/verify-self-pin-raise.mjs +487 -0
  92. package/typescript/copy-overwrite/tsconfig.eslint.json +5 -1
  93. package/dist/configs/jest/cdk.d.ts +0 -33
  94. package/dist/configs/jest/cdk.d.ts.map +0 -1
  95. package/dist/configs/jest/cdk.js +0 -29
  96. package/dist/configs/jest/cdk.js.map +0 -1
  97. package/dist/configs/jest/nestjs.d.ts +0 -36
  98. package/dist/configs/jest/nestjs.d.ts.map +0 -1
  99. package/dist/configs/jest/nestjs.js +0 -49
  100. package/dist/configs/jest/nestjs.js.map +0 -1
  101. package/dist/configs/jest/typescript.d.ts +0 -29
  102. package/dist/configs/jest/typescript.d.ts.map +0 -1
  103. package/dist/configs/jest/typescript.js +0 -37
  104. package/dist/configs/jest/typescript.js.map +0 -1
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-harper-fabric",
3
- "version": "5.14.3",
3
+ "version": "6.0.1",
4
4
  "description": "Harper/Fabric-specific rules for TypeScript component apps",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-harper-fabric",
3
- "version": "5.14.3",
3
+ "version": "6.0.1",
4
4
  "description": "Harper/Fabric-specific rules for TypeScript component apps",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-nestjs",
3
- "version": "5.14.3",
3
+ "version": "6.0.1",
4
4
  "description": "NestJS-specific skills (GraphQL, TypeORM) and hooks (hand-written migration warning)",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-nestjs",
3
- "version": "5.14.3",
3
+ "version": "6.0.1",
4
4
  "description": "NestJS-specific skills and a hand-written migration warning hook.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-nestjs",
3
- "version": "5.14.3",
3
+ "version": "6.0.1",
4
4
  "description": "NestJS-specific skills (GraphQL, TypeORM) and hooks (hand-written migration warning)",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-nestjs",
3
- "version": "5.14.3",
3
+ "version": "6.0.1",
4
4
  "description": "NestJS-specific skills (GraphQL, TypeORM) and hooks (hand-written migration warning)",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-nestjs",
3
- "version": "5.14.3",
3
+ "version": "6.0.1",
4
4
  "description": "NestJS-specific skills (GraphQL, TypeORM) and hooks (hand-written migration warning)",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-nestjs",
3
- "version": "5.14.3",
3
+ "version": "6.0.1",
4
4
  "description": "NestJS-specific skills (GraphQL, TypeORM) and hooks (hand-written migration warning)",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-nestjs",
3
- "version": "5.14.3",
3
+ "version": "6.0.1",
4
4
  "description": "NestJS-specific skills (GraphQL, TypeORM) and hooks (hand-written migration warning)",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-phaser",
3
- "version": "5.14.3",
3
+ "version": "6.0.1",
4
4
  "description": "Phaser 4 game-development rules for TypeScript projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-phaser",
3
- "version": "5.14.3",
3
+ "version": "6.0.1",
4
4
  "description": "Phaser 4 game-development rules for TypeScript projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-phaser",
3
- "version": "5.14.3",
3
+ "version": "6.0.1",
4
4
  "description": "Phaser 4 game-development rules for TypeScript projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-phaser",
3
- "version": "5.14.3",
3
+ "version": "6.0.1",
4
4
  "description": "Phaser 4 game-development rules for TypeScript projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-phaser",
3
- "version": "5.14.3",
3
+ "version": "6.0.1",
4
4
  "description": "Phaser 4 game-development rules for TypeScript projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-phaser",
3
- "version": "5.14.3",
3
+ "version": "6.0.1",
4
4
  "description": "Phaser 4 game-development rules for TypeScript projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-phaser",
3
- "version": "5.14.3",
3
+ "version": "6.0.1",
4
4
  "description": "Phaser 4 game-development rules for TypeScript projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-rails",
3
- "version": "5.14.3",
3
+ "version": "6.0.1",
4
4
  "description": "Ruby on Rails-specific hooks — RuboCop linting/formatting and ast-grep scanning on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-rails",
3
- "version": "5.14.3",
3
+ "version": "6.0.1",
4
4
  "description": "Ruby on Rails-specific skills and hooks for RuboCop and ast-grep scanning on edit.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-rails",
3
- "version": "5.14.3",
3
+ "version": "6.0.1",
4
4
  "description": "Ruby on Rails-specific hooks — RuboCop linting/formatting and ast-grep scanning on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-rails",
3
- "version": "5.14.3",
3
+ "version": "6.0.1",
4
4
  "description": "Ruby on Rails-specific hooks — RuboCop linting/formatting and ast-grep scanning on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-rails",
3
- "version": "5.14.3",
3
+ "version": "6.0.1",
4
4
  "description": "Ruby on Rails-specific hooks — RuboCop linting/formatting and ast-grep scanning on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-rails",
3
- "version": "5.14.3",
3
+ "version": "6.0.1",
4
4
  "description": "Ruby on Rails-specific hooks — RuboCop linting/formatting and ast-grep scanning on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-rails",
3
- "version": "5.14.3",
3
+ "version": "6.0.1",
4
4
  "description": "Ruby on Rails-specific hooks — RuboCop linting/formatting and ast-grep scanning on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-typescript",
3
- "version": "5.14.3",
3
+ "version": "6.0.1",
4
4
  "description": "TypeScript-specific hooks — Prettier formatting, ESLint linting, ast-grep scanning, and error-suppression blocking on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-typescript",
3
- "version": "5.14.3",
3
+ "version": "6.0.1",
4
4
  "description": "TypeScript-specific hooks for formatting, linting, and ast-grep scanning on edit.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-typescript",
3
- "version": "5.14.3",
3
+ "version": "6.0.1",
4
4
  "description": "TypeScript-specific hooks — Prettier formatting, ESLint linting, ast-grep scanning, and error-suppression blocking on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-typescript",
3
- "version": "5.14.3",
3
+ "version": "6.0.1",
4
4
  "description": "TypeScript-specific hooks — Prettier formatting, ESLint linting, ast-grep scanning, and error-suppression blocking on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-typescript",
3
- "version": "5.14.3",
3
+ "version": "6.0.1",
4
4
  "description": "TypeScript-specific hooks — Prettier formatting, ESLint linting, ast-grep scanning, and error-suppression blocking on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-typescript",
3
- "version": "5.14.3",
3
+ "version": "6.0.1",
4
4
  "description": "TypeScript-specific hooks — Prettier formatting, ESLint linting, ast-grep scanning, and error-suppression blocking on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-typescript",
3
- "version": "5.14.3",
3
+ "version": "6.0.1",
4
4
  "description": "TypeScript-specific hooks — Prettier formatting, ESLint linting, ast-grep scanning, and error-suppression blocking on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-wiki",
3
- "version": "5.14.3",
3
+ "version": "6.0.1",
4
4
  "description": "LLM Wiki — a distributable, git-native markdown knowledge base for Claude Code and Codex",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-wiki",
3
- "version": "5.14.3",
3
+ "version": "6.0.1",
4
4
  "description": "Distributable LLM Wiki kernel — ingest, query, lint, and maintain a git-native markdown knowledge base across Claude and Codex.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-wiki",
3
- "version": "5.14.3",
3
+ "version": "6.0.1",
4
4
  "description": "LLM Wiki — a distributable, git-native markdown knowledge base for Claude Code and Codex",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-wiki",
3
- "version": "5.14.3",
3
+ "version": "6.0.1",
4
4
  "description": "LLM Wiki — a distributable, git-native markdown knowledge base for Claude Code and Codex",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-wiki",
3
- "version": "5.14.3",
3
+ "version": "6.0.1",
4
4
  "description": "LLM Wiki — a distributable, git-native markdown knowledge base for Claude Code and Codex",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-wiki",
3
- "version": "5.14.3",
3
+ "version": "6.0.1",
4
4
  "description": "LLM Wiki — a distributable, git-native markdown knowledge base for Claude Code and Codex",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-wiki",
3
- "version": "5.14.3",
3
+ "version": "6.0.1",
4
4
  "description": "LLM Wiki — a distributable, git-native markdown knowledge base for Claude Code and Codex",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -40,7 +40,7 @@ type BudgetChecker = Pick<
40
40
  "checkLearningsBudget" | "formatBudgetVerdict" | "formatDiagnosticPath"
41
41
  >;
42
42
 
43
- const REPO_ROOT = path.resolve(import.meta.dir, "..");
43
+ const REPO_ROOT = path.resolve(import.meta.dirname, "..");
44
44
 
45
45
  const TEMPLATE_LEARNINGS_FILE = path.resolve(
46
46
  REPO_ROOT,
@@ -221,7 +221,7 @@ async function check(checker: BudgetChecker, file: string): Promise<void> {
221
221
  * @returns Canonical budget-checker functions
222
222
  */
223
223
  async function loadBudgetChecker(): Promise<BudgetChecker> {
224
- const packageRoot = path.resolve(import.meta.dir, "..");
224
+ const packageRoot = path.resolve(import.meta.dirname, "..");
225
225
  const sourceTypescript = path.join(
226
226
  packageRoot,
227
227
  "src",
@@ -247,7 +247,7 @@ async function loadBudgetChecker(): Promise<BudgetChecker> {
247
247
  async function loadOverflowResolver(): Promise<
248
248
  typeof OverflowPathModule.resolveLearningsOverflowFile
249
249
  > {
250
- const packageRoot = path.resolve(import.meta.dir, "..");
250
+ const packageRoot = path.resolve(import.meta.dirname, "..");
251
251
  const sourceTypescript = path.join(
252
252
  packageRoot,
253
253
  "src",
@@ -269,7 +269,7 @@ async function loadOverflowResolver(): Promise<
269
269
  async function loadConfiguredLearningsResolver(): Promise<
270
270
  typeof ConfiguredPathModule.resolveLearningsFileFromRawConfig
271
271
  > {
272
- const packageRoot = path.resolve(import.meta.dir, "..");
272
+ const packageRoot = path.resolve(import.meta.dirname, "..");
273
273
  const sourceTypescript = path.join(
274
274
  packageRoot,
275
275
  "src",
@@ -10,9 +10,12 @@
10
10
  * own `name` is `@codyswann/lisa` is restricted to security pins, so the
11
11
  * self-pin phase never runs. That exemption is right — a package should not
12
12
  * acquire a dependency on a published copy of itself as a side effect of
13
- * applying to itself — and it has a consequence nobody wrote down: **the one
14
- * repository whose pin no automation will ever correct is the one that ships
15
- * the automation.**
13
+ * applying to itself — and it had a consequence nobody wrote down: **the one
14
+ * repository whose pin no automation corrected was the one that ships the
15
+ * automation.** The correction now lives on the release path instead:
16
+ * `scripts/raise-self-dependency-pin.mjs`, run by the self-pin-raise
17
+ * workflow's `prepare_self_pin_raise` and `push_self_pin_raise` jobs after
18
+ * every publish and hourly (#4951). This check is what proves those jobs did their work.
16
19
  *
17
20
  * The result was measured twice. #2279 (2026-08-04) moved the floor to
18
21
  * `^2.328.0` because it was 130 releases behind. #3662 (2026-09-03) moved it
@@ -312,6 +315,118 @@ export async function checkSelfPin({
312
315
  };
313
316
  }
314
317
 
318
+ /**
319
+ * The two packument shapes a registry serves. The full document is what this
320
+ * check reads; the abbreviated install document is what Bun's resolver reads.
321
+ * They are cached separately, so one can list a release the other does not.
322
+ */
323
+ const PACKUMENT_SHAPES = [
324
+ { name: "full", accept: "application/json" },
325
+ { name: "abbreviated", accept: "application/vnd.npm.install-v1+json" },
326
+ ];
327
+
328
+ /** How many times the packument is read before the release is given up on. */
329
+ const LISTED_POLLS = 40;
330
+
331
+ /** Delay between packument reads: 40 polls span ten minutes. */
332
+ const LISTED_POLL_DELAY_MS = 15_000;
333
+
334
+ /**
335
+ * Whether one packument shape lists a version.
336
+ * @param {string} url - The packument URL.
337
+ * @param {string} accept - The shape's media type.
338
+ * @param {string} version - The release to look for.
339
+ * @param {typeof fetch} fetchImpl - Injected for tests.
340
+ * @returns {Promise<{listed: boolean, detail: string}>} The answer.
341
+ */
342
+ async function shapeLists(url, accept, version, fetchImpl) {
343
+ try {
344
+ const response = await fetchImpl(url, { headers: { accept } });
345
+ if (!response.ok) {
346
+ return { listed: false, detail: `HTTP ${response.status} from ${url}` };
347
+ }
348
+ const packument = await response.json();
349
+ return packument?.versions?.[version] === undefined
350
+ ? { listed: false, detail: `the packument does not list ${version} yet` }
351
+ : { listed: true, detail: `the packument lists ${version}` };
352
+ } catch (error) {
353
+ return { listed: false, detail: `network: ${error.message} (${url})` };
354
+ }
355
+ }
356
+
357
+ /**
358
+ * Wait, with a bound, until both packument shapes list a release.
359
+ *
360
+ * The exact-version endpoint can serve a release before the packument lists
361
+ * it. Both `check:self-pin` (newest listed version) and Bun's resolver (the
362
+ * abbreviated packument) read the packument, so a raise proved before it lists
363
+ * the release would compare `^7.0.0` against 6.x and fail for a reason that is
364
+ * only propagation lag.
365
+ * @param {object} options - Version, registry, fetch seam, poll budget and sleep seam.
366
+ * @returns {Promise<{listed: boolean, detail: string}>} Whether both shapes list it.
367
+ */
368
+ export async function awaitListed({
369
+ version,
370
+ registry = DEFAULT_REGISTRY,
371
+ fetchImpl = fetch,
372
+ polls = LISTED_POLLS,
373
+ sleep = () =>
374
+ new Promise(resolve => setTimeout(resolve, LISTED_POLL_DELAY_MS)),
375
+ }) {
376
+ const url = `${registry}/${SELF_PACKAGE}`;
377
+ const poll = async number => {
378
+ const answers = await Promise.all(
379
+ PACKUMENT_SHAPES.map(shape =>
380
+ shapeLists(url, shape.accept, version, fetchImpl)
381
+ )
382
+ );
383
+ const missing = answers.flatMap((answer, index) =>
384
+ answer.listed ? [] : [`${PACKUMENT_SHAPES[index].name}: ${answer.detail}`]
385
+ );
386
+ if (missing.length === 0) {
387
+ return { listed: true, detail: `both packument shapes list ${version}` };
388
+ }
389
+ if (number >= polls) {
390
+ return {
391
+ listed: false,
392
+ detail: `after ${polls} reads, ${missing.join("; ")}`,
393
+ };
394
+ }
395
+ await sleep();
396
+ return poll(number + 1);
397
+ };
398
+ return poll(1);
399
+ }
400
+
401
+ /**
402
+ * The newest version the registry will actually serve, for a caller that
403
+ * needs a version to raise to rather than a verdict on a manifest.
404
+ * @param {object} options - Registry and the same seams as {@link checkSelfPin}.
405
+ * @returns {Promise<{version: string | null, detail: string}>} The newest installable release.
406
+ */
407
+ export async function newestInstallableVersion({
408
+ registry = DEFAULT_REGISTRY,
409
+ fetchImpl = fetch,
410
+ attempts = 3,
411
+ sleep = () => new Promise(resolve => setTimeout(resolve, 2000)),
412
+ injected = {},
413
+ }) {
414
+ const { packument, detail } = await fetchPackument({
415
+ registry,
416
+ packageName: SELF_PACKAGE,
417
+ fetchImpl,
418
+ attempts,
419
+ sleep,
420
+ });
421
+ if (packument === null) return { version: null, detail };
422
+ const found = await newestInstallable({
423
+ candidates: publishedVersionsDescending(packument),
424
+ registry,
425
+ injected: { fetchImpl, ...injected },
426
+ });
427
+ return { version: found.version, detail: found.detail };
428
+ }
429
+
315
430
  /** Exit code for each verdict. `unprovable` blocks: nothing was proved. */
316
431
  const FAILING_VERDICTS = new Set(["stale", "unprovable"]);
317
432
 
@@ -349,8 +464,12 @@ function failureReport(outcome, registry) {
349
464
  `❌ ${SELF_PACKAGE} is pinned at "${outcome.spec}" and ${outcome.detail}.\n` +
350
465
  ` Compared against ${registry} — NOT the session plugin cache and NOT\n` +
351
466
  ` the marketplace clone, both of which can name a different version.\n` +
352
- ` Nothing corrects this pin automatically: apply skips the self-pin\n` +
353
- ` phase on Lisa's own manifest (#3768). Raise the floor by hand.\n`
467
+ ` The release raises this pin itself: the self-pin-raise workflow's\n` +
468
+ ` prepare_self_pin_raise job runs scripts/raise-self-dependency-pin.mjs\n` +
469
+ ` right after the publish lands and again every hour, and\n` +
470
+ ` push_self_pin_raise pushes the raise to main (#4951). Red here means\n` +
471
+ ` those jobs have not landed for ${outcome.newest} yet, or the last run\n` +
472
+ ` failed — that run is where the cause is. Rebase once it lands.\n`
354
473
  );
355
474
  }
356
475
  return (
@@ -368,6 +487,12 @@ function failureReport(outcome, registry) {
368
487
  */
369
488
  export async function main(argv, injected = {}) {
370
489
  const registry = option(argv, "--registry", DEFAULT_REGISTRY);
490
+ if (argv.includes("--await-listed")) {
491
+ return mainAwaitListed(argv, registry, injected);
492
+ }
493
+ if (argv.includes("--newest-installable")) {
494
+ return mainNewestInstallable(registry, injected);
495
+ }
371
496
  const manifestPath = option(argv, "--manifest", defaultManifestPath());
372
497
  const outcome = await checkSelfPin({
373
498
  manifest: JSON.parse(readFileSync(manifestPath, "utf8")),
@@ -387,6 +512,48 @@ export async function main(argv, injected = {}) {
387
512
  return 1;
388
513
  }
389
514
 
515
+ /**
516
+ * `--await-listed <version>`: exit 0 once both packument shapes list it.
517
+ * @param {string[]} argv - Arguments after the script path.
518
+ * @param {string} registry - The registry origin.
519
+ * @param {object} injected - Test seams forwarded to {@link awaitListed}.
520
+ * @returns {Promise<number>} Process exit code.
521
+ */
522
+ async function mainAwaitListed(argv, registry, injected) {
523
+ const version = option(argv, "--await-listed", "");
524
+ if (!semver.valid(version) || semver.prerelease(version) !== null) {
525
+ process.stderr.write(
526
+ `❌ --await-listed needs a release version, not "${version}"\n`
527
+ );
528
+ return 1;
529
+ }
530
+ const outcome = await awaitListed({ version, registry, ...injected });
531
+ process.stdout.write(
532
+ `${VERDICT_PREFIX} ${outcome.listed ? "listed" : "not-listed"} ` +
533
+ `package=${SELF_PACKAGE} version=${version} — ${outcome.detail}\n`
534
+ );
535
+ return outcome.listed ? 0 : 1;
536
+ }
537
+
538
+ /**
539
+ * `--newest-installable`: print only the newest installable release, so a
540
+ * workflow step can capture it.
541
+ * @param {string} registry - The registry origin.
542
+ * @param {object} injected - Test seams forwarded to {@link newestInstallableVersion}.
543
+ * @returns {Promise<number>} Process exit code: 1 when nothing was proved.
544
+ */
545
+ async function mainNewestInstallable(registry, injected) {
546
+ const found = await newestInstallableVersion({ registry, ...injected });
547
+ if (found.version === null) {
548
+ process.stderr.write(
549
+ `❌ Could not prove which ${SELF_PACKAGE} release is newest: ${found.detail}\n`
550
+ );
551
+ return 1;
552
+ }
553
+ process.stdout.write(`${found.version}\n`);
554
+ return 0;
555
+ }
556
+
390
557
  /* c8 ignore start -- CLI wiring, exercised through main() in tests */
391
558
  if (invokedAsScript(import.meta.url)) {
392
559
  main(process.argv.slice(2))