@lumenflow/host 5.0.2

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.
Files changed (47) hide show
  1. package/LICENSE +661 -0
  2. package/README.md +19 -0
  3. package/dist/enrollment/index.d.ts +10 -0
  4. package/dist/enrollment/index.d.ts.map +1 -0
  5. package/dist/enrollment/index.js +11 -0
  6. package/dist/enrollment/index.js.map +1 -0
  7. package/dist/enrollment/phone-device.d.ts +73 -0
  8. package/dist/enrollment/phone-device.d.ts.map +1 -0
  9. package/dist/enrollment/phone-device.js +198 -0
  10. package/dist/enrollment/phone-device.js.map +1 -0
  11. package/dist/git/git-adapter.d.ts +452 -0
  12. package/dist/git/git-adapter.d.ts.map +1 -0
  13. package/dist/git/git-adapter.js +778 -0
  14. package/dist/git/git-adapter.js.map +1 -0
  15. package/dist/git/git-context-constants.d.ts +43 -0
  16. package/dist/git/git-context-constants.d.ts.map +1 -0
  17. package/dist/git/git-context-constants.js +45 -0
  18. package/dist/git/git-context-constants.js.map +1 -0
  19. package/dist/git/git-context-extractor.d.ts +102 -0
  20. package/dist/git/git-context-extractor.d.ts.map +1 -0
  21. package/dist/git/git-context-extractor.js +568 -0
  22. package/dist/git/git-context-extractor.js.map +1 -0
  23. package/dist/git/git-staged-validator.d.ts +33 -0
  24. package/dist/git/git-staged-validator.d.ts.map +1 -0
  25. package/dist/git/git-staged-validator.js +52 -0
  26. package/dist/git/git-staged-validator.js.map +1 -0
  27. package/dist/git/git-validator.ports.d.ts +114 -0
  28. package/dist/git/git-validator.ports.d.ts.map +1 -0
  29. package/dist/git/git-validator.ports.js +4 -0
  30. package/dist/git/git-validator.ports.js.map +1 -0
  31. package/dist/git/index.d.ts +12 -0
  32. package/dist/git/index.d.ts.map +1 -0
  33. package/dist/git/index.js +14 -0
  34. package/dist/git/index.js.map +1 -0
  35. package/dist/index.d.ts +16 -0
  36. package/dist/index.d.ts.map +1 -0
  37. package/dist/index.js +18 -0
  38. package/dist/index.js.map +1 -0
  39. package/dist/workspace-config/index.d.ts +10 -0
  40. package/dist/workspace-config/index.d.ts.map +1 -0
  41. package/dist/workspace-config/index.js +12 -0
  42. package/dist/workspace-config/index.js.map +1 -0
  43. package/dist/workspace-config/lumenflow-config.d.ts +75 -0
  44. package/dist/workspace-config/lumenflow-config.d.ts.map +1 -0
  45. package/dist/workspace-config/lumenflow-config.js +212 -0
  46. package/dist/workspace-config/lumenflow-config.js.map +1 -0
  47. package/package.json +65 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"git-staged-validator.js","sourceRoot":"","sources":["../../src/git/git-staged-validator.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,yCAAyC;AAEzC,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,GAAG,EAAE,MAAM,4CAA4C,CAAC;AAEjE;;;;;;;;;GASG;AAEH;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,UAAU,YAAY,CAAC,KAAuC;IAClE,MAAM,GAAG,GAAG,YAAY,EAAE,CAAC;IAC3B,MAAM,GAAG,GAAG,GAAG,CAAC,GAAG,CAAC,+BAA+B,CAAW,CAAC;IAC/D,MAAM,MAAM,GAAa,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAe,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IAE9F,gDAAgD;IAChD,MAAM,eAAe,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAe,EAAE,CAAC,OAAO,CAAC,KAAK,QAAQ,IAAI,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IAChG,MAAM,OAAO,GAAG,eAAe,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE;QAC3C,6DAA6D;QAC7D,MAAM,WAAW,GAAG,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACzD,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,KAAK,WAAW,IAAI,IAAI,CAAC,UAAU,CAAC,GAAG,WAAW,GAAG,CAAC,CAAC,CAAC;IAC5F,CAAC,CAAC,CAAC;IAEH,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;QACnB,GAAG,CAAC,sBAAsB,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAClD,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"}
