@sumicom/quicksave 0.8.14 → 0.8.16
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/dist/ai/cardBuilder.d.ts +22 -2
- package/dist/ai/cardBuilder.d.ts.map +1 -1
- package/dist/ai/cardBuilder.js +133 -8
- package/dist/ai/cardBuilder.js.map +1 -1
- package/dist/ai/claudeCliProvider.d.ts +25 -2
- package/dist/ai/claudeCliProvider.d.ts.map +1 -1
- package/dist/ai/claudeCliProvider.js +85 -21
- package/dist/ai/claudeCliProvider.js.map +1 -1
- package/dist/ai/claudeTerminal/hookBridge.d.ts +4 -3
- package/dist/ai/claudeTerminal/hookBridge.d.ts.map +1 -1
- package/dist/ai/claudeTerminal/hookBridge.js.map +1 -1
- package/dist/ai/claudeTerminal/provider.d.ts +14 -1
- package/dist/ai/claudeTerminal/provider.d.ts.map +1 -1
- package/dist/ai/claudeTerminal/provider.js +358 -65
- package/dist/ai/claudeTerminal/provider.js.map +1 -1
- package/dist/ai/codexAppServer/approvalMapping.d.ts.map +1 -1
- package/dist/ai/codexAppServer/approvalMapping.js +3 -1
- package/dist/ai/codexAppServer/approvalMapping.js.map +1 -1
- package/dist/ai/codexAppServer/cardAdapter.d.ts.map +1 -1
- package/dist/ai/codexAppServer/cardAdapter.js +175 -24
- package/dist/ai/codexAppServer/cardAdapter.js.map +1 -1
- package/dist/ai/codexAppServer/overrideStore.d.ts +0 -2
- package/dist/ai/codexAppServer/overrideStore.d.ts.map +1 -1
- package/dist/ai/codexAppServer/overrideStore.js +0 -1
- package/dist/ai/codexAppServer/overrideStore.js.map +1 -1
- package/dist/ai/codexAppServer/permissionMapping.d.ts.map +1 -1
- package/dist/ai/codexAppServer/permissionMapping.js +0 -2
- package/dist/ai/codexAppServer/permissionMapping.js.map +1 -1
- package/dist/ai/codexAppServer/protocolLog.d.ts +2 -0
- package/dist/ai/codexAppServer/protocolLog.d.ts.map +1 -0
- package/dist/ai/codexAppServer/protocolLog.js +16 -0
- package/dist/ai/codexAppServer/protocolLog.js.map +1 -0
- package/dist/ai/codexAppServer/provider.d.ts +18 -0
- package/dist/ai/codexAppServer/provider.d.ts.map +1 -1
- package/dist/ai/codexAppServer/provider.js +433 -19
- package/dist/ai/codexAppServer/provider.js.map +1 -1
- package/dist/ai/codexAppServer/rpcClient.d.ts +2 -0
- package/dist/ai/codexAppServer/rpcClient.d.ts.map +1 -1
- package/dist/ai/codexAppServer/rpcClient.js +15 -1
- package/dist/ai/codexAppServer/rpcClient.js.map +1 -1
- package/dist/ai/codexAppServer/schema/generated/AgentMessageInputContent.d.ts +5 -0
- package/dist/ai/codexAppServer/schema/generated/AgentMessageInputContent.d.ts.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/AgentMessageInputContent.js +3 -0
- package/dist/ai/codexAppServer/schema/generated/AgentMessageInputContent.js.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/AuthMode.d.ts +1 -1
- package/dist/ai/codexAppServer/schema/generated/AuthMode.d.ts.map +1 -1
- package/dist/ai/codexAppServer/schema/generated/AutoCompactTokenLimitScope.d.ts +6 -0
- package/dist/ai/codexAppServer/schema/generated/AutoCompactTokenLimitScope.d.ts.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/AutoCompactTokenLimitScope.js +3 -0
- package/dist/ai/codexAppServer/schema/generated/AutoCompactTokenLimitScope.js.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/ClientRequest.d.ts +74 -16
- package/dist/ai/codexAppServer/schema/generated/ClientRequest.d.ts.map +1 -1
- package/dist/ai/codexAppServer/schema/generated/FunctionCallOutputContentItem.d.ts +3 -0
- package/dist/ai/codexAppServer/schema/generated/FunctionCallOutputContentItem.d.ts.map +1 -1
- package/dist/ai/codexAppServer/schema/generated/InitializeCapabilities.d.ts +4 -0
- package/dist/ai/codexAppServer/schema/generated/InitializeCapabilities.d.ts.map +1 -1
- package/dist/ai/codexAppServer/schema/generated/InternalSessionSource.d.ts +2 -0
- package/dist/ai/codexAppServer/schema/generated/InternalSessionSource.d.ts.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/{v2/DeviceKeyCreateParams.js → InternalSessionSource.js} +1 -1
- package/dist/ai/codexAppServer/schema/generated/InternalSessionSource.js.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/McpServerInfo.d.ts +13 -0
- package/dist/ai/codexAppServer/schema/generated/McpServerInfo.d.ts.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/{v2/ReadOnlyAccess.js → McpServerInfo.js} +1 -1
- package/dist/ai/codexAppServer/schema/generated/McpServerInfo.js.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/ReasoningEffort.d.ts +1 -1
- package/dist/ai/codexAppServer/schema/generated/ReasoningEffort.d.ts.map +1 -1
- package/dist/ai/codexAppServer/schema/generated/ResponseItem.d.ts +11 -5
- package/dist/ai/codexAppServer/schema/generated/ResponseItem.d.ts.map +1 -1
- package/dist/ai/codexAppServer/schema/generated/ServerNotification.d.ts +28 -0
- package/dist/ai/codexAppServer/schema/generated/ServerNotification.d.ts.map +1 -1
- package/dist/ai/codexAppServer/schema/generated/ServerRequest.d.ts +5 -0
- package/dist/ai/codexAppServer/schema/generated/ServerRequest.d.ts.map +1 -1
- package/dist/ai/codexAppServer/schema/generated/SessionSource.d.ts +3 -0
- package/dist/ai/codexAppServer/schema/generated/SessionSource.d.ts.map +1 -1
- package/dist/ai/codexAppServer/schema/generated/v2/AccountRateLimitsUpdatedNotification.d.ts +7 -0
- package/dist/ai/codexAppServer/schema/generated/v2/AccountRateLimitsUpdatedNotification.d.ts.map +1 -1
- package/dist/ai/codexAppServer/schema/generated/v2/AccountTokenUsageDailyBucket.d.ts +5 -0
- package/dist/ai/codexAppServer/schema/generated/v2/AccountTokenUsageDailyBucket.d.ts.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/AccountTokenUsageDailyBucket.js +3 -0
- package/dist/ai/codexAppServer/schema/generated/v2/AccountTokenUsageDailyBucket.js.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/AccountTokenUsageSummary.d.ts +8 -0
- package/dist/ai/codexAppServer/schema/generated/v2/AccountTokenUsageSummary.d.ts.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/AccountTokenUsageSummary.js +3 -0
- package/dist/ai/codexAppServer/schema/generated/v2/AccountTokenUsageSummary.js.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/ActivePermissionProfile.d.ts +13 -0
- package/dist/ai/codexAppServer/schema/generated/v2/ActivePermissionProfile.d.ts.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/ActivePermissionProfile.js +3 -0
- package/dist/ai/codexAppServer/schema/generated/v2/ActivePermissionProfile.js.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/AdditionalContextEntry.d.ts +6 -0
- package/dist/ai/codexAppServer/schema/generated/v2/AdditionalContextEntry.d.ts.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/AdditionalContextEntry.js +3 -0
- package/dist/ai/codexAppServer/schema/generated/v2/AdditionalContextEntry.js.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/AdditionalContextKind.d.ts +2 -0
- package/dist/ai/codexAppServer/schema/generated/v2/AdditionalContextKind.d.ts.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/AdditionalContextKind.js +3 -0
- package/dist/ai/codexAppServer/schema/generated/v2/AdditionalContextKind.js.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/AppTemplateSummary.d.ts +12 -0
- package/dist/ai/codexAppServer/schema/generated/v2/AppTemplateSummary.d.ts.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/{DeviceKeyAlgorithm.js → AppTemplateSummary.js} +1 -1
- package/dist/ai/codexAppServer/schema/generated/v2/AppTemplateSummary.js.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/AppTemplateUnavailableReason.d.ts +2 -0
- package/dist/ai/codexAppServer/schema/generated/v2/AppTemplateUnavailableReason.d.ts.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/AppTemplateUnavailableReason.js +3 -0
- package/dist/ai/codexAppServer/schema/generated/v2/AppTemplateUnavailableReason.js.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/AppsConfig.d.ts +2 -0
- package/dist/ai/codexAppServer/schema/generated/v2/AppsConfig.d.ts.map +1 -1
- package/dist/ai/codexAppServer/schema/generated/v2/AttestationGenerateParams.d.ts +2 -0
- package/dist/ai/codexAppServer/schema/generated/v2/AttestationGenerateParams.d.ts.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/AttestationGenerateParams.js +3 -0
- package/dist/ai/codexAppServer/schema/generated/v2/AttestationGenerateParams.js.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/AttestationGenerateResponse.d.ts +7 -0
- package/dist/ai/codexAppServer/schema/generated/v2/AttestationGenerateResponse.d.ts.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/AttestationGenerateResponse.js +3 -0
- package/dist/ai/codexAppServer/schema/generated/v2/AttestationGenerateResponse.js.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/CommandExecParams.d.ts +12 -35
- package/dist/ai/codexAppServer/schema/generated/v2/CommandExecParams.d.ts.map +1 -1
- package/dist/ai/codexAppServer/schema/generated/v2/CommandExecutionRequestApprovalParams.d.ts +11 -26
- package/dist/ai/codexAppServer/schema/generated/v2/CommandExecutionRequestApprovalParams.d.ts.map +1 -1
- package/dist/ai/codexAppServer/schema/generated/v2/CommandMigration.d.ts +4 -0
- package/dist/ai/codexAppServer/schema/generated/v2/CommandMigration.d.ts.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/CommandMigration.js +3 -0
- package/dist/ai/codexAppServer/schema/generated/v2/CommandMigration.js.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/ComputerUseRequirements.d.ts +4 -0
- package/dist/ai/codexAppServer/schema/generated/v2/ComputerUseRequirements.d.ts.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/ComputerUseRequirements.js +3 -0
- package/dist/ai/codexAppServer/schema/generated/v2/ComputerUseRequirements.js.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/Config.d.ts +8 -8
- package/dist/ai/codexAppServer/schema/generated/v2/Config.d.ts.map +1 -1
- package/dist/ai/codexAppServer/schema/generated/v2/ConfigLayerSource.d.ts +17 -0
- package/dist/ai/codexAppServer/schema/generated/v2/ConfigLayerSource.d.ts.map +1 -1
- package/dist/ai/codexAppServer/schema/generated/v2/ConfigReadParams.d.ts +1 -1
- package/dist/ai/codexAppServer/schema/generated/v2/ConfigReadParams.d.ts.map +1 -1
- package/dist/ai/codexAppServer/schema/generated/v2/ConfigRequirements.d.ts +10 -0
- package/dist/ai/codexAppServer/schema/generated/v2/ConfigRequirements.d.ts.map +1 -1
- package/dist/ai/codexAppServer/schema/generated/v2/ConfiguredHookHandler.d.ts +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/ConfiguredHookHandler.d.ts.map +1 -1
- package/dist/ai/codexAppServer/schema/generated/v2/ExperimentalFeatureListParams.d.ts +6 -0
- package/dist/ai/codexAppServer/schema/generated/v2/ExperimentalFeatureListParams.d.ts.map +1 -1
- package/dist/ai/codexAppServer/schema/generated/v2/ExternalAgentConfigMigrationItemType.d.ts +1 -1
- package/dist/ai/codexAppServer/schema/generated/v2/ExternalAgentConfigMigrationItemType.d.ts.map +1 -1
- package/dist/ai/codexAppServer/schema/generated/v2/FeedbackUploadParams.d.ts +1 -1
- package/dist/ai/codexAppServer/schema/generated/v2/FeedbackUploadParams.d.ts.map +1 -1
- package/dist/ai/codexAppServer/schema/generated/v2/FileChangeOutputDeltaNotification.d.ts +5 -0
- package/dist/ai/codexAppServer/schema/generated/v2/FileChangeOutputDeltaNotification.d.ts.map +1 -1
- package/dist/ai/codexAppServer/schema/generated/v2/FileChangeRequestApprovalParams.d.ts +4 -0
- package/dist/ai/codexAppServer/schema/generated/v2/FileChangeRequestApprovalParams.d.ts.map +1 -1
- package/dist/ai/codexAppServer/schema/generated/v2/FileSystemAccessMode.d.ts +1 -1
- package/dist/ai/codexAppServer/schema/generated/v2/FileSystemSpecialPath.d.ts +0 -2
- package/dist/ai/codexAppServer/schema/generated/v2/FileSystemSpecialPath.d.ts.map +1 -1
- package/dist/ai/codexAppServer/schema/generated/v2/ForcedChatgptWorkspaceIds.d.ts +5 -0
- package/dist/ai/codexAppServer/schema/generated/v2/ForcedChatgptWorkspaceIds.d.ts.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/ForcedChatgptWorkspaceIds.js +3 -0
- package/dist/ai/codexAppServer/schema/generated/v2/ForcedChatgptWorkspaceIds.js.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/GetAccountParams.d.ts +1 -1
- package/dist/ai/codexAppServer/schema/generated/v2/GetAccountParams.d.ts.map +1 -1
- package/dist/ai/codexAppServer/schema/generated/v2/GetAccountTokenUsageResponse.d.ts +7 -0
- package/dist/ai/codexAppServer/schema/generated/v2/GetAccountTokenUsageResponse.d.ts.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/GetAccountTokenUsageResponse.js +3 -0
- package/dist/ai/codexAppServer/schema/generated/v2/GetAccountTokenUsageResponse.js.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/HookErrorInfo.d.ts +5 -0
- package/dist/ai/codexAppServer/schema/generated/v2/HookErrorInfo.d.ts.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/HookErrorInfo.js +3 -0
- package/dist/ai/codexAppServer/schema/generated/v2/HookErrorInfo.js.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/HookEventName.d.ts +1 -1
- package/dist/ai/codexAppServer/schema/generated/v2/HookEventName.d.ts.map +1 -1
- package/dist/ai/codexAppServer/schema/generated/v2/HookMetadata.d.ts +23 -0
- package/dist/ai/codexAppServer/schema/generated/v2/HookMetadata.d.ts.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/{GhostCommit.js → v2/HookMetadata.js} +1 -1
- package/dist/ai/codexAppServer/schema/generated/v2/HookMetadata.js.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/HookMigration.d.ts +4 -0
- package/dist/ai/codexAppServer/schema/generated/v2/HookMigration.d.ts.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/HookMigration.js +3 -0
- package/dist/ai/codexAppServer/schema/generated/v2/HookMigration.js.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/HookSource.d.ts +1 -1
- package/dist/ai/codexAppServer/schema/generated/v2/HookSource.d.ts.map +1 -1
- package/dist/ai/codexAppServer/schema/generated/v2/HookTrustStatus.d.ts +2 -0
- package/dist/ai/codexAppServer/schema/generated/v2/HookTrustStatus.d.ts.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/HookTrustStatus.js +3 -0
- package/dist/ai/codexAppServer/schema/generated/v2/HookTrustStatus.js.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/HooksListEntry.d.ts +9 -0
- package/dist/ai/codexAppServer/schema/generated/v2/HooksListEntry.d.ts.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/HooksListEntry.js +3 -0
- package/dist/ai/codexAppServer/schema/generated/v2/HooksListEntry.js.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/HooksListParams.d.ts +7 -0
- package/dist/ai/codexAppServer/schema/generated/v2/HooksListParams.d.ts.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/HooksListParams.js +3 -0
- package/dist/ai/codexAppServer/schema/generated/v2/HooksListParams.js.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/HooksListResponse.d.ts +5 -0
- package/dist/ai/codexAppServer/schema/generated/v2/HooksListResponse.d.ts.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/{PermissionProfile.js → HooksListResponse.js} +1 -1
- package/dist/ai/codexAppServer/schema/generated/v2/HooksListResponse.js.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/ItemCompletedNotification.d.ts +4 -0
- package/dist/ai/codexAppServer/schema/generated/v2/ItemCompletedNotification.d.ts.map +1 -1
- package/dist/ai/codexAppServer/schema/generated/v2/ItemGuardianApprovalReviewCompletedNotification.d.ts +8 -0
- package/dist/ai/codexAppServer/schema/generated/v2/ItemGuardianApprovalReviewCompletedNotification.d.ts.map +1 -1
- package/dist/ai/codexAppServer/schema/generated/v2/ItemGuardianApprovalReviewStartedNotification.d.ts +4 -0
- package/dist/ai/codexAppServer/schema/generated/v2/ItemGuardianApprovalReviewStartedNotification.d.ts.map +1 -1
- package/dist/ai/codexAppServer/schema/generated/v2/ItemStartedNotification.d.ts +4 -0
- package/dist/ai/codexAppServer/schema/generated/v2/ItemStartedNotification.d.ts.map +1 -1
- package/dist/ai/codexAppServer/schema/generated/v2/ListMcpServerStatusParams.d.ts +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/ListMcpServerStatusParams.d.ts.map +1 -1
- package/dist/ai/codexAppServer/schema/generated/v2/LoginAccountParams.d.ts +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/LoginAccountParams.d.ts.map +1 -1
- package/dist/ai/codexAppServer/schema/generated/v2/ManagedHooksRequirements.d.ts +4 -0
- package/dist/ai/codexAppServer/schema/generated/v2/ManagedHooksRequirements.d.ts.map +1 -1
- package/dist/ai/codexAppServer/schema/generated/v2/McpServerMigration.d.ts +4 -0
- package/dist/ai/codexAppServer/schema/generated/v2/McpServerMigration.d.ts.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/McpServerMigration.js +3 -0
- package/dist/ai/codexAppServer/schema/generated/v2/McpServerMigration.js.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/McpServerStatus.d.ts +2 -0
- package/dist/ai/codexAppServer/schema/generated/v2/McpServerStatus.d.ts.map +1 -1
- package/dist/ai/codexAppServer/schema/generated/v2/McpServerStatusUpdatedNotification.d.ts +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/McpServerStatusUpdatedNotification.d.ts.map +1 -1
- package/dist/ai/codexAppServer/schema/generated/v2/MigrationDetails.d.ts +10 -0
- package/dist/ai/codexAppServer/schema/generated/v2/MigrationDetails.d.ts.map +1 -1
- package/dist/ai/codexAppServer/schema/generated/v2/Model.d.ts +9 -0
- package/dist/ai/codexAppServer/schema/generated/v2/Model.d.ts.map +1 -1
- package/dist/ai/codexAppServer/schema/generated/v2/ModelProviderCapabilitiesReadParams.d.ts +2 -0
- package/dist/ai/codexAppServer/schema/generated/v2/ModelProviderCapabilitiesReadParams.d.ts.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/ModelProviderCapabilitiesReadParams.js +3 -0
- package/dist/ai/codexAppServer/schema/generated/v2/ModelProviderCapabilitiesReadParams.js.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/ModelProviderCapabilitiesReadResponse.d.ts +6 -0
- package/dist/ai/codexAppServer/schema/generated/v2/ModelProviderCapabilitiesReadResponse.d.ts.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/ModelProviderCapabilitiesReadResponse.js +3 -0
- package/dist/ai/codexAppServer/schema/generated/v2/ModelProviderCapabilitiesReadResponse.js.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/ModelServiceTier.d.ts +6 -0
- package/dist/ai/codexAppServer/schema/generated/v2/ModelServiceTier.d.ts.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/ModelServiceTier.js +3 -0
- package/dist/ai/codexAppServer/schema/generated/v2/ModelServiceTier.js.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/NetworkUnixSocketPermission.d.ts +1 -1
- package/dist/ai/codexAppServer/schema/generated/v2/PermissionProfileListParams.d.ts +15 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PermissionProfileListParams.d.ts.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PermissionProfileListParams.js +3 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PermissionProfileListParams.js.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PermissionProfileListResponse.d.ts +10 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PermissionProfileListResponse.d.ts.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PermissionProfileListResponse.js +3 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PermissionProfileListResponse.js.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PermissionProfileSummary.d.ts +11 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PermissionProfileSummary.d.ts.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PermissionProfileSummary.js +3 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PermissionProfileSummary.js.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PermissionsRequestApprovalParams.d.ts +5 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PermissionsRequestApprovalParams.d.ts.map +1 -1
- package/dist/ai/codexAppServer/schema/generated/v2/PluginAvailability.d.ts +2 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PluginAvailability.d.ts.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PluginAvailability.js +3 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PluginAvailability.js.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PluginDetail.d.ts +4 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PluginDetail.d.ts.map +1 -1
- package/dist/ai/codexAppServer/schema/generated/v2/PluginHookSummary.d.ts +6 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PluginHookSummary.d.ts.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PluginHookSummary.js +3 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PluginHookSummary.js.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PluginInstalledParams.d.ts +13 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PluginInstalledParams.d.ts.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PluginInstalledParams.js +3 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PluginInstalledParams.js.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PluginInstalledResponse.d.ts +7 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PluginInstalledResponse.d.ts.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PluginInstalledResponse.js +3 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PluginInstalledResponse.js.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PluginListMarketplaceKind.d.ts +2 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PluginListMarketplaceKind.d.ts.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PluginListMarketplaceKind.js +3 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PluginListMarketplaceKind.js.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PluginListParams.d.ts +6 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PluginListParams.d.ts.map +1 -1
- package/dist/ai/codexAppServer/schema/generated/v2/PluginShareCheckoutParams.d.ts +4 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PluginShareCheckoutParams.d.ts.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PluginShareCheckoutParams.js +3 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PluginShareCheckoutParams.js.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PluginShareCheckoutResponse.d.ts +11 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PluginShareCheckoutResponse.d.ts.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PluginShareCheckoutResponse.js +3 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PluginShareCheckoutResponse.js.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PluginShareContext.d.ts +15 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PluginShareContext.d.ts.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PluginShareContext.js +3 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PluginShareContext.js.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PluginShareDeleteParams.d.ts +4 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PluginShareDeleteParams.d.ts.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PluginShareDeleteParams.js +3 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PluginShareDeleteParams.js.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PluginShareDeleteResponse.d.ts +2 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PluginShareDeleteResponse.d.ts.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PluginShareDeleteResponse.js +3 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PluginShareDeleteResponse.js.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PluginShareDiscoverability.d.ts +2 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PluginShareDiscoverability.d.ts.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PluginShareDiscoverability.js +3 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PluginShareDiscoverability.js.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PluginShareListItem.d.ts +7 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PluginShareListItem.d.ts.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/{DeviceKeySignParams.js → PluginShareListItem.js} +1 -1
- package/dist/ai/codexAppServer/schema/generated/v2/PluginShareListItem.js.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PluginShareListParams.d.ts +2 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PluginShareListParams.d.ts.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PluginShareListParams.js +3 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PluginShareListParams.js.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PluginShareListResponse.d.ts +5 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PluginShareListResponse.d.ts.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PluginShareListResponse.js +3 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PluginShareListResponse.js.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PluginSharePrincipal.d.ts +9 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PluginSharePrincipal.d.ts.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PluginSharePrincipal.js +3 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PluginSharePrincipal.js.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PluginSharePrincipalRole.d.ts +2 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PluginSharePrincipalRole.d.ts.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PluginSharePrincipalRole.js +3 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PluginSharePrincipalRole.js.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PluginSharePrincipalType.d.ts +2 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PluginSharePrincipalType.d.ts.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PluginSharePrincipalType.js +3 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PluginSharePrincipalType.js.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PluginShareSaveParams.d.ts +10 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PluginShareSaveParams.d.ts.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PluginShareSaveParams.js +3 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PluginShareSaveParams.js.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PluginShareSaveResponse.d.ts +5 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PluginShareSaveResponse.d.ts.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PluginShareSaveResponse.js +3 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PluginShareSaveResponse.js.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PluginShareTarget.d.ts +8 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PluginShareTarget.d.ts.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PluginShareTarget.js +3 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PluginShareTarget.js.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PluginShareTargetRole.d.ts +2 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PluginShareTargetRole.d.ts.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PluginShareTargetRole.js +3 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PluginShareTargetRole.js.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PluginShareUpdateDiscoverability.d.ts +2 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PluginShareUpdateDiscoverability.d.ts.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PluginShareUpdateDiscoverability.js +3 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PluginShareUpdateDiscoverability.js.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PluginShareUpdateTargetsParams.d.ts +8 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PluginShareUpdateTargetsParams.d.ts.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PluginShareUpdateTargetsParams.js +3 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PluginShareUpdateTargetsParams.js.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PluginShareUpdateTargetsResponse.d.ts +7 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PluginShareUpdateTargetsResponse.d.ts.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PluginShareUpdateTargetsResponse.js +3 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PluginShareUpdateTargetsResponse.js.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PluginSkillReadParams.d.ts +6 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PluginSkillReadParams.d.ts.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PluginSkillReadParams.js +3 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PluginSkillReadParams.js.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PluginSkillReadResponse.d.ts +4 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PluginSkillReadResponse.d.ts.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PluginSkillReadResponse.js +3 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PluginSkillReadResponse.js.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PluginSummary.d.ts +19 -0
- package/dist/ai/codexAppServer/schema/generated/v2/PluginSummary.d.ts.map +1 -1
- package/dist/ai/codexAppServer/schema/generated/v2/ProcessExitedNotification.d.ts +40 -0
- package/dist/ai/codexAppServer/schema/generated/v2/ProcessExitedNotification.d.ts.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/ProcessExitedNotification.js +3 -0
- package/dist/ai/codexAppServer/schema/generated/v2/ProcessExitedNotification.js.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/ProcessOutputDeltaNotification.d.ts +24 -0
- package/dist/ai/codexAppServer/schema/generated/v2/ProcessOutputDeltaNotification.d.ts.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/ProcessOutputDeltaNotification.js +3 -0
- package/dist/ai/codexAppServer/schema/generated/v2/ProcessOutputDeltaNotification.js.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/ProcessOutputStream.d.ts +5 -0
- package/dist/ai/codexAppServer/schema/generated/v2/ProcessOutputStream.d.ts.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/ProcessOutputStream.js +3 -0
- package/dist/ai/codexAppServer/schema/generated/v2/ProcessOutputStream.js.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/ProcessTerminalSize.d.ts +14 -0
- package/dist/ai/codexAppServer/schema/generated/v2/ProcessTerminalSize.d.ts.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/ProcessTerminalSize.js +3 -0
- package/dist/ai/codexAppServer/schema/generated/v2/ProcessTerminalSize.js.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/RateLimitSnapshot.d.ts +2 -0
- package/dist/ai/codexAppServer/schema/generated/v2/RateLimitSnapshot.d.ts.map +1 -1
- package/dist/ai/codexAppServer/schema/generated/v2/RemoteControlConnectionStatus.d.ts +2 -0
- package/dist/ai/codexAppServer/schema/generated/v2/RemoteControlConnectionStatus.d.ts.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/RemoteControlConnectionStatus.js +3 -0
- package/dist/ai/codexAppServer/schema/generated/v2/RemoteControlConnectionStatus.js.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/RemoteControlStatusChangedNotification.d.ts +11 -0
- package/dist/ai/codexAppServer/schema/generated/v2/RemoteControlStatusChangedNotification.d.ts.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/RemoteControlStatusChangedNotification.js +3 -0
- package/dist/ai/codexAppServer/schema/generated/v2/RemoteControlStatusChangedNotification.js.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/SandboxPolicy.d.ts +0 -3
- package/dist/ai/codexAppServer/schema/generated/v2/SandboxPolicy.d.ts.map +1 -1
- package/dist/ai/codexAppServer/schema/generated/v2/SessionMigration.d.ts +6 -0
- package/dist/ai/codexAppServer/schema/generated/v2/SessionMigration.d.ts.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/SessionMigration.js +3 -0
- package/dist/ai/codexAppServer/schema/generated/v2/SessionMigration.js.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/SkillsExtraRootsSetParams.d.ts +5 -0
- package/dist/ai/codexAppServer/schema/generated/v2/SkillsExtraRootsSetParams.d.ts.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/SkillsExtraRootsSetParams.js +3 -0
- package/dist/ai/codexAppServer/schema/generated/v2/SkillsExtraRootsSetParams.js.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/SkillsExtraRootsSetResponse.d.ts +2 -0
- package/dist/ai/codexAppServer/schema/generated/v2/SkillsExtraRootsSetResponse.d.ts.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/SkillsExtraRootsSetResponse.js +3 -0
- package/dist/ai/codexAppServer/schema/generated/v2/SkillsExtraRootsSetResponse.js.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/SkillsListParams.d.ts +0 -5
- package/dist/ai/codexAppServer/schema/generated/v2/SkillsListParams.d.ts.map +1 -1
- package/dist/ai/codexAppServer/schema/generated/v2/SpendControlLimitSnapshot.d.ts +7 -0
- package/dist/ai/codexAppServer/schema/generated/v2/SpendControlLimitSnapshot.d.ts.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/SpendControlLimitSnapshot.js +3 -0
- package/dist/ai/codexAppServer/schema/generated/v2/SpendControlLimitSnapshot.js.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/SubagentMigration.d.ts +4 -0
- package/dist/ai/codexAppServer/schema/generated/v2/SubagentMigration.d.ts.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/SubagentMigration.js +3 -0
- package/dist/ai/codexAppServer/schema/generated/v2/SubagentMigration.js.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/Thread.d.ts +13 -0
- package/dist/ai/codexAppServer/schema/generated/v2/Thread.d.ts.map +1 -1
- package/dist/ai/codexAppServer/schema/generated/v2/ThreadForkParams.d.ts +7 -21
- package/dist/ai/codexAppServer/schema/generated/v2/ThreadForkParams.d.ts.map +1 -1
- package/dist/ai/codexAppServer/schema/generated/v2/ThreadForkResponse.d.ts +6 -16
- package/dist/ai/codexAppServer/schema/generated/v2/ThreadForkResponse.d.ts.map +1 -1
- package/dist/ai/codexAppServer/schema/generated/v2/ThreadGoal.d.ts +12 -0
- package/dist/ai/codexAppServer/schema/generated/v2/ThreadGoal.d.ts.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/{ServiceTier.js → v2/ThreadGoal.js} +1 -1
- package/dist/ai/codexAppServer/schema/generated/v2/ThreadGoal.js.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/ThreadGoalClearParams.d.ts +4 -0
- package/dist/ai/codexAppServer/schema/generated/v2/ThreadGoalClearParams.d.ts.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/ThreadGoalClearParams.js +3 -0
- package/dist/ai/codexAppServer/schema/generated/v2/ThreadGoalClearParams.js.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/ThreadGoalClearResponse.d.ts +4 -0
- package/dist/ai/codexAppServer/schema/generated/v2/ThreadGoalClearResponse.d.ts.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/ThreadGoalClearResponse.js +3 -0
- package/dist/ai/codexAppServer/schema/generated/v2/ThreadGoalClearResponse.js.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/ThreadGoalClearedNotification.d.ts +4 -0
- package/dist/ai/codexAppServer/schema/generated/v2/ThreadGoalClearedNotification.d.ts.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/ThreadGoalClearedNotification.js +3 -0
- package/dist/ai/codexAppServer/schema/generated/v2/ThreadGoalClearedNotification.js.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/ThreadGoalGetParams.d.ts +4 -0
- package/dist/ai/codexAppServer/schema/generated/v2/ThreadGoalGetParams.d.ts.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/ThreadGoalGetParams.js +3 -0
- package/dist/ai/codexAppServer/schema/generated/v2/ThreadGoalGetParams.js.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/ThreadGoalGetResponse.d.ts +5 -0
- package/dist/ai/codexAppServer/schema/generated/v2/ThreadGoalGetResponse.d.ts.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/ThreadGoalGetResponse.js +3 -0
- package/dist/ai/codexAppServer/schema/generated/v2/ThreadGoalGetResponse.js.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/ThreadGoalSetParams.d.ts +8 -0
- package/dist/ai/codexAppServer/schema/generated/v2/ThreadGoalSetParams.d.ts.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/ThreadGoalSetParams.js +3 -0
- package/dist/ai/codexAppServer/schema/generated/v2/ThreadGoalSetParams.js.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/ThreadGoalSetResponse.d.ts +5 -0
- package/dist/ai/codexAppServer/schema/generated/v2/ThreadGoalSetResponse.d.ts.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/ThreadGoalSetResponse.js +3 -0
- package/dist/ai/codexAppServer/schema/generated/v2/ThreadGoalSetResponse.js.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/ThreadGoalStatus.d.ts +2 -0
- package/dist/ai/codexAppServer/schema/generated/v2/ThreadGoalStatus.d.ts.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/ThreadGoalStatus.js +3 -0
- package/dist/ai/codexAppServer/schema/generated/v2/ThreadGoalStatus.js.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/ThreadGoalUpdatedNotification.d.ts +7 -0
- package/dist/ai/codexAppServer/schema/generated/v2/ThreadGoalUpdatedNotification.d.ts.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/ThreadGoalUpdatedNotification.js +3 -0
- package/dist/ai/codexAppServer/schema/generated/v2/ThreadGoalUpdatedNotification.js.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/ThreadItem.d.ts +2 -0
- package/dist/ai/codexAppServer/schema/generated/v2/ThreadItem.d.ts.map +1 -1
- package/dist/ai/codexAppServer/schema/generated/v2/ThreadReadParams.d.ts +1 -1
- package/dist/ai/codexAppServer/schema/generated/v2/ThreadReadParams.d.ts.map +1 -1
- package/dist/ai/codexAppServer/schema/generated/v2/ThreadRealtimeStartedNotification.d.ts +1 -1
- package/dist/ai/codexAppServer/schema/generated/v2/ThreadRealtimeStartedNotification.d.ts.map +1 -1
- package/dist/ai/codexAppServer/schema/generated/v2/ThreadResumeInitialTurnsPageParams.d.ts +17 -0
- package/dist/ai/codexAppServer/schema/generated/v2/ThreadResumeInitialTurnsPageParams.d.ts.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/ThreadResumeInitialTurnsPageParams.js +3 -0
- package/dist/ai/codexAppServer/schema/generated/v2/ThreadResumeInitialTurnsPageParams.js.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/ThreadResumeParams.d.ts +10 -30
- package/dist/ai/codexAppServer/schema/generated/v2/ThreadResumeParams.d.ts.map +1 -1
- package/dist/ai/codexAppServer/schema/generated/v2/ThreadResumeResponse.d.ts +6 -16
- package/dist/ai/codexAppServer/schema/generated/v2/ThreadResumeResponse.d.ts.map +1 -1
- package/dist/ai/codexAppServer/schema/generated/v2/ThreadSearchResult.d.ts +6 -0
- package/dist/ai/codexAppServer/schema/generated/v2/ThreadSearchResult.d.ts.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/ThreadSearchResult.js +3 -0
- package/dist/ai/codexAppServer/schema/generated/v2/ThreadSearchResult.js.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/ThreadSettings.d.ts +24 -0
- package/dist/ai/codexAppServer/schema/generated/v2/ThreadSettings.d.ts.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/ThreadSettings.js +3 -0
- package/dist/ai/codexAppServer/schema/generated/v2/ThreadSettings.js.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/ThreadSettingsUpdatedNotification.d.ts +6 -0
- package/dist/ai/codexAppServer/schema/generated/v2/ThreadSettingsUpdatedNotification.d.ts.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/ThreadSettingsUpdatedNotification.js +3 -0
- package/dist/ai/codexAppServer/schema/generated/v2/ThreadSettingsUpdatedNotification.js.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/ThreadSource.d.ts +2 -0
- package/dist/ai/codexAppServer/schema/generated/v2/ThreadSource.d.ts.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/ThreadSource.js +3 -0
- package/dist/ai/codexAppServer/schema/generated/v2/ThreadSource.js.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/ThreadStartParams.d.ts +5 -15
- package/dist/ai/codexAppServer/schema/generated/v2/ThreadStartParams.d.ts.map +1 -1
- package/dist/ai/codexAppServer/schema/generated/v2/ThreadStartResponse.d.ts +6 -16
- package/dist/ai/codexAppServer/schema/generated/v2/ThreadStartResponse.d.ts.map +1 -1
- package/dist/ai/codexAppServer/schema/generated/v2/ToolsV2.d.ts +0 -1
- package/dist/ai/codexAppServer/schema/generated/v2/ToolsV2.d.ts.map +1 -1
- package/dist/ai/codexAppServer/schema/generated/v2/Turn.d.ts +6 -3
- package/dist/ai/codexAppServer/schema/generated/v2/Turn.d.ts.map +1 -1
- package/dist/ai/codexAppServer/schema/generated/v2/TurnItemsView.d.ts +2 -0
- package/dist/ai/codexAppServer/schema/generated/v2/TurnItemsView.d.ts.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/TurnItemsView.js +3 -0
- package/dist/ai/codexAppServer/schema/generated/v2/TurnItemsView.js.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/TurnModerationMetadataNotification.d.ts +7 -0
- package/dist/ai/codexAppServer/schema/generated/v2/TurnModerationMetadataNotification.d.ts.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/TurnModerationMetadataNotification.js +3 -0
- package/dist/ai/codexAppServer/schema/generated/v2/TurnModerationMetadataNotification.js.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/TurnStartParams.d.ts +3 -16
- package/dist/ai/codexAppServer/schema/generated/v2/TurnStartParams.d.ts.map +1 -1
- package/dist/ai/codexAppServer/schema/generated/v2/TurnSteerParams.d.ts +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/TurnSteerParams.d.ts.map +1 -1
- package/dist/ai/codexAppServer/schema/generated/v2/TurnsPage.d.ts +7 -0
- package/dist/ai/codexAppServer/schema/generated/v2/TurnsPage.d.ts.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/{ProfileV2.js → TurnsPage.js} +1 -1
- package/dist/ai/codexAppServer/schema/generated/v2/TurnsPage.js.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/UserInput.d.ts +3 -0
- package/dist/ai/codexAppServer/schema/generated/v2/UserInput.d.ts.map +1 -1
- package/dist/ai/codexAppServer/schema/generated/v2/WindowsSandboxReadiness.d.ts +2 -0
- package/dist/ai/codexAppServer/schema/generated/v2/WindowsSandboxReadiness.d.ts.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/WindowsSandboxReadiness.js +3 -0
- package/dist/ai/codexAppServer/schema/generated/v2/WindowsSandboxReadiness.js.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/WindowsSandboxReadinessResponse.d.ts +5 -0
- package/dist/ai/codexAppServer/schema/generated/v2/WindowsSandboxReadinessResponse.d.ts.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/WindowsSandboxReadinessResponse.js +3 -0
- package/dist/ai/codexAppServer/schema/generated/v2/WindowsSandboxReadinessResponse.js.map +1 -0
- package/dist/ai/codexAppServer/schema/generated/v2/index.d.ts +84 -20
- package/dist/ai/codexAppServer/schema/generated/v2/index.d.ts.map +1 -1
- package/dist/ai/codexAppServer/serverRequestIds.d.ts +3 -0
- package/dist/ai/codexAppServer/serverRequestIds.d.ts.map +1 -0
- package/dist/ai/codexAppServer/serverRequestIds.js +6 -0
- package/dist/ai/codexAppServer/serverRequestIds.js.map +1 -0
- package/dist/ai/codexAppServer/version.d.ts +1 -1
- package/dist/ai/codexAppServer/version.js +1 -1
- package/dist/ai/codexMcpProvider.d.ts.map +1 -1
- package/dist/ai/codexMcpProvider.js +6 -0
- package/dist/ai/codexMcpProvider.js.map +1 -1
- package/dist/ai/codexQuota.js +1 -1
- package/dist/ai/codexQuota.js.map +1 -1
- package/dist/ai/provider.d.ts +29 -6
- package/dist/ai/provider.d.ts.map +1 -1
- package/dist/ai/provider.js.map +1 -1
- package/dist/ai/queuedUserPrompts.d.ts +6 -0
- package/dist/ai/queuedUserPrompts.d.ts.map +1 -1
- package/dist/ai/queuedUserPrompts.js +9 -0
- package/dist/ai/queuedUserPrompts.js.map +1 -1
- package/dist/ai/realtimeTranscription.d.ts +2 -0
- package/dist/ai/realtimeTranscription.d.ts.map +1 -1
- package/dist/ai/realtimeTranscription.js +14 -0
- package/dist/ai/realtimeTranscription.js.map +1 -1
- package/dist/ai/sessionManager.d.ts +13 -1
- package/dist/ai/sessionManager.d.ts.map +1 -1
- package/dist/ai/sessionManager.js +91 -23
- package/dist/ai/sessionManager.js.map +1 -1
- package/dist/ai/voiceIntermediary/historyStore.d.ts +54 -0
- package/dist/ai/voiceIntermediary/historyStore.d.ts.map +1 -0
- package/dist/ai/voiceIntermediary/historyStore.js +159 -0
- package/dist/ai/voiceIntermediary/historyStore.js.map +1 -0
- package/dist/ai/voiceIntermediary/index.d.ts +13 -0
- package/dist/ai/voiceIntermediary/index.d.ts.map +1 -0
- package/dist/ai/voiceIntermediary/index.js +13 -0
- package/dist/ai/voiceIntermediary/index.js.map +1 -0
- package/dist/ai/voiceIntermediary/llm.d.ts +52 -0
- package/dist/ai/voiceIntermediary/llm.d.ts.map +1 -0
- package/dist/ai/voiceIntermediary/llm.js +63 -0
- package/dist/ai/voiceIntermediary/llm.js.map +1 -0
- package/dist/ai/voiceIntermediary/manager.d.ts +58 -0
- package/dist/ai/voiceIntermediary/manager.d.ts.map +1 -0
- package/dist/ai/voiceIntermediary/manager.js +134 -0
- package/dist/ai/voiceIntermediary/manager.js.map +1 -0
- package/dist/ai/voiceIntermediary/memory.d.ts +22 -0
- package/dist/ai/voiceIntermediary/memory.d.ts.map +1 -0
- package/dist/ai/voiceIntermediary/memory.js +109 -0
- package/dist/ai/voiceIntermediary/memory.js.map +1 -0
- package/dist/ai/voiceIntermediary/session.d.ts +81 -0
- package/dist/ai/voiceIntermediary/session.d.ts.map +1 -0
- package/dist/ai/voiceIntermediary/session.js +567 -0
- package/dist/ai/voiceIntermediary/session.js.map +1 -0
- package/dist/ai/voiceIntermediary/tools.d.ts +58 -0
- package/dist/ai/voiceIntermediary/tools.d.ts.map +1 -0
- package/dist/ai/voiceIntermediary/tools.js +277 -0
- package/dist/ai/voiceIntermediary/tools.js.map +1 -0
- package/dist/ai/voiceIntermediary/tts.d.ts +28 -0
- package/dist/ai/voiceIntermediary/tts.d.ts.map +1 -0
- package/dist/ai/voiceIntermediary/tts.js +66 -0
- package/dist/ai/voiceIntermediary/tts.js.map +1 -0
- package/dist/ai/voiceLog.d.ts +18 -0
- package/dist/ai/voiceLog.d.ts.map +1 -0
- package/dist/ai/voiceLog.js +74 -0
- package/dist/ai/voiceLog.js.map +1 -0
- package/dist/ai/voiceStream.d.ts +5 -0
- package/dist/ai/voiceStream.d.ts.map +1 -1
- package/dist/ai/voiceStream.js +29 -5
- package/dist/ai/voiceStream.js.map +1 -1
- package/dist/handlers/legacyBusAdapter.d.ts.map +1 -1
- package/dist/handlers/legacyBusAdapter.js +8 -0
- package/dist/handlers/legacyBusAdapter.js.map +1 -1
- package/dist/handlers/messageHandler.d.ts +14 -0
- package/dist/handlers/messageHandler.d.ts.map +1 -1
- package/dist/handlers/messageHandler.js +151 -2
- package/dist/handlers/messageHandler.js.map +1 -1
- package/dist/index.js +2 -2
- package/dist/service/ipcClient.js +1 -1
- package/dist/service/run.d.ts.map +1 -1
- package/dist/service/run.js +14 -1
- package/dist/service/run.js.map +1 -1
- package/dist/service/types.js +1 -1
- package/dist/terminal/terminalManager.d.ts +1 -0
- package/dist/terminal/terminalManager.d.ts.map +1 -1
- package/dist/terminal/terminalManager.js +4 -0
- package/dist/terminal/terminalManager.js.map +1 -1
- package/package.json +3 -3
- package/dist/ai/codexAppServer/schema/generated/GhostCommit.d.ts +0 -10
- package/dist/ai/codexAppServer/schema/generated/GhostCommit.d.ts.map +0 -1
- package/dist/ai/codexAppServer/schema/generated/GhostCommit.js.map +0 -1
- package/dist/ai/codexAppServer/schema/generated/ServiceTier.d.ts +0 -2
- package/dist/ai/codexAppServer/schema/generated/ServiceTier.d.ts.map +0 -1
- package/dist/ai/codexAppServer/schema/generated/ServiceTier.js.map +0 -1
- package/dist/ai/codexAppServer/schema/generated/v2/DeviceKeyAlgorithm.d.ts +0 -5
- package/dist/ai/codexAppServer/schema/generated/v2/DeviceKeyAlgorithm.d.ts.map +0 -1
- package/dist/ai/codexAppServer/schema/generated/v2/DeviceKeyAlgorithm.js.map +0 -1
- package/dist/ai/codexAppServer/schema/generated/v2/DeviceKeyCreateParams.d.ts +0 -13
- package/dist/ai/codexAppServer/schema/generated/v2/DeviceKeyCreateParams.d.ts.map +0 -1
- package/dist/ai/codexAppServer/schema/generated/v2/DeviceKeyCreateParams.js.map +0 -1
- package/dist/ai/codexAppServer/schema/generated/v2/DeviceKeyCreateResponse.d.ts +0 -15
- package/dist/ai/codexAppServer/schema/generated/v2/DeviceKeyCreateResponse.d.ts.map +0 -1
- package/dist/ai/codexAppServer/schema/generated/v2/DeviceKeyCreateResponse.js +0 -3
- package/dist/ai/codexAppServer/schema/generated/v2/DeviceKeyCreateResponse.js.map +0 -1
- package/dist/ai/codexAppServer/schema/generated/v2/DeviceKeyProtectionClass.d.ts +0 -5
- package/dist/ai/codexAppServer/schema/generated/v2/DeviceKeyProtectionClass.d.ts.map +0 -1
- package/dist/ai/codexAppServer/schema/generated/v2/DeviceKeyProtectionClass.js +0 -3
- package/dist/ai/codexAppServer/schema/generated/v2/DeviceKeyProtectionClass.js.map +0 -1
- package/dist/ai/codexAppServer/schema/generated/v2/DeviceKeyProtectionPolicy.d.ts +0 -5
- package/dist/ai/codexAppServer/schema/generated/v2/DeviceKeyProtectionPolicy.d.ts.map +0 -1
- package/dist/ai/codexAppServer/schema/generated/v2/DeviceKeyProtectionPolicy.js +0 -3
- package/dist/ai/codexAppServer/schema/generated/v2/DeviceKeyProtectionPolicy.js.map +0 -1
- package/dist/ai/codexAppServer/schema/generated/v2/DeviceKeyPublicParams.d.ts +0 -7
- package/dist/ai/codexAppServer/schema/generated/v2/DeviceKeyPublicParams.d.ts.map +0 -1
- package/dist/ai/codexAppServer/schema/generated/v2/DeviceKeyPublicParams.js +0 -3
- package/dist/ai/codexAppServer/schema/generated/v2/DeviceKeyPublicParams.js.map +0 -1
- package/dist/ai/codexAppServer/schema/generated/v2/DeviceKeyPublicResponse.d.ts +0 -15
- package/dist/ai/codexAppServer/schema/generated/v2/DeviceKeyPublicResponse.d.ts.map +0 -1
- package/dist/ai/codexAppServer/schema/generated/v2/DeviceKeyPublicResponse.js +0 -3
- package/dist/ai/codexAppServer/schema/generated/v2/DeviceKeyPublicResponse.js.map +0 -1
- package/dist/ai/codexAppServer/schema/generated/v2/DeviceKeySignParams.d.ts +0 -9
- package/dist/ai/codexAppServer/schema/generated/v2/DeviceKeySignParams.d.ts.map +0 -1
- package/dist/ai/codexAppServer/schema/generated/v2/DeviceKeySignParams.js.map +0 -1
- package/dist/ai/codexAppServer/schema/generated/v2/DeviceKeySignPayload.d.ts +0 -63
- package/dist/ai/codexAppServer/schema/generated/v2/DeviceKeySignPayload.d.ts.map +0 -1
- package/dist/ai/codexAppServer/schema/generated/v2/DeviceKeySignPayload.js +0 -3
- package/dist/ai/codexAppServer/schema/generated/v2/DeviceKeySignPayload.js.map +0 -1
- package/dist/ai/codexAppServer/schema/generated/v2/DeviceKeySignResponse.d.ts +0 -17
- package/dist/ai/codexAppServer/schema/generated/v2/DeviceKeySignResponse.d.ts.map +0 -1
- package/dist/ai/codexAppServer/schema/generated/v2/DeviceKeySignResponse.js +0 -3
- package/dist/ai/codexAppServer/schema/generated/v2/DeviceKeySignResponse.js.map +0 -1
- package/dist/ai/codexAppServer/schema/generated/v2/PermissionProfile.d.ts +0 -13
- package/dist/ai/codexAppServer/schema/generated/v2/PermissionProfile.d.ts.map +0 -1
- package/dist/ai/codexAppServer/schema/generated/v2/PermissionProfile.js.map +0 -1
- package/dist/ai/codexAppServer/schema/generated/v2/PermissionProfileFileSystemPermissions.d.ts +0 -9
- package/dist/ai/codexAppServer/schema/generated/v2/PermissionProfileFileSystemPermissions.d.ts.map +0 -1
- package/dist/ai/codexAppServer/schema/generated/v2/PermissionProfileFileSystemPermissions.js +0 -3
- package/dist/ai/codexAppServer/schema/generated/v2/PermissionProfileFileSystemPermissions.js.map +0 -1
- package/dist/ai/codexAppServer/schema/generated/v2/PermissionProfileNetworkPermissions.d.ts +0 -4
- package/dist/ai/codexAppServer/schema/generated/v2/PermissionProfileNetworkPermissions.d.ts.map +0 -1
- package/dist/ai/codexAppServer/schema/generated/v2/PermissionProfileNetworkPermissions.js +0 -3
- package/dist/ai/codexAppServer/schema/generated/v2/PermissionProfileNetworkPermissions.js.map +0 -1
- package/dist/ai/codexAppServer/schema/generated/v2/ProfileV2.d.ts +0 -31
- package/dist/ai/codexAppServer/schema/generated/v2/ProfileV2.d.ts.map +0 -1
- package/dist/ai/codexAppServer/schema/generated/v2/ProfileV2.js.map +0 -1
- package/dist/ai/codexAppServer/schema/generated/v2/ReadOnlyAccess.d.ts +0 -9
- package/dist/ai/codexAppServer/schema/generated/v2/ReadOnlyAccess.d.ts.map +0 -1
- package/dist/ai/codexAppServer/schema/generated/v2/ReadOnlyAccess.js.map +0 -1
- package/dist/ai/codexAppServer/schema/generated/v2/RemoteControlClientConnectionAudience.d.ts +0 -5
- package/dist/ai/codexAppServer/schema/generated/v2/RemoteControlClientConnectionAudience.d.ts.map +0 -1
- package/dist/ai/codexAppServer/schema/generated/v2/RemoteControlClientConnectionAudience.js +0 -3
- package/dist/ai/codexAppServer/schema/generated/v2/RemoteControlClientConnectionAudience.js.map +0 -1
- package/dist/ai/codexAppServer/schema/generated/v2/RemoteControlClientEnrollmentAudience.d.ts +0 -5
- package/dist/ai/codexAppServer/schema/generated/v2/RemoteControlClientEnrollmentAudience.d.ts.map +0 -1
- package/dist/ai/codexAppServer/schema/generated/v2/RemoteControlClientEnrollmentAudience.js +0 -3
- package/dist/ai/codexAppServer/schema/generated/v2/RemoteControlClientEnrollmentAudience.js.map +0 -1
- package/dist/ai/codexAppServer/schema/generated/v2/SkillsListExtraRootsForCwd.d.ts +0 -5
- package/dist/ai/codexAppServer/schema/generated/v2/SkillsListExtraRootsForCwd.d.ts.map +0 -1
- package/dist/ai/codexAppServer/schema/generated/v2/SkillsListExtraRootsForCwd.js +0 -3
- package/dist/ai/codexAppServer/schema/generated/v2/SkillsListExtraRootsForCwd.js.map +0 -1
- package/dist/ai/codexAppServer/schema/generated/v2/ThreadTurnsListParams.d.ts +0 -17
- package/dist/ai/codexAppServer/schema/generated/v2/ThreadTurnsListParams.d.ts.map +0 -1
- package/dist/ai/codexAppServer/schema/generated/v2/ThreadTurnsListParams.js +0 -3
- package/dist/ai/codexAppServer/schema/generated/v2/ThreadTurnsListParams.js.map +0 -1
- package/dist/ai/codexAppServer/schema/generated/v2/ThreadTurnsListResponse.d.ts +0 -17
- package/dist/ai/codexAppServer/schema/generated/v2/ThreadTurnsListResponse.d.ts.map +0 -1
- package/dist/ai/codexAppServer/schema/generated/v2/ThreadTurnsListResponse.js +0 -3
- package/dist/ai/codexAppServer/schema/generated/v2/ThreadTurnsListResponse.js.map +0 -1
|
@@ -14,10 +14,11 @@
|
|
|
14
14
|
* See docs/plans/2026-05-25-claude-terminal-provider.md for the architecture
|
|
15
15
|
* rationale and probe results that justify per-message flush timing.
|
|
16
16
|
*/
|
|
17
|
+
import { execFileSync } from 'node:child_process';
|
|
17
18
|
import { existsSync, readdirSync, statSync } from 'node:fs';
|
|
18
|
-
import { dirname, join } from 'node:path';
|
|
19
|
+
import { basename, dirname, join } from 'node:path';
|
|
19
20
|
import { fileURLToPath } from 'node:url';
|
|
20
|
-
import { claudeProjectDir, jsonlPath } from '../cardBuilder.js';
|
|
21
|
+
import { claudeProjectDir, jsonlPath, localCommandDisplayText } from '../cardBuilder.js';
|
|
21
22
|
import { getTerminalManager } from '../../terminal/terminalManager.js';
|
|
22
23
|
import { getClaudeBin } from '../claudeCliProvider.js';
|
|
23
24
|
import { HookBridge } from './hookBridge.js';
|
|
@@ -33,19 +34,29 @@ const __ownDir = dirname(fileURLToPath(import.meta.url));
|
|
|
33
34
|
* the assistant message JSONL flush.
|
|
34
35
|
* - PostToolUse: fires immediately after the tool returns — same
|
|
35
36
|
* latency win for tool_result cards.
|
|
37
|
+
* - PostToolUseFailure: companion failure event on newer Claude Code builds;
|
|
38
|
+
* avoids losing failed tool_result cards if failures no
|
|
39
|
+
* longer arrive as PostToolUse + is_error.
|
|
36
40
|
* - PermissionRequest: fires before tool execution when the tool needs
|
|
37
41
|
* user confirmation. We bridge it to
|
|
38
42
|
* `ProviderCallbacks.handlePermissionRequest` so the
|
|
39
43
|
* PWA dialog (not the TUI's y/n) decides.
|
|
44
|
+
* - SessionStart: carries the authoritative session id / transcript
|
|
45
|
+
* path. New terminal sessions require this instead of
|
|
46
|
+
* typing the start payload into the TUI.
|
|
40
47
|
* - Stop: fires when the assistant turn completes — anchors
|
|
41
48
|
* the stream-end CardEvent that stops the spinner.
|
|
49
|
+
* - StopFailure: failed-turn companion for Stop.
|
|
42
50
|
*/
|
|
43
51
|
const ACTIVE_HOOKS = [
|
|
52
|
+
'SessionStart',
|
|
44
53
|
'UserPromptSubmit',
|
|
45
54
|
'PreToolUse',
|
|
46
55
|
'PostToolUse',
|
|
56
|
+
'PostToolUseFailure',
|
|
47
57
|
'PermissionRequest',
|
|
48
58
|
'Stop',
|
|
59
|
+
'StopFailure',
|
|
49
60
|
];
|
|
50
61
|
/**
|
|
51
62
|
* Delay before the FIRST attempt to type into a freshly spawned TUI. Claude
|
|
@@ -65,6 +76,14 @@ const PROMPT_RETRY_INTERVAL_MS = 2500;
|
|
|
65
76
|
const PROMPT_SUBMIT_GAP_MS = 150;
|
|
66
77
|
/** Overall ceiling for discovering / starting the session JSONL. */
|
|
67
78
|
const SESSION_DISCOVER_TIMEOUT_MS = 30_000;
|
|
79
|
+
/** New terminal sessions rely on SessionStart for the authoritative session id.
|
|
80
|
+
* We intentionally do not type the initial prompt to create a JSONL fallback:
|
|
81
|
+
* Claude may be sitting at a workspace trust prompt, and that prompt must stay
|
|
82
|
+
* visible in the terminal for the user to confirm manually. */
|
|
83
|
+
const SESSION_START_TIMEOUT_MS = 30_000;
|
|
84
|
+
/** Extra time we will wait while a workspace trust prompt is visibly blocking
|
|
85
|
+
* the TUI. We intentionally do not auto-confirm trust. */
|
|
86
|
+
const TRUST_PROMPT_MAX_PAUSE_MS = 120_000;
|
|
68
87
|
/**
|
|
69
88
|
* Pick the right interpreter + handler path so the hook command works whether
|
|
70
89
|
* the daemon runs from source (tsx, .ts file) or compiled output (node, .js).
|
|
@@ -90,6 +109,156 @@ export function resolveHookCommand() {
|
|
|
90
109
|
const tsxBin = join(__ownDir, '..', '..', '..', 'node_modules', '.bin', 'tsx');
|
|
91
110
|
return { interpreter: tsxBin, handlerPath: tsHandler };
|
|
92
111
|
}
|
|
112
|
+
class SessionStartLatch {
|
|
113
|
+
info = null;
|
|
114
|
+
waiters = [];
|
|
115
|
+
record(payload) {
|
|
116
|
+
const info = parseSessionStartInfo(payload);
|
|
117
|
+
if (!info)
|
|
118
|
+
return null;
|
|
119
|
+
this.info = info;
|
|
120
|
+
for (const waiter of this.waiters.splice(0))
|
|
121
|
+
waiter(info);
|
|
122
|
+
return info;
|
|
123
|
+
}
|
|
124
|
+
get() {
|
|
125
|
+
return this.info;
|
|
126
|
+
}
|
|
127
|
+
wait(timeoutMs) {
|
|
128
|
+
if (this.info)
|
|
129
|
+
return Promise.resolve(this.info);
|
|
130
|
+
return new Promise((resolve) => {
|
|
131
|
+
const timer = setTimeout(() => {
|
|
132
|
+
this.waiters = this.waiters.filter((w) => w !== done);
|
|
133
|
+
resolve(null);
|
|
134
|
+
}, timeoutMs);
|
|
135
|
+
const done = (info) => {
|
|
136
|
+
clearTimeout(timer);
|
|
137
|
+
resolve(info);
|
|
138
|
+
};
|
|
139
|
+
this.waiters.push(done);
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
function parseSessionStartInfo(payload) {
|
|
144
|
+
const directSessionId = typeof payload.session_id === 'string' ? payload.session_id : '';
|
|
145
|
+
const transcriptPath = typeof payload.transcript_path === 'string' ? payload.transcript_path : undefined;
|
|
146
|
+
const derivedSessionId = transcriptPath ? sessionIdFromTranscriptPath(transcriptPath) : '';
|
|
147
|
+
const sessionId = directSessionId || derivedSessionId;
|
|
148
|
+
if (!sessionId)
|
|
149
|
+
return null;
|
|
150
|
+
const model = typeof payload.model === 'string' ? payload.model : undefined;
|
|
151
|
+
return {
|
|
152
|
+
sessionId,
|
|
153
|
+
...(transcriptPath ? { transcriptPath } : {}),
|
|
154
|
+
...(model ? { model } : {}),
|
|
155
|
+
};
|
|
156
|
+
}
|
|
157
|
+
function sessionIdFromTranscriptPath(path) {
|
|
158
|
+
const file = basename(path);
|
|
159
|
+
return file.endsWith('.jsonl') ? file.slice(0, -'.jsonl'.length) : file;
|
|
160
|
+
}
|
|
161
|
+
function createTrustPromptMonitor(terminalId) {
|
|
162
|
+
const tm = getTerminalManager();
|
|
163
|
+
let seen = false;
|
|
164
|
+
let active = false;
|
|
165
|
+
const onOutput = (chunk) => {
|
|
166
|
+
if (chunk.terminalId !== terminalId || typeof chunk.chunk !== 'string')
|
|
167
|
+
return;
|
|
168
|
+
const text = normalizeTerminalText(chunk.chunk);
|
|
169
|
+
if (!text.trim())
|
|
170
|
+
return;
|
|
171
|
+
if (looksLikeWorkspaceTrustPrompt(text)) {
|
|
172
|
+
seen = true;
|
|
173
|
+
active = true;
|
|
174
|
+
return;
|
|
175
|
+
}
|
|
176
|
+
// Once trust was shown, any subsequent visible output means the user has
|
|
177
|
+
// interacted with the TUI. Do not auto-confirm; just resume prompt typing.
|
|
178
|
+
if (active)
|
|
179
|
+
active = false;
|
|
180
|
+
};
|
|
181
|
+
tm.on('output', onOutput);
|
|
182
|
+
return {
|
|
183
|
+
get seen() { return seen; },
|
|
184
|
+
shouldPause: () => active,
|
|
185
|
+
stop: () => tm.off('output', onOutput),
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
function normalizeTerminalText(value) {
|
|
189
|
+
return value
|
|
190
|
+
// ANSI CSI/control sequences.
|
|
191
|
+
.replace(/\x1b\[[0-?]*[ -/]*[@-~]/g, '')
|
|
192
|
+
// OSC sequences.
|
|
193
|
+
.replace(/\x1b\][^\x07]*(?:\x07|\x1b\\)/g, '')
|
|
194
|
+
.toLowerCase();
|
|
195
|
+
}
|
|
196
|
+
function looksLikeWorkspaceTrustPrompt(text) {
|
|
197
|
+
return (text.includes('trust this folder')
|
|
198
|
+
|| text.includes('do you trust')
|
|
199
|
+
|| (text.includes('workspace') && text.includes('trust'))
|
|
200
|
+
|| (text.includes('folder') && text.includes('trust') && text.includes('yes')));
|
|
201
|
+
}
|
|
202
|
+
function probeClaudeTerminalPreflight() {
|
|
203
|
+
const bin = getClaudeBin();
|
|
204
|
+
let version;
|
|
205
|
+
let help;
|
|
206
|
+
try {
|
|
207
|
+
version = execFileSync(bin, ['--version'], {
|
|
208
|
+
encoding: 'utf8',
|
|
209
|
+
timeout: 3_000,
|
|
210
|
+
stdio: ['ignore', 'pipe', 'pipe'],
|
|
211
|
+
}).trim() || undefined;
|
|
212
|
+
}
|
|
213
|
+
catch {
|
|
214
|
+
return {
|
|
215
|
+
bin,
|
|
216
|
+
hasCli: false,
|
|
217
|
+
supportsSettings: false,
|
|
218
|
+
supportsPermissionMode: false,
|
|
219
|
+
supportsResume: false,
|
|
220
|
+
supportsModel: false,
|
|
221
|
+
};
|
|
222
|
+
}
|
|
223
|
+
try {
|
|
224
|
+
help = execFileSync(bin, ['--help'], {
|
|
225
|
+
encoding: 'utf8',
|
|
226
|
+
timeout: 3_000,
|
|
227
|
+
stdio: ['ignore', 'pipe', 'pipe'],
|
|
228
|
+
});
|
|
229
|
+
}
|
|
230
|
+
catch {
|
|
231
|
+
help = '';
|
|
232
|
+
}
|
|
233
|
+
const hasFlag = (flag) => !!help && help.includes(flag);
|
|
234
|
+
return {
|
|
235
|
+
bin,
|
|
236
|
+
hasCli: true,
|
|
237
|
+
version,
|
|
238
|
+
help,
|
|
239
|
+
supportsSettings: hasFlag('--settings'),
|
|
240
|
+
supportsPermissionMode: hasFlag('--permission-mode'),
|
|
241
|
+
supportsResume: hasFlag('--resume'),
|
|
242
|
+
supportsModel: hasFlag('--model'),
|
|
243
|
+
};
|
|
244
|
+
}
|
|
245
|
+
function assertClaudeTerminalPreflight(preflight, opts) {
|
|
246
|
+
if (!preflight.hasCli) {
|
|
247
|
+
throw new Error('claude-terminal: Claude CLI was not found or `claude --version` failed');
|
|
248
|
+
}
|
|
249
|
+
const missing = [];
|
|
250
|
+
if (!preflight.supportsSettings)
|
|
251
|
+
missing.push('--settings');
|
|
252
|
+
if (opts.needsResume && !preflight.supportsResume)
|
|
253
|
+
missing.push('--resume');
|
|
254
|
+
if (opts.needsModel && !preflight.supportsModel)
|
|
255
|
+
missing.push('--model');
|
|
256
|
+
if (opts.needsPermissionMode && !preflight.supportsPermissionMode)
|
|
257
|
+
missing.push('--permission-mode');
|
|
258
|
+
if (missing.length > 0) {
|
|
259
|
+
throw new Error(`claude-terminal: Claude CLI ${preflight.version ?? ''} is missing required flag(s): ${missing.join(', ')}`);
|
|
260
|
+
}
|
|
261
|
+
}
|
|
93
262
|
// ============================================================================
|
|
94
263
|
// TerminalProviderSession — wraps a terminalManager terminal + hookBridge
|
|
95
264
|
// ============================================================================
|
|
@@ -160,6 +329,20 @@ export class ClaudeTerminalProvider {
|
|
|
160
329
|
id = 'claude-terminal';
|
|
161
330
|
historyMode = 'claude-jsonl';
|
|
162
331
|
label = 'Claude (Terminal)';
|
|
332
|
+
async probeProvider() {
|
|
333
|
+
const preflight = probeClaudeTerminalPreflight();
|
|
334
|
+
return {
|
|
335
|
+
version: preflight.version,
|
|
336
|
+
capabilities: {
|
|
337
|
+
hasApiKey: !!process.env.ANTHROPIC_API_KEY,
|
|
338
|
+
hasCli: preflight.hasCli,
|
|
339
|
+
hasPlugin: false,
|
|
340
|
+
supportsResume: preflight.supportsResume,
|
|
341
|
+
supportsSandbox: false,
|
|
342
|
+
supportsStreaming: true,
|
|
343
|
+
},
|
|
344
|
+
};
|
|
345
|
+
}
|
|
163
346
|
async startSession(opts, cardBuilder, callbacks) {
|
|
164
347
|
return this.spawn(opts, cardBuilder, callbacks, undefined);
|
|
165
348
|
}
|
|
@@ -167,9 +350,33 @@ export class ClaudeTerminalProvider {
|
|
|
167
350
|
return this.spawn(opts, cardBuilder, callbacks, opts.sessionId);
|
|
168
351
|
}
|
|
169
352
|
async spawn(opts, cardBuilder, callbacks, resumeSessionId) {
|
|
353
|
+
const preflight = probeClaudeTerminalPreflight();
|
|
354
|
+
assertClaudeTerminalPreflight(preflight, {
|
|
355
|
+
needsResume: !!resumeSessionId,
|
|
356
|
+
needsModel: !!opts.model,
|
|
357
|
+
needsPermissionMode: !!opts.permissionLevel && opts.permissionLevel !== 'default',
|
|
358
|
+
});
|
|
170
359
|
// 1. Hook bridge — start before we spawn claude so the socket exists.
|
|
171
360
|
const bridge = new HookBridge();
|
|
172
361
|
await bridge.start();
|
|
362
|
+
const sessionStart = new SessionStartLatch();
|
|
363
|
+
const earlyHookQueue = [];
|
|
364
|
+
let liveSession = null;
|
|
365
|
+
const unbindBridge = bridge.onRequest((req) => {
|
|
366
|
+
if (req.event === 'SessionStart') {
|
|
367
|
+
const info = sessionStart.record(req.payload);
|
|
368
|
+
if (info?.model)
|
|
369
|
+
callbacks.onModelDetected(info.model);
|
|
370
|
+
req.respond(null);
|
|
371
|
+
return;
|
|
372
|
+
}
|
|
373
|
+
if (liveSession) {
|
|
374
|
+
this.handleHookRequest(req, liveSession, cardBuilder, callbacks);
|
|
375
|
+
}
|
|
376
|
+
else {
|
|
377
|
+
earlyHookQueue.push(req);
|
|
378
|
+
}
|
|
379
|
+
});
|
|
173
380
|
// 2. Settings JSON with our hooks.
|
|
174
381
|
const { interpreter, handlerPath } = resolveHookCommand();
|
|
175
382
|
const settings = buildHookSettings({
|
|
@@ -180,7 +387,7 @@ export class ClaudeTerminalProvider {
|
|
|
180
387
|
});
|
|
181
388
|
// 3. Build claude argv. TUI mode = no -p, no --input-format.
|
|
182
389
|
const args = [];
|
|
183
|
-
if (opts.model)
|
|
390
|
+
if (opts.model && preflight.supportsModel)
|
|
184
391
|
args.push('--model', opts.model);
|
|
185
392
|
args.push('--settings', JSON.stringify(settings));
|
|
186
393
|
// Forward the user's permission preset. `bypassPermissions` skips the TUI
|
|
@@ -188,10 +395,10 @@ export class ClaudeTerminalProvider {
|
|
|
188
395
|
// wants when they pick it. For `acceptEdits` / `plan` / `auto` we pass
|
|
189
396
|
// through directly; claude TUI honors them. For `default` we omit the
|
|
190
397
|
// flag and let claude use its built-in default.
|
|
191
|
-
if (opts.permissionLevel && opts.permissionLevel !== 'default') {
|
|
398
|
+
if (opts.permissionLevel && opts.permissionLevel !== 'default' && preflight.supportsPermissionMode) {
|
|
192
399
|
args.push('--permission-mode', opts.permissionLevel);
|
|
193
400
|
}
|
|
194
|
-
if (resumeSessionId)
|
|
401
|
+
if (resumeSessionId && preflight.supportsResume)
|
|
195
402
|
args.push('--resume', resumeSessionId);
|
|
196
403
|
// 4. Snapshot existing JSONLs so we can detect the new one.
|
|
197
404
|
const projectDir = claudeProjectDir(opts.cwd);
|
|
@@ -208,40 +415,30 @@ export class ClaudeTerminalProvider {
|
|
|
208
415
|
// 5. Spawn claude inside a terminalManager terminal.
|
|
209
416
|
const term = await getTerminalManager().create({
|
|
210
417
|
cwd: opts.cwd,
|
|
211
|
-
shell:
|
|
418
|
+
shell: preflight.bin,
|
|
212
419
|
args,
|
|
420
|
+
env: {
|
|
421
|
+
CLAUDE_CODE_NO_FLICKER: '1',
|
|
422
|
+
},
|
|
213
423
|
cols: 120,
|
|
214
424
|
rows: 30,
|
|
215
425
|
title: `Claude ${resumeSessionId ? '↻' : '✨'} ${opts.cwd.split('/').pop() ?? ''}`,
|
|
216
426
|
});
|
|
217
|
-
|
|
218
|
-
//
|
|
219
|
-
//
|
|
220
|
-
//
|
|
221
|
-
//
|
|
222
|
-
//
|
|
223
|
-
// For resume, the file already exists and `--resume <sid>` makes
|
|
224
|
-
// claude touch it on startup, so we can poll immediately.
|
|
427
|
+
const trustPrompt = createTrustPromptMonitor(term.terminalId);
|
|
428
|
+
// 6. Obtain the session id. New terminal sessions require the SessionStart
|
|
429
|
+
// hook; we deliberately do NOT inject the user's initial prompt to force
|
|
430
|
+
// JSONL creation, because that can be swallowed by Claude's workspace
|
|
431
|
+
// trust prompt. For resume, the JSONL already exists and `--resume <sid>`
|
|
432
|
+
// makes claude touch it on startup, so we can poll immediately.
|
|
225
433
|
// 7. Obtain the session JSONL / sessionId.
|
|
226
434
|
let sessionId;
|
|
227
435
|
try {
|
|
228
|
-
if (!resumeSessionId
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
// timeout seen in the field). So drive on the RESULT instead of a fixed
|
|
235
|
-
// delay: type the prompt, wait briefly for the JSONL to appear, and
|
|
236
|
-
// re-type if it didn't — the new JSONL is proof the prompt landed.
|
|
237
|
-
const prompt = opts.prompt;
|
|
238
|
-
sessionId = await sendPromptUntilAccepted({
|
|
239
|
-
send: () => this.typePrompt(term.terminalId, prompt),
|
|
240
|
-
probe: () => this.scanForNewJsonl(projectDir, beforeJsonls, undefined),
|
|
241
|
-
timeoutMs: SESSION_DISCOVER_TIMEOUT_MS,
|
|
242
|
-
initialDelayMs: TUI_INITIAL_DELAY_MS,
|
|
243
|
-
retryIntervalMs: PROMPT_RETRY_INTERVAL_MS,
|
|
244
|
-
});
|
|
436
|
+
if (!resumeSessionId) {
|
|
437
|
+
const startInfo = await sessionStart.wait(SESSION_START_TIMEOUT_MS);
|
|
438
|
+
if (!startInfo?.sessionId) {
|
|
439
|
+
throw new Error('claude-terminal: SessionStart hook did not fire; update Claude Code or use the non-terminal provider');
|
|
440
|
+
}
|
|
441
|
+
sessionId = startInfo.sessionId;
|
|
245
442
|
}
|
|
246
443
|
else {
|
|
247
444
|
// Resume: the JSONL already exists (claude touches it on `--resume`),
|
|
@@ -252,6 +449,8 @@ export class ClaudeTerminalProvider {
|
|
|
252
449
|
}
|
|
253
450
|
catch (err) {
|
|
254
451
|
// Don't leak the spawned PTY + socket if we never got a sessionId.
|
|
452
|
+
for (const req of earlyHookQueue.splice(0))
|
|
453
|
+
req.respond(null);
|
|
255
454
|
try {
|
|
256
455
|
getTerminalManager().close(term.terminalId, true);
|
|
257
456
|
}
|
|
@@ -260,11 +459,16 @@ export class ClaudeTerminalProvider {
|
|
|
260
459
|
await bridge.stop();
|
|
261
460
|
}
|
|
262
461
|
catch { /* */ }
|
|
462
|
+
trustPrompt.stop();
|
|
463
|
+
unbindBridge();
|
|
263
464
|
throw err;
|
|
264
465
|
}
|
|
265
466
|
cardBuilder.updateSessionId(sessionId);
|
|
266
467
|
// 8. Start tailing the JSONL.
|
|
267
|
-
const
|
|
468
|
+
const transcriptPath = sessionStart.get()?.sessionId === sessionId && sessionStart.get()?.transcriptPath
|
|
469
|
+
? sessionStart.get().transcriptPath
|
|
470
|
+
: jsonlPath(sessionId, opts.cwd);
|
|
471
|
+
const tail = new JsonlTail(transcriptPath);
|
|
268
472
|
tail.start(50);
|
|
269
473
|
const synth = new CardSynth({
|
|
270
474
|
cardBuilder,
|
|
@@ -277,12 +481,17 @@ export class ClaudeTerminalProvider {
|
|
|
277
481
|
tail,
|
|
278
482
|
synth,
|
|
279
483
|
});
|
|
280
|
-
|
|
281
|
-
|
|
484
|
+
liveSession = session;
|
|
485
|
+
// 9. Flush hook events that arrived before the session object existed.
|
|
486
|
+
for (const req of earlyHookQueue.splice(0)) {
|
|
487
|
+
this.handleHookRequest(req, session, cardBuilder, callbacks);
|
|
488
|
+
}
|
|
282
489
|
// 10. Wire JSONL messages → cardBuilder.
|
|
283
490
|
tail.on('message', (msg) => this.handleJsonlMessage(msg, session, cardBuilder, callbacks));
|
|
284
491
|
// 11. Resume path: inject the follow-up prompt now that the session is
|
|
285
|
-
// wired.
|
|
492
|
+
// wired. New sessions intentionally ignore the start payload's prompt;
|
|
493
|
+
// the user drives the first input directly in the TUI after clearing
|
|
494
|
+
// any Claude trust/login prompt.
|
|
286
495
|
//
|
|
287
496
|
// Unlike the new-session path, discoverSessionId returns almost
|
|
288
497
|
// immediately on resume — `--resume <sid>` makes claude touch the
|
|
@@ -292,7 +501,17 @@ export class ClaudeTerminalProvider {
|
|
|
292
501
|
// and re-type if needed. Runs in the background: we already have the
|
|
293
502
|
// sessionId, so callers must not block on acceptance.
|
|
294
503
|
if (resumeSessionId && opts.prompt) {
|
|
295
|
-
void this.injectResumePrompt(session, tail.path, opts.prompt);
|
|
504
|
+
void this.injectResumePrompt(session, tail.path, opts.prompt, trustPrompt);
|
|
505
|
+
}
|
|
506
|
+
else {
|
|
507
|
+
trustPrompt.stop();
|
|
508
|
+
// SessionManager marks a newly-created session as streaming after the
|
|
509
|
+
// provider returns. Since terminal start no longer sends a prompt, flip
|
|
510
|
+
// it back to idle on the next macrotask after registration completes.
|
|
511
|
+
setTimeout(() => {
|
|
512
|
+
if (session.alive)
|
|
513
|
+
callbacks.emitStreamEnd({ sessionId: session.sessionId, success: true });
|
|
514
|
+
}, 0);
|
|
296
515
|
}
|
|
297
516
|
return { sessionId, session };
|
|
298
517
|
}
|
|
@@ -345,38 +564,55 @@ export class ClaudeTerminalProvider {
|
|
|
345
564
|
* a result signal — the existing JSONL growing past its pre-prompt size — and
|
|
346
565
|
* re-types if the TUI ate the keystrokes before it was ready.
|
|
347
566
|
*/
|
|
348
|
-
async injectResumePrompt(session, jsonlFilePath, prompt) {
|
|
349
|
-
let baseline = null;
|
|
567
|
+
async injectResumePrompt(session, jsonlFilePath, prompt, trustPrompt) {
|
|
350
568
|
try {
|
|
351
|
-
await
|
|
352
|
-
send: () => this.typePrompt(session.terminalId, prompt),
|
|
353
|
-
probe: () => {
|
|
354
|
-
let size;
|
|
355
|
-
try {
|
|
356
|
-
size = statSync(jsonlFilePath).size;
|
|
357
|
-
}
|
|
358
|
-
catch {
|
|
359
|
-
return null;
|
|
360
|
-
}
|
|
361
|
-
// First probe (after initialDelay) anchors the baseline so claude's
|
|
362
|
-
// own resume-startup writes aren't mistaken for our prompt landing.
|
|
363
|
-
if (baseline === null) {
|
|
364
|
-
baseline = size;
|
|
365
|
-
return null;
|
|
366
|
-
}
|
|
367
|
-
return size > baseline ? String(size) : null;
|
|
368
|
-
},
|
|
369
|
-
abort: () => !session.alive,
|
|
370
|
-
timeoutMs: SESSION_DISCOVER_TIMEOUT_MS,
|
|
371
|
-
initialDelayMs: TUI_INITIAL_DELAY_MS,
|
|
372
|
-
retryIntervalMs: PROMPT_RETRY_INTERVAL_MS,
|
|
373
|
-
});
|
|
569
|
+
await this.injectPromptUntilTranscriptChanges(session, jsonlFilePath, prompt, trustPrompt);
|
|
374
570
|
}
|
|
375
571
|
catch (err) {
|
|
376
572
|
if (session.alive) {
|
|
377
573
|
console.error('[claude-terminal] resume prompt injection failed:', err);
|
|
378
574
|
}
|
|
379
575
|
}
|
|
576
|
+
finally {
|
|
577
|
+
trustPrompt?.stop();
|
|
578
|
+
}
|
|
579
|
+
}
|
|
580
|
+
/**
|
|
581
|
+
* Type a prompt into an already-known session and keep re-typing until the
|
|
582
|
+
* transcript exists / grows. Used for resume and for new sessions where the
|
|
583
|
+
* SessionStart hook gave us the session id before any JSONL line existed.
|
|
584
|
+
*/
|
|
585
|
+
async injectPromptUntilTranscriptChanges(session, jsonlFilePath, prompt, trustPrompt) {
|
|
586
|
+
let baseline = null;
|
|
587
|
+
await sendPromptUntilAccepted({
|
|
588
|
+
send: () => this.typePrompt(session.terminalId, prompt),
|
|
589
|
+
probe: () => {
|
|
590
|
+
let size;
|
|
591
|
+
try {
|
|
592
|
+
size = statSync(jsonlFilePath).size;
|
|
593
|
+
}
|
|
594
|
+
catch {
|
|
595
|
+
if (baseline === null)
|
|
596
|
+
baseline = 0;
|
|
597
|
+
return null;
|
|
598
|
+
}
|
|
599
|
+
// First probe (after initialDelay) anchors the baseline so claude's
|
|
600
|
+
// own resume/startup writes aren't mistaken for our prompt landing.
|
|
601
|
+
if (baseline === null) {
|
|
602
|
+
baseline = size;
|
|
603
|
+
return null;
|
|
604
|
+
}
|
|
605
|
+
return size > baseline ? String(size) : null;
|
|
606
|
+
},
|
|
607
|
+
abort: () => !session.alive,
|
|
608
|
+
pauseWhile: () => trustPrompt?.shouldPause()
|
|
609
|
+
? 'claude-terminal: workspace trust prompt is waiting for user confirmation in the terminal'
|
|
610
|
+
: null,
|
|
611
|
+
maxPauseMs: TRUST_PROMPT_MAX_PAUSE_MS,
|
|
612
|
+
timeoutMs: SESSION_DISCOVER_TIMEOUT_MS,
|
|
613
|
+
initialDelayMs: TUI_INITIAL_DELAY_MS,
|
|
614
|
+
retryIntervalMs: PROMPT_RETRY_INTERVAL_MS,
|
|
615
|
+
});
|
|
380
616
|
}
|
|
381
617
|
/**
|
|
382
618
|
* After spawn, watch the project dir for a fresh .jsonl that's not in
|
|
@@ -424,6 +660,16 @@ export class ClaudeTerminalProvider {
|
|
|
424
660
|
req.respond(null);
|
|
425
661
|
return;
|
|
426
662
|
}
|
|
663
|
+
case 'PostToolUseFailure': {
|
|
664
|
+
const p = req.payload;
|
|
665
|
+
const tool_use_id = typeof p.tool_use_id === 'string' ? p.tool_use_id : '';
|
|
666
|
+
if (tool_use_id) {
|
|
667
|
+
const content = CardSynth.stringifyHookToolResponse(p.error ?? p.tool_response);
|
|
668
|
+
session.synth.emitToolResult(tool_use_id, content, true);
|
|
669
|
+
}
|
|
670
|
+
req.respond(null);
|
|
671
|
+
return;
|
|
672
|
+
}
|
|
427
673
|
case 'PermissionRequest': {
|
|
428
674
|
// ASYNC — listener returns immediately; respond is called from the
|
|
429
675
|
// PWA dialog promise resolution. HookBridge has a fallback timer
|
|
@@ -471,6 +717,29 @@ export class ClaudeTerminalProvider {
|
|
|
471
717
|
req.respond(null);
|
|
472
718
|
return;
|
|
473
719
|
}
|
|
720
|
+
case 'StopFailure': {
|
|
721
|
+
const p = req.payload;
|
|
722
|
+
const message = typeof p.error_message === 'string'
|
|
723
|
+
? p.error_message
|
|
724
|
+
: typeof p.error === 'string'
|
|
725
|
+
? p.error
|
|
726
|
+
: typeof p.error_type === 'string'
|
|
727
|
+
? p.error_type
|
|
728
|
+
: 'Claude turn failed';
|
|
729
|
+
const streamEnd = {
|
|
730
|
+
sessionId: session.sessionId,
|
|
731
|
+
success: false,
|
|
732
|
+
error: message,
|
|
733
|
+
};
|
|
734
|
+
callbacks.emitStreamEnd(streamEnd);
|
|
735
|
+
void cardBuilder.scheduleDeferredClear();
|
|
736
|
+
req.respond(null);
|
|
737
|
+
return;
|
|
738
|
+
}
|
|
739
|
+
case 'SessionStart': {
|
|
740
|
+
req.respond(null);
|
|
741
|
+
return;
|
|
742
|
+
}
|
|
474
743
|
default:
|
|
475
744
|
req.respond(null);
|
|
476
745
|
}
|
|
@@ -497,12 +766,18 @@ export class ClaudeTerminalProvider {
|
|
|
497
766
|
if (msg.type === 'user' && msg.message?.content) {
|
|
498
767
|
const content = msg.message.content;
|
|
499
768
|
if (typeof content === 'string' && content) {
|
|
500
|
-
|
|
769
|
+
const localCommandText = localCommandDisplayText(content);
|
|
770
|
+
callbacks.emitCardEvent(localCommandText
|
|
771
|
+
? cardBuilder.systemMessage(localCommandText, 'info')
|
|
772
|
+
: cardBuilder.userMessage(content));
|
|
501
773
|
}
|
|
502
774
|
else if (Array.isArray(content)) {
|
|
503
775
|
for (const block of content) {
|
|
504
776
|
if (block.type === 'text' && typeof block.text === 'string' && block.text) {
|
|
505
|
-
|
|
777
|
+
const localCommandText = localCommandDisplayText(block.text);
|
|
778
|
+
callbacks.emitCardEvent(localCommandText
|
|
779
|
+
? cardBuilder.systemMessage(localCommandText, 'info')
|
|
780
|
+
: cardBuilder.userMessage(block.text));
|
|
506
781
|
}
|
|
507
782
|
else if (block.type === 'tool_result' && typeof block.tool_use_id === 'string') {
|
|
508
783
|
const text = CardSynth.stringifyHookToolResponse(block.content);
|
|
@@ -548,6 +823,8 @@ export async function sendPromptUntilAccepted(opts) {
|
|
|
548
823
|
const initialDelayMs = opts.initialDelayMs ?? 0;
|
|
549
824
|
const retryIntervalMs = opts.retryIntervalMs ?? 2500;
|
|
550
825
|
const pollIntervalMs = opts.pollIntervalMs ?? 100;
|
|
826
|
+
const maxPauseMs = opts.maxPauseMs ?? 0;
|
|
827
|
+
let pausedMs = 0;
|
|
551
828
|
const napMs = opts.sleep ?? sleep;
|
|
552
829
|
const clock = opts.now ?? Date.now;
|
|
553
830
|
const checkAbort = () => {
|
|
@@ -557,17 +834,33 @@ export async function sendPromptUntilAccepted(opts) {
|
|
|
557
834
|
const deadline = clock() + opts.timeoutMs;
|
|
558
835
|
if (initialDelayMs > 0)
|
|
559
836
|
await napMs(initialDelayMs);
|
|
560
|
-
|
|
837
|
+
const pauseIfNeeded = async () => {
|
|
838
|
+
const pauseReason = opts.pauseWhile?.();
|
|
839
|
+
if (!pauseReason)
|
|
840
|
+
return false;
|
|
841
|
+
if (pausedMs >= maxPauseMs) {
|
|
842
|
+
throw new Error(pauseReason);
|
|
843
|
+
}
|
|
844
|
+
const pauseStep = Math.min(pollIntervalMs, maxPauseMs - pausedMs);
|
|
845
|
+
pausedMs += pauseStep;
|
|
846
|
+
await napMs(pauseStep);
|
|
847
|
+
return true;
|
|
848
|
+
};
|
|
849
|
+
while (clock() < deadline + pausedMs) {
|
|
561
850
|
checkAbort();
|
|
851
|
+
if (await pauseIfNeeded())
|
|
852
|
+
continue;
|
|
562
853
|
// Pre-check: on resume the prompt may already have landed from a prior
|
|
563
854
|
// attempt; avoid an unnecessary duplicate send.
|
|
564
855
|
const already = opts.probe();
|
|
565
856
|
if (already !== null)
|
|
566
857
|
return already;
|
|
567
858
|
await opts.send();
|
|
568
|
-
const windowEnd = Math.min(deadline, clock() + retryIntervalMs);
|
|
859
|
+
const windowEnd = Math.min(deadline + pausedMs, clock() + retryIntervalMs);
|
|
569
860
|
while (clock() < windowEnd) {
|
|
570
861
|
checkAbort();
|
|
862
|
+
if (await pauseIfNeeded())
|
|
863
|
+
continue;
|
|
571
864
|
const token = opts.probe();
|
|
572
865
|
if (token !== null)
|
|
573
866
|
return token;
|