@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
|
@@ -1,22 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
const PACKAGE_PATH_PATTERN = /^[A-Za-z0-9][A-Za-z0-9._/-]*$/;
|
|
17
|
-
const SURFACE_PATH_PATTERN = /^[A-Za-z0-9._-]+(?:\/[A-Za-z0-9._-]+)*$/;
|
|
18
|
-
const SHA_PATTERN = /^[a-f0-9]{40}$/;
|
|
19
|
-
const FINGERPRINT_PATTERN = /^sll4-[a-f0-9]{12}$/;
|
|
1
|
+
/**
|
|
2
|
+
* Hash-pinned allowlist projection for public upstream Lisa filings.
|
|
3
|
+
*
|
|
4
|
+
* Turns one closed, untrusted event from a host-project workflow into public
|
|
5
|
+
* Markdown that contains only allowlisted vocabulary, hash-pinned Lisa-owned
|
|
6
|
+
* excerpts, and public-origin commits. The hostile-input guards, package-file
|
|
7
|
+
* reads, and per-field validators live in sibling `upstream-attribution-*`
|
|
8
|
+
* modules; this module owns the vocabulary, the validation order, and the
|
|
9
|
+
* rendered document.
|
|
10
|
+
* @module core/upstream-attribution-body
|
|
11
|
+
*/
|
|
12
|
+
import { assertDynamicTextSafe, assertPublicTextSafe, readOptionalValue, readValue, reject, requireAllowlistedRecord, requireAsciiString, requireDenseArray, } from "./upstream-attribution-guards.js";
|
|
13
|
+
import { assertRuntimeContract } from "./upstream-attribution-files.js";
|
|
14
|
+
import { requireCommitRefs, requireDocumentKind, requireExcerpts, requireFingerprintPairing, requireLisaSurface, } from "./upstream-attribution-fields.js";
|
|
15
|
+
export { UpstreamAttributionRejection } from "./upstream-attribution-guards.js";
|
|
20
16
|
const TOP_LEVEL_FIELDS = Object.freeze([
|
|
21
17
|
"documentKind",
|
|
22
18
|
"lisaSurface",
|
|
@@ -26,7 +22,6 @@ const TOP_LEVEL_FIELDS = Object.freeze([
|
|
|
26
22
|
"redactedPlaceholders",
|
|
27
23
|
"occurrenceFingerprint",
|
|
28
24
|
]);
|
|
29
|
-
const EXCERPT_FIELDS = Object.freeze(["file", "text"]);
|
|
30
25
|
/** Closed, host-agnostic failure categories accepted in public filings. */
|
|
31
26
|
export const UPSTREAM_FAILURE_CLASSES = Object.freeze([
|
|
32
27
|
"access-control-failure",
|
|
@@ -60,23 +55,6 @@ export const UPSTREAM_REDACTED_PLACEHOLDERS = Object.freeze([
|
|
|
60
55
|
"<identifier>",
|
|
61
56
|
]);
|
|
62
57
|
const PLACEHOLDER_SET = new Set(UPSTREAM_REDACTED_PLACEHOLDERS);
|
|
63
|
-
const PUBLIC_BODY_DENY_LIST = [
|
|
64
|
-
/\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}\b/i,
|
|
65
|
-
/\bAKIA[0-9A-Z]{16}\b/,
|
|
66
|
-
/\bgh[pousr]_\w{20,}\b/,
|
|
67
|
-
/\bxox[baprs]-[\w-]{10,}\b/,
|
|
68
|
-
/\b(?:api[_-]?key|access[_-]?key|password|passwd|secret|token|credential)\s*=\s*[\w+./=-]{16,}/i,
|
|
69
|
-
/-----BEGIN (?:RSA |EC |OPENSSH )?PRIVATE KEY-----/,
|
|
70
|
-
];
|
|
71
|
-
/** A field-named, value-sanitized public projection rejection. */
|
|
72
|
-
export class UpstreamAttributionRejection extends Error {
|
|
73
|
-
field;
|
|
74
|
-
constructor(field, detail) {
|
|
75
|
-
super(`upstream-attribution: field "${field}": ${detail}`);
|
|
76
|
-
this.name = "UpstreamAttributionRejection";
|
|
77
|
-
this.field = field;
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
58
|
export function buildUpstreamAttributionIssueBody(input) {
|
|
81
59
|
const filing = validateAttribution(input);
|
|
82
60
|
const rootCauseKey = `${filing.lisaSurface.toLowerCase()}#${filing.failureClass}`;
|
|
@@ -86,6 +64,12 @@ export function buildUpstreamAttributionIssueBody(input) {
|
|
|
86
64
|
assertPublicTextSafe(body);
|
|
87
65
|
return body;
|
|
88
66
|
}
|
|
67
|
+
/**
|
|
68
|
+
* Render a new upstream issue body.
|
|
69
|
+
* @param filing - Validated filing
|
|
70
|
+
* @param rootCauseKey - Surface and failure-class dedupe key
|
|
71
|
+
* @returns Public issue Markdown
|
|
72
|
+
*/
|
|
89
73
|
function renderIssue(filing, rootCauseKey) {
|
|
90
74
|
return [
|
|
91
75
|
`<!-- [lisa-upstream-attribution] key=${rootCauseKey} -->`,
|
|
@@ -108,6 +92,12 @@ function renderIssue(filing, rootCauseKey) {
|
|
|
108
92
|
"",
|
|
109
93
|
].join("\n");
|
|
110
94
|
}
|
|
95
|
+
/**
|
|
96
|
+
* Render a repeat-occurrence comment for an existing upstream issue.
|
|
97
|
+
* @param filing - Validated occurrence filing
|
|
98
|
+
* @param rootCauseKey - Surface and failure-class dedupe key
|
|
99
|
+
* @returns Public comment Markdown
|
|
100
|
+
*/
|
|
111
101
|
function renderOccurrence(filing, rootCauseKey) {
|
|
112
102
|
return [
|
|
113
103
|
`<!-- [lisa-upstream-attribution-occurrence] key=${filing.occurrenceFingerprint ?? ""} -->`,
|
|
@@ -122,6 +112,11 @@ function renderOccurrence(filing, rootCauseKey) {
|
|
|
122
112
|
"",
|
|
123
113
|
].join("\n");
|
|
124
114
|
}
|
|
115
|
+
/**
|
|
116
|
+
* Render the evidence chain shared by issues and occurrences.
|
|
117
|
+
* @param filing - Validated filing
|
|
118
|
+
* @returns The evidence section Markdown
|
|
119
|
+
*/
|
|
125
120
|
function renderEvidence(filing) {
|
|
126
121
|
const excerpts = filing.excerpts
|
|
127
122
|
.map(excerpt => `- \`${excerpt.file}\`:\n\n${indentAsCode(excerpt.text)}`)
|
|
@@ -152,18 +147,16 @@ function renderEvidence(filing) {
|
|
|
152
147
|
placeholders,
|
|
153
148
|
].join("\n");
|
|
154
149
|
}
|
|
150
|
+
/**
|
|
151
|
+
* Validate every field of an untrusted event, in a fixed order.
|
|
152
|
+
* @param input - Untrusted event
|
|
153
|
+
* @returns The validated filing
|
|
154
|
+
*/
|
|
155
155
|
function validateAttribution(input) {
|
|
156
|
-
|
|
157
|
-
const record = requirePlainRecord(input, "input");
|
|
158
|
-
rejectUnknownFields(record, TOP_LEVEL_FIELDS, "input");
|
|
159
|
-
rejectAccessors(record, "input");
|
|
156
|
+
const record = openAttributionRecord(input);
|
|
160
157
|
const documentKind = requireDocumentKind(readValue(record, "documentKind"));
|
|
161
158
|
const occurrenceFingerprint = requireFingerprintPairing(readOptionalValue(record, "occurrenceFingerprint"), documentKind);
|
|
162
159
|
const excerpts = requireExcerpts(readValue(record, "lisaOwnedExcerpts"));
|
|
163
|
-
const aggregateBytes = excerpts.reduce((total, excerpt) => total + Buffer.byteLength(excerpt.text, "utf8"), 0);
|
|
164
|
-
if (aggregateBytes > MAX_AGGREGATE_EXCERPT_BYTES) {
|
|
165
|
-
reject("lisaOwnedExcerpts", "exceeds the aggregate byte limit");
|
|
166
|
-
}
|
|
167
160
|
return {
|
|
168
161
|
documentKind,
|
|
169
162
|
lisaSurface: requireLisaSurface(readValue(record, "lisaSurface")),
|
|
@@ -174,98 +167,20 @@ function validateAttribution(input) {
|
|
|
174
167
|
occurrenceFingerprint,
|
|
175
168
|
};
|
|
176
169
|
}
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
}
|
|
186
|
-
const packageBytes = readBoundedRegularFile(path.join(PACKAGE_ROOT, "package.json"), MAX_PACKAGE_JSON_BYTES, "package identity");
|
|
187
|
-
let packageJson;
|
|
188
|
-
try {
|
|
189
|
-
packageJson = JSON.parse(decodeUtf8(packageBytes, "package identity"));
|
|
190
|
-
}
|
|
191
|
-
catch {
|
|
192
|
-
throw new Error("Invalid Lisa package identity");
|
|
193
|
-
}
|
|
194
|
-
if (packageJson === null ||
|
|
195
|
-
typeof packageJson !== "object" ||
|
|
196
|
-
isProxy(packageJson) ||
|
|
197
|
-
Object.getPrototypeOf(packageJson) !== Object.prototype ||
|
|
198
|
-
Object.getOwnPropertyDescriptor(packageJson, "name")?.value !==
|
|
199
|
-
"@codyswann/lisa") {
|
|
200
|
-
throw new Error("Invalid Lisa package identity");
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
function requirePlainRecord(value, field) {
|
|
204
|
-
if (value === null || typeof value !== "object") {
|
|
205
|
-
return reject(field, "must be a plain object");
|
|
206
|
-
}
|
|
207
|
-
if (isProxy(value)) {
|
|
208
|
-
return reject(field, "proxies are not allowed");
|
|
209
|
-
}
|
|
210
|
-
const prototype = Object.getPrototypeOf(value);
|
|
211
|
-
if (Array.isArray(value) || prototype !== Object.prototype) {
|
|
212
|
-
return reject(field, "must be a plain object");
|
|
213
|
-
}
|
|
214
|
-
return value;
|
|
215
|
-
}
|
|
216
|
-
function rejectUnknownFields(record, allowed, field) {
|
|
217
|
-
for (const key of Reflect.ownKeys(record)) {
|
|
218
|
-
if (typeof key !== "string") {
|
|
219
|
-
reject(field, "symbol fields are not allowlisted");
|
|
220
|
-
}
|
|
221
|
-
if (!allowed.includes(key)) {
|
|
222
|
-
reject(key, "is not allowlisted");
|
|
223
|
-
}
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
function rejectAccessors(record, field) {
|
|
227
|
-
for (const key of Object.keys(Object.getOwnPropertyDescriptors(record))) {
|
|
228
|
-
const descriptor = Object.getOwnPropertyDescriptor(record, key);
|
|
229
|
-
if (descriptor !== undefined && !("value" in descriptor)) {
|
|
230
|
-
reject(key || field, "accessors are not allowed");
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
function readValue(record, field) {
|
|
235
|
-
const descriptor = Object.getOwnPropertyDescriptor(record, field);
|
|
236
|
-
if (descriptor === undefined) {
|
|
237
|
-
return reject(field, "is required");
|
|
238
|
-
}
|
|
239
|
-
if (!("value" in descriptor)) {
|
|
240
|
-
return reject(field, "accessors are not allowed");
|
|
241
|
-
}
|
|
242
|
-
return descriptor.value;
|
|
243
|
-
}
|
|
244
|
-
function readOptionalValue(record, field) {
|
|
245
|
-
const descriptor = Object.getOwnPropertyDescriptor(record, field);
|
|
246
|
-
if (descriptor === undefined) {
|
|
247
|
-
return undefined;
|
|
248
|
-
}
|
|
249
|
-
if (!("value" in descriptor)) {
|
|
250
|
-
return reject(field, "accessors are not allowed");
|
|
251
|
-
}
|
|
252
|
-
return descriptor.value;
|
|
253
|
-
}
|
|
254
|
-
function requireDocumentKind(value) {
|
|
255
|
-
if (value !== "issue" && value !== "occurrence") {
|
|
256
|
-
return reject("documentKind", 'must be "issue" or "occurrence"');
|
|
257
|
-
}
|
|
258
|
-
return value;
|
|
259
|
-
}
|
|
260
|
-
function requireLisaSurface(value) {
|
|
261
|
-
const surface = requireAsciiString(value, "lisaSurface", 200);
|
|
262
|
-
assertDynamicTextSafe(surface, "lisaSurface");
|
|
263
|
-
if (!isSafeSurfacePath(surface) ||
|
|
264
|
-
!Object.hasOwn(UPSTREAM_SURFACE_MANIFEST, surface)) {
|
|
265
|
-
return reject("lisaSurface", "must be an exact public Lisa surface manifest member");
|
|
266
|
-
}
|
|
267
|
-
return surface;
|
|
170
|
+
/**
|
|
171
|
+
* Prove the runtime contract, then admit the event's top-level record.
|
|
172
|
+
* @param input - Untrusted event
|
|
173
|
+
* @returns The allowlisted, accessor-free top-level record
|
|
174
|
+
*/
|
|
175
|
+
function openAttributionRecord(input) {
|
|
176
|
+
assertRuntimeContract();
|
|
177
|
+
return requireAllowlistedRecord(input, TOP_LEVEL_FIELDS, "input");
|
|
268
178
|
}
|
|
179
|
+
/**
|
|
180
|
+
* Require a member of the closed failure taxonomy.
|
|
181
|
+
* @param value - Untrusted `failureClass`
|
|
182
|
+
* @returns The validated failure class
|
|
183
|
+
*/
|
|
269
184
|
function requireFailureClass(value) {
|
|
270
185
|
const failureClass = requireAsciiString(value, "failureClass", 120);
|
|
271
186
|
assertDynamicTextSafe(failureClass, "failureClass");
|
|
@@ -274,74 +189,11 @@ function requireFailureClass(value) {
|
|
|
274
189
|
}
|
|
275
190
|
return failureClass;
|
|
276
191
|
}
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
rejectUnknownFields(record, EXCERPT_FIELDS, field);
|
|
283
|
-
rejectAccessors(record, field);
|
|
284
|
-
const file = requireManifestPath(readValue(record, "file"));
|
|
285
|
-
const text = requireExcerptText(readValue(record, "text"));
|
|
286
|
-
verifyExcerpt(file, text);
|
|
287
|
-
return { file, text };
|
|
288
|
-
});
|
|
289
|
-
}
|
|
290
|
-
function requireManifestPath(value) {
|
|
291
|
-
const member = requireAsciiString(value, "lisaOwnedExcerpts", 500);
|
|
292
|
-
assertDynamicTextSafe(member, "lisaOwnedExcerpts");
|
|
293
|
-
if (!isSafePackagePath(member) ||
|
|
294
|
-
!Object.hasOwn(UPSTREAM_EVIDENCE_MANIFEST, member)) {
|
|
295
|
-
return reject("lisaOwnedExcerpts", "file must be an exact public Lisa evidence manifest member");
|
|
296
|
-
}
|
|
297
|
-
return member;
|
|
298
|
-
}
|
|
299
|
-
function requireExcerptText(value) {
|
|
300
|
-
if (typeof value !== "string" || value.length === 0) {
|
|
301
|
-
return reject("lisaOwnedExcerpts", "text must be a non-empty string");
|
|
302
|
-
}
|
|
303
|
-
const bytes = Buffer.byteLength(value, "utf8");
|
|
304
|
-
if (bytes > MAX_EXCERPT_BYTES) {
|
|
305
|
-
return reject("lisaOwnedExcerpts", "text exceeds the per-excerpt byte limit");
|
|
306
|
-
}
|
|
307
|
-
if (Buffer.from(value, "utf8").toString("utf8") !== value) {
|
|
308
|
-
return reject("lisaOwnedExcerpts", "text must be valid UTF-8");
|
|
309
|
-
}
|
|
310
|
-
assertTextControlsSafe(value, "lisaOwnedExcerpts");
|
|
311
|
-
assertDynamicTextSafe(value, "lisaOwnedExcerpts");
|
|
312
|
-
if (value.includes("[lisa-upstream-attribution")) {
|
|
313
|
-
return reject("lisaOwnedExcerpts", "text must not contain a reserved upstream attribution marker");
|
|
314
|
-
}
|
|
315
|
-
return value;
|
|
316
|
-
}
|
|
317
|
-
function verifyExcerpt(file, excerpt) {
|
|
318
|
-
const absolutePath = path.join(PACKAGE_ROOT, file);
|
|
319
|
-
if (realpathOrReject(absolutePath) !== absolutePath) {
|
|
320
|
-
reject("lisaOwnedExcerpts", "file must not be a symlink");
|
|
321
|
-
}
|
|
322
|
-
const bytes = readBoundedRegularFile(absolutePath, MAX_SOURCE_BYTES, "lisaOwnedExcerpts");
|
|
323
|
-
const expectedHash = UPSTREAM_EVIDENCE_MANIFEST[file];
|
|
324
|
-
const actualHash = createHash("sha256").update(bytes).digest("hex");
|
|
325
|
-
if (expectedHash === undefined || actualHash !== expectedHash) {
|
|
326
|
-
reject("lisaOwnedExcerpts", "file failed its manifest hash check");
|
|
327
|
-
}
|
|
328
|
-
const contents = decodeUtf8(bytes, "lisaOwnedExcerpts");
|
|
329
|
-
assertTextControlsSafe(contents, "lisaOwnedExcerpts");
|
|
330
|
-
if (!contents.includes(excerpt)) {
|
|
331
|
-
reject("lisaOwnedExcerpts", "text is not present verbatim in its Lisa file");
|
|
332
|
-
}
|
|
333
|
-
}
|
|
334
|
-
function requireCommitRefs(value) {
|
|
335
|
-
return requireDenseArray(value, "upstreamCommitRefs", false).map(entry => {
|
|
336
|
-
const sha = requireAsciiString(entry, "upstreamCommitRefs", 40);
|
|
337
|
-
assertDynamicTextSafe(sha, "upstreamCommitRefs");
|
|
338
|
-
if (!SHA_PATTERN.test(sha) ||
|
|
339
|
-
!Object.hasOwn(UPSTREAM_PUBLIC_COMMITS, sha)) {
|
|
340
|
-
return reject("upstreamCommitRefs", "must contain full SHAs reachable from public origin refs");
|
|
341
|
-
}
|
|
342
|
-
return sha;
|
|
343
|
-
});
|
|
344
|
-
}
|
|
192
|
+
/**
|
|
193
|
+
* Require members of the fixed redaction vocabulary.
|
|
194
|
+
* @param value - Untrusted `redactedPlaceholders`
|
|
195
|
+
* @returns The validated placeholders
|
|
196
|
+
*/
|
|
345
197
|
function requirePlaceholders(value) {
|
|
346
198
|
return requireDenseArray(value, "redactedPlaceholders", false).map(entry => {
|
|
347
199
|
const placeholder = requireAsciiString(entry, "redactedPlaceholders", 64);
|
|
@@ -352,179 +204,15 @@ function requirePlaceholders(value) {
|
|
|
352
204
|
return placeholder;
|
|
353
205
|
});
|
|
354
206
|
}
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
return reject(field, "proxies are not allowed");
|
|
361
|
-
}
|
|
362
|
-
if (!Array.isArray(value) ||
|
|
363
|
-
Object.getPrototypeOf(value) !== Array.prototype) {
|
|
364
|
-
return reject(field, "must be a plain array");
|
|
365
|
-
}
|
|
366
|
-
const length = requireArrayLength(value, field, allowEmpty);
|
|
367
|
-
assertArrayProperties(value, length, field);
|
|
368
|
-
return Array.from({ length }, (_unused, index) => {
|
|
369
|
-
const descriptor = Object.getOwnPropertyDescriptor(value, String(index));
|
|
370
|
-
if (descriptor === undefined || !("value" in descriptor)) {
|
|
371
|
-
return reject(field, "must be dense and accessor-free");
|
|
372
|
-
}
|
|
373
|
-
return descriptor.value;
|
|
374
|
-
});
|
|
375
|
-
}
|
|
376
|
-
function requireArrayLength(value, field, allowEmpty) {
|
|
377
|
-
const length = Object.getOwnPropertyDescriptor(value, "length")
|
|
378
|
-
?.value;
|
|
379
|
-
if (typeof length !== "number" ||
|
|
380
|
-
!Number.isSafeInteger(length) ||
|
|
381
|
-
length > MAX_LIST_ITEMS ||
|
|
382
|
-
(!allowEmpty && length === 0)) {
|
|
383
|
-
return reject(field, `must contain 1-${MAX_LIST_ITEMS} items`);
|
|
384
|
-
}
|
|
385
|
-
return length;
|
|
386
|
-
}
|
|
387
|
-
function assertArrayProperties(value, length, field) {
|
|
388
|
-
const allowedIndices = new Set(Array.from({ length }, (_unused, index) => String(index)));
|
|
389
|
-
for (const key of Reflect.ownKeys(value)) {
|
|
390
|
-
if (typeof key !== "string" ||
|
|
391
|
-
(key !== "length" && !allowedIndices.has(key))) {
|
|
392
|
-
reject(field, "must not contain non-index properties");
|
|
393
|
-
}
|
|
394
|
-
const descriptor = Object.getOwnPropertyDescriptor(value, key);
|
|
395
|
-
if (descriptor === undefined || !("value" in descriptor)) {
|
|
396
|
-
reject(field, "must be dense and accessor-free");
|
|
397
|
-
}
|
|
398
|
-
}
|
|
399
|
-
}
|
|
400
|
-
function requireFingerprintPairing(value, documentKind) {
|
|
401
|
-
if (documentKind === "issue") {
|
|
402
|
-
return value === undefined
|
|
403
|
-
? undefined
|
|
404
|
-
: reject("occurrenceFingerprint", "is valid only for occurrence events");
|
|
405
|
-
}
|
|
406
|
-
const fingerprint = requireAsciiString(value, "occurrenceFingerprint", 17);
|
|
407
|
-
assertDynamicTextSafe(fingerprint, "occurrenceFingerprint");
|
|
408
|
-
if (!FINGERPRINT_PATTERN.test(fingerprint)) {
|
|
409
|
-
return reject("occurrenceFingerprint", "must be sll4- plus exactly 12 lowercase hex characters");
|
|
410
|
-
}
|
|
411
|
-
return `sll4-${createHash("sha256")
|
|
412
|
-
.update(fingerprint, "utf8")
|
|
413
|
-
.digest("hex")
|
|
414
|
-
.slice(0, 12)}`;
|
|
415
|
-
}
|
|
416
|
-
function requireAsciiString(value, field, maxLength) {
|
|
417
|
-
if (typeof value !== "string" ||
|
|
418
|
-
value.length === 0 ||
|
|
419
|
-
value.length > maxLength ||
|
|
420
|
-
value.trim() !== value ||
|
|
421
|
-
!Array.from(value).every(character => {
|
|
422
|
-
const code = character.charCodeAt(0);
|
|
423
|
-
return code >= 0x20 && code <= 0x7e;
|
|
424
|
-
})) {
|
|
425
|
-
return reject(field, "must be bounded printable ASCII text");
|
|
426
|
-
}
|
|
427
|
-
return value;
|
|
428
|
-
}
|
|
429
|
-
function isSafePackagePath(value) {
|
|
430
|
-
return (PACKAGE_PATH_PATTERN.test(value) &&
|
|
431
|
-
!value.includes("//") &&
|
|
432
|
-
value.split("/").every(segment => segment !== "." && segment !== ".."));
|
|
433
|
-
}
|
|
434
|
-
function isSafeSurfacePath(value) {
|
|
435
|
-
return (SURFACE_PATH_PATTERN.test(value) &&
|
|
436
|
-
value.split("/").every(segment => segment !== "." && segment !== ".."));
|
|
437
|
-
}
|
|
438
|
-
function realpathOrReject(filePath) {
|
|
439
|
-
try {
|
|
440
|
-
return realpathSync(filePath);
|
|
441
|
-
}
|
|
442
|
-
catch {
|
|
443
|
-
return reject("lisaOwnedExcerpts", "file does not exist in this Lisa package");
|
|
444
|
-
}
|
|
445
|
-
}
|
|
446
|
-
function readBoundedRegularFile(filePath, maxBytes, field) {
|
|
447
|
-
const noFollow = constants.O_NOFOLLOW ?? 0;
|
|
448
|
-
let descriptor;
|
|
449
|
-
try {
|
|
450
|
-
descriptor = openSync(filePath, constants.O_RDONLY | constants.O_NONBLOCK | noFollow);
|
|
451
|
-
}
|
|
452
|
-
catch {
|
|
453
|
-
return reject(field, "must be a readable non-symlink file");
|
|
454
|
-
}
|
|
455
|
-
try {
|
|
456
|
-
const before = fstatSync(descriptor);
|
|
457
|
-
if (!before.isFile()) {
|
|
458
|
-
return reject(field, "must be a regular file");
|
|
459
|
-
}
|
|
460
|
-
if (before.size > maxBytes) {
|
|
461
|
-
return reject(field, "exceeds its source byte limit");
|
|
462
|
-
}
|
|
463
|
-
const bytes = Buffer.alloc(before.size);
|
|
464
|
-
const count = readFixedBytes(descriptor, bytes, 0);
|
|
465
|
-
const after = fstatSync(descriptor);
|
|
466
|
-
if (after.size !== before.size || count !== before.size) {
|
|
467
|
-
return reject(field, "changed while being read");
|
|
468
|
-
}
|
|
469
|
-
return bytes;
|
|
470
|
-
}
|
|
471
|
-
finally {
|
|
472
|
-
closeSync(descriptor);
|
|
473
|
-
}
|
|
474
|
-
}
|
|
475
|
-
function readFixedBytes(descriptor, buffer, offset) {
|
|
476
|
-
if (offset >= buffer.length) {
|
|
477
|
-
return offset;
|
|
478
|
-
}
|
|
479
|
-
const count = readSync(descriptor, buffer, offset, buffer.length - offset, offset);
|
|
480
|
-
return count === 0
|
|
481
|
-
? offset
|
|
482
|
-
: readFixedBytes(descriptor, buffer, offset + count);
|
|
483
|
-
}
|
|
484
|
-
function decodeUtf8(bytes, field) {
|
|
485
|
-
const decoded = bytes.toString("utf8");
|
|
486
|
-
if (!Buffer.from(decoded, "utf8").equals(bytes)) {
|
|
487
|
-
return reject(field, "must be valid UTF-8 text");
|
|
488
|
-
}
|
|
489
|
-
return decoded;
|
|
490
|
-
}
|
|
491
|
-
function assertTextControlsSafe(value, field) {
|
|
492
|
-
const unsafe = Array.from(value).some(character => {
|
|
493
|
-
const code = character.codePointAt(0) ?? 0;
|
|
494
|
-
const c0 = code < 0x20 && code !== 0x09 && code !== 0x0a && code !== 0x0d;
|
|
495
|
-
const c1 = code >= 0x7f && code <= 0x9f;
|
|
496
|
-
const bidi = code === 0x061c ||
|
|
497
|
-
code === 0x200e ||
|
|
498
|
-
code === 0x200f ||
|
|
499
|
-
(code >= 0x202a && code <= 0x202e) ||
|
|
500
|
-
(code >= 0x2066 && code <= 0x2069);
|
|
501
|
-
return c0 || c1 || bidi;
|
|
502
|
-
});
|
|
503
|
-
if (unsafe) {
|
|
504
|
-
reject(field, "must not contain control or bidirectional override characters");
|
|
505
|
-
}
|
|
506
|
-
}
|
|
207
|
+
/**
|
|
208
|
+
* Indent text four spaces so Markdown renders it as a code block.
|
|
209
|
+
* @param value - Excerpt text
|
|
210
|
+
* @returns The indented text
|
|
211
|
+
*/
|
|
507
212
|
function indentAsCode(value) {
|
|
508
213
|
return value
|
|
509
214
|
.split("\n")
|
|
510
215
|
.map(line => ` ${line}`)
|
|
511
216
|
.join("\n");
|
|
512
217
|
}
|
|
513
|
-
function assertPublicTextSafe(value) {
|
|
514
|
-
if (Buffer.byteLength(value, "utf8") > MAX_PUBLIC_BODY_BYTES) {
|
|
515
|
-
reject("input", "projected document exceeds the public byte limit");
|
|
516
|
-
}
|
|
517
|
-
if (PUBLIC_BODY_DENY_LIST.some(pattern => pattern.test(value))) {
|
|
518
|
-
reject("input", "projected document contains a denied secret or PII shape");
|
|
519
|
-
}
|
|
520
|
-
}
|
|
521
|
-
function assertDynamicTextSafe(value, field) {
|
|
522
|
-
if (PUBLIC_BODY_DENY_LIST.some(pattern => pattern.test(value))) {
|
|
523
|
-
reject(field, "contains a denied secret or PII shape");
|
|
524
|
-
}
|
|
525
|
-
}
|
|
526
|
-
function reject(field, detail) {
|
|
527
|
-
throw new UpstreamAttributionRejection(field, detail);
|
|
528
|
-
}
|
|
529
|
-
/* eslint-enable max-lines, jsdoc/require-jsdoc, jsdoc/require-param-description, jsdoc/require-returns, functional/no-let, sonarjs/no-duplicate-string, code-organization/enforce-statement-order -- end cohesive security boundary */
|
|
530
218
|
//# sourceMappingURL=upstream-attribution-body.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"upstream-attribution-body.js","sourceRoot":"","sources":["../../src/core/upstream-attribution-body.ts"],"names":[],"mappings":"AAAA,yQAAyQ;AACzQ,yEAAyE;AACzE,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EACL,SAAS,EACT,SAAS,EACT,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,YAAY,GACb,MAAM,SAAS,CAAC;AACjB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC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AC;IAC9E,CAAC;AACH,CAAC;AAED,SAAS,qBAAqB,CAAC,KAAa,EAAE,KAAa;IACzD,IAAI,qBAAqB,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC;QAC/D,MAAM,CAAC,KAAK,EAAE,uCAAuC,CAAC,CAAC;IACzD,CAAC;AACH,CAAC;AAED,SAAS,MAAM,CAAC,KAAa,EAAE,MAAc;IAC3C,MAAM,IAAI,4BAA4B,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;AACxD,CAAC;AACD,uOAAuO"}
|
|
1
|
+
{"version":3,"file":"upstream-attribution-body.js","sourceRoot":"","sources":["../../src/core/upstream-attribution-body.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EACL,qBAAqB,EACrB,oBAAoB,EACpB,iBAAiB,EACjB,SAAS,EACT,MAAM,EACN,wBAAwB,EACxB,kBAAkB,EAClB,iBAAiB,GAClB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AACxE,OAAO,EAGL,iBAAiB,EACjB,mBAAmB,EACnB,eAAe,EACf,yBAAyB,EACzB,kBAAkB,GACnB,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EAAE,4BAA4B,EAAE,MAAM,kCAAkC,CAAC;AAGhF,MAAM,gBAAgB,GAAG,MAAM,CAAC,MAAM,CAAC;IACrC,cAAc;IACd,aAAa;IACb,cAAc;IACd,mBAAmB;IACnB,oBAAoB;IACpB,sBAAsB;IACtB,uBAAuB;CACf,CAAC,CAAC;AAEZ,2EAA2E;AAC3E,MAAM,CAAC,MAAM,wBAAwB,GAAG,MAAM,CAAC,MAAM,CAAC;IACpD,wBAAwB;IACxB,yBAAyB;IACzB,0BAA0B;IAC1B,wBAAwB;IACxB,uBAAuB;IACvB,+BAA+B;IAC/B,yBAAyB;IACzB,mBAAmB;IACnB,u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c,CAAC,CAAC;IACpD,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,YAAY,CAAC,EAAE,CAAC;QACzC,OAAO,MAAM,CAAC,cAAc,EAAE,uCAAuC,CAAC,CAAC;IACzE,CAAC;IACD,OAAO,YAAoC,CAAC;AAC9C,CAAC;AAED;;;;GAIG;AACH,SAAS,mBAAmB,CAC1B,KAAc;IAEd,OAAO,iBAAiB,CAAC,KAAK,EAAE,sBAAsB,EAAE,KAAK,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE;QACzE,MAAM,WAAW,GAAG,kBAAkB,CAAC,KAAK,EAAE,sBAAsB,EAAE,EAAE,CAAC,CAAC;QAC1E,qBAAqB,CAAC,WAAW,EAAE,sBAAsB,CAAC,CAAC;QAC3D,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,WAAW,CAAC,EAAE,CAAC;YACtC,OAAO,MAAM,CAAC,sBAAsB,EAAE,gCAAgC,CAAC,CAAC;QAC1E,CAAC;QACD,OAAO,WAA0C,CAAC;IACpD,CAAC,CAAC,CAAC;AACL,CAAC;AAED;;;;GAIG;AACH,SAAS,YAAY,CAAC,KAAa;IACjC,OAAO,KAAK;SACT,KAAK,CAAC,IAAI,CAAC;SACX,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,IAAI,EAAE,CAAC;SAC1B,IAAI,CAAC,IAAI,CAAC,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/** One excerpt that must exist verbatim in a hash-pinned Lisa package file. */
|
|
2
|
+
export interface UpstreamAttributionExcerpt {
|
|
3
|
+
readonly file: string;
|
|
4
|
+
readonly text: string;
|
|
5
|
+
}
|
|
6
|
+
/** The two document kinds a filing can project to. */
|
|
7
|
+
export type UpstreamDocumentKind = "issue" | "occurrence";
|
|
8
|
+
/**
|
|
9
|
+
* Require the closed document kind.
|
|
10
|
+
* @param value - Untrusted `documentKind`
|
|
11
|
+
* @returns `issue` or `occurrence`
|
|
12
|
+
*/
|
|
13
|
+
export declare function requireDocumentKind(value: unknown): UpstreamDocumentKind;
|
|
14
|
+
/**
|
|
15
|
+
* Require an exact member of the public Lisa surface manifest.
|
|
16
|
+
* @param value - Untrusted `lisaSurface`
|
|
17
|
+
* @returns The validated surface path
|
|
18
|
+
*/
|
|
19
|
+
export declare function requireLisaSurface(value: unknown): string;
|
|
20
|
+
/**
|
|
21
|
+
* Require verified excerpts whose combined size stays within the public bound.
|
|
22
|
+
* @param value - Untrusted `lisaOwnedExcerpts`
|
|
23
|
+
* @returns The verified excerpts
|
|
24
|
+
*/
|
|
25
|
+
export declare function requireExcerpts(value: unknown): readonly UpstreamAttributionExcerpt[];
|
|
26
|
+
/**
|
|
27
|
+
* Require full SHAs reachable from public origin refs.
|
|
28
|
+
* @param value - Untrusted `upstreamCommitRefs`
|
|
29
|
+
* @returns The validated commit SHAs
|
|
30
|
+
*/
|
|
31
|
+
export declare function requireCommitRefs(value: unknown): readonly string[];
|
|
32
|
+
/**
|
|
33
|
+
* Require a fingerprint exactly when the document is an occurrence, and
|
|
34
|
+
* re-hash it so the public comment never echoes the caller's value.
|
|
35
|
+
* @param value - Untrusted `occurrenceFingerprint`
|
|
36
|
+
* @param documentKind - Validated document kind
|
|
37
|
+
* @returns The derived public fingerprint, or undefined for an issue
|
|
38
|
+
*/
|
|
39
|
+
export declare function requireFingerprintPairing(value: unknown, documentKind: UpstreamDocumentKind): string | undefined;
|
|
40
|
+
//# sourceMappingURL=upstream-attribution-fields.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"upstream-attribution-fields.d.ts","sourceRoot":"","sources":["../../src/core/upstream-attribution-fields.ts"],"names":[],"mappings":"AAmCA,+EAA+E;AAC/E,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED,sDAAsD;AACtD,MAAM,MAAM,oBAAoB,GAAG,OAAO,GAAG,YAAY,CAAC;AAE1D;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,GAAG,oBAAoB,CAKxE;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAazD;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAC7B,KAAK,EAAE,OAAO,GACb,SAAS,0BAA0B,EAAE,CAYvC;AAkED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,SAAS,MAAM,EAAE,CAenE;AAED;;;;;;GAMG;AACH,wBAAgB,yBAAyB,CACvC,KAAK,EAAE,OAAO,EACd,YAAY,EAAE,oBAAoB,GACjC,MAAM,GAAG,SAAS,CAkBpB"}
|