@truefoundry/trueforge 0.178.2 → 0.178.4
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/main.js +8 -5
- package/dist/main.js.map +1 -1
- package/package.json +3 -3
package/dist/main.js
CHANGED
|
@@ -2409,12 +2409,15 @@ async function patchMCPServers(db, input) {
|
|
|
2409
2409
|
session_id: input.session_id,
|
|
2410
2410
|
turn_id: input.turn_id
|
|
2411
2411
|
};
|
|
2412
|
-
const result = await db.updateTable("turn").set(
|
|
2413
|
-
|
|
2414
|
-
|
|
2412
|
+
const result = await db.updateTable("turn").set({
|
|
2413
|
+
checkpoint: jsonbSet(
|
|
2414
|
+
sql9`checkpoint`,
|
|
2415
|
+
sql9`'{mcp_servers}'`,
|
|
2416
|
+
sql9`(CASE WHEN jsonb_typeof(checkpoint->'mcp_servers') = 'object'
|
|
2415
2417
|
THEN checkpoint->'mcp_servers'
|
|
2416
2418
|
ELSE '{}'::jsonb END) || ${json(serversById)}`
|
|
2417
|
-
|
|
2419
|
+
)
|
|
2420
|
+
}).set({ updated_at: sql9`now()` }).where("session_id", "=", keys.session_id).where("turn_id", "=", keys.turn_id).where(sql9`state->>'status' = 'running'`).executeTakeFirst();
|
|
2418
2421
|
if (Number(result.numUpdatedRows) === 0) {
|
|
2419
2422
|
await classifyTurnFenceWriteFailure(db, keys);
|
|
2420
2423
|
}
|
|
@@ -2424,7 +2427,7 @@ async function patchSandboxInfo(db, input) {
|
|
|
2424
2427
|
session_id: input.session_id,
|
|
2425
2428
|
turn_id: input.turn_id
|
|
2426
2429
|
};
|
|
2427
|
-
const result = await db.updateTable("turn").set(sql9`checkpoint
|
|
2430
|
+
const result = await db.updateTable("turn").set({ checkpoint: jsonbSet(sql9`checkpoint`, sql9`'{sandbox_info}'`, json(input.sandbox_info)) }).set({ updated_at: sql9`now()` }).where("session_id", "=", keys.session_id).where("turn_id", "=", keys.turn_id).where(sql9`state->>'status' = 'running'`).executeTakeFirst();
|
|
2428
2431
|
if (Number(result.numUpdatedRows) === 0) {
|
|
2429
2432
|
await classifyTurnFenceWriteFailure(db, keys);
|
|
2430
2433
|
}
|