@lumenflow/core 2.10.0 → 2.11.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.
- package/dist/agent-patterns-registry.js +4 -2
- package/dist/arg-parser.js +5 -0
- package/dist/constants/linter-constants.d.ts +1 -1
- package/dist/constants/linter-constants.js +1 -1
- package/dist/docs-path-validator.js +3 -3
- package/dist/domain/context.schemas.d.ts +3 -3
- package/dist/domain/orchestration.constants.d.ts +1 -1
- package/dist/domain/orchestration.constants.js +1 -1
- package/dist/domain/orchestration.types.d.ts +2 -2
- package/dist/domain/validation.schemas.d.ts +4 -4
- package/dist/hardcoded-strings.js +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +3 -3
- package/dist/invariants/check-automated-tests.js +3 -1
- package/dist/lumenflow-config-schema.d.ts +5 -5
- package/dist/lumenflow-config-schema.js +5 -5
- package/dist/lumenflow-config.d.ts +1 -1
- package/dist/lumenflow-config.js +7 -7
- package/dist/micro-worktree.d.ts +2 -2
- package/dist/micro-worktree.js +112 -77
- package/dist/orchestration-rules.js +1 -1
- package/dist/prompt-linter.js +5 -5
- package/dist/spawn-escalation.d.ts +2 -2
- package/dist/spawn-escalation.js +7 -3
- package/dist/spawn-monitor.js +3 -1
- package/dist/state-doctor-core.d.ts +29 -1
- package/dist/state-doctor-core.js +142 -2
- package/dist/telemetry.js +3 -3
- package/dist/template-loader.js +6 -3
- package/dist/test-baseline.d.ts +2 -2
- package/dist/test-baseline.js +3 -2
- package/dist/wu-constants.d.ts +31 -57
- package/dist/wu-constants.js +32 -8
- package/dist/wu-create-validators.d.ts +7 -0
- package/dist/wu-create-validators.js +12 -2
- package/dist/wu-done-concurrent-merge.js +2 -2
- package/dist/wu-done-metadata.js +2 -2
- package/dist/wu-done-validation.js +2 -2
- package/dist/wu-done-worktree.js +6 -5
- package/dist/wu-events-cleanup.js +2 -5
- package/dist/wu-list.d.ts +92 -0
- package/dist/wu-list.js +177 -0
- package/dist/wu-paths.js +4 -4
- package/dist/wu-spawn-context.js +3 -2
- package/dist/wu-spawn-skills.js +8 -5
- package/dist/wu-spawn.js +4 -5
- package/package.json +2 -2
- package/dist/beacon-migration.d.ts +0 -56
- package/dist/beacon-migration.js +0 -101
package/dist/beacon-migration.js
DELETED
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @file beacon-migration.ts
|
|
3
|
-
* @description Migration utility for renaming .beacon directories to .lumenflow (WU-1075)
|
|
4
|
-
*
|
|
5
|
-
* This module provides a one-time migration function that renames the legacy
|
|
6
|
-
* .beacon directory to .lumenflow. It's safe to run multiple times - it will
|
|
7
|
-
* only migrate if .beacon exists and .lumenflow does not.
|
|
8
|
-
*
|
|
9
|
-
* @example
|
|
10
|
-
* ```typescript
|
|
11
|
-
* import { migrateBeaconToLumenflow } from '@lumenflow/core';
|
|
12
|
-
*
|
|
13
|
-
* // Run migration in project root
|
|
14
|
-
* const result = migrateBeaconToLumenflow();
|
|
15
|
-
* if (result.migrated) {
|
|
16
|
-
* console.log('Successfully migrated .beacon/ → .lumenflow/');
|
|
17
|
-
* }
|
|
18
|
-
* ```
|
|
19
|
-
*/
|
|
20
|
-
import * as fs from 'fs';
|
|
21
|
-
import * as path from 'path';
|
|
22
|
-
import { LUMENFLOW_PATHS } from './wu-constants.js';
|
|
23
|
-
/** Legacy directory name that was used before v1.5.0 */
|
|
24
|
-
const LEGACY_BEACON_DIR = '.beacon';
|
|
25
|
-
/**
|
|
26
|
-
* Migrate .beacon directory to .lumenflow
|
|
27
|
-
*
|
|
28
|
-
* This function safely renames the legacy .beacon directory to .lumenflow.
|
|
29
|
-
* It handles the following scenarios:
|
|
30
|
-
*
|
|
31
|
-
* - .beacon exists, .lumenflow does not → Migrate (rename)
|
|
32
|
-
* - .beacon does not exist, .lumenflow exists → Already migrated (no-op)
|
|
33
|
-
* - Neither exists → No legacy directory (no-op)
|
|
34
|
-
* - Both exist → Conflict, manual resolution needed
|
|
35
|
-
*
|
|
36
|
-
* @param {string} [baseDir=process.cwd()] - Base directory to check for migration
|
|
37
|
-
* @returns {MigrationResult} Result of the migration attempt
|
|
38
|
-
*/
|
|
39
|
-
export function migrateBeaconToLumenflow(baseDir = process.cwd()) {
|
|
40
|
-
const legacyPath = path.join(baseDir, LEGACY_BEACON_DIR);
|
|
41
|
-
const newPath = path.join(baseDir, LUMENFLOW_PATHS.BASE);
|
|
42
|
-
const legacyExists = fs.existsSync(legacyPath);
|
|
43
|
-
const newExists = fs.existsSync(newPath);
|
|
44
|
-
// Both exist - conflict
|
|
45
|
-
if (legacyExists && newExists) {
|
|
46
|
-
return {
|
|
47
|
-
migrated: false,
|
|
48
|
-
reason: 'both_exist',
|
|
49
|
-
fromPath: legacyPath,
|
|
50
|
-
toPath: newPath,
|
|
51
|
-
error: 'Both .beacon and .lumenflow directories exist. ' +
|
|
52
|
-
'Please manually resolve by removing or merging .beacon into .lumenflow.',
|
|
53
|
-
};
|
|
54
|
-
}
|
|
55
|
-
// Already migrated
|
|
56
|
-
if (!legacyExists && newExists) {
|
|
57
|
-
return {
|
|
58
|
-
migrated: false,
|
|
59
|
-
reason: 'already_migrated',
|
|
60
|
-
toPath: newPath,
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
// No legacy directory
|
|
64
|
-
if (!legacyExists && !newExists) {
|
|
65
|
-
return {
|
|
66
|
-
migrated: false,
|
|
67
|
-
reason: 'no_legacy_dir',
|
|
68
|
-
};
|
|
69
|
-
}
|
|
70
|
-
// Migrate: rename .beacon → .lumenflow
|
|
71
|
-
try {
|
|
72
|
-
fs.renameSync(legacyPath, newPath);
|
|
73
|
-
return {
|
|
74
|
-
migrated: true,
|
|
75
|
-
reason: 'migrated',
|
|
76
|
-
fromPath: legacyPath,
|
|
77
|
-
toPath: newPath,
|
|
78
|
-
};
|
|
79
|
-
}
|
|
80
|
-
catch (err) {
|
|
81
|
-
const error = err instanceof Error ? err.message : String(err);
|
|
82
|
-
return {
|
|
83
|
-
migrated: false,
|
|
84
|
-
reason: 'migrated',
|
|
85
|
-
fromPath: legacyPath,
|
|
86
|
-
toPath: newPath,
|
|
87
|
-
error: `Failed to rename: ${error}`,
|
|
88
|
-
};
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
/**
|
|
92
|
-
* Check if migration is needed without performing it
|
|
93
|
-
*
|
|
94
|
-
* @param {string} [baseDir=process.cwd()] - Base directory to check
|
|
95
|
-
* @returns {boolean} True if .beacon exists and .lumenflow does not
|
|
96
|
-
*/
|
|
97
|
-
export function needsMigration(baseDir = process.cwd()) {
|
|
98
|
-
const legacyPath = path.join(baseDir, LEGACY_BEACON_DIR);
|
|
99
|
-
const newPath = path.join(baseDir, LUMENFLOW_PATHS.BASE);
|
|
100
|
-
return fs.existsSync(legacyPath) && !fs.existsSync(newPath);
|
|
101
|
-
}
|