mirror of
https://github.com/harivansh-afk/sandbox-agent.git
synced 2026-04-17 04:02:25 +00:00
Stabilize SDK mode integration test
This commit is contained in:
parent
24e99ac5e7
commit
ec8b6afea9
274 changed files with 5412 additions and 7893 deletions
|
|
@ -1,10 +1,5 @@
|
|||
import { Database } from "bun:sqlite";
|
||||
import {
|
||||
TO_CLIENT_VERSIONED,
|
||||
TO_SERVER_VERSIONED,
|
||||
CURRENT_VERSION,
|
||||
decodeWorkflowHistoryTransport,
|
||||
} from "rivetkit/inspector";
|
||||
import { TO_CLIENT_VERSIONED, TO_SERVER_VERSIONED, CURRENT_VERSION, decodeWorkflowHistoryTransport } from "rivetkit/inspector";
|
||||
import { decodeReadRangeWire } from "/rivet-handoff-fixes/rivetkit-typescript/packages/traces/src/encoding.ts";
|
||||
import { readRangeWireToOtlp } from "/rivet-handoff-fixes/rivetkit-typescript/packages/traces/src/read-range.ts";
|
||||
|
||||
|
|
@ -46,13 +41,30 @@ ws.onmessage = (ev) => {
|
|||
|
||||
if (msg.body.tag === "QueueResponse") {
|
||||
const status = msg.body.val.status;
|
||||
console.log(JSON.stringify({ tag: "QueueResponse", size: Number(status.size), truncated: status.truncated, messages: status.messages.map((m) => ({ id: Number(m.id), name: m.name, createdAtMs: Number(m.createdAtMs) })) }, null, 2));
|
||||
console.log(
|
||||
JSON.stringify(
|
||||
{
|
||||
tag: "QueueResponse",
|
||||
size: Number(status.size),
|
||||
truncated: status.truncated,
|
||||
messages: status.messages.map((m) => ({ id: Number(m.id), name: m.name, createdAtMs: Number(m.createdAtMs) })),
|
||||
},
|
||||
null,
|
||||
2,
|
||||
),
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
if (msg.body.tag === "WorkflowHistoryResponse") {
|
||||
const wh = decodeWorkflowHistoryTransport(msg.body.val.history);
|
||||
console.log(JSON.stringify({ tag: "WorkflowHistoryResponse", isWorkflowEnabled: msg.body.val.isWorkflowEnabled, entryCount: wh.entries.length, names: wh.nameRegistry }, null, 2));
|
||||
console.log(
|
||||
JSON.stringify(
|
||||
{ tag: "WorkflowHistoryResponse", isWorkflowEnabled: msg.body.val.isWorkflowEnabled, entryCount: wh.entries.length, names: wh.nameRegistry },
|
||||
null,
|
||||
2,
|
||||
),
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue