@lumavox/server 0.10.0 → 0.14.1

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
@@ -60,7 +60,7 @@ list's page.
60
60
 
61
61
  | Resource | Methods |
62
62
  |---|---|
63
- | `endUsers` | `create`, `get`, `update`, `delete`, `list`, `page`, `export` |
63
+ | `endUsers` | `create`, `get`, `update`, `delete`, `list`, `page`, `export`; `facts.list`, `facts.add`, `facts.update`, `facts.delete` |
64
64
  | `ephemeralKeys` | `limits`, `create`, `revoke`, `inspect`, `list`, `page` |
65
65
  | `images`, `videos`, `audio`, `skybox`, `transcriptions` | `create`, `get`, `wait`, `generate`; `skybox.styles` |
66
66
  | `generations` | `get`, `wait`, `list`, `page` |
@@ -72,7 +72,7 @@ list's page.
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` |
75
- | the client | `health()` |
75
+ | the client | `health()`, `limits()` (the platform's limits, each by its key) |
76
76
 
77
77
  - **`list()` is an async iterator over every item**, page after page by
78
78
  each page's `next_cursor`; `page()` is one page, `{ data, next_cursor }`.
@@ -138,6 +138,7 @@ and a longer one is thrown at once as a `RateLimitError` with its
138
138
  deadline. **`inspect` shows a key's spend turn by turn**, as the key
139
139
  itself reads it.
140
140
  - **`endUsers.export(id)`** reads every conversation and fact about a
141
- person with a five-minute key of their own, revoked after — on failure
141
+ person — replaced facts too, until they are deleted — with a
142
+ five-minute key of their own, revoked after — on failure
142
143
  too. The key is an ordinary one: at the person's live-key cap the export
143
144
  fails as the mint does.
package/dist/client.d.ts CHANGED
@@ -1,7 +1,8 @@
1
1
  /**
2
2
  * `createClient`: one org API key, one base URL, and a resource per area of
3
3
  * the API — every operation an API key may call (`test/coverage.test.ts`
4
- * holds the document to it), and `health()`, which needs none.
4
+ * holds the document to it), and the two that need none: `health()` and
5
+ * `limits()`.
5
6
  *
6
7
  * - **Nothing is read from `process.env`**: Workers has none, and a key
7
8
  * that arrives by argument is one the caller can see arrive.
@@ -11,7 +12,7 @@
11
12
  * `(url, init) => env.API.fetch(url, init)`.
12
13
  * - **It refuses a browser and React Native** (`runtime.ts`).
13
14
  */
14
- import type { AudioRequest, HealthResponse, ImageRequest, SkyboxRequest, TranscribeAssetRequest, VideoRequest } from "./gen/index.js";
15
+ import type { AudioRequest, HealthResponse, ImageRequest, PlatformLimit, SkyboxRequest, TranscribeAssetRequest, VideoRequest } from "./gen/index.js";
15
16
  import { Agents } from "./resources/agents.js";
16
17
  import { Assets } from "./resources/assets.js";
17
18
  import { EndUsers } from "./resources/end-users.js";
@@ -57,5 +58,12 @@ export interface Client {
57
58
  readonly tools: Tools;
58
59
  /** Whether the API is up, and its version. Sends no key. */
59
60
  health(options?: RequestOptions): Promise<HealthResponse>;
61
+ /**
62
+ * The platform's limits as they stand now — the tools on an agent, the
63
+ * voices, uploads and knowledge an organisation may keep, the ceilings on
64
+ * an ephemeral key — each by the `key` the reference names it by. The
65
+ * platform's staff may change them. Sends no key.
66
+ */
67
+ limits(options?: RequestOptions): Promise<PlatformLimit[]>;
60
68
  }
61
69
  export declare function createClient(options: ClientOptions): Client;
package/dist/client.js CHANGED
@@ -50,5 +50,9 @@ export function createClient(options) {
50
50
  health: (request) => transport
51
51
  .request({ method: "GET", path: "/health", open: true }, request)
52
52
  .then((answer) => answer.data),
53
+ // One page, always: its `next_cursor` is null.
54
+ limits: (request) => transport
55
+ .request({ method: "GET", path: "/v1/platform/limits", open: true }, request)
56
+ .then((answer) => answer.data.data),
53
57
  };
54
58
  }
@@ -1 +1 @@
1
- export type { AgentCreateRequest, AgentInfo, AgentKnowledgeUpdate, AgentPage, AgentSettingsInfo, AgentSettingsUpdate, AgentStt, AgentSttInfo, AgentSummary, AgentToolsUpdate, AgentUpdate, AgentVoice, AgentVoiceInfo, ApiKeySelf, AssetBulkRequest, AssetDetail, AssetMoveRequest, AssetPage, AssetsAffected, AssetSummary, AssetUpdate, AssignedAgent, AudioRequest, BulkEditKnowledgeData, BulkEditKnowledgeError, BulkEditKnowledgeErrors, BulkEditKnowledgeResponse, BulkEditKnowledgeResponses, ClientOptions, CompactionInfo, CompactRequest, CompactSessionData, CompactSessionError, CompactSessionErrors, CompactSessionResponse, CompactSessionResponses, ConfirmAssetUploadData, ConfirmAssetUploadError, ConfirmAssetUploadErrors, ConfirmAssetUploadResponse, ConfirmAssetUploadResponses, CreateAgentData, CreateAgentError, CreateAgentErrors, CreateAgentResponse, CreateAgentResponses, CreateAssetFolderData, CreateAssetFolderError, CreateAssetFolderErrors, CreateAssetFolderResponse, CreateAssetFolderResponses, CreateAssetUploadUrlData, CreateAssetUploadUrlError, CreateAssetUploadUrlErrors, CreateAssetUploadUrlResponse, CreateAssetUploadUrlResponses, CreateAudioData, CreateAudioError, CreateAudioErrors, CreateAudioResponse, CreateAudioResponses, CreateEndUserData, CreateEndUserError, CreateEndUserErrors, CreateEndUserResponse, CreateEndUserResponses, CreateEphemeralKeyData, CreateEphemeralKeyError, CreateEphemeralKeyErrors, CreateEphemeralKeyResponse, CreateEphemeralKeyResponses, 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, 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, DeleteAllFactsData, DeleteAllFactsError, DeleteAllFactsErrors, DeleteAllFactsResponse, DeleteAllFactsResponses, DeleteAssetData, DeleteAssetError, DeleteAssetErrors, DeleteAssetFolderData, DeleteAssetFolderError, DeleteAssetFolderErrors, DeleteAssetFolderResponse, DeleteAssetFolderResponses, DeleteAssetResponse, DeleteAssetResponses, DeleteAssetsData, DeleteAssetsError, DeleteAssetsErrors, DeleteAssetsResponse, DeleteAssetsResponses, DeleteEndUserData, DeleteEndUserError, DeleteEndUserErrors, DeleteEndUserResponse, DeleteEndUserResponses, DeleteFactData, DeleteFactError, DeleteFactErrors, DeleteFactResponse, DeleteFactResponses, DeleteKnowledgeData, DeleteKnowledgeError, DeleteKnowledgeErrors, DeleteKnowledgeResponse, DeleteKnowledgeResponses, DeleteSessionData, DeleteSessionError, DeleteSessionErrors, DeleteSessionResponse, DeleteSessionResponses, DeleteToolData, DeleteToolError, DeleteToolErrors, DeleteToolResponse, DeleteToolResponses, DeleteVoiceData, DeleteVoiceError, DeleteVoiceErrors, DeleteVoiceResponse, DeleteVoiceResponses, DesignVoiceData, DesignVoiceError, DesignVoiceErrors, DesignVoiceResponse, DesignVoiceResponses, EndUserCreateRequest, EndUserDeleted, EndUserInfo, EndUserPage, EndUserUpdateRequest, EphemeralKeyCreateRequest, EphemeralKeyCreateResponse, EphemeralKeyInfo, EphemeralKeyLimits, EphemeralKeyPage, EphemeralTokenSelf, ErrorCode, ErrorInfo, ErrorResponse, ExtractSessionFactsData, ExtractSessionFactsError, ExtractSessionFactsErrors, ExtractSessionFactsResponse, ExtractSessionFactsResponses, FactInfo, FactPage, FactsDeleted, 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, 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, GetPlanData, GetPlanError, GetPlanErrors, GetPlanResponse, GetPlanResponses, 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, 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, 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, ListRelationsData, ListRelationsError, ListRelationsErrors, ListRelationsResponse, ListRelationsResponses, 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, MessageInfo, MessageKnowledge, MessagePage, MessageSource, MessageToolCall, MoveAssetsData, MoveAssetsError, MoveAssetsErrors, MoveAssetsResponse, MoveAssetsResponses, OrgPlan, ProviderVoiceSettings, ProviderVoiceSettingsInfo, Reference, RefreshKnowledgeData, RefreshKnowledgeError, RefreshKnowledgeErrors, RefreshKnowledgeResponse, RefreshKnowledgeResponses, ReindexKnowledgeData, ReindexKnowledgeError, ReindexKnowledgeErrors, ReindexKnowledgeResponse, ReindexKnowledgeResponses, RelationInfo, RelationPage, ResampleVoiceData, ResampleVoiceError, ResampleVoiceErrors, ResampleVoiceResponse, ResampleVoiceResponses, RevokeEphemeralKeyData, RevokeEphemeralKeyError, RevokeEphemeralKeyErrors, RevokeEphemeralKeyResponse, RevokeEphemeralKeyResponses, RotateToolSecretData, RotateToolSecretError, RotateToolSecretErrors, RotateToolSecretResponse, RotateToolSecretResponses, SaveDesignedVoiceData, SaveDesignedVoiceError, SaveDesignedVoiceErrors, SaveDesignedVoiceResponse, SaveDesignedVoiceResponses, 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, TestToolData, TestToolError, TestToolErrors, TestToolResponse, TestToolResponses, TokenSelf, ToolCall, ToolCallPage, ToolCreate, ToolInfo, ToolPage, 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, UpdateEndUserResponse, UpdateEndUserResponses, UpdateKnowledgeData, UpdateKnowledgeError, UpdateKnowledgeErrors, UpdateKnowledgeResponse, UpdateKnowledgeResponses, UpdateToolData, UpdateToolError, UpdateToolErrors, UpdateToolResponse, UpdateToolResponses, UpdateVoiceData, UpdateVoiceError, UpdateVoiceErrors, UpdateVoiceResponse, UpdateVoiceResponses, UploadConfirm, UploadTicket, UploadTicketRequest, UsageByKey, UsageDay, UsageResponse, UsageSummary, ValidationIssue, VariantInfo, VideoRequest, VoiceDesignPreview, VoiceDesignRequest, VoiceDesignResult, VoiceDesignSaveRequest, VoiceDetail, VoiceInfo, VoiceInfoPage, VoiceKind, VoiceSample, VoiceSource, VoiceStatus, VoiceUpdate, VoiceUpload, VoiceUploadRequest, VoiceUploadTicket } from './types.gen.js';
1
+ export type { AgentCreateRequest, AgentInfo, AgentKnowledgeUpdate, AgentPage, AgentSettingsInfo, AgentSettingsUpdate, AgentStt, AgentSttInfo, AgentSummary, AgentToolsUpdate, AgentUpdate, AgentVoice, AgentVoiceInfo, ApiKeySelf, AssetBulkRequest, AssetDetail, AssetMoveRequest, AssetPage, AssetsAffected, AssetSummary, AssetUpdate, AssignedAgent, AudioRequest, BulkEditKnowledgeData, BulkEditKnowledgeError, BulkEditKnowledgeErrors, BulkEditKnowledgeResponse, BulkEditKnowledgeResponses, ClientOptions, CompactionInfo, CompactRequest, CompactSessionData, CompactSessionError, CompactSessionErrors, CompactSessionResponse, CompactSessionResponses, ConfirmAssetUploadData, ConfirmAssetUploadError, ConfirmAssetUploadErrors, ConfirmAssetUploadResponse, ConfirmAssetUploadResponses, 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, 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, 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, DeleteAllFactsData, DeleteAllFactsError, DeleteAllFactsErrors, DeleteAllFactsResponse, DeleteAllFactsResponses, DeleteAssetData, DeleteAssetError, DeleteAssetErrors, DeleteAssetFolderData, DeleteAssetFolderError, DeleteAssetFolderErrors, DeleteAssetFolderResponse, DeleteAssetFolderResponses, DeleteAssetResponse, DeleteAssetResponses, DeleteAssetsData, DeleteAssetsError, DeleteAssetsErrors, DeleteAssetsResponse, DeleteAssetsResponses, DeleteEndUserData, DeleteEndUserError, DeleteEndUserErrors, DeleteEndUserFactData, DeleteEndUserFactError, DeleteEndUserFactErrors, DeleteEndUserFactResponse, DeleteEndUserFactResponses, DeleteEndUserResponse, DeleteEndUserResponses, DeleteFactData, DeleteFactError, DeleteFactErrors, DeleteFactResponse, DeleteFactResponses, DeleteKnowledgeData, DeleteKnowledgeError, DeleteKnowledgeErrors, DeleteKnowledgeResponse, DeleteKnowledgeResponses, DeleteSessionData, DeleteSessionError, DeleteSessionErrors, DeleteSessionResponse, DeleteSessionResponses, DeleteToolData, DeleteToolError, DeleteToolErrors, DeleteToolResponse, DeleteToolResponses, DeleteVoiceData, DeleteVoiceError, DeleteVoiceErrors, DeleteVoiceResponse, DeleteVoiceResponses, DesignVoiceData, DesignVoiceError, DesignVoiceErrors, DesignVoiceResponse, DesignVoiceResponses, EndUserCreateRequest, EndUserDeleted, EndUserInfo, EndUserPage, EndUserUpdateRequest, EphemeralKeyCreateRequest, EphemeralKeyCreateResponse, EphemeralKeyInfo, EphemeralKeyLimits, EphemeralKeyPage, EphemeralTokenSelf, ErrorCode, ErrorInfo, ErrorResponse, ExtractSessionFactsData, ExtractSessionFactsError, ExtractSessionFactsErrors, ExtractSessionFactsResponse, ExtractSessionFactsResponses, FactCreateRequest, FactInfo, FactPage, FactsDeleted, FactUpdateRequest, 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, 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, GetPlanData, GetPlanError, GetPlanErrors, GetPlanResponse, GetPlanResponses, GetPlatformLimitsData, GetPlatformLimitsResponse, GetPlatformLimitsResponses, 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, 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, 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, ListRelationsData, ListRelationsError, ListRelationsErrors, ListRelationsResponse, ListRelationsResponses, 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, MessageInfo, MessageKnowledge, MessagePage, MessageSource, MessageToolCall, MoveAssetsData, MoveAssetsError, MoveAssetsErrors, MoveAssetsResponse, MoveAssetsResponses, OrgPlan, PlatformLimit, PlatformLimitPage, ProviderVoiceSettings, ProviderVoiceSettingsInfo, Reference, RefreshKnowledgeData, RefreshKnowledgeError, RefreshKnowledgeErrors, RefreshKnowledgeResponse, RefreshKnowledgeResponses, ReindexKnowledgeData, ReindexKnowledgeError, ReindexKnowledgeErrors, ReindexKnowledgeResponse, ReindexKnowledgeResponses, RelationInfo, RelationPage, ResampleVoiceData, ResampleVoiceError, ResampleVoiceErrors, ResampleVoiceResponse, ResampleVoiceResponses, RevokeEphemeralKeyData, RevokeEphemeralKeyError, RevokeEphemeralKeyErrors, RevokeEphemeralKeyResponse, RevokeEphemeralKeyResponses, RotateToolSecretData, RotateToolSecretError, RotateToolSecretErrors, RotateToolSecretResponse, RotateToolSecretResponses, SaveDesignedVoiceData, SaveDesignedVoiceError, SaveDesignedVoiceErrors, SaveDesignedVoiceResponse, SaveDesignedVoiceResponses, 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, TestToolData, TestToolError, TestToolErrors, TestToolResponse, TestToolResponses, TokenSelf, ToolCall, ToolCallPage, ToolCreate, ToolInfo, ToolPage, 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, 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, VariantInfo, VideoRequest, VoiceDesignPreview, VoiceDesignRequest, VoiceDesignResult, VoiceDesignSaveRequest, VoiceDetail, VoiceInfo, VoiceInfoPage, VoiceKind, VoiceSample, VoiceSource, VoiceStatus, VoiceUpdate, VoiceUpload, VoiceUploadRequest, VoiceUploadTicket } from './types.gen.js';
@@ -38,6 +38,35 @@ export type ValidationIssue = {
38
38
  field: string | null;
39
39
  message: string;
40
40
  };
41
+ export type PlatformLimitPage = {
42
+ data: Array<PlatformLimit>;
43
+ /**
44
+ * Pass as `cursor` for the next page; `null` when this is the last.
45
+ */
46
+ next_cursor: string | null;
47
+ };
48
+ export type PlatformLimit = {
49
+ /**
50
+ * The limit's name, which this reference's descriptions use for it.
51
+ */
52
+ key: string;
53
+ /**
54
+ * What it limits, in words.
55
+ */
56
+ label: string;
57
+ /**
58
+ * The limit in force now, in `unit`.
59
+ */
60
+ value: number | string | boolean;
61
+ /**
62
+ * What `value` counts; null for a plain count. `credits` are whole credits, not micro-credits.
63
+ */
64
+ unit: 'ms' | 'seconds' | 'minutes' | 'hours' | 'days' | 'bytes' | 'credits' | null;
65
+ /**
66
+ * The platform's built-in value, which `value` may differ from.
67
+ */
68
+ default: number | string | boolean;
69
+ };
41
70
  export type TemplateInput = {
42
71
  /**
43
72
  * What to name it in `inputs` when generating.
@@ -1181,7 +1210,7 @@ export type MessageToolCall = {
1181
1210
  [key: string]: unknown;
1182
1211
  };
1183
1212
  /**
1184
- * What it answered, as the model read it — its JSON, or its text, cut at 16 KB. Null when it answered nothing.
1213
+ * What it answered, as the model read it — its JSON, or its text, cut at the platform's `agents.tools.result_max_bytes` (`GET /v1/platform/limits`). Null when it answered nothing.
1185
1214
  */
1186
1215
  result?: unknown;
1187
1216
  /**
@@ -1270,7 +1299,7 @@ export type SessionCreateRequest = {
1270
1299
  /**
1271
1300
  * Whether to continue this person's most recent conversation with this agent instead of starting a new one.
1272
1301
  *
1273
- * **Unset is the useful default**: it resumes when this person has a conversation with this agent from the last 7 days to continue, and starts a new one otherwise. That matches what 'open a conversation with this person' usually means, and it stops an integration that opens a session per page load from scattering somebody's history across a dozen fragments.
1302
+ * **Unset is the useful default**: it resumes when this person has a conversation with this agent young enough to continue — within the organisation's `resume_max_age_days`, else the platform's `agents.sessions.resume_max_age_days` (`GET /v1/platform/limits`) — and starts a new one otherwise. That matches what 'open a conversation with this person' usually means, and it stops an integration that opens a session per page load from scattering somebody's history across a dozen fragments.
1274
1303
  *
1275
1304
  * `false` always starts a new conversation — this is what a 'new chat' button should send. `true` is the same as leaving it unset; it exists so the intent can be stated rather than implied.
1276
1305
  *
@@ -1348,14 +1377,50 @@ export type FactInfo = {
1348
1377
  * Which agent was being talked to when this was learned.
1349
1378
  */
1350
1379
  agent_id: string | null;
1380
+ /**
1381
+ * When a conversation last said it again; `null` for never. The agents see the most recently confirmed first when not every fact fits.
1382
+ */
1383
+ confirmed_at: string | null;
1351
1384
  created_at: string;
1352
1385
  id: string;
1386
+ /**
1387
+ * When a later conversation replaced or removed it; `null` while it stands. Listed only with `include_replaced=true`.
1388
+ */
1389
+ replaced_at: string | null;
1390
+ /**
1391
+ * The fact that replaced it — moved city, changed job — or `null` when it was removed with nothing in its place, or stands.
1392
+ */
1393
+ replaced_by: string | null;
1394
+ /**
1395
+ * `person`: recalled by every agent of yours that shares its facts. `agent`: kept to one agent (`agent_id`), which alone recalls it — learnt by an agent whose `facts_scope` is `agent`, or added for that agent.
1396
+ */
1397
+ scope: 'person' | 'agent';
1398
+ /**
1399
+ * `conversation`: a reading learnt it. `customer`: you added or corrected it — a later conversation never replaces or removes it.
1400
+ */
1401
+ source: 'conversation' | 'customer';
1353
1402
  text: string;
1354
1403
  /**
1355
- * A fact is never edited, only learned or forgotten: the same as `created_at`.
1404
+ * When it last changed: its `replaced_at` once replaced, else when you last corrected it, else its `created_at`.
1356
1405
  */
1357
1406
  updated_at: string;
1358
1407
  };
1408
+ export type FactCreateRequest = {
1409
+ /**
1410
+ * What to remember about the person, as one plain statement: "Prefers to be called Sam." At most 500 characters. Never a secret — a password, a code, a card, account or identity number, or a key is refused, since facts are sent to the model on every turn.
1411
+ */
1412
+ text: string;
1413
+ /**
1414
+ * Keep it to one agent: only that agent recalls it. Unset or `null`: every agent of yours that shares its facts — and the ones that keep their own, too.
1415
+ */
1416
+ agent_id?: string | null;
1417
+ };
1418
+ export type FactUpdateRequest = {
1419
+ /**
1420
+ * What to remember about the person, as one plain statement: "Prefers to be called Sam." At most 500 characters. Never a secret — a password, a code, a card, account or identity number, or a key is refused, since facts are sent to the model on every turn.
1421
+ */
1422
+ text: string;
1423
+ };
1359
1424
  export type FactsDeleted = {
1360
1425
  /**
1361
1426
  * How many stored facts were deleted.
@@ -1427,6 +1492,18 @@ export type AgentSummary = {
1427
1492
  * What counts as worth remembering. Unset falls back to the organisation's default, then to a built-in instruction.
1428
1493
  */
1429
1494
  fact_instruction: string | null;
1495
+ /**
1496
+ * Whether this agent remembers facts about the people it talks to. **On by default**, unlike most switches here.
1497
+ *
1498
+ * Off, its conversations are never read for facts and its turns recall none — nothing is charged for either — and a compaction extracts nothing whatever it is asked. 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.
1499
+ */
1500
+ facts_enabled: boolean;
1501
+ /**
1502
+ * 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.
1503
+ *
1504
+ * A change applies to what it learns from then on: a fact keeps the scope it was learnt under.
1505
+ */
1506
+ facts_scope: 'person' | 'agent' | null;
1430
1507
  /**
1431
1508
  * The agent's opening line — or, with `first_message_generated` on, the direction for one.
1432
1509
  *
@@ -1466,15 +1543,15 @@ export type AgentSummary = {
1466
1543
  */
1467
1544
  knowledge_lookup_first: boolean | null;
1468
1545
  /**
1469
- * Pieces of material a lookup hands the model, 1-8. Unset is 4.
1546
+ * Pieces of material a lookup hands the model, 1-8. Unset is the platform's `agents.knowledge.default_results` (`GET /v1/platform/limits`).
1470
1547
  */
1471
1548
  knowledge_max_results: number | null;
1472
1549
  /**
1473
- * How the agent reads its knowledge. `auto` (the default, and what unset means) puts the whole text in the prompt while it fits about 8,000 tokens — no lookup, nothing to miss — and looks it up beyond that. `prompt` puts it in the prompt up to about 32,000 tokens (each turn's first word is slower the more there is). `lookup` always looks it up.
1550
+ * 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`.
1474
1551
  */
1475
1552
  knowledge_mode: 'auto' | 'prompt' | 'lookup' | null;
1476
1553
  /**
1477
- * How many recalled facts are put in front of the model when a session opens. They are prompt tokens on every turn.
1554
+ * 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.
1478
1555
  */
1479
1556
  max_facts: number | null;
1480
1557
  /**
@@ -1670,6 +1747,18 @@ export type AgentInfo = {
1670
1747
  * What counts as worth remembering. Unset falls back to the organisation's default, then to a built-in instruction.
1671
1748
  */
1672
1749
  fact_instruction: string | null;
1750
+ /**
1751
+ * Whether this agent remembers facts about the people it talks to. **On by default**, unlike most switches here.
1752
+ *
1753
+ * Off, its conversations are never read for facts and its turns recall none — nothing is charged for either — and a compaction extracts nothing whatever it is asked. 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.
1754
+ */
1755
+ facts_enabled: boolean;
1756
+ /**
1757
+ * 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.
1758
+ *
1759
+ * A change applies to what it learns from then on: a fact keeps the scope it was learnt under.
1760
+ */
1761
+ facts_scope: 'person' | 'agent' | null;
1673
1762
  /**
1674
1763
  * The agent's opening line — or, with `first_message_generated` on, the direction for one.
1675
1764
  *
@@ -1709,15 +1798,15 @@ export type AgentInfo = {
1709
1798
  */
