mirror of
https://github.com/harivansh-afk/sandbox-agent.git
synced 2026-04-17 06:04:56 +00:00
Integrate OpenHandoff factory workspace (#212)
This commit is contained in:
parent
3d9476ed0b
commit
bf282199b5
251 changed files with 42824 additions and 692 deletions
45
factory/packages/backend/tmp-inspect-stuck.mjs
Normal file
45
factory/packages/backend/tmp-inspect-stuck.mjs
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
import { Database } from "bun:sqlite";
|
||||
|
||||
const actorIds = [
|
||||
"2e443238457137bf", // 7df...
|
||||
"2b3fe1c099327eed", // 706...
|
||||
"331b7f2a0cd19973", // 70c...
|
||||
"329a70fc689f56ca", // 1f14...
|
||||
"0e53dd77ef06862f", // 0e01...
|
||||
"ea8c0e764c836e5f", // cdc error
|
||||
];
|
||||
|
||||
function decodeAscii(u8) {
|
||||
return new TextDecoder().decode(u8).replace(/[\x00-\x1F\x7F-\xFF]/g, ".");
|
||||
}
|
||||
|
||||
for (const actorId of actorIds) {
|
||||
const dbPath = `/root/.local/share/openhandoff/rivetkit/databases/${actorId}.db`;
|
||||
const db = new Database(dbPath, { readonly: true });
|
||||
|
||||
const wfStateRow = db.query("SELECT value FROM kv WHERE hex(key)=?").get("0715041501");
|
||||
const wfState = wfStateRow?.value ? decodeAscii(new Uint8Array(wfStateRow.value)) : null;
|
||||
|
||||
const names = db
|
||||
.query("SELECT value FROM kv WHERE hex(key) LIKE ? ORDER BY key")
|
||||
.all("07150115%")
|
||||
.map((r) => decodeAscii(new Uint8Array(r.value)));
|
||||
|
||||
const queueRows = db
|
||||
.query("SELECT hex(key) as k, value FROM kv WHERE hex(key) LIKE ? ORDER BY key")
|
||||
.all("05%")
|
||||
.map((r) => ({
|
||||
key: r.k,
|
||||
preview: decodeAscii(new Uint8Array(r.value)).slice(0, 220),
|
||||
}));
|
||||
|
||||
const hasCreateSandboxStepName = names.includes("init-create-sandbox") || names.includes("init_create_sandbox");
|
||||
|
||||
console.log(JSON.stringify({
|
||||
actorId,
|
||||
wfState,
|
||||
hasCreateSandboxStepName,
|
||||
names,
|
||||
queue: queueRows,
|
||||
}, null, 2));
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue