@heidi-dang/oh-my-opencode 3.12.4 → 3.13.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/README.md +61 -367
- package/dist/agents/atlas/agent.d.ts +1 -1
- package/dist/agents/atlas/default.d.ts +1 -1
- package/dist/agents/atlas/gemini.d.ts +1 -1
- package/dist/agents/atlas/gpt.d.ts +1 -1
- package/dist/agents/atlas/prompt-section-builder.d.ts +1 -1
- package/dist/agents/builtin-agents/atlas-agent.d.ts +4 -1
- package/dist/agents/builtin-agents/available-skills.d.ts +1 -1
- package/dist/agents/builtin-agents/general-agents.d.ts +4 -1
- package/dist/agents/builtin-agents/hephaestus-agent.d.ts +5 -1
- package/dist/agents/builtin-agents/model-resolution.d.ts +2 -0
- package/dist/agents/builtin-agents/resolve-file-uri.test.d.ts +1 -0
- package/dist/agents/builtin-agents/sisyphus-agent.d.ts +4 -1
- package/dist/agents/builtin-agents.d.ts +3 -3
- package/dist/agents/chat.d.ts +7 -0
- package/dist/agents/dynamic-agent-prompt-builder.test.d.ts +1 -0
- package/dist/agents/env-context.test.d.ts +1 -0
- package/dist/agents/hephaestus/agent.d.ts +19 -0
- package/dist/agents/hephaestus/agent.test.d.ts +1 -0
- package/dist/agents/hephaestus/gpt-5-3-codex.d.ts +21 -0
- package/dist/agents/hephaestus/gpt-5-4.d.ts +3 -0
- package/dist/agents/hephaestus/gpt.d.ts +3 -0
- package/dist/agents/hephaestus/index.d.ts +2 -0
- package/dist/agents/hephaestus.d.ts +1 -1
- package/dist/agents/index.d.ts +1 -1
- package/dist/agents/metis.d.ts +1 -1
- package/dist/agents/momus.d.ts +1 -1
- package/dist/agents/momus.test.d.ts +1 -0
- package/dist/agents/prometheus-prompt.test.d.ts +1 -0
- package/dist/agents/prompts/agent-role.d.ts +2 -0
- package/dist/agents/prompts/anti-patterns.d.ts +2 -0
- package/dist/agents/prompts/base-system.d.ts +1 -0
- package/dist/agents/prompts/execution-rules.d.ts +2 -0
- package/dist/agents/prompts/hard-blocks.d.ts +2 -0
- package/dist/agents/prompts/index.d.ts +6 -0
- package/dist/agents/{dynamic-agent-prompt-builder.d.ts → prompts/orchestration.d.ts} +2 -23
- package/dist/agents/prompts/skill-context.d.ts +2 -0
- package/dist/agents/runtime/action-validator.d.ts +31 -0
- package/dist/agents/runtime/agent-logger.d.ts +15 -0
- package/dist/agents/runtime/loop-guard.d.ts +2 -0
- package/dist/agents/runtime/verify-action.d.ts +58 -0
- package/dist/agents/sisyphus/default.d.ts +9 -0
- package/dist/agents/sisyphus/gemini.d.ts +20 -0
- package/dist/agents/sisyphus/gpt-5-4.d.ts +16 -0
- package/dist/agents/sisyphus/index.d.ts +11 -0
- package/dist/agents/sisyphus-junior/index.test.d.ts +1 -0
- package/dist/agents/sisyphus.d.ts +1 -1
- package/dist/agents/tool-restrictions.test.d.ts +1 -0
- package/dist/agents/types.d.ts +24 -6
- package/dist/agents/types.test.d.ts +1 -0
- package/dist/agents/utils.test.d.ts +1 -0
- package/dist/cli/cli-installer.test.d.ts +1 -0
- package/dist/cli/config-manager/write-omo-config.test.d.ts +1 -0
- package/dist/cli/config-manager.test.d.ts +1 -0
- package/dist/cli/doctor/checks/config.test.d.ts +1 -0
- package/dist/cli/doctor/checks/dependencies.test.d.ts +1 -0
- package/dist/cli/doctor/checks/edit-atomicity.d.ts +5 -0
- package/dist/cli/doctor/checks/issue-resolution.d.ts +7 -0
- package/dist/cli/doctor/checks/model-resolution.test.d.ts +1 -0
- package/dist/cli/doctor/checks/plan-compiler.d.ts +8 -0
- package/dist/cli/doctor/checks/progress.d.ts +8 -0
- package/dist/cli/doctor/checks/run-state-watchdog.d.ts +2 -0
- package/dist/cli/doctor/checks/system-loaded-version.test.d.ts +1 -0
- package/dist/cli/doctor/checks/system.test.d.ts +1 -0
- package/dist/cli/doctor/checks/tool-contract.d.ts +8 -0
- package/dist/cli/doctor/checks/tool-metadata.d.ts +2 -0
- package/dist/cli/doctor/constants.d.ts +3 -0
- package/dist/cli/doctor/format-default.test.d.ts +1 -0
- package/dist/cli/doctor/formatter.test.d.ts +1 -0
- package/dist/cli/doctor/runner.test.d.ts +1 -0
- package/dist/cli/doctor/types.d.ts +3 -0
- package/dist/cli/index.js +2542 -214
- package/dist/cli/index.test.d.ts +1 -0
- package/dist/cli/install.test.d.ts +1 -0
- package/dist/cli/mcp-oauth/index.test.d.ts +1 -0
- package/dist/cli/mcp-oauth/login.test.d.ts +1 -0
- package/dist/cli/mcp-oauth/logout.test.d.ts +1 -0
- package/dist/cli/mcp-oauth/status.test.d.ts +1 -0
- package/dist/cli/model-fallback.test.d.ts +1 -0
- package/dist/cli/provider-model-id-transform.test.d.ts +1 -0
- package/dist/cli/run/completion-continuation.test.d.ts +1 -0
- package/dist/cli/run/completion-verbose-logging.test.d.ts +1 -0
- package/dist/cli/run/completion.test.d.ts +1 -0
- package/dist/cli/run/continuation-state-marker.test.d.ts +1 -0
- package/dist/cli/run/event-handlers.test.d.ts +1 -0
- package/dist/cli/run/events.test.d.ts +1 -0
- package/dist/cli/run/integration.test.d.ts +1 -0
- package/dist/cli/run/json-output.test.d.ts +1 -0
- package/dist/cli/run/message-part-delta.test.d.ts +1 -0
- package/dist/cli/run/on-complete-hook.test.d.ts +1 -0
- package/dist/cli/run/opencode-binary-resolver.test.d.ts +1 -0
- package/dist/cli/run/poll-for-completion.test.d.ts +1 -0
- package/dist/cli/run/runner.test.d.ts +1 -0
- package/dist/cli/run/server-connection.test.d.ts +1 -0
- package/dist/cli/run/session-resolver.test.d.ts +1 -0
- package/dist/cli/run/stdin-suppression.test.d.ts +1 -0
- package/dist/cli/run/timestamp-output.test.d.ts +1 -0
- package/dist/config/schema/agent-names.d.ts +6 -3
- package/dist/config/schema/agent-overrides.d.ts +150 -30
- package/dist/config/schema/background-task.test.d.ts +1 -0
- package/dist/config/schema/categories.d.ts +21 -3
- package/dist/config/schema/categories.test.d.ts +1 -0
- package/dist/config/schema/fallback-models.d.ts +11 -1
- package/dist/config/schema/hooks.d.ts +7 -0
- package/dist/config/schema/oh-my-opencode-config.d.ts +151 -29
- package/dist/config/schema.test.d.ts +1 -0
- package/dist/create-hooks.d.ts +11 -1
- package/dist/create-managers.d.ts +2 -0
- package/dist/create-tools.d.ts +1 -1
- package/dist/features/background-agent/compaction-aware-message-resolver.test.d.ts +1 -0
- package/dist/features/background-agent/concurrency.test.d.ts +1 -0
- package/dist/features/background-agent/error-classifier.test.d.ts +1 -0
- package/dist/features/background-agent/fallback-retry-handler.test.d.ts +1 -0
- package/dist/features/background-agent/manager.d.ts +13 -0
- package/dist/features/background-agent/manager.polling.test.d.ts +1 -0
- package/dist/features/background-agent/manager.test.d.ts +1 -0
- package/dist/features/background-agent/process-cleanup.test.d.ts +1 -0
- package/dist/features/background-agent/session-idle-event-handler.test.d.ts +1 -0
- package/dist/features/background-agent/spawner/parent-directory-resolver.test.d.ts +1 -0
- package/dist/features/background-agent/spawner.test.d.ts +1 -0
- package/dist/features/background-agent/task-history.test.d.ts +1 -0
- package/dist/features/background-agent/task-poller.test.d.ts +1 -0
- package/dist/features/background-agent/types.d.ts +9 -4
- package/dist/features/boulder-state/storage.test.d.ts +1 -0
- package/dist/features/builtin-commands/commands.test.d.ts +1 -0
- package/dist/features/builtin-commands/templates/stop-continuation.test.d.ts +1 -0
- package/dist/features/builtin-skills/skills/git/git-commit.d.ts +2 -0
- package/dist/features/builtin-skills/skills/git/git-history.d.ts +1 -0
- package/dist/features/builtin-skills/skills/git/git-push-pr.d.ts +1 -0
- package/dist/features/builtin-skills/skills/git/git-rebase.d.ts +1 -0
- package/dist/features/builtin-skills/skills/git/git-shared.d.ts +2 -0
- package/dist/features/builtin-skills/skills.test.d.ts +1 -0
- package/dist/features/claude-code-mcp-loader/loader.test.d.ts +1 -0
- package/dist/features/claude-code-session-state/state.d.ts +4 -0
- package/dist/features/claude-code-session-state/state.test.d.ts +1 -0
- package/dist/features/claude-tasks/session-storage.test.d.ts +1 -0
- package/dist/features/claude-tasks/storage.test.d.ts +1 -0
- package/dist/features/claude-tasks/types.test.d.ts +1 -0
- package/dist/features/context-injector/collector.test.d.ts +1 -0
- package/dist/features/context-injector/injector.test.d.ts +1 -0
- package/dist/features/hook-message-injector/injector.d.ts +2 -0
- package/dist/features/hook-message-injector/injector.test.d.ts +1 -0
- package/dist/features/issue-resolution/state.d.ts +12 -0
- package/dist/features/issue-resolution/tests/integration.test.d.ts +1 -0
- package/dist/features/mcp-oauth/callback-server.test.d.ts +1 -0
- package/dist/features/mcp-oauth/dcr.test.d.ts +1 -0
- package/dist/features/mcp-oauth/discovery.test.d.ts +1 -0
- package/dist/features/mcp-oauth/provider.test.d.ts +1 -0
- package/dist/features/mcp-oauth/resource-indicator.test.d.ts +1 -0
- package/dist/features/mcp-oauth/schema.test.d.ts +1 -0
- package/dist/features/mcp-oauth/step-up.test.d.ts +1 -0
- package/dist/features/mcp-oauth/storage.test.d.ts +1 -0
- package/dist/features/opencode-skill-loader/agents-skills-global.test.d.ts +1 -0
- package/dist/features/opencode-skill-loader/async-loader.test.d.ts +1 -0
- package/dist/features/opencode-skill-loader/blocking.test.d.ts +1 -0
- package/dist/features/opencode-skill-loader/config-source-discovery.test.d.ts +1 -0
- package/dist/features/opencode-skill-loader/loader.test.d.ts +1 -0
- package/dist/features/opencode-skill-loader/merger.test.d.ts +1 -0
- package/dist/features/opencode-skill-loader/skill-content.test.d.ts +1 -0
- package/dist/features/pr-state/storage.d.ts +10 -0
- package/dist/features/run-continuation-state/storage.test.d.ts +1 -0
- package/dist/features/run-state-watchdog/index.d.ts +1 -0
- package/dist/features/run-state-watchdog/manager.d.ts +31 -0
- package/dist/features/run-state-watchdog/manager.test.d.ts +1 -0
- package/dist/features/run-state-watchdog/reconnect.test.d.ts +1 -0
- package/dist/features/skill-mcp-manager/env-cleaner.test.d.ts +1 -0
- package/dist/features/skill-mcp-manager/manager.test.d.ts +1 -0
- package/dist/features/task-toast-manager/manager.d.ts +9 -0
- package/dist/features/task-toast-manager/manager.test.d.ts +1 -0
- package/dist/features/task-toast-manager/types.d.ts +5 -0
- package/dist/features/tmux-subagent/action-executor.test.d.ts +1 -0
- package/dist/features/tmux-subagent/decision-engine.test.d.ts +1 -0
- package/dist/features/tmux-subagent/layout-config.test.d.ts +1 -0
- package/dist/features/tmux-subagent/manager.test.d.ts +1 -0
- package/dist/features/tmux-subagent/polling-manager.test.d.ts +1 -0
- package/dist/features/tool-metadata-store/index.test.d.ts +1 -0
- package/dist/hooks/anthropic-context-window-limit-recovery/empty-content-recovery-sdk.test.d.ts +1 -0
- package/dist/hooks/anthropic-context-window-limit-recovery/executor.test.d.ts +1 -0
- package/dist/hooks/anthropic-context-window-limit-recovery/parser.test.d.ts +1 -0
- package/dist/hooks/anthropic-context-window-limit-recovery/pruning-deduplication.test.d.ts +1 -0
- package/dist/hooks/anthropic-context-window-limit-recovery/recovery-deduplication.test.d.ts +1 -0
- package/dist/hooks/anthropic-context-window-limit-recovery/recovery-hook.test.d.ts +1 -0
- package/dist/hooks/anthropic-context-window-limit-recovery/storage.test.d.ts +1 -0
- package/dist/hooks/anthropic-context-window-limit-recovery/summarize-retry-strategy.test.d.ts +1 -0
- package/dist/hooks/anthropic-effort/index.test.d.ts +1 -0
- package/dist/hooks/atlas/index.test.d.ts +1 -0
- package/dist/hooks/auto-slash-command/constants.test.d.ts +1 -0
- package/dist/hooks/auto-slash-command/detector.test.d.ts +1 -0
- package/dist/hooks/auto-slash-command/executor.test.d.ts +1 -0
- package/dist/hooks/auto-slash-command/index.test.d.ts +1 -0
- package/dist/hooks/auto-update-checker/checker/pinned-version-updater.test.d.ts +1 -0
- package/dist/hooks/auto-update-checker/checker/plugin-entry.test.d.ts +1 -0
- package/dist/hooks/auto-update-checker/checker.test.d.ts +1 -0
- package/dist/hooks/auto-update-checker/hook/background-update-check.test.d.ts +1 -0
- package/dist/hooks/auto-update-checker/hook.test.d.ts +1 -0
- package/dist/hooks/auto-update-checker/index.test.d.ts +1 -0
- package/dist/hooks/category-skill-reminder/formatter.d.ts +1 -1
- package/dist/hooks/category-skill-reminder/hook.d.ts +1 -1
- package/dist/hooks/category-skill-reminder/index.test.d.ts +1 -0
- package/dist/hooks/claude-code-hooks/execute-http-hook.test.d.ts +1 -0
- package/dist/hooks/claude-code-hooks/stop.test.d.ts +1 -0
- package/dist/hooks/claude-code-hooks/transcript.test.d.ts +1 -0
- package/dist/hooks/claude-code-hooks/user-prompt-submit.test.d.ts +1 -0
- package/dist/hooks/comment-checker/cli.test.d.ts +1 -0
- package/dist/hooks/comment-checker/hook.apply-patch.test.d.ts +1 -0
- package/dist/hooks/comment-checker/pending-calls.test.d.ts +1 -0
- package/dist/hooks/compaction-context-injector/index.test.d.ts +1 -0
- package/dist/hooks/compaction-todo-preserver/index.test.d.ts +1 -0
- package/dist/hooks/context-window-monitor.test.d.ts +1 -0
- package/dist/hooks/delegate-task-retry/index.test.d.ts +1 -0
- package/dist/hooks/directory-agents-injector/injector.test.d.ts +1 -0
- package/dist/hooks/directory-readme-injector/injector.test.d.ts +1 -0
- package/dist/hooks/edit-error-recovery/hook.d.ts +2 -1
- package/dist/hooks/edit-error-recovery/index.test.d.ts +1 -0
- package/dist/hooks/edit-safeguard/hook.d.ts +2 -0
- package/dist/hooks/execution-journal/hook.d.ts +19 -0
- package/dist/hooks/execution-journal/index.d.ts +1 -0
- package/dist/hooks/hashline-read-enhancer/index.test.d.ts +1 -0
- package/dist/hooks/index.d.ts +11 -3
- package/dist/hooks/json-error-recovery/index.test.d.ts +1 -0
- package/dist/hooks/keyword-detector/constants.d.ts +1 -0
- package/dist/hooks/keyword-detector/detector.d.ts +1 -1
- package/dist/hooks/keyword-detector/index.test.d.ts +1 -0
- package/dist/hooks/keyword-detector/issue.d.ts +2 -0
- package/dist/hooks/model-fallback/hook.test.d.ts +1 -0
- package/dist/hooks/no-hephaestus-non-gpt/index.test.d.ts +1 -0
- package/dist/hooks/no-sisyphus-gpt/index.test.d.ts +1 -0
- package/dist/hooks/non-interactive-env/index.test.d.ts +1 -0
- package/dist/hooks/plan-enforcement/hook.d.ts +29 -0
- package/dist/hooks/plan-enforcement/hook.test.d.ts +1 -0
- package/dist/hooks/plan-enforcement/index.d.ts +1 -0
- package/dist/hooks/preemptive-compaction.test.d.ts +1 -0
- package/dist/hooks/prometheus-md-only/index.test.d.ts +1 -0
- package/dist/hooks/question-label-truncator/index.test.d.ts +1 -0
- package/dist/hooks/ralph-loop/completion-handler.d.ts +14 -0
- package/dist/hooks/ralph-loop/completion-promise-detector.d.ts +1 -1
- package/dist/hooks/ralph-loop/completion-promise-detector.test.d.ts +1 -0
- package/dist/hooks/ralph-loop/constants.d.ts +1 -0
- package/dist/hooks/ralph-loop/index.test.d.ts +1 -0
- package/dist/hooks/ralph-loop/loop-state-controller.d.ts +2 -0
- package/dist/hooks/ralph-loop/ralph-loop-event-handler.d.ts +2 -0
- package/dist/hooks/ralph-loop/reset-strategy-race-condition.test.d.ts +1 -0
- package/dist/hooks/ralph-loop/session-event-handler.d.ts +12 -0
- package/dist/hooks/ralph-loop/types.d.ts +5 -1
- package/dist/hooks/ralph-loop/ulw-loop-verification.test.d.ts +1 -0
- package/dist/hooks/read-image-resizer/hook.test.d.ts +1 -0
- package/dist/hooks/read-image-resizer/image-dimensions.test.d.ts +1 -0
- package/dist/hooks/read-image-resizer/image-resizer.test.d.ts +1 -0
- package/dist/hooks/rules-injector/finder.test.d.ts +1 -0
- package/dist/hooks/rules-injector/injector.test.d.ts +1 -0
- package/dist/hooks/rules-injector/output-path.test.d.ts +1 -0
- package/dist/hooks/rules-injector/parser.test.d.ts +1 -0
- package/dist/hooks/run-state-watchdog/hook.d.ts +5 -0
- package/dist/hooks/run-state-watchdog/index.d.ts +1 -0
- package/dist/hooks/runtime-enforcement/hook.d.ts +10 -0
- package/dist/hooks/runtime-enforcement/hook.test.d.ts +1 -0
- package/dist/hooks/runtime-enforcement/index.d.ts +1 -0
- package/dist/hooks/runtime-enforcement/synthetic-injection.test.d.ts +1 -0
- package/dist/hooks/runtime-fallback/index.test.d.ts +1 -0
- package/dist/hooks/semantic-loop-guard/hook.d.ts +10 -0
- package/dist/hooks/semantic-loop-guard/hook.test.d.ts +1 -0
- package/dist/hooks/semantic-loop-guard/index.d.ts +1 -0
- package/dist/hooks/session-notification-input-needed.test.d.ts +1 -0
- package/dist/hooks/session-notification.test.d.ts +1 -0
- package/dist/hooks/session-recovery/detect-error-type.test.d.ts +1 -0
- package/dist/hooks/session-recovery/index.test.d.ts +1 -0
- package/dist/hooks/session-recovery/recover-empty-content-message-sdk.test.d.ts +1 -0
- package/dist/hooks/session-recovery/resume.test.d.ts +1 -0
- package/dist/hooks/session-recovery/storage/readers-from-sdk.test.d.ts +1 -0
- package/dist/hooks/start-work/index.test.d.ts +1 -0
- package/dist/hooks/start-work/parse-user-request.test.d.ts +1 -0
- package/dist/hooks/start-work/worktree-detector.test.d.ts +1 -0
- package/dist/hooks/stop-continuation-guard/index.test.d.ts +1 -0
- package/dist/hooks/task-reminder/index.test.d.ts +1 -0
- package/dist/hooks/task-resume-info/index.test.d.ts +1 -0
- package/dist/hooks/tasks-todowrite-disabler/index.test.d.ts +1 -0
- package/dist/hooks/think-mode/index.test.d.ts +1 -0
- package/dist/hooks/think-mode/switcher.test.d.ts +1 -0
- package/dist/hooks/todo-continuation-enforcer/continuation-injection.test.d.ts +1 -0
- package/dist/hooks/todo-continuation-enforcer/pending-question-detection.test.d.ts +1 -0
- package/dist/hooks/todo-continuation-enforcer/todo-continuation-enforcer.test.d.ts +1 -0
- package/dist/hooks/tool-contract/hook.d.ts +19 -0
- package/dist/hooks/tool-contract/hook.test.d.ts +1 -0
- package/dist/hooks/tool-contract/index.d.ts +1 -0
- package/dist/hooks/tool-output-truncator.test.d.ts +1 -0
- package/dist/hooks/unstable-agent-babysitter/index.test.d.ts +1 -0
- package/dist/hooks/write-existing-file-guard/index.test.d.ts +1 -0
- package/dist/hooks/xai-usage-patch/hook.d.ts +20 -0
- package/dist/hooks/xai-usage-patch/hook.test.d.ts +1 -0
- package/dist/index.compaction-model-agnostic.static.test.d.ts +1 -0
- package/dist/index.js +4980 -14453
- package/dist/index.test.d.ts +1 -0
- package/dist/mcp/index.test.d.ts +1 -0
- package/dist/mcp/websearch.test.d.ts +1 -0
- package/dist/oh-my-opencode.schema.json +622 -15
- package/dist/plugin/available-categories.d.ts +1 -1
- package/dist/plugin/chat-headers.test.d.ts +1 -0
- package/dist/plugin/chat-message.test.d.ts +1 -0
- package/dist/plugin/chat-params.test.d.ts +1 -0
- package/dist/plugin/event.model-fallback.test.d.ts +1 -0
- package/dist/plugin/event.test.d.ts +1 -0
- package/dist/plugin/hooks/create-core-hooks.d.ts +10 -0
- package/dist/plugin/hooks/create-session-hooks.d.ts +4 -1
- package/dist/plugin/hooks/create-skill-hooks.d.ts +1 -1
- package/dist/plugin/hooks/create-tool-guard-hooks.d.ts +7 -1
- package/dist/plugin/recent-synthetic-idles.test.d.ts +1 -0
- package/dist/plugin/session-agent-resolver.test.d.ts +1 -0
- package/dist/plugin/session-status-normalizer.test.d.ts +1 -0
- package/dist/plugin/skill-context.d.ts +1 -1
- package/dist/plugin/tool-execute-before-session-notification.test.d.ts +1 -0
- package/dist/plugin/tool-execute-before.test.d.ts +1 -0
- package/dist/plugin/tool-normalization.test.d.ts +1 -0
- package/dist/plugin/tool-registry.d.ts +1 -1
- package/dist/plugin/truth-model-integration.test.d.ts +1 -0
- package/dist/plugin/ultrawork-db-model-override.test.d.ts +1 -0
- package/dist/plugin/ultrawork-model-override.test.d.ts +1 -0
- package/dist/plugin-config.test.d.ts +1 -0
- package/dist/plugin-handlers/agent-key-remapper.test.d.ts +1 -0
- package/dist/plugin-handlers/config-handler-formatter.test.d.ts +1 -0
- package/dist/plugin-handlers/config-handler.test.d.ts +1 -0
- package/dist/plugin-handlers/mcp-config-handler.test.d.ts +1 -0
- package/dist/plugin-handlers/plan-model-inheritance.test.d.ts +1 -0
- package/dist/plugin-handlers/prometheus-agent-config-builder.d.ts +3 -2
- package/dist/plugin-handlers/tool-config-handler.test.d.ts +1 -0
- package/dist/runtime/journal.d.ts +33 -0
- package/dist/runtime/plan-compiler.d.ts +20 -0
- package/dist/runtime/plan-compiler.test.d.ts +1 -0
- package/dist/runtime/startup-validation.d.ts +7 -0
- package/dist/runtime/state-ledger.d.ts +52 -0
- package/dist/runtime/tools/complete-task.d.ts +4 -0
- package/dist/runtime/tools/fs-safe.contract.test.d.ts +1 -0
- package/dist/runtime/tools/fs-safe.d.ts +1 -0
- package/dist/runtime/tools/gh-safe.d.ts +1 -0
- package/dist/runtime/tools/git-safe.d.ts +1 -0
- package/dist/runtime/tools/index.d.ts +8 -0
- package/dist/runtime/tools/plan.d.ts +3 -0
- package/dist/runtime/tools/query-ledger.d.ts +3 -0
- package/dist/runtime/tools/registry.d.ts +8 -0
- package/dist/runtime/tools/report-issue-verification.d.ts +1 -0
- package/dist/runtime/tools/verify.d.ts +1 -0
- package/dist/runtime/truth-model.test.d.ts +1 -0
- package/dist/runtime/vcs-detection.test.d.ts +1 -0
- package/dist/shared/active-task-storage.d.ts +15 -0
- package/dist/shared/agent-config-integration.test.d.ts +1 -0
- package/dist/shared/agent-display-names.test.d.ts +1 -0
- package/dist/shared/agent-variant.test.d.ts +1 -0
- package/dist/shared/claude-config-dir.test.d.ts +1 -0
- package/dist/shared/connected-providers-cache.test.d.ts +1 -0
- package/dist/shared/deep-merge.test.d.ts +1 -0
- package/dist/shared/dynamic-truncator.test.d.ts +1 -0
- package/dist/shared/external-plugin-detector.test.d.ts +1 -0
- package/dist/shared/file-utils.test.d.ts +1 -0
- package/dist/shared/first-message-variant.test.d.ts +1 -0
- package/dist/shared/frontmatter.test.d.ts +1 -0
- package/dist/shared/git-worktree/collect-git-diff-stats.test.d.ts +1 -0
- package/dist/shared/git-worktree/git-worktree.test.d.ts +1 -0
- package/dist/shared/git-worktree/parse-status-porcelain-line.test.d.ts +1 -0
- package/dist/shared/index.d.ts +2 -0
- package/dist/shared/jsonc-parser.test.d.ts +1 -0
- package/dist/shared/merge-categories.test.d.ts +1 -0
- package/dist/shared/migration.test.d.ts +1 -0
- package/dist/shared/model-availability.d.ts +6 -0
- package/dist/shared/model-availability.test.d.ts +1 -0
- package/dist/shared/model-error-classifier.d.ts +5 -0
- package/dist/shared/model-error-classifier.test.d.ts +1 -0
- package/dist/shared/model-format-normalizer.test.d.ts +1 -0
- package/dist/shared/model-normalization.test.d.ts +1 -0
- package/dist/shared/model-requirements.d.ts +6 -0
- package/dist/shared/model-requirements.test.d.ts +1 -0
- package/dist/shared/model-resolution-acceptance.test.d.ts +1 -0
- package/dist/shared/model-resolution-pipeline.d.ts +5 -1
- package/dist/shared/model-resolution-pipeline.test.d.ts +1 -0
- package/dist/shared/model-resolution-tracker.d.ts +17 -0
- package/dist/shared/model-resolution-types.d.ts +7 -1
- package/dist/shared/model-resolver.d.ts +10 -3
- package/dist/shared/model-resolver.test.d.ts +1 -0
- package/dist/shared/model-suggestion-retry.test.d.ts +1 -0
- package/dist/shared/normalize-sdk-response.test.d.ts +1 -0
- package/dist/shared/opencode-config-dir.test.d.ts +1 -0
- package/dist/shared/opencode-http-api.test.d.ts +1 -0
- package/dist/shared/opencode-message-dir.test.d.ts +1 -0
- package/dist/shared/opencode-server-auth.test.d.ts +1 -0
- package/dist/shared/opencode-storage-detection.test.d.ts +1 -0
- package/dist/shared/opencode-version.test.d.ts +1 -0
- package/dist/shared/pattern-matcher.test.d.ts +1 -0
- package/dist/shared/permission-compat.test.d.ts +1 -0
- package/dist/shared/plugin-command-discovery.test.d.ts +1 -0
- package/dist/shared/port-utils.test.d.ts +1 -0
- package/dist/shared/prompt-tools.test.d.ts +1 -0
- package/dist/shared/read-permission-tracker.d.ts +15 -0
- package/dist/shared/safe-create-hook.test.d.ts +1 -0
- package/dist/shared/session-cursor.test.d.ts +1 -0
- package/dist/shared/session-directory-resolver.test.d.ts +1 -0
- package/dist/shared/session-model-state.test.d.ts +1 -0
- package/dist/shared/session-tools-store.test.d.ts +1 -0
- package/dist/shared/shell-env.test.d.ts +1 -0
- package/dist/shared/skill-path-resolver.test.d.ts +1 -0
- package/dist/shared/system-directive.test.d.ts +1 -0
- package/dist/shared/tmux/tmux-utils/layout.test.d.ts +1 -0
- package/dist/shared/tmux/tmux-utils.test.d.ts +1 -0
- package/dist/shared/tool-name.test.d.ts +1 -0
- package/dist/shared/truncate-description.test.d.ts +1 -0
- package/dist/shared/verify-task-completion.d.ts +1 -0
- package/dist/tools/background-task/create-background-output.blocking.test.d.ts +1 -0
- package/dist/tools/background-task/create-background-task.test.d.ts +1 -0
- package/dist/tools/background-task/tools.test.d.ts +1 -0
- package/dist/tools/call-omo-agent/background-agent-executor.test.d.ts +1 -0
- package/dist/tools/call-omo-agent/background-executor.test.d.ts +1 -0
- package/dist/tools/call-omo-agent/session-creator.test.d.ts +1 -0
- package/dist/tools/call-omo-agent/subagent-session-creator.test.d.ts +1 -0
- package/dist/tools/call-omo-agent/sync-executor.test.d.ts +1 -0
- package/dist/tools/call-omo-agent/tools.test.d.ts +1 -0
- package/dist/tools/delegate-task/background-continuation.test.d.ts +1 -0
- package/dist/tools/delegate-task/background-task.d.ts +1 -1
- package/dist/tools/delegate-task/background-task.test.d.ts +1 -0
- package/dist/tools/delegate-task/category-resolver.d.ts +1 -0
- package/dist/tools/delegate-task/category-resolver.test.d.ts +1 -0
- package/dist/tools/delegate-task/constants.d.ts +1 -1
- package/dist/tools/delegate-task/metadata-await.test.d.ts +1 -0
- package/dist/tools/delegate-task/metadata-model-unification.test.d.ts +1 -0
- package/dist/tools/delegate-task/model-selection.d.ts +2 -0
- package/dist/tools/delegate-task/subagent-resolver.d.ts +2 -1
- package/dist/tools/delegate-task/subagent-resolver.test.d.ts +1 -0
- package/dist/tools/delegate-task/sync-continuation.test.d.ts +1 -0
- package/dist/tools/delegate-task/sync-poll-timeout.test.d.ts +1 -0
- package/dist/tools/delegate-task/sync-prompt-sender.d.ts +1 -0
- package/dist/tools/delegate-task/sync-prompt-sender.test.d.ts +1 -0
- package/dist/tools/delegate-task/sync-result-fetcher.test.d.ts +1 -0
- package/dist/tools/delegate-task/sync-session-poller.test.d.ts +1 -0
- package/dist/tools/delegate-task/sync-task.d.ts +1 -1
- package/dist/tools/delegate-task/sync-task.test.d.ts +1 -0
- package/dist/tools/delegate-task/timing.test.d.ts +1 -0
- package/dist/tools/delegate-task/token-limiter.test.d.ts +1 -0
- package/dist/tools/delegate-task/tools.test.d.ts +1 -0
- package/dist/tools/delegate-task/types.d.ts +1 -1
- package/dist/tools/delegate-task/unstable-agent-task.test.d.ts +1 -0
- package/dist/tools/delegate-task/unstable-agent-timeout.test.d.ts +1 -0
- package/dist/tools/glob/cli.test.d.ts +1 -0
- package/dist/tools/grep/downloader.test.d.ts +1 -0
- package/dist/tools/grep/result-formatter.test.d.ts +1 -0
- package/dist/tools/hashline-edit/diff-utils.test.d.ts +1 -0
- package/dist/tools/hashline-edit/edit-operations.test.d.ts +1 -0
- package/dist/tools/hashline-edit/edit-text-normalization.test.d.ts +1 -0
- package/dist/tools/hashline-edit/hash-computation.test.d.ts +1 -0
- package/dist/tools/hashline-edit/normalize-edits.test.d.ts +1 -0
- package/dist/tools/hashline-edit/tools.test.d.ts +1 -0
- package/dist/tools/hashline-edit/validation.test.d.ts +1 -0
- package/dist/tools/look-at/create-look-at-error-handling.test.d.ts +1 -0
- package/dist/tools/look-at/create-look-at-image-data.test.d.ts +1 -0
- package/dist/tools/look-at/create-look-at-model-passthrough.test.d.ts +1 -0
- package/dist/tools/look-at/create-look-at-sync-prompt.test.d.ts +1 -0
- package/dist/tools/look-at/create-look-at-unhandled-error.test.d.ts +1 -0
- package/dist/tools/look-at/image-converter.test.d.ts +1 -0
- package/dist/tools/look-at/mime-type-inference.test.d.ts +1 -0
- package/dist/tools/look-at/normalize-args.test.d.ts +1 -0
- package/dist/tools/look-at/session-poller.test.d.ts +1 -0
- package/dist/tools/look-at/tools.test.d.ts +7 -0
- package/dist/tools/look-at/validate-args.test.d.ts +1 -0
- package/dist/tools/lsp/client.test.d.ts +1 -0
- package/dist/tools/lsp/config.test.d.ts +1 -0
- package/dist/tools/lsp/lsp-client-wrapper.d.ts +3 -0
- package/dist/tools/lsp/lsp-process.test.d.ts +1 -0
- package/dist/tools/lsp/server-config-loader.test.d.ts +1 -0
- package/dist/tools/lsp/utils.test.d.ts +1 -0
- package/dist/tools/session-manager/storage.test.d.ts +1 -0
- package/dist/tools/session-manager/tools.test.d.ts +1 -0
- package/dist/tools/session-manager/utils.test.d.ts +1 -0
- package/dist/tools/skill/tools.test.agent-restriction.d.ts +1 -0
- package/dist/tools/skill/tools.test.d.ts +1 -0
- package/dist/tools/skill/tools.test.description.d.ts +1 -0
- package/dist/tools/skill/tools.test.mcp-schema.d.ts +1 -0
- package/dist/tools/skill/tools.test.ordering.d.ts +1 -0
- package/dist/tools/skill/tools.test.utils.d.ts +10 -0
- package/dist/tools/skill-mcp/builtin-mcp-hint.test.d.ts +1 -0
- package/dist/tools/skill-mcp/tools.test.d.ts +1 -0
- package/dist/tools/slashcommand/command-discovery.test.d.ts +1 -0
- package/dist/tools/slashcommand/command-output-formatter.test.d.ts +1 -0
- package/dist/tools/slashcommand/index.test.d.ts +1 -0
- package/dist/tools/task/task-create-input.test.d.ts +1 -0
- package/dist/tools/task/task-create.test.d.ts +1 -0
- package/dist/tools/task/task-delete-input.test.d.ts +1 -0
- package/dist/tools/task/task-get-input.test.d.ts +1 -0
- package/dist/tools/task/task-get.test.d.ts +1 -0
- package/dist/tools/task/task-list-input.test.d.ts +1 -0
- package/dist/tools/task/task-list.test.d.ts +1 -0
- package/dist/tools/task/task-schema-core.test.d.ts +1 -0
- package/dist/tools/task/task-schema-fields.test.d.ts +1 -0
- package/dist/tools/task/task-status.test.d.ts +1 -0
- package/dist/tools/task/task-update-input.test.d.ts +1 -0
- package/dist/tools/task/task-update.test.d.ts +1 -0
- package/dist/tools/task/todo-sync-all-fetch.test.d.ts +1 -0
- package/dist/tools/task/todo-sync-all-write.test.d.ts +1 -0
- package/dist/tools/task/todo-sync-sync.test.d.ts +1 -0
- package/dist/tools/task/todo-sync-update.test.d.ts +1 -0
- package/dist/tools/task/todo-sync.test.d.ts +1 -0
- package/dist/utils/context-trimmer.d.ts +21 -0
- package/dist/utils/safety-tool-result.d.ts +31 -0
- package/dist/utils/tool-contract-wrapper.d.ts +10 -0
- package/package.json +17 -16
|
@@ -2,7 +2,7 @@ import type { PluginInput } from "@opencode-ai/plugin";
|
|
|
2
2
|
/**
|
|
3
3
|
* Known Edit tool error patterns that indicate the AI made a mistake
|
|
4
4
|
*/
|
|
5
|
-
export declare const EDIT_ERROR_PATTERNS: readonly ["oldString and newString must be different", "oldString not found", "oldString found multiple times"];
|
|
5
|
+
export declare const EDIT_ERROR_PATTERNS: readonly ["oldString and newString must be different", "oldString not found", "oldString found multiple times", "could not find", "patch failed", "hunk failed", "no exact match", "refused to edit", "hash mismatch"];
|
|
6
6
|
/**
|
|
7
7
|
* System reminder injected when Edit tool fails due to AI mistake
|
|
8
8
|
* Short, direct, and commanding - forces immediate corrective action
|
|
@@ -15,6 +15,7 @@ export declare const EDIT_ERROR_REMINDER = "\n[EDIT ERROR - IMMEDIATE ACTION REQ
|
|
|
15
15
|
* - oldString and newString must be different (trying to "edit" to same content)
|
|
16
16
|
* - oldString not found (wrong assumption about file content)
|
|
17
17
|
* - oldString found multiple times (ambiguous match, need more context)
|
|
18
|
+
* - patch failed / could not find (apply_patch rejections)
|
|
18
19
|
*
|
|
19
20
|
* @see https://github.com/sst/opencode/issues/4718
|
|
20
21
|
*/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { PluginInput } from "@opencode-ai/plugin";
|
|
2
|
+
/**
|
|
3
|
+
* Hook to automatically log all tool executions to the execution journal.
|
|
4
|
+
*
|
|
5
|
+
* This also inspects the result of "safe wrapper tools" (like git_safe)
|
|
6
|
+
* to automatically record state changes in the State Ledger without trusting
|
|
7
|
+
* the LLM to report them accurately.
|
|
8
|
+
*/
|
|
9
|
+
export declare function createExecutionJournalHook(ctx: PluginInput): {
|
|
10
|
+
"tool.execute.after": (input: {
|
|
11
|
+
tool: string;
|
|
12
|
+
sessionID: string;
|
|
13
|
+
callID: string;
|
|
14
|
+
}, output: {
|
|
15
|
+
title: string;
|
|
16
|
+
output: string;
|
|
17
|
+
metadata: any;
|
|
18
|
+
}) => Promise<void>;
|
|
19
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./hook";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -25,17 +25,18 @@ export { createInteractiveBashSessionHook } from "./interactive-bash-session";
|
|
|
25
25
|
export { createThinkingBlockValidatorHook } from "./thinking-block-validator";
|
|
26
26
|
export { createCategorySkillReminderHook } from "./category-skill-reminder";
|
|
27
27
|
export { createRalphLoopHook, type RalphLoopHook } from "./ralph-loop";
|
|
28
|
-
export { createNoSisyphusGptHook } from "./no-sisyphus-gpt";
|
|
29
|
-
export { createNoHephaestusNonGptHook } from "./no-hephaestus-non-gpt";
|
|
30
28
|
export { createAutoSlashCommandHook } from "./auto-slash-command";
|
|
31
29
|
export { createEditErrorRecoveryHook } from "./edit-error-recovery";
|
|
32
30
|
export { createPrometheusMdOnlyHook } from "./prometheus-md-only";
|
|
33
31
|
export { createSisyphusJuniorNotepadHook } from "./sisyphus-junior-notepad";
|
|
32
|
+
export { createNoSisyphusGptHook } from "./no-sisyphus-gpt";
|
|
33
|
+
export { createNoHephaestusNonGptHook } from "./no-hephaestus-non-gpt";
|
|
34
|
+
export { createQuestionLabelTruncatorHook } from "./question-label-truncator";
|
|
34
35
|
export { createTaskResumeInfoHook } from "./task-resume-info";
|
|
36
|
+
export { createRunStateWatchdogHook } from "./run-state-watchdog";
|
|
35
37
|
export { createStartWorkHook } from "./start-work";
|
|
36
38
|
export { createAtlasHook } from "./atlas";
|
|
37
39
|
export { createDelegateTaskRetryHook } from "./delegate-task-retry";
|
|
38
|
-
export { createQuestionLabelTruncatorHook } from "./question-label-truncator";
|
|
39
40
|
export { createStopContinuationGuardHook, type StopContinuationGuard } from "./stop-continuation-guard";
|
|
40
41
|
export { createCompactionContextInjector } from "./compaction-context-injector";
|
|
41
42
|
export { createCompactionTodoPreserverHook } from "./compaction-todo-preserver";
|
|
@@ -47,3 +48,10 @@ export { createWriteExistingFileGuardHook } from "./write-existing-file-guard";
|
|
|
47
48
|
export { createHashlineReadEnhancerHook } from "./hashline-read-enhancer";
|
|
48
49
|
export { createJsonErrorRecoveryHook, JSON_ERROR_TOOL_EXCLUDE_LIST, JSON_ERROR_PATTERNS, JSON_ERROR_REMINDER } from "./json-error-recovery";
|
|
49
50
|
export { createReadImageResizerHook } from "./read-image-resizer";
|
|
51
|
+
export { createExecutionJournalHook } from "./execution-journal";
|
|
52
|
+
export { createSemanticLoopGuardHook } from "./semantic-loop-guard";
|
|
53
|
+
export { createRuntimeEnforcementHook } from "./runtime-enforcement";
|
|
54
|
+
export { createPlanEnforcementHook } from "./plan-enforcement";
|
|
55
|
+
export { createToolContractHook } from "./tool-contract";
|
|
56
|
+
export { createEditSafeguardHook } from "./edit-safeguard/hook";
|
|
57
|
+
export { createXaiUsagePatchHook } from "./xai-usage-patch/hook";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -3,6 +3,7 @@ export declare const INLINE_CODE_PATTERN: RegExp;
|
|
|
3
3
|
export { isPlannerAgent, getUltraworkMessage } from "./ultrawork";
|
|
4
4
|
export { SEARCH_PATTERN, SEARCH_MESSAGE } from "./search";
|
|
5
5
|
export { ANALYZE_PATTERN, ANALYZE_MESSAGE } from "./analyze";
|
|
6
|
+
export { ISSUE_PATTERN, ISSUE_MESSAGE } from "./issue";
|
|
6
7
|
export type KeywordDetector = {
|
|
7
8
|
pattern: RegExp;
|
|
8
9
|
message: string | ((agentName?: string, modelID?: string) => string);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare const ISSUE_PATTERN: RegExp;
|
|
2
|
+
export declare const ISSUE_MESSAGE = "Strict Issue Resolution Workflow activated. I must reproduce the issue, capture the error signature, apply a fix, and run post-fix verification. I will use the `report_issue_verification` tool to track my progress and provide proof of reproducibility and resolution before concluding.";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { PluginInput } from "@opencode-ai/plugin";
|
|
2
|
+
/**
|
|
3
|
+
* Custom error for Plan Compiler Guard rejections
|
|
4
|
+
*/
|
|
5
|
+
export declare class PlanCompilerGuardError extends Error {
|
|
6
|
+
readonly activeStepId: string;
|
|
7
|
+
readonly activeStepAction: string;
|
|
8
|
+
readonly requestedTool: string;
|
|
9
|
+
readonly allowedTools: string[];
|
|
10
|
+
readonly reason: string;
|
|
11
|
+
constructor(message: string, activeStepId: string, activeStepAction: string, requestedTool: string, allowedTools: string[], reason: string);
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Plan Enforcement Guard
|
|
15
|
+
*
|
|
16
|
+
* If the Plan Compiler has an active DAG step, the agent is strictly forbidden
|
|
17
|
+
* from taking actions that deviate from the current step's intent.
|
|
18
|
+
*
|
|
19
|
+
* Essential tools for execution are always allowed regardless of the step.
|
|
20
|
+
*/
|
|
21
|
+
export declare function createPlanEnforcementHook(_ctx: PluginInput): {
|
|
22
|
+
"tool.execute.before": (input: {
|
|
23
|
+
tool: string;
|
|
24
|
+
sessionID: string;
|
|
25
|
+
callID: string;
|
|
26
|
+
}, _output: {
|
|
27
|
+
args: any;
|
|
28
|
+
}) => Promise<void>;
|
|
29
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./hook";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { PluginInput } from "@opencode-ai/plugin";
|
|
2
|
+
import type { RalphLoopState } from "./types";
|
|
3
|
+
type LoopStateController = {
|
|
4
|
+
clear: () => boolean;
|
|
5
|
+
markVerificationPending: (sessionID: string) => RalphLoopState | null;
|
|
6
|
+
};
|
|
7
|
+
export declare function handleDetectedCompletion(ctx: PluginInput, input: {
|
|
8
|
+
sessionID: string;
|
|
9
|
+
state: RalphLoopState;
|
|
10
|
+
loopState: LoopStateController;
|
|
11
|
+
directory: string;
|
|
12
|
+
apiTimeoutMs: number;
|
|
13
|
+
}): Promise<void>;
|
|
14
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { PluginInput } from "@opencode-ai/plugin";
|
|
2
|
-
export declare function detectCompletionInTranscript(transcriptPath: string | undefined, promise: string): boolean;
|
|
2
|
+
export declare function detectCompletionInTranscript(transcriptPath: string | undefined, promise: string, startedAt?: string): boolean;
|
|
3
3
|
export declare function detectCompletionInSessionMessages(ctx: PluginInput, options: {
|
|
4
4
|
sessionID: string;
|
|
5
5
|
promise: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -3,3 +3,4 @@ export declare const DEFAULT_STATE_FILE = ".sisyphus/ralph-loop.local.md";
|
|
|
3
3
|
export declare const COMPLETION_TAG_PATTERN: RegExp;
|
|
4
4
|
export declare const DEFAULT_MAX_ITERATIONS = 100;
|
|
5
5
|
export declare const DEFAULT_COMPLETION_PROMISE = "DONE";
|
|
6
|
+
export declare const ULTRAWORK_VERIFICATION_PROMISE = "VERIFIED";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -17,4 +17,6 @@ export declare function createLoopStateController(options: {
|
|
|
17
17
|
incrementIteration(): RalphLoopState | null;
|
|
18
18
|
setSessionID(sessionID: string): RalphLoopState | null;
|
|
19
19
|
setMessageCountAtStart(sessionID: string, messageCountAtStart: number): RalphLoopState | null;
|
|
20
|
+
markVerificationPending(sessionID: string): RalphLoopState | null;
|
|
21
|
+
setVerificationSessionID(sessionID: string, verificationSessionID: string): RalphLoopState | null;
|
|
20
22
|
};
|
|
@@ -10,6 +10,8 @@ type LoopStateController = {
|
|
|
10
10
|
clear: () => boolean;
|
|
11
11
|
incrementIteration: () => RalphLoopState | null;
|
|
12
12
|
setSessionID: (sessionID: string) => RalphLoopState | null;
|
|
13
|
+
markVerificationPending: (sessionID: string) => RalphLoopState | null;
|
|
14
|
+
setVerificationSessionID: (sessionID: string, verificationSessionID: string) => RalphLoopState | null;
|
|
13
15
|
};
|
|
14
16
|
type RalphLoopEventHandlerOptions = {
|
|
15
17
|
directory: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { RalphLoopState } from "./types";
|
|
2
|
+
type LoopStateController = {
|
|
3
|
+
getState: () => RalphLoopState | null;
|
|
4
|
+
clear: () => boolean;
|
|
5
|
+
};
|
|
6
|
+
type SessionRecovery = {
|
|
7
|
+
clear: (sessionID: string) => void;
|
|
8
|
+
markRecovering: (sessionID: string) => void;
|
|
9
|
+
};
|
|
10
|
+
export declare function handleDeletedLoopSession(props: Record<string, unknown> | undefined, loopState: LoopStateController, sessionRecovery: SessionRecovery): boolean;
|
|
11
|
+
export declare function handleErroredLoopSession(props: Record<string, unknown> | undefined, loopState: LoopStateController, sessionRecovery: SessionRecovery): boolean;
|
|
12
|
+
export {};
|
|
@@ -2,13 +2,17 @@ import type { RalphLoopConfig } from "../../config";
|
|
|
2
2
|
export interface RalphLoopState {
|
|
3
3
|
active: boolean;
|
|
4
4
|
iteration: number;
|
|
5
|
-
max_iterations
|
|
5
|
+
max_iterations?: number;
|
|
6
6
|
message_count_at_start?: number;
|
|
7
7
|
completion_promise: string;
|
|
8
|
+
initial_completion_promise?: string;
|
|
9
|
+
verification_attempt_id?: string;
|
|
10
|
+
verification_session_id?: string;
|
|
8
11
|
started_at: string;
|
|
9
12
|
prompt: string;
|
|
10
13
|
session_id?: string;
|
|
11
14
|
ultrawork?: boolean;
|
|
15
|
+
verification_pending?: boolean;
|
|
12
16
|
strategy?: "reset" | "continue";
|
|
13
17
|
}
|
|
14
18
|
export interface RalphLoopOptions {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { RunStateWatchdogManager } from "../../features/run-state-watchdog";
|
|
2
|
+
export declare function createRunStateWatchdogHook(manager: RunStateWatchdogManager): {
|
|
3
|
+
event: (input: any) => Promise<void>;
|
|
4
|
+
"tool.execute.before": (input: any) => Promise<void>;
|
|
5
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./hook";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { PluginInput } from "@opencode-ai/plugin";
|
|
2
|
+
import type { Message, Part } from "@opencode-ai/sdk";
|
|
3
|
+
export declare function createRuntimeEnforcementHook(_ctx: PluginInput): {
|
|
4
|
+
"experimental.chat.messages.transform": (_input: any, output: {
|
|
5
|
+
messages: {
|
|
6
|
+
info: Message;
|
|
7
|
+
parts: Part[];
|
|
8
|
+
}[];
|
|
9
|
+
}) => Promise<void>;
|
|
10
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./hook";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { PluginInput } from "@opencode-ai/plugin";
|
|
2
|
+
export declare function createSemanticLoopGuardHook(_ctx: PluginInput): {
|
|
3
|
+
"tool.execute.before": (input: {
|
|
4
|
+
tool: string;
|
|
5
|
+
sessionID: string;
|
|
6
|
+
callID: string;
|
|
7
|
+
}, output: {
|
|
8
|
+
args: any;
|
|
9
|
+
}) => Promise<void>;
|
|
10
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./hook";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { PluginInput } from "@opencode-ai/plugin";
|
|
2
|
+
/**
|
|
3
|
+
* Strict Tool Contract Enforcement
|
|
4
|
+
*
|
|
5
|
+
* Intercepts tool execution outputs and strictly enforces the ToolResult contract.
|
|
6
|
+
* If a tool claims success = false, or if it claims a state change occurred but
|
|
7
|
+
* the contract is violated, we throw an error.
|
|
8
|
+
*/
|
|
9
|
+
export declare function createToolContractHook(_ctx: PluginInput): {
|
|
10
|
+
"tool.execute.after": (input: {
|
|
11
|
+
tool: string;
|
|
12
|
+
sessionID: string;
|
|
13
|
+
callID: string;
|
|
14
|
+
}, output: {
|
|
15
|
+
title: string;
|
|
16
|
+
output: string;
|
|
17
|
+
metadata: any;
|
|
18
|
+
}) => Promise<void>;
|
|
19
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./hook";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* xAI Usage Patch Hook
|
|
3
|
+
*
|
|
4
|
+
* This hook fixes a bug where Input Tokens and Total Cost are displayed as negative
|
|
5
|
+
* values for xAI/Grok models in the dashboard.
|
|
6
|
+
*
|
|
7
|
+
* The issue stems from the dashboard UI (pre-compiled) incorrectly subtracting
|
|
8
|
+
* cache_read tokens from the already-net 'input_tokens' returned by xAI.
|
|
9
|
+
*
|
|
10
|
+
* This hook corrects the data by adding back the cache_read tokens to the input field,
|
|
11
|
+
* so the final displayed value (tokens.input - tokens.cache.read) is correct.
|
|
12
|
+
*/
|
|
13
|
+
export declare function createXaiUsagePatchHook(): {
|
|
14
|
+
event: ({ event }: {
|
|
15
|
+
event: {
|
|
16
|
+
type: string;
|
|
17
|
+
properties?: unknown;
|
|
18
|
+
};
|
|
19
|
+
}) => Promise<void>;
|
|
20
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|