1710
1799
  knowledge_lookup_first: boolean | null;
1711
1800
  /**
1712
- * Pieces of material a lookup hands the model, 1-8. Unset is 4.
1801
+ * Pieces of material a lookup hands the model, 1-8. Unset is the platform's `agents.knowledge.default_results` (`GET /v1/platform/limits`).
1713
1802
  */
1714
1803
  knowledge_max_results: number | null;
1715
1804
  /**
1716
- * How the agent reads its knowledge. `auto` (the default, and what unset means) puts the whole text in the prompt while it fits about 8,000 tokens — no lookup, nothing to miss — and looks it up beyond that. `prompt` puts it in the prompt up to about 32,000 tokens (each turn's first word is slower the more there is). `lookup` always looks it up.
1805
+ * 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`.
1717
1806
  */
1718
1807
  knowledge_mode: 'auto' | 'prompt' | 'lookup' | null;
1719
1808
  /**
1720
- * How many recalled facts are put in front of the model when a session opens. They are prompt tokens on every turn.
1809
+ * 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.
1721
1810
  */
1722
1811
  max_facts: number | null;
1723
1812
  /**
@@ -1855,6 +1944,18 @@ export type AgentCreateRequest = {
1855
1944
  * What counts as worth remembering. Unset falls back to the organisation's default, then to a built-in instruction.
1856
1945
  */
