@codyswann/lisa 7.1.5 → 8.0.1
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/all/copy-overwrite/scripts/check-npm-publish-landed.mjs +0 -2
- package/all/copy-overwrite/scripts/lib/push-timing.mjs +3 -6
- package/all/copy-overwrite/scripts/lisa-enforcement-fallback.sh +31 -32
- package/all/copy-overwrite/scripts/lisa-hooks/block-managed-file-edits.sh +201 -20
- package/all/copy-overwrite/scripts/npm-updater-helper-graph.json +3 -2
- package/dist/cli/admit-cmd.d.ts.map +1 -1
- package/dist/cli/admit-cmd.js +16 -10
- package/dist/cli/admit-cmd.js.map +1 -1
- package/dist/cli/apply.d.ts.map +1 -1
- package/dist/cli/apply.js +2 -2
- package/dist/cli/apply.js.map +1 -1
- package/dist/cli/check-cmd.d.ts.map +1 -1
- package/dist/cli/check-cmd.js +8 -4
- package/dist/cli/check-cmd.js.map +1 -1
- package/dist/cli/doctor-coderabbit.js +2 -2
- package/dist/cli/doctor-coderabbit.js.map +1 -1
- package/dist/cli/doctor-readiness-supply-chain-python.d.ts +5 -1
- package/dist/cli/doctor-readiness-supply-chain-python.d.ts.map +1 -1
- package/dist/cli/doctor-readiness-supply-chain-python.js +44 -10
- package/dist/cli/doctor-readiness-supply-chain-python.js.map +1 -1
- package/dist/cli/doctor-readiness.js +2 -2
- package/dist/cli/doctor-readiness.js.map +1 -1
- package/dist/cli/doctor-worker-journey.js +2 -2
- package/dist/cli/doctor-worker-journey.js.map +1 -1
- package/dist/cli/doctor.d.ts.map +1 -1
- package/dist/cli/doctor.js +7 -4
- package/dist/cli/doctor.js.map +1 -1
- package/dist/cli/file-upstream-cmd.d.ts.map +1 -1
- package/dist/cli/file-upstream-cmd.js +20 -25
- package/dist/cli/file-upstream-cmd.js.map +1 -1
- package/dist/cli/gh-cli.d.ts +2 -2
- package/dist/cli/gh-cli.d.ts.map +1 -1
- package/dist/cli/gh-cli.js +13 -6
- package/dist/cli/gh-cli.js.map +1 -1
- package/dist/cli/health-cmd.d.ts.map +1 -1
- package/dist/cli/health-cmd.js +7 -19
- package/dist/cli/health-cmd.js.map +1 -1
- package/dist/cli/lisa-test-run-jest-merge.js +5 -5
- package/dist/cli/lisa-test-run-jest-merge.js.map +1 -1
- package/dist/cli/lisa-test-run.js +8 -4
- package/dist/cli/lisa-test-run.js.map +1 -1
- package/dist/cli/pr-landing.js +2 -2
- package/dist/cli/pr-landing.js.map +1 -1
- package/dist/cli/update-check.d.ts.map +1 -1
- package/dist/cli/update-check.js +7 -4
- package/dist/cli/update-check.js.map +1 -1
- package/dist/cli/update-cmd.d.ts.map +1 -1
- package/dist/cli/update-cmd.js +7 -4
- package/dist/cli/update-cmd.js.map +1 -1
- package/dist/cli/worktree-ownership.d.ts.map +1 -1
- package/dist/cli/worktree-ownership.js +3 -3
- package/dist/cli/worktree-ownership.js.map +1 -1
- package/dist/codex/hooks-catalog.d.ts +151 -0
- package/dist/codex/hooks-catalog.d.ts.map +1 -0
- package/dist/codex/hooks-catalog.js +315 -0
- package/dist/codex/hooks-catalog.js.map +1 -0
- package/dist/codex/hooks-compatibility.d.ts +14 -0
- package/dist/codex/hooks-compatibility.d.ts.map +1 -0
- package/dist/codex/hooks-compatibility.js +196 -0
- package/dist/codex/hooks-compatibility.js.map +1 -0
- package/dist/codex/hooks-installer.d.ts +2 -49
- package/dist/codex/hooks-installer.d.ts.map +1 -1
- package/dist/codex/hooks-installer.js +5 -546
- package/dist/codex/hooks-installer.js.map +1 -1
- package/dist/codex/hooks-source-links.d.ts +11 -0
- package/dist/codex/hooks-source-links.d.ts.map +1 -0
- package/dist/codex/hooks-source-links.js +74 -0
- package/dist/codex/hooks-source-links.js.map +1 -0
- package/dist/codex/scripts/block-migration-edits.sh +2 -2
- package/dist/codex/scripts/block-suppress-directives.sh +3 -3
- package/dist/codex/scripts/format-on-edit.sh +2 -2
- package/dist/codex/scripts/lint-on-edit.sh +2 -2
- package/dist/codex/scripts/lisa-edit-gate.sh +19 -15
- package/dist/codex/scripts/rubocop-on-edit.sh +2 -2
- package/dist/codex/scripts/sg-scan-on-edit.sh +2 -2
- package/dist/configs/coverage-scope.d.ts +0 -23
- package/dist/configs/coverage-scope.d.ts.map +1 -1
- package/dist/configs/coverage-scope.js +2 -3
- package/dist/configs/coverage-scope.js.map +1 -1
- package/dist/configs/eslint/base.d.ts +2 -113
- package/dist/configs/eslint/base.d.ts.map +1 -1
- package/dist/configs/eslint/base.js +2 -165
- package/dist/configs/eslint/base.js.map +1 -1
- package/dist/configs/eslint/cdk.d.ts.map +1 -1
- package/dist/configs/eslint/cdk.js +82 -66
- package/dist/configs/eslint/cdk.js.map +1 -1
- package/dist/configs/eslint/expo-overrides.d.ts +103 -0
- package/dist/configs/eslint/expo-overrides.d.ts.map +1 -0
- package/dist/configs/eslint/expo-overrides.js +187 -0
- package/dist/configs/eslint/expo-overrides.js.map +1 -0
- package/dist/configs/eslint/expo.d.ts +2 -7
- package/dist/configs/eslint/expo.d.ts.map +1 -1
- package/dist/configs/eslint/expo.js +186 -258
- package/dist/configs/eslint/expo.js.map +1 -1
- package/dist/configs/eslint/nestjs.d.ts.map +1 -1
- package/dist/configs/eslint/nestjs.js +86 -70
- package/dist/configs/eslint/nestjs.js.map +1 -1
- package/dist/configs/eslint/process-environment-bans.d.ts +41 -0
- package/dist/configs/eslint/process-environment-bans.d.ts.map +1 -0
- package/dist/configs/eslint/process-environment-bans.js +50 -0
- package/dist/configs/eslint/process-environment-bans.js.map +1 -0
- package/dist/configs/eslint/shared-rules.d.ts +130 -0
- package/dist/configs/eslint/shared-rules.d.ts.map +1 -0
- package/dist/configs/eslint/shared-rules.js +233 -0
- package/dist/configs/eslint/shared-rules.js.map +1 -0
- package/dist/configs/eslint/typescript.d.ts.map +1 -1
- package/dist/configs/eslint/typescript.js +2 -4
- package/dist/configs/eslint/typescript.js.map +1 -1
- package/dist/configs/vitest/base.d.ts +2 -2
- package/dist/configs/vitest/base.d.ts.map +1 -1
- package/dist/configs/vitest/base.js +5 -5
- package/dist/configs/vitest/base.js.map +1 -1
- package/dist/configs/vitest/coverage-reports-directory.d.ts.map +1 -1
- package/dist/configs/vitest/coverage-reports-directory.js +3 -2
- package/dist/configs/vitest/coverage-reports-directory.js.map +1 -1
- package/dist/configs/vitest/refusal-announcement.js +2 -2
- package/dist/configs/vitest/refusal-announcement.js.map +1 -1
- package/dist/core/admission-lock.js +2 -3
- package/dist/core/admission-lock.js.map +1 -1
- package/dist/core/admission-state.d.ts.map +1 -1
- package/dist/core/admission-state.js +11 -5
- package/dist/core/admission-state.js.map +1 -1
- package/dist/core/admission.d.ts.map +1 -1
- package/dist/core/admission.js +2 -2
- package/dist/core/admission.js.map +1 -1
- package/dist/core/bootstrap-environment.d.ts.map +1 -1
- package/dist/core/bootstrap-environment.js +8 -5
- package/dist/core/bootstrap-environment.js.map +1 -1
- package/dist/core/downstream-names.d.ts.map +1 -1
- package/dist/core/downstream-names.js +48 -47
- package/dist/core/downstream-names.js.map +1 -1
- package/dist/core/effectiveness-store.d.ts.map +1 -1
- package/dist/core/effectiveness-store.js +3 -5
- package/dist/core/effectiveness-store.js.map +1 -1
- package/dist/core/gate-declaration-drift.d.ts.map +1 -1
- package/dist/core/gate-declaration-drift.js +46 -27
- package/dist/core/gate-declaration-drift.js.map +1 -1
- package/dist/core/kane-cli-process.d.ts.map +1 -1
- package/dist/core/kane-cli-process.js +46 -33
- package/dist/core/kane-cli-process.js.map +1 -1
- package/dist/core/kane-cli.d.ts.map +1 -1
- package/dist/core/kane-cli.js +3 -4
- package/dist/core/kane-cli.js.map +1 -1
- package/dist/core/lisa-agent-emit-extra.d.ts +75 -0
- package/dist/core/lisa-agent-emit-extra.d.ts.map +1 -0
- package/dist/core/lisa-agent-emit-extra.js +231 -0
- package/dist/core/lisa-agent-emit-extra.js.map +1 -0
- package/dist/core/lisa-agent-emit.d.ts +79 -0
- package/dist/core/lisa-agent-emit.d.ts.map +1 -0
- package/dist/core/lisa-agent-emit.js +224 -0
- package/dist/core/lisa-agent-emit.js.map +1 -0
- package/dist/core/lisa-deletions.d.ts +116 -0
- package/dist/core/lisa-deletions.d.ts.map +1 -0
- package/dist/core/lisa-deletions.js +316 -0
- package/dist/core/lisa-deletions.js.map +1 -0
- package/dist/core/lisa-file-results.d.ts +58 -0
- package/dist/core/lisa-file-results.d.ts.map +1 -0
- package/dist/core/lisa-file-results.js +173 -0
- package/dist/core/lisa-file-results.js.map +1 -0
- package/dist/core/lisa-maintenance.d.ts +139 -0
- package/dist/core/lisa-maintenance.d.ts.map +1 -0
- package/dist/core/lisa-maintenance.js +324 -0
- package/dist/core/lisa-maintenance.js.map +1 -0
- package/dist/core/lisa-owned-hash-ledger.d.ts +7 -5
- package/dist/core/lisa-owned-hash-ledger.d.ts.map +1 -1
- package/dist/core/lisa-owned-hash-ledger.js +44 -6036
- package/dist/core/lisa-owned-hash-ledger.js.map +1 -1
- package/dist/core/lisa-owned-hash-ledger.json +6021 -0
- package/dist/core/lisa-plugin-sync.d.ts +96 -0
- package/dist/core/lisa-plugin-sync.d.ts.map +1 -0
- package/dist/core/lisa-plugin-sync.js +216 -0
- package/dist/core/lisa-plugin-sync.js.map +1 -0
- package/dist/core/lisa-plugins.d.ts +42 -0
- package/dist/core/lisa-plugins.d.ts.map +1 -0
- package/dist/core/lisa-plugins.js +155 -0
- package/dist/core/lisa-plugins.js.map +1 -0
- package/dist/core/lisa-state.d.ts +202 -0
- package/dist/core/lisa-state.d.ts.map +1 -0
- package/dist/core/lisa-state.js +205 -0
- package/dist/core/lisa-state.js.map +1 -0
- package/dist/core/lisa-summary-stats.d.ts +74 -0
- package/dist/core/lisa-summary-stats.d.ts.map +1 -0
- package/dist/core/lisa-summary-stats.js +189 -0
- package/dist/core/lisa-summary-stats.js.map +1 -0
- package/dist/core/lisa-summary.d.ts +34 -0
- package/dist/core/lisa-summary.d.ts.map +1 -0
- package/dist/core/lisa-summary.js +144 -0
- package/dist/core/lisa-summary.js.map +1 -0
- package/dist/core/lisa-templates.d.ts +98 -0
- package/dist/core/lisa-templates.d.ts.map +1 -0
- package/dist/core/lisa-templates.js +251 -0
- package/dist/core/lisa-templates.js.map +1 -0
- package/dist/core/lisa.d.ts +14 -903
- package/dist/core/lisa.d.ts.map +1 -1
- package/dist/core/lisa.js +30 -2275
- package/dist/core/lisa.js.map +1 -1
- package/dist/core/nightly-e2e-guard-behavior-certificate.js +2 -2
- package/dist/core/plugin-command.d.ts.map +1 -1
- package/dist/core/plugin-command.js +117 -61
- package/dist/core/plugin-command.js.map +1 -1
- package/dist/core/template-ownership.d.ts.map +1 -1
- package/dist/core/template-ownership.js +0 -1
- package/dist/core/template-ownership.js.map +1 -1
- package/dist/core/upstream-attribution-body.d.ts +4 -11
- package/dist/core/upstream-attribution-body.d.ts.map +1 -1
- package/dist/core/upstream-attribution-body.js +61 -373
- package/dist/core/upstream-attribution-body.js.map +1 -1
- package/dist/core/upstream-attribution-fields.d.ts +40 -0
- package/dist/core/upstream-attribution-fields.d.ts.map +1 -0
- package/dist/core/upstream-attribution-fields.js +167 -0
- package/dist/core/upstream-attribution-fields.js.map +1 -0
- package/dist/core/upstream-attribution-files.d.ts +15 -0
- package/dist/core/upstream-attribution-files.d.ts.map +1 -0
- package/dist/core/upstream-attribution-files.js +156 -0
- package/dist/core/upstream-attribution-files.js.map +1 -0
- package/dist/core/upstream-attribution-guards.d.ts +80 -0
- package/dist/core/upstream-attribution-guards.d.ts.map +1 -0
- package/dist/core/upstream-attribution-guards.js +284 -0
- package/dist/core/upstream-attribution-guards.js.map +1 -0
- package/dist/core/upstream-evidence-manifest.d.ts +1 -1
- package/dist/core/upstream-evidence-manifest.d.ts.map +1 -1
- package/dist/core/upstream-evidence-manifest.js +67 -30435
- package/dist/core/upstream-evidence-manifest.js.map +1 -1
- package/dist/core/upstream-evidence-manifest.json +30520 -0
- package/dist/health/agentic-contract.d.ts +94 -0
- package/dist/health/agentic-contract.d.ts.map +1 -0
- package/dist/health/agentic-contract.js +2 -0
- package/dist/health/agentic-contract.js.map +1 -0
- package/dist/health/agentic-evidence.d.ts +16 -0
- package/dist/health/agentic-evidence.d.ts.map +1 -0
- package/dist/health/agentic-evidence.js +213 -0
- package/dist/health/agentic-evidence.js.map +1 -0
- package/dist/health/agentic.d.ts +11 -74
- package/dist/health/agentic.d.ts.map +1 -1
- package/dist/health/agentic.js +42 -216
- package/dist/health/agentic.js.map +1 -1
- package/dist/health/deadline.d.ts +4 -1
- package/dist/health/deadline.d.ts.map +1 -1
- package/dist/health/deadline.js +4 -3
- package/dist/health/deadline.js.map +1 -1
- package/dist/health/deterministic-inputs.d.ts.map +1 -1
- package/dist/health/deterministic-inputs.js +3 -11
- package/dist/health/deterministic-inputs.js.map +1 -1
- package/dist/health/deterministic-probes.d.ts +52 -0
- package/dist/health/deterministic-probes.d.ts.map +1 -0
- package/dist/health/deterministic-probes.js +142 -0
- package/dist/health/deterministic-probes.js.map +1 -0
- package/dist/health/deterministic.d.ts +2 -25
- package/dist/health/deterministic.d.ts.map +1 -1
- package/dist/health/deterministic.js +14 -106
- package/dist/health/deterministic.js.map +1 -1
- package/dist/health/finding-utils.d.ts +4 -3
- package/dist/health/finding-utils.d.ts.map +1 -1
- package/dist/health/finding-utils.js +4 -4
- package/dist/health/finding-utils.js.map +1 -1
- package/dist/health/governance-probes.d.ts +29 -24
- package/dist/health/governance-probes.d.ts.map +1 -1
- package/dist/health/governance-probes.js +29 -25
- package/dist/health/governance-probes.js.map +1 -1
- package/dist/health/hook-inspection.d.ts +4 -3
- package/dist/health/hook-inspection.d.ts.map +1 -1
- package/dist/health/hook-inspection.js +17 -11
- package/dist/health/hook-inspection.js.map +1 -1
- package/dist/health/plugin-inspection.d.ts +6 -4
- package/dist/health/plugin-inspection.d.ts.map +1 -1
- package/dist/health/plugin-inspection.js +10 -9
- package/dist/health/plugin-inspection.js.map +1 -1
- package/dist/health/prepare.js +24 -8
- package/dist/health/prepare.js.map +1 -1
- package/dist/health/project-probes.d.ts +14 -7
- package/dist/health/project-probes.d.ts.map +1 -1
- package/dist/health/project-probes.js +14 -9
- package/dist/health/project-probes.js.map +1 -1
- package/dist/health/ruleset-compare.d.ts +30 -0
- package/dist/health/ruleset-compare.d.ts.map +1 -0
- package/dist/health/ruleset-compare.js +143 -0
- package/dist/health/ruleset-compare.js.map +1 -0
- package/dist/health/ruleset-config-checks.d.ts +66 -0
- package/dist/health/ruleset-config-checks.d.ts.map +1 -0
- package/dist/health/ruleset-config-checks.js +190 -0
- package/dist/health/ruleset-config-checks.js.map +1 -0
- package/dist/health/ruleset-expected.d.ts +39 -0
- package/dist/health/ruleset-expected.d.ts.map +1 -0
- package/dist/health/ruleset-expected.js +181 -0
- package/dist/health/ruleset-expected.js.map +1 -0
- package/dist/health/ruleset-gh.d.ts +85 -0
- package/dist/health/ruleset-gh.d.ts.map +1 -0
- package/dist/health/ruleset-gh.js +177 -0
- package/dist/health/ruleset-gh.js.map +1 -0
- package/dist/health/ruleset-inspection.d.ts +13 -117
- package/dist/health/ruleset-inspection.d.ts.map +1 -1
- package/dist/health/ruleset-inspection.js +8 -738
- package/dist/health/ruleset-inspection.js.map +1 -1
- package/dist/health/ruleset-normalize.d.ts +32 -0
- package/dist/health/ruleset-normalize.d.ts.map +1 -0
- package/dist/health/ruleset-normalize.js +160 -0
- package/dist/health/ruleset-normalize.js.map +1 -0
- package/dist/health/template-compose.d.ts +9 -0
- package/dist/health/template-compose.d.ts.map +1 -0
- package/dist/health/template-compose.js +105 -0
- package/dist/health/template-compose.js.map +1 -0
- package/dist/health/template-inspection.d.ts +5 -52
- package/dist/health/template-inspection.d.ts.map +1 -1
- package/dist/health/template-inspection.js +13 -435
- package/dist/health/template-inspection.js.map +1 -1
- package/dist/health/template-plan.d.ts +33 -0
- package/dist/health/template-plan.d.ts.map +1 -0
- package/dist/health/template-plan.js +154 -0
- package/dist/health/template-plan.js.map +1 -0
- package/dist/health/template-shape.d.ts +19 -0
- package/dist/health/template-shape.d.ts.map +1 -0
- package/dist/health/template-shape.js +122 -0
- package/dist/health/template-shape.js.map +1 -0
- package/dist/health/workflow-excerpt.d.ts +15 -0
- package/dist/health/workflow-excerpt.d.ts.map +1 -0
- package/dist/health/workflow-excerpt.js +88 -0
- package/dist/health/workflow-excerpt.js.map +1 -0
- package/dist/health/workflow-inputs-inspection.d.ts +16 -0
- package/dist/health/workflow-inputs-inspection.d.ts.map +1 -0
- package/dist/health/workflow-inputs-inspection.js +116 -0
- package/dist/health/workflow-inputs-inspection.js.map +1 -0
- package/dist/opencode/plugin-templates/block-managed-file-edits.sh +201 -20
- package/dist/standards/capture.d.ts.map +1 -1
- package/dist/standards/capture.js +73 -25
- package/dist/standards/capture.js.map +1 -1
- package/dist/standards/contract.d.ts.map +1 -1
- package/dist/standards/contract.js +26 -9
- package/dist/standards/contract.js.map +1 -1
- package/dist/standards/git-state.d.ts.map +1 -1
- package/dist/standards/git-state.js +2 -2
- package/dist/standards/git-state.js.map +1 -1
- package/dist/standards/registry-checks.d.ts +34 -0
- package/dist/standards/registry-checks.d.ts.map +1 -0
- package/dist/standards/registry-checks.js +137 -0
- package/dist/standards/registry-checks.js.map +1 -0
- package/dist/standards/registry.d.ts +3 -13
- package/dist/standards/registry.d.ts.map +1 -1
- package/dist/standards/registry.js +105 -194
- package/dist/standards/registry.js.map +1 -1
- package/dist/standards/storage.js +8 -10
- package/dist/standards/storage.js.map +1 -1
- package/dist/strategies/deduplicate-arrays.d.ts +18 -0
- package/dist/strategies/deduplicate-arrays.d.ts.map +1 -0
- package/dist/strategies/deduplicate-arrays.js +25 -0
- package/dist/strategies/deduplicate-arrays.js.map +1 -0
- package/dist/strategies/package-lisa-detect.d.ts +10 -0
- package/dist/strategies/package-lisa-detect.d.ts.map +1 -0
- package/dist/strategies/package-lisa-detect.js +178 -0
- package/dist/strategies/package-lisa-detect.js.map +1 -0
- package/dist/strategies/package-lisa-direct-floors.d.ts +16 -0
- package/dist/strategies/package-lisa-direct-floors.d.ts.map +1 -0
- package/dist/strategies/package-lisa-direct-floors.js +37 -0
- package/dist/strategies/package-lisa-direct-floors.js.map +1 -0
- package/dist/strategies/package-lisa-host-pins.d.ts +43 -0
- package/dist/strategies/package-lisa-host-pins.d.ts.map +1 -0
- package/dist/strategies/package-lisa-host-pins.js +254 -0
- package/dist/strategies/package-lisa-host-pins.js.map +1 -0
- package/dist/strategies/package-lisa-manifest-guards.d.ts +59 -0
- package/dist/strategies/package-lisa-manifest-guards.d.ts.map +1 -0
- package/dist/strategies/package-lisa-manifest-guards.js +234 -0
- package/dist/strategies/package-lisa-manifest-guards.js.map +1 -0
- package/dist/strategies/package-lisa-pin-alignment.d.ts +34 -0
- package/dist/strategies/package-lisa-pin-alignment.d.ts.map +1 -0
- package/dist/strategies/package-lisa-pin-alignment.js +106 -0
- package/dist/strategies/package-lisa-pin-alignment.js.map +1 -0
- package/dist/strategies/package-lisa-script-notes.d.ts +19 -0
- package/dist/strategies/package-lisa-script-notes.d.ts.map +1 -0
- package/dist/strategies/package-lisa-script-notes.js +145 -0
- package/dist/strategies/package-lisa-script-notes.js.map +1 -0
- package/dist/strategies/package-lisa-template-apply.d.ts +53 -0
- package/dist/strategies/package-lisa-template-apply.d.ts.map +1 -0
- package/dist/strategies/package-lisa-template-apply.js +216 -0
- package/dist/strategies/package-lisa-template-apply.js.map +1 -0
- package/dist/strategies/package-lisa-template-merge.d.ts +42 -0
- package/dist/strategies/package-lisa-template-merge.d.ts.map +1 -0
- package/dist/strategies/package-lisa-template-merge.js +202 -0
- package/dist/strategies/package-lisa-template-merge.js.map +1 -0
- package/dist/strategies/package-lisa-types.d.ts +5 -0
- package/dist/strategies/package-lisa-types.d.ts.map +1 -1
- package/dist/strategies/package-lisa.d.ts +1 -195
- package/dist/strategies/package-lisa.d.ts.map +1 -1
- package/dist/strategies/package-lisa.js +27 -1333
- package/dist/strategies/package-lisa.js.map +1 -1
- package/dist/strategies/tagged-merge-sections.d.ts +68 -0
- package/dist/strategies/tagged-merge-sections.d.ts.map +1 -0
- package/dist/strategies/tagged-merge-sections.js +113 -0
- package/dist/strategies/tagged-merge-sections.js.map +1 -0
- package/dist/strategies/tagged-merge.d.ts +1 -90
- package/dist/strategies/tagged-merge.d.ts.map +1 -1
- package/dist/strategies/tagged-merge.js +19 -190
- package/dist/strategies/tagged-merge.js.map +1 -1
- package/dist/utils/bounded-stream.d.ts +30 -0
- package/dist/utils/bounded-stream.d.ts.map +1 -0
- package/dist/utils/bounded-stream.js +63 -0
- package/dist/utils/bounded-stream.js.map +1 -0
- package/dist/utils/fibonacci.d.ts +3 -3
- package/dist/utils/fibonacci.d.ts.map +1 -1
- package/dist/utils/fibonacci.js +48 -10
- package/dist/utils/fibonacci.js.map +1 -1
- package/dist/utils/memo.d.ts +25 -0
- package/dist/utils/memo.d.ts.map +1 -0
- package/dist/utils/memo.js +32 -0
- package/dist/utils/memo.js.map +1 -0
- package/dist/utils/postinstall-trampoline.d.ts.map +1 -1
- package/dist/utils/postinstall-trampoline.js +3 -20
- package/dist/utils/postinstall-trampoline.js.map +1 -1
- package/dist/utils/process-environment.d.ts +42 -0
- package/dist/utils/process-environment.d.ts.map +1 -0
- package/dist/utils/process-environment.js +52 -0
- package/dist/utils/process-environment.js.map +1 -0
- package/dist/utils/resolve-executable.d.ts +89 -0
- package/dist/utils/resolve-executable.d.ts.map +1 -0
- package/dist/utils/resolve-executable.js +224 -0
- package/dist/utils/resolve-executable.js.map +1 -0
- package/dist/utils/shell-command-line.d.ts +9 -0
- package/dist/utils/shell-command-line.d.ts.map +1 -0
- package/dist/utils/shell-command-line.js +43 -0
- package/dist/utils/shell-command-line.js.map +1 -0
- package/dist/utils/usage-accounting-totals.d.ts +19 -0
- package/dist/utils/usage-accounting-totals.d.ts.map +1 -0
- package/dist/utils/usage-accounting-totals.js +145 -0
- package/dist/utils/usage-accounting-totals.js.map +1 -0
- package/dist/utils/usage-accounting.d.ts +2 -14
- package/dist/utils/usage-accounting.d.ts.map +1 -1
- package/dist/utils/usage-accounting.js +2 -169
- package/dist/utils/usage-accounting.js.map +1 -1
- package/eslint-plugin-code-organization/__tests__/enforce-statement-order-react-violations.test.js +213 -0
- package/eslint-plugin-code-organization/__tests__/enforce-statement-order-valid.test.js +251 -0
- package/eslint-plugin-code-organization/__tests__/enforce-statement-order-violations.test.js +222 -0
- package/eslint-plugin-code-organization/__tests__/statement-order-tester.js +42 -0
- package/eslint-plugin-code-organization/rules/enforce-statement-order.js +6 -8
- package/expo/copy-overwrite/jest.setup.ts +11 -10
- package/expo/create-only/scripts/zap-baseline.sh +6 -18
- package/harper-fabric/create-only/scripts/zap-baseline.sh +7 -9
- package/nestjs/create-only/scripts/zap-baseline.sh +6 -7
- package/package.json +5 -5
- package/phaser/copy-overwrite/.husky/pre-push.verify +2 -0
- package/plugins/lisa/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa/.codex-plugin/skills/lisa-setup-remote-env/assets/session-start.sh +18 -5
- package/plugins/lisa/hooks/block-managed-file-edits.sh +201 -20
- package/plugins/lisa/hooks/block-masked-exit-status.sh +1 -1
- package/plugins/lisa/hooks/block-no-verify.agy.sh +1 -1
- package/plugins/lisa/hooks/enforce-verification-gate.sh +1 -2
- package/plugins/lisa/hooks/ticket-sync-reminder.sh +2 -17
- package/plugins/lisa/hooks/track-plan-sessions.sh +7 -131
- package/plugins/lisa/scripts/remote-agent-aws-setup.sh +3 -1
- package/plugins/lisa/skills/lisa-setup-remote-env/assets/session-start.sh +18 -5
- package/plugins/lisa-agy/hooks/block-managed-file-edits.sh +201 -20
- package/plugins/lisa-agy/hooks/block-no-verify.agy.sh +1 -1
- package/plugins/lisa-agy/plugin.json +1 -1
- package/plugins/lisa-agy/scripts/remote-agent-aws-setup.sh +3 -1
- package/plugins/lisa-agy/skills/lisa-setup-remote-env/assets/session-start.sh +18 -5
- package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-agy/plugin.json +1 -1
- package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-copilot/hooks/block-managed-file-edits.sh +201 -20
- package/plugins/lisa-copilot/hooks/block-masked-exit-status.sh +1 -1
- package/plugins/lisa-copilot/hooks/enforce-verification-gate.sh +1 -2
- package/plugins/lisa-copilot/scripts/remote-agent-aws-setup.sh +3 -1
- package/plugins/lisa-copilot/skills/lisa-setup-remote-env/assets/session-start.sh +18 -5
- package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cursor/hooks/block-managed-file-edits.sh +201 -20
- package/plugins/lisa-cursor/hooks/block-masked-exit-status.sh +1 -1
- package/plugins/lisa-cursor/hooks/enforce-verification-gate.sh +1 -2
- package/plugins/lisa-cursor/scripts/remote-agent-aws-setup.sh +3 -1
- package/plugins/lisa-cursor/skills/lisa-setup-remote-env/assets/session-start.sh +18 -5
- package/plugins/lisa-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-devin/hooks/block-managed-file-edits.sh +201 -20
- package/plugins/lisa-devin/hooks/block-masked-exit-status.sh +1 -1
- package/plugins/lisa-devin/hooks/enforce-verification-gate.sh +1 -2
- package/plugins/lisa-devin/scripts/remote-agent-aws-setup.sh +3 -1
- package/plugins/lisa-devin/skills/lisa-setup-remote-env/assets/session-start.sh +18 -5
- package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-expo/.codex-plugin/skills/building-native-ui/references/webgpu-three.md +19 -9
- package/plugins/lisa-expo/.codex-plugin/skills/expo-tailwind-setup/SKILL.md +15 -4
- package/plugins/lisa-expo/skills/building-native-ui/references/webgpu-three.md +19 -9
- package/plugins/lisa-expo/skills/expo-tailwind-setup/SKILL.md +15 -4
- package/plugins/lisa-expo-agy/plugin.json +1 -1
- package/plugins/lisa-expo-agy/skills/building-native-ui/references/webgpu-three.md +19 -9
- package/plugins/lisa-expo-agy/skills/expo-tailwind-setup/SKILL.md +15 -4
- package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-copilot/skills/building-native-ui/references/webgpu-three.md +19 -9
- package/plugins/lisa-expo-copilot/skills/expo-tailwind-setup/SKILL.md +15 -4
- package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-cursor/skills/building-native-ui/references/webgpu-three.md +19 -9
- package/plugins/lisa-expo-cursor/skills/expo-tailwind-setup/SKILL.md +15 -4
- package/plugins/lisa-expo-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-devin/skills/building-native-ui/references/webgpu-three.md +19 -9
- package/plugins/lisa-expo-devin/skills/expo-tailwind-setup/SKILL.md +15 -4
- package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric/hooks/block-generated-artifact-edits.sh +196 -11
- package/plugins/lisa-harper-fabric/hooks/enforce-config-extensions.sh +1 -1
- package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-copilot/hooks/block-generated-artifact-edits.sh +196 -11
- package/plugins/lisa-harper-fabric-copilot/hooks/enforce-config-extensions.sh +1 -1
- package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-cursor/hooks/block-generated-artifact-edits.sh +196 -11
- package/plugins/lisa-harper-fabric-cursor/hooks/enforce-config-extensions.sh +1 -1
- package/plugins/lisa-harper-fabric-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-devin/hooks/block-generated-artifact-edits.sh +196 -11
- package/plugins/lisa-harper-fabric-devin/hooks/enforce-config-extensions.sh +1 -1
- package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs/.codex-plugin/skills/nestjs-rules/SKILL.md +39 -26
- package/plugins/lisa-nestjs/.codex-plugin/skills/typeorm-patterns/references/observability-patterns.md +18 -58
- package/plugins/lisa-nestjs/hooks/block-migration-edits.sh +1 -1
- package/plugins/lisa-nestjs/hooks/lisa-edit-gate.sh +19 -15
- package/plugins/lisa-nestjs/skills/nestjs-rules/SKILL.md +39 -26
- package/plugins/lisa-nestjs/skills/typeorm-patterns/references/observability-patterns.md +18 -58
- package/plugins/lisa-nestjs-agy/plugin.json +1 -1
- package/plugins/lisa-nestjs-agy/skills/nestjs-rules/SKILL.md +39 -26
- package/plugins/lisa-nestjs-agy/skills/typeorm-patterns/references/observability-patterns.md +18 -58
- package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-copilot/hooks/block-migration-edits.sh +1 -1
- package/plugins/lisa-nestjs-copilot/hooks/lisa-edit-gate.sh +19 -15
- package/plugins/lisa-nestjs-copilot/skills/nestjs-rules/SKILL.md +39 -26
- package/plugins/lisa-nestjs-copilot/skills/typeorm-patterns/references/observability-patterns.md +18 -58
- package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-cursor/hooks/block-migration-edits.sh +1 -1
- package/plugins/lisa-nestjs-cursor/hooks/lisa-edit-gate.sh +19 -15
- package/plugins/lisa-nestjs-cursor/skills/nestjs-rules/SKILL.md +39 -26
- package/plugins/lisa-nestjs-cursor/skills/typeorm-patterns/references/observability-patterns.md +18 -58
- package/plugins/lisa-nestjs-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-devin/hooks/block-migration-edits.sh +1 -1
- package/plugins/lisa-nestjs-devin/hooks/lisa-edit-gate.sh +19 -15
- package/plugins/lisa-nestjs-devin/skills/nestjs-rules/SKILL.md +39 -26
- package/plugins/lisa-nestjs-devin/skills/typeorm-patterns/references/observability-patterns.md +18 -58
- package/plugins/lisa-phaser/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-agy/plugin.json +1 -1
- package/plugins/lisa-phaser-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-rails/hooks/lisa-edit-gate.sh +19 -15
- package/plugins/lisa-rails/hooks/rubocop-on-edit.sh +2 -2
- package/plugins/lisa-rails/hooks/sg-scan-on-edit.sh +3 -3
- package/plugins/lisa-rails-agy/plugin.json +1 -1
- package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-copilot/hooks/lisa-edit-gate.sh +19 -15
- package/plugins/lisa-rails-copilot/hooks/rubocop-on-edit.sh +2 -2
- package/plugins/lisa-rails-copilot/hooks/sg-scan-on-edit.sh +3 -3
- package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-cursor/hooks/lisa-edit-gate.sh +19 -15
- package/plugins/lisa-rails-cursor/hooks/rubocop-on-edit.sh +2 -2
- package/plugins/lisa-rails-cursor/hooks/sg-scan-on-edit.sh +3 -3
- package/plugins/lisa-rails-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-devin/hooks/lisa-edit-gate.sh +19 -15
- package/plugins/lisa-rails-devin/hooks/rubocop-on-edit.sh +2 -2
- package/plugins/lisa-rails-devin/hooks/sg-scan-on-edit.sh +3 -3
- package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript/hooks/block-suppress-directives.sh +2 -2
- package/plugins/lisa-typescript/hooks/format-on-edit.sh +2 -2
- package/plugins/lisa-typescript/hooks/lint-on-edit.sh +2 -2
- package/plugins/lisa-typescript/hooks/lisa-edit-gate.sh +19 -15
- package/plugins/lisa-typescript/hooks/sg-scan-on-edit.sh +3 -3
- package/plugins/lisa-typescript-agy/plugin.json +1 -1
- package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-copilot/hooks/block-suppress-directives.sh +2 -2
- package/plugins/lisa-typescript-copilot/hooks/format-on-edit.sh +2 -2
- package/plugins/lisa-typescript-copilot/hooks/lint-on-edit.sh +2 -2
- package/plugins/lisa-typescript-copilot/hooks/lisa-edit-gate.sh +19 -15
- package/plugins/lisa-typescript-copilot/hooks/sg-scan-on-edit.sh +3 -3
- package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-cursor/hooks/block-suppress-directives.sh +2 -2
- package/plugins/lisa-typescript-cursor/hooks/format-on-edit.sh +2 -2
- package/plugins/lisa-typescript-cursor/hooks/lint-on-edit.sh +2 -2
- package/plugins/lisa-typescript-cursor/hooks/lisa-edit-gate.sh +19 -15
- package/plugins/lisa-typescript-cursor/hooks/sg-scan-on-edit.sh +3 -3
- package/plugins/lisa-typescript-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-devin/hooks/block-suppress-directives.sh +2 -2
- package/plugins/lisa-typescript-devin/hooks/format-on-edit.sh +2 -2
- package/plugins/lisa-typescript-devin/hooks/lint-on-edit.sh +2 -2
- package/plugins/lisa-typescript-devin/hooks/lisa-edit-gate.sh +19 -15
- package/plugins/lisa-typescript-devin/hooks/sg-scan-on-edit.sh +3 -3
- package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-agy/plugin.json +1 -1
- package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/src/base/hooks/block-managed-file-edits.sh +201 -20
- package/plugins/src/base/hooks/block-masked-exit-status.sh +1 -1
- package/plugins/src/base/hooks/block-no-verify.agy.sh +1 -1
- package/plugins/src/base/hooks/enforce-verification-gate.sh +1 -2
- package/plugins/src/base/hooks/ticket-sync-reminder.sh +2 -17
- package/plugins/src/base/hooks/track-plan-sessions.sh +7 -131
- package/plugins/src/base/scripts/remote-agent-aws-setup.sh +3 -1
- package/plugins/src/base/skills/lisa-setup-remote-env/assets/session-start.sh +18 -5
- package/plugins/src/expo/skills/building-native-ui/references/webgpu-three.md +19 -9
- package/plugins/src/expo/skills/expo-tailwind-setup/SKILL.md +15 -4
- package/plugins/src/harper-fabric/hooks/block-generated-artifact-edits.sh +196 -11
- package/plugins/src/harper-fabric/hooks/enforce-config-extensions.sh +1 -1
- package/plugins/src/nestjs/hooks/block-migration-edits.sh +1 -1
- package/plugins/src/nestjs/hooks/lisa-edit-gate.sh +19 -15
- package/plugins/src/nestjs/skills/nestjs-rules/SKILL.md +39 -26
- package/plugins/src/nestjs/skills/typeorm-patterns/references/observability-patterns.md +18 -58
- package/plugins/src/rails/hooks/lisa-edit-gate.sh +19 -15
- package/plugins/src/rails/hooks/rubocop-on-edit.sh +2 -2
- package/plugins/src/rails/hooks/sg-scan-on-edit.sh +3 -3
- package/plugins/src/typescript/hooks/block-suppress-directives.sh +2 -2
- package/plugins/src/typescript/hooks/format-on-edit.sh +2 -2
- package/plugins/src/typescript/hooks/lint-on-edit.sh +2 -2
- package/plugins/src/typescript/hooks/lisa-edit-gate.sh +19 -15
- package/plugins/src/typescript/hooks/sg-scan-on-edit.sh +3 -3
- package/scripts/build-plugins.sh +1 -1
- package/scripts/check-derived-artifacts.mjs +2 -2
- package/scripts/check-generated-artifact-merge-coverage.mjs +45 -4
- package/scripts/check-orphan-test-processes.mjs +0 -1
- package/scripts/check-self-dependency-pin.mjs +0 -2
- package/scripts/claude-remote-setup.sh +12 -7
- package/scripts/cleanup-amplify-branches.sh +0 -1
- package/scripts/generate-export-surface.mjs +131 -61
- package/scripts/generate-lisa-owned-hash-ledger.mjs +87 -102
- package/scripts/generate-upstream-evidence-manifest.mjs +56 -49
- package/scripts/github-status-check.sh +5 -25
- package/scripts/install-claude-plugins.sh +10 -8
- package/scripts/lib/merge-generated-json.mjs +274 -0
- package/scripts/lib/upstream-manifest-staleness.mjs +38 -34
- package/scripts/lib/upstream-public-commits.mjs +35 -18
- package/scripts/lisa-commit-and-pr-local.sh +1 -1
- package/scripts/lisa-enforcement-fallback.sh +31 -32
- package/scripts/lisa-github-environments.sh +5 -1
- package/scripts/lisa-github-repo-settings.sh +5 -1
- package/scripts/lisa-github-repo-setup.sh +1 -2
- package/scripts/lisa-github-rulesets.sh +8 -8
- package/scripts/lisa-remote-env/session-start.sh +18 -5
- package/scripts/lisa-rollback-release.mjs +0 -2
- package/scripts/lisa-update-local.sh +1 -1
- package/scripts/merge-generated-artifact.mjs +18 -6
- package/scripts/raise-self-dependency-pin.mjs +0 -2
- package/scripts/run-artifact-checks.mjs +1 -1
- package/scripts/verify-packed-learnings-contract.mjs +36 -3
- package/scripts/verify-self-pin-raise.mjs +0 -2
- package/typescript/copy-contents/.husky/commit-msg +8 -2
- package/typescript/copy-contents/.husky/post-checkout +2 -0
- package/typescript/copy-contents/.husky/post-merge +2 -0
- package/typescript/copy-contents/.husky/pre-commit +10 -3
- package/typescript/copy-contents/.husky/pre-push +29 -16
- package/typescript/copy-contents/.husky/prepare-commit-msg +2 -0
- package/typescript/create-only/.husky/pre-push.local +2 -0
- package/eslint-plugin-code-organization/__tests__/enforce-statement-order.test.js +0 -643
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
import type { IPrompter } from "../cli/prompts.js";
|
|
2
|
+
import { DetectorRegistry } from "../detection/index.js";
|
|
3
|
+
import type { ILogger } from "../logging/index.js";
|
|
4
|
+
import { MigrationRegistry } from "../migrations/index.js";
|
|
5
|
+
import { StrategyRegistry } from "../strategies/index.js";
|
|
6
|
+
import type { IBackupService } from "../transaction/index.js";
|
|
7
|
+
import { type IgnorePatterns } from "../utils/ignore-patterns.js";
|
|
8
|
+
import type { LisaConfig, OperationCounters, ProjectType } from "./config.js";
|
|
9
|
+
import type { IGitService } from "./git-service.js";
|
|
10
|
+
/**
|
|
11
|
+
* Log fragment used when a create-only instruction file already exists and is
|
|
12
|
+
* therefore left untouched (the host owns it).
|
|
13
|
+
*/
|
|
14
|
+
export declare const HOST_OWNED_LABEL = "already present (host-owned)";
|
|
15
|
+
export declare const CREATE_ONLY_STRATEGY: "create-only";
|
|
16
|
+
export declare const COPY_CONTENTS_STRATEGY: "copy-contents";
|
|
17
|
+
export declare const PROJECT_LEARNINGS_TEMPLATE_PATH: string;
|
|
18
|
+
/**
|
|
19
|
+
* Dependencies for Lisa operations
|
|
20
|
+
*/
|
|
21
|
+
export interface LisaDependencies {
|
|
22
|
+
readonly logger: ILogger;
|
|
23
|
+
readonly prompter: IPrompter;
|
|
24
|
+
readonly backupService: IBackupService;
|
|
25
|
+
readonly detectorRegistry: DetectorRegistry;
|
|
26
|
+
readonly strategyRegistry: StrategyRegistry;
|
|
27
|
+
readonly gitService: IGitService;
|
|
28
|
+
readonly migrationRegistry: MigrationRegistry;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Command boundary used for Claude CLI plugin registration.
|
|
32
|
+
*/
|
|
33
|
+
export type PluginExecAsync = (cmd: string, opts: Record<string, unknown>) => Promise<unknown>;
|
|
34
|
+
/** Generic fallback when a plugin command has no readable error. */
|
|
35
|
+
export declare const PLUGIN_COMMAND_FAILED = "command failed";
|
|
36
|
+
/**
|
|
37
|
+
* Shared state and primitive helpers every Lisa apply layer reads.
|
|
38
|
+
*/
|
|
39
|
+
export declare abstract class LisaState {
|
|
40
|
+
protected readonly config: LisaConfig;
|
|
41
|
+
protected readonly deps: LisaDependencies;
|
|
42
|
+
protected counters: OperationCounters;
|
|
43
|
+
/**
|
|
44
|
+
* Managed files this apply found out of date but could not update.
|
|
45
|
+
*
|
|
46
|
+
* Named so the summary can list them: a count alone tells an operator that
|
|
47
|
+
* something did not land without telling them what, which is most of the way
|
|
48
|
+
* back to the silence this exists to end.
|
|
49
|
+
*/
|
|
50
|
+
protected readonly stalePaths: string[];
|
|
51
|
+
/**
|
|
52
|
+
* Lisa-owned artifacts this apply deliberately did not replace, each with the
|
|
53
|
+
* reason spelled out for whoever reads the output.
|
|
54
|
+
*
|
|
55
|
+
* Full sentences rather than paths, because this is the one outcome an
|
|
56
|
+
* operator cannot act on from the filename: "we left yours alone because it
|
|
57
|
+
* defends something ours does not" is the entire message.
|
|
58
|
+
*/
|
|
59
|
+
protected readonly hostAheadNotes: string[];
|
|
60
|
+
/**
|
|
61
|
+
* Templates this apply declined to write because they would have outranked
|
|
62
|
+
* configuration the project already maintains, each with the reason.
|
|
63
|
+
*
|
|
64
|
+
* Full sentences for the same reason as {@link hostAheadNotes}: the filename
|
|
65
|
+
* alone cannot convey it. The absent file is the *correct* outcome here, so
|
|
66
|
+
* without the sentence an operator has nothing to distinguish "Lisa
|
|
67
|
+
* deliberately stood down" from "the template never arrived".
|
|
68
|
+
*/
|
|
69
|
+
protected readonly shadowedNotes: string[];
|
|
70
|
+
/**
|
|
71
|
+
* Every path this apply removed, and every workflow it refused to remove, as
|
|
72
|
+
* operator-readable lines.
|
|
73
|
+
*
|
|
74
|
+
* Announced unconditionally — including the removals Lisa is entitled to
|
|
75
|
+
* make. A destructive step nobody can see is half the defect in
|
|
76
|
+
* CodySwannGT/lisa#3656: the deletions were correct-looking code doing exactly
|
|
77
|
+
* what a manifest told them to, and the reason it cost a consumer three
|
|
78
|
+
* workflows is that no human ever had the chance to disagree.
|
|
79
|
+
*
|
|
80
|
+
* Deliberately wider than the ownership gate. The gate is scoped to
|
|
81
|
+
* `.github/workflows/` because a workflow's absence produces no signal
|
|
82
|
+
* anywhere, but the manifests declare 255 paths and 213 of them are not
|
|
83
|
+
* workflows — `.claude` trees, root-level `eslint-plugin-*` directories,
|
|
84
|
+
* jest/vitest/tsconfig files — every one removed recursively by destination
|
|
85
|
+
* path with the content never consulted. Announcing costs nothing and can
|
|
86
|
+
* break no legitimate deletion, so there is no reason for those 213 to keep
|
|
87
|
+
* going silently while this class of defect is being fixed.
|
|
88
|
+
*/
|
|
89
|
+
protected readonly deletionNotices: string[];
|
|
90
|
+
/**
|
|
91
|
+
* Repo-relative paths this apply actually removed, workflow or not.
|
|
92
|
+
*
|
|
93
|
+
* The console copy of this list is the one an operator is meant to read, and
|
|
94
|
+
* the one they demonstrably cannot. Two mechanisms guarantee it: a package
|
|
95
|
+
* manager hides postinstall stdout, and the reconciliation trampoline is
|
|
96
|
+
* spawned detached with `stdio: "ignore"` (`utils/postinstall-trampoline`) so
|
|
97
|
+
* anything it writes is not merely easy to miss but PROVABLY unobservable.
|
|
98
|
+
* An announcement that only exists on stdout is therefore not an
|
|
99
|
+
* announcement. Persisting the list into the apply receipt is what survives
|
|
100
|
+
* both, and follows `stale_paths` (#3033), added for the same reason.
|
|
101
|
+
*/
|
|
102
|
+
protected readonly deletedPaths: string[];
|
|
103
|
+
protected detectedTypes: ProjectType[];
|
|
104
|
+
protected ignorePatterns: IgnorePatterns;
|
|
105
|
+
/**
|
|
106
|
+
* Paths marked for deletion by any detected project type's deletions.json.
|
|
107
|
+
* Used to skip creating files that would just be deleted moments later (e.g.,
|
|
108
|
+
* CDK inherits jest.* files from typescript but its own deletions.json removes
|
|
109
|
+
* them — without this gate, Lisa creates then immediately deletes the files,
|
|
110
|
+
* causing ENOENT races for any concurrent linter/file-watcher).
|
|
111
|
+
*/
|
|
112
|
+
protected pendingDeletions: Set<string>;
|
|
113
|
+
/**
|
|
114
|
+
* Maps each relative path shipped by any type's `create-only/` tree to the
|
|
115
|
+
* single type that "owns" it (most-specific wins). Computed once before
|
|
116
|
+
* strategies run; consulted while processing `create-only` to suppress
|
|
117
|
+
* parent-type sources for paths that a child type also ships.
|
|
118
|
+
*
|
|
119
|
+
* Motivating case: CDK projects detect as both `typescript` and `cdk`.
|
|
120
|
+
* Both ship `.github/workflows/ci.yml` under their `create-only/` trees.
|
|
121
|
+
* Without this map, typescript's bun-mode ci.yml runs first and creates
|
|
122
|
+
* the file; cdk's npm-mode + determine_environment ci.yml then sees the
|
|
123
|
+
* file already exists and is silently skipped — producing a CDK project
|
|
124
|
+
* wired to use bun, which fails immediately in CI because CDK projects
|
|
125
|
+
* have `engines.bun = "please-use-npm"` and only a `package-lock.json`.
|
|
126
|
+
*/
|
|
127
|
+
protected createOnlyOwnership: Map<string, string>;
|
|
128
|
+
/**
|
|
129
|
+
* Maps each relative path shipped by any type's `copy-overwrite/` tree to the
|
|
130
|
+
* single type that "owns" it (most-specific wins). Computed once before
|
|
131
|
+
* strategies run; consulted while processing `copy-overwrite` to suppress
|
|
132
|
+
* parent-type sources for paths that a child type also ships.
|
|
133
|
+
*
|
|
134
|
+
* Why this exists — crash safety: `copy-overwrite` always overwrites, so the
|
|
135
|
+
* per-type outer loop in `processConfigurations` naturally lets the child win
|
|
136
|
+
* by writing the parent's version first and then overwriting it. But that
|
|
137
|
+
* leaves a window in which the destination holds the parent (typescript)
|
|
138
|
+
* version of an overlapping path (e.g. `tsconfig.json`, `eslint.config.ts`)
|
|
139
|
+
* before the child (expo/cdk/nestjs) phase overwrites it. If the process is
|
|
140
|
+
* killed in that window — which is exactly what bun's lifecycle-script
|
|
141
|
+
* handling did during postinstall — the project is left with TypeScript
|
|
142
|
+
* configs clobbering the child stack's (Expo getting the typescript
|
|
143
|
+
* `include` glob in tsconfig.json instead of its own).
|
|
144
|
+
* That was the bug fixed by removing the postinstall apply in #318.
|
|
145
|
+
*
|
|
146
|
+
* Resolving ownership up front and writing each path exactly once (by its
|
|
147
|
+
* most-specific type) eliminates the intermediate write entirely: a kill at
|
|
148
|
+
* any point leaves either the pre-existing file or the correct final file,
|
|
149
|
+
* never the parent-clobbered intermediate. This is the symmetric counterpart
|
|
150
|
+
* to `createOnlyOwnership` (which exists for the opposite reason — create-only
|
|
151
|
+
* skips existing files, so without help the parent would win).
|
|
152
|
+
*/
|
|
153
|
+
protected copyOverwriteOwnership: Map<string, string>;
|
|
154
|
+
/** Destination selected by the host project's projectRulesFile setting. */
|
|
155
|
+
protected projectLearningsFile: string;
|
|
156
|
+
/** Whether the canonical all/create-only learnings source is registered. */
|
|
157
|
+
protected projectLearningsTemplateRegistered: boolean;
|
|
158
|
+
/**
|
|
159
|
+
* True when a populated legacy ledger exists and the new `.lisa/` destination
|
|
160
|
+
* does not yet — the create-only strategy must NOT seed an empty ledger over
|
|
161
|
+
* it, or the pending relocation would collide (both-exist no-clobber) and
|
|
162
|
+
* strand the real entries at the raw-injected legacy path.
|
|
163
|
+
*/
|
|
164
|
+
protected suppressLearningsSeedForRelocation: boolean;
|
|
165
|
+
protected readonly separator = "========================================";
|
|
166
|
+
protected readonly lisaignoreSuffix = "(.lisaignore)";
|
|
167
|
+
/**
|
|
168
|
+
* True when the destination is the Lisa source repo itself. A self-apply
|
|
169
|
+
* skips deletions, template application, and postinstall injection while
|
|
170
|
+
* still applying package.lisa.json dependency governance. See {@link isLisaSourceRepo}.
|
|
171
|
+
*/
|
|
172
|
+
protected selfApply: boolean;
|
|
173
|
+
/**
|
|
174
|
+
* Initialize Lisa orchestrator
|
|
175
|
+
* @param config - Configuration for the apply operation
|
|
176
|
+
* @param deps - Injected service dependencies
|
|
177
|
+
*/
|
|
178
|
+
constructor(config: LisaConfig, deps: LisaDependencies);
|
|
179
|
+
/**
|
|
180
|
+
* Postinstall applies are intentionally narrow: they refresh governance
|
|
181
|
+
* templates that must track dependency updates, but they must not regenerate
|
|
182
|
+
* project-scoped agent surfaces. Agent trees are large, committed outputs and
|
|
183
|
+
* are updated through an explicit `lisa apply` or cross-pollinate run. A
|
|
184
|
+
* self-apply against the Lisa source repo also skips emit — those agent
|
|
185
|
+
* surfaces are built from `plugins/src`, not regenerated by apply.
|
|
186
|
+
* @returns True when the current apply should avoid agent-surface writes.
|
|
187
|
+
*/
|
|
188
|
+
protected shouldSkipAgentEmitDuringPostinstall(): boolean;
|
|
189
|
+
/**
|
|
190
|
+
* Read a file's contents, returning null if the file does not exist or cannot be read.
|
|
191
|
+
* Used for optional file checks that should not interrupt the main flow on failure.
|
|
192
|
+
* @param filePath - Absolute path to the file to read
|
|
193
|
+
* @returns File contents as a string, or null if unavailable
|
|
194
|
+
*/
|
|
195
|
+
protected tryReadFile(filePath: string): Promise<string | null>;
|
|
196
|
+
/**
|
|
197
|
+
* Absolute path of the host project's package.json.
|
|
198
|
+
* @returns package.json path under the destination directory
|
|
199
|
+
*/
|
|
200
|
+
protected hostPackageJsonPath(): string;
|
|
201
|
+
}
|
|
202
|
+
//# sourceMappingURL=lisa-state.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lisa-state.d.ts","sourceRoot":"","sources":["../../src/core/lisa-state.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEzD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,KAAK,EAAE,UAAU,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE9E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAEpD;;;GAGG;AACH,eAAO,MAAM,gBAAgB,iCAAiC,CAAC;AAC/D,eAAO,MAAM,oBAAoB,EAAG,aAAsB,CAAC;AAC3D,eAAO,MAAM,sBAAsB,EAAG,eAAwB,CAAC;AAC/D,eAAO,MAAM,+BAA+B,QAG3C,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAC;IAC7B,QAAQ,CAAC,aAAa,EAAE,cAAc,CAAC;IACvC,QAAQ,CAAC,gBAAgB,EAAE,gBAAgB,CAAC;IAC5C,QAAQ,CAAC,gBAAgB,EAAE,gBAAgB,CAAC;IAC5C,QAAQ,CAAC,UAAU,EAAE,WAAW,CAAC;IACjC,QAAQ,CAAC,iBAAiB,EAAE,iBAAiB,CAAC;CAC/C;AAED;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,CAC5B,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAC1B,OAAO,CAAC,OAAO,CAAC,CAAC;AACtB,oEAAoE;AACpE,eAAO,MAAM,qBAAqB,mBAAmB,CAAC;AAEtD;;GAEG;AACH,8BAAsB,SAAS;IAgJ3B,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,UAAU;IACrC,SAAS,CAAC,QAAQ,CAAC,IAAI,EAAE,gBAAgB;IAhJ3C,SAAS,CAAC,QAAQ,EAAE,iBAAiB,CAA2B;IAEhE;;;;;;OAMG;IACH,SAAS,CAAC,QAAQ,CAAC,UAAU,EAAE,MAAM,EAAE,CAAM;IAC7C;;;;;;;OAOG;IACH,SAAS,CAAC,QAAQ,CAAC,cAAc,EAAE,MAAM,EAAE,CAAM;IACjD;;;;;;;;OAQG;IACH,SAAS,CAAC,QAAQ,CAAC,aAAa,EAAE,MAAM,EAAE,CAAM;IAChD;;;;;;;;;;;;;;;;;;OAkBG;IACH,SAAS,CAAC,QAAQ,CAAC,eAAe,EAAE,MAAM,EAAE,CAAM;IAClD;;;;;;;;;;;OAWG;IACH,SAAS,CAAC,QAAQ,CAAC,YAAY,EAAE,MAAM,EAAE,CAAM;IAC/C,SAAS,CAAC,aAAa,EAAE,WAAW,EAAE,CAAM;IAC5C,SAAS,CAAC,cAAc,EAAE,cAAc,CAGtC;IACF;;;;;;OAMG;IACH,SAAS,CAAC,gBAAgB,EAAE,GAAG,CAAC,MAAM,CAAC,CAAa;IACpD;;;;;;;;;;;;;OAaG;IACH,SAAS,CAAC,mBAAmB,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAa;IAC/D;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACH,SAAS,CAAC,sBAAsB,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAa;IAClE,2EAA2E;IAC3E,SAAS,CAAC,oBAAoB,SAAmC;IACjE,4EAA4E;IAC5E,SAAS,CAAC,kCAAkC,UAAS;IACrD;;;;;OAKG;IACH,SAAS,CAAC,kCAAkC,UAAS;IACrD,SAAS,CAAC,QAAQ,CAAC,SAAS,8CAA8C;IAC1E,SAAS,CAAC,QAAQ,CAAC,gBAAgB,mBAAmB;IAEtD;;;;OAIG;IACH,SAAS,CAAC,SAAS,UAAS;IAE5B;;;;OAIG;gBAEkB,MAAM,EAAE,UAAU,EAClB,IAAI,EAAE,gBAAgB;IAG3C;;;;;;;;OAQG;IACH,SAAS,CAAC,oCAAoC,IAAI,OAAO;IAIzD;;;;;OAKG;cACa,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAQrE;;;OAGG;IACH,SAAS,CAAC,mBAAmB,IAAI,MAAM;CAGxC"}
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file lisa-state.ts
|
|
3
|
+
* @description Shared state and primitive helpers every Lisa apply layer reads. One layer of the `Lisa` orchestrator; each layer
|
|
4
|
+
* extends the one below it so the apply pipeline reads as one class while no
|
|
5
|
+
* single module carries the whole pipeline.
|
|
6
|
+
* @module core
|
|
7
|
+
*/
|
|
8
|
+
import { readFile } from "node:fs/promises";
|
|
9
|
+
import * as path from "node:path";
|
|
10
|
+
import { isPostinstallSafeApply } from "./apply-mode.js";
|
|
11
|
+
import { createInitialCounters } from "./config.js";
|
|
12
|
+
/**
|
|
13
|
+
* Log fragment used when a create-only instruction file already exists and is
|
|
14
|
+
* therefore left untouched (the host owns it).
|
|
15
|
+
*/
|
|
16
|
+
export const HOST_OWNED_LABEL = "already present (host-owned)";
|
|
17
|
+
export const CREATE_ONLY_STRATEGY = "create-only";
|
|
18
|
+
export const COPY_CONTENTS_STRATEGY = "copy-contents";
|
|
19
|
+
export const PROJECT_LEARNINGS_TEMPLATE_PATH = path.join(".lisa", "PROJECT_LEARNINGS.md");
|
|
20
|
+
/** Generic fallback when a plugin command has no readable error. */
|
|
21
|
+
export const PLUGIN_COMMAND_FAILED = "command failed";
|
|
22
|
+
/**
|
|
23
|
+
* Shared state and primitive helpers every Lisa apply layer reads.
|
|
24
|
+
*/
|
|
25
|
+
export class LisaState {
|
|
26
|
+
config;
|
|
27
|
+
deps;
|
|
28
|
+
counters = createInitialCounters();
|
|
29
|
+
/**
|
|
30
|
+
* Managed files this apply found out of date but could not update.
|
|
31
|
+
*
|
|
32
|
+
* Named so the summary can list them: a count alone tells an operator that
|
|
33
|
+
* something did not land without telling them what, which is most of the way
|
|
34
|
+
* back to the silence this exists to end.
|
|
35
|
+
*/
|
|
36
|
+
stalePaths = [];
|
|
37
|
+
/**
|
|
38
|
+
* Lisa-owned artifacts this apply deliberately did not replace, each with the
|
|
39
|
+
* reason spelled out for whoever reads the output.
|
|
40
|
+
*
|
|
41
|
+
* Full sentences rather than paths, because this is the one outcome an
|
|
42
|
+
* operator cannot act on from the filename: "we left yours alone because it
|
|
43
|
+
* defends something ours does not" is the entire message.
|
|
44
|
+
*/
|
|
45
|
+
hostAheadNotes = [];
|
|
46
|
+
/**
|
|
47
|
+
* Templates this apply declined to write because they would have outranked
|
|
48
|
+
* configuration the project already maintains, each with the reason.
|
|
49
|
+
*
|
|
50
|
+
* Full sentences for the same reason as {@link hostAheadNotes}: the filename
|
|
51
|
+
* alone cannot convey it. The absent file is the *correct* outcome here, so
|
|
52
|
+
* without the sentence an operator has nothing to distinguish "Lisa
|
|
53
|
+
* deliberately stood down" from "the template never arrived".
|
|
54
|
+
*/
|
|
55
|
+
shadowedNotes = [];
|
|
56
|
+
/**
|
|
57
|
+
* Every path this apply removed, and every workflow it refused to remove, as
|
|
58
|
+
* operator-readable lines.
|
|
59
|
+
*
|
|
60
|
+
* Announced unconditionally — including the removals Lisa is entitled to
|
|
61
|
+
* make. A destructive step nobody can see is half the defect in
|
|
62
|
+
* CodySwannGT/lisa#3656: the deletions were correct-looking code doing exactly
|
|
63
|
+
* what a manifest told them to, and the reason it cost a consumer three
|
|
64
|
+
* workflows is that no human ever had the chance to disagree.
|
|
65
|
+
*
|
|
66
|
+
* Deliberately wider than the ownership gate. The gate is scoped to
|
|
67
|
+
* `.github/workflows/` because a workflow's absence produces no signal
|
|
68
|
+
* anywhere, but the manifests declare 255 paths and 213 of them are not
|
|
69
|
+
* workflows — `.claude` trees, root-level `eslint-plugin-*` directories,
|
|
70
|
+
* jest/vitest/tsconfig files — every one removed recursively by destination
|
|
71
|
+
* path with the content never consulted. Announcing costs nothing and can
|
|
72
|
+
* break no legitimate deletion, so there is no reason for those 213 to keep
|
|
73
|
+
* going silently while this class of defect is being fixed.
|
|
74
|
+
*/
|
|
75
|
+
deletionNotices = [];
|
|
76
|
+
/**
|
|
77
|
+
* Repo-relative paths this apply actually removed, workflow or not.
|
|
78
|
+
*
|
|
79
|
+
* The console copy of this list is the one an operator is meant to read, and
|
|
80
|
+
* the one they demonstrably cannot. Two mechanisms guarantee it: a package
|
|
81
|
+
* manager hides postinstall stdout, and the reconciliation trampoline is
|
|
82
|
+
* spawned detached with `stdio: "ignore"` (`utils/postinstall-trampoline`) so
|
|
83
|
+
* anything it writes is not merely easy to miss but PROVABLY unobservable.
|
|
84
|
+
* An announcement that only exists on stdout is therefore not an
|
|
85
|
+
* announcement. Persisting the list into the apply receipt is what survives
|
|
86
|
+
* both, and follows `stale_paths` (#3033), added for the same reason.
|
|
87
|
+
*/
|
|
88
|
+
deletedPaths = [];
|
|
89
|
+
detectedTypes = [];
|
|
90
|
+
ignorePatterns = {
|
|
91
|
+
patterns: [],
|
|
92
|
+
shouldIgnore: () => false,
|
|
93
|
+
};
|
|
94
|
+
/**
|
|
95
|
+
* Paths marked for deletion by any detected project type's deletions.json.
|
|
96
|
+
* Used to skip creating files that would just be deleted moments later (e.g.,
|
|
97
|
+
* CDK inherits jest.* files from typescript but its own deletions.json removes
|
|
98
|
+
* them — without this gate, Lisa creates then immediately deletes the files,
|
|
99
|
+
* causing ENOENT races for any concurrent linter/file-watcher).
|
|
100
|
+
*/
|
|
101
|
+
pendingDeletions = new Set();
|
|
102
|
+
/**
|
|
103
|
+
* Maps each relative path shipped by any type's `create-only/` tree to the
|
|
104
|
+
* single type that "owns" it (most-specific wins). Computed once before
|
|
105
|
+
* strategies run; consulted while processing `create-only` to suppress
|
|
106
|
+
* parent-type sources for paths that a child type also ships.
|
|
107
|
+
*
|
|
108
|
+
* Motivating case: CDK projects detect as both `typescript` and `cdk`.
|
|
109
|
+
* Both ship `.github/workflows/ci.yml` under their `create-only/` trees.
|
|
110
|
+
* Without this map, typescript's bun-mode ci.yml runs first and creates
|
|
111
|
+
* the file; cdk's npm-mode + determine_environment ci.yml then sees the
|
|
112
|
+
* file already exists and is silently skipped — producing a CDK project
|
|
113
|
+
* wired to use bun, which fails immediately in CI because CDK projects
|
|
114
|
+
* have `engines.bun = "please-use-npm"` and only a `package-lock.json`.
|
|
115
|
+
*/
|
|
116
|
+
createOnlyOwnership = new Map();
|
|
117
|
+
/**
|
|
118
|
+
* Maps each relative path shipped by any type's `copy-overwrite/` tree to the
|
|
119
|
+
* single type that "owns" it (most-specific wins). Computed once before
|
|
120
|
+
* strategies run; consulted while processing `copy-overwrite` to suppress
|
|
121
|
+
* parent-type sources for paths that a child type also ships.
|
|
122
|
+
*
|
|
123
|
+
* Why this exists — crash safety: `copy-overwrite` always overwrites, so the
|
|
124
|
+
* per-type outer loop in `processConfigurations` naturally lets the child win
|
|
125
|
+
* by writing the parent's version first and then overwriting it. But that
|
|
126
|
+
* leaves a window in which the destination holds the parent (typescript)
|
|
127
|
+
* version of an overlapping path (e.g. `tsconfig.json`, `eslint.config.ts`)
|
|
128
|
+
* before the child (expo/cdk/nestjs) phase overwrites it. If the process is
|
|
129
|
+
* killed in that window — which is exactly what bun's lifecycle-script
|
|
130
|
+
* handling did during postinstall — the project is left with TypeScript
|
|
131
|
+
* configs clobbering the child stack's (Expo getting the typescript
|
|
132
|
+
* `include` glob in tsconfig.json instead of its own).
|
|
133
|
+
* That was the bug fixed by removing the postinstall apply in #318.
|
|
134
|
+
*
|
|
135
|
+
* Resolving ownership up front and writing each path exactly once (by its
|
|
136
|
+
* most-specific type) eliminates the intermediate write entirely: a kill at
|
|
137
|
+
* any point leaves either the pre-existing file or the correct final file,
|
|
138
|
+
* never the parent-clobbered intermediate. This is the symmetric counterpart
|
|
139
|
+
* to `createOnlyOwnership` (which exists for the opposite reason — create-only
|
|
140
|
+
* skips existing files, so without help the parent would win).
|
|
141
|
+
*/
|
|
142
|
+
copyOverwriteOwnership = new Map();
|
|
143
|
+
/** Destination selected by the host project's projectRulesFile setting. */
|
|
144
|
+
projectLearningsFile = PROJECT_LEARNINGS_TEMPLATE_PATH;
|
|
145
|
+
/** Whether the canonical all/create-only learnings source is registered. */
|
|
146
|
+
projectLearningsTemplateRegistered = false;
|
|
147
|
+
/**
|
|
148
|
+
* True when a populated legacy ledger exists and the new `.lisa/` destination
|
|
149
|
+
* does not yet — the create-only strategy must NOT seed an empty ledger over
|
|
150
|
+
* it, or the pending relocation would collide (both-exist no-clobber) and
|
|
151
|
+
* strand the real entries at the raw-injected legacy path.
|
|
152
|
+
*/
|
|
153
|
+
suppressLearningsSeedForRelocation = false;
|
|
154
|
+
separator = "========================================";
|
|
155
|
+
lisaignoreSuffix = "(.lisaignore)";
|
|
156
|
+
/**
|
|
157
|
+
* True when the destination is the Lisa source repo itself. A self-apply
|
|
158
|
+
* skips deletions, template application, and postinstall injection while
|
|
159
|
+
* still applying package.lisa.json dependency governance. See {@link isLisaSourceRepo}.
|
|
160
|
+
*/
|
|
161
|
+
selfApply = false;
|
|
162
|
+
/**
|
|
163
|
+
* Initialize Lisa orchestrator
|
|
164
|
+
* @param config - Configuration for the apply operation
|
|
165
|
+
* @param deps - Injected service dependencies
|
|
166
|
+
*/
|
|
167
|
+
constructor(config, deps) {
|
|
168
|
+
this.config = config;
|
|
169
|
+
this.deps = deps;
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* Postinstall applies are intentionally narrow: they refresh governance
|
|
173
|
+
* templates that must track dependency updates, but they must not regenerate
|
|
174
|
+
* project-scoped agent surfaces. Agent trees are large, committed outputs and
|
|
175
|
+
* are updated through an explicit `lisa apply` or cross-pollinate run. A
|
|
176
|
+
* self-apply against the Lisa source repo also skips emit — those agent
|
|
177
|
+
* surfaces are built from `plugins/src`, not regenerated by apply.
|
|
178
|
+
* @returns True when the current apply should avoid agent-surface writes.
|
|
179
|
+
*/
|
|
180
|
+
shouldSkipAgentEmitDuringPostinstall() {
|
|
181
|
+
return isPostinstallSafeApply(this.config) || this.selfApply;
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* Read a file's contents, returning null if the file does not exist or cannot be read.
|
|
185
|
+
* Used for optional file checks that should not interrupt the main flow on failure.
|
|
186
|
+
* @param filePath - Absolute path to the file to read
|
|
187
|
+
* @returns File contents as a string, or null if unavailable
|
|
188
|
+
*/
|
|
189
|
+
async tryReadFile(filePath) {
|
|
190
|
+
try {
|
|
191
|
+
return await readFile(filePath, "utf-8");
|
|
192
|
+
}
|
|
193
|
+
catch {
|
|
194
|
+
return null;
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
/**
|
|
198
|
+
* Absolute path of the host project's package.json.
|
|
199
|
+
* @returns package.json path under the destination directory
|
|
200
|
+
*/
|
|
201
|
+
hostPackageJsonPath() {
|
|
202
|
+
return path.join(this.config.destDir, "package.json");
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
//# sourceMappingURL=lisa-state.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lisa-state.js","sourceRoot":"","sources":["../../src/core/lisa-state.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAGlC,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAOzD,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAGpD;;;GAGG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,8BAA8B,CAAC;AAC/D,MAAM,CAAC,MAAM,oBAAoB,GAAG,aAAsB,CAAC;AAC3D,MAAM,CAAC,MAAM,sBAAsB,GAAG,eAAwB,CAAC;AAC/D,MAAM,CAAC,MAAM,+BAA+B,GAAG,IAAI,CAAC,IAAI,CACtD,OAAO,EACP,sBAAsB,CACvB,CAAC;AAsBF,oEAAoE;AACpE,MAAM,CAAC,MAAM,qBAAqB,GAAG,gBAAgB,CAAC;AAEtD;;GAEG;AACH,MAAM,OAAgB,SAAS;IAgJR;IACA;IAhJX,QAAQ,GAAsB,qBAAqB,EAAE,CAAC;IAEhE;;;;;;OAMG;IACgB,UAAU,GAAa,EAAE,CAAC;IAC7C;;;;;;;OAOG;IACgB,cAAc,GAAa,EAAE,CAAC;IACjD;;;;;;;;OAQG;IACgB,aAAa,GAAa,EAAE,CAAC;IAChD;;;;;;;;;;;;;;;;;;OAkBG;IACgB,eAAe,GAAa,EAAE,CAAC;IAClD;;;;;;;;;;;OAWG;IACgB,YAAY,GAAa,EAAE,CAAC;IACrC,aAAa,GAAkB,EAAE,CAAC;IAClC,cAAc,GAAmB;QACzC,QAAQ,EAAE,EAAE;QACZ,YAAY,EAAE,GAAG,EAAE,CAAC,KAAK;KAC1B,CAAC;IACF;;;;;;OAMG;IACO,gBAAgB,GAAgB,IAAI,GAAG,EAAE,CAAC;IACpD;;;;;;;;;;;;;OAaG;IACO,mBAAmB,GAAwB,IAAI,GAAG,EAAE,CAAC;IAC/D;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACO,sBAAsB,GAAwB,IAAI,GAAG,EAAE,CAAC;IAClE,2EAA2E;IACjE,oBAAoB,GAAG,+BAA+B,CAAC;IACjE,4EAA4E;IAClE,kCAAkC,GAAG,KAAK,CAAC;IACrD;;;;;OAKG;IACO,kCAAkC,GAAG,KAAK,CAAC;IAClC,SAAS,GAAG,0CAA0C,CAAC;IACvD,gBAAgB,GAAG,eAAe,CAAC;IAEtD;;;;OAIG;IACO,SAAS,GAAG,KAAK,CAAC;IAE5B;;;;OAIG;IACH,YACqB,MAAkB,EAClB,IAAsB;QADtB,WAAM,GAAN,MAAM,CAAY;QAClB,SAAI,GAAJ,IAAI,CAAkB;IACxC,CAAC;IAEJ;;;;;;;;OAQG;IACO,oCAAoC;QAC5C,OAAO,sBAAsB,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,IAAI,CAAC,SAAS,CAAC;IAC/D,CAAC;IAED;;;;;OAKG;IACO,KAAK,CAAC,WAAW,CAAC,QAAgB;QAC1C,IAAI,CAAC;YACH,OAAO,MAAM,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;QAC3C,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,IAAI,CAAC;QACd,CAAC;IACH,CAAC;IAED;;;OAGG;IACO,mBAAmB;QAC3B,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC;IACxD,CAAC;CACF"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { LisaState } from "./lisa-state.js";
|
|
2
|
+
/**
|
|
3
|
+
* Per-mode statistics and detail sections of the apply summary.
|
|
4
|
+
*/
|
|
5
|
+
export declare abstract class LisaSummaryStats extends LisaState {
|
|
6
|
+
/**
|
|
7
|
+
* Print summary header with mode
|
|
8
|
+
*/
|
|
9
|
+
protected printSummaryHeader(): void;
|
|
10
|
+
/**
|
|
11
|
+
* Print a single stat line with color
|
|
12
|
+
* @param label - Stat label
|
|
13
|
+
* @param value - Stat value
|
|
14
|
+
* @param color - Color function from picocolors
|
|
15
|
+
* @param suffix - Optional suffix after the count
|
|
16
|
+
*/
|
|
17
|
+
protected printStatLine(label: string, value: number, color: (s: string) => string, suffix?: string): void;
|
|
18
|
+
/**
|
|
19
|
+
* Print summary statistics for validate mode
|
|
20
|
+
*/
|
|
21
|
+
protected printValidateStats(): void;
|
|
22
|
+
/**
|
|
23
|
+
* Print summary statistics for dry-run mode
|
|
24
|
+
*/
|
|
25
|
+
protected printDryRunStats(): void;
|
|
26
|
+
/**
|
|
27
|
+
* Print summary statistics for apply mode
|
|
28
|
+
*/
|
|
29
|
+
protected printApplyStats(): void;
|
|
30
|
+
/**
|
|
31
|
+
* Name the out-of-date managed files and say how to update them.
|
|
32
|
+
*
|
|
33
|
+
* A bare count is not enough to act on. An operator taking an upgrade needs
|
|
34
|
+
* to see WHICH managed files the release changed and did not deliver —
|
|
35
|
+
* particularly the enforcement guards, where the gap is a security control
|
|
36
|
+
* that stayed on its old version while the release notes said otherwise.
|
|
37
|
+
*/
|
|
38
|
+
protected printStaleDetail(): void;
|
|
39
|
+
/**
|
|
40
|
+
* Report Lisa-owned artifacts this apply chose not to replace.
|
|
41
|
+
*
|
|
42
|
+
* Reported as good news, not as a warning about the project: keeping a guard
|
|
43
|
+
* that is stronger than Lisa's is the correct outcome, and phrasing it as a
|
|
44
|
+
* problem would push an operator to "fix" it by discarding their own
|
|
45
|
+
* hardening — the exact loss the check exists to prevent.
|
|
46
|
+
*/
|
|
47
|
+
protected printHostAheadDetail(): void;
|
|
48
|
+
/**
|
|
49
|
+
* Name every template this apply declined to write to avoid outranking the
|
|
50
|
+
* project's own configuration.
|
|
51
|
+
*
|
|
52
|
+
* Reported as good news for the same reason as {@link printHostAheadDetail}:
|
|
53
|
+
* the project's config surviving is the correct outcome. But it is stated at
|
|
54
|
+
* all because the *absence* of a file is invisible — a template that never
|
|
55
|
+
* arrives looks identical to one that was never shipped, and this is the only
|
|
56
|
+
* moment anything can say which happened (CodySwannGT/lisa#3501).
|
|
57
|
+
*/
|
|
58
|
+
protected printShadowedDetail(): void;
|
|
59
|
+
/**
|
|
60
|
+
* Name every path this apply removed, and every workflow it declined to.
|
|
61
|
+
*
|
|
62
|
+
* Deliberately unconditional on the removals, and deliberately wider than the
|
|
63
|
+
* ownership gate. Lisa is entitled to retire its own artifacts, and it still
|
|
64
|
+
* says so out loud, because the cost of an unannounced removal is not
|
|
65
|
+
* proportional to whether it was justified: a workflow that no longer exists
|
|
66
|
+
* cannot fail, so its absence produces no red check anywhere and reads
|
|
67
|
+
* exactly like a healthy repo (CodySwannGT/lisa#3656). The same is true, more
|
|
68
|
+
* quietly, of a deleted `.claude/skills/<name>` directory or a root-level
|
|
69
|
+
* `eslint-plugin-*` tree. Reviewing the upgrade diff has to be enough to
|
|
70
|
+
* notice, and that only works if the install told somebody.
|
|
71
|
+
*/
|
|
72
|
+
protected printDeletionDetail(): void;
|
|
73
|
+
}
|
|
74
|
+
//# sourceMappingURL=lisa-summary-stats.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lisa-summary-stats.d.ts","sourceRoot":"","sources":["../../src/core/lisa-summary-stats.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C;;GAEG;AACH,8BAAsB,gBAAiB,SAAQ,SAAS;IACtD;;OAEG;IACH,SAAS,CAAC,kBAAkB,IAAI,IAAI;IAgBpC;;;;;;OAMG;IACH,SAAS,CAAC,aAAa,CACrB,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,MAAM,EAC5B,MAAM,SAAK,GACV,IAAI;IAOP;;OAEG;IACH,SAAS,CAAC,kBAAkB,IAAI,IAAI;IAmBpC;;OAEG;IACH,SAAS,CAAC,gBAAgB,IAAI,IAAI;IAuClC;;OAEG;IACH,SAAS,CAAC,eAAe,IAAI,IAAI;IA2CjC;;;;;;;OAOG;IACH,SAAS,CAAC,gBAAgB,IAAI,IAAI;IA0BlC;;;;;;;OAOG;IACH,SAAS,CAAC,oBAAoB,IAAI,IAAI;IAetC;;;;;;;;;OASG;IACH,SAAS,CAAC,mBAAmB,IAAI,IAAI;IAerC;;;;;;;;;;;;OAYG;IACH,SAAS,CAAC,mBAAmB,IAAI,IAAI;CAetC"}
|