openmates 0.27.0-alpha.53 → 0.27.0-alpha.54

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.
@@ -15988,6 +15988,18 @@ var OpenMatesClient = class _OpenMatesClient {
15988
15988
  remoteCommandReviewInteractive: Boolean(params.onRemoteCommandReview)
15989
15989
  });
15990
15990
  }
15991
+ const queuedAdmission = !params.incognito && shouldWaitForAi ? ws.waitForMessage("message_queued", (payload) => {
15992
+ const event = payload;
15993
+ return event.chat_id === chatId && event.user_message_id === messageId;
15994
+ }, params.responseTimeoutMs ?? 9e4) : null;
15995
+ if (queuedAdmission) void queuedAdmission.catch(() => {
15996
+ });
15997
+ const pausedHandoff = !params.incognito && shouldWaitForAi ? ws.waitForMessage("queued_handoff_paused", (payload) => {
15998
+ const event = payload;
15999
+ return event.chat_id === chatId && (event.message_id === messageId || event.message_id === void 0);
16000
+ }, params.responseTimeoutMs ?? 9e4) : null;
16001
+ if (pausedHandoff) void pausedHandoff.catch(() => {
16002
+ });
15991
16003
  const confirmed = ws.waitForMessage(
15992
16004
  "chat_message_confirmed",
15993
16005
  (payload) => {
@@ -16281,11 +16293,56 @@ var OpenMatesClient = class _OpenMatesClient {
16281
16293
  }
16282
16294
  await this.replayCurrentTurnRecoveryOutputPages(ws, ownerId2, pages, cache, teamId, chatId);
16283
16295
  };
16284
- const resp = await (precollectedResponse ?? ws.collectAiResponse(messageId, chatId, {
16296
+ const responsePromise = precollectedResponse ?? ws.collectAiResponse(messageId, chatId, {
16285
16297
  ...streamOpts,
16286
16298
  timeoutMs: params.responseTimeoutMs,
16287
16299
  recoveryTurnId: savedTurnId
16288
- }));
16300
+ });
16301
+ const outcome = await Promise.race([
16302
+ responsePromise.then((response) => ({ kind: "response", response })),
16303
+ ...queuedAdmission ? [queuedAdmission.then(
16304
+ (frame) => ({ kind: "queued", frame }),
16305
+ () => new Promise(() => {
16306
+ })
16307
+ )] : [],
16308
+ ...pausedHandoff ? [pausedHandoff.then(
16309
+ (frame) => ({ kind: "paused", frame }),
16310
+ () => new Promise(() => {
16311
+ })
16312
+ )] : []
16313
+ ]);
16314
+ if (outcome.kind === "paused") {
16315
+ void responsePromise.catch(() => {
16316
+ });
16317
+ throw new Error("Message saved, but AI handoff is paused. No assistant run started; check the chat before retrying.");
16318
+ }
16319
+ if (outcome.kind === "queued") {
16320
+ void responsePromise.catch(() => {
16321
+ });
16322
+ const frame = outcome.frame.payload;
16323
+ return {
16324
+ status: "queued",
16325
+ chatId,
16326
+ messageId: null,
16327
+ userMessageId: messageId,
16328
+ queueMode: frame.queue_mode === "steer" ? "steer" : "follow_up",
16329
+ queueRevision: typeof frame.queue_revision === "number" ? frame.queue_revision : 1,
16330
+ assistant: "",
16331
+ category: null,
16332
+ modelName: null,
16333
+ mateName: null,
16334
+ followUpSuggestions: [],
16335
+ taskProposals: [],
16336
+ taskUpdateProposals: [],
16337
+ taskEvents: [],
16338
+ pendingTaskUpdateJobs: [],
16339
+ subChatEvents: [],
16340
+ appSettingsMemoryRequests: [],
16341
+ tokenUsage: null,
16342
+ promptBudget: null
16343
+ };
16344
+ }
16345
+ const resp = outcome.response;
16289
16346
  assistantMessageId = resp.messageId;
16290
16347
  assistant = resp.content;
16291
16348
  category = resp.category;
@@ -65624,6 +65681,9 @@ Only output the final Markdown table. Do NOT include explanations, notes, or any
65624
65681
  generated_by: {
65625
65682
  text: "generated by {model}"
65626
65683
  },
65684
+ using_model: {
65685
+ text: "Using {model}"
65686
+ },
65627
65687
  assistant_speech: {
65628
65688
  confirmation: {
65629
65689
  text: "Confirmation"
@@ -65831,6 +65891,26 @@ Only output the final Markdown table. Do NOT include explanations, notes, or any
65831
65891
  text: "Stop queue"
65832
65892
  }
65833
65893
  },
65894
+ response_activity: {
65895
+ using: {
65896
+ text: "Using {apps}"
65897
+ },
65898
+ thinking_using: {
65899
+ text: "Thinking & using {apps}"
65900
+ },
65901
+ response_thinking: {
65902
+ text: "Thinking for this response"
65903
+ },
65904
+ researching: {
65905
+ text: "Researching\u2026"
65906
+ },
65907
+ working: {
65908
+ text: "Working\u2026"
65909
+ },
65910
+ writing: {
65911
+ text: "Writing\u2026"
65912
+ }
65913
+ },
65834
65914
  new_chat_suggestions: {
65835
65915
  quantum_computing: {
65836
65916
  text: "Teach me about quantum computing in simple terms"
@@ -66558,6 +66638,38 @@ Only output the final Markdown table. Do NOT include explanations, notes, or any
66558
66638
  text: "Could not start the explanation chat. Please try again."
66559
66639
  }
66560
66640
  },
66641
+ queued_followup: {
66642
+ queued: {
66643
+ text: "Queued"
66644
+ },
66645
+ steering: {
66646
+ text: "Steering current response"
66647
+ },
66648
+ updating: {
66649
+ text: "Updating\u2026"
66650
+ },
66651
+ steer_instead: {
66652
+ text: "Steer instead"
66653
+ },
66654
+ editing: {
66655
+ text: "Editing queued message"
66656
+ },
66657
+ cancel_edit: {
66658
+ text: "Cancel edit"
66659
+ },
66660
+ conflict: {
66661
+ text: "This queued message changed on another device. Reopen it to edit the latest version."
66662
+ },
66663
+ unavailable: {
66664
+ text: "Couldn\u2019t update the queued message. Try again."
66665
+ },
66666
+ steer_deferred: {
66667
+ text: "Couldn\u2019t steer this response. Your message remains queued."
66668
+ },
66669
+ paused: {
66670
+ text: "Saved, but the assistant could not continue with this message."
66671
+ }
66672
+ },
66561
66673
  hidden_chats: {
66562
66674
  unlock: {
66563
66675
  text: "Unlock hidden chats"
@@ -121448,6 +121560,10 @@ ${renderRemoteCommandReview(review)}
121448
121560
  const acceptedTaskProposals = params.acceptTaskProposals === true && result.status === "completed" ? await acceptChatTaskProposals(client2, result.chatId, result.taskProposals, `${finalMessage}
121449
121561
 
121450
121562
  ${result.assistant}`) : [];
121563
+ if (result.status === "queued") {
121564
+ if (!params.json) process.stderr.write("Message queued for this chat. It will run after the active response finishes.\n");
121565
+ return { ...result, acceptedTaskProposals: [] };
121566
+ }
121451
121567
  if (result.status === "waiting_for_user") {
121452
121568
  const question = parseInteractiveQuestionBlock(result.assistant);
121453
121569
  if (params.json && question) {
@@ -2989,11 +2989,13 @@ declare class OpenMatesClient {
2989
2989
  /** Override WebSocket turn waits for long-running sends and responses. */
2990
2990
  responseTimeoutMs?: number;
2991
2991
  }): Promise<{
2992
- status: "completed" | "waiting_for_user";
2992
+ status: "completed" | "waiting_for_user" | "queued";
2993
2993
  chatId: string;
2994
2994
  messageId: string | null;
2995
2995
  /** Canonical ID of the persisted human turn, including sends that skip AI. */
2996
2996
  userMessageId?: string;
2997
+ queueMode?: "follow_up" | "steer";
2998
+ queueRevision?: number;
2997
2999
  assistant: string;
2998
3000
  category: string | null;
2999
3001
  modelName: string | null;
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-Cn2HwS-2.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-jvpep36C.js';
package/dist/cli.js CHANGED
@@ -21,7 +21,7 @@ import {
21
21
  shouldRequireTrustedAccountGuard,
22
22
  waitForSafeE2ETotpWindow,
23
23
  waitForWorkflowRun
24
- } from "./chunk-PCH6QOC4.js";
24
+ } from "./chunk-W2VJSU3Q.js";
25
25
  import "./chunk-5HWC6OTW.js";
26
26
  import "./chunk-IWKP55ZB.js";
27
27
  import "./chunk-FC27KZIW.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-Cn2HwS-2.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-Cn2HwS-2.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-jvpep36C.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-jvpep36C.js';
3
3
 
4
4
  type ChatModelSelection = "auto" | (string & {});
5
5
  interface ChatModelCatalogEntry {
package/dist/index.js CHANGED
@@ -44,7 +44,7 @@ import {
44
44
  selectAssistantMessagesForSpeech,
45
45
  serializeToYaml,
46
46
  summarizeAssistantSpeech
47
- } from "./chunk-PCH6QOC4.js";
47
+ } from "./chunk-W2VJSU3Q.js";
48
48
  import "./chunk-5HWC6OTW.js";
49
49
  import "./chunk-IWKP55ZB.js";
50
50
  import "./chunk-FC27KZIW.js";
@@ -17,47 +17,47 @@
17
17
  {
18
18
  "name": "libggml-base.so",
19
19
  "bytes": 1110088,
20
- "sha256": "ab52a9264487708871053c7d2f452f54f132716892207ccaec997318b5e23b1a"
20
+ "sha256": "590ee4bb44ace87ddbb5035527df40338adf3323fd401ae78f4c1884a312fda8"
21
21
  },
22
22
  {
23
23
  "name": "libggml-base.so.0",
24
24
  "bytes": 1110088,
25
- "sha256": "ab52a9264487708871053c7d2f452f54f132716892207ccaec997318b5e23b1a"
25
+ "sha256": "590ee4bb44ace87ddbb5035527df40338adf3323fd401ae78f4c1884a312fda8"
26
26
  },
27
27
  {
28
28
  "name": "libggml-base.so.0.15.1",
29
29
  "bytes": 1110088,
30
- "sha256": "ab52a9264487708871053c7d2f452f54f132716892207ccaec997318b5e23b1a"
30
+ "sha256": "590ee4bb44ace87ddbb5035527df40338adf3323fd401ae78f4c1884a312fda8"
31
31
  },
32
32
  {
33
33
  "name": "libggml-cpu.so",
34
34
  "bytes": 869800,
35
- "sha256": "73bdccf793d2aa04e3fde27b0d46f90afa6f49a2a91ddd764ec9d7e422e95ec4"
35
+ "sha256": "91be2f663b8b9d494dd066dfb36ca728f8694520d47cdd95501d9b2a1637da16"
36
36
  },
37
37
  {
38
38
  "name": "libggml-cpu.so.0",
39
39
  "bytes": 869800,
40
- "sha256": "73bdccf793d2aa04e3fde27b0d46f90afa6f49a2a91ddd764ec9d7e422e95ec4"
40
+ "sha256": "91be2f663b8b9d494dd066dfb36ca728f8694520d47cdd95501d9b2a1637da16"
41
41
  },
42
42
  {
43
43
  "name": "libggml-cpu.so.0.15.1",
44
44
  "bytes": 869800,
45
- "sha256": "73bdccf793d2aa04e3fde27b0d46f90afa6f49a2a91ddd764ec9d7e422e95ec4"
45
+ "sha256": "91be2f663b8b9d494dd066dfb36ca728f8694520d47cdd95501d9b2a1637da16"
46
46
  },
47
47
  {
48
48
  "name": "libggml.so",
49
49
  "bytes": 1899104,
50
- "sha256": "f108928f8395e1ee4eb9d80e65076479dee1dbba5a6d20a196b062846647a905"
50
+ "sha256": "3e946f33296f102ecf524f7548d027864a19b34f0bb8888d7c5a3dd8e74baf1b"
51
51
  },
52
52
  {
53
53
  "name": "libggml.so.0",
54
54
  "bytes": 1899104,
55
- "sha256": "f108928f8395e1ee4eb9d80e65076479dee1dbba5a6d20a196b062846647a905"
55
+ "sha256": "3e946f33296f102ecf524f7548d027864a19b34f0bb8888d7c5a3dd8e74baf1b"
56
56
  },
57
57
  {
58
58
  "name": "libggml.so.0.15.1",
59
59
  "bytes": 1899104,
60
- "sha256": "f108928f8395e1ee4eb9d80e65076479dee1dbba5a6d20a196b062846647a905"
60
+ "sha256": "3e946f33296f102ecf524f7548d027864a19b34f0bb8888d7c5a3dd8e74baf1b"
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.53",
3
+ "version": "0.27.0-alpha.54",
4
4
  "description": "OpenMates CLI and SDK",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",