1857
1946
  fact_instruction?: string | null;
1947
+ /**
1948
+ * Whether this agent remembers facts about the people it talks to. **On by default**, unlike most switches here.
1949
+ *
1950
+ * Off, its conversations are never read for facts and its turns recall none — nothing is charged for either — and a compaction extracts nothing whatever it is asked. 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.
1951
+ */
1952
+ facts_enabled?: boolean | null;
1953
+ /**
1954
+ * 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.
1955
+ *
1956
+ * A change applies to what it learns from then on: a fact keeps the scope it was learnt under.
1957
+ */
1958
+ facts_scope?: 'person' | 'agent' | null;
1858
1959
  /**
1859
1960
  * The agent's opening line — or, with `first_message_generated` on, the direction for one.
1860
1961
  *
@@ -1894,15 +1995,15 @@ export type AgentCreateRequest = {
1894
1995
  */
1895
1996
  knowledge_lookup_first?: boolean | null;
1896
1997
  /**
1897
- * Pieces of material a lookup hands the model, 1-8. Unset is 4.
1998
+ * Pieces of material a lookup hands the model, 1-8. Unset is the platform's `agents.knowledge.default_results` (`GET /v1/platform/limits`).
1898
1999
  */
1899
2000
  knowledge_max_results?: number | null;
1900
2001
  /**
1901
- * How the agent reads its knowledge. `auto` (the default, and what unset means) puts the whole text in the prompt while it fits about 8,000 tokens — no lookup, nothing to miss — and looks it up beyond that. `prompt` puts it in the prompt up to about 32,000 tokens (each turn's first word is slower the more there is). `lookup` always looks it up.
2002
+ * 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`.
1902
2003
  */
1903
2004
  knowledge_mode?: 'auto' | 'prompt' | 'lookup' | null;
1904
2005
  /**
1905
- * How many recalled facts are put in front of the model when a session opens. They are prompt tokens on every turn.
2006
+ * 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.
1906
2007
  */
1907
2008
  max_facts?: number | null;
1908
2009
  /**
@@ -1910,7 +2011,7 @@ export type AgentCreateRequest = {
1910
2011
  */
1911
2012
  max_output_tokens?: number | null;
1912
2013
  /**
1913
- * Gemini model id. Defaults to `gemini-3.1-flash-lite`.
2014
+ * Gemini model id. Defaults to the platform's `agents.model` (`GET /v1/platform/limits`).
1914
2015
  */
1915
2016
  model?: string | null;
1916
2017
  /**
@@ -2054,7 +2155,7 @@ export type AgentSettingsInfo = {
2054
2155
  *
2055
2156
  * A conversation continued inside this window gets no fresh opening line, because re-greeting somebody who refreshed the page thirty seconds ago is worse than silence — and costs a model call and a speech call to be worse. Continued outside it, the agent says hello again, which is what a `first_message` direction reading "say hello and catch up with them" is asking for.
2056
2157
  *
2057
- * **Zero means always greet**, on every connection. Clear it (`null`) and the platform default applies, which is 15 minutes.
2158
+ * **Zero means always greet**, on every connection. Clear it (`null`) and the platform's `agents.greeting.resume_after_minutes` applies (`GET /v1/platform/limits`).
2058
2159
  *
2059
2160
  * Organisation-wide: every agent here uses it. It is read when a socket connects, so a change reaches the next connection rather than the ones already open.
2060
2161
  */
