chore: apply lint fixes

This commit is contained in:
Peter Steinberger
2026-01-04 00:06:02 +01:00
parent e7c9b9a749
commit 86038ec165
9 changed files with 53 additions and 38 deletions

View File

@@ -13,7 +13,11 @@ describe("resolveSendPolicy", () => {
const cfg = {
session: { sendPolicy: { default: "allow" } },
} as ClawdisConfig;
const entry: SessionEntry = { sessionId: "s", updatedAt: 0, sendPolicy: "deny" };
const entry: SessionEntry = {
sessionId: "s",
updatedAt: 0,
sendPolicy: "deny",
};
expect(resolveSendPolicy({ cfg, entry })).toBe("deny");
});
@@ -23,7 +27,10 @@ describe("resolveSendPolicy", () => {
sendPolicy: {
default: "allow",
rules: [
{ action: "deny", match: { surface: "discord", chatType: "group" } },
{
action: "deny",
match: { surface: "discord", chatType: "group" },
},
],
},
},
@@ -34,9 +41,9 @@ describe("resolveSendPolicy", () => {
surface: "discord",
chatType: "group",
};
expect(resolveSendPolicy({ cfg, entry, sessionKey: "discord:group:dev" })).toBe(
"deny",
);
expect(
resolveSendPolicy({ cfg, entry, sessionKey: "discord:group:dev" }),
).toBe("deny");
});
it("rule match by keyPrefix", () => {

View File

@@ -1,5 +1,5 @@
import type { ClawdisConfig } from "../config/config.js";
import type { SessionEntry, SessionChatType } from "../config/sessions.js";
import type { SessionChatType, SessionEntry } from "../config/sessions.js";
export type SessionSendPolicyDecision = "allow" | "deny";