better-codex 0.1.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/README.md +26 -0
- package/apps/backend/README.md +46 -0
- package/apps/backend/bun.lock +64 -0
- package/apps/backend/package.json +18 -0
- package/apps/backend/scripts/generate-protocol.ts +32 -0
- package/apps/backend/src/analytics/service.ts +219 -0
- package/apps/backend/src/analytics/store.ts +284 -0
- package/apps/backend/src/config.ts +98 -0
- package/apps/backend/src/core/app-server.ts +131 -0
- package/apps/backend/src/core/jsonrpc.ts +166 -0
- package/apps/backend/src/protocol/AbsolutePathBuf.ts +14 -0
- package/apps/backend/src/protocol/AddConversationListenerParams.ts +6 -0
- package/apps/backend/src/protocol/AddConversationSubscriptionResponse.ts +5 -0
- package/apps/backend/src/protocol/AgentMessageContent.ts +5 -0
- package/apps/backend/src/protocol/AgentMessageContentDeltaEvent.ts +5 -0
- package/apps/backend/src/protocol/AgentMessageDeltaEvent.ts +5 -0
- package/apps/backend/src/protocol/AgentMessageEvent.ts +5 -0
- package/apps/backend/src/protocol/AgentMessageItem.ts +6 -0
- package/apps/backend/src/protocol/AgentReasoningDeltaEvent.ts +5 -0
- package/apps/backend/src/protocol/AgentReasoningEvent.ts +5 -0
- package/apps/backend/src/protocol/AgentReasoningRawContentDeltaEvent.ts +5 -0
- package/apps/backend/src/protocol/AgentReasoningRawContentEvent.ts +5 -0
- package/apps/backend/src/protocol/AgentReasoningSectionBreakEvent.ts +5 -0
- package/apps/backend/src/protocol/Annotations.ts +9 -0
- package/apps/backend/src/protocol/ApplyPatchApprovalParams.ts +21 -0
- package/apps/backend/src/protocol/ApplyPatchApprovalRequestEvent.ts +23 -0
- package/apps/backend/src/protocol/ApplyPatchApprovalResponse.ts +6 -0
- package/apps/backend/src/protocol/ArchiveConversationParams.ts +6 -0
- package/apps/backend/src/protocol/ArchiveConversationResponse.ts +5 -0
- package/apps/backend/src/protocol/AskForApproval.ts +9 -0
- package/apps/backend/src/protocol/AudioContent.ts +9 -0
- package/apps/backend/src/protocol/AuthMode.ts +5 -0
- package/apps/backend/src/protocol/AuthStatusChangeNotification.ts +9 -0
- package/apps/backend/src/protocol/BackgroundEventEvent.ts +5 -0
- package/apps/backend/src/protocol/BlobResourceContents.ts +5 -0
- package/apps/backend/src/protocol/CallToolResult.ts +10 -0
- package/apps/backend/src/protocol/CancelLoginChatGptParams.ts +5 -0
- package/apps/backend/src/protocol/CancelLoginChatGptResponse.ts +5 -0
- package/apps/backend/src/protocol/ClientInfo.ts +5 -0
- package/apps/backend/src/protocol/ClientNotification.ts +5 -0
- package/apps/backend/src/protocol/ClientRequest.ts +46 -0
- package/apps/backend/src/protocol/CodexErrorInfo.ts +8 -0
- package/apps/backend/src/protocol/ContentBlock.ts +10 -0
- package/apps/backend/src/protocol/ContentItem.ts +5 -0
- package/apps/backend/src/protocol/ContextCompactedEvent.ts +5 -0
- package/apps/backend/src/protocol/ConversationGitInfo.ts +5 -0
- package/apps/backend/src/protocol/ConversationId.ts +5 -0
- package/apps/backend/src/protocol/ConversationSummary.ts +8 -0
- package/apps/backend/src/protocol/CreditsSnapshot.ts +5 -0
- package/apps/backend/src/protocol/CustomPrompt.ts +5 -0
- package/apps/backend/src/protocol/DeprecationNoticeEvent.ts +13 -0
- package/apps/backend/src/protocol/ElicitationRequestEvent.ts +6 -0
- package/apps/backend/src/protocol/EmbeddedResource.ts +13 -0
- package/apps/backend/src/protocol/EmbeddedResourceResource.ts +7 -0
- package/apps/backend/src/protocol/ErrorEvent.ts +6 -0
- package/apps/backend/src/protocol/EventMsg.ts +60 -0
- package/apps/backend/src/protocol/ExecApprovalRequestEvent.ts +32 -0
- package/apps/backend/src/protocol/ExecCommandApprovalParams.ts +12 -0
- package/apps/backend/src/protocol/ExecCommandApprovalResponse.ts +6 -0
- package/apps/backend/src/protocol/ExecCommandBeginEvent.ts +35 -0
- package/apps/backend/src/protocol/ExecCommandEndEvent.ts +59 -0
- package/apps/backend/src/protocol/ExecCommandOutputDeltaEvent.ts +18 -0
- package/apps/backend/src/protocol/ExecCommandSource.ts +5 -0
- package/apps/backend/src/protocol/ExecOneOffCommandParams.ts +6 -0
- package/apps/backend/src/protocol/ExecOneOffCommandResponse.ts +5 -0
- package/apps/backend/src/protocol/ExecOutputStream.ts +5 -0
- package/apps/backend/src/protocol/ExecPolicyAmendment.ts +12 -0
- package/apps/backend/src/protocol/ExitedReviewModeEvent.ts +6 -0
- package/apps/backend/src/protocol/FileChange.ts +5 -0
- package/apps/backend/src/protocol/ForcedLoginMethod.ts +5 -0
- package/apps/backend/src/protocol/FunctionCallOutputContentItem.ts +9 -0
- package/apps/backend/src/protocol/FunctionCallOutputPayload.ts +15 -0
- package/apps/backend/src/protocol/FuzzyFileSearchParams.ts +5 -0
- package/apps/backend/src/protocol/FuzzyFileSearchResponse.ts +6 -0
- package/apps/backend/src/protocol/FuzzyFileSearchResult.ts +8 -0
- package/apps/backend/src/protocol/GetAuthStatusParams.ts +5 -0
- package/apps/backend/src/protocol/GetAuthStatusResponse.ts +6 -0
- package/apps/backend/src/protocol/GetConversationSummaryParams.ts +6 -0
- package/apps/backend/src/protocol/GetConversationSummaryResponse.ts +6 -0
- package/apps/backend/src/protocol/GetHistoryEntryResponseEvent.ts +10 -0
- package/apps/backend/src/protocol/GetUserAgentResponse.ts +5 -0
- package/apps/backend/src/protocol/GetUserSavedConfigResponse.ts +6 -0
- package/apps/backend/src/protocol/GhostCommit.ts +8 -0
- package/apps/backend/src/protocol/GitDiffToRemoteParams.ts +5 -0
- package/apps/backend/src/protocol/GitDiffToRemoteResponse.ts +6 -0
- package/apps/backend/src/protocol/GitSha.ts +5 -0
- package/apps/backend/src/protocol/HistoryEntry.ts +5 -0
- package/apps/backend/src/protocol/ImageContent.ts +9 -0
- package/apps/backend/src/protocol/InitializeParams.ts +6 -0
- package/apps/backend/src/protocol/InitializeResponse.ts +5 -0
- package/apps/backend/src/protocol/InputItem.ts +5 -0
- package/apps/backend/src/protocol/InterruptConversationParams.ts +6 -0
- package/apps/backend/src/protocol/InterruptConversationResponse.ts +6 -0
- package/apps/backend/src/protocol/ItemCompletedEvent.ts +7 -0
- package/apps/backend/src/protocol/ItemStartedEvent.ts +7 -0
- package/apps/backend/src/protocol/ListConversationsParams.ts +5 -0
- package/apps/backend/src/protocol/ListConversationsResponse.ts +6 -0
- package/apps/backend/src/protocol/ListCustomPromptsResponseEvent.ts +9 -0
- package/apps/backend/src/protocol/ListSkillsResponseEvent.ts +9 -0
- package/apps/backend/src/protocol/LocalShellAction.ts +6 -0
- package/apps/backend/src/protocol/LocalShellExecAction.ts +5 -0
- package/apps/backend/src/protocol/LocalShellStatus.ts +5 -0
- package/apps/backend/src/protocol/LoginApiKeyParams.ts +5 -0
- package/apps/backend/src/protocol/LoginApiKeyResponse.ts +5 -0
- package/apps/backend/src/protocol/LoginChatGptCompleteNotification.ts +8 -0
- package/apps/backend/src/protocol/LoginChatGptResponse.ts +5 -0
- package/apps/backend/src/protocol/LogoutChatGptResponse.ts +5 -0
- package/apps/backend/src/protocol/McpAuthStatus.ts +5 -0
- package/apps/backend/src/protocol/McpInvocation.ts +18 -0
- package/apps/backend/src/protocol/McpListToolsResponseEvent.ts +25 -0
- package/apps/backend/src/protocol/McpStartupCompleteEvent.ts +6 -0
- package/apps/backend/src/protocol/McpStartupFailure.ts +5 -0
- package/apps/backend/src/protocol/McpStartupStatus.ts +5 -0
- package/apps/backend/src/protocol/McpStartupUpdateEvent.ts +14 -0
- package/apps/backend/src/protocol/McpToolCallBeginEvent.ts +10 -0
- package/apps/backend/src/protocol/McpToolCallEndEvent.ts +15 -0
- package/apps/backend/src/protocol/NetworkAccess.ts +8 -0
- package/apps/backend/src/protocol/NewConversationParams.ts +8 -0
- package/apps/backend/src/protocol/NewConversationResponse.ts +7 -0
- package/apps/backend/src/protocol/ParsedCommand.ts +12 -0
- package/apps/backend/src/protocol/PatchApplyBeginEvent.ts +23 -0
- package/apps/backend/src/protocol/PatchApplyEndEvent.ts +31 -0
- package/apps/backend/src/protocol/PlanItemArg.ts +6 -0
- package/apps/backend/src/protocol/PlanType.ts +5 -0
- package/apps/backend/src/protocol/Profile.ts +9 -0
- package/apps/backend/src/protocol/README.md +11 -0
- package/apps/backend/src/protocol/RateLimitSnapshot.ts +8 -0
- package/apps/backend/src/protocol/RateLimitWindow.ts +17 -0
- package/apps/backend/src/protocol/RawResponseItemEvent.ts +6 -0
- package/apps/backend/src/protocol/ReasoningContentDeltaEvent.ts +5 -0
- package/apps/backend/src/protocol/ReasoningEffort.ts +8 -0
- package/apps/backend/src/protocol/ReasoningItem.ts +5 -0
- package/apps/backend/src/protocol/ReasoningItemContent.ts +5 -0
- package/apps/backend/src/protocol/ReasoningItemReasoningSummary.ts +5 -0
- package/apps/backend/src/protocol/ReasoningRawContentDeltaEvent.ts +5 -0
- package/apps/backend/src/protocol/ReasoningSummary.ts +10 -0
- package/apps/backend/src/protocol/RemoveConversationListenerParams.ts +5 -0
- package/apps/backend/src/protocol/RemoveConversationSubscriptionResponse.ts +5 -0
- package/apps/backend/src/protocol/RequestId.ts +5 -0
- package/apps/backend/src/protocol/Resource.ts +9 -0
- package/apps/backend/src/protocol/ResourceLink.ts +11 -0
- package/apps/backend/src/protocol/ResourceTemplate.ts +9 -0
- package/apps/backend/src/protocol/ResponseItem.ts +17 -0
- package/apps/backend/src/protocol/ResumeConversationParams.ts +8 -0
- package/apps/backend/src/protocol/ResumeConversationResponse.ts +7 -0
- package/apps/backend/src/protocol/ReviewCodeLocation.ts +9 -0
- package/apps/backend/src/protocol/ReviewDecision.ts +9 -0
- package/apps/backend/src/protocol/ReviewFinding.ts +9 -0
- package/apps/backend/src/protocol/ReviewLineRange.ts +8 -0
- package/apps/backend/src/protocol/ReviewOutputEvent.ts +9 -0
- package/apps/backend/src/protocol/ReviewRequest.ts +9 -0
- package/apps/backend/src/protocol/ReviewTarget.ts +9 -0
- package/apps/backend/src/protocol/Role.ts +8 -0
- package/apps/backend/src/protocol/SandboxMode.ts +5 -0
- package/apps/backend/src/protocol/SandboxPolicy.ts +35 -0
- package/apps/backend/src/protocol/SandboxSettings.ts +6 -0
- package/apps/backend/src/protocol/SendUserMessageParams.ts +7 -0
- package/apps/backend/src/protocol/SendUserMessageResponse.ts +5 -0
- package/apps/backend/src/protocol/SendUserTurnParams.ts +11 -0
- package/apps/backend/src/protocol/SendUserTurnResponse.ts +5 -0
- package/apps/backend/src/protocol/ServerNotification.ts +36 -0
- package/apps/backend/src/protocol/ServerRequest.ts +13 -0
- package/apps/backend/src/protocol/SessionConfiguredEvent.ts +48 -0
- package/apps/backend/src/protocol/SessionConfiguredNotification.ts +8 -0
- package/apps/backend/src/protocol/SessionSource.ts +6 -0
- package/apps/backend/src/protocol/SetDefaultModelParams.ts +6 -0
- package/apps/backend/src/protocol/SetDefaultModelResponse.ts +5 -0
- package/apps/backend/src/protocol/SkillErrorInfo.ts +5 -0
- package/apps/backend/src/protocol/SkillMetadata.ts +6 -0
- package/apps/backend/src/protocol/SkillScope.ts +5 -0
- package/apps/backend/src/protocol/SkillsListEntry.ts +7 -0
- package/apps/backend/src/protocol/StepStatus.ts +5 -0
- package/apps/backend/src/protocol/StreamErrorEvent.ts +6 -0
- package/apps/backend/src/protocol/SubAgentSource.ts +5 -0
- package/apps/backend/src/protocol/TaskCompleteEvent.ts +5 -0
- package/apps/backend/src/protocol/TaskStartedEvent.ts +5 -0
- package/apps/backend/src/protocol/TerminalInteractionEvent.ts +17 -0
- package/apps/backend/src/protocol/TextContent.ts +9 -0
- package/apps/backend/src/protocol/TextResourceContents.ts +5 -0
- package/apps/backend/src/protocol/TokenCountEvent.ts +7 -0
- package/apps/backend/src/protocol/TokenUsage.ts +5 -0
- package/apps/backend/src/protocol/TokenUsageInfo.ts +6 -0
- package/apps/backend/src/protocol/Tool.ts +11 -0
- package/apps/backend/src/protocol/ToolAnnotations.ts +15 -0
- package/apps/backend/src/protocol/ToolInputSchema.ts +9 -0
- package/apps/backend/src/protocol/ToolOutputSchema.ts +10 -0
- package/apps/backend/src/protocol/Tools.ts +5 -0
- package/apps/backend/src/protocol/TurnAbortReason.ts +5 -0
- package/apps/backend/src/protocol/TurnAbortedEvent.ts +6 -0
- package/apps/backend/src/protocol/TurnDiffEvent.ts +5 -0
- package/apps/backend/src/protocol/TurnItem.ts +9 -0
- package/apps/backend/src/protocol/UndoCompletedEvent.ts +5 -0
- package/apps/backend/src/protocol/UndoStartedEvent.ts +5 -0
- package/apps/backend/src/protocol/UpdatePlanArgs.ts +6 -0
- package/apps/backend/src/protocol/UserInfoResponse.ts +5 -0
- package/apps/backend/src/protocol/UserInput.ts +8 -0
- package/apps/backend/src/protocol/UserMessageEvent.ts +5 -0
- package/apps/backend/src/protocol/UserMessageItem.ts +6 -0
- package/apps/backend/src/protocol/UserSavedConfig.ts +14 -0
- package/apps/backend/src/protocol/Verbosity.ts +9 -0
- package/apps/backend/src/protocol/ViewImageToolCallEvent.ts +13 -0
- package/apps/backend/src/protocol/WarningEvent.ts +5 -0
- package/apps/backend/src/protocol/WebSearchAction.ts +5 -0
- package/apps/backend/src/protocol/WebSearchBeginEvent.ts +5 -0
- package/apps/backend/src/protocol/WebSearchEndEvent.ts +5 -0
- package/apps/backend/src/protocol/WebSearchItem.ts +5 -0
- package/apps/backend/src/protocol/index.ts +198 -0
- package/apps/backend/src/protocol/serde_json/JsonValue.ts +5 -0
- package/apps/backend/src/protocol/v2/Account.ts +6 -0
- package/apps/backend/src/protocol/v2/AccountLoginCompletedNotification.ts +5 -0
- package/apps/backend/src/protocol/v2/AccountRateLimitsUpdatedNotification.ts +6 -0
- package/apps/backend/src/protocol/v2/AccountUpdatedNotification.ts +6 -0
- package/apps/backend/src/protocol/v2/AgentMessageDeltaNotification.ts +5 -0
- package/apps/backend/src/protocol/v2/ApprovalDecision.ts +6 -0
- package/apps/backend/src/protocol/v2/AskForApproval.ts +5 -0
- package/apps/backend/src/protocol/v2/CancelLoginAccountParams.ts +5 -0
- package/apps/backend/src/protocol/v2/CancelLoginAccountResponse.ts +6 -0
- package/apps/backend/src/protocol/v2/CancelLoginAccountStatus.ts +5 -0
- package/apps/backend/src/protocol/v2/CodexErrorInfo.ts +11 -0
- package/apps/backend/src/protocol/v2/CommandAction.ts +5 -0
- package/apps/backend/src/protocol/v2/CommandExecParams.ts +6 -0
- package/apps/backend/src/protocol/v2/CommandExecResponse.ts +5 -0
- package/apps/backend/src/protocol/v2/CommandExecutionOutputDeltaNotification.ts +5 -0
- package/apps/backend/src/protocol/v2/CommandExecutionRequestApprovalParams.ts +14 -0
- package/apps/backend/src/protocol/v2/CommandExecutionRequestApprovalResponse.ts +6 -0
- package/apps/backend/src/protocol/v2/CommandExecutionStatus.ts +5 -0
- package/apps/backend/src/protocol/v2/Config.ts +15 -0
- package/apps/backend/src/protocol/v2/ConfigBatchWriteParams.ts +10 -0
- package/apps/backend/src/protocol/v2/ConfigEdit.ts +7 -0
- package/apps/backend/src/protocol/v2/ConfigLayer.ts +7 -0
- package/apps/backend/src/protocol/v2/ConfigLayerMetadata.ts +6 -0
- package/apps/backend/src/protocol/v2/ConfigLayerSource.ts +6 -0
- package/apps/backend/src/protocol/v2/ConfigReadParams.ts +5 -0
- package/apps/backend/src/protocol/v2/ConfigReadResponse.ts +8 -0
- package/apps/backend/src/protocol/v2/ConfigValueWriteParams.ts +11 -0
- package/apps/backend/src/protocol/v2/ConfigWriteResponse.ts +12 -0
- package/apps/backend/src/protocol/v2/ContextCompactedNotification.ts +5 -0
- package/apps/backend/src/protocol/v2/CreditsSnapshot.ts +5 -0
- package/apps/backend/src/protocol/v2/DeprecationNoticeNotification.ts +13 -0
- package/apps/backend/src/protocol/v2/ErrorNotification.ts +6 -0
- package/apps/backend/src/protocol/v2/ExecPolicyAmendment.ts +5 -0
- package/apps/backend/src/protocol/v2/FeedbackUploadParams.ts +5 -0
- package/apps/backend/src/protocol/v2/FeedbackUploadResponse.ts +5 -0
- package/apps/backend/src/protocol/v2/FileChangeOutputDeltaNotification.ts +5 -0
- package/apps/backend/src/protocol/v2/FileChangeRequestApprovalParams.ts +14 -0
- package/apps/backend/src/protocol/v2/FileChangeRequestApprovalResponse.ts +6 -0
- package/apps/backend/src/protocol/v2/FileUpdateChange.ts +6 -0
- package/apps/backend/src/protocol/v2/GetAccountParams.ts +5 -0
- package/apps/backend/src/protocol/v2/GetAccountRateLimitsResponse.ts +6 -0
- package/apps/backend/src/protocol/v2/GetAccountResponse.ts +6 -0
- package/apps/backend/src/protocol/v2/GitInfo.ts +5 -0
- package/apps/backend/src/protocol/v2/ItemCompletedNotification.ts +6 -0
- package/apps/backend/src/protocol/v2/ItemStartedNotification.ts +6 -0
- package/apps/backend/src/protocol/v2/ListMcpServerStatusParams.ts +13 -0
- package/apps/backend/src/protocol/v2/ListMcpServerStatusResponse.ts +11 -0
- package/apps/backend/src/protocol/v2/LoginAccountParams.ts +5 -0
- package/apps/backend/src/protocol/v2/LoginAccountResponse.ts +9 -0
- package/apps/backend/src/protocol/v2/LogoutAccountResponse.ts +5 -0
- package/apps/backend/src/protocol/v2/McpAuthStatus.ts +5 -0
- package/apps/backend/src/protocol/v2/McpServerOauthLoginCompletedNotification.ts +5 -0
- package/apps/backend/src/protocol/v2/McpServerOauthLoginParams.ts +5 -0
- package/apps/backend/src/protocol/v2/McpServerOauthLoginResponse.ts +5 -0
- package/apps/backend/src/protocol/v2/McpServerStatus.ts +9 -0
- package/apps/backend/src/protocol/v2/McpToolCallError.ts +5 -0
- package/apps/backend/src/protocol/v2/McpToolCallProgressNotification.ts +5 -0
- package/apps/backend/src/protocol/v2/McpToolCallResult.ts +7 -0
- package/apps/backend/src/protocol/v2/McpToolCallStatus.ts +5 -0
- package/apps/backend/src/protocol/v2/MergeStrategy.ts +5 -0
- package/apps/backend/src/protocol/v2/Model.ts +7 -0
- package/apps/backend/src/protocol/v2/ModelListParams.ts +13 -0
- package/apps/backend/src/protocol/v2/ModelListResponse.ts +11 -0
- package/apps/backend/src/protocol/v2/NetworkAccess.ts +5 -0
- package/apps/backend/src/protocol/v2/OverriddenMetadata.ts +7 -0
- package/apps/backend/src/protocol/v2/PatchApplyStatus.ts +5 -0
- package/apps/backend/src/protocol/v2/PatchChangeKind.ts +5 -0
- package/apps/backend/src/protocol/v2/ProfileV2.ts +10 -0
- package/apps/backend/src/protocol/v2/RateLimitSnapshot.ts +8 -0
- package/apps/backend/src/protocol/v2/RateLimitWindow.ts +5 -0
- package/apps/backend/src/protocol/v2/RawResponseItemCompletedNotification.ts +6 -0
- package/apps/backend/src/protocol/v2/ReasoningEffortOption.ts +6 -0
- package/apps/backend/src/protocol/v2/ReasoningSummaryPartAddedNotification.ts +5 -0
- package/apps/backend/src/protocol/v2/ReasoningSummaryTextDeltaNotification.ts +5 -0
- package/apps/backend/src/protocol/v2/ReasoningTextDeltaNotification.ts +5 -0
- package/apps/backend/src/protocol/v2/ReviewDelivery.ts +5 -0
- package/apps/backend/src/protocol/v2/ReviewStartParams.ts +12 -0
- package/apps/backend/src/protocol/v2/ReviewStartResponse.ts +13 -0
- package/apps/backend/src/protocol/v2/ReviewTarget.ts +9 -0
- package/apps/backend/src/protocol/v2/SandboxMode.ts +5 -0
- package/apps/backend/src/protocol/v2/SandboxPolicy.ts +7 -0
- package/apps/backend/src/protocol/v2/SandboxWorkspaceWrite.ts +5 -0
- package/apps/backend/src/protocol/v2/SessionSource.ts +5 -0
- package/apps/backend/src/protocol/v2/SkillErrorInfo.ts +5 -0
- package/apps/backend/src/protocol/v2/SkillMetadata.ts +6 -0
- package/apps/backend/src/protocol/v2/SkillScope.ts +5 -0
- package/apps/backend/src/protocol/v2/SkillsListEntry.ts +7 -0
- package/apps/backend/src/protocol/v2/SkillsListParams.ts +13 -0
- package/apps/backend/src/protocol/v2/SkillsListResponse.ts +6 -0
- package/apps/backend/src/protocol/v2/TerminalInteractionNotification.ts +5 -0
- package/apps/backend/src/protocol/v2/Thread.ts +46 -0
- package/apps/backend/src/protocol/v2/ThreadArchiveParams.ts +5 -0
- package/apps/backend/src/protocol/v2/ThreadArchiveResponse.ts +5 -0
- package/apps/backend/src/protocol/v2/ThreadItem.ts +48 -0
- package/apps/backend/src/protocol/v2/ThreadListParams.ts +18 -0
- package/apps/backend/src/protocol/v2/ThreadListResponse.ts +11 -0
- package/apps/backend/src/protocol/v2/ThreadResumeParams.ts +35 -0
- package/apps/backend/src/protocol/v2/ThreadResumeResponse.ts +9 -0
- package/apps/backend/src/protocol/v2/ThreadStartParams.ts +15 -0
- package/apps/backend/src/protocol/v2/ThreadStartResponse.ts +9 -0
- package/apps/backend/src/protocol/v2/ThreadStartedNotification.ts +6 -0
- package/apps/backend/src/protocol/v2/ThreadTokenUsage.ts +6 -0
- package/apps/backend/src/protocol/v2/ThreadTokenUsageUpdatedNotification.ts +6 -0
- package/apps/backend/src/protocol/v2/TokenUsageBreakdown.ts +5 -0
- package/apps/backend/src/protocol/v2/ToolsV2.ts +5 -0
- package/apps/backend/src/protocol/v2/Turn.ts +18 -0
- package/apps/backend/src/protocol/v2/TurnCompletedNotification.ts +6 -0
- package/apps/backend/src/protocol/v2/TurnDiffUpdatedNotification.ts +9 -0
- package/apps/backend/src/protocol/v2/TurnError.ts +6 -0
- package/apps/backend/src/protocol/v2/TurnInterruptParams.ts +5 -0
- package/apps/backend/src/protocol/v2/TurnInterruptResponse.ts +5 -0
- package/apps/backend/src/protocol/v2/TurnPlanStep.ts +6 -0
- package/apps/backend/src/protocol/v2/TurnPlanStepStatus.ts +5 -0
- package/apps/backend/src/protocol/v2/TurnPlanUpdatedNotification.ts +6 -0
- package/apps/backend/src/protocol/v2/TurnStartParams.ts +34 -0
- package/apps/backend/src/protocol/v2/TurnStartResponse.ts +6 -0
- package/apps/backend/src/protocol/v2/TurnStartedNotification.ts +6 -0
- package/apps/backend/src/protocol/v2/TurnStatus.ts +5 -0
- package/apps/backend/src/protocol/v2/UserInput.ts +5 -0
- package/apps/backend/src/protocol/v2/WindowsWorldWritableWarningNotification.ts +5 -0
- package/apps/backend/src/protocol/v2/WriteStatus.ts +5 -0
- package/apps/backend/src/protocol/v2/index.ts +123 -0
- package/apps/backend/src/reviews/service.ts +27 -0
- package/apps/backend/src/reviews/store.ts +124 -0
- package/apps/backend/src/server.ts +531 -0
- package/apps/backend/src/services/profile-store.ts +114 -0
- package/apps/backend/src/services/supervisor.ts +102 -0
- package/apps/backend/src/thread-index/service.ts +75 -0
- package/apps/backend/src/thread-index/store.ts +195 -0
- package/apps/backend/src/ws/messages.ts +73 -0
- package/apps/backend/tsconfig.json +20 -0
- package/apps/web/README.md +24 -0
- package/apps/web/bun.lock +1062 -0
- package/apps/web/eslint.config.js +23 -0
- package/apps/web/index.html +16 -0
- package/apps/web/package.json +38 -0
- package/apps/web/src/app.tsx +83 -0
- package/apps/web/src/components/composer/slash-command-menu.tsx +47 -0
- package/apps/web/src/components/index.ts +2 -0
- package/apps/web/src/components/layout/account-usage-panel.tsx +167 -0
- package/apps/web/src/components/layout/analytics-view.tsx +296 -0
- package/apps/web/src/components/layout/index.ts +7 -0
- package/apps/web/src/components/layout/mobile-header.tsx +56 -0
- package/apps/web/src/components/layout/reviews-view.tsx +848 -0
- package/apps/web/src/components/layout/session-view.tsx +1374 -0
- package/apps/web/src/components/layout/settings-dialog.tsx +322 -0
- package/apps/web/src/components/layout/side-bar.tsx +417 -0
- package/apps/web/src/components/layout/thread-list.tsx +488 -0
- package/apps/web/src/components/layout/virtualized-message-list.tsx +748 -0
- package/apps/web/src/components/loading/startup-ascii.ts +652 -0
- package/apps/web/src/components/loading/startup-loader.tsx +37 -0
- package/apps/web/src/components/session-view/file-mention-menu.tsx +46 -0
- package/apps/web/src/components/session-view/session-auth-banner.tsx +61 -0
- package/apps/web/src/components/session-view/session-composer.tsx +328 -0
- package/apps/web/src/components/session-view/session-dialogs.tsx +280 -0
- package/apps/web/src/components/session-view/session-empty.tsx +47 -0
- package/apps/web/src/components/session-view/session-header.tsx +49 -0
- package/apps/web/src/components/ui/avatar.tsx +19 -0
- package/apps/web/src/components/ui/badge.tsx +21 -0
- package/apps/web/src/components/ui/button.tsx +47 -0
- package/apps/web/src/components/ui/collapsible-content.tsx +114 -0
- package/apps/web/src/components/ui/contribution-graph.tsx +182 -0
- package/apps/web/src/components/ui/dialog-box.tsx +203 -0
- package/apps/web/src/components/ui/icon-button.tsx +32 -0
- package/apps/web/src/components/ui/icons.tsx +187 -0
- package/apps/web/src/components/ui/index.tsx +15 -0
- package/apps/web/src/components/ui/input.tsx +43 -0
- package/apps/web/src/components/ui/markdown-stream.tsx +21 -0
- package/apps/web/src/components/ui/mobile-drawer.tsx +124 -0
- package/apps/web/src/components/ui/section-header.tsx +13 -0
- package/apps/web/src/components/ui/select.tsx +217 -0
- package/apps/web/src/components/ui/shimmer.tsx +138 -0
- package/apps/web/src/components/ui/status-dot.tsx +24 -0
- package/apps/web/src/config.ts +5 -0
- package/apps/web/src/hooks/index.ts +3 -0
- package/apps/web/src/hooks/use-analytics.ts +122 -0
- package/apps/web/src/hooks/use-hub-connection.ts +587 -0
- package/apps/web/src/hooks/use-mobile.ts +76 -0
- package/apps/web/src/hooks/use-thread-history.ts +210 -0
- package/apps/web/src/index.css +269 -0
- package/apps/web/src/main.tsx +10 -0
- package/apps/web/src/services/hub-client.ts +358 -0
- package/apps/web/src/store/index.ts +528 -0
- package/apps/web/src/types/index.ts +119 -0
- package/apps/web/src/utils/account-refresh.ts +168 -0
- package/apps/web/src/utils/approval-policy.ts +53 -0
- package/apps/web/src/utils/init-prompt.ts +41 -0
- package/apps/web/src/utils/item-format.ts +170 -0
- package/apps/web/src/utils/prompt-expander.ts +62 -0
- package/apps/web/src/utils/reasoning-summary.ts +48 -0
- package/apps/web/src/utils/slash-commands.ts +98 -0
- package/apps/web/tsconfig.app.json +28 -0
- package/apps/web/tsconfig.json +7 -0
- package/apps/web/tsconfig.node.json +26 -0
- package/apps/web/vite.config.ts +8 -0
- package/bin/better-codex.cjs +199 -0
- package/package.json +20 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
|
2
|
+
|
|
3
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
4
|
+
import type { Annotations } from "./Annotations";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* An image provided to or from an LLM.
|
|
8
|
+
*/
|
|
9
|
+
export type ImageContent = { annotations?: Annotations, data: string, mimeType: string, type: string, };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
|
2
|
+
|
|
3
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
4
|
+
|
|
5
|
+
export type InputItem = { "type": "text", "data": { text: string, } } | { "type": "image", "data": { image_url: string, } } | { "type": "localImage", "data": { path: string, } };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
|
2
|
+
|
|
3
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
4
|
+
import type { ConversationId } from "./ConversationId";
|
|
5
|
+
|
|
6
|
+
export type InterruptConversationParams = { conversationId: ConversationId, };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
|
2
|
+
|
|
3
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
4
|
+
import type { TurnAbortReason } from "./TurnAbortReason";
|
|
5
|
+
|
|
6
|
+
export type InterruptConversationResponse = { abortReason: TurnAbortReason, };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
|
2
|
+
|
|
3
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
4
|
+
import type { ConversationId } from "./ConversationId";
|
|
5
|
+
import type { TurnItem } from "./TurnItem";
|
|
6
|
+
|
|
7
|
+
export type ItemCompletedEvent = { thread_id: ConversationId, turn_id: string, item: TurnItem, };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
|
2
|
+
|
|
3
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
4
|
+
import type { ConversationId } from "./ConversationId";
|
|
5
|
+
import type { TurnItem } from "./TurnItem";
|
|
6
|
+
|
|
7
|
+
export type ItemStartedEvent = { thread_id: ConversationId, turn_id: string, item: TurnItem, };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
|
2
|
+
|
|
3
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
4
|
+
|
|
5
|
+
export type ListConversationsParams = { pageSize: number | null, cursor: string | null, modelProviders: Array<string> | null, };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
|
2
|
+
|
|
3
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
4
|
+
import type { ConversationSummary } from "./ConversationSummary";
|
|
5
|
+
|
|
6
|
+
export type ListConversationsResponse = { items: Array<ConversationSummary>, nextCursor: string | null, };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
|
2
|
+
|
|
3
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
4
|
+
import type { CustomPrompt } from "./CustomPrompt";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Response payload for `Op::ListCustomPrompts`.
|
|
8
|
+
*/
|
|
9
|
+
export type ListCustomPromptsResponseEvent = { custom_prompts: Array<CustomPrompt>, };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
|
2
|
+
|
|
3
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
4
|
+
import type { SkillsListEntry } from "./SkillsListEntry";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Response payload for `Op::ListSkills`.
|
|
8
|
+
*/
|
|
9
|
+
export type ListSkillsResponseEvent = { skills: Array<SkillsListEntry>, };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
|
2
|
+
|
|
3
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
4
|
+
import type { LocalShellExecAction } from "./LocalShellExecAction";
|
|
5
|
+
|
|
6
|
+
export type LocalShellAction = { "type": "exec" } & LocalShellExecAction;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
|
2
|
+
|
|
3
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
4
|
+
|
|
5
|
+
export type LocalShellExecAction = { command: Array<string>, timeout_ms: bigint | null, working_directory: string | null, env: { [key in string]?: string } | null, user: string | null, };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
|
2
|
+
|
|
3
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Deprecated in favor of AccountLoginCompletedNotification.
|
|
7
|
+
*/
|
|
8
|
+
export type LoginChatGptCompleteNotification = { loginId: string, success: boolean, error: string | null, };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
|
2
|
+
|
|
3
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
4
|
+
import type { JsonValue } from "./serde_json/JsonValue";
|
|
5
|
+
|
|
6
|
+
export type McpInvocation = {
|
|
7
|
+
/**
|
|
8
|
+
* Name of the MCP server as defined in the config.
|
|
9
|
+
*/
|
|
10
|
+
server: string,
|
|
11
|
+
/**
|
|
12
|
+
* Name of the tool as given by the MCP server.
|
|
13
|
+
*/
|
|
14
|
+
tool: string,
|
|
15
|
+
/**
|
|
16
|
+
* Arguments to the tool call.
|
|
17
|
+
*/
|
|
18
|
+
arguments: JsonValue | null, };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
|
2
|
+
|
|
3
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
4
|
+
import type { McpAuthStatus } from "./McpAuthStatus";
|
|
5
|
+
import type { Resource } from "./Resource";
|
|
6
|
+
import type { ResourceTemplate } from "./ResourceTemplate";
|
|
7
|
+
import type { Tool } from "./Tool";
|
|
8
|
+
|
|
9
|
+
export type McpListToolsResponseEvent = {
|
|
10
|
+
/**
|
|
11
|
+
* Fully qualified tool name -> tool definition.
|
|
12
|
+
*/
|
|
13
|
+
tools: { [key in string]?: Tool },
|
|
14
|
+
/**
|
|
15
|
+
* Known resources grouped by server name.
|
|
16
|
+
*/
|
|
17
|
+
resources: { [key in string]?: Array<Resource> },
|
|
18
|
+
/**
|
|
19
|
+
* Known resource templates grouped by server name.
|
|
20
|
+
*/
|
|
21
|
+
resource_templates: { [key in string]?: Array<ResourceTemplate> },
|
|
22
|
+
/**
|
|
23
|
+
* Authentication status for each configured MCP server.
|
|
24
|
+
*/
|
|
25
|
+
auth_statuses: { [key in string]?: McpAuthStatus }, };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
|
2
|
+
|
|
3
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
4
|
+
import type { McpStartupFailure } from "./McpStartupFailure";
|
|
5
|
+
|
|
6
|
+
export type McpStartupCompleteEvent = { ready: Array<string>, failed: Array<McpStartupFailure>, cancelled: Array<string>, };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
|
2
|
+
|
|
3
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
4
|
+
|
|
5
|
+
export type McpStartupStatus = { "state": "starting" } | { "state": "ready" } | { "state": "failed", error: string, } | { "state": "cancelled" };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
|
2
|
+
|
|
3
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
4
|
+
import type { McpStartupStatus } from "./McpStartupStatus";
|
|
5
|
+
|
|
6
|
+
export type McpStartupUpdateEvent = {
|
|
7
|
+
/**
|
|
8
|
+
* Server name being started.
|
|
9
|
+
*/
|
|
10
|
+
server: string,
|
|
11
|
+
/**
|
|
12
|
+
* Current startup status.
|
|
13
|
+
*/
|
|
14
|
+
status: McpStartupStatus, };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
|
2
|
+
|
|
3
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
4
|
+
import type { McpInvocation } from "./McpInvocation";
|
|
5
|
+
|
|
6
|
+
export type McpToolCallBeginEvent = {
|
|
7
|
+
/**
|
|
8
|
+
* Identifier so this can be paired with the McpToolCallEnd event.
|
|
9
|
+
*/
|
|
10
|
+
call_id: string, invocation: McpInvocation, };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
|
2
|
+
|
|
3
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
4
|
+
import type { CallToolResult } from "./CallToolResult";
|
|
5
|
+
import type { McpInvocation } from "./McpInvocation";
|
|
6
|
+
|
|
7
|
+
export type McpToolCallEndEvent = {
|
|
8
|
+
/**
|
|
9
|
+
* Identifier for the corresponding McpToolCallBegin that finished.
|
|
10
|
+
*/
|
|
11
|
+
call_id: string, invocation: McpInvocation, duration: string,
|
|
12
|
+
/**
|
|
13
|
+
* Result of the tool call. Note this could be an error.
|
|
14
|
+
*/
|
|
15
|
+
result: { Ok : CallToolResult } | { Err : string }, };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
|
2
|
+
|
|
3
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Represents whether outbound network access is available to the agent.
|
|
7
|
+
*/
|
|
8
|
+
export type NetworkAccess = "restricted" | "enabled";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
|
2
|
+
|
|
3
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
4
|
+
import type { AskForApproval } from "./AskForApproval";
|
|
5
|
+
import type { SandboxMode } from "./SandboxMode";
|
|
6
|
+
import type { JsonValue } from "./serde_json/JsonValue";
|
|
7
|
+
|
|
8
|
+
export type NewConversationParams = { model: string | null, modelProvider: string | null, profile: string | null, cwd: string | null, approvalPolicy: AskForApproval | null, sandbox: SandboxMode | null, config: { [key in string]?: JsonValue } | null, baseInstructions: string | null, developerInstructions: string | null, compactPrompt: string | null, includeApplyPatchTool: boolean | null, };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
|
2
|
+
|
|
3
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
4
|
+
import type { ConversationId } from "./ConversationId";
|
|
5
|
+
import type { ReasoningEffort } from "./ReasoningEffort";
|
|
6
|
+
|
|
7
|
+
export type NewConversationResponse = { conversationId: ConversationId, model: string, reasoningEffort: ReasoningEffort | null, rolloutPath: string, };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
|
2
|
+
|
|
3
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
4
|
+
|
|
5
|
+
export type ParsedCommand = { "type": "read", cmd: string, name: string,
|
|
6
|
+
/**
|
|
7
|
+
* (Best effort) Path to the file being read by the command. When
|
|
8
|
+
* possible, this is an absolute path, though when relative, it should
|
|
9
|
+
* be resolved against the `cwd`` that will be used to run the command
|
|
10
|
+
* to derive the absolute path.
|
|
11
|
+
*/
|
|
12
|
+
path: string, } | { "type": "list_files", cmd: string, path: string | null, } | { "type": "search", cmd: string, query: string | null, path: string | null, } | { "type": "unknown", cmd: string, };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
|
2
|
+
|
|
3
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
4
|
+
import type { FileChange } from "./FileChange";
|
|
5
|
+
|
|
6
|
+
export type PatchApplyBeginEvent = {
|
|
7
|
+
/**
|
|
8
|
+
* Identifier so this can be paired with the PatchApplyEnd event.
|
|
9
|
+
*/
|
|
10
|
+
call_id: string,
|
|
11
|
+
/**
|
|
12
|
+
* Turn ID that this patch belongs to.
|
|
13
|
+
* Uses `#[serde(default)]` for backwards compatibility.
|
|
14
|
+
*/
|
|
15
|
+
turn_id: string,
|
|
16
|
+
/**
|
|
17
|
+
* If true, there was no ApplyPatchApprovalRequest for this patch.
|
|
18
|
+
*/
|
|
19
|
+
auto_approved: boolean,
|
|
20
|
+
/**
|
|
21
|
+
* The changes to be applied.
|
|
22
|
+
*/
|
|
23
|
+
changes: { [key in string]?: FileChange }, };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
|
2
|
+
|
|
3
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
4
|
+
import type { FileChange } from "./FileChange";
|
|
5
|
+
|
|
6
|
+
export type PatchApplyEndEvent = {
|
|
7
|
+
/**
|
|
8
|
+
* Identifier for the PatchApplyBegin that finished.
|
|
9
|
+
*/
|
|
10
|
+
call_id: string,
|
|
11
|
+
/**
|
|
12
|
+
* Turn ID that this patch belongs to.
|
|
13
|
+
* Uses `#[serde(default)]` for backwards compatibility.
|
|
14
|
+
*/
|
|
15
|
+
turn_id: string,
|
|
16
|
+
/**
|
|
17
|
+
* Captured stdout (summary printed by apply_patch).
|
|
18
|
+
*/
|
|
19
|
+
stdout: string,
|
|
20
|
+
/**
|
|
21
|
+
* Captured stderr (parser errors, IO failures, etc.).
|
|
22
|
+
*/
|
|
23
|
+
stderr: string,
|
|
24
|
+
/**
|
|
25
|
+
* Whether the patch was applied successfully.
|
|
26
|
+
*/
|
|
27
|
+
success: boolean,
|
|
28
|
+
/**
|
|
29
|
+
* The changes that were applied (mirrors PatchApplyBeginEvent::changes).
|
|
30
|
+
*/
|
|
31
|
+
changes: { [key in string]?: FileChange }, };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
|
2
|
+
|
|
3
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
4
|
+
import type { StepStatus } from "./StepStatus";
|
|
5
|
+
|
|
6
|
+
export type PlanItemArg = { step: string, status: StepStatus, };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
|
2
|
+
|
|
3
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
4
|
+
import type { AskForApproval } from "./AskForApproval";
|
|
5
|
+
import type { ReasoningEffort } from "./ReasoningEffort";
|
|
6
|
+
import type { ReasoningSummary } from "./ReasoningSummary";
|
|
7
|
+
import type { Verbosity } from "./Verbosity";
|
|
8
|
+
|
|
9
|
+
export type Profile = { model: string | null, modelProvider: string | null, approvalPolicy: AskForApproval | null, modelReasoningEffort: ReasoningEffort | null, modelReasoningSummary: ReasoningSummary | null, modelVerbosity: Verbosity | null, chatgptBaseUrl: string | null, };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
|
2
|
+
|
|
3
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
4
|
+
import type { CreditsSnapshot } from "./CreditsSnapshot";
|
|
5
|
+
import type { PlanType } from "./PlanType";
|
|
6
|
+
import type { RateLimitWindow } from "./RateLimitWindow";
|
|
7
|
+
|
|
8
|
+
export type RateLimitSnapshot = { primary: RateLimitWindow | null, secondary: RateLimitWindow | null, credits: CreditsSnapshot | null, plan_type: PlanType | null, };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
|
2
|
+
|
|
3
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
4
|
+
|
|
5
|
+
export type RateLimitWindow = {
|
|
6
|
+
/**
|
|
7
|
+
* Percentage (0-100) of the window that has been consumed.
|
|
8
|
+
*/
|
|
9
|
+
used_percent: number,
|
|
10
|
+
/**
|
|
11
|
+
* Rolling window duration, in minutes.
|
|
12
|
+
*/
|
|
13
|
+
window_minutes: number | null,
|
|
14
|
+
/**
|
|
15
|
+
* Unix timestamp (seconds since epoch) when the window resets.
|
|
16
|
+
*/
|
|
17
|
+
resets_at: number | null, };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
|
2
|
+
|
|
3
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
4
|
+
import type { ResponseItem } from "./ResponseItem";
|
|
5
|
+
|
|
6
|
+
export type RawResponseItemEvent = { item: ResponseItem, };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
|
2
|
+
|
|
3
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
4
|
+
|
|
5
|
+
export type ReasoningContentDeltaEvent = { thread_id: string, turn_id: string, item_id: string, delta: string, summary_index: bigint, };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
|
2
|
+
|
|
3
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#get-started-with-reasoning
|
|
7
|
+
*/
|
|
8
|
+
export type ReasoningEffort = "none" | "minimal" | "low" | "medium" | "high" | "xhigh";
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
|
2
|
+
|
|
3
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
4
|
+
|
|
5
|
+
export type ReasoningItemContent = { "type": "reasoning_text", text: string, } | { "type": "text", text: string, };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
|
2
|
+
|
|
3
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
4
|
+
|
|
5
|
+
export type ReasoningRawContentDeltaEvent = { thread_id: string, turn_id: string, item_id: string, delta: string, content_index: bigint, };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
|
2
|
+
|
|
3
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* A summary of the reasoning performed by the model. This can be useful for
|
|
7
|
+
* debugging and understanding the model's reasoning process.
|
|
8
|
+
* See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#reasoning-summaries
|
|
9
|
+
*/
|
|
10
|
+
export type ReasoningSummary = "auto" | "concise" | "detailed" | "none";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
|
2
|
+
|
|
3
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
4
|
+
import type { Annotations } from "./Annotations";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* A known resource that the server is capable of reading.
|
|
8
|
+
*/
|
|
9
|
+
export type Resource = { annotations?: Annotations, description?: string, mimeType?: string, name: string, size?: bigint, title?: string, uri: string, };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
|
2
|
+
|
|
3
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
4
|
+
import type { Annotations } from "./Annotations";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* A resource that the server is capable of reading, included in a prompt or tool call result.
|
|
8
|
+
*
|
|
9
|
+
* Note: resource links returned by tools are not guaranteed to appear in the results of `resources/list` requests.
|
|
10
|
+
*/
|
|
11
|
+
export type ResourceLink = { annotations?: Annotations, description?: string, mimeType?: string, name: string, size?: bigint, title?: string, type: string, uri: string, };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
|
2
|
+
|
|
3
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
4
|
+
import type { Annotations } from "./Annotations";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* A template description for resources available on the server.
|
|
8
|
+
*/
|
|
9
|
+
export type ResourceTemplate = { annotations?: Annotations, description?: string, mimeType?: string, name: string, title?: string, uriTemplate: string, };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
|
2
|
+
|
|
3
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
4
|
+
import type { ContentItem } from "./ContentItem";
|
|
5
|
+
import type { FunctionCallOutputPayload } from "./FunctionCallOutputPayload";
|
|
6
|
+
import type { GhostCommit } from "./GhostCommit";
|
|
7
|
+
import type { LocalShellAction } from "./LocalShellAction";
|
|
8
|
+
import type { LocalShellStatus } from "./LocalShellStatus";
|
|
9
|
+
import type { ReasoningItemContent } from "./ReasoningItemContent";
|
|
10
|
+
import type { ReasoningItemReasoningSummary } from "./ReasoningItemReasoningSummary";
|
|
11
|
+
import type { WebSearchAction } from "./WebSearchAction";
|
|
12
|
+
|
|
13
|
+
export type ResponseItem = { "type": "message", role: string, content: Array<ContentItem>, } | { "type": "reasoning", summary: Array<ReasoningItemReasoningSummary>, content?: Array<ReasoningItemContent>, encrypted_content: string | null, } | { "type": "local_shell_call",
|
|
14
|
+
/**
|
|
15
|
+
* Set when using the Responses API.
|
|
16
|
+
*/
|
|
17
|
+
call_id: string | null, status: LocalShellStatus, action: LocalShellAction, } | { "type": "function_call", name: string, arguments: string, call_id: string, } | { "type": "function_call_output", call_id: string, output: FunctionCallOutputPayload, } | { "type": "custom_tool_call", status?: string, call_id: string, name: string, input: string, } | { "type": "custom_tool_call_output", call_id: string, output: string, } | { "type": "web_search_call", status?: string, action: WebSearchAction, } | { "type": "ghost_snapshot", ghost_commit: GhostCommit, } | { "type": "compaction", encrypted_content: string, } | { "type": "other" };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
|
2
|
+
|
|
3
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
4
|
+
import type { ConversationId } from "./ConversationId";
|
|
5
|
+
import type { NewConversationParams } from "./NewConversationParams";
|
|
6
|
+
import type { ResponseItem } from "./ResponseItem";
|
|
7
|
+
|
|
8
|
+
export type ResumeConversationParams = { path: string | null, conversationId: ConversationId | null, history: Array<ResponseItem> | null, overrides: NewConversationParams | null, };
|