@@ -2064,7 +2165,7 @@ export type AgentSettingsInfo = {
2064
2165
  *
2065
2166
  * Applies to `POST /v1/agent/sessions` when it resumes — see `resume` on that request. Past this, opening a session starts a fresh conversation instead. Nothing is lost at the boundary: durable facts and the standing relationship belong to the person rather than the conversation, and carry into every new one.
2066
2167
  *
2067
- * **Zero means never resume** — every session is a new conversation, which is what an integration that treats a visit as a conversation wants. Clear it (`null`) and the platform default applies, which is 7 days.
2168
+ * **Zero means never resume** — every session is a new conversation, which is what an integration that treats a visit as a conversation wants. Clear it (`null`) and the platform's `agents.sessions.resume_max_age_days` applies (`GET /v1/platform/limits`).
2068
2169
  */
2069
2170
  resume_max_age_days: number | null;
2070
2171
  /**
@@ -2072,7 +2173,7 @@ export type AgentSettingsInfo = {
2072
2173
  */
2073
2174
  built_in_compact_instruction: string;
2074
2175
  /**
2075
- * The built-in mood-reporting instruction, served from the running constant so the console never shows a stale copy of it.
2176
+ * The platform's mood-reporting instruction, served as it stands so the console never shows a stale copy of it.
2076
2177
  */
2077
2178
  built_in_emotion_instruction: string;
2078
2179
  /**
@@ -2080,7 +2181,7 @@ export type AgentSettingsInfo = {
2080
2181
  */
2081
2182
  built_in_fact_instruction: string;
2082
2183
  /**
2083
- * The built-in relationship instruction, served from the running constant so the console never shows a stale copy of it.
2184
+ * The platform's relationship instruction, served as it stands so the console never shows a stale copy of it.
2084
2185
  */
2085
2186
  built_in_relation_instruction: string;
2086
2187
  /**
@@ -2114,7 +2215,7 @@ export type AgentSettingsUpdate = {
2114
2215
  *
2115
2216
  * A conversation continued inside this window gets no fresh opening line, because re-greeting somebody who refreshed the page thirty seconds ago is worse than silence — and costs a model call and a speech call to be worse. Continued outside it, the agent says hello again, which is what a `first_message` direction reading "say hello and catch up with them" is asking for.
2116
2217
  *
2117
- * **Zero means always greet**, on every connection. Clear it (`null`) and the platform default applies, which is 15 minutes.
2218
+ * **Zero means always greet**, on every connection. Clear it (`null`) and the platform's `agents.greeting.resume_after_minutes` applies (`GET /v1/platform/limits`).
2118
2219
  *
2119
2220
  * Organisation-wide: every agent here uses it. It is read when a socket connects, so a change reaches the next connection rather than the ones already open.
2120
2221
  */
@@ -2124,7 +2225,7 @@ export type AgentSettingsUpdate = {
2124
2225
  *
2125
2226
  * Applies to `POST /v1/agent/sessions` when it resumes — see `resume` on that request. Past this, opening a session starts a fresh conversation instead. Nothing is lost at the boundary: durable facts and the standing relationship belong to the person rather than the conversation, and carry into every new one.
2126
2227
  *
2127
- * **Zero means never resume** — every session is a new conversation, which is what an integration that treats a visit as a conversation wants. Clear it (`null`) and the platform default applies, which is 7 days.
2228
+ * **Zero means never resume** — every session is a new conversation, which is what an integration that treats a visit as a conversation wants. Clear it (`null`) and the platform's `agents.sessions.resume_max_age_days` applies (`GET /v1/platform/limits`).
2128
2229
  */
2129
2230
  resume_max_age_days?: number | null;
2130
2231
  };
@@ -2179,6 +2280,18 @@ export type AgentUpdate = {
2179
2280
  * What counts as worth remembering. Unset falls back to the organisation's default, then to a built-in instruction.
2180
2281
  */
2181
2282
  fact_instruction?: string | null;
2283
+ /**
2284
+ * Whether this agent remembers facts about the people it talks to. **On by default**, unlike most switches here.
2285
+ *
2286
+ * Off, its conversations are never read for facts and its turns recall none — nothing is charged for either — and a compaction extracts nothing whatever it is asked. 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.
2287
+ */
2288
+ facts_enabled?: boolean | null;
2289
+ /**
2290
+ * 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.
2291
+ *
2292
+ * A change applies to what it learns from then on: a fact keeps the scope it was learnt under.
2293
+ */
2294
+ facts_scope?: 'person' | 'agent' | null;
2182
2295
  /**
2183
2296
  * The agent's opening line — or, with `first_message_generated` on, the direction for one.
2184
2297
  *
@@ -2218,15 +2331,15 @@ export type AgentUpdate = {
2218
2331
  */
2219
2332
  knowledge_lookup_first?: boolean | null;
2220
2333
  /**
2221
- * Pieces of material a lookup hands the model, 1-8. Unset is 4.
2334
+ * Pieces of material a lookup hands the model, 1-8. Unset is the platform's `agents.knowledge.default_results` (`GET /v1/platform/limits`).
2222
2335
  */
2223
2336
  knowledge_max_results?: number | null;
2224
2337
  /**
2225
- * How the agent reads its knowledge. `auto` (the default, and what unset means) puts the whole text in the prompt while it fits about 8,000 tokens — no lookup, nothing to miss — and looks it up beyond that. `prompt` puts it in the prompt up to about 32,000 tokens (each turn's first word is slower the more there is). `lookup` always looks it up.
2338
+ * 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`.
2226
2339
  */
2227
2340
  knowledge_mode?: 'auto' | 'prompt' | 'lookup' | null;
2228
2341
  /**
2229
- * How many recalled facts are put in front of the model when a session opens. They are prompt tokens on every turn.
2342
+ * 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.
2230
2343
  */
2231
2344
  max_facts?: number | null;
2232
2345
  /**
@@ -2234,7 +2347,7 @@ export type AgentUpdate = {
2234
2347
  */
2235
2348
  max_output_tokens?: number | null;
2236
2349
  /**
2237
- * Gemini model id. `null` or empty returns it to the default, `gemini-3.1-flash-lite`.
2350
+ * Gemini model id. `null` or empty returns it to the default, the platform's `agents.model` (`GET /v1/platform/limits`).
2238
2351
  */
2239
2352
  model?: string | null;
2240
2353
  /**
@@ -2456,7 +2569,7 @@ export type KnowledgeSearchResult = {
2456
2569
  export type KnowledgeSearchHit = {
2457
2570
  entry_id: string;
2458
2571
  /**
2459
- * Cosine similarity, 0-1. Nothing under 0.6 is handed over.
2572
+ * Cosine similarity, 0-1. Nothing under the platform's `agents.knowledge.min_score` (`GET /v1/platform/limits`) is handed over.
2460
2573
  */
2461
2574
  score: number;
2462
2575
  /**
@@ -2740,7 +2853,7 @@ export type ToolInfo = {
2740
2853
  created_at: string;
2741
2854
  updated_at: string;
2742
2855
  /**
2743
- * Its failed calls in your agents' conversations in the past hour or so — a deadline missed, an error answered, a server out of reach — counted from the first; 0 once an hour passes with none. Each conversation reports its failures at most every five minutes, so the count can lag by that much. At 20 in an hour, your organisation's admins are mailed, at most once a day per tool.
2856
+ * Its failed calls in your agents' conversations within the platform's `agents.tools.failure_window_minutes` — a deadline missed, an error answered, a server out of reach — counted from the first; 0 once the window passes with none. Each conversation reports its failures at most once in the platform's `agents.tools.report_every_minutes`, so the count can lag by that much. At the platform's `agents.tools.failures_to_mail` in the window, your organisation's admins are mailed, at most once in its `agents.tools.mail_every_hours` per tool. Each is on `GET /v1/platform/limits`.
2744
2857
  */
2745
2858
  recent_failures: number;
2746
2859
  /**
@@ -2899,11 +3012,11 @@ export type ToolTestResult = {
2899
3012
  */
2900
3013
  duration_ms: number;
2901
3014
  /**
2902
- * Its answer: the JSON it sent, else its text, cut at 16384 bytes; `null` for none.
3015
+ * Its answer: the JSON it sent, else its text, cut at the platform's `agents.tools.result_max_bytes` (`GET /v1/platform/limits`); `null` for none.
2903
3016
  */
2904
3017
  result?: unknown;
2905
3018
  /**
2906
- * The answer was longer than 16384 bytes and was cut.
3019
+ * The answer was longer than the platform's `agents.tools.result_max_bytes` and was cut.
2907
3020
  */
2908
3021
  truncated: boolean;
2909
3022
  /**
@@ -2929,7 +3042,7 @@ export type ToolsAssigned = {
2929
3042
  };
2930
3043
  export type AgentToolsUpdate = {
2931
3044
  /**
2932
- * The complete set, at most 20. An empty list turns every tool off.
3045
+ * The complete set, at most the platform's `limits.agent.tools` (`GET /v1/platform/limits`). An empty list turns every tool off.
2933
3046
  */
2934
3047
  tool_ids: Array<string>;
2935
3048
  };
@@ -3247,6 +3360,19 @@ export type GetHealthResponses = {
3247
3360
  200: HealthResponse;
3248
3361
  };
3249
3362
  export type GetHealthResponse = GetHealthResponses[keyof GetHealthResponses];
3363
+ export type GetPlatformLimitsData = {
3364
+ body?: never;
3365
+ path?: never;
3366
+ query?: never;
3367
+ url: '/v1/platform/limits';
3368
+ };
3369
+ export type GetPlatformLimitsResponses = {
3370
+ /**
3371
+ * Every limit, as it stands now
3372
+ */
3373
+ 200: PlatformLimitPage;
3374
+ };
3375
+ export type GetPlatformLimitsResponse = GetPlatformLimitsResponses[keyof GetPlatformLimitsResponses];
3250
3376
  export type GetEphemeralKeyLimitsData = {
3251
3377
  body?: never;
3252
3378
  path?: never;
@@ -4356,7 +4482,7 @@ export type CreateAssetUploadUrlErrors = {
4356
4482
  */
4357
4483
  403: ErrorResponse;
4358
4484
  /**
4359
- * The library holds as many files as the plan allows
4485
+ * The library holds the platform's `limits.org.asset_uploads` uploaded files
4360
4486
  */
4361
4487
  409: ErrorResponse;
4362
4488
  /**
@@ -5156,6 +5282,10 @@ export type ListFactsData = {
5156
5282
  * Optional, and only ever the key's own end user — their `eu_...` id or your own id for them. Anybody else is a 403.
5157
5283
  */
5158
5284
  end_user_id?: string;
5285
+ /**
5286
+ * Also list the facts a later conversation replaced or removed, until they are deleted, the platform's `agents.memory.facts.replaced_kept_days` later (`GET /v1/platform/limits`).
5287
+ */
5288
+ include_replaced?: boolean;
5159
5289
  /**
5160
5290
  * How many to answer, 1 to 200.
5161
5291
  */
@@ -5193,6 +5323,46 @@ export type ListFactsResponses = {
5193
5323
  200: FactPage;
5194
5324
  };
5195
5325
  export type ListFactsResponse = ListFactsResponses[keyof ListFactsResponses];
5326
+ export type CreateFactData = {
5327
+ body: FactCreateRequest;
5328
+ path?: never;
5329
+ query?: never;
5330
+ url: '/v1/agent/facts';
5331
+ };
5332
+ export type CreateFactErrors = {
5333
+ /**
5334
+ * The request could not be read: malformed JSON
5335
+ */
5336
+ 400: ErrorResponse;
5337
+ /**
5338
+ * Missing or invalid credentials
5339
+ */
5340
+ 401: ErrorResponse;
5341
+ /**
5342
+ * The key's scopes do not cover this, or it is pinned to agents and `agent_id` names another
5343
+ */
5344
+ 403: ErrorResponse;
5345
+ /**
5346
+ * No text, or text that looks like a secret — a password, a code, a card, account or identity number, or a key — which no fact may hold
5347
+ */
5348
+ 422: ErrorResponse;
5349
+ /**
5350
+ * Rate limit exceeded
5351
+ */
5352
+ 429: ErrorResponse;
5353
+ };
5354
+ export type CreateFactError = CreateFactErrors[keyof CreateFactErrors];
5355
+ export type CreateFactResponses = {
5356
+ /**
5357
+ * The fact that already said it, now yours
5358
+ */
5359
+ 200: FactInfo;
5360
+ /**
5361
+ * The fact, remembered
5362
+ */
5363
+ 201: FactInfo;
5364
+ };
5365
+ export type CreateFactResponse = CreateFactResponses[keyof CreateFactResponses];
5196
5366
  export type DeleteFactData = {
5197
5367
  body?: never;
5198
5368
  path: {
@@ -5231,6 +5401,52 @@ export type DeleteFactResponses = {
5231
5401
  204: void;
5232
5402
  };
5233
5403
  export type DeleteFactResponse = DeleteFactResponses[keyof DeleteFactResponses];
5404
+ export type UpdateFactData = {
5405
+ body: FactUpdateRequest;
5406
+ path: {
5407
+ fact_id: string;
5408
+ };
5409
+ query?: never;
5410
+ url: '/v1/agent/facts/{fact_id}';
5411
+ };
5412
+ export type UpdateFactErrors = {
5413
+ /**
5414
+ * The request could not be read: malformed JSON
5415
+ */
5416
+ 400: ErrorResponse;
5417
+ /**
5418
+ * Missing or invalid credentials
5419
+ */
5420
+ 401: ErrorResponse;
5421
+ /**
5422
+ * The key is valid but its scopes do not cover this capability
5423
+ */
5424
+ 403: ErrorResponse;
5425
+ /**
5426
+ * Unknown fact id
5427
+ */
5428
+ 404: ErrorResponse;
5429
+ /**
5430
+ * Replaced by a later conversation, or another fact already says that
5431
+ */
5432
+ 409: ErrorResponse;
5433
+ /**
5434
+ * No text, or text that looks like a secret — a password, a code, a card, account or identity number, or a key — which no fact may hold
5435
+ */
5436
+ 422: ErrorResponse;
5437
+ /**
5438
+ * Rate limit exceeded
5439
+ */
5440
+ 429: ErrorResponse;
5441
+ };
5442
+ export type UpdateFactError = UpdateFactErrors[keyof UpdateFactErrors];
5443
+ export type UpdateFactResponses = {
5444
+ /**
5445
+ * The fact, corrected
5446
+ */
5447
+ 200: FactInfo;
5448
+ };
5449
+ export type UpdateFactResponse = UpdateFactResponses[keyof UpdateFactResponses];
5234
5450
  export type ListRelationsData = {
5235
5451
  body?: never;
5236
5452
  path?: never;
@@ -5757,6 +5973,189 @@ export type UpdateEndUserResponses = {
5757
5973
  200: EndUserInfo;
5758
5974
  };
5759
5975
  export type UpdateEndUserResponse = UpdateEndUserResponses[keyof UpdateEndUserResponses];
5976
+ export type ListEndUserFactsData = {
5977
+ body?: never;
5978
+ path: {
5979
+ end_user_id: string;
5980
+ };
5981
+ query?: {
5982
+ /**
5983
+ * Also list the facts a later conversation replaced or removed, until they are deleted, the platform's `agents.memory.facts.replaced_kept_days` later (`GET /v1/platform/limits`).
5984
+ */
5985
+ include_replaced?: boolean;
5986
+ /**
5987
+ * How many to answer, 1 to 200.
5988
+ */
5989
+ limit?: number;
5990
+ /**
5991
+ * The `next_cursor` of the page before.
5992
+ */
5993
+ cursor?: string;
5994
+ };
5995
+ url: '/v1/end-users/{end_user_id}/facts';
5996
+ };
5997
+ export type ListEndUserFactsErrors = {
5998
+ /**
5999
+ * Missing or invalid credentials
6000
+ */
6001
+ 401: ErrorResponse;
6002
+ /**
6003
+ * 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
6004
+ */
6005
+ 403: ErrorResponse;
6006
+ /**
6007
+ * Unknown end user id
6008
+ */
6009
+ 404: ErrorResponse;
6010
+ /**
6011
+ * The request failed validation
6012
+ */
6013
+ 422: ErrorResponse;
6014
+ /**
6015
+ * Rate limit exceeded
6016
+ */
6017
+ 429: ErrorResponse;
6018
+ };
6019
+ export type ListEndUserFactsError = ListEndUserFactsErrors[keyof ListEndUserFactsErrors];
6020
+ export type ListEndUserFactsResponses = {
6021
+ /**
6022
+ * One page of what is remembered, oldest first
6023
+ */
6024
+ 200: FactPage;
6025
+ };
6026
+ export type ListEndUserFactsResponse = ListEndUserFactsResponses[keyof ListEndUserFactsResponses];
6027
+ export type CreateEndUserFactData = {
6028
+ body: FactCreateRequest;
6029
+ path: {
6030
+ end_user_id: string;
6031
+ };
6032
+ query?: never;
6033
+ url: '/v1/end-users/{end_user_id}/facts';
6034
+ };
6035
+ export type CreateEndUserFactErrors = {
6036
+ /**
6037
+ * The request could not be read: malformed JSON
6038
+ */
6039
+ 400: ErrorResponse;
6040
+ /**
6041
+ * Missing or invalid credentials
6042
+ */
6043
+ 401: ErrorResponse;
6044
+ /**
6045
+ * 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
6046
+ */
6047
+ 403: ErrorResponse;
6048
+ /**
6049
+ * Unknown end user id
6050
+ */
6051
+ 404: ErrorResponse;
6052
+ /**
6053
+ * No text, or text that looks like a secret — a password, a code, a card, account or identity number, or a key — which no fact may hold
6054
+ */
6055
+ 422: ErrorResponse;
6056
+ /**
6057
+ * Rate limit exceeded
6058
+ */
6059
+ 429: ErrorResponse;
6060
+ };
6061
+ export type CreateEndUserFactError = CreateEndUserFactErrors[keyof CreateEndUserFactErrors];
6062
+ export type CreateEndUserFactResponses = {
6063
+ /**
6064
+ * The fact that already said it, now yours
6065
+ */
6066
+ 200: FactInfo;
6067
+ /**
6068
+ * The fact, remembered
6069
+ */
6070
+ 201: FactInfo;
6071
+ };
6072
+ export type CreateEndUserFactResponse = CreateEndUserFactResponses[keyof CreateEndUserFactResponses];
6073
+ export type DeleteEndUserFactData = {
6074
+ body?: never;
6075
+ path: {
6076
+ end_user_id: string;
6077
+ fact_id: string;
6078
+ };
6079
+ query?: never;
6080
+ url: '/v1/end-users/{end_user_id}/facts/{fact_id}';
6081
+ };
6082
+ export type DeleteEndUserFactErrors = {
6083
+ /**
6084
+ * Missing or invalid credentials
6085
+ */
6086
+ 401: ErrorResponse;
6087
+ /**
6088
+ * 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
6089
+ */
6090
+ 403: ErrorResponse;
6091
+ /**
6092
+ * Unknown end user id, or Unknown fact id
6093
+ */
6094
+ 404: ErrorResponse;
6095
+ /**
6096
+ * The request failed validation
6097
+ */
6098
+ 422: ErrorResponse;
6099
+ /**
6100
+ * Rate limit exceeded
6101
+ */
6102
+ 429: ErrorResponse;
6103
+ };
6104
+ export type DeleteEndUserFactError = DeleteEndUserFactErrors[keyof DeleteEndUserFactErrors];
6105
+ export type DeleteEndUserFactResponses = {
6106
+ /**
6107
+ * The fact is gone
6108
+ */
6109
+ 204: void;
6110
+ };
6111
+ export type DeleteEndUserFactResponse = DeleteEndUserFactResponses[keyof DeleteEndUserFactResponses];
6112
+ export type UpdateEndUserFactData = {
6113
+ body: FactUpdateRequest;
6114
+ path: {
6115
+ end_user_id: string;
6116
+ fact_id: string;
6117
+ };
6118
+ query?: never;
6119
+ url: '/v1/end-users/{end_user_id}/facts/{fact_id}';
6120
+ };
6121
+ export type UpdateEndUserFactErrors = {
6122
+ /**
6123
+ * The request could not be read: malformed JSON
6124
+ */
6125
+ 400: ErrorResponse;
6126
+ /**
6127
+ * Missing or invalid credentials
6128
+ */
6129
+ 401: ErrorResponse;
6130
+ /**
6131
+ * 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
6132
+ */
6133
+ 403: ErrorResponse;
6134
+ /**
6135
+ * Unknown end user id, or Unknown fact id
6136
+ */
6137
+ 404: ErrorResponse;
6138
+ /**
6139
+ * Replaced by a later conversation, or another fact already says that
6140
+ */
6141
+ 409: ErrorResponse;
6142
+ /**
6143
+ * No text, or text that looks like a secret — a password, a code, a card, account or identity number, or a key — which no fact may hold
6144
+ */
6145
+ 422: ErrorResponse;
6146
+ /**
6147
+ * Rate limit exceeded
6148
+ */
6149
+ 429: ErrorResponse;
6150
+ };
6151
+ export type UpdateEndUserFactError = UpdateEndUserFactErrors[keyof UpdateEndUserFactErrors];
6152
+ export type UpdateEndUserFactResponses = {
6153
+ /**
6154
+ * The fact, corrected
6155
+ */
6156
+ 200: FactInfo;
6157
+ };
6158
+ export type UpdateEndUserFactResponse = UpdateEndUserFactResponses[keyof UpdateEndUserFactResponses];
5760
6159
  export type ListKnowledgeCategoriesData = {
5761
6160
  body?: never;
5762
6161
  path?: never;
@@ -6522,7 +6921,7 @@ export type CreateToolErrors = {
6522
6921
  */
6523
6922
  403: ErrorResponse;
6524
6923
  /**
6525
- * A tool by that name exists already, or the library holds 200 tools.
6924
+ * A tool by that name exists already, or the library holds the platform's `limits.org.tools`.
6526
6925
  */
6527
6926
  409: ErrorResponse;
6528
6927
  /**
@@ -7135,7 +7534,7 @@ export type CreateVoiceUploadUrlErrors = {
7135
7534
  */
7136
7535
  403: ErrorResponse;
7137
7536
  /**
7138
- * The organisation already has as many voices as its plan allows, or the provider's account has no room for another. Delete one, or ask for a higher limit.
7537
+ * The organisation already has as many voices as its plan allows — never more than the platform's `limits.org.voices` (`GET /v1/platform/limits`) — or the provider's account has no room for another. Delete one, or ask for a higher limit.
7139
7538
  */
7140
7539
  409: ErrorResponse;
7141
7540
  /**
@@ -7231,7 +7630,7 @@ export type SaveDesignedVoiceErrors = {
7231
7630
  */
7232
7631
  403: ErrorResponse;
7233
7632
  /**
7234
- * The organisation already has as many voices as its plan allows, or the provider's account has no room for another. Delete one, or ask for a higher limit.
7633
+ * The organisation already has as many voices as its plan allows — never more than the platform's `limits.org.voices` (`GET /v1/platform/limits`) — or the provider's account has no room for another. Delete one, or ask for a higher limit.
7235
7634
  */
7236
7635
  409: ErrorResponse;
7237
7636
  /**
@@ -32,7 +32,7 @@ export interface AgentKnowledge {
32
32
  export interface AgentTools {
33
33
  /** Every tool it can call. */
34
34
  list(agentId: string, options?: RequestOptions): AsyncGenerator<ToolInfo, void, undefined>;
35
- /** Replaces them all with these, 20 at most. */
35
+ /** Replaces them all with these: the platform's `limits.agent.tools` at most (`limits()`). */
36
36
  set(agentId: string, body: AgentToolsUpdate, options?: RequestOptions): Promise<ToolsAssigned>;
37
37
  }
38
38
  export declare class Agents extends Library<AgentInfo, AgentUpdate, AgentSummary, AgentPage, AgentCreateRequest> {
@@ -22,7 +22,9 @@
22
22
  * key): it mints a five-minute key for them, lists their sessions (200 a
23
23
  * page), reads each transcript back to its start by `messages.next_cursor`
24
24
  * (200 messages a page, four sessions at a time), reads their facts (200
25
- * a page), and revokes the key in `finally` — after an abort or a failure
25
+ * a page) — those a later conversation replaced too, which are still held
26
+ * until they are deleted 30 days on — and revokes the key in `finally` —
27
+ * after an abort or a failure
26
28
  * too. The cost: one mint (and `limits()` when cold) + ⌈S/200⌉ lists +
27
29
  * Σ⌈M/200⌉ transcript pages + ⌈F/200⌉ fact pages + one revoke. **Its ceilings**: the
28
30
  * key is ordinary, so at the person's live-key cap or the plan's mint rate
@@ -31,7 +33,7 @@
31
33
  * read fails with a 401; its one micro-credit is set aside like any key's,
32
34
  * so an organisation with no balance cannot export (402).
33
35
  */
34
- import type { EndUserCreateRequest, EndUserDeleted, EndUserInfo, EndUserPage, EndUserUpdateRequest, FactInfo, ListEndUsersData, SessionDetail } from "../gen/index.js";
36
+ import type { EndUserCreateRequest, EndUserDeleted, EndUserInfo, EndUserPage, EndUserUpdateRequest, FactCreateRequest, FactInfo, FactUpdateRequest, ListEndUsersData, SessionDetail } from "../gen/index.js";
35
37
  import { type RequestOptions, type Transport } from "../transport.js";
36
38
  import type { EphemeralKeys } from "./ephemeral-keys.js";
37
39
  import { Editable } from "./resource.js";
@@ -57,8 +59,30 @@ export interface EndUserExport {
57
59
  /** What is remembered about them, oldest first — the newest 100 for now. */
58
60
  facts: FactInfo[];
59
61
  }
62
+ /** A fact `facts.add` answered, and whether this call made it. */
63
+ export type FactAdded = FactInfo & {
64
+ /** `true` on a 201, `false` when a fact already said it — now yours. */
65
+ created: boolean;
66
+ };
67
+ /**
68
+ * `endUsers.facts`: what the agents remember about one person, from your
69
+ * server, with no key minted for them — `/v1/end-users/{id}/facts`.
70
+ */
71
+ export interface EndUserFacts {
72
+ /** Every fact, oldest first; `include_replaced` lists the replaced ones too. */
73
+ list(id: string, params?: {
74
+ include_replaced?: boolean;
75
+ }, options?: RequestOptions): AsyncGenerator<FactInfo, void, undefined>;
76
+ /** Tells the agents something: yours, never replaced by a conversation. */
77
+ add(id: string, body: FactCreateRequest, options?: RequestOptions): Promise<FactAdded>;
78
+ /** Corrects one fact's words; the old ones are kept as forgotten. */
79
+ update(id: string, factId: string, body: FactUpdateRequest, options?: RequestOptions): Promise<FactInfo>;
80
+ /** Forgets one: `true`, or `false` when there is none by that id. */
81
+ delete(id: string, factId: string, options?: RequestOptions): Promise<boolean>;
82
+ }
60
83
  export declare class EndUsers extends Editable<EndUserInfo, EndUserUpdateRequest, EndUserInfo, EndUserDeleted | null> {
61
84
  private readonly keys;
85
+ readonly facts: EndUserFacts;
62
86
  constructor(api: Transport, base: string, keys: EphemeralKeys);
63
87
  /**
64
88
  * Makes a person, or finds the one your `external_id` already names.
@@ -22,7 +22,9 @@
22
22
  * key): it mints a five-minute key for them, lists their sessions (200 a
23
23
  * page), reads each transcript back to its start by `messages.next_cursor`
24
24
  * (200 messages a page, four sessions at a time), reads their facts (200
25
- * a page), and revokes the key in `finally` — after an abort or a failure
25
+ * a page) — those a later conversation replaced too, which are still held
26
+ * until they are deleted 30 days on — and revokes the key in `finally` —
27
+ * after an abort or a failure
26
28
  * too. The cost: one mint (and `limits()` when cold) + ⌈S/200⌉ lists +
27
29
  * Σ⌈M/200⌉ transcript pages + ⌈F/200⌉ fact pages + one revoke. **Its ceilings**: the
28
30
  * key is ordinary, so at the person's live-key cap or the plan's mint rate
@@ -32,7 +34,7 @@
32
34
  * so an organisation with no balance cannot export (402).
33
35
  */
34
36
  import { pages } from "../paging.js";
35
- import { segment, } from "../transport.js";
37
+ import { orNull, segment, } from "../transport.js";
36
38
  import { Editable } from "./resource.js";
37
39
  /** The routes' largest page, for end users, sessions and transcripts alike. */
38
40
  const PAGE = 200;
@@ -65,6 +67,16 @@ export class EndUsers extends Editable {
65
67
  constructor(api, base, keys) {
66
68
  super(api, base);
67
69
  this.keys = keys;
70
+ const fact = (id, factId) => this.at(id, `/facts/${segment(factId)}`);
71
+ this.facts = {
72
+ list: (id, params = {}, options) => this.each(this.at(id, "/facts"), params, options, PAGE),
73
+ add: async (id, body, options) => {
74
+ const answer = await this.api.request({ method: "POST", path: this.base + this.at(id, "/facts"), body }, options);
75
+ return { ...answer.data, created: answer.status === 201 };
76
+ },
77
+ update: (id, factId, body, options) => this.send("PATCH", fact(id, factId), options, body),
78
+ delete: (id, factId, options) => orNull(this.send("DELETE", fact(id, factId), options)).then((gone) => gone !== null),
79
+ };
68
80
  }
69
81
  /**
70
82
  * Makes a person, or finds the one your `external_id` already names.
@@ -125,7 +137,11 @@ export class EndUsers extends Editable {
125
137
  messages: { data: held.flat(), next_cursor: null },
126
138
  };
127
139
  });
128
- const facts = await all(pages((cursor) => read("/v1/agent/facts", { limit: PAGE, cursor })));
140
+ const facts = await all(pages((cursor) => read("/v1/agent/facts", {
141
+ limit: PAGE,
142
+ cursor,
143
+ include_replaced: true,
144
+ })));
129
145
  return { end_user_id: key.end_user_id ?? id, sessions, facts };
130
146
  }
131
147
  finally {
@@ -2,13 +2,15 @@
2
2
  * `client.tools`: what an organisation's agents can call while they reply
3
3
  * — `/v1/tools*`. A tool is your server (`webhook`), sent a signed `POST`
4
4
  * with the call, or the person's app (`app`), called over the agent's
5
- * socket; each is turned on per agent (`agents.tools.set`), 20 at most.
5
+ * socket; each is turned on per agent (`agents.tools.set`), up to the
6
+ * platform's `limits.agent.tools` (`client.limits()`).
6
7
  *
7
8
  * - **`create(body)`** answers a webhook's signing secret once, as does
8
9
  * `rotateSecret` (`secret`); every call carries `X-Tool-Signature`.
9
10
  * - **`test(id, { arguments })`** sends your server one call, signed as a
10
11
  * real one, and answers what came back.
11
- * - **`list()` reads one page**: a library holds 200 tools at most.
12
+ * - **`list()` reads one page**: a library holds the platform's
13
+ * `limits.org.tools` at most.
12
14
  * - **`calls(id, { limit })`** reads its most recent calls in your agents'
13
15
  * conversations (100 at most), and each tool carries its
14
16
  * `recent_failures`.
@@ -2,13 +2,15 @@
2
2
  * `client.tools`: what an organisation's agents can call while they reply
3
3
  * — `/v1/tools*`. A tool is your server (`webhook`), sent a signed `POST`
4
4
  * with the call, or the person's app (`app`), called over the agent's
5
- * socket; each is turned on per agent (`agents.tools.set`), 20 at most.
5
+ * socket; each is turned on per agent (`agents.tools.set`), up to the
6
+ * platform's `limits.agent.tools` (`client.limits()`).
6
7
  *
7
8
  * - **`create(body)`** answers a webhook's signing secret once, as does
8
9
  * `rotateSecret` (`secret`); every call carries `X-Tool-Signature`.
9
10
  * - **`test(id, { arguments })`** sends your server one call, signed as a
10
11
  * real one, and answers what came back.
11
- * - **`list()` reads one page**: a library holds 200 tools at most.
12
+ * - **`list()` reads one page**: a library holds the platform's
13
+ * `limits.org.tools` at most.
12
14
  * - **`calls(id, { limit })`** reads its most recent calls in your agents'
13
15
  * conversations (100 at most), and each tool carries its
14
16
  * `recent_failures`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lumavox/server",
3
- "version": "0.10.0",
3
+ "version": "0.14.1",
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",