@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
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2026 King Young Technology
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
export class VoiceLlmError extends Error {
|
|
4
|
+
cause;
|
|
5
|
+
constructor(message, cause) {
|
|
6
|
+
super(message);
|
|
7
|
+
this.cause = cause;
|
|
8
|
+
this.name = 'VoiceLlmError';
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
function apiUrl(baseUrl, path) {
|
|
12
|
+
return `${baseUrl.trim().replace(/\/+$/, '')}${path}`;
|
|
13
|
+
}
|
|
14
|
+
function authHeaders(config) {
|
|
15
|
+
const headers = { 'Content-Type': 'application/json' };
|
|
16
|
+
if (config.apiKey.trim())
|
|
17
|
+
headers.Authorization = `Bearer ${config.apiKey.trim()}`;
|
|
18
|
+
return headers;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* One chat-completions round. Returns the assistant's spoken text plus any tool
|
|
22
|
+
* calls it wants run. The caller drives the tool loop.
|
|
23
|
+
*/
|
|
24
|
+
export async function chatCompletion(config, opts) {
|
|
25
|
+
const model = config.agentModel?.trim();
|
|
26
|
+
if (!model)
|
|
27
|
+
throw new VoiceLlmError('No agentModel configured for the voice intermediary.');
|
|
28
|
+
const doFetch = opts.fetchImpl ?? fetch;
|
|
29
|
+
let res;
|
|
30
|
+
try {
|
|
31
|
+
res = await doFetch(apiUrl(config.baseUrl, '/chat/completions'), {
|
|
32
|
+
method: 'POST',
|
|
33
|
+
headers: authHeaders(config),
|
|
34
|
+
body: JSON.stringify({
|
|
35
|
+
model,
|
|
36
|
+
messages: opts.messages,
|
|
37
|
+
tools: opts.tools,
|
|
38
|
+
tool_choice: 'auto',
|
|
39
|
+
}),
|
|
40
|
+
signal: opts.signal,
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
catch (err) {
|
|
44
|
+
throw new VoiceLlmError('Could not reach the chat-completions endpoint.', err);
|
|
45
|
+
}
|
|
46
|
+
if (!res.ok) {
|
|
47
|
+
const detail = await res.text().catch(() => '');
|
|
48
|
+
throw new VoiceLlmError(`Chat completion failed (${res.status})${detail ? `: ${detail.slice(0, 200)}` : ''}`);
|
|
49
|
+
}
|
|
50
|
+
let data;
|
|
51
|
+
try {
|
|
52
|
+
data = await res.json();
|
|
53
|
+
}
|
|
54
|
+
catch (err) {
|
|
55
|
+
throw new VoiceLlmError('Chat-completions response was not valid JSON.', err);
|
|
56
|
+
}
|
|
57
|
+
const message = data?.choices?.[0]?.message;
|
|
58
|
+
return {
|
|
59
|
+
content: (message?.content ?? '').trim(),
|
|
60
|
+
toolCalls: Array.isArray(message?.tool_calls) ? message.tool_calls : [],
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
//# sourceMappingURL=llm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"llm.js","sourceRoot":"","sources":["../../../src/ai/voiceIntermediary/llm.ts"],"names":[],"mappings":"AAAA,qDAAqD;AACrD,+BAA+B;AAuC/B,MAAM,OAAO,aAAc,SAAQ,KAAK;IACA;IAAtC,YAAY,OAAe,EAAW,KAAe;QACnD,KAAK,CAAC,OAAO,CAAC,CAAC;QADqB,UAAK,GAAL,KAAK,CAAU;QAEnD,IAAI,CAAC,IAAI,GAAG,eAAe,CAAC;IAC9B,CAAC;CACF;AAED,SAAS,MAAM,CAAC,OAAe,EAAE,IAAY;IAC3C,OAAO,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC;AACxD,CAAC;AAED,SAAS,WAAW,CAAC,MAAmB;IACtC,MAAM,OAAO,GAA2B,EAAE,cAAc,EAAE,kBAAkB,EAAE,CAAC;IAC/E,IAAI,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE;QAAE,OAAO,CAAC,aAAa,GAAG,UAAU,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,EAAE,CAAC;IACnF,OAAO,OAAO,CAAC;AACjB,CAAC;AAKD;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,cAAc,CAClC,MAAmB,EACnB,IAKC;IAED,MAAM,KAAK,GAAG,MAAM,CAAC,UAAU,EAAE,IAAI,EAAE,CAAC;IACxC,IAAI,CAAC,KAAK;QAAE,MAAM,IAAI,aAAa,CAAC,sDAAsD,CAAC,CAAC;IAE5F,MAAM,OAAO,GAAG,IAAI,CAAC,SAAS,IAAI,KAAK,CAAC;IACxC,IAAI,GAAa,CAAC;IAClB,IAAI,CAAC;QACH,GAAG,GAAG,MAAM,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,m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C,CAAC,CAAC,OAAQ,CAAC,UAAW,CAAC,CAAC,CAAC,EAAE;KAC1E,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Owns the per-session voice intermediaries and bridges them to the rest of the
|
|
3
|
+
* daemon. Emits a single `'event'` (sessionId, VoiceAgentEvent) that `run.ts`
|
|
4
|
+
* republishes on `/sessions/:sessionId/voice-agent`. Holds synthesized audio in
|
|
5
|
+
* a small LRU so the PWA can fetch bytes by id (metadata-first delivery).
|
|
6
|
+
*/
|
|
7
|
+
import { EventEmitter } from 'events';
|
|
8
|
+
import type { CardEvent, CardStreamEnd, ClaudeUserInputRequestPayload, VoiceAgentPlaybackEventRequestPayload, VoiceConfig } from '@sumicom/quicksave-shared';
|
|
9
|
+
import type { FetchLike } from './llm.js';
|
|
10
|
+
import type { CodingSessionBridge } from './tools.js';
|
|
11
|
+
import { type VoiceTurnMeta } from './session.js';
|
|
12
|
+
/** The SessionManager surface the manager needs, beyond the tool bridge. */
|
|
13
|
+
export type VoiceManagerBridge = CodingSessionBridge & {
|
|
14
|
+
getSessionCwd(sessionId: string): string | undefined;
|
|
15
|
+
isOpen(sessionId: string): boolean;
|
|
16
|
+
};
|
|
17
|
+
interface StoredAudio {
|
|
18
|
+
audio: Buffer;
|
|
19
|
+
mimeType: string;
|
|
20
|
+
}
|
|
21
|
+
export declare class VoiceIntermediaryManager extends EventEmitter {
|
|
22
|
+
private readonly bridge;
|
|
23
|
+
/** Injected for tests. */
|
|
24
|
+
private readonly fetchImpl?;
|
|
25
|
+
private readonly sessions;
|
|
26
|
+
private readonly audio;
|
|
27
|
+
constructor(bridge: VoiceManagerBridge,
|
|
28
|
+
/** Injected for tests. */
|
|
29
|
+
fetchImpl?: FetchLike | undefined);
|
|
30
|
+
/**
|
|
31
|
+
* Attach (or refresh) the voice agent for a coding session. `active` is true
|
|
32
|
+
* only when a brain model is configured and the session is live — i.e. the
|
|
33
|
+
* agent will actually respond. Attaching an idle/mis-configured session is a
|
|
34
|
+
* no-op that reports `active:false` rather than erroring.
|
|
35
|
+
*/
|
|
36
|
+
attach(sessionId: string, config: VoiceConfig): {
|
|
37
|
+
ok: boolean;
|
|
38
|
+
active: boolean;
|
|
39
|
+
};
|
|
40
|
+
detach(sessionId: string): void;
|
|
41
|
+
isAttached(sessionId: string): boolean;
|
|
42
|
+
handleUtterance(sessionId: string, text: string, meta?: VoiceTurnMeta): Promise<void>;
|
|
43
|
+
recordPlaybackEvent(event: VoiceAgentPlaybackEventRequestPayload): void;
|
|
44
|
+
/**
|
|
45
|
+
* Proactively nudge the agent when the coding side raises a permission prompt,
|
|
46
|
+
* so it can narrate "it wants to run X — shall I allow it?" without the user
|
|
47
|
+
* having to ask. No-op when no agent is attached to that session.
|
|
48
|
+
*/
|
|
49
|
+
notifyPendingPermission(request: ClaudeUserInputRequestPayload): void;
|
|
50
|
+
recordCardEvent(event: CardEvent): void;
|
|
51
|
+
recordStreamEnd(result: CardStreamEnd): void;
|
|
52
|
+
notifyStreamEnd(result: CardStreamEnd): void;
|
|
53
|
+
getAudio(audioId: string): StoredAudio | null;
|
|
54
|
+
private storeAudio;
|
|
55
|
+
private emitEvent;
|
|
56
|
+
}
|
|
57
|
+
export {};
|
|
58
|
+
//# sourceMappingURL=manager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manager.d.ts","sourceRoot":"","sources":["../../../src/ai/voiceIntermediary/manager.ts"],"names":[],"mappings":"AAGA;;;;;GAKG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAEtC,OAAO,KAAK,EACV,SAAS,EACT,aAAa,EACb,6BAA6B,EAE7B,qCAAqC,EACrC,WAAW,EACZ,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AACtD,OAAO,E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AAM,EAAE,aAAa,GAAG,IAAI;IAM5C,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,WAAW,GAAG,IAAI;IAI7C,OAAO,CAAC,UAAU;IAWlB,OAAO,CAAC,SAAS;CAGlB"}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2026 King Young Technology
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
/**
|
|
4
|
+
* Owns the per-session voice intermediaries and bridges them to the rest of the
|
|
5
|
+
* daemon. Emits a single `'event'` (sessionId, VoiceAgentEvent) that `run.ts`
|
|
6
|
+
* republishes on `/sessions/:sessionId/voice-agent`. Holds synthesized audio in
|
|
7
|
+
* a small LRU so the PWA can fetch bytes by id (metadata-first delivery).
|
|
8
|
+
*/
|
|
9
|
+
import { EventEmitter } from 'events';
|
|
10
|
+
import { randomUUID } from 'crypto';
|
|
11
|
+
import { VoiceIntermediarySession } from './session.js';
|
|
12
|
+
/** Keep at most this many recent utterances of audio addressable for fetch. */
|
|
13
|
+
const AUDIO_CACHE_CAP = 32;
|
|
14
|
+
export class VoiceIntermediaryManager extends EventEmitter {
|
|
15
|
+
bridge;
|
|
16
|
+
fetchImpl;
|
|
17
|
+
sessions = new Map();
|
|
18
|
+
audio = new Map();
|
|
19
|
+
constructor(bridge,
|
|
20
|
+
/** Injected for tests. */
|
|
21
|
+
fetchImpl) {
|
|
22
|
+
super();
|
|
23
|
+
this.bridge = bridge;
|
|
24
|
+
this.fetchImpl = fetchImpl;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Attach (or refresh) the voice agent for a coding session. `active` is true
|
|
28
|
+
* only when a brain model is configured and the session is live — i.e. the
|
|
29
|
+
* agent will actually respond. Attaching an idle/mis-configured session is a
|
|
30
|
+
* no-op that reports `active:false` rather than erroring.
|
|
31
|
+
*/
|
|
32
|
+
attach(sessionId, config) {
|
|
33
|
+
const cwd = this.bridge.getSessionCwd(sessionId);
|
|
34
|
+
const live = this.bridge.isOpen(sessionId);
|
|
35
|
+
const active = !!config.agentModel?.trim() && !!cwd && live;
|
|
36
|
+
if (!cwd || !live)
|
|
37
|
+
return { ok: true, active: false };
|
|
38
|
+
const existing = this.sessions.get(sessionId);
|
|
39
|
+
if (existing) {
|
|
40
|
+
existing.updateConfig(config, cwd);
|
|
41
|
+
return { ok: true, active };
|
|
42
|
+
}
|
|
43
|
+
const session = new VoiceIntermediarySession({
|
|
44
|
+
sessionId,
|
|
45
|
+
cwd,
|
|
46
|
+
config,
|
|
47
|
+
bridge: this.bridge,
|
|
48
|
+
fetchImpl: this.fetchImpl,
|
|
49
|
+
callbacks: {
|
|
50
|
+
emit: (event) => this.emitEvent(sessionId, event),
|
|
51
|
+
storeAudio: (a, mime) => this.storeAudio(a, mime),
|
|
52
|
+
},
|
|
53
|
+
});
|
|
54
|
+
this.sessions.set(sessionId, session);
|
|
55
|
+
return { ok: true, active };
|
|
56
|
+
}
|
|
57
|
+
detach(sessionId) {
|
|
58
|
+
this.sessions.get(sessionId)?.close();
|
|
59
|
+
this.sessions.delete(sessionId);
|
|
60
|
+
}
|
|
61
|
+
isAttached(sessionId) {
|
|
62
|
+
return this.sessions.has(sessionId);
|
|
63
|
+
}
|
|
64
|
+
async handleUtterance(sessionId, text, meta = {}) {
|
|
65
|
+
const trimmed = text.trim();
|
|
66
|
+
if (!trimmed)
|
|
67
|
+
return;
|
|
68
|
+
const session = this.sessions.get(sessionId);
|
|
69
|
+
if (!session) {
|
|
70
|
+
this.emitEvent(sessionId, { kind: 'error', message: '語音同事尚未啟動,請先 attach。' });
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
if (!session.hasBrain()) {
|
|
74
|
+
this.emitEvent(sessionId, { kind: 'error', message: '尚未設定語音 agent 模型(agentModel)。' });
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
await session.handleUtterance(trimmed, meta);
|
|
78
|
+
}
|
|
79
|
+
recordPlaybackEvent(event) {
|
|
80
|
+
this.sessions.get(event.sessionId)?.recordPlaybackEvent(event);
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Proactively nudge the agent when the coding side raises a permission prompt,
|
|
84
|
+
* so it can narrate "it wants to run X — shall I allow it?" without the user
|
|
85
|
+
* having to ask. No-op when no agent is attached to that session.
|
|
86
|
+
*/
|
|
87
|
+
notifyPendingPermission(request) {
|
|
88
|
+
const session = this.sessions.get(request.sessionId);
|
|
89
|
+
if (!session || !session.hasBrain())
|
|
90
|
+
return;
|
|
91
|
+
const tool = request.toolName ?? request.title;
|
|
92
|
+
const detail = request.toolInput ? ` 內容:${safeBrief(request.toolInput)}` : '';
|
|
93
|
+
void session.notify(`目前工作需要權限執行「${tool}」。${detail} 這可能不可逆,先別自己決定——用講的說明並詢問使用者,得到口頭同意再用 respond_to_permission 回覆(request_id:${request.requestId})。`);
|
|
94
|
+
}
|
|
95
|
+
recordCardEvent(event) {
|
|
96
|
+
this.sessions.get(event.sessionId)?.recordCardEvent(event);
|
|
97
|
+
}
|
|
98
|
+
recordStreamEnd(result) {
|
|
99
|
+
this.sessions.get(result.sessionId)?.recordStreamEnd(result);
|
|
100
|
+
}
|
|
101
|
+
notifyStreamEnd(result) {
|
|
102
|
+
const session = this.sessions.get(result.sessionId);
|
|
103
|
+
if (!session || !session.hasBrain())
|
|
104
|
+
return;
|
|
105
|
+
void session.notifyCodingTurnEnded(result);
|
|
106
|
+
}
|
|
107
|
+
getAudio(audioId) {
|
|
108
|
+
return this.audio.get(audioId) ?? null;
|
|
109
|
+
}
|
|
110
|
+
storeAudio(audio, mimeType) {
|
|
111
|
+
const id = randomUUID();
|
|
112
|
+
this.audio.set(id, { audio, mimeType });
|
|
113
|
+
while (this.audio.size > AUDIO_CACHE_CAP) {
|
|
114
|
+
const oldest = this.audio.keys().next().value;
|
|
115
|
+
if (oldest === undefined)
|
|
116
|
+
break;
|
|
117
|
+
this.audio.delete(oldest);
|
|
118
|
+
}
|
|
119
|
+
return id;
|
|
120
|
+
}
|
|
121
|
+
emitEvent(sessionId, event) {
|
|
122
|
+
this.emit('event', sessionId, event);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
function safeBrief(input) {
|
|
126
|
+
try {
|
|
127
|
+
const s = JSON.stringify(input);
|
|
128
|
+
return s.length > 120 ? `${s.slice(0, 120)}…` : s;
|
|
129
|
+
}
|
|
130
|
+
catch {
|
|
131
|
+
return '';
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
//# sourceMappingURL=manager.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manager.js","sourceRoot":"","sources":["../../../src/ai/voiceIntermediary/manager.ts"],"names":[],"mappings":"AAAA,qDAAqD;AACrD,+BAA+B;AAE/B;;;;;GAKG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAWpC,OAAO,EAAE,wBAAwB,EAAsB,MAAM,cAAc,CAAC;AAa5E,+EAA+E;AAC/E,MAAM,eAAe,GAAG,EAAE,CAAC;AAE3B,MAAM,OAAO,wBAAyB,SAAQ,YAAY;IAKrC;IAEA;IANF,QAAQ,GAAG,IAAI,GAAG,EAAoC,CAAC;IACvD,KAAK,GAAG,IAAI,GAAG,EAAuB,CAAC;IAExD,YACmB,MAA0B;IAC3C,0BAA0B;IACT,SAAqB;QAEtC,KAAK,EAAE,CAAC;QAJS,WAAM,GAAN,MAAM,CAAoB;QAE1B,cAAS,GAAT,SAAS,CAAY;IAGxC,CAAC;IAED;;;;;OAKG;IACH,MAAM,CAAC,SAAiB,EAAE,MAAmB;QAC3C,MAAM,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC;QACjD,MAAM,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;QAC3C,MAAM,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC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,MAAM,CAAC,CAAC;QAC5B,CAAC;QACD,OAAO,EAAE,CAAC;IACZ,CAAC;IAEO,SAAS,CAAC,SAAiB,EAAE,KAAsB;QACzD,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,SAAS,EAAE,KAAK,CAAC,CAAC;IACvC,CAAC;CACF;AAED,SAAS,SAAS,CAAC,KAA8B;IAC/C,IAAI,CAAC;QACH,MAAM,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;QAChC,OAAO,CAAC,CAAC,MAAM,GAAG,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IACpD,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,EAAE,CAAC;IACZ,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export type MemorySection = 'preference' | 'decision' | 'fact' | 'note';
|
|
2
|
+
export declare function globalMemoryPath(): string;
|
|
3
|
+
export declare function workspaceMemoryPath(cwd: string): string;
|
|
4
|
+
/**
|
|
5
|
+
* Load the combined memory text for a workspace, ready to splice into the
|
|
6
|
+
* brain's system prompt. Returns '' when nothing has been remembered yet so the
|
|
7
|
+
* caller can cheaply skip the section.
|
|
8
|
+
*/
|
|
9
|
+
export declare function loadMemory(cwd: string): Promise<string>;
|
|
10
|
+
/**
|
|
11
|
+
* Append a remembered fact to the WORKSPACE memory file under its section,
|
|
12
|
+
* creating the file/section as needed. Append-only and idempotent on exact
|
|
13
|
+
* duplicates so repeated "remember X" doesn't pile up identical bullets.
|
|
14
|
+
*/
|
|
15
|
+
export declare function appendMemory(cwd: string, note: string, section?: MemorySection): Promise<void>;
|
|
16
|
+
/**
|
|
17
|
+
* Pure markdown transform: ensure `- <bullet>` exists under `## <header>`.
|
|
18
|
+
* Inserts the bullet at the end of an existing section, or appends a fresh
|
|
19
|
+
* section. Exported for unit testing.
|
|
20
|
+
*/
|
|
21
|
+
export declare function upsertBullet(content: string, header: string, bullet: string): string;
|
|
22
|
+
//# sourceMappingURL=memory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"memory.d.ts","sourceRoot":"","sources":["../../../src/ai/voiceIntermediary/memory.ts"],"names":[],"mappings":"AAsBA,MAAM,MAAM,aAAa,GAAG,YAAY,GAAG,UAAU,GAAG,MAAM,GAAG,MAAM,CAAC;AAUxE,wBAAgB,gBAAgB,IAAI,MAAM,CAEzC;AAED,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEvD;AAWD;;;;GAIG;AACH,wBAAsB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAS7D;AAED;;;;GAIG;AACH,wBAAsB,YAAY,CAChC,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE,aAAsB,GAC9B,OAAO,CAAC,IAAI,CAAC,CASf;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CA4BpF"}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2026 King Young Technology
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
/**
|
|
4
|
+
* Workspace memory for the voice intermediary — a plain, human-editable
|
|
5
|
+
* markdown file, NOT a database. Mirrors the `AGENTS.md` / Claude-memory model:
|
|
6
|
+
* standing preferences, decisions (trust boundaries) and project facts the
|
|
7
|
+
* "AI coworker" should carry between voice sessions.
|
|
8
|
+
*
|
|
9
|
+
* Two tiers, both optional, loaded together (global first, workspace second so
|
|
10
|
+
* project rules win on conflict):
|
|
11
|
+
* - global `~/.quicksave/voice-memory.md` (cross-project style)
|
|
12
|
+
* - workspace `<cwd>/.quicksave/voice-memory.md` (per-project boundaries)
|
|
13
|
+
*
|
|
14
|
+
* Deliberately separate from the coding agent's own `CLAUDE.md` / `AGENTS.md`:
|
|
15
|
+
* those steer the coding agent, so writing coworker notes there would pollute
|
|
16
|
+
* its context. We READ those elsewhere for grounding but only WRITE here.
|
|
17
|
+
*/
|
|
18
|
+
import { homedir } from 'os';
|
|
19
|
+
import { join, dirname } from 'path';
|
|
20
|
+
import { readFile, writeFile, mkdir } from 'fs/promises';
|
|
21
|
+
/** Section slug → human-readable markdown header (the file is for human eyes). */
|
|
22
|
+
const SECTION_HEADERS = {
|
|
23
|
+
preference: '偏好',
|
|
24
|
+
decision: '常駐決定(界線)',
|
|
25
|
+
fact: '專案常識',
|
|
26
|
+
note: '筆記',
|
|
27
|
+
};
|
|
28
|
+
export function globalMemoryPath() {
|
|
29
|
+
return join(homedir(), '.quicksave', 'voice-memory.md');
|
|
30
|
+
}
|
|
31
|
+
export function workspaceMemoryPath(cwd) {
|
|
32
|
+
return join(cwd, '.quicksave', 'voice-memory.md');
|
|
33
|
+
}
|
|
34
|
+
async function readIfPresent(path) {
|
|
35
|
+
try {
|
|
36
|
+
const text = await readFile(path, 'utf8');
|
|
37
|
+
return text.trim().length > 0 ? text.trim() : null;
|
|
38
|
+
}
|
|
39
|
+
catch {
|
|
40
|
+
return null;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Load the combined memory text for a workspace, ready to splice into the
|
|
45
|
+
* brain's system prompt. Returns '' when nothing has been remembered yet so the
|
|
46
|
+
* caller can cheaply skip the section.
|
|
47
|
+
*/
|
|
48
|
+
export async function loadMemory(cwd) {
|
|
49
|
+
const [global, workspace] = await Promise.all([
|
|
50
|
+
readIfPresent(globalMemoryPath()),
|
|
51
|
+
readIfPresent(workspaceMemoryPath(cwd)),
|
|
52
|
+
]);
|
|
53
|
+
const parts = [];
|
|
54
|
+
if (global)
|
|
55
|
+
parts.push(`# 跨專案記憶 (global)\n\n${global}`);
|
|
56
|
+
if (workspace)
|
|
57
|
+
parts.push(`# 此工作區記憶 (workspace)\n\n${workspace}`);
|
|
58
|
+
return parts.join('\n\n');
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Append a remembered fact to the WORKSPACE memory file under its section,
|
|
62
|
+
* creating the file/section as needed. Append-only and idempotent on exact
|
|
63
|
+
* duplicates so repeated "remember X" doesn't pile up identical bullets.
|
|
64
|
+
*/
|
|
65
|
+
export async function appendMemory(cwd, note, section = 'note') {
|
|
66
|
+
const trimmed = note.trim();
|
|
67
|
+
if (!trimmed)
|
|
68
|
+
return;
|
|
69
|
+
const path = workspaceMemoryPath(cwd);
|
|
70
|
+
const existing = (await readIfPresent(path)) ?? '';
|
|
71
|
+
const next = upsertBullet(existing, SECTION_HEADERS[section], trimmed);
|
|
72
|
+
if (next === existing)
|
|
73
|
+
return;
|
|
74
|
+
await mkdir(dirname(path), { recursive: true });
|
|
75
|
+
await writeFile(path, next.endsWith('\n') ? next : `${next}\n`, 'utf8');
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Pure markdown transform: ensure `- <bullet>` exists under `## <header>`.
|
|
79
|
+
* Inserts the bullet at the end of an existing section, or appends a fresh
|
|
80
|
+
* section. Exported for unit testing.
|
|
81
|
+
*/
|
|
82
|
+
export function upsertBullet(content, header, bullet) {
|
|
83
|
+
const bulletLine = `- ${bullet}`;
|
|
84
|
+
const lines = content.length > 0 ? content.split('\n') : [];
|
|
85
|
+
// Already present anywhere → no-op (cheap dedupe).
|
|
86
|
+
if (lines.some((l) => l.trim() === bulletLine))
|
|
87
|
+
return content;
|
|
88
|
+
const headerLine = `## ${header}`;
|
|
89
|
+
const headerIdx = lines.findIndex((l) => l.trim() === headerLine);
|
|
90
|
+
if (headerIdx === -1) {
|
|
91
|
+
const block = `${headerLine}\n${bulletLine}`;
|
|
92
|
+
return lines.length > 0 ? `${content.replace(/\n+$/, '')}\n\n${block}` : block;
|
|
93
|
+
}
|
|
94
|
+
// Find the end of this section (next `## ` header or EOF) and insert before it.
|
|
95
|
+
let insertAt = lines.length;
|
|
96
|
+
for (let i = headerIdx + 1; i < lines.length; i++) {
|
|
97
|
+
if (lines[i].startsWith('## ')) {
|
|
98
|
+
insertAt = i;
|
|
99
|
+
break;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
// Trim trailing blank lines inside the section before inserting.
|
|
103
|
+
let tail = insertAt;
|
|
104
|
+
while (tail > headerIdx + 1 && lines[tail - 1].trim() === '')
|
|
105
|
+
tail--;
|
|
106
|
+
lines.splice(tail, 0, bulletLine);
|
|
107
|
+
return lines.join('\n');
|
|
108
|
+
}
|
|
109
|
+
//# sourceMappingURL=memory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"memory.js","sourceRoot":"","sources":["../../../src/ai/voiceIntermediary/memory.ts"],"names":[],"mappings":"AAAA,qDAAqD;AACrD,+BAA+B;AAE/B;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC;AAC7B,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AACrC,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAIzD,kFAAkF;AAClF,MAAM,eAAe,GAAkC;IACrD,UAAU,EAAE,IAAI;IAChB,QAAQ,EAAE,UAAU;IACpB,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,IAAI;CACX,CAAC;AAEF,MAAM,UAAU,gBAAgB;IAC9B,OAAO,IAAI,CAAC,OAAO,EAAE,EAAE,YAAY,EAAE,iBAAiB,CAAC,CAAC;AAC1D,CAAC;AAED,MAAM,UAAU,mBAAmB,CAAC,GAAW;IAC7C,OAAO,IAAI,CAAC,GAAG,EAAE,YAAY,EAAE,iBAAiB,CAAC,CAAC;AACpD,CAAC;AAED,KAAK,UAAU,aAAa,CAAC,IAAY;IACvC,IAAI,CAAC;QACH,MAAM,IAAI,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AAC,GAAG,SAAS,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QAClD,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC;YAC/B,QAAQ,GAAG,CAAC,CAAC;YACb,MAAM;QACR,CAAC;IACH,CAAC;IACD,iEAAiE;IACjE,IAAI,IAAI,GAAG,QAAQ,CAAC;IACpB,OAAO,IAAI,GAAG,SAAS,GAAG,CAAC,IAAI,KAAK,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE;QAAE,IAAI,EAAE,CAAC;IACrE,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,EAAE,UAAU,CAAC,CAAC;IAClC,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* One voice-intermediary conversation bound to a single coding session. Holds
|
|
3
|
+
* the brain's active message window in RAM and mirrors model-visible messages
|
|
4
|
+
* into append-only JSONL so a restarted voice agent can resume its own context.
|
|
5
|
+
* Coding-agent cards remain a separate implementation transcript read through
|
|
6
|
+
* tools. Each user utterance runs a tool-calling
|
|
7
|
+
* loop per user utterance: narrate → maybe call silent tools → speak the result.
|
|
8
|
+
*/
|
|
9
|
+
import type { CardEvent, CardStreamEnd, VoiceAgentPlaybackEventRequestPayload, VoiceAgentEvent, VoiceConfig } from '@sumicom/quicksave-shared';
|
|
10
|
+
import { type ChatMessage, type FetchLike } from './llm.js';
|
|
11
|
+
import { type CodingSessionBridge } from './tools.js';
|
|
12
|
+
import { VoiceHistoryStore } from './historyStore.js';
|
|
13
|
+
export interface VoiceSessionCallbacks {
|
|
14
|
+
emit: (event: VoiceAgentEvent) => void;
|
|
15
|
+
/** Persist audio bytes and return an id the PWA fetches on demand. */
|
|
16
|
+
storeAudio: (audio: Buffer, mimeType: string) => string;
|
|
17
|
+
}
|
|
18
|
+
export interface VoiceSessionOpts {
|
|
19
|
+
sessionId: string;
|
|
20
|
+
cwd: string;
|
|
21
|
+
config: VoiceConfig;
|
|
22
|
+
bridge: CodingSessionBridge;
|
|
23
|
+
callbacks: VoiceSessionCallbacks;
|
|
24
|
+
/** Injected for tests. */
|
|
25
|
+
fetchImpl?: FetchLike;
|
|
26
|
+
/** Injected for tests. */
|
|
27
|
+
historyStore?: VoiceHistoryStore;
|
|
28
|
+
}
|
|
29
|
+
export interface VoiceTurnMeta {
|
|
30
|
+
turnId?: string;
|
|
31
|
+
interactionId?: string;
|
|
32
|
+
utteranceId?: string;
|
|
33
|
+
}
|
|
34
|
+
export declare class VoiceIntermediarySession {
|
|
35
|
+
readonly sessionId: string;
|
|
36
|
+
private cwd;
|
|
37
|
+
private config;
|
|
38
|
+
private readonly bridge;
|
|
39
|
+
private readonly cb;
|
|
40
|
+
private readonly fetchImpl?;
|
|
41
|
+
private readonly history;
|
|
42
|
+
private messages;
|
|
43
|
+
private systemPrompt;
|
|
44
|
+
private ready;
|
|
45
|
+
/** Serializes turns so overlapping utterances don't interleave tool calls. */
|
|
46
|
+
private chain;
|
|
47
|
+
private closed;
|
|
48
|
+
/** Set after a provider clearly rejects the TTS endpoint; keep later turns text-only. */
|
|
49
|
+
private ttsUnavailableReason;
|
|
50
|
+
/** Passive mirror of the coding agent's newest live card stream. */
|
|
51
|
+
private readonly liveCards;
|
|
52
|
+
private readonly liveNotes;
|
|
53
|
+
private pendingPlaybackNote;
|
|
54
|
+
constructor(opts: VoiceSessionOpts);
|
|
55
|
+
/** Refresh config (e.g. user changed model/voice) without losing history. */
|
|
56
|
+
updateConfig(config: VoiceConfig, cwd?: string): void;
|
|
57
|
+
/** True when a brain model is configured, i.e. the agent can actually respond. */
|
|
58
|
+
hasBrain(): boolean;
|
|
59
|
+
private init;
|
|
60
|
+
/** Handle a final user utterance (STT transcript). Serialized per session. */
|
|
61
|
+
handleUtterance(text: string, meta?: VoiceTurnMeta): Promise<void>;
|
|
62
|
+
/** Proactively wake the agent on a coding-side event (e.g. permission pending). */
|
|
63
|
+
notify(systemNote: string): Promise<void>;
|
|
64
|
+
/** Wake the voice brain when the coding agent finishes a turn. The brain may no-op. */
|
|
65
|
+
notifyCodingTurnEnded(result: CardStreamEnd): Promise<void>;
|
|
66
|
+
close(): void;
|
|
67
|
+
/** Passively record coding-agent card updates. Does not wake or interrupt the voice LLM. */
|
|
68
|
+
recordCardEvent(event: CardEvent): void;
|
|
69
|
+
/** Record turn completion metadata without triggering a voice response. */
|
|
70
|
+
recordStreamEnd(result: CardStreamEnd): void;
|
|
71
|
+
recordPlaybackEvent(event: VoiceAgentPlaybackEventRequestPayload): void;
|
|
72
|
+
private runTurn;
|
|
73
|
+
private speak;
|
|
74
|
+
private messagesWithLiveContext;
|
|
75
|
+
private liveContextForBrain;
|
|
76
|
+
private trimLiveCards;
|
|
77
|
+
private maybeCompactHistory;
|
|
78
|
+
}
|
|
79
|
+
export declare function sanitizeMessagesForChatCompletion(messages: readonly ChatMessage[]): ChatMessage[];
|
|
80
|
+
export declare function buildSystemPrompt(memory: string): string;
|
|
81
|
+
//# sourceMappingURL=session.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../../src/ai/voiceIntermediary/session.ts"],"names":[],"mappings":"AAGA;;;;;;;GAOG;AACH,OAAO,KAAK,EAEV,SAAS,EACT,aAAa,EACb,qCAAqC,EACrC,eAAe,EACf,WAAW,EACZ,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAkB,KAAK,WAAW,EAAE,KAAK,SAAS,EAAE,MAAM,UAAU,CAAC;AAE5E,OAAO,EAAsD,KAAK,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAG1G,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAStD,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,CA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