openmates 0.18.0-alpha.37 → 0.18.0-alpha.39

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.
@@ -8309,6 +8309,7 @@ function parseMailVersionContent(versionContent) {
8309
8309
  };
8310
8310
  }
8311
8311
  var OpenMatesClient = class _OpenMatesClient {
8312
+ workflowDeliveriesBySocket = /* @__PURE__ */ new WeakMap();
8312
8313
  apiUrl;
8313
8314
  session;
8314
8315
  http;
@@ -13034,11 +13035,30 @@ var OpenMatesClient = class _OpenMatesClient {
13034
13035
  }
13035
13036
  return response.data;
13036
13037
  }
13038
+ async deleteWorkflowRun(workflowId, runId) {
13039
+ this.requireSession();
13040
+ const response = await this.http.delete(
13041
+ `/v1/workflows/${encodeURIComponent(workflowId)}/runs/${encodeURIComponent(runId)}`,
13042
+ this.getCliRequestHeaders()
13043
+ );
13044
+ if (!response.ok || !["deleted", "deletion_pending"].includes(response.data.status)) throw new Error(`Workflow run deletion failed with HTTP ${response.status}`);
13045
+ return response.data;
13046
+ }
13047
+ async previewWorkflowStep(workflowId, stepId, params = {}) {
13048
+ this.requireSession();
13049
+ const response = await this.http.post(
13050
+ `/v1/workflows/${encodeURIComponent(workflowId)}/steps/${encodeURIComponent(stepId)}/preview`,
13051
+ { input: params.input ?? {}, ...params.node ? { node: params.node } : {}, upstream_outputs: params.upstreamOutputs ?? {} },
13052
+ this.getCliRequestHeaders()
13053
+ );
13054
+ if (!response.ok || !response.data.preview) throw new Error(`Workflow preview failed with HTTP ${response.status}`);
13055
+ return response.data.preview;
13056
+ }
13037
13057
  async testWorkflowStep(workflowId, stepId, params = {}) {
13038
13058
  this.requireSession();
13039
13059
  const response = await this.http.post(
13040
13060
  `/v1/workflows/${encodeURIComponent(workflowId)}/steps/${encodeURIComponent(stepId)}/test`,
13041
- { input: params.input ?? {}, confirmed: params.confirmed === true },
13061
+ { input: params.input ?? {}, confirmed: params.confirmed === true, ...params.node ? { node: params.node } : {}, ...params.upstreamOutputs ? { upstream_outputs: params.upstreamOutputs } : {} },
13042
13062
  this.getCliRequestHeaders()
13043
13063
  );
13044
13064
  if (!response.ok || !response.data.run) {
@@ -15474,7 +15494,7 @@ Required: ${schema.required.join(", ")}`
15474
15494
  return session;
15475
15495
  }
15476
15496
  makeWsClient(session, options = {}) {
15477
- return new OpenMatesWsClient({
15497
+ const ws = new OpenMatesWsClient({
15478
15498
  apiUrl: session.apiUrl,
15479
15499
  sessionId: randomUUID8(),
15480
15500
  wsToken: session.wsToken,
@@ -15489,6 +15509,14 @@ Required: ${schema.required.join(", ")}`
15489
15509
  this.session = null;
15490
15510
  }
15491
15511
  });
15512
+ const deliveries = /* @__PURE__ */ new Map();
15513
+ this.workflowDeliveriesBySocket.set(ws, deliveries);
15514
+ ws.onMessageType("workflow_chat_deliveries_available", (payload) => {
15515
+ for (const delivery of payload.deliveries ?? []) {
15516
+ if (delivery.delivery_id) deliveries.set(delivery.delivery_id, delivery);
15517
+ }
15518
+ });
15519
+ return ws;
15492
15520
  }
15493
15521
  /**
15494
15522
  * Refresh ws_token, then create and open a WebSocket client.
@@ -15571,7 +15599,7 @@ Required: ${schema.required.join(", ")}`
15571
15599
  if (embedId) clientEmbedIds.push(embedId);
15572
15600
  }
15573
15601
  }
15574
- const { ws } = await this.openWsClient();
15602
+ const { ws, ownerId } = await this.openWsClient();
15575
15603
  const chats = [];
15576
15604
  const embeds = [];
15577
15605
  const embedKeys = [];
@@ -15747,8 +15775,12 @@ Required: ${schema.required.join(", ")}`
15747
15775
  (a, b) => (typeof b.details.last_edited_overall_timestamp === "number" ? b.details.last_edited_overall_timestamp : 0) - (typeof a.details.last_edited_overall_timestamp === "number" ? a.details.last_edited_overall_timestamp : 0)
15748
15776
  );
15749
15777
  let persistedTaskJobIds = /* @__PURE__ */ new Set();
