mirror of
https://github.com/qwibitai/nanoclaw.git
synced 2026-06-04 10:14:47 +08:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 39700a87aa | |||
| 90f36dc997 | |||
| 537d507e56 | |||
| c8757a5e32 |
@@ -838,7 +838,6 @@ describe('agent-shared session resolution', () => {
|
||||
const { session } = resolveSession('ag-1', null, null, 'agent-shared');
|
||||
expect(session.messaging_group_id).toBeNull();
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
describe('agent-to-agent routing', () => {
|
||||
@@ -885,7 +884,12 @@ describe('agent-to-agent routing', () => {
|
||||
const { session: paSlackSession } = resolveSession('ag-pa', 'mg-slack', null, 'shared');
|
||||
|
||||
await routeAgentMessage(
|
||||
{ id: 'out-a2a-1', platform_id: 'ag-researcher', content: JSON.stringify({ text: 'research this' }) },
|
||||
{
|
||||
id: 'out-a2a-1',
|
||||
platform_id: 'ag-researcher',
|
||||
content: JSON.stringify({ text: 'research this' }),
|
||||
in_reply_to: null,
|
||||
},
|
||||
paSlackSession,
|
||||
);
|
||||
|
||||
@@ -928,7 +932,7 @@ describe('agent-to-agent routing', () => {
|
||||
|
||||
// PA sends from Slack
|
||||
await routeAgentMessage(
|
||||
{ id: 'out-fwd', platform_id: 'ag-researcher', content: JSON.stringify({ text: 'research' }) },
|
||||
{ id: 'out-fwd', platform_id: 'ag-researcher', content: JSON.stringify({ text: 'research' }), in_reply_to: null },
|
||||
paSlackSession,
|
||||
);
|
||||
|
||||
@@ -937,7 +941,7 @@ describe('agent-to-agent routing', () => {
|
||||
const researcherSession = getSessionsByAgentGroup('ag-researcher')[0];
|
||||
|
||||
await routeAgentMessage(
|
||||
{ id: 'out-reply', platform_id: 'ag-pa', content: JSON.stringify({ text: 'found it' }) },
|
||||
{ id: 'out-reply', platform_id: 'ag-pa', content: JSON.stringify({ text: 'found it' }), in_reply_to: null },
|
||||
researcherSession,
|
||||
);
|
||||
|
||||
@@ -961,7 +965,7 @@ describe('agent-to-agent routing', () => {
|
||||
|
||||
const { session: paSession } = resolveSession('ag-pa', 'mg-slack', null, 'shared');
|
||||
await routeAgentMessage(
|
||||
{ id: 'out-1', platform_id: 'ag-researcher', content: JSON.stringify({ text: 'go' }) },
|
||||
{ id: 'out-1', platform_id: 'ag-researcher', content: JSON.stringify({ text: 'go' }), in_reply_to: null },
|
||||
paSession,
|
||||
);
|
||||
|
||||
|
||||
@@ -285,7 +285,7 @@ describe('routeAgentMessage return-path', () => {
|
||||
const inboundId = bRows[0].id;
|
||||
|
||||
// Archive S1 — simulates session cleanup or channel disconnect.
|
||||
updateSession(S1.id, { status: 'archived' });
|
||||
updateSession(S1.id, { status: 'closed' });
|
||||
|
||||
// B replies. origin points to S1 (archived), should fall through to S2.
|
||||
await routeAgentMessage(
|
||||
|
||||
Reference in New Issue
Block a user