omo-ai 5.1.69 → 5.1.71
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/bin/darwin/omo-keychain +0 -0
- package/bin/lib/agent-dir.js +8 -1
- package/bin/lib/auth-store.js +11 -1
- package/bin/lib/bun-bin-shim.js +12 -2
- package/bin/lib/category-coverage.js +56 -18
- package/bin/lib/child-process.js +2 -1
- package/bin/lib/compile-safe-engine.js +14 -2
- package/bin/lib/daemon-adopt.js +41 -10
- package/bin/lib/daemon-config.js +9 -3
- package/bin/lib/daemon-operations.js +11 -3
- package/bin/lib/daemon-rollback.js +28 -23
- package/bin/lib/daemon-status.js +9 -3
- package/bin/lib/daemon.js +18 -3
- package/bin/lib/doctor-memory-runtime.js +46 -12
- package/bin/lib/doctor-migration.js +65 -38
- package/bin/lib/doctor-pi-config.js +8 -3
- package/bin/lib/doctor-reflection-lock.js +35 -12
- package/bin/lib/doctor.js +64 -49
- package/bin/lib/engine-boot.js +3 -1
- package/bin/lib/engine-commands.js +11 -1
- package/bin/lib/engine-environment.js +8 -1
- package/bin/lib/engine-models.js +2 -1
- package/bin/lib/engine-prepare.js +18 -3
- package/bin/lib/host-status.js +5 -1
- package/bin/lib/jsonc-edit.js +10 -6
- package/bin/lib/keychain-helper-doctor.js +13 -3
- package/bin/lib/launch-spec-mode.js +6 -2
- package/bin/lib/launcher.js +31 -19
- package/bin/lib/model-chains.js +12 -5
- package/bin/lib/npm-dist-tags.js +2 -1
- package/bin/lib/package-paths.js +18 -10
- package/bin/lib/private-fd-table.js +19 -10
- package/bin/lib/process-list.js +26 -0
- package/bin/lib/provider-map.json +1 -1
- package/bin/lib/rpc-stream-errors.js +6 -2
- package/bin/lib/same-version.js +6 -1
- package/bin/lib/self-update.js +41 -10
- package/bin/lib/service-auth.generated.js +57 -43
- package/bin/lib/setup-assets-import.js +25 -5
- package/bin/lib/setup-commandcode.js +5 -2
- package/bin/lib/setup-credentials.js +12 -2
- package/bin/lib/setup-detect-refresh.js +9 -6
- package/bin/lib/setup-detect.js +4 -5
- package/bin/lib/setup-guidance.js +1 -1
- package/bin/lib/setup-import.js +35 -7
- package/bin/lib/setup-model-choices-import.js +61 -10
- package/bin/lib/setup-models.js +9 -5
- package/bin/lib/setup-opencode-assets.js +26 -9
- package/bin/lib/setup-opencode-models.d.ts +4 -1
- package/bin/lib/setup-opencode-models.js +76 -30
- package/bin/lib/setup-opencode-providers.js +58 -17
- package/bin/lib/setup-providers-import.js +38 -6
- package/bin/lib/setup-report.js +9 -7
- package/bin/lib/setup-stream-items.js +29 -5
- package/bin/lib/setup-stream.d.ts +13 -3
- package/bin/lib/setup-stream.js +92 -15
- package/bin/lib/setup-summary.js +61 -18
- package/bin/lib/sqlite-rows.js +3 -1
- package/bin/lib/thread-output.js +14 -4
- package/bin/lib/thread.js +224 -38
- package/bin/lib/update-args.js +5 -1
- package/bin/lib/update-lock.js +13 -2
- package/bin/omo.js +1 -1
- package/package.json +2 -2
- package/plugin/CHANGELOG.md +148 -0
- package/plugin/README.md +9 -1
- package/plugin/extensions/gateway-store-worker.mjs +2 -2
- package/plugin/extensions/memory-run-supervisor.mjs +1 -1
- package/plugin/extensions/omo-claim-receipt.js +1 -1
- package/plugin/extensions/omo-computer-run-worker.mjs +1 -1
- package/plugin/extensions/omo-computer-use.js +2 -2
- package/plugin/extensions/omo-desktop-toolkit.js +1 -1
- package/plugin/extensions/omo-device-account.js +4 -4
- package/plugin/extensions/omo-device-service.js +5 -5
- package/plugin/extensions/omo-feedback.js +2 -2
- package/plugin/extensions/omo-init-deep-advisor.js +2 -2
- package/plugin/extensions/omo-member.js +2 -2
- package/plugin/extensions/omo-memory-commands.js +2 -2
- package/plugin/extensions/omo-memory-doctor.js +3 -3
- package/plugin/extensions/omo-memory-memfs.js +1 -1
- package/plugin/extensions/omo-memory-palace.js +3 -3
- package/plugin/extensions/omo-memory-sync.js +2 -2
- package/plugin/extensions/omo-onboarding-scan.js +2 -2
- package/plugin/extensions/omo-recall-store.js +1 -1
- package/plugin/extensions/omo-session-history.js +1 -1
- package/plugin/extensions/omo-side-panel.js +3 -3
- package/plugin/extensions/omo-task.js +2 -2
- package/plugin/extensions/omo-telemetry-otlp.js +2 -2
- package/plugin/extensions/omo-telemetry-posthog.js +1 -1
- package/plugin/extensions/omo-telemetry-recovery.js +1 -1
- package/plugin/extensions/omo-thread-client.js +5 -5
- package/plugin/extensions/omo.js +3 -3
- package/plugin/package.json +1 -1
- package/plugin/runtime/agent-toolkit-sdk/sdk.js +2 -2
- package/plugin/runtime/ast-grep-mcp/cli.js +26 -5
- package/plugin/runtime/ast-grep-mcp/manifest.json +2 -2
- package/plugin/runtime/bunshin-ts/sdk.js +4 -4
- package/plugin/runtime/category-coverage/index.js +6 -6
- package/plugin/runtime/lsp-daemon/dist/.omo-runtime-manifest.json +4 -4
- package/plugin/runtime/lsp-daemon/dist/cli.js +8 -2
- package/plugin/runtime/lsp-daemon/dist/client.js +8 -2
- package/plugin/runtime/lsp-daemon/dist/index.js +8 -2
- package/plugin/runtime/rollback-migrate.js +2 -2
- package/plugin/runtime/task-config/index.js +3 -3
- package/plugin/runtime/thread-sdk/sdk.js +5 -5
- package/plugin/scripts/install.mjs +20 -15
- package/plugin/skills/ast-grep/references/recipes.md +1 -1
- package/plugin/skills/ast-grep/tests/smoke.ps1 +1 -1
- package/plugin/skills/ast-grep/tests/smoke.sh +1 -1
- package/plugin/skills/browser/runtime/omowright/index.js +16 -16
- package/plugin/skills/browser/runtime/omowright/manifest.json +5 -5
- package/plugin/skills/browser/runtime/omowright/page-bundle.js +14 -4
- package/plugin/skills/browser/scripts/browser-doctor-report.mjs +36 -9
- package/plugin/skills/browser/scripts/browser-doctor.mjs +24 -7
- package/plugin/skills/browser/scripts/browser-engine-guard.mjs +2 -1
- package/plugin/skills/browser/scripts/browser-install.mjs +40 -8
- package/plugin/skills/debugging/references/scripts/dap.mjs +280 -170
- package/plugin/skills/debugging/references/scripts/fixture-adapter.mjs +104 -42
- package/plugin/skills/frontend/scripts/detect/cli.ts +67 -50
- package/plugin/skills/frontend/scripts/detect/config.ts +41 -38
- package/plugin/skills/frontend/scripts/detect/core/color.ts +109 -94
- package/plugin/skills/frontend/scripts/detect/core/page.ts +43 -42
- package/plugin/skills/frontend/scripts/detect/core/shadow.ts +38 -29
- package/plugin/skills/frontend/scripts/detect/core/source.ts +25 -20
- package/plugin/skills/frontend/scripts/detect/detect.ts +63 -45
- package/plugin/skills/frontend/scripts/detect/lint.ts +78 -69
- package/plugin/skills/frontend/scripts/detect/render/probe-placement.ts +36 -32
- package/plugin/skills/frontend/scripts/detect/render/renderer.ts +14 -13
- package/plugin/skills/frontend/scripts/detect/render/webview.ts +53 -50
- package/plugin/skills/frontend/scripts/detect/report.ts +20 -18
- package/plugin/skills/frontend/scripts/detect/rule.ts +21 -21
- package/plugin/skills/frontend/scripts/detect/rules/color/ai-color-palette.ts +144 -63
- package/plugin/skills/frontend/scripts/detect/rules/color/cream-palette.ts +41 -27
- package/plugin/skills/frontend/scripts/detect/rules/color/dark-glow.ts +59 -34
- package/plugin/skills/frontend/scripts/detect/rules/color/design-system-color.ts +37 -28
- package/plugin/skills/frontend/scripts/detect/rules/color/gradient-text.ts +68 -45
- package/plugin/skills/frontend/scripts/detect/rules/color/gray-on-color.ts +34 -25
- package/plugin/skills/frontend/scripts/detect/rules/color/index.ts +9 -2
- package/plugin/skills/frontend/scripts/detect/rules/color/low-contrast.ts +106 -43
- package/plugin/skills/frontend/scripts/detect/rules/color/radial-halo.ts +48 -23
- package/plugin/skills/frontend/scripts/detect/rules/color/radial-spotlight-glow.ts +49 -26
- package/plugin/skills/frontend/scripts/detect/rules/color/support/animation-opacity.ts +90 -66
- package/plugin/skills/frontend/scripts/detect/rules/color/support/color-path.ts +43 -6
- package/plugin/skills/frontend/scripts/detect/rules/color/support/contrast-pairs.ts +75 -38
- package/plugin/skills/frontend/scripts/detect/rules/color/support/contrast-role.ts +142 -59
- package/plugin/skills/frontend/scripts/detect/rules/color/support/glow-forms.ts +93 -44
- package/plugin/skills/frontend/scripts/detect/rules/color/support/gradient-samples.ts +115 -114
- package/plugin/skills/frontend/scripts/detect/rules/color/support/gradients.ts +77 -66
- package/plugin/skills/frontend/scripts/detect/rules/color/support/mockup-roots.ts +178 -48
- package/plugin/skills/frontend/scripts/detect/rules/color/support/page-ignore.ts +6 -2
- package/plugin/skills/frontend/scripts/detect/rules/color/support/painted-text.ts +171 -108
- package/plugin/skills/frontend/scripts/detect/rules/color/support/palette-roles.ts +60 -39
- package/plugin/skills/frontend/scripts/detect/rules/color/support/placeholder-contrast.ts +36 -16
- package/plugin/skills/frontend/scripts/detect/rules/color/support/stock-accent.ts +48 -18
- package/plugin/skills/frontend/scripts/detect/rules/color/support/text-colors.ts +88 -62
- package/plugin/skills/frontend/scripts/detect/rules/copy/aphoristic-cadence.ts +25 -15
- package/plugin/skills/frontend/scripts/detect/rules/copy/broken-image.ts +20 -12
- package/plugin/skills/frontend/scripts/detect/rules/copy/em-dash-overuse.ts +63 -39
- package/plugin/skills/frontend/scripts/detect/rules/copy/index.ts +9 -2
- package/plugin/skills/frontend/scripts/detect/rules/copy/marketing-buzzword.ts +53 -25
- package/plugin/skills/frontend/scripts/detect/rules/copy/numbered-section-labels.ts +49 -28
- package/plugin/skills/frontend/scripts/detect/rules/copy/repeated-container-text.ts +80 -47
- package/plugin/skills/frontend/scripts/detect/rules/copy/script-error.ts +42 -34
- package/plugin/skills/frontend/scripts/detect/rules/copy/skipped-heading.ts +199 -75
- package/plugin/skills/frontend/scripts/detect/rules/copy/support/numbered-label.ts +122 -71
- package/plugin/skills/frontend/scripts/detect/rules/copy/support/page-text.ts +32 -24
- package/plugin/skills/frontend/scripts/detect/rules/copy/theater-slop-phrase.ts +42 -13
- package/plugin/skills/frontend/scripts/detect/rules/decoration/blinking-cursor.ts +49 -41
- package/plugin/skills/frontend/scripts/detect/rules/decoration/border-accent-on-rounded.ts +10 -10
- package/plugin/skills/frontend/scripts/detect/rules/decoration/bounce-easing.ts +87 -68
- package/plugin/skills/frontend/scripts/detect/rules/decoration/buried-raster.ts +83 -64
- package/plugin/skills/frontend/scripts/detect/rules/decoration/codex-grid-background.ts +29 -29
- package/plugin/skills/frontend/scripts/detect/rules/decoration/design-system-radius.ts +33 -26
- package/plugin/skills/frontend/scripts/detect/rules/decoration/gpt-thin-border-wide-shadow.ts +61 -58
- package/plugin/skills/frontend/scripts/detect/rules/decoration/hard-offset-shadow.ts +25 -23
- package/plugin/skills/frontend/scripts/detect/rules/decoration/hero-eyebrow-chip.ts +16 -14
- package/plugin/skills/frontend/scripts/detect/rules/decoration/icon-tile-stack.ts +85 -84
- package/plugin/skills/frontend/scripts/detect/rules/decoration/index.ts +17 -17
- package/plugin/skills/frontend/scripts/detect/rules/decoration/kicker-above-heading.ts +79 -64
- package/plugin/skills/frontend/scripts/detect/rules/decoration/marquee.ts +57 -40
- package/plugin/skills/frontend/scripts/detect/rules/decoration/organic-clip-path.ts +34 -34
- package/plugin/skills/frontend/scripts/detect/rules/decoration/pulsing-dot.ts +92 -58
- package/plugin/skills/frontend/scripts/detect/rules/decoration/repeating-stripes-gradient.ts +19 -19
- package/plugin/skills/frontend/scripts/detect/rules/decoration/shape-assembled-illustration.ts +59 -53
- package/plugin/skills/frontend/scripts/detect/rules/decoration/side-tab.ts +15 -12
- package/plugin/skills/frontend/scripts/detect/rules/decoration/support/appearance.ts +89 -85
- package/plugin/skills/frontend/scripts/detect/rules/decoration/support/assert-cases.ts +17 -15
- package/plugin/skills/frontend/scripts/detect/rules/decoration/support/borders.ts +178 -136
- package/plugin/skills/frontend/scripts/detect/rules/decoration/support/clip-geometry.ts +155 -145
- package/plugin/skills/frontend/scripts/detect/rules/decoration/support/css-candidates.ts +60 -54
- package/plugin/skills/frontend/scripts/detect/rules/decoration/support/curve-samples.ts +51 -48
- package/plugin/skills/frontend/scripts/detect/rules/decoration/support/gradient-pattern.ts +43 -34
- package/plugin/skills/frontend/scripts/detect/rules/decoration/support/keyframes.ts +118 -113
- package/plugin/skills/frontend/scripts/detect/rules/decoration/support/labels.ts +74 -67
- package/plugin/skills/frontend/scripts/detect/rules/decoration/support/raster-state.ts +80 -42
- package/plugin/skills/frontend/scripts/detect/rules/index.ts +6 -6
- package/plugin/skills/frontend/scripts/detect/rules/layout/body-text-viewport-edge.ts +116 -55
- package/plugin/skills/frontend/scripts/detect/rules/layout/clipped-overflow-container.ts +22 -9
- package/plugin/skills/frontend/scripts/detect/rules/layout/content-hidden-at-rest.ts +113 -52
- package/plugin/skills/frontend/scripts/detect/rules/layout/cramped-padding.ts +167 -90
- package/plugin/skills/frontend/scripts/detect/rules/layout/edge-flush-cards.ts +82 -41
- package/plugin/skills/frontend/scripts/detect/rules/layout/first-viewport-column-overflow.ts +74 -37
- package/plugin/skills/frontend/scripts/detect/rules/layout/heading-rhythm.ts +49 -24
- package/plugin/skills/frontend/scripts/detect/rules/layout/index.ts +14 -3
- package/plugin/skills/frontend/scripts/detect/rules/layout/monotonous-spacing.ts +47 -28
- package/plugin/skills/frontend/scripts/detect/rules/layout/nested-cards.ts +66 -31
- package/plugin/skills/frontend/scripts/detect/rules/layout/straggler.ts +46 -22
- package/plugin/skills/frontend/scripts/detect/rules/layout/support/cards.ts +157 -82
- package/plugin/skills/frontend/scripts/detect/rules/layout/support/clipping.ts +98 -50
- package/plugin/skills/frontend/scripts/detect/rules/layout/support/declared-mockups.ts +100 -36
- package/plugin/skills/frontend/scripts/detect/rules/layout/support/geometry.ts +66 -43
- package/plugin/skills/frontend/scripts/detect/rules/layout/support/hidden-interface.ts +56 -24
- package/plugin/skills/frontend/scripts/detect/rules/layout/support/layout-cases.ts +23 -8
- package/plugin/skills/frontend/scripts/detect/rules/layout/support/line-breaks.ts +28 -16
- package/plugin/skills/frontend/scripts/detect/rules/layout/support/motion.ts +88 -56
- package/plugin/skills/frontend/scripts/detect/rules/layout/support/padding.ts +106 -68
- package/plugin/skills/frontend/scripts/detect/rules/layout/support/rhythm.ts +204 -128
- package/plugin/skills/frontend/scripts/detect/rules/layout/text-occlusion.ts +125 -70
- package/plugin/skills/frontend/scripts/detect/rules/layout/text-overflow.ts +111 -59
- package/plugin/skills/frontend/scripts/detect/rules/layout/unbalanced-heading.ts +27 -16
- package/plugin/skills/frontend/scripts/detect/rules/layout/viewport-reflow.ts +38 -23
- package/plugin/skills/frontend/scripts/detect/rules/source/ai-color-palette.ts +17 -6
- package/plugin/skills/frontend/scripts/detect/rules/source/aphoristic-cadence.ts +19 -9
- package/plugin/skills/frontend/scripts/detect/rules/source/border-accent-on-rounded.ts +31 -13
- package/plugin/skills/frontend/scripts/detect/rules/source/bounce-easing.ts +41 -16
- package/plugin/skills/frontend/scripts/detect/rules/source/broken-image.ts +19 -9
- package/plugin/skills/frontend/scripts/detect/rules/source/codex-grid-background.ts +36 -12
- package/plugin/skills/frontend/scripts/detect/rules/source/dark-glow.ts +28 -14
- package/plugin/skills/frontend/scripts/detect/rules/source/em-dash-overuse.ts +17 -9
- package/plugin/skills/frontend/scripts/detect/rules/source/gradient-text.ts +14 -6
- package/plugin/skills/frontend/scripts/detect/rules/source/gray-on-color.ts +18 -7
- package/plugin/skills/frontend/scripts/detect/rules/source/index.ts +18 -1
- package/plugin/skills/frontend/scripts/detect/rules/source/marketing-buzzword.ts +49 -11
- package/plugin/skills/frontend/scripts/detect/rules/source/marquee.ts +16 -6
- package/plugin/skills/frontend/scripts/detect/rules/source/monotonous-spacing.ts +35 -17
- package/plugin/skills/frontend/scripts/detect/rules/source/overused-font.ts +51 -10
- package/plugin/skills/frontend/scripts/detect/rules/source/radial-halo.ts +16 -8
- package/plugin/skills/frontend/scripts/detect/rules/source/side-tab.ts +88 -47
- package/plugin/skills/frontend/scripts/detect/rules/source/support/accent-scans.ts +103 -62
- package/plugin/skills/frontend/scripts/detect/rules/source/support/check-source.ts +6 -2
- package/plugin/skills/frontend/scripts/detect/rules/source/support/corners.ts +148 -80
- package/plugin/skills/frontend/scripts/detect/rules/source/support/css-effects.ts +86 -66
- package/plugin/skills/frontend/scripts/detect/rules/source/support/css-scopes.ts +148 -113
- package/plugin/skills/frontend/scripts/detect/rules/source/support/image-tags.ts +113 -105
- package/plugin/skills/frontend/scripts/detect/rules/source/support/js-punctuation.ts +47 -30
- package/plugin/skills/frontend/scripts/detect/rules/source/support/markup-scope.ts +45 -34
- package/plugin/skills/frontend/scripts/detect/rules/source/support/source-color.ts +64 -29
- package/plugin/skills/frontend/scripts/detect/rules/source/support/source-shadow.ts +17 -10
- package/plugin/skills/frontend/scripts/detect/rules/source/support/source-text.ts +128 -86
- package/plugin/skills/frontend/scripts/detect/rules/typography/all-caps-body.ts +23 -9
- package/plugin/skills/frontend/scripts/detect/rules/typography/design-system-font-size.ts +27 -17
- package/plugin/skills/frontend/scripts/detect/rules/typography/design-system-font.ts +27 -17
- package/plugin/skills/frontend/scripts/detect/rules/typography/extreme-negative-tracking.ts +26 -12
- package/plugin/skills/frontend/scripts/detect/rules/typography/flat-type-hierarchy.ts +41 -19
- package/plugin/skills/frontend/scripts/detect/rules/typography/index.ts +14 -3
- package/plugin/skills/frontend/scripts/detect/rules/typography/italic-serif-display.ts +67 -16
- package/plugin/skills/frontend/scripts/detect/rules/typography/justified-text.ts +47 -25
- package/plugin/skills/frontend/scripts/detect/rules/typography/line-length.ts +37 -21
- package/plugin/skills/frontend/scripts/detect/rules/typography/oversized-h1.ts +35 -14
- package/plugin/skills/frontend/scripts/detect/rules/typography/overused-font.ts +83 -38
- package/plugin/skills/frontend/scripts/detect/rules/typography/support/drawn-enlargement.ts +68 -40
- package/plugin/skills/frontend/scripts/detect/rules/typography/support/fading-text.ts +59 -39
- package/plugin/skills/frontend/scripts/detect/rules/typography/support/flex-runs.ts +13 -8
- package/plugin/skills/frontend/scripts/detect/rules/typography/support/font-family.ts +68 -17
- package/plugin/skills/frontend/scripts/detect/rules/typography/support/painted-text.ts +173 -67
- package/plugin/skills/frontend/scripts/detect/rules/typography/support/svg-size.ts +56 -49
- package/plugin/skills/frontend/scripts/detect/rules/typography/support/text-context.ts +155 -78
- package/plugin/skills/frontend/scripts/detect/rules/typography/support/text-lines.ts +38 -28
- package/plugin/skills/frontend/scripts/detect/rules/typography/support/type-hierarchy.ts +43 -38
- package/plugin/skills/frontend/scripts/detect/rules/typography/tight-leading.ts +67 -39
- package/plugin/skills/frontend/scripts/detect/rules/typography/tiny-text.ts +34 -15
- package/plugin/skills/frontend/scripts/detect/rules/typography/undersized-ui-text.ts +52 -22
- package/plugin/skills/frontend/scripts/detect/rules/typography/wide-tracking.ts +37 -19
- package/plugin/skills/frontend/scripts/detect/snapshot/collect.ts +154 -145
- package/plugin/skills/frontend/scripts/detect/snapshot/style-props.ts +121 -21
- package/plugin/skills/frontend/scripts/detect/testing/build-snapshot.ts +140 -65
- package/plugin/skills/frontend/scripts/detect/types.ts +81 -76
- package/plugin/skills/frontend/scripts/perfection/accent-stripes/color.ts +205 -85
- package/plugin/skills/frontend/scripts/perfection/accent-stripes/css-parse.ts +97 -80
- package/plugin/skills/frontend/scripts/perfection/accent-stripes/declarations.ts +129 -101
- package/plugin/skills/frontend/scripts/perfection/accent-stripes/findings.ts +23 -23
- package/plugin/skills/frontend/scripts/perfection/accent-stripes/gradient.ts +43 -42
- package/plugin/skills/frontend/scripts/perfection/accent-stripes/lint.ts +75 -60
- package/plugin/skills/frontend/scripts/perfection/accent-stripes/markup.ts +131 -106
- package/plugin/skills/frontend/scripts/perfection/accent-stripes/selector.ts +28 -25
- package/plugin/skills/frontend/scripts/perfection/accent-stripes/tailwind.ts +93 -78
- package/plugin/skills/frontend/scripts/perfection/check-accent-stripes.ts +22 -22
- package/plugin/skills/frontend/scripts/perfection/check-draft-guard.ts +24 -24
- package/plugin/skills/frontend/scripts/perfection/collect-files.ts +49 -36
- package/plugin/skills/frontend/scripts/perfection/draft-guard/findings.ts +10 -9
- package/plugin/skills/frontend/scripts/perfection/draft-guard/lint.ts +27 -24
- package/plugin/skills/frontend/scripts/perfection/draft-guard/rules.ts +46 -42
- package/plugin/skills/frontend/scripts/perfection/draft-guard/text-nodes.ts +98 -75
- package/plugin/skills/lsp-setup/scripts/detect-lsp.ts +162 -152
- package/plugin/skills/lsp-setup/scripts/lsp-server-table.ts +164 -164
- package/plugin/skills/lsp-setup/scripts/verify-lsp.ts +94 -91
- package/plugin/skills/programming/SKILL.md +2 -2
- package/plugin/skills/programming/scripts/go/new-project.ts +68 -68
- package/plugin/skills/programming/scripts/python/new-project.ts +64 -64
- package/plugin/skills/programming/scripts/python/new-script.ts +39 -39
- package/plugin/skills/programming/scripts/rust/new-project.ts +60 -57
- package/plugin/skills/programming/scripts/shared/run-tool.ts +7 -7
- package/plugin/skills/programming/scripts/typescript/check-no-excuse-rules.ts +96 -36
- package/plugin/skills/programming/scripts/typescript/check-test-junk-rules.ts +38 -17
- package/plugin/skills/programming/scripts/typescript/check-test-junk.ts +13 -2
- package/plugin/skills/programming/scripts/typescript/mutation-proof.ts +16 -4
- package/plugin/skills/programming/scripts/typescript/new-project.ts +21 -21
- package/plugin/skills/ultimate-browsing/engine/templates/playwright_mobile_chrome.js +65 -62
- package/plugin/skills/ultimate-browsing/engine/templates/playwright_real_chrome.js +73 -70
- package/plugin/skills/ulw-plan/scripts/plan-templates.mjs +30 -30
- package/plugin/skills/ulw-plan/scripts/scaffold-plan.mjs +131 -123
- package/plugin/skills/ulw-research/scripts/claim-kinds.mjs +178 -67
- package/plugin/skills/ulw-research/scripts/claims-index.mjs +117 -93
- package/plugin/skills/ulw-research/scripts/cli-support.mjs +73 -73
- package/plugin/skills/ulw-research/scripts/contracts.mjs +604 -174
- package/plugin/skills/ulw-research/scripts/conversion-probe.mjs +161 -113
- package/plugin/skills/ulw-research/scripts/css-hiding.mjs +126 -92
- package/plugin/skills/ulw-research/scripts/css-lite.mjs +143 -137
- package/plugin/skills/ulw-research/scripts/design-spec.mjs +123 -107
- package/plugin/skills/ulw-research/scripts/entities.mjs +66 -30
- package/plugin/skills/ulw-research/scripts/entry-guard.mjs +8 -8
- package/plugin/skills/ulw-research/scripts/fact-commands-fill.mjs +104 -51
- package/plugin/skills/ulw-research/scripts/fact-commands-meaning.mjs +207 -105
- package/plugin/skills/ulw-research/scripts/fact-commands-polish.mjs +143 -76
- package/plugin/skills/ulw-research/scripts/fact-commands-verify.mjs +164 -120
- package/plugin/skills/ulw-research/scripts/fact-commands.mjs +264 -151
- package/plugin/skills/ulw-research/scripts/fact-derive.mjs +92 -48
- package/plugin/skills/ulw-research/scripts/fact-expr.mjs +90 -78
- package/plugin/skills/ulw-research/scripts/fact-fill.mjs +215 -127
- package/plugin/skills/ulw-research/scripts/fact-ledger-kinds.mjs +305 -131
- package/plugin/skills/ulw-research/scripts/fact-ledger-schema.mjs +264 -158
- package/plugin/skills/ulw-research/scripts/fact-ledger.mjs +93 -57
- package/plugin/skills/ulw-research/scripts/fact-locate.mjs +204 -147
- package/plugin/skills/ulw-research/scripts/fact-pairs.mjs +126 -108
- package/plugin/skills/ulw-research/scripts/fact-recompute.mjs +89 -66
- package/plugin/skills/ulw-research/scripts/fidelity-binding.mjs +101 -70
- package/plugin/skills/ulw-research/scripts/fidelity-brief.mjs +95 -89
- package/plugin/skills/ulw-research/scripts/fidelity-claims.mjs +76 -48
- package/plugin/skills/ulw-research/scripts/fidelity-csv.mjs +27 -27
- package/plugin/skills/ulw-research/scripts/fidelity-lexicon.mjs +101 -78
- package/plugin/skills/ulw-research/scripts/fidelity-originals.mjs +124 -77
- package/plugin/skills/ulw-research/scripts/fidelity-policy.mjs +132 -83
- package/plugin/skills/ulw-research/scripts/fidelity-records.mjs +179 -117
- package/plugin/skills/ulw-research/scripts/fidelity-snapshot-readability.mjs +38 -33
- package/plugin/skills/ulw-research/scripts/fidelity-sources.mjs +92 -54
- package/plugin/skills/ulw-research/scripts/fidelity-state.mjs +27 -27
- package/plugin/skills/ulw-research/scripts/fidelity-trace.mjs +81 -48
- package/plugin/skills/ulw-research/scripts/fidelity-value-unit.mjs +207 -104
- package/plugin/skills/ulw-research/scripts/fidelity-values.mjs +255 -154
- package/plugin/skills/ulw-research/scripts/format-extract-css.mjs +74 -74
- package/plugin/skills/ulw-research/scripts/format-extract.mjs +161 -134
- package/plugin/skills/ulw-research/scripts/gates-fidelity.mjs +118 -59
- package/plugin/skills/ulw-research/scripts/gates-figures.mjs +192 -141
- package/plugin/skills/ulw-research/scripts/gates-layout.mjs +119 -85
- package/plugin/skills/ulw-research/scripts/gates-static.mjs +109 -102
- package/plugin/skills/ulw-research/scripts/gates-structure.mjs +105 -86
- package/plugin/skills/ulw-research/scripts/gates-text.mjs +169 -113
- package/plugin/skills/ulw-research/scripts/html-foreign-object.mjs +39 -34
- package/plugin/skills/ulw-research/scripts/html-lite.mjs +230 -176
- package/plugin/skills/ulw-research/scripts/html-markup.mjs +150 -128
- package/plugin/skills/ulw-research/scripts/html-text-map.mjs +125 -96
- package/plugin/skills/ulw-research/scripts/layout-probe.mjs +10 -8
- package/plugin/skills/ulw-research/scripts/lexicon.mjs +36 -19
- package/plugin/skills/ulw-research/scripts/markdown-closers.mjs +85 -85
- package/plugin/skills/ulw-research/scripts/md-lite.mjs +133 -125
- package/plugin/skills/ulw-research/scripts/meaning-check.mjs +154 -123
- package/plugin/skills/ulw-research/scripts/number-grammar.mjs +10 -8
- package/plugin/skills/ulw-research/scripts/numerals.mjs +181 -137
- package/plugin/skills/ulw-research/scripts/outcome-start.mjs +50 -36
- package/plugin/skills/ulw-research/scripts/outcome.mjs +194 -153
- package/plugin/skills/ulw-research/scripts/particles-ko.mjs +72 -70
- package/plugin/skills/ulw-research/scripts/placeholder.mjs +130 -112
- package/plugin/skills/ulw-research/scripts/polish-apply.mjs +67 -51
- package/plugin/skills/ulw-research/scripts/polish-diff.mjs +10 -5
- package/plugin/skills/ulw-research/scripts/polish-project.mjs +67 -57
- package/plugin/skills/ulw-research/scripts/polish-rules.mjs +120 -100
- package/plugin/skills/ulw-research/scripts/rational.mjs +74 -73
- package/plugin/skills/ulw-research/scripts/raw-decode.mjs +74 -74
- package/plugin/skills/ulw-research/scripts/raw-locator.mjs +32 -24
- package/plugin/skills/ulw-research/scripts/repair-tracker.mjs +98 -93
- package/plugin/skills/ulw-research/scripts/report-tools-commands.mjs +265 -176
- package/plugin/skills/ulw-research/scripts/report-tools.mjs +65 -62
- package/plugin/skills/ulw-research/scripts/sentence-split.mjs +63 -43
- package/plugin/skills/ulw-research/scripts/source-commands.mjs +199 -125
- package/plugin/skills/ulw-research/scripts/source-refresh.mjs +91 -54
- package/plugin/skills/ulw-research/scripts/source-snapshot.mjs +143 -102
- package/plugin/skills/ulw-research/scripts/source-view.mjs +82 -46
- package/plugin/skills/ulw-research/scripts/sources-citation.mjs +135 -96
- package/plugin/skills/ulw-research/scripts/text-normalize.mjs +63 -48
- package/plugin/skills/ulw-research/scripts/text-similarity.mjs +15 -15
- package/plugin/skills/ulw-research/scripts/unit-algebra.mjs +98 -66
- package/plugin/skills/ulw-research/scripts/unit-errors.mjs +14 -14
- package/plugin/skills/ulw-research/scripts/unit-metadata.mjs +30 -14
- package/plugin/skills/ulw-research/scripts/unit-pairs.mjs +57 -45
- package/plugin/skills/ulw-research/scripts/unit-precision.mjs +39 -25
- package/plugin/skills/ulw-research/scripts/unit-rules-shapes.mjs +79 -44
- package/plugin/skills/ulw-research/scripts/unit-rules.mjs +262 -135
- package/plugin/skills/ulw-research/scripts/units.mjs +96 -65
- package/plugin/skills/visual-qa/scripts/ansi.ts +3 -6
- package/plugin/skills/visual-qa/scripts/cli.ts +52 -52
- package/plugin/skills/visual-qa/scripts/east-asian-width.ts +53 -53
- package/plugin/skills/visual-qa/scripts/image-diff.ts +86 -86
- package/plugin/skills/visual-qa/scripts/png-crc.ts +16 -16
- package/plugin/skills/visual-qa/scripts/png-decode.ts +167 -167
- package/plugin/skills/visual-qa/scripts/png-synth.ts +36 -40
- package/plugin/skills/visual-qa/scripts/tui-grid.ts +63 -63
- package/plugin/skills/visual-qa/scripts/types.ts +37 -37
- package/plugin/skills/visual-qa/scripts/visual-qa.mjs +268 -289
|
@@ -52,7 +52,9 @@ const TASK_CONFIG_RUNTIME = join("runtime", "task-config", "index.js")
|
|
|
52
52
|
*/
|
|
53
53
|
function loadMemoryRuntimeCaps(options) {
|
|
54
54
|
try {
|
|
55
|
-
const runtime = (options.loadRuntime ?? ((pluginRoot) => requireRuntime(join(pluginRoot, TASK_CONFIG_RUNTIME))))(
|
|
55
|
+
const runtime = (options.loadRuntime ?? ((pluginRoot) => requireRuntime(join(pluginRoot, TASK_CONFIG_RUNTIME))))(
|
|
56
|
+
options.pluginRoot,
|
|
57
|
+
)
|
|
56
58
|
return runtime.resolveMemoryRuntimeCaps({ cwd: options.cwd ?? process.cwd(), env: options.env ?? process.env })
|
|
57
59
|
} catch {
|
|
58
60
|
return undefined
|
|
@@ -75,14 +77,19 @@ function capText(maxBytes) {
|
|
|
75
77
|
}
|
|
76
78
|
|
|
77
79
|
function lastCleanupText(entry) {
|
|
78
|
-
return entry.lastCleanup === undefined
|
|
80
|
+
return entry.lastCleanup === undefined
|
|
81
|
+
? "; no cleanup recorded"
|
|
82
|
+
: `; last cleanup ${entry.lastCleanup.at} removed ${entry.lastCleanup.total}`
|
|
79
83
|
}
|
|
80
84
|
|
|
81
85
|
function formatMemoryRuntimeLines(identities, totalBytes) {
|
|
82
86
|
if (identities.length === 0) return []
|
|
83
|
-
const bySize = [...identities].sort(
|
|
87
|
+
const bySize = [...identities].sort(
|
|
88
|
+
(left, right) => right.bytes - left.bytes || left.identity.localeCompare(right.identity),
|
|
89
|
+
)
|
|
84
90
|
const lines = bySize.slice(0, LISTED_IDENTITIES).map((entry) => {
|
|
85
|
-
if (entry.sizeUnknown !== undefined)
|
|
91
|
+
if (entry.sizeUnknown !== undefined)
|
|
92
|
+
return `INFO memory runtime: ${entry.identity} size unknown (${capText(entry.maxBytes)})${lastCleanupText(entry)}`
|
|
86
93
|
const standing = runtimeSizeStanding(entry.bytes, entry.maxBytes)
|
|
87
94
|
const share = standing.percent === undefined ? "" : `, ${standing.percent}%`
|
|
88
95
|
return `INFO memory runtime: ${entry.identity} ${formatRuntimeBytes(entry.bytes)} (${capText(entry.maxBytes)}${share})${lastCleanupText(entry)}`
|
|
@@ -93,10 +100,14 @@ function formatMemoryRuntimeLines(identities, totalBytes) {
|
|
|
93
100
|
lines.push(`INFO memory runtime: ${rest.length} more identities hold ${formatRuntimeBytes(restBytes)}`)
|
|
94
101
|
}
|
|
95
102
|
const unknown = identities.filter((entry) => entry.sizeUnknown !== undefined).length
|
|
96
|
-
lines.push(
|
|
103
|
+
lines.push(
|
|
104
|
+
`INFO memory runtime total: ${formatRuntimeBytes(totalBytes)} across ${identities.length} identit${identities.length === 1 ? "y" : "ies"}${unknown === 0 ? "" : ` (${unknown} not measured)`}`,
|
|
105
|
+
)
|
|
97
106
|
for (const entry of bySize) {
|
|
98
107
|
if (entry.sizeUnknown !== undefined) {
|
|
99
|
-
lines.push(
|
|
108
|
+
lines.push(
|
|
109
|
+
`WARN memory runtime (${entry.identity}): size unknown: measurement exceeded ${entry.sizeUnknown.budgetMs} ms on ${entry.sizeUnknown.at}`,
|
|
110
|
+
)
|
|
100
111
|
continue
|
|
101
112
|
}
|
|
102
113
|
const excess = describeRuntimeCapExcess({
|
|
@@ -107,12 +118,16 @@ function formatMemoryRuntimeLines(identities, totalBytes) {
|
|
|
107
118
|
})
|
|
108
119
|
// Over the cap, the excess line says what the next pass does; the near-cap line is for 80-100 %.
|
|
109
120
|
if (excess !== undefined) {
|
|
110
|
-
lines.push(
|
|
121
|
+
lines.push(
|
|
122
|
+
`WARN memory runtime (${entry.identity}): ${excess}; raise memory.runtime.max_bytes, or set it to 0, to keep more.`,
|
|
123
|
+
)
|
|
111
124
|
continue
|
|
112
125
|
}
|
|
113
126
|
const standing = runtimeSizeStanding(entry.bytes, entry.maxBytes)
|
|
114
127
|
if (standing.level !== "warn") continue
|
|
115
|
-
lines.push(
|
|
128
|
+
lines.push(
|
|
129
|
+
`WARN memory runtime is near its size cap (${entry.identity}): ${formatRuntimeBytes(entry.bytes)} is ${standing.percent}% of the ${formatRuntimeBytes(entry.maxBytes)} cap (memory.runtime.max_bytes). The next maintenance pass evicts the oldest runtime data down to the cap; raise the cap, or set it to 0, to keep more.`,
|
|
130
|
+
)
|
|
116
131
|
}
|
|
117
132
|
return lines
|
|
118
133
|
}
|
|
@@ -144,7 +159,14 @@ export async function memoryRuntimeReport(options = {}) {
|
|
|
144
159
|
const startedAt = Date.now()
|
|
145
160
|
const measured = await measureRuntimeSizeWithinBudget(paths.runtime, { budgetMs, now: startedAt, signal })
|
|
146
161
|
if ("sizeUnknown" in measured) {
|
|
147
|
-
identities.push({
|
|
162
|
+
identities.push({
|
|
163
|
+
identity,
|
|
164
|
+
bytes: 0,
|
|
165
|
+
maxBytes,
|
|
166
|
+
discardUnreflectedJournals,
|
|
167
|
+
sizeUnknown: measured.sizeUnknown,
|
|
168
|
+
...cleaned,
|
|
169
|
+
})
|
|
148
170
|
continue
|
|
149
171
|
}
|
|
150
172
|
const bytes = measured.size.bytes
|
|
@@ -154,11 +176,23 @@ export async function memoryRuntimeReport(options = {}) {
|
|
|
154
176
|
let evictableBytes
|
|
155
177
|
try {
|
|
156
178
|
// Printed only on the over-cap line, and only with the switch off.
|
|
157
|
-
unreflectedBytes =
|
|
158
|
-
|
|
179
|
+
unreflectedBytes =
|
|
180
|
+
overCap && !discardUnreflectedJournals
|
|
181
|
+
? await measureUnreflectedJournalBytes({ paths, policy, signal })
|
|
182
|
+
: undefined
|
|
183
|
+
evictableBytes = overCap
|
|
184
|
+
? await measureRuntimeCapEvictableBytes({ paths, policy, now: Date.now, signal })
|
|
185
|
+
: undefined
|
|
159
186
|
} catch (error) {
|
|
160
187
|
if (!signal.aborted) throw error
|
|
161
|
-
identities.push({
|
|
188
|
+
identities.push({
|
|
189
|
+
identity,
|
|
190
|
+
bytes: 0,
|
|
191
|
+
maxBytes,
|
|
192
|
+
discardUnreflectedJournals,
|
|
193
|
+
sizeUnknown: { budgetMs, at: new Date(startedAt).toISOString() },
|
|
194
|
+
...cleaned,
|
|
195
|
+
})
|
|
162
196
|
continue
|
|
163
197
|
}
|
|
164
198
|
identities.push({
|
|
@@ -44,8 +44,9 @@ export function resolveMigrationEnvironment({ env, platform, homeDir }) {
|
|
|
44
44
|
.map((entry) => entry.trim())
|
|
45
45
|
.filter((entry) => (isWindows ? win32.isAbsolute(entry) : isAbsolute(entry)))
|
|
46
46
|
.filter((entry) => !/(?:^|[\\/])node_modules[\\/]\.bin[\\/]?$/.test(entry))
|
|
47
|
-
const npmPrefixes = [env.npm_config_prefix, env.NPM_CONFIG_PREFIX, npmrcPrefix(homeDir)]
|
|
48
|
-
|
|
47
|
+
const npmPrefixes = [env.npm_config_prefix, env.NPM_CONFIG_PREFIX, npmrcPrefix(homeDir)].filter(
|
|
48
|
+
(prefix) => typeof prefix === "string" && prefix !== "",
|
|
49
|
+
)
|
|
49
50
|
// Global bins live in <prefix>/bin on POSIX and in <prefix> itself on Windows, so every global bin
|
|
50
51
|
// dir on PATH also names a candidate prefix.
|
|
51
52
|
for (const directory of pathDirectories) npmPrefixes.push(isWindows ? directory : dirname(directory))
|
|
@@ -77,11 +78,14 @@ export function scanOmoBins(environment) {
|
|
|
77
78
|
if (binPath === undefined) continue
|
|
78
79
|
const owner = resolveOwner(binPath)
|
|
79
80
|
const kind = classify(owner)
|
|
80
|
-
const standalone =
|
|
81
|
+
const standalone =
|
|
82
|
+
kind === "foreign" ? standaloneBinaryVersion(binPath, environment.homeDir, environment.isWindows) : null
|
|
81
83
|
const broken = standalone === null ? brokenLaunchTarget(binPath, owner, environment.homeDir) : undefined
|
|
82
|
-
entries.push(
|
|
83
|
-
|
|
84
|
-
|
|
84
|
+
entries.push(
|
|
85
|
+
standalone === null
|
|
86
|
+
? { binPath, directory, owner, kind, ...(broken === undefined ? {} : { broken }) }
|
|
87
|
+
: { binPath, directory, owner: { name: STANDALONE_LABEL, version: standalone }, kind: "standalone" },
|
|
88
|
+
)
|
|
85
89
|
}
|
|
86
90
|
return entries
|
|
87
91
|
}
|
|
@@ -162,10 +166,7 @@ function resolveOwner(binPath) {
|
|
|
162
166
|
if (version !== undefined) return { name: "lazycodex", version }
|
|
163
167
|
}
|
|
164
168
|
// Ownership comes from an installed package the shim or its Bun sidecar really launches, never text alone.
|
|
165
|
-
const entries = [
|
|
166
|
-
...(shim === undefined ? [] : shimEntryPaths(shim, dirname(binPath))),
|
|
167
|
-
...bunxEntryPaths(binPath),
|
|
168
|
-
]
|
|
169
|
+
const entries = [...(shim === undefined ? [] : shimEntryPaths(shim, dirname(binPath))), ...bunxEntryPaths(binPath)]
|
|
169
170
|
for (const entry of entries) {
|
|
170
171
|
if (!isInsideNodeModules(entry) || !pathExists(entry)) continue
|
|
171
172
|
const owner = ownerOfFile(entry)
|
|
@@ -345,10 +346,21 @@ function omoInstallRemoval(entry, bunRoot) {
|
|
|
345
346
|
return `npm uninstall -g omo-ai --prefix ${shellQuote(prefix)}`
|
|
346
347
|
}
|
|
347
348
|
|
|
348
|
-
export function formatMigrationLines({
|
|
349
|
+
export function formatMigrationLines({
|
|
350
|
+
shadowing,
|
|
351
|
+
nativeDirectory,
|
|
352
|
+
legacyPackages,
|
|
353
|
+
registrations,
|
|
354
|
+
restoreCommand,
|
|
355
|
+
omoInstalls = [],
|
|
356
|
+
bunRoot = "",
|
|
357
|
+
standalone = false,
|
|
358
|
+
broken = [],
|
|
359
|
+
}) {
|
|
349
360
|
const lines = []
|
|
350
361
|
const first = omoInstalls[0]
|
|
351
|
-
const target =
|
|
362
|
+
const target =
|
|
363
|
+
first?.kind === "standalone" || (first === undefined && standalone) ? "the standalone omo binary" : "omo-ai"
|
|
352
364
|
// A wrapper whose launch target is gone is broken wherever it sits on PATH, even
|
|
353
365
|
// behind the install that runs; it gets its own line and never the repair offer
|
|
354
366
|
// meant for a working older edition.
|
|
@@ -357,12 +369,15 @@ export function formatMigrationLines({ shadowing, nativeDirectory, legacyPackage
|
|
|
357
369
|
}
|
|
358
370
|
for (const entry of shadowing) {
|
|
359
371
|
if (entry.broken !== undefined) continue
|
|
360
|
-
const fix =
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
372
|
+
const fix =
|
|
373
|
+
entry.kind === "legacy" && target === "omo-ai"
|
|
374
|
+
? `${repairCommand()} (repairs it), or remove that file.`
|
|
375
|
+
: nativeDirectory === null
|
|
376
|
+
? `remove that file, or put ${target === "omo-ai" ? "omo-ai's bin dir" : "the omo binary's directory"} ahead of it on PATH.`
|
|
377
|
+
: `remove that file, or move ${nativeDirectory} ahead of ${entry.directory} on PATH.`
|
|
378
|
+
lines.push(
|
|
379
|
+
`WARN another omo precedes ${target} on PATH: ${entry.binPath} (${ownerLabel(entry.owner)}). Fix: ${fix}`,
|
|
380
|
+
)
|
|
366
381
|
}
|
|
367
382
|
// Every further install is a second copy, whatever its kind: two omo-ai installs
|
|
368
383
|
// of different versions, or from different managers, are the same warning. The
|
|
@@ -378,21 +393,28 @@ export function formatMigrationLines({ shadowing, nativeDirectory, legacyPackage
|
|
|
378
393
|
if (shadowedOmo.length > 0) {
|
|
379
394
|
const others = shadowedOmo.map((entry) => `${entry.binPath} (${ownerLabel(entry.owner)})`).join(", ")
|
|
380
395
|
const removals = shadowedOmo.map((entry) => omoInstallRemoval(entry, bunRoot)).join(" and ")
|
|
381
|
-
lines.push(
|
|
396
|
+
lines.push(
|
|
397
|
+
`WARN more than one OmO install is on PATH: ${first.binPath} (${ownerLabel(first.owner)}) runs when you type omo; ${others} never runs. Keep one: ${removals}, or ${omoInstallRemoval(first, bunRoot)} to use the other.`,
|
|
398
|
+
)
|
|
382
399
|
}
|
|
383
400
|
for (const found of legacyPackages) {
|
|
384
401
|
const label = ownerLabel({ name: found.name, version: found.version })
|
|
385
|
-
const remove =
|
|
386
|
-
|
|
387
|
-
?
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
402
|
+
const remove =
|
|
403
|
+
found.manager === "npm"
|
|
404
|
+
? restoreCommand === null
|
|
405
|
+
? `npm uninstall -g ${found.name}`
|
|
406
|
+
: `npm uninstall -g ${found.name}, then re-run ${restoreCommand} if omo disappears.`
|
|
407
|
+
: `bun remove -g ${found.name}`
|
|
408
|
+
lines.push(
|
|
409
|
+
`WARN legacy package ${label} is still installed globally (${found.manager}: ${found.packageDir}). Remove: ${remove}`,
|
|
410
|
+
)
|
|
391
411
|
}
|
|
392
412
|
const byName = new Map()
|
|
393
413
|
for (const { name, path } of registrations) byName.set(name, [...(byName.get(name) ?? []), path])
|
|
394
414
|
for (const [name, paths] of byName) {
|
|
395
|
-
lines.push(
|
|
415
|
+
lines.push(
|
|
416
|
+
`INFO OpenCode still loads the ${name} plugin (${paths.join(", ")}). Keep it if you still use OpenCode; otherwise remove the plugin entry.`,
|
|
417
|
+
)
|
|
396
418
|
}
|
|
397
419
|
return lines
|
|
398
420
|
}
|
|
@@ -400,7 +422,9 @@ export function formatMigrationLines({ shadowing, nativeDirectory, legacyPackage
|
|
|
400
422
|
// The OpenCode edition's model settings Native does not use: the same line Native's first start
|
|
401
423
|
// prints (omo-senpi config-startup), for as long as the gap exists.
|
|
402
424
|
export function openCodeRoutingReport({ env, homeDir }) {
|
|
403
|
-
const path = ["omo.jsonc", "omo.json"]
|
|
425
|
+
const path = ["omo.jsonc", "omo.json"]
|
|
426
|
+
.map((name) => join(homeDir, ".omo", name))
|
|
427
|
+
.find((candidate) => readWholeFile(candidate) !== undefined)
|
|
404
428
|
let document = {}
|
|
405
429
|
if (path !== undefined) {
|
|
406
430
|
try {
|
|
@@ -420,15 +444,18 @@ export function migrationReport(options, restoreCommand) {
|
|
|
420
444
|
const environment = resolveMigrationEnvironment({ env, platform: options.platform ?? process.platform, homeDir })
|
|
421
445
|
const bins = scanOmoBins(environment)
|
|
422
446
|
const omoInstalls = omoInstallsOnPath(bins)
|
|
423
|
-
return [
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
447
|
+
return [
|
|
448
|
+
...formatMigrationLines({
|
|
449
|
+
shadowing: shadowingOmoBins(bins),
|
|
450
|
+
nativeDirectory: omoInstalls[0]?.directory ?? null,
|
|
451
|
+
legacyPackages: findLegacyPackages(environment),
|
|
452
|
+
registrations: findOpenCodeRegistrations(environment.opencodeConfigFiles),
|
|
453
|
+
restoreCommand,
|
|
454
|
+
omoInstalls,
|
|
455
|
+
bunRoot: environment.bunRoot,
|
|
456
|
+
standalone: options.standalone === true,
|
|
457
|
+
broken: bins.filter((entry) => entry.broken !== undefined),
|
|
458
|
+
}),
|
|
459
|
+
...openCodeRoutingReport({ env, homeDir }),
|
|
460
|
+
]
|
|
434
461
|
}
|
|
@@ -53,8 +53,10 @@ export function findPiConfigEdits({ agentDir, homeDir }) {
|
|
|
53
53
|
export function formatPiConfigLines(agentDir, edits) {
|
|
54
54
|
return [
|
|
55
55
|
`INFO config dir: ${agentDir}`,
|
|
56
|
-
...edits.map(
|
|
57
|
-
|
|
56
|
+
...edits.map(
|
|
57
|
+
(edit) =>
|
|
58
|
+
`WARN You edited ${edit.piPath} after omo moved to ${agentDir}; omo reads ${edit.agentPath}. Copy your change there (or run: omo config import-pi ${edit.file}).`,
|
|
59
|
+
),
|
|
58
60
|
]
|
|
59
61
|
}
|
|
60
62
|
|
|
@@ -65,6 +67,9 @@ export function piConfigReport(options = {}) {
|
|
|
65
67
|
try {
|
|
66
68
|
return formatPiConfigLines(agentDir, findPiConfigEdits({ agentDir, homeDir }))
|
|
67
69
|
} catch (error) {
|
|
68
|
-
return [
|
|
70
|
+
return [
|
|
71
|
+
`INFO config dir: ${agentDir}`,
|
|
72
|
+
`WARN could not check ${join(homeDir, ".pi", "agent")} for config edits: ${error.message}`,
|
|
73
|
+
]
|
|
69
74
|
}
|
|
70
75
|
}
|
|
@@ -48,12 +48,18 @@ export function formatReflectionLockLines(identity, verdict, reflectionDir, deci
|
|
|
48
48
|
if (verdict.state === "none" || verdict.state === "live") return []
|
|
49
49
|
const lock = join(reflectionDir, "active.lock")
|
|
50
50
|
if (verdict.state === "dead") {
|
|
51
|
-
return [
|
|
51
|
+
return [
|
|
52
|
+
`WARN memory reflection is stuck on a stale lock (${identity}): run ${verdict.runId} still holds ${lock}, but its launcher is gone and it already recorded its outcome. Next step: open a session and send /reflect (or any message); the session settles that run and starts any queued request.`,
|
|
53
|
+
]
|
|
52
54
|
}
|
|
53
55
|
if (decision?.kind === "reap") {
|
|
54
|
-
return [
|
|
56
|
+
return [
|
|
57
|
+
`WARN memory reflection is stuck on a stale lock (${identity}): run ${verdict.runId} still holds ${lock} and ${decision.reason}. Next step: omo doctor --fix (it would apply ${decision.action}).`,
|
|
58
|
+
]
|
|
55
59
|
}
|
|
56
|
-
return [
|
|
60
|
+
return [
|
|
61
|
+
`WARN memory reflection is stuck on a stale lock (${identity}): run ${verdict.runId} still holds ${lock} and ${verdict.reason}. Next step: run /doctor in a session; if no reflection run is active, run omo doctor --fix.`,
|
|
62
|
+
]
|
|
57
63
|
}
|
|
58
64
|
|
|
59
65
|
function listDurableIdentities(agentsRoot) {
|
|
@@ -98,7 +104,9 @@ function loadTaskConfigRuntime() {
|
|
|
98
104
|
export function readGlobalMemorySettings(home = homedir(), options = {}) {
|
|
99
105
|
try {
|
|
100
106
|
const runtime = (options.loadTaskConfig ?? loadTaskConfigRuntime)()
|
|
101
|
-
return runtime.resolveGlobalMemorySettings({
|
|
107
|
+
return runtime.resolveGlobalMemorySettings({
|
|
108
|
+
env: { ...(options.env ?? process.env), HOME: home, USERPROFILE: home },
|
|
109
|
+
})
|
|
102
110
|
} catch {
|
|
103
111
|
return undefined
|
|
104
112
|
}
|
|
@@ -119,29 +127,44 @@ export async function reflectionLockFix(options = {}) {
|
|
|
119
127
|
return formatStaleLockFixLines(identity.name, report, locks)
|
|
120
128
|
} catch (error) {
|
|
121
129
|
failed = true
|
|
122
|
-
return [
|
|
130
|
+
return [
|
|
131
|
+
`FAIL ${identity.name} reflection lock fix failed: ${error instanceof Error ? error.message : String(error)}`,
|
|
132
|
+
]
|
|
123
133
|
}
|
|
124
134
|
}
|
|
125
135
|
const orphans = async (identity) => {
|
|
126
136
|
try {
|
|
127
|
-
return orphanLines(
|
|
137
|
+
return orphanLines(
|
|
138
|
+
identity.name,
|
|
139
|
+
await sweepIdentityOrphanWorktrees(identity.root, { now: (probe.now ?? Date.now)(), dryRun }),
|
|
140
|
+
dryRun,
|
|
141
|
+
)
|
|
128
142
|
} catch (error) {
|
|
129
143
|
failed = true
|
|
130
|
-
return [
|
|
144
|
+
return [
|
|
145
|
+
`FAIL ${identity.name} orphan worktree sweep failed: ${error instanceof Error ? error.message : String(error)}`,
|
|
146
|
+
]
|
|
131
147
|
}
|
|
132
148
|
}
|
|
133
|
-
const settings =
|
|
134
|
-
|
|
135
|
-
|
|
149
|
+
const settings =
|
|
150
|
+
options.memorySettings ??
|
|
151
|
+
readGlobalMemorySettings(options.home ?? homedir(), {
|
|
152
|
+
env: options.env ?? process.env,
|
|
153
|
+
...(options.loadTaskConfig === undefined ? {} : { loadTaskConfig: options.loadTaskConfig }),
|
|
154
|
+
})
|
|
155
|
+
const retention = createRetentionHostSweepStep({
|
|
156
|
+
...(settings === undefined ? {} : { settings }),
|
|
157
|
+
...(probe.now === undefined ? {} : { now: probe.now }),
|
|
158
|
+
dryRun,
|
|
136
159
|
})
|
|
137
|
-
const retention = createRetentionHostSweepStep({ ...(settings === undefined ? {} : { settings }), ...(probe.now === undefined ? {} : { now: probe.now }), dryRun })
|
|
138
160
|
const retain = async (identity) => {
|
|
139
161
|
const lines = await retention(identity)
|
|
140
162
|
if (lines.some((line) => line.startsWith("FAIL "))) failed = true
|
|
141
163
|
return lines
|
|
142
164
|
}
|
|
143
165
|
const result = await sweepHostIdentities({ memoryRoot: memory, steps: [reap, orphans, retain], dryRun })
|
|
144
|
-
if (result.status === "busy")
|
|
166
|
+
if (result.status === "busy")
|
|
167
|
+
return { lines: ["INFO another sweep is running on this host; try again when it finishes"], failed: false }
|
|
145
168
|
const lines = result.lines.filter((line) => !/^INFO \S+ locks reclaimed 0, kept 0$/.test(line))
|
|
146
169
|
if (lines.length === 0) lines.push(dryRun ? "INFO nothing to fix" : "PASS no stale reflection locks")
|
|
147
170
|
return { lines, failed }
|
package/bin/lib/doctor.js
CHANGED
|
@@ -1,16 +1,24 @@
|
|
|
1
|
-
import { spawnSync } from "node:child_process"
|
|
2
1
|
import { existsSync, readFileSync, readdirSync, statSync } from "node:fs"
|
|
3
2
|
import { homedir } from "node:os"
|
|
4
3
|
import { join, resolve } from "node:path"
|
|
5
4
|
import { canonicalAgentDir } from "./agent-dir.js"
|
|
6
5
|
import { fetchNpmDistTagsSync } from "./npm-dist-tags.js"
|
|
7
|
-
import {
|
|
6
|
+
import {
|
|
7
|
+
channelDistTagVersion,
|
|
8
|
+
packageManifest,
|
|
9
|
+
packageRoot,
|
|
10
|
+
readJson,
|
|
11
|
+
releaseChannel,
|
|
12
|
+
resolveSenpi,
|
|
13
|
+
updateTarget,
|
|
14
|
+
} from "./package-paths.js"
|
|
8
15
|
import { daemonReportLines } from "./daemon.js"
|
|
9
16
|
import { migrationReport } from "./doctor-migration.js"
|
|
10
17
|
import { launchSpecDoctorLines } from "./launch-spec-mode.js"
|
|
11
18
|
import { piConfigReport } from "./doctor-pi-config.js"
|
|
12
19
|
import { needsSetupSuggestion } from "./setup-detect.js"
|
|
13
20
|
import { keychainHelperDoctorLines } from "./keychain-helper-doctor.js"
|
|
21
|
+
import { listProcesses } from "./process-list.js"
|
|
14
22
|
import { sameVersion } from "./same-version.js"
|
|
15
23
|
|
|
16
24
|
export function installedDistTag(version) {
|
|
@@ -62,7 +70,9 @@ export function warningsForSettings() {
|
|
|
62
70
|
return entry !== null && typeof entry === "object" && entry.source === "@code-yeongyu/omo-senpi"
|
|
63
71
|
})
|
|
64
72
|
return duplicate
|
|
65
|
-
? [
|
|
73
|
+
? [
|
|
74
|
+
"WARN duplicate @code-yeongyu/omo-senpi package entry; remove it from the packages array because omo loads the packaged extension",
|
|
75
|
+
]
|
|
66
76
|
: []
|
|
67
77
|
}
|
|
68
78
|
|
|
@@ -86,37 +96,27 @@ function engineVersionOrUnresolved(senpi) {
|
|
|
86
96
|
const ENGINE_MARKERS = ["senpi/dist/cli.js", "senpi/dist/bundle/cli.js"]
|
|
87
97
|
const MANAGED_MODE_FLAG = "--mode"
|
|
88
98
|
|
|
89
|
-
/**
|
|
90
|
-
* Reads the live process table. `ps` is the portable answer on macOS and Linux alike, and reading
|
|
91
|
-
* it can never be a reason for diagnostics to fail, so an unavailable or unparsable listing is an
|
|
92
|
-
* empty list.
|
|
93
|
-
*/
|
|
94
|
-
export function listProcesses() {
|
|
95
|
-
if (process.platform === "win32") return []
|
|
96
|
-
// -ww: an unlimited width, so `args` is never cut at the terminal width (BSD/macOS `ps` truncates).
|
|
97
|
-
const listed = spawnSync("ps", ["-ww", "-axo", "pid=,ppid=,etime=,tty=,args="], { encoding: "utf8" })
|
|
98
|
-
if (listed.status !== 0 || typeof listed.stdout !== "string") return []
|
|
99
|
-
const entries = []
|
|
100
|
-
for (const line of listed.stdout.split("\n")) {
|
|
101
|
-
const match = /^\s*(\d+)\s+(\d+)\s+(\S+)\s+(\S+)\s+(.*)$/.exec(line)
|
|
102
|
-
if (!match) continue
|
|
103
|
-
entries.push({
|
|
104
|
-
pid: Number(match[1]),
|
|
105
|
-
ppid: Number(match[2]),
|
|
106
|
-
elapsed: match[3],
|
|
107
|
-
tty: match[4],
|
|
108
|
-
command: match[5],
|
|
109
|
-
})
|
|
110
|
-
}
|
|
111
|
-
return entries
|
|
112
|
-
}
|
|
113
|
-
|
|
114
99
|
// A standalone binary runs its engine as the provisioned runtime executable itself. The same
|
|
115
100
|
// executable also serves omo's own commands, internal hosts and bundled scripts, so only a bare launch
|
|
116
101
|
// or engine flags count; those other roles are never engines.
|
|
117
102
|
const BINARY_RUNTIME_EXECUTABLE = String.raw`[\\/]binary-runtime[\\/][^\\/\s]+[\\/]omo(?:\.exe)?`
|
|
118
103
|
const BINARY_ENGINE = new RegExp(String.raw`${BINARY_RUNTIME_EXECUTABLE}(?=\s|$)\s*(\S*)`)
|
|
119
|
-
const BINARY_NON_ENGINE_COMMANDS = new Set([
|
|
104
|
+
const BINARY_NON_ENGINE_COMMANDS = new Set([
|
|
105
|
+
"doctor",
|
|
106
|
+
"setup",
|
|
107
|
+
"daemon",
|
|
108
|
+
"update",
|
|
109
|
+
"upgrade",
|
|
110
|
+
"host",
|
|
111
|
+
"install",
|
|
112
|
+
"remove",
|
|
113
|
+
"list",
|
|
114
|
+
"config",
|
|
115
|
+
"auth",
|
|
116
|
+
"ulw-loop",
|
|
117
|
+
"--version",
|
|
118
|
+
"-v",
|
|
119
|
+
])
|
|
120
120
|
|
|
121
121
|
function isBinaryEngine(command) {
|
|
122
122
|
const match = BINARY_ENGINE.exec(command)
|
|
@@ -169,7 +169,7 @@ export function formatStaleEngineLines(stale) {
|
|
|
169
169
|
const lines = stale.map((entry) =>
|
|
170
170
|
entry.retiredAppServer
|
|
171
171
|
? `WARN stale engine pid ${entry.pid} (age ${entry.elapsed}, tty ${entry.tty}) is an app-server daemon started by an older version; that command was removed, so stop it`
|
|
172
|
-
: `WARN stale engine pid ${entry.pid} (age ${entry.elapsed}, tty ${entry.tty}) has no launcher; it was orphaned by a signaled launcher
|
|
172
|
+
: `WARN stale engine pid ${entry.pid} (age ${entry.elapsed}, tty ${entry.tty}) has no launcher; it was orphaned by a signaled launcher`,
|
|
173
173
|
)
|
|
174
174
|
lines.push(`INFO reap them explicitly by pid: omo doctor --reap ${stale.map((entry) => entry.pid).join(" ")}`)
|
|
175
175
|
return lines
|
|
@@ -213,10 +213,13 @@ export function classifyRetiredPayloadEngines(entries, input) {
|
|
|
213
213
|
|
|
214
214
|
export function formatRetiredPayloadLines(retired) {
|
|
215
215
|
if (retired.length === 0) return []
|
|
216
|
-
const lines = retired.map(
|
|
217
|
-
|
|
216
|
+
const lines = retired.map(
|
|
217
|
+
(entry) =>
|
|
218
|
+
`WARN engine pid ${entry.pid} (age ${entry.elapsed}, tty ${entry.tty}) started before this payload was installed; it still runs the previous plugin copy`,
|
|
219
|
+
)
|
|
220
|
+
lines.push(
|
|
221
|
+
"INFO restart those sessions to pick up the installed payload; a running engine is never rewritten in place",
|
|
218
222
|
)
|
|
219
|
-
lines.push("INFO restart those sessions to pick up the installed payload; a running engine is never rewritten in place")
|
|
220
223
|
return lines
|
|
221
224
|
}
|
|
222
225
|
|
|
@@ -261,7 +264,9 @@ export function reapStaleEngines(args, options = {}) {
|
|
|
261
264
|
continue
|
|
262
265
|
}
|
|
263
266
|
if (!isInteractive(entry)) {
|
|
264
|
-
lines.push(
|
|
267
|
+
lines.push(
|
|
268
|
+
`FAIL refusing pid ${pid}: it is a managed engine (${MANAGED_MODE_FLAG}), owned by whatever started it`,
|
|
269
|
+
)
|
|
265
270
|
failed = true
|
|
266
271
|
continue
|
|
267
272
|
}
|
|
@@ -339,24 +344,28 @@ export function formatTransientMemoryLines(counts) {
|
|
|
339
344
|
|
|
340
345
|
export function transientMemoryReport(options) {
|
|
341
346
|
const root = memoryRoot(options.env ?? process.env)
|
|
342
|
-
return formatTransientMemoryLines(
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
347
|
+
return formatTransientMemoryLines(
|
|
348
|
+
countTransientMemoryIdentities({
|
|
349
|
+
agentsRoot: join(root, MEMORY_AGENTS_DIRNAME),
|
|
350
|
+
transientRoot: join(root, MEMORY_TRANSIENT_DIRNAME),
|
|
351
|
+
listDirs: options.listDirs ?? listSubdirectories,
|
|
352
|
+
hasRepo: options.hasRepo ?? ((identityRoot) => existsSync(join(identityRoot, MEMORY_REPO_DIRNAME))),
|
|
353
|
+
}),
|
|
354
|
+
)
|
|
348
355
|
}
|
|
349
356
|
|
|
350
357
|
function retiredPayloadReport(options) {
|
|
351
358
|
const list = options.list ?? listProcesses
|
|
352
359
|
const now = options.now ?? Date.now
|
|
353
|
-
const payloadMtimeMs =
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
+
const payloadMtimeMs =
|
|
361
|
+
options.payloadMtimeMs ??
|
|
362
|
+
((payloadDir) => {
|
|
363
|
+
try {
|
|
364
|
+
return statSync(join(payloadDir, "extensions", "omo.js")).mtimeMs
|
|
365
|
+
} catch {
|
|
366
|
+
return undefined
|
|
367
|
+
}
|
|
368
|
+
})
|
|
360
369
|
return formatRetiredPayloadLines(classifyRetiredPayloadEngines(list(), { payloadMtimeMs, nowMs: now() }))
|
|
361
370
|
}
|
|
362
371
|
|
|
@@ -366,7 +375,11 @@ function daemonReport(options) {
|
|
|
366
375
|
const engine = options.daemonEngine
|
|
367
376
|
if (engine === undefined) return []
|
|
368
377
|
return daemonReportLines({
|
|
369
|
-
engine,
|
|
378
|
+
engine,
|
|
379
|
+
pluginRoot: join(packageRoot, "plugin"),
|
|
380
|
+
agentDir: canonicalAgentDir(),
|
|
381
|
+
env: process.env,
|
|
382
|
+
platform: process.platform,
|
|
370
383
|
})
|
|
371
384
|
}
|
|
372
385
|
|
|
@@ -417,7 +430,9 @@ export function runDoctor(inventory, args = [], options = {}) {
|
|
|
417
430
|
|
|
418
431
|
const version = packageManifest().version
|
|
419
432
|
const latest = latestFromDistTags(readDistTags(options), version)
|
|
420
|
-
lines.push(
|
|
433
|
+
lines.push(
|
|
434
|
+
`INFO omo · Edition: Native · Installed: ${version} (engine: senpi ${engineVersionOrUnresolved(senpi)}) · Latest: ${latest}`,
|
|
435
|
+
)
|
|
421
436
|
lines.push(`INFO Update: ${updateTarget().command}`)
|
|
422
437
|
lines.push(...migrationReport(options, updateTarget().command))
|
|
423
438
|
lines.push(...warningsForSettings())
|
package/bin/lib/engine-boot.js
CHANGED
|
@@ -22,6 +22,8 @@ try {
|
|
|
22
22
|
}
|
|
23
23
|
} catch (error) {
|
|
24
24
|
// The memory component's registration still selects once when the first session opens.
|
|
25
|
-
process.stderr.write(
|
|
25
|
+
process.stderr.write(
|
|
26
|
+
`omo: memory sync could not start at boot: ${error instanceof Error ? error.message : String(error)}\n`,
|
|
27
|
+
)
|
|
26
28
|
}
|
|
27
29
|
await import(moduleUrl(cliPath))
|
|
@@ -1,7 +1,17 @@
|
|
|
1
1
|
// The engine dispatches these one-shot commands on argv[0] before any session starts, so they must
|
|
2
2
|
// reach it with the command first; a leading `--extension` turns them into a chat launch (#9572).
|
|
3
3
|
// The list is checked against the installed engine's own dispatch by test/engine-commands.test.ts.
|
|
4
|
-
const ENGINE_COMMANDS = new Set([
|
|
4
|
+
const ENGINE_COMMANDS = new Set([
|
|
5
|
+
"install",
|
|
6
|
+
"remove",
|
|
7
|
+
"uninstall",
|
|
8
|
+
"update",
|
|
9
|
+
"list",
|
|
10
|
+
"config",
|
|
11
|
+
"auth",
|
|
12
|
+
"host",
|
|
13
|
+
"schedule",
|
|
14
|
+
])
|
|
5
15
|
|
|
6
16
|
export function isEngineCommand(args) {
|
|
7
17
|
const command = args[0]
|
|
@@ -3,7 +3,14 @@ import { delimiter, isAbsolute, join, relative, sep } from "node:path"
|
|
|
3
3
|
import { canonicalAgentDir } from "./agent-dir.js"
|
|
4
4
|
import { OMO_BRAND_LOGO } from "./brand-logo.generated.js"
|
|
5
5
|
import { HERDR_AGENT_MARKER } from "./herdr-agent-hint.js"
|
|
6
|
-
import {
|
|
6
|
+
import {
|
|
7
|
+
nearestNodeBin,
|
|
8
|
+
packageManifest,
|
|
9
|
+
packageRoot,
|
|
10
|
+
readJson,
|
|
11
|
+
releaseChannel,
|
|
12
|
+
updateTarget,
|
|
13
|
+
} from "./package-paths.js"
|
|
7
14
|
|
|
8
15
|
// Identity the engine adopts for this install: what the user sees, where state lives, which
|
|
9
16
|
// environment prefix is read first, what goes on the wire, and which channel to check for
|
package/bin/lib/engine-models.js
CHANGED
|
@@ -19,7 +19,8 @@ import { resolveSenpi } from "./package-paths.js"
|
|
|
19
19
|
async function builtinCatalog() {
|
|
20
20
|
const { packageRoot } = resolveSenpi()
|
|
21
21
|
const piAiRoot = engineDependencyDir(packageRoot, "@earendil-works/pi-ai")
|
|
22
|
-
if (piAiRoot === undefined)
|
|
22
|
+
if (piAiRoot === undefined)
|
|
23
|
+
throw new Error(`the engine model catalog is missing: @earendil-works/pi-ai is not resolvable from ${packageRoot}`)
|
|
23
24
|
const path = join(piAiRoot, "dist", "providers", "all.js")
|
|
24
25
|
if (!existsSync(path)) throw new Error(`the engine model catalog is missing at ${path}`)
|
|
25
26
|
return (await import(pathToFileURL(path).href)).builtinProviders()
|