@codyswann/lisa 4.107.1 → 4.107.3
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/lisa-plugin-registration-notice.mjs +190 -0
- package/all/copy-overwrite/scripts/lisa-postinstall.mjs +6 -2
- package/all/merge/.claude/settings.json +9 -0
- package/dist/cli/{ui-ci-quality-jobs-parse.d.ts → ci-workflow-inputs.d.ts} +7 -2
- package/dist/cli/ci-workflow-inputs.d.ts.map +1 -0
- package/dist/cli/{ui-ci-quality-jobs-parse.js → ci-workflow-inputs.js} +2 -2
- package/dist/cli/ci-workflow-inputs.js.map +1 -0
- package/dist/cli/{ui-confined-project-read.d.ts → confined-project-read.d.ts} +1 -1
- package/dist/cli/confined-project-read.d.ts.map +1 -0
- package/dist/cli/{ui-confined-project-read.js → confined-project-read.js} +2 -2
- package/dist/cli/confined-project-read.js.map +1 -0
- package/dist/cli/detected-stacks.d.ts +10 -0
- package/dist/cli/detected-stacks.d.ts.map +1 -0
- package/dist/cli/{ui-detected-stacks.js → detected-stacks.js} +8 -27
- package/dist/cli/detected-stacks.js.map +1 -0
- package/dist/cli/doctor-apply-freshness.d.ts +2 -2
- package/dist/cli/doctor-apply-freshness.js +2 -2
- package/dist/cli/doctor-coderabbit-labeling.js +1 -1
- package/dist/cli/doctor-coderabbit-labeling.js.map +1 -1
- package/dist/cli/doctor-coderabbit.js +1 -1
- package/dist/cli/doctor-coderabbit.js.map +1 -1
- package/dist/cli/doctor-instruction-files.d.ts +11 -0
- package/dist/cli/doctor-instruction-files.d.ts.map +1 -0
- package/dist/cli/doctor-instruction-files.js +57 -0
- package/dist/cli/doctor-instruction-files.js.map +1 -0
- package/dist/cli/doctor-plugin-registration.d.ts +25 -0
- package/dist/cli/doctor-plugin-registration.d.ts.map +1 -0
- package/dist/cli/doctor-plugin-registration.js +63 -0
- package/dist/cli/doctor-plugin-registration.js.map +1 -0
- package/dist/cli/doctor.d.ts +5 -2
- package/dist/cli/doctor.d.ts.map +1 -1
- package/dist/cli/doctor.js +11 -56
- package/dist/cli/doctor.js.map +1 -1
- package/dist/cli/gate-report-ruleset.js +1 -1
- package/dist/cli/gate-report-ruleset.js.map +1 -1
- package/dist/cli/gate-report-skip-jobs.js +1 -1
- package/dist/cli/gate-report-skip-jobs.js.map +1 -1
- package/dist/cli/gate-report-types.d.ts +2 -3
- package/dist/cli/gate-report-types.d.ts.map +1 -1
- package/dist/cli/gh-cli.d.ts +14 -0
- package/dist/cli/gh-cli.d.ts.map +1 -0
- package/dist/cli/gh-cli.js +32 -0
- package/dist/cli/gh-cli.js.map +1 -0
- package/dist/cli/index.d.ts +0 -3
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +2 -3
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/removed-ui-cmd.d.ts +18 -0
- package/dist/cli/removed-ui-cmd.d.ts.map +1 -0
- package/dist/cli/removed-ui-cmd.js +17 -0
- package/dist/cli/removed-ui-cmd.js.map +1 -0
- package/dist/core/bootstrap-environment.d.ts.map +1 -1
- package/dist/core/bootstrap-environment.js +6 -2
- package/dist/core/bootstrap-environment.js.map +1 -1
- package/dist/core/lisa-owned-hash-ledger.d.ts.map +1 -1
- package/dist/core/lisa-owned-hash-ledger.js +12 -0
- package/dist/core/lisa-owned-hash-ledger.js.map +1 -1
- package/dist/core/nightly-e2e-guard-behavior-certificate.js +2 -2
- package/dist/core/upstream-evidence-manifest.d.ts.map +1 -1
- package/dist/core/upstream-evidence-manifest.js +36 -97
- package/dist/core/upstream-evidence-manifest.js.map +1 -1
- package/dist/devin/enforcement-fallback-installer.d.ts +0 -8
- package/dist/devin/enforcement-fallback-installer.d.ts.map +1 -1
- package/dist/devin/enforcement-fallback-installer.js +0 -26
- package/dist/devin/enforcement-fallback-installer.js.map +1 -1
- package/dist/health/governance-probes.d.ts.map +1 -1
- package/dist/health/governance-probes.js +8 -1
- package/dist/health/governance-probes.js.map +1 -1
- package/dist/health/plugin-inspection.d.ts +6 -1
- package/dist/health/plugin-inspection.d.ts.map +1 -1
- package/dist/health/plugin-inspection.js +10 -3
- package/dist/health/plugin-inspection.js.map +1 -1
- package/dist/health/ruleset-reach-inspection.d.ts.map +1 -1
- package/dist/health/ruleset-reach-inspection.js +2 -7
- package/dist/health/ruleset-reach-inspection.js.map +1 -1
- package/dist/standards/capture.d.ts +1 -1
- package/dist/standards/capture.d.ts.map +1 -1
- package/dist/standards/capture.js +2 -2
- package/dist/standards/capture.js.map +1 -1
- package/dist/standards/readiness.d.ts +9 -2
- package/dist/standards/readiness.d.ts.map +1 -1
- package/dist/standards/readiness.js +12 -3
- package/dist/standards/readiness.js.map +1 -1
- package/dist/sync/json-path.d.ts +0 -10
- package/dist/sync/json-path.d.ts.map +1 -1
- package/dist/sync/json-path.js +0 -14
- package/dist/sync/json-path.js.map +1 -1
- package/dist/sync/sync-population.d.ts +0 -6
- package/dist/sync/sync-population.d.ts.map +1 -1
- package/dist/sync/sync-population.js +0 -8
- package/dist/sync/sync-population.js.map +1 -1
- package/dist/utils/marketplace-manifest.d.ts.map +1 -1
- package/dist/utils/marketplace-manifest.js +2 -3
- package/dist/utils/marketplace-manifest.js.map +1 -1
- package/package.json +4 -5
- 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-generate-claude-remote-build-script/SKILL.md +5 -18
- package/plugins/lisa/.codex-plugin/skills/lisa-setup-automations/SKILL.md +1 -1
- package/plugins/lisa/skills/lisa-generate-claude-remote-build-script/SKILL.md +5 -18
- package/plugins/lisa/skills/lisa-setup-automations/SKILL.md +1 -1
- package/plugins/lisa-agy/plugin.json +1 -1
- package/plugins/lisa-agy/skills/lisa-generate-claude-remote-build-script/SKILL.md +5 -18
- package/plugins/lisa-agy/skills/lisa-setup-automations/SKILL.md +1 -1
- 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/skills/lisa-generate-claude-remote-build-script/SKILL.md +5 -18
- package/plugins/lisa-copilot/skills/lisa-setup-automations/SKILL.md +1 -1
- package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cursor/skills/lisa-generate-claude-remote-build-script/SKILL.md +5 -18
- package/plugins/lisa-cursor/skills/lisa-setup-automations/SKILL.md +1 -1
- package/plugins/lisa-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-devin/skills/lisa-generate-claude-remote-build-script/SKILL.md +5 -18
- package/plugins/lisa-devin/skills/lisa-setup-automations/SKILL.md +1 -1
- package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-agy/plugin.json +1 -1
- package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
- 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-harper-fabric/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +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-cursor/.claude-plugin/plugin.json +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-nestjs/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-agy/plugin.json +1 -1
- package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
- 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-openclaw/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw-agy/plugin.json +1 -1
- package/plugins/lisa-openclaw-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw-devin/.devin-plugin/plugin.json +1 -1
- 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-agy/plugin.json +1 -1
- package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
- 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-typescript/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-agy/plugin.json +1 -1
- package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
- 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-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/skills/lisa-generate-claude-remote-build-script/SKILL.md +5 -18
- package/plugins/src/base/skills/lisa-setup-automations/SKILL.md +1 -1
- package/scripts/check-derived-artifacts.mjs +0 -1
- package/scripts/generate-upstream-evidence-manifest.mjs +0 -1
- package/scripts/install-claude-plugins.sh +4 -1
- package/scripts/lisa-ruleset-reach.mjs +0 -3
- package/scripts/two-channel-couplings.json +1 -1
- package/typescript/copy-overwrite/.prettierignore +1 -0
- package/dist/cli/gate-report-drift-section.d.ts +0 -8
- package/dist/cli/gate-report-drift-section.d.ts.map +0 -1
- package/dist/cli/gate-report-drift-section.js +0 -76
- package/dist/cli/gate-report-drift-section.js.map +0 -1
- package/dist/cli/gate-report-fragment.d.ts +0 -11
- package/dist/cli/gate-report-fragment.d.ts.map +0 -1
- package/dist/cli/gate-report-fragment.js +0 -106
- package/dist/cli/gate-report-fragment.js.map +0 -1
- package/dist/cli/gate-report-html.d.ts +0 -47
- package/dist/cli/gate-report-html.d.ts.map +0 -1
- package/dist/cli/gate-report-html.js +0 -49
- package/dist/cli/gate-report-html.js.map +0 -1
- package/dist/cli/gate-report-preview.d.ts +0 -9
- package/dist/cli/gate-report-preview.d.ts.map +0 -1
- package/dist/cli/gate-report-preview.js +0 -55
- package/dist/cli/gate-report-preview.js.map +0 -1
- package/dist/cli/gate-report-rows.d.ts +0 -39
- package/dist/cli/gate-report-rows.d.ts.map +0 -1
- package/dist/cli/gate-report-rows.js +0 -227
- package/dist/cli/gate-report-rows.js.map +0 -1
- package/dist/cli/gate-report-sections.d.ts +0 -38
- package/dist/cli/gate-report-sections.d.ts.map +0 -1
- package/dist/cli/gate-report-sections.js +0 -225
- package/dist/cli/gate-report-sections.js.map +0 -1
- package/dist/cli/gate-report-style.d.ts +0 -19
- package/dist/cli/gate-report-style.d.ts.map +0 -1
- package/dist/cli/gate-report-style.js +0 -100
- package/dist/cli/gate-report-style.js.map +0 -1
- package/dist/cli/remote-environment-catalog.d.ts +0 -17
- package/dist/cli/remote-environment-catalog.d.ts.map +0 -1
- package/dist/cli/remote-environment-catalog.js +0 -175
- package/dist/cli/remote-environment-catalog.js.map +0 -1
- package/dist/cli/remote-environment-contract.d.ts +0 -94
- package/dist/cli/remote-environment-contract.d.ts.map +0 -1
- package/dist/cli/remote-environment-contract.js +0 -59
- package/dist/cli/remote-environment-contract.js.map +0 -1
- package/dist/cli/remote-environment-detection.d.ts +0 -23
- package/dist/cli/remote-environment-detection.d.ts.map +0 -1
- package/dist/cli/remote-environment-detection.js +0 -120
- package/dist/cli/remote-environment-detection.js.map +0 -1
- package/dist/cli/remote-environment.d.ts +0 -12
- package/dist/cli/remote-environment.d.ts.map +0 -1
- package/dist/cli/remote-environment.js +0 -73
- package/dist/cli/remote-environment.js.map +0 -1
- package/dist/cli/ui-automations-adapters.d.ts +0 -72
- package/dist/cli/ui-automations-adapters.d.ts.map +0 -1
- package/dist/cli/ui-automations-adapters.js +0 -174
- package/dist/cli/ui-automations-adapters.js.map +0 -1
- package/dist/cli/ui-automations.d.ts +0 -90
- package/dist/cli/ui-automations.d.ts.map +0 -1
- package/dist/cli/ui-automations.js +0 -149
- package/dist/cli/ui-automations.js.map +0 -1
- package/dist/cli/ui-ci-quality-jobs-compute.d.ts +0 -44
- package/dist/cli/ui-ci-quality-jobs-compute.d.ts.map +0 -1
- package/dist/cli/ui-ci-quality-jobs-compute.js +0 -278
- package/dist/cli/ui-ci-quality-jobs-compute.js.map +0 -1
- package/dist/cli/ui-ci-quality-jobs-parse.d.ts.map +0 -1
- package/dist/cli/ui-ci-quality-jobs-parse.js.map +0 -1
- package/dist/cli/ui-ci-quality-jobs.d.ts +0 -22
- package/dist/cli/ui-ci-quality-jobs.d.ts.map +0 -1
- package/dist/cli/ui-ci-quality-jobs.js +0 -160
- package/dist/cli/ui-ci-quality-jobs.js.map +0 -1
- package/dist/cli/ui-cmd.d.ts +0 -87
- package/dist/cli/ui-cmd.d.ts.map +0 -1
- package/dist/cli/ui-cmd.js +0 -383
- package/dist/cli/ui-cmd.js.map +0 -1
- package/dist/cli/ui-config-write-document.d.ts +0 -53
- package/dist/cli/ui-config-write-document.d.ts.map +0 -1
- package/dist/cli/ui-config-write-document.js +0 -212
- package/dist/cli/ui-config-write-document.js.map +0 -1
- package/dist/cli/ui-config-write-patch-plan.d.ts +0 -30
- package/dist/cli/ui-config-write-patch-plan.d.ts.map +0 -1
- package/dist/cli/ui-config-write-patch-plan.js +0 -151
- package/dist/cli/ui-config-write-patch-plan.js.map +0 -1
- package/dist/cli/ui-config-write-persistence.d.ts +0 -29
- package/dist/cli/ui-config-write-persistence.d.ts.map +0 -1
- package/dist/cli/ui-config-write-persistence.js +0 -298
- package/dist/cli/ui-config-write-persistence.js.map +0 -1
- package/dist/cli/ui-config-write-property-edits.d.ts +0 -40
- package/dist/cli/ui-config-write-property-edits.d.ts.map +0 -1
- package/dist/cli/ui-config-write-property-edits.js +0 -250
- package/dist/cli/ui-config-write-property-edits.js.map +0 -1
- package/dist/cli/ui-config-write-provenance.d.ts +0 -12
- package/dist/cli/ui-config-write-provenance.d.ts.map +0 -1
- package/dist/cli/ui-config-write-provenance.js +0 -29
- package/dist/cli/ui-config-write-provenance.js.map +0 -1
- package/dist/cli/ui-config-write-root-identity.d.ts +0 -25
- package/dist/cli/ui-config-write-root-identity.d.ts.map +0 -1
- package/dist/cli/ui-config-write-root-identity.js +0 -66
- package/dist/cli/ui-config-write-root-identity.js.map +0 -1
- package/dist/cli/ui-config-write.d.ts +0 -13
- package/dist/cli/ui-config-write.d.ts.map +0 -1
- package/dist/cli/ui-config-write.js +0 -341
- package/dist/cli/ui-config-write.js.map +0 -1
- package/dist/cli/ui-confined-project-read.d.ts.map +0 -1
- package/dist/cli/ui-confined-project-read.js.map +0 -1
- package/dist/cli/ui-deploy-pipeline-model.d.ts +0 -74
- package/dist/cli/ui-deploy-pipeline-model.d.ts.map +0 -1
- package/dist/cli/ui-deploy-pipeline-model.js +0 -127
- package/dist/cli/ui-deploy-pipeline-model.js.map +0 -1
- package/dist/cli/ui-deploy-pipeline.d.ts +0 -25
- package/dist/cli/ui-deploy-pipeline.d.ts.map +0 -1
- package/dist/cli/ui-deploy-pipeline.js +0 -181
- package/dist/cli/ui-deploy-pipeline.js.map +0 -1
- package/dist/cli/ui-detected-stacks.d.ts +0 -21
- package/dist/cli/ui-detected-stacks.d.ts.map +0 -1
- package/dist/cli/ui-detected-stacks.js.map +0 -1
- package/dist/cli/ui-enabled-plugins.d.ts +0 -52
- package/dist/cli/ui-enabled-plugins.d.ts.map +0 -1
- package/dist/cli/ui-enabled-plugins.js +0 -229
- package/dist/cli/ui-enabled-plugins.js.map +0 -1
- package/dist/cli/ui-gate-report.d.ts +0 -57
- package/dist/cli/ui-gate-report.d.ts.map +0 -1
- package/dist/cli/ui-gate-report.js +0 -95
- package/dist/cli/ui-gate-report.js.map +0 -1
- package/dist/cli/ui-github-repo-expected.d.ts +0 -36
- package/dist/cli/ui-github-repo-expected.d.ts.map +0 -1
- package/dist/cli/ui-github-repo-expected.js +0 -118
- package/dist/cli/ui-github-repo-expected.js.map +0 -1
- package/dist/cli/ui-github-repo-gh.d.ts +0 -56
- package/dist/cli/ui-github-repo-gh.d.ts.map +0 -1
- package/dist/cli/ui-github-repo-gh.js +0 -117
- package/dist/cli/ui-github-repo-gh.js.map +0 -1
- package/dist/cli/ui-github-repo-map.d.ts +0 -25
- package/dist/cli/ui-github-repo-map.d.ts.map +0 -1
- package/dist/cli/ui-github-repo-map.js +0 -175
- package/dist/cli/ui-github-repo-map.js.map +0 -1
- package/dist/cli/ui-github-repo.d.ts +0 -51
- package/dist/cli/ui-github-repo.d.ts.map +0 -1
- package/dist/cli/ui-github-repo.js +0 -117
- package/dist/cli/ui-github-repo.js.map +0 -1
- package/dist/cli/ui-health.d.ts +0 -18
- package/dist/cli/ui-health.d.ts.map +0 -1
- package/dist/cli/ui-health.js +0 -101
- package/dist/cli/ui-health.js.map +0 -1
- package/dist/cli/ui-lisa-version.d.ts +0 -36
- package/dist/cli/ui-lisa-version.d.ts.map +0 -1
- package/dist/cli/ui-lisa-version.js +0 -82
- package/dist/cli/ui-lisa-version.js.map +0 -1
- package/dist/cli/ui-observability-checks.d.ts +0 -23
- package/dist/cli/ui-observability-checks.d.ts.map +0 -1
- package/dist/cli/ui-observability-checks.js +0 -156
- package/dist/cli/ui-observability-checks.js.map +0 -1
- package/dist/cli/ui-observability-providers.d.ts +0 -69
- package/dist/cli/ui-observability-providers.d.ts.map +0 -1
- package/dist/cli/ui-observability-providers.js +0 -99
- package/dist/cli/ui-observability-providers.js.map +0 -1
- package/dist/cli/ui-request-origin.d.ts +0 -8
- package/dist/cli/ui-request-origin.d.ts.map +0 -1
- package/dist/cli/ui-request-origin.js +0 -41
- package/dist/cli/ui-request-origin.js.map +0 -1
- package/dist/cli/ui-setup-readiness-config.d.ts +0 -28
- package/dist/cli/ui-setup-readiness-config.d.ts.map +0 -1
- package/dist/cli/ui-setup-readiness-config.js +0 -116
- package/dist/cli/ui-setup-readiness-config.js.map +0 -1
- package/dist/cli/ui-setup-readiness-contract.d.ts +0 -32
- package/dist/cli/ui-setup-readiness-contract.d.ts.map +0 -1
- package/dist/cli/ui-setup-readiness-contract.js +0 -61
- package/dist/cli/ui-setup-readiness-contract.js.map +0 -1
- package/dist/cli/ui-setup-readiness-install.d.ts +0 -24
- package/dist/cli/ui-setup-readiness-install.d.ts.map +0 -1
- package/dist/cli/ui-setup-readiness-install.js +0 -211
- package/dist/cli/ui-setup-readiness-install.js.map +0 -1
- package/dist/cli/ui-setup-readiness-local.d.ts +0 -41
- package/dist/cli/ui-setup-readiness-local.d.ts.map +0 -1
- package/dist/cli/ui-setup-readiness-local.js +0 -237
- package/dist/cli/ui-setup-readiness-local.js.map +0 -1
- package/dist/cli/ui-setup-readiness-remote.d.ts +0 -30
- package/dist/cli/ui-setup-readiness-remote.d.ts.map +0 -1
- package/dist/cli/ui-setup-readiness-remote.js +0 -108
- package/dist/cli/ui-setup-readiness-remote.js.map +0 -1
- package/dist/cli/ui-setup-readiness.d.ts +0 -52
- package/dist/cli/ui-setup-readiness.d.ts.map +0 -1
- package/dist/cli/ui-setup-readiness.js +0 -126
- package/dist/cli/ui-setup-readiness.js.map +0 -1
- package/dist/cli/ui-starter-sync.d.ts +0 -17
- package/dist/cli/ui-starter-sync.d.ts.map +0 -1
- package/dist/cli/ui-starter-sync.js +0 -75
- package/dist/cli/ui-starter-sync.js.map +0 -1
- package/dist/cli/ui-status-json.d.ts +0 -29
- package/dist/cli/ui-status-json.d.ts.map +0 -1
- package/dist/cli/ui-status-json.js +0 -162
- package/dist/cli/ui-status-json.js.map +0 -1
- package/dist/cli/ui-status.d.ts +0 -42
- package/dist/cli/ui-status.d.ts.map +0 -1
- package/dist/cli/ui-status.js +0 -221
- package/dist/cli/ui-status.js.map +0 -1
- package/ui/README.md +0 -443
- package/ui/index.html +0 -14392
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
import { setupFinding, } from "./ui-setup-readiness-contract.js";
|
|
2
|
-
const GITHUB_GOVERNANCE_CHECK = "setup.github-governance";
|
|
3
|
-
const SECRETS_CHECK = "setup.secrets";
|
|
4
|
-
const AUTOMATIONS_CHECK = "setup.automations";
|
|
5
|
-
/**
|
|
6
|
-
* Map bounded GitHub live data to governance readiness.
|
|
7
|
-
* @param health - Current deterministic Health evidence, when available
|
|
8
|
-
* @param github - Live GitHub repository observation
|
|
9
|
-
* @param deployPipeline - Live deployment-pipeline observation
|
|
10
|
-
* @returns GitHub governance readiness finding
|
|
11
|
-
*/
|
|
12
|
-
// eslint-disable-next-line sonarjs/cognitive-complexity -- independent canonical, live-repo, secret, and deployment gates stay visible together
|
|
13
|
-
export function githubGovernanceFinding(health, github, deployPipeline) {
|
|
14
|
-
if (github.state !== "value") {
|
|
15
|
-
return setupFinding(GITHUB_GOVERNANCE_CHECK, "warn", `GitHub governance could not be established (${github.reason}).`);
|
|
16
|
-
}
|
|
17
|
-
const settings = github.value.settings;
|
|
18
|
-
const mergeSettingsReady = settings.allow_merge_commit === false &&
|
|
19
|
-
settings.allow_squash_merge === true &&
|
|
20
|
-
settings.allow_rebase_merge === false &&
|
|
21
|
-
settings.allow_auto_merge === true &&
|
|
22
|
-
settings.allow_update_branch === true &&
|
|
23
|
-
settings.delete_branch_on_merge === true &&
|
|
24
|
-
settings.secret_scanning === true;
|
|
25
|
-
const activeRuleset = github.value.rulesets.some(row => row.active &&
|
|
26
|
-
row.targetsDefaultBranch === true &&
|
|
27
|
-
row.requiresPullRequest === true &&
|
|
28
|
-
row.requiresStatusChecks === true);
|
|
29
|
-
const canonicalRulesetStatus = health?.findings.find(finding => finding.check === "github.rulesets")?.status;
|
|
30
|
-
const deployKey = github.value.secrets.some(secret => secret.name === "DEPLOY_KEY" && secret.set);
|
|
31
|
-
const holds = deployPipeline.state === "value"
|
|
32
|
-
? deployPipeline.value.stages.filter(stage => stage.id.startsWith("hold:"))
|
|
33
|
-
: [];
|
|
34
|
-
const approvalGates = holds.length > 0 && holds.every(stage => stage.active === true);
|
|
35
|
-
const missing = [
|
|
36
|
-
...(mergeSettingsReady ? [] : ["merge and security settings"]),
|
|
37
|
-
...(activeRuleset
|
|
38
|
-
? []
|
|
39
|
-
: [
|
|
40
|
-
"an active default-branch ruleset requiring pull requests and status checks",
|
|
41
|
-
]),
|
|
42
|
-
...(canonicalRulesetStatus === "pass"
|
|
43
|
-
? []
|
|
44
|
-
: ["passing canonical github.rulesets Health evidence"]),
|
|
45
|
-
...(deployKey ? [] : ["the write deploy key"]),
|
|
46
|
-
...(approvalGates ? [] : ["deployment environment approval gates"]),
|
|
47
|
-
];
|
|
48
|
-
return missing.length === 0
|
|
49
|
-
? setupFinding(GITHUB_GOVERNANCE_CHECK, "pass", "GitHub merge/security settings, rulesets, write deploy key, and deployment approval gates were observed.")
|
|
50
|
-
: setupFinding(GITHUB_GOVERNANCE_CHECK, canonicalRulesetStatus === "fail" ? "fail" : "warn", `GitHub governance is incomplete: ${missing.join(" and ")}. Run /lisa:setup:github-repo.`);
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* Map only workflow-referenced secret names to presence readiness.
|
|
54
|
-
* @param github - Live GitHub repository observation
|
|
55
|
-
* @param expectedSecretNames - Secret names referenced by confined workflows
|
|
56
|
-
* @returns Repository-secret presence readiness finding
|
|
57
|
-
*/
|
|
58
|
-
export function secretsFinding(github, expectedSecretNames) {
|
|
59
|
-
if (expectedSecretNames.length === 0) {
|
|
60
|
-
return setupFinding(SECRETS_CHECK, "warn", "No explicit CI secret requirements could be established from current workflow references.");
|
|
61
|
-
}
|
|
62
|
-
if (github.state !== "value") {
|
|
63
|
-
return setupFinding(SECRETS_CHECK, "warn", `Repository secret presence could not be established (${github.reason}); no secret values were read.`);
|
|
64
|
-
}
|
|
65
|
-
const presence = new Map(github.value.secrets.map(secret => [secret.name, secret.set]));
|
|
66
|
-
const missing = expectedSecretNames.filter(name => presence.get(name) !== true);
|
|
67
|
-
return missing.length === 0
|
|
68
|
-
? setupFinding(SECRETS_CHECK, "pass", `${expectedSecretNames.length} workflow-referenced repository secret name${expectedSecretNames.length === 1 ? " is" : "s are"} present; values were not read.`)
|
|
69
|
-
: setupFinding(SECRETS_CHECK, "warn", `Missing workflow-referenced repository secret names: ${missing.join(", ")}. Values were not read.`);
|
|
70
|
-
}
|
|
71
|
-
/**
|
|
72
|
-
* Require the exact six core scheduler entries with observed cadences.
|
|
73
|
-
* @param result - Live harness scheduler observation
|
|
74
|
-
* @param expectedAutomationIds - Applicable authoritative automation IDs
|
|
75
|
-
* @returns Harness automation readiness finding
|
|
76
|
-
*/
|
|
77
|
-
export function automationsFinding(result, expectedAutomationIds) {
|
|
78
|
-
if (expectedAutomationIds === undefined ||
|
|
79
|
-
expectedAutomationIds.length === 0) {
|
|
80
|
-
return setupFinding(AUTOMATIONS_CHECK, "warn", "Applicable automation contracts could not be resolved from project configuration and detected stacks.");
|
|
81
|
-
}
|
|
82
|
-
if (result.state !== "value") {
|
|
83
|
-
return setupFinding(AUTOMATIONS_CHECK, "warn", `Harness scheduler state is unavailable (${result.reason}). Run /lisa:setup-automations.`);
|
|
84
|
-
}
|
|
85
|
-
const entries = result.value.automations.flatMap(value => {
|
|
86
|
-
if (value === null || typeof value !== "object" || Array.isArray(value)) {
|
|
87
|
-
return [];
|
|
88
|
-
}
|
|
89
|
-
const id = Reflect.get(value, "id");
|
|
90
|
-
const cadence = Reflect.get(value, "cadence");
|
|
91
|
-
const status = Reflect.get(value, "status");
|
|
92
|
-
return typeof id === "string" ? [{ id, cadence, status }] : [];
|
|
93
|
-
});
|
|
94
|
-
const missing = expectedAutomationIds.filter(expectedId => {
|
|
95
|
-
return !entries.some(entry => {
|
|
96
|
-
const disabled = typeof entry.status === "string" &&
|
|
97
|
-
["disabled", "inactive", "paused"].includes(entry.status.toLowerCase());
|
|
98
|
-
return (entry.id === expectedId &&
|
|
99
|
-
typeof entry.cadence === "string" &&
|
|
100
|
-
entry.cadence.trim().length > 0 &&
|
|
101
|
-
!disabled);
|
|
102
|
-
});
|
|
103
|
-
});
|
|
104
|
-
return missing.length === 0
|
|
105
|
-
? setupFinding(AUTOMATIONS_CHECK, "pass", `All ${expectedAutomationIds.length} applicable Lisa scheduler entries are present with observed cadences.`)
|
|
106
|
-
: setupFinding(AUTOMATIONS_CHECK, "warn", `Missing, disabled, or cadence-unreadable automation entries: ${missing.join(", ")}. Run /lisa:setup-automations.`);
|
|
107
|
-
}
|
|
108
|
-
//# sourceMappingURL=ui-setup-readiness-remote.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ui-setup-readiness-remote.js","sourceRoot":"","sources":["../../src/cli/ui-setup-readiness-remote.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,YAAY,GAEb,MAAM,kCAAkC,CAAC;AAE1C,MAAM,uBAAuB,GAAG,yBAAyB,CAAC;AAC1D,MAAM,aAAa,GAAG,eAAe,CAAC;AACtC,MAAM,iBAAiB,GAAG,mBAAmB,CAAC;AAE9C;;;;;;GAMG;AACH,gJAAgJ;AAChJ,MAAM,UAAU,uBAAuB,CACrC,MAAgC,EAChC,MAAyC,EACzC,cAAgD;IAEhD,IAAI,MAAM,CAAC,KAAK,KAAK,OAAO,EAAE,CAAC;QAC7B,OAAO,YAAY,CACjB,uBAAuB,EACvB,MAAM,EACN,+CAA+C,MAAM,CAAC,MAAM,IAAI,CACjE,CAAC;IACJ,CAAC;IACD,MAAM,QAAQ,GAAG,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC;IACvC,MAAM,kBAAkB,GACtB,QAAQ,CAAC,kBAAkB,KAAK,KAAK;QACrC,QAAQ,CAAC,kBAAkB,KAAK,IAAI;QACpC,QAAQ,CAAC,kBAAkB,KAAK,KAAK;QACrC,QAAQ,CAAC,gBAAgB,KAAK,IAAI;QAClC,QAAQ,CAAC,mBAAmB,KAAK,IAAI;QACrC,QAAQ,CAAC,sBAAsB,KAAK,IAAI;QACxC,QAAQ,CAAC,eAA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AE,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IACjE,CAAC,CAAC,CAAC;IACH,MAAM,OAAO,GAAG,qBAAqB,CAAC,MAAM,CAAC,UAAU,CAAC,EAAE;QACxD,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE;YAC3B,MAAM,QAAQ,GACZ,OAAO,KAAK,CAAC,MAAM,KAAK,QAAQ;gBAChC,CAAC,UAAU,EAAE,UAAU,EAAE,QAAQ,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC,CAAC;YAC1E,OAAO,CACL,KAAK,CAAC,EAAE,KAAK,UAAU;gBACvB,OAAO,KAAK,CAAC,OAAO,KAAK,QAAQ;gBACjC,KAAK,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC;gBAC/B,CAAC,QAAQ,CACV,CAAC;QACJ,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IACH,OAAO,OAAO,CAAC,MAAM,KAAK,CAAC;QACzB,CAAC,CAAC,YAAY,CACV,iBAAiB,EACjB,MAAM,EACN,OAAO,qBAAqB,CAAC,MAAM,wEAAwE,CAC5G;QACH,CAAC,CAAC,YAAY,CACV,iBAAiB,EACjB,MAAM,EACN,gEAAgE,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,gCAAgC,CACnH,CAAC;AACR,CAAC"}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import type { HealthResult } from "../health/contract.js";
|
|
2
|
-
import type { JsonObject } from "../sync/json-path.js";
|
|
3
|
-
import { type AutomationsProbeValue } from "./ui-automations.js";
|
|
4
|
-
import { type SetupReadinessResult } from "./ui-setup-readiness-contract.js";
|
|
5
|
-
import { type GithubRepoPanelValue } from "./ui-github-repo.js";
|
|
6
|
-
import { type DeployPipelineValue } from "./ui-deploy-pipeline.js";
|
|
7
|
-
import { type ProbeResult } from "./ui-status.js";
|
|
8
|
-
/** Bounded inputs captured for one projection. */
|
|
9
|
-
export interface SetupReadinessObservations {
|
|
10
|
-
readonly config: JsonObject;
|
|
11
|
-
readonly health?: HealthResult;
|
|
12
|
-
readonly github: ProbeResult<GithubRepoPanelValue>;
|
|
13
|
-
readonly deployPipeline: ProbeResult<DeployPipelineValue>;
|
|
14
|
-
readonly automations: ProbeResult<AutomationsProbeValue>;
|
|
15
|
-
readonly expectedAutomationIds?: readonly string[];
|
|
16
|
-
readonly expectedSecretNames: readonly string[];
|
|
17
|
-
readonly observedAt?: Date;
|
|
18
|
-
}
|
|
19
|
-
/** Injectable readers for endpoint and focused integration tests. */
|
|
20
|
-
export interface SetupReadinessDependencies {
|
|
21
|
-
readonly readConfig?: (projectRoot: string) => Promise<JsonObject>;
|
|
22
|
-
readonly readHealth?: (projectRoot: string) => Promise<HealthResult>;
|
|
23
|
-
readonly readGithub?: (projectRoot: string, config: JsonObject) => Promise<ProbeResult<GithubRepoPanelValue>>;
|
|
24
|
-
readonly readDeployPipeline?: (projectRoot: string) => Promise<ProbeResult<DeployPipelineValue>>;
|
|
25
|
-
readonly readAutomations?: (projectRoot: string) => Promise<ProbeResult<AutomationsProbeValue>>;
|
|
26
|
-
readonly readExpectedAutomationIds?: (projectRoot: string, config: JsonObject) => Promise<readonly string[]>;
|
|
27
|
-
readonly readExpectedSecretNames?: (projectRoot: string) => Promise<readonly string[]>;
|
|
28
|
-
readonly now?: () => Date;
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* Read the same committed-plus-local merged config used by the console.
|
|
32
|
-
* @param projectRoot - Project root whose Lisa config should be read.
|
|
33
|
-
* @returns The bounded merged UI configuration.
|
|
34
|
-
*/
|
|
35
|
-
export declare function readMergedUiConfig(projectRoot: string): Promise<JsonObject>;
|
|
36
|
-
/**
|
|
37
|
-
* Produce the exact twelve findings from already captured observations.
|
|
38
|
-
* @param projectRoot - Canonical project root for local evidence checks.
|
|
39
|
-
* @param observations - Bounded observations captured for this projection.
|
|
40
|
-
* @returns The validated twelve-finding readiness result.
|
|
41
|
-
*/
|
|
42
|
-
export declare function projectSetupReadiness(projectRoot: string, observations: SetupReadinessObservations): Promise<SetupReadinessResult>;
|
|
43
|
-
/**
|
|
44
|
-
* Create a safe-to-repeat reader for one localhost UI server.
|
|
45
|
-
* @param projectPath - Project path served by the local UI.
|
|
46
|
-
* @param dependencies - Optional bounded reader overrides for verification.
|
|
47
|
-
* @returns A read-only readiness projection reader.
|
|
48
|
-
*/
|
|
49
|
-
export declare function createSetupReadinessReader(projectPath: string, dependencies?: SetupReadinessDependencies): () => Promise<SetupReadinessResult>;
|
|
50
|
-
export type { SetupReadinessCheck, SetupReadinessFinding, SetupReadinessResult, } from "./ui-setup-readiness-contract.js";
|
|
51
|
-
export { SETUP_READINESS_CHECKS, validateSetupReadinessResult, } from "./ui-setup-readiness-contract.js";
|
|
52
|
-
//# sourceMappingURL=ui-setup-readiness.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ui-setup-readiness.d.ts","sourceRoot":"","sources":["../../src/cli/ui-setup-readiness.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAEL,KAAK,qBAAqB,EAC3B,MAAM,qBAAqB,CAAC;AA0B7B,OAAO,EAEL,KAAK,oBAAoB,EAC1B,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAEL,KAAK,oBAAoB,EAC1B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAEL,KAAK,mBAAmB,EACzB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAY,KAAK,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAI5D,kDAAkD;AAClD,MAAM,WAAW,0BAA0B;IACzC,QAA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B,CAAC,EAAE,CACjC,WAAW,EAAE,MAAM,KAChB,OAAO,CAAC,SAAS,MAAM,EAAE,CAAC,CAAC;IAChC,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,IAAI,CAAC;CAC3B;AAED;;;;GAIG;AACH,wBAAsB,kBAAkB,CACtC,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,UAAU,CAAC,CAErB;AAED;;;;;GAKG;AACH,wBAAsB,qBAAqB,CACzC,WAAW,EAAE,MAAM,EACnB,YAAY,EAAE,0BAA0B,GACvC,OAAO,CAAC,oBAAoB,CAAC,CAuC/B;AAmCD;;;;;GAKG;AACH,wBAAgB,0BAA0B,CACxC,WAAW,EAAE,MAAM,EACnB,YAAY,GAAE,0BAA+B,GAC5C,MAAM,OAAO,CAAC,oBAAoB,CAAC,CA0DrC;AAED,YAAY,EACV,mBAAmB,EACnB,qBAAqB,EACrB,oBAAoB,GACrB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EACL,sBAAsB,EACtB,4BAA4B,GAC7B,MAAM,kCAAkC,CAAC"}
|
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
/** Current read-only Setup checklist readiness projection for `lisa ui`. */
|
|
2
|
-
import { realpath } from "node:fs/promises";
|
|
3
|
-
import * as path from "node:path";
|
|
4
|
-
import { runDeterministicHealth } from "../health/deterministic.js";
|
|
5
|
-
import { createAutomationsProbe, } from "./ui-automations.js";
|
|
6
|
-
import { readOriginRemote, resolveExpectedAutomationEntries, } from "./ui-automations-adapters.js";
|
|
7
|
-
import { readConfinedDetectedStacks } from "./ui-detected-stacks.js";
|
|
8
|
-
import { readConfinedMergedConfig } from "./ui-confined-project-read.js";
|
|
9
|
-
import { explorationFinding, prdSourceFinding, starterProvenanceFinding, trackerFinding, } from "./ui-setup-readiness-config.js";
|
|
10
|
-
import { healthEvidenceFinding, readWorkflowSecretNames, standardsFinding, agentReadyFinding, wikiSetupFinding, } from "./ui-setup-readiness-local.js";
|
|
11
|
-
import { installFinding } from "./ui-setup-readiness-install.js";
|
|
12
|
-
import { automationsFinding, githubGovernanceFinding, secretsFinding, } from "./ui-setup-readiness-remote.js";
|
|
13
|
-
import { validateSetupReadinessResult, } from "./ui-setup-readiness-contract.js";
|
|
14
|
-
import { createGithubRepoProbe, } from "./ui-github-repo.js";
|
|
15
|
-
import { createDeployPipelineProbe, } from "./ui-deploy-pipeline.js";
|
|
16
|
-
import { runProbe } from "./ui-status.js";
|
|
17
|
-
const ORIGIN_REMOTE_TIMEOUT_MS = 2_500;
|
|
18
|
-
/**
|
|
19
|
-
* Read the same committed-plus-local merged config used by the console.
|
|
20
|
-
* @param projectRoot - Project root whose Lisa config should be read.
|
|
21
|
-
* @returns The bounded merged UI configuration.
|
|
22
|
-
*/
|
|
23
|
-
export async function readMergedUiConfig(projectRoot) {
|
|
24
|
-
return await readConfinedMergedConfig(projectRoot);
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* Produce the exact twelve findings from already captured observations.
|
|
28
|
-
* @param projectRoot - Canonical project root for local evidence checks.
|
|
29
|
-
* @param observations - Bounded observations captured for this projection.
|
|
30
|
-
* @returns The validated twelve-finding readiness result.
|
|
31
|
-
*/
|
|
32
|
-
export async function projectSetupReadiness(projectRoot, observations) {
|
|
33
|
-
const [install, agentReady, standards, wiki] = await Promise.all([
|
|
34
|
-
installFinding(projectRoot, observations.config, observations.health),
|
|
35
|
-
agentReadyFinding(projectRoot),
|
|
36
|
-
standardsFinding(projectRoot, observations.health),
|
|
37
|
-
wikiSetupFinding(projectRoot, observations.health),
|
|
38
|
-
]);
|
|
39
|
-
const findings = [
|
|
40
|
-
install,
|
|
41
|
-
healthEvidenceFinding("setup.sync", observations.health, ["config.required", "config.sync"], "Required Lisa config and mirrored artifacts are populated and synchronized.", "fail"),
|
|
42
|
-
agentReady,
|
|
43
|
-
standards,
|
|
44
|
-
trackerFinding(observations.config),
|
|
45
|
-
prdSourceFinding(observations.config),
|
|
46
|
-
githubGovernanceFinding(observations.health, observations.github, observations.deployPipeline),
|
|
47
|
-
secretsFinding(observations.github, observations.expectedSecretNames),
|
|
48
|
-
automationsFinding(observations.automations, observations.expectedAutomationIds),
|
|
49
|
-
explorationFinding(observations.config),
|
|
50
|
-
wiki,
|
|
51
|
-
starterProvenanceFinding(observations.config),
|
|
52
|
-
];
|
|
53
|
-
return validateSetupReadinessResult({
|
|
54
|
-
schemaVersion: 1,
|
|
55
|
-
observedAt: (observations.observedAt ?? new Date()).toISOString(),
|
|
56
|
-
findings,
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
|
-
* Convert a failed bounded read into an explicit unknown probe state.
|
|
61
|
-
* @param reason - Stable machine-readable failure reason.
|
|
62
|
-
* @returns An unknown probe result that cannot be mistaken for success.
|
|
63
|
-
*/
|
|
64
|
-
function unknownProbe(reason) {
|
|
65
|
-
return {
|
|
66
|
-
state: "unknown",
|
|
67
|
-
reason,
|
|
68
|
-
message: "The setup readiness capability could not be observed.",
|
|
69
|
-
};
|
|
70
|
-
}
|
|
71
|
-
/**
|
|
72
|
-
* Resolve applicable automation IDs with the same origin fallback as identity.
|
|
73
|
-
* @param root - Canonical project root.
|
|
74
|
-
* @param config - Bounded merged Lisa configuration.
|
|
75
|
-
* @returns Expected automation identifiers for the current project.
|
|
76
|
-
*/
|
|
77
|
-
async function readDefaultExpectedAutomationIds(root, config) {
|
|
78
|
-
const stacks = await readConfinedDetectedStacks(root);
|
|
79
|
-
const gitRemoteUrl = await readOriginRemote(root, AbortSignal.timeout(ORIGIN_REMOTE_TIMEOUT_MS));
|
|
80
|
-
return (await resolveExpectedAutomationEntries(config, stacks, gitRemoteUrl)).map(entry => entry.automationId);
|
|
81
|
-
}
|
|
82
|
-
/**
|
|
83
|
-
* Create a safe-to-repeat reader for one localhost UI server.
|
|
84
|
-
* @param projectPath - Project path served by the local UI.
|
|
85
|
-
* @param dependencies - Optional bounded reader overrides for verification.
|
|
86
|
-
* @returns A read-only readiness projection reader.
|
|
87
|
-
*/
|
|
88
|
-
export function createSetupReadinessReader(projectPath, dependencies = {}) {
|
|
89
|
-
const readConfig = dependencies.readConfig ?? readMergedUiConfig;
|
|
90
|
-
const readHealth = dependencies.readHealth ??
|
|
91
|
-
(async (root) => await runDeterministicHealth(root, { deadlineMs: 20_000 }));
|
|
92
|
-
const readGithub = dependencies.readGithub ??
|
|
93
|
-
(async (root, config) => await runProbe(createGithubRepoProbe(root, config)));
|
|
94
|
-
const readAutomations = dependencies.readAutomations ??
|
|
95
|
-
(async (root) => await runProbe(createAutomationsProbe({ cwd: root })));
|
|
96
|
-
const readDeployPipeline = dependencies.readDeployPipeline ??
|
|
97
|
-
(async (root) => await runProbe(createDeployPipelineProbe(root)));
|
|
98
|
-
const readExpectedAutomationIds = dependencies.readExpectedAutomationIds ?? readDefaultExpectedAutomationIds;
|
|
99
|
-
const readSecrets = dependencies.readExpectedSecretNames ?? readWorkflowSecretNames;
|
|
100
|
-
return async () => {
|
|
101
|
-
const projectRoot = await realpath(path.resolve(projectPath));
|
|
102
|
-
const config = await readConfig(projectRoot).catch(() => ({}));
|
|
103
|
-
const [health, github, deployPipeline, automations, expectedAutomationIds, expectedSecretNames,] = await Promise.all([
|
|
104
|
-
readHealth(projectRoot).catch(() => undefined),
|
|
105
|
-
readGithub(projectRoot, config).catch(() => unknownProbe("github-read-failed")),
|
|
106
|
-
readDeployPipeline(projectRoot).catch(() => unknownProbe("deploy-pipeline-read-failed")),
|
|
107
|
-
readAutomations(projectRoot).catch(() => unknownProbe("scheduler-read-failed")),
|
|
108
|
-
readExpectedAutomationIds(projectRoot, config).catch(() => undefined),
|
|
109
|
-
readSecrets(projectRoot).catch(() => []),
|
|
110
|
-
]);
|
|
111
|
-
return await projectSetupReadiness(projectRoot, {
|
|
112
|
-
config,
|
|
113
|
-
...(health === undefined ? {} : { health }),
|
|
114
|
-
github,
|
|
115
|
-
deployPipeline,
|
|
116
|
-
automations,
|
|
117
|
-
...(expectedAutomationIds === undefined ? {} : { expectedAutomationIds }),
|
|
118
|
-
expectedSecretNames,
|
|
119
|
-
...(dependencies.now === undefined
|
|
120
|
-
? {}
|
|
121
|
-
: { observedAt: dependencies.now() }),
|
|
122
|
-
});
|
|
123
|
-
};
|
|
124
|
-
}
|
|
125
|
-
export { SETUP_READINESS_CHECKS, validateSetupReadinessResult, } from "./ui-setup-readiness-contract.js";
|
|
126
|
-
//# sourceMappingURL=ui-setup-readiness.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ui-setup-readiness.js","sourceRoot":"","sources":["../../src/cli/ui-setup-readiness.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AAGpE,OAAO,EACL,sBAAsB,GAEvB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,gBAAgB,EAChB,gCAAgC,GACjC,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,0BAA0B,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EACL,kBAAkB,EAClB,gBAAgB,EAChB,wBAAwB,EACxB,cAAc,GACf,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,qBAAqB,EACrB,uBAAuB,EACvB,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EACL,kBAAkB,EAClB,uBAAuB,EACvB,cAAc,GACf,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,4BAA4B,GAE7B,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EACL,qBAAqB,GAEtB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,yBAA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C,YAAY,CAAC,uBAAuB,CAAC,CACtC;YACD,yBAAyB,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC;YACrE,WAAW,CAAC,WAAW,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,EAAE,CAAC;SACzC,CAAC,CAAC;QACH,OAAO,MAAM,qBAAqB,CAAC,WAAW,EAAE;YAC9C,MAAM;YACN,GAAG,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC;YAC3C,MAAM;YACN,cAAc;YACd,WAAW;YACX,GAAG,CAAC,qBAAqB,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,qBAAqB,EAAE,CAAC;YACzE,mBAAmB;YACnB,GAAG,CAAC,YAAY,CAAC,GAAG,KAAK,SAAS;gBAChC,CAAC,CAAC,EAAE;gBACJ,CAAC,CAAC,EAAE,UAAU,EAAE,YAAY,CAAC,GAAG,EAAE,EAAE,CAAC;SACxC,CAAC,CAAC;IACL,CAAC,CAAC;AACJ,CAAC;AAOD,OAAO,EACL,sBAAsB,EACtB,4BAA4B,GAC7B,MAAM,kCAAkC,CAAC"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/** Project-bound, same-origin caller of the existing starter landing command. */
|
|
2
|
-
import type { IncomingMessage, ServerResponse } from "node:http";
|
|
3
|
-
import { runStarterSync, type StarterSyncCommandOptions } from "./starter-sync-command.js";
|
|
4
|
-
/** Only the existing landing operation is replaceable by tests. */
|
|
5
|
-
export interface UiStarterSyncDependencies {
|
|
6
|
-
readonly run: typeof runStarterSync;
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
* Bind writes to the server's project and attribution, never request input.
|
|
10
|
-
* Overlapping requests fail explicitly instead of starting another Git mutation.
|
|
11
|
-
* @param options - Trusted server startup options.
|
|
12
|
-
* @param capability - Secret generated for this console launch, never served over HTTP.
|
|
13
|
-
* @param dependencies - Existing landing command boundary.
|
|
14
|
-
* @returns POST handler with one active sync per console.
|
|
15
|
-
*/
|
|
16
|
-
export declare function createUiStarterSyncHandler(options: StarterSyncCommandOptions, capability: string, dependencies?: Partial<UiStarterSyncDependencies>): (request: IncomingMessage, response: ServerResponse) => void;
|
|
17
|
-
//# sourceMappingURL=ui-starter-sync.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ui-starter-sync.d.ts","sourceRoot":"","sources":["../../src/cli/ui-starter-sync.ts"],"names":[],"mappings":"AAAA,iFAAiF;AACjF,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAEjE,OAAO,EACL,cAAc,EACd,KAAK,yBAAyB,EAC/B,MAAM,2BAA2B,CAAC;AAGnC,mEAAmE;AACnE,MAAM,WAAW,yBAAyB;IACxC,QAAQ,CAAC,GAAG,EAAE,OAAO,cAAc,CAAC;CACrC;AAqBD;;;;;;;GAOG;AACH,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,yBAAyB,EAClC,UAAU,EAAE,MAAM,EAClB,YAAY,GAAE,OAAO,CAAC,yBAAyB,CAAM,GACpD,CAAC,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,cAAc,KAAK,IAAI,CA8C9D"}
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import { timingSafeEqual } from "node:crypto";
|
|
2
|
-
import { runStarterSync, } from "./starter-sync-command.js";
|
|
3
|
-
import { isExpectedLoopbackOrigin } from "./ui-request-origin.js";
|
|
4
|
-
/**
|
|
5
|
-
* Serialize an outcome without allowing intermediary caching.
|
|
6
|
-
* @param response - Request's response.
|
|
7
|
-
* @param status - HTTP status.
|
|
8
|
-
* @param outcome - Actual landing outcome or failure.
|
|
9
|
-
*/
|
|
10
|
-
function reply(response, status, outcome) {
|
|
11
|
-
response.writeHead(status, {
|
|
12
|
-
"content-type": "application/json; charset=utf-8",
|
|
13
|
-
"cache-control": "no-store",
|
|
14
|
-
...(status === 405 ? { allow: "POST" } : {}),
|
|
15
|
-
});
|
|
16
|
-
response.end(JSON.stringify(outcome));
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Bind writes to the server's project and attribution, never request input.
|
|
20
|
-
* Overlapping requests fail explicitly instead of starting another Git mutation.
|
|
21
|
-
* @param options - Trusted server startup options.
|
|
22
|
-
* @param capability - Secret generated for this console launch, never served over HTTP.
|
|
23
|
-
* @param dependencies - Existing landing command boundary.
|
|
24
|
-
* @returns POST handler with one active sync per console.
|
|
25
|
-
*/
|
|
26
|
-
export function createUiStarterSyncHandler(options, capability, dependencies = {}) {
|
|
27
|
-
const run = dependencies.run ?? runStarterSync;
|
|
28
|
-
// eslint-disable-next-line functional/no-let -- server-local mutation lock released only when the command settles
|
|
29
|
-
let running = false;
|
|
30
|
-
return (request, response) => {
|
|
31
|
-
if (request.method !== "POST") {
|
|
32
|
-
reply(response, 405, { state: "failed", error: "Method not allowed" });
|
|
33
|
-
return;
|
|
34
|
-
}
|
|
35
|
-
if (!isExpectedLoopbackOrigin(request.headers.origin, request.headers.host) ||
|
|
36
|
-
!hasLaunchCapability(request.headers["x-lisa-starter-token"], capability)) {
|
|
37
|
-
reply(response, 403, {
|
|
38
|
-
state: "failed",
|
|
39
|
-
error: "Open the console using its terminal launch link to authorize starter sync",
|
|
40
|
-
});
|
|
41
|
-
return;
|
|
42
|
-
}
|
|
43
|
-
if (running) {
|
|
44
|
-
reply(response, 409, {
|
|
45
|
-
state: "failed",
|
|
46
|
-
error: "Starter sync is already running. Wait for its result before retrying.",
|
|
47
|
-
});
|
|
48
|
-
return;
|
|
49
|
-
}
|
|
50
|
-
running = true;
|
|
51
|
-
void Promise.resolve()
|
|
52
|
-
.then(() => run(options))
|
|
53
|
-
.then(result => reply(response, 200, result), error => reply(response, 500, {
|
|
54
|
-
state: "failed",
|
|
55
|
-
error: error instanceof Error
|
|
56
|
-
? error.message
|
|
57
|
-
: "Unable to sync the starter. Check the Lisa console terminal for details.",
|
|
58
|
-
}))
|
|
59
|
-
.finally(() => {
|
|
60
|
-
running = false;
|
|
61
|
-
});
|
|
62
|
-
};
|
|
63
|
-
}
|
|
64
|
-
/**
|
|
65
|
-
* Authenticate a local caller independently of its forgeable HTTP headers.
|
|
66
|
-
* @param supplied - Request capability header
|
|
67
|
-
* @param expected - Per-launch capability known only to the initiating process
|
|
68
|
-
* @returns Whether this request carries the current launch capability
|
|
69
|
-
*/
|
|
70
|
-
function hasLaunchCapability(supplied, expected) {
|
|
71
|
-
return (typeof supplied === "string" &&
|
|
72
|
-
/^[a-f0-9]{64}$/u.test(supplied) &&
|
|
73
|
-
timingSafeEqual(Buffer.from(supplied, "utf8"), Buffer.from(expected, "utf8")));
|
|
74
|
-
}
|
|
75
|
-
//# sourceMappingURL=ui-starter-sync.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ui-starter-sync.js","sourceRoot":"","sources":["../../src/cli/ui-starter-sync.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EACL,cAAc,GAEf,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AAOlE;;;;;GAKG;AACH,SAAS,KAAK,CACZ,QAAwB,EACxB,MAAc,EACd,OAAgB;IAEhB,QAAQ,CAAC,SAAS,CAAC,MAAM,EAAE;QACzB,cAAc,EAAE,iCAAiC;QACjD,eAAe,EAAE,UAAU;QAC3B,GAAG,CAAC,MAAM,KAAK,GAAG,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KAC7C,CAAC,CAAC;IACH,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC;AACxC,CAAC;AAED;;;;;;;GAOG;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;YACf,KAAK,EACH,KAAK,YAAY,KAAK;gBACpB,CAAC,CAAC,KAAK,CAAC,OAAO;gBACf,CAAC,CAAC,0EAA0E;SACjF,CAAC,CACL;aACA,OAAO,CAAC,GAAG,EAAE;YACZ,OAAO,GAAG,KAAK,CAAC;QAClB,CAAC,CAAC,CAAC;IACP,CAAC,CAAC;AACJ,CAAC;AAED;;;;;GAKG;AACH,SAAS,mBAAmB,CAC1B,QAAuC,EACvC,QAAgB;IAEhB,OAAO,CACL,OAAO,QAAQ,KAAK,QAAQ;QAC5B,iBAAiB,CAAC,IAAI,CAAC,QAAQ,CAAC;QAChC,eAAe,CACb,MAAM,CAAC,IAAI,CAAC,QAAQ,EAAE,MAAM,CAAC,EAC7B,MAAM,CAAC,IAAI,CAAC,QAAQ,EAAE,MAAM,CAAC,CAC9B,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Runtime-safe JSON normalization for live-status probe results.
|
|
3
|
-
* @module cli/ui-status-json
|
|
4
|
-
*/
|
|
5
|
-
import type { JsonValue } from "../sync/json-path.js";
|
|
6
|
-
/** A probe result that never conflates missing evidence with a real value. */
|
|
7
|
-
export type ProbeResult<T extends JsonValue = JsonValue> = {
|
|
8
|
-
readonly state: "value";
|
|
9
|
-
readonly value: T;
|
|
10
|
-
readonly reason?: never;
|
|
11
|
-
readonly message?: never;
|
|
12
|
-
} | {
|
|
13
|
-
readonly state: "unknown";
|
|
14
|
-
readonly reason: string;
|
|
15
|
-
readonly message: string;
|
|
16
|
-
readonly value?: never;
|
|
17
|
-
} | {
|
|
18
|
-
readonly state: "not-applicable";
|
|
19
|
-
readonly value?: never;
|
|
20
|
-
readonly reason?: never;
|
|
21
|
-
readonly message?: never;
|
|
22
|
-
};
|
|
23
|
-
/**
|
|
24
|
-
* Detach and validate an entire probe result before transport.
|
|
25
|
-
* @param result - Runtime probe output
|
|
26
|
-
* @returns Safe tri-state result, or unknown for unsafe runtime data
|
|
27
|
-
*/
|
|
28
|
-
export declare function normalizeProbeResult<T extends JsonValue>(result: ProbeResult<T>): ProbeResult<T>;
|
|
29
|
-
//# sourceMappingURL=ui-status-json.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ui-status-json.d.ts","sourceRoot":"","sources":["../../src/cli/ui-status-json.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAWtD,8EAA8E;AAC9E,MAAM,MAAM,WAAW,CAAC,CAAC,SAAS,SAAS,GAAG,SAAS,IACnD;IACE,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,KAAK,EAAE,CAAC,CAAC;IAClB,QAAQ,CAAC,MAAM,CAAC,EAAE,KAAK,CAAC;IACxB,QAAQ,CAAC,OAAO,CAAC,EAAE,KAAK,CAAC;CAC1B,GACD;IACE,QAAQ,CAAC,KAAK,EAAE,SAAS,CAAC;IAC1B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC;CACxB,GACD;IACE,QAAQ,CAAC,KAAK,EAAE,gBAAgB,CAAC;IACjC,QAAQ,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC;IACvB,QAAQ,CAAC,MAAM,CAAC,EAAE,KAAK,CAAC;IACxB,QAAQ,CAAC,OAAO,CAAC,EAAE,KAAK,CAAC;CAC1B,CAAC;AAuMN;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,CAAC,SAAS,SAAS,EACtD,MAAM,EAAE,WAAW,CAAC,CAAC,CAAC,GACrB,WAAW,CAAC,CAAC,CAAC,CAahB"}
|
|
@@ -1,162 +0,0 @@
|
|
|
1
|
-
/** Transport budgets prevent status probes from monopolizing the UI process. */
|
|
2
|
-
const MAX_JSON_DEPTH = 64;
|
|
3
|
-
const MAX_JSON_NODES = 10_000;
|
|
4
|
-
/**
|
|
5
|
-
* Require enumerable data without invoking accessors.
|
|
6
|
-
* @param descriptor - Candidate property descriptor
|
|
7
|
-
* @param message - Error text for an unsafe descriptor
|
|
8
|
-
* @returns The descriptor's inert data value
|
|
9
|
-
*/
|
|
10
|
-
function requireData(descriptor, message) {
|
|
11
|
-
if (descriptor === undefined ||
|
|
12
|
-
!descriptor.enumerable ||
|
|
13
|
-
!("value" in descriptor)) {
|
|
14
|
-
throw new TypeError(message);
|
|
15
|
-
}
|
|
16
|
-
return descriptor.value;
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Clone one JSON array without invoking accessors or custom hooks.
|
|
20
|
-
* @param value - Candidate array
|
|
21
|
-
* @param ancestors - Active recursion path
|
|
22
|
-
* @param depth - Current tree depth
|
|
23
|
-
* @param budget - Remaining traversal budget
|
|
24
|
-
* @returns Detached JSON array
|
|
25
|
-
*/
|
|
26
|
-
function cloneArray(value, ancestors, depth, budget) {
|
|
27
|
-
if (value.length > budget.nodesRemaining) {
|
|
28
|
-
throw new TypeError("Probe value exceeds the JSON node limit");
|
|
29
|
-
}
|
|
30
|
-
const allowedKeys = new Set([
|
|
31
|
-
"length",
|
|
32
|
-
...Array.from({ length: value.length }, (_entry, index) => String(index)),
|
|
33
|
-
]);
|
|
34
|
-
if (Reflect.ownKeys(value).some(key => typeof key !== "string" || !allowedKeys.has(key))) {
|
|
35
|
-
throw new TypeError("Probe arrays must contain only indexed JSON data");
|
|
36
|
-
}
|
|
37
|
-
const descriptors = Object.getOwnPropertyDescriptors(value);
|
|
38
|
-
return Array.from({ length: value.length }, (_entry, index) => cloneJsonValue(requireData(descriptors[String(index)], "Probe arrays cannot contain holes or accessors"), ancestors, depth, budget));
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* Clone one plain JSON object without invoking accessors or custom hooks.
|
|
42
|
-
* @param value - Candidate object
|
|
43
|
-
* @param ancestors - Active recursion path
|
|
44
|
-
* @param depth - Current tree depth
|
|
45
|
-
* @param budget - Remaining traversal budget
|
|
46
|
-
* @returns Detached JSON object
|
|
47
|
-
*/
|
|
48
|
-
function cloneObject(value, ancestors, depth, budget) {
|
|
49
|
-
const prototype = Object.getPrototypeOf(value);
|
|
50
|
-
if (prototype !== Object.prototype && prototype !== null) {
|
|
51
|
-
throw new TypeError("Probe objects must use a plain object prototype");
|
|
52
|
-
}
|
|
53
|
-
const descriptors = Object.getOwnPropertyDescriptors(value);
|
|
54
|
-
const entries = Reflect.ownKeys(value).map(key => {
|
|
55
|
-
if (typeof key !== "string") {
|
|
56
|
-
throw new TypeError("Probe objects cannot contain symbol properties");
|
|
57
|
-
}
|
|
58
|
-
return [
|
|
59
|
-
key,
|
|
60
|
-
cloneJsonValue(requireData(descriptors[key], "Probe objects cannot contain hidden properties or accessors"), ancestors, depth, budget),
|
|
61
|
-
];
|
|
62
|
-
});
|
|
63
|
-
return Object.fromEntries(entries);
|
|
64
|
-
}
|
|
65
|
-
/**
|
|
66
|
-
* Clone a scalar supported by JSON.
|
|
67
|
-
* @param value - Candidate scalar
|
|
68
|
-
* @returns Valid JSON scalar
|
|
69
|
-
*/
|
|
70
|
-
function cloneScalar(value) {
|
|
71
|
-
if (value === null ||
|
|
72
|
-
typeof value === "string" ||
|
|
73
|
-
typeof value === "boolean" ||
|
|
74
|
-
(typeof value === "number" && Number.isFinite(value))) {
|
|
75
|
-
return value;
|
|
76
|
-
}
|
|
77
|
-
throw new TypeError("Probe scalar is not finite or is not JSON data");
|
|
78
|
-
}
|
|
79
|
-
/**
|
|
80
|
-
* Clone runtime input into a detached JSON data tree.
|
|
81
|
-
* @param value - Candidate value
|
|
82
|
-
* @param ancestors - Active recursion path
|
|
83
|
-
* @param depth - Current tree depth
|
|
84
|
-
* @param budget - Remaining traversal budget
|
|
85
|
-
* @returns Detached JSON data
|
|
86
|
-
*/
|
|
87
|
-
function cloneJsonValue(value, ancestors = [], depth = 0, budget = { nodesRemaining: MAX_JSON_NODES }) {
|
|
88
|
-
if (depth > MAX_JSON_DEPTH) {
|
|
89
|
-
throw new TypeError("Probe value exceeds the JSON depth limit");
|
|
90
|
-
}
|
|
91
|
-
if (budget.nodesRemaining <= 0) {
|
|
92
|
-
throw new TypeError("Probe value exceeds the JSON node limit");
|
|
93
|
-
}
|
|
94
|
-
// eslint-disable-next-line functional/immutable-data -- one private counter bounds a single traversal
|
|
95
|
-
budget.nodesRemaining -= 1;
|
|
96
|
-
if (typeof value !== "object" || value === null) {
|
|
97
|
-
return cloneScalar(value);
|
|
98
|
-
}
|
|
99
|
-
if (ancestors.includes(value)) {
|
|
100
|
-
throw new TypeError("Probe value is cyclic");
|
|
101
|
-
}
|
|
102
|
-
const next = [...ancestors, value];
|
|
103
|
-
return Array.isArray(value)
|
|
104
|
-
? cloneArray(value, next, depth + 1, budget)
|
|
105
|
-
: cloneObject(value, next, depth + 1, budget);
|
|
106
|
-
}
|
|
107
|
-
/**
|
|
108
|
-
* Validate an exact set of own keys on a detached object.
|
|
109
|
-
* @param value - Detached object
|
|
110
|
-
* @param expected - Required unique keys
|
|
111
|
-
* @returns True when no key is missing or extra
|
|
112
|
-
*/
|
|
113
|
-
function hasExactKeys(value, expected) {
|
|
114
|
-
const actual = Object.keys(value);
|
|
115
|
-
return (actual.length === expected.length &&
|
|
116
|
-
expected.every(key => Object.hasOwn(value, key)));
|
|
117
|
-
}
|
|
118
|
-
/**
|
|
119
|
-
* Convert a detached JSON tree back into the strict result union.
|
|
120
|
-
* @param value - Detached JSON tree
|
|
121
|
-
* @returns Strict tri-state result
|
|
122
|
-
*/
|
|
123
|
-
function parseResult(value) {
|
|
124
|
-
if (value === null || Array.isArray(value) || typeof value !== "object") {
|
|
125
|
-
throw new TypeError("Probe result must be a plain object");
|
|
126
|
-
}
|
|
127
|
-
if (value.state === "value" && hasExactKeys(value, ["state", "value"])) {
|
|
128
|
-
return { state: "value", value: value.value };
|
|
129
|
-
}
|
|
130
|
-
if (value.state === "unknown" &&
|
|
131
|
-
hasExactKeys(value, ["message", "reason", "state"]) &&
|
|
132
|
-
typeof value.reason === "string" &&
|
|
133
|
-
value.reason.trim().length > 0 &&
|
|
134
|
-
typeof value.message === "string" &&
|
|
135
|
-
value.message.trim().length > 0) {
|
|
136
|
-
return { state: "unknown", reason: value.reason, message: value.message };
|
|
137
|
-
}
|
|
138
|
-
if (value.state === "not-applicable" && hasExactKeys(value, ["state"])) {
|
|
139
|
-
return { state: "not-applicable" };
|
|
140
|
-
}
|
|
141
|
-
throw new TypeError("Probe result does not match the tri-state contract");
|
|
142
|
-
}
|
|
143
|
-
/**
|
|
144
|
-
* Detach and validate an entire probe result before transport.
|
|
145
|
-
* @param result - Runtime probe output
|
|
146
|
-
* @returns Safe tri-state result, or unknown for unsafe runtime data
|
|
147
|
-
*/
|
|
148
|
-
export function normalizeProbeResult(result) {
|
|
149
|
-
try {
|
|
150
|
-
return parseResult(cloneJsonValue(result));
|
|
151
|
-
}
|
|
152
|
-
catch (error) {
|
|
153
|
-
return {
|
|
154
|
-
state: "unknown",
|
|
155
|
-
reason: "non-serializable-value",
|
|
156
|
-
message: error instanceof Error
|
|
157
|
-
? `Probe returned unsafe JSON data: ${error.message}`
|
|
158
|
-
: "Probe returned unreadable data",
|
|
159
|
-
};
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
//# sourceMappingURL=ui-status-json.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ui-status-json.js","sourceRoot":"","sources":["../../src/cli/ui-status-json.ts"],"names":[],"mappings":"AAMA,gFAAgF;AAChF,MAAM,cAAc,GAAG,EAAE,CAAC;AAC1B,MAAM,cAAc,GAAG,MAAM,CAAC;AA4B9B;;;;;GAKG;AACH,SAAS,WAAW,CAClB,UAA0C,EAC1C,OAAe;IAEf,IACE,UAAU,KAAK,SAAS;QACxB,CAAC,UAAU,CAAC,UAAU;QACtB,CAAC,CAAC,OAAO,IAAI,UAAU,CAAC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