openmates 0.27.0-alpha.47 → 0.27.0-alpha.48

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.
@@ -414,7 +414,7 @@ function loadSession() {
414
414
  switch (onDisk.masterKeyStorage) {
415
415
  case "keychain":
416
416
  masterKey = retrieveMasterKey("keychain", resolveKeyStorageId(onDisk.hashedEmail));
417
- if (!masterKey) throw new Error("Existing OS keyring entry is unavailable; local session was preserved.");
417
+ if (!masterKey) throw new Error("Existing OS keyring entry is unavailable; local session was preserved. Unlock your OS keyring or run `openmates login` to pair again.");
418
418
  break;
419
419
  case "encrypted":
420
420
  masterKey = retrieveMasterKey(
@@ -437,6 +437,10 @@ function loadSession() {
437
437
  }
438
438
  return buildSession(onDisk, masterKey, getEmailEncryptionKeyFromDisk(onDisk));
439
439
  }
440
+ function loadStoredSessionApiUrl() {
441
+ const onDisk = readJsonFile(join(getStateDir(), "session.json"));
442
+ return typeof onDisk?.apiUrl === "string" && onDisk.apiUrl ? onDisk.apiUrl : void 0;
443
+ }
440
444
  function getCredentialStorageMode() {
441
445
  const onDisk = readJsonFile(join(getStateDir(), "session.json"));
442
446
  if (!onDisk) return "none";
@@ -531,7 +535,7 @@ function getEmailEncryptionKeyFromDisk(onDisk) {
531
535
  switch (onDisk.emailEncryptionKeyStorage) {
532
536
  case "keychain": {
533
537
  const key = retrieveMasterKey("keychain", resolveKeyStorageId(`${onDisk.hashedEmail}:email`));
534
- if (!key) throw new Error("Existing email keyring entry is unavailable; local session was preserved.");
538
+ if (!key) throw new Error("Existing email keyring entry is unavailable; local session was preserved. Unlock your OS keyring or run `openmates login` to pair again.");
535
539
  return key;
536
540
  }
537
541
  case "encrypted":
@@ -1194,6 +1198,7 @@ export {
1194
1198
  saveSession,
1195
1199
  persistSessionRefreshCookie,
1196
1200
  loadSession,
1201
+ loadStoredSessionApiUrl,
1197
1202
  getCredentialStorageMode,
1198
1203
  purgeLocalPrivateData,
1199
1204
  saveLocalTeamKey,
@@ -11,6 +11,7 @@ import {
11
11
  loadAnonymousId,
12
12
  loadLocalTeamKey,
13
13
  loadSession,
14
+ loadStoredSessionApiUrl,
14
15
  loadSyncCache,
15
16
  loadTrustedAccountId,
16
17
  persistSessionRefreshCookie,
@@ -34,7 +35,7 @@ import {
34
35
  verifyInstalledModel,
35
36
  verifyPrivacyRuntime,
36
37
  withSessionRefreshLock
37
- } from "./chunk-B4UXKGH3.js";
38
+ } from "./chunk-5HWC6OTW.js";
38
39
  import {
39
40
  RemoteAccessReplayGuard,
40
41
  createRemoteAccessHandshake,
@@ -11222,8 +11223,8 @@ var OpenMatesClient = class _OpenMatesClient {
11222
11223
  explicitSession;
11223
11224
  constructor(options = {}) {
11224
11225
  this.explicitSession = options.session !== void 0;
11225
- const diskSession = options.session ?? this.getValidSessionFromDisk();
11226
- this.apiUrl = (options.apiUrl ?? process.env.OPENMATES_API_URL ?? diskSession?.apiUrl ?? loadDefaultServerApiUrl() ?? DEFAULT_API_URL).replace(/\/$/, "");
11226
+ const diskSession = options.session ?? (options.loadStoredSession === false ? null : this.getValidSessionFromDisk());
11227
+ this.apiUrl = (options.apiUrl ?? process.env.OPENMATES_API_URL ?? diskSession?.apiUrl ?? (options.loadStoredSession === false ? loadStoredSessionApiUrl() : void 0) ?? loadDefaultServerApiUrl() ?? DEFAULT_API_URL).replace(/\/$/, "");
11227
11228
  this.session = diskSession;
11228
11229
  this.http = new OpenMatesHttpClient({
11229
11230
  apiUrl: this.apiUrl,
@@ -106997,7 +106998,9 @@ async function main() {
106997
106998
  }
106998
106999
  process.env.OPENMATES_PROFILE = profile;
106999
107000
  }
107001
+ const sessionFree = parsed.flags.help === true || ["help", "version", "update", "upgrade", "login"].includes(command ?? "") || !command && parsed.flags.version !== void 0;
107000
107002
  const client2 = OpenMatesClient.load({
107003
+ loadStoredSession: !sessionFree,
107001
107004
  apiUrl: typeof parsed.flags["api-url"] === "string" ? parsed.flags["api-url"] : void 0
107002
107005
  });
107003
107006
  if (accountGuardRequired && parsed.flags.help !== true && shouldRequireTrustedAccountGuard(command)) {
@@ -2268,6 +2268,8 @@ interface DecryptedMemoryEntry {
2268
2268
  }
2269
2269
  interface OpenMatesClientOptions {
2270
2270
  apiUrl?: string;
2271
+ /** Skip saved credentials for fresh pairing or session-free maintenance. */
2272
+ loadStoredSession?: boolean;
2271
2273
  session?: OpenMatesSession;
2272
2274
  }
2273
2275
  interface InvoiceListItem {
package/dist/cli.d.ts CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- export { ak as ImagesAiDetectionClassification, al as ImagesAiDetectionSummary, aK as assertTrustedAccountCommandAllowed, aL as assertTrustedAccountGuardEnvironment, aC as buildImagesAiDetectionSummary, aM as buildProjectDefaultFocus, aN as buildTravelConnectionsRequest, aD as classifyImagesAiDetection, aO as extractExplicitProjectMentions, aF as formatImagesAiDetectionLabel, aG as getExtForLang, aP as handleWiki, aQ as printWhoAmI, aR as readRootProjectInstructions, aS as renderProjectReadApprovalRequest, aT as renderProjectWriteApprovalRequest, aU as renderRemoteCommandEvent, aV as requireExactConfirmation, aW as resolveProjectContext, aJ as serializeToYaml, aX as shouldRequireTrustedAccountGuard, aY as waitForSafeE2ETotpWindow, aZ as waitForWorkflowRun } from './cli-CM2HlOYK.js';
2
+ export { ak as ImagesAiDetectionClassification, al as ImagesAiDetectionSummary, aK as assertTrustedAccountCommandAllowed, aL as assertTrustedAccountGuardEnvironment, aC as buildImagesAiDetectionSummary, aM as buildProjectDefaultFocus, aN as buildTravelConnectionsRequest, aD as classifyImagesAiDetection, aO as extractExplicitProjectMentions, aF as formatImagesAiDetectionLabel, aG as getExtForLang, aP as handleWiki, aQ as printWhoAmI, aR as readRootProjectInstructions, aS as renderProjectReadApprovalRequest, aT as renderProjectWriteApprovalRequest, aU as renderRemoteCommandEvent, aV as requireExactConfirmation, aW as resolveProjectContext, aJ as serializeToYaml, aX as shouldRequireTrustedAccountGuard, aY as waitForSafeE2ETotpWindow, aZ as waitForWorkflowRun } from './cli-CNsuzfYG.js';
package/dist/cli.js CHANGED
@@ -21,8 +21,8 @@ import {
21
21
  shouldRequireTrustedAccountGuard,
22
22
  waitForSafeE2ETotpWindow,
23
23
  waitForWorkflowRun
24
- } from "./chunk-WKEUTPBX.js";
25
- import "./chunk-B4UXKGH3.js";
24
+ } from "./chunk-TYME6DVO.js";
25
+ import "./chunk-5HWC6OTW.js";
26
26
  import "./chunk-IWKP55ZB.js";
27
27
  import "./chunk-FC27KZIW.js";
28
28
  import "./chunk-TMYEFC7M.js";
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { O as OpenMatesSession, U as UserPlanStatus, a as UserPlanRecord, b as UserPlanVerificationStatus, c as UserPlanLearningType, d as UserPlanLearningTargetKind, e as UserPlanLearningStatus, f as UserPlanLearningLevel, g as UserPlanLearningRecord, h as UserPlanCriterionRecord, i as UserPlanVerificationRecord, j as UserPlanCreateInput, k as UserPlanUpdateInput, B as BuyerAddress, P as ProjectItemRecord, T as TaskCreateOptions, l as TaskUpdateOptions, m as UserPlanLearningCreateTasksInput, n as UserPlanLearningCreateTasksResult, o as UserTaskStatus, E as ExternalChatContext, p as TaskPriorityLevel, D as DecryptedUserTask, q as DecryptedTaskActivityEntry, r as TaskActivityCreateOptions, s as UserTaskReorderInput, W as WorkflowSummary, t as WorkflowCapability, u as WorkflowDetail, v as WorkflowAuthoringWarning, w as WorkflowInputStartParams, x as WorkflowInputSessionResult, y as WorkflowInputSessionDetail, z as WorkflowInputEvent, A as WorkflowGraph, C as WorkflowRunContentRetention, F as WorkflowRunOnceOptions, G as WorkflowRunDetail, H as WorkflowRunOptions, I as WorkflowNode, J as WorkflowRunCancellationResult, K as WorkflowTemplateProjectionUpsertParams, L as WorkflowTemplateProjectionResult, M as PublicWorkflowTemplateProjection, N as WorkflowTemplateProjectionRevocationResult, Q as WorkflowTemplateBindingCompletionParams, R as WorkflowTemplateBindingCompletionResult, S as WorkflowTemplateShortUrlParams, V as WorkflowTemplateShortUrlResult, X as ShortUrlRevokeResult, Y as WorkflowTemplateImportPayload, Z as ImportedWorkflowTemplate, _ as WikipediaLearningBundle } from './cli-CM2HlOYK.js';
2
- export { $ as AuthMethodsStatus, a0 as AuthoritativeChatReconciliation, a1 as BackupCodesResult, a2 as BankTransferOrderDetails, a3 as BankTransferStatus, a4 as CachedChat, a5 as CachedNewChatSuggestion, a6 as ChatListPage, a7 as CliSignupResult, a8 as DecryptedDraft, a9 as DecryptedEmbed, aa as DecryptedMemoryEntry, ab as DecryptedMessage, ac as DecryptedNewChatSuggestion, ad as DocsFile, ae as DocsFolder, af as DocsSearchResult, ag as DocsTree, ah as EncryptedDraft, ai as GiftCardBankTransferStatus, aj as INTEREST_TAG_IDS, ak as ImagesAiDetectionClassification, al as ImagesAiDetectionSummary, am as InterestTagId, an as MATE_NAMES, ao as MEMORY_TYPE_REGISTRY, ap as MemoryFieldDef, aq as MemoryTypeDef, ar as OpenMatesClient, as as OpenMatesClientOptions, at as SyncCache, au as TopicPreferencesPayload, av as TotpSetupStartResult, aw as WorkflowEdge, ax as WorkflowNodeRun, ay as WorkflowNodeType, az as WorkflowReturnedOutputReference, aA as WorkflowRunContentStorage, aB as WorkflowRunRouting, aC as buildImagesAiDetectionSummary, aD as classifyImagesAiDetection, aE as deriveAppUrl, aF as formatImagesAiDetectionLabel, aG as getExtForLang, aH as normalizeInterestTagIds, aI as reconcileAuthoritativeChats, aJ as serializeToYaml } from './cli-CM2HlOYK.js';
1
+ import { O as OpenMatesSession, U as UserPlanStatus, a as UserPlanRecord, b as UserPlanVerificationStatus, c as UserPlanLearningType, d as UserPlanLearningTargetKind, e as UserPlanLearningStatus, f as UserPlanLearningLevel, g as UserPlanLearningRecord, h as UserPlanCriterionRecord, i as UserPlanVerificationRecord, j as UserPlanCreateInput, k as UserPlanUpdateInput, B as BuyerAddress, P as ProjectItemRecord, T as TaskCreateOptions, l as TaskUpdateOptions, m as UserPlanLearningCreateTasksInput, n as UserPlanLearningCreateTasksResult, o as UserTaskStatus, E as ExternalChatContext, p as TaskPriorityLevel, D as DecryptedUserTask, q as DecryptedTaskActivityEntry, r as TaskActivityCreateOptions, s as UserTaskReorderInput, W as WorkflowSummary, t as WorkflowCapability, u as WorkflowDetail, v as WorkflowAuthoringWarning, w as WorkflowInputStartParams, x as WorkflowInputSessionResult, y as WorkflowInputSessionDetail, z as WorkflowInputEvent, A as WorkflowGraph, C as WorkflowRunContentRetention, F as WorkflowRunOnceOptions, G as WorkflowRunDetail, H as WorkflowRunOptions, I as WorkflowNode, J as WorkflowRunCancellationResult, K as WorkflowTemplateProjectionUpsertParams, L as WorkflowTemplateProjectionResult, M as PublicWorkflowTemplateProjection, N as WorkflowTemplateProjectionRevocationResult, Q as WorkflowTemplateBindingCompletionParams, R as WorkflowTemplateBindingCompletionResult, S as WorkflowTemplateShortUrlParams, V as WorkflowTemplateShortUrlResult, X as ShortUrlRevokeResult, Y as WorkflowTemplateImportPayload, Z as ImportedWorkflowTemplate, _ as WikipediaLearningBundle } from './cli-CNsuzfYG.js';
2
+ export { $ as AuthMethodsStatus, a0 as AuthoritativeChatReconciliation, a1 as BackupCodesResult, a2 as BankTransferOrderDetails, a3 as BankTransferStatus, a4 as CachedChat, a5 as CachedNewChatSuggestion, a6 as ChatListPage, a7 as CliSignupResult, a8 as DecryptedDraft, a9 as DecryptedEmbed, aa as DecryptedMemoryEntry, ab as DecryptedMessage, ac as DecryptedNewChatSuggestion, ad as DocsFile, ae as DocsFolder, af as DocsSearchResult, ag as DocsTree, ah as EncryptedDraft, ai as GiftCardBankTransferStatus, aj as INTEREST_TAG_IDS, ak as ImagesAiDetectionClassification, al as ImagesAiDetectionSummary, am as InterestTagId, an as MATE_NAMES, ao as MEMORY_TYPE_REGISTRY, ap as MemoryFieldDef, aq as MemoryTypeDef, ar as OpenMatesClient, as as OpenMatesClientOptions, at as SyncCache, au as TopicPreferencesPayload, av as TotpSetupStartResult, aw as WorkflowEdge, ax as WorkflowNodeRun, ay as WorkflowNodeType, az as WorkflowReturnedOutputReference, aA as WorkflowRunContentStorage, aB as WorkflowRunRouting, aC as buildImagesAiDetectionSummary, aD as classifyImagesAiDetection, aE as deriveAppUrl, aF as formatImagesAiDetectionLabel, aG as getExtForLang, aH as normalizeInterestTagIds, aI as reconcileAuthoritativeChats, aJ as serializeToYaml } from './cli-CNsuzfYG.js';
3
3
 
4
4
  type ChatModelSelection = "auto" | (string & {});
5
5
  interface ChatModelCatalogEntry {
package/dist/index.js CHANGED
@@ -44,8 +44,8 @@ import {
44
44
  selectAssistantMessagesForSpeech,
45
45
  serializeToYaml,
46
46
  summarizeAssistantSpeech
47
- } from "./chunk-WKEUTPBX.js";
48
- import "./chunk-B4UXKGH3.js";
47
+ } from "./chunk-TYME6DVO.js";
48
+ import "./chunk-5HWC6OTW.js";
49
49
  import "./chunk-IWKP55ZB.js";
50
50
  import "./chunk-FC27KZIW.js";
51
51
  import "./chunk-TMYEFC7M.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  runPrivacyDaemon
3
- } from "./chunk-B4UXKGH3.js";
3
+ } from "./chunk-5HWC6OTW.js";
4
4
 
5
5
  // src/privacyDaemon.ts
6
6
  void runPrivacyDaemon().catch(() => process.exit(1));
@@ -17,47 +17,47 @@
17
17
  {
18
18
  "name": "libggml-base.so",
19
19
  "bytes": 1110088,
20
- "sha256": "0e032b2501ba3798235d23a65b7d84f628496b860503b22d02f190e7351ae546"
20
+ "sha256": "b3410088aeb5fd4d3210e8d9969f8ee7322b464bb249615551fa166221050e68"
21
21
  },
22
22
  {
23
23
  "name": "libggml-base.so.0",
24
24
  "bytes": 1110088,
25
- "sha256": "0e032b2501ba3798235d23a65b7d84f628496b860503b22d02f190e7351ae546"
25
+ "sha256": "b3410088aeb5fd4d3210e8d9969f8ee7322b464bb249615551fa166221050e68"
26
26
  },
27
27
  {
28
28
  "name": "libggml-base.so.0.15.1",
29
29
  "bytes": 1110088,
30
- "sha256": "0e032b2501ba3798235d23a65b7d84f628496b860503b22d02f190e7351ae546"
30
+ "sha256": "b3410088aeb5fd4d3210e8d9969f8ee7322b464bb249615551fa166221050e68"
31
31
  },
32
32
  {
33
33
  "name": "libggml-cpu.so",
34
34
  "bytes": 869800,
35
- "sha256": "c792362ba1e6d5e704eaa9047013ca028e99d9b0ea525e61c9b4ccfb6ae64aa4"
35
+ "sha256": "f4ace9a11f1642764f721f4772ede90acad6521b81329435553ed1a3c693957b"
36
36
  },
37
37
  {
38
38
  "name": "libggml-cpu.so.0",
39
39
  "bytes": 869800,
40
- "sha256": "c792362ba1e6d5e704eaa9047013ca028e99d9b0ea525e61c9b4ccfb6ae64aa4"
40
+ "sha256": "f4ace9a11f1642764f721f4772ede90acad6521b81329435553ed1a3c693957b"
41
41
  },
42
42
  {
43
43
  "name": "libggml-cpu.so.0.15.1",
44
44
  "bytes": 869800,
45
- "sha256": "c792362ba1e6d5e704eaa9047013ca028e99d9b0ea525e61c9b4ccfb6ae64aa4"
45
+ "sha256": "f4ace9a11f1642764f721f4772ede90acad6521b81329435553ed1a3c693957b"
46
46
  },
47
47
  {
48
48
  "name": "libggml.so",
49
49
  "bytes": 1899104,
50
- "sha256": "8f3c50d871e737ff72187c4c72b3633940f9f9056f8efd9e1cc49d33ff436d76"
50
+ "sha256": "07e384deb7dd55891c72c378e1d09aa8056f2f9d348708970cf44f1db09971b2"
51
51
  },
52
52
  {
53
53
  "name": "libggml.so.0",
54
54
  "bytes": 1899104,
55
- "sha256": "8f3c50d871e737ff72187c4c72b3633940f9f9056f8efd9e1cc49d33ff436d76"
55
+ "sha256": "07e384deb7dd55891c72c378e1d09aa8056f2f9d348708970cf44f1db09971b2"
56
56
  },
57
57
  {
58
58
  "name": "libggml.so.0.15.1",
59
59
  "bytes": 1899104,
60
- "sha256": "8f3c50d871e737ff72187c4c72b3633940f9f9056f8efd9e1cc49d33ff436d76"
60
+ "sha256": "07e384deb7dd55891c72c378e1d09aa8056f2f9d348708970cf44f1db09971b2"
61
61
  },
62
62
  {
63
63
  "name": "openmates-pii-worker",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openmates",
3
- "version": "0.27.0-alpha.47",
3
+ "version": "0.27.0-alpha.48",
4
4
  "description": "OpenMates CLI and SDK",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",