@lumenflow/cli 2.3.2 → 2.5.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/__tests__/init-config-lanes.test.js +131 -0
- package/dist/__tests__/init-docs-structure.test.js +119 -0
- package/dist/__tests__/init-lane-inference.test.js +125 -0
- package/dist/__tests__/init-onboarding-docs.test.js +132 -0
- package/dist/__tests__/init-quick-ref.test.js +145 -0
- package/dist/__tests__/init-scripts.test.js +96 -0
- package/dist/__tests__/init-template-portability.test.js +97 -0
- package/dist/__tests__/init.test.js +199 -3
- package/dist/__tests__/initiative-add-wu.test.js +420 -0
- package/dist/__tests__/initiative-plan-replacement.test.js +162 -0
- package/dist/__tests__/initiative-remove-wu.test.js +458 -0
- package/dist/__tests__/onboarding-smoke-test.test.js +211 -0
- package/dist/__tests__/path-centralization-cli.test.js +234 -0
- package/dist/__tests__/plan-create.test.js +126 -0
- package/dist/__tests__/plan-edit.test.js +157 -0
- package/dist/__tests__/plan-link.test.js +239 -0
- package/dist/__tests__/plan-promote.test.js +181 -0
- package/dist/__tests__/wu-create-strict.test.js +118 -0
- package/dist/__tests__/wu-edit-strict.test.js +109 -0
- package/dist/__tests__/wu-validate-strict.test.js +113 -0
- package/dist/flow-bottlenecks.js +4 -2
- package/dist/flow-report.js +3 -2
- package/dist/gates.js +202 -2
- package/dist/init.js +720 -40
- package/dist/initiative-add-wu.js +112 -16
- package/dist/initiative-plan.js +3 -2
- package/dist/initiative-remove-wu.js +248 -0
- package/dist/mem-context.js +0 -0
- package/dist/metrics-snapshot.js +3 -2
- package/dist/onboarding-smoke-test.js +400 -0
- package/dist/plan-create.js +199 -0
- package/dist/plan-edit.js +235 -0
- package/dist/plan-link.js +233 -0
- package/dist/plan-promote.js +231 -0
- package/dist/rotate-progress.js +8 -5
- package/dist/spawn-list.js +4 -3
- package/dist/state-bootstrap.js +6 -4
- package/dist/state-doctor-fix.js +5 -4
- package/dist/state-doctor.js +32 -2
- package/dist/trace-gen.js +6 -3
- package/dist/wu-block.js +16 -5
- package/dist/wu-claim.js +15 -9
- package/dist/wu-create.js +50 -2
- package/dist/wu-deps.js +3 -1
- package/dist/wu-done.js +14 -5
- package/dist/wu-edit.js +35 -0
- package/dist/wu-infer-lane.js +3 -1
- package/dist/wu-spawn.js +8 -0
- package/dist/wu-unblock.js +34 -2
- package/dist/wu-validate.js +25 -17
- package/package.json +12 -6
- package/templates/core/AGENTS.md.template +2 -2
- package/dist/__tests__/init-plan.test.js +0 -340
- package/dist/agent-issues-query.d.ts +0 -16
- package/dist/agent-log-issue.d.ts +0 -10
- package/dist/agent-session-end.d.ts +0 -10
- package/dist/agent-session.d.ts +0 -10
- package/dist/backlog-prune.d.ts +0 -84
- package/dist/cli-entry-point.d.ts +0 -8
- package/dist/deps-add.d.ts +0 -91
- package/dist/deps-remove.d.ts +0 -17
- package/dist/docs-sync.d.ts +0 -50
- package/dist/file-delete.d.ts +0 -84
- package/dist/file-edit.d.ts +0 -82
- package/dist/file-read.d.ts +0 -92
- package/dist/file-write.d.ts +0 -90
- package/dist/flow-bottlenecks.d.ts +0 -16
- package/dist/flow-report.d.ts +0 -16
- package/dist/gates.d.ts +0 -94
- package/dist/git-branch.d.ts +0 -65
- package/dist/git-diff.d.ts +0 -58
- package/dist/git-log.d.ts +0 -69
- package/dist/git-status.d.ts +0 -58
- package/dist/guard-locked.d.ts +0 -62
- package/dist/guard-main-branch.d.ts +0 -50
- package/dist/guard-worktree-commit.d.ts +0 -59
- package/dist/index.d.ts +0 -10
- package/dist/init-plan.d.ts +0 -80
- package/dist/init-plan.js +0 -337
- package/dist/init.d.ts +0 -46
- package/dist/initiative-add-wu.d.ts +0 -22
- package/dist/initiative-bulk-assign-wus.d.ts +0 -16
- package/dist/initiative-create.d.ts +0 -28
- package/dist/initiative-edit.d.ts +0 -34
- package/dist/initiative-list.d.ts +0 -12
- package/dist/initiative-status.d.ts +0 -11
- package/dist/lumenflow-upgrade.d.ts +0 -103
- package/dist/mem-checkpoint.d.ts +0 -16
- package/dist/mem-cleanup.d.ts +0 -29
- package/dist/mem-create.d.ts +0 -17
- package/dist/mem-export.d.ts +0 -10
- package/dist/mem-inbox.d.ts +0 -35
- package/dist/mem-init.d.ts +0 -15
- package/dist/mem-ready.d.ts +0 -16
- package/dist/mem-signal.d.ts +0 -16
- package/dist/mem-start.d.ts +0 -16
- package/dist/mem-summarize.d.ts +0 -22
- package/dist/mem-triage.d.ts +0 -22
- package/dist/metrics-cli.d.ts +0 -90
- package/dist/metrics-snapshot.d.ts +0 -18
- package/dist/orchestrate-init-status.d.ts +0 -11
- package/dist/orchestrate-initiative.d.ts +0 -12
- package/dist/orchestrate-monitor.d.ts +0 -11
- package/dist/release.d.ts +0 -117
- package/dist/rotate-progress.d.ts +0 -48
- package/dist/session-coordinator.d.ts +0 -74
- package/dist/spawn-list.d.ts +0 -16
- package/dist/state-bootstrap.d.ts +0 -92
- package/dist/sync-templates.d.ts +0 -52
- package/dist/trace-gen.d.ts +0 -84
- package/dist/validate-agent-skills.d.ts +0 -50
- package/dist/validate-agent-sync.d.ts +0 -36
- package/dist/validate-backlog-sync.d.ts +0 -37
- package/dist/validate-skills-spec.d.ts +0 -40
- package/dist/validate.d.ts +0 -60
- package/dist/wu-block.d.ts +0 -16
- package/dist/wu-claim.d.ts +0 -74
- package/dist/wu-cleanup.d.ts +0 -35
- package/dist/wu-create.d.ts +0 -69
- package/dist/wu-delete.d.ts +0 -21
- package/dist/wu-deps.d.ts +0 -13
- package/dist/wu-done.d.ts +0 -225
- package/dist/wu-edit.d.ts +0 -63
- package/dist/wu-infer-lane.d.ts +0 -17
- package/dist/wu-preflight.d.ts +0 -47
- package/dist/wu-prune.d.ts +0 -16
- package/dist/wu-recover.d.ts +0 -37
- package/dist/wu-release.d.ts +0 -19
- package/dist/wu-repair.d.ts +0 -60
- package/dist/wu-spawn-completion.d.ts +0 -10
- package/dist/wu-spawn.d.ts +0 -192
- package/dist/wu-status.d.ts +0 -25
- package/dist/wu-unblock.d.ts +0 -16
- package/dist/wu-unlock-lane.d.ts +0 -19
- package/dist/wu-validate.d.ts +0 -16
package/dist/backlog-prune.d.ts
DELETED
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
/**
|
|
3
|
-
* Backlog Prune Command
|
|
4
|
-
*
|
|
5
|
-
* Maintains backlog hygiene by:
|
|
6
|
-
* - Auto-tagging stale WUs (in_progress/ready too long without activity)
|
|
7
|
-
* - Archiving old completed WUs (done for > N days)
|
|
8
|
-
*
|
|
9
|
-
* WU-1106: INIT-003 Phase 3b - Migrate from PatientPath tools/backlog-prune.mjs
|
|
10
|
-
*
|
|
11
|
-
* Usage:
|
|
12
|
-
* pnpm backlog:prune # Dry-run mode (shows what would be done)
|
|
13
|
-
* pnpm backlog:prune --execute # Apply changes
|
|
14
|
-
*/
|
|
15
|
-
/**
|
|
16
|
-
* Default configuration for backlog pruning
|
|
17
|
-
*/
|
|
18
|
-
export declare const BACKLOG_PRUNE_DEFAULTS: {
|
|
19
|
-
/** Days without activity before in_progress WU is considered stale */
|
|
20
|
-
staleDaysInProgress: number;
|
|
21
|
-
/** Days without activity before ready WU is considered stale */
|
|
22
|
-
staleDaysReady: number;
|
|
23
|
-
/** Days after completion before done WU can be archived */
|
|
24
|
-
archiveDaysDone: number;
|
|
25
|
-
};
|
|
26
|
-
/**
|
|
27
|
-
* Arguments for backlog-prune command
|
|
28
|
-
*/
|
|
29
|
-
export interface BacklogPruneArgs {
|
|
30
|
-
dryRun: boolean;
|
|
31
|
-
staleDaysInProgress: number;
|
|
32
|
-
staleDaysReady: number;
|
|
33
|
-
archiveDaysDone: number;
|
|
34
|
-
help?: boolean;
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* Minimal WU information needed for prune analysis
|
|
38
|
-
*/
|
|
39
|
-
export interface WuPruneInfo {
|
|
40
|
-
id: string;
|
|
41
|
-
status: string;
|
|
42
|
-
title?: string;
|
|
43
|
-
created?: string;
|
|
44
|
-
updated?: string;
|
|
45
|
-
completed?: string;
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* Result of WU categorization
|
|
49
|
-
*/
|
|
50
|
-
export interface PruneCategorization {
|
|
51
|
-
stale: WuPruneInfo[];
|
|
52
|
-
archivable: WuPruneInfo[];
|
|
53
|
-
healthy: WuPruneInfo[];
|
|
54
|
-
}
|
|
55
|
-
/**
|
|
56
|
-
* Parse command line arguments for backlog-prune
|
|
57
|
-
*/
|
|
58
|
-
export declare function parseBacklogPruneArgs(argv: string[]): BacklogPruneArgs;
|
|
59
|
-
/**
|
|
60
|
-
* Calculate days since a date string
|
|
61
|
-
* @returns Number of days since date, or null if invalid
|
|
62
|
-
*/
|
|
63
|
-
export declare function calculateStaleDays(dateStr: string | undefined | null): number | null;
|
|
64
|
-
/**
|
|
65
|
-
* Check if a WU is stale based on its status and last activity date
|
|
66
|
-
*/
|
|
67
|
-
export declare function isWuStale(wu: WuPruneInfo, options: {
|
|
68
|
-
staleDaysInProgress?: number;
|
|
69
|
-
staleDaysReady?: number;
|
|
70
|
-
}): boolean;
|
|
71
|
-
/**
|
|
72
|
-
* Check if a WU is archivable (done for more than N days)
|
|
73
|
-
*/
|
|
74
|
-
export declare function isWuArchivable(wu: WuPruneInfo, options: {
|
|
75
|
-
archiveDaysDone?: number;
|
|
76
|
-
}): boolean;
|
|
77
|
-
/**
|
|
78
|
-
* Categorize WUs into stale, archivable, and healthy
|
|
79
|
-
*/
|
|
80
|
-
export declare function categorizeWus(wus: WuPruneInfo[], options: {
|
|
81
|
-
staleDaysInProgress: number;
|
|
82
|
-
staleDaysReady: number;
|
|
83
|
-
archiveDaysDone: number;
|
|
84
|
-
}): PruneCategorization;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Wraps an async main function with proper error handling.
|
|
3
|
-
* WU-1085: Also initializes color support based on NO_COLOR/FORCE_COLOR/--no-color
|
|
4
|
-
*
|
|
5
|
-
* @param main - The async main function to execute
|
|
6
|
-
* @returns Promise that resolves when main completes (or after error handling)
|
|
7
|
-
*/
|
|
8
|
-
export declare function runCLI(main: () => Promise<void>): Promise<void>;
|
package/dist/deps-add.d.ts
DELETED
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
/**
|
|
3
|
-
* Deps Add CLI Command
|
|
4
|
-
*
|
|
5
|
-
* Safe wrapper for `pnpm add` that enforces worktree discipline.
|
|
6
|
-
* Dependencies can only be added from within a worktree, not from main checkout.
|
|
7
|
-
*
|
|
8
|
-
* WU-1112: INIT-003 Phase 6 - Migrate remaining Tier 1 tools
|
|
9
|
-
*
|
|
10
|
-
* Usage:
|
|
11
|
-
* pnpm deps:add react
|
|
12
|
-
* pnpm deps:add --dev vitest
|
|
13
|
-
* pnpm deps:add --filter @lumenflow/cli chalk
|
|
14
|
-
*
|
|
15
|
-
* @see dependency-guard.ts for blocking logic
|
|
16
|
-
*/
|
|
17
|
-
/**
|
|
18
|
-
* Arguments for deps-add command
|
|
19
|
-
*/
|
|
20
|
-
export interface DepsAddArgs {
|
|
21
|
-
/** Package names to add */
|
|
22
|
-
packages?: string[];
|
|
23
|
-
/** Add as dev dependency */
|
|
24
|
-
dev?: boolean;
|
|
25
|
-
/** Filter to specific workspace package */
|
|
26
|
-
filter?: string;
|
|
27
|
-
/** Use exact version */
|
|
28
|
-
exact?: boolean;
|
|
29
|
-
/** Show help */
|
|
30
|
-
help?: boolean;
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Arguments for deps-remove command (also exported from here for convenience)
|
|
34
|
-
*/
|
|
35
|
-
export interface DepsRemoveArgs {
|
|
36
|
-
/** Package names to remove */
|
|
37
|
-
packages?: string[];
|
|
38
|
-
/** Filter to specific workspace package */
|
|
39
|
-
filter?: string;
|
|
40
|
-
/** Show help */
|
|
41
|
-
help?: boolean;
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* Result of worktree context validation
|
|
45
|
-
*/
|
|
46
|
-
export interface WorktreeValidationResult {
|
|
47
|
-
/** Whether the context is valid (inside worktree) */
|
|
48
|
-
valid: boolean;
|
|
49
|
-
/** Error message if invalid */
|
|
50
|
-
error?: string;
|
|
51
|
-
/** Fix command suggestion */
|
|
52
|
-
fixCommand?: string;
|
|
53
|
-
}
|
|
54
|
-
/**
|
|
55
|
-
* Parse command line arguments for deps-add
|
|
56
|
-
*
|
|
57
|
-
* @param argv - Process argv array
|
|
58
|
-
* @returns Parsed arguments
|
|
59
|
-
*/
|
|
60
|
-
export declare function parseDepsAddArgs(argv: string[]): DepsAddArgs;
|
|
61
|
-
/**
|
|
62
|
-
* Parse command line arguments for deps-remove
|
|
63
|
-
*
|
|
64
|
-
* @param argv - Process argv array
|
|
65
|
-
* @returns Parsed arguments
|
|
66
|
-
*/
|
|
67
|
-
export declare function parseDepsRemoveArgs(argv: string[]): DepsRemoveArgs;
|
|
68
|
-
/**
|
|
69
|
-
* Validate that the current directory is within a worktree
|
|
70
|
-
*
|
|
71
|
-
* Dependencies should only be modified in worktrees to maintain
|
|
72
|
-
* isolation and prevent lockfile conflicts on main checkout.
|
|
73
|
-
*
|
|
74
|
-
* @param cwd - Current working directory to validate
|
|
75
|
-
* @returns Validation result with error and fix command if invalid
|
|
76
|
-
*/
|
|
77
|
-
export declare function validateWorktreeContext(cwd: string): WorktreeValidationResult;
|
|
78
|
-
/**
|
|
79
|
-
* Build pnpm add command string from arguments
|
|
80
|
-
*
|
|
81
|
-
* @param args - Parsed deps-add arguments
|
|
82
|
-
* @returns Command string ready for execution
|
|
83
|
-
*/
|
|
84
|
-
export declare function buildPnpmAddCommand(args: DepsAddArgs): string;
|
|
85
|
-
/**
|
|
86
|
-
* Build pnpm remove command string from arguments
|
|
87
|
-
*
|
|
88
|
-
* @param args - Parsed deps-remove arguments
|
|
89
|
-
* @returns Command string ready for execution
|
|
90
|
-
*/
|
|
91
|
-
export declare function buildPnpmRemoveCommand(args: DepsRemoveArgs): string;
|
package/dist/deps-remove.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
/**
|
|
3
|
-
* Deps Remove CLI Command
|
|
4
|
-
*
|
|
5
|
-
* Safe wrapper for `pnpm remove` that enforces worktree discipline.
|
|
6
|
-
* Dependencies can only be removed from within a worktree, not from main checkout.
|
|
7
|
-
*
|
|
8
|
-
* WU-1112: INIT-003 Phase 6 - Migrate remaining Tier 1 tools
|
|
9
|
-
*
|
|
10
|
-
* Usage:
|
|
11
|
-
* pnpm deps:remove lodash
|
|
12
|
-
* pnpm deps:remove --filter @lumenflow/cli chalk
|
|
13
|
-
*
|
|
14
|
-
* @see dependency-guard.ts for blocking logic
|
|
15
|
-
*/
|
|
16
|
-
import { type DepsRemoveArgs } from './deps-add.js';
|
|
17
|
-
export type { DepsRemoveArgs };
|
package/dist/docs-sync.d.ts
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @file docs-sync.ts
|
|
3
|
-
* LumenFlow docs:sync command for syncing agent docs to existing projects (WU-1083)
|
|
4
|
-
* WU-1085: Added createWUParser for proper --help support
|
|
5
|
-
* WU-1124: Refactored to read templates from bundled files (INIT-004 Phase 2)
|
|
6
|
-
*/
|
|
7
|
-
export type VendorType = 'claude' | 'cursor' | 'aider' | 'all' | 'none';
|
|
8
|
-
/**
|
|
9
|
-
* WU-1085: Parse docs-sync command options using createWUParser
|
|
10
|
-
* Provides proper --help, --version, and option parsing
|
|
11
|
-
*/
|
|
12
|
-
export declare function parseDocsSyncOptions(): {
|
|
13
|
-
force: boolean;
|
|
14
|
-
vendor: VendorType;
|
|
15
|
-
};
|
|
16
|
-
export interface SyncOptions {
|
|
17
|
-
force: boolean;
|
|
18
|
-
vendor?: VendorType;
|
|
19
|
-
}
|
|
20
|
-
export interface SyncResult {
|
|
21
|
-
created: string[];
|
|
22
|
-
skipped: string[];
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* WU-1124: Get the templates directory path
|
|
26
|
-
* Templates are bundled with the CLI package at dist/templates/
|
|
27
|
-
* Falls back to src/templates/ for development
|
|
28
|
-
*/
|
|
29
|
-
export declare function getTemplatesDir(): string;
|
|
30
|
-
/**
|
|
31
|
-
* WU-1124: Load a template file from the bundled templates directory
|
|
32
|
-
* @param templatePath - Relative path from templates directory (e.g., 'core/ai/onboarding/quick-ref-commands.md.template')
|
|
33
|
-
* @returns Template content as string
|
|
34
|
-
*/
|
|
35
|
-
export declare function loadTemplate(templatePath: string): string;
|
|
36
|
-
/**
|
|
37
|
-
* Sync agent onboarding docs to an existing project
|
|
38
|
-
* WU-1124: Now reads templates from bundled files instead of hardcoded strings
|
|
39
|
-
*/
|
|
40
|
-
export declare function syncAgentDocs(targetDir: string, options: SyncOptions): Promise<SyncResult>;
|
|
41
|
-
/**
|
|
42
|
-
* Sync Claude skills to an existing project
|
|
43
|
-
* WU-1124: Now reads templates from bundled files instead of hardcoded strings
|
|
44
|
-
*/
|
|
45
|
-
export declare function syncSkills(targetDir: string, options: SyncOptions): Promise<SyncResult>;
|
|
46
|
-
/**
|
|
47
|
-
* CLI entry point for docs:sync command
|
|
48
|
-
* WU-1085: Updated to use parseDocsSyncOptions for proper --help support
|
|
49
|
-
*/
|
|
50
|
-
export declare function main(): Promise<void>;
|
package/dist/file-delete.d.ts
DELETED
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
/**
|
|
3
|
-
* File Delete CLI Tool
|
|
4
|
-
*
|
|
5
|
-
* Provides audited file delete operations with:
|
|
6
|
-
* - Scope checking against WU code_paths
|
|
7
|
-
* - Recursive directory deletion
|
|
8
|
-
* - Force option for missing files
|
|
9
|
-
* - Audit logging
|
|
10
|
-
*
|
|
11
|
-
* Usage:
|
|
12
|
-
* node file-delete.js <path> [--recursive] [--force]
|
|
13
|
-
*
|
|
14
|
-
* WU-1108: INIT-003 Phase 4a - Migrate file operations
|
|
15
|
-
*/
|
|
16
|
-
/**
|
|
17
|
-
* Default configuration for file delete operations
|
|
18
|
-
*/
|
|
19
|
-
export declare const FILE_DELETE_DEFAULTS: {
|
|
20
|
-
/** Delete directories recursively */
|
|
21
|
-
recursive: boolean;
|
|
22
|
-
/** Don't error on missing files */
|
|
23
|
-
force: boolean;
|
|
24
|
-
};
|
|
25
|
-
/**
|
|
26
|
-
* Arguments for file delete operation
|
|
27
|
-
*/
|
|
28
|
-
export interface FileDeleteArgs {
|
|
29
|
-
/** Path to file or directory to delete */
|
|
30
|
-
path?: string;
|
|
31
|
-
/** Delete directories recursively */
|
|
32
|
-
recursive?: boolean;
|
|
33
|
-
/** Don't error on missing files */
|
|
34
|
-
force?: boolean;
|
|
35
|
-
/** Show help */
|
|
36
|
-
help?: boolean;
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* Metadata returned with file delete
|
|
40
|
-
*/
|
|
41
|
-
export interface FileDeleteMetadata {
|
|
42
|
-
/** Number of items deleted (files + directories) */
|
|
43
|
-
deletedCount: number;
|
|
44
|
-
/** Whether target was a directory */
|
|
45
|
-
wasDirectory: boolean;
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* Audit log entry for file operations
|
|
49
|
-
*/
|
|
50
|
-
export interface AuditLogEntry {
|
|
51
|
-
/** Operation type */
|
|
52
|
-
operation: 'read' | 'write' | 'edit' | 'delete';
|
|
53
|
-
/** File path */
|
|
54
|
-
path: string;
|
|
55
|
-
/** Timestamp */
|
|
56
|
-
timestamp: string;
|
|
57
|
-
/** Duration in ms */
|
|
58
|
-
durationMs?: number;
|
|
59
|
-
/** Success status */
|
|
60
|
-
success: boolean;
|
|
61
|
-
/** Error message if failed */
|
|
62
|
-
error?: string;
|
|
63
|
-
}
|
|
64
|
-
/**
|
|
65
|
-
* Result of file delete operation
|
|
66
|
-
*/
|
|
67
|
-
export interface FileDeleteResult {
|
|
68
|
-
/** Whether operation succeeded */
|
|
69
|
-
success: boolean;
|
|
70
|
-
/** Error message (if failed) */
|
|
71
|
-
error?: string;
|
|
72
|
-
/** Delete metadata */
|
|
73
|
-
metadata?: FileDeleteMetadata;
|
|
74
|
-
/** Audit log entry */
|
|
75
|
-
auditLog?: AuditLogEntry;
|
|
76
|
-
}
|
|
77
|
-
/**
|
|
78
|
-
* Parse command line arguments for file-delete
|
|
79
|
-
*/
|
|
80
|
-
export declare function parseFileDeleteArgs(argv: string[]): FileDeleteArgs;
|
|
81
|
-
/**
|
|
82
|
-
* Delete a file or directory with audit logging and safety checks
|
|
83
|
-
*/
|
|
84
|
-
export declare function deleteFileWithAudit(args: FileDeleteArgs): Promise<FileDeleteResult>;
|
package/dist/file-edit.d.ts
DELETED
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
/**
|
|
3
|
-
* File Edit CLI Tool
|
|
4
|
-
*
|
|
5
|
-
* Provides audited file edit operations with:
|
|
6
|
-
* - Scope checking against WU code_paths
|
|
7
|
-
* - Exact string replacement
|
|
8
|
-
* - Uniqueness validation
|
|
9
|
-
* - Replace-all support
|
|
10
|
-
* - Audit logging
|
|
11
|
-
*
|
|
12
|
-
* Usage:
|
|
13
|
-
* node file-edit.js <path> --old-string <old> --new-string <new> [--replace-all]
|
|
14
|
-
*
|
|
15
|
-
* WU-1108: INIT-003 Phase 4a - Migrate file operations
|
|
16
|
-
*/
|
|
17
|
-
/**
|
|
18
|
-
* Default configuration for file edit operations
|
|
19
|
-
*/
|
|
20
|
-
export declare const FILE_EDIT_DEFAULTS: {
|
|
21
|
-
/** Default encoding */
|
|
22
|
-
encoding: BufferEncoding;
|
|
23
|
-
/** Replace all occurrences (default: false - requires unique match) */
|
|
24
|
-
replaceAll: boolean;
|
|
25
|
-
};
|
|
26
|
-
/**
|
|
27
|
-
* Arguments for file edit operation
|
|
28
|
-
*/
|
|
29
|
-
export interface FileEditArgs {
|
|
30
|
-
/** Path to file to edit */
|
|
31
|
-
path?: string;
|
|
32
|
-
/** String to find */
|
|
33
|
-
oldString?: string;
|
|
34
|
-
/** String to replace with */
|
|
35
|
-
newString?: string;
|
|
36
|
-
/** File encoding */
|
|
37
|
-
encoding?: BufferEncoding;
|
|
38
|
-
/** Replace all occurrences */
|
|
39
|
-
replaceAll?: boolean;
|
|
40
|
-
/** Show help */
|
|
41
|
-
help?: boolean;
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* Audit log entry for file operations
|
|
45
|
-
*/
|
|
46
|
-
export interface AuditLogEntry {
|
|
47
|
-
/** Operation type */
|
|
48
|
-
operation: 'read' | 'write' | 'edit' | 'delete';
|
|
49
|
-
/** File path */
|
|
50
|
-
path: string;
|
|
51
|
-
/** Timestamp */
|
|
52
|
-
timestamp: string;
|
|
53
|
-
/** Duration in ms */
|
|
54
|
-
durationMs?: number;
|
|
55
|
-
/** Success status */
|
|
56
|
-
success: boolean;
|
|
57
|
-
/** Error message if failed */
|
|
58
|
-
error?: string;
|
|
59
|
-
}
|
|
60
|
-
/**
|
|
61
|
-
* Result of file edit operation
|
|
62
|
-
*/
|
|
63
|
-
export interface FileEditResult {
|
|
64
|
-
/** Whether operation succeeded */
|
|
65
|
-
success: boolean;
|
|
66
|
-
/** Error message (if failed) */
|
|
67
|
-
error?: string;
|
|
68
|
-
/** Number of replacements made */
|
|
69
|
-
replacements?: number;
|
|
70
|
-
/** Diff preview */
|
|
71
|
-
diff?: string;
|
|
72
|
-
/** Audit log entry */
|
|
73
|
-
auditLog?: AuditLogEntry;
|
|
74
|
-
}
|
|
75
|
-
/**
|
|
76
|
-
* Parse command line arguments for file-edit
|
|
77
|
-
*/
|
|
78
|
-
export declare function parseFileEditArgs(argv: string[]): FileEditArgs;
|
|
79
|
-
/**
|
|
80
|
-
* Edit a file with audit logging and safety checks
|
|
81
|
-
*/
|
|
82
|
-
export declare function editFileWithAudit(args: FileEditArgs): Promise<FileEditResult>;
|
package/dist/file-read.d.ts
DELETED
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
/**
|
|
3
|
-
* File Read CLI Tool
|
|
4
|
-
*
|
|
5
|
-
* Provides audited file read operations with:
|
|
6
|
-
* - Scope checking against WU code_paths
|
|
7
|
-
* - File size limits
|
|
8
|
-
* - Line range support
|
|
9
|
-
* - Audit logging
|
|
10
|
-
*
|
|
11
|
-
* Usage:
|
|
12
|
-
* node file-read.js <path> [--encoding utf-8] [--start-line N] [--end-line M]
|
|
13
|
-
*
|
|
14
|
-
* WU-1108: INIT-003 Phase 4a - Migrate file operations
|
|
15
|
-
*/
|
|
16
|
-
/**
|
|
17
|
-
* Default configuration for file read operations
|
|
18
|
-
*/
|
|
19
|
-
export declare const FILE_READ_DEFAULTS: {
|
|
20
|
-
/** Maximum file size in bytes (10MB) */
|
|
21
|
-
maxFileSizeBytes: number;
|
|
22
|
-
/** Default encoding */
|
|
23
|
-
encoding: BufferEncoding;
|
|
24
|
-
};
|
|
25
|
-
/**
|
|
26
|
-
* Arguments for file read operation
|
|
27
|
-
*/
|
|
28
|
-
export interface FileReadArgs {
|
|
29
|
-
/** Path to file to read */
|
|
30
|
-
path?: string;
|
|
31
|
-
/** File encoding */
|
|
32
|
-
encoding?: BufferEncoding;
|
|
33
|
-
/** Start line (1-based, inclusive) */
|
|
34
|
-
startLine?: number;
|
|
35
|
-
/** End line (1-based, inclusive) */
|
|
36
|
-
endLine?: number;
|
|
37
|
-
/** Maximum file size in bytes */
|
|
38
|
-
maxFileSizeBytes?: number;
|
|
39
|
-
/** Show help */
|
|
40
|
-
help?: boolean;
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* Metadata returned with file read
|
|
44
|
-
*/
|
|
45
|
-
export interface FileReadMetadata {
|
|
46
|
-
/** File size in bytes */
|
|
47
|
-
sizeBytes: number;
|
|
48
|
-
/** Total line count */
|
|
49
|
-
lineCount: number;
|
|
50
|
-
/** Lines returned (if subset) */
|
|
51
|
-
linesReturned?: number;
|
|
52
|
-
}
|
|
53
|
-
/**
|
|
54
|
-
* Audit log entry for file operations
|
|
55
|
-
*/
|
|
56
|
-
export interface AuditLogEntry {
|
|
57
|
-
/** Operation type */
|
|
58
|
-
operation: 'read' | 'write' | 'edit' | 'delete';
|
|
59
|
-
/** File path */
|
|
60
|
-
path: string;
|
|
61
|
-
/** Timestamp */
|
|
62
|
-
timestamp: string;
|
|
63
|
-
/** Duration in ms */
|
|
64
|
-
durationMs?: number;
|
|
65
|
-
/** Success status */
|
|
66
|
-
success: boolean;
|
|
67
|
-
/** Error message if failed */
|
|
68
|
-
error?: string;
|
|
69
|
-
}
|
|
70
|
-
/**
|
|
71
|
-
* Result of file read operation
|
|
72
|
-
*/
|
|
73
|
-
export interface FileReadResult {
|
|
74
|
-
/** Whether operation succeeded */
|
|
75
|
-
success: boolean;
|
|
76
|
-
/** File content (if successful) */
|
|
77
|
-
content?: string;
|
|
78
|
-
/** Error message (if failed) */
|
|
79
|
-
error?: string;
|
|
80
|
-
/** File metadata */
|
|
81
|
-
metadata?: FileReadMetadata;
|
|
82
|
-
/** Audit log entry */
|
|
83
|
-
auditLog?: AuditLogEntry;
|
|
84
|
-
}
|
|
85
|
-
/**
|
|
86
|
-
* Parse command line arguments for file-read
|
|
87
|
-
*/
|
|
88
|
-
export declare function parseFileReadArgs(argv: string[]): FileReadArgs;
|
|
89
|
-
/**
|
|
90
|
-
* Read a file with audit logging and safety checks
|
|
91
|
-
*/
|
|
92
|
-
export declare function readFileWithAudit(args: FileReadArgs): Promise<FileReadResult>;
|
package/dist/file-write.d.ts
DELETED
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
/**
|
|
3
|
-
* File Write CLI Tool
|
|
4
|
-
*
|
|
5
|
-
* Provides audited file write operations with:
|
|
6
|
-
* - Scope checking against WU code_paths
|
|
7
|
-
* - PHI scanning (optional)
|
|
8
|
-
* - Directory creation
|
|
9
|
-
* - Audit logging
|
|
10
|
-
*
|
|
11
|
-
* Usage:
|
|
12
|
-
* node file-write.js <path> --content <content> [--encoding utf-8]
|
|
13
|
-
*
|
|
14
|
-
* WU-1108: INIT-003 Phase 4a - Migrate file operations
|
|
15
|
-
*/
|
|
16
|
-
/**
|
|
17
|
-
* Default configuration for file write operations
|
|
18
|
-
*/
|
|
19
|
-
export declare const FILE_WRITE_DEFAULTS: {
|
|
20
|
-
/** Default encoding */
|
|
21
|
-
encoding: BufferEncoding;
|
|
22
|
-
/** Create parent directories if they don't exist */
|
|
23
|
-
createDirectories: boolean;
|
|
24
|
-
};
|
|
25
|
-
/**
|
|
26
|
-
* Arguments for file write operation
|
|
27
|
-
*/
|
|
28
|
-
export interface FileWriteArgs {
|
|
29
|
-
/** Path to file to write */
|
|
30
|
-
path?: string;
|
|
31
|
-
/** Content to write */
|
|
32
|
-
content?: string;
|
|
33
|
-
/** File encoding */
|
|
34
|
-
encoding?: BufferEncoding;
|
|
35
|
-
/** Create parent directories */
|
|
36
|
-
createDirectories?: boolean;
|
|
37
|
-
/** Scan content for PHI */
|
|
38
|
-
scanPHI?: boolean;
|
|
39
|
-
/** Show help */
|
|
40
|
-
help?: boolean;
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* Metadata returned with file write
|
|
44
|
-
*/
|
|
45
|
-
export interface FileWriteMetadata {
|
|
46
|
-
/** Bytes written */
|
|
47
|
-
bytesWritten: number;
|
|
48
|
-
/** Whether directories were created */
|
|
49
|
-
directoriesCreated?: boolean;
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
* Audit log entry for file operations
|
|
53
|
-
*/
|
|
54
|
-
export interface AuditLogEntry {
|
|
55
|
-
/** Operation type */
|
|
56
|
-
operation: 'read' | 'write' | 'edit' | 'delete';
|
|
57
|
-
/** File path */
|
|
58
|
-
path: string;
|
|
59
|
-
/** Timestamp */
|
|
60
|
-
timestamp: string;
|
|
61
|
-
/** Duration in ms */
|
|
62
|
-
durationMs?: number;
|
|
63
|
-
/** Success status */
|
|
64
|
-
success: boolean;
|
|
65
|
-
/** Error message if failed */
|
|
66
|
-
error?: string;
|
|
67
|
-
}
|
|
68
|
-
/**
|
|
69
|
-
* Result of file write operation
|
|
70
|
-
*/
|
|
71
|
-
export interface FileWriteResult {
|
|
72
|
-
/** Whether operation succeeded */
|
|
73
|
-
success: boolean;
|
|
74
|
-
/** Error message (if failed) */
|
|
75
|
-
error?: string;
|
|
76
|
-
/** Warnings (e.g., PHI detected) */
|
|
77
|
-
warnings?: string[];
|
|
78
|
-
/** File metadata */
|
|
79
|
-
metadata?: FileWriteMetadata;
|
|
80
|
-
/** Audit log entry */
|
|
81
|
-
auditLog?: AuditLogEntry;
|
|
82
|
-
}
|
|
83
|
-
/**
|
|
84
|
-
* Parse command line arguments for file-write
|
|
85
|
-
*/
|
|
86
|
-
export declare function parseFileWriteArgs(argv: string[]): FileWriteArgs;
|
|
87
|
-
/**
|
|
88
|
-
* Write a file with audit logging and safety checks
|
|
89
|
-
*/
|
|
90
|
-
export declare function writeFileWithAudit(args: FileWriteArgs): Promise<FileWriteResult>;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
/**
|
|
3
|
-
* Flow Bottlenecks Analysis CLI (WU-1018)
|
|
4
|
-
*
|
|
5
|
-
* Analyzes WU dependency graph to identify bottlenecks and critical paths.
|
|
6
|
-
*
|
|
7
|
-
* Usage:
|
|
8
|
-
* pnpm flow:bottlenecks # Default: top 10 bottlenecks, JSON output
|
|
9
|
-
* pnpm flow:bottlenecks --limit 5 # Top 5 bottlenecks
|
|
10
|
-
* pnpm flow:bottlenecks --format table # Table output
|
|
11
|
-
* pnpm flow:bottlenecks --format mermaid # Mermaid diagram of critical path
|
|
12
|
-
*
|
|
13
|
-
* @module flow-bottlenecks
|
|
14
|
-
* @see {@link @lumenflow/metrics/flow/analyze-bottlenecks}
|
|
15
|
-
*/
|
|
16
|
-
export {};
|
package/dist/flow-report.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
/**
|
|
3
|
-
* Flow Report Generator CLI (WU-1018)
|
|
4
|
-
*
|
|
5
|
-
* Generates DORA/SPACE flow reports from telemetry and WU data.
|
|
6
|
-
*
|
|
7
|
-
* Usage:
|
|
8
|
-
* pnpm flow:report # Default: last 7 days, JSON output
|
|
9
|
-
* pnpm flow:report --days 30 # Last 30 days
|
|
10
|
-
* pnpm flow:report --format table # Table output
|
|
11
|
-
* pnpm flow:report --start 2026-01-01 --end 2026-01-15
|
|
12
|
-
*
|
|
13
|
-
* @module flow-report
|
|
14
|
-
* @see {@link @lumenflow/metrics/flow/generate-flow-report}
|
|
15
|
-
*/
|
|
16
|
-
export {};
|