* fix: background task completion detection and silent notifications - Fix TS2742 by adding explicit ToolDefinition type annotations - Add stability detection (3 consecutive stable polls after 10s minimum) - Remove early continue when sessionStatus is undefined - Add silent notification system via tool.execute.after hook injection - Change task retention from 200ms to 5 minutes for background_output retrieval - Fix formatTaskResult to sort messages by time descending Fixes hanging background tasks that never complete due to missing sessionStatus. * fix: improve background task completion detection and message extraction - Add stability-based completion detection (10s min + 3 stable polls) - Fix message extraction to recognize 'reasoning' parts from thinking models - Switch from promptAsync() to prompt() for proper agent initialization - Remove model parameter from prompt body (use agent's configured model) - Add fire-and-forget prompt pattern for sisyphus_task sync mode - Add silent notification via tool.execute.after hook injection - Fix indentation issues in manager.ts and index.ts Incorporates fixes from: - PR #592: Stability detection mechanism - PR #610: Model parameter passing (partially) - PR #628: Completion detection improvements Known limitation: Thinking models (e.g. claude-*-thinking-*) cause JSON Parse errors in child sessions. Use non-thinking models for background agents until OpenCode core resolves this. * fix: add tool_result handling and pendingByParent tracking for resume/external tasks Addresses code review feedback from PR #638: P1: Add tool_result type to validateSessionHasOutput() to prevent false negatives for tool-only background tasks that would otherwise timeout after 30 minutes despite having valid results. P2: Add pendingByParent tracking to resume() and registerExternalTask() to prevent premature 'ALL COMPLETE' notifications when mixing launched and resumed tasks. * fix: address code review feedback - log messages, model passthrough, sorting, race condition - Fix misleading log messages: 'promptAsync' -> 'prompt (fire-and-forget)' - Restore model passthrough in launch() for Sisyphus category configs - Fix call-omo-agent sorting: use time.created number instead of String(time) - Fix race condition: check promptError inside polling loop, not just after 100ms
33 lines
2.4 KiB
TypeScript
33 lines
2.4 KiB
TypeScript
export { createTodoContinuationEnforcer, type TodoContinuationEnforcer } from "./todo-continuation-enforcer";
|
|
export { createContextWindowMonitorHook } from "./context-window-monitor";
|
|
export { createSessionNotification } from "./session-notification";
|
|
export { createSessionRecoveryHook, type SessionRecoveryHook, type SessionRecoveryOptions } from "./session-recovery";
|
|
export { createCommentCheckerHooks } from "./comment-checker";
|
|
export { createToolOutputTruncatorHook } from "./tool-output-truncator";
|
|
export { createDirectoryAgentsInjectorHook } from "./directory-agents-injector";
|
|
export { createDirectoryReadmeInjectorHook } from "./directory-readme-injector";
|
|
export { createEmptyTaskResponseDetectorHook } from "./empty-task-response-detector";
|
|
export { createAnthropicContextWindowLimitRecoveryHook, type AnthropicContextWindowLimitRecoveryOptions } from "./anthropic-context-window-limit-recovery";
|
|
export { createPreemptiveCompactionHook, type PreemptiveCompactionOptions, type SummarizeContext, type BeforeSummarizeCallback } from "./preemptive-compaction";
|
|
export { createCompactionContextInjector } from "./compaction-context-injector";
|
|
export { createThinkModeHook } from "./think-mode";
|
|
export { createClaudeCodeHooksHook } from "./claude-code-hooks";
|
|
export { createRulesInjectorHook } from "./rules-injector";
|
|
export { createBackgroundNotificationHook } from "./background-notification"
|
|
export { createBackgroundCompactionHook } from "./background-compaction"
|
|
export { createAutoUpdateCheckerHook } from "./auto-update-checker";
|
|
|
|
export { createAgentUsageReminderHook } from "./agent-usage-reminder";
|
|
export { createKeywordDetectorHook } from "./keyword-detector";
|
|
export { createNonInteractiveEnvHook } from "./non-interactive-env";
|
|
export { createInteractiveBashSessionHook } from "./interactive-bash-session";
|
|
export { createEmptyMessageSanitizerHook } from "./empty-message-sanitizer";
|
|
export { createThinkingBlockValidatorHook } from "./thinking-block-validator";
|
|
export { createRalphLoopHook, type RalphLoopHook } from "./ralph-loop";
|
|
export { createAutoSlashCommandHook } from "./auto-slash-command";
|
|
export { createEditErrorRecoveryHook } from "./edit-error-recovery";
|
|
export { createPrometheusMdOnlyHook } from "./prometheus-md-only";
|
|
export { createTaskResumeInfoHook } from "./task-resume-info";
|
|
export { createStartWorkHook } from "./start-work";
|
|
export { createSisyphusOrchestratorHook } from "./sisyphus-orchestrator";
|