@lumavox/server 0.40.0 → 0.44.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -68,7 +68,7 @@ list's page.
68
68
  | `tts`, `stt` | `create` |
69
69
  | `voices` | `list`, `page`, `get`, `create`, `uploadUrl`, `upload`, `update`, `delete`, `resample`, `design`, `saveDesign`, `wait` |
70
70
  | `assets` | `list`, `page`, `get`, `uploadUrl`, `confirm`, `upload`, `update`, `delete`, `deleteMany`, `move`, `wait`; `assets.folders.*` |
71
- | `agents` | `list`, `page`, `get`, `create`, `update`, `delete`; `agents.settings.get/update`; `agents.knowledge.list/set`; `agents.tools.list/set` |
71
+ | `agents` | `list`, `page`, `get`, `create`, `update`, `delete`; `agents.settings.get/update`; `agents.knowledge.list/set`; `agents.tools.list/set`; `agents.versions.list/get/restore` — every change players see is a version, any kept one put back; `agents.draft.get/update/discard/publish` — changes players get only once published |
72
72
  | `tools` | `list`, `page`, `get`, `create` (a webhook's signing secret, shown once), `update`, `delete`, `rotateSecret`, `test` |
73
73
  | `knowledge` | `list`, `page`, `get`, `create`, `bulk`, `fromUrl`, `uploadUrl`, `fromFile`, `upload`, `update`, `delete`, `reindex`, `refresh`, `setAgents`, `search`, `categories`, `insights`, `wait` |
74
74
  | `usage` | `get`, `plan` |
@@ -1 +1 @@
1
- export type { AgentCreateRequest, AgentHandoff, AgentHandoffInfo, AgentInfo, AgentKnowledgeUpdate, AgentPage, AgentQuietHours, AgentReportField, AgentReportFieldInfo, AgentSettingsInfo, AgentSettingsUpdate, AgentStt, AgentSttInfo, AgentSummary, AgentToolsUpdate, AgentUpdate, AgentVoice, AgentVoiceInfo, ApiKeySelf, AssetBulkRequest, AssetDetail, AssetMoveRequest, AssetPage, AssetsAffected, AssetSummary, AssetUpdate, AssignedAgent, AudioRequest, BulkEditKnowledgeData, BulkEditKnowledgeError, BulkEditKnowledgeErrors, BulkEditKnowledgeResponse, BulkEditKnowledgeResponses, CancelScheduledMessageData, CancelScheduledMessageError, CancelScheduledMessageErrors, CancelScheduledMessageResponse, CancelScheduledMessageResponses, ClientOptions, CompactionInfo, CompactRequest, CompactSessionData, CompactSessionError, CompactSessionErrors, CompactSessionResponse, CompactSessionResponses, ConfirmAssetUploadData, ConfirmAssetUploadError, ConfirmAssetUploadErrors, ConfirmAssetUploadResponse, ConfirmAssetUploadResponses, ConversationReport, ConversationReportPage, CreateAgentData, CreateAgentError, CreateAgentErrors, CreateAgentResponse, CreateAgentResponses, CreateAssetFolderData, CreateAssetFolderError, CreateAssetFolderErrors, CreateAssetFolderResponse, CreateAssetFolderResponses, CreateAssetUploadUrlData, CreateAssetUploadUrlError, CreateAssetUploadUrlErrors, CreateAssetUploadUrlResponse, CreateAssetUploadUrlResponses, CreateAudioData, CreateAudioError, CreateAudioErrors, CreateAudioResponse, CreateAudioResponses, CreateEndUserData, CreateEndUserError, CreateEndUserErrors, CreateEndUserFactData, CreateEndUserFactError, CreateEndUserFactErrors, CreateEndUserFactResponse, CreateEndUserFactResponses, CreateEndUserNoteData, CreateEndUserNoteError, CreateEndUserNoteErrors, CreateEndUserNoteResponse, CreateEndUserNoteResponses, CreateEndUserResponse, CreateEndUserResponses, CreateEphemeralKeyData, CreateEphemeralKeyError, CreateEphemeralKeyErrors, CreateEphemeralKeyResponse, CreateEphemeralKeyResponses, CreateFactData, CreateFactError, CreateFactErrors, CreateFactResponse, CreateFactResponses, CreateImageData, CreateImageError, CreateImageErrors, CreateImageResponse, CreateImageResponses, CreateKnowledgeData, CreateKnowledgeError, CreateKnowledgeErrors, CreateKnowledgeFromFileData, CreateKnowledgeFromFileError, CreateKnowledgeFromFileErrors, CreateKnowledgeFromFileResponse, CreateKnowledgeFromFileResponses, CreateKnowledgeFromUrlData, CreateKnowledgeFromUrlError, CreateKnowledgeFromUrlErrors, CreateKnowledgeFromUrlResponse, CreateKnowledgeFromUrlResponses, CreateKnowledgeResponse, CreateKnowledgeResponses, CreateKnowledgeUploadUrlData, CreateKnowledgeUploadUrlError, CreateKnowledgeUploadUrlErrors, CreateKnowledgeUploadUrlResponse, CreateKnowledgeUploadUrlResponses, CreateScheduledMessageData, CreateScheduledMessageError, CreateScheduledMessageErrors, CreateScheduledMessageResponse, CreateScheduledMessageResponses, CreateSessionData, CreateSessionError, CreateSessionErrors, CreateSessionResponse, CreateSessionResponses, CreateSkyboxData, CreateSkyboxError, CreateSkyboxErrors, CreateSkyboxResponse, CreateSkyboxResponses, CreateToolData, CreateToolError, CreateToolErrors, CreateToolResponse, CreateToolResponses, CreateTranscriptionData, CreateTranscriptionError, CreateTranscriptionErrors, CreateTranscriptionResponse, CreateTranscriptionResponses, CreateVideoData, CreateVideoError, CreateVideoErrors, CreateVideoResponse, CreateVideoResponses, CreateVoiceData, CreateVoiceError, CreateVoiceErrors, CreateVoiceResponse, CreateVoiceResponses, CreateVoiceUploadUrlData, CreateVoiceUploadUrlError, CreateVoiceUploadUrlErrors, CreateVoiceUploadUrlResponse, CreateVoiceUploadUrlResponses, DeleteAgentData, DeleteAgentError, DeleteAgentErrors, DeleteAgentResponse, DeleteAgentResponses, DeleteAllEndUserMemoriesData, DeleteAllEndUserMemoriesError, DeleteAllEndUserMemoriesErrors, DeleteAllEndUserMemoriesResponse, DeleteAllEndUserMemoriesResponses, DeleteAllFactsData, DeleteAllFactsError, DeleteAllFactsErrors, DeleteAllFactsResponse, DeleteAllFactsResponses, DeleteAllMemoriesData, DeleteAllMemoriesError, DeleteAllMemoriesErrors, DeleteAllMemoriesResponse, DeleteAllMemoriesResponses, DeleteAssetData, DeleteAssetError, DeleteAssetErrors, DeleteAssetFolderData, DeleteAssetFolderError, DeleteAssetFolderErrors, DeleteAssetFolderResponse, DeleteAssetFolderResponses, DeleteAssetResponse, DeleteAssetResponses, DeleteAssetsData, DeleteAssetsError, DeleteAssetsErrors, DeleteAssetsResponse, DeleteAssetsResponses, DeleteEndUserData, DeleteEndUserError, DeleteEndUserErrors, DeleteEndUserFactData, DeleteEndUserFactError, DeleteEndUserFactErrors, DeleteEndUserFactResponse, DeleteEndUserFactResponses, DeleteEndUserMemoryData, DeleteEndUserMemoryError, DeleteEndUserMemoryErrors, DeleteEndUserMemoryResponse, DeleteEndUserMemoryResponses, DeleteEndUserResponse, DeleteEndUserResponses, DeleteFactData, DeleteFactError, DeleteFactErrors, DeleteFactResponse, DeleteFactResponses, DeleteKnowledgeData, DeleteKnowledgeError, DeleteKnowledgeErrors, DeleteKnowledgeResponse, DeleteKnowledgeResponses, DeleteMemoryData, DeleteMemoryError, DeleteMemoryErrors, DeleteMemoryResponse, DeleteMemoryResponses, DeleteSessionData, DeleteSessionError, DeleteSessionErrors, DeleteSessionResponse, DeleteSessionResponses, DeleteToolData, DeleteToolError, DeleteToolErrors, DeleteToolResponse, DeleteToolResponses, DeleteVoiceData, DeleteVoiceError, DeleteVoiceErrors, DeleteVoiceResponse, DeleteVoiceResponses, DesignVoiceData, DesignVoiceError, DesignVoiceErrors, DesignVoiceResponse, DesignVoiceResponses, DraftLayoutData, DraftLayoutError, DraftLayoutErrors, DraftLayoutResponse, DraftLayoutResponses, EndUserCreateRequest, EndUserDeleted, EndUserInfo, EndUserPage, EndUserPersonalization, EndUserPersonalizationUpdate, EndUserUpdateRequest, EphemeralKeyCreateRequest, EphemeralKeyCreateResponse, EphemeralKeyInfo, EphemeralKeyLimits, EphemeralKeyOverrides, EphemeralKeyPage, EphemeralTokenSelf, ErrorCode, ErrorInfo, ErrorResponse, ExtractSessionFactsData, ExtractSessionFactsError, ExtractSessionFactsErrors, ExtractSessionFactsResponse, ExtractSessionFactsResponses, FactCreateRequest, FactInfo, FactPage, FactsDeleted, FactsReadInfo, FactUpdateRequest, FindLayoutElementsData, FindLayoutElementsError, FindLayoutElementsErrors, FindLayoutElementsResponse, FindLayoutElementsResponses, FolderCreate, FolderDeleted, FolderDetail, FolderPage, FolderSummary, FolderUpdate, GenerateFromTemplateData, GenerateFromTemplateError, GenerateFromTemplateErrors, GenerateFromTemplateResponse, GenerateFromTemplateResponses, GenerationAudio, GenerationImage, GenerationInfo, GenerationPage, GenerationSkybox, GenerationTranscript, GenerationVideo, GetAgentData, GetAgentError, GetAgentErrors, GetAgentResponse, GetAgentResponses, GetAgentSettingsData, GetAgentSettingsError, GetAgentSettingsErrors, GetAgentSettingsResponse, GetAgentSettingsResponses, GetAssetData, GetAssetError, GetAssetErrors, GetAssetFolderData, GetAssetFolderError, GetAssetFolderErrors, GetAssetFolderResponse, GetAssetFolderResponses, GetAssetResponse, GetAssetResponses, GetAudioData, GetAudioError, GetAudioErrors, GetAudioResponse, GetAudioResponses, GetEndUserData, GetEndUserError, GetEndUserErrors, GetEndUserMemoryData, GetEndUserMemoryError, GetEndUserMemoryErrors, GetEndUserMemoryResponse, GetEndUserMemoryResponses, GetEndUserPersonalizationData, GetEndUserPersonalizationError, GetEndUserPersonalizationErrors, GetEndUserPersonalizationResponse, GetEndUserPersonalizationResponses, GetEndUserReportData, GetEndUserReportError, GetEndUserReportErrors, GetEndUserReportResponse, GetEndUserReportResponses, GetEndUserResponse, GetEndUserResponses, GetEphemeralKeyData, GetEphemeralKeyError, GetEphemeralKeyErrors, GetEphemeralKeyLimitsData, GetEphemeralKeyLimitsError, GetEphemeralKeyLimitsErrors, GetEphemeralKeyLimitsResponse, GetEphemeralKeyLimitsResponses, GetEphemeralKeyResponse, GetEphemeralKeyResponses, GetGenerationData, GetGenerationError, GetGenerationErrors, GetGenerationResponse, GetGenerationResponses, GetHealthData, GetHealthResponse, GetHealthResponses, GetImageData, GetImageError, GetImageErrors, GetImageResponse, GetImageResponses, GetKnowledgeData, GetKnowledgeError, GetKnowledgeErrors, GetKnowledgeInsightsData, GetKnowledgeInsightsError, GetKnowledgeInsightsErrors, GetKnowledgeInsightsResponse, GetKnowledgeInsightsResponses, GetKnowledgeResponse, GetKnowledgeResponses, GetMemoryData, GetMemoryError, GetMemoryErrors, GetMemoryResponse, GetMemoryResponses, GetPlanData, GetPlanError, GetPlanErrors, GetPlanResponse, GetPlanResponses, GetPlatformLimitsData, GetPlatformLimitsResponse, GetPlatformLimitsResponses, GetScheduledMessageData, GetScheduledMessageError, GetScheduledMessageErrors, GetScheduledMessageResponse, GetScheduledMessageResponses, GetSessionData, GetSessionError, GetSessionErrors, GetSessionResponse, GetSessionResponses, GetSkyboxData, GetSkyboxError, GetSkyboxErrors, GetSkyboxResponse, GetSkyboxResponses, GetTemplateData, GetTemplateError, GetTemplateErrors, GetTemplateFileData, GetTemplateFileError, GetTemplateFileErrors, GetTemplateFileResponses, GetTemplateResponse, GetTemplateResponses, GetTokenData, GetTokenError, GetTokenErrors, GetTokenResponse, GetTokenResponses, GetToolData, GetToolError, GetToolErrors, GetToolResponse, GetToolResponses, GetTranscriptionData, GetTranscriptionError, GetTranscriptionErrors, GetTranscriptionResponse, GetTranscriptionResponses, GetUsageData, GetUsageError, GetUsageErrors, GetUsageResponse, GetUsageResponses, GetVideoData, GetVideoError, GetVideoErrors, GetVideoResponse, GetVideoResponses, GetVoiceData, GetVoiceError, GetVoiceErrors, GetVoiceResponse, GetVoiceResponses, HealthResponse, ImageRequest, KnowledgeAgentsUpdate, KnowledgeAssigned, KnowledgeBulk, KnowledgeBulkResult, KnowledgeCategoryPage, KnowledgeCitation, KnowledgeCreate, KnowledgeEntryUsage, KnowledgeFileCreate, KnowledgeInfo, KnowledgeInsights, KnowledgeLookupInfo, KnowledgePage, KnowledgeSearchHit, KnowledgeSearchRequest, KnowledgeSearchResult, KnowledgeUpdate, KnowledgeUploadRequest, KnowledgeUploadTicket, KnowledgeUrlCreate, LayoutDraft, LayoutDraftRequest, LayoutElement, LayoutElementInfo, LayoutFindRequest, LayoutFound, LayoutSourceInfo, ListAgentKnowledgeData, ListAgentKnowledgeError, ListAgentKnowledgeErrors, ListAgentKnowledgeResponse, ListAgentKnowledgeResponses, ListAgentsData, ListAgentsError, ListAgentsErrors, ListAgentsResponse, ListAgentsResponses, ListAgentToolsData, ListAgentToolsError, ListAgentToolsErrors, ListAgentToolsResponse, ListAgentToolsResponses, ListAssetFoldersData, ListAssetFoldersError, ListAssetFoldersErrors, ListAssetFoldersResponse, ListAssetFoldersResponses, ListAssetsData, ListAssetsError, ListAssetsErrors, ListAssetsResponse, ListAssetsResponses, ListEndUserFactsData, ListEndUserFactsError, ListEndUserFactsErrors, ListEndUserFactsResponse, ListEndUserFactsResponses, ListEndUserMemoriesData, ListEndUserMemoriesError, ListEndUserMemoriesErrors, ListEndUserMemoriesResponse, ListEndUserMemoriesResponses, ListEndUserReportsData, ListEndUserReportsError, ListEndUserReportsErrors, ListEndUserReportsResponse, ListEndUserReportsResponses, ListEndUsersData, ListEndUsersError, ListEndUsersErrors, ListEndUsersResponse, ListEndUsersResponses, ListEphemeralKeysData, ListEphemeralKeysError, ListEphemeralKeysErrors, ListEphemeralKeysResponse, ListEphemeralKeysResponses, ListFactsData, ListFactsError, ListFactsErrors, ListFactsResponse, ListFactsResponses, ListGenerationsData, ListGenerationsError, ListGenerationsErrors, ListGenerationsResponse, ListGenerationsResponses, ListKnowledgeCategoriesData, ListKnowledgeCategoriesError, ListKnowledgeCategoriesErrors, ListKnowledgeCategoriesResponse, ListKnowledgeCategoriesResponses, ListKnowledgeData, ListKnowledgeError, ListKnowledgeErrors, ListKnowledgeResponse, ListKnowledgeResponses, ListMemoriesData, ListMemoriesError, ListMemoriesErrors, ListMemoriesResponse, ListMemoriesResponses, ListRelationsData, ListRelationsError, ListRelationsErrors, ListRelationsResponse, ListRelationsResponses, ListScheduledMessagesData, ListScheduledMessagesError, ListScheduledMessagesErrors, ListScheduledMessagesResponse, ListScheduledMessagesResponses, ListSessionsData, ListSessionsError, ListSessionsErrors, ListSessionsResponse, ListSessionsResponses, ListSkyboxStylesData, ListSkyboxStylesError, ListSkyboxStylesErrors, ListSkyboxStylesResponse, ListSkyboxStylesResponses, ListTemplatesData, ListTemplatesError, ListTemplatesErrors, ListTemplatesResponse, ListTemplatesResponses, ListToolCallsData, ListToolCallsError, ListToolCallsErrors, ListToolCallsResponse, ListToolCallsResponses, ListToolsData, ListToolsError, ListToolsErrors, ListToolsResponse, ListToolsResponses, ListVoicesData, ListVoicesError, ListVoicesErrors, ListVoicesResponse, ListVoicesResponses, MemoriesDeleted, MemoriesWrittenInfo, MemoryCitation, MemoryInfo, MemoryPage, MessageContext, MessageInfo, MessageKnowledge, MessageMemories, MessageNote, MessagePage, MessageSource, MessageToolCall, MoveAssetsData, MoveAssetsError, MoveAssetsErrors, MoveAssetsResponse, MoveAssetsResponses, NoteCreateRequest, NoteTaken, OrgPlan, PlatformLimit, PlatformLimitPage, PostSessionToolResultData, PostSessionToolResultError, PostSessionToolResultErrors, PostSessionToolResultResponse, PostSessionToolResultResponses, PostToolResultData, PostToolResultError, PostToolResultErrors, PostToolResultResponse, PostToolResultResponses, ProviderVoiceSettings, ProviderVoiceSettingsInfo, Reference, ReferenceInfo, RefreshKnowledgeData, RefreshKnowledgeError, RefreshKnowledgeErrors, RefreshKnowledgeResponse, RefreshKnowledgeResponses, ReindexKnowledgeData, ReindexKnowledgeError, ReindexKnowledgeErrors, ReindexKnowledgeResponse, ReindexKnowledgeResponses, RelationInfo, RelationPage, ReportDelivery, ReportLine, ResampleVoiceData, ResampleVoiceError, ResampleVoiceErrors, ResampleVoiceResponse, ResampleVoiceResponses, RevokeEphemeralKeyData, RevokeEphemeralKeyError, RevokeEphemeralKeyErrors, RevokeEphemeralKeyResponse, RevokeEphemeralKeyResponses, RotateToolSecretData, RotateToolSecretError, RotateToolSecretErrors, RotateToolSecretResponse, RotateToolSecretResponses, RotateWebhookSecretData, RotateWebhookSecretError, RotateWebhookSecretErrors, RotateWebhookSecretResponse, RotateWebhookSecretResponses, SafetyInfo, SaveDesignedVoiceData, SaveDesignedVoiceError, SaveDesignedVoiceErrors, SaveDesignedVoiceResponse, SaveDesignedVoiceResponses, ScheduledMessage, ScheduledMessageCreateRequest, ScheduledMessageDelivery, ScheduledMessagePage, SearchKnowledgeData, SearchKnowledgeError, SearchKnowledgeErrors, SearchKnowledgeResponse, SearchKnowledgeResponses, SessionCreateRequest, SessionDetail, SessionInfo, SessionPage, SetAgentKnowledgeData, SetAgentKnowledgeError, SetAgentKnowledgeErrors, SetAgentKnowledgeResponse, SetAgentKnowledgeResponses, SetAgentToolsData, SetAgentToolsError, SetAgentToolsErrors, SetAgentToolsResponse, SetAgentToolsResponses, SetKnowledgeAgentsData, SetKnowledgeAgentsError, SetKnowledgeAgentsErrors, SetKnowledgeAgentsResponse, SetKnowledgeAgentsResponses, SkyboxFile, SkyboxRequest, SkyboxStyle, SkyboxStylePage, SpeechProvider, StreamDone, StreamError, StreamSegment, StreamTranscript, SynthesizeSpeechData, SynthesizeSpeechError, SynthesizeSpeechErrors, SynthesizeSpeechResponse, SynthesizeSpeechResponses, TemplateGenerateRequest, TemplateInfo, TemplateInput, TemplatePage, TestAgentWebhookData, TestAgentWebhookError, TestAgentWebhookErrors, TestAgentWebhookResponse, TestAgentWebhookResponses, TestToolData, TestToolError, TestToolErrors, TestToolResponse, TestToolResponses, TokenSelf, ToolCall, ToolCallPage, ToolCreate, ToolInfo, ToolPage, ToolResultRequest, ToolResultTaken, ToolsAssigned, ToolTestRequest, ToolTestResult, ToolUpdate, ToolWithSecret, TranscribeAssetRequest, TranscribeData, TranscribeError, TranscribeErrors, TranscribeResponse, TranscribeResponses, Transcription, TranscriptionStreamLine, TranscriptWord, TtsOptions, TtsRequest, UnansweredQuestion, UpdateAgentData, UpdateAgentError, UpdateAgentErrors, UpdateAgentResponse, UpdateAgentResponses, UpdateAgentSettingsData, UpdateAgentSettingsError, UpdateAgentSettingsErrors, UpdateAgentSettingsResponse, UpdateAgentSettingsResponses, UpdateAssetData, UpdateAssetError, UpdateAssetErrors, UpdateAssetFolderData, UpdateAssetFolderError, UpdateAssetFolderErrors, UpdateAssetFolderResponse, UpdateAssetFolderResponses, UpdateAssetResponse, UpdateAssetResponses, UpdateEndUserData, UpdateEndUserError, UpdateEndUserErrors, UpdateEndUserFactData, UpdateEndUserFactError, UpdateEndUserFactErrors, UpdateEndUserFactResponse, UpdateEndUserFactResponses, UpdateEndUserPersonalizationData, UpdateEndUserPersonalizationError, UpdateEndUserPersonalizationErrors, UpdateEndUserPersonalizationResponse, UpdateEndUserPersonalizationResponses, UpdateEndUserResponse, UpdateEndUserResponses, UpdateFactData, UpdateFactError, UpdateFactErrors, UpdateFactResponse, UpdateFactResponses, UpdateKnowledgeData, UpdateKnowledgeError, UpdateKnowledgeErrors, UpdateKnowledgeResponse, UpdateKnowledgeResponses, UpdateToolData, UpdateToolError, UpdateToolErrors, UpdateToolResponse, UpdateToolResponses, UpdateVoiceData, UpdateVoiceError, UpdateVoiceErrors, UpdateVoiceResponse, UpdateVoiceResponses, UploadConfirm, UploadTicket, UploadTicketRequest, UsageByKey, UsageDay, UsageResponse, UsageSummary, ValidationIssue, Variables, VariantInfo, VideoRequest, VoiceDesignPreview, VoiceDesignRequest, VoiceDesignResult, VoiceDesignSaveRequest, VoiceDetail, VoiceInfo, VoiceInfoPage, VoiceKind, VoiceSample, VoiceSource, VoiceStatus, VoiceUpdate, VoiceUpload, VoiceUploadRequest, VoiceUploadTicket, WebhookSecret, WebhookTestResult, WriteSessionMemoriesData, WriteSessionMemoriesError, WriteSessionMemoriesErrors, WriteSessionMemoriesResponse, WriteSessionMemoriesResponses } from './types.gen.js';
1
+ export type { AgentCreateRequest, AgentDraft, AgentDraftPublish, AgentDraftUpdate, AgentHandoff, AgentHandoffInfo, AgentInfo, AgentKnowledgeUpdate, AgentPage, AgentQuietHours, AgentReportField, AgentReportFieldInfo, AgentRestored, AgentSettingsInfo, AgentSettingsUpdate, AgentStt, AgentSttInfo, AgentSummary, AgentToolsUpdate, AgentUpdate, AgentVersion, AgentVersionPage, AgentVersionRestore, AgentVersionSummary, AgentVoice, AgentVoiceInfo, ApiKeySelf, AssetBulkRequest, AssetDetail, AssetMoveRequest, AssetPage, AssetsAffected, AssetSummary, AssetUpdate, AssignedAgent, AudioRequest, BulkEditKnowledgeData, BulkEditKnowledgeError, BulkEditKnowledgeErrors, BulkEditKnowledgeResponse, BulkEditKnowledgeResponses, CancelScheduledMessageData, CancelScheduledMessageError, CancelScheduledMessageErrors, CancelScheduledMessageResponse, CancelScheduledMessageResponses, ClientOptions, CompactionInfo, CompactRequest, CompactSessionData, CompactSessionError, CompactSessionErrors, CompactSessionResponse, CompactSessionResponses, ConfirmAssetUploadData, ConfirmAssetUploadError, ConfirmAssetUploadErrors, ConfirmAssetUploadResponse, ConfirmAssetUploadResponses, ConversationReport, ConversationReportPage, CreateAgentData, CreateAgentError, CreateAgentErrors, CreateAgentResponse, CreateAgentResponses, CreateAssetFolderData, CreateAssetFolderError, CreateAssetFolderErrors, CreateAssetFolderResponse, CreateAssetFolderResponses, CreateAssetUploadUrlData, CreateAssetUploadUrlError, CreateAssetUploadUrlErrors, CreateAssetUploadUrlResponse, CreateAssetUploadUrlResponses, CreateAudioData, CreateAudioError, CreateAudioErrors, CreateAudioResponse, CreateAudioResponses, CreateEndUserData, CreateEndUserError, CreateEndUserErrors, CreateEndUserFactData, CreateEndUserFactError, CreateEndUserFactErrors, CreateEndUserFactResponse, CreateEndUserFactResponses, CreateEndUserNoteData, CreateEndUserNoteError, CreateEndUserNoteErrors, CreateEndUserNoteResponse, CreateEndUserNoteResponses, CreateEndUserResponse, CreateEndUserResponses, CreateEphemeralKeyData, CreateEphemeralKeyError, CreateEphemeralKeyErrors, CreateEphemeralKeyResponse, CreateEphemeralKeyResponses, CreateFactData, CreateFactError, CreateFactErrors, CreateFactResponse, CreateFactResponses, CreateImageData, CreateImageError, CreateImageErrors, CreateImageResponse, CreateImageResponses, CreateKnowledgeData, CreateKnowledgeError, CreateKnowledgeErrors, CreateKnowledgeFromFileData, CreateKnowledgeFromFileError, CreateKnowledgeFromFileErrors, CreateKnowledgeFromFileResponse, CreateKnowledgeFromFileResponses, CreateKnowledgeFromUrlData, CreateKnowledgeFromUrlError, CreateKnowledgeFromUrlErrors, CreateKnowledgeFromUrlResponse, CreateKnowledgeFromUrlResponses, CreateKnowledgeResponse, CreateKnowledgeResponses, CreateKnowledgeUploadUrlData, CreateKnowledgeUploadUrlError, CreateKnowledgeUploadUrlErrors, CreateKnowledgeUploadUrlResponse, CreateKnowledgeUploadUrlResponses, CreateScheduledMessageData, CreateScheduledMessageError, CreateScheduledMessageErrors, CreateScheduledMessageResponse, CreateScheduledMessageResponses, CreateSessionData, CreateSessionError, CreateSessionErrors, CreateSessionResponse, CreateSessionResponses, CreateSkyboxData, CreateSkyboxError, CreateSkyboxErrors, CreateSkyboxResponse, CreateSkyboxResponses, CreateToolData, CreateToolError, CreateToolErrors, CreateToolResponse, CreateToolResponses, CreateTranscriptionData, CreateTranscriptionError, CreateTranscriptionErrors, CreateTranscriptionResponse, CreateTranscriptionResponses, CreateVideoData, CreateVideoError, CreateVideoErrors, CreateVideoResponse, CreateVideoResponses, CreateVoiceData, CreateVoiceError, CreateVoiceErrors, CreateVoiceResponse, CreateVoiceResponses, CreateVoiceUploadUrlData, CreateVoiceUploadUrlError, CreateVoiceUploadUrlErrors, CreateVoiceUploadUrlResponse, CreateVoiceUploadUrlResponses, DeleteAgentData, DeleteAgentError, DeleteAgentErrors, DeleteAgentResponse, DeleteAgentResponses, DeleteAllEndUserMemoriesData, DeleteAllEndUserMemoriesError, DeleteAllEndUserMemoriesErrors, DeleteAllEndUserMemoriesResponse, DeleteAllEndUserMemoriesResponses, DeleteAllFactsData, DeleteAllFactsError, DeleteAllFactsErrors, DeleteAllFactsResponse, DeleteAllFactsResponses, DeleteAllMemoriesData, DeleteAllMemoriesError, DeleteAllMemoriesErrors, DeleteAllMemoriesResponse, DeleteAllMemoriesResponses, DeleteAssetData, DeleteAssetError, DeleteAssetErrors, DeleteAssetFolderData, DeleteAssetFolderError, DeleteAssetFolderErrors, DeleteAssetFolderResponse, DeleteAssetFolderResponses, DeleteAssetResponse, DeleteAssetResponses, DeleteAssetsData, DeleteAssetsError, DeleteAssetsErrors, DeleteAssetsResponse, DeleteAssetsResponses, DeleteEndUserData, DeleteEndUserError, DeleteEndUserErrors, DeleteEndUserFactData, DeleteEndUserFactError, DeleteEndUserFactErrors, DeleteEndUserFactResponse, DeleteEndUserFactResponses, DeleteEndUserMemoryData, DeleteEndUserMemoryError, DeleteEndUserMemoryErrors, DeleteEndUserMemoryResponse, DeleteEndUserMemoryResponses, DeleteEndUserResponse, DeleteEndUserResponses, DeleteFactData, DeleteFactError, DeleteFactErrors, DeleteFactResponse, DeleteFactResponses, DeleteKnowledgeData, DeleteKnowledgeError, DeleteKnowledgeErrors, DeleteKnowledgeResponse, DeleteKnowledgeResponses, DeleteMemoryData, DeleteMemoryError, DeleteMemoryErrors, DeleteMemoryResponse, DeleteMemoryResponses, DeleteSessionData, DeleteSessionError, DeleteSessionErrors, DeleteSessionResponse, DeleteSessionResponses, DeleteToolData, DeleteToolError, DeleteToolErrors, DeleteToolResponse, DeleteToolResponses, DeleteVoiceData, DeleteVoiceError, DeleteVoiceErrors, DeleteVoiceResponse, DeleteVoiceResponses, DesignVoiceData, DesignVoiceError, DesignVoiceErrors, DesignVoiceResponse, DesignVoiceResponses, DiscardAgentDraftData, DiscardAgentDraftError, DiscardAgentDraftErrors, DiscardAgentDraftResponse, DiscardAgentDraftResponses, DraftLayoutData, DraftLayoutError, DraftLayoutErrors, DraftLayoutResponse, DraftLayoutResponses, EndUserCreateRequest, EndUserDeleted, EndUserInfo, EndUserPage, EndUserPersonalization, EndUserPersonalizationUpdate, EndUserUpdateRequest, EphemeralKeyCreateRequest, EphemeralKeyCreateResponse, EphemeralKeyInfo, EphemeralKeyLimits, EphemeralKeyOverrides, EphemeralKeyPage, EphemeralTokenSelf, ErrorCode, ErrorInfo, ErrorResponse, ExtractSessionFactsData, ExtractSessionFactsError, ExtractSessionFactsErrors, ExtractSessionFactsResponse, ExtractSessionFactsResponses, FactCreateRequest, FactInfo, FactPage, FactsDeleted, FactsReadInfo, FactUpdateRequest, FindLayoutElementsData, FindLayoutElementsError, FindLayoutElementsErrors, FindLayoutElementsResponse, FindLayoutElementsResponses, FolderCreate, FolderDeleted, FolderDetail, FolderPage, FolderSummary, FolderUpdate, GenerateFromTemplateData, GenerateFromTemplateError, GenerateFromTemplateErrors, GenerateFromTemplateResponse, GenerateFromTemplateResponses, GenerationAudio, GenerationImage, GenerationInfo, GenerationPage, GenerationSkybox, GenerationTranscript, GenerationVideo, GetAgentData, GetAgentDraftData, GetAgentDraftError, GetAgentDraftErrors, GetAgentDraftResponse, GetAgentDraftResponses, GetAgentError, GetAgentErrors, GetAgentResponse, GetAgentResponses, GetAgentSettingsData, GetAgentSettingsError, GetAgentSettingsErrors, GetAgentSettingsResponse, GetAgentSettingsResponses, GetAgentVersionData, GetAgentVersionError, GetAgentVersionErrors, GetAgentVersionResponse, GetAgentVersionResponses, GetAssetData, GetAssetError, GetAssetErrors, GetAssetFolderData, GetAssetFolderError, GetAssetFolderErrors, GetAssetFolderResponse, GetAssetFolderResponses, GetAssetResponse, GetAssetResponses, GetAudioData, GetAudioError, GetAudioErrors, GetAudioResponse, GetAudioResponses, GetEndUserData, GetEndUserError, GetEndUserErrors, GetEndUserMemoryData, GetEndUserMemoryError, GetEndUserMemoryErrors, GetEndUserMemoryResponse, GetEndUserMemoryResponses, GetEndUserPersonalizationData, GetEndUserPersonalizationError, GetEndUserPersonalizationErrors, GetEndUserPersonalizationResponse, GetEndUserPersonalizationResponses, GetEndUserReportData, GetEndUserReportError, GetEndUserReportErrors, GetEndUserReportResponse, GetEndUserReportResponses, GetEndUserResponse, GetEndUserResponses, GetEphemeralKeyData, GetEphemeralKeyError, GetEphemeralKeyErrors, GetEphemeralKeyLimitsData, GetEphemeralKeyLimitsError, GetEphemeralKeyLimitsErrors, GetEphemeralKeyLimitsResponse, GetEphemeralKeyLimitsResponses, GetEphemeralKeyResponse, GetEphemeralKeyResponses, GetGenerationData, GetGenerationError, GetGenerationErrors, GetGenerationResponse, GetGenerationResponses, GetHealthData, GetHealthResponse, GetHealthResponses, GetImageData, GetImageError, GetImageErrors, GetImageResponse, GetImageResponses, GetKnowledgeData, GetKnowledgeError, GetKnowledgeErrors, GetKnowledgeInsightsData, GetKnowledgeInsightsError, GetKnowledgeInsightsErrors, GetKnowledgeInsightsResponse, GetKnowledgeInsightsResponses, GetKnowledgeResponse, GetKnowledgeResponses, GetMemoryData, GetMemoryError, GetMemoryErrors, GetMemoryResponse, GetMemoryResponses, GetPlanData, GetPlanError, GetPlanErrors, GetPlanResponse, GetPlanResponses, GetPlatformLimitsData, GetPlatformLimitsResponse, GetPlatformLimitsResponses, GetScheduledMessageData, GetScheduledMessageError, GetScheduledMessageErrors, GetScheduledMessageResponse, GetScheduledMessageResponses, GetSessionData, GetSessionError, GetSessionErrors, GetSessionResponse, GetSessionResponses, GetSkyboxData, GetSkyboxError, GetSkyboxErrors, GetSkyboxResponse, GetSkyboxResponses, GetTemplateData, GetTemplateError, GetTemplateErrors, GetTemplateFileData, GetTemplateFileError, GetTemplateFileErrors, GetTemplateFileResponses, GetTemplateResponse, GetTemplateResponses, GetTokenData, GetTokenError, GetTokenErrors, GetTokenResponse, GetTokenResponses, GetToolData, GetToolError, GetToolErrors, GetToolResponse, GetToolResponses, GetTranscriptionData, GetTranscriptionError, GetTranscriptionErrors, GetTranscriptionResponse, GetTranscriptionResponses, GetUsageData, GetUsageError, GetUsageErrors, GetUsageResponse, GetUsageResponses, GetVideoData, GetVideoError, GetVideoErrors, GetVideoResponse, GetVideoResponses, GetVoiceData, GetVoiceError, GetVoiceErrors, GetVoiceResponse, GetVoiceResponses, HealthResponse, ImageRequest, KnowledgeAgentsUpdate, KnowledgeAssigned, KnowledgeBulk, KnowledgeBulkResult, KnowledgeCategoryPage, KnowledgeCitation, KnowledgeCreate, KnowledgeEntryUsage, KnowledgeFileCreate, KnowledgeInfo, KnowledgeInsights, KnowledgeLookupInfo, KnowledgePage, KnowledgeSearchHit, KnowledgeSearchRequest, KnowledgeSearchResult, KnowledgeUpdate, KnowledgeUploadRequest, KnowledgeUploadTicket, KnowledgeUrlCreate, LayoutDraft, LayoutDraftRequest, LayoutElement, LayoutElementInfo, LayoutFindRequest, LayoutFound, LayoutSourceInfo, ListAgentKnowledgeData, ListAgentKnowledgeError, ListAgentKnowledgeErrors, ListAgentKnowledgeResponse, ListAgentKnowledgeResponses, ListAgentsData, ListAgentsError, ListAgentsErrors, ListAgentsResponse, ListAgentsResponses, ListAgentToolsData, ListAgentToolsError, ListAgentToolsErrors, ListAgentToolsResponse, ListAgentToolsResponses, ListAgentVersionsData, ListAgentVersionsError, ListAgentVersionsErrors, ListAgentVersionsResponse, ListAgentVersionsResponses, ListAssetFoldersData, ListAssetFoldersError, ListAssetFoldersErrors, ListAssetFoldersResponse, ListAssetFoldersResponses, ListAssetsData, ListAssetsError, ListAssetsErrors, ListAssetsResponse, ListAssetsResponses, ListEndUserFactsData, ListEndUserFactsError, ListEndUserFactsErrors, ListEndUserFactsResponse, ListEndUserFactsResponses, ListEndUserMemoriesData, ListEndUserMemoriesError, ListEndUserMemoriesErrors, ListEndUserMemoriesResponse, ListEndUserMemoriesResponses, ListEndUserReportsData, ListEndUserReportsError, ListEndUserReportsErrors, ListEndUserReportsResponse, ListEndUserReportsResponses, ListEndUsersData, ListEndUsersError, ListEndUsersErrors, ListEndUsersResponse, ListEndUsersResponses, ListEphemeralKeysData, ListEphemeralKeysError, ListEphemeralKeysErrors, ListEphemeralKeysResponse, ListEphemeralKeysResponses, ListFactsData, ListFactsError, ListFactsErrors, ListFactsResponse, ListFactsResponses, ListGenerationsData, ListGenerationsError, ListGenerationsErrors, ListGenerationsResponse, ListGenerationsResponses, ListKnowledgeCategoriesData, ListKnowledgeCategoriesError, ListKnowledgeCategoriesErrors, ListKnowledgeCategoriesResponse, ListKnowledgeCategoriesResponses, ListKnowledgeData, ListKnowledgeError, ListKnowledgeErrors, ListKnowledgeResponse, ListKnowledgeResponses, ListMemoriesData, ListMemoriesError, ListMemoriesErrors, ListMemoriesResponse, ListMemoriesResponses, ListRelationsData, ListRelationsError, ListRelationsErrors, ListRelationsResponse, ListRelationsResponses, ListScheduledMessagesData, ListScheduledMessagesError, ListScheduledMessagesErrors, ListScheduledMessagesResponse, ListScheduledMessagesResponses, ListSessionsData, ListSessionsError, ListSessionsErrors, ListSessionsResponse, ListSessionsResponses, ListSkyboxStylesData, ListSkyboxStylesError, ListSkyboxStylesErrors, ListSkyboxStylesResponse, ListSkyboxStylesResponses, ListTemplatesData, ListTemplatesError, ListTemplatesErrors, ListTemplatesResponse, ListTemplatesResponses, ListToolCallsData, ListToolCallsError, ListToolCallsErrors, ListToolCallsResponse, ListToolCallsResponses, ListToolsData, ListToolsError, ListToolsErrors, ListToolsResponse, ListToolsResponses, ListVoicesData, ListVoicesError, ListVoicesErrors, ListVoicesResponse, ListVoicesResponses, MemoriesDeleted, MemoriesWrittenInfo, MemoryCitation, MemoryInfo, MemoryPage, MessageContext, MessageInfo, MessageKnowledge, MessageMemories, MessageNote, MessagePage, MessageSource, MessageToolCall, MoveAssetsData, MoveAssetsError, MoveAssetsErrors, MoveAssetsResponse, MoveAssetsResponses, NoteCreateRequest, NoteTaken, OrgPlan, PlatformLimit, PlatformLimitPage, PostSessionToolResultData, PostSessionToolResultError, PostSessionToolResultErrors, PostSessionToolResultResponse, PostSessionToolResultResponses, PostToolResultData, PostToolResultError, PostToolResultErrors, PostToolResultResponse, PostToolResultResponses, ProviderVoiceSettings, ProviderVoiceSettingsInfo, PublishAgentDraftData, PublishAgentDraftError, PublishAgentDraftErrors, PublishAgentDraftResponse, PublishAgentDraftResponses, Reference, ReferenceInfo, RefreshKnowledgeData, RefreshKnowledgeError, RefreshKnowledgeErrors, RefreshKnowledgeResponse, RefreshKnowledgeResponses, ReindexKnowledgeData, ReindexKnowledgeError, ReindexKnowledgeErrors, ReindexKnowledgeResponse, ReindexKnowledgeResponses, RelationInfo, RelationPage, ReportAgentVersion, ReportDelivery, ReportLine, ResampleVoiceData, ResampleVoiceError, ResampleVoiceErrors, ResampleVoiceResponse, ResampleVoiceResponses, RestoreAgentVersionData, RestoreAgentVersionError, RestoreAgentVersionErrors, RestoreAgentVersionResponse, RestoreAgentVersionResponses, RevokeEphemeralKeyData, RevokeEphemeralKeyError, RevokeEphemeralKeyErrors, RevokeEphemeralKeyResponse, RevokeEphemeralKeyResponses, RotateToolSecretData, RotateToolSecretError, RotateToolSecretErrors, RotateToolSecretResponse, RotateToolSecretResponses, RotateWebhookSecretData, RotateWebhookSecretError, RotateWebhookSecretErrors, RotateWebhookSecretResponse, RotateWebhookSecretResponses, SafetyInfo, SaveDesignedVoiceData, SaveDesignedVoiceError, SaveDesignedVoiceErrors, SaveDesignedVoiceResponse, SaveDesignedVoiceResponses, ScheduledMessage, ScheduledMessageCreateRequest, ScheduledMessageDelivery, ScheduledMessagePage, SearchKnowledgeData, SearchKnowledgeError, SearchKnowledgeErrors, SearchKnowledgeResponse, SearchKnowledgeResponses, SessionCreateRequest, SessionDetail, SessionInfo, SessionPage, SetAgentKnowledgeData, SetAgentKnowledgeError, SetAgentKnowledgeErrors, SetAgentKnowledgeResponse, SetAgentKnowledgeResponses, SetAgentToolsData, SetAgentToolsError, SetAgentToolsErrors, SetAgentToolsResponse, SetAgentToolsResponses, SetKnowledgeAgentsData, SetKnowledgeAgentsError, SetKnowledgeAgentsErrors, SetKnowledgeAgentsResponse, SetKnowledgeAgentsResponses, SkyboxFile, SkyboxRequest, SkyboxStyle, SkyboxStylePage, SpeechProvider, StreamDone, StreamError, StreamSegment, StreamTranscript, SynthesizeSpeechData, SynthesizeSpeechError, SynthesizeSpeechErrors, SynthesizeSpeechResponse, SynthesizeSpeechResponses, TemplateGenerateRequest, TemplateInfo, TemplateInput, TemplatePage, TestAgentWebhookData, TestAgentWebhookError, TestAgentWebhookErrors, TestAgentWebhookResponse, TestAgentWebhookResponses, TestToolData, TestToolError, TestToolErrors, TestToolResponse, TestToolResponses, TokenSelf, ToolCall, ToolCallPage, ToolCreate, ToolInfo, ToolPage, ToolResultRequest, ToolResultTaken, ToolsAssigned, ToolTestRequest, ToolTestResult, ToolUpdate, ToolWithSecret, TranscribeAssetRequest, TranscribeData, TranscribeError, TranscribeErrors, TranscribeResponse, TranscribeResponses, Transcription, TranscriptionStreamLine, TranscriptWord, TtsOptions, TtsRequest, UnansweredQuestion, UpdateAgentData, UpdateAgentDraftData, UpdateAgentDraftError, UpdateAgentDraftErrors, UpdateAgentDraftResponse, UpdateAgentDraftResponses, UpdateAgentError, UpdateAgentErrors, UpdateAgentResponse, UpdateAgentResponses, UpdateAgentSettingsData, UpdateAgentSettingsError, UpdateAgentSettingsErrors, UpdateAgentSettingsResponse, UpdateAgentSettingsResponses, UpdateAssetData, UpdateAssetError, UpdateAssetErrors, UpdateAssetFolderData, UpdateAssetFolderError, UpdateAssetFolderErrors, UpdateAssetFolderResponse, UpdateAssetFolderResponses, UpdateAssetResponse, UpdateAssetResponses, UpdateEndUserData, UpdateEndUserError, UpdateEndUserErrors, UpdateEndUserFactData, UpdateEndUserFactError, UpdateEndUserFactErrors, UpdateEndUserFactResponse, UpdateEndUserFactResponses, UpdateEndUserPersonalizationData, UpdateEndUserPersonalizationError, UpdateEndUserPersonalizationErrors, UpdateEndUserPersonalizationResponse, UpdateEndUserPersonalizationResponses, UpdateEndUserResponse, UpdateEndUserResponses, UpdateFactData, UpdateFactError, UpdateFactErrors, UpdateFactResponse, UpdateFactResponses, UpdateKnowledgeData, UpdateKnowledgeError, UpdateKnowledgeErrors, UpdateKnowledgeResponse, UpdateKnowledgeResponses, UpdateToolData, UpdateToolError, UpdateToolErrors, UpdateToolResponse, UpdateToolResponses, UpdateVoiceData, UpdateVoiceError, UpdateVoiceErrors, UpdateVoiceResponse, UpdateVoiceResponses, UploadConfirm, UploadTicket, UploadTicketRequest, UsageByKey, UsageDay, UsageResponse, UsageSummary, ValidationIssue, Variables, VariantInfo, VideoRequest, VoiceDesignPreview, VoiceDesignRequest, VoiceDesignResult, VoiceDesignSaveRequest, VoiceDetail, VoiceInfo, VoiceInfoPage, VoiceKind, VoiceSample, VoiceSource, VoiceStatus, VoiceUpdate, VoiceUpload, VoiceUploadRequest, VoiceUploadTicket, WebhookSecret, WebhookTestResult, WriteSessionMemoriesData, WriteSessionMemoriesError, WriteSessionMemoriesErrors, WriteSessionMemoriesResponse, WriteSessionMemoriesResponses } from './types.gen.js';
@@ -165,6 +165,10 @@ export type EphemeralKeyCreateResponse = {
165
165
  */
166
166
  settled_at: string | null;
167
167
  active: boolean;
168
+ /**
169
+ * A test chat's key: its conversations run the agent's unpublished draft, and only it sees them. See `draft` on the mint.
170
+ */
171
+ draft: boolean;
168
172
  /**
169
173
  * The token, in full. **Shown once**: it is signed rather than stored, so it cannot be shown again.
170
174
  */
@@ -181,6 +185,10 @@ export type EphemeralKeyCreateRequest = {
181
185
  agent_ids?: Array<string> | null;
182
186
  label?: string | null;
183
187
  overrides?: EphemeralKeyOverrides | null;
188
+ /**
189
+ * A test chat's key: its conversations run the agent's unpublished draft (`PATCH /v1/agents/{agent_id}/draft`) — the live agent where nothing is pending — so you can try changes before players get them. It opens, lists, reads and connects to its own test chats only, and no other key ever sees one. Minted only with a key holding `agent:write`, and pinned to exactly one agent in `agent_ids`. Its conversations' reports and messages the agent writes first are posted with `test: true`. Your organisation pays for its turns, as for any key.
190
+ */
191
+ draft?: boolean;
184
192
  };
185
193
  /**
186
194
  * What this key changes for the conversations it talks in: the language, the voice, the opening line and extra instructions. Signed into the key, so the person's app cannot change them; never the model. A key whose overrides make it longer than 16,384 characters is a 422 — text in scripts of 3 or 4 bytes a character, at every maximum.
@@ -252,6 +260,10 @@ export type EphemeralKeyInfo = {
252
260
  */
253
261
  settled_at: string | null;
254
262
  active: boolean;
263
+ /**
264
+ * A test chat's key: its conversations run the agent's unpublished draft, and only it sees them. See `draft` on the mint.
265
+ */
266
+ draft: boolean;
255
267
  };
256
268
  export type TokenSelf = ({
257
269
  kind: 'ephemeral';
@@ -1316,6 +1328,10 @@ export type SessionDetail = {
1316
1328
  title: string | null;
1317
1329
  turn_seq: number;
1318
1330
  updated_at: string;
1331
+ /**
1332
+ * A test chat: opened with a draft key (`draft` on `POST /v1/ephemeral-keys`), it runs the agent's unpublished draft, and only draft keys see it — never a player's.
1333
+ */
1334
+ draft: boolean;
1319
1335
  messages: MessagePage;
1320
1336
  /**
1321
1337
  * How this agent stands with this person, as the conversation opens.
@@ -1376,6 +1392,10 @@ export type MessageInfo = {
1376
1392
  * The agent that had the conversation when this was said: the conversation's own, or — after one agent handed it to another — the one that had it then. A person's message names the agent that answered it.
1377
1393
  */
1378
1394
  agent_id: string;
1395
+ /**
1396
+ * On a reply: the agent's [version](/agents/versions) that wrote it — v5 is `5` — so you can tell which version said what. Null on the person's messages, and on a reply written before versions.
1397
+ */
1398
+ agent_version: number | null;
1379
1399
  /**
1380
1400
  * On a reply: the web pages it read, with the agent's `url_context` switch on. Empty when it read none, and on the person's messages.
1381
1401
  */
@@ -1612,6 +1632,10 @@ export type SessionInfo = {
1612
1632
  title: string | null;
1613
1633
  turn_seq: number;
1614
1634
  updated_at: string;
1635
+ /**
1636
+ * A test chat: opened with a draft key (`draft` on `POST /v1/ephemeral-keys`), it runs the agent's unpublished draft, and only draft keys see it — never a player's.
1637
+ */
1638
+ draft: boolean;
1615
1639
  };
1616
1640
  export type CompactionInfo = {
1617
1641
  /**
@@ -2166,7 +2190,7 @@ export type AgentSummary = {
2166
2190
  created_at: string;
2167
2191
  updated_at: string;
2168
2192
  /**
2169
- * Moves by one on every save. Send it back as `expected_version` on an update to have the save refused (409) if somebody else changed the agent since you read it.
2193
+ * The agent's version — v5 is `5`. **Every change players see makes the next one**: a save that changes something, its tools or knowledge entries assigned, a version restored; a save that changes nothing leaves it. Its history is `GET /v1/agents/{agent_id}/versions`. Send it back as `expected_version` on an update to have the save refused (409) if the agent changed since you read it.
2170
2194
  */
2171
2195
  version: number;
2172
2196
  /**
@@ -2573,7 +2597,7 @@ export type AgentInfo = {
2573
2597
  created_at: string;
2574
2598
  updated_at: string;
2575
2599
  /**
2576
- * Moves by one on every save. Send it back as `expected_version` on an update to have the save refused (409) if somebody else changed the agent since you read it.
2600
+ * The agent's version — v5 is `5`. **Every change players see makes the next one**: a save that changes something, its tools or knowledge entries assigned, a version restored; a save that changes nothing leaves it. Its history is `GET /v1/agents/{agent_id}/versions`. Send it back as `expected_version` on an update to have the save refused (409) if the agent changed since you read it.
2577
2601
  */
2578
2602
  version: number;
2579
2603
  };
@@ -3079,7 +3103,495 @@ export type WebhookSecret = {
3079
3103
  */
3080
3104
  secret_hint: string;
3081
3105
  };
3082
- export type AgentUpdate = {
3106
+ export type AgentUpdate = {
3107
+ /**
3108
+ * Whether a report is written after each conversation with this agent, for your server: a summary, the fields you list in `report_fields`, success by `report_success`, and its numbers. **Off by default**: each report is a model call, charged to the conversation's key while it has credit and to your balance after.
3109
+ *
3110
+ * A conversation is over when the app sends `end` on the socket, or after five minutes with no turn; a person who comes back later gets a new report of only the new part. Read reports with `GET /v1/end-users/{end_user_id}/reports`.
3111
+ */
3112
+ report_enabled?: boolean | null;
3113
+ /**
3114
+ * What a conversation's report fills, besides its summary, at most 20: each read from the conversation by the model, `null` when the conversation did not say. Old Bram the shopkeeper's might be `quest_started` (yes or no) and `item` (text). The complete list, in order: `null` or `[]` clears it.
3115
+ */
3116
+ report_fields?: Array<AgentReportField> | null;
3117
+ /**
3118
+ * What counts as a success, in plain words the model judges each conversation by: `success = the problem was solved`. A report's `success` is `true` or `false` by it; unset, `null`. At most 1000 characters.
3119
+ */
3120
+ report_success?: string | null;
3121
+ /**
3122
+ * Anything else the report should follow, added to the platform's request: `Write the summary in English.` At most 2000 characters.
3123
+ */
3124
+ report_instruction?: string | null;
3125
+ /**
3126
+ * Model for writing a conversation's report. Unset uses the agent's own.
3127
+ */
3128
+ report_model?: string | null;
3129
+ /**
3130
+ * Thinking level for the report. Unset sends none, so the model's own default applies.
3131
+ */
3132
+ report_thinking_level?: 'minimal' | 'low' | 'medium' | 'high' | null;
3133
+ /**
3134
+ * Length cap on a report's answer, in tokens — the model's thinking included. Unset sends none.
3135
+ */
3136
+ report_max_output_tokens?: number | null;
3137
+ /**
3138
+ * Whether a report carries the messages it read, as `transcript` — in the webhook and on the API. Off by default: a report says what happened; the transcript is the conversation again, up to 200,000 characters.
3139
+ */
3140
+ report_transcript?: boolean | null;
3141
+ /**
3142
+ * Where this agent's events go — a conversation's report, signed with your organisation's webhook secret: an `https://` address of yours. Unset uses your organisation's `webhook_url` (`/v1/agents/settings`). Refused (422) until your organisation has a secret: `POST /v1/agents/settings/webhook-secret`.
3143
+ */
3144
+ webhook_url?: string | null;
3145
+ /**
3146
+ * Who the agent talks with, and so how careful it is: `kids` (7 or older), `teens` (13 to 17) or `adults`. **Unset is `adults`**, which changes nothing: the agent's request to the model is what it was before the level existed.
3147
+ *
3148
+ * `kids` and `teens` add the platform's rules for that age to the agent's instructions — nothing frightening, sexual or unkind for a child; nothing graphic or encouraging harm for a teenager — and turn on the model provider's own safety filters for that age. When the person brings up something the rules keep the agent from, it stays in character and changes the subject. The rules and the filters' levels are in the Safety guide, word for word. No extra model call, and no wait: they ride on the request each reply already makes.
3149
+ */
3150
+ age_level?: 'kids' | 'teens' | 'adults' | null;
3151
+ /**
3152
+ * Topics the agent never discusses, in plain words ("real-world politics", "prices"): at most 20, each 1 to 100 characters on one line, no two the same. When the person brings one up, the agent stays in character and changes the subject. At any `age_level`. A topic's words decide what it covers, so name it as narrowly as you mean it. The complete list: `null` or `[]` clears it.
3153
+ */
3154
+ blocked_topics?: Array<string> | null;
3155
+ /**
3156
+ * What the agent says when the model provider's own safety filter holds a reply back, in place of it: one line in the agent's voice, such as "Hmm, let's talk about something else!" — 1 to 300 characters, at any `age_level`. It is said and spoken as any reply, and the turn ends with `turn.done`; a reply held back part-way keeps what it had said, less the sentence it was writing. **Unset, a held-back reply ends with an `error` (`provider_failed`) and `interrupted`**, as before. Never for the opening line. Recommended for `kids` and `teens`, whose filters are stricter.
3157
+ */
3158
+ fallback_message?: string | null;
3159
+ /**
3160
+ * Other agents of yours this one may pass the conversation to, each with when: the agent is offered a tool to hand off, and the agent it hands to answers the person's last message and carries the conversation on, with its own instructions, voice, knowledge and tools. At most 10. The complete list, in order: `null` or `[]` clears it.
3161
+ */
3162
+ handoffs?: Array<AgentHandoff> | null;
3163
+ /**
3164
+ * Whether this agent may write to a person first, while they are away — a message your server schedules with `POST /v1/end-users/{end_user_id}/scheduled-messages`, or one the agent schedules itself when the person asks (`outreach_tool`). **Off by default.**
3165
+ *
3166
+ * A message is one model call, paid from your organisation's balance: the person has no live key while away. It is kept in their conversation with the agent, so it is there when they come back, and your server is sent it to show as a notification.
3167
+ */
3168
+ outreach_enabled?: boolean | null;
3169
+ /**
3170
+ * No message of the agent's own between these times, in the person's time zone: one due then waits for the end — a 23:00 message is written at 08:00. `null` for none.
3171
+ */
3172
+ outreach_quiet_hours?: AgentQuietHours | null;
3173
+ /**
3174
+ * The time zone the agent reads quiet hours in for a person with none of their own — your main market. A person's own is the one your server sets (`time_zone` on `PATCH /v1/end-users/{end_user_id}/personalization`), else the one their app reported. `null` is UTC.
3175
+ */
3176
+ outreach_time_zone?: string | null;
3177
+ /**
3178
+ * Whether the agent may schedule a message itself when the person asks ("remind me at 6") — the platform's tool `schedule_message`, offered only with `outreach_enabled` on. **On by default**: turn it off for your server alone to write.
3179
+ */
3180
+ outreach_tool?: boolean | null;
3181
+ /**
3182
+ * Whether the model may write and run Python while it replies — sums, unit conversions, dates — and answer from what it printed. Gemini's own tool: it runs at Google, with no network, and nothing of yours.
3183
+ *
3184
+ * **No fee, but not free**: the code and its output are model tokens, billed like any reply.
3185
+ */
3186
+ code_execution?: boolean | null;
3187
+ /**
3188
+ * What to tell the model when summarising. Unset uses the organisation's default, then a built-in instruction written for in-character conversations.
3189
+ */
3190
+ compact_instruction?: string | null;
3191
+ /**
3192
+ * Length cap on the summary, in tokens — the model's thinking included, which shares the budget. Unset uses the platform's `agents.memory.compaction.max_output_tokens` on the Limits page.
3193
+ */
3194
+ compact_max_output_tokens?: number | null;
3195
+ /**
3196
+ * Model for the summarising call. Unset uses the agent's own. A compaction only summarises: facts are a call of their own (`fact_model`).
3197
+ */
3198
+ compact_model?: string | null;
3199
+ /**
3200
+ * Thinking level for the summarising call.
3201
+ */
3202
+ compact_thinking_level?: 'minimal' | 'low' | 'medium' | 'high' | null;
3203
+ /**
3204
+ * Compact automatically once a reply's first model call reads this many tokens — the conversation, its summary and the instruction, without the inline knowledge or the turn's looked-up passages, which no summary shrinks. Tool results do not count. Unset uses the platform's default, `agents.memory.compaction.default_threshold_tokens` on the Limits page. At most 200,000, and at least twice what the instruction costs on its own. `POST /v1/agent/sessions/{id}/compact` works whatever it is.
3205
+ */
3206
+ compact_threshold_tokens?: number | null;
3207
+ /**
3208
+ * Whether the model reports its own mood — one line in front of each reply, which is taken off the reply and sent as the socket's `mood` event, and kept on each stored message.
3209
+ *
3210
+ * Costs about six output tokens per turn and no extra model call. The reply text you are handed does not contain the line: a marker with a known label, or with an intensity, or alone on its own line is always removed, and only a marker with an unknown label, no intensity and prose on the same line is left — at that point it cannot be told from a sentence that happens to start with the word.
3211
+ */
3212
+ emotion_enabled?: boolean | null;
3213
+ /**
3214
+ * What the model is told about reporting a mood. Unset uses the organisation's default, then a built-in one naming every supported label.
3215
+ *
3216
+ * **Override this and you own the format.** The gateway strips a first line shaped `mood: <label> <intensity>` — with a label it knows, or with an intensity, or alone on its line — and records a mood only for a label it knows. An instruction that asks for any other shape leaves the model's line in the reply as text and stores no mood.
3217
+ */
3218
+ emotion_instruction?: string | null;
3219
+ /**
3220
+ * The setting the conversation takes place in.
3221
+ */
3222
+ environment?: string | null;
3223
+ /**
3224
+ * What counts as worth remembering. Unset falls back to the organisation's default, then to a built-in instruction.
3225
+ */
3226
+ fact_instruction?: string | null;
3227
+ /**
3228
+ * Length cap on a facts reading's answer, in tokens — the model's thinking included, which shares the budget. Unset sends none: the answer is a short list by its shape.
3229
+ */
3230
+ fact_max_output_tokens?: number | null;
3231
+ /**
3232
+ * Model for reading a conversation for facts — the reading after a conversation goes quiet, and `POST /v1/agent/sessions/{id}/extract`. Unset uses the agent's own. Never compaction's: the two are separate calls.
3233
+ */
3234
+ fact_model?: string | null;
3235
+ /**
3236
+ * Thinking level for the facts reading. Unset sends none, so the model's own default applies.
3237
+ */
3238
+ fact_thinking_level?: 'minimal' | 'low' | 'medium' | 'high' | null;
3239
+ /**
3240
+ * Whether this agent remembers facts about the people it talks to. **On by default**, unlike most switches here.
3241
+ *
3242
+ * Off, its conversations are never read for facts and its turns recall none — nothing is charged for either — and `POST /v1/agent/sessions/{id}/extract` is refused. Facts already stored stay, and other agents still recall the ones they share. Turning it back on reads only what is said from then on.
3243
+ */
3244
+ facts_enabled?: boolean | null;
3245
+ /**
3246
+ * Whose facts this agent sees and adds to. `person` (the default, and what unset means): what any of your agents learnt about the person that shares. `agent`: its own only — what it learns is not recalled by your other agents, and it does not recall theirs.
3247
+ *
3248
+ * A change applies to what it learns from then on: a fact keeps the scope it was learnt under.
3249
+ */
3250
+ facts_scope?: 'person' | 'agent' | null;
3251
+ /**
3252
+ * The agent's opening line — or, with `first_message_generated` on, the direction for one.
3253
+ *
3254
+ * As a line it costs no tokens and is identical every time. As a direction ("say hello and catch up with them") the model writes it fresh, so it can use whatever long-term memory recalled about that person — at the cost of one billed model call.
3255
+ *
3256
+ * **Either way it is delivered as the agent's first turn on `/v1/agent/stream`**, so it is streamed and spoken a sentence at a time like every other reply. Opening a session with `POST /v1/agent/sessions` does not produce it, and an integration that never opens a socket never hears it.
3257
+ *
3258
+ * The agent is not greeted twice: a conversation continued within a few minutes gets no fresh opening line, and `ready.greeting` says which before a frame arrives.
3259
+ */
3260
+ first_message?: string | null;
3261
+ /**
3262
+ * Whether a written opening line (`first_message_generated` on) is shown the topics the agent remembers of the person — their titles, where each stands and when it was last talked about — so it can open with one ("How is Inolab Trials going?"). **On by default.** It is never shown their stories, and cannot search them: the opening is one model call. Off, it is shown the person's facts only. Nothing with `memories_enabled` off, and nothing for a scripted line.
3263
+ */
3264
+ first_message_memories?: boolean | null;
3265
+ /**
3266
+ * Whether `first_message` is a direction for the model rather than the words themselves.
3267
+ *
3268
+ * **The same text means different things under this flag**, and nothing on the server can tell them apart. Turning it off while the text is still written as an instruction shows that instruction to your users verbatim.
3269
+ *
3270
+ * It needs a `first_message` to act on: switched on with the text empty is refused (422), because an agent with a direction to follow and no direction never greets.
3271
+ */
3272
+ first_message_generated?: boolean | null;
3273
+ /**
3274
+ * What it is trying to achieve in the conversation.
3275
+ */
3276
+ goal?: string | null;
3277
+ /**
3278
+ * What it must not do or discuss.
3279
+ */
3280
+ guardrails?: string | null;
3281
+ /**
3282
+ * Whether the agent may use the knowledge entries assigned to it. **Defaults to on**, unlike the other switches here: knowledge works as soon as an entry is assigned, and this only takes it away again.
3283
+ *
3284
+ * Off, the entries are not listed in the system instruction and the `search_knowledge` tool is not declared, so the agent answers as though it had none. **Nothing is deleted or unassigned** — turning it back on restores exactly what was there, which is what makes this the way to try an agent without its reference material.
3285
+ *
3286
+ * Assign entries with `PUT /v1/agents/{agent_id}/knowledge`.
3287
+ */
3288
+ knowledge_enabled?: boolean | null;
3289
+ /**
3290
+ * When knowledge is looked up: search before every reply and hand the model what matches, so it never answers from memory what its material says. **On by default.** Off, the model searches only when it decides to, which is slower when it does and wrong more often when it does not.
3291
+ */
3292
+ knowledge_lookup_first?: boolean | null;
3293
+ /**
3294
+ * Pieces of material a lookup hands the model, 1-8. Unset is the platform's `agents.knowledge.default_results` (`GET /v1/platform/limits`).
3295
+ */
3296
+ knowledge_max_results?: number | null;
3297
+ /**
3298
+ * How the agent reads its knowledge. `auto` (the default, and what unset means) puts the whole text in the prompt while it fits the platform's `agents.knowledge.inline_budget_tokens` — no lookup, nothing to miss — and looks it up beyond that. `prompt` puts it in the prompt up to the platform's `agents.knowledge.prompt_cap_tokens` (each turn's first word is slower the more there is). `lookup` always looks it up. Both are on `GET /v1/platform/limits`.
3299
+ */
3300
+ knowledge_mode?: 'auto' | 'prompt' | 'lookup' | null;
3301
+ /**
3302
+ * The most of the person's facts put in front of the model, 1-100. Unset is as many as fit in the platform's `agents.memory.recall.budget_chars` (`GET /v1/platform/limits`; 6,000 characters is some 1,500 tokens). When they do not all fit, the ones a conversation confirmed or learnt most recently go in. They are prompt tokens on every turn.
3303
+ */
3304
+ max_facts?: number | null;
3305
+ /**
3306
+ * Cap on reply length. Unset means the model's own limit.
3307
+ */
3308
+ max_output_tokens?: number | null;
3309
+ /**
3310
+ * Whether this agent keeps **memories** of the people it talks to — one per topic of their life, rewritten whenever a conversation comes back to it. **On by default**, as `facts_enabled`.
3311
+ *
3312
+ * Once a conversation has been quiet for the platform's `agents.memory.idle_minutes`, it is read for the topics worth keeping, after its facts, in a model call of its own charged to the key; a conversation in which the person said little is read for nothing and costs nothing. Off, its conversations are never read for memories. Memories already kept stay.
3313
+ */
3314
+ memories_enabled?: boolean | null;
3315
+ /**
3316
+ * Whose memories this agent sees and adds to. `person` (the default, and what unset means): every agent of yours that shares, so the topic one agent started another continues. `agent`: its own only. A memory keeps the scope it was made under.
3317
+ */
3318
+ memories_scope?: 'person' | 'agent' | null;
3319
+ /**
3320
+ * The categories a memory may take, in your words: at most 12 of 40 characters each; the last is where a memory that fits none goes. Unset is the platform's `agents.memory.memories.default_categories`.
3321
+ */
3322
+ memory_categories?: Array<string> | null;
3323
+ /**
3324
+ * What is worth keeping as a memory. Unset uses the platform's built-in instruction, which leaves out health, beliefs and the like unless the person asked. The platform's own rules — no instructions, no claimed standing, no secrets — follow it whatever it says.
3325
+ */
3326
+ memory_instruction?: string | null;
3327
+ /**
3328
+ * Length cap on a memory reading's answer, in tokens — the model's thinking included. Unset sends none.
3329
+ */
3330
+ memory_max_output_tokens?: number | null;
3331
+ /**
3332
+ * Model for reading a conversation for memories. Unset uses the agent's own. Never `fact_model` or `compact_model`: each is its own call.
3333
+ */
3334
+ memory_model?: string | null;
3335
+ /**
3336
+ * Thinking level for the memory reading. Unset sends none, so the model's own default applies.
3337
+ */
3338
+ memory_thinking_level?: 'minimal' | 'low' | 'medium' | 'high' | null;
3339
+ /**
3340
+ * Gemini model id. `null` or empty returns it to the default, the platform's `agents.model` (`GET /v1/platform/limits`).
3341
+ */
3342
+ model?: string | null;
3343
+ /**
3344
+ * Human-readable name. Shown in the console; never sent to the model.
3345
+ */
3346
+ name?: string;
3347
+ /**
3348
+ * Who the agent is — character, background, quirks.
3349
+ */
3350
+ personality?: string | null;
3351
+ /**
3352
+ * Whether the agent keeps a standing relationship with each person it talks to — warmth, trust and how well they know each other, carried across every conversation with that end user and never forgotten.
3353
+ *
3354
+ * Turning this on declares a tool the model calls when something changes its view of them. **It adds no latency to an ordinary turn**: the provider returns the reply and the tool call together, and the call is answered on the next turn. The one exception is a reply that is only the call with no words in it, which costs a second model call to write them.
3355
+ *
3356
+ * Read it with `GET /v1/agent/relations`.
3357
+ */
3358
+ relation_enabled?: boolean | null;
3359
+ /**
3360
+ * What the model is told about the relationship it keeps. Unset uses the organisation's default, then a built-in one.
3361
+ *
3362
+ * This is the *disposition* — that the history is real and that most replies should record nothing. The tool's own description covers the mechanism, and is not configurable.
3363
+ */
3364
+ relation_instruction?: string | null;
3365
+ /**
3366
+ * How a streamed reply is cut into pieces for speech, smallest first - for example `[60, 160, 250]`. Ascending; a schedule out of order is refused.
3367
+ *
3368
+ * **Only `/v1/agent/stream` uses this**; a buffered turn has the whole reply before it speaks and nothing to schedule.
3369
+ *
3370
+ * The **first** number is the one that matters: it decides how much text must arrive before the agent starts talking, so lowering it starts speech sooner. There is a floor worth knowing - a chunk has to be generated faster than the previous one plays, so a first chunk under roughly 50 characters starts sooner and then runs out of audio before the next piece exists, which is heard as a stutter rather than as a fast reply. Later numbers trade first-audio latency for prosody: a longer piece is spoken with better intonation because the model can see more of the sentence at once.
3371
+ *
3372
+ * Omit it to use your organisation's default, and then the platform's.
3373
+ */
3374
+ stream_chunk_schedule?: Array<number> | null;
3375
+ /**
3376
+ * How a spoken turn is transcribed — the model, the language hint, and the sample rate a client sends PCM at on `/v1/agent/stream`. Only what you set is stored: a model left unset follows the platform's default.
3377
+ *
3378
+ * **Defaults, not policy.** `user_audio.start` may name any of these per turn and what it names wins. There is no switch for hearing, and no scope of its own: a credential that may talk to an agent may speak to it, exactly as it has always been able to hear it speak back.
3379
+ */
3380
+ stt_config?: AgentStt | null;
3381
+ /**
3382
+ * How hard the model thinks before answering. `minimal` is fastest to first token; `medium` is the model's own default. Unset means the model decides.
3383
+ */
3384
+ thinking_level?: 'minimal' | 'low' | 'medium' | 'high' | null;
3385
+ /**
3386
+ * Whether a readable summary of the reasoning is returned.
3387
+ */
3388
+ thinking_summaries?: 'auto' | 'none' | null;
3389
+ /**
3390
+ * How it speaks: register, pacing, verbosity.
3391
+ */
3392
+ tone?: string | null;
3393
+ /**
3394
+ * Whether the model may read a web page by its address while it replies, when the person gives one or one is in its instructions. Gemini's own tool: the page is fetched by Google. The pages it read come back as the reply's `sources`.
3395
+ *
3396
+ * **No fee, but not free**: a page's text is model tokens, billed like any reply — a long page can be thousands. A page is untrusted input: what it says reaches the model, so the most it can steer the agent towards is the agent's own tools, and a tool marked `ask_first` still needs the person.
3397
+ */
3398
+ url_context?: boolean | null;
3399
+ /**
3400
+ * Voice and model settings.
3401
+ *
3402
+ * **A speaking agent speaks on `eleven_flash_v2_5` or `eleven_multilingual_v2` with an ElevenLabs voice, and on `inworld-tts-2-flash` or `inworld-tts-2` with an Inworld one** — unset, the voice's provider's fastest — with any voice from `GET /v1/voices` that offers it. `eleven_v3` is refused with 422 when `voice_enabled` is true: it cannot stream over the socket agents use. An agent that does not speak may leave this unset.
3403
+ */
3404
+ voice_config?: AgentVoice | null;
3405
+ /**
3406
+ * Whether replies come back as audio as well as text.
3407
+ *
3408
+ * Speech is generated after the reply and adds its own latency — roughly a fifth of the spoken duration. A caller can override this per turn with `speech` on the socket's `user_message` or `user_audio.start`.
3409
+ */
3410
+ voice_enabled?: boolean | null;
3411
+ /**
3412
+ * The `version` you last read for this agent. When set and the agent has been changed since, the update is refused with 409 and nothing is written - re-read it and decide again. Omit it to write unconditionally.
3413
+ */
3414
+ expected_version?: number | null;
3415
+ /**
3416
+ * Why you made this change, up to 500 characters: kept with the version it makes and shown in the agent's history.
3417
+ */
3418
+ version_note?: string | null;
3419
+ };
3420
+ export type AgentVersionPage = {
3421
+ data: Array<AgentVersionSummary>;
3422
+ /**
3423
+ * Pass as `cursor` for the next page; `null` when this is the last.
3424
+ */
3425
+ next_cursor: string | null;
3426
+ };
3427
+ export type AgentVersionSummary = {
3428
+ /**
3429
+ * Its number: the agent's `version` when it was made. Recorded on every reply it wrote, every report and every message the agent wrote first, so you can tell which version said what.
3430
+ */
3431
+ version: number;
3432
+ /**
3433
+ * Players have this version: it is the agent's `version` now.
3434
+ */
3435
+ live: boolean;
3436
+ /**
3437
+ * How it was made: `created` with the agent; `saved` by a change made live — an update, its tools or knowledge entries assigned, a handoff target deleted; `published` from a draft; `restored` from an earlier version (`restored_from`); `existing` — the version the agent was on when its history began.
3438
+ */
3439
+ source: 'created' | 'saved' | 'published' | 'restored' | 'existing';
3440
+ /**
3441
+ * The version a restore put back; `null` otherwise.
3442
+ */
3443
+ restored_from: number | null;
3444
+ /**
3445
+ * The note given with the change — `version_note` on an update, `note` on a restore — or `null`.
3446
+ */
3447
+ note: string | null;
3448
+ /**
3449
+ * What changed from the version before it: the agent's fields by name, and `tools` and `knowledge` for what was assigned. `null` when the version before it is no longer kept, or there is none.
3450
+ */
3451
+ changes: Array<string> | null;
3452
+ created_at: string;
3453
+ /**
3454
+ * The dashboard member who made it, or `null`.
3455
+ */
3456
+ created_by_clerk_user_id: string | null;
3457
+ /**
3458
+ * That member's email, as it was when they made it; `null` when unknown.
3459
+ */
3460
+ created_by_email: string | null;
3461
+ /**
3462
+ * The API key that made it, or `null`. With all three `null`, the platform made it — a handoff target deleted, or the version recorded when the history began.
3463
+ */
3464
+ created_by_api_key_id: string | null;
3465
+ };
3466
+ export type AgentVersion = {
3467
+ /**
3468
+ * Its number: the agent's `version` when it was made. Recorded on every reply it wrote, every report and every message the agent wrote first, so you can tell which version said what.
3469
+ */
3470
+ version: number;
3471
+ /**
3472
+ * Players have this version: it is the agent's `version` now.
3473
+ */
3474
+ live: boolean;
3475
+ /**
3476
+ * How it was made: `created` with the agent; `saved` by a change made live — an update, its tools or knowledge entries assigned, a handoff target deleted; `published` from a draft; `restored` from an earlier version (`restored_from`); `existing` — the version the agent was on when its history began.
3477
+ */
3478
+ source: 'created' | 'saved' | 'published' | 'restored' | 'existing';
3479
+ /**
3480
+ * The version a restore put back; `null` otherwise.
3481
+ */
3482
+ restored_from: number | null;
3483
+ /**
3484
+ * The note given with the change — `version_note` on an update, `note` on a restore — or `null`.
3485
+ */
3486
+ note: string | null;
3487
+ /**
3488
+ * What changed from the version before it: the agent's fields by name, and `tools` and `knowledge` for what was assigned. `null` when the version before it is no longer kept, or there is none.
3489
+ */
3490
+ changes: Array<string> | null;
3491
+ created_at: string;
3492
+ /**
3493
+ * The dashboard member who made it, or `null`.
3494
+ */
3495
+ created_by_clerk_user_id: string | null;
3496
+ /**
3497
+ * That member's email, as it was when they made it; `null` when unknown.
3498
+ */
3499
+ created_by_email: string | null;
3500
+ /**
3501
+ * The API key that made it, or `null`. With all three `null`, the platform made it — a handoff target deleted, or the version recorded when the history began.
3502
+ */
3503
+ created_by_api_key_id: string | null;
3504
+ agent: AgentInfo;
3505
+ /**
3506
+ * The tools it had that are still in your library. A tool's own settings are not part of a version: an edit to a tool reaches every version.
3507
+ */
3508
+ tool_ids: Array<string>;
3509
+ /**
3510
+ * The knowledge entries it had that are still in your library. Their text is not part of a version: entries are shared by your agents.
3511
+ */
3512
+ knowledge_entry_ids: Array<string>;
3513
+ /**
3514
+ * Tools it had that have been deleted since.
3515
+ */
3516
+ deleted_tools: number;
3517
+ /**
3518
+ * Knowledge entries it had that have been deleted since.
3519
+ */
3520
+ deleted_knowledge_entries: number;
3521
+ };
3522
+ export type AgentRestored = {
3523
+ agent: AgentInfo;
3524
+ /**
3525
+ * What the version named that is gone, and so was not put back.
3526
+ */
3527
+ left_out: {
3528
+ /**
3529
+ * Tools the version had that have been deleted since.
3530
+ */
3531
+ tool_ids: Array<string>;
3532
+ /**
3533
+ * Knowledge entries the version had that have been deleted since.
3534
+ */
3535
+ knowledge_entry_ids: Array<string>;
3536
+ /**
3537
+ * Agents it handed conversations to that have been deleted since.
3538
+ */
3539
+ handoff_agent_ids: Array<string>;
3540
+ };
3541
+ };
3542
+ export type AgentVersionRestore = {
3543
+ /**
3544
+ * Why you put it back, up to 500 characters: kept with the version the restore makes.
3545
+ */
3546
+ note?: string | null;
3547
+ /**
3548
+ * The agent's `version` you last read. When set and the agent has changed since, the restore is refused with 409 and nothing is written.
3549
+ */
3550
+ expected_version?: number | null;
3551
+ };
3552
+ export type AgentDraft = {
3553
+ agent: AgentInfo;
3554
+ /**
3555
+ * The tools the agent would have: live's, with the draft's added and taken away.
3556
+ */
3557
+ tool_ids: Array<string>;
3558
+ /**
3559
+ * The knowledge entries it would have: live's, with the draft's given and taken away.
3560
+ */
3561
+ knowledge_entry_ids: Array<string>;
3562
+ /**
3563
+ * Whether the draft changes anything. `false`: the draft is the agent as players have it.
3564
+ */
3565
+ pending: boolean;
3566
+ /**
3567
+ * What the draft changes from the version players have, by field, with `tools` and `knowledge` for what it assigns. Empty when nothing is pending.
3568
+ */
3569
+ changes: Array<string>;
3570
+ /**
3571
+ * What publishing it would refuse today — a model and thinking level that no longer go together after a live change, say. Empty when it would publish.
3572
+ */
3573
+ problems: Array<{
3574
+ field: string | null;
3575
+ message: string;
3576
+ }>;
3577
+ /**
3578
+ * The draft's own number: moves on every save of the draft, a publish and a discard, and is never reused. Send it back as `expected_version` on a draft's save, publish or discard to have it refused (409) if somebody else changed the draft since you read it.
3579
+ */
3580
+ version: number;
3581
+ /**
3582
+ * The agent's `version` players have now.
3583
+ */
3584
+ live_version: number;
3585
+ /**
3586
+ * The agent's `version` when the draft began; `null` with nothing pending. When it is not `live_version`, the agent changed live since — the draft's changes are laid over what players have now.
3587
+ */
3588
+ base_version: number | null;
3589
+ updated_at: string | null;
3590
+ updated_by_clerk_user_id: string | null;
3591
+ updated_by_email: string | null;
3592
+ updated_by_api_key_id: string | null;
3593
+ };
3594
+ export type AgentDraftUpdate = {
3083
3595
  /**
3084
3596
  * Whether a report is written after each conversation with this agent, for your server: a summary, the fields you list in `report_fields`, success by `report_success`, and its numbers. **Off by default**: each report is a model call, charged to the conversation's key while it has credit and to your balance after.
3085
3597
  *
@@ -3313,7 +3825,7 @@ export type AgentUpdate = {
3313
3825
  */
3314
3826
  memory_thinking_level?: 'minimal' | 'low' | 'medium' | 'high' | null;
3315
3827
  /**
3316
- * Gemini model id. `null` or empty returns it to the default, the platform's `agents.model` (`GET /v1/platform/limits`).
3828
+ * Gemini model id. Defaults to the platform's `agents.model` (`GET /v1/platform/limits`).
3317
3829
  */
3318
3830
  model?: string | null;
3319
3831
  /**
@@ -3385,7 +3897,25 @@ export type AgentUpdate = {
3385
3897
  */
3386
3898
  voice_enabled?: boolean | null;
3387
3899
  /**
3388
- * The `version` you last read for this agent. When set and the agent has been changed since, the update is refused with 409 and nothing is written - re-read it and decide again. Omit it to write unconditionally.
3900
+ * The whole set of tools the agent would have, by `tl_…`; omitted, the draft's as they are. Ids not yours are left out.
3901
+ */
3902
+ tool_ids?: Array<string>;
3903
+ /**
3904
+ * The whole set of knowledge entries the agent would have; omitted, the draft's as they are. Ids not yours are left out.
3905
+ */
3906
+ knowledge_entry_ids?: Array<string>;
3907
+ /**
3908
+ * The draft's `version` you last read. When set and the draft has been changed since, the save is refused with 409 and nothing is written.
3909
+ */
3910
+ expected_version?: number | null;
3911
+ };
3912
+ export type AgentDraftPublish = {
3913
+ /**
3914
+ * Why, up to 500 characters: kept with the version it makes.
3915
+ */
3916
+ note?: string | null;
3917
+ /**
3918
+ * The draft's `version` you last read: refused with 409 when the draft changed since, so what you reviewed is what is published.
3389
3919
  */
3390
3920
  expected_version?: number | null;
3391
3921
  };
@@ -3603,6 +4133,14 @@ export type ConversationReport = {
3603
4133
  * Every agent that spoke in the part reported, in order of first word: more than one when an agent handed the conversation on.
3604
4134
  */
3605
4135
  agent_ids: Array<string>;
4136
+ /**
4137
+ * Every agent and [version](/agents/versions) that replied in the part, in the order they first did: one, unless a new version was published or an agent handed the conversation on while it ran. Group reports by it to see how each version did.
4138
+ */
4139
+ agent_versions: Array<ReportAgentVersion>;
4140
+ /**
4141
+ * Written in a test chat, on the agent's unpublished draft (`draft` on `POST /v1/ephemeral-keys`), not a player's conversation; its webhook post says `test: true`. Skip it where you count what players did.
4142
+ */
4143
+ draft: boolean;
3606
4144
  /**
3607
4145
  * What made it due: `ended`, the app sent `end`; `quiet`, five minutes with no turn; `max_wait`, a conversation that never went quiet, reported after the platform's `agents.memory.max_wait_hours`.
3608
4146
  */
@@ -3668,6 +4206,13 @@ export type ConversationReport = {
3668
4206
  */
3669
4207
  transcript: Array<ReportLine> | null;
3670
4208
  };
4209
+ export type ReportAgentVersion = {
4210
+ agent_id: string;
4211
+ /**
4212
+ * Its [version](/agents/versions) — v5 is `5`; `null` for a reply written before versions.
4213
+ */
4214
+ version: number | null;
4215
+ };
3671
4216
  export type ReportDelivery = {
3672
4217
  /**
3673
4218
  * `none`: the agent had no webhook address when it was written; `pending`: being posted, and tried again while your server does not answer a 2xx; `delivered`; `failed`: not taken within the platform's `agents.webhooks.retry_minutes`.
@@ -3698,6 +4243,10 @@ export type ReportLine = {
3698
4243
  * The agent that had the conversation; `null` for its first.
3699
4244
  */
3700
4245
  agent_id: string | null;
4246
+ /**
4247
+ * On the agent's message: its [version](/agents/versions) that wrote it. `null` on the person's, and on one written before versions.
4248
+ */
4249
+ agent_version: number | null;
3701
4250
  created_at: string;
3702
4251
  };
3703
4252
  export type ScheduledMessage = {
@@ -3752,6 +4301,10 @@ export type ScheduledMessage = {
3752
4301
  * What the agent wrote; null until it is written.
3753
4302
  */
3754
4303
  text: string | null;
4304
+ /**
4305
+ * The agent's [version](/agents/versions) that wrote it; null until it is written.
4306
+ */
4307
+ agent_version: number | null;
3755
4308
  /**
3756
4309
  * `away` when it was written with no app connected — show it as a notification; `socket` when the person's app was on the conversation and heard it there. Null until written.
3757
4310
  */
@@ -4815,7 +5368,7 @@ export type CreateEphemeralKeyErrors = {
4815
5368
  */
4816
5369
  403: ErrorResponse;
4817
5370
  /**
4818
- * Scopes other than ["agent"], a minting key without `agent`, an unknown end user, or a limit out of range
5371
+ * Scopes other than ["agent"], a minting key without `agent`, an unknown end user, a limit out of range, or a draft key minted without `agent:write` or for other than one agent
4819
5372
  */
4820
5373
  422: ErrorResponse;
4821
5374
  /**
@@ -7509,6 +8062,298 @@ export type UpdateAgentResponses = {
7509
8062
  200: AgentInfo;
7510
8063
  };
7511
8064
  export type UpdateAgentResponse = UpdateAgentResponses[keyof UpdateAgentResponses];
8065
+ export type ListAgentVersionsData = {
8066
+ body?: never;
8067
+ path: {
8068
+ agent_id: string;
8069
+ };
8070
+ query?: never;
8071
+ url: '/v1/agents/{agent_id}/versions';
8072
+ };
8073
+ export type ListAgentVersionsErrors = {
8074
+ /**
8075
+ * Missing or invalid credentials
8076
+ */
8077
+ 401: ErrorResponse;
8078
+ /**
8079
+ * The key is valid but its scopes do not cover this capability — a key limited to `tts` gets this from `/v1/images` rather than a 401
8080
+ */
8081
+ 403: ErrorResponse;
8082
+ /**
8083
+ * Unknown agent id
8084
+ */
8085
+ 404: ErrorResponse;
8086
+ /**
8087
+ * The request failed validation
8088
+ */
8089
+ 422: ErrorResponse;
8090
+ /**
8091
+ * Rate limit exceeded
8092
+ */
8093
+ 429: ErrorResponse;
8094
+ };
8095
+ export type ListAgentVersionsError = ListAgentVersionsErrors[keyof ListAgentVersionsErrors];
8096
+ export type ListAgentVersionsResponses = {
8097
+ /**
8098
+ * The versions kept, newest first
8099
+ */
8100
+ 200: AgentVersionPage;
8101
+ };
8102
+ export type ListAgentVersionsResponse = ListAgentVersionsResponses[keyof ListAgentVersionsResponses];
8103
+ export type GetAgentVersionData = {
8104
+ body?: never;
8105
+ path: {
8106
+ agent_id: string;
8107
+ version: string;
8108
+ };
8109
+ query?: never;
8110
+ url: '/v1/agents/{agent_id}/versions/{version}';
8111
+ };
8112
+ export type GetAgentVersionErrors = {
8113
+ /**
8114
+ * Missing or invalid credentials
8115
+ */
8116
+ 401: ErrorResponse;
8117
+ /**
8118
+ * The key is valid but its scopes do not cover this capability — a key limited to `tts` gets this from `/v1/images` rather than a 401
8119
+ */
8120
+ 403: ErrorResponse;
8121
+ /**
8122
+ * Unknown agent id. Or: Unknown version: this agent never had it, or it is no longer kept.
8123
+ */
8124
+ 404: ErrorResponse;
8125
+ /**
8126
+ * The request failed validation
8127
+ */
8128
+ 422: ErrorResponse;
8129
+ /**
8130
+ * Rate limit exceeded
8131
+ */
8132
+ 429: ErrorResponse;
8133
+ };
8134
+ export type GetAgentVersionError = GetAgentVersionErrors[keyof GetAgentVersionErrors];
8135
+ export type GetAgentVersionResponses = {
8136
+ /**
8137
+ * The version, whole
8138
+ */
8139
+ 200: AgentVersion;
8140
+ };
8141
+ export type GetAgentVersionResponse = GetAgentVersionResponses[keyof GetAgentVersionResponses];
8142
+ export type RestoreAgentVersionData = {
8143
+ body: AgentVersionRestore;
8144
+ path: {
8145
+ agent_id: string;
8146
+ version: string;
8147
+ };
8148
+ query?: never;
8149
+ url: '/v1/agents/{agent_id}/versions/{version}/restore';
8150
+ };
8151
+ export type RestoreAgentVersionErrors = {
8152
+ /**
8153
+ * The request could not be read: malformed JSON
8154
+ */
8155
+ 400: ErrorResponse;
8156
+ /**
8157
+ * Missing or invalid credentials
8158
+ */
8159
+ 401: ErrorResponse;
8160
+ /**
8161
+ * The key is valid but its scopes do not cover this capability — a key limited to `tts` gets this from `/v1/images` rather than a 401
8162
+ */
8163
+ 403: ErrorResponse;
8164
+ /**
8165
+ * Unknown agent id. Or: Unknown version: this agent never had it, or it is no longer kept.
8166
+ */
8167
+ 404: ErrorResponse;
8168
+ /**
8169
+ * `expected_version` was sent and the agent has been changed since. Nothing was written.
8170
+ */
8171
+ 409: ErrorResponse;
8172
+ /**
8173
+ * The request failed validation
8174
+ */
8175
+ 422: ErrorResponse;
8176
+ /**
8177
+ * Rate limit exceeded
8178
+ */
8179
+ 429: ErrorResponse;
8180
+ };
8181
+ export type RestoreAgentVersionError = RestoreAgentVersionErrors[keyof RestoreAgentVersionErrors];
8182
+ export type RestoreAgentVersionResponses = {
8183
+ /**
8184
+ * The agent at its new version
8185
+ */
8186
+ 200: AgentRestored;
8187
+ };
8188
+ export type RestoreAgentVersionResponse = RestoreAgentVersionResponses[keyof RestoreAgentVersionResponses];
8189
+ export type DiscardAgentDraftData = {
8190
+ body?: never;
8191
+ path: {
8192
+ agent_id: string;
8193
+ };
8194
+ query?: never;
8195
+ url: '/v1/agents/{agent_id}/draft';
8196
+ };
8197
+ export type DiscardAgentDraftErrors = {
8198
+ /**
8199
+ * Missing or invalid credentials
8200
+ */
8201
+ 401: ErrorResponse;
8202
+ /**
8203
+ * The key is valid but its scopes do not cover this capability — a key limited to `tts` gets this from `/v1/images` rather than a 401
8204
+ */
8205
+ 403: ErrorResponse;
8206
+ /**
8207
+ * Unknown agent id
8208
+ */
8209
+ 404: ErrorResponse;
8210
+ /**
8211
+ * The request failed validation
8212
+ */
8213
+ 422: ErrorResponse;
8214
+ /**
8215
+ * Rate limit exceeded
8216
+ */
8217
+ 429: ErrorResponse;
8218
+ };
8219
+ export type DiscardAgentDraftError = DiscardAgentDraftErrors[keyof DiscardAgentDraftErrors];
8220
+ export type DiscardAgentDraftResponses = {
8221
+ /**
8222
+ * The draft is gone
8223
+ */
8224
+ 204: void;
8225
+ };
8226
+ export type DiscardAgentDraftResponse = DiscardAgentDraftResponses[keyof DiscardAgentDraftResponses];
8227
+ export type GetAgentDraftData = {
8228
+ body?: never;
8229
+ path: {
8230
+ agent_id: string;
8231
+ };
8232
+ query?: never;
8233
+ url: '/v1/agents/{agent_id}/draft';
8234
+ };
8235
+ export type GetAgentDraftErrors = {
8236
+ /**
8237
+ * Missing or invalid credentials
8238
+ */
8239
+ 401: ErrorResponse;
8240
+ /**
8241
+ * The key is valid but its scopes do not cover this capability — a key limited to `tts` gets this from `/v1/images` rather than a 401
8242
+ */
8243
+ 403: ErrorResponse;
8244
+ /**
8245
+ * Unknown agent id
8246
+ */
8247
+ 404: ErrorResponse;
8248
+ /**
8249
+ * The request failed validation
8250
+ */
8251
+ 422: ErrorResponse;
8252
+ /**
8253
+ * Rate limit exceeded
8254
+ */
8255
+ 429: ErrorResponse;
8256
+ };
8257
+ export type GetAgentDraftError = GetAgentDraftErrors[keyof GetAgentDraftErrors];
8258
+ export type GetAgentDraftResponses = {
8259
+ /**
8260
+ * The draft as it stands
8261
+ */
8262
+ 200: AgentDraft;
8263
+ };
8264
+ export type GetAgentDraftResponse = GetAgentDraftResponses[keyof GetAgentDraftResponses];
8265
+ export type UpdateAgentDraftData = {
8266
+ body: AgentDraftUpdate;
8267
+ path: {
8268
+ agent_id: string;
8269
+ };
8270
+ query?: never;
8271
+ url: '/v1/agents/{agent_id}/draft';
8272
+ };
8273
+ export type UpdateAgentDraftErrors = {
8274
+ /**
8275
+ * The request could not be read: malformed JSON
8276
+ */
8277
+ 400: ErrorResponse;
8278
+ /**
8279
+ * Missing or invalid credentials
8280
+ */
8281
+ 401: ErrorResponse;
8282
+ /**
8283
+ * The key is valid but its scopes do not cover this capability — a key limited to `tts` gets this from `/v1/images` rather than a 401
8284
+ */
8285
+ 403: ErrorResponse;
8286
+ /**
8287
+ * Unknown agent id
8288
+ */
8289
+ 404: ErrorResponse;
8290
+ /**
8291
+ * This agent's draft was changed by somebody else since you last read it. Reload it and apply your edit again.
8292
+ */
8293
+ 409: ErrorResponse;
8294
+ /**
8295
+ * The request failed validation
8296
+ */
8297
+ 422: ErrorResponse;
8298
+ /**
8299
+ * Rate limit exceeded
8300
+ */
8301
+ 429: ErrorResponse;
8302
+ };
8303
+ export type UpdateAgentDraftError = UpdateAgentDraftErrors[keyof UpdateAgentDraftErrors];
8304
+ export type UpdateAgentDraftResponses = {
8305
+ /**
8306
+ * The draft as it now stands
8307
+ */
8308
+ 200: AgentDraft;
8309
+ };
8310
+ export type UpdateAgentDraftResponse = UpdateAgentDraftResponses[keyof UpdateAgentDraftResponses];
8311
+ export type PublishAgentDraftData = {
8312
+ body: AgentDraftPublish;
8313
+ path: {
8314
+ agent_id: string;
8315
+ };
8316
+ query?: never;
8317
+ url: '/v1/agents/{agent_id}/draft/publish';
8318
+ };
8319
+ export type PublishAgentDraftErrors = {
8320
+ /**
8321
+ * The request could not be read: malformed JSON
8322
+ */
8323
+ 400: ErrorResponse;
8324
+ /**
8325
+ * Missing or invalid credentials
8326
+ */
8327
+ 401: ErrorResponse;
8328
+ /**
8329
+ * The key is valid but its scopes do not cover this capability — a key limited to `tts` gets this from `/v1/images` rather than a 401
8330
+ */
8331
+ 403: ErrorResponse;
8332
+ /**
8333
+ * Unknown agent id
8334
+ */
8335
+ 404: ErrorResponse;
8336
+ /**
8337
+ * This agent's draft was changed by somebody else since you last read it. Reload it and apply your edit again. Or: The draft changes nothing from the version players have: there is nothing to publish. Discard it, or change something first.
8338
+ */
8339
+ 409: ErrorResponse;
8340
+ /**
8341
+ * The request failed validation
8342
+ */
8343
+ 422: ErrorResponse;
8344
+ /**
8345
+ * Rate limit exceeded
8346
+ */
8347
+ 429: ErrorResponse;
8348
+ };
8349
+ export type PublishAgentDraftError = PublishAgentDraftErrors[keyof PublishAgentDraftErrors];
8350
+ export type PublishAgentDraftResponses = {
8351
+ /**
8352
+ * The agent at its new version
8353
+ */
8354
+ 200: AgentInfo;
8355
+ };
8356
+ export type PublishAgentDraftResponse = PublishAgentDraftResponses[keyof PublishAgentDraftResponses];
7512
8357
  export type TestAgentWebhookData = {
7513
8358
  body?: never;
7514
8359
  path: {
@@ -5,6 +5,12 @@
5
5
  *
6
6
  * - **A save reaches running sessions within a minute**, not at once: an
7
7
  * agent's version travels through the platform's `STANDING` copy.
8
+ * - **Every change players see is a version** (`version` on the agent):
9
+ * **`versions.list`** its history, newest first, **`versions.get`** one
10
+ * whole, **`versions.restore`** puts one back as a new one.
11
+ * - **`draft`** holds changes players do not get until **`draft.publish`**
12
+ * makes them a version; **`draft.discard`** throws them away. A test
13
+ * chat runs the draft.
8
14
  * - **`settings`** are the organisation's, for every agent —
9
15
  * **`settings.rotateWebhookSecret`** makes the one secret its webhook
10
16
  * posts are signed with, shown once; **`testWebhook`** posts an agent's
@@ -16,7 +22,7 @@
16
22
  * - **`list()` reads one page**: an organisation's agents are few, and the
17
23
  * route answers them all with `next_cursor` `null` (`paging.ts`).
18
24
  */
19
- import type { AgentCreateRequest, AgentInfo, AgentKnowledgeUpdate, AgentPage, AgentSettingsInfo, AgentSettingsUpdate, AgentSummary, AgentToolsUpdate, AgentUpdate, KnowledgeAssigned, KnowledgeInfo, ToolInfo, ToolsAssigned, WebhookSecret, WebhookTestResult } from "../gen/index.js";
25
+ import type { AgentCreateRequest, AgentDraft, AgentDraftPublish, AgentDraftUpdate, AgentInfo, AgentKnowledgeUpdate, AgentPage, AgentRestored, AgentSettingsInfo, AgentSettingsUpdate, AgentSummary, AgentToolsUpdate, AgentUpdate, AgentVersion, AgentVersionRestore, AgentVersionSummary, KnowledgeAssigned, KnowledgeInfo, ToolInfo, ToolsAssigned, WebhookSecret, WebhookTestResult } from "../gen/index.js";
20
26
  import type { RequestOptions, Transport } from "../transport.js";
21
27
  import { Library } from "./resource.js";
22
28
  /** `agents.settings`: the organisation's, for every agent. */
@@ -40,10 +46,35 @@ export interface AgentTools {
40
46
  /** Replaces them all with these: the platform's `limits.agent.tools` at most (`limits()`). */
41
47
  set(agentId: string, body: AgentToolsUpdate, options?: RequestOptions): Promise<ToolsAssigned>;
42
48
  }
49
+ /** `agents.versions`: one agent's history — every change players saw. */
50
+ export interface AgentVersions {
51
+ /** Every version kept, newest first: who made it, when, its note, what changed. */
52
+ list(agentId: string, options?: RequestOptions): AsyncGenerator<AgentVersionSummary, void, undefined>;
53
+ /** One version whole: the agent as it made it. */
54
+ get(agentId: string, version: number, options?: RequestOptions): Promise<AgentVersion>;
55
+ /**
56
+ * Puts a version back as a new one; what it named that is gone since is
57
+ * left out, in `left_out`.
58
+ */
59
+ restore(agentId: string, version: number, body?: AgentVersionRestore, options?: RequestOptions): Promise<AgentRestored>;
60
+ }
61
+ /** `agents.draft`: changes players do not get until they are published. */
62
+ export interface AgentDrafts {
63
+ /** The draft as it stands; `pending` is `false` when it changes nothing. */
64
+ get(agentId: string, options?: RequestOptions): Promise<AgentDraft>;
65
+ /** Changes the draft, never what players have. */
66
+ update(agentId: string, body: AgentDraftUpdate, options?: RequestOptions): Promise<AgentDraft>;
67
+ /** Throws the draft away: `true`, and `true` again for none. */
68
+ discard(agentId: string, options?: RequestOptions): Promise<boolean>;
69
+ /** Makes the draft the version players have; the agent at that version. */
70
+ publish(agentId: string, body?: AgentDraftPublish, options?: RequestOptions): Promise<AgentInfo>;
71
+ }
43
72
  export declare class Agents extends Library<AgentInfo, AgentUpdate, AgentSummary, AgentPage, AgentCreateRequest> {
44
73
  readonly settings: AgentSettings;
45
74
  readonly knowledge: AgentKnowledge;
46
75
  readonly tools: AgentTools;
76
+ readonly versions: AgentVersions;
77
+ readonly draft: AgentDrafts;
47
78
  constructor(api: Transport, base: string);
48
79
  /** Posts the agent's webhook a made-up report, signed; what its server answered. */
49
80
  testWebhook(agentId: string, options?: RequestOptions): Promise<WebhookTestResult>;
@@ -5,6 +5,12 @@
5
5
  *
6
6
  * - **A save reaches running sessions within a minute**, not at once: an
7
7
  * agent's version travels through the platform's `STANDING` copy.
8
+ * - **Every change players see is a version** (`version` on the agent):
9
+ * **`versions.list`** its history, newest first, **`versions.get`** one
10
+ * whole, **`versions.restore`** puts one back as a new one.
11
+ * - **`draft`** holds changes players do not get until **`draft.publish`**
12
+ * makes them a version; **`draft.discard`** throws them away. A test
13
+ * chat runs the draft.
8
14
  * - **`settings`** are the organisation's, for every agent —
9
15
  * **`settings.rotateWebhookSecret`** makes the one secret its webhook
10
16
  * posts are signed with, shown once; **`testWebhook`** posts an agent's
@@ -16,6 +22,7 @@
16
22
  * - **`list()` reads one page**: an organisation's agents are few, and the
17
23
  * route answers them all with `next_cursor` `null` (`paging.ts`).
18
24
  */
25
+ import { segment } from "../transport.js";
19
26
  import { Library } from "./resource.js";
20
27
  export class Agents extends Library {
21
28
  constructor(api, base) {
@@ -27,6 +34,18 @@ export class Agents extends Library {
27
34
  };
28
35
  this.knowledge = this.links("/knowledge");
29
36
  this.tools = this.links("/tools");
37
+ const version = (id, n, rest = "") => this.at(id, `/versions/${segment(n)}${rest}`);
38
+ this.versions = {
39
+ list: (id, options) => this.each(this.at(id, "/versions"), {}, options),
40
+ get: (id, n, options) => this.send("GET", version(id, n), options),
41
+ restore: (id, n, body = {}, options) => this.send("POST", version(id, n, "/restore"), options, body),
42
+ };
43
+ this.draft = {
44
+ get: (id, options) => this.send("GET", this.at(id, "/draft"), options),
45
+ update: (id, body, options) => this.send("PATCH", this.at(id, "/draft"), options, body),
46
+ discard: (id, options) => this.send("DELETE", this.at(id, "/draft"), options).then(() => true),
47
+ publish: (id, body = {}, options) => this.send("POST", this.at(id, "/draft/publish"), options, body),
48
+ };
30
49
  }
31
50
  /** Posts the agent's webhook a made-up report, signed; what its server answered. */
32
51
  testWebhook(agentId, options) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lumavox/server",
3
- "version": "0.40.0",
3
+ "version": "0.44.0",
4
4
  "description": "The Lumavox API from your server: end users, ephemeral keys and the rest, typed from the published OpenAPI document. Zero dependencies.",
5
5
  "license": "MIT",
6
6
  "type": "module",