chore: bump pi deps for tau rpc
This commit is contained in:
@@ -34,8 +34,8 @@
|
|||||||
"packageManager": "pnpm@10.23.0",
|
"packageManager": "pnpm@10.23.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@grammyjs/transformer-throttler": "^1.2.1",
|
"@grammyjs/transformer-throttler": "^1.2.1",
|
||||||
"@mariozechner/pi-ai": "^0.16.0",
|
"@mariozechner/pi-ai": "^0.17.0",
|
||||||
"@mariozechner/pi-coding-agent": "^0.16.0",
|
"@mariozechner/pi-coding-agent": "^0.17.0",
|
||||||
"@sinclair/typebox": "^0.34.41",
|
"@sinclair/typebox": "^0.34.41",
|
||||||
"@whiskeysockets/baileys": "7.0.0-rc.9",
|
"@whiskeysockets/baileys": "7.0.0-rc.9",
|
||||||
"ajv": "^8.17.1",
|
"ajv": "^8.17.1",
|
||||||
|
|||||||
@@ -78,7 +78,29 @@ class TauRpcClient {
|
|||||||
|
|
||||||
// Parse the line once to track agent lifecycle signals.
|
// Parse the line once to track agent lifecycle signals.
|
||||||
try {
|
try {
|
||||||
const evt = JSON.parse(line) as { type?: string; message?: unknown };
|
const evt = JSON.parse(line) as {
|
||||||
|
type?: string;
|
||||||
|
command?: string;
|
||||||
|
success?: boolean;
|
||||||
|
error?: string;
|
||||||
|
message?: unknown;
|
||||||
|
};
|
||||||
|
|
||||||
|
if (evt.type === "response" && evt.command === "prompt") {
|
||||||
|
if (evt.success === false) {
|
||||||
|
const pending = this.pending;
|
||||||
|
this.pending = undefined;
|
||||||
|
this.buffer = [];
|
||||||
|
if (pending) {
|
||||||
|
clearTimeout(pending.timer);
|
||||||
|
pending.reject(
|
||||||
|
new Error(evt.error ?? "tau rpc prompt failed (response=false)"),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
this.child?.kill("SIGKILL");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (evt?.type === "agent_end") {
|
if (evt?.type === "agent_end") {
|
||||||
// Tau signals the end of the prompt/response cycle; resolve with all buffered output.
|
// Tau signals the end of the prompt/response cycle; resolve with all buffered output.
|
||||||
@@ -124,7 +146,8 @@ class TauRpcClient {
|
|||||||
const ok = child.stdin.write(
|
const ok = child.stdin.write(
|
||||||
`${JSON.stringify({
|
`${JSON.stringify({
|
||||||
type: "prompt",
|
type: "prompt",
|
||||||
message: { role: "user", content: [{ type: "text", text: prompt }] },
|
// RPC v0.17+ accepts raw string prompts and normalizes internally.
|
||||||
|
message: prompt,
|
||||||
})}\n`,
|
})}\n`,
|
||||||
(err) => (err ? reject(err) : resolve()),
|
(err) => (err ? reject(err) : resolve()),
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user