omo-ai 5.1.69 → 5.1.70
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 +63 -23
- 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/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 +41 -20
- 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 +81 -0
- package/plugin/extensions/gateway-store-worker.mjs +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +3 -3
- 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 +2 -2
- 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 +2 -2
- 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
|
@@ -4,7 +4,15 @@ import { homedir } from "node:os"
|
|
|
4
4
|
import { join, resolve } from "node:path"
|
|
5
5
|
import { canonicalAgentDir } from "./agent-dir.js"
|
|
6
6
|
import { fetchNpmDistTagsSync } from "./npm-dist-tags.js"
|
|
7
|
-
import {
|
|
7
|
+
import {
|
|
8
|
+
channelDistTagVersion,
|
|
9
|
+
packageManifest,
|
|
10
|
+
packageRoot,
|
|
11
|
+
readJson,
|
|
12
|
+
releaseChannel,
|
|
13
|
+
resolveSenpi,
|
|
14
|
+
updateTarget,
|
|
15
|
+
} from "./package-paths.js"
|
|
8
16
|
import { daemonReportLines } from "./daemon.js"
|
|
9
17
|
import { migrationReport } from "./doctor-migration.js"
|
|
10
18
|
import { launchSpecDoctorLines } from "./launch-spec-mode.js"
|
|
@@ -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
|
|
|
@@ -116,7 +126,22 @@ export function listProcesses() {
|
|
|
116
126
|
// or engine flags count; those other roles are never engines.
|
|
117
127
|
const BINARY_RUNTIME_EXECUTABLE = String.raw`[\\/]binary-runtime[\\/][^\\/\s]+[\\/]omo(?:\.exe)?`
|
|
118
128
|
const BINARY_ENGINE = new RegExp(String.raw`${BINARY_RUNTIME_EXECUTABLE}(?=\s|$)\s*(\S*)`)
|
|
119
|
-
const BINARY_NON_ENGINE_COMMANDS = new Set([
|
|
129
|
+
const BINARY_NON_ENGINE_COMMANDS = new Set([
|
|
130
|
+
"doctor",
|
|
131
|
+
"setup",
|
|
132
|
+
"daemon",
|
|
133
|
+
"update",
|
|
134
|
+
"upgrade",
|
|
135
|
+
"host",
|
|
136
|
+
"install",
|
|
137
|
+
"remove",
|
|
138
|
+
"list",
|
|
139
|
+
"config",
|
|
140
|
+
"auth",
|
|
141
|
+
"ulw-loop",
|
|
142
|
+
"--version",
|
|
143
|
+
"-v",
|
|
144
|
+
])
|
|
120
145
|
|
|
121
146
|
function isBinaryEngine(command) {
|
|
122
147
|
const match = BINARY_ENGINE.exec(command)
|
|
@@ -169,7 +194,7 @@ export function formatStaleEngineLines(stale) {
|
|
|
169
194
|
const lines = stale.map((entry) =>
|
|
170
195
|
entry.retiredAppServer
|
|
171
196
|
? `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
|
|
197
|
+
: `WARN stale engine pid ${entry.pid} (age ${entry.elapsed}, tty ${entry.tty}) has no launcher; it was orphaned by a signaled launcher`,
|
|
173
198
|
)
|
|
174
199
|
lines.push(`INFO reap them explicitly by pid: omo doctor --reap ${stale.map((entry) => entry.pid).join(" ")}`)
|
|
175
200
|
return lines
|
|
@@ -213,10 +238,13 @@ export function classifyRetiredPayloadEngines(entries, input) {
|
|
|
213
238
|
|
|
214
239
|
export function formatRetiredPayloadLines(retired) {
|
|
215
240
|
if (retired.length === 0) return []
|
|
216
|
-
const lines = retired.map(
|
|
217
|
-
|
|
241
|
+
const lines = retired.map(
|
|
242
|
+
(entry) =>
|
|
243
|
+
`WARN engine pid ${entry.pid} (age ${entry.elapsed}, tty ${entry.tty}) started before this payload was installed; it still runs the previous plugin copy`,
|
|
244
|
+
)
|
|
245
|
+
lines.push(
|
|
246
|
+
"INFO restart those sessions to pick up the installed payload; a running engine is never rewritten in place",
|
|
218
247
|
)
|
|
219
|
-
lines.push("INFO restart those sessions to pick up the installed payload; a running engine is never rewritten in place")
|
|
220
248
|
return lines
|
|
221
249
|
}
|
|
222
250
|
|
|
@@ -261,7 +289,9 @@ export function reapStaleEngines(args, options = {}) {
|
|
|
261
289
|
continue
|
|
262
290
|
}
|
|
263
291
|
if (!isInteractive(entry)) {
|
|
264
|
-
lines.push(
|
|
292
|
+
lines.push(
|
|
293
|
+
`FAIL refusing pid ${pid}: it is a managed engine (${MANAGED_MODE_FLAG}), owned by whatever started it`,
|
|
294
|
+
)
|
|
265
295
|
failed = true
|
|
266
296
|
continue
|
|
267
297
|
}
|
|
@@ -339,24 +369,28 @@ export function formatTransientMemoryLines(counts) {
|
|
|
339
369
|
|
|
340
370
|
export function transientMemoryReport(options) {
|
|
341
371
|
const root = memoryRoot(options.env ?? process.env)
|
|
342
|
-
return formatTransientMemoryLines(
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
372
|
+
return formatTransientMemoryLines(
|
|
373
|
+
countTransientMemoryIdentities({
|
|
374
|
+
agentsRoot: join(root, MEMORY_AGENTS_DIRNAME),
|
|
375
|
+
transientRoot: join(root, MEMORY_TRANSIENT_DIRNAME),
|
|
376
|
+
listDirs: options.listDirs ?? listSubdirectories,
|
|
377
|
+
hasRepo: options.hasRepo ?? ((identityRoot) => existsSync(join(identityRoot, MEMORY_REPO_DIRNAME))),
|
|
378
|
+
}),
|
|
379
|
+
)
|
|
348
380
|
}
|
|
349
381
|
|
|
350
382
|
function retiredPayloadReport(options) {
|
|
351
383
|
const list = options.list ?? listProcesses
|
|
352
384
|
const now = options.now ?? Date.now
|
|
353
|
-
const payloadMtimeMs =
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
385
|
+
const payloadMtimeMs =
|
|
386
|
+
options.payloadMtimeMs ??
|
|
387
|
+
((payloadDir) => {
|
|
388
|
+
try {
|
|
389
|
+
return statSync(join(payloadDir, "extensions", "omo.js")).mtimeMs
|
|
390
|
+
} catch {
|
|
391
|
+
return undefined
|
|
392
|
+
}
|
|
393
|
+
})
|
|
360
394
|
return formatRetiredPayloadLines(classifyRetiredPayloadEngines(list(), { payloadMtimeMs, nowMs: now() }))
|
|
361
395
|
}
|
|
362
396
|
|
|
@@ -366,7 +400,11 @@ function daemonReport(options) {
|
|
|
366
400
|
const engine = options.daemonEngine
|
|
367
401
|
if (engine === undefined) return []
|
|
368
402
|
return daemonReportLines({
|
|
369
|
-
engine,
|
|
403
|
+
engine,
|
|
404
|
+
pluginRoot: join(packageRoot, "plugin"),
|
|
405
|
+
agentDir: canonicalAgentDir(),
|
|
406
|
+
env: process.env,
|
|
407
|
+
platform: process.platform,
|
|
370
408
|
})
|
|
371
409
|
}
|
|
372
410
|
|
|
@@ -417,7 +455,9 @@ export function runDoctor(inventory, args = [], options = {}) {
|
|
|
417
455
|
|
|
418
456
|
const version = packageManifest().version
|
|
419
457
|
const latest = latestFromDistTags(readDistTags(options), version)
|
|
420
|
-
lines.push(
|
|
458
|
+
lines.push(
|
|
459
|
+
`INFO omo · Edition: Native · Installed: ${version} (engine: senpi ${engineVersionOrUnresolved(senpi)}) · Latest: ${latest}`,
|
|
460
|
+
)
|
|
421
461
|
lines.push(`INFO Update: ${updateTarget().command}`)
|
|
422
462
|
lines.push(...migrationReport(options, updateTarget().command))
|
|
423
463
|
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()
|
|
@@ -32,16 +32,31 @@ function isPreparedFor(senpiRoot, omoVersion) {
|
|
|
32
32
|
* of omo-ai under a loose umask rewrites the plugin while the engine tree keeps its stamp (#9208).
|
|
33
33
|
* Fail-open like the engine preparation: a failure warns with the manual fix and never blocks.
|
|
34
34
|
*/
|
|
35
|
-
export function preparePluginLaunchSpec({
|
|
35
|
+
export function preparePluginLaunchSpec({
|
|
36
|
+
pluginRoot,
|
|
37
|
+
report = (line) => {
|
|
38
|
+
process.stderr.write(line)
|
|
39
|
+
},
|
|
40
|
+
io = {},
|
|
41
|
+
}) {
|
|
36
42
|
try {
|
|
37
43
|
normalizeLaunchSpecMode(pluginRoot, io)
|
|
38
44
|
} catch (error) {
|
|
39
45
|
const path = join(pluginRoot, LAUNCH_SPEC_FILENAME)
|
|
40
|
-
report(
|
|
46
|
+
report(
|
|
47
|
+
`omo: could not make ${path} private (${error.message}); task children and teams need it, run: chmod 644 ${path}\n`,
|
|
48
|
+
)
|
|
41
49
|
}
|
|
42
50
|
}
|
|
43
51
|
|
|
44
|
-
export function ensureEnginePrepared({
|
|
52
|
+
export function ensureEnginePrepared({
|
|
53
|
+
senpiRoot,
|
|
54
|
+
omoVersion,
|
|
55
|
+
reinstallCommand,
|
|
56
|
+
report = (line) => {
|
|
57
|
+
process.stderr.write(line)
|
|
58
|
+
},
|
|
59
|
+
}) {
|
|
45
60
|
if (isPreparedFor(senpiRoot, omoVersion)) return
|
|
46
61
|
try {
|
|
47
62
|
prepareInstalledEngine(senpiRoot)
|
package/bin/lib/host-status.js
CHANGED
|
@@ -40,7 +40,11 @@ function withLastActivity(payload, readActivity) {
|
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
function inventory(stdout) {
|
|
43
|
-
const line = stdout
|
|
43
|
+
const line = stdout
|
|
44
|
+
.trim()
|
|
45
|
+
.split("\n")
|
|
46
|
+
.filter((candidate) => candidate.trim() !== "")
|
|
47
|
+
.pop()
|
|
44
48
|
if (line === undefined) return undefined
|
|
45
49
|
try {
|
|
46
50
|
const parsed = JSON.parse(line)
|