volute 0.1.0 → 0.2.1
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/README.md +1 -2
- package/dist/agent-manager-SSJUZWOV.js +13 -0
- package/dist/{channel-Q642YUZE.js → channel-2WJRM7PE.js} +2 -2
- package/dist/{chunk-H5XQARAP.js → chunk-4YXYAMFT.js} +3 -3
- package/dist/{chunk-5YW4B7CG.js → chunk-6UCG6MIX.js} +72 -23
- package/dist/{chunk-A5ZJEMHT.js → chunk-KFNNHQK7.js} +4 -4
- package/dist/chunk-L3BQEZ4Z.js +271 -0
- package/dist/{chunk-N4QN44LC.js → chunk-MY74SUOL.js} +29 -22
- package/dist/{chunk-KSMIWOCN.js → chunk-N4YNKR3Q.js} +6 -0
- package/dist/cli.js +23 -19
- package/dist/{connect-LW6G23AV.js → connect-X5V5IMRW.js} +3 -3
- package/dist/connectors/discord.js +9 -2
- package/dist/{create-3K6O2SDC.js → create-23AM7H5B.js} +1 -1
- package/dist/{daemon-client-ZTHW7ROS.js → daemon-client-VN24HM5T.js} +2 -2
- package/dist/daemon.js +394 -436
- package/dist/{delete-JNGY7ZFH.js → delete-GDMSOW3U.js} +2 -2
- package/dist/{disconnect-ACVTKTRE.js → disconnect-5JWFZ6RV.js} +2 -2
- package/dist/{down-FYCUYC5H.js → down-WTF73FE7.js} +5 -4
- package/dist/{env-7SLRN3MG.js → env-YKUJOFHE.js} +12 -5
- package/dist/{fork-BB3DZ426.js → fork-GRSVMBKI.js} +39 -32
- package/dist/history-7WVVKMUY.js +46 -0
- package/dist/{import-W2AMTEV5.js → import-42DOLBDT.js} +1 -1
- package/dist/{logs-BUHRIQ2L.js → logs-SYRQOL6B.js} +1 -1
- package/dist/{merge-446QTE7Q.js → merge-CSAVLSLY.js} +33 -36
- package/dist/{schedule-KKSOVUDF.js → schedule-J37XQM6E.js} +2 -2
- package/dist/{send-WQSVSRDD.js → send-PLOYEYER.js} +7 -5
- package/dist/{start-LKMWS6ZE.js → start-AG7QLULK.js} +2 -2
- package/dist/{status-CIEKUI3V.js → status-GCNU4M3K.js} +9 -2
- package/dist/{stop-YTOAGYE4.js → stop-IL5Q6NER.js} +2 -2
- package/dist/{up-AJJ4GCXY.js → up-ZC6G6K4K.js} +21 -37
- package/dist/{upgrade-JACA6YMO.js → upgrade-DD5TNJWU.js} +3 -5
- package/dist/{variants-HPY4DEWU.js → variants-QQIEKT6M.js} +2 -2
- package/drizzle/0000_flaky_mariko_yashida.sql +34 -0
- package/drizzle/0001_careless_warpath.sql +12 -0
- package/drizzle/meta/0000_snapshot.json +227 -0
- package/drizzle/meta/0001_snapshot.json +298 -0
- package/drizzle/meta/_journal.json +20 -0
- package/package.json +2 -1
- package/templates/_base/.init/.config/hooks/startup-context.sh +28 -0
- package/templates/_base/_skills/memory/SKILL.md +56 -13
- package/templates/_base/_skills/volute-agent/SKILL.md +27 -3
- package/templates/_base/home/VOLUTE.md +25 -0
- package/templates/_base/src/lib/format-prefix.ts +24 -0
- package/templates/_base/src/lib/sessions.ts +71 -0
- package/templates/_base/src/lib/startup.ts +132 -0
- package/templates/_base/src/lib/types.ts +3 -0
- package/templates/_base/src/lib/volute-server.ts +18 -2
- package/templates/agent-sdk/.init/.claude/settings.json +14 -0
- package/templates/agent-sdk/.init/.config/sessions.json +4 -0
- package/templates/agent-sdk/.init/CLAUDE.md +3 -2
- package/templates/agent-sdk/package.json.tmpl +1 -1
- package/templates/agent-sdk/src/agent.ts +101 -0
- package/templates/agent-sdk/src/lib/agent-sessions.ts +180 -0
- package/templates/agent-sdk/src/server.ts +33 -129
- package/templates/agent-sdk/volute-template.json +1 -1
- package/templates/pi/.init/.config/sessions.json +1 -0
- package/templates/pi/.init/AGENTS.md +2 -1
- package/templates/pi/src/agent.ts +61 -0
- package/templates/pi/src/lib/agent-sessions.ts +188 -0
- package/templates/pi/src/server.ts +28 -102
- package/templates/pi/volute-template.json +1 -1
- package/templates/agent-sdk/src/lib/agent.ts +0 -199
- package/templates/pi/src/lib/agent.ts +0 -205
- /package/templates/_base/.init/memory/{.gitkeep → journal/.gitkeep} +0 -0
- /package/templates/_base/{volute.json.tmpl → home/.config/volute.json.tmpl} +0 -0
- /package/templates/pi/{volute.json.tmpl → home/.config/volute.json.tmpl} +0 -0
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
CREATE TABLE `conversations` (
|
|
2
|
+
`id` text PRIMARY KEY NOT NULL,
|
|
3
|
+
`agent_name` text NOT NULL,
|
|
4
|
+
`channel` text NOT NULL,
|
|
5
|
+
`user_id` integer,
|
|
6
|
+
`title` text,
|
|
7
|
+
`created_at` text DEFAULT (datetime('now')) NOT NULL,
|
|
8
|
+
`updated_at` text DEFAULT (datetime('now')) NOT NULL,
|
|
9
|
+
FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE no action
|
|
10
|
+
);
|
|
11
|
+
--> statement-breakpoint
|
|
12
|
+
CREATE INDEX `idx_conversations_agent_name` ON `conversations` (`agent_name`);--> statement-breakpoint
|
|
13
|
+
CREATE INDEX `idx_conversations_user_id` ON `conversations` (`user_id`);--> statement-breakpoint
|
|
14
|
+
CREATE INDEX `idx_conversations_updated_at` ON `conversations` (`updated_at`);--> statement-breakpoint
|
|
15
|
+
CREATE TABLE `messages` (
|
|
16
|
+
`id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
|
|
17
|
+
`conversation_id` text NOT NULL,
|
|
18
|
+
`role` text NOT NULL,
|
|
19
|
+
`sender_name` text,
|
|
20
|
+
`content` text NOT NULL,
|
|
21
|
+
`created_at` text DEFAULT (datetime('now')) NOT NULL,
|
|
22
|
+
FOREIGN KEY (`conversation_id`) REFERENCES `conversations`(`id`) ON UPDATE no action ON DELETE cascade
|
|
23
|
+
);
|
|
24
|
+
--> statement-breakpoint
|
|
25
|
+
CREATE INDEX `idx_messages_conversation_id` ON `messages` (`conversation_id`);--> statement-breakpoint
|
|
26
|
+
CREATE TABLE `users` (
|
|
27
|
+
`id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
|
|
28
|
+
`username` text NOT NULL,
|
|
29
|
+
`password_hash` text NOT NULL,
|
|
30
|
+
`role` text DEFAULT 'pending' NOT NULL,
|
|
31
|
+
`created_at` text DEFAULT (datetime('now')) NOT NULL
|
|
32
|
+
);
|
|
33
|
+
--> statement-breakpoint
|
|
34
|
+
CREATE UNIQUE INDEX `users_username_unique` ON `users` (`username`);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
CREATE TABLE `agent_messages` (
|
|
2
|
+
`id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
|
|
3
|
+
`agent` text NOT NULL,
|
|
4
|
+
`channel` text NOT NULL,
|
|
5
|
+
`role` text NOT NULL,
|
|
6
|
+
`sender` text,
|
|
7
|
+
`content` text NOT NULL,
|
|
8
|
+
`created_at` text DEFAULT (datetime('now')) NOT NULL
|
|
9
|
+
);
|
|
10
|
+
--> statement-breakpoint
|
|
11
|
+
CREATE INDEX `idx_agent_messages_agent` ON `agent_messages` (`agent`);--> statement-breakpoint
|
|
12
|
+
CREATE INDEX `idx_agent_messages_channel` ON `agent_messages` (`agent`,`channel`);
|
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "6",
|
|
3
|
+
"dialect": "sqlite",
|
|
4
|
+
"id": "f864e4fb-4b3d-45e2-8df2-be1e8e95406e",
|
|
5
|
+
"prevId": "00000000-0000-0000-0000-000000000000",
|
|
6
|
+
"tables": {
|
|
7
|
+
"conversations": {
|
|
8
|
+
"name": "conversations",
|
|
9
|
+
"columns": {
|
|
10
|
+
"id": {
|
|
11
|
+
"name": "id",
|
|
12
|
+
"type": "text",
|
|
13
|
+
"primaryKey": true,
|
|
14
|
+
"notNull": true,
|
|
15
|
+
"autoincrement": false
|
|
16
|
+
},
|
|
17
|
+
"agent_name": {
|
|
18
|
+
"name": "agent_name",
|
|
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
|
+
"user_id": {
|
|
32
|
+
"name": "user_id",
|
|
33
|
+
"type": "integer",
|
|
34
|
+
"primaryKey": false,
|
|
35
|
+
"notNull": false,
|
|
36
|
+
"autoincrement": false
|
|
37
|
+
},
|
|
38
|
+
"title": {
|
|
39
|
+
"name": "title",
|
|
40
|
+
"type": "text",
|
|
41
|
+
"primaryKey": false,
|
|
42
|
+
"notNull": false,
|
|
43
|
+
"autoincrement": false
|
|
44
|
+
},
|
|
45
|
+
"created_at": {
|
|
46
|
+
"name": "created_at",
|
|
47
|
+
"type": "text",
|
|
48
|
+
"primaryKey": false,
|
|
49
|
+
"notNull": true,
|
|
50
|
+
"autoincrement": false,
|
|
51
|
+
"default": "(datetime('now'))"
|
|
52
|
+
},
|
|
53
|
+
"updated_at": {
|
|
54
|
+
"name": "updated_at",
|
|
55
|
+
"type": "text",
|
|
56
|
+
"primaryKey": false,
|
|
57
|
+
"notNull": true,
|
|
58
|
+
"autoincrement": false,
|
|
59
|
+
"default": "(datetime('now'))"
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
"indexes": {
|
|
63
|
+
"idx_conversations_agent_name": {
|
|
64
|
+
"name": "idx_conversations_agent_name",
|
|
65
|
+
"columns": ["agent_name"],
|
|
66
|
+
"isUnique": false
|
|
67
|
+
},
|
|
68
|
+
"idx_conversations_user_id": {
|
|
69
|
+
"name": "idx_conversations_user_id",
|
|
70
|
+
"columns": ["user_id"],
|
|
71
|
+
"isUnique": false
|
|
72
|
+
},
|
|
73
|
+
"idx_conversations_updated_at": {
|
|
74
|
+
"name": "idx_conversations_updated_at",
|
|
75
|
+
"columns": ["updated_at"],
|
|
76
|
+
"isUnique": false
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
"foreignKeys": {
|
|
80
|
+
"conversations_user_id_users_id_fk": {
|
|
81
|
+
"name": "conversations_user_id_users_id_fk",
|
|
82
|
+
"tableFrom": "conversations",
|
|
83
|
+
"tableTo": "users",
|
|
84
|
+
"columnsFrom": ["user_id"],
|
|
85
|
+
"columnsTo": ["id"],
|
|
86
|
+
"onDelete": "no action",
|
|
87
|
+
"onUpdate": "no action"
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
"compositePrimaryKeys": {},
|
|
91
|
+
"uniqueConstraints": {},
|
|
92
|
+
"checkConstraints": {}
|
|
93
|
+
},
|
|
94
|
+
"messages": {
|
|
95
|
+
"name": "messages",
|
|
96
|
+
"columns": {
|
|
97
|
+
"id": {
|
|
98
|
+
"name": "id",
|
|
99
|
+
"type": "integer",
|
|
100
|
+
"primaryKey": true,
|
|
101
|
+
"notNull": true,
|
|
102
|
+
"autoincrement": true
|
|
103
|
+
},
|
|
104
|
+
"conversation_id": {
|
|
105
|
+
"name": "conversation_id",
|
|
106
|
+
"type": "text",
|
|
107
|
+
"primaryKey": false,
|
|
108
|
+
"notNull": true,
|
|
109
|
+
"autoincrement": false
|
|
110
|
+
},
|
|
111
|
+
"role": {
|
|
112
|
+
"name": "role",
|
|
113
|
+
"type": "text",
|
|
114
|
+
"primaryKey": false,
|
|
115
|
+
"notNull": true,
|
|
116
|
+
"autoincrement": false
|
|
117
|
+
},
|
|
118
|
+
"sender_name": {
|
|
119
|
+
"name": "sender_name",
|
|
120
|
+
"type": "text",
|
|
121
|
+
"primaryKey": false,
|
|
122
|
+
"notNull": false,
|
|
123
|
+
"autoincrement": false
|
|
124
|
+
},
|
|
125
|
+
"content": {
|
|
126
|
+
"name": "content",
|
|
127
|
+
"type": "text",
|
|
128
|
+
"primaryKey": false,
|
|
129
|
+
"notNull": true,
|
|
130
|
+
"autoincrement": false
|
|
131
|
+
},
|
|
132
|
+
"created_at": {
|
|
133
|
+
"name": "created_at",
|
|
134
|
+
"type": "text",
|
|
135
|
+
"primaryKey": false,
|
|
136
|
+
"notNull": true,
|
|
137
|
+
"autoincrement": false,
|
|
138
|
+
"default": "(datetime('now'))"
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
"indexes": {
|
|
142
|
+
"idx_messages_conversation_id": {
|
|
143
|
+
"name": "idx_messages_conversation_id",
|
|
144
|
+
"columns": ["conversation_id"],
|
|
145
|
+
"isUnique": false
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
"foreignKeys": {
|
|
149
|
+
"messages_conversation_id_conversations_id_fk": {
|
|
150
|
+
"name": "messages_conversation_id_conversations_id_fk",
|
|
151
|
+
"tableFrom": "messages",
|
|
152
|
+
"tableTo": "conversations",
|
|
153
|
+
"columnsFrom": ["conversation_id"],
|
|
154
|
+
"columnsTo": ["id"],
|
|
155
|
+
"onDelete": "cascade",
|
|
156
|
+
"onUpdate": "no action"
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
"compositePrimaryKeys": {},
|
|
160
|
+
"uniqueConstraints": {},
|
|
161
|
+
"checkConstraints": {}
|
|
162
|
+
},
|
|
163
|
+
"users": {
|
|
164
|
+
"name": "users",
|
|
165
|
+
"columns": {
|
|
166
|
+
"id": {
|
|
167
|
+
"name": "id",
|
|
168
|
+
"type": "integer",
|
|
169
|
+
"primaryKey": true,
|
|
170
|
+
"notNull": true,
|
|
171
|
+
"autoincrement": true
|
|
172
|
+
},
|
|
173
|
+
"username": {
|
|
174
|
+
"name": "username",
|
|
175
|
+
"type": "text",
|
|
176
|
+
"primaryKey": false,
|
|
177
|
+
"notNull": true,
|
|
178
|
+
"autoincrement": false
|
|
179
|
+
},
|
|
180
|
+
"password_hash": {
|
|
181
|
+
"name": "password_hash",
|
|
182
|
+
"type": "text",
|
|
183
|
+
"primaryKey": false,
|
|
184
|
+
"notNull": true,
|
|
185
|
+
"autoincrement": false
|
|
186
|
+
},
|
|
187
|
+
"role": {
|
|
188
|
+
"name": "role",
|
|
189
|
+
"type": "text",
|
|
190
|
+
"primaryKey": false,
|
|
191
|
+
"notNull": true,
|
|
192
|
+
"autoincrement": false,
|
|
193
|
+
"default": "'pending'"
|
|
194
|
+
},
|
|
195
|
+
"created_at": {
|
|
196
|
+
"name": "created_at",
|
|
197
|
+
"type": "text",
|
|
198
|
+
"primaryKey": false,
|
|
199
|
+
"notNull": true,
|
|
200
|
+
"autoincrement": false,
|
|
201
|
+
"default": "(datetime('now'))"
|
|
202
|
+
}
|
|
203
|
+
},
|
|
204
|
+
"indexes": {
|
|
205
|
+
"users_username_unique": {
|
|
206
|
+
"name": "users_username_unique",
|
|
207
|
+
"columns": ["username"],
|
|
208
|
+
"isUnique": true
|
|
209
|
+
}
|
|
210
|
+
},
|
|
211
|
+
"foreignKeys": {},
|
|
212
|
+
"compositePrimaryKeys": {},
|
|
213
|
+
"uniqueConstraints": {},
|
|
214
|
+
"checkConstraints": {}
|
|
215
|
+
}
|
|
216
|
+
},
|
|
217
|
+
"views": {},
|
|
218
|
+
"enums": {},
|
|
219
|
+
"_meta": {
|
|
220
|
+
"schemas": {},
|
|
221
|
+
"tables": {},
|
|
222
|
+
"columns": {}
|
|
223
|
+
},
|
|
224
|
+
"internal": {
|
|
225
|
+
"indexes": {}
|
|
226
|
+
}
|
|
227
|
+
}
|
|
@@ -0,0 +1,298 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "6",
|
|
3
|
+
"dialect": "sqlite",
|
|
4
|
+
"id": "f863b4ae-b67a-4484-8ab5-e517ec4e5726",
|
|
5
|
+
"prevId": "f864e4fb-4b3d-45e2-8df2-be1e8e95406e",
|
|
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
|
+
"conversations": {
|
|
79
|
+
"name": "conversations",
|
|
80
|
+
"columns": {
|
|
81
|
+
"id": {
|
|
82
|
+
"name": "id",
|
|
83
|
+
"type": "text",
|
|
84
|
+
"primaryKey": true,
|
|
85
|
+
"notNull": true,
|
|
86
|
+
"autoincrement": false
|
|
87
|
+
},
|
|
88
|
+
"agent_name": {
|
|
89
|
+
"name": "agent_name",
|
|
90
|
+
"type": "text",
|
|
91
|
+
"primaryKey": false,
|
|
92
|
+
"notNull": true,
|
|
93
|
+
"autoincrement": false
|
|
94
|
+
},
|
|
95
|
+
"channel": {
|
|
96
|
+
"name": "channel",
|
|
97
|
+
"type": "text",
|
|
98
|
+
"primaryKey": false,
|
|
99
|
+
"notNull": true,
|
|
100
|
+
"autoincrement": false
|
|
101
|
+
},
|
|
102
|
+
"user_id": {
|
|
103
|
+
"name": "user_id",
|
|
104
|
+
"type": "integer",
|
|
105
|
+
"primaryKey": false,
|
|
106
|
+
"notNull": false,
|
|
107
|
+
"autoincrement": false
|
|
108
|
+
},
|
|
109
|
+
"title": {
|
|
110
|
+
"name": "title",
|
|
111
|
+
"type": "text",
|
|
112
|
+
"primaryKey": false,
|
|
113
|
+
"notNull": false,
|
|
114
|
+
"autoincrement": false
|
|
115
|
+
},
|
|
116
|
+
"created_at": {
|
|
117
|
+
"name": "created_at",
|
|
118
|
+
"type": "text",
|
|
119
|
+
"primaryKey": false,
|
|
120
|
+
"notNull": true,
|
|
121
|
+
"autoincrement": false,
|
|
122
|
+
"default": "(datetime('now'))"
|
|
123
|
+
},
|
|
124
|
+
"updated_at": {
|
|
125
|
+
"name": "updated_at",
|
|
126
|
+
"type": "text",
|
|
127
|
+
"primaryKey": false,
|
|
128
|
+
"notNull": true,
|
|
129
|
+
"autoincrement": false,
|
|
130
|
+
"default": "(datetime('now'))"
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
"indexes": {
|
|
134
|
+
"idx_conversations_agent_name": {
|
|
135
|
+
"name": "idx_conversations_agent_name",
|
|
136
|
+
"columns": ["agent_name"],
|
|
137
|
+
"isUnique": false
|
|
138
|
+
},
|
|
139
|
+
"idx_conversations_user_id": {
|
|
140
|
+
"name": "idx_conversations_user_id",
|
|
141
|
+
"columns": ["user_id"],
|
|
142
|
+
"isUnique": false
|
|
143
|
+
},
|
|
144
|
+
"idx_conversations_updated_at": {
|
|
145
|
+
"name": "idx_conversations_updated_at",
|
|
146
|
+
"columns": ["updated_at"],
|
|
147
|
+
"isUnique": false
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
"foreignKeys": {
|
|
151
|
+
"conversations_user_id_users_id_fk": {
|
|
152
|
+
"name": "conversations_user_id_users_id_fk",
|
|
153
|
+
"tableFrom": "conversations",
|
|
154
|
+
"tableTo": "users",
|
|
155
|
+
"columnsFrom": ["user_id"],
|
|
156
|
+
"columnsTo": ["id"],
|
|
157
|
+
"onDelete": "no action",
|
|
158
|
+
"onUpdate": "no action"
|
|
159
|
+
}
|
|
160
|
+
},
|
|
161
|
+
"compositePrimaryKeys": {},
|
|
162
|
+
"uniqueConstraints": {},
|
|
163
|
+
"checkConstraints": {}
|
|
164
|
+
},
|
|
165
|
+
"messages": {
|
|
166
|
+
"name": "messages",
|
|
167
|
+
"columns": {
|
|
168
|
+
"id": {
|
|
169
|
+
"name": "id",
|
|
170
|
+
"type": "integer",
|
|
171
|
+
"primaryKey": true,
|
|
172
|
+
"notNull": true,
|
|
173
|
+
"autoincrement": true
|
|
174
|
+
},
|
|
175
|
+
"conversation_id": {
|
|
176
|
+
"name": "conversation_id",
|
|
177
|
+
"type": "text",
|
|
178
|
+
"primaryKey": false,
|
|
179
|
+
"notNull": true,
|
|
180
|
+
"autoincrement": false
|
|
181
|
+
},
|
|
182
|
+
"role": {
|
|
183
|
+
"name": "role",
|
|
184
|
+
"type": "text",
|
|
185
|
+
"primaryKey": false,
|
|
186
|
+
"notNull": true,
|
|
187
|
+
"autoincrement": false
|
|
188
|
+
},
|
|
189
|
+
"sender_name": {
|
|
190
|
+
"name": "sender_name",
|
|
191
|
+
"type": "text",
|
|
192
|
+
"primaryKey": false,
|
|
193
|
+
"notNull": false,
|
|
194
|
+
"autoincrement": false
|
|
195
|
+
},
|
|
196
|
+
"content": {
|
|
197
|
+
"name": "content",
|
|
198
|
+
"type": "text",
|
|
199
|
+
"primaryKey": false,
|
|
200
|
+
"notNull": true,
|
|
201
|
+
"autoincrement": false
|
|
202
|
+
},
|
|
203
|
+
"created_at": {
|
|
204
|
+
"name": "created_at",
|
|
205
|
+
"type": "text",
|
|
206
|
+
"primaryKey": false,
|
|
207
|
+
"notNull": true,
|
|
208
|
+
"autoincrement": false,
|
|
209
|
+
"default": "(datetime('now'))"
|
|
210
|
+
}
|
|
211
|
+
},
|
|
212
|
+
"indexes": {
|
|
213
|
+
"idx_messages_conversation_id": {
|
|
214
|
+
"name": "idx_messages_conversation_id",
|
|
215
|
+
"columns": ["conversation_id"],
|
|
216
|
+
"isUnique": false
|
|
217
|
+
}
|
|
218
|
+
},
|
|
219
|
+
"foreignKeys": {
|
|
220
|
+
"messages_conversation_id_conversations_id_fk": {
|
|
221
|
+
"name": "messages_conversation_id_conversations_id_fk",
|
|
222
|
+
"tableFrom": "messages",
|
|
223
|
+
"tableTo": "conversations",
|
|
224
|
+
"columnsFrom": ["conversation_id"],
|
|
225
|
+
"columnsTo": ["id"],
|
|
226
|
+
"onDelete": "cascade",
|
|
227
|
+
"onUpdate": "no action"
|
|
228
|
+
}
|
|
229
|
+
},
|
|
230
|
+
"compositePrimaryKeys": {},
|
|
231
|
+
"uniqueConstraints": {},
|
|
232
|
+
"checkConstraints": {}
|
|
233
|
+
},
|
|
234
|
+
"users": {
|
|
235
|
+
"name": "users",
|
|
236
|
+
"columns": {
|
|
237
|
+
"id": {
|
|
238
|
+
"name": "id",
|
|
239
|
+
"type": "integer",
|
|
240
|
+
"primaryKey": true,
|
|
241
|
+
"notNull": true,
|
|
242
|
+
"autoincrement": true
|
|
243
|
+
},
|
|
244
|
+
"username": {
|
|
245
|
+
"name": "username",
|
|
246
|
+
"type": "text",
|
|
247
|
+
"primaryKey": false,
|
|
248
|
+
"notNull": true,
|
|
249
|
+
"autoincrement": false
|
|
250
|
+
},
|
|
251
|
+
"password_hash": {
|
|
252
|
+
"name": "password_hash",
|
|
253
|
+
"type": "text",
|
|
254
|
+
"primaryKey": false,
|
|
255
|
+
"notNull": true,
|
|
256
|
+
"autoincrement": false
|
|
257
|
+
},
|
|
258
|
+
"role": {
|
|
259
|
+
"name": "role",
|
|
260
|
+
"type": "text",
|
|
261
|
+
"primaryKey": false,
|
|
262
|
+
"notNull": true,
|
|
263
|
+
"autoincrement": false,
|
|
264
|
+
"default": "'pending'"
|
|
265
|
+
},
|
|
266
|
+
"created_at": {
|
|
267
|
+
"name": "created_at",
|
|
268
|
+
"type": "text",
|
|
269
|
+
"primaryKey": false,
|
|
270
|
+
"notNull": true,
|
|
271
|
+
"autoincrement": false,
|
|
272
|
+
"default": "(datetime('now'))"
|
|
273
|
+
}
|
|
274
|
+
},
|
|
275
|
+
"indexes": {
|
|
276
|
+
"users_username_unique": {
|
|
277
|
+
"name": "users_username_unique",
|
|
278
|
+
"columns": ["username"],
|
|
279
|
+
"isUnique": true
|
|
280
|
+
}
|
|
281
|
+
},
|
|
282
|
+
"foreignKeys": {},
|
|
283
|
+
"compositePrimaryKeys": {},
|
|
284
|
+
"uniqueConstraints": {},
|
|
285
|
+
"checkConstraints": {}
|
|
286
|
+
}
|
|
287
|
+
},
|
|
288
|
+
"views": {},
|
|
289
|
+
"enums": {},
|
|
290
|
+
"_meta": {
|
|
291
|
+
"schemas": {},
|
|
292
|
+
"tables": {},
|
|
293
|
+
"columns": {}
|
|
294
|
+
},
|
|
295
|
+
"internal": {
|
|
296
|
+
"indexes": {}
|
|
297
|
+
}
|
|
298
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "7",
|
|
3
|
+
"dialect": "sqlite",
|
|
4
|
+
"entries": [
|
|
5
|
+
{
|
|
6
|
+
"idx": 0,
|
|
7
|
+
"version": "6",
|
|
8
|
+
"when": 1770339392813,
|
|
9
|
+
"tag": "0000_flaky_mariko_yashida",
|
|
10
|
+
"breakpoints": true
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"idx": 1,
|
|
14
|
+
"version": "6",
|
|
15
|
+
"when": 1770403902722,
|
|
16
|
+
"tag": "0001_careless_warpath",
|
|
17
|
+
"breakpoints": true
|
|
18
|
+
}
|
|
19
|
+
]
|
|
20
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "volute",
|
|
3
|
-
"version": "0.1
|
|
3
|
+
"version": "0.2.1",
|
|
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",
|
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
},
|
|
24
24
|
"files": [
|
|
25
25
|
"dist/",
|
|
26
|
+
"drizzle/",
|
|
26
27
|
"templates/"
|
|
27
28
|
],
|
|
28
29
|
"scripts": {
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# Startup context hook — generates orientation context for new sessions.
|
|
3
|
+
# Edit this script to customize what you see when your session starts.
|
|
4
|
+
# Input: JSON on stdin with { "source": "startup" | "SessionStart" }
|
|
5
|
+
# Output: JSON with hookSpecificOutput.additionalContext (for SessionStart hook)
|
|
6
|
+
# or plain text (for direct execution by pi template)
|
|
7
|
+
|
|
8
|
+
INPUT=$(cat)
|
|
9
|
+
SOURCE=$(echo "$INPUT" | jq -r '.source // "startup"')
|
|
10
|
+
|
|
11
|
+
CONTEXT="Session ${SOURCE} at $(date '+%Y-%m-%d %H:%M')."
|
|
12
|
+
|
|
13
|
+
# Add recent journal context if available
|
|
14
|
+
JOURNAL_DIR="home/memory/journal"
|
|
15
|
+
if [ -d "$JOURNAL_DIR" ]; then
|
|
16
|
+
LATEST=$(ls -1 "$JOURNAL_DIR"/*.md 2>/dev/null | sort | tail -1)
|
|
17
|
+
if [ -n "$LATEST" ]; then
|
|
18
|
+
CONTEXT="$CONTEXT Last journal entry: $(basename "$LATEST" .md)."
|
|
19
|
+
fi
|
|
20
|
+
fi
|
|
21
|
+
|
|
22
|
+
# Output in SessionStart hook format
|
|
23
|
+
jq -n --arg ctx "$CONTEXT" '{
|
|
24
|
+
hookSpecificOutput: {
|
|
25
|
+
hookEventName: "SessionStart",
|
|
26
|
+
additionalContext: $ctx
|
|
27
|
+
}
|
|
28
|
+
}'
|