volute 0.3.1 → 0.5.0

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.
Files changed (82) hide show
  1. package/README.md +29 -29
  2. package/dist/agent-Z2B6EFEQ.js +75 -0
  3. package/dist/{agent-manager-AUCKMGPR.js → agent-manager-PXBKA2GK.js} +4 -4
  4. package/dist/channel-MK5OK2SI.js +113 -0
  5. package/dist/chunk-5X7HGB6L.js +107 -0
  6. package/dist/{chunk-YGFIWIOF.js → chunk-7L4AN5D4.js} +1 -1
  7. package/dist/{chunk-VRVVQIYY.js → chunk-AZEL2IEK.js} +1 -1
  8. package/dist/chunk-B3R6L2GW.js +24 -0
  9. package/dist/{chunk-DNOXHLE5.js → chunk-HE67X4T6.js} +1 -1
  10. package/dist/{chunk-I6OHXCMV.js → chunk-MW2KFO3B.js} +47 -9
  11. package/dist/chunk-MXUCNIBG.js +168 -0
  12. package/dist/chunk-SMISE4SV.js +226 -0
  13. package/dist/{chunk-SOZA2TLP.js → chunk-UAVD2AHX.js} +1 -1
  14. package/dist/{chunk-3C2XR4IY.js → chunk-UX25Z2ND.js} +113 -107
  15. package/dist/{chunk-GSPKUPKU.js → chunk-XUA3JUFK.js} +2 -1
  16. package/dist/chunk-ZYGKG6VC.js +22 -0
  17. package/dist/cli.js +98 -75
  18. package/dist/connector-LYEMXQEV.js +157 -0
  19. package/dist/connectors/discord.js +104 -161
  20. package/dist/connectors/slack.js +179 -0
  21. package/dist/connectors/telegram.js +175 -0
  22. package/dist/conversation-ERXEQZTY.js +163 -0
  23. package/dist/create-RVCZN6HE.js +91 -0
  24. package/dist/{daemon-client-XR24PUJF.js → daemon-client-ZY6UUN2M.js} +2 -2
  25. package/dist/daemon.js +824 -252
  26. package/dist/{delete-GQ7JEK2S.js → delete-3QH7VYIN.js} +8 -9
  27. package/dist/{down-3OB6UVAJ.js → down-O7IFZLVJ.js} +1 -1
  28. package/dist/{env-JB27UAC3.js → env-4D4REPJF.js} +8 -5
  29. package/dist/{history-3VRUBGGV.js → history-OEONB53Z.js} +5 -5
  30. package/dist/{import-K4MP2GX7.js → import-MXJB2EII.js} +23 -8
  31. package/dist/{logs-NXFFGUKY.js → logs-DF342W4M.js} +2 -2
  32. package/dist/message-ADHWFHSI.js +32 -0
  33. package/dist/package-VQOE7JNH.js +89 -0
  34. package/dist/{schedule-4I5TYHFH.js → schedule-NAG6F463.js} +12 -7
  35. package/dist/send-66QMKRUH.js +75 -0
  36. package/dist/{setup-SRS7AUAA.js → setup-RPRRGG2F.js} +6 -6
  37. package/dist/{start-LDPMCMYT.js → start-TUOXDSFL.js} +3 -3
  38. package/dist/{status-MVSQG54T.js → status-A36EHRO4.js} +3 -3
  39. package/dist/{stop-5PZTZCLL.js → stop-AOJZLQ5X.js} +6 -7
  40. package/dist/{up-UT3IMKCA.js → up-7ILD7GU7.js} +2 -2
  41. package/dist/update-LPSIAWQ2.js +140 -0
  42. package/dist/update-check-Y33QDCFL.js +17 -0
  43. package/dist/{upgrade-CDKECCGN.js → upgrade-FX2TKJ2S.js} +16 -15
  44. package/dist/{variant-CVYM3EQG.js → variant-LAB67OC2.js} +17 -12
  45. package/dist/web-assets/assets/index-BbRmoxoA.js +308 -0
  46. package/dist/web-assets/index.html +2 -2
  47. package/drizzle/0003_clean_ego.sql +12 -0
  48. package/drizzle/meta/0003_snapshot.json +417 -0
  49. package/drizzle/meta/_journal.json +7 -0
  50. package/package.json +3 -1
  51. package/templates/_base/.init/.config/hooks/startup-context.sh +19 -1
  52. package/templates/_base/_skills/volute-agent/SKILL.md +112 -16
  53. package/templates/_base/home/.config/routes.json +10 -0
  54. package/templates/_base/home/VOLUTE.md +19 -28
  55. package/templates/_base/src/lib/file-handler.ts +46 -0
  56. package/templates/_base/src/lib/format-prefix.ts +1 -1
  57. package/templates/_base/src/lib/router.ts +327 -0
  58. package/templates/_base/src/lib/routing.ts +137 -0
  59. package/templates/_base/src/lib/types.ts +16 -3
  60. package/templates/_base/src/lib/volute-server.ts +20 -48
  61. package/templates/agent-sdk/.init/.config/routes.json +5 -0
  62. package/templates/agent-sdk/.init/CLAUDE.md +2 -2
  63. package/templates/agent-sdk/src/agent.ts +269 -82
  64. package/templates/agent-sdk/src/server.ts +19 -4
  65. package/templates/agent-sdk/volute-template.json +1 -1
  66. package/templates/pi/.init/.config/routes.json +5 -0
  67. package/templates/pi/.init/AGENTS.md +1 -1
  68. package/templates/pi/src/agent.ts +279 -58
  69. package/templates/pi/src/server.ts +15 -4
  70. package/templates/pi/volute-template.json +1 -1
  71. package/dist/channel-7FZ6D25H.js +0 -90
  72. package/dist/chunk-N4YNKR3Q.js +0 -90
  73. package/dist/connector-TVJULIRT.js +0 -96
  74. package/dist/create-BRG2DBWI.js +0 -79
  75. package/dist/send-UK3JBZIB.js +0 -53
  76. package/dist/web-assets/assets/index-BC5eSqbY.js +0 -296
  77. package/templates/_base/src/lib/sessions.ts +0 -71
  78. package/templates/agent-sdk/.init/.config/sessions.json +0 -4
  79. package/templates/agent-sdk/src/lib/agent-sessions.ts +0 -204
  80. package/templates/pi/.init/.config/sessions.json +0 -1
  81. package/templates/pi/src/lib/agent-sessions.ts +0 -210
  82. package/dist/{service-SA4TTMDU.js → service-HZNIDNJF.js} +3 -3
@@ -6,8 +6,8 @@
6
6
  <title>volute</title>
7
7
  <link rel="preconnect" href="https://fonts.googleapis.com" />
8
8
  <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
9
- <link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:ital,wght@0,300;0,400;0,500;0,600;1,400&family=Space+Grotesk:wght@300;400;500;600;700&display=swap" rel="stylesheet" />
10
- <script type="module" crossorigin src="/assets/index-BC5eSqbY.js"></script>
9
+ <link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:ital,wght@0,300;0,400;0,500;0,600;1,400&display=swap" rel="stylesheet" />
10
+ <script type="module" crossorigin src="/assets/index-BbRmoxoA.js"></script>
11
11
  </head>
12
12
  <body>
13
13
  <div id="root"></div>
@@ -0,0 +1,12 @@
1
+ CREATE TABLE `conversation_participants` (
2
+ `conversation_id` text NOT NULL,
3
+ `user_id` integer NOT NULL,
4
+ `role` text DEFAULT 'member' NOT NULL,
5
+ `joined_at` text DEFAULT (datetime('now')) NOT NULL,
6
+ FOREIGN KEY (`conversation_id`) REFERENCES `conversations`(`id`) ON UPDATE no action ON DELETE cascade,
7
+ FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE cascade
8
+ );
9
+ --> statement-breakpoint
10
+ CREATE UNIQUE INDEX `idx_cp_unique` ON `conversation_participants` (`conversation_id`,`user_id`);--> statement-breakpoint
11
+ CREATE INDEX `idx_cp_user_id` ON `conversation_participants` (`user_id`);--> statement-breakpoint
12
+ ALTER TABLE `users` ADD `user_type` text DEFAULT 'human' NOT NULL;
@@ -0,0 +1,417 @@
1
+ {
2
+ "version": "6",
3
+ "dialect": "sqlite",
4
+ "id": "b96d5915-4500-42f4-8638-28f0526d41f0",
5
+ "prevId": "b76b7e15-3489-4a1d-ac23-977cf267d174",
6
+ "tables": {
7
+ "agent_messages": {
8
+ "name": "agent_messages",
9
+ "columns": {
10
+ "id": {
11
+ "name": "id",
12
+ "type": "integer",
13
+ "primaryKey": true,
14
+ "notNull": true,
15
+ "autoincrement": true
16
+ },
17
+ "agent": {
18
+ "name": "agent",
19
+ "type": "text",
20
+ "primaryKey": false,
21
+ "notNull": true,
22
+ "autoincrement": false
23
+ },
24
+ "channel": {
25
+ "name": "channel",
26
+ "type": "text",
27
+ "primaryKey": false,
28
+ "notNull": true,
29
+ "autoincrement": false
30
+ },
31
+ "role": {
32
+ "name": "role",
33
+ "type": "text",
34
+ "primaryKey": false,
35
+ "notNull": true,
36
+ "autoincrement": false
37
+ },
38
+ "sender": {
39
+ "name": "sender",
40
+ "type": "text",
41
+ "primaryKey": false,
42
+ "notNull": false,
43
+ "autoincrement": false
44
+ },
45
+ "content": {
46
+ "name": "content",
47
+ "type": "text",
48
+ "primaryKey": false,
49
+ "notNull": true,
50
+ "autoincrement": false
51
+ },
52
+ "created_at": {
53
+ "name": "created_at",
54
+ "type": "text",
55
+ "primaryKey": false,
56
+ "notNull": true,
57
+ "autoincrement": false,
58
+ "default": "(datetime('now'))"
59
+ }
60
+ },
61
+ "indexes": {
62
+ "idx_agent_messages_agent": {
63
+ "name": "idx_agent_messages_agent",
64
+ "columns": ["agent"],
65
+ "isUnique": false
66
+ },
67
+ "idx_agent_messages_channel": {
68
+ "name": "idx_agent_messages_channel",
69
+ "columns": ["agent", "channel"],
70
+ "isUnique": false
71
+ }
72
+ },
73
+ "foreignKeys": {},
74
+ "compositePrimaryKeys": {},
75
+ "uniqueConstraints": {},
76
+ "checkConstraints": {}
77
+ },
78
+ "conversation_participants": {
79
+ "name": "conversation_participants",
80
+ "columns": {
81
+ "conversation_id": {
82
+ "name": "conversation_id",
83
+ "type": "text",
84
+ "primaryKey": false,
85
+ "notNull": true,
86
+ "autoincrement": false
87
+ },
88
+ "user_id": {
89
+ "name": "user_id",
90
+ "type": "integer",
91
+ "primaryKey": false,
92
+ "notNull": true,
93
+ "autoincrement": false
94
+ },
95
+ "role": {
96
+ "name": "role",
97
+ "type": "text",
98
+ "primaryKey": false,
99
+ "notNull": true,
100
+ "autoincrement": false,
101
+ "default": "'member'"
102
+ },
103
+ "joined_at": {
104
+ "name": "joined_at",
105
+ "type": "text",
106
+ "primaryKey": false,
107
+ "notNull": true,
108
+ "autoincrement": false,
109
+ "default": "(datetime('now'))"
110
+ }
111
+ },
112
+ "indexes": {
113
+ "idx_cp_unique": {
114
+ "name": "idx_cp_unique",
115
+ "columns": ["conversation_id", "user_id"],
116
+ "isUnique": true
117
+ },
118
+ "idx_cp_user_id": {
119
+ "name": "idx_cp_user_id",
120
+ "columns": ["user_id"],
121
+ "isUnique": false
122
+ }
123
+ },
124
+ "foreignKeys": {
125
+ "conversation_participants_conversation_id_conversations_id_fk": {
126
+ "name": "conversation_participants_conversation_id_conversations_id_fk",
127
+ "tableFrom": "conversation_participants",
128
+ "tableTo": "conversations",
129
+ "columnsFrom": ["conversation_id"],
130
+ "columnsTo": ["id"],
131
+ "onDelete": "cascade",
132
+ "onUpdate": "no action"
133
+ },
134
+ "conversation_participants_user_id_users_id_fk": {
135
+ "name": "conversation_participants_user_id_users_id_fk",
136
+ "tableFrom": "conversation_participants",
137
+ "tableTo": "users",
138
+ "columnsFrom": ["user_id"],
139
+ "columnsTo": ["id"],
140
+ "onDelete": "cascade",
141
+ "onUpdate": "no action"
142
+ }
143
+ },
144
+ "compositePrimaryKeys": {},
145
+ "uniqueConstraints": {},
146
+ "checkConstraints": {}
147
+ },
148
+ "conversations": {
149
+ "name": "conversations",
150
+ "columns": {
151
+ "id": {
152
+ "name": "id",
153
+ "type": "text",
154
+ "primaryKey": true,
155
+ "notNull": true,
156
+ "autoincrement": false
157
+ },
158
+ "agent_name": {
159
+ "name": "agent_name",
160
+ "type": "text",
161
+ "primaryKey": false,
162
+ "notNull": true,
163
+ "autoincrement": false
164
+ },
165
+ "channel": {
166
+ "name": "channel",
167
+ "type": "text",
168
+ "primaryKey": false,
169
+ "notNull": true,
170
+ "autoincrement": false
171
+ },
172
+ "user_id": {
173
+ "name": "user_id",
174
+ "type": "integer",
175
+ "primaryKey": false,
176
+ "notNull": false,
177
+ "autoincrement": false
178
+ },
179
+ "title": {
180
+ "name": "title",
181
+ "type": "text",
182
+ "primaryKey": false,
183
+ "notNull": false,
184
+ "autoincrement": false
185
+ },
186
+ "created_at": {
187
+ "name": "created_at",
188
+ "type": "text",
189
+ "primaryKey": false,
190
+ "notNull": true,
191
+ "autoincrement": false,
192
+ "default": "(datetime('now'))"
193
+ },
194
+ "updated_at": {
195
+ "name": "updated_at",
196
+ "type": "text",
197
+ "primaryKey": false,
198
+ "notNull": true,
199
+ "autoincrement": false,
200
+ "default": "(datetime('now'))"
201
+ }
202
+ },
203
+ "indexes": {
204
+ "idx_conversations_agent_name": {
205
+ "name": "idx_conversations_agent_name",
206
+ "columns": ["agent_name"],
207
+ "isUnique": false
208
+ },
209
+ "idx_conversations_user_id": {
210
+ "name": "idx_conversations_user_id",
211
+ "columns": ["user_id"],
212
+ "isUnique": false
213
+ },
214
+ "idx_conversations_updated_at": {
215
+ "name": "idx_conversations_updated_at",
216
+ "columns": ["updated_at"],
217
+ "isUnique": false
218
+ }
219
+ },
220
+ "foreignKeys": {
221
+ "conversations_user_id_users_id_fk": {
222
+ "name": "conversations_user_id_users_id_fk",
223
+ "tableFrom": "conversations",
224
+ "tableTo": "users",
225
+ "columnsFrom": ["user_id"],
226
+ "columnsTo": ["id"],
227
+ "onDelete": "no action",
228
+ "onUpdate": "no action"
229
+ }
230
+ },
231
+ "compositePrimaryKeys": {},
232
+ "uniqueConstraints": {},
233
+ "checkConstraints": {}
234
+ },
235
+ "messages": {
236
+ "name": "messages",
237
+ "columns": {
238
+ "id": {
239
+ "name": "id",
240
+ "type": "integer",
241
+ "primaryKey": true,
242
+ "notNull": true,
243
+ "autoincrement": true
244
+ },
245
+ "conversation_id": {
246
+ "name": "conversation_id",
247
+ "type": "text",
248
+ "primaryKey": false,
249
+ "notNull": true,
250
+ "autoincrement": false
251
+ },
252
+ "role": {
253
+ "name": "role",
254
+ "type": "text",
255
+ "primaryKey": false,
256
+ "notNull": true,
257
+ "autoincrement": false
258
+ },
259
+ "sender_name": {
260
+ "name": "sender_name",
261
+ "type": "text",
262
+ "primaryKey": false,
263
+ "notNull": false,
264
+ "autoincrement": false
265
+ },
266
+ "content": {
267
+ "name": "content",
268
+ "type": "text",
269
+ "primaryKey": false,
270
+ "notNull": true,
271
+ "autoincrement": false
272
+ },
273
+ "created_at": {
274
+ "name": "created_at",
275
+ "type": "text",
276
+ "primaryKey": false,
277
+ "notNull": true,
278
+ "autoincrement": false,
279
+ "default": "(datetime('now'))"
280
+ }
281
+ },
282
+ "indexes": {
283
+ "idx_messages_conversation_id": {
284
+ "name": "idx_messages_conversation_id",
285
+ "columns": ["conversation_id"],
286
+ "isUnique": false
287
+ }
288
+ },
289
+ "foreignKeys": {
290
+ "messages_conversation_id_conversations_id_fk": {
291
+ "name": "messages_conversation_id_conversations_id_fk",
292
+ "tableFrom": "messages",
293
+ "tableTo": "conversations",
294
+ "columnsFrom": ["conversation_id"],
295
+ "columnsTo": ["id"],
296
+ "onDelete": "cascade",
297
+ "onUpdate": "no action"
298
+ }
299
+ },
300
+ "compositePrimaryKeys": {},
301
+ "uniqueConstraints": {},
302
+ "checkConstraints": {}
303
+ },
304
+ "sessions": {
305
+ "name": "sessions",
306
+ "columns": {
307
+ "id": {
308
+ "name": "id",
309
+ "type": "text",
310
+ "primaryKey": true,
311
+ "notNull": true,
312
+ "autoincrement": false
313
+ },
314
+ "user_id": {
315
+ "name": "user_id",
316
+ "type": "integer",
317
+ "primaryKey": false,
318
+ "notNull": true,
319
+ "autoincrement": false
320
+ },
321
+ "created_at": {
322
+ "name": "created_at",
323
+ "type": "integer",
324
+ "primaryKey": false,
325
+ "notNull": true,
326
+ "autoincrement": false
327
+ }
328
+ },
329
+ "indexes": {},
330
+ "foreignKeys": {
331
+ "sessions_user_id_users_id_fk": {
332
+ "name": "sessions_user_id_users_id_fk",
333
+ "tableFrom": "sessions",
334
+ "tableTo": "users",
335
+ "columnsFrom": ["user_id"],
336
+ "columnsTo": ["id"],
337
+ "onDelete": "cascade",
338
+ "onUpdate": "no action"
339
+ }
340
+ },
341
+ "compositePrimaryKeys": {},
342
+ "uniqueConstraints": {},
343
+ "checkConstraints": {}
344
+ },
345
+ "users": {
346
+ "name": "users",
347
+ "columns": {
348
+ "id": {
349
+ "name": "id",
350
+ "type": "integer",
351
+ "primaryKey": true,
352
+ "notNull": true,
353
+ "autoincrement": true
354
+ },
355
+ "username": {
356
+ "name": "username",
357
+ "type": "text",
358
+ "primaryKey": false,
359
+ "notNull": true,
360
+ "autoincrement": false
361
+ },
362
+ "password_hash": {
363
+ "name": "password_hash",
364
+ "type": "text",
365
+ "primaryKey": false,
366
+ "notNull": true,
367
+ "autoincrement": false
368
+ },
369
+ "role": {
370
+ "name": "role",
371
+ "type": "text",
372
+ "primaryKey": false,
373
+ "notNull": true,
374
+ "autoincrement": false,
375
+ "default": "'pending'"
376
+ },
377
+ "user_type": {
378
+ "name": "user_type",
379
+ "type": "text",
380
+ "primaryKey": false,
381
+ "notNull": true,
382
+ "autoincrement": false,
383
+ "default": "'human'"
384
+ },
385
+ "created_at": {
386
+ "name": "created_at",
387
+ "type": "text",
388
+ "primaryKey": false,
389
+ "notNull": true,
390
+ "autoincrement": false,
391
+ "default": "(datetime('now'))"
392
+ }
393
+ },
394
+ "indexes": {
395
+ "users_username_unique": {
396
+ "name": "users_username_unique",
397
+ "columns": ["username"],
398
+ "isUnique": true
399
+ }
400
+ },
401
+ "foreignKeys": {},
402
+ "compositePrimaryKeys": {},
403
+ "uniqueConstraints": {},
404
+ "checkConstraints": {}
405
+ }
406
+ },
407
+ "views": {},
408
+ "enums": {},
409
+ "_meta": {
410
+ "schemas": {},
411
+ "tables": {},
412
+ "columns": {}
413
+ },
414
+ "internal": {
415
+ "indexes": {}
416
+ }
417
+ }
@@ -22,6 +22,13 @@
22
22
  "when": 1770672071268,
23
23
  "tag": "0002_wealthy_the_call",
24
24
  "breakpoints": true
25
+ },
26
+ {
27
+ "idx": 3,
28
+ "version": "6",
29
+ "when": 1770770603615,
30
+ "tag": "0003_clean_ego",
31
+ "breakpoints": true
25
32
  }
26
33
  ]
27
34
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "volute",
3
- "version": "0.3.1",
3
+ "version": "0.5.0",
4
4
  "description": "CLI for creating and managing self-modifying AI agents powered by the Claude Agent SDK",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -48,11 +48,13 @@
48
48
  "@hono/node-server": "^1.19.9",
49
49
  "@hono/zod-validator": "^0.7.6",
50
50
  "@libsql/client": "^0.17.0",
51
+ "@slack/bolt": "^4.6.0",
51
52
  "bcryptjs": "^3.0.3",
52
53
  "cron-parser": "^5.5.0",
53
54
  "discord.js": "^14.25.1",
54
55
  "drizzle-orm": "^0.45.1",
55
56
  "hono": "^4.11.7",
57
+ "telegraf": "^4.16.3",
56
58
  "zod": "^4.3.6"
57
59
  },
58
60
  "devDependencies": {
@@ -10,7 +10,16 @@ SOURCE=$(echo "$INPUT" | jq -r '.source // "startup"')
10
10
 
11
11
  CONTEXT="Session ${SOURCE} at $(date '+%Y-%m-%d %H:%M')."
12
12
 
13
- # Add recent journal context if available
13
+ # Active sessions
14
+ SESSIONS_DIR=".volute/sessions"
15
+ if [ -d "$SESSIONS_DIR" ]; then
16
+ SESSION_LIST=$(ls -1 "$SESSIONS_DIR"/*.json 2>/dev/null | xargs -I{} basename {} .json | sort)
17
+ if [ -n "$SESSION_LIST" ]; then
18
+ CONTEXT="$CONTEXT Active sessions: $(echo "$SESSION_LIST" | tr '\n' ', ' | sed 's/, $//')."
19
+ fi
20
+ fi
21
+
22
+ # Last journal entry
14
23
  JOURNAL_DIR="home/memory/journal"
15
24
  if [ -d "$JOURNAL_DIR" ]; then
16
25
  LATEST=$(ls -1 "$JOURNAL_DIR"/*.md 2>/dev/null | sort | tail -1)
@@ -19,6 +28,15 @@ if [ -d "$JOURNAL_DIR" ]; then
19
28
  fi
20
29
  fi
21
30
 
31
+ # Pending channel invites
32
+ INBOX_DIR="home/inbox"
33
+ if [ -d "$INBOX_DIR" ]; then
34
+ INVITE_COUNT=$(ls -1 "$INBOX_DIR"/*.md 2>/dev/null | wc -l | tr -d ' ')
35
+ if [ "$INVITE_COUNT" -gt 0 ] 2>/dev/null; then
36
+ CONTEXT="$CONTEXT Pending channel invites: ${INVITE_COUNT} (check inbox/)."
37
+ fi
38
+ fi
39
+
22
40
  # Output in SessionStart hook format
23
41
  jq -n --arg ctx "$CONTEXT" '{
24
42
  hookSpecificOutput: {