@askexenow/exe-os 0.8.24 → 0.8.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.
|
@@ -2190,7 +2190,7 @@ async function backfillConversations(options) {
|
|
|
2190
2190
|
const { loadEmployees: loadEmployees2 } = await Promise.resolve().then(() => (init_employees(), employees_exports));
|
|
2191
2191
|
const employees = await loadEmployees2();
|
|
2192
2192
|
const coo = employees.find((e) => e.role === "COO");
|
|
2193
|
-
if (coo) cooAgentId = coo.name;
|
|
2193
|
+
if (coo) cooAgentId = coo.name.toLowerCase();
|
|
2194
2194
|
} catch {
|
|
2195
2195
|
}
|
|
2196
2196
|
process.stderr.write(`[backfill-conversations] Scanning last ${options.days} days (agent: ${cooAgentId})...
|
|
@@ -2201,16 +2201,16 @@ async function backfillConversations(options) {
|
|
|
2201
2201
|
try {
|
|
2202
2202
|
const client = getClient();
|
|
2203
2203
|
const old = await client.execute({
|
|
2204
|
-
sql: "SELECT COUNT(*) as cnt FROM memories WHERE agent_id = 'backfill'",
|
|
2205
|
-
args: []
|
|
2204
|
+
sql: "SELECT COUNT(*) as cnt FROM memories WHERE agent_id = 'backfill' OR (tool_name = 'ConversationBackfill' AND agent_id != ?)",
|
|
2205
|
+
args: [cooAgentId]
|
|
2206
2206
|
});
|
|
2207
2207
|
const count = Number(old.rows[0]?.cnt ?? 0);
|
|
2208
2208
|
if (count > 0) {
|
|
2209
2209
|
await client.execute({
|
|
2210
|
-
sql: "UPDATE memories SET agent_id = ?, agent_role = 'coo' WHERE agent_id = 'backfill'",
|
|
2211
|
-
args: [cooAgentId]
|
|
2210
|
+
sql: "UPDATE memories SET agent_id = ?, agent_role = 'coo' WHERE agent_id = 'backfill' OR (tool_name = 'ConversationBackfill' AND agent_id != ?)",
|
|
2211
|
+
args: [cooAgentId, cooAgentId]
|
|
2212
2212
|
});
|
|
2213
|
-
process.stderr.write(`[backfill-conversations] Migrated ${count}
|
|
2213
|
+
process.stderr.write(`[backfill-conversations] Migrated ${count} records \u2192 agent_id='${cooAgentId}'
|
|
2214
2214
|
`);
|
|
2215
2215
|
}
|
|
2216
2216
|
} catch {
|
package/dist/bin/cli.js
CHANGED
|
@@ -3167,7 +3167,7 @@ async function backfillConversations(options) {
|
|
|
3167
3167
|
const { loadEmployees: loadEmployees2 } = await Promise.resolve().then(() => (init_employees(), employees_exports));
|
|
3168
3168
|
const employees = await loadEmployees2();
|
|
3169
3169
|
const coo = employees.find((e) => e.role === "COO");
|
|
3170
|
-
if (coo) cooAgentId = coo.name;
|
|
3170
|
+
if (coo) cooAgentId = coo.name.toLowerCase();
|
|
3171
3171
|
} catch {
|
|
3172
3172
|
}
|
|
3173
3173
|
process.stderr.write(`[backfill-conversations] Scanning last ${options.days} days (agent: ${cooAgentId})...
|
|
@@ -3178,16 +3178,16 @@ async function backfillConversations(options) {
|
|
|
3178
3178
|
try {
|
|
3179
3179
|
const client = getClient();
|
|
3180
3180
|
const old = await client.execute({
|
|
3181
|
-
sql: "SELECT COUNT(*) as cnt FROM memories WHERE agent_id = 'backfill'",
|
|
3182
|
-
args: []
|
|
3181
|
+
sql: "SELECT COUNT(*) as cnt FROM memories WHERE agent_id = 'backfill' OR (tool_name = 'ConversationBackfill' AND agent_id != ?)",
|
|
3182
|
+
args: [cooAgentId]
|
|
3183
3183
|
});
|
|
3184
3184
|
const count = Number(old.rows[0]?.cnt ?? 0);
|
|
3185
3185
|
if (count > 0) {
|
|
3186
3186
|
await client.execute({
|
|
3187
|
-
sql: "UPDATE memories SET agent_id = ?, agent_role = 'coo' WHERE agent_id = 'backfill'",
|
|
3188
|
-
args: [cooAgentId]
|
|
3187
|
+
sql: "UPDATE memories SET agent_id = ?, agent_role = 'coo' WHERE agent_id = 'backfill' OR (tool_name = 'ConversationBackfill' AND agent_id != ?)",
|
|
3188
|
+
args: [cooAgentId, cooAgentId]
|
|
3189
3189
|
});
|
|
3190
|
-
process.stderr.write(`[backfill-conversations] Migrated ${count}
|
|
3190
|
+
process.stderr.write(`[backfill-conversations] Migrated ${count} records \u2192 agent_id='${cooAgentId}'
|
|
3191
3191
|
`);
|
|
3192
3192
|
}
|
|
3193
3193
|
} catch {
|
package/package.json
CHANGED