@jrkropp/codex-js 0.1.3 → 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/CHANGELOG.md +10 -0
- package/README.md +57 -617
- package/dist/client/index.d.ts +2 -16
- package/dist/client/index.js +2522 -16
- package/dist/index.d.ts +2 -25
- package/dist/index.js +699 -20
- package/dist/internal/codex/app-server/src/bespoke_event_handling.d.ts +5 -0
- package/dist/internal/codex/app-server/src/connection_rpc_gate.d.ts +11 -0
- package/dist/internal/codex/app-server/src/dynamic_tools.d.ts +5 -0
- package/dist/internal/codex/app-server/src/message_processor.d.ts +88 -0
- package/dist/internal/codex/app-server/src/outgoing_message.d.ts +73 -0
- package/dist/internal/codex/app-server/src/request_processors/common.d.ts +25 -0
- package/dist/internal/codex/app-server/src/request_processors/mcp_processor.d.ts +32 -0
- package/dist/internal/codex/app-server/src/request_processors/request_errors.d.ts +9 -0
- package/dist/internal/codex/app-server/src/request_processors/thread_processor.d.ts +38 -0
- package/dist/internal/codex/app-server/src/request_processors/token_usage_replay.d.ts +22 -0
- package/dist/internal/codex/app-server/src/request_processors/turn_processor.d.ts +21 -0
- package/dist/internal/codex/app-server/src/request_processors.d.ts +5 -0
- package/dist/internal/codex/app-server/src/request_serialization.d.ts +7 -0
- package/dist/internal/codex/app-server/src/runtime.d.ts +96 -0
- package/dist/internal/codex/app-server/src/server_request_response.d.ts +30 -0
- package/dist/internal/codex/app-server/src/session_factory.d.ts +30 -0
- package/dist/internal/codex/app-server/src/session_task_runner.d.ts +44 -0
- package/dist/internal/codex/app-server/src/thread_state.d.ts +56 -0
- package/dist/internal/codex/app-server-client/src/lib.d.ts +48 -0
- package/dist/{index-77U_Oc-a.d.ts → internal/codex/app-server-client/src/pending_requests.d.ts} +7 -18
- package/dist/internal/codex/app-server-client/src/remote.d.ts +18 -0
- package/dist/{session-BRYzi8OT.d.ts → internal/codex/app-server-client/src/session.d.ts} +5 -9
- package/dist/{thread_event_store-C0zYzukG.d.ts → internal/codex/app-server-client/src/thread_event_store.d.ts} +14 -14
- package/dist/internal/codex/app-server-client/src/thread_projection.d.ts +9 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/AbsolutePathBuf.d.ts +10 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/AgentPath.d.ts +1 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/ApplyPatchApprovalParams.d.ts +22 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/ApplyPatchApprovalResponse.d.ts +4 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/AuthMode.d.ts +4 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/ClientInfo.d.ts +5 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/ClientNotification.d.ts +3 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/ClientRequest.d.ts +410 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/CollaborationMode.d.ts +9 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/ContentItem.d.ts +12 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/ConversationGitInfo.d.ts +5 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/ConversationSummary.d.ts +15 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/ExecCommandApprovalParams.d.ts +18 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/ExecCommandApprovalResponse.d.ts +4 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/ExecPolicyAmendment.d.ts +8 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/FileChange.d.ts +11 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/ForcedLoginMethod.d.ts +1 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/FunctionCallOutputBody.d.ts +2 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/FunctionCallOutputContentItem.d.ts +13 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/FuzzyFileSearchMatchType.d.ts +1 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/FuzzyFileSearchParams.d.ts +5 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/FuzzyFileSearchResponse.d.ts +4 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/FuzzyFileSearchResult.d.ts +12 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/FuzzyFileSearchSessionCompletedNotification.d.ts +3 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/FuzzyFileSearchSessionUpdatedNotification.d.ts +6 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/GetAuthStatusParams.d.ts +4 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/GetAuthStatusResponse.d.ts +6 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/GetConversationSummaryParams.d.ts +6 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/GetConversationSummaryResponse.d.ts +4 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/GitDiffToRemoteParams.d.ts +3 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/GitDiffToRemoteResponse.d.ts +5 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/GitSha.d.ts +1 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/ImageDetail.d.ts +1 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/InitializeCapabilities.d.ts +14 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/InitializeParams.d.ts +6 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/InitializeResponse.d.ts +18 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/InputModality.d.ts +4 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/InternalSessionSource.d.ts +1 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/LocalShellAction.d.ts +4 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/LocalShellExecAction.d.ts +9 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/LocalShellStatus.d.ts +1 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/MessagePhase.d.ts +7 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/ModeKind.d.ts +4 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/NetworkPolicyAmendment.d.ts +5 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/NetworkPolicyRuleAction.d.ts +1 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/ParsedCommand.d.ts +24 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/Personality.d.ts +1 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/PlanType.d.ts +1 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/RealtimeConversationVersion.d.ts +1 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/RealtimeOutputModality.d.ts +1 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/RealtimeVoice.d.ts +1 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/RealtimeVoicesList.d.ts +7 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/ReasoningEffort.d.ts +4 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/ReasoningItemContent.d.ts +7 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/ReasoningItemReasoningSummary.d.ts +4 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/ReasoningSummary.d.ts +6 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/RequestId.d.ts +1 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/Resource.d.ts +15 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/ResourceContent.d.ts +21 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/ResourceTemplate.d.ts +12 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/ResponseItem.d.ts +78 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/ReviewDecision.d.ts +14 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/ServerNotification.d.ts +260 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/ServerRequest.d.ts +50 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/SessionSource.d.ts +9 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/Settings.d.ts +9 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/SubAgentSource.d.ts +13 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/ThreadId.d.ts +1 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/ThreadMemoryMode.d.ts +1 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/Tool.d.ts +14 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/Verbosity.d.ts +5 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/WebSearchAction.d.ts +14 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/WebSearchContextSize.d.ts +1 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/WebSearchLocation.d.ts +6 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/WebSearchMode.d.ts +1 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/WebSearchToolConfig.d.ts +7 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/index.d.ts +77 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/serde_json/JsonValue.d.ts +3 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/Account.d.ts +10 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/AccountLoginCompletedNotification.d.ts +5 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/AccountRateLimitsUpdatedNotification.d.ts +4 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/AccountUpdatedNotification.d.ts +6 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ActivePermissionProfile.d.ts +18 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ActivePermissionProfileModification.d.ts +5 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/AddCreditsNudgeCreditType.d.ts +1 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/AddCreditsNudgeEmailStatus.d.ts +1 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/AdditionalFileSystemPermissions.d.ts +14 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/AdditionalNetworkPermissions.d.ts +3 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/AdditionalPermissionProfile.d.ts +9 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/AgentMessageDeltaNotification.d.ts +6 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/AnalyticsConfig.d.ts +8 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/AppBranding.d.ts +11 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/AppInfo.d.ts +30 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/AppListUpdatedNotification.d.ts +7 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/AppMetadata.d.ts +16 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/AppReview.d.ts +3 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/AppScreenshot.d.ts +5 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/AppSummary.d.ts +10 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/AppToolApproval.d.ts +1 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/AppToolsConfig.d.ts +7 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ApprovalsReviewer.d.ts +8 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/AppsConfig.d.ts +15 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/AppsDefaultConfig.d.ts +5 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/AppsListParams.d.ts +21 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/AppsListResponse.d.ts +12 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/AskForApproval.d.ts +9 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/AutoReviewDecisionSource.d.ts +4 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ByteRange.d.ts +4 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/CancelLoginAccountParams.d.ts +3 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/CancelLoginAccountResponse.d.ts +4 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/CancelLoginAccountStatus.d.ts +1 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ChatgptAuthTokensRefreshParams.d.ts +14 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ChatgptAuthTokensRefreshReason.d.ts +1 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ChatgptAuthTokensRefreshResponse.d.ts +5 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/CodexErrorInfo.d.ts +28 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/CollabAgentState.d.ts +5 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/CollabAgentStatus.d.ts +1 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/CollabAgentTool.d.ts +1 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/CollabAgentToolCallStatus.d.ts +1 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/CollaborationModeListParams.d.ts +4 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/CollaborationModeListResponse.d.ts +7 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/CollaborationModeMask.d.ts +11 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/CommandAction.d.ts +19 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/CommandExecOutputDeltaNotification.d.ts +27 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/CommandExecOutputStream.d.ts +4 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/CommandExecParams.d.ts +82 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/CommandExecResizeParams.d.ts +15 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/CommandExecResizeResponse.d.ts +4 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/CommandExecResponse.d.ts +21 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/CommandExecTerminalSize.d.ts +13 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/CommandExecTerminateParams.d.ts +10 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/CommandExecTerminateResponse.d.ts +4 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/CommandExecWriteParams.d.ts +19 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/CommandExecWriteResponse.d.ts +4 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/CommandExecutionApprovalDecision.d.ts +11 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/CommandExecutionOutputDeltaNotification.d.ts +6 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/CommandExecutionRequestApprovalParams.d.ts +40 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/CommandExecutionRequestApprovalResponse.d.ts +4 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/CommandExecutionSource.d.ts +1 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/CommandExecutionStatus.d.ts +1 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/CommandMigration.d.ts +3 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/Config.d.ts +47 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ConfigBatchWriteParams.d.ts +13 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ConfigEdit.d.ts +7 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ConfigLayer.d.ts +8 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ConfigLayerMetadata.d.ts +5 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ConfigLayerSource.d.ts +30 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ConfigReadParams.d.ts +9 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ConfigReadResponse.d.ts +10 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ConfigRequirements.d.ts +13 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ConfigRequirementsReadResponse.d.ts +7 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ConfigValueWriteParams.d.ts +12 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ConfigWarningNotification.d.ts +19 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ConfigWriteResponse.d.ts +12 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ConfiguredHookHandler.d.ts +11 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ConfiguredHookMatcherGroup.d.ts +5 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ContextCompactedNotification.d.ts +7 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/CreditsSnapshot.d.ts +5 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/DeprecationNoticeNotification.d.ts +10 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/DeviceKeyAlgorithm.d.ts +4 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/DeviceKeyCreateParams.d.ts +12 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/DeviceKeyCreateResponse.d.ts +14 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/DeviceKeyProtectionClass.d.ts +4 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/DeviceKeyProtectionPolicy.d.ts +4 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/DeviceKeyPublicParams.d.ts +6 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/DeviceKeyPublicResponse.d.ts +14 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/DeviceKeySignParams.d.ts +8 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/DeviceKeySignPayload.d.ts +62 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/DeviceKeySignResponse.d.ts +16 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/DynamicToolCallOutputContentItem.d.ts +7 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/DynamicToolCallParams.d.ts +9 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/DynamicToolCallResponse.d.ts +5 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/DynamicToolCallStatus.d.ts +1 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/DynamicToolSpec.d.ts +8 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ErrorNotification.d.ts +7 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ExecPolicyAmendment.d.ts +1 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ExperimentalFeature.d.ts +34 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ExperimentalFeatureEnablementSetParams.d.ts +11 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ExperimentalFeatureEnablementSetResponse.d.ts +8 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ExperimentalFeatureListParams.d.ts +10 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ExperimentalFeatureListResponse.d.ts +9 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ExperimentalFeatureStage.d.ts +1 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ExternalAgentConfigDetectParams.d.ts +10 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ExternalAgentConfigDetectResponse.d.ts +4 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ExternalAgentConfigImportCompletedNotification.d.ts +1 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ExternalAgentConfigImportParams.d.ts +4 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ExternalAgentConfigImportResponse.d.ts +1 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ExternalAgentConfigMigrationItem.d.ts +11 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ExternalAgentConfigMigrationItemType.d.ts +1 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/FeedbackUploadParams.d.ts +10 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/FeedbackUploadResponse.d.ts +3 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/FileChangeApprovalDecision.d.ts +1 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/FileChangeOutputDeltaNotification.d.ts +11 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/FileChangePatchUpdatedNotification.d.ts +7 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/FileChangeRequestApprovalParams.d.ts +14 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/FileChangeRequestApprovalResponse.d.ts +4 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/FileSystemAccessMode.d.ts +1 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/FileSystemPath.d.ts +12 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/FileSystemSandboxEntry.d.ts +6 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/FileSystemSpecialPath.d.ts +16 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/FileUpdateChange.d.ts +6 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/FsChangedNotification.d.ts +14 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/FsCopyParams.d.ts +18 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/FsCopyResponse.d.ts +4 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/FsCreateDirectoryParams.d.ts +14 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/FsCreateDirectoryResponse.d.ts +4 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/FsGetMetadataParams.d.ts +10 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/FsGetMetadataResponse.d.ts +25 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/FsReadDirectoryEntry.d.ts +17 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/FsReadDirectoryParams.d.ts +10 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/FsReadDirectoryResponse.d.ts +10 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/FsReadFileParams.d.ts +10 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/FsReadFileResponse.d.ts +9 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/FsRemoveParams.d.ts +18 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/FsRemoveResponse.d.ts +4 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/FsUnwatchParams.d.ts +9 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/FsUnwatchResponse.d.ts +4 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/FsWatchParams.d.ts +14 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/FsWatchResponse.d.ts +10 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/FsWriteFileParams.d.ts +14 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/FsWriteFileResponse.d.ts +4 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/GetAccountParams.d.ts +10 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/GetAccountRateLimitsResponse.d.ts +13 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/GetAccountResponse.d.ts +5 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/GitInfo.d.ts +5 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/GrantedPermissionProfile.d.ts +6 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/GuardianApprovalReview.d.ts +14 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/GuardianApprovalReviewAction.d.ts +37 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/GuardianApprovalReviewStatus.d.ts +4 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/GuardianCommandSource.d.ts +1 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/GuardianRiskLevel.d.ts +4 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/GuardianUserAuthorization.d.ts +4 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/GuardianWarningNotification.d.ts +10 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/HookCompletedNotification.d.ts +6 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/HookErrorInfo.d.ts +4 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/HookEventName.d.ts +1 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/HookExecutionMode.d.ts +1 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/HookHandlerType.d.ts +1 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/HookMetadata.d.ts +22 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/HookMigration.d.ts +3 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/HookOutputEntry.d.ts +5 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/HookOutputEntryKind.d.ts +1 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/HookPromptFragment.d.ts +4 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/HookRunStatus.d.ts +1 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/HookRunSummary.d.ts +24 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/HookScope.d.ts +1 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/HookSource.d.ts +1 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/HookStartedNotification.d.ts +6 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/HookTrustStatus.d.ts +1 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/HooksListEntry.d.ts +8 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/HooksListParams.d.ts +6 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/HooksListResponse.d.ts +4 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ItemCompletedNotification.d.ts +10 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ItemGuardianApprovalReviewCompletedNotification.d.ts +32 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ItemGuardianApprovalReviewStartedNotification.d.ts +30 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ItemStartedNotification.d.ts +10 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ListMcpServerStatusParams.d.ts +16 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ListMcpServerStatusResponse.d.ts +9 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/LoginAccountParams.d.ts +27 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/LoginAccountResponse.d.ts +23 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/LogoutAccountResponse.d.ts +1 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ManagedHooksRequirements.d.ts +13 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/MarketplaceAddParams.d.ts +5 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/MarketplaceAddResponse.d.ts +6 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/MarketplaceInterface.d.ts +3 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/MarketplaceLoadErrorInfo.d.ts +5 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/MarketplaceRemoveParams.d.ts +3 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/MarketplaceRemoveResponse.d.ts +5 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/MarketplaceUpgradeErrorInfo.d.ts +4 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/MarketplaceUpgradeParams.d.ts +3 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/MarketplaceUpgradeResponse.d.ts +7 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/McpAuthStatus.d.ts +1 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/McpElicitationArrayType.d.ts +1 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/McpElicitationBooleanSchema.d.ts +7 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/McpElicitationBooleanType.d.ts +1 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/McpElicitationConstOption.d.ts +4 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/McpElicitationEnumSchema.d.ts +4 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/McpElicitationLegacyTitledEnumSchema.d.ts +9 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/McpElicitationMultiSelectEnumSchema.d.ts +3 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/McpElicitationNumberSchema.d.ts +9 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/McpElicitationNumberType.d.ts +1 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/McpElicitationObjectType.d.ts +1 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/McpElicitationPrimitiveSchema.d.ts +5 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/McpElicitationSchema.d.ts +16 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/McpElicitationSingleSelectEnumSchema.d.ts +3 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/McpElicitationStringFormat.d.ts +1 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/McpElicitationStringSchema.d.ts +11 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/McpElicitationStringType.d.ts +1 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/McpElicitationTitledEnumItems.d.ts +4 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/McpElicitationTitledMultiSelectEnumSchema.d.ts +11 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/McpElicitationTitledSingleSelectEnumSchema.d.ts +9 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/McpElicitationUntitledEnumItems.d.ts +5 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/McpElicitationUntitledMultiSelectEnumSchema.d.ts +11 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/McpElicitationUntitledSingleSelectEnumSchema.d.ts +8 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/McpResourceReadParams.d.ts +5 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/McpResourceReadResponse.d.ts +4 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/McpServerElicitationAction.d.ts +1 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/McpServerElicitationRequestParams.d.ts +26 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/McpServerElicitationRequestResponse.d.ts +15 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/McpServerMigration.d.ts +3 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/McpServerOauthLoginCompletedNotification.d.ts +5 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/McpServerOauthLoginParams.d.ts +5 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/McpServerOauthLoginResponse.d.ts +3 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/McpServerRefreshResponse.d.ts +1 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/McpServerStartupState.d.ts +1 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/McpServerStatus.d.ts +13 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/McpServerStatusDetail.d.ts +1 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/McpServerStatusUpdatedNotification.d.ts +6 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/McpServerToolCallParams.d.ts +8 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/McpServerToolCallResponse.d.ts +7 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/McpToolCallError.d.ts +3 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/McpToolCallProgressNotification.d.ts +6 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/McpToolCallResult.d.ts +6 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/McpToolCallStatus.d.ts +1 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/MemoryCitation.d.ts +5 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/MemoryCitationEntry.d.ts +6 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/MergeStrategy.d.ts +1 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/MigrationDetails.d.ts +14 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/Model.d.ts +26 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ModelAvailabilityNux.d.ts +3 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ModelListParams.d.ts +14 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ModelListResponse.d.ts +9 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ModelProviderCapabilitiesReadParams.d.ts +1 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ModelProviderCapabilitiesReadResponse.d.ts +5 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ModelRerouteReason.d.ts +1 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ModelReroutedNotification.d.ts +8 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ModelServiceTier.d.ts +5 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ModelUpgradeInfo.d.ts +6 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ModelVerification.d.ts +1 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ModelVerificationNotification.d.ts +6 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/NetworkAccess.d.ts +1 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/NetworkApprovalContext.d.ts +5 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/NetworkApprovalProtocol.d.ts +1 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/NetworkDomainPermission.d.ts +1 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/NetworkPolicyAmendment.d.ts +5 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/NetworkPolicyRuleAction.d.ts +1 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/NetworkRequirements.d.ts +40 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/NetworkUnixSocketPermission.d.ts +1 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/NonSteerableTurnKind.d.ts +1 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/OverriddenMetadata.d.ts +7 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/PatchApplyStatus.d.ts +1 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/PatchChangeKind.d.ts +8 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/PermissionGrantScope.d.ts +1 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/PermissionProfile.d.ts +12 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/PermissionProfileFileSystemPermissions.d.ts +8 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/PermissionProfileModificationParams.d.ts +5 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/PermissionProfileNetworkPermissions.d.ts +3 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/PermissionProfileSelectionParams.d.ts +6 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/PermissionsRequestApprovalParams.d.ts +10 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/PermissionsRequestApprovalResponse.d.ts +10 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/PlanDeltaNotification.d.ts +10 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/PluginAuthPolicy.d.ts +1 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/PluginAvailability.d.ts +1 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/PluginDetail.d.ts +13 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/PluginInstallParams.d.ts +6 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/PluginInstallPolicy.d.ts +1 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/PluginInstallResponse.d.ts +6 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/PluginInterface.d.ts +42 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/PluginListMarketplaceKind.d.ts +1 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/PluginListParams.d.ts +14 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/PluginListResponse.d.ts +7 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/PluginMarketplaceEntry.d.ts +13 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/PluginReadParams.d.ts +6 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/PluginReadResponse.d.ts +4 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/PluginShareContext.d.ts +5 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/PluginShareDeleteParams.d.ts +3 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/PluginShareDeleteResponse.d.ts +1 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/PluginShareDiscoverability.d.ts +1 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/PluginShareListItem.d.ts +7 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/PluginShareListParams.d.ts +1 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/PluginShareListResponse.d.ts +4 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/PluginSharePrincipal.d.ts +6 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/PluginSharePrincipalType.d.ts +1 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/PluginShareSaveParams.d.ts +9 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/PluginShareSaveResponse.d.ts +4 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/PluginShareTarget.d.ts +5 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/PluginShareUpdateTargetsParams.d.ts +5 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/PluginShareUpdateTargetsResponse.d.ts +4 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/PluginSkillReadParams.d.ts +5 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/PluginSkillReadResponse.d.ts +3 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/PluginSource.d.ts +13 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/PluginSummary.d.ts +25 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/PluginUninstallParams.d.ts +3 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/PluginUninstallResponse.d.ts +1 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/PluginsMigration.d.ts +4 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ProcessExitedNotification.d.ts +39 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ProcessOutputDeltaNotification.d.ts +23 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ProcessOutputStream.d.ts +4 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ProcessTerminalSize.d.ts +13 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ProfileV2.d.ts +29 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/RateLimitReachedType.d.ts +1 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/RateLimitSnapshot.d.ts +13 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/RateLimitWindow.d.ts +5 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/RawResponseItemCompletedNotification.d.ts +6 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ReasoningEffortOption.d.ts +5 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ReasoningSummaryPartAddedNotification.d.ts +6 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ReasoningSummaryTextDeltaNotification.d.ts +7 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ReasoningTextDeltaNotification.d.ts +7 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/RemoteControlClientConnectionAudience.d.ts +4 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/RemoteControlClientEnrollmentAudience.d.ts +4 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/RemoteControlConnectionStatus.d.ts +1 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/RemoteControlStatusChangedNotification.d.ts +8 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/RequestPermissionProfile.d.ts +6 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ResidencyRequirement.d.ts +1 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ReviewDelivery.d.ts +1 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ReviewStartParams.d.ts +11 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ReviewStartResponse.d.ts +11 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ReviewTarget.d.ts +16 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/SandboxMode.d.ts +1 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/SandboxPolicy.d.ts +17 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/SandboxWorkspaceWrite.d.ts +6 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/SendAddCreditsNudgeEmailParams.d.ts +4 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/SendAddCreditsNudgeEmailResponse.d.ts +4 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ServerRequestResolvedNotification.d.ts +5 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/SessionMigration.d.ts +5 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/SessionSource.d.ts +6 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/SkillDependencies.d.ts +4 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/SkillErrorInfo.d.ts +4 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/SkillInterface.d.ts +9 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/SkillMetadata.d.ts +17 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/SkillScope.d.ts +1 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/SkillSummary.d.ts +10 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/SkillToolDependency.d.ts +8 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/SkillsChangedNotification.d.ts +7 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/SkillsConfigWriteParams.d.ts +12 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/SkillsConfigWriteResponse.d.ts +3 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/SkillsListEntry.d.ts +7 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/SkillsListExtraRootsForCwd.d.ts +4 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/SkillsListParams.d.ts +15 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/SkillsListResponse.d.ts +4 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/SortDirection.d.ts +1 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/SubagentMigration.d.ts +3 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/TerminalInteractionNotification.d.ts +7 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/TextElement.d.ts +11 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/TextPosition.d.ts +10 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/TextRange.d.ts +5 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/Thread.d.ts +84 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ThreadActiveFlag.d.ts +1 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ThreadApproveGuardianDeniedActionParams.d.ts +8 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ThreadApproveGuardianDeniedActionResponse.d.ts +1 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ThreadArchiveParams.d.ts +3 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ThreadArchiveResponse.d.ts +1 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ThreadArchivedNotification.d.ts +3 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ThreadClosedNotification.d.ts +3 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ThreadCompactStartParams.d.ts +3 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ThreadCompactStartResponse.d.ts +1 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ThreadForkParams.d.ts +38 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ThreadForkResponse.d.ts +26 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ThreadGoal.d.ts +11 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ThreadGoalClearedNotification.d.ts +3 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ThreadGoalStatus.d.ts +1 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ThreadGoalUpdatedNotification.d.ts +6 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ThreadInjectItemsParams.d.ts +8 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ThreadInjectItemsResponse.d.ts +1 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ThreadItem.d.ts +180 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ThreadListParams.d.ts +51 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ThreadListResponse.d.ts +16 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ThreadLoadedListParams.d.ts +10 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ThreadLoadedListResponse.d.ts +11 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ThreadMetadataGitInfoUpdateParams.d.ts +17 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ThreadMetadataUpdateParams.d.ts +10 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ThreadMetadataUpdateResponse.d.ts +4 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ThreadNameUpdatedNotification.d.ts +4 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ThreadReadParams.d.ts +7 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ThreadReadResponse.d.ts +4 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ThreadRealtimeAudioChunk.d.ts +10 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ThreadRealtimeClosedNotification.d.ts +7 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ThreadRealtimeErrorNotification.d.ts +7 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ThreadRealtimeItemAddedNotification.d.ts +8 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ThreadRealtimeOutputAudioDeltaNotification.d.ts +8 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ThreadRealtimeSdpNotification.d.ts +7 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ThreadRealtimeStartTransport.d.ts +13 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ThreadRealtimeStartedNotification.d.ts +9 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ThreadRealtimeTranscriptDeltaNotification.d.ts +12 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ThreadRealtimeTranscriptDoneNotification.d.ts +12 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ThreadResumeParams.d.ts +37 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ThreadResumeResponse.d.ts +26 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ThreadRollbackParams.d.ts +10 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ThreadRollbackResponse.d.ts +11 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ThreadSetNameParams.d.ts +4 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ThreadSetNameResponse.d.ts +1 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ThreadShellCommandParams.d.ts +10 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ThreadShellCommandResponse.d.ts +1 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ThreadSortKey.d.ts +1 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ThreadSource.d.ts +1 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ThreadSourceKind.d.ts +1 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ThreadStartParams.d.ts +31 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ThreadStartResponse.d.ts +26 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ThreadStartSource.d.ts +1 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ThreadStartedNotification.d.ts +4 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ThreadStatus.d.ts +11 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ThreadStatusChangedNotification.d.ts +5 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ThreadTokenUsage.d.ts +6 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ThreadTokenUsageUpdatedNotification.d.ts +6 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ThreadUnarchiveParams.d.ts +3 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ThreadUnarchiveResponse.d.ts +4 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ThreadUnarchivedNotification.d.ts +3 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ThreadUnsubscribeParams.d.ts +3 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ThreadUnsubscribeResponse.d.ts +4 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ThreadUnsubscribeStatus.d.ts +1 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/TokenUsageBreakdown.d.ts +7 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ToolRequestUserInputAnswer.d.ts +6 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ToolRequestUserInputOption.d.ts +7 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ToolRequestUserInputParams.d.ts +10 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ToolRequestUserInputQuestion.d.ts +12 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ToolRequestUserInputResponse.d.ts +9 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/ToolsV2.d.ts +5 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/Turn.d.ts +32 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/TurnCompletedNotification.d.ts +5 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/TurnDiffUpdatedNotification.d.ts +9 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/TurnEnvironmentParams.d.ts +5 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/TurnError.d.ts +6 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/TurnInterruptParams.d.ts +4 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/TurnInterruptResponse.d.ts +1 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/TurnItemsView.d.ts +1 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/TurnPlanStep.d.ts +5 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/TurnPlanStepStatus.d.ts +1 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/TurnPlanUpdatedNotification.d.ts +7 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/TurnStartParams.d.ts +44 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/TurnStartResponse.d.ts +4 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/TurnStartedNotification.d.ts +5 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/TurnStatus.d.ts +1 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/TurnSteerParams.d.ts +9 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/TurnSteerResponse.d.ts +3 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/UserInput.d.ts +23 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/WarningNotification.d.ts +10 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/WebSearchAction.d.ts +14 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/WindowsSandboxReadiness.d.ts +1 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/WindowsSandboxReadinessResponse.d.ts +4 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/WindowsSandboxSetupCompletedNotification.d.ts +6 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/WindowsSandboxSetupMode.d.ts +1 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/WindowsSandboxSetupStartParams.d.ts +6 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/WindowsSandboxSetupStartResponse.d.ts +3 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/WindowsWorldWritableWarningNotification.d.ts +5 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/WriteStatus.d.ts +1 -0
- package/dist/internal/codex/app-server-protocol/schema/typescript/v2/index.d.ts +457 -0
- package/dist/internal/codex/app-server-protocol/src/protocol/common.d.ts +36 -0
- package/dist/internal/codex/app-server-protocol/src/protocol/event-mapping.d.ts +41 -0
- package/dist/internal/codex/app-server-protocol/src/protocol/index.d.ts +3 -0
- package/dist/internal/codex/app-server-protocol/src/protocol/thread-resume.d.ts +11 -0
- package/dist/internal/codex/app-server-transport/src/outgoing_message.d.ts +27 -0
- package/dist/internal/codex/app-server-transport/src/transport/mod.d.ts +78 -0
- package/dist/internal/codex/codex-api/src/common.d.ts +100 -0
- package/dist/internal/codex/codex-api/src/endpoint/responses.d.ts +28 -0
- package/dist/internal/codex/codex-api/src/endpoint/responses_websocket.d.ts +54 -0
- package/dist/internal/codex/codex-api/src/error.d.ts +21 -0
- package/dist/internal/codex/codex-api/src/index.d.ts +9 -0
- package/dist/internal/codex/codex-api/src/provider.d.ts +22 -0
- package/dist/internal/codex/codex-api/src/rate_limits.d.ts +3 -0
- package/dist/internal/codex/codex-api/src/requests/responses.d.ts +16 -0
- package/dist/internal/codex/codex-api/src/sse/responses.d.ts +13 -0
- package/dist/internal/codex/codex-api/src/stream_events_utils.d.ts +23 -0
- package/dist/internal/codex/codex-mcp/src/auth_elicitation.d.ts +41 -0
- package/dist/internal/codex/codex-mcp/src/codex_apps.d.ts +57 -0
- package/dist/internal/codex/codex-mcp/src/connection_manager.d.ts +72 -0
- package/dist/internal/codex/codex-mcp/src/elicitation.d.ts +77 -0
- package/dist/internal/codex/codex-mcp/src/mcp/auth.d.ts +64 -0
- package/dist/internal/codex/codex-mcp/src/mcp/mod.d.ts +16 -0
- package/dist/internal/codex/codex-mcp/src/rmcp_client.d.ts +221 -0
- package/dist/internal/codex/codex-mcp/src/tools.d.ts +37 -0
- package/dist/internal/codex/config/src/config_toml.d.ts +14 -0
- package/dist/internal/codex/config/src/index.d.ts +7 -0
- package/dist/internal/codex/config/src/loader/mod.d.ts +21 -0
- package/dist/internal/codex/config/src/merge.d.ts +22 -0
- package/dist/internal/codex/config/src/permissions_toml.d.ts +6 -0
- package/dist/internal/codex/config/src/profile_toml.d.ts +1 -0
- package/dist/internal/codex/config/src/thread_config.d.ts +43 -0
- package/dist/internal/codex/config/src/types.d.ts +121 -0
- package/dist/internal/codex/core/src/agent/agent_resolver.d.ts +3 -0
- package/dist/internal/codex/core/src/agent/control.d.ts +76 -0
- package/dist/internal/codex/core/src/agent/mailbox.d.ts +28 -0
- package/dist/internal/codex/core/src/agent/mod.d.ts +6 -0
- package/dist/internal/codex/core/src/agent/registry.d.ts +54 -0
- package/dist/internal/codex/core/src/agent/role.d.ts +19 -0
- package/dist/internal/codex/core/src/agent/status.d.ts +3 -0
- package/dist/internal/codex/core/src/auth.d.ts +65 -0
- package/dist/internal/codex/core/src/client.d.ts +129 -0
- package/dist/internal/codex/core/src/collaboration-mode-presets.d.ts +9 -0
- package/dist/internal/codex/core/src/compact-task-runner.d.ts +18 -0
- package/dist/internal/codex/core/src/compact.d.ts +12 -0
- package/dist/internal/codex/core/src/config/agent_roles.d.ts +6 -0
- package/dist/internal/codex/core/src/config/managed_features.d.ts +7 -0
- package/dist/internal/codex/core/src/config/mod.d.ts +9 -0
- package/dist/internal/codex/core/src/config/network_proxy_spec.d.ts +5 -0
- package/dist/internal/codex/core/src/config/permissions.d.ts +30 -0
- package/dist/internal/codex/core/src/config-types.d.ts +28 -0
- package/dist/internal/codex/core/src/context/collaboration-mode-instructions.d.ts +10 -0
- package/dist/internal/codex/core/src/context/context-updates.d.ts +10 -0
- package/dist/internal/codex/core/src/context/environment-context.d.ts +24 -0
- package/dist/internal/codex/core/src/context/fragment.d.ts +22 -0
- package/dist/internal/codex/core/src/context/permissions-instructions.d.ts +8 -0
- package/dist/internal/codex/core/src/context/prompt-context.d.ts +8 -0
- package/dist/internal/codex/core/src/context/turn-aborted.d.ts +3 -0
- package/dist/internal/codex/core/src/context/user-instructions.d.ts +7 -0
- package/dist/internal/codex/core/src/context_manager/history.d.ts +60 -0
- package/dist/internal/codex/core/src/context_manager/normalize.d.ts +6 -0
- package/dist/internal/codex/core/src/event-mapping.d.ts +9 -0
- package/dist/internal/codex/core/src/exec-output.d.ts +20 -0
- package/dist/internal/codex/core/src/goals/index.d.ts +2 -0
- package/dist/internal/codex/core/src/goals/runtime.d.ts +32 -0
- package/dist/internal/codex/core/src/goals/types.d.ts +95 -0
- package/dist/internal/codex/core/src/goals.d.ts +1 -0
- package/dist/internal/codex/core/src/hooks/dispatcher.d.ts +5 -0
- package/dist/internal/codex/core/src/hooks/index.d.ts +4 -0
- package/dist/internal/codex/core/src/hooks/output-parser.d.ts +9 -0
- package/dist/internal/codex/core/src/hooks/runtime.d.ts +125 -0
- package/dist/internal/codex/core/src/hooks/types.d.ts +40 -0
- package/dist/internal/codex/core/src/ids.d.ts +5 -0
- package/dist/internal/codex/core/src/index.d.ts +98 -0
- package/dist/internal/codex/core/src/items.d.ts +137 -0
- package/dist/internal/codex/core/src/mcp/index.d.ts +10 -0
- package/dist/internal/codex/core/src/mcp/manager.d.ts +73 -0
- package/dist/internal/codex/core/src/mcp/types.d.ts +165 -0
- package/dist/internal/codex/core/src/mcp.d.ts +1 -0
- package/dist/internal/codex/core/src/memory.d.ts +21 -0
- package/dist/internal/codex/core/src/model-provider.d.ts +193 -0
- package/dist/internal/codex/core/src/models.d.ts +158 -0
- package/dist/internal/codex/core/src/plan-mode.d.ts +1 -0
- package/dist/internal/codex/core/src/protocol/dynamic_tools.d.ts +48 -0
- package/dist/internal/codex/core/src/protocol/user_input.d.ts +30 -0
- package/dist/internal/codex/core/src/protocol.d.ts +893 -0
- package/dist/internal/codex/core/src/rendered-thread.d.ts +30 -0
- package/dist/internal/codex/core/src/request_permissions.d.ts +52 -0
- package/dist/internal/codex/core/src/request_user_input.d.ts +47 -0
- package/dist/internal/codex/core/src/session/rollout-reconstruction.d.ts +11 -0
- package/dist/internal/codex/core/src/session/session-settings.d.ts +29 -0
- package/dist/internal/codex/core/src/session/session.d.ts +226 -0
- package/dist/internal/codex/core/src/session/turn-context.d.ts +71 -0
- package/dist/internal/codex/core/src/session/turn-timing.d.ts +12 -0
- package/dist/internal/codex/core/src/session/turn.d.ts +35 -0
- package/dist/internal/codex/core/src/state/session.d.ts +40 -0
- package/dist/internal/codex/core/src/state/turn.d.ts +83 -0
- package/dist/internal/codex/core/src/stream-parser.d.ts +36 -0
- package/dist/internal/codex/core/src/stream_events_utils.d.ts +43 -0
- package/dist/internal/codex/core/src/tasks/compact.d.ts +26 -0
- package/dist/internal/codex/core/src/tasks/mod.d.ts +43 -0
- package/dist/internal/codex/core/src/tasks/regular.d.ts +27 -0
- package/dist/internal/codex/core/src/templates.d.ts +12 -0
- package/dist/{thread-history-builder-zW0zeqcS.d.ts → internal/codex/core/src/thread-history-builder.d.ts} +14 -16
- package/dist/internal/codex/core/src/thread-store/index.d.ts +3 -0
- package/dist/{live-thread-BMvlflzM.d.ts → internal/codex/core/src/thread-store/live-thread.d.ts} +7 -8
- package/dist/{store-AGRxhgQ3.d.ts → internal/codex/core/src/thread-store/store.d.ts} +3 -6
- package/dist/{types-BTeabLYr.d.ts → internal/codex/core/src/thread-store/types.d.ts} +25 -26
- package/dist/internal/codex/core/src/tools/code_mode/execute_handler.d.ts +7 -0
- package/dist/internal/codex/core/src/tools/code_mode/execute_spec.d.ts +13 -0
- package/dist/internal/codex/core/src/tools/code_mode/mod.d.ts +5 -0
- package/dist/internal/codex/core/src/tools/code_mode/response_adapter.d.ts +2 -0
- package/dist/internal/codex/core/src/tools/code_mode/wait_handler.d.ts +7 -0
- package/dist/internal/codex/core/src/tools/code_mode/wait_spec.d.ts +13 -0
- package/dist/internal/codex/core/src/tools/context.d.ts +155 -0
- package/dist/internal/codex/core/src/tools/events.d.ts +50 -0
- package/dist/internal/codex/core/src/tools/handlers/apply_patch.d.ts +14 -0
- package/dist/internal/codex/core/src/tools/handlers/apply_patch_spec.d.ts +16 -0
- package/dist/internal/codex/core/src/tools/handlers/dynamic.d.ts +17 -0
- package/dist/internal/codex/core/src/tools/handlers/goal.d.ts +20 -0
- package/dist/internal/codex/core/src/tools/handlers/goal_spec.d.ts +51 -0
- package/dist/internal/codex/core/src/tools/handlers/mcp.d.ts +23 -0
- package/dist/internal/codex/core/src/tools/handlers/mcp_resource.d.ts +24 -0
- package/dist/internal/codex/core/src/tools/handlers/mcp_resource_spec.d.ts +61 -0
- package/dist/internal/codex/core/src/tools/handlers/multi_agents.d.ts +50 -0
- package/dist/internal/codex/core/src/tools/handlers/multi_agents_common.d.ts +3 -0
- package/dist/internal/codex/core/src/tools/handlers/multi_agents_spec.d.ts +5 -0
- package/dist/internal/codex/core/src/tools/handlers/multi_agents_v2.d.ts +1 -0
- package/dist/internal/codex/core/src/tools/handlers/plan.d.ts +8 -0
- package/dist/internal/codex/core/src/tools/handlers/plan_spec.d.ts +35 -0
- package/dist/internal/codex/core/src/tools/handlers/request_permissions.d.ts +7 -0
- package/dist/internal/codex/core/src/tools/handlers/request_permissions_spec.d.ts +1 -0
- package/dist/internal/codex/core/src/tools/handlers/request_plugin_install.d.ts +8 -0
- package/dist/internal/codex/core/src/tools/handlers/request_plugin_install_spec.d.ts +12 -0
- package/dist/internal/codex/core/src/tools/handlers/request_user_input.d.ts +13 -0
- package/dist/internal/codex/core/src/tools/handlers/request_user_input_spec.d.ts +1 -0
- package/dist/internal/codex/core/src/tools/handlers/shell_spec.d.ts +60 -0
- package/dist/internal/codex/core/src/tools/handlers/test_sync.d.ts +1 -0
- package/dist/internal/codex/core/src/tools/handlers/test_sync_spec.d.ts +12 -0
- package/dist/internal/codex/core/src/tools/handlers/tool_search.d.ts +28 -0
- package/dist/internal/codex/core/src/tools/handlers/tool_search_spec.d.ts +21 -0
- package/dist/internal/codex/core/src/tools/handlers/unavailable_tool.d.ts +10 -0
- package/dist/internal/codex/core/src/tools/handlers/unified_exec/exec_command.d.ts +13 -0
- package/dist/internal/codex/core/src/tools/handlers/unified_exec/write_stdin.d.ts +8 -0
- package/dist/internal/codex/core/src/tools/handlers/unified_exec.d.ts +2 -0
- package/dist/internal/codex/core/src/tools/hook_names.d.ts +6 -0
- package/dist/internal/codex/core/src/tools/hosted_spec.d.ts +9 -0
- package/dist/internal/codex/core/src/tools/network_approval.d.ts +11 -0
- package/dist/internal/codex/core/src/tools/orchestrator.d.ts +28 -0
- package/dist/internal/codex/core/src/tools/parallel.d.ts +33 -0
- package/dist/internal/codex/core/src/tools/registry.d.ts +27 -0
- package/dist/internal/codex/core/src/tools/responses_api.d.ts +34 -0
- package/dist/internal/codex/core/src/tools/router.d.ts +50 -0
- package/dist/internal/codex/core/src/tools/runtimes/apply_patch.d.ts +2 -0
- package/dist/internal/codex/core/src/tools/runtimes/mod.d.ts +4 -0
- package/dist/internal/codex/core/src/tools/runtimes/shell.d.ts +2 -0
- package/dist/internal/codex/core/src/tools/runtimes/unified_exec.d.ts +2 -0
- package/dist/internal/codex/core/src/tools/sandboxing.d.ts +36 -0
- package/dist/internal/codex/core/src/tools/spec.d.ts +10 -0
- package/dist/internal/codex/core/src/tools/spec_plan.d.ts +2 -0
- package/dist/internal/codex/core/src/tools/spec_plan_types.d.ts +93 -0
- package/dist/internal/codex/core/src/tools/tool_dispatch_trace.d.ts +12 -0
- package/dist/internal/codex/core/src/tools/tool_name.d.ts +17 -0
- package/dist/internal/codex/core/src/tools/tool_search_entry.d.ts +35 -0
- package/dist/internal/codex/core/src/tools/tool_spec.d.ts +29 -0
- package/dist/{mod-DYVLSWO4.d.ts → internal/codex/thread-store/src/in_memory.d.ts} +8 -39
- package/dist/internal/codex/thread-store/src/index.d.ts +6 -0
- package/dist/internal/codex/thread-store/src/local/mod.d.ts +32 -0
- package/dist/internal/codex/utils/output-truncation/src/lib.d.ts +19 -0
- package/dist/internal/codex/utils/string/src/lib.d.ts +1 -0
- package/dist/internal/codex/utils/string/src/truncate.d.ts +5 -0
- package/dist/runtime/index.d.ts +47 -0
- package/dist/server/index.d.ts +2 -29
- package/dist/server/index.js +20488 -15
- package/dist/testing/index.d.ts +2 -9
- package/dist/testing/index.js +1698 -15
- package/package.json +9 -100
- package/dist/ClientNotification-B6-FhXQf.d.ts +0 -5
- package/dist/DynamicToolCallResponse-82DFjES2.d.ts +0 -8
- package/dist/DynamicToolSpec-CfnhqAYK.d.ts +0 -29
- package/dist/PermissionsRequestApprovalResponse-DxzPPDRb.d.ts +0 -55
- package/dist/ProviderStatusBanner-BlP6lzwE.d.ts +0 -441
- package/dist/ServerRequest-B5cKVJjr.d.ts +0 -2181
- package/dist/ThreadResumeResponse-DvmE1juU.d.ts +0 -1542
- package/dist/ToolRequestUserInputQuestion-CeZa5X1J.d.ts +0 -23
- package/dist/ToolRequestUserInputResponse-zcPLwbiK.d.ts +0 -17
- package/dist/TurnSteerResponse-0kBCfplh.d.ts +0 -209
- package/dist/WebSearchToolConfig-D3ep0625.d.ts +0 -18
- package/dist/chat-runtime-B6azJyKo.d.ts +0 -381
- package/dist/chunk-2DZRMCI2.js +0 -1258
- package/dist/chunk-2DZRMCI2.js.map +0 -1
- package/dist/chunk-4DPLJPB5.js +0 -396
- package/dist/chunk-4DPLJPB5.js.map +0 -1
- package/dist/chunk-5JMJ6OI5.js +0 -3
- package/dist/chunk-5JMJ6OI5.js.map +0 -1
- package/dist/chunk-6ZMJ34KE.js +0 -1153
- package/dist/chunk-6ZMJ34KE.js.map +0 -1
- package/dist/chunk-CGBS37IU.js +0 -128
- package/dist/chunk-CGBS37IU.js.map +0 -1
- package/dist/chunk-DCMKA2A6.js +0 -18
- package/dist/chunk-DCMKA2A6.js.map +0 -1
- package/dist/chunk-DYLHN3HG.js +0 -937
- package/dist/chunk-DYLHN3HG.js.map +0 -1
- package/dist/chunk-FN3SWHRH.js +0 -934
- package/dist/chunk-FN3SWHRH.js.map +0 -1
- package/dist/chunk-ILXA6HLX.js +0 -1973
- package/dist/chunk-ILXA6HLX.js.map +0 -1
- package/dist/chunk-LWQNX4LI.js +0 -13755
- package/dist/chunk-LWQNX4LI.js.map +0 -1
- package/dist/chunk-NCI4MAWZ.js +0 -7733
- package/dist/chunk-NCI4MAWZ.js.map +0 -1
- package/dist/chunk-O44XP7LH.js +0 -214
- package/dist/chunk-O44XP7LH.js.map +0 -1
- package/dist/chunk-PST3ZWX2.js +0 -555
- package/dist/chunk-PST3ZWX2.js.map +0 -1
- package/dist/chunk-SYPHCDRD.js +0 -1133
- package/dist/chunk-SYPHCDRD.js.map +0 -1
- package/dist/chunk-V4BMZWBM.js +0 -2401
- package/dist/chunk-V4BMZWBM.js.map +0 -1
- package/dist/chunk-YHVCFD2D.js +0 -117
- package/dist/chunk-YHVCFD2D.js.map +0 -1
- package/dist/chunk-Z63UPBS3.js +0 -152
- package/dist/chunk-Z63UPBS3.js.map +0 -1
- package/dist/chunk-ZX5OIIJX.js +0 -3
- package/dist/chunk-ZX5OIIJX.js.map +0 -1
- package/dist/client/index.js.map +0 -1
- package/dist/codex-rs/app-server/index.d.ts +0 -161
- package/dist/codex-rs/app-server/index.js +0 -13
- package/dist/codex-rs/app-server/index.js.map +0 -1
- package/dist/codex-rs/app-server-protocol/index.d.ts +0 -1722
- package/dist/codex-rs/app-server-protocol/index.js +0 -6
- package/dist/codex-rs/app-server-protocol/index.js.map +0 -1
- package/dist/codex-rs/app-server-protocol/protocol.d.ts +0 -19
- package/dist/codex-rs/app-server-protocol/protocol.js +0 -4
- package/dist/codex-rs/app-server-protocol/protocol.js.map +0 -1
- package/dist/codex-rs/codex-api/index.d.ts +0 -104
- package/dist/codex-rs/codex-api/index.js +0 -11
- package/dist/codex-rs/codex-api/index.js.map +0 -1
- package/dist/codex-rs/config/index.d.ts +0 -88
- package/dist/codex-rs/config/index.js +0 -4
- package/dist/codex-rs/config/index.js.map +0 -1
- package/dist/codex-rs/core/config/index.d.ts +0 -61
- package/dist/codex-rs/core/config/index.js +0 -5
- package/dist/codex-rs/core/config/index.js.map +0 -1
- package/dist/codex-rs/core/index.d.ts +0 -1393
- package/dist/codex-rs/core/index.js +0 -11
- package/dist/codex-rs/core/index.js.map +0 -1
- package/dist/codex-rs/model-provider/index.d.ts +0 -2
- package/dist/codex-rs/model-provider/index.js +0 -4
- package/dist/codex-rs/model-provider/index.js.map +0 -1
- package/dist/codex-rs/models-manager/index.d.ts +0 -2
- package/dist/codex-rs/models-manager/index.js +0 -4
- package/dist/codex-rs/models-manager/index.js.map +0 -1
- package/dist/codex-rs/parity.d.ts +0 -26
- package/dist/codex-rs/parity.js +0 -3
- package/dist/codex-rs/parity.js.map +0 -1
- package/dist/codex-rs/thread-store/index.d.ts +0 -5
- package/dist/codex-rs/thread-store/index.js +0 -4
- package/dist/codex-rs/thread-store/index.js.map +0 -1
- package/dist/codex-rs/unsupported.d.ts +0 -15
- package/dist/codex-rs/unsupported.js +0 -22
- package/dist/codex-rs/unsupported.js.map +0 -1
- package/dist/codex-rs/utils/output-truncation.d.ts +0 -21
- package/dist/codex-rs/utils/output-truncation.js +0 -4
- package/dist/codex-rs/utils/output-truncation.js.map +0 -1
- package/dist/codex-rs/utils/string.d.ts +0 -7
- package/dist/codex-rs/utils/string.js +0 -3
- package/dist/codex-rs/utils/string.js.map +0 -1
- package/dist/common-CTyph5x8.d.ts +0 -40
- package/dist/event-mapping-CbISdQ1D.d.ts +0 -43
- package/dist/history-CfM-4V7b.d.ts +0 -1654
- package/dist/index-CoDZosq0.d.ts +0 -261
- package/dist/index.js.map +0 -1
- package/dist/lib-nXlaKiS-.d.ts +0 -48
- package/dist/merge-B_AWVmnI.d.ts +0 -24
- package/dist/plan-mode-Cv6KWb_S.d.ts +0 -14
- package/dist/proposed-plan-DpN1ma0Y.d.ts +0 -53
- package/dist/protocol-mpBcYHrm.d.ts +0 -1655
- package/dist/react/index.d.ts +0 -41
- package/dist/react/index.js +0 -19
- package/dist/react/index.js.map +0 -1
- package/dist/remote-ClZbq9KN.d.ts +0 -21
- package/dist/rendered-thread-AOxw3V5b.d.ts +0 -29
- package/dist/responses_websocket-BhxSgCzK.d.ts +0 -183
- package/dist/runtime-Cm6ml53h.d.ts +0 -528
- package/dist/server/index.js.map +0 -1
- package/dist/shadcn/index.d.ts +0 -68
- package/dist/shadcn/index.js +0 -334
- package/dist/shadcn/index.js.map +0 -1
- package/dist/sidebar-DMMij22z.d.ts +0 -87
- package/dist/spec_plan_types-CmsJ-Tfn.d.ts +0 -260
- package/dist/styles.css +0 -1
- package/dist/t3code/apps/web/components/chat.d.ts +0 -508
- package/dist/t3code/apps/web/components/chat.js +0 -12
- package/dist/t3code/apps/web/components/chat.js.map +0 -1
- package/dist/t3code/apps/web/index.d.ts +0 -12
- package/dist/t3code/apps/web/index.js +0 -13
- package/dist/t3code/apps/web/index.js.map +0 -1
- package/dist/testing/index.js.map +0 -1
package/dist/chunk-DYLHN3HG.js
DELETED
|
@@ -1,937 +0,0 @@
|
|
|
1
|
-
// src/upstream/codex-rs/core/src/event-mapping.ts
|
|
2
|
-
var CONTEXTUAL_DEVELOPER_PREFIXES = [
|
|
3
|
-
"<permissions instructions>",
|
|
4
|
-
"<developer_instructions>",
|
|
5
|
-
"<model_switch>",
|
|
6
|
-
"<collaboration_mode>",
|
|
7
|
-
"<realtime_conversation>",
|
|
8
|
-
"<personality_spec>",
|
|
9
|
-
"<hook_additional_context>"
|
|
10
|
-
];
|
|
11
|
-
function isContextualUserMessageContent(message) {
|
|
12
|
-
return message.some(isContextualUserFragment);
|
|
13
|
-
}
|
|
14
|
-
function isContextualDevMessageContent(message) {
|
|
15
|
-
return message.some(isContextualDevFragment);
|
|
16
|
-
}
|
|
17
|
-
function hasNonContextualDevMessageContent(message) {
|
|
18
|
-
return message.some((contentItem) => !isContextualDevFragment(contentItem));
|
|
19
|
-
}
|
|
20
|
-
function parseUserMessage(id, message) {
|
|
21
|
-
if (isContextualUserMessageContent(message)) {
|
|
22
|
-
return null;
|
|
23
|
-
}
|
|
24
|
-
const content = [];
|
|
25
|
-
for (const [index, contentItem] of message.entries()) {
|
|
26
|
-
if (contentItem.type === "input_text") {
|
|
27
|
-
if ((isLocalImageOpenTagText(contentItem.text) || isImageOpenTagText(contentItem.text)) && message[index + 1]?.type === "input_image" || index > 0 && (isLocalImageCloseTagText(contentItem.text) || isImageCloseTagText(contentItem.text)) && message[index - 1]?.type === "input_image") {
|
|
28
|
-
continue;
|
|
29
|
-
}
|
|
30
|
-
content.push({
|
|
31
|
-
type: "text",
|
|
32
|
-
text: contentItem.text,
|
|
33
|
-
text_elements: []
|
|
34
|
-
});
|
|
35
|
-
continue;
|
|
36
|
-
}
|
|
37
|
-
if (contentItem.type === "input_image") {
|
|
38
|
-
content.push({
|
|
39
|
-
type: "image",
|
|
40
|
-
image_url: contentItem.image_url
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
return {
|
|
45
|
-
type: "UserMessage",
|
|
46
|
-
id: id ?? "",
|
|
47
|
-
content
|
|
48
|
-
};
|
|
49
|
-
}
|
|
50
|
-
function parseAgentMessage(id, message, phase) {
|
|
51
|
-
const content = [];
|
|
52
|
-
for (const contentItem of message) {
|
|
53
|
-
if (contentItem.type === "input_text" || contentItem.type === "output_text") {
|
|
54
|
-
content.push({ type: "Text", text: contentItem.text });
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
return {
|
|
58
|
-
type: "AgentMessage",
|
|
59
|
-
id: id ?? "",
|
|
60
|
-
content,
|
|
61
|
-
phase: phase ?? null,
|
|
62
|
-
memory_citation: null
|
|
63
|
-
};
|
|
64
|
-
}
|
|
65
|
-
function parseVisibleHookPromptMessage(id, message) {
|
|
66
|
-
const fragments = [];
|
|
67
|
-
for (const contentItem of message) {
|
|
68
|
-
if (contentItem.type !== "input_text") {
|
|
69
|
-
return null;
|
|
70
|
-
}
|
|
71
|
-
const fragment = parseHookPromptFragment(contentItem.text);
|
|
72
|
-
if (fragment) {
|
|
73
|
-
fragments.push(fragment);
|
|
74
|
-
continue;
|
|
75
|
-
}
|
|
76
|
-
if (isStandardContextualUserText(contentItem.text)) {
|
|
77
|
-
continue;
|
|
78
|
-
}
|
|
79
|
-
return null;
|
|
80
|
-
}
|
|
81
|
-
if (fragments.length === 0) {
|
|
82
|
-
return null;
|
|
83
|
-
}
|
|
84
|
-
return {
|
|
85
|
-
type: "HookPrompt",
|
|
86
|
-
id: id ?? "",
|
|
87
|
-
fragments
|
|
88
|
-
};
|
|
89
|
-
}
|
|
90
|
-
function parseTurnItem(item) {
|
|
91
|
-
switch (item.type) {
|
|
92
|
-
case "message":
|
|
93
|
-
if (item.role === "user") {
|
|
94
|
-
return parseVisibleHookPromptMessage(item.id, item.content) ?? parseUserMessage(item.id, item.content);
|
|
95
|
-
}
|
|
96
|
-
if (item.role === "assistant" || !item.role) {
|
|
97
|
-
return parseAgentMessage(item.id, item.content, item.phase);
|
|
98
|
-
}
|
|
99
|
-
return null;
|
|
100
|
-
case "reasoning":
|
|
101
|
-
return parseReasoningItem(item);
|
|
102
|
-
case "web_search_call":
|
|
103
|
-
return parseWebSearchCall(item);
|
|
104
|
-
case "image_generation_call":
|
|
105
|
-
return parseImageGenerationCall(item);
|
|
106
|
-
default:
|
|
107
|
-
return null;
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
function parseReasoningItem(item) {
|
|
111
|
-
return {
|
|
112
|
-
type: "Reasoning",
|
|
113
|
-
id: item.id ?? "",
|
|
114
|
-
summary_text: item.summary.flatMap((entry) => {
|
|
115
|
-
if (typeof entry.text === "string") {
|
|
116
|
-
return [entry.text];
|
|
117
|
-
}
|
|
118
|
-
return [];
|
|
119
|
-
}),
|
|
120
|
-
raw_content: (item.content ?? []).flatMap((entry) => {
|
|
121
|
-
if ((entry.type === "reasoning_text" || entry.type === "text") && typeof entry.text === "string") {
|
|
122
|
-
return [entry.text];
|
|
123
|
-
}
|
|
124
|
-
return [];
|
|
125
|
-
})
|
|
126
|
-
};
|
|
127
|
-
}
|
|
128
|
-
function parseWebSearchCall(item) {
|
|
129
|
-
const action = webSearchActionFromRecord(item.action);
|
|
130
|
-
return {
|
|
131
|
-
type: "WebSearch",
|
|
132
|
-
id: item.id ?? "",
|
|
133
|
-
query: webSearchActionDetail(action),
|
|
134
|
-
action
|
|
135
|
-
};
|
|
136
|
-
}
|
|
137
|
-
function parseImageGenerationCall(item) {
|
|
138
|
-
return {
|
|
139
|
-
type: "ImageGeneration",
|
|
140
|
-
id: item.id,
|
|
141
|
-
status: item.status,
|
|
142
|
-
revised_prompt: item.revised_prompt ?? void 0,
|
|
143
|
-
result: item.result,
|
|
144
|
-
saved_path: item.saved_path
|
|
145
|
-
};
|
|
146
|
-
}
|
|
147
|
-
function webSearchActionFromRecord(action) {
|
|
148
|
-
if (!action) {
|
|
149
|
-
return { type: "other" };
|
|
150
|
-
}
|
|
151
|
-
if (action.type === "search") {
|
|
152
|
-
return {
|
|
153
|
-
type: "search",
|
|
154
|
-
...typeof action.query === "string" ? { query: action.query } : {},
|
|
155
|
-
...Array.isArray(action.queries) ? { queries: action.queries.filter(isString) } : {}
|
|
156
|
-
};
|
|
157
|
-
}
|
|
158
|
-
if (action.type === "open_page") {
|
|
159
|
-
return {
|
|
160
|
-
type: "open_page",
|
|
161
|
-
...typeof action.url === "string" ? { url: action.url } : {}
|
|
162
|
-
};
|
|
163
|
-
}
|
|
164
|
-
if (action.type === "find_in_page") {
|
|
165
|
-
return {
|
|
166
|
-
type: "find_in_page",
|
|
167
|
-
...typeof action.url === "string" ? { url: action.url } : {},
|
|
168
|
-
...typeof action.pattern === "string" ? { pattern: action.pattern } : {}
|
|
169
|
-
};
|
|
170
|
-
}
|
|
171
|
-
return { type: "other" };
|
|
172
|
-
}
|
|
173
|
-
function webSearchActionDetail(action) {
|
|
174
|
-
switch (action.type) {
|
|
175
|
-
case "search":
|
|
176
|
-
return action.query ?? action.queries?.join(", ") ?? "";
|
|
177
|
-
case "open_page":
|
|
178
|
-
return action.url ?? "";
|
|
179
|
-
case "find_in_page": {
|
|
180
|
-
const pattern = action.pattern ?? "";
|
|
181
|
-
const url = action.url ?? "";
|
|
182
|
-
return pattern && url ? `'${pattern}' in ${url}` : pattern || url;
|
|
183
|
-
}
|
|
184
|
-
case "other":
|
|
185
|
-
return "";
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
function isContextualUserFragment(contentItem) {
|
|
189
|
-
return contentItem.type === "input_text" && (parseHookPromptFragment(contentItem.text) !== null || isStandardContextualUserText(contentItem.text));
|
|
190
|
-
}
|
|
191
|
-
function isContextualDevFragment(contentItem) {
|
|
192
|
-
if (contentItem.type !== "input_text") {
|
|
193
|
-
return false;
|
|
194
|
-
}
|
|
195
|
-
const trimmed = contentItem.text.trimStart();
|
|
196
|
-
return CONTEXTUAL_DEVELOPER_PREFIXES.some(
|
|
197
|
-
(prefix) => trimmed.slice(0, prefix.length).toLowerCase() === prefix.toLowerCase()
|
|
198
|
-
);
|
|
199
|
-
}
|
|
200
|
-
function isStandardContextualUserText(text) {
|
|
201
|
-
const trimmed = text.trimStart();
|
|
202
|
-
return trimmed.startsWith("# AGENTS.md instructions for ") || trimmed.startsWith("<environment_context>") || trimmed.startsWith("<skill>") || trimmed.startsWith("<user_shell_command>") || trimmed.startsWith("<turn_aborted>") || trimmed.startsWith("<thread_goal_budget_limit>") || trimmed.startsWith("<subagent_notification>");
|
|
203
|
-
}
|
|
204
|
-
function parseHookPromptFragment(text) {
|
|
205
|
-
const trimmed = text.trim();
|
|
206
|
-
const match = trimmed.match(
|
|
207
|
-
/^<hook_prompt\s+hook_run_id=(["'])(.*?)\1>([\s\S]*)<\/hook_prompt>$/u
|
|
208
|
-
);
|
|
209
|
-
if (!match) {
|
|
210
|
-
return null;
|
|
211
|
-
}
|
|
212
|
-
const hookRunId = decodeXmlEntities(match[2] ?? "").trim();
|
|
213
|
-
if (!hookRunId) {
|
|
214
|
-
return null;
|
|
215
|
-
}
|
|
216
|
-
return {
|
|
217
|
-
hookRunId,
|
|
218
|
-
text: decodeXmlEntities(match[3] ?? "")
|
|
219
|
-
};
|
|
220
|
-
}
|
|
221
|
-
function isImageOpenTagText(text) {
|
|
222
|
-
return text === "<image>";
|
|
223
|
-
}
|
|
224
|
-
function isImageCloseTagText(text) {
|
|
225
|
-
return text === "</image>";
|
|
226
|
-
}
|
|
227
|
-
function isLocalImageOpenTagText(text) {
|
|
228
|
-
return text.startsWith("<image name=") && text.endsWith(">");
|
|
229
|
-
}
|
|
230
|
-
function isLocalImageCloseTagText(text) {
|
|
231
|
-
return isImageCloseTagText(text);
|
|
232
|
-
}
|
|
233
|
-
function decodeXmlEntities(value) {
|
|
234
|
-
return value.replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">").replaceAll(""", '"').replaceAll("'", "'");
|
|
235
|
-
}
|
|
236
|
-
function isString(value) {
|
|
237
|
-
return typeof value === "string";
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
// src/upstream/codex-rs/core/src/thread-history-builder.ts
|
|
241
|
-
var ThreadHistoryBuilder = class _ThreadHistoryBuilder {
|
|
242
|
-
turns = [];
|
|
243
|
-
next_item_index = 1;
|
|
244
|
-
static fromTurns(turns) {
|
|
245
|
-
const builder = new _ThreadHistoryBuilder();
|
|
246
|
-
builder.turns = turns.map((turn) => ({
|
|
247
|
-
...cloneTurn(turn),
|
|
248
|
-
opened_explicitly: true
|
|
249
|
-
}));
|
|
250
|
-
builder.next_item_index = nextItemIndexFromTurns(turns);
|
|
251
|
-
return builder;
|
|
252
|
-
}
|
|
253
|
-
handle_rollout_item(item, index = this.next_item_index) {
|
|
254
|
-
if (item.type === "event_msg") {
|
|
255
|
-
this.handle_event(item.payload, `rollout-${index}`);
|
|
256
|
-
return;
|
|
257
|
-
}
|
|
258
|
-
if (item.type === "response_item") {
|
|
259
|
-
this.handle_response_item(item.payload, `response-${index}`);
|
|
260
|
-
return;
|
|
261
|
-
}
|
|
262
|
-
if (item.type === "compacted") {
|
|
263
|
-
this.append_to_current_turn({
|
|
264
|
-
type: "ContextCompaction",
|
|
265
|
-
id: `compacted-${index}`
|
|
266
|
-
});
|
|
267
|
-
}
|
|
268
|
-
}
|
|
269
|
-
handle_event(event, eventId = `event-${this.next_item_index}`) {
|
|
270
|
-
switch (event.type) {
|
|
271
|
-
case "turn_started":
|
|
272
|
-
this.open_explicit_turn(event.turn_id);
|
|
273
|
-
if (event.started_at !== void 0 && event.started_at !== null) {
|
|
274
|
-
const turn = this.turn_by_id(event.turn_id);
|
|
275
|
-
if (turn) {
|
|
276
|
-
turn.started_at = event.started_at;
|
|
277
|
-
}
|
|
278
|
-
}
|
|
279
|
-
return;
|
|
280
|
-
case "turn_complete":
|
|
281
|
-
this.complete_turn(event.turn_id, {
|
|
282
|
-
status: "completed",
|
|
283
|
-
completed_at: event.completed_at ?? null,
|
|
284
|
-
duration_ms: event.duration_ms ?? null
|
|
285
|
-
});
|
|
286
|
-
return;
|
|
287
|
-
case "turn_aborted":
|
|
288
|
-
this.complete_turn(event.turn_id, {
|
|
289
|
-
status: "interrupted",
|
|
290
|
-
completed_at: event.completed_at ?? event.aborted_at ?? null,
|
|
291
|
-
duration_ms: event.duration_ms ?? null
|
|
292
|
-
});
|
|
293
|
-
return;
|
|
294
|
-
case "user_message":
|
|
295
|
-
this.append_user_message(userMessageTurnItem(event, userMessageId(eventId)), {
|
|
296
|
-
replaceDuplicate: true
|
|
297
|
-
});
|
|
298
|
-
return;
|
|
299
|
-
case "agent_message":
|
|
300
|
-
this.upsert_agent_message({
|
|
301
|
-
type: "AgentMessage",
|
|
302
|
-
id: agentMessageId(eventId),
|
|
303
|
-
content: [{ type: "Text", text: event.message }],
|
|
304
|
-
phase: event.phase ?? null,
|
|
305
|
-
memory_citation: event.memory_citation ?? null
|
|
306
|
-
});
|
|
307
|
-
return;
|
|
308
|
-
case "item_started":
|
|
309
|
-
this.upsert_item_in_turn(event.turn_id, event.item, {
|
|
310
|
-
started: true
|
|
311
|
-
});
|
|
312
|
-
return;
|
|
313
|
-
case "item_completed":
|
|
314
|
-
this.upsert_item_in_turn(event.turn_id, completedItem(event.item));
|
|
315
|
-
return;
|
|
316
|
-
case "agent_message_content_delta":
|
|
317
|
-
this.apply_agent_message_delta(event.item_id, event.delta);
|
|
318
|
-
return;
|
|
319
|
-
case "plan_delta":
|
|
320
|
-
this.apply_plan_delta(event.item_id, event.delta);
|
|
321
|
-
return;
|
|
322
|
-
case "exec_command_begin":
|
|
323
|
-
this.upsert_item_in_turn(event.turn_id, {
|
|
324
|
-
type: "CommandExecution",
|
|
325
|
-
id: event.call_id,
|
|
326
|
-
command: event.command,
|
|
327
|
-
cwd: event.cwd,
|
|
328
|
-
status: "in_progress"
|
|
329
|
-
});
|
|
330
|
-
return;
|
|
331
|
-
case "exec_command_output_delta":
|
|
332
|
-
this.apply_exec_command_output_delta(event);
|
|
333
|
-
return;
|
|
334
|
-
case "exec_command_end":
|
|
335
|
-
this.apply_exec_command_end(event);
|
|
336
|
-
return;
|
|
337
|
-
case "patch_apply_updated":
|
|
338
|
-
this.upsert_item_in_current_or_existing_turn(event.call_id, {
|
|
339
|
-
type: "FileChange",
|
|
340
|
-
id: event.call_id,
|
|
341
|
-
changes: event.changes,
|
|
342
|
-
status: event.status ?? null,
|
|
343
|
-
auto_approved: false,
|
|
344
|
-
stdout: event.stdout ?? "",
|
|
345
|
-
stderr: event.stderr ?? ""
|
|
346
|
-
});
|
|
347
|
-
return;
|
|
348
|
-
case "dynamic_tool_call_request":
|
|
349
|
-
this.upsert_item_in_turn(event.turn_id, dynamicToolRequestTurnItem(event));
|
|
350
|
-
return;
|
|
351
|
-
case "dynamic_tool_call_response":
|
|
352
|
-
this.upsert_item_in_turn(event.turn_id, {
|
|
353
|
-
type: "DynamicToolCall",
|
|
354
|
-
id: event.call_id,
|
|
355
|
-
namespace: event.namespace ?? null,
|
|
356
|
-
tool: event.tool,
|
|
357
|
-
arguments: event.arguments,
|
|
358
|
-
status: event.success ? "completed" : "failed",
|
|
359
|
-
content_items: event.content_items,
|
|
360
|
-
success: event.success,
|
|
361
|
-
duration: event.duration
|
|
362
|
-
});
|
|
363
|
-
return;
|
|
364
|
-
case "mcp_tool_call_progress":
|
|
365
|
-
this.upsert_item_in_turn(event.turn_id, {
|
|
366
|
-
type: "McpToolCall",
|
|
367
|
-
id: event.call_id,
|
|
368
|
-
server: event.server_name,
|
|
369
|
-
tool: event.tool_name,
|
|
370
|
-
arguments: {},
|
|
371
|
-
status: "inProgress",
|
|
372
|
-
result: event.progress ?? event.message ?? null
|
|
373
|
-
});
|
|
374
|
-
return;
|
|
375
|
-
case "image_generation_end":
|
|
376
|
-
this.upsert_item_in_current_or_existing_turn(
|
|
377
|
-
event.call_id,
|
|
378
|
-
imageGenerationTurnItem(event, eventId)
|
|
379
|
-
);
|
|
380
|
-
return;
|
|
381
|
-
case "error": {
|
|
382
|
-
const turn = this.active_turn();
|
|
383
|
-
if (turn) {
|
|
384
|
-
turn.status = "failed";
|
|
385
|
-
turn.error = {
|
|
386
|
-
message: event.message,
|
|
387
|
-
codex_error_info: event.codex_error_info ?? null
|
|
388
|
-
};
|
|
389
|
-
}
|
|
390
|
-
return;
|
|
391
|
-
}
|
|
392
|
-
default:
|
|
393
|
-
return;
|
|
394
|
-
}
|
|
395
|
-
}
|
|
396
|
-
handle_response_item(item, id) {
|
|
397
|
-
const turnItem = parseTurnItem(item);
|
|
398
|
-
if (!turnItem) {
|
|
399
|
-
return;
|
|
400
|
-
}
|
|
401
|
-
const itemWithFallbackId = turnItem.id.length > 0 ? turnItem : { ...turnItem, id };
|
|
402
|
-
if (itemWithFallbackId.type === "AgentMessage") {
|
|
403
|
-
this.upsert_agent_message(itemWithFallbackId);
|
|
404
|
-
return;
|
|
405
|
-
}
|
|
406
|
-
if (itemWithFallbackId.type === "UserMessage") {
|
|
407
|
-
this.append_user_message(itemWithFallbackId, {
|
|
408
|
-
replaceDuplicate: false
|
|
409
|
-
});
|
|
410
|
-
return;
|
|
411
|
-
}
|
|
412
|
-
this.append_to_current_turn(itemWithFallbackId);
|
|
413
|
-
}
|
|
414
|
-
active_turn_snapshot() {
|
|
415
|
-
const turn = this.active_turn();
|
|
416
|
-
return turn ? stripInternalTurn(turn) : null;
|
|
417
|
-
}
|
|
418
|
-
active_turn_position() {
|
|
419
|
-
const turn = this.active_turn();
|
|
420
|
-
return turn ? this.turns.indexOf(turn) : null;
|
|
421
|
-
}
|
|
422
|
-
finish() {
|
|
423
|
-
return this.turns.map(stripInternalTurn);
|
|
424
|
-
}
|
|
425
|
-
has_active_turn() {
|
|
426
|
-
return this.active_turn() !== null;
|
|
427
|
-
}
|
|
428
|
-
reset() {
|
|
429
|
-
this.turns = [];
|
|
430
|
-
this.next_item_index = 1;
|
|
431
|
-
}
|
|
432
|
-
open_explicit_turn(turnId) {
|
|
433
|
-
const existing = this.turns.find((turn) => turn.id === turnId);
|
|
434
|
-
if (existing) {
|
|
435
|
-
existing.status = "in_progress";
|
|
436
|
-
existing.opened_explicitly = true;
|
|
437
|
-
return;
|
|
438
|
-
}
|
|
439
|
-
this.turns.push(newTurn(turnId, true));
|
|
440
|
-
}
|
|
441
|
-
complete_turn(turnId, input) {
|
|
442
|
-
const turn = this.turn_by_id(turnId) ?? this.ensure_turn(turnId, true);
|
|
443
|
-
turn.status = input.status;
|
|
444
|
-
turn.completed_at = input.completed_at;
|
|
445
|
-
turn.duration_ms = input.duration_ms;
|
|
446
|
-
}
|
|
447
|
-
append_user_message(item, options) {
|
|
448
|
-
const active = this.active_turn();
|
|
449
|
-
if (!active || !active.opened_explicitly && active.items.length > 0) {
|
|
450
|
-
this.turns.push(newTurn(`turn-${this.turns.length + 1}`, false));
|
|
451
|
-
}
|
|
452
|
-
const turn = this.active_turn() ?? this.ensure_turn();
|
|
453
|
-
const lastItem = turn.items.at(-1);
|
|
454
|
-
if (lastItem?.type === "UserMessage" && userMessageFingerprint(lastItem) === userMessageFingerprint(item)) {
|
|
455
|
-
if (options.replaceDuplicate) {
|
|
456
|
-
turn.items[turn.items.length - 1] = item;
|
|
457
|
-
}
|
|
458
|
-
return;
|
|
459
|
-
}
|
|
460
|
-
turn.items.push(item);
|
|
461
|
-
}
|
|
462
|
-
upsert_agent_message(item) {
|
|
463
|
-
const turn = this.ensure_turn();
|
|
464
|
-
const lastItem = turn.items.at(-1);
|
|
465
|
-
if (item.phase === "streaming") {
|
|
466
|
-
if (lastItem?.type === "AgentMessage" && lastItem.phase === "streaming") {
|
|
467
|
-
turn.items[turn.items.length - 1] = { ...item, id: lastItem.id };
|
|
468
|
-
return;
|
|
469
|
-
}
|
|
470
|
-
turn.items.push({ ...item, id: `streaming-${item.id}` });
|
|
471
|
-
return;
|
|
472
|
-
}
|
|
473
|
-
if (lastItem?.type === "AgentMessage" && lastItem.phase === "streaming") {
|
|
474
|
-
turn.items[turn.items.length - 1] = { ...item, id: lastItem.id };
|
|
475
|
-
return;
|
|
476
|
-
}
|
|
477
|
-
if (lastItem?.type === "AgentMessage" && agentMessageText(lastItem) === agentMessageText(item)) {
|
|
478
|
-
turn.items[turn.items.length - 1] = { ...item, id: lastItem.id };
|
|
479
|
-
return;
|
|
480
|
-
}
|
|
481
|
-
turn.items.push(item);
|
|
482
|
-
}
|
|
483
|
-
upsert_item_in_turn(turnId, item, options = {}) {
|
|
484
|
-
const turn = turnId ? this.ensure_turn(turnId, true) : this.ensure_turn();
|
|
485
|
-
upsertItem(turn, options.started ? startedItem(item) : item);
|
|
486
|
-
}
|
|
487
|
-
upsert_item_in_current_or_existing_turn(itemId, item) {
|
|
488
|
-
const existingTurn = this.turns.find(
|
|
489
|
-
(turn) => turn.items.some((candidate) => candidate.id === itemId)
|
|
490
|
-
);
|
|
491
|
-
upsertItem(existingTurn ?? this.ensure_turn(), item);
|
|
492
|
-
}
|
|
493
|
-
append_to_current_turn(item) {
|
|
494
|
-
this.ensure_turn().items.push(item);
|
|
495
|
-
}
|
|
496
|
-
apply_agent_message_delta(itemId, delta) {
|
|
497
|
-
const existing = this.find_item(itemId);
|
|
498
|
-
if (!existing || existing.item.type !== "AgentMessage") {
|
|
499
|
-
this.append_to_current_turn({
|
|
500
|
-
type: "AgentMessage",
|
|
501
|
-
id: itemId,
|
|
502
|
-
content: [{ type: "Text", text: delta }],
|
|
503
|
-
phase: "streaming",
|
|
504
|
-
memory_citation: null
|
|
505
|
-
});
|
|
506
|
-
return;
|
|
507
|
-
}
|
|
508
|
-
const item = existing.item;
|
|
509
|
-
const lastContent = item.content.at(-1);
|
|
510
|
-
const nextContent = lastContent?.type === "Text" ? [
|
|
511
|
-
...item.content.slice(0, -1),
|
|
512
|
-
{ type: "Text", text: `${lastContent.text}${delta}` }
|
|
513
|
-
] : [...item.content, { type: "Text", text: delta }];
|
|
514
|
-
existing.turn.items[existing.index] = {
|
|
515
|
-
...item,
|
|
516
|
-
content: nextContent,
|
|
517
|
-
phase: "streaming"
|
|
518
|
-
};
|
|
519
|
-
}
|
|
520
|
-
apply_plan_delta(itemId, delta) {
|
|
521
|
-
const existing = this.find_item(itemId);
|
|
522
|
-
if (!existing || existing.item.type !== "Plan") {
|
|
523
|
-
this.append_to_current_turn({ type: "Plan", id: itemId, text: delta });
|
|
524
|
-
return;
|
|
525
|
-
}
|
|
526
|
-
existing.turn.items[existing.index] = {
|
|
527
|
-
...existing.item,
|
|
528
|
-
text: `${existing.item.text}${delta}`
|
|
529
|
-
};
|
|
530
|
-
}
|
|
531
|
-
apply_exec_command_output_delta(msg) {
|
|
532
|
-
const existing = this.find_item(msg.call_id);
|
|
533
|
-
if (!existing || existing.item.type !== "CommandExecution") {
|
|
534
|
-
return;
|
|
535
|
-
}
|
|
536
|
-
existing.turn.items[existing.index] = {
|
|
537
|
-
...existing.item,
|
|
538
|
-
stdout: msg.stream === "stdout" ? `${existing.item.stdout ?? ""}${msg.chunk}` : existing.item.stdout,
|
|
539
|
-
stderr: msg.stream === "stderr" ? `${existing.item.stderr ?? ""}${msg.chunk}` : existing.item.stderr
|
|
540
|
-
};
|
|
541
|
-
}
|
|
542
|
-
apply_exec_command_end(msg) {
|
|
543
|
-
const existing = this.find_item(msg.call_id);
|
|
544
|
-
const item = existing?.item.type === "CommandExecution" ? existing.item : null;
|
|
545
|
-
const turn = msg.turn_id ? this.ensure_turn(msg.turn_id, true) : existing?.turn ?? this.ensure_turn();
|
|
546
|
-
upsertItem(turn, {
|
|
547
|
-
type: "CommandExecution",
|
|
548
|
-
id: msg.call_id,
|
|
549
|
-
command: item?.command ?? [],
|
|
550
|
-
cwd: item?.cwd ?? "",
|
|
551
|
-
status: msg.status === "completed" ? "completed" : msg.status === "cancelled" ? "cancelled" : "failed",
|
|
552
|
-
stdout: msg.stdout ?? msg.output?.stdout.text ?? item?.stdout ?? "",
|
|
553
|
-
stderr: msg.stderr ?? msg.output?.stderr.text ?? item?.stderr ?? "",
|
|
554
|
-
exit_code: msg.exit_code,
|
|
555
|
-
duration_ms: msg.duration_ms ?? msg.output?.duration_ms ?? null
|
|
556
|
-
});
|
|
557
|
-
}
|
|
558
|
-
ensure_turn(id, explicit = false) {
|
|
559
|
-
if (id) {
|
|
560
|
-
const existing = this.turn_by_id(id);
|
|
561
|
-
if (existing) {
|
|
562
|
-
return existing;
|
|
563
|
-
}
|
|
564
|
-
const turn2 = newTurn(id, explicit);
|
|
565
|
-
this.turns.push(turn2);
|
|
566
|
-
return turn2;
|
|
567
|
-
}
|
|
568
|
-
const active = this.active_turn();
|
|
569
|
-
if (active) {
|
|
570
|
-
return active;
|
|
571
|
-
}
|
|
572
|
-
const turn = newTurn(`turn-${this.turns.length + 1}`, false);
|
|
573
|
-
this.turns.push(turn);
|
|
574
|
-
return turn;
|
|
575
|
-
}
|
|
576
|
-
active_turn() {
|
|
577
|
-
for (let index = this.turns.length - 1; index >= 0; index -= 1) {
|
|
578
|
-
const turn = this.turns[index];
|
|
579
|
-
if (turn?.status === "in_progress") {
|
|
580
|
-
return turn;
|
|
581
|
-
}
|
|
582
|
-
}
|
|
583
|
-
return null;
|
|
584
|
-
}
|
|
585
|
-
turn_by_id(id) {
|
|
586
|
-
return this.turns.find((turn) => turn.id === id) ?? null;
|
|
587
|
-
}
|
|
588
|
-
find_item(itemId) {
|
|
589
|
-
for (const turn of this.turns) {
|
|
590
|
-
const index = turn.items.findIndex((item) => item.id === itemId);
|
|
591
|
-
if (index !== -1) {
|
|
592
|
-
return { turn, item: turn.items[index], index };
|
|
593
|
-
}
|
|
594
|
-
}
|
|
595
|
-
return null;
|
|
596
|
-
}
|
|
597
|
-
};
|
|
598
|
-
function buildTurnsFromRolloutItems(items) {
|
|
599
|
-
const builder = new ThreadHistoryBuilder();
|
|
600
|
-
for (const [index, item] of items.entries()) {
|
|
601
|
-
builder.handle_rollout_item(item, index);
|
|
602
|
-
}
|
|
603
|
-
return builder.finish();
|
|
604
|
-
}
|
|
605
|
-
function applyEventToThreadHistoryBuilder(builder, event, eventId) {
|
|
606
|
-
builder.handle_event(event, eventId);
|
|
607
|
-
return builder;
|
|
608
|
-
}
|
|
609
|
-
function flattenTurnsToTurnItems(turns) {
|
|
610
|
-
return turns.flatMap((turn) => turn.items);
|
|
611
|
-
}
|
|
612
|
-
function applyEventToTurns(turns, event, eventId) {
|
|
613
|
-
const builder = ThreadHistoryBuilder.fromTurns(turns);
|
|
614
|
-
builder.handle_event(event, eventId);
|
|
615
|
-
return builder.finish();
|
|
616
|
-
}
|
|
617
|
-
function applyResponseItemToTurns(turns, item, id) {
|
|
618
|
-
const builder = ThreadHistoryBuilder.fromTurns(turns);
|
|
619
|
-
builder.handle_response_item(item, id);
|
|
620
|
-
return builder.finish();
|
|
621
|
-
}
|
|
622
|
-
function appendCompactionTurnToTurns(turns, id) {
|
|
623
|
-
const builder = ThreadHistoryBuilder.fromTurns(turns);
|
|
624
|
-
builder.handle_rollout_item({ type: "compacted", payload: { message: "" } }, 0);
|
|
625
|
-
const next = builder.finish();
|
|
626
|
-
const last = next.at(-1);
|
|
627
|
-
if (last?.items.at(-1)?.type === "ContextCompaction") {
|
|
628
|
-
last.items[last.items.length - 1] = { type: "ContextCompaction", id };
|
|
629
|
-
}
|
|
630
|
-
return next;
|
|
631
|
-
}
|
|
632
|
-
function newTurn(id, openedExplicitly) {
|
|
633
|
-
return {
|
|
634
|
-
id,
|
|
635
|
-
items: [],
|
|
636
|
-
items_view: "full",
|
|
637
|
-
status: "in_progress",
|
|
638
|
-
error: null,
|
|
639
|
-
started_at: null,
|
|
640
|
-
completed_at: null,
|
|
641
|
-
duration_ms: null,
|
|
642
|
-
opened_explicitly: openedExplicitly
|
|
643
|
-
};
|
|
644
|
-
}
|
|
645
|
-
function stripInternalTurn(turn) {
|
|
646
|
-
const { opened_explicitly, ...publicTurn } = turn;
|
|
647
|
-
return cloneTurn(publicTurn);
|
|
648
|
-
}
|
|
649
|
-
function cloneTurn(turn) {
|
|
650
|
-
return {
|
|
651
|
-
...turn,
|
|
652
|
-
items: turn.items.map((item) => structuredClone(item)),
|
|
653
|
-
error: turn.error ? { ...turn.error } : null
|
|
654
|
-
};
|
|
655
|
-
}
|
|
656
|
-
function nextItemIndexFromTurns(turns) {
|
|
657
|
-
return turns.reduce((count, turn) => count + turn.items.length, 0) + 1;
|
|
658
|
-
}
|
|
659
|
-
function upsertItem(turn, item) {
|
|
660
|
-
const index = turn.items.findIndex((candidate) => candidate.id === item.id);
|
|
661
|
-
if (index === -1) {
|
|
662
|
-
turn.items.push(item);
|
|
663
|
-
return;
|
|
664
|
-
}
|
|
665
|
-
turn.items[index] = item;
|
|
666
|
-
}
|
|
667
|
-
function startedItem(item) {
|
|
668
|
-
return item.type === "AgentMessage" ? { ...item, phase: item.phase ?? "streaming" } : item;
|
|
669
|
-
}
|
|
670
|
-
function completedItem(item) {
|
|
671
|
-
return item.type === "AgentMessage" ? { ...item, phase: item.phase ?? null } : item;
|
|
672
|
-
}
|
|
673
|
-
function dynamicToolRequestTurnItem(request) {
|
|
674
|
-
return {
|
|
675
|
-
type: "DynamicToolCall",
|
|
676
|
-
id: request.call_id,
|
|
677
|
-
namespace: request.namespace ?? null,
|
|
678
|
-
tool: request.tool,
|
|
679
|
-
arguments: request.arguments,
|
|
680
|
-
status: "inProgress",
|
|
681
|
-
content_items: null,
|
|
682
|
-
success: null,
|
|
683
|
-
duration: null
|
|
684
|
-
};
|
|
685
|
-
}
|
|
686
|
-
function userMessageId(eventId) {
|
|
687
|
-
return `user-${eventId}`;
|
|
688
|
-
}
|
|
689
|
-
function agentMessageId(eventId) {
|
|
690
|
-
return `agent-${eventId}`;
|
|
691
|
-
}
|
|
692
|
-
function userMessageTurnItem(msg, id) {
|
|
693
|
-
return {
|
|
694
|
-
type: "UserMessage",
|
|
695
|
-
id,
|
|
696
|
-
content: userInputFromUserMessage(msg)
|
|
697
|
-
};
|
|
698
|
-
}
|
|
699
|
-
function userInputFromUserMessage(msg) {
|
|
700
|
-
const items = [];
|
|
701
|
-
if (msg.message.length > 0) {
|
|
702
|
-
items.push({
|
|
703
|
-
type: "text",
|
|
704
|
-
text: msg.message,
|
|
705
|
-
text_elements: msg.text_elements
|
|
706
|
-
});
|
|
707
|
-
}
|
|
708
|
-
for (const imageUrl of msg.images ?? []) {
|
|
709
|
-
items.push({ type: "image", image_url: imageUrl });
|
|
710
|
-
}
|
|
711
|
-
for (const path of msg.local_images ?? []) {
|
|
712
|
-
items.push({ type: "local_image", path });
|
|
713
|
-
}
|
|
714
|
-
return items;
|
|
715
|
-
}
|
|
716
|
-
function imageGenerationTurnItem(msg, id) {
|
|
717
|
-
return {
|
|
718
|
-
type: "ImageGeneration",
|
|
719
|
-
id: msg.call_id || id,
|
|
720
|
-
status: msg.status,
|
|
721
|
-
revised_prompt: msg.revised_prompt,
|
|
722
|
-
result: msg.result,
|
|
723
|
-
saved_path: msg.saved_path
|
|
724
|
-
};
|
|
725
|
-
}
|
|
726
|
-
function agentMessageText(item) {
|
|
727
|
-
return item.content.map((part) => part.text).join("");
|
|
728
|
-
}
|
|
729
|
-
function userMessageFingerprint(item) {
|
|
730
|
-
return item.content.map((content) => {
|
|
731
|
-
if (content.type === "text") {
|
|
732
|
-
return `text:${content.text}`;
|
|
733
|
-
}
|
|
734
|
-
if (content.type === "image") {
|
|
735
|
-
return `image:${content.image_url}`;
|
|
736
|
-
}
|
|
737
|
-
if (content.type === "local_image") {
|
|
738
|
-
return `local_image:${content.path}`;
|
|
739
|
-
}
|
|
740
|
-
if (content.type === "skill") {
|
|
741
|
-
return `skill:${content.name}:${content.path}`;
|
|
742
|
-
}
|
|
743
|
-
return `mention:${content.name}:${content.path}`;
|
|
744
|
-
}).join("\n");
|
|
745
|
-
}
|
|
746
|
-
|
|
747
|
-
// src/upstream/codex-rs/core/src/rendered-thread.ts
|
|
748
|
-
function createRenderedThreadState(threadId) {
|
|
749
|
-
return {
|
|
750
|
-
thread_id: threadId,
|
|
751
|
-
turns: [],
|
|
752
|
-
items: [],
|
|
753
|
-
pending_request_user_input: null,
|
|
754
|
-
pending_request_permissions: null,
|
|
755
|
-
pending_dynamic_tool_call_requests: [],
|
|
756
|
-
running_turn_ids: [],
|
|
757
|
-
warnings: [],
|
|
758
|
-
errors: [],
|
|
759
|
-
last_history_fingerprint: null,
|
|
760
|
-
connection_status: "idle"
|
|
761
|
-
};
|
|
762
|
-
}
|
|
763
|
-
function renderThreadFromHistory(history) {
|
|
764
|
-
let state = createRenderedThreadState(history.thread_id);
|
|
765
|
-
for (const [index, item] of history.items.entries()) {
|
|
766
|
-
state = applyRolloutItemToRenderedThread(state, item, index);
|
|
767
|
-
}
|
|
768
|
-
return {
|
|
769
|
-
...state,
|
|
770
|
-
running_turn_ids: [],
|
|
771
|
-
last_history_fingerprint: fingerprintRolloutItems(history.items)
|
|
772
|
-
};
|
|
773
|
-
}
|
|
774
|
-
function applyRolloutItemToRenderedThread(state, item, index = state.items.length) {
|
|
775
|
-
if (item.type === "event_msg") {
|
|
776
|
-
return applyEventMsgToRenderedThread(state, item.payload, {
|
|
777
|
-
event_id: `rollout-${index}`
|
|
778
|
-
});
|
|
779
|
-
}
|
|
780
|
-
if (item.type === "response_item") {
|
|
781
|
-
return withTurns(
|
|
782
|
-
state,
|
|
783
|
-
applyResponseItemToTurns(state.turns, item.payload, `response-${index}`)
|
|
784
|
-
);
|
|
785
|
-
}
|
|
786
|
-
if (item.type === "compacted") {
|
|
787
|
-
return withTurns(
|
|
788
|
-
state,
|
|
789
|
-
appendCompactionTurnToTurns(state.turns, `compacted-${index}`)
|
|
790
|
-
);
|
|
791
|
-
}
|
|
792
|
-
return state;
|
|
793
|
-
}
|
|
794
|
-
function applyEventMsgToRenderedThread(state, msg, options = {}) {
|
|
795
|
-
const eventId = options.event_id ?? `event-${state.items.length}`;
|
|
796
|
-
const hadActiveTurn = hasActiveTurn(state.turns);
|
|
797
|
-
const next = withTurns(state, applyEventToTurns(state.turns, msg, eventId));
|
|
798
|
-
switch (msg.type) {
|
|
799
|
-
case "turn_started":
|
|
800
|
-
return {
|
|
801
|
-
...next,
|
|
802
|
-
running_turn_ids: addUnique(next.running_turn_ids, msg.turn_id)
|
|
803
|
-
};
|
|
804
|
-
case "turn_complete":
|
|
805
|
-
return clearPendingForTurn(
|
|
806
|
-
{
|
|
807
|
-
...next,
|
|
808
|
-
running_turn_ids: next.running_turn_ids.filter(
|
|
809
|
-
(turnId) => turnId !== msg.turn_id
|
|
810
|
-
)
|
|
811
|
-
},
|
|
812
|
-
msg.turn_id
|
|
813
|
-
);
|
|
814
|
-
case "turn_aborted":
|
|
815
|
-
return clearPendingForTurn(
|
|
816
|
-
{
|
|
817
|
-
...next,
|
|
818
|
-
running_turn_ids: next.running_turn_ids.filter(
|
|
819
|
-
(turnId) => turnId !== msg.turn_id
|
|
820
|
-
)
|
|
821
|
-
},
|
|
822
|
-
msg.turn_id
|
|
823
|
-
);
|
|
824
|
-
case "request_user_input":
|
|
825
|
-
return {
|
|
826
|
-
...next,
|
|
827
|
-
pending_request_user_input: {
|
|
828
|
-
call_id: msg.call_id,
|
|
829
|
-
turn_id: msg.turn_id,
|
|
830
|
-
questions: msg.questions.map((question) => ({
|
|
831
|
-
...question,
|
|
832
|
-
options: question.options.map((option) => ({ ...option }))
|
|
833
|
-
}))
|
|
834
|
-
}
|
|
835
|
-
};
|
|
836
|
-
case "request_permissions":
|
|
837
|
-
return {
|
|
838
|
-
...next,
|
|
839
|
-
pending_request_permissions: {
|
|
840
|
-
call_id: msg.call_id,
|
|
841
|
-
turn_id: msg.turn_id,
|
|
842
|
-
reason: msg.reason ?? null,
|
|
843
|
-
permissions: JSON.parse(JSON.stringify(msg.permissions)),
|
|
844
|
-
cwd: msg.cwd ?? null
|
|
845
|
-
}
|
|
846
|
-
};
|
|
847
|
-
case "dynamic_tool_call_request":
|
|
848
|
-
return {
|
|
849
|
-
...next,
|
|
850
|
-
pending_dynamic_tool_call_requests: upsertDynamicToolCallRequest(
|
|
851
|
-
next.pending_dynamic_tool_call_requests,
|
|
852
|
-
msg
|
|
853
|
-
)
|
|
854
|
-
};
|
|
855
|
-
case "dynamic_tool_call_response":
|
|
856
|
-
return {
|
|
857
|
-
...next,
|
|
858
|
-
pending_dynamic_tool_call_requests: next.pending_dynamic_tool_call_requests.filter(
|
|
859
|
-
(request) => request.call_id !== msg.call_id
|
|
860
|
-
)
|
|
861
|
-
};
|
|
862
|
-
case "warning":
|
|
863
|
-
return {
|
|
864
|
-
...next,
|
|
865
|
-
warnings: [...next.warnings, msg.message]
|
|
866
|
-
};
|
|
867
|
-
case "error":
|
|
868
|
-
return hadActiveTurn ? next : {
|
|
869
|
-
...next,
|
|
870
|
-
errors: [...next.errors, msg.message]
|
|
871
|
-
};
|
|
872
|
-
default:
|
|
873
|
-
return next;
|
|
874
|
-
}
|
|
875
|
-
}
|
|
876
|
-
function setRenderedThreadConnectionStatus(state, connectionStatus) {
|
|
877
|
-
return {
|
|
878
|
-
...state,
|
|
879
|
-
connection_status: connectionStatus
|
|
880
|
-
};
|
|
881
|
-
}
|
|
882
|
-
function fingerprintRolloutItems(items) {
|
|
883
|
-
const last = items.at(-1);
|
|
884
|
-
return `${items.length}:${hashString(JSON.stringify(last ?? null))}`;
|
|
885
|
-
}
|
|
886
|
-
function withTurns(state, turns) {
|
|
887
|
-
const nextTurns = turns.map((turn) => ({
|
|
888
|
-
...turn,
|
|
889
|
-
items: turn.items.map((item) => structuredClone(item)),
|
|
890
|
-
error: turn.error ? { ...turn.error } : null
|
|
891
|
-
}));
|
|
892
|
-
return {
|
|
893
|
-
...state,
|
|
894
|
-
turns: nextTurns,
|
|
895
|
-
items: flattenTurnsToTurnItems(nextTurns)
|
|
896
|
-
};
|
|
897
|
-
}
|
|
898
|
-
function clearPendingForTurn(state, turnId) {
|
|
899
|
-
return {
|
|
900
|
-
...state,
|
|
901
|
-
pending_request_user_input: state.pending_request_user_input?.turn_id === turnId ? null : state.pending_request_user_input,
|
|
902
|
-
pending_dynamic_tool_call_requests: state.pending_dynamic_tool_call_requests.filter(
|
|
903
|
-
(request) => request.turn_id !== turnId
|
|
904
|
-
),
|
|
905
|
-
pending_request_permissions: state.pending_request_permissions?.turn_id === turnId ? null : state.pending_request_permissions
|
|
906
|
-
};
|
|
907
|
-
}
|
|
908
|
-
function upsertDynamicToolCallRequest(requests, request) {
|
|
909
|
-
return [
|
|
910
|
-
...requests.filter((item) => item.call_id !== request.call_id),
|
|
911
|
-
{
|
|
912
|
-
call_id: request.call_id,
|
|
913
|
-
turn_id: request.turn_id,
|
|
914
|
-
started_at_ms: request.started_at_ms,
|
|
915
|
-
namespace: request.namespace ?? null,
|
|
916
|
-
tool: request.tool,
|
|
917
|
-
arguments: request.arguments
|
|
918
|
-
}
|
|
919
|
-
];
|
|
920
|
-
}
|
|
921
|
-
function hasActiveTurn(turns) {
|
|
922
|
-
return turns.some((turn) => turn.status === "in_progress");
|
|
923
|
-
}
|
|
924
|
-
function addUnique(values, value) {
|
|
925
|
-
return values.includes(value) ? values : [...values, value];
|
|
926
|
-
}
|
|
927
|
-
function hashString(value) {
|
|
928
|
-
let hash = 0;
|
|
929
|
-
for (let index = 0; index < value.length; index += 1) {
|
|
930
|
-
hash = hash * 31 + value.charCodeAt(index) >>> 0;
|
|
931
|
-
}
|
|
932
|
-
return hash.toString(16);
|
|
933
|
-
}
|
|
934
|
-
|
|
935
|
-
export { ThreadHistoryBuilder, appendCompactionTurnToTurns, applyEventMsgToRenderedThread, applyEventToThreadHistoryBuilder, applyEventToTurns, applyResponseItemToTurns, applyRolloutItemToRenderedThread, buildTurnsFromRolloutItems, createRenderedThreadState, fingerprintRolloutItems, flattenTurnsToTurnItems, hasNonContextualDevMessageContent, isContextualDevMessageContent, isContextualUserMessageContent, parseAgentMessage, parseTurnItem, parseUserMessage, parseVisibleHookPromptMessage, renderThreadFromHistory, setRenderedThreadConnectionStatus };
|
|
936
|
-
//# sourceMappingURL=chunk-DYLHN3HG.js.map
|
|
937
|
-
//# sourceMappingURL=chunk-DYLHN3HG.js.map
|