openmates 0.11.0-alpha.24 → 0.11.0-alpha.26
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.
- package/dist/{chunk-PT6ABNJW.js → chunk-6U4SYUEB.js} +210 -40
- package/dist/cli.js +1 -1
- package/dist/index.d.ts +9 -0
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -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()
|
|
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", "
|
|
1994
|
+
enum: ["visual", "auditory", "reading", "hands-on", "video", "interactive", "written", "discussion"]
|
|
1965
1995
|
},
|
|
1966
1996
|
preference_strength: {
|
|
1967
1997
|
type: "string",
|
|
1968
|
-
enum: ["
|
|
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", "
|
|
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: ["
|
|
2083
|
+
enum: ["ide", "terminal", "web_ui", "mixed"]
|
|
2054
2084
|
},
|
|
2055
|
-
ai_level: { type: "string", enum: ["
|
|
2085
|
+
ai_level: { type: "string", enum: ["off", "low", "medium", "high"] },
|
|
2056
2086
|
input_style: {
|
|
2057
2087
|
type: "string",
|
|
2058
|
-
enum: ["
|
|
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
|
-
"
|
|
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
|
-
"
|
|
2124
|
-
appId: "
|
|
2125
|
-
itemType: "
|
|
2188
|
+
"reminder/saved_item_reminder_defaults": {
|
|
2189
|
+
appId: "reminder",
|
|
2190
|
+
itemType: "saved_item_reminder_defaults",
|
|
2126
2191
|
entryType: "list",
|
|
2127
|
-
required: ["
|
|
2128
|
-
properties: {
|
|
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: {
|
|
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: "
|
|
2290
|
+
year: { type: "integer" },
|
|
2186
2291
|
director: { type: "string" },
|
|
2187
2292
|
rating: { type: "number" },
|
|
2188
|
-
tmdb_id: { type: "
|
|
2293
|
+
tmdb_id: { type: "integer" },
|
|
2189
2294
|
notes: { type: "string" },
|
|
2190
|
-
genre: { type: "
|
|
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: "
|
|
2201
|
-
tmdb_id: { type: "
|
|
2305
|
+
year: { type: "integer" },
|
|
2306
|
+
tmdb_id: { type: "integer" },
|
|
2202
2307
|
status: {
|
|
2203
2308
|
type: "string",
|
|
2204
|
-
enum: ["watching", "completed", "
|
|
2309
|
+
enum: ["watching", "completed", "on_hold", "dropped"]
|
|
2205
2310
|
},
|
|
2206
|
-
seasons_watched: { type: "
|
|
2311
|
+
seasons_watched: { type: "integer" },
|
|
2207
2312
|
latest_episode: { type: "string" },
|
|
2208
2313
|
rating: { type: "number" },
|
|
2209
2314
|
notes: { type: "string" },
|
|
2210
|
-
genre: { type: "
|
|
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: "
|
|
2325
|
+
year: { type: "integer" },
|
|
2221
2326
|
type: { type: "string", enum: ["movie", "tv_show"] },
|
|
2222
|
-
tmdb_id: { type: "
|
|
2327
|
+
tmdb_id: { type: "integer" },
|
|
2223
2328
|
director: { type: "string" },
|
|
2224
2329
|
priority: { type: "string", enum: ["high", "medium", "low"] },
|
|
2225
|
-
genre: { type: "
|
|
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) {
|
|
@@ -8455,7 +8617,8 @@ async function handleChats(client, subcommand, rest, flags, redactor) {
|
|
|
8455
8617
|
chatId: void 0,
|
|
8456
8618
|
incognito: false,
|
|
8457
8619
|
json: flags.json === true,
|
|
8458
|
-
autoApproveSubChats: flags["auto-approve"] === true
|
|
8620
|
+
autoApproveSubChats: flags["auto-approve"] === true,
|
|
8621
|
+
autoApproveMemories: flags["auto-approve-memories"] === true
|
|
8459
8622
|
},
|
|
8460
8623
|
redactor
|
|
8461
8624
|
);
|
|
@@ -8527,7 +8690,8 @@ Run 'openmates chats show ` + chatId + "' to check if suggestions have been save
|
|
|
8527
8690
|
chatId,
|
|
8528
8691
|
incognito: flags.incognito === true,
|
|
8529
8692
|
json: flags.json === true,
|
|
8530
|
-
autoApproveSubChats: flags["auto-approve"] === true
|
|
8693
|
+
autoApproveSubChats: flags["auto-approve"] === true,
|
|
8694
|
+
autoApproveMemories: flags["auto-approve-memories"] === true
|
|
8531
8695
|
},
|
|
8532
8696
|
redactor
|
|
8533
8697
|
);
|
|
@@ -8546,7 +8710,8 @@ Run 'openmates chats show ` + chatId + "' to check if suggestions have been save
|
|
|
8546
8710
|
message,
|
|
8547
8711
|
incognito: true,
|
|
8548
8712
|
json: flags.json === true,
|
|
8549
|
-
autoApproveSubChats: flags["auto-approve"] === true
|
|
8713
|
+
autoApproveSubChats: flags["auto-approve"] === true,
|
|
8714
|
+
autoApproveMemories: flags["auto-approve-memories"] === true
|
|
8550
8715
|
},
|
|
8551
8716
|
redactor
|
|
8552
8717
|
);
|
|
@@ -10005,7 +10170,9 @@ async function handleE2E(client, subcommand, rest, flags) {
|
|
|
10005
10170
|
}
|
|
10006
10171
|
if (flags.password !== void 0) throw new Error("Use generated passwords or OPENMATES_CLI_SIGNUP_PASSWORD, not --password.");
|
|
10007
10172
|
const slot = parseRequiredNumber(flags.slot, "--slot");
|
|
10008
|
-
if (![15, 17].includes(slot))
|
|
10173
|
+
if (![15, 16, 17, 18, 19, 20].includes(slot)) {
|
|
10174
|
+
throw new Error("Only reserved slots 15-20 are supported.");
|
|
10175
|
+
}
|
|
10009
10176
|
const artifact = typeof flags.artifact === "string" ? flags.artifact : `test-results/credential-updates/slot-${slot}.env`;
|
|
10010
10177
|
const domain = typeof flags.domain === "string" ? flags.domain : process.env.OPENMATES_CLI_E2E_EMAIL_DOMAIN;
|
|
10011
10178
|
const email = typeof flags.email === "string" ? flags.email : domain ? `cli-e2e-slot-${slot}-${Date.now()}@${domain}` : await promptLine("E2E account email: ");
|
|
@@ -11098,6 +11265,7 @@ async function sendMessageStreaming(client, params, redactor) {
|
|
|
11098
11265
|
onSubChatEvent,
|
|
11099
11266
|
onSubChatApprovalRequest,
|
|
11100
11267
|
autoApproveSubChats: params.autoApproveSubChats,
|
|
11268
|
+
autoApproveMemories: params.autoApproveMemories,
|
|
11101
11269
|
preparedEmbeds: preparedEmbeds.length > 0 ? preparedEmbeds : void 0
|
|
11102
11270
|
});
|
|
11103
11271
|
clearTyping();
|
|
@@ -12346,7 +12514,7 @@ Creates local ignored credential artifacts for reserved E2E auth accounts. The
|
|
|
12346
12514
|
command refuses production API URLs and does not upload GitHub secrets.
|
|
12347
12515
|
|
|
12348
12516
|
Options:
|
|
12349
|
-
--slot <15
|
|
12517
|
+
--slot <15-20> Reserved auth-account slot
|
|
12350
12518
|
--artifact <path> Output .env artifact path
|
|
12351
12519
|
--email <email> Test email; prompted/generated when omitted
|
|
12352
12520
|
--domain <mail-domain> Generate email at this domain
|
|
@@ -12359,9 +12527,9 @@ function printChatsHelp() {
|
|
|
12359
12527
|
openmates chats show <chat-id> [--raw] [--json]
|
|
12360
12528
|
openmates chats open [<n>] [--json]
|
|
12361
12529
|
openmates chats search <query> [--json]
|
|
12362
|
-
openmates chats new <message> [--json] [--auto-approve]
|
|
12363
|
-
openmates chats send [--chat <id>] [--incognito] <message> [--json] [--auto-approve]
|
|
12364
|
-
openmates chats send --chat <id> --followup <n> [--json] [--auto-approve]
|
|
12530
|
+
openmates chats new <message> [--json] [--auto-approve] [--auto-approve-memories]
|
|
12531
|
+
openmates chats send [--chat <id>] [--incognito] <message> [--json] [--auto-approve] [--auto-approve-memories]
|
|
12532
|
+
openmates chats send --chat <id> --followup <n> [--json] [--auto-approve] [--auto-approve-memories]
|
|
12365
12533
|
openmates chats download <chat-id> [--output <path>] [--zip] [--json]
|
|
12366
12534
|
openmates chats delete <id1> [id2] [id3] ... [--yes]
|
|
12367
12535
|
openmates chats share [<chat-id>] [--expires <seconds>] [--password <pwd>] [--json]
|
|
@@ -12389,8 +12557,10 @@ Options for 'send':
|
|
|
12389
12557
|
--incognito Send without saving to chat history
|
|
12390
12558
|
|
|
12391
12559
|
Options for 'new', 'send', and 'incognito':
|
|
12392
|
-
--auto-approve
|
|
12393
|
-
|
|
12560
|
+
--auto-approve Automatically approve server-requested sub-chat batches.
|
|
12561
|
+
Without this, the CLI prompts in the terminal like the web app.
|
|
12562
|
+
--auto-approve-memories Automatically approve server-requested memory categories.
|
|
12563
|
+
Use only for trusted non-interactive runs.
|
|
12394
12564
|
|
|
12395
12565
|
Options for 'download':
|
|
12396
12566
|
--output <path> Target directory (default: current directory)
|
package/dist/cli.js
CHANGED
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
|
/**
|
package/dist/index.js
CHANGED