Archived
feat: add bulk session mutations
This commit is contained in:
@@ -3,6 +3,7 @@ export type MachineStatus = "unknown" | "online" | "offline" | "error";
|
||||
|
||||
export const PI_WEB_CAPABILITIES = {
|
||||
sessionsDeleteArchived: "sessions.deleteArchived",
|
||||
sessionsBulkMutations: "sessions.bulkMutations",
|
||||
sessionsCleanup: "sessions.cleanup",
|
||||
sessionsReload: "sessions.reload",
|
||||
promptAttachments: "prompt.attachments",
|
||||
@@ -163,6 +164,34 @@ export interface ArchiveSessionsResponse {
|
||||
skippedAlreadyArchivedCount?: number;
|
||||
}
|
||||
|
||||
export interface SessionBulkMutationRef {
|
||||
id: string;
|
||||
cwd?: string;
|
||||
}
|
||||
|
||||
export interface SessionBulkMutationRequest {
|
||||
sessions: SessionBulkMutationRef[];
|
||||
}
|
||||
|
||||
export interface SessionBulkFailure {
|
||||
sessionId: string;
|
||||
error: string;
|
||||
}
|
||||
|
||||
export interface SessionBulkArchiveResponse {
|
||||
archived: true;
|
||||
archivedSessionIds: string[];
|
||||
failures: SessionBulkFailure[];
|
||||
generatedAt: string;
|
||||
}
|
||||
|
||||
export interface SessionBulkDeleteArchivedResponse {
|
||||
deleted: true;
|
||||
deletedSessionIds: string[];
|
||||
failures: SessionBulkFailure[];
|
||||
generatedAt: string;
|
||||
}
|
||||
|
||||
export interface SessionCleanupRequest {
|
||||
/** Archive non-archived sessions whose modified time is older than this many days. Omit/null to disable. */
|
||||
archiveIdleDays?: number | null;
|
||||
|
||||
Reference in New Issue
Block a user