15778
+ let persistedWorkflowDeliveryCount = 0;
15750
15779
  try {
15751
15780
  await this.persistPendingAIResponsesFromSync(ws, chats, pendingAIResponses, teamId);
15781
+ if (!teamId && ownerId) {
15782
+ persistedWorkflowDeliveryCount = await this.persistPendingWorkflowChatDeliveries({ ws, ownerId, chats });
15783
+ }
15752
15784
  persistedTaskJobIds = await this.persistPendingTaskUpdateJobs({
15753
15785
  ws,
15754
15786
  jobs: pendingTaskUpdateJobs,
@@ -15763,7 +15795,7 @@ Required: ${schema.required.join(", ")}`
15763
15795
  } finally {
15764
15796
  ws.close();
15765
15797
  }
15766
- if (persistedTaskJobIds.size > 0) {
15798
+ if (persistedTaskJobIds.size > 0 || persistedWorkflowDeliveryCount > 0) {
15767
15799
  clearSyncCache(teamId);
15768
15800
  return this.ensureSynced(true, refreshChatIds, { teamId });
15769
15801
  }
@@ -15780,6 +15812,121 @@ Required: ${schema.required.join(", ")}`
15780
15812
  saveSyncCache(cache, teamId);
15781
15813
  return cache;
15782
15814
  }
15815
+ /**
15816
+ * Claim and finish reconnect workflow deliveries using only normal client
15817
+ * ciphertext. A fenced server transaction persists chat/message/selected
15818
+ * embeds before acknowledgement commits their cross-run delivery history.
15819
+ */
15820
+ async persistPendingWorkflowChatDeliveries(params) {
15821
+ const { ws, ownerId, chats } = params;
15822
+ const discoveries = this.workflowDeliveriesBySocket.get(ws);
15823
+ if (!discoveries?.size) return 0;
15824
+ let acknowledged = 0;
15825
+ for (const discovery of discoveries.values()) {
15826
+ if (!["delivery_pending", "claimed"].includes(discovery.status)) continue;
15827
+ if (discovery.status === "claimed" && Number(discovery.claim_expires_at ?? 0) * 1e3 > Date.now()) continue;
15828
+ const claimRequestId = `workflow-claim-${randomUUID8()}`;
15829
+ const claimed = ws.waitForMessage("workflow_chat_delivery_claimed", (value) => {
15830
+ const payload = value;
15831
+ return payload.delivery_id === discovery.delivery_id && payload.request_id === claimRequestId;
15832
+ }, 2e4);
15833
+ void claimed.catch(() => {
15834
+ });
15835
+ await ws.sendAsync("workflow_chat_delivery_claim", { delivery_id: discovery.delivery_id, request_id: claimRequestId });
15836
+ let claim;
15837
+ try {
15838
+ claim = (await claimed).payload;
15839
+ } catch (error) {
15840
+ if (error instanceof Error && /already.*claim|claim.*another|not claimable|no longer pending/i.test(error.message)) continue;
15841
+ throw error;
15842
+ }
15843
+ if (!claim.claim_token || !claim.chat_id || !claim.message_id || claim.claim_generation < 1 || claim.claim_expires_at * 1e3 <= Date.now()) {
15844
+ throw new Error("Workflow delivery returned an invalid or expired claim.");
15845
+ }
15846
+ const fence = {
15847
+ delivery_id: claim.delivery_id,
15848
+ claim_token: claim.claim_token,
15849
+ claim_generation: claim.claim_generation,
15850
+ claim_issued_at: claim.claim_issued_at,
15851
+ claim_expires_at: claim.claim_expires_at
15852
+ };
15853
+ if (!claim.client_persisted) {
15854
+ if (!("existing_chat" in claim)) throw new Error("Workflow delivery needs authoritative destination key metadata; update the dev server.");
15855
+ const existing = claim.existing_chat;
15856
+ const masterKey = this.getMasterKeyBytes();
15857
+ let chatKey;
15858
+ let encryptedChatKey;
15859
+ if (existing) {
15860
+ if (typeof existing.encrypted_chat_key !== "string" || !existing.encrypted_chat_key) throw new Error("Workflow destination chat key is unavailable.");
15861
+ encryptedChatKey = existing.encrypted_chat_key;
15862
+ const decryptedKey = await decryptBytesWithAesGcm(encryptedChatKey, masterKey);
15863
+ if (!decryptedKey) throw new Error("Workflow destination chat key could not be decrypted.");
15864
+ chatKey = decryptedKey;
15865
+ } else {
15866
+ chatKey = new Uint8Array(randomBytes4(32));
15867
+ encryptedChatKey = await encryptBytesWithAesGcm(chatKey, masterKey);
15868
+ }
15869
+ const encryptedTitle = typeof existing?.encrypted_title === "string" && existing.encrypted_title ? existing.encrypted_title : await encryptWithAesGcmCombined(claim.title, chatKey);
15870
+ const encryptedCategory = typeof existing?.encrypted_category === "string" && existing.encrypted_category ? existing.encrypted_category : await encryptWithAesGcmCombined("openmates_official", chatKey);
15871
+ const encryptedContent = await encryptWithAesGcmCombined(claim.message, chatKey);
15872
+ const createdAt = normalizeUnixSeconds(claim.created_at, Math.floor(Date.now() / 1e3));
15873
+ const encryptedEmbeds = [];
15874
+ for (const item of claim.embeds ?? []) {
15875
+ const encrypted = await encryptEmbed({
15876
+ embedId: item.embed_id,
15877
+ type: item.content_type,
15878
+ content: toonEncodeContent({ ...item.content, type: item.content_type }),
15879
+ textPreview: String(item.content.title ?? item.content.name ?? "Workflow result"),
15880
+ status: "finished"
15881
+ }, masterKey, chatKey, claim.chat_id, claim.message_id, ownerId);
15882
+ if (!encrypted) throw new Error("Workflow result could not be encrypted.");
15883
+ encryptedEmbeds.push({
15884
+ embed_id: encrypted.embed_id,
15885
+ encrypted_content: encrypted.encrypted_content,
15886
+ encrypted_type: encrypted.encrypted_type,
15887
+ encrypted_text_preview: encrypted.encrypted_text_preview,
15888
+ embed_keys: encrypted.embed_keys.map((key) => ({ key_type: key.key_type, encrypted_embed_key: key.encrypted_embed_key }))
15889
+ });
15890
+ }
15891
+ const metadata = {
15892
+ encrypted_title: encryptedTitle,
15893
+ encrypted_category: encryptedCategory,
15894
+ encrypted_chat_key: encryptedChatKey,
15895
+ created_at: existing?.created_at ?? createdAt,
15896
+ messages_v: Number(existing?.messages_v ?? 0) + 1,
15897
+ title_v: Number(existing?.title_v ?? 1)
15898
+ };
15899
+ const encryptedMessage = { role: "assistant", encrypted_content: encryptedContent, created_at: createdAt, embeds: encryptedEmbeds };
15900
+ const persistRequestId = `workflow-persist-${randomUUID8()}`;
15901
+ const persisted = ws.waitForMessage("workflow_chat_delivery_persisted", (value) => {
15902
+ const payload = value;
15903
+ return payload.delivery_id === claim.delivery_id && payload.request_id === persistRequestId;
15904
+ }, 2e4);
15905
+ void persisted.catch(() => {
15906
+ });
15907
+ await ws.sendAsync("workflow_chat_delivery_persist", { ...fence, encrypted_chat_metadata: JSON.stringify(metadata), encrypted_message: JSON.stringify(encryptedMessage), request_id: persistRequestId });
15908
+ await persisted;
15909
+ const cached = chats.find((chat) => chat.details.id === claim.chat_id);
15910
+ const message = JSON.stringify({ ...encryptedMessage, message_id: claim.message_id, chat_id: claim.chat_id, status: "synced" });
15911
+ if (cached) {
15912
+ cached.details = { ...cached.details, ...metadata };
15913
+ cached.messages.push(message);
15914
+ } else chats.push({ details: { id: claim.chat_id, ...metadata, last_edited_overall_timestamp: createdAt }, messages: [message] });
15915
+ if (process.env.OPENMATES_DEBUG === "1") console.error(`[workflow delivery] CLI persisted ${claim.delivery_id}`);
15916
+ }
15917
+ const ackRequestId = `workflow-ack-${randomUUID8()}`;
15918
+ const ack = ws.waitForMessage("workflow_chat_delivery_acknowledged", (value) => {
15919
+ const payload = value;
15920
+ return payload.delivery_id === claim.delivery_id && payload.request_id === ackRequestId;
15921
+ }, 2e4);
15922
+ void ack.catch(() => {
15923
+ });
15924
+ await ws.sendAsync("workflow_chat_delivery_ack", { ...fence, request_id: ackRequestId });
15925
+ await ack;
15926
+ acknowledged += 1;
15927
+ }
15928
+ return acknowledged;
15929
+ }
15783
15930
  async persistPendingAIResponsesFromSync(ws, chats, pendingResponses, teamId) {
15784
15931
  if (pendingResponses.length === 0) return;
15785
15932
  const masterKey = this.getMasterKeyBytes();
@@ -24894,11 +25041,26 @@ var OpenMatesWorkflows = class {
24894
25041
  if (!response.run) throw new OpenMatesApiError(500, { detail: "Workflow response missing run" });
24895
25042
  return response.run;
24896
25043
  }
25044
+ async deleteRun(workflowId, runId) {
25045
+ const resolvedWorkflowId = await this.resolveId(workflowId);
25046
+ const result = await this.client.delete(`/v1/workflows/${encodeURIComponent(resolvedWorkflowId)}/runs/${encodeURIComponent(runId)}`);
25047
+ if (!["deleted", "deletion_pending"].includes(result.status)) throw new OpenMatesApiError(500, { detail: "Invalid run deletion response" });
25048
+ return result;
25049
+ }
25050
+ async previewStep(workflowId, stepId, params = {}) {
25051
+ const resolvedWorkflowId = await this.resolveId(workflowId);
25052
+ const response = await this.client.request(
25053
+ `/v1/workflows/${encodeURIComponent(resolvedWorkflowId)}/steps/${encodeURIComponent(stepId)}/preview`,
25054
+ { input: params.input ?? {}, ...params.node ? { node: params.node } : {}, upstream_outputs: params.upstreamOutputs ?? {} }
25055
+ );
25056
+ if (!response.preview) throw new OpenMatesApiError(500, { detail: "Workflow response missing preview" });
25057
+ return response.preview;
25058
+ }
24897
25059
  async stepTest(workflowId, stepId, params = {}) {
24898
25060
  const resolvedWorkflowId = await this.resolveId(workflowId);
24899
25061
  const response = await this.client.request(
24900
25062
  `/v1/workflows/${encodeURIComponent(resolvedWorkflowId)}/steps/${encodeURIComponent(stepId)}/test`,
24901
- { input: params.input ?? {}, confirmed: params.confirmed === true }
25063
+ { input: params.input ?? {}, confirmed: params.confirmed === true, ...params.node ? { node: params.node } : {}, ...params.upstreamOutputs ? { upstream_outputs: params.upstreamOutputs } : {} }
24902
25064
  );
24903
25065
  if (!response.run) throw new OpenMatesApiError(500, { detail: "Workflow response missing run" });
24904
25066
  return response.run;
@@ -48931,6 +49093,91 @@ var plumberMessageEmailPhonePrivacyChat = {
48931
49093
  }
48932
49094
  };
48933
49095
 
49096
+ // ../ui/src/demo_chats/data/example_chats/private-plumber-email.ts
49097
+ var privatePlumberEmailChat = {
49098
+ chat_id: "example-private-plumber-email",
49099
+ slug: "private-plumber-email",
49100
+ title: "example_chats.private_plumber_email.title",
49101
+ summary: "example_chats.private_plumber_email.summary",
49102
+ icon: "wrench",
49103
+ category: "maker_prototyping",
49104
+ keywords: ["privacy", "email", "plumber", "sensitive data"],
49105
+ follow_up_suggestions: ["example_chats.private_plumber_email.follow_up_1", "example_chats.private_plumber_email.follow_up_2", "example_chats.private_plumber_email.follow_up_3", "example_chats.private_plumber_email.follow_up_4", "example_chats.private_plumber_email.follow_up_5", "example_chats.private_plumber_email.follow_up_6"],
49106
+ messages: [
49107
+ {
49108
+ "id": "89ec72fe-10b2-4cb7-851d-cca49b67217b",
49109
+ "role": "user",
49110
+ "content": "example_chats.private_plumber_email.message_1",
49111
+ "created_at": 1789056323,
49112
+ "pii_mappings": [
49113
+ {
49114
+ "placeholder": "[EMAIL_1_com]",
49115
+ "original": "hello@example.com",
49116
+ "type": "EMAIL"
49117
+ },
49118
+ {
49119
+ "placeholder": "[PHONE_1_123]",
49120
+ "original": "+44 7700 900123",
49121
+ "type": "PHONE"
49122
+ }
49123
+ ]
49124
+ },
49125
+ {
49126
+ "id": "e741aad1-017b-5fbd-a6a9-a82a6c9cb027",
49127
+ "role": "assistant",
49128
+ "content": "example_chats.private_plumber_email.message_2",
49129
+ "created_at": 1789056336,
49130
+ "user_message_id": "89ec72fe-10b2-4cb7-851d-cca49b67217b",
49131
+ "response_credits": 14,
49132
+ "category": "maker_prototyping",
49133
+ "model_name": "Gemini 3.5 Flash-Lite"
49134
+ }
49135
+ ],
49136
+ embeds: [
49137
+ {
49138
+ "embed_id": "f5b9420e-f3cb-4457-9385-27edeacc96fb",
49139
+ "type": "mail",
49140
+ "content": `type: mail
49141
+ app_id: mail
49142
+ skill_id: email
49143
+ receiver: plumber@example.com
49144
+ subject: Inquiry regarding kitchen tap repair / availability
49145
+ content: "Hi there,\\n\\nI hope you're having a good week. \\n\\nMy kitchen tap has been dripping for the past three days, and I'd love to get it looked at before it wastes too much water. Could you let me know what your availability looks like over the next few days, and if you might be able to provide an estimated cost for a repair or replacement?\\n\\nYou can reach me by email at [EMAIL_1_com] or by phone at [PHONE_1_123]. \\n\\nThanks so much for your time and help!\\n\\nBest regards,"
49146
+ footer: ""
49147
+ embed_ref: inquiry-regarding-kitchen-tap-repair-availabilit-f5b942
49148
+ status: finished`,
49149
+ "parent_embed_id": null,
49150
+ "embed_ids": null
49151
+ }
49152
+ ],
49153
+ usage_entries: [
49154
+ {
49155
+ "id": "example-private-plumber-email-usage-1",
49156
+ "type": "skill_execution",
49157
+ "source": "chat",
49158
+ "app_id": "ai",
49159
+ "skill_id": "ask",
49160
+ "model_used": "google/gemini-3.5-flash-lite",
49161
+ "credits": 14,
49162
+ "input_tokens": 14348,
49163
+ "output_tokens": 217,
49164
+ "user_input_tokens": 57,
49165
+ "system_prompt_tokens": 13389,
49166
+ "server_provider": "Google AI Studio",
49167
+ "server_region": "US",
49168
+ "chat_id": "example-private-plumber-email",
49169
+ "message_id": "89ec72fe-10b2-4cb7-851d-cca49b67217b",
49170
+ "created_at": 1789056329,
49171
+ "updated_at": 1789056329,
49172
+ "tool_inference_iterations": 0
49173
+ }
49174
+ ],
49175
+ metadata: {
49176
+ featured: true,
49177
+ order: 126
49178
+ }
49179
+ };
49180
+
48934
49181
  // ../ui/src/demo_chats/exampleChatData.ts
48935
49182
  var ALL_EXAMPLE_CHATS = [
48936
49183
  giganticAirplanesChat,
@@ -49027,7 +49274,8 @@ var ALL_EXAMPLE_CHATS = [
49027
49274
  openMeteoWeatherNotebookChat,
49028
49275
  audioGenerateOpenmatesSuccessChimeChat,
49029
49276
  audioSpeakOpenmatesWelcomeMessageChat,
49030
- plumberMessageEmailPhonePrivacyChat
49277
+ plumberMessageEmailPhonePrivacyChat,
49278
+ privatePlumberEmailChat
49031
49279
  ].sort((a, b) => a.metadata.order - b.metadata.order);
49032
49280
 
49033
49281
  // ../ui/src/demo_chats/exampleChatFiles.ts
@@ -59015,6 +59263,38 @@ Would you like to start executing on any specific pillar of this plan\u2014such
59015
59263
  text: '```json\n{"type": "app_skill_use", "embed_id": "15932e27-c3b3-4649-b611-dcce16c64941", "app_id": "images", "skill_id": "generate"}\n```\n\nI\'m generating that abstract hero background for you now. It will feature those soft blue and mint gradients with subtle grid lines to give it that clean, privacy-focused productivity feel.\n\nWhile we wait, here\'s a design tip for landing pages: since this background has a lot of whitespace, it\'s perfect for a **high-contrast headline** (like dark navy or charcoal) to ensure [accessibility](wiki:Web_accessibility) and readability.\n\nI\'ll let you know as soon as it\'s ready! \n\nIn the meantime, would you like to explore some [minimalist typography](wiki:Typography) styles that would pair well with this aesthetic?'
59016
59264
  }
59017
59265
  },
59266
+ private_plumber_email: {
59267
+ title: {
59268
+ text: "Draft a plumber email privately"
59269
+ },
59270
+ summary: {
59271
+ text: "Draft a friendly repair enquiry while keeping your email address and phone number hidden from the AI."
59272
+ },
59273
+ message_1: {
59274
+ text: "My kitchen tap has been dripping for three days. Could you draft a friendly email to a plumber asking about availability and an estimated repair cost? Include my email, [EMAIL_1_com], and phone number, [PHONE_1_123], so they can contact me."
59275
+ },
59276
+ message_2: {
59277
+ text: '```json\n{"type": "mail", "embed_id": "f5b9420e-f3cb-4457-9385-27edeacc96fb"}\n```\n\n***\n\n**Anticipate Next Steps:**\n1. Would you like to create a [reminder](/#settings/apps/reminder) to check for their reply or turn off your water main temporarily if the drip worsens?\n2. If you\'re planning to look at it yourself while waiting, I can guide you through inspecting the cartridge or washer.'
59278
+ },
59279
+ follow_up_1: {
59280
+ text: "Set a reminder to follow up with the plumber if I don\u2019t hear back in two days"
59281
+ },
59282
+ follow_up_2: {
59283
+ text: "Ask the plumber for a rough time estimate for the repair"
59284
+ },
59285
+ follow_up_3: {
59286
+ text: "Check local plumber reviews before choosing one to call"
59287
+ },
59288
+ follow_up_4: {
59289
+ text: "Confirm if the dripping could cause water damage if ignored"
59290
+ },
59291
+ follow_up_5: {
59292
+ text: "Compare emergency plumbing service rates in my area"
59293
+ },
59294
+ follow_up_6: {
59295
+ text: "Write down the plumber\u2019s response for future reference"
59296
+ }
59297
+ },
59018
59298
  product_launch_synth_loop: {
59019
59299
  title: {
59020
59300
  text: "Product Launch Synth Loop"
@@ -70063,6 +70343,39 @@ As of mid-2026, the severe supply shocks from the 2024\u20132025 avian flu have
70063
70343
  },
70064
70344
  free_testing_credits_received: {
70065
70345
  text: "You received {credits} free credits for testing."
70346
+ },
70347
+ native_setup_unavailable: {
70348
+ text: "Account creation in the Apple app is not available yet. Please sign up in the web app."
70349
+ },
70350
+ native_request_failed: {
70351
+ text: "The request could not be completed. Please try again."
70352
+ },
70353
+ native_passkey_registration_pending: {
70354
+ text: "Passkey account creation is not available in this Apple build yet. You can create this account with a password."
70355
+ },
70356
+ native_account_ready: {
70357
+ text: "Your account is ready."
70358
+ },
70359
+ native_retry_login: {
70360
+ text: "Retry signing in"
70361
+ },
70362
+ native_invalid_invite: {
70363
+ text: "Enter a valid personal invite code to continue."
70364
+ },
70365
+ native_username_unavailable: {
70366
+ text: "This username is unavailable. Choose another one."
70367
+ },
70368
+ native_invalid_email_code: {
70369
+ text: "This email code is invalid or expired. Try again or request a new code."
70370
+ },
70371
+ native_verification_required: {
70372
+ text: "Please confirm your email before creating the account."
70373
+ },
70374
+ native_creation_unconfirmed: {
70375
+ text: "Account creation could not be confirmed. Retry signing in with the same credentials. If this continues, return to login or contact support."
70376
+ },
70377
+ native_context_changed: {
70378
+ text: "The login session changed. Return to login and start again."
70066
70379
  }
70067
70380
  },
70068
70381
  sketchview: {
@@ -70299,6 +70612,359 @@ As of mid-2026, the severe supply shocks from the 2024\u20132025 avian flu have
70299
70612
  restore_failed: {
70300
70613
  text: "Failed to restore the selected definition."
70301
70614
  }
70615
+ },
70616
+ builder: {
70617
+ new_workflow_placeholder: {
70618
+ text: "Enter a name for a new workflow"
70619
+ },
70620
+ list: {
70621
+ text: "list"
70622
+ },
70623
+ remove: {
70624
+ text: "Remove"
70625
+ },
70626
+ add_item: {
70627
+ text: "Add item"
70628
+ },
70629
+ choose: {
70630
+ text: "Choose"
70631
+ },
70632
+ true: {
70633
+ text: "true"
70634
+ },
70635
+ false: {
70636
+ text: "false"
70637
+ },
70638
+ today: {
70639
+ text: "Today"
70640
+ },
70641
+ next_week_start: {
70642
+ text: "Start of upcoming week"
70643
+ },
70644
+ next_week_end: {
70645
+ text: "End of upcoming week"
70646
+ },
70647
+ custom_date: {
70648
+ text: "Custom date"
70649
+ },
70650
+ dynamic_date: {
70651
+ text: "Use a date relative to each run"
70652
+ },
70653
+ use_output: {
70654
+ text: "Use previous output"
70655
+ },
70656
+ details: {
70657
+ text: "Details"
70658
+ },
70659
+ time_trigger: {
70660
+ text: "Time trigger"
70661
+ },
70662
+ check: {
70663
+ text: "Check"
70664
+ },
70665
+ send_message: {
70666
+ text: "Send message"
70667
+ },
70668
+ use_app_skill: {
70669
+ text: "Use App skill"
70670
+ },
70671
+ action: {
70672
+ text: "Action"
70673
+ },
70674
+ hourly: {
70675
+ text: "Every hour"
70676
+ },
70677
+ daily: {
70678
+ text: "Every day"
70679
+ },
70680
+ weekly: {
70681
+ text: "Every week"
70682
+ },
70683
+ once: {
70684
+ text: "Once"
70685
+ },
70686
+ to: {
70687
+ text: "To"
70688
+ },
70689
+ existing_chat: {
70690
+ text: "Existing chat"
70691
+ },
70692
+ new_chat_each_run: {
70693
+ text: "New chat for each run"
70694
+ },
70695
+ unavailable: {
70696
+ text: "Not available"
70697
+ },
70698
+ title_required: {
70699
+ text: "Enter a title for the chat."
70700
+ },
70701
+ check_required: {
70702
+ text: "Choose an output and comparison first."
70703
+ },
70704
+ save_failed: {
70705
+ text: "Could not save this node."
70706
+ },
70707
+ test_pending: {
70708
+ text: "The test is still running. Its progress is available in run history."
70709
+ },
70710
+ chats_unavailable: {
70711
+ text: "Recent chats could not be loaded."
70712
+ },
70713
+ empty_preview: {
70714
+ text: "This message currently has no content."
70715
+ },
70716
+ add_trigger: {
70717
+ text: "Add trigger"
70718
+ },
70719
+ add_action: {
70720
+ text: "Add action"
70721
+ },
70722
+ add_check: {
70723
+ text: "Add check"
70724
+ },
70725
+ back: {
70726
+ text: "Back"
70727
+ },
70728
+ use_app: {
70729
+ text: "Use App"
70730
+ },
70731
+ choose_skill: {
70732
+ text: "Choose skill"
70733
+ },
70734
+ close: {
70735
+ text: "Close"
70736
+ },
70737
+ trigger_question: {
70738
+ text: "What trigger should run your workflow?"
70739
+ },
70740
+ app_question: {
70741
+ text: "Which App?"
70742
+ },
70743
+ skill_question: {
70744
+ text: "Which skill?"
70745
+ },
70746
+ action_question: {
70747
+ text: "What should happen next?"
70748
+ },
70749
+ date_time: {
70750
+ text: "Date & Time"
70751
+ },
70752
+ loading_apps: {
70753
+ text: "Loading available apps\u2026"
70754
+ },
70755
+ repeat: {
70756
+ text: "Repeat"
70757
+ },
70758
+ minute: {
70759
+ text: "Minute of each hour"
70760
+ },
70761
+ time: {
70762
+ text: "Time"
70763
+ },
70764
+ timezone: {
70765
+ text: "Timezone"
70766
+ },
70767
+ input: {
70768
+ text: "Input"
70769
+ },
70770
+ schema_unavailable: {
70771
+ text: "The input schema is not available for this skill."
70772
+ },
70773
+ processing: {
70774
+ text: "Processing\u2026"
70775
+ },
70776
+ stop: {
70777
+ text: "Stop"
70778
+ },
70779
+ test_again: {
70780
+ text: "Test again"
70781
+ },
70782
+ test_action: {
70783
+ text: "Test action"
70784
+ },
70785
+ variable_cost: {
70786
+ text: "Variable cost"
70787
+ },
70788
+ output: {
70789
+ text: "Output"
70790
+ },
70791
+ test_output: {
70792
+ text: "Test output"
70793
+ },
70794
+ example: {
70795
+ text: "Example"
70796
+ },
70797
+ check_question: {
70798
+ text: "What should we check?"
70799
+ },
70800
+ if: {
70801
+ text: "If"
70802
+ },
70803
+ select_output: {
70804
+ text: "Select action output"
70805
+ },
70806
+ compare_type: {
70807
+ text: "Select comparison"
70808
+ },
70809
+ compare_value: {
70810
+ text: "Compare to"
70811
+ },
70812
+ chat_question: {
70813
+ text: "To which chat?"
70814
+ },
70815
+ search_chats: {
70816
+ text: "Search recent chats"
70817
+ },
70818
+ new_chat: {
70819
+ text: "New chat"
70820
+ },
70821
+ message_question: {
70822
+ text: "What should the message be?"
70823
+ },
70824
+ chat_title: {
70825
+ text: "Chat title"
70826
+ },
70827
+ message_placeholder: {
70828
+ text: "Enter the message template here. Type @ or select an output above to include results from previous actions."
70829
+ },
70830
+ only_new_results: {
70831
+ text: "Only results not previously sent"
70832
+ },
70833
+ include_when: {
70834
+ text: "Include this section when"
70835
+ },
70836
+ always: {
70837
+ text: "Always"
70838
+ },
70839
+ preview_message: {
70840
+ text: "Preview message without sending"
70841
+ },
70842
+ saving: {
70843
+ text: "Saving\u2026"
70844
+ },
70845
+ save: {
70846
+ text: "Save"
70847
+ },
70848
+ if_true: {
70849
+ text: "If true"
70850
+ },
70851
+ else: {
70852
+ text: "Else"
70853
+ },
70854
+ do_nothing: {
70855
+ text: "Do nothing. Add a step below."
70856
+ },
70857
+ then: {
70858
+ text: "then"
70859
+ },
70860
+ contains: {
70861
+ text: "contains"
70862
+ },
70863
+ operator_gt: {
70864
+ text: "is more than"
70865
+ },
70866
+ operator_gte: {
70867
+ text: "is at least"
70868
+ },
70869
+ operator_lt: {
70870
+ text: "is less than"
70871
+ },
70872
+ operator_lte: {
70873
+ text: "is at most"
70874
+ },
70875
+ operator_eq: {
70876
+ text: "is equal to"
70877
+ },
70878
+ operator_ne: {
70879
+ text: "is not equal to"
70880
+ },
70881
+ operator_contains: {
70882
+ text: "contains"
70883
+ },
70884
+ next_run: {
70885
+ text: "Next run"
70886
+ },
70887
+ created: {
70888
+ text: "Created"
70889
+ },
70890
+ share: {
70891
+ text: "Share workflow"
70892
+ },
70893
+ workflow: {
70894
+ text: "Workflow"
70895
+ },
70896
+ run_history: {
70897
+ text: "Run history"
70898
+ },
70899
+ run_now: {
70900
+ text: "Run workflow now"
70901
+ },
70902
+ delete_workflow: {
70903
+ text: "Delete workflow"
70904
+ },
70905
+ workflow_name: {
70906
+ text: "Workflow name"
70907
+ },
70908
+ description: {
70909
+ text: "Description"
70910
+ },
70911
+ add_description: {
70912
+ text: "Click to add description"
70913
+ },
70914
+ workflow_on: {
70915
+ text: "Workflow enabled"
70916
+ },
70917
+ enabled: {
70918
+ text: "Enabled"
70919
+ },
70920
+ ready: {
70921
+ text: "Ready"
70922
+ },
70923
+ draft: {
70924
+ text: "Draft"
70925
+ },
70926
+ run_started: {
70927
+ text: "Run started"
70928
+ },
70929
+ ready_to_use: {
70930
+ text: "Your workflow can be used now."
70931
+ },
70932
+ activate: {
70933
+ text: "Activate"
70934
+ },
70935
+ history_and_sharing: {
70936
+ text: "Version history and sharing"
70937
+ },
70938
+ delete_run: {
70939
+ text: "Delete run and forget its deliveries"
70940
+ },
70941
+ delete_run_confirm: {
70942
+ text: "Delete this run and forget the results it delivered? Existing chat messages will remain."
70943
+ },
70944
+ deletion_pending: {
70945
+ text: "Deleting after pending deliveries finish\u2026"
70946
+ },
70947
+ monday: {
70948
+ text: "Monday"
70949
+ },
70950
+ tuesday: {
70951
+ text: "Tuesday"
70952
+ },
70953
+ wednesday: {
70954
+ text: "Wednesday"
70955
+ },
70956
+ thursday: {
70957
+ text: "Thursday"
70958
+ },
70959
+ friday: {
70960
+ text: "Friday"
70961
+ },
70962
+ saturday: {
70963
+ text: "Saturday"
70964
+ },
70965
+ sunday: {
70966
+ text: "Sunday"
70967
+ }
70302
70968
  }
70303
70969
  }
70304
70970
  };
