@lumenflow/core 3.20.0 → 3.22.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 (311) hide show
  1. package/dist/active-wu-detector.d.ts +1 -0
  2. package/dist/adapters/context-adapters.d.ts +1 -0
  3. package/dist/adapters/filesystem-metrics.adapter.d.ts +1 -0
  4. package/dist/adapters/index.d.ts +1 -0
  5. package/dist/adapters/mock-dashboard-renderer.adapter.d.ts +1 -0
  6. package/dist/adapters/recovery-adapters.d.ts +1 -0
  7. package/dist/adapters/terminal-renderer.adapter.d.ts +1 -0
  8. package/dist/adapters/validation-adapters.d.ts +1 -0
  9. package/dist/agent-patterns-registry.d.ts +1 -0
  10. package/dist/arg-parser.d.ts +1 -0
  11. package/dist/atomic-merge.d.ts +1 -0
  12. package/dist/backlog-editor.d.ts +1 -0
  13. package/dist/backlog-generator.d.ts +1 -0
  14. package/dist/backlog-parser.d.ts +1 -0
  15. package/dist/backlog-sync-validator.d.ts +1 -0
  16. package/dist/branch-check.d.ts +1 -0
  17. package/dist/branch-drift.d.ts +1 -0
  18. package/dist/cleanup-install-config.d.ts +1 -0
  19. package/dist/cleanup-lock.d.ts +1 -0
  20. package/dist/cli/get-wu-dir.d.ts +1 -0
  21. package/dist/cli/is-agent-branch.d.ts +1 -0
  22. package/dist/client-ids.d.ts +1 -0
  23. package/dist/cloud-detect.d.ts +1 -0
  24. package/dist/code-path-validator.d.ts +1 -0
  25. package/dist/code-paths-overlap.d.ts +1 -0
  26. package/dist/color-support.d.ts +1 -0
  27. package/dist/commands-logger.d.ts +1 -0
  28. package/dist/commit-message-utils.d.ts +1 -0
  29. package/dist/config-contract.d.ts +1 -0
  30. package/dist/constants/backlog-patterns.d.ts +1 -0
  31. package/dist/constants/display-constants.d.ts +1 -0
  32. package/dist/constants/dora-constants.d.ts +1 -0
  33. package/dist/constants/duration-constants.d.ts +1 -0
  34. package/dist/constants/gate-constants.d.ts +1 -0
  35. package/dist/constants/git-constants.d.ts +1 -0
  36. package/dist/constants/index.d.ts +1 -0
  37. package/dist/constants/linter-constants.d.ts +1 -0
  38. package/dist/constants/lock-constants.d.ts +1 -0
  39. package/dist/constants/tokenizer-constants.d.ts +1 -0
  40. package/dist/constants/validation-constants.d.ts +1 -0
  41. package/dist/context/context-computer.d.ts +1 -0
  42. package/dist/context/git-state-reader.d.ts +1 -0
  43. package/dist/context/index.d.ts +1 -0
  44. package/dist/context/location-resolver.d.ts +1 -0
  45. package/dist/context/wu-state-reader.d.ts +1 -0
  46. package/dist/context-di.d.ts +1 -0
  47. package/dist/context-validation-integration.d.ts +1 -0
  48. package/dist/core/scope-checker.d.ts +1 -0
  49. package/dist/core/tool-runner.d.ts +1 -0
  50. package/dist/core/tool.constants.d.ts +1 -0
  51. package/dist/core/tool.schemas.d.ts +1 -0
  52. package/dist/core/worktree-guard.d.ts +1 -0
  53. package/dist/coverage-gate.d.ts +1 -0
  54. package/dist/cycle-detector.d.ts +1 -0
  55. package/dist/date-utils.d.ts +1 -0
  56. package/dist/delegation/index.d.ts +1 -0
  57. package/dist/delegation-escalation.d.ts +1 -0
  58. package/dist/delegation-monitor.d.ts +1 -0
  59. package/dist/delegation-recovery.d.ts +1 -0
  60. package/dist/delegation-registry-schema.d.ts +1 -0
  61. package/dist/delegation-registry-store.d.ts +1 -0
  62. package/dist/delegation-tree.d.ts +1 -0
  63. package/dist/dependency-graph.d.ts +1 -0
  64. package/dist/dependency-guard.d.ts +1 -0
  65. package/dist/dependency-validator.d.ts +1 -0
  66. package/dist/docs-layout-presets.d.ts +1 -0
  67. package/dist/docs-path-validator.d.ts +1 -0
  68. package/dist/domain/context.schemas.d.ts +1 -0
  69. package/dist/domain/index.d.ts +1 -0
  70. package/dist/domain/orchestration.constants.d.ts +1 -0
  71. package/dist/domain/orchestration.schemas.d.ts +1 -0
  72. package/dist/domain/orchestration.types.d.ts +1 -0
  73. package/dist/domain/recovery.schemas.d.ts +1 -0
  74. package/dist/domain/result.d.ts +1 -0
  75. package/dist/domain/validation.schemas.d.ts +1 -0
  76. package/dist/env-accessors.d.ts +1 -0
  77. package/dist/error-handler.d.ts +1 -0
  78. package/dist/file-classifiers.d.ts +1 -0
  79. package/dist/force-bypass-audit.d.ts +1 -0
  80. package/dist/gates-agent-mode.d.ts +1 -0
  81. package/dist/gates-config-internal.d.ts +1 -0
  82. package/dist/gates-config.d.ts +1 -0
  83. package/dist/gates-coverage.d.ts +1 -0
  84. package/dist/gates-presets.d.ts +1 -0
  85. package/dist/gates-schemas.d.ts +1 -0
  86. package/dist/generate-traceability.d.ts +1 -0
  87. package/dist/git-adapter.d.ts +1 -0
  88. package/dist/git-context-extractor.d.ts +1 -0
  89. package/dist/git-staged-validator.d.ts +1 -0
  90. package/dist/hardcoded-strings.d.ts +1 -0
  91. package/dist/incremental-lint.d.ts +1 -0
  92. package/dist/incremental-test.d.ts +1 -0
  93. package/dist/index.d.ts +1 -0
  94. package/dist/invariants/check-automated-tests.d.ts +1 -0
  95. package/dist/invariants-runner.d.ts +7 -0
  96. package/dist/invariants-runner.d.ts.map +1 -1
  97. package/dist/invariants-runner.js +7 -1
  98. package/dist/invariants-runner.js.map +1 -1
  99. package/dist/lane-checker.d.ts +1 -0
  100. package/dist/lane-inference.d.ts +1 -0
  101. package/dist/lane-lock.d.ts +1 -0
  102. package/dist/lane-suggest-prompt.d.ts +1 -0
  103. package/dist/lane-validator.d.ts +1 -0
  104. package/dist/lifecycle/index.d.ts +1 -0
  105. package/dist/logs-lib.d.ts +1 -0
  106. package/dist/lumenflow-config-schema.d.ts +1 -0
  107. package/dist/lumenflow-config.d.ts +1 -0
  108. package/dist/lumenflow-home.d.ts +1 -0
  109. package/dist/manual-test-validator.d.ts +1 -0
  110. package/dist/merge-lock.d.ts +1 -0
  111. package/dist/micro-worktree-shared.d.ts +1 -0
  112. package/dist/micro-worktree.d.ts +1 -0
  113. package/dist/normalize-config-keys.d.ts +1 -0
  114. package/dist/object-guards.d.ts +1 -0
  115. package/dist/orchestration-advisory-loader.d.ts +1 -0
  116. package/dist/orchestration-advisory.d.ts +1 -0
  117. package/dist/orchestration-di.d.ts +1 -0
  118. package/dist/orchestration-rules.d.ts +1 -0
  119. package/dist/orphan-detector.d.ts +1 -0
  120. package/dist/pack-authoring-template-engine.d.ts +1 -0
  121. package/dist/package-manager-resolver.d.ts +1 -0
  122. package/dist/path-classifiers.d.ts +1 -0
  123. package/dist/path-factory.d.ts +1 -0
  124. package/dist/patrol-loop.d.ts +1 -0
  125. package/dist/piped-command-detector.d.ts +1 -0
  126. package/dist/ports/config.ports.d.ts +1 -0
  127. package/dist/ports/context.ports.d.ts +1 -0
  128. package/dist/ports/core-tools.ports.d.ts +1 -0
  129. package/dist/ports/dashboard-renderer.port.d.ts +1 -0
  130. package/dist/ports/git-validator.ports.d.ts +1 -0
  131. package/dist/ports/index.d.ts +1 -0
  132. package/dist/ports/metrics-collector.port.d.ts +1 -0
  133. package/dist/ports/recovery.ports.d.ts +1 -0
  134. package/dist/ports/sync-validator.ports.d.ts +1 -0
  135. package/dist/ports/validation.ports.d.ts +1 -0
  136. package/dist/ports/wu-helpers.ports.d.ts +1 -0
  137. package/dist/ports/wu-state.ports.d.ts +1 -0
  138. package/dist/process-detector.d.ts +1 -0
  139. package/dist/prompt-linter.d.ts +1 -0
  140. package/dist/prompt-monitor.d.ts +1 -0
  141. package/dist/rebase-artifact-cleanup.d.ts +1 -0
  142. package/dist/recovery/index.d.ts +1 -0
  143. package/dist/recovery/recovery-analyzer.d.ts +1 -0
  144. package/dist/resolve-policy.d.ts +1 -0
  145. package/dist/retry-strategy.d.ts +1 -0
  146. package/dist/rollback-utils.d.ts +1 -0
  147. package/dist/sandbox-allowlist.d.ts +1 -0
  148. package/dist/sandbox-backend-linux.d.ts +1 -0
  149. package/dist/sandbox-backend-macos.d.ts +1 -0
  150. package/dist/sandbox-backend-windows.d.ts +1 -0
  151. package/dist/sandbox-profile.d.ts +1 -0
  152. package/dist/schemas/agents-config.d.ts +1 -0
  153. package/dist/schemas/arg-validators.d.ts +1 -0
  154. package/dist/schemas/cloud-config.d.ts +1 -0
  155. package/dist/schemas/command-schemas.d.ts +1 -0
  156. package/dist/schemas/directories-config.d.ts +1 -0
  157. package/dist/schemas/flow-arg-validators.d.ts +1 -0
  158. package/dist/schemas/flow-schemas.d.ts +1 -0
  159. package/dist/schemas/gates-section-config.d.ts +1 -0
  160. package/dist/schemas/git-config.d.ts +1 -0
  161. package/dist/schemas/index.d.ts +1 -0
  162. package/dist/schemas/initiative-arg-validators.d.ts +1 -0
  163. package/dist/schemas/initiative-schemas.d.ts +1 -0
  164. package/dist/schemas/lanes-config.d.ts +1 -0
  165. package/dist/schemas/memory-arg-validators.d.ts +1 -0
  166. package/dist/schemas/memory-config.d.ts +1 -0
  167. package/dist/schemas/memory-schemas.d.ts +1 -0
  168. package/dist/schemas/operational-config.d.ts +1 -0
  169. package/dist/schemas/schema-utils.d.ts +1 -0
  170. package/dist/schemas/setup-arg-validators.d.ts +1 -0
  171. package/dist/schemas/setup-schemas.d.ts +1 -0
  172. package/dist/schemas/validation-arg-validators.d.ts +1 -0
  173. package/dist/schemas/validation-schemas.d.ts +1 -0
  174. package/dist/schemas/workspace-config.d.ts +1 -0
  175. package/dist/schemas/wu-config.d.ts +1 -0
  176. package/dist/schemas/wu-lifecycle-arg-validators.d.ts +1 -0
  177. package/dist/schemas/wu-lifecycle-schemas.d.ts +1 -0
  178. package/dist/section-headings.d.ts +1 -0
  179. package/dist/spawn-agent-guidance.d.ts +1 -0
  180. package/dist/spawn-constraints-generator.d.ts +1 -0
  181. package/dist/spawn-guidance-generators.d.ts +1 -0
  182. package/dist/spawn-policy-resolver.d.ts +1 -0
  183. package/dist/spawn-prompt-helpers.d.ts +1 -0
  184. package/dist/spawn-prompt-schema.d.ts +1 -0
  185. package/dist/spawn-strategy.d.ts +1 -0
  186. package/dist/spawn-task-builder.d.ts +1 -0
  187. package/dist/spawn-template-assembler.d.ts +1 -0
  188. package/dist/stamp-status-validator.d.ts +1 -0
  189. package/dist/stamp-tracking.d.ts +1 -0
  190. package/dist/stamp-utils.d.ts +1 -0
  191. package/dist/startup-env-validation.d.ts +1 -0
  192. package/dist/state-cleanup-core.d.ts +1 -0
  193. package/dist/state-doctor-core.d.ts +1 -0
  194. package/dist/state-machine.d.ts +1 -0
  195. package/dist/stream-error-handler.d.ts +1 -0
  196. package/dist/sync-validator.d.ts +1 -0
  197. package/dist/telemetry.d.ts +1 -0
  198. package/dist/template-loader.d.ts +1 -0
  199. package/dist/test-baseline.d.ts +1 -0
  200. package/dist/token-counter.d.ts +1 -0
  201. package/dist/types.d.ts +67 -0
  202. package/dist/usecases/analyze-recovery.usecase.d.ts +1 -0
  203. package/dist/usecases/compute-context.usecase.d.ts +1 -0
  204. package/dist/usecases/get-dashboard-data.usecase.d.ts +1 -0
  205. package/dist/usecases/get-suggestions.usecase.d.ts +1 -0
  206. package/dist/usecases/index.d.ts +1 -0
  207. package/dist/usecases/validate-command.usecase.d.ts +1 -0
  208. package/dist/user-normalizer.d.ts +1 -0
  209. package/dist/validation/command-registry.d.ts +1 -0
  210. package/dist/validation/index.d.ts +1 -0
  211. package/dist/validation/types.d.ts +1 -0
  212. package/dist/validation/validate-command.d.ts +1 -0
  213. package/dist/validators/backlog-sync.d.ts +1 -0
  214. package/dist/validators/claim-validation.d.ts +1 -0
  215. package/dist/validators/supabase-docs-linter.d.ts +1 -0
  216. package/dist/validators/wu-tasks.d.ts +1 -0
  217. package/dist/work-classifier.d.ts +1 -0
  218. package/dist/worktree-ownership.d.ts +1 -0
  219. package/dist/worktree-scanner.d.ts +1 -0
  220. package/dist/worktree-symlink.d.ts +1 -0
  221. package/dist/wu-backlog-updater.d.ts +1 -0
  222. package/dist/wu-checkpoint.d.ts +1 -0
  223. package/dist/wu-claim-helpers.d.ts +1 -0
  224. package/dist/wu-claim-resume.d.ts +1 -0
  225. package/dist/wu-cli-constants.d.ts +1 -0
  226. package/dist/wu-consistency-checker.d.ts +1 -0
  227. package/dist/wu-consistency-detector.d.ts +1 -0
  228. package/dist/wu-consistency-file-repairs.d.ts +1 -0
  229. package/dist/wu-constants.d.ts +1 -0
  230. package/dist/wu-context-constants.d.ts +1 -0
  231. package/dist/wu-create-defaults.d.ts +1 -0
  232. package/dist/wu-create-validators.d.ts +1 -0
  233. package/dist/wu-doc-types.d.ts +1 -0
  234. package/dist/wu-domain-constants.d.ts +1 -0
  235. package/dist/wu-done-branch-only.d.ts +1 -0
  236. package/dist/wu-done-branch-utils.d.ts +1 -0
  237. package/dist/wu-done-cleanup.d.ts +1 -0
  238. package/dist/wu-done-concurrent-merge.d.ts +1 -0
  239. package/dist/wu-done-docs-generate.d.ts +1 -0
  240. package/dist/wu-done-docs-only.d.ts +1 -0
  241. package/dist/wu-done-error-handling.d.ts +1 -0
  242. package/dist/wu-done-errors.d.ts +1 -0
  243. package/dist/wu-done-initiative-sync.d.ts +1 -0
  244. package/dist/wu-done-inputs.d.ts +1 -0
  245. package/dist/wu-done-machine.d.ts +1 -0
  246. package/dist/wu-done-main-sync.d.ts +1 -0
  247. package/dist/wu-done-merge-phase.d.ts +1 -0
  248. package/dist/wu-done-merge.d.ts +1 -0
  249. package/dist/wu-done-merged-worktree.d.ts +1 -0
  250. package/dist/wu-done-messages.d.ts +1 -0
  251. package/dist/wu-done-metadata.d.ts +1 -0
  252. package/dist/wu-done-paths.d.ts +1 -0
  253. package/dist/wu-done-pr.d.ts +9 -1
  254. package/dist/wu-done-pr.d.ts.map +1 -1
  255. package/dist/wu-done-pr.js +12 -2
  256. package/dist/wu-done-pr.js.map +1 -1
  257. package/dist/wu-done-preflight-checks.d.ts +1 -0
  258. package/dist/wu-done-preflight.d.ts +1 -0
  259. package/dist/wu-done-rebase.d.ts +1 -0
  260. package/dist/wu-done-retry-helpers.d.ts +1 -0
  261. package/dist/wu-done-ui.d.ts +1 -0
  262. package/dist/wu-done-utils.d.ts +1 -0
  263. package/dist/wu-done-validation.d.ts +1 -0
  264. package/dist/wu-done-validation.d.ts.map +1 -1
  265. package/dist/wu-done-validation.js +8 -2
  266. package/dist/wu-done-validation.js.map +1 -1
  267. package/dist/wu-done-validators.d.ts +1 -0
  268. package/dist/wu-done-worktree-services.d.ts +1 -0
  269. package/dist/wu-done-worktree.d.ts +1 -0
  270. package/dist/wu-done-zombie-recovery.d.ts +1 -0
  271. package/dist/wu-duplicate-id-detector.d.ts +1 -0
  272. package/dist/wu-event-sourcer.d.ts +1 -0
  273. package/dist/wu-events-cleanup.d.ts +1 -0
  274. package/dist/wu-git-constants.d.ts +1 -0
  275. package/dist/wu-helpers.d.ts +1 -0
  276. package/dist/wu-id-generator.d.ts +1 -0
  277. package/dist/wu-inconsistency-repairer.d.ts +1 -0
  278. package/dist/wu-lint.d.ts +1 -0
  279. package/dist/wu-list.d.ts +1 -0
  280. package/dist/wu-lock-manager.d.ts +1 -0
  281. package/dist/wu-paths-constants.d.ts +1 -0
  282. package/dist/wu-paths.d.ts +1 -0
  283. package/dist/wu-preflight-validators.d.ts +1 -0
  284. package/dist/wu-recovery.d.ts +1 -0
  285. package/dist/wu-repair-core.d.ts +1 -0
  286. package/dist/wu-repair-service.d.ts +1 -0
  287. package/dist/wu-rules-core.d.ts +1 -0
  288. package/dist/wu-rules-engine.d.ts +1 -0
  289. package/dist/wu-rules-resolvers.d.ts +1 -0
  290. package/dist/wu-schema-normalization.d.ts +1 -0
  291. package/dist/wu-schema.d.ts +1 -0
  292. package/dist/wu-spawn-context.d.ts +1 -0
  293. package/dist/wu-spawn-helpers.d.ts +1 -0
  294. package/dist/wu-spawn-skills.d.ts +1 -0
  295. package/dist/wu-spawn.d.ts +1 -0
  296. package/dist/wu-state-indexer.d.ts +1 -0
  297. package/dist/wu-state-schema.d.ts +1 -0
  298. package/dist/wu-state-store.d.ts +1 -0
  299. package/dist/wu-status-transition.d.ts +1 -0
  300. package/dist/wu-status-updater.d.ts +1 -0
  301. package/dist/wu-statuses.d.ts +1 -0
  302. package/dist/wu-transaction-collectors.d.ts +1 -0
  303. package/dist/wu-transaction.d.ts +1 -0
  304. package/dist/wu-type-helpers.d.ts +1 -0
  305. package/dist/wu-ui-constants.d.ts +1 -0
  306. package/dist/wu-validation-constants.d.ts +1 -0
  307. package/dist/wu-validation.d.ts +1 -0
  308. package/dist/wu-validator.d.ts +1 -0
  309. package/dist/wu-yaml-fixer.d.ts +1 -0
  310. package/dist/wu-yaml.d.ts +1 -0
  311. package/package.json +5 -4
