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
package/bin/darwin/omo-keychain
CHANGED
|
Binary file
|
package/bin/lib/agent-dir.js
CHANGED
|
@@ -22,7 +22,14 @@ export const ADOPTION_MARKER = ".adopted-from-omo-flat"
|
|
|
22
22
|
* configuration files: sessions, caches and logs stay where they are, so startup never turns into
|
|
23
23
|
* an unbounded copy.
|
|
24
24
|
*/
|
|
25
|
-
export const ADOPTED_STATE_FILES = [
|
|
25
|
+
export const ADOPTED_STATE_FILES = [
|
|
26
|
+
"settings.json",
|
|
27
|
+
"auth.json",
|
|
28
|
+
"models.json",
|
|
29
|
+
"models-store.json",
|
|
30
|
+
"mcp.json",
|
|
31
|
+
"trust.json",
|
|
32
|
+
]
|
|
26
33
|
|
|
27
34
|
/** Windows launches carry the runtime home in the environment, which must outrank os.homedir. */
|
|
28
35
|
export function runtimeHome(env = process.env) {
|
package/bin/lib/auth-store.js
CHANGED
|
@@ -3,7 +3,17 @@
|
|
|
3
3
|
* through here, so they all escape, back up and write it the same way.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import {
|
|
6
|
+
import {
|
|
7
|
+
chmodSync,
|
|
8
|
+
constants,
|
|
9
|
+
copyFileSync,
|
|
10
|
+
existsSync,
|
|
11
|
+
mkdirSync,
|
|
12
|
+
readFileSync,
|
|
13
|
+
renameSync,
|
|
14
|
+
unlinkSync,
|
|
15
|
+
writeFileSync,
|
|
16
|
+
} from "node:fs"
|
|
7
17
|
import { dirname } from "node:path"
|
|
8
18
|
|
|
9
19
|
// opencode keeps a pasted key verbatim and never interprets it, but the engine resolves every stored
|
package/bin/lib/bun-bin-shim.js
CHANGED
|
@@ -1,4 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
chmodSync,
|
|
3
|
+
lstatSync,
|
|
4
|
+
readFileSync,
|
|
5
|
+
realpathSync,
|
|
6
|
+
renameSync,
|
|
7
|
+
rmSync,
|
|
8
|
+
symlinkSync,
|
|
9
|
+
writeFileSync,
|
|
10
|
+
} from "node:fs"
|
|
2
11
|
import { homedir as osHomedir } from "node:os"
|
|
3
12
|
import { dirname, join, relative } from "node:path"
|
|
4
13
|
import { bunRoot, findBunBinary, isUnderBunGlobalTree } from "./bun-runtime.js"
|
|
@@ -90,7 +99,8 @@ export function ensureBunBinShim(input) {
|
|
|
90
99
|
warn: input.warn ?? ((message) => console.error(message)),
|
|
91
100
|
}
|
|
92
101
|
|
|
93
|
-
if (platform !== "darwin" && platform !== "linux")
|
|
102
|
+
if (platform !== "darwin" && platform !== "linux")
|
|
103
|
+
return { action: "skipped-platform", error: undefined, entries: [] }
|
|
94
104
|
if (!isUnderBunGlobalTree(input.scriptPath, { env, homedir, platform, realpath: io.realpath })) {
|
|
95
105
|
return { action: "skipped-install", error: undefined, entries: [] }
|
|
96
106
|
}
|
|
@@ -48,9 +48,13 @@ async function loadEngine() {
|
|
|
48
48
|
// read from the inspected agent dir (the extension's default reads the engine's own default dir).
|
|
49
49
|
function extensionProviders(register, cwd) {
|
|
50
50
|
const providers = []
|
|
51
|
-
const capture = (name, config) => {
|
|
51
|
+
const capture = (name, config) => {
|
|
52
|
+
providers.push([name, config])
|
|
53
|
+
}
|
|
52
54
|
// The extension reads the session's absolute cwd (senpi 2026.10.25-1 refuses to register without one).
|
|
53
|
-
register(
|
|
55
|
+
register(
|
|
56
|
+
new Proxy({}, { get: (_, key) => (key === "cwd" ? cwd : key === "registerProvider" ? capture : () => undefined) }),
|
|
57
|
+
)
|
|
54
58
|
return providers
|
|
55
59
|
}
|
|
56
60
|
|
|
@@ -73,9 +77,10 @@ async function loadRuntime() {
|
|
|
73
77
|
*/
|
|
74
78
|
export async function engineAvailableModels(input) {
|
|
75
79
|
const engine = await (input.loadEngine ?? loadEngine)()
|
|
76
|
-
const credentials =
|
|
77
|
-
|
|
78
|
-
|
|
80
|
+
const credentials =
|
|
81
|
+
input.authEntries === undefined
|
|
82
|
+
? new engine.ReadOnlyAuthStorage(join(input.agentDir, "auth.json"))
|
|
83
|
+
: engine.AuthStorage.inMemory(input.authEntries)
|
|
79
84
|
const scratch = input.modelsDocument === undefined ? undefined : mkdtempSync(join(tmpdir(), "omo-coverage-"))
|
|
80
85
|
try {
|
|
81
86
|
const modelsPath = scratch === undefined ? join(input.agentDir, "models.json") : join(scratch, "models.json")
|
|
@@ -87,8 +92,12 @@ export async function engineAvailableModels(input) {
|
|
|
87
92
|
allowModelNetwork: false,
|
|
88
93
|
})
|
|
89
94
|
const cwd = input.cwd ?? process.cwd()
|
|
90
|
-
const readSettings = () =>
|
|
91
|
-
|
|
95
|
+
const readSettings = () =>
|
|
96
|
+
engine.loadAnthropicSubscriptionSettings(engine.SettingsManager.create(cwd, input.agentDir))
|
|
97
|
+
for (const [name, config] of extensionProviders(
|
|
98
|
+
(pi) => engine.registerAnthropicSubscription(pi, { readSettings }),
|
|
99
|
+
resolve(cwd),
|
|
100
|
+
)) {
|
|
92
101
|
await runtime.registerProvider(name, config, { refresh: false })
|
|
93
102
|
}
|
|
94
103
|
return (await runtime.getAvailable()).map((model) => ({ provider: model.provider, id: model.id }))
|
|
@@ -112,7 +121,12 @@ export async function engineAvailableModels(input) {
|
|
|
112
121
|
*/
|
|
113
122
|
export async function categoryCoverage(input) {
|
|
114
123
|
const runtime = await (input.loadRuntime ?? loadRuntime)()
|
|
115
|
-
return runtime.categoryCoverage({
|
|
124
|
+
return runtime.categoryCoverage({
|
|
125
|
+
models: input.models,
|
|
126
|
+
cwd: input.cwd,
|
|
127
|
+
env: input.env,
|
|
128
|
+
pinnedCategories: input.pinnedCategories ?? [],
|
|
129
|
+
})
|
|
116
130
|
}
|
|
117
131
|
|
|
118
132
|
function total(coverage) {
|
|
@@ -133,7 +147,8 @@ function gapLine(gap) {
|
|
|
133
147
|
|
|
134
148
|
/** @param {CategoryCoverage} coverage */
|
|
135
149
|
export function formatDoctorCoverageLines(coverage) {
|
|
136
|
-
if (coverage.unusable.length === 0)
|
|
150
|
+
if (coverage.unusable.length === 0)
|
|
151
|
+
return [`PASS task categories: all ${total(coverage)} usable with your connected providers`]
|
|
137
152
|
const usable = coverage.usable.length > 0 ? ` (${coverage.usable.join(", ")})` : ""
|
|
138
153
|
return [
|
|
139
154
|
`WARN task categories: ${coverage.usable.length} of ${total(coverage)} usable with your connected providers${usable}`,
|
|
@@ -145,7 +160,10 @@ export function formatDoctorCoverageLines(coverage) {
|
|
|
145
160
|
export function coverageSummaryParts(coverage) {
|
|
146
161
|
if (coverage.unusable.length === 0) return [`all ${total(coverage)} usable with these providers`]
|
|
147
162
|
const usable = coverage.usable.length > 0 ? ` (${coverage.usable.join(", ")})` : ""
|
|
148
|
-
return [
|
|
163
|
+
return [
|
|
164
|
+
`${coverage.usable.length} of ${total(coverage)} usable with these providers${usable}`,
|
|
165
|
+
...coverage.unusable.map(gapLine),
|
|
166
|
+
]
|
|
149
167
|
}
|
|
150
168
|
|
|
151
169
|
/**
|
|
@@ -165,7 +183,12 @@ export async function doctorCoverageLines(options) {
|
|
|
165
183
|
const runtime = await (options.loadRuntime ?? loadRuntime)()
|
|
166
184
|
const cwd = options.cwd ?? process.cwd()
|
|
167
185
|
const models = await engineAvailableModels({ agentDir: options.agentDir, cwd, loadEngine: options.loadEngine })
|
|
168
|
-
const coverage = await categoryCoverage({
|
|
186
|
+
const coverage = await categoryCoverage({
|
|
187
|
+
models,
|
|
188
|
+
cwd,
|
|
189
|
+
env: options.env ?? process.env,
|
|
190
|
+
loadRuntime: async () => runtime,
|
|
191
|
+
})
|
|
169
192
|
return formatDoctorCoverageLines(coverage)
|
|
170
193
|
} catch {
|
|
171
194
|
return []
|
|
@@ -195,15 +218,30 @@ export async function setupCoverage(input) {
|
|
|
195
218
|
if (credentials.malformed || providers.models.malformed) return undefined
|
|
196
219
|
const runtime = await (input.loadRuntime ?? loadRuntime)()
|
|
197
220
|
const authEntries = { ...credentials.current.entries }
|
|
198
|
-
for (const item of [...credentials.result.additions, ...providers.result.keys])
|
|
221
|
+
for (const item of [...credentials.result.additions, ...providers.result.keys])
|
|
222
|
+
authEntries[item.provider] ??= { type: "api_key", key: item.key }
|
|
199
223
|
const added = providers.result.added
|
|
200
|
-
const modelsDocument =
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
224
|
+
const modelsDocument =
|
|
225
|
+
added.length === 0
|
|
226
|
+
? undefined
|
|
227
|
+
: {
|
|
228
|
+
...providers.models.document,
|
|
229
|
+
providers: {
|
|
230
|
+
...providers.models.document.providers,
|
|
231
|
+
...Object.fromEntries(added.map((provider) => [provider.id, provider.config])),
|
|
232
|
+
},
|
|
233
|
+
}
|
|
204
234
|
const cwd = input.cwd ?? process.cwd()
|
|
205
|
-
const models = await engineAvailableModels({
|
|
206
|
-
|
|
235
|
+
const models = await engineAvailableModels({
|
|
236
|
+
agentDir: input.agentDir,
|
|
237
|
+
authEntries,
|
|
238
|
+
modelsDocument,
|
|
239
|
+
cwd,
|
|
240
|
+
loadEngine: input.loadEngine,
|
|
241
|
+
})
|
|
242
|
+
const pinnedCategories = modelChoices.items
|
|
243
|
+
.filter((item) => item.kind === "categories" && item.state === "pending")
|
|
244
|
+
.map((item) => item.name)
|
|
207
245
|
return await categoryCoverage({
|
|
208
246
|
models,
|
|
209
247
|
cwd,
|
package/bin/lib/child-process.js
CHANGED
|
@@ -128,7 +128,8 @@ export function runChild(command, args, options = {}) {
|
|
|
128
128
|
child.on("error", (error) => settle(() => reject(error)))
|
|
129
129
|
// A child that died of the forwarded signal needs no special case: `propagateResult` turns a
|
|
130
130
|
// signaled result into this process dying by the same signal, which is exactly right.
|
|
131
|
-
const finish = (status, signal) =>
|
|
131
|
+
const finish = (status, signal) =>
|
|
132
|
+
settle(() => resolve(captureStderr ? { status, signal, stderr } : { status, signal }))
|
|
132
133
|
child.on("exit", (status, signal) => {
|
|
133
134
|
if (!captureStderr || child.stderr.readableEnded) {
|
|
134
135
|
finish(status, signal)
|
|
@@ -86,8 +86,20 @@ function inlineMdnData(cssTreeRoot) {
|
|
|
86
86
|
`const mdnProperties = ${serializeJsonFile(join(mdnCssRoot, "properties.json"))};`,
|
|
87
87
|
`const mdnSyntaxes = ${serializeJsonFile(join(mdnCssRoot, "syntaxes.json"))};`,
|
|
88
88
|
].join("\n")
|
|
89
|
-
inlineOnce(
|
|
90
|
-
|
|
89
|
+
inlineOnce(
|
|
90
|
+
join(cssTreeRoot, "lib", "data.js"),
|
|
91
|
+
ESM_MDN_REQUIRES,
|
|
92
|
+
constants,
|
|
93
|
+
MDN_INLINED_MARKER,
|
|
94
|
+
"css-tree/lib/data.js",
|
|
95
|
+
)
|
|
96
|
+
inlineOnce(
|
|
97
|
+
join(cssTreeRoot, "cjs", "data.cjs"),
|
|
98
|
+
CJS_MDN_REQUIRES,
|
|
99
|
+
constants,
|
|
100
|
+
MDN_INLINED_MARKER,
|
|
101
|
+
"css-tree/cjs/data.cjs",
|
|
102
|
+
)
|
|
91
103
|
}
|
|
92
104
|
|
|
93
105
|
function resolveMdnCssRoot(cssTreeRoot) {
|
package/bin/lib/daemon-adopt.js
CHANGED
|
@@ -65,7 +65,13 @@ async function release(sdk, thread, request) {
|
|
|
65
65
|
const second = await sdk.release(thread, {})
|
|
66
66
|
if (second.success) return { reply: second, dropped: dropped(first, second) }
|
|
67
67
|
if (second.error === "unknown_session" && thread.session_path !== null) {
|
|
68
|
-
return {
|
|
68
|
+
return {
|
|
69
|
+
reply: {
|
|
70
|
+
success: true,
|
|
71
|
+
data: { released: true, session_path: thread.session_path, attachments: 0, dropped: dropped(first) },
|
|
72
|
+
},
|
|
73
|
+
dropped: dropped(first),
|
|
74
|
+
}
|
|
69
75
|
}
|
|
70
76
|
return { reply: first, dropped: dropped(first, second) }
|
|
71
77
|
}
|
|
@@ -92,7 +98,10 @@ export async function runAdoptCommand(args, { sdk, stdout, stderr }) {
|
|
|
92
98
|
const located = await sdk.locate({ thread: parsed.positionals[0], all_scope: true })
|
|
93
99
|
if (located.kind !== "ok") {
|
|
94
100
|
stderr.write(`omo daemon adopt: ${located.error.code}: ${located.error.message}\n`)
|
|
95
|
-
return outcome(
|
|
101
|
+
return outcome(
|
|
102
|
+
{ kind: "refused", error: located.error.code },
|
|
103
|
+
located.error.code === "ambiguous_target" ? DAEMON_EXIT.usage : DAEMON_EXIT.notRunning,
|
|
104
|
+
)
|
|
96
105
|
}
|
|
97
106
|
const thread = located.thread
|
|
98
107
|
if (thread.surface === "tui" || thread.endpoint?.kind === "tui") {
|
|
@@ -100,7 +109,9 @@ export async function runAdoptCommand(args, { sdk, stdout, stderr }) {
|
|
|
100
109
|
return outcome({ kind: "refused", error: "already_terminal", thread_id: thread.thread_id }, DAEMON_EXIT.unsupported)
|
|
101
110
|
}
|
|
102
111
|
if (!thread.alive || thread.endpoint === null) {
|
|
103
|
-
stderr.write(
|
|
112
|
+
stderr.write(
|
|
113
|
+
`omo daemon adopt: no running host holds ${thread.thread_id}; resume it with omo --session ${thread.session_path ?? thread.thread_id}\n`,
|
|
114
|
+
)
|
|
104
115
|
return outcome({ kind: "refused", error: "not_running", thread_id: thread.thread_id }, DAEMON_EXIT.notRunning)
|
|
105
116
|
}
|
|
106
117
|
|
|
@@ -108,18 +119,38 @@ export async function runAdoptCommand(args, { sdk, stdout, stderr }) {
|
|
|
108
119
|
const { reply, dropped: taken } = await release(sdk, thread, request)
|
|
109
120
|
if (!reply.success) {
|
|
110
121
|
stderr.write(`omo daemon adopt: ${refusalMessage(reply.error, reply.errorData, interrupt)}\n`)
|
|
111
|
-
for (const message of taken.user_messages)
|
|
112
|
-
|
|
122
|
+
for (const message of taken.user_messages)
|
|
123
|
+
stderr.write(` queued message taken out by --interrupt, not delivered: ${message}\n`)
|
|
124
|
+
return outcome(
|
|
125
|
+
{ kind: "refused", error: reply.error, thread_id: thread.thread_id, dropped: taken },
|
|
126
|
+
refusalExit(reply.error),
|
|
127
|
+
)
|
|
113
128
|
}
|
|
114
129
|
|
|
115
130
|
// senpi reads a leading `@` as a file argument even after `--`, so such a message is shown, not replayed.
|
|
116
131
|
const replayable = taken.user_messages.filter((message) => !message.startsWith("@"))
|
|
117
|
-
for (const message of taken.user_messages.filter((entry) => entry.startsWith("@")))
|
|
132
|
+
for (const message of taken.user_messages.filter((entry) => entry.startsWith("@")))
|
|
133
|
+
stderr.write(` queued message not replayed (starts with @), send it again: ${message}\n`)
|
|
118
134
|
const path = reply.data.session_path
|
|
119
|
-
stderr.write(
|
|
135
|
+
stderr.write(
|
|
136
|
+
`omo daemon adopt: ${thread.thread_id} released from ${thread.endpoint.socket}; resuming it here${replayable.length > 0 ? ` with ${replayable.length} queued message(s)` : ""}\n`,
|
|
137
|
+
)
|
|
120
138
|
// The relaunch carries them as argv, so they are also printed: a launch that fails after the release still leaves them on screen.
|
|
121
|
-
for (const message of replayable)
|
|
122
|
-
|
|
123
|
-
|
|
139
|
+
for (const message of replayable)
|
|
140
|
+
stderr.write(` queued message taken out by --interrupt, replayed as a prompt: ${message}\n`)
|
|
141
|
+
if (taken.deliveries.length > 0)
|
|
142
|
+
stderr.write(
|
|
143
|
+
` ${taken.deliveries.length} gateway deliver${taken.deliveries.length === 1 ? "y returns" : "ies return"} to the session's inbox\n`,
|
|
144
|
+
)
|
|
145
|
+
outcome(
|
|
146
|
+
{
|
|
147
|
+
kind: "released",
|
|
148
|
+
thread_id: thread.thread_id,
|
|
149
|
+
session_path: path,
|
|
150
|
+
attachments: reply.data.attachments,
|
|
151
|
+
dropped: taken,
|
|
152
|
+
},
|
|
153
|
+
DAEMON_EXIT.ok,
|
|
154
|
+
)
|
|
124
155
|
return { launch: ["--session", path, ...(replayable.length > 0 ? ["--", ...replayable] : [])], cwd: thread.cwd }
|
|
125
156
|
}
|
package/bin/lib/daemon-config.js
CHANGED
|
@@ -40,7 +40,10 @@ function readLegacyConfig(path) {
|
|
|
40
40
|
function loaderSettings(options) {
|
|
41
41
|
try {
|
|
42
42
|
const runtime = (options.loadRuntime ?? loadTaskConfigRuntime)(options.pluginRoot)
|
|
43
|
-
return {
|
|
43
|
+
return {
|
|
44
|
+
available: true,
|
|
45
|
+
settings: runtime.resolveDaemonTaskSettings({ cwd: options.cwd ?? process.cwd(), env: options.env }),
|
|
46
|
+
}
|
|
44
47
|
} catch {
|
|
45
48
|
return { available: false, settings: {} }
|
|
46
49
|
}
|
|
@@ -78,12 +81,15 @@ function migrationAdvice({ key, value }) {
|
|
|
78
81
|
if (key === "host_engine_policy" && value === "never") {
|
|
79
82
|
return '"never" is a command-line policy only (the config key accepts upgrade|fallback); pass --no-upgrade instead'
|
|
80
83
|
}
|
|
81
|
-
if (key === "host_idle_exit_ms" && !Number.isInteger(value))
|
|
84
|
+
if (key === "host_idle_exit_ms" && !Number.isInteger(value))
|
|
85
|
+
return "move it to ~/.omo/omo.jsonc as whole milliseconds"
|
|
82
86
|
return "move it to ~/.omo/omo.jsonc"
|
|
83
87
|
}
|
|
84
88
|
|
|
85
89
|
/** One doctor line per key the deprecated file supplied; none when the loader supplies them or cannot run. */
|
|
86
90
|
export function daemonConfigDoctorLines(options) {
|
|
87
91
|
const { legacyPath, legacySources } = readDaemonConfig(options)
|
|
88
|
-
return legacySources.map(
|
|
92
|
+
return legacySources.map(
|
|
93
|
+
(source) => `WARN task.${source.key}: read from deprecated ${legacyPath}; ${migrationAdvice(source)}`,
|
|
94
|
+
)
|
|
89
95
|
}
|
|
@@ -51,9 +51,11 @@ function liveEndpoints(endpoints) {
|
|
|
51
51
|
function ownedEndpoints(endpoints) {
|
|
52
52
|
return endpoints.filter((endpoint) => {
|
|
53
53
|
if (!operable(endpoint) || typeof endpoint.socket !== "string") return false
|
|
54
|
-
return
|
|
54
|
+
return (
|
|
55
|
+
endpoint.reachable ||
|
|
55
56
|
(endpoint.generations ?? []).some((generation) => generation.alive) ||
|
|
56
57
|
(endpoint.claims_live ?? 0) > 0
|
|
58
|
+
)
|
|
57
59
|
})
|
|
58
60
|
}
|
|
59
61
|
|
|
@@ -100,7 +102,8 @@ export function runHandoff({ engine, pluginRoot, agentDir, env, policy, config,
|
|
|
100
102
|
let refused = false
|
|
101
103
|
const commandEnv = hostCommandEnvironment(env, agentDir, config)
|
|
102
104
|
for (const endpoint of all.endpoints) {
|
|
103
|
-
if (!operable(endpoint) && typeof endpoint.socket === "string")
|
|
105
|
+
if (!operable(endpoint) && typeof endpoint.socket === "string")
|
|
106
|
+
stdout.write(`${endpoint.socket}: skipped (tui endpoint, owned by its terminal)\n`)
|
|
104
107
|
}
|
|
105
108
|
for (const endpoint of liveEndpoints(all.endpoints)) {
|
|
106
109
|
const daemon = basename(endpoint.socket) === "rpc.sock"
|
|
@@ -177,7 +180,12 @@ function waitForEndpoint(engine, socket, agentDir, env, timeoutSeconds, now, pau
|
|
|
177
180
|
let polls = 0
|
|
178
181
|
let latest
|
|
179
182
|
while (now() <= deadline) {
|
|
180
|
-
const call = endpointCall(
|
|
183
|
+
const call = endpointCall(
|
|
184
|
+
engine,
|
|
185
|
+
["host", "status", "--json", "--socket", socket, "--include-workers"],
|
|
186
|
+
agentDir,
|
|
187
|
+
env,
|
|
188
|
+
)
|
|
181
189
|
latest = call.parsed
|
|
182
190
|
polls += 1
|
|
183
191
|
const alive = (latest?.generations ?? []).some((generation) => generation.alive)
|
|
@@ -48,7 +48,7 @@ function indexStores(agentDir) {
|
|
|
48
48
|
function collectStores(agentDir, explicitStores) {
|
|
49
49
|
const index = indexStores(agentDir)
|
|
50
50
|
const metadata = sidecars(agentDir)
|
|
51
|
-
const fromSidecars = metadata.flatMap(({ document }) => Array.isArray(document.stores) ? document.stores : [])
|
|
51
|
+
const fromSidecars = metadata.flatMap(({ document }) => (Array.isArray(document.stores) ? document.stores : []))
|
|
52
52
|
const stores = [
|
|
53
53
|
...new Set([...index.stores, ...fromSidecars, ...explicitStores].map((store) => resolve(store))),
|
|
54
54
|
].toSorted()
|
|
@@ -61,16 +61,11 @@ function collectStores(agentDir, explicitStores) {
|
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
function statusForSocket(engine, socket, agentDir, env) {
|
|
64
|
-
const result = engine.run(
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
)
|
|
64
|
+
const result = engine.run(["host", "status", "--json", "--socket", socket, "--include-workers"], {
|
|
65
|
+
env: { ...env, OMO_AGENT_DIR: agentDir },
|
|
66
|
+
})
|
|
68
67
|
const parsed = parseEngineLine(result.stdout ?? "")
|
|
69
|
-
if (
|
|
70
|
-
parsed === undefined ||
|
|
71
|
-
!Array.isArray(parsed.generations) ||
|
|
72
|
-
typeof parsed.claims_live !== "number"
|
|
73
|
-
) {
|
|
68
|
+
if (parsed === undefined || !Array.isArray(parsed.generations) || typeof parsed.claims_live !== "number") {
|
|
74
69
|
return { readable: false }
|
|
75
70
|
}
|
|
76
71
|
return { readable: true, report: parsed }
|
|
@@ -90,23 +85,29 @@ export function runRollbackPrepare({
|
|
|
90
85
|
}) {
|
|
91
86
|
const discovered = collectStores(agentDir, explicitStores)
|
|
92
87
|
const endpointSweep = readAllEndpoints(engine, agentDir, env)
|
|
93
|
-
const endpointEvidence =
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
88
|
+
const endpointEvidence =
|
|
89
|
+
endpointSweep.kind === "all" &&
|
|
90
|
+
endpointSweep.endpoints.some((endpoint) => {
|
|
91
|
+
if (typeof endpoint.socket !== "string") return true
|
|
92
|
+
return basename(endpoint.socket) !== "rpc.sock"
|
|
93
|
+
})
|
|
97
94
|
if (
|
|
98
95
|
!discovered.index.present &&
|
|
99
96
|
(discovered.metadata.length > 0 || endpointEvidence) &&
|
|
100
97
|
!allowMissingIndex &&
|
|
101
98
|
explicitStores.length === 0
|
|
102
99
|
) {
|
|
103
|
-
stderr.write(
|
|
100
|
+
stderr.write(
|
|
101
|
+
"store index missing: pass --store <dir> for every project that ran task children, or --allow-missing-index\n",
|
|
102
|
+
)
|
|
104
103
|
return 3
|
|
105
104
|
}
|
|
106
105
|
|
|
107
106
|
const missing = discovered.stores.filter((store) => !existsSync(store))
|
|
108
107
|
const present = discovered.stores.filter((store) => existsSync(store))
|
|
109
|
-
const plans = present.map((storeDir) =>
|
|
108
|
+
const plans = present.map((storeDir) =>
|
|
109
|
+
migration.run({ storeDir, to: join(agentDir, "rpc", "rpc.sock"), planOnly: true }),
|
|
110
|
+
)
|
|
110
111
|
const sockets = [...new Set(plans.flatMap((plan) => plan.sockets))].toSorted()
|
|
111
112
|
const deadEndpoints = []
|
|
112
113
|
for (const socket of sockets) {
|
|
@@ -124,12 +125,14 @@ export function runRollbackPrepare({
|
|
|
124
125
|
deadEndpoints.push(socket)
|
|
125
126
|
}
|
|
126
127
|
|
|
127
|
-
const results = present.map((storeDir) =>
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
128
|
+
const results = present.map((storeDir) =>
|
|
129
|
+
migration.run({
|
|
130
|
+
storeDir,
|
|
131
|
+
to: join(agentDir, "rpc", "rpc.sock"),
|
|
132
|
+
deadEndpoints,
|
|
133
|
+
dryRun,
|
|
134
|
+
}),
|
|
135
|
+
)
|
|
133
136
|
for (const result of results) {
|
|
134
137
|
for (const warning of result.warnings ?? []) {
|
|
135
138
|
stderr.write(`WARNING ${warning.code} [${warning.task_ids.join(", ")}]: ${warning.message}\n`)
|
|
@@ -153,7 +156,9 @@ export function runRollbackPrepare({
|
|
|
153
156
|
if (json) stdout.write(`${JSON.stringify(payload)}\n`)
|
|
154
157
|
else {
|
|
155
158
|
for (const result of results) {
|
|
156
|
-
stdout.write(
|
|
159
|
+
stdout.write(
|
|
160
|
+
`${result.store_dir}: migrated: ${dryRun ? result.migrate : result.migrated}, skipped: ${result.skipped}\n`,
|
|
161
|
+
)
|
|
157
162
|
}
|
|
158
163
|
stdout.write(
|
|
159
164
|
`stores: ${payload.coverage.discovered} discovered (${payload.coverage.from_sidecars} from sidecars, ${payload.coverage.from_store} from --store), ${missing.length} missing, endpoints without a store map: ${storesWithoutMap.join(", ") || "none"}\n`,
|
package/bin/lib/daemon-status.js
CHANGED
|
@@ -58,7 +58,10 @@ function endpointName(endpoint) {
|
|
|
58
58
|
if (kind === "shard") {
|
|
59
59
|
const owner = endpoint.owner?.owner_session_id
|
|
60
60
|
const file = endpoint.owner?.owner_session_file
|
|
61
|
-
const suffix = [
|
|
61
|
+
const suffix = [
|
|
62
|
+
owner === undefined ? undefined : `parent ${owner.slice(0, 8)}`,
|
|
63
|
+
file === undefined ? undefined : basename(file),
|
|
64
|
+
]
|
|
62
65
|
.filter(Boolean)
|
|
63
66
|
.join(", ")
|
|
64
67
|
return `shard p-${endpoint.shard.key}${suffix === "" ? "" : ` (${suffix})`}`
|
|
@@ -80,7 +83,9 @@ function runningDetails(endpoint, includeGeneration = true) {
|
|
|
80
83
|
includeGeneration && endpoint.generation !== null && endpoint.generation !== undefined
|
|
81
84
|
? `gen ${endpoint.generation}`
|
|
82
85
|
: undefined,
|
|
83
|
-
endpoint.engineVersion === null || endpoint.engineVersion === undefined
|
|
86
|
+
endpoint.engineVersion === null || endpoint.engineVersion === undefined
|
|
87
|
+
? undefined
|
|
88
|
+
: `engine ${endpoint.engineVersion}`,
|
|
84
89
|
`${endpoint.sessions?.total ?? 0} session(s)`,
|
|
85
90
|
`rss ${metric(endpoint.rss_mb)} MB (host ${metric(endpoint.host_rss_mb)} MB)`,
|
|
86
91
|
`fds ${metric(endpoint.open_fds)}`,
|
|
@@ -98,7 +103,8 @@ function generationLine(generation, endpoint) {
|
|
|
98
103
|
/** A terminal row: `tui <name> pid <n> cwd <path>`, named by its session, else by its socket. */
|
|
99
104
|
function terminalLine(endpoint) {
|
|
100
105
|
const owner = endpoint.owner ?? {}
|
|
101
|
-
const socketName =
|
|
106
|
+
const socketName =
|
|
107
|
+
typeof endpoint.socket === "string" ? basename(endpoint.socket, ".sock") : basename(endpoint.dir ?? "unknown")
|
|
102
108
|
const line = `tui ${owner.session?.name ?? socketName} pid ${metric(owner.pid)} cwd ${owner.cwd ?? "?"}`
|
|
103
109
|
if (endpoint.alive !== false && endpoint.reachable) return line
|
|
104
110
|
return `${line}: not responding (${endpoint.reason ?? "unreachable"}; omo daemon gc reaps it once its process is gone)`
|
package/bin/lib/daemon.js
CHANGED
|
@@ -103,7 +103,13 @@ async function adopt(args, options) {
|
|
|
103
103
|
return await runAdoptCommand(args, { sdk: loaded.sdk, stdout: options.stdout, stderr: options.stderr })
|
|
104
104
|
} finally {
|
|
105
105
|
// The release already happened; a store that fails to close is logged, never a new outcome.
|
|
106
|
-
await loaded.sdk
|
|
106
|
+
await loaded.sdk
|
|
107
|
+
.dispose()
|
|
108
|
+
.catch((error) =>
|
|
109
|
+
options.stderr.write(
|
|
110
|
+
`omo daemon adopt: closing the gateway store failed: ${error instanceof Error ? error.message : String(error)}\n`,
|
|
111
|
+
),
|
|
112
|
+
)
|
|
107
113
|
}
|
|
108
114
|
}
|
|
109
115
|
|
|
@@ -126,7 +132,10 @@ export function runDaemonCommand(args, options) {
|
|
|
126
132
|
}
|
|
127
133
|
if (!SUBCOMMANDS.has(subcommand)) {
|
|
128
134
|
// Scripts written for the removed shared-host join get a pointer to what replaced it.
|
|
129
|
-
const removed =
|
|
135
|
+
const removed =
|
|
136
|
+
subcommand === "attach"
|
|
137
|
+
? "omo daemon: 'attach' was removed; to continue a host session in this terminal, run omo daemon adopt <session>\n"
|
|
138
|
+
: ""
|
|
130
139
|
stderr.write(`omo daemon: unknown subcommand '${subcommand}'\n${removed}${USAGE}\n`)
|
|
131
140
|
return DAEMON_EXIT.usage
|
|
132
141
|
}
|
|
@@ -151,7 +160,13 @@ export function runDaemonCommand(args, options) {
|
|
|
151
160
|
return DAEMON_EXIT.engineRefused
|
|
152
161
|
}
|
|
153
162
|
|
|
154
|
-
const { config } = readDaemonConfig({
|
|
163
|
+
const { config } = readDaemonConfig({
|
|
164
|
+
pluginRoot,
|
|
165
|
+
agentDir,
|
|
166
|
+
env,
|
|
167
|
+
cwd: options.cwd,
|
|
168
|
+
loadRuntime: options.loadTaskConfig,
|
|
169
|
+
})
|
|
155
170
|
if (subcommand === "status") {
|
|
156
171
|
const status = runStatus({
|
|
157
172
|
engine,
|