mirror of
https://github.com/hansjone/oclaw.git
synced 2026-10-16 17:50:45 +08:00
同时收敛启动与运维脚本默认行为(含 wiki worker)、更新 Admin 可观测性与相关测试,降低首轮时延并提高运行稳定性。 Made-with: Cursor
32 lines
1 KiB
TypeScript
32 lines
1 KiB
TypeScript
import { it } from "vitest";
|
|
import { finalizeInboundContext } from "../../../src/auto-reply/reply/inbound-context.js";
|
|
import { expectChannelInboundContextContract } from "../../../src/channels/plugins/contracts/test-helpers.js";
|
|
|
|
export function installSignalInboundContractSuite() {
|
|
it("keeps inbound context finalized", () => {
|
|
const ctx = finalizeInboundContext({
|
|
Body: "Alice: hi",
|
|
BodyForAgent: "hi",
|
|
RawBody: "hi",
|
|
CommandBody: "hi",
|
|
BodyForCommands: "hi",
|
|
From: "group:g1",
|
|
To: "group:g1",
|
|
SessionKey: "agent:main:signal:group:g1",
|
|
AccountId: "default",
|
|
ChatType: "group",
|
|
ConversationLabel: "Alice",
|
|
GroupSubject: "Test Group",
|
|
SenderName: "Alice",
|
|
SenderId: "+15550001111",
|
|
Provider: "signal",
|
|
Surface: "signal",
|
|
MessageSid: "1700000000000",
|
|
OriginatingChannel: "signal",
|
|
OriginatingTo: "group:g1",
|
|
CommandAuthorized: true,
|
|
});
|
|
|
|
expectChannelInboundContextContract(ctx);
|
|
});
|
|
}
|