obol-ai 0.3.1 → 0.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 0.3.2
2
+ - update changelog
3
+ - add list_pending_events tool to dispatch and humor passes to prevent duplicates
4
+
1
5
  ## 0.3.1
2
6
  - update changelog
3
7
  - add curiosity humor pass with puns, inside jokes, and link support
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "obol-ai",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "description": "Self-evolving AI assistant that learns, remembers, and acts on its own. Persistent vector memory, self-rewriting personality, proactive heartbeats.",
5
5
  "main": "src/index.js",
6
6
  "bin": {
@@ -36,6 +36,17 @@ async function runCuriosityDispatch(client, selfMemory, users) {
36
36
  required: ['user_id'],
37
37
  },
38
38
  },
39
+ {
40
+ name: 'list_pending_events',
41
+ description: 'List already-scheduled pending events for a user — check this before scheduling to avoid duplicates',
42
+ input_schema: {
43
+ type: 'object',
44
+ properties: {
45
+ user_id: { type: 'string', description: 'The user ID to list events for' },
46
+ },
47
+ required: ['user_id'],
48
+ },
49
+ },
39
50
  {
40
51
  name: 'schedule_insight',
41
52
  description: 'Schedule a curiosity insight to be shared with a user at a future time',
@@ -112,6 +123,15 @@ async function handleTool(name, input, selfMemory, userMap) {
112
123
  return parts.length ? parts.join('\n\n') : 'No context available';
113
124
  }
114
125
 
126
+ if (name === 'list_pending_events') {
127
+ const user = userMap.get(String(input.user_id));
128
+ if (!user) return 'User not found';
129
+ if (!user.scheduler) return 'No scheduler';
130
+ const events = await user.scheduler.list({ status: 'pending', limit: 20 });
131
+ if (!events.length) return 'No pending events';
132
+ return events.map(e => `[${e.due_at}] ${e.title}${e.description ? `: ${e.description}` : ''}`).join('\n');
133
+ }
134
+
115
135
  if (name === 'schedule_insight') {
116
136
  const user = userMap.get(String(input.user_id));
117
137
  if (!user) return 'User not found';
@@ -37,6 +37,17 @@ async function runCuriosityHumor(client, selfMemory, users) {
37
37
  required: ['user_id'],
38
38
  },
39
39
  },
40
+ {
41
+ name: 'list_pending_events',
42
+ description: 'List already-scheduled pending events for a user — check this before scheduling to avoid duplicates',
43
+ input_schema: {
44
+ type: 'object',
45
+ properties: {
46
+ user_id: { type: 'string', description: 'The user ID to list events for' },
47
+ },
48
+ required: ['user_id'],
49
+ },
50
+ },
40
51
  {
41
52
  name: 'schedule_humor',
42
53
  description: 'Schedule a humorous moment to be delivered to a user at a future time',
@@ -113,6 +124,15 @@ async function handleTool(name, input, selfMemory, userMap) {
113
124
  return parts.length ? parts.join('\n\n') : 'No context available';
114
125
  }
115
126
 
127
+ if (name === 'list_pending_events') {
128
+ const user = userMap.get(String(input.user_id));
129
+ if (!user) return 'User not found';
130
+ if (!user.scheduler) return 'No scheduler';
131
+ const events = await user.scheduler.list({ status: 'pending', limit: 20 });
132
+ if (!events.length) return 'No pending events';
133
+ return events.map(e => `[${e.due_at}] ${e.title}${e.description ? `: ${e.description}` : ''}`).join('\n');
134
+ }
135
+
116
136
  if (name === 'schedule_humor') {
117
137
  const user = userMap.get(String(input.user_id));
118
138
  if (!user) return 'User not found';