@@ -0,0 +1,114 @@
1
+ /**
2
+ * Git Validator Ports
3
+ *
4
+ * WU-1103: INIT-003 Phase 2c - Add git adapter and validator ports
5
+ *
6
+ * Port interfaces for git operations used by WU validation and lifecycle scripts.
7
+ * These abstractions allow dependency injection and contract-based testing.
8
+ *
9
+ * @module ports/git-validator
10
+ */
11
+ /**
12
+ * Push command options.
13
+ */
14
+ export interface PushOptions {
15
+ /** Set upstream tracking (equivalent to git push -u). */
16
+ setUpstream?: boolean;
17
+ }
18
+ /**
19
+ * Merge command options.
20
+ */
21
+ export interface MergeOptions {
22
+ /** Require fast-forward-only merge. */
23
+ ffOnly?: boolean;
24
+ }
25
+ /**
26
+ * Worktree removal options.
27
+ */
28
+ export interface WorktreeRemoveOptions {
29
+ /** Force removal when worktree has uncommitted changes. */
30
+ force?: boolean;
31
+ }
32
+ /**
33
+ * Branch deletion options.
34
+ */
35
+ export interface DeleteBranchOptions {
36
+ /** Force-delete branch (equivalent to git branch -D). */
37
+ force?: boolean;
38
+ }
39
+ /**
40
+ * Reset command options.
41
+ */
42
+ export interface ResetOptions {
43
+ /** Perform hard reset (equivalent to git reset --hard). */
44
+ hard?: boolean;
45
+ }
46
+ /**
47
+ * Log command options.
48
+ */
49
+ export interface LogOptions {
50
+ /** Maximum number of commits to return. */
51
+ maxCount?: number;
52
+ }
53
+ /**
54
+ * Minimal merge result contract.
55
+ */
56
+ export interface MergeResult {
57
+ /** True when merge completed successfully. */
58
+ success: boolean;
59
+ }
60
+ /**
61
+ * Minimal git log entry contract.
62
+ */
63
+ export interface GitLogEntry {
64
+ hash: string;
65
+ message: string;
66
+ }
67
+ /**
68
+ * Minimal git log result contract.
69
+ */
70
+ export interface GitLogResult {
71
+ all: GitLogEntry[];
72
+ total: number;
73
+ }
74
+ /**
75
+ * Git adapter contract used by validator and lifecycle workflows.
76
+ *
77
+ * Note: Keep this aligned with `GitAdapter` public methods.
78
+ */
79
+ export interface IGitAdapter {
80
+ getCurrentBranch(): Promise<string>;
81
+ getStatus(): Promise<string>;
82
+ getUnpushedCommits(): Promise<string>;
83
+ branchExists(branch: string): Promise<boolean>;
84
+ remoteBranchExists(remote: string, branch: string): Promise<boolean>;
85
+ fetch(remote?: string, branch?: string): Promise<void>;
86
+ pull(remote: string, branch: string): Promise<void>;
87
+ getConfigValue(key: string): Promise<string>;
88
+ isClean(): Promise<boolean>;
89
+ add(files: string | string[]): Promise<void>;
90
+ addWithDeletions(files: string[]): Promise<void>;
91
+ commit(message: string): Promise<void>;
92
+ push(remote?: string, branch?: string, options?: PushOptions): Promise<void>;
93
+ pushRefspec(remote: string, localRef: string, remoteRef: string): Promise<void>;
94
+ createBranch(branch: string, startPoint?: string): Promise<void>;
95
+ checkout(branch: string): Promise<void>;
96
+ getCommitHash(ref?: string): Promise<string>;
97
+ merge(branch: string, options?: MergeOptions): Promise<MergeResult>;
98
+ log(options?: LogOptions): Promise<GitLogResult>;
99
+ mergeBase(ref1: string, ref2: string): Promise<string>;
100
+ mergeTree(base: string, ref1: string, ref2: string): Promise<string>;
101
+ revList(args: string[]): Promise<string>;
102
+ worktreeAdd(path: string, branch: string, startPoint?: string): Promise<void>;
103
+ worktreeRemove(worktreePath: string, options?: WorktreeRemoveOptions): Promise<void>;
104
+ worktreeList(): Promise<string>;
105
+ deleteBranch(branch: string, options?: DeleteBranchOptions): Promise<void>;
106
+ createBranchNoCheckout(branch: string, startPoint?: string): Promise<void>;
107
+ worktreeAddExisting(path: string, branch: string): Promise<void>;
108
+ rebase(onto: string): Promise<void>;
109
+ reset(ref?: string, options?: ResetOptions): Promise<void>;
110
+ raw(args: string[]): Promise<string>;
111
+ addWorktree(path: string, branch: string, startPoint?: string): Promise<void>;
112
+ removeWorktree(path: string, options?: WorktreeRemoveOptions): Promise<void>;
113
+ }
114
+ //# sourceMappingURL=git-validator.ports.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"git-validator.ports.d.ts","sourceRoot":"","sources":["../../src/git/git-validator.ports.ts"],"names":[],"mappings":"AAGA;;;;;;;;;GASG;AAEH;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,yDAAyD;IACzD,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,uCAAuC;IACvC,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,2DAA2D;IAC3D,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,yDAAyD;IACzD,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,2DAA2D;IAC3D,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,2CAA2C;IAC3C,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,8CAA8C;IAC9C,OAAO,EAAE,OAAO,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM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AAM,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3E,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACjE,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACpC,KAAK,CAAC,GAAG,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3D,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IACrC,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9E,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,qBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC9E"}
@@ -0,0 +1,4 @@
1
+ // Copyright (c) 2026 Hellmai Ltd
2
+ // SPDX-License-Identifier: AGPL-3.0-only
3
+ export {};
4
+ //# sourceMappingURL=git-validator.ports.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"git-validator.ports.js","sourceRoot":"","sources":["../../src/git/git-validator.ports.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,yCAAyC"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * @lumenflow/host/git — git adapter cohort (INIT-058 Layer 4b, WU-2682).
3
+ *
4
+ * First host population. Contains git-adapter (simple-git wrapper),
5
+ * git-staged-validator (index-staged path assertions), git-context-extractor
6
+ * (LLM-facing history signal extraction), and the IGitAdapter port.
7
+ */
8
+ export * from './git-adapter.js';
9
+ export * from './git-staged-validator.js';
10
+ export * from './git-context-extractor.js';
11
+ export * from './git-validator.ports.js';
12
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/git/index.ts"],"names":[],"mappings":"AAGA;;;;;;GAMG;AAEH,cAAc,kBAAkB,CAAC;AACjC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,0BAA0B,CAAC"}
@@ -0,0 +1,14 @@
1
+ // Copyright (c) 2026 Hellmai Ltd
2
+ // SPDX-License-Identifier: AGPL-3.0-only
3
+ /**
4
+ * @lumenflow/host/git — git adapter cohort (INIT-058 Layer 4b, WU-2682).
5
+ *
6
+ * First host population. Contains git-adapter (simple-git wrapper),
7
+ * git-staged-validator (index-staged path assertions), git-context-extractor
8
+ * (LLM-facing history signal extraction), and the IGitAdapter port.
9
+ */
10
+ export * from './git-adapter.js';
11
+ export * from './git-staged-validator.js';
12
+ export * from './git-context-extractor.js';
13
+ export * from './git-validator.ports.js';
14
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/git/index.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,yCAAyC;AAEzC;;;;;;GAMG;AAEH,cAAc,kBAAkB,CAAC;AACjC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,0BAA0B,CAAC"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * @lumenflow/host
3
+ *
4
+ * Generic runtime primitives for LumenFlow. Depends on @lumenflow/kernel only.
5
+ * WU-2682 (INIT-058 Layer 4b) populated the first cohort: git adapter, staged
6
+ * validator, context extractor, and their port. Future host layers add other
7
+ * runtime adapters (filesystem, process, worktree) as kernel/pack boundary
8
+ * perfection progresses.
9
+ *
10
+ * See: docs/09-architecture-decisions/ADR-012-kernel-pack-boundary-perfection.md
11
+ * See: docs/09-architecture-decisions/migration-guide-kernel-pack-boundary.md
12
+ */
13
+ export * from './enrollment/index.js';
14
+ export * from './git/index.js';
15
+ export * from './workspace-config/index.js';
16
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;GAWG;AAEH,cAAc,uBAAuB,CAAC;AACtC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,6BAA6B,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,18 @@
1
+ // Copyright (c) 2026 Hellmai Ltd
2
+ // SPDX-License-Identifier: AGPL-3.0-only
3
+ /**
4
+ * @lumenflow/host
5
+ *
6
+ * Generic runtime primitives for LumenFlow. Depends on @lumenflow/kernel only.
7
+ * WU-2682 (INIT-058 Layer 4b) populated the first cohort: git adapter, staged
8
+ * validator, context extractor, and their port. Future host layers add other
9
+ * runtime adapters (filesystem, process, worktree) as kernel/pack boundary
10
+ * perfection progresses.
11
+ *
12
+ * See: docs/09-architecture-decisions/ADR-012-kernel-pack-boundary-perfection.md
13
+ * See: docs/09-architecture-decisions/migration-guide-kernel-pack-boundary.md
14
+ */
15
+ export * from './enrollment/index.js';
16
+ export * from './git/index.js';
17
+ export * from './workspace-config/index.js';
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,yCAAyC;AAEzC;;;;;;;;;;;GAWG;AAEH,cAAc,uBAAuB,CAAC;AACtC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,6BAA6B,CAAC"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Host workspace-config primitives.
3
+ *
4
+ * WU-2684 (INIT-058 L4b): Barrel for the workspace configuration loader that now
5
+ * lives under `@lumenflow/host`. Exposes raw (untyped) loader helpers that depend
6
+ * only on `@lumenflow/kernel` primitives. Typed `LumenFlowConfig` access lives in
7
+ * `@lumenflow/core/config`.
8
+ */
9
+ export * from './lumenflow-config.js';
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/workspace-config/index.ts"],"names":[],"mappings":"AAGA;;;;;;;GAOG;AAEH,cAAc,uBAAuB,CAAC"}
@@ -0,0 +1,12 @@
1
+ // Copyright (c) 2026 Hellmai Ltd
2
+ // SPDX-License-Identifier: AGPL-3.0-only
3
+ /**
4
+ * Host workspace-config primitives.
5
+ *
6
+ * WU-2684 (INIT-058 L4b): Barrel for the workspace configuration loader that now
7
+ * lives under `@lumenflow/host`. Exposes raw (untyped) loader helpers that depend
8
+ * only on `@lumenflow/kernel` primitives. Typed `LumenFlowConfig` access lives in
9
+ * `@lumenflow/core/config`.
10
+ */
11
+ export * from './lumenflow-config.js';
12
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/workspace-config/index.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,yCAAyC;AAEzC;;;;;;;GAOG;AAEH,cAAc,uBAAuB,CAAC"}
@@ -0,0 +1,75 @@
1
+ /** Canonical workspace config file name (workspace-first architecture) */
2
+ export { GIT_DIRECTORY_NAME, GIT_WORKTREES_SENTINEL, WORKSPACE_CONFIG_FILE_NAME, } from '@lumenflow/kernel/primitives/workspace-constants';
3
+ /** WU-2185: Re-export routing constants for config:set workspace-aware routing */
4
+ export { WORKSPACE_ROOT_KEYS, WRITABLE_ROOT_KEYS, MANAGED_ROOT_KEYS, type WorkspaceRootKey, } from '@lumenflow/kernel/primitives/workspace-constants';
5
+ /** Supported package managers for run-script formatting */
6
+ declare const SUPPORTED_PACKAGE_MANAGERS: readonly ["pnpm", "npm", "yarn", "bun"];
7
+ type PackageManager = (typeof SUPPORTED_PACKAGE_MANAGERS)[number];
8
+ /** Presence of canonical workspace config in a project root. */
9
+ export interface ConfigFilePresence {
10
+ workspaceConfigExists: boolean;
11
+ }
12
+ /**
13
+ * Detect whether canonical workspace config file exists.
14
+ *
15
+ * @param projectRoot - Project root directory
16
+ * @returns File presence booleans for canonical workspace config file
17
+ */
18
+ export declare function getConfigFilePresence(projectRoot: string): ConfigFilePresence;
19
+ /**
20
+ * Find project root by looking for workspace.yaml, then .git
21
+ *
22
+ * @param startDir - Directory to start searching from
23
+ * @returns Project root path or current working directory
24
+ */
25
+ export declare function findProjectRoot(startDir?: string): string;
26
+ /**
27
+ * Load config from canonical workspace.yaml `software_delivery` block.
28
+ *
29
+ * Returns a normalized (snake_case→camelCase) raw record. Consumers that need a
30
+ * typed `LumenFlowConfig` should wrap this with `parseConfig()` from
31
+ * `@lumenflow/core/config-schema`.
32
+ *
33
+ * @param projectRoot - Project root directory
34
+ * @returns Raw normalized software-delivery record, or null when unavailable/invalid
35
+ */
36
+ export declare function loadWorkspaceSoftwareDeliveryConfig(projectRoot: string): Record<string, unknown> | null;
37
+ /**
38
+ * Get the project root directory
39
+ *
40
+ * @returns Cached project root or finds it
41
+ */
42
+ export declare function getProjectRoot(): string;
43
+ /**
44
+ * Clear cached project root. Typed-config callers in core wrap this with their
45
+ * own full-config cache reset in `clearConfigCache()`.
46
+ *
47
+ * @see WU-2126
48
+ */
49
+ export declare function clearProjectRootCache(): void;
50
+ /**
51
+ * Resolve the package manager declared in workspace.yaml software_delivery.
52
+ *
53
+ * Minimal loader (kernel-only) for use by `getWorkspaceInitCommand` /
54
+ * `getDocsGenerateCommand`. The full pack-side
55
+ * `@lumenflow/packs-software-delivery/policy/package-manager-resolver` remains the
56
+ * canonical resolver for gates/build-command concerns; host avoids that dep to
57
+ * stay kernel-only.
58
+ *
59
+ * @param projectRoot - Project root directory
60
+ * @returns Resolved package manager (defaults to 'pnpm' if unset/invalid)
61
+ */
62
+ export declare function resolveWorkspacePackageManager(projectRoot: string): PackageManager;
63
+ export declare function getWorkspaceInitCommand(projectRoot?: string): string;
64
+ export declare function getDocsGenerateCommand(projectRoot?: string): string;
65
+ /**
66
+ * Resolve a path relative to project root
67
+ *
68
+ * @param relativePath - Relative path from config
69
+ * @param projectRoot - Optional project root override
70
+ * @returns Absolute path
71
+ */
72
+ export declare function resolvePath(relativePath: string, projectRoot?: string): string;
73
+ /** Expose the loader-scoped warning prefix for consumers that format similar diagnostics. */
74
+ export declare const LUMENFLOW_CONFIG_WARNING_PREFIX = "[lumenflow-config]";
75
+ //# sourceMappingURL=lumenflow-config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lumenflow-config.d.ts","sourceRoot":"","sources":["../../src/workspace-config/lumenflow-config.ts"],"names":[],"mappings":"AAoCA,0EAA0E;AAC1E,OAAO,EACL,kBAAkB,EAClB,sBAAsB,EACtB,0BAA0B,GAC3B,MAAM,kDAAkD,CAAC;AAE1D,kFAAkF;AAClF,OAAO,EACL,mBAAmB,EACnB,kBAAkB,EAClB,iBAAiB,EACjB,KAAK,gBAAgB,GACtB,MAAM,kDAAkD,CAAC;AAY1D,2DAA2D;AAC3D,QAAA,MAAM,0BAA0B,yCAA0C,CAAC;AAC3E,KAAK,cAAc,GAAG,CAAC,OAAO,0BAA0B,CAAC,CAAC,MAAM,CAAC,CAAC;AAMlE,gEAAgE;AAChE,MAAM,WAAW,kBAAkB;IACjC,qBAAqB,EAAE,OAAO,CAAC;CAChC;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,WAAW,EAAE,MAAM,GAAG,kBAAkB,CAI7E;AAeD;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,QAAQ,GAAE,MAAsB,GAAG,MAAM,CAqBxE;AAOD;;;;;;;;;GASG;AACH,wBAAgB,mCAAmC,CACjD,WAAW,EAAE,MAAM,GAClB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAiChC;AAED;;;;GAIG;AACH,wBAAgB,cAAc,IAAI,MAAM,CAMvC;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,IAAI,IAAI,CAE5C;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,8BAA8B,CAAC,WAAW,EAAE,MAAM,GAAG,cAAc,CAclF;AAsBD,wBAAgB,uBAAuB,CAAC,WAAW,GAAE,MAAyB,GAAG,MAAM,CAItF;AAED,wBAAgB,sBAAsB,CAAC,WAAW,GAAE,MAAyB,GAAG,MAAM,CAErF;AAED;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,YAAY,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,CAG9E;AAED,6FAA6F;AAC7F,eAAO,MAAM,+BAA+B,uBAAiB,CAAC"}
@@ -0,0 +1,212 @@
1
+ // Copyright (c) 2026 Hellmai Ltd
2
+ // SPDX-License-Identifier: AGPL-3.0-only
3
+ /**
4
+ * LumenFlow Workspace Configuration — raw loader primitives.
5
+ *
6
+ * WU-2684 (INIT-058 L4b): Moved from `@lumenflow/core/lumenflow-config`. This module
7
+ * now lives under `@lumenflow/host` (ADR-012 host layer) and depends ONLY on
8
+ * `@lumenflow/kernel`. It exposes the primitive loader surface:
9
+ *
10
+ * - project root discovery
11
+ * - workspace config file presence
12
+ * - raw YAML loading for the `software_delivery` block
13
+ * - package manager / run-script formatting helpers
14
+ * - simple path resolution helpers
15
+ *
16
+ * Typed access via the full `LumenFlowConfigSchema` stays in `@lumenflow/core`
17
+ * (see `@lumenflow/core/config`), which wraps these primitives with Zod parsing
18
+ * and full-config caching. Consumers that only need raw workspace data can depend
19
+ * on this module directly; consumers that need a typed `LumenFlowConfig` keep
20
+ * calling `getConfig()` from core.
21
+ *
22
+ * @module @lumenflow/host/workspace-config/lumenflow-config
23
+ */
24
+ import * as fs from 'node:fs';
25
+ import * as path from 'node:path';
26
+ import * as yaml from 'yaml';
27
+ import { GIT_DIRECTORY_NAME, WORKSPACE_CONFIG_FILE_NAME, WORKSPACE_V2_KEYS, } from '@lumenflow/kernel/primitives/workspace-constants';
28
+ import { normalizeConfigKeys } from '@lumenflow/kernel/primitives/normalize-config-keys';
29
+ import { asRecord, isString } from '@lumenflow/kernel/primitives/object-guards';
30
+ /** Canonical workspace config file name (workspace-first architecture) */
31
+ export { GIT_DIRECTORY_NAME, GIT_WORKTREES_SENTINEL, WORKSPACE_CONFIG_FILE_NAME, } from '@lumenflow/kernel/primitives/workspace-constants';
32
+ /** WU-2185: Re-export routing constants for config:set workspace-aware routing */
33
+ export { WORKSPACE_ROOT_KEYS, WRITABLE_ROOT_KEYS, MANAGED_ROOT_KEYS, } from '@lumenflow/kernel/primitives/workspace-constants';
34
+ /** Shared UTF-8 encoding literal for file reads/writes */
35
+ const UTF8_ENCODING = 'utf8';
36
+ /** Warning prefix for config-loading diagnostics */
37
+ const WARNING_PREFIX = '[lumenflow-config]';
38
+ const WORKSPACE_INIT_SCRIPT = 'workspace:init';
39
+ const DOCS_GENERATE_SCRIPT = 'docs:generate';
40
+ const WORKSPACE_INIT_ARGS = ['--yes'];
41
+ /** Supported package managers for run-script formatting */
42
+ const SUPPORTED_PACKAGE_MANAGERS = ['pnpm', 'npm', 'yarn', 'bun'];
43
+ const DEFAULT_PACKAGE_MANAGER = 'pnpm';
44
+ /** Software-delivery field names used for workspace-level package_manager lookup. */
45
+ const SOFTWARE_DELIVERY_PACKAGE_MANAGER_FIELDS = ['package_manager', 'packageManager'];
46
+ /**
47
+ * Detect whether canonical workspace config file exists.
48
+ *
49
+ * @param projectRoot - Project root directory
50
+ * @returns File presence booleans for canonical workspace config file
51
+ */
52
+ export function getConfigFilePresence(projectRoot) {
53
+ return {
54
+ workspaceConfigExists: fs.existsSync(path.join(projectRoot, WORKSPACE_CONFIG_FILE_NAME)),
55
+ };
56
+ }
57
+ /** Cached project root */
58
+ let cachedProjectRoot = null;
59
+ /**
60
+ * Parse YAML content and coerce it to a plain record.
61
+ *
62
+ * @param content - Raw YAML text
63
+ * @returns Parsed object record, or null when parsed content is not an object
64
+ */
65
+ function parseYamlRecord(content) {
66
+ return asRecord(yaml.parse(content));
67
+ }
68
+ /**
69
+ * Find project root by looking for workspace.yaml, then .git
70
+ *
71
+ * @param startDir - Directory to start searching from
72
+ * @returns Project root path or current working directory
73
+ */
74
+ export function findProjectRoot(startDir = process.cwd()) {
75
+ let currentDir = path.resolve(startDir);
76
+ const filesystemRoot = path.parse(currentDir).root;
77
+ while (true) {
78
+ if (fs.existsSync(path.join(currentDir, WORKSPACE_CONFIG_FILE_NAME))) {
79
+ return currentDir;
80
+ }
81
+ if (fs.existsSync(path.join(currentDir, GIT_DIRECTORY_NAME))) {
82
+ return currentDir;
83
+ }
84
+ if (currentDir === filesystemRoot) {
85
+ break;
86
+ }
87
+ currentDir = path.dirname(currentDir);
88
+ }
89
+ return process.cwd();
90
+ }
91
+ /**
92
+ * Canonical workspace-extension key under which software-delivery config lives.
93
+ */
94
+ const SOFTWARE_DELIVERY_KEY = WORKSPACE_V2_KEYS.SOFTWARE_DELIVERY;
95
+ /**
96
+ * Load config from canonical workspace.yaml `software_delivery` block.
97
+ *
98
+ * Returns a normalized (snake_case→camelCase) raw record. Consumers that need a
99
+ * typed `LumenFlowConfig` should wrap this with `parseConfig()` from
100
+ * `@lumenflow/core/config-schema`.
101
+ *
102
+ * @param projectRoot - Project root directory
103
+ * @returns Raw normalized software-delivery record, or null when unavailable/invalid
104
+ */
105
+ export function loadWorkspaceSoftwareDeliveryConfig(projectRoot) {
106
+ const workspacePath = path.join(projectRoot, WORKSPACE_CONFIG_FILE_NAME);
107
+ if (!fs.existsSync(workspacePath)) {
108
+ return null;
109
+ }
110
+ try {
111
+ const content = fs.readFileSync(workspacePath, UTF8_ENCODING);
112
+ const workspaceData = parseYamlRecord(content);
113
+ if (!workspaceData) {
114
+ console.warn(`${WARNING_PREFIX} ${WORKSPACE_CONFIG_FILE_NAME} does not contain a valid object root.`);
115
+ return null;
116
+ }
117
+ const softwareDeliveryRaw = asRecord(workspaceData[SOFTWARE_DELIVERY_KEY]);
118
+ if (!softwareDeliveryRaw) {
119
+ console.warn(`${WARNING_PREFIX} ${WORKSPACE_CONFIG_FILE_NAME} is missing a valid ${SOFTWARE_DELIVERY_KEY} block.`);
120
+ return null;
121
+ }
122
+ // WU-1765: Normalize snake_case YAML keys to camelCase before Zod parsing.
123
+ return normalizeConfigKeys(softwareDeliveryRaw);
124
+ }
125
+ catch (error) {
126
+ console.warn(`${WARNING_PREFIX} Failed to parse ${WORKSPACE_CONFIG_FILE_NAME}:`, error instanceof Error ? error.message : String(error));
127
+ return null;
128
+ }
129
+ }
130
+ /**
131
+ * Get the project root directory
132
+ *
133
+ * @returns Cached project root or finds it
134
+ */
135
+ export function getProjectRoot() {
136
+ if (cachedProjectRoot) {
137
+ return cachedProjectRoot;
138
+ }
139
+ cachedProjectRoot = findProjectRoot();
140
+ return cachedProjectRoot;
141
+ }
142
+ /**
143
+ * Clear cached project root. Typed-config callers in core wrap this with their
144
+ * own full-config cache reset in `clearConfigCache()`.
145
+ *
146
+ * @see WU-2126
147
+ */
148
+ export function clearProjectRootCache() {
149
+ cachedProjectRoot = null;
150
+ }
151
+ /**
152
+ * Resolve the package manager declared in workspace.yaml software_delivery.
153
+ *
154
+ * Minimal loader (kernel-only) for use by `getWorkspaceInitCommand` /
155
+ * `getDocsGenerateCommand`. The full pack-side
156
+ * `@lumenflow/packs-software-delivery/policy/package-manager-resolver` remains the
157
+ * canonical resolver for gates/build-command concerns; host avoids that dep to
158
+ * stay kernel-only.
159
+ *
160
+ * @param projectRoot - Project root directory
161
+ * @returns Resolved package manager (defaults to 'pnpm' if unset/invalid)
162
+ */
163
+ export function resolveWorkspacePackageManager(projectRoot) {
164
+ const softwareDelivery = loadWorkspaceSoftwareDeliveryConfig(projectRoot);
165
+ if (!softwareDelivery) {
166
+ return DEFAULT_PACKAGE_MANAGER;
167
+ }
168
+ for (const field of SOFTWARE_DELIVERY_PACKAGE_MANAGER_FIELDS) {
169
+ const value = softwareDelivery[field];
170
+ if (isString(value) && SUPPORTED_PACKAGE_MANAGERS.includes(value)) {
171
+ return value;
172
+ }
173
+ }
174
+ return DEFAULT_PACKAGE_MANAGER;
175
+ }
176
+ function formatScriptCommand(packageManager, scriptName, args = []) {
177
+ switch (packageManager) {
178
+ case 'npm':
179
+ return args.length > 0
180
+ ? `npm run ${scriptName} -- ${args.join(' ')}`
181
+ : `npm run ${scriptName}`;
182
+ case 'yarn':
183
+ return args.length > 0 ? `yarn ${scriptName} ${args.join(' ')}` : `yarn ${scriptName}`;
184
+ case 'bun':
185
+ return args.length > 0 ? `bun run ${scriptName} ${args.join(' ')}` : `bun run ${scriptName}`;
186
+ case 'pnpm':
187
+ default:
188
+ return args.length > 0 ? `pnpm ${scriptName} ${args.join(' ')}` : `pnpm ${scriptName}`;
189
+ }
190
+ }
191
+ export function getWorkspaceInitCommand(projectRoot = getProjectRoot()) {
192
+ return formatScriptCommand(resolveWorkspacePackageManager(projectRoot), WORKSPACE_INIT_SCRIPT, [
193
+ ...WORKSPACE_INIT_ARGS,
194
+ ]);
195
+ }
196
+ export function getDocsGenerateCommand(projectRoot = getProjectRoot()) {
197
+ return formatScriptCommand(resolveWorkspacePackageManager(projectRoot), DOCS_GENERATE_SCRIPT);
198
+ }
199
+ /**
200
+ * Resolve a path relative to project root
201
+ *
202
+ * @param relativePath - Relative path from config
203
+ * @param projectRoot - Optional project root override
204
+ * @returns Absolute path
205
+ */
206
+ export function resolvePath(relativePath, projectRoot) {
207
+ const root = projectRoot || getProjectRoot();
208
+ return path.join(root, relativePath);
209
+ }
210
+ /** Expose the loader-scoped warning prefix for consumers that format similar diagnostics. */
211
+ export const LUMENFLOW_CONFIG_WARNING_PREFIX = WARNING_PREFIX;
212
+ //# sourceMappingURL=lumenflow-config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lumenflow-config.js","sourceRoot":"","sources":["../../src/workspace-config/lumenflow-config.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,yCAAyC;AAEzC;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,KAAK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mB;KACvB,CAAC,CAAC;AACL,CAAC;AAED,MAAM,UAAU,sBAAsB,CAAC,cAAsB,cAAc,EAAE;IAC3E,OAAO,mBAAmB,CAAC,8BAA8B,CAAC,WAAW,CAAC,EAAE,oBAAoB,CAAC,CAAC;AAChG,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,WAAW,CAAC,YAAoB,EAAE,WAAoB;IACpE,MAAM,IAAI,GAAG,WAAW,IAAI,cAAc,EAAE,CAAC;IAC7C,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC;AACvC,CAAC;AAED,6FAA6F;AAC7F,MAAM,CAAC,MAAM,+BAA+B,GAAG,cAAc,CAAC"}
package/package.json ADDED
@@ -0,0 +1,65 @@
1
+ {
2
+ "name": "@lumenflow/host",
3
+ "version": "5.0.2",
4
+ "description": "Generic runtime primitives for LumenFlow (ADR-012 host layer)",
5
+ "keywords": [
6
+ "lumenflow",
7
+ "host",
8
+ "runtime"
9
+ ],
10
+ "homepage": "https://github.com/hellmai/lumenflow",
11
+ "repository": {
12
+ "type": "git",
13
+ "url": "https://github.com/hellmai/lumenflow.git",
14
+ "directory": "packages/@lumenflow/host"
15
+ },
16
+ "license": "AGPL-3.0-only",
17
+ "author": {
18
+ "name": "LumenFlow Contributors",
19
+ "url": "https://lumenflow.dev"
20
+ },
21
+ "type": "module",
22
+ "main": "./dist/index.js",
23
+ "types": "./dist/index.d.ts",
24
+ "exports": {
25
+ ".": "./dist/index.js",
26
+ "./enrollment": "./dist/enrollment/index.js",
27
+ "./enrollment/phone-device": "./dist/enrollment/phone-device.js",
28
+ "./git": "./dist/git/index.js",
29
+ "./git/git-adapter": "./dist/git/git-adapter.js",
30
+ "./git/git-staged-validator": "./dist/git/git-staged-validator.js",
31
+ "./git/git-context-extractor": "./dist/git/git-context-extractor.js",
32
+ "./git/git-validator.ports": "./dist/git/git-validator.ports.js",
33
+ "./workspace-config": "./dist/workspace-config/index.js",
34
+ "./workspace-config/lumenflow-config": "./dist/workspace-config/lumenflow-config.js"
35
+ },
36
+ "files": [
37
+ "dist",
38
+ "README.md"
39
+ ],
40
+ "dependencies": {
41
+ "simple-git": "^3.31.1",
42
+ "yaml": "^2.8.2",
43
+ "@lumenflow/control-plane-sdk": "5.0.2",
44
+ "@lumenflow/kernel": "5.0.2"
45
+ },
46
+ "devDependencies": {
47
+ "@types/node": "^22.19.6",
48
+ "@vitest/coverage-v8": "^4.0.18",
49
+ "typescript": "^5.9.3",
50
+ "vitest": "^4.0.18"
51
+ },
52
+ "engines": {
53
+ "node": ">=22"
54
+ },
55
+ "publishConfig": {
56
+ "access": "public"
57
+ },
58
+ "scripts": {
59
+ "build": "tsc",
60
+ "clean": "rm -rf dist *.tgz",
61
+ "test": "vitest run --root ../../.. packages/@lumenflow/host/__tests__",
62
+ "lint": "eslint src --quiet --rule no-console:off --rule @typescript-eslint/no-unused-vars:off --rule sonarjs/concise-regex:off",
63
+ "typecheck": "tsc --noEmit"
64
+ }
65
+ }