@lumenflow/core 2.15.1 → 2.16.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/adapters/filesystem-metrics.adapter.d.ts.map +1 -1
- package/dist/adapters/filesystem-metrics.adapter.js +17 -16
- package/dist/adapters/filesystem-metrics.adapter.js.map +1 -1
- package/dist/adapters/mock-dashboard-renderer.adapter.d.ts +86 -0
- package/dist/adapters/mock-dashboard-renderer.adapter.d.ts.map +1 -0
- package/dist/adapters/mock-dashboard-renderer.adapter.js +105 -0
- package/dist/adapters/mock-dashboard-renderer.adapter.js.map +1 -0
- package/dist/adapters/terminal-renderer.adapter.d.ts.map +1 -1
- package/dist/adapters/terminal-renderer.adapter.js +0 -2
- package/dist/adapters/terminal-renderer.adapter.js.map +1 -1
- package/dist/arg-parser.d.ts.map +1 -1
- package/dist/arg-parser.js +4 -3
- package/dist/arg-parser.js.map +1 -1
- package/dist/backlog-editor.js +1 -1
- package/dist/backlog-editor.js.map +1 -1
- package/dist/backlog-generator.d.ts.map +1 -1
- package/dist/backlog-generator.js +48 -21
- package/dist/backlog-generator.js.map +1 -1
- package/dist/backlog-parser.d.ts.map +1 -1
- package/dist/backlog-parser.js +0 -1
- package/dist/backlog-parser.js.map +1 -1
- package/dist/backlog-sync-validator.d.ts.map +1 -1
- package/dist/backlog-sync-validator.js +5 -3
- package/dist/backlog-sync-validator.js.map +1 -1
- package/dist/branch-check.d.ts.map +1 -1
- package/dist/branch-check.js +1 -0
- package/dist/branch-check.js.map +1 -1
- package/dist/cli/is-agent-branch.d.ts +2 -1
- package/dist/cli/is-agent-branch.d.ts.map +1 -1
- package/dist/cli/is-agent-branch.js +8 -1
- package/dist/cli/is-agent-branch.js.map +1 -1
- package/dist/code-path-validator.d.ts.map +1 -1
- package/dist/code-path-validator.js +2 -1
- package/dist/code-path-validator.js.map +1 -1
- package/dist/code-paths-overlap.js +1 -1
- package/dist/code-paths-overlap.js.map +1 -1
- package/dist/commands-logger.js +1 -1
- package/dist/commands-logger.js.map +1 -1
- package/dist/context/location-resolver.js +1 -1
- package/dist/context/location-resolver.js.map +1 -1
- package/dist/context-validation-integration.d.ts +1 -1
- package/dist/context-validation-integration.d.ts.map +1 -1
- package/dist/context-validation-integration.js +3 -2
- package/dist/context-validation-integration.js.map +1 -1
- package/dist/core/tool-runner.js +1 -1
- package/dist/core/tool-runner.js.map +1 -1
- package/dist/core/tool.schemas.d.ts +3 -3
- package/dist/core/tool.schemas.d.ts.map +1 -1
- package/dist/core/tool.schemas.js +1 -1
- package/dist/core/tool.schemas.js.map +1 -1
- package/dist/dependency-graph.js +1 -1
- package/dist/dependency-graph.js.map +1 -1
- package/dist/dependency-guard.js +1 -1
- package/dist/dependency-guard.js.map +1 -1
- package/dist/domain/context.schemas.d.ts +3 -3
- package/dist/domain/orchestration.constants.d.ts.map +1 -1
- package/dist/domain/orchestration.constants.js +7 -6
- package/dist/domain/orchestration.constants.js.map +1 -1
- package/dist/domain/validation.schemas.d.ts +1 -1
- package/dist/error-handler.d.ts +26 -2
- package/dist/error-handler.d.ts.map +1 -1
- package/dist/error-handler.js +36 -3
- package/dist/error-handler.js.map +1 -1
- package/dist/force-bypass-audit.d.ts.map +1 -1
- package/dist/force-bypass-audit.js +2 -0
- package/dist/force-bypass-audit.js.map +1 -1
- package/dist/git-context-extractor.d.ts.map +1 -1
- package/dist/git-context-extractor.js +1 -0
- package/dist/git-context-extractor.js.map +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/invariants/check-automated-tests.js +2 -2
- package/dist/invariants/check-automated-tests.js.map +1 -1
- package/dist/invariants-runner.d.ts.map +1 -1
- package/dist/invariants-runner.js +3 -0
- package/dist/invariants-runner.js.map +1 -1
- package/dist/lumenflow-config-schema.d.ts +3 -0
- package/dist/lumenflow-config-schema.d.ts.map +1 -1
- package/dist/lumenflow-config-schema.js +14 -0
- package/dist/lumenflow-config-schema.js.map +1 -1
- package/dist/migration-deployer.d.ts +1 -1
- package/dist/migration-deployer.d.ts.map +1 -1
- package/dist/migration-deployer.js +1 -1
- package/dist/migration-deployer.js.map +1 -1
- package/dist/patrol-loop.d.ts.map +1 -1
- package/dist/patrol-loop.js +9 -1
- package/dist/patrol-loop.js.map +1 -1
- package/dist/piped-command-detector.d.ts.map +1 -1
- package/dist/piped-command-detector.js +1 -0
- package/dist/piped-command-detector.js.map +1 -1
- package/dist/ports/core-tools.ports.d.ts +32 -17
- package/dist/ports/core-tools.ports.d.ts.map +1 -1
- package/dist/ports/wu-helpers.ports.d.ts +2 -0
- package/dist/ports/wu-helpers.ports.d.ts.map +1 -1
- package/dist/prompt-linter.d.ts +5 -0
- package/dist/prompt-linter.d.ts.map +1 -1
- package/dist/prompt-linter.js +8 -2
- package/dist/prompt-linter.js.map +1 -1
- package/dist/prompt-monitor.d.ts +5 -1
- package/dist/prompt-monitor.d.ts.map +1 -1
- package/dist/prompt-monitor.js +16 -8
- package/dist/prompt-monitor.js.map +1 -1
- package/dist/rebase-artifact-cleanup.d.ts.map +1 -1
- package/dist/rebase-artifact-cleanup.js +1 -1
- package/dist/rebase-artifact-cleanup.js.map +1 -1
- package/dist/rollback-utils.d.ts.map +1 -1
- package/dist/rollback-utils.js +0 -1
- package/dist/rollback-utils.js.map +1 -1
- package/dist/schemas/initiative-arg-validators.d.ts +1 -1
- package/dist/schemas/initiative-schemas.d.ts +3 -3
- package/dist/spawn-recovery.js +1 -1
- package/dist/spawn-recovery.js.map +1 -1
- package/dist/stamp-status-validator.d.ts.map +1 -1
- package/dist/stamp-status-validator.js +2 -1
- package/dist/stamp-status-validator.js.map +1 -1
- package/dist/stamp-tracking.d.ts +12 -0
- package/dist/stamp-tracking.d.ts.map +1 -0
- package/dist/stamp-tracking.js +41 -0
- package/dist/stamp-tracking.js.map +1 -0
- package/dist/stamp-utils.d.ts.map +1 -1
- package/dist/stamp-utils.js +0 -1
- package/dist/stamp-utils.js.map +1 -1
- package/dist/state-doctor-core.d.ts.map +1 -1
- package/dist/state-doctor-core.js +10 -9
- package/dist/state-doctor-core.js.map +1 -1
- package/dist/system-map-validator.d.ts.map +1 -1
- package/dist/system-map-validator.js +7 -3
- package/dist/system-map-validator.js.map +1 -1
- package/dist/telemetry.d.ts.map +1 -1
- package/dist/telemetry.js +3 -1
- package/dist/telemetry.js.map +1 -1
- package/dist/template-loader.d.ts.map +1 -1
- package/dist/template-loader.js +1 -0
- package/dist/template-loader.js.map +1 -1
- package/dist/token-counter.js +2 -6
- package/dist/token-counter.js.map +1 -1
- package/dist/usecases/compute-context.usecase.d.ts.map +1 -1
- package/dist/usecases/compute-context.usecase.js +2 -1
- package/dist/usecases/compute-context.usecase.js.map +1 -1
- package/dist/validators/wu-tasks.js +2 -2
- package/dist/validators/wu-tasks.js.map +1 -1
- package/dist/wu-backlog-updater.d.ts +1 -1
- package/dist/wu-backlog-updater.d.ts.map +1 -1
- package/dist/wu-backlog-updater.js +1 -1
- package/dist/wu-backlog-updater.js.map +1 -1
- package/dist/wu-claim-resume.d.ts.map +1 -1
- package/dist/wu-claim-resume.js +0 -1
- package/dist/wu-claim-resume.js.map +1 -1
- package/dist/wu-cli-constants.d.ts +426 -0
- package/dist/wu-cli-constants.d.ts.map +1 -0
- package/dist/wu-cli-constants.js +429 -0
- package/dist/wu-cli-constants.js.map +1 -0
- package/dist/wu-consistency-checker.d.ts +5 -1
- package/dist/wu-consistency-checker.d.ts.map +1 -1
- package/dist/wu-consistency-checker.js +133 -25
- package/dist/wu-consistency-checker.js.map +1 -1
- package/dist/wu-constants.d.ts +21 -1834
- package/dist/wu-constants.d.ts.map +1 -1
- package/dist/wu-constants.js +28 -1951
- package/dist/wu-constants.js.map +1 -1
- package/dist/wu-context-constants.d.ts +253 -0
- package/dist/wu-context-constants.d.ts.map +1 -0
- package/dist/wu-context-constants.js +250 -0
- package/dist/wu-context-constants.js.map +1 -0
- package/dist/wu-domain-constants.d.ts +305 -0
- package/dist/wu-domain-constants.d.ts.map +1 -0
- package/dist/wu-domain-constants.js +401 -0
- package/dist/wu-domain-constants.js.map +1 -0
- package/dist/wu-done-branch-only.d.ts.map +1 -1
- package/dist/wu-done-branch-only.js +2 -2
- package/dist/wu-done-branch-only.js.map +1 -1
- package/dist/wu-done-concurrent-merge.d.ts.map +1 -1
- package/dist/wu-done-concurrent-merge.js +12 -12
- package/dist/wu-done-concurrent-merge.js.map +1 -1
- package/dist/wu-done-docs-generate.d.ts.map +1 -1
- package/dist/wu-done-docs-generate.js +1 -0
- package/dist/wu-done-docs-generate.js.map +1 -1
- package/dist/wu-done-initiative-sync.d.ts +13 -0
- package/dist/wu-done-initiative-sync.d.ts.map +1 -0
- package/dist/wu-done-initiative-sync.js +218 -0
- package/dist/wu-done-initiative-sync.js.map +1 -0
- package/dist/wu-done-inputs.d.ts.map +1 -1
- package/dist/wu-done-inputs.js +2 -2
- package/dist/wu-done-inputs.js.map +1 -1
- package/dist/wu-done-messages.d.ts +1 -1
- package/dist/wu-done-messages.d.ts.map +1 -1
- package/dist/wu-done-messages.js +2 -2
- package/dist/wu-done-messages.js.map +1 -1
- package/dist/wu-done-metadata.d.ts +11 -2
- package/dist/wu-done-metadata.d.ts.map +1 -1
- package/dist/wu-done-metadata.js +41 -11
- package/dist/wu-done-metadata.js.map +1 -1
- package/dist/wu-done-pr.d.ts.map +1 -1
- package/dist/wu-done-pr.js +2 -1
- package/dist/wu-done-pr.js.map +1 -1
- package/dist/wu-done-validation.d.ts +3 -1
- package/dist/wu-done-validation.d.ts.map +1 -1
- package/dist/wu-done-validation.js +81 -13
- package/dist/wu-done-validation.js.map +1 -1
- package/dist/wu-done-worktree.d.ts +15 -0
- package/dist/wu-done-worktree.d.ts.map +1 -1
- package/dist/wu-done-worktree.js +97 -120
- package/dist/wu-done-worktree.js.map +1 -1
- package/dist/wu-events-cleanup.d.ts.map +1 -1
- package/dist/wu-events-cleanup.js +3 -2
- package/dist/wu-events-cleanup.js.map +1 -1
- package/dist/wu-git-constants.d.ts +172 -0
- package/dist/wu-git-constants.d.ts.map +1 -0
- package/dist/wu-git-constants.js +172 -0
- package/dist/wu-git-constants.js.map +1 -0
- package/dist/wu-helpers.js +1 -1
- package/dist/wu-helpers.js.map +1 -1
- package/dist/wu-lint.d.ts.map +1 -1
- package/dist/wu-lint.js +8 -1
- package/dist/wu-lint.js.map +1 -1
- package/dist/wu-list.d.ts.map +1 -1
- package/dist/wu-list.js +3 -2
- package/dist/wu-list.js.map +1 -1
- package/dist/wu-paths-constants.d.ts +311 -0
- package/dist/wu-paths-constants.d.ts.map +1 -0
- package/dist/wu-paths-constants.js +308 -0
- package/dist/wu-paths-constants.js.map +1 -0
- package/dist/wu-paths.d.ts +12 -0
- package/dist/wu-paths.d.ts.map +1 -1
- package/dist/wu-paths.js +7 -1
- package/dist/wu-paths.js.map +1 -1
- package/dist/wu-recovery.d.ts.map +1 -1
- package/dist/wu-recovery.js +2 -2
- package/dist/wu-recovery.js.map +1 -1
- package/dist/wu-repair-core.d.ts +1 -0
- package/dist/wu-repair-core.d.ts.map +1 -1
- package/dist/wu-repair-core.js +7 -3
- package/dist/wu-repair-core.js.map +1 -1
- package/dist/wu-schema.d.ts.map +1 -1
- package/dist/wu-schema.js +2 -2
- package/dist/wu-schema.js.map +1 -1
- package/dist/wu-spawn-helpers.d.ts.map +1 -1
- package/dist/wu-spawn-helpers.js +3 -2
- package/dist/wu-spawn-helpers.js.map +1 -1
- package/dist/wu-spawn.js +5 -5
- package/dist/wu-spawn.js.map +1 -1
- package/dist/wu-state-store.d.ts.map +1 -1
- package/dist/wu-state-store.js +20 -19
- package/dist/wu-state-store.js.map +1 -1
- package/dist/wu-status-transition.d.ts.map +1 -1
- package/dist/wu-status-transition.js +3 -26
- package/dist/wu-status-transition.js.map +1 -1
- package/dist/wu-status-updater.js +1 -1
- package/dist/wu-status-updater.js.map +1 -1
- package/dist/wu-statuses.d.ts +134 -0
- package/dist/wu-statuses.d.ts.map +1 -0
- package/dist/wu-statuses.js +149 -0
- package/dist/wu-statuses.js.map +1 -0
- package/dist/wu-transaction-collectors.d.ts.map +1 -1
- package/dist/wu-transaction-collectors.js +6 -3
- package/dist/wu-transaction-collectors.js.map +1 -1
- package/dist/wu-transaction.d.ts.map +1 -1
- package/dist/wu-transaction.js +1 -1
- package/dist/wu-transaction.js.map +1 -1
- package/dist/wu-ui-constants.d.ts +235 -0
- package/dist/wu-ui-constants.d.ts.map +1 -0
- package/dist/wu-ui-constants.js +235 -0
- package/dist/wu-ui-constants.js.map +1 -0
- package/dist/wu-validator.d.ts.map +1 -1
- package/dist/wu-validator.js +2 -1
- package/dist/wu-validator.js.map +1 -1
- package/dist/wu-yaml.js +1 -1
- package/dist/wu-yaml.js.map +1 -1
- package/package.json +80 -4
|
@@ -0,0 +1,311 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Path and File System Constants
|
|
3
|
+
*
|
|
4
|
+
* WU-1549: Extracted from wu-constants.ts for domain-specific modularity.
|
|
5
|
+
* Contains LumenFlow directory paths, file extensions, config files, filesystem
|
|
6
|
+
* constants, build artifacts, PHI configuration, and path manipulation helpers.
|
|
7
|
+
*
|
|
8
|
+
* @module wu-paths-constants
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* WU-1548: Shared Node.js filesystem error interface.
|
|
12
|
+
*
|
|
13
|
+
* Consolidates duplicated NodeFsError definitions that existed across
|
|
14
|
+
* memory-store.ts, mem-triage-core.ts, mem-signal-core.ts, mem-ready-core.ts,
|
|
15
|
+
* signal-cleanup-core.ts, and wu-events-cleanup.ts.
|
|
16
|
+
*
|
|
17
|
+
* Use this interface when catching fs errors and checking the `code` property
|
|
18
|
+
* (e.g., 'ENOENT', 'EACCES', 'EPERM').
|
|
19
|
+
*/
|
|
20
|
+
export interface NodeFsError extends Error {
|
|
21
|
+
code?: string;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* File system constants
|
|
25
|
+
*
|
|
26
|
+
* WU-923: Centralized to eliminate hardcoded strings
|
|
27
|
+
*/
|
|
28
|
+
export declare const FILE_SYSTEM: {
|
|
29
|
+
/** Standard file encoding */
|
|
30
|
+
ENCODING: string;
|
|
31
|
+
/** UTF-8 encoding (alias for compatibility) */
|
|
32
|
+
UTF8: string;
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* Configuration file paths
|
|
36
|
+
*
|
|
37
|
+
* WU-923: Centralized config file names
|
|
38
|
+
*/
|
|
39
|
+
export declare const CONFIG_FILES: {
|
|
40
|
+
/** LumenFlow main config */
|
|
41
|
+
LUMENFLOW_CONFIG: string;
|
|
42
|
+
/** Lane inference taxonomy */
|
|
43
|
+
LANE_INFERENCE: string;
|
|
44
|
+
};
|
|
45
|
+
/**
|
|
46
|
+
* Directory paths within the monorepo
|
|
47
|
+
*
|
|
48
|
+
* Centralized directory path strings.
|
|
49
|
+
*/
|
|
50
|
+
export declare const DIRECTORIES: {
|
|
51
|
+
APPS_WEB: string;
|
|
52
|
+
WORKTREES: string;
|
|
53
|
+
AI: string;
|
|
54
|
+
CLAUDE: string;
|
|
55
|
+
CLAUDE_HOOKS: string;
|
|
56
|
+
DOCS: string;
|
|
57
|
+
PACKAGES: string;
|
|
58
|
+
TOOLS: string;
|
|
59
|
+
MEMORY_BANK: string;
|
|
60
|
+
WU_DIR: string;
|
|
61
|
+
INITIATIVES_DIR: string;
|
|
62
|
+
BACKLOG_PATH: string;
|
|
63
|
+
STATUS_PATH: string;
|
|
64
|
+
};
|
|
65
|
+
/**
|
|
66
|
+
* Build artifact cleanup globs
|
|
67
|
+
*
|
|
68
|
+
* Centralized glob patterns for worktree artifact cleanup.
|
|
69
|
+
*/
|
|
70
|
+
export declare const BUILD_ARTIFACT_GLOBS: {
|
|
71
|
+
/** Common dist directories inside worktrees */
|
|
72
|
+
DIST_DIRS: string[];
|
|
73
|
+
/** TypeScript build info files */
|
|
74
|
+
TSBUILDINFO_FILES: string[];
|
|
75
|
+
};
|
|
76
|
+
/**
|
|
77
|
+
* Build artifact cleanup ignore patterns
|
|
78
|
+
*
|
|
79
|
+
* Centralized ignore globs for artifact cleanup.
|
|
80
|
+
*/
|
|
81
|
+
export declare const BUILD_ARTIFACT_IGNORES: string[];
|
|
82
|
+
/**
|
|
83
|
+
* Script file paths
|
|
84
|
+
*
|
|
85
|
+
* Centralized paths to validation scripts.
|
|
86
|
+
*/
|
|
87
|
+
export declare const SCRIPT_PATHS: {
|
|
88
|
+
/** Prompt registry validation */
|
|
89
|
+
VALIDATE_PROMPT_REGISTRY: string;
|
|
90
|
+
};
|
|
91
|
+
/**
|
|
92
|
+
* File extensions
|
|
93
|
+
*
|
|
94
|
+
* Centralized file extension strings to avoid magic strings.
|
|
95
|
+
*/
|
|
96
|
+
export declare const FILE_EXTENSIONS: {
|
|
97
|
+
/** Newline-delimited JSON format */
|
|
98
|
+
NDJSON: string;
|
|
99
|
+
/** Markdown format */
|
|
100
|
+
MARKDOWN: string;
|
|
101
|
+
/** YAML format */
|
|
102
|
+
YAML: string;
|
|
103
|
+
/** Log format */
|
|
104
|
+
LOG: string;
|
|
105
|
+
/** Stamp files (completion markers) */
|
|
106
|
+
STAMP: string;
|
|
107
|
+
};
|
|
108
|
+
/**
|
|
109
|
+
* Path patterns for WU-related files
|
|
110
|
+
*/
|
|
111
|
+
export declare const PATH_PATTERNS: {
|
|
112
|
+
/** Matches WU YAML paths in both legacy and current locations */
|
|
113
|
+
WU_YAML: RegExp;
|
|
114
|
+
/** Matches stamp file paths */
|
|
115
|
+
STAMP: RegExp;
|
|
116
|
+
};
|
|
117
|
+
/**
|
|
118
|
+
* Path-related constants
|
|
119
|
+
*
|
|
120
|
+
* WU-1062: Centralized path literals for lumenflow-home and spec-branch operations.
|
|
121
|
+
*/
|
|
122
|
+
export declare const PATH_LITERALS: {
|
|
123
|
+
/** Tilde prefix for home directory expansion (e.g., ~/path) */
|
|
124
|
+
TILDE_PREFIX: string;
|
|
125
|
+
/** Tilde character for home directory */
|
|
126
|
+
TILDE: string;
|
|
127
|
+
/** Plan file suffix for WU plans */
|
|
128
|
+
PLAN_FILE_SUFFIX: string;
|
|
129
|
+
/** Trailing slash regex pattern */
|
|
130
|
+
TRAILING_SLASH_REGEX: RegExp;
|
|
131
|
+
/** .lumenflow path prefix for internal path detection (WU-1430) */
|
|
132
|
+
LUMENFLOW_PREFIX: string;
|
|
133
|
+
/** Current directory prefix for repo-internal paths (WU-1430) */
|
|
134
|
+
CURRENT_DIR_PREFIX: string;
|
|
135
|
+
};
|
|
136
|
+
/**
|
|
137
|
+
* Slice lengths for path operations
|
|
138
|
+
*
|
|
139
|
+
* WU-1062: Magic numbers extracted for path manipulation.
|
|
140
|
+
*/
|
|
141
|
+
export declare const PATH_SLICE_LENGTHS: {
|
|
142
|
+
/** Length of '~/' prefix for tilde expansion */
|
|
143
|
+
TILDE_PREFIX_LENGTH: number;
|
|
144
|
+
/** Length of '/' for leading slash removal */
|
|
145
|
+
LEADING_SLASH_LENGTH: number;
|
|
146
|
+
};
|
|
147
|
+
/**
|
|
148
|
+
* WU-1174: Lock directory name constant
|
|
149
|
+
*
|
|
150
|
+
* Defined separately so it can be used both in LUMENFLOW_PATHS.LOCK_DIR
|
|
151
|
+
* and for test isolation in cleanup-lock.ts/merge-lock.ts.
|
|
152
|
+
*/
|
|
153
|
+
export declare const LOCK_DIR_NAME = ".lumenflow-locks";
|
|
154
|
+
/**
|
|
155
|
+
* LumenFlow directory paths
|
|
156
|
+
*
|
|
157
|
+
* Centralized paths for .lumenflow directory structure to eliminate hardcoded strings.
|
|
158
|
+
* Used by telemetry, agent-session, agent-incidents, memory, and commands-logger modules.
|
|
159
|
+
*/
|
|
160
|
+
export declare const LUMENFLOW_PATHS: {
|
|
161
|
+
/** Base directory for all LumenFlow runtime data */
|
|
162
|
+
BASE: string;
|
|
163
|
+
/** WU state store directory */
|
|
164
|
+
STATE_DIR: string;
|
|
165
|
+
/** Stamp directory (WU completion markers) */
|
|
166
|
+
STAMPS_DIR: string;
|
|
167
|
+
/** Archive directory for old WU events (WU-1430) */
|
|
168
|
+
ARCHIVE_DIR: string;
|
|
169
|
+
/** Merge lock file (runtime coordination, WU-1747) */
|
|
170
|
+
MERGE_LOCK: string;
|
|
171
|
+
/** Base telemetry directory */
|
|
172
|
+
TELEMETRY: string;
|
|
173
|
+
/** Flow log file (WU flow events) */
|
|
174
|
+
FLOW_LOG: string;
|
|
175
|
+
/** Agent sessions directory */
|
|
176
|
+
SESSIONS: string;
|
|
177
|
+
/** Agent incidents directory */
|
|
178
|
+
INCIDENTS: string;
|
|
179
|
+
/** Git commands log file */
|
|
180
|
+
COMMANDS_LOG: string;
|
|
181
|
+
/** Memory layer directory */
|
|
182
|
+
MEMORY_DIR: string;
|
|
183
|
+
/** Memory layer JSONL file */
|
|
184
|
+
MEMORY_JSONL: string;
|
|
185
|
+
/** WU-1539: Memory signals JSONL file */
|
|
186
|
+
MEMORY_SIGNALS: string;
|
|
187
|
+
/** Audit log for tool calls */
|
|
188
|
+
AUDIT_LOG: string;
|
|
189
|
+
/** Feedback drafts directory */
|
|
190
|
+
FEEDBACK_DRAFTS: string;
|
|
191
|
+
/** Feedback index file */
|
|
192
|
+
FEEDBACK_INDEX: string;
|
|
193
|
+
/** Current session file */
|
|
194
|
+
SESSION_CURRENT: string;
|
|
195
|
+
/** WU events log */
|
|
196
|
+
WU_EVENTS: string;
|
|
197
|
+
/** Lock files directory (lane locks - persisted) */
|
|
198
|
+
LOCKS_DIR: string;
|
|
199
|
+
/** Force bypass audit log */
|
|
200
|
+
FORCE_BYPASSES: string;
|
|
201
|
+
/** WU-1539: Skip-gates audit log */
|
|
202
|
+
SKIP_GATES_AUDIT: string;
|
|
203
|
+
/** WU-1539: Skip-COS-gates audit log */
|
|
204
|
+
SKIP_COS_GATES_AUDIT: string;
|
|
205
|
+
/** Test baseline file for ratchet pattern (WU-1430) */
|
|
206
|
+
TEST_BASELINE: string;
|
|
207
|
+
/** Templates directory (WU-1430) */
|
|
208
|
+
TEMPLATES_DIR: string;
|
|
209
|
+
/** Spawn prompt templates (WU-1430) */
|
|
210
|
+
SPAWN_PROMPT_DIR: string;
|
|
211
|
+
/** Template manifest file (WU-1430) */
|
|
212
|
+
TEMPLATE_MANIFEST: string;
|
|
213
|
+
/** Skills directory for agent skills (WU-1430) */
|
|
214
|
+
SKILLS_DIR: string;
|
|
215
|
+
/** Agents directory for agent definitions (WU-1430) */
|
|
216
|
+
AGENTS_DIR: string;
|
|
217
|
+
/** Methodology log for spawn telemetry (WU-1430) */
|
|
218
|
+
METHODOLOGY_LOG: string;
|
|
219
|
+
/** Prompt metrics cache (WU-1430) */
|
|
220
|
+
PROMPT_METRICS: string;
|
|
221
|
+
/** Prompt lint results (WU-1430) */
|
|
222
|
+
PROMPT_LINT: string;
|
|
223
|
+
/** Recovery markers directory (WU-1430) */
|
|
224
|
+
RECOVERY_DIR: string;
|
|
225
|
+
/** Checkpoints directory (WU-1430) */
|
|
226
|
+
CHECKPOINTS_DIR: string;
|
|
227
|
+
/** WU-1471: Hook counters directory for auto-checkpoint interval tracking */
|
|
228
|
+
HOOK_COUNTERS_DIR: string;
|
|
229
|
+
/** Cache directory under user home (WU-1430) */
|
|
230
|
+
HOME_CACHE: string;
|
|
231
|
+
/**
|
|
232
|
+
* WU-1174: Runtime lock directory for merge/cleanup locks
|
|
233
|
+
*
|
|
234
|
+
* These locks are transient and should NOT be created in the main checkout
|
|
235
|
+
* because wu:done runs from main. Using os.tmpdir() ensures:
|
|
236
|
+
* 1. Locks don't pollute the git working tree
|
|
237
|
+
* 2. Locks work across processes on the same machine
|
|
238
|
+
* 3. No "Working tree is not clean" errors if process crashes
|
|
239
|
+
*
|
|
240
|
+
* Note: Lane locks still use LOCKS_DIR (.lumenflow/locks) because they need
|
|
241
|
+
* to persist across sessions and be visible to other agents.
|
|
242
|
+
*/
|
|
243
|
+
LOCK_DIR: string;
|
|
244
|
+
};
|
|
245
|
+
/**
|
|
246
|
+
* File tool constants (WU-1403)
|
|
247
|
+
*
|
|
248
|
+
* Centralized strings for file:read, file:write, file:edit tools.
|
|
249
|
+
* Prevents duplicate string literals and hardcoded magic values.
|
|
250
|
+
*/
|
|
251
|
+
export declare const FILE_TOOLS: {
|
|
252
|
+
/** Tool name prefixes */
|
|
253
|
+
NAMES: {
|
|
254
|
+
READ: string;
|
|
255
|
+
WRITE: string;
|
|
256
|
+
EDIT: string;
|
|
257
|
+
DELETE: string;
|
|
258
|
+
};
|
|
259
|
+
/** Tool domain */
|
|
260
|
+
DOMAIN: string;
|
|
261
|
+
/** Permission levels */
|
|
262
|
+
PERMISSIONS: {
|
|
263
|
+
READ: string;
|
|
264
|
+
WRITE: string;
|
|
265
|
+
};
|
|
266
|
+
/** Worktree instruction templates (WU-1403: provides reusable instruction strings) */
|
|
267
|
+
WORKTREE_INSTRUCTIONS: {
|
|
268
|
+
CLAIM_COMMAND: string;
|
|
269
|
+
CD_COMMAND: string;
|
|
270
|
+
DOC_REFERENCE: string;
|
|
271
|
+
};
|
|
272
|
+
};
|
|
273
|
+
/**
|
|
274
|
+
* PHI (Protected Health Information) error codes (WU-1404)
|
|
275
|
+
*
|
|
276
|
+
* Error codes for PHI detection in file tools.
|
|
277
|
+
* Used by file:write and file:edit to block PHI leakage.
|
|
278
|
+
*
|
|
279
|
+
* WU-1068: PHI scanning is healthcare-specific functionality.
|
|
280
|
+
* Enable via PHI_CONFIG.ENABLED flag or .lumenflow.config.yaml phi.enabled: true
|
|
281
|
+
*/
|
|
282
|
+
export declare const PHI_ERRORS: {
|
|
283
|
+
/** PHI detected in content - write blocked */
|
|
284
|
+
PHI_DETECTED: string;
|
|
285
|
+
/** PHI override requested - audit logged */
|
|
286
|
+
PHI_OVERRIDE_ALLOWED: string;
|
|
287
|
+
};
|
|
288
|
+
/**
|
|
289
|
+
* PHI scanning configuration (WU-1068)
|
|
290
|
+
*
|
|
291
|
+
* Controls whether PHI (Protected Health Information) scanning is enabled.
|
|
292
|
+
* This is healthcare-specific functionality (NHS numbers, UK postcodes)
|
|
293
|
+
* that should only be enabled for healthcare projects.
|
|
294
|
+
*
|
|
295
|
+
* Projects can enable via:
|
|
296
|
+
* 1. Setting PHI_CONFIG.ENABLED = true in code
|
|
297
|
+
* 2. Setting LUMENFLOW_PHI_ENABLED=1 environment variable
|
|
298
|
+
* 3. Adding phi.enabled: true to .lumenflow.config.yaml
|
|
299
|
+
*/
|
|
300
|
+
export declare const PHI_CONFIG: {
|
|
301
|
+
/**
|
|
302
|
+
* Whether PHI scanning is enabled
|
|
303
|
+
* Default: false - projects must explicitly opt-in
|
|
304
|
+
*/
|
|
305
|
+
ENABLED: boolean;
|
|
306
|
+
/**
|
|
307
|
+
* Whether to block on PHI detection (true) or just warn (false)
|
|
308
|
+
*/
|
|
309
|
+
BLOCKING: boolean;
|
|
310
|
+
};
|
|
311
|
+
//# sourceMappingURL=wu-paths-constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wu-paths-constants.d.ts","sourceRoot":"","sources":["../src/wu-paths-constants.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAKH;;;;;;;;;GASG;AACH,MAAM,WAAW,WAAY,SAAQ,KAAK;IACxC,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;;;GAIG;AACH,eAAO,MAAM,WAAW;IACtB,6BAA6B;;IAG7B,+CAA+C;;CAEhD,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,YAAY;IACvB,4BAA4B;;IAG5B,8BAA8B;;CAE/B,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;CAevB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,oBAAoB;IAC/B,+CAA+C;;IAU/C,kCAAkC;;CAEnC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,UAAuD,CAAC;AAE3F;;;;GAIG;AACH,eAAO,MAAM,YAAY;IACvB,iCAAiC;;CAElC,CAAC;AAEF;;;;GAIG;AACH,eA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;;IAGlB,wBAAwB;;;;;IAMxB,sFAAsF;;;;;;CAMvF,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,UAAU;IACrB,8CAA8C;;IAG9C,4CAA4C;;CAE7C,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,UAAU;IACrB;;;OAGG;;IAGH;;OAEG;;CAEJ,CAAC"}
|
|
@@ -0,0 +1,308 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Path and File System Constants
|
|
3
|
+
*
|
|
4
|
+
* WU-1549: Extracted from wu-constants.ts for domain-specific modularity.
|
|
5
|
+
* Contains LumenFlow directory paths, file extensions, config files, filesystem
|
|
6
|
+
* constants, build artifacts, PHI configuration, and path manipulation helpers.
|
|
7
|
+
*
|
|
8
|
+
* @module wu-paths-constants
|
|
9
|
+
*/
|
|
10
|
+
import path from 'node:path';
|
|
11
|
+
import { tmpdir } from 'node:os';
|
|
12
|
+
/**
|
|
13
|
+
* File system constants
|
|
14
|
+
*
|
|
15
|
+
* WU-923: Centralized to eliminate hardcoded strings
|
|
16
|
+
*/
|
|
17
|
+
export const FILE_SYSTEM = {
|
|
18
|
+
/** Standard file encoding */
|
|
19
|
+
ENCODING: 'utf8',
|
|
20
|
+
/** UTF-8 encoding (alias for compatibility) */
|
|
21
|
+
UTF8: 'utf8',
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* Configuration file paths
|
|
25
|
+
*
|
|
26
|
+
* WU-923: Centralized config file names
|
|
27
|
+
*/
|
|
28
|
+
export const CONFIG_FILES = {
|
|
29
|
+
/** LumenFlow main config */
|
|
30
|
+
LUMENFLOW_CONFIG: '.lumenflow.config.yaml',
|
|
31
|
+
/** Lane inference taxonomy */
|
|
32
|
+
LANE_INFERENCE: '.lumenflow.lane-inference.yaml',
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* Directory paths within the monorepo
|
|
36
|
+
*
|
|
37
|
+
* Centralized directory path strings.
|
|
38
|
+
*/
|
|
39
|
+
export const DIRECTORIES = {
|
|
40
|
+
APPS_WEB: 'apps/web/',
|
|
41
|
+
WORKTREES: 'worktrees/',
|
|
42
|
+
AI: 'ai/',
|
|
43
|
+
CLAUDE: '.claude/',
|
|
44
|
+
CLAUDE_HOOKS: '.claude/hooks/',
|
|
45
|
+
DOCS: 'docs/',
|
|
46
|
+
PACKAGES: 'packages/',
|
|
47
|
+
TOOLS: 'tools/',
|
|
48
|
+
MEMORY_BANK: 'memory-bank/',
|
|
49
|
+
WU_DIR: 'docs/04-operations/tasks/wu',
|
|
50
|
+
INITIATIVES_DIR: 'docs/04-operations/tasks/initiatives',
|
|
51
|
+
// WU-1814: Paths for active WU detection
|
|
52
|
+
BACKLOG_PATH: 'docs/04-operations/tasks/backlog.md',
|
|
53
|
+
STATUS_PATH: 'docs/04-operations/tasks/status.md',
|
|
54
|
+
};
|
|
55
|
+
/**
|
|
56
|
+
* Build artifact cleanup globs
|
|
57
|
+
*
|
|
58
|
+
* Centralized glob patterns for worktree artifact cleanup.
|
|
59
|
+
*/
|
|
60
|
+
export const BUILD_ARTIFACT_GLOBS = {
|
|
61
|
+
/** Common dist directories inside worktrees */
|
|
62
|
+
DIST_DIRS: [
|
|
63
|
+
'packages/*/dist',
|
|
64
|
+
'packages/**/dist',
|
|
65
|
+
'apps/*/dist',
|
|
66
|
+
'apps/**/dist',
|
|
67
|
+
'tools/*/dist',
|
|
68
|
+
'tools/**/dist',
|
|
69
|
+
],
|
|
70
|
+
/** TypeScript build info files */
|
|
71
|
+
TSBUILDINFO_FILES: ['**/*.tsbuildinfo'],
|
|
72
|
+
};
|
|
73
|
+
/**
|
|
74
|
+
* Build artifact cleanup ignore patterns
|
|
75
|
+
*
|
|
76
|
+
* Centralized ignore globs for artifact cleanup.
|
|
77
|
+
*/
|
|
78
|
+
export const BUILD_ARTIFACT_IGNORES = ['**/node_modules/**', '**/.git/**', '**/.turbo/**'];
|
|
79
|
+
/**
|
|
80
|
+
* Script file paths
|
|
81
|
+
*
|
|
82
|
+
* Centralized paths to validation scripts.
|
|
83
|
+
*/
|
|
84
|
+
export const SCRIPT_PATHS = {
|
|
85
|
+
/** Prompt registry validation */
|
|
86
|
+
VALIDATE_PROMPT_REGISTRY: 'tools/validate-prompt-registry.js',
|
|
87
|
+
};
|
|
88
|
+
/**
|
|
89
|
+
* File extensions
|
|
90
|
+
*
|
|
91
|
+
* Centralized file extension strings to avoid magic strings.
|
|
92
|
+
*/
|
|
93
|
+
export const FILE_EXTENSIONS = {
|
|
94
|
+
/** Newline-delimited JSON format */
|
|
95
|
+
NDJSON: '.ndjson',
|
|
96
|
+
/** Markdown format */
|
|
97
|
+
MARKDOWN: '.md',
|
|
98
|
+
/** YAML format */
|
|
99
|
+
YAML: '.yaml',
|
|
100
|
+
/** Log format */
|
|
101
|
+
LOG: '.log',
|
|
102
|
+
/** Stamp files (completion markers) */
|
|
103
|
+
STAMP: '.done',
|
|
104
|
+
};
|
|
105
|
+
/**
|
|
106
|
+
* Path patterns for WU-related files
|
|
107
|
+
*/
|
|
108
|
+
export const PATH_PATTERNS = {
|
|
109
|
+
/** Matches WU YAML paths in both legacy and current locations */
|
|
110
|
+
WU_YAML: /(?:memory-bank|docs\/04-operations)\/tasks\/wu\/(WU-\d+)\.ya?ml$/i,
|
|
111
|
+
/** Matches stamp file paths */
|
|
112
|
+
STAMP: /\.lumenflow\/stamps\/(WU-\d+)\.done$/i,
|
|
113
|
+
};
|
|
114
|
+
/**
|
|
115
|
+
* Path-related constants
|
|
116
|
+
*
|
|
117
|
+
* WU-1062: Centralized path literals for lumenflow-home and spec-branch operations.
|
|
118
|
+
*/
|
|
119
|
+
export const PATH_LITERALS = {
|
|
120
|
+
/** Tilde prefix for home directory expansion (e.g., ~/path) */
|
|
121
|
+
TILDE_PREFIX: '~/',
|
|
122
|
+
/** Tilde character for home directory */
|
|
123
|
+
TILDE: '~',
|
|
124
|
+
/** Plan file suffix for WU plans */
|
|
125
|
+
PLAN_FILE_SUFFIX: '-plan.md',
|
|
126
|
+
/** Trailing slash regex pattern */
|
|
127
|
+
TRAILING_SLASH_REGEX: /\/+$/,
|
|
128
|
+
/** .lumenflow path prefix for internal path detection (WU-1430) */
|
|
129
|
+
LUMENFLOW_PREFIX: '.lumenflow/',
|
|
130
|
+
/** Current directory prefix for repo-internal paths (WU-1430) */
|
|
131
|
+
CURRENT_DIR_PREFIX: './',
|
|
132
|
+
};
|
|
133
|
+
/**
|
|
134
|
+
* Slice lengths for path operations
|
|
135
|
+
*
|
|
136
|
+
* WU-1062: Magic numbers extracted for path manipulation.
|
|
137
|
+
*/
|
|
138
|
+
export const PATH_SLICE_LENGTHS = {
|
|
139
|
+
/** Length of '~/' prefix for tilde expansion */
|
|
140
|
+
TILDE_PREFIX_LENGTH: 2,
|
|
141
|
+
/** Length of '/' for leading slash removal */
|
|
142
|
+
LEADING_SLASH_LENGTH: 1,
|
|
143
|
+
};
|
|
144
|
+
/**
|
|
145
|
+
* WU-1174: Lock directory name constant
|
|
146
|
+
*
|
|
147
|
+
* Defined separately so it can be used both in LUMENFLOW_PATHS.LOCK_DIR
|
|
148
|
+
* and for test isolation in cleanup-lock.ts/merge-lock.ts.
|
|
149
|
+
*/
|
|
150
|
+
export const LOCK_DIR_NAME = '.lumenflow-locks';
|
|
151
|
+
/**
|
|
152
|
+
* LumenFlow directory paths
|
|
153
|
+
*
|
|
154
|
+
* Centralized paths for .lumenflow directory structure to eliminate hardcoded strings.
|
|
155
|
+
* Used by telemetry, agent-session, agent-incidents, memory, and commands-logger modules.
|
|
156
|
+
*/
|
|
157
|
+
export const LUMENFLOW_PATHS = {
|
|
158
|
+
/** Base directory for all LumenFlow runtime data */
|
|
159
|
+
BASE: '.lumenflow',
|
|
160
|
+
/** WU state store directory */
|
|
161
|
+
STATE_DIR: '.lumenflow/state',
|
|
162
|
+
/** Stamp directory (WU completion markers) */
|
|
163
|
+
STAMPS_DIR: '.lumenflow/stamps',
|
|
164
|
+
/** Archive directory for old WU events (WU-1430) */
|
|
165
|
+
ARCHIVE_DIR: '.lumenflow/archive',
|
|
166
|
+
/** Merge lock file (runtime coordination, WU-1747) */
|
|
167
|
+
MERGE_LOCK: '.lumenflow/merge.lock',
|
|
168
|
+
/** Base telemetry directory */
|
|
169
|
+
TELEMETRY: '.lumenflow/telemetry',
|
|
170
|
+
/** Flow log file (WU flow events) */
|
|
171
|
+
FLOW_LOG: '.lumenflow/flow.log',
|
|
172
|
+
/** Agent sessions directory */
|
|
173
|
+
SESSIONS: '.lumenflow/sessions',
|
|
174
|
+
/** Agent incidents directory */
|
|
175
|
+
INCIDENTS: '.lumenflow/incidents',
|
|
176
|
+
/** Git commands log file */
|
|
177
|
+
COMMANDS_LOG: '.lumenflow/commands.log',
|
|
178
|
+
/** Memory layer directory */
|
|
179
|
+
MEMORY_DIR: '.lumenflow/memory',
|
|
180
|
+
/** Memory layer JSONL file */
|
|
181
|
+
MEMORY_JSONL: '.lumenflow/memory/memory.jsonl',
|
|
182
|
+
/** WU-1539: Memory signals JSONL file */
|
|
183
|
+
MEMORY_SIGNALS: '.lumenflow/memory/signals.jsonl',
|
|
184
|
+
/** Audit log for tool calls */
|
|
185
|
+
AUDIT_LOG: '.lumenflow/telemetry/tools.ndjson',
|
|
186
|
+
/** Feedback drafts directory */
|
|
187
|
+
FEEDBACK_DRAFTS: '.lumenflow/feedback-drafts',
|
|
188
|
+
/** Feedback index file */
|
|
189
|
+
FEEDBACK_INDEX: '.lumenflow/feedback-index.ndjson',
|
|
190
|
+
/** Current session file */
|
|
191
|
+
SESSION_CURRENT: '.lumenflow/sessions/current.json',
|
|
192
|
+
/** WU events log */
|
|
193
|
+
WU_EVENTS: '.lumenflow/state/wu-events.jsonl',
|
|
194
|
+
/** Lock files directory (lane locks - persisted) */
|
|
195
|
+
LOCKS_DIR: '.lumenflow/locks',
|
|
196
|
+
/** Force bypass audit log */
|
|
197
|
+
FORCE_BYPASSES: '.lumenflow/force-bypasses.log',
|
|
198
|
+
/** WU-1539: Skip-gates audit log */
|
|
199
|
+
SKIP_GATES_AUDIT: '.lumenflow/skip-gates-audit.log',
|
|
200
|
+
/** WU-1539: Skip-COS-gates audit log */
|
|
201
|
+
SKIP_COS_GATES_AUDIT: '.lumenflow/skip-cos-gates-audit.log',
|
|
202
|
+
/** Test baseline file for ratchet pattern (WU-1430) */
|
|
203
|
+
TEST_BASELINE: '.lumenflow/test-baseline.json',
|
|
204
|
+
/** Templates directory (WU-1430) */
|
|
205
|
+
TEMPLATES_DIR: '.lumenflow/templates',
|
|
206
|
+
/** Spawn prompt templates (WU-1430) */
|
|
207
|
+
SPAWN_PROMPT_DIR: '.lumenflow/templates/spawn-prompt',
|
|
208
|
+
/** Template manifest file (WU-1430) */
|
|
209
|
+
TEMPLATE_MANIFEST: '.lumenflow/templates/manifest.yaml',
|
|
210
|
+
/** Skills directory for agent skills (WU-1430) */
|
|
211
|
+
SKILLS_DIR: '.lumenflow/skills',
|
|
212
|
+
/** Agents directory for agent definitions (WU-1430) */
|
|
213
|
+
AGENTS_DIR: '.lumenflow/agents',
|
|
214
|
+
/** Methodology log for spawn telemetry (WU-1430) */
|
|
215
|
+
METHODOLOGY_LOG: '.lumenflow/telemetry/methodology.ndjson',
|
|
216
|
+
/** Prompt metrics cache (WU-1430) */
|
|
217
|
+
PROMPT_METRICS: '.lumenflow/telemetry/prompt-metrics.json',
|
|
218
|
+
/** Prompt lint results (WU-1430) */
|
|
219
|
+
PROMPT_LINT: '.lumenflow/telemetry/prompt-lint.ndjson',
|
|
220
|
+
/** Recovery markers directory (WU-1430) */
|
|
221
|
+
RECOVERY_DIR: '.lumenflow/recovery',
|
|
222
|
+
/** Checkpoints directory (WU-1430) */
|
|
223
|
+
CHECKPOINTS_DIR: '.lumenflow/checkpoints',
|
|
224
|
+
/** WU-1471: Hook counters directory for auto-checkpoint interval tracking */
|
|
225
|
+
HOOK_COUNTERS_DIR: '.lumenflow/state/hook-counters',
|
|
226
|
+
/** Cache directory under user home (WU-1430) */
|
|
227
|
+
HOME_CACHE: 'cache',
|
|
228
|
+
/**
|
|
229
|
+
* WU-1174: Runtime lock directory for merge/cleanup locks
|
|
230
|
+
*
|
|
231
|
+
* These locks are transient and should NOT be created in the main checkout
|
|
232
|
+
* because wu:done runs from main. Using os.tmpdir() ensures:
|
|
233
|
+
* 1. Locks don't pollute the git working tree
|
|
234
|
+
* 2. Locks work across processes on the same machine
|
|
235
|
+
* 3. No "Working tree is not clean" errors if process crashes
|
|
236
|
+
*
|
|
237
|
+
* Note: Lane locks still use LOCKS_DIR (.lumenflow/locks) because they need
|
|
238
|
+
* to persist across sessions and be visible to other agents.
|
|
239
|
+
*/
|
|
240
|
+
LOCK_DIR: path.join(tmpdir(), LOCK_DIR_NAME),
|
|
241
|
+
};
|
|
242
|
+
/**
|
|
243
|
+
* File tool constants (WU-1403)
|
|
244
|
+
*
|
|
245
|
+
* Centralized strings for file:read, file:write, file:edit tools.
|
|
246
|
+
* Prevents duplicate string literals and hardcoded magic values.
|
|
247
|
+
*/
|
|
248
|
+
export const FILE_TOOLS = {
|
|
249
|
+
/** Tool name prefixes */
|
|
250
|
+
NAMES: {
|
|
251
|
+
READ: 'file:read',
|
|
252
|
+
WRITE: 'file:write',
|
|
253
|
+
EDIT: 'file:edit',
|
|
254
|
+
DELETE: 'file:delete',
|
|
255
|
+
},
|
|
256
|
+
/** Tool domain */
|
|
257
|
+
DOMAIN: 'file',
|
|
258
|
+
/** Permission levels */
|
|
259
|
+
PERMISSIONS: {
|
|
260
|
+
READ: 'read',
|
|
261
|
+
WRITE: 'write',
|
|
262
|
+
},
|
|
263
|
+
/** Worktree instruction templates (WU-1403: provides reusable instruction strings) */
|
|
264
|
+
WORKTREE_INSTRUCTIONS: {
|
|
265
|
+
CLAIM_COMMAND: 'pnpm wu:claim --id <wu-id> --lane "<lane>"',
|
|
266
|
+
CD_COMMAND: 'cd worktrees/<lane>-<wu-id>/',
|
|
267
|
+
DOC_REFERENCE: 'CLAUDE.md §2 (Worktree Discipline)',
|
|
268
|
+
},
|
|
269
|
+
};
|
|
270
|
+
/**
|
|
271
|
+
* PHI (Protected Health Information) error codes (WU-1404)
|
|
272
|
+
*
|
|
273
|
+
* Error codes for PHI detection in file tools.
|
|
274
|
+
* Used by file:write and file:edit to block PHI leakage.
|
|
275
|
+
*
|
|
276
|
+
* WU-1068: PHI scanning is healthcare-specific functionality.
|
|
277
|
+
* Enable via PHI_CONFIG.ENABLED flag or .lumenflow.config.yaml phi.enabled: true
|
|
278
|
+
*/
|
|
279
|
+
export const PHI_ERRORS = {
|
|
280
|
+
/** PHI detected in content - write blocked */
|
|
281
|
+
PHI_DETECTED: 'PHI_DETECTED',
|
|
282
|
+
/** PHI override requested - audit logged */
|
|
283
|
+
PHI_OVERRIDE_ALLOWED: 'PHI_OVERRIDE_ALLOWED',
|
|
284
|
+
};
|
|
285
|
+
/**
|
|
286
|
+
* PHI scanning configuration (WU-1068)
|
|
287
|
+
*
|
|
288
|
+
* Controls whether PHI (Protected Health Information) scanning is enabled.
|
|
289
|
+
* This is healthcare-specific functionality (NHS numbers, UK postcodes)
|
|
290
|
+
* that should only be enabled for healthcare projects.
|
|
291
|
+
*
|
|
292
|
+
* Projects can enable via:
|
|
293
|
+
* 1. Setting PHI_CONFIG.ENABLED = true in code
|
|
294
|
+
* 2. Setting LUMENFLOW_PHI_ENABLED=1 environment variable
|
|
295
|
+
* 3. Adding phi.enabled: true to .lumenflow.config.yaml
|
|
296
|
+
*/
|
|
297
|
+
export const PHI_CONFIG = {
|
|
298
|
+
/**
|
|
299
|
+
* Whether PHI scanning is enabled
|
|
300
|
+
* Default: false - projects must explicitly opt-in
|
|
301
|
+
*/
|
|
302
|
+
ENABLED: process.env.LUMENFLOW_PHI_ENABLED === '1',
|
|
303
|
+
/**
|
|
304
|
+
* Whether to block on PHI detection (true) or just warn (false)
|
|
305
|
+
*/
|
|
306
|
+
BLOCKING: process.env.LUMENFLOW_PHI_BLOCKING === '1',
|
|
307
|
+
};
|
|
308
|
+
//# sourceMappingURL=wu-paths-constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wu-paths-constants.js","sourceRoot":"","sources":["../src/wu-paths-constants.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAgBjC;;;;GAIG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,6BAA6B;IAC7B,QAAQ,EAAE,MAAM;IAEhB,+CAA+C;IAC/C,IAAI,EAAE,MAAM;CACb,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,4BAA4B;IAC5B,gBAAgB,EAAE,wBAAwB;IAE1C,8BAA8B;IAC9B,cAAc,EAAE,gCAAgC;CACjD,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,QAAQ,EAAE,WAAW;IACrB,SAAS,EAAE,YAAY;IACvB,EAAE,EAAE,KAAK;IACT,MAAM,EAAE,UAAU;IAClB,YAAY,EAAE,gBAAgB;IAC9B,IAAI,EAAE,OAAO;IACb,QAAQ,EAAE,WAAW;IACrB,KAAK,EAAE,QAAQ;IACf,WAAW,EAAE,cAAc;IAC3B,MAAM,EAAE,6BAA6B;IACrC,eAAe,EAAE,sCAAsC;IACvD,yCAAyC;IACzC,YAAY,EAAE,qCAAqC;IACnD,WAAW,EAAE,oCAAoC;CAClD,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,+CAA+C;IAC/C,SAAS,EAAE;QACT,iBAAiB;QACjB,kBAAkB;QAClB,aAAa;QACb,cAAc;QACd,cAAc;QACd,eAAe;KAChB;IAED,kCAAkC;IAClC,iBAAiB,EAAE,CAAC,kBAAkB,CAAC;CACxC,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,oBAAoB,EAAE,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3C,YAAY,EAAE,qBAAqB;IAEnC,sCAAsC;IACtC,eAAe,EAAE,wBAAwB;IAEzC,6EAA6E;IAC7E,iBAAiB,EAAE,gCAAgC;IAEnD,gDAAgD;IAChD,UAAU,EAAE,OAAO;IAEnB;;;;;;;;;;;OAWG;IACH,QAAQ,EAAE,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,aAAa,CAAC;CAC7C,CAAC;AAEF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,yBAAyB;IACzB,KAAK,EAAE;QACL,IAAI,EAAE,WAAW;QACjB,KAAK,EAAE,YAAY;QACnB,IAAI,EAAE,WAAW;QACjB,MAAM,EAAE,aAAa;KACtB;IAED,kBAAkB;IAClB,MAAM,EAAE,MAAM;IAEd,wBAAwB;IACxB,WAAW,EAAE;QACX,IAAI,EAAE,MAAM;QACZ,KAAK,EAAE,OAAO;KACf;IAED,sFAAsF;IACtF,qBAAqB,EAAE;QACrB,aAAa,EAAE,4CAA4C;QAC3D,UAAU,EAAE,8BAA8B;QAC1C,aAAa,EAAE,oCAAoC;KACpD;CACF,CAAC;AAEF;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,8CAA8C;IAC9C,YAAY,EAAE,cAAc;IAE5B,4CAA4C;IAC5C,oBAAoB,EAAE,sBAAsB;CAC7C,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB;;;OAGG;IACH,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,qBAAqB,KAAK,GAAG;IAElD;;OAEG;IACH,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,sBAAsB,KAAK,GAAG;CACrD,CAAC"}
|
package/dist/wu-paths.d.ts
CHANGED
|
@@ -76,6 +76,12 @@ export declare function createWuPaths(options?: {
|
|
|
76
76
|
* @returns Path to initiatives directory
|
|
77
77
|
*/
|
|
78
78
|
INITIATIVES_DIR: () => string;
|
|
79
|
+
/**
|
|
80
|
+
* Get path to initiative YAML file
|
|
81
|
+
* @param id - Initiative ID (e.g., 'INIT-001')
|
|
82
|
+
* @returns Path to initiative YAML file
|
|
83
|
+
*/
|
|
84
|
+
INITIATIVE: (id: string) => string;
|
|
79
85
|
/**
|
|
80
86
|
* Get path to worktrees directory
|
|
81
87
|
* @returns Path to worktrees directory
|
|
@@ -144,6 +150,12 @@ export declare const WU_PATHS: {
|
|
|
144
150
|
* @returns Path to initiatives directory
|
|
145
151
|
*/
|
|
146
152
|
INITIATIVES_DIR: () => string;
|
|
153
|
+
/**
|
|
154
|
+
* Get path to initiative YAML file
|
|
155
|
+
* @param id - Initiative ID (e.g., 'INIT-001')
|
|
156
|
+
* @returns Path to initiative YAML file
|
|
157
|
+
*/
|
|
158
|
+
INITIATIVE: (id: string) => string;
|
|
147
159
|
/**
|
|
148
160
|
* Get path to worktrees directory
|
|
149
161
|
* @returns Path to worktrees directory
|
package/dist/wu-paths.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wu-paths.d.ts","sourceRoot":"","sources":["../src/wu-paths.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAqBH;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,YAAY,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAM3E;AAmBD;;;;;;;;;GASG;AACH,wBAAgB,2BAA2B,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAKvE;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,OAAO,GAAE;IAAE,WAAW,CAAC,EAAE,MAAM,CAAA;CAAO;IAIhE;;;;OAIG;aACM,MAAM;IAEf;;;OAGG;;IAGH;;;OAGG;;IAGH;;;OAGG;;IAGH;;;OAGG;;IAGH;;;;OAIG;gBACS,MAAM;IAElB;;;OAGG;;IAGH;;;OAGG;;IAGH;;;OAGG;;IAGH;;;OAGG;;IAGH;;;OAGG;;IAGH;;;O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AE,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CASvF;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,GAAE;IAAE,WAAW,CAAC,EAAE,MAAM,CAAA;CAAO,GAAG,MAAM,CAI5F;AAED;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,GAAE;IAAE,WAAW,CAAC,EAAE,MAAM,CAAA;CAAO,GAAG,MAAM,CAI/F"}
|
package/dist/wu-paths.js
CHANGED
|
@@ -12,7 +12,7 @@ import { getConfig, getProjectRoot as getProjectRootFromConfig } from './lumenfl
|
|
|
12
12
|
* Directory depth constants for path resolution.
|
|
13
13
|
* These define how many levels deep each standard file is from repo root.
|
|
14
14
|
*/
|
|
15
|
-
const
|
|
15
|
+
const _PATH_DEPTHS = {
|
|
16
16
|
/** backlog.md is 4 levels deep: docs/04-operations/tasks/backlog.md */
|
|
17
17
|
BACKLOG: 4,
|
|
18
18
|
/** status.md is 4 levels deep: docs/04-operations/tasks/status.md */
|
|
@@ -120,6 +120,12 @@ export function createWuPaths(options = {}) {
|
|
|
120
120
|
* @returns Path to initiatives directory
|
|
121
121
|
*/
|
|
122
122
|
INITIATIVES_DIR: () => config.directories.initiativesDir,
|
|
123
|
+
/**
|
|
124
|
+
* Get path to initiative YAML file
|
|
125
|
+
* @param id - Initiative ID (e.g., 'INIT-001')
|
|
126
|
+
* @returns Path to initiative YAML file
|
|
127
|
+
*/
|
|
128
|
+
INITIATIVE: (id) => path.join(config.directories.initiativesDir, `${id}.yaml`),
|
|
123
129
|
/**
|
|
124
130
|
* Get path to worktrees directory
|
|
125
131
|
* @returns Path to worktrees directory
|