opencode-orchestrator 1.5.1 → 1.6.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/LICENSE +21 -21
- package/README.md +21 -2
- package/dist/agents/commander.d.ts +1 -1
- package/dist/agents/definitions.d.ts +1 -1
- 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/prompts/registry.d.ts +39 -0
- package/dist/agents/subagents/planner.d.ts +1 -1
- package/dist/agents/subagents/reviewer.d.ts +1 -1
- package/dist/agents/subagents/worker.d.ts +1 -1
- package/dist/core/agents/agent-registry.d.ts +1 -1
- package/dist/core/agents/concurrency-config.d.ts +0 -0
- package/dist/core/agents/concurrency-token.d.ts +0 -0
- package/dist/core/agents/concurrency.d.ts +2 -2
- 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 +2 -2
- 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 +3 -3
- 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 +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/options-schema.d.ts +37 -0
- package/dist/core/config/plugin-options.d.ts +0 -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 +1 -1
- package/dist/core/knowledge/graph-parser.d.ts +0 -0
- package/dist/core/knowledge/hybrid-search.d.ts +2 -1
- package/dist/core/knowledge/index.d.ts +0 -0
- package/dist/core/knowledge/memory-consolidation.d.ts +0 -0
- package/dist/core/knowledge/mission-memory.d.ts +1 -1
- package/dist/core/knowledge/retrieval-weights.d.ts +29 -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/evidence.d.ts +22 -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 +0 -0
- package/dist/core/loop/mission-loop-handler.d.ts +0 -0
- package/dist/core/loop/mission-loop.d.ts +3 -1
- package/dist/core/loop/mission-runtime-options.d.ts +0 -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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +966 -1423
- package/dist/index.js.map +7 -0
- 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 +0 -0
- 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/scripts/postinstall.js +1 -0
- package/dist/scripts/postinstall.js.map +7 -0
- package/dist/scripts/preuninstall.js +1 -0
- package/dist/scripts/preuninstall.js.map +7 -0
- package/dist/shared/agent/{constants/names.d.ts → constants.d.ts} +5 -2
- package/dist/shared/agent/index.d.ts +3 -4
- package/dist/shared/agent/types.d.ts +27 -0
- package/dist/shared/agent/{utils/index.d.ts → utils.d.ts} +1 -1
- package/dist/shared/cache/constants.d.ts +27 -0
- package/dist/shared/cache/index.d.ts +1 -1
- package/dist/shared/command/index.d.ts +1 -2
- package/dist/shared/command/{interfaces/background-task.d.ts → types.d.ts} +14 -2
- 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.d.ts +322 -0
- package/dist/shared/core/index.d.ts +1 -1
- package/dist/shared/core/poolable.d.ts +0 -0
- package/dist/shared/errors/constants.d.ts +24 -0
- package/dist/shared/errors/detection.d.ts +1 -1
- package/dist/shared/errors/index.d.ts +1 -2
- package/dist/shared/errors/retry.d.ts +1 -1
- 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.d.ts +88 -0
- package/dist/shared/loop/index.d.ts +2 -3
- package/dist/shared/loop/{interfaces/mission-loop.d.ts → types.d.ts} +34 -0
- package/dist/shared/message/constants.d.ts +75 -0
- package/dist/shared/message/index.d.ts +1 -1
- package/dist/shared/notification/{constants/tui.const.d.ts → constants.d.ts} +28 -0
- package/dist/shared/notification/index.d.ts +3 -4
- package/dist/shared/notification/os-notify/constants.d.ts +30 -0
- package/dist/shared/notification/os-notify/index.d.ts +2 -3
- package/dist/shared/notification/os-notify/types.d.ts +36 -0
- package/dist/shared/notification/presets.d.ts +37 -0
- package/dist/shared/notification/types.d.ts +46 -0
- package/dist/shared/os/{constants/platform.d.ts → constants.d.ts} +1 -1
- package/dist/shared/os/index.d.ts +2 -2
- package/dist/shared/os/types.d.ts +5 -0
- package/dist/shared/prompt/constants.d.ts +449 -0
- package/dist/shared/prompt/index.d.ts +1 -1
- package/dist/shared/recovery/constants.d.ts +39 -0
- package/dist/shared/recovery/index.d.ts +2 -3
- package/dist/shared/recovery/types.d.ts +26 -0
- package/dist/shared/session/constants.d.ts +80 -0
- package/dist/shared/session/index.d.ts +1 -1
- package/dist/shared/task/{constants/parallel-task.d.ts → constants.d.ts} +28 -1
- package/dist/shared/task/index.d.ts +2 -3
- package/dist/shared/task/types.d.ts +69 -0
- package/dist/shared/tool/constants.d.ts +105 -0
- package/dist/shared/tool/index.d.ts +3 -2
- package/dist/shared/tool/{constants/tool-names.d.ts → tool-names.d.ts} +0 -0
- package/dist/shared/tool/types.d.ts +117 -0
- package/dist/shared/verification/{constants/categories.d.ts → constants.d.ts} +45 -0
- package/dist/shared/verification/index.d.ts +2 -5
- package/dist/shared/verification/types.d.ts +112 -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 +0 -0
- 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/safe-json.d.ts +17 -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/opencode-orchestrator.schema.json +75 -0
- package/package.json +4 -2
- package/scripts/run-install-hook.mjs +66 -66
- package/dist/shared/agent/constants/index.d.ts +0 -4
- package/dist/shared/agent/interfaces/agent-definition.d.ts +0 -10
- package/dist/shared/agent/interfaces/concurrency-config.d.ts +0 -9
- package/dist/shared/agent/interfaces/index.d.ts +0 -5
- package/dist/shared/agent/types/agent-name.d.ts +0 -5
- package/dist/shared/agent/types/index.d.ts +0 -4
- package/dist/shared/cache/constants/cache-actions.d.ts +0 -10
- package/dist/shared/cache/constants/cache.d.ts +0 -11
- package/dist/shared/cache/constants/filter-status.d.ts +0 -12
- package/dist/shared/cache/constants/index.d.ts +0 -8
- package/dist/shared/command/interfaces/index.d.ts +0 -5
- package/dist/shared/command/interfaces/run-background-options.d.ts +0 -9
- package/dist/shared/command/types/background-task-status.d.ts +0 -4
- package/dist/shared/command/types/index.d.ts +0 -4
- package/dist/shared/core/constants/cli.d.ts +0 -26
- package/dist/shared/core/constants/id-prefix.d.ts +0 -14
- package/dist/shared/core/constants/index.d.ts +0 -15
- package/dist/shared/core/constants/lifecycle.d.ts +0 -22
- package/dist/shared/core/constants/limits.d.ts +0 -19
- package/dist/shared/core/constants/logging.d.ts +0 -39
- package/dist/shared/core/constants/memory-hooks.d.ts +0 -70
- package/dist/shared/core/constants/memory-limits.d.ts +0 -12
- package/dist/shared/core/constants/paths.d.ts +0 -21
- package/dist/shared/core/constants/phases.d.ts +0 -47
- package/dist/shared/core/constants/status-labels.d.ts +0 -34
- package/dist/shared/core/constants/time.d.ts +0 -8
- package/dist/shared/core/constants/wal-actions.d.ts +0 -10
- package/dist/shared/errors/constants/error-patterns.d.ts +0 -13
- package/dist/shared/errors/constants/error-type.d.ts +0 -13
- package/dist/shared/errors/constants/index.d.ts +0 -5
- package/dist/shared/errors/types/error-pattern-type.d.ts +0 -5
- package/dist/shared/errors/types/index.d.ts +0 -4
- package/dist/shared/loop/constants/index.d.ts +0 -8
- package/dist/shared/loop/constants/labels.d.ts +0 -33
- package/dist/shared/loop/constants/loop.d.ts +0 -17
- package/dist/shared/loop/constants/mission-control.d.ts +0 -20
- package/dist/shared/loop/constants/task-status.d.ts +0 -9
- package/dist/shared/loop/constants/todo-status.d.ts +0 -9
- package/dist/shared/loop/interfaces/index.d.ts +0 -6
- package/dist/shared/loop/interfaces/todo-stats.d.ts +0 -11
- package/dist/shared/loop/interfaces/todo.d.ts +0 -13
- package/dist/shared/loop/types/index.d.ts +0 -5
- package/dist/shared/loop/types/todo-priority.d.ts +0 -4
- package/dist/shared/loop/types/todo-status.d.ts +0 -4
- package/dist/shared/message/constants/index.d.ts +0 -8
- package/dist/shared/message/constants/message-roles.d.ts +0 -23
- package/dist/shared/message/constants/part-types.d.ts +0 -13
- package/dist/shared/message/constants/plugin-hooks.d.ts +0 -19
- package/dist/shared/message/constants/prompts.d.ts +0 -8
- package/dist/shared/message/constants/slash-commands.d.ts +0 -21
- package/dist/shared/notification/constants/index.d.ts +0 -3
- package/dist/shared/notification/constants/toast-duration.d.ts +0 -19
- package/dist/shared/notification/constants/toast-variants.d.ts +0 -10
- package/dist/shared/notification/interfaces/index.d.ts +0 -6
- package/dist/shared/notification/interfaces/task-toast.interface.d.ts +0 -18
- package/dist/shared/notification/interfaces/toast-message.d.ts +0 -13
- package/dist/shared/notification/interfaces/toast-options.d.ts +0 -10
- package/dist/shared/notification/os-notify/constants/index.d.ts +0 -6
- package/dist/shared/notification/os-notify/constants/notification-command-keys.d.ts +0 -11
- package/dist/shared/notification/os-notify/constants/notification-commands.d.ts +0 -11
- package/dist/shared/notification/os-notify/constants/notification-defaults.d.ts +0 -5
- package/dist/shared/notification/os-notify/interfaces/index.d.ts +0 -5
- package/dist/shared/notification/os-notify/interfaces/notification-config.d.ts +0 -15
- package/dist/shared/notification/os-notify/interfaces/notification-state.d.ts +0 -13
- package/dist/shared/notification/os-notify/types/index.d.ts +0 -4
- package/dist/shared/notification/os-notify/types/notification-commands.d.ts +0 -5
- package/dist/shared/notification/presets/index.d.ts +0 -9
- package/dist/shared/notification/presets/mission.d.ts +0 -5
- package/dist/shared/notification/presets/parallel.d.ts +0 -6
- package/dist/shared/notification/presets/session.d.ts +0 -6
- package/dist/shared/notification/presets/task-lifecycle.d.ts +0 -7
- package/dist/shared/notification/presets/tools.d.ts +0 -6
- package/dist/shared/notification/presets/warnings.d.ts +0 -7
- package/dist/shared/notification/types/index.d.ts +0 -4
- package/dist/shared/notification/types/toast-variant.d.ts +0 -4
- package/dist/shared/os/constants/index.d.ts +0 -4
- package/dist/shared/os/types/index.d.ts +0 -4
- package/dist/shared/os/types/platform.d.ts +0 -5
- package/dist/shared/prompt/constants/architecture.d.ts +0 -64
- package/dist/shared/prompt/constants/index.d.ts +0 -9
- package/dist/shared/prompt/constants/mandates.d.ts +0 -26
- package/dist/shared/prompt/constants/philosophy.d.ts +0 -29
- package/dist/shared/prompt/constants/scouts.d.ts +0 -32
- package/dist/shared/prompt/constants/status.d.ts +0 -83
- package/dist/shared/prompt/constants/tags.d.ts +0 -215
- package/dist/shared/recovery/constants/history.d.ts +0 -11
- package/dist/shared/recovery/constants/index.d.ts +0 -6
- package/dist/shared/recovery/constants/recovery-level.d.ts +0 -15
- package/dist/shared/recovery/constants/recovery.d.ts +0 -13
- package/dist/shared/recovery/interfaces/error-context.d.ts +0 -11
- package/dist/shared/recovery/interfaces/index.d.ts +0 -5
- package/dist/shared/recovery/interfaces/recovery-record.d.ts +0 -10
- package/dist/shared/recovery/types/index.d.ts +0 -4
- package/dist/shared/recovery/types/recovery-action.d.ts +0 -4
- package/dist/shared/session/constants/events/document-events.d.ts +0 -7
- package/dist/shared/session/constants/events/index.d.ts +0 -30
- package/dist/shared/session/constants/events/message-events.d.ts +0 -6
- package/dist/shared/session/constants/events/mission-events.d.ts +0 -8
- package/dist/shared/session/constants/events/session-events.d.ts +0 -13
- package/dist/shared/session/constants/events/special-events.d.ts +0 -6
- package/dist/shared/session/constants/events/task-events.d.ts +0 -9
- package/dist/shared/session/constants/events/todo-events.d.ts +0 -8
- package/dist/shared/session/constants/index.d.ts +0 -4
- package/dist/shared/task/base-task.d.ts +0 -31
- package/dist/shared/task/constants/background-status.d.ts +0 -10
- package/dist/shared/task/constants/background-task.d.ts +0 -10
- package/dist/shared/task/constants/index.d.ts +0 -8
- package/dist/shared/task/constants/metadata-keys.d.ts +0 -10
- package/dist/shared/task/interfaces/index.d.ts +0 -7
- package/dist/shared/task/interfaces/launch-input.d.ts +0 -11
- package/dist/shared/task/interfaces/parallel-task.d.ts +0 -28
- package/dist/shared/task/interfaces/resume-input.d.ts +0 -16
- package/dist/shared/task/interfaces/task-progress.d.ts +0 -9
- package/dist/shared/task/types/index.d.ts +0 -4
- package/dist/shared/task/types/parallel-task-status.d.ts +0 -4
- package/dist/shared/tool/constants/common/index.d.ts +0 -7
- package/dist/shared/tool/constants/common/labels.d.ts +0 -16
- package/dist/shared/tool/constants/common/languages.d.ts +0 -9
- package/dist/shared/tool/constants/common/output-labels.d.ts +0 -20
- package/dist/shared/tool/constants/common/sources.d.ts +0 -8
- package/dist/shared/tool/constants/index.d.ts +0 -8
- package/dist/shared/tool/constants/lsp/index.d.ts +0 -5
- package/dist/shared/tool/constants/lsp/lsp-severity-labels.d.ts +0 -9
- package/dist/shared/tool/constants/lsp/lsp-severity.d.ts +0 -9
- package/dist/shared/tool/constants/parallel/index.d.ts +0 -5
- package/dist/shared/tool/constants/parallel/logging.d.ts +0 -6
- package/dist/shared/tool/constants/parallel/parameters.d.ts +0 -19
- package/dist/shared/tool/constants/tool-output.d.ts +0 -9
- package/dist/shared/tool/interfaces/ast/ast-replace-result.d.ts +0 -8
- package/dist/shared/tool/interfaces/ast/ast-search-result.d.ts +0 -13
- package/dist/shared/tool/interfaces/ast/index.d.ts +0 -5
- package/dist/shared/tool/interfaces/index.d.ts +0 -6
- package/dist/shared/tool/interfaces/lsp/index.d.ts +0 -7
- package/dist/shared/tool/interfaces/lsp/lsp-command-result.d.ts +0 -8
- package/dist/shared/tool/interfaces/lsp/lsp-diagnostic.d.ts +0 -11
- package/dist/shared/tool/interfaces/lsp/lsp-rename-location.d.ts +0 -9
- package/dist/shared/tool/interfaces/lsp/lsp-rename-result.d.ts +0 -9
- package/dist/shared/tool/interfaces/parallel/index.d.ts +0 -5
- package/dist/shared/tool/interfaces/parallel/poll-result.d.ts +0 -10
- package/dist/shared/tool/interfaces/parallel/session-client.d.ts +0 -47
- package/dist/shared/verification/constants/checklist.d.ts +0 -16
- package/dist/shared/verification/constants/index.d.ts +0 -7
- package/dist/shared/verification/constants/patterns.d.ts +0 -19
- package/dist/shared/verification/constants/signals.d.ts +0 -10
- package/dist/shared/verification/interfaces/checklist-item.d.ts +0 -21
- package/dist/shared/verification/interfaces/checklist-verification-result.d.ts +0 -24
- package/dist/shared/verification/interfaces/index.d.ts +0 -7
- package/dist/shared/verification/interfaces/verification-checklist.d.ts +0 -19
- package/dist/shared/verification/interfaces/verification-result.d.ts +0 -29
- package/dist/shared/verification/types/checklist-category.d.ts +0 -18
- package/dist/shared/verification/types/index.d.ts +0 -4
|
File without changes
|
package/dist/tools/rust.d.ts
CHANGED
|
File without changes
|
package/dist/tools/search.d.ts
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/dist/utils/binary.d.ts
CHANGED
|
File without changes
|
package/dist/utils/common.d.ts
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tolerant JSON parsing for model- and network-authored payloads.
|
|
3
|
+
*
|
|
4
|
+
* Builder learning (adoption assessment 2026-06-19, item F): LLM/provider output
|
|
5
|
+
* and fetched bodies are frequently wrapped in markdown fences, padded with
|
|
6
|
+
* prose, or left with trailing commas. Instead of hard-failing, attempt a small
|
|
7
|
+
* sequence of repairs and fall back gracefully.
|
|
8
|
+
*
|
|
9
|
+
* This is intentionally NOT used for our own machine-written state files
|
|
10
|
+
* (mission-loop.json, ledger, cache) where a strict parse should surface
|
|
11
|
+
* corruption rather than mask it.
|
|
12
|
+
*/
|
|
13
|
+
/**
|
|
14
|
+
* Parse JSON, repairing common LLM/network defects. Returns `fallback`
|
|
15
|
+
* (default `null`) if every attempt fails.
|
|
16
|
+
*/
|
|
17
|
+
export declare function safeJsonParse<T = unknown>(input: unknown, fallback?: T | null): T | null;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"properties": {
|
|
5
|
+
"agentConcurrency": {
|
|
6
|
+
"type": "object",
|
|
7
|
+
"propertyNames": {
|
|
8
|
+
"type": "string"
|
|
9
|
+
},
|
|
10
|
+
"additionalProperties": {
|
|
11
|
+
"type": "integer",
|
|
12
|
+
"exclusiveMinimum": 0,
|
|
13
|
+
"maximum": 9007199254740991
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"providerConcurrency": {
|
|
17
|
+
"type": "object",
|
|
18
|
+
"propertyNames": {
|
|
19
|
+
"type": "string"
|
|
20
|
+
},
|
|
21
|
+
"additionalProperties": {
|
|
22
|
+
"type": "integer",
|
|
23
|
+
"exclusiveMinimum": 0,
|
|
24
|
+
"maximum": 9007199254740991
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"modelConcurrency": {
|
|
28
|
+
"type": "object",
|
|
29
|
+
"propertyNames": {
|
|
30
|
+
"type": "string"
|
|
31
|
+
},
|
|
32
|
+
"additionalProperties": {
|
|
33
|
+
"type": "integer",
|
|
34
|
+
"exclusiveMinimum": 0,
|
|
35
|
+
"maximum": 9007199254740991
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"defaultConcurrency": {
|
|
39
|
+
"type": "integer",
|
|
40
|
+
"exclusiveMinimum": 0,
|
|
41
|
+
"maximum": 9007199254740991
|
|
42
|
+
},
|
|
43
|
+
"missionLoop": {
|
|
44
|
+
"default": {
|
|
45
|
+
"ledger": true,
|
|
46
|
+
"markdownMemory": true,
|
|
47
|
+
"maxEvidenceEvents": 20
|
|
48
|
+
},
|
|
49
|
+
"type": "object",
|
|
50
|
+
"properties": {
|
|
51
|
+
"ledger": {
|
|
52
|
+
"default": true,
|
|
53
|
+
"type": "boolean"
|
|
54
|
+
},
|
|
55
|
+
"markdownMemory": {
|
|
56
|
+
"default": true,
|
|
57
|
+
"type": "boolean"
|
|
58
|
+
},
|
|
59
|
+
"maxEvidenceEvents": {
|
|
60
|
+
"default": 20,
|
|
61
|
+
"type": "integer",
|
|
62
|
+
"exclusiveMinimum": 0,
|
|
63
|
+
"maximum": 9007199254740991
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
"required": [
|
|
67
|
+
"ledger",
|
|
68
|
+
"markdownMemory",
|
|
69
|
+
"maxEvidenceEvents"
|
|
70
|
+
],
|
|
71
|
+
"additionalProperties": false
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
"additionalProperties": {}
|
|
75
|
+
}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "opencode-orchestrator",
|
|
3
3
|
"displayName": "OpenCode Orchestrator",
|
|
4
4
|
"description": "Multi-agent mission control for OpenCode with Commander, Planner, Worker, and Reviewer workflows.",
|
|
5
|
-
"version": "1.
|
|
5
|
+
"version": "1.6.0",
|
|
6
6
|
"author": "agnusdei1207",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"repository": {
|
|
@@ -37,7 +37,8 @@
|
|
|
37
37
|
"scripts/run-install-hook.mjs",
|
|
38
38
|
"bin",
|
|
39
39
|
"README.md",
|
|
40
|
-
"LICENSE"
|
|
40
|
+
"LICENSE",
|
|
41
|
+
"opencode-orchestrator.schema.json"
|
|
41
42
|
],
|
|
42
43
|
"scripts": {
|
|
43
44
|
"docker:build-all": "docker compose run --rm dev && docker compose run --rm rust-arm64 && docker compose run --rm win-builder",
|
|
@@ -46,6 +47,7 @@
|
|
|
46
47
|
"docker:test": "docker compose run --rm test",
|
|
47
48
|
"docker:clean": "docker compose down -v",
|
|
48
49
|
"build": "node scripts/build.mjs",
|
|
50
|
+
"gen:schema": "esbuild scripts/gen-schema.ts --bundle --platform=node --format=esm --outfile=node_modules/.cache/gen-schema.mjs && node node_modules/.cache/gen-schema.mjs",
|
|
49
51
|
"build:all": "npm run build && npm run docker:rust-dist",
|
|
50
52
|
"test": "vitest run --reporter=verbose",
|
|
51
53
|
"test:coverage": "vitest run --coverage",
|
|
@@ -1,66 +1,66 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
import { existsSync } from "node:fs";
|
|
4
|
-
import { spawnSync } from "node:child_process";
|
|
5
|
-
import path from "node:path";
|
|
6
|
-
import { fileURLToPath } from "node:url";
|
|
7
|
-
|
|
8
|
-
const VALID_HOOKS = new Set(["postinstall", "preuninstall"]);
|
|
9
|
-
|
|
10
|
-
function resolveRepoRoot() {
|
|
11
|
-
const scriptPath = fileURLToPath(import.meta.url);
|
|
12
|
-
return path.resolve(path.dirname(scriptPath), "..");
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
function resolveHookCommand(repoRoot, hookName) {
|
|
16
|
-
const distEntry = path.join(repoRoot, "dist", "scripts", `${hookName}.js`);
|
|
17
|
-
if (existsSync(distEntry)) {
|
|
18
|
-
return {
|
|
19
|
-
command: process.execPath,
|
|
20
|
-
args: [distEntry],
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
const sourceEntry = path.join(repoRoot, "scripts", `${hookName}.ts`);
|
|
25
|
-
if (existsSync(sourceEntry)) {
|
|
26
|
-
return {
|
|
27
|
-
command: process.execPath,
|
|
28
|
-
args: ["--experimental-strip-types", sourceEntry],
|
|
29
|
-
};
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
return null;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
function main() {
|
|
36
|
-
const hookName = process.argv[2];
|
|
37
|
-
if (!VALID_HOOKS.has(hookName)) {
|
|
38
|
-
console.error(`Unknown install hook: ${hookName ?? "(missing)"}`);
|
|
39
|
-
process.exit(1);
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
const repoRoot = resolveRepoRoot();
|
|
43
|
-
const hookCommand = resolveHookCommand(repoRoot, hookName);
|
|
44
|
-
|
|
45
|
-
if (!hookCommand) {
|
|
46
|
-
console.log(`⚠️ ${hookName} entrypoint not found. Skipping gracefully.`);
|
|
47
|
-
process.exit(0);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
const result = spawnSync(hookCommand.command, hookCommand.args, {
|
|
51
|
-
cwd: repoRoot,
|
|
52
|
-
stdio: "inherit",
|
|
53
|
-
env: process.env,
|
|
54
|
-
});
|
|
55
|
-
|
|
56
|
-
if (typeof result.status === "number") {
|
|
57
|
-
process.exit(result.status);
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
if (result.error) {
|
|
61
|
-
console.error(`Failed to run ${hookName}: ${result.error.message}`);
|
|
62
|
-
}
|
|
63
|
-
process.exit(1);
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
main();
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import { existsSync } from "node:fs";
|
|
4
|
+
import { spawnSync } from "node:child_process";
|
|
5
|
+
import path from "node:path";
|
|
6
|
+
import { fileURLToPath } from "node:url";
|
|
7
|
+
|
|
8
|
+
const VALID_HOOKS = new Set(["postinstall", "preuninstall"]);
|
|
9
|
+
|
|
10
|
+
function resolveRepoRoot() {
|
|
11
|
+
const scriptPath = fileURLToPath(import.meta.url);
|
|
12
|
+
return path.resolve(path.dirname(scriptPath), "..");
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
function resolveHookCommand(repoRoot, hookName) {
|
|
16
|
+
const distEntry = path.join(repoRoot, "dist", "scripts", `${hookName}.js`);
|
|
17
|
+
if (existsSync(distEntry)) {
|
|
18
|
+
return {
|
|
19
|
+
command: process.execPath,
|
|
20
|
+
args: [distEntry],
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
const sourceEntry = path.join(repoRoot, "scripts", `${hookName}.ts`);
|
|
25
|
+
if (existsSync(sourceEntry)) {
|
|
26
|
+
return {
|
|
27
|
+
command: process.execPath,
|
|
28
|
+
args: ["--experimental-strip-types", sourceEntry],
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
return null;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function main() {
|
|
36
|
+
const hookName = process.argv[2];
|
|
37
|
+
if (!VALID_HOOKS.has(hookName)) {
|
|
38
|
+
console.error(`Unknown install hook: ${hookName ?? "(missing)"}`);
|
|
39
|
+
process.exit(1);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
const repoRoot = resolveRepoRoot();
|
|
43
|
+
const hookCommand = resolveHookCommand(repoRoot, hookName);
|
|
44
|
+
|
|
45
|
+
if (!hookCommand) {
|
|
46
|
+
console.log(`⚠️ ${hookName} entrypoint not found. Skipping gracefully.`);
|
|
47
|
+
process.exit(0);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
const result = spawnSync(hookCommand.command, hookCommand.args, {
|
|
51
|
+
cwd: repoRoot,
|
|
52
|
+
stdio: "inherit",
|
|
53
|
+
env: process.env,
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
if (typeof result.status === "number") {
|
|
57
|
+
process.exit(result.status);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
if (result.error) {
|
|
61
|
+
console.error(`Failed to run ${hookName}: ${result.error.message}`);
|
|
62
|
+
}
|
|
63
|
+
process.exit(1);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
main();
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Cache Configuration Constants
|
|
3
|
-
*/
|
|
4
|
-
export declare const CACHE: {
|
|
5
|
-
/** Default cache TTL (24 hours) */
|
|
6
|
-
readonly DEFAULT_TTL_MS: number;
|
|
7
|
-
/** Maximum cache entries */
|
|
8
|
-
readonly MAX_ENTRIES: 100;
|
|
9
|
-
/** Session TTL (24 hours for long tasks) */
|
|
10
|
-
readonly SESSION_TTL_MS: number;
|
|
11
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Filter Status (for list operations)
|
|
3
|
-
*/
|
|
4
|
-
export declare const FILTER_STATUS: {
|
|
5
|
-
readonly ALL: "all";
|
|
6
|
-
readonly RUNNING: "running";
|
|
7
|
-
readonly DONE: "done";
|
|
8
|
-
readonly COMPLETED: "completed";
|
|
9
|
-
readonly ERROR: "error";
|
|
10
|
-
readonly PENDING: "pending";
|
|
11
|
-
};
|
|
12
|
-
export type FilterStatus = (typeof FILTER_STATUS)[keyof typeof FILTER_STATUS];
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Cache constants
|
|
3
|
-
*/
|
|
4
|
-
export { CACHE } from "./cache.js";
|
|
5
|
-
export { CACHE_ACTIONS } from "./cache-actions.js";
|
|
6
|
-
export type { CacheAction } from "./cache-actions.js";
|
|
7
|
-
export { FILTER_STATUS } from "./filter-status.js";
|
|
8
|
-
export type { FilterStatus } from "./filter-status.js";
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* CLI Tool Names
|
|
3
|
-
*/
|
|
4
|
-
export declare const CLI_NAME: {
|
|
5
|
-
readonly NPX: "npx";
|
|
6
|
-
readonly TSC: "tsc";
|
|
7
|
-
readonly ESLINT: "eslint";
|
|
8
|
-
readonly RG: "rg";
|
|
9
|
-
readonly SED: "sed";
|
|
10
|
-
readonly AST_GREP: "ast-grep";
|
|
11
|
-
readonly GIT: "git";
|
|
12
|
-
readonly JQ: "jq";
|
|
13
|
-
readonly NODE: "node";
|
|
14
|
-
readonly SH: "sh";
|
|
15
|
-
};
|
|
16
|
-
/**
|
|
17
|
-
* Node Process Events
|
|
18
|
-
*/
|
|
19
|
-
export declare const PROC_EVENT: {
|
|
20
|
-
readonly CLOSE: "close";
|
|
21
|
-
readonly ERROR: "error";
|
|
22
|
-
readonly EXIT: "exit";
|
|
23
|
-
readonly DATA: "data";
|
|
24
|
-
readonly MESSAGE: "message";
|
|
25
|
-
readonly DISCONNECT: "disconnect";
|
|
26
|
-
};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ID Prefixes
|
|
3
|
-
*
|
|
4
|
-
* Format: PREFIX + number (e.g., ses_1, SYNC-42, UT-100)
|
|
5
|
-
* No fixed digit limit - use any positive integer.
|
|
6
|
-
*/
|
|
7
|
-
export declare const ID_PREFIX: {
|
|
8
|
-
readonly TASK: "task_";
|
|
9
|
-
readonly JOB: "job_";
|
|
10
|
-
readonly SESSION: "ses_";
|
|
11
|
-
readonly SYNC_ISSUE: "SYNC-";
|
|
12
|
-
readonly UNIT_TEST: "UT-";
|
|
13
|
-
readonly WORKER: "wrk_";
|
|
14
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Core constants
|
|
3
|
-
*/
|
|
4
|
-
export { TIME } from "./time.js";
|
|
5
|
-
export { ID_PREFIX } from "./id-prefix.js";
|
|
6
|
-
export { PATHS } from "./paths.js";
|
|
7
|
-
export { MEMORY_LIMITS } from "./memory-limits.js";
|
|
8
|
-
export { STATUS_LABEL, type TaskStatus } from "./status-labels.js";
|
|
9
|
-
export { LIMITS } from "./limits.js";
|
|
10
|
-
export { WAL_ACTIONS } from "./wal-actions.js";
|
|
11
|
-
export { PHASES } from "./phases.js";
|
|
12
|
-
export { MEMORY_CONSTANTS, HOOK_NAMES, TODO_CONSTANTS, TUI_CONSTANTS } from "./memory-hooks.js";
|
|
13
|
-
export { SHUTDOWN_HANDLERS } from "./lifecycle.js";
|
|
14
|
-
export { LOG_PREFIX } from "./logging.js";
|
|
15
|
-
export * from "./cli.js";
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Lifecycle & Shutdown Handler Constants
|
|
3
|
-
*
|
|
4
|
-
* Centralized constant definitions for all shutdown handler names used
|
|
5
|
-
* throughout the application to ensure consistency and maintainability.
|
|
6
|
-
*/
|
|
7
|
-
export declare const SHUTDOWN_HANDLERS: {
|
|
8
|
-
/** TodoSyncService - Syncs TODO state via file watching */
|
|
9
|
-
readonly TODO_SYNC_SERVICE: "TodoSyncService";
|
|
10
|
-
/** CleanupScheduler - Manages periodic cleanup tasks */
|
|
11
|
-
readonly CLEANUP_SCHEDULER: "CleanupScheduler";
|
|
12
|
-
/** RustToolPool - Manages Rust tool instances */
|
|
13
|
-
readonly RUST_TOOL_POOL: "RustToolPool";
|
|
14
|
-
/** BackgroundTaskManager - Manages background command execution */
|
|
15
|
-
readonly BACKGROUND_TASK_MANAGER: "BackgroundTaskManager";
|
|
16
|
-
/** ParallelAgentManager - Manages parallel agent task execution */
|
|
17
|
-
readonly PARALLEL_AGENT_MANAGER: "ParallelAgentManager";
|
|
18
|
-
/** PluginManager - Manages dynamic plugin lifecycle */
|
|
19
|
-
readonly PLUGIN_MANAGER: "PluginManager";
|
|
20
|
-
};
|
|
21
|
-
/** Type for shutdown handler names */
|
|
22
|
-
export type ShutdownHandlerName = typeof SHUTDOWN_HANDLERS[keyof typeof SHUTDOWN_HANDLERS];
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* System Limits
|
|
3
|
-
*/
|
|
4
|
-
export declare const LIMITS: {
|
|
5
|
-
/** Maximum mission loop iterations */
|
|
6
|
-
readonly MAX_ITERATIONS: 1000000000;
|
|
7
|
-
/** Default scan limit for file listing */
|
|
8
|
-
readonly DEFAULT_SCAN_LIMIT: 20;
|
|
9
|
-
/** Max message history to check for conclusion */
|
|
10
|
-
readonly CONCLUDE_CHECK_HISTORY: 3;
|
|
11
|
-
/** Max concurrent tasks per agent */
|
|
12
|
-
readonly MAX_TASKS_PER_AGENT: 10;
|
|
13
|
-
/** Default history/list limit for UI */
|
|
14
|
-
readonly DEFAULT_LIST_LIMIT: 20;
|
|
15
|
-
/** Default progress bar width */
|
|
16
|
-
readonly DEFAULT_PROGRESS_WIDTH: 20;
|
|
17
|
-
/** Maximum time for atomic task (minutes) */
|
|
18
|
-
readonly TASK_TIME_LIMIT_MIN: 10;
|
|
19
|
-
};
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Logging Constants
|
|
3
|
-
*
|
|
4
|
-
* Centralized log prefixes used throughout the application to ensure
|
|
5
|
-
* consistent formatting and easier log filtering.
|
|
6
|
-
*/
|
|
7
|
-
export declare const LOG_PREFIX: {
|
|
8
|
-
/** Rust Tool pool operations */
|
|
9
|
-
readonly RUST_TOOL: "RustTool";
|
|
10
|
-
readonly RUST_POOL: "RustPool";
|
|
11
|
-
/** LSP diagnostics caching */
|
|
12
|
-
readonly DIAGNOSTICS_CACHE: "DiagnosticsCache";
|
|
13
|
-
/** Context window monitoring */
|
|
14
|
-
readonly CONTEXT_WINDOW_MONITOR: "context-window-monitor";
|
|
15
|
-
/** Memory management */
|
|
16
|
-
readonly MEMORY_MANAGER: "MemoryManager";
|
|
17
|
-
/** Plugin system */
|
|
18
|
-
readonly PLUGIN_MANAGER: "PluginManager";
|
|
19
|
-
/** OS notifications */
|
|
20
|
-
readonly SESSION_NOTIFY: "session-notify";
|
|
21
|
-
/** Session recovery */
|
|
22
|
-
readonly SESSION_RECOVERY: "session-recovery";
|
|
23
|
-
/** Lifecycle management */
|
|
24
|
-
readonly SHUTDOWN_MANAGER: "ShutdownManager";
|
|
25
|
-
/** Agent registry */
|
|
26
|
-
readonly AGENT_REGISTRY: "AgentRegistry";
|
|
27
|
-
/** Task synchronization */
|
|
28
|
-
readonly TODO_SYNC: "TodoSync";
|
|
29
|
-
/** Cleanup scheduler */
|
|
30
|
-
readonly CLEANUP_SCHEDULER: "CleanupScheduler";
|
|
31
|
-
/** Background task management */
|
|
32
|
-
readonly BACKGROUND_TASK_MANAGER: "BackgroundTaskManager";
|
|
33
|
-
/** Parallel agent management */
|
|
34
|
-
readonly PARALLEL_AGENT_MANAGER: "ParallelAgentManager";
|
|
35
|
-
/** File watching */
|
|
36
|
-
readonly FILE_WATCHER: "FileWatcher";
|
|
37
|
-
};
|
|
38
|
-
/** Type for log prefixes */
|
|
39
|
-
export type LogPrefix = typeof LOG_PREFIX[keyof typeof LOG_PREFIX];
|