oh-my-opencode 4.7.5 → 4.8.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/command/get-unpublished-changes.md +35 -6
- package/.agents/command/omomomo.md +1 -1
- package/.agents/command/publish.md +13 -0
- package/.agents/command/security-research.md +0 -1
- package/.agents/skills/get-unpublished-changes/SKILL.md +21 -5
- package/.agents/skills/omomomo/SKILL.md +1 -2
- package/.agents/skills/opencode-qa/scripts/export-roundtrip.sh +57 -19
- package/.agents/skills/opencode-qa/scripts/lib/common.sh +19 -7
- package/.agents/skills/opencode-qa/scripts/sse-hook-probe.sh +3 -0
- package/.agents/skills/opencode-qa/scripts/tui-smoke.sh +1 -1
- package/.agents/skills/pre-publish-review/SKILL.md +24 -4
- package/.agents/skills/publish/SKILL.md +13 -0
- package/.agents/skills/remove-deadcode/SKILL.md +0 -1
- package/.agents/skills/security-research/SKILL.md +0 -1
- package/.agents/skills/work-with-pr-workspace/iteration-1/eval-3/with_skill/outputs/code-changes.md +1 -1
- package/.agents/skills/work-with-pr-workspace/iteration-1/eval-3/without_skill/outputs/code-changes.md +2 -2
- package/.agents/skills/work-with-pr-workspace/iteration-1/review.html +1 -1
- package/.opencode/command/get-unpublished-changes.md +35 -6
- package/.opencode/command/omomomo.md +1 -1
- package/.opencode/command/publish.md +13 -0
- package/.opencode/command/security-research.md +0 -1
- package/.opencode/skills/pre-publish-review/SKILL.md +24 -4
- package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-3/with_skill/outputs/code-changes.md +1 -1
- package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-3/without_skill/outputs/code-changes.md +2 -2
- package/.opencode/skills/work-with-pr-workspace/iteration-1/review.html +1 -1
- package/README.ja.md +7 -7
- package/README.ko.md +9 -7
- package/README.md +14 -8
- package/README.ru.md +5 -5
- package/README.zh-cn.md +7 -7
- package/bin/oh-my-opencode.js +24 -1
- package/bin/oh-my-opencode.test.ts +79 -20
- package/dist/agents/hephaestus/agent.d.ts +1 -1
- package/dist/agents/kimi-tool-loop-guard.d.ts +1 -0
- package/dist/agents/momus.d.ts +1 -1
- package/dist/agents/sisyphus-agent-config.d.ts +4 -0
- package/dist/agents/sisyphus-agent-factory.d.ts +6 -0
- package/dist/agents/sisyphus-dynamic-prompt-builder.d.ts +2 -0
- package/dist/agents/sisyphus-dynamic-prompt-execution.d.ts +2 -0
- package/dist/agents/sisyphus-dynamic-prompt-exploration.d.ts +2 -0
- package/dist/agents/sisyphus-dynamic-prompt-role.d.ts +2 -0
- package/dist/agents/sisyphus-dynamic-prompt-sections.d.ts +18 -0
- package/dist/agents/sisyphus-dynamic-prompt-style.d.ts +2 -0
- package/dist/agents/sisyphus-dynamic-prompt.d.ts +3 -0
- package/dist/agents/sisyphus-gemini-fallback-overrides.d.ts +1 -0
- package/dist/agents/sisyphus-junior/agent.d.ts +1 -1
- package/dist/agents/sisyphus-junior/index.d.ts +0 -1
- package/dist/agents/sisyphus.d.ts +1 -6
- package/dist/agents/types.d.ts +14 -3
- package/dist/cli/cli-program.d.ts +3 -0
- package/dist/cli/doctor/checks/codex.d.ts +11 -0
- package/dist/cli/doctor/checks/dependencies.d.ts +1 -0
- package/dist/cli/doctor/checks/index.d.ts +3 -0
- package/dist/cli/doctor/checks/system.d.ts +4 -0
- package/dist/cli/doctor/constants.d.ts +1 -0
- package/dist/cli/doctor/doctor-target.d.ts +2 -0
- package/dist/cli/doctor/index.d.ts +1 -0
- package/dist/cli/doctor/types.d.ts +26 -0
- package/dist/cli/index.js +4426 -2200
- package/dist/cli/install-codex/codex-cache-bins.d.ts +21 -0
- package/dist/cli/install-codex/codex-cache-fs.d.ts +3 -0
- package/dist/cli/install-codex/codex-cache-install.d.ts +13 -0
- package/dist/cli/install-codex/codex-cache-mcp-manifest.d.ts +2 -0
- package/dist/cli/install-codex/codex-cache-prune.d.ts +10 -0
- package/dist/cli/install-codex/codex-cache.d.ts +4 -32
- package/dist/cli/install-codex/codex-cached-marketplace-manifest.d.ts +6 -0
- package/dist/cli/install-codex/codex-config-agents.d.ts +3 -0
- package/dist/cli/install-codex/codex-config-features.d.ts +1 -0
- package/dist/cli/install-codex/codex-config-marketplaces.d.ts +6 -0
- package/dist/cli/install-codex/codex-config-plugins.d.ts +8 -0
- package/dist/cli/install-codex/codex-config-toml-sections.d.ts +9 -0
- package/dist/cli/install-codex/codex-process.d.ts +5 -0
- package/dist/cli/install-codex/index.d.ts +1 -1
- package/dist/cli/install-codex/lazycodex-version-stamp.d.ts +19 -0
- package/dist/cli/install-codex/link-cached-plugin-agents.d.ts +4 -0
- package/dist/cli/install-validators.d.ts +3 -0
- package/dist/cli/model-fallback-types.d.ts +3 -0
- package/dist/cli/run/event-handlers.d.ts +4 -11
- package/dist/cli/run/event-message-handlers.d.ts +5 -0
- package/dist/cli/run/event-session-handlers.d.ts +5 -0
- package/dist/cli/run/event-session-ids.d.ts +24 -0
- package/dist/cli/run/event-think-block.d.ts +3 -0
- package/dist/cli/run/event-toast-handlers.d.ts +3 -0
- package/dist/cli/run/event-tool-handlers.d.ts +4 -0
- package/dist/cli/run/event-tool-output.d.ts +2 -0
- package/dist/cli/run/on-complete-hook.d.ts +8 -1
- package/dist/cli/run/opencode-binary-resolver.d.ts +2 -1
- package/dist/cli/runtime-commands.d.ts +2 -0
- package/dist/cli/sparkshell-appserver-websocket.d.ts +4 -0
- package/dist/cli/sparkshell-appserver.d.ts +16 -0
- package/dist/cli/sparkshell-parse.d.ts +21 -0
- package/dist/cli/sparkshell.d.ts +26 -0
- package/dist/cli/types.d.ts +9 -0
- package/dist/config/schema/claude-code.d.ts +1 -0
- package/dist/config/schema/hooks.d.ts +1 -0
- package/dist/config/schema/oh-my-opencode-config.d.ts +1 -0
- package/dist/create-hooks.d.ts +1 -0
- package/dist/features/background-agent/concurrency.d.ts +6 -1
- package/dist/features/background-agent/constants.d.ts +1 -0
- package/dist/features/background-agent/empty-assistant-turn.d.ts +7 -0
- package/dist/features/background-agent/manager.d.ts +12 -0
- package/dist/features/background-agent/message-updated-parent-wake-output.d.ts +1 -0
- package/dist/features/background-agent/parent-wake-dedupe.d.ts +2 -0
- package/dist/features/background-agent/parent-wake-dispatched-tracker.d.ts +21 -0
- package/dist/features/background-agent/parent-wake-flush-runner.d.ts +24 -0
- package/dist/features/background-agent/parent-wake-history-state.d.ts +5 -0
- package/dist/features/background-agent/parent-wake-notifier-types.d.ts +50 -0
- package/dist/features/background-agent/parent-wake-notifier.d.ts +8 -50
- package/dist/features/background-agent/parent-wake-pending-queue.d.ts +22 -0
- package/dist/features/background-agent/parent-wake-prompt-dispatch.d.ts +19 -0
- package/dist/features/background-agent/parent-wake-session-history.d.ts +73 -0
- package/dist/features/background-agent/parent-wake-session-inspector.d.ts +35 -0
- package/dist/features/background-agent/parent-wake-timer-handle.d.ts +5 -0
- package/dist/features/background-agent/parent-wake-window-recovery.d.ts +13 -0
- package/dist/features/background-agent/process-cleanup.d.ts +2 -0
- package/dist/features/background-agent/process-cleanup.test-helpers.d.ts +3 -0
- package/dist/features/background-agent/session-stream-activity.d.ts +6 -0
- package/dist/features/background-agent/spawner/fallback-agent.d.ts +5 -0
- package/dist/features/background-agent/spawner/task-prompt-body.d.ts +34 -0
- package/dist/features/background-agent/spawner/task-record.d.ts +2 -0
- package/dist/features/background-agent/spawner.d.ts +2 -5
- package/dist/features/builtin-commands/templates/refactor-sections/codemap-and-tests.d.ts +1 -0
- package/dist/features/builtin-commands/templates/refactor-sections/intro-and-analysis.d.ts +1 -0
- package/dist/features/builtin-commands/templates/refactor-sections/plan-and-execution.d.ts +1 -0
- package/dist/features/builtin-commands/templates/refactor-sections/team-mode-addendum.d.ts +1 -0
- package/dist/features/builtin-commands/templates/refactor-sections/verification-and-tooling.d.ts +1 -0
- package/dist/features/builtin-commands/templates/refactor.d.ts +2 -2
- package/dist/features/builtin-skills/skills/agent-browser-skill.d.ts +2 -0
- package/dist/features/builtin-skills/skills/agent-browser-template.d.ts +2 -0
- package/dist/features/builtin-skills/skills/git-master-sections/commit-atomic-planning.d.ts +1 -0
- package/dist/features/builtin-skills/skills/git-master-sections/commit-context-analysis.d.ts +1 -0
- package/dist/features/builtin-skills/skills/git-master-sections/commit-execution-verification.d.ts +1 -0
- package/dist/features/builtin-skills/skills/git-master-sections/commit-workflow.d.ts +1 -1
- package/dist/features/builtin-skills/skills/index.d.ts +1 -0
- package/dist/features/builtin-skills/skills/playwright-mcp-skill.d.ts +2 -0
- package/dist/features/builtin-skills/skills/playwright.d.ts +2 -3
- package/dist/features/builtin-skills/skills/visual-qa.d.ts +2 -0
- package/dist/features/claude-code-agent-loader/agent-definitions-loader.d.ts +2 -2
- package/dist/features/claude-code-agent-loader/claude-model-mapper.d.ts +1 -1
- package/dist/features/claude-code-agent-loader/loader.d.ts +2 -2
- package/dist/features/claude-code-plugin-loader/agent-loader.d.ts +1 -1
- package/dist/features/claude-code-plugin-loader/discovery-core.d.ts +2 -0
- package/dist/features/claude-code-plugin-loader/discovery-paths.d.ts +3 -0
- package/dist/features/claude-code-plugin-loader/discovery.d.ts +3 -4
- package/dist/features/claude-code-plugin-loader/install-path-resolver.d.ts +1 -0
- package/dist/features/claude-code-plugin-loader/installed-plugin-database.d.ts +3 -0
- package/dist/features/claude-code-plugin-loader/loaded-plugin.d.ts +2 -0
- package/dist/features/claude-code-plugin-loader/plugin-key.d.ts +1 -0
- package/dist/features/claude-code-plugin-loader/plugin-manifest.d.ts +4 -0
- package/dist/features/claude-code-plugin-loader/plugin-settings.d.ts +3 -0
- package/dist/features/claude-code-plugin-loader/types.d.ts +1 -0
- package/dist/features/hook-message-injector/context-resolver.d.ts +6 -0
- package/dist/features/hook-message-injector/id-generation.d.ts +2 -0
- package/dist/features/hook-message-injector/index.d.ts +1 -1
- package/dist/features/hook-message-injector/injector.d.ts +7 -69
- package/dist/features/hook-message-injector/json-message-lookup.d.ts +3 -0
- package/dist/features/hook-message-injector/message-directory.d.ts +1 -0
- package/dist/features/hook-message-injector/message-injection.d.ts +2 -0
- package/dist/features/hook-message-injector/sdk-message-context.d.ts +6 -0
- package/dist/features/hook-message-injector/sdk-message-lookup.d.ts +28 -0
- package/dist/features/hook-message-injector/types.d.ts +9 -0
- package/dist/features/mcp-oauth/callback-server.d.ts +10 -2
- package/dist/features/opencode-runtime-skills/source-server.d.ts +1 -0
- package/dist/features/skill-mcp-manager/http-client.d.ts +2 -0
- package/dist/features/team-mode/deps.d.ts +8 -1
- package/dist/features/team-mode/team-layout-tmux/layout.d.ts +2 -0
- package/dist/features/team-mode/team-mailbox/send.d.ts +3 -0
- package/dist/features/team-mode/team-registry/paths.d.ts +17 -2
- package/dist/features/team-mode/team-runtime/shutdown.d.ts +1 -1
- package/dist/features/team-mode/team-runtime/unresolved-team-members.d.ts +3 -0
- package/dist/features/team-mode/team-state-store/active-resume.d.ts +5 -0
- package/dist/features/team-mode/team-state-store/creating-resume.d.ts +4 -0
- package/dist/features/team-mode/team-state-store/deleting-resume.d.ts +4 -0
- package/dist/features/team-mode/team-state-store/error-normalization.d.ts +2 -0
- package/dist/features/team-mode/team-state-store/reservation-reconciliation.d.ts +4 -0
- package/dist/features/team-mode/team-state-store/resume-report.d.ts +7 -0
- package/dist/features/team-mode/team-state-store/resume.d.ts +2 -7
- package/dist/features/team-mode/team-state-store/runtime-cleanup.d.ts +4 -0
- package/dist/features/team-mode/team-state-store/session-liveness.d.ts +9 -0
- package/dist/features/team-mode/team-state-store/worker-resume-status.d.ts +9 -0
- package/dist/features/team-mode/tools/lifecycle-create-tool.d.ts +17 -0
- package/dist/features/team-mode/tools/lifecycle-inline-spec.d.ts +19 -0
- package/dist/features/team-mode/tools/lifecycle-participant.d.ts +25 -0
- package/dist/features/team-mode/tools/lifecycle-shutdown-tools.d.ts +18 -0
- package/dist/features/team-mode/tools/lifecycle-test-fixture.d.ts +3 -3
- package/dist/features/team-mode/tools/lifecycle.d.ts +3 -37
- package/dist/features/team-mode/tools/messaging-live-delivery-client.d.ts +25 -0
- package/dist/features/team-mode/tools/messaging-live-delivery-recipient.d.ts +19 -0
- package/dist/features/team-mode/tools/messaging-live-delivery-reservation.d.ts +10 -0
- package/dist/features/team-mode/tools/messaging-live-delivery-state.d.ts +5 -0
- package/dist/features/team-mode/tools/messaging-live-delivery.d.ts +6 -0
- package/dist/features/team-mode/tools/messaging-runtime.d.ts +17 -0
- package/dist/features/team-mode/tools/messaging.d.ts +4 -29
- package/dist/features/tmux-subagent/manager.d.ts +20 -1
- package/dist/features/tmux-subagent/session-created-handler.d.ts +4 -0
- package/dist/features/tmux-subagent/types.d.ts +1 -0
- package/dist/hooks/anthropic-context-window-limit-recovery/message-builder.d.ts +1 -1
- package/dist/hooks/atlas/idle-completion-nudge.d.ts +10 -0
- package/dist/hooks/atlas/idle-constants.d.ts +4 -0
- package/dist/hooks/atlas/idle-continuation.d.ts +23 -0
- package/dist/hooks/atlas/idle-session-eligibility.d.ts +8 -0
- package/dist/hooks/atlas/tool-execute-after-direct-work.d.ts +9 -0
- package/dist/hooks/atlas/tool-execute-after-plan-tasks.d.ts +3 -0
- package/dist/hooks/atlas/tool-execute-after-subagent-completion.d.ts +14 -0
- package/dist/hooks/auto-update-checker/hook/background-update-check.d.ts +6 -0
- package/dist/hooks/auto-update-checker/hook/ignore-toast-error.d.ts +1 -0
- package/dist/hooks/hephaestus-agents-md-injector/hook.d.ts +37 -0
- package/dist/hooks/hephaestus-agents-md-injector/index.d.ts +1 -0
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/json-error-recovery/hook.d.ts +1 -1
- package/dist/hooks/ralph-loop/command-arguments.d.ts +1 -0
- package/dist/hooks/ralph-loop/event-handler-activity.d.ts +10 -0
- package/dist/hooks/ralph-loop/event-handler-completion.d.ts +9 -0
- package/dist/hooks/ralph-loop/event-handler-continuation.d.ts +16 -0
- package/dist/hooks/ralph-loop/event-handler-feedback.d.ts +16 -0
- package/dist/hooks/ralph-loop/event-handler-idle.d.ts +15 -0
- package/dist/hooks/ralph-loop/event-handler-impl.d.ts +10 -0
- package/dist/hooks/ralph-loop/event-handler-runtime-error.d.ts +4 -0
- package/dist/hooks/ralph-loop/event-handler-types.d.ts +20 -0
- package/dist/hooks/ralph-loop/loop-state-controller.d.ts +1 -0
- package/dist/hooks/ralph-loop/ralph-loop-event-handler.d.ts +4 -24
- package/dist/hooks/ralph-loop/ralph-loop-hook.d.ts +1 -0
- package/dist/hooks/read-image-resizer/png-chunks.d.ts +6 -0
- package/dist/hooks/read-image-resizer/png-constants.d.ts +1 -0
- package/dist/hooks/read-image-resizer/png-crc.d.ts +1 -0
- package/dist/hooks/read-image-resizer/png-decoder.d.ts +1 -0
- package/dist/hooks/read-image-resizer/png-encoder.d.ts +1 -0
- package/dist/hooks/read-image-resizer/png-filters.d.ts +1 -0
- package/dist/hooks/read-image-resizer/png-ihdr.d.ts +11 -0
- package/dist/hooks/read-image-resizer/png-nearest-neighbor.d.ts +1 -0
- package/dist/hooks/rules-injector/injection-output.d.ts +2 -0
- package/dist/hooks/rules-injector/injection-processor.d.ts +22 -0
- package/dist/hooks/rules-injector/injection-types.d.ts +43 -0
- package/dist/hooks/rules-injector/injector.d.ts +3 -47
- package/dist/hooks/rules-injector/match-decision-cache.d.ts +4 -0
- package/dist/hooks/rules-injector/parsed-rule-cache.d.ts +11 -0
- package/dist/hooks/rules-injector/path-resolution.d.ts +1 -0
- package/dist/hooks/rules-injector/rule-match-reason.d.ts +12 -0
- package/dist/hooks/rules-injector/transcript-hydration.d.ts +13 -2
- package/dist/hooks/runtime-fallback/auto-retry-abort.d.ts +2 -0
- package/dist/hooks/runtime-fallback/auto-retry-agent-context.d.ts +2 -0
- package/dist/hooks/runtime-fallback/auto-retry-cleanup.d.ts +2 -0
- package/dist/hooks/runtime-fallback/auto-retry-dispatch.d.ts +2 -0
- package/dist/hooks/runtime-fallback/auto-retry-metadata.d.ts +9 -0
- package/dist/hooks/runtime-fallback/auto-retry-timeout.d.ts +5 -0
- package/dist/hooks/runtime-fallback/fallback-bootstrap-model.d.ts +1 -1
- package/dist/hooks/runtime-fallback/fallback-state.d.ts +4 -1
- package/dist/hooks/runtime-fallback/normalize-model.d.ts +12 -0
- package/dist/hooks/session-notification-linux.d.ts +3 -0
- package/dist/hooks/session-notification-log.d.ts +2 -0
- package/dist/hooks/session-notification-macos.d.ts +3 -0
- package/dist/hooks/session-notification-platform.d.ts +3 -0
- package/dist/hooks/session-notification-runner.d.ts +9 -0
- package/dist/hooks/session-notification-send.d.ts +3 -0
- package/dist/hooks/session-notification-sender.d.ts +5 -6
- package/dist/hooks/session-notification-sound.d.ts +3 -0
- package/dist/hooks/session-notification-windows.d.ts +3 -0
- package/dist/hooks/session-recovery/error-recovery.d.ts +4 -0
- package/dist/hooks/session-recovery/hook-types.d.ts +22 -0
- package/dist/hooks/session-recovery/hook.d.ts +2 -19
- package/dist/hooks/session-recovery/interrupted-tool-results.d.ts +3 -0
- package/dist/hooks/session-recovery/message-state.d.ts +4 -0
- package/dist/hooks/session-recovery/storage/thinking-strip.d.ts +7 -1
- package/dist/hooks/start-work/context-info-builder.d.ts +9 -9
- package/dist/hooks/start-work/context-info-formatters.d.ts +21 -0
- package/dist/hooks/start-work/explicit-plan-context.d.ts +9 -0
- package/dist/hooks/start-work/plan-discovery-context.d.ts +25 -0
- package/dist/hooks/start-work/plan-selection.d.ts +4 -0
- package/dist/hooks/start-work/work-initializer.d.ts +17 -0
- package/dist/hooks/tool-pair-validator/hook.d.ts +1 -37
- package/dist/hooks/tool-pair-validator/message-transform.d.ts +2 -0
- package/dist/hooks/tool-pair-validator/tool-part-ids.d.ts +6 -0
- package/dist/hooks/tool-pair-validator/tool-result-repair.d.ts +4 -0
- package/dist/hooks/tool-pair-validator/types.d.ts +36 -0
- package/dist/index.js +12708 -9988
- package/dist/oh-my-opencode.schema.json +4 -0
- package/dist/openclaw/reply-listener-poll-loop.d.ts +3 -0
- package/dist/openclaw/reply-listener-signature.d.ts +2 -0
- package/dist/openclaw/reply-listener-sleep.d.ts +1 -0
- package/dist/openclaw/reply-listener-start.d.ts +9 -0
- package/dist/openclaw/reply-listener-status.d.ts +4 -0
- package/dist/openclaw/reply-listener-stop.d.ts +7 -0
- package/dist/openclaw/reply-listener.d.ts +5 -18
- package/dist/openclaw/session-registry-lock.d.ts +2 -0
- package/dist/openclaw/session-registry-paths.d.ts +9 -0
- package/dist/openclaw/session-registry-storage.d.ts +4 -0
- package/dist/openclaw/session-registry-types.d.ts +11 -0
- package/dist/openclaw/session-registry.d.ts +2 -11
- package/dist/plugin/chat-message/loop-commands.d.ts +9 -0
- package/dist/plugin/chat-message/model-cache-warning.d.ts +12 -0
- package/dist/plugin/chat-message/prompt-text.d.ts +2 -0
- package/dist/plugin/chat-message/session-model.d.ts +4 -0
- package/dist/plugin/chat-message/start-work-message.d.ts +5 -0
- package/dist/plugin/chat-message/types.d.ts +67 -0
- package/dist/plugin/chat-message.d.ts +3 -24
- package/dist/plugin/event-error-utils.d.ts +14 -0
- package/dist/plugin/event-hook-dispatcher.d.ts +5 -0
- package/dist/plugin/event-model-fallback-state.d.ts +30 -0
- package/dist/plugin/event-model-fallback.d.ts +39 -0
- package/dist/plugin/event-session-lifecycle.d.ts +49 -0
- package/dist/plugin/event-session-recovery.d.ts +9 -0
- package/dist/plugin/event-team-handlers.d.ts +13 -0
- package/dist/plugin/event-types.d.ts +78 -0
- package/dist/plugin/event.d.ts +3 -12
- package/dist/plugin/hooks/create-core-hooks.d.ts +1 -0
- package/dist/plugin/hooks/create-session-hooks.d.ts +2 -1
- package/dist/plugin/hooks/model-fallback-title-updater.d.ts +8 -0
- package/dist/plugin/session-compacting.d.ts +4 -1
- package/dist/plugin/system-transform.d.ts +1 -1
- package/dist/plugin/tool-execute-after.d.ts +2 -0
- package/dist/plugin/tool-registry-core-tools.d.ts +15 -0
- package/dist/plugin/tool-registry-factories.d.ts +36 -0
- package/dist/plugin/tool-registry-gated-tools.d.ts +16 -0
- package/dist/plugin/tool-registry-team-tools.d.ts +14 -0
- package/dist/plugin/tool-registry-trimming.d.ts +2 -0
- package/dist/plugin/tool-registry.d.ts +3 -38
- package/dist/plugin/ultrawork-db-model-override.d.ts +1 -1
- package/dist/plugin-config/agent-order-warnings.d.ts +1 -0
- package/dist/plugin-config/config-merger.d.ts +2 -0
- package/dist/plugin-config/layered-config-loader.d.ts +2 -0
- package/dist/plugin-config/single-config-loader.d.ts +4 -0
- package/dist/plugin-config.d.ts +3 -5
- package/dist/plugin-handlers/agent-config-assembly.d.ts +19 -0
- package/dist/plugin-handlers/agent-config-finalizer.d.ts +4 -0
- package/dist/plugin-handlers/agent-config-handler.d.ts +2 -11
- package/dist/plugin-handlers/agent-config-types.d.ts +30 -0
- package/dist/plugin-handlers/agent-skill-discovery.d.ts +3 -0
- package/dist/plugin-handlers/agent-source-loader.d.ts +2 -0
- package/dist/plugin-handlers/hook-config-handler.d.ts +0 -3
- package/dist/shared/context-window-usage.d.ts +7 -0
- package/dist/shared/dynamic-truncator-types.d.ts +17 -0
- package/dist/shared/dynamic-truncator.d.ts +8 -23
- package/dist/shared/migration/migrations-sidecar.d.ts +2 -2
- package/dist/shared/migration/model-versions.d.ts +7 -4
- package/dist/shared/model-availability.d.ts +1 -1
- package/dist/shared/opencode-version.d.ts +2 -2
- package/dist/shared/sparkshell-awareness.d.ts +5 -0
- package/dist/shared/spawn-with-windows-hide.d.ts +2 -0
- package/dist/shared/token-limit-truncator.d.ts +2 -0
- package/dist/testing/module-mock-lifecycle.d.ts +8 -0
- package/dist/tools/delegate-task/openai-categories.d.ts +0 -1
- package/dist/tools/delegate-task/subagent-agent-match.d.ts +3 -0
- package/dist/tools/delegate-task/subagent-model-resolution.d.ts +4 -0
- package/dist/tools/delegate-task/subagent-request-preflight.d.ts +3 -0
- package/dist/tools/delegate-task/subagent-resolution-types.d.ts +32 -0
- package/dist/tools/delegate-task/subagent-resolver.d.ts +3 -12
- package/dist/tools/delegate-task/sync-completion-message.d.ts +20 -0
- package/dist/tools/delegate-task/sync-poll-error-recovery.d.ts +1 -0
- package/dist/tools/delegate-task/sync-session-lifecycle.d.ts +12 -0
- package/dist/tools/delegate-task/sync-session-poller.d.ts +2 -0
- package/dist/tools/delegate-task/sync-spawn-reservation.d.ts +10 -0
- package/dist/tools/delegate-task/sync-task-metadata.d.ts +11 -0
- package/dist/tools/delegate-task/sync-task-runner.d.ts +30 -0
- package/dist/tools/delegate-task/sync-task.d.ts +2 -1
- package/dist/tools/hashline-edit/formatter-trigger.d.ts +2 -2
- package/package.json +15 -14
- package/packages/git-bash-mcp/dist/cli.js +29 -12
- package/packages/lsp-tools-mcp/dist/lsp/client-wrapper.d.ts +1 -1
- package/packages/lsp-tools-mcp/dist/lsp/client-wrapper.js +1 -1
- package/packages/lsp-tools-mcp/dist/lsp/config-loader.js +95 -30
- package/packages/lsp-tools-mcp/dist/lsp/server-installation.d.ts +1 -2
- package/packages/lsp-tools-mcp/dist/lsp/server-installation.js +1 -11
- package/packages/lsp-tools-mcp/dist/lsp/transport.d.ts +1 -0
- package/packages/lsp-tools-mcp/dist/lsp/transport.js +5 -10
- package/packages/lsp-tools-mcp/dist/lsp/workspace-edit.d.ts +4 -1
- package/packages/lsp-tools-mcp/dist/lsp/workspace-edit.js +84 -23
- package/packages/lsp-tools-mcp/dist/missing-dependency-result.d.ts +2 -0
- package/packages/lsp-tools-mcp/dist/missing-dependency-result.js +14 -0
- package/packages/lsp-tools-mcp/dist/tools.js +64 -80
- package/packages/lsp-tools-mcp/package.json +4 -4
- package/packages/omo-codex/lazycodex-repository/.github/workflows/pr-source-guidance.yml +36 -0
- package/packages/omo-codex/plugin/.codex-plugin/plugin.json +1 -1
- package/packages/omo-codex/plugin/README.md +3 -1
- package/packages/omo-codex/plugin/components/comment-checker/src/apply-patch.ts +188 -0
- package/packages/omo-codex/plugin/components/comment-checker/src/core-values.ts +1 -0
- package/packages/omo-codex/plugin/components/comment-checker/src/core.ts +15 -361
- package/packages/omo-codex/plugin/components/comment-checker/src/hook-input.ts +19 -0
- package/packages/omo-codex/plugin/components/comment-checker/src/record.ts +11 -0
- package/packages/omo-codex/plugin/components/comment-checker/src/request-extractor.ts +102 -0
- package/packages/omo-codex/plugin/components/comment-checker/src/types.ts +51 -0
- package/packages/omo-codex/plugin/components/comment-checker/test/codex-hook.test.ts +145 -0
- package/packages/omo-codex/plugin/components/comment-checker/test/core.test.ts +200 -0
- package/packages/omo-codex/plugin/components/lsp/CHANGELOG.md +2 -2
- package/packages/omo-codex/plugin/components/rules/bundled-rules/hephaestus.md +11 -5
- package/packages/omo-codex/plugin/components/rules/src/hook-output.ts +11 -1
- package/packages/omo-codex/plugin/components/rules/src/post-compact-budget.ts +0 -1
- package/packages/omo-codex/plugin/components/rules/src/rules/constants.ts +1 -4
- package/packages/omo-codex/plugin/components/rules/src/rules/engine-dynamic-cache.ts +87 -0
- package/packages/omo-codex/plugin/components/rules/src/rules/engine-dynamic-loader.ts +94 -0
- package/packages/omo-codex/plugin/components/rules/src/rules/engine-loader.ts +84 -0
- package/packages/omo-codex/plugin/components/rules/src/rules/engine-paths.ts +103 -0
- package/packages/omo-codex/plugin/components/rules/src/rules/engine-static-loader.ts +43 -0
- package/packages/omo-codex/plugin/components/rules/src/rules/engine-types.ts +45 -0
- package/packages/omo-codex/plugin/components/rules/src/rules/engine.ts +8 -419
- package/packages/omo-codex/plugin/components/rules/src/rules/formatter.ts +32 -5
- package/packages/omo-codex/plugin/components/rules/src/rules/parser-frontmatter.ts +39 -0
- package/packages/omo-codex/plugin/components/rules/src/rules/parser-yaml.ts +271 -0
- package/packages/omo-codex/plugin/components/rules/src/rules/parser.ts +3 -294
- package/packages/omo-codex/plugin/components/rules/src/sparkshell-awareness.ts +57 -0
- package/packages/omo-codex/plugin/components/rules/src/static-injection.ts +13 -2
- package/packages/omo-codex/plugin/components/rules/src/transcript-rule-filter.ts +17 -0
- package/packages/omo-codex/plugin/components/rules/test/bundled-rules-priority.test.ts +2 -1
- package/packages/omo-codex/plugin/components/rules/test/bundled-rules.test.ts +26 -11
- package/packages/omo-codex/plugin/components/rules/test/codex-hook-context-pressure.test.ts +104 -138
- package/packages/omo-codex/plugin/components/rules/test/codex-hook-post-compact-budget.test.ts +5 -2
- package/packages/omo-codex/plugin/components/rules/test/codex-hook-post-compact-context.test.ts +12 -5
- package/packages/omo-codex/plugin/components/rules/test/codex-hook.test.ts +10 -4
- package/packages/omo-codex/plugin/components/rules/test/engine.test.ts +65 -3
- package/packages/omo-codex/plugin/components/rules/test/formatter.test.ts +47 -2
- package/packages/omo-codex/plugin/components/rules/test/hook-output.test.ts +16 -0
- package/packages/omo-codex/plugin/components/rules/test/parser.test.ts +153 -0
- package/packages/omo-codex/plugin/components/rules/test/post-compact-budget.test.ts +12 -0
- package/packages/omo-codex/plugin/components/rules/test/sparkshell-awareness.test.ts +236 -0
- package/packages/omo-codex/plugin/components/rules/test/tool-paths.test.ts +28 -50
- package/packages/omo-codex/plugin/components/rules/test/windows-git-bash-bundled-rule.test.ts +6 -3
- package/packages/omo-codex/plugin/components/start-work-continuation/directive.md +13 -6
- package/packages/omo-codex/plugin/components/start-work-continuation/src/codex-hook.ts +21 -0
- package/packages/omo-codex/plugin/components/start-work-continuation/test/codex-hook.test.ts +64 -2
- package/packages/omo-codex/plugin/components/telemetry/README.md +11 -1
- package/packages/omo-codex/plugin/components/telemetry/biome.json +12 -0
- package/packages/omo-codex/plugin/components/telemetry/src/codex-hook.ts +30 -3
- package/packages/omo-codex/plugin/components/telemetry/src/diagnostics.ts +154 -0
- package/packages/omo-codex/plugin/components/telemetry/src/posthog-activity-state.ts +18 -2
- package/packages/omo-codex/plugin/components/telemetry/src/posthog.ts +36 -4
- package/packages/omo-codex/plugin/components/telemetry/test/codex-hook-diagnostics.test.ts +115 -0
- package/packages/omo-codex/plugin/components/telemetry/test/codex-hook.test.ts +16 -25
- package/packages/omo-codex/plugin/components/telemetry/test/diagnostics.test.ts +119 -0
- package/packages/omo-codex/plugin/components/ultrawork/AGENTS.md +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/README.md +5 -5
- package/packages/omo-codex/plugin/components/ultrawork/agents/codex-ultrawork-reviewer.toml +2 -1
- package/packages/omo-codex/plugin/components/ultrawork/agents/explorer.toml +1 -0
- package/packages/omo-codex/plugin/components/ultrawork/agents/metis.toml +0 -1
- package/packages/omo-codex/plugin/components/ultrawork/agents/momus.toml +0 -1
- package/packages/omo-codex/plugin/components/ultrawork/agents/plan.toml +1 -2
- package/packages/omo-codex/plugin/components/ultrawork/directive.md +97 -32
- package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/SKILL.md +65 -0
- package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/agents/openai.yaml +7 -0
- package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/references/full-workflow.md +131 -0
- package/packages/omo-codex/plugin/components/ultrawork/test/codex-hook.test.ts +38 -10
- package/packages/omo-codex/plugin/components/ultrawork/test/directive-contract.test.ts +18 -0
- package/packages/omo-codex/plugin/components/ultrawork/test/package-smoke.test.ts +47 -0
- package/packages/omo-codex/plugin/components/ulw-loop/package.json +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/skills/ulw-loop/SKILL.md +12 -8
- package/packages/omo-codex/plugin/components/ulw-loop/skills/ulw-loop/references/full-workflow.md +28 -21
- package/packages/omo-codex/plugin/components/ulw-loop/src/codex-goal-instruction.ts +2 -3
- package/packages/omo-codex/plugin/components/ulw-loop/src/codex-hook.ts +7 -7
- package/packages/omo-codex/plugin/components/ulw-loop/src/command-types.ts +36 -0
- package/packages/omo-codex/plugin/components/ulw-loop/src/constants.ts +64 -0
- package/packages/omo-codex/plugin/components/ulw-loop/src/domain-types.ts +98 -0
- package/packages/omo-codex/plugin/components/ulw-loop/src/plan-crud.ts +17 -2
- package/packages/omo-codex/plugin/components/ulw-loop/src/runtime.ts +22 -0
- package/packages/omo-codex/plugin/components/ulw-loop/src/steering-types.ts +69 -0
- package/packages/omo-codex/plugin/components/ulw-loop/src/types.ts +5 -277
- package/packages/omo-codex/plugin/components/ulw-loop/test/cli-commands.test.ts +35 -13
- package/packages/omo-codex/plugin/components/ulw-loop/test/cli-complete-goals.test.ts +52 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/cli-steering.test.ts +67 -111
- package/packages/omo-codex/plugin/components/ulw-loop/test/codex-goal-instruction.test.ts +2 -2
- package/packages/omo-codex/plugin/components/ulw-loop/test/codex-hook.test.ts +31 -2
- package/packages/omo-codex/plugin/components/ulw-loop/test/package-smoke.test.ts +46 -9
- package/packages/omo-codex/plugin/components/ulw-loop/test/steering.test.ts +20 -29
- package/packages/omo-codex/plugin/model-catalog.json +5 -11
- package/packages/omo-codex/plugin/package-lock.json +1 -1
- package/packages/omo-codex/plugin/scripts/auto-update-state.mjs +78 -0
- package/packages/omo-codex/plugin/scripts/auto-update.mjs +166 -76
- package/packages/omo-codex/plugin/scripts/migrate-codex-config/catalog.mjs +71 -0
- package/packages/omo-codex/plugin/scripts/migrate-codex-config/config-paths.mjs +44 -0
- package/packages/omo-codex/plugin/scripts/migrate-codex-config/root-settings.mjs +74 -0
- package/packages/omo-codex/plugin/scripts/migrate-codex-config/state.mjs +29 -0
- package/packages/omo-codex/plugin/scripts/migrate-codex-config.mjs +14 -202
- package/packages/omo-codex/plugin/scripts/spawn-command.mjs +11 -0
- package/packages/omo-codex/plugin/scripts/sync-hook-status-messages.mjs +23 -9
- package/packages/omo-codex/plugin/scripts/sync-skills.mjs +131 -28
- package/packages/omo-codex/plugin/skills/debugging/references/methodology/04-oracle-triple.md +3 -3
- package/packages/omo-codex/plugin/skills/git-master/SKILL.md +100 -0
- package/packages/omo-codex/plugin/skills/git-master/agents/openai.yaml +13 -0
- package/packages/omo-codex/plugin/skills/init-deep/SKILL.md +9 -7
- package/packages/omo-codex/plugin/skills/lcx-contribute-bug-fix/SKILL.md +176 -0
- package/packages/omo-codex/plugin/skills/lcx-contribute-bug-fix/agents/openai.yaml +12 -0
- package/packages/omo-codex/plugin/skills/lcx-contribute-bug-fix/scripts/create-pr-body.mjs +107 -0
- package/packages/omo-codex/plugin/skills/lcx-report-bug/SKILL.md +119 -14
- package/packages/omo-codex/plugin/skills/lcx-report-bug/agents/openai.yaml +4 -2
- package/packages/omo-codex/plugin/skills/programming/references/go/concurrency.md +2 -2
- package/packages/omo-codex/plugin/skills/programming/references/python/async-anyio.md +6 -6
- package/packages/omo-codex/plugin/skills/programming/references/python/pydantic-ai.md +12 -12
- package/packages/omo-codex/plugin/skills/programming/references/typescript/backend-hono.md +7 -7
- package/packages/omo-codex/plugin/skills/refactor/SKILL.md +13 -11
- package/packages/omo-codex/plugin/skills/remove-ai-slops/SKILL.md +10 -8
- package/packages/omo-codex/plugin/skills/review-work/SKILL.md +68 -33
- package/packages/omo-codex/plugin/skills/start-work/SKILL.md +86 -22
- package/packages/omo-codex/plugin/skills/ultraresearch/SKILL.md +770 -0
- package/packages/omo-codex/plugin/skills/ulw-loop/SKILL.md +12 -8
- package/packages/omo-codex/plugin/skills/ulw-loop/references/full-workflow.md +28 -21
- package/packages/omo-codex/plugin/skills/ulw-plan/SKILL.md +45 -379
- package/packages/omo-codex/plugin/skills/ulw-plan/agents/openai.yaml +7 -0
- package/packages/omo-codex/plugin/skills/ulw-plan/references/full-workflow.md +131 -0
- package/packages/omo-codex/plugin/skills/visual-qa/SKILL.md +237 -0
- package/packages/omo-codex/plugin/skills/visual-qa/scripts/ansi.ts +17 -0
- package/packages/omo-codex/plugin/skills/visual-qa/scripts/cli.ts +82 -0
- package/packages/omo-codex/plugin/skills/visual-qa/scripts/east-asian-width.ts +72 -0
- package/packages/omo-codex/plugin/skills/visual-qa/scripts/image-diff.ts +109 -0
- package/packages/omo-codex/plugin/skills/visual-qa/scripts/png-crc.ts +27 -0
- package/packages/omo-codex/plugin/skills/visual-qa/scripts/png-decode.ts +206 -0
- package/packages/omo-codex/plugin/skills/visual-qa/scripts/png-synth.ts +57 -0
- package/packages/omo-codex/plugin/skills/visual-qa/scripts/tui-grid.ts +88 -0
- package/packages/omo-codex/plugin/skills/visual-qa/scripts/types.ts +54 -0
- package/packages/omo-codex/plugin/test/aggregate-agents.test.mjs +55 -0
- package/packages/omo-codex/plugin/test/aggregate-build.test.mjs +38 -0
- package/packages/omo-codex/plugin/test/aggregate-hooks.test.mjs +164 -0
- package/packages/omo-codex/plugin/test/aggregate-manifest.test.mjs +73 -0
- package/packages/omo-codex/plugin/test/aggregate-mcp.test.mjs +69 -0
- package/packages/omo-codex/plugin/test/aggregate-model-catalog.test.mjs +53 -0
- package/packages/omo-codex/plugin/test/aggregate-plugin-fixture.mjs +83 -0
- package/packages/omo-codex/plugin/test/aggregate-skills.test.mjs +67 -0
- package/packages/omo-codex/plugin/test/aggregate.test.mjs +2 -514
- package/packages/omo-codex/plugin/test/auto-update-state-persistence.test.mjs +36 -0
- package/packages/omo-codex/plugin/test/auto-update.test.mjs +191 -29
- package/packages/omo-codex/plugin/test/component-bin-names.test.mjs +1 -1
- package/packages/omo-codex/plugin/test/global-review-debug-gate.test.mjs +29 -0
- package/packages/omo-codex/plugin/test/hook-status-message.test.mjs +23 -10
- package/packages/omo-codex/plugin/test/lcx-bug-skills.test.mjs +81 -0
- package/packages/omo-codex/plugin/test/lcx-contribute-bug-fix-template.test.mjs +91 -0
- package/packages/omo-codex/plugin/test/migrate-codex-config.test.mjs +165 -9
- package/packages/omo-codex/plugin/test/node-install-surface.test.mjs +0 -19
- package/packages/omo-codex/plugin/test/start-work-skill.test.mjs +107 -0
- package/packages/omo-codex/plugin/test/subagent-guidance.test.mjs +82 -7
- package/packages/omo-codex/plugin/test/sync-hook-status-messages.test.mjs +58 -6
- package/packages/omo-codex/plugin/test/sync-skills-orchestration.test.mjs +152 -0
- package/packages/omo-codex/plugin/test/sync-skills.test.mjs +158 -50
- package/packages/omo-codex/plugin/test/ulw-plan-skill.test.mjs +43 -0
- package/packages/omo-codex/scripts/install/agent-source-roots.mjs +13 -0
- package/packages/omo-codex/scripts/install/agents.mjs +84 -14
- package/packages/omo-codex/scripts/install/bin-links.mjs +239 -0
- package/packages/omo-codex/scripts/install/cache.mjs +152 -108
- package/packages/omo-codex/scripts/install/cached-marketplace-manifest.mjs +21 -0
- package/packages/omo-codex/scripts/install/cli-args.mjs +39 -2
- package/packages/omo-codex/scripts/install/config.mjs +7 -5
- package/packages/omo-codex/scripts/install/lazycodex-version-stamp.mjs +102 -0
- package/packages/omo-codex/scripts/install/legacy-bins.mjs +9 -1
- package/packages/omo-codex/scripts/install/model-catalog.mjs +9 -1
- package/packages/omo-codex/scripts/install/process.mjs +3 -1
- package/packages/omo-codex/scripts/install/project-local-cleanup.mjs +0 -1
- package/packages/omo-codex/scripts/install/snapshot.mjs +0 -1
- package/packages/omo-codex/scripts/install-agent-links.test.mjs +205 -11
- package/packages/omo-codex/scripts/install-bin-links.test.mjs +123 -1
- package/packages/omo-codex/scripts/install-cache-copy.test.mjs +129 -5
- package/packages/omo-codex/scripts/install-cli-args.test.mjs +82 -1
- package/packages/omo-codex/scripts/install-config-preservation.test.mjs +43 -0
- package/packages/omo-codex/scripts/install-config-reasoning.test.mjs +14 -1
- package/packages/omo-codex/scripts/install-config.test.mjs +49 -1
- package/packages/omo-codex/scripts/install-lazycodex-version-stamp.test.mjs +84 -0
- package/packages/omo-codex/scripts/install-local-entrypoint.test.mjs +51 -0
- package/packages/omo-codex/scripts/install-local.mjs +42 -40
- package/packages/omo-codex/scripts/install-local.test.mjs +17 -241
- package/packages/omo-codex/scripts/install-marketplace-cache.test.mjs +162 -0
- package/packages/omo-codex/scripts/install-packaged-local.test.mjs +10 -6
- package/packages/omo-codex/scripts/install-project-local-cleanup.test.mjs +73 -2
- package/packages/omo-codex/scripts/sync-telemetry-component.mjs +1 -0
- package/packages/shared-skills/skills/debugging/references/methodology/04-oracle-triple.md +3 -3
- package/packages/shared-skills/skills/git-master/SKILL.md +100 -0
- package/packages/shared-skills/skills/git-master/agents/openai.yaml +13 -0
- package/packages/shared-skills/skills/lcx-contribute-bug-fix/SKILL.md +176 -0
- package/packages/shared-skills/skills/lcx-contribute-bug-fix/agents/openai.yaml +12 -0
- package/packages/shared-skills/skills/lcx-contribute-bug-fix/scripts/create-pr-body.mjs +107 -0
- package/packages/shared-skills/skills/lcx-report-bug/SKILL.md +119 -14
- package/packages/shared-skills/skills/lcx-report-bug/agents/openai.yaml +4 -2
- package/packages/shared-skills/skills/programming/references/go/concurrency.md +2 -2
- package/packages/shared-skills/skills/programming/references/python/async-anyio.md +6 -6
- package/packages/shared-skills/skills/programming/references/python/pydantic-ai.md +12 -12
- package/packages/shared-skills/skills/programming/references/typescript/backend-hono.md +7 -7
- package/packages/shared-skills/skills/refactor/SKILL.md +4 -4
- package/packages/shared-skills/skills/remove-ai-slops/SKILL.md +1 -1
- package/packages/shared-skills/skills/review-work/SKILL.md +55 -33
- package/packages/shared-skills/skills/start-work/SKILL.md +76 -19
- package/packages/shared-skills/skills/ultraresearch/SKILL.md +770 -0
- package/packages/shared-skills/skills/visual-qa/SKILL.md +219 -0
- package/packages/shared-skills/skills/visual-qa/scripts/ansi.test.ts +45 -0
- package/packages/shared-skills/skills/visual-qa/scripts/ansi.ts +17 -0
- package/packages/shared-skills/skills/visual-qa/scripts/cli.test.ts +73 -0
- package/packages/shared-skills/skills/visual-qa/scripts/cli.ts +82 -0
- package/packages/shared-skills/skills/visual-qa/scripts/east-asian-width.test.ts +60 -0
- package/packages/shared-skills/skills/visual-qa/scripts/east-asian-width.ts +72 -0
- package/packages/shared-skills/skills/visual-qa/scripts/image-diff.test.ts +70 -0
- package/packages/shared-skills/skills/visual-qa/scripts/image-diff.ts +109 -0
- package/packages/shared-skills/skills/visual-qa/scripts/png-crc.ts +27 -0
- package/packages/shared-skills/skills/visual-qa/scripts/png-decode.test.ts +44 -0
- package/packages/shared-skills/skills/visual-qa/scripts/png-decode.ts +206 -0
- package/packages/shared-skills/skills/visual-qa/scripts/png-synth.ts +57 -0
- package/packages/shared-skills/skills/visual-qa/scripts/skill-prompt-contract.test.ts +83 -0
- package/packages/shared-skills/skills/visual-qa/scripts/tui-grid.test.ts +57 -0
- package/packages/shared-skills/skills/visual-qa/scripts/tui-grid.ts +88 -0
- package/packages/shared-skills/skills/visual-qa/scripts/types.ts +54 -0
- package/postinstall.mjs +24 -1
- package/dist/agents/custom-agent-summaries.d.ts +0 -8
- package/dist/agents/hephaestus/gpt-5-3-codex.d.ts +0 -20
- package/dist/agents/prometheus/gemini.d.ts +0 -1
- package/dist/agents/prometheus/gpt.d.ts +0 -1
- package/dist/agents/sisyphus-junior/gpt-5-3-codex.d.ts +0 -8
- package/dist/features/background-agent/session-route.d.ts +0 -12
- package/dist/features/background-agent/spawner/parent-directory-resolver.d.ts +0 -6
- package/dist/features/background-agent/state.d.ts +0 -35
- package/dist/features/claude-tasks/session-storage.d.ts +0 -9
- package/dist/features/mcp-oauth/resource-indicator.d.ts +0 -2
- package/dist/features/mcp-oauth/schema.d.ts +0 -6
- package/dist/features/opencode-skill-loader/async-loader.d.ts +0 -6
- package/dist/features/opencode-skill-loader/blocking.d.ts +0 -2
- package/dist/features/opencode-skill-loader/discover-worker.d.ts +0 -1
- package/dist/hooks/session-recovery/recover-empty-content-message-sdk.d.ts +0 -13
- package/dist/shared/bun-hash-shim.d.ts +0 -1
- package/dist/tools/delegate-task/resolve-call-id.d.ts +0 -2
- package/packages/shared-skills/skills/ulw-plan/SKILL.md +0 -383
- /package/packages/lsp-tools-mcp/dist/lsp/{utils.d.ts → startup-failure.d.ts} +0 -0
- /package/packages/lsp-tools-mcp/dist/lsp/{utils.js → startup-failure.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const GIT_MASTER_COMMIT_WORKFLOW_SECTION = "## PHASE 0: Parallel Context Gathering (MANDATORY FIRST STEP)\n\n<parallel_analysis>\n**Execute ALL of the following commands IN PARALLEL to minimize latency:**\n\n```bash\n# Group 1: Current state\ngit status\ngit diff --staged --stat\ngit diff --stat\n\n# Group 2: History context \ngit log -30 --oneline\ngit log -30 --pretty=format:\"%s\"\n\n# Group 3: Branch context\ngit branch --show-current\ngit merge-base HEAD main 2>/dev/null || git merge-base HEAD master 2>/dev/null\ngit rev-parse --abbrev-ref @{upstream} 2>/dev/null || echo \"NO_UPSTREAM\"\ngit log --oneline $(git merge-base HEAD main 2>/dev/null || git merge-base HEAD master 2>/dev/null)..HEAD 2>/dev/null\n```\n\n**Capture these data points simultaneously:**\n1. What files changed (staged vs unstaged)\n2. Recent 30 commit messages for style detection\n3. Branch position relative to main/master\n4. Whether branch has upstream tracking\n5. Commits that would go in PR (local only)\n</parallel_analysis>\n\n---\n\n## PHASE 1: Style Detection (BLOCKING - MUST OUTPUT BEFORE PROCEEDING)\n\n<style_detection>\n**THIS PHASE HAS MANDATORY OUTPUT** - You MUST print the analysis result before moving to Phase 2.\n\n### 1.1 Language Profile Detection\n\n```\nCount from git log -30:\n- Dominant language/script patterns: N commits\n- Secondary language/script patterns: M commits\n- Mixed/ambiguous: K commits\n\nDECISION:\n- Preserve the dominant repository language pattern in commit messages\n- If multiple languages are common, follow the nearest recent examples for the same module\n- Never restrict output to specific languages; support any language used by the repo (e.g., Japanese, Korean, English, etc.)\n```\n\n### 1.2 Commit Style Classification\n\n| Style | Pattern | Example | Detection Regex |\n|-------|---------|---------|-----------------|\n| `SEMANTIC` | `type: message` or `type(scope): message` | `feat: add login` | `/^(feat\\|fix\\|chore\\|refactor\\|docs\\|test\\|ci\\|style\\|perf\\|build)(\\(.+\\))?:/` |\n| `PLAIN` | Just description, no prefix | `Add login feature` | No conventional prefix, >3 words |\n| `SENTENCE` | Full sentence style | `Implemented the new login flow` | Complete grammatical sentence |\n| `SHORT` | Minimal keywords | `format`, `lint` | 1-3 words only |\n\n**Detection Algorithm:**\n```\nsemantic_count = commits matching semantic regex\nplain_count = non-semantic commits with >3 words\nshort_count = commits with <=3 words\n\nIF semantic_count >= 15 (50%): STYLE = SEMANTIC\nELSE IF plain_count >= 15: STYLE = PLAIN \nELSE IF short_count >= 10: STYLE = SHORT\nELSE: STYLE = PLAIN (safe default)\n```\n\n### 1.3 MANDATORY OUTPUT (BLOCKING)\n\n**You MUST output this block before proceeding to Phase 2. NO EXCEPTIONS.**\n\n```\nSTYLE DETECTION RESULT\n======================\nAnalyzed: 30 commits from git log\n\nLanguage profile: [DOMINANT_LANGUAGE_OR_SCRIPT]\n - Dominant pattern: N (X%)\n - Secondary pattern: M (Y%)\n\nStyle: [SEMANTIC | PLAIN | SENTENCE | SHORT]\n - Semantic (feat:, fix:, etc): N (X%)\n - Plain: M (Y%)\n - Short: K (Z%)\n\nReference examples from repo:\n 1. \"actual commit message from log\"\n 2. \"actual commit message from log\"\n 3. \"actual commit message from log\"\n\nAll commits will follow: [DOMINANT_LANGUAGE_OR_SCRIPT] + [STYLE]\n```\n\n**IF YOU SKIP THIS OUTPUT, YOUR COMMITS WILL BE WRONG. STOP AND REDO.**\n</style_detection>\n\n---\n\n## PHASE 2: Branch Context Analysis\n\n<branch_analysis>\n### 2.1 Determine Branch State\n\n```\nBRANCH_STATE:\n current_branch: <name>\n has_upstream: true | false\n commits_ahead: N # Local-only commits\n merge_base: <hash>\n \nREWRITE_SAFETY:\n - If has_upstream AND commits_ahead > 0 AND already pushed:\n -> WARN before force push\n - If no upstream OR all commits local:\n -> Safe for aggressive rewrite (fixup, reset, rebase)\n - If on main/master:\n -> NEVER rewrite, only new commits\n```\n\n### 2.2 History Rewrite Strategy Decision\n\n```\nIF current_branch == main OR current_branch == master:\n -> STRATEGY = NEW_COMMITS_ONLY\n -> Never fixup, never rebase\n\nELSE IF commits_ahead == 0:\n -> STRATEGY = NEW_COMMITS_ONLY\n -> No history to rewrite\n\nELSE IF all commits are local (not pushed):\n -> STRATEGY = AGGRESSIVE_REWRITE\n -> Fixup freely, reset if needed, rebase to clean\n\nELSE IF pushed but not merged:\n -> STRATEGY = CAREFUL_REWRITE \n -> Fixup OK but warn about force push\n```\n</branch_analysis>\n\n---\n\n## PHASE 3: Atomic Unit Planning (BLOCKING - MUST OUTPUT BEFORE PROCEEDING)\n\n<atomic_planning>\n**THIS PHASE HAS MANDATORY OUTPUT** - You MUST print the commit plan before moving to Phase 4.\n\n### 3.0 Calculate Minimum Commit Count FIRST\n\n```\nFORMULA: min_commits = ceil(file_count / 3)\n\n 3 files -> min 1 commit\n 5 files -> min 2 commits\n 9 files -> min 3 commits\n15 files -> min 5 commits\n```\n\n**If your planned commit count < min_commits -> WRONG. SPLIT MORE.**\n\n### 3.1 Split by Directory/Module FIRST (Primary Split)\n\n**RULE: Different directories = Different commits (almost always)**\n\n```\nExample: 8 changed files\n - app/[locale]/page.tsx\n - app/[locale]/layout.tsx\n - components/demo/browser-frame.tsx\n - components/demo/shopify-full-site.tsx\n - components/pricing/pricing-table.tsx\n - e2e/navbar.spec.ts\n - messages/en.json\n - messages/ko.json\n\nWRONG: 1 commit \"Update landing page\" (LAZY, WRONG)\nWRONG: 2 commits (still too few)\n\nCORRECT: Split by directory/concern:\n - Commit 1: app/[locale]/page.tsx + layout.tsx (app layer)\n - Commit 2: components/demo/* (demo components)\n - Commit 3: components/pricing/* (pricing components)\n - Commit 4: e2e/* (tests)\n - Commit 5: messages/* (i18n)\n = 5 commits from 8 files (CORRECT)\n```\n\n### 3.2 Split by Concern SECOND (Secondary Split)\n\n**Within same directory, split by logical concern:**\n\n```\nExample: components/demo/ has 4 files\n - browser-frame.tsx (UI frame)\n - shopify-full-site.tsx (specific demo)\n - review-dashboard.tsx (NEW - specific demo)\n - tone-settings.tsx (NEW - specific demo)\n\nOption A (acceptable): 1 commit if ALL tightly coupled\nOption B (preferred): 2 commits\n - Commit: \"Update existing demo components\" (browser-frame, shopify)\n - Commit: \"Add new demo components\" (review-dashboard, tone-settings)\n```\n\n### 3.3 NEVER Do This (Anti-Pattern Examples)\n\n```\nWRONG: \"Refactor entire landing page\" - 1 commit with 15 files\nWRONG: \"Update components and tests\" - 1 commit mixing concerns\nWRONG: \"Big update\" - Any commit touching 5+ unrelated files\n\nRIGHT: Multiple focused commits, each 1-4 files max\nRIGHT: Each commit message describes ONE specific change\nRIGHT: A reviewer can understand each commit in 30 seconds\n```\n\n### 3.4 Implementation + Test Pairing (MANDATORY)\n\n```\nRULE: Test files MUST be in same commit as implementation\n\nTest patterns to match:\n- test_*.py <-> *.py\n- *_test.py <-> *.py\n- *.test.ts <-> *.ts\n- *.spec.ts <-> *.ts\n- __tests__/*.ts <-> *.ts\n- tests/*.py <-> src/*.py\n```\n\n### 3.5 MANDATORY JUSTIFICATION (Before Creating Commit Plan)\n\n**NON-NEGOTIABLE: Before finalizing your commit plan, you MUST:**\n\n```\nFOR EACH planned commit with 3+ files:\n 1. List all files in this commit\n 2. Write ONE sentence explaining why they MUST be together\n 3. If you can't write that sentence -> SPLIT\n \nTEMPLATE:\n\"Commit N contains [files] because [specific reason they are inseparable].\"\n\nVALID reasons:\n VALID: \"implementation file + its direct test file\"\n VALID: \"type definition + the only file that uses it\"\n VALID: \"migration + model change (would break without both)\"\n \nINVALID reasons (MUST SPLIT instead):\n INVALID: \"all related to feature X\" (too vague)\n INVALID: \"part of the same PR\" (not a reason)\n INVALID: \"they were changed together\" (not a reason)\n INVALID: \"makes sense to group\" (not a reason)\n```\n\n**OUTPUT THIS JUSTIFICATION in your analysis before executing commits.**\n\n### 3.7 Dependency Ordering\n\n```\nLevel 0: Utilities, constants, type definitions\nLevel 1: Models, schemas, interfaces\nLevel 2: Services, business logic\nLevel 3: API endpoints, controllers\nLevel 4: Configuration, infrastructure\n\nCOMMIT ORDER: Level 0 -> Level 1 -> Level 2 -> Level 3 -> Level 4\n```\n\n### 3.8 Create Commit Groups\n\nFor each logical feature/change:\n```yaml\n- group_id: 1\n feature: \"Add Shopify discount deletion\"\n files:\n - errors/shopify_error.py\n - types/delete_input.py\n - mutations/update_contract.py\n - tests/test_update_contract.py\n dependency_level: 2\n target_commit: null | <existing-hash> # null = new, hash = fixup\n```\n\n### 3.9 MANDATORY OUTPUT (BLOCKING)\n\n**You MUST output this block before proceeding to Phase 4. NO EXCEPTIONS.**\n\n```\nCOMMIT PLAN\n===========\nFiles changed: N\nMinimum commits required: ceil(N/3) = M\nPlanned commits: K\nStatus: K >= M (PASS) | K < M (FAIL - must split more)\n\nCOMMIT 1: [message in detected style]\n - path/to/file1.py\n - path/to/file1_test.py\n Justification: implementation + its test\n\nCOMMIT 2: [message in detected style]\n - path/to/file2.py\n Justification: independent utility function\n\nCOMMIT 3: [message in detected style]\n - config/settings.py\n - config/constants.py\n Justification: tightly coupled config changes\n\nExecution order: Commit 1 -> Commit 2 -> Commit 3\n(follows dependency: Level 0 -> Level 1 -> Level 2 -> ...)\n```\n\n**VALIDATION BEFORE EXECUTION:**\n- Each commit has <=4 files (or justified)\n- Each commit message matches detected STYLE + LANGUAGE\n- Test files paired with implementation\n- Different directories = different commits (or justified)\n- Total commits >= min_commits\n\n**IF ANY CHECK FAILS, DO NOT PROCEED. REPLAN.**\n</atomic_planning>\n\n---\n\n## PHASE 4: Commit Strategy Decision\n\n<strategy_decision>\n### 4.1 For Each Commit Group, Decide:\n\n```\nFIXUP if:\n - Change complements existing commit's intent\n - Same feature, fixing bugs or adding missing parts\n - Review feedback incorporation\n - Target commit exists in local history\n\nNEW COMMIT if:\n - New feature or capability\n - Independent logical unit\n - Different issue/ticket\n - No suitable target commit exists\n```\n\n### 4.2 History Rebuild Decision (Aggressive Option)\n\n```\nCONSIDER RESET & REBUILD when:\n - History is messy (many small fixups already)\n - Commits are not atomic (mixed concerns)\n - Dependency order is wrong\n \nRESET WORKFLOW:\n 1. git reset --soft $(git merge-base HEAD main)\n 2. All changes now staged\n 3. Re-commit in proper atomic units\n 4. Clean history from scratch\n \nONLY IF:\n - All commits are local (not pushed)\n - User explicitly allows OR branch is clearly WIP\n```\n\n### 4.3 Final Plan Summary\n\n```yaml\nEXECUTION_PLAN:\n strategy: FIXUP_THEN_NEW | NEW_ONLY | RESET_REBUILD\n fixup_commits:\n - files: [...]\n target: <hash>\n new_commits:\n - files: [...]\n message: \"...\"\n level: N\n requires_force_push: true | false\n```\n</strategy_decision>\n\n---\n\n## PHASE 5: Commit Execution\n\n<execution>\n### 5.1 Register TODO Items\n\nUse TodoWrite to register each commit as a trackable item:\n```\n- [ ] Fixup: <description> -> <target-hash>\n- [ ] New: <description>\n- [ ] Rebase autosquash\n- [ ] Final verification\n```\n\n### 5.2 Fixup Commits (If Any)\n\n```bash\n# Stage files for each fixup\ngit add <files>\ngit commit --fixup=<target-hash>\n\n# Repeat for all fixups...\n\n# Single autosquash rebase at the end\nMERGE_BASE=$(git merge-base HEAD main 2>/dev/null || git merge-base HEAD master)\nGIT_SEQUENCE_EDITOR=: git rebase -i --autosquash $MERGE_BASE\n```\n\n### 5.3 New Commits (After Fixups)\n\nFor each new commit group, in dependency order:\n\n```bash\n# Stage files\ngit add <file1> <file2> ...\n\n# Verify staging\ngit diff --staged --stat\n\n# Commit with detected style\ngit commit -m \"<message-matching-COMMIT_CONFIG>\"\n\n# Verify\ngit log -1 --oneline\n```\n\n### 5.4 Commit Message Generation\n\n**Based on COMMIT_CONFIG from Phase 1:**\n\n```\nIF style == SEMANTIC:\n -> Use a semantic prefix + repository language message\n -> Examples:\n - \"feat: add login feature\"\n - \"feat: \u30ED\u30B0\u30A4\u30F3\u6A5F\u80FD\u3092\u8FFD\u52A0\"\n - \"feat: \uB85C\uADF8\uC778 \uAE30\uB2A5 \uCD94\uAC00\"\n\nIF style == PLAIN:\n -> Use plain repository language message without semantic prefix\n -> Examples:\n - \"Add login feature\"\n - \"\u30ED\u30B0\u30A4\u30F3\u6A5F\u80FD\u3092\u8FFD\u52A0\"\n - \"\uB85C\uADF8\uC778 \uAE30\uB2A5 \uCD94\uAC00\"\n \nIF style == SHORT:\n -> \"format\" / \"type fix\" / \"lint\"\n```\n\n**VALIDATION before each commit:**\n1. Does message match detected style?\n2. Does message use the repository's dominant language/script profile (from Phase 1.1)?\n3. Is it similar to examples from git log?\n\nIf ANY check fails -> REWRITE message.\n```\n</execution>\n\n---\n\n## PHASE 6: Verification & Cleanup\n\n<verification>\n### 6.1 Post-Commit Verification\n\n```bash\n# Check working directory clean\ngit status\n\n# Review new history\ngit log --oneline $(git merge-base HEAD main 2>/dev/null || git merge-base HEAD master)..HEAD\n\n# Verify each commit is atomic\n# (mentally check: can each be reverted independently?)\n```\n\n### 6.2 Force Push Decision\n\n```\nIF fixup was used AND branch has upstream:\n -> Requires: git push --force-with-lease\n -> WARN user about force push implications\n \nIF only new commits:\n -> Regular: git push\n```\n\n### 6.3 Final Report\n\n```\nCOMMIT SUMMARY:\n Strategy: <what was done>\n Commits created: N\n Fixups merged: M\n \nHISTORY:\n <hash1> <message1>\n <hash2> <message2>\n ...\n\nNEXT STEPS:\n - git push [--force-with-lease]\n - Create PR if ready\n```\n</verification>";
|
|
1
|
+
export declare const GIT_MASTER_COMMIT_WORKFLOW_SECTION: string;
|
|
@@ -9,4 +9,5 @@ export { initDeepSkill } from "./init-deep";
|
|
|
9
9
|
export { debuggingSkill } from "./debugging";
|
|
10
10
|
export { securityResearchSkill } from "./security-research";
|
|
11
11
|
export { securityReviewSkill } from "./security-review";
|
|
12
|
+
export { visualQaSkill } from "./visual-qa";
|
|
12
13
|
export * from "./team-mode";
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
3
|
-
export declare const agentBrowserSkill: BuiltinSkill;
|
|
1
|
+
export { agentBrowserSkill } from "./agent-browser-skill";
|
|
2
|
+
export { playwrightSkill } from "./playwright-mcp-skill";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { AgentScope, ClaudeCodeAgentConfig, LoadedAgent } from "./types";
|
|
2
|
-
export declare function parseMarkdownAgentFile(filePath: string, scope: AgentScope): LoadedAgent | null;
|
|
3
|
-
export declare function loadAgentDefinitions(paths: string[], scope: AgentScope): Record<string, ClaudeCodeAgentConfig>;
|
|
2
|
+
export declare function parseMarkdownAgentFile(filePath: string, scope: AgentScope, anthropicProvider?: string): LoadedAgent | null;
|
|
3
|
+
export declare function loadAgentDefinitions(paths: string[], scope: AgentScope, anthropicProvider?: string): Record<string, ClaudeCodeAgentConfig>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ClaudeCodeAgentConfig } from "./types";
|
|
2
|
-
export declare function loadUserAgents(): Record<string, ClaudeCodeAgentConfig>;
|
|
3
|
-
export declare function loadProjectAgents(directory?: string): Record<string, ClaudeCodeAgentConfig>;
|
|
2
|
+
export declare function loadUserAgents(anthropicProvider?: string): Record<string, ClaudeCodeAgentConfig>;
|
|
3
|
+
export declare function loadProjectAgents(directory?: string, anthropicProvider?: string): Record<string, ClaudeCodeAgentConfig>;
|
|
4
4
|
export declare function loadOpencodeGlobalAgents(): Record<string, ClaudeCodeAgentConfig>;
|
|
5
5
|
export declare function loadOpencodeProjectAgents(directory?: string): Record<string, ClaudeCodeAgentConfig>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { ClaudeCodeAgentConfig } from "../claude-code-agent-loader/types";
|
|
2
2
|
import type { LoadedPlugin } from "./types";
|
|
3
|
-
export declare function loadPluginAgents(plugins: LoadedPlugin[]): Record<string, ClaudeCodeAgentConfig>;
|
|
3
|
+
export declare function loadPluginAgents(plugins: LoadedPlugin[], anthropicProvider?: string): Record<string, ClaudeCodeAgentConfig>;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export declare function discoverInstalledPlugins(options?: PluginLoaderOptions): PluginLoadResult;
|
|
1
|
+
export { discoverInstalledPlugins } from "./discovery-core";
|
|
2
|
+
export { resolveActualInstallPath } from "./install-path-resolver";
|
|
3
|
+
export { loadPluginManifest } from "./plugin-manifest";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function resolveActualInstallPath(configuredInstallPath: string, pluginKey?: string): string | null;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { InstalledPluginsDatabase, PluginInstallation } from "./types";
|
|
2
|
+
export declare function loadInstalledPlugins(pluginsBaseDir?: string): InstalledPluginsDatabase | null;
|
|
3
|
+
export declare function extractPluginEntries(db: InstalledPluginsDatabase): Array<[string, PluginInstallation | undefined]>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function derivePluginNameFromKey(pluginKey: string): string;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { PluginManifest } from "./types";
|
|
2
|
+
export declare function findPluginManifestPath(installPath: string): string | null;
|
|
3
|
+
export declare function loadPluginManifest(installPath: string): PluginManifest | null;
|
|
4
|
+
export declare function readManifestFromPath(manifestPath: string): PluginManifest | null;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { OpencodeClient } from "./sdk-message-lookup";
|
|
2
|
+
import type { StoredMessage } from "./types";
|
|
3
|
+
export declare function resolveMessageContext(sessionID: string, client: OpencodeClient, messageDir: string | null): Promise<{
|
|
4
|
+
prevMessage: StoredMessage | null;
|
|
5
|
+
firstMessageAgent: string | null;
|
|
6
|
+
}>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { injectHookMessage, findNearestMessageWithFields, findFirstMessageWithAgent, findNearestMessageWithFieldsFromSDK, findFirstMessageWithAgentFromSDK, resolveMessageContext, } from "./injector";
|
|
1
|
+
export { injectHookMessage, findNearestMessageWithFields, findFirstMessageWithAgent, findNearestMessageWithFieldsFromSDK, findFirstMessageWithAgentFromSDK, findMessageContextFromSDK, resolveMessageContext, } from "./injector";
|
|
2
2
|
export type { StoredMessage } from "./injector";
|
|
3
3
|
export type { MessageMeta, OriginalMessageContext, TextPart, ToolPermission } from "./types";
|
|
4
4
|
export { MESSAGE_STORAGE } from "./constants";
|
|
@@ -1,69 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
variant?: string;
|
|
9
|
-
};
|
|
10
|
-
tools?: Record<string, ToolPermission>;
|
|
11
|
-
}
|
|
12
|
-
type OpencodeClient = PluginInput["client"];
|
|
13
|
-
/**
|
|
14
|
-
* Finds the nearest message with required fields using SDK (for beta/SQLite backend).
|
|
15
|
-
* Uses client.session.messages() to fetch message data from SQLite.
|
|
16
|
-
*/
|
|
17
|
-
export declare function findNearestMessageWithFieldsFromSDK(client: OpencodeClient, sessionID: string): Promise<StoredMessage | null>;
|
|
18
|
-
/**
|
|
19
|
-
* Finds the FIRST (oldest) message with agent field using SDK (for beta/SQLite backend).
|
|
20
|
-
*/
|
|
21
|
-
export declare function findFirstMessageWithAgentFromSDK(client: OpencodeClient, sessionID: string): Promise<string | null>;
|
|
22
|
-
/**
|
|
23
|
-
* Finds the nearest message with required fields (agent, model.providerID, model.modelID).
|
|
24
|
-
* Reads from JSON files - for stable (JSON) backend.
|
|
25
|
-
*
|
|
26
|
-
* **Version-gated behavior:**
|
|
27
|
-
* - On beta (SQLite backend): Returns null immediately (no JSON storage)
|
|
28
|
-
* - On stable (JSON backend): Reads from JSON files in messageDir
|
|
29
|
-
*
|
|
30
|
-
* Prefer findNearestMessageWithFieldsFromSDK when SDK access is available.
|
|
31
|
-
*/
|
|
32
|
-
export declare function findNearestMessageWithFields(messageDir: string): StoredMessage | null;
|
|
33
|
-
/**
|
|
34
|
-
* Finds the FIRST (oldest) message in the session with agent field.
|
|
35
|
-
* Reads from JSON files - for stable (JSON) backend.
|
|
36
|
-
*
|
|
37
|
-
* **Version-gated behavior:**
|
|
38
|
-
* - On beta (SQLite backend): Returns null immediately (no JSON storage)
|
|
39
|
-
* - On stable (JSON backend): Reads from JSON files in messageDir
|
|
40
|
-
*
|
|
41
|
-
* Prefer findFirstMessageWithAgentFromSDK when SDK access is available.
|
|
42
|
-
*/
|
|
43
|
-
export declare function findFirstMessageWithAgent(messageDir: string): string | null;
|
|
44
|
-
export declare function generateMessageId(): string;
|
|
45
|
-
export declare function generatePartId(): string;
|
|
46
|
-
/**
|
|
47
|
-
* Injects a hook message into the session storage.
|
|
48
|
-
*
|
|
49
|
-
* **Version-gated behavior:**
|
|
50
|
-
* - On beta (SQLite backend): Logs warning and skips injection (writes are invisible to SQLite)
|
|
51
|
-
* - On stable (JSON backend): Writes message and part JSON files
|
|
52
|
-
*
|
|
53
|
-
* Features degraded on beta:
|
|
54
|
-
* - Hook message injection (e.g., continuation prompts, context injection) won't persist
|
|
55
|
-
* - Atlas hook's injected messages won't be visible in SQLite backend
|
|
56
|
-
* - Todo continuation enforcer's injected prompts won't persist
|
|
57
|
-
* - Ralph loop's continuation prompts won't persist
|
|
58
|
-
*
|
|
59
|
-
* @param sessionID - Target session ID
|
|
60
|
-
* @param hookContent - Content to inject
|
|
61
|
-
* @param originalMessage - Context from the original message
|
|
62
|
-
* @returns true if injection succeeded, false otherwise
|
|
63
|
-
*/
|
|
64
|
-
export declare function injectHookMessage(sessionID: string, hookContent: string, originalMessage: OriginalMessageContext): boolean;
|
|
65
|
-
export declare function resolveMessageContext(sessionID: string, client: OpencodeClient, messageDir: string | null): Promise<{
|
|
66
|
-
prevMessage: StoredMessage | null;
|
|
67
|
-
firstMessageAgent: string | null;
|
|
68
|
-
}>;
|
|
69
|
-
export {};
|
|
1
|
+
export { resolveMessageContext } from "./context-resolver";
|
|
2
|
+
export { generateMessageId, generatePartId } from "./id-generation";
|
|
3
|
+
export { injectHookMessage } from "./message-injection";
|
|
4
|
+
export { findMessageContextFromSDK } from "./sdk-message-context";
|
|
5
|
+
export { findFirstMessageWithAgent, findNearestMessageWithFields } from "./json-message-lookup";
|
|
6
|
+
export { findFirstMessageWithAgentFromSDK, findNearestMessageWithFieldsFromSDK, } from "./sdk-message-lookup";
|
|
7
|
+
export type { StoredMessage } from "./types";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getOrCreateMessageDir(sessionID: string): string | null;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type OpencodeClient } from "./sdk-message-lookup";
|
|
2
|
+
import type { StoredMessage } from "./types";
|
|
3
|
+
export declare function findMessageContextFromSDK(client: OpencodeClient, sessionID: string): Promise<{
|
|
4
|
+
prevMessage: StoredMessage | null;
|
|
5
|
+
firstMessageAgent: string | null;
|
|
6
|
+
}>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { PluginInput } from "@opencode-ai/plugin";
|
|
2
|
+
import type { StoredMessage, ToolPermission } from "./types";
|
|
3
|
+
export type OpencodeClient = PluginInput["client"];
|
|
4
|
+
export interface SDKMessage {
|
|
5
|
+
readonly id?: string;
|
|
6
|
+
readonly info?: {
|
|
7
|
+
readonly agent?: string;
|
|
8
|
+
readonly model?: {
|
|
9
|
+
readonly providerID?: string;
|
|
10
|
+
readonly modelID?: string;
|
|
11
|
+
readonly variant?: string;
|
|
12
|
+
};
|
|
13
|
+
readonly providerID?: string;
|
|
14
|
+
readonly modelID?: string;
|
|
15
|
+
readonly tools?: Record<string, ToolPermission>;
|
|
16
|
+
readonly time?: {
|
|
17
|
+
readonly created?: number;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
readonly parts?: readonly {
|
|
21
|
+
readonly type?: string;
|
|
22
|
+
}[];
|
|
23
|
+
}
|
|
24
|
+
export declare function fetchSDKMessages(client: OpencodeClient, sessionID: string): Promise<SDKMessage[] | null>;
|
|
25
|
+
export declare function findNearestMessageWithFieldsFromMessages(messages: readonly SDKMessage[]): StoredMessage | null;
|
|
26
|
+
export declare function findFirstMessageWithAgentFromMessages(messages: readonly SDKMessage[]): string | null;
|
|
27
|
+
export declare function findNearestMessageWithFieldsFromSDK(client: OpencodeClient, sessionID: string): Promise<StoredMessage | null>;
|
|
28
|
+
export declare function findFirstMessageWithAgentFromSDK(client: OpencodeClient, sessionID: string): Promise<string | null>;
|
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
export type ToolPermission = boolean | "allow" | "deny" | "ask";
|
|
2
|
+
export interface StoredMessage {
|
|
3
|
+
agent?: string;
|
|
4
|
+
model?: {
|
|
5
|
+
providerID?: string;
|
|
6
|
+
modelID?: string;
|
|
7
|
+
variant?: string;
|
|
8
|
+
};
|
|
9
|
+
tools?: Record<string, ToolPermission>;
|
|
10
|
+
}
|
|
2
11
|
export interface MessageMeta {
|
|
3
12
|
id: string;
|
|
4
13
|
sessionID: string;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { setTimeout as setNativeTimeout } from "node:timers";
|
|
1
2
|
export type OAuthCallbackResult = {
|
|
2
3
|
code: string;
|
|
3
4
|
state: string;
|
|
@@ -5,7 +6,14 @@ export type OAuthCallbackResult = {
|
|
|
5
6
|
export type CallbackServer = {
|
|
6
7
|
port: number;
|
|
7
8
|
waitForCallback: () => Promise<OAuthCallbackResult>;
|
|
8
|
-
close: () => void
|
|
9
|
+
close: () => Promise<void>;
|
|
10
|
+
};
|
|
11
|
+
export type CallbackServerTimerHandle = ReturnType<typeof setNativeTimeout>;
|
|
12
|
+
export type CallbackServerTimer = {
|
|
13
|
+
readonly setTimeout: (callback: () => void, delayMs: number) => CallbackServerTimerHandle;
|
|
14
|
+
readonly clearTimeout: (handle: CallbackServerTimerHandle) => void;
|
|
9
15
|
};
|
|
10
16
|
export declare function findAvailablePort(startPort?: number): Promise<number>;
|
|
11
|
-
export declare function startCallbackServer(startPort?: number
|
|
17
|
+
export declare function startCallbackServer(startPort?: number, options?: {
|
|
18
|
+
readonly timer?: CallbackServerTimer;
|
|
19
|
+
}): Promise<CallbackServer>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { RuntimeSkillSourceEntry } from "./runtime-skill-config";
|
|
2
2
|
export type RuntimeSkillSourceServer = {
|
|
3
3
|
readonly url: string;
|
|
4
|
+
readonly fetch: (request: Request) => Response | Promise<Response>;
|
|
4
5
|
readonly stop: () => void;
|
|
5
6
|
};
|
|
6
7
|
export declare function createRuntimeSkillSourceServer(options: {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { log } from "../../shared/logger";
|
|
1
2
|
import type { McpClient, McpTransport, SkillMcpClientConnectionParams } from "./types";
|
|
2
3
|
type HttpClientFactory = (clientInfo: {
|
|
3
4
|
name: string;
|
|
@@ -11,6 +12,7 @@ type HttpTransportFactory = (url: URL, options?: {
|
|
|
11
12
|
interface HttpClientDependencies {
|
|
12
13
|
createClient: HttpClientFactory;
|
|
13
14
|
createTransport: HttpTransportFactory;
|
|
15
|
+
log: typeof log;
|
|
14
16
|
}
|
|
15
17
|
export declare function setHttpClientDependenciesForTesting(dependencies?: Partial<HttpClientDependencies>): void;
|
|
16
18
|
export declare function createHttpClient(params: SkillMcpClientConnectionParams): Promise<McpClient>;
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
import type { TeamModeConfig } from "../../config/schema/team-mode";
|
|
2
|
+
import { spawn } from "../../shared/bun-spawn-shim";
|
|
2
3
|
export interface TeamModeDependencyReport {
|
|
3
4
|
tmuxAvailable: boolean;
|
|
4
5
|
gitAvailable: boolean;
|
|
5
6
|
}
|
|
6
|
-
|
|
7
|
+
type Spawn = typeof spawn;
|
|
8
|
+
type TeamModeDependencyDeps = {
|
|
9
|
+
readonly spawn?: Spawn;
|
|
10
|
+
readonly tmuxEnv?: string;
|
|
11
|
+
};
|
|
12
|
+
export declare function checkTeamModeDependencies(config: TeamModeConfig, deps?: TeamModeDependencyDeps): Promise<TeamModeDependencyReport>;
|
|
13
|
+
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { log } from "../../../shared";
|
|
1
2
|
import * as sharedTmuxModule from "../../../shared/tmux";
|
|
2
3
|
import * as tmuxPathResolverModule from "../../../tools/interactive-bash/tmux-path-resolver";
|
|
3
4
|
import type { TmuxSessionManager } from "../../tmux-subagent/manager";
|
|
@@ -13,6 +14,7 @@ export type TeamLayoutDeps = {
|
|
|
13
14
|
isServerRunning: typeof sharedTmuxModule.isServerRunning;
|
|
14
15
|
getTmuxPath: typeof tmuxPathResolverModule.getTmuxPath;
|
|
15
16
|
resolveCallerTmuxSession: typeof resolveCallerTmuxSession;
|
|
17
|
+
log: typeof log;
|
|
16
18
|
};
|
|
17
19
|
export type TeamLayoutResult = {
|
|
18
20
|
focusWindowId: string;
|
|
@@ -17,6 +17,9 @@ export declare class RecipientBackpressureError extends Error {
|
|
|
17
17
|
export declare class DuplicateMessageIdError extends Error {
|
|
18
18
|
constructor(message?: string);
|
|
19
19
|
}
|
|
20
|
+
export declare class InvalidRecipientError extends Error {
|
|
21
|
+
constructor(recipient: string);
|
|
22
|
+
}
|
|
20
23
|
export declare class TeamDeletingError extends Error {
|
|
21
24
|
constructor(message?: string);
|
|
22
25
|
}
|
|
@@ -1,13 +1,28 @@
|
|
|
1
|
+
import { mkdir, stat, chmod } from "node:fs/promises";
|
|
1
2
|
import type { TeamModeConfig } from "../../../config/schema/team-mode";
|
|
3
|
+
import { log } from "../../../shared/logger";
|
|
4
|
+
type PathDeps = {
|
|
5
|
+
readonly chmod: typeof chmod;
|
|
6
|
+
readonly log: typeof log;
|
|
7
|
+
readonly mkdir: typeof mkdir;
|
|
8
|
+
readonly stat: typeof stat;
|
|
9
|
+
};
|
|
10
|
+
export declare class TeamPathTraversalError extends Error {
|
|
11
|
+
constructor();
|
|
12
|
+
}
|
|
2
13
|
export declare function resolveBaseDir(config: TeamModeConfig): string;
|
|
3
14
|
export declare function getTeamSpecPath(baseDir: string, teamName: string, scope: "user" | "project", projectRoot?: string): string;
|
|
4
15
|
export declare function getRuntimeStateDir(baseDir: string, teamRunId: string): string;
|
|
5
16
|
export declare function getInboxDir(baseDir: string, teamRunId: string, memberName: string): string;
|
|
6
17
|
export declare function getTasksDir(baseDir: string, teamRunId: string): string;
|
|
18
|
+
export declare function getTaskFilePath(baseDir: string, teamRunId: string, taskId: string): string;
|
|
19
|
+
export declare function getTaskClaimsDir(baseDir: string, teamRunId: string): string;
|
|
20
|
+
export declare function getTaskClaimLockPath(baseDir: string, teamRunId: string, taskId: string): string;
|
|
7
21
|
export declare function getWorktreeDir(baseDir: string, teamRunId: string, memberName: string): string;
|
|
8
|
-
export declare function discoverTeamSpecs(config: TeamModeConfig, projectRoot: string): Promise<Array<{
|
|
22
|
+
export declare function discoverTeamSpecs(config: TeamModeConfig, projectRoot: string, deps?: Pick<PathDeps, "log">): Promise<Array<{
|
|
9
23
|
name: string;
|
|
10
24
|
scope: "project" | "user";
|
|
11
25
|
path: string;
|
|
12
26
|
}>>;
|
|
13
|
-
export declare function ensureBaseDirs(baseDir: string): Promise<void>;
|
|
27
|
+
export declare function ensureBaseDirs(baseDir: string, deps?: PathDeps): Promise<void>;
|
|
28
|
+
export {};
|
|
@@ -2,4 +2,4 @@ import type { TeamModeConfig } from "../../../config/schema/team-mode";
|
|
|
2
2
|
export { deleteTeam } from "./delete-team";
|
|
3
3
|
export declare function requestShutdownOfMember(teamRunId: string, targetMemberName: string, requesterName: string, config: TeamModeConfig): Promise<void>;
|
|
4
4
|
export declare function approveShutdown(teamRunId: string, memberName: string, approverName: string, config: TeamModeConfig): Promise<void>;
|
|
5
|
-
export declare function rejectShutdown(teamRunId: string, memberName: string, reason: string, config: TeamModeConfig): Promise<void>;
|
|
5
|
+
export declare function rejectShutdown(teamRunId: string, memberName: string, rejectorName: string, reason: string, config: TeamModeConfig): Promise<void>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { TeamModeConfig } from "../../../config/schema/team-mode";
|
|
2
|
+
import type { ExecutorContext } from "../../../tools/delegate-task/executor-types";
|
|
3
|
+
import type { RuntimeState } from "../types";
|
|
4
|
+
export type ActiveResumeOutcome = "resumed" | "marked_orphaned";
|
|
5
|
+
export declare function resumeActiveTeam(ctx: ExecutorContext, runtimeState: RuntimeState, config: TeamModeConfig, staleReservationTtlMs: number): Promise<ActiveResumeOutcome>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { TeamModeConfig } from "../../../config/schema/team-mode";
|
|
2
|
+
import type { RuntimeState } from "../types";
|
|
3
|
+
export declare function isCreatingStateStuck(runtimeState: RuntimeState, now: number, creatingTimeoutMs: number): boolean;
|
|
4
|
+
export declare function markStuckCreatingTeamFailed(runtimeState: RuntimeState, config: TeamModeConfig): Promise<void>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { TeamModeConfig } from "../../../config/schema/team-mode";
|
|
2
|
+
import type { RuntimeState } from "../types";
|
|
3
|
+
export declare function finishDeletingTeam(runtimeState: RuntimeState, config: TeamModeConfig): Promise<boolean>;
|
|
4
|
+
export declare function cleanTerminalTeam(runtimeState: RuntimeState, config: TeamModeConfig): Promise<boolean>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { TeamModeConfig } from "../../../config/schema/team-mode";
|
|
2
|
+
import type { ExecutorContext } from "../../../tools/delegate-task/executor-types";
|
|
3
|
+
import type { RuntimeStateMember } from "../types";
|
|
4
|
+
export declare function reconcileStaleReservationsForMember(ctx: ExecutorContext, teamRunId: string, member: RuntimeStateMember, config: TeamModeConfig, staleReservationTtlMs: number): Promise<void>;
|
|
@@ -1,10 +1,5 @@
|
|
|
1
1
|
import type { TeamModeConfig } from "../../../config/schema/team-mode";
|
|
2
2
|
import type { ExecutorContext } from "../../../tools/delegate-task/executor-types";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
marked_failed: number;
|
|
6
|
-
marked_orphaned: number;
|
|
7
|
-
cleaned: number;
|
|
8
|
-
errors: Error[];
|
|
9
|
-
}
|
|
3
|
+
import type { ResumeReport } from "./resume-report";
|
|
4
|
+
export type { ResumeReport } from "./resume-report";
|
|
10
5
|
export declare function resumeAllTeams(ctx: ExecutorContext, config: TeamModeConfig): Promise<ResumeReport>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { TeamModeConfig } from "../../../config/schema/team-mode";
|
|
2
|
+
import type { RuntimeState } from "../types";
|
|
3
|
+
export declare function removeRuntimeDirectory(teamRunId: string, config: TeamModeConfig): Promise<boolean>;
|
|
4
|
+
export declare function cleanupMemberWorktrees(runtimeState: RuntimeState): Promise<void>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ExecutorContext } from "../../../tools/delegate-task/executor-types";
|
|
2
|
+
import type { RuntimeState } from "../types";
|
|
3
|
+
export interface WorkerLiveness {
|
|
4
|
+
readonly name: string;
|
|
5
|
+
readonly wasSpawned: boolean;
|
|
6
|
+
readonly stillAlive: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare function sessionExists(ctx: ExecutorContext, sessionId: string): Promise<boolean>;
|
|
9
|
+
export declare function inspectWorkerMembers(ctx: ExecutorContext, runtimeState: RuntimeState): Promise<WorkerLiveness[]>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { RuntimeState } from "../types";
|
|
2
|
+
import type { WorkerLiveness } from "./session-liveness";
|
|
3
|
+
export interface WorkerResumeStatus {
|
|
4
|
+
readonly deadWorkerNames: readonly string[];
|
|
5
|
+
readonly hasAliveWorker: boolean;
|
|
6
|
+
readonly hasAnyWorker: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare function summarizeWorkerLiveness(workerCheckResults: readonly WorkerLiveness[]): WorkerResumeStatus;
|
|
9
|
+
export declare function markDeadWorkersErrored(runtimeState: RuntimeState, deadWorkerNames: readonly string[]): RuntimeState;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type ToolDefinition } from "@opencode-ai/plugin/tool";
|
|
2
|
+
import type { TeamModeConfig } from "../../../config/schema/team-mode";
|
|
3
|
+
import type { OpencodeClient } from "../../../tools/delegate-task/types";
|
|
4
|
+
import type { BackgroundManager } from "../../background-agent/manager";
|
|
5
|
+
import type { TmuxSessionManager } from "../../tmux-subagent/manager";
|
|
6
|
+
import { loadTeamSpec } from "../team-registry/loader";
|
|
7
|
+
import { createTeamRun } from "../team-runtime/create";
|
|
8
|
+
import { listActiveTeams, loadRuntimeState } from "../team-state-store/store";
|
|
9
|
+
import { type TeamCreateExecutorConfig } from "./lifecycle-inline-spec";
|
|
10
|
+
type TeamCreateToolDeps = {
|
|
11
|
+
createTeamRun: typeof createTeamRun;
|
|
12
|
+
loadTeamSpec: typeof loadTeamSpec;
|
|
13
|
+
listActiveTeams: typeof listActiveTeams;
|
|
14
|
+
loadRuntimeState: typeof loadRuntimeState;
|
|
15
|
+
};
|
|
16
|
+
export declare function createTeamCreateTool(config: TeamModeConfig, client: OpencodeClient, bgMgr: BackgroundManager, tmuxMgr?: TmuxSessionManager, executorConfig?: TeamCreateExecutorConfig, deps?: TeamCreateToolDeps): ToolDefinition;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import type { AgentOverrides, CategoriesConfig } from "../../../config/schema";
|
|
3
|
+
import { normalizeTeamSpecInput } from "../team-registry/loader";
|
|
4
|
+
import { type TeamSpec } from "../types";
|
|
5
|
+
export declare const TEAM_CREATE_USAGE = "team_create requires exactly one of teamName or inline_spec. Use team_create({ teamName: \"existing-team\" }) or team_create({ inline_spec: { name: \"team-name\", members: [{ name: \"worker\", category: \"quick\", prompt: \"Do the assigned work.\" }] } }).";
|
|
6
|
+
export declare const TeamCreateArgsSchema: z.ZodObject<{
|
|
7
|
+
teamName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
8
|
+
inline_spec: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
|
|
9
|
+
leadSessionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
10
|
+
}, z.core.$strip>;
|
|
11
|
+
export type TeamCreateArgs = z.infer<typeof TeamCreateArgsSchema>;
|
|
12
|
+
export type TeamCreateExecutorConfig = {
|
|
13
|
+
userCategories?: CategoriesConfig;
|
|
14
|
+
sisyphusJuniorModel?: string;
|
|
15
|
+
agentOverrides?: AgentOverrides;
|
|
16
|
+
};
|
|
17
|
+
export declare function resolveDefaultInlineCategory(userCategories?: CategoriesConfig): string | undefined;
|
|
18
|
+
export declare function parseTeamCreateArgs(rawArgs: unknown): TeamCreateArgs;
|
|
19
|
+
export declare function parseInlineTeamSpec(rawSpec: unknown, options?: Parameters<typeof normalizeTeamSpecInput>[1]): TeamSpec;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { TeamModeConfig } from "../../../config/schema/team-mode";
|
|
2
|
+
import { listActiveTeams, loadRuntimeState } from "../team-state-store/store";
|
|
3
|
+
import type { RuntimeState } from "../types";
|
|
4
|
+
export type TeamLifecycleToolContext = {
|
|
5
|
+
sessionID: string;
|
|
6
|
+
directory?: string;
|
|
7
|
+
agent?: string;
|
|
8
|
+
messageID?: string;
|
|
9
|
+
};
|
|
10
|
+
export type TeamParticipant = {
|
|
11
|
+
role: "lead" | "member";
|
|
12
|
+
memberName: string;
|
|
13
|
+
};
|
|
14
|
+
export type TeamRuntimeStoreDeps = {
|
|
15
|
+
listActiveTeams: typeof listActiveTeams;
|
|
16
|
+
loadRuntimeState: typeof loadRuntimeState;
|
|
17
|
+
};
|
|
18
|
+
export declare function sanitizeRuntimeState(runtimeState: RuntimeState): Omit<RuntimeState, "members"> & {
|
|
19
|
+
members: Array<Omit<RuntimeState["members"][number], "lastInjectedTurnMarker" | "pendingInjectedMessageIds">>;
|
|
20
|
+
};
|
|
21
|
+
export declare function findParticipantRuntime(sessionID: string, config: TeamModeConfig, deps: TeamRuntimeStoreDeps): Promise<RuntimeState | undefined>;
|
|
22
|
+
export declare function resolveParticipant(teamRunId: string, sessionID: string, config: TeamModeConfig, deps: TeamRuntimeStoreDeps): Promise<{
|
|
23
|
+
runtimeState: RuntimeState;
|
|
24
|
+
participant?: TeamParticipant;
|
|
25
|
+
}>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type ToolDefinition } from "@opencode-ai/plugin/tool";
|
|
2
|
+
import type { TeamModeConfig } from "../../../config/schema/team-mode";
|
|
3
|
+
import type { OpencodeClient } from "../../../tools/delegate-task/types";
|
|
4
|
+
import type { BackgroundManager } from "../../background-agent/manager";
|
|
5
|
+
import type { TmuxSessionManager } from "../../tmux-subagent/manager";
|
|
6
|
+
import { approveShutdown, deleteTeam, rejectShutdown, requestShutdownOfMember } from "../team-runtime/shutdown";
|
|
7
|
+
import { type TeamRuntimeStoreDeps } from "./lifecycle-participant";
|
|
8
|
+
type TeamShutdownToolDeps = TeamRuntimeStoreDeps & {
|
|
9
|
+
deleteTeam: typeof deleteTeam;
|
|
10
|
+
requestShutdownOfMember: typeof requestShutdownOfMember;
|
|
11
|
+
approveShutdown: typeof approveShutdown;
|
|
12
|
+
rejectShutdown: typeof rejectShutdown;
|
|
13
|
+
};
|
|
14
|
+
export declare function createTeamDeleteTool(config: TeamModeConfig, client: OpencodeClient, backgroundManager: BackgroundManager, tmuxMgr?: TmuxSessionManager, deps?: TeamShutdownToolDeps): ToolDefinition;
|
|
15
|
+
export declare function createTeamShutdownRequestTool(config: TeamModeConfig, client: OpencodeClient, deps?: TeamShutdownToolDeps): ToolDefinition;
|
|
16
|
+
export declare function createTeamApproveShutdownTool(config: TeamModeConfig, client: OpencodeClient, deps?: TeamShutdownToolDeps): ToolDefinition;
|
|
17
|
+
export declare function createTeamRejectShutdownTool(config: TeamModeConfig, client: OpencodeClient, deps?: TeamShutdownToolDeps): ToolDefinition;
|
|
18
|
+
export {};
|