@@ -1,3 +1,4 @@
1
+ /// <reference path="../types.d.ts" />
1
2
  /**
2
3
  * Workspace V2 Configuration Schemas
3
4
  *
@@ -1,3 +1,4 @@
1
+ /// <reference path="../types.d.ts" />
1
2
  /**
2
3
  * WU (Work Unit) Configuration Schema
3
4
  *
@@ -1,3 +1,4 @@
1
+ /// <reference path="../types.d.ts" />
1
2
  import type { ValidationResult } from './arg-validators.js';
2
3
  /** Validate wu:block arguments */
3
4
  export declare const validateWuBlockArgs: (args: Record<string, unknown>) => ValidationResult<{
@@ -1,3 +1,4 @@
1
+ /// <reference path="../types.d.ts" />
1
2
  /**
2
3
  * @file wu-lifecycle-schemas.ts
3
4
  * @description Shared Zod schemas for WU lifecycle commands (WU-1454)
@@ -1,3 +1,4 @@
1
+ /// <reference path="./types.d.ts" />
1
2
  /**
2
3
  * Default section headings (fallbacks when frontmatter is missing)
3
4
  * Re-exports from wu-constants.ts for backwards compatibility
@@ -1,3 +1,4 @@
1
+ /// <reference path="./types.d.ts" />
1
2
  import type { LumenFlowConfig } from './lumenflow-config-schema.js';
2
3
  import type { WUDocBase } from './wu-doc-types.js';
3
4
  export type WUDoc = WUDocBase;
@@ -1,3 +1,4 @@
1
+ /// <reference path="./types.d.ts" />
1
2
  /**
2
3
  * WU-1900: Options for constraints generation
3
4
  */
@@ -1,3 +1,4 @@
1
+ /// <reference path="./types.d.ts" />
1
2
  import type { ResolvedPolicy } from './resolve-policy.js';
2
3
  import { type TestMethodologyHint } from './work-classifier.js';
3
4
  /** Generate type-aware test guidance (WU-1142, WU-1192) */
@@ -1,3 +1,4 @@
1
+ /// <reference path="./types.d.ts" />
1
2
  /**
2
3
  * @file spawn-policy-resolver.ts
3
4
  * WU-2012: Extracted from wu-spawn.ts
@@ -1,3 +1,4 @@
1
+ /// <reference path="./types.d.ts" />
1
2
  import type { ClientConfig } from './lumenflow-config-schema.js';
2
3
  import type { SpawnStrategy } from './spawn-strategy.js';
3
4
  import type { WUDoc } from './spawn-agent-guidance.js';
@@ -1,3 +1,4 @@
1
+ /// <reference path="./types.d.ts" />
1
2
  /**
2
3
  * Spawn Prompt Schema (WU-1142)
3
4
  *
@@ -1,3 +1,4 @@
1
+ /// <reference path="./types.d.ts" />
1
2
  /**
2
3
  * Strategy interface for client-specific spawn behavior
3
4
  */
@@ -1,3 +1,4 @@
1
+ /// <reference path="./types.d.ts" />
1
2
  import type { LumenFlowConfig } from './lumenflow-config-schema.js';
2
3
  import type { SpawnStrategy } from './spawn-strategy.js';
3
4
  import { type WUDoc } from './spawn-agent-guidance.js';
@@ -1,3 +1,4 @@
1
+ /// <reference path="./types.d.ts" />
1
2
  /**
2
3
  * @file spawn-template-assembler.ts
3
4
  * WU-2012: Extracted from wu-spawn.ts
@@ -1,3 +1,4 @@
1
+ /// <reference path="./types.d.ts" />
1
2
  /**
2
3
  * List of parent-only lanes that are deprecated (legacy).
3
4
  * WUs with these lanes are considered legacy artifacts and may have stamp-status mismatches.
@@ -1,3 +1,4 @@
1
+ /// <reference path="./types.d.ts" />
1
2
  interface TrackedStampOptions {
2
3
  projectRoot: string;
3
4
  stampsDir: string;
@@ -1,3 +1,4 @@
1
+ /// <reference path="./types.d.ts" />
1
2
  /**
2
3
  * Stamp format error types (WU-2242)
3
4
  * @readonly
@@ -1,3 +1,4 @@
1
+ /// <reference path="./types.d.ts" />
1
2
  import type { EnvVarName } from './wu-context-constants.js';
2
3
  export declare const STARTUP_ENV_POLICY: {
3
4
  readonly ERROR: "error";
@@ -1,3 +1,4 @@
1
+ /// <reference path="./types.d.ts" />
1
2
  /**
2
3
  * State Cleanup Core (WU-1208)
3
4
  *
@@ -1,3 +1,4 @@
1
+ /// <reference path="./types.d.ts" />
1
2
  /**
2
3
  * Issue type constants
3
4
  */
@@ -1,3 +1,4 @@
1
+ /// <reference path="./types.d.ts" />
1
2
  /**
2
3
  * Validates a state transition and throws if illegal
3
4
  *
@@ -1,3 +1,4 @@
1
+ /// <reference path="./types.d.ts" />
1
2
  /**
2
3
  * Stream Error Handler
3
4
  *
@@ -1,3 +1,4 @@
1
+ /// <reference path="./types.d.ts" />
1
2
  import type { ISyncValidatorGitAdapter } from './ports/sync-validator.ports.js';
2
3
  export type EnsureMainUpToDateGitAdapter = Pick<ISyncValidatorGitAdapter, 'fetch' | 'getCommitHash'>;
3
4
  export type MainSyncGitAdapter = Pick<ISyncValidatorGitAdapter, 'fetch' | 'getCommitHash' | 'revList'>;
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env node
2
+ /// <reference path="./types.d.ts" />
2
3
  /**
3
4
  * Telemetry Module - DORA/SPACE Metrics Emission
4
5
  *
@@ -1,3 +1,4 @@
1
+ /// <reference path="./types.d.ts" />
1
2
  /**
2
3
  * Template frontmatter parsed from YAML.
3
4
  * All templates must include these fields in their frontmatter block.
@@ -1,3 +1,4 @@
1
+ /// <reference path="./types.d.ts" />
1
2
  /**
2
3
  * Test Baseline - Test Ratchet Pattern (WU-1253)
3
4
  *
@@ -1,3 +1,4 @@
1
+ /// <reference path="./types.d.ts" />
1
2
  interface PromptLoadResult {
2
3
  text: string;
3
4
  raw: string;
@@ -0,0 +1,67 @@
1
+ /// <reference types="node" />
2
+
3
+ // Copyright (c) 2026 Hellmai Ltd
4
+ // SPDX-License-Identifier: AGPL-3.0-only
5
+
6
+ /**
7
+ * Shared ambient declarations copied into dist and referenced by published declarations.
8
+ */
9
+
10
+ /**
11
+ * Transitional escape hatch for dynamic values while explicit-UnsafeAny debt is removed.
12
+ * Intentionally derived from JSON.parse return type to avoid explicit `UnsafeAny`.
13
+ */
14
+ type UnsafeAny = ReturnType<typeof JSON.parse>;
15
+
16
+ // @lumenflow/memory optional peer dependency
17
+ declare module '@lumenflow/memory/signal' {
18
+ export function createSignal(
19
+ baseDir: string,
20
+ options: { message: string; wuId: string; lane: string },
21
+ ): Promise<{ signal: { id: string } }>;
22
+
23
+ export function loadSignals(
24
+ baseDir: string,
25
+ options: { unreadOnly?: boolean },
26
+ ): Promise<Array<{ id: string; message: string }>>;
27
+
28
+ export function markSignalsAsRead(baseDir: string, signalIds: string[]): Promise<void>;
29
+ }
30
+
31
+ declare module '@lumenflow/memory/store' {
32
+ export function loadMemory(
33
+ memoryDir: string,
34
+ wuId: string,
35
+ ): Promise<{ checkpoints: Array<{ timestamp: string }> } | null>;
36
+ }
37
+
38
+ declare module '@lumenflow/memory/checkpoint' {
39
+ export function createCheckpoint(
40
+ options: unknown,
41
+ ): Promise<{ success: boolean; checkpointId: string }>;
42
+ }
43
+
44
+ // @lumenflow/initiatives optional peer dependency
45
+ declare module '@lumenflow/initiatives' {
46
+ export function detectCycles(wuMap: Map<string, unknown>): {
47
+ hasCycle: boolean;
48
+ cycles: string[][];
49
+ };
50
+ }
51
+
52
+ declare module 'micromatch' {
53
+ interface MicromatchOptions {
54
+ nocase?: boolean;
55
+ }
56
+
57
+ interface MicromatchStatic {
58
+ isMatch(
59
+ str: string,
60
+ patterns: string | readonly string[],
61
+ options?: MicromatchOptions,
62
+ ): boolean;
63
+ }
64
+
65
+ const micromatch: MicromatchStatic;
66
+ export default micromatch;
67
+ }
@@ -1,3 +1,4 @@
1
+ /// <reference path="../types.d.ts" />
1
2
  /**
2
3
  * AnalyzeRecoveryUseCase
3
4
  *
@@ -1,3 +1,4 @@
1
+ /// <reference path="../types.d.ts" />
1
2
  import type { ILocationResolver, IGitStateReader, IWuStateReader } from '../ports/context.ports.js';
2
3
  import type { WuContext } from '../validation/types.js';
3
4
  /**
@@ -1,3 +1,4 @@
1
+ /// <reference path="../types.d.ts" />
1
2
  /**
2
3
  * GetDashboardData Use Case
3
4
  *
@@ -1,3 +1,4 @@
1
+ /// <reference path="../types.d.ts" />
1
2
  /**
2
3
  * GetSuggestions Use Case
3
4
  *
@@ -1,3 +1,4 @@
1
+ /// <reference path="../types.d.ts" />
1
2
  /**
2
3
  * Use Cases Index
3
4
  *
@@ -1,3 +1,4 @@
1
+ /// <reference path="../types.d.ts" />
1
2
  import type { ICommandRegistry, CommandDefinition, WuContext } from '../ports/validation.ports.js';
2
3
  import type { ValidationResult } from '../validation/types.js';
3
4
  /**
@@ -1,3 +1,4 @@
1
+ /// <reference path="./types.d.ts" />
1
2
  /**
2
3
  * Default domain fallback when git config and lumenflow config unavailable
3
4
  * WU-1068: Changed from hardcoded 'exampleapp.co.uk' to generic default
@@ -1,3 +1,4 @@
1
+ /// <reference path="../types.d.ts" />
1
2
  import type { CommandDefinition, CommandPredicate, WuContext } from './types.js';
2
3
  /**
3
4
  * Command registry mapping command names to definitions.
@@ -1,3 +1,4 @@
1
+ /// <reference path="../types.d.ts" />
1
2
  /**
2
3
  * Validation Module
3
4
  *
@@ -1,3 +1,4 @@
1
+ /// <reference path="../types.d.ts" />
1
2
  /**
2
3
  * Validation Types for WU Context
3
4
  *
@@ -1,3 +1,4 @@
1
+ /// <reference path="../types.d.ts" />
1
2
  import type { ValidationResult, WuContext } from './types.js';
2
3
  /**
3
4
  * Validate a command against the current context.
@@ -1,3 +1,4 @@
1
+ /// <reference path="../types.d.ts" />
1
2
  export interface BacklogSyncResult {
2
3
  valid: boolean;
3
4
  errors: string[];
@@ -1,3 +1,4 @@
1
+ /// <reference path="../types.d.ts" />
1
2
  declare const CLAIM_ALLOWLIST_ALL = "all";
2
3
  export declare const CLAIM_VALIDATION_IDS: {
3
4
  readonly LEGACY_CONFIG_HARD_CUT: "legacy-config-hard-cut";
@@ -1,3 +1,4 @@
1
+ /// <reference path="../types.d.ts" />
1
2
  export interface SupabaseDocsLinterResult {
2
3
  ok: boolean;
3
4
  skipped: boolean;
@@ -1,3 +1,4 @@
1
+ /// <reference path="../types.d.ts" />
1
2
  export interface ValidationResult {
2
3
  valid: boolean;
3
4
  warnings: string[];
@@ -1,3 +1,4 @@
1
+ /// <reference path="./types.d.ts" />
1
2
  /**
2
3
  * Work domain enum-style constants
3
4
  */
@@ -1,3 +1,4 @@
1
+ /// <reference path="./types.d.ts" />
1
2
  /**
2
3
  * WU-2278: Worktree Ownership Validation
3
4
  *
@@ -1,3 +1,4 @@
1
+ /// <reference path="./types.d.ts" />
1
2
  /**
2
3
  * @typedef {object} WorktreeInfo
3
4
  * @property {string} path - Absolute path to worktree
@@ -1,3 +1,4 @@
1
+ /// <reference path="./types.d.ts" />
1
2
  /**
2
3
  * List of nested package/app paths that have their own node_modules
3
4
  *
@@ -1,3 +1,4 @@
1
+ /// <reference path="./types.d.ts" />
1
2
  /**
2
3
  * Move WU to Done section in backlog.md (idempotent)
3
4
  * WU-1574: Simplified to use state store + generator (no BacklogManager)
@@ -1,3 +1,4 @@
1
+ /// <reference path="./types.d.ts" />
1
2
  /**
2
3
  * Schema version for checkpoint files
3
4
  * Increment when checkpoint format changes
@@ -1,3 +1,4 @@
1
+ /// <reference path="./types.d.ts" />
1
2
  /**
2
3
  * Validates if a string is a valid email address.
3
4
  *
@@ -1,3 +1,4 @@
1
+ /// <reference path="./types.d.ts" />
1
2
  /**
2
3
  * WU-2119: Interfaces for wu-claim-resume, replacing untyped parameters.
3
4
  */
@@ -1,3 +1,4 @@
1
+ /// <reference path="./types.d.ts" />
1
2
  /**
2
3
  * CLI and Tooling Constants
3
4
  *
@@ -1,3 +1,4 @@
1
+ /// <reference path="./types.d.ts" />
1
2
  /**
2
3
  * WU Consistency Checker — Barrel Re-export (WU-2015)
3
4
  *
@@ -1,3 +1,4 @@
1
+ /// <reference path="./types.d.ts" />
1
2
  /**
2
3
  * Options for checking a single WU's consistency
3
4
  */
@@ -1,3 +1,4 @@
1
+ /// <reference path="./types.d.ts" />
1
2
  /**
2
3
  * Result type for consistency repair operations.
3
4
  *
@@ -1,3 +1,4 @@
1
+ /// <reference path="./types.d.ts" />
1
2
  /**
2
3
  * Work Unit Constants - Barrel Re-export
3
4
  *
@@ -1,3 +1,4 @@
1
+ /// <reference path="./types.d.ts" />
1
2
  /**
2
3
  * Context Validation Constants
3
4
  *
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env node
2
+ /// <reference path="./types.d.ts" />
2
3
  /**
3
4
  * Centralized wu:create defaults (WU-1444)
4
5
  *
@@ -1,3 +1,4 @@
1
+ /// <reference path="./types.d.ts" />
1
2
  /**
2
3
  * WU-1069: Check if a path is a repo-internal path that should be rejected
3
4
  *
@@ -1,3 +1,4 @@
1
+ /// <reference path="./types.d.ts" />
1
2
  /**
2
3
  * WU Document Type Definitions (WU-2044)
3
4
  *
@@ -1,3 +1,4 @@
1
+ /// <reference path="./types.d.ts" />
1
2
  /**
2
3
  * Regex patterns for WU operations
3
4
  *
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env node
2
+ /// <reference path="./types.d.ts" />
2
3
  import { getGitForCwd } from './git-adapter.js';
3
4
  import { emit } from './telemetry.js';
4
5
  export declare const LANE_SIGNALS_NDJSON: string;
@@ -1,3 +1,4 @@
1
+ /// <reference path="./types.d.ts" />
1
2
  /**
2
3
  * Check if branch is already merged to main
3
4
  *
@@ -1,3 +1,4 @@
1
+ /// <reference path="./types.d.ts" />
1
2
  /**
2
3
  * Run cleanup operations after successful merge
3
4
  * Removes worktree and optionally deletes lane branch
@@ -1,3 +1,4 @@
1
+ /// <reference path="./types.d.ts" />
1
2
  import { WUStateStore } from './wu-state-store.js';
2
3
  /**
3
4
  * Fetch wu-events.jsonl content from origin/main using git show.
@@ -1,3 +1,4 @@
1
+ /// <reference path="./types.d.ts" />
1
2
  /**
2
3
  * Pathspecs for files that affect generated documentation.
3
4
  * When UnsafeAny of these files change, docs:generate should be run.
@@ -1,3 +1,4 @@
1
+ /// <reference path="./types.d.ts" />
1
2
  /**
2
3
  * Prefixes for paths that qualify as "docs-only" (no code changes).
3
4
  * Unlike SKIP_TESTS_PREFIXES, this excludes tools/ and scripts/ because
@@ -1,3 +1,4 @@
1
+ /// <reference path="./types.d.ts" />
1
2
  import { WUTransaction } from './wu-transaction.js';
2
3
  /**
3
4
  * Context required for error handling after a failed completion attempt.
@@ -1,3 +1,4 @@
1
+ /// <reference path="./types.d.ts" />
1
2
  /**
2
3
  * Create a validation error for wu:done validators.
3
4
  */
@@ -1,3 +1,4 @@
1
+ /// <reference path="./types.d.ts" />
1
2
  interface SyncInput {
2
3
  wuId: string;
3
4
  wuDoc: Record<string, unknown>;
@@ -1,3 +1,4 @@
1
+ /// <reference path="./types.d.ts" />
1
2
  /**
2
3
  * Validates command-line inputs and WU ID format
3
4
  * @param {string[]} argv - Process arguments
@@ -1,3 +1,4 @@
1
+ /// <reference path="./types.d.ts" />
1
2
  /**
2
3
  * Typed XState v5 state machine for the wu:done pipeline.
3
4
  *
@@ -1,3 +1,4 @@
1
+ /// <reference path="./types.d.ts" />
1
2
  /**
2
3
  * WU-2014: Main branch sync validation compatibility exports for wu:done.
3
4
  *
@@ -1,3 +1,4 @@
1
+ /// <reference path="./types.d.ts" />
1
2
  /**
2
3
  * Input context for the merge phase.
3
4
  */
@@ -1,3 +1,4 @@
1
+ /// <reference path="./types.d.ts" />
1
2
  /**
2
3
  * WU-2014: Merge operations for wu:done worktree completion.
3
4
  *
@@ -1,3 +1,4 @@
1
+ /// <reference path="./types.d.ts" />
1
2
  export interface AlreadyMergedDetectionParams {
2
3
  /** WU identifier (e.g. 'WU-1') */
3
4
  wuId: string;
@@ -1,3 +1,4 @@
1
+ /// <reference path="./types.d.ts" />
1
2
  /**
2
3
  * @file wu-done-messages.ts
3
4
  * @description Constants and message templates for wu-done operations
@@ -1,3 +1,4 @@
1
+ /// <reference path="./types.d.ts" />
1
2
  import type { WUTransaction } from './wu-transaction.js';
2
3
  interface CommitProvenance {
3
4
  branch?: string;
@@ -1,3 +1,4 @@
1
+ /// <reference path="./types.d.ts" />
1
2
  type WUDocLike = Pick<import('./wu-doc-types.js').WUDocBase, 'id' | 'lane' | 'type' | 'code_paths' | 'claimed_mode' | 'claimed_branch' | 'worktree_path'>;
2
3
  interface DonePathArgs {
3
4
  worktree?: string | null;
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env node
2
+ /// <reference path="./types.d.ts" />
2
3
  /**
3
4
  * Canonical completion mode labels used for wu:done telemetry events.
4
5
  * Centralized here so all completion workflows share consistent values.
@@ -35,11 +36,18 @@ interface EnsurePRCreatedInput {
35
36
  /**
36
37
  * Check if PR mode is enabled for this WU
37
38
  *
39
+ * PR mode is triggered by:
40
+ * - claimed_mode === 'worktree-pr' (always)
41
+ * - --create-pr CLI flag (always)
42
+ * - requires_review: true ONLY when claimed_mode is worktree-pr or branch-pr
43
+ * (worktree-mode WUs with requires_review use normal merge — review is
44
+ * handled out-of-band, not by forcing a PR)
45
+ *
38
46
  * @param {Object} doc - WU YAML document
39
47
  * @param {Object} args - CLI arguments
40
48
  * @returns {boolean} Whether PR mode is enabled
41
49
  */
42
- export declare function isPRModeEnabled(doc: UnsafeAny, args: UnsafeAny): any;
50
+ export declare function isPRModeEnabled(doc: UnsafeAny, args: UnsafeAny): boolean;
43
51
  /**
44
52
  * Check if gh CLI is available
45
53
  *
@@ -1 +1 @@
1
- {"version":3,"file":"wu-done-pr.d.ts","sourceRoot":"","sources":["../src/wu-done-pr.ts"],"names":[],"mappings":";AAqBA;;;GAGG;AACH,eAAO,MAAM,wBAAwB;;;;EAInC,CAAC;AAEH;;;;;;;GAOG;AAEH;;;;;GAKG;AAEH,MAAM,WAAW,QAAQ;IACvB,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,WAAW,EAAE,OAAO,CAAC;CACtB;AAED,UAAU,oBAAoB;IAC5B,MAAM,EAAE,QAAQ,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,EAAE,EAAE,MAAM,CAAC;CACZ;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,OAI9D;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,YAQ/B;AAED;;;;;;GAMG;AACH,wBAAsB,QAAQ,CAAC,OAAO,EAAE,SAAS,GAAG,OAAO,CAAC,QAAQ,CAAC,CA4DpE;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,oBAAoB,GAAG,MAAM,CAsBnE;AAED;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,SAAS,EAAE,EAAE,EAAE,SAAS,UAkCxD;AAED;;;;;GAKG;AACH,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,SAAS,EAAE,EAAE,EAAE,SAAS,QAaxE;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,SAAS,EAAE,EAAE,EAAE,SAAS,QAWpE"}
1
+ {"version":3,"file":"wu-done-pr.d.ts","sourceRoot":"","sources":["../src/wu-done-pr.ts"],"names":[],"mappings":";AAqBA;;;GAGG;AACH,eAAO,MAAM,wBAAwB;;;;EAInC,CAAC;AAEH;;;;;;;GAOG;AAEH;;;;;GAKG;AAEH,MAAM,WAAW,QAAQ;IACvB,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,WAAW,EAAE,OAAO,CAAC;CACtB;AAED,UAAU,oBAAoB;IAC5B,MAAM,EAAE,QAAQ,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,EAAE,EAAE,MAAM,CAAC;CACZ;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,WAK9D;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,YAQ/B;AAED;;;;;;GAMG;AACH,wBAAsB,QAAQ,CAAC,OAAO,EAAE,SAAS,GAAG,OAAO,CAAC,QAAQ,CAAC,CA4DpE;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,oBAAoB,GAAG,MAAM,CAsBnE;AAED;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,SAAS,EAAE,EAAE,EAAE,SAAS,UAkCxD;AAED;;;;;GAKG;AACH,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,SAAS,EAAE,EAAE,EAAE,SAAS,QAaxE;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,SAAS,EAAE,EAAE,EAAE,SAAS,QAWpE"}
@@ -28,14 +28,24 @@ export const WU_DONE_COMPLETION_MODES = Object.freeze({
28
28
  /**
29
29
  * Check if PR mode is enabled for this WU
30
30
  *
31
+ * PR mode is triggered by:
32
+ * - claimed_mode === 'worktree-pr' (always)
33
+ * - --create-pr CLI flag (always)
34
+ * - requires_review: true ONLY when claimed_mode is worktree-pr or branch-pr
35
+ * (worktree-mode WUs with requires_review use normal merge — review is
36
+ * handled out-of-band, not by forcing a PR)
37
+ *
31
38
  * @param {Object} doc - WU YAML document
32
39
  * @param {Object} args - CLI arguments
33
40
  * @returns {boolean} Whether PR mode is enabled
34
41
  */
35
42
  export function isPRModeEnabled(doc, args) {
36
43
  const claimedMode = doc.claimed_mode || 'worktree';
37
- const requiresReview = doc.requires_review === true;
38
- return claimedMode === 'worktree-pr' || args.createPR || requiresReview;
44
+ if (claimedMode === 'worktree-pr' || claimedMode === 'branch-pr')
45
+ return true;
46
+ if (args.createPR)
47
+ return true;
48
+ return false;
39
49
  }
40
50
  /**
41
51
  * Check if gh CLI is available