@codyswann/lisa 7.1.4 → 8.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/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 -30420
- package/dist/core/upstream-evidence-manifest.js.map +1 -1
- package/dist/core/upstream-evidence-manifest.json +30518 -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 +4 -4
- 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 @@
|
|
|
1
|
+
{"version":3,"file":"memo.js","sourceRoot":"","sources":["../../src/utils/memo.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH;;;GAGG;AACH,MAAM,OAAO,IAAI;IACf,8BAA8B;IACb,KAAK,GAAG,IAAI,GAAG,EAAQ,CAAC;IAEzC;;;;;OAKG;IACH,OAAO,CAAC,GAAM,EAAE,OAAsB;QACpC,MAAM,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QACvC,IAAI,UAAU,KAAK,SAAS;YAAE,OAAO,UAAU,CAAC;QAChD,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;QAC3B,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;QAC3B,OAAO,KAAK,CAAC;IACf,CAAC;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"postinstall-trampoline.d.ts","sourceRoot":"","sources":["../../src/utils/postinstall-trampoline.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"postinstall-trampoline.d.ts","sourceRoot":"","sources":["../../src/utils/postinstall-trampoline.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAO3C,OAAO,EAEL,qBAAqB,EACrB,wBAAwB,EACxB,oBAAoB,EACrB,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AAqC9E,OAAO,EACL,qBAAqB,EACrB,wBAAwB,EACxB,oBAAoB,GACrB,CAAC;AACF,YAAY,EAAE,mBAAmB,EAAE,CAAC;AAEpC;;;;;GAKG;AACH,wBAAgB,0BAA0B,IAAI,OAAO,CAEpD;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,IAAI,OAAO,CAE/C;AA0BD;;;;;;;;GAQG;AACH,wBAAgB,aAAa,IAAI,OAAO,CASvC;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,uCAAuC,CACrD,MAAM,EAAE,OAAO,GACd,OAAO,CAaT;AAED;;;;;;;;;GASG;AACH,wBAAgB,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAIxD;AAED;;;;;;GAMG;AACH,wBAAgB,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAOxD;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAsB,4BAA4B,CAChD,UAAU,EAAE,MAAM,EAClB,OAAO,GAAE,OAAO,KAAa,GAC5B,OAAO,CAAC,IAAI,CAAC,CAgBf;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAsB,2BAA2B,CAC/C,UAAU,EAAE,MAAM,EAClB,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,mBAAmB,EAM9B,OAAO,GAAE,OAAO,KAAa,GAC5B,OAAO,CAAC,IAAI,CAAC,CAoCf"}
|
|
@@ -3,6 +3,7 @@ import { createHash } from "node:crypto";
|
|
|
3
3
|
import { readFileSync } from "node:fs";
|
|
4
4
|
import * as path from "node:path";
|
|
5
5
|
import { fileURLToPath } from "node:url";
|
|
6
|
+
import { currentEnvironment, readEnv } from "./process-environment.js";
|
|
6
7
|
import { sanitizeEnvForReconciliation } from "./pm-env.js";
|
|
7
8
|
import { LOCKFILE_REGEN_PLANS, detectPackageManagers, enginesForbiddenManagers, getLockfileRegenPlan, } from "./package-manager-detect.js";
|
|
8
9
|
import { buildTrampolineSource } from "./postinstall-trampoline-source.js";
|
|
@@ -36,21 +37,6 @@ const SETTLE_DELAY_MS = 250;
|
|
|
36
37
|
// package-manager-detect.ts) so existing importers/tests can keep importing it
|
|
37
38
|
// from this module.
|
|
38
39
|
export { detectPackageManagers, enginesForbiddenManagers, getLockfileRegenPlan, };
|
|
39
|
-
/**
|
|
40
|
-
* Read an env var by name without widening the project-wide process.env ban.
|
|
41
|
-
* Lisa's CLI isn't a Lambda handler or Nest service; it has to introspect its
|
|
42
|
-
* own package-manager lifecycle context (which, by construction, is supplied
|
|
43
|
-
* via externally set env vars) to decide whether to trampoline. Routing these
|
|
44
|
-
* presence checks through ConfigService/getStandaloneConfig would not add
|
|
45
|
-
* type-safety. The eslint-disable is scoped to the single read expression so
|
|
46
|
-
* no other process.env usage in this file is implicitly allowed.
|
|
47
|
-
* @param name - Name of the env variable to read
|
|
48
|
-
* @returns Value or undefined
|
|
49
|
-
*/
|
|
50
|
-
function readEnv(name) {
|
|
51
|
-
// eslint-disable-next-line no-restricted-syntax -- lifecycle detection requires reading externally-set env vars; scoped to this single read
|
|
52
|
-
return process.env[name];
|
|
53
|
-
}
|
|
54
40
|
/**
|
|
55
41
|
* Determine whether this Lisa invocation is running as a package-manager lifecycle
|
|
56
42
|
* script (postinstall, prepare, etc.). Works across npm, bun, yarn, and pnpm since
|
|
@@ -279,13 +265,10 @@ spawnFn = spawn) {
|
|
|
279
265
|
}
|
|
280
266
|
/**
|
|
281
267
|
* Snapshot the current process environment for the detached child. Centralised so
|
|
282
|
-
* the one
|
|
283
|
-
* is narrow (single expression) so no other process.env reads in this file are
|
|
284
|
-
* accidentally allowed.
|
|
268
|
+
* the one place the whole environment is copied is explicit and reviewable.
|
|
285
269
|
* @returns Shallow copy of the current environment
|
|
286
270
|
*/
|
|
287
271
|
function inheritedEnv() {
|
|
288
|
-
|
|
289
|
-
return { ...process.env };
|
|
272
|
+
return { ...currentEnvironment() };
|
|
290
273
|
}
|
|
291
274
|
//# sourceMappingURL=postinstall-trampoline.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"postinstall-trampoline.js","sourceRoot":"","sources":["../../src/utils/postinstall-trampoline.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,4BAA4B,EAAE,MAAM,aAAa,CAAC;AAC3D,OAAO,EACL,oBAAoB,EACpB,qBAAqB,EACrB,wBAAwB,EACxB,oBAAoB,GACrB,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAE3E;;;GAGG;AACH,MAAM,iBAAiB,GAAG,kBAAkB,CAAC;AAE7C;;;GAGG;AACH,MAAM,kBAAkB,GAAG,6BAA6B,CAAC;AACzD,MAAM,sBAAsB,GAAG,uBAAuB,CAAC;AACvD,MAAM,qBAAqB,GAAG,cAAc,CAAC;AAE7C;;;GAGG;AACH,MAAM,WAAW,GAAG,OAAO,CAAC;AAE5B;;GAEG;AACH,MAAM,gBAAgB,GAAG,GAAG,CAAC;AAE7B;;;GAGG;AACH,MAAM,eAAe,GAAG,GAAG,CAAC;AAE5B,uEAAuE;AACvE,+EAA+E;AAC/E,oBAAoB;AACpB,OAAO,EACL,qBAAqB,EACrB,wBAAwB,EACxB,oBAAoB,GACrB,CAAC;AAGF
|
|
1
|
+
{"version":3,"file":"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E,GAAG,kBAAkB,EAAE,EAAE,CAAC;AACrC,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file process-environment.ts
|
|
3
|
+
* @description The one sanctioned read of the process environment in Lisa's
|
|
4
|
+
* own source.
|
|
5
|
+
*
|
|
6
|
+
* Application code is meant to reach configuration through one place rather
|
|
7
|
+
* than reading `process.env` wherever it is convenient — that is the intent of
|
|
8
|
+
* the `no-restricted-syntax` ban the TypeScript profile ships. Lisa is a CLI
|
|
9
|
+
* and a set of config factories with no config service, and the environment
|
|
10
|
+
* genuinely is their input (CI fingerprints, agent-runtime ids, package-manager
|
|
11
|
+
* lifecycle variables). So every read and write goes through these functions,
|
|
12
|
+
* each call explicit and greppable, and Lisa's lint (`eslint.config.local.ts`)
|
|
13
|
+
* refuses every other direct route — `process.env` (plain, computed or through
|
|
14
|
+
* `globalThis`), the `env` export of `node:process`, a renamed or namespace
|
|
15
|
+
* import of it, and destructuring.
|
|
16
|
+
*
|
|
17
|
+
* Both read `process.env` at call time, never at import: a host whose test
|
|
18
|
+
* setup reassigns `process.env = {...}` is read correctly afterwards.
|
|
19
|
+
* @module utils
|
|
20
|
+
*/
|
|
21
|
+
/**
|
|
22
|
+
* Reads one environment variable now.
|
|
23
|
+
* @param name - Variable name
|
|
24
|
+
* @returns Its current value, or undefined when unset
|
|
25
|
+
*/
|
|
26
|
+
export declare function readEnv(name: string): string | undefined;
|
|
27
|
+
/**
|
|
28
|
+
* The process environment object as it is now: for handing a whole
|
|
29
|
+
* environment to a child process, a resolver, or a settings reader, and for
|
|
30
|
+
* the few CLI entry points that set variables their payload inherits.
|
|
31
|
+
* @returns The current `process.env` object (live, not a copy)
|
|
32
|
+
*/
|
|
33
|
+
export declare function currentEnvironment(): NodeJS.ProcessEnv;
|
|
34
|
+
/**
|
|
35
|
+
* Sets or removes one variable in this process's environment, for the CLI
|
|
36
|
+
* entry points whose own later reads (`os.tmpdir()`) and spawned payload must
|
|
37
|
+
* see the change. Every write to the environment goes through here.
|
|
38
|
+
* @param name - Variable name
|
|
39
|
+
* @param value - New value, or undefined to remove the variable
|
|
40
|
+
*/
|
|
41
|
+
export declare function writeEnv(name: string, value: string | undefined): void;
|
|
42
|
+
//# sourceMappingURL=process-environment.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"process-environment.d.ts","sourceRoot":"","sources":["../../src/utils/process-environment.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH;;;;GAIG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAExD;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,IAAI,MAAM,CAAC,UAAU,CAEtD;AAED;;;;;;GAMG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,CAMtE"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file process-environment.ts
|
|
3
|
+
* @description The one sanctioned read of the process environment in Lisa's
|
|
4
|
+
* own source.
|
|
5
|
+
*
|
|
6
|
+
* Application code is meant to reach configuration through one place rather
|
|
7
|
+
* than reading `process.env` wherever it is convenient — that is the intent of
|
|
8
|
+
* the `no-restricted-syntax` ban the TypeScript profile ships. Lisa is a CLI
|
|
9
|
+
* and a set of config factories with no config service, and the environment
|
|
10
|
+
* genuinely is their input (CI fingerprints, agent-runtime ids, package-manager
|
|
11
|
+
* lifecycle variables). So every read and write goes through these functions,
|
|
12
|
+
* each call explicit and greppable, and Lisa's lint (`eslint.config.local.ts`)
|
|
13
|
+
* refuses every other direct route — `process.env` (plain, computed or through
|
|
14
|
+
* `globalThis`), the `env` export of `node:process`, a renamed or namespace
|
|
15
|
+
* import of it, and destructuring.
|
|
16
|
+
*
|
|
17
|
+
* Both read `process.env` at call time, never at import: a host whose test
|
|
18
|
+
* setup reassigns `process.env = {...}` is read correctly afterwards.
|
|
19
|
+
* @module utils
|
|
20
|
+
*/
|
|
21
|
+
/**
|
|
22
|
+
* Reads one environment variable now.
|
|
23
|
+
* @param name - Variable name
|
|
24
|
+
* @returns Its current value, or undefined when unset
|
|
25
|
+
*/
|
|
26
|
+
export function readEnv(name) {
|
|
27
|
+
return process.env[name];
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* The process environment object as it is now: for handing a whole
|
|
31
|
+
* environment to a child process, a resolver, or a settings reader, and for
|
|
32
|
+
* the few CLI entry points that set variables their payload inherits.
|
|
33
|
+
* @returns The current `process.env` object (live, not a copy)
|
|
34
|
+
*/
|
|
35
|
+
export function currentEnvironment() {
|
|
36
|
+
return process.env;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Sets or removes one variable in this process's environment, for the CLI
|
|
40
|
+
* entry points whose own later reads (`os.tmpdir()`) and spawned payload must
|
|
41
|
+
* see the change. Every write to the environment goes through here.
|
|
42
|
+
* @param name - Variable name
|
|
43
|
+
* @param value - New value, or undefined to remove the variable
|
|
44
|
+
*/
|
|
45
|
+
export function writeEnv(name, value) {
|
|
46
|
+
if (value === undefined) {
|
|
47
|
+
delete process.env[name];
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
process.env[name] = value;
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=process-environment.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"process-environment.js","sourceRoot":"","sources":["../../src/utils/process-environment.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH;;;;GAIG;AACH,MAAM,UAAU,OAAO,CAAC,IAAY;IAClC,OAAO,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;AAC3B,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,kBAAkB;IAChC,OAAO,OAAO,CAAC,GAAG,CAAC;AACrB,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,QAAQ,CAAC,IAAY,EAAE,KAAyB;IAC9D,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;QACxB,OAAO,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QACzB,OAAO;IACT,CAAC;IACD,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC;AAC5B,CAAC"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/** Inputs the resolver reads; injectable so tests state them instead of mutating globals. */
|
|
2
|
+
export interface ExecutableSearchContext {
|
|
3
|
+
/** The environment whose `PATH` (and, on Windows, `PATHEXT`) is searched. */
|
|
4
|
+
readonly environment: NodeJS.ProcessEnv;
|
|
5
|
+
/** The platform whose path rules apply. */
|
|
6
|
+
readonly platform: NodeJS.Platform;
|
|
7
|
+
/**
|
|
8
|
+
* Whether a candidate path can be spawned. Defaults to this host's file
|
|
9
|
+
* system; a caller modelling another platform's file system (such as
|
|
10
|
+
* Windows' case-insensitive one) supplies its own.
|
|
11
|
+
*/
|
|
12
|
+
readonly isExecutable?: (candidate: string) => boolean;
|
|
13
|
+
}
|
|
14
|
+
/** The outcome of a search: the absolute file, or the directories that lacked it. */
|
|
15
|
+
export type ExecutableResolution = {
|
|
16
|
+
readonly found: true;
|
|
17
|
+
readonly path: string;
|
|
18
|
+
} | {
|
|
19
|
+
readonly found: false;
|
|
20
|
+
readonly command: string;
|
|
21
|
+
readonly searched: readonly string[];
|
|
22
|
+
};
|
|
23
|
+
/** The exact file, argv and option to spawn a resolved command with. */
|
|
24
|
+
export interface SpawnTarget {
|
|
25
|
+
/** Absolute file to spawn. */
|
|
26
|
+
readonly file: string;
|
|
27
|
+
/** Arguments to pass to {@link SpawnTarget.file}. */
|
|
28
|
+
readonly args: readonly string[];
|
|
29
|
+
/** Must be passed through to `spawn`; true only for a batch file via `cmd.exe`. */
|
|
30
|
+
readonly windowsVerbatimArguments: boolean;
|
|
31
|
+
}
|
|
32
|
+
/** A command no absolute `PATH` directory holds. Carries `code: "ENOENT"`. */
|
|
33
|
+
export declare class ExecutableNotFoundError extends Error {
|
|
34
|
+
readonly command: string;
|
|
35
|
+
readonly searched: readonly string[];
|
|
36
|
+
/** The errno-style code callers already treat as "not installed". */
|
|
37
|
+
readonly code = "ENOENT";
|
|
38
|
+
/**
|
|
39
|
+
* Creates the error.
|
|
40
|
+
* @param command - The bare command that was searched for
|
|
41
|
+
* @param searched - The absolute directories that were searched
|
|
42
|
+
*/
|
|
43
|
+
constructor(command: string, searched: readonly string[]);
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Resolves a bare command name to the absolute path of its first executable
|
|
47
|
+
* match in an absolute `PATH` directory.
|
|
48
|
+
* @param command - Bare command name, such as `git`
|
|
49
|
+
* @param context - Environment and platform to search; defaults to this process
|
|
50
|
+
* @returns The absolute path, or a not-found result naming what was searched
|
|
51
|
+
*/
|
|
52
|
+
export declare function resolveExecutable(command: string, context?: ExecutableSearchContext): ExecutableResolution;
|
|
53
|
+
/**
|
|
54
|
+
* Resolves a command or throws the not-found error callers treat as ENOENT.
|
|
55
|
+
* @param command - Bare command name
|
|
56
|
+
* @param context - Environment and platform to search; defaults to this process
|
|
57
|
+
* @returns The absolute executable path
|
|
58
|
+
* @throws {ExecutableNotFoundError} When no absolute `PATH` directory holds it
|
|
59
|
+
*/
|
|
60
|
+
export declare function requireExecutable(command: string, context?: ExecutableSearchContext): string;
|
|
61
|
+
/**
|
|
62
|
+
* Quotes one argument for a `cmd.exe /d /s /c` line that runs a batch file.
|
|
63
|
+
*
|
|
64
|
+
* MSVCRT quoting first (backslashes before a quote and at the end doubled,
|
|
65
|
+
* quotes escaped), then every cmd metacharacter `^`-escaped twice: once for
|
|
66
|
+
* the `/c` line and once for the batch file's own `%*` re-expansion, which is
|
|
67
|
+
* how npm's `.cmd` shims forward arguments. This is cross-spawn's escaping for
|
|
68
|
+
* command shims.
|
|
69
|
+
* @param argument - One argument, as the caller passed it
|
|
70
|
+
* @returns The escaped argument
|
|
71
|
+
*/
|
|
72
|
+
export declare function escapeBatchArgument(argument: string): string;
|
|
73
|
+
/**
|
|
74
|
+
* Locates `cmd.exe` as an absolute path, never through `PATH`.
|
|
75
|
+
* @param environment - Environment to read `ComSpec` and `SystemRoot` from
|
|
76
|
+
* @returns Absolute path of the command interpreter
|
|
77
|
+
*/
|
|
78
|
+
export declare function commandInterpreter(environment: NodeJS.ProcessEnv): string;
|
|
79
|
+
/**
|
|
80
|
+
* Resolves a command and builds exactly what to spawn for it, without a shell
|
|
81
|
+
* except where Windows requires one for a batch file.
|
|
82
|
+
* @param command - Bare command name, such as `claude`
|
|
83
|
+
* @param args - Arguments for the command
|
|
84
|
+
* @param context - Environment and platform to search; defaults to this process
|
|
85
|
+
* @returns The file, argv and `windowsVerbatimArguments` to pass to `spawn`
|
|
86
|
+
* @throws {ExecutableNotFoundError} When no absolute `PATH` directory holds it
|
|
87
|
+
*/
|
|
88
|
+
export declare function spawnTarget(command: string, args: readonly string[], context?: ExecutableSearchContext): SpawnTarget;
|
|
89
|
+
//# sourceMappingURL=resolve-executable.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolve-executable.d.ts","sourceRoot":"","sources":["../../src/utils/resolve-executable.ts"],"names":[],"mappings":"AAsCA,6FAA6F;AAC7F,MAAM,WAAW,uBAAuB;IACtC,6EAA6E;IAC7E,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC,UAAU,CAAC;IACxC,2CAA2C;IAC3C,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC,QAAQ,CAAC;IACnC;;;;OAIG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC;CACxD;AAED,qFAAqF;AACrF,MAAM,MAAM,oBAAoB,GAC5B;IAAE,QAAQ,CAAC,KAAK,EAAE,IAAI,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAA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1,224 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file resolve-executable.ts
|
|
3
|
+
* @description Resolves a user-installed command name (`git`, `gh`, `claude`,
|
|
4
|
+
* `ps`) to an absolute path, and to the exact file and argv to spawn, before
|
|
5
|
+
* Lisa runs it.
|
|
6
|
+
*
|
|
7
|
+
* Handing a bare name to `spawn`/`execFile` lets the operating system search
|
|
8
|
+
* every `PATH` entry, including relative ones such as `.` or an empty segment,
|
|
9
|
+
* which resolve against the current working directory. Lisa runs inside
|
|
10
|
+
* repositories it does not control, so a relative entry would let a file
|
|
11
|
+
* checked into the repository stand in for the real tool. This resolver walks
|
|
12
|
+
* only the absolute `PATH` directories, in order, and NEVER hands the bare name
|
|
13
|
+
* back: a command no absolute directory holds is reported as not found, with
|
|
14
|
+
* an `ENOENT` error code so every caller's existing "not installed" handling
|
|
15
|
+
* still applies.
|
|
16
|
+
*
|
|
17
|
+
* On Windows it tries the `PATHEXT` extensions and never returns an
|
|
18
|
+
* extensionless file — npm installs a POSIX shell script named `claude` next
|
|
19
|
+
* to `claude.cmd`, and only the latter runs there. A `.cmd`/`.bat` cannot be
|
|
20
|
+
* spawned without a shell since Node's CVE-2024-27980 hardening, so
|
|
21
|
+
* {@link spawnTarget} runs it through an absolute `cmd.exe` with every argument
|
|
22
|
+
* escaped for both cmd parsing passes, instead of `shell: true`.
|
|
23
|
+
* @module utils
|
|
24
|
+
*/
|
|
25
|
+
import { accessSync, constants, statSync } from "node:fs";
|
|
26
|
+
import * as path from "node:path";
|
|
27
|
+
import { platform } from "node:process";
|
|
28
|
+
import { currentEnvironment } from "./process-environment.js";
|
|
29
|
+
/** Extensions Windows tries when `PATHEXT` is unset. */
|
|
30
|
+
const DEFAULT_WINDOWS_EXTENSIONS = [".COM", ".EXE", ".BAT", ".CMD"];
|
|
31
|
+
/** Batch-file extensions, which only `cmd.exe` can run. */
|
|
32
|
+
const BATCH_EXTENSION = /\.(?:cmd|bat)$/iu;
|
|
33
|
+
/** Characters `cmd.exe` interprets, escaped with `^` (as cross-spawn does). */
|
|
34
|
+
const CMD_META_CHARS = /([()\][%!^"`<>&|;, *?])/gu;
|
|
35
|
+
/** A command no absolute `PATH` directory holds. Carries `code: "ENOENT"`. */
|
|
36
|
+
export class ExecutableNotFoundError extends Error {
|
|
37
|
+
command;
|
|
38
|
+
searched;
|
|
39
|
+
/** The errno-style code callers already treat as "not installed". */
|
|
40
|
+
code = "ENOENT";
|
|
41
|
+
/**
|
|
42
|
+
* Creates the error.
|
|
43
|
+
* @param command - The bare command that was searched for
|
|
44
|
+
* @param searched - The absolute directories that were searched
|
|
45
|
+
*/
|
|
46
|
+
constructor(command, searched) {
|
|
47
|
+
// The directories stay on the error for a caller that wants them; the
|
|
48
|
+
// message names only how many, so it never reprints the whole PATH.
|
|
49
|
+
super(`${command} not found on PATH (searched ${searched.length} absolute ${searched.length === 1 ? "directory" : "directories"}; relative entries are never searched)`);
|
|
50
|
+
this.command = command;
|
|
51
|
+
this.searched = searched;
|
|
52
|
+
this.name = "ExecutableNotFoundError";
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* This process's search context, read at call time.
|
|
57
|
+
* @returns The current environment and platform
|
|
58
|
+
*/
|
|
59
|
+
function processContext() {
|
|
60
|
+
return { environment: currentEnvironment(), platform };
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Reads an environment variable, tolerating Windows' case-insensitive keys.
|
|
64
|
+
* @param environment - Environment to read
|
|
65
|
+
* @param name - Variable name, in upper case
|
|
66
|
+
* @returns The value, or an empty string when unset
|
|
67
|
+
*/
|
|
68
|
+
function readVariable(environment, name) {
|
|
69
|
+
const key = Object.keys(environment).find(candidate => candidate.toUpperCase() === name);
|
|
70
|
+
return key === undefined ? "" : (environment[key] ?? "");
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Lists the file names to try for a command on the given platform.
|
|
74
|
+
* @param command - Bare command name
|
|
75
|
+
* @param context - Platform and environment to apply
|
|
76
|
+
* @returns Candidate file names, most specific first; never extensionless on Windows
|
|
77
|
+
*/
|
|
78
|
+
function candidateNames(command, context) {
|
|
79
|
+
if (context.platform !== "win32")
|
|
80
|
+
return [command];
|
|
81
|
+
const configured = readVariable(context.environment, "PATHEXT");
|
|
82
|
+
const extensions = configured === ""
|
|
83
|
+
? DEFAULT_WINDOWS_EXTENSIONS
|
|
84
|
+
: configured.split(";").filter(extension => extension !== "");
|
|
85
|
+
return extensions.map(extension => `${command}${extension}`);
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Reports whether a path is a regular file this process may execute.
|
|
89
|
+
* @param candidate - Absolute path to test
|
|
90
|
+
* @param context - Platform whose permission model applies
|
|
91
|
+
* @returns True when the path can be spawned
|
|
92
|
+
*/
|
|
93
|
+
function isExecutableFile(candidate, context) {
|
|
94
|
+
try {
|
|
95
|
+
if (!statSync(candidate).isFile())
|
|
96
|
+
return false;
|
|
97
|
+
// Windows has no execute bit; a PATHEXT match is the test there.
|
|
98
|
+
if (context.platform !== "win32")
|
|
99
|
+
accessSync(candidate, constants.X_OK);
|
|
100
|
+
return true;
|
|
101
|
+
}
|
|
102
|
+
catch {
|
|
103
|
+
return false;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Lists the absolute directories of the search path, in order.
|
|
108
|
+
* @param context - Environment and platform to read
|
|
109
|
+
* @returns Absolute directories; relative and empty entries are dropped
|
|
110
|
+
*/
|
|
111
|
+
function absoluteSearchDirectories(context) {
|
|
112
|
+
// Delimiter and absoluteness follow the target platform's rules.
|
|
113
|
+
const pathApi = context.platform === "win32" ? path.win32 : path.posix;
|
|
114
|
+
return readVariable(context.environment, "PATH")
|
|
115
|
+
.split(pathApi.delimiter)
|
|
116
|
+
.filter(directory => pathApi.isAbsolute(directory));
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Resolves a bare command name to the absolute path of its first executable
|
|
120
|
+
* match in an absolute `PATH` directory.
|
|
121
|
+
* @param command - Bare command name, such as `git`
|
|
122
|
+
* @param context - Environment and platform to search; defaults to this process
|
|
123
|
+
* @returns The absolute path, or a not-found result naming what was searched
|
|
124
|
+
*/
|
|
125
|
+
export function resolveExecutable(command, context = processContext()) {
|
|
126
|
+
const directories = absoluteSearchDirectories(context);
|
|
127
|
+
const names = candidateNames(command, context);
|
|
128
|
+
const pathApi = context.platform === "win32" ? path.win32 : path.posix;
|
|
129
|
+
const isExecutable = context.isExecutable ??
|
|
130
|
+
((candidate) => isExecutableFile(candidate, context));
|
|
131
|
+
// Joined with the target platform's separator, which is this host's own
|
|
132
|
+
// whenever the default file-system check is the one asked.
|
|
133
|
+
const match = directories
|
|
134
|
+
.flatMap(directory => names.map(name => pathApi.join(directory, name)))
|
|
135
|
+
.find(candidate => isExecutable(candidate));
|
|
136
|
+
return match === undefined
|
|
137
|
+
? { found: false, command, searched: directories }
|
|
138
|
+
: { found: true, path: match };
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* Resolves a command or throws the not-found error callers treat as ENOENT.
|
|
142
|
+
* @param command - Bare command name
|
|
143
|
+
* @param context - Environment and platform to search; defaults to this process
|
|
144
|
+
* @returns The absolute executable path
|
|
145
|
+
* @throws {ExecutableNotFoundError} When no absolute `PATH` directory holds it
|
|
146
|
+
*/
|
|
147
|
+
export function requireExecutable(command, context = processContext()) {
|
|
148
|
+
const resolution = resolveExecutable(command, context);
|
|
149
|
+
if (!resolution.found) {
|
|
150
|
+
throw new ExecutableNotFoundError(resolution.command, resolution.searched);
|
|
151
|
+
}
|
|
152
|
+
return resolution.path;
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* The inside of an MSVCRT double-quoted argument: a run of backslashes is
|
|
156
|
+
* doubled when a quote or the closing quote follows it, and each quote is
|
|
157
|
+
* escaped. A single linear pass, so no input can make it backtrack.
|
|
158
|
+
* @param argument - One argument, as the caller passed it
|
|
159
|
+
* @returns The quoted form, without the surrounding quotes
|
|
160
|
+
*/
|
|
161
|
+
function msvcrtQuoteBody(argument) {
|
|
162
|
+
const end = [...argument].reduce((state, character) => {
|
|
163
|
+
if (character === "\\") {
|
|
164
|
+
return { text: state.text, backslashes: state.backslashes + 1 };
|
|
165
|
+
}
|
|
166
|
+
const run = character === '"'
|
|
167
|
+
? `${"\\".repeat(state.backslashes * 2 + 1)}"`
|
|
168
|
+
: `${"\\".repeat(state.backslashes)}${character}`;
|
|
169
|
+
return { text: state.text + run, backslashes: 0 };
|
|
170
|
+
}, { text: "", backslashes: 0 });
|
|
171
|
+
return end.text + "\\".repeat(end.backslashes * 2);
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* Quotes one argument for a `cmd.exe /d /s /c` line that runs a batch file.
|
|
175
|
+
*
|
|
176
|
+
* MSVCRT quoting first (backslashes before a quote and at the end doubled,
|
|
177
|
+
* quotes escaped), then every cmd metacharacter `^`-escaped twice: once for
|
|
178
|
+
* the `/c` line and once for the batch file's own `%*` re-expansion, which is
|
|
179
|
+
* how npm's `.cmd` shims forward arguments. This is cross-spawn's escaping for
|
|
180
|
+
* command shims.
|
|
181
|
+
* @param argument - One argument, as the caller passed it
|
|
182
|
+
* @returns The escaped argument
|
|
183
|
+
*/
|
|
184
|
+
export function escapeBatchArgument(argument) {
|
|
185
|
+
const quoted = `"${msvcrtQuoteBody(argument)}"`;
|
|
186
|
+
return quoted.replace(CMD_META_CHARS, "^$1").replace(CMD_META_CHARS, "^$1");
|
|
187
|
+
}
|
|
188
|
+
/**
|
|
189
|
+
* Locates `cmd.exe` as an absolute path, never through `PATH`.
|
|
190
|
+
* @param environment - Environment to read `ComSpec` and `SystemRoot` from
|
|
191
|
+
* @returns Absolute path of the command interpreter
|
|
192
|
+
*/
|
|
193
|
+
export function commandInterpreter(environment) {
|
|
194
|
+
const comspec = readVariable(environment, "COMSPEC");
|
|
195
|
+
if (path.win32.isAbsolute(comspec))
|
|
196
|
+
return comspec;
|
|
197
|
+
const systemRoot = readVariable(environment, "SYSTEMROOT") || "C:\\Windows";
|
|
198
|
+
return path.win32.join(systemRoot, "System32", "cmd.exe");
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* Resolves a command and builds exactly what to spawn for it, without a shell
|
|
202
|
+
* except where Windows requires one for a batch file.
|
|
203
|
+
* @param command - Bare command name, such as `claude`
|
|
204
|
+
* @param args - Arguments for the command
|
|
205
|
+
* @param context - Environment and platform to search; defaults to this process
|
|
206
|
+
* @returns The file, argv and `windowsVerbatimArguments` to pass to `spawn`
|
|
207
|
+
* @throws {ExecutableNotFoundError} When no absolute `PATH` directory holds it
|
|
208
|
+
*/
|
|
209
|
+
export function spawnTarget(command, args, context = processContext()) {
|
|
210
|
+
const file = requireExecutable(command, context);
|
|
211
|
+
if (context.platform !== "win32" || !BATCH_EXTENSION.test(file)) {
|
|
212
|
+
return { file, args, windowsVerbatimArguments: false };
|
|
213
|
+
}
|
|
214
|
+
const line = [
|
|
215
|
+
path.win32.normalize(file).replace(CMD_META_CHARS, "^$1"),
|
|
216
|
+
...args.map(argument => escapeBatchArgument(argument)),
|
|
217
|
+
].join(" ");
|
|
218
|
+
return {
|
|
219
|
+
file: commandInterpreter(context.environment),
|
|
220
|
+
args: ["/d", "/s", "/c", `"${line}"`],
|
|
221
|
+
windowsVerbatimArguments: true,
|
|
222
|
+
};
|
|
223
|
+
}
|
|
224
|
+
//# sourceMappingURL=resolve-executable.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolve-executable.js","sourceRoot":"","sources":["../../src/utils/resolve-executable.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC1D,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,kBAAkB,EAAE,MAA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able.js";
|
|
2
|
+
/**
|
|
3
|
+
* Builds what to spawn to run one command line through the platform's shell.
|
|
4
|
+
* @param line - The operator's command line, passed through unchanged
|
|
5
|
+
* @param context - Platform and environment; defaults to this process now
|
|
6
|
+
* @returns The absolute shell, its argv, and `windowsVerbatimArguments`
|
|
7
|
+
*/
|
|
8
|
+
export declare function shellCommandLine(line: string, context?: ExecutableSearchContext): SpawnTarget;
|
|
9
|
+
//# sourceMappingURL=shell-command-line.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shell-command-line.d.ts","sourceRoot":"","sources":["../../src/utils/shell-command-line.ts"],"names":[],"mappings":"AAiBA,OAAO,EAEL,KAAK,uBAAuB,EAC5B,KAAK,WAAW,EACjB,MAAM,yBAAyB,CAAC;AAKjC;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE,uBAGR,GACA,WAAW,CAab"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file shell-command-line.ts
|
|
3
|
+
* @description Builds the one shell invocation Lisa makes on purpose: running
|
|
4
|
+
* an operator's whole command line (`lisa admit -- "bun run typecheck"`)
|
|
5
|
+
* exactly as their shell would run it unadmitted.
|
|
6
|
+
*
|
|
7
|
+
* It is what Node's `shell: true` does, made explicit so the interpreter is an
|
|
8
|
+
* absolute path rather than a `PATH` lookup and the one place a command line
|
|
9
|
+
* reaches a shell is a small, tested function: `/bin/sh -c <line>` on POSIX,
|
|
10
|
+
* `<absolute cmd.exe> /d /s /c "<line>"` with verbatim arguments on Windows.
|
|
11
|
+
* The line is passed as a single argument and never assembled from parts, so
|
|
12
|
+
* nothing Lisa adds is ever interpreted by the shell.
|
|
13
|
+
* @module utils
|
|
14
|
+
*/
|
|
15
|
+
import { platform } from "node:process";
|
|
16
|
+
import { currentEnvironment } from "./process-environment.js";
|
|
17
|
+
import { commandInterpreter, } from "./resolve-executable.js";
|
|
18
|
+
/** The POSIX shell Node's own `shell: true` runs. */
|
|
19
|
+
const POSIX_SHELL = "/bin/sh";
|
|
20
|
+
/**
|
|
21
|
+
* Builds what to spawn to run one command line through the platform's shell.
|
|
22
|
+
* @param line - The operator's command line, passed through unchanged
|
|
23
|
+
* @param context - Platform and environment; defaults to this process now
|
|
24
|
+
* @returns The absolute shell, its argv, and `windowsVerbatimArguments`
|
|
25
|
+
*/
|
|
26
|
+
export function shellCommandLine(line, context = {
|
|
27
|
+
environment: currentEnvironment(),
|
|
28
|
+
platform,
|
|
29
|
+
}) {
|
|
30
|
+
if (context.platform !== "win32") {
|
|
31
|
+
return {
|
|
32
|
+
file: POSIX_SHELL,
|
|
33
|
+
args: ["-c", line],
|
|
34
|
+
windowsVerbatimArguments: false,
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
return {
|
|
38
|
+
file: commandInterpreter(context.environment),
|
|
39
|
+
args: ["/d", "/s", "/c", `"${line}"`],
|
|
40
|
+
windowsVerbatimArguments: true,
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=shell-command-line.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shell-command-line.js","sourceRoot":"","sources":["../../src/utils/shell-command-line.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAExC,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EACL,kBAAkB,GAGnB,MAAM,yBAAyB,CAAC;AAEjC,qDAAqD;AACrD,MAAM,WAAW,GAAG,SAAS,CAAC;AAE9B;;;;;GAKG;AACH,MAAM,UAAU,gBAAgB,CAC9B,IAAY,EACZ,UAAmC;IACjC,WAAW,EAAE,kBAAkB,EAAE;IACjC,QAAQ;CACT;IAED,IAAI,OAAO,CAAC,QAAQ,KAAK,OAAO,EAAE,CAAC;QACjC,OAAO;YACL,IAAI,EAAE,WAAW;YACjB,IAAI,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC;YAClB,wBAAwB,EAAE,KAAK;SAChC,CAAC;IACJ,CAAC;IACD,OAAO;QACL,IAAI,EAAE,kBAAkB,CAAC,OAAO,CAAC,WAAW,CAAC;QAC7C,IAAI,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,IAAI,GAAG,CAAC;QACrC,wBAAwB,EAAE,IAAI;KAC/B,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file usage-accounting-totals.ts
|
|
3
|
+
* @description Rollup arithmetic for the managed `## Lisa Usage` ledger: sums
|
|
4
|
+
* direct and descendant tokens and costs, and resolves the currency they are
|
|
5
|
+
* reported in. Rendering and parsing stay in `usage-accounting.ts`, which
|
|
6
|
+
* re-exports {@link createLisaUsageRollup} as part of its public surface.
|
|
7
|
+
* @module utils
|
|
8
|
+
*/
|
|
9
|
+
import type { LisaUsageChildArtifact, LisaUsageEntry, LisaUsageRollup } from "../../all/copy-overwrite/scripts/lib/usage-ledger.mjs";
|
|
10
|
+
/**
|
|
11
|
+
* Build a default rollup token from direct entries while preserving any prior
|
|
12
|
+
* child-work totals supplied by callers from later lifecycle stages.
|
|
13
|
+
* @param entries Direct usage entries that should appear in the section.
|
|
14
|
+
* @param previousRollup Existing rollup token parsed from the artifact, if any.
|
|
15
|
+
* @param childArtifacts Optional child ledgers to recompute descendant totals from current work.
|
|
16
|
+
* @returns A deterministic rollup token payload for the managed section.
|
|
17
|
+
*/
|
|
18
|
+
export declare function createLisaUsageRollup(entries: readonly LisaUsageEntry[], previousRollup?: LisaUsageRollup | null, childArtifacts?: readonly LisaUsageChildArtifact[]): LisaUsageRollup;
|
|
19
|
+
//# sourceMappingURL=usage-accounting-totals.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usage-accounting-totals.d.ts","sourceRoot":"","sources":["../../src/utils/usage-accounting-totals.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,EACV,sBAAsB,EACtB,cAAc,EACd,eAAe,EAChB,MAAM,uDAAuD,CAAC;AAkJ/D;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,SAAS,cAAc,EAAE,EAClC,cAAc,CAAC,EAAE,eAAe,GAAG,IAAI,EACvC,cAAc,CAAC,EAAE,SAAS,sBAAsB,EAAE,GACjD,eAAe,CAoDjB"}
|