gentle-pi 4.7.0 → 4.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +55 -44
- package/assets/agents/gentle-ai-explore.md +3 -3
- package/assets/agents/gentle-ai-verify.md +20 -6
- package/assets/agents/gentle-ai-worker.md +6 -6
- package/assets/agents/jd-judge-a.md +1 -3
- package/assets/agents/jd-judge-b.md +1 -3
- package/assets/agents/review-readability.md +1 -5
- package/assets/agents/review-reliability.md +1 -5
- package/assets/agents/review-resilience.md +1 -5
- package/assets/agents/review-risk.md +1 -5
- package/assets/design-canvas/canvas-api.js +45 -0
- package/assets/design-canvas/canvas-boards.js +456 -0
- package/assets/design-canvas/canvas-boot.js +217 -0
- package/assets/design-canvas/canvas-checks.js +491 -0
- package/assets/design-canvas/canvas-comments.js +315 -0
- package/assets/design-canvas/canvas-compare.js +159 -0
- package/assets/design-canvas/canvas-events.js +75 -0
- package/assets/design-canvas/canvas-export.js +393 -0
- package/assets/design-canvas/canvas-focus.js +203 -0
- package/assets/design-canvas/canvas-handoffs.js +150 -0
- package/assets/design-canvas/canvas-i18n-es.js +392 -0
- package/assets/design-canvas/canvas-i18n.js +108 -0
- package/assets/design-canvas/canvas-layout.js +526 -0
- package/assets/design-canvas/canvas-menu.js +213 -0
- package/assets/design-canvas/canvas-messages.js +86 -0
- package/assets/design-canvas/canvas-minimap.js +163 -0
- package/assets/design-canvas/canvas-parts.js +401 -0
- package/assets/design-canvas/canvas-popover.js +234 -0
- package/assets/design-canvas/canvas-rail.js +348 -0
- package/assets/design-canvas/canvas-sizes.js +524 -0
- package/assets/design-canvas/canvas-store.js +164 -0
- package/assets/design-canvas/canvas-tokens.js +674 -0
- package/assets/design-canvas/canvas-ui.js +24 -0
- package/assets/design-canvas/canvas-view.js +184 -0
- package/assets/design-canvas/canvas.css +746 -15
- package/assets/design-canvas/canvas.js +2 -1506
- package/assets/design-canvas/index.html +117 -36
- package/assets/design-canvas/inspector.js +546 -16
- package/assets/install-wizard/wizard.js +5 -1
- package/assets/migrations/agent-body-history.json +24 -0
- package/assets/orchestrator-delegation-reference.md +8 -14
- package/assets/orchestrator-delegation.md +4 -4
- package/assets/orchestrator-full-delegation-card.md +4 -5
- package/assets/orchestrator-full-delegation.md +8 -8
- package/assets/orchestrator-memory.md +2 -2
- package/assets/orchestrator-prompts.md +1 -1
- package/assets/orchestrator-quota-recovery.md +5 -0
- package/assets/orchestrator-skills.md +13 -12
- package/assets/orchestrator-tracking.md +10 -14
- package/assets/orchestrator-verification.md +10 -8
- package/assets/orchestrator-writer.md +4 -4
- package/assets/orchestrator.md +18 -22
- package/bin/gentle-shell.mjs +128 -9
- package/contracts/review-provider-contract-mirror/provider-contract.lock.json +8 -9
- package/contracts/review-provider-contract-mirror/{v1.4.0 → v1.5.0}/bundle/manifest.json +3 -3
- package/contracts/review-provider-contract-mirror/{v1.4.0 → v1.5.0}/bundle/orchestration/pi.md +1 -0
- package/contracts/review-provider-contract-mirror/{v1.4.0 → v1.5.0}/bundle/routing/pi.md +6 -6
- package/contracts/review-provider-contract-mirror/{v1.4.0 → v1.5.0}/generated/provider-capabilities.baseline.json +3 -3
- package/contracts/review-provider-contract-mirror/{v1.4.0 → v1.5.0}/generated/provider-roles.baseline.json +1 -1
- package/docs/assets/brand/sponsor-banner.svg +60 -0
- package/docs/bundled-install.md +14 -6
- package/docs/delegated-verification.md +18 -2
- package/docs/desktop-rpc.md +1253 -0
- package/docs/gentle-agents-activity.md +26 -0
- package/docs/gentle-shell.md +39 -16
- package/docs/install-wizard.md +30 -21
- package/docs/odd-preparation-continuity.md +24 -0
- package/docs/permission-modes.md +9 -1
- package/docs/prompt-budget.md +12 -0
- package/docs/rdd-odd-friction-triage-2026-11-07.md +57 -0
- package/docs/readme-reference.md +76 -24
- package/docs/review-coordinator.md +29 -9
- package/docs/review-delivery-preflight.md +22 -0
- package/docs/work-continuity.md +11 -1
- package/extensions/ask-user-question.ts +2 -2
- package/extensions/child-context.ts +21 -7
- package/extensions/gentle-agents.ts +234 -33
- package/extensions/gentle-ai.ts +576 -135
- package/extensions/gentle-design.ts +69 -3
- package/extensions/gentle-desktop-rpc.ts +143 -0
- package/extensions/gentle-guide.ts +3 -0
- package/extensions/gentle-shell.ts +105 -52
- package/extensions/gentle-todo.ts +48 -25
- package/extensions/skill-registry.ts +248 -223
- package/lib/agent-assets.ts +30 -6
- package/lib/agent-tool-overlay.ts +117 -0
- package/lib/agents-config.ts +47 -6
- package/lib/agents-message-delivery.ts +17 -0
- package/lib/agents-messaging.ts +8 -2
- package/lib/agents-protocol.ts +15 -0
- package/lib/agents-report-cap.ts +115 -0
- package/lib/agents-runner.ts +91 -6
- package/lib/agents-session-transport.ts +17 -1
- package/lib/background-jobs-tools.ts +9 -4
- package/lib/bounded-writer-admission.ts +184 -31
- package/lib/child-context-files.ts +21 -6
- package/lib/codemode-renderer.ts +1 -0
- package/lib/delivery-conflict-markers.ts +349 -0
- package/lib/design-canvas-assets.ts +36 -0
- package/lib/design-canvas-server.ts +241 -23
- package/lib/design-comments.ts +94 -4
- package/lib/design-handoffs.ts +2 -1
- package/lib/design-layout.ts +125 -0
- package/lib/design-parts.ts +281 -0
- package/lib/design-system-tokens.ts +111 -0
- package/lib/desktop-agents-service.ts +294 -0
- package/lib/desktop-design-service.ts +233 -0
- package/lib/desktop-jobs-service.ts +263 -0
- package/lib/desktop-rpc-agents.ts +294 -0
- package/lib/desktop-rpc-config.ts +731 -0
- package/lib/desktop-rpc-design.ts +138 -0
- package/lib/desktop-rpc-jobs.ts +181 -0
- package/lib/desktop-rpc-permissions.ts +177 -0
- package/lib/desktop-rpc-profiles.ts +196 -0
- package/lib/desktop-rpc-usage.ts +229 -0
- package/lib/desktop-rpc.ts +225 -0
- package/lib/desktop-usage-service.ts +310 -0
- package/lib/destructive-command-guard.ts +188 -13
- package/lib/gentle-ai-renderer.ts +13 -1
- package/lib/gentle-design.ts +201 -14
- package/lib/gentle-shell-bundled.ts +100 -9
- package/lib/hidden-tools.ts +35 -0
- package/lib/inprocess-reviewer.ts +96 -12
- package/lib/model-fallback-policy.ts +9 -0
- package/lib/model-routing-authority.ts +9 -0
- package/lib/nan-provider.ts +42 -28
- package/lib/native-review-cli.ts +79 -4
- package/lib/orchestrator-discovery.ts +39 -2
- package/lib/reply-language-anchor.ts +27 -2
- package/lib/request-context-placement.ts +53 -0
- package/lib/review-candidate-view.ts +11 -1
- package/lib/review-continuation-registry.ts +17 -0
- package/lib/review-coordinator.ts +252 -8
- package/lib/review-delivery-preflight.ts +85 -0
- package/lib/review-host-relay.ts +5 -1
- package/lib/review-integration-v2.ts +56 -3
- package/lib/reviewer-stream.ts +87 -0
- package/lib/shell-prompt.ts +16 -3
- package/lib/shell-usage.ts +10 -0
- package/lib/vim-editor-adapter.ts +9 -2
- package/lib/writer-batch-admission.ts +55 -0
- package/lib/yolo-session-policy.ts +6 -1
- package/package.json +2 -2
- package/prompts/skill-creation.md +1 -10
- package/runtime/design-canvas-assets.mjs +37 -0
- package/runtime/gentle-shell-bundled.mjs +100 -9
- package/runtime/native-review-cli.mjs +79 -4
- package/runtime/review-integration-v2.mjs +56 -3
- package/scripts/bootstrap.cmd +2 -2
- package/scripts/bootstrap.sh +41 -4
- package/scripts/build-full-delegation-card.mjs +4 -0
- package/scripts/build-runtime-modules.mjs +1 -0
- package/scripts/gentle-ai-installer.mjs +10 -10
- package/scripts/gentle-ai-proxy.mjs +1 -1
- package/scripts/installer-downloads.mjs +34 -8
- package/scripts/installer-preflight.mjs +28 -17
- package/scripts/installer-probes.mjs +25 -5
- package/scripts/installer-server.mjs +38 -9
- package/scripts/installer-windows.mjs +2 -2
- package/scripts/pi-update.mjs +166 -27
- package/scripts/prepare-verifier.mjs +107 -0
- package/scripts/update-agent-body-history.mjs +55 -8
- package/scripts/verify-package-files.mjs +40 -19
- package/skills/branch-pr/SKILL.md +16 -16
- package/skills/comment-writer/SKILL.md +1 -1
- package/skills/design/SKILL.md +6 -6
- package/skills/gentle-ai/SKILL.md +5 -5
- package/skills/judgment-day/SKILL.md +2 -2
- package/skills/judgment-day/references/prompts-and-formats.md +1 -1
- package/skills/rdd-defect-workflow/SKILL.md +6 -6
- package/skills/skill-improver/SKILL.md +2 -2
- package/skills/skill-registry/SKILL.md +11 -13
- package/skills/tui-design/SKILL.md +1 -1
- package/skills/work-unit-commits/SKILL.md +5 -5
- package/tests/agent-prompt-diet-contract.test.ts +101 -0
- package/tests/agent-tool-overlay-acceptance.test.ts +158 -0
- package/tests/agent-tool-overlay.test.ts +89 -0
- package/tests/agents-config.test.ts +10 -1
- package/tests/agents-message-delivery.test.ts +36 -0
- package/tests/agents-queries.test.ts +144 -4
- package/tests/agents-report-cap.test.ts +126 -0
- package/tests/agents-runner.test.ts +37 -1
- package/tests/agents-session-transport.test.ts +34 -0
- package/tests/always-on-prompt-verdicts-contract.test.ts +188 -0
- package/tests/append-system-prompt-route.test.ts +10 -2
- package/tests/approved-text-leftovers-contract.test.ts +136 -0
- package/tests/artifact-language.test.ts +1 -1
- package/tests/ask-user-question.test.ts +2 -1
- package/tests/audit-leftovers-contract.test.ts +51 -0
- package/tests/bounded-stop-contract.test.ts +9 -1
- package/tests/branch-pr-skill.test.ts +10 -1
- package/tests/bundled-install.test.ts +1 -1
- package/tests/child-context-files.test.ts +64 -8
- package/tests/child-skills-catalog.test.ts +56 -0
- package/tests/codemode-rendering.test.ts +4 -1
- package/tests/delegate-for-reason-contract.test.ts +30 -8
- package/tests/delivery-conflict-markers.test.ts +348 -0
- package/tests/design-canvas-all-sizes.test.ts +631 -0
- package/tests/design-canvas-allowlist.test.ts +32 -0
- package/tests/design-canvas-assets.test.ts +11 -878
- package/tests/design-canvas-boards.test.ts +77 -0
- package/tests/design-canvas-checks.test.ts +655 -0
- package/tests/design-canvas-compare.test.ts +79 -0
- package/tests/design-canvas-events.test.ts +59 -0
- package/tests/design-canvas-export.test.ts +1168 -0
- package/tests/design-canvas-focus.test.ts +113 -0
- package/tests/design-canvas-handoffs.test.ts +59 -0
- package/tests/design-canvas-i18n-review.test.ts +513 -0
- package/tests/design-canvas-i18n-views.test.ts +259 -0
- package/tests/design-canvas-i18n.test.ts +526 -0
- package/tests/design-canvas-inspector.test.ts +937 -0
- package/tests/design-canvas-layout.test.ts +1222 -0
- package/tests/design-canvas-minimap.test.ts +413 -0
- package/tests/design-canvas-modules.test.ts +90 -0
- package/tests/design-canvas-parts.test.ts +721 -0
- package/tests/design-canvas-rail.test.ts +799 -0
- package/tests/design-canvas-server.test.ts +855 -17
- package/tests/design-canvas-sizes.test.ts +548 -0
- package/tests/design-canvas-store.test.ts +180 -0
- package/tests/design-canvas-tokens.test.ts +965 -0
- package/tests/design-canvas-view.test.ts +299 -0
- package/tests/design-comments.test.ts +201 -1
- package/tests/design-handoffs.test.ts +20 -0
- package/tests/design-layout.test.ts +100 -0
- package/tests/design-parts.test.ts +260 -0
- package/tests/design-system-tokens.test.ts +215 -0
- package/tests/desktop-rpc-agents.test.ts +893 -0
- package/tests/desktop-rpc-config.test.ts +1452 -0
- package/tests/desktop-rpc-design.test.ts +662 -0
- package/tests/desktop-rpc-jobs.test.ts +796 -0
- package/tests/desktop-rpc-permissions.test.ts +311 -0
- package/tests/desktop-rpc-profiles.test.ts +140 -0
- package/tests/desktop-rpc-safety.test.ts +119 -0
- package/tests/desktop-rpc-usage.test.ts +697 -0
- package/tests/desktop-rpc.test.ts +252 -0
- package/tests/devbinary/pi-host-relay.devtest.ts +149 -80
- package/tests/devbinary/review-session-consent.devtest.ts +84 -0
- package/tests/engram-safety.test.ts +111 -0
- package/tests/fixtures/devbinary/status-v9-escalated-non-blocking.captured.json +92 -0
- package/tests/fixtures/devbinary/status-v9-escalated-non-blocking.provenance.md +3 -0
- package/tests/fixtures/primary-session-prompt/gentleman.golden.md +20 -29
- package/tests/fixtures/refusal-identity.probe.mjs +139 -0
- package/tests/full-delegation-closure.test.ts +29 -0
- package/tests/gentle-agents.test.ts +329 -4
- package/tests/gentle-ai-binary.test.ts +1 -1
- package/tests/gentle-ai-child-guards.test.ts +1 -0
- package/tests/gentle-ai-installer.test.ts +52 -51
- package/tests/gentle-ai-renderer.test.ts +36 -2
- package/tests/gentle-ai.test.ts +121 -6
- package/tests/gentle-design.test.ts +365 -1
- package/tests/gentle-shell-bundled.test.ts +91 -5
- package/tests/gentle-shell-launcher.test.ts +1 -1
- package/tests/gentle-shell.test.ts +118 -87
- package/tests/gentle-todo.test.ts +32 -9
- package/tests/hidden-tools.test.ts +188 -0
- package/tests/independent-recovery-delivery.test.ts +19 -5
- package/tests/inprocess-reviewer.test.ts +73 -0
- package/tests/install-wizard.test.ts +27 -1
- package/tests/installer-downloads.test.ts +30 -1
- package/tests/installer-posix-bootstrap.test.ts +114 -13
- package/tests/installer-preflight.test.ts +49 -1
- package/tests/installer-probes.test.ts +146 -0
- package/tests/installer-server.test.ts +203 -4
- package/tests/installer-windows-bootstrap.test.ts +19 -1
- package/tests/judgment-day-severity-admission.test.ts +46 -0
- package/tests/lazy-module-contradictions-contract.test.ts +158 -0
- package/tests/maintainer/desktop-rpc.maintest.ts +632 -0
- package/tests/maintainer/pi-update-source.maintest.ts +48 -18
- package/tests/model-fallback-policy.test.ts +26 -7
- package/tests/nan-provider-runtime.test.ts +17 -3
- package/tests/nan-provider.test.ts +111 -56
- package/tests/native-review-capability-contract.test.ts +11 -1
- package/tests/native-review-cli-nonblocking-findings.test.ts +165 -0
- package/tests/native-review-parity.test.ts +24 -5
- package/tests/native-review-refusal-identity.test.ts +25 -0
- package/tests/no-self-pause-contract.test.ts +11 -3
- package/tests/odd-integration.test.ts +11 -3
- package/tests/odd-routing-contract.test.ts +80 -28
- package/tests/orchestrator-budget.test.ts +30 -5
- package/tests/orchestrator-consultation-sdk.test.ts +32 -6
- package/tests/orchestrator-delegation-mode.test.ts +2 -1
- package/tests/orchestrator-discovery.test.ts +28 -0
- package/tests/orchestrator-prompt-budget.test.ts +11 -2
- package/tests/orchestrator-prompt-diet-contract.test.ts +221 -0
- package/tests/orchestrator-rdd-ownership.test.ts +2 -1
- package/tests/orchestrator-work-search.test.ts +4 -2
- package/tests/package-files.test.ts +25 -1
- package/tests/package-manifest.test.ts +11 -10
- package/tests/parallel-reason-contract.test.ts +6 -3
- package/tests/permission-allowlist.test.ts +200 -30
- package/tests/persona-neutral-voseo.test.ts +4 -4
- package/tests/persona-reply-language.test.ts +1 -1
- package/tests/persona-single-channel.test.ts +13 -5
- package/tests/pi-update-launcher.test.ts +17 -7
- package/tests/pi-update-source.test.ts +113 -6
- package/tests/pi-update.test.ts +294 -19
- package/tests/pnpm-workspace-policy.test.ts +47 -0
- package/tests/primary-context-files.test.ts +233 -0
- package/tests/primary-context-three-files.test.ts +174 -0
- package/tests/provider-defect-handoff.test.ts +9 -2
- package/tests/rdd-aware-verification-contract.test.ts +1 -1
- package/tests/rdd-status-line.test.ts +94 -1
- package/tests/reply-language-anchor-placement.test.ts +184 -0
- package/tests/reply-language-anchor.test.ts +17 -1
- package/tests/request-context-append-only.test.ts +218 -0
- package/tests/request-context-placement.test.ts +148 -0
- package/tests/review-agent-end-preflight.test.ts +79 -1
- package/tests/review-candidate-view.test.ts +65 -0
- package/tests/review-continuation-registry.test.ts +31 -0
- package/tests/review-contract-prompt.test.ts +1 -1
- package/tests/review-controller.test.ts +2 -1
- package/tests/review-coordinator-correction-gate.test.ts +105 -0
- package/tests/review-coordinator-findings.test.ts +206 -0
- package/tests/review-coordinator-nonblocking-scope.test.ts +169 -0
- package/tests/review-coordinator.test.ts +271 -4
- package/tests/review-delivery-preflight.test.ts +462 -0
- package/tests/review-due-compaction.test.ts +31 -0
- package/tests/review-due-public-boundary.test.ts +26 -0
- package/tests/review-integration-nonblocking-findings.test.ts +108 -0
- package/tests/review-json-arguments.test.ts +41 -2
- package/tests/review-ledger-contract.test.ts +19 -40
- package/tests/review-loadout-rdd-off-sdk.test.ts +30 -1
- package/tests/review-one-call-findings.test.ts +131 -0
- package/tests/review-one-call-followups.test.ts +308 -0
- package/tests/review-one-call-reviewer-requests.test.ts +207 -0
- package/tests/review-one-call.test.ts +452 -0
- package/tests/review-relay-transport-agent.test.ts +28 -1
- package/tests/review-reviewer-evidence.test.ts +41 -1
- package/tests/review-risk-assessment.test.ts +52 -5
- package/tests/review-run-statement-guidance-independent.test.ts +54 -0
- package/tests/review-session-standing-permission-controller.test.ts +32 -2
- package/tests/review-tool-prose-budget.test.ts +1 -0
- package/tests/reviewer-stream.test.ts +149 -0
- package/tests/session-profile-extension.test.ts +2 -2
- package/tests/shell-prompt.test.ts +17 -0
- package/tests/shell-usage.test.ts +59 -10
- package/tests/skill-contradictions-contract.test.ts +122 -0
- package/tests/skill-registry-watcher.test.ts +216 -2
- package/tests/skill-registry.test.ts +929 -306
- package/tests/support/design-canvas-dom.ts +369 -0
- package/tests/support/review-coordinator-runtime.ts +212 -17
- package/tests/task-size-routing-contract.test.ts +42 -11
- package/tests/test-strength-contract.test.ts +2 -1
- package/tests/todo-request-append-only.test.ts +214 -0
- package/tests/tool-batching-contract.test.ts +3 -1
- package/tests/update-agent-body-history.test.ts +138 -0
- package/tests/verification-tiers-contract.test.ts +229 -0
- package/tests/verifier-preparation.test.ts +229 -0
- package/tests/verify-agent-contract.test.ts +20 -2
- package/tests/verify-first-launch-contract.test.ts +87 -11
- package/tests/vim-editor-adapter.test.ts +2 -2
- package/tests/work-continuity-contract.test.ts +54 -11
- package/tests/writer-admission-messages.test.ts +232 -0
- package/tests/writer-batch-admission.test.ts +66 -0
- package/tests/writer-edit-surface-scope.test.ts +52 -20
- package/tests/writer-feature-document-admission.test.ts +184 -0
- package/tests/yolo-mode.test.ts +39 -0
- package/skills/_shared/review-ledger-contract.md +0 -106
- /package/contracts/review-provider-contract-mirror/{v1.4.0 → v1.5.0}/bundle/README.md +0 -0
- /package/contracts/review-provider-contract-mirror/{v1.4.0 → v1.5.0}/bundle/schemas/lens.schema.json +0 -0
- /package/contracts/review-provider-contract-mirror/{v1.4.0 → v1.5.0}/bundle/schemas/refuter.schema.json +0 -0
- /package/contracts/review-provider-contract-mirror/{v1.4.0 → v1.5.0}/bundle/schemas/targeted-validator.schema.json +0 -0
- /package/contracts/review-provider-contract-mirror/{v1.4.0 → v1.5.0}/bundle/vectors/lens.json +0 -0
- /package/contracts/review-provider-contract-mirror/{v1.4.0 → v1.5.0}/bundle/vectors/refuter.json +0 -0
- /package/contracts/review-provider-contract-mirror/{v1.4.0 → v1.5.0}/bundle/vectors/targeted-validator.json +0 -0
|
@@ -703,6 +703,29 @@ function decodeReviewEscalationV1(value , label )
|
|
|
703
703
|
|
|
704
704
|
|
|
705
705
|
|
|
706
|
+
|
|
707
|
+
|
|
708
|
+
|
|
709
|
+
|
|
710
|
+
|
|
711
|
+
|
|
712
|
+
|
|
713
|
+
|
|
714
|
+
|
|
715
|
+
|
|
716
|
+
|
|
717
|
+
|
|
718
|
+
|
|
719
|
+
|
|
720
|
+
|
|
721
|
+
|
|
722
|
+
|
|
723
|
+
|
|
724
|
+
|
|
725
|
+
|
|
726
|
+
|
|
727
|
+
|
|
728
|
+
|
|
706
729
|
|
|
707
730
|
|
|
708
731
|
|
|
@@ -2049,8 +2072,9 @@ export function decodeReviewStatusV3(value ) {
|
|
|
2049
2072
|
// branch's contract, ahead of the released v8) adds nothing at this top
|
|
2050
2073
|
// level either: its one addition is the host-mediated role `submission`
|
|
2051
2074
|
// on a next_transition.collect input (gentle-pi#311 P3), gated on v9 in
|
|
2052
|
-
// decodeCollectInput, not here.
|
|
2053
|
-
//
|
|
2075
|
+
// decodeCollectInput, not here. Its one top-level key is the opt-in
|
|
2076
|
+
// `non_blocking_findings` (gentle-ai#6088), decoded below. v3 keeps
|
|
2077
|
+
// rejecting every v5/v6/v7/v8/v9-only field.
|
|
2054
2078
|
const schema = typeof value === "object" && value !== null ? (value ).schema : undefined;
|
|
2055
2079
|
const v9 = schema === "gentle-ai.review-integration.status/v9";
|
|
2056
2080
|
const v8 = v9 || schema === "gentle-ai.review-integration.status/v8";
|
|
@@ -2059,7 +2083,7 @@ export function decodeReviewStatusV3(value ) {
|
|
|
2059
2083
|
const v5 = v6 || schema === "gentle-ai.review-integration.status/v5";
|
|
2060
2084
|
const body = exactRecord(value, "status", [
|
|
2061
2085
|
"schema", "contract", "operation", "applicability", "action", "replayability", "target_identity", "projection", "repair", "candidates",
|
|
2062
|
-
], ["authority", "frozen", "action_disposition", "eligibility", "next_transition", "authority_target_identity", ...(v5 ? ["receipt", "forecast", "repository_context", "validation_request"] : []), ...(v7 ? ["eligible_untracked_inventory", "escalation"] : [])]);
|
|
2086
|
+
], ["authority", "frozen", "action_disposition", "eligibility", "next_transition", "authority_target_identity", ...(v5 ? ["receipt", "forecast", "repository_context", "validation_request"] : []), ...(v7 ? ["eligible_untracked_inventory", "escalation"] : []), ...(v9 ? ["non_blocking_findings"] : [])]);
|
|
2063
2087
|
requireIdentity(body, v9 ? "gentle-ai.review-integration.status/v9" : v8 ? "gentle-ai.review-integration.status/v8" : v7 ? "gentle-ai.review-integration.status/v7" : v6 ? "gentle-ai.review-integration.status/v6" : v5 ? "gentle-ai.review-integration.status/v5" : "gentle-ai.review-integration.status/v3", REVIEW_INTEGRATION_OPERATION.STATUS);
|
|
2064
2088
|
|
|
2065
2089
|
const applicability = enumeration(body.applicability, ["current_target", "unrelated", "ambiguous", "corrupted"] , "status.applicability");
|
|
@@ -2156,6 +2180,16 @@ export function decodeReviewStatusV3(value ) {
|
|
|
2156
2180
|
? sha256(body.eligible_untracked_inventory, "status.eligible_untracked_inventory")
|
|
2157
2181
|
: undefined;
|
|
2158
2182
|
|
|
2183
|
+
// status/v9 opt-in (gentle-ai#6088): the same rule as the provider's schema,
|
|
2184
|
+
// a current compact-v2 authority in correction_required or escalated.
|
|
2185
|
+
let nonBlockingFindings ;
|
|
2186
|
+
if (Object.hasOwn(body, "non_blocking_findings")) {
|
|
2187
|
+
if (authority?.version !== REVIEW_AUTHORITY_VERSION.COMPACT_V2 || (authority.state !== "correction_required" && authority.state !== "escalated")) {
|
|
2188
|
+
throw new TypeError("status.non_blocking_findings requires a current compact-v2 authority in correction_required or escalated");
|
|
2189
|
+
}
|
|
2190
|
+
nonBlockingFindings = decodeReviewNonBlockingFindingsV1(body.non_blocking_findings, "status.non_blocking_findings");
|
|
2191
|
+
}
|
|
2192
|
+
|
|
2159
2193
|
return {
|
|
2160
2194
|
contract: REVIEW_INTEGRATION_CONTRACT,
|
|
2161
2195
|
applicability,
|
|
@@ -2176,10 +2210,29 @@ export function decodeReviewStatusV3(value ) {
|
|
|
2176
2210
|
...(validationRequest === undefined ? {} : { validationRequest }),
|
|
2177
2211
|
...(escalation === undefined ? {} : { escalation }),
|
|
2178
2212
|
...(eligibleUntrackedInventory === undefined ? {} : { eligibleUntrackedInventory }),
|
|
2213
|
+
...(nonBlockingFindings === undefined ? {} : { nonBlockingFindings }),
|
|
2179
2214
|
raw: body,
|
|
2180
2215
|
};
|
|
2181
2216
|
}
|
|
2182
2217
|
|
|
2218
|
+
function decodeReviewNonBlockingFindingsV1(value , label ) {
|
|
2219
|
+
const body = exactRecord(value, label, ["statement", "findings"]);
|
|
2220
|
+
return {
|
|
2221
|
+
statement: nonempty(body.statement, `${label}.statement`),
|
|
2222
|
+
findings: array(body.findings, `${label}.findings`, (entry, itemLabel) => {
|
|
2223
|
+
const finding = exactRecord(entry, itemLabel, ["id", "severity", "disposition", "claim"], ["lens", "location"]);
|
|
2224
|
+
return {
|
|
2225
|
+
id: nonempty(finding.id, `${itemLabel}.id`),
|
|
2226
|
+
...(finding.lens === undefined ? {} : { lens: nonempty(finding.lens, `${itemLabel}.lens`) }),
|
|
2227
|
+
...(finding.location === undefined ? {} : { location: nonempty(finding.location, `${itemLabel}.location`) }),
|
|
2228
|
+
severity: nonempty(finding.severity, `${itemLabel}.severity`),
|
|
2229
|
+
disposition: enumeration(finding.disposition, Object.values(REVIEW_ADVISORY_FINDING_DISPOSITION), `${itemLabel}.disposition`),
|
|
2230
|
+
claim: text(finding.claim, `${itemLabel}.claim`),
|
|
2231
|
+
};
|
|
2232
|
+
}),
|
|
2233
|
+
};
|
|
2234
|
+
}
|
|
2235
|
+
|
|
2183
2236
|
// ---------------------------------------------------------------------------
|
|
2184
2237
|
// consent/v2 — net-new. The typed per-candidate blocking consent question
|
|
2185
2238
|
// emitted by negotiated v2 START when the caller declared --consent relay.
|
package/scripts/bootstrap.cmd
CHANGED
|
@@ -20,7 +20,7 @@ rem Bundle/dependency checks precede ALL acquisition and per-user writes.
|
|
|
20
20
|
" if ($item.PSIsContainer -or ($item.Attributes -band [IO.FileAttributes]::ReparsePoint)) { throw 'Unsafe bundle file' };" ^
|
|
21
21
|
"};" ^
|
|
22
22
|
"$metadata = Get-Content -LiteralPath (Join-Path $bundle 'package.json') -Raw | ConvertFrom-Json;" ^
|
|
23
|
-
"if ($metadata.engines.node -notmatch '
|
|
23
|
+
"if ($metadata.engines.node -notmatch '^(\^[1-9][0-9]*|>=[0-9]+)\.[0-9]+\.[0-9]+(\s*\|\|\s*(\^[1-9][0-9]*|>=[0-9]+)\.[0-9]+\.[0-9]+)*$' -or $metadata.packageManager -ne 'pnpm@11.1.1') { throw 'Repository prerequisite unknown' };" ^
|
|
24
24
|
"} catch { [Console]::Error.WriteLine('Bootstrap: future wizard/dependent bundle file missing, unsupported metadata, or managed policy denial. No acquisition attempted.'); exit 1 } }"
|
|
25
25
|
if errorlevel 1 goto failed
|
|
26
26
|
|
|
@@ -199,7 +199,7 @@ rem The acquired Node still has to pass every check; unknown versions still refu
|
|
|
199
199
|
"$step = 'version'; $version = $text.Trim(); if ($version -notmatch '^v(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)$') { throw 'version-format' };" ^
|
|
200
200
|
"$actual = [Version]$version.Substring(1); $metadata = Get-Content -LiteralPath (Join-Path $env:GENTLE_BOOTSTRAP_BUNDLE 'package.json') -Raw | ConvertFrom-Json;" ^
|
|
201
201
|
"if ($acquired -and $version -ne 'v24.21.0') { throw 'acquired-version' };" ^
|
|
202
|
-
"if ($actual -lt [Version]'24.3.0' -or $
|
|
202
|
+
"if ($actual -lt [Version]'24.3.0' -or -not (@($metadata.engines.node -split '\s*\|\|\s*' | Where-Object { $floor = [Version]$_.TrimStart('^', '>', '='); $actual -ge $floor -and (-not $_.StartsWith('^') -or $actual.Major -eq $floor.Major) }).Count -gt 0)) { if ($acquired) { throw 'engine' }; [IO.File]::Delete((Join-Path $tools '.node-target')) };" ^
|
|
203
203
|
"} catch { $reason = 'unexpected-' + $step; if ($_.Exception.Message -cmatch '^(policy|missing-target|unsafe-target|unsafe-path|(target|parent|ancestor)-(reparse|owner|acl-mask)|no-start|deadline|output-limit|exit-code|version-format|engine|acquired-version)$') { $reason = $_.Exception.Message };" ^
|
|
204
204
|
"if (-not $acquired -and $reason -cmatch '^(unsafe-target|unsafe-path|(target|parent|ancestor)-(reparse|owner|acl-mask))$') { [IO.File]::Delete((Join-Path $env:GENTLE_BOOTSTRAP_TOOLS '.node-target')) }" ^
|
|
205
205
|
"else { [Console]::Error.WriteLine('Bootstrap: Node version, execution, deadline, output bound or policy check failed; refusing replacement. Reason: ' + $reason); exit 1 } }" ^
|
package/scripts/bootstrap.sh
CHANGED
|
@@ -21,8 +21,27 @@ done
|
|
|
21
21
|
[ -d "$HOME" ] || fail 'HOME directory is missing'
|
|
22
22
|
uid=$(id -u)
|
|
23
23
|
ls -nd "$HOME" | awk -v uid="$uid" '$3 == uid && substr($1,6,1) != "w" && substr($1,9,1) != "w" {ok=1} END {exit !ok}' || fail 'Unsafe HOME ownership or permissions'
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
# The repository's engines.node: retain the original field scan and validate every
|
|
25
|
+
# clause against nodeRequirementClauses before probing or acquisition.
|
|
26
|
+
requirement=$(awk -F '"' '
|
|
27
|
+
{for (i=2; i<=NF-2; i+=2) if ($i == "node" && $(i+2) ~ /^(\^|>=)[0-9]+\.[0-9]+\.[0-9]+( *\|\| *(\^|>=)[0-9]+\.[0-9]+\.[0-9]+)*$/) {value=$(i+2); count++}}
|
|
28
|
+
END {
|
|
29
|
+
if (count != 1) exit
|
|
30
|
+
range = value; gsub(/ /, "", range); n = split(range, clauses, "[|][|]")
|
|
31
|
+
for (c=1; c<=n; c++) {
|
|
32
|
+
caret = substr(clauses[c],1,1) == "^"
|
|
33
|
+
sub(/^(\^|>=)/, "", clauses[c]); split(clauses[c], parts, ".")
|
|
34
|
+
if (caret && parts[1] == "0") exit
|
|
35
|
+
for (j=1; j<=3; j++) {
|
|
36
|
+
p = parts[j]
|
|
37
|
+
if ((length(p) > 1 && substr(p,1,1) == "0") || length(p) > 16 ||
|
|
38
|
+
(length(p) == 16 && (substr(p,1,8)+0 > 90071992 ||
|
|
39
|
+
(substr(p,1,8)+0 == 90071992 && substr(p,9,8)+0 > 54740991)))) exit
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
print value
|
|
43
|
+
}' "$bundle/package.json")
|
|
44
|
+
[ -n "$requirement" ] || fail 'Cannot establish repository Node requirement'
|
|
26
45
|
version_ok() {
|
|
27
46
|
awk -v value="$1" -v minimum="$2" 'BEGIN {
|
|
28
47
|
sub(/^v/, "", value)
|
|
@@ -37,6 +56,24 @@ version_ok() {
|
|
|
37
56
|
}
|
|
38
57
|
# Any stable version at all: version_ok against 0.0.0 accepts exactly those.
|
|
39
58
|
stable_version() { version_ok "$1" 0.0.0; }
|
|
59
|
+
# A stable version inside the repository range: any clause matches, and ^a.b.c
|
|
60
|
+
# also keeps the major (so ^22.19.0 || >=23.6.0 refuses 23.0-23.5).
|
|
61
|
+
node_ok() {
|
|
62
|
+
stable_version "$1" || return 1
|
|
63
|
+
awk -v value="$1" -v range="$requirement" 'BEGIN {
|
|
64
|
+
sub(/^v/, "", value); split(value, a, ".")
|
|
65
|
+
gsub(/ /, "", range); n = split(range, clauses, "[|][|]")
|
|
66
|
+
for (c=1; c<=n; c++) {
|
|
67
|
+
clause = clauses[c]; caret = substr(clause, 1, 1) == "^"
|
|
68
|
+
sub(/^(\^|>=)/, "", clause); split(clause, b, ".")
|
|
69
|
+
if (caret && (b[1]+0 == 0 || a[1]+0 != b[1]+0)) continue
|
|
70
|
+
ok = 1
|
|
71
|
+
for (i=1; i<=3; i++) { if (a[i]+0 > b[i]+0) break; if (a[i]+0 < b[i]+0) { ok = 0; break } }
|
|
72
|
+
if (ok) exit 0
|
|
73
|
+
}
|
|
74
|
+
exit 1
|
|
75
|
+
}'
|
|
76
|
+
}
|
|
40
77
|
# A stock POSIX watchdog avoids assuming GNU timeout on macOS.
|
|
41
78
|
# These fixed prerequisite probes get an unignorable deadline, not graceful TERM.
|
|
42
79
|
# Signal only our direct child PID; do not kill inherited process groups.
|
|
@@ -91,7 +128,7 @@ acquire_node=1
|
|
|
91
128
|
if command -v node >/dev/null 2>&1; then
|
|
92
129
|
node=$(command -v node)
|
|
93
130
|
version=$(bounded 10 "$node" --version 2>/dev/null) || fail 'Existing Node version probe failed'
|
|
94
|
-
if
|
|
131
|
+
if node_ok "$version"; then acquire_node=0
|
|
95
132
|
# An older stable Node is left as it is: the verified Node below runs the
|
|
96
133
|
# installer instead, exactly as when Node is absent.
|
|
97
134
|
elif ! stable_version "$version"; then fail 'Existing Node is incompatible or unknown; refusing replacement'; fi
|
|
@@ -146,7 +183,7 @@ if [ "$acquire_node" = 1 ]; then
|
|
|
146
183
|
candidate=$tools/staging/$member
|
|
147
184
|
[ -f "$candidate" ] && [ ! -L "$candidate" ] || fail 'Node executable missing or unsafe'
|
|
148
185
|
version=$(bounded 10 "$candidate" --version 2>/dev/null) || fail 'Acquired Node cannot execute on this native platform'
|
|
149
|
-
[ "$version" = v24.21.0 ] &&
|
|
186
|
+
[ "$version" = v24.21.0 ] && node_ok "$version" || fail 'Acquired Node version rejected'
|
|
150
187
|
bounded 10 chmod 700 "$candidate" 2>/dev/null || fail 'Cannot secure acquired Node executable'
|
|
151
188
|
[ ! -e "$tools/node" ] && [ ! -L "$tools/node" ] || fail 'Conflicting Node destination'
|
|
152
189
|
mv "$tools/staging/$stem" "$tools/node" || fail 'Cannot publish verified Node'
|
|
@@ -101,6 +101,10 @@ export function renderFullDelegationCard(assetsDir) {
|
|
|
101
101
|
const differential = paragraph(delegation, "**Differential check (PRESERVE):**", delegationSource);
|
|
102
102
|
const launch = rewrite(section(delegation, "## Launch", delegationSource), [
|
|
103
103
|
[" before launching a writer (`orchestrator-writer.md`).", " before launching a writer (below)."],
|
|
104
|
+
// ceremony-diet S2: the card's first launch bullet restates the always-on
|
|
105
|
+
// "derive nonempty surfaces" rule and core Safety's parallel-writer rule; both
|
|
106
|
+
// already live in the injected prompt, so the card drops them (pure dedup).
|
|
107
|
+
["- Derive nonempty `## Allowed edit surfaces` before launching a writer (below). Parallel writers only with disjoint Allowed edit surfaces (runtime-enforced) or isolated worktrees.\n", ""],
|
|
104
108
|
["Otherwise run in the foreground. Detail: reference.", "Otherwise run in the foreground. Detail: below."],
|
|
105
109
|
["report the capability gap; a fired trigger is never replaced by inline work.", "report the capability gap; never do the work yourself instead."],
|
|
106
110
|
], delegationSource);
|
|
@@ -38,7 +38,7 @@ const WINDOWS_SYSTEM_ROOT = "C:\\Windows";
|
|
|
38
38
|
// version check below) derives from this constant instead of repeating the
|
|
39
39
|
// literal, so a pin bump cannot leave a stale copy behind. See
|
|
40
40
|
// scripts/install-gentle-ai.mjs for the incident that motivated this.
|
|
41
|
-
export const INSTALLER_VERSION = "4.
|
|
41
|
+
export const INSTALLER_VERSION = "4.5.0";
|
|
42
42
|
export const RELEASE_BASE_URL = `https://github.com/Gentleman-Programming/gentle-ai/releases/download/v${INSTALLER_VERSION}/`;
|
|
43
43
|
export const GENTLE_AI_INSTALL_METHOD = Object.freeze({
|
|
44
44
|
SIGNED_RELEASE_ASSET: "signed-release-asset",
|
|
@@ -47,11 +47,11 @@ export const GENTLE_AI_INSTALL_METHOD = Object.freeze({
|
|
|
47
47
|
export const GENTLE_AI_WINDOWS_SOURCE_PACKAGE_PATH = "github.com/gentleman-programming/gentle-ai/v4/cmd/gentle-ai";
|
|
48
48
|
export const GENTLE_AI_WINDOWS_SOURCE_MODULE = "github.com/gentleman-programming/gentle-ai/v4";
|
|
49
49
|
export const GENTLE_AI_WINDOWS_SOURCE_TAG = `v${INSTALLER_VERSION}`;
|
|
50
|
-
// `go mod download -json github.com/gentleman-programming/gentle-ai/v4@v4.
|
|
50
|
+
// `go mod download -json github.com/gentleman-programming/gentle-ai/v4@v4.5.0`
|
|
51
51
|
// with GOSUMDB=sum.golang.org reports this exact module SumDB checksum, and the
|
|
52
|
-
// tag resolves to commit
|
|
52
|
+
// tag resolves to commit f2f7d7b16c2cf1afe5e07f717cf8265946ac3feb, the published v4.5.0 release head.
|
|
53
53
|
// v4.0.0 moved the Go module path to the /v4 major-version suffix.
|
|
54
|
-
export const GENTLE_AI_WINDOWS_SOURCE_MODULE_CHECKSUM = "h1:
|
|
54
|
+
export const GENTLE_AI_WINDOWS_SOURCE_MODULE_CHECKSUM = "h1:81Hsy+cboAbUse1ORVJuwji6V9sRIGlFwC73EtMdw0c=";
|
|
55
55
|
export const GENTLE_AI_WINDOWS_SOURCE_PACKAGE = `${GENTLE_AI_WINDOWS_SOURCE_PACKAGE_PATH}@${GENTLE_AI_WINDOWS_SOURCE_TAG}`;
|
|
56
56
|
export const GENTLE_AI_WINDOWS_MINIMUM_GO_VERSION = "1.25.10";
|
|
57
57
|
export const GENTLE_AI_GO_TOOLCHAIN_UNAVAILABLE_CODE = "GENTLE_AI_GO_TOOLCHAIN_UNAVAILABLE";
|
|
@@ -70,7 +70,7 @@ export class GentleAiInstallerError extends Error {
|
|
|
70
70
|
// Sentinel used while a re-pinned gentle-ai release is not yet published. A
|
|
71
71
|
// sentinel digest can never match a real SHA-256, so installation fails closed,
|
|
72
72
|
// and verify-package-files.mjs refuses to pack/publish while any digest below
|
|
73
|
-
// still holds it. The v4.
|
|
73
|
+
// still holds it. The v4.5.0 digests are pinned from the published release:
|
|
74
74
|
// archive sha256 values verified against the minisign-signed checksums.txt and
|
|
75
75
|
// freshly computed hashes; binary sha256 values computed from the extracted
|
|
76
76
|
// executables.
|
|
@@ -114,15 +114,15 @@ async function downloadPinnedGentleAiAsset(asset, destination, options) {
|
|
|
114
114
|
}
|
|
115
115
|
|
|
116
116
|
// Windows is absent from signed release archives on purpose. gentle-ai stopped
|
|
117
|
-
// distributing unsigned Windows builds in c4b764d0, so v4.
|
|
117
|
+
// distributing unsigned Windows builds in c4b764d0, so v4.5.0 publishes signed
|
|
118
118
|
// Darwin/Linux archives only. Windows x64/arm64 uses the separately verified
|
|
119
119
|
// exact-tag Go SumDB source-build path below; restore archive rows only when
|
|
120
120
|
// upstream ships signed Windows assets.
|
|
121
121
|
export const GENTLE_AI_RELEASE_ASSETS = Object.freeze({
|
|
122
|
-
"darwin/amd64": asset("gentle-ai_4.
|
|
123
|
-
"darwin/arm64": asset("gentle-ai_4.
|
|
124
|
-
"linux/amd64": asset("gentle-ai_4.
|
|
125
|
-
"linux/arm64": asset("gentle-ai_4.
|
|
122
|
+
"darwin/amd64": asset("gentle-ai_4.5.0_darwin_amd64.tar.gz", "45c65d04fb429f8065682360d9a3c650d988842fe62f843b36598953c8acc0a1", "4b89ffad9ee7fb1ed70058bd6f73914dc6256aea6c79998838ca2d2c363f24b4", "gentle-ai"),
|
|
123
|
+
"darwin/arm64": asset("gentle-ai_4.5.0_darwin_arm64.tar.gz", "b8522090394d93aa5dd8d3f5c80982e6163c4d5d2e7952c3c1917da8a150ae31", "699a44555e544447f5db342b918aa8558b5e0e3213bb9404b66863319b1f58d4", "gentle-ai"),
|
|
124
|
+
"linux/amd64": asset("gentle-ai_4.5.0_linux_amd64.tar.gz", "6dfd0a6fc27122541d20da4b65ec449763e672051daf2069611ca33134270c5b", "76295de0b0abae140f0356d2da5a9955f8770f54c9d7a9b7ac768821126d5fe3", "gentle-ai"),
|
|
125
|
+
"linux/arm64": asset("gentle-ai_4.5.0_linux_arm64.tar.gz", "a0a8bf642abbdcb8b93013ab3f2ff90d01c9087a27927c93d980ddb57de74378", "7820589547c4dddcc130532643aa5ba001667525d2a0fbec1189a8398ceacfa6", "gentle-ai"),
|
|
126
126
|
});
|
|
127
127
|
|
|
128
128
|
// A pinned asset is either a signed archive or, for a prerelease pin only,
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// release asset is fetched with node:https, whose client ignores HTTPS_PROXY,
|
|
4
4
|
// HTTP_PROXY and NO_PROXY unless the process opts in, and Node only grew that
|
|
5
5
|
// opt-in in v24 (NODE_USE_ENV_PROXY / --use-env-proxy) while this package
|
|
6
|
-
// supports
|
|
6
|
+
// supports Node ^22.19.0 || >=23.6.0. The tunnel below is the portable equivalent of
|
|
7
7
|
// that opt-in: it opens a CONNECT tunnel to the proxy and speaks TLS to the
|
|
8
8
|
// origin host through it, so the origin's own certificate still decides
|
|
9
9
|
// whether the connection is trusted and the proxy never sees the request.
|
|
@@ -44,15 +44,15 @@ export const goPinVersion = go.version;
|
|
|
44
44
|
// checksums.txt and GitHub's asset digests; every archive was downloaded and
|
|
45
45
|
// re-hashed before pinning. GitHub serves the assets from its asset hosts.
|
|
46
46
|
const engram = Object.freeze({
|
|
47
|
-
version: "3.
|
|
47
|
+
version: "3.7.2",
|
|
48
48
|
redirectHosts: Object.freeze(["objects.githubusercontent.com", "release-assets.githubusercontent.com"]),
|
|
49
49
|
archives: Object.freeze({
|
|
50
|
-
"darwin-arm64": ["darwin_arm64.tar.gz", "
|
|
51
|
-
"darwin-x64": ["darwin_amd64.tar.gz", "
|
|
52
|
-
"linux-x64": ["linux_amd64.tar.gz", "
|
|
53
|
-
"linux-arm64": ["linux_arm64.tar.gz", "
|
|
54
|
-
"win32-x64": ["windows_amd64.zip", "
|
|
55
|
-
"win32-arm64": ["windows_arm64.zip", "
|
|
50
|
+
"darwin-arm64": ["darwin_arm64.tar.gz", "f96e08db8f47ca49ebc034eba30e468db81eb56df98f9bf21a73366b510695e4", 8001813],
|
|
51
|
+
"darwin-x64": ["darwin_amd64.tar.gz", "d35623443a5d85e8f78338cda5d0bb73b2f7ec6217a57e4abb71904a3e0d6287", 8488340],
|
|
52
|
+
"linux-x64": ["linux_amd64.tar.gz", "8db9d5db1c1574b8b830aac4ffbe86c024014aed6b9a3f0406ac3361a152cdf0", 8365851],
|
|
53
|
+
"linux-arm64": ["linux_arm64.tar.gz", "cdbbcb68d3e842d3e52e27edccef55e6fe98ce3cdbc90cd79894323b029efb50", 7712574],
|
|
54
|
+
"win32-x64": ["windows_amd64.zip", "515a716ce966202058d4b9f310626fde72583cfc64ccefbf0dcc81456260089c", 8582764],
|
|
55
|
+
"win32-arm64": ["windows_arm64.zip", "01e4f5dab2f941cf810d1373e7c6998c014499bee9c2d5783e34da94c70ac7f2", 7780232],
|
|
56
56
|
}),
|
|
57
57
|
});
|
|
58
58
|
/** The Engram version the bundled install publishes under runtime/. */
|
|
@@ -206,6 +206,32 @@ export function compatibleEngine(range, version) {
|
|
|
206
206
|
}
|
|
207
207
|
return true;
|
|
208
208
|
}
|
|
209
|
+
// The repository's engines.node: clauses `^a.b.c` (a >= 1) or `>=a.b.c` joined by
|
|
210
|
+
// `||`. Anything else is not a supported requirement. pnpm engine evidence keeps
|
|
211
|
+
// using compatibleEngine, which accepts only one lower bound.
|
|
212
|
+
const NODE_CLAUSE = /^(\^|>=)(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)$/;
|
|
213
|
+
export function nodeRequirementClauses(range) {
|
|
214
|
+
if (typeof range !== "string") return null;
|
|
215
|
+
const clauses = [];
|
|
216
|
+
for (const text of range.trim().split(/\s*\|\|\s*/)) {
|
|
217
|
+
const match = NODE_CLAUSE.exec(text);
|
|
218
|
+
const floor = match ? parts(`${match[2]}.${match[3]}.${match[4]}`) : null;
|
|
219
|
+
if (!floor || (match[1] === "^" && floor[0] === 0)) return null;
|
|
220
|
+
clauses.push({ caret: match[1] === "^", floor });
|
|
221
|
+
}
|
|
222
|
+
return clauses;
|
|
223
|
+
}
|
|
224
|
+
/** Whether a stable Node version meets the repository's engines.node range. */
|
|
225
|
+
export function nodeRequirementSatisfied(range, version) {
|
|
226
|
+
const clauses = nodeRequirementClauses(range);
|
|
227
|
+
const actual = parts(version);
|
|
228
|
+
if (!clauses || !actual) return false;
|
|
229
|
+
return clauses.some(({ caret, floor }) => {
|
|
230
|
+
const index = [0, 1, 2].find((i) => actual[i] !== floor[i]);
|
|
231
|
+
const atLeast = index === undefined || actual[index] > floor[index];
|
|
232
|
+
return atLeast && (!caret || actual[0] === floor[0]);
|
|
233
|
+
});
|
|
234
|
+
}
|
|
209
235
|
function stat(path) {
|
|
210
236
|
try { return lstatSync(path); }
|
|
211
237
|
catch (error) { if (error.code === "ENOENT") return null; throw error; }
|
|
@@ -624,7 +650,7 @@ export async function bootstrap(bundle, suppliedTools, { env = process.env, adap
|
|
|
624
650
|
const entry = join(bundle, "bin/gentle-shell-install.mjs");
|
|
625
651
|
if (!regular(entry)) throw new Error("Future wizard entry is missing");
|
|
626
652
|
const metadata = JSON.parse(readFileSync(join(bundle, "package.json"), "utf8"));
|
|
627
|
-
if (!
|
|
653
|
+
if (!nodeRequirementSatisfied(metadata.engines?.node, process.versions.node)) throw new Error("Node requirement rejected");
|
|
628
654
|
if (metadata.packageManager !== `pnpm@${pnpm.version}`) throw new Error("pnpm acquisition pin differs from repository; update verified descriptors first");
|
|
629
655
|
let tools = suppliedTools;
|
|
630
656
|
let created = false;
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
INSTALLER_VERSION,
|
|
5
5
|
GENTLE_AI_WINDOWS_MINIMUM_GO_VERSION,
|
|
6
6
|
} from "./gentle-ai-installer.mjs";
|
|
7
|
-
import { artifactFor, goPinVersion } from "./installer-downloads.mjs";
|
|
7
|
+
import { artifactFor, goPinVersion, nodeRequirementClauses, nodeRequirementSatisfied } from "./installer-downloads.mjs";
|
|
8
8
|
|
|
9
9
|
// Read package metadata only: never import the launcher or execute postinstall.
|
|
10
10
|
const metadata = JSON.parse(readFileSync(new URL("../package.json", import.meta.url), "utf8"));
|
|
@@ -12,8 +12,14 @@ function minimum(range) {
|
|
|
12
12
|
if (!/^>=\d+\.\d+\.\d+$/.test(range)) throw new Error("Unsupported preflight requirement range");
|
|
13
13
|
return range.slice(2);
|
|
14
14
|
}
|
|
15
|
+
// Node keeps the whole range (for example ^22.19.0 || >=23.6.0): a single
|
|
16
|
+
// minimum would accept the unsupported 23.0-23.5 releases.
|
|
17
|
+
function nodeRange(range) {
|
|
18
|
+
if (!nodeRequirementClauses(range)) throw new Error("Unsupported preflight requirement range");
|
|
19
|
+
return range;
|
|
20
|
+
}
|
|
15
21
|
export const requirements = Object.freeze({
|
|
16
|
-
node:
|
|
22
|
+
node: nodeRange(metadata.engines.node),
|
|
17
23
|
pi: minimum(metadata.peerDependencies["@earendil-works/pi-coding-agent"]),
|
|
18
24
|
// pnpm pack can omit packageManager; acquisition still has a verified pin.
|
|
19
25
|
pnpm: metadata.packageManager?.replace(/^pnpm@/, "") ?? artifactFor("pnpm").version,
|
|
@@ -25,7 +31,7 @@ export const requirements = Object.freeze({
|
|
|
25
31
|
/** Legacy Pi pin retained for verified distribution and compatibility checks.
|
|
26
32
|
* Global installs resolve the latest stable Pi after consent instead.
|
|
27
33
|
*/
|
|
28
|
-
export const PI_INSTALL_VERSION = "1.5.
|
|
34
|
+
export const PI_INSTALL_VERSION = "1.5.2";
|
|
29
35
|
|
|
30
36
|
/** Runtime persisted under PNPM_HOME. Bootstrap-only Node: `pnpm runtime set
|
|
31
37
|
* node <node> -g`, then `pnpm add -g npm@<npm> pnpm@<pnpm>`, or only npm when
|
|
@@ -80,7 +86,9 @@ const probeNames = ["node", "pnpm", "pi", "shell", "gentleAi", "go", "globalBin"
|
|
|
80
86
|
* tool directories) and npm (a usable npm resolves there) booleans; pnpm may
|
|
81
87
|
* add persistent (resolvable from the user's PATH). A bootstrap-only Node or
|
|
82
88
|
* pnpm may add found: the stable version of the older or incompatible one on the
|
|
83
|
-
* user's PATH
|
|
89
|
+
* user's PATH; Node adds foundInGlobalBin:true when that Node is in `$PNPM_HOME/bin`
|
|
90
|
+
* and persistence would replace it. A different Node at that destination is recorded as
|
|
91
|
+
* globalBinNode:true without running it. A pnpm probe for the user's own
|
|
84
92
|
* pnpm in `$PNPM_HOME/bin` (where persisting pnpm writes) adds inGlobalBin:true
|
|
85
93
|
* and reports that pnpm itself, never as found, or, when that pnpm is never run
|
|
86
94
|
* (untrusted:true) or reports no stable version (unchecked:true), the bootstrap's
|
|
@@ -144,20 +152,21 @@ function compareVersions(left, right) {
|
|
|
144
152
|
}
|
|
145
153
|
return 0;
|
|
146
154
|
}
|
|
147
|
-
if (
|
|
148
|
-
throw new Error("Persistent Node pin is
|
|
155
|
+
if (!nodeRequirementSatisfied(requirements.node, persistencePins.node)) {
|
|
156
|
+
throw new Error("Persistent Node pin is outside the repository Node range");
|
|
149
157
|
}
|
|
150
158
|
if (compareVersions(versionParts(goAcquisition.version), versionParts(requirements.go)) < 0) {
|
|
151
159
|
throw new Error("Go acquisition pin is below the Go requirement");
|
|
152
160
|
}
|
|
153
|
-
function classify(observation, required, extraCheck = () => true, exact = false) {
|
|
161
|
+
function classify(observation, required, extraCheck = () => true, exact = false, range = false) {
|
|
154
162
|
if (observation?.available === false) return "unavailable";
|
|
155
163
|
if (observation?.available !== true) return "unknown";
|
|
156
164
|
const version = versionParts(observation.version);
|
|
157
165
|
if (!version) return "unknown";
|
|
158
|
-
const order = compareVersions(version, versionParts(required));
|
|
159
|
-
// A known version below the minimum
|
|
160
|
-
|
|
166
|
+
const order = range ? 0 : compareVersions(version, versionParts(required));
|
|
167
|
+
// A known version below the minimum, or outside the Node range, is
|
|
168
|
+
// incompatible whether or not it runs.
|
|
169
|
+
if (order < 0 || (range && !nodeRequirementSatisfied(required, version.join(".")))) return "incompatible";
|
|
161
170
|
if (observation.usable !== true) return "unknown";
|
|
162
171
|
if (exact && order !== 0) return "incompatible";
|
|
163
172
|
const extra = extraCheck(observation);
|
|
@@ -204,7 +213,7 @@ export function planPreflight(inventory, { channel = "release" } = {}) {
|
|
|
204
213
|
blockers.push({ code: `${status}-tool`, tool: name });
|
|
205
214
|
}
|
|
206
215
|
}
|
|
207
|
-
record("node", classify(inventory.node, requirements.node), requirements.node);
|
|
216
|
+
record("node", classify(inventory.node, requirements.node, () => true, false, true), requirements.node);
|
|
208
217
|
// An older Pi whose owner (pnpm or npm) is known is updated with that package
|
|
209
218
|
// manager to the latest stable version instead of blocking; the plan records the
|
|
210
219
|
// found version and owner the update must still match. An older Pi neither
|
|
@@ -232,17 +241,17 @@ export function planPreflight(inventory, { channel = "release" } = {}) {
|
|
|
232
241
|
if (tools.pnpm.status === "reusable" && inventory.pnpm.inGlobalBin === true && inventory.pnpm.unchecked === true) {
|
|
233
242
|
tools.pnpm = { ...tools.pnpm, unchecked: true };
|
|
234
243
|
}
|
|
235
|
-
//
|
|
236
|
-
//
|
|
237
|
-
//
|
|
238
|
-
// is persisted below; the plan records both versions.
|
|
244
|
+
// The bootstrap acquired its pinned copy next to an unsupported Node or an
|
|
245
|
+
// incompatible pnpm, whose stable version is `found`. The plan records both
|
|
246
|
+
// versions and whether the found Node is in the global bin persistence replaces.
|
|
239
247
|
const replacedRuntimes = [];
|
|
240
248
|
for (const name of ["node", "pnpm"]) {
|
|
241
249
|
const seen = inventory[name];
|
|
242
250
|
const found = versionParts(seen?.found);
|
|
243
|
-
const replaced = name === "node" ? found !== null &&
|
|
251
|
+
const replaced = name === "node" ? found !== null && !nodeRequirementSatisfied(requirements.node, found.join(".")) : found !== null;
|
|
244
252
|
if (tools[name].status !== "reusable" || seen.persistent !== false || !replaced) continue;
|
|
245
|
-
tools[name] = { ...tools[name], found: found.join("."), version: persistencePins[name]
|
|
253
|
+
tools[name] = { ...tools[name], found: found.join("."), version: persistencePins[name],
|
|
254
|
+
...(name === "node" && seen.foundInGlobalBin === true ? { foundInGlobalBin: true } : {}) };
|
|
246
255
|
replacedRuntimes.push(name);
|
|
247
256
|
}
|
|
248
257
|
record("gentleAi", classify(inventory.gentleAi, requirements.gentleAi, (o) => o.compatible, true), requirements.gentleAi);
|
|
@@ -359,6 +368,8 @@ export function planPreflight(inventory, { channel = "release" } = {}) {
|
|
|
359
368
|
const pnpm = inventory.pnpm?.persistent === false;
|
|
360
369
|
if (persistable && node.persistent === false) {
|
|
361
370
|
action("persist-node", "persist-runtime", "node", persistencePins.node);
|
|
371
|
+
// Only a plan that persists Node replaces a different Node at the destination.
|
|
372
|
+
if (node.globalBinNode === true && tools.node.foundInGlobalBin !== true) tools.node = { ...tools.node, globalBinNode: true };
|
|
362
373
|
if (pnpm) action("persist-package-managers", "install-global", "package-managers");
|
|
363
374
|
else action("persist-npm", "install-global", "npm", persistencePins.npm);
|
|
364
375
|
action("configure-npm-prefix", "configure", "npm-prefix");
|
|
@@ -3,6 +3,7 @@ import { constants } from "node:fs";
|
|
|
3
3
|
import { access, lstat, readFile, realpath, stat } from "node:fs/promises";
|
|
4
4
|
import { posix, win32 } from "node:path";
|
|
5
5
|
import { gentleAiBinaryPath } from "../runtime/gentle-ai-binary.mjs";
|
|
6
|
+
import { nodeRequirementSatisfied } from "./installer-downloads.mjs";
|
|
6
7
|
import { pnpmGlobalBin, requirements } from "./installer-preflight.mjs";
|
|
7
8
|
import { installOwner } from "./main-channel.mjs";
|
|
8
9
|
import {
|
|
@@ -419,12 +420,12 @@ export function createProbes({ platform, env, run, fs, home, verifyGentleAi = pa
|
|
|
419
420
|
const nodeVersion = async (file) => exactVersion(await output(file, ["--version"], env, deadlines.version), NODE_VERSION);
|
|
420
421
|
let version = await nodeVersion(node);
|
|
421
422
|
if (!version) return unknown();
|
|
422
|
-
//
|
|
423
|
-
//
|
|
423
|
+
// The bootstrap's verified Node runs the installer when the user's Node is
|
|
424
|
+
// unsupported. Record whether persistence will replace the found global-bin Node.
|
|
424
425
|
let found = null;
|
|
425
|
-
if (persistent && bootstrap && persistent !== bootstrap && !
|
|
426
|
+
if (persistent && bootstrap && persistent !== bootstrap && !nodeRequirementSatisfied(requirements.node, version) && spawnable(bootstrap, platform)) {
|
|
426
427
|
const pinned = await nodeVersion(bootstrap);
|
|
427
|
-
if (pinned &&
|
|
428
|
+
if (pinned && nodeRequirementSatisfied(requirements.node, pinned)) [found, node, version] = [version, bootstrap, pinned];
|
|
428
429
|
}
|
|
429
430
|
// A usable npm must resolve without bootstrap tools, as in a fresh terminal.
|
|
430
431
|
let npm = null;
|
|
@@ -433,7 +434,26 @@ export function createProbes({ platform, env, run, fs, home, verifyGentleAi = pa
|
|
|
433
434
|
} catch {
|
|
434
435
|
npm = null;
|
|
435
436
|
}
|
|
436
|
-
|
|
437
|
+
let foundInGlobalBin = false;
|
|
438
|
+
if (found && globalBin) {
|
|
439
|
+
const directory = path.dirname(persistent);
|
|
440
|
+
foundInGlobalBin = samePath(directory, globalBin.path, platform);
|
|
441
|
+
if (!foundInGlobalBin) {
|
|
442
|
+
// Resolve directories, not the Node link itself (pnpm points it into its runtime store).
|
|
443
|
+
const [realDirectory, realBin] = await Promise.all([fs.realpath(directory).catch(() => null), fs.realpath(globalBin.path).catch(() => null)]);
|
|
444
|
+
foundInGlobalBin = realDirectory !== null && realBin !== null && samePath(realDirectory, realBin, platform);
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
let globalBinNode = null;
|
|
448
|
+
if (globalBin && !foundInGlobalBin && (persistent === null || found !== null)) {
|
|
449
|
+
// pnpm writes node (node.exe on Windows) here regardless of PATH order; never run it.
|
|
450
|
+
const destinationEnv = { ...user, [pathKey(user, platform)]: globalBin.path,
|
|
451
|
+
...(platform === "win32" ? { [Object.keys(user).find((key) => key.toUpperCase() === "PATHEXT") ?? "PATHEXT"]: ".EXE" } : {}) };
|
|
452
|
+
globalBinNode = await lookPath("node", destinationEnv, platform, fs);
|
|
453
|
+
}
|
|
454
|
+
return { available: true, version, usable: true, persistent: persistent !== null && found === null, npm,
|
|
455
|
+
...(found ? { found } : {}), ...(foundInGlobalBin ? { foundInGlobalBin: true } : {}),
|
|
456
|
+
...(globalBinNode ? { globalBinNode: true } : {}) };
|
|
437
457
|
},
|
|
438
458
|
async pnpm() {
|
|
439
459
|
const pnpm = await pnpmInvocation(env, platform, fs);
|
|
@@ -2,6 +2,7 @@ import { createHash, randomBytes, timingSafeEqual } from "node:crypto";
|
|
|
2
2
|
import { readFile } from "node:fs/promises";
|
|
3
3
|
import { createServer } from "node:http";
|
|
4
4
|
import { dirname, join } from "node:path";
|
|
5
|
+
import { nodeRequirementClauses, nodeRequirementSatisfied } from "./installer-downloads.mjs";
|
|
5
6
|
import { goAcquisition, requirements } from "./installer-preflight.mjs";
|
|
6
7
|
|
|
7
8
|
// Local wizard host: a dependency-free loopback HTTP server with a fixed route
|
|
@@ -248,6 +249,19 @@ const unmanaged = Object.freeze({
|
|
|
248
249
|
shell: "Gentle Shell is already installed, but neither pnpm nor npm manages it (a linked source checkout, for example), so this installer cannot update it. Nothing was replaced. Update it the way you installed it, then select Check again.",
|
|
249
250
|
});
|
|
250
251
|
const STABLE = /^v?(\d{1,6})\.(\d{1,6})\.(\d{1,6})$/;
|
|
252
|
+
/** Plain-language requirement: "1.2.0 or newer" for a minimum, and for a Node
|
|
253
|
+
* range such as ^22.19.0 || >=23.6.0 "22.19.0 or a later 22.x release, or 23.6.0 or newer". */
|
|
254
|
+
function describeRequirement(required) {
|
|
255
|
+
if (STABLE.test(required)) return `${required} or newer`;
|
|
256
|
+
const clauses = nodeRequirementClauses(required);
|
|
257
|
+
if (!clauses) return null;
|
|
258
|
+
return clauses.map(({ caret, floor }) => caret ? `${floor.join(".")} or a later ${floor[0]}.x release` : `${floor.join(".")} or newer`).join(", or ");
|
|
259
|
+
}
|
|
260
|
+
/** A found version that does not meet a minimum or Node range; false when unknown. */
|
|
261
|
+
function unmet(found, required) {
|
|
262
|
+
if (STABLE.test(required)) return older(found, required);
|
|
263
|
+
return STABLE.test(found) && nodeRequirementClauses(required) !== null && !nodeRequirementSatisfied(required, found);
|
|
264
|
+
}
|
|
251
265
|
function older(found, required) {
|
|
252
266
|
const [a, b] = [STABLE.exec(found), STABLE.exec(required)];
|
|
253
267
|
if (!a || !b) return false;
|
|
@@ -339,10 +353,10 @@ function blockerGuidance(blocker, inventory, plan) {
|
|
|
339
353
|
// An older Node left next to the bootstrap's copy is recorded in the plan.
|
|
340
354
|
const found = plan.tools?.[blocker.tool]?.found ?? inventory?.[blocker.tool]?.version;
|
|
341
355
|
const required = plan.tools?.[blocker.tool]?.required;
|
|
342
|
-
if (typeof found !== "string" || typeof required !== "string" || !
|
|
356
|
+
if (typeof found !== "string" || typeof required !== "string" || !unmet(found, required)) return fixed;
|
|
343
357
|
const version = found.replace(/^v/, "");
|
|
344
358
|
const remedy = tool.remedy ? tool.remedy(required) : "Update it";
|
|
345
|
-
return `${tool.label} ${version} is installed${tool.where}, but this installer needs ${required}
|
|
359
|
+
return `${tool.label} ${version} is installed${tool.where}, but this installer needs ${describeRequirement(required)}. Nothing was replaced. ${remedy}, then select Check again.`;
|
|
346
360
|
}
|
|
347
361
|
|
|
348
362
|
/** An older Pi's update names its found and target versions and the package
|
|
@@ -371,23 +385,36 @@ function actionDescription(action, plan) {
|
|
|
371
385
|
return actionDescriptions[action.id] ?? "Prepare the installation.";
|
|
372
386
|
}
|
|
373
387
|
|
|
374
|
-
/** An
|
|
375
|
-
*
|
|
388
|
+
/** An unsupported Node or incompatible pnpm beside the installer's pinned copy:
|
|
389
|
+
* found and pinned versions, and whether persistence replaces the found Node.
|
|
376
390
|
* Nothing promises PATH precedence: a version manager may prepend its own again.
|
|
377
391
|
*/
|
|
378
392
|
function alongsideNotes(plan) {
|
|
379
393
|
const notes = [];
|
|
380
394
|
const node = plan.tools?.node;
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
395
|
+
const needs = typeof node?.required === "string" ? describeRequirement(node.required) : null;
|
|
396
|
+
if (STABLE.test(node?.found ?? "") && STABLE.test(node.version ?? "") && needs !== null) {
|
|
397
|
+
const persisting = plan.actions.some((action) => action.id === "persist-node");
|
|
398
|
+
const replacing = node.foundInGlobalBin === true && persisting;
|
|
399
|
+
const foundOnPath = persisting && node.globalBinNode === true ? " found first on PATH" : "";
|
|
400
|
+
notes.push(replacing
|
|
401
|
+
? `Node.js ${node.found} on this computer is not a version Gentle Shell supports (it needs ${needs}). ` +
|
|
402
|
+
`Your Node.js ${node.found} is managed by pnpm under $PNPM_HOME and will be replaced by the pinned Node.js ${node.version}.`
|
|
403
|
+
: `Node.js ${node.found} on this computer is not a version Gentle Shell supports (it needs ${needs}), so the installer uses its pinned Node.js ${node.version} ` +
|
|
404
|
+
`and installs it under $PNPM_HOME. Your Node.js ${node.found}${foundOnPath} is left unchanged.`);
|
|
384
405
|
}
|
|
385
406
|
const pnpm = plan.tools?.pnpm;
|
|
386
407
|
if (STABLE.test(pnpm?.found ?? "") && STABLE.test(pnpm.version ?? "")) {
|
|
387
408
|
notes.push(`pnpm ${pnpm.found} on this computer is not a pnpm ${pnpm.version.split(".")[0]} release this installer can use, ` +
|
|
388
409
|
`so the installer uses its pinned pnpm ${pnpm.version} and installs it under $PNPM_HOME. Your pnpm ${pnpm.found} is left unchanged.`);
|
|
389
410
|
}
|
|
390
|
-
|
|
411
|
+
const hasAlongside = notes.length > 0;
|
|
412
|
+
const persistNode = plan.actions.find((action) => action.id === "persist-node");
|
|
413
|
+
if (persistNode && node?.globalBinNode === true && node.foundInGlobalBin !== true) {
|
|
414
|
+
const pin = STABLE.test(persistNode.version ?? "") ? ` ${persistNode.version}` : "";
|
|
415
|
+
notes.push(`The Node.js already in $PNPM_HOME will be replaced by the pinned Node.js${pin}.`);
|
|
416
|
+
}
|
|
417
|
+
if (hasAlongside) notes.push("A version manager such as `mise activate` may still put your own versions first on PATH in new terminals.");
|
|
391
418
|
return notes;
|
|
392
419
|
}
|
|
393
420
|
|
|
@@ -494,6 +521,7 @@ function planView(planId, { inventory, plan }) {
|
|
|
494
521
|
const changesProfile = ids.includes("setup-global-bin") || (privateHome !== null && inventory?.globalBin?.onPath !== true);
|
|
495
522
|
let tools = [];
|
|
496
523
|
const alongside = alongsideNotes(plan);
|
|
524
|
+
const replacesNode = ids.includes("persist-node") && (plan.tools?.node?.foundInGlobalBin === true || plan.tools?.node?.globalBinNode === true);
|
|
497
525
|
// A persistent pnpm next to a bootstrap-only Node is kept (persist-npm), never replaced.
|
|
498
526
|
if (ids.includes("persist-node")) tools = ids.includes("persist-npm") ? ["node", "npm"] : ["node", "npm", "pnpm"];
|
|
499
527
|
else if (ids.includes("persist-package-managers")) tools = ["npm", "pnpm"];
|
|
@@ -528,8 +556,9 @@ function planView(planId, { inventory, plan }) {
|
|
|
528
556
|
persistence: {
|
|
529
557
|
tools,
|
|
530
558
|
pnpmHome,
|
|
559
|
+
...(replacesNode ? { replacesNode: true } : {}),
|
|
531
560
|
description: tools.length > 0
|
|
532
|
-
? [`${tools.join(", ")} will be installed under $PNPM_HOME (${pnpmHome ?? "pnpm's home directory"}) so new terminals keep working after the temporary installer tools are removed
|
|
561
|
+
? [`${tools.join(", ")} will be installed under $PNPM_HOME (${pnpmHome ?? "pnpm's home directory"}) so new terminals keep working after the temporary installer tools are removed.${replacesNode ? "" : " Existing installations are not replaced."}`, ...alongside, ...(unchecked ? [unchecked] : [])].join(" ")
|
|
533
562
|
: unchecked ? `No runtime needs to be installed under $PNPM_HOME. ${unchecked}`
|
|
534
563
|
: "No runtime needs to be installed under $PNPM_HOME; your existing Node.js, npm and pnpm are reused.",
|
|
535
564
|
},
|