@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
package/dist/wu-yaml.d.ts
CHANGED
|
@@ -1,114 +1,3 @@
|
|
|
1
1
|
/// <reference path="./types.d.ts" />
|
|
2
|
-
|
|
3
|
-
* WU-1352: Standardized YAML stringify options.
|
|
4
|
-
*
|
|
5
|
-
* Ensures consistent output across all WU tools:
|
|
6
|
-
* - lineWidth: 100 (wrap long lines)
|
|
7
|
-
* - singleQuote: true (prefer 'single' over "double")
|
|
8
|
-
* - defaultKeyType: PLAIN (unquoted keys when safe)
|
|
9
|
-
*
|
|
10
|
-
* @type {import('yaml').ToStringOptions}
|
|
11
|
-
*/
|
|
12
|
-
export declare const YAML_STRINGIFY_OPTIONS: Readonly<{
|
|
13
|
-
lineWidth: 100;
|
|
14
|
-
singleQuote: true;
|
|
15
|
-
defaultKeyType: "PLAIN";
|
|
16
|
-
}>;
|
|
17
|
-
/**
|
|
18
|
-
* Read and parse WU YAML file.
|
|
19
|
-
*
|
|
20
|
-
* Validates:
|
|
21
|
-
* - File exists
|
|
22
|
-
* - YAML is valid
|
|
23
|
-
* - WU ID matches expected ID
|
|
24
|
-
*
|
|
25
|
-
* @param {string} wuPath - Path to WU YAML file
|
|
26
|
-
* @param {string} expectedId - Expected WU ID (e.g., 'WU-123')
|
|
27
|
-
* @returns {object} Parsed YAML document
|
|
28
|
-
* @throws {Error} If file not found, YAML invalid, or ID mismatch
|
|
29
|
-
*/
|
|
30
|
-
export declare function readWU(wuPath: string, expectedId: string): Record<string, unknown>;
|
|
31
|
-
/**
|
|
32
|
-
* Read and parse WU YAML file asynchronously.
|
|
33
|
-
*
|
|
34
|
-
* Validates:
|
|
35
|
-
* - File exists
|
|
36
|
-
* - YAML is valid
|
|
37
|
-
* - WU ID matches expected ID
|
|
38
|
-
*
|
|
39
|
-
* @param {string} wuPath - Path to WU YAML file
|
|
40
|
-
* @param {string} expectedId - Expected WU ID (e.g., 'WU-123')
|
|
41
|
-
* @returns {Promise<object>} Parsed YAML document
|
|
42
|
-
* @throws {Error} If file not found, YAML invalid, or ID mismatch
|
|
43
|
-
*/
|
|
44
|
-
export declare function readWUAsync(wuPath: string, expectedId: string): Promise<Record<string, unknown>>;
|
|
45
|
-
/**
|
|
46
|
-
* Parse YAML string to object.
|
|
47
|
-
* WU-1352: Centralized YAML parsing for consistency.
|
|
48
|
-
*
|
|
49
|
-
* @param {string} text - YAML string to parse
|
|
50
|
-
* @returns {object} Parsed object
|
|
51
|
-
* @throws {Error} If YAML is invalid
|
|
52
|
-
*/
|
|
53
|
-
export declare function parseYAML(text: string): Record<string, unknown>;
|
|
54
|
-
/**
|
|
55
|
-
* Stringify object to YAML with standardized options.
|
|
56
|
-
* WU-1352: Centralized YAML serialization for consistency.
|
|
57
|
-
*
|
|
58
|
-
* @param {object} doc - Object to stringify
|
|
59
|
-
* @param {object} [options] - Additional stringify options (merged with YAML_STRINGIFY_OPTIONS)
|
|
60
|
-
* @returns {string} YAML string
|
|
61
|
-
*/
|
|
62
|
-
export declare function stringifyYAML(doc: unknown, options?: Record<string, unknown>): string;
|
|
63
|
-
/**
|
|
64
|
-
* Read and parse YAML file without ID validation.
|
|
65
|
-
* WU-1352: For cases where you don't know/need to validate the WU ID.
|
|
66
|
-
*
|
|
67
|
-
* @param {string} yamlPath - Path to YAML file
|
|
68
|
-
* @returns {object} Parsed YAML document
|
|
69
|
-
* @throws {Error} If file not found or YAML invalid
|
|
70
|
-
*/
|
|
71
|
-
export declare function readWURaw(yamlPath: string): Record<string, unknown>;
|
|
72
|
-
/**
|
|
73
|
-
* Read and parse YAML file without ID validation asynchronously.
|
|
74
|
-
* WU-1352: For cases where you don't know/need to validate the WU ID.
|
|
75
|
-
*
|
|
76
|
-
* @param {string} yamlPath - Path to YAML file
|
|
77
|
-
* @returns {Promise<object>} Parsed YAML document
|
|
78
|
-
* @throws {Error} If file not found or YAML invalid
|
|
79
|
-
*/
|
|
80
|
-
export declare function readWURawAsync(yamlPath: string): Promise<Record<string, unknown>>;
|
|
81
|
-
/**
|
|
82
|
-
* Write WU YAML file with consistent formatting.
|
|
83
|
-
* WU-1352: Uses YAML_STRINGIFY_OPTIONS for consistent output.
|
|
84
|
-
* WU-2115: Validates doc against BaseWUSchema before writing to prevent
|
|
85
|
-
* malformed WU YAML from being silently persisted.
|
|
86
|
-
*
|
|
87
|
-
* @param {string} wuPath - Path to WU YAML file
|
|
88
|
-
* @param {object} doc - YAML document to write
|
|
89
|
-
* @throws {ZodError} If doc fails BaseWUSchema validation
|
|
90
|
-
*/
|
|
91
|
-
export declare function writeWU(wuPath: string, doc: unknown): void;
|
|
92
|
-
/**
|
|
93
|
-
* Append note to WU document's notes field.
|
|
94
|
-
*
|
|
95
|
-
* Always outputs a string (Zod schema requires string type).
|
|
96
|
-
* Handles various input formats:
|
|
97
|
-
* - undefined/null/empty: Set note directly as string
|
|
98
|
-
* - string: Append with newline separator
|
|
99
|
-
* - array: Convert to newline-separated string, then append
|
|
100
|
-
* - other: Replace with note
|
|
101
|
-
*
|
|
102
|
-
* @param {object} doc - WU document
|
|
103
|
-
* @param {string} note - Note to append
|
|
104
|
-
*/
|
|
105
|
-
export declare function appendNote(doc: Record<string, unknown>, note: string): void;
|
|
106
|
-
/**
|
|
107
|
-
* Append an agent session entry to a WU's agent_sessions[] array
|
|
108
|
-
*
|
|
109
|
-
* @param {string} wuId - WU ID (e.g., "WU-1234")
|
|
110
|
-
* @param {object} sessionData - Session summary from endSession()
|
|
111
|
-
* @throws {Error} if WU file not found
|
|
112
|
-
*/
|
|
113
|
-
export declare function appendAgentSession(wuId: string, sessionData: Record<string, unknown>): void;
|
|
2
|
+
export * from '@lumenflow/packs-software-delivery/state/wu-yaml';
|
|
114
3
|
//# sourceMappingURL=wu-yaml.d.ts.map
|
package/dist/wu-yaml.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wu-yaml.d.ts","sourceRoot":"","sources":["../src/wu-yaml.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"wu-yaml.d.ts","sourceRoot":"","sources":["../src/wu-yaml.ts"],"names":[],"mappings":"AAMA,cAAc,kDAAkD,CAAC"}
|
package/dist/wu-yaml.js
CHANGED
|
@@ -1,307 +1,7 @@
|
|
|
1
1
|
// Copyright (c) 2026 Hellmai Ltd
|
|
2
2
|
// SPDX-License-Identifier: AGPL-3.0-only
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
import { createWuPaths } from './wu-paths.js';
|
|
8
|
-
import { BaseWUSchema } from './wu-schema.js';
|
|
9
|
-
/**
|
|
10
|
-
* Unified WU YAML I/O module.
|
|
11
|
-
*
|
|
12
|
-
* Replaces 4 duplicate read/write functions scattered across wu-claim, wu-done,
|
|
13
|
-
* wu-block, and wu-unblock. Single source of truth for WU YAML operations.
|
|
14
|
-
*
|
|
15
|
-
* WU-1352: Standardized on yaml v2.8.1 (eemeli) with consistent stringify options.
|
|
16
|
-
*
|
|
17
|
-
* Functions:
|
|
18
|
-
* - readWU(path, id): Read and validate WU YAML
|
|
19
|
-
* - readWURaw(path): Read YAML without ID validation
|
|
20
|
-
* - parseYAML(text): Parse YAML string to object
|
|
21
|
-
* - writeWU(path, doc): Write WU YAML with consistent formatting
|
|
22
|
-
* - stringifyYAML(doc): Stringify object to YAML with consistent formatting
|
|
23
|
-
* - appendNote(doc, note): Append note to doc.notes field
|
|
24
|
-
*
|
|
25
|
-
* @example
|
|
26
|
-
* import { readWU, writeWU, appendNote } from './lib/wu-yaml.js';
|
|
27
|
-
* import { createWuPaths } from './wu-paths.js';
|
|
28
|
-
*
|
|
29
|
-
* const wuPaths = createWuPaths();
|
|
30
|
-
*
|
|
31
|
-
* // Read WU
|
|
32
|
-
* const doc = readWU(wuPaths.WU('WU-123'), 'WU-123');
|
|
33
|
-
*
|
|
34
|
-
* // Modify doc
|
|
35
|
-
* doc.status = 'in_progress';
|
|
36
|
-
* appendNote(doc, 'Started work on this WU');
|
|
37
|
-
*
|
|
38
|
-
* // Write back
|
|
39
|
-
* writeWU(wuPaths.WU('WU-123'), doc);
|
|
40
|
-
*/
|
|
41
|
-
/**
|
|
42
|
-
* WU-1352: YAML scalar type constants (from yaml library).
|
|
43
|
-
* These match the string values expected by the yaml package.
|
|
44
|
-
* @see https://github.com/eemeli/yaml/blob/main/docs/03_options.md
|
|
45
|
-
*/
|
|
46
|
-
const YAML_SCALAR_TYPES = Object.freeze({
|
|
47
|
-
/** Unquoted string (when safe) */
|
|
48
|
-
PLAIN: 'PLAIN',
|
|
49
|
-
/** Single-quoted string */
|
|
50
|
-
QUOTE_SINGLE: 'QUOTE_SINGLE',
|
|
51
|
-
/** Double-quoted string */
|
|
52
|
-
QUOTE_DOUBLE: 'QUOTE_DOUBLE',
|
|
53
|
-
/** Block literal (|) */
|
|
54
|
-
BLOCK_LITERAL: 'BLOCK_LITERAL',
|
|
55
|
-
/** Block folded (>) */
|
|
56
|
-
BLOCK_FOLDED: 'BLOCK_FOLDED',
|
|
57
|
-
});
|
|
58
|
-
/** Standard line width for WU YAML files */
|
|
59
|
-
const YAML_LINE_WIDTH = 100;
|
|
60
|
-
/**
|
|
61
|
-
* WU-1352: Standardized YAML stringify options.
|
|
62
|
-
*
|
|
63
|
-
* Ensures consistent output across all WU tools:
|
|
64
|
-
* - lineWidth: 100 (wrap long lines)
|
|
65
|
-
* - singleQuote: true (prefer 'single' over "double")
|
|
66
|
-
* - defaultKeyType: PLAIN (unquoted keys when safe)
|
|
67
|
-
*
|
|
68
|
-
* @type {import('yaml').ToStringOptions}
|
|
69
|
-
*/
|
|
70
|
-
export const YAML_STRINGIFY_OPTIONS = Object.freeze({
|
|
71
|
-
lineWidth: YAML_LINE_WIDTH,
|
|
72
|
-
singleQuote: true,
|
|
73
|
-
defaultKeyType: YAML_SCALAR_TYPES.PLAIN,
|
|
74
|
-
});
|
|
75
|
-
/**
|
|
76
|
-
* WU-2125: Parse YAML content string into a validated object.
|
|
77
|
-
*
|
|
78
|
-
* Shared parse boundary for all read functions. Wraps YAML parse errors
|
|
79
|
-
* with structured error codes and path context.
|
|
80
|
-
*
|
|
81
|
-
* @param {string} text - Raw YAML content
|
|
82
|
-
* @param {string} sourcePath - File path (for error messages)
|
|
83
|
-
* @returns {Record<string, unknown>} Parsed document
|
|
84
|
-
* @throws {Error} YAML_PARSE_ERROR if YAML is invalid
|
|
85
|
-
*/
|
|
86
|
-
function parseWUYaml(text, sourcePath) {
|
|
87
|
-
try {
|
|
88
|
-
return parse(text);
|
|
89
|
-
}
|
|
90
|
-
catch (e) {
|
|
91
|
-
const msg = getErrorMessage(e);
|
|
92
|
-
throw createError(ErrorCodes.YAML_PARSE_ERROR, `Failed to parse YAML ${sourcePath}: ${msg}`, {
|
|
93
|
-
path: sourcePath,
|
|
94
|
-
originalError: msg,
|
|
95
|
-
});
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
/**
|
|
99
|
-
* WU-2125: Validate that a parsed WU document's id field matches the expected ID.
|
|
100
|
-
*
|
|
101
|
-
* @param {unknown} doc - Parsed YAML document (may be null for empty files)
|
|
102
|
-
* @param {string} expectedId - Expected WU ID (e.g., 'WU-123')
|
|
103
|
-
* @param {string} wuPath - File path (for error messages)
|
|
104
|
-
* @returns {Record<string, unknown>} Validated document
|
|
105
|
-
* @throws {Error} WU_NOT_FOUND if doc is null or ID does not match
|
|
106
|
-
*/
|
|
107
|
-
function validateWUId(doc, expectedId, wuPath) {
|
|
108
|
-
const parsed = doc;
|
|
109
|
-
if (!parsed || parsed.id !== expectedId) {
|
|
110
|
-
throw createError(ErrorCodes.WU_NOT_FOUND, `WU YAML id mismatch. Expected ${expectedId}, found ${parsed && parsed.id}`, { path: wuPath, expectedId, foundId: parsed && parsed.id });
|
|
111
|
-
}
|
|
112
|
-
return parsed;
|
|
113
|
-
}
|
|
114
|
-
/**
|
|
115
|
-
* Read and parse WU YAML file.
|
|
116
|
-
*
|
|
117
|
-
* Validates:
|
|
118
|
-
* - File exists
|
|
119
|
-
* - YAML is valid
|
|
120
|
-
* - WU ID matches expected ID
|
|
121
|
-
*
|
|
122
|
-
* @param {string} wuPath - Path to WU YAML file
|
|
123
|
-
* @param {string} expectedId - Expected WU ID (e.g., 'WU-123')
|
|
124
|
-
* @returns {object} Parsed YAML document
|
|
125
|
-
* @throws {Error} If file not found, YAML invalid, or ID mismatch
|
|
126
|
-
*/
|
|
127
|
-
export function readWU(wuPath, expectedId) {
|
|
128
|
-
if (!existsSync(wuPath)) {
|
|
129
|
-
throw createError(ErrorCodes.FILE_NOT_FOUND, `WU file not found: ${wuPath}`, {
|
|
130
|
-
path: wuPath,
|
|
131
|
-
expectedId,
|
|
132
|
-
});
|
|
133
|
-
}
|
|
134
|
-
const text = readFileSync(wuPath, { encoding: 'utf-8' });
|
|
135
|
-
const doc = parseWUYaml(text, wuPath);
|
|
136
|
-
return validateWUId(doc, expectedId, wuPath);
|
|
137
|
-
}
|
|
138
|
-
/**
|
|
139
|
-
* Read and parse WU YAML file asynchronously.
|
|
140
|
-
*
|
|
141
|
-
* Validates:
|
|
142
|
-
* - File exists
|
|
143
|
-
* - YAML is valid
|
|
144
|
-
* - WU ID matches expected ID
|
|
145
|
-
*
|
|
146
|
-
* @param {string} wuPath - Path to WU YAML file
|
|
147
|
-
* @param {string} expectedId - Expected WU ID (e.g., 'WU-123')
|
|
148
|
-
* @returns {Promise<object>} Parsed YAML document
|
|
149
|
-
* @throws {Error} If file not found, YAML invalid, or ID mismatch
|
|
150
|
-
*/
|
|
151
|
-
export async function readWUAsync(wuPath, expectedId) {
|
|
152
|
-
try {
|
|
153
|
-
const text = await fs.readFile(wuPath, { encoding: 'utf-8' });
|
|
154
|
-
const doc = parseWUYaml(text, wuPath);
|
|
155
|
-
return validateWUId(doc, expectedId, wuPath);
|
|
156
|
-
}
|
|
157
|
-
catch (err) {
|
|
158
|
-
const errObj = err;
|
|
159
|
-
if (errObj.code === 'ENOENT') {
|
|
160
|
-
throw createError(ErrorCodes.FILE_NOT_FOUND, `WU file not found: ${wuPath}`, {
|
|
161
|
-
path: wuPath,
|
|
162
|
-
expectedId,
|
|
163
|
-
});
|
|
164
|
-
}
|
|
165
|
-
throw err;
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
/**
|
|
169
|
-
* Parse YAML string to object.
|
|
170
|
-
* WU-1352: Centralized YAML parsing for consistency.
|
|
171
|
-
*
|
|
172
|
-
* @param {string} text - YAML string to parse
|
|
173
|
-
* @returns {object} Parsed object
|
|
174
|
-
* @throws {Error} If YAML is invalid
|
|
175
|
-
*/
|
|
176
|
-
export function parseYAML(text) {
|
|
177
|
-
return parse(text);
|
|
178
|
-
}
|
|
179
|
-
/**
|
|
180
|
-
* Stringify object to YAML with standardized options.
|
|
181
|
-
* WU-1352: Centralized YAML serialization for consistency.
|
|
182
|
-
*
|
|
183
|
-
* @param {object} doc - Object to stringify
|
|
184
|
-
* @param {object} [options] - Additional stringify options (merged with YAML_STRINGIFY_OPTIONS)
|
|
185
|
-
* @returns {string} YAML string
|
|
186
|
-
*/
|
|
187
|
-
export function stringifyYAML(doc, options = {}) {
|
|
188
|
-
return stringify(doc, { ...YAML_STRINGIFY_OPTIONS, ...options });
|
|
189
|
-
}
|
|
190
|
-
/**
|
|
191
|
-
* Read and parse YAML file without ID validation.
|
|
192
|
-
* WU-1352: For cases where you don't know/need to validate the WU ID.
|
|
193
|
-
*
|
|
194
|
-
* @param {string} yamlPath - Path to YAML file
|
|
195
|
-
* @returns {object} Parsed YAML document
|
|
196
|
-
* @throws {Error} If file not found or YAML invalid
|
|
197
|
-
*/
|
|
198
|
-
export function readWURaw(yamlPath) {
|
|
199
|
-
if (!existsSync(yamlPath)) {
|
|
200
|
-
throw createError(ErrorCodes.FILE_NOT_FOUND, `YAML file not found: ${yamlPath}`, {
|
|
201
|
-
path: yamlPath,
|
|
202
|
-
});
|
|
203
|
-
}
|
|
204
|
-
const text = readFileSync(yamlPath, { encoding: 'utf-8' });
|
|
205
|
-
return parseWUYaml(text, yamlPath);
|
|
206
|
-
}
|
|
207
|
-
/**
|
|
208
|
-
* Read and parse YAML file without ID validation asynchronously.
|
|
209
|
-
* WU-1352: For cases where you don't know/need to validate the WU ID.
|
|
210
|
-
*
|
|
211
|
-
* @param {string} yamlPath - Path to YAML file
|
|
212
|
-
* @returns {Promise<object>} Parsed YAML document
|
|
213
|
-
* @throws {Error} If file not found or YAML invalid
|
|
214
|
-
*/
|
|
215
|
-
export async function readWURawAsync(yamlPath) {
|
|
216
|
-
try {
|
|
217
|
-
const text = await fs.readFile(yamlPath, { encoding: 'utf-8' });
|
|
218
|
-
return parseWUYaml(text, yamlPath);
|
|
219
|
-
}
|
|
220
|
-
catch (err) {
|
|
221
|
-
const errObj = err;
|
|
222
|
-
if (errObj.code === 'ENOENT') {
|
|
223
|
-
throw createError(ErrorCodes.FILE_NOT_FOUND, `YAML file not found: ${yamlPath}`, {
|
|
224
|
-
path: yamlPath,
|
|
225
|
-
});
|
|
226
|
-
}
|
|
227
|
-
throw err;
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
/**
|
|
231
|
-
* Write WU YAML file with consistent formatting.
|
|
232
|
-
* WU-1352: Uses YAML_STRINGIFY_OPTIONS for consistent output.
|
|
233
|
-
* WU-2115: Validates doc against BaseWUSchema before writing to prevent
|
|
234
|
-
* malformed WU YAML from being silently persisted.
|
|
235
|
-
*
|
|
236
|
-
* @param {string} wuPath - Path to WU YAML file
|
|
237
|
-
* @param {object} doc - YAML document to write
|
|
238
|
-
* @throws {ZodError} If doc fails BaseWUSchema validation
|
|
239
|
-
*/
|
|
240
|
-
export function writeWU(wuPath, doc) {
|
|
241
|
-
// WU-2115: Validate against schema before writing — throws ZodError on invalid data
|
|
242
|
-
BaseWUSchema.parse(doc);
|
|
243
|
-
const out = stringify(doc, YAML_STRINGIFY_OPTIONS);
|
|
244
|
-
writeFileSync(wuPath, out, { encoding: 'utf-8' });
|
|
245
|
-
}
|
|
246
|
-
/**
|
|
247
|
-
* Append note to WU document's notes field.
|
|
248
|
-
*
|
|
249
|
-
* Always outputs a string (Zod schema requires string type).
|
|
250
|
-
* Handles various input formats:
|
|
251
|
-
* - undefined/null/empty: Set note directly as string
|
|
252
|
-
* - string: Append with newline separator
|
|
253
|
-
* - array: Convert to newline-separated string, then append
|
|
254
|
-
* - other: Replace with note
|
|
255
|
-
*
|
|
256
|
-
* @param {object} doc - WU document
|
|
257
|
-
* @param {string} note - Note to append
|
|
258
|
-
*/
|
|
259
|
-
export function appendNote(doc, note) {
|
|
260
|
-
// Do nothing if note is falsy
|
|
261
|
-
if (!note)
|
|
262
|
-
return;
|
|
263
|
-
const existing = doc.notes;
|
|
264
|
-
if (existing === undefined || existing === null || existing === '') {
|
|
265
|
-
// No existing notes: set directly as string
|
|
266
|
-
doc.notes = note;
|
|
267
|
-
}
|
|
268
|
-
else if (Array.isArray(existing)) {
|
|
269
|
-
// Array notes: convert to string first (schema requires string), then append
|
|
270
|
-
const joined = existing.filter(Boolean).join(STRING_LITERALS.NEWLINE).trimEnd();
|
|
271
|
-
doc.notes = joined ? `${joined}${STRING_LITERALS.NEWLINE}${note}` : note;
|
|
272
|
-
}
|
|
273
|
-
else if (typeof existing === 'string') {
|
|
274
|
-
// String notes: append with newline
|
|
275
|
-
const trimmed = existing.trimEnd();
|
|
276
|
-
doc.notes = trimmed ? `${trimmed}${STRING_LITERALS.NEWLINE}${note}` : note;
|
|
277
|
-
}
|
|
278
|
-
else {
|
|
279
|
-
// Invalid type: replace with note
|
|
280
|
-
doc.notes = note;
|
|
281
|
-
}
|
|
282
|
-
}
|
|
283
|
-
/**
|
|
284
|
-
* Append an agent session entry to a WU's agent_sessions[] array
|
|
285
|
-
*
|
|
286
|
-
* @param {string} wuId - WU ID (e.g., "WU-1234")
|
|
287
|
-
* @param {object} sessionData - Session summary from endSession()
|
|
288
|
-
* @throws {Error} if WU file not found
|
|
289
|
-
*/
|
|
290
|
-
export function appendAgentSession(wuId, sessionData) {
|
|
291
|
-
const paths = createWuPaths();
|
|
292
|
-
const wuPath = paths.WU(wuId);
|
|
293
|
-
if (!existsSync(wuPath)) {
|
|
294
|
-
throw createError(ErrorCodes.FILE_NOT_FOUND, `WU file not found: ${wuPath}`);
|
|
295
|
-
}
|
|
296
|
-
// Parse WU YAML
|
|
297
|
-
const doc = readWU(wuPath, wuId);
|
|
298
|
-
// Initialize agent_sessions array if needed
|
|
299
|
-
if (!Array.isArray(doc.agent_sessions)) {
|
|
300
|
-
doc.agent_sessions = [];
|
|
301
|
-
}
|
|
302
|
-
// Append session
|
|
303
|
-
doc.agent_sessions.push(sessionData);
|
|
304
|
-
// Write back
|
|
305
|
-
writeWU(wuPath, doc);
|
|
306
|
-
}
|
|
3
|
+
// WU-2689 (INIT-058 L4): Shim — real module lives in @lumenflow/packs-software-delivery.
|
|
4
|
+
// Re-export preserves the `@lumenflow/core/wu-yaml` subpath for existing consumers
|
|
5
|
+
// until Layer 7 removes the shim.
|
|
6
|
+
export * from '@lumenflow/packs-software-delivery/state/wu-yaml';
|
|
307
7
|
//# sourceMappingURL=wu-yaml.js.map
|
package/dist/wu-yaml.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wu-yaml.js","sourceRoot":"","sources":["../src/wu-yaml.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,yCAAyC;AAEzC,
|
|
1
|
+
{"version":3,"file":"wu-yaml.js","sourceRoot":"","sources":["../src/wu-yaml.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,yCAAyC;AAEzC,yFAAyF;AACzF,mFAAmF;AACnF,kCAAkC;AAClC,cAAc,kDAAkD,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lumenflow/core",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.0",
|
|
4
4
|
"description": "Core WU lifecycle tools for LumenFlow workflow framework",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"lumenflow",
|
|
@@ -110,13 +110,10 @@
|
|
|
110
110
|
"./context/index": "./dist/context/index.js",
|
|
111
111
|
"./context/location-resolver": "./dist/context/location-resolver.js",
|
|
112
112
|
"./core/worktree-guard": "./dist/core/worktree-guard.js",
|
|
113
|
-
"./coverage-gate": "./dist/coverage-gate.js",
|
|
114
113
|
"./dependency-graph": "./dist/dependency-graph.js",
|
|
115
114
|
"./dependency-validator": "./dist/dependency-validator.js",
|
|
116
115
|
"./docs-path-validator": "./dist/docs-path-validator.js",
|
|
117
116
|
"./domain/orchestration.constants": "./dist/domain/orchestration.constants.js",
|
|
118
|
-
"./gates-agent-mode": "./dist/gates-agent-mode.js",
|
|
119
|
-
"./gates-config": "./dist/gates-config.js",
|
|
120
117
|
"./generate-traceability": "./dist/generate-traceability.js",
|
|
121
118
|
"./hardcoded-strings": "./dist/hardcoded-strings.js",
|
|
122
119
|
"./git-context-extractor": "./dist/git-context-extractor.js",
|
|
@@ -137,7 +134,6 @@
|
|
|
137
134
|
"./prompt-linter": "./dist/prompt-linter.js",
|
|
138
135
|
"./rebase-artifact-cleanup": "./dist/rebase-artifact-cleanup.js",
|
|
139
136
|
"./recovery/recovery-analyzer": "./dist/recovery/recovery-analyzer.js",
|
|
140
|
-
"./resolve-policy": "./dist/resolve-policy.js",
|
|
141
137
|
"./rollback-utils": "./dist/rollback-utils.js",
|
|
142
138
|
"./schemas/memory-arg-validators": "./dist/schemas/memory-arg-validators.js",
|
|
143
139
|
"./spawn-strategy": "./dist/spawn-strategy.js",
|
|
@@ -154,6 +150,7 @@
|
|
|
154
150
|
"./validators/claim-validation": "./dist/validators/claim-validation.js",
|
|
155
151
|
"./validators/supabase-docs-linter": "./dist/validators/supabase-docs-linter.js",
|
|
156
152
|
"./validators/wu-tasks": "./dist/validators/wu-tasks.js",
|
|
153
|
+
"./integration-target": "./dist/integration-target.js",
|
|
157
154
|
"./worktree-symlink": "./dist/worktree-symlink.js",
|
|
158
155
|
"./wu-checkpoint": "./dist/wu-checkpoint.js",
|
|
159
156
|
"./wu-claim-resume": "./dist/wu-claim-resume.js",
|
|
@@ -193,7 +190,9 @@
|
|
|
193
190
|
"./wu-validation-constants": "./dist/wu-validation-constants.js",
|
|
194
191
|
"./wu-validator": "./dist/wu-validator.js",
|
|
195
192
|
"./wu-yaml-fixer": "./dist/wu-yaml-fixer.js",
|
|
196
|
-
"./normalize-config-keys": "./dist/normalize-config-keys.js"
|
|
193
|
+
"./normalize-config-keys": "./dist/normalize-config-keys.js",
|
|
194
|
+
"./env-accessors": "./dist/env-accessors.js",
|
|
195
|
+
"./delivery-review-contract": "./dist/delivery-review-contract.js"
|
|
197
196
|
},
|
|
198
197
|
"main": "./dist/index.js",
|
|
199
198
|
"bin": {
|
|
@@ -226,7 +225,11 @@
|
|
|
226
225
|
"tiktoken": "^1.0.21",
|
|
227
226
|
"xstate": "^5.28.0",
|
|
228
227
|
"yaml": "^2.8.2",
|
|
229
|
-
"zod": "^4.3.6"
|
|
228
|
+
"zod": "^4.3.6",
|
|
229
|
+
"@lumenflow/packs-agent-runtime": "^5.0.0",
|
|
230
|
+
"@lumenflow/kernel": "5.0.0",
|
|
231
|
+
"@lumenflow/packs-software-delivery": "^5.0.0",
|
|
232
|
+
"@lumenflow/host": "^5.0.0-alpha.0"
|
|
230
233
|
},
|
|
231
234
|
"devDependencies": {
|
|
232
235
|
"@vitest/coverage-v8": "^4.0.18",
|
|
@@ -236,7 +239,7 @@
|
|
|
236
239
|
"vitest": "^4.0.18"
|
|
237
240
|
},
|
|
238
241
|
"peerDependencies": {
|
|
239
|
-
"@lumenflow/memory": "
|
|
242
|
+
"@lumenflow/memory": "5.0.0"
|
|
240
243
|
},
|
|
241
244
|
"peerDependenciesMeta": {
|
|
242
245
|
"@lumenflow/memory": {
|
|
@@ -255,7 +258,7 @@
|
|
|
255
258
|
"pack:dist": "pnpm pack",
|
|
256
259
|
"clean": "rm -rf dist *.tgz",
|
|
257
260
|
"test": "vitest run",
|
|
258
|
-
"lint": "eslint src --quiet --rule no-console:off --rule @typescript-eslint/no-unused-vars:off --rule sonarjs/concise-regex:off",
|
|
261
|
+
"lint": "NODE_OPTIONS=--max-old-space-size=8192 eslint src --quiet --rule no-console:off --rule @typescript-eslint/no-unused-vars:off --rule sonarjs/concise-regex:off",
|
|
259
262
|
"typecheck": "tsc --noEmit"
|
|
260
263
|
}
|
|
261
264
|
}
|
package/dist/coverage-gate.d.ts
DELETED
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
/// <reference path="./types.d.ts" />
|
|
3
|
-
/**
|
|
4
|
-
* Coverage Gate for Quality Gates
|
|
5
|
-
*
|
|
6
|
-
* WU-1433: Adds coverage checking to gates with configurable mode (warn/block).
|
|
7
|
-
* Enforces ≥90% coverage on hex core files (application layer).
|
|
8
|
-
*
|
|
9
|
-
* Mode flag allows gradual rollout:
|
|
10
|
-
* - warn: Log failures but don't block (default)
|
|
11
|
-
* - block: Fail the gate if thresholds not met
|
|
12
|
-
*
|
|
13
|
-
* @see {@link packages/@lumenflow/cli/src/gates.ts} - Integration point
|
|
14
|
-
* @see {@link vitest.config.ts} - Coverage thresholds
|
|
15
|
-
*/
|
|
16
|
-
/**
|
|
17
|
-
* Coverage gate modes
|
|
18
|
-
* @constant
|
|
19
|
-
*/
|
|
20
|
-
export declare const COVERAGE_GATE_MODES: Readonly<{
|
|
21
|
-
/** Log warnings but don't fail the gate */
|
|
22
|
-
WARN: "warn";
|
|
23
|
-
/** Fail the gate if thresholds not met */
|
|
24
|
-
BLOCK: "block";
|
|
25
|
-
}>;
|
|
26
|
-
/**
|
|
27
|
-
* Glob patterns for hex core files that require ≥90% coverage.
|
|
28
|
-
* These are the critical application layer files.
|
|
29
|
-
*
|
|
30
|
-
* WU-1068: Changed from @exampleapp to @lumenflow for framework reusability.
|
|
31
|
-
* Project-specific patterns should be configured in workspace.yaml.
|
|
32
|
-
*
|
|
33
|
-
* @constant {string[]}
|
|
34
|
-
*/
|
|
35
|
-
export declare const HEX_CORE_PATTERNS: readonly string[];
|
|
36
|
-
/**
|
|
37
|
-
* Default coverage threshold for hex core files (percentage)
|
|
38
|
-
* WU-1262: Kept for backwards compatibility.
|
|
39
|
-
* WU-2044: Now delegates to DEFAULT_MIN_COVERAGE from gate-constants.ts (DRY).
|
|
40
|
-
* The actual threshold is determined by resolveCoverageConfig() based on methodology.
|
|
41
|
-
* @constant {number}
|
|
42
|
-
*/
|
|
43
|
-
export declare const COVERAGE_THRESHOLD = 90;
|
|
44
|
-
/**
|
|
45
|
-
* Default path to coverage summary JSON
|
|
46
|
-
* @constant {string}
|
|
47
|
-
*/
|
|
48
|
-
export declare const DEFAULT_COVERAGE_PATH = "coverage/coverage-summary.json";
|
|
49
|
-
/**
|
|
50
|
-
* Check if a file path is in the hex core layer.
|
|
51
|
-
*
|
|
52
|
-
* WU-2448: Coverage reporters may emit absolute paths (e.g., <repo-root>/packages/...)
|
|
53
|
-
* or file:// URLs; use substring matching so hex-core checks still apply.
|
|
54
|
-
*
|
|
55
|
-
* @param {string|null|undefined} filePath - File path to check
|
|
56
|
-
* @returns {boolean} True if file is in hex core layer
|
|
57
|
-
*/
|
|
58
|
-
export declare function isHexCoreFile(filePath: UnsafeAny): boolean;
|
|
59
|
-
/**
|
|
60
|
-
* Parse coverage JSON file.
|
|
61
|
-
*
|
|
62
|
-
* @param {string} coveragePath - Path to coverage-summary.json
|
|
63
|
-
* @returns {object|null} Parsed coverage data or null if invalid
|
|
64
|
-
*/
|
|
65
|
-
export declare function parseCoverageJson(coveragePath: UnsafeAny): {
|
|
66
|
-
total: any;
|
|
67
|
-
files: Record<string, unknown>;
|
|
68
|
-
} | null;
|
|
69
|
-
/**
|
|
70
|
-
* Check if coverage meets thresholds for hex core files.
|
|
71
|
-
*
|
|
72
|
-
* @param {object|null} coverageData - Parsed coverage data
|
|
73
|
-
* @param {number} [threshold] - Coverage threshold to use (defaults to COVERAGE_THRESHOLD)
|
|
74
|
-
* @returns {{ pass: boolean, failures: Array<{ file: string, actual: number, threshold: number, metric: string }> }}
|
|
75
|
-
*/
|
|
76
|
-
export declare function checkCoverageThresholds(coverageData: UnsafeAny, threshold?: number): {
|
|
77
|
-
pass: boolean;
|
|
78
|
-
failures: {
|
|
79
|
-
file: string;
|
|
80
|
-
actual: number;
|
|
81
|
-
threshold: number;
|
|
82
|
-
metric: string;
|
|
83
|
-
}[];
|
|
84
|
-
};
|
|
85
|
-
/**
|
|
86
|
-
* Format coverage data for display.
|
|
87
|
-
*
|
|
88
|
-
* @param {object|null} coverageData - Parsed coverage data
|
|
89
|
-
* @returns {string} Formatted output string
|
|
90
|
-
*/
|
|
91
|
-
export declare function formatCoverageDelta(coverageData: UnsafeAny): string;
|
|
92
|
-
/**
|
|
93
|
-
* Logger interface for coverage gate output
|
|
94
|
-
*/
|
|
95
|
-
interface CoverageGateLogger {
|
|
96
|
-
log: (...args: unknown[]) => void;
|
|
97
|
-
}
|
|
98
|
-
/**
|
|
99
|
-
* Options for running coverage gate
|
|
100
|
-
*/
|
|
101
|
-
export interface CoverageGateOptions {
|
|
102
|
-
/** Gate mode ('warn' or 'block') */
|
|
103
|
-
mode?: string;
|
|
104
|
-
/** Path to coverage JSON */
|
|
105
|
-
coveragePath?: string;
|
|
106
|
-
/** Logger for output */
|
|
107
|
-
logger?: CoverageGateLogger;
|
|
108
|
-
/**
|
|
109
|
-
* WU-1262: Coverage threshold override (0-100).
|
|
110
|
-
* When provided, overrides the default COVERAGE_THRESHOLD constant.
|
|
111
|
-
* This is typically populated from resolveCoverageConfig().
|
|
112
|
-
*/
|
|
113
|
-
threshold?: number;
|
|
114
|
-
}
|
|
115
|
-
/**
|
|
116
|
-
* Run coverage gate.
|
|
117
|
-
*
|
|
118
|
-
* @param {CoverageGateOptions} options - Gate options
|
|
119
|
-
* @returns {Promise<{ ok: boolean, mode: string, duration: number, message: string }>}
|
|
120
|
-
*/
|
|
121
|
-
export declare function runCoverageGate(options?: CoverageGateOptions): Promise<{
|
|
122
|
-
ok: boolean;
|
|
123
|
-
mode: string;
|
|
124
|
-
duration: number;
|
|
125
|
-
message: string;
|
|
126
|
-
}>;
|
|
127
|
-
export {};
|
|
128
|
-
//# sourceMappingURL=coverage-gate.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"coverage-gate.d.ts","sourceRoot":"","sources":["../src/coverage-gate.ts"],"names":[],"mappings":";AAGA;;;;;;;;;;;;GAYG;AAOH;;;GAGG;AACH,eAAO,MAAM,mBAAmB;IAC9B,2CAA2C;;IAE3C,0CAA0C;;EAE1C,CAAC;AAEH;;;;;;;;GAQG;AACH,eAAO,MAAM,iBAAiB,mBAG5B,CAAC;AAEH;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,KAAuB,CAAC;AAEvD;;;GAGG;AACH,eAAO,MAAM,qBAAqB,mCAAmC,CAAC;AAEtE;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,SAAS,WAQhD;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,YAAY,EAAE,SAAS;;;SAuBxD;AAED;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CAAC,YAAY,EAAE,SAAS,EAAE,SAAS,CAAC,EAAE,MAAM;;;;;;;;EA+BlF;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,YAAY,EAAE,SAAS,UA6B1D;AAED;;GAEG;AACH,UAAU,kBAAkB;IAC1B,GAAG,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,IAAI,CAAC;CACnC;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,oCAAoC;IACpC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,4BAA4B;IAC5B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,wBAAwB;IACxB,MAAM,CAAC,EAAE,kBAAkB,CAAC;IAC5B;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;GAKG;AACH,wBAAsB,eAAe,CAAC,OAAO,GAAE,mBAAwB;;;;;GAiDtE"}
|