forked from zelenkovsky/opencode-reminders
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.ts
More file actions
36 lines (32 loc) · 830 Bytes
/
Copy pathtypes.ts
File metadata and controls
36 lines (32 loc) · 830 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import { z } from "zod"
export const ReminderSchema = z.object({
id: z.string(),
sessionID: z.string(),
projectID: z.string(),
type: z.enum(["one-time", "recurring"]),
interval: z.number(),
originalPrompt: z.string(),
userDescription: z.string(),
agent: z.string().optional(),
time: z.object({
created: z.number(),
nextExecution: z.number(),
lastExecution: z.number().optional(),
}),
status: z.enum(["active", "paused", "cancelled"]),
})
export type Reminder = z.infer<typeof ReminderSchema>
export type State = {
reminders: Map<string, Reminder>
timers: Map<string, NodeJS.Timeout>
projectID: string
generation?: string
}
export type PluginConfig = {
enabled: boolean
max_reminders_per_project: number
min_interval_seconds: number
notifications: {
enabled: boolean
}
}