openmates 0.18.0-alpha.3 → 0.18.0-alpha.4

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.
@@ -1015,6 +1015,10 @@ var OpenMatesHttpClient = class {
1015
1015
  getCookieMap() {
1016
1016
  return Object.fromEntries(this.cookies.entries());
1017
1017
  }
1018
+ replaceCookies(cookies) {
1019
+ this.cookies.clear();
1020
+ for (const [name, value] of Object.entries(cookies)) this.cookies.set(name, value);
1021
+ }
1018
1022
  async get(path2, headers = {}) {
1019
1023
  return this.request("GET", path2, void 0, headers);
1020
1024
  }
@@ -1194,8 +1198,10 @@ import {
1194
1198
  readdirSync,
1195
1199
  readFileSync as readFileSync2,
1196
1200
  rmSync,
1201
+ renameSync,
1197
1202
  writeFileSync
1198
1203
  } from "fs";
1204
+ import lockfile from "proper-lockfile";
1199
1205
  import { createHash as createHash4 } from "crypto";
1200
1206
  import { homedir as homedir2 } from "os";
1201
1207
  import { isAbsolute, join, resolve } from "path";
@@ -1483,7 +1489,55 @@ function saveAnonymousId(anonymousId) {
1483
1489
  createdAt: Math.floor(Date.now() / 1e3)
1484
1490
  });
1485
1491
  }
