@deftai/directive-core 0.83.0 → 0.85.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 (110) hide show
  1. package/dist/cache/fetch.d.ts +17 -0
  2. package/dist/cache/fetch.js +50 -0
  3. package/dist/cache/main.js +36 -2
  4. package/dist/cache/task-cache/constants.d.ts +4 -0
  5. package/dist/cache/task-cache/constants.js +4 -0
  6. package/dist/cache/task-cache/executor.d.ts +9 -0
  7. package/dist/cache/task-cache/executor.js +51 -0
  8. package/dist/cache/task-cache/hash.d.ts +17 -0
  9. package/dist/cache/task-cache/hash.js +92 -0
  10. package/dist/cache/task-cache/index.d.ts +14 -0
  11. package/dist/cache/task-cache/index.js +15 -0
  12. package/dist/cache/task-cache/lint.d.ts +4 -0
  13. package/dist/cache/task-cache/lint.js +55 -0
  14. package/dist/cache/task-cache/registry.d.ts +7 -0
  15. package/dist/cache/task-cache/registry.js +67 -0
  16. package/dist/cache/task-cache/store.d.ts +10 -0
  17. package/dist/cache/task-cache/store.js +48 -0
  18. package/dist/cache/task-cache/types.d.ts +48 -0
  19. package/dist/cache/task-cache/types.js +3 -0
  20. package/dist/check/cached-orchestrator.d.ts +16 -0
  21. package/dist/check/cached-orchestrator.js +76 -0
  22. package/dist/check/context.d.ts +30 -0
  23. package/dist/check/context.js +28 -0
  24. package/dist/check/gate-lists.d.ts +18 -0
  25. package/dist/check/gate-lists.js +68 -0
  26. package/dist/check/index.d.ts +4 -1
  27. package/dist/check/index.js +3 -0
  28. package/dist/check/orchestrator.d.ts +3 -45
  29. package/dist/check/orchestrator.js +8 -46
  30. package/dist/check/runner-detect.d.ts +20 -0
  31. package/dist/check/runner-detect.js +131 -0
  32. package/dist/doctor/checks.js +16 -1
  33. package/dist/doctor/constants.d.ts +2 -0
  34. package/dist/doctor/constants.js +8 -4
  35. package/dist/doctor/index.d.ts +1 -0
  36. package/dist/doctor/index.js +1 -0
  37. package/dist/doctor/main.js +13 -4
  38. package/dist/doctor/npm-registry.d.ts +23 -0
  39. package/dist/doctor/npm-registry.js +128 -0
  40. package/dist/doctor/npm-view.d.ts +10 -0
  41. package/dist/doctor/npm-view.js +31 -0
  42. package/dist/doctor/payload-staleness.js +2 -9
  43. package/dist/doctor/signpost-checks.d.ts +2 -1
  44. package/dist/doctor/signpost-checks.js +2 -0
  45. package/dist/doctor/types.d.ts +9 -0
  46. package/dist/eval/readback.js +6 -1
  47. package/dist/eval-health-relocation/evaluate.js +15 -1
  48. package/dist/fs/projection-containment.js +1 -1
  49. package/dist/hooks/cursor-hooks.d.ts +6 -20
  50. package/dist/hooks/cursor-hooks.js +7 -92
  51. package/dist/hooks/dispatcher.d.ts +2 -0
  52. package/dist/hooks/dispatcher.js +48 -6
  53. package/dist/init-deposit/agent-hooks.d.ts +2 -2
  54. package/dist/init-deposit/agent-hooks.js +15 -37
  55. package/dist/init-deposit/gitignore.js +1 -0
  56. package/dist/init-deposit/hygiene.d.ts +22 -0
  57. package/dist/init-deposit/hygiene.js +136 -4
  58. package/dist/init-deposit/legacy-detect.d.ts +25 -1
  59. package/dist/init-deposit/legacy-detect.js +143 -11
  60. package/dist/init-deposit/refresh.d.ts +2 -0
  61. package/dist/init-deposit/refresh.js +18 -5
  62. package/dist/policy/index.d.ts +2 -0
  63. package/dist/policy/index.js +2 -0
  64. package/dist/policy/org-force-on-migration.d.ts +44 -0
  65. package/dist/policy/org-force-on-migration.js +240 -0
  66. package/dist/policy/product-signal.d.ts +3 -1
  67. package/dist/policy/product-signal.js +15 -4
  68. package/dist/policy/value-feedback.d.ts +18 -1
  69. package/dist/policy/value-feedback.js +78 -5
  70. package/dist/preflight-cache/evaluate.js +12 -1
  71. package/dist/product-signal/consent-prompt.d.ts +13 -0
  72. package/dist/product-signal/consent-prompt.js +30 -0
  73. package/dist/product-signal/submit.js +22 -1
  74. package/dist/render/index.d.ts +1 -0
  75. package/dist/render/index.js +1 -0
  76. package/dist/render/rule-map-template.d.ts +2 -0
  77. package/dist/render/rule-map-template.js +407 -0
  78. package/dist/render/rule-map.d.ts +2 -0
  79. package/dist/render/rule-map.js +703 -0
  80. package/dist/review-monitor/constants.d.ts +7 -1
  81. package/dist/review-monitor/constants.js +40 -14
  82. package/dist/review-monitor/github-lease.d.ts +45 -0
  83. package/dist/review-monitor/github-lease.js +106 -0
  84. package/dist/review-monitor/index.d.ts +2 -0
  85. package/dist/review-monitor/index.js +2 -0
  86. package/dist/review-monitor/lease-comment.d.ts +36 -0
  87. package/dist/review-monitor/lease-comment.js +152 -0
  88. package/dist/review-monitor/record.d.ts +61 -13
  89. package/dist/review-monitor/record.js +379 -132
  90. package/dist/review-monitor/verify.d.ts +2 -0
  91. package/dist/review-monitor/verify.js +32 -13
  92. package/dist/scm/gh-rest.d.ts +7 -1
  93. package/dist/scm/gh-rest.js +35 -0
  94. package/dist/scope/decompose.js +9 -3
  95. package/dist/session/git.d.ts +2 -0
  96. package/dist/session/git.js +14 -0
  97. package/dist/session/session-start.js +5 -0
  98. package/dist/session/verify-session-ritual.js +39 -5
  99. package/dist/swarm/routing-set-cli.js +16 -5
  100. package/dist/swarm/routing.d.ts +1 -1
  101. package/dist/swarm/routing.js +3 -1
  102. package/dist/task-surface/index.js +53 -13
  103. package/dist/value/readback.js +6 -1
  104. package/dist/xbrief-migrate/constants.d.ts +6 -0
  105. package/dist/xbrief-migrate/constants.js +6 -0
  106. package/dist/xbrief-migrate/index.d.ts +2 -2
  107. package/dist/xbrief-migrate/index.js +2 -2
  108. package/dist/xbrief-migrate/migrate-project.d.ts +7 -0
  109. package/dist/xbrief-migrate/migrate-project.js +18 -1
  110. package/package.json +7 -3
