Add attention inbox and AI usage observability
This commit is contained in:
1 parent
ca59ba0f1f
commit
83b5f1f5b6
30 files changed
+702
-28
No files matched your search
@@ -0,0 +1,31 @@
|
||||
import { z } from 'zod';
|
||||
import { RedditAccountOwnerSchema } from './session.js';
|
||||
|
||||
export const AttentionKindSchema = z.enum([
|
||||
'human-required',
|
||||
'boundary',
|
||||
'failed-delivery',
|
||||
'account-login-required',
|
||||
'runtime-failed',
|
||||
'invitation-cooldown',
|
||||
]);
|
||||
|
||||
export const AttentionItemSchema = z.strictObject({
|
||||
id: z.string(),
|
||||
kind: AttentionKindSchema,
|
||||
severity: z.enum(['warning', 'critical']),
|
||||
title: z.string(),
|
||||
detail: z.string(),
|
||||
occurredAt: z.number(),
|
||||
owner: RedditAccountOwnerSchema.optional(),
|
||||
conversationId: z.string().optional(),
|
||||
username: z.string().optional(),
|
||||
});
|
||||
|
||||
export const AttentionResponseSchema = z.strictObject({
|
||||
generatedAt: z.number(),
|
||||
items: z.array(AttentionItemSchema),
|
||||
});
|
||||
|
||||
export type AttentionItem = z.infer<typeof AttentionItemSchema>;
|
||||
export type AttentionResponse = z.infer<typeof AttentionResponseSchema>;
|
||||
Reference in new issue
Block a user