gentle-pi 4.6.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 +65 -55
- package/assets/agents/gentle-ai-explore.md +4 -3
- package/assets/agents/gentle-ai-verify.md +23 -6
- package/assets/agents/gentle-ai-worker.md +9 -6
- package/assets/agents/jd-fix-agent.md +1 -0
- package/assets/agents/jd-judge-a.md +2 -3
- package/assets/agents/jd-judge-b.md +2 -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 +759 -16
- package/assets/design-canvas/canvas.js +2 -1497
- package/assets/design-canvas/index.html +117 -36
- package/assets/design-canvas/inspector.js +546 -16
- package/assets/install-wizard/wizard.js +6 -1
- package/assets/migrations/agent-body-history.json +40 -1
- package/assets/orchestrator-delegation-reference.md +10 -16
- package/assets/orchestrator-delegation.md +5 -5
- package/assets/orchestrator-full-delegation-card.md +64 -0
- package/assets/orchestrator-full-delegation.md +34 -0
- package/assets/orchestrator-memory.md +5 -5
- package/assets/orchestrator-prompts.md +2 -2
- package/assets/orchestrator-quota-recovery.md +5 -0
- package/assets/orchestrator-skills.md +14 -13
- package/assets/orchestrator-tracking.md +10 -14
- package/assets/orchestrator-verification.md +12 -8
- package/assets/orchestrator-writer.md +4 -4
- package/assets/orchestrator.md +21 -25
- package/bin/gentle-shell.mjs +292 -65
- 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/agent-status.md +61 -0
- package/docs/assets/brand/sponsor-banner.svg +60 -0
- package/docs/bundled-install.md +20 -10
- package/docs/delegated-verification.md +46 -8
- package/docs/desktop-rpc.md +1253 -0
- package/docs/gentle-agents-activity.md +40 -0
- package/docs/gentle-shell.md +91 -30
- package/docs/install-wizard.md +30 -21
- package/docs/odd-preparation-continuity.md +24 -0
- package/docs/permission-modes.md +17 -4
- package/docs/prompt-budget.md +12 -0
- package/docs/rdd-odd-friction-triage-2026-11-07.md +57 -0
- package/docs/readme-reference.md +142 -45
- package/docs/render-cache-performance.md +11 -1
- package/docs/review-coordinator.md +53 -0
- package/docs/review-delivery-preflight.md +22 -0
- package/docs/review-request-context.md +19 -0
- package/docs/review-windows-acl.md +18 -0
- package/docs/voice.md +6 -3
- package/docs/work-continuity.md +11 -1
- package/docs/yolo-mode.md +5 -5
- package/extensions/ask-user-choice.ts +1 -0
- package/extensions/ask-user-question.ts +3 -2
- package/extensions/child-context.ts +21 -7
- package/extensions/child-safety.ts +3 -0
- package/extensions/gentle-agent-status.ts +99 -0
- package/extensions/gentle-agents.ts +559 -66
- package/extensions/gentle-ai.ts +2001 -518
- 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 +398 -115
- package/extensions/gentle-todo.ts +66 -27
- package/extensions/gentle-tps.ts +48 -0
- package/extensions/quiet-tools.ts +38 -8
- package/extensions/skill-registry.ts +349 -167
- package/extensions/startup-banner.ts +30 -3
- package/lib/agent-assets.ts +30 -6
- package/lib/agent-profile-pin.ts +3 -3
- package/lib/agent-profiles.ts +160 -2
- package/lib/agent-status.ts +105 -0
- package/lib/agent-tool-overlay.ts +117 -0
- package/lib/agents-config.ts +93 -6
- package/lib/agents-history.ts +24 -5
- package/lib/agents-message-delivery.ts +17 -0
- package/lib/agents-messaging.ts +55 -7
- package/lib/agents-protocol.ts +15 -0
- package/lib/agents-report-cap.ts +115 -0
- package/lib/agents-runner.ts +272 -16
- package/lib/agents-session-transport.ts +17 -1
- package/lib/auto-permission-runtime.ts +1 -1
- package/lib/background-jobs-tools.ts +9 -4
- package/lib/bounded-writer-admission.ts +197 -32
- package/lib/card-content-policy.ts +8 -6
- package/lib/child-context-files.ts +21 -6
- package/lib/codemode-renderer.ts +1 -0
- package/lib/command-palette.ts +133 -17
- package/lib/context-backstop.ts +14 -5
- 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 +236 -17
- package/lib/execution-surface-guard.ts +20 -0
- package/lib/exploration-budget.ts +4 -2
- package/lib/gentle-ai-binary.ts +1 -1
- package/lib/gentle-ai-renderer.ts +13 -1
- package/lib/gentle-design.ts +204 -14
- package/lib/gentle-shell-bundled.ts +106 -28
- package/lib/gentle-shell-launcher.ts +43 -8
- package/lib/herdr-activity.ts +14 -2
- package/lib/herdr-busy.ts +45 -0
- package/lib/hidden-tools.ts +35 -0
- package/lib/image-attachments.ts +33 -0
- package/lib/image-disk-cache.ts +137 -0
- package/lib/inprocess-reviewer.ts +358 -144
- package/lib/jobs-view.ts +198 -11
- package/lib/model-fallback-policy.ts +9 -0
- package/lib/model-routing-authority.ts +31 -4
- package/lib/nan-provider.ts +42 -28
- package/lib/native-choice-list.ts +20 -2
- package/lib/native-review-cli.ts +172 -20
- package/lib/orchestrator-discovery.ts +39 -2
- package/lib/orchestrator-mode-policy.ts +105 -0
- package/lib/questionnaire/questionnaire-view.ts +105 -12
- package/lib/rdd-mode-control.ts +32 -0
- package/lib/reply-language-anchor.ts +129 -0
- package/lib/request-context-placement.ts +53 -0
- package/lib/review-blocker.ts +92 -0
- package/lib/review-candidate-symlink-scan.ts +136 -0
- package/lib/review-candidate-view-owner.ts +81 -44
- package/lib/review-candidate-view.ts +11 -1
- package/lib/review-continuation-registry.ts +116 -0
- package/lib/review-coordinator.ts +407 -0
- package/lib/review-delivery-preflight.ts +85 -0
- package/lib/review-failure-facts.ts +49 -0
- package/lib/review-host-relay.ts +51 -11
- package/lib/review-integration-v2.ts +63 -4
- package/lib/review-relay-phase-timing.ts +45 -0
- package/lib/review-start-context.ts +17 -0
- package/lib/reviewer-stream.ts +87 -0
- package/lib/session-profile-freeze.ts +4 -2
- package/lib/shell-bar.ts +140 -58
- package/lib/shell-changes.ts +2 -0
- package/lib/shell-panel.ts +17 -3
- package/lib/shell-prompt.ts +16 -3
- package/lib/shell-sidebar-layout.ts +112 -40
- package/lib/shell-sidebar.ts +7 -0
- package/lib/shell-todo.ts +10 -3
- package/lib/shell-usage.ts +10 -0
- package/lib/verifier-admission.ts +1 -1
- package/lib/vim-editor-adapter.ts +9 -2
- package/lib/visual-customization-policy.ts +36 -16
- package/lib/visual-customize-view.ts +216 -21
- package/lib/visual-layout-preview.ts +9 -5
- package/lib/visual-profiles.ts +2 -2
- package/lib/windows-session-transport.ts +53 -2
- package/lib/writer-batch-admission.ts +55 -0
- package/lib/yolo-session-policy.ts +46 -16
- package/package.json +3 -2
- package/prompts/skill-creation.md +1 -10
- package/runtime/design-canvas-assets.mjs +37 -0
- package/runtime/gentle-ai-binary.mjs +1 -1
- package/runtime/gentle-shell-bundled.mjs +106 -28
- package/runtime/gentle-shell-launcher.mjs +42 -7
- package/runtime/native-review-cli.mjs +169 -17
- package/runtime/review-integration-v2.mjs +63 -4
- package/scripts/bootstrap.cmd +2 -2
- package/scripts/bootstrap.sh +41 -4
- package/scripts/build-full-delegation-card.mjs +179 -0
- package/scripts/build-runtime-modules.mjs +1 -0
- package/scripts/bundled-install.mjs +38 -8
- package/scripts/download-progress.mjs +68 -0
- package/scripts/gentle-ai-installer.mjs +41 -18
- package/scripts/gentle-ai-proxy.mjs +294 -0
- package/scripts/install-gentle-ai.mjs +14 -1
- package/scripts/installer-downloads.mjs +34 -8
- package/scripts/installer-preflight.mjs +33 -22
- package/scripts/installer-probes.mjs +25 -5
- package/scripts/installer-runner.mjs +27 -12
- package/scripts/installer-server.mjs +46 -16
- package/scripts/installer-windows.mjs +2 -2
- package/scripts/pi-update.mjs +166 -27
- package/scripts/prepare-verifier.mjs +107 -0
- package/scripts/render-cache-host.mjs +72 -0
- package/scripts/render-cache-performance-worker.mjs +5 -4
- package/scripts/render-cache-performance.mjs +6 -1
- package/scripts/run-test-suite.mjs +40 -28
- package/scripts/update-agent-body-history.mjs +55 -8
- package/scripts/verify-package-files.mjs +50 -19
- package/scripts/voice-worker.cjs +32 -6
- package/skills/branch-pr/SKILL.md +16 -16
- package/skills/comment-writer/SKILL.md +1 -1
- package/skills/design/SKILL.md +16 -13
- package/skills/gentle-ai/SKILL.md +7 -7
- package/skills/gentle-ui-design/SKILL.md +46 -0
- package/skills/gentle-ui-design/references/adaptive-interfaces.md +46 -0
- package/skills/gentle-ui-design/references/browse-and-compare.md +62 -0
- package/skills/gentle-ui-design/references/composition-and-feedback.md +56 -0
- package/skills/gentle-ui-design/references/task-and-content.md +60 -0
- 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 -11
- package/skills/tui-design/SKILL.md +1 -1
- package/skills/work-unit-commits/SKILL.md +10 -11
- package/tests/agent-home.test.ts +28 -9
- package/tests/agent-profiles-workflow.test.ts +163 -0
- package/tests/agent-prompt-diet-contract.test.ts +101 -0
- package/tests/agent-risk-escalation.test.ts +1 -1
- package/tests/agent-status.test.ts +143 -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 +106 -1
- package/tests/agents-history.test.ts +31 -0
- package/tests/agents-jobs-frames.test.ts +93 -0
- package/tests/agents-message-delivery.test.ts +36 -0
- package/tests/agents-prompt-lifecycle-runtime.test.ts +376 -0
- package/tests/agents-queries.test.ts +144 -4
- package/tests/agents-report-cap.test.ts +126 -0
- package/tests/agents-runner-drain.test.ts +193 -0
- package/tests/agents-runner.test.ts +215 -3
- 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 +12 -1
- package/tests/approved-text-leftovers-contract.test.ts +136 -0
- package/tests/artifact-language.test.ts +1 -1
- package/tests/ask-user-choice.test.ts +4 -3
- package/tests/ask-user-question.test.ts +99 -1
- package/tests/audit-leftovers-contract.test.ts +51 -0
- package/tests/auto-permission-runtime.test.ts +1 -1
- package/tests/autonomous-guard.test.ts +346 -10
- package/tests/bounded-stop-contract.test.ts +51 -3
- package/tests/branch-pr-skill.test.ts +10 -1
- package/tests/bridge-cost.test.ts +19 -4
- package/tests/bundled-install.test.ts +31 -6
- package/tests/card-content-policy.test.ts +3 -3
- package/tests/chained-pr-skill.test.ts +8 -6
- package/tests/child-context-files.test.ts +64 -8
- package/tests/child-safety.test.ts +11 -0
- package/tests/child-skills-catalog.test.ts +56 -0
- package/tests/codegraph-tools.test.ts +11 -5
- package/tests/codemode-rendering.test.ts +4 -1
- package/tests/command-palette.test.ts +284 -1
- package/tests/delegate-for-reason-contract.test.ts +32 -10
- 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 -695
- 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/destructive-command-guard.test.ts +52 -0
- package/tests/devbinary/pi-host-relay.devtest.ts +149 -80
- package/tests/devbinary/review-session-consent.devtest.ts +84 -0
- package/tests/download-progress.test.ts +71 -0
- package/tests/engram-safety.test.ts +111 -0
- package/tests/execution-surface-guard.test.ts +55 -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 +26 -31
- package/tests/fixtures/proxy-tls/proxy.crt +19 -0
- package/tests/fixtures/proxy-tls/proxy.key +28 -0
- package/tests/fixtures/refusal-identity.probe.mjs +139 -0
- package/tests/fixtures/session-profile-v1/gentle-ai-reviewer.ts +89 -0
- package/tests/fixtures/session-profile-v1/replay.ts +53 -6
- package/tests/full-delegation-closure.test.ts +160 -0
- package/tests/full-delegation-notices.test.ts +76 -0
- package/tests/generic-agent-tools.test.ts +3 -3
- package/tests/gentle-agent-status.test.ts +74 -0
- package/tests/gentle-agents-child-jobs.test.ts +237 -0
- package/tests/gentle-agents.test.ts +1403 -20
- package/tests/gentle-ai-binary.test.ts +3 -1
- package/tests/gentle-ai-child-guards.test.ts +1 -0
- package/tests/gentle-ai-elapsed-store.test.ts +19 -0
- package/tests/gentle-ai-exploration-budget.test.ts +18 -2
- package/tests/gentle-ai-installer.test.ts +135 -51
- package/tests/gentle-ai-proxy.test.ts +434 -0
- package/tests/gentle-ai-renderer.test.ts +36 -2
- package/tests/gentle-ai.test.ts +233 -43
- package/tests/gentle-design.test.ts +386 -1
- package/tests/gentle-herdr-activity.test.ts +9 -6
- package/tests/gentle-shell-bin.test.ts +123 -0
- package/tests/gentle-shell-bundled.test.ts +293 -31
- package/tests/gentle-shell-launcher.test.ts +78 -11
- package/tests/gentle-shell.test.ts +1017 -146
- package/tests/gentle-todo.test.ts +51 -11
- package/tests/gentle-tps.test.ts +123 -0
- package/tests/gentle-ui-design-skill.test.ts +59 -0
- package/tests/herdr-busy.test.ts +59 -0
- package/tests/herdr-task-summary-policy.test.ts +8 -4
- package/tests/hidden-tools.test.ts +188 -0
- package/tests/image-disk-cache.test.ts +163 -0
- package/tests/independent-recovery-delivery.test.ts +97 -0
- package/tests/inprocess-reviewer.test.ts +249 -4
- package/tests/install-wizard.test.ts +27 -1
- package/tests/installer-downloads.test.ts +30 -1
- package/tests/installer-posix-bootstrap.test.ts +115 -14
- package/tests/installer-preflight.test.ts +54 -5
- package/tests/installer-probes.test.ts +146 -0
- package/tests/installer-runner.test.ts +79 -44
- package/tests/installer-server.test.ts +215 -13
- package/tests/installer-windows-bootstrap.test.ts +19 -1
- package/tests/jobs-view.test.ts +260 -6
- 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/modal-mouse-boundaries.test.ts +136 -0
- package/tests/model-fallback-policy.test.ts +26 -7
- package/tests/model-routing-authority.test.ts +178 -2
- package/tests/nan-provider-runtime.test.ts +17 -3
- package/tests/nan-provider.test.ts +111 -56
- package/tests/native-choice-list.test.ts +77 -2
- package/tests/native-review-capability-contract.test.ts +17 -1
- package/tests/native-review-cli-nonblocking-findings.test.ts +165 -0
- package/tests/native-review-cli.test.ts +269 -1
- 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 +13 -2
- package/tests/odd-integration.test.ts +11 -3
- package/tests/odd-routing-canonical-ratchet.test.ts +3 -3
- package/tests/odd-routing-contract.test.ts +80 -28
- package/tests/orchestrator-budget.test.ts +35 -5
- package/tests/orchestrator-consultation-sdk.test.ts +32 -6
- package/tests/orchestrator-delegation-mode.test.ts +154 -0
- package/tests/orchestrator-discovery.test.ts +28 -0
- package/tests/orchestrator-mode-policy.test.ts +175 -0
- package/tests/orchestrator-prompt-budget.test.ts +13 -2
- package/tests/orchestrator-prompt-diet-contract.test.ts +221 -0
- package/tests/orchestrator-rdd-ownership.test.ts +4 -3
- package/tests/orchestrator-work-search.test.ts +4 -2
- package/tests/package-files.test.ts +25 -1
- package/tests/package-manifest.test.ts +16 -13
- package/tests/parallel-reason-contract.test.ts +6 -3
- package/tests/permission-allowlist.test.ts +372 -0
- 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 +25 -7
- package/tests/pi-update-source.test.ts +113 -6
- package/tests/pi-update.test.ts +294 -19
- package/tests/pnpm-workspace-config.test.ts +58 -0
- 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/primary-session-prompt.test.ts +13 -0
- package/tests/profile-pin.test.ts +29 -2
- package/tests/profile-tier-footer.test.ts +5 -0
- package/tests/profiles-panel-delegation-mode.test.ts +422 -0
- package/tests/provider-defect-handoff.test.ts +9 -2
- package/tests/questionnaire-view.test.ts +115 -0
- package/tests/quiet-bash-runtime.test.ts +1 -1
- package/tests/quiet-tool-rendering.test.ts +48 -0
- package/tests/rdd-aware-verification-contract.test.ts +17 -12
- package/tests/rdd-customize.test.ts +287 -0
- package/tests/rdd-mode-cache.test.ts +450 -0
- package/tests/rdd-mode-control.test.ts +407 -0
- package/tests/rdd-mode-scope-regression.test.ts +137 -0
- package/tests/rdd-off-independent-regression.test.ts +69 -0
- package/tests/rdd-status-line.test.ts +112 -1
- package/tests/render-cache-performance.test.ts +171 -2
- package/tests/reply-language-anchor-placement.test.ts +184 -0
- package/tests/reply-language-anchor.test.ts +189 -0
- 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 +80 -2
- package/tests/review-blocker.test.ts +193 -0
- package/tests/review-candidate-owner-retry.test.ts +1 -1
- package/tests/review-candidate-symlink-scan.test.ts +157 -0
- package/tests/review-candidate-view.test.ts +66 -1
- package/tests/review-candidate-windows-boundary.test.ts +131 -0
- package/tests/review-candidate-windows-probe.test.ts +63 -0
- package/tests/review-committed-restart-ack.test.ts +129 -0
- package/tests/review-continuation-registry.test.ts +107 -0
- package/tests/review-contract-prompt.test.ts +1 -1
- package/tests/review-controller-native-routing.test.ts +261 -5
- package/tests/review-controller-workspace-root.test.ts +230 -3
- package/tests/review-controller.test.ts +98 -12
- 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-runtime.test.ts +117 -0
- package/tests/review-coordinator.test.ts +462 -0
- 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-failure-facts.test.ts +87 -0
- package/tests/review-host-relay-routing.test.ts +258 -4
- package/tests/review-host-relay.test.ts +39 -0
- package/tests/review-integration-nonblocking-findings.test.ts +108 -0
- package/tests/review-integration-v2.test.ts +46 -3
- package/tests/review-json-arguments.test.ts +105 -11
- package/tests/review-last-event-closure.test.ts +68 -0
- package/tests/review-ledger-contract.test.ts +19 -40
- package/tests/review-loadout-rdd-off-sdk.test.ts +95 -32
- 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-owner-identity.test.ts +60 -24
- package/tests/review-relay-phase-timing.test.ts +128 -0
- package/tests/review-relay-transport-agent.test.ts +39 -2
- package/tests/review-reviewer-evidence.test.ts +223 -0
- package/tests/review-risk-assessment.test.ts +126 -8
- package/tests/review-run-statement-guidance-independent.test.ts +54 -0
- package/tests/review-session-standing-permission-controller.test.ts +53 -3
- package/tests/review-start-context.test.ts +19 -0
- package/tests/review-tool-prose-budget.test.ts +122 -0
- package/tests/reviewer-stream.test.ts +149 -0
- package/tests/run-test-suite.test.ts +122 -1
- package/tests/runtime-harness.mjs +4 -1
- package/tests/sensitive-path-tools.test.ts +181 -5
- package/tests/session-profile-append-controller-pi.test.ts +60 -31
- package/tests/session-profile-binding.test.ts +19 -1
- package/tests/session-profile-disk-reader-pi.test.ts +58 -16
- package/tests/session-profile-extension.test.ts +2 -2
- package/tests/session-profile-v1-compat.test.ts +35 -1
- package/tests/shell-bar.test.ts +186 -42
- package/tests/shell-panel.test.ts +50 -22
- package/tests/shell-prompt.test.ts +17 -0
- package/tests/shell-sidebar-fullscreen.test.ts +5 -5
- package/tests/shell-sidebar-layout.test.ts +294 -23
- package/tests/shell-sidebar-scroll-benchmark.test.ts +1 -1
- package/tests/shell-surface-transparent.test.ts +89 -0
- package/tests/shell-todo.test.ts +12 -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 +1461 -5
- package/tests/startup-banner.test.ts +152 -1
- package/tests/startup-home-repo.test.ts +2 -0
- package/tests/support/design-canvas-dom.ts +369 -0
- package/tests/support/review-coordinator-runtime.ts +264 -0
- package/tests/task-size-routing-contract.test.ts +45 -12
- 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-admission.test.ts +49 -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 +162 -11
- package/tests/vim-editor-adapter.test.ts +2 -2
- package/tests/visual-customization-policy.test.ts +39 -6
- package/tests/visual-customize-view.test.ts +573 -9
- package/tests/visual-layout-preview.test.ts +15 -1
- package/tests/visual-profiles.test.ts +11 -0
- package/tests/voice-worker.test.ts +73 -2
- package/tests/windows-session-transport.test.ts +126 -0
- package/tests/work-continuity-contract.test.ts +77 -6
- 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 +276 -0
- package/tests/yolo-customize.test.ts +27 -4
- package/tests/yolo-mode.test.ts +62 -18
- package/tests/yolo-session-policy.test.ts +270 -1
- 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
|
@@ -0,0 +1,294 @@
|
|
|
1
|
+
// A corporate proxy is the only route to the internet for many operators, and
|
|
2
|
+
// npm already honours it, so the installer has to as well. The Gentle AI
|
|
3
|
+
// release asset is fetched with node:https, whose client ignores HTTPS_PROXY,
|
|
4
|
+
// HTTP_PROXY and NO_PROXY unless the process opts in, and Node only grew that
|
|
5
|
+
// opt-in in v24 (NODE_USE_ENV_PROXY / --use-env-proxy) while this package
|
|
6
|
+
// supports Node ^22.19.0 || >=23.6.0. The tunnel below is the portable equivalent of
|
|
7
|
+
// that opt-in: it opens a CONNECT tunnel to the proxy and speaks TLS to the
|
|
8
|
+
// origin host through it, so the origin's own certificate still decides
|
|
9
|
+
// whether the connection is trusted and the proxy never sees the request.
|
|
10
|
+
import https from "node:https";
|
|
11
|
+
import net from "node:net";
|
|
12
|
+
import tls from "node:tls";
|
|
13
|
+
|
|
14
|
+
// Both spellings are read because shells and CI runners disagree about the
|
|
15
|
+
// convention, and the lowercase form is what most corporate setups export.
|
|
16
|
+
const PROXY_ENV_BY_PROTOCOL = Object.freeze({
|
|
17
|
+
"https:": Object.freeze(["HTTPS_PROXY", "https_proxy"]),
|
|
18
|
+
"http:": Object.freeze(["HTTP_PROXY", "http_proxy"]),
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
const TRANSIENT_PROXY_STATUSES = Object.freeze([429, 500, 502, 503, 504]);
|
|
22
|
+
|
|
23
|
+
function proxyPort(proxy) {
|
|
24
|
+
if (proxy.port !== "") return Number(proxy.port);
|
|
25
|
+
return proxy.protocol === "https:" ? 443 : 80;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// URL.hostname keeps the brackets of an IPv6 literal, but a socket address
|
|
29
|
+
// and a TLS server name need the bare address, so the brackets come off here.
|
|
30
|
+
// The bare address stays the server name because dropping it would turn off
|
|
31
|
+
// the certificate identity check.
|
|
32
|
+
function proxyHost(proxy) {
|
|
33
|
+
return proxy.hostname.replace(/^\[|\]$/g, "");
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// A proxy value that is not a usable http(s) URL is ignored rather than
|
|
37
|
+
// allowed to break an install that would have reached the host directly.
|
|
38
|
+
function parseProxy(raw) {
|
|
39
|
+
try {
|
|
40
|
+
// A bare "host:port" is a proxy address, not a URL whose scheme is "host".
|
|
41
|
+
const proxy = new URL(raw.includes("://") ? raw : `http://${raw}`);
|
|
42
|
+
if (proxy.protocol !== "http:" && proxy.protocol !== "https:") return undefined;
|
|
43
|
+
if (proxy.hostname === "") return undefined;
|
|
44
|
+
// Credentials are percent-encoded in the URL and decoded when the
|
|
45
|
+
// Proxy-Authorization header is built. Decoding them here rejects a
|
|
46
|
+
// malformed value now, instead of failing later inside the tunnel.
|
|
47
|
+
decodeURIComponent(proxy.username);
|
|
48
|
+
decodeURIComponent(proxy.password);
|
|
49
|
+
return proxy;
|
|
50
|
+
} catch {
|
|
51
|
+
return undefined;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
function splitHostPort(entry) {
|
|
56
|
+
if (entry.startsWith("[")) {
|
|
57
|
+
const end = entry.indexOf("]");
|
|
58
|
+
if (end === -1) return { host: entry, port: undefined };
|
|
59
|
+
const rest = entry.slice(end + 1);
|
|
60
|
+
return { host: entry.slice(0, end + 1), port: rest.startsWith(":") ? rest.slice(1) : undefined };
|
|
61
|
+
}
|
|
62
|
+
const separator = entry.lastIndexOf(":");
|
|
63
|
+
// More than one colon is a bare IPv6 address, which carries no port.
|
|
64
|
+
if (separator === -1 || entry.indexOf(":") !== separator) return { host: entry, port: undefined };
|
|
65
|
+
return { host: entry.slice(0, separator), port: entry.slice(separator + 1) };
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
function matchesNoProxy(target, entry) {
|
|
69
|
+
if (entry === "*") return true;
|
|
70
|
+
const { host: pattern, port } = splitHostPort(entry.toLowerCase());
|
|
71
|
+
const host = target.hostname.toLowerCase();
|
|
72
|
+
const targetPort = target.port !== "" ? target.port : target.protocol === "https:" ? "443" : "80";
|
|
73
|
+
if (port !== undefined && port !== targetPort) return false;
|
|
74
|
+
if (pattern.startsWith("*.")) {
|
|
75
|
+
const base = pattern.slice(2);
|
|
76
|
+
return host === base || host.endsWith(`.${base}`);
|
|
77
|
+
}
|
|
78
|
+
// A leading dot covers the domain and its subdomains; a bare domain is an
|
|
79
|
+
// exact match, so one entry never silently exempts a whole namespace.
|
|
80
|
+
if (pattern.startsWith(".")) {
|
|
81
|
+
const base = pattern.slice(1);
|
|
82
|
+
return host === base || host.endsWith(`.${base}`);
|
|
83
|
+
}
|
|
84
|
+
return host === pattern;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* The proxy that applies to `target`, or undefined when the target is reached
|
|
89
|
+
* directly. HTTPS_PROXY answers for an https target and HTTP_PROXY is the
|
|
90
|
+
* fallback, exactly as every other HTTP client on the platform resolves them,
|
|
91
|
+
* and NO_PROXY always wins over both. A value that is not a usable proxy URL
|
|
92
|
+
* is ignored, so a stray variable cannot break an install that would otherwise
|
|
93
|
+
* reach the host directly.
|
|
94
|
+
*/
|
|
95
|
+
export function resolveProxyForTarget(target, env = process.env) {
|
|
96
|
+
const url = target instanceof URL ? target : new URL(String(target));
|
|
97
|
+
const noProxy = String(env.NO_PROXY ?? env.no_proxy ?? "").split(",").map((entry) => entry.trim()).filter((entry) => entry !== "");
|
|
98
|
+
if (noProxy.some((entry) => matchesNoProxy(url, entry))) return undefined;
|
|
99
|
+
const primary = PROXY_ENV_BY_PROTOCOL[url.protocol] ?? [];
|
|
100
|
+
const fallback = url.protocol === "https:" ? PROXY_ENV_BY_PROTOCOL["http:"] : [];
|
|
101
|
+
for (const key of [...primary, ...fallback]) {
|
|
102
|
+
const raw = env[key];
|
|
103
|
+
if (typeof raw !== "string" || raw.trim() === "") continue;
|
|
104
|
+
const proxy = parseProxy(raw.trim());
|
|
105
|
+
if (proxy !== undefined) return proxy;
|
|
106
|
+
}
|
|
107
|
+
return undefined;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
function tunnelAuthority(host, port) {
|
|
111
|
+
return host.includes(":") ? `[${host}]:${port}` : `${host}:${port}`;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* The TLS options for the connection to an https proxy.
|
|
116
|
+
*
|
|
117
|
+
* The proxy host is always the name the certificate is checked against,
|
|
118
|
+
* because Node leaves the socket host unset and would otherwise fall back
|
|
119
|
+
* to "localhost". An IP address cannot be a server name, and a modern Node
|
|
120
|
+
* refuses the handshake outright when it is given one, so the server name
|
|
121
|
+
* is only sent for a hostname.
|
|
122
|
+
*/
|
|
123
|
+
export function proxyTlsOptions(proxy) {
|
|
124
|
+
return hostTlsOptions(proxyHost(proxy));
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* The TLS options for a host reached through the tunnel.
|
|
129
|
+
*
|
|
130
|
+
* The host is always the name the certificate is checked against, because
|
|
131
|
+
* Node leaves the socket host unset and would otherwise fall back to
|
|
132
|
+
* "localhost". An IP address cannot be a server name, and a modern Node
|
|
133
|
+
* refuses the handshake outright when it is given one, so the server name
|
|
134
|
+
* is only sent for a hostname.
|
|
135
|
+
*/
|
|
136
|
+
export function hostTlsOptions(name) {
|
|
137
|
+
return net.isIP(name) ? { host: name } : { host: name, servername: name };
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* The trust options for a handshake, so a caller that trusts a private
|
|
142
|
+
* certificate authority reaches a peer that presents one.
|
|
143
|
+
*
|
|
144
|
+
* An explicit `ca` replaces Node's default certificate authority list
|
|
145
|
+
* rather than adding to it, so a caller that sets it has to include the
|
|
146
|
+
* authorities of both peers it expects to reach. The proxy and the origin
|
|
147
|
+
* are separate peers, so a private authority for one of them and a public
|
|
148
|
+
* certificate for the other need both authorities in the list.
|
|
149
|
+
*/
|
|
150
|
+
export function proxyTrustOptions(options) {
|
|
151
|
+
return {
|
|
152
|
+
...(options.rejectUnauthorized === undefined ? {} : { rejectUnauthorized: options.rejectUnauthorized }),
|
|
153
|
+
...(options.ca === undefined ? {} : { ca: options.ca }),
|
|
154
|
+
...(options.cert === undefined ? {} : { cert: options.cert }),
|
|
155
|
+
...(options.key === undefined ? {} : { key: options.key }),
|
|
156
|
+
...(options.passphrase === undefined ? {} : { passphrase: options.passphrase }),
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* The trust options for the proxy handshake.
|
|
162
|
+
*
|
|
163
|
+
* The client credentials belong to the origin, so they stay on the origin
|
|
164
|
+
* handshake: a proxy that asks for a client certificate would otherwise
|
|
165
|
+
* receive the identity of the origin. The certificate authority and the
|
|
166
|
+
* verification setting are shared, because the proxy is a peer of the
|
|
167
|
+
* client just like the origin is.
|
|
168
|
+
*
|
|
169
|
+
* The certificate authority is the same list the origin handshake uses, so
|
|
170
|
+
* it has to trust both peers, and an explicit list replaces Node's default
|
|
171
|
+
* authorities rather than adding to them.
|
|
172
|
+
*/
|
|
173
|
+
export function proxyHandshakeTrustOptions(trust) {
|
|
174
|
+
return {
|
|
175
|
+
...(trust.rejectUnauthorized === undefined ? {} : { rejectUnauthorized: trust.rejectUnauthorized }),
|
|
176
|
+
...(trust.ca === undefined ? {} : { ca: trust.ca }),
|
|
177
|
+
};
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* An https.Agent whose sockets are CONNECT tunnels to `proxy`. The origin host
|
|
182
|
+
* is still verified by TLS over the tunnel, so the proxy cannot read the
|
|
183
|
+
* request and cannot impersonate the release host without the origin's own
|
|
184
|
+
* certificate chain failing the handshake.
|
|
185
|
+
*/
|
|
186
|
+
export function createProxyTunnelAgent(proxy, headerTimeoutMs = 10_000, trust = {}) {
|
|
187
|
+
const agent = new https.Agent({ keepAlive: false });
|
|
188
|
+
agent.createConnection = (options, callback) => {
|
|
189
|
+
const host = options.host ?? options.hostname;
|
|
190
|
+
const port = Number(options.port ?? 443);
|
|
191
|
+
const authority = tunnelAuthority(host, port);
|
|
192
|
+
const raw = net.connect({ host: proxyHost(proxy), port: proxyPort(proxy) });
|
|
193
|
+
let channel = raw;
|
|
194
|
+
let head = Buffer.alloc(0);
|
|
195
|
+
let delivered = false;
|
|
196
|
+
let timer;
|
|
197
|
+
const closed = new Set();
|
|
198
|
+
// The listener identity of each socket is kept so every one of them can
|
|
199
|
+
// be detached again on completion, failure and teardown.
|
|
200
|
+
const listeners = new Map();
|
|
201
|
+
const onEnd = () => fail(Object.assign(new Error("Gentle AI download proxy closed before completing CONNECT headers"), { code: "ECONNRESET" }));
|
|
202
|
+
const deliver = (error, secure) => {
|
|
203
|
+
if (delivered) return;
|
|
204
|
+
delivered = true;
|
|
205
|
+
clearTimeout(timer);
|
|
206
|
+
raw.off("connect", onConnect);
|
|
207
|
+
for (const [socket, bound] of listeners) {
|
|
208
|
+
// TLS queues an error while handling EOF, so the error handler
|
|
209
|
+
// stays until teardown finishes and is removed with the close.
|
|
210
|
+
if (error && !closed.has(socket)) socket.once("close", () => socket.off("error", bound.error));
|
|
211
|
+
else socket.off("error", bound.error);
|
|
212
|
+
socket.off("end", bound.end);
|
|
213
|
+
socket.off("close", bound.close);
|
|
214
|
+
socket.off("data", onData);
|
|
215
|
+
}
|
|
216
|
+
callback(error, secure);
|
|
217
|
+
};
|
|
218
|
+
function fail(error) {
|
|
219
|
+
if (delivered) return;
|
|
220
|
+
channel.destroy();
|
|
221
|
+
raw.destroy();
|
|
222
|
+
deliver(error, undefined);
|
|
223
|
+
}
|
|
224
|
+
const watch = (socket) => {
|
|
225
|
+
const bound = {
|
|
226
|
+
error: fail,
|
|
227
|
+
end: onEnd,
|
|
228
|
+
close: () => {
|
|
229
|
+
closed.add(socket);
|
|
230
|
+
onEnd();
|
|
231
|
+
},
|
|
232
|
+
};
|
|
233
|
+
listeners.set(socket, bound);
|
|
234
|
+
socket.on("error", bound.error);
|
|
235
|
+
socket.on("end", bound.end);
|
|
236
|
+
socket.on("close", bound.close);
|
|
237
|
+
return bound;
|
|
238
|
+
};
|
|
239
|
+
// The request cannot enforce its deadline until this agent hands it a
|
|
240
|
+
// socket. Bound TCP, proxy TLS and the CONNECT headers here instead.
|
|
241
|
+
timer = setTimeout(() => fail(Object.assign(new Error("Gentle AI download proxy CONNECT timed out"), { code: "GENTLE_AI_DOWNLOAD_TIMEOUT" })), headerTimeoutMs);
|
|
242
|
+
watch(raw);
|
|
243
|
+
raw.once("connect", onConnect);
|
|
244
|
+
function onConnect() {
|
|
245
|
+
// A proxy reached over TLS speaks the same CONNECT protocol once its
|
|
246
|
+
// own handshake is done, so the tunnel is written to whichever
|
|
247
|
+
// channel is open.
|
|
248
|
+
if (proxy.protocol === "https:") {
|
|
249
|
+
channel = tls.connect({ socket: raw, ...proxyTlsOptions(proxy), ...proxyHandshakeTrustOptions(trust) });
|
|
250
|
+
watch(channel);
|
|
251
|
+
}
|
|
252
|
+
const lines = [`CONNECT ${authority} HTTP/1.1`, `Host: ${authority}`];
|
|
253
|
+
if (proxy.username !== "") {
|
|
254
|
+
const credentials = `${decodeURIComponent(proxy.username)}:${decodeURIComponent(proxy.password)}`;
|
|
255
|
+
lines.push(`Proxy-Authorization: Basic ${Buffer.from(credentials).toString("base64")}`);
|
|
256
|
+
}
|
|
257
|
+
channel.write(`${lines.join("\r\n")}\r\n\r\n`);
|
|
258
|
+
channel.on("data", onData);
|
|
259
|
+
}
|
|
260
|
+
function onData(chunk) {
|
|
261
|
+
head = Buffer.concat([head, chunk]);
|
|
262
|
+
const boundary = head.indexOf("\r\n\r\n");
|
|
263
|
+
if (boundary === -1) return;
|
|
264
|
+
channel.off("data", onData);
|
|
265
|
+
const status = Number(head.subarray(0, head.indexOf("\r\n")).toString("latin1").split(" ")[1]);
|
|
266
|
+
if (status !== 200) {
|
|
267
|
+
// A proxy that is briefly overloaded answers like any other
|
|
268
|
+
// transient HTTP failure, and the downloader's own retry rule
|
|
269
|
+
// decides whether the attempt is worth repeating.
|
|
270
|
+
const error = new Error(`Gentle AI download proxy refused the tunnel with status ${status}`);
|
|
271
|
+
error.code = TRANSIENT_PROXY_STATUSES.includes(status) ? "GENTLE_AI_DOWNLOAD_TRANSIENT_HTTP" : "GENTLE_AI_DOWNLOAD_HTTP";
|
|
272
|
+
fail(error);
|
|
273
|
+
return;
|
|
274
|
+
}
|
|
275
|
+
// Bytes the proxy sent past the header block belong to the origin
|
|
276
|
+
// stream and have to reach the TLS layer rather than be dropped.
|
|
277
|
+
const remainder = head.subarray(boundary + 4);
|
|
278
|
+
if (remainder.length > 0) channel.unshift(remainder);
|
|
279
|
+
deliver(undefined, tls.connect({
|
|
280
|
+
socket: channel,
|
|
281
|
+
// A request for an address leaves the server name empty, and an
|
|
282
|
+
// empty server name would make the certificate be checked
|
|
283
|
+
// against "localhost" instead of the origin.
|
|
284
|
+
...hostTlsOptions(options.servername || host),
|
|
285
|
+
ALPNProtocols: options.ALPNProtocols ?? ["http/1.1"],
|
|
286
|
+
// The origin handshake is the one that carries the client
|
|
287
|
+
// credentials, because they are the identity of the origin.
|
|
288
|
+
...proxyTrustOptions(options),
|
|
289
|
+
...trust,
|
|
290
|
+
}));
|
|
291
|
+
}
|
|
292
|
+
};
|
|
293
|
+
return agent;
|
|
294
|
+
}
|
|
@@ -57,10 +57,23 @@ function describeGentleAiInstallFailure(error) {
|
|
|
57
57
|
if (process.env.GENTLE_PI_SKIP_GENTLE_AI_INSTALL === "1") {
|
|
58
58
|
console.warn("GENTLE_PI_SKIP_GENTLE_AI_INSTALL=1: skipped package-local Gentle AI installation; native review operations will fail with package-local-binary-missing until gentle-pi is reinstalled.");
|
|
59
59
|
} else {
|
|
60
|
+
// A live progress line only on a terminal: npm logs and CI output stay
|
|
61
|
+
// unchanged. Loaded lazily and optional, so it can never break the install.
|
|
62
|
+
let progress;
|
|
63
|
+
if (process.stderr.isTTY === true) {
|
|
64
|
+
try {
|
|
65
|
+
const { createDownloadProgress } = await import("./download-progress.mjs");
|
|
66
|
+
progress = createDownloadProgress({ label: `Downloading Gentle AI v${INSTALLER_VERSION}`, write: (text) => process.stderr.write(text), width: () => process.stderr.columns || 80 });
|
|
67
|
+
} catch {
|
|
68
|
+
progress = undefined;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
60
71
|
try {
|
|
61
|
-
const result = await installGentleAi();
|
|
72
|
+
const result = await installGentleAi(progress === undefined ? {} : { onProgress: (state) => progress.update(state) });
|
|
73
|
+
progress?.done();
|
|
62
74
|
console.log(`Gentle AI v${INSTALLER_VERSION} ${result.installed ? "installed" : "integrity-verified"} at ${result.binaryPath}`);
|
|
63
75
|
} catch (error) {
|
|
76
|
+
progress?.done();
|
|
64
77
|
// The whole cause chain: the failing command's own output is the diagnosis.
|
|
65
78
|
console.error(`gentle-pi could not install its package-local Gentle AI v${INSTALLER_VERSION} binary: ${describeGentleAiInstallFailure(error)}`);
|
|
66
79
|
process.exitCode = 1;
|
|
@@ -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,
|
|
@@ -22,10 +28,10 @@ export const requirements = Object.freeze({
|
|
|
22
28
|
go: GENTLE_AI_WINDOWS_MINIMUM_GO_VERSION,
|
|
23
29
|
});
|
|
24
30
|
|
|
25
|
-
/** Pi
|
|
26
|
-
*
|
|
31
|
+
/** Legacy Pi pin retained for verified distribution and compatibility checks.
|
|
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,9 +213,9 @@ 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
|
-
// manager to
|
|
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
|
|
211
220
|
// owns (mise, Homebrew, a binary) is left as it is: the installer's Pi is
|
|
212
221
|
// installed alongside, exactly as when Pi is absent.
|
|
@@ -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);
|
|
@@ -327,7 +336,7 @@ export function planPreflight(inventory, { channel = "release" } = {}) {
|
|
|
327
336
|
if (update || npmCurrent) {
|
|
328
337
|
// Only an update builds: main, or a Windows release postinstall.
|
|
329
338
|
if (update) acquireGo();
|
|
330
|
-
if (updatePi) action("update-pi", "upgrade", "pi",
|
|
339
|
+
if (updatePi) action("update-pi", "upgrade", "pi", "latest");
|
|
331
340
|
// A current npm Shell next to an older Pi neither manager owns gets the installer's Pi.
|
|
332
341
|
if (!update && tools.pi.status === "needs-install") action("install-pi", "install-global", "pi", requirements.pi);
|
|
333
342
|
if (update) {
|
|
@@ -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");
|
|
@@ -369,7 +380,7 @@ export function planPreflight(inventory, { channel = "release" } = {}) {
|
|
|
369
380
|
else if (pnpm) action("persist-pnpm", "install-global", "pnpm", persistencePins.pnpm);
|
|
370
381
|
}
|
|
371
382
|
if (installPi) action("install-pi", "install-global", "pi", requirements.pi);
|
|
372
|
-
if (updatePi) action("update-pi", "upgrade", "pi",
|
|
383
|
+
if (updatePi) action("update-pi", "upgrade", "pi", "latest");
|
|
373
384
|
if (missingShell) action("install-shell", "install-global", "shell", requirements.shell);
|
|
374
385
|
// Global gentle-pi postinstall owns native provisioning when Shell is missing.
|
|
375
386
|
// Otherwise the later runner must reuse that existing installer, not duplicate it.
|
|
@@ -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);
|