Compare commits
5 Commits
main
...
fix/elevat
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
faf046b426 | ||
|
|
71cda84bc9 | ||
|
|
a405619f56 | ||
|
|
7113b69534 | ||
|
|
77e03a2a90 |
@ -30,6 +30,7 @@
|
|||||||
- Sessions: prevent `sessions_send` timeouts by running nested agent turns on a separate lane.
|
- Sessions: prevent `sessions_send` timeouts by running nested agent turns on a separate lane.
|
||||||
- Sessions: use per-send run IDs for gateway agent calls to avoid wait collisions.
|
- Sessions: use per-send run IDs for gateway agent calls to avoid wait collisions.
|
||||||
- Auto-reply: drop final payloads when block streaming to avoid duplicate Discord sends.
|
- Auto-reply: drop final payloads when block streaming to avoid duplicate Discord sends.
|
||||||
|
- Auto-reply: default elevated to off when not allowed (#183) — thanks @cash-echo-bot.
|
||||||
- Auto-reply: fix typing TTL to 2 minutes and log TTL with s/m units.
|
- Auto-reply: fix typing TTL to 2 minutes and log TTL with s/m units.
|
||||||
- Bash tool: default auto-background delay to 10s.
|
- Bash tool: default auto-background delay to 10s.
|
||||||
- Telegram: chunk block-stream replies to avoid “message is too long” errors (#124) — thanks @mukhtharcm.
|
- Telegram: chunk block-stream replies to avoid “message is too long” errors (#124) — thanks @mukhtharcm.
|
||||||
|
|||||||
2
Peekaboo
2
Peekaboo
@ -1 +1 @@
|
|||||||
Subproject commit b69e4e8dc0f34fca488e034c6cb1373f1259589d
|
Subproject commit 5c8eedd6426aff53041248a3556adeac4e2b714c
|
||||||
@ -828,4 +828,49 @@ describe("directive parsing", () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
it("defaults elevated to off when sender is not approved", async () => {
|
||||||
|
await withTempHome(async (home) => {
|
||||||
|
const storePath = path.join(home, "sessions.json");
|
||||||
|
vi.mocked(runEmbeddedPiAgent).mockResolvedValue({
|
||||||
|
payloads: [{ text: "done" }],
|
||||||
|
meta: {
|
||||||
|
durationMs: 5,
|
||||||
|
agentMeta: { sessionId: "s", provider: "p", model: "m" },
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
await getReplyFromConfig(
|
||||||
|
{
|
||||||
|
Body: "hello",
|
||||||
|
From: "+1004",
|
||||||
|
To: "+2000",
|
||||||
|
Surface: "whatsapp",
|
||||||
|
SenderE164: "+1004",
|
||||||
|
},
|
||||||
|
{},
|
||||||
|
{
|
||||||
|
agent: {
|
||||||
|
model: "anthropic/claude-opus-4-5",
|
||||||
|
workspace: path.join(home, "clawd"),
|
||||||
|
elevatedDefault: "on",
|
||||||
|
elevated: {
|
||||||
|
allowFrom: { whatsapp: ["+1999"] },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
whatsapp: {
|
||||||
|
allowFrom: ["*"],
|
||||||
|
},
|
||||||
|
session: { store: storePath },
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
|
expect(runEmbeddedPiAgent).toHaveBeenCalledOnce();
|
||||||
|
const call = vi.mocked(runEmbeddedPiAgent).mock.calls[0]?.[0];
|
||||||
|
expect(call?.bashElevated).toEqual({
|
||||||
|
enabled: true,
|
||||||
|
allowed: false,
|
||||||
|
defaultLevel: "off",
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@ -305,7 +305,7 @@ export async function getReplyFromConfig(
|
|||||||
(sessionEntry?.elevatedLevel as ElevatedLevel | undefined) ??
|
(sessionEntry?.elevatedLevel as ElevatedLevel | undefined) ??
|
||||||
(agentCfg?.elevatedDefault as ElevatedLevel | undefined) ??
|
(agentCfg?.elevatedDefault as ElevatedLevel | undefined) ??
|
||||||
"on")
|
"on")
|
||||||
: "on";
|
: "off";
|
||||||
const resolvedBlockStreaming =
|
const resolvedBlockStreaming =
|
||||||
agentCfg?.blockStreamingDefault === "off" ? "off" : "on";
|
agentCfg?.blockStreamingDefault === "off" ? "off" : "on";
|
||||||
const resolvedBlockStreamingBreak: "text_end" | "message_end" =
|
const resolvedBlockStreamingBreak: "text_end" | "message_end" =
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user