oh-my-opencode 4.10.0 → 4.11.0
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/.agents/skills/codex-qa/SKILL.md +96 -0
- package/.agents/skills/codex-qa/references/app-server.md +63 -0
- package/.agents/skills/codex-qa/references/components-hooks.md +38 -0
- package/.agents/skills/codex-qa/references/docker-qa.md +62 -0
- package/.agents/skills/codex-qa/references/install-verify.md +57 -0
- package/.agents/skills/codex-qa/references/isolation.md +57 -0
- package/.agents/skills/codex-qa/references/logging-debug.md +60 -0
- package/.agents/skills/codex-qa/scripts/app-server-drive.sh +76 -0
- package/.agents/skills/codex-qa/scripts/hook-unit-probe.sh +69 -0
- package/.agents/skills/codex-qa/scripts/install-verify.sh +60 -0
- package/.agents/skills/codex-qa/scripts/lib/app-server-client.mjs +117 -0
- package/.agents/skills/codex-qa/scripts/lib/common.sh +180 -0
- package/.agents/skills/codex-qa/scripts/lib/mock-model.mjs +56 -0
- package/.agents/skills/codex-qa/scripts/tui-smoke.sh +71 -0
- package/.agents/skills/opencode-qa/SKILL.md +8 -1
- package/.agents/skills/opencode-qa/references/docker-qa.md +72 -0
- package/.agents/skills/tech-debt-audit/SKILL.md +14 -14
- package/.agents/skills/work-with-pr/SKILL.md +77 -53
- package/.opencode/skills/work-with-pr/SKILL.md +79 -55
- package/README.ja.md +3 -3
- package/README.ko.md +3 -3
- package/README.md +2 -2
- package/README.ru.md +3 -3
- package/README.zh-cn.md +3 -3
- package/THIRD-PARTY-NOTICES.md +205 -0
- package/dist/agents/dynamic-agent-prompt-types.d.ts +1 -1
- package/dist/agents/index.d.ts +0 -1
- package/dist/agents/prometheus/index.d.ts +0 -1
- package/dist/agents/prometheus/system-prompt.d.ts +0 -2
- package/dist/cli/config-manager/add-tui-plugin-to-tui-config.d.ts +7 -0
- package/dist/cli/doctor/checks/codex-components.d.ts +4 -4
- package/dist/cli/doctor/checks/codex-runtime-wrapper.d.ts +7 -0
- package/dist/cli/doctor/checks/codex.d.ts +1 -1
- package/dist/cli/doctor/checks/config.d.ts +1 -1
- package/dist/cli/doctor/checks/dependencies.d.ts +1 -2
- package/dist/cli/doctor/checks/index.d.ts +1 -1
- package/dist/cli/doctor/checks/model-resolution.d.ts +1 -1
- package/dist/cli/doctor/checks/system.d.ts +1 -1
- package/dist/cli/doctor/checks/team-mode.d.ts +1 -1
- package/dist/cli/doctor/checks/tools-gh.d.ts +1 -1
- package/dist/cli/doctor/checks/tools-mcp.d.ts +1 -1
- package/dist/cli/doctor/checks/tools.d.ts +2 -1
- package/dist/cli/doctor/checks/tui-plugin-config.d.ts +7 -1
- package/dist/cli/doctor/framework/constants.d.ts +32 -0
- package/dist/cli/doctor/framework/spawn-with-timeout.d.ts +8 -0
- package/dist/cli/doctor/framework/types.d.ts +147 -0
- package/dist/cli/doctor/index.d.ts +4 -4
- package/dist/cli/doctor/runner.d.ts +1 -1
- package/dist/cli/index.js +9717 -7523
- package/dist/cli/install-ast-grep-sg.d.ts +10 -0
- package/dist/cli/install-codex/codex-cache-bins.d.ts +1 -21
- package/dist/cli/install-codex/codex-cache-bundled-mcps.d.ts +1 -5
- package/dist/cli/install-codex/codex-cache-command-shim.d.ts +1 -1
- package/dist/cli/install-codex/codex-cache-fs.d.ts +1 -3
- package/dist/cli/install-codex/codex-cache-install.d.ts +1 -13
- package/dist/cli/install-codex/codex-cache-legacy-bins.d.ts +1 -3
- package/dist/cli/install-codex/codex-cache-local-dependencies.d.ts +1 -1
- package/dist/cli/install-codex/codex-cache-mcp-manifest.d.ts +1 -2
- package/dist/cli/install-codex/codex-cache-paths.d.ts +1 -2
- package/dist/cli/install-codex/codex-cache-prune.d.ts +1 -10
- package/dist/cli/install-codex/codex-cache.d.ts +1 -4
- package/dist/cli/install-codex/codex-cached-marketplace-manifest.d.ts +1 -6
- package/dist/cli/install-codex/codex-cleanup-config.d.ts +1 -6
- package/dist/cli/install-codex/codex-cleanup.d.ts +1 -25
- package/dist/cli/install-codex/codex-config-agents.d.ts +1 -3
- package/dist/cli/install-codex/codex-config-features.d.ts +1 -1
- package/dist/cli/install-codex/codex-config-marketplaces.d.ts +1 -6
- package/dist/cli/install-codex/codex-config-permissions.d.ts +1 -1
- package/dist/cli/install-codex/codex-config-plugins.d.ts +1 -9
- package/dist/cli/install-codex/codex-config-reasoning.d.ts +1 -2
- package/dist/cli/install-codex/codex-config-toml-sections.d.ts +1 -9
- package/dist/cli/install-codex/codex-config-toml.d.ts +1 -13
- package/dist/cli/install-codex/codex-hook-trust.d.ts +1 -6
- package/dist/cli/install-codex/codex-installation-detection.d.ts +1 -36
- package/dist/cli/install-codex/codex-installer-bin-dir.d.ts +1 -8
- package/dist/cli/install-codex/codex-marketplace-snapshot.d.ts +1 -15
- package/dist/cli/install-codex/codex-marketplace.d.ts +1 -9
- package/dist/cli/install-codex/codex-model-catalog.d.ts +1 -13
- package/dist/cli/install-codex/codex-multi-agent-v2-config.d.ts +1 -12
- package/dist/cli/install-codex/codex-package-layout.d.ts +1 -1
- package/dist/cli/install-codex/codex-process.d.ts +1 -7
- package/dist/cli/install-codex/codex-project-local-cleanup-best-effort.d.ts +1 -7
- package/dist/cli/install-codex/codex-project-local-cleanup.d.ts +1 -35
- package/dist/cli/install-codex/git-bash.d.ts +1 -35
- package/dist/cli/install-codex/index.d.ts +1 -11
- package/dist/cli/install-codex/install-codex.d.ts +1 -10
- package/dist/cli/install-codex/lazycodex-version-stamp.d.ts +1 -19
- package/dist/cli/install-codex/link-cached-plugin-agents.d.ts +1 -20
- package/dist/cli/install-codex/lsp-daemon-reaper.d.ts +1 -5
- package/dist/cli/install-codex/toml-section-editor.d.ts +1 -11
- package/dist/cli/install-codex/types.d.ts +1 -76
- package/dist/cli/mcp-oauth/login.d.ts +1 -1
- package/dist/cli-node/index.js +9774 -7525
- package/dist/config/index.d.ts +1 -1
- package/dist/config/schema/agent-names.d.ts +1 -1
- package/dist/config/schema/codegraph.d.ts +9 -0
- package/dist/config/schema/git-env-prefix.d.ts +1 -5
- package/dist/config/schema/hooks.d.ts +3 -0
- package/dist/config/schema/monitor.d.ts +15 -0
- package/dist/config/schema/oh-my-opencode-config.d.ts +27 -16
- package/dist/config/schema/openclaw.d.ts +5 -4
- package/dist/config/schema/team-mode.d.ts +1 -16
- package/dist/config/schema/tmux.d.ts +4 -5
- package/dist/config/schema/tui.d.ts +10 -0
- package/dist/config/schema.d.ts +2 -0
- package/dist/config/validate.d.ts +8 -0
- package/dist/create-hooks.d.ts +5 -0
- package/dist/create-managers.d.ts +7 -0
- package/dist/create-runtime-tmux-config.d.ts +1 -1
- package/dist/create-tools.d.ts +1 -1
- package/dist/features/background-agent/error-classifier.d.ts +2 -2
- package/dist/features/background-agent/manager.d.ts +29 -2
- package/dist/features/background-agent/parent-wake-dispatched-tracker.d.ts +8 -0
- package/dist/features/background-agent/parent-wake-notifier.d.ts +4 -0
- package/dist/features/background-agent/spawner/fallback-agent.d.ts +3 -2
- package/dist/features/background-agent/spawner/task-prompt-body.d.ts +5 -6
- package/dist/features/background-agent/task-snapshot.d.ts +2 -0
- package/dist/features/background-agent/types.d.ts +7 -0
- package/dist/features/builtin-commands/templates/refactor-sections/intro-and-analysis.d.ts +1 -1
- package/dist/features/builtin-commands/templates/refactor-sections/plan-and-execution.d.ts +1 -1
- package/dist/features/builtin-commands/templates/refactor-sections/team-mode-addendum.d.ts +1 -1
- package/dist/features/builtin-commands/templates/refactor-sections/verification-and-tooling.d.ts +1 -1
- package/dist/features/builtin-commands/templates/remove-ai-slops.d.ts +1 -1
- package/dist/features/builtin-skills/index.d.ts +1 -2
- package/dist/features/builtin-skills/skill-file-loader.d.ts +1 -4
- package/dist/features/builtin-skills/skills/agent-browser-skill.d.ts +1 -2
- package/dist/features/builtin-skills/skills/agent-browser-template.d.ts +1 -2
- package/dist/features/builtin-skills/skills/debugging.d.ts +1 -2
- package/dist/features/builtin-skills/skills/dev-browser.d.ts +1 -2
- package/dist/features/builtin-skills/skills/frontend.d.ts +1 -0
- package/dist/features/builtin-skills/skills/git-master-sections/commit-atomic-planning.d.ts +1 -1
- package/dist/features/builtin-skills/skills/git-master-sections/commit-context-analysis.d.ts +1 -1
- package/dist/features/builtin-skills/skills/git-master-sections/commit-execution-verification.d.ts +1 -1
- package/dist/features/builtin-skills/skills/git-master-sections/commit-workflow.d.ts +1 -1
- package/dist/features/builtin-skills/skills/git-master-sections/history-search-workflow.d.ts +1 -1
- package/dist/features/builtin-skills/skills/git-master-sections/overview.d.ts +1 -1
- package/dist/features/builtin-skills/skills/git-master-sections/quick-reference.d.ts +1 -1
- package/dist/features/builtin-skills/skills/git-master-sections/rebase-workflow.d.ts +1 -1
- package/dist/features/builtin-skills/skills/git-master-skill-metadata.d.ts +1 -2
- package/dist/features/builtin-skills/skills/git-master.d.ts +1 -2
- package/dist/features/builtin-skills/skills/index.d.ts +1 -13
- package/dist/features/builtin-skills/skills/init-deep.d.ts +1 -2
- package/dist/features/builtin-skills/skills/playwright-cli.d.ts +1 -10
- package/dist/features/builtin-skills/skills/playwright-mcp-skill.d.ts +1 -2
- package/dist/features/builtin-skills/skills/playwright.d.ts +1 -2
- package/dist/features/builtin-skills/skills/remove-ai-slops.d.ts +1 -2
- package/dist/features/builtin-skills/skills/review-work.d.ts +1 -2
- package/dist/features/builtin-skills/skills/security-research.d.ts +1 -2
- package/dist/features/builtin-skills/skills/security-review.d.ts +1 -2
- package/dist/features/builtin-skills/skills/team-mode.d.ts +1 -2
- package/dist/features/builtin-skills/skills/visual-qa.d.ts +1 -2
- package/dist/features/builtin-skills/skills.d.ts +1 -12
- package/dist/features/builtin-skills/types.d.ts +1 -15
- package/dist/features/claude-code-agent-loader/agent-definitions-loader.d.ts +1 -3
- package/dist/features/claude-code-agent-loader/claude-model-mapper.d.ts +1 -4
- package/dist/features/claude-code-agent-loader/index.d.ts +1 -5
- package/dist/features/claude-code-agent-loader/json-agent-loader.d.ts +1 -2
- package/dist/features/claude-code-agent-loader/loader.d.ts +1 -5
- package/dist/features/claude-code-agent-loader/opencode-config-agents-reader.d.ts +1 -2
- package/dist/features/claude-code-agent-loader/types.d.ts +1 -29
- package/dist/features/claude-code-command-loader/index.d.ts +1 -2
- package/dist/features/claude-code-command-loader/loader-cache.d.ts +1 -6
- package/dist/features/claude-code-command-loader/loader.d.ts +1 -8
- package/dist/features/claude-code-command-loader/types.d.ts +1 -42
- package/dist/features/claude-code-mcp-loader/configure-allowed-env-vars.d.ts +1 -5
- package/dist/features/claude-code-mcp-loader/index.d.ts +1 -11
- package/dist/features/claude-code-mcp-loader/loader.d.ts +1 -4
- package/dist/features/claude-code-mcp-loader/scope-filter.d.ts +1 -2
- package/dist/features/claude-code-mcp-loader/transformer.d.ts +1 -2
- package/dist/features/claude-code-mcp-loader/types.d.ts +1 -43
- package/dist/features/claude-code-plugin-loader/agent-loader.d.ts +1 -3
- package/dist/features/claude-code-plugin-loader/command-loader.d.ts +1 -3
- package/dist/features/claude-code-plugin-loader/discovery-core.d.ts +1 -2
- package/dist/features/claude-code-plugin-loader/discovery-paths.d.ts +1 -3
- package/dist/features/claude-code-plugin-loader/discovery.d.ts +1 -3
- package/dist/features/claude-code-plugin-loader/hook-loader.d.ts +1 -2
- package/dist/features/claude-code-plugin-loader/index.d.ts +1 -10
- package/dist/features/claude-code-plugin-loader/install-path-resolver.d.ts +1 -1
- package/dist/features/claude-code-plugin-loader/installed-plugin-database.d.ts +1 -3
- package/dist/features/claude-code-plugin-loader/loaded-plugin.d.ts +1 -2
- package/dist/features/claude-code-plugin-loader/loader.d.ts +1 -36
- package/dist/features/claude-code-plugin-loader/mcp-server-loader.d.ts +1 -3
- package/dist/features/claude-code-plugin-loader/plugin-key.d.ts +1 -1
- package/dist/features/claude-code-plugin-loader/plugin-manifest.d.ts +1 -4
- package/dist/features/claude-code-plugin-loader/plugin-path-resolver.d.ts +1 -2
- package/dist/features/claude-code-plugin-loader/plugin-settings.d.ts +1 -3
- package/dist/features/claude-code-plugin-loader/scope-filter.d.ts +1 -2
- package/dist/features/claude-code-plugin-loader/skill-loader.d.ts +1 -3
- package/dist/features/claude-code-plugin-loader/types.d.ts +1 -240
- package/dist/features/claude-tasks/types.d.ts +4 -4
- package/dist/features/hook-message-injector/sdk-message-lookup.d.ts +9 -2
- package/dist/features/mcp-oauth/callback-server.d.ts +1 -19
- package/dist/features/mcp-oauth/dcr.d.ts +1 -34
- package/dist/features/mcp-oauth/discovery.d.ts +1 -8
- package/dist/features/mcp-oauth/oauth-authorization-flow.d.ts +1 -26
- package/dist/features/mcp-oauth/provider.d.ts +1 -30
- package/dist/features/mcp-oauth/refresh-mutex.d.ts +1 -26
- package/dist/features/mcp-oauth/resource-indicator.d.ts +1 -0
- package/dist/features/mcp-oauth/schema.d.ts +1 -0
- package/dist/features/mcp-oauth/step-up.d.ts +1 -8
- package/dist/features/mcp-oauth/storage.d.ts +1 -17
- package/dist/features/monitor/batcher.d.ts +36 -0
- package/dist/features/monitor/envelope.d.ts +9 -0
- package/dist/features/monitor/filter.d.ts +10 -0
- package/dist/features/monitor/index.d.ts +2 -0
- package/dist/features/monitor/line-stream.d.ts +29 -0
- package/dist/features/monitor/manager-internals.d.ts +65 -0
- package/dist/features/monitor/manager.d.ts +35 -0
- package/dist/features/monitor/monitor-state-factory.d.ts +24 -0
- package/dist/features/monitor/output-injector-session-inspect.d.ts +9 -0
- package/dist/features/monitor/output-injector-types.d.ts +48 -0
- package/dist/features/monitor/output-injector.d.ts +21 -0
- package/dist/features/monitor/permission.d.ts +33 -0
- package/dist/features/monitor/pipeline.d.ts +26 -0
- package/dist/features/monitor/process.d.ts +21 -0
- package/dist/features/monitor/ring-buffer.d.ts +25 -0
- package/dist/features/monitor/types.d.ts +83 -0
- package/dist/features/opencode-runtime-skills/index.d.ts +1 -2
- package/dist/features/opencode-runtime-skills/runtime-skill-config.d.ts +1 -17
- package/dist/features/opencode-runtime-skills/skill-markdown.d.ts +1 -7
- package/dist/features/opencode-runtime-skills/source-server.d.ts +1 -24
- package/dist/features/opencode-skill-loader/allowed-tools-parser.d.ts +1 -1
- package/dist/features/opencode-skill-loader/config-source-discovery.d.ts +1 -7
- package/dist/features/opencode-skill-loader/git-master-template-injection.d.ts +1 -20
- package/dist/features/opencode-skill-loader/index.d.ts +1 -16
- package/dist/features/opencode-skill-loader/loaded-skill-from-path.d.ts +1 -9
- package/dist/features/opencode-skill-loader/loaded-skill-template-extractor.d.ts +1 -2
- package/dist/features/opencode-skill-loader/loader.d.ts +1 -21
- package/dist/features/opencode-skill-loader/merger/builtin-skill-converter.d.ts +1 -3
- package/dist/features/opencode-skill-loader/merger/config-skill-entry-loader.d.ts +1 -3
- package/dist/features/opencode-skill-loader/merger/scope-priority.d.ts +1 -2
- package/dist/features/opencode-skill-loader/merger/skill-definition-merger.d.ts +1 -3
- package/dist/features/opencode-skill-loader/merger/skills-config-normalizer.d.ts +1 -11
- package/dist/features/opencode-skill-loader/merger.d.ts +1 -7
- package/dist/features/opencode-skill-loader/opencode-config-skills-reader.d.ts +1 -5
- package/dist/features/opencode-skill-loader/skill-content.d.ts +1 -5
- package/dist/features/opencode-skill-loader/skill-deduplication.d.ts +1 -2
- package/dist/features/opencode-skill-loader/skill-definition-record.d.ts +1 -5
- package/dist/features/opencode-skill-loader/skill-directory-loader.d.ts +1 -8
- package/dist/features/opencode-skill-loader/skill-discovery.d.ts +1 -4
- package/dist/features/opencode-skill-loader/skill-mcp-config.d.ts +1 -3
- package/dist/features/opencode-skill-loader/skill-resolution-options.d.ts +1 -9
- package/dist/features/opencode-skill-loader/skill-template-resolver.d.ts +1 -11
- package/dist/features/opencode-skill-loader/types.d.ts +1 -34
- package/dist/features/skill-mcp-manager/cleanup.d.ts +1 -8
- package/dist/features/skill-mcp-manager/connection-type.d.ts +1 -7
- package/dist/features/skill-mcp-manager/connection.d.ts +1 -14
- package/dist/features/skill-mcp-manager/env-cleaner.d.ts +1 -2
- package/dist/features/skill-mcp-manager/error-redaction.d.ts +1 -10
- package/dist/features/skill-mcp-manager/http-client.d.ts +1 -19
- package/dist/features/skill-mcp-manager/index.d.ts +1 -2
- package/dist/features/skill-mcp-manager/manager.d.ts +1 -27
- package/dist/features/skill-mcp-manager/oauth-handler.d.ts +1 -17
- package/dist/features/skill-mcp-manager/stdio-client.d.ts +1 -16
- package/dist/features/skill-mcp-manager/types.d.ts +1 -79
- package/dist/features/team-mode/member-parser.d.ts +1 -16
- package/dist/features/team-mode/team-layout-tmux/close-team-member-pane.d.ts +1 -4
- package/dist/features/team-mode/team-layout-tmux/index.d.ts +1 -1
- package/dist/features/team-mode/team-layout-tmux/layout.d.ts +1 -37
- package/dist/features/team-mode/team-layout-tmux/rebalance-team-window.d.ts +1 -9
- package/dist/features/team-mode/team-layout-tmux/resolve-caller-tmux-session.d.ts +1 -9
- package/dist/features/team-mode/team-layout-tmux/sweep-stale-team-sessions.d.ts +1 -8
- package/dist/features/team-mode/team-mailbox/ack.d.ts +1 -2
- package/dist/features/team-mode/team-mailbox/inbox.d.ts +1 -3
- package/dist/features/team-mode/team-mailbox/index.d.ts +1 -7
- package/dist/features/team-mode/team-mailbox/pending-delivery-recovery.d.ts +1 -31
- package/dist/features/team-mode/team-mailbox/poll.d.ts +1 -10
- package/dist/features/team-mode/team-mailbox/reservation.d.ts +1 -11
- package/dist/features/team-mode/team-mailbox/send.d.ts +1 -30
- package/dist/features/team-mode/team-registry/index.d.ts +1 -3
- package/dist/features/team-mode/team-registry/loader.d.ts +1 -12
- package/dist/features/team-mode/team-registry/paths.d.ts +1 -28
- package/dist/features/team-mode/team-registry/team-spec-input-normalizer.d.ts +1 -6
- package/dist/features/team-mode/team-registry/validator.d.ts +1 -10
- package/dist/features/team-mode/team-runtime/shutdown-helpers.d.ts +1 -1
- package/dist/features/team-mode/team-state-store/active-resume.d.ts +1 -5
- package/dist/features/team-mode/team-state-store/creating-resume.d.ts +1 -4
- package/dist/features/team-mode/team-state-store/deleting-resume.d.ts +1 -4
- package/dist/features/team-mode/team-state-store/error-normalization.d.ts +1 -2
- package/dist/features/team-mode/team-state-store/index.d.ts +1 -1
- package/dist/features/team-mode/team-state-store/locks.d.ts +1 -15
- package/dist/features/team-mode/team-state-store/reservation-reconciliation.d.ts +1 -4
- package/dist/features/team-mode/team-state-store/resume-report.d.ts +1 -7
- package/dist/features/team-mode/team-state-store/resume.d.ts +1 -5
- package/dist/features/team-mode/team-state-store/runtime-cleanup.d.ts +1 -4
- package/dist/features/team-mode/team-state-store/session-liveness.d.ts +1 -9
- package/dist/features/team-mode/team-state-store/store.d.ts +1 -21
- package/dist/features/team-mode/team-state-store/worker-resume-status.d.ts +1 -9
- package/dist/features/team-mode/team-tasklist/claim.d.ts +1 -10
- package/dist/features/team-mode/team-tasklist/dependencies.d.ts +1 -2
- package/dist/features/team-mode/team-tasklist/get.d.ts +1 -3
- package/dist/features/team-mode/team-tasklist/index.d.ts +1 -6
- package/dist/features/team-mode/team-tasklist/list.d.ts +1 -8
- package/dist/features/team-mode/team-tasklist/store.d.ts +1 -3
- package/dist/features/team-mode/team-tasklist/test-support.d.ts +1 -9
- package/dist/features/team-mode/team-tasklist/update.d.ts +1 -9
- package/dist/features/team-mode/team-worktree/cleanup.d.ts +1 -3
- package/dist/features/team-mode/team-worktree/index.d.ts +1 -2
- package/dist/features/team-mode/team-worktree/manager.d.ts +1 -15
- package/dist/features/team-mode/tools/lifecycle-create-tool.d.ts +2 -2
- package/dist/features/team-mode/tools/lifecycle-inline-spec.d.ts +2 -2
- package/dist/features/team-mode/tools/lifecycle-participant.d.ts +2 -2
- package/dist/features/team-mode/tools/lifecycle-test-fixture.d.ts +8 -8
- package/dist/features/team-mode/tools/messaging-live-delivery-recipient.d.ts +2 -2
- package/dist/features/team-mode/tools/messaging-live-delivery-reservation.d.ts +1 -1
- package/dist/features/team-mode/tools/messaging-live-delivery-state.d.ts +1 -1
- package/dist/features/team-mode/tools/messaging-live-delivery.d.ts +1 -1
- package/dist/features/team-mode/tools/messaging-runtime.d.ts +2 -2
- package/dist/features/team-mode/tools/query.d.ts +3 -3
- package/dist/features/team-mode/tools/tasks.d.ts +2 -2
- package/dist/features/team-mode/types.d.ts +1 -343
- package/dist/features/tui-sidebar/compute-view.d.ts +10 -0
- package/dist/features/tui-sidebar/config-validator.d.ts +2 -0
- package/dist/features/tui-sidebar/constants.d.ts +10 -0
- package/dist/features/tui-sidebar/derivers.d.ts +10 -0
- package/dist/features/tui-sidebar/element-helpers.d.ts +9 -0
- package/dist/features/tui-sidebar/loop-reader.d.ts +2 -0
- package/dist/features/tui-sidebar/mirror-io.d.ts +3 -0
- package/dist/features/tui-sidebar/mirror-manager.d.ts +28 -0
- package/dist/features/tui-sidebar/mirror-path.d.ts +3 -0
- package/dist/features/tui-sidebar/render-view.d.ts +15 -0
- package/dist/features/tui-sidebar/roster-resolver.d.ts +2 -0
- package/dist/features/tui-sidebar/snapshot-builder.d.ts +28 -0
- package/dist/features/tui-sidebar/snapshot-schema.d.ts +41 -0
- package/dist/features/tui-sidebar/state-types.d.ts +72 -0
- package/dist/hooks/ast-grep-sg-provision/hook.d.ts +19 -0
- package/dist/hooks/ast-grep-sg-provision/index.d.ts +1 -0
- package/dist/hooks/auto-slash-command/constants.d.ts +1 -5
- package/dist/hooks/auto-slash-command/detector.d.ts +1 -15
- package/dist/hooks/auto-slash-command/processed-command-store.d.ts +1 -7
- package/dist/hooks/auto-slash-command/types.d.ts +1 -48
- package/dist/hooks/auto-update-checker/constants.d.ts +3 -3
- package/dist/hooks/codegraph-bootstrap/command-runner.d.ts +16 -0
- package/dist/hooks/codegraph-bootstrap/hook.d.ts +34 -0
- package/dist/hooks/codegraph-bootstrap/index.d.ts +1 -0
- package/dist/hooks/codegraph-bootstrap/project-root.d.ts +1 -0
- package/dist/hooks/codegraph-bootstrap/status.d.ts +11 -0
- package/dist/hooks/delegate-task-retry/guidance.d.ts +1 -2
- package/dist/hooks/delegate-task-retry/patterns.d.ts +2 -11
- package/dist/hooks/index.d.ts +3 -0
- package/dist/hooks/monitor-status-injector/hook.d.ts +30 -0
- package/dist/hooks/monitor-status-injector/index.d.ts +2 -0
- package/dist/hooks/runtime-fallback/auto-retry-signal.d.ts +1 -4
- package/dist/hooks/runtime-fallback/error-classifier.d.ts +7 -6
- package/dist/hooks/runtime-fallback/fallback-state.d.ts +3 -2
- package/dist/hooks/runtime-fallback/test-timeout-clock.test-support.d.ts +6 -0
- package/dist/hooks/tool-pair-validator/tool-part-ids.d.ts +2 -1
- package/dist/index.js +89513 -95172
- package/dist/interactive-bash-availability.d.ts +1 -0
- package/dist/mcp/codegraph.d.ts +16 -0
- package/dist/mcp/index.d.ts +10 -2
- package/dist/mcp/shared/ancestor-cli-resolver.d.ts +25 -0
- package/dist/mcp/types.d.ts +1 -1
- package/dist/oh-my-opencode.schema.json +139 -16
- package/dist/openclaw/config.d.ts +1 -8
- package/dist/openclaw/daemon.d.ts +1 -1
- package/dist/openclaw/dispatcher.d.ts +1 -12
- package/dist/openclaw/gateway-url-validation.d.ts +1 -1
- package/dist/openclaw/index.d.ts +1 -5
- package/dist/openclaw/reply-listener-discord.d.ts +1 -4
- package/dist/openclaw/reply-listener-injection.d.ts +1 -10
- package/dist/openclaw/reply-listener-log.d.ts +1 -2
- package/dist/openclaw/reply-listener-paths.d.ts +1 -7
- package/dist/openclaw/reply-listener-poll-loop.d.ts +1 -3
- package/dist/openclaw/reply-listener-process.d.ts +1 -4
- package/dist/openclaw/reply-listener-signature.d.ts +1 -2
- package/dist/openclaw/reply-listener-sleep.d.ts +1 -1
- package/dist/openclaw/reply-listener-spawn.d.ts +1 -5
- package/dist/openclaw/reply-listener-start.d.ts +1 -9
- package/dist/openclaw/reply-listener-startup.d.ts +1 -12
- package/dist/openclaw/reply-listener-state.d.ts +1 -29
- package/dist/openclaw/reply-listener-status.d.ts +1 -4
- package/dist/openclaw/reply-listener-stop.d.ts +1 -7
- package/dist/openclaw/reply-listener-telegram.d.ts +1 -4
- package/dist/openclaw/reply-listener.d.ts +1 -5
- package/dist/openclaw/runtime-dispatch.d.ts +1 -17
- package/dist/openclaw/session-registry-lock.d.ts +1 -2
- package/dist/openclaw/session-registry-paths.d.ts +1 -9
- package/dist/openclaw/session-registry-storage.d.ts +1 -4
- package/dist/openclaw/session-registry-types.d.ts +1 -11
- package/dist/openclaw/session-registry.d.ts +1 -8
- package/dist/openclaw/tmux.d.ts +1 -8
- package/dist/openclaw/types.d.ts +1 -42
- package/dist/plugin/event-error-utils.d.ts +2 -1
- package/dist/plugin/hooks/create-core-hooks.d.ts +5 -0
- package/dist/plugin/hooks/create-session-hooks.d.ts +3 -1
- package/dist/plugin/hooks/create-transform-hooks.d.ts +4 -1
- package/dist/plugin/messages-transform.d.ts +1 -0
- package/dist/plugin/skill-context.d.ts +2 -0
- package/dist/plugin/tool-registry-factories.d.ts +2 -1
- package/dist/plugin/tool-registry-gated-tools.d.ts +7 -0
- package/dist/plugin/tool-registry.d.ts +1 -1
- package/dist/plugin/types.d.ts +2 -9
- package/dist/plugin-handlers/prometheus-agent-config-builder.d.ts +1 -0
- package/dist/shared/archive-entry-validator.d.ts +1 -6
- package/dist/shared/bun-file-shim.d.ts +1 -8
- package/dist/shared/bun-spawn-shim.d.ts +1 -43
- package/dist/shared/bun-which-shim.d.ts +1 -1
- package/dist/shared/classify-path-environment.d.ts +1 -3
- package/dist/shared/command-executor/embedded-commands.d.ts +1 -7
- package/dist/shared/command-executor/execute-command.d.ts +1 -1
- package/dist/shared/command-executor/execute-hook-command.d.ts +1 -23
- package/dist/shared/command-executor/home-directory.d.ts +1 -1
- package/dist/shared/command-executor/resolve-commands-in-text.d.ts +1 -1
- package/dist/shared/command-executor/shell-path.d.ts +1 -2
- package/dist/shared/command-executor.d.ts +1 -4
- package/dist/shared/git-worktree/collect-git-diff-stats.d.ts +1 -2
- package/dist/shared/git-worktree/format-file-changes.d.ts +1 -2
- package/dist/shared/git-worktree/index.d.ts +1 -7
- package/dist/shared/git-worktree/parse-diff-numstat.d.ts +1 -2
- package/dist/shared/git-worktree/parse-status-porcelain-line.d.ts +1 -6
- package/dist/shared/git-worktree/parse-status-porcelain.d.ts +1 -2
- package/dist/shared/git-worktree/types.d.ts +1 -7
- package/dist/shared/internal-initiator-marker.d.ts +1 -46
- package/dist/shared/logger.d.ts +3 -11
- package/dist/shared/migration/agent-category.d.ts +1 -19
- package/dist/shared/migration/agent-names.d.ts +1 -6
- package/dist/shared/migration/config-migration.d.ts +1 -1
- package/dist/shared/migration/hook-names.d.ts +1 -6
- package/dist/shared/migration/migrations-sidecar.d.ts +1 -41
- package/dist/shared/migration/model-versions.d.ts +1 -22
- package/dist/shared/migration.d.ts +1 -5
- package/dist/shared/model-suggestion-retry.d.ts +39 -17
- package/dist/shared/plugin-identity.d.ts +8 -8
- package/dist/shared/posthog.d.ts +3 -0
- package/dist/shared/process-stream-reader.d.ts +1 -3
- package/dist/shared/prompt-async-gate/message-inspection-error.d.ts +1 -1
- package/dist/shared/prompt-async-gate/pending-tool-turn.d.ts +1 -11
- package/dist/shared/prompt-async-gate/prompt-message-state.d.ts +1 -9
- package/dist/shared/prompt-async-gate/queue.d.ts +1 -8
- package/dist/shared/prompt-async-gate/recent-dispatches.d.ts +1 -14
- package/dist/shared/prompt-async-gate/reservations.d.ts +1 -9
- package/dist/shared/prompt-async-gate/semantic-dedupe.d.ts +1 -7
- package/dist/shared/prompt-async-gate/session-idle-dispatch.d.ts +1 -16
- package/dist/shared/prompt-async-gate/timing.d.ts +1 -9
- package/dist/shared/prompt-async-gate/types.d.ts +1 -123
- package/dist/shared/prompt-async-gate.d.ts +3 -7
- package/dist/shared/prompt-failure-classifier.d.ts +1 -9
- package/dist/shared/session-idle-settle.d.ts +1 -12
- package/dist/shared/shell-env.d.ts +1 -1
- package/dist/shared/skill-path-resolver.d.ts +1 -1
- package/dist/shared/tmux/cmux-detect.d.ts +1 -8
- package/dist/shared/tmux/constants.d.ts +1 -5
- package/dist/shared/tmux/runner.d.ts +2 -13
- package/dist/shared/tmux/tmux-utils/adapter-deps.d.ts +9 -0
- package/dist/shared/tmux/tmux-utils/environment.d.ts +2 -4
- package/dist/shared/tmux/tmux-utils/layout.d.ts +4 -17
- package/dist/shared/tmux/tmux-utils/pane-close.d.ts +3 -10
- package/dist/shared/tmux/tmux-utils/pane-command.d.ts +1 -2
- package/dist/shared/tmux/tmux-utils/pane-dimensions.d.ts +2 -4
- package/dist/shared/tmux/tmux-utils/pane-replace.d.ts +1 -11
- package/dist/shared/tmux/tmux-utils/pane-spawn.d.ts +1 -13
- package/dist/shared/tmux/tmux-utils/server-health.d.ts +2 -15
- package/dist/shared/tmux/tmux-utils/session-spawn.d.ts +3 -14
- package/dist/shared/tmux/tmux-utils/spawn-process.d.ts +1 -1
- package/dist/shared/tmux/tmux-utils/stale-session-sweep.d.ts +4 -17
- package/dist/shared/tmux/tmux-utils/window-spawn.d.ts +1 -13
- package/dist/shared/tmux/types.d.ts +1 -4
- package/dist/shared/write-file-atomically.d.ts +2 -0
- package/dist/shared/zip-entry-listing/powershell-zip-entry-listing.d.ts +1 -4
- package/dist/shared/zip-entry-listing/python-zip-entry-listing.d.ts +1 -3
- package/dist/shared/zip-entry-listing/read-zip-symlink-target.d.ts +1 -1
- package/dist/shared/zip-entry-listing/tar-zip-entry-listing.d.ts +1 -3
- package/dist/shared/zip-entry-listing/zipinfo-zip-entry-listing.d.ts +1 -4
- package/dist/shared/zip-entry-listing.d.ts +1 -4
- package/dist/skills/ast-grep/LICENSE +21 -0
- package/dist/skills/ast-grep/README.md +136 -0
- package/dist/skills/ast-grep/SKILL.md +272 -0
- package/dist/skills/ast-grep/SOURCE +1 -0
- package/dist/skills/ast-grep/install.ps1 +235 -0
- package/dist/skills/ast-grep/install.sh +286 -0
- package/dist/skills/ast-grep/references/cli.md +231 -0
- package/dist/skills/ast-grep/references/install.md +166 -0
- package/dist/skills/ast-grep/references/patterns.md +147 -0
- package/dist/skills/ast-grep/references/pitfalls.md +303 -0
- package/dist/skills/ast-grep/references/recipes.md +402 -0
- package/dist/skills/ast-grep/references/sgconfig.md +248 -0
- package/dist/skills/ast-grep/references/yaml-rules.md +509 -0
- package/dist/skills/ast-grep/scripts/ast_grep_helper.py +748 -0
- package/dist/skills/ast-grep/tests/smoke.ps1 +123 -0
- package/dist/skills/ast-grep/tests/smoke.sh +212 -0
- package/dist/skills/debugging/SKILL.md +116 -0
- package/dist/skills/debugging/references/methodology/00-setup.md +108 -0
- package/dist/skills/debugging/references/methodology/02-investigate.md +130 -0
- package/dist/skills/debugging/references/methodology/04-oracle-triple.md +136 -0
- package/dist/skills/debugging/references/methodology/05-escalate.md +69 -0
- package/dist/skills/debugging/references/methodology/06-fix.md +116 -0
- package/dist/skills/debugging/references/methodology/08-qa.md +94 -0
- package/dist/skills/debugging/references/methodology/09-cleanup.md +164 -0
- package/dist/skills/debugging/references/methodology/partial-runtime-evidence.md +229 -0
- package/dist/skills/debugging/references/runtimes/bundled-js-binary.md +415 -0
- package/dist/skills/debugging/references/runtimes/go.md +252 -0
- package/dist/skills/debugging/references/runtimes/native-binary.md +484 -0
- package/dist/skills/debugging/references/runtimes/node.md +260 -0
- package/dist/skills/debugging/references/runtimes/python.md +248 -0
- package/dist/skills/debugging/references/runtimes/rust.md +234 -0
- package/dist/skills/debugging/references/tools/ghidra.md +212 -0
- package/dist/skills/debugging/references/tools/playwright-cli.md +194 -0
- package/dist/skills/debugging/references/tools/pwndbg.md +263 -0
- package/dist/skills/debugging/references/tools/pwntools.md +265 -0
- package/dist/skills/frontend/ATTRIBUTION.md +127 -0
- package/dist/skills/frontend/LICENSE-Apache-2.0.txt +201 -0
- package/dist/skills/frontend/SKILL.md +113 -0
- package/dist/skills/frontend/references/design/README.md +240 -0
- package/dist/skills/frontend/references/design/_INDEX.md +189 -0
- package/dist/skills/frontend/references/design/airbnb.md +390 -0
- package/dist/skills/frontend/references/design/airtable.md +89 -0
- package/dist/skills/frontend/references/design/apple.md +247 -0
- package/dist/skills/frontend/references/design/binance.md +345 -0
- package/dist/skills/frontend/references/design/bmw.md +180 -0
- package/dist/skills/frontend/references/design/brutalist-skill.md +92 -0
- package/dist/skills/frontend/references/design/bugatti.md +268 -0
- package/dist/skills/frontend/references/design/cal.md +259 -0
- package/dist/skills/frontend/references/design/claude.md +312 -0
- package/dist/skills/frontend/references/design/clay.md +304 -0
- package/dist/skills/frontend/references/design/clickhouse.md +281 -0
- package/dist/skills/frontend/references/design/cohere.md +266 -0
- package/dist/skills/frontend/references/design/coinbase.md +129 -0
- package/dist/skills/frontend/references/design/composio.md +307 -0
- package/dist/skills/frontend/references/design/cursor.md +309 -0
- package/dist/skills/frontend/references/design/design-system-architecture.md +217 -0
- package/dist/skills/frontend/references/design/elevenlabs.md +265 -0
- package/dist/skills/frontend/references/design/expo.md +281 -0
- package/dist/skills/frontend/references/design/ferrari.md +314 -0
- package/dist/skills/frontend/references/design/figma.md +220 -0
- package/dist/skills/frontend/references/design/framer.md +246 -0
- package/dist/skills/frontend/references/design/gpt-tasteskill.md +74 -0
- package/dist/skills/frontend/references/design/hashicorp.md +278 -0
- package/dist/skills/frontend/references/design/ibm.md +332 -0
- package/dist/skills/frontend/references/design/image-to-code-skill.md +1228 -0
- package/dist/skills/frontend/references/design/imagegen-brandkit.md +798 -0
- package/dist/skills/frontend/references/design/imagegen-frontend-mobile.md +1465 -0
- package/dist/skills/frontend/references/design/imagegen-frontend-web.md +686 -0
- package/dist/skills/frontend/references/design/intercom.md +146 -0
- package/dist/skills/frontend/references/design/kraken.md +125 -0
- package/dist/skills/frontend/references/design/lamborghini.md +288 -0
- package/dist/skills/frontend/references/design/linear.app.md +367 -0
- package/dist/skills/frontend/references/design/lovable.md +298 -0
- package/dist/skills/frontend/references/design/mastercard.md +365 -0
- package/dist/skills/frontend/references/design/meta.md +366 -0
- package/dist/skills/frontend/references/design/minimalist-skill.md +85 -0
- package/dist/skills/frontend/references/design/minimax.md +257 -0
- package/dist/skills/frontend/references/design/mintlify.md +326 -0
- package/dist/skills/frontend/references/design/miro.md +108 -0
- package/dist/skills/frontend/references/design/mistral.ai.md +261 -0
- package/dist/skills/frontend/references/design/mongodb.md +266 -0
- package/dist/skills/frontend/references/design/nike.md +363 -0
- package/dist/skills/frontend/references/design/notion.md +309 -0
- package/dist/skills/frontend/references/design/nvidia.md +293 -0
- package/dist/skills/frontend/references/design/ollama.md +267 -0
- package/dist/skills/frontend/references/design/opencode.ai.md +281 -0
- package/dist/skills/frontend/references/design/output-skill.md +49 -0
- package/dist/skills/frontend/references/design/pinterest.md +230 -0
- package/dist/skills/frontend/references/design/playstation.md +364 -0
- package/dist/skills/frontend/references/design/posthog.md +256 -0
- package/dist/skills/frontend/references/design/raycast.md +268 -0
- package/dist/skills/frontend/references/design/react-dev-tooling-skill.md +230 -0
- package/dist/skills/frontend/references/design/redesign-skill.md +178 -0
- package/dist/skills/frontend/references/design/renault.md +311 -0
- package/dist/skills/frontend/references/design/replicate.md +261 -0
- package/dist/skills/frontend/references/design/resend.md +303 -0
- package/dist/skills/frontend/references/design/revolut.md +185 -0
- package/dist/skills/frontend/references/design/runwayml.md +244 -0
- package/dist/skills/frontend/references/design/sanity.md +357 -0
- package/dist/skills/frontend/references/design/sentry.md +262 -0
- package/dist/skills/frontend/references/design/shopify.md +350 -0
- package/dist/skills/frontend/references/design/soft-skill.md +98 -0
- package/dist/skills/frontend/references/design/spacex.md +194 -0
- package/dist/skills/frontend/references/design/spotify.md +246 -0
- package/dist/skills/frontend/references/design/starbucks.md +580 -0
- package/dist/skills/frontend/references/design/stitch-skill.md +184 -0
- package/dist/skills/frontend/references/design/stripe.md +322 -0
- package/dist/skills/frontend/references/design/supabase.md +255 -0
- package/dist/skills/frontend/references/design/superhuman.md +252 -0
- package/dist/skills/frontend/references/design/taste-skill.md +226 -0
- package/dist/skills/frontend/references/design/tesla.md +286 -0
- package/dist/skills/frontend/references/design/theverge.md +339 -0
- package/dist/skills/frontend/references/design/together.ai.md +263 -0
- package/dist/skills/frontend/references/design/uber.md +295 -0
- package/dist/skills/frontend/references/design/vercel.md +310 -0
- package/dist/skills/frontend/references/design/vodafone.md +423 -0
- package/dist/skills/frontend/references/design/voltagent.md +323 -0
- package/dist/skills/frontend/references/design/warp.md +253 -0
- package/dist/skills/frontend/references/design/webflow.md +92 -0
- package/dist/skills/frontend/references/design/wired.md +278 -0
- package/dist/skills/frontend/references/design/wise.md +173 -0
- package/dist/skills/frontend/references/design/x.ai.md +257 -0
- package/dist/skills/frontend/references/design/zapier.md +328 -0
- package/dist/skills/frontend/references/perfection/README.md +160 -0
- package/dist/skills/frontend/references/perfection/react-perf-tooling.md +127 -0
- package/dist/skills/frontend/references/ui-ux-db/README.md +273 -0
- package/dist/skills/frontend/references/ui-ux-db/data/charts.csv +26 -0
- package/dist/skills/frontend/references/ui-ux-db/data/colors.csv +97 -0
- package/dist/skills/frontend/references/ui-ux-db/data/icons.csv +101 -0
- package/dist/skills/frontend/references/ui-ux-db/data/landing.csv +31 -0
- package/dist/skills/frontend/references/ui-ux-db/data/products.csv +97 -0
- package/dist/skills/frontend/references/ui-ux-db/data/react-performance.csv +45 -0
- package/dist/skills/frontend/references/ui-ux-db/data/stacks/astro.csv +54 -0
- package/dist/skills/frontend/references/ui-ux-db/data/stacks/flutter.csv +53 -0
- package/dist/skills/frontend/references/ui-ux-db/data/stacks/html-tailwind.csv +56 -0
- package/dist/skills/frontend/references/ui-ux-db/data/stacks/jetpack-compose.csv +53 -0
- package/dist/skills/frontend/references/ui-ux-db/data/stacks/nextjs.csv +53 -0
- package/dist/skills/frontend/references/ui-ux-db/data/stacks/nuxt-ui.csv +51 -0
- package/dist/skills/frontend/references/ui-ux-db/data/stacks/nuxtjs.csv +59 -0
- package/dist/skills/frontend/references/ui-ux-db/data/stacks/react-native.csv +52 -0
- package/dist/skills/frontend/references/ui-ux-db/data/stacks/react.csv +54 -0
- package/dist/skills/frontend/references/ui-ux-db/data/stacks/shadcn.csv +61 -0
- package/dist/skills/frontend/references/ui-ux-db/data/stacks/svelte.csv +54 -0
- package/dist/skills/frontend/references/ui-ux-db/data/stacks/swiftui.csv +51 -0
- package/dist/skills/frontend/references/ui-ux-db/data/stacks/vue.csv +50 -0
- package/dist/skills/frontend/references/ui-ux-db/data/styles.csv +68 -0
- package/dist/skills/frontend/references/ui-ux-db/data/typography.csv +58 -0
- package/dist/skills/frontend/references/ui-ux-db/data/ui-reasoning.csv +101 -0
- package/dist/skills/frontend/references/ui-ux-db/data/ux-guidelines.csv +100 -0
- package/dist/skills/frontend/references/ui-ux-db/data/web-interface.csv +31 -0
- package/dist/skills/frontend/references/ui-ux-db/scripts/core.py +253 -0
- package/dist/skills/frontend/references/ui-ux-db/scripts/design_system.py +1067 -0
- package/dist/skills/frontend/references/ui-ux-db/scripts/search.py +114 -0
- package/dist/skills/frontend/scripts/perfection/lighthouse-audit.py +201 -0
- package/dist/skills/git-master/SKILL.md +100 -0
- package/dist/skills/git-master/agents/openai.yaml +13 -0
- package/dist/skills/init-deep/SKILL.md +309 -0
- package/dist/skills/lcx-contribute-bug-fix/SKILL.md +242 -0
- package/dist/skills/lcx-contribute-bug-fix/agents/openai.yaml +12 -0
- package/dist/skills/lcx-contribute-bug-fix/scripts/create-pr-body.mjs +107 -0
- package/dist/skills/lcx-doctor/SKILL.md +93 -0
- package/dist/skills/lcx-doctor/agents/openai.yaml +11 -0
- package/dist/skills/lcx-report-bug/SKILL.md +237 -0
- package/dist/skills/lcx-report-bug/agents/openai.yaml +11 -0
- package/dist/skills/lsp-setup/SKILL.md +139 -0
- package/dist/skills/lsp-setup/references/bash/README.md +60 -0
- package/dist/skills/lsp-setup/references/c-cpp/README.md +61 -0
- package/dist/skills/lsp-setup/references/csharp/README.md +71 -0
- package/dist/skills/lsp-setup/references/dart/README.md +48 -0
- package/dist/skills/lsp-setup/references/elixir/README.md +51 -0
- package/dist/skills/lsp-setup/references/go/README.md +57 -0
- package/dist/skills/lsp-setup/references/haskell/README.md +57 -0
- package/dist/skills/lsp-setup/references/java/README.md +57 -0
- package/dist/skills/lsp-setup/references/julia/README.md +60 -0
- package/dist/skills/lsp-setup/references/kotlin/README.md +59 -0
- package/dist/skills/lsp-setup/references/lua/README.md +66 -0
- package/dist/skills/lsp-setup/references/php/README.md +62 -0
- package/dist/skills/lsp-setup/references/python/README.md +71 -0
- package/dist/skills/lsp-setup/references/ruby/README.md +53 -0
- package/dist/skills/lsp-setup/references/rust/README.md +59 -0
- package/dist/skills/lsp-setup/references/swift/README.md +51 -0
- package/dist/skills/lsp-setup/references/terraform/README.md +62 -0
- package/dist/skills/lsp-setup/references/typescript/README.md +77 -0
- package/dist/skills/lsp-setup/references/yaml/README.md +70 -0
- package/dist/skills/lsp-setup/references/zig/README.md +49 -0
- package/dist/skills/lsp-setup/scripts/detect-lsp.ts +210 -0
- package/dist/skills/lsp-setup/scripts/lsp-server-table.ts +177 -0
- package/dist/skills/lsp-setup/scripts/tsconfig.json +17 -0
- package/dist/skills/lsp-setup/scripts/verify-lsp.ts +147 -0
- package/dist/skills/programming/SKILL.md +463 -0
- package/dist/skills/programming/references/go/README.md +90 -0
- package/dist/skills/programming/references/go/backend-stack.md +641 -0
- package/dist/skills/programming/references/go/bootstrap.md +328 -0
- package/dist/skills/programming/references/go/bubbletea-v2.md +360 -0
- package/dist/skills/programming/references/go/cobra-stack.md +468 -0
- package/dist/skills/programming/references/go/concurrency.md +362 -0
- package/dist/skills/programming/references/go/data-modeling.md +329 -0
- package/dist/skills/programming/references/go/error-handling.md +359 -0
- package/dist/skills/programming/references/go/golangci-strict.md +236 -0
- package/dist/skills/programming/references/go/grpc-connect.md +375 -0
- package/dist/skills/programming/references/go/libraries.md +337 -0
- package/dist/skills/programming/references/go/one-liners.md +202 -0
- package/dist/skills/programming/references/go/sqlc-pgx.md +471 -0
- package/dist/skills/programming/references/go/testing.md +467 -0
- package/dist/skills/programming/references/go/type-patterns.md +298 -0
- package/dist/skills/programming/references/python/README.md +314 -0
- package/dist/skills/programming/references/python/async-anyio.md +442 -0
- package/dist/skills/programming/references/python/data-modeling.md +233 -0
- package/dist/skills/programming/references/python/data-processing.md +133 -0
- package/dist/skills/programming/references/python/error-handling.md +218 -0
- package/dist/skills/programming/references/python/fastapi-stack.md +316 -0
- package/dist/skills/programming/references/python/httpx2-optimization.md +360 -0
- package/dist/skills/programming/references/python/libraries.md +307 -0
- package/dist/skills/programming/references/python/one-liners.md +268 -0
- package/dist/skills/programming/references/python/orjson-stack.md +378 -0
- package/dist/skills/programming/references/python/pydantic-ai.md +285 -0
- package/dist/skills/programming/references/python/pyproject-strict.md +232 -0
- package/dist/skills/programming/references/python/textual-tui.md +201 -0
- package/dist/skills/programming/references/python/type-patterns.md +176 -0
- package/dist/skills/programming/references/rust/README.md +317 -0
- package/dist/skills/programming/references/rust/async-tokio.md +299 -0
- package/dist/skills/programming/references/rust/axum-stack.md +467 -0
- package/dist/skills/programming/references/rust/cargo-strict.md +317 -0
- package/dist/skills/programming/references/rust/clap-stack.md +409 -0
- package/dist/skills/programming/references/rust/concurrency.md +375 -0
- package/dist/skills/programming/references/rust/libraries.md +439 -0
- package/dist/skills/programming/references/rust/one-liners.md +291 -0
- package/dist/skills/programming/references/rust/proptest-insta.md +429 -0
- package/dist/skills/programming/references/rust/type-state.md +354 -0
- package/dist/skills/programming/references/rust/unsafe-discipline.md +250 -0
- package/dist/skills/programming/references/rust/zero-cost-safety.md +527 -0
- package/dist/skills/programming/references/rust-ub/README.md +289 -0
- package/dist/skills/programming/references/rust-ub/miri-sanitizers-loom.md +411 -0
- package/dist/skills/programming/references/rust-ub/ub-taxonomy.md +269 -0
- package/dist/skills/programming/references/typescript/README.md +195 -0
- package/dist/skills/programming/references/typescript/backend-hono.md +672 -0
- package/dist/skills/programming/references/typescript/bootstrap.md +199 -0
- package/dist/skills/programming/references/typescript/data-modeling.md +202 -0
- package/dist/skills/programming/references/typescript/error-handling.md +169 -0
- package/dist/skills/programming/references/typescript/tsconfig-strict.md +152 -0
- package/dist/skills/programming/references/typescript/type-patterns.md +196 -0
- package/dist/skills/programming/scripts/go/check-no-excuse-rules.sh +173 -0
- package/dist/skills/programming/scripts/go/new-project.py +138 -0
- package/dist/skills/programming/scripts/go/templates/.editorconfig +13 -0
- package/dist/skills/programming/scripts/go/templates/.golangci.yml +95 -0
- package/dist/skills/programming/scripts/go/templates/AGENTS.md.tmpl +24 -0
- package/dist/skills/programming/scripts/go/templates/README.md.tmpl +12 -0
- package/dist/skills/programming/scripts/go/templates/Taskfile.yml +40 -0
- package/dist/skills/programming/scripts/go/templates/ci.yml +37 -0
- package/dist/skills/programming/scripts/go/templates/config.go +24 -0
- package/dist/skills/programming/scripts/go/templates/gitignore +15 -0
- package/dist/skills/programming/scripts/go/templates/main.go.tmpl +22 -0
- package/dist/skills/programming/scripts/go/templates/run.go +15 -0
- package/dist/skills/programming/scripts/python/check-no-excuse-rules.py +687 -0
- package/dist/skills/programming/scripts/python/new-project.py +172 -0
- package/dist/skills/programming/scripts/python/new-script.py +116 -0
- package/dist/skills/programming/scripts/rust/check-no-excuse-rules.py +296 -0
- package/dist/skills/programming/scripts/rust/check-no-excuse-rules.sh +158 -0
- package/dist/skills/programming/scripts/rust/new-project.py +175 -0
- package/dist/skills/programming/scripts/typescript/check-no-excuse-rules.ts +282 -0
- package/dist/skills/programming/scripts/typescript/new-project.ts +177 -0
- package/dist/skills/refactor/SKILL.md +754 -0
- package/dist/skills/remove-ai-slops/SKILL.md +317 -0
- package/dist/skills/review-work/SKILL.md +594 -0
- package/dist/skills/start-work/SKILL.md +178 -0
- package/dist/skills/ultraresearch/SKILL.md +230 -0
- package/dist/skills/ulw-plan/SKILL.md +69 -0
- package/dist/skills/ulw-plan/agents/openai.yaml +7 -0
- package/dist/skills/ulw-plan/references/full-workflow.md +99 -0
- package/dist/skills/ulw-plan/references/intent-clear.md +44 -0
- package/dist/skills/ulw-plan/references/intent-unclear.md +44 -0
- package/dist/skills/ulw-plan/scripts/scaffold-plan.mjs +301 -0
- package/dist/skills/visual-qa/SKILL.md +235 -0
- package/dist/skills/visual-qa/references/agent-browser-setup.md +44 -0
- package/dist/skills/visual-qa/scripts/ansi.test.ts +45 -0
- package/dist/skills/visual-qa/scripts/ansi.ts +17 -0
- package/dist/skills/visual-qa/scripts/cli.test.ts +73 -0
- package/dist/skills/visual-qa/scripts/cli.ts +82 -0
- package/dist/skills/visual-qa/scripts/east-asian-width.test.ts +60 -0
- package/dist/skills/visual-qa/scripts/east-asian-width.ts +72 -0
- package/dist/skills/visual-qa/scripts/image-diff.test.ts +70 -0
- package/dist/skills/visual-qa/scripts/image-diff.ts +109 -0
- package/dist/skills/visual-qa/scripts/png-crc.ts +27 -0
- package/dist/skills/visual-qa/scripts/png-decode.test.ts +44 -0
- package/dist/skills/visual-qa/scripts/png-decode.ts +206 -0
- package/dist/skills/visual-qa/scripts/png-synth.ts +57 -0
- package/dist/skills/visual-qa/scripts/skill-prompt-contract.test.ts +127 -0
- package/dist/skills/visual-qa/scripts/tui-grid.test.ts +57 -0
- package/dist/skills/visual-qa/scripts/tui-grid.ts +88 -0
- package/dist/skills/visual-qa/scripts/types.ts +54 -0
- package/dist/tools/delegate-task/background-task-description.d.ts +2 -0
- package/dist/tools/delegate-task/constants.d.ts +13 -1
- package/dist/tools/delegate-task/model-selection.d.ts +3 -17
- package/dist/tools/delegate-task/model-string-parser.d.ts +1 -9
- package/dist/tools/delegate-task/sync-result-fetcher.d.ts +1 -0
- package/dist/tools/delegate-task/sync-session-poller.d.ts +1 -0
- package/dist/tools/delegate-task/types.d.ts +59 -2
- package/dist/tools/index.d.ts +1 -0
- package/dist/tools/monitor/create-monitor-tools.d.ts +4 -0
- package/dist/tools/monitor/index.d.ts +1 -0
- package/dist/tools/monitor/monitor-list.d.ts +7 -0
- package/dist/tools/monitor/monitor-output.d.ts +3 -0
- package/dist/tools/monitor/monitor-start.d.ts +9 -0
- package/dist/tools/monitor/monitor-stop.d.ts +16 -0
- package/dist/tools/skill/native-skills.d.ts +2 -2
- package/dist/tools/skill/scope-priority.d.ts +1 -4
- package/dist/tools/skill/skill-matcher.d.ts +1 -5
- package/dist/tools/task/types.d.ts +10 -10
- package/dist/tui.d.ts +4 -0
- package/dist/tui.js +69330 -0
- package/package.json +57 -36
- package/packages/git-bash-mcp/dist/cli.js +225 -55
- package/packages/lsp-core/package.json +41 -0
- package/packages/lsp-core/src/index.ts +28 -0
- package/packages/lsp-core/src/lsp/cleanup-errors.ts +5 -0
- package/packages/lsp-core/src/lsp/client-wrapper.ts +173 -0
- package/packages/lsp-core/src/lsp/client.ts +172 -0
- package/packages/lsp-core/src/lsp/config-loader.ts +266 -0
- package/packages/lsp-core/src/lsp/connection.ts +73 -0
- package/packages/lsp-core/src/lsp/constants.ts +11 -0
- package/packages/lsp-core/src/lsp/directory-diagnostics.ts +154 -0
- package/packages/lsp-core/src/lsp/effective-extension.ts +10 -0
- package/packages/lsp-core/src/lsp/errors.ts +63 -0
- package/packages/lsp-core/src/lsp/formatters.ts +141 -0
- package/packages/lsp-core/src/lsp/infer-extension.ts +66 -0
- package/packages/lsp-core/src/lsp/json-rpc-connection.ts +296 -0
- package/packages/lsp-core/src/lsp/language-mappings.ts +173 -0
- package/packages/lsp-core/src/lsp/manager.ts +369 -0
- package/packages/lsp-core/src/lsp/process-signal-cleanup.ts +21 -0
- package/packages/lsp-core/src/lsp/process.ts +202 -0
- package/packages/lsp-core/src/lsp/server-definitions.ts +176 -0
- package/packages/lsp-core/src/lsp/server-install-state.ts +70 -0
- package/packages/lsp-core/src/lsp/server-installation.ts +45 -0
- package/packages/lsp-core/src/lsp/server-resolution.ts +104 -0
- package/packages/lsp-core/src/lsp/startup-failure.ts +1 -0
- package/packages/lsp-core/src/lsp/transport.ts +299 -0
- package/packages/lsp-core/src/lsp/types.ts +126 -0
- package/packages/lsp-core/src/lsp/utils.test.ts +72 -0
- package/packages/lsp-core/src/lsp/utils.ts +40 -0
- package/packages/lsp-core/src/lsp/workspace-edit.ts +206 -0
- package/packages/lsp-core/src/mcp-protocol-pin.test.ts +68 -0
- package/packages/lsp-core/src/mcp.ts +95 -0
- package/packages/lsp-core/src/missing-dependency-result.ts +19 -0
- package/packages/lsp-core/src/request-context.ts +22 -0
- package/packages/lsp-core/src/tool-surface.test.ts +157 -0
- package/packages/lsp-core/src/tools/definitions.ts +141 -0
- package/packages/lsp-core/src/tools/diagnostics.ts +97 -0
- package/packages/lsp-core/src/tools/index.ts +10 -0
- package/packages/lsp-core/src/tools/install-decision.ts +39 -0
- package/packages/lsp-core/src/tools/navigation.ts +86 -0
- package/packages/lsp-core/src/tools/parameters.ts +49 -0
- package/packages/lsp-core/src/tools/rename.ts +72 -0
- package/packages/lsp-core/src/tools/result.ts +5 -0
- package/packages/lsp-core/src/tools/runtime.ts +21 -0
- package/packages/lsp-core/src/tools/schema.ts +9 -0
- package/packages/lsp-core/src/tools/status.ts +28 -0
- package/packages/lsp-core/src/tools/symbols.ts +99 -0
- package/packages/lsp-core/src/tools/types.ts +104 -0
- package/packages/lsp-core/src/tools.ts +1 -0
- package/packages/lsp-daemon/dist/cli.js +712 -527
- package/packages/lsp-daemon/dist/daemon-client.d.ts +1 -1
- package/packages/lsp-daemon/dist/daemon-server.js +1 -1
- package/packages/lsp-daemon/dist/index.d.ts +1 -1
- package/packages/lsp-daemon/dist/index.js +687 -500
- package/packages/lsp-daemon/dist/proxy.d.ts +3 -2
- package/packages/lsp-daemon/dist/proxy.js +16 -40
- package/packages/lsp-daemon/dist/request-routing.d.ts +2 -2
- package/packages/lsp-daemon/dist/request-routing.js +2 -2
- package/packages/lsp-daemon/package.json +2 -1
- package/packages/lsp-tools-mcp/dist/cli.js +3348 -15
- package/packages/lsp-tools-mcp/dist/lsp/cleanup-errors.d.ts +1 -1
- package/packages/lsp-tools-mcp/dist/lsp/client-wrapper.d.ts +1 -13
- package/packages/lsp-tools-mcp/dist/lsp/client.d.ts +1 -20
- package/packages/lsp-tools-mcp/dist/lsp/config-loader.d.ts +1 -16
- package/packages/lsp-tools-mcp/dist/lsp/connection.d.ts +1 -4
- package/packages/lsp-tools-mcp/dist/lsp/constants.d.ts +1 -10
- package/packages/lsp-tools-mcp/dist/lsp/directory-diagnostics.d.ts +1 -3
- package/packages/lsp-tools-mcp/dist/lsp/effective-extension.d.ts +1 -1
- package/packages/lsp-tools-mcp/dist/lsp/errors.d.ts +1 -35
- package/packages/lsp-tools-mcp/dist/lsp/formatters.d.ts +1 -12
- package/packages/lsp-tools-mcp/dist/lsp/infer-extension.d.ts +1 -1
- package/packages/lsp-tools-mcp/dist/lsp/json-rpc-connection.d.ts +1 -36
- package/packages/lsp-tools-mcp/dist/lsp/language-mappings.d.ts +1 -4
- package/packages/lsp-tools-mcp/dist/lsp/manager.d.ts +1 -46
- package/packages/lsp-tools-mcp/dist/lsp/manager.js +1390 -265
- package/packages/lsp-tools-mcp/dist/lsp/process-signal-cleanup.d.ts +1 -1
- package/packages/lsp-tools-mcp/dist/lsp/process.d.ts +1 -25
- package/packages/lsp-tools-mcp/dist/lsp/server-definitions.d.ts +1 -4
- package/packages/lsp-tools-mcp/dist/lsp/server-install-state.d.ts +1 -12
- package/packages/lsp-tools-mcp/dist/lsp/server-installation.d.ts +1 -1
- package/packages/lsp-tools-mcp/dist/lsp/server-resolution.d.ts +1 -11
- package/packages/lsp-tools-mcp/dist/lsp/startup-failure.d.ts +1 -3
- package/packages/lsp-tools-mcp/dist/lsp/transport.d.ts +1 -35
- package/packages/lsp-tools-mcp/dist/lsp/types.d.ts +1 -124
- package/packages/lsp-tools-mcp/dist/lsp/utils.d.ts +1 -0
- package/packages/lsp-tools-mcp/dist/lsp/workspace-edit.d.ts +1 -11
- package/packages/lsp-tools-mcp/dist/mcp.d.ts +1 -30
- package/packages/lsp-tools-mcp/dist/mcp.js +3312 -70
- package/packages/lsp-tools-mcp/dist/missing-dependency-result.d.ts +1 -2
- package/packages/lsp-tools-mcp/dist/request-context.d.ts +1 -7
- package/packages/lsp-tools-mcp/dist/request-context.js +16 -10
- package/packages/lsp-tools-mcp/dist/tools.d.ts +1 -90
- package/packages/lsp-tools-mcp/dist/tools.js +3028 -439
- package/packages/lsp-tools-mcp/package.json +3 -1
- package/packages/omo-codex/THIRD-PARTY-NOTICES.md +155 -0
- package/packages/omo-codex/plugin/.codex-plugin/plugin.json +1 -1
- package/packages/omo-codex/plugin/.mcp.json +6 -5
- package/packages/omo-codex/plugin/README.md +1 -1
- package/packages/omo-codex/plugin/components/bootstrap/dist/cli.js +1637 -1245
- 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/bootstrap/scripts/generate-manifests.mjs +8 -52
- package/packages/omo-codex/plugin/components/bootstrap/src/provision.ts +35 -143
- package/packages/omo-codex/plugin/components/bootstrap/src/setup.ts +11 -11
- package/packages/omo-codex/plugin/components/bootstrap/test/environment.test.ts +3 -2
- package/packages/omo-codex/plugin/components/bootstrap/test/provision.test.ts +37 -37
- package/packages/omo-codex/plugin/components/codegraph/dist/cli.js +2205 -0
- package/packages/omo-codex/plugin/components/codegraph/dist/serve.d.ts +32 -0
- package/packages/omo-codex/plugin/components/codegraph/dist/serve.js +1603 -0
- package/packages/omo-codex/plugin/components/codegraph/package.json +27 -0
- package/packages/omo-codex/plugin/components/codegraph/src/cli.ts +55 -0
- package/packages/omo-codex/plugin/components/codegraph/src/hook-types.ts +83 -0
- package/packages/omo-codex/plugin/components/codegraph/src/hook.ts +108 -0
- package/packages/omo-codex/plugin/components/codegraph/src/serve.ts +191 -0
- package/packages/omo-codex/plugin/components/codegraph/src/session-start-worker.ts +213 -0
- package/packages/omo-codex/plugin/components/codegraph/test/hook.test.ts +563 -0
- package/packages/omo-codex/plugin/components/codegraph/test/serve.test.ts +401 -0
- package/packages/omo-codex/plugin/components/codegraph/tsconfig.build.json +13 -0
- package/packages/omo-codex/plugin/components/codegraph/tsconfig.json +25 -0
- package/packages/omo-codex/plugin/components/comment-checker/dist/cli.js +610 -7
- package/packages/omo-codex/plugin/components/comment-checker/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/comment-checker/package.json +4 -3
- package/packages/omo-codex/plugin/components/comment-checker/src/apply-patch.ts +28 -156
- package/packages/omo-codex/plugin/components/comment-checker/src/core-values.ts +1 -1
- package/packages/omo-codex/plugin/components/comment-checker/src/core.ts +2 -2
- package/packages/omo-codex/plugin/components/comment-checker/src/request-extractor.ts +1 -1
- package/packages/omo-codex/plugin/components/comment-checker/src/runner.ts +6 -2
- package/packages/omo-codex/plugin/components/comment-checker/test/core.test.ts +38 -35
- package/packages/omo-codex/plugin/components/comment-checker/test/fixtures/apply-patch-mixed-requests.ts +60 -0
- package/packages/omo-codex/plugin/components/git-bash/dist/cli.js +155 -26
- package/packages/omo-codex/plugin/components/git-bash/hooks/hooks.json +2 -2
- package/packages/omo-codex/plugin/components/git-bash/package.json +2 -1
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/biome.json +48 -0
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/directive.md +11 -0
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/dist/cli.js +223 -0
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/dist/codex-hook.d.ts +2 -0
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/dist/codex-hook.js +123 -0
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/dist/directive.d.ts +2 -0
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/dist/directive.js +5 -0
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/dist/index.d.ts +4 -0
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/dist/index.js +3 -0
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/dist/state.d.ts +9 -0
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/dist/state.js +45 -0
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/dist/types.d.ts +39 -0
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/dist/types.js +1 -0
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/hooks/hooks.json +17 -0
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/package.json +44 -0
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/src/cli.ts +56 -0
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/src/codex-hook.ts +129 -0
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/src/directive.ts +13 -0
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/src/index.ts +4 -0
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/src/state.ts +62 -0
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/src/types.ts +38 -0
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/test/cli.test.ts +124 -0
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/test/codex-hook.test.ts +346 -0
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/tsconfig.build.json +12 -0
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/tsconfig.json +27 -0
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/vitest.config.ts +10 -0
- package/packages/omo-codex/plugin/components/lsp/dist/cli.js +3738 -28
- 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/bundled-rules/hephaestus.md +1 -1
- package/packages/omo-codex/plugin/components/rules/dist/cli.js +4565 -89
- package/packages/omo-codex/plugin/components/rules/hooks/hooks.json +4 -4
- package/packages/omo-codex/plugin/components/rules/package.json +4 -3
- package/packages/omo-codex/plugin/components/rules/src/cli.ts +16 -3
- package/packages/omo-codex/plugin/components/rules/src/config.ts +3 -3
- package/packages/omo-codex/plugin/components/rules/src/dynamic-target-fingerprints.ts +6 -6
- package/packages/omo-codex/plugin/components/rules/src/event-budget.ts +1 -1
- package/packages/omo-codex/plugin/components/rules/src/persistent-cache.ts +1 -1
- package/packages/omo-codex/plugin/components/rules/src/post-compact-budget.ts +1 -1
- package/packages/omo-codex/plugin/components/rules/src/rules-engine-factory.ts +9 -4
- package/packages/omo-codex/plugin/components/rules/src/static-injection.ts +3 -3
- package/packages/omo-codex/plugin/components/rules/src/transcript-rule-filter.ts +1 -1
- package/packages/omo-codex/plugin/components/rules/test/bundled-rules-priority.test.ts +4 -4
- package/packages/omo-codex/plugin/components/rules/test/bundled-rules.test.ts +1 -1
- package/packages/omo-codex/plugin/components/rules/test/dynamic-target-fingerprints.test.ts +1 -1
- package/packages/omo-codex/plugin/components/rules/test/engine.test.ts +3 -3
- package/packages/omo-codex/plugin/components/rules/test/finder.test.ts +2 -2
- package/packages/omo-codex/plugin/components/rules/test/formatter.test.ts +2 -2
- package/packages/omo-codex/plugin/components/rules/test/matcher.test.ts +2 -2
- package/packages/omo-codex/plugin/components/rules/test/parser.test.ts +1 -1
- package/packages/omo-codex/plugin/components/rules/test/post-compact-budget.test.ts +1 -1
- package/packages/omo-codex/plugin/components/rules/test/rules-engine-consumption.test.ts +92 -0
- package/packages/omo-codex/plugin/components/rules/test/scanner.test.ts +1 -1
- package/packages/omo-codex/plugin/components/rules/test/sources.test.ts +4 -4
- package/packages/omo-codex/plugin/components/rules/test/windows-git-bash-bundled-rule.test.ts +1 -1
- package/packages/omo-codex/plugin/components/start-work-continuation/dist/cli.js +394 -37
- package/packages/omo-codex/plugin/components/start-work-continuation/hooks/hooks.json +2 -2
- package/packages/omo-codex/plugin/components/start-work-continuation/package.json +4 -3
- package/packages/omo-codex/plugin/components/start-work-continuation/src/boulder-reader.ts +20 -147
- package/packages/omo-codex/plugin/components/start-work-continuation/src/codex-hook.ts +1 -1
- package/packages/omo-codex/plugin/components/start-work-continuation/src/index.ts +1 -1
- package/packages/omo-codex/plugin/components/start-work-continuation/test/boulder-reader.test.ts +151 -27
- package/packages/omo-codex/plugin/components/start-work-continuation/test/codex-hook.test.ts +87 -49
- package/packages/omo-codex/plugin/components/telemetry/LICENSE +21 -0
- package/packages/omo-codex/plugin/components/telemetry/NOTICE +6 -0
- package/packages/omo-codex/plugin/components/telemetry/dist/cli.js +5869 -42
- package/packages/omo-codex/plugin/components/telemetry/dist/posthog.js +5783 -108
- package/packages/omo-codex/plugin/components/telemetry/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/telemetry/package.json +4 -5
- package/packages/omo-codex/plugin/components/telemetry/src/codex-hook.ts +3 -3
- package/packages/omo-codex/plugin/components/telemetry/src/posthog.ts +92 -142
- package/packages/omo-codex/plugin/components/telemetry/src/product-identity.ts +59 -3
- package/packages/omo-codex/plugin/components/telemetry/test/codex-hook-diagnostics.test.ts +3 -3
- package/packages/omo-codex/plugin/components/telemetry/test/diagnostics.test.ts +13 -7
- package/packages/omo-codex/plugin/components/ultrawork/AGENTS.md +2 -2
- package/packages/omo-codex/plugin/components/ultrawork/README.md +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/agents/explorer.toml +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/agents/lazycodex-clone-fidelity-reviewer.toml +31 -0
- package/packages/omo-codex/plugin/components/ultrawork/agents/lazycodex-code-reviewer.toml +29 -0
- package/packages/omo-codex/plugin/components/ultrawork/agents/lazycodex-executor.toml +24 -0
- package/packages/omo-codex/plugin/components/ultrawork/agents/lazycodex-gate-reviewer.toml +23 -0
- package/packages/omo-codex/plugin/components/ultrawork/agents/lazycodex-qa-executor.toml +22 -0
- package/packages/omo-codex/plugin/components/ultrawork/agents/librarian.toml +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/agents/plan.toml +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/directive.md +104 -156
- package/packages/omo-codex/plugin/components/ultrawork/dist/cli.js +162 -37
- package/packages/omo-codex/plugin/components/ultrawork/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/package.json +4 -3
- package/packages/omo-codex/plugin/components/ultrawork/scripts/sync-directive.mjs +11 -0
- package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/SKILL.md +47 -20
- package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/references/full-workflow.md +55 -88
- package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/references/intent-clear.md +44 -0
- package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/references/intent-unclear.md +44 -0
- package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/scripts/scaffold-plan.mjs +301 -0
- package/packages/omo-codex/plugin/components/ultrawork/src/codex-hook.ts +2 -2
- package/packages/omo-codex/plugin/components/ultrawork/test/codex-hook-test-helpers.ts +101 -0
- package/packages/omo-codex/plugin/components/ultrawork/test/codex-hook-trigger-policy.test.ts +111 -0
- package/packages/omo-codex/plugin/components/ultrawork/test/codex-hook.test.ts +24 -128
- package/packages/omo-codex/plugin/components/ultrawork/test/directive-source.test.ts +16 -0
- package/packages/omo-codex/plugin/components/ultrawork/test/package-smoke.test.ts +4 -2
- package/packages/omo-codex/plugin/components/ulw-loop/dist/checkpoint-reconciliation.d.ts +5 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/checkpoint-reconciliation.js +79 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/checkpoint.d.ts +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/dist/checkpoint.js +56 -82
- package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-commands.js +38 -144
- package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-subcommands.d.ts +10 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-subcommands.js +173 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/cli.js +2419 -32
- package/packages/omo-codex/plugin/components/ulw-loop/dist/codex-goal-instruction.js +13 -9
- package/packages/omo-codex/plugin/components/ulw-loop/dist/domain-types.d.ts +60 -12
- package/packages/omo-codex/plugin/components/ulw-loop/dist/evidence.d.ts +3 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/evidence.js +67 -10
- package/packages/omo-codex/plugin/components/ulw-loop/dist/goal-status.d.ts +3 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/goal-status.js +14 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/plan-crud.d.ts +2 -6
- package/packages/omo-codex/plugin/components/ulw-loop/dist/plan-crud.js +49 -39
- package/packages/omo-codex/plugin/components/ulw-loop/dist/plan-goal-factory.d.ts +8 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/plan-goal-factory.js +109 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/quality-gate-blockers.d.ts +5 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/quality-gate-blockers.js +41 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/quality-gate-fields.d.ts +8 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/quality-gate-fields.js +39 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/quality-gate.d.ts +13 -6
- package/packages/omo-codex/plugin/components/ulw-loop/dist/quality-gate.js +176 -105
- package/packages/omo-codex/plugin/components/ulw-loop/hooks/hooks.json +2 -2
- 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 -17
- package/packages/omo-codex/plugin/components/ulw-loop/src/checkpoint-reconciliation.ts +100 -0
- package/packages/omo-codex/plugin/components/ulw-loop/src/checkpoint.ts +162 -85
- package/packages/omo-codex/plugin/components/ulw-loop/src/cli-commands.ts +62 -136
- package/packages/omo-codex/plugin/components/ulw-loop/src/cli-subcommands.ts +250 -0
- package/packages/omo-codex/plugin/components/ulw-loop/src/codex-goal-instruction.ts +18 -9
- package/packages/omo-codex/plugin/components/ulw-loop/src/domain-types.ts +67 -4
- package/packages/omo-codex/plugin/components/ulw-loop/src/evidence.ts +124 -18
- package/packages/omo-codex/plugin/components/ulw-loop/src/goal-status.ts +16 -0
- package/packages/omo-codex/plugin/components/ulw-loop/src/plan-crud.ts +131 -54
- package/packages/omo-codex/plugin/components/ulw-loop/src/plan-goal-factory.ts +124 -0
- package/packages/omo-codex/plugin/components/ulw-loop/src/quality-gate-blockers.ts +48 -0
- package/packages/omo-codex/plugin/components/ulw-loop/src/quality-gate-fields.ts +44 -0
- package/packages/omo-codex/plugin/components/ulw-loop/src/quality-gate.ts +230 -138
- package/packages/omo-codex/plugin/components/ulw-loop/test/checkpoint-final.test.ts +186 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/checkpoint-status.test.ts +85 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/checkpoint.test.ts +120 -192
- package/packages/omo-codex/plugin/components/ulw-loop/test/cli-checkpoint.test.ts +215 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/cli-commands.test.ts +1 -195
- package/packages/omo-codex/plugin/components/ulw-loop/test/cli-complete-goals.test.ts +15 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/cli-create-goals.test.ts +172 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/cli-helpers.test.ts +0 -6
- package/packages/omo-codex/plugin/components/ulw-loop/test/codex-goal-instruction.test.ts +39 -8
- package/packages/omo-codex/plugin/components/ulw-loop/test/evidence-criteria-gate.test.ts +29 -1
- package/packages/omo-codex/plugin/components/ulw-loop/test/fixtures/artifacts/browser-screenshot.txt +1 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/fixtures/artifacts/cli-pass.txt +1 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/fixtures/artifacts/code-review.md +1 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/fixtures/artifacts/data-diff.txt +5 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/fixtures/artifacts/gate-review.md +1 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/fixtures/artifacts/http-dump.txt +4 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/fixtures/artifacts/rejection.txt +1 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/fixtures/checkpoint-builders.ts +98 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/fixtures/quality-gate-builder.ts +91 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/fixtures/sample-quality-gate.json +110 -8
- package/packages/omo-codex/plugin/components/ulw-loop/test/goal-status.test.ts +35 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/plan-crud.test.ts +11 -1
- package/packages/omo-codex/plugin/components/ulw-loop/test/quality-gate-blockers.test.ts +102 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/quality-gate-doc.test.ts +38 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/quality-gate-roles.test.ts +131 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/quality-gate.test.ts +150 -176
- package/packages/omo-codex/plugin/components/ulw-loop/test/skill-contract.test.ts +12 -0
- package/packages/omo-codex/plugin/hooks/hooks.json +38 -17
- package/packages/omo-codex/plugin/package-lock.json +144 -49
- package/packages/omo-codex/plugin/package.json +4 -2
- package/packages/omo-codex/plugin/scripts/auto-update.mjs +2 -0
- package/packages/omo-codex/plugin/scripts/build-bundled-mcp-runtimes.mjs +0 -5
- package/packages/omo-codex/plugin/scripts/build-components.mjs +29 -5
- package/packages/omo-codex/plugin/scripts/hook-status-message.mjs +2 -0
- package/packages/omo-codex/plugin/scripts/migrate-omo-sot/editor.mjs +125 -0
- package/packages/omo-codex/plugin/scripts/migrate-omo-sot/jsonc.mjs +43 -0
- package/packages/omo-codex/plugin/scripts/migrate-omo-sot/scaffold.mjs +29 -0
- package/packages/omo-codex/plugin/scripts/migrate-omo-sot.mjs +121 -0
- package/packages/omo-codex/plugin/scripts/sync-skills.mjs +5 -5
- package/packages/omo-codex/plugin/shared/package.json +24 -0
- package/packages/omo-codex/plugin/shared/src/config-loader.ts +28 -0
- package/packages/omo-codex/plugin/shared/test/config-loader.test.ts +105 -0
- package/packages/omo-codex/plugin/shared/tsconfig.build.json +9 -0
- package/packages/omo-codex/plugin/shared/tsconfig.json +16 -0
- package/packages/omo-codex/plugin/skills/ast-grep/LICENSE +21 -0
- package/packages/omo-codex/plugin/skills/ast-grep/README.md +136 -0
- package/packages/omo-codex/plugin/skills/ast-grep/SKILL.md +272 -0
- package/packages/omo-codex/plugin/skills/ast-grep/SOURCE +1 -0
- package/packages/omo-codex/plugin/skills/ast-grep/install.ps1 +235 -0
- package/packages/omo-codex/plugin/skills/ast-grep/install.sh +286 -0
- package/packages/omo-codex/plugin/skills/ast-grep/references/cli.md +231 -0
- package/packages/omo-codex/plugin/skills/ast-grep/references/install.md +166 -0
- package/packages/omo-codex/plugin/skills/ast-grep/references/patterns.md +147 -0
- package/packages/omo-codex/plugin/skills/ast-grep/references/pitfalls.md +303 -0
- package/packages/omo-codex/plugin/skills/ast-grep/references/recipes.md +402 -0
- package/packages/omo-codex/plugin/skills/ast-grep/references/sgconfig.md +248 -0
- package/packages/omo-codex/plugin/skills/ast-grep/references/yaml-rules.md +509 -0
- package/packages/omo-codex/plugin/skills/ast-grep/scripts/ast_grep_helper.py +748 -0
- package/packages/omo-codex/plugin/skills/ast-grep/tests/smoke.ps1 +123 -0
- package/packages/omo-codex/plugin/skills/ast-grep/tests/smoke.sh +212 -0
- package/packages/omo-codex/plugin/skills/frontend/ATTRIBUTION.md +127 -0
- package/packages/omo-codex/plugin/skills/frontend/LICENSE-Apache-2.0.txt +201 -0
- package/packages/omo-codex/plugin/skills/frontend/SKILL.md +113 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/README.md +240 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/_INDEX.md +189 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/airbnb.md +390 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/airtable.md +89 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/apple.md +247 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/binance.md +345 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/bmw.md +180 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/brutalist-skill.md +92 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/bugatti.md +268 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/cal.md +259 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/claude.md +312 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/clay.md +304 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/clickhouse.md +281 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/cohere.md +266 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/coinbase.md +129 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/composio.md +307 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/cursor.md +309 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/design-system-architecture.md +217 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/elevenlabs.md +265 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/expo.md +281 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/ferrari.md +314 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/figma.md +220 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/framer.md +246 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/gpt-tasteskill.md +74 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/hashicorp.md +278 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/ibm.md +332 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/image-to-code-skill.md +1228 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/imagegen-brandkit.md +798 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/imagegen-frontend-mobile.md +1465 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/imagegen-frontend-web.md +686 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/intercom.md +146 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/kraken.md +125 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/lamborghini.md +288 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/linear.app.md +367 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/lovable.md +298 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/mastercard.md +365 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/meta.md +366 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/minimalist-skill.md +85 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/minimax.md +257 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/mintlify.md +326 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/miro.md +108 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/mistral.ai.md +261 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/mongodb.md +266 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/nike.md +363 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/notion.md +309 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/nvidia.md +293 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/ollama.md +267 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/opencode.ai.md +281 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/output-skill.md +49 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/pinterest.md +230 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/playstation.md +364 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/posthog.md +256 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/raycast.md +268 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/react-dev-tooling-skill.md +230 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/redesign-skill.md +178 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/renault.md +311 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/replicate.md +261 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/resend.md +303 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/revolut.md +185 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/runwayml.md +244 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/sanity.md +357 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/sentry.md +262 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/shopify.md +350 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/soft-skill.md +98 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/spacex.md +194 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/spotify.md +246 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/starbucks.md +580 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/stitch-skill.md +184 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/stripe.md +322 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/supabase.md +255 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/superhuman.md +252 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/taste-skill.md +226 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/tesla.md +286 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/theverge.md +339 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/together.ai.md +263 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/uber.md +295 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/vercel.md +310 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/vodafone.md +423 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/voltagent.md +323 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/warp.md +253 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/webflow.md +92 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/wired.md +278 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/wise.md +173 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/x.ai.md +257 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/zapier.md +328 -0
- package/packages/omo-codex/plugin/skills/frontend/references/perfection/README.md +160 -0
- package/packages/omo-codex/plugin/skills/frontend/references/perfection/react-perf-tooling.md +127 -0
- package/packages/omo-codex/plugin/skills/frontend/references/ui-ux-db/README.md +273 -0
- package/packages/omo-codex/plugin/skills/frontend/references/ui-ux-db/data/charts.csv +26 -0
- package/packages/omo-codex/plugin/skills/frontend/references/ui-ux-db/data/colors.csv +97 -0
- package/packages/omo-codex/plugin/skills/frontend/references/ui-ux-db/data/icons.csv +101 -0
- package/packages/omo-codex/plugin/skills/frontend/references/ui-ux-db/data/landing.csv +31 -0
- package/packages/omo-codex/plugin/skills/frontend/references/ui-ux-db/data/products.csv +97 -0
- package/packages/omo-codex/plugin/skills/frontend/references/ui-ux-db/data/react-performance.csv +45 -0
- package/packages/omo-codex/plugin/skills/frontend/references/ui-ux-db/data/stacks/astro.csv +54 -0
- package/packages/omo-codex/plugin/skills/frontend/references/ui-ux-db/data/stacks/flutter.csv +53 -0
- package/packages/omo-codex/plugin/skills/frontend/references/ui-ux-db/data/stacks/html-tailwind.csv +56 -0
- package/packages/omo-codex/plugin/skills/frontend/references/ui-ux-db/data/stacks/jetpack-compose.csv +53 -0
- package/packages/omo-codex/plugin/skills/frontend/references/ui-ux-db/data/stacks/nextjs.csv +53 -0
- package/packages/omo-codex/plugin/skills/frontend/references/ui-ux-db/data/stacks/nuxt-ui.csv +51 -0
- package/packages/omo-codex/plugin/skills/frontend/references/ui-ux-db/data/stacks/nuxtjs.csv +59 -0
- package/packages/omo-codex/plugin/skills/frontend/references/ui-ux-db/data/stacks/react-native.csv +52 -0
- package/packages/omo-codex/plugin/skills/frontend/references/ui-ux-db/data/stacks/react.csv +54 -0
- package/packages/omo-codex/plugin/skills/frontend/references/ui-ux-db/data/stacks/shadcn.csv +61 -0
- package/packages/omo-codex/plugin/skills/frontend/references/ui-ux-db/data/stacks/svelte.csv +54 -0
- package/packages/omo-codex/plugin/skills/frontend/references/ui-ux-db/data/stacks/swiftui.csv +51 -0
- package/packages/omo-codex/plugin/skills/frontend/references/ui-ux-db/data/stacks/vue.csv +50 -0
- package/packages/omo-codex/plugin/skills/frontend/references/ui-ux-db/data/styles.csv +68 -0
- package/packages/omo-codex/plugin/skills/frontend/references/ui-ux-db/data/typography.csv +58 -0
- package/packages/omo-codex/plugin/skills/frontend/references/ui-ux-db/data/ui-reasoning.csv +101 -0
- package/packages/omo-codex/plugin/skills/frontend/references/ui-ux-db/data/ux-guidelines.csv +100 -0
- package/packages/omo-codex/plugin/skills/frontend/references/ui-ux-db/data/web-interface.csv +31 -0
- package/packages/omo-codex/plugin/skills/frontend/references/ui-ux-db/scripts/core.py +253 -0
- package/packages/omo-codex/plugin/skills/frontend/references/ui-ux-db/scripts/design_system.py +1067 -0
- package/packages/omo-codex/plugin/skills/frontend/references/ui-ux-db/scripts/search.py +114 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/perfection/lighthouse-audit.py +201 -0
- package/packages/omo-codex/plugin/skills/init-deep/SKILL.md +3 -3
- package/packages/omo-codex/plugin/skills/refactor/SKILL.md +14 -23
- package/packages/omo-codex/plugin/skills/remove-ai-slops/SKILL.md +2 -2
- package/packages/omo-codex/plugin/skills/review-work/SKILL.md +2 -2
- package/packages/omo-codex/plugin/skills/start-work/SKILL.md +3 -3
- package/packages/omo-codex/plugin/skills/ultraresearch/SKILL.md +2 -2
- package/packages/omo-codex/plugin/skills/ulw-loop/references/full-workflow.md +17 -17
- package/packages/omo-codex/plugin/skills/ulw-plan/SKILL.md +47 -20
- package/packages/omo-codex/plugin/skills/ulw-plan/references/full-workflow.md +55 -88
- package/packages/omo-codex/plugin/skills/ulw-plan/references/intent-clear.md +44 -0
- package/packages/omo-codex/plugin/skills/ulw-plan/references/intent-unclear.md +44 -0
- package/packages/omo-codex/plugin/skills/ulw-plan/scripts/scaffold-plan.mjs +301 -0
- package/packages/omo-codex/plugin/skills/visual-qa/SKILL.md +19 -3
- package/packages/omo-codex/plugin/skills/visual-qa/references/agent-browser-setup.md +44 -0
- package/packages/omo-codex/plugin/test/aggregate-agents.test.mjs +119 -11
- package/packages/omo-codex/plugin/test/aggregate-build.test.mjs +2 -4
- package/packages/omo-codex/plugin/test/aggregate-hooks.test.mjs +29 -2
- package/packages/omo-codex/plugin/test/aggregate-manifest.test.mjs +2 -0
- package/packages/omo-codex/plugin/test/aggregate-mcp.test.mjs +12 -12
- package/packages/omo-codex/plugin/test/auto-update.test.mjs +26 -0
- package/packages/omo-codex/plugin/test/component-bundled-cli.test.mjs +287 -0
- package/packages/omo-codex/plugin/test/component-hook-contract-cases.mjs +199 -0
- package/packages/omo-codex/plugin/test/hook-status-message.test.mjs +38 -2
- package/packages/omo-codex/plugin/test/index.js +13 -0
- package/packages/omo-codex/plugin/test/install-time-build-runtime.test.mjs +4 -5
- package/packages/omo-codex/plugin/test/mcp-research-servers.test.mjs +5 -3
- package/packages/omo-codex/plugin/test/migrate-omo-sot.test.mjs +179 -0
- package/packages/omo-codex/plugin/test/payload-equivalence.test.mjs +109 -0
- package/packages/omo-codex/plugin/test/scaffold-plan.test.mjs +165 -0
- package/packages/omo-codex/plugin/test/sync-skills-orchestration.test.mjs +6 -6
- package/packages/omo-codex/plugin/test/sync-skills-test-support.mjs +2 -3
- package/packages/omo-codex/plugin/test/sync-skills.test.mjs +37 -1
- package/packages/omo-codex/scripts/install-bin-links.test.mjs +3 -3
- package/packages/omo-codex/scripts/install-cache-copy.test.mjs +1 -1
- package/packages/omo-codex/scripts/install-cli-args.test.mjs +1 -1
- package/packages/omo-codex/scripts/install-config-autonomous-features.test.mjs +1 -1
- package/packages/omo-codex/scripts/install-config-autonomous.test.mjs +1 -1
- package/packages/omo-codex/scripts/install-config-git-bash.test.mjs +1 -1
- package/packages/omo-codex/scripts/install-config-preservation.test.mjs +1 -1
- package/packages/omo-codex/scripts/install-config-reasoning.test.mjs +1 -2
- package/packages/omo-codex/scripts/install-config.test.mjs +8 -6
- package/packages/omo-codex/scripts/install-delegated-command.test.mjs +1 -1
- package/packages/omo-codex/scripts/install-dist/install-local.mjs +13377 -0
- package/packages/omo-codex/scripts/install-generated-bundle.test.mjs +55 -0
- package/packages/omo-codex/scripts/install-git-bash-mcp-env.test.mjs +3 -4
- package/packages/omo-codex/scripts/install-hook-targets.test.mjs +1 -1
- package/packages/omo-codex/scripts/install-local.mjs +54 -237
- package/packages/omo-codex/scripts/install-local.test.mjs +8 -1
- package/packages/omo-codex/scripts/install-marketplace-cache.test.mjs +3 -3
- package/packages/omo-codex/scripts/install-mcp-runtime.test.mjs +34 -77
- package/packages/omo-codex/scripts/install-packaged-local.test.mjs +8 -4
- package/packages/omo-codex/scripts/install-project-local-cleanup.test.mjs +1 -1
- package/packages/shared-skills/package.json +6 -1
- package/packages/shared-skills/skills/ast-grep/LICENSE +21 -0
- package/packages/shared-skills/skills/ast-grep/README.md +136 -0
- package/packages/shared-skills/skills/ast-grep/SKILL.md +272 -0
- package/packages/shared-skills/skills/ast-grep/SOURCE +1 -0
- package/packages/shared-skills/skills/ast-grep/install.ps1 +235 -0
- package/packages/shared-skills/skills/ast-grep/install.sh +286 -0
- package/packages/shared-skills/skills/ast-grep/references/cli.md +231 -0
- package/packages/shared-skills/skills/ast-grep/references/install.md +166 -0
- package/packages/shared-skills/skills/ast-grep/references/patterns.md +147 -0
- package/packages/shared-skills/skills/ast-grep/references/pitfalls.md +303 -0
- package/packages/shared-skills/skills/ast-grep/references/recipes.md +402 -0
- package/packages/shared-skills/skills/ast-grep/references/sgconfig.md +248 -0
- package/packages/shared-skills/skills/ast-grep/references/yaml-rules.md +509 -0
- package/packages/shared-skills/skills/ast-grep/scripts/ast_grep_helper.py +748 -0
- package/packages/shared-skills/skills/ast-grep/tests/smoke.ps1 +123 -0
- package/packages/shared-skills/skills/ast-grep/tests/smoke.sh +212 -0
- package/packages/shared-skills/skills/frontend/ATTRIBUTION.md +127 -0
- package/packages/shared-skills/skills/frontend/LICENSE-Apache-2.0.txt +201 -0
- package/packages/shared-skills/skills/frontend/SKILL.md +113 -0
- package/packages/shared-skills/skills/frontend/references/design/README.md +240 -0
- package/packages/shared-skills/skills/frontend/references/design/_INDEX.md +189 -0
- package/packages/shared-skills/skills/frontend/references/design/airbnb.md +390 -0
- package/packages/shared-skills/skills/frontend/references/design/airtable.md +89 -0
- package/packages/shared-skills/skills/frontend/references/design/apple.md +247 -0
- package/packages/shared-skills/skills/frontend/references/design/binance.md +345 -0
- package/packages/shared-skills/skills/frontend/references/design/bmw.md +180 -0
- package/packages/shared-skills/skills/frontend/references/design/brutalist-skill.md +92 -0
- package/packages/shared-skills/skills/frontend/references/design/bugatti.md +268 -0
- package/packages/shared-skills/skills/frontend/references/design/cal.md +259 -0
- package/packages/shared-skills/skills/frontend/references/design/claude.md +312 -0
- package/packages/shared-skills/skills/frontend/references/design/clay.md +304 -0
- package/packages/shared-skills/skills/frontend/references/design/clickhouse.md +281 -0
- package/packages/shared-skills/skills/frontend/references/design/cohere.md +266 -0
- package/packages/shared-skills/skills/frontend/references/design/coinbase.md +129 -0
- package/packages/shared-skills/skills/frontend/references/design/composio.md +307 -0
- package/packages/shared-skills/skills/frontend/references/design/cursor.md +309 -0
- package/packages/shared-skills/skills/frontend/references/design/design-system-architecture.md +217 -0
- package/packages/shared-skills/skills/frontend/references/design/elevenlabs.md +265 -0
- package/packages/shared-skills/skills/frontend/references/design/expo.md +281 -0
- package/packages/shared-skills/skills/frontend/references/design/ferrari.md +314 -0
- package/packages/shared-skills/skills/frontend/references/design/figma.md +220 -0
- package/packages/shared-skills/skills/frontend/references/design/framer.md +246 -0
- package/packages/shared-skills/skills/frontend/references/design/gpt-tasteskill.md +74 -0
- package/packages/shared-skills/skills/frontend/references/design/hashicorp.md +278 -0
- package/packages/shared-skills/skills/frontend/references/design/ibm.md +332 -0
- package/packages/shared-skills/skills/frontend/references/design/image-to-code-skill.md +1228 -0
- package/packages/shared-skills/skills/frontend/references/design/imagegen-brandkit.md +798 -0
- package/packages/shared-skills/skills/frontend/references/design/imagegen-frontend-mobile.md +1465 -0
- package/packages/shared-skills/skills/frontend/references/design/imagegen-frontend-web.md +686 -0
- package/packages/shared-skills/skills/frontend/references/design/intercom.md +146 -0
- package/packages/shared-skills/skills/frontend/references/design/kraken.md +125 -0
- package/packages/shared-skills/skills/frontend/references/design/lamborghini.md +288 -0
- package/packages/shared-skills/skills/frontend/references/design/linear.app.md +367 -0
- package/packages/shared-skills/skills/frontend/references/design/lovable.md +298 -0
- package/packages/shared-skills/skills/frontend/references/design/mastercard.md +365 -0
- package/packages/shared-skills/skills/frontend/references/design/meta.md +366 -0
- package/packages/shared-skills/skills/frontend/references/design/minimalist-skill.md +85 -0
- package/packages/shared-skills/skills/frontend/references/design/minimax.md +257 -0
- package/packages/shared-skills/skills/frontend/references/design/mintlify.md +326 -0
- package/packages/shared-skills/skills/frontend/references/design/miro.md +108 -0
- package/packages/shared-skills/skills/frontend/references/design/mistral.ai.md +261 -0
- package/packages/shared-skills/skills/frontend/references/design/mongodb.md +266 -0
- package/packages/shared-skills/skills/frontend/references/design/nike.md +363 -0
- package/packages/shared-skills/skills/frontend/references/design/notion.md +309 -0
- package/packages/shared-skills/skills/frontend/references/design/nvidia.md +293 -0
- package/packages/shared-skills/skills/frontend/references/design/ollama.md +267 -0
- package/packages/shared-skills/skills/frontend/references/design/opencode.ai.md +281 -0
- package/packages/shared-skills/skills/frontend/references/design/output-skill.md +49 -0
- package/packages/shared-skills/skills/frontend/references/design/pinterest.md +230 -0
- package/packages/shared-skills/skills/frontend/references/design/playstation.md +364 -0
- package/packages/shared-skills/skills/frontend/references/design/posthog.md +256 -0
- package/packages/shared-skills/skills/frontend/references/design/raycast.md +268 -0
- package/packages/shared-skills/skills/frontend/references/design/react-dev-tooling-skill.md +230 -0
- package/packages/shared-skills/skills/frontend/references/design/redesign-skill.md +178 -0
- package/packages/shared-skills/skills/frontend/references/design/renault.md +311 -0
- package/packages/shared-skills/skills/frontend/references/design/replicate.md +261 -0
- package/packages/shared-skills/skills/frontend/references/design/resend.md +303 -0
- package/packages/shared-skills/skills/frontend/references/design/revolut.md +185 -0
- package/packages/shared-skills/skills/frontend/references/design/runwayml.md +244 -0
- package/packages/shared-skills/skills/frontend/references/design/sanity.md +357 -0
- package/packages/shared-skills/skills/frontend/references/design/sentry.md +262 -0
- package/packages/shared-skills/skills/frontend/references/design/shopify.md +350 -0
- package/packages/shared-skills/skills/frontend/references/design/soft-skill.md +98 -0
- package/packages/shared-skills/skills/frontend/references/design/spacex.md +194 -0
- package/packages/shared-skills/skills/frontend/references/design/spotify.md +246 -0
- package/packages/shared-skills/skills/frontend/references/design/starbucks.md +580 -0
- package/packages/shared-skills/skills/frontend/references/design/stitch-skill.md +184 -0
- package/packages/shared-skills/skills/frontend/references/design/stripe.md +322 -0
- package/packages/shared-skills/skills/frontend/references/design/supabase.md +255 -0
- package/packages/shared-skills/skills/frontend/references/design/superhuman.md +252 -0
- package/packages/shared-skills/skills/frontend/references/design/taste-skill.md +226 -0
- package/packages/shared-skills/skills/frontend/references/design/tesla.md +286 -0
- package/packages/shared-skills/skills/frontend/references/design/theverge.md +339 -0
- package/packages/shared-skills/skills/frontend/references/design/together.ai.md +263 -0
- package/packages/shared-skills/skills/frontend/references/design/uber.md +295 -0
- package/packages/shared-skills/skills/frontend/references/design/vercel.md +310 -0
- package/packages/shared-skills/skills/frontend/references/design/vodafone.md +423 -0
- package/packages/shared-skills/skills/frontend/references/design/voltagent.md +323 -0
- package/packages/shared-skills/skills/frontend/references/design/warp.md +253 -0
- package/packages/shared-skills/skills/frontend/references/design/webflow.md +92 -0
- package/packages/shared-skills/skills/frontend/references/design/wired.md +278 -0
- package/packages/shared-skills/skills/frontend/references/design/wise.md +173 -0
- package/packages/shared-skills/skills/frontend/references/design/x.ai.md +257 -0
- package/packages/shared-skills/skills/frontend/references/design/zapier.md +328 -0
- package/packages/shared-skills/skills/frontend/references/perfection/README.md +160 -0
- package/packages/shared-skills/skills/frontend/references/perfection/react-perf-tooling.md +127 -0
- package/packages/shared-skills/skills/frontend/references/ui-ux-db/README.md +273 -0
- package/packages/shared-skills/skills/frontend/references/ui-ux-db/data/charts.csv +26 -0
- package/packages/shared-skills/skills/frontend/references/ui-ux-db/data/colors.csv +97 -0
- package/packages/shared-skills/skills/frontend/references/ui-ux-db/data/icons.csv +101 -0
- package/packages/shared-skills/skills/frontend/references/ui-ux-db/data/landing.csv +31 -0
- package/packages/shared-skills/skills/frontend/references/ui-ux-db/data/products.csv +97 -0
- package/packages/shared-skills/skills/frontend/references/ui-ux-db/data/react-performance.csv +45 -0
- package/packages/shared-skills/skills/frontend/references/ui-ux-db/data/stacks/astro.csv +54 -0
- package/packages/shared-skills/skills/frontend/references/ui-ux-db/data/stacks/flutter.csv +53 -0
- package/packages/shared-skills/skills/frontend/references/ui-ux-db/data/stacks/html-tailwind.csv +56 -0
- package/packages/shared-skills/skills/frontend/references/ui-ux-db/data/stacks/jetpack-compose.csv +53 -0
- package/packages/shared-skills/skills/frontend/references/ui-ux-db/data/stacks/nextjs.csv +53 -0
- package/packages/shared-skills/skills/frontend/references/ui-ux-db/data/stacks/nuxt-ui.csv +51 -0
- package/packages/shared-skills/skills/frontend/references/ui-ux-db/data/stacks/nuxtjs.csv +59 -0
- package/packages/shared-skills/skills/frontend/references/ui-ux-db/data/stacks/react-native.csv +52 -0
- package/packages/shared-skills/skills/frontend/references/ui-ux-db/data/stacks/react.csv +54 -0
- package/packages/shared-skills/skills/frontend/references/ui-ux-db/data/stacks/shadcn.csv +61 -0
- package/packages/shared-skills/skills/frontend/references/ui-ux-db/data/stacks/svelte.csv +54 -0
- package/packages/shared-skills/skills/frontend/references/ui-ux-db/data/stacks/swiftui.csv +51 -0
- package/packages/shared-skills/skills/frontend/references/ui-ux-db/data/stacks/vue.csv +50 -0
- package/packages/shared-skills/skills/frontend/references/ui-ux-db/data/styles.csv +68 -0
- package/packages/shared-skills/skills/frontend/references/ui-ux-db/data/typography.csv +58 -0
- package/packages/shared-skills/skills/frontend/references/ui-ux-db/data/ui-reasoning.csv +101 -0
- package/packages/shared-skills/skills/frontend/references/ui-ux-db/data/ux-guidelines.csv +100 -0
- package/packages/shared-skills/skills/frontend/references/ui-ux-db/data/web-interface.csv +31 -0
- package/packages/shared-skills/skills/frontend/references/ui-ux-db/scripts/core.py +253 -0
- package/packages/shared-skills/skills/frontend/references/ui-ux-db/scripts/design_system.py +1067 -0
- package/packages/shared-skills/skills/frontend/references/ui-ux-db/scripts/search.py +114 -0
- package/packages/shared-skills/skills/frontend/scripts/perfection/lighthouse-audit.py +201 -0
- package/packages/shared-skills/skills/init-deep/SKILL.md +1 -1
- package/packages/shared-skills/skills/refactor/SKILL.md +12 -21
- package/packages/shared-skills/skills/review-work/SKILL.md +11 -9
- package/packages/shared-skills/skills/start-work/SKILL.md +5 -4
- package/packages/shared-skills/skills/ultraresearch/SKILL.md +9 -8
- package/packages/shared-skills/skills/ulw-plan/SKILL.md +69 -0
- package/packages/shared-skills/skills/ulw-plan/agents/openai.yaml +7 -0
- package/packages/shared-skills/skills/ulw-plan/references/full-workflow.md +99 -0
- package/packages/shared-skills/skills/ulw-plan/references/intent-clear.md +44 -0
- package/packages/shared-skills/skills/ulw-plan/references/intent-unclear.md +44 -0
- package/packages/shared-skills/skills/ulw-plan/scripts/scaffold-plan.mjs +301 -0
- package/packages/shared-skills/skills/visual-qa/SKILL.md +17 -1
- package/packages/shared-skills/skills/visual-qa/references/agent-browser-setup.md +44 -0
- package/packages/shared-skills/skills/visual-qa/scripts/skill-prompt-contract.test.ts +48 -4
- package/dist/cli/doctor/constants.d.ts +0 -32
- package/dist/cli/doctor/spawn-with-timeout.d.ts +0 -8
- package/dist/cli/doctor/types.d.ts +0 -148
- package/dist/features/builtin-skills/skills/frontend-ui-ux.d.ts +0 -2
- package/dist/mcp/ast-grep.d.ts +0 -11
- package/packages/ast-grep-mcp/dist/cli.js +0 -1159
- package/packages/lsp-tools-mcp/dist/lsp/cleanup-errors.js +0 -6
- package/packages/lsp-tools-mcp/dist/lsp/client-wrapper.js +0 -132
- package/packages/lsp-tools-mcp/dist/lsp/client.js +0 -131
- package/packages/lsp-tools-mcp/dist/lsp/config-loader.js +0 -220
- package/packages/lsp-tools-mcp/dist/lsp/connection.js +0 -66
- package/packages/lsp-tools-mcp/dist/lsp/constants.js +0 -10
- package/packages/lsp-tools-mcp/dist/lsp/directory-diagnostics.js +0 -125
- package/packages/lsp-tools-mcp/dist/lsp/effective-extension.js +0 -8
- package/packages/lsp-tools-mcp/dist/lsp/errors.js +0 -56
- package/packages/lsp-tools-mcp/dist/lsp/formatters.js +0 -106
- package/packages/lsp-tools-mcp/dist/lsp/infer-extension.js +0 -59
- package/packages/lsp-tools-mcp/dist/lsp/json-rpc-connection.js +0 -247
- package/packages/lsp-tools-mcp/dist/lsp/language-mappings.js +0 -170
- package/packages/lsp-tools-mcp/dist/lsp/process-signal-cleanup.js +0 -17
- package/packages/lsp-tools-mcp/dist/lsp/process.js +0 -153
- package/packages/lsp-tools-mcp/dist/lsp/server-definitions.js +0 -170
- package/packages/lsp-tools-mcp/dist/lsp/server-install-state.js +0 -51
- package/packages/lsp-tools-mcp/dist/lsp/server-installation.js +0 -40
- package/packages/lsp-tools-mcp/dist/lsp/server-resolution.js +0 -86
- package/packages/lsp-tools-mcp/dist/lsp/startup-failure.js +0 -35
- package/packages/lsp-tools-mcp/dist/lsp/transport.js +0 -241
- package/packages/lsp-tools-mcp/dist/lsp/types.js +0 -1
- package/packages/lsp-tools-mcp/dist/lsp/workspace-edit.js +0 -175
- package/packages/lsp-tools-mcp/dist/missing-dependency-result.js +0 -14
- package/packages/omo-codex/plugin/components/bootstrap/manifests/ast-grep.json +0 -22
- package/packages/omo-codex/plugin/components/comment-checker/dist/apply-patch.d.ts +0 -7
- package/packages/omo-codex/plugin/components/comment-checker/dist/apply-patch.js +0 -173
- package/packages/omo-codex/plugin/components/comment-checker/dist/codex-hook.d.ts +0 -22
- package/packages/omo-codex/plugin/components/comment-checker/dist/codex-hook.js +0 -165
- package/packages/omo-codex/plugin/components/comment-checker/dist/core-values.d.ts +0 -1
- package/packages/omo-codex/plugin/components/comment-checker/dist/core-values.js +0 -1
- package/packages/omo-codex/plugin/components/comment-checker/dist/core.d.ts +0 -5
- package/packages/omo-codex/plugin/components/comment-checker/dist/core.js +0 -4
- package/packages/omo-codex/plugin/components/comment-checker/dist/hook-input.d.ts +0 -6
- package/packages/omo-codex/plugin/components/comment-checker/dist/hook-input.js +0 -10
- package/packages/omo-codex/plugin/components/comment-checker/dist/record.d.ts +0 -2
- package/packages/omo-codex/plugin/components/comment-checker/dist/record.js +0 -11
- package/packages/omo-codex/plugin/components/comment-checker/dist/request-extractor.d.ts +0 -3
- package/packages/omo-codex/plugin/components/comment-checker/dist/request-extractor.js +0 -104
- package/packages/omo-codex/plugin/components/comment-checker/dist/runner.d.ts +0 -26
- package/packages/omo-codex/plugin/components/comment-checker/dist/runner.js +0 -144
- package/packages/omo-codex/plugin/components/comment-checker/dist/types.d.ts +0 -43
- package/packages/omo-codex/plugin/components/comment-checker/dist/types.js +0 -1
- package/packages/omo-codex/plugin/components/comment-checker/src/record.ts +0 -11
- package/packages/omo-codex/plugin/components/rules/dist/codex-hook-options.d.ts +0 -5
- package/packages/omo-codex/plugin/components/rules/dist/codex-hook-options.js +0 -1
- package/packages/omo-codex/plugin/components/rules/dist/codex-hook.d.ts +0 -47
- package/packages/omo-codex/plugin/components/rules/dist/codex-hook.js +0 -127
- package/packages/omo-codex/plugin/components/rules/dist/config.d.ts +0 -2
- package/packages/omo-codex/plugin/components/rules/dist/config.js +0 -100
- package/packages/omo-codex/plugin/components/rules/dist/context-pressure.d.ts +0 -2
- package/packages/omo-codex/plugin/components/rules/dist/context-pressure.js +0 -26
- package/packages/omo-codex/plugin/components/rules/dist/debug-log.d.ts +0 -8
- package/packages/omo-codex/plugin/components/rules/dist/debug-log.js +0 -36
- package/packages/omo-codex/plugin/components/rules/dist/dynamic-target-fingerprints.d.ts +0 -7
- package/packages/omo-codex/plugin/components/rules/dist/dynamic-target-fingerprints.js +0 -65
- package/packages/omo-codex/plugin/components/rules/dist/event-budget.d.ts +0 -3
- package/packages/omo-codex/plugin/components/rules/dist/event-budget.js +0 -14
- package/packages/omo-codex/plugin/components/rules/dist/hook-output.d.ts +0 -2
- package/packages/omo-codex/plugin/components/rules/dist/hook-output.js +0 -24
- package/packages/omo-codex/plugin/components/rules/dist/path-utils.d.ts +0 -4
- package/packages/omo-codex/plugin/components/rules/dist/path-utils.js +0 -24
- package/packages/omo-codex/plugin/components/rules/dist/persistent-cache.d.ts +0 -13
- package/packages/omo-codex/plugin/components/rules/dist/persistent-cache.js +0 -172
- package/packages/omo-codex/plugin/components/rules/dist/post-compact-budget.d.ts +0 -6
- package/packages/omo-codex/plugin/components/rules/dist/post-compact-budget.js +0 -74
- package/packages/omo-codex/plugin/components/rules/dist/post-compact-claim.d.ts +0 -4
- package/packages/omo-codex/plugin/components/rules/dist/post-compact-claim.js +0 -6
- package/packages/omo-codex/plugin/components/rules/dist/post-compact-directive.d.ts +0 -1
- package/packages/omo-codex/plugin/components/rules/dist/post-compact-directive.js +0 -32
- package/packages/omo-codex/plugin/components/rules/dist/post-compact-state.d.ts +0 -13
- package/packages/omo-codex/plugin/components/rules/dist/post-compact-state.js +0 -29
- package/packages/omo-codex/plugin/components/rules/dist/rules/cache.d.ts +0 -9
- package/packages/omo-codex/plugin/components/rules/dist/rules/cache.js +0 -51
- package/packages/omo-codex/plugin/components/rules/dist/rules/constants.d.ts +0 -70
- package/packages/omo-codex/plugin/components/rules/dist/rules/constants.js +0 -101
- package/packages/omo-codex/plugin/components/rules/dist/rules/engine-dynamic-cache.d.ts +0 -5
- package/packages/omo-codex/plugin/components/rules/dist/rules/engine-dynamic-cache.js +0 -60
- package/packages/omo-codex/plugin/components/rules/dist/rules/engine-dynamic-loader.d.ts +0 -6
- package/packages/omo-codex/plugin/components/rules/dist/rules/engine-dynamic-loader.js +0 -61
- package/packages/omo-codex/plugin/components/rules/dist/rules/engine-loader.d.ts +0 -7
- package/packages/omo-codex/plugin/components/rules/dist/rules/engine-loader.js +0 -60
- package/packages/omo-codex/plugin/components/rules/dist/rules/engine-paths.d.ts +0 -11
- package/packages/omo-codex/plugin/components/rules/dist/rules/engine-paths.js +0 -75
- package/packages/omo-codex/plugin/components/rules/dist/rules/engine-static-loader.d.ts +0 -6
- package/packages/omo-codex/plugin/components/rules/dist/rules/engine-static-loader.js +0 -29
- package/packages/omo-codex/plugin/components/rules/dist/rules/engine-types.d.ts +0 -44
- package/packages/omo-codex/plugin/components/rules/dist/rules/engine-types.js +0 -1
- package/packages/omo-codex/plugin/components/rules/dist/rules/engine.d.ts +0 -5
- package/packages/omo-codex/plugin/components/rules/dist/rules/engine.js +0 -85
- package/packages/omo-codex/plugin/components/rules/dist/rules/errors.d.ts +0 -6
- package/packages/omo-codex/plugin/components/rules/dist/rules/errors.js +0 -12
- package/packages/omo-codex/plugin/components/rules/dist/rules/finder-cache.d.ts +0 -14
- package/packages/omo-codex/plugin/components/rules/dist/rules/finder-cache.js +0 -51
- package/packages/omo-codex/plugin/components/rules/dist/rules/finder-paths.d.ts +0 -6
- package/packages/omo-codex/plugin/components/rules/dist/rules/finder-paths.js +0 -33
- package/packages/omo-codex/plugin/components/rules/dist/rules/finder-sources.d.ts +0 -5
- package/packages/omo-codex/plugin/components/rules/dist/rules/finder-sources.js +0 -40
- package/packages/omo-codex/plugin/components/rules/dist/rules/finder.d.ts +0 -28
- package/packages/omo-codex/plugin/components/rules/dist/rules/finder.js +0 -146
- package/packages/omo-codex/plugin/components/rules/dist/rules/formatter.d.ts +0 -7
- package/packages/omo-codex/plugin/components/rules/dist/rules/formatter.js +0 -112
- package/packages/omo-codex/plugin/components/rules/dist/rules/matcher.d.ts +0 -18
- package/packages/omo-codex/plugin/components/rules/dist/rules/matcher.js +0 -93
- package/packages/omo-codex/plugin/components/rules/dist/rules/ordering.d.ts +0 -3
- package/packages/omo-codex/plugin/components/rules/dist/rules/ordering.js +0 -27
- package/packages/omo-codex/plugin/components/rules/dist/rules/parser-frontmatter.d.ts +0 -7
- package/packages/omo-codex/plugin/components/rules/dist/rules/parser-frontmatter.js +0 -30
- package/packages/omo-codex/plugin/components/rules/dist/rules/parser-yaml.d.ts +0 -2
- package/packages/omo-codex/plugin/components/rules/dist/rules/parser-yaml.js +0 -237
- package/packages/omo-codex/plugin/components/rules/dist/rules/parser.d.ts +0 -3
- package/packages/omo-codex/plugin/components/rules/dist/rules/parser.js +0 -31
- package/packages/omo-codex/plugin/components/rules/dist/rules/plugin-root.d.ts +0 -1
- package/packages/omo-codex/plugin/components/rules/dist/rules/plugin-root.js +0 -48
- package/packages/omo-codex/plugin/components/rules/dist/rules/project-root.d.ts +0 -1
- package/packages/omo-codex/plugin/components/rules/dist/rules/project-root.js +0 -23
- package/packages/omo-codex/plugin/components/rules/dist/rules/scanner.d.ts +0 -14
- package/packages/omo-codex/plugin/components/rules/dist/rules/scanner.js +0 -111
- package/packages/omo-codex/plugin/components/rules/dist/rules/sources.d.ts +0 -3
- package/packages/omo-codex/plugin/components/rules/dist/rules/sources.js +0 -9
- package/packages/omo-codex/plugin/components/rules/dist/rules/truncator.d.ts +0 -18
- package/packages/omo-codex/plugin/components/rules/dist/rules/truncator.js +0 -59
- package/packages/omo-codex/plugin/components/rules/dist/rules/types.d.ts +0 -126
- package/packages/omo-codex/plugin/components/rules/dist/rules/types.js +0 -8
- package/packages/omo-codex/plugin/components/rules/dist/rules-engine-factory.d.ts +0 -6
- package/packages/omo-codex/plugin/components/rules/dist/rules-engine-factory.js +0 -20
- package/packages/omo-codex/plugin/components/rules/dist/session-state-lock.d.ts +0 -3
- package/packages/omo-codex/plugin/components/rules/dist/session-state-lock.js +0 -41
- package/packages/omo-codex/plugin/components/rules/dist/sparkshell-awareness.d.ts +0 -10
- package/packages/omo-codex/plugin/components/rules/dist/sparkshell-awareness.js +0 -90
- package/packages/omo-codex/plugin/components/rules/dist/static-injection.d.ts +0 -3
- package/packages/omo-codex/plugin/components/rules/dist/static-injection.js +0 -128
- package/packages/omo-codex/plugin/components/rules/dist/tool-paths.d.ts +0 -6
- package/packages/omo-codex/plugin/components/rules/dist/tool-paths.js +0 -168
- package/packages/omo-codex/plugin/components/rules/dist/transcript-rule-filter.d.ts +0 -4
- package/packages/omo-codex/plugin/components/rules/dist/transcript-rule-filter.js +0 -49
- package/packages/omo-codex/plugin/components/rules/dist/transcript-search.d.ts +0 -4
- package/packages/omo-codex/plugin/components/rules/dist/transcript-search.js +0 -91
- package/packages/omo-codex/plugin/components/rules/src/rules/cache.ts +0 -64
- package/packages/omo-codex/plugin/components/rules/src/rules/constants.ts +0 -122
- package/packages/omo-codex/plugin/components/rules/src/rules/engine-dynamic-cache.ts +0 -87
- package/packages/omo-codex/plugin/components/rules/src/rules/engine-dynamic-loader.ts +0 -94
- package/packages/omo-codex/plugin/components/rules/src/rules/engine-loader.ts +0 -84
- package/packages/omo-codex/plugin/components/rules/src/rules/engine-paths.ts +0 -103
- package/packages/omo-codex/plugin/components/rules/src/rules/engine-static-loader.ts +0 -43
- package/packages/omo-codex/plugin/components/rules/src/rules/engine-types.ts +0 -45
- package/packages/omo-codex/plugin/components/rules/src/rules/engine.ts +0 -123
- package/packages/omo-codex/plugin/components/rules/src/rules/errors.ts +0 -13
- package/packages/omo-codex/plugin/components/rules/src/rules/finder-cache.ts +0 -73
- package/packages/omo-codex/plugin/components/rules/src/rules/finder-paths.ts +0 -47
- package/packages/omo-codex/plugin/components/rules/src/rules/finder-sources.ts +0 -45
- package/packages/omo-codex/plugin/components/rules/src/rules/finder.ts +0 -220
- package/packages/omo-codex/plugin/components/rules/src/rules/formatter.ts +0 -149
- package/packages/omo-codex/plugin/components/rules/src/rules/matcher.ts +0 -142
- package/packages/omo-codex/plugin/components/rules/src/rules/ordering.ts +0 -33
- package/packages/omo-codex/plugin/components/rules/src/rules/parser-frontmatter.ts +0 -39
- package/packages/omo-codex/plugin/components/rules/src/rules/parser-yaml.ts +0 -271
- package/packages/omo-codex/plugin/components/rules/src/rules/parser.ts +0 -35
- package/packages/omo-codex/plugin/components/rules/src/rules/plugin-root.ts +0 -55
- package/packages/omo-codex/plugin/components/rules/src/rules/project-root.ts +0 -30
- package/packages/omo-codex/plugin/components/rules/src/rules/scanner.ts +0 -162
- package/packages/omo-codex/plugin/components/rules/src/rules/sources.ts +0 -13
- package/packages/omo-codex/plugin/components/rules/src/rules/truncator.ts +0 -84
- package/packages/omo-codex/plugin/components/rules/src/rules/types.ts +0 -141
- package/packages/omo-codex/plugin/components/start-work-continuation/dist/boulder-reader.d.ts +0 -16
- package/packages/omo-codex/plugin/components/start-work-continuation/dist/boulder-reader.js +0 -146
- package/packages/omo-codex/plugin/components/start-work-continuation/dist/cli.d.ts +0 -2
- package/packages/omo-codex/plugin/components/start-work-continuation/dist/codex-hook.d.ts +0 -2
- package/packages/omo-codex/plugin/components/start-work-continuation/dist/codex-hook.js +0 -80
- package/packages/omo-codex/plugin/components/start-work-continuation/dist/directive.d.ts +0 -1
- package/packages/omo-codex/plugin/components/start-work-continuation/dist/directive.js +0 -2
- package/packages/omo-codex/plugin/components/start-work-continuation/dist/index.d.ts +0 -5
- package/packages/omo-codex/plugin/components/start-work-continuation/dist/index.js +0 -3
- package/packages/omo-codex/plugin/components/start-work-continuation/dist/types.d.ts +0 -20
- package/packages/omo-codex/plugin/components/start-work-continuation/dist/types.js +0 -1
- package/packages/omo-codex/plugin/components/telemetry/dist/atomic-write.d.ts +0 -1
- package/packages/omo-codex/plugin/components/telemetry/dist/atomic-write.js +0 -18
- package/packages/omo-codex/plugin/components/telemetry/dist/cli.d.ts +0 -2
- package/packages/omo-codex/plugin/components/telemetry/dist/codex-hook.d.ts +0 -15
- package/packages/omo-codex/plugin/components/telemetry/dist/codex-hook.js +0 -42
- package/packages/omo-codex/plugin/components/telemetry/dist/data-path.d.ts +0 -10
- package/packages/omo-codex/plugin/components/telemetry/dist/data-path.js +0 -35
- package/packages/omo-codex/plugin/components/telemetry/dist/diagnostics.d.ts +0 -12
- package/packages/omo-codex/plugin/components/telemetry/dist/diagnostics.js +0 -108
- package/packages/omo-codex/plugin/components/telemetry/dist/env-flags.d.ts +0 -4
- package/packages/omo-codex/plugin/components/telemetry/dist/env-flags.js +0 -31
- package/packages/omo-codex/plugin/components/telemetry/dist/posthog-activity-state.d.ts +0 -8
- package/packages/omo-codex/plugin/components/telemetry/dist/posthog-activity-state.js +0 -68
- package/packages/omo-codex/plugin/components/telemetry/dist/posthog.d.ts +0 -21
- package/packages/omo-codex/plugin/components/telemetry/dist/product-identity.d.ts +0 -8
- package/packages/omo-codex/plugin/components/telemetry/dist/product-identity.js +0 -29
- package/packages/omo-codex/plugin/components/telemetry/src/atomic-write.ts +0 -22
- package/packages/omo-codex/plugin/components/telemetry/src/data-path.ts +0 -45
- package/packages/omo-codex/plugin/components/telemetry/src/diagnostics.ts +0 -154
- package/packages/omo-codex/plugin/components/telemetry/src/env-flags.ts +0 -43
- package/packages/omo-codex/plugin/components/telemetry/src/posthog-activity-state.ts +0 -97
- package/packages/omo-codex/plugin/components/ultrawork/agents/codex-ultrawork-reviewer.toml +0 -21
- package/packages/omo-codex/plugin/components/ultrawork/dist/cli.d.ts +0 -2
- package/packages/omo-codex/plugin/components/ultrawork/dist/codex-hook.d.ts +0 -7
- package/packages/omo-codex/plugin/components/ultrawork/dist/codex-hook.js +0 -122
- package/packages/omo-codex/plugin/components/ultrawork/dist/directive.d.ts +0 -1
- package/packages/omo-codex/plugin/components/ultrawork/dist/directive.js +0 -2
- package/packages/omo-codex/plugin/skills/frontend-ui-ux/SKILL.md +0 -77
- package/packages/omo-codex/plugin/test/start-work-skill.test.mjs +0 -85
- package/packages/omo-codex/plugin/test/ulw-plan-skill.test.mjs +0 -89
- package/packages/omo-codex/scripts/atomic-write.test.mjs +0 -82
- package/packages/omo-codex/scripts/install/agent-source-roots.mjs +0 -13
- package/packages/omo-codex/scripts/install/agents.d.mts +0 -18
- package/packages/omo-codex/scripts/install/agents.mjs +0 -227
- package/packages/omo-codex/scripts/install/atomic-write.mjs +0 -59
- package/packages/omo-codex/scripts/install/bin-dir.d.mts +0 -7
- package/packages/omo-codex/scripts/install/bin-dir.mjs +0 -20
- package/packages/omo-codex/scripts/install/bin-links.d.mts +0 -18
- package/packages/omo-codex/scripts/install/bin-links.mjs +0 -276
- package/packages/omo-codex/scripts/install/cache.mjs +0 -295
- package/packages/omo-codex/scripts/install/cached-marketplace-manifest.mjs +0 -21
- package/packages/omo-codex/scripts/install/cli-args.mjs +0 -149
- package/packages/omo-codex/scripts/install/command-shim.mjs +0 -1
- package/packages/omo-codex/scripts/install/config.d.mts +0 -35
- package/packages/omo-codex/scripts/install/config.mjs +0 -267
- package/packages/omo-codex/scripts/install/delegated-command.mjs +0 -29
- package/packages/omo-codex/scripts/install/git-bash-mcp-env.d.mts +0 -5
- package/packages/omo-codex/scripts/install/git-bash-mcp-env.mjs +0 -28
- package/packages/omo-codex/scripts/install/git-bash.d.mts +0 -23
- package/packages/omo-codex/scripts/install/git-bash.mjs +0 -107
- package/packages/omo-codex/scripts/install/git-bash.test.mjs +0 -209
- package/packages/omo-codex/scripts/install/hook-targets.mjs +0 -46
- package/packages/omo-codex/scripts/install/hook-trust.d.mts +0 -10
- package/packages/omo-codex/scripts/install/hook-trust.mjs +0 -84
- package/packages/omo-codex/scripts/install/lazycodex-version-stamp.mjs +0 -102
- package/packages/omo-codex/scripts/install/legacy-bins.mjs +0 -66
- package/packages/omo-codex/scripts/install/marketplace.mjs +0 -104
- package/packages/omo-codex/scripts/install/mcp-runtime-cache.mjs +0 -81
- package/packages/omo-codex/scripts/install/model-catalog.mjs +0 -74
- package/packages/omo-codex/scripts/install/multi-agent-v2-config.mjs +0 -50
- package/packages/omo-codex/scripts/install/permissions.d.mts +0 -1
- package/packages/omo-codex/scripts/install/permissions.mjs +0 -37
- package/packages/omo-codex/scripts/install/process.mjs +0 -22
- package/packages/omo-codex/scripts/install/project-local-cleanup.mjs +0 -228
- package/packages/omo-codex/scripts/install/reasoning-config.mjs +0 -72
- package/packages/omo-codex/scripts/install/snapshot.mjs +0 -53
- package/packages/omo-codex/scripts/install/source-package-build.mjs +0 -20
- package/packages/omo-codex/scripts/install/toml-editor.mjs +0 -64
- package/packages/omo-codex/scripts/install/utils.mjs +0 -15
- package/packages/omo-codex/scripts/sync-telemetry-component.mjs +0 -116
- package/packages/omo-codex/scripts/sync-telemetry-component.test.mjs +0 -94
- package/packages/shared-skills/skills/frontend-ui-ux/SKILL.md +0 -77
- /package/dist/cli/doctor/{doctor-target.d.ts → framework/doctor-target.d.ts} +0 -0
- /package/dist/cli/doctor/{format-default.d.ts → framework/format-default.d.ts} +0 -0
- /package/dist/cli/doctor/{format-shared.d.ts → framework/format-shared.d.ts} +0 -0
- /package/dist/cli/doctor/{format-status.d.ts → framework/format-status.d.ts} +0 -0
- /package/dist/cli/doctor/{format-verbose.d.ts → framework/format-verbose.d.ts} +0 -0
- /package/dist/cli/doctor/{formatter.d.ts → framework/formatter.d.ts} +0 -0
- /package/packages/omo-codex/plugin/components/{comment-checker → codegraph}/dist/cli.d.ts +0 -0
- /package/packages/omo-codex/plugin/components/{rules → lazycodex-executor-verify}/dist/cli.d.ts +0 -0
|
@@ -1,291 +1,1416 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
// ../lsp-core/src/lsp/cleanup-errors.ts
|
|
2
|
+
function reportBestEffortCleanupError(operation, error) {
|
|
3
|
+
if (process.env["CODEX_LSP_DEBUG_CLEANUP"] !== "1")
|
|
4
|
+
return;
|
|
5
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
6
|
+
console.error(`[codex-lsp] ignored ${operation} failure during cleanup: ${message}`);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
// ../lsp-core/src/lsp/client.ts
|
|
10
|
+
import { readFileSync } from "node:fs";
|
|
11
|
+
import { resolve } from "node:path";
|
|
12
|
+
import { pathToFileURL as pathToFileURL2 } from "node:url";
|
|
13
|
+
|
|
14
|
+
// ../lsp-core/src/request-context.ts
|
|
15
|
+
import { AsyncLocalStorage } from "node:async_hooks";
|
|
16
|
+
var storage = new AsyncLocalStorage;
|
|
17
|
+
function runWithRequestContext(context, fn) {
|
|
18
|
+
return storage.run(context, fn);
|
|
19
|
+
}
|
|
20
|
+
function contextCwd() {
|
|
21
|
+
return storage.getStore()?.cwd ?? process.cwd();
|
|
22
|
+
}
|
|
23
|
+
function contextEnv(key) {
|
|
24
|
+
const store = storage.getStore();
|
|
25
|
+
if (store?.env)
|
|
26
|
+
return store.env[key];
|
|
27
|
+
return process.env[key];
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// ../lsp-core/src/lsp/connection.ts
|
|
31
|
+
import { pathToFileURL } from "node:url";
|
|
32
|
+
|
|
33
|
+
// ../lsp-core/src/lsp/constants.ts
|
|
34
|
+
var DEFAULT_MAX_REFERENCES = 200;
|
|
35
|
+
var DEFAULT_MAX_SYMBOLS = 200;
|
|
36
|
+
var DEFAULT_MAX_DIAGNOSTICS = 200;
|
|
37
|
+
var DEFAULT_MAX_DIRECTORY_FILES = 50;
|
|
38
|
+
var REQUEST_TIMEOUT_MS = 15000;
|
|
39
|
+
var INIT_TIMEOUT_MS = 60000;
|
|
40
|
+
var IDLE_TIMEOUT_MS = 5 * 60000;
|
|
41
|
+
var REAPER_INTERVAL_MS = 60000;
|
|
42
|
+
var STOP_HARD_KILL_TIMEOUT_MS = 5000;
|
|
43
|
+
var STOP_SIGKILL_GRACE_MS = 1000;
|
|
44
|
+
|
|
45
|
+
// ../lsp-core/src/lsp/errors.ts
|
|
46
|
+
class LspConnectionClosedError extends Error {
|
|
47
|
+
serverId;
|
|
48
|
+
root;
|
|
49
|
+
name = "LspConnectionClosedError";
|
|
50
|
+
constructor(serverId, root, message) {
|
|
51
|
+
super(message ?? `LSP connection closed for ${serverId} at ${root}`);
|
|
52
|
+
this.serverId = serverId;
|
|
53
|
+
this.root = root;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
class LspProcessExitedError extends Error {
|
|
58
|
+
serverId;
|
|
59
|
+
root;
|
|
60
|
+
exitCode;
|
|
61
|
+
stderrTail;
|
|
62
|
+
name = "LspProcessExitedError";
|
|
63
|
+
constructor(serverId, root, exitCode, stderrTail) {
|
|
64
|
+
const stderrSuffix = stderrTail ? `
|
|
65
|
+
stderr tail: ${stderrTail}` : "";
|
|
66
|
+
super(`LSP server ${serverId} at ${root} exited with code ${exitCode ?? "null"}${stderrSuffix}`);
|
|
67
|
+
this.serverId = serverId;
|
|
68
|
+
this.root = root;
|
|
69
|
+
this.exitCode = exitCode;
|
|
70
|
+
this.stderrTail = stderrTail;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
class LspRequestTimeoutError extends Error {
|
|
75
|
+
method;
|
|
76
|
+
stderrTail;
|
|
77
|
+
name = "LspRequestTimeoutError";
|
|
78
|
+
constructor(method, stderrTail) {
|
|
79
|
+
const stderrSuffix = stderrTail ? `
|
|
80
|
+
recent stderr: ${stderrTail}` : "";
|
|
81
|
+
super(`LSP request timeout (method: ${method})${stderrSuffix}`);
|
|
82
|
+
this.method = method;
|
|
83
|
+
this.stderrTail = stderrTail;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
class LspInvalidPathError extends Error {
|
|
88
|
+
name = "LspInvalidPathError";
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
class LspServerLookupError extends Error {
|
|
92
|
+
name = "LspServerLookupError";
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
class LspServerInitializingError extends Error {
|
|
96
|
+
originalError;
|
|
97
|
+
name = "LspServerInitializingError";
|
|
98
|
+
constructor(originalError) {
|
|
99
|
+
super(`LSP server is still initializing. Please retry in a few seconds. Original error: ${originalError.message}`);
|
|
100
|
+
this.originalError = originalError;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
class LspProcessSpawnError extends Error {
|
|
105
|
+
name = "LspProcessSpawnError";
|
|
106
|
+
}
|
|
107
|
+
function isLspDeadConnectionError(err) {
|
|
108
|
+
return err instanceof LspConnectionClosedError || err instanceof LspProcessExitedError;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
// ../lsp-core/src/lsp/json-rpc-connection.ts
|
|
112
|
+
var HEADER_SEPARATOR = `\r
|
|
113
|
+
\r
|
|
114
|
+
`;
|
|
115
|
+
var PARSE_ERROR = -32700;
|
|
116
|
+
var INVALID_REQUEST = -32600;
|
|
117
|
+
var METHOD_NOT_FOUND = -32601;
|
|
118
|
+
var INTERNAL_ERROR = -32603;
|
|
119
|
+
|
|
120
|
+
class JsonRpcConnection {
|
|
121
|
+
reader;
|
|
122
|
+
writer;
|
|
123
|
+
pendingRequests = new Map;
|
|
124
|
+
notificationHandlers = new Map;
|
|
125
|
+
requestHandlers = new Map;
|
|
126
|
+
closeHandlers = [];
|
|
127
|
+
errorHandlers = [];
|
|
128
|
+
inputBuffer = Buffer.alloc(0);
|
|
129
|
+
nextRequestId = 1;
|
|
130
|
+
listening = false;
|
|
131
|
+
disposed = false;
|
|
132
|
+
constructor(reader, writer) {
|
|
133
|
+
this.reader = reader;
|
|
134
|
+
this.writer = writer;
|
|
135
|
+
}
|
|
136
|
+
listen() {
|
|
137
|
+
if (this.listening)
|
|
138
|
+
return;
|
|
139
|
+
this.listening = true;
|
|
140
|
+
this.reader.on("data", this.handleData);
|
|
141
|
+
this.reader.on("close", this.handleClose);
|
|
142
|
+
this.reader.on("end", this.handleClose);
|
|
143
|
+
this.reader.on("error", this.handleStreamError);
|
|
144
|
+
this.writer.on("error", this.handleStreamError);
|
|
145
|
+
}
|
|
146
|
+
onNotification(method, handler) {
|
|
147
|
+
this.notificationHandlers.set(method, handler);
|
|
148
|
+
}
|
|
149
|
+
onRequest(method, handler) {
|
|
150
|
+
this.requestHandlers.set(method, handler);
|
|
151
|
+
}
|
|
152
|
+
onClose(handler) {
|
|
153
|
+
this.closeHandlers.push(handler);
|
|
154
|
+
}
|
|
155
|
+
onError(handler) {
|
|
156
|
+
this.errorHandlers.push(handler);
|
|
157
|
+
}
|
|
158
|
+
async sendRequest(method, params) {
|
|
159
|
+
if (this.disposed)
|
|
160
|
+
throw new Error("JSON-RPC connection is disposed");
|
|
161
|
+
const id = this.nextRequestId;
|
|
162
|
+
this.nextRequestId += 1;
|
|
163
|
+
const message = params === undefined ? { jsonrpc: "2.0", id, method } : { jsonrpc: "2.0", id, method, params };
|
|
164
|
+
const responsePromise = new Promise((resolve, reject) => {
|
|
165
|
+
this.pendingRequests.set(String(id), {
|
|
166
|
+
resolve(result) {
|
|
167
|
+
resolve(result);
|
|
168
|
+
},
|
|
169
|
+
reject
|
|
170
|
+
});
|
|
171
|
+
});
|
|
6
172
|
try {
|
|
7
|
-
|
|
173
|
+
await this.writeMessage(message);
|
|
174
|
+
} catch (error) {
|
|
175
|
+
this.pendingRequests.delete(String(id));
|
|
176
|
+
throw error;
|
|
8
177
|
}
|
|
9
|
-
|
|
10
|
-
|
|
178
|
+
return responsePromise;
|
|
179
|
+
}
|
|
180
|
+
async sendNotification(method, params) {
|
|
181
|
+
if (this.disposed)
|
|
182
|
+
return;
|
|
183
|
+
const message = params === undefined ? { jsonrpc: "2.0", method } : { jsonrpc: "2.0", method, params };
|
|
184
|
+
await this.writeMessage(message);
|
|
185
|
+
}
|
|
186
|
+
dispose() {
|
|
187
|
+
if (this.disposed)
|
|
188
|
+
return;
|
|
189
|
+
this.disposed = true;
|
|
190
|
+
this.reader.off("data", this.handleData);
|
|
191
|
+
this.reader.off("close", this.handleClose);
|
|
192
|
+
this.reader.off("end", this.handleClose);
|
|
193
|
+
this.reader.off("error", this.handleStreamError);
|
|
194
|
+
this.writer.off("error", this.handleStreamError);
|
|
195
|
+
for (const pending of this.pendingRequests.values()) {
|
|
196
|
+
pending.reject(new Error("JSON-RPC connection disposed"));
|
|
11
197
|
}
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
198
|
+
this.pendingRequests.clear();
|
|
199
|
+
this.notificationHandlers.clear();
|
|
200
|
+
this.requestHandlers.clear();
|
|
201
|
+
}
|
|
202
|
+
handleData = (chunk) => {
|
|
203
|
+
const chunkBuffer = Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk, "utf8");
|
|
204
|
+
this.inputBuffer = Buffer.concat([this.inputBuffer, chunkBuffer]);
|
|
205
|
+
this.drainInputBuffer();
|
|
206
|
+
};
|
|
207
|
+
handleClose = () => {
|
|
208
|
+
for (const handler of this.closeHandlers) {
|
|
209
|
+
handler();
|
|
210
|
+
}
|
|
211
|
+
};
|
|
212
|
+
handleStreamError = (error) => {
|
|
213
|
+
this.emitError(error);
|
|
214
|
+
};
|
|
215
|
+
drainInputBuffer() {
|
|
216
|
+
while (true) {
|
|
217
|
+
const headerEnd = this.inputBuffer.indexOf(HEADER_SEPARATOR);
|
|
218
|
+
if (headerEnd === -1)
|
|
219
|
+
return;
|
|
220
|
+
const headers = this.inputBuffer.subarray(0, headerEnd).toString("ascii");
|
|
221
|
+
const contentLength = parseContentLength(headers);
|
|
222
|
+
if (contentLength === null) {
|
|
223
|
+
this.inputBuffer = Buffer.alloc(0);
|
|
224
|
+
this.emitError(new Error("JSON-RPC message is missing Content-Length header"));
|
|
225
|
+
return;
|
|
226
|
+
}
|
|
227
|
+
const bodyStart = headerEnd + Buffer.byteLength(HEADER_SEPARATOR);
|
|
228
|
+
const bodyEnd = bodyStart + contentLength;
|
|
229
|
+
if (this.inputBuffer.length < bodyEnd)
|
|
230
|
+
return;
|
|
231
|
+
const body = this.inputBuffer.subarray(bodyStart, bodyEnd).toString("utf8");
|
|
232
|
+
this.inputBuffer = this.inputBuffer.subarray(bodyEnd);
|
|
233
|
+
this.dispatchBody(body);
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
dispatchBody(body) {
|
|
237
|
+
let parsed;
|
|
238
|
+
try {
|
|
239
|
+
parsed = JSON.parse(body);
|
|
240
|
+
} catch (error) {
|
|
241
|
+
this.writeError(null, PARSE_ERROR, error instanceof Error ? error.message : "Parse error").catch((writeError) => this.emitError(toError(writeError)));
|
|
242
|
+
return;
|
|
243
|
+
}
|
|
244
|
+
if (!isJsonRpcObject(parsed)) {
|
|
245
|
+
this.writeError(null, INVALID_REQUEST, "Invalid JSON-RPC message").catch((error) => this.emitError(toError(error)));
|
|
246
|
+
return;
|
|
247
|
+
}
|
|
248
|
+
if ("id" in parsed && (("result" in parsed) || ("error" in parsed))) {
|
|
249
|
+
this.handleResponse(parsed);
|
|
250
|
+
return;
|
|
251
|
+
}
|
|
252
|
+
if (typeof parsed["method"] !== "string") {
|
|
253
|
+
const id = getMessageId(parsed) ?? null;
|
|
254
|
+
this.writeError(id, INVALID_REQUEST, "Invalid JSON-RPC method").catch((error) => this.emitError(toError(error)));
|
|
255
|
+
return;
|
|
256
|
+
}
|
|
257
|
+
if ("id" in parsed) {
|
|
258
|
+
this.handleRequest(parsed);
|
|
259
|
+
return;
|
|
260
|
+
}
|
|
261
|
+
this.handleNotification(parsed["method"], parsed["params"]);
|
|
262
|
+
}
|
|
263
|
+
handleResponse(message) {
|
|
264
|
+
const id = getMessageId(message);
|
|
265
|
+
if (id === undefined)
|
|
266
|
+
return;
|
|
267
|
+
const pending = this.pendingRequests.get(String(id));
|
|
268
|
+
if (!pending)
|
|
269
|
+
return;
|
|
270
|
+
this.pendingRequests.delete(String(id));
|
|
271
|
+
if ("error" in message) {
|
|
272
|
+
pending.reject(jsonRpcErrorToError(message["error"]));
|
|
273
|
+
return;
|
|
274
|
+
}
|
|
275
|
+
pending.resolve(message["result"]);
|
|
276
|
+
}
|
|
277
|
+
handleNotification(method, params) {
|
|
278
|
+
const handler = this.notificationHandlers.get(method);
|
|
279
|
+
if (!handler)
|
|
280
|
+
return;
|
|
281
|
+
try {
|
|
282
|
+
handler(params);
|
|
283
|
+
} catch (error) {
|
|
284
|
+
this.emitError(toError(error));
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
handleRequest(message) {
|
|
288
|
+
const id = getMessageId(message);
|
|
289
|
+
if (id === undefined) {
|
|
290
|
+
this.writeError(null, INVALID_REQUEST, "Invalid JSON-RPC id").catch((error) => this.emitError(toError(error)));
|
|
291
|
+
return;
|
|
292
|
+
}
|
|
293
|
+
const method = typeof message["method"] === "string" ? message["method"] : "";
|
|
294
|
+
const handler = this.requestHandlers.get(method);
|
|
295
|
+
if (!handler) {
|
|
296
|
+
this.writeError(id, METHOD_NOT_FOUND, `Method not found: ${method}`).catch((error) => this.emitError(toError(error)));
|
|
297
|
+
return;
|
|
298
|
+
}
|
|
299
|
+
Promise.resolve().then(() => handler(message["params"])).then((result) => this.writeMessage({ jsonrpc: "2.0", id, result }), (error) => this.writeError(id, INTERNAL_ERROR, toError(error).message)).catch((error) => this.emitError(toError(error)));
|
|
300
|
+
}
|
|
301
|
+
async writeError(id, code, message) {
|
|
302
|
+
await this.writeMessage({ jsonrpc: "2.0", id, error: { code, message } });
|
|
303
|
+
}
|
|
304
|
+
writeMessage(message) {
|
|
305
|
+
const body = JSON.stringify(message);
|
|
306
|
+
const payload = `Content-Length: ${Buffer.byteLength(body, "utf8")}\r
|
|
307
|
+
\r
|
|
308
|
+
${body}`;
|
|
16
309
|
return new Promise((resolve, reject) => {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
settled = true;
|
|
22
|
-
reject(new DOMException("Aborted", "AbortError"));
|
|
23
|
-
};
|
|
24
|
-
if (signal.aborted) {
|
|
25
|
-
onAbort();
|
|
26
|
-
return;
|
|
310
|
+
this.writer.write(payload, (error) => {
|
|
311
|
+
if (error) {
|
|
312
|
+
reject(error);
|
|
313
|
+
return;
|
|
27
314
|
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
if (settled)
|
|
31
|
-
return;
|
|
32
|
-
settled = true;
|
|
33
|
-
signal.removeEventListener("abort", onAbort);
|
|
34
|
-
resolve(value);
|
|
35
|
-
}, (err) => {
|
|
36
|
-
if (settled)
|
|
37
|
-
return;
|
|
38
|
-
settled = true;
|
|
39
|
-
signal.removeEventListener("abort", onAbort);
|
|
40
|
-
reject(err);
|
|
41
|
-
});
|
|
315
|
+
resolve();
|
|
316
|
+
});
|
|
42
317
|
});
|
|
318
|
+
}
|
|
319
|
+
emitError(error) {
|
|
320
|
+
for (const handler of this.errorHandlers) {
|
|
321
|
+
handler(error);
|
|
322
|
+
}
|
|
323
|
+
}
|
|
43
324
|
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
325
|
+
function parseContentLength(headers) {
|
|
326
|
+
for (const line of headers.split(`\r
|
|
327
|
+
`)) {
|
|
328
|
+
const separatorIndex = line.indexOf(":");
|
|
329
|
+
if (separatorIndex === -1)
|
|
330
|
+
continue;
|
|
331
|
+
const name = line.slice(0, separatorIndex).trim().toLowerCase();
|
|
332
|
+
if (name !== "content-length")
|
|
333
|
+
continue;
|
|
334
|
+
const value = Number.parseInt(line.slice(separatorIndex + 1).trim(), 10);
|
|
335
|
+
return Number.isFinite(value) && value >= 0 ? value : null;
|
|
336
|
+
}
|
|
337
|
+
return null;
|
|
338
|
+
}
|
|
339
|
+
function isJsonRpcObject(value) {
|
|
340
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
341
|
+
}
|
|
342
|
+
function getMessageId(message) {
|
|
343
|
+
const id = message["id"];
|
|
344
|
+
if (typeof id === "number" || typeof id === "string" || id === null)
|
|
345
|
+
return id;
|
|
346
|
+
return;
|
|
347
|
+
}
|
|
348
|
+
function jsonRpcErrorToError(value) {
|
|
349
|
+
if (!isJsonRpcObject(value))
|
|
350
|
+
return new Error("JSON-RPC request failed");
|
|
351
|
+
const message = typeof value["message"] === "string" ? value["message"] : "JSON-RPC request failed";
|
|
352
|
+
const error = new Error(message);
|
|
353
|
+
if (typeof value["code"] === "number") {
|
|
354
|
+
error.name = `JsonRpcError(${value["code"]})`;
|
|
355
|
+
}
|
|
356
|
+
return error;
|
|
357
|
+
}
|
|
358
|
+
function toError(error) {
|
|
359
|
+
return error instanceof Error ? error : new Error(String(error));
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
// ../lsp-core/src/lsp/process.ts
|
|
363
|
+
import { spawn, spawnSync } from "node:child_process";
|
|
364
|
+
import { existsSync, statSync } from "node:fs";
|
|
365
|
+
import { delimiter, join } from "node:path";
|
|
366
|
+
function isMissingProcessError(error) {
|
|
367
|
+
if (!(error instanceof Error) || !("code" in error))
|
|
368
|
+
return false;
|
|
369
|
+
return error.code === "ESRCH";
|
|
370
|
+
}
|
|
371
|
+
function reportKillError(context, error) {
|
|
372
|
+
if (!isMissingProcessError(error)) {
|
|
373
|
+
reportBestEffortCleanupError(context, error);
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
function validateCwd(cwd) {
|
|
377
|
+
try {
|
|
378
|
+
if (!existsSync(cwd)) {
|
|
379
|
+
return { valid: false, error: `Working directory does not exist: ${cwd}` };
|
|
67
380
|
}
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
reapStale() {
|
|
72
|
-
const t = this.now();
|
|
73
|
-
for (const [key, managed] of this.clients) {
|
|
74
|
-
if (managed.isInitializing &&
|
|
75
|
-
managed.initializingSince !== null &&
|
|
76
|
-
t - managed.initializingSince > this.initTimeoutMs) {
|
|
77
|
-
void stopClientBestEffort(managed.client);
|
|
78
|
-
this.clients.delete(key);
|
|
79
|
-
continue;
|
|
80
|
-
}
|
|
81
|
-
if (!managed.isInitializing &&
|
|
82
|
-
managed.refCount === 0 &&
|
|
83
|
-
managed.pendingWaiters === 0 &&
|
|
84
|
-
t - managed.lastUsedAt > this.idleTimeoutMs) {
|
|
85
|
-
void stopClientBestEffort(managed.client);
|
|
86
|
-
this.clients.delete(key);
|
|
87
|
-
}
|
|
88
|
-
}
|
|
381
|
+
const stats = statSync(cwd);
|
|
382
|
+
if (!stats.isDirectory()) {
|
|
383
|
+
return { valid: false, error: `Path is not a directory: ${cwd}` };
|
|
89
384
|
}
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
385
|
+
return { valid: true };
|
|
386
|
+
} catch (err) {
|
|
387
|
+
return {
|
|
388
|
+
valid: false,
|
|
389
|
+
error: `Cannot access working directory: ${cwd} (${err instanceof Error ? err.message : String(err)})`
|
|
390
|
+
};
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
function wrap(proc) {
|
|
394
|
+
const exitedPromise = new Promise((resolve) => {
|
|
395
|
+
proc.once("close", (code) => resolve(code ?? 0));
|
|
396
|
+
proc.once("error", () => resolve(1));
|
|
397
|
+
});
|
|
398
|
+
if (!proc.stdin || !proc.stdout || !proc.stderr) {
|
|
399
|
+
throw new LspProcessSpawnError("Spawned process is missing one of stdin/stdout/stderr pipes");
|
|
400
|
+
}
|
|
401
|
+
return {
|
|
402
|
+
stdin: proc.stdin,
|
|
403
|
+
stdout: proc.stdout,
|
|
404
|
+
stderr: proc.stderr,
|
|
405
|
+
get pid() {
|
|
406
|
+
return proc.pid ?? undefined;
|
|
407
|
+
},
|
|
408
|
+
get exitCode() {
|
|
409
|
+
return proc.exitCode;
|
|
410
|
+
},
|
|
411
|
+
get killed() {
|
|
412
|
+
return proc.killed;
|
|
413
|
+
},
|
|
414
|
+
exited: exitedPromise,
|
|
415
|
+
kill(signal) {
|
|
416
|
+
killProcessTree(proc, signal ?? "SIGTERM");
|
|
417
|
+
}
|
|
418
|
+
};
|
|
419
|
+
}
|
|
420
|
+
function killProcessTree(proc, signal) {
|
|
421
|
+
if (process.platform === "win32" && proc.pid) {
|
|
422
|
+
const result = spawnSync("taskkill", ["/pid", String(proc.pid), "/f", "/t"], { stdio: "ignore" });
|
|
423
|
+
if (!result.error && result.status === 0)
|
|
424
|
+
return;
|
|
425
|
+
if (result.error)
|
|
426
|
+
reportKillError("windows process tree kill", result.error);
|
|
427
|
+
}
|
|
428
|
+
if (process.platform !== "win32" && proc.pid) {
|
|
429
|
+
try {
|
|
430
|
+
process.kill(-proc.pid, signal);
|
|
431
|
+
return;
|
|
432
|
+
} catch (error) {
|
|
433
|
+
reportKillError("process group kill", error);
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
try {
|
|
437
|
+
proc.kill(signal);
|
|
438
|
+
} catch (error) {
|
|
439
|
+
reportKillError("process kill", error);
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
function isWindowsShellShim(command) {
|
|
443
|
+
const lowerCommand = command.toLowerCase();
|
|
444
|
+
return lowerCommand.endsWith(".cmd") || lowerCommand.endsWith(".bat");
|
|
445
|
+
}
|
|
446
|
+
function splitPath(pathValue, platform) {
|
|
447
|
+
const separator = platform === "win32" ? ";" : delimiter;
|
|
448
|
+
return pathValue.split(separator).filter(Boolean);
|
|
449
|
+
}
|
|
450
|
+
function getWindowsPathExtensions(env) {
|
|
451
|
+
const rawExtensions = env["PATHEXT"] ?? ".COM;.EXE;.BAT;.CMD";
|
|
452
|
+
const extensions = rawExtensions.split(";").map((extension) => extension.trim()).filter(Boolean).map((extension) => extension.startsWith(".") ? extension : `.${extension}`);
|
|
453
|
+
return [...new Set([...extensions, ".exe", ".cmd", ".bat", ""])];
|
|
454
|
+
}
|
|
455
|
+
function resolveWindowsCommand(command, env) {
|
|
456
|
+
const hasPathSeparator = command.includes("/") || command.includes("\\");
|
|
457
|
+
const pathValue = env["PATH"] ?? env["Path"] ?? "";
|
|
458
|
+
const baseDirectories = hasPathSeparator ? [""] : splitPath(pathValue, "win32");
|
|
459
|
+
const extensions = getWindowsPathExtensions(env);
|
|
460
|
+
for (const baseDirectory of baseDirectories) {
|
|
461
|
+
for (const extension of extensions) {
|
|
462
|
+
const candidate = baseDirectory ? join(baseDirectory, `${command}${extension}`) : `${command}${extension}`;
|
|
463
|
+
if (existsSync(candidate))
|
|
464
|
+
return candidate;
|
|
465
|
+
}
|
|
466
|
+
}
|
|
467
|
+
return command;
|
|
468
|
+
}
|
|
469
|
+
function createSpawnCommand(command, platform = process.platform, commandProcessor = process.env["ComSpec"] ?? "cmd.exe", env = process.env) {
|
|
470
|
+
const [cmd, ...args] = command;
|
|
471
|
+
if (!cmd) {
|
|
472
|
+
throw new LspProcessSpawnError("[lsp] empty command");
|
|
473
|
+
}
|
|
474
|
+
if (platform !== "win32") {
|
|
475
|
+
return { command: cmd, args, shell: false };
|
|
476
|
+
}
|
|
477
|
+
const resolvedCommand = resolveWindowsCommand(cmd, env);
|
|
478
|
+
if (!isWindowsShellShim(resolvedCommand)) {
|
|
479
|
+
return { command: resolvedCommand, args, shell: false };
|
|
480
|
+
}
|
|
481
|
+
return {
|
|
482
|
+
command: commandProcessor,
|
|
483
|
+
args: ["/d", "/s", "/c", resolvedCommand, ...args],
|
|
484
|
+
shell: false
|
|
485
|
+
};
|
|
486
|
+
}
|
|
487
|
+
function spawnProcess(command, options) {
|
|
488
|
+
const cwdValidation = validateCwd(options.cwd);
|
|
489
|
+
if (!cwdValidation.valid) {
|
|
490
|
+
throw new LspInvalidPathError(`[lsp] ${cwdValidation.error}`);
|
|
491
|
+
}
|
|
492
|
+
const [cmd] = command;
|
|
493
|
+
if (!cmd) {
|
|
494
|
+
throw new LspProcessSpawnError("[lsp] empty command");
|
|
495
|
+
}
|
|
496
|
+
const preparedCommand = createSpawnCommand(command, process.platform, process.env["ComSpec"] ?? "cmd.exe", options.env);
|
|
497
|
+
const proc = spawn(preparedCommand.command, preparedCommand.args, {
|
|
498
|
+
cwd: options.cwd,
|
|
499
|
+
env: options.env,
|
|
500
|
+
stdio: ["pipe", "pipe", "pipe"],
|
|
501
|
+
windowsHide: true,
|
|
502
|
+
shell: preparedCommand.shell,
|
|
503
|
+
detached: process.platform !== "win32"
|
|
504
|
+
});
|
|
505
|
+
return wrap(proc);
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
// ../lsp-core/src/lsp/transport.ts
|
|
509
|
+
function isRecord(value) {
|
|
510
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
511
|
+
}
|
|
512
|
+
function parseConfigurationItems(params) {
|
|
513
|
+
if (!isRecord(params) || !Array.isArray(params["items"]))
|
|
514
|
+
return [];
|
|
515
|
+
const items = [];
|
|
516
|
+
for (const item of params["items"]) {
|
|
517
|
+
if (!isRecord(item))
|
|
518
|
+
continue;
|
|
519
|
+
const section = item["section"];
|
|
520
|
+
items.push(section === undefined || typeof section !== "string" ? {} : { section });
|
|
521
|
+
}
|
|
522
|
+
return items;
|
|
523
|
+
}
|
|
524
|
+
function parseDiagnosticsParams(params) {
|
|
525
|
+
if (!isRecord(params) || typeof params["uri"] !== "string")
|
|
526
|
+
return null;
|
|
527
|
+
const diagnostics = Array.isArray(params["diagnostics"]) ? params["diagnostics"].filter(isDiagnostic) : [];
|
|
528
|
+
return { uri: params["uri"], diagnostics };
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
class LspClientTransport {
|
|
532
|
+
root;
|
|
533
|
+
server;
|
|
534
|
+
proc = null;
|
|
535
|
+
connection = null;
|
|
536
|
+
stderrBuffer = [];
|
|
537
|
+
processExited = false;
|
|
538
|
+
diagnosticsStore = new Map;
|
|
539
|
+
requestTimeoutMs;
|
|
540
|
+
initializeTimeoutMs;
|
|
541
|
+
constructor(root, server, timeouts = {}) {
|
|
542
|
+
this.root = root;
|
|
543
|
+
this.server = server;
|
|
544
|
+
this.requestTimeoutMs = timeouts.requestTimeoutMs ?? REQUEST_TIMEOUT_MS;
|
|
545
|
+
this.initializeTimeoutMs = timeouts.initializeTimeoutMs ?? INIT_TIMEOUT_MS;
|
|
546
|
+
}
|
|
547
|
+
pid() {
|
|
548
|
+
return this.proc?.pid;
|
|
549
|
+
}
|
|
550
|
+
command() {
|
|
551
|
+
return [...this.server.command];
|
|
552
|
+
}
|
|
553
|
+
async start() {
|
|
554
|
+
const env = createLspSpawnEnv(this.root, {
|
|
555
|
+
...process.env,
|
|
556
|
+
...this.server.env
|
|
557
|
+
});
|
|
558
|
+
this.proc = spawnProcess(this.server.command, {
|
|
559
|
+
cwd: this.root,
|
|
560
|
+
env
|
|
561
|
+
});
|
|
562
|
+
this.startStderrReading();
|
|
563
|
+
await new Promise((resolve) => setTimeout(resolve, 100));
|
|
564
|
+
if (this.proc.exitCode !== null) {
|
|
565
|
+
const stderr = this.stderrBuffer.join(`
|
|
566
|
+
`);
|
|
567
|
+
throw new LspProcessExitedError(this.server.id, this.root, this.proc.exitCode, stderr.slice(-2000));
|
|
568
|
+
}
|
|
569
|
+
this.connection = new JsonRpcConnection(this.proc.stdout, this.proc.stdin);
|
|
570
|
+
this.connection.onNotification("textDocument/publishDiagnostics", (params) => {
|
|
571
|
+
const diagnosticsParams = parseDiagnosticsParams(params);
|
|
572
|
+
if (diagnosticsParams?.uri) {
|
|
573
|
+
this.diagnosticsStore.set(diagnosticsParams.uri, diagnosticsParams.diagnostics);
|
|
574
|
+
}
|
|
575
|
+
});
|
|
576
|
+
this.connection.onRequest("workspace/configuration", (params) => {
|
|
577
|
+
const items = parseConfigurationItems(params);
|
|
578
|
+
return items.map((item) => {
|
|
579
|
+
if (item.section === "json")
|
|
580
|
+
return { validate: { enable: true } };
|
|
581
|
+
return {};
|
|
582
|
+
});
|
|
583
|
+
});
|
|
584
|
+
this.connection.onRequest("client/registerCapability", () => null);
|
|
585
|
+
this.connection.onRequest("window/workDoneProgress/create", () => null);
|
|
586
|
+
this.connection.onClose(() => {
|
|
587
|
+
this.processExited = true;
|
|
588
|
+
});
|
|
589
|
+
this.connection.onError((error) => {
|
|
590
|
+
reportBestEffortCleanupError("connection error notification", error);
|
|
591
|
+
});
|
|
592
|
+
this.connection.listen();
|
|
593
|
+
}
|
|
594
|
+
startStderrReading() {
|
|
595
|
+
if (!this.proc)
|
|
596
|
+
return;
|
|
597
|
+
this.proc.stderr.setEncoding("utf-8");
|
|
598
|
+
this.proc.stderr.on("data", (chunk) => {
|
|
599
|
+
this.stderrBuffer.push(chunk);
|
|
600
|
+
if (this.stderrBuffer.length > 100) {
|
|
601
|
+
this.stderrBuffer.shift();
|
|
602
|
+
}
|
|
603
|
+
});
|
|
604
|
+
}
|
|
605
|
+
isConnectionClosedError(error) {
|
|
606
|
+
if (!(error instanceof Error)) {
|
|
607
|
+
return false;
|
|
608
|
+
}
|
|
609
|
+
const code = "code" in error && typeof error.code === "string" ? error.code : undefined;
|
|
610
|
+
return code === "ERR_STREAM_DESTROYED" || /connection closed|connection is disposed|stream was destroyed/i.test(error.message);
|
|
611
|
+
}
|
|
612
|
+
async sendRequest(method, ...args) {
|
|
613
|
+
if (!this.connection)
|
|
614
|
+
throw new Error("LSP client not started");
|
|
615
|
+
if (this.processExited || this.proc && this.proc.exitCode !== null) {
|
|
616
|
+
const stderrTail = this.stderrBuffer.slice(-10).join(`
|
|
617
|
+
`);
|
|
618
|
+
throw new LspProcessExitedError(this.server.id, this.root, this.proc?.exitCode ?? null, stderrTail || undefined);
|
|
98
619
|
}
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
620
|
+
const timeoutMs = args[1]?.timeoutMs ?? this.requestTimeoutMs;
|
|
621
|
+
let timeoutHandle = null;
|
|
622
|
+
const timeoutPromise = new Promise((_, reject) => {
|
|
623
|
+
timeoutHandle = setTimeout(() => {
|
|
624
|
+
const stderrTail = this.stderrBuffer.slice(-5).join(`
|
|
625
|
+
`);
|
|
626
|
+
reject(new LspRequestTimeoutError(method, stderrTail || undefined));
|
|
627
|
+
}, timeoutMs);
|
|
628
|
+
});
|
|
629
|
+
try {
|
|
630
|
+
const requestPromise = args.length === 0 ? this.connection.sendRequest(method) : this.connection.sendRequest(method, args[0]);
|
|
631
|
+
const result = await Promise.race([requestPromise, timeoutPromise]);
|
|
632
|
+
if (timeoutHandle !== null)
|
|
633
|
+
clearTimeout(timeoutHandle);
|
|
634
|
+
return result;
|
|
635
|
+
} catch (error) {
|
|
636
|
+
if (timeoutHandle !== null)
|
|
637
|
+
clearTimeout(timeoutHandle);
|
|
638
|
+
if (this.processExited || this.proc && this.proc.exitCode !== null) {
|
|
639
|
+
throw new LspProcessExitedError(this.server.id, this.root, this.proc?.exitCode ?? null, this.stderrBuffer.slice(-10).join(`
|
|
640
|
+
`) || undefined);
|
|
641
|
+
}
|
|
642
|
+
if (this.isConnectionClosedError(error)) {
|
|
643
|
+
throw new LspConnectionClosedError(this.server.id, this.root, error.message);
|
|
644
|
+
}
|
|
645
|
+
throw error;
|
|
646
|
+
}
|
|
647
|
+
}
|
|
648
|
+
async sendNotification(method, ...args) {
|
|
649
|
+
if (!this.connection)
|
|
650
|
+
return;
|
|
651
|
+
if (this.processExited || this.proc && this.proc.exitCode !== null)
|
|
652
|
+
return;
|
|
653
|
+
try {
|
|
654
|
+
if (args.length === 0) {
|
|
655
|
+
await this.connection.sendNotification(method);
|
|
656
|
+
} else {
|
|
657
|
+
await this.connection.sendNotification(method, args[0]);
|
|
658
|
+
}
|
|
659
|
+
} catch (error) {
|
|
660
|
+
if (this.isConnectionClosedError(error)) {
|
|
661
|
+
throw new LspConnectionClosedError(this.server.id, this.root, error.message);
|
|
662
|
+
}
|
|
663
|
+
throw error;
|
|
664
|
+
}
|
|
665
|
+
}
|
|
666
|
+
isAlive() {
|
|
667
|
+
return this.proc !== null && !this.processExited && this.proc.exitCode === null;
|
|
668
|
+
}
|
|
669
|
+
async stop() {
|
|
670
|
+
if (this.connection) {
|
|
671
|
+
try {
|
|
672
|
+
await this.sendRequest("shutdown");
|
|
673
|
+
} catch (error) {
|
|
674
|
+
reportBestEffortCleanupError("shutdown request", error);
|
|
675
|
+
}
|
|
676
|
+
try {
|
|
677
|
+
await this.sendNotification("exit");
|
|
678
|
+
} catch (error) {
|
|
679
|
+
reportBestEffortCleanupError("exit notification", error);
|
|
680
|
+
}
|
|
681
|
+
try {
|
|
682
|
+
this.connection.dispose();
|
|
683
|
+
} catch (error) {
|
|
684
|
+
reportBestEffortCleanupError("connection dispose", error);
|
|
685
|
+
}
|
|
686
|
+
this.connection = null;
|
|
687
|
+
}
|
|
688
|
+
const proc = this.proc;
|
|
689
|
+
if (proc) {
|
|
690
|
+
this.proc = null;
|
|
691
|
+
let exitedBeforeTimeout = false;
|
|
692
|
+
try {
|
|
693
|
+
proc.kill();
|
|
694
|
+
let timeoutId;
|
|
695
|
+
const timeoutPromise = new Promise((resolve) => {
|
|
696
|
+
timeoutId = setTimeout(resolve, STOP_HARD_KILL_TIMEOUT_MS);
|
|
697
|
+
});
|
|
698
|
+
await Promise.race([
|
|
699
|
+
proc.exited.then(() => {
|
|
700
|
+
exitedBeforeTimeout = true;
|
|
701
|
+
}).finally(() => {
|
|
702
|
+
if (timeoutId)
|
|
703
|
+
clearTimeout(timeoutId);
|
|
704
|
+
}),
|
|
705
|
+
timeoutPromise
|
|
706
|
+
]);
|
|
707
|
+
if (!exitedBeforeTimeout) {
|
|
708
|
+
try {
|
|
709
|
+
proc.kill("SIGKILL");
|
|
710
|
+
await Promise.race([
|
|
711
|
+
proc.exited,
|
|
712
|
+
new Promise((resolve) => setTimeout(resolve, STOP_SIGKILL_GRACE_MS))
|
|
713
|
+
]);
|
|
714
|
+
} catch (error) {
|
|
715
|
+
reportBestEffortCleanupError("hard process kill", error);
|
|
716
|
+
}
|
|
102
717
|
}
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
718
|
+
} catch (error) {
|
|
719
|
+
reportBestEffortCleanupError("process stop", error);
|
|
720
|
+
}
|
|
721
|
+
}
|
|
722
|
+
this.processExited = true;
|
|
723
|
+
this.diagnosticsStore.clear();
|
|
724
|
+
}
|
|
725
|
+
getStoredDiagnostics(uri) {
|
|
726
|
+
return this.diagnosticsStore.get(uri) ?? [];
|
|
727
|
+
}
|
|
728
|
+
}
|
|
729
|
+
function createLspSpawnEnv(_root, input) {
|
|
730
|
+
return { ...input };
|
|
731
|
+
}
|
|
732
|
+
function isDiagnostic(value) {
|
|
733
|
+
return isRecord(value) && isRange(value["range"]) && typeof value["message"] === "string";
|
|
734
|
+
}
|
|
735
|
+
function isRange(value) {
|
|
736
|
+
return isRecord(value) && isPosition(value["start"]) && isPosition(value["end"]);
|
|
737
|
+
}
|
|
738
|
+
function isPosition(value) {
|
|
739
|
+
return isRecord(value) && typeof value["line"] === "number" && typeof value["character"] === "number";
|
|
740
|
+
}
|
|
741
|
+
|
|
742
|
+
// ../lsp-core/src/lsp/connection.ts
|
|
743
|
+
var INITIALIZE_SETTLE_MS = 300;
|
|
744
|
+
|
|
745
|
+
class LspClientConnection extends LspClientTransport {
|
|
746
|
+
async initialize() {
|
|
747
|
+
const rootUri = pathToFileURL(this.root).href;
|
|
748
|
+
await this.sendRequest("initialize", {
|
|
749
|
+
processId: process.pid,
|
|
750
|
+
rootUri,
|
|
751
|
+
rootPath: this.root,
|
|
752
|
+
workspaceFolders: [{ uri: rootUri, name: "workspace" }],
|
|
753
|
+
capabilities: {
|
|
754
|
+
textDocument: {
|
|
755
|
+
hover: { contentFormat: ["markdown", "plaintext"] },
|
|
756
|
+
definition: { linkSupport: true },
|
|
757
|
+
references: {},
|
|
758
|
+
documentSymbol: { hierarchicalDocumentSymbolSupport: true },
|
|
759
|
+
publishDiagnostics: {},
|
|
760
|
+
rename: {
|
|
761
|
+
prepareSupport: true,
|
|
762
|
+
prepareSupportDefaultBehavior: 1,
|
|
763
|
+
honorsChangeAnnotations: true
|
|
764
|
+
},
|
|
765
|
+
codeAction: {
|
|
766
|
+
codeActionLiteralSupport: {
|
|
767
|
+
codeActionKind: {
|
|
768
|
+
valueSet: [
|
|
769
|
+
"quickfix",
|
|
770
|
+
"refactor",
|
|
771
|
+
"refactor.extract",
|
|
772
|
+
"refactor.inline",
|
|
773
|
+
"refactor.rewrite",
|
|
774
|
+
"source",
|
|
775
|
+
"source.organizeImports",
|
|
776
|
+
"source.fixAll"
|
|
777
|
+
]
|
|
778
|
+
}
|
|
779
|
+
},
|
|
780
|
+
isPreferredSupport: true,
|
|
781
|
+
disabledSupport: true,
|
|
782
|
+
dataSupport: true,
|
|
783
|
+
resolveSupport: {
|
|
784
|
+
properties: ["edit", "command"]
|
|
114
785
|
}
|
|
786
|
+
}
|
|
787
|
+
},
|
|
788
|
+
workspace: {
|
|
789
|
+
symbol: {},
|
|
790
|
+
workspaceFolders: true,
|
|
791
|
+
configuration: true,
|
|
792
|
+
applyEdit: true,
|
|
793
|
+
workspaceEdit: {
|
|
794
|
+
documentChanges: true
|
|
795
|
+
}
|
|
115
796
|
}
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
797
|
+
},
|
|
798
|
+
initializationOptions: this.server.initialization
|
|
799
|
+
}, { timeoutMs: this.initializeTimeoutMs });
|
|
800
|
+
await this.sendNotification("initialized");
|
|
801
|
+
await this.sendNotification("workspace/didChangeConfiguration", {
|
|
802
|
+
settings: { json: { validate: { enable: true } } }
|
|
803
|
+
});
|
|
804
|
+
await new Promise((r) => setTimeout(r, INITIALIZE_SETTLE_MS));
|
|
805
|
+
}
|
|
806
|
+
}
|
|
807
|
+
|
|
808
|
+
// ../lsp-core/src/lsp/effective-extension.ts
|
|
809
|
+
import { basename, extname } from "node:path";
|
|
810
|
+
var BASENAME_EXTENSIONS = {
|
|
811
|
+
Dockerfile: ".dockerfile",
|
|
812
|
+
Containerfile: ".dockerfile"
|
|
813
|
+
};
|
|
814
|
+
function effectiveExtension(filePath) {
|
|
815
|
+
return BASENAME_EXTENSIONS[basename(filePath)] ?? extname(filePath);
|
|
816
|
+
}
|
|
817
|
+
|
|
818
|
+
// ../lsp-core/src/lsp/language-mappings.ts
|
|
819
|
+
var SYMBOL_KIND_MAP = {
|
|
820
|
+
1: "File",
|
|
821
|
+
2: "Module",
|
|
822
|
+
3: "Namespace",
|
|
823
|
+
4: "Package",
|
|
824
|
+
5: "Class",
|
|
825
|
+
6: "Method",
|
|
826
|
+
7: "Property",
|
|
827
|
+
8: "Field",
|
|
828
|
+
9: "Constructor",
|
|
829
|
+
10: "Enum",
|
|
830
|
+
11: "Interface",
|
|
831
|
+
12: "Function",
|
|
832
|
+
13: "Variable",
|
|
833
|
+
14: "Constant",
|
|
834
|
+
15: "String",
|
|
835
|
+
16: "Number",
|
|
836
|
+
17: "Boolean",
|
|
837
|
+
18: "Array",
|
|
838
|
+
19: "Object",
|
|
839
|
+
20: "Key",
|
|
840
|
+
21: "Null",
|
|
841
|
+
22: "EnumMember",
|
|
842
|
+
23: "Struct",
|
|
843
|
+
24: "Event",
|
|
844
|
+
25: "Operator",
|
|
845
|
+
26: "TypeParameter"
|
|
846
|
+
};
|
|
847
|
+
var SEVERITY_MAP = {
|
|
848
|
+
1: "error",
|
|
849
|
+
2: "warning",
|
|
850
|
+
3: "information",
|
|
851
|
+
4: "hint"
|
|
852
|
+
};
|
|
853
|
+
var EXT_TO_LANG = {
|
|
854
|
+
".abap": "abap",
|
|
855
|
+
".bat": "bat",
|
|
856
|
+
".bib": "bibtex",
|
|
857
|
+
".bibtex": "bibtex",
|
|
858
|
+
".clj": "clojure",
|
|
859
|
+
".cljs": "clojure",
|
|
860
|
+
".cljc": "clojure",
|
|
861
|
+
".edn": "clojure",
|
|
862
|
+
".coffee": "coffeescript",
|
|
863
|
+
".c": "c",
|
|
864
|
+
".cpp": "cpp",
|
|
865
|
+
".cxx": "cpp",
|
|
866
|
+
".cc": "cpp",
|
|
867
|
+
".c++": "cpp",
|
|
868
|
+
".cs": "csharp",
|
|
869
|
+
".css": "css",
|
|
870
|
+
".d": "d",
|
|
871
|
+
".pas": "pascal",
|
|
872
|
+
".pascal": "pascal",
|
|
873
|
+
".diff": "diff",
|
|
874
|
+
".patch": "diff",
|
|
875
|
+
".dart": "dart",
|
|
876
|
+
".dockerfile": "dockerfile",
|
|
877
|
+
".ex": "elixir",
|
|
878
|
+
".exs": "elixir",
|
|
879
|
+
".erl": "erlang",
|
|
880
|
+
".hrl": "erlang",
|
|
881
|
+
".fs": "fsharp",
|
|
882
|
+
".fsi": "fsharp",
|
|
883
|
+
".fsx": "fsharp",
|
|
884
|
+
".fsscript": "fsharp",
|
|
885
|
+
".gitcommit": "git-commit",
|
|
886
|
+
".gitrebase": "git-rebase",
|
|
887
|
+
".go": "go",
|
|
888
|
+
".groovy": "groovy",
|
|
889
|
+
".gleam": "gleam",
|
|
890
|
+
".hbs": "handlebars",
|
|
891
|
+
".handlebars": "handlebars",
|
|
892
|
+
".hs": "haskell",
|
|
893
|
+
".html": "html",
|
|
894
|
+
".htm": "html",
|
|
895
|
+
".ini": "ini",
|
|
896
|
+
".java": "java",
|
|
897
|
+
".jl": "julia",
|
|
898
|
+
".js": "javascript",
|
|
899
|
+
".jsx": "javascriptreact",
|
|
900
|
+
".json": "json",
|
|
901
|
+
".jsonc": "jsonc",
|
|
902
|
+
".tex": "latex",
|
|
903
|
+
".latex": "latex",
|
|
904
|
+
".less": "less",
|
|
905
|
+
".lua": "lua",
|
|
906
|
+
".makefile": "makefile",
|
|
907
|
+
makefile: "makefile",
|
|
908
|
+
".md": "markdown",
|
|
909
|
+
".markdown": "markdown",
|
|
910
|
+
".m": "objective-c",
|
|
911
|
+
".mm": "objective-cpp",
|
|
912
|
+
".pl": "perl",
|
|
913
|
+
".pm": "perl",
|
|
914
|
+
".pm6": "perl6",
|
|
915
|
+
".php": "php",
|
|
916
|
+
".ps1": "powershell",
|
|
917
|
+
".psm1": "powershell",
|
|
918
|
+
".pug": "jade",
|
|
919
|
+
".jade": "jade",
|
|
920
|
+
".py": "python",
|
|
921
|
+
".pyi": "python",
|
|
922
|
+
".r": "r",
|
|
923
|
+
".cshtml": "razor",
|
|
924
|
+
".razor": "razor",
|
|
925
|
+
".rb": "ruby",
|
|
926
|
+
".rake": "ruby",
|
|
927
|
+
".gemspec": "ruby",
|
|
928
|
+
".ru": "ruby",
|
|
929
|
+
".erb": "erb",
|
|
930
|
+
".html.erb": "erb",
|
|
931
|
+
".js.erb": "erb",
|
|
932
|
+
".css.erb": "erb",
|
|
933
|
+
".json.erb": "erb",
|
|
934
|
+
".rs": "rust",
|
|
935
|
+
".scss": "scss",
|
|
936
|
+
".sass": "sass",
|
|
937
|
+
".scala": "scala",
|
|
938
|
+
".shader": "shaderlab",
|
|
939
|
+
".sh": "shellscript",
|
|
940
|
+
".bash": "shellscript",
|
|
941
|
+
".zsh": "shellscript",
|
|
942
|
+
".ksh": "shellscript",
|
|
943
|
+
".sql": "sql",
|
|
944
|
+
".svelte": "svelte",
|
|
945
|
+
".swift": "swift",
|
|
946
|
+
".ts": "typescript",
|
|
947
|
+
".tsx": "typescriptreact",
|
|
948
|
+
".mts": "typescript",
|
|
949
|
+
".cts": "typescript",
|
|
950
|
+
".mtsx": "typescriptreact",
|
|
951
|
+
".ctsx": "typescriptreact",
|
|
952
|
+
".xml": "xml",
|
|
953
|
+
".xsl": "xsl",
|
|
954
|
+
".yaml": "yaml",
|
|
955
|
+
".yml": "yaml",
|
|
956
|
+
".mjs": "javascript",
|
|
957
|
+
".cjs": "javascript",
|
|
958
|
+
".vue": "vue",
|
|
959
|
+
".zig": "zig",
|
|
960
|
+
".zon": "zig",
|
|
961
|
+
".astro": "astro",
|
|
962
|
+
".ml": "ocaml",
|
|
963
|
+
".mli": "ocaml",
|
|
964
|
+
".tf": "terraform",
|
|
965
|
+
".tfvars": "terraform-vars",
|
|
966
|
+
".hcl": "hcl",
|
|
967
|
+
".nix": "nix",
|
|
968
|
+
".typ": "typst",
|
|
969
|
+
".typc": "typst",
|
|
970
|
+
".ets": "typescript",
|
|
971
|
+
".lhs": "haskell",
|
|
972
|
+
".kt": "kotlin",
|
|
973
|
+
".kts": "kotlin",
|
|
974
|
+
".prisma": "prisma",
|
|
975
|
+
".h": "c",
|
|
976
|
+
".hpp": "cpp",
|
|
977
|
+
".hh": "cpp",
|
|
978
|
+
".hxx": "cpp",
|
|
979
|
+
".h++": "cpp",
|
|
980
|
+
".objc": "objective-c",
|
|
981
|
+
".objcpp": "objective-cpp",
|
|
982
|
+
".fish": "fish",
|
|
983
|
+
".graphql": "graphql",
|
|
984
|
+
".gql": "graphql"
|
|
985
|
+
};
|
|
986
|
+
function getLanguageId(ext) {
|
|
987
|
+
return EXT_TO_LANG[ext] ?? "plaintext";
|
|
988
|
+
}
|
|
989
|
+
|
|
990
|
+
// ../lsp-core/src/lsp/client.ts
|
|
991
|
+
var POST_OPEN_DELAY_MS = 1000;
|
|
992
|
+
var POST_DIAGNOSTICS_WAIT_MS = 500;
|
|
993
|
+
|
|
994
|
+
class LspClient extends LspClientConnection {
|
|
995
|
+
openedFiles = new Set;
|
|
996
|
+
documentVersions = new Map;
|
|
997
|
+
lastSyncedText = new Map;
|
|
998
|
+
diagnosticPullErrors = [];
|
|
999
|
+
getDiagnosticPullErrors() {
|
|
1000
|
+
return this.diagnosticPullErrors;
|
|
1001
|
+
}
|
|
1002
|
+
async openFile(filePath) {
|
|
1003
|
+
const absPath = resolve(contextCwd(), filePath);
|
|
1004
|
+
const uri = pathToFileURL2(absPath).href;
|
|
1005
|
+
const text = readFileSync(absPath, "utf-8");
|
|
1006
|
+
if (!this.openedFiles.has(absPath)) {
|
|
1007
|
+
const ext = effectiveExtension(absPath);
|
|
1008
|
+
const languageId = getLanguageId(ext);
|
|
1009
|
+
const version = 1;
|
|
1010
|
+
await this.sendNotification("textDocument/didOpen", {
|
|
1011
|
+
textDocument: {
|
|
1012
|
+
uri,
|
|
1013
|
+
languageId,
|
|
1014
|
+
version,
|
|
1015
|
+
text
|
|
141
1016
|
}
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
1017
|
+
});
|
|
1018
|
+
this.openedFiles.add(absPath);
|
|
1019
|
+
this.documentVersions.set(uri, version);
|
|
1020
|
+
this.lastSyncedText.set(uri, text);
|
|
1021
|
+
await new Promise((r) => setTimeout(r, POST_OPEN_DELAY_MS));
|
|
1022
|
+
return;
|
|
1023
|
+
}
|
|
1024
|
+
const prevText = this.lastSyncedText.get(uri);
|
|
1025
|
+
if (prevText === text) {
|
|
1026
|
+
return;
|
|
1027
|
+
}
|
|
1028
|
+
const nextVersion = (this.documentVersions.get(uri) ?? 1) + 1;
|
|
1029
|
+
this.documentVersions.set(uri, nextVersion);
|
|
1030
|
+
this.lastSyncedText.set(uri, text);
|
|
1031
|
+
await this.sendNotification("textDocument/didChange", {
|
|
1032
|
+
textDocument: { uri, version: nextVersion },
|
|
1033
|
+
contentChanges: [{ text }]
|
|
1034
|
+
});
|
|
1035
|
+
await this.sendNotification("textDocument/didSave", {
|
|
1036
|
+
textDocument: { uri },
|
|
1037
|
+
text
|
|
1038
|
+
});
|
|
1039
|
+
}
|
|
1040
|
+
async definition(filePath, line, character) {
|
|
1041
|
+
const absPath = resolve(contextCwd(), filePath);
|
|
1042
|
+
await this.openFile(absPath);
|
|
1043
|
+
return this.sendRequest("textDocument/definition", {
|
|
1044
|
+
textDocument: { uri: pathToFileURL2(absPath).href },
|
|
1045
|
+
position: { line: line - 1, character }
|
|
1046
|
+
});
|
|
1047
|
+
}
|
|
1048
|
+
async references(filePath, line, character, includeDeclaration = true) {
|
|
1049
|
+
const absPath = resolve(contextCwd(), filePath);
|
|
1050
|
+
await this.openFile(absPath);
|
|
1051
|
+
return this.sendRequest("textDocument/references", {
|
|
1052
|
+
textDocument: { uri: pathToFileURL2(absPath).href },
|
|
1053
|
+
position: { line: line - 1, character },
|
|
1054
|
+
context: { includeDeclaration }
|
|
1055
|
+
});
|
|
1056
|
+
}
|
|
1057
|
+
async documentSymbols(filePath) {
|
|
1058
|
+
const absPath = resolve(contextCwd(), filePath);
|
|
1059
|
+
await this.openFile(absPath);
|
|
1060
|
+
return this.sendRequest("textDocument/documentSymbol", {
|
|
1061
|
+
textDocument: { uri: pathToFileURL2(absPath).href }
|
|
1062
|
+
});
|
|
1063
|
+
}
|
|
1064
|
+
async workspaceSymbols(query) {
|
|
1065
|
+
return this.sendRequest("workspace/symbol", { query });
|
|
1066
|
+
}
|
|
1067
|
+
isUnsupportedDiagnosticPullError(error) {
|
|
1068
|
+
if (!(error instanceof Error))
|
|
1069
|
+
return false;
|
|
1070
|
+
const code = "code" in error && typeof error.code === "number" ? error.code : undefined;
|
|
1071
|
+
if (code === -32601)
|
|
1072
|
+
return true;
|
|
1073
|
+
return /unsupported|not supported|method not found|unknown request/i.test(error.message);
|
|
1074
|
+
}
|
|
1075
|
+
async diagnostics(filePath) {
|
|
1076
|
+
const absPath = resolve(contextCwd(), filePath);
|
|
1077
|
+
const uri = pathToFileURL2(absPath).href;
|
|
1078
|
+
await this.openFile(absPath);
|
|
1079
|
+
await new Promise((r) => setTimeout(r, POST_DIAGNOSTICS_WAIT_MS));
|
|
1080
|
+
try {
|
|
1081
|
+
const result = await this.sendRequest("textDocument/diagnostic", {
|
|
1082
|
+
textDocument: { uri }
|
|
1083
|
+
});
|
|
1084
|
+
if (result.items) {
|
|
1085
|
+
return { items: result.items };
|
|
1086
|
+
}
|
|
1087
|
+
} catch (error) {
|
|
1088
|
+
if (!this.isUnsupportedDiagnosticPullError(error)) {
|
|
1089
|
+
this.diagnosticPullErrors.push(error instanceof Error ? error : new Error(String(error)));
|
|
1090
|
+
}
|
|
1091
|
+
}
|
|
1092
|
+
return { items: this.getStoredDiagnostics(uri) };
|
|
1093
|
+
}
|
|
1094
|
+
async prepareRename(filePath, line, character) {
|
|
1095
|
+
const absPath = resolve(contextCwd(), filePath);
|
|
1096
|
+
await this.openFile(absPath);
|
|
1097
|
+
return this.sendRequest("textDocument/prepareRename", {
|
|
1098
|
+
textDocument: { uri: pathToFileURL2(absPath).href },
|
|
1099
|
+
position: { line: line - 1, character }
|
|
1100
|
+
});
|
|
1101
|
+
}
|
|
1102
|
+
async rename(filePath, line, character, newName) {
|
|
1103
|
+
const absPath = resolve(contextCwd(), filePath);
|
|
1104
|
+
await this.openFile(absPath);
|
|
1105
|
+
return this.sendRequest("textDocument/rename", {
|
|
1106
|
+
textDocument: { uri: pathToFileURL2(absPath).href },
|
|
1107
|
+
position: { line: line - 1, character },
|
|
1108
|
+
newName
|
|
1109
|
+
});
|
|
1110
|
+
}
|
|
1111
|
+
}
|
|
1112
|
+
|
|
1113
|
+
// ../lsp-core/src/lsp/process-signal-cleanup.ts
|
|
1114
|
+
function installProcessSignalCleanup(cleanup) {
|
|
1115
|
+
const signals = process.platform === "win32" ? ["SIGINT", "SIGTERM", "SIGBREAK"] : ["SIGINT", "SIGTERM"];
|
|
1116
|
+
const handler = () => {
|
|
1117
|
+
cleanup().catch((error) => {
|
|
1118
|
+
reportBestEffortCleanupError("signal cleanup", error);
|
|
1119
|
+
});
|
|
1120
|
+
};
|
|
1121
|
+
for (const signal of signals) {
|
|
1122
|
+
process.on(signal, handler);
|
|
1123
|
+
}
|
|
1124
|
+
return () => {
|
|
1125
|
+
for (const signal of signals) {
|
|
1126
|
+
process.removeListener(signal, handler);
|
|
1127
|
+
}
|
|
1128
|
+
};
|
|
1129
|
+
}
|
|
1130
|
+
|
|
1131
|
+
// ../lsp-core/src/lsp/manager.ts
|
|
1132
|
+
async function stopClientBestEffort(client) {
|
|
1133
|
+
try {
|
|
1134
|
+
await client.stop();
|
|
1135
|
+
} catch (error) {
|
|
1136
|
+
reportBestEffortCleanupError("client stop", error);
|
|
1137
|
+
}
|
|
1138
|
+
}
|
|
1139
|
+
function awaitWithSignal(promise, signal) {
|
|
1140
|
+
if (!signal)
|
|
1141
|
+
return promise;
|
|
1142
|
+
return new Promise((resolve2, reject) => {
|
|
1143
|
+
let settled = false;
|
|
1144
|
+
const onAbort = () => {
|
|
1145
|
+
if (settled)
|
|
1146
|
+
return;
|
|
1147
|
+
settled = true;
|
|
1148
|
+
reject(new DOMException("Aborted", "AbortError"));
|
|
1149
|
+
};
|
|
1150
|
+
if (signal.aborted) {
|
|
1151
|
+
onAbort();
|
|
1152
|
+
return;
|
|
1153
|
+
}
|
|
1154
|
+
signal.addEventListener("abort", onAbort, { once: true });
|
|
1155
|
+
promise.then((value) => {
|
|
1156
|
+
if (settled)
|
|
1157
|
+
return;
|
|
1158
|
+
settled = true;
|
|
1159
|
+
signal.removeEventListener("abort", onAbort);
|
|
1160
|
+
resolve2(value);
|
|
1161
|
+
}, (err) => {
|
|
1162
|
+
if (settled)
|
|
1163
|
+
return;
|
|
1164
|
+
settled = true;
|
|
1165
|
+
signal.removeEventListener("abort", onAbort);
|
|
1166
|
+
reject(err);
|
|
1167
|
+
});
|
|
1168
|
+
});
|
|
1169
|
+
}
|
|
1170
|
+
|
|
1171
|
+
class LspManager {
|
|
1172
|
+
clients = new Map;
|
|
1173
|
+
reaperHandle = null;
|
|
1174
|
+
signalDisposer = null;
|
|
1175
|
+
disposed = false;
|
|
1176
|
+
idleTimeoutMs;
|
|
1177
|
+
initTimeoutMs;
|
|
1178
|
+
reaperIntervalMs;
|
|
1179
|
+
clientFactory;
|
|
1180
|
+
now;
|
|
1181
|
+
constructor(options = {}) {
|
|
1182
|
+
this.idleTimeoutMs = options.idleTimeoutMs ?? IDLE_TIMEOUT_MS;
|
|
1183
|
+
this.initTimeoutMs = options.initTimeoutMs ?? INIT_TIMEOUT_MS;
|
|
1184
|
+
this.reaperIntervalMs = options.reaperIntervalMs ?? REAPER_INTERVAL_MS;
|
|
1185
|
+
this.clientFactory = options.clientFactory ?? ((root, server) => new LspClient(root, server));
|
|
1186
|
+
this.now = options.now ?? (() => Date.now());
|
|
1187
|
+
this.startReaper();
|
|
1188
|
+
this.signalDisposer = installProcessSignalCleanup(() => this.stopAll());
|
|
1189
|
+
}
|
|
1190
|
+
startReaper() {
|
|
1191
|
+
if (this.reaperHandle)
|
|
1192
|
+
return;
|
|
1193
|
+
this.reaperHandle = setInterval(() => {
|
|
1194
|
+
this.reapStale();
|
|
1195
|
+
}, this.reaperIntervalMs);
|
|
1196
|
+
if (typeof this.reaperHandle.unref === "function") {
|
|
1197
|
+
this.reaperHandle.unref();
|
|
1198
|
+
}
|
|
1199
|
+
}
|
|
1200
|
+
getKey(root, serverId) {
|
|
1201
|
+
return `${root}::${serverId}`;
|
|
1202
|
+
}
|
|
1203
|
+
reapStale() {
|
|
1204
|
+
const t = this.now();
|
|
1205
|
+
for (const [key, managed] of this.clients) {
|
|
1206
|
+
if (managed.isInitializing && managed.initializingSince !== null && t - managed.initializingSince > this.initTimeoutMs) {
|
|
1207
|
+
stopClientBestEffort(managed.client);
|
|
1208
|
+
this.clients.delete(key);
|
|
1209
|
+
continue;
|
|
1210
|
+
}
|
|
1211
|
+
if (!managed.isInitializing && managed.refCount === 0 && managed.pendingWaiters === 0 && t - managed.lastUsedAt > this.idleTimeoutMs) {
|
|
1212
|
+
stopClientBestEffort(managed.client);
|
|
1213
|
+
this.clients.delete(key);
|
|
1214
|
+
}
|
|
1215
|
+
}
|
|
1216
|
+
}
|
|
1217
|
+
async tryDeleteIfOrphaned(key, managed) {
|
|
1218
|
+
if (managed.refCount === 0 && managed.pendingWaiters === 0 && !managed.isInitializing && this.clients.get(key) === managed) {
|
|
1219
|
+
this.clients.delete(key);
|
|
1220
|
+
await stopClientBestEffort(managed.client);
|
|
1221
|
+
}
|
|
1222
|
+
}
|
|
1223
|
+
async getClient(root, server, signal) {
|
|
1224
|
+
if (this.disposed) {
|
|
1225
|
+
throw new Error("LspManager has been disposed");
|
|
1226
|
+
}
|
|
1227
|
+
signal?.throwIfAborted();
|
|
1228
|
+
const key = this.getKey(root, server.id);
|
|
1229
|
+
let managed = this.clients.get(key);
|
|
1230
|
+
if (managed) {
|
|
1231
|
+
const t = this.now();
|
|
1232
|
+
if (managed.isInitializing && managed.initializingSince !== null && t - managed.initializingSince > this.initTimeoutMs) {
|
|
1233
|
+
await stopClientBestEffort(managed.client);
|
|
1234
|
+
this.clients.delete(key);
|
|
1235
|
+
managed = undefined;
|
|
1236
|
+
}
|
|
1237
|
+
}
|
|
1238
|
+
if (managed) {
|
|
1239
|
+
if (managed.initPromise) {
|
|
1240
|
+
managed.pendingWaiters++;
|
|
158
1241
|
try {
|
|
159
|
-
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
this.clients.delete(key);
|
|
165
|
-
}
|
|
166
|
-
await stopClientBestEffort(client);
|
|
167
|
-
throw err;
|
|
168
|
-
}
|
|
169
|
-
newManaged.pendingWaiters--;
|
|
170
|
-
newManaged.isInitializing = false;
|
|
171
|
-
newManaged.initializingSince = null;
|
|
172
|
-
newManaged.initPromise = null;
|
|
173
|
-
if (signal?.aborted) {
|
|
174
|
-
await this.tryDeleteIfOrphaned(key, newManaged);
|
|
175
|
-
signal.throwIfAborted();
|
|
176
|
-
}
|
|
177
|
-
newManaged.refCount++;
|
|
178
|
-
newManaged.lastUsedAt = this.now();
|
|
179
|
-
return client;
|
|
180
|
-
}
|
|
181
|
-
releaseClient(root, serverId) {
|
|
182
|
-
const key = this.getKey(root, serverId);
|
|
183
|
-
const managed = this.clients.get(key);
|
|
184
|
-
if (managed && managed.refCount > 0) {
|
|
185
|
-
managed.refCount--;
|
|
186
|
-
managed.lastUsedAt = this.now();
|
|
1242
|
+
await awaitWithSignal(managed.initPromise, signal);
|
|
1243
|
+
} catch (err) {
|
|
1244
|
+
managed.pendingWaiters--;
|
|
1245
|
+
await this.tryDeleteIfOrphaned(key, managed);
|
|
1246
|
+
throw err;
|
|
187
1247
|
}
|
|
1248
|
+
managed.pendingWaiters--;
|
|
1249
|
+
}
|
|
1250
|
+
if (signal?.aborted) {
|
|
1251
|
+
await this.tryDeleteIfOrphaned(key, managed);
|
|
1252
|
+
signal.throwIfAborted();
|
|
1253
|
+
}
|
|
1254
|
+
if (!managed.client.isAlive()) {
|
|
1255
|
+
await stopClientBestEffort(managed.client);
|
|
1256
|
+
this.clients.delete(key);
|
|
1257
|
+
return this.getClient(root, server, signal);
|
|
1258
|
+
}
|
|
1259
|
+
managed.refCount++;
|
|
1260
|
+
managed.lastUsedAt = this.now();
|
|
1261
|
+
return managed.client;
|
|
188
1262
|
}
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
1263
|
+
const client = this.clientFactory(root, server);
|
|
1264
|
+
const initStartedAt = this.now();
|
|
1265
|
+
const initPromise = (async () => {
|
|
1266
|
+
await client.start();
|
|
1267
|
+
await client.initialize();
|
|
1268
|
+
})();
|
|
1269
|
+
const newManaged = {
|
|
1270
|
+
client,
|
|
1271
|
+
refCount: 0,
|
|
1272
|
+
pendingWaiters: 1,
|
|
1273
|
+
lastUsedAt: initStartedAt,
|
|
1274
|
+
initPromise,
|
|
1275
|
+
isInitializing: true,
|
|
1276
|
+
initializingSince: initStartedAt
|
|
1277
|
+
};
|
|
1278
|
+
this.clients.set(key, newManaged);
|
|
1279
|
+
try {
|
|
1280
|
+
await awaitWithSignal(initPromise, signal);
|
|
1281
|
+
} catch (err) {
|
|
1282
|
+
newManaged.pendingWaiters--;
|
|
1283
|
+
if (this.clients.get(key) === newManaged) {
|
|
196
1284
|
this.clients.delete(key);
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
if (this.disposed)
|
|
201
|
-
return;
|
|
202
|
-
const key = this.getKey(root, server.id);
|
|
203
|
-
if (this.clients.has(key))
|
|
204
|
-
return;
|
|
205
|
-
const client = this.clientFactory(root, server);
|
|
206
|
-
const initStartedAt = this.now();
|
|
207
|
-
const initPromise = (async () => {
|
|
208
|
-
await client.start();
|
|
209
|
-
await client.initialize();
|
|
210
|
-
})();
|
|
211
|
-
const managed = {
|
|
212
|
-
client,
|
|
213
|
-
refCount: 0,
|
|
214
|
-
pendingWaiters: 0,
|
|
215
|
-
lastUsedAt: initStartedAt,
|
|
216
|
-
initPromise,
|
|
217
|
-
isInitializing: true,
|
|
218
|
-
initializingSince: initStartedAt,
|
|
219
|
-
};
|
|
220
|
-
this.clients.set(key, managed);
|
|
221
|
-
initPromise.then(() => {
|
|
222
|
-
managed.isInitializing = false;
|
|
223
|
-
managed.initializingSince = null;
|
|
224
|
-
managed.initPromise = null;
|
|
225
|
-
managed.lastUsedAt = this.now();
|
|
226
|
-
}, () => {
|
|
227
|
-
if (this.clients.get(key) === managed) {
|
|
228
|
-
this.clients.delete(key);
|
|
229
|
-
}
|
|
230
|
-
void stopClientBestEffort(client);
|
|
231
|
-
});
|
|
1285
|
+
}
|
|
1286
|
+
await stopClientBestEffort(client);
|
|
1287
|
+
throw err;
|
|
232
1288
|
}
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
}
|
|
252
|
-
return snapshots;
|
|
1289
|
+
newManaged.pendingWaiters--;
|
|
1290
|
+
newManaged.isInitializing = false;
|
|
1291
|
+
newManaged.initializingSince = null;
|
|
1292
|
+
newManaged.initPromise = null;
|
|
1293
|
+
if (signal?.aborted) {
|
|
1294
|
+
await this.tryDeleteIfOrphaned(key, newManaged);
|
|
1295
|
+
signal.throwIfAborted();
|
|
1296
|
+
}
|
|
1297
|
+
newManaged.refCount++;
|
|
1298
|
+
newManaged.lastUsedAt = this.now();
|
|
1299
|
+
return client;
|
|
1300
|
+
}
|
|
1301
|
+
releaseClient(root, serverId) {
|
|
1302
|
+
const key = this.getKey(root, serverId);
|
|
1303
|
+
const managed = this.clients.get(key);
|
|
1304
|
+
if (managed && managed.refCount > 0) {
|
|
1305
|
+
managed.refCount--;
|
|
1306
|
+
managed.lastUsedAt = this.now();
|
|
253
1307
|
}
|
|
254
|
-
|
|
255
|
-
|
|
1308
|
+
}
|
|
1309
|
+
invalidateClient(root, serverId, client) {
|
|
1310
|
+
const key = this.getKey(root, serverId);
|
|
1311
|
+
const managed = this.clients.get(key);
|
|
1312
|
+
if (!managed)
|
|
1313
|
+
return;
|
|
1314
|
+
if (client && managed.client !== client)
|
|
1315
|
+
return;
|
|
1316
|
+
this.clients.delete(key);
|
|
1317
|
+
stopClientBestEffort(managed.client);
|
|
1318
|
+
}
|
|
1319
|
+
warmupClient(root, server) {
|
|
1320
|
+
if (this.disposed)
|
|
1321
|
+
return;
|
|
1322
|
+
const key = this.getKey(root, server.id);
|
|
1323
|
+
if (this.clients.has(key))
|
|
1324
|
+
return;
|
|
1325
|
+
const client = this.clientFactory(root, server);
|
|
1326
|
+
const initStartedAt = this.now();
|
|
1327
|
+
const initPromise = (async () => {
|
|
1328
|
+
await client.start();
|
|
1329
|
+
await client.initialize();
|
|
1330
|
+
})();
|
|
1331
|
+
const managed = {
|
|
1332
|
+
client,
|
|
1333
|
+
refCount: 0,
|
|
1334
|
+
pendingWaiters: 0,
|
|
1335
|
+
lastUsedAt: initStartedAt,
|
|
1336
|
+
initPromise,
|
|
1337
|
+
isInitializing: true,
|
|
1338
|
+
initializingSince: initStartedAt
|
|
1339
|
+
};
|
|
1340
|
+
this.clients.set(key, managed);
|
|
1341
|
+
initPromise.then(() => {
|
|
1342
|
+
managed.isInitializing = false;
|
|
1343
|
+
managed.initializingSince = null;
|
|
1344
|
+
managed.initPromise = null;
|
|
1345
|
+
managed.lastUsedAt = this.now();
|
|
1346
|
+
}, () => {
|
|
1347
|
+
if (this.clients.get(key) === managed) {
|
|
1348
|
+
this.clients.delete(key);
|
|
1349
|
+
}
|
|
1350
|
+
stopClientBestEffort(client);
|
|
1351
|
+
});
|
|
1352
|
+
}
|
|
1353
|
+
isServerInitializing(root, serverId) {
|
|
1354
|
+
const managed = this.clients.get(this.getKey(root, serverId));
|
|
1355
|
+
return managed?.isInitializing ?? false;
|
|
1356
|
+
}
|
|
1357
|
+
getSnapshot() {
|
|
1358
|
+
const snapshots = [];
|
|
1359
|
+
for (const [key, managed] of this.clients) {
|
|
1360
|
+
const [root, serverId] = key.split("::");
|
|
1361
|
+
snapshots.push({
|
|
1362
|
+
root,
|
|
1363
|
+
serverId,
|
|
1364
|
+
refCount: managed.refCount,
|
|
1365
|
+
pendingWaiters: managed.pendingWaiters,
|
|
1366
|
+
lastUsedAt: managed.lastUsedAt,
|
|
1367
|
+
isInitializing: managed.isInitializing,
|
|
1368
|
+
alive: managed.client.isAlive(),
|
|
1369
|
+
command: managed.client.command()
|
|
1370
|
+
});
|
|
256
1371
|
}
|
|
257
|
-
|
|
258
|
-
|
|
1372
|
+
return snapshots;
|
|
1373
|
+
}
|
|
1374
|
+
hasClient(root, serverId) {
|
|
1375
|
+
return this.clients.has(this.getKey(root, serverId));
|
|
1376
|
+
}
|
|
1377
|
+
clientCount() {
|
|
1378
|
+
return this.clients.size;
|
|
1379
|
+
}
|
|
1380
|
+
async stopAll() {
|
|
1381
|
+
this.disposed = true;
|
|
1382
|
+
if (this.reaperHandle) {
|
|
1383
|
+
clearInterval(this.reaperHandle);
|
|
1384
|
+
this.reaperHandle = null;
|
|
259
1385
|
}
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
clearInterval(this.reaperHandle);
|
|
264
|
-
this.reaperHandle = null;
|
|
265
|
-
}
|
|
266
|
-
if (this.signalDisposer) {
|
|
267
|
-
this.signalDisposer();
|
|
268
|
-
this.signalDisposer = null;
|
|
269
|
-
}
|
|
270
|
-
const stopPromises = [];
|
|
271
|
-
for (const managed of this.clients.values()) {
|
|
272
|
-
stopPromises.push(stopClientBestEffort(managed.client));
|
|
273
|
-
}
|
|
274
|
-
this.clients.clear();
|
|
275
|
-
await Promise.allSettled(stopPromises);
|
|
1386
|
+
if (this.signalDisposer) {
|
|
1387
|
+
this.signalDisposer();
|
|
1388
|
+
this.signalDisposer = null;
|
|
276
1389
|
}
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
if (!_defaultInstance) {
|
|
281
|
-
_defaultInstance = new LspManager();
|
|
1390
|
+
const stopPromises = [];
|
|
1391
|
+
for (const managed of this.clients.values()) {
|
|
1392
|
+
stopPromises.push(stopClientBestEffort(managed.client));
|
|
282
1393
|
}
|
|
283
|
-
|
|
1394
|
+
this.clients.clear();
|
|
1395
|
+
await Promise.allSettled(stopPromises);
|
|
1396
|
+
}
|
|
284
1397
|
}
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
1398
|
+
var _defaultInstance = null;
|
|
1399
|
+
function getLspManager() {
|
|
1400
|
+
if (!_defaultInstance) {
|
|
1401
|
+
_defaultInstance = new LspManager;
|
|
1402
|
+
}
|
|
1403
|
+
return _defaultInstance;
|
|
1404
|
+
}
|
|
1405
|
+
async function disposeDefaultLspManager() {
|
|
1406
|
+
if (_defaultInstance) {
|
|
1407
|
+
const m = _defaultInstance;
|
|
1408
|
+
_defaultInstance = null;
|
|
1409
|
+
await m.stopAll();
|
|
1410
|
+
}
|
|
291
1411
|
}
|
|
1412
|
+
export {
|
|
1413
|
+
getLspManager,
|
|
1414
|
+
disposeDefaultLspManager,
|
|
1415
|
+
LspManager
|
|
1416
|
+
};
|