@lumenflow/core 4.23.0 → 5.0.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/arg-parser.d.ts.map +1 -1
- package/dist/arg-parser.js +16 -0
- package/dist/arg-parser.js.map +1 -1
- package/dist/atomic-merge.d.ts.map +1 -1
- package/dist/atomic-merge.js +25 -18
- package/dist/atomic-merge.js.map +1 -1
- package/dist/client-ids.d.ts +1 -15
- package/dist/client-ids.d.ts.map +1 -1
- package/dist/client-ids.js +4 -13
- package/dist/client-ids.js.map +1 -1
- package/dist/code-path-validator.d.ts.map +1 -1
- package/dist/code-path-validator.js +6 -3
- package/dist/code-path-validator.js.map +1 -1
- package/dist/config-contract.d.ts +1 -30
- package/dist/config-contract.d.ts.map +1 -1
- package/dist/config-contract.js +4 -60
- package/dist/config-contract.js.map +1 -1
- package/dist/constants/backlog-patterns.d.ts +1 -20
- package/dist/constants/backlog-patterns.d.ts.map +1 -1
- package/dist/constants/backlog-patterns.js +2 -23
- package/dist/constants/backlog-patterns.js.map +1 -1
- package/dist/constants/dora-constants.d.ts +19 -2
- package/dist/constants/dora-constants.d.ts.map +1 -1
- package/dist/constants/dora-constants.js +20 -2
- package/dist/constants/dora-constants.js.map +1 -1
- package/dist/constants/duration-constants.d.ts +1 -28
- package/dist/constants/duration-constants.d.ts.map +1 -1
- package/dist/constants/duration-constants.js +4 -28
- package/dist/constants/duration-constants.js.map +1 -1
- package/dist/constants/gate-constants.d.ts +1 -23
- package/dist/constants/gate-constants.d.ts.map +1 -1
- package/dist/constants/gate-constants.js +4 -23
- package/dist/constants/gate-constants.js.map +1 -1
- package/dist/constants/index.d.ts +1 -1
- package/dist/constants/index.d.ts.map +1 -1
- package/dist/constants/index.js +1 -1
- package/dist/constants/index.js.map +1 -1
- package/dist/constants/lock-constants.d.ts +1 -28
- package/dist/constants/lock-constants.d.ts.map +1 -1
- package/dist/constants/lock-constants.js +2 -28
- package/dist/constants/lock-constants.js.map +1 -1
- package/dist/core/tool.schemas.d.ts +11 -11
- package/dist/core/worktree-guard.js +2 -2
- package/dist/core/worktree-guard.js.map +1 -1
- package/dist/cycle-detector.d.ts +4 -48
- package/dist/cycle-detector.d.ts.map +1 -1
- package/dist/cycle-detector.js +4 -78
- package/dist/cycle-detector.js.map +1 -1
- package/dist/date-utils.d.ts +1 -65
- package/dist/date-utils.d.ts.map +1 -1
- package/dist/date-utils.js +4 -140
- package/dist/date-utils.js.map +1 -1
- package/dist/delegation-monitor.d.ts +2 -0
- package/dist/delegation-monitor.d.ts.map +1 -1
- package/dist/delegation-monitor.js +29 -2
- package/dist/delegation-monitor.js.map +1 -1
- package/dist/delegation-recovery.d.ts +36 -17
- package/dist/delegation-recovery.d.ts.map +1 -1
- package/dist/delegation-recovery.js +285 -82
- package/dist/delegation-recovery.js.map +1 -1
- package/dist/delegation-registry-schema.d.ts +257 -31
- package/dist/delegation-registry-schema.d.ts.map +1 -1
- package/dist/delegation-registry-schema.js +43 -34
- package/dist/delegation-registry-schema.js.map +1 -1
- package/dist/delegation-registry-store.d.ts +4 -128
- package/dist/delegation-registry-store.d.ts.map +1 -1
- package/dist/delegation-registry-store.js +39 -178
- package/dist/delegation-registry-store.js.map +1 -1
- package/dist/delegation-tree.d.ts +12 -20
- package/dist/delegation-tree.d.ts.map +1 -1
- package/dist/delegation-tree.js +40 -29
- package/dist/delegation-tree.js.map +1 -1
- package/dist/delivery-review-contract.d.ts +1 -1
- package/dist/delivery-review-contract.d.ts.map +1 -1
- package/dist/docs-layout-presets.d.ts +1 -30
- package/dist/docs-layout-presets.d.ts.map +1 -1
- package/dist/docs-layout-presets.js +4 -38
- package/dist/docs-layout-presets.js.map +1 -1
- package/dist/domain/context.schemas.d.ts +3 -3
- package/dist/domain/orchestration.constants.d.ts +1 -110
- package/dist/domain/orchestration.constants.d.ts.map +1 -1
- package/dist/domain/orchestration.constants.js +2 -127
- package/dist/domain/orchestration.constants.js.map +1 -1
- package/dist/domain/orchestration.schemas.d.ts +1 -306
- package/dist/domain/orchestration.schemas.d.ts.map +1 -1
- package/dist/domain/orchestration.schemas.js +2 -211
- package/dist/domain/orchestration.schemas.js.map +1 -1
- package/dist/domain/orchestration.types.d.ts +1 -133
- package/dist/domain/orchestration.types.d.ts.map +1 -1
- package/dist/domain/orchestration.types.js +2 -2
- package/dist/domain/orchestration.types.js.map +1 -1
- package/dist/domain/recovery.schemas.d.ts +3 -3
- package/dist/domain/validation.schemas.d.ts +4 -4
- package/dist/error-handler.d.ts +4 -173
- package/dist/error-handler.d.ts.map +1 -1
- package/dist/error-handler.js +4 -244
- package/dist/error-handler.js.map +1 -1
- package/dist/file-classifiers.d.ts.map +1 -1
- package/dist/file-classifiers.js +26 -0
- package/dist/file-classifiers.js.map +1 -1
- package/dist/git-adapter.d.ts +4 -448
- package/dist/git-adapter.d.ts.map +1 -1
- package/dist/git-adapter.js +4 -772
- package/dist/git-adapter.js.map +1 -1
- package/dist/git-context-extractor.d.ts +4 -98
- package/dist/git-context-extractor.d.ts.map +1 -1
- package/dist/git-context-extractor.js +4 -563
- package/dist/git-context-extractor.js.map +1 -1
- package/dist/git-staged-validator.d.ts +4 -29
- package/dist/git-staged-validator.d.ts.map +1 -1
- package/dist/git-staged-validator.js +4 -46
- package/dist/git-staged-validator.js.map +1 -1
- package/dist/incremental-lint.d.ts.map +1 -1
- package/dist/incremental-lint.js +3 -2
- package/dist/incremental-lint.js.map +1 -1
- package/dist/incremental-test.d.ts +1 -32
- package/dist/incremental-test.d.ts.map +1 -1
- package/dist/incremental-test.js +4 -61
- package/dist/incremental-test.js.map +1 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -2
- package/dist/index.js.map +1 -1
- package/dist/integration-target.d.ts +30 -0
- package/dist/integration-target.d.ts.map +1 -0
- package/dist/integration-target.js +51 -0
- package/dist/integration-target.js.map +1 -0
- package/dist/lane-checker.d.ts.map +1 -1
- package/dist/lane-checker.js +8 -0
- package/dist/lane-checker.js.map +1 -1
- package/dist/lumenflow-config-schema.d.ts +73 -29
- package/dist/lumenflow-config-schema.d.ts.map +1 -1
- package/dist/lumenflow-config-schema.js +1 -1
- package/dist/lumenflow-config-schema.js.map +1 -1
- package/dist/lumenflow-config.d.ts +10 -34
- package/dist/lumenflow-config.d.ts.map +1 -1
- package/dist/lumenflow-config.js +32 -142
- package/dist/lumenflow-config.js.map +1 -1
- package/dist/manual-test-validator.d.ts +1 -96
- package/dist/manual-test-validator.d.ts.map +1 -1
- package/dist/manual-test-validator.js +4 -245
- package/dist/manual-test-validator.js.map +1 -1
- package/dist/micro-worktree-shared.d.ts.map +1 -1
- package/dist/micro-worktree-shared.js +10 -9
- package/dist/micro-worktree-shared.js.map +1 -1
- package/dist/micro-worktree.d.ts.map +1 -1
- package/dist/micro-worktree.js +26 -23
- package/dist/micro-worktree.js.map +1 -1
- package/dist/normalize-config-keys.d.ts +1 -10
- package/dist/normalize-config-keys.d.ts.map +1 -1
- package/dist/normalize-config-keys.js +7 -73
- package/dist/normalize-config-keys.js.map +1 -1
- package/dist/object-guards.d.ts +1 -10
- package/dist/object-guards.d.ts.map +1 -1
- package/dist/object-guards.js +7 -20
- package/dist/object-guards.js.map +1 -1
- package/dist/ports/config.ports.d.ts +1 -82
- package/dist/ports/config.ports.d.ts.map +1 -1
- package/dist/ports/config.ports.js +2 -1
- package/dist/ports/config.ports.js.map +1 -1
- package/dist/ports/dashboard-renderer.port.d.ts +1 -112
- package/dist/ports/dashboard-renderer.port.d.ts.map +1 -1
- package/dist/ports/dashboard-renderer.port.js +2 -1
- package/dist/ports/dashboard-renderer.port.js.map +1 -1
- package/dist/ports/git-validator.ports.d.ts +5 -110
- package/dist/ports/git-validator.ports.d.ts.map +1 -1
- package/dist/ports/git-validator.ports.js +8 -1
- package/dist/ports/git-validator.ports.js.map +1 -1
- package/dist/ports/sync-validator.ports.d.ts +1 -51
- package/dist/ports/sync-validator.ports.d.ts.map +1 -1
- package/dist/ports/sync-validator.ports.js +2 -1
- package/dist/ports/sync-validator.ports.js.map +1 -1
- package/dist/ports/wu-helpers.ports.d.ts +1 -156
- package/dist/ports/wu-helpers.ports.d.ts.map +1 -1
- package/dist/ports/wu-helpers.ports.js +2 -1
- package/dist/ports/wu-helpers.ports.js.map +1 -1
- package/dist/ports/wu-state.ports.d.ts +1 -208
- package/dist/ports/wu-state.ports.d.ts.map +1 -1
- package/dist/ports/wu-state.ports.js +2 -1
- package/dist/ports/wu-state.ports.js.map +1 -1
- package/dist/rebase-artifact-cleanup.d.ts.map +1 -1
- package/dist/rebase-artifact-cleanup.js +6 -3
- package/dist/rebase-artifact-cleanup.js.map +1 -1
- package/dist/sandbox-allowlist.d.ts +1 -15
- package/dist/sandbox-allowlist.d.ts.map +1 -1
- package/dist/sandbox-allowlist.js +4 -74
- package/dist/sandbox-allowlist.js.map +1 -1
- package/dist/sandbox-backend-linux.d.ts +1 -5
- package/dist/sandbox-backend-linux.d.ts.map +1 -1
- package/dist/sandbox-backend-linux.js +4 -64
- package/dist/sandbox-backend-linux.js.map +1 -1
- package/dist/sandbox-backend-macos.d.ts +1 -5
- package/dist/sandbox-backend-macos.d.ts.map +1 -1
- package/dist/sandbox-backend-macos.js +4 -109
- package/dist/sandbox-backend-macos.js.map +1 -1
- package/dist/sandbox-backend-windows.d.ts +1 -5
- package/dist/sandbox-backend-windows.d.ts.map +1 -1
- package/dist/sandbox-backend-windows.js +4 -27
- package/dist/sandbox-backend-windows.js.map +1 -1
- package/dist/sandbox-profile.d.ts +1 -57
- package/dist/sandbox-profile.d.ts.map +1 -1
- package/dist/sandbox-profile.js +4 -65
- package/dist/sandbox-profile.js.map +1 -1
- package/dist/schemas/agents-config.d.ts +47 -0
- package/dist/schemas/agents-config.d.ts.map +1 -1
- package/dist/schemas/agents-config.js +59 -0
- package/dist/schemas/agents-config.js.map +1 -1
- package/dist/schemas/command-schemas.d.ts +4 -4
- package/dist/schemas/flow-arg-validators.d.ts +2 -2
- package/dist/schemas/flow-schemas.d.ts +4 -4
- package/dist/schemas/gates-section-config.d.ts +32 -13
- package/dist/schemas/gates-section-config.d.ts.map +1 -1
- package/dist/schemas/gates-section-config.js +16 -1
- package/dist/schemas/gates-section-config.js.map +1 -1
- package/dist/schemas/initiative-arg-validators.d.ts +2 -2
- package/dist/schemas/initiative-schemas.d.ts +12 -12
- package/dist/schemas/lanes-config.d.ts +5 -5
- package/dist/schemas/memory-arg-validators.d.ts +6 -0
- package/dist/schemas/memory-arg-validators.d.ts.map +1 -1
- package/dist/schemas/memory-config.d.ts +4 -4
- package/dist/schemas/memory-schemas.d.ts +12 -0
- package/dist/schemas/memory-schemas.d.ts.map +1 -1
- package/dist/schemas/memory-schemas.js +12 -0
- package/dist/schemas/memory-schemas.js.map +1 -1
- package/dist/schemas/operational-config.d.ts +4 -4
- package/dist/schemas/setup-arg-validators.d.ts +3 -3
- package/dist/schemas/setup-schemas.d.ts +8 -8
- package/dist/schemas/wu-config.d.ts +3 -3
- package/dist/schemas/wu-lifecycle-arg-validators.d.ts +2 -2
- package/dist/schemas/wu-lifecycle-schemas.d.ts +4 -4
- package/dist/section-headings.d.ts +1 -34
- package/dist/section-headings.d.ts.map +1 -1
- package/dist/section-headings.js +2 -51
- package/dist/section-headings.js.map +1 -1
- package/dist/spawn-constraints-generator.js +3 -3
- package/dist/spawn-constraints-generator.js.map +1 -1
- package/dist/spawn-guidance-generators.d.ts +1 -1
- package/dist/spawn-guidance-generators.d.ts.map +1 -1
- package/dist/spawn-policy-resolver.d.ts +1 -1
- package/dist/spawn-policy-resolver.d.ts.map +1 -1
- package/dist/spawn-task-builder.d.ts +17 -1
- package/dist/spawn-task-builder.d.ts.map +1 -1
- package/dist/spawn-task-builder.js +63 -1
- package/dist/spawn-task-builder.js.map +1 -1
- package/dist/spawn-template-assembler.d.ts +1 -1
- package/dist/spawn-template-assembler.d.ts.map +1 -1
- package/dist/state-machine.d.ts +1 -9
- package/dist/state-machine.d.ts.map +1 -1
- package/dist/state-machine.js +2 -86
- package/dist/state-machine.js.map +1 -1
- package/dist/sync-validator.d.ts.map +1 -1
- package/dist/sync-validator.js +15 -12
- package/dist/sync-validator.js.map +1 -1
- package/dist/telemetry.d.ts +20 -6
- package/dist/telemetry.d.ts.map +1 -1
- package/dist/telemetry.js +27 -6
- package/dist/telemetry.js.map +1 -1
- package/dist/work-classifier.d.ts +1 -102
- package/dist/work-classifier.d.ts.map +1 -1
- package/dist/work-classifier.js +2 -424
- package/dist/work-classifier.js.map +1 -1
- package/dist/worktree-symlink.d.ts +2 -2
- package/dist/worktree-symlink.d.ts.map +1 -1
- package/dist/worktree-symlink.js +37 -12
- package/dist/worktree-symlink.js.map +1 -1
- package/dist/wu-cli-constants.d.ts +1 -433
- package/dist/wu-cli-constants.d.ts.map +1 -1
- package/dist/wu-cli-constants.js +4 -436
- package/dist/wu-cli-constants.js.map +1 -1
- package/dist/wu-consistency-file-repairs.d.ts.map +1 -1
- package/dist/wu-consistency-file-repairs.js +5 -3
- package/dist/wu-consistency-file-repairs.js.map +1 -1
- package/dist/wu-context-constants.d.ts +22 -0
- package/dist/wu-context-constants.d.ts.map +1 -1
- package/dist/wu-context-constants.js +22 -0
- package/dist/wu-context-constants.js.map +1 -1
- package/dist/wu-doc-types.d.ts +1 -47
- package/dist/wu-doc-types.d.ts.map +1 -1
- package/dist/wu-domain-constants.d.ts +1 -295
- package/dist/wu-domain-constants.d.ts.map +1 -1
- package/dist/wu-domain-constants.js +4 -397
- package/dist/wu-domain-constants.js.map +1 -1
- package/dist/wu-done-branch-only.d.ts +1 -1
- package/dist/wu-done-branch-only.d.ts.map +1 -1
- package/dist/wu-done-branch-only.js +22 -13
- package/dist/wu-done-branch-only.js.map +1 -1
- package/dist/wu-done-branch-utils.d.ts.map +1 -1
- package/dist/wu-done-branch-utils.js +5 -3
- package/dist/wu-done-branch-utils.js.map +1 -1
- package/dist/wu-done-cleanup.d.ts.map +1 -1
- package/dist/wu-done-cleanup.js +66 -22
- package/dist/wu-done-cleanup.js.map +1 -1
- package/dist/wu-done-concurrent-merge.d.ts.map +1 -1
- package/dist/wu-done-concurrent-merge.js +9 -6
- package/dist/wu-done-concurrent-merge.js.map +1 -1
- package/dist/wu-done-errors.d.ts +3 -3
- package/dist/wu-done-errors.d.ts.map +1 -1
- package/dist/wu-done-inputs.d.ts.map +1 -1
- package/dist/wu-done-inputs.js +3 -0
- package/dist/wu-done-inputs.js.map +1 -1
- package/dist/wu-done-merge-phase.d.ts.map +1 -1
- package/dist/wu-done-merge-phase.js +4 -2
- package/dist/wu-done-merge-phase.js.map +1 -1
- package/dist/wu-done-merge.d.ts.map +1 -1
- package/dist/wu-done-merge.js +16 -8
- package/dist/wu-done-merge.js.map +1 -1
- package/dist/wu-done-merged-worktree.d.ts.map +1 -1
- package/dist/wu-done-merged-worktree.js +7 -8
- package/dist/wu-done-merged-worktree.js.map +1 -1
- package/dist/wu-done-messages.d.ts.map +1 -1
- package/dist/wu-done-messages.js +12 -5
- package/dist/wu-done-messages.js.map +1 -1
- package/dist/wu-done-metadata.d.ts.map +1 -1
- package/dist/wu-done-metadata.js +3 -8
- package/dist/wu-done-metadata.js.map +1 -1
- package/dist/wu-done-preflight-checks.d.ts.map +1 -1
- package/dist/wu-done-preflight-checks.js +21 -15
- package/dist/wu-done-preflight-checks.js.map +1 -1
- package/dist/wu-done-rebase.d.ts.map +1 -1
- package/dist/wu-done-rebase.js +10 -8
- package/dist/wu-done-rebase.js.map +1 -1
- package/dist/wu-done-retry-helpers.d.ts.map +1 -1
- package/dist/wu-done-retry-helpers.js +13 -11
- package/dist/wu-done-retry-helpers.js.map +1 -1
- package/dist/wu-done-validation.d.ts.map +1 -1
- package/dist/wu-done-validation.js +4 -2
- package/dist/wu-done-validation.js.map +1 -1
- package/dist/wu-done-worktree-services.d.ts.map +1 -1
- package/dist/wu-done-worktree-services.js +4 -2
- package/dist/wu-done-worktree-services.js.map +1 -1
- package/dist/wu-done-worktree.d.ts.map +1 -1
- package/dist/wu-done-worktree.js +4 -2
- package/dist/wu-done-worktree.js.map +1 -1
- package/dist/wu-git-constants.d.ts +1 -175
- package/dist/wu-git-constants.d.ts.map +1 -1
- package/dist/wu-git-constants.js +4 -175
- package/dist/wu-git-constants.js.map +1 -1
- package/dist/wu-helpers.d.ts +24 -0
- package/dist/wu-helpers.d.ts.map +1 -1
- package/dist/wu-helpers.js +37 -4
- package/dist/wu-helpers.js.map +1 -1
- package/dist/wu-id-format.d.ts +1 -137
- package/dist/wu-id-format.d.ts.map +1 -1
- package/dist/wu-id-format.js +2 -249
- package/dist/wu-id-format.js.map +1 -1
- package/dist/wu-id-generator.d.ts.map +1 -1
- package/dist/wu-id-generator.js +8 -5
- package/dist/wu-id-generator.js.map +1 -1
- package/dist/wu-paths-constants.d.ts +1 -253
- package/dist/wu-paths-constants.d.ts.map +1 -1
- package/dist/wu-paths-constants.js +4 -273
- package/dist/wu-paths-constants.js.map +1 -1
- package/dist/wu-paths.d.ts +1 -274
- package/dist/wu-paths.d.ts.map +1 -1
- package/dist/wu-paths.js +4 -236
- package/dist/wu-paths.js.map +1 -1
- package/dist/wu-rules-resolvers.d.ts.map +1 -1
- package/dist/wu-rules-resolvers.js +11 -6
- package/dist/wu-rules-resolvers.js.map +1 -1
- package/dist/wu-schema.d.ts +1 -830
- package/dist/wu-schema.d.ts.map +1 -1
- package/dist/wu-schema.js +4 -929
- package/dist/wu-schema.js.map +1 -1
- package/dist/wu-spawn-helpers.d.ts.map +1 -1
- package/dist/wu-spawn-helpers.js +5 -2
- package/dist/wu-spawn-helpers.js.map +1 -1
- package/dist/wu-spawn.d.ts +2 -2
- package/dist/wu-spawn.d.ts.map +1 -1
- package/dist/wu-spawn.js +2 -2
- package/dist/wu-spawn.js.map +1 -1
- package/dist/wu-state-schema.d.ts +1 -291
- package/dist/wu-state-schema.d.ts.map +1 -1
- package/dist/wu-state-schema.js +4 -212
- package/dist/wu-state-schema.js.map +1 -1
- package/dist/wu-status-transition.d.ts +3 -1
- package/dist/wu-status-transition.d.ts.map +1 -1
- package/dist/wu-status-transition.js +9 -24
- package/dist/wu-status-transition.js.map +1 -1
- package/dist/wu-statuses.d.ts +1 -208
- package/dist/wu-statuses.d.ts.map +1 -1
- package/dist/wu-statuses.js +4 -242
- package/dist/wu-statuses.js.map +1 -1
- package/dist/wu-transaction-collectors.d.ts +1 -0
- package/dist/wu-transaction-collectors.d.ts.map +1 -1
- package/dist/wu-transaction-collectors.js +13 -8
- package/dist/wu-transaction-collectors.js.map +1 -1
- package/dist/wu-type-helpers.d.ts +1 -27
- package/dist/wu-type-helpers.d.ts.map +1 -1
- package/dist/wu-type-helpers.js +4 -46
- package/dist/wu-type-helpers.js.map +1 -1
- package/dist/wu-ui-constants.d.ts +1 -235
- package/dist/wu-ui-constants.d.ts.map +1 -1
- package/dist/wu-ui-constants.js +5 -235
- package/dist/wu-ui-constants.js.map +1 -1
- package/dist/wu-validation-constants.d.ts +1 -60
- package/dist/wu-validation-constants.d.ts.map +1 -1
- package/dist/wu-validation-constants.js +4 -66
- package/dist/wu-validation-constants.js.map +1 -1
- package/dist/wu-yaml.d.ts +1 -112
- package/dist/wu-yaml.d.ts.map +1 -1
- package/dist/wu-yaml.js +4 -304
- package/dist/wu-yaml.js.map +1 -1
- package/package.json +12 -9
- package/dist/coverage-gate.d.ts +0 -128
- package/dist/coverage-gate.d.ts.map +0 -1
- package/dist/coverage-gate.js +0 -211
- package/dist/coverage-gate.js.map +0 -1
- package/dist/gates-agent-mode.d.ts +0 -108
- package/dist/gates-agent-mode.d.ts.map +0 -1
- package/dist/gates-agent-mode.js +0 -138
- package/dist/gates-agent-mode.js.map +0 -1
- package/dist/gates-config-internal.d.ts +0 -54
- package/dist/gates-config-internal.d.ts.map +0 -1
- package/dist/gates-config-internal.js +0 -107
- package/dist/gates-config-internal.js.map +0 -1
- package/dist/gates-config.d.ts +0 -68
- package/dist/gates-config.d.ts.map +0 -1
- package/dist/gates-config.js +0 -193
- package/dist/gates-config.js.map +0 -1
- package/dist/gates-coverage.d.ts +0 -42
- package/dist/gates-coverage.d.ts.map +0 -1
- package/dist/gates-coverage.js +0 -162
- package/dist/gates-coverage.js.map +0 -1
- package/dist/gates-presets.d.ts +0 -52
- package/dist/gates-presets.d.ts.map +0 -1
- package/dist/gates-presets.js +0 -117
- package/dist/gates-presets.js.map +0 -1
- package/dist/gates-schemas.d.ts +0 -143
- package/dist/gates-schemas.d.ts.map +0 -1
- package/dist/gates-schemas.js +0 -67
- package/dist/gates-schemas.js.map +0 -1
- package/dist/package-manager-resolver.d.ts +0 -80
- package/dist/package-manager-resolver.d.ts.map +0 -1
- package/dist/package-manager-resolver.js +0 -245
- package/dist/package-manager-resolver.js.map +0 -1
- package/dist/resolve-policy.d.ts +0 -293
- package/dist/resolve-policy.d.ts.map +0 -1
- package/dist/resolve-policy.js +0 -303
- package/dist/resolve-policy.js.map +0 -1
|
@@ -33,7 +33,7 @@ export * from './schemas/agents-config.js';
|
|
|
33
33
|
export * from './schemas/lanes-config.js';
|
|
34
34
|
export * from './schemas/cloud-config.js';
|
|
35
35
|
export * from './schemas/operational-config.js';
|
|
36
|
-
export type { MethodologyConfig, MethodologyOverrides, WorkClassificationUi, WorkClassificationSchemaConfig, } from '
|
|
36
|
+
export type { MethodologyConfig, MethodologyOverrides, WorkClassificationUi, WorkClassificationSchemaConfig, } from '@lumenflow/packs-software-delivery/policy/resolve-policy';
|
|
37
37
|
/**
|
|
38
38
|
* Complete LumenFlow configuration schema
|
|
39
39
|
*
|
|
@@ -113,8 +113,8 @@ export declare const LumenFlowConfigSchema: z.ZodObject<{
|
|
|
113
113
|
defaultType: z.ZodDefault<z.ZodString>;
|
|
114
114
|
brief: z.ZodDefault<z.ZodObject<{
|
|
115
115
|
policyMode: z.ZodDefault<z.ZodEnum<{
|
|
116
|
-
manual: "manual";
|
|
117
116
|
off: "off";
|
|
117
|
+
manual: "manual";
|
|
118
118
|
auto: "auto";
|
|
119
119
|
required: "required";
|
|
120
120
|
}>>;
|
|
@@ -139,9 +139,26 @@ export declare const LumenFlowConfigSchema: z.ZodObject<{
|
|
|
139
139
|
enableInvariants: z.ZodDefault<z.ZodBoolean>;
|
|
140
140
|
tdd_diff_evidence: z.ZodOptional<z.ZodObject<{
|
|
141
141
|
mode: z.ZodOptional<z.ZodEnum<{
|
|
142
|
-
|
|
142
|
+
off: "off";
|
|
143
143
|
warn: "warn";
|
|
144
|
+
block: "block";
|
|
145
|
+
}>>;
|
|
146
|
+
applies_to_types: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
147
|
+
feature: "feature";
|
|
148
|
+
bug: "bug";
|
|
149
|
+
documentation: "documentation";
|
|
150
|
+
process: "process";
|
|
151
|
+
tooling: "tooling";
|
|
152
|
+
chore: "chore";
|
|
153
|
+
refactor: "refactor";
|
|
154
|
+
}>>>;
|
|
155
|
+
exempt_paths: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
156
|
+
}, z.core.$strip>>;
|
|
157
|
+
tdd_ordering: z.ZodOptional<z.ZodObject<{
|
|
158
|
+
mode: z.ZodOptional<z.ZodEnum<{
|
|
144
159
|
off: "off";
|
|
160
|
+
warn: "warn";
|
|
161
|
+
block: "block";
|
|
145
162
|
}>>;
|
|
146
163
|
applies_to_types: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
147
164
|
feature: "feature";
|
|
@@ -152,6 +169,8 @@ export declare const LumenFlowConfigSchema: z.ZodObject<{
|
|
|
152
169
|
chore: "chore";
|
|
153
170
|
refactor: "refactor";
|
|
154
171
|
}>>>;
|
|
172
|
+
min_runtime_loc_per_commit_without_tests: z.ZodOptional<z.ZodNumber>;
|
|
173
|
+
grace_commits: z.ZodOptional<z.ZodNumber>;
|
|
155
174
|
exempt_paths: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
156
175
|
}, z.core.$strip>>;
|
|
157
176
|
execution: z.ZodOptional<z.ZodObject<{
|
|
@@ -197,18 +216,18 @@ export declare const LumenFlowConfigSchema: z.ZodObject<{
|
|
|
197
216
|
}, z.core.$strip>>;
|
|
198
217
|
ignore_patterns: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
199
218
|
lane_health: z.ZodDefault<z.ZodEnum<{
|
|
200
|
-
warn: "warn";
|
|
201
|
-
off: "off";
|
|
202
219
|
error: "error";
|
|
220
|
+
off: "off";
|
|
221
|
+
warn: "warn";
|
|
203
222
|
}>>;
|
|
204
223
|
co_change: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
205
224
|
name: z.ZodString;
|
|
206
225
|
trigger_patterns: z.ZodArray<z.ZodString>;
|
|
207
226
|
require_patterns: z.ZodArray<z.ZodString>;
|
|
208
227
|
severity: z.ZodDefault<z.ZodEnum<{
|
|
209
|
-
warn: "warn";
|
|
210
|
-
off: "off";
|
|
211
228
|
error: "error";
|
|
229
|
+
off: "off";
|
|
230
|
+
warn: "warn";
|
|
212
231
|
}>>;
|
|
213
232
|
guidance: z.ZodOptional<z.ZodString>;
|
|
214
233
|
guidance_ref: z.ZodOptional<z.ZodString>;
|
|
@@ -218,9 +237,9 @@ export declare const LumenFlowConfigSchema: z.ZodObject<{
|
|
|
218
237
|
trigger_patterns: z.ZodArray<z.ZodString>;
|
|
219
238
|
command: z.ZodString;
|
|
220
239
|
severity: z.ZodDefault<z.ZodEnum<{
|
|
221
|
-
warn: "warn";
|
|
222
|
-
off: "off";
|
|
223
240
|
error: "error";
|
|
241
|
+
off: "off";
|
|
242
|
+
warn: "warn";
|
|
224
243
|
}>>;
|
|
225
244
|
guidance: z.ZodOptional<z.ZodString>;
|
|
226
245
|
guidance_ref: z.ZodOptional<z.ZodString>;
|
|
@@ -258,9 +277,9 @@ export declare const LumenFlowConfigSchema: z.ZodObject<{
|
|
|
258
277
|
interval_tool_calls: z.ZodDefault<z.ZodNumber>;
|
|
259
278
|
}, z.core.$strip>>;
|
|
260
279
|
require_checkpoint_for_done: z.ZodDefault<z.ZodEnum<{
|
|
261
|
-
block: "block";
|
|
262
|
-
warn: "warn";
|
|
263
280
|
off: "off";
|
|
281
|
+
warn: "warn";
|
|
282
|
+
block: "block";
|
|
264
283
|
}>>;
|
|
265
284
|
}, z.core.$strip>>;
|
|
266
285
|
decay: z.ZodOptional<z.ZodObject<{
|
|
@@ -319,13 +338,22 @@ export declare const LumenFlowConfigSchema: z.ZodObject<{
|
|
|
319
338
|
principles: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
320
339
|
notes: z.ZodOptional<z.ZodString>;
|
|
321
340
|
}, z.core.$strip>>;
|
|
341
|
+
stream_watchdog: z.ZodOptional<z.ZodObject<{
|
|
342
|
+
timeout_seconds: z.ZodDefault<z.ZodNumber>;
|
|
343
|
+
heartbeat_cadence_seconds: z.ZodDefault<z.ZodNumber>;
|
|
344
|
+
}, z.core.$strip>>;
|
|
345
|
+
monitor_quality_signals: z.ZodOptional<z.ZodObject<{
|
|
346
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
347
|
+
min_runtime_loc: z.ZodDefault<z.ZodNumber>;
|
|
348
|
+
grace_minutes: z.ZodDefault<z.ZodNumber>;
|
|
349
|
+
}, z.core.$strip>>;
|
|
322
350
|
}, z.core.$strip>>;
|
|
323
351
|
experimental: z.ZodDefault<z.ZodObject<{
|
|
324
352
|
context_validation: z.ZodDefault<z.ZodBoolean>;
|
|
325
353
|
validation_mode: z.ZodDefault<z.ZodEnum<{
|
|
326
|
-
warn: "warn";
|
|
327
|
-
off: "off";
|
|
328
354
|
error: "error";
|
|
355
|
+
off: "off";
|
|
356
|
+
warn: "warn";
|
|
329
357
|
}>>;
|
|
330
358
|
show_next_steps: z.ZodDefault<z.ZodBoolean>;
|
|
331
359
|
recovery_command: z.ZodDefault<z.ZodBoolean>;
|
|
@@ -357,9 +385,9 @@ export declare const LumenFlowConfigSchema: z.ZodObject<{
|
|
|
357
385
|
overrides: z.ZodOptional<z.ZodObject<{
|
|
358
386
|
coverage_threshold: z.ZodOptional<z.ZodNumber>;
|
|
359
387
|
coverage_mode: z.ZodOptional<z.ZodEnum<{
|
|
360
|
-
block: "block";
|
|
361
388
|
warn: "warn";
|
|
362
389
|
off: "off";
|
|
390
|
+
block: "block";
|
|
363
391
|
}>>;
|
|
364
392
|
}, z.core.$strip>>;
|
|
365
393
|
work_classification: z.ZodOptional<z.ZodObject<{
|
|
@@ -396,9 +424,9 @@ export declare const LumenFlowConfigSchema: z.ZodObject<{
|
|
|
396
424
|
wip_limit: z.ZodOptional<z.ZodNumber>;
|
|
397
425
|
wip_justification: z.ZodOptional<z.ZodString>;
|
|
398
426
|
lock_policy: z.ZodDefault<z.ZodDefault<z.ZodEnum<{
|
|
399
|
-
none: "none";
|
|
400
427
|
all: "all";
|
|
401
428
|
active: "active";
|
|
429
|
+
none: "none";
|
|
402
430
|
}>>>;
|
|
403
431
|
code_paths: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
404
432
|
}, z.core.$strip>>>;
|
|
@@ -407,9 +435,9 @@ export declare const LumenFlowConfigSchema: z.ZodObject<{
|
|
|
407
435
|
wip_limit: z.ZodOptional<z.ZodNumber>;
|
|
408
436
|
wip_justification: z.ZodOptional<z.ZodString>;
|
|
409
437
|
lock_policy: z.ZodDefault<z.ZodDefault<z.ZodEnum<{
|
|
410
|
-
none: "none";
|
|
411
438
|
all: "all";
|
|
412
439
|
active: "active";
|
|
440
|
+
none: "none";
|
|
413
441
|
}>>>;
|
|
414
442
|
code_paths: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
415
443
|
}, z.core.$strip>>>;
|
|
@@ -418,9 +446,9 @@ export declare const LumenFlowConfigSchema: z.ZodObject<{
|
|
|
418
446
|
wip_limit: z.ZodOptional<z.ZodNumber>;
|
|
419
447
|
wip_justification: z.ZodOptional<z.ZodString>;
|
|
420
448
|
lock_policy: z.ZodDefault<z.ZodDefault<z.ZodEnum<{
|
|
421
|
-
none: "none";
|
|
422
449
|
all: "all";
|
|
423
450
|
active: "active";
|
|
451
|
+
none: "none";
|
|
424
452
|
}>>>;
|
|
425
453
|
code_paths: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
426
454
|
}, z.core.$strip>>>;
|
|
@@ -521,7 +549,7 @@ export declare function validateConfig(data: unknown): z.ZodSafeParseResult<{
|
|
|
521
549
|
defaultStatus: string;
|
|
522
550
|
defaultType: string;
|
|
523
551
|
brief: {
|
|
524
|
-
policyMode: "
|
|
552
|
+
policyMode: "off" | "manual" | "auto" | "required";
|
|
525
553
|
freshnessMinutes: number;
|
|
526
554
|
};
|
|
527
555
|
};
|
|
@@ -550,19 +578,19 @@ export declare function validateConfig(data: unknown): z.ZodSafeParseResult<{
|
|
|
550
578
|
typecheck?: string | undefined;
|
|
551
579
|
format?: string | undefined;
|
|
552
580
|
};
|
|
553
|
-
lane_health: "
|
|
581
|
+
lane_health: "error" | "off" | "warn";
|
|
554
582
|
co_change: {
|
|
555
583
|
name: string;
|
|
556
584
|
trigger_patterns: string[];
|
|
557
585
|
require_patterns: string[];
|
|
558
|
-
severity: "
|
|
586
|
+
severity: "error" | "off" | "warn";
|
|
559
587
|
guidance?: string | undefined;
|
|
560
588
|
guidance_ref?: string | undefined;
|
|
561
589
|
}[];
|
|
562
590
|
conditional_commands: {
|
|
563
591
|
trigger_patterns: string[];
|
|
564
592
|
command: string;
|
|
565
|
-
severity: "
|
|
593
|
+
severity: "error" | "off" | "warn";
|
|
566
594
|
name?: string | undefined;
|
|
567
595
|
guidance?: string | undefined;
|
|
568
596
|
guidance_ref?: string | undefined;
|
|
@@ -573,8 +601,15 @@ export declare function validateConfig(data: unknown): z.ZodSafeParseResult<{
|
|
|
573
601
|
skip_types: string[];
|
|
574
602
|
};
|
|
575
603
|
tdd_diff_evidence?: {
|
|
576
|
-
mode?: "
|
|
604
|
+
mode?: "off" | "warn" | "block" | undefined;
|
|
605
|
+
applies_to_types?: ("feature" | "bug" | "documentation" | "process" | "tooling" | "chore" | "refactor")[] | undefined;
|
|
606
|
+
exempt_paths?: string[] | undefined;
|
|
607
|
+
} | undefined;
|
|
608
|
+
tdd_ordering?: {
|
|
609
|
+
mode?: "off" | "warn" | "block" | undefined;
|
|
577
610
|
applies_to_types?: ("feature" | "bug" | "documentation" | "process" | "tooling" | "chore" | "refactor")[] | undefined;
|
|
611
|
+
min_runtime_loc_per_commit_without_tests?: number | undefined;
|
|
612
|
+
grace_commits?: number | undefined;
|
|
578
613
|
exempt_paths?: string[] | undefined;
|
|
579
614
|
} | undefined;
|
|
580
615
|
execution?: {
|
|
@@ -637,7 +672,7 @@ export declare function validateConfig(data: unknown): z.ZodSafeParseResult<{
|
|
|
637
672
|
enabled: boolean;
|
|
638
673
|
interval_tool_calls: number;
|
|
639
674
|
};
|
|
640
|
-
require_checkpoint_for_done: "
|
|
675
|
+
require_checkpoint_for_done: "off" | "warn" | "block";
|
|
641
676
|
} | undefined;
|
|
642
677
|
decay?: {
|
|
643
678
|
enabled: boolean;
|
|
@@ -690,10 +725,19 @@ export declare function validateConfig(data: unknown): z.ZodSafeParseResult<{
|
|
|
690
725
|
principles: string[];
|
|
691
726
|
notes?: string | undefined;
|
|
692
727
|
};
|
|
728
|
+
stream_watchdog?: {
|
|
729
|
+
timeout_seconds: number;
|
|
730
|
+
heartbeat_cadence_seconds: number;
|
|
731
|
+
} | undefined;
|
|
732
|
+
monitor_quality_signals?: {
|
|
733
|
+
enabled: boolean;
|
|
734
|
+
min_runtime_loc: number;
|
|
735
|
+
grace_minutes: number;
|
|
736
|
+
} | undefined;
|
|
693
737
|
};
|
|
694
738
|
experimental: {
|
|
695
739
|
context_validation: boolean;
|
|
696
|
-
validation_mode: "
|
|
740
|
+
validation_mode: "error" | "off" | "warn";
|
|
697
741
|
show_next_steps: boolean;
|
|
698
742
|
recovery_command: boolean;
|
|
699
743
|
};
|
|
@@ -720,11 +764,11 @@ export declare function validateConfig(data: unknown): z.ZodSafeParseResult<{
|
|
|
720
764
|
test_runner: "vitest" | "jest" | "mocha";
|
|
721
765
|
build_command: string;
|
|
722
766
|
methodology?: {
|
|
723
|
-
testing: "
|
|
767
|
+
testing: "none" | "tdd" | "test-after";
|
|
724
768
|
architecture: "none" | "hexagonal" | "layered";
|
|
725
769
|
overrides?: {
|
|
726
770
|
coverage_threshold?: number | undefined;
|
|
727
|
-
coverage_mode?: "
|
|
771
|
+
coverage_mode?: "off" | "warn" | "block" | undefined;
|
|
728
772
|
} | undefined;
|
|
729
773
|
work_classification?: {
|
|
730
774
|
ui?: {
|
|
@@ -746,21 +790,21 @@ export declare function validateConfig(data: unknown): z.ZodSafeParseResult<{
|
|
|
746
790
|
} | undefined;
|
|
747
791
|
definitions?: {
|
|
748
792
|
name: string;
|
|
749
|
-
lock_policy: "
|
|
793
|
+
lock_policy: "all" | "active" | "none";
|
|
750
794
|
wip_limit?: number | undefined;
|
|
751
795
|
wip_justification?: string | undefined;
|
|
752
796
|
code_paths?: string[] | undefined;
|
|
753
797
|
}[] | undefined;
|
|
754
798
|
engineering?: {
|
|
755
799
|
name: string;
|
|
756
|
-
lock_policy: "
|
|
800
|
+
lock_policy: "all" | "active" | "none";
|
|
757
801
|
wip_limit?: number | undefined;
|
|
758
802
|
wip_justification?: string | undefined;
|
|
759
803
|
code_paths?: string[] | undefined;
|
|
760
804
|
}[] | undefined;
|
|
761
805
|
business?: {
|
|
762
806
|
name: string;
|
|
763
|
-
lock_policy: "
|
|
807
|
+
lock_policy: "all" | "active" | "none";
|
|
764
808
|
wip_limit?: number | undefined;
|
|
765
809
|
wip_justification?: string | undefined;
|
|
766
810
|
code_paths?: string[] | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lumenflow-config-schema.d.ts","sourceRoot":"","sources":["../src/lumenflow-config-schema.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB,cAAc,+BAA+B,CAAC;AAC9C,cAAc,iCAAiC,CAAC;AAChD,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AACvC,cAAc,mCAAmC,CAAC;AA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAkEhC,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEpE;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAE3C;AAED;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,IAAI,GAAE,OAAY,GAAG,eAAe,CAE/D;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,IAAI,eAAe,CAElD"}
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
*/
|
|
26
26
|
import { z } from 'zod';
|
|
27
27
|
// WU-1259: Import methodology config schema for resolvePolicy()
|
|
28
|
-
import { MethodologyConfigSchema } from '
|
|
28
|
+
import { MethodologyConfigSchema } from '@lumenflow/packs-software-delivery/policy/resolve-policy';
|
|
29
29
|
// --- Re-export per-section schemas and types ---
|
|
30
30
|
export * from './schemas/workspace-config.js';
|
|
31
31
|
export * from './schemas/directories-config.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lumenflow-config-schema.js","sourceRoot":"","sources":["../src/lumenflow-config-schema.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,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E,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,YAAY,CAAC;CAChD,CAAC,CAAC;AAIH;;;;;GAKG;AACH,MAAM,UAAU,cAAc,CAAC,IAAa;IAC1C,OAAO,qBAAqB,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;AAC/C,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,WAAW,CAAC,OAAgB,EAAE;IAC5C,OAAO,qBAAqB,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;AAC3C,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,gBAAgB;IAC9B,OAAO,qBAAqB,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;AACzC,CAAC"}
|
|
@@ -1,32 +1,14 @@
|
|
|
1
1
|
/// <reference path="./types.d.ts" />
|
|
2
2
|
import { type LumenFlowConfig } from './lumenflow-config-schema.js';
|
|
3
|
-
|
|
4
|
-
export { GIT_DIRECTORY_NAME, GIT_WORKTREES_SENTINEL, WORKSPACE_CONFIG_FILE_NAME, } from '
|
|
5
|
-
/** WU-2185: Re-export routing constants for config:set workspace-aware routing */
|
|
6
|
-
export { WORKSPACE_ROOT_KEYS, WRITABLE_ROOT_KEYS, MANAGED_ROOT_KEYS, type WorkspaceRootKey, } from './config-contract.js';
|
|
7
|
-
/** Presence of canonical workspace config in a project root. */
|
|
8
|
-
export interface ConfigFilePresence {
|
|
9
|
-
workspaceConfigExists: boolean;
|
|
10
|
-
}
|
|
3
|
+
export { findProjectRoot, getConfigFilePresence, getWorkspaceInitCommand, getDocsGenerateCommand, resolvePath, type ConfigFilePresence, } from '@lumenflow/host/workspace-config/lumenflow-config';
|
|
4
|
+
export { GIT_DIRECTORY_NAME, GIT_WORKTREES_SENTINEL, WORKSPACE_CONFIG_FILE_NAME, WORKSPACE_ROOT_KEYS, WRITABLE_ROOT_KEYS, MANAGED_ROOT_KEYS, type WorkspaceRootKey, } from '@lumenflow/kernel/primitives/workspace-constants';
|
|
11
5
|
/**
|
|
12
|
-
*
|
|
6
|
+
* Get LumenFlow configuration (typed).
|
|
13
7
|
*
|
|
14
|
-
*
|
|
15
|
-
* @returns File presence booleans for canonical workspace config file
|
|
16
|
-
*/
|
|
17
|
-
export declare function getConfigFilePresence(projectRoot: string): ConfigFilePresence;
|
|
18
|
-
/**
|
|
19
|
-
* Find project root by looking for workspace.yaml, then .git
|
|
20
|
-
*
|
|
21
|
-
* @param startDir - Directory to start searching from
|
|
22
|
-
* @returns Project root path or current working directory
|
|
23
|
-
*/
|
|
24
|
-
export declare function findProjectRoot(startDir?: string): string;
|
|
25
|
-
/**
|
|
26
|
-
* Get LumenFlow configuration
|
|
8
|
+
* Wraps host's raw loader with Zod parsing via `LumenFlowConfigSchema`.
|
|
27
9
|
*
|
|
28
10
|
* Resolution order:
|
|
29
|
-
* 1. `workspace.yaml` → `software_delivery` block (canonical)
|
|
11
|
+
* 1. `workspace.yaml` → `software_delivery` block (canonical, via host)
|
|
30
12
|
* 2. defaults from schema
|
|
31
13
|
*
|
|
32
14
|
* @param options - Options for loading config
|
|
@@ -41,7 +23,8 @@ export declare function getConfig(options?: {
|
|
|
41
23
|
strictWorkspace?: boolean;
|
|
42
24
|
}): LumenFlowConfig;
|
|
43
25
|
/**
|
|
44
|
-
* Get the project root directory
|
|
26
|
+
* Get the project root directory. Prefers the core-side cache populated by
|
|
27
|
+
* `getConfig(...)`; otherwise delegates to host's loader.
|
|
45
28
|
*
|
|
46
29
|
* @returns Cached project root or finds it
|
|
47
30
|
*/
|
|
@@ -55,19 +38,12 @@ export declare function getProjectRoot(): string;
|
|
|
55
38
|
*
|
|
56
39
|
* Also useful in tests that manipulate workspace.yaml between assertions.
|
|
57
40
|
*
|
|
41
|
+
* Clears both core's typed cache and host's project-root cache so downstream
|
|
42
|
+
* primitive calls see a fresh state.
|
|
43
|
+
*
|
|
58
44
|
* @see WU-2126
|
|
59
45
|
*/
|
|
60
46
|
export declare function clearConfigCache(): void;
|
|
61
|
-
export declare function getWorkspaceInitCommand(projectRoot?: string): string;
|
|
62
|
-
export declare function getDocsGenerateCommand(projectRoot?: string): string;
|
|
63
|
-
/**
|
|
64
|
-
* Resolve a path relative to project root
|
|
65
|
-
*
|
|
66
|
-
* @param relativePath - Relative path from config
|
|
67
|
-
* @param projectRoot - Optional project root override
|
|
68
|
-
* @returns Absolute path
|
|
69
|
-
*/
|
|
70
|
-
export declare function resolvePath(relativePath: string, projectRoot?: string): string;
|
|
71
47
|
/**
|
|
72
48
|
* Get resolved paths for common directories
|
|
73
49
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lumenflow-config.d.ts","sourceRoot":"","sources":["../src/lumenflow-config.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"lumenflow-config.d.ts","sourceRoot":"","sources":["../src/lumenflow-config.ts"],"names":[],"mappings":"AA8BA,OAAO,EACL,KAAK,eAAe,EAMrB,MAAM,8BAA8B,CAAC;AAMtC,OAAO,EACL,eAAe,EACf,qBAAqB,EACrB,uBAAuB,EACvB,sBAAsB,EACtB,WAAW,EACX,KAAK,kBAAkB,GACxB,MAAM,mDAAmD,CAAC;AAE3D,OAAO,EACL,kBAAkB,EAClB,sBAAsB,EACtB,0BAA0B,EAC1B,mBAAmB,EACnB,kBAAkB,EAClB,iBAAiB,EACjB,KAAK,gBAAgB,GACtB,MAAM,kDAAkD,CAAC;AAe1D;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,SAAS,CACvB,OAAO,GAAE;IACP,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,eAAe,CAAC,EAAE,OAAO,CAAC;CACtB,GACL,eAAe,CAoCjB;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,IAAI,MAAM,CAMvC;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,gBAAgB,IAAI,IAAI,CAIvC;AAED;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAC9B,OAAO,GAAE;I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EACV,UAAU,EACV,kBAAkB,EAClB,YAAY,EACZ,YAAY,EACZ,mBAAmB,GACpB,MAAM,yBAAyB,CAAC"}
|
package/dist/lumenflow-config.js
CHANGED
|
@@ -1,121 +1,45 @@
|
|
|
1
1
|
// Copyright (c) 2026 Hellmai Ltd
|
|
2
2
|
// SPDX-License-Identifier: AGPL-3.0-only
|
|
3
3
|
/**
|
|
4
|
-
* LumenFlow Configuration
|
|
4
|
+
* LumenFlow Configuration — typed wrapper + shim.
|
|
5
5
|
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
6
|
+
* WU-2684 (INIT-058 L4b): The raw workspace-config loader primitives were relocated
|
|
7
|
+
* to `@lumenflow/host/workspace-config/lumenflow-config`. This module stays at
|
|
8
|
+
* `@lumenflow/core/lumenflow-config` as a thin re-export shim plus the typed
|
|
9
|
+
* helpers (`getConfig`, `getResolvedPaths`, `validateConfigFile`, `createSampleConfig`,
|
|
10
|
+
* `clearConfigCache`) that require the pack-coupled `LumenFlowConfigSchema`. External
|
|
11
|
+
* import paths (`@lumenflow/core/config`) are unchanged.
|
|
8
12
|
*
|
|
9
13
|
* @module lumenflow-config
|
|
10
14
|
*/
|
|
11
15
|
import * as fs from 'node:fs';
|
|
12
16
|
import * as path from 'node:path';
|
|
13
17
|
import * as yaml from 'yaml';
|
|
18
|
+
import { findProjectRoot, getProjectRoot as getHostProjectRoot, clearProjectRootCache, loadWorkspaceSoftwareDeliveryConfig, getConfigFilePresence, LUMENFLOW_CONFIG_WARNING_PREFIX as CONFIG_WARNING_PREFIX, } from '@lumenflow/host/workspace-config/lumenflow-config';
|
|
19
|
+
import { getWorkspaceInitCommand } from '@lumenflow/host/workspace-config/lumenflow-config';
|
|
20
|
+
import { normalizeConfigKeys } from '@lumenflow/kernel/primitives/normalize-config-keys';
|
|
21
|
+
import { asRecord } from '@lumenflow/kernel/primitives/object-guards';
|
|
14
22
|
import { parseConfig, getDefaultConfig, validateConfig, WorkspaceV2ExtensionsSchema, WORKSPACE_V2_KEYS, } from './lumenflow-config-schema.js';
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
export { GIT_DIRECTORY_NAME, GIT_WORKTREES_SENTINEL, WORKSPACE_CONFIG_FILE_NAME, } from './config-contract.js';
|
|
22
|
-
/** WU-2185: Re-export routing constants for config:set workspace-aware routing */
|
|
23
|
-
export { WORKSPACE_ROOT_KEYS, WRITABLE_ROOT_KEYS, MANAGED_ROOT_KEYS, } from './config-contract.js';
|
|
24
|
-
/** Shared UTF-8 encoding literal for file reads/writes */
|
|
23
|
+
import { WORKSPACE_CONFIG_FILE_NAME } from '@lumenflow/kernel/primitives/workspace-constants';
|
|
24
|
+
import { createError, ErrorCodes } from '@lumenflow/kernel/primitives/error-handler';
|
|
25
|
+
// --- Re-exports for API stability ---
|
|
26
|
+
export { findProjectRoot, getConfigFilePresence, getWorkspaceInitCommand, getDocsGenerateCommand, resolvePath, } from '@lumenflow/host/workspace-config/lumenflow-config';
|
|
27
|
+
export { GIT_DIRECTORY_NAME, GIT_WORKTREES_SENTINEL, WORKSPACE_CONFIG_FILE_NAME, WORKSPACE_ROOT_KEYS, WRITABLE_ROOT_KEYS, MANAGED_ROOT_KEYS, } from '@lumenflow/kernel/primitives/workspace-constants';
|
|
28
|
+
// --- Typed-config layer (schema-parsing) ---
|
|
25
29
|
const UTF8_ENCODING = 'utf8';
|
|
26
|
-
/** Warning prefix for config-loading diagnostics */
|
|
27
|
-
const WARNING_PREFIX = '[lumenflow-config]';
|
|
28
|
-
const WORKSPACE_INIT_SCRIPT = 'workspace:init';
|
|
29
|
-
const DOCS_GENERATE_SCRIPT = 'docs:generate';
|
|
30
|
-
const WORKSPACE_INIT_ARGS = ['--yes'];
|
|
31
30
|
/** Canonical workspace section that stores software-delivery config */
|
|
32
31
|
const WORKSPACE_CONFIG_SECTION = WORKSPACE_V2_KEYS.SOFTWARE_DELIVERY;
|
|
33
|
-
/**
|
|
34
|
-
* Detect whether canonical workspace config file exists.
|
|
35
|
-
*
|
|
36
|
-
* @param projectRoot - Project root directory
|
|
37
|
-
* @returns File presence booleans for canonical workspace config file
|
|
38
|
-
*/
|
|
39
|
-
export function getConfigFilePresence(projectRoot) {
|
|
40
|
-
return {
|
|
41
|
-
workspaceConfigExists: fs.existsSync(path.join(projectRoot, WORKSPACE_CONFIG_FILE_NAME)),
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
/** Cached config instance */
|
|
32
|
+
/** Cached typed config instance */
|
|
45
33
|
let cachedConfig = null;
|
|
46
|
-
/** Cached project root */
|
|
34
|
+
/** Cached project root (typed-cache side; host keeps its own cache). */
|
|
47
35
|
let cachedProjectRoot = null;
|
|
48
36
|
/**
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
* @param content - Raw YAML text
|
|
52
|
-
* @returns Parsed object record, or null when parsed content is not an object
|
|
53
|
-
*/
|
|
54
|
-
function parseYamlRecord(content) {
|
|
55
|
-
return asRecord(yaml.parse(content));
|
|
56
|
-
}
|
|
57
|
-
/**
|
|
58
|
-
* Find project root by looking for workspace.yaml, then .git
|
|
37
|
+
* Get LumenFlow configuration (typed).
|
|
59
38
|
*
|
|
60
|
-
*
|
|
61
|
-
* @returns Project root path or current working directory
|
|
62
|
-
*/
|
|
63
|
-
export function findProjectRoot(startDir = process.cwd()) {
|
|
64
|
-
let currentDir = path.resolve(startDir);
|
|
65
|
-
const filesystemRoot = path.parse(currentDir).root;
|
|
66
|
-
while (true) {
|
|
67
|
-
if (fs.existsSync(path.join(currentDir, WORKSPACE_CONFIG_FILE_NAME))) {
|
|
68
|
-
return currentDir;
|
|
69
|
-
}
|
|
70
|
-
if (fs.existsSync(path.join(currentDir, GIT_DIRECTORY_NAME))) {
|
|
71
|
-
return currentDir;
|
|
72
|
-
}
|
|
73
|
-
if (currentDir === filesystemRoot) {
|
|
74
|
-
break;
|
|
75
|
-
}
|
|
76
|
-
currentDir = path.dirname(currentDir);
|
|
77
|
-
}
|
|
78
|
-
return process.cwd();
|
|
79
|
-
}
|
|
80
|
-
/**
|
|
81
|
-
* Load config from canonical workspace.yaml `software_delivery` block.
|
|
82
|
-
*
|
|
83
|
-
* @param projectRoot - Project root directory
|
|
84
|
-
* @returns Parsed software-delivery config object, or null when unavailable/invalid
|
|
85
|
-
*/
|
|
86
|
-
function loadWorkspaceSoftwareDeliveryConfig(projectRoot) {
|
|
87
|
-
const workspacePath = path.join(projectRoot, WORKSPACE_CONFIG_FILE_NAME);
|
|
88
|
-
if (!fs.existsSync(workspacePath)) {
|
|
89
|
-
return null;
|
|
90
|
-
}
|
|
91
|
-
try {
|
|
92
|
-
const content = fs.readFileSync(workspacePath, UTF8_ENCODING);
|
|
93
|
-
const workspaceData = parseYamlRecord(content);
|
|
94
|
-
if (!workspaceData) {
|
|
95
|
-
console.warn(`${WARNING_PREFIX} ${WORKSPACE_CONFIG_FILE_NAME} does not contain a valid object root.`);
|
|
96
|
-
return null;
|
|
97
|
-
}
|
|
98
|
-
const parsedExtensions = WorkspaceV2ExtensionsSchema.safeParse(workspaceData);
|
|
99
|
-
if (!parsedExtensions.success) {
|
|
100
|
-
const hasSoftwareDeliveryError = parsedExtensions.error.issues.some((issue) => issue.path[0] === WORKSPACE_V2_KEYS.SOFTWARE_DELIVERY);
|
|
101
|
-
if (hasSoftwareDeliveryError) {
|
|
102
|
-
console.warn(`${WARNING_PREFIX} ${WORKSPACE_CONFIG_FILE_NAME} is missing a valid ${WORKSPACE_V2_KEYS.SOFTWARE_DELIVERY} block.`);
|
|
103
|
-
}
|
|
104
|
-
return null;
|
|
105
|
-
}
|
|
106
|
-
// WU-1765: Normalize snake_case YAML keys to camelCase before Zod parsing.
|
|
107
|
-
return normalizeConfigKeys(parsedExtensions.data[WORKSPACE_V2_KEYS.SOFTWARE_DELIVERY]);
|
|
108
|
-
}
|
|
109
|
-
catch (error) {
|
|
110
|
-
console.warn(`${WARNING_PREFIX} Failed to parse ${WORKSPACE_CONFIG_FILE_NAME}:`, error instanceof Error ? error.message : String(error));
|
|
111
|
-
return null;
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
/**
|
|
115
|
-
* Get LumenFlow configuration
|
|
39
|
+
* Wraps host's raw loader with Zod parsing via `LumenFlowConfigSchema`.
|
|
116
40
|
*
|
|
117
41
|
* Resolution order:
|
|
118
|
-
* 1. `workspace.yaml` → `software_delivery` block (canonical)
|
|
42
|
+
* 1. `workspace.yaml` → `software_delivery` block (canonical, via host)
|
|
119
43
|
* 2. defaults from schema
|
|
120
44
|
*
|
|
121
45
|
* @param options - Options for loading config
|
|
@@ -126,26 +50,21 @@ function loadWorkspaceSoftwareDeliveryConfig(projectRoot) {
|
|
|
126
50
|
*/
|
|
127
51
|
export function getConfig(options = {}) {
|
|
128
52
|
const { projectRoot: overrideRoot, reload = false, strictWorkspace = false } = options;
|
|
129
|
-
// Use cached config if available and not reloading
|
|
130
53
|
if (cachedConfig && !reload && !overrideRoot) {
|
|
131
54
|
return cachedConfig;
|
|
132
55
|
}
|
|
133
|
-
// Find or use provided project root
|
|
134
56
|
const projectRoot = overrideRoot || findProjectRoot();
|
|
135
57
|
const { workspaceConfigExists } = getConfigFilePresence(projectRoot);
|
|
136
58
|
if (strictWorkspace && !workspaceConfigExists) {
|
|
137
|
-
throw createError(ErrorCodes.CONFIG_ERROR, `${
|
|
59
|
+
throw createError(ErrorCodes.CONFIG_ERROR, `${CONFIG_WARNING_PREFIX} Missing ${WORKSPACE_CONFIG_FILE_NAME}. ` +
|
|
138
60
|
`Run \`${getWorkspaceInitCommand(projectRoot)}\` to scaffold workspace config.`);
|
|
139
61
|
}
|
|
140
|
-
// Canonical workspace-first load path (INIT-033 hard cut)
|
|
141
62
|
const workspaceConfig = loadWorkspaceSoftwareDeliveryConfig(projectRoot);
|
|
142
63
|
if (strictWorkspace && workspaceConfigExists && !workspaceConfig) {
|
|
143
|
-
throw createError(ErrorCodes.CONFIG_ERROR, `${
|
|
64
|
+
throw createError(ErrorCodes.CONFIG_ERROR, `${CONFIG_WARNING_PREFIX} ${WORKSPACE_CONFIG_FILE_NAME} exists but is invalid. ` +
|
|
144
65
|
`Ensure \`${WORKSPACE_CONFIG_SECTION}\` contains valid configuration values.`);
|
|
145
66
|
}
|
|
146
|
-
// Parse with defaults
|
|
147
67
|
const config = parseConfig(workspaceConfig ?? {});
|
|
148
|
-
// Cache if using default project root
|
|
149
68
|
if (!overrideRoot) {
|
|
150
69
|
cachedConfig = config;
|
|
151
70
|
cachedProjectRoot = projectRoot;
|
|
@@ -153,7 +72,8 @@ export function getConfig(options = {}) {
|
|
|
153
72
|
return config;
|
|
154
73
|
}
|
|
155
74
|
/**
|
|
156
|
-
* Get the project root directory
|
|
75
|
+
* Get the project root directory. Prefers the core-side cache populated by
|
|
76
|
+
* `getConfig(...)`; otherwise delegates to host's loader.
|
|
157
77
|
*
|
|
158
78
|
* @returns Cached project root or finds it
|
|
159
79
|
*/
|
|
@@ -161,7 +81,7 @@ export function getProjectRoot() {
|
|
|
161
81
|
if (cachedProjectRoot) {
|
|
162
82
|
return cachedProjectRoot;
|
|
163
83
|
}
|
|
164
|
-
cachedProjectRoot =
|
|
84
|
+
cachedProjectRoot = getHostProjectRoot();
|
|
165
85
|
return cachedProjectRoot;
|
|
166
86
|
}
|
|
167
87
|
/**
|
|
@@ -173,45 +93,15 @@ export function getProjectRoot() {
|
|
|
173
93
|
*
|
|
174
94
|
* Also useful in tests that manipulate workspace.yaml between assertions.
|
|
175
95
|
*
|
|
96
|
+
* Clears both core's typed cache and host's project-root cache so downstream
|
|
97
|
+
* primitive calls see a fresh state.
|
|
98
|
+
*
|
|
176
99
|
* @see WU-2126
|
|
177
100
|
*/
|
|
178
101
|
export function clearConfigCache() {
|
|
179
102
|
cachedConfig = null;
|
|
180
103
|
cachedProjectRoot = null;
|
|
181
|
-
|
|
182
|
-
function formatScriptCommand(packageManager, scriptName, args = []) {
|
|
183
|
-
switch (packageManager) {
|
|
184
|
-
case 'npm':
|
|
185
|
-
return args.length > 0
|
|
186
|
-
? `npm run ${scriptName} -- ${args.join(' ')}`
|
|
187
|
-
: `npm run ${scriptName}`;
|
|
188
|
-
case 'yarn':
|
|
189
|
-
return args.length > 0 ? `yarn ${scriptName} ${args.join(' ')}` : `yarn ${scriptName}`;
|
|
190
|
-
case 'bun':
|
|
191
|
-
return args.length > 0 ? `bun run ${scriptName} ${args.join(' ')}` : `bun run ${scriptName}`;
|
|
192
|
-
case 'pnpm':
|
|
193
|
-
default:
|
|
194
|
-
return args.length > 0 ? `pnpm ${scriptName} ${args.join(' ')}` : `pnpm ${scriptName}`;
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
export function getWorkspaceInitCommand(projectRoot = getProjectRoot()) {
|
|
198
|
-
return formatScriptCommand(resolvePackageManager(projectRoot), WORKSPACE_INIT_SCRIPT, [
|
|
199
|
-
...WORKSPACE_INIT_ARGS,
|
|
200
|
-
]);
|
|
201
|
-
}
|
|
202
|
-
export function getDocsGenerateCommand(projectRoot = getProjectRoot()) {
|
|
203
|
-
return formatScriptCommand(resolvePackageManager(projectRoot), DOCS_GENERATE_SCRIPT);
|
|
204
|
-
}
|
|
205
|
-
/**
|
|
206
|
-
* Resolve a path relative to project root
|
|
207
|
-
*
|
|
208
|
-
* @param relativePath - Relative path from config
|
|
209
|
-
* @param projectRoot - Optional project root override
|
|
210
|
-
* @returns Absolute path
|
|
211
|
-
*/
|
|
212
|
-
export function resolvePath(relativePath, projectRoot) {
|
|
213
|
-
const root = projectRoot || getProjectRoot();
|
|
214
|
-
return path.join(root, relativePath);
|
|
104
|
+
clearProjectRootCache();
|
|
215
105
|
}
|
|
216
106
|
/**
|
|
217
107
|
* Get resolved paths for common directories
|
|
@@ -262,7 +152,7 @@ export function validateConfigFile(configPath) {
|
|
|
262
152
|
}
|
|
263
153
|
try {
|
|
264
154
|
const content = fs.readFileSync(configPath, UTF8_ENCODING);
|
|
265
|
-
const parsedRecord =
|
|
155
|
+
const parsedRecord = asRecord(yaml.parse(content));
|
|
266
156
|
if (!parsedRecord) {
|
|
267
157
|
return { valid: false, errors: ['Root YAML value must be an object'] };
|
|
268
158
|
}
|