oh-my-opencode 5.0.0-beta.30 → 5.0.0-beta.32
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/dist/cli/index.js +178 -37
- package/dist/cli-node/index.js +178 -37
- package/dist/config/schema/background-task.d.ts +1 -0
- package/dist/config/schema/oh-my-opencode-config.d.ts +1 -0
- package/dist/features/background-agent/constants.d.ts +0 -7
- package/dist/features/background-agent/manager.d.ts +2 -1
- package/dist/features/background-agent/parent-wake-dispatched-tracker.d.ts +0 -1
- package/dist/features/background-agent/parent-wake-notifier-types.d.ts +1 -1
- package/dist/features/background-agent/parent-wake-prompt-dispatch.d.ts +1 -1
- package/dist/features/background-agent/parent-wake-session-inspector.d.ts +1 -1
- package/dist/features/background-agent/subagent-spawn-limits.d.ts +8 -0
- package/dist/features/monitor/manager-internals.d.ts +1 -1
- package/dist/features/monitor/output-injector-types.d.ts +1 -1
- package/dist/features/task-toast-manager/manager.d.ts +0 -24
- package/dist/features/team-mode/tools/messaging-live-delivery-recipient.d.ts +1 -0
- package/dist/features/team-mode/tools/messaging-runtime.d.ts +1 -0
- package/dist/hooks/anthropic-context-window-limit-recovery/message-storage-directory.d.ts +0 -3
- package/dist/hooks/anthropic-context-window-limit-recovery/state.d.ts +1 -0
- package/dist/hooks/anthropic-context-window-limit-recovery/storage/empty-messages.d.ts +0 -1
- package/dist/hooks/anthropic-context-window-limit-recovery/tool-result-storage.d.ts +11 -0
- package/dist/hooks/claude-code-hooks/session-hook-state.d.ts +1 -0
- package/dist/hooks/claude-code-hooks/stop.d.ts +2 -0
- package/dist/hooks/claude-code-hooks/todo.d.ts +0 -1
- package/dist/hooks/claude-code-hooks/transcript.d.ts +2 -0
- package/dist/hooks/fsync-skip-warning/index.d.ts +4 -0
- package/dist/hooks/hashline-edit-diff-enhancer/hook.d.ts +1 -0
- package/dist/hooks/hashline-edit-diff-enhancer/pending-captures.d.ts +13 -0
- package/dist/hooks/keyword-detector/hook.d.ts +7 -0
- package/dist/hooks/keyword-detector/ultrawork/source-detector.d.ts +0 -1
- package/dist/hooks/model-fallback/hook.d.ts +1 -1
- package/dist/index.js +681 -273
- package/dist/oh-my-opencode.schema.json +5 -0
- package/dist/plugin-dispose.d.ts +3 -0
- package/dist/shared/agent-tool-restrictions.d.ts +0 -1
- package/dist/skills/ultimate-browsing/references/insane-search/README.md +9 -2
- package/dist/tools/delegate-task/sync-session-cleanup.d.ts +3 -0
- package/dist/tools/delegate-task/sync-session-poller.d.ts +1 -0
- package/dist/tools/delegate-task/types.d.ts +1 -0
- package/dist/tools/session-manager/directory-filter.d.ts +2 -0
- package/dist/tui.js +148 -9
- package/package.json +16 -15
- package/packages/git-bash-mcp/dist/cli.js +1 -0
- package/packages/lsp-core/src/lsp/client-diagnostics-freshness.integration.test.ts +47 -19
- package/packages/lsp-core/src/lsp/client-diagnostics-pull-timeout.test.ts +64 -0
- package/packages/lsp-core/src/lsp/client-wrapper.test.ts +97 -0
- package/packages/lsp-core/src/lsp/client-wrapper.ts +21 -6
- package/packages/lsp-core/src/lsp/client.ts +6 -3
- package/packages/lsp-core/src/lsp/constants.ts +5 -0
- package/packages/lsp-core/src/lsp/controlled-clock-test-support.ts +61 -0
- package/packages/lsp-core/src/lsp/errors.ts +15 -0
- package/packages/lsp-core/src/lsp/fixtures/workspace-edit-server.mjs +10 -3
- package/packages/lsp-core/src/lsp/manager-lifecycle.test.ts +262 -0
- package/packages/lsp-core/src/lsp/manager.ts +106 -13
- package/packages/lsp-core/src/lsp/timer-provider.ts +13 -0
- package/packages/lsp-core/src/lsp/transport-request-timeout.test.ts +73 -0
- package/packages/lsp-core/src/lsp/transport.ts +7 -2
- package/packages/lsp-core/src/lsp/workspace-document-state.test.ts +84 -1
- package/packages/lsp-core/src/lsp/workspace-document-state.ts +30 -11
- package/packages/lsp-core/src/lsp/workspace-markers.ts +18 -1
- package/packages/lsp-core/src/mcp.ts +3 -0
- package/packages/lsp-core/src/tools/parameters.test.ts +51 -0
- package/packages/lsp-daemon/dist/cli.js +155 -34
- package/packages/lsp-daemon/dist/client.js +155 -34
- package/packages/lsp-daemon/dist/index.js +155 -34
- package/packages/lsp-daemon/dist/proxy.js +3 -0
- package/packages/lsp-tools-mcp/dist/cli.js +155 -34
- package/packages/lsp-tools-mcp/dist/lsp/manager.js +134 -28
- package/packages/lsp-tools-mcp/dist/mcp.js +155 -34
- package/packages/lsp-tools-mcp/dist/tools.js +154 -34
- package/packages/lsp-tools-mcp/package.json +1 -1
- package/packages/omo-codex/plugin/.codex-plugin/plugin.json +1 -1
- package/packages/omo-codex/plugin/components/bootstrap/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/bootstrap/package.json +1 -1
- package/packages/omo-codex/plugin/components/codegraph/dist/cli.js +17 -2
- package/packages/omo-codex/plugin/components/codegraph/dist/serve.js +17 -2
- package/packages/omo-codex/plugin/components/codegraph/package.json +1 -1
- package/packages/omo-codex/plugin/components/codegraph/src/mcp-unavailable.ts +12 -0
- package/packages/omo-codex/plugin/components/codegraph/test/serve-unavailable-idle.test.ts +47 -0
- package/packages/omo-codex/plugin/components/comment-checker/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/comment-checker/package.json +1 -1
- package/packages/omo-codex/plugin/components/git-bash/hooks/hooks.json +2 -2
- package/packages/omo-codex/plugin/components/git-bash/package.json +1 -1
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/package.json +1 -1
- package/packages/omo-codex/plugin/components/lsp/dist/.omo-runtime-manifest.json +3 -3
- package/packages/omo-codex/plugin/components/lsp/dist/cli.js +152 -34
- package/packages/omo-codex/plugin/components/lsp/hooks/hooks.json +2 -2
- package/packages/omo-codex/plugin/components/lsp/package.json +1 -1
- package/packages/omo-codex/plugin/components/rules/hooks/hooks.json +4 -4
- package/packages/omo-codex/plugin/components/rules/package.json +1 -1
- package/packages/omo-codex/plugin/components/teammode/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/teammode/package.json +1 -1
- package/packages/omo-codex/plugin/components/telemetry/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/telemetry/package.json +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/AGENTS.md +5 -4
- package/packages/omo-codex/plugin/components/ultrawork/dist/cli.js +489 -4
- package/packages/omo-codex/plugin/components/ultrawork/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/package.json +1 -2
- package/packages/omo-codex/plugin/components/ultrawork/scripts/sync-directive.mjs +30 -14
- package/packages/omo-codex/plugin/components/ultrawork/src/directive-content.ts +4 -0
- package/packages/omo-codex/plugin/components/ultrawork/src/directive.ts +5 -2
- package/packages/omo-codex/plugin/components/ultrawork/test/directive-source.test.ts +14 -8
- package/packages/omo-codex/plugin/components/ultrawork/test/package-smoke.test.ts +12 -1
- package/packages/omo-codex/plugin/components/ulw-execute-continuation/hooks/hooks.json +2 -2
- package/packages/omo-codex/plugin/components/ulw-execute-continuation/package.json +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/AGENTS.md +5 -2
- package/packages/omo-codex/plugin/components/ulw-loop/README.md +1 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/checkpoint-continuation.js +9 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/checkpoint-reconciliation.d.ts +14 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/checkpoint-reconciliation.js +10 -1
- package/packages/omo-codex/plugin/components/ulw-loop/dist/checkpoint-template.d.ts +8 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/checkpoint-template.js +113 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/checkpoint.js +9 -5
- package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-commands.js +2 -1
- package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-output.d.ts +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-output.js +1 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-subcommands.js +2 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/cli.js +856 -347
- package/packages/omo-codex/plugin/components/ulw-loop/dist/codex-goal-instruction.d.ts +2 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/codex-goal-instruction.js +27 -6
- package/packages/omo-codex/plugin/components/ulw-loop/dist/codex-goal-snapshot.d.ts +13 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/codex-goal-snapshot.js +14 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/domain-types.d.ts +17 -9
- package/packages/omo-codex/plugin/components/ulw-loop/dist/plan-io.js +17 -2
- package/packages/omo-codex/plugin/components/ulw-loop/dist/plan-missing-recovery.d.ts +13 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/plan-missing-recovery.js +19 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/quality-gate-aggregate.d.ts +2 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/quality-gate-aggregate.js +53 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/quality-gate-artifacts.d.ts +9 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/quality-gate-artifacts.js +85 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/quality-gate-fields.js +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/dist/quality-gate.d.ts +4 -2
- package/packages/omo-codex/plugin/components/ulw-loop/dist/quality-gate.js +41 -102
- package/packages/omo-codex/plugin/components/ulw-loop/dist/review-blockers.js +4 -2
- package/packages/omo-codex/plugin/components/ulw-loop/dist/spawn-guard.js +185 -14
- package/packages/omo-codex/plugin/components/ulw-loop/dist/status-next-actions.d.ts +6 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/status-next-actions.js +33 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/surface.d.ts +18 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/surface.js +65 -0
- package/packages/omo-codex/plugin/components/ulw-loop/hooks/hooks.json +4 -4
- package/packages/omo-codex/plugin/components/ulw-loop/package.json +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/skills/ulw-loop/references/full-workflow.md +17 -0
- package/packages/omo-codex/plugin/components/ulw-loop/src/checkpoint-continuation.ts +7 -0
- package/packages/omo-codex/plugin/components/ulw-loop/src/checkpoint-reconciliation.ts +25 -1
- package/packages/omo-codex/plugin/components/ulw-loop/src/checkpoint-template.ts +127 -0
- package/packages/omo-codex/plugin/components/ulw-loop/src/checkpoint.ts +10 -12
- package/packages/omo-codex/plugin/components/ulw-loop/src/cli-commands.ts +2 -1
- package/packages/omo-codex/plugin/components/ulw-loop/src/cli-output.ts +1 -0
- package/packages/omo-codex/plugin/components/ulw-loop/src/cli-subcommands.ts +2 -0
- package/packages/omo-codex/plugin/components/ulw-loop/src/codex-goal-instruction.ts +34 -5
- package/packages/omo-codex/plugin/components/ulw-loop/src/codex-goal-snapshot.ts +23 -0
- package/packages/omo-codex/plugin/components/ulw-loop/src/domain-types.ts +19 -9
- package/packages/omo-codex/plugin/components/ulw-loop/src/plan-io.ts +18 -3
- package/packages/omo-codex/plugin/components/ulw-loop/src/plan-missing-recovery.ts +27 -0
- package/packages/omo-codex/plugin/components/ulw-loop/src/quality-gate-aggregate.ts +57 -0
- package/packages/omo-codex/plugin/components/ulw-loop/src/quality-gate-artifacts.ts +103 -0
- package/packages/omo-codex/plugin/components/ulw-loop/src/quality-gate-fields.ts +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/src/quality-gate.ts +54 -123
- package/packages/omo-codex/plugin/components/ulw-loop/src/review-blockers.ts +4 -2
- package/packages/omo-codex/plugin/components/ulw-loop/src/spawn-guard.ts +187 -12
- package/packages/omo-codex/plugin/components/ulw-loop/src/status-next-actions.ts +36 -0
- package/packages/omo-codex/plugin/components/ulw-loop/src/surface.ts +95 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/checkpoint-final.test.ts +107 -1
- package/packages/omo-codex/plugin/components/ulw-loop/test/checkpoint-template.test.ts +92 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/cli-status-next-actions.test.ts +183 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/codex-goal-instruction.test.ts +35 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/fixtures/quality-gate-builder.ts +7 -3
- package/packages/omo-codex/plugin/components/ulw-loop/test/guided-recovery.test.ts +105 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/quality-gate-aggregate.test.ts +101 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/quality-gate-roles.test.ts +46 -2
- package/packages/omo-codex/plugin/components/ulw-loop/test/quality-gate-senpi-surface.test.ts +131 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/quality-gate.test.ts +5 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/spawn-guard.test.ts +318 -1
- package/packages/omo-codex/plugin/components/ulw-loop/test/surface.test.ts +74 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/ultrawork-directive.test.ts +9 -3
- package/packages/omo-codex/plugin/hooks/post-compact-resetting-git-bash-mcp-reminder.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-compact-resetting-lsp-diagnostics-cache.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-compact-resetting-project-rule-cache.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-checking-codegraph-init-guidance.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-checking-comments.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-checking-lsp-diagnostics.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-checking-thread-title-hygiene.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-matching-project-rules.json +1 -1
- package/packages/omo-codex/plugin/hooks/pre-tool-use-enforcing-unlimited-goal-budget.json +1 -1
- package/packages/omo-codex/plugin/hooks/pre-tool-use-guarding-ulw-loop-spawns.json +1 -1
- package/packages/omo-codex/plugin/hooks/pre-tool-use-recommending-git-bash-mcp.json +1 -1
- package/packages/omo-codex/plugin/hooks/session-start-checking-auto-update.json +1 -1
- package/packages/omo-codex/plugin/hooks/session-start-checking-bootstrap-provisioning.json +1 -1
- package/packages/omo-codex/plugin/hooks/session-start-checking-codegraph-bootstrap.json +1 -1
- package/packages/omo-codex/plugin/hooks/session-start-loading-project-rules.json +1 -1
- package/packages/omo-codex/plugin/hooks/session-start-recording-session-telemetry.json +1 -1
- package/packages/omo-codex/plugin/hooks/stop-checking-ulw-execute-continuation.json +1 -1
- package/packages/omo-codex/plugin/hooks/stop-checking-ulw-loop-resume.json +1 -1
- package/packages/omo-codex/plugin/hooks/subagent-stop-checking-ulw-execute-continuation.json +1 -1
- package/packages/omo-codex/plugin/hooks/subagent-stop-verifying-lazycodex-executor-evidence.json +1 -1
- package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ultrawork-trigger.json +1 -1
- package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ulw-loop-steering.json +1 -1
- package/packages/omo-codex/plugin/hooks/user-prompt-submit-loading-project-rules.json +1 -1
- package/packages/omo-codex/plugin/package-lock.json +13 -13
- package/packages/omo-codex/plugin/package.json +1 -1
- package/packages/omo-codex/plugin/scripts/sync-skills.mjs +31 -2
- package/packages/omo-codex/plugin/skills/ultimate-browsing/references/insane-search/README.md +9 -2
- package/packages/omo-codex/plugin/skills/ulw-loop/references/full-workflow.md +17 -0
- package/packages/omo-codex/plugin/test/sync-skills-test-support.mjs +11 -1
- package/packages/omo-codex/plugin/test/sync-skills.test.mjs +13 -0
- package/packages/omo-codex/plugin/test/ultrawork-skill-pointer.test.mjs +5 -2
- package/packages/omo-codex/scripts/install-dist/install-local.mjs +2 -2
- package/packages/shared-skills/skills/ultimate-browsing/references/insane-search/README.md +9 -2
- package/dist/features/builtin-skills/index.d.ts +0 -1
- package/dist/features/builtin-skills/skill-file-loader.d.ts +0 -1
- package/dist/features/builtin-skills/skills/agent-browser-skill.d.ts +0 -1
- package/dist/features/builtin-skills/skills/agent-browser-template.d.ts +0 -1
- package/dist/features/builtin-skills/skills/debugging.d.ts +0 -1
- package/dist/features/builtin-skills/skills/dev-browser.d.ts +0 -1
- package/dist/features/builtin-skills/skills/frontend.d.ts +0 -1
- package/dist/features/builtin-skills/skills/git-master-sections/commit-atomic-planning.d.ts +0 -1
- package/dist/features/builtin-skills/skills/git-master-sections/commit-context-analysis.d.ts +0 -1
- package/dist/features/builtin-skills/skills/git-master-sections/commit-execution-verification.d.ts +0 -1
- package/dist/features/builtin-skills/skills/git-master-sections/commit-workflow.d.ts +0 -1
- package/dist/features/builtin-skills/skills/git-master-sections/history-search-workflow.d.ts +0 -1
- package/dist/features/builtin-skills/skills/git-master-sections/overview.d.ts +0 -1
- package/dist/features/builtin-skills/skills/git-master-sections/quick-reference.d.ts +0 -1
- package/dist/features/builtin-skills/skills/git-master-sections/rebase-workflow.d.ts +0 -1
- package/dist/features/builtin-skills/skills/git-master-skill-metadata.d.ts +0 -1
- package/dist/features/builtin-skills/skills/git-master.d.ts +0 -1
- package/dist/features/builtin-skills/skills/index.d.ts +0 -1
- package/dist/features/builtin-skills/skills/init-deep.d.ts +0 -1
- package/dist/features/builtin-skills/skills/playwright-cli.d.ts +0 -1
- package/dist/features/builtin-skills/skills/playwright-mcp-skill.d.ts +0 -1
- package/dist/features/builtin-skills/skills/playwright.d.ts +0 -1
- package/dist/features/builtin-skills/skills/remove-ai-slops.d.ts +0 -1
- package/dist/features/builtin-skills/skills/review-work.d.ts +0 -1
- package/dist/features/builtin-skills/skills/security-research.d.ts +0 -1
- package/dist/features/builtin-skills/skills/security-review.d.ts +0 -1
- package/dist/features/builtin-skills/skills/team-mode.d.ts +0 -1
- package/dist/features/builtin-skills/skills/visual-qa.d.ts +0 -1
- package/dist/features/builtin-skills/skills.d.ts +0 -1
- package/dist/features/builtin-skills/types.d.ts +0 -1
- package/dist/features/claude-code-plugin-loader/agent-loader.d.ts +0 -1
- package/dist/features/claude-code-plugin-loader/command-loader.d.ts +0 -1
- package/dist/features/claude-code-plugin-loader/discovery-core.d.ts +0 -1
- package/dist/features/claude-code-plugin-loader/discovery-paths.d.ts +0 -1
- package/dist/features/claude-code-plugin-loader/discovery.d.ts +0 -1
- package/dist/features/claude-code-plugin-loader/hook-loader.d.ts +0 -1
- package/dist/features/claude-code-plugin-loader/index.d.ts +0 -1
- package/dist/features/claude-code-plugin-loader/install-path-resolver.d.ts +0 -1
- package/dist/features/claude-code-plugin-loader/installed-plugin-database.d.ts +0 -1
- package/dist/features/claude-code-plugin-loader/loaded-plugin.d.ts +0 -1
- package/dist/features/claude-code-plugin-loader/loader.d.ts +0 -1
- package/dist/features/claude-code-plugin-loader/mcp-server-loader.d.ts +0 -1
- package/dist/features/claude-code-plugin-loader/plugin-key.d.ts +0 -1
- package/dist/features/claude-code-plugin-loader/plugin-manifest.d.ts +0 -1
- package/dist/features/claude-code-plugin-loader/plugin-path-resolver.d.ts +0 -1
- package/dist/features/claude-code-plugin-loader/plugin-settings.d.ts +0 -1
- package/dist/features/claude-code-plugin-loader/scope-filter.d.ts +0 -1
- package/dist/features/claude-code-plugin-loader/skill-loader.d.ts +0 -1
- package/dist/features/claude-code-plugin-loader/types.d.ts +0 -1
- package/dist/hooks/ralph-loop/completion-promise-detector-test-input.d.ts +0 -11
- package/dist/hooks/ralph-loop/loop-session-recovery.d.ts +0 -7
- package/dist/shared/prompt-async-gate/message-inspection-error.d.ts +0 -1
- package/dist/shared/prompt-async-gate/pending-tool-turn.d.ts +0 -1
- package/dist/shared/prompt-async-gate/prompt-message-state.d.ts +0 -1
- package/dist/shared/prompt-async-gate/queue.d.ts +0 -1
- package/dist/shared/prompt-async-gate/recent-dispatches.d.ts +0 -1
- package/dist/shared/prompt-async-gate/reservations.d.ts +0 -1
- package/dist/shared/prompt-async-gate/semantic-dedupe.d.ts +0 -1
- package/dist/shared/prompt-async-gate/session-idle-dispatch.d.ts +0 -1
- package/dist/shared/prompt-async-gate/timing.d.ts +0 -1
- package/dist/shared/prompt-async-gate/types.d.ts +0 -1
- package/dist/tools/call-omo-agent/message-storage-directory.d.ts +0 -1
- package/dist/tools/delegate-task/model-string-parser.d.ts +0 -1
- package/packages/lsp-tools-mcp/dist/lsp/cleanup-errors.d.ts +0 -1
- package/packages/lsp-tools-mcp/dist/lsp/constants.d.ts +0 -1
- package/packages/lsp-tools-mcp/dist/lsp/language-mappings.d.ts +0 -1
- package/packages/lsp-tools-mcp/dist/lsp/process-signal-cleanup.d.ts +0 -1
- package/packages/lsp-tools-mcp/dist/missing-dependency-result.d.ts +0 -1
- package/packages/omo-codex/plugin/components/ultrawork/directive.md +0 -483
- package/packages/omo-codex/plugin/components/ultrawork/skills/ultrawork/SKILL.md +0 -490
|
@@ -253,6 +253,16 @@ class LspProcessSpawnError extends Error {
|
|
|
253
253
|
this.name = "LspProcessSpawnError";
|
|
254
254
|
}
|
|
255
255
|
}
|
|
256
|
+
|
|
257
|
+
class LspClientRespawnBudgetExceededError extends Error {
|
|
258
|
+
constructor(serverId, root, retryLimit) {
|
|
259
|
+
super(`LSP server ${serverId} at ${root} failed to stay alive; respawn budget exhausted ` + `(${retryLimit} consecutive dead generations). Retrying after the cooldown may succeed.`);
|
|
260
|
+
this.serverId = serverId;
|
|
261
|
+
this.root = root;
|
|
262
|
+
this.retryLimit = retryLimit;
|
|
263
|
+
this.name = "LspClientRespawnBudgetExceededError";
|
|
264
|
+
}
|
|
265
|
+
}
|
|
256
266
|
function isLspDeadConnectionError(err) {
|
|
257
267
|
return err instanceof LspConnectionClosedError || err instanceof LspProcessExitedError;
|
|
258
268
|
}
|
|
@@ -274,6 +284,13 @@ import { pathToFileURL as pathToFileURL3 } from "node:url";
|
|
|
274
284
|
// ../lsp-core/src/lsp/connection.ts
|
|
275
285
|
import { pathToFileURL } from "node:url";
|
|
276
286
|
|
|
287
|
+
// ../lsp-core/src/lsp/timer-provider.ts
|
|
288
|
+
var realTimerProvider = {
|
|
289
|
+
now: () => Date.now(),
|
|
290
|
+
setTimeout: (callback, delayMs) => setTimeout(callback, delayMs),
|
|
291
|
+
clearTimeout: (handle) => clearTimeout(handle)
|
|
292
|
+
};
|
|
293
|
+
|
|
277
294
|
// ../lsp-core/src/lsp/constants.ts
|
|
278
295
|
var DEFAULT_MAX_REFERENCES = 200;
|
|
279
296
|
var DEFAULT_MAX_SYMBOLS = 200;
|
|
@@ -286,6 +303,8 @@ var MAX_RESIDENT_CLIENTS = 6;
|
|
|
286
303
|
var REAPER_INTERVAL_MS = 60000;
|
|
287
304
|
var STOP_HARD_KILL_TIMEOUT_MS = 5000;
|
|
288
305
|
var STOP_SIGKILL_GRACE_MS = 1000;
|
|
306
|
+
var CLIENT_RESPAWN_RETRY_LIMIT = 2;
|
|
307
|
+
var CLIENT_RESPAWN_COOLDOWN_MS = 60000;
|
|
289
308
|
|
|
290
309
|
// ../lsp-core/src/lsp/json-rpc-connection.ts
|
|
291
310
|
var HEADER_SEPARATOR = `\r
|
|
@@ -811,6 +830,7 @@ class LspClientTransport {
|
|
|
811
830
|
this.documentFormattingSupported = false;
|
|
812
831
|
this.requestTimeoutMs = timeouts.requestTimeoutMs ?? REQUEST_TIMEOUT_MS;
|
|
813
832
|
this.initializeTimeoutMs = timeouts.initializeTimeoutMs ?? INIT_TIMEOUT_MS;
|
|
833
|
+
this.timerProvider = timeouts.timerProvider ?? realTimerProvider;
|
|
814
834
|
}
|
|
815
835
|
pid() {
|
|
816
836
|
return this.proc?.pid;
|
|
@@ -911,7 +931,7 @@ class LspClientTransport {
|
|
|
911
931
|
const options = args[1];
|
|
912
932
|
const timeoutMs = options?.timeoutMs ?? this.requestTimeoutMs;
|
|
913
933
|
const timeoutController = new AbortController;
|
|
914
|
-
const timeoutHandle = setTimeout(() => {
|
|
934
|
+
const timeoutHandle = this.timerProvider.setTimeout(() => {
|
|
915
935
|
const stderrTail = this.stderrBuffer.slice(-5).join(`
|
|
916
936
|
`);
|
|
917
937
|
timeoutController.abort(new LspRequestTimeoutError(method, stderrTail || undefined));
|
|
@@ -930,7 +950,7 @@ class LspClientTransport {
|
|
|
930
950
|
}
|
|
931
951
|
throw error;
|
|
932
952
|
} finally {
|
|
933
|
-
clearTimeout(timeoutHandle);
|
|
953
|
+
this.timerProvider.clearTimeout(timeoutHandle);
|
|
934
954
|
combinedSignal.dispose();
|
|
935
955
|
}
|
|
936
956
|
}
|
|
@@ -1311,6 +1331,17 @@ function canonicalPath(filePath) {
|
|
|
1311
1331
|
return absolute;
|
|
1312
1332
|
}
|
|
1313
1333
|
}
|
|
1334
|
+
function normalizeDocumentUri(uri) {
|
|
1335
|
+
let decoded = uri;
|
|
1336
|
+
try {
|
|
1337
|
+
decoded = decodeURIComponent(uri);
|
|
1338
|
+
} catch {
|
|
1339
|
+
decoded = uri;
|
|
1340
|
+
}
|
|
1341
|
+
if (process.platform !== "win32")
|
|
1342
|
+
return decoded;
|
|
1343
|
+
return decoded.replace(/^(file:\/\/\/)([a-z]):/, (_match, prefix, drive) => `${prefix}${drive.toUpperCase()}:`);
|
|
1344
|
+
}
|
|
1314
1345
|
function isSameOrDescendant(candidate, parent) {
|
|
1315
1346
|
const suffix = relative2(parent, candidate);
|
|
1316
1347
|
return suffix === "" || !suffix.startsWith("..") && suffix !== "..";
|
|
@@ -1327,7 +1358,12 @@ class WorkspaceDocumentState {
|
|
|
1327
1358
|
this.openDocuments = new Map;
|
|
1328
1359
|
this.openByUri = new Map;
|
|
1329
1360
|
this.openPromises = new Map;
|
|
1330
|
-
this.
|
|
1361
|
+
this.timerProvider = options.timerProvider ?? {
|
|
1362
|
+
now: options.now ?? (() => Date.now()),
|
|
1363
|
+
setTimeout: (callback, delayMs) => setTimeout(callback, delayMs),
|
|
1364
|
+
clearTimeout: (handle) => clearTimeout(handle)
|
|
1365
|
+
};
|
|
1366
|
+
this.now = () => this.timerProvider.now();
|
|
1331
1367
|
this.versionlessPublishQuiescenceMs = options.versionlessPublishQuiescenceMs ?? DEFAULT_VERSIONLESS_PUBLISH_QUIESCENCE_MS;
|
|
1332
1368
|
}
|
|
1333
1369
|
async openFile(filePath) {
|
|
@@ -1349,7 +1385,7 @@ class WorkspaceDocumentState {
|
|
|
1349
1385
|
return this.openDocuments.get(canonicalPath(filePath))?.version;
|
|
1350
1386
|
}
|
|
1351
1387
|
getStoredDiagnostics(uri) {
|
|
1352
|
-
const state = this.openByUri.get(uri);
|
|
1388
|
+
const state = this.openByUri.get(normalizeDocumentUri(uri));
|
|
1353
1389
|
if (!state)
|
|
1354
1390
|
return [];
|
|
1355
1391
|
return state.lastPublish?.diagnostics ?? state.pullCache?.diagnostics ?? [];
|
|
@@ -1371,13 +1407,13 @@ class WorkspaceDocumentState {
|
|
|
1371
1407
|
return state !== undefined && state.uri === snapshot.uri && state.version === snapshot.version && state.generation === snapshot.documentGeneration;
|
|
1372
1408
|
}
|
|
1373
1409
|
getPullCache(snapshot) {
|
|
1374
|
-
const state = this.openByUri.get(snapshot.uri);
|
|
1410
|
+
const state = this.openByUri.get(normalizeDocumentUri(snapshot.uri));
|
|
1375
1411
|
if (!state?.pullCache || state.pullCache.documentVersion !== snapshot.version)
|
|
1376
1412
|
return null;
|
|
1377
1413
|
return state.pullCache;
|
|
1378
1414
|
}
|
|
1379
1415
|
recordPullDiagnostics(snapshot, report) {
|
|
1380
|
-
const state = this.openByUri.get(snapshot.uri);
|
|
1416
|
+
const state = this.openByUri.get(normalizeDocumentUri(snapshot.uri));
|
|
1381
1417
|
if (!state)
|
|
1382
1418
|
return;
|
|
1383
1419
|
state.pullCache = {
|
|
@@ -1387,7 +1423,7 @@ class WorkspaceDocumentState {
|
|
|
1387
1423
|
};
|
|
1388
1424
|
}
|
|
1389
1425
|
recordPublishedDiagnostics(params) {
|
|
1390
|
-
const state = this.openByUri.get(params.uri);
|
|
1426
|
+
const state = this.openByUri.get(normalizeDocumentUri(params.uri));
|
|
1391
1427
|
if (!state)
|
|
1392
1428
|
return;
|
|
1393
1429
|
state.publishGeneration += 1;
|
|
@@ -1401,7 +1437,7 @@ class WorkspaceDocumentState {
|
|
|
1401
1437
|
this.notifyWaiters(state);
|
|
1402
1438
|
}
|
|
1403
1439
|
resolvePushDiagnostics(snapshot) {
|
|
1404
|
-
const state = this.openByUri.get(snapshot.uri);
|
|
1440
|
+
const state = this.openByUri.get(normalizeDocumentUri(snapshot.uri));
|
|
1405
1441
|
if (!state?.lastPublish)
|
|
1406
1442
|
return { status: "missing" };
|
|
1407
1443
|
const publish = state.lastPublish;
|
|
@@ -1415,7 +1451,7 @@ class WorkspaceDocumentState {
|
|
|
1415
1451
|
return waitMs === 0 ? { status: "ready", diagnostics: publish.diagnostics } : { status: "wait", waitMs };
|
|
1416
1452
|
}
|
|
1417
1453
|
waitForDiagnosticsActivity(snapshot, timeoutMs) {
|
|
1418
|
-
const state = this.openByUri.get(snapshot.uri);
|
|
1454
|
+
const state = this.openByUri.get(normalizeDocumentUri(snapshot.uri));
|
|
1419
1455
|
if (!state || timeoutMs <= 0)
|
|
1420
1456
|
return Promise.resolve();
|
|
1421
1457
|
return new Promise((resolveActivity) => {
|
|
@@ -1424,11 +1460,11 @@ class WorkspaceDocumentState {
|
|
|
1424
1460
|
if (settled)
|
|
1425
1461
|
return;
|
|
1426
1462
|
settled = true;
|
|
1427
|
-
clearTimeout(timer);
|
|
1463
|
+
this.timerProvider.clearTimeout(timer);
|
|
1428
1464
|
state.waiters.delete(finish);
|
|
1429
1465
|
resolveActivity();
|
|
1430
1466
|
};
|
|
1431
|
-
const timer = setTimeout(finish, timeoutMs);
|
|
1467
|
+
const timer = this.timerProvider.setTimeout(finish, timeoutMs);
|
|
1432
1468
|
if (typeof timer.unref === "function")
|
|
1433
1469
|
timer.unref();
|
|
1434
1470
|
state.waiters.add(finish);
|
|
@@ -1536,7 +1572,7 @@ class WorkspaceDocumentState {
|
|
|
1536
1572
|
waiters: new Set
|
|
1537
1573
|
};
|
|
1538
1574
|
this.openDocuments.set(path, state);
|
|
1539
|
-
this.openByUri.set(state.uri, state);
|
|
1575
|
+
this.openByUri.set(normalizeDocumentUri(state.uri), state);
|
|
1540
1576
|
this.notifyWaiters(state);
|
|
1541
1577
|
await this.sendNotification("textDocument/didOpen", {
|
|
1542
1578
|
textDocument: { uri: state.uri, languageId: state.languageId, version: state.version, text }
|
|
@@ -1561,7 +1597,7 @@ class WorkspaceDocumentState {
|
|
|
1561
1597
|
}
|
|
1562
1598
|
async closeDocument(state) {
|
|
1563
1599
|
this.openDocuments.delete(state.path);
|
|
1564
|
-
this.openByUri.delete(state.uri);
|
|
1600
|
+
this.openByUri.delete(normalizeDocumentUri(state.uri));
|
|
1565
1601
|
this.clearDiagnostics(state.uri);
|
|
1566
1602
|
this.notifyWaiters(state);
|
|
1567
1603
|
await this.sendNotification("textDocument/didClose", { textDocument: { uri: state.uri } });
|
|
@@ -2648,6 +2684,7 @@ class LspClient extends LspClientConnection {
|
|
|
2648
2684
|
this.diagnosticPullErrors = [];
|
|
2649
2685
|
this.diagnosticsFreshnessTimeoutMs = options.diagnosticsFreshnessTimeoutMs ?? DIAGNOSTICS_FRESHNESS_TIMEOUT_MS;
|
|
2650
2686
|
this.documents = new WorkspaceDocumentState((method, params) => this.sendNotification(method, params), (uri) => this.diagnosticsStore.delete(uri), {
|
|
2687
|
+
timerProvider: this.timerProvider,
|
|
2651
2688
|
versionlessPublishQuiescenceMs: options.versionlessPublishQuiescenceMs ?? VERSIONLESS_PUBLISH_QUIESCENCE_MS
|
|
2652
2689
|
});
|
|
2653
2690
|
this.workspaceMutations = new WorkspaceMutationController(root, this.documents);
|
|
@@ -2751,7 +2788,7 @@ class LspClient extends LspClientConnection {
|
|
|
2751
2788
|
const absPath = this.resolveWorkspacePath(filePath);
|
|
2752
2789
|
const uri = pathToFileURL3(absPath).href;
|
|
2753
2790
|
await this.openFile(absPath);
|
|
2754
|
-
const deadlineAt =
|
|
2791
|
+
const deadlineAt = this.timerProvider.now() + this.diagnosticsFreshnessTimeoutMs;
|
|
2755
2792
|
for (;; ) {
|
|
2756
2793
|
signal?.throwIfAborted();
|
|
2757
2794
|
const snapshot = this.documents.captureDiagnosticSnapshot(absPath);
|
|
@@ -2764,7 +2801,7 @@ class LspClient extends LspClientConnection {
|
|
|
2764
2801
|
if (!pushFallbackOnly) {
|
|
2765
2802
|
const cached = this.documents.getPullCache(snapshot);
|
|
2766
2803
|
try {
|
|
2767
|
-
const remainingMs2 = deadlineAt -
|
|
2804
|
+
const remainingMs2 = deadlineAt - this.timerProvider.now();
|
|
2768
2805
|
if (remainingMs2 <= 0)
|
|
2769
2806
|
return this.freshnessTimeout(absPath);
|
|
2770
2807
|
const result = await this.sendRequest("textDocument/diagnostic", {
|
|
@@ -2799,7 +2836,7 @@ class LspClient extends LspClientConnection {
|
|
|
2799
2836
|
}
|
|
2800
2837
|
if (!pushFallbackOnly)
|
|
2801
2838
|
continue;
|
|
2802
|
-
const remainingMs = deadlineAt -
|
|
2839
|
+
const remainingMs = deadlineAt - this.timerProvider.now();
|
|
2803
2840
|
if (remainingMs <= 0) {
|
|
2804
2841
|
if (!this.isDiagnosticPullSupported() && snapshot.publishGeneration === 0) {
|
|
2805
2842
|
const cached = this.documents.getPullCache(snapshot);
|
|
@@ -2959,6 +2996,8 @@ function awaitWithSignal(promise, signal) {
|
|
|
2959
2996
|
class LspManager {
|
|
2960
2997
|
constructor(options = {}) {
|
|
2961
2998
|
this.clients = new Map;
|
|
2999
|
+
this.pendingStops = new Map;
|
|
3000
|
+
this.respawnBudgets = new Map;
|
|
2962
3001
|
this.reaperHandle = null;
|
|
2963
3002
|
this.signalDisposer = null;
|
|
2964
3003
|
this.disposed = false;
|
|
@@ -2984,17 +3023,52 @@ class LspManager {
|
|
|
2984
3023
|
getKey(root, serverId) {
|
|
2985
3024
|
return `${root}::${serverId}`;
|
|
2986
3025
|
}
|
|
3026
|
+
tombstoneStop(key, client) {
|
|
3027
|
+
const stop = stopClientBestEffort(client);
|
|
3028
|
+
this.pendingStops.set(key, stop);
|
|
3029
|
+
stop.finally(() => {
|
|
3030
|
+
if (this.pendingStops.get(key) === stop) {
|
|
3031
|
+
this.pendingStops.delete(key);
|
|
3032
|
+
}
|
|
3033
|
+
});
|
|
3034
|
+
return stop;
|
|
3035
|
+
}
|
|
3036
|
+
recordDeadGeneration(key) {
|
|
3037
|
+
let budget = this.respawnBudgets.get(key);
|
|
3038
|
+
if (budget === undefined) {
|
|
3039
|
+
budget = { deadGenerations: 0, exhaustedAt: null };
|
|
3040
|
+
this.respawnBudgets.set(key, budget);
|
|
3041
|
+
}
|
|
3042
|
+
budget.deadGenerations += 1;
|
|
3043
|
+
}
|
|
3044
|
+
markHealthyGeneration(key) {
|
|
3045
|
+
this.respawnBudgets.delete(key);
|
|
3046
|
+
}
|
|
3047
|
+
ensureRespawnAllowed(key, root, serverId) {
|
|
3048
|
+
const budget = this.respawnBudgets.get(key);
|
|
3049
|
+
if (budget === undefined || budget.deadGenerations < CLIENT_RESPAWN_RETRY_LIMIT)
|
|
3050
|
+
return;
|
|
3051
|
+
if (budget.exhaustedAt === null) {
|
|
3052
|
+
budget.exhaustedAt = this.now();
|
|
3053
|
+
throw new LspClientRespawnBudgetExceededError(serverId, root, CLIENT_RESPAWN_RETRY_LIMIT);
|
|
3054
|
+
}
|
|
3055
|
+
if (this.now() - budget.exhaustedAt < CLIENT_RESPAWN_COOLDOWN_MS) {
|
|
3056
|
+
throw new LspClientRespawnBudgetExceededError(serverId, root, CLIENT_RESPAWN_RETRY_LIMIT);
|
|
3057
|
+
}
|
|
3058
|
+
budget.deadGenerations = 0;
|
|
3059
|
+
budget.exhaustedAt = null;
|
|
3060
|
+
}
|
|
2987
3061
|
reapStale() {
|
|
2988
3062
|
const t = this.now();
|
|
2989
3063
|
for (const [key, managed] of this.clients) {
|
|
2990
3064
|
if (managed.isInitializing && managed.initializingSince !== null && t - managed.initializingSince > this.initTimeoutMs) {
|
|
2991
|
-
stopClientBestEffort(managed.client);
|
|
2992
3065
|
this.clients.delete(key);
|
|
3066
|
+
this.tombstoneStop(key, managed.client);
|
|
2993
3067
|
continue;
|
|
2994
3068
|
}
|
|
2995
3069
|
if (!managed.isInitializing && managed.refCount === 0 && managed.pendingWaiters === 0 && t - managed.lastUsedAt > this.idleTimeoutMs) {
|
|
2996
|
-
stopClientBestEffort(managed.client);
|
|
2997
3070
|
this.clients.delete(key);
|
|
3071
|
+
this.tombstoneStop(key, managed.client);
|
|
2998
3072
|
}
|
|
2999
3073
|
}
|
|
3000
3074
|
}
|
|
@@ -3004,7 +3078,7 @@ class LspManager {
|
|
|
3004
3078
|
if (!victim)
|
|
3005
3079
|
return;
|
|
3006
3080
|
this.clients.delete(victim.key);
|
|
3007
|
-
|
|
3081
|
+
this.tombstoneStop(victim.key, victim.managed.client);
|
|
3008
3082
|
}
|
|
3009
3083
|
}
|
|
3010
3084
|
leastRecentlyUsedIdleClient() {
|
|
@@ -3021,7 +3095,7 @@ class LspManager {
|
|
|
3021
3095
|
async tryDeleteIfOrphaned(key, managed) {
|
|
3022
3096
|
if (managed.refCount === 0 && managed.pendingWaiters === 0 && !managed.isInitializing && this.clients.get(key) === managed) {
|
|
3023
3097
|
this.clients.delete(key);
|
|
3024
|
-
await
|
|
3098
|
+
await this.tombstoneStop(key, managed.client);
|
|
3025
3099
|
}
|
|
3026
3100
|
}
|
|
3027
3101
|
async getClient(root, server, signal) {
|
|
@@ -3030,12 +3104,22 @@ class LspManager {
|
|
|
3030
3104
|
}
|
|
3031
3105
|
signal?.throwIfAborted();
|
|
3032
3106
|
const key = this.getKey(root, server.id);
|
|
3107
|
+
for (;; ) {
|
|
3108
|
+
const pendingStop = this.pendingStops.get(key);
|
|
3109
|
+
if (pendingStop === undefined)
|
|
3110
|
+
break;
|
|
3111
|
+
await awaitWithSignal(pendingStop, signal);
|
|
3112
|
+
signal?.throwIfAborted();
|
|
3113
|
+
}
|
|
3114
|
+
if (this.disposed) {
|
|
3115
|
+
throw new Error("LspManager has been disposed");
|
|
3116
|
+
}
|
|
3033
3117
|
let managed = this.clients.get(key);
|
|
3034
3118
|
if (managed) {
|
|
3035
3119
|
const t = this.now();
|
|
3036
3120
|
if (managed.isInitializing && managed.initializingSince !== null && t - managed.initializingSince > this.initTimeoutMs) {
|
|
3037
|
-
await stopClientBestEffort(managed.client);
|
|
3038
3121
|
this.clients.delete(key);
|
|
3122
|
+
await this.tombstoneStop(key, managed.client);
|
|
3039
3123
|
managed = undefined;
|
|
3040
3124
|
}
|
|
3041
3125
|
}
|
|
@@ -3056,15 +3140,20 @@ class LspManager {
|
|
|
3056
3140
|
signal.throwIfAborted();
|
|
3057
3141
|
}
|
|
3058
3142
|
if (!managed.client.isAlive()) {
|
|
3059
|
-
|
|
3060
|
-
this.clients.
|
|
3143
|
+
this.recordDeadGeneration(key);
|
|
3144
|
+
if (this.clients.get(key) === managed) {
|
|
3145
|
+
this.clients.delete(key);
|
|
3146
|
+
}
|
|
3147
|
+
await this.tombstoneStop(key, managed.client);
|
|
3061
3148
|
return this.getClient(root, server, signal);
|
|
3062
3149
|
}
|
|
3150
|
+
this.markHealthyGeneration(key);
|
|
3063
3151
|
managed.refCount++;
|
|
3064
3152
|
managed.lastUsedAt = this.now();
|
|
3065
3153
|
return managed.client;
|
|
3066
3154
|
}
|
|
3067
3155
|
this.evictForAdmission();
|
|
3156
|
+
this.ensureRespawnAllowed(key, root, server.id);
|
|
3068
3157
|
const client = this.clientFactory(root, server);
|
|
3069
3158
|
const initStartedAt = this.now();
|
|
3070
3159
|
const initPromise = (async () => {
|
|
@@ -3088,7 +3177,7 @@ class LspManager {
|
|
|
3088
3177
|
if (this.clients.get(key) === newManaged) {
|
|
3089
3178
|
this.clients.delete(key);
|
|
3090
3179
|
}
|
|
3091
|
-
await
|
|
3180
|
+
await this.tombstoneStop(key, client);
|
|
3092
3181
|
throw err;
|
|
3093
3182
|
}
|
|
3094
3183
|
newManaged.pendingWaiters--;
|
|
@@ -3099,6 +3188,15 @@ class LspManager {
|
|
|
3099
3188
|
await this.tryDeleteIfOrphaned(key, newManaged);
|
|
3100
3189
|
signal.throwIfAborted();
|
|
3101
3190
|
}
|
|
3191
|
+
if (!client.isAlive()) {
|
|
3192
|
+
this.recordDeadGeneration(key);
|
|
3193
|
+
if (this.clients.get(key) === newManaged) {
|
|
3194
|
+
this.clients.delete(key);
|
|
3195
|
+
}
|
|
3196
|
+
await this.tombstoneStop(key, client);
|
|
3197
|
+
return this.getClient(root, server, signal);
|
|
3198
|
+
}
|
|
3199
|
+
this.markHealthyGeneration(key);
|
|
3102
3200
|
newManaged.refCount++;
|
|
3103
3201
|
newManaged.lastUsedAt = this.now();
|
|
3104
3202
|
return client;
|
|
@@ -3119,15 +3217,20 @@ class LspManager {
|
|
|
3119
3217
|
if (client && managed.client !== client)
|
|
3120
3218
|
return;
|
|
3121
3219
|
this.clients.delete(key);
|
|
3122
|
-
|
|
3220
|
+
this.tombstoneStop(key, managed.client);
|
|
3123
3221
|
}
|
|
3124
3222
|
warmupClient(root, server) {
|
|
3125
3223
|
if (this.disposed)
|
|
3126
3224
|
return;
|
|
3127
3225
|
const key = this.getKey(root, server.id);
|
|
3128
|
-
if (this.clients.has(key))
|
|
3226
|
+
if (this.clients.has(key) || this.pendingStops.has(key))
|
|
3129
3227
|
return;
|
|
3130
3228
|
this.evictForAdmission();
|
|
3229
|
+
try {
|
|
3230
|
+
this.ensureRespawnAllowed(key, root, server.id);
|
|
3231
|
+
} catch {
|
|
3232
|
+
return;
|
|
3233
|
+
}
|
|
3131
3234
|
const client = this.clientFactory(root, server);
|
|
3132
3235
|
const initStartedAt = this.now();
|
|
3133
3236
|
const initPromise = (async () => {
|
|
@@ -3153,7 +3256,7 @@ class LspManager {
|
|
|
3153
3256
|
if (this.clients.get(key) === managed) {
|
|
3154
3257
|
this.clients.delete(key);
|
|
3155
3258
|
}
|
|
3156
|
-
|
|
3259
|
+
this.tombstoneStop(key, client);
|
|
3157
3260
|
});
|
|
3158
3261
|
}
|
|
3159
3262
|
isServerInitializing(root, serverId) {
|
|
@@ -3197,8 +3300,11 @@ class LspManager {
|
|
|
3197
3300
|
for (const managed of this.clients.values()) {
|
|
3198
3301
|
stopPromises.push(stopClientBestEffort(managed.client));
|
|
3199
3302
|
}
|
|
3303
|
+
const tombstonedStops = [...this.pendingStops.values()];
|
|
3200
3304
|
this.clients.clear();
|
|
3201
|
-
|
|
3305
|
+
this.respawnBudgets.clear();
|
|
3306
|
+
await Promise.allSettled([...stopPromises, ...tombstonedStops]);
|
|
3307
|
+
this.pendingStops.clear();
|
|
3202
3308
|
}
|
|
3203
3309
|
}
|
|
3204
3310
|
var _defaultInstance = null;
|
|
@@ -3221,7 +3327,16 @@ import { existsSync as existsSync6, realpathSync as realpathSync4 } from "node:f
|
|
|
3221
3327
|
import { dirname as dirname5, join as join3 } from "node:path";
|
|
3222
3328
|
|
|
3223
3329
|
// ../lsp-core/src/lsp/workspace-markers.ts
|
|
3224
|
-
var
|
|
3330
|
+
var GIT_WORKSPACE_MARKER = ".git";
|
|
3331
|
+
var PROJECT_WORKSPACE_MARKERS = [
|
|
3332
|
+
"package.json",
|
|
3333
|
+
"pyproject.toml",
|
|
3334
|
+
"Cargo.toml",
|
|
3335
|
+
"go.mod",
|
|
3336
|
+
"pom.xml",
|
|
3337
|
+
"build.gradle"
|
|
3338
|
+
];
|
|
3339
|
+
var WORKSPACE_MARKERS = [GIT_WORKSPACE_MARKER, ...PROJECT_WORKSPACE_MARKERS];
|
|
3225
3340
|
|
|
3226
3341
|
// ../lsp-core/src/lsp/outside-context-workspace.ts
|
|
3227
3342
|
function findWorkspaceRootOutsideContext(directory) {
|
|
@@ -3910,20 +4025,25 @@ function findWorkspaceRoot(filePath) {
|
|
|
3910
4025
|
if (!isPathInside(cwd, abs))
|
|
3911
4026
|
return findWorkspaceRootOutsideContext(dir);
|
|
3912
4027
|
const fallbackRoot = nearestExistingDirectoryInsideContext(dir, cwd) ?? cwd;
|
|
4028
|
+
let nearestPackageRoot;
|
|
3913
4029
|
while (isPathInside(cwd, dir)) {
|
|
3914
4030
|
const canonicalDir = existingDirectoryInsideContext(dir, cwd);
|
|
3915
4031
|
if (canonicalDir !== undefined) {
|
|
3916
|
-
|
|
3917
|
-
|
|
3918
|
-
|
|
3919
|
-
|
|
4032
|
+
if (existsSync10(join5(dir, GIT_WORKSPACE_MARKER))) {
|
|
4033
|
+
return canonicalDir;
|
|
4034
|
+
}
|
|
4035
|
+
if (nearestPackageRoot === undefined && hasProjectWorkspaceMarker(dir)) {
|
|
4036
|
+
nearestPackageRoot = canonicalDir;
|
|
3920
4037
|
}
|
|
3921
4038
|
}
|
|
3922
4039
|
if (dir === cwd)
|
|
3923
4040
|
break;
|
|
3924
4041
|
dir = dirname8(dir);
|
|
3925
4042
|
}
|
|
3926
|
-
return fallbackRoot;
|
|
4043
|
+
return nearestPackageRoot ?? fallbackRoot;
|
|
4044
|
+
}
|
|
4045
|
+
function hasProjectWorkspaceMarker(directory) {
|
|
4046
|
+
return PROJECT_WORKSPACE_MARKERS.some((marker) => existsSync10(join5(directory, marker)));
|
|
3927
4047
|
}
|
|
3928
4048
|
function resolveReadablePathInsideContext(filePath) {
|
|
3929
4049
|
const cwd = contextCwd();
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"CHANGELOG.md"
|
|
33
33
|
],
|
|
34
34
|
"scripts": {
|
|
35
|
-
"build": "node scripts/ensure-core-links.mjs &&
|
|
35
|
+
"build": "node scripts/ensure-core-links.mjs && node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\" && tsc -p tsconfig.build.json --emitDeclarationOnly && bun build src/cli.ts src/mcp.ts src/tools.ts src/request-context.ts src/lsp/manager.ts --outdir dist --target node --format esm",
|
|
36
36
|
"test": "vitest --run",
|
|
37
37
|
"test:watch": "vitest",
|
|
38
38
|
"typecheck": "tsc --noEmit",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"command": "node \"${PLUGIN_ROOT}/components/bootstrap/dist/cli.js\" hook session-start",
|
|
9
9
|
"commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\bootstrap.ps1\"",
|
|
10
10
|
"timeout": 30,
|
|
11
|
-
"statusMessage": "(OmO 5.0.0-beta.
|
|
11
|
+
"statusMessage": "(OmO 5.0.0-beta.32) Checking Bootstrap Provisioning"
|
|
12
12
|
}
|
|
13
13
|
]
|
|
14
14
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sisyphuslabs/codex-bootstrap",
|
|
3
|
-
"version": "5.0.0-beta.
|
|
3
|
+
"version": "5.0.0-beta.32",
|
|
4
4
|
"description": "Codex SessionStart bootstrap component that provisions LazyCodex runtime dependencies from a detached worker.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"private": true,
|
|
@@ -5580,6 +5580,10 @@ var OmoMemorySyncSchema = object({
|
|
|
5580
5580
|
var OmoMemorySearchSchema = object({
|
|
5581
5581
|
enabled: boolean2().default(true)
|
|
5582
5582
|
}).strict();
|
|
5583
|
+
var OmoMemoryRecallSchema = object({
|
|
5584
|
+
enabled: boolean2().default(true),
|
|
5585
|
+
max_items: number2().int().min(1).max(5).default(2)
|
|
5586
|
+
}).strict();
|
|
5583
5587
|
var OmoMemoryNudgeSchema = object({
|
|
5584
5588
|
enabled: boolean2().default(true),
|
|
5585
5589
|
every_user_turns: number2().int().min(1).default(10)
|
|
@@ -5626,6 +5630,10 @@ var OmoMemorySyncLayerSchema = object({
|
|
|
5626
5630
|
var OmoMemorySearchLayerSchema = object({
|
|
5627
5631
|
enabled: boolean2().optional()
|
|
5628
5632
|
}).strict();
|
|
5633
|
+
var OmoMemoryRecallLayerSchema = object({
|
|
5634
|
+
enabled: boolean2().optional(),
|
|
5635
|
+
max_items: number2().int().min(1).max(5).optional()
|
|
5636
|
+
}).strict();
|
|
5629
5637
|
var OmoMemoryNudgeLayerSchema = object({
|
|
5630
5638
|
enabled: boolean2().optional(),
|
|
5631
5639
|
every_user_turns: number2().int().min(1).optional()
|
|
@@ -5665,6 +5673,7 @@ var OmoMemoryAgentOverridesSchema = object({
|
|
|
5665
5673
|
write_notice: OmoMemoryWriteNoticeLayerSchema.optional(),
|
|
5666
5674
|
sync: OmoMemorySyncLayerSchema.optional(),
|
|
5667
5675
|
search: OmoMemorySearchLayerSchema.optional(),
|
|
5676
|
+
recall: OmoMemoryRecallLayerSchema.optional(),
|
|
5668
5677
|
compile_warn_tokens: number2().int().positive().optional()
|
|
5669
5678
|
}).strict();
|
|
5670
5679
|
var OmoMemorySettingsSchema = object({
|
|
@@ -5694,6 +5703,7 @@ var OmoMemorySettingsSchema = object({
|
|
|
5694
5703
|
write_notice: OmoMemoryWriteNoticeSchema.default({ enabled: true }),
|
|
5695
5704
|
sync: OmoMemorySyncSchema.default({ enabled: true }),
|
|
5696
5705
|
search: OmoMemorySearchSchema.default({ enabled: true }),
|
|
5706
|
+
recall: OmoMemoryRecallSchema.default({ enabled: true, max_items: 2 }),
|
|
5697
5707
|
compile_warn_tokens: number2().int().positive().default(30000),
|
|
5698
5708
|
agents: record(string2(), OmoMemoryAgentOverridesSchema).default({})
|
|
5699
5709
|
}).strict();
|
|
@@ -5710,6 +5720,7 @@ var OmoMemorySettingsLayerSchema = object({
|
|
|
5710
5720
|
write_notice: OmoMemoryWriteNoticeLayerSchema.optional(),
|
|
5711
5721
|
sync: OmoMemorySyncLayerSchema.optional(),
|
|
5712
5722
|
search: OmoMemorySearchLayerSchema.optional(),
|
|
5723
|
+
recall: OmoMemoryRecallLayerSchema.optional(),
|
|
5713
5724
|
compile_warn_tokens: number2().int().positive().optional(),
|
|
5714
5725
|
agents: record(string2(), OmoMemoryAgentOverridesSchema).optional()
|
|
5715
5726
|
}).strict();
|
|
@@ -5732,6 +5743,7 @@ var OmoModelCatalogLayerSchema = record(string2(), OmoModelCatalogEntryLayerSche
|
|
|
5732
5743
|
|
|
5733
5744
|
// ../../omo-config-core/src/schema/task.ts
|
|
5734
5745
|
import { availableParallelism } from "node:os";
|
|
5746
|
+
var DEFAULT_RESIDENCY_MAX_CHILDREN = 16;
|
|
5735
5747
|
var ResidencyMaxChildrenInputSchema = union([number2().int().nonnegative(), literal("unlimited")]);
|
|
5736
5748
|
var OmoTaskWaitSchema = object({
|
|
5737
5749
|
min_ms: number2().int().positive().default(5000),
|
|
@@ -5821,7 +5833,7 @@ function resolveOmoTaskSettings(input, resolveParallelism = availableParallelism
|
|
|
5821
5833
|
const record2 = record(string2(), unknown()).parse(input);
|
|
5822
5834
|
return OmoTaskSettingsSchema.parse({
|
|
5823
5835
|
...record2,
|
|
5824
|
-
residency_max_children: record2["residency_max_children"] ?? Math.max(8, resolveParallelism() *
|
|
5836
|
+
residency_max_children: record2["residency_max_children"] ?? Math.min(DEFAULT_RESIDENCY_MAX_CHILDREN, Math.max(8, resolveParallelism() * 2)),
|
|
5825
5837
|
global_concurrency: record2["global_concurrency"] ?? Math.max(8, resolveParallelism() * 2)
|
|
5826
5838
|
});
|
|
5827
5839
|
}
|
|
@@ -11608,6 +11620,7 @@ async function runJsonRpcStdioServer(config2) {
|
|
|
11608
11620
|
const idleTimer = createIdleTimer(idleTimeoutMs, log, () => {
|
|
11609
11621
|
isClosed = true;
|
|
11610
11622
|
config2.onIdleTimeout?.();
|
|
11623
|
+
config2.input.destroy();
|
|
11611
11624
|
});
|
|
11612
11625
|
const watchdog = createParentWatchdog(config2.parentWatchdog, (parentPid, pollIntervalMs) => {
|
|
11613
11626
|
isClosed = true;
|
|
@@ -12001,7 +12014,9 @@ async function runUnavailableCodegraphMcpServer(options) {
|
|
|
12001
12014
|
},
|
|
12002
12015
|
input: options.input,
|
|
12003
12016
|
output: options.output,
|
|
12004
|
-
|
|
12017
|
+
idleTimeoutMs: 0,
|
|
12018
|
+
parentWatchdog: options.parentWatchdog ?? {},
|
|
12019
|
+
...options.lifecycleLog === undefined ? {} : { log: options.lifecycleLog }
|
|
12005
12020
|
});
|
|
12006
12021
|
}
|
|
12007
12022
|
async function handleUnavailableCodegraphMcpRequest(input, options) {
|
|
@@ -5846,6 +5846,10 @@ var OmoMemorySyncSchema = object({
|
|
|
5846
5846
|
var OmoMemorySearchSchema = object({
|
|
5847
5847
|
enabled: boolean2().default(true)
|
|
5848
5848
|
}).strict();
|
|
5849
|
+
var OmoMemoryRecallSchema = object({
|
|
5850
|
+
enabled: boolean2().default(true),
|
|
5851
|
+
max_items: number2().int().min(1).max(5).default(2)
|
|
5852
|
+
}).strict();
|
|
5849
5853
|
var OmoMemoryNudgeSchema = object({
|
|
5850
5854
|
enabled: boolean2().default(true),
|
|
5851
5855
|
every_user_turns: number2().int().min(1).default(10)
|
|
@@ -5892,6 +5896,10 @@ var OmoMemorySyncLayerSchema = object({
|
|
|
5892
5896
|
var OmoMemorySearchLayerSchema = object({
|
|
5893
5897
|
enabled: boolean2().optional()
|
|
5894
5898
|
}).strict();
|
|
5899
|
+
var OmoMemoryRecallLayerSchema = object({
|
|
5900
|
+
enabled: boolean2().optional(),
|
|
5901
|
+
max_items: number2().int().min(1).max(5).optional()
|
|
5902
|
+
}).strict();
|
|
5895
5903
|
var OmoMemoryNudgeLayerSchema = object({
|
|
5896
5904
|
enabled: boolean2().optional(),
|
|
5897
5905
|
every_user_turns: number2().int().min(1).optional()
|
|
@@ -5931,6 +5939,7 @@ var OmoMemoryAgentOverridesSchema = object({
|
|
|
5931
5939
|
write_notice: OmoMemoryWriteNoticeLayerSchema.optional(),
|
|
5932
5940
|
sync: OmoMemorySyncLayerSchema.optional(),
|
|
5933
5941
|
search: OmoMemorySearchLayerSchema.optional(),
|
|
5942
|
+
recall: OmoMemoryRecallLayerSchema.optional(),
|
|
5934
5943
|
compile_warn_tokens: number2().int().positive().optional()
|
|
5935
5944
|
}).strict();
|
|
5936
5945
|
var OmoMemorySettingsSchema = object({
|
|
@@ -5960,6 +5969,7 @@ var OmoMemorySettingsSchema = object({
|
|
|
5960
5969
|
write_notice: OmoMemoryWriteNoticeSchema.default({ enabled: true }),
|
|
5961
5970
|
sync: OmoMemorySyncSchema.default({ enabled: true }),
|
|
5962
5971
|
search: OmoMemorySearchSchema.default({ enabled: true }),
|
|
5972
|
+
recall: OmoMemoryRecallSchema.default({ enabled: true, max_items: 2 }),
|
|
5963
5973
|
compile_warn_tokens: number2().int().positive().default(30000),
|
|
5964
5974
|
agents: record(string2(), OmoMemoryAgentOverridesSchema).default({})
|
|
5965
5975
|
}).strict();
|
|
@@ -5976,6 +5986,7 @@ var OmoMemorySettingsLayerSchema = object({
|
|
|
5976
5986
|
write_notice: OmoMemoryWriteNoticeLayerSchema.optional(),
|
|
5977
5987
|
sync: OmoMemorySyncLayerSchema.optional(),
|
|
5978
5988
|
search: OmoMemorySearchLayerSchema.optional(),
|
|
5989
|
+
recall: OmoMemoryRecallLayerSchema.optional(),
|
|
5979
5990
|
compile_warn_tokens: number2().int().positive().optional(),
|
|
5980
5991
|
agents: record(string2(), OmoMemoryAgentOverridesSchema).optional()
|
|
5981
5992
|
}).strict();
|
|
@@ -5998,6 +6009,7 @@ var OmoModelCatalogLayerSchema = record(string2(), OmoModelCatalogEntryLayerSche
|
|
|
5998
6009
|
|
|
5999
6010
|
// ../../../../omo-config-core/src/schema/task.ts
|
|
6000
6011
|
import { availableParallelism } from "node:os";
|
|
6012
|
+
var DEFAULT_RESIDENCY_MAX_CHILDREN = 16;
|
|
6001
6013
|
var ResidencyMaxChildrenInputSchema = union([number2().int().nonnegative(), literal("unlimited")]);
|
|
6002
6014
|
var OmoTaskWaitSchema = object({
|
|
6003
6015
|
min_ms: number2().int().positive().default(5000),
|
|
@@ -6087,7 +6099,7 @@ function resolveOmoTaskSettings(input, resolveParallelism = availableParallelism
|
|
|
6087
6099
|
const record2 = record(string2(), unknown()).parse(input);
|
|
6088
6100
|
return OmoTaskSettingsSchema.parse({
|
|
6089
6101
|
...record2,
|
|
6090
|
-
residency_max_children: record2["residency_max_children"] ?? Math.max(8, resolveParallelism() *
|
|
6102
|
+
residency_max_children: record2["residency_max_children"] ?? Math.min(DEFAULT_RESIDENCY_MAX_CHILDREN, Math.max(8, resolveParallelism() * 2)),
|
|
6091
6103
|
global_concurrency: record2["global_concurrency"] ?? Math.max(8, resolveParallelism() * 2)
|
|
6092
6104
|
});
|
|
6093
6105
|
}
|
|
@@ -9274,6 +9286,7 @@ async function runJsonRpcStdioServer(config2) {
|
|
|
9274
9286
|
const idleTimer = createIdleTimer(idleTimeoutMs, log, () => {
|
|
9275
9287
|
isClosed = true;
|
|
9276
9288
|
config2.onIdleTimeout?.();
|
|
9289
|
+
config2.input.destroy();
|
|
9277
9290
|
});
|
|
9278
9291
|
const watchdog = createParentWatchdog(config2.parentWatchdog, (parentPid, pollIntervalMs) => {
|
|
9279
9292
|
isClosed = true;
|
|
@@ -9685,7 +9698,9 @@ async function runUnavailableCodegraphMcpServer(options) {
|
|
|
9685
9698
|
},
|
|
9686
9699
|
input: options.input,
|
|
9687
9700
|
output: options.output,
|
|
9688
|
-
|
|
9701
|
+
idleTimeoutMs: 0,
|
|
9702
|
+
parentWatchdog: options.parentWatchdog ?? {},
|
|
9703
|
+
...options.lifecycleLog === undefined ? {} : { log: options.lifecycleLog }
|
|
9689
9704
|
});
|
|
9690
9705
|
}
|
|
9691
9706
|
async function handleUnavailableCodegraphMcpRequest(input, options) {
|