opencode-orchestrator 1.3.3 β 1.3.4
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/LICENSE +21 -21
- package/README.md +437 -386
- package/bin/orchestrator-linux-arm64 +0 -0
- package/bin/orchestrator-linux-x64 +0 -0
- package/dist/agents/commander.d.ts +0 -0
- package/dist/agents/definitions.d.ts +0 -0
- package/dist/agents/prompts/01_philosophy/anti_hallucination.d.ts +0 -0
- package/dist/agents/prompts/01_philosophy/core.d.ts +0 -0
- package/dist/agents/prompts/01_philosophy/execution_assurance.d.ts +0 -0
- package/dist/agents/prompts/01_philosophy/index.d.ts +0 -0
- package/dist/agents/prompts/01_philosophy/metadata.d.ts +0 -0
- package/dist/agents/prompts/01_philosophy/modularity.d.ts +0 -0
- package/dist/agents/prompts/02_discovery/agents/discovery_commander.d.ts +0 -0
- package/dist/agents/prompts/02_discovery/agents/discovery_planner.d.ts +0 -0
- package/dist/agents/prompts/02_discovery/agents/index.d.ts +0 -0
- package/dist/agents/prompts/02_discovery/discovery_core.d.ts +0 -0
- package/dist/agents/prompts/02_discovery/discovery_environment.d.ts +0 -0
- package/dist/agents/prompts/02_discovery/discovery_skills.d.ts +0 -0
- package/dist/agents/prompts/02_discovery/discovery_workspace.d.ts +0 -0
- package/dist/agents/prompts/02_discovery/index.d.ts +0 -0
- package/dist/agents/prompts/03_planning/agents/index.d.ts +0 -0
- package/dist/agents/prompts/03_planning/agents/planning_commander.d.ts +0 -0
- package/dist/agents/prompts/03_planning/agents/planning_planner.d.ts +0 -0
- package/dist/agents/prompts/03_planning/agents/planning_reviewer.d.ts +0 -0
- package/dist/agents/prompts/03_planning/index.d.ts +0 -0
- package/dist/agents/prompts/03_planning/planning_core.d.ts +0 -0
- package/dist/agents/prompts/03_planning/planning_decomposition.d.ts +0 -0
- package/dist/agents/prompts/03_planning/planning_file_planning.d.ts +0 -0
- package/dist/agents/prompts/03_planning/planning_parallel.d.ts +0 -0
- package/dist/agents/prompts/03_planning/planning_research.d.ts +0 -0
- package/dist/agents/prompts/03_planning/planning_todo_format.d.ts +0 -0
- package/dist/agents/prompts/03_planning/planning_todo_rules.d.ts +0 -0
- package/dist/agents/prompts/03_planning/planning_todo_sync.d.ts +0 -0
- package/dist/agents/prompts/04_execution/agents/execution_commander.d.ts +0 -0
- package/dist/agents/prompts/04_execution/agents/execution_worker.d.ts +0 -0
- package/dist/agents/prompts/04_execution/agents/index.d.ts +0 -0
- package/dist/agents/prompts/04_execution/execution_core.d.ts +0 -0
- package/dist/agents/prompts/04_execution/execution_delegation.d.ts +0 -0
- package/dist/agents/prompts/04_execution/execution_error_handling.d.ts +0 -0
- package/dist/agents/prompts/04_execution/execution_file_assignment.d.ts +0 -0
- package/dist/agents/prompts/04_execution/execution_hyper_parallel.d.ts +0 -0
- package/dist/agents/prompts/04_execution/execution_isolation.d.ts +0 -0
- package/dist/agents/prompts/04_execution/execution_quality.d.ts +0 -0
- package/dist/agents/prompts/04_execution/execution_strategy.d.ts +0 -0
- package/dist/agents/prompts/04_execution/execution_tdd.d.ts +0 -0
- package/dist/agents/prompts/04_execution/execution_workflow.d.ts +0 -0
- package/dist/agents/prompts/04_execution/index.d.ts +0 -0
- package/dist/agents/prompts/05_verification/agents/index.d.ts +0 -0
- package/dist/agents/prompts/05_verification/agents/verification_commander.d.ts +0 -0
- package/dist/agents/prompts/05_verification/agents/verification_reviewer.d.ts +0 -0
- package/dist/agents/prompts/05_verification/index.d.ts +0 -0
- package/dist/agents/prompts/05_verification/verification_async_monitoring.d.ts +0 -0
- package/dist/agents/prompts/05_verification/verification_build.d.ts +0 -0
- package/dist/agents/prompts/05_verification/verification_core.d.ts +0 -0
- package/dist/agents/prompts/05_verification/verification_evidence.d.ts +0 -0
- package/dist/agents/prompts/05_verification/verification_integration.d.ts +0 -0
- package/dist/agents/prompts/05_verification/verification_strategy.d.ts +0 -0
- package/dist/agents/prompts/05_verification/verification_sync_check.d.ts +0 -0
- package/dist/agents/prompts/05_verification/verification_sync_handling.d.ts +0 -0
- package/dist/agents/prompts/05_verification/verification_test.d.ts +0 -0
- package/dist/agents/prompts/06_mission/agents/index.d.ts +0 -0
- package/dist/agents/prompts/06_mission/agents/mission_commander.d.ts +0 -0
- package/dist/agents/prompts/06_mission/index.d.ts +0 -0
- package/dist/agents/prompts/06_mission/mission_completion_conditions.d.ts +0 -0
- package/dist/agents/prompts/06_mission/mission_core.d.ts +0 -0
- package/dist/agents/prompts/06_mission/mission_lifecycle.d.ts +0 -0
- package/dist/agents/prompts/06_mission/mission_loop_continuation.d.ts +0 -0
- package/dist/agents/prompts/06_mission/mission_recovery.d.ts +0 -0
- package/dist/agents/prompts/06_mission/mission_status_tracking.d.ts +0 -0
- package/dist/agents/prompts/07_agents/commander/commander_forbidden.d.ts +0 -0
- package/dist/agents/prompts/07_agents/commander/commander_identity.d.ts +0 -0
- package/dist/agents/prompts/07_agents/commander/commander_mandate.d.ts +0 -0
- package/dist/agents/prompts/07_agents/commander/commander_required.d.ts +0 -0
- package/dist/agents/prompts/07_agents/commander/commander_role.d.ts +0 -0
- package/dist/agents/prompts/07_agents/commander/index.d.ts +0 -0
- package/dist/agents/prompts/07_agents/planner/index.d.ts +0 -0
- package/dist/agents/prompts/07_agents/planner/planner_forbidden.d.ts +0 -0
- package/dist/agents/prompts/07_agents/planner/planner_identity.d.ts +0 -0
- package/dist/agents/prompts/07_agents/planner/planner_mandate.d.ts +0 -0
- package/dist/agents/prompts/07_agents/planner/planner_required.d.ts +0 -0
- package/dist/agents/prompts/07_agents/reviewer/index.d.ts +0 -0
- package/dist/agents/prompts/07_agents/reviewer/reviewer_forbidden.d.ts +0 -0
- package/dist/agents/prompts/07_agents/reviewer/reviewer_identity.d.ts +0 -0
- package/dist/agents/prompts/07_agents/reviewer/reviewer_mandate.d.ts +0 -0
- package/dist/agents/prompts/07_agents/reviewer/reviewer_required.d.ts +0 -0
- package/dist/agents/prompts/07_agents/worker/index.d.ts +0 -0
- package/dist/agents/prompts/07_agents/worker/worker_forbidden.d.ts +0 -0
- package/dist/agents/prompts/07_agents/worker/worker_identity.d.ts +0 -0
- package/dist/agents/prompts/07_agents/worker/worker_mandate.d.ts +0 -0
- package/dist/agents/prompts/07_agents/worker/worker_required.d.ts +0 -0
- package/dist/agents/prompts/08_tools/agents/index.d.ts +0 -0
- package/dist/agents/prompts/08_tools/agents/tools_reviewer.d.ts +0 -0
- package/dist/agents/prompts/08_tools/agents/tools_worker.d.ts +0 -0
- package/dist/agents/prompts/08_tools/index.d.ts +0 -0
- package/dist/agents/prompts/08_tools/tools_ast.d.ts +0 -0
- package/dist/agents/prompts/08_tools/tools_code_editing.d.ts +0 -0
- package/dist/agents/prompts/08_tools/tools_core.d.ts +0 -0
- package/dist/agents/prompts/08_tools/tools_lsp.d.ts +0 -0
- package/dist/agents/prompts/08_tools/tools_search.d.ts +0 -0
- package/dist/agents/prompts/08_tools/tools_testing.d.ts +0 -0
- package/dist/agents/prompts/index.d.ts +0 -0
- package/dist/agents/subagents/planner.d.ts +0 -0
- package/dist/agents/subagents/reviewer.d.ts +0 -0
- package/dist/agents/subagents/worker.d.ts +0 -0
- package/dist/core/agents/agent-registry.d.ts +0 -0
- package/dist/core/agents/concurrency-config.d.ts +4 -0
- package/dist/core/agents/concurrency-token.d.ts +0 -0
- package/dist/core/agents/concurrency.d.ts +2 -0
- package/dist/core/agents/config.d.ts +0 -0
- package/dist/core/agents/consts/index.d.ts +0 -0
- package/dist/core/agents/consts/task-status.const.d.ts +0 -0
- package/dist/core/agents/format.d.ts +0 -0
- package/dist/core/agents/index.d.ts +0 -0
- package/dist/core/agents/interfaces/index.d.ts +0 -0
- package/dist/core/agents/interfaces/launch-input.interface.d.ts +0 -0
- package/dist/core/agents/interfaces/resume-input.interface.d.ts +0 -0
- package/dist/core/agents/interfaces/session-pool.interface.d.ts +0 -0
- package/dist/core/agents/logger.d.ts +0 -0
- package/dist/core/agents/manager/event-handler.d.ts +0 -0
- package/dist/core/agents/manager/index.d.ts +0 -0
- package/dist/core/agents/manager/task-cleaner.d.ts +0 -0
- package/dist/core/agents/manager/task-launcher.d.ts +0 -0
- package/dist/core/agents/manager/task-poller.d.ts +0 -0
- package/dist/core/agents/manager/task-resumer.d.ts +0 -0
- package/dist/core/agents/manager.d.ts +3 -1
- package/dist/core/agents/persistence/task-wal.d.ts +0 -0
- package/dist/core/agents/session-pool.d.ts +0 -0
- package/dist/core/agents/task-store.d.ts +0 -0
- package/dist/core/agents/types/index.d.ts +0 -0
- package/dist/core/agents/types/parallel-task-status.type.d.ts +0 -0
- package/dist/core/cache/constants.d.ts +0 -0
- package/dist/core/cache/document-cache.d.ts +0 -0
- package/dist/core/cache/index.d.ts +0 -0
- package/dist/core/cache/interfaces/cache-document-entry.d.ts +0 -0
- package/dist/core/cache/interfaces/cache-list-entry.d.ts +0 -0
- package/dist/core/cache/interfaces/cache-metadata.d.ts +0 -0
- package/dist/core/cache/interfaces/cache-stats.d.ts +0 -0
- package/dist/core/cache/interfaces/cached-document.d.ts +0 -0
- package/dist/core/cache/interfaces/index.d.ts +0 -0
- package/dist/core/cache/interfaces.d.ts +0 -0
- package/dist/core/cache/operations.d.ts +0 -0
- package/dist/core/cache/utils.d.ts +0 -0
- package/dist/core/cleanup/cleanup-scheduler.d.ts +0 -0
- package/dist/core/commands/index.d.ts +0 -0
- package/dist/core/commands/interfaces/background-task.d.ts +0 -0
- package/dist/core/commands/interfaces/index.d.ts +0 -0
- package/dist/core/commands/interfaces/run-background-options.d.ts +0 -0
- package/dist/core/commands/manager.d.ts +0 -0
- package/dist/core/commands/types/background-task-status.d.ts +0 -0
- package/dist/core/commands/types/index.d.ts +0 -0
- package/dist/core/config/plugin-options.d.ts +9 -0
- package/dist/core/context/context-window-monitor.d.ts +0 -0
- package/dist/core/context/index.d.ts +0 -0
- package/dist/core/knowledge/context-provider.d.ts +0 -0
- package/dist/core/knowledge/graph-parser.d.ts +0 -0
- package/dist/core/knowledge/hybrid-search.d.ts +0 -0
- package/dist/core/knowledge/index.d.ts +1 -0
- package/dist/core/knowledge/memory-consolidation.d.ts +0 -0
- package/dist/core/knowledge/mission-memory.d.ts +4 -0
- package/dist/core/knowledge/safety-guards.d.ts +0 -0
- package/dist/core/knowledge/scratchpad.d.ts +0 -0
- package/dist/core/knowledge/tag-indexer.d.ts +0 -0
- package/dist/core/loop/circuit-breaker.d.ts +0 -0
- package/dist/core/loop/compaction-guard.d.ts +0 -0
- package/dist/core/loop/formatters.d.ts +0 -0
- package/dist/core/loop/interfaces/index.d.ts +0 -0
- package/dist/core/loop/interfaces/todo-stats.d.ts +0 -0
- package/dist/core/loop/interfaces/todo.d.ts +0 -0
- package/dist/core/loop/interfaces.d.ts +0 -0
- package/dist/core/loop/mission-ledger.d.ts +17 -0
- package/dist/core/loop/mission-loop-handler.d.ts +0 -0
- package/dist/core/loop/mission-loop.d.ts +7 -1
- package/dist/core/loop/mission-runtime-options.d.ts +8 -0
- package/dist/core/loop/parser.d.ts +0 -0
- package/dist/core/loop/progress-tracker.d.ts +0 -0
- package/dist/core/loop/session-state-store.d.ts +0 -0
- package/dist/core/loop/stats.d.ts +0 -0
- package/dist/core/loop/todo-continuation.d.ts +0 -0
- package/dist/core/loop/todo-enforcer.d.ts +0 -0
- package/dist/core/loop/todo-manager.d.ts +0 -0
- package/dist/core/loop/types/index.d.ts +0 -0
- package/dist/core/loop/types/todo-priority.d.ts +0 -0
- package/dist/core/loop/types/todo-status.d.ts +0 -0
- package/dist/core/loop/verification.d.ts +0 -0
- package/dist/core/memory/interfaces.d.ts +0 -0
- package/dist/core/memory/memory-manager.d.ts +0 -0
- package/dist/core/metrics/collector.d.ts +0 -0
- package/dist/core/notification/os-notify/index.d.ts +0 -0
- package/dist/core/notification/os-notify/notifier.d.ts +0 -0
- package/dist/core/notification/os-notify/platform-resolver.d.ts +0 -0
- package/dist/core/notification/os-notify/platform.d.ts +0 -0
- package/dist/core/notification/os-notify/sound-player.d.ts +0 -0
- package/dist/core/notification/os-notify/todo-checker.d.ts +0 -0
- package/dist/core/notification/task-toast-manager.d.ts +0 -0
- package/dist/core/notification/toast-core.d.ts +0 -0
- package/dist/core/notification/toast-sanitizer.d.ts +0 -0
- package/dist/core/notification/toast.d.ts +0 -0
- package/dist/core/orchestrator/index.d.ts +0 -0
- package/dist/core/orchestrator/interfaces/index.d.ts +0 -0
- package/dist/core/orchestrator/interfaces/session-state.d.ts +0 -0
- package/dist/core/orchestrator/session-manager.d.ts +0 -0
- package/dist/core/orchestrator/state.d.ts +0 -0
- package/dist/core/orchestrator/types/index.d.ts +0 -0
- package/dist/core/orchestrator/types/task-status.d.ts +0 -0
- package/dist/core/plugins/interfaces.d.ts +0 -0
- package/dist/core/plugins/plugin-manager.d.ts +0 -0
- package/dist/core/pool/buffer-pool.d.ts +0 -0
- package/dist/core/pool/object-pool.d.ts +0 -0
- package/dist/core/pool/string-pool.d.ts +0 -0
- package/dist/core/pool/task-pool.d.ts +0 -0
- package/dist/core/progress/calculator.d.ts +0 -0
- package/dist/core/progress/formatters.d.ts +0 -0
- package/dist/core/progress/interfaces/index.d.ts +0 -0
- package/dist/core/progress/interfaces/progress-snapshot.d.ts +0 -0
- package/dist/core/progress/interfaces/snapshot-input.d.ts +0 -0
- package/dist/core/progress/interfaces/step-progress.d.ts +0 -0
- package/dist/core/progress/interfaces/task-progress.d.ts +0 -0
- package/dist/core/progress/interfaces/todo-progress.d.ts +0 -0
- package/dist/core/progress/interfaces.d.ts +0 -0
- package/dist/core/progress/progress-notifier.d.ts +0 -0
- package/dist/core/progress/state-broadcaster.d.ts +0 -0
- package/dist/core/progress/store.d.ts +0 -0
- package/dist/core/progress/tracker.d.ts +0 -0
- package/dist/core/queue/async-queue.d.ts +0 -0
- package/dist/core/queue/async-utils.d.ts +0 -0
- package/dist/core/queue/index.d.ts +0 -0
- package/dist/core/queue/work-pool.d.ts +0 -0
- package/dist/core/queue/work-stealing-deque.d.ts +0 -0
- package/dist/core/queue/worker-pool.d.ts +0 -0
- package/dist/core/recovery/auto-recovery.d.ts +0 -0
- package/dist/core/recovery/constants.d.ts +0 -0
- package/dist/core/recovery/handler.d.ts +0 -0
- package/dist/core/recovery/interfaces/error-context.d.ts +0 -0
- package/dist/core/recovery/interfaces/error-pattern.d.ts +0 -0
- package/dist/core/recovery/interfaces/index.d.ts +0 -0
- package/dist/core/recovery/interfaces/recovery-action.d.ts +0 -0
- package/dist/core/recovery/interfaces/recovery-record.d.ts +0 -0
- package/dist/core/recovery/interfaces/recovery-stats.d.ts +0 -0
- package/dist/core/recovery/interfaces.d.ts +0 -0
- package/dist/core/recovery/patterns.d.ts +0 -0
- package/dist/core/recovery/retry.d.ts +0 -0
- package/dist/core/recovery/session-recovery.d.ts +0 -0
- package/dist/core/session/interfaces/context-stats.d.ts +0 -0
- package/dist/core/session/interfaces/index.d.ts +0 -0
- package/dist/core/session/interfaces/shared-context.d.ts +0 -0
- package/dist/core/session/interfaces/shared-decision.d.ts +0 -0
- package/dist/core/session/interfaces/shared-document.d.ts +0 -0
- package/dist/core/session/interfaces/shared-finding.d.ts +0 -0
- package/dist/core/session/interfaces.d.ts +0 -0
- package/dist/core/session/shared-context.d.ts +0 -0
- package/dist/core/session/store.d.ts +0 -0
- package/dist/core/session/summary.d.ts +0 -0
- package/dist/core/sync/todo-parser.d.ts +0 -0
- package/dist/core/sync/todo-sync-service.d.ts +0 -0
- package/dist/core/task/interfaces/index.d.ts +0 -0
- package/dist/core/task/interfaces/task-hierarchy.d.ts +0 -0
- package/dist/core/task/interfaces/task-input.d.ts +0 -0
- package/dist/core/task/interfaces/task-node.d.ts +0 -0
- package/dist/core/task/interfaces/task-progress.d.ts +0 -0
- package/dist/core/task/interfaces.d.ts +0 -0
- package/dist/core/task/parser.d.ts +0 -0
- package/dist/core/task/scheduler.d.ts +0 -0
- package/dist/core/task/store.d.ts +0 -0
- package/dist/core/task/summary.d.ts +0 -0
- package/dist/core/task/task-decomposer.d.ts +0 -0
- package/dist/core/todo/todo-manager.d.ts +0 -0
- package/dist/hooks/compatibility/external-plugin.d.ts +0 -0
- package/dist/hooks/constants.d.ts +0 -0
- package/dist/hooks/custom/agent-ui.d.ts +0 -0
- package/dist/hooks/custom/memory-gate.d.ts +0 -0
- package/dist/hooks/custom/metrics.d.ts +0 -0
- package/dist/hooks/custom/resource-control.d.ts +0 -0
- package/dist/hooks/custom/secret-scanner.d.ts +0 -0
- package/dist/hooks/custom/strict-role-guard.d.ts +0 -0
- package/dist/hooks/custom/user-activity.d.ts +0 -0
- package/dist/hooks/features/mission-loop.d.ts +0 -0
- package/dist/hooks/features/sanity-check.d.ts +0 -0
- package/dist/hooks/index.d.ts +0 -0
- package/dist/hooks/registry.d.ts +0 -0
- package/dist/hooks/types.d.ts +0 -0
- package/dist/index.d.ts +0 -0
- package/dist/index.js +719 -185
- package/dist/plugin-handlers/assistant-done-handler.d.ts +0 -0
- package/dist/plugin-handlers/chat-message-handler.d.ts +0 -0
- package/dist/plugin-handlers/config-handler.d.ts +8 -1
- package/dist/plugin-handlers/event-handler.d.ts +0 -0
- package/dist/plugin-handlers/index.d.ts +0 -0
- package/dist/plugin-handlers/interfaces/assistant-done-context.d.ts +0 -0
- package/dist/plugin-handlers/interfaces/chat-message-context.d.ts +0 -0
- package/dist/plugin-handlers/interfaces/event-handler-context.d.ts +0 -0
- package/dist/plugin-handlers/interfaces/index.d.ts +0 -0
- package/dist/plugin-handlers/interfaces/orchestrator-state.d.ts +0 -0
- package/dist/plugin-handlers/interfaces/session-compacting.d.ts +0 -0
- package/dist/plugin-handlers/interfaces/session-state.d.ts +0 -0
- package/dist/plugin-handlers/interfaces/system-transform.d.ts +0 -0
- package/dist/plugin-handlers/interfaces/tool-execute-context.d.ts +0 -0
- package/dist/plugin-handlers/interfaces/tool-hook.d.ts +0 -0
- package/dist/plugin-handlers/session-compacting-handler.d.ts +0 -0
- package/dist/plugin-handlers/system-transform-handler.d.ts +0 -0
- package/dist/plugin-handlers/tool-execute-handler.d.ts +0 -0
- package/dist/plugin-handlers/tool-execute-pre-handler.d.ts +0 -0
- package/dist/shared/agent/constants/index.d.ts +0 -1
- package/dist/shared/agent/constants/names.d.ts +0 -0
- package/dist/shared/agent/index.d.ts +0 -0
- package/dist/shared/agent/interfaces/agent-definition.d.ts +0 -0
- package/dist/shared/agent/interfaces/concurrency-config.d.ts +0 -0
- package/dist/shared/agent/interfaces/index.d.ts +0 -0
- package/dist/shared/agent/types/agent-name.d.ts +0 -0
- package/dist/shared/agent/types/index.d.ts +0 -0
- package/dist/shared/agent/utils/index.d.ts +0 -0
- package/dist/shared/cache/constants/cache-actions.d.ts +0 -0
- package/dist/shared/cache/constants/cache.d.ts +0 -0
- package/dist/shared/cache/constants/filter-status.d.ts +0 -0
- package/dist/shared/cache/constants/index.d.ts +0 -0
- package/dist/shared/cache/index.d.ts +0 -0
- package/dist/shared/command/index.d.ts +0 -0
- package/dist/shared/command/interfaces/background-task.d.ts +0 -0
- package/dist/shared/command/interfaces/index.d.ts +0 -0
- package/dist/shared/command/interfaces/run-background-options.d.ts +0 -0
- package/dist/shared/command/types/background-task-status.d.ts +0 -0
- package/dist/shared/command/types/index.d.ts +0 -0
- package/dist/shared/constants/security-patterns.d.ts +0 -0
- package/dist/shared/constants/system-messages.d.ts +0 -0
- package/dist/shared/core/constants/cli.d.ts +0 -0
- package/dist/shared/core/constants/id-prefix.d.ts +0 -0
- package/dist/shared/core/constants/index.d.ts +0 -0
- package/dist/shared/core/constants/lifecycle.d.ts +0 -0
- package/dist/shared/core/constants/limits.d.ts +0 -0
- package/dist/shared/core/constants/logging.d.ts +0 -0
- package/dist/shared/core/constants/memory-hooks.d.ts +0 -0
- package/dist/shared/core/constants/memory-limits.d.ts +0 -0
- package/dist/shared/core/constants/paths.d.ts +0 -0
- package/dist/shared/core/constants/phases.d.ts +0 -0
- package/dist/shared/core/constants/status-labels.d.ts +0 -0
- package/dist/shared/core/constants/time.d.ts +0 -0
- package/dist/shared/core/constants/wal-actions.d.ts +0 -0
- package/dist/shared/core/index.d.ts +0 -0
- package/dist/shared/core/poolable.d.ts +0 -0
- package/dist/shared/errors/constants/error-patterns.d.ts +0 -0
- package/dist/shared/errors/constants/error-type.d.ts +0 -0
- package/dist/shared/errors/constants/index.d.ts +0 -0
- package/dist/shared/errors/detection.d.ts +0 -0
- package/dist/shared/errors/index.d.ts +0 -0
- package/dist/shared/errors/retry.d.ts +0 -0
- package/dist/shared/errors/types/error-pattern-type.d.ts +0 -0
- package/dist/shared/errors/types/index.d.ts +0 -0
- package/dist/shared/index.d.ts +0 -0
- package/dist/shared/lifecycle/index.d.ts +0 -0
- package/dist/shared/lifecycle/registration.d.ts +0 -0
- package/dist/shared/lifecycle/shutdown-manager.d.ts +0 -0
- package/dist/shared/loop/constants/index.d.ts +0 -0
- package/dist/shared/loop/constants/labels.d.ts +0 -0
- package/dist/shared/loop/constants/loop.d.ts +0 -0
- package/dist/shared/loop/constants/mission-control.d.ts +0 -0
- package/dist/shared/loop/constants/task-status.d.ts +0 -0
- package/dist/shared/loop/constants/todo-status.d.ts +0 -0
- package/dist/shared/loop/index.d.ts +0 -0
- package/dist/shared/loop/interfaces/index.d.ts +0 -0
- package/dist/shared/loop/interfaces/mission-loop.d.ts +8 -0
- package/dist/shared/loop/interfaces/todo-stats.d.ts +0 -0
- package/dist/shared/loop/interfaces/todo.d.ts +0 -0
- package/dist/shared/loop/types/index.d.ts +0 -0
- package/dist/shared/loop/types/todo-priority.d.ts +0 -0
- package/dist/shared/loop/types/todo-status.d.ts +0 -0
- package/dist/shared/message/constants/index.d.ts +0 -0
- package/dist/shared/message/constants/message-roles.d.ts +0 -0
- package/dist/shared/message/constants/part-types.d.ts +0 -0
- package/dist/shared/message/constants/plugin-hooks.d.ts +0 -0
- package/dist/shared/message/constants/prompts.d.ts +0 -0
- package/dist/shared/message/constants/slash-commands.d.ts +0 -0
- package/dist/shared/message/index.d.ts +0 -0
- package/dist/shared/notification/constants/index.d.ts +0 -0
- package/dist/shared/notification/constants/toast-duration.d.ts +0 -0
- package/dist/shared/notification/constants/toast-variants.d.ts +0 -0
- package/dist/shared/notification/constants/tui.const.d.ts +0 -0
- package/dist/shared/notification/index.d.ts +0 -0
- package/dist/shared/notification/interfaces/index.d.ts +0 -0
- package/dist/shared/notification/interfaces/task-toast.interface.d.ts +0 -0
- package/dist/shared/notification/interfaces/toast-message.d.ts +0 -0
- package/dist/shared/notification/interfaces/toast-options.d.ts +0 -0
- package/dist/shared/notification/os-notify/constants/index.d.ts +0 -0
- package/dist/shared/notification/os-notify/constants/notification-command-keys.d.ts +0 -0
- package/dist/shared/notification/os-notify/constants/notification-commands.d.ts +0 -0
- package/dist/shared/notification/os-notify/constants/notification-defaults.d.ts +0 -0
- package/dist/shared/notification/os-notify/index.d.ts +0 -0
- package/dist/shared/notification/os-notify/interfaces/index.d.ts +0 -0
- package/dist/shared/notification/os-notify/interfaces/notification-config.d.ts +0 -0
- package/dist/shared/notification/os-notify/interfaces/notification-state.d.ts +0 -0
- package/dist/shared/notification/os-notify/types/index.d.ts +0 -0
- package/dist/shared/notification/os-notify/types/notification-commands.d.ts +0 -0
- package/dist/shared/notification/presets/index.d.ts +0 -0
- package/dist/shared/notification/presets/mission.d.ts +0 -0
- package/dist/shared/notification/presets/parallel.d.ts +0 -0
- package/dist/shared/notification/presets/session.d.ts +0 -0
- package/dist/shared/notification/presets/task-lifecycle.d.ts +0 -0
- package/dist/shared/notification/presets/tools.d.ts +0 -0
- package/dist/shared/notification/presets/warnings.d.ts +0 -0
- package/dist/shared/notification/types/index.d.ts +0 -0
- package/dist/shared/notification/types/toast-variant.d.ts +0 -0
- package/dist/shared/os/constants/index.d.ts +0 -0
- package/dist/shared/os/constants/platform.d.ts +0 -0
- package/dist/shared/os/index.d.ts +0 -0
- package/dist/shared/os/types/index.d.ts +0 -0
- package/dist/shared/os/types/platform.d.ts +0 -0
- package/dist/shared/prompt/constants/architecture.d.ts +0 -0
- package/dist/shared/prompt/constants/index.d.ts +0 -0
- package/dist/shared/prompt/constants/mandates.d.ts +0 -0
- package/dist/shared/prompt/constants/philosophy.d.ts +0 -0
- package/dist/shared/prompt/constants/scouts.d.ts +0 -0
- package/dist/shared/prompt/constants/status.d.ts +0 -0
- package/dist/shared/prompt/constants/tags.d.ts +0 -0
- package/dist/shared/prompt/index.d.ts +0 -0
- package/dist/shared/recovery/constants/history.d.ts +0 -0
- package/dist/shared/recovery/constants/index.d.ts +0 -0
- package/dist/shared/recovery/constants/recovery-level.d.ts +0 -0
- package/dist/shared/recovery/constants/recovery.d.ts +0 -0
- package/dist/shared/recovery/index.d.ts +0 -0
- package/dist/shared/recovery/interfaces/error-context.d.ts +0 -0
- package/dist/shared/recovery/interfaces/index.d.ts +0 -0
- package/dist/shared/recovery/interfaces/recovery-record.d.ts +0 -0
- package/dist/shared/recovery/types/index.d.ts +0 -0
- package/dist/shared/recovery/types/recovery-action.d.ts +0 -0
- package/dist/shared/session/constants/events/document-events.d.ts +0 -0
- package/dist/shared/session/constants/events/index.d.ts +0 -0
- package/dist/shared/session/constants/events/message-events.d.ts +0 -0
- package/dist/shared/session/constants/events/mission-events.d.ts +0 -0
- package/dist/shared/session/constants/events/session-events.d.ts +0 -0
- package/dist/shared/session/constants/events/special-events.d.ts +0 -0
- package/dist/shared/session/constants/events/task-events.d.ts +0 -0
- package/dist/shared/session/constants/events/todo-events.d.ts +0 -0
- package/dist/shared/session/constants/index.d.ts +0 -0
- package/dist/shared/session/index.d.ts +0 -0
- package/dist/shared/task/base-task.d.ts +0 -0
- package/dist/shared/task/constants/background-status.d.ts +0 -0
- package/dist/shared/task/constants/background-task.d.ts +0 -0
- package/dist/shared/task/constants/index.d.ts +0 -0
- package/dist/shared/task/constants/metadata-keys.d.ts +0 -0
- package/dist/shared/task/constants/parallel-task.d.ts +0 -0
- package/dist/shared/task/index.d.ts +0 -0
- package/dist/shared/task/interfaces/index.d.ts +0 -0
- package/dist/shared/task/interfaces/launch-input.d.ts +0 -0
- package/dist/shared/task/interfaces/parallel-task.d.ts +0 -0
- package/dist/shared/task/interfaces/resume-input.d.ts +0 -0
- package/dist/shared/task/interfaces/task-progress.d.ts +0 -0
- package/dist/shared/task/types/index.d.ts +0 -0
- package/dist/shared/task/types/parallel-task-status.d.ts +0 -0
- package/dist/shared/tool/constants/common/index.d.ts +0 -0
- package/dist/shared/tool/constants/common/labels.d.ts +0 -0
- package/dist/shared/tool/constants/common/languages.d.ts +0 -0
- package/dist/shared/tool/constants/common/output-labels.d.ts +0 -0
- package/dist/shared/tool/constants/common/sources.d.ts +0 -0
- package/dist/shared/tool/constants/index.d.ts +0 -0
- package/dist/shared/tool/constants/lsp/index.d.ts +0 -0
- package/dist/shared/tool/constants/lsp/lsp-severity-labels.d.ts +0 -0
- package/dist/shared/tool/constants/lsp/lsp-severity.d.ts +0 -0
- package/dist/shared/tool/constants/parallel/index.d.ts +0 -0
- package/dist/shared/tool/constants/parallel/logging.d.ts +0 -0
- package/dist/shared/tool/constants/parallel/parameters.d.ts +0 -0
- package/dist/shared/tool/constants/tool-names.d.ts +0 -0
- package/dist/shared/tool/constants/tool-output.d.ts +0 -0
- package/dist/shared/tool/index.d.ts +0 -0
- package/dist/shared/tool/interfaces/ast/ast-replace-result.d.ts +0 -0
- package/dist/shared/tool/interfaces/ast/ast-search-result.d.ts +0 -0
- package/dist/shared/tool/interfaces/ast/index.d.ts +0 -0
- package/dist/shared/tool/interfaces/index.d.ts +0 -0
- package/dist/shared/tool/interfaces/lsp/index.d.ts +0 -0
- package/dist/shared/tool/interfaces/lsp/lsp-command-result.d.ts +0 -0
- package/dist/shared/tool/interfaces/lsp/lsp-diagnostic.d.ts +0 -0
- package/dist/shared/tool/interfaces/lsp/lsp-rename-location.d.ts +0 -0
- package/dist/shared/tool/interfaces/lsp/lsp-rename-result.d.ts +0 -0
- package/dist/shared/tool/interfaces/parallel/index.d.ts +0 -0
- package/dist/shared/tool/interfaces/parallel/poll-result.d.ts +0 -0
- package/dist/shared/tool/interfaces/parallel/session-client.d.ts +0 -0
- package/dist/shared/verification/constants/categories.d.ts +0 -0
- package/dist/shared/verification/constants/checklist.d.ts +0 -0
- package/dist/shared/verification/constants/index.d.ts +0 -0
- package/dist/shared/verification/constants/patterns.d.ts +0 -0
- package/dist/shared/verification/constants/signals.d.ts +0 -0
- package/dist/shared/verification/index.d.ts +0 -0
- package/dist/shared/verification/interfaces/checklist-item.d.ts +0 -0
- package/dist/shared/verification/interfaces/checklist-verification-result.d.ts +0 -0
- package/dist/shared/verification/interfaces/index.d.ts +0 -0
- package/dist/shared/verification/interfaces/verification-checklist.d.ts +0 -0
- package/dist/shared/verification/interfaces/verification-result.d.ts +0 -0
- package/dist/shared/verification/types/checklist-category.d.ts +0 -0
- package/dist/shared/verification/types/index.d.ts +0 -0
- package/dist/tools/ast/index.d.ts +0 -0
- package/dist/tools/background-cmd/check.d.ts +0 -0
- package/dist/tools/background-cmd/index.d.ts +0 -0
- package/dist/tools/background-cmd/kill.d.ts +0 -0
- package/dist/tools/background-cmd/list.d.ts +0 -0
- package/dist/tools/background-cmd/run.d.ts +0 -0
- package/dist/tools/callAgent.d.ts +0 -0
- package/dist/tools/lsp/diagnostics-cache.d.ts +0 -0
- package/dist/tools/lsp/index.d.ts +0 -0
- package/dist/tools/parallel/cancel-task.d.ts +0 -0
- package/dist/tools/parallel/delegate-task.d.ts +0 -0
- package/dist/tools/parallel/get-task-result.d.ts +0 -0
- package/dist/tools/parallel/index.d.ts +0 -0
- package/dist/tools/parallel/list-agents.d.ts +0 -0
- package/dist/tools/parallel/list-tasks.d.ts +0 -0
- package/dist/tools/parallel/show-metrics.d.ts +0 -0
- package/dist/tools/parallel/update-todo.d.ts +0 -0
- package/dist/tools/registry.d.ts +0 -0
- package/dist/tools/rust-pool.d.ts +32 -2
- package/dist/tools/rust.d.ts +0 -0
- package/dist/tools/search.d.ts +0 -0
- package/dist/tools/slashCommand.d.ts +0 -0
- package/dist/tools/web/cache-docs.d.ts +0 -0
- package/dist/tools/web/codesearch.d.ts +0 -0
- package/dist/tools/web/index.d.ts +0 -0
- package/dist/tools/web/webfetch.d.ts +0 -0
- package/dist/tools/web/websearch.d.ts +0 -0
- package/dist/utils/binary.d.ts +0 -0
- package/dist/utils/common.d.ts +0 -0
- package/dist/utils/compatibility/claude.d.ts +0 -0
- package/dist/utils/formatting/elapsed-time.d.ts +0 -0
- package/dist/utils/formatting/index.d.ts +0 -0
- package/dist/utils/formatting/timestamp.d.ts +0 -0
- package/dist/utils/parsing/index.d.ts +0 -0
- package/dist/utils/parsing/slash-command.d.ts +0 -0
- package/dist/utils/sanity/checker.d.ts +0 -0
- package/dist/utils/sanity/constants/escalation-prompt.d.ts +0 -0
- package/dist/utils/sanity/constants/index.d.ts +0 -0
- package/dist/utils/sanity/constants/recovery-prompt.d.ts +0 -0
- package/dist/utils/sanity/constants/severity.d.ts +0 -0
- package/dist/utils/sanity/index.d.ts +0 -0
- package/dist/utils/sanity/interfaces/index.d.ts +0 -0
- package/dist/utils/sanity/interfaces/sanity-result.d.ts +0 -0
- package/dist/utils/sanity/types/index.d.ts +0 -0
- package/dist/utils/sanity/types/severity.d.ts +0 -0
- package/package.json +89 -88
- package/scripts/run-install-hook.mjs +66 -66
- package/dist/shared/agent/constants/agent-tokens.d.ts +0 -11
package/README.md
CHANGED
|
@@ -1,394 +1,445 @@
|
|
|
1
|
-
|
|
2
|
-
---
|
|
3
|
-
|
|
4
|
-
<div align="center">
|
|
5
|
-
<img src="assets/logo.png" alt="logo" width="200" />
|
|
6
|
-
<h1>OpenCode Orchestrator</h1>
|
|
7
|
-
<p>Production-Grade Multi-Agent Orchestration Engine for High-Integrity Software Engineering</p>
|
|
8
|
-
|
|
9
|
-
[](LICENSE)
|
|
10
|
-
[](https://www.npmjs.com/package/opencode-orchestrator)
|
|
1
|
+
|
|
2
|
+
---
|
|
3
|
+
|
|
4
|
+
<div align="center">
|
|
5
|
+
<img src="assets/logo.png" alt="logo" width="200" />
|
|
6
|
+
<h1>OpenCode Orchestrator</h1>
|
|
7
|
+
<p>Production-Grade Multi-Agent Orchestration Engine for High-Integrity Software Engineering</p>
|
|
8
|
+
|
|
9
|
+
[](LICENSE)
|
|
10
|
+
[](https://www.npmjs.com/package/opencode-orchestrator)
|
|
11
11
|
<!-- VERSION:START -->
|
|
12
|
-
**Version:** `1.3.
|
|
13
|
-
<!-- VERSION:END -->
|
|
14
|
-
</div>
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
---
|
|
18
|
-
|
|
19
|
-
## β‘ Quick Start
|
|
20
|
-
|
|
21
|
-
```bash
|
|
22
|
-
npm install -g opencode-orchestrator
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
Install hooks are source-checkout safe, prefer `opencode.jsonc` when present, preserve sibling plugin entries, and skip automatic config mutation in CI environments.
|
|
26
|
-
|
|
27
|
-
To remove the plugin safely later, run:
|
|
28
|
-
|
|
29
|
-
```bash
|
|
30
|
-
npm explore -g opencode-orchestrator -- npm run cleanup:plugin
|
|
31
|
-
npm uninstall -g opencode-orchestrator
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
`npm uninstall -g` does not run dependency uninstall hooks in the npm 11 flow verified for this repo, so config cleanup is explicit.
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
β
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
β
|
|
119
|
-
β
|
|
120
|
-
β
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
β
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
β
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
β
|
|
135
|
-
β
|
|
136
|
-
β
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
β
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
β
|
|
159
|
-
β
|
|
160
|
-
β
|
|
161
|
-
β
|
|
162
|
-
β
|
|
163
|
-
|
|
164
|
-
β
|
|
165
|
-
β
|
|
166
|
-
β
|
|
167
|
-
β
|
|
168
|
-
|
|
169
|
-
β
|
|
170
|
-
|
|
171
|
-
β
|
|
172
|
-
β
|
|
173
|
-
β
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
12
|
+
**Version:** `1.3.4`
|
|
13
|
+
<!-- VERSION:END -->
|
|
14
|
+
</div>
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## β‘ Quick Start
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
npm install -g opencode-orchestrator
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Install hooks are source-checkout safe, prefer `opencode.jsonc` when present, preserve sibling plugin entries, and skip automatic config mutation in CI environments.
|
|
26
|
+
|
|
27
|
+
To remove the plugin safely later, run:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
npm explore -g opencode-orchestrator -- npm run cleanup:plugin
|
|
31
|
+
npm uninstall -g opencode-orchestrator
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
`npm uninstall -g` does not run dependency uninstall hooks in the npm 11 flow verified for this repo, so config cleanup is explicit.
|
|
35
|
+
|
|
36
|
+
### Model, Permissions, and Concurrency
|
|
37
|
+
|
|
38
|
+
The plugin does not force a model by default. OpenCode's model rules apply: primary agents use the global `model` unless the agent has its own `model`, and subagents use the invoking primary agent's model unless the subagent has its own `model`.
|
|
39
|
+
|
|
40
|
+
Recommended `opencode.jsonc` configuration:
|
|
41
|
+
|
|
42
|
+
```jsonc
|
|
43
|
+
{
|
|
44
|
+
"$schema": "https://opencode.ai/config.json",
|
|
45
|
+
"model": "opencode/gpt-5.1-codex",
|
|
46
|
+
"permission": {
|
|
47
|
+
"question": "allow"
|
|
48
|
+
},
|
|
49
|
+
"agent": {
|
|
50
|
+
"commander": {
|
|
51
|
+
"model": "opencode/gpt-5.1-codex"
|
|
52
|
+
},
|
|
53
|
+
"worker": {
|
|
54
|
+
"model": "anthropic/claude-opus-4-5-20251101"
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
"plugin": [
|
|
58
|
+
[
|
|
59
|
+
"opencode-orchestrator",
|
|
60
|
+
{
|
|
61
|
+
"agentConcurrency": {
|
|
62
|
+
"commander": 1,
|
|
63
|
+
"planner": 10,
|
|
64
|
+
"worker": 10,
|
|
65
|
+
"reviewer": 10
|
|
66
|
+
},
|
|
67
|
+
"missionLoop": {
|
|
68
|
+
"ledger": true,
|
|
69
|
+
"markdownMemory": true,
|
|
70
|
+
"maxEvidenceEvents": 20
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
]
|
|
74
|
+
]
|
|
75
|
+
}
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
Global permissions are copied into the generated Commander, Planner, Worker, and Reviewer agents. Same-name agent config keeps user model/options and can override permission keys per agent. When `permission.question` is `allow`, orchestrator agents can still ask concise clarification questions if they are truly blocked.
|
|
79
|
+
|
|
80
|
+
Inside an OpenCode environment:
|
|
81
|
+
```bash
|
|
82
|
+
/task "Implement a new authentication module with JWT and audit logs"
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
## π Engine Workflow
|
|
89
|
+
|
|
90
|
+
**Hub-and-Spoke Architecture** with Work-Stealing Queues for parallel, context-isolated task execution.
|
|
91
|
+
```
|
|
92
|
+
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
93
|
+
β USER INPUT /task "..." β
|
|
94
|
+
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
95
|
+
β
|
|
96
|
+
βΌ
|
|
97
|
+
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
98
|
+
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
|
|
99
|
+
β β C O M M A N D E R β β
|
|
100
|
+
β β [ Mission Analysis & Delegation ] β β
|
|
101
|
+
β β β β
|
|
102
|
+
β β β’ Interprets user intent β’ Coordinates multi-agent workflow β β
|
|
103
|
+
β β β’ Monitors progress β’ Manages work-stealing queues β β
|
|
104
|
+
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
|
|
105
|
+
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
106
|
+
β
|
|
107
|
+
βββββββββββββββββΌββββββββββββββββ
|
|
108
|
+
βΌ βΌ βΌ
|
|
109
|
+
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
|
|
110
|
+
β P L A N N E R β β W O R K E R β β W O R K E R β
|
|
111
|
+
β [Architect] β β [Implementer] β β [Implementer] β
|
|
112
|
+
β β β β β β
|
|
113
|
+
β β’ Dependency β β β’ File coding β β β’ File coding β
|
|
114
|
+
β analysis β β β’ TDD workflow β β β’ TDD workflow β
|
|
115
|
+
β β’ Roadmap gen β β β’ Documentationβ β β’ Documentationβ
|
|
116
|
+
β β’ TODO.md β β β β β
|
|
117
|
+
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
|
|
118
|
+
β β β
|
|
119
|
+
β ββββββββββββββββΌββββββββββββββββββββββ
|
|
120
|
+
β β β
|
|
121
|
+
βΌ βΌ βΌ
|
|
122
|
+
ββββββββββββββββββββββββββββββββββββββββ
|
|
123
|
+
β SESSION POOL (MVCC Sync) β
|
|
124
|
+
β βββββββββββββββββββββββββββββββββββ β
|
|
125
|
+
β β Object Pool β Buffer Pool β β
|
|
126
|
+
β β String Pool β Connection Pool β β
|
|
127
|
+
β βββββββββββββββββββββββββββββββββββ β
|
|
128
|
+
ββββββββββββββββββββββββββββββββββββββββ
|
|
129
|
+
β
|
|
130
|
+
βΌ
|
|
131
|
+
ββββββββββββββββββββββββββββββββββββββββ
|
|
132
|
+
β MSVP MONITOR / REVIEWER β
|
|
133
|
+
β βββββββββββββββββββββββββββββββββββ β
|
|
134
|
+
β β β’ Adaptive polling (500ms-5s) β β
|
|
135
|
+
β β β’ Stability detection β β
|
|
136
|
+
β β β’ Unit test verification β β
|
|
137
|
+
β βββββββββββββββββββββββββββββββββββ β
|
|
138
|
+
ββββββββββββββββββββββββββββββββββββββββ
|
|
139
|
+
β
|
|
140
|
+
βΌ
|
|
141
|
+
ββββββββββββββββββ
|
|
142
|
+
β β¨ COMPLETED β
|
|
143
|
+
ββββββββββββββββββ
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
---
|
|
147
|
+
|
|
148
|
+
## ποΈ Architecture Layers
|
|
149
|
+
|
|
150
|
+
```
|
|
151
|
+
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
152
|
+
β PRESENTATION LAYER β
|
|
153
|
+
β βββββββββββββββ βββββββββββββββ βββββββββββββββ βββββββββββββββββββ β
|
|
154
|
+
β β Task Toast β β Progress β β Notificationβ β Mission Summary β β
|
|
155
|
+
β β Manager β β Notifier β β Manager β β Display β β
|
|
156
|
+
β βββββββββββββββ βββββββββββββββ βββββββββββββββ βββββββββββββββββββ β
|
|
157
|
+
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
|
|
158
|
+
β BUSINESS LOGIC LAYER β
|
|
159
|
+
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
|
|
160
|
+
β β Parallel Agent Orchestration β β
|
|
161
|
+
β β ββββββββββββββ ββββββββββββββ ββββββββββββββ ββββββββββββββββββ β β
|
|
162
|
+
β β β Commander β β Planner β β Worker β β Reviewer β β β
|
|
163
|
+
β β β Agent β β Agent β β Agent β β Agent β β β
|
|
164
|
+
β β ββββββββββββββ ββββββββββββββ ββββββββββββββ ββββββββββββββββββ β β
|
|
165
|
+
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
|
|
166
|
+
β βββββββββββββββββββ βββββββββββββββββββ ββββββββββββββββββββββββββββββββ
|
|
167
|
+
β β Concurrency β β Task Store β β Hook System ββ
|
|
168
|
+
β β Controller β β (In-Memory) β β [Early/Normal/Late Phases] ββ
|
|
169
|
+
β βββββββββββββββββββ βββββββββββββββββββ ββββββββββββββββββββββββββββββββ
|
|
170
|
+
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
|
|
171
|
+
β INFRASTRUCTURE LAYER β
|
|
172
|
+
β ββββββββββββββββββ ββββββββββββββββββ ββββββββββββββββββββββββββββββ β
|
|
173
|
+
β β Session Pool β β Work-Stealing β β Memory Pools β β
|
|
174
|
+
β β [5 per agent] β β [Chase-Lev] β β ββββββββ ββββββββ ββββββββ β
|
|
175
|
+
β β [10 reuse max] β β [LIFO/FIFO] β β βObjectβ βStringβ βBufferββ β
|
|
176
|
+
β ββββββββββββββββββ ββββββββββββββββββ β β 200 β β internβ β 4KB ββ β
|
|
177
|
+
β β ββββββββ ββββββββ ββββββββ β
|
|
178
|
+
β ββββββββββββββββββ ββββββββββββββββββ ββββββββββββββββββββββββββββββ β
|
|
179
|
+
β β MVCC State β β Circuit Breaker β ββββββββββββββββββββββββββββββ β
|
|
180
|
+
β β [Atomic Sync] β β [5 failuresβopenβ β Rust Connection Pool β β
|
|
181
|
+
β β β β [2 successβcloseβ β [4 processes, 30s idle] β β
|
|
182
|
+
β ββββββββββββββββββ ββββββββββββββββββ ββββββββββββββββββββββββββββββ β
|
|
183
|
+
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
|
|
184
|
+
β SAFETY LAYER β
|
|
185
|
+
β ββββββββββββββββββ ββββββββββββββββββ βββββββββββββββββββββββββββββββ β
|
|
186
|
+
β β RAII Pattern β β Shutdown β β Auto-Recovery β β
|
|
187
|
+
β β [Zero Leaks] β β Manager β β [Exponential Backoff] β β
|
|
188
|
+
β β β β [5s timeout] β β [Rate limit handling] β β
|
|
189
|
+
β ββββββββββββββββββ ββββββββββββββββββ βββββββββββββββββββββββββββββββ β
|
|
190
|
+
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
---
|
|
194
|
+
|
|
195
|
+
## π§ͺ Test Utilities
|
|
196
|
+
|
|
197
|
+
Reusable test helpers keep filesystem, task, and process-heavy flows deterministic:
|
|
198
|
+
|
|
199
|
+
```
|
|
200
|
+
tests/harness/
|
|
201
|
+
βββ fixture.ts Disposable tmpdir utilities
|
|
202
|
+
β βββ tmpdir() async disposable with cleanup
|
|
203
|
+
β βββ tmpdirSync() sync disposable with cleanup
|
|
204
|
+
β βββ createMockFs() In-memory fs mock
|
|
205
|
+
β βββ waitFor() Async condition waiter
|
|
206
|
+
β
|
|
207
|
+
βββ builders.ts Factory functions for test objects
|
|
208
|
+
β βββ createParallelTask() Build ParallelTask instances
|
|
209
|
+
β βββ createBackgroundTask() Build BackgroundTask instances
|
|
210
|
+
β βββ createTodo() Build Todo instances
|
|
211
|
+
β
|
|
212
|
+
βββ mocks.ts Mock utilities
|
|
213
|
+
β βββ mockConsole() Spy on console.log/error
|
|
214
|
+
β βββ mockProcessExit() Mock process.exit
|
|
215
|
+
β βββ useFakeTimers() Time manipulation
|
|
216
|
+
β βββ createMockEmitter() EventEmitter spy
|
|
217
|
+
β
|
|
218
|
+
βββ index.ts Unified exports
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
### Usage Example
|
|
222
|
+
|
|
223
|
+
```typescript
|
|
224
|
+
import { tmpdir, createParallelTask, mockConsole } from "@/tests/harness";
|
|
225
|
+
|
|
226
|
+
describe("My test", () => {
|
|
227
|
+
let consoleMock;
|
|
228
|
+
|
|
229
|
+
beforeEach(() => {
|
|
230
|
+
consoleMock = mockConsole();
|
|
231
|
+
consoleMock.setup();
|
|
232
|
+
});
|
|
233
|
+
|
|
234
|
+
afterEach(() => {
|
|
235
|
+
consoleMock.restore();
|
|
236
|
+
});
|
|
237
|
+
|
|
238
|
+
it("should work", async () => {
|
|
239
|
+
await using tmp = await tmpdir({ git: true });
|
|
240
|
+
const task = createParallelTask({ description: "Test" });
|
|
241
|
+
expect(task.status).toBe("pending");
|
|
242
|
+
});
|
|
243
|
+
});
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
---
|
|
247
|
+
|
|
248
|
+
## β‘ Elite Multi-Agent Swarm
|
|
249
|
+
|
|
250
|
+
| Agent | Role | Core Responsibilities |
|
|
251
|
+
|:------|:-----|:------------------------|
|
|
252
|
+
| **Commander** | Mission Hub | Task decomposition, agent coordination, work-stealing orchestration, final mission seal |
|
|
253
|
+
| **Planner** | Architect | Dependency analysis, roadmap generation, TODO.md creation via MVCC, file-level planning |
|
|
254
|
+
| **Worker** | Implementer | High-throughput coding, TDD workflow, documentation, isolated file execution |
|
|
255
|
+
| **Reviewer** | Auditor | Unit test verification, LSP/Lint validation, integration testing, quality gate |
|
|
256
|
+
---
|
|
257
|
+
|
|
258
|
+
## π οΈ Core Capabilities
|
|
259
|
+
|
|
260
|
+
### π Atomic MVCC State Synchronization
|
|
261
|
+
Solves the "Concurrent TODO Update" problem using **MVCC + Mutex**. Agents safely mark tasks complete in parallel without data loss or race conditions. Every state change is cryptographically hashed and logged.
|
|
262
|
+
|
|
263
|
+
### π§© Advanced Hook Orchestration
|
|
264
|
+
Execution flows governed by a **Priority-Phase Hook Registry**. Hooks are grouped into phases (`early`, `normal`, `late`) and executed via **Topological Sort** for predictable, dependency-aware ordering.
|
|
265
|
+
|
|
266
|
+
### ποΈ Mission Loop Control
|
|
267
|
+
`/task` starts a persisted mission loop under `.opencode/`. The loop watches TODO/checklist verification, background task state, compaction safety, recovery state, and stagnation signals before injecting compact continuation prompts that keep Commander aligned with the active objective.
|
|
268
|
+
|
|
269
|
+
The mission loop also writes a bounded runtime evidence trail to `.opencode/mission-ledger.jsonl` and a generated Markdown memory surface under `.opencode/docs/brain/`. Disable those artifacts with the `missionLoop.ledger` and `missionLoop.markdownMemory` plugin options when a project needs a quieter workspace.
|
|
270
|
+
|
|
271
|
+
### π‘οΈ Autonomous Recovery
|
|
272
|
+
- **Self-healing loops** with adaptive stagnation detection
|
|
273
|
+
- **Proactive Agency**: Smart monitoring that audits logs and plans ahead during background tasks
|
|
274
|
+
- **Auto-retry with backoff**: Exponential backoff for transient failures
|
|
275
|
+
|
|
276
|
+
### π― State-Level Session Isolation
|
|
277
|
+
Reused sessions in the **SessionPool** are explicitly reset via server-side compaction, ensuring previous task context never leaks into new tasks.
|
|
278
|
+
|
|
279
|
+
### π Zero-Payload Turbo Mode
|
|
280
|
+
Leverages `system.transform` to unshift agent instruction sets server-side, reducing initial message payloads by **90%+** and preventing context fragmentation.
|
|
281
|
+
|
|
282
|
+
### π§ Hierarchical Memory System
|
|
283
|
+
Maintains focus across thousands of conversation turns using a 4-tier memory structure with **EMA-based Context Gating** to preserve architectural truth while pruning noise.
|
|
284
|
+
|
|
285
|
+
### π Adaptive Intelligence Loop
|
|
286
|
+
- **Stagnation Detection**: Senses when no progress is made across iterations
|
|
287
|
+
- **Diagnostic Intervention**: Forces "Diagnostic Mode" mandating log audits and strategy pivots
|
|
288
|
+
- **Proactive Agency**: Mandates Speculative Planning during background task execution
|
|
289
|
+
|
|
241
290
|
### 𧬠Knowledge Graph RAG (Second Brain)
|
|
242
291
|
An autonomous **Obsidian-style evolutionary memory system** that gives agents persistent, searchable knowledge across sessions.
|
|
243
292
|
|
|
244
293
|
Runtime context injection is active for orchestrated sessions through `experimental.chat.system.transform`, indexing `docs/**/*.md` and `.opencode/docs/**/*.md` with BM25/tag/graph fusion before prompt injection.
|
|
245
294
|
|
|
295
|
+
During active missions, generated runtime memory is available at `.opencode/docs/brain/scratchpad.md`; `.opencode/docs/brain/knowledge-map.canvas` provides an Obsidian-compatible visual map of objective, runtime, verification, and recent evidence nodes.
|
|
296
|
+
|
|
246
297
|
```
|
|
247
298
|
ββββββββββββββββ ββββββββββββββββ ββββββββββββββββ
|
|
248
|
-
β π Ingest ββββββΆβ π Search ββββββΆβ π§ Recall β
|
|
249
|
-
β ββββββββββ β β ββββββββββ β β ββββββββββ β
|
|
250
|
-
β YAML Parser β β BM25 Lexicalβ β RRF-Ranked β
|
|
251
|
-
β Tag HashMap β β Tag Index β β Top-K Notes β
|
|
252
|
-
β Wiki-Links β β 2-Hop Graph β β β Context β
|
|
253
|
-
ββββββββ¬ββββββββ ββββββββββββββββ ββββββββββββββββ
|
|
254
|
-
β
|
|
255
|
-
βΌ
|
|
256
|
-
ββββββββββββββββ ββββββββββββββββ ββββββββββββββββ
|
|
257
|
-
β π Evolve ββββββΆβ π‘οΈ Guard ββββββΆβ π¦ Archive β
|
|
258
|
-
β ββββββββββ β β ββββββββββ β β ββββββββββ β
|
|
259
|
-
β Fission β β Cycle DFS β β Orphan GC β
|
|
260
|
-
β Fusion β β Write FIFO β β MOC Hubs β
|
|
261
|
-
β (Auto-Split β β Keep-Pin β β MD Export β
|
|
262
|
-
β & Merge) β β Shield β β β
|
|
263
|
-
ββββββββββββββββ ββββββββββββββββ ββββββββββββββββ
|
|
264
|
-
```
|
|
265
|
-
|
|
266
|
-
**Six integrated modules** power the knowledge pipeline:
|
|
267
|
-
|
|
268
|
-
| Module | Purpose |
|
|
269
|
-
|:-------|:--------|
|
|
270
|
-
| **TagIndexer** | O(1) YAML frontmatter parsing β tag-to-file HashMap |
|
|
271
|
-
| **GraphParser** | `[[wiki-link]]` extraction, bi-directional adjacency graph |
|
|
272
|
-
| **HybridSearch** | BM25 + Tag + 2-Hop Graph β **Reciprocal Rank Fusion** (k=60) |
|
|
273
|
-
| **Scratchpad** | LRU register cache (64 slots, 4KB max) with markdown persistence |
|
|
274
|
-
| **SafetyGuards** | Circular link DFS, async FIFO write queue, keep-pin shield |
|
|
275
|
-
| **MemoryConsolidation** | Fission/Fusion/GC/MOC β pure functional analysis |
|
|
276
|
-
|
|
277
|
-
---
|
|
278
|
-
|
|
279
|
-
## βοΈ Performance Benchmarks
|
|
280
|
-
|
|
281
|
-
| Metric | Improvement |
|
|
282
|
-
|:-------|:------------|
|
|
283
|
-
| CPU Utilization | 90%+ (up from 50-70%) |
|
|
284
|
-
| Tool Call Speed | 10x faster (5-10ms vs 50-100ms) via Rust pool |
|
|
285
|
-
| Session Creation | 90% faster (50ms vs 500ms) via session pooling |
|
|
286
|
-
| Memory Usage | 60% reduction via object/string/buffer pooling |
|
|
287
|
-
| GC Pressure | 80% reduction |
|
|
288
|
-
| Token Efficiency | 40% reduction via Incremental State & System Transform |
|
|
289
|
-
| Sync Accuracy | 99.95% via MVCC+Mutex |
|
|
290
|
-
| Parallel Efficiency | 80% improvement (50% β 90%+) |
|
|
291
|
-
|
|
292
|
-
---
|
|
293
|
-
|
|
294
|
-
## ποΈ Infrastructure & Reliability
|
|
295
|
-
|
|
296
|
-
### Resource Safety
|
|
297
|
-
- **RAII Pattern**: Guaranteed resource cleanup with zero leaks
|
|
298
|
-
- **ShutdownManager**: Priority-based graceful shutdown (5s timeout per handler)
|
|
299
|
-
- **Atomic File Operations**: Temp file + rename for corruption-proof writes
|
|
300
|
-
- **Automatic Backups**: Timestamped config backups with rollback support
|
|
301
|
-
|
|
302
|
-
### Safety Features
|
|
303
|
-
- **Circuit Breaker**: Auto-recovery from API failures (5 failures β open)
|
|
304
|
-
- **Resource Pressure Detection**: Rejects low-priority tasks when memory > 80%
|
|
305
|
-
- **Terminal Node Guard**: Prevents infinite recursion via depth limit
|
|
306
|
-
- **Auto-Scaling**: Concurrency slots adjust based on success/failure rate
|
|
307
|
-
|
|
308
|
-
### Technical Stack
|
|
309
|
-
- **Runtime**: Node.js
|
|
310
|
-
- **Tools**: Rust-based CLI tools (grep, glob, ast) via connection pool
|
|
311
|
-
- **Concurrency**: Chase-Lev work-stealing deque + priority queues
|
|
312
|
-
- **Memory**: Object pooling + string interning + buffer pooling
|
|
313
|
-
- **State Management**: MVCC + Mutex
|
|
314
|
-
- **Safety**: RAII + circuit breaker + resource pressure detection
|
|
315
|
-
- **Knowledge**: In-memory graph RAG with BM25/Tag/Graph search fusion
|
|
316
|
-
|
|
317
|
-
---
|
|
318
|
-
|
|
319
|
-
## π§ Installation & Configuration
|
|
320
|
-
|
|
321
|
-
### Safe Installation
|
|
322
|
-
The installation process is **production-safe** with multiple protection layers:
|
|
323
|
-
|
|
324
|
-
1. β
**Never overwrites** β always merges with existing config
|
|
325
|
-
2. β
**Automatic backups** β timestamped, last 5 kept
|
|
326
|
-
3. β
**Atomic writes** β temp file + rename (OS-level atomic)
|
|
327
|
-
4. β
**Automatic rollback** β restores from backup on any failure
|
|
328
|
-
5. β
**Cross-platform** β Windows (native, Git Bash, WSL2), macOS, Linux
|
|
329
|
-
6. β
**CI-aware** β skips non-essential operations in CI environments
|
|
330
|
-
7. β
**Timeout protection** β 30s timeout prevents hanging
|
|
331
|
-
8. β
**Graceful degradation** β exits 0 on non-critical failures
|
|
332
|
-
|
|
333
|
-
### Safe Removal
|
|
334
|
-
OpenCode config cleanup is provided as an explicit command because global package uninstall does not invoke dependency uninstall hooks in the npm flow validated for this package.
|
|
335
|
-
|
|
336
|
-
```bash
|
|
337
|
-
npm explore -g opencode-orchestrator -- npm run cleanup:plugin
|
|
338
|
-
npm uninstall -g opencode-orchestrator
|
|
339
|
-
```
|
|
340
|
-
|
|
341
|
-
Manual fallback:
|
|
342
|
-
- Open `~/.config/opencode/opencode.json` or `opencode.jsonc`
|
|
343
|
-
- Remove `"opencode-orchestrator"` from the `plugin` array
|
|
344
|
-
|
|
345
|
-
### Configuration Logs
|
|
346
|
-
- Unix: `/tmp/opencode-orchestrator.log`
|
|
347
|
-
- Windows: `%TEMP%\opencode-orchestrator.log`
|
|
348
|
-
|
|
349
|
-
---
|
|
350
|
-
|
|
351
|
-
## π§ͺ Testing & Stability
|
|
352
|
-
|
|
353
|
-
### Test Utilities
|
|
354
|
-
Reusable helpers under `tests/harness/` provide:
|
|
355
|
-
- **Disposable tmpdir**: Automatic cleanup with `Symbol.asyncDispose` / `Symbol.dispose`
|
|
356
|
-
- **Test builders**: Factory functions for `ParallelTask`, `BackgroundTask`, `Todo`
|
|
357
|
-
- **Mock utilities**: Console, process, timers, file system, event emitter mocks
|
|
358
|
-
|
|
359
|
-
```typescript
|
|
360
|
-
import { tmpdir, createParallelTask, mockConsole } from "@/tests/harness";
|
|
361
|
-
|
|
362
|
-
await using tmp = await tmpdir({ git: true });
|
|
363
|
-
const task = createParallelTask({ description: "Test" });
|
|
364
|
-
```
|
|
365
|
-
|
|
366
|
-
### TUI Stability
|
|
367
|
-
- **Cleanup guarantees**: `initToastClient()` returns a cleanup function
|
|
368
|
-
- **Timeout protection**: AbortController-based 2-10s timeout for async toast operations
|
|
369
|
-
- **Error isolation**: Try/catch around all toast operations prevents cascade failures
|
|
370
|
-
|
|
371
|
-
### Cross-Platform Reliability
|
|
372
|
-
- **Windows guard**: Proper handling of WSL2, Git Bash, native Windows paths
|
|
373
|
-
- **Signal handling**: Graceful shutdown on SIGINT/SIGTERM
|
|
374
|
-
- **Process isolation**: Child process cleanup with timeout
|
|
375
|
-
|
|
376
|
-
---
|
|
377
|
-
|
|
378
|
-
## π Documentation
|
|
379
|
-
|
|
380
|
-
- [System Architecture Deep-Dive β](docs/SYSTEM_ARCHITECTURE.md)
|
|
381
|
-
- [Developer Notes β](docs/DEVELOPERS_NOTE.md)
|
|
382
|
-
- [Knowledge RAG Roadmap β](docs/histories/2026/05/31/PLAN_SecondBrainOrchestration_2026-05-31.md)
|
|
383
|
-
|
|
384
|
-
---
|
|
385
|
-
|
|
386
|
-
## π License
|
|
387
|
-
|
|
388
|
-
MIT License β see [LICENSE](LICENSE) for details.
|
|
389
|
-
|
|
390
|
-
---
|
|
391
|
-
|
|
392
|
-
<div align="center">
|
|
393
|
-
<sub>Built with β‘ for production-grade autonomous software engineering</sub>
|
|
394
|
-
</div>
|
|
299
|
+
β π Ingest ββββββΆβ π Search ββββββΆβ π§ Recall β
|
|
300
|
+
β ββββββββββ β β ββββββββββ β β ββββββββββ β
|
|
301
|
+
β YAML Parser β β BM25 Lexicalβ β RRF-Ranked β
|
|
302
|
+
β Tag HashMap β β Tag Index β β Top-K Notes β
|
|
303
|
+
β Wiki-Links β β 2-Hop Graph β β β Context β
|
|
304
|
+
ββββββββ¬ββββββββ ββββββββββββββββ ββββββββββββββββ
|
|
305
|
+
β
|
|
306
|
+
βΌ
|
|
307
|
+
ββββββββββββββββ ββββββββββββββββ ββββββββββββββββ
|
|
308
|
+
β π Evolve ββββββΆβ π‘οΈ Guard ββββββΆβ π¦ Archive β
|
|
309
|
+
β ββββββββββ β β ββββββββββ β β ββββββββββ β
|
|
310
|
+
β Fission β β Cycle DFS β β Orphan GC β
|
|
311
|
+
β Fusion β β Write FIFO β β MOC Hubs β
|
|
312
|
+
β (Auto-Split β β Keep-Pin β β MD Export β
|
|
313
|
+
β & Merge) β β Shield β β β
|
|
314
|
+
ββββββββββββββββ ββββββββββββββββ ββββββββββββββββ
|
|
315
|
+
```
|
|
316
|
+
|
|
317
|
+
**Six integrated modules** power the knowledge pipeline:
|
|
318
|
+
|
|
319
|
+
| Module | Purpose |
|
|
320
|
+
|:-------|:--------|
|
|
321
|
+
| **TagIndexer** | O(1) YAML frontmatter parsing β tag-to-file HashMap |
|
|
322
|
+
| **GraphParser** | `[[wiki-link]]` extraction, bi-directional adjacency graph |
|
|
323
|
+
| **HybridSearch** | BM25 + Tag + 2-Hop Graph β **Reciprocal Rank Fusion** (k=60) |
|
|
324
|
+
| **Scratchpad** | LRU register cache (64 slots, 4KB max) with markdown persistence |
|
|
325
|
+
| **SafetyGuards** | Circular link DFS, async FIFO write queue, keep-pin shield |
|
|
326
|
+
| **MemoryConsolidation** | Fission/Fusion/GC/MOC β pure functional analysis |
|
|
327
|
+
|
|
328
|
+
---
|
|
329
|
+
|
|
330
|
+
## βοΈ Performance Benchmarks
|
|
331
|
+
|
|
332
|
+
| Metric | Improvement |
|
|
333
|
+
|:-------|:------------|
|
|
334
|
+
| CPU Utilization | 90%+ (up from 50-70%) |
|
|
335
|
+
| Tool Call Speed | 10x faster (5-10ms vs 50-100ms) via Rust pool |
|
|
336
|
+
| Session Creation | 90% faster (50ms vs 500ms) via session pooling |
|
|
337
|
+
| Memory Usage | 60% reduction via object/string/buffer pooling |
|
|
338
|
+
| GC Pressure | 80% reduction |
|
|
339
|
+
| Token Efficiency | 40% reduction via Incremental State & System Transform |
|
|
340
|
+
| Sync Accuracy | 99.95% via MVCC+Mutex |
|
|
341
|
+
| Parallel Efficiency | 80% improvement (50% β 90%+) |
|
|
342
|
+
|
|
343
|
+
---
|
|
344
|
+
|
|
345
|
+
## ποΈ Infrastructure & Reliability
|
|
346
|
+
|
|
347
|
+
### Resource Safety
|
|
348
|
+
- **RAII Pattern**: Guaranteed resource cleanup with zero leaks
|
|
349
|
+
- **ShutdownManager**: Priority-based graceful shutdown (5s timeout per handler)
|
|
350
|
+
- **Atomic File Operations**: Temp file + rename for corruption-proof writes
|
|
351
|
+
- **Automatic Backups**: Timestamped config backups with rollback support
|
|
352
|
+
|
|
353
|
+
### Safety Features
|
|
354
|
+
- **Circuit Breaker**: Auto-recovery from API failures (5 failures β open)
|
|
355
|
+
- **Resource Pressure Detection**: Rejects low-priority tasks when memory > 80%
|
|
356
|
+
- **Terminal Node Guard**: Prevents infinite recursion via depth limit
|
|
357
|
+
- **Auto-Scaling**: Concurrency slots adjust based on success/failure rate
|
|
358
|
+
|
|
359
|
+
### Technical Stack
|
|
360
|
+
- **Runtime**: Node.js 24+ (TypeScript)
|
|
361
|
+
- **Tools**: Rust-based CLI tools (grep, glob, ast) via connection pool
|
|
362
|
+
- **Concurrency**: Chase-Lev work-stealing deque + priority queues
|
|
363
|
+
- **Memory**: Object pooling + string interning + buffer pooling
|
|
364
|
+
- **State Management**: MVCC + Mutex
|
|
365
|
+
- **Safety**: RAII + circuit breaker + resource pressure detection
|
|
366
|
+
- **Knowledge**: In-memory graph RAG with BM25/Tag/Graph search fusion
|
|
367
|
+
|
|
368
|
+
---
|
|
369
|
+
|
|
370
|
+
## π§ Installation & Configuration
|
|
371
|
+
|
|
372
|
+
### Safe Installation
|
|
373
|
+
The installation process is **production-safe** with multiple protection layers:
|
|
374
|
+
|
|
375
|
+
1. β
**Never overwrites** β always merges with existing config
|
|
376
|
+
2. β
**Automatic backups** β timestamped, last 5 kept
|
|
377
|
+
3. β
**Atomic writes** β temp file + rename (OS-level atomic)
|
|
378
|
+
4. β
**Automatic rollback** β restores from backup on any failure
|
|
379
|
+
5. β
**Cross-platform** β Windows (native, Git Bash, WSL2), macOS, Linux
|
|
380
|
+
6. β
**CI-aware** β skips non-essential operations in CI environments
|
|
381
|
+
7. β
**Timeout protection** β 30s timeout prevents hanging
|
|
382
|
+
8. β
**Graceful degradation** β exits 0 on non-critical failures
|
|
383
|
+
|
|
384
|
+
### Safe Removal
|
|
385
|
+
OpenCode config cleanup is provided as an explicit command because global package uninstall does not invoke dependency uninstall hooks in the npm flow validated for this package.
|
|
386
|
+
|
|
387
|
+
```bash
|
|
388
|
+
npm explore -g opencode-orchestrator -- npm run cleanup:plugin
|
|
389
|
+
npm uninstall -g opencode-orchestrator
|
|
390
|
+
```
|
|
391
|
+
|
|
392
|
+
Manual fallback:
|
|
393
|
+
- Open `~/.config/opencode/opencode.json` or `opencode.jsonc`
|
|
394
|
+
- Remove `"opencode-orchestrator"` from the `plugin` array
|
|
395
|
+
|
|
396
|
+
### Configuration Logs
|
|
397
|
+
- Unix: `/tmp/opencode-orchestrator.log`
|
|
398
|
+
- Windows: `%TEMP%\opencode-orchestrator.log`
|
|
399
|
+
|
|
400
|
+
---
|
|
401
|
+
|
|
402
|
+
## π§ͺ Testing & Stability
|
|
403
|
+
|
|
404
|
+
### Test Utilities
|
|
405
|
+
Reusable helpers under `tests/harness/` provide:
|
|
406
|
+
- **Disposable tmpdir**: Automatic cleanup with `Symbol.asyncDispose` / `Symbol.dispose`
|
|
407
|
+
- **Test builders**: Factory functions for `ParallelTask`, `BackgroundTask`, `Todo`
|
|
408
|
+
- **Mock utilities**: Console, process, timers, file system, event emitter mocks
|
|
409
|
+
|
|
410
|
+
```typescript
|
|
411
|
+
import { tmpdir, createParallelTask, mockConsole } from "@/tests/harness";
|
|
412
|
+
|
|
413
|
+
await using tmp = await tmpdir({ git: true });
|
|
414
|
+
const task = createParallelTask({ description: "Test" });
|
|
415
|
+
```
|
|
416
|
+
|
|
417
|
+
### TUI Stability
|
|
418
|
+
- **Cleanup guarantees**: `initToastClient()` returns a cleanup function
|
|
419
|
+
- **Timeout protection**: AbortController-based 2-10s timeout for async toast operations
|
|
420
|
+
- **Error isolation**: Try/catch around all toast operations prevents cascade failures
|
|
421
|
+
|
|
422
|
+
### Cross-Platform Reliability
|
|
423
|
+
- **Windows guard**: Proper handling of WSL2, Git Bash, native Windows paths
|
|
424
|
+
- **Signal handling**: Graceful shutdown on SIGINT/SIGTERM
|
|
425
|
+
- **Process isolation**: Child process cleanup with timeout
|
|
426
|
+
|
|
427
|
+
---
|
|
428
|
+
|
|
429
|
+
## π Documentation
|
|
430
|
+
|
|
431
|
+
- [System Architecture Deep-Dive β](docs/SYSTEM_ARCHITECTURE.md)
|
|
432
|
+
- [Developer Notes β](docs/DEVELOPERS_NOTE.md)
|
|
433
|
+
- [Knowledge RAG Roadmap β](docs/histories/2026/05/31/PLAN_SecondBrainOrchestration_2026-05-31.md)
|
|
434
|
+
|
|
435
|
+
---
|
|
436
|
+
|
|
437
|
+
## π License
|
|
438
|
+
|
|
439
|
+
MIT License β see [LICENSE](LICENSE) for details.
|
|
440
|
+
|
|
441
|
+
---
|
|
442
|
+
|
|
443
|
+
<div align="center">
|
|
444
|
+
<sub>Built with β‘ for production-grade autonomous software engineering</sub>
|
|
445
|
+
</div>
|