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,4 +1,4 @@
|
|
|
1
|
-
// ../lsp-
|
|
1
|
+
// ../lsp-core/src/lsp/cleanup-errors.ts
|
|
2
2
|
function reportBestEffortCleanupError(operation, error) {
|
|
3
3
|
if (process.env["CODEX_LSP_DEBUG_CLEANUP"] !== "1")
|
|
4
4
|
return;
|
|
@@ -6,12 +6,12 @@ function reportBestEffortCleanupError(operation, error) {
|
|
|
6
6
|
console.error(`[codex-lsp] ignored ${operation} failure during cleanup: ${message}`);
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
// ../lsp-
|
|
9
|
+
// ../lsp-core/src/lsp/client.ts
|
|
10
10
|
import { readFileSync } from "node:fs";
|
|
11
11
|
import { resolve } from "node:path";
|
|
12
12
|
import { pathToFileURL as pathToFileURL2 } from "node:url";
|
|
13
13
|
|
|
14
|
-
// ../lsp-
|
|
14
|
+
// ../lsp-core/src/request-context.ts
|
|
15
15
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
16
16
|
var storage = new AsyncLocalStorage;
|
|
17
17
|
function runWithRequestContext(context, fn) {
|
|
@@ -27,10 +27,10 @@ function contextEnv(key) {
|
|
|
27
27
|
return process.env[key];
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
// ../lsp-
|
|
30
|
+
// ../lsp-core/src/lsp/connection.ts
|
|
31
31
|
import { pathToFileURL } from "node:url";
|
|
32
32
|
|
|
33
|
-
// ../lsp-
|
|
33
|
+
// ../lsp-core/src/lsp/constants.ts
|
|
34
34
|
var DEFAULT_MAX_REFERENCES = 200;
|
|
35
35
|
var DEFAULT_MAX_SYMBOLS = 200;
|
|
36
36
|
var DEFAULT_MAX_DIAGNOSTICS = 200;
|
|
@@ -42,17 +42,24 @@ var REAPER_INTERVAL_MS = 60000;
|
|
|
42
42
|
var STOP_HARD_KILL_TIMEOUT_MS = 5000;
|
|
43
43
|
var STOP_SIGKILL_GRACE_MS = 1000;
|
|
44
44
|
|
|
45
|
-
// ../lsp-
|
|
45
|
+
// ../lsp-core/src/lsp/errors.ts
|
|
46
46
|
class LspConnectionClosedError extends Error {
|
|
47
|
+
serverId;
|
|
48
|
+
root;
|
|
49
|
+
name = "LspConnectionClosedError";
|
|
47
50
|
constructor(serverId, root, message) {
|
|
48
51
|
super(message ?? `LSP connection closed for ${serverId} at ${root}`);
|
|
49
52
|
this.serverId = serverId;
|
|
50
53
|
this.root = root;
|
|
51
|
-
this.name = "LspConnectionClosedError";
|
|
52
54
|
}
|
|
53
55
|
}
|
|
54
56
|
|
|
55
57
|
class LspProcessExitedError extends Error {
|
|
58
|
+
serverId;
|
|
59
|
+
root;
|
|
60
|
+
exitCode;
|
|
61
|
+
stderrTail;
|
|
62
|
+
name = "LspProcessExitedError";
|
|
56
63
|
constructor(serverId, root, exitCode, stderrTail) {
|
|
57
64
|
const stderrSuffix = stderrTail ? `
|
|
58
65
|
stderr tail: ${stderrTail}` : "";
|
|
@@ -61,54 +68,47 @@ stderr tail: ${stderrTail}` : "";
|
|
|
61
68
|
this.root = root;
|
|
62
69
|
this.exitCode = exitCode;
|
|
63
70
|
this.stderrTail = stderrTail;
|
|
64
|
-
this.name = "LspProcessExitedError";
|
|
65
71
|
}
|
|
66
72
|
}
|
|
67
73
|
|
|
68
74
|
class LspRequestTimeoutError extends Error {
|
|
75
|
+
method;
|
|
76
|
+
stderrTail;
|
|
77
|
+
name = "LspRequestTimeoutError";
|
|
69
78
|
constructor(method, stderrTail) {
|
|
70
79
|
const stderrSuffix = stderrTail ? `
|
|
71
80
|
recent stderr: ${stderrTail}` : "";
|
|
72
81
|
super(`LSP request timeout (method: ${method})${stderrSuffix}`);
|
|
73
82
|
this.method = method;
|
|
74
83
|
this.stderrTail = stderrTail;
|
|
75
|
-
this.name = "LspRequestTimeoutError";
|
|
76
84
|
}
|
|
77
85
|
}
|
|
78
86
|
|
|
79
87
|
class LspInvalidPathError extends Error {
|
|
80
|
-
|
|
81
|
-
super(...arguments);
|
|
82
|
-
this.name = "LspInvalidPathError";
|
|
83
|
-
}
|
|
88
|
+
name = "LspInvalidPathError";
|
|
84
89
|
}
|
|
85
90
|
|
|
86
91
|
class LspServerLookupError extends Error {
|
|
87
|
-
|
|
88
|
-
super(...arguments);
|
|
89
|
-
this.name = "LspServerLookupError";
|
|
90
|
-
}
|
|
92
|
+
name = "LspServerLookupError";
|
|
91
93
|
}
|
|
92
94
|
|
|
93
95
|
class LspServerInitializingError extends Error {
|
|
96
|
+
originalError;
|
|
97
|
+
name = "LspServerInitializingError";
|
|
94
98
|
constructor(originalError) {
|
|
95
99
|
super(`LSP server is still initializing. Please retry in a few seconds. Original error: ${originalError.message}`);
|
|
96
100
|
this.originalError = originalError;
|
|
97
|
-
this.name = "LspServerInitializingError";
|
|
98
101
|
}
|
|
99
102
|
}
|
|
100
103
|
|
|
101
104
|
class LspProcessSpawnError extends Error {
|
|
102
|
-
|
|
103
|
-
super(...arguments);
|
|
104
|
-
this.name = "LspProcessSpawnError";
|
|
105
|
-
}
|
|
105
|
+
name = "LspProcessSpawnError";
|
|
106
106
|
}
|
|
107
107
|
function isLspDeadConnectionError(err) {
|
|
108
108
|
return err instanceof LspConnectionClosedError || err instanceof LspProcessExitedError;
|
|
109
109
|
}
|
|
110
110
|
|
|
111
|
-
// ../lsp-
|
|
111
|
+
// ../lsp-core/src/lsp/json-rpc-connection.ts
|
|
112
112
|
var HEADER_SEPARATOR = `\r
|
|
113
113
|
\r
|
|
114
114
|
`;
|
|
@@ -118,31 +118,20 @@ var METHOD_NOT_FOUND = -32601;
|
|
|
118
118
|
var INTERNAL_ERROR = -32603;
|
|
119
119
|
|
|
120
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;
|
|
121
132
|
constructor(reader, writer) {
|
|
122
133
|
this.reader = reader;
|
|
123
134
|
this.writer = writer;
|
|
124
|
-
this.pendingRequests = new Map;
|
|
125
|
-
this.notificationHandlers = new Map;
|
|
126
|
-
this.requestHandlers = new Map;
|
|
127
|
-
this.closeHandlers = [];
|
|
128
|
-
this.errorHandlers = [];
|
|
129
|
-
this.inputBuffer = Buffer.alloc(0);
|
|
130
|
-
this.nextRequestId = 1;
|
|
131
|
-
this.listening = false;
|
|
132
|
-
this.disposed = false;
|
|
133
|
-
this.handleData = (chunk) => {
|
|
134
|
-
const chunkBuffer = Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk, "utf8");
|
|
135
|
-
this.inputBuffer = Buffer.concat([this.inputBuffer, chunkBuffer]);
|
|
136
|
-
this.drainInputBuffer();
|
|
137
|
-
};
|
|
138
|
-
this.handleClose = () => {
|
|
139
|
-
for (const handler of this.closeHandlers) {
|
|
140
|
-
handler();
|
|
141
|
-
}
|
|
142
|
-
};
|
|
143
|
-
this.handleStreamError = (error) => {
|
|
144
|
-
this.emitError(error);
|
|
145
|
-
};
|
|
146
135
|
}
|
|
147
136
|
listen() {
|
|
148
137
|
if (this.listening)
|
|
@@ -210,6 +199,19 @@ class JsonRpcConnection {
|
|
|
210
199
|
this.notificationHandlers.clear();
|
|
211
200
|
this.requestHandlers.clear();
|
|
212
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
|
+
};
|
|
213
215
|
drainInputBuffer() {
|
|
214
216
|
while (true) {
|
|
215
217
|
const headerEnd = this.inputBuffer.indexOf(HEADER_SEPARATOR);
|
|
@@ -357,7 +359,7 @@ function toError(error) {
|
|
|
357
359
|
return error instanceof Error ? error : new Error(String(error));
|
|
358
360
|
}
|
|
359
361
|
|
|
360
|
-
// ../lsp-
|
|
362
|
+
// ../lsp-core/src/lsp/process.ts
|
|
361
363
|
import { spawn, spawnSync } from "node:child_process";
|
|
362
364
|
import { existsSync, statSync } from "node:fs";
|
|
363
365
|
import { delimiter, join } from "node:path";
|
|
@@ -503,7 +505,7 @@ function spawnProcess(command, options) {
|
|
|
503
505
|
return wrap(proc);
|
|
504
506
|
}
|
|
505
507
|
|
|
506
|
-
// ../lsp-
|
|
508
|
+
// ../lsp-core/src/lsp/transport.ts
|
|
507
509
|
function isRecord(value) {
|
|
508
510
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
509
511
|
}
|
|
@@ -527,14 +529,18 @@ function parseDiagnosticsParams(params) {
|
|
|
527
529
|
}
|
|
528
530
|
|
|
529
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;
|
|
530
541
|
constructor(root, server, timeouts = {}) {
|
|
531
542
|
this.root = root;
|
|
532
543
|
this.server = server;
|
|
533
|
-
this.proc = null;
|
|
534
|
-
this.connection = null;
|
|
535
|
-
this.stderrBuffer = [];
|
|
536
|
-
this.processExited = false;
|
|
537
|
-
this.diagnosticsStore = new Map;
|
|
538
544
|
this.requestTimeoutMs = timeouts.requestTimeoutMs ?? REQUEST_TIMEOUT_MS;
|
|
539
545
|
this.initializeTimeoutMs = timeouts.initializeTimeoutMs ?? INIT_TIMEOUT_MS;
|
|
540
546
|
}
|
|
@@ -733,7 +739,7 @@ function isPosition(value) {
|
|
|
733
739
|
return isRecord(value) && typeof value["line"] === "number" && typeof value["character"] === "number";
|
|
734
740
|
}
|
|
735
741
|
|
|
736
|
-
// ../lsp-
|
|
742
|
+
// ../lsp-core/src/lsp/connection.ts
|
|
737
743
|
var INITIALIZE_SETTLE_MS = 300;
|
|
738
744
|
|
|
739
745
|
class LspClientConnection extends LspClientTransport {
|
|
@@ -799,7 +805,7 @@ class LspClientConnection extends LspClientTransport {
|
|
|
799
805
|
}
|
|
800
806
|
}
|
|
801
807
|
|
|
802
|
-
// ../lsp-
|
|
808
|
+
// ../lsp-core/src/lsp/effective-extension.ts
|
|
803
809
|
import { basename, extname } from "node:path";
|
|
804
810
|
var BASENAME_EXTENSIONS = {
|
|
805
811
|
Dockerfile: ".dockerfile",
|
|
@@ -809,7 +815,7 @@ function effectiveExtension(filePath) {
|
|
|
809
815
|
return BASENAME_EXTENSIONS[basename(filePath)] ?? extname(filePath);
|
|
810
816
|
}
|
|
811
817
|
|
|
812
|
-
// ../lsp-
|
|
818
|
+
// ../lsp-core/src/lsp/language-mappings.ts
|
|
813
819
|
var SYMBOL_KIND_MAP = {
|
|
814
820
|
1: "File",
|
|
815
821
|
2: "Module",
|
|
@@ -981,18 +987,15 @@ function getLanguageId(ext) {
|
|
|
981
987
|
return EXT_TO_LANG[ext] ?? "plaintext";
|
|
982
988
|
}
|
|
983
989
|
|
|
984
|
-
// ../lsp-
|
|
990
|
+
// ../lsp-core/src/lsp/client.ts
|
|
985
991
|
var POST_OPEN_DELAY_MS = 1000;
|
|
986
992
|
var POST_DIAGNOSTICS_WAIT_MS = 500;
|
|
987
993
|
|
|
988
994
|
class LspClient extends LspClientConnection {
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
this.lastSyncedText = new Map;
|
|
994
|
-
this.diagnosticPullErrors = [];
|
|
995
|
-
}
|
|
995
|
+
openedFiles = new Set;
|
|
996
|
+
documentVersions = new Map;
|
|
997
|
+
lastSyncedText = new Map;
|
|
998
|
+
diagnosticPullErrors = [];
|
|
996
999
|
getDiagnosticPullErrors() {
|
|
997
1000
|
return this.diagnosticPullErrors;
|
|
998
1001
|
}
|
|
@@ -1107,7 +1110,7 @@ class LspClient extends LspClientConnection {
|
|
|
1107
1110
|
}
|
|
1108
1111
|
}
|
|
1109
1112
|
|
|
1110
|
-
// ../lsp-
|
|
1113
|
+
// ../lsp-core/src/lsp/process-signal-cleanup.ts
|
|
1111
1114
|
function installProcessSignalCleanup(cleanup) {
|
|
1112
1115
|
const signals = process.platform === "win32" ? ["SIGINT", "SIGTERM", "SIGBREAK"] : ["SIGINT", "SIGTERM"];
|
|
1113
1116
|
const handler = () => {
|
|
@@ -1125,7 +1128,7 @@ function installProcessSignalCleanup(cleanup) {
|
|
|
1125
1128
|
};
|
|
1126
1129
|
}
|
|
1127
1130
|
|
|
1128
|
-
// ../lsp-
|
|
1131
|
+
// ../lsp-core/src/lsp/manager.ts
|
|
1129
1132
|
async function stopClientBestEffort(client) {
|
|
1130
1133
|
try {
|
|
1131
1134
|
await client.stop();
|
|
@@ -1166,11 +1169,16 @@ function awaitWithSignal(promise, signal) {
|
|
|
1166
1169
|
}
|
|
1167
1170
|
|
|
1168
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;
|
|
1169
1181
|
constructor(options = {}) {
|
|
1170
|
-
this.clients = new Map;
|
|
1171
|
-
this.reaperHandle = null;
|
|
1172
|
-
this.signalDisposer = null;
|
|
1173
|
-
this.disposed = false;
|
|
1174
1182
|
this.idleTimeoutMs = options.idleTimeoutMs ?? IDLE_TIMEOUT_MS;
|
|
1175
1183
|
this.initTimeoutMs = options.initTimeoutMs ?? INIT_TIMEOUT_MS;
|
|
1176
1184
|
this.reaperIntervalMs = options.reaperIntervalMs ?? REAPER_INTERVAL_MS;
|
|
@@ -1611,14 +1619,217 @@ function resolveSocketPath(dir, version) {
|
|
|
1611
1619
|
return join2(tmpdir(), `omo-lsp-${version}-${digest}.sock`);
|
|
1612
1620
|
}
|
|
1613
1621
|
|
|
1614
|
-
// ../
|
|
1615
|
-
|
|
1622
|
+
// ../mcp-stdio-core/src/record.ts
|
|
1623
|
+
function isPlainRecord(value) {
|
|
1624
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
1625
|
+
}
|
|
1626
|
+
// ../mcp-stdio-core/src/responses.ts
|
|
1627
|
+
function successResponse(id, result) {
|
|
1628
|
+
return { jsonrpc: "2.0", id, result };
|
|
1629
|
+
}
|
|
1630
|
+
function errorResponse(id, code, message, data) {
|
|
1631
|
+
return { jsonrpc: "2.0", id, error: data === undefined ? { code, message } : { code, message, data } };
|
|
1632
|
+
}
|
|
1633
|
+
function jsonRpcId(value) {
|
|
1634
|
+
return typeof value === "string" || typeof value === "number" || value === null ? value : null;
|
|
1635
|
+
}
|
|
1636
|
+
function messageFromError(error) {
|
|
1637
|
+
return error instanceof Error ? error.message : String(error);
|
|
1638
|
+
}
|
|
1639
|
+
// ../mcp-stdio-core/src/transport.ts
|
|
1640
|
+
var HEADER_SEPARATOR2 = Buffer.from(`\r
|
|
1641
|
+
\r
|
|
1642
|
+
`);
|
|
1643
|
+
async function* readStdioJsonRpcMessages(input) {
|
|
1644
|
+
let buffer = Buffer.alloc(0);
|
|
1645
|
+
for await (const chunk of input) {
|
|
1646
|
+
buffer = Buffer.concat([buffer, bufferFromChunk(chunk)]);
|
|
1647
|
+
while (true) {
|
|
1648
|
+
const result = readNextMessage(buffer);
|
|
1649
|
+
if (result.kind === "incomplete")
|
|
1650
|
+
break;
|
|
1651
|
+
buffer = result.remaining;
|
|
1652
|
+
if (result.message)
|
|
1653
|
+
yield result.message;
|
|
1654
|
+
}
|
|
1655
|
+
}
|
|
1656
|
+
const trailing = buffer.toString("utf8").trim();
|
|
1657
|
+
if (trailing.length > 0) {
|
|
1658
|
+
yield parseJsonPayload(trailing, "line");
|
|
1659
|
+
}
|
|
1660
|
+
}
|
|
1661
|
+
function writeStdioJsonRpcResponse(output, response, responseMode) {
|
|
1662
|
+
const body = JSON.stringify(response);
|
|
1663
|
+
if (responseMode === "framed") {
|
|
1664
|
+
output.write(`Content-Length: ${Buffer.byteLength(body, "utf8")}\r
|
|
1665
|
+
\r
|
|
1666
|
+
${body}`);
|
|
1667
|
+
return;
|
|
1668
|
+
}
|
|
1669
|
+
output.write(`${body}
|
|
1670
|
+
`);
|
|
1671
|
+
}
|
|
1672
|
+
function readNextMessage(buffer) {
|
|
1673
|
+
if (buffer.length === 0)
|
|
1674
|
+
return { kind: "incomplete" };
|
|
1675
|
+
return startsWithContentLength(buffer) ? readFramedMessage(buffer) : readLineMessage(buffer);
|
|
1676
|
+
}
|
|
1677
|
+
function readLineMessage(buffer) {
|
|
1678
|
+
const newlineIndex = buffer.indexOf(10);
|
|
1679
|
+
if (newlineIndex === -1)
|
|
1680
|
+
return { kind: "incomplete" };
|
|
1681
|
+
const line = buffer.subarray(0, newlineIndex).toString("utf8").replace(/\r$/, "");
|
|
1682
|
+
if (line.trim().length === 0) {
|
|
1683
|
+
return { kind: "complete", remaining: buffer.subarray(newlineIndex + 1) };
|
|
1684
|
+
}
|
|
1685
|
+
return {
|
|
1686
|
+
kind: "complete",
|
|
1687
|
+
message: parseJsonPayload(line, "line"),
|
|
1688
|
+
remaining: buffer.subarray(newlineIndex + 1)
|
|
1689
|
+
};
|
|
1690
|
+
}
|
|
1691
|
+
function readFramedMessage(buffer) {
|
|
1692
|
+
const separatorIndex = buffer.indexOf(HEADER_SEPARATOR2);
|
|
1693
|
+
if (separatorIndex === -1)
|
|
1694
|
+
return { kind: "incomplete" };
|
|
1695
|
+
const headers = buffer.subarray(0, separatorIndex).toString("ascii");
|
|
1696
|
+
const contentLength = parseContentLength2(headers);
|
|
1697
|
+
const bodyStart = separatorIndex + HEADER_SEPARATOR2.length;
|
|
1698
|
+
if (contentLength === undefined) {
|
|
1699
|
+
return {
|
|
1700
|
+
kind: "complete",
|
|
1701
|
+
message: {
|
|
1702
|
+
kind: "parse_error",
|
|
1703
|
+
message: "Missing or invalid Content-Length header",
|
|
1704
|
+
responseMode: "framed"
|
|
1705
|
+
},
|
|
1706
|
+
remaining: buffer.subarray(bodyStart)
|
|
1707
|
+
};
|
|
1708
|
+
}
|
|
1709
|
+
const bodyEnd = bodyStart + contentLength;
|
|
1710
|
+
if (buffer.length < bodyEnd)
|
|
1711
|
+
return { kind: "incomplete" };
|
|
1712
|
+
const body = buffer.subarray(bodyStart, bodyEnd).toString("utf8");
|
|
1713
|
+
return {
|
|
1714
|
+
kind: "complete",
|
|
1715
|
+
message: parseJsonPayload(body, "framed"),
|
|
1716
|
+
remaining: buffer.subarray(bodyEnd)
|
|
1717
|
+
};
|
|
1718
|
+
}
|
|
1719
|
+
function startsWithContentLength(buffer) {
|
|
1720
|
+
const prefix = buffer.subarray(0, "content-length:".length).toString("ascii").toLowerCase();
|
|
1721
|
+
return prefix === "content-length:";
|
|
1722
|
+
}
|
|
1723
|
+
function parseContentLength2(headers) {
|
|
1724
|
+
for (const line of headers.split(`\r
|
|
1725
|
+
`)) {
|
|
1726
|
+
const match = /^content-length:\s*(\d+)$/i.exec(line);
|
|
1727
|
+
if (match === null)
|
|
1728
|
+
continue;
|
|
1729
|
+
const value = match[1];
|
|
1730
|
+
if (value === undefined)
|
|
1731
|
+
return;
|
|
1732
|
+
return Number(value);
|
|
1733
|
+
}
|
|
1734
|
+
return;
|
|
1735
|
+
}
|
|
1736
|
+
function parseJsonPayload(payload, responseMode) {
|
|
1737
|
+
try {
|
|
1738
|
+
return { kind: "request", payload: JSON.parse(payload), responseMode };
|
|
1739
|
+
} catch (error) {
|
|
1740
|
+
return { kind: "parse_error", message: error instanceof Error ? error.message : String(error), responseMode };
|
|
1741
|
+
}
|
|
1742
|
+
}
|
|
1743
|
+
function bufferFromChunk(chunk) {
|
|
1744
|
+
if (Buffer.isBuffer(chunk))
|
|
1745
|
+
return chunk;
|
|
1746
|
+
if (typeof chunk === "string")
|
|
1747
|
+
return Buffer.from(chunk);
|
|
1748
|
+
throw new TypeError(`Unsupported stdio chunk type: ${typeof chunk}`);
|
|
1749
|
+
}
|
|
1750
|
+
|
|
1751
|
+
// ../mcp-stdio-core/src/server.ts
|
|
1752
|
+
var DEFAULT_IDLE_TIMEOUT_MS = 10 * 60000;
|
|
1753
|
+
var noopLog = () => {};
|
|
1754
|
+
async function runJsonRpcStdioServer(config) {
|
|
1755
|
+
const log = config.log ?? noopLog;
|
|
1756
|
+
const idleTimeoutMs = config.idleTimeoutMs ?? DEFAULT_IDLE_TIMEOUT_MS;
|
|
1757
|
+
const idleTimer = createIdleTimer(idleTimeoutMs, log, config.onIdleTimeout);
|
|
1758
|
+
log("stdio_started", { cwd: process.cwd(), idle_timeout_ms: idleTimeoutMs });
|
|
1759
|
+
idleTimer.arm();
|
|
1760
|
+
try {
|
|
1761
|
+
for await (const message of readStdioJsonRpcMessages(config.input)) {
|
|
1762
|
+
if (idleTimer.closed())
|
|
1763
|
+
break;
|
|
1764
|
+
idleTimer.arm();
|
|
1765
|
+
if (message.kind === "parse_error") {
|
|
1766
|
+
handleParseError(message, config, log);
|
|
1767
|
+
continue;
|
|
1768
|
+
}
|
|
1769
|
+
await handleRequest(message, config, log);
|
|
1770
|
+
}
|
|
1771
|
+
} finally {
|
|
1772
|
+
idleTimer.clear();
|
|
1773
|
+
log("stdio_stopped");
|
|
1774
|
+
}
|
|
1775
|
+
}
|
|
1776
|
+
function handleParseError(message, config, log) {
|
|
1777
|
+
log("parse_error", { message: message.message });
|
|
1778
|
+
const response = config.parseErrorResponse?.(message.message) ?? errorResponse(null, -32700, "Parse error", message.message);
|
|
1779
|
+
if (response !== undefined) {
|
|
1780
|
+
writeStdioJsonRpcResponse(config.output, response, message.responseMode);
|
|
1781
|
+
}
|
|
1782
|
+
}
|
|
1783
|
+
async function handleRequest(message, config, log) {
|
|
1784
|
+
const parsed = message.payload;
|
|
1785
|
+
const id = isPlainRecord(parsed) ? jsonRpcId(parsed["id"]) : null;
|
|
1786
|
+
const method = isPlainRecord(parsed) && typeof parsed["method"] === "string" ? parsed["method"] : null;
|
|
1787
|
+
log("request", { id: id === null ? null : String(id), method });
|
|
1788
|
+
try {
|
|
1789
|
+
const response = await config.handler(parsed, config.handlerOptions);
|
|
1790
|
+
if (response === undefined)
|
|
1791
|
+
return;
|
|
1792
|
+
writeStdioJsonRpcResponse(config.output, response, message.responseMode);
|
|
1793
|
+
log("response", { id: String(response.id), method, is_error: response.error !== undefined });
|
|
1794
|
+
} catch (error) {
|
|
1795
|
+
if (config.onHandlerError === undefined)
|
|
1796
|
+
throw error;
|
|
1797
|
+
config.onHandlerError(error);
|
|
1798
|
+
}
|
|
1799
|
+
}
|
|
1800
|
+
function createIdleTimer(idleTimeoutMs, log, onIdleTimeout) {
|
|
1801
|
+
let timer = null;
|
|
1802
|
+
let isClosed = false;
|
|
1803
|
+
return {
|
|
1804
|
+
arm: () => {
|
|
1805
|
+
if (timer !== null)
|
|
1806
|
+
clearTimeout(timer);
|
|
1807
|
+
if (idleTimeoutMs <= 0)
|
|
1808
|
+
return;
|
|
1809
|
+
timer = setTimeout(() => {
|
|
1810
|
+
isClosed = true;
|
|
1811
|
+
log("idle_timeout", { idle_timeout_ms: idleTimeoutMs });
|
|
1812
|
+
onIdleTimeout?.();
|
|
1813
|
+
}, idleTimeoutMs);
|
|
1814
|
+
timer.unref();
|
|
1815
|
+
},
|
|
1816
|
+
clear: () => {
|
|
1817
|
+
if (timer === null)
|
|
1818
|
+
return;
|
|
1819
|
+
clearTimeout(timer);
|
|
1820
|
+
timer = null;
|
|
1821
|
+
},
|
|
1822
|
+
closed: () => isClosed
|
|
1823
|
+
};
|
|
1824
|
+
}
|
|
1825
|
+
// ../lsp-core/src/tools/diagnostics.ts
|
|
1826
|
+
import { resolve as resolve4 } from "node:path";
|
|
1616
1827
|
|
|
1617
|
-
// ../lsp-
|
|
1828
|
+
// ../lsp-core/src/lsp/client-wrapper.ts
|
|
1618
1829
|
import { existsSync as existsSync6, statSync as statSync2 } from "node:fs";
|
|
1619
1830
|
import { dirname as dirname4, join as join6, resolve as resolve2 } from "node:path";
|
|
1620
1831
|
|
|
1621
|
-
// ../lsp-
|
|
1832
|
+
// ../lsp-core/src/lsp/server-install-state.ts
|
|
1622
1833
|
import { existsSync as existsSync3, mkdirSync as mkdirSync3, readFileSync as readFileSync3, renameSync, writeFileSync } from "node:fs";
|
|
1623
1834
|
import { homedir as homedir2 } from "node:os";
|
|
1624
1835
|
import { dirname as dirname3, isAbsolute, join as join3 } from "node:path";
|
|
@@ -1670,12 +1881,12 @@ function isRecord2(value) {
|
|
|
1670
1881
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
1671
1882
|
}
|
|
1672
1883
|
|
|
1673
|
-
// ../lsp-
|
|
1884
|
+
// ../lsp-core/src/lsp/config-loader.ts
|
|
1674
1885
|
import { existsSync as existsSync4, readFileSync as readFileSync4 } from "node:fs";
|
|
1675
1886
|
import { homedir as homedir3 } from "node:os";
|
|
1676
1887
|
import { delimiter as delimiter2, isAbsolute as isAbsolute2, join as join4 } from "node:path";
|
|
1677
1888
|
|
|
1678
|
-
// ../lsp-
|
|
1889
|
+
// ../lsp-core/src/lsp/server-definitions.ts
|
|
1679
1890
|
var LSP_INSTALL_HINTS = {
|
|
1680
1891
|
typescript: "npm install -g typescript-language-server typescript",
|
|
1681
1892
|
deno: "Install Deno from https://deno.land",
|
|
@@ -1822,7 +2033,7 @@ var BUILTIN_SERVERS = {
|
|
|
1822
2033
|
}
|
|
1823
2034
|
};
|
|
1824
2035
|
|
|
1825
|
-
// ../lsp-
|
|
2036
|
+
// ../lsp-core/src/lsp/config-loader.ts
|
|
1826
2037
|
function resolveProjectConfigPath(path) {
|
|
1827
2038
|
return isAbsolute2(path) ? path : join4(contextCwd(), path);
|
|
1828
2039
|
}
|
|
@@ -1887,10 +2098,10 @@ function getMergedServers() {
|
|
|
1887
2098
|
}
|
|
1888
2099
|
if (seen.has(id))
|
|
1889
2100
|
continue;
|
|
1890
|
-
const
|
|
1891
|
-
if (!
|
|
2101
|
+
const server2 = createServerFromEntry(id, entry, source);
|
|
2102
|
+
if (!server2)
|
|
1892
2103
|
continue;
|
|
1893
|
-
servers.push(
|
|
2104
|
+
servers.push(server2);
|
|
1894
2105
|
seen.add(id);
|
|
1895
2106
|
}
|
|
1896
2107
|
}
|
|
@@ -1922,7 +2133,7 @@ function createServerFromEntry(id, entry, source) {
|
|
|
1922
2133
|
if (source === "project") {
|
|
1923
2134
|
if (!builtin)
|
|
1924
2135
|
return null;
|
|
1925
|
-
const
|
|
2136
|
+
const server3 = createServer({
|
|
1926
2137
|
id,
|
|
1927
2138
|
command: builtin.command,
|
|
1928
2139
|
extensions: entry.extensions ?? builtin.extensions,
|
|
@@ -1930,35 +2141,35 @@ function createServerFromEntry(id, entry, source) {
|
|
|
1930
2141
|
source
|
|
1931
2142
|
});
|
|
1932
2143
|
if (entry.initialization !== undefined) {
|
|
1933
|
-
|
|
2144
|
+
server3.initialization = entry.initialization;
|
|
1934
2145
|
}
|
|
1935
|
-
return
|
|
2146
|
+
return server3;
|
|
1936
2147
|
}
|
|
1937
2148
|
if (entry.command && entry.extensions) {
|
|
1938
|
-
const
|
|
2149
|
+
const server3 = createServer({
|
|
1939
2150
|
id,
|
|
1940
2151
|
command: entry.command,
|
|
1941
2152
|
extensions: entry.extensions,
|
|
1942
2153
|
priority: entry.priority ?? 0,
|
|
1943
2154
|
source
|
|
1944
2155
|
});
|
|
1945
|
-
applyOptionalServerFields(
|
|
1946
|
-
return
|
|
2156
|
+
applyOptionalServerFields(server3, entry);
|
|
2157
|
+
return server3;
|
|
1947
2158
|
}
|
|
1948
2159
|
if (!builtin)
|
|
1949
2160
|
return null;
|
|
1950
|
-
const
|
|
2161
|
+
const server2 = createServer({
|
|
1951
2162
|
id,
|
|
1952
2163
|
command: entry.command ?? builtin.command,
|
|
1953
2164
|
extensions: entry.extensions ?? builtin.extensions,
|
|
1954
2165
|
priority: entry.priority ?? 0,
|
|
1955
2166
|
source
|
|
1956
2167
|
});
|
|
1957
|
-
applyOptionalServerFields(
|
|
1958
|
-
return
|
|
2168
|
+
applyOptionalServerFields(server2, entry);
|
|
2169
|
+
return server2;
|
|
1959
2170
|
}
|
|
1960
2171
|
function createServer(input) {
|
|
1961
|
-
const
|
|
2172
|
+
const server2 = {
|
|
1962
2173
|
id: input.id,
|
|
1963
2174
|
command: input.command,
|
|
1964
2175
|
extensions: input.extensions,
|
|
@@ -1966,19 +2177,19 @@ function createServer(input) {
|
|
|
1966
2177
|
source: input.source
|
|
1967
2178
|
};
|
|
1968
2179
|
if (input.env !== undefined) {
|
|
1969
|
-
|
|
2180
|
+
server2.env = input.env;
|
|
1970
2181
|
}
|
|
1971
2182
|
if (input.initialization !== undefined) {
|
|
1972
|
-
|
|
2183
|
+
server2.initialization = input.initialization;
|
|
1973
2184
|
}
|
|
1974
|
-
return
|
|
2185
|
+
return server2;
|
|
1975
2186
|
}
|
|
1976
|
-
function applyOptionalServerFields(
|
|
2187
|
+
function applyOptionalServerFields(server2, entry) {
|
|
1977
2188
|
if (entry.env !== undefined) {
|
|
1978
|
-
|
|
2189
|
+
server2.env = entry.env;
|
|
1979
2190
|
}
|
|
1980
2191
|
if (entry.initialization !== undefined) {
|
|
1981
|
-
|
|
2192
|
+
server2.initialization = entry.initialization;
|
|
1982
2193
|
}
|
|
1983
2194
|
}
|
|
1984
2195
|
function isConfigJson(value) {
|
|
@@ -2027,7 +2238,7 @@ function getDisabledServerIds() {
|
|
|
2027
2238
|
return disabled;
|
|
2028
2239
|
}
|
|
2029
2240
|
|
|
2030
|
-
// ../lsp-
|
|
2241
|
+
// ../lsp-core/src/lsp/server-installation.ts
|
|
2031
2242
|
import { existsSync as existsSync5 } from "node:fs";
|
|
2032
2243
|
import { delimiter as delimiter3, join as join5 } from "node:path";
|
|
2033
2244
|
function isServerInstalled(command, _workingDirectory) {
|
|
@@ -2068,24 +2279,24 @@ function isServerInstalled(command, _workingDirectory) {
|
|
|
2068
2279
|
return false;
|
|
2069
2280
|
}
|
|
2070
2281
|
|
|
2071
|
-
// ../lsp-
|
|
2282
|
+
// ../lsp-core/src/lsp/server-resolution.ts
|
|
2072
2283
|
function findServerForExtension(ext) {
|
|
2073
2284
|
const servers = getMergedServers();
|
|
2074
|
-
for (const
|
|
2075
|
-
if (
|
|
2285
|
+
for (const server2 of servers) {
|
|
2286
|
+
if (server2.extensions.includes(ext) && isServerInstalled(server2.command)) {
|
|
2076
2287
|
const resolvedServer = {
|
|
2077
|
-
id:
|
|
2078
|
-
command:
|
|
2079
|
-
extensions:
|
|
2080
|
-
priority:
|
|
2288
|
+
id: server2.id,
|
|
2289
|
+
command: server2.command,
|
|
2290
|
+
extensions: server2.extensions,
|
|
2291
|
+
priority: server2.priority
|
|
2081
2292
|
};
|
|
2082
|
-
if (
|
|
2293
|
+
if (server2.env !== undefined) {
|
|
2083
2294
|
return {
|
|
2084
2295
|
status: "found",
|
|
2085
2296
|
server: {
|
|
2086
2297
|
...resolvedServer,
|
|
2087
|
-
env:
|
|
2088
|
-
...
|
|
2298
|
+
env: server2.env,
|
|
2299
|
+
...server2.initialization === undefined ? {} : { initialization: server2.initialization }
|
|
2089
2300
|
}
|
|
2090
2301
|
};
|
|
2091
2302
|
}
|
|
@@ -2093,20 +2304,20 @@ function findServerForExtension(ext) {
|
|
|
2093
2304
|
status: "found",
|
|
2094
2305
|
server: {
|
|
2095
2306
|
...resolvedServer,
|
|
2096
|
-
...
|
|
2307
|
+
...server2.initialization === undefined ? {} : { initialization: server2.initialization }
|
|
2097
2308
|
}
|
|
2098
2309
|
};
|
|
2099
2310
|
}
|
|
2100
2311
|
}
|
|
2101
|
-
for (const
|
|
2102
|
-
if (
|
|
2103
|
-
const installHint = LSP_INSTALL_HINTS[
|
|
2312
|
+
for (const server2 of servers) {
|
|
2313
|
+
if (server2.extensions.includes(ext)) {
|
|
2314
|
+
const installHint = LSP_INSTALL_HINTS[server2.id] ?? `Install '${server2.command[0]}' and ensure it's in your PATH`;
|
|
2104
2315
|
return {
|
|
2105
2316
|
status: "not_installed",
|
|
2106
2317
|
server: {
|
|
2107
|
-
id:
|
|
2108
|
-
command:
|
|
2109
|
-
extensions:
|
|
2318
|
+
id: server2.id,
|
|
2319
|
+
command: server2.command,
|
|
2320
|
+
extensions: server2.extensions
|
|
2110
2321
|
},
|
|
2111
2322
|
installHint
|
|
2112
2323
|
};
|
|
@@ -2124,18 +2335,18 @@ function getAllServers() {
|
|
|
2124
2335
|
const disabled = getDisabledServerIds();
|
|
2125
2336
|
const result = [];
|
|
2126
2337
|
const seen = new Set;
|
|
2127
|
-
for (const
|
|
2128
|
-
if (seen.has(
|
|
2338
|
+
for (const server2 of servers) {
|
|
2339
|
+
if (seen.has(server2.id))
|
|
2129
2340
|
continue;
|
|
2130
2341
|
result.push({
|
|
2131
|
-
id:
|
|
2132
|
-
installed: isServerInstalled(
|
|
2133
|
-
extensions:
|
|
2342
|
+
id: server2.id,
|
|
2343
|
+
installed: isServerInstalled(server2.command),
|
|
2344
|
+
extensions: server2.extensions,
|
|
2134
2345
|
disabled: false,
|
|
2135
|
-
source:
|
|
2136
|
-
priority:
|
|
2346
|
+
source: server2.source,
|
|
2347
|
+
priority: server2.priority
|
|
2137
2348
|
});
|
|
2138
|
-
seen.add(
|
|
2349
|
+
seen.add(server2.id);
|
|
2139
2350
|
}
|
|
2140
2351
|
for (const id of disabled) {
|
|
2141
2352
|
if (seen.has(id))
|
|
@@ -2153,7 +2364,7 @@ function getAllServers() {
|
|
|
2153
2364
|
return result;
|
|
2154
2365
|
}
|
|
2155
2366
|
|
|
2156
|
-
// ../lsp-
|
|
2367
|
+
// ../lsp-core/src/lsp/client-wrapper.ts
|
|
2157
2368
|
var WORKSPACE_MARKERS = [".git", "package.json", "pyproject.toml", "Cargo.toml", "go.mod", "pom.xml", "build.gradle"];
|
|
2158
2369
|
function isDirectoryPath(filePath) {
|
|
2159
2370
|
try {
|
|
@@ -2202,16 +2413,16 @@ function formatServerLookupError(result) {
|
|
|
2202
2413
|
`);
|
|
2203
2414
|
}
|
|
2204
2415
|
function formatNotInstalled(result) {
|
|
2205
|
-
const { server, installHint } = result;
|
|
2206
|
-
const extensions =
|
|
2207
|
-
const decision = loadInstallDecision(
|
|
2416
|
+
const { server: server2, installHint } = result;
|
|
2417
|
+
const extensions = server2.extensions.join(", ");
|
|
2418
|
+
const decision = loadInstallDecision(server2.id)?.decision;
|
|
2208
2419
|
if (decision === "declined") {
|
|
2209
|
-
return `LSP server '${
|
|
2420
|
+
return `LSP server '${server2.id}' (${extensions}) is NOT INSTALLED; user previously declined installation — proceed without LSP.`;
|
|
2210
2421
|
}
|
|
2211
2422
|
const header = [
|
|
2212
|
-
`LSP server '${
|
|
2423
|
+
`LSP server '${server2.id}' for ${extensions} is NOT INSTALLED.`,
|
|
2213
2424
|
"",
|
|
2214
|
-
`Command not found: ${
|
|
2425
|
+
`Command not found: ${server2.command[0]}`,
|
|
2215
2426
|
""
|
|
2216
2427
|
];
|
|
2217
2428
|
if (decision === "allowed") {
|
|
@@ -2230,7 +2441,7 @@ function formatNotInstalled(result) {
|
|
|
2230
2441
|
"ACTION REQUIRED — ASK THE USER whether to install this LSP server.",
|
|
2231
2442
|
"- If the user agrees: run the install command above, then retry this tool.",
|
|
2232
2443
|
"- If the user declines, OR has NOT explicitly asked for LSP installation:",
|
|
2233
|
-
` call lsp_install_decision { server_id: "${
|
|
2444
|
+
` call lsp_install_decision { server_id: "${server2.id}", decision: "declined" },`,
|
|
2234
2445
|
" then ignore this message and proceed WITHOUT LSP."
|
|
2235
2446
|
].join(`
|
|
2236
2447
|
`);
|
|
@@ -2253,36 +2464,36 @@ async function withLspClient(filePath, fn, toolName, options = {}) {
|
|
|
2253
2464
|
if (result.status !== "found") {
|
|
2254
2465
|
throw new LspServerLookupError(formatServerLookupError(result));
|
|
2255
2466
|
}
|
|
2256
|
-
const
|
|
2467
|
+
const server2 = result.server;
|
|
2257
2468
|
const root = findWorkspaceRoot(absPath);
|
|
2258
2469
|
const manager = options.manager ?? getLspManager();
|
|
2259
2470
|
const acquireAndCall = async (allowRetry) => {
|
|
2260
|
-
const client = await manager.getClient(root,
|
|
2471
|
+
const client = await manager.getClient(root, server2, options.signal);
|
|
2261
2472
|
try {
|
|
2262
2473
|
return await fn(client, root);
|
|
2263
2474
|
} catch (err) {
|
|
2264
2475
|
if (allowRetry && READ_ONLY_RETRY_TOOLS.has(toolName) && isLspDeadConnectionError(err)) {
|
|
2265
|
-
manager.invalidateClient(root,
|
|
2476
|
+
manager.invalidateClient(root, server2.id, client);
|
|
2266
2477
|
return acquireAndCall(false);
|
|
2267
2478
|
}
|
|
2268
2479
|
if (err instanceof LspRequestTimeoutError) {
|
|
2269
|
-
if (manager.isServerInitializing(root,
|
|
2480
|
+
if (manager.isServerInitializing(root, server2.id)) {
|
|
2270
2481
|
throw new LspServerInitializingError(err);
|
|
2271
2482
|
}
|
|
2272
2483
|
}
|
|
2273
2484
|
throw err;
|
|
2274
2485
|
} finally {
|
|
2275
|
-
manager.releaseClient(root,
|
|
2486
|
+
manager.releaseClient(root, server2.id);
|
|
2276
2487
|
}
|
|
2277
2488
|
};
|
|
2278
2489
|
return acquireAndCall(true);
|
|
2279
2490
|
}
|
|
2280
2491
|
|
|
2281
|
-
// ../lsp-
|
|
2492
|
+
// ../lsp-core/src/lsp/directory-diagnostics.ts
|
|
2282
2493
|
import { existsSync as existsSync7, lstatSync, readdirSync } from "node:fs";
|
|
2283
2494
|
import { join as join7, resolve as resolve3 } from "node:path";
|
|
2284
2495
|
|
|
2285
|
-
// ../lsp-
|
|
2496
|
+
// ../lsp-core/src/lsp/formatters.ts
|
|
2286
2497
|
import { fileURLToPath as fileURLToPath2 } from "node:url";
|
|
2287
2498
|
var DIAGNOSTIC_SEVERITY_FILTERS = {
|
|
2288
2499
|
error: 1,
|
|
@@ -2390,7 +2601,7 @@ function formatApplyResult(result) {
|
|
|
2390
2601
|
`);
|
|
2391
2602
|
}
|
|
2392
2603
|
|
|
2393
|
-
// ../lsp-
|
|
2604
|
+
// ../lsp-core/src/lsp/directory-diagnostics.ts
|
|
2394
2605
|
var SKIP_DIRECTORIES = new Set(["node_modules", ".git", "dist", "build", ".next", "out"]);
|
|
2395
2606
|
function collectFilesWithExtension(dir, extension, maxFiles) {
|
|
2396
2607
|
const files = [];
|
|
@@ -2439,7 +2650,7 @@ async function aggregateDiagnosticsForDirectory(directory, extension, severity,
|
|
|
2439
2650
|
if (serverResult.status !== "found") {
|
|
2440
2651
|
throw new LspServerLookupError(formatServerLookupError(serverResult));
|
|
2441
2652
|
}
|
|
2442
|
-
const
|
|
2653
|
+
const server2 = serverResult.server;
|
|
2443
2654
|
const allFiles = collectFilesWithExtension(absDir, extension, maxFiles + 1);
|
|
2444
2655
|
const wasCapped = allFiles.length > maxFiles;
|
|
2445
2656
|
const filesToProcess = allFiles.slice(0, maxFiles);
|
|
@@ -2456,7 +2667,7 @@ async function aggregateDiagnosticsForDirectory(directory, extension, severity,
|
|
|
2456
2667
|
const manager = getLspManager();
|
|
2457
2668
|
const allDiagnostics = [];
|
|
2458
2669
|
const fileErrors = [];
|
|
2459
|
-
const client = await manager.getClient(root,
|
|
2670
|
+
const client = await manager.getClient(root, server2);
|
|
2460
2671
|
try {
|
|
2461
2672
|
for (const file of filesToProcess) {
|
|
2462
2673
|
try {
|
|
@@ -2474,7 +2685,7 @@ async function aggregateDiagnosticsForDirectory(directory, extension, severity,
|
|
|
2474
2685
|
}
|
|
2475
2686
|
}
|
|
2476
2687
|
} finally {
|
|
2477
|
-
manager.releaseClient(root,
|
|
2688
|
+
manager.releaseClient(root, server2.id);
|
|
2478
2689
|
}
|
|
2479
2690
|
const displayDiagnostics = allDiagnostics.slice(0, DEFAULT_MAX_DIAGNOSTICS);
|
|
2480
2691
|
const wasDiagCapped = allDiagnostics.length > DEFAULT_MAX_DIAGNOSTICS;
|
|
@@ -2504,7 +2715,7 @@ async function aggregateDiagnosticsForDirectory(directory, extension, severity,
|
|
|
2504
2715
|
`);
|
|
2505
2716
|
}
|
|
2506
2717
|
|
|
2507
|
-
// ../lsp-
|
|
2718
|
+
// ../lsp-core/src/lsp/infer-extension.ts
|
|
2508
2719
|
import { lstatSync as lstatSync2, readdirSync as readdirSync2 } from "node:fs";
|
|
2509
2720
|
import { join as join8 } from "node:path";
|
|
2510
2721
|
var SKIP_DIRECTORIES2 = new Set(["node_modules", ".git", "dist", "build", ".next", "out"]);
|
|
@@ -2560,175 +2771,7 @@ function inferExtensionFromDirectory(directory) {
|
|
|
2560
2771
|
return maxExt || null;
|
|
2561
2772
|
}
|
|
2562
2773
|
|
|
2563
|
-
// ../lsp-
|
|
2564
|
-
import { existsSync as existsSync8, readFileSync as readFileSync5, realpathSync, unlinkSync as unlinkSync2, writeFileSync as writeFileSync2 } from "node:fs";
|
|
2565
|
-
import { dirname as dirname5, isAbsolute as isAbsolute3, relative, resolve as resolve4 } from "node:path";
|
|
2566
|
-
import { fileURLToPath as fileURLToPath3 } from "node:url";
|
|
2567
|
-
function errorMessage(error) {
|
|
2568
|
-
return error instanceof Error ? error.message : String(error);
|
|
2569
|
-
}
|
|
2570
|
-
function isPathInsideWorkspace(filePath, workspaceRoot) {
|
|
2571
|
-
const relativePath = relative(workspaceRoot, filePath);
|
|
2572
|
-
return relativePath === "" || !relativePath.startsWith("..") && !isAbsolute3(relativePath);
|
|
2573
|
-
}
|
|
2574
|
-
function realpathForValidation(filePath) {
|
|
2575
|
-
if (existsSync8(filePath))
|
|
2576
|
-
return realpathSync(filePath);
|
|
2577
|
-
const parent = dirname5(filePath);
|
|
2578
|
-
return resolve4(realpathSync(parent), relative(parent, filePath));
|
|
2579
|
-
}
|
|
2580
|
-
function uriToWorkspacePath(uri, workspaceRoot) {
|
|
2581
|
-
let filePath;
|
|
2582
|
-
try {
|
|
2583
|
-
filePath = fileURLToPath3(uri);
|
|
2584
|
-
} catch (error) {
|
|
2585
|
-
return { success: false, error: `non-file URI ${uri}: ${errorMessage(error)}` };
|
|
2586
|
-
}
|
|
2587
|
-
let validatedPath;
|
|
2588
|
-
try {
|
|
2589
|
-
validatedPath = realpathForValidation(filePath);
|
|
2590
|
-
} catch (error) {
|
|
2591
|
-
return { success: false, error: `${filePath}: ${errorMessage(error)}` };
|
|
2592
|
-
}
|
|
2593
|
-
if (!isPathInsideWorkspace(validatedPath, workspaceRoot)) {
|
|
2594
|
-
return { success: false, error: `${filePath}: outside workspace ${workspaceRoot}` };
|
|
2595
|
-
}
|
|
2596
|
-
return { success: true, path: filePath };
|
|
2597
|
-
}
|
|
2598
|
-
function applyTextEditsToFile(filePath, edits) {
|
|
2599
|
-
try {
|
|
2600
|
-
const content = readFileSync5(filePath, "utf-8");
|
|
2601
|
-
const lines = content.split(`
|
|
2602
|
-
`);
|
|
2603
|
-
const sortedEdits = [...edits].sort((a, b) => {
|
|
2604
|
-
if (b.range.start.line !== a.range.start.line) {
|
|
2605
|
-
return b.range.start.line - a.range.start.line;
|
|
2606
|
-
}
|
|
2607
|
-
return b.range.start.character - a.range.start.character;
|
|
2608
|
-
});
|
|
2609
|
-
for (const edit of sortedEdits) {
|
|
2610
|
-
const startLine = edit.range.start.line;
|
|
2611
|
-
const startChar = edit.range.start.character;
|
|
2612
|
-
const endLine = edit.range.end.line;
|
|
2613
|
-
const endChar = edit.range.end.character;
|
|
2614
|
-
if (startLine === endLine) {
|
|
2615
|
-
const line = lines[startLine] ?? "";
|
|
2616
|
-
lines[startLine] = line.substring(0, startChar) + edit.newText + line.substring(endChar);
|
|
2617
|
-
} else {
|
|
2618
|
-
const firstLine = lines[startLine] ?? "";
|
|
2619
|
-
const lastLine = lines[endLine] ?? "";
|
|
2620
|
-
const newContent = firstLine.substring(0, startChar) + edit.newText + lastLine.substring(endChar);
|
|
2621
|
-
lines.splice(startLine, endLine - startLine + 1, ...newContent.split(`
|
|
2622
|
-
`));
|
|
2623
|
-
}
|
|
2624
|
-
}
|
|
2625
|
-
writeFileSync2(filePath, lines.join(`
|
|
2626
|
-
`), "utf-8");
|
|
2627
|
-
return { success: true, editCount: edits.length };
|
|
2628
|
-
} catch (err) {
|
|
2629
|
-
return {
|
|
2630
|
-
success: false,
|
|
2631
|
-
editCount: 0,
|
|
2632
|
-
error: err instanceof Error ? err.message : String(err)
|
|
2633
|
-
};
|
|
2634
|
-
}
|
|
2635
|
-
}
|
|
2636
|
-
function applyWorkspaceEdit(edit, options = {}) {
|
|
2637
|
-
if (!edit) {
|
|
2638
|
-
return { success: false, filesModified: [], totalEdits: 0, errors: ["No edit provided"] };
|
|
2639
|
-
}
|
|
2640
|
-
const result = { success: true, filesModified: [], totalEdits: 0, errors: [] };
|
|
2641
|
-
const workspaceRoot = realpathSync(options.workspaceRoot ?? contextCwd());
|
|
2642
|
-
if (edit.changes) {
|
|
2643
|
-
for (const [uri, edits] of Object.entries(edit.changes)) {
|
|
2644
|
-
const validatedPath = uriToWorkspacePath(uri, workspaceRoot);
|
|
2645
|
-
if (!validatedPath.success) {
|
|
2646
|
-
result.success = false;
|
|
2647
|
-
result.errors.push(validatedPath.error);
|
|
2648
|
-
continue;
|
|
2649
|
-
}
|
|
2650
|
-
const applyResult = applyTextEditsToFile(validatedPath.path, edits);
|
|
2651
|
-
if (applyResult.success) {
|
|
2652
|
-
result.filesModified.push(validatedPath.path);
|
|
2653
|
-
result.totalEdits += applyResult.editCount;
|
|
2654
|
-
} else {
|
|
2655
|
-
result.success = false;
|
|
2656
|
-
result.errors.push(`${validatedPath.path}: ${applyResult.error}`);
|
|
2657
|
-
}
|
|
2658
|
-
}
|
|
2659
|
-
}
|
|
2660
|
-
if (edit.documentChanges) {
|
|
2661
|
-
for (const change of edit.documentChanges) {
|
|
2662
|
-
if (!("kind" in change)) {
|
|
2663
|
-
const validatedPath = uriToWorkspacePath(change.textDocument.uri, workspaceRoot);
|
|
2664
|
-
if (!validatedPath.success) {
|
|
2665
|
-
result.success = false;
|
|
2666
|
-
result.errors.push(validatedPath.error);
|
|
2667
|
-
continue;
|
|
2668
|
-
}
|
|
2669
|
-
const applyResult = applyTextEditsToFile(validatedPath.path, change.edits);
|
|
2670
|
-
if (applyResult.success) {
|
|
2671
|
-
result.filesModified.push(validatedPath.path);
|
|
2672
|
-
result.totalEdits += applyResult.editCount;
|
|
2673
|
-
} else {
|
|
2674
|
-
result.success = false;
|
|
2675
|
-
result.errors.push(`${validatedPath.path}: ${applyResult.error}`);
|
|
2676
|
-
}
|
|
2677
|
-
continue;
|
|
2678
|
-
}
|
|
2679
|
-
if (change.kind === "create") {
|
|
2680
|
-
try {
|
|
2681
|
-
const validatedPath = uriToWorkspacePath(change.uri, workspaceRoot);
|
|
2682
|
-
if (!validatedPath.success) {
|
|
2683
|
-
result.success = false;
|
|
2684
|
-
result.errors.push(`Create ${change.uri}: ${validatedPath.error}`);
|
|
2685
|
-
continue;
|
|
2686
|
-
}
|
|
2687
|
-
writeFileSync2(validatedPath.path, "", "utf-8");
|
|
2688
|
-
result.filesModified.push(validatedPath.path);
|
|
2689
|
-
} catch (err) {
|
|
2690
|
-
result.success = false;
|
|
2691
|
-
result.errors.push(`Create ${change.uri}: ${String(err)}`);
|
|
2692
|
-
}
|
|
2693
|
-
} else if (change.kind === "rename") {
|
|
2694
|
-
try {
|
|
2695
|
-
const oldPath = uriToWorkspacePath(change.oldUri, workspaceRoot);
|
|
2696
|
-
const newPath = uriToWorkspacePath(change.newUri, workspaceRoot);
|
|
2697
|
-
if (!oldPath.success || !newPath.success) {
|
|
2698
|
-
const error = oldPath.success ? newPath.success ? "invalid URI" : newPath.error : oldPath.error;
|
|
2699
|
-
result.success = false;
|
|
2700
|
-
result.errors.push(`Rename ${change.oldUri}: ${error}`);
|
|
2701
|
-
continue;
|
|
2702
|
-
}
|
|
2703
|
-
const content = readFileSync5(oldPath.path, "utf-8");
|
|
2704
|
-
writeFileSync2(newPath.path, content, "utf-8");
|
|
2705
|
-
unlinkSync2(oldPath.path);
|
|
2706
|
-
result.filesModified.push(newPath.path);
|
|
2707
|
-
} catch (err) {
|
|
2708
|
-
result.success = false;
|
|
2709
|
-
result.errors.push(`Rename ${change.oldUri}: ${String(err)}`);
|
|
2710
|
-
}
|
|
2711
|
-
} else if (change.kind === "delete") {
|
|
2712
|
-
try {
|
|
2713
|
-
const validatedPath = uriToWorkspacePath(change.uri, workspaceRoot);
|
|
2714
|
-
if (!validatedPath.success) {
|
|
2715
|
-
result.success = false;
|
|
2716
|
-
result.errors.push(`Delete ${change.uri}: ${validatedPath.error}`);
|
|
2717
|
-
continue;
|
|
2718
|
-
}
|
|
2719
|
-
unlinkSync2(validatedPath.path);
|
|
2720
|
-
result.filesModified.push(validatedPath.path);
|
|
2721
|
-
} catch (err) {
|
|
2722
|
-
result.success = false;
|
|
2723
|
-
result.errors.push(`Delete ${change.uri}: ${String(err)}`);
|
|
2724
|
-
}
|
|
2725
|
-
}
|
|
2726
|
-
}
|
|
2727
|
-
}
|
|
2728
|
-
return result;
|
|
2729
|
-
}
|
|
2730
|
-
|
|
2731
|
-
// ../lsp-tools-mcp/dist/lsp/startup-failure.js
|
|
2774
|
+
// ../lsp-core/src/lsp/utils.ts
|
|
2732
2775
|
var RUST_SRC_REPAIR_MESSAGE = [
|
|
2733
2776
|
"rust-analyzer exited while loading Rust standard library sources.",
|
|
2734
2777
|
"",
|
|
@@ -2736,7 +2779,7 @@ var RUST_SRC_REPAIR_MESSAGE = [
|
|
|
2736
2779
|
" rustup component remove rust-src",
|
|
2737
2780
|
" rustup component add rust-src"
|
|
2738
2781
|
];
|
|
2739
|
-
function
|
|
2782
|
+
function errorMessage(error) {
|
|
2740
2783
|
return error instanceof Error ? error.message : String(error);
|
|
2741
2784
|
}
|
|
2742
2785
|
function formatKnownLspStartupFailure(error) {
|
|
@@ -2756,11 +2799,10 @@ function handleMissingDependencyError(error) {
|
|
|
2756
2799
|
const knownStartupFailure = formatKnownLspStartupFailure(error);
|
|
2757
2800
|
if (knownStartupFailure)
|
|
2758
2801
|
return knownStartupFailure;
|
|
2759
|
-
const message =
|
|
2802
|
+
const message = errorMessage(error);
|
|
2760
2803
|
return message.includes("NOT INSTALLED") || message.includes("No LSP server configured") ? message : null;
|
|
2761
2804
|
}
|
|
2762
|
-
|
|
2763
|
-
// ../lsp-tools-mcp/dist/missing-dependency-result.js
|
|
2805
|
+
// ../lsp-core/src/missing-dependency-result.ts
|
|
2764
2806
|
function missingDependencyResult(error, details) {
|
|
2765
2807
|
const message = handleMissingDependencyError(error);
|
|
2766
2808
|
if (!message)
|
|
@@ -2775,15 +2817,7 @@ function missingDependencyResult(error, details) {
|
|
|
2775
2817
|
};
|
|
2776
2818
|
}
|
|
2777
2819
|
|
|
2778
|
-
// ../lsp-
|
|
2779
|
-
var objectSchema = (properties, required = []) => ({
|
|
2780
|
-
type: "object",
|
|
2781
|
-
properties,
|
|
2782
|
-
required
|
|
2783
|
-
});
|
|
2784
|
-
function text(text2, details, isError = false) {
|
|
2785
|
-
return { content: [{ type: "text", text: text2 }], details, isError };
|
|
2786
|
-
}
|
|
2820
|
+
// ../lsp-core/src/tools/parameters.ts
|
|
2787
2821
|
function isRecord4(value) {
|
|
2788
2822
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
2789
2823
|
}
|
|
@@ -2813,18 +2847,23 @@ function optionalBoolean(params, key) {
|
|
|
2813
2847
|
const value = params[key];
|
|
2814
2848
|
return typeof value === "boolean" ? value : undefined;
|
|
2815
2849
|
}
|
|
2816
|
-
function isSeverityFilter(value) {
|
|
2817
|
-
return value === "error" || value === "warning" || value === "information" || value === "hint" || value === "all";
|
|
2818
|
-
}
|
|
2819
2850
|
function severityFilter(params) {
|
|
2820
2851
|
const value = params["severity"];
|
|
2821
|
-
if (
|
|
2852
|
+
if (value === "error" || value === "warning" || value === "information" || value === "hint" || value === "all") {
|
|
2822
2853
|
return value;
|
|
2854
|
+
}
|
|
2823
2855
|
return "all";
|
|
2824
2856
|
}
|
|
2825
2857
|
function clientOptions(signal) {
|
|
2826
2858
|
return signal === undefined ? {} : { signal };
|
|
2827
2859
|
}
|
|
2860
|
+
|
|
2861
|
+
// ../lsp-core/src/tools/result.ts
|
|
2862
|
+
function text(text2, details, isError = false) {
|
|
2863
|
+
return { content: [{ type: "text", text: text2 }], details, isError };
|
|
2864
|
+
}
|
|
2865
|
+
|
|
2866
|
+
// ../lsp-core/src/tools/diagnostics.ts
|
|
2828
2867
|
function asDiagnosticArray(result) {
|
|
2829
2868
|
if (!result)
|
|
2830
2869
|
return [];
|
|
@@ -2832,38 +2871,11 @@ function asDiagnosticArray(result) {
|
|
|
2832
2871
|
return result;
|
|
2833
2872
|
return result.items ?? [];
|
|
2834
2873
|
}
|
|
2835
|
-
function isDocumentSymbol(symbol) {
|
|
2836
|
-
return "range" in symbol;
|
|
2837
|
-
}
|
|
2838
|
-
async function executeLspStatus() {
|
|
2839
|
-
const servers = getAllServers();
|
|
2840
|
-
const snapshots = getLspManager().getSnapshot();
|
|
2841
|
-
const installed = servers.filter((server) => server.installed && !server.disabled);
|
|
2842
|
-
const configuredLines = servers.map((server) => {
|
|
2843
|
-
const state = server.disabled ? "disabled" : server.installed ? "installed" : "missing";
|
|
2844
|
-
return `- ${server.id}: ${state}; source=${server.source}; extensions=${server.extensions.join(", ")}`;
|
|
2845
|
-
});
|
|
2846
|
-
const activeLines = snapshots.map((snapshot) => {
|
|
2847
|
-
const state = snapshot.alive ? snapshot.isInitializing ? "initializing" : "alive" : "dead";
|
|
2848
|
-
return `- ${snapshot.serverId}: ${state}; root=${snapshot.root}; refs=${snapshot.refCount}`;
|
|
2849
|
-
});
|
|
2850
|
-
const lines = [
|
|
2851
|
-
`Configured LSP servers: ${servers.length}`,
|
|
2852
|
-
`Installed LSP servers: ${installed.length}`,
|
|
2853
|
-
"",
|
|
2854
|
-
...configuredLines,
|
|
2855
|
-
"",
|
|
2856
|
-
`Active LSP clients: ${snapshots.length}`,
|
|
2857
|
-
...activeLines
|
|
2858
|
-
];
|
|
2859
|
-
return text(lines.join(`
|
|
2860
|
-
`), { servers, snapshots });
|
|
2861
|
-
}
|
|
2862
2874
|
async function executeLspDiagnostics(params, signal) {
|
|
2863
2875
|
const filePath = requireString(params, "filePath");
|
|
2864
2876
|
const severity = severityFilter(params);
|
|
2865
2877
|
try {
|
|
2866
|
-
const absPath =
|
|
2878
|
+
const absPath = resolve4(contextCwd(), filePath);
|
|
2867
2879
|
if (isDirectoryPath(absPath)) {
|
|
2868
2880
|
const extension = inferExtensionFromDirectory(absPath);
|
|
2869
2881
|
if (!extension) {
|
|
@@ -2924,6 +2936,29 @@ async function executeLspDiagnostics(params, signal) {
|
|
|
2924
2936
|
throw error;
|
|
2925
2937
|
}
|
|
2926
2938
|
}
|
|
2939
|
+
// ../lsp-core/src/tools/install-decision.ts
|
|
2940
|
+
async function executeLspInstallDecision(params) {
|
|
2941
|
+
const serverId = requireString(params, "server_id");
|
|
2942
|
+
const decision = params["decision"];
|
|
2943
|
+
if (!isInstallDecision(decision)) {
|
|
2944
|
+
return text(`Invalid decision '${String(decision)}'. Expected "declined" or "allowed".`, { serverId, errorKind: "invalid_decision" }, true);
|
|
2945
|
+
}
|
|
2946
|
+
const serverIds = [...new Set(getMergedServers().map((server2) => server2.id))];
|
|
2947
|
+
if (!serverIds.includes(serverId)) {
|
|
2948
|
+
const preview = serverIds.slice(0, 20).join(", ");
|
|
2949
|
+
return text(`Unknown LSP server '${serverId}'. Known servers: ${preview}${serverIds.length > 20 ? "..." : ""}`, { serverId, errorKind: "unknown_server" }, true);
|
|
2950
|
+
}
|
|
2951
|
+
recordInstallDecision(serverId, decision);
|
|
2952
|
+
return text(`Recorded install decision for '${serverId}': ${decision}. ${decisionFollowUp(decision)}`, {
|
|
2953
|
+
serverId,
|
|
2954
|
+
decision
|
|
2955
|
+
});
|
|
2956
|
+
}
|
|
2957
|
+
function decisionFollowUp(decision) {
|
|
2958
|
+
return decision === "declined" ? "Future LSP lookups for this server stay quiet; proceed without LSP." : "Future LSP lookups keep install instructions without asking the user.";
|
|
2959
|
+
}
|
|
2960
|
+
|
|
2961
|
+
// ../lsp-core/src/tools/navigation.ts
|
|
2927
2962
|
async function executeLspGotoDefinition(params, signal) {
|
|
2928
2963
|
const filePath = requireString(params, "filePath");
|
|
2929
2964
|
const line = requireNumber(params, "line");
|
|
@@ -2989,6 +3024,263 @@ async function executeLspFindReferences(params, signal) {
|
|
|
2989
3024
|
throw error;
|
|
2990
3025
|
}
|
|
2991
3026
|
}
|
|
3027
|
+
|
|
3028
|
+
// ../lsp-core/src/lsp/workspace-edit.ts
|
|
3029
|
+
import { existsSync as existsSync8, readFileSync as readFileSync5, realpathSync, unlinkSync as unlinkSync2, writeFileSync as writeFileSync2 } from "node:fs";
|
|
3030
|
+
import { dirname as dirname5, isAbsolute as isAbsolute3, relative, resolve as resolve5 } from "node:path";
|
|
3031
|
+
import { fileURLToPath as fileURLToPath3 } from "node:url";
|
|
3032
|
+
function errorMessage2(error) {
|
|
3033
|
+
return error instanceof Error ? error.message : String(error);
|
|
3034
|
+
}
|
|
3035
|
+
function isPathInsideWorkspace(filePath, workspaceRoot) {
|
|
3036
|
+
const relativePath = relative(workspaceRoot, filePath);
|
|
3037
|
+
return relativePath === "" || !relativePath.startsWith("..") && !isAbsolute3(relativePath);
|
|
3038
|
+
}
|
|
3039
|
+
function realpathForValidation(filePath) {
|
|
3040
|
+
if (existsSync8(filePath))
|
|
3041
|
+
return realpathSync(filePath);
|
|
3042
|
+
const parent = dirname5(filePath);
|
|
3043
|
+
return resolve5(realpathSync(parent), relative(parent, filePath));
|
|
3044
|
+
}
|
|
3045
|
+
function uriToWorkspacePath(uri, workspaceRoot) {
|
|
3046
|
+
let filePath;
|
|
3047
|
+
try {
|
|
3048
|
+
filePath = fileURLToPath3(uri);
|
|
3049
|
+
} catch (error) {
|
|
3050
|
+
return { success: false, error: `non-file URI ${uri}: ${errorMessage2(error)}` };
|
|
3051
|
+
}
|
|
3052
|
+
let validatedPath;
|
|
3053
|
+
try {
|
|
3054
|
+
validatedPath = realpathForValidation(filePath);
|
|
3055
|
+
} catch (error) {
|
|
3056
|
+
return { success: false, error: `${filePath}: ${errorMessage2(error)}` };
|
|
3057
|
+
}
|
|
3058
|
+
if (!isPathInsideWorkspace(validatedPath, workspaceRoot)) {
|
|
3059
|
+
return { success: false, error: `${filePath}: outside workspace ${workspaceRoot}` };
|
|
3060
|
+
}
|
|
3061
|
+
return { success: true, path: filePath };
|
|
3062
|
+
}
|
|
3063
|
+
function applyTextEditsToFile(filePath, edits) {
|
|
3064
|
+
try {
|
|
3065
|
+
const content = readFileSync5(filePath, "utf-8");
|
|
3066
|
+
const lines = content.split(`
|
|
3067
|
+
`);
|
|
3068
|
+
const sortedEdits = [...edits].sort((a, b) => {
|
|
3069
|
+
if (b.range.start.line !== a.range.start.line) {
|
|
3070
|
+
return b.range.start.line - a.range.start.line;
|
|
3071
|
+
}
|
|
3072
|
+
return b.range.start.character - a.range.start.character;
|
|
3073
|
+
});
|
|
3074
|
+
for (const edit of sortedEdits) {
|
|
3075
|
+
const startLine = edit.range.start.line;
|
|
3076
|
+
const startChar = edit.range.start.character;
|
|
3077
|
+
const endLine = edit.range.end.line;
|
|
3078
|
+
const endChar = edit.range.end.character;
|
|
3079
|
+
if (startLine === endLine) {
|
|
3080
|
+
const line = lines[startLine] ?? "";
|
|
3081
|
+
lines[startLine] = line.substring(0, startChar) + edit.newText + line.substring(endChar);
|
|
3082
|
+
} else {
|
|
3083
|
+
const firstLine = lines[startLine] ?? "";
|
|
3084
|
+
const lastLine = lines[endLine] ?? "";
|
|
3085
|
+
const newContent = firstLine.substring(0, startChar) + edit.newText + lastLine.substring(endChar);
|
|
3086
|
+
lines.splice(startLine, endLine - startLine + 1, ...newContent.split(`
|
|
3087
|
+
`));
|
|
3088
|
+
}
|
|
3089
|
+
}
|
|
3090
|
+
writeFileSync2(filePath, lines.join(`
|
|
3091
|
+
`), "utf-8");
|
|
3092
|
+
return { success: true, editCount: edits.length };
|
|
3093
|
+
} catch (err) {
|
|
3094
|
+
return {
|
|
3095
|
+
success: false,
|
|
3096
|
+
editCount: 0,
|
|
3097
|
+
error: err instanceof Error ? err.message : String(err)
|
|
3098
|
+
};
|
|
3099
|
+
}
|
|
3100
|
+
}
|
|
3101
|
+
function applyWorkspaceEdit(edit, options = {}) {
|
|
3102
|
+
if (!edit) {
|
|
3103
|
+
return { success: false, filesModified: [], totalEdits: 0, errors: ["No edit provided"] };
|
|
3104
|
+
}
|
|
3105
|
+
const result = { success: true, filesModified: [], totalEdits: 0, errors: [] };
|
|
3106
|
+
const workspaceRoot = realpathSync(options.workspaceRoot ?? contextCwd());
|
|
3107
|
+
if (edit.changes) {
|
|
3108
|
+
for (const [uri, edits] of Object.entries(edit.changes)) {
|
|
3109
|
+
const validatedPath = uriToWorkspacePath(uri, workspaceRoot);
|
|
3110
|
+
if (!validatedPath.success) {
|
|
3111
|
+
result.success = false;
|
|
3112
|
+
result.errors.push(validatedPath.error);
|
|
3113
|
+
continue;
|
|
3114
|
+
}
|
|
3115
|
+
const applyResult = applyTextEditsToFile(validatedPath.path, edits);
|
|
3116
|
+
if (applyResult.success) {
|
|
3117
|
+
result.filesModified.push(validatedPath.path);
|
|
3118
|
+
result.totalEdits += applyResult.editCount;
|
|
3119
|
+
} else {
|
|
3120
|
+
result.success = false;
|
|
3121
|
+
result.errors.push(`${validatedPath.path}: ${applyResult.error}`);
|
|
3122
|
+
}
|
|
3123
|
+
}
|
|
3124
|
+
}
|
|
3125
|
+
if (edit.documentChanges) {
|
|
3126
|
+
for (const change of edit.documentChanges) {
|
|
3127
|
+
if (!("kind" in change)) {
|
|
3128
|
+
const validatedPath = uriToWorkspacePath(change.textDocument.uri, workspaceRoot);
|
|
3129
|
+
if (!validatedPath.success) {
|
|
3130
|
+
result.success = false;
|
|
3131
|
+
result.errors.push(validatedPath.error);
|
|
3132
|
+
continue;
|
|
3133
|
+
}
|
|
3134
|
+
const applyResult = applyTextEditsToFile(validatedPath.path, change.edits);
|
|
3135
|
+
if (applyResult.success) {
|
|
3136
|
+
result.filesModified.push(validatedPath.path);
|
|
3137
|
+
result.totalEdits += applyResult.editCount;
|
|
3138
|
+
} else {
|
|
3139
|
+
result.success = false;
|
|
3140
|
+
result.errors.push(`${validatedPath.path}: ${applyResult.error}`);
|
|
3141
|
+
}
|
|
3142
|
+
continue;
|
|
3143
|
+
}
|
|
3144
|
+
if (change.kind === "create") {
|
|
3145
|
+
try {
|
|
3146
|
+
const validatedPath = uriToWorkspacePath(change.uri, workspaceRoot);
|
|
3147
|
+
if (!validatedPath.success) {
|
|
3148
|
+
result.success = false;
|
|
3149
|
+
result.errors.push(`Create ${change.uri}: ${validatedPath.error}`);
|
|
3150
|
+
continue;
|
|
3151
|
+
}
|
|
3152
|
+
writeFileSync2(validatedPath.path, "", "utf-8");
|
|
3153
|
+
result.filesModified.push(validatedPath.path);
|
|
3154
|
+
} catch (err) {
|
|
3155
|
+
result.success = false;
|
|
3156
|
+
result.errors.push(`Create ${change.uri}: ${String(err)}`);
|
|
3157
|
+
}
|
|
3158
|
+
} else if (change.kind === "rename") {
|
|
3159
|
+
try {
|
|
3160
|
+
const oldPath = uriToWorkspacePath(change.oldUri, workspaceRoot);
|
|
3161
|
+
const newPath = uriToWorkspacePath(change.newUri, workspaceRoot);
|
|
3162
|
+
if (!oldPath.success || !newPath.success) {
|
|
3163
|
+
const error = oldPath.success ? newPath.success ? "invalid URI" : newPath.error : oldPath.error;
|
|
3164
|
+
result.success = false;
|
|
3165
|
+
result.errors.push(`Rename ${change.oldUri}: ${error}`);
|
|
3166
|
+
continue;
|
|
3167
|
+
}
|
|
3168
|
+
const content = readFileSync5(oldPath.path, "utf-8");
|
|
3169
|
+
writeFileSync2(newPath.path, content, "utf-8");
|
|
3170
|
+
unlinkSync2(oldPath.path);
|
|
3171
|
+
result.filesModified.push(newPath.path);
|
|
3172
|
+
} catch (err) {
|
|
3173
|
+
result.success = false;
|
|
3174
|
+
result.errors.push(`Rename ${change.oldUri}: ${String(err)}`);
|
|
3175
|
+
}
|
|
3176
|
+
} else if (change.kind === "delete") {
|
|
3177
|
+
try {
|
|
3178
|
+
const validatedPath = uriToWorkspacePath(change.uri, workspaceRoot);
|
|
3179
|
+
if (!validatedPath.success) {
|
|
3180
|
+
result.success = false;
|
|
3181
|
+
result.errors.push(`Delete ${change.uri}: ${validatedPath.error}`);
|
|
3182
|
+
continue;
|
|
3183
|
+
}
|
|
3184
|
+
unlinkSync2(validatedPath.path);
|
|
3185
|
+
result.filesModified.push(validatedPath.path);
|
|
3186
|
+
} catch (err) {
|
|
3187
|
+
result.success = false;
|
|
3188
|
+
result.errors.push(`Delete ${change.uri}: ${String(err)}`);
|
|
3189
|
+
}
|
|
3190
|
+
}
|
|
3191
|
+
}
|
|
3192
|
+
}
|
|
3193
|
+
return result;
|
|
3194
|
+
}
|
|
3195
|
+
|
|
3196
|
+
// ../lsp-core/src/tools/rename.ts
|
|
3197
|
+
async function executeLspPrepareRename(params, signal) {
|
|
3198
|
+
const filePath = requireString(params, "filePath");
|
|
3199
|
+
const line = requireNumber(params, "line");
|
|
3200
|
+
const character = requireNumber(params, "character");
|
|
3201
|
+
try {
|
|
3202
|
+
const result = await withLspClient(filePath, async (client) => client.prepareRename(filePath, line, character), "prepareRename", clientOptions(signal));
|
|
3203
|
+
const details = { filePath, line, character, result };
|
|
3204
|
+
return text(formatPrepareRenameResult(result), details);
|
|
3205
|
+
} catch (error) {
|
|
3206
|
+
const missingDependency = missingDependencyResult(error, {
|
|
3207
|
+
filePath,
|
|
3208
|
+
line,
|
|
3209
|
+
character,
|
|
3210
|
+
result: null
|
|
3211
|
+
});
|
|
3212
|
+
if (missingDependency)
|
|
3213
|
+
return missingDependency;
|
|
3214
|
+
throw error;
|
|
3215
|
+
}
|
|
3216
|
+
}
|
|
3217
|
+
async function executeLspRename(params, signal) {
|
|
3218
|
+
const filePath = requireString(params, "filePath");
|
|
3219
|
+
const line = requireNumber(params, "line");
|
|
3220
|
+
const character = requireNumber(params, "character");
|
|
3221
|
+
const newName = requireString(params, "newName");
|
|
3222
|
+
try {
|
|
3223
|
+
const edit = await withLspClient(filePath, async (client, workspaceRoot) => ({
|
|
3224
|
+
edit: await client.rename(filePath, line, character, newName),
|
|
3225
|
+
workspaceRoot
|
|
3226
|
+
}), "rename", clientOptions(signal));
|
|
3227
|
+
const apply = applyWorkspaceEdit(edit.edit, { workspaceRoot: edit.workspaceRoot });
|
|
3228
|
+
const details = { filePath, line, character, newName, apply, edit: edit.edit };
|
|
3229
|
+
return text(formatApplyResult(apply), details, !apply.success);
|
|
3230
|
+
} catch (error) {
|
|
3231
|
+
const missingDependency = missingDependencyResult(error, {
|
|
3232
|
+
filePath,
|
|
3233
|
+
line,
|
|
3234
|
+
character,
|
|
3235
|
+
newName,
|
|
3236
|
+
apply: null,
|
|
3237
|
+
edit: null
|
|
3238
|
+
});
|
|
3239
|
+
if (missingDependency)
|
|
3240
|
+
return missingDependency;
|
|
3241
|
+
throw error;
|
|
3242
|
+
}
|
|
3243
|
+
}
|
|
3244
|
+
|
|
3245
|
+
// ../lsp-core/src/tools/schema.ts
|
|
3246
|
+
function objectSchema(properties, required = []) {
|
|
3247
|
+
return {
|
|
3248
|
+
type: "object",
|
|
3249
|
+
properties,
|
|
3250
|
+
required
|
|
3251
|
+
};
|
|
3252
|
+
}
|
|
3253
|
+
|
|
3254
|
+
// ../lsp-core/src/tools/status.ts
|
|
3255
|
+
async function executeLspStatus() {
|
|
3256
|
+
const servers = getAllServers();
|
|
3257
|
+
const snapshots = getLspManager().getSnapshot();
|
|
3258
|
+
const installed = servers.filter((server2) => server2.installed && !server2.disabled);
|
|
3259
|
+
const configuredLines = servers.map((server2) => {
|
|
3260
|
+
const state = server2.disabled ? "disabled" : server2.installed ? "installed" : "missing";
|
|
3261
|
+
return `- ${server2.id}: ${state}; source=${server2.source}; extensions=${server2.extensions.join(", ")}`;
|
|
3262
|
+
});
|
|
3263
|
+
const activeLines = snapshots.map((snapshot) => {
|
|
3264
|
+
const state = snapshot.alive ? snapshot.isInitializing ? "initializing" : "alive" : "dead";
|
|
3265
|
+
return `- ${snapshot.serverId}: ${state}; root=${snapshot.root}; refs=${snapshot.refCount}`;
|
|
3266
|
+
});
|
|
3267
|
+
const lines = [
|
|
3268
|
+
`Configured LSP servers: ${servers.length}`,
|
|
3269
|
+
`Installed LSP servers: ${installed.length}`,
|
|
3270
|
+
"",
|
|
3271
|
+
...configuredLines,
|
|
3272
|
+
"",
|
|
3273
|
+
`Active LSP clients: ${snapshots.length}`,
|
|
3274
|
+
...activeLines
|
|
3275
|
+
];
|
|
3276
|
+
return text(lines.join(`
|
|
3277
|
+
`), { servers, snapshots });
|
|
3278
|
+
}
|
|
3279
|
+
|
|
3280
|
+
// ../lsp-core/src/tools/symbols.ts
|
|
3281
|
+
function isDocumentSymbol(symbol) {
|
|
3282
|
+
return "range" in symbol;
|
|
3283
|
+
}
|
|
2992
3284
|
async function executeLspSymbols(params, signal) {
|
|
2993
3285
|
const filePath = requireString(params, "filePath");
|
|
2994
3286
|
const rawScope = optionalString(params, "scope") ?? "document";
|
|
@@ -3055,85 +3347,8 @@ function formatSymbolsResult(filePath, scope, symbols, limit, query) {
|
|
|
3055
3347
|
return text(lines.join(`
|
|
3056
3348
|
`), details);
|
|
3057
3349
|
}
|
|
3058
|
-
|
|
3059
|
-
|
|
3060
|
-
const line = requireNumber(params, "line");
|
|
3061
|
-
const character = requireNumber(params, "character");
|
|
3062
|
-
try {
|
|
3063
|
-
const result = await withLspClient(filePath, async (client) => client.prepareRename(filePath, line, character), "prepareRename", clientOptions(signal));
|
|
3064
|
-
const details = { filePath, line, character, result };
|
|
3065
|
-
return text(formatPrepareRenameResult(result), details);
|
|
3066
|
-
} catch (error) {
|
|
3067
|
-
const missingDependency = missingDependencyResult(error, {
|
|
3068
|
-
filePath,
|
|
3069
|
-
line,
|
|
3070
|
-
character,
|
|
3071
|
-
result: null
|
|
3072
|
-
});
|
|
3073
|
-
if (missingDependency)
|
|
3074
|
-
return missingDependency;
|
|
3075
|
-
throw error;
|
|
3076
|
-
}
|
|
3077
|
-
}
|
|
3078
|
-
async function executeLspRename(params, signal) {
|
|
3079
|
-
const filePath = requireString(params, "filePath");
|
|
3080
|
-
const line = requireNumber(params, "line");
|
|
3081
|
-
const character = requireNumber(params, "character");
|
|
3082
|
-
const newName = requireString(params, "newName");
|
|
3083
|
-
try {
|
|
3084
|
-
const edit = await withLspClient(filePath, async (client, workspaceRoot) => ({
|
|
3085
|
-
edit: await client.rename(filePath, line, character, newName),
|
|
3086
|
-
workspaceRoot
|
|
3087
|
-
}), "rename", clientOptions(signal));
|
|
3088
|
-
const apply = applyWorkspaceEdit(edit.edit, { workspaceRoot: edit.workspaceRoot });
|
|
3089
|
-
const details = { filePath, line, character, newName, apply, edit: edit.edit };
|
|
3090
|
-
return text(formatApplyResult(apply), details, !apply.success);
|
|
3091
|
-
} catch (error) {
|
|
3092
|
-
const missingDependency = missingDependencyResult(error, {
|
|
3093
|
-
filePath,
|
|
3094
|
-
line,
|
|
3095
|
-
character,
|
|
3096
|
-
newName,
|
|
3097
|
-
apply: null,
|
|
3098
|
-
edit: null
|
|
3099
|
-
});
|
|
3100
|
-
if (missingDependency)
|
|
3101
|
-
return missingDependency;
|
|
3102
|
-
throw error;
|
|
3103
|
-
}
|
|
3104
|
-
}
|
|
3105
|
-
async function executeLspInstallDecision(params) {
|
|
3106
|
-
const serverId = requireString(params, "server_id");
|
|
3107
|
-
const decision = params["decision"];
|
|
3108
|
-
if (!isInstallDecision(decision)) {
|
|
3109
|
-
return text(`Invalid decision '${String(decision)}'. Expected "declined" or "allowed".`, { serverId, errorKind: "invalid_decision" }, true);
|
|
3110
|
-
}
|
|
3111
|
-
const serverIds = [...new Set(getMergedServers().map((server) => server.id))];
|
|
3112
|
-
if (!serverIds.includes(serverId)) {
|
|
3113
|
-
const preview = serverIds.slice(0, 20).join(", ");
|
|
3114
|
-
return text(`Unknown LSP server '${serverId}'. Known servers: ${preview}${serverIds.length > 20 ? "..." : ""}`, { serverId, errorKind: "unknown_server" }, true);
|
|
3115
|
-
}
|
|
3116
|
-
recordInstallDecision(serverId, decision);
|
|
3117
|
-
return text(`Recorded install decision for '${serverId}': ${decision}. ${decisionFollowUp(decision)}`, {
|
|
3118
|
-
serverId,
|
|
3119
|
-
decision
|
|
3120
|
-
});
|
|
3121
|
-
}
|
|
3122
|
-
function decisionFollowUp(decision) {
|
|
3123
|
-
return decision === "declined" ? "Future LSP lookups for this server stay quiet; proceed without LSP." : "Future LSP lookups keep install instructions without asking the user.";
|
|
3124
|
-
}
|
|
3125
|
-
async function executeLspTool(name, params, signal) {
|
|
3126
|
-
const tool = LSP_MCP_TOOLS.find((candidate) => matchesToolName(candidate, name));
|
|
3127
|
-
if (!tool)
|
|
3128
|
-
throw new Error(`Unknown LSP tool: ${name}`);
|
|
3129
|
-
return tool.execute(params, signal);
|
|
3130
|
-
}
|
|
3131
|
-
function matchesToolName(tool, name) {
|
|
3132
|
-
return tool.name === name || (tool.aliases?.includes(name) ?? false);
|
|
3133
|
-
}
|
|
3134
|
-
function coerceToolArguments(value) {
|
|
3135
|
-
return isRecord4(value) ? value : {};
|
|
3136
|
-
}
|
|
3350
|
+
|
|
3351
|
+
// ../lsp-core/src/tools/definitions.ts
|
|
3137
3352
|
var LSP_MCP_TOOLS = [
|
|
3138
3353
|
{
|
|
3139
3354
|
name: "status",
|
|
@@ -3244,12 +3459,24 @@ var LSP_MCP_TOOLS = [
|
|
|
3244
3459
|
execute: executeLspInstallDecision
|
|
3245
3460
|
}
|
|
3246
3461
|
];
|
|
3247
|
-
|
|
3248
|
-
|
|
3462
|
+
// ../lsp-core/src/tools/runtime.ts
|
|
3463
|
+
async function executeLspTool(name, params, signal) {
|
|
3464
|
+
const tool = LSP_MCP_TOOLS.find((candidate) => matchesToolName(candidate, name));
|
|
3465
|
+
if (!tool)
|
|
3466
|
+
throw new Error(`Unknown LSP tool: ${name}`);
|
|
3467
|
+
return tool.execute(params, signal);
|
|
3468
|
+
}
|
|
3469
|
+
function matchesToolName(tool, name) {
|
|
3470
|
+
return tool.name === name || (tool.aliases?.includes(name) ?? false);
|
|
3471
|
+
}
|
|
3472
|
+
function coerceToolArguments(value) {
|
|
3473
|
+
return isRecord4(value) ? value : {};
|
|
3474
|
+
}
|
|
3475
|
+
// ../lsp-core/src/mcp.ts
|
|
3249
3476
|
var SERVER_NAME = "lsp";
|
|
3250
3477
|
var SERVER_VERSION = "0.1.0";
|
|
3251
3478
|
async function handleLspMcpRequest(input) {
|
|
3252
|
-
if (!
|
|
3479
|
+
if (!isPlainRecord(input)) {
|
|
3253
3480
|
return errorResponse(null, -32600, "Invalid Request");
|
|
3254
3481
|
}
|
|
3255
3482
|
const id = jsonRpcId(input["id"]);
|
|
@@ -3275,7 +3502,7 @@ async function handleLspMcpRequest(input) {
|
|
|
3275
3502
|
return errorResponse(id, -32601, `Method not found: ${String(method)}`);
|
|
3276
3503
|
}
|
|
3277
3504
|
async function handleToolCall(id, params) {
|
|
3278
|
-
if (!
|
|
3505
|
+
if (!isPlainRecord(params) || typeof params["name"] !== "string") {
|
|
3279
3506
|
return errorResponse(id, -32602, "tools/call requires params.name");
|
|
3280
3507
|
}
|
|
3281
3508
|
try {
|
|
@@ -3300,37 +3527,22 @@ function describeTool(tool) {
|
|
|
3300
3527
|
inputSchema: tool.inputSchema
|
|
3301
3528
|
};
|
|
3302
3529
|
}
|
|
3303
|
-
function successResponse(id, result) {
|
|
3304
|
-
return { jsonrpc: "2.0", id, result };
|
|
3305
|
-
}
|
|
3306
|
-
function errorResponse(id, code, message, data) {
|
|
3307
|
-
return { jsonrpc: "2.0", id, error: data === undefined ? { code, message } : { code, message, data } };
|
|
3308
|
-
}
|
|
3309
3530
|
function requestedProtocolVersion(params) {
|
|
3310
|
-
if (!
|
|
3531
|
+
if (!isPlainRecord(params) || typeof params["protocolVersion"] !== "string")
|
|
3311
3532
|
return "2024-11-05";
|
|
3312
3533
|
return params["protocolVersion"];
|
|
3313
3534
|
}
|
|
3314
|
-
function jsonRpcId(value) {
|
|
3315
|
-
return typeof value === "string" || typeof value === "number" || value === null ? value : null;
|
|
3316
|
-
}
|
|
3317
|
-
function isRecord5(value) {
|
|
3318
|
-
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
3319
|
-
}
|
|
3320
|
-
function messageFromError(error) {
|
|
3321
|
-
return error instanceof Error ? error.message : String(error);
|
|
3322
|
-
}
|
|
3323
3535
|
|
|
3324
3536
|
// src/request-routing.ts
|
|
3325
3537
|
var CONTEXT_KEY = "_context";
|
|
3326
3538
|
function extractRequestContext(raw) {
|
|
3327
|
-
if (!
|
|
3539
|
+
if (!isRecord5(raw) || raw["method"] !== "tools/call")
|
|
3328
3540
|
return { input: raw, context: undefined };
|
|
3329
3541
|
const params = raw["params"];
|
|
3330
|
-
if (!
|
|
3542
|
+
if (!isRecord5(params))
|
|
3331
3543
|
return { input: raw, context: undefined };
|
|
3332
3544
|
const args = params["arguments"];
|
|
3333
|
-
if (!
|
|
3545
|
+
if (!isRecord5(args))
|
|
3334
3546
|
return { input: raw, context: undefined };
|
|
3335
3547
|
const context = parseContext(args[CONTEXT_KEY]);
|
|
3336
3548
|
if (!context)
|
|
@@ -3347,7 +3559,7 @@ function handleDaemonMessage(raw) {
|
|
|
3347
3559
|
return handleLspMcpRequest(input);
|
|
3348
3560
|
}
|
|
3349
3561
|
function parseContext(value) {
|
|
3350
|
-
if (!
|
|
3562
|
+
if (!isRecord5(value))
|
|
3351
3563
|
return;
|
|
3352
3564
|
const context = {};
|
|
3353
3565
|
const cwd = value["cwd"];
|
|
@@ -3358,11 +3570,11 @@ function parseContext(value) {
|
|
|
3358
3570
|
context.env = env;
|
|
3359
3571
|
return context.cwd === undefined && context.env === undefined ? undefined : context;
|
|
3360
3572
|
}
|
|
3361
|
-
function
|
|
3573
|
+
function isRecord5(value) {
|
|
3362
3574
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
3363
3575
|
}
|
|
3364
3576
|
function isStringRecord2(value) {
|
|
3365
|
-
return
|
|
3577
|
+
return isRecord5(value) && Object.values(value).every((item) => typeof item === "string");
|
|
3366
3578
|
}
|
|
3367
3579
|
|
|
3368
3580
|
// src/socket-jsonrpc.ts
|
|
@@ -3489,10 +3701,10 @@ function sendToolCall(socketPath, name, args, timeoutMs) {
|
|
|
3489
3701
|
});
|
|
3490
3702
|
}
|
|
3491
3703
|
function toToolResult(message) {
|
|
3492
|
-
if (!
|
|
3704
|
+
if (!isRecord6(message) || message["id"] !== REQUEST_ID)
|
|
3493
3705
|
return null;
|
|
3494
3706
|
const result = message["result"];
|
|
3495
|
-
if (!
|
|
3707
|
+
if (!isRecord6(result) || !Array.isArray(result["content"]))
|
|
3496
3708
|
return null;
|
|
3497
3709
|
return {
|
|
3498
3710
|
content: result["content"],
|
|
@@ -3500,70 +3712,45 @@ function toToolResult(message) {
|
|
|
3500
3712
|
details: result["details"]
|
|
3501
3713
|
};
|
|
3502
3714
|
}
|
|
3503
|
-
function
|
|
3715
|
+
function isRecord6(value) {
|
|
3504
3716
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
3505
3717
|
}
|
|
3506
3718
|
function errorText(error) {
|
|
3507
3719
|
return error instanceof Error ? error.message : String(error);
|
|
3508
3720
|
}
|
|
3509
3721
|
// src/proxy.ts
|
|
3510
|
-
import { createInterface } from "node:readline";
|
|
3511
3722
|
async function runMcpStdioProxy(options = {}) {
|
|
3512
3723
|
const input = options.input ?? process.stdin;
|
|
3513
3724
|
const output = options.output ?? process.stdout;
|
|
3514
3725
|
const paths = options.paths ?? daemonPaths();
|
|
3515
3726
|
const context = options.context ?? currentRequestContext();
|
|
3516
3727
|
const callOptions = { paths, context, ...options.ensure ? { ensure: options.ensure } : {} };
|
|
3517
|
-
|
|
3518
|
-
|
|
3519
|
-
|
|
3520
|
-
|
|
3521
|
-
|
|
3522
|
-
|
|
3523
|
-
if (response)
|
|
3524
|
-
output.write(`${JSON.stringify(response)}
|
|
3525
|
-
`);
|
|
3526
|
-
} catch (error) {
|
|
3728
|
+
await runJsonRpcStdioServer({
|
|
3729
|
+
input,
|
|
3730
|
+
output,
|
|
3731
|
+
handler: handleProxyRequest,
|
|
3732
|
+
handlerOptions: callOptions,
|
|
3733
|
+
onHandlerError: (error) => {
|
|
3527
3734
|
process.stderr.write(`[lsp-daemon] proxy error: ${error instanceof Error ? error.message : String(error)}
|
|
3528
3735
|
`);
|
|
3529
3736
|
}
|
|
3530
|
-
}
|
|
3737
|
+
});
|
|
3531
3738
|
}
|
|
3532
|
-
async function
|
|
3533
|
-
let parsed;
|
|
3534
|
-
try {
|
|
3535
|
-
parsed = JSON.parse(line);
|
|
3536
|
-
} catch (error) {
|
|
3537
|
-
return parseErrorResponse(error);
|
|
3538
|
-
}
|
|
3739
|
+
async function handleProxyRequest(parsed, callOptions) {
|
|
3539
3740
|
const toolCall = asToolCall(parsed);
|
|
3540
3741
|
if (!toolCall)
|
|
3541
3742
|
return handleLspMcpRequest(parsed);
|
|
3542
3743
|
const result = await callToolViaDaemon(toolCall.name, toolCall.args, callOptions);
|
|
3543
|
-
return {
|
|
3544
|
-
jsonrpc: "2.0",
|
|
3545
|
-
id: toolCall.id,
|
|
3546
|
-
result: { content: result.content, isError: result.isError ?? false, details: result.details }
|
|
3547
|
-
};
|
|
3744
|
+
return successResponse(toolCall.id, { content: result.content, isError: result.isError ?? false, details: result.details });
|
|
3548
3745
|
}
|
|
3549
3746
|
function asToolCall(parsed) {
|
|
3550
|
-
if (!
|
|
3747
|
+
if (!isPlainRecord(parsed) || parsed["method"] !== "tools/call")
|
|
3551
3748
|
return null;
|
|
3552
3749
|
const params = parsed["params"];
|
|
3553
|
-
if (!
|
|
3750
|
+
if (!isPlainRecord(params) || typeof params["name"] !== "string")
|
|
3554
3751
|
return null;
|
|
3555
3752
|
const args = params["arguments"];
|
|
3556
|
-
return { id:
|
|
3557
|
-
}
|
|
3558
|
-
function jsonRpcId2(value) {
|
|
3559
|
-
return typeof value === "string" || typeof value === "number" || value === null ? value : null;
|
|
3560
|
-
}
|
|
3561
|
-
function parseErrorResponse(error) {
|
|
3562
|
-
const message = error instanceof Error ? error.message : String(error);
|
|
3563
|
-
return { jsonrpc: "2.0", id: null, error: { code: -32700, message: "Parse error", data: message } };
|
|
3564
|
-
}
|
|
3565
|
-
function isRecord8(value) {
|
|
3566
|
-
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
3753
|
+
return { id: jsonRpcId(parsed["id"]), name: params["name"], args: isPlainRecord(args) ? args : {} };
|
|
3567
3754
|
}
|
|
3568
3755
|
export {
|
|
3569
3756
|
runMcpStdioProxy,
|