@lumenflow/core 2.2.1 → 2.3.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/dist/active-wu-detector.d.ts +1 -1
- package/dist/active-wu-detector.js +1 -1
- package/dist/arg-parser.js +51 -18
- package/dist/backlog-generator.d.ts +4 -4
- package/dist/backlog-generator.js +4 -4
- package/dist/backlog-sync-validator.js +1 -1
- package/dist/cleanup-lock.d.ts +9 -2
- package/dist/cleanup-lock.js +17 -7
- package/dist/code-path-validator.d.ts +3 -3
- package/dist/code-path-validator.js +3 -3
- package/dist/compliance-parser.d.ts +1 -1
- package/dist/compliance-parser.js +1 -1
- package/dist/constants/backlog-patterns.d.ts +1 -1
- package/dist/constants/backlog-patterns.js +1 -1
- package/dist/constants/dora-constants.d.ts +1 -1
- package/dist/constants/dora-constants.js +1 -1
- package/dist/constants/gate-constants.d.ts +1 -1
- package/dist/constants/gate-constants.js +1 -1
- package/dist/constants/linter-constants.d.ts +1 -1
- package/dist/constants/linter-constants.js +1 -1
- package/dist/constants/tokenizer-constants.d.ts +1 -1
- package/dist/constants/tokenizer-constants.js +1 -1
- package/dist/context/location-resolver.js +2 -1
- package/dist/context-validation-integration.d.ts +1 -0
- package/dist/core/scope-checker.d.ts +3 -3
- package/dist/core/scope-checker.js +3 -3
- package/dist/core/tool-runner.d.ts +5 -5
- package/dist/core/tool-runner.js +5 -5
- package/dist/core/tool.constants.d.ts +1 -1
- package/dist/core/tool.constants.js +1 -1
- package/dist/core/tool.schemas.d.ts +2 -2
- package/dist/core/tool.schemas.js +1 -1
- package/dist/core/worktree-guard.d.ts +1 -1
- package/dist/core/worktree-guard.js +1 -1
- package/dist/coverage-gate.d.ts +12 -3
- package/dist/coverage-gate.js +15 -8
- package/dist/date-utils.d.ts +4 -4
- package/dist/date-utils.js +4 -4
- package/dist/dependency-graph.d.ts +6 -0
- package/dist/dependency-graph.js +43 -2
- package/dist/dependency-guard.d.ts +2 -2
- package/dist/dependency-guard.js +3 -3
- package/dist/dependency-validator.d.ts +4 -4
- package/dist/dependency-validator.js +4 -7
- package/dist/domain/orchestration.constants.d.ts +31 -10
- package/dist/domain/orchestration.constants.js +45 -16
- package/dist/domain/orchestration.schemas.d.ts +54 -28
- package/dist/domain/orchestration.schemas.js +2 -2
- package/dist/domain/orchestration.types.d.ts +2 -2
- package/dist/domain/orchestration.types.js +2 -2
- package/dist/error-handler.d.ts +10 -10
- package/dist/error-handler.js +10 -10
- package/dist/file-classifiers.d.ts +6 -6
- package/dist/file-classifiers.js +6 -6
- package/dist/gates-config.d.ts +74 -0
- package/dist/gates-config.js +209 -2
- package/dist/git-adapter.d.ts +11 -11
- package/dist/git-adapter.js +11 -11
- package/dist/git-context-extractor.d.ts +112 -0
- package/dist/git-context-extractor.js +559 -0
- package/dist/hardcoded-strings.d.ts +1 -1
- package/dist/hardcoded-strings.js +1 -1
- package/dist/incremental-lint.d.ts +1 -1
- package/dist/incremental-lint.js +2 -2
- package/dist/incremental-test.d.ts +1 -1
- package/dist/incremental-test.js +1 -1
- package/dist/index.d.ts +13 -0
- package/dist/index.js +25 -0
- package/dist/invariants/check-automated-tests.d.ts +2 -2
- package/dist/invariants/check-automated-tests.js +3 -3
- package/dist/lane-checker.d.ts +28 -7
- package/dist/lane-checker.js +316 -159
- package/dist/lane-suggest-prompt.d.ts +108 -0
- package/dist/lane-suggest-prompt.js +359 -0
- package/dist/lane-validator.d.ts +3 -3
- package/dist/lane-validator.js +3 -3
- package/dist/logs-lib.d.ts +1 -1
- package/dist/logs-lib.js +1 -1
- package/dist/lumenflow-config-schema.d.ts +162 -0
- package/dist/lumenflow-config-schema.js +180 -0
- package/dist/manual-test-validator.d.ts +2 -2
- package/dist/manual-test-validator.js +3 -3
- package/dist/merge-lock.d.ts +8 -1
- package/dist/merge-lock.js +16 -7
- package/dist/micro-worktree.d.ts +81 -13
- package/dist/micro-worktree.js +98 -17
- package/dist/migration-deployer.d.ts +1 -1
- package/dist/migration-deployer.js +1 -1
- package/dist/orchestration-advisory-loader.d.ts +2 -2
- package/dist/orchestration-advisory-loader.js +10 -6
- package/dist/orchestration-advisory.d.ts +3 -3
- package/dist/orchestration-advisory.js +4 -4
- package/dist/orchestration-di.d.ts +4 -4
- package/dist/orchestration-di.js +4 -4
- package/dist/orchestration-rules.d.ts +4 -4
- package/dist/orchestration-rules.js +18 -10
- package/dist/orphan-detector.d.ts +3 -3
- package/dist/orphan-detector.js +3 -3
- package/dist/patrol-loop.d.ts +170 -0
- package/dist/patrol-loop.js +186 -0
- package/dist/process-detector.d.ts +5 -5
- package/dist/process-detector.js +5 -5
- package/dist/rebase-artifact-cleanup.d.ts +3 -3
- package/dist/rebase-artifact-cleanup.js +3 -3
- package/dist/resolve-policy.d.ts +195 -0
- package/dist/resolve-policy.js +203 -0
- package/dist/risk-detector.d.ts +2 -2
- package/dist/risk-detector.js +2 -2
- package/dist/rollback-utils.d.ts +1 -1
- package/dist/rollback-utils.js +1 -1
- package/dist/section-headings.d.ts +1 -1
- package/dist/section-headings.js +1 -1
- package/dist/spawn-escalation.d.ts +4 -4
- package/dist/spawn-escalation.js +3 -3
- package/dist/spawn-monitor.d.ts +4 -4
- package/dist/spawn-monitor.js +4 -4
- package/dist/spawn-recovery.d.ts +3 -3
- package/dist/spawn-recovery.js +3 -3
- package/dist/spawn-registry-schema.d.ts +2 -2
- package/dist/spawn-registry-schema.js +2 -2
- package/dist/spawn-registry-store.d.ts +2 -2
- package/dist/spawn-registry-store.js +2 -2
- package/dist/spawn-strategy.d.ts +17 -11
- package/dist/spawn-strategy.js +47 -44
- package/dist/spawn-tree.d.ts +3 -3
- package/dist/spawn-tree.js +3 -3
- package/dist/state-cleanup-core.d.ts +205 -0
- package/dist/state-cleanup-core.js +240 -0
- package/dist/state-doctor-core.d.ts +168 -0
- package/dist/state-doctor-core.js +251 -0
- package/dist/stream-error-handler.d.ts +67 -0
- package/dist/stream-error-handler.js +94 -0
- package/dist/system-map-validator.d.ts +18 -0
- package/dist/system-map-validator.js +50 -16
- package/dist/telemetry.d.ts +1 -1
- package/dist/telemetry.js +1 -1
- package/dist/template-loader.d.ts +162 -0
- package/dist/template-loader.js +372 -0
- package/dist/test-baseline.d.ts +176 -0
- package/dist/test-baseline.js +282 -0
- package/dist/usecases/get-suggestions.usecase.d.ts +1 -1
- package/dist/validation/command-registry.js +37 -0
- package/dist/validators/backlog-sync.d.ts +14 -0
- package/dist/validators/backlog-sync.js +62 -0
- package/dist/validators/supabase-docs-linter.d.ts +18 -0
- package/dist/validators/supabase-docs-linter.js +42 -0
- package/dist/validators/wu-tasks.d.ts +24 -0
- package/dist/validators/wu-tasks.js +90 -0
- package/dist/worktree-scanner.d.ts +1 -1
- package/dist/worktree-scanner.js +1 -1
- package/dist/worktree-symlink.d.ts +3 -3
- package/dist/worktree-symlink.js +3 -3
- package/dist/wu-backlog-updater.d.ts +1 -1
- package/dist/wu-backlog-updater.js +1 -1
- package/dist/wu-claim-helpers.d.ts +1 -1
- package/dist/wu-claim-helpers.js +1 -1
- package/dist/wu-claim-resume.d.ts +1 -1
- package/dist/wu-claim-resume.js +1 -1
- package/dist/wu-consistency-checker.d.ts +1 -1
- package/dist/wu-consistency-checker.js +17 -11
- package/dist/wu-constants.d.ts +73 -36
- package/dist/wu-constants.js +65 -92
- package/dist/wu-done-branch-only.d.ts +1 -1
- package/dist/wu-done-branch-only.js +1 -1
- package/dist/wu-done-docs-generate.d.ts +1 -1
- package/dist/wu-done-docs-generate.js +1 -1
- package/dist/wu-done-messages.d.ts +2 -2
- package/dist/wu-done-messages.js +2 -2
- package/dist/wu-done-metadata.d.ts +3 -3
- package/dist/wu-done-metadata.js +3 -3
- package/dist/wu-done-pr.d.ts +1 -1
- package/dist/wu-done-pr.js +4 -2
- package/dist/wu-done-preflight.d.ts +20 -10
- package/dist/wu-done-preflight.js +48 -47
- package/dist/wu-done-ui.d.ts +3 -3
- package/dist/wu-done-ui.js +3 -3
- package/dist/wu-done-validation.d.ts +30 -0
- package/dist/wu-done-validation.js +106 -1
- package/dist/wu-done-validators.d.ts +1 -1
- package/dist/wu-done-worktree.d.ts +1 -1
- package/dist/wu-done-worktree.js +11 -1
- package/dist/wu-events-cleanup.d.ts +148 -0
- package/dist/wu-events-cleanup.js +401 -0
- package/dist/wu-helpers.d.ts +2 -2
- package/dist/wu-helpers.js +2 -2
- package/dist/wu-id-generator.d.ts +58 -0
- package/dist/wu-id-generator.js +103 -0
- package/dist/wu-lint.js +1 -1
- package/dist/wu-preflight-validators.d.ts +13 -1
- package/dist/wu-preflight-validators.js +56 -1
- package/dist/wu-recovery.d.ts +2 -2
- package/dist/wu-recovery.js +4 -4
- package/dist/wu-repair-core.d.ts +5 -5
- package/dist/wu-repair-core.js +6 -6
- package/dist/wu-schema-normalization.d.ts +1 -1
- package/dist/wu-schema-normalization.js +1 -1
- package/dist/wu-schema.d.ts +7 -7
- package/dist/wu-schema.js +8 -8
- package/dist/wu-spawn-context.d.ts +87 -0
- package/dist/wu-spawn-context.js +175 -0
- package/dist/wu-spawn-helpers.d.ts +1 -1
- package/dist/wu-spawn-helpers.js +1 -1
- package/dist/wu-spawn.d.ts +177 -4
- package/dist/wu-spawn.js +694 -72
- package/dist/wu-state-schema.d.ts +1 -1
- package/dist/wu-state-schema.js +1 -1
- package/dist/wu-state-store.d.ts +3 -3
- package/dist/wu-state-store.js +3 -3
- package/dist/wu-status-transition.d.ts +1 -1
- package/dist/wu-status-transition.js +1 -1
- package/dist/wu-status-updater.d.ts +3 -3
- package/dist/wu-status-updater.js +3 -3
- package/dist/wu-validation-constants.d.ts +2 -2
- package/dist/wu-validation-constants.js +2 -2
- package/dist/wu-validation.d.ts +3 -3
- package/dist/wu-validation.js +3 -3
- package/dist/wu-yaml-fixer.d.ts +2 -2
- package/dist/wu-yaml-fixer.js +3 -3
- package/dist/wu-yaml.d.ts +23 -0
- package/dist/wu-yaml.js +76 -2
- package/package.json +5 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Backlog.md Update Utilities
|
|
3
3
|
*
|
|
4
|
-
* Centralized backlog.md update functions (extracted from wu-done.
|
|
4
|
+
* Centralized backlog.md update functions (extracted from wu-done.ts)
|
|
5
5
|
* Refactored to use BacklogManager (WU-1212) for AST-based manipulation
|
|
6
6
|
*
|
|
7
7
|
* Used by both main wu:done flow AND recovery mode (DRY principle)
|
package/dist/wu-claim-helpers.js
CHANGED
package/dist/wu-claim-resume.js
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* - ORPHAN_WORKTREE_DONE: Done WU still has worktree
|
|
11
11
|
* - STAMP_EXISTS_YAML_NOT_DONE: Stamp exists but YAML status is not done (WU-2412)
|
|
12
12
|
*
|
|
13
|
-
* @see {@link ../wu-repair.
|
|
13
|
+
* @see {@link ../wu-repair.ts} CLI interface
|
|
14
14
|
*/
|
|
15
15
|
/**
|
|
16
16
|
* Check a single WU for state inconsistencies
|
|
@@ -10,13 +10,13 @@
|
|
|
10
10
|
* - ORPHAN_WORKTREE_DONE: Done WU still has worktree
|
|
11
11
|
* - STAMP_EXISTS_YAML_NOT_DONE: Stamp exists but YAML status is not done (WU-2412)
|
|
12
12
|
*
|
|
13
|
-
* @see {@link ../wu-repair.
|
|
13
|
+
* @see {@link ../wu-repair.ts} CLI interface
|
|
14
14
|
*/
|
|
15
15
|
import { readFile, writeFile, readdir, mkdir, access } from 'node:fs/promises';
|
|
16
16
|
import { constants, existsSync, mkdirSync, writeFileSync, readFileSync } from 'node:fs';
|
|
17
17
|
import path from 'node:path';
|
|
18
18
|
import { parseYAML, stringifyYAML } from './wu-yaml.js';
|
|
19
|
-
import { WU_PATHS } from './wu-paths.js';
|
|
19
|
+
import { createWuPaths, WU_PATHS } from './wu-paths.js';
|
|
20
20
|
import { CONSISTENCY_TYPES, CONSISTENCY_MESSAGES, LOG_PREFIX, REMOTES, STRING_LITERALS, toKebab, WU_STATUS, YAML_OPTIONS, } from './wu-constants.js';
|
|
21
21
|
import { todayISO } from './date-utils.js';
|
|
22
22
|
import { createGitForPath } from './git-adapter.js';
|
|
@@ -30,10 +30,11 @@ import { withMicroWorktree } from './micro-worktree.js';
|
|
|
30
30
|
*/
|
|
31
31
|
export async function checkWUConsistency(id, projectRoot = process.cwd()) {
|
|
32
32
|
const errors = [];
|
|
33
|
-
const
|
|
34
|
-
const
|
|
35
|
-
const
|
|
36
|
-
const
|
|
33
|
+
const paths = createWuPaths({ projectRoot });
|
|
34
|
+
const wuPath = path.join(projectRoot, paths.WU(id));
|
|
35
|
+
const stampPath = path.join(projectRoot, paths.STAMP(id));
|
|
36
|
+
const backlogPath = path.join(projectRoot, paths.BACKLOG());
|
|
37
|
+
const statusPath = path.join(projectRoot, paths.STATUS());
|
|
37
38
|
// Handle missing WU YAML gracefully
|
|
38
39
|
try {
|
|
39
40
|
await access(wuPath, constants.R_OK);
|
|
@@ -166,7 +167,8 @@ export async function checkWUConsistency(id, projectRoot = process.cwd()) {
|
|
|
166
167
|
* @returns {Promise<object>} Aggregated report with valid, errors, and checked count
|
|
167
168
|
*/
|
|
168
169
|
export async function checkAllWUConsistency(projectRoot = process.cwd()) {
|
|
169
|
-
const
|
|
170
|
+
const paths = createWuPaths({ projectRoot });
|
|
171
|
+
const wuDir = path.join(projectRoot, paths.WU_DIR());
|
|
170
172
|
try {
|
|
171
173
|
await access(wuDir, constants.R_OK);
|
|
172
174
|
}
|
|
@@ -195,7 +197,8 @@ export async function checkAllWUConsistency(projectRoot = process.cwd()) {
|
|
|
195
197
|
* @returns {Promise<object>} Result with valid, orphans list, and reports
|
|
196
198
|
*/
|
|
197
199
|
export async function checkLaneForOrphanDoneWU(lane, excludeId, projectRoot = process.cwd()) {
|
|
198
|
-
const
|
|
200
|
+
const paths = createWuPaths({ projectRoot });
|
|
201
|
+
const wuDir = path.join(projectRoot, paths.WU_DIR());
|
|
199
202
|
try {
|
|
200
203
|
await access(wuDir, constants.R_OK);
|
|
201
204
|
}
|
|
@@ -486,7 +489,8 @@ async function createStampInProject(id, title, projectRoot) {
|
|
|
486
489
|
* @returns {Promise<string[]>} List of files modified (relative paths)
|
|
487
490
|
*/
|
|
488
491
|
async function updateYamlToDoneInWorktree(id, worktreePath, projectRoot) {
|
|
489
|
-
const
|
|
492
|
+
const paths = createWuPaths({ projectRoot });
|
|
493
|
+
const wuRelPath = paths.WU(id);
|
|
490
494
|
const wuSrcPath = path.join(projectRoot, wuRelPath);
|
|
491
495
|
const wuDestPath = path.join(worktreePath, wuRelPath);
|
|
492
496
|
// Read current YAML from project root
|
|
@@ -522,7 +526,8 @@ async function updateYamlToDoneInWorktree(id, worktreePath, projectRoot) {
|
|
|
522
526
|
* @returns {Promise<void>}
|
|
523
527
|
*/
|
|
524
528
|
async function updateYamlToDone(id, projectRoot) {
|
|
525
|
-
const
|
|
529
|
+
const paths = createWuPaths({ projectRoot });
|
|
530
|
+
const wuPath = path.join(projectRoot, paths.WU(id));
|
|
526
531
|
// Read current YAML
|
|
527
532
|
const content = await readFile(wuPath, { encoding: 'utf-8' });
|
|
528
533
|
const wuDoc = parseYAML(content);
|
|
@@ -690,7 +695,8 @@ async function removeOrphanWorktree(id, lane, projectRoot) {
|
|
|
690
695
|
// Worktree doesn't exist, that's fine
|
|
691
696
|
}
|
|
692
697
|
// 🚨 SAFETY GUARD 3: Check stamp exists (not rollback state)
|
|
693
|
-
const
|
|
698
|
+
const paths = createWuPaths({ projectRoot });
|
|
699
|
+
const stampPath = path.join(projectRoot, paths.STAMP(id));
|
|
694
700
|
try {
|
|
695
701
|
await access(stampPath, constants.R_OK);
|
|
696
702
|
}
|
package/dist/wu-constants.d.ts
CHANGED
|
@@ -4,12 +4,12 @@
|
|
|
4
4
|
* Centralized constants for wu- scripts to ensure consistency and DRY compliance.
|
|
5
5
|
* Single source of truth for magic strings, section headings, and patterns.
|
|
6
6
|
*
|
|
7
|
-
* Part of WU-1214: Extract hardcoded strings to wu-constants.
|
|
7
|
+
* Part of WU-1214: Extract hardcoded strings to wu-constants.ts
|
|
8
8
|
* Part of WU-1240: Consolidated toKebab using change-case library
|
|
9
9
|
*
|
|
10
|
-
* @see {@link
|
|
11
|
-
* @see {@link
|
|
12
|
-
* @see {@link
|
|
10
|
+
* @see {@link packages/@lumenflow/cli/src/wu-done.ts} - Primary consumer
|
|
11
|
+
* @see {@link packages/@lumenflow/cli/src/wu-claim.ts} - Branch/worktree creation
|
|
12
|
+
* @see {@link packages/@lumenflow/cli/src/lib/wu-schema.ts} - PLACEHOLDER_SENTINEL (already centralized)
|
|
13
13
|
*/
|
|
14
14
|
/**
|
|
15
15
|
* Git branch names
|
|
@@ -70,7 +70,7 @@ export declare const WU_STATUS: {
|
|
|
70
70
|
/**
|
|
71
71
|
* WU status groups for state management (WU-1742)
|
|
72
72
|
*
|
|
73
|
-
* Used by state-bootstrap.
|
|
73
|
+
* Used by state-bootstrap.ts to categorize YAML statuses.
|
|
74
74
|
*/
|
|
75
75
|
export declare const WU_STATUS_GROUPS: {
|
|
76
76
|
/** Statuses representing unclaimed work (not tracked in state store) */
|
|
@@ -140,7 +140,7 @@ export declare const STATUS_SECTIONS: {
|
|
|
140
140
|
/**
|
|
141
141
|
* Regex patterns for WU operations
|
|
142
142
|
*
|
|
143
|
-
* Note: WU_ID pattern is also in wu-schema.
|
|
143
|
+
* Note: WU_ID pattern is also in wu-schema.ts for Zod validation
|
|
144
144
|
*/
|
|
145
145
|
export declare const PATTERNS: {
|
|
146
146
|
/** WU identifier format: WU-123 */
|
|
@@ -252,7 +252,7 @@ export declare const LOG_PREFIX: {
|
|
|
252
252
|
REPAIR: string;
|
|
253
253
|
CONSISTENCY: string;
|
|
254
254
|
PREFLIGHT: string;
|
|
255
|
-
|
|
255
|
+
INITIATIVE_PLAN: string;
|
|
256
256
|
};
|
|
257
257
|
/**
|
|
258
258
|
* Consistency check types (WU-1276)
|
|
@@ -457,7 +457,7 @@ export declare const YAML_OPTIONS: {
|
|
|
457
457
|
/**
|
|
458
458
|
* UI display constants
|
|
459
459
|
*
|
|
460
|
-
* WU-1281: Centralized from hardcoded values in wu-done.
|
|
460
|
+
* WU-1281: Centralized from hardcoded values in wu-done.ts
|
|
461
461
|
*/
|
|
462
462
|
export declare const UI: {
|
|
463
463
|
/** Width for error/info boxes in console output */
|
|
@@ -559,14 +559,14 @@ export declare const GIT: {
|
|
|
559
559
|
* P0 incident: 2025-12-10 server crash due to recursive fork bomb.
|
|
560
560
|
*
|
|
561
561
|
* @see tools/shims/git - The git shim that blocks destructive commands
|
|
562
|
-
* @see tools/lib/wu-helpers.
|
|
562
|
+
* @see tools/lib/wu-helpers.ts - Uses REAL_GIT to avoid recursion
|
|
563
563
|
*/
|
|
564
564
|
export declare const REAL_GIT = "/usr/bin/git";
|
|
565
565
|
/**
|
|
566
566
|
* Git command flags
|
|
567
567
|
*
|
|
568
568
|
* Centralized git flag constants to eliminate hardcoded strings.
|
|
569
|
-
* Used by git-adapter.
|
|
569
|
+
* Used by git-adapter.ts and other git operation utilities.
|
|
570
570
|
*/
|
|
571
571
|
export declare const GIT_FLAGS: {
|
|
572
572
|
/** Show abbreviated ref names (for branch name resolution) */
|
|
@@ -690,8 +690,8 @@ export declare const WU_TYPES: {
|
|
|
690
690
|
* Defines how a WU exposes its functionality to users.
|
|
691
691
|
* Used to ensure backend features have corresponding UI coverage.
|
|
692
692
|
*
|
|
693
|
-
* @see {@link
|
|
694
|
-
* @see {@link packages/linters/wu-schema-linter.
|
|
693
|
+
* @see {@link packages/@lumenflow/cli/src/lib/wu-schema.ts} - Schema validation
|
|
694
|
+
* @see {@link packages/linters/wu-schema-linter.ts} - Linter validation
|
|
695
695
|
*/
|
|
696
696
|
export declare const WU_EXPOSURE: {
|
|
697
697
|
/** User-facing UI changes (pages, components, widgets) */
|
|
@@ -759,7 +759,7 @@ export declare const EMOJI: {
|
|
|
759
759
|
* WU-1337: Centralized defaults for auto-repair in schema validation
|
|
760
760
|
* DRY principle: Single source of truth for optional field defaults
|
|
761
761
|
*
|
|
762
|
-
* Used by wu-schema.
|
|
762
|
+
* Used by wu-schema.ts Zod transformations to provide sensible defaults
|
|
763
763
|
* when agents omit optional fields, reducing validation errors.
|
|
764
764
|
*/
|
|
765
765
|
export declare const WU_DEFAULTS: {
|
|
@@ -801,7 +801,7 @@ export declare const WU_DEFAULTS: {
|
|
|
801
801
|
* WU-1068: Removed hardcoded @patientpath references. These patterns
|
|
802
802
|
* should be configured in .lumenflow.config.yaml per-project.
|
|
803
803
|
*
|
|
804
|
-
* @see {@link
|
|
804
|
+
* @see {@link packages/@lumenflow/cli/src/lib/lane-validator.ts} - Validation logic
|
|
805
805
|
*/
|
|
806
806
|
export declare const LANE_PATH_PATTERNS: {
|
|
807
807
|
/**
|
|
@@ -824,7 +824,7 @@ export declare const LANE_PATH_PATTERNS: {
|
|
|
824
824
|
/**
|
|
825
825
|
* Process detection constants for background process warning (WU-1381)
|
|
826
826
|
*
|
|
827
|
-
* Used by process-detector.
|
|
827
|
+
* Used by process-detector.ts to identify processes that may interfere
|
|
828
828
|
* with wu:done gates execution.
|
|
829
829
|
*/
|
|
830
830
|
export declare const PROCESS_DETECTION: {
|
|
@@ -918,7 +918,7 @@ export declare const SCRIPTS: {
|
|
|
918
918
|
/**
|
|
919
919
|
* Gate names for quality gates
|
|
920
920
|
*
|
|
921
|
-
* Centralized gate identifiers for gates.
|
|
921
|
+
* Centralized gate identifiers for gates.ts and telemetry.
|
|
922
922
|
*/
|
|
923
923
|
export declare const GATE_NAMES: {
|
|
924
924
|
/** WU-2252: Invariants check (runs first, non-bypassable) */
|
|
@@ -938,11 +938,13 @@ export declare const GATE_NAMES: {
|
|
|
938
938
|
INTEGRATION_TEST: string;
|
|
939
939
|
/** WU-2315: System map validation (warn-only until orphan docs are indexed) */
|
|
940
940
|
SYSTEM_MAP_VALIDATE: string;
|
|
941
|
+
/** WU-1191: Lane health check (overlap detection) */
|
|
942
|
+
LANE_HEALTH: string;
|
|
941
943
|
};
|
|
942
944
|
/**
|
|
943
945
|
* Gate command sentinels (special values for non-shell commands)
|
|
944
946
|
*
|
|
945
|
-
* These are not shell commands but trigger special handling in gates.
|
|
947
|
+
* These are not shell commands but trigger special handling in gates.ts.
|
|
946
948
|
*/
|
|
947
949
|
export declare const GATE_COMMANDS: {
|
|
948
950
|
/** WU-2252: Triggers invariants check */
|
|
@@ -958,17 +960,6 @@ export declare const GATE_COMMANDS: {
|
|
|
958
960
|
/** WU-2062: Triggers tiered test execution based on risk */
|
|
959
961
|
TIERED_TEST: string;
|
|
960
962
|
};
|
|
961
|
-
/**
|
|
962
|
-
* Tool paths for scripts
|
|
963
|
-
*
|
|
964
|
-
* Centralized paths to tool scripts.
|
|
965
|
-
*/
|
|
966
|
-
export declare const TOOL_PATHS: {
|
|
967
|
-
VALIDATE_BACKLOG_SYNC: string;
|
|
968
|
-
SUPABASE_DOCS_LINTER: string;
|
|
969
|
-
/** WU-2315: System map validator script */
|
|
970
|
-
SYSTEM_MAP_VALIDATE: string;
|
|
971
|
-
};
|
|
972
963
|
/**
|
|
973
964
|
* CLI mode flags
|
|
974
965
|
*
|
|
@@ -1064,6 +1055,22 @@ export declare const EXIT_CODES: {
|
|
|
1064
1055
|
/** Fatal or distinct failure exit code */
|
|
1065
1056
|
FAILURE: number;
|
|
1066
1057
|
};
|
|
1058
|
+
/**
|
|
1059
|
+
* Stream error codes
|
|
1060
|
+
*
|
|
1061
|
+
* WU-1233: Error codes for stream operations (stdout/stderr).
|
|
1062
|
+
* Used by StreamErrorHandler for graceful pipe closure handling.
|
|
1063
|
+
*/
|
|
1064
|
+
export declare const STREAM_ERRORS: {
|
|
1065
|
+
/**
|
|
1066
|
+
* EPIPE error code
|
|
1067
|
+
*
|
|
1068
|
+
* Occurs when writing to a pipe whose read end has been closed.
|
|
1069
|
+
* This is normal behavior when CLI output is piped through head/tail.
|
|
1070
|
+
* Unix convention: exit with code 0 on EPIPE (consumer got what it needed).
|
|
1071
|
+
*/
|
|
1072
|
+
readonly EPIPE: "EPIPE";
|
|
1073
|
+
};
|
|
1067
1074
|
/**
|
|
1068
1075
|
* ESLint command names
|
|
1069
1076
|
*
|
|
@@ -1186,10 +1193,6 @@ export declare const AUDIT_ARGS: {
|
|
|
1186
1193
|
* Centralized paths to validation scripts.
|
|
1187
1194
|
*/
|
|
1188
1195
|
export declare const SCRIPT_PATHS: {
|
|
1189
|
-
/** Gates runner */
|
|
1190
|
-
GATES: string;
|
|
1191
|
-
/** WU YAML validation */
|
|
1192
|
-
VALIDATE: string;
|
|
1193
1196
|
/** Prompt registry validation */
|
|
1194
1197
|
VALIDATE_PROMPT_REGISTRY: string;
|
|
1195
1198
|
};
|
|
@@ -1217,6 +1220,13 @@ export declare const ERROR_CODES: {
|
|
|
1217
1220
|
/** Timeout error code */
|
|
1218
1221
|
ETIMEDOUT: string;
|
|
1219
1222
|
};
|
|
1223
|
+
/**
|
|
1224
|
+
* WU-1174: Lock directory name constant
|
|
1225
|
+
*
|
|
1226
|
+
* Defined separately so it can be used both in LUMENFLOW_PATHS.LOCK_DIR
|
|
1227
|
+
* and for test isolation in cleanup-lock.ts/merge-lock.ts.
|
|
1228
|
+
*/
|
|
1229
|
+
export declare const LOCK_DIR_NAME = ".lumenflow-locks";
|
|
1220
1230
|
/**
|
|
1221
1231
|
* LumenFlow directory paths
|
|
1222
1232
|
*
|
|
@@ -1258,10 +1268,23 @@ export declare const LUMENFLOW_PATHS: {
|
|
|
1258
1268
|
SESSION_CURRENT: string;
|
|
1259
1269
|
/** WU events log */
|
|
1260
1270
|
WU_EVENTS: string;
|
|
1261
|
-
/** Lock files directory */
|
|
1271
|
+
/** Lock files directory (lane locks - persisted) */
|
|
1262
1272
|
LOCKS_DIR: string;
|
|
1263
1273
|
/** Force bypass audit log */
|
|
1264
1274
|
FORCE_BYPASSES: string;
|
|
1275
|
+
/**
|
|
1276
|
+
* WU-1174: Runtime lock directory for merge/cleanup locks
|
|
1277
|
+
*
|
|
1278
|
+
* These locks are transient and should NOT be created in the main checkout
|
|
1279
|
+
* because wu:done runs from main. Using os.tmpdir() ensures:
|
|
1280
|
+
* 1. Locks don't pollute the git working tree
|
|
1281
|
+
* 2. Locks work across processes on the same machine
|
|
1282
|
+
* 3. No "Working tree is not clean" errors if process crashes
|
|
1283
|
+
*
|
|
1284
|
+
* Note: Lane locks still use LOCKS_DIR (.lumenflow/locks) because they need
|
|
1285
|
+
* to persist across sessions and be visible to other agents.
|
|
1286
|
+
*/
|
|
1287
|
+
LOCK_DIR: string;
|
|
1265
1288
|
};
|
|
1266
1289
|
/**
|
|
1267
1290
|
* @deprecated Use LUMENFLOW_PATHS instead. Will be removed in v2.0.
|
|
@@ -1299,10 +1322,23 @@ export declare const BEACON_PATHS: {
|
|
|
1299
1322
|
SESSION_CURRENT: string;
|
|
1300
1323
|
/** WU events log */
|
|
1301
1324
|
WU_EVENTS: string;
|
|
1302
|
-
/** Lock files directory */
|
|
1325
|
+
/** Lock files directory (lane locks - persisted) */
|
|
1303
1326
|
LOCKS_DIR: string;
|
|
1304
1327
|
/** Force bypass audit log */
|
|
1305
1328
|
FORCE_BYPASSES: string;
|
|
1329
|
+
/**
|
|
1330
|
+
* WU-1174: Runtime lock directory for merge/cleanup locks
|
|
1331
|
+
*
|
|
1332
|
+
* These locks are transient and should NOT be created in the main checkout
|
|
1333
|
+
* because wu:done runs from main. Using os.tmpdir() ensures:
|
|
1334
|
+
* 1. Locks don't pollute the git working tree
|
|
1335
|
+
* 2. Locks work across processes on the same machine
|
|
1336
|
+
* 3. No "Working tree is not clean" errors if process crashes
|
|
1337
|
+
*
|
|
1338
|
+
* Note: Lane locks still use LOCKS_DIR (.lumenflow/locks) because they need
|
|
1339
|
+
* to persist across sessions and be visible to other agents.
|
|
1340
|
+
*/
|
|
1341
|
+
LOCK_DIR: string;
|
|
1306
1342
|
};
|
|
1307
1343
|
/**
|
|
1308
1344
|
* File extensions
|
|
@@ -1478,8 +1514,8 @@ export declare const PHI_CONFIG: {
|
|
|
1478
1514
|
* Constants for the readiness summary box displayed after wu:create and wu:edit.
|
|
1479
1515
|
* Provides visual feedback on whether WU is ready for wu:claim.
|
|
1480
1516
|
*
|
|
1481
|
-
* @see tools/wu-create.
|
|
1482
|
-
* @see tools/wu-edit.
|
|
1517
|
+
* @see tools/wu-create.ts - displayReadinessSummary()
|
|
1518
|
+
* @see tools/wu-edit.ts - displayReadinessSummary()
|
|
1483
1519
|
*/
|
|
1484
1520
|
export declare const READINESS_UI: {
|
|
1485
1521
|
/** Box width (inner content area) */
|
|
@@ -1665,6 +1701,7 @@ export declare const CONTEXT_VALIDATION: {
|
|
|
1665
1701
|
readonly COMMANDS: {
|
|
1666
1702
|
readonly WU_CREATE: "wu:create";
|
|
1667
1703
|
readonly WU_CLAIM: "wu:claim";
|
|
1704
|
+
readonly WU_PREP: "wu:prep";
|
|
1668
1705
|
readonly WU_DONE: "wu:done";
|
|
1669
1706
|
readonly WU_BLOCK: "wu:block";
|
|
1670
1707
|
readonly WU_UNBLOCK: "wu:unblock";
|