@@ -3,7 +3,7 @@ import { dirname, join, relative, resolve } from "node:path";
3
3
  import { checkGitClean } from "../migrate-preflight/index.js";
4
4
  import { agentsRefreshPlan } from "../platform/agents-md.js";
5
5
  import { patchAgentsMdHeader, renderHeaderPatchSummary } from "./agents-header.js";
6
- import { LEGACY_ARTIFACT_DIR, LEGACY_ARTIFACT_SUFFIX, MIGRATED_ARTIFACT_DIR, MIGRATED_ARTIFACT_SUFFIX, VBRIEF_DEPRECATION_MARKER_BODY, VBRIEF_DEPRECATION_MARKER_FILENAME, } from "./constants.js";
6
+ import { LEGACY_ARTIFACT_DIR, LEGACY_ARTIFACT_SUFFIX, MIGRATED_ARTIFACT_DIR, MIGRATED_ARTIFACT_SUFFIX, OBSOLETE_FRAMEWORK_NARRATIVE_FILENAME, VBRIEF_DEPRECATION_MARKER_BODY, VBRIEF_DEPRECATION_MARKER_FILENAME, } from "./constants.js";
7
7
  import { detectLegacyVbriefLayout, detectXbriefConvergence } from "./detect.js";
8
8
  import { hasVbriefDeprecationMarker, isDirectory, isEffectivelyEmptyDir } from "./fs-helpers.js";
9
9
  import { assertMigrationSourceSafe } from "./migration-containment.js";
@@ -24,6 +24,21 @@ function collectFiles(root, acc = []) {
24
24
  }
25
25
  return acc;
26
26
  }
27
+ /** True when a legacy lifecycle file is an obsolete framework narrative (#2806). */
28
+ export function shouldOmitLegacyMigrationFile(relativePath) {
29
+ return relativePath.replace(/\\/g, "/") === OBSOLETE_FRAMEWORK_NARRATIVE_FILENAME;
30
+ }
31
+ /**
32
+ * Remove a stale `xbrief/vbrief.md` left by an earlier migrate:xbrief run.
33
+ * Project JSON records and `xbrief/schemas/` are untouched (#2806).
34
+ */
35
+ export function removeStaleMigratedFrameworkNarrative(projectRoot) {
36
+ const stale = join(projectRoot, MIGRATED_ARTIFACT_DIR, OBSOLETE_FRAMEWORK_NARRATIVE_FILENAME);
37
+ if (!existsSync(stale))
38
+ return false;
39
+ rmSync(stale, { force: true });
40
+ return true;
41
+ }
27
42
  function mapRelativePath(relativePath) {
28
43
  return relativePath
29
44
  .split(/[/\\]/)
@@ -81,6 +96,8 @@ function migrateLegacyTree(projectRoot, legacyDir, options) {
81
96
  try {
82
97
  for (const srcPath of files) {
83
98
  const rel = relative(legacyDir, srcPath);
99
+ if (shouldOmitLegacyMigrationFile(rel))
100
+ continue;
84
101
  const destPath = join(stagedDir, mapRelativePath(rel));
85
102
  writeMigratedFile(srcPath, destPath);
86
103
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deftai/directive-core",
3
- "version": "0.83.0",
3
+ "version": "0.85.0",
4
4
  "description": "TypeScript engine core for the Directive framework.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -86,6 +86,10 @@
86
86
  "types": "./dist/cache/index.d.ts",
87
87
  "default": "./dist/cache/index.js"
88
88
  },
89
+ "./cache/task-cache": {
90
+ "types": "./dist/cache/task-cache/index.d.ts",
91
+ "default": "./dist/cache/task-cache/index.js"
92
+ },
89
93
  "./doctor": {
90
94
  "types": "./dist/doctor/index.d.ts",
91
95
  "default": "./dist/doctor/index.js"
@@ -313,8 +317,8 @@
313
317
  "provenance": true
314
318
  },
315
319
  "dependencies": {
316
- "@deftai/directive-content": "^0.83.0",
317
- "@deftai/directive-types": "^0.83.0",
320
+ "@deftai/directive-content": "^0.85.0",
321
+ "@deftai/directive-types": "^0.85.0",
318
322
  "archiver": "^8.0.0"
319
323
  },
320
324
  "scripts": {