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
|
@@ -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)
|
package/bin/lib/jsonc-edit.js
CHANGED
|
@@ -72,7 +72,8 @@ function lineIndent(text, index) {
|
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
function indentOf(text, node) {
|
|
75
|
-
const closing =
|
|
75
|
+
const closing =
|
|
76
|
+
lineIndent(text, node.close) ?? /^[ \t]*/.exec(text.slice(text.lastIndexOf("\n", node.open - 1) + 1))[0]
|
|
76
77
|
const first = node.members[0]
|
|
77
78
|
return { closing, member: (first && lineIndent(text, first.keyStart)) ?? `${closing} ` }
|
|
78
79
|
}
|
|
@@ -87,7 +88,8 @@ function insertInto(text, node, key, value) {
|
|
|
87
88
|
if (node.members.length === 0) {
|
|
88
89
|
const inner = text.slice(node.open + 1, node.close)
|
|
89
90
|
// An empty `{}` (or one holding only whitespace) is rewritten whole; one holding a comment keeps it.
|
|
90
|
-
if (inner.trim() === "")
|
|
91
|
+
if (inner.trim() === "")
|
|
92
|
+
return `${text.slice(0, node.open + 1)}\n${member}\n${indent.closing}${text.slice(node.close)}`
|
|
91
93
|
return `${text.slice(0, node.open + 1)}\n${member}${text.slice(node.open + 1)}`
|
|
92
94
|
}
|
|
93
95
|
let at = node.close
|
|
@@ -131,10 +133,12 @@ export function insertJsoncMember(text, path, key, value) {
|
|
|
131
133
|
if (member.object === undefined) throw new TypeError(`${path.slice(0, depth + 1).join(".")} is not an object`)
|
|
132
134
|
node = member.object
|
|
133
135
|
}
|
|
134
|
-
if (depth === path.length && node.members.some((member) => member.key === key))
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
136
|
+
if (depth === path.length && node.members.some((member) => member.key === key))
|
|
137
|
+
throw new TypeError(`${[...path, key].join(".")} already exists`)
|
|
138
|
+
const next =
|
|
139
|
+
depth === path.length
|
|
140
|
+
? insertInto(text, node, key, value)
|
|
141
|
+
: insertInto(text, node, path[depth], nest(path.slice(depth + 1), key, value))
|
|
138
142
|
if (!isDeepStrictEqual(parseJsonc(next), setIn(parseJsonc(text), path, key, value))) {
|
|
139
143
|
throw new SyntaxError("the edited document does not parse back to the intended value")
|
|
140
144
|
}
|
|
@@ -9,17 +9,27 @@ export const KEYCHAIN_HELPER_REQUIREMENT =
|
|
|
9
9
|
'and certificate leaf[field.1.2.840.113635.100.6.1.13] and certificate leaf[subject.OU] = "523JNR86LZ"'
|
|
10
10
|
|
|
11
11
|
const verifyWithCodesign = (path) =>
|
|
12
|
-
spawnSync("/usr/bin/codesign", ["--verify", "--strict", `-R=${KEYCHAIN_HELPER_REQUIREMENT}`, path], {
|
|
12
|
+
spawnSync("/usr/bin/codesign", ["--verify", "--strict", `-R=${KEYCHAIN_HELPER_REQUIREMENT}`, path], {
|
|
13
|
+
stdio: "ignore",
|
|
14
|
+
}).status === 0
|
|
13
15
|
|
|
14
16
|
/**
|
|
15
17
|
* The one place a missing or damaged keychain helper is reported (#11262 addendum Q1/row 9): normal output stays silent
|
|
16
18
|
* and sign-in takes the previous path, so this is a warning, never a failure. macOS only.
|
|
17
19
|
*/
|
|
18
|
-
export function keychainHelperDoctorLines({
|
|
20
|
+
export function keychainHelperDoctorLines({
|
|
21
|
+
packageRoot,
|
|
22
|
+
helperRelPath = "bin/darwin/omo-keychain",
|
|
23
|
+
platform = process.platform,
|
|
24
|
+
exists = existsSync,
|
|
25
|
+
verify = verifyWithCodesign,
|
|
26
|
+
}) {
|
|
19
27
|
if (platform !== "darwin") return []
|
|
20
28
|
const helper = join(packageRoot, helperRelPath)
|
|
21
29
|
if (!exists(helper))
|
|
22
|
-
return [
|
|
30
|
+
return [
|
|
31
|
+
`WARN keychain helper: missing ${helperRelPath}; macOS sign-in uses the previous keychain path and may ask for access again. Reinstall omo.`,
|
|
32
|
+
]
|
|
23
33
|
if (!verify(helper))
|
|
24
34
|
return [`WARN keychain helper: ${helperRelPath} failed its signature check and is never run; reinstall omo.`]
|
|
25
35
|
return [`PASS keychain helper: ${helperRelPath} (signed)`]
|
|
@@ -68,11 +68,15 @@ export function launchSpecDoctorLines(pluginRoot, io = {}) {
|
|
|
68
68
|
const uid = io.getuid === undefined ? currentUid() : io.getuid()
|
|
69
69
|
const impact = "the task host refuses it, so process-mode task children and every team_create fail"
|
|
70
70
|
if (uid !== undefined && stat.uid !== uid) {
|
|
71
|
-
return [
|
|
71
|
+
return [
|
|
72
|
+
`FAIL launch spec: launch_spec_insecure: ${path} is not owned by you (uid ${stat.uid}); ${impact}. Fix: reinstall omo as this user, or run: sudo chown ${ownerName()} ${path}`,
|
|
73
|
+
]
|
|
72
74
|
}
|
|
73
75
|
if ((stat.mode & WRITABLE_BY_OTHERS) !== 0) {
|
|
74
76
|
const mode = (stat.mode & 0o777).toString(8)
|
|
75
|
-
return [
|
|
77
|
+
return [
|
|
78
|
+
`FAIL launch spec: launch_spec_insecure: ${path} is group/world-writable (${mode}); ${impact}. Fix: chmod 644 ${path}`,
|
|
79
|
+
]
|
|
76
80
|
}
|
|
77
81
|
return []
|
|
78
82
|
}
|
package/bin/lib/launcher.js
CHANGED
|
@@ -15,7 +15,11 @@ import { runThreadCommand } from "./thread.js"
|
|
|
15
15
|
import { isHostStatusAll, runHostStatusAll, sessionActivityReader } from "./host-status.js"
|
|
16
16
|
import { runDoctor } from "./doctor.js"
|
|
17
17
|
import { reflectionLockFix, reflectionLockReport } from "./doctor-reflection-lock.js"
|
|
18
|
-
import {
|
|
18
|
+
import {
|
|
19
|
+
memoryRuntimeDiscardResolver,
|
|
20
|
+
memoryRuntimeMaxBytesResolver,
|
|
21
|
+
memoryRuntimeReport,
|
|
22
|
+
} from "./doctor-memory-runtime.js"
|
|
19
23
|
import { ensureEnginePrepared, preparePluginLaunchSpec } from "./engine-prepare.js"
|
|
20
24
|
import { migrateLegacyBunGlobalManifest } from "./legacy-bun-global-migration.js"
|
|
21
25
|
import { removeLegacyServiceCredentials } from "./legacy-service-credentials.js"
|
|
@@ -61,16 +65,16 @@ async function bootsWithMemorySyncClaim(args, env) {
|
|
|
61
65
|
return launchClaimsMemorySyncAtBoot(args, env, claimsMemorySyncAtBoot, { execArgv: [], versions: process.versions })
|
|
62
66
|
} catch (error) {
|
|
63
67
|
// Without the sidecar the memory component's registration still selects once when the first session opens.
|
|
64
|
-
process.stderr.write(
|
|
68
|
+
process.stderr.write(
|
|
69
|
+
`omo: memory sync could not start at boot: ${error instanceof Error ? error.message : String(error)}\n`,
|
|
70
|
+
)
|
|
65
71
|
return false
|
|
66
72
|
}
|
|
67
73
|
}
|
|
68
74
|
|
|
69
75
|
async function spawnSenpi(args, withExtension) {
|
|
70
76
|
const senpi = preparedSenpi()
|
|
71
|
-
const finalArgs = withExtension
|
|
72
|
-
? ["--extension", join(packageRoot, "plugin"), ...args]
|
|
73
|
-
: args
|
|
77
|
+
const finalArgs = withExtension ? ["--extension", join(packageRoot, "plugin"), ...args] : args
|
|
74
78
|
const env = senpiEnvironment(senpi.packageRoot)
|
|
75
79
|
if (withExtension) withHerdrAgentHint(env, args)
|
|
76
80
|
const handoff = privateFdHandoff(env)
|
|
@@ -82,7 +86,7 @@ async function spawnSenpi(args, withExtension) {
|
|
|
82
86
|
// A failed replacement still uses the signal-aware child path below.
|
|
83
87
|
}
|
|
84
88
|
}
|
|
85
|
-
if (handoff !== undefined && await bootsWithMemorySyncClaim(finalArgs, handoff.env)) {
|
|
89
|
+
if (handoff !== undefined && (await bootsWithMemorySyncClaim(finalArgs, handoff.env))) {
|
|
86
90
|
await spawnNode(ENGINE_BOOT_ENTRY, [senpi.cliPath, ...finalArgs], handoff)
|
|
87
91
|
return
|
|
88
92
|
}
|
|
@@ -172,7 +176,9 @@ export async function runLauncher(args = process.argv.slice(2)) {
|
|
|
172
176
|
// The toolkit CLI is no longer part of the Native payload; the loop is driven in-process by the
|
|
173
177
|
// eval SDK the extension publishes. Report that plainly instead of failing on a missing file.
|
|
174
178
|
if (command === "ulw-loop") {
|
|
175
|
-
console.error(
|
|
179
|
+
console.error(
|
|
180
|
+
'omo ulw-loop is unavailable in this build: use the agent toolkit SDK from an eval js cell: const { agentToolkit } = await import(`${env("OMO_AGENT_TOOLKIT_SDK_ROOT")}/sdk.js`); print(await agentToolkit.status()) (Codex keeps the standalone CLI).',
|
|
181
|
+
)
|
|
176
182
|
process.exitCode = 2
|
|
177
183
|
return
|
|
178
184
|
}
|
|
@@ -231,18 +237,24 @@ export async function runLauncher(args = process.argv.slice(2)) {
|
|
|
231
237
|
process.exitCode = result.failed ? 1 : 0
|
|
232
238
|
return
|
|
233
239
|
}
|
|
234
|
-
const [categoryCoverage, computerUse, configDiagnostics, reflectionLock, memoryRuntime] =
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
240
|
+
const [categoryCoverage, computerUse, configDiagnostics, reflectionLock, memoryRuntime] =
|
|
241
|
+
args[1] === "--reap"
|
|
242
|
+
? [[], [], [], [], []]
|
|
243
|
+
: await Promise.all([
|
|
244
|
+
doctorCoverageLines({ agentDir: canonicalAgentDir() }),
|
|
245
|
+
doctorComputerUseLines(),
|
|
246
|
+
doctorConfigLines(),
|
|
247
|
+
reflectionLockReport(),
|
|
248
|
+
memoryRuntimeReport({
|
|
249
|
+
maxBytesFor: memoryRuntimeMaxBytesResolver({ pluginRoot: join(packageRoot, "plugin") }),
|
|
250
|
+
discardFor: memoryRuntimeDiscardResolver({ pluginRoot: join(packageRoot, "plugin") }),
|
|
251
|
+
}).then(
|
|
252
|
+
(report) => report.lines,
|
|
253
|
+
(error) => [
|
|
254
|
+
`WARN memory runtime: unavailable: ${error instanceof Error ? error.message : String(error)}`,
|
|
255
|
+
],
|
|
256
|
+
),
|
|
257
|
+
])
|
|
246
258
|
runDoctor(await detectHarnesses(), args.slice(1), {
|
|
247
259
|
daemonEngine: { run: engineHostCall },
|
|
248
260
|
categoryCoverage,
|
package/bin/lib/model-chains.js
CHANGED
|
@@ -36,16 +36,20 @@ function rungLines(rungs) {
|
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
function entryLines(entry) {
|
|
39
|
-
const head =
|
|
40
|
-
|
|
41
|
-
|
|
39
|
+
const head =
|
|
40
|
+
entry.status === "resolved"
|
|
41
|
+
? ` ${entry.name}: ${entry.runtime.join(" -> ")}`
|
|
42
|
+
: ` ${entry.name}: ${entry.status}${entry.reason === undefined ? "" : ` (${entry.reason})`}`
|
|
42
43
|
return [head, ...rungLines(entry.rungs)]
|
|
43
44
|
}
|
|
44
45
|
|
|
45
46
|
/** The human report. @param {any} view the runtime's `modelChains` result */
|
|
46
47
|
export function formatModelChainLines(view) {
|
|
47
48
|
const profile = view.modelProfile
|
|
48
|
-
const lane =
|
|
49
|
+
const lane =
|
|
50
|
+
profile.selection === "set"
|
|
51
|
+
? `model_profile ${profile.profile}`
|
|
52
|
+
: `model_profile unset, default lane ${profile.profile}`
|
|
49
53
|
return [
|
|
50
54
|
"Models a spawn resolves right now (logins read offline; credentials are not probed).",
|
|
51
55
|
`exclude_models: ${view.excludeModels.length === 0 ? "none" : view.excludeModels.join(", ")}`,
|
|
@@ -85,7 +89,10 @@ export async function doctorModelChains(options) {
|
|
|
85
89
|
const cwd = options.cwd ?? process.cwd()
|
|
86
90
|
const models = await engineAvailableModels({ agentDir: options.agentDir, cwd, loadEngine: options.loadEngine })
|
|
87
91
|
const view = runtime.modelChains({ models, cwd, env: options.env ?? process.env })
|
|
88
|
-
return {
|
|
92
|
+
return {
|
|
93
|
+
output: options.json ? JSON.stringify(view, null, 2) : formatModelChainLines(view).join("\n"),
|
|
94
|
+
failed: false,
|
|
95
|
+
}
|
|
89
96
|
} catch (error) {
|
|
90
97
|
return { output: `FAIL models: ${error instanceof Error ? error.message : String(error)}`, failed: true }
|
|
91
98
|
}
|
package/bin/lib/npm-dist-tags.js
CHANGED
|
@@ -33,7 +33,8 @@ export function fetchNpmDistTagsSync(options = {}) {
|
|
|
33
33
|
windowsHide: true,
|
|
34
34
|
env: process.env,
|
|
35
35
|
})
|
|
36
|
-
if (result.error || result.status !== 0 || typeof result.stdout !== "string" || result.stdout.trim() === "")
|
|
36
|
+
if (result.error || result.status !== 0 || typeof result.stdout !== "string" || result.stdout.trim() === "")
|
|
37
|
+
return null
|
|
37
38
|
const parsed = JSON.parse(result.stdout)
|
|
38
39
|
return parsed !== null && typeof parsed === "object" && !Array.isArray(parsed) ? parsed : null
|
|
39
40
|
} catch {
|
package/bin/lib/package-paths.js
CHANGED
|
@@ -72,8 +72,9 @@ export function updateTarget(
|
|
|
72
72
|
const bunInstall = normalizedRoot.endsWith(BUN_GLOBAL_PACKAGE_SUFFIX)
|
|
73
73
|
? normalizedRoot.slice(0, -BUN_GLOBAL_PACKAGE_SUFFIX.length)
|
|
74
74
|
: undefined
|
|
75
|
-
const isLegacyBunGlobal =
|
|
76
|
-
|
|
75
|
+
const isLegacyBunGlobal =
|
|
76
|
+
normalizedRoot === `${normalizedHome}/node_modules/omo-ai` &&
|
|
77
|
+
(exists(join(homeDir, "bun.lock")) || exists(join(homeDir, "bun.lockb")))
|
|
77
78
|
if (bunInstall !== undefined || isLegacyBunGlobal) {
|
|
78
79
|
// `--cwd` into this package dir does not retarget `bun add -g`; bun still installs into
|
|
79
80
|
// `$BUN_INSTALL/install/global` (or `~/.bun` when that env is unset). The prefix is the
|
|
@@ -102,7 +103,9 @@ export function resolveSenpi(options = {}) {
|
|
|
102
103
|
try {
|
|
103
104
|
indexPath = resolveIndex()
|
|
104
105
|
} catch (error) {
|
|
105
|
-
throw new Error(
|
|
106
|
+
throw new Error(
|
|
107
|
+
`could not resolve @code-yeongyu/senpi; reinstall with: ${updateTarget().command} (${error.message})`,
|
|
108
|
+
)
|
|
106
109
|
}
|
|
107
110
|
|
|
108
111
|
const distDir = dirname(indexPath)
|
|
@@ -122,9 +125,10 @@ export function resolveSenpi(options = {}) {
|
|
|
122
125
|
// checking it here turns the engine's raw ERR_MODULE_NOT_FOUND stack into one actionable line.
|
|
123
126
|
const brandPath = join(distDir, "core", "brand.js")
|
|
124
127
|
if (!existsSync(brandPath)) {
|
|
125
|
-
const windowsHint =
|
|
126
|
-
|
|
127
|
-
|
|
128
|
+
const windowsHint =
|
|
129
|
+
platform === "win32"
|
|
130
|
+
? " (close every running omo/senpi process first: Windows locks loaded native modules, so npm fails with EBUSY mid-upgrade and leaves exactly this partial state)"
|
|
131
|
+
: ""
|
|
128
132
|
throw new Error(
|
|
129
133
|
`senpi engine files are incomplete: ${brandPath} is missing, which usually means an interrupted or failed omo-ai upgrade; reinstall with: ${updateTarget().command}${windowsHint}`,
|
|
130
134
|
)
|
|
@@ -137,10 +141,14 @@ export function nearestNodeBin(startPath) {
|
|
|
137
141
|
// whose .bin is a sibling, not a child - starting the climb inside node_modules would walk to the
|
|
138
142
|
// filesystem root and never find it. For unscoped packages begin at the package's parent; for
|
|
139
143
|
// scoped packages (…/node_modules/@scope/package), begin at the parent of node_modules instead.
|
|
140
|
-
let current =
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
+
let current =
|
|
145
|
+
basename(startPath) === "node_modules"
|
|
146
|
+
? dirname(startPath)
|
|
147
|
+
: basename(dirname(startPath)) === "node_modules"
|
|
148
|
+
? dirname(dirname(startPath))
|
|
149
|
+
: basename(dirname(dirname(startPath))) === "node_modules"
|
|
150
|
+
? dirname(dirname(dirname(startPath)))
|
|
151
|
+
: startPath
|
|
144
152
|
const root = parse(current).root
|
|
145
153
|
while (true) {
|
|
146
154
|
const candidate = join(current, "node_modules", ".bin")
|
|
@@ -65,8 +65,14 @@ export function inspectPrivateFdTable(table, platform = process.platform) {
|
|
|
65
65
|
for (const [name, fd] of Object.entries(value)) {
|
|
66
66
|
forwarded[name] = null
|
|
67
67
|
if (platform === "win32") {
|
|
68
|
-
const usable =
|
|
69
|
-
|
|
68
|
+
const usable =
|
|
69
|
+
Array.isArray(fd) &&
|
|
70
|
+
fd.length === 2 &&
|
|
71
|
+
fd.every(inRange) &&
|
|
72
|
+
fd[0] !== fd[1] &&
|
|
73
|
+
ipc !== undefined &&
|
|
74
|
+
!fd.some((descriptor) => descriptor === ipc || counts.get(descriptor) > 1) &&
|
|
75
|
+
fd.every(isPipe)
|
|
70
76
|
if (usable) {
|
|
71
77
|
forwarded[name] = fd
|
|
72
78
|
fds.push(...fd)
|
|
@@ -97,18 +103,21 @@ export function privateFdHandoffFor(env, table, platform = process.platform, { s
|
|
|
97
103
|
while (stdio.length <= fd) stdio.push("ignore")
|
|
98
104
|
stdio[fd] = fd
|
|
99
105
|
}
|
|
100
|
-
const forwarded =
|
|
101
|
-
|
|
102
|
-
|
|
106
|
+
const forwarded =
|
|
107
|
+
shell && inspected.fds.length > 0
|
|
108
|
+
? JSON.stringify(Object.fromEntries(Object.keys(JSON.parse(inspected.table)).map((name) => [name, null])))
|
|
109
|
+
: inspected.table
|
|
103
110
|
return {
|
|
104
111
|
env: { ...env, [PRIVATE_FDS_ENV]: forwarded },
|
|
105
112
|
stdio,
|
|
106
113
|
// Unlike POSIX's protected sockets, Windows pipes must not remain in the waiting parent.
|
|
107
114
|
// runChild invokes this immediately after spawn, including a synchronous spawn failure.
|
|
108
|
-
...(platform === "win32" && inspected.fds.length > 0
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
115
|
+
...(platform === "win32" && inspected.fds.length > 0
|
|
116
|
+
? {
|
|
117
|
+
onSpawn() {
|
|
118
|
+
for (const fd of inspected.fds) closeSync(fd)
|
|
119
|
+
},
|
|
120
|
+
}
|
|
121
|
+
: {}),
|
|
113
122
|
}
|
|
114
123
|
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { spawnSync } from "node:child_process"
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Reads the live process table. `ps` is the portable answer on macOS and Linux alike, and reading
|
|
5
|
+
* it can never be a reason for diagnostics to fail, so an unavailable or unparsable listing is an
|
|
6
|
+
* empty list.
|
|
7
|
+
*/
|
|
8
|
+
export function listProcesses() {
|
|
9
|
+
if (process.platform === "win32") return []
|
|
10
|
+
// -ww: an unlimited width, so `args` is never cut at the terminal width (BSD/macOS `ps` truncates).
|
|
11
|
+
const listed = spawnSync("ps", ["-ww", "-axo", "pid=,ppid=,etime=,tty=,args="], { encoding: "utf8" })
|
|
12
|
+
if (listed.status !== 0 || typeof listed.stdout !== "string") return []
|
|
13
|
+
const entries = []
|
|
14
|
+
for (const line of listed.stdout.split("\n")) {
|
|
15
|
+
const match = /^\s*(\d+)\s+(\d+)\s+(\S+)\s+(\S+)\s+(.*)$/.exec(line)
|
|
16
|
+
if (!match) continue
|
|
17
|
+
entries.push({
|
|
18
|
+
pid: Number(match[1]),
|
|
19
|
+
ppid: Number(match[2]),
|
|
20
|
+
elapsed: match[3],
|
|
21
|
+
tty: match[4],
|
|
22
|
+
command: match[5],
|
|
23
|
+
})
|
|
24
|
+
}
|
|
25
|
+
return entries
|
|
26
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"_comment": "Derived from @code-yeongyu/senpi 2026.11.
|
|
2
|
+
"_comment": "Derived from @code-yeongyu/senpi 2026.11.15 builtinProviders(). builtinProviderIds and oauthProviderIds are the engine registry verbatim; providers maps a source harness id onto the omo provider that serves the same endpoint; oauthLogins maps a source OAuth id onto the omo provider to run /login for. Re-derive all four whenever the senpi pin changes.",
|
|
3
3
|
"builtinProviderIds": [
|
|
4
4
|
"alibaba-token-plan",
|
|
5
5
|
"amazon-bedrock",
|
|
@@ -16,7 +16,10 @@ export const guardedSerialization = `try {
|
|
|
16
16
|
|
|
17
17
|
// Each binding lists every declaration shape upstream has shipped for it; one match is enough.
|
|
18
18
|
const requiredBindings = [
|
|
19
|
-
[
|
|
19
|
+
[
|
|
20
|
+
"shutdown",
|
|
21
|
+
[/^\s*async function shutdown\(exitCode = 0, signal\)\s*\{/m, /^\s*const shutdown = createRpcShutdown\(/m],
|
|
22
|
+
],
|
|
20
23
|
["toJsonEvent", [/^import\s*\{\s*toJsonEvent\s*\}\s*from ["']\.\.\/json-event\.[jt]s["'];/m]],
|
|
21
24
|
["value", [/^\s*const value = JSON\.parse\(line\);/m]],
|
|
22
25
|
]
|
|
@@ -27,7 +30,8 @@ export function prepareRpcStreamErrors(senpiRoot) {
|
|
|
27
30
|
if (!existsSync(path)) throw new Error("omo-ai: rpc_patch_target_missing: dist/modes/rpc/rpc-mode.js")
|
|
28
31
|
const source = readFileSync(path, "utf8")
|
|
29
32
|
for (const [name, declarations] of requiredBindings) {
|
|
30
|
-
if (!declarations.some((declaration) => declaration.test(source)))
|
|
33
|
+
if (!declarations.some((declaration) => declaration.test(source)))
|
|
34
|
+
throw new Error(`omo-ai: rpc_patch_binding_missing: ${name}`)
|
|
31
35
|
}
|
|
32
36
|
if (source.includes(guardedSerialization)) return
|
|
33
37
|
if (!source.includes(serialization)) throw new Error("omo-ai: unsupported Senpi RPC stream serializer")
|
package/bin/lib/same-version.js
CHANGED
|
@@ -6,7 +6,12 @@ function normalize(version) {
|
|
|
6
6
|
const [core = "", ...pre] = String(version).trim().replace(/^v/, "").split("+")[0].split("-")
|
|
7
7
|
const numeric = (part) => (/^\d+$/.test(part) ? String(Number.parseInt(part, 10)) : part)
|
|
8
8
|
const release = core.split(".").map(numeric).join(".")
|
|
9
|
-
const prerelease = pre
|
|
9
|
+
const prerelease = pre
|
|
10
|
+
.join("-")
|
|
11
|
+
.split(".")
|
|
12
|
+
.filter((part) => part !== "")
|
|
13
|
+
.map(numeric)
|
|
14
|
+
.join(".")
|
|
10
15
|
return prerelease === "" ? release : `${release}-${prerelease}`
|
|
11
16
|
}
|
|
12
17
|
|
package/bin/lib/self-update.js
CHANGED
|
@@ -1,7 +1,16 @@
|
|
|
1
1
|
import { dirname, join } from "node:path"
|
|
2
2
|
import { runChild } from "./child-process.js"
|
|
3
3
|
import { fetchNpmDistTagsSync } from "./npm-dist-tags.js"
|
|
4
|
-
import {
|
|
4
|
+
import {
|
|
5
|
+
channelDistTagVersion,
|
|
6
|
+
channelPackageSpec,
|
|
7
|
+
packageManifest,
|
|
8
|
+
packageRoot,
|
|
9
|
+
readJson,
|
|
10
|
+
releaseChannel,
|
|
11
|
+
resolveSenpi,
|
|
12
|
+
updateTarget,
|
|
13
|
+
} from "./package-paths.js"
|
|
5
14
|
import { isPrintOnlyUpdate, updateUsageAnswer } from "./update-args.js"
|
|
6
15
|
import { findHolders, heldTarget, isLockFailure, listWindowsProcesses, LOCK_RETRY_DELAYS_MS } from "./update-lock.js"
|
|
7
16
|
|
|
@@ -63,8 +72,9 @@ export function formatVersionChange(before, after) {
|
|
|
63
72
|
* @returns {Promise<number>}
|
|
64
73
|
*/
|
|
65
74
|
export async function runSelfUpdate(args, options = {}) {
|
|
66
|
-
const resolveUpdate =
|
|
67
|
-
??
|
|
75
|
+
const resolveUpdate =
|
|
76
|
+
options.resolveUpdate ??
|
|
77
|
+
((targetVersion) => updateTarget(undefined, undefined, undefined, undefined, undefined, targetVersion))
|
|
68
78
|
const fetchDistTags = options.fetchDistTags ?? fetchNpmDistTagsSync
|
|
69
79
|
const log = options.log ?? ((line) => console.log(line))
|
|
70
80
|
const error = options.error ?? ((line) => console.error(line))
|
|
@@ -86,7 +96,9 @@ export async function runSelfUpdate(args, options = {}) {
|
|
|
86
96
|
const update = resolveUpdate(target)
|
|
87
97
|
|
|
88
98
|
if (target === undefined) {
|
|
89
|
-
log(
|
|
99
|
+
log(
|
|
100
|
+
`omo: could not confirm the ${channel} omo-ai version from the npm registry; installing the unpinned ${channelPackageSpec(before.omo)}`,
|
|
101
|
+
)
|
|
90
102
|
}
|
|
91
103
|
if (isPrintOnlyUpdate(args)) {
|
|
92
104
|
log(formatUpdateCommand(update))
|
|
@@ -95,7 +107,9 @@ export async function runSelfUpdate(args, options = {}) {
|
|
|
95
107
|
if (target !== undefined && target === before.omo) {
|
|
96
108
|
// Already on the target, the update installs nothing, so a broken engine tree needs the reinstall named.
|
|
97
109
|
if (before.engine === "unknown") {
|
|
98
|
-
error(
|
|
110
|
+
error(
|
|
111
|
+
`omo ${before.omo} is up to date, but its engine files are missing or incomplete; reinstall with: ${update.command}`,
|
|
112
|
+
)
|
|
99
113
|
return 1
|
|
100
114
|
}
|
|
101
115
|
log(`omo ${before.omo} is up to date (omo-ai@${channel} is ${target})`)
|
|
@@ -125,12 +139,23 @@ export async function runSelfUpdate(args, options = {}) {
|
|
|
125
139
|
}
|
|
126
140
|
if (!failed(result) || !heldOnWindows(result) || attempt >= LOCK_RETRY_DELAYS_MS.length) break
|
|
127
141
|
const delay = LOCK_RETRY_DELAYS_MS[attempt]
|
|
128
|
-
log(
|
|
142
|
+
log(
|
|
143
|
+
`omo: ${heldTarget(result.stderr) ?? "a package file"} is held by another process; retrying in ${delay / 1000}s (attempt ${attempt + 2} of ${LOCK_RETRY_DELAYS_MS.length + 1})`,
|
|
144
|
+
)
|
|
129
145
|
await sleep(delay)
|
|
130
146
|
}
|
|
131
147
|
|
|
132
148
|
if (failed(result) && heldOnWindows(result)) {
|
|
133
|
-
await reportHeldInstall({
|
|
149
|
+
await reportHeldInstall({
|
|
150
|
+
result,
|
|
151
|
+
before,
|
|
152
|
+
install,
|
|
153
|
+
resolveUpdate,
|
|
154
|
+
readInstalled,
|
|
155
|
+
error,
|
|
156
|
+
options,
|
|
157
|
+
attempts: LOCK_RETRY_DELAYS_MS.length + 1,
|
|
158
|
+
})
|
|
134
159
|
return 1
|
|
135
160
|
}
|
|
136
161
|
if (failed(result)) {
|
|
@@ -164,13 +189,17 @@ async function reportHeldInstall({ result, before, install, resolveUpdate, readI
|
|
|
164
189
|
const selfPids = options.selfPids ?? [process.pid, process.ppid]
|
|
165
190
|
const holders = findHolders(installDir, listProcesses(), selfPids, held)
|
|
166
191
|
|
|
167
|
-
error(
|
|
192
|
+
error(
|
|
193
|
+
`omo: update stopped: Windows would not let the package manager replace ${file}; it was still held after ${attempts} attempts.`,
|
|
194
|
+
)
|
|
168
195
|
if (holders.length > 0) {
|
|
169
196
|
error(`omo: held by ${holders.map((holder) => `${holder.name} (pid ${holder.pid})`).join(", ")}`)
|
|
170
197
|
const names = [...new Set(holders.map((holder) => holder.name))].join(", ")
|
|
171
198
|
error(`omo: Quit ${names} and run omo update again.`)
|
|
172
199
|
} else {
|
|
173
|
-
error(
|
|
200
|
+
error(
|
|
201
|
+
"omo: No omo command-line process was found holding it. Another app (for example the OmO desktop app or an editor) or antivirus may be holding it: close it, or wait a minute, then run omo update again.",
|
|
202
|
+
)
|
|
174
203
|
}
|
|
175
204
|
|
|
176
205
|
const now = readInstalledOrUndefined(readInstalled)
|
|
@@ -182,7 +211,9 @@ async function reportHeldInstall({ result, before, install, resolveUpdate, readI
|
|
|
182
211
|
// manager can fail moving an old dependency after the new omo-ai is in place, and reinstalling over it
|
|
183
212
|
// would undo a working update and hit the same held file. Only an unreadable install is restored.
|
|
184
213
|
if (now !== undefined) {
|
|
185
|
-
error(
|
|
214
|
+
error(
|
|
215
|
+
`omo: omo ${now.omo} is installed, but the package manager did not finish; run omo update again afterwards to complete it.`,
|
|
216
|
+
)
|
|
186
217
|
return
|
|
187
218
|
}
|
|
188
219
|
const previous = resolveUpdate(before.omo)
|