openmates 0.15.0-alpha.12 → 0.15.0-alpha.13

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.
@@ -13618,6 +13618,7 @@ var OpenMates = class {
13618
13618
  embeds;
13619
13619
  feedback;
13620
13620
  inspirations;
13621
+ apiKeys;
13621
13622
  learningMode;
13622
13623
  memories;
13623
13624
  newChatSuggestions;
@@ -13648,6 +13649,7 @@ var OpenMates = class {
13648
13649
  this.embeds = new OpenMatesEmbeds(this);
13649
13650
  this.feedback = new OpenMatesFeedback(this);
13650
13651
  this.inspirations = new OpenMatesInspirations(this);
13652
+ this.apiKeys = new OpenMatesApiKeys(this);
13651
13653
  this.learningMode = new OpenMatesLearningMode(this);
13652
13654
  this.memories = new OpenMatesMemories(this);
13653
13655
  this.newChatSuggestions = new OpenMatesNewChatSuggestions(this);
@@ -14131,6 +14133,7 @@ var OpenMatesChats = class {
14131
14133
  remainingMs2
14132
14134
  );
14133
14135
  } catch (error) {
14136
+ if (error instanceof Error && (error.name === "AbortError" || error.name === "TimeoutError")) break;
14134
14137
  if (!(error instanceof OpenMatesApiError) || error.status !== 404) throw error;
14135
14138
  }
14136
14139
  const remainingMs = deadline - Date.now();
@@ -14333,6 +14336,63 @@ var OpenMatesSettings = class {
14333
14336
  return unsupportedSdkFeature("Debug-log sharing");
14334
14337
  }
14335
14338
  };
14339
+ var OpenMatesApiKeys = class {
14340
+ client;
14341
+ constructor(client) {
14342
+ this.client = client;
14343
+ }
14344
+ async list() {
14345
+ const data = await this.client.get("/v1/sdk/settings/api-keys");
14346
+ const masterKey = await this.client.masterKey();
14347
+ const apiKeys = [];
14348
+ for (const key of data.api_keys ?? []) {
14349
+ apiKeys.push(await this.decryptRecord(key, masterKey));
14350
+ }
14351
+ return { apiKeys };
14352
+ }
14353
+ async create(options) {
14354
+ const name = options.name.trim();
14355
+ if (!name) throw new OpenMatesConfigError("API key name is required");
14356
+ const masterKey = await this.client.masterKey();
14357
+ const material = await createApiKeyCryptoMaterial(name, bytesToBase64(masterKey));
14358
+ const key = await this.client.request("/v1/sdk/settings/api-keys", {
14359
+ encrypted_name: material.encryptedName,
14360
+ api_key_hash: material.apiKeyHash,
14361
+ encrypted_key_prefix: material.encryptedKeyPrefix,
14362
+ encrypted_master_key: material.encryptedMasterKey,
14363
+ salt: material.saltB64,
14364
+ key_iv: material.keyIv,
14365
+ full_access: options.fullAccess ?? true,
14366
+ scopes: options.scopes ?? {},
14367
+ credit_limit: options.creditLimit ?? null,
14368
+ expires_at: options.expiresAt ?? null
14369
+ });
14370
+ return { apiKey: material.apiKey, key: await this.decryptRecord(key, masterKey) };
14371
+ }
14372
+ async revoke(id) {
14373
+ return this.client.delete(`/v1/sdk/settings/api-keys/${encodeURIComponent(id)}`);
14374
+ }
14375
+ async decryptRecord(record, masterKey) {
14376
+ const encryptedName = typeof record.encrypted_name === "string" ? record.encrypted_name : "";
14377
+ const encryptedPrefix = typeof record.encrypted_key_prefix === "string" ? record.encrypted_key_prefix : "";
14378
+ const name = encryptedName ? await decryptWithAesGcmCombined(encryptedName, masterKey) : null;
14379
+ const keyPrefix = encryptedPrefix ? await decryptWithAesGcmCombined(encryptedPrefix, masterKey) : null;
14380
+ const lastUsedAt = typeof record.last_used_at === "string" ? record.last_used_at : null;
14381
+ return {
14382
+ id: String(record.id ?? ""),
14383
+ name: name || encryptedName || "Unnamed API key",
14384
+ keyPrefix: keyPrefix || encryptedPrefix || "sk-api-...",
14385
+ createdAt: typeof record.created_at === "string" ? record.created_at : null,
14386
+ expiresAt: typeof record.expires_at === "string" ? record.expires_at : null,
14387
+ lastUsedAt,
14388
+ lastUsedLabel: lastUsedAt ? new Date(lastUsedAt).toLocaleString() : "Never used",
14389
+ fullAccess: typeof record.full_access === "boolean" ? record.full_access : true,
14390
+ scopes: record.scopes && typeof record.scopes === "object" ? record.scopes : {},
14391
+ creditLimit: record.credit_limit && typeof record.credit_limit === "object" ? record.credit_limit : null,
14392
+ pendingDeviceCount: typeof record.pending_device_count === "number" ? record.pending_device_count : 0
14393
+ };
14394
+ }
14395
+ };
14336
14396
  var OpenMatesMemories = class {
14337
14397
  client;
14338
14398
  constructor(client) {
@@ -46073,6 +46133,110 @@ As of mid-2026, the severe supply shocks from the 2024\u20132025 avian flu have
46073
46133
  text: "OpenMates is designed so that most of your data is encrypted on your device before it reaches our servers. This is **not** end-to-end encryption: our servers briefly decrypt your content in memory to run AI responses, render invoices, and deliver reminders. But we never write decrypted content to disk, logs, or traces, and when you delete your account we destroy the encryption key that protects your data \u2014 cryptographically shredding every encrypted field we still hold."
46074
46134
  }
46075
46135
  },
