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,1159 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
// src/cli.ts
|
|
4
|
-
import { argv, stderr } from "node:process";
|
|
5
|
-
|
|
6
|
-
// src/mcp-lifecycle-log.ts
|
|
7
|
-
import { appendFileSync, renameSync, statSync } from "node:fs";
|
|
8
|
-
import { tmpdir } from "node:os";
|
|
9
|
-
import { join } from "node:path";
|
|
10
|
-
var LOG_FILE_NAME = "omo-ast-grep-mcp.log";
|
|
11
|
-
var MAX_LOG_BYTES = 5 * 1024 * 1024;
|
|
12
|
-
function mcpLifecycleLogPath() {
|
|
13
|
-
return join(tmpdir(), LOG_FILE_NAME);
|
|
14
|
-
}
|
|
15
|
-
function writeMcpLifecycleLog(event, fields = {}) {
|
|
16
|
-
const path = mcpLifecycleLogPath();
|
|
17
|
-
try {
|
|
18
|
-
rotateLogIfNeeded(path);
|
|
19
|
-
appendFileSync(path, `${JSON.stringify({ ts: new Date().toISOString(), event, pid: process.pid, ppid: process.ppid, ...fields })}
|
|
20
|
-
`);
|
|
21
|
-
} catch {}
|
|
22
|
-
}
|
|
23
|
-
function rotateLogIfNeeded(path) {
|
|
24
|
-
try {
|
|
25
|
-
if (statSync(path).size < MAX_LOG_BYTES)
|
|
26
|
-
return;
|
|
27
|
-
renameSync(path, `${path}.1`);
|
|
28
|
-
} catch {}
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
// ../ast-grep-core/src/language-support.ts
|
|
32
|
-
var CLI_LANGUAGES = [
|
|
33
|
-
"bash",
|
|
34
|
-
"c",
|
|
35
|
-
"cpp",
|
|
36
|
-
"csharp",
|
|
37
|
-
"css",
|
|
38
|
-
"elixir",
|
|
39
|
-
"go",
|
|
40
|
-
"haskell",
|
|
41
|
-
"html",
|
|
42
|
-
"java",
|
|
43
|
-
"javascript",
|
|
44
|
-
"json",
|
|
45
|
-
"kotlin",
|
|
46
|
-
"lua",
|
|
47
|
-
"nix",
|
|
48
|
-
"php",
|
|
49
|
-
"python",
|
|
50
|
-
"ruby",
|
|
51
|
-
"rust",
|
|
52
|
-
"scala",
|
|
53
|
-
"solidity",
|
|
54
|
-
"swift",
|
|
55
|
-
"typescript",
|
|
56
|
-
"tsx",
|
|
57
|
-
"yaml"
|
|
58
|
-
];
|
|
59
|
-
var DEFAULT_TIMEOUT_MS = 300000;
|
|
60
|
-
var DEFAULT_MAX_OUTPUT_BYTES = 1 * 1024 * 1024;
|
|
61
|
-
var DEFAULT_MAX_MATCHES = 500;
|
|
62
|
-
// ../ast-grep-core/src/pattern-hints.ts
|
|
63
|
-
function detectRegexMisuse(pattern) {
|
|
64
|
-
const src = pattern.trim();
|
|
65
|
-
if (/\\[wWdDsSbB]/.test(src)) {
|
|
66
|
-
return 'Hint: "\\w", "\\d", "\\s", "\\b" are regex escapes. ast-grep matches AST nodes, not text - use $VAR for identifiers, $$$ for node lists, or switch to grep for text search.';
|
|
67
|
-
}
|
|
68
|
-
if (/\[[a-zA-Z0-9]-[a-zA-Z0-9]\]/.test(src)) {
|
|
69
|
-
return 'Hint: "[a-z]" and similar character classes are regex, not AST. Use $VAR to match any identifier, or switch to grep for text search.';
|
|
70
|
-
}
|
|
71
|
-
if (!src.includes("$") && /\w\.[*+]/.test(src)) {
|
|
72
|
-
return 'Hint: ".*" and ".+" are regex wildcards. In ast-grep use $$$ for multiple AST nodes and $VAR for a single node. For text patterns, switch to grep.';
|
|
73
|
-
}
|
|
74
|
-
if (/^[-\w.*]+\|[-\w.*|]+$/.test(src)) {
|
|
75
|
-
return 'Hint: "|" is regex alternation and does NOT work in ast-grep patterns. Options: (a) fire one ast_grep_search per alternative, or (b) switch to grep with a regex pattern like "foo|bar".';
|
|
76
|
-
}
|
|
77
|
-
return null;
|
|
78
|
-
}
|
|
79
|
-
function detectLanguageSpecificMistake(pattern, lang) {
|
|
80
|
-
const src = pattern.trim();
|
|
81
|
-
if (lang === "python") {
|
|
82
|
-
if (src.startsWith("class ") && src.endsWith(":")) {
|
|
83
|
-
return `Hint: Remove trailing colon. Try: "${src.slice(0, -1)}"`;
|
|
84
|
-
}
|
|
85
|
-
if ((src.startsWith("def ") || src.startsWith("async def ")) && src.endsWith(":")) {
|
|
86
|
-
return `Hint: Remove trailing colon. Try: "${src.slice(0, -1)}"`;
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
if (["javascript", "typescript", "tsx"].includes(lang)) {
|
|
90
|
-
if (/^(export\s+)?(async\s+)?function\s+\$[A-Z_]+\s*$/i.test(src)) {
|
|
91
|
-
return 'Hint: Function patterns need params and body. Try "function $NAME($$$) { $$$ }"';
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
if (lang === "go") {
|
|
95
|
-
if (/^func\s+\$[A-Z_]+\s*$/i.test(src)) {
|
|
96
|
-
return 'Hint: Go function patterns need params and body. Try "func $NAME($$$) { $$$ }"';
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
if (lang === "rust") {
|
|
100
|
-
if (/^fn\s+\$[A-Z_]+\s*$/i.test(src)) {
|
|
101
|
-
return 'Hint: Rust fn patterns need params and body. Try "fn $NAME($$$) { $$$ }"';
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
return null;
|
|
105
|
-
}
|
|
106
|
-
function getPatternHint(pattern, lang) {
|
|
107
|
-
return detectRegexMisuse(pattern) ?? detectLanguageSpecificMistake(pattern, lang);
|
|
108
|
-
}
|
|
109
|
-
// ../ast-grep-core/src/result-formatter.ts
|
|
110
|
-
function formatSearchResult(result) {
|
|
111
|
-
if (result.error) {
|
|
112
|
-
return `Error: ${result.error}`;
|
|
113
|
-
}
|
|
114
|
-
if (result.matches.length === 0) {
|
|
115
|
-
return "No matches found";
|
|
116
|
-
}
|
|
117
|
-
const lines = [];
|
|
118
|
-
if (result.truncated) {
|
|
119
|
-
const reason = result.truncatedReason === "max_matches" ? `showing first ${result.matches.length} of ${result.totalMatches}` : result.truncatedReason === "max_output_bytes" ? "output exceeded 1MB limit" : "search timed out";
|
|
120
|
-
lines.push(`[TRUNCATED] Results truncated (${reason})
|
|
121
|
-
`);
|
|
122
|
-
}
|
|
123
|
-
lines.push(`Found ${result.matches.length} match(es)${result.truncated ? ` (truncated from ${result.totalMatches})` : ""}:
|
|
124
|
-
`);
|
|
125
|
-
for (const match of result.matches) {
|
|
126
|
-
const loc = `${match.file}:${match.range.start.line + 1}:${match.range.start.column + 1}`;
|
|
127
|
-
lines.push(`${loc}`);
|
|
128
|
-
lines.push(` ${match.lines.trim()}`);
|
|
129
|
-
lines.push("");
|
|
130
|
-
}
|
|
131
|
-
return lines.join(`
|
|
132
|
-
`);
|
|
133
|
-
}
|
|
134
|
-
function formatReplaceResult(result, isDryRun) {
|
|
135
|
-
if (result.error) {
|
|
136
|
-
return `Error: ${result.error}`;
|
|
137
|
-
}
|
|
138
|
-
if (result.matches.length === 0) {
|
|
139
|
-
return "No matches found to replace";
|
|
140
|
-
}
|
|
141
|
-
const prefix = isDryRun ? "[DRY RUN] " : "";
|
|
142
|
-
const lines = [];
|
|
143
|
-
if (result.truncated) {
|
|
144
|
-
const reason = result.truncatedReason === "max_matches" ? `showing first ${result.matches.length} of ${result.totalMatches}` : result.truncatedReason === "max_output_bytes" ? "output exceeded 1MB limit" : "search timed out";
|
|
145
|
-
lines.push(`[TRUNCATED] Results truncated (${reason})
|
|
146
|
-
`);
|
|
147
|
-
}
|
|
148
|
-
lines.push(`${prefix}${result.matches.length} replacement(s):
|
|
149
|
-
`);
|
|
150
|
-
for (const match of result.matches) {
|
|
151
|
-
const loc = `${match.file}:${match.range.start.line + 1}:${match.range.start.column + 1}`;
|
|
152
|
-
lines.push(`${loc}`);
|
|
153
|
-
lines.push(` ${match.text}`);
|
|
154
|
-
lines.push("");
|
|
155
|
-
}
|
|
156
|
-
if (isDryRun) {
|
|
157
|
-
lines.push("Use dryRun=false to apply changes");
|
|
158
|
-
}
|
|
159
|
-
return lines.join(`
|
|
160
|
-
`);
|
|
161
|
-
}
|
|
162
|
-
// ../ast-grep-core/src/sg-compact-json-output.ts
|
|
163
|
-
function createSgResultFromStdout(stdout) {
|
|
164
|
-
if (!stdout.trim()) {
|
|
165
|
-
return { matches: [], totalMatches: 0, truncated: false };
|
|
166
|
-
}
|
|
167
|
-
const outputTruncated = stdout.length >= DEFAULT_MAX_OUTPUT_BYTES;
|
|
168
|
-
const outputToProcess = outputTruncated ? stdout.substring(0, DEFAULT_MAX_OUTPUT_BYTES) : stdout;
|
|
169
|
-
let matches = [];
|
|
170
|
-
try {
|
|
171
|
-
matches = JSON.parse(outputToProcess);
|
|
172
|
-
} catch {
|
|
173
|
-
if (outputTruncated) {
|
|
174
|
-
try {
|
|
175
|
-
const lastValidIndex = outputToProcess.lastIndexOf("}");
|
|
176
|
-
if (lastValidIndex > 0) {
|
|
177
|
-
const bracketIndex = outputToProcess.lastIndexOf("},", lastValidIndex);
|
|
178
|
-
if (bracketIndex > 0) {
|
|
179
|
-
const truncatedJson = outputToProcess.substring(0, bracketIndex + 1) + "]";
|
|
180
|
-
matches = JSON.parse(truncatedJson);
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
} catch {
|
|
184
|
-
return {
|
|
185
|
-
matches: [],
|
|
186
|
-
totalMatches: 0,
|
|
187
|
-
truncated: true,
|
|
188
|
-
truncatedReason: "max_output_bytes",
|
|
189
|
-
error: "Output too large and could not be parsed"
|
|
190
|
-
};
|
|
191
|
-
}
|
|
192
|
-
} else {
|
|
193
|
-
return { matches: [], totalMatches: 0, truncated: false };
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
const totalMatches = matches.length;
|
|
197
|
-
const matchesTruncated = totalMatches > DEFAULT_MAX_MATCHES;
|
|
198
|
-
const finalMatches = matchesTruncated ? matches.slice(0, DEFAULT_MAX_MATCHES) : matches;
|
|
199
|
-
return {
|
|
200
|
-
matches: finalMatches,
|
|
201
|
-
totalMatches,
|
|
202
|
-
truncated: outputTruncated || matchesTruncated,
|
|
203
|
-
truncatedReason: outputTruncated ? "max_output_bytes" : matchesTruncated ? "max_matches" : undefined
|
|
204
|
-
};
|
|
205
|
-
}
|
|
206
|
-
// ../ast-grep-core/src/runner.ts
|
|
207
|
-
var SG_BINARY_NOT_FOUND_MESSAGE = `ast-grep (sg) binary not found.
|
|
208
|
-
|
|
209
|
-
` + `Install options:
|
|
210
|
-
` + ` bun add -D @ast-grep/cli
|
|
211
|
-
` + ` cargo install ast-grep --locked
|
|
212
|
-
` + ` brew install ast-grep`;
|
|
213
|
-
function buildSgArgs(options, flags) {
|
|
214
|
-
const args = ["run", "-p", options.pattern, "--lang", options.lang];
|
|
215
|
-
if (flags.includeJson) {
|
|
216
|
-
args.push("--json=compact");
|
|
217
|
-
}
|
|
218
|
-
if (options.rewrite) {
|
|
219
|
-
args.push("-r", options.rewrite);
|
|
220
|
-
if (flags.includeUpdateAll) {
|
|
221
|
-
args.push("--update-all");
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
if (typeof options.context === "number" && options.context > 0) {
|
|
225
|
-
args.push("-C", String(options.context));
|
|
226
|
-
}
|
|
227
|
-
if (options.globs) {
|
|
228
|
-
for (const glob of options.globs) {
|
|
229
|
-
args.push("--globs", glob);
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
const paths = options.paths && options.paths.length > 0 ? options.paths : ["."];
|
|
233
|
-
args.push("--", ...paths);
|
|
234
|
-
return args;
|
|
235
|
-
}
|
|
236
|
-
async function runSg(options, deps) {
|
|
237
|
-
const shouldSeparateWritePass = Boolean(options.rewrite && options.updateAll);
|
|
238
|
-
const args = buildSgArgs(options, { includeJson: true, includeUpdateAll: false });
|
|
239
|
-
let binary;
|
|
240
|
-
try {
|
|
241
|
-
binary = await deps.resolveBinary();
|
|
242
|
-
} catch (error) {
|
|
243
|
-
return {
|
|
244
|
-
matches: [],
|
|
245
|
-
totalMatches: 0,
|
|
246
|
-
truncated: false,
|
|
247
|
-
error: isNoEntryError(error) ? SG_BINARY_NOT_FOUND_MESSAGE : `Failed to resolve ast-grep binary: ${errorMessage(error)}`
|
|
248
|
-
};
|
|
249
|
-
}
|
|
250
|
-
const searchResult = await trySpawn(binary, args, options.cwd, deps);
|
|
251
|
-
if (searchResult.error) {
|
|
252
|
-
return searchResult.error;
|
|
253
|
-
}
|
|
254
|
-
const output = searchResult.value;
|
|
255
|
-
if (output.exitCode !== 0 && output.stdout.trim() === "") {
|
|
256
|
-
if (output.stderr.includes("No files found")) {
|
|
257
|
-
return { matches: [], totalMatches: 0, truncated: false };
|
|
258
|
-
}
|
|
259
|
-
if (output.stderr.trim()) {
|
|
260
|
-
return { matches: [], totalMatches: 0, truncated: false, error: output.stderr.trim() };
|
|
261
|
-
}
|
|
262
|
-
return { matches: [], totalMatches: 0, truncated: false };
|
|
263
|
-
}
|
|
264
|
-
const jsonResult = createSgResultFromStdout(output.stdout);
|
|
265
|
-
if (!(shouldSeparateWritePass && jsonResult.matches.length > 0)) {
|
|
266
|
-
return jsonResult;
|
|
267
|
-
}
|
|
268
|
-
const writeArgs = buildSgArgs(options, { includeJson: false, includeUpdateAll: true });
|
|
269
|
-
const writeResult = await trySpawn(binary, writeArgs, options.cwd, deps);
|
|
270
|
-
if (writeResult.error) {
|
|
271
|
-
return { ...jsonResult, error: `Replace failed: ${writeResult.error.error ?? "unknown error"}` };
|
|
272
|
-
}
|
|
273
|
-
if (writeResult.value.exitCode !== 0) {
|
|
274
|
-
const errorDetail = writeResult.value.stderr.trim() || `ast-grep exited with code ${writeResult.value.exitCode}`;
|
|
275
|
-
return { ...jsonResult, error: `Replace failed: ${errorDetail}` };
|
|
276
|
-
}
|
|
277
|
-
return jsonResult;
|
|
278
|
-
}
|
|
279
|
-
async function trySpawn(binary, args, cwd, deps) {
|
|
280
|
-
try {
|
|
281
|
-
const value = await deps.spawnProcess(binary, args, {
|
|
282
|
-
cwd,
|
|
283
|
-
stdout: "pipe",
|
|
284
|
-
stderr: "pipe"
|
|
285
|
-
});
|
|
286
|
-
return { value };
|
|
287
|
-
} catch (error) {
|
|
288
|
-
if (error instanceof Error && error.message.includes("timeout")) {
|
|
289
|
-
return {
|
|
290
|
-
error: {
|
|
291
|
-
matches: [],
|
|
292
|
-
totalMatches: 0,
|
|
293
|
-
truncated: true,
|
|
294
|
-
truncatedReason: "timeout",
|
|
295
|
-
error: error.message
|
|
296
|
-
}
|
|
297
|
-
};
|
|
298
|
-
}
|
|
299
|
-
if (isNoEntryError(error)) {
|
|
300
|
-
return {
|
|
301
|
-
error: {
|
|
302
|
-
matches: [],
|
|
303
|
-
totalMatches: 0,
|
|
304
|
-
truncated: false,
|
|
305
|
-
error: SG_BINARY_NOT_FOUND_MESSAGE
|
|
306
|
-
}
|
|
307
|
-
};
|
|
308
|
-
}
|
|
309
|
-
return {
|
|
310
|
-
error: {
|
|
311
|
-
matches: [],
|
|
312
|
-
totalMatches: 0,
|
|
313
|
-
truncated: false,
|
|
314
|
-
error: `Failed to spawn ast-grep: ${errorMessage(error)}`
|
|
315
|
-
}
|
|
316
|
-
};
|
|
317
|
-
}
|
|
318
|
-
}
|
|
319
|
-
function isNoEntryError(error) {
|
|
320
|
-
if (typeof error !== "object" || error === null) {
|
|
321
|
-
return false;
|
|
322
|
-
}
|
|
323
|
-
const code = Reflect.get(error, "code");
|
|
324
|
-
const message = errorMessage(error);
|
|
325
|
-
return code === "ENOENT" || message.includes("ENOENT") || message.includes("not found");
|
|
326
|
-
}
|
|
327
|
-
function errorMessage(error) {
|
|
328
|
-
if (error instanceof Error) {
|
|
329
|
-
return error.message;
|
|
330
|
-
}
|
|
331
|
-
return String(error);
|
|
332
|
-
}
|
|
333
|
-
// src/sg-cli-path.ts
|
|
334
|
-
import { createRequire } from "node:module";
|
|
335
|
-
import { homedir as defaultHomedir } from "node:os";
|
|
336
|
-
import { dirname, join as join2 } from "node:path";
|
|
337
|
-
import { existsSync, statSync as statSync2 } from "node:fs";
|
|
338
|
-
var SG_PATH_ENV_KEY = "OMO_AST_GREP_SG_PATH";
|
|
339
|
-
var WINDOWS_EXECUTABLE_EXTENSIONS = [".exe", ".cmd", ".bat"];
|
|
340
|
-
function isValidBinary(filePath) {
|
|
341
|
-
try {
|
|
342
|
-
const stats = statSync2(filePath);
|
|
343
|
-
if (!stats.isFile()) {
|
|
344
|
-
return false;
|
|
345
|
-
}
|
|
346
|
-
const size = stats.size;
|
|
347
|
-
const lowerPath = filePath.toLowerCase();
|
|
348
|
-
if (lowerPath.endsWith(".cmd") || lowerPath.endsWith(".bat")) {
|
|
349
|
-
return size > 0;
|
|
350
|
-
}
|
|
351
|
-
return size > 1e4;
|
|
352
|
-
} catch {
|
|
353
|
-
return false;
|
|
354
|
-
}
|
|
355
|
-
}
|
|
356
|
-
function executableCandidates(filePath, platform = process.platform) {
|
|
357
|
-
if (platform !== "win32")
|
|
358
|
-
return [filePath];
|
|
359
|
-
const candidates = [filePath];
|
|
360
|
-
const lowerPath = filePath.toLowerCase();
|
|
361
|
-
if (WINDOWS_EXECUTABLE_EXTENSIONS.some((extension) => lowerPath.endsWith(extension))) {
|
|
362
|
-
return candidates;
|
|
363
|
-
}
|
|
364
|
-
for (const extension of WINDOWS_EXECUTABLE_EXTENSIONS) {
|
|
365
|
-
candidates.push(`${filePath}${extension}`);
|
|
366
|
-
}
|
|
367
|
-
return candidates;
|
|
368
|
-
}
|
|
369
|
-
function findValidExecutable(filePath, platform = process.platform) {
|
|
370
|
-
for (const candidate of executableCandidates(filePath, platform)) {
|
|
371
|
-
if (existsSync(candidate) && isValidBinary(candidate)) {
|
|
372
|
-
return candidate;
|
|
373
|
-
}
|
|
374
|
-
}
|
|
375
|
-
return null;
|
|
376
|
-
}
|
|
377
|
-
function getPlatformPackageName(platform, arch) {
|
|
378
|
-
const platformMap = {
|
|
379
|
-
"darwin-arm64": "@ast-grep/cli-darwin-arm64",
|
|
380
|
-
"darwin-x64": "@ast-grep/cli-darwin-x64",
|
|
381
|
-
"linux-arm64": "@ast-grep/cli-linux-arm64-gnu",
|
|
382
|
-
"linux-x64": "@ast-grep/cli-linux-x64-gnu",
|
|
383
|
-
"win32-x64": "@ast-grep/cli-win32-x64-msvc",
|
|
384
|
-
"win32-arm64": "@ast-grep/cli-win32-arm64-msvc",
|
|
385
|
-
"win32-ia32": "@ast-grep/cli-win32-ia32-msvc"
|
|
386
|
-
};
|
|
387
|
-
return platformMap[`${platform}-${arch}`] ?? null;
|
|
388
|
-
}
|
|
389
|
-
function isModuleResolutionFailure(error) {
|
|
390
|
-
return error instanceof Error && (error.message.includes("Cannot find module") || error.message.includes("Cannot find package"));
|
|
391
|
-
}
|
|
392
|
-
function defaultResolveModulePath(specifier) {
|
|
393
|
-
const require2 = createRequire(import.meta.url);
|
|
394
|
-
return require2.resolve(specifier);
|
|
395
|
-
}
|
|
396
|
-
function nonEmptyValue(value) {
|
|
397
|
-
if (value === undefined)
|
|
398
|
-
return;
|
|
399
|
-
const trimmed = value.trim();
|
|
400
|
-
return trimmed.length === 0 ? undefined : trimmed;
|
|
401
|
-
}
|
|
402
|
-
function findEnvOverrideSgPath(env, platform) {
|
|
403
|
-
const overridePath = nonEmptyValue(env[SG_PATH_ENV_KEY]);
|
|
404
|
-
if (overridePath === undefined)
|
|
405
|
-
return null;
|
|
406
|
-
return findValidExecutable(overridePath, platform);
|
|
407
|
-
}
|
|
408
|
-
function findRuntimeDirSgPath(env, platform, arch, homedir) {
|
|
409
|
-
const codexHome = nonEmptyValue(env["CODEX_HOME"]) ?? join2(homedir(), ".codex");
|
|
410
|
-
const binaryName = platform === "win32" ? "sg.exe" : "sg";
|
|
411
|
-
const runtimePath = join2(codexHome, "runtime", "ast-grep", `${platform}-${arch}`, binaryName);
|
|
412
|
-
return findValidExecutable(runtimePath, platform);
|
|
413
|
-
}
|
|
414
|
-
function findSgCliPathSync(options = {}) {
|
|
415
|
-
const env = options.env ?? process.env;
|
|
416
|
-
const platform = options.platform ?? process.platform;
|
|
417
|
-
const arch = options.arch ?? process.arch;
|
|
418
|
-
const homedir = options.homedir ?? defaultHomedir;
|
|
419
|
-
const resolveModulePath = options.resolveModulePath ?? defaultResolveModulePath;
|
|
420
|
-
const envOverridePath = findEnvOverrideSgPath(env, platform);
|
|
421
|
-
if (envOverridePath) {
|
|
422
|
-
return envOverridePath;
|
|
423
|
-
}
|
|
424
|
-
const runtimeDirPath = findRuntimeDirSgPath(env, platform, arch, homedir);
|
|
425
|
-
if (runtimeDirPath) {
|
|
426
|
-
return runtimeDirPath;
|
|
427
|
-
}
|
|
428
|
-
const binaryName = "sg";
|
|
429
|
-
try {
|
|
430
|
-
const cliPackageJsonPath = resolveModulePath("@ast-grep/cli/package.json");
|
|
431
|
-
const cliDirectory = dirname(cliPackageJsonPath);
|
|
432
|
-
const sgPath = join2(cliDirectory, binaryName);
|
|
433
|
-
const validSgPath = findValidExecutable(sgPath, platform);
|
|
434
|
-
if (validSgPath) {
|
|
435
|
-
return validSgPath;
|
|
436
|
-
}
|
|
437
|
-
} catch (error) {
|
|
438
|
-
if (!isModuleResolutionFailure(error)) {
|
|
439
|
-
throw error;
|
|
440
|
-
}
|
|
441
|
-
}
|
|
442
|
-
const platformPackage = getPlatformPackageName(platform, arch);
|
|
443
|
-
if (platformPackage) {
|
|
444
|
-
try {
|
|
445
|
-
const packageJsonPath = resolveModulePath(`${platformPackage}/package.json`);
|
|
446
|
-
const packageDirectory = dirname(packageJsonPath);
|
|
447
|
-
const astGrepBinaryName = "ast-grep";
|
|
448
|
-
const binaryPath = join2(packageDirectory, astGrepBinaryName);
|
|
449
|
-
const validBinaryPath = findValidExecutable(binaryPath, platform);
|
|
450
|
-
if (validBinaryPath) {
|
|
451
|
-
return validBinaryPath;
|
|
452
|
-
}
|
|
453
|
-
} catch (error) {
|
|
454
|
-
if (!isModuleResolutionFailure(error)) {
|
|
455
|
-
throw error;
|
|
456
|
-
}
|
|
457
|
-
}
|
|
458
|
-
}
|
|
459
|
-
if (platform === "darwin") {
|
|
460
|
-
const homebrewPaths = ["/opt/homebrew/bin/sg", "/usr/local/bin/sg"];
|
|
461
|
-
for (const path of homebrewPaths) {
|
|
462
|
-
if (existsSync(path) && isValidBinary(path)) {
|
|
463
|
-
return path;
|
|
464
|
-
}
|
|
465
|
-
}
|
|
466
|
-
}
|
|
467
|
-
return null;
|
|
468
|
-
}
|
|
469
|
-
var resolvedCliPath = null;
|
|
470
|
-
function getSgCliPath() {
|
|
471
|
-
if (resolvedCliPath !== null) {
|
|
472
|
-
return resolvedCliPath;
|
|
473
|
-
}
|
|
474
|
-
const syncPath = findSgCliPathSync();
|
|
475
|
-
if (syncPath) {
|
|
476
|
-
resolvedCliPath = syncPath;
|
|
477
|
-
return syncPath;
|
|
478
|
-
}
|
|
479
|
-
return null;
|
|
480
|
-
}
|
|
481
|
-
function setSgCliPath(path) {
|
|
482
|
-
resolvedCliPath = path;
|
|
483
|
-
}
|
|
484
|
-
// src/mcp-stdio-transport.ts
|
|
485
|
-
var HEADER_SEPARATOR = Buffer.from(`\r
|
|
486
|
-
\r
|
|
487
|
-
`);
|
|
488
|
-
async function* readStdioJsonRpcMessages(input) {
|
|
489
|
-
let buffer = Buffer.alloc(0);
|
|
490
|
-
for await (const chunk of input) {
|
|
491
|
-
buffer = Buffer.concat([buffer, bufferFromChunk(chunk)]);
|
|
492
|
-
while (true) {
|
|
493
|
-
const result = readNextMessage(buffer);
|
|
494
|
-
if (result.kind === "incomplete")
|
|
495
|
-
break;
|
|
496
|
-
buffer = result.remaining;
|
|
497
|
-
if (result.message)
|
|
498
|
-
yield result.message;
|
|
499
|
-
}
|
|
500
|
-
}
|
|
501
|
-
const trailing = buffer.toString("utf8").trim();
|
|
502
|
-
if (trailing.length > 0) {
|
|
503
|
-
yield parseJsonPayload(trailing, "line");
|
|
504
|
-
}
|
|
505
|
-
}
|
|
506
|
-
function writeStdioJsonRpcResponse(output, response, responseMode) {
|
|
507
|
-
const body = JSON.stringify(response);
|
|
508
|
-
if (responseMode === "framed") {
|
|
509
|
-
output.write(`Content-Length: ${Buffer.byteLength(body, "utf8")}\r
|
|
510
|
-
\r
|
|
511
|
-
${body}`);
|
|
512
|
-
return;
|
|
513
|
-
}
|
|
514
|
-
output.write(`${body}
|
|
515
|
-
`);
|
|
516
|
-
}
|
|
517
|
-
function readNextMessage(buffer) {
|
|
518
|
-
if (buffer.length === 0)
|
|
519
|
-
return { kind: "incomplete" };
|
|
520
|
-
return startsWithContentLength(buffer) ? readFramedMessage(buffer) : readLineMessage(buffer);
|
|
521
|
-
}
|
|
522
|
-
function readLineMessage(buffer) {
|
|
523
|
-
const newlineIndex = buffer.indexOf(10);
|
|
524
|
-
if (newlineIndex === -1)
|
|
525
|
-
return { kind: "incomplete" };
|
|
526
|
-
const line = buffer.subarray(0, newlineIndex).toString("utf8").replace(/\r$/, "");
|
|
527
|
-
if (line.trim().length === 0) {
|
|
528
|
-
return {
|
|
529
|
-
kind: "complete",
|
|
530
|
-
remaining: buffer.subarray(newlineIndex + 1)
|
|
531
|
-
};
|
|
532
|
-
}
|
|
533
|
-
return {
|
|
534
|
-
kind: "complete",
|
|
535
|
-
message: parseJsonPayload(line, "line"),
|
|
536
|
-
remaining: buffer.subarray(newlineIndex + 1)
|
|
537
|
-
};
|
|
538
|
-
}
|
|
539
|
-
function readFramedMessage(buffer) {
|
|
540
|
-
const separatorIndex = buffer.indexOf(HEADER_SEPARATOR);
|
|
541
|
-
if (separatorIndex === -1)
|
|
542
|
-
return { kind: "incomplete" };
|
|
543
|
-
const headers = buffer.subarray(0, separatorIndex).toString("ascii");
|
|
544
|
-
const contentLength = parseContentLength(headers);
|
|
545
|
-
const bodyStart = separatorIndex + HEADER_SEPARATOR.length;
|
|
546
|
-
if (contentLength === undefined) {
|
|
547
|
-
return {
|
|
548
|
-
kind: "complete",
|
|
549
|
-
message: {
|
|
550
|
-
kind: "parse_error",
|
|
551
|
-
message: "Missing or invalid Content-Length header",
|
|
552
|
-
responseMode: "framed"
|
|
553
|
-
},
|
|
554
|
-
remaining: buffer.subarray(bodyStart)
|
|
555
|
-
};
|
|
556
|
-
}
|
|
557
|
-
const bodyEnd = bodyStart + contentLength;
|
|
558
|
-
if (buffer.length < bodyEnd)
|
|
559
|
-
return { kind: "incomplete" };
|
|
560
|
-
const body = buffer.subarray(bodyStart, bodyEnd).toString("utf8");
|
|
561
|
-
return {
|
|
562
|
-
kind: "complete",
|
|
563
|
-
message: parseJsonPayload(body, "framed"),
|
|
564
|
-
remaining: buffer.subarray(bodyEnd)
|
|
565
|
-
};
|
|
566
|
-
}
|
|
567
|
-
function startsWithContentLength(buffer) {
|
|
568
|
-
const prefix = buffer.subarray(0, "content-length:".length).toString("ascii").toLowerCase();
|
|
569
|
-
return prefix === "content-length:";
|
|
570
|
-
}
|
|
571
|
-
function parseContentLength(headers) {
|
|
572
|
-
for (const line of headers.split(`\r
|
|
573
|
-
`)) {
|
|
574
|
-
const match = /^content-length:\s*(\d+)$/i.exec(line);
|
|
575
|
-
if (match === null)
|
|
576
|
-
continue;
|
|
577
|
-
const value = match[1];
|
|
578
|
-
if (value === undefined)
|
|
579
|
-
return;
|
|
580
|
-
return Number(value);
|
|
581
|
-
}
|
|
582
|
-
return;
|
|
583
|
-
}
|
|
584
|
-
function parseJsonPayload(payload, responseMode) {
|
|
585
|
-
try {
|
|
586
|
-
return { kind: "request", payload: JSON.parse(payload), responseMode };
|
|
587
|
-
} catch (error) {
|
|
588
|
-
return { kind: "parse_error", message: messageFromError(error), responseMode };
|
|
589
|
-
}
|
|
590
|
-
}
|
|
591
|
-
function bufferFromChunk(chunk) {
|
|
592
|
-
if (Buffer.isBuffer(chunk))
|
|
593
|
-
return chunk;
|
|
594
|
-
if (typeof chunk === "string")
|
|
595
|
-
return Buffer.from(chunk);
|
|
596
|
-
throw new TypeError(`Unsupported stdio chunk type: ${typeof chunk}`);
|
|
597
|
-
}
|
|
598
|
-
function messageFromError(error) {
|
|
599
|
-
return error instanceof Error ? error.message : String(error);
|
|
600
|
-
}
|
|
601
|
-
|
|
602
|
-
// src/mcp-stdio-server.ts
|
|
603
|
-
var DEFAULT_IDLE_TIMEOUT_MS = 10 * 60000;
|
|
604
|
-
var noopLog = () => {};
|
|
605
|
-
async function runJsonRpcStdioServer(handler, input, output, options, stdioOptions = {}) {
|
|
606
|
-
const log = stdioOptions.log ?? noopLog;
|
|
607
|
-
const idleTimeoutMs = stdioOptions.idleTimeoutMs ?? DEFAULT_IDLE_TIMEOUT_MS;
|
|
608
|
-
const idleTimer = createIdleTimer(idleTimeoutMs, log, stdioOptions.onIdleTimeout);
|
|
609
|
-
log("stdio_started", { cwd: process.cwd(), idle_timeout_ms: idleTimeoutMs });
|
|
610
|
-
idleTimer.arm();
|
|
611
|
-
try {
|
|
612
|
-
for await (const message of readStdioJsonRpcMessages(input)) {
|
|
613
|
-
if (idleTimer.closed())
|
|
614
|
-
break;
|
|
615
|
-
idleTimer.arm();
|
|
616
|
-
if (message.kind === "parse_error") {
|
|
617
|
-
log("parse_error", { message: message.message });
|
|
618
|
-
writeStdioJsonRpcResponse(output, errorResponse(null, -32700, "Parse error", message.message), message.responseMode);
|
|
619
|
-
continue;
|
|
620
|
-
}
|
|
621
|
-
const parsed = message.payload;
|
|
622
|
-
const id = isRecord(parsed) ? jsonRpcId(parsed.id) : null;
|
|
623
|
-
const method = isRecord(parsed) && typeof parsed.method === "string" ? parsed.method : null;
|
|
624
|
-
log("request", { id: id === null ? null : String(id), method });
|
|
625
|
-
const response = await handler(parsed, options);
|
|
626
|
-
if (response) {
|
|
627
|
-
writeStdioJsonRpcResponse(output, response, message.responseMode);
|
|
628
|
-
log("response", { id: String(response.id), method, is_error: response.error !== undefined });
|
|
629
|
-
}
|
|
630
|
-
}
|
|
631
|
-
} finally {
|
|
632
|
-
idleTimer.clear();
|
|
633
|
-
log("stdio_stopped");
|
|
634
|
-
}
|
|
635
|
-
}
|
|
636
|
-
function createIdleTimer(idleTimeoutMs, log, onIdleTimeout) {
|
|
637
|
-
let timer = null;
|
|
638
|
-
let isClosed = false;
|
|
639
|
-
return {
|
|
640
|
-
arm: () => {
|
|
641
|
-
if (timer !== null)
|
|
642
|
-
clearTimeout(timer);
|
|
643
|
-
if (idleTimeoutMs <= 0)
|
|
644
|
-
return;
|
|
645
|
-
timer = setTimeout(() => {
|
|
646
|
-
isClosed = true;
|
|
647
|
-
log("idle_timeout", { idle_timeout_ms: idleTimeoutMs });
|
|
648
|
-
onIdleTimeout?.();
|
|
649
|
-
}, idleTimeoutMs);
|
|
650
|
-
timer.unref();
|
|
651
|
-
},
|
|
652
|
-
clear: () => {
|
|
653
|
-
if (timer === null)
|
|
654
|
-
return;
|
|
655
|
-
clearTimeout(timer);
|
|
656
|
-
timer = null;
|
|
657
|
-
},
|
|
658
|
-
closed: () => isClosed
|
|
659
|
-
};
|
|
660
|
-
}
|
|
661
|
-
function errorResponse(id, code, message, data) {
|
|
662
|
-
return { jsonrpc: "2.0", id, error: data === undefined ? { code, message } : { code, message, data } };
|
|
663
|
-
}
|
|
664
|
-
function jsonRpcId(value) {
|
|
665
|
-
return typeof value === "string" || typeof value === "number" || value === null ? value : null;
|
|
666
|
-
}
|
|
667
|
-
function isRecord(value) {
|
|
668
|
-
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
669
|
-
}
|
|
670
|
-
// src/runner.ts
|
|
671
|
-
import { existsSync as existsSync3 } from "node:fs";
|
|
672
|
-
|
|
673
|
-
// src/bun-spawn-shim.ts
|
|
674
|
-
import { spawn as nodeSpawn, spawnSync as nodeSpawnSync } from "node:child_process";
|
|
675
|
-
import { Writable } from "node:stream";
|
|
676
|
-
var runtime = globalThis;
|
|
677
|
-
var IS_BUN = typeof runtime.Bun !== "undefined";
|
|
678
|
-
function emptyReadableStream() {
|
|
679
|
-
return new ReadableStream({
|
|
680
|
-
start(controller) {
|
|
681
|
-
controller.close();
|
|
682
|
-
}
|
|
683
|
-
});
|
|
684
|
-
}
|
|
685
|
-
function toReadableStream(stream) {
|
|
686
|
-
if (!stream)
|
|
687
|
-
return emptyReadableStream();
|
|
688
|
-
return new ReadableStream({
|
|
689
|
-
async start(controller) {
|
|
690
|
-
try {
|
|
691
|
-
for await (const chunk of stream) {
|
|
692
|
-
controller.enqueue(toUint8Array(chunk));
|
|
693
|
-
}
|
|
694
|
-
controller.close();
|
|
695
|
-
} catch (error) {
|
|
696
|
-
controller.error(error);
|
|
697
|
-
}
|
|
698
|
-
}
|
|
699
|
-
});
|
|
700
|
-
}
|
|
701
|
-
function toUint8Array(chunk) {
|
|
702
|
-
if (chunk instanceof Uint8Array)
|
|
703
|
-
return new Uint8Array(chunk);
|
|
704
|
-
return new TextEncoder().encode(String(chunk));
|
|
705
|
-
}
|
|
706
|
-
function emptyWritableStream() {
|
|
707
|
-
return new Writable({
|
|
708
|
-
write(_chunk, _encoding, callback) {
|
|
709
|
-
callback();
|
|
710
|
-
}
|
|
711
|
-
});
|
|
712
|
-
}
|
|
713
|
-
function isOptionsWithCommand(value) {
|
|
714
|
-
return typeof value === "object" && value !== null && "cmd" in value && Array.isArray(value.cmd);
|
|
715
|
-
}
|
|
716
|
-
function resolveCommand(cmdOrOpts, optsArg) {
|
|
717
|
-
if (isOptionsWithCommand(cmdOrOpts))
|
|
718
|
-
return { cmd: cmdOrOpts.cmd, opts: cmdOrOpts };
|
|
719
|
-
return { cmd: cmdOrOpts, opts: optsArg ?? {} };
|
|
720
|
-
}
|
|
721
|
-
function resolveStdio(options) {
|
|
722
|
-
if (options.stdio)
|
|
723
|
-
return options.stdio;
|
|
724
|
-
return [options.stdin ?? "ignore", options.stdout ?? "pipe", options.stderr ?? "inherit"];
|
|
725
|
-
}
|
|
726
|
-
function wrapNodeProcess(proc) {
|
|
727
|
-
let exitCode = null;
|
|
728
|
-
const exited = new Promise((resolve, reject) => {
|
|
729
|
-
proc.on("exit", (code) => {
|
|
730
|
-
exitCode = code ?? 1;
|
|
731
|
-
resolve(exitCode);
|
|
732
|
-
});
|
|
733
|
-
proc.on("error", (error) => {
|
|
734
|
-
if (exitCode === null) {
|
|
735
|
-
exitCode = 1;
|
|
736
|
-
reject(error);
|
|
737
|
-
}
|
|
738
|
-
});
|
|
739
|
-
});
|
|
740
|
-
return {
|
|
741
|
-
get exitCode() {
|
|
742
|
-
return exitCode;
|
|
743
|
-
},
|
|
744
|
-
exited,
|
|
745
|
-
stdout: toReadableStream(proc.stdout),
|
|
746
|
-
stderr: toReadableStream(proc.stderr),
|
|
747
|
-
stdin: proc.stdin ?? emptyWritableStream(),
|
|
748
|
-
pid: proc.pid,
|
|
749
|
-
kill(signal) {
|
|
750
|
-
if (proc.killed || exitCode !== null)
|
|
751
|
-
return;
|
|
752
|
-
proc.kill(signal);
|
|
753
|
-
},
|
|
754
|
-
ref() {
|
|
755
|
-
proc.ref();
|
|
756
|
-
},
|
|
757
|
-
unref() {
|
|
758
|
-
proc.unref();
|
|
759
|
-
}
|
|
760
|
-
};
|
|
761
|
-
}
|
|
762
|
-
function wrapBunProcess(proc) {
|
|
763
|
-
return {
|
|
764
|
-
...proc,
|
|
765
|
-
stdout: proc.stdout ?? emptyReadableStream(),
|
|
766
|
-
stderr: proc.stderr ?? emptyReadableStream()
|
|
767
|
-
};
|
|
768
|
-
}
|
|
769
|
-
function spawn(cmdOrOpts, opts) {
|
|
770
|
-
const { cmd, opts: options } = resolveCommand(cmdOrOpts, opts);
|
|
771
|
-
if (IS_BUN)
|
|
772
|
-
return wrapBunProcess(runtime.Bun.spawn(cmd, options));
|
|
773
|
-
const [bin, ...args] = cmd;
|
|
774
|
-
if (!bin)
|
|
775
|
-
throw new Error("spawn requires a command");
|
|
776
|
-
return wrapNodeProcess(nodeSpawn(bin, args, {
|
|
777
|
-
cwd: options.cwd,
|
|
778
|
-
env: options.env,
|
|
779
|
-
stdio: resolveStdio(options),
|
|
780
|
-
detached: options.detached,
|
|
781
|
-
signal: options.signal
|
|
782
|
-
}));
|
|
783
|
-
}
|
|
784
|
-
|
|
785
|
-
// src/cli-binary-path-resolution.ts
|
|
786
|
-
import { existsSync as existsSync2 } from "fs";
|
|
787
|
-
var resolvedCliPath2 = null;
|
|
788
|
-
var initPromise = null;
|
|
789
|
-
async function getAstGrepPath() {
|
|
790
|
-
if (resolvedCliPath2 !== null && existsSync2(resolvedCliPath2)) {
|
|
791
|
-
return resolvedCliPath2;
|
|
792
|
-
}
|
|
793
|
-
if (initPromise) {
|
|
794
|
-
return initPromise;
|
|
795
|
-
}
|
|
796
|
-
initPromise = (async () => {
|
|
797
|
-
const syncPath = findSgCliPathSync();
|
|
798
|
-
if (syncPath && existsSync2(syncPath)) {
|
|
799
|
-
resolvedCliPath2 = syncPath;
|
|
800
|
-
setSgCliPath(syncPath);
|
|
801
|
-
return syncPath;
|
|
802
|
-
}
|
|
803
|
-
return null;
|
|
804
|
-
})();
|
|
805
|
-
return initPromise;
|
|
806
|
-
}
|
|
807
|
-
|
|
808
|
-
// src/process-output-timeout.ts
|
|
809
|
-
async function collectProcessOutputWithTimeout(process2, timeoutMs) {
|
|
810
|
-
const timeoutPromise = new Promise((_, reject) => {
|
|
811
|
-
const timeoutId = setTimeout(() => {
|
|
812
|
-
process2.kill();
|
|
813
|
-
reject(new Error(`Search timeout after ${timeoutMs}ms`));
|
|
814
|
-
}, timeoutMs);
|
|
815
|
-
process2.exited.then(() => clearTimeout(timeoutId));
|
|
816
|
-
});
|
|
817
|
-
const stdoutPromise = process2.stdout ? new Response(process2.stdout).text() : Promise.resolve("");
|
|
818
|
-
const stderrPromise = process2.stderr ? new Response(process2.stderr).text() : Promise.resolve("");
|
|
819
|
-
const stdout = await Promise.race([stdoutPromise, timeoutPromise]);
|
|
820
|
-
const stderr = await stderrPromise;
|
|
821
|
-
const exitCode = await process2.exited;
|
|
822
|
-
return { stdout, stderr, exitCode };
|
|
823
|
-
}
|
|
824
|
-
|
|
825
|
-
// src/runner.ts
|
|
826
|
-
async function runSg2(options) {
|
|
827
|
-
return runSg(options, {
|
|
828
|
-
resolveBinary: resolveBinaryPath,
|
|
829
|
-
spawnProcess
|
|
830
|
-
});
|
|
831
|
-
}
|
|
832
|
-
async function resolveBinaryPath() {
|
|
833
|
-
const cliPath = getSgCliPath();
|
|
834
|
-
if (cliPath && existsSync3(cliPath)) {
|
|
835
|
-
return cliPath;
|
|
836
|
-
}
|
|
837
|
-
const resolvedPath = await getAstGrepPath();
|
|
838
|
-
if (!resolvedPath) {
|
|
839
|
-
const noEntryError = new Error("ENOENT: ast-grep binary not found");
|
|
840
|
-
Reflect.set(noEntryError, "code", "ENOENT");
|
|
841
|
-
throw noEntryError;
|
|
842
|
-
}
|
|
843
|
-
return resolvedPath;
|
|
844
|
-
}
|
|
845
|
-
async function spawnProcess(binary, args, options) {
|
|
846
|
-
const proc = spawn([binary, ...args], {
|
|
847
|
-
cwd: options?.cwd,
|
|
848
|
-
stdout: options?.stdout ?? "pipe",
|
|
849
|
-
stderr: options?.stderr ?? "pipe"
|
|
850
|
-
});
|
|
851
|
-
return collectProcessOutputWithTimeout(proc, DEFAULT_TIMEOUT_MS);
|
|
852
|
-
}
|
|
853
|
-
|
|
854
|
-
// src/tool-descriptions.ts
|
|
855
|
-
var AST_GREP_SEARCH_DESCRIPTION = [
|
|
856
|
-
"Search code by AST structure (25 languages). This is NOT regex.",
|
|
857
|
-
"",
|
|
858
|
-
"Meta-variables (the only wildcards ast-grep understands):",
|
|
859
|
-
" $VAR - one AST node (an identifier, expression, statement, ...)",
|
|
860
|
-
" $$$ - zero or more nodes (argument lists, function bodies, ...)",
|
|
861
|
-
" $$$VAR - same, captured by name",
|
|
862
|
-
"Patterns must be complete, parseable source code. Each meta-variable replaces a whole node, not a substring.",
|
|
863
|
-
"",
|
|
864
|
-
"Regex syntax does NOT work - never pass these to pattern:",
|
|
865
|
-
' "foo|bar" alternation → run separate calls, or switch to grep',
|
|
866
|
-
' ".*", ".+" wildcards → use $$$ between AST fragments',
|
|
867
|
-
' "\\w", "\\d" escapes → use $VAR to capture any identifier',
|
|
868
|
-
' "[a-z]" class ranges → no AST equivalent',
|
|
869
|
-
"For text search, cross-language search, or regex features, use the grep tool instead.",
|
|
870
|
-
"",
|
|
871
|
-
"Examples by language:",
|
|
872
|
-
` typescript/tsx "function $NAME($$$) { $$$ }", "console.log($$$)", "import { $$$ } from '$MOD'"`,
|
|
873
|
-
' python "def $FUNC($$$)", "class $C($$$)" - no trailing colon',
|
|
874
|
-
' go "func $NAME($$$) { $$$ }", "if err != nil { $$$ }"',
|
|
875
|
-
' rust "fn $NAME($$$) -> $RET { $$$ }", "impl $TRAIT for $T { $$$ }"',
|
|
876
|
-
"",
|
|
877
|
-
"On empty results the tool returns a hint naming the exact mistake. If the pattern is fundamentally text-shaped, stop retrying and switch to grep."
|
|
878
|
-
].join(`
|
|
879
|
-
`);
|
|
880
|
-
var AST_GREP_SEARCH_PATTERN_PARAM = "AST pattern - valid, parseable code using $VAR (one node) and $$$ (many nodes). NOT regex: no `|`, no `.*`, no `\\w`, no `[a-z]`. For text or alternation, use grep instead.";
|
|
881
|
-
var AST_GREP_REPLACE_DESCRIPTION = [
|
|
882
|
-
"Rewrite code by AST pattern (25 languages). Dry-run by default.",
|
|
883
|
-
"Both pattern and rewrite use AST syntax ($VAR for one node, $$$ for many) - regex does NOT work.",
|
|
884
|
-
"Meta-variables captured in pattern can be reused in rewrite to preserve matched content.",
|
|
885
|
-
'Example: pattern="console.log($MSG)" rewrite="logger.info($MSG)"',
|
|
886
|
-
"For text-only replacement or regex features, use a text editor instead."
|
|
887
|
-
].join(`
|
|
888
|
-
`);
|
|
889
|
-
|
|
890
|
-
// src/workspace-paths.ts
|
|
891
|
-
import { existsSync as existsSync4, realpathSync } from "node:fs";
|
|
892
|
-
import { isAbsolute, relative, resolve } from "node:path";
|
|
893
|
-
function normalizeWorkspaceDirectory(workspaceDirectory) {
|
|
894
|
-
return realpathSync(resolve(workspaceDirectory));
|
|
895
|
-
}
|
|
896
|
-
function resolveWorkspacePaths(rawPaths, workspaceDirectory) {
|
|
897
|
-
const workspace = normalizeWorkspaceDirectory(workspaceDirectory);
|
|
898
|
-
const requestedPaths = rawPaths && rawPaths.length > 0 ? rawPaths : ["."];
|
|
899
|
-
return requestedPaths.map((rawPath) => resolveWorkspacePath(rawPath, workspace));
|
|
900
|
-
}
|
|
901
|
-
function resolveWorkspacePath(rawPath, workspaceDirectory) {
|
|
902
|
-
if (rawPath.length === 0)
|
|
903
|
-
throw new Error("paths entries must be non-empty strings");
|
|
904
|
-
if (rawPath.startsWith("-"))
|
|
905
|
-
throw new Error(`paths entries must not start with '-': ${rawPath}`);
|
|
906
|
-
if (rawPath.includes("\x00"))
|
|
907
|
-
throw new Error("paths entries must not contain null bytes");
|
|
908
|
-
if (isAbsolute(rawPath))
|
|
909
|
-
return resolveAbsoluteWorkspacePath(rawPath, workspaceDirectory);
|
|
910
|
-
const absolutePath = resolve(workspaceDirectory, rawPath);
|
|
911
|
-
assertInsideWorkspace(absolutePath, workspaceDirectory, rawPath);
|
|
912
|
-
if (existsSync4(absolutePath)) {
|
|
913
|
-
const realPath = realpathSync(absolutePath);
|
|
914
|
-
assertInsideWorkspace(realPath, workspaceDirectory, rawPath);
|
|
915
|
-
}
|
|
916
|
-
const normalizedPath = relative(workspaceDirectory, absolutePath);
|
|
917
|
-
return normalizedPath === "" ? "." : normalizedPath;
|
|
918
|
-
}
|
|
919
|
-
function resolveAbsoluteWorkspacePath(rawPath, workspaceDirectory) {
|
|
920
|
-
let realPath;
|
|
921
|
-
try {
|
|
922
|
-
realPath = realpathSync(rawPath);
|
|
923
|
-
} catch {
|
|
924
|
-
throw new Error(`absolute path entry does not exist: ${rawPath}`);
|
|
925
|
-
}
|
|
926
|
-
assertInsideWorkspace(realPath, workspaceDirectory, rawPath);
|
|
927
|
-
const normalizedPath = relative(workspaceDirectory, realPath);
|
|
928
|
-
return normalizedPath === "" ? "." : normalizedPath;
|
|
929
|
-
}
|
|
930
|
-
function assertInsideWorkspace(candidatePath, workspaceDirectory, rawPath) {
|
|
931
|
-
const workspaceRelativePath = relative(workspaceDirectory, candidatePath);
|
|
932
|
-
if (workspaceRelativePath === "" || !workspaceRelativePath.startsWith("..") && !isAbsolute(workspaceRelativePath))
|
|
933
|
-
return;
|
|
934
|
-
throw new Error(`paths entries must stay inside the workspace: ${rawPath}`);
|
|
935
|
-
}
|
|
936
|
-
|
|
937
|
-
// src/mcp.ts
|
|
938
|
-
var SERVER_NAME = "ast_grep";
|
|
939
|
-
var SERVER_VERSION = "0.1.0";
|
|
940
|
-
var LANGUAGE_VALUES = CLI_LANGUAGES;
|
|
941
|
-
var DISABLED_TOOLS_ENV = "OMO_AST_GREP_DISABLED_TOOLS";
|
|
942
|
-
var AST_GREP_MCP_TOOLS = [
|
|
943
|
-
{
|
|
944
|
-
name: "search",
|
|
945
|
-
title: "AST grep search",
|
|
946
|
-
description: AST_GREP_SEARCH_DESCRIPTION,
|
|
947
|
-
inputSchema: {
|
|
948
|
-
type: "object",
|
|
949
|
-
properties: {
|
|
950
|
-
pattern: { type: "string", description: AST_GREP_SEARCH_PATTERN_PARAM },
|
|
951
|
-
lang: { type: "string", enum: CLI_LANGUAGES, description: "Target language" },
|
|
952
|
-
paths: { type: "array", items: { type: "string" }, description: "Paths to search" },
|
|
953
|
-
globs: { type: "array", items: { type: "string" }, description: "Include/exclude globs" },
|
|
954
|
-
context: { type: "number", description: "Context lines around each match" }
|
|
955
|
-
},
|
|
956
|
-
required: ["pattern", "lang"],
|
|
957
|
-
additionalProperties: false
|
|
958
|
-
}
|
|
959
|
-
},
|
|
960
|
-
{
|
|
961
|
-
name: "replace",
|
|
962
|
-
title: "AST grep replace",
|
|
963
|
-
description: AST_GREP_REPLACE_DESCRIPTION,
|
|
964
|
-
inputSchema: {
|
|
965
|
-
type: "object",
|
|
966
|
-
properties: {
|
|
967
|
-
pattern: { type: "string", description: "AST pattern to match" },
|
|
968
|
-
rewrite: { type: "string", description: "Replacement pattern" },
|
|
969
|
-
lang: { type: "string", enum: CLI_LANGUAGES, description: "Target language" },
|
|
970
|
-
paths: { type: "array", items: { type: "string" }, description: "Paths to search" },
|
|
971
|
-
globs: { type: "array", items: { type: "string" }, description: "Include/exclude globs" },
|
|
972
|
-
dryRun: { type: "boolean", description: "Preview changes without applying. Defaults to true." }
|
|
973
|
-
},
|
|
974
|
-
required: ["pattern", "rewrite", "lang"],
|
|
975
|
-
additionalProperties: false
|
|
976
|
-
}
|
|
977
|
-
}
|
|
978
|
-
];
|
|
979
|
-
async function handleAstGrepMcpRequest(input, options = {}) {
|
|
980
|
-
if (!isRecord2(input))
|
|
981
|
-
return errorResponse2(null, -32600, "Invalid Request");
|
|
982
|
-
const id = jsonRpcId2(input.id);
|
|
983
|
-
if (input.method === "notifications/initialized")
|
|
984
|
-
return;
|
|
985
|
-
if (input.method === "ping")
|
|
986
|
-
return successResponse(id, {});
|
|
987
|
-
if (input.method === "initialize") {
|
|
988
|
-
return successResponse(id, {
|
|
989
|
-
capabilities: { tools: { listChanged: false } },
|
|
990
|
-
serverInfo: { name: SERVER_NAME, version: SERVER_VERSION },
|
|
991
|
-
protocolVersion: requestedProtocolVersion(input.params)
|
|
992
|
-
});
|
|
993
|
-
}
|
|
994
|
-
if (input.method === "tools/list")
|
|
995
|
-
return successResponse(id, { tools: enabledTools(options) });
|
|
996
|
-
if (input.method === "tools/call")
|
|
997
|
-
return handleToolCall(id, input.params, options);
|
|
998
|
-
return errorResponse2(id, -32601, `Method not found: ${String(input.method)}`);
|
|
999
|
-
}
|
|
1000
|
-
async function runMcpStdioServer(input = process.stdin, output = process.stdout, options = {}, stdioOptions = {}) {
|
|
1001
|
-
await runJsonRpcStdioServer(handleAstGrepMcpRequest, input, output, options, stdioOptions);
|
|
1002
|
-
}
|
|
1003
|
-
async function handleToolCall(id, params, options) {
|
|
1004
|
-
if (!isRecord2(params) || typeof params.name !== "string")
|
|
1005
|
-
return errorResponse2(id, -32602, "tools/call requires params.name");
|
|
1006
|
-
try {
|
|
1007
|
-
const result = await executeAstGrepTool(params.name, params.arguments, options);
|
|
1008
|
-
return successResponse(id, { content: result.content, isError: result.isError ?? false });
|
|
1009
|
-
} catch (error) {
|
|
1010
|
-
return successResponse(id, { content: [{ type: "text", text: messageFromError2(error) }], isError: true });
|
|
1011
|
-
}
|
|
1012
|
-
}
|
|
1013
|
-
async function executeAstGrepTool(name, args, options) {
|
|
1014
|
-
if (disabledToolNames(options).has(name))
|
|
1015
|
-
throw new Error(`ast-grep tool is disabled: ${name}`);
|
|
1016
|
-
const runner = options.runSg ?? runSg2;
|
|
1017
|
-
const workspaceDirectory = normalizeWorkspaceDirectory(options.workspaceDirectory ?? process.env.OMO_AST_GREP_WORKSPACE ?? process.cwd());
|
|
1018
|
-
if (name === "search") {
|
|
1019
|
-
const input = parseSearchArgs(args, workspaceDirectory);
|
|
1020
|
-
const result = await runner(input);
|
|
1021
|
-
let output = formatSearchResult(result);
|
|
1022
|
-
if (result.matches.length === 0 && !result.error) {
|
|
1023
|
-
const hint = getPatternHint(input.pattern, input.lang);
|
|
1024
|
-
if (hint)
|
|
1025
|
-
output += `
|
|
1026
|
-
|
|
1027
|
-
${hint}`;
|
|
1028
|
-
}
|
|
1029
|
-
return { content: [{ type: "text", text: output }], isError: Boolean(result.error) };
|
|
1030
|
-
}
|
|
1031
|
-
if (name === "replace") {
|
|
1032
|
-
const input = parseReplaceArgs(args, workspaceDirectory);
|
|
1033
|
-
const result = await runner(input.options);
|
|
1034
|
-
return { content: [{ type: "text", text: formatReplaceResult(result, input.dryRun) }], isError: Boolean(result.error) };
|
|
1035
|
-
}
|
|
1036
|
-
throw new Error(`Unknown ast-grep tool: ${name}`);
|
|
1037
|
-
}
|
|
1038
|
-
function parseSearchArgs(args, workspaceDirectory) {
|
|
1039
|
-
const input = requireRecord(args);
|
|
1040
|
-
return {
|
|
1041
|
-
pattern: requireString(input, "pattern"),
|
|
1042
|
-
lang: requireLanguage(input, "lang"),
|
|
1043
|
-
cwd: workspaceDirectory,
|
|
1044
|
-
paths: resolveWorkspacePaths(optionalStringArray(input, "paths"), workspaceDirectory),
|
|
1045
|
-
globs: optionalStringArray(input, "globs"),
|
|
1046
|
-
context: optionalNumber(input, "context")
|
|
1047
|
-
};
|
|
1048
|
-
}
|
|
1049
|
-
function parseReplaceArgs(args, workspaceDirectory) {
|
|
1050
|
-
const input = requireRecord(args);
|
|
1051
|
-
const dryRun = optionalBoolean(input, "dryRun") ?? true;
|
|
1052
|
-
return {
|
|
1053
|
-
dryRun,
|
|
1054
|
-
options: {
|
|
1055
|
-
pattern: requireString(input, "pattern"),
|
|
1056
|
-
rewrite: requireString(input, "rewrite"),
|
|
1057
|
-
lang: requireLanguage(input, "lang"),
|
|
1058
|
-
cwd: workspaceDirectory,
|
|
1059
|
-
paths: resolveWorkspacePaths(optionalStringArray(input, "paths"), workspaceDirectory),
|
|
1060
|
-
globs: optionalStringArray(input, "globs"),
|
|
1061
|
-
updateAll: !dryRun
|
|
1062
|
-
}
|
|
1063
|
-
};
|
|
1064
|
-
}
|
|
1065
|
-
function requireRecord(value) {
|
|
1066
|
-
if (!isRecord2(value))
|
|
1067
|
-
throw new Error("Tool arguments must be an object");
|
|
1068
|
-
return value;
|
|
1069
|
-
}
|
|
1070
|
-
function requireString(input, key) {
|
|
1071
|
-
const value = input[key];
|
|
1072
|
-
if (typeof value !== "string" || value.length === 0)
|
|
1073
|
-
throw new Error(`${key} must be a non-empty string`);
|
|
1074
|
-
return value;
|
|
1075
|
-
}
|
|
1076
|
-
function requireLanguage(input, key) {
|
|
1077
|
-
const value = requireString(input, key);
|
|
1078
|
-
if (!isCliLanguage(value))
|
|
1079
|
-
throw new Error(`${key} must be one of: ${LANGUAGE_VALUES.join(", ")}`);
|
|
1080
|
-
return value;
|
|
1081
|
-
}
|
|
1082
|
-
function isCliLanguage(value) {
|
|
1083
|
-
return LANGUAGE_VALUES.includes(value);
|
|
1084
|
-
}
|
|
1085
|
-
function optionalStringArray(input, key) {
|
|
1086
|
-
const value = input[key];
|
|
1087
|
-
if (value === undefined)
|
|
1088
|
-
return;
|
|
1089
|
-
if (!Array.isArray(value) || !value.every((item) => typeof item === "string"))
|
|
1090
|
-
throw new Error(`${key} must be an array of strings`);
|
|
1091
|
-
return value;
|
|
1092
|
-
}
|
|
1093
|
-
function enabledTools(options) {
|
|
1094
|
-
const disabled = disabledToolNames(options);
|
|
1095
|
-
return AST_GREP_MCP_TOOLS.filter((tool) => !disabled.has(tool.name));
|
|
1096
|
-
}
|
|
1097
|
-
function disabledToolNames(options) {
|
|
1098
|
-
const fromOptions = options.disabledTools ?? [];
|
|
1099
|
-
const fromEnv = process.env[DISABLED_TOOLS_ENV]?.split(",") ?? [];
|
|
1100
|
-
return new Set([...fromOptions, ...fromEnv].map((tool) => tool.trim()).filter(Boolean));
|
|
1101
|
-
}
|
|
1102
|
-
function optionalNumber(input, key) {
|
|
1103
|
-
const value = input[key];
|
|
1104
|
-
if (value === undefined)
|
|
1105
|
-
return;
|
|
1106
|
-
if (typeof value !== "number")
|
|
1107
|
-
throw new Error(`${key} must be a number`);
|
|
1108
|
-
return value;
|
|
1109
|
-
}
|
|
1110
|
-
function optionalBoolean(input, key) {
|
|
1111
|
-
const value = input[key];
|
|
1112
|
-
if (value === undefined)
|
|
1113
|
-
return;
|
|
1114
|
-
if (typeof value !== "boolean")
|
|
1115
|
-
throw new Error(`${key} must be a boolean`);
|
|
1116
|
-
return value;
|
|
1117
|
-
}
|
|
1118
|
-
function successResponse(id, result) {
|
|
1119
|
-
return { jsonrpc: "2.0", id, result };
|
|
1120
|
-
}
|
|
1121
|
-
function errorResponse2(id, code, message, data) {
|
|
1122
|
-
return { jsonrpc: "2.0", id, error: data === undefined ? { code, message } : { code, message, data } };
|
|
1123
|
-
}
|
|
1124
|
-
function requestedProtocolVersion(params) {
|
|
1125
|
-
if (!isRecord2(params) || typeof params.protocolVersion !== "string")
|
|
1126
|
-
return "2024-11-05";
|
|
1127
|
-
return params.protocolVersion;
|
|
1128
|
-
}
|
|
1129
|
-
function jsonRpcId2(value) {
|
|
1130
|
-
return typeof value === "string" || typeof value === "number" || value === null ? value : null;
|
|
1131
|
-
}
|
|
1132
|
-
function isRecord2(value) {
|
|
1133
|
-
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
1134
|
-
}
|
|
1135
|
-
function messageFromError2(error) {
|
|
1136
|
-
return error instanceof Error ? error.message : String(error);
|
|
1137
|
-
}
|
|
1138
|
-
|
|
1139
|
-
// src/cli.ts
|
|
1140
|
-
async function main() {
|
|
1141
|
-
const [command = "mcp"] = argv.slice(2);
|
|
1142
|
-
if (command === "mcp") {
|
|
1143
|
-
await runMcpStdioServer(process.stdin, process.stdout, {}, {
|
|
1144
|
-
log: writeMcpLifecycleLog,
|
|
1145
|
-
onIdleTimeout: () => {
|
|
1146
|
-
process.exit(0);
|
|
1147
|
-
}
|
|
1148
|
-
});
|
|
1149
|
-
return;
|
|
1150
|
-
}
|
|
1151
|
-
stderr.write(`Usage: omo-ast-grep [mcp]
|
|
1152
|
-
`);
|
|
1153
|
-
process.exitCode = 2;
|
|
1154
|
-
}
|
|
1155
|
-
main().catch((error) => {
|
|
1156
|
-
stderr.write(`${error instanceof Error ? error.stack ?? error.message : String(error)}
|
|
1157
|
-
`);
|
|
1158
|
-
process.exitCode = 1;
|
|
1159
|
-
});
|