a tool to help your Letta AI agents navigate bluesky
1import type { AppBskyNotificationListNotifications } from "@atproto/api";
2import {
3 allAgentTools,
4 configAgentTools,
5 requiredAgentTools,
6 validAutomationLevels,
7 validNotifTypes,
8} from "./const.ts";
9import type {
10 AutomationLevel,
11 AutonomyDeclaration,
12 ResponsibleParty,
13 ResponsiblePartyType,
14} from "@voyager/autonomy-lexicon";
15
16export type Notification = AppBskyNotificationListNotifications.Notification;
17
18// Re-export types from autonomy-lexicon package
19export type {
20 AutomationLevel,
21 AutonomyDeclaration,
22 ResponsibleParty,
23 ResponsiblePartyType,
24};
25
26export type notifType = typeof validNotifTypes[number];
27
28export type configAgentTool = typeof configAgentTools[number];
29export type requiredAgentTool = typeof requiredAgentTools[number];
30export type allAgentTool = typeof allAgentTools[number];
31
32export type agentContextObject = {
33 // state
34 busy: boolean;
35 sleeping: boolean;
36 checkCount: number;
37 reflectionCount: number;
38 processingCount: number;
39 proactiveCount: number;
40 likeCount: number;
41 repostCount: number;
42 followCount: number;
43 mentionCount: number;
44 replyCount: number;
45 quoteCount: number;
46 notifCount: number;
47 // required manual variables
48 lettaProjectIdentifier: string;
49 agentBskyHandle: string;
50 agentBskyName: string;
51 responsiblePartyName: string; // what person or org is responsible for this bot?
52 responsiblePartyContact: string; // email or url for people to contact about bot
53 // required variables with fallbacks
54 agentBskyServiceUrl: string;
55 automationLevel: AutomationLevel;
56 supportedNotifTypes: notifType[];
57 supportedTools: allAgentTool[];
58 notifDelayMinimum: number;
59 notifDelayMaximum: number;
60 notifDelayMultiplier: number;
61 reflectionDelayMinimum: number;
62 reflectionDelayMaximum: number;
63 proactiveDelayMinimum: number;
64 proactiveDelayMaximum: number;
65 wakeTime: number;
66 sleepTime: number;
67 timeZone: string;
68 responsiblePartyType: string; // person / organization
69 preserveAgentMemory: boolean; // if true, mount won't update existing memory blocks
70 maxThreadPosts: number; // maximum number of posts to include in thread context
71 // set automatically
72 agentBskyDID: string;
73 reflectionEnabled: boolean;
74 proactiveEnabled: boolean;
75 sleepEnabled: boolean;
76 notifDelayCurrent: number;
77 // optional
78 automationDescription?: string; // short description of what this agent does
79 disclosureUrl?: string; // url to a ToS/Privacy Policy style page
80 responsiblePartyBsky?: string; // handle w/o @ or DID of responsible party
81 externalServices?: string[]; // external tools/services this agent relies on
82};
83
84export type memoryBlock = {
85 label: string;
86 description: string;
87 readOnly: boolean;
88 limit: number;
89 value: string;
90};