@opencorelabs/lucidity 0.7.0 → 0.9.5
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/README.md +9 -2
- package/dist/assets/speech/lucidity-speech +0 -0
- package/dist/automations/agent.d.ts.map +1 -1
- package/dist/automations/agent.js +2 -0
- package/dist/automations/designer.d.ts +1 -1
- package/dist/automations/service.d.ts +4 -0
- package/dist/automations/service.d.ts.map +1 -1
- package/dist/automations/service.js +60 -22
- package/dist/automations/store.d.ts +9 -3
- package/dist/automations/store.d.ts.map +1 -1
- package/dist/automations/store.js +45 -32
- package/dist/automations/workflow.d.ts +14 -0
- package/dist/automations/workflow.d.ts.map +1 -0
- package/dist/automations/workflow.js +57 -0
- package/dist/chat/server.d.ts +1 -0
- package/dist/chat/server.d.ts.map +1 -1
- package/dist/chat/server.js +6 -1
- package/dist/coding/listPrs.d.ts +2 -0
- package/dist/coding/listPrs.d.ts.map +1 -1
- package/dist/coding/listPrs.js +10 -0
- package/dist/coding/runCodeTurn.d.ts +6 -30
- package/dist/coding/runCodeTurn.d.ts.map +1 -1
- package/dist/coding/runCodeTurn.js +145 -218
- package/dist/coding/runReview.d.ts +10 -0
- package/dist/coding/runReview.d.ts.map +1 -0
- package/dist/coding/runReview.js +87 -0
- package/dist/coding/workspaceRegistry.d.ts +72 -0
- package/dist/coding/workspaceRegistry.d.ts.map +1 -0
- package/dist/coding/workspaceRegistry.js +421 -0
- package/dist/coding/worktree.d.ts +72 -32
- package/dist/coding/worktree.d.ts.map +1 -1
- package/dist/coding/worktree.js +190 -38
- package/dist/coding/worktreeSetup.d.ts +7 -0
- package/dist/coding/worktreeSetup.d.ts.map +1 -0
- package/dist/coding/worktreeSetup.js +49 -0
- package/dist/config.d.ts +2 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/daemonLease.d.ts +12 -0
- package/dist/daemonLease.d.ts.map +1 -0
- package/dist/daemonLease.js +32 -0
- package/dist/goals/assessment.d.ts +115 -0
- package/dist/goals/assessment.d.ts.map +1 -0
- package/dist/goals/assessment.js +67 -0
- package/dist/goals/notes.d.ts +18 -0
- package/dist/goals/notes.d.ts.map +1 -0
- package/dist/goals/notes.js +72 -0
- package/dist/index.js +75 -40
- package/dist/jobs/briefing.d.ts +2 -16
- package/dist/jobs/briefing.d.ts.map +1 -1
- package/dist/jobs/briefing.js +65 -93
- package/dist/jobs/goals.d.ts +15 -0
- package/dist/jobs/goals.d.ts.map +1 -0
- package/dist/jobs/goals.js +286 -0
- package/dist/jobs/weeklyReview.d.ts.map +1 -1
- package/dist/jobs/weeklyReview.js +3 -2
- package/dist/logTimestamps.d.ts +10 -0
- package/dist/logTimestamps.d.ts.map +1 -0
- package/dist/logTimestamps.js +12 -0
- package/dist/providerRecovery.d.ts +48 -0
- package/dist/providerRecovery.d.ts.map +1 -0
- package/dist/providerRecovery.js +100 -0
- package/dist/queue.d.ts +1 -0
- package/dist/queue.d.ts.map +1 -1
- package/dist/queue.js +4 -0
- package/dist/room/client.d.ts +6 -19
- package/dist/room/client.d.ts.map +1 -1
- package/dist/room/client.js +127 -123
- package/dist/room/computer.js +1 -1
- package/dist/room/durablePublish.d.ts +6 -0
- package/dist/room/durablePublish.d.ts.map +1 -0
- package/dist/room/durablePublish.js +19 -0
- package/dist/room/incidents.d.ts +4 -1
- package/dist/room/incidents.d.ts.map +1 -1
- package/dist/room/incidents.js +15 -7
- package/dist/room/turnQueue.d.ts.map +1 -1
- package/dist/room/turnQueue.js +55 -46
- package/dist/runtimeStore.d.ts +46 -0
- package/dist/runtimeStore.d.ts.map +1 -0
- package/dist/runtimeStore.js +205 -0
- package/dist/setup/server.js +1 -1
- package/dist/turnLog.d.ts +10 -40
- package/dist/turnLog.d.ts.map +1 -1
- package/dist/turnLog.js +33 -56
- package/dist/vault.d.ts +6 -3
- package/dist/vault.d.ts.map +1 -1
- package/dist/vault.js +18 -4
- package/package.json +4 -4
- package/src/automations/agent.ts +2 -0
- package/src/automations/service.ts +47 -21
- package/src/automations/store.ts +41 -50
- package/src/automations/workflow.ts +49 -0
- package/src/chat/server.ts +7 -1
- package/src/coding/listPrs.ts +14 -0
- package/src/coding/runCodeTurn.ts +51 -139
- package/src/coding/runReview.ts +83 -0
- package/src/coding/workspaceRegistry.ts +380 -0
- package/src/coding/worktree.ts +205 -40
- package/src/coding/worktreeSetup.ts +50 -0
- package/src/config.ts +2 -0
- package/src/daemonLease.ts +33 -0
- package/src/goals/assessment.ts +106 -0
- package/src/goals/notes.ts +88 -0
- package/src/index.ts +76 -46
- package/src/jobs/briefing.ts +62 -109
- package/src/jobs/goals.ts +384 -0
- package/src/jobs/weeklyReview.ts +4 -3
- package/src/logTimestamps.ts +14 -0
- package/src/providerRecovery.ts +99 -0
- package/src/queue.ts +4 -0
- package/src/room/client.ts +84 -116
- package/src/room/computer.ts +1 -1
- package/src/room/durablePublish.ts +25 -0
- package/src/room/incidents.ts +20 -8
- package/src/room/turnQueue.ts +53 -56
- package/src/runtimeStore.ts +207 -0
- package/src/setup/server.ts +1 -1
- package/src/turnLog.ts +32 -75
- package/src/vault.ts +16 -7
- package/vendor/mcp-server/dist/index.js +2 -0
- package/vendor/mcp-server/dist/tools/goals.d.ts +4 -0
- package/vendor/mcp-server/dist/tools/goals.d.ts.map +1 -0
- package/vendor/mcp-server/dist/tools/goals.js +38 -0
- package/vendor/mcp-server/package.json +1 -1
- package/vendor/mcp-server/src/index.ts +2 -0
- package/vendor/mcp-server/src/tools/goals.ts +62 -0
- package/vendor/runtime/README.md +36 -2
- package/vendor/runtime/dist/executor/asyncQueue.d.ts +1 -0
- package/vendor/runtime/dist/executor/asyncQueue.d.ts.map +1 -1
- package/vendor/runtime/dist/executor/asyncQueue.js +3 -0
- package/vendor/runtime/dist/executor/claudeAgent.d.ts +5 -1
- package/vendor/runtime/dist/executor/claudeAgent.d.ts.map +1 -1
- package/vendor/runtime/dist/executor/claudeAgent.js +77 -13
- package/vendor/runtime/dist/executor/codex.d.ts +8 -2
- package/vendor/runtime/dist/executor/codex.d.ts.map +1 -1
- package/vendor/runtime/dist/executor/codex.js +113 -38
- package/vendor/runtime/dist/executor/codexProtocol/AgentPath.d.ts +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/AgentPath.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/AgentPath.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/FunctionCallOutputContentItem.d.ts +4 -1
- package/vendor/runtime/dist/executor/codexProtocol/FunctionCallOutputContentItem.d.ts.map +1 -1
- package/vendor/runtime/dist/executor/codexProtocol/ImageGenerationFailure.d.ts +6 -0
- package/vendor/runtime/dist/executor/codexProtocol/ImageGenerationFailure.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/ImageGenerationFailure.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/ImageGenerationItem.d.ts +12 -0
- package/vendor/runtime/dist/executor/codexProtocol/ImageGenerationItem.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/ImageGenerationItem.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/LegacyAppPathString.d.ts +24 -0
- package/vendor/runtime/dist/executor/codexProtocol/LegacyAppPathString.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/LegacyAppPathString.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/MessagePhase.d.ts +8 -0
- package/vendor/runtime/dist/executor/codexProtocol/MessagePhase.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/MessagePhase.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/Personality.d.ts +3 -0
- package/vendor/runtime/dist/executor/codexProtocol/Personality.d.ts.map +1 -1
- package/vendor/runtime/dist/executor/codexProtocol/PlanType.d.ts +1 -1
- package/vendor/runtime/dist/executor/codexProtocol/PlanType.d.ts.map +1 -1
- package/vendor/runtime/dist/executor/codexProtocol/SleepItem.d.ts +8 -0
- package/vendor/runtime/dist/executor/codexProtocol/SleepItem.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/SleepItem.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/SubAgentSource.d.ts +14 -0
- package/vendor/runtime/dist/executor/codexProtocol/SubAgentSource.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/SubAgentSource.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/ThreadId.d.ts +7 -0
- package/vendor/runtime/dist/executor/codexProtocol/ThreadId.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/ThreadId.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/WebSearchItem.d.ts +15 -0
- package/vendor/runtime/dist/executor/codexProtocol/WebSearchItem.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/WebSearchItem.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/AgentMessageDelivery.d.ts +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/AgentMessageDelivery.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/AgentMessageDelivery.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/AsyncUserInputQuestion.d.ts +5 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/AsyncUserInputQuestion.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/AsyncUserInputQuestion.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/CodexErrorInfo.d.ts +29 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/CodexErrorInfo.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/CodexErrorInfo.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/CollabAgentState.d.ts +6 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/CollabAgentState.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/CollabAgentState.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/CollabAgentStatus.d.ts +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/CollabAgentStatus.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/CollabAgentStatus.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/CollabAgentTool.d.ts +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/CollabAgentTool.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/CollabAgentTool.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/CollabAgentToolCallStatus.d.ts +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/CollabAgentToolCallStatus.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/CollabAgentToolCallStatus.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/CommandAction.d.ts +20 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/CommandAction.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/CommandAction.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/CommandExecutionSource.d.ts +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/CommandExecutionSource.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/CommandExecutionSource.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/CommandExecutionStatus.d.ts +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/CommandExecutionStatus.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/CommandExecutionStatus.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/CyberAccessProgram.d.ts +6 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/CyberAccessProgram.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/CyberAccessProgram.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/DynamicToolCallOutputContentItem.d.ts +11 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/DynamicToolCallOutputContentItem.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/DynamicToolCallOutputContentItem.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/DynamicToolCallStatus.d.ts +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/DynamicToolCallStatus.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/DynamicToolCallStatus.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/FileUpdateChange.d.ts +7 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/FileUpdateChange.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/FileUpdateChange.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/GetAccountRateLimitsResponse.d.ts +5 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/GetAccountRateLimitsResponse.d.ts.map +1 -1
- package/vendor/runtime/dist/executor/codexProtocol/v2/GitInfo.d.ts +6 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/GitInfo.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/GitInfo.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/HookPromptFragment.d.ts +5 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/HookPromptFragment.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/HookPromptFragment.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/McpAppDisplayMode.d.ts +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/McpAppDisplayMode.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/McpAppDisplayMode.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/McpAppUi.d.ts +9 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/McpAppUi.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/McpAppUi.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/McpToolCallAppContext.d.ts +8 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/McpToolCallAppContext.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/McpToolCallAppContext.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/McpToolCallError.d.ts +4 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/McpToolCallError.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/McpToolCallError.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/McpToolCallResult.d.ts +7 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/McpToolCallResult.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/McpToolCallResult.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/McpToolCallStatus.d.ts +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/McpToolCallStatus.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/McpToolCallStatus.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/MemoryCitation.d.ts +6 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/MemoryCitation.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/MemoryCitation.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/MemoryCitationEntry.d.ts +7 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/MemoryCitationEntry.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/MemoryCitationEntry.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/MisalignmentErrorDetails.d.ts +16 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/MisalignmentErrorDetails.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/MisalignmentErrorDetails.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/MisalignmentSteer.d.ts +4 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/MisalignmentSteer.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/MisalignmentSteer.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/Model.d.ts +8 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/Model.d.ts.map +1 -1
- package/vendor/runtime/dist/executor/codexProtocol/v2/ModelAccessPrograms.d.ts +11 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/ModelAccessPrograms.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/ModelAccessPrograms.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/NonSteerableTurnKind.d.ts +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/NonSteerableTurnKind.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/NonSteerableTurnKind.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/PatchApplyStatus.d.ts +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/PatchApplyStatus.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/PatchApplyStatus.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/PatchChangeKind.d.ts +9 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/PatchChangeKind.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/PatchChangeKind.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/RateLimitSnapshot.d.ts +4 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/RateLimitSnapshot.d.ts.map +1 -1
- package/vendor/runtime/dist/executor/codexProtocol/v2/ReviewStartParams.d.ts +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/ReviewStartParams.d.ts.map +1 -1
- package/vendor/runtime/dist/executor/codexProtocol/v2/SessionSource.d.ts +7 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/SessionSource.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/SessionSource.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/SubAgentActivityKind.d.ts +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/SubAgentActivityKind.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/SubAgentActivityKind.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/Thread.d.ts +100 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/Thread.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/Thread.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadActiveFlag.d.ts +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadActiveFlag.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadActiveFlag.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadHistoryMode.d.ts +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadHistoryMode.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadHistoryMode.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadItem.d.ts +216 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadItem.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadItem.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadReadParams.d.ts +11 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadReadParams.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadReadParams.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadReadResponse.d.ts +5 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadReadResponse.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadReadResponse.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadResumeParams.d.ts +4 -1
- package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadResumeParams.d.ts.map +1 -1
- package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadSection.d.ts +19 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadSection.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadSection.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadSectionAppearance.d.ts +8 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadSectionAppearance.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadSectionAppearance.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadStartParams.d.ts +3 -1
- package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadStartParams.d.ts.map +1 -1
- package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadStatus.d.ts +12 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadStatus.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadStatus.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/Turn.d.ts +36 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/Turn.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/Turn.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/TurnError.d.ts +12 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/TurnError.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/TurnError.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/TurnItemsView.d.ts +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/TurnItemsView.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/TurnItemsView.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/TurnStartParams.d.ts +7 -2
- package/vendor/runtime/dist/executor/codexProtocol/v2/TurnStartParams.d.ts.map +1 -1
- package/vendor/runtime/dist/executor/codexProtocol/v2/TurnStatus.d.ts +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/TurnStatus.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/TurnStatus.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/UserInput.d.ts +3 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/UserInput.d.ts.map +1 -1
- package/vendor/runtime/dist/executor/codexProtocol/v2/WebSearchAction.d.ts +15 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/WebSearchAction.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/WebSearchAction.js +2 -0
- package/vendor/runtime/dist/executor/codexRpc.d.ts +13 -4
- package/vendor/runtime/dist/executor/codexRpc.d.ts.map +1 -1
- package/vendor/runtime/dist/executor/codexRpc.js +21 -5
- package/vendor/runtime/dist/executor/codexSessions.d.ts +30 -0
- package/vendor/runtime/dist/executor/codexSessions.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexSessions.js +88 -0
- package/vendor/runtime/dist/executor/health.d.ts +8 -2
- package/vendor/runtime/dist/executor/health.d.ts.map +1 -1
- package/vendor/runtime/dist/executor/health.js +21 -5
- package/vendor/runtime/dist/executor/liveTurns.d.ts +2 -1
- package/vendor/runtime/dist/executor/liveTurns.d.ts.map +1 -1
- package/vendor/runtime/dist/executor/liveTurns.js +12 -5
- package/vendor/runtime/dist/executor/ownership.d.ts +40 -0
- package/vendor/runtime/dist/executor/ownership.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/ownership.js +106 -0
- package/vendor/runtime/dist/executor/providerRouter.d.ts +1 -0
- package/vendor/runtime/dist/executor/providerRouter.d.ts.map +1 -1
- package/vendor/runtime/dist/executor/providerRouter.js +5 -0
- package/vendor/runtime/dist/executor/types.d.ts +27 -0
- package/vendor/runtime/dist/executor/types.d.ts.map +1 -1
- package/vendor/runtime/dist/harness/index.d.ts.map +1 -1
- package/vendor/runtime/dist/harness/index.js +1 -0
- package/vendor/runtime/dist/index.d.ts +2 -1
- package/vendor/runtime/dist/index.d.ts.map +1 -1
- package/vendor/runtime/dist/index.js +1 -0
- package/vendor/runtime/src/executor/asyncQueue.ts +3 -0
- package/vendor/runtime/src/executor/claudeAgent.ts +66 -13
- package/vendor/runtime/src/executor/codex.ts +124 -47
- package/vendor/runtime/src/executor/codexProtocol/AgentPath.ts +5 -0
- package/vendor/runtime/src/executor/codexProtocol/FunctionCallOutputContentItem.ts +1 -1
- package/vendor/runtime/src/executor/codexProtocol/ImageGenerationFailure.ts +5 -0
- package/vendor/runtime/src/executor/codexProtocol/ImageGenerationItem.ts +7 -0
- package/vendor/runtime/src/executor/codexProtocol/LegacyAppPathString.ts +27 -0
- package/vendor/runtime/src/executor/codexProtocol/MessagePhase.ts +11 -0
- package/vendor/runtime/src/executor/codexProtocol/Personality.ts +3 -0
- package/vendor/runtime/src/executor/codexProtocol/PlanType.ts +1 -1
- package/vendor/runtime/src/executor/codexProtocol/README.md +2 -2
- package/vendor/runtime/src/executor/codexProtocol/SleepItem.ts +8 -0
- package/vendor/runtime/src/executor/codexProtocol/SubAgentSource.ts +7 -0
- package/vendor/runtime/src/executor/codexProtocol/ThreadId.ts +10 -0
- package/vendor/runtime/src/executor/codexProtocol/WebSearchItem.ts +14 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/AgentMessageDelivery.ts +5 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/AsyncUserInputQuestion.ts +5 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/CodexErrorInfo.ts +12 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/CollabAgentState.ts +6 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/CollabAgentStatus.ts +5 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/CollabAgentTool.ts +5 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/CollabAgentToolCallStatus.ts +5 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/CommandAction.ts +6 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/CommandExecutionSource.ts +5 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/CommandExecutionStatus.ts +5 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/CyberAccessProgram.ts +9 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/DynamicToolCallOutputContentItem.ts +5 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/DynamicToolCallStatus.ts +5 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/FileUpdateChange.ts +6 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/GetAccountRateLimitsResponse.ts +5 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/GitInfo.ts +5 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/HookPromptFragment.ts +5 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/McpAppDisplayMode.ts +5 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/McpAppUi.ts +9 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/McpToolCallAppContext.ts +5 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/McpToolCallError.ts +5 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/McpToolCallResult.ts +6 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/McpToolCallStatus.ts +5 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/MemoryCitation.ts +6 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/MemoryCitationEntry.ts +5 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/MisalignmentErrorDetails.ts +18 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/MisalignmentSteer.ts +5 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/Model.ts +11 -2
- package/vendor/runtime/src/executor/codexProtocol/v2/ModelAccessPrograms.ts +13 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/NonSteerableTurnKind.ts +5 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/PatchApplyStatus.ts +5 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/PatchChangeKind.ts +5 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/RateLimitSnapshot.ts +5 -1
- package/vendor/runtime/src/executor/codexProtocol/v2/ReviewStartParams.ts +2 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/SessionSource.ts +6 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/SubAgentActivityKind.ts +5 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/Thread.ts +104 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/ThreadActiveFlag.ts +5 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/ThreadHistoryMode.ts +5 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/ThreadItem.ts +125 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/ThreadReadParams.ts +12 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/ThreadReadResponse.ts +6 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/ThreadResumeParams.ts +5 -1
- package/vendor/runtime/src/executor/codexProtocol/v2/ThreadSection.ts +21 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/ThreadSectionAppearance.ts +8 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/ThreadStartParams.ts +4 -1
- package/vendor/runtime/src/executor/codexProtocol/v2/ThreadStatus.ts +6 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/Turn.ts +37 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/TurnError.ts +11 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/TurnItemsView.ts +5 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/TurnStartParams.ts +7 -2
- package/vendor/runtime/src/executor/codexProtocol/v2/TurnStatus.ts +5 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/UserInput.ts +1 -1
- package/vendor/runtime/src/executor/codexProtocol/v2/WebSearchAction.ts +5 -0
- package/vendor/runtime/src/executor/codexRpc.ts +26 -6
- package/vendor/runtime/src/executor/codexSessions.ts +108 -0
- package/vendor/runtime/src/executor/health.ts +21 -7
- package/vendor/runtime/src/executor/liveTurns.ts +12 -5
- package/vendor/runtime/src/executor/ownership.ts +83 -0
- package/vendor/runtime/src/executor/providerRouter.ts +6 -0
- package/vendor/runtime/src/executor/types.ts +20 -1
- package/vendor/runtime/src/harness/index.ts +1 -0
- package/vendor/runtime/src/index.ts +2 -1
- package/vendor/shared/dist/agentCommands.d.ts +1 -0
- package/vendor/shared/dist/agentCommands.d.ts.map +1 -1
- package/vendor/shared/dist/automations.d.ts +34 -0
- package/vendor/shared/dist/automations.d.ts.map +1 -1
- package/vendor/shared/dist/automations.js +12 -0
- package/vendor/shared/dist/cardStudio.d.ts +41 -0
- package/vendor/shared/dist/cardStudio.d.ts.map +1 -1
- package/vendor/shared/dist/cardStudio.js +13 -3
- package/vendor/shared/dist/computer.d.ts +7 -1
- package/vendor/shared/dist/computer.d.ts.map +1 -1
- package/vendor/shared/dist/computer.js +13 -4
- package/vendor/shared/dist/constants.d.ts +3 -3
- package/vendor/shared/dist/constants.d.ts.map +1 -1
- package/vendor/shared/dist/constants.js +8 -14
- package/vendor/shared/dist/goalNotes.d.ts +4 -0
- package/vendor/shared/dist/goalNotes.d.ts.map +1 -0
- package/vendor/shared/dist/goalNotes.js +23 -0
- package/vendor/shared/dist/goals.d.ts +835 -0
- package/vendor/shared/dist/goals.d.ts.map +1 -0
- package/vendor/shared/dist/goals.js +198 -0
- package/vendor/shared/dist/index.d.ts +7 -2
- package/vendor/shared/dist/index.d.ts.map +1 -1
- package/vendor/shared/dist/index.js +6 -1
- package/vendor/shared/dist/journal-vault.d.ts +1 -1
- package/vendor/shared/dist/messagingSafety.d.ts +21 -0
- package/vendor/shared/dist/messagingSafety.d.ts.map +1 -0
- package/vendor/shared/dist/messagingSafety.js +8 -0
- package/vendor/shared/dist/schemas/harness.d.ts +199 -169
- package/vendor/shared/dist/schemas/harness.d.ts.map +1 -1
- package/vendor/shared/dist/schemas/harness.js +25 -124
- package/vendor/shared/dist/smartCapture.d.ts +24 -0
- package/vendor/shared/dist/smartCapture.d.ts.map +1 -1
- package/vendor/shared/dist/smartCapture.js +15 -0
- package/vendor/shared/dist/taskSync.d.ts +342 -0
- package/vendor/shared/dist/taskSync.d.ts.map +1 -0
- package/vendor/shared/dist/taskSync.js +111 -0
- package/vendor/shared/dist/types.d.ts +1 -4
- package/vendor/shared/dist/types.d.ts.map +1 -1
- package/vendor/shared/dist/voiceCapture.d.ts +1 -1
- package/vendor/shared/dist/workspaces.d.ts +255 -0
- package/vendor/shared/dist/workspaces.d.ts.map +1 -0
- package/vendor/shared/dist/workspaces.js +89 -0
- package/vendor/shared/src/agentCommands.ts +1 -0
- package/vendor/shared/src/automations.ts +12 -0
- package/vendor/shared/src/cardStudio.ts +13 -3
- package/vendor/shared/src/computer.ts +19 -5
- package/vendor/shared/src/constants.ts +8 -14
- package/vendor/shared/src/goalNotes.ts +23 -0
- package/vendor/shared/src/goals.ts +237 -0
- package/vendor/shared/src/index.ts +7 -6
- package/vendor/shared/src/messagingSafety.ts +11 -0
- package/vendor/shared/src/schemas/harness.ts +24 -130
- package/vendor/shared/src/smartCapture.ts +27 -0
- package/vendor/shared/src/taskSync.ts +81 -0
- package/vendor/shared/src/types.ts +0 -6
- package/vendor/shared/src/workspaces.ts +103 -0
- package/dist/coding/conduct.d.ts +0 -69
- package/dist/coding/conduct.d.ts.map +0 -1
- package/dist/coding/conduct.js +0 -348
- package/dist/coding/fleetIntegrate.d.ts +0 -37
- package/dist/coding/fleetIntegrate.d.ts.map +0 -1
- package/dist/coding/fleetIntegrate.js +0 -64
- package/dist/coding/fleetPlan.d.ts +0 -20
- package/dist/coding/fleetPlan.d.ts.map +0 -1
- package/dist/coding/fleetPlan.js +0 -125
- package/dist/coding/fleetTasks.d.ts +0 -33
- package/dist/coding/fleetTasks.d.ts.map +0 -1
- package/dist/coding/fleetTasks.js +0 -75
- package/dist/coding/openFleetPr.d.ts +0 -41
- package/dist/coding/openFleetPr.d.ts.map +0 -1
- package/dist/coding/openFleetPr.js +0 -121
- package/src/coding/conduct.ts +0 -462
- package/src/coding/fleetIntegrate.ts +0 -95
- package/src/coding/fleetPlan.ts +0 -135
- package/src/coding/fleetTasks.ts +0 -109
- package/src/coding/openFleetPr.ts +0 -148
|
@@ -27,7 +27,8 @@ export { ClaudeAgentExecutor, CLAUDE_AGENT_SDK_VERSION } from './executor/claude
|
|
|
27
27
|
export { CodexExecutor } from './executor/codex.js';
|
|
28
28
|
export { CODEX_RUNTIME_VERSION } from './executor/codexRpc.js';
|
|
29
29
|
export { ProviderRouter, encodeSession, decodeSession } from './executor/providerRouter.js';
|
|
30
|
-
export type { AgentProvider, ExecutorApproval, ExecutorModel } from './executor/types.js';
|
|
30
|
+
export type { AgentProvider, ExecutorApproval, ExecutorModel, ProviderRunRef, ProviderInspection } from './executor/types.js';
|
|
31
31
|
export { HealthAwareExecutor, providerFailure } from './executor/health.js';
|
|
32
|
+
export { ExecutionOwnership, OwnedExecutor } from './executor/ownership.js';
|
|
32
33
|
export * from '@lucidity/decisions';
|
|
33
34
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,mBAAmB,EACnB,yBAAyB,EACzB,mBAAmB,EACnB,WAAW,EACX,eAAe,EACf,oBAAoB,GACrB,MAAM,uBAAuB,CAAC;AAC/B,YAAY,EAAE,wBAAwB,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC3G,OAAO,EAAE,2BAA2B,EAAE,MAAM,yBAAyB,CAAC;AACtE,YAAY,EAAE,gCAAgC,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAClG,OAAO,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAC9E,YAAY,EAAE,0BAA0B,EAAE,MAAM,mBAAmB,CAAC;AACpE,OAAO,EACL,qBAAqB,EACrB,qBAAqB,EACrB,WAAW,EACX,mBAAmB,GACpB,MAAM,yBAAyB,CAAC;AACjC,YAAY,EACV,0BAA0B,EAC1B,gBAAgB,EAChB,mBAAmB,EACnB,cAAc,EACd,cAAc,EACd,mBAAmB,EACnB,aAAa,GACd,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzD,YAAY,EACV,uBAAuB,EACvB,aAAa,EACb,SAAS,EACT,aAAa,GACd,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,YAAY,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAC;AACtE,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,YAAY,EACV,4BAA4B,EAC5B,kBAAkB,EAClB,iBAAiB,GAClB,MAAM,2BAA2B,CAAC;AAGnC,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAG7E,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAGxD,YAAY,EAAE,aAAa,EAAE,gBAAgB,EAAE,cAAc,EAAE,mBAAmB,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAC/H,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,YAAY,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAC;AAC1E,OAAO,EACL,oBAAoB,EACpB,eAAe,EACf,eAAe,EACf,eAAe,GAChB,MAAM,0BAA0B,CAAC;AAClC,YAAY,EAAE,UAAU,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAG9F,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACxD,YAAY,EACV,gBAAgB,EAChB,YAAY,EACZ,QAAQ,EACR,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,aAAa,GACd,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,YAAY,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAE9D,OAAO,EAAE,mBAAmB,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AAC1F,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAC5F,YAAY,EAAE,aAAa,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,mBAAmB,EACnB,yBAAyB,EACzB,mBAAmB,EACnB,WAAW,EACX,eAAe,EACf,oBAAoB,GACrB,MAAM,uBAAuB,CAAC;AAC/B,YAAY,EAAE,wBAAwB,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC3G,OAAO,EAAE,2BAA2B,EAAE,MAAM,yBAAyB,CAAC;AACtE,YAAY,EAAE,gCAAgC,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAClG,OAAO,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAC9E,YAAY,EAAE,0BAA0B,EAAE,MAAM,mBAAmB,CAAC;AACpE,OAAO,EACL,qBAAqB,EACrB,qBAAqB,EACrB,WAAW,EACX,mBAAmB,GACpB,MAAM,yBAAyB,CAAC;AACjC,YAAY,EACV,0BAA0B,EAC1B,gBAAgB,EAChB,mBAAmB,EACnB,cAAc,EACd,cAAc,EACd,mBAAmB,EACnB,aAAa,GACd,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzD,YAAY,EACV,uBAAuB,EACvB,aAAa,EACb,SAAS,EACT,aAAa,GACd,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,YAAY,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAC;AACtE,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,YAAY,EACV,4BAA4B,EAC5B,kBAAkB,EAClB,iBAAiB,GAClB,MAAM,2BAA2B,CAAC;AAGnC,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAG7E,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAGxD,YAAY,EAAE,aAAa,EAAE,gBAAgB,EAAE,cAAc,EAAE,mBAAmB,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAC/H,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,YAAY,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAC;AAC1E,OAAO,EACL,oBAAoB,EACpB,eAAe,EACf,eAAe,EACf,eAAe,GAChB,MAAM,0BAA0B,CAAC;AAClC,YAAY,EAAE,UAAU,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAG9F,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACxD,YAAY,EACV,gBAAgB,EAChB,YAAY,EACZ,QAAQ,EACR,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,aAAa,GACd,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,YAAY,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAE9D,OAAO,EAAE,mBAAmB,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AAC1F,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAC5F,YAAY,EAAE,aAAa,EAAE,gBAAgB,EAAE,aAAa,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAC9H,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC5E,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAG5E,cAAc,qBAAqB,CAAC"}
|
|
@@ -21,5 +21,6 @@ export { CodexExecutor } from './executor/codex.js';
|
|
|
21
21
|
export { CODEX_RUNTIME_VERSION } from './executor/codexRpc.js';
|
|
22
22
|
export { ProviderRouter, encodeSession, decodeSession } from './executor/providerRouter.js';
|
|
23
23
|
export { HealthAwareExecutor, providerFailure } from './executor/health.js';
|
|
24
|
+
export { ExecutionOwnership, OwnedExecutor } from './executor/ownership.js';
|
|
24
25
|
// Bounded decisions, independent of subscription-backed chat/coding executors.
|
|
25
26
|
export * from '@lucidity/decisions';
|
|
@@ -4,6 +4,7 @@ import {
|
|
|
4
4
|
type AgentCommandOption,
|
|
5
5
|
} from '@lucidity/shared';
|
|
6
6
|
import { randomUUID } from 'node:crypto';
|
|
7
|
+
import { spawn } from 'node:child_process';
|
|
7
8
|
import { readFileSync } from 'node:fs';
|
|
8
9
|
import {
|
|
9
10
|
query,
|
|
@@ -23,7 +24,7 @@ import type {
|
|
|
23
24
|
ExecutorModel,
|
|
24
25
|
} from './types.js';
|
|
25
26
|
|
|
26
|
-
export const CLAUDE_AGENT_SDK_VERSION = '0.3.
|
|
27
|
+
export const CLAUDE_AGENT_SDK_VERSION = '0.3.287';
|
|
27
28
|
const INTERACTIVE_TOOLS = ['AskUserQuestion', 'EnterPlanMode', 'ExitPlanMode'];
|
|
28
29
|
const WRITE_TOOLS = ['Bash', 'Write', 'Edit', 'NotebookEdit'];
|
|
29
30
|
|
|
@@ -86,7 +87,7 @@ export function claudeAgentOptions(
|
|
|
86
87
|
: {};
|
|
87
88
|
return {
|
|
88
89
|
cwd: input.cwd,
|
|
89
|
-
env: claudeSubscriptionEnv(oauthToken),
|
|
90
|
+
env: { ...claudeSubscriptionEnv(oauthToken), ...input.env },
|
|
90
91
|
model: input.model,
|
|
91
92
|
effort: input.effort as Options['effort'],
|
|
92
93
|
outputFormat: input.outputSchema ? { type: 'json_schema', schema: input.outputSchema } : undefined,
|
|
@@ -198,11 +199,17 @@ function chatCommands(
|
|
|
198
199
|
export class ClaudeAgentExecutor implements AgentExecutor {
|
|
199
200
|
readonly name = 'claude-agent-sdk';
|
|
200
201
|
readonly strictResume = true;
|
|
202
|
+
readonly recoveryCapability = 'completion-receipt';
|
|
203
|
+
async inspect(): Promise<import('./types.js').ProviderInspection> {
|
|
204
|
+
return { status: 'unsupported', reason: 'Claude SDK 0.3.287 history contains messages, not a durable run-completion receipt. Partial text cannot establish completion.' };
|
|
205
|
+
}
|
|
201
206
|
private readonly turns = new LiveTurns();
|
|
202
207
|
constructor(
|
|
203
208
|
private readonly options: {
|
|
204
209
|
oauthToken?: string;
|
|
205
210
|
query?: typeof query;
|
|
211
|
+
/** How long to wait for a closing loop after the last background task ends. */
|
|
212
|
+
backgroundGraceMs?: number;
|
|
206
213
|
} = {},
|
|
207
214
|
) {}
|
|
208
215
|
|
|
@@ -213,7 +220,7 @@ export class ClaudeAgentExecutor implements AgentExecutor {
|
|
|
213
220
|
return this.turns.interrupt(requestId);
|
|
214
221
|
}
|
|
215
222
|
async dispose() {
|
|
216
|
-
this.turns.dispose();
|
|
223
|
+
await this.turns.dispose();
|
|
217
224
|
}
|
|
218
225
|
|
|
219
226
|
/** Start the SDK control channel without ever supplying an inference prompt. */
|
|
@@ -256,6 +263,7 @@ export class ClaudeAgentExecutor implements AgentExecutor {
|
|
|
256
263
|
incoming.end();
|
|
257
264
|
abortController.abort();
|
|
258
265
|
active.close();
|
|
266
|
+
await active.return();
|
|
259
267
|
}
|
|
260
268
|
}
|
|
261
269
|
|
|
@@ -288,6 +296,7 @@ export class ClaudeAgentExecutor implements AgentExecutor {
|
|
|
288
296
|
incoming.end();
|
|
289
297
|
abortController.abort();
|
|
290
298
|
active.close();
|
|
299
|
+
await active.return();
|
|
291
300
|
}
|
|
292
301
|
}
|
|
293
302
|
|
|
@@ -314,6 +323,12 @@ export class ClaudeAgentExecutor implements AgentExecutor {
|
|
|
314
323
|
let ended = false;
|
|
315
324
|
let ready = false;
|
|
316
325
|
const pending = new Set<string>();
|
|
326
|
+
// Sub-agents and background commands outlive the loop that started them. The turn stays
|
|
327
|
+
// open while any are live, and `carried` holds what Claude said before they reported back.
|
|
328
|
+
let background = 0;
|
|
329
|
+
const carried: string[] = [];
|
|
330
|
+
let carriedSession = '';
|
|
331
|
+
let grace: ReturnType<typeof setTimeout> | undefined;
|
|
317
332
|
const owner = this.turns.open(input, async (text) => {
|
|
318
333
|
if (command)
|
|
319
334
|
throw new Error(
|
|
@@ -334,6 +349,13 @@ export class ClaudeAgentExecutor implements AgentExecutor {
|
|
|
334
349
|
options: {
|
|
335
350
|
...claudeAgentOptions(input, this.options.oauthToken),
|
|
336
351
|
abortController: owner.controller,
|
|
352
|
+
...(input.onRecovery ? { spawnClaudeCodeProcess: (options: import('@anthropic-ai/claude-agent-sdk').SpawnOptions) => {
|
|
353
|
+
const child = spawn(options.command, options.args, { cwd: options.cwd, env: options.env, signal: options.signal, stdio: ['pipe', 'pipe', 'pipe'] });
|
|
354
|
+
child.stderr.on('data', () => {});
|
|
355
|
+
try { input.onRecovery!({ pid: child.pid }); }
|
|
356
|
+
catch (error) { child.kill('SIGKILL'); throw error; }
|
|
357
|
+
return child;
|
|
358
|
+
} } : {}),
|
|
337
359
|
},
|
|
338
360
|
});
|
|
339
361
|
requireClaudeSubscription(await active.accountInfo());
|
|
@@ -354,12 +376,24 @@ export class ClaudeAgentExecutor implements AgentExecutor {
|
|
|
354
376
|
});
|
|
355
377
|
yield { type: 'tool_call', name: `/${commandName}`, phase: 'start' };
|
|
356
378
|
}
|
|
379
|
+
input.onRecovery?.({ turnId: initial.uuid, inspectionDisabled: !!command });
|
|
357
380
|
incoming.push(initial);
|
|
358
381
|
ready = true;
|
|
359
382
|
for await (const event of active) {
|
|
360
383
|
owner.check();
|
|
361
|
-
if (event.type === 'system' && event.subtype === '
|
|
384
|
+
if (event.type === 'system' && event.subtype === 'background_tasks_changed') {
|
|
385
|
+
background = event.tasks.filter((task) => !task.ambient).length;
|
|
386
|
+
// Finished work normally starts another loop. If none follows (a task was stopped,
|
|
387
|
+
// say), close the input so the query ends and the turn settles with what it has.
|
|
388
|
+
if (!background && carried.length && !grace)
|
|
389
|
+
grace = setTimeout(() => incoming.end(), this.options.backgroundGraceMs ?? 90_000);
|
|
390
|
+
continue;
|
|
391
|
+
}
|
|
392
|
+
if (grace) { clearTimeout(grace); grace = undefined; }
|
|
393
|
+
if (event.type === 'system' && event.subtype === 'init') {
|
|
394
|
+
input.onRecovery?.({ sessionId: event.session_id });
|
|
362
395
|
yield { type: 'session', sessionId: event.session_id };
|
|
396
|
+
}
|
|
363
397
|
if (
|
|
364
398
|
event.type === 'system' &&
|
|
365
399
|
event.subtype === 'local_command_output' &&
|
|
@@ -385,6 +419,7 @@ export class ClaudeAgentExecutor implements AgentExecutor {
|
|
|
385
419
|
type: 'tool_call',
|
|
386
420
|
name: e.content_block.name,
|
|
387
421
|
phase: 'start',
|
|
422
|
+
itemId: e.content_block.id,
|
|
388
423
|
};
|
|
389
424
|
}
|
|
390
425
|
} else if (
|
|
@@ -395,23 +430,33 @@ export class ClaudeAgentExecutor implements AgentExecutor {
|
|
|
395
430
|
if (block.type === 'tool_result') {
|
|
396
431
|
const name = toolNames.get(block.tool_use_id);
|
|
397
432
|
if (name) {
|
|
398
|
-
yield { type: 'tool_call', name, phase: 'end' };
|
|
433
|
+
yield { type: 'tool_call', name, phase: 'end', itemId: block.tool_use_id, outcome: block.is_error ? 'failed' : 'completed' };
|
|
399
434
|
toolNames.delete(block.tool_use_id);
|
|
400
435
|
}
|
|
401
436
|
}
|
|
402
437
|
} else if (event.type === 'result') {
|
|
438
|
+
// A priority correction interrupts the old native loop before its own loop
|
|
439
|
+
// starts. The pinned SDK reports this intermediate result before echoing
|
|
440
|
+
// the queued correction. Drain it without turning it into a Lucidity terminal.
|
|
441
|
+
if (pending.size && event.subtype === 'error_during_execution' &&
|
|
442
|
+
event.errors.length === 1 &&
|
|
443
|
+
event.errors[0] === '[ede_diagnostic] result_type=user last_content_type=n/a stop_reason=null') continue;
|
|
403
444
|
if (event.subtype !== 'success' || event.is_error) {
|
|
404
445
|
throw new Error(
|
|
405
|
-
(
|
|
406
|
-
|
|
407
|
-
? event.result
|
|
408
|
-
: event.errors.join('\n'))) ||
|
|
409
|
-
`Claude could not complete the turn (${event.subtype}). Check subscription access and usage limits.`,
|
|
446
|
+
(event.subtype === 'success' ? event.result : event.errors.join('\n')) ||
|
|
447
|
+
`Claude turn ended with ${event.subtype}.`,
|
|
410
448
|
);
|
|
411
449
|
}
|
|
412
450
|
// A late priority message may become a subsequent loop in this same SDK
|
|
413
451
|
// query. Keep consuming until its echoed user message and result arrive.
|
|
414
452
|
if (pending.size) continue;
|
|
453
|
+
// Closing the query now would kill the work still running, and its report would
|
|
454
|
+
// never reach the phone. Claude continues in a later loop of this same query.
|
|
455
|
+
if (background > 0 && !input.outputSchema && !command) {
|
|
456
|
+
if (event.result.trim()) carried.push(event.result.trim());
|
|
457
|
+
carriedSession = event.session_id;
|
|
458
|
+
continue;
|
|
459
|
+
}
|
|
415
460
|
if (input.outputSchema && event.structured_output === undefined)
|
|
416
461
|
throw new Error('Claude did not return the requested structured result.');
|
|
417
462
|
ended = true;
|
|
@@ -421,7 +466,7 @@ export class ClaudeAgentExecutor implements AgentExecutor {
|
|
|
421
466
|
type: 'done',
|
|
422
467
|
text:
|
|
423
468
|
(input.outputSchema ? JSON.stringify(event.structured_output) : '') ||
|
|
424
|
-
event.result.trim() ||
|
|
469
|
+
[...carried, event.result.trim()].filter(Boolean).join('\n\n') ||
|
|
425
470
|
commandOutput.trim() ||
|
|
426
471
|
(compacted
|
|
427
472
|
? 'Conversation compacted. You can continue here.'
|
|
@@ -437,6 +482,11 @@ export class ClaudeAgentExecutor implements AgentExecutor {
|
|
|
437
482
|
}
|
|
438
483
|
}
|
|
439
484
|
owner.check();
|
|
485
|
+
if (carried.length) {
|
|
486
|
+
ended = true;
|
|
487
|
+
yield { type: 'done', text: carried.join('\n\n'), sessionId: carriedSession };
|
|
488
|
+
return;
|
|
489
|
+
}
|
|
440
490
|
throw new Error('Claude disconnected before completing the turn.');
|
|
441
491
|
} catch (error) {
|
|
442
492
|
// The SDK can reject with a plain process error when our controller aborts.
|
|
@@ -445,9 +495,12 @@ export class ClaudeAgentExecutor implements AgentExecutor {
|
|
|
445
495
|
throw error;
|
|
446
496
|
} finally {
|
|
447
497
|
ended = true;
|
|
498
|
+
clearTimeout(grace);
|
|
448
499
|
incoming.end();
|
|
449
|
-
|
|
450
|
-
|
|
500
|
+
try {
|
|
501
|
+
active?.close();
|
|
502
|
+
await active?.return();
|
|
503
|
+
} finally { owner.close(); }
|
|
451
504
|
}
|
|
452
505
|
}
|
|
453
506
|
}
|
|
@@ -12,12 +12,19 @@ import {
|
|
|
12
12
|
type RpcMessage,
|
|
13
13
|
} from './codexRpc.js';
|
|
14
14
|
import { LiveTurns, abortError } from './liveTurns.js';
|
|
15
|
+
import {
|
|
16
|
+
CodexSessions,
|
|
17
|
+
codexBindingFingerprint,
|
|
18
|
+
type CodexThread,
|
|
19
|
+
} from './codexSessions.js';
|
|
15
20
|
import type {
|
|
16
21
|
AgentExecutor,
|
|
17
22
|
ExecutorRunInput,
|
|
18
23
|
ExecutorStreamEvent,
|
|
19
24
|
ExecutorModel,
|
|
20
25
|
ExecutorResult,
|
|
26
|
+
ProviderRunRef,
|
|
27
|
+
ProviderInspection,
|
|
21
28
|
} from './types.js';
|
|
22
29
|
import type { ThreadStartParams } from './codexProtocol/v2/ThreadStartParams.js';
|
|
23
30
|
import type { ThreadResumeParams } from './codexProtocol/v2/ThreadResumeParams.js';
|
|
@@ -29,6 +36,8 @@ import type { ReviewStartParams } from './codexProtocol/v2/ReviewStartParams.js'
|
|
|
29
36
|
import type { ThreadSetNameParams } from './codexProtocol/v2/ThreadSetNameParams.js';
|
|
30
37
|
import type { GetAccountRateLimitsResponse } from './codexProtocol/v2/GetAccountRateLimitsResponse.js';
|
|
31
38
|
import type { SkillsListResponse } from './codexProtocol/v2/SkillsListResponse.js';
|
|
39
|
+
import type { ThreadReadResponse } from './codexProtocol/v2/ThreadReadResponse.js';
|
|
40
|
+
import type { ThreadReadParams } from './codexProtocol/v2/ThreadReadParams.js';
|
|
32
41
|
|
|
33
42
|
// App-server does not persist an empty thread until its first turn. Keep a durable
|
|
34
43
|
// reset marker in Lucidity's provider session envelope until that turn starts.
|
|
@@ -156,18 +165,53 @@ export function codexRunConfig(
|
|
|
156
165
|
export class CodexExecutor implements AgentExecutor {
|
|
157
166
|
readonly name = 'codex-app-server';
|
|
158
167
|
readonly strictResume = true;
|
|
168
|
+
readonly recoveryCapability = 'native-turn';
|
|
159
169
|
private readonly turns = new LiveTurns();
|
|
170
|
+
private readonly sessions = new CodexSessions();
|
|
160
171
|
constructor(
|
|
161
172
|
private readonly options: {
|
|
162
173
|
command?: string;
|
|
163
|
-
connect?: (cwd?: string) => CodexConnection;
|
|
174
|
+
connect?: (cwd?: string, env?: Record<string, string>) => CodexConnection;
|
|
164
175
|
} = {},
|
|
165
176
|
) {}
|
|
166
|
-
private connect(cwd?: string) {
|
|
177
|
+
private connect(cwd?: string, env?: Record<string, string>) {
|
|
167
178
|
return (
|
|
168
|
-
this.options.connect?.(cwd) ?? new CodexRpc(this.options.command, cwd)
|
|
179
|
+
this.options.connect?.(cwd, env) ?? new CodexRpc(this.options.command, cwd, env)
|
|
169
180
|
);
|
|
170
181
|
}
|
|
182
|
+
async inspect(ref: ProviderRunRef, options: { cwd?: string; timeoutMs?: number } = {}): Promise<ProviderInspection> {
|
|
183
|
+
if (!ref.sessionId || !ref.turnId || ref.inspectionDisabled)
|
|
184
|
+
return { status: 'unsupported', reason: 'No inspectable native Codex turn was recorded.' };
|
|
185
|
+
const rpc = this.connect(options.cwd);
|
|
186
|
+
let timer: ReturnType<typeof setTimeout> | undefined;
|
|
187
|
+
try {
|
|
188
|
+
return await Promise.race([
|
|
189
|
+
(async (): Promise<ProviderInspection> => {
|
|
190
|
+
await initializeCodex(rpc);
|
|
191
|
+
const { thread } = await rpc.request<ThreadReadResponse>('thread/read', {
|
|
192
|
+
threadId: ref.sessionId!, includeTurns: true,
|
|
193
|
+
} satisfies ThreadReadParams);
|
|
194
|
+
if (thread.id !== ref.sessionId || thread.status?.type === 'active')
|
|
195
|
+
return { status: 'unknown', reason: 'Codex history does not identify an inactive matching thread.' };
|
|
196
|
+
const turn = thread.turns?.find((turn) => turn.id === ref.turnId);
|
|
197
|
+
if (!turn || turn.status !== 'completed' || turn.itemsView !== 'full')
|
|
198
|
+
return { status: 'unknown', reason: 'Codex has no complete result for this exact turn.' };
|
|
199
|
+
const answer = [...turn.items].reverse().find((item) => item.type === 'agentMessage' && item.phase !== 'commentary');
|
|
200
|
+
if (!answer || answer.type !== 'agentMessage' || typeof answer.text !== 'string')
|
|
201
|
+
return { status: 'unknown', reason: 'The completed turn has no retained final answer.' };
|
|
202
|
+
return { status: 'completed', result: { text: answer.text.trim(), sessionId: thread.id } };
|
|
203
|
+
})(),
|
|
204
|
+
new Promise<ProviderInspection>((resolve) => {
|
|
205
|
+
timer = setTimeout(() => resolve({ status: 'unknown', reason: 'Codex history inspection timed out.' }), Math.min(options.timeoutMs ?? 10_000, 30_000));
|
|
206
|
+
}),
|
|
207
|
+
]);
|
|
208
|
+
} catch {
|
|
209
|
+
return { status: 'unknown', reason: 'Codex history is unavailable or unreadable with the installed runtime.' };
|
|
210
|
+
} finally {
|
|
211
|
+
clearTimeout(timer);
|
|
212
|
+
await rpc.close();
|
|
213
|
+
}
|
|
214
|
+
}
|
|
171
215
|
steer(requestId: string, text: string) {
|
|
172
216
|
return this.turns.steer(requestId, text);
|
|
173
217
|
}
|
|
@@ -175,7 +219,7 @@ export class CodexExecutor implements AgentExecutor {
|
|
|
175
219
|
return this.turns.interrupt(requestId);
|
|
176
220
|
}
|
|
177
221
|
async dispose() {
|
|
178
|
-
this.turns.dispose();
|
|
222
|
+
await Promise.all([this.turns.dispose(), this.sessions.dispose()]);
|
|
179
223
|
}
|
|
180
224
|
|
|
181
225
|
async models(): Promise<ExecutorModel[]> {
|
|
@@ -206,7 +250,7 @@ export class CodexExecutor implements AgentExecutor {
|
|
|
206
250
|
} while (cursor);
|
|
207
251
|
return models;
|
|
208
252
|
} finally {
|
|
209
|
-
rpc.close();
|
|
253
|
+
await rpc.close();
|
|
210
254
|
}
|
|
211
255
|
}
|
|
212
256
|
|
|
@@ -313,39 +357,38 @@ export class CodexExecutor implements AgentExecutor {
|
|
|
313
357
|
let threadId = '';
|
|
314
358
|
let turnId = '';
|
|
315
359
|
let ended = false;
|
|
316
|
-
|
|
317
|
-
let
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
}
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
}
|
|
334
|
-
rpc.close();
|
|
335
|
-
throw error;
|
|
336
|
-
}
|
|
360
|
+
let rpc: CodexConnection | undefined;
|
|
361
|
+
let thread: CodexThread | undefined;
|
|
362
|
+
let fingerprint = '';
|
|
363
|
+
let reusable = false;
|
|
364
|
+
const owner = this.turns.open(input, async (text) => {
|
|
365
|
+
if (command)
|
|
366
|
+
throw new Error(
|
|
367
|
+
'Wait for the command to finish before sending a message.',
|
|
368
|
+
);
|
|
369
|
+
if (!rpc || !turnId || ended)
|
|
370
|
+
throw new Error('Codex has no active turn to steer.');
|
|
371
|
+
const params: TurnSteerParams = {
|
|
372
|
+
threadId,
|
|
373
|
+
expectedTurnId: turnId,
|
|
374
|
+
input: userInput({ userPrompt: text }),
|
|
375
|
+
};
|
|
376
|
+
await rpc.request('turn/steer', params);
|
|
377
|
+
});
|
|
337
378
|
const abort = () => {
|
|
379
|
+
const active = rpc;
|
|
380
|
+
if (!active) return;
|
|
338
381
|
if (turnId && !ended) {
|
|
339
|
-
void
|
|
382
|
+
void active
|
|
340
383
|
.request('turn/interrupt', { threadId, turnId })
|
|
341
384
|
.catch(() => {})
|
|
342
|
-
.finally(() =>
|
|
343
|
-
const timer = setTimeout(() =>
|
|
385
|
+
.finally(() => active.close());
|
|
386
|
+
const timer = setTimeout(() => active.close(), 1000);
|
|
344
387
|
timer.unref();
|
|
345
|
-
} else
|
|
388
|
+
} else active.close();
|
|
346
389
|
};
|
|
347
390
|
owner.controller.signal.addEventListener('abort', abort, { once: true });
|
|
348
|
-
|
|
391
|
+
const onRequest = async (request: RpcMessage) => {
|
|
349
392
|
const p = request.params ?? {};
|
|
350
393
|
if (
|
|
351
394
|
ended ||
|
|
@@ -388,7 +431,22 @@ export class CodexExecutor implements AgentExecutor {
|
|
|
388
431
|
};
|
|
389
432
|
try {
|
|
390
433
|
owner.check();
|
|
391
|
-
await
|
|
434
|
+
const pooled = await this.sessions.take(input.resume);
|
|
435
|
+
rpc = pooled?.rpc ?? this.connect(input.cwd, input.env);
|
|
436
|
+
input.onRecovery?.({ pid: rpc.pid, inspectionDisabled: !!command });
|
|
437
|
+
rpc.onRequest = onRequest;
|
|
438
|
+
owner.check();
|
|
439
|
+
if (!pooled) await initializeCodex(rpc);
|
|
440
|
+
else {
|
|
441
|
+
const account = await rpc.request<{ account: { type: string } | null }>(
|
|
442
|
+
'account/read',
|
|
443
|
+
{ refreshToken: false },
|
|
444
|
+
);
|
|
445
|
+
if (account.account?.type !== 'chatgpt')
|
|
446
|
+
throw new Error(
|
|
447
|
+
'Codex needs ChatGPT subscription login. Run codex login on this computer.',
|
|
448
|
+
);
|
|
449
|
+
}
|
|
392
450
|
const inherited = await rpc.request<{ config: Record<string, unknown> }>(
|
|
393
451
|
'config/read',
|
|
394
452
|
{ includeLayers: false, cwd: input.cwd },
|
|
@@ -416,20 +474,28 @@ export class CodexExecutor implements AgentExecutor {
|
|
|
416
474
|
developerInstructions: input.systemPrompt,
|
|
417
475
|
config: codexRunConfig(input, inherited.config),
|
|
418
476
|
};
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
model
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
input.
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
477
|
+
fingerprint = codexBindingFingerprint(params);
|
|
478
|
+
if (pooled && pooled.fingerprint !== fingerprint) {
|
|
479
|
+
// Permissions, MCP tools, model, cwd or instructions changed. A new transport
|
|
480
|
+
// resumes only after the old owner has fully exited.
|
|
481
|
+
await rpc.close();
|
|
482
|
+
owner.check();
|
|
483
|
+
rpc = this.connect(input.cwd, input.env);
|
|
484
|
+
input.onRecovery?.({ pid: rpc.pid });
|
|
485
|
+
rpc.onRequest = onRequest;
|
|
486
|
+
await initializeCodex(rpc);
|
|
487
|
+
}
|
|
488
|
+
thread =
|
|
489
|
+
pooled?.fingerprint === fingerprint
|
|
490
|
+
? pooled.thread
|
|
491
|
+
: input.resume && !isEmptySession(input.resume)
|
|
492
|
+
? await rpc.request<CodexThread>('thread/resume', {
|
|
493
|
+
...params,
|
|
494
|
+
threadId: input.resume,
|
|
495
|
+
} satisfies ThreadResumeParams)
|
|
496
|
+
: await rpc.request<CodexThread>('thread/start', params);
|
|
432
497
|
threadId = thread.thread.id;
|
|
498
|
+
input.onRecovery?.({ sessionId: threadId });
|
|
433
499
|
const sessionId =
|
|
434
500
|
isEmptySession(input.resume) &&
|
|
435
501
|
command &&
|
|
@@ -529,6 +595,7 @@ export class CodexExecutor implements AgentExecutor {
|
|
|
529
595
|
);
|
|
530
596
|
turnId = turn.turn.id;
|
|
531
597
|
}
|
|
598
|
+
if (turnId) input.onRecovery?.({ turnId });
|
|
532
599
|
let finalText = '';
|
|
533
600
|
let streamedText = '';
|
|
534
601
|
for await (const event of rpc.events) {
|
|
@@ -551,6 +618,8 @@ export class CodexExecutor implements AgentExecutor {
|
|
|
551
618
|
event.method === 'item/completed'
|
|
552
619
|
) {
|
|
553
620
|
const item = p.item as {
|
|
621
|
+
id?: string;
|
|
622
|
+
status?: string;
|
|
554
623
|
type: string;
|
|
555
624
|
text?: string;
|
|
556
625
|
phase?: string;
|
|
@@ -589,6 +658,8 @@ export class CodexExecutor implements AgentExecutor {
|
|
|
589
658
|
yield {
|
|
590
659
|
type: 'tool_call',
|
|
591
660
|
name,
|
|
661
|
+
...(item.id ? { itemId: item.id } : {}),
|
|
662
|
+
...(item.status ? { outcome: item.status } : {}),
|
|
592
663
|
phase: event.method === 'item/started' ? 'start' : 'end',
|
|
593
664
|
};
|
|
594
665
|
} else if (event.method === 'turn/completed') {
|
|
@@ -604,6 +675,7 @@ export class CodexExecutor implements AgentExecutor {
|
|
|
604
675
|
throw new Error(
|
|
605
676
|
completed.error?.message ?? `Codex turn ${completed.status}.`,
|
|
606
677
|
);
|
|
678
|
+
reusable = true;
|
|
607
679
|
if (command)
|
|
608
680
|
yield {
|
|
609
681
|
type: 'tool_call',
|
|
@@ -631,8 +703,13 @@ export class CodexExecutor implements AgentExecutor {
|
|
|
631
703
|
} finally {
|
|
632
704
|
ended = true;
|
|
633
705
|
owner.controller.signal.removeEventListener('abort', abort);
|
|
634
|
-
|
|
635
|
-
|
|
706
|
+
try {
|
|
707
|
+
if (rpc && reusable && thread && !owner.controller.signal.aborted)
|
|
708
|
+
await this.sessions.keep({ rpc, thread, fingerprint });
|
|
709
|
+
else await rpc?.close();
|
|
710
|
+
} finally {
|
|
711
|
+
owner.close();
|
|
712
|
+
}
|
|
636
713
|
}
|
|
637
714
|
}
|
|
638
715
|
}
|
|
@@ -7,4 +7,4 @@ import type { ImageDetail } from "./ImageDetail.js";
|
|
|
7
7
|
* Responses API compatible content items that can be returned by a tool call.
|
|
8
8
|
* This is a subset of ContentItem with the types we support as function call outputs.
|
|
9
9
|
*/
|
|
10
|
-
export type FunctionCallOutputContentItem = { "type": "input_text", text: string, } | { "type": "input_image", image_url: string,
|
|
10
|
+
export type FunctionCallOutputContentItem = { "type": "input_text", text: string, } | { "type": "input_image", detail?: ImageDetail, } & ({ image_url: string, } | { file_id: string, }) | { "type": "input_audio", audio_url: string, } | { "type": "encrypted_content", encrypted_content: string, };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
|
2
|
+
|
|
3
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
4
|
+
|
|
5
|
+
export type ImageGenerationFailure = { "type": "usageLimitExceeded", limitId: string, resetsAt: number | null, };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
|
2
|
+
|
|
3
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
4
|
+
import type { AbsolutePathBuf } from "./AbsolutePathBuf.js";
|
|
5
|
+
import type { ImageGenerationFailure } from "./ImageGenerationFailure.js";
|
|
6
|
+
|
|
7
|
+
export type ImageGenerationItem = { id: string, status: string, revisedPrompt: string | null, result: string, transparentBackground?: boolean, failure: ImageGenerationFailure | null, savedPath?: AbsolutePathBuf, };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
|
2
|
+
|
|
3
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* A UTF-8 path for preserving raw path compatibility at the app-server API
|
|
7
|
+
* boundary while Codex migrates to [`PathUri`].
|
|
8
|
+
*
|
|
9
|
+
* Supports storing arbitrary strings read from the API and converting to and
|
|
10
|
+
* from [`PathUri`] using an explicitly selected native path convention.
|
|
11
|
+
*
|
|
12
|
+
* When converting from [`PathUri`], "native" refers to the supplied
|
|
13
|
+
* [`PathConvention`], which may be foreign to the operating system running
|
|
14
|
+
* this process. The inner string is private so path-producing code must use a
|
|
15
|
+
* path conversion method instead of bypassing the intended conversion
|
|
16
|
+
* boundary. Non-UTF-8 paths are converted to UTF-8 lossily because this API
|
|
17
|
+
* value is serialized as a JSON string.
|
|
18
|
+
*
|
|
19
|
+
* Deserialization and [`Self::from_string`] accept any UTF-8 string without
|
|
20
|
+
* interpreting or validating it. Use [`Self::from_string`] when a caller
|
|
21
|
+
* already owns legacy app-server path text and needs to preserve its wire
|
|
22
|
+
* spelling; use [`Self::from_path`], [`Self::from_abs_path`], or
|
|
23
|
+
* [`Self::from_path_uri`] when converting an actual path value. Relative
|
|
24
|
+
* path text remains valid until an operation such as [`Self::to_path_uri`]
|
|
25
|
+
* requires an absolute path.
|
|
26
|
+
*/
|
|
27
|
+
export type LegacyAppPathString = string;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
|
2
|
+
|
|
3
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Classifies an assistant message as interim commentary or final answer text.
|
|
7
|
+
*
|
|
8
|
+
* Providers do not emit this consistently, so callers must treat `None` as
|
|
9
|
+
* "phase unknown" and keep compatibility behavior for legacy models.
|
|
10
|
+
*/
|
|
11
|
+
export type MessagePhase = "commentary" | "final_answer";
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
|
|
3
3
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
4
4
|
|
|
5
|
-
export type PlanType = "free" | "go" | "plus" | "pro" | "prolite" | "team" | "self_serve_business_prolite" | "self_serve_business_usage_based" | "business" | "ent26" | "enterprise_cbp_automation" | "enterprise_cbp_usage_based" | "enterprise" | "edu" | "edu_plus" | "edu_pro" | "unknown";
|
|
5
|
+
export type PlanType = "free" | "go" | "plus" | "pro" | "prolite" | "promax" | "team" | "self_serve_business_prolite" | "self_serve_business_usage_based" | "business" | "ent26" | "enterprise_cbp_automation" | "enterprise_cbp_usage_based" | "enterprise" | "edu" | "edu_plus" | "edu_pro" | "unknown";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Codex App Server protocol
|
|
2
2
|
|
|
3
|
-
Generated from the pinned `@openai/codex` **0.
|
|
4
|
-
Apache-2.0). Source: https://github.com/openai/codex/tree/rust-v0.
|
|
3
|
+
Generated from the pinned `@openai/codex` **0.160.0** runtime (OpenAI Codex,
|
|
4
|
+
Apache-2.0). Source: https://github.com/openai/codex/tree/rust-v0.160.0
|
|
5
5
|
|
|
6
6
|
Run `node scripts/generate-codex-protocol.mjs` from `packages/runtime` after
|
|
7
7
|
installing dependencies. The script keeps the adapter's transitive type subset
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
|
2
|
+
|
|
3
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Display item emitted by the interruptible `clock.sleep` tool.
|
|
7
|
+
*/
|
|
8
|
+
export type SleepItem = { id: string, durationMs: number, };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
|
2
|
+
|
|
3
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
4
|
+
import type { AgentPath } from "./AgentPath.js";
|
|
5
|
+
import type { ThreadId } from "./ThreadId.js";
|
|
6
|
+
|
|
7
|
+
export type SubAgentSource = "review" | "compact" | { "thread_spawn": { parent_thread_id: ThreadId, depth: number, agent_path: AgentPath | null, agent_nickname: string | null, agent_role: string | null, } } | "memory_consolidation" | { "other": string };
|