feat(scheduler,rotation,envelope,api,ui): pgqueuer jobs and deferred injects, master rotation with handout, vault envelope, jobs page
This commit is contained in:
@@ -7,10 +7,10 @@ import type {
|
||||
ConversationSummary,
|
||||
EntriesPage,
|
||||
HistoryMessage,
|
||||
JobsResponse,
|
||||
LimitsResponse,
|
||||
MemoryFile,
|
||||
MemoryTree,
|
||||
Schedule,
|
||||
SessionsResponse,
|
||||
TokenRow,
|
||||
UsageGroup,
|
||||
@@ -275,8 +275,16 @@ export class ApiClient {
|
||||
return this.get("/api/sessions");
|
||||
}
|
||||
|
||||
schedules(): Promise<{ schedules: Schedule[] }> {
|
||||
return this.get("/api/schedules");
|
||||
jobs(): Promise<JobsResponse> {
|
||||
return this.get("/api/jobs");
|
||||
}
|
||||
|
||||
runJob(name: string): Promise<{ job: number | null }> {
|
||||
return this.post(`/api/jobs/${encodeURIComponent(name)}/run`);
|
||||
}
|
||||
|
||||
cancelJob(id: number): Promise<{ cancelled: number }> {
|
||||
return this.request("DELETE", `/api/jobs/queue/${id}`);
|
||||
}
|
||||
|
||||
usage(params: {
|
||||
|
||||
+28
-6
@@ -260,13 +260,35 @@ export interface AuditPage {
|
||||
records: AuditRecord[];
|
||||
}
|
||||
|
||||
export interface Schedule {
|
||||
conversation_row: number;
|
||||
created_at: string;
|
||||
delivered_at: string | null;
|
||||
execute_at: string;
|
||||
export interface QueuedJob {
|
||||
attempts: number;
|
||||
created: string | null;
|
||||
entrypoint: string;
|
||||
execute_after: string | null;
|
||||
id: number;
|
||||
text: string;
|
||||
payload: Record<string, unknown>;
|
||||
status: string;
|
||||
}
|
||||
|
||||
export interface JobInfo {
|
||||
critical: boolean;
|
||||
cron: string | null;
|
||||
events: string[];
|
||||
last_run: string | null;
|
||||
name: string;
|
||||
next_run: string | null;
|
||||
run: { trigger: string; started_at: string; status: string } | null;
|
||||
status: string | null;
|
||||
webhook: boolean;
|
||||
}
|
||||
|
||||
export interface JobsResponse {
|
||||
enabled: boolean;
|
||||
jobs: JobInfo[];
|
||||
queue: QueuedJob[];
|
||||
threshold: number;
|
||||
throttled: boolean;
|
||||
utilization: number | null;
|
||||
}
|
||||
|
||||
export interface TurnUsage {
|
||||
|
||||
Reference in New Issue
Block a user