@bohuyeshan/openagent-labforge-core 3.11.5 → 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.ja.md +130 -343
- package/README.ko.md +128 -337
- package/README.md +229 -584
- package/README.ru.md +131 -364
- package/README.zh-cn.md +231 -547
- package/bin/openagent-labforge.js +95 -9
- package/bin/platform.test.ts +20 -21
- package/dist/agents/article-writer.d.ts +7 -0
- 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/bio-methodologist.d.ts +1 -1
- package/dist/agents/bio-orchestrator.d.ts +7 -0
- package/dist/agents/bio-skill-guidance.d.ts +1 -0
- package/dist/agents/builtin-agents/general-agents.d.ts +0 -1
- package/dist/agents/builtin-agents/sisyphus-agent.d.ts +16 -0
- package/dist/agents/dynamic-agent-prompt-builder.d.ts +0 -2
- package/dist/agents/engineering-capability.d.ts +7 -0
- package/dist/agents/env-context.d.ts +1 -1
- package/dist/agents/github-scout.d.ts +7 -0
- package/dist/agents/index.d.ts +0 -1
- package/dist/agents/metis.d.ts +1 -1
- package/dist/agents/momus.d.ts +1 -1
- package/dist/agents/prometheus/behavioral-summary.d.ts +1 -1
- package/dist/agents/prometheus/gemini.d.ts +1 -1
- package/dist/agents/prometheus/gpt.d.ts +1 -1
- package/dist/agents/prometheus/interview-mode.d.ts +1 -1
- package/dist/agents/prometheus/plan-generation.d.ts +1 -1
- package/dist/agents/prometheus/plan-template.d.ts +1 -1
- package/dist/agents/prometheus/system-prompt.d.ts +1 -1
- package/dist/agents/scientific-writer.d.ts +7 -0
- package/dist/agents/sisyphus-junior/gpt-5-3-codex.d.ts +1 -1
- package/dist/agents/sisyphus-junior/gpt-5-4.d.ts +1 -1
- package/dist/agents/sisyphus-junior/gpt.d.ts +1 -1
- package/dist/agents/tech-scout.d.ts +7 -0
- package/dist/agents/types.d.ts +1 -1
- package/dist/agents/wase.d.ts +8 -0
- package/dist/agents/wet-lab-designer.d.ts +7 -0
- package/dist/agents/writing-style-rules.d.ts +1 -0
- package/dist/cli/config-manager/bun-install.d.ts +1 -6
- package/dist/cli/config-manager/cleanup-managed-mcp-from-opencode-config.d.ts +2 -0
- package/dist/cli/config-manager/cleanup-stale-managed-agents.d.ts +2 -0
- package/dist/cli/config-manager/parse-opencode-config-file.d.ts +2 -0
- package/dist/cli/config-manager/plugin-name-with-version.d.ts +1 -1
- package/dist/cli/config-manager/sync-static-agent-to-opencode-config.d.ts +2 -0
- package/dist/cli/config-manager/sync-static-mcp-to-opencode-config.d.ts +2 -0
- package/dist/cli/config-manager/write-bootstrap-skill.d.ts +15 -0
- package/dist/cli/config-manager.d.ts +5 -0
- package/dist/cli/index.js +24986 -15362
- package/dist/cli/install-validators.d.ts +0 -1
- package/dist/cli/model-fallback-types.d.ts +0 -1
- package/dist/cli/run/index.d.ts +0 -1
- package/dist/cli/run/types.d.ts +0 -1
- package/dist/cli/types.d.ts +0 -3
- package/dist/config/schema/agent-names.d.ts +36 -3
- package/dist/config/schema/agent-overrides.d.ts +504 -0
- package/dist/config/schema/background-task.d.ts +0 -2
- package/dist/config/schema/experimental.d.ts +5 -0
- package/dist/config/schema/git-master.d.ts +0 -1
- package/dist/config/schema/hooks.d.ts +0 -2
- package/dist/config/schema/mcp-policy.d.ts +1 -0
- package/dist/config/schema/oh-my-opencode-config.d.ts +526 -54
- package/dist/config/schema.d.ts +0 -1
- package/dist/create-hooks.d.ts +0 -13
- package/dist/features/background-agent/compaction-aware-message-resolver.d.ts +1 -16
- package/dist/features/background-agent/constants.d.ts +2 -1
- package/dist/features/background-agent/manager.d.ts +5 -20
- package/dist/features/background-agent/process-cleanup.d.ts +1 -1
- package/dist/features/background-agent/task-history.d.ts +0 -1
- package/dist/features/background-agent/task-poller.d.ts +0 -1
- package/dist/features/background-agent/types.d.ts +0 -4
- package/dist/features/builtin-commands/commands.d.ts +4 -1
- package/dist/features/builtin-skills/skills/bio-methods.d.ts +2 -0
- package/dist/features/builtin-skills/skills/bio-pipeline.d.ts +2 -0
- package/dist/features/builtin-skills/skills/bio-tools.d.ts +2 -0
- package/dist/features/builtin-skills/skills/bio-visualization.d.ts +2 -0
- package/dist/features/builtin-skills/skills/cell-annotation.d.ts +2 -0
- package/dist/features/builtin-skills/skills/differential-expression.d.ts +2 -0
- package/dist/features/builtin-skills/skills/geo-query.d.ts +2 -0
- package/dist/features/builtin-skills/skills/index.d.ts +14 -0
- package/dist/features/builtin-skills/skills/paper-evidence.d.ts +2 -0
- package/dist/features/builtin-skills/skills/pubmed-search.d.ts +2 -0
- package/dist/features/builtin-skills/skills/scrna-preprocessing.d.ts +2 -0
- package/dist/features/builtin-skills/skills/sequence-analysis.d.ts +2 -0
- package/dist/features/builtin-skills/skills/structural-biology.d.ts +2 -0
- package/dist/features/builtin-skills/skills/vector-design.d.ts +2 -0
- package/dist/features/builtin-skills/skills/wet-lab-design.d.ts +2 -0
- package/dist/features/claude-code-agent-loader/loader.d.ts +3 -3
- package/dist/features/claude-code-agent-loader/types.d.ts +1 -8
- package/dist/features/claude-code-mcp-loader/configure-allowed-env-vars.d.ts +5 -0
- package/dist/features/claude-code-mcp-loader/index.d.ts +1 -0
- package/dist/features/claude-code-mcp-loader/types.d.ts +3 -0
- package/dist/features/claude-code-plugin-loader/agent-loader.d.ts +2 -2
- package/dist/features/claude-code-plugin-loader/loader.d.ts +2 -2
- package/dist/features/claude-code-plugin-loader/types.d.ts +1 -1
- package/dist/features/claude-code-session-state/state.d.ts +5 -0
- package/dist/features/opencode-skill-loader/git-master-template-injection.d.ts +1 -1
- package/dist/features/opencode-skill-loader/project-skill-directory-discovery.d.ts +1 -0
- package/dist/features/opencode-skill-loader/skill-metadata-validator.d.ts +8 -0
- package/dist/features/skill-mcp-manager/types.d.ts +0 -4
- package/dist/features/tmux-subagent/index.d.ts +0 -1
- package/dist/features/tmux-subagent/manager.d.ts +0 -5
- package/dist/features/tmux-subagent/types.d.ts +0 -2
- package/dist/hooks/atlas/tool-execute-after.d.ts +0 -2
- package/dist/hooks/atlas/types.d.ts +0 -2
- package/dist/hooks/atlas/verification-reminders.d.ts +0 -4
- package/dist/hooks/auto-slash-command/hook.d.ts +0 -7
- package/dist/hooks/auto-update-checker/checker.d.ts +1 -3
- package/dist/hooks/auto-update-checker/constants.d.ts +2 -2
- package/dist/hooks/comment-checker/downloader.d.ts +1 -1
- package/dist/hooks/compaction-context-injector/hook.d.ts +1 -5
- package/dist/hooks/context-window-monitor.d.ts +5 -2
- package/dist/hooks/index.d.ts +0 -2
- package/dist/hooks/keyword-detector/detector.d.ts +1 -1
- package/dist/hooks/keyword-detector/hook.d.ts +2 -2
- package/dist/hooks/keyword-detector/index.d.ts +1 -0
- package/dist/hooks/keyword-detector/semantic-hint.d.ts +4 -0
- package/dist/hooks/keyword-detector/ultrawork/autonomous.d.ts +8 -0
- package/dist/hooks/preemptive-compaction.d.ts +5 -2
- package/dist/hooks/runtime-fallback/hook.d.ts +3 -2
- package/dist/hooks/runtime-fallback/message-update-handler.d.ts +2 -1
- package/dist/hooks/runtime-fallback/types.d.ts +3 -56
- package/dist/hooks/session-notification-scheduler.d.ts +3 -5
- package/dist/hooks/session-notification.d.ts +0 -2
- package/dist/hooks/session-recovery/tool-pairing.d.ts +16 -0
- package/dist/hooks/start-work/index.d.ts +1 -1
- package/dist/hooks/start-work/worktree-detector.d.ts +0 -7
- package/dist/hooks/todo-continuation-enforcer/compaction-guard.d.ts +4 -0
- package/dist/hooks/todo-continuation-enforcer/constants.d.ts +6 -5
- package/dist/hooks/todo-continuation-enforcer/handler.d.ts +0 -1
- package/dist/hooks/todo-continuation-enforcer/idle-event.d.ts +0 -1
- package/dist/hooks/todo-continuation-enforcer/resolve-message-info.d.ts +3 -0
- package/dist/hooks/todo-continuation-enforcer/session-state.d.ts +1 -1
- package/dist/hooks/todo-continuation-enforcer/types.d.ts +8 -3
- package/dist/hooks/tool-output-truncator.d.ts +0 -1
- package/dist/index.js +56627 -56933
- package/dist/mcp/extended.d.ts +4 -2
- package/dist/mcp/index.d.ts +2 -1
- package/dist/mcp/types.d.ts +2 -3
- package/dist/openagent-labforge.schema.json +1362 -83
- package/dist/plugin/hooks/create-continuation-hooks.d.ts +1 -2
- package/dist/plugin/hooks/create-core-hooks.d.ts +0 -1
- package/dist/plugin/hooks/create-session-hooks.d.ts +1 -2
- package/dist/plugin/ultrawork-model-override.d.ts +11 -1
- package/dist/plugin-dispose.d.ts +12 -10
- package/dist/plugin-handlers/agent-config-handler.d.ts +0 -1
- package/dist/plugin-handlers/prometheus-agent-config-builder.d.ts +1 -1
- package/dist/plugin-state.d.ts +0 -5
- package/dist/shared/agent-display-names.d.ts +1 -0
- package/dist/shared/data-path.d.ts +1 -1
- package/dist/shared/dynamic-truncator.d.ts +7 -4
- package/dist/shared/external-plugin-detector.d.ts +7 -0
- package/dist/shared/index.d.ts +5 -3
- package/dist/shared/jsonc-parser.d.ts +4 -0
- package/dist/shared/mcp-local-command-normalizer.d.ts +1 -0
- package/dist/shared/migrate-legacy-config-file.d.ts +1 -0
- package/dist/shared/model-error-classifier.d.ts +1 -2
- package/dist/shared/opencode-command-dirs.d.ts +0 -1
- package/dist/shared/plugin-identity.d.ts +2 -3
- package/dist/shared/project-discovery-dirs.d.ts +4 -0
- package/dist/shared/session-model-state.d.ts +1 -2
- package/dist/shared/system-directive.d.ts +5 -6
- package/dist/tools/call-omo-agent/background-executor.d.ts +1 -2
- package/dist/tools/call-omo-agent/constants.d.ts +2 -2
- package/dist/tools/call-omo-agent/sync-executor.d.ts +3 -11
- package/dist/tools/call-omo-agent/tools.d.ts +2 -2
- package/dist/tools/call-omo-agent/types.d.ts +13 -0
- package/dist/tools/delegate-task/constants.d.ts +1 -1
- package/dist/tools/delegate-task/model-selection.d.ts +0 -1
- package/dist/tools/delegate-task/model-string-parser.d.ts +3 -1
- package/dist/tools/delegate-task/parent-context-resolver.d.ts +22 -0
- package/dist/tools/lsp/constants.d.ts +0 -1
- package/dist/tools/lsp/lsp-client-transport.d.ts +2 -4
- package/dist/tools/lsp/lsp-client-wrapper.d.ts +1 -2
- package/generated/skills-bundles/catalog.json +1 -1
- package/generated/skills-bundles/full/skills/data-analysis/experiment-monitoring/auto-claude__monitor-experiment/SKILL.md +56 -55
- package/generated/skills-bundles/full/skills/data-analysis/experiment-ops/auto-claude__run-experiment/SKILL.md +105 -104
- package/generated/skills-bundles/full/skills/data-analysis/optimization/auto-claude__dse-loop/SKILL.md +272 -271
- package/generated/skills-bundles/full/skills/data-analysis/statistics/auto-claude__analyze-results/SKILL.md +40 -39
- package/generated/skills-bundles/full/skills/data-analysis/visualization/auto-claude__paper-figure/SKILL.md +274 -273
- package/generated/skills-bundles/full/skills/productivity/visual-design/auto-claude__pixel-art/SKILL.md +131 -130
- package/generated/skills-bundles/full/skills/research/document-authoring/auto-claude__paper-compile/SKILL.md +245 -244
- package/generated/skills-bundles/full/skills/research/document-authoring/auto-claude__paper-plan/SKILL.md +247 -246
- package/generated/skills-bundles/full/skills/research/document-authoring/auto-claude__paper-write/SKILL.md +303 -302
- package/generated/skills-bundles/full/skills/research/document-authoring/auto-claude__paper-write/templates/iclr2026.tex +84 -84
- package/generated/skills-bundles/full/skills/research/document-authoring/auto-claude__paper-write/templates/icml2025.tex +87 -87
- package/generated/skills-bundles/full/skills/research/document-authoring/auto-claude__paper-write/templates/math_commands.tex +48 -48
- package/generated/skills-bundles/full/skills/research/document-authoring/auto-claude__paper-write/templates/neurips2025.tex +80 -80
- package/generated/skills-bundles/full/skills/research/document-authoring/auto-claude__paper-writing/SKILL.md +31 -31
- package/generated/skills-bundles/full/skills/research/literature-and-web-search/auto-claude__arxiv/SKILL.md +126 -125
- package/generated/skills-bundles/full/skills/research/literature-and-web-search/auto-claude__novelty-check/SKILL.md +80 -79
- package/generated/skills-bundles/full/skills/research/literature-and-web-search/auto-claude__research-lit/SKILL.md +187 -186
- package/generated/skills-bundles/full/skills/research/research-ideation/auto-claude__idea-creator/SKILL.md +11 -11
- package/generated/skills-bundles/full/skills/research/research-ideation/auto-claude__idea-discovery/SKILL.md +18 -18
- package/generated/skills-bundles/full/skills/research/research-ideation/auto-claude__idea-discovery-robot/SKILL.md +20 -20
- package/generated/skills-bundles/full/skills/research/research-ideation/auto-claude__research-pipeline/SKILL.md +15 -15
- package/generated/skills-bundles/full/skills/research/theory-writing/auto-claude__proof-writer/SKILL.md +217 -216
- package/generated/skills-bundles/paper/skills/data-analysis/experiment-monitoring/auto-claude__monitor-experiment/SKILL.md +56 -55
- package/generated/skills-bundles/paper/skills/data-analysis/experiment-ops/auto-claude__run-experiment/SKILL.md +105 -104
- package/generated/skills-bundles/paper/skills/data-analysis/optimization/auto-claude__dse-loop/SKILL.md +272 -271
- package/generated/skills-bundles/paper/skills/data-analysis/statistics/auto-claude__analyze-results/SKILL.md +40 -39
- package/generated/skills-bundles/paper/skills/data-analysis/visualization/auto-claude__paper-figure/SKILL.md +274 -273
- package/generated/skills-bundles/paper/skills/productivity/visual-design/auto-claude__pixel-art/SKILL.md +131 -130
- package/generated/skills-bundles/paper/skills/research/document-authoring/auto-claude__paper-compile/SKILL.md +245 -244
- package/generated/skills-bundles/paper/skills/research/document-authoring/auto-claude__paper-plan/SKILL.md +247 -246
- package/generated/skills-bundles/paper/skills/research/document-authoring/auto-claude__paper-write/SKILL.md +303 -302
- package/generated/skills-bundles/paper/skills/research/document-authoring/auto-claude__paper-write/templates/iclr2026.tex +84 -84
- package/generated/skills-bundles/paper/skills/research/document-authoring/auto-claude__paper-write/templates/icml2025.tex +87 -87
- package/generated/skills-bundles/paper/skills/research/document-authoring/auto-claude__paper-write/templates/math_commands.tex +48 -48
- package/generated/skills-bundles/paper/skills/research/document-authoring/auto-claude__paper-write/templates/neurips2025.tex +80 -80
- package/generated/skills-bundles/paper/skills/research/document-authoring/auto-claude__paper-writing/SKILL.md +31 -31
- package/generated/skills-bundles/paper/skills/research/literature-and-web-search/auto-claude__arxiv/SKILL.md +126 -125
- package/generated/skills-bundles/paper/skills/research/literature-and-web-search/auto-claude__novelty-check/SKILL.md +80 -79
- package/generated/skills-bundles/paper/skills/research/literature-and-web-search/auto-claude__research-lit/SKILL.md +187 -186
- package/generated/skills-bundles/paper/skills/research/research-ideation/auto-claude__idea-creator/SKILL.md +11 -11
- package/generated/skills-bundles/paper/skills/research/research-ideation/auto-claude__idea-discovery/SKILL.md +18 -18
- package/generated/skills-bundles/paper/skills/research/research-ideation/auto-claude__idea-discovery-robot/SKILL.md +20 -20
- package/generated/skills-bundles/paper/skills/research/research-ideation/auto-claude__research-pipeline/SKILL.md +15 -15
- package/generated/skills-bundles/paper/skills/research/theory-writing/auto-claude__proof-writer/SKILL.md +217 -216
- package/package.json +36 -32
- package/dist/cli/openai-only-model-catalog.d.ts +0 -3
- package/dist/cli/run/model-resolver.d.ts +0 -4
- package/dist/config/schema/git-env-prefix.d.ts +0 -5
- package/dist/features/background-agent/remove-task-toast-tracking.d.ts +0 -1
- package/dist/features/background-agent/subagent-spawn-limits.d.ts +0 -23
- package/dist/features/claude-code-agent-loader/claude-model-mapper.d.ts +0 -4
- package/dist/features/tmux-subagent/pane-state-parser.d.ts +0 -8
- package/dist/features/tmux-subagent/tracked-session-state.d.ts +0 -8
- package/dist/hooks/atlas/boulder-session-lineage.d.ts +0 -6
- package/dist/hooks/atlas/final-wave-approval-gate.d.ts +0 -4
- package/dist/hooks/atlas/idle-event.d.ts +0 -8
- package/dist/hooks/atlas/resolve-active-boulder-session.d.ts +0 -11
- package/dist/hooks/auto-slash-command/processed-command-store.d.ts +0 -7
- package/dist/hooks/auto-update-checker/checker/sync-package-json.d.ts +0 -7
- package/dist/hooks/compaction-context-injector/compaction-context-prompt.d.ts +0 -1
- package/dist/hooks/compaction-context-injector/constants.d.ts +0 -5
- package/dist/hooks/compaction-context-injector/recovery-prompt-config.d.ts +0 -6
- package/dist/hooks/compaction-context-injector/recovery.d.ts +0 -6
- package/dist/hooks/compaction-context-injector/session-id.d.ts +0 -2
- package/dist/hooks/compaction-context-injector/session-prompt-config-resolver.d.ts +0 -16
- package/dist/hooks/compaction-context-injector/tail-monitor.d.ts +0 -13
- package/dist/hooks/compaction-context-injector/types.d.ts +0 -43
- package/dist/hooks/compaction-context-injector/validated-model.d.ts +0 -13
- package/dist/hooks/delegate-task-english-directive/hook.d.ts +0 -14
- package/dist/hooks/delegate-task-english-directive/index.d.ts +0 -1
- package/dist/hooks/gpt-permission-continuation/assistant-message.d.ts +0 -23
- package/dist/hooks/gpt-permission-continuation/constants.d.ts +0 -4
- package/dist/hooks/gpt-permission-continuation/detector.d.ts +0 -1
- package/dist/hooks/gpt-permission-continuation/handler.d.ts +0 -12
- package/dist/hooks/gpt-permission-continuation/index.d.ts +0 -13
- package/dist/hooks/gpt-permission-continuation/session-state.d.ts +0 -15
- package/dist/hooks/ralph-loop/pending-verification-handler.d.ts +0 -16
- package/dist/hooks/runtime-fallback/fallback-bootstrap-model.d.ts +0 -10
- package/dist/hooks/runtime-fallback/fallback-retry-dispatcher.d.ts +0 -11
- package/dist/hooks/runtime-fallback/last-user-retry-parts.d.ts +0 -4
- package/dist/hooks/runtime-fallback/retry-model-payload.d.ts +0 -7
- package/dist/hooks/runtime-fallback/session-messages.d.ts +0 -9
- package/dist/hooks/runtime-fallback/session-status-handler.d.ts +0 -3
- package/dist/hooks/runtime-fallback/visible-assistant-response.d.ts +0 -3
- package/dist/hooks/session-notification-content.d.ts +0 -30
- package/dist/plugin/normalize-tool-arg-schemas.d.ts +0 -2
- package/dist/plugin/ultrawork-variant-availability.d.ts +0 -6
- package/dist/shared/compaction-agent-config-checkpoint.d.ts +0 -11
- package/dist/shared/context-limit-resolver.d.ts +0 -5
- package/dist/shared/fallback-chain-from-models.d.ts +0 -3
- package/dist/shared/question-denied-session-permission.d.ts +0 -6
- package/dist/shared/retry-status-utils.d.ts +0 -2
- package/dist/shared/vision-capable-models-cache.d.ts +0 -4
- package/dist/tools/delegate-task/cancel-unstable-agent-task.d.ts +0 -2
- package/dist/tools/look-at/multimodal-fallback-chain.d.ts +0 -4
- package/dist/tools/lsp/directory-diagnostics.d.ts +0 -1
- package/dist/tools/lsp/server-path-bases.d.ts +0 -1
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Autonomous ultrawork add-on.
|
|
3
|
+
*
|
|
4
|
+
* This directive upgrades ultrawork into an execution-first mode where the
|
|
5
|
+
* orchestrator keeps iterating without repeatedly asking for confirmation.
|
|
6
|
+
*/
|
|
7
|
+
export declare const AUTONOMOUS_ULTRAWORK_MESSAGE = "[ultrawork-autonomous-mode]\nAUTONOMOUS EXECUTION ENABLED.\n\nExecution policy:\n- Default to ACTION, not permission-seeking.\n- Do NOT ask \"Should I proceed?\" for normal implementation steps.\n- If ambiguity is small, state assumption briefly and continue.\n- Keep iterating until requested outcomes are complete.\n\nOnly ask user when one of these high-risk conditions applies:\n- irreversible/destructive operations (mass delete/reset/history rewrite)\n- security-sensitive operations (secrets, credentials, auth tokens)\n- external side effects requiring explicit consent (force push, publish, paid API spend)\n- conflicts where multiple options have materially different product outcomes\n\nWhen blocked:\n- explore first, delegate specialists, then continue execution.\n- ask user only if blocker remains after exploration/delegation.\n";
|
|
8
|
+
export declare function getAutonomousUltraworkMessage(): string;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import type { OhMyOpenCodeConfig } from "../config";
|
|
2
|
-
|
|
2
|
+
type ModelCacheStateLike = {
|
|
3
|
+
anthropicContext1MEnabled: boolean;
|
|
4
|
+
modelContextLimitsCache?: Map<string, number>;
|
|
5
|
+
};
|
|
3
6
|
type PluginInput = {
|
|
4
7
|
client: {
|
|
5
8
|
session: {
|
|
@@ -12,7 +15,7 @@ type PluginInput = {
|
|
|
12
15
|
};
|
|
13
16
|
directory: string;
|
|
14
17
|
};
|
|
15
|
-
export declare function createPreemptiveCompactionHook(ctx: PluginInput, pluginConfig: OhMyOpenCodeConfig, modelCacheState?:
|
|
18
|
+
export declare function createPreemptiveCompactionHook(ctx: PluginInput, pluginConfig: OhMyOpenCodeConfig, modelCacheState?: ModelCacheStateLike): {
|
|
16
19
|
"tool.execute.after": (input: {
|
|
17
20
|
tool: string;
|
|
18
21
|
sessionID: string;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
1
|
+
import type { PluginInput } from "@opencode-ai/plugin";
|
|
2
|
+
import type { RuntimeFallbackHook, RuntimeFallbackOptions } from "./types";
|
|
3
|
+
export declare function createRuntimeFallbackHook(ctx: PluginInput, options?: RuntimeFallbackOptions): RuntimeFallbackHook;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { HookDeps } from "./types";
|
|
2
2
|
import type { AutoRetryHelpers } from "./auto-retry";
|
|
3
|
-
|
|
3
|
+
import { extractAutoRetrySignal } from "./error-classifier";
|
|
4
|
+
export declare function hasVisibleAssistantResponse(extractAutoRetrySignalFn: typeof extractAutoRetrySignal): (ctx: HookDeps["ctx"], sessionID: string, _info: Record<string, unknown> | undefined) => Promise<boolean>;
|
|
4
5
|
export declare function createMessageUpdateHandler(deps: HookDeps, helpers: AutoRetryHelpers): (props: Record<string, unknown> | undefined) => Promise<void>;
|
|
@@ -1,57 +1,5 @@
|
|
|
1
|
+
import type { PluginInput } from "@opencode-ai/plugin";
|
|
1
2
|
import type { RuntimeFallbackConfig, OhMyOpenCodeConfig } from "../../config";
|
|
2
|
-
export interface RuntimeFallbackInterval {
|
|
3
|
-
unref: () => void;
|
|
4
|
-
}
|
|
5
|
-
export type RuntimeFallbackTimeout = object | number;
|
|
6
|
-
export interface RuntimeFallbackPluginInput {
|
|
7
|
-
client: {
|
|
8
|
-
session: {
|
|
9
|
-
abort: (input: {
|
|
10
|
-
path: {
|
|
11
|
-
id: string;
|
|
12
|
-
};
|
|
13
|
-
}) => Promise<unknown>;
|
|
14
|
-
messages: (input: {
|
|
15
|
-
path: {
|
|
16
|
-
id: string;
|
|
17
|
-
};
|
|
18
|
-
query: {
|
|
19
|
-
directory: string;
|
|
20
|
-
};
|
|
21
|
-
}) => Promise<unknown>;
|
|
22
|
-
promptAsync: (input: {
|
|
23
|
-
path: {
|
|
24
|
-
id: string;
|
|
25
|
-
};
|
|
26
|
-
body: {
|
|
27
|
-
agent?: string;
|
|
28
|
-
model: {
|
|
29
|
-
providerID: string;
|
|
30
|
-
modelID: string;
|
|
31
|
-
};
|
|
32
|
-
parts: Array<{
|
|
33
|
-
type: "text";
|
|
34
|
-
text: string;
|
|
35
|
-
}>;
|
|
36
|
-
};
|
|
37
|
-
query: {
|
|
38
|
-
directory: string;
|
|
39
|
-
};
|
|
40
|
-
}) => Promise<unknown>;
|
|
41
|
-
};
|
|
42
|
-
tui: {
|
|
43
|
-
showToast: (input: {
|
|
44
|
-
body: {
|
|
45
|
-
title: string;
|
|
46
|
-
message: string;
|
|
47
|
-
variant: "success" | "error" | "info" | "warning";
|
|
48
|
-
duration: number;
|
|
49
|
-
};
|
|
50
|
-
}) => Promise<unknown>;
|
|
51
|
-
};
|
|
52
|
-
};
|
|
53
|
-
directory: string;
|
|
54
|
-
}
|
|
55
3
|
export interface FallbackState {
|
|
56
4
|
originalModel: string;
|
|
57
5
|
currentModel: string;
|
|
@@ -101,7 +49,7 @@ export interface RuntimeFallbackHook {
|
|
|
101
49
|
dispose?: () => void;
|
|
102
50
|
}
|
|
103
51
|
export interface HookDeps {
|
|
104
|
-
ctx:
|
|
52
|
+
ctx: PluginInput;
|
|
105
53
|
config: Required<RuntimeFallbackConfig>;
|
|
106
54
|
options: RuntimeFallbackOptions | undefined;
|
|
107
55
|
pluginConfig: OhMyOpenCodeConfig | undefined;
|
|
@@ -109,6 +57,5 @@ export interface HookDeps {
|
|
|
109
57
|
sessionLastAccess: Map<string, number>;
|
|
110
58
|
sessionRetryInFlight: Set<string>;
|
|
111
59
|
sessionAwaitingFallbackResult: Set<string>;
|
|
112
|
-
sessionFallbackTimeouts: Map<string,
|
|
113
|
-
sessionStatusRetryKeys: Map<string, string>;
|
|
60
|
+
sessionFallbackTimeouts: Map<string, ReturnType<typeof setTimeout>>;
|
|
114
61
|
}
|
|
@@ -1,22 +1,20 @@
|
|
|
1
1
|
import type { PluginInput } from "@opencode-ai/plugin";
|
|
2
2
|
import type { Platform } from "./session-notification-sender";
|
|
3
3
|
type SessionNotificationConfig = {
|
|
4
|
-
title
|
|
5
|
-
message
|
|
4
|
+
title: string;
|
|
5
|
+
message: string;
|
|
6
6
|
playSound: boolean;
|
|
7
7
|
soundPath: string;
|
|
8
8
|
idleConfirmationDelay: number;
|
|
9
9
|
skipIfIncompleteTodos: boolean;
|
|
10
10
|
maxTrackedSessions: number;
|
|
11
|
-
/** Grace period in ms to ignore late-arriving activity events after scheduling (default: 100) */
|
|
12
|
-
activityGracePeriodMs?: number;
|
|
13
11
|
};
|
|
14
12
|
export declare function createIdleNotificationScheduler(options: {
|
|
15
13
|
ctx: PluginInput;
|
|
16
14
|
platform: Platform;
|
|
17
15
|
config: SessionNotificationConfig;
|
|
18
16
|
hasIncompleteTodos: (ctx: PluginInput, sessionID: string) => Promise<boolean>;
|
|
19
|
-
send: (ctx: PluginInput, platform: Platform,
|
|
17
|
+
send: (ctx: PluginInput, platform: Platform, title: string, message: string) => Promise<void>;
|
|
20
18
|
playSound: (ctx: PluginInput, platform: Platform, soundPath: string) => Promise<void>;
|
|
21
19
|
}): {
|
|
22
20
|
markSessionActivity: (sessionID: string) => void;
|
|
@@ -8,8 +8,6 @@ interface SessionNotificationConfig {
|
|
|
8
8
|
soundPath?: string;
|
|
9
9
|
/** Delay in ms before sending notification to confirm session is still idle (default: 1500) */
|
|
10
10
|
idleConfirmationDelay?: number;
|
|
11
|
-
/** Ignore activity events within grace period after idle (default: 100) */
|
|
12
|
-
activityGracePeriodMs?: number;
|
|
13
11
|
/** Skip notification if there are incomplete todos (default: true) */
|
|
14
12
|
skipIfIncompleteTodos?: boolean;
|
|
15
13
|
/** Maximum number of sessions to track before cleanup (default: 100) */
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
interface ToolUseLikePart {
|
|
2
|
+
type: "tool_use";
|
|
3
|
+
id: string;
|
|
4
|
+
name?: string;
|
|
5
|
+
}
|
|
6
|
+
interface MessagePartLike {
|
|
7
|
+
type: string;
|
|
8
|
+
id?: string;
|
|
9
|
+
name?: string;
|
|
10
|
+
tool_use_id?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare function collectToolUseParts(parts: MessagePartLike[]): ToolUseLikePart[];
|
|
13
|
+
export declare function collectToolResultUseIds(parts: MessagePartLike[]): Set<string>;
|
|
14
|
+
export declare function collectMissingToolUseIds(parts: MessagePartLike[]): string[];
|
|
15
|
+
export declare function collectMissingToolUses(parts: MessagePartLike[]): ToolUseLikePart[];
|
|
16
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { HOOK_NAME, createStartWorkHook } from "./start-work-hook";
|
|
2
|
-
export { detectWorktreePath
|
|
2
|
+
export { detectWorktreePath } from "./worktree-detector";
|
|
3
3
|
export type { ParsedUserRequest } from "./parse-user-request";
|
|
4
4
|
export { parseUserRequest } from "./parse-user-request";
|
|
@@ -1,8 +1 @@
|
|
|
1
|
-
export type WorktreeEntry = {
|
|
2
|
-
path: string;
|
|
3
|
-
branch: string | undefined;
|
|
4
|
-
bare: boolean;
|
|
5
|
-
};
|
|
6
|
-
export declare function parseWorktreeListPorcelain(output: string): WorktreeEntry[];
|
|
7
|
-
export declare function listWorktrees(directory: string): WorktreeEntry[];
|
|
8
1
|
export declare function detectWorktreePath(directory: string): string | null;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { SessionState } from "./types";
|
|
2
|
+
export declare function armCompactionGuard(state: SessionState, now: number): number;
|
|
3
|
+
export declare function acknowledgeCompactionGuard(state: SessionState, compactionEpoch: number | undefined): boolean;
|
|
4
|
+
export declare function isCompactionGuardActive(state: SessionState, now: number): boolean;
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
export declare const HOOK_NAME = "todo-continuation-enforcer";
|
|
2
2
|
export declare const DEFAULT_SKIP_AGENTS: string[];
|
|
3
|
-
export declare const BACKGROUND_TASK_ACTIVE_WINDOW_MS = 90000;
|
|
4
|
-
export declare const TOOL_INTENT_RECOVERY_COOLDOWN_MS = 15000;
|
|
5
3
|
export declare const CONTINUATION_PROMPT: string;
|
|
6
|
-
export declare const
|
|
7
|
-
export declare const COUNTDOWN_SECONDS =
|
|
4
|
+
export declare const AUTONOMOUS_CONTINUATION_PROMPT: string;
|
|
5
|
+
export declare const COUNTDOWN_SECONDS = 2;
|
|
8
6
|
export declare const TOAST_DURATION_MS = 900;
|
|
9
7
|
export declare const COUNTDOWN_GRACE_PERIOD_MS = 500;
|
|
10
8
|
export declare const ABORT_WINDOW_MS = 3000;
|
|
11
|
-
export declare const
|
|
9
|
+
export declare const COMPACTION_GUARD_MS = 60000;
|
|
10
|
+
export declare const CONTINUATION_COOLDOWN_MS = 30000;
|
|
12
11
|
export declare const MAX_STAGNATION_COUNT = 3;
|
|
13
12
|
export declare const MAX_CONSECUTIVE_FAILURES = 5;
|
|
14
13
|
export declare const FAILURE_RESET_WINDOW_MS: number;
|
|
14
|
+
export declare const AUTONOMOUS_CONTINUATION_COOLDOWN_MS = 5000;
|
|
15
|
+
export declare const AUTONOMOUS_MAX_CONSECUTIVE_FAILURES = 50;
|
|
@@ -7,7 +7,6 @@ export declare function createTodoContinuationHandler(args: {
|
|
|
7
7
|
backgroundManager?: BackgroundManager;
|
|
8
8
|
skipAgents?: string[];
|
|
9
9
|
isContinuationStopped?: (sessionID: string) => boolean;
|
|
10
|
-
shouldSkipContinuation?: (sessionID: string) => boolean;
|
|
11
10
|
}): (input: {
|
|
12
11
|
event: {
|
|
13
12
|
type: string;
|
|
@@ -4,7 +4,7 @@ export interface ContinuationProgressUpdate {
|
|
|
4
4
|
previousStagnationCount: number;
|
|
5
5
|
stagnationCount: number;
|
|
6
6
|
hasProgressed: boolean;
|
|
7
|
-
progressSource: "none" | "todo"
|
|
7
|
+
progressSource: "none" | "todo";
|
|
8
8
|
}
|
|
9
9
|
export interface SessionStateStore {
|
|
10
10
|
getState: (sessionID: string) => SessionState;
|
|
@@ -4,7 +4,6 @@ export interface TodoContinuationEnforcerOptions {
|
|
|
4
4
|
backgroundManager?: BackgroundManager;
|
|
5
5
|
skipAgents?: string[];
|
|
6
6
|
isContinuationStopped?: (sessionID: string) => boolean;
|
|
7
|
-
shouldSkipContinuation?: (sessionID: string) => boolean;
|
|
8
7
|
}
|
|
9
8
|
export interface TodoContinuationEnforcer {
|
|
10
9
|
handler: (input: {
|
|
@@ -16,7 +15,7 @@ export interface TodoContinuationEnforcer {
|
|
|
16
15
|
markRecovering: (sessionID: string) => void;
|
|
17
16
|
markRecoveryComplete: (sessionID: string) => void;
|
|
18
17
|
cancelAllCountdowns: () => void;
|
|
19
|
-
dispose
|
|
18
|
+
dispose?: () => void;
|
|
20
19
|
}
|
|
21
20
|
export interface Todo {
|
|
22
21
|
content: string;
|
|
@@ -29,7 +28,6 @@ export interface SessionState {
|
|
|
29
28
|
countdownInterval?: ReturnType<typeof setInterval>;
|
|
30
29
|
isRecovering?: boolean;
|
|
31
30
|
countdownStartedAt?: number;
|
|
32
|
-
idleStrikeCount?: number;
|
|
33
31
|
abortDetectedAt?: number;
|
|
34
32
|
lastIncompleteCount?: number;
|
|
35
33
|
lastInjectedAt?: number;
|
|
@@ -37,6 +35,9 @@ export interface SessionState {
|
|
|
37
35
|
inFlight?: boolean;
|
|
38
36
|
stagnationCount: number;
|
|
39
37
|
consecutiveFailures: number;
|
|
38
|
+
recentCompactionAt?: number;
|
|
39
|
+
recentCompactionEpoch?: number;
|
|
40
|
+
acknowledgedCompactionEpoch?: number;
|
|
40
41
|
}
|
|
41
42
|
export interface MessageInfo {
|
|
42
43
|
id?: string;
|
|
@@ -62,3 +63,7 @@ export interface ResolvedMessageInfo {
|
|
|
62
63
|
};
|
|
63
64
|
tools?: Record<string, ToolPermission>;
|
|
64
65
|
}
|
|
66
|
+
export interface ResolveLatestMessageInfoResult {
|
|
67
|
+
resolvedInfo?: ResolvedMessageInfo;
|
|
68
|
+
encounteredCompaction: boolean;
|
|
69
|
+
}
|