@lumenflow/core 2.9.0 → 2.10.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/index.d.ts +1 -0
- package/dist/index.js +2 -0
- package/dist/wu-constants.d.ts +38 -0
- package/dist/wu-constants.js +38 -0
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -62,6 +62,7 @@ export * from './recovery/index.js';
|
|
|
62
62
|
export * from './context-validation-integration.js';
|
|
63
63
|
export { CONTEXT_VALIDATION } from './wu-constants.js';
|
|
64
64
|
export type { ValidationErrorCode, PredicateSeverity, ValidationMode } from './wu-constants.js';
|
|
65
|
+
export { CLAUDE_HOOKS, getHookCommand } from './wu-constants.js';
|
|
65
66
|
export { LocationType } from './domain/context.schemas.js';
|
|
66
67
|
export { RecoveryIssueCode, RecoveryActionType } from './domain/recovery.schemas.js';
|
|
67
68
|
export type { ILocationResolver, IGitStateReader, IWuStateReader } from './ports/context.ports.js';
|
package/dist/index.js
CHANGED
|
@@ -98,6 +98,8 @@ export * from './recovery/index.js';
|
|
|
98
98
|
export * from './context-validation-integration.js';
|
|
99
99
|
// WU-1090: Context validation constants
|
|
100
100
|
export { CONTEXT_VALIDATION } from './wu-constants.js';
|
|
101
|
+
// WU-1394: Claude Code hook constants for enforcement and recovery
|
|
102
|
+
export { CLAUDE_HOOKS, getHookCommand } from './wu-constants.js';
|
|
101
103
|
// WU-1126: Enum-style constants for port interfaces (const + type pairs)
|
|
102
104
|
// These provide named constants to avoid magic string literals in code
|
|
103
105
|
// The const objects serve as both runtime values AND types via TypeScript's const/type pattern
|
package/dist/wu-constants.d.ts
CHANGED
|
@@ -1021,6 +1021,7 @@ export declare const DIRECTORIES: {
|
|
|
1021
1021
|
WORKTREES: string;
|
|
1022
1022
|
AI: string;
|
|
1023
1023
|
CLAUDE: string;
|
|
1024
|
+
CLAUDE_HOOKS: string;
|
|
1024
1025
|
DOCS: string;
|
|
1025
1026
|
PACKAGES: string;
|
|
1026
1027
|
TOOLS: string;
|
|
@@ -1030,6 +1031,43 @@ export declare const DIRECTORIES: {
|
|
|
1030
1031
|
BACKLOG_PATH: string;
|
|
1031
1032
|
STATUS_PATH: string;
|
|
1032
1033
|
};
|
|
1034
|
+
/**
|
|
1035
|
+
* Claude Code hook script constants (WU-1394)
|
|
1036
|
+
*
|
|
1037
|
+
* Centralized constants for Claude Code enforcement and recovery hooks.
|
|
1038
|
+
* Used by enforcement-generator.ts, enforcement-sync.ts, and init.ts.
|
|
1039
|
+
*
|
|
1040
|
+
* @see packages/@lumenflow/cli/src/hooks/enforcement-generator.ts
|
|
1041
|
+
* @see packages/@lumenflow/cli/src/hooks/enforcement-sync.ts
|
|
1042
|
+
*/
|
|
1043
|
+
export declare const CLAUDE_HOOKS: {
|
|
1044
|
+
/** Hook script filenames */
|
|
1045
|
+
readonly SCRIPTS: {
|
|
1046
|
+
readonly ENFORCE_WORKTREE: "enforce-worktree.sh";
|
|
1047
|
+
readonly REQUIRE_WU: "require-wu.sh";
|
|
1048
|
+
readonly WARN_INCOMPLETE: "warn-incomplete.sh";
|
|
1049
|
+
readonly PRE_COMPACT_CHECKPOINT: "pre-compact-checkpoint.sh";
|
|
1050
|
+
readonly SESSION_START_RECOVERY: "session-start-recovery.sh";
|
|
1051
|
+
};
|
|
1052
|
+
/** Hook command path prefix (uses Claude Code's $CLAUDE_PROJECT_DIR variable) */
|
|
1053
|
+
readonly PATH_PREFIX: "$CLAUDE_PROJECT_DIR/.claude/hooks";
|
|
1054
|
+
/** Hook matchers for settings.json */
|
|
1055
|
+
readonly MATCHERS: {
|
|
1056
|
+
readonly ALL: ".*";
|
|
1057
|
+
readonly WRITE_EDIT: "Write|Edit";
|
|
1058
|
+
readonly COMPACT: "compact";
|
|
1059
|
+
readonly RESUME: "resume";
|
|
1060
|
+
readonly CLEAR: "clear";
|
|
1061
|
+
};
|
|
1062
|
+
/** Template paths (relative to templates directory) */
|
|
1063
|
+
readonly TEMPLATES: {
|
|
1064
|
+
readonly SETTINGS: "vendors/claude/.claude/settings.json.template";
|
|
1065
|
+
readonly PRE_COMPACT: "vendors/claude/.claude/hooks/pre-compact-checkpoint.sh";
|
|
1066
|
+
readonly SESSION_START: "vendors/claude/.claude/hooks/session-start-recovery.sh";
|
|
1067
|
+
};
|
|
1068
|
+
};
|
|
1069
|
+
/** Build full hook command path from script name */
|
|
1070
|
+
export declare const getHookCommand: (scriptName: string) => string;
|
|
1033
1071
|
/**
|
|
1034
1072
|
* ESLint cache strategy values
|
|
1035
1073
|
*/
|
package/dist/wu-constants.js
CHANGED
|
@@ -1066,6 +1066,7 @@ export const DIRECTORIES = {
|
|
|
1066
1066
|
WORKTREES: 'worktrees/',
|
|
1067
1067
|
AI: 'ai/',
|
|
1068
1068
|
CLAUDE: '.claude/',
|
|
1069
|
+
CLAUDE_HOOKS: '.claude/hooks/',
|
|
1069
1070
|
DOCS: 'docs/',
|
|
1070
1071
|
PACKAGES: 'packages/',
|
|
1071
1072
|
TOOLS: 'tools/',
|
|
@@ -1076,6 +1077,43 @@ export const DIRECTORIES = {
|
|
|
1076
1077
|
BACKLOG_PATH: 'docs/04-operations/tasks/backlog.md',
|
|
1077
1078
|
STATUS_PATH: 'docs/04-operations/tasks/status.md',
|
|
1078
1079
|
};
|
|
1080
|
+
/**
|
|
1081
|
+
* Claude Code hook script constants (WU-1394)
|
|
1082
|
+
*
|
|
1083
|
+
* Centralized constants for Claude Code enforcement and recovery hooks.
|
|
1084
|
+
* Used by enforcement-generator.ts, enforcement-sync.ts, and init.ts.
|
|
1085
|
+
*
|
|
1086
|
+
* @see packages/@lumenflow/cli/src/hooks/enforcement-generator.ts
|
|
1087
|
+
* @see packages/@lumenflow/cli/src/hooks/enforcement-sync.ts
|
|
1088
|
+
*/
|
|
1089
|
+
export const CLAUDE_HOOKS = {
|
|
1090
|
+
/** Hook script filenames */
|
|
1091
|
+
SCRIPTS: {
|
|
1092
|
+
ENFORCE_WORKTREE: 'enforce-worktree.sh',
|
|
1093
|
+
REQUIRE_WU: 'require-wu.sh',
|
|
1094
|
+
WARN_INCOMPLETE: 'warn-incomplete.sh',
|
|
1095
|
+
PRE_COMPACT_CHECKPOINT: 'pre-compact-checkpoint.sh',
|
|
1096
|
+
SESSION_START_RECOVERY: 'session-start-recovery.sh',
|
|
1097
|
+
},
|
|
1098
|
+
/** Hook command path prefix (uses Claude Code's $CLAUDE_PROJECT_DIR variable) */
|
|
1099
|
+
PATH_PREFIX: '$CLAUDE_PROJECT_DIR/.claude/hooks',
|
|
1100
|
+
/** Hook matchers for settings.json */
|
|
1101
|
+
MATCHERS: {
|
|
1102
|
+
ALL: '.*',
|
|
1103
|
+
WRITE_EDIT: 'Write|Edit',
|
|
1104
|
+
COMPACT: 'compact',
|
|
1105
|
+
RESUME: 'resume',
|
|
1106
|
+
CLEAR: 'clear',
|
|
1107
|
+
},
|
|
1108
|
+
/** Template paths (relative to templates directory) */
|
|
1109
|
+
TEMPLATES: {
|
|
1110
|
+
SETTINGS: 'vendors/claude/.claude/settings.json.template',
|
|
1111
|
+
PRE_COMPACT: 'vendors/claude/.claude/hooks/pre-compact-checkpoint.sh',
|
|
1112
|
+
SESSION_START: 'vendors/claude/.claude/hooks/session-start-recovery.sh',
|
|
1113
|
+
},
|
|
1114
|
+
};
|
|
1115
|
+
/** Build full hook command path from script name */
|
|
1116
|
+
export const getHookCommand = (scriptName) => `${CLAUDE_HOOKS.PATH_PREFIX}/${scriptName}`;
|
|
1079
1117
|
/**
|
|
1080
1118
|
* ESLint cache strategy values
|
|
1081
1119
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lumenflow/core",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.10.0",
|
|
4
4
|
"description": "Core WU lifecycle tools for LumenFlow workflow framework",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"lumenflow",
|
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
"vitest": "^4.0.17"
|
|
100
100
|
},
|
|
101
101
|
"peerDependencies": {
|
|
102
|
-
"@lumenflow/memory": "2.
|
|
102
|
+
"@lumenflow/memory": "2.10.0"
|
|
103
103
|
},
|
|
104
104
|
"peerDependenciesMeta": {
|
|
105
105
|
"@lumenflow/memory": {
|