46136
+ quick_answers: {
46137
+ heading: {
46138
+ text: "Quick answers about your privacy"
46139
+ },
46140
+ intro: {
46141
+ text: "These answers summarize the most important privacy points in plain language. The detailed policy and provider tables below explain the same topics in more depth."
46142
+ },
46143
+ employee_access: {
46144
+ question: {
46145
+ text: "Can OpenMates employees read my private chats?"
46146
+ },
46147
+ answer: {
46148
+ text: "Private chats are not routinely reviewed by OpenMates employees, and we do not provide a normal admin screen for browsing private chat content. However, OpenMates is not a strict end-to-end encrypted or zero-knowledge system: relevant content can be processed temporarily in server memory when you ask for an AI response or use a feature that needs server processing."
46149
+ }
46150
+ },
46151
+ device_only_encryption: {
46152
+ question: {
46153
+ text: "Are my chats encrypted so only my devices can read them?"
46154
+ },
46155
+ answer: {
46156
+ text: "No. OpenMates uses client-side encryption for durable storage and sync, not device-only access. Permanent chat history is encrypted before it is stored, so database and backup records should be ciphertext. But OpenMates servers can process relevant plaintext in memory when needed to answer your request."
46157
+ }
46158
+ },
46159
+ recent_context_cache: {
46160
+ question: {
46161
+ text: "What is the recent AI context cache?"
46162
+ },
46163
+ answer: {
46164
+ text: "To make follow-up responses fast, OpenMates may keep a short-lived, server-readable AI context cache for recent chats, currently designed around the last 3 chats. This cache is encrypted with server-side Vault encryption, but OpenMates servers can decrypt it while processing your request. If the cache is missing, the server may ask your active client to resend the needed decrypted context and cache it temporarily again."
46165
+ }
46166
+ },
46167
+ storage_protection: {
46168
+ question: {
46169
+ text: "Where are my chats stored, and how are they protected?"
46170
+ },
46171
+ answer: {
46172
+ text: "Saved chats are stored on OpenMates infrastructure as encrypted data. Chat content, titles, summaries, tags, app settings, memories, reminders, and sensitive profile fields are designed to be encrypted before durable storage. Persistent storage, backups, and sync caches should not contain readable chat text."
46173
+ }
46174
+ },
46175
+ third_party_providers: {
46176
+ question: {
46177
+ text: "Do third-party AI providers see my messages?"
46178
+ },
46179
+ answer: {
46180
+ text: "Yes, when you choose a model or use a feature powered by a third-party provider, the content needed to process that request may be sent to that provider. OpenMates tries to reduce exposure by replacing recognized personal details and secrets with placeholders before sending, but anything not detected may be sent as typed."
46181
+ }
46182
+ },
46183
+ model_training: {
46184
+ question: {
46185
+ text: "Are my chats used to train AI models?"
46186
+ },
46187
+ answer: {
46188
+ text: "OpenMates does not use your private chats to train OpenMates-owned AI models. For third-party providers, the answer depends on the provider. Most audited chat-model providers state that they do not train on API customer data, or only train if the customer opts in. Some image or 3D generation providers have broader or limited-use policies. The provider-by-provider training table below lists the status, source document, and last verification date."
46189
+ }
46190
+ },
46191
+ placeholder_protection: {
46192
+ question: {
46193
+ text: "Does placeholder protection make sensitive data safe to send?"
46194
+ },
46195
+ answer: {
46196
+ text: "No. Placeholder protection reduces risk, but it is not a guarantee. It works best for recognized personal data, saved privacy-profile values, and common secret patterns. It may miss typos, unusual formats, context-only sensitive information, other people's personal data, or sensitive topics that are not technically identifiable as personal data."
46197
+ }
46198
+ },
46199
+ logs_diagnostics: {
46200
+ question: {
46201
+ text: "What data appears in logs or diagnostics?"
46202
+ },
46203
+ answer: {
46204
+ text: "OpenMates is designed so chat content is not written to logs or traces. Application logs and telemetry include redaction and filtering for authentication headers, cookies, tokens, passwords, emails, IP addresses, and chat content. Browser stability logs are sanitized, use temporary session identifiers, and can be disabled in privacy settings."
46205
+ }
46206
+ },
46207
+ deletion: {
46208
+ question: {
46209
+ text: "What happens when I delete my account or chats?"
46210
+ },
46211
+ answer: {
46212
+ text: "When you delete chats or your account, OpenMates deletes the corresponding data according to the retention rules below. For account deletion, OpenMates also destroys encryption keys so any remaining encrypted data in backups or caches becomes unreadable ciphertext. Some records may remain for legal or operational reasons, such as invoices, payment records, audit logs, third-party provider logs, or short-lived encrypted backups."
46213
+ }
46214
+ },
46215
+ open_source: {
46216
+ question: {
46217
+ text: "What does open source mean for my privacy?"
46218
+ },
46219
+ answer: {
46220
+ text: "Open source means the OpenMates software code is public and can be inspected by others. It does not mean your private data is public. Your chats, account data, settings, memories, uploads, and billing data are not published on GitHub. The code is public; your personal data is not."
46221
+ }
46222
+ },
46223
+ sensitive_topics: {
46224
+ question: {
46225
+ text: "Is OpenMates suitable for sensitive topics?"
46226
+ },
46227
+ answer: {
46228
+ text: "OpenMates is privacy-conscious, but it is not a zero-knowledge or device-only system. It is reasonable for everyday private AI use when you avoid unnecessary personal details. For highly sensitive legal, medical, financial, business-confidential, or safety-critical topics, be careful about what you enter and which model or provider you use."
46229
+ }
46230
+ },
46231
+ highest_privacy: {
46232
+ question: {
46233
+ text: "What if I have the highest privacy requirements?"
46234
+ },
46235
+ answer: {
46236
+ text: "If you have very high privacy requirements, consider self-hosting OpenMates and using local or offline AI models instead of third-party AI providers. This gives you more control over infrastructure, model choice, logs, backups, and provider exposure. It requires technical experience, ongoing maintenance, secure server administration, and enough hardware for useful local AI inference. Self-hosting does not automatically make everything private: you still need to secure the server, backups, secrets, network access, logs, and any external providers you enable."
46237
+ }
46238
+ }
46239
+ },
46076
46240
  protection: {
46077
46241
  heading: {
46078
46242
  text: "How we protect your data"
@@ -50584,6 +50748,18 @@ As of mid-2026, the severe supply shocks from the 2024\u20132025 avian flu have
50584
50748
  developers_devices_revoke: {
50585
50749
  text: "Revoke"
50586
50750
  },
50751
+ developers_devices_reject: {
50752
+ text: "Reject"
50753
+ },
50754
+ developers_devices_ip_address: {
50755
+ text: "IP address"
50756
+ },
50757
+ developers_devices_access_type: {
50758
+ text: "Access type"
50759
+ },
50760
+ developers_devices_api_key: {
50761
+ text: "API key"
50762
+ },
50587
50763
  developers_devices_confirm_revoke: {
50588
50764
  text: "Are you sure you want to revoke access for this device?"
50589
50765
  },
@@ -52490,6 +52666,9 @@ As of mid-2026, the severe supply shocks from the 2024\u20132025 avian flu have
52490
52666
  copied_done: {
52491
52667
  text: "I've copied the key"
52492
52668
  },
52669
+ confirm_device: {
52670
+ text: "Confirm device"
52671
+ },
52493
52672
  loading: {
52494
52673
  text: "Loading API keys..."
52495
52674
  },
package/dist/cli.js CHANGED
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  getExtForLang,
4
4
  serializeToYaml
5
- } from "./chunk-DYHLNAUG.js";
5
+ } from "./chunk-Z4CRE3LS.js";
6
6
  import "./chunk-AXNRPVLE.js";
