Publish Claude Code Binaries / Stage and publish binaries (push) Canceled after 0s
Publish Tutti App Runtime / Build darwin-arm64 (push) Canceled after 0s
Publish Tutti App Runtime / Build darwin-amd64 (push) Canceled after 0s
Publish Tutti App Runtime / Build linux-amd64 (push) Canceled after 0s
Publish Tutti App Runtime / Build windows-amd64 (push) Canceled after 0s
Sync Tutti Agent Skills / sync (push) Canceled after 0s
Windows Agent Adapters / Test Windows agent adapters (push) Canceled after 0s
Windows Daemon Adapters / Test Windows daemon adapters (push) Canceled after 0s
Publish Tutti App Runtime / Publish runtime catalog (push) Canceled after 0s
41 lines
1.2 KiB
TypeScript
41 lines
1.2 KiB
TypeScript
import { describe, expect, it, vi } from "vitest";
|
|
import { inspectAgentConversationBatchDeletionCapability } from "./agentConversationBatchDeletionCapability";
|
|
|
|
describe("inspectAgentConversationBatchDeletionCapability", () => {
|
|
it("enables batch deletion only when both runtime methods exist", () => {
|
|
expect(
|
|
inspectAgentConversationBatchDeletionCapability({
|
|
deleteSessionsBatch: vi.fn(),
|
|
listSessionSectionDeletionCandidates: vi.fn()
|
|
})
|
|
).toEqual({
|
|
available: true,
|
|
missingMethods: [],
|
|
partial: false
|
|
});
|
|
});
|
|
|
|
it("fails closed when only one half of the batch deletion contract exists", () => {
|
|
expect(
|
|
inspectAgentConversationBatchDeletionCapability({
|
|
deleteSessionsBatch: vi.fn()
|
|
})
|
|
).toEqual({
|
|
available: false,
|
|
missingMethods: ["listSessionSectionDeletionCandidates"],
|
|
partial: true
|
|
});
|
|
});
|
|
|
|
it("treats hosts without the optional capability as unavailable, not partial", () => {
|
|
expect(inspectAgentConversationBatchDeletionCapability({})).toEqual({
|
|
available: false,
|
|
missingMethods: [
|
|
"deleteSessionsBatch",
|
|
"listSessionSectionDeletionCandidates"
|
|
],
|
|
partial: false
|
|
});
|
|
});
|
|
});
|