openmates 0.11.0-alpha.23 → 0.11.0-alpha.25

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.
@@ -1068,6 +1068,7 @@ var OpenMatesWsClient = class {
1068
1068
  let followUpSuggestions = [];
1069
1069
  const subChatEvents = [];
1070
1070
  const pendingSubChatHandlers = /* @__PURE__ */ new Set();
1071
+ const pendingMemoryRequestHandlers = /* @__PURE__ */ new Set();
1071
1072
  const embeds = /* @__PURE__ */ new Map();
1072
1073
  const processingEmbedIds = /* @__PURE__ */ new Set();
1073
1074
  let aiResponseDone = false;
@@ -1112,6 +1113,7 @@ var OpenMatesWsClient = class {
1112
1113
  const maybeResolve = () => {
1113
1114
  if (!aiResponseDone || !postProcessingDone) return;
1114
1115
  if (pendingSubChatHandlers.size > 0) return;
1116
+ if (pendingMemoryRequestHandlers.size > 0) return;
1115
1117
  if (processingEmbedIds.size > 0 && !asyncEmbedTimer) {
1116
1118
  asyncEmbedTimer = setTimeout(() => {
1117
1119
  cleanup();
@@ -1162,8 +1164,33 @@ var OpenMatesWsClient = class {
1162
1164
  maybeResolve();
1163
1165
  });
1164
1166
  };
1167
+ const handleAppSettingsMemoriesRequest = (p) => {
1168
+ const eventChatId = typeof p.chat_id === "string" ? p.chat_id : null;
1169
+ if (eventChatId !== chatId) return;
1170
+ const handler = options?.onAppSettingsMemoriesRequest;
1171
+ if (!handler) return;
1172
+ resetTimeout(timeoutMs);
1173
+ const requestedKeys = Array.isArray(p.requested_keys) ? p.requested_keys.filter(
1174
+ (key) => typeof key === "string" && key.length > 0
1175
+ ) : [];
1176
+ const event = {
1177
+ requestId: typeof p.request_id === "string" ? p.request_id : null,
1178
+ chatId: eventChatId,
1179
+ requestedKeys,
1180
+ payload: p
1181
+ };
1182
+ const pending = Promise.resolve(handler(event));
1183
+ pendingMemoryRequestHandlers.add(pending);
1184
+ pending.catch((error) => {
1185
+ cleanup();
1186
+ reject(error instanceof Error ? error : new Error(String(error)));
1187
+ }).finally(() => {
1188
+ pendingMemoryRequestHandlers.delete(pending);
1189
+ maybeResolve();
1190
+ });
1191
+ };
1165
1192
  const scheduleResolve = (content) => {
1166
- if (awaitingSubChatsCompletion && content.trim() === SUB_CHAT_PARENT_STATUS_MESSAGE) {
1193
+ if (awaitingSubChatsCompletion && content.trim().startsWith(SUB_CHAT_PARENT_STATUS_MESSAGE)) {
1167
1194
  latestContent = "";
1168
1195
  return;
1169
1196
  }
@@ -1190,6 +1217,10 @@ var OpenMatesWsClient = class {
1190
1217
  handleSubChatEvent(type, p);
1191
1218
  return;
1192
1219
  }
1220
+ if (type === "request_app_settings_memories") {
1221
+ handleAppSettingsMemoriesRequest(p);
1222
+ return;
1223
+ }
1193
1224
  if (type === "send_embed_data") {
1194
1225
  const embedPayload = p.payload && typeof p.payload === "object" ? p.payload : p;
1195
1226
  if (typeof embedPayload.chat_id === "string" && embedPayload.chat_id !== chatId) {
@@ -1946,10 +1977,9 @@ var MEMORY_TYPE_REGISTRY = {
1946
1977
  title: { type: "string" },
1947
1978
  tone: {
1948
1979
  type: "string",
1949
- enum: ["formal", "casual", "friendly", "professional"]
1980
+ enum: ["formal", "casual", "friendly", "professional", "conversational"]
1950
1981
  },
1951
- verbosity: { type: "string", enum: ["concise", "balanced", "detailed"] },
1952
- notes: { type: "string" }
1982
+ verbosity: { type: "string", enum: ["concise", "balanced", "detailed", "very_detailed"] }
1953
1983
  }
1954
1984
  },
1955
1985
  "ai/learning_preferences": {
@@ -1961,11 +1991,11 @@ var MEMORY_TYPE_REGISTRY = {
1961
1991
  title: { type: "string" },
1962
1992
  learning_type: {
1963
1993
  type: "string",
1964
- enum: ["visual", "reading", "hands_on", "audio", "mixed"]
1994
+ enum: ["visual", "auditory", "reading", "hands-on", "video", "interactive", "written", "discussion"]
1965
1995
  },
1966
1996
  preference_strength: {
1967
1997
  type: "string",
1968
- enum: ["strong", "moderate", "slight"]
1998
+ enum: ["strongly_prefer", "prefer", "neutral", "avoid"]
1969
1999
  },
1970
2000
  notes: { type: "string" }
1971
2001
  }
@@ -2029,7 +2059,7 @@ var MEMORY_TYPE_REGISTRY = {
2029
2059
  name: { type: "string" },
2030
2060
  status: {
2031
2061
  type: "string",
2032
- enum: ["active", "paused", "completed", "archived"]
2062
+ enum: ["active", "planned", "completed"]
2033
2063
  },
2034
2064
  description: { type: "string" },
2035
2065
  git_repo_url: { type: "string" }
@@ -2050,12 +2080,12 @@ var MEMORY_TYPE_REGISTRY = {
2050
2080
  properties: {
2051
2081
  workspace: {
2052
2082
  type: "string",
2053
- enum: ["local", "remote", "cloud", "mixed"]
2083
+ enum: ["ide", "terminal", "web_ui", "mixed"]
2054
2084
  },
2055
- ai_level: { type: "string", enum: ["minimal", "moderate", "extensive"] },
2085
+ ai_level: { type: "string", enum: ["off", "low", "medium", "high"] },
2056
2086
  input_style: {
2057
2087
  type: "string",
2058
- enum: ["keyboard_only", "mixed", "voice_primary"]
2088
+ enum: ["guided_choices", "free_text", "mixed"]
2059
2089
  },
2060
2090
  notes: { type: "string" }
2061
2091
  }
@@ -2067,12 +2097,30 @@ var MEMORY_TYPE_REGISTRY = {
2067
2097
  required: ["name"],
2068
2098
  properties: { name: { type: "string" }, description: { type: "string" } }
2069
2099
  },
2100
+ "events/saved_events": {
2101
+ appId: "events",
2102
+ itemType: "saved_events",
2103
+ entryType: "list",
2104
+ required: ["title"],
2105
+ properties: {
2106
+ embed_id: { type: "string" },
2107
+ title: { type: "string" },
2108
+ provider: { type: "string" },
2109
+ url: { type: "string" },
2110
+ date_start: { type: "string" },
2111
+ date_end: { type: "string" },
2112
+ location: { type: "string" },
2113
+ notes: { type: "string" }
2114
+ }
2115
+ },
2070
2116
  "health/appointments": {
2071
2117
  appId: "health",
2072
2118
  itemType: "appointments",
2073
2119
  entryType: "list",
2074
2120
  required: ["appointment_type", "date"],
2075
2121
  properties: {
2122
+ embed_id: { type: "string" },
2123
+ title: { type: "string" },
2076
2124
  appointment_type: { type: "string" },
2077
2125
  where: { type: "string" },
2078
2126
  date: { type: "string" },
@@ -2089,10 +2137,11 @@ var MEMORY_TYPE_REGISTRY = {
2089
2137
  type: "string",
2090
2138
  enum: [
2091
2139
  "surgery",
2092
- "condition",
2140
+ "chronic_condition",
2093
2141
  "allergy",
2094
2142
  "medication",
2095
2143
  "vaccination",
2144
+ "injury",
2096
2145
  "other"
2097
2146
  ]
2098
2147
  },
@@ -2101,6 +2150,22 @@ var MEMORY_TYPE_REGISTRY = {
2101
2150
  details: { type: "string" }
2102
2151
  }
2103
2152
  },
2153
+ "home/saved_listings": {
2154
+ appId: "home",
2155
+ itemType: "saved_listings",
2156
+ entryType: "list",
2157
+ required: ["title"],
2158
+ properties: {
2159
+ embed_id: { type: "string" },
2160
+ title: { type: "string" },
2161
+ url: { type: "string" },
2162
+ provider: { type: "string" },
2163
+ price_label: { type: "string" },
2164
+ address: { type: "string" },
2165
+ available_from: { type: "string" },
2166
+ notes: { type: "string" }
2167
+ }
2168
+ },
2104
2169
  "images/preferred_styles": {
2105
2170
  appId: "images",
2106
2171
  itemType: "preferred_styles",
@@ -2120,12 +2185,16 @@ var MEMORY_TYPE_REGISTRY = {
2120
2185
  footer: { type: "string" }
2121
2186
  }
2122
2187
  },
2123
- "maps/favorite_places": {
2124
- appId: "maps",
2125
- itemType: "favorite_places",
2188
+ "reminder/saved_item_reminder_defaults": {
2189
+ appId: "reminder",
2190
+ itemType: "saved_item_reminder_defaults",
2126
2191
  entryType: "list",
2127
- required: ["name"],
2128
- properties: { name: { type: "string" }, address: { type: "string" } }
2192
+ required: ["item_kind", "offsets_minutes"],
2193
+ properties: {
2194
+ item_kind: { type: "string", enum: ["event", "travel_connection", "travel_stay", "home_listing", "health_appointment"] },
2195
+ offsets_minutes: { type: "string" },
2196
+ notes: { type: "string" }
2197
+ }
2129
2198
  },
2130
2199
  "study/learning_goals": {
2131
2200
  appId: "study",
@@ -2154,6 +2223,40 @@ var MEMORY_TYPE_REGISTRY = {
2154
2223
  notes: { type: "string" }
2155
2224
  }
2156
2225
  },
2226
+ "travel/saved_connections": {
2227
+ appId: "travel",
2228
+ itemType: "saved_connections",
2229
+ entryType: "list",
2230
+ required: ["title"],
2231
+ properties: {
2232
+ embed_id: { type: "string" },
2233
+ title: { type: "string" },
2234
+ transport_method: { type: "string" },
2235
+ origin: { type: "string" },
2236
+ destination: { type: "string" },
2237
+ departure: { type: "string" },
2238
+ arrival: { type: "string" },
2239
+ booking_url: { type: "string" },
2240
+ provider: { type: "string" },
2241
+ notes: { type: "string" }
2242
+ }
2243
+ },
2244
+ "travel/saved_stays": {
2245
+ appId: "travel",
2246
+ itemType: "saved_stays",
2247
+ entryType: "list",
2248
+ required: ["name"],
2249
+ properties: {
2250
+ embed_id: { type: "string" },
2251
+ name: { type: "string" },
2252
+ property_type: { type: "string" },
2253
+ url: { type: "string" },
2254
+ price: { type: "string" },
2255
+ rating: { type: "number" },
2256
+ location: { type: "string" },
2257
+ notes: { type: "string" }
2258
+ }
2259
+ },
2157
2260
  "travel/preferred_airlines": {
2158
2261
  appId: "travel",
2159
2262
  itemType: "preferred_airlines",
@@ -2166,7 +2269,9 @@ var MEMORY_TYPE_REGISTRY = {
2166
2269
  itemType: "preferred_transport_methods",
2167
2270
  entryType: "list",
2168
2271
  required: ["method"],
2169
- properties: { method: { type: "string" } }
2272
+ properties: {
2273
+ method: { type: "string", enum: ["bike", "public_transport", "train", "plane", "car", "walking"] }
2274
+ }
2170
2275
  },
2171
2276
  "travel/preferred_activities": {
2172
2277
  appId: "travel",
@@ -2182,12 +2287,12 @@ var MEMORY_TYPE_REGISTRY = {
2182
2287
  required: ["title"],
2183
2288
  properties: {
2184
2289
  title: { type: "string" },
2185
- year: { type: "number" },
2290
+ year: { type: "integer" },
2186
2291
  director: { type: "string" },
2187
2292
  rating: { type: "number" },
2188
- tmdb_id: { type: "number" },
2293
+ tmdb_id: { type: "integer" },
2189
2294
  notes: { type: "string" },
2190
- genre: { type: "string" }
2295
+ genre: { type: "array" }
2191
2296
  }
2192
2297
  },
2193
2298
  "tv/watched_tv_shows": {
@@ -2197,17 +2302,17 @@ var MEMORY_TYPE_REGISTRY = {
2197
2302
  required: ["title"],
2198
2303
  properties: {
2199
2304
  title: { type: "string" },
2200
- year: { type: "number" },
2201
- tmdb_id: { type: "number" },
2305
+ year: { type: "integer" },
2306
+ tmdb_id: { type: "integer" },
2202
2307
  status: {
2203
2308
  type: "string",
2204
- enum: ["watching", "completed", "dropped", "on_hold"]
2309
+ enum: ["watching", "completed", "on_hold", "dropped"]
2205
2310
  },
2206
- seasons_watched: { type: "number" },
2311
+ seasons_watched: { type: "integer" },
2207
2312
  latest_episode: { type: "string" },
2208
2313
  rating: { type: "number" },
2209
2314
  notes: { type: "string" },
2210
- genre: { type: "string" }
2315
+ genre: { type: "array" }
2211
2316
  }
2212
2317
  },
2213
2318
  "tv/to_watch_list": {
@@ -2217,12 +2322,12 @@ var MEMORY_TYPE_REGISTRY = {
2217
2322
  required: ["title", "type"],
2218
2323
  properties: {
2219
2324
  title: { type: "string" },
2220
- year: { type: "number" },
2325
+ year: { type: "integer" },
2221
2326
  type: { type: "string", enum: ["movie", "tv_show"] },
2222
- tmdb_id: { type: "number" },
2327
+ tmdb_id: { type: "integer" },
2223
2328
  director: { type: "string" },
2224
2329
  priority: { type: "string", enum: ["high", "medium", "low"] },
2225
- genre: { type: "string" },
2330
+ genre: { type: "array" },
2226
2331
  reason: { type: "string" }
2227
2332
  }
2228
2333
  },
@@ -3043,6 +3148,23 @@ var OpenMatesClient = class _OpenMatesClient {
3043
3148
  } else {
3044
3149
  chatId = params.chatId;
3045
3150
  }
3151
+ let availableMemories = [];
3152
+ let memoryMetadataKeys = [];
3153
+ if (!params.incognito) {
3154
+ try {
3155
+ availableMemories = await this.listMemories();
3156
+ memoryMetadataKeys = [
3157
+ ...new Set(
3158
+ availableMemories.filter((memory) => memory.app_id && memory.item_type).map((memory) => `${memory.app_id}-${memory.item_type}`)
3159
+ )
3160
+ ];
3161
+ } catch (error) {
3162
+ if (params.autoApproveMemories) {
3163
+ const message = error instanceof Error ? error.message : String(error);
3164
+ throw new Error(`Failed to load memories for auto-approval: ${message}`);
3165
+ }
3166
+ }
3167
+ }
3046
3168
  const { ws, session } = await this.openWsClient();
3047
3169
  const messageId = randomUUID2();
3048
3170
  const createdAt = Math.floor(Date.now() / 1e3);
@@ -3062,6 +3184,9 @@ var OpenMatesClient = class _OpenMatesClient {
3062
3184
  chat_has_title: Boolean(params.chatId)
3063
3185
  }
3064
3186
  };
3187
+ if (memoryMetadataKeys.length > 0) {
3188
+ messagePayload.app_settings_memories_metadata = memoryMetadataKeys;
3189
+ }
3065
3190
  let chatKeyBytes = null;
3066
3191
  let encryptedChatKey = null;
3067
3192
  let baselineMessagesV = 0;
@@ -3151,6 +3276,7 @@ var OpenMatesClient = class _OpenMatesClient {
3151
3276
  let modelName = null;
3152
3277
  let followUpSuggestions = [];
3153
3278
  let subChatEvents = [];
3279
+ const appSettingsMemoryRequests = [];
3154
3280
  const numberOrNull = (value) => typeof value === "number" && Number.isFinite(value) ? value : null;
3155
3281
  const isApprovalWithinServerLimits = (request) => {
3156
3282
  const count = request.subChats.length;
@@ -3211,9 +3337,44 @@ var OpenMatesClient = class _OpenMatesClient {
3211
3337
  })
3212
3338
  );
3213
3339
  };
3340
+ const handleAppSettingsMemoriesRequest = async (event) => {
3341
+ if (!params.autoApproveMemories) {
3342
+ throw new Error(
3343
+ `The assistant requested memories (${event.requestedKeys.join(", ")}). Rerun with --auto-approve-memories to approve requested memory categories from the CLI, or continue this chat in the web app.`
3344
+ );
3345
+ }
3346
+ const requested = new Set(event.requestedKeys);
3347
+ const unadvertisedKeys = event.requestedKeys.filter(
3348
+ (key) => !memoryMetadataKeys.includes(key)
3349
+ );
3350
+ if (unadvertisedKeys.length > 0) {
3351
+ throw new Error(
3352
+ `Refusing to auto-approve unadvertised memory categories: ${unadvertisedKeys.join(", ")}`
3353
+ );
3354
+ }
3355
+ const approvedMemories = availableMemories.filter((memory) => requested.has(`${memory.app_id}-${memory.item_type}`)).map((memory) => ({
3356
+ app_id: memory.app_id,
3357
+ item_key: memory.item_type,
3358
+ content: memory.data
3359
+ }));
3360
+ const approvedKeys = [
3361
+ ...new Set(approvedMemories.map((memory) => `${memory.app_id}-${memory.item_key}`))
3362
+ ];
3363
+ appSettingsMemoryRequests.push({
3364
+ requestId: event.requestId,
3365
+ requestedKeys: event.requestedKeys,
3366
+ approvedKeys,
3367
+ entryCount: approvedMemories.length
3368
+ });
3369
+ await ws.sendAsync("app_settings_memories_confirmed", {
3370
+ chat_id: event.chatId,
3371
+ app_settings_memories: approvedMemories
3372
+ });
3373
+ };
3214
3374
  const streamOpts = {
3215
3375
  onStream: params.onStream,
3216
- onSubChatEvent: handleSubChatEvent
3376
+ onSubChatEvent: handleSubChatEvent,
3377
+ onAppSettingsMemoriesRequest: handleAppSettingsMemoriesRequest
3217
3378
  };
3218
3379
  if (params.incognito) {
3219
3380
  try {
@@ -3291,7 +3452,8 @@ var OpenMatesClient = class _OpenMatesClient {
3291
3452
  modelName,
3292
3453
  mateName,
3293
3454
  followUpSuggestions,
3294
- subChatEvents
3455
+ subChatEvents,
3456
+ appSettingsMemoryRequests
3295
3457
  };
3296
3458
  }
3297
3459
  async persistStreamedEmbeds(params) {
@@ -3639,12 +3801,14 @@ var OpenMatesClient = class _OpenMatesClient {
3639
3801
  }
3640
3802
  return this.resolveAsyncSkillResponse(response.data, headers);
3641
3803
  }
3642
- getCodeRunStreamAuth() {
3804
+ async getCodeRunStreamAuth() {
3643
3805
  const session = this.session;
3644
3806
  if (!session) return null;
3807
+ await this.refreshWsToken();
3645
3808
  const token = session.wsToken || session.cookies.auth_refresh_token;
3646
3809
  if (!token) return null;
3647
- return { sessionId: session.sessionId, token };
3810
+ const fallbackToken = session.cookies.auth_refresh_token;
3811
+ return { sessionId: session.sessionId, token, fallbackToken };
3648
3812
  }
3649
3813
  async getCodeRunStatus(path, apiKey) {
3650
3814
  const headers = {
@@ -8453,7 +8617,8 @@ async function handleChats(client, subcommand, rest, flags, redactor) {
8453
8617
  chatId: void 0,
8454
8618
  incognito: false,
8455
8619
  json: flags.json === true,
8456
- autoApproveSubChats: flags["auto-approve"] === true
8620
+ autoApproveSubChats: flags["auto-approve"] === true,
8621
+ autoApproveMemories: flags["auto-approve-memories"] === true
8457
8622
  },
8458
8623
  redactor
8459
8624
  );
@@ -8525,7 +8690,8 @@ Run 'openmates chats show ` + chatId + "' to check if suggestions have been save
8525
8690
  chatId,
8526
8691
  incognito: flags.incognito === true,
8527
8692
  json: flags.json === true,
8528
- autoApproveSubChats: flags["auto-approve"] === true
8693
+ autoApproveSubChats: flags["auto-approve"] === true,
8694
+ autoApproveMemories: flags["auto-approve-memories"] === true
8529
8695
  },
8530
8696
  redactor
8531
8697
  );
@@ -8544,7 +8710,8 @@ Run 'openmates chats show ` + chatId + "' to check if suggestions have been save
8544
8710
  message,
8545
8711
  incognito: true,
8546
8712
  json: flags.json === true,
8547
- autoApproveSubChats: flags["auto-approve"] === true
8713
+ autoApproveSubChats: flags["auto-approve"] === true,
8714
+ autoApproveMemories: flags["auto-approve-memories"] === true
8548
8715
  },
8549
8716
  redactor
8550
8717
  );
@@ -9317,7 +9484,7 @@ async function handleCodeRun(client, flags, apiKey) {
9317
9484
  if (!result?.execution_id || !result.status_path) {
9318
9485
  throw new Error("Code Run did not return an execution id.");
9319
9486
  }
9320
- const streamAuth = apiKey ? null : client.getCodeRunStreamAuth();
9487
+ const streamAuth = apiKey ? null : await client.getCodeRunStreamAuth();
9321
9488
  let finalStatus;
9322
9489
  if (streamAuth && result.stream_path) {
9323
9490
  const url = buildCodeRunStreamUrl({
@@ -9326,7 +9493,18 @@ async function handleCodeRun(client, flags, apiKey) {
9326
9493
  sessionId: streamAuth.sessionId,
9327
9494
  token: streamAuth.token
9328
9495
  });
9329
- finalStatus = await streamCodeRunToTerminal(url, flags.json === true);
9496
+ try {
9497
+ finalStatus = await streamCodeRunToTerminal(url, flags.json === true);
9498
+ } catch (err) {
9499
+ if (!streamAuth.fallbackToken || streamAuth.fallbackToken === streamAuth.token) throw err;
9500
+ const fallbackUrl = buildCodeRunStreamUrl({
9501
+ apiUrl: client.apiUrl,
9502
+ executionId: result.execution_id,
9503
+ sessionId: streamAuth.sessionId,
9504
+ token: streamAuth.fallbackToken
9505
+ });
9506
+ finalStatus = await streamCodeRunToTerminal(fallbackUrl, flags.json === true);
9507
+ }
9330
9508
  } else {
9331
9509
  finalStatus = await pollCodeRunStatus(client, result.status_path, apiKey, flags.json === true);
9332
9510
  }
@@ -11085,6 +11263,7 @@ async function sendMessageStreaming(client, params, redactor) {
11085
11263
  onSubChatEvent,
11086
11264
  onSubChatApprovalRequest,
11087
11265
  autoApproveSubChats: params.autoApproveSubChats,
11266
+ autoApproveMemories: params.autoApproveMemories,
11088
11267
  preparedEmbeds: preparedEmbeds.length > 0 ? preparedEmbeds : void 0
11089
11268
  });
11090
11269
  clearTyping();
@@ -12346,9 +12525,9 @@ function printChatsHelp() {
12346
12525
  openmates chats show <chat-id> [--raw] [--json]
12347
12526
  openmates chats open [<n>] [--json]
12348
12527
  openmates chats search <query> [--json]
12349
- openmates chats new <message> [--json] [--auto-approve]
12350
- openmates chats send [--chat <id>] [--incognito] <message> [--json] [--auto-approve]
12351
- openmates chats send --chat <id> --followup <n> [--json] [--auto-approve]
12528
+ openmates chats new <message> [--json] [--auto-approve] [--auto-approve-memories]
12529
+ openmates chats send [--chat <id>] [--incognito] <message> [--json] [--auto-approve] [--auto-approve-memories]
12530
+ openmates chats send --chat <id> --followup <n> [--json] [--auto-approve] [--auto-approve-memories]
12352
12531
  openmates chats download <chat-id> [--output <path>] [--zip] [--json]
12353
12532
  openmates chats delete <id1> [id2] [id3] ... [--yes]
12354
12533
  openmates chats share [<chat-id>] [--expires <seconds>] [--password <pwd>] [--json]
@@ -12376,8 +12555,10 @@ Options for 'send':
12376
12555
  --incognito Send without saving to chat history
12377
12556
 
12378
12557
  Options for 'new', 'send', and 'incognito':
12379
- --auto-approve Automatically approve server-requested sub-chat batches.
12380
- Without this, the CLI prompts in the terminal like the web app.
12558
+ --auto-approve Automatically approve server-requested sub-chat batches.
12559
+ Without this, the CLI prompts in the terminal like the web app.
12560
+ --auto-approve-memories Automatically approve server-requested memory categories.
12561
+ Use only for trusted non-interactive runs.
12381
12562
 
12382
12563
  Options for 'download':
12383
12564
  --output <path> Target directory (default: current directory)
package/dist/cli.js CHANGED
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  getExtForLang,
4
4
  serializeToYaml
5
- } from "./chunk-Z7CD2LI4.js";
5
+ } from "./chunk-P4QJYRPZ.js";
6
6
  import "./chunk-AXNRPVLE.js";
7
7
  export {
8
8
  getExtForLang,
package/dist/index.d.ts CHANGED
@@ -580,6 +580,8 @@ declare class OpenMatesClient {
580
580
  onSubChatApprovalRequest?: (request: SubChatApprovalRequest) => boolean | Promise<boolean>;
581
581
  /** Explicit opt-in for automatic sub-chat approval in non-interactive runs. */
582
582
  autoApproveSubChats?: boolean;
583
+ /** Explicit opt-in to approve server-requested memory categories in non-interactive runs. */
584
+ autoApproveMemories?: boolean;
583
585
  /** Encrypted file embeds to attach to the message (code, images, PDFs). */
584
586
  encryptedEmbeds?: EncryptedEmbed[];
585
587
  /** Prepared embeds to encrypt after the real chat/message IDs are known. */
@@ -594,6 +596,13 @@ declare class OpenMatesClient {
594
596
  followUpSuggestions: string[];
595
597
  /** Sub-chat lifecycle frames observed while collecting the parent response. */
596
598
  subChatEvents: SubChatEvent[];
599
+ /** Memory permission requests observed and optionally approved while collecting the response. */
600
+ appSettingsMemoryRequests: Array<{
601
+ requestId: string | null;
602
+ requestedKeys: string[];
603
+ approvedKeys: string[];
604
+ entryCount: number;
605
+ }>;
597
606
  }>;
598
607
  private persistStreamedEmbeds;
599
608
  /**
@@ -618,10 +627,11 @@ declare class OpenMatesClient {
618
627
  inputData: Record<string, unknown>;
619
628
  apiKey?: string;
620
629
  }): Promise<unknown>;
621
- getCodeRunStreamAuth(): {
630
+ getCodeRunStreamAuth(): Promise<{
622
631
  sessionId: string;
623
632
  token: string;
624
- } | null;
633
+ fallbackToken?: string;
634
+ } | null>;
625
635
  getCodeRunStatus(path: string, apiKey?: string): Promise<Record<string, unknown>>;
626
636
  /**
627
637
  * Look up a booking URL for a flight using its booking_token.
package/dist/index.js CHANGED
@@ -7,7 +7,7 @@ import {
7
7
  getExtForLang,
8
8
  parseNewChatSuggestionText,
9
9
  serializeToYaml
10
- } from "./chunk-Z7CD2LI4.js";
10
+ } from "./chunk-P4QJYRPZ.js";
11
11
  import "./chunk-AXNRPVLE.js";
12
12
  export {
13
13
  MATE_NAMES,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openmates",
3
- "version": "0.11.0-alpha.23",
3
+ "version": "0.11.0-alpha.25",
4
4
  "description": "OpenMates CLI and SDK",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",