@kbediako/codex-orchestrator 0.1.38 → 0.2.1
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/.agents/plugins/marketplace.json +20 -0
- package/README.md +46 -317
- package/bin/codex-orchestrator.js +161 -0
- package/codex.orchestrator.json +149 -13
- package/dist/bin/codex-orchestrator.js +797 -1154
- package/dist/orchestrator/src/cli/adapters/CommandBuilder.js +50 -0
- package/dist/orchestrator/src/cli/adapters/CommandPlanner.js +22 -4
- package/dist/orchestrator/src/cli/adapters/CommandReviewer.js +3 -3
- package/dist/orchestrator/src/cli/adapters/CommandTester.js +2 -2
- package/dist/orchestrator/src/cli/adapters/cloudFailureDiagnostics.js +295 -11
- package/dist/orchestrator/src/cli/coStatusAttachCliShell.js +402 -0
- package/dist/orchestrator/src/cli/coStatusCliShell.js +451 -0
- package/dist/orchestrator/src/cli/coStatusOperatorAutopilotCliShell.js +120 -0
- package/dist/orchestrator/src/cli/codexCliShell.js +119 -0
- package/dist/orchestrator/src/cli/codexDefaultsSetup.js +265 -36
- package/dist/orchestrator/src/cli/config/delegationConfig.js +317 -5
- package/dist/orchestrator/src/cli/config/repoConfigPolicy.js +2 -3
- package/dist/orchestrator/src/cli/config/userConfig.js +28 -13
- package/dist/orchestrator/src/cli/control/authenticatedControlRouteGate.js +69 -0
- package/dist/orchestrator/src/cli/control/authenticatedRouteComposition.js +267 -0
- package/dist/orchestrator/src/cli/control/authenticatedRouteController.js +5 -0
- package/dist/orchestrator/src/cli/control/authenticatedRouteDispatcher.js +41 -0
- package/dist/orchestrator/src/cli/control/compatibilityIssuePresenter.js +1035 -0
- package/dist/orchestrator/src/cli/control/confirmationApproveController.js +62 -0
- package/dist/orchestrator/src/cli/control/confirmationCreateController.js +69 -0
- package/dist/orchestrator/src/cli/control/confirmationIssueConsumeController.js +43 -0
- package/dist/orchestrator/src/cli/control/confirmationListController.js +22 -0
- package/dist/orchestrator/src/cli/control/confirmationValidateController.js +58 -0
- package/dist/orchestrator/src/cli/control/confirmations.js +25 -3
- package/dist/orchestrator/src/cli/control/controlActionCancelConfirmation.js +65 -0
- package/dist/orchestrator/src/cli/control/controlActionController.js +77 -0
- package/dist/orchestrator/src/cli/control/controlActionControllerSequencing.js +161 -0
- package/dist/orchestrator/src/cli/control/controlActionExecution.js +142 -0
- package/dist/orchestrator/src/cli/control/controlActionFinalization.js +43 -0
- package/dist/orchestrator/src/cli/control/controlActionOutcome.js +60 -0
- package/dist/orchestrator/src/cli/control/controlActionPreflight.js +476 -0
- package/dist/orchestrator/src/cli/control/controlAuthenticatedRouteHandoff.js +57 -0
- package/dist/orchestrator/src/cli/control/controlBootstrapAssembly.js +39 -0
- package/dist/orchestrator/src/cli/control/controlBootstrapMetadataPersistence.js +16 -0
- package/dist/orchestrator/src/cli/control/controlEventTransport.js +49 -0
- package/dist/orchestrator/src/cli/control/controlExpiryLifecycle.js +102 -0
- package/dist/orchestrator/src/cli/control/controlHostOwnership.js +480 -0
- package/dist/orchestrator/src/cli/control/controlHostSupervision.js +630 -0
- package/dist/orchestrator/src/cli/control/controlOversightFacade.js +8 -0
- package/dist/orchestrator/src/cli/control/controlOversightReadContract.js +1 -0
- package/dist/orchestrator/src/cli/control/controlOversightReadService.js +16 -0
- package/dist/orchestrator/src/cli/control/controlOversightUpdateContract.js +1 -0
- package/dist/orchestrator/src/cli/control/controlPersistenceFiles.js +6 -0
- package/dist/orchestrator/src/cli/control/controlQuestionChildResolution.js +18 -0
- package/dist/orchestrator/src/cli/control/controlRequestContext.js +42 -0
- package/dist/orchestrator/src/cli/control/controlRequestController.js +9 -0
- package/dist/orchestrator/src/cli/control/controlRequestPredispatch.js +17 -0
- package/dist/orchestrator/src/cli/control/controlRequestRouteDispatch.js +44 -0
- package/dist/orchestrator/src/cli/control/controlRuntime.js +1003 -0
- package/dist/orchestrator/src/cli/control/controlServer.js +23 -1456
- package/dist/orchestrator/src/cli/control/controlServerAuditAndErrorHelpers.js +115 -0
- package/dist/orchestrator/src/cli/control/controlServerAuthenticatedRouteBranch.js +29 -0
- package/dist/orchestrator/src/cli/control/controlServerBootstrapLifecycle.js +30 -0
- package/dist/orchestrator/src/cli/control/controlServerBootstrapStartSequence.js +21 -0
- package/dist/orchestrator/src/cli/control/controlServerOwnedRuntimeLifecycle.js +67 -0
- package/dist/orchestrator/src/cli/control/controlServerPublicLifecycle.js +756 -0
- package/dist/orchestrator/src/cli/control/controlServerPublicRouteHelpers.js +86 -0
- package/dist/orchestrator/src/cli/control/controlServerReadyInstanceLifecycle.js +25 -0
- package/dist/orchestrator/src/cli/control/controlServerReadyInstanceStartup.js +18 -0
- package/dist/orchestrator/src/cli/control/controlServerRequestBodyHelpers.js +37 -0
- package/dist/orchestrator/src/cli/control/controlServerRequestShell.js +40 -0
- package/dist/orchestrator/src/cli/control/controlServerRequestShellBinding.js +17 -0
- package/dist/orchestrator/src/cli/control/controlServerSeedLoading.js +27 -0
- package/dist/orchestrator/src/cli/control/controlServerSeededRuntimeAssembly.js +186 -0
- package/dist/orchestrator/src/cli/control/controlServerStartupInputPreparation.js +31 -0
- package/dist/orchestrator/src/cli/control/controlServerStartupSequence.js +49 -0
- package/dist/orchestrator/src/cli/control/controlState.js +233 -2
- package/dist/orchestrator/src/cli/control/controlStatusDashboard.js +1904 -0
- package/dist/orchestrator/src/cli/control/controlTelegramBridgeBootstrapLifecycle.js +22 -0
- package/dist/orchestrator/src/cli/control/controlTelegramBridgeLifecycle.js +67 -0
- package/dist/orchestrator/src/cli/control/controlTelegramBridgeOversightFacadeFactory.js +8 -0
- package/dist/orchestrator/src/cli/control/controlTelegramCommandController.js +49 -0
- package/dist/orchestrator/src/cli/control/controlTelegramDispatchRead.js +40 -0
- package/dist/orchestrator/src/cli/control/controlTelegramPollingController.js +89 -0
- package/dist/orchestrator/src/cli/control/controlTelegramProjectionNotificationController.js +29 -0
- package/dist/orchestrator/src/cli/control/controlTelegramPushState.js +63 -0
- package/dist/orchestrator/src/cli/control/controlTelegramQuestionRead.js +13 -0
- package/dist/orchestrator/src/cli/control/controlTelegramReadController.js +216 -0
- package/dist/orchestrator/src/cli/control/controlTelegramUpdateHandler.js +63 -0
- package/dist/orchestrator/src/cli/control/controlWatcher.js +73 -5
- package/dist/orchestrator/src/cli/control/delegationRegisterController.js +35 -0
- package/dist/orchestrator/src/cli/control/dynamicToolBridgePolicy.js +139 -0
- package/dist/orchestrator/src/cli/control/eventsSseController.js +12 -0
- package/dist/orchestrator/src/cli/control/linearBudgetState.js +1789 -0
- package/dist/orchestrator/src/cli/control/linearDispatchSource.js +1137 -0
- package/dist/orchestrator/src/cli/control/linearGraphqlClient.js +150 -0
- package/dist/orchestrator/src/cli/control/linearRateLimit.js +102 -0
- package/dist/orchestrator/src/cli/control/linearWebhookController.js +499 -0
- package/dist/orchestrator/src/cli/control/liveLinearAdvisoryRuntime.js +70 -0
- package/dist/orchestrator/src/cli/control/observabilityApiController.js +173 -0
- package/dist/orchestrator/src/cli/control/observabilityReadModel.js +500 -0
- package/dist/orchestrator/src/cli/control/observabilitySurface.js +284 -0
- package/dist/orchestrator/src/cli/control/observabilityUpdateNotifier.js +22 -0
- package/dist/orchestrator/src/cli/control/operatorDashboardPresenter.js +252 -0
- package/dist/orchestrator/src/cli/control/providerAgentCapacity.js +70 -0
- package/dist/orchestrator/src/cli/control/providerControlHostFreshnessGauge.js +1068 -0
- package/dist/orchestrator/src/cli/control/providerIntakeState.js +473 -0
- package/dist/orchestrator/src/cli/control/providerIssueHandoff.js +6811 -0
- package/dist/orchestrator/src/cli/control/providerIssueObservability.js +1348 -0
- package/dist/orchestrator/src/cli/control/providerIssueRetryQueue.js +84 -0
- package/dist/orchestrator/src/cli/control/providerLinearRuntimeProof.js +588 -0
- package/dist/orchestrator/src/cli/control/providerLinearScreenshotProof.js +473 -0
- package/dist/orchestrator/src/cli/control/providerLinearWorkerTruth.js +383 -0
- package/dist/orchestrator/src/cli/control/providerLinearWorkflowAudit.js +254 -0
- package/dist/orchestrator/src/cli/control/providerLinearWorkflowFacade.js +5573 -0
- package/dist/orchestrator/src/cli/control/providerLinearWorkflowStates.js +115 -0
- package/dist/orchestrator/src/cli/control/providerMergeCloseout.js +1868 -0
- package/dist/orchestrator/src/cli/control/providerOperatorAutopilot.js +1580 -0
- package/dist/orchestrator/src/cli/control/providerOperatorAutopilotLifecycle.js +154 -0
- package/dist/orchestrator/src/cli/control/providerOperatorAutopilotLocalRolloutExecution.js +1006 -0
- package/dist/orchestrator/src/cli/control/providerPollingHealth.js +435 -0
- package/dist/orchestrator/src/cli/control/providerTerminalCleanup.js +516 -0
- package/dist/orchestrator/src/cli/control/providerWorkerHosts.js +191 -0
- package/dist/orchestrator/src/cli/control/providerWorkflowConfigStore.js +515 -0
- package/dist/orchestrator/src/cli/control/questionChildResolutionAdapter.js +361 -0
- package/dist/orchestrator/src/cli/control/questionQueueController.js +181 -0
- package/dist/orchestrator/src/cli/control/questionReadRetryDeduplication.js +9 -0
- package/dist/orchestrator/src/cli/control/questionReadSequence.js +10 -0
- package/dist/orchestrator/src/cli/control/securityViolationController.js +27 -0
- package/dist/orchestrator/src/cli/control/selectedRunProjection.js +1885 -0
- package/dist/orchestrator/src/cli/control/telegramOversightApiClient.js +48 -0
- package/dist/orchestrator/src/cli/control/telegramOversightBridge.js +180 -0
- package/dist/orchestrator/src/cli/control/telegramOversightBridgeProjectionDeliveryQueue.js +25 -0
- package/dist/orchestrator/src/cli/control/telegramOversightBridgeRuntimeLifecycle.js +45 -0
- package/dist/orchestrator/src/cli/control/telegramOversightBridgeStateStore.js +77 -0
- package/dist/orchestrator/src/cli/control/telegramOversightControlActionApiClient.js +45 -0
- package/dist/orchestrator/src/cli/control/trackerDispatchPilot.js +439 -0
- package/dist/orchestrator/src/cli/control/uiDataController.js +34 -0
- package/dist/orchestrator/src/cli/control/uiSessionController.js +100 -0
- package/dist/orchestrator/src/cli/controlHostCliShell.js +860 -0
- package/dist/orchestrator/src/cli/controlHostFreshnessGaugeCliShell.js +129 -0
- package/dist/orchestrator/src/cli/controlHostSupervisionCliShell.js +2127 -0
- package/dist/orchestrator/src/cli/delegationCliShell.js +62 -0
- package/dist/orchestrator/src/cli/delegationServer.js +567 -678
- package/dist/orchestrator/src/cli/delegationServerCliShell.js +52 -0
- package/dist/orchestrator/src/cli/delegationServerQuestionFlowShell.js +228 -0
- package/dist/orchestrator/src/cli/delegationServerToolDispatchShell.js +411 -0
- package/dist/orchestrator/src/cli/delegationServerTransport.js +274 -0
- package/dist/orchestrator/src/cli/delegationSetup.js +51 -171
- package/dist/orchestrator/src/cli/devtoolsCliShell.js +34 -0
- package/dist/orchestrator/src/cli/doctor.js +678 -164
- package/dist/orchestrator/src/cli/doctorCliRequestShell.js +72 -0
- package/dist/orchestrator/src/cli/doctorCliShell.js +138 -0
- package/dist/orchestrator/src/cli/doctorUsage.js +119 -15
- package/dist/orchestrator/src/cli/exec/experience.js +16 -2
- package/dist/orchestrator/src/cli/exec/summary.js +3 -0
- package/dist/orchestrator/src/cli/execCliShell.js +51 -0
- package/dist/orchestrator/src/cli/flowCliRequestShell.js +44 -0
- package/dist/orchestrator/src/cli/flowCliShell.js +239 -0
- package/dist/orchestrator/src/cli/frontendTestCliRequestShell.js +80 -0
- package/dist/orchestrator/src/cli/frontendTestCliShell.js +41 -0
- package/dist/orchestrator/src/cli/init.js +95 -1
- package/dist/orchestrator/src/cli/initCliShell.js +50 -0
- package/dist/orchestrator/src/cli/linearCliShell.js +1200 -0
- package/dist/orchestrator/src/cli/mcpEnableCliShell.js +132 -0
- package/dist/orchestrator/src/cli/metrics/metricsAggregator.js +3 -2
- package/dist/orchestrator/src/cli/metrics/metricsRecorder.js +56 -0
- package/dist/orchestrator/src/cli/orchestrator.js +66 -1376
- package/dist/orchestrator/src/cli/planCliShell.js +19 -0
- package/dist/orchestrator/src/cli/prCliShell.js +41 -0
- package/dist/orchestrator/src/cli/providerLinearChildLanePhaseContract.js +204 -0
- package/dist/orchestrator/src/cli/providerLinearChildLaneRunner.js +1835 -0
- package/dist/orchestrator/src/cli/providerLinearChildLaneShell.js +2420 -0
- package/dist/orchestrator/src/cli/providerLinearChildStreamShell.js +385 -0
- package/dist/orchestrator/src/cli/providerLinearWorkerRunner.js +6834 -0
- package/dist/orchestrator/src/cli/resumeCliShell.js +14 -0
- package/dist/orchestrator/src/cli/reviewCliLaunchShell.js +72 -0
- package/dist/orchestrator/src/cli/rlm/alignment.js +3 -3
- package/dist/orchestrator/src/cli/rlm/context.js +94 -7
- package/dist/orchestrator/src/cli/rlm/rlmCodexRuntimeShell.js +546 -0
- package/dist/orchestrator/src/cli/rlm/symbolic.js +4 -2
- package/dist/orchestrator/src/cli/rlmCliRequestShell.js +42 -0
- package/dist/orchestrator/src/cli/rlmCompletionCliShell.js +46 -0
- package/dist/orchestrator/src/cli/rlmLaunchCliShell.js +51 -0
- package/dist/orchestrator/src/cli/rlmRunner.js +83 -523
- package/dist/orchestrator/src/cli/run/blockMemory.js +500 -0
- package/dist/orchestrator/src/cli/run/manifest.js +410 -73
- package/dist/orchestrator/src/cli/run/manifestPersister.js +45 -14
- package/dist/orchestrator/src/cli/run/runMemoryController.js +216 -0
- package/dist/orchestrator/src/cli/run/source0.js +690 -0
- package/dist/orchestrator/src/cli/run/workspacePath.js +101 -0
- package/dist/orchestrator/src/cli/runtime/mode.js +2 -1
- package/dist/orchestrator/src/cli/runtime/provider.js +39 -2
- package/dist/orchestrator/src/cli/selfCheckCliShell.js +12 -0
- package/dist/orchestrator/src/cli/services/commandRunner.js +698 -18
- package/dist/orchestrator/src/cli/services/execRuntime.js +66 -1
- package/dist/orchestrator/src/cli/services/orchestratorAutoScoutEvidenceRecorder.js +71 -0
- package/dist/orchestrator/src/cli/services/orchestratorCloudBranchResolution.js +8 -0
- package/dist/orchestrator/src/cli/services/orchestratorCloudEnvironmentResolution.js +22 -0
- package/dist/orchestrator/src/cli/services/orchestratorCloudExecutionLifecycleShell.js +39 -0
- package/dist/orchestrator/src/cli/services/orchestratorCloudPromptBuilder.js +37 -0
- package/dist/orchestrator/src/cli/services/orchestratorCloudRouteFallbackContract.js +45 -0
- package/dist/orchestrator/src/cli/services/orchestratorCloudRouteShell.js +36 -0
- package/dist/orchestrator/src/cli/services/orchestratorCloudTargetExecutor.js +277 -0
- package/dist/orchestrator/src/cli/services/orchestratorControlPlaneLifecycle.js +98 -0
- package/dist/orchestrator/src/cli/services/orchestratorControlPlaneLifecycleShell.js +54 -0
- package/dist/orchestrator/src/cli/services/orchestratorExecutionLifecycle.js +112 -0
- package/dist/orchestrator/src/cli/services/orchestratorExecutionModePolicy.js +27 -0
- package/dist/orchestrator/src/cli/services/orchestratorExecutionRouteAdapterShell.js +59 -0
- package/dist/orchestrator/src/cli/services/orchestratorExecutionRouteDecisionShell.js +57 -0
- package/dist/orchestrator/src/cli/services/orchestratorExecutionRouteState.js +21 -0
- package/dist/orchestrator/src/cli/services/orchestratorExecutionRouter.js +2 -0
- package/dist/orchestrator/src/cli/services/orchestratorLocalPipelineExecutor.js +149 -0
- package/dist/orchestrator/src/cli/services/orchestratorLocalRouteShell.js +63 -0
- package/dist/orchestrator/src/cli/services/orchestratorPlanShell.js +54 -0
- package/dist/orchestrator/src/cli/services/orchestratorPlanTargetTracker.js +16 -0
- package/dist/orchestrator/src/cli/services/orchestratorResumePreparationShell.js +84 -0
- package/dist/orchestrator/src/cli/services/orchestratorResumeTokenValidation.js +15 -0
- package/dist/orchestrator/src/cli/services/orchestratorRunLifecycleCompletion.js +31 -0
- package/dist/orchestrator/src/cli/services/orchestratorRunLifecycleExecutionRegistration.js +37 -0
- package/dist/orchestrator/src/cli/services/orchestratorRunLifecycleOrchestrationShell.js +83 -0
- package/dist/orchestrator/src/cli/services/orchestratorRunLifecycleTaskManagerShell.js +37 -0
- package/dist/orchestrator/src/cli/services/orchestratorRuntimeManifestMutation.js +20 -0
- package/dist/orchestrator/src/cli/services/orchestratorStartPreparationShell.js +56 -0
- package/dist/orchestrator/src/cli/services/orchestratorStatusShell.js +70 -0
- package/dist/orchestrator/src/cli/services/pipelineResolver.js +7 -3
- package/dist/orchestrator/src/cli/services/plannerMemory.js +119 -0
- package/dist/orchestrator/src/cli/services/runPreparation.js +7 -3
- package/dist/orchestrator/src/cli/services/runSummaryWriter.js +9 -0
- package/dist/orchestrator/src/cli/setupBootstrapShell.js +114 -0
- package/dist/orchestrator/src/cli/setupCliShell.js +51 -0
- package/dist/orchestrator/src/cli/skillsCliShell.js +56 -0
- package/dist/orchestrator/src/cli/startCliRequestShell.js +53 -0
- package/dist/orchestrator/src/cli/startCliShell.js +68 -0
- package/dist/orchestrator/src/cli/statusCliShell.js +22 -0
- package/dist/orchestrator/src/cli/utils/authProvenanceFingerprint.js +27 -0
- package/dist/orchestrator/src/cli/utils/cloudPreflight.js +285 -7
- package/dist/orchestrator/src/cli/utils/codexFeatures.js +60 -0
- package/dist/orchestrator/src/cli/utils/delegationConfigParser.js +250 -0
- package/dist/orchestrator/src/cli/utils/delegationMcpHealth.js +1382 -0
- package/dist/orchestrator/src/cli/utils/devtools.js +2 -54
- package/dist/orchestrator/src/cli/utils/mcpServerEntry.js +53 -0
- package/dist/orchestrator/src/cli/utils/packageProgramResolver.js +151 -0
- package/dist/orchestrator/src/cli/utils/providerOverrideEnv.js +71 -0
- package/dist/orchestrator/src/cli/utils/trailingJsonObject.js +59 -0
- package/dist/orchestrator/src/learning/crystalizer.js +2 -2
- package/dist/orchestrator/src/manager.js +74 -4
- package/dist/orchestrator/src/persistence/ExperienceStore.js +233 -49
- package/dist/orchestrator/src/persistence/TaskStateStore.js +6 -6
- package/dist/orchestrator/src/persistence/lockFile.js +70 -4
- package/dist/orchestrator/src/persistence/sanitizeIdentifier.js +39 -0
- package/dist/orchestrator/src/sync/createCloudSyncWorker.js +3 -2
- package/dist/orchestrator/src/utils/atomicWrite.js +17 -2
- package/dist/packages/orchestrator/src/exec/unified-exec.js +99 -6
- package/dist/packages/orchestrator/src/instructions/promptPacks.js +150 -19
- package/dist/packages/sdk-node/src/orchestrator.js +137 -13
- package/dist/packages/shared/config/designConfig.js +8 -1
- package/dist/packages/shared/streams/stdio.js +1 -1
- package/dist/scripts/design/pipeline/permit.js +15 -0
- package/dist/scripts/lib/docs-catalog.js +399 -0
- package/dist/scripts/lib/docs-helpers.js +87 -5
- package/dist/scripts/lib/pr-watch-merge.js +1088 -80
- package/dist/scripts/lib/provider-run-contract.js +26 -0
- package/dist/scripts/lib/review-command-intent-classification.js +532 -0
- package/dist/scripts/lib/review-command-probe-classification.js +385 -0
- package/dist/scripts/lib/review-execution-boundary-preflight.js +279 -0
- package/dist/scripts/lib/review-execution-runtime.js +753 -0
- package/dist/scripts/lib/review-execution-state.js +1144 -0
- package/dist/scripts/lib/review-execution-telemetry.js +215 -0
- package/dist/scripts/lib/review-inspection-target-parsing.js +78 -0
- package/dist/scripts/lib/review-launch-attempt.js +601 -0
- package/dist/scripts/lib/review-meta-surface-boundary-analysis.js +300 -0
- package/dist/scripts/lib/review-meta-surface-normalization.js +746 -0
- package/dist/scripts/lib/review-non-interactive-handoff.js +61 -0
- package/dist/scripts/lib/review-prompt-context.js +376 -0
- package/dist/scripts/lib/review-scope-advisory.js +286 -0
- package/dist/scripts/lib/review-scope-paths.js +123 -0
- package/dist/scripts/lib/review-shell-command-parser.js +389 -0
- package/dist/scripts/lib/review-shell-env-interpreter.js +340 -0
- package/dist/scripts/lib/run-manifests.js +192 -36
- package/dist/scripts/lib/spark-policy-classifier.js +593 -0
- package/dist/scripts/run-review.js +507 -1777
- package/docs/README.md +43 -20
- package/docs/book/README.md +19 -0
- package/docs/book/codex-cli-0124-adoption.md +68 -0
- package/docs/book/local-hook-impact.md +73 -0
- package/docs/book/operations.md +60 -0
- package/docs/book/public-posture.md +34 -0
- package/docs/book/setup.md +91 -0
- package/docs/book/skills.md +11 -0
- package/docs/guides/codex-version-policy.md +104 -0
- package/docs/public/downstream-setup.md +113 -0
- package/docs/public/provider-onboarding.md +173 -0
- package/package.json +23 -10
- package/plugins/codex-orchestrator/.codex-plugin/plugin.json +30 -0
- package/plugins/codex-orchestrator/.mcp.json +13 -0
- package/plugins/codex-orchestrator/launcher.mjs +361 -0
- package/schemas/manifest.json +411 -0
- package/skills/README.md +26 -0
- package/skills/collab-subagents-first/SKILL.md +1 -1
- package/skills/delegation-usage/DELEGATION_GUIDE.md +30 -12
- package/skills/delegation-usage/SKILL.md +25 -14
- package/skills/land/SKILL.md +77 -0
- package/skills/linear/SKILL.md +255 -0
- package/skills/release/SKILL.md +47 -3
- package/skills/standalone-review/SKILL.md +6 -1
- package/templates/README.md +4 -2
- package/templates/codex/.codex/agents/awaiter-high.toml +2 -2
- package/templates/codex/.codex/agents/worker-complex.toml +1 -1
- package/templates/codex/.codex/config.toml +3 -4
- package/templates/codex/.codex/providers/README.md +13 -0
- package/templates/codex/.codex/providers/control.example.json +18 -0
- package/templates/codex/.codex/providers/provider.env.example +15 -0
- package/templates/codex/AGENTS.md +15 -8
- package/templates/codex/mcp-client.json +5 -1
- package/docs/assets/setup.gif +0 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "codex-orchestrator",
|
|
3
|
+
"interface": {
|
|
4
|
+
"displayName": "Codex Orchestrator"
|
|
5
|
+
},
|
|
6
|
+
"plugins": [
|
|
7
|
+
{
|
|
8
|
+
"name": "codex-orchestrator",
|
|
9
|
+
"source": {
|
|
10
|
+
"source": "local",
|
|
11
|
+
"path": "./plugins/codex-orchestrator"
|
|
12
|
+
},
|
|
13
|
+
"policy": {
|
|
14
|
+
"installation": "AVAILABLE",
|
|
15
|
+
"authentication": "ON_INSTALL"
|
|
16
|
+
},
|
|
17
|
+
"category": "Productivity"
|
|
18
|
+
}
|
|
19
|
+
]
|
|
20
|
+
}
|
package/README.md
CHANGED
|
@@ -1,352 +1,81 @@
|
|
|
1
1
|
# Codex Orchestrator
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Codex Orchestrator (CO) is a CLI and runtime for Codex-driven pipelines, auditable manifests, delegation workflows, and downstream repo bootstrapping.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## Release Posture
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
- Global install (recommended for CLI use):
|
|
10
|
-
```bash
|
|
11
|
-
npm i -g @kbediako/codex-orchestrator
|
|
12
|
-
```
|
|
13
|
-
- After install, use either `codex-orchestrator` or the short alias `codex-orch`:
|
|
14
|
-
```bash
|
|
15
|
-
codex-orchestrator --version
|
|
16
|
-
```
|
|
17
|
-
- Or run via npx:
|
|
18
|
-
```bash
|
|
19
|
-
npx @kbediako/codex-orchestrator --version
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
Node.js >= 20 is required.
|
|
23
|
-
|
|
24
|
-
## Quick start
|
|
25
|
-
|
|
26
|
-
1. Run a pipeline with a task id so artifacts are grouped under `.runs/<task-id>/`:
|
|
27
|
-
```bash
|
|
28
|
-
codex-orch start diagnostics --format json --task <task-id>
|
|
29
|
-
```
|
|
30
|
-
The command prints the `run_id` plus the manifest path under `.runs/<task-id>/cli/<run-id>/manifest.json`.
|
|
31
|
-
2. Watch status:
|
|
32
|
-
```bash
|
|
33
|
-
codex-orch status --run <run-id> --watch --interval 10
|
|
34
|
-
```
|
|
35
|
-
3. Resume if needed:
|
|
36
|
-
```bash
|
|
37
|
-
codex-orch resume --run <run-id>
|
|
38
|
-
```
|
|
39
|
-
> Tip: if you prefer `npx`, replace `codex-orch` with `npx @kbediako/codex-orchestrator`.
|
|
40
|
-
> Tip: for multiple commands, you can also `export MCP_RUNNER_TASK_ID=<task-id>` once.
|
|
41
|
-
|
|
42
|
-
## Runtime + Execution Modes
|
|
43
|
-
|
|
44
|
-
- Mode semantics are orthogonal:
|
|
45
|
-
- `executionMode=mcp|cloud` controls where stages execute.
|
|
46
|
-
- `runtimeMode=cli|appserver` controls local runtime provider selection.
|
|
47
|
-
- Local default runtime is `appserver`; preserve `--runtime-mode cli` as break-glass.
|
|
48
|
-
- `--execution-mode cloud --runtime-mode appserver` is intentionally unsupported and fails fast with actionable errors.
|
|
49
|
-
- `js_repl` is enabled by default globally. For deterministic cloud contracts, run explicit feature lanes (`CODEX_CLOUD_ENABLE_FEATURES=js_repl` and separate `CODEX_CLOUD_DISABLE_FEATURES=js_repl` runs). Use `CODEX_CLOUD_DISABLE_FEATURES=js_repl` for task-scoped cloud break-glass; reserve `codex features disable js_repl` for global emergency toggles and re-enable with `codex features enable js_repl`.
|
|
50
|
-
- `memories` remains scoped to explicit eval lanes (legacy alias `memory_tool` is compatibility-only).
|
|
7
|
+
This README tracks the current `main` branch. Published-package users should follow the README and docs for the tag or release they installed.
|
|
51
8
|
|
|
52
|
-
|
|
9
|
+
- Latest package docs: [GitHub releases](https://github.com/Kbediako/CO/releases/latest)
|
|
10
|
+
- Older `v0.2.0` package docs: [README for `v0.2.0`](https://github.com/Kbediako/CO/blob/v0.2.0/README.md)
|
|
11
|
+
- Detailed source-head docs: [docs/book/README.md](docs/book/README.md)
|
|
53
12
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
1. Install templates:
|
|
57
|
-
```bash
|
|
58
|
-
codex-orchestrator init codex --cwd /path/to/repo
|
|
59
|
-
```
|
|
60
|
-
One-shot (templates + optional CO-managed Codex CLI install):
|
|
61
|
-
```bash
|
|
62
|
-
codex-orchestrator init codex --codex-cli --yes
|
|
63
|
-
```
|
|
64
|
-
This seeds `AGENTS.md`, `mcp-client.json`, and downstream .codex/config.toml + .codex/agents/* role files (sourced from `templates/codex/.codex/*`), plus `codex.orchestrator.json`.
|
|
65
|
-
2. Register the delegation MCP server (one-time per machine):
|
|
66
|
-
```bash
|
|
67
|
-
codex mcp add delegation -- codex-orchestrator delegate-server --repo /path/to/repo
|
|
68
|
-
```
|
|
69
|
-
3. Optional (managed/pinned CLI path): set up a CO-managed Codex CLI:
|
|
70
|
-
```bash
|
|
71
|
-
codex-orchestrator codex setup
|
|
72
|
-
```
|
|
73
|
-
Use this when you want a pinned binary, build-from-source behavior, or a custom fork.
|
|
74
|
-
Stock/global `codex` is still the default selection; activate managed binary routing with:
|
|
75
|
-
```bash
|
|
76
|
-
export CODEX_CLI_USE_MANAGED=1
|
|
77
|
-
```
|
|
78
|
-
4. Optional (additive global defaults in `~/.codex/config.toml`):
|
|
79
|
-
```bash
|
|
80
|
-
codex-orchestrator codex defaults
|
|
81
|
-
codex-orchestrator codex defaults --yes
|
|
82
|
-
```
|
|
83
|
-
This updates only the CO baseline keys/role wiring and preserves unrelated config entries.
|
|
84
|
-
5. Optional (fast refresh helper for downstream users):
|
|
85
|
-
```bash
|
|
86
|
-
scripts/codex-cli-refresh.sh --repo /path/to/codex --align-only
|
|
87
|
-
```
|
|
88
|
-
Repo-only helper (not included in npm package). Add `--no-push` when you only want local alignment and do not want to update `origin/main`. To refresh the CO-managed CLI, run a separate command with `--force-rebuild` (without `--align-only`). Set `CODEX_REPO` or `CODEX_CLI_SOURCE` to avoid passing `--repo` each time.
|
|
89
|
-
|
|
90
|
-
## Delegation MCP server
|
|
91
|
-
|
|
92
|
-
Run the delegation MCP server over stdio:
|
|
93
|
-
```bash
|
|
94
|
-
codex-orchestrator delegate-server --repo /path/to/repo
|
|
95
|
-
```
|
|
96
|
-
Optional: add `--mode question_only` to disable `delegate.spawn/pause/cancel`, keeping only `delegate.question.*` + `delegate.status` in the delegate namespace. GitHub tools remain available when GitHub integration is enabled.
|
|
13
|
+
## Install
|
|
97
14
|
|
|
98
|
-
Register it with Codex once. Delegation MCP is enabled by default (the only MCP enabled by default). To override the default or re-enable after disabling:
|
|
99
15
|
```bash
|
|
100
|
-
|
|
101
|
-
codex
|
|
102
|
-
```
|
|
103
|
-
`delegate-server` is the canonical name; `delegation-server` is supported as an alias (older docs may use it).
|
|
104
|
-
|
|
105
|
-
## Agent role defaults (recommended)
|
|
106
|
-
|
|
107
|
-
Codex built-ins are `default`, `explorer`, `worker`, and `awaiter`. `researcher` is user-defined.
|
|
108
|
-
- `spawn_agent` defaults to `default` when `agent_type` is omitted, so always set `agent_type` explicitly.
|
|
109
|
-
- Multi-turn loops are supported (`spawn_agent` -> `send_input` -> `wait`/`resume_agent` -> `close_agent`), so subagents can iterate before parent synthesis.
|
|
110
|
-
- Keep `fork_context` off by default for bounded subagent streams; set `fork_context=true` only when the subagent must inherit prior thread history.
|
|
111
|
-
|
|
112
|
-
In Codex CLI `0.105.0`, built-in `explorer` no longer pins an older model profile; it inherits top-level defaults unless you attach a role `config_file`.
|
|
113
|
-
CO now ships this downstream starter config via `init codex` (source template: `templates/codex/.codex/config.toml`; installed as .codex/config.toml in target repos):
|
|
114
|
-
|
|
115
|
-
```toml
|
|
116
|
-
model = "gpt-5.3-codex"
|
|
117
|
-
model_reasoning_effort = "xhigh"
|
|
118
|
-
|
|
119
|
-
[agents]
|
|
120
|
-
max_threads = 12
|
|
121
|
-
max_depth = 4
|
|
122
|
-
max_spawn_depth = 4
|
|
123
|
-
|
|
124
|
-
[agents.explorer_fast]
|
|
125
|
-
description = "Fast explorer (spark text-only)."
|
|
126
|
-
config_file = "./agents/explorer-fast.toml"
|
|
127
|
-
|
|
128
|
-
[agents.worker_complex]
|
|
129
|
-
description = "Complex worker role."
|
|
130
|
-
config_file = "./agents/worker-complex.toml"
|
|
131
|
-
|
|
132
|
-
[agents.awaiter]
|
|
133
|
-
description = "Awaiter override (keeps awaiter behavior with latest codex/high reasoning)."
|
|
134
|
-
config_file = "./agents/awaiter-high.toml"
|
|
135
|
-
```
|
|
136
|
-
|
|
137
|
-
```toml
|
|
138
|
-
# .codex/agents/explorer-fast.toml
|
|
139
|
-
model = "gpt-5.3-codex-spark"
|
|
140
|
-
model_reasoning_effort = "xhigh"
|
|
141
|
-
```
|
|
142
|
-
|
|
143
|
-
```toml
|
|
144
|
-
# .codex/agents/worker-complex.toml
|
|
145
|
-
model = "gpt-5.3-codex"
|
|
146
|
-
model_reasoning_effort = "xhigh"
|
|
147
|
-
```
|
|
148
|
-
|
|
149
|
-
`init codex` also writes downstream .codex/agents/awaiter-high.toml from `templates/codex/.codex/agents/awaiter-high.toml` so CO users can keep awaiter semantics while meeting a high-reasoning minimum.
|
|
150
|
-
|
|
151
|
-
Caveats:
|
|
152
|
-
- `gpt-5.3-codex-spark` is text-only (no image inputs). Keep it for fast search/synthesis.
|
|
153
|
-
- Leave `agents.explorer` undefined unless you intentionally want to override built-in explorer behavior.
|
|
154
|
-
- Keep RLM/collab built-ins-first by default; add specialist custom roles only when a measured benefit justifies ongoing maintenance.
|
|
155
|
-
- `max_threads = 12`, `max_depth = 4`, and `max_spawn_depth = 4` are CO's standard multi-agent baseline.
|
|
156
|
-
- Fallbacks are contingency-only: use `8/2/2` on constrained hosts or deterministic high-risk lanes; use `6/1/1` only as break-glass under severe contention.
|
|
157
|
-
- Awaiter triage: long waits are expected for long-running jobs; treat it as stuck only after multiple polling windows with no status/progress movement.
|
|
158
|
-
- `codex review` delegates with collab tools disabled in review threads; keep review expectations single-agent even when multi-agent is enabled elsewhere.
|
|
159
|
-
|
|
160
|
-
Delegation guard profile:
|
|
161
|
-
- `CODEX_ORCHESTRATOR_GUARD_PROFILE=auto` (default): strict in CO-style repos, warn in lightweight repos.
|
|
162
|
-
- Set `CODEX_ORCHESTRATOR_GUARD_PROFILE=warn` for ad-hoc/no-task-id runs.
|
|
163
|
-
- Set `CODEX_ORCHESTRATOR_GUARD_PROFILE=strict` to enforce full delegation evidence checks.
|
|
164
|
-
|
|
165
|
-
## Delegation + RLM flow
|
|
166
|
-
|
|
167
|
-
RLM (Recursive Language Model) is the long-horizon loop used by the `rlm` pipeline (`codex-orchestrator rlm "<goal>"` or `codex-orchestrator start rlm --goal "<goal>"`). Delegated runs only enter RLM when the child is launched with the `rlm` pipeline (or the rlm runner directly). In auto mode it resolves to symbolic only when context is large (`RLM_SYMBOLIC_MIN_BYTES`) and an explicit context signal is present (`RLM_CONTEXT_PATH` or delegated run); otherwise it stays iterative. The runner writes state to `.runs/<task-id>/cli/<run-id>/rlm/state.json` and stops when the validator passes or budgets are exhausted.
|
|
168
|
-
For symbolic mode, the Option 2 alignment checker is enabled by default (`RLM_ALIGNMENT_CHECKER=1`) and writes append-only alignment artifacts under `.runs/<task-id>/cli/<run-id>/rlm/alignment/` (ledger + projection). Rollback toggle: set `RLM_ALIGNMENT_CHECKER=0`. Enforcement is opt-in via `RLM_ALIGNMENT_CHECKER_ENFORCE=1`.
|
|
169
|
-
Symbolic subcalls can optionally use collab tools. Fast path: `codex-orchestrator rlm --multi-agent auto "<goal>"` (legacy alias: `--collab auto`; sets `RLM_SYMBOLIC_MULTI_AGENT=1` plus legacy `RLM_SYMBOLIC_COLLAB=1` for compatibility, and implies symbolic mode). Collab requires `multi_agent=true` in `codex features list` (`collab` remains a legacy alias). Collab tool calls parsed from `codex exec --json --enable multi_agent` are stored in `manifest.collab_tool_calls` (bounded by `CODEX_ORCHESTRATOR_COLLAB_MAX_EVENTS`, set to `0` to disable); when present in events, `spawn_agent.fork_context` is captured for observability and surfaced in `codex-orchestrator doctor --usage` fork-context counters. For auditable role routing, prefix spawned prompts with `[agent_type:<role>]` and set `spawn_agent.agent_type` when supported; lifecycle validation enforces prompt-role evidence and validates `agent_type` when present (`RLM_SYMBOLIC_MULTI_AGENT_ROLE_POLICY=warn|off`, legacy alias `RLM_COLLAB_ROLE_POLICY`; `RLM_SYMBOLIC_MULTI_AGENT_ALLOW_DEFAULT_ROLE=1`, legacy alias `RLM_COLLAB_ALLOW_DEFAULT_ROLE`). `codex-orchestrator codex setup` remains available when you want a managed/pinned CLI path (opt-in via `CODEX_CLI_USE_MANAGED=1`).
|
|
170
|
-
For batch fan-out jobs, prefer native `spawn_agents_on_csv` before building custom orchestration wrappers.
|
|
171
|
-
|
|
172
|
-
### Delegation flow
|
|
173
|
-
```mermaid
|
|
174
|
-
flowchart TB
|
|
175
|
-
A["Parent run<br/>(delegation MCP enabled)"]
|
|
176
|
-
C["Delegation MCP server"]
|
|
177
|
-
D["delegate.spawn"]
|
|
178
|
-
E["Child run<br/>(pipeline resolved)"]
|
|
179
|
-
N{Pipeline = rlm?}
|
|
180
|
-
P["Standard pipeline<br/>(plan/build/test/review)"]
|
|
181
|
-
RLM["RLM pipeline<br/>(see next chart)"]
|
|
182
|
-
|
|
183
|
-
A --> C --> D --> E --> N
|
|
184
|
-
N -- yes --> RLM
|
|
185
|
-
N -- no --> P
|
|
186
|
-
E -. optional .-> Q["delegate.question.enqueue/poll"] -.-> A
|
|
16
|
+
npm i -g @kbediako/codex-orchestrator
|
|
17
|
+
codex-orchestrator --version
|
|
187
18
|
```
|
|
188
19
|
|
|
189
|
-
|
|
190
|
-
```mermaid
|
|
191
|
-
flowchart TB
|
|
192
|
-
F["Resolve mode<br/>(auto -> iterative/symbolic)"]
|
|
193
|
-
G{Symbolic?}
|
|
194
|
-
H["Context store<br/>(chunk + search)"]
|
|
195
|
-
I["Planner JSON<br/>(select subcalls)"]
|
|
196
|
-
J["Subcalls<br/>(tool + edits, collab optional)"]
|
|
197
|
-
K["Validator<br/>(test command)"]
|
|
198
|
-
L["State + artifacts<br/>.runs/<task-id>/cli/<run-id>/rlm/state.json"]
|
|
199
|
-
M["Exit status"]
|
|
20
|
+
Node.js `>=20` is required. npm remains the supported baseline install path.
|
|
200
21
|
|
|
201
|
-
|
|
202
|
-
G -- yes --> H --> I --> J --> K
|
|
203
|
-
G -- no --> J
|
|
204
|
-
J --> K
|
|
205
|
-
K --> L --> M
|
|
206
|
-
K -- fail & budget left --> F
|
|
207
|
-
```
|
|
208
|
-
|
|
209
|
-
## Skills (bundled)
|
|
22
|
+
## Current Posture
|
|
210
23
|
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
```
|
|
217
|
-
|
|
218
|
-
The release ships skills under `skills/` for downstream packaging. If you already have global skills installed, treat those as the primary reference and use bundled skills as the shipped fallback. Install bundled skills into `$CODEX_HOME/skills`:
|
|
219
|
-
```bash
|
|
220
|
-
codex-orchestrator skills install
|
|
221
|
-
```
|
|
24
|
+
- Current CO-local Codex CLI `0.125.0` ChatGPT-auth/appserver posture
|
|
25
|
+
- Current model posture: `gpt-5.5` / `xhigh` when available in ChatGPT-auth Codex sessions
|
|
26
|
+
- Portable packaged/generated defaults keep `gpt-5.4` / `xhigh` as fallback values when `gpt-5.5`, API, or cloud portability is unavailable
|
|
27
|
+
- Local default runtime: `appserver`
|
|
28
|
+
- Unsupported combination: `executionMode=cloud` with explicit `runtimeMode=appserver`
|
|
222
29
|
|
|
223
|
-
|
|
224
|
-
- `--force` overwrites existing files.
|
|
225
|
-
- `--only <skills>` installs only selected skills (comma-separated). Combine with `--force` to overwrite only those.
|
|
226
|
-
- `--codex-home <path>` targets a different Codex home directory.
|
|
30
|
+
The full version and model policy lives in [docs/guides/codex-version-policy.md](docs/guides/codex-version-policy.md).
|
|
227
31
|
|
|
228
|
-
|
|
229
|
-
- `codex-orchestrator`
|
|
230
|
-
- `collab-subagents-first`
|
|
231
|
-
- `chrome-devtools`
|
|
232
|
-
- `delegation-usage`
|
|
233
|
-
- `standalone-review`
|
|
234
|
-
- `elegance-review`
|
|
235
|
-
- `docs-first`
|
|
236
|
-
- `collab-evals`
|
|
237
|
-
- `collab-deliberation`
|
|
238
|
-
- `long-poll-wait`
|
|
239
|
-
- `release`
|
|
240
|
-
- `agent-first-adoption-steering`
|
|
241
|
-
- `delegate-early` (compatibility alias; use `delegation-usage`)
|
|
32
|
+
## Quickstart
|
|
242
33
|
|
|
243
|
-
## DevTools readiness
|
|
244
|
-
|
|
245
|
-
Check readiness (deps + capability wiring):
|
|
246
34
|
```bash
|
|
35
|
+
codex-orchestrator init codex --cwd /path/to/repo
|
|
36
|
+
cd /path/to/repo
|
|
37
|
+
codex-orchestrator setup --yes --repo /path/to/repo
|
|
38
|
+
codex login
|
|
39
|
+
codex-orchestrator flow --task <task-id>
|
|
247
40
|
codex-orchestrator doctor --format json
|
|
248
41
|
```
|
|
249
42
|
|
|
250
|
-
|
|
251
|
-
```bash
|
|
252
|
-
codex-orchestrator doctor --apply --yes
|
|
253
|
-
```
|
|
43
|
+
Use `codex login --device-auth` when browser login is not available.
|
|
254
44
|
|
|
255
|
-
|
|
256
|
-
```bash
|
|
257
|
-
codex-orchestrator doctor --usage
|
|
258
|
-
```
|
|
259
|
-
`doctor --usage` prints adoption KPIs (advanced/cloud/rlm/collab/delegation coverage), and per-run `run-summary.json` now includes a `usageKpi` section plus cloud fallback metadata when preflight downgrades to MCP.
|
|
260
|
-
`doctor` also includes a codex-defaults advisory section (model/reasoning/agent baseline drift) and points to additive remediation via `codex-orchestrator codex defaults --yes`.
|
|
45
|
+
## Plugin Install
|
|
261
46
|
|
|
262
|
-
|
|
263
|
-
```bash
|
|
264
|
-
codex-orchestrator doctor --issue-log --issue-title "Observed failure" --issue-notes "what happened"
|
|
265
|
-
```
|
|
266
|
-
`doctor --issue-log` appends `docs/codex-orchestrator-issues.md` (override via `--issue-log-path`) and writes a JSON bundle under `out/<resolved-task>/doctor/issue-bundles/` with doctor/cloud context (latest run context is included when available).
|
|
47
|
+
The npm CLI install is the baseline. Codex plugin marketplace setup is additive for Codex releases that expose plugin flows. Current Codex CLI `0.125.0` keeps marketplace management under `codex plugin marketplace ...`:
|
|
267
48
|
|
|
268
|
-
Auto-capture issue bundles when runs fail:
|
|
269
49
|
```bash
|
|
270
|
-
|
|
271
|
-
codex
|
|
272
|
-
```
|
|
273
|
-
This captures both post-manifest run failures and setup failures that occur before a run manifest is created (for example strict repo-config enforcement).
|
|
50
|
+
# Codex 0.121.0 accepts either command.
|
|
51
|
+
codex marketplace add "$(npm root -g)/@kbediako/codex-orchestrator"
|
|
274
52
|
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
codex-orchestrator doctor --cloud-preflight
|
|
53
|
+
# Codex 0.122.0+ uses the plugin command.
|
|
54
|
+
codex plugin marketplace add "$(npm root -g)/@kbediako/codex-orchestrator"
|
|
278
55
|
```
|
|
279
56
|
|
|
280
|
-
|
|
57
|
+
For local checkout installs, pass the repository root instead of the npm install directory. For Git-backed installs, pass `owner/repo[@ref]`, an HTTPS Git URL, or an SSH Git URL. Use `codex plugin marketplace upgrade codex-orchestrator` to refresh a Git-backed marketplace checkout and `codex plugin marketplace remove codex-orchestrator` to remove the marketplace registration. Then open `/plugins` in Codex, install `Codex Orchestrator`, and restart Codex if the plugin is not picked up immediately. More local checkout, Git-backed, and rollback details are in [docs/book/setup.md](docs/book/setup.md).
|
|
281
58
|
|
|
282
|
-
|
|
283
|
-
- Enable required MCP servers with least privilege: `codex-orchestrator mcp enable --servers delegation --yes` (plan with `--format json`; omit `--servers` only when you intentionally want all disabled servers enabled; env/secret values are redacted in displayed command lines)
|
|
284
|
-
- Low-friction docs->implementation guardrails: `codex-orchestrator flow --task <task-id>`
|
|
285
|
-
- Validate + measure adoption locally: `codex-orchestrator doctor --usage --format json`
|
|
286
|
-
- Run docs relevance as an advisory lane (non-blocking): `codex-orchestrator start docs-relevance-advisory --task <task-id>`
|
|
287
|
-
- Capture reproducible downstream failures: `codex-orchestrator doctor --issue-log --issue-title "<title>" --issue-notes "<notes>"`
|
|
288
|
-
- Auto-capture failed run issue bundles: `codex-orchestrator start <pipeline> --auto-issue-log` or `codex-orchestrator flow --auto-issue-log`
|
|
289
|
-
- Active PR watch-resolve-merge loop: `codex-orchestrator pr resolve-merge --pr <number> --quiet-minutes <window>` (add `--auto-merge` when approved; exits early when author action is required).
|
|
290
|
-
- Passive PR monitor loop: `codex-orchestrator pr watch-merge --pr <number> --quiet-minutes <window>` (monitor-only behavior; keeps waiting unless terminal/timeout).
|
|
291
|
-
- Review checkpoints (npm-only safe): `NOTES="Goal: ... | Summary: ... | Risks: ..." codex-orchestrator review --task <task-id>` for manifest-backed standalone review wrapper behavior (auto-skips repo-only diff-budget script when unavailable in downstream installs); use `codex review "<focus>"` for quick prompt-only checks; use `codex-orchestrator start implementation-gate --task <task-id> --format json` when you want a full gate run.
|
|
292
|
-
- Downstream simulation before shipping wrapper/skill changes: `npm run pack:smoke` (packaged CLI in temp mock repo; validates `review` artifacts and `long-poll-wait` install path; spot-check gate). Use `npm run pack:audit` for full tarball inventory validation.
|
|
293
|
-
- Delegation: `codex-orchestrator doctor --apply --yes`, then enable for a Codex run with: `codex -c 'mcp_servers.delegation.enabled=true' ...`
|
|
294
|
-
- Collab (symbolic RLM subagents): `codex-orchestrator rlm --multi-agent auto "<goal>"` (legacy alias: `--collab auto`; requires Codex `features.multi_agent=true`)
|
|
295
|
-
- Cloud: set `CODEX_CLOUD_ENV_ID` (and optional `CODEX_CLOUD_BRANCH`), then run: `codex-orchestrator start <pipeline> --cloud --target <stage-id>`
|
|
296
|
-
- Cloud fail-fast (avoid fallback reliance): set `CODEX_ORCHESTRATOR_CLOUD_FALLBACK=deny`
|
|
297
|
-
- Repo-config fail-fast (deny packaged config fallback): set `CODEX_ORCHESTRATOR_REPO_CONFIG_REQUIRED=1` or pass `--repo-config-required`
|
|
298
|
-
- Cloud status retry tuning (optional): `CODEX_CLOUD_STATUS_RETRY_LIMIT`, `CODEX_CLOUD_STATUS_RETRY_BACKOFF_MS`
|
|
59
|
+
## Common Commands
|
|
299
60
|
|
|
300
|
-
Print DevTools MCP setup guidance:
|
|
301
61
|
```bash
|
|
302
|
-
codex-orchestrator
|
|
62
|
+
codex-orchestrator flow --task <task-id>
|
|
63
|
+
codex-orchestrator start diagnostics --task <task-id> --format json
|
|
64
|
+
codex-orchestrator status --run <run-id> --watch --interval 10
|
|
65
|
+
codex-orchestrator review
|
|
66
|
+
codex-orchestrator linear issue-context --issue-id <linear-uuid>
|
|
303
67
|
```
|
|
304
68
|
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
- `codex-orchestrator start <pipeline>` — run a pipeline (add `--auto-issue-log` for automatic failure bundle capture; add `--repo-config-required` for strict repo-local config mode).
|
|
308
|
-
- `codex-orchestrator flow --task <task-id>` — run `docs-review` then `implementation-gate` in sequence (supports `--auto-issue-log` and `--repo-config-required`).
|
|
309
|
-
- `codex-orchestrator start docs-relevance-advisory --task <task-id>` — run non-blocking docs relevance signals (warn-mode freshness + advisory review lane).
|
|
310
|
-
- `NOTES="Goal: ... | Summary: ... | Risks: ..." codex-orchestrator review --task <task-id>` — run standalone review wrapper with manifest-backed evidence (supports run-review flags/env).
|
|
311
|
-
- `codex-orchestrator plan <pipeline>` — preview pipeline stages.
|
|
312
|
-
- `codex-orchestrator exec <cmd>` — run a one-off command with the exec runtime.
|
|
313
|
-
- `codex-orchestrator init codex` — install starter templates (`mcp-client.json`, `AGENTS.md`, downstream .codex/config.toml + .codex/agents/* role files sourced from `templates/codex/.codex/*`, `codex.orchestrator.json`) into a repo.
|
|
314
|
-
- `codex-orchestrator setup --yes` — install bundled skills and configure delegation + DevTools wiring (add `--refresh-skills` to overwrite existing skills in `$CODEX_HOME/skills`).
|
|
315
|
-
- `codex-orchestrator init codex --codex-cli --yes --codex-source <path>` — optionally provision a CO-managed Codex CLI binary (build-from-source default; set `CODEX_CLI_SOURCE` to avoid passing `--codex-source` every time, and `CODEX_CLI_USE_MANAGED=1` to route runs to it).
|
|
316
|
-
- `codex-orchestrator init codex --codex-cli --yes --codex-download-url <url> --codex-download-sha256 <sha>` — opt-in to a prebuilt Codex CLI download.
|
|
317
|
-
- `codex-orchestrator codex setup` — plan/apply a CO-managed Codex CLI install (optional managed/pinned path; use `--download-url` + `--download-sha256` for prebuilts; activate with `CODEX_CLI_USE_MANAGED=1`).
|
|
318
|
-
- `codex-orchestrator codex defaults` — plan/apply additive global defaults in `~/.codex/config.toml` and `~/.codex/agents/*.toml` (`--yes` applies, `--force` allows role file overwrite).
|
|
319
|
-
- `codex-orchestrator delegation setup --yes` — configure delegation MCP server wiring.
|
|
320
|
-
- `codex-orchestrator mcp enable --servers <csv> --yes` — enable specific disabled MCP servers from existing Codex config entries.
|
|
321
|
-
- `codex-orchestrator self-check --format json` — JSON health payload.
|
|
322
|
-
- `codex-orchestrator mcp serve` — Codex MCP stdio server.
|
|
323
|
-
- `npm run pack:smoke` — maintainer smoke gate for packaged downstream behavior (tarball install + review/skill checks). Core lane runs it on downstream-facing diffs; `.github/workflows/pack-smoke-backstop.yml` runs a weekly `main` backstop.
|
|
324
|
-
|
|
325
|
-
## What ships in the npm release
|
|
326
|
-
|
|
327
|
-
- CLI + built-in pipelines
|
|
328
|
-
- Delegation MCP server (`delegate-server`)
|
|
329
|
-
- Bundled skills under `skills/`
|
|
330
|
-
- Schemas and templates needed by the CLI
|
|
331
|
-
|
|
332
|
-
## Repository + contributor guide
|
|
69
|
+
Run artifacts live under `.runs/<task-id>/` and summaries under `out/<task-id>/`.
|
|
333
70
|
|
|
334
|
-
|
|
335
|
-
- `docs/README.md`
|
|
336
|
-
- `docs/diagnostics-prompt-guide.md` (first-run diagnostics prompt + expected outputs)
|
|
337
|
-
- `docs/guides/collab-vs-mcp.md` (agent-first decision guide)
|
|
338
|
-
- `docs/guides/rlm-recursion-v2.md` (RLM recursion reference)
|
|
339
|
-
- `docs/guides/cloud-mode-preflight.md` (cloud-mode preflight + fallback guidance)
|
|
340
|
-
- `docs/guides/review-artifacts.md` (where `codex-orchestrator review` / `npm run review` write prompt/output artifacts)
|
|
341
|
-
- `docs/standalone-review-guide.md` (repo-local wrapper behavior + downstream-safe review alternatives)
|
|
71
|
+
## Downstream Setup
|
|
342
72
|
|
|
343
|
-
|
|
73
|
+
- [Book index](docs/book/README.md): setup, operations, skills, public posture, and CO-345 evidence notes
|
|
74
|
+
- [Bundled skills](skills/README.md): shipped skill roster and install behavior
|
|
75
|
+
- [Downstream setup](docs/public/downstream-setup.md): install, repo bootstrap, machine setup, and first run
|
|
76
|
+
- [Provider onboarding](docs/public/provider-onboarding.md): Linear and provider-worker setup
|
|
77
|
+
- [Docs index](docs/README.md): repo-local documentation map
|
|
344
78
|
|
|
345
|
-
|
|
79
|
+
## Contributing
|
|
346
80
|
|
|
347
|
-
|
|
348
|
-
<tr>
|
|
349
|
-
<td><img src="docs/assets/oolong-baseline-seeded-wilson95-runs5.png" alt="Baseline OOLONG seeded Wilson 95% CI" width="420"></td>
|
|
350
|
-
<td><img src="docs/assets/oolong-rlm-seeded-wilson95-runs5.png" alt="RLM OOLONG seeded Wilson 95% CI" width="420"></td>
|
|
351
|
-
</tr>
|
|
352
|
-
</table>
|
|
81
|
+
Contributor and repo-internal guidance lives in [docs/README.md](docs/README.md).
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import { spawn } from 'node:child_process'
|
|
4
|
+
import { createRequire } from 'node:module'
|
|
5
|
+
import { existsSync, writeSync } from 'node:fs'
|
|
6
|
+
import { join, normalize } from 'node:path'
|
|
7
|
+
import process from 'node:process'
|
|
8
|
+
import { fileURLToPath } from 'node:url'
|
|
9
|
+
|
|
10
|
+
const FORWARDABLE_SIGNALS = ['SIGINT', 'SIGTERM', 'SIGHUP']
|
|
11
|
+
|
|
12
|
+
function main() {
|
|
13
|
+
const packageRoot = resolvePackageRoot()
|
|
14
|
+
const sourceEntry = join(packageRoot, 'bin', 'codex-orchestrator.ts')
|
|
15
|
+
const distEntry = join(packageRoot, 'dist', 'bin', 'codex-orchestrator.js')
|
|
16
|
+
const sourceLoader = existsSync(sourceEntry) ? resolveTsNodeLoader(packageRoot) : null
|
|
17
|
+
|
|
18
|
+
let args
|
|
19
|
+
if (sourceLoader) {
|
|
20
|
+
args = ['--no-warnings', '--loader', sourceLoader, sourceEntry, ...process.argv.slice(2)]
|
|
21
|
+
} else if (existsSync(distEntry)) {
|
|
22
|
+
args = [distEntry, ...process.argv.slice(2)]
|
|
23
|
+
if (existsSync(sourceEntry)) {
|
|
24
|
+
writeWarning(
|
|
25
|
+
[
|
|
26
|
+
'Source checkout fallback: ts-node/esm is unavailable, so execution is using the built dist artifact instead of the live source entrypoint.',
|
|
27
|
+
`source=${sourceEntry}`,
|
|
28
|
+
`dist=${distEntry}`,
|
|
29
|
+
'Fresh merged TypeScript changes may remain stale until dist is rebuilt.'
|
|
30
|
+
].join(' ')
|
|
31
|
+
)
|
|
32
|
+
}
|
|
33
|
+
} else if (existsSync(sourceEntry)) {
|
|
34
|
+
throw new Error(
|
|
35
|
+
`Unable to run ${sourceEntry} because ts-node/esm is unavailable, and fallback dist artifact ${distEntry} is missing.`
|
|
36
|
+
)
|
|
37
|
+
} else {
|
|
38
|
+
throw new Error(`Unable to locate CLI entrypoint. Expected ${distEntry}.`)
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
const env = {
|
|
42
|
+
...process.env,
|
|
43
|
+
CODEX_ORCHESTRATOR_PACKAGE_ROOT: packageRoot
|
|
44
|
+
}
|
|
45
|
+
if (sourceLoader) {
|
|
46
|
+
env.TS_NODE_PROJECT = join(packageRoot, 'tsconfig.json')
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
const child = spawn(process.execPath, [...process.execArgv, ...args], {
|
|
50
|
+
env,
|
|
51
|
+
stdio: 'inherit'
|
|
52
|
+
})
|
|
53
|
+
let forwardedStopSignal = null
|
|
54
|
+
const disposeSignalForwarding = installSignalForwarding(child, (signal) => {
|
|
55
|
+
forwardedStopSignal ??= signal
|
|
56
|
+
})
|
|
57
|
+
child.once('error', (error) => {
|
|
58
|
+
disposeSignalForwarding()
|
|
59
|
+
writeWarning(error instanceof Error ? error.message : String(error))
|
|
60
|
+
process.exitCode = 1
|
|
61
|
+
})
|
|
62
|
+
child.once('close', (code, signal) => {
|
|
63
|
+
disposeSignalForwarding()
|
|
64
|
+
if (forwardedStopSignal) {
|
|
65
|
+
reemitSignal(forwardedStopSignal)
|
|
66
|
+
return
|
|
67
|
+
}
|
|
68
|
+
if (signal) {
|
|
69
|
+
reemitSignal(signal)
|
|
70
|
+
return
|
|
71
|
+
}
|
|
72
|
+
process.exitCode = typeof code === 'number' ? code : 1
|
|
73
|
+
})
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
function resolvePackageRoot() {
|
|
77
|
+
const selfPath = fileURLToPath(import.meta.url)
|
|
78
|
+
const selfRoot = normalize(join(selfPath, '..', '..'))
|
|
79
|
+
const configured = normalizeOptionalString(process.env.CODEX_ORCHESTRATOR_PACKAGE_ROOT)
|
|
80
|
+
if (configured && pathsEqual(configured, selfRoot)) {
|
|
81
|
+
return normalize(configured)
|
|
82
|
+
}
|
|
83
|
+
return selfRoot
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
function resolveTsNodeLoader(packageRoot) {
|
|
87
|
+
try {
|
|
88
|
+
return createRequire(join(packageRoot, 'package.json')).resolve('ts-node/esm')
|
|
89
|
+
} catch {
|
|
90
|
+
return null
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
function normalizeOptionalString(value) {
|
|
95
|
+
if (typeof value !== 'string') {
|
|
96
|
+
return null
|
|
97
|
+
}
|
|
98
|
+
const trimmed = value.trim()
|
|
99
|
+
return trimmed.length > 0 ? trimmed : null
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
function pathsEqual(leftPath, rightPath) {
|
|
103
|
+
return normalize(leftPath) === normalize(rightPath)
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
function writeWarning(message) {
|
|
107
|
+
const line = `${message}\n`
|
|
108
|
+
const stderrFd = process.stderr.fd
|
|
109
|
+
if (typeof stderrFd === 'number') {
|
|
110
|
+
try {
|
|
111
|
+
writeSync(stderrFd, line)
|
|
112
|
+
return
|
|
113
|
+
} catch {
|
|
114
|
+
// Fall through to process.stderr when direct fd writes are unavailable.
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
process.stderr.write(line)
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
function installSignalForwarding(child, onForwardedSignal) {
|
|
121
|
+
const handlers = new Map()
|
|
122
|
+
for (const signal of FORWARDABLE_SIGNALS) {
|
|
123
|
+
const handler = () => {
|
|
124
|
+
onForwardedSignal(signal)
|
|
125
|
+
forwardSignal(child, signal)
|
|
126
|
+
}
|
|
127
|
+
process.on(signal, handler)
|
|
128
|
+
handlers.set(signal, handler)
|
|
129
|
+
}
|
|
130
|
+
return () => {
|
|
131
|
+
for (const [signal, handler] of handlers) {
|
|
132
|
+
process.off(signal, handler)
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
function forwardSignal(child, signal) {
|
|
138
|
+
if (child.exitCode !== null || child.signalCode !== null) {
|
|
139
|
+
return
|
|
140
|
+
}
|
|
141
|
+
try {
|
|
142
|
+
child.kill(signal)
|
|
143
|
+
} catch {
|
|
144
|
+
// Ignore forwarding races when the child exits between checks.
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
function reemitSignal(signal) {
|
|
149
|
+
try {
|
|
150
|
+
process.kill(process.pid, signal)
|
|
151
|
+
} catch {
|
|
152
|
+
process.exitCode = 1
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
try {
|
|
157
|
+
main()
|
|
158
|
+
} catch (error) {
|
|
159
|
+
writeWarning(error instanceof Error ? error.message : String(error))
|
|
160
|
+
process.exitCode = 1
|
|
161
|
+
}
|