Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
f38d64d
Add @beeper/pickle-pi package and HTTP proxy hooks
batuhan May 8, 2026
429f210
Add media store and subagent/fork support
batuhan May 8, 2026
bbf6896
Init appservice in bridge and extend approvals
batuhan May 8, 2026
74d0d55
Add appservice support to bridge and pickle
batuhan May 8, 2026
bbf97cc
wip
batuhan May 8, 2026
ad6a78c
Add initialState support and appservice override
batuhan May 8, 2026
fcba61b
Update beeper.ts
batuhan May 8, 2026
37e1feb
Publish beeper parts in parallel
batuhan May 8, 2026
a99fed1
Handle tool streaming & message metadata
batuhan May 8, 2026
f5af38c
Use open/close helpers for stream parts
batuhan May 8, 2026
3236ecf
wip
batuhan May 8, 2026
82b3c27
Emit session titles and refine event notices
batuhan May 8, 2026
49bf76f
Handle appservice transactions & add beeper flag
batuhan May 8, 2026
0224f67
wip
batuhan May 8, 2026
b6c32ec
Compact oversized Matrix event content
batuhan May 11, 2026
2413365
Improve appservice & Pi robustness
batuhan May 11, 2026
29b91ee
Remove redundant Pi and bridge wrappers
batuhan May 11, 2026
f1c5947
Update commit message generation
batuhan May 11, 2026
fc75bd6
Lazy-load Matrix client factory in Pi appservice
batuhan May 11, 2026
0ae2162
Refactor shared Beeper stream finalization and compaction
batuhan May 11, 2026
5919878
Export new submodules and update tsdown entries
batuhan May 11, 2026
fdbfdfe
Add bridge logging and beeper stream handling
batuhan May 11, 2026
8e542b3
fixes
batuhan May 16, 2026
db12e1a
Merge remote-tracking branch 'origin/main' into batuhan/pi
batuhan May 16, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 7 additions & 16 deletions packages/pi/src/appservice.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,19 +58,18 @@ describe("PicklePiAgent streaming", () => {
type: "m.room.message",
});

expect(client.beeper.streams.create).toHaveBeenCalledTimes(1);
expect(client.beeper.streams.register).toHaveBeenCalledTimes(1);
expect(client.beeper.streams.publish.mock.calls.map(([options]) => delta(options).part.type)).toEqual([
expect(client.beeper.streams.startMessage).toHaveBeenCalledTimes(1);
expect(client.beeper.streams.publishPart.mock.calls.map(([options]) => options.part.type)).toEqual([
"start",
"text-start",
"text-delta",
"text-end",
"finish",
]);
expect(client.messages.edit).toHaveBeenCalledWith(expect.objectContaining({
expect(client.beeper.streams.finalizeMessage).toHaveBeenCalledWith(expect.objectContaining({
eventId: "$target",
roomId: "!room:example",
text: "hello",
body: "hello",
}));
});
});
Expand Down Expand Up @@ -107,9 +106,9 @@ function createClient() {
const client = {
beeper: {
streams: {
create: vi.fn(async () => ({ descriptor: { device_id: "DEVICE", type: "com.beeper.llm", user_id: "@bot:example" } })),
publish: vi.fn(async () => undefined),
register: vi.fn(async () => undefined),
finalizeMessage: vi.fn(async () => ({ eventId: "$target", raw: {}, replacementEventId: "$edit", roomId: "!room:example" })),
publishPart: vi.fn(async () => undefined),
startMessage: vi.fn(async () => ({ descriptor: { device_id: "DEVICE", type: "com.beeper.llm", user_id: "@bot:example" }, eventId: "$target", roomId: "!room:example" })),
},
},
close: vi.fn(async () => undefined),
Expand All @@ -124,11 +123,3 @@ function createClient() {
};
return client as unknown as MatrixClient & typeof client;
}

function delta(options: { content?: Record<string, unknown> }): Record<string, unknown> {
const deltas = options.content?.["com.beeper.llm.deltas"];
if (!Array.isArray(deltas)) throw new Error("missing com.beeper.llm.deltas");
const [first] = deltas;
if (!first || typeof first !== "object") throw new Error("missing stream delta");
return first as Record<string, unknown>;
}
Loading
Loading