@@ -80615,7 +81281,18 @@ async function handleWorkflows(client, subcommand, rest, flags, redactor) {
80615
81281
  if (!idempotencyKey) throw new Error("Missing --idempotency-key. Reuse this stable key when retrying the same workflow run.");
80616
81282
  const mode = flags.mode === "test" ? "test" : "manual";
80617
81283
  const input = typeof flags.input === "string" ? parseJsonFlag(flags.input, "--input") : {};
80618
- const run = await client.runWorkflow(workflowId, { idempotencyKey, mode, input });
81284
+ let run = await client.runWorkflow(workflowId, { idempotencyKey, mode, input });
81285
+ if (flags.wait === true) {
81286
+ const deadline = Date.now() + 18e4;
81287
+ while (["queued", "planned", "running"].includes(run.status) && Date.now() < deadline) {
81288
+ await new Promise((resolve13) => setTimeout(resolve13, 2e3));
81289
+ run = await client.getWorkflowRun(workflowId, run.id);
81290
+ }
81291
+ if (["queued", "planned", "running"].includes(run.status)) throw new Error(`Workflow run ${run.id} is still running. Inspect it with workflows run-show.`);
81292
+ if (run.status === "failed") throw new Error(`Workflow run ${run.id} failed: ${run.error_summary ?? "inspect run-show for details"}`);
81293
+ await client.ensureSynced(true);
81294
+ run = await client.getWorkflowRun(workflowId, run.id);
81295
+ }
80619
81296
  if (flags.json === true) {
80620
81297
  printJson2(run);
80621
81298
  } else {
@@ -80646,6 +81323,16 @@ async function handleWorkflows(client, subcommand, rest, flags, redactor) {
80646
81323
  }
80647
81324
  return;
80648
81325
  }
81326
+ if (subcommand === "run-delete") {
81327
+ const workflowId = rest[0] ? await requiredResolvedWorkflowId(client, rest[0], flags, "run-delete") : void 0;
81328
+ const runId = rest[1];
81329
+ if (!workflowId || !runId) throw new Error("Usage: openmates workflows run-delete <workflow-id> <run-id> --yes");
81330
+ if (flags.yes !== true) throw new Error("Run deletion forgets its delivered-result history. Existing chat messages remain. Pass --yes to confirm.");
81331
+ const result = await client.deleteWorkflowRun(workflowId, runId);
81332
+ if (flags.json === true) printJson2(result);
81333
+ else kv("Status", result.status);
81334
+ return;
81335
+ }
80649
81336
  if (subcommand === "run-cancel") {
80650
81337
  const workflowId = rest[0] ? await requiredResolvedWorkflowId(client, rest[0], flags, "run-cancel") : void 0;
80651
81338
  const runId = rest[1];
@@ -80658,12 +81345,20 @@ async function handleWorkflows(client, subcommand, rest, flags, redactor) {
80658
81345
  }
80659
81346
  return;
80660
81347
  }
80661
- if (subcommand === "step-test") {
81348
+ if (subcommand === "step-test" || subcommand === "step-preview") {
80662
81349
  const workflowId = rest[0] ? await requiredResolvedWorkflowId(client, rest[0], flags, "step-test") : void 0;
80663
81350
  const stepId = rest[1];
80664
81351
  if (!workflowId || !stepId) throw new Error("Missing workflow/step ID. Example: openmates workflows step-test <workflow-id> <step-id> --yes");
80665
81352
  const input = typeof flags.input === "string" ? parseJsonFlag(flags.input, "--input") : {};
80666
- const run = await client.testWorkflowStep(workflowId, stepId, { input, confirmed: flags.yes === true });
81353
+ const node = typeof flags.node === "string" ? parseJsonFlag(flags.node, "--node") : void 0;
81354
+ const upstreamOutputs = typeof flags.upstream === "string" ? parseJsonFlag(flags.upstream, "--upstream") : void 0;
81355
+ if (subcommand === "step-preview") {
81356
+ const preview = await client.previewWorkflowStep(workflowId, stepId, { input, node, upstreamOutputs });
81357
+ if (flags.json === true) printJson2(preview);
81358
+ else console.log(String(preview.text ?? preview.message ?? preview.body ?? ""));
81359
+ return;
81360
+ }
81361
+ const run = await client.testWorkflowStep(workflowId, stepId, { input, node, upstreamOutputs, confirmed: flags.yes === true });
80667
81362
  if (flags.json === true) {
80668
81363
  printJson2(run);
80669
81364
  } else {
@@ -86922,11 +87617,13 @@ function printWorkflowsHelp() {
86922
87617
  openmates workflows show <workflow-id> [--json]
86923
87618
  openmates workflows enable <workflow-id> [--json]
86924
87619
  openmates workflows disable <workflow-id> [--json]
86925
- openmates workflows run <workflow-id> --idempotency-key <stable-key> [--mode manual|test] [--input '<json>'] [--json]
87620
+ openmates workflows run <workflow-id> --idempotency-key <stable-key> [--mode manual|test] [--input '<json>'] [--wait] [--json]
86926
87621
  openmates workflows runs <workflow-id> [--json]
86927
87622
  openmates workflows run-show <workflow-id> <run-id> [--json]
86928
87623
  openmates workflows run-cancel <workflow-id> <run-id> [--json]
86929
- openmates workflows step-test <workflow-id> <step-id> [--input '<json>'] [--yes] [--json]
87624
+ openmates workflows step-test <workflow-id> <step-id> [--node '<json>'] [--input '<json>'] [--upstream '<json>'] [--json]
87625
+ openmates workflows step-preview <workflow-id> <step-id> [--node '<json>'] [--upstream '<json>'] [--json]
87626
+ openmates workflows run-delete <workflow-id> <run-id> --yes [--json]
86930
87627
  openmates workflows respond <workflow-id> <run-id> <step-id> --input '<json>' [--json]
86931
87628
  openmates workflows help-app <app.skill> [--json]
86932
87629
  openmates workflows delete <workflow-id> --yes [--json]
@@ -803,7 +803,7 @@ interface LearningModeContext {
803
803
  ageGroup?: LearningModeAgeGroup | null;
804
804
  source?: "anonymous_session";
805
805
  }
806
- type WorkflowNodeType = "schedule_trigger" | "manual_trigger" | "webhook_trigger" | "app_skill_action" | "decision" | "repeat" | "create_chat_report" | "send_notification" | "send_email_notification" | "ask_user" | "custom_code" | "end";
806
+ type WorkflowNodeType = "schedule_trigger" | "manual_trigger" | "webhook_trigger" | "app_skill_action" | "decision" | "check" | "send_chat_message" | "start_new_chat" | "event_trigger" | "wait" | "repeat" | "create_chat_report" | "send_notification" | "send_email_notification" | "ask_user" | "custom_code" | "end";
807
807
  interface WorkflowNode {
808
808
  id: string;
809
809
  type: WorkflowNodeType;
@@ -1846,6 +1846,7 @@ interface AnonymousFreeUsageStatus {
1846
1846
  */
1847
1847
  declare function deriveAppUrl(apiUrl: string): string;
1848
1848
  declare class OpenMatesClient {
1849
+ private readonly workflowDeliveriesBySocket;
1849
1850
  readonly apiUrl: string;
1850
1851
  private session;
1851
1852
  private readonly http;
@@ -2457,9 +2458,20 @@ declare class OpenMatesClient {
2457
2458
  listWorkflowRuns(workflowId: string): Promise<WorkflowRunDetail[]>;
2458
2459
  getWorkflowRun(workflowId: string, runId: string): Promise<WorkflowRunDetail>;
2459
2460
  cancelWorkflowRun(workflowId: string, runId: string): Promise<WorkflowRunCancellationResult>;
2461
+ deleteWorkflowRun(workflowId: string, runId: string): Promise<{
2462
+ run_id: string;
2463
+ status: "deleted" | "deletion_pending";
2464
+ }>;
2465
+ previewWorkflowStep(workflowId: string, stepId: string, params?: {
2466
+ input?: Record<string, unknown>;
2467
+ node?: WorkflowNode;
2468
+ upstreamOutputs?: Record<string, Record<string, unknown>>;
2469
+ }): Promise<Record<string, unknown>>;
2460
2470
  testWorkflowStep(workflowId: string, stepId: string, params?: {
2461
2471
  input?: Record<string, unknown>;
2462
2472
  confirmed?: boolean;
2473
+ node?: WorkflowNode;
2474
+ upstreamOutputs?: Record<string, Record<string, unknown>>;
2463
2475
  }): Promise<WorkflowRunDetail>;
2464
2476
  respondToWorkflowRun(workflowId: string, runId: string, stepId: string, input: Record<string, unknown>): Promise<WorkflowRunDetail>;
2465
2477
  listWorkflowCapabilities(): Promise<WorkflowCapability[]>;
@@ -2903,6 +2915,12 @@ declare class OpenMatesClient {
2903
2915
  * SECURITY: decrypted user content is NEVER written to disk.
2904
2916
  */
2905
2917
  ensureSynced(forceRefresh?: boolean, refreshChatIds?: string[], options?: TeamContextOptions, includeMessageContentRefresh?: boolean): Promise<SyncCache>;
2918
+ /**
2919
+ * Claim and finish reconnect workflow deliveries using only normal client
2920
+ * ciphertext. A fenced server transaction persists chat/message/selected
2921
+ * embeds before acknowledgement commits their cross-run delivery history.
2922
+ */
2923
+ private persistPendingWorkflowChatDeliveries;
2906
2924
  private persistPendingAIResponsesFromSync;
2907
2925
  private prompt;
2908
2926
  private waitForPairAuthorization;
@@ -3020,4 +3038,4 @@ declare function serializeToYaml(data: Record<string, unknown>, indent?: number)
3020
3038
  /** Map language identifier to file extension for code embed downloads. */
3021
3039
  declare function getExtForLang(language: string): string;
3022
3040
 
3023
- export { type ChatListPage as $, type WorkflowRunContentRetention as A, type WorkflowRunDetail as B, type WorkflowRunCancellationResult as C, type DecryptedUserTask as D, type ExternalChatContext as E, type WorkflowTemplateProjectionUpsertParams as F, type WorkflowTemplateProjectionResult as G, type PublicWorkflowTemplateProjection as H, type WorkflowTemplateProjectionRevocationResult as I, type WorkflowTemplateBindingCompletionParams as J, type WorkflowTemplateBindingCompletionResult as K, type WorkflowTemplateShortUrlParams as L, type WorkflowTemplateShortUrlResult as M, type WorkflowTemplateImportPayload as N, type ImportedWorkflowTemplate as O, type ProjectItemRecord as P, type AuthMethodsStatus as Q, type AuthoritativeChatReconciliation as R, type ShortUrlRevokeResult as S, type TaskCreateOptions as T, type UserPlanStatus as U, type BackupCodesResult as V, type WorkflowSummary as W, type BankTransferOrderDetails as X, type BankTransferStatus as Y, type CachedChat as Z, type CachedNewChatSuggestion as _, type UserPlanRecord as a, type CliSignupResult as a0, type DecryptedDraft as a1, type DecryptedEmbed as a2, type DecryptedMemoryEntry as a3, type DecryptedMessage as a4, type DecryptedNewChatSuggestion as a5, type DocsFile as a6, type DocsFolder as a7, type DocsSearchResult as a8, type DocsTree as a9, normalizeInterestTagIds as aA, reconcileAuthoritativeChats as aB, serializeToYaml as aC, assertTrustedAccountCommandAllowed as aD, assertTrustedAccountGuardEnvironment as aE, buildTravelConnectionsRequest as aF, printWhoAmI as aG, requireExactConfirmation as aH, resolveProjectContext as aI, shouldRequireTrustedAccountGuard as aJ, type EncryptedDraft as aa, type GiftCardBankTransferStatus as ab, INTEREST_TAG_IDS as ac, type ImagesAiDetectionClassification as ad, type ImagesAiDetectionSummary as ae, type InterestTagId as af, MATE_NAMES as ag, MEMORY_TYPE_REGISTRY as ah, type MemoryFieldDef as ai, type MemoryTypeDef as aj, OpenMatesClient as ak, type OpenMatesClientOptions as al, type OpenMatesSession as am, type SyncCache as an, type TopicPreferencesPayload as ao, type TotpSetupStartResult as ap, type WorkflowEdge as aq, type WorkflowNode as ar, type WorkflowNodeRun as as, type WorkflowNodeType as at, type WorkflowRunContentStorage as au, buildImagesAiDetectionSummary as av, classifyImagesAiDetection as aw, deriveAppUrl as ax, formatImagesAiDetectionLabel as ay, getExtForLang as az, type UserPlanVerificationStatus as b, type UserPlanLearningType as c, type UserPlanLearningTargetKind as d, type UserPlanLearningStatus as e, type UserPlanLearningLevel as f, type UserPlanLearningRecord as g, type UserPlanCriterionRecord as h, type UserPlanVerificationRecord as i, type UserPlanCreateInput as j, type UserPlanUpdateInput as k, type TaskUpdateOptions as l, type UserPlanLearningCreateTasksInput as m, type UserPlanLearningCreateTasksResult as n, type UserTaskStatus as o, type TaskPriorityLevel as p, type DecryptedTaskActivityEntry as q, type TaskActivityCreateOptions as r, type UserTaskReorderInput as s, type WorkflowCapability as t, type WorkflowDetail as u, type WorkflowInputStartParams as v, type WorkflowInputSessionResult as w, type WorkflowInputSessionDetail as x, type WorkflowInputEvent as y, type WorkflowGraph as z };
3041
+ export { type CachedNewChatSuggestion as $, type WorkflowRunContentRetention as A, type WorkflowRunDetail as B, type WorkflowNode as C, type DecryptedUserTask as D, type ExternalChatContext as E, type WorkflowRunCancellationResult as F, type WorkflowTemplateProjectionUpsertParams as G, type WorkflowTemplateProjectionResult as H, type PublicWorkflowTemplateProjection as I, type WorkflowTemplateProjectionRevocationResult as J, type WorkflowTemplateBindingCompletionParams as K, type WorkflowTemplateBindingCompletionResult as L, type WorkflowTemplateShortUrlParams as M, type WorkflowTemplateShortUrlResult as N, type WorkflowTemplateImportPayload as O, type ProjectItemRecord as P, type ImportedWorkflowTemplate as Q, type AuthMethodsStatus as R, type ShortUrlRevokeResult as S, type TaskCreateOptions as T, type UserPlanStatus as U, type AuthoritativeChatReconciliation as V, type WorkflowSummary as W, type BackupCodesResult as X, type BankTransferOrderDetails as Y, type BankTransferStatus as Z, type CachedChat as _, type UserPlanRecord as a, type ChatListPage as a0, type CliSignupResult as a1, type DecryptedDraft as a2, type DecryptedEmbed as a3, type DecryptedMemoryEntry as a4, type DecryptedMessage as a5, type DecryptedNewChatSuggestion as a6, type DocsFile as a7, type DocsFolder as a8, type DocsSearchResult as a9, normalizeInterestTagIds as aA, reconcileAuthoritativeChats as aB, serializeToYaml as aC, assertTrustedAccountCommandAllowed as aD, assertTrustedAccountGuardEnvironment as aE, buildTravelConnectionsRequest as aF, printWhoAmI as aG, requireExactConfirmation as aH, resolveProjectContext as aI, shouldRequireTrustedAccountGuard as aJ, type DocsTree as aa, type EncryptedDraft as ab, type GiftCardBankTransferStatus as ac, INTEREST_TAG_IDS as ad, type ImagesAiDetectionClassification as ae, type ImagesAiDetectionSummary as af, type InterestTagId as ag, MATE_NAMES as ah, MEMORY_TYPE_REGISTRY as ai, type MemoryFieldDef as aj, type MemoryTypeDef as ak, OpenMatesClient as al, type OpenMatesClientOptions as am, type OpenMatesSession as an, type SyncCache as ao, type TopicPreferencesPayload as ap, type TotpSetupStartResult as aq, type WorkflowEdge as ar, type WorkflowNodeRun as as, type WorkflowNodeType as at, type WorkflowRunContentStorage as au, buildImagesAiDetectionSummary as av, classifyImagesAiDetection as aw, deriveAppUrl as ax, formatImagesAiDetectionLabel as ay, getExtForLang as az, type UserPlanVerificationStatus as b, type UserPlanLearningType as c, type UserPlanLearningTargetKind as d, type UserPlanLearningStatus as e, type UserPlanLearningLevel as f, type UserPlanLearningRecord as g, type UserPlanCriterionRecord as h, type UserPlanVerificationRecord as i, type UserPlanCreateInput as j, type UserPlanUpdateInput as k, type TaskUpdateOptions as l, type UserPlanLearningCreateTasksInput as m, type UserPlanLearningCreateTasksResult as n, type UserTaskStatus as o, type TaskPriorityLevel as p, type DecryptedTaskActivityEntry as q, type TaskActivityCreateOptions as r, type UserTaskReorderInput as s, type WorkflowCapability as t, type WorkflowDetail as u, type WorkflowInputStartParams as v, type WorkflowInputSessionResult as w, type WorkflowInputSessionDetail as x, type WorkflowInputEvent as y, type WorkflowGraph as z };
package/dist/cli.d.ts CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- export { ad as ImagesAiDetectionClassification, ae as ImagesAiDetectionSummary, aD as assertTrustedAccountCommandAllowed, aE as assertTrustedAccountGuardEnvironment, av as buildImagesAiDetectionSummary, aF as buildTravelConnectionsRequest, aw as classifyImagesAiDetection, ay as formatImagesAiDetectionLabel, az as getExtForLang, aG as printWhoAmI, aH as requireExactConfirmation, aI as resolveProjectContext, aC as serializeToYaml, aJ as shouldRequireTrustedAccountGuard } from './cli-DDNwbX2B.js';
2
+ export { ae as ImagesAiDetectionClassification, af as ImagesAiDetectionSummary, aD as assertTrustedAccountCommandAllowed, aE as assertTrustedAccountGuardEnvironment, av as buildImagesAiDetectionSummary, aF as buildTravelConnectionsRequest, aw as classifyImagesAiDetection, ay as formatImagesAiDetectionLabel, az as getExtForLang, aG as printWhoAmI, aH as requireExactConfirmation, aI as resolveProjectContext, aC as serializeToYaml, aJ as shouldRequireTrustedAccountGuard } from './cli-DfLQ_qY9.js';
package/dist/cli.js CHANGED
@@ -12,7 +12,7 @@ import {
12
12
  resolveProjectContext,
13
13
  serializeToYaml,
14
14
  shouldRequireTrustedAccountGuard
15
- } from "./chunk-EBSOZCOX.js";
15
+ } from "./chunk-HHNJW3Z6.js";
16
16
  import "./chunk-IWKP55ZB.js";
17
17
  import "./chunk-BBKJZ23O.js";
18
18
  export {
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { 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, 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 WorkflowInputStartParams, w as WorkflowInputSessionResult, x as WorkflowInputSessionDetail, y as WorkflowInputEvent, z as WorkflowGraph, A as WorkflowRunContentRetention, B as WorkflowRunDetail, C as WorkflowRunCancellationResult, F as WorkflowTemplateProjectionUpsertParams, G as WorkflowTemplateProjectionResult, H as PublicWorkflowTemplateProjection, I as WorkflowTemplateProjectionRevocationResult, J as WorkflowTemplateBindingCompletionParams, K as WorkflowTemplateBindingCompletionResult, L as WorkflowTemplateShortUrlParams, M as WorkflowTemplateShortUrlResult, S as ShortUrlRevokeResult, N as WorkflowTemplateImportPayload, O as ImportedWorkflowTemplate } from './cli-DDNwbX2B.js';
2
- export { Q as AuthMethodsStatus, R as AuthoritativeChatReconciliation, V as BackupCodesResult, X as BankTransferOrderDetails, Y as BankTransferStatus, Z as CachedChat, _ as CachedNewChatSuggestion, $ as ChatListPage, a0 as CliSignupResult, a1 as DecryptedDraft, a2 as DecryptedEmbed, a3 as DecryptedMemoryEntry, a4 as DecryptedMessage, a5 as DecryptedNewChatSuggestion, a6 as DocsFile, a7 as DocsFolder, a8 as DocsSearchResult, a9 as DocsTree, aa as EncryptedDraft, ab as GiftCardBankTransferStatus, ac as INTEREST_TAG_IDS, ad as ImagesAiDetectionClassification, ae as ImagesAiDetectionSummary, af as InterestTagId, ag as MATE_NAMES, ah as MEMORY_TYPE_REGISTRY, ai as MemoryFieldDef, aj as MemoryTypeDef, ak as OpenMatesClient, al as OpenMatesClientOptions, am as OpenMatesSession, an as SyncCache, ao as TopicPreferencesPayload, ap as TotpSetupStartResult, aq as WorkflowEdge, ar as WorkflowNode, as as WorkflowNodeRun, at as WorkflowNodeType, au as WorkflowRunContentStorage, av as buildImagesAiDetectionSummary, aw as classifyImagesAiDetection, ax as deriveAppUrl, ay as formatImagesAiDetectionLabel, az as getExtForLang, aA as normalizeInterestTagIds, aB as reconcileAuthoritativeChats, aC as serializeToYaml } from './cli-DDNwbX2B.js';
1
+ import { 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, 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 WorkflowInputStartParams, w as WorkflowInputSessionResult, x as WorkflowInputSessionDetail, y as WorkflowInputEvent, z as WorkflowGraph, A as WorkflowRunContentRetention, B as WorkflowRunDetail, C as WorkflowNode, F as WorkflowRunCancellationResult, G as WorkflowTemplateProjectionUpsertParams, H as WorkflowTemplateProjectionResult, I as PublicWorkflowTemplateProjection, J as WorkflowTemplateProjectionRevocationResult, K as WorkflowTemplateBindingCompletionParams, L as WorkflowTemplateBindingCompletionResult, M as WorkflowTemplateShortUrlParams, N as WorkflowTemplateShortUrlResult, S as ShortUrlRevokeResult, O as WorkflowTemplateImportPayload, Q as ImportedWorkflowTemplate } from './cli-DfLQ_qY9.js';
2
+ export { R as AuthMethodsStatus, V as AuthoritativeChatReconciliation, X as BackupCodesResult, Y as BankTransferOrderDetails, Z as BankTransferStatus, _ as CachedChat, $ as CachedNewChatSuggestion, a0 as ChatListPage, a1 as CliSignupResult, a2 as DecryptedDraft, a3 as DecryptedEmbed, a4 as DecryptedMemoryEntry, a5 as DecryptedMessage, a6 as DecryptedNewChatSuggestion, a7 as DocsFile, a8 as DocsFolder, a9 as DocsSearchResult, aa as DocsTree, ab as EncryptedDraft, ac as GiftCardBankTransferStatus, ad as INTEREST_TAG_IDS, ae as ImagesAiDetectionClassification, af as ImagesAiDetectionSummary, ag as InterestTagId, ah as MATE_NAMES, ai as MEMORY_TYPE_REGISTRY, aj as MemoryFieldDef, ak as MemoryTypeDef, al as OpenMatesClient, am as OpenMatesClientOptions, an as OpenMatesSession, ao as SyncCache, ap as TopicPreferencesPayload, aq as TotpSetupStartResult, ar as WorkflowEdge, as as WorkflowNodeRun, at as WorkflowNodeType, au as WorkflowRunContentStorage, av as buildImagesAiDetectionSummary, aw as classifyImagesAiDetection, ax as deriveAppUrl, ay as formatImagesAiDetectionLabel, az as getExtForLang, aA as normalizeInterestTagIds, aB as reconcileAuthoritativeChats, aC as serializeToYaml } from './cli-DfLQ_qY9.js';
3
3
 
4
4
  interface ProjectedAssistantSpeechSegment {
5
5
  sequence: number;
@@ -5265,9 +5265,20 @@ declare class OpenMatesWorkflows {
5265
5265
  }): Promise<WorkflowRunDetail>;
5266
5266
  runs(workflowId: string): Promise<WorkflowRunDetail[]>;
5267
5267
  runDetail(workflowId: string, runId: string): Promise<WorkflowRunDetail>;
5268
+ deleteRun(workflowId: string, runId: string): Promise<{
5269
+ run_id: string;
5270
+ status: "deleted" | "deletion_pending";
5271
+ }>;
5272
+ previewStep(workflowId: string, stepId: string, params?: {
5273
+ input?: Record<string, unknown>;
5274
+ node?: WorkflowNode;
5275
+ upstreamOutputs?: Record<string, Record<string, unknown>>;
5276
+ }): Promise<Record<string, unknown>>;
5268
5277
  stepTest(workflowId: string, stepId: string, params?: {
5269
5278
  input?: Record<string, unknown>;
5270
5279
  confirmed?: boolean;
5280
+ node?: WorkflowNode;
5281
+ upstreamOutputs?: Record<string, Record<string, unknown>>;
5271
5282
  }): Promise<WorkflowRunDetail>;
5272
5283
  cancelRun(workflowId: string, runId: string): Promise<WorkflowRunCancellationResult>;
5273
5284
  respond(workflowId: string, runId: string, stepId: string, input: Record<string, unknown>): Promise<WorkflowRunDetail>;
@@ -5420,4 +5431,4 @@ type AssistantFeedbackDecision = {
5420
5431
  };
5421
5432
  declare function buildAssistantFeedbackDecision(rating: number): AssistantFeedbackDecision;
5422
5433
 
5423
- export { APP_SKILL_METADATA, ASSISTANT_FEEDBACK_REPORT_TITLE, ASSISTANT_FEEDBACK_THANKS, type ApiKeyCreateOptions, type ApiKeyCreateResult, type ApiKeyRecord, type AssistantFeedbackDecision, type ChatCreateOptions, type ChatListOptions, type ChatResponse, DecryptedUserTask, type DesignIconExportFormat, type DesignIconExportOptions, type DesignIconExportResult, type DraftRecord, type EncryptedChatMetadata, type EncryptedDraftRecord, type FocusModeSelection, type IdeaBucketAddInput, type IdeaBucketProcessOptions, type IdeaBucketResult, type IdeaBucketSettings, type IdeaBucketSettingsInput, OpenMates, OpenMatesApiError, OpenMatesConfigError, type OpenMatesOptions, type PlanPlainCreateOptions, type PlanPlainUpdateOptions, type PlanRecord, type ProjectPlainCreateOptions, type ProjectPlainUpdateOptions, type ProjectRecordPlain, SUPPORT_URL, type TaskListFilters, type TaskPlainCreateOptions, type TaskPlainUpdateOptions, type TaskRecord, WorkflowCapability, WorkflowDetail, WorkflowGraph, WorkflowRunContentRetention, WorkflowRunDetail, WorkflowSummary, buildAssistantFeedbackDecision, buildCreatePlanCriterionInput, buildCreatePlanLearningInput, buildCreatePlanVerificationInput, buildCreateUserPlanInput, buildPlanVerificationEvidenceInput, buildUpdatePlanLearningInput, buildUpdatePlanVerificationInput, buildUpdateUserPlanInput, decryptPlanLearning, decryptPlanLearnings, decryptUserPlan, decryptUserPlans, defaultCloneBranchForVersion, findPlan, findPlanLearning, projectAssistantSpeech, renderPlanDetail, renderPlanLearningDetail, renderPlanLearningList, renderPlanList, renderSupportInfo, selectAssistantMessagesForSpeech, summarizeAssistantSpeech };
5434
+ export { APP_SKILL_METADATA, ASSISTANT_FEEDBACK_REPORT_TITLE, ASSISTANT_FEEDBACK_THANKS, type ApiKeyCreateOptions, type ApiKeyCreateResult, type ApiKeyRecord, type AssistantFeedbackDecision, type ChatCreateOptions, type ChatListOptions, type ChatResponse, DecryptedUserTask, type DesignIconExportFormat, type DesignIconExportOptions, type DesignIconExportResult, type DraftRecord, type EncryptedChatMetadata, type EncryptedDraftRecord, type FocusModeSelection, type IdeaBucketAddInput, type IdeaBucketProcessOptions, type IdeaBucketResult, type IdeaBucketSettings, type IdeaBucketSettingsInput, OpenMates, OpenMatesApiError, OpenMatesConfigError, type OpenMatesOptions, type PlanPlainCreateOptions, type PlanPlainUpdateOptions, type PlanRecord, type ProjectPlainCreateOptions, type ProjectPlainUpdateOptions, type ProjectRecordPlain, SUPPORT_URL, type TaskListFilters, type TaskPlainCreateOptions, type TaskPlainUpdateOptions, type TaskRecord, WorkflowCapability, WorkflowDetail, WorkflowGraph, WorkflowNode, WorkflowRunContentRetention, WorkflowRunDetail, WorkflowSummary, buildAssistantFeedbackDecision, buildCreatePlanCriterionInput, buildCreatePlanLearningInput, buildCreatePlanVerificationInput, buildCreateUserPlanInput, buildPlanVerificationEvidenceInput, buildUpdatePlanLearningInput, buildUpdatePlanVerificationInput, buildUpdateUserPlanInput, decryptPlanLearning, decryptPlanLearnings, decryptUserPlan, decryptUserPlans, defaultCloneBranchForVersion, findPlan, findPlanLearning, projectAssistantSpeech, renderPlanDetail, renderPlanLearningDetail, renderPlanLearningList, renderPlanList, renderSupportInfo, selectAssistantMessagesForSpeech, summarizeAssistantSpeech };
package/dist/index.js CHANGED
@@ -42,7 +42,7 @@ import {
42
42
  selectAssistantMessagesForSpeech,
43
43
  serializeToYaml,
44
44
  summarizeAssistantSpeech
45
- } from "./chunk-EBSOZCOX.js";
45
+ } from "./chunk-HHNJW3Z6.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.37",
3
+ "version": "0.18.0-alpha.39",
4
4
  "description": "OpenMates CLI and SDK",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",