1486
- function saveSession(session) {
1492
+ var SESSION_LOCK_STALE_MS = 3e4;
1493
+ var SESSION_LOCK_POLL_MS = 50;
1494
+ async function withSessionRefreshLock(operation) {
1495
+ const path2 = join(ensureStateDir(), "session.json");
1496
+ const release2 = await lockfile.lock(`${path2}.refresh`, {
1497
+ realpath: false,
1498
+ stale: SESSION_LOCK_STALE_MS,
1499
+ retries: { retries: 600, factor: 1, minTimeout: SESSION_LOCK_POLL_MS, maxTimeout: SESSION_LOCK_POLL_MS }
1500
+ });
1501
+ try {
1502
+ return await operation();
1503
+ } finally {
1504
+ await release2();
1505
+ }
1506
+ }
1507
+ function saveSession(session, options = {}) {
1508
+ const path2 = join(ensureStateDir(), "session.json");
1509
+ let release2;
1510
+ const waitCell = new Int32Array(new SharedArrayBuffer(4));
1511
+ for (let attempt = 0; ; attempt++) {
1512
+ try {
1513
+ release2 = lockfile.lockSync(`${path2}.write`, { realpath: false, stale: SESSION_LOCK_STALE_MS });
1514
+ break;
1515
+ } catch (error) {
1516
+ if (error.code !== "ELOCKED" || attempt >= 100) throw error;
1517
+ Atomics.wait(waitCell, 0, 0, SESSION_LOCK_POLL_MS);
1518
+ }
1519
+ }
1520
+ try {
1521
+ const current = readJsonFile(path2);
1522
+ if (current && !options.replace) {
1523
+ if (current.sessionId !== session.sessionId || current.hashedEmail !== session.hashedEmail || current.apiUrl !== session.apiUrl) {
1524
+ throw new Error("Login session changed in another process. Retry the command using the current profile.");
1525
+ }
1526
+ if (options.expectedRefreshToken !== void 0) {
1527
+ if (current.cookies.auth_refresh_token !== options.expectedRefreshToken) {
1528
+ throw new Error("Login credentials changed during refresh. Retry with the current profile.");
1529
+ }
1530
+ } else {
1531
+ session.cookies = { ...current.cookies };
1532
+ session.wsToken = current.wsToken;
1533
+ }
1534
+ }
1535
+ writeSession(session);
1536
+ } finally {
1537
+ release2();
1538
+ }
1539
+ }
1540
+ function writeSession(session) {
1487
1541
  const filePath = join(ensureStateDir(), "session.json");
1488
1542
  const result = storeMasterKey(session.masterKeyExportedB64, resolveKeyStorageId(session.hashedEmail));
1489
1543
  const onDisk = {
@@ -1516,7 +1570,13 @@ function saveSession(session) {
1516
1570
  onDisk.emailEncryptionKeyB64 = session.emailEncryptionKeyB64;
1517
1571
  }
1518
1572
  }
1519
- writeJsonFile(filePath, onDisk);
1573
+ const temporary = `${filePath}.${process.pid}.tmp`;
1574
+ try {
1575
+ writeJsonFile(temporary, onDisk);
1576
+ renameSync(temporary, filePath);
1577
+ } finally {
1578
+ rmSync(temporary, { force: true });
1579
+ }
1520
1580
  if (result.type !== "plaintext") {
1521
1581
  process.stderr.write("Decrypting data...\n");
1522
1582
  }
@@ -7509,7 +7569,9 @@ var OpenMatesClient = class _OpenMatesClient {
7509
7569
  apiUrl;
7510
7570
  session;
7511
7571
  http;
7572
+ explicitSession;
7512
7573
  constructor(options = {}) {
7574
+ this.explicitSession = options.session !== void 0;
7513
7575
  const diskSession = options.session ?? this.getValidSessionFromDisk();
7514
7576
  this.apiUrl = (options.apiUrl ?? process.env.OPENMATES_API_URL ?? diskSession?.apiUrl ?? loadDefaultServerApiUrl() ?? DEFAULT_API_URL).replace(/\/$/, "");
7515
7577
  this.session = diskSession;
@@ -8570,31 +8632,34 @@ var OpenMatesClient = class _OpenMatesClient {
8570
8632
  };
8571
8633
  await this.hydrateEmailEncryptionKey(session);
8572
8634
  this.session = session;
8573
- saveSession(session);
8635
+ saveSession(session, { replace: true });
8574
8636
  }
8575
8637
  async whoAmI() {
8576
- const session = this.requireSession();
8577
- const response = await this.http.post(
8578
- "/v1/auth/session",
8579
- { session_id: session.sessionId },
8580
- this.getCliRequestHeaders()
8581
- );
8582
- if (!response.ok || !response.data.success) {
8583
- if (response.status === 502 || response.status === 503 || response.status === 504) {
8638
+ return this.withFreshStoredSession(async () => {
8639
+ const session = this.requireSession();
8640
+ const previousRefreshToken = session.cookies.auth_refresh_token;
8641
+ const response = await this.http.post(
8642
+ "/v1/auth/session",
8643
+ { session_id: session.sessionId },
8644
+ this.getCliRequestHeaders()
8645
+ );
8646
+ if (!response.ok || !response.data.success) {
8647
+ if (response.status === 502 || response.status === 503 || response.status === 504) {
8648
+ throw new Error(
8649
+ `Session validation temporarily unavailable (HTTP ${response.status}). The API may be restarting; retry shortly.`
8650
+ );
8651
+ }
8584
8652
  throw new Error(
8585
- `Session validation temporarily unavailable (HTTP ${response.status}). The API may be restarting; retry shortly.`
8653
+ `Session validation failed (HTTP ${response.status}): ${response.data.message ?? "invalid session"}${response.data.re_auth_reason ? ` (${response.data.re_auth_reason})` : ""}. Please run \`${this.loginRecoveryCommand()}\`.`
8586
8654
  );
8587
8655
  }
8588
- throw new Error(
8589
- `Session validation failed (HTTP ${response.status}): ${response.data.message ?? "invalid session"}${response.data.re_auth_reason ? ` (${response.data.re_auth_reason})` : ""}. Please run \`openmates login\`.`
8590
- );
8591
- }
8592
- if (response.data.ws_token) {
8593
- session.wsToken = response.data.ws_token;
8594
- }
8595
- session.cookies = this.http.getCookieMap();
8596
- saveSession(session);
8597
- return response.data.user ?? {};
8656
+ if (response.data.ws_token) {
8657
+ session.wsToken = response.data.ws_token;
8658
+ }
8659
+ session.cookies = this.http.getCookieMap();
8660
+ saveSession(session, { expectedRefreshToken: previousRefreshToken });
8661
+ return response.data.user ?? {};
8662
+ });
8598
8663
  }
8599
8664
  async getTopicPreferences() {
8600
8665
  const user = await this.whoAmI();
@@ -8734,7 +8799,7 @@ var OpenMatesClient = class _OpenMatesClient {
8734
8799
  authorizerDeviceName: null,
8735
8800
  autoLogoutMinutes: null
8736
8801
  };
8737
- saveSession(session);
8802
+ saveSession(session, { replace: true });
8738
8803
  this.session = session;
8739
8804
  return {
8740
8805
  success: true,
@@ -13974,8 +14039,9 @@ Required: ${schema.required.join(", ")}`
13974
14039
  const session = this.requireSession();
13975
14040
  const currentCookies = this.http.getCookieMap();
13976
14041
  if (JSON.stringify(session.cookies) !== JSON.stringify(currentCookies)) {
14042
+ const previousRefreshToken = session.cookies.auth_refresh_token;
13977
14043
  session.cookies = currentCookies;
13978
- saveSession(session);
14044
+ saveSession(session, { expectedRefreshToken: previousRefreshToken });
13979
14045
  }
13980
14046
  return session;
13981
14047
  }
@@ -14445,9 +14511,30 @@ Required: ${schema.required.join(", ")}`
14445
14511
  session.userEmailSalt
14446
14512
  );
14447
14513
  }
14514
+ async withFreshStoredSession(operation) {
14515
+ return withSessionRefreshLock(async () => {
14516
+ const previous = this.requireSession();
14517
+ const current = loadSession();
14518
+ if (!current && !this.explicitSession) {
14519
+ throw new Error("Login session was removed. Log in to the current profile before retrying.");
14520
+ }
14521
+ if (current && !this.explicitSession) {
14522
+ if (current.hashedEmail !== previous.hashedEmail || current.apiUrl !== previous.apiUrl) {
14523
+ throw new Error("Login account changed in another process. Retry using the current profile.");
14524
+ }
14525
+ this.session = current;
14526
+ this.http.replaceCookies(current.cookies);
14527
+ }
14528
+ return operation();
14529
+ });
14530
+ }
14531
+ loginRecoveryCommand() {
14532
+ const profile = process.env.OPENMATES_PROFILE?.trim();
14533
+ return profile ? `openmates --profile ${profile} login` : "openmates login";
14534
+ }
14448
14535
  requireSession() {
14449
14536
  if (!this.session) {
14450
- throw new Error("Not logged in. Run `openmates login`.");
14537
+ throw new Error(`Not logged in. Run \`${this.loginRecoveryCommand()}\`.`);
14451
14538
  }
14452
14539
  return this.session;
14453
14540
  }
@@ -14527,24 +14614,30 @@ Required: ${schema.required.join(", ")}`
14527
14614
  * This method fetches a fresh ws_token and captures any rotated cookies.
14528
14615
  */
14529
14616
  async refreshWsToken() {
14530
- const session = this.requireSession();
14531
- let res;
14532
- try {
14533
- res = await this.http.post("/v1/auth/session", { session_id: session.sessionId }, this.getCliRequestHeaders());
14534
- } catch {
14535
- return null;
14536
- }
14537
- if (!res.ok || res.data.success === false) {
14538
- purgeLocalPrivateData();
14539
- this.session = null;
14540
- throw new Error("Session expired or invalid. Please run `openmates login` to re-authenticate.");
14541
- }
14542
- if (res.data.ws_token) {
14543
- session.wsToken = res.data.ws_token;
14544
- }
14545
- session.cookies = this.http.getCookieMap();
14546
- saveSession(session);
14547
- return typeof res.data.user?.id === "string" ? res.data.user.id : typeof res.data.user?.user_id === "string" ? res.data.user.user_id : null;
14617
+ return this.withFreshStoredSession(async () => {
14618
+ const session = this.requireSession();
14619
+ const previousRefreshToken = session.cookies.auth_refresh_token;
14620
+ let res;
14621
+ try {
14622
+ res = await this.http.post("/v1/auth/session", { session_id: session.sessionId }, this.getCliRequestHeaders());
14623
+ } catch {
14624
+ return null;
14625
+ }
14626
+ if (res.status >= 500) {
14627
+ throw new Error(`Session validation temporarily unavailable (HTTP ${res.status}). Retry shortly.`);
14628
+ }
14629
+ if (!res.ok || res.data.success === false) {
14630
+ purgeLocalPrivateData();
14631
+ this.session = null;
14632
+ throw new Error(`Session expired or invalid. Please run \`${this.loginRecoveryCommand()}\` to re-authenticate.`);
14633
+ }
14634
+ if (res.data.ws_token) {
14635
+ session.wsToken = res.data.ws_token;
14636
+ }
14637
+ session.cookies = this.http.getCookieMap();
14638
+ saveSession(session, { expectedRefreshToken: previousRefreshToken });
14639
+ return typeof res.data.user?.id === "string" ? res.data.user.id : typeof res.data.user?.user_id === "string" ? res.data.user.user_id : null;
14640
+ });
14548
14641
  }
14549
14642
  /**
14550
14643
  * Ensure the local sync cache is up to date. If the cache is fresh,
@@ -27194,7 +27287,7 @@ function shouldAutoInstallRuntimeMonitoringServices(env) {
27194
27287
 
27195
27288
  // src/serverBackupArchive.ts
27196
27289
  import { execFileSync as execFileSync3 } from "child_process";
27197
- import { chmodSync as chmodSync3, lstatSync, readdirSync as readdirSync3, renameSync, rmSync as rmSync4 } from "fs";
27290
+ import { chmodSync as chmodSync3, lstatSync, readdirSync as readdirSync3, renameSync as renameSync2, rmSync as rmSync4 } from "fs";
27198
27291
  import { randomUUID as randomUUID8 } from "crypto";
27199
27292
  function assertRegularBackupTree(path2) {
27200
27293
  const stat2 = lstatSync(path2);
@@ -27213,7 +27306,7 @@ function publishServerBackupArchive(sourceDir, archivePath, options = {}) {
27213
27306
  try {
27214
27307
  execFileSync3(options.tarCommand ?? "tar", ["-czf", temporaryArchivePath, "-C", sourceDir, "."], { stdio: "pipe" });
27215
27308
  chmodSync3(temporaryArchivePath, 384);
27216
- renameSync(temporaryArchivePath, archivePath);
27309
+ renameSync2(temporaryArchivePath, archivePath);
27217
27310
  chmodSync3(archivePath, 384);
27218
27311
  } finally {
27219
27312
  process.umask(previousUmask);
@@ -27815,7 +27908,7 @@ function signRuntimeWebhookPayload(payload, secret, timestamp, eventId) {
27815
27908
 
27816
27909
  // src/serverUpdateState.ts
27817
27910
  import { randomBytes as randomBytes7 } from "crypto";
27818
- import { chmodSync as chmodSync4, closeSync, existsSync as existsSync8, mkdirSync as mkdirSync5, openSync, readFileSync as readFileSync6, renameSync as renameSync2, rmSync as rmSync5, writeFileSync as writeFileSync4 } from "fs";
27911
+ import { chmodSync as chmodSync4, closeSync, existsSync as existsSync8, mkdirSync as mkdirSync5, openSync, readFileSync as readFileSync6, renameSync as renameSync3, rmSync as rmSync5, writeFileSync as writeFileSync4 } from "fs";
27819
27912
  import { dirname as dirname5, join as join6 } from "path";
27820
27913
  function serverUpdateStatusFile(installPath, role) {
27821
27914
  return join6(installPath, ".openmates", `${role}-update-status.json`);
@@ -27839,7 +27932,7 @@ function writeServerUpdateStatus(installPath, role, status) {
27839
27932
  const temporaryPath = `${filePath}.${process.pid}.${randomBytes7(4).toString("hex")}.tmp`;
27840
27933
  writeFileSync4(temporaryPath, `${JSON.stringify({ role, updated_at: (/* @__PURE__ */ new Date()).toISOString(), ...status }, null, 2)}
27841
27934
  `, { mode: 384 });
27842
- renameSync2(temporaryPath, filePath);
27935
+ renameSync3(temporaryPath, filePath);
27843
27936
  chmodSync4(filePath, 384);
27844
27937
  }
27845
27938
  function acquireServerUpdateLock(installPath) {
@@ -74429,7 +74522,7 @@ function remoteErrorMessage(code) {
74429
74522
 
74430
74523
  // src/selfUpdate.ts
74431
74524
  import { spawnSync as spawnSync3 } from "child_process";
74432
- import { readFileSync as readFileSync10, mkdirSync as mkdirSync8, writeFileSync as writeFileSync8, renameSync as renameSync3 } from "fs";
74525
+ import { readFileSync as readFileSync10, mkdirSync as mkdirSync8, writeFileSync as writeFileSync8, renameSync as renameSync4 } from "fs";
74433
74526
  import { homedir as homedir8 } from "os";
74434
74527
  import { dirname as dirname8, basename as basename3, join as join10 } from "path";
74435
74528
  import { fileURLToPath as fileURLToPath2 } from "url";
@@ -74458,7 +74551,7 @@ function persistSelfUpdateChannel(plan) {
74458
74551
  mkdirSync8(dirname8(path2), { recursive: true, mode: 448 });
74459
74552
  const temporary = `${path2}.${process.pid}.tmp`;
74460
74553
  writeFileSync8(temporary, JSON.stringify({ channel: plan.channel }) + "\n", { mode: 384 });
74461
- renameSync3(temporary, path2);
74554
+ renameSync4(temporary, path2);
74462
74555
  }
74463
74556
  function installedNpmPrefix(moduleUrl = import.meta.url, platform4 = process.platform) {
74464
74557
  const packageRoot = dirname8(dirname8(fileURLToPath2(moduleUrl)));
@@ -74603,7 +74696,7 @@ function commandName(name) {
74603
74696
  }
74604
74697
 
74605
74698
  // src/workRecovery.ts
74606
- import { mkdirSync as mkdirSync9, renameSync as renameSync4, writeFileSync as writeFileSync9 } from "fs";
74699
+ import { mkdirSync as mkdirSync9, renameSync as renameSync5, writeFileSync as writeFileSync9 } from "fs";
74607
74700
  import { dirname as dirname9 } from "path";
74608
74701
  import { stringify } from "yaml";
74609
74702
  async function projectPlanAssumption(plan, masterKey, assumption) {
@@ -74786,7 +74879,7 @@ function writeWorkRecoveryAtomically(path2, document) {
74786
74879
  mkdirSync9(dirname9(path2), { recursive: true, mode: 448 });
74787
74880
  const temporaryPath = `${path2}.tmp`;
74788
74881
  writeFileSync9(temporaryPath, stringify(document, { sortMapEntries: true, lineWidth: 0 }), { encoding: "utf8", mode: 384 });
74789
- renameSync4(temporaryPath, path2);
74882
+ renameSync5(temporaryPath, path2);
74790
74883
  }
74791
74884
 
74792
74885
  // src/revolutBusinessCertificate.ts
@@ -74944,6 +75037,15 @@ async function main() {
74944
75037
  assertTrustedAccountGuardEnvironment(parsed.flags);
74945
75038
  assertTrustedAccountCommandAllowed(command);
74946
75039
  }
75040
+ if (parsed.flags.profile !== void 0) {
75041
+ const profile = parsed.flags.profile;
75042
+ if (typeof profile !== "string" || !profile) throw new Error("--profile requires a profile name");
75043
+ resolveStateDir({ profile, stateDir: "" });
75044
+ if (process.env.OPENMATES_STATE_DIR?.trim()) {
75045
+ throw new Error("--profile cannot be combined with OPENMATES_STATE_DIR");
75046
+ }
75047
+ process.env.OPENMATES_PROFILE = profile;
75048
+ }
74947
75049
  const client = OpenMatesClient.load({
74948
75050
  apiUrl: typeof parsed.flags["api-url"] === "string" ? parsed.flags["api-url"] : void 0
74949
75051
  });
@@ -75309,6 +75411,9 @@ function assertTrustedAccountCommandAllowed(command) {
75309
75411
  }
75310
75412
  }
75311
75413
  function assertTrustedAccountGuardEnvironment(flags, environment = process.env) {
75414
+ if (flags.profile !== void 0 && flags.profile !== TRUST_GUARD_PROFILE) {
75415
+ throw new Error(`Trusted OpenCode CLI commands cannot override profile ${TRUST_GUARD_PROFILE}.`);
75416
+ }
75312
75417
  if (environment.OPENMATES_PROFILE !== TRUST_GUARD_PROFILE) {
75313
75418
  throw new Error(`Trusted OpenCode CLI commands require OPENMATES_PROFILE=${TRUST_GUARD_PROFILE}.`);
75314
75419
  }
@@ -85711,6 +85816,7 @@ Commands:
85711
85816
 
85712
85817
  Flags:
85713
85818
  --json Output raw JSON instead of formatted output
85819
+ --profile <name> Use an isolated login profile (also OPENMATES_PROFILE)
85714
85820
  --api-url <url> Override API base URL (default: installed self-host server, then https://api.openmates.org)
85715
85821
  --api-key <key> Optional API key override (or set OPENMATES_API_KEY)
85716
85822
  --version Show CLI version and update availability
@@ -1734,6 +1734,7 @@ declare class OpenMatesClient {
1734
1734
  readonly apiUrl: string;
1735
1735
  private session;
1736
1736
  private readonly http;
1737
+ private readonly explicitSession;
1737
1738
  constructor(options?: OpenMatesClientOptions);
1738
1739
  static load(options?: OpenMatesClientOptions): OpenMatesClient;
1739
1740
  hasSession(): boolean;
@@ -2741,6 +2742,8 @@ declare class OpenMatesClient {
2741
2742
  private downloadPaymentPdf;
2742
2743
  private ensureEmailEncryptionKey;
2743
2744
  private hydrateEmailEncryptionKey;
2745
+ private withFreshStoredSession;
2746
+ private loginRecoveryCommand;
2744
2747
  private requireSession;
2745
2748
  getMasterKeyBytes(): Uint8Array;
2746
2749
  private decryptTopicPreferences;
package/dist/cli.d.ts CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- export { aa as ImagesAiDetectionClassification, ab as ImagesAiDetectionSummary, aA as assertTrustedAccountCommandAllowed, aB as assertTrustedAccountGuardEnvironment, as as buildImagesAiDetectionSummary, aC as buildTravelConnectionsRequest, at as classifyImagesAiDetection, av as formatImagesAiDetectionLabel, aw as getExtForLang, aD as requireExactConfirmation, aE as resolveProjectContext, az as serializeToYaml, aF as shouldRequireTrustedAccountGuard } from './cli-BMrmfKIF.js';
2
+ export { aa as ImagesAiDetectionClassification, ab as ImagesAiDetectionSummary, aA as assertTrustedAccountCommandAllowed, aB as assertTrustedAccountGuardEnvironment, as as buildImagesAiDetectionSummary, aC as buildTravelConnectionsRequest, at as classifyImagesAiDetection, av as formatImagesAiDetectionLabel, aw as getExtForLang, aD as requireExactConfirmation, aE as resolveProjectContext, az as serializeToYaml, aF as shouldRequireTrustedAccountGuard } from './cli-BLFXUeuE.js';
package/dist/cli.js CHANGED
@@ -11,7 +11,7 @@ import {
11
11
  resolveProjectContext,
12
12
  serializeToYaml,
13
13
  shouldRequireTrustedAccountGuard
14
- } from "./chunk-65ZA6VF2.js";
14
+ } from "./chunk-EKALVG2T.js";
15
15
  import "./chunk-IWKP55ZB.js";
16
16
  import "./chunk-BBKJZ23O.js";
17
17
  export {
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { U as UserTaskStatus, a as UserTaskAssigneeType, b as UserTaskAssigneeIdentity, c as UserTaskRecord, d as UserTaskActivityRecord, e as UserPlanStatus, f as UserPlanRecord, g as UserPlanVerificationStatus, h as UserPlanLearningType, i as UserPlanLearningTargetKind, j as UserPlanLearningStatus, k as UserPlanLearningLevel, l as UserPlanLearningRecord, m as UserPlanCriterionRecord, n as UserPlanVerificationRecord, o as UserPlanCreateInput, p as UserPlanUpdateInput, P as ProjectItemRecord, q as UserPlanLearningCreateTasksInput, r as UserPlanLearningCreateTasksResult, s as UserTaskReorderInput, W as WorkflowSummary, t as WorkflowCapability, u as WorkflowDetail, v as WorkflowInputStartParams, w as WorkflowInputSessionResult, x as WorkflowInputSessionDetail, y as WorkflowInputEvent, z as WorkflowGraph, A as WorkflowRunContentRetention, B as WorkflowRunDetail, C as WorkflowRunCancellationResult, D as WorkflowTemplateProjectionUpsertParams, E as WorkflowTemplateProjectionResult, F as PublicWorkflowTemplateProjection, G as WorkflowTemplateProjectionRevocationResult, H as WorkflowTemplateBindingCompletionParams, I as WorkflowTemplateBindingCompletionResult, J as WorkflowTemplateShortUrlParams, K as WorkflowTemplateShortUrlResult, S as ShortUrlRevokeResult, L as WorkflowTemplateImportPayload, M as ImportedWorkflowTemplate } from './cli-BMrmfKIF.js';
2
- export { N as AuthMethodsStatus, O as AuthoritativeChatReconciliation, Q as BackupCodesResult, R as BankTransferOrderDetails, T as BankTransferStatus, V as CachedChat, X as CachedNewChatSuggestion, Y as ChatListPage, Z as CliSignupResult, _ as DecryptedDraft, $ as DecryptedEmbed, a0 as DecryptedMemoryEntry, a1 as DecryptedMessage, a2 as DecryptedNewChatSuggestion, a3 as DocsFile, a4 as DocsFolder, a5 as DocsSearchResult, a6 as DocsTree, a7 as EncryptedDraft, a8 as GiftCardBankTransferStatus, a9 as INTEREST_TAG_IDS, aa as ImagesAiDetectionClassification, ab as ImagesAiDetectionSummary, ac as InterestTagId, ad as MATE_NAMES, ae as MEMORY_TYPE_REGISTRY, af as MemoryFieldDef, ag as MemoryTypeDef, ah as OpenMatesClient, ai as OpenMatesClientOptions, aj as OpenMatesSession, ak as SyncCache, al as TopicPreferencesPayload, am as TotpSetupStartResult, an as WorkflowEdge, ao as WorkflowNode, ap as WorkflowNodeRun, aq as WorkflowNodeType, ar as WorkflowRunContentStorage, as as buildImagesAiDetectionSummary, at as classifyImagesAiDetection, au as deriveAppUrl, av as formatImagesAiDetectionLabel, aw as getExtForLang, ax as normalizeInterestTagIds, ay as reconcileAuthoritativeChats, az as serializeToYaml } from './cli-BMrmfKIF.js';
1
+ import { U as UserTaskStatus, a as UserTaskAssigneeType, b as UserTaskAssigneeIdentity, c as UserTaskRecord, d as UserTaskActivityRecord, e as UserPlanStatus, f as UserPlanRecord, g as UserPlanVerificationStatus, h as UserPlanLearningType, i as UserPlanLearningTargetKind, j as UserPlanLearningStatus, k as UserPlanLearningLevel, l as UserPlanLearningRecord, m as UserPlanCriterionRecord, n as UserPlanVerificationRecord, o as UserPlanCreateInput, p as UserPlanUpdateInput, P as ProjectItemRecord, q as UserPlanLearningCreateTasksInput, r as UserPlanLearningCreateTasksResult, s as UserTaskReorderInput, W as WorkflowSummary, t as WorkflowCapability, u as WorkflowDetail, v as WorkflowInputStartParams, w as WorkflowInputSessionResult, x as WorkflowInputSessionDetail, y as WorkflowInputEvent, z as WorkflowGraph, A as WorkflowRunContentRetention, B as WorkflowRunDetail, C as WorkflowRunCancellationResult, D as WorkflowTemplateProjectionUpsertParams, E as WorkflowTemplateProjectionResult, F as PublicWorkflowTemplateProjection, G as WorkflowTemplateProjectionRevocationResult, H as WorkflowTemplateBindingCompletionParams, I as WorkflowTemplateBindingCompletionResult, J as WorkflowTemplateShortUrlParams, K as WorkflowTemplateShortUrlResult, S as ShortUrlRevokeResult, L as WorkflowTemplateImportPayload, M as ImportedWorkflowTemplate } from './cli-BLFXUeuE.js';
2
+ export { N as AuthMethodsStatus, O as AuthoritativeChatReconciliation, Q as BackupCodesResult, R as BankTransferOrderDetails, T as BankTransferStatus, V as CachedChat, X as CachedNewChatSuggestion, Y as ChatListPage, Z as CliSignupResult, _ as DecryptedDraft, $ as DecryptedEmbed, a0 as DecryptedMemoryEntry, a1 as DecryptedMessage, a2 as DecryptedNewChatSuggestion, a3 as DocsFile, a4 as DocsFolder, a5 as DocsSearchResult, a6 as DocsTree, a7 as EncryptedDraft, a8 as GiftCardBankTransferStatus, a9 as INTEREST_TAG_IDS, aa as ImagesAiDetectionClassification, ab as ImagesAiDetectionSummary, ac as InterestTagId, ad as MATE_NAMES, ae as MEMORY_TYPE_REGISTRY, af as MemoryFieldDef, ag as MemoryTypeDef, ah as OpenMatesClient, ai as OpenMatesClientOptions, aj as OpenMatesSession, ak as SyncCache, al as TopicPreferencesPayload, am as TotpSetupStartResult, an as WorkflowEdge, ao as WorkflowNode, ap as WorkflowNodeRun, aq as WorkflowNodeType, ar as WorkflowRunContentStorage, as as buildImagesAiDetectionSummary, at as classifyImagesAiDetection, au as deriveAppUrl, av as formatImagesAiDetectionLabel, aw as getExtForLang, ax as normalizeInterestTagIds, ay as reconcileAuthoritativeChats, az as serializeToYaml } from './cli-BLFXUeuE.js';
3
3
 
4
4
  interface ProjectedAssistantSpeechSegment {
5
5
  sequence: number;
package/dist/index.js CHANGED
@@ -42,7 +42,7 @@ import {
42
42
  selectAssistantMessagesForSpeech,
43
43
  serializeToYaml,
44
44
  summarizeAssistantSpeech
45
- } from "./chunk-65ZA6VF2.js";
45
+ } from "./chunk-EKALVG2T.js";
46
46
  import "./chunk-IWKP55ZB.js";
47
47
  import "./chunk-BBKJZ23O.js";
48
48
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openmates",
3
- "version": "0.18.0-alpha.3",
3
+ "version": "0.18.0-alpha.4",
4
4
  "description": "OpenMates CLI and SDK",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -73,6 +73,7 @@
73
73
  "@toon-format/toon": "2.3.1",
74
74
  "ahocorasick": "1.0.2",
75
75
  "jszip": "^3.10.1",
76
+ "proper-lockfile": "^4.1.2",
76
77
  "qrcode-terminal": "^0.12.0",
77
78
  "tweetnacl": "^1.0.3",
78
79
  "ws": "8.21.0",
@@ -81,6 +82,7 @@
81
82
  "devDependencies": {
82
83
  "@repo/eslint-config": "workspace:*",
83
84
  "@types/node": "^24.5.0",
85
+ "@types/proper-lockfile": "^4.1.4",
84
86
  "@types/qrcode-terminal": "^0.12.2",
85
87
  "@types/ws": "^8.18.1",
86
88
  "eslint": "^9.35.0",