@kbediako/codex-orchestrator 0.1.37 → 0.2.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/.agents/plugins/marketplace.json +20 -0
- package/README.md +73 -291
- package/bin/codex-orchestrator.js +161 -0
- package/codex.orchestrator.json +149 -13
- package/dist/bin/codex-orchestrator.js +795 -1154
- 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 +183 -11
- package/dist/orchestrator/src/cli/coStatusAttachCliShell.js +402 -0
- package/dist/orchestrator/src/cli/coStatusCliShell.js +429 -0
- package/dist/orchestrator/src/cli/coStatusOperatorAutopilotCliShell.js +120 -0
- package/dist/orchestrator/src/cli/codexCliShell.js +72 -0
- package/dist/orchestrator/src/cli/codexDefaultsSetup.js +49 -11
- 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 +608 -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 +992 -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 +1899 -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 +1838 -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 +542 -122
- 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 +136 -16
- 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 +1 -0
- 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 +1772 -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 +5738 -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 +668 -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 +83 -1
- 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/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 +365 -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/public/downstream-setup.md +106 -0
- package/docs/public/provider-onboarding.md +173 -0
- package/package.json +30 -11
- package/plugins/codex-orchestrator/.codex-plugin/plugin.json +30 -0
- package/plugins/codex-orchestrator/.mcp.json +13 -0
- package/plugins/codex-orchestrator/launcher.mjs +359 -0
- package/schemas/manifest.json +395 -0
- package/skills/chrome-devtools/SKILL.md +1 -1
- package/skills/codex-orchestrator/SKILL.md +83 -0
- package/skills/collab-subagents-first/SKILL.md +2 -1
- package/skills/delegation-usage/DELEGATION_GUIDE.md +24 -11
- package/skills/delegation-usage/SKILL.md +20 -13
- 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/explorer-fast.toml +1 -0
- 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 +12 -7
- package/templates/codex/mcp-client.json +5 -1
- package/docs/README.md +0 -307
- package/docs/assets/setup.gif +0 -0
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { exec } from 'node:child_process';
|
|
2
|
-
import { spawn } from 'node:child_process';
|
|
3
2
|
import { mkdir, readFile, stat, writeFile } from 'node:fs/promises';
|
|
4
3
|
import { join, relative, resolve } from 'node:path';
|
|
5
4
|
import process from 'node:process';
|
|
@@ -7,12 +6,15 @@ import { promisify } from 'node:util';
|
|
|
7
6
|
import { createInterface } from 'node:readline/promises';
|
|
8
7
|
import { fileURLToPath } from 'node:url';
|
|
9
8
|
import { logger } from '../logger.js';
|
|
10
|
-
import { createRuntimeCodexCommandContext, formatRuntimeSelectionSummary, parseRuntimeMode, resolveRuntimeCodexCommand } from './runtime/index.js';
|
|
11
9
|
import { detectValidator } from './rlm/validator.js';
|
|
12
10
|
import { buildRlmPrompt } from './rlm/prompt.js';
|
|
13
11
|
import { runRlmLoop } from './rlm/runner.js';
|
|
14
12
|
import { buildContextObject, ContextStore } from './rlm/context.js';
|
|
13
|
+
import { hasRunSource0Artifacts, readRunSource0Descriptor, resolveRunSource0Paths } from './run/source0.js';
|
|
14
|
+
import { buildRunMemoryPromptLines, selectRunMemoryForRole } from './run/runMemoryController.js';
|
|
15
15
|
import { runSymbolicLoop } from './rlm/symbolic.js';
|
|
16
|
+
import { COLLAB_ALLOW_DEFAULT_ROLE_ENV_CANONICAL, COLLAB_ALLOW_DEFAULT_ROLE_ENV_LEGACY, COLLAB_FEATURE_LEGACY, COLLAB_ROLE_POLICY_ENV_CANONICAL, COLLAB_ROLE_POLICY_ENV_LEGACY, createRlmCodexRuntimeShell, resolveCollabAllowDefaultRoleConfig, resolveCollabRolePolicyConfig } from './rlm/rlmCodexRuntimeShell.js';
|
|
17
|
+
import { DEFAULT_ALIGNMENT_POLICY } from './rlm/alignment.js';
|
|
16
18
|
const execAsync = promisify(exec);
|
|
17
19
|
const DEFAULT_MAX_ITERATIONS = 88;
|
|
18
20
|
const DEFAULT_MAX_MINUTES = 48 * 60;
|
|
@@ -43,22 +45,11 @@ const DEFAULT_ALIGNMENT_COOLDOWN_TURNS = 2;
|
|
|
43
45
|
const DEFAULT_ALIGNMENT_CONSENSUS_TOP_SCORE_MIN = 0.7;
|
|
44
46
|
const DEFAULT_ALIGNMENT_CONSENSUS_MARGIN_MIN = 0.15;
|
|
45
47
|
const DEFAULT_ALIGNMENT_CONSENSUS_REQUIRED_VOTES = 2;
|
|
46
|
-
const DEFAULT_ALIGNMENT_SENTINEL_MODEL =
|
|
47
|
-
const DEFAULT_ALIGNMENT_HIGH_REASONING_MODEL =
|
|
48
|
-
const DEFAULT_ALIGNMENT_ARBITRATION_MODEL =
|
|
49
|
-
const DEFAULT_ALIGNMENT_HIGH_REASONING_AVAILABLE =
|
|
50
|
-
const DEFAULT_COLLAB_ROLE_POLICY = 'enforce';
|
|
51
|
-
const COLLAB_ROLE_POLICY_ENV_CANONICAL = 'RLM_SYMBOLIC_MULTI_AGENT_ROLE_POLICY';
|
|
52
|
-
const COLLAB_ROLE_POLICY_ENV_LEGACY = 'RLM_COLLAB_ROLE_POLICY';
|
|
53
|
-
const COLLAB_ALLOW_DEFAULT_ROLE_ENV_CANONICAL = 'RLM_SYMBOLIC_MULTI_AGENT_ALLOW_DEFAULT_ROLE';
|
|
54
|
-
const COLLAB_ALLOW_DEFAULT_ROLE_ENV_LEGACY = 'RLM_COLLAB_ALLOW_DEFAULT_ROLE';
|
|
48
|
+
const DEFAULT_ALIGNMENT_SENTINEL_MODEL = DEFAULT_ALIGNMENT_POLICY.route.sentinel_model;
|
|
49
|
+
const DEFAULT_ALIGNMENT_HIGH_REASONING_MODEL = DEFAULT_ALIGNMENT_POLICY.route.high_reasoning_model;
|
|
50
|
+
const DEFAULT_ALIGNMENT_ARBITRATION_MODEL = DEFAULT_ALIGNMENT_POLICY.route.arbitration_model;
|
|
51
|
+
const DEFAULT_ALIGNMENT_HIGH_REASONING_AVAILABLE = DEFAULT_ALIGNMENT_POLICY.route.high_reasoning_available;
|
|
55
52
|
const UNBOUNDED_ITERATION_ALIASES = new Set(['unbounded', 'unlimited', 'infinite', 'infinity']);
|
|
56
|
-
const COLLAB_FEATURE_CANONICAL = 'multi_agent';
|
|
57
|
-
const COLLAB_FEATURE_LEGACY = 'collab';
|
|
58
|
-
const COLLAB_ROLE_TAG_PATTERN = /^\s*\[(?:agent_type|role)\s*:\s*([a-z0-9._-]+)\]/i;
|
|
59
|
-
const COLLAB_ROLE_TOKEN_PATTERN = /^[a-z0-9._-]+$/;
|
|
60
|
-
let runtimeCodexContextPromise = null;
|
|
61
|
-
let runtimeCodexContextLogged = false;
|
|
62
53
|
function parseArgs(argv) {
|
|
63
54
|
const parsed = {};
|
|
64
55
|
for (let i = 0; i < argv.length; i += 1) {
|
|
@@ -259,7 +250,7 @@ function resolveRlmMode(rawMode, options) {
|
|
|
259
250
|
}
|
|
260
251
|
return 'iterative';
|
|
261
252
|
}
|
|
262
|
-
async function resolveContextSource(env, fallbackText) {
|
|
253
|
+
async function resolveContextSource(env, repoRoot, fallbackText) {
|
|
263
254
|
const rawPath = env.RLM_CONTEXT_PATH?.trim();
|
|
264
255
|
if (rawPath) {
|
|
265
256
|
const resolvedPath = resolve(rawPath);
|
|
@@ -274,20 +265,61 @@ async function resolveContextSource(env, fallbackText) {
|
|
|
274
265
|
: (await stat(sourcePath)).size;
|
|
275
266
|
return {
|
|
276
267
|
source: { type: 'dir', value: resolvedPath },
|
|
277
|
-
bytes: byteLength
|
|
268
|
+
bytes: byteLength,
|
|
269
|
+
explicit: true
|
|
278
270
|
};
|
|
279
271
|
}
|
|
280
272
|
if (info.isFile()) {
|
|
281
|
-
return { source: { type: 'file', value: resolvedPath }, bytes: info.size };
|
|
273
|
+
return { source: { type: 'file', value: resolvedPath }, bytes: info.size, explicit: true };
|
|
282
274
|
}
|
|
283
275
|
throw new Error('context_source invalid');
|
|
284
276
|
}
|
|
277
|
+
const manifestPath = env.CODEX_ORCHESTRATOR_MANIFEST_PATH?.trim();
|
|
278
|
+
if (manifestPath) {
|
|
279
|
+
const rawManifestPath = resolve(repoRoot, manifestPath);
|
|
280
|
+
const rawManifest = JSON.parse(await readFile(rawManifestPath, 'utf8'));
|
|
281
|
+
const descriptor = readRunSource0Descriptor(rawManifest);
|
|
282
|
+
if (descriptor && (await hasRunSource0Artifacts(repoRoot, descriptor))) {
|
|
283
|
+
return {
|
|
284
|
+
source: { type: 'dir', value: resolveRunSource0Paths(repoRoot, descriptor).dirPath },
|
|
285
|
+
bytes: descriptor.byte_length,
|
|
286
|
+
explicit: true
|
|
287
|
+
};
|
|
288
|
+
}
|
|
289
|
+
}
|
|
285
290
|
const text = fallbackText ?? '';
|
|
286
291
|
return {
|
|
287
292
|
source: { type: 'text', value: text },
|
|
288
|
-
bytes: Buffer.byteLength(text, 'utf8')
|
|
293
|
+
bytes: Buffer.byteLength(text, 'utf8'),
|
|
294
|
+
explicit: false
|
|
289
295
|
};
|
|
290
296
|
}
|
|
297
|
+
async function resolvePlannerRunMemoryPromptLines(env, repoRoot, goal) {
|
|
298
|
+
const manifestPath = env.CODEX_ORCHESTRATOR_MANIFEST_PATH?.trim();
|
|
299
|
+
if (!manifestPath) {
|
|
300
|
+
return [];
|
|
301
|
+
}
|
|
302
|
+
try {
|
|
303
|
+
const rawManifestPath = resolve(repoRoot, manifestPath);
|
|
304
|
+
const rawManifest = JSON.parse(await readFile(rawManifestPath, 'utf8'));
|
|
305
|
+
const source0Descriptor = readRunSource0Descriptor(rawManifest);
|
|
306
|
+
const includeSource0 = !source0Descriptor || (await hasRunSource0Artifacts(repoRoot, source0Descriptor));
|
|
307
|
+
const selection = selectRunMemoryForRole({
|
|
308
|
+
role: 'planner',
|
|
309
|
+
manifest: rawManifest,
|
|
310
|
+
hints: [goal]
|
|
311
|
+
});
|
|
312
|
+
return buildRunMemoryPromptLines(includeSource0
|
|
313
|
+
? selection
|
|
314
|
+
: {
|
|
315
|
+
...selection,
|
|
316
|
+
refs: selection.refs.filter((ref) => ref.kind !== 'source_0')
|
|
317
|
+
});
|
|
318
|
+
}
|
|
319
|
+
catch {
|
|
320
|
+
return [];
|
|
321
|
+
}
|
|
322
|
+
}
|
|
291
323
|
async function promptForValidator(candidates) {
|
|
292
324
|
const rl = createInterface({ input: process.stdin, output: process.stdout });
|
|
293
325
|
try {
|
|
@@ -328,471 +360,14 @@ async function writeTerminalState(runDir, state) {
|
|
|
328
360
|
await mkdir(rlmDir, { recursive: true });
|
|
329
361
|
await writeFile(join(rlmDir, 'state.json'), JSON.stringify(state, null, 2), 'utf8');
|
|
330
362
|
}
|
|
331
|
-
async function runCodexAgent(input,
|
|
363
|
+
async function runCodexAgent(input, codexRuntimeShell, nonInteractive, subagentsEnabled) {
|
|
332
364
|
const prompt = buildRlmPrompt(input);
|
|
333
|
-
const output = await
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
const runtimeContext = await resolveRlmRuntimeCodexContext(env, repoRoot);
|
|
338
|
-
const { command, args: resolvedArgs } = resolveRuntimeCodexCommand(args, runtimeContext);
|
|
339
|
-
const childEnv = { ...process.env, ...env, ...runtimeContext.env };
|
|
340
|
-
if (nonInteractive) {
|
|
341
|
-
childEnv.CODEX_NON_INTERACTIVE = childEnv.CODEX_NON_INTERACTIVE ?? '1';
|
|
342
|
-
childEnv.CODEX_NO_INTERACTIVE = childEnv.CODEX_NO_INTERACTIVE ?? '1';
|
|
343
|
-
childEnv.CODEX_INTERACTIVE = childEnv.CODEX_INTERACTIVE ?? '0';
|
|
344
|
-
}
|
|
345
|
-
childEnv.CODEX_SUBAGENTS = subagentsEnabled ? '1' : '0';
|
|
346
|
-
const child = spawn(command, resolvedArgs, { cwd: repoRoot, env: childEnv, stdio: ['ignore', 'pipe', 'pipe'] });
|
|
347
|
-
let stdout = '';
|
|
348
|
-
let stderr = '';
|
|
349
|
-
child.stdout?.on('data', (chunk) => {
|
|
350
|
-
const text = chunk.toString();
|
|
351
|
-
stdout += text;
|
|
352
|
-
if (mirrorOutput) {
|
|
353
|
-
process.stdout.write(chunk);
|
|
354
|
-
}
|
|
355
|
-
});
|
|
356
|
-
child.stderr?.on('data', (chunk) => {
|
|
357
|
-
const text = chunk.toString();
|
|
358
|
-
stderr += text;
|
|
359
|
-
if (mirrorOutput) {
|
|
360
|
-
process.stderr.write(chunk);
|
|
361
|
-
}
|
|
362
|
-
});
|
|
363
|
-
await new Promise((resolvePromise, reject) => {
|
|
364
|
-
child.once('error', (error) => reject(error instanceof Error ? error : new Error(String(error))));
|
|
365
|
-
child.once('exit', (code) => {
|
|
366
|
-
if (code === 0) {
|
|
367
|
-
resolvePromise();
|
|
368
|
-
}
|
|
369
|
-
else {
|
|
370
|
-
reject(new Error(`codex exec exited with code ${code ?? 'unknown'}`));
|
|
371
|
-
}
|
|
372
|
-
});
|
|
365
|
+
const output = await codexRuntimeShell.runCompletion(prompt, {
|
|
366
|
+
nonInteractive,
|
|
367
|
+
subagentsEnabled,
|
|
368
|
+
mirrorOutput: true
|
|
373
369
|
});
|
|
374
|
-
return {
|
|
375
|
-
}
|
|
376
|
-
async function resolveRlmRuntimeCodexContext(env, repoRoot) {
|
|
377
|
-
if (!runtimeCodexContextPromise) {
|
|
378
|
-
const requestedMode = parseRuntimeMode(env.CODEX_ORCHESTRATOR_RUNTIME_MODE_ACTIVE ?? env.CODEX_ORCHESTRATOR_RUNTIME_MODE ?? null);
|
|
379
|
-
const runId = typeof env.CODEX_ORCHESTRATOR_RUN_ID === 'string' && env.CODEX_ORCHESTRATOR_RUN_ID.trim().length > 0
|
|
380
|
-
? env.CODEX_ORCHESTRATOR_RUN_ID.trim()
|
|
381
|
-
: `rlm-${Date.now()}`;
|
|
382
|
-
runtimeCodexContextPromise = createRuntimeCodexCommandContext({
|
|
383
|
-
requestedMode,
|
|
384
|
-
executionMode: 'mcp',
|
|
385
|
-
repoRoot,
|
|
386
|
-
env: { ...process.env, ...env },
|
|
387
|
-
runId
|
|
388
|
-
});
|
|
389
|
-
}
|
|
390
|
-
const runtimeContext = await runtimeCodexContextPromise;
|
|
391
|
-
if (!runtimeCodexContextLogged) {
|
|
392
|
-
logger.info(`[rlm-runtime] ${formatRuntimeSelectionSummary(runtimeContext.runtime)}`);
|
|
393
|
-
runtimeCodexContextLogged = true;
|
|
394
|
-
}
|
|
395
|
-
return runtimeContext;
|
|
396
|
-
}
|
|
397
|
-
async function runCodexCompletion(prompt, env, repoRoot, nonInteractive, subagentsEnabled, mirrorOutput) {
|
|
398
|
-
const { stdout, stderr } = await runCodexExec(['exec', prompt], env, repoRoot, nonInteractive, subagentsEnabled, mirrorOutput);
|
|
399
|
-
return [stdout.trim(), stderr.trim()].filter(Boolean).join('\n');
|
|
400
|
-
}
|
|
401
|
-
async function runCodexJsonlCompletion(prompt, env, repoRoot, nonInteractive, mirrorOutput, extraArgs = [], options = {}) {
|
|
402
|
-
const { stdout, stderr } = await runCodexExec(['exec', '--json', ...extraArgs, prompt], env, repoRoot, nonInteractive, false, mirrorOutput);
|
|
403
|
-
if (options.validateCollabLifecycle) {
|
|
404
|
-
const rolePolicy = options.collabRolePolicy ?? DEFAULT_COLLAB_ROLE_POLICY;
|
|
405
|
-
const validation = validateCollabLifecycle(stdout, {
|
|
406
|
-
requireSpawnRole: rolePolicy !== 'off',
|
|
407
|
-
allowDefaultRole: options.collabAllowDefaultRole ?? false
|
|
408
|
-
});
|
|
409
|
-
if (!validation.ok) {
|
|
410
|
-
const rolePolicyFailure = isRolePolicyValidationReason(validation.reasonCode);
|
|
411
|
-
if (rolePolicy === 'warn' && rolePolicyFailure) {
|
|
412
|
-
logger.warn(`Collab lifecycle validation warning: ${validation.reason}`);
|
|
413
|
-
}
|
|
414
|
-
else {
|
|
415
|
-
throw new Error(`Collab lifecycle validation failed: ${validation.reason}`);
|
|
416
|
-
}
|
|
417
|
-
}
|
|
418
|
-
}
|
|
419
|
-
const message = extractAgentMessageFromJsonl(stdout);
|
|
420
|
-
if (message) {
|
|
421
|
-
return message;
|
|
422
|
-
}
|
|
423
|
-
return [stdout.trim(), stderr.trim()].filter(Boolean).join('\n');
|
|
424
|
-
}
|
|
425
|
-
function parseFeatureFlagsFromText(raw) {
|
|
426
|
-
const flags = {};
|
|
427
|
-
for (const line of raw.split(/\r?\n/u)) {
|
|
428
|
-
const trimmed = line.trim();
|
|
429
|
-
if (!trimmed) {
|
|
430
|
-
continue;
|
|
431
|
-
}
|
|
432
|
-
const tokens = trimmed.split(/\s+/u);
|
|
433
|
-
if (tokens.length < 2) {
|
|
434
|
-
continue;
|
|
435
|
-
}
|
|
436
|
-
const name = tokens[0] ?? '';
|
|
437
|
-
const enabledToken = tokens[tokens.length - 1] ?? '';
|
|
438
|
-
if (!name) {
|
|
439
|
-
continue;
|
|
440
|
-
}
|
|
441
|
-
if (enabledToken === 'true') {
|
|
442
|
-
flags[name] = true;
|
|
443
|
-
}
|
|
444
|
-
else if (enabledToken === 'false') {
|
|
445
|
-
flags[name] = false;
|
|
446
|
-
}
|
|
447
|
-
}
|
|
448
|
-
return flags;
|
|
449
|
-
}
|
|
450
|
-
function resolveCollabFeatureKeyFromFlags(flags) {
|
|
451
|
-
if (Object.prototype.hasOwnProperty.call(flags, COLLAB_FEATURE_CANONICAL)) {
|
|
452
|
-
return COLLAB_FEATURE_CANONICAL;
|
|
453
|
-
}
|
|
454
|
-
if (Object.prototype.hasOwnProperty.call(flags, COLLAB_FEATURE_LEGACY)) {
|
|
455
|
-
return COLLAB_FEATURE_LEGACY;
|
|
456
|
-
}
|
|
457
|
-
return COLLAB_FEATURE_LEGACY;
|
|
458
|
-
}
|
|
459
|
-
async function resolveCollabFeatureKey(env, repoRoot, nonInteractive) {
|
|
460
|
-
try {
|
|
461
|
-
const { stdout } = await runCodexExec(['features', 'list'], env, repoRoot, nonInteractive, false, false);
|
|
462
|
-
return resolveCollabFeatureKeyFromFlags(parseFeatureFlagsFromText(stdout));
|
|
463
|
-
}
|
|
464
|
-
catch (error) {
|
|
465
|
-
logger.debug(`Unable to resolve Codex collab feature key via \`codex features list\`: ${error instanceof Error ? error.message : String(error)}`);
|
|
466
|
-
return COLLAB_FEATURE_LEGACY;
|
|
467
|
-
}
|
|
468
|
-
}
|
|
469
|
-
function extractAgentMessageFromJsonl(raw) {
|
|
470
|
-
let lastMessage = null;
|
|
471
|
-
const lines = raw.split(/\r?\n/);
|
|
472
|
-
for (const line of lines) {
|
|
473
|
-
const trimmed = line.trim();
|
|
474
|
-
if (!trimmed.startsWith('{')) {
|
|
475
|
-
continue;
|
|
476
|
-
}
|
|
477
|
-
try {
|
|
478
|
-
const parsed = JSON.parse(trimmed);
|
|
479
|
-
if ((parsed.type === 'item.completed' || parsed.type === 'item.updated') &&
|
|
480
|
-
parsed.item?.type === 'agent_message' &&
|
|
481
|
-
typeof parsed.item.text === 'string') {
|
|
482
|
-
lastMessage = parsed.item.text;
|
|
483
|
-
}
|
|
484
|
-
}
|
|
485
|
-
catch {
|
|
486
|
-
// ignore parse errors for non-json lines
|
|
487
|
-
}
|
|
488
|
-
}
|
|
489
|
-
return lastMessage;
|
|
490
|
-
}
|
|
491
|
-
function normalizeCollabStatus(value) {
|
|
492
|
-
if (value === 'in_progress' || value === 'completed' || value === 'failed') {
|
|
493
|
-
return value;
|
|
494
|
-
}
|
|
495
|
-
return 'unknown';
|
|
496
|
-
}
|
|
497
|
-
function parseCollabToolCallsFromJsonl(raw) {
|
|
498
|
-
const lines = raw.split(/\r?\n/);
|
|
499
|
-
const calls = [];
|
|
500
|
-
for (let index = 0; index < lines.length; index += 1) {
|
|
501
|
-
const line = lines[index]?.trim();
|
|
502
|
-
if (!line || !line.startsWith('{') || !line.includes('"collab_tool_call"')) {
|
|
503
|
-
continue;
|
|
504
|
-
}
|
|
505
|
-
try {
|
|
506
|
-
const parsed = JSON.parse(line);
|
|
507
|
-
if ((parsed.type !== 'item.started' && parsed.type !== 'item.updated' && parsed.type !== 'item.completed') ||
|
|
508
|
-
parsed.item?.type !== 'collab_tool_call' ||
|
|
509
|
-
typeof parsed.item.tool !== 'string') {
|
|
510
|
-
continue;
|
|
511
|
-
}
|
|
512
|
-
const receiverThreadIds = Array.isArray(parsed.item.receiver_thread_ids)
|
|
513
|
-
? parsed.item.receiver_thread_ids.filter((entry) => typeof entry === 'string')
|
|
514
|
-
: [];
|
|
515
|
-
const prompt = typeof parsed.item.prompt === 'string' ? parsed.item.prompt : null;
|
|
516
|
-
calls.push({
|
|
517
|
-
sequence: index,
|
|
518
|
-
eventType: parsed.type,
|
|
519
|
-
tool: parsed.item.tool,
|
|
520
|
-
status: normalizeCollabStatus(parsed.item.status),
|
|
521
|
-
receiverThreadIds,
|
|
522
|
-
prompt,
|
|
523
|
-
agentType: normalizeCollabRoleToken(parsed.item.agent_type),
|
|
524
|
-
promptRole: resolveCollabRoleFromPrompt(prompt)
|
|
525
|
-
});
|
|
526
|
-
}
|
|
527
|
-
catch {
|
|
528
|
-
continue;
|
|
529
|
-
}
|
|
530
|
-
}
|
|
531
|
-
return calls;
|
|
532
|
-
}
|
|
533
|
-
function formatLifecycleIds(ids) {
|
|
534
|
-
return ids.slice(0, 3).join(', ');
|
|
535
|
-
}
|
|
536
|
-
function normalizeCollabRoleToken(value) {
|
|
537
|
-
if (typeof value !== 'string') {
|
|
538
|
-
return null;
|
|
539
|
-
}
|
|
540
|
-
const normalized = value.trim().toLowerCase();
|
|
541
|
-
if (!normalized || !COLLAB_ROLE_TOKEN_PATTERN.test(normalized)) {
|
|
542
|
-
return null;
|
|
543
|
-
}
|
|
544
|
-
return normalized;
|
|
545
|
-
}
|
|
546
|
-
function resolveCollabRoleFromPrompt(value) {
|
|
547
|
-
if (typeof value !== 'string') {
|
|
548
|
-
return null;
|
|
549
|
-
}
|
|
550
|
-
const match = value.match(COLLAB_ROLE_TAG_PATTERN);
|
|
551
|
-
if (!match || typeof match[1] !== 'string') {
|
|
552
|
-
return null;
|
|
553
|
-
}
|
|
554
|
-
return normalizeCollabRoleToken(match[1]);
|
|
555
|
-
}
|
|
556
|
-
function resolveCollabRolePolicy(value) {
|
|
557
|
-
const normalized = (value ?? '').trim().toLowerCase();
|
|
558
|
-
if (!normalized) {
|
|
559
|
-
return DEFAULT_COLLAB_ROLE_POLICY;
|
|
560
|
-
}
|
|
561
|
-
if (normalized === 'off' ||
|
|
562
|
-
normalized === 'disabled' ||
|
|
563
|
-
normalized === 'none' ||
|
|
564
|
-
normalized === '0' ||
|
|
565
|
-
normalized === 'false') {
|
|
566
|
-
return 'off';
|
|
567
|
-
}
|
|
568
|
-
if (normalized === 'warn' || normalized === 'warning' || normalized === 'soft') {
|
|
569
|
-
return 'warn';
|
|
570
|
-
}
|
|
571
|
-
if (normalized === 'enforce' || normalized === 'strict' || normalized === 'on' || normalized === 'true' || normalized === '1') {
|
|
572
|
-
return 'enforce';
|
|
573
|
-
}
|
|
574
|
-
logger.warn(`Invalid multi-agent role policy value "${value}". Using "${DEFAULT_COLLAB_ROLE_POLICY}" ` +
|
|
575
|
-
`(expected: enforce|warn|off; canonical env ${COLLAB_ROLE_POLICY_ENV_CANONICAL}, ` +
|
|
576
|
-
`legacy alias ${COLLAB_ROLE_POLICY_ENV_LEGACY}).`);
|
|
577
|
-
return DEFAULT_COLLAB_ROLE_POLICY;
|
|
578
|
-
}
|
|
579
|
-
function resolveSymbolicMultiAgentRolePolicyConfig(env) {
|
|
580
|
-
const canonical = env[COLLAB_ROLE_POLICY_ENV_CANONICAL];
|
|
581
|
-
const legacy = env[COLLAB_ROLE_POLICY_ENV_LEGACY];
|
|
582
|
-
if (canonical !== undefined) {
|
|
583
|
-
if (legacy !== undefined && legacy.trim().toLowerCase() !== canonical.trim().toLowerCase()) {
|
|
584
|
-
logger.warn(`${COLLAB_ROLE_POLICY_ENV_LEGACY} is ignored because ${COLLAB_ROLE_POLICY_ENV_CANONICAL} is set.`);
|
|
585
|
-
}
|
|
586
|
-
return { value: resolveCollabRolePolicy(canonical), source: 'canonical' };
|
|
587
|
-
}
|
|
588
|
-
if (legacy !== undefined) {
|
|
589
|
-
return { value: resolveCollabRolePolicy(legacy), source: 'legacy' };
|
|
590
|
-
}
|
|
591
|
-
return { value: resolveCollabRolePolicy(undefined), source: null };
|
|
592
|
-
}
|
|
593
|
-
function resolveSymbolicMultiAgentAllowDefaultRoleConfig(env) {
|
|
594
|
-
const canonical = env[COLLAB_ALLOW_DEFAULT_ROLE_ENV_CANONICAL];
|
|
595
|
-
const legacy = env[COLLAB_ALLOW_DEFAULT_ROLE_ENV_LEGACY];
|
|
596
|
-
if (canonical !== undefined) {
|
|
597
|
-
if (legacy !== undefined && envFlagEnabled(legacy) !== envFlagEnabled(canonical)) {
|
|
598
|
-
logger.warn(`${COLLAB_ALLOW_DEFAULT_ROLE_ENV_LEGACY} is ignored because ${COLLAB_ALLOW_DEFAULT_ROLE_ENV_CANONICAL} is set.`);
|
|
599
|
-
}
|
|
600
|
-
return { value: envFlagEnabled(canonical), source: 'canonical' };
|
|
601
|
-
}
|
|
602
|
-
if (legacy !== undefined) {
|
|
603
|
-
return { value: envFlagEnabled(legacy), source: 'legacy' };
|
|
604
|
-
}
|
|
605
|
-
return { value: false, source: null };
|
|
606
|
-
}
|
|
607
|
-
function isRolePolicyValidationReason(reasonCode) {
|
|
608
|
-
return (reasonCode === 'missing_role' ||
|
|
609
|
-
reasonCode === 'default_role_disallowed' ||
|
|
610
|
-
reasonCode === 'role_mismatch');
|
|
611
|
-
}
|
|
612
|
-
function includesThreadLimit(text) {
|
|
613
|
-
return text.toLowerCase().includes('agent thread limit reached');
|
|
614
|
-
}
|
|
615
|
-
function hasCollabSpawnThreadLimitError(raw) {
|
|
616
|
-
const lines = raw.split('\n');
|
|
617
|
-
for (const line of lines) {
|
|
618
|
-
const trimmed = line.trim();
|
|
619
|
-
if (!trimmed.startsWith('{')) {
|
|
620
|
-
continue;
|
|
621
|
-
}
|
|
622
|
-
try {
|
|
623
|
-
const parsed = JSON.parse(trimmed);
|
|
624
|
-
const item = parsed.item;
|
|
625
|
-
if (!item ||
|
|
626
|
-
item.type !== 'collab_tool_call' ||
|
|
627
|
-
item.tool !== 'spawn_agent') {
|
|
628
|
-
continue;
|
|
629
|
-
}
|
|
630
|
-
const candidates = [];
|
|
631
|
-
if (typeof item.error === 'string') {
|
|
632
|
-
candidates.push(item.error);
|
|
633
|
-
}
|
|
634
|
-
if (typeof item.message === 'string') {
|
|
635
|
-
candidates.push(item.message);
|
|
636
|
-
}
|
|
637
|
-
if (typeof item.output === 'string') {
|
|
638
|
-
candidates.push(item.output);
|
|
639
|
-
}
|
|
640
|
-
if (typeof parsed.error?.message === 'string') {
|
|
641
|
-
candidates.push(parsed.error.message);
|
|
642
|
-
}
|
|
643
|
-
if (candidates.some((entry) => includesThreadLimit(entry))) {
|
|
644
|
-
return true;
|
|
645
|
-
}
|
|
646
|
-
}
|
|
647
|
-
catch {
|
|
648
|
-
continue;
|
|
649
|
-
}
|
|
650
|
-
}
|
|
651
|
-
return false;
|
|
652
|
-
}
|
|
653
|
-
function validateCollabLifecycle(raw, options = {}) {
|
|
654
|
-
const requireSpawnRole = options.requireSpawnRole !== false;
|
|
655
|
-
const allowDefaultRole = options.allowDefaultRole === true;
|
|
656
|
-
if (hasCollabSpawnThreadLimitError(raw)) {
|
|
657
|
-
return { ok: false, reason: 'collab spawn hit thread limit', reasonCode: 'thread_limit' };
|
|
658
|
-
}
|
|
659
|
-
const calls = parseCollabToolCallsFromJsonl(raw);
|
|
660
|
-
if (calls.length === 0) {
|
|
661
|
-
return { ok: true };
|
|
662
|
-
}
|
|
663
|
-
const spawnedAt = new Map();
|
|
664
|
-
const waitedAt = new Map();
|
|
665
|
-
const closedAt = new Map();
|
|
666
|
-
const missingRoleIds = new Set();
|
|
667
|
-
const disallowedDefaultRoleIds = new Set();
|
|
668
|
-
const mismatchedRoleIds = new Set();
|
|
669
|
-
const roleByThread = new Map();
|
|
670
|
-
for (const call of calls) {
|
|
671
|
-
const isCompleted = call.status === 'completed' || (call.status === 'unknown' && call.eventType === 'item.completed');
|
|
672
|
-
if (!isCompleted) {
|
|
673
|
-
continue;
|
|
674
|
-
}
|
|
675
|
-
if (call.tool === 'spawn_agent') {
|
|
676
|
-
const explicitRole = call.agentType;
|
|
677
|
-
const promptRole = call.promptRole;
|
|
678
|
-
const effectiveRole = explicitRole ?? promptRole;
|
|
679
|
-
const roleTargets = call.receiverThreadIds.length > 0 ? call.receiverThreadIds : [`spawn@${call.sequence}`];
|
|
680
|
-
if (requireSpawnRole && !effectiveRole) {
|
|
681
|
-
for (const target of roleTargets) {
|
|
682
|
-
missingRoleIds.add(target);
|
|
683
|
-
}
|
|
684
|
-
}
|
|
685
|
-
else if (effectiveRole === 'default' && !allowDefaultRole) {
|
|
686
|
-
for (const target of roleTargets) {
|
|
687
|
-
disallowedDefaultRoleIds.add(target);
|
|
688
|
-
}
|
|
689
|
-
}
|
|
690
|
-
if (explicitRole && promptRole && explicitRole !== promptRole) {
|
|
691
|
-
for (const target of roleTargets) {
|
|
692
|
-
mismatchedRoleIds.add(target);
|
|
693
|
-
}
|
|
694
|
-
}
|
|
695
|
-
for (const threadId of call.receiverThreadIds) {
|
|
696
|
-
if (!spawnedAt.has(threadId)) {
|
|
697
|
-
spawnedAt.set(threadId, call.sequence);
|
|
698
|
-
}
|
|
699
|
-
if (!effectiveRole) {
|
|
700
|
-
continue;
|
|
701
|
-
}
|
|
702
|
-
const previous = roleByThread.get(threadId);
|
|
703
|
-
if (previous && previous !== effectiveRole) {
|
|
704
|
-
mismatchedRoleIds.add(threadId);
|
|
705
|
-
continue;
|
|
706
|
-
}
|
|
707
|
-
roleByThread.set(threadId, effectiveRole);
|
|
708
|
-
}
|
|
709
|
-
continue;
|
|
710
|
-
}
|
|
711
|
-
for (const threadId of call.receiverThreadIds) {
|
|
712
|
-
if (call.tool === 'wait') {
|
|
713
|
-
waitedAt.set(threadId, call.sequence);
|
|
714
|
-
}
|
|
715
|
-
else if (call.tool === 'close_agent') {
|
|
716
|
-
closedAt.set(threadId, call.sequence);
|
|
717
|
-
}
|
|
718
|
-
}
|
|
719
|
-
}
|
|
720
|
-
const spawnedIds = Array.from(spawnedAt.keys());
|
|
721
|
-
if (spawnedIds.length > 0) {
|
|
722
|
-
const missingWait = spawnedIds.filter((threadId) => !waitedAt.has(threadId));
|
|
723
|
-
if (missingWait.length > 0) {
|
|
724
|
-
return {
|
|
725
|
-
ok: false,
|
|
726
|
-
reason: `missing wait for spawned agent(s): ${formatLifecycleIds(missingWait)}`,
|
|
727
|
-
reasonCode: 'missing_wait'
|
|
728
|
-
};
|
|
729
|
-
}
|
|
730
|
-
const missingClose = spawnedIds.filter((threadId) => !closedAt.has(threadId));
|
|
731
|
-
if (missingClose.length > 0) {
|
|
732
|
-
return {
|
|
733
|
-
ok: false,
|
|
734
|
-
reason: `missing close_agent for spawned agent(s): ${formatLifecycleIds(missingClose)}`,
|
|
735
|
-
reasonCode: 'missing_close'
|
|
736
|
-
};
|
|
737
|
-
}
|
|
738
|
-
const invalidOrder = spawnedIds.filter((threadId) => {
|
|
739
|
-
const waitSequence = waitedAt.get(threadId);
|
|
740
|
-
const closeSequence = closedAt.get(threadId);
|
|
741
|
-
if (waitSequence === undefined || closeSequence === undefined) {
|
|
742
|
-
return false;
|
|
743
|
-
}
|
|
744
|
-
return closeSequence < waitSequence;
|
|
745
|
-
});
|
|
746
|
-
if (invalidOrder.length > 0) {
|
|
747
|
-
return {
|
|
748
|
-
ok: false,
|
|
749
|
-
reason: `close_agent before wait for agent(s): ${formatLifecycleIds(invalidOrder)}`,
|
|
750
|
-
reasonCode: 'close_before_wait'
|
|
751
|
-
};
|
|
752
|
-
}
|
|
753
|
-
}
|
|
754
|
-
if (!requireSpawnRole) {
|
|
755
|
-
return { ok: true };
|
|
756
|
-
}
|
|
757
|
-
if (missingRoleIds.size > 0) {
|
|
758
|
-
return {
|
|
759
|
-
ok: false,
|
|
760
|
-
reason: `missing explicit role for spawn_agent call(s): ${formatLifecycleIds(Array.from(missingRoleIds))}. ` +
|
|
761
|
-
'Prefix prompts with [agent_type:<role>] and set spawn_agent.agent_type when supported.',
|
|
762
|
-
reasonCode: 'missing_role'
|
|
763
|
-
};
|
|
764
|
-
}
|
|
765
|
-
if (disallowedDefaultRoleIds.size > 0) {
|
|
766
|
-
return {
|
|
767
|
-
ok: false,
|
|
768
|
-
reason: `spawn_agent used disallowed default role for: ${formatLifecycleIds(Array.from(disallowedDefaultRoleIds))}. ` +
|
|
769
|
-
'Set a non-default agent_type explicitly.',
|
|
770
|
-
reasonCode: 'default_role_disallowed'
|
|
771
|
-
};
|
|
772
|
-
}
|
|
773
|
-
if (mismatchedRoleIds.size > 0) {
|
|
774
|
-
return {
|
|
775
|
-
ok: false,
|
|
776
|
-
reason: `spawn_agent role mismatch for agent(s): ${formatLifecycleIds(Array.from(mismatchedRoleIds))}`,
|
|
777
|
-
reasonCode: 'role_mismatch'
|
|
778
|
-
};
|
|
779
|
-
}
|
|
780
|
-
return { ok: true };
|
|
781
|
-
}
|
|
782
|
-
function buildCollabSubcallPrompt(prompt) {
|
|
783
|
-
return [
|
|
784
|
-
'Use collab tools to run the sub-agent prompt below.',
|
|
785
|
-
'For every spawned agent id, execute this lifecycle in order:',
|
|
786
|
-
'1) spawn_agent with explicit agent_type (never omit it; omission defaults to `default`),',
|
|
787
|
-
' and prefix the spawned prompt with [agent_type:<same-role>] on the first line',
|
|
788
|
-
'2) wait (for that same id)',
|
|
789
|
-
'3) close_agent (for that same id)',
|
|
790
|
-
'Never leave spawned agents unclosed, including timeout or error paths.',
|
|
791
|
-
'Return only the sub-agent response text and nothing else.',
|
|
792
|
-
'',
|
|
793
|
-
'Sub-agent prompt:',
|
|
794
|
-
prompt
|
|
795
|
-
].join('\n');
|
|
370
|
+
return { output };
|
|
796
371
|
}
|
|
797
372
|
function normalizeExitCode(code) {
|
|
798
373
|
if (typeof code === 'number' && Number.isInteger(code)) {
|
|
@@ -901,13 +476,15 @@ async function main() {
|
|
|
901
476
|
}
|
|
902
477
|
let contextSource;
|
|
903
478
|
let contextBytes;
|
|
479
|
+
let hasExplicitContextSource = false;
|
|
904
480
|
try {
|
|
905
|
-
const resolved = await resolveContextSource(env, goal);
|
|
481
|
+
const resolved = await resolveContextSource(env, repoRoot, goal);
|
|
906
482
|
contextSource = resolved.source;
|
|
907
483
|
contextBytes = resolved.bytes;
|
|
484
|
+
hasExplicitContextSource = resolved.explicit;
|
|
908
485
|
}
|
|
909
486
|
catch (error) {
|
|
910
|
-
await writeStateAndExit('invalid_config', 5, `Invalid
|
|
487
|
+
await writeStateAndExit('invalid_config', 5, `Invalid RLM context source (${error instanceof Error ? error.message : String(error)}).`, {
|
|
911
488
|
goal,
|
|
912
489
|
roles,
|
|
913
490
|
maxIterations,
|
|
@@ -916,7 +493,7 @@ async function main() {
|
|
|
916
493
|
return;
|
|
917
494
|
}
|
|
918
495
|
const delegated = Boolean(env.CODEX_DELEGATION_PARENT_MANIFEST_PATH?.trim());
|
|
919
|
-
const hasContextPath =
|
|
496
|
+
const hasContextPath = hasExplicitContextSource;
|
|
920
497
|
const mode = resolveRlmMode(env.RLM_MODE, {
|
|
921
498
|
delegated,
|
|
922
499
|
contextBytes,
|
|
@@ -1055,9 +632,9 @@ async function main() {
|
|
|
1055
632
|
const subagentsEnabled = envFlagEnabled(env.CODEX_SUBAGENTS) || envFlagEnabled(env.RLM_SUBAGENTS);
|
|
1056
633
|
const symbolicMultiAgent = resolveSymbolicMultiAgentConfig(env);
|
|
1057
634
|
const symbolicCollabEnabled = symbolicMultiAgent.enabled;
|
|
1058
|
-
const collabRolePolicyConfig =
|
|
635
|
+
const collabRolePolicyConfig = resolveCollabRolePolicyConfig(env);
|
|
1059
636
|
const collabRolePolicy = collabRolePolicyConfig.value;
|
|
1060
|
-
const collabAllowDefaultRoleConfig =
|
|
637
|
+
const collabAllowDefaultRoleConfig = resolveCollabAllowDefaultRoleConfig(env);
|
|
1061
638
|
const collabAllowDefaultRole = collabAllowDefaultRoleConfig.value;
|
|
1062
639
|
const symbolicDeliberationEnabled = env.RLM_SYMBOLIC_DELIBERATION === undefined
|
|
1063
640
|
? true
|
|
@@ -1067,6 +644,7 @@ async function main() {
|
|
|
1067
644
|
: envFlagEnabled(env.RLM_SYMBOLIC_DELIBERATION_INCLUDE_IN_PLANNER);
|
|
1068
645
|
const symbolicDeliberationLogArtifacts = envFlagEnabled(env.RLM_SYMBOLIC_DELIBERATION_LOG);
|
|
1069
646
|
const nonInteractive = shouldForceNonInteractive(env);
|
|
647
|
+
const codexRuntimeShell = createRlmCodexRuntimeShell({ env, repoRoot });
|
|
1070
648
|
if (mode === 'symbolic') {
|
|
1071
649
|
if (symbolicMultiAgent.source === 'legacy') {
|
|
1072
650
|
logger.warn('RLM_SYMBOLIC_COLLAB is a legacy alias; prefer RLM_SYMBOLIC_MULTI_AGENT.');
|
|
@@ -1078,7 +656,7 @@ async function main() {
|
|
|
1078
656
|
logger.warn(`${COLLAB_ALLOW_DEFAULT_ROLE_ENV_LEGACY} is a legacy alias; prefer ${COLLAB_ALLOW_DEFAULT_ROLE_ENV_CANONICAL}.`);
|
|
1079
657
|
}
|
|
1080
658
|
const collabFeatureKey = symbolicCollabEnabled
|
|
1081
|
-
? await resolveCollabFeatureKey(
|
|
659
|
+
? await codexRuntimeShell.resolveCollabFeatureKey(nonInteractive)
|
|
1082
660
|
: COLLAB_FEATURE_LEGACY;
|
|
1083
661
|
if (symbolicCollabEnabled) {
|
|
1084
662
|
logger.info(`Symbolic collab feature key: ${collabFeatureKey}`);
|
|
@@ -1255,6 +833,7 @@ async function main() {
|
|
|
1255
833
|
context: contextInfo
|
|
1256
834
|
});
|
|
1257
835
|
const contextStore = new ContextStore(contextObject);
|
|
836
|
+
const runMemoryPromptLines = mode === 'symbolic' ? await resolvePlannerRunMemoryPromptLines(env, repoRoot, goal) : [];
|
|
1258
837
|
const result = await runSymbolicLoop({
|
|
1259
838
|
goal,
|
|
1260
839
|
baseState,
|
|
@@ -1264,6 +843,7 @@ async function main() {
|
|
|
1264
843
|
runDir: rlmRoot,
|
|
1265
844
|
contextStore,
|
|
1266
845
|
budgets,
|
|
846
|
+
runMemoryPromptLines,
|
|
1267
847
|
alignment: alignmentCheckerEnabled
|
|
1268
848
|
? {
|
|
1269
849
|
enabled: true,
|
|
@@ -1278,21 +858,17 @@ async function main() {
|
|
|
1278
858
|
: undefined,
|
|
1279
859
|
runPlanner: (prompt, _attempt) => {
|
|
1280
860
|
void _attempt;
|
|
1281
|
-
return
|
|
861
|
+
return codexRuntimeShell.runJsonlCompletion(prompt, {
|
|
862
|
+
nonInteractive,
|
|
863
|
+
mirrorOutput: false
|
|
864
|
+
});
|
|
1282
865
|
},
|
|
1283
866
|
runSubcall: (prompt, _meta) => {
|
|
1284
867
|
void _meta;
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
const collabPrompt = buildCollabSubcallPrompt(prompt);
|
|
1289
|
-
return runCodexJsonlCompletion(collabPrompt, env, repoRoot, nonInteractive, true, [
|
|
1290
|
-
'--enable',
|
|
868
|
+
return codexRuntimeShell.runSymbolicPrompt(prompt, {
|
|
869
|
+
nonInteractive,
|
|
870
|
+
symbolicCollabEnabled,
|
|
1291
871
|
collabFeatureKey,
|
|
1292
|
-
'--sandbox',
|
|
1293
|
-
'read-only'
|
|
1294
|
-
], {
|
|
1295
|
-
validateCollabLifecycle: true,
|
|
1296
872
|
collabRolePolicy,
|
|
1297
873
|
collabAllowDefaultRole
|
|
1298
874
|
});
|
|
@@ -1307,17 +883,10 @@ async function main() {
|
|
|
1307
883
|
logArtifacts: symbolicDeliberationLogArtifacts,
|
|
1308
884
|
run: (prompt, _meta) => {
|
|
1309
885
|
void _meta;
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
const collabPrompt = buildCollabSubcallPrompt(prompt);
|
|
1314
|
-
return runCodexJsonlCompletion(collabPrompt, env, repoRoot, nonInteractive, true, [
|
|
1315
|
-
'--enable',
|
|
886
|
+
return codexRuntimeShell.runSymbolicPrompt(prompt, {
|
|
887
|
+
nonInteractive,
|
|
888
|
+
symbolicCollabEnabled,
|
|
1316
889
|
collabFeatureKey,
|
|
1317
|
-
'--sandbox',
|
|
1318
|
-
'read-only'
|
|
1319
|
-
], {
|
|
1320
|
-
validateCollabLifecycle: true,
|
|
1321
890
|
collabRolePolicy,
|
|
1322
891
|
collabAllowDefaultRole
|
|
1323
892
|
});
|
|
@@ -1342,7 +911,7 @@ async function main() {
|
|
|
1342
911
|
subagentsEnabled,
|
|
1343
912
|
repoRoot,
|
|
1344
913
|
runDir: rlmRoot,
|
|
1345
|
-
runAgent: (input) => runCodexAgent(input,
|
|
914
|
+
runAgent: (input) => runCodexAgent(input, codexRuntimeShell, nonInteractive, subagentsEnabled),
|
|
1346
915
|
runValidator: (command) => runValidatorCommand(command, repoRoot),
|
|
1347
916
|
logger: (line) => logger.info(line)
|
|
1348
917
|
});
|
|
@@ -1371,18 +940,9 @@ export const __test__ = {
|
|
|
1371
940
|
resolveAlignmentCheckerEnabled,
|
|
1372
941
|
resolveAlignmentCheckerEnforce,
|
|
1373
942
|
resolveSymbolicMultiAgentConfig,
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
parseFeatureFlagsFromText,
|
|
1377
|
-
resolveCollabFeatureKeyFromFlags,
|
|
1378
|
-
resolveCollabRolePolicy,
|
|
1379
|
-
isRolePolicyValidationReason,
|
|
943
|
+
resolveContextSource,
|
|
944
|
+
resolvePlannerRunMemoryPromptLines,
|
|
1380
945
|
resolveRlmMode,
|
|
1381
|
-
parseCollabToolCallsFromJsonl,
|
|
1382
|
-
validateCollabLifecycle,
|
|
1383
|
-
buildCollabSubcallPrompt,
|
|
1384
|
-
COLLAB_FEATURE_CANONICAL,
|
|
1385
|
-
COLLAB_FEATURE_LEGACY,
|
|
1386
946
|
DEFAULT_MAX_ITERATIONS,
|
|
1387
947
|
DEFAULT_MAX_MINUTES,
|
|
1388
948
|
DEFAULT_SYMBOLIC_MIN_BYTES,
|