7
7
  export {
8
8
  getExtForLang,
package/dist/index.d.ts CHANGED
@@ -1096,7 +1096,7 @@ interface BankTransferStatus {
1096
1096
  interface GiftCardBankTransferStatus extends BankTransferStatus {
1097
1097
  gift_card_code?: string | null;
1098
1098
  }
1099
- interface ApiKeyCreateOptions {
1099
+ interface ApiKeyCreateOptions$1 {
1100
1100
  name: string;
1101
1101
  fullAccess?: boolean;
1102
1102
  scopes?: Record<string, unknown>;
@@ -1108,7 +1108,7 @@ interface CreatedApiKeyResult {
1108
1108
  key: unknown;
1109
1109
  crypto: ApiKeyCryptoMaterial;
1110
1110
  }
1111
- interface ApiKeyRecord {
1111
+ interface ApiKeyRecord$1 {
1112
1112
  id: string;
1113
1113
  name: string;
1114
1114
  key_prefix: string;
@@ -1123,7 +1123,7 @@ interface ApiKeyRecord {
1123
1123
  encrypted_key_prefix?: string | null;
1124
1124
  }
1125
1125
  interface ApiKeyListResult {
1126
- api_keys: ApiKeyRecord[];
1126
+ api_keys: ApiKeyRecord$1[];
1127
1127
  }
1128
1128
  interface AuthMethodsStatus {
1129
1129
  has_passkey?: boolean;
@@ -1616,7 +1616,7 @@ declare class OpenMatesClient {
1616
1616
  createPlanVerification(planId: string, input: UserPlanVerificationRecord & Record<string, unknown>): Promise<UserPlanVerificationRecord>;
1617
1617
  addPlanVerificationEvidence(planId: string, verificationId: string, input: Partial<UserPlanVerificationRecord>): Promise<UserPlanVerificationRecord>;
1618
1618
  settingsGet(path: string, apiKey?: string): Promise<unknown>;
1619
- createApiKey(options: ApiKeyCreateOptions): Promise<CreatedApiKeyResult>;
1619
+ createApiKey(options: ApiKeyCreateOptions$1): Promise<CreatedApiKeyResult>;
1620
1620
  listApiKeys(): Promise<ApiKeyListResult>;
1621
1621
  revokeApiKey(id: string): Promise<unknown>;
1622
1622
  private decryptApiKeyList;
@@ -4830,6 +4830,30 @@ interface ConfirmedMutationOptions {
4830
4830
  interface RequestOptions {
4831
4831
  query?: Record<string, string | number | boolean | undefined | null>;
4832
4832
  }
4833
+ interface ApiKeyCreateOptions {
4834
+ name: string;
4835
+ fullAccess?: boolean;
4836
+ scopes?: Record<string, unknown>;
4837
+ creditLimit?: Record<string, unknown> | null;
4838
+ expiresAt?: string | null;
4839
+ }
4840
+ interface ApiKeyRecord {
4841
+ id: string;
4842
+ name: string;
4843
+ keyPrefix: string;
4844
+ createdAt?: string | null;
4845
+ expiresAt?: string | null;
4846
+ lastUsedAt?: string | null;
4847
+ lastUsedLabel: string;
4848
+ fullAccess: boolean;
4849
+ scopes: Record<string, unknown>;
4850
+ creditLimit?: Record<string, unknown> | null;
4851
+ pendingDeviceCount: number;
4852
+ }
4853
+ interface ApiKeyCreateResult {
4854
+ apiKey: string;
4855
+ key: ApiKeyRecord;
4856
+ }
4833
4857
  interface ApplicationPreviewStartOptions {
4834
4858
  chatId: string;
4835
4859
  sharedContext?: string;
@@ -4933,6 +4957,7 @@ declare class OpenMates {
4933
4957
  readonly embeds: OpenMatesEmbeds;
4934
4958
  readonly feedback: OpenMatesFeedback;
4935
4959
  readonly inspirations: OpenMatesInspirations;
4960
+ readonly apiKeys: OpenMatesApiKeys;
4936
4961
  readonly learningMode: OpenMatesLearningMode;
4937
4962
  readonly memories: OpenMatesMemories;
4938
4963
  readonly newChatSuggestions: OpenMatesNewChatSuggestions;
@@ -5039,6 +5064,16 @@ declare class OpenMatesSettings {
5039
5064
  confirmed: true;
5040
5065
  }): Promise<Record<string, unknown>>;
5041
5066
  }
5067
+ declare class OpenMatesApiKeys {
5068
+ private readonly client;
5069
+ constructor(client: OpenMates);
5070
+ list(): Promise<{
5071
+ apiKeys: ApiKeyRecord[];
5072
+ }>;
5073
+ create(options: ApiKeyCreateOptions): Promise<ApiKeyCreateResult>;
5074
+ revoke(id: string): Promise<Record<string, unknown>>;
5075
+ private decryptRecord;
5076
+ }
5042
5077
  declare class OpenMatesMemories {
5043
5078
  private readonly client;
5044
5079
  constructor(client: OpenMates);
@@ -5288,4 +5323,4 @@ type AssistantFeedbackDecision = {
5288
5323
  };
5289
5324
  declare function buildAssistantFeedbackDecision(rating: number): AssistantFeedbackDecision;
5290
5325
 
5291
- export { APP_SKILL_METADATA, ASSISTANT_FEEDBACK_REPORT_TITLE, ASSISTANT_FEEDBACK_THANKS, type AssistantFeedbackDecision, type AuthMethodsStatus, type AuthoritativeChatReconciliation, type BackupCodesResult, type BankTransferOrderDetails, type BankTransferStatus, type CachedChat, type CachedNewChatSuggestion, type ChatCreateOptions, type ChatListOptions, type ChatListPage, type ChatResponse, type CliSignupResult, type DecryptedDraft, type DecryptedEmbed, type DecryptedMemoryEntry, type DecryptedMessage, type DecryptedNewChatSuggestion, type DocsFile, type DocsFolder, type DocsSearchResult, type DocsTree, type DraftRecord, type EncryptedChatMetadata, type EncryptedDraft, type EncryptedDraftRecord, type FocusModeSelection, type GiftCardBankTransferStatus, INTEREST_TAG_IDS, type InterestTagId, MATE_NAMES, MEMORY_TYPE_REGISTRY, type MemoryFieldDef, type MemoryTypeDef, OpenMates, OpenMatesApiError, OpenMatesClient, type OpenMatesClientOptions, OpenMatesConfigError, type OpenMatesOptions, type OpenMatesSession, type ProjectSourceCapability, type ProjectSourceCreateInput, type ProjectSourceRecord, type ProjectSourceStatus, type ProjectSourceType, SUPPORT_URL, type SyncCache, type TopicPreferencesPayload, type TotpSetupStartResult, type WorkflowCapability, type WorkflowDetail, type WorkflowEdge, type WorkflowGraph, type WorkflowNode, type WorkflowNodeRun, type WorkflowNodeType, type WorkflowRunContentRetention, type WorkflowRunContentStorage, type WorkflowRunDetail, type WorkflowSummary, buildAssistantFeedbackDecision, defaultCloneBranchForVersion, deriveAppUrl, normalizeInterestTagIds, reconcileAuthoritativeChats, renderSupportInfo };
5326
+ export { APP_SKILL_METADATA, ASSISTANT_FEEDBACK_REPORT_TITLE, ASSISTANT_FEEDBACK_THANKS, type ApiKeyCreateOptions, type ApiKeyCreateResult, type ApiKeyRecord, type AssistantFeedbackDecision, type AuthMethodsStatus, type AuthoritativeChatReconciliation, type BackupCodesResult, type BankTransferOrderDetails, type BankTransferStatus, type CachedChat, type CachedNewChatSuggestion, type ChatCreateOptions, type ChatListOptions, type ChatListPage, type ChatResponse, type CliSignupResult, type DecryptedDraft, type DecryptedEmbed, type DecryptedMemoryEntry, type DecryptedMessage, type DecryptedNewChatSuggestion, type DocsFile, type DocsFolder, type DocsSearchResult, type DocsTree, type DraftRecord, type EncryptedChatMetadata, type EncryptedDraft, type EncryptedDraftRecord, type FocusModeSelection, type GiftCardBankTransferStatus, INTEREST_TAG_IDS, type InterestTagId, MATE_NAMES, MEMORY_TYPE_REGISTRY, type MemoryFieldDef, type MemoryTypeDef, OpenMates, OpenMatesApiError, OpenMatesClient, type OpenMatesClientOptions, OpenMatesConfigError, type OpenMatesOptions, type OpenMatesSession, type ProjectSourceCapability, type ProjectSourceCreateInput, type ProjectSourceRecord, type ProjectSourceStatus, type ProjectSourceType, SUPPORT_URL, type SyncCache, type TopicPreferencesPayload, type TotpSetupStartResult, type WorkflowCapability, type WorkflowDetail, type WorkflowEdge, type WorkflowGraph, type WorkflowNode, type WorkflowNodeRun, type WorkflowNodeType, type WorkflowRunContentRetention, type WorkflowRunContentStorage, type WorkflowRunDetail, type WorkflowSummary, buildAssistantFeedbackDecision, defaultCloneBranchForVersion, deriveAppUrl, normalizeInterestTagIds, reconcileAuthoritativeChats, renderSupportInfo };
package/dist/index.js CHANGED
@@ -18,7 +18,7 @@ import {
18
18
  reconcileAuthoritativeChats,
19
19
  renderSupportInfo,
20
20
  serializeToYaml
21
- } from "./chunk-DYHLNAUG.js";
21
+ } from "./chunk-Z4CRE3LS.js";
22
22
  import "./chunk-AXNRPVLE.js";
23
23
  export {
24
24
  APP_SKILL_METADATA,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openmates",
3
- "version": "0.15.0-alpha.12",
3
+ "version": "0.15.0-alpha.13",
4
4
  "description": "OpenMates CLI and SDK",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",