@assistkick/create 1.31.0 → 1.32.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.
- package/package.json +1 -1
- package/templates/assistkick-product-system/packages/shared/db/migrate.ts +153 -1
- package/templates/assistkick-product-system/packages/shared/db/migrations/0000_dashing_gorgon.sql +0 -128
- package/templates/assistkick-product-system/packages/shared/db/migrations/0001_vengeful_wallop.sql +0 -1
- package/templates/assistkick-product-system/packages/shared/db/migrations/0002_greedy_excalibur.sql +0 -4
- package/templates/assistkick-product-system/packages/shared/db/migrations/0003_lonely_cyclops.sql +0 -17
- package/templates/assistkick-product-system/packages/shared/db/migrations/0004_tidy_matthew_murdock.sql +0 -9
- package/templates/assistkick-product-system/packages/shared/db/migrations/0005_mysterious_falcon.sql +0 -692
- package/templates/assistkick-product-system/packages/shared/db/migrations/0006_next_venom.sql +0 -9
- package/templates/assistkick-product-system/packages/shared/db/migrations/0007_deep_barracuda.sql +0 -39
- package/templates/assistkick-product-system/packages/shared/db/migrations/0008_puzzling_hannibal_king.sql +0 -1
- package/templates/assistkick-product-system/packages/shared/db/migrations/0009_amused_beast.sql +0 -8
- package/templates/assistkick-product-system/packages/shared/db/migrations/0010_spotty_moira_mactaggert.sql +0 -9
- package/templates/assistkick-product-system/packages/shared/db/migrations/0011_goofy_snowbird.sql +0 -3
- package/templates/assistkick-product-system/packages/shared/db/migrations/0011_supreme_doctor_octopus.sql +0 -3
- package/templates/assistkick-product-system/packages/shared/db/migrations/0013_reflective_prowler.sql +0 -15
- package/templates/assistkick-product-system/packages/shared/db/migrations/0014_nifty_punisher.sql +0 -15
- package/templates/assistkick-product-system/packages/shared/db/migrations/0015_magenta_jazinda.sql +0 -1
- package/templates/assistkick-product-system/packages/shared/db/migrations/0016_giant_xorn.sql +0 -1
- package/templates/assistkick-product-system/packages/shared/db/migrations/0017_sloppy_mentor.sql +0 -6
- package/templates/assistkick-product-system/packages/shared/db/migrations/0018_vengeful_kabuki.sql +0 -9
- package/templates/assistkick-product-system/packages/shared/db/migrations/0019_careful_sentinels.sql +0 -8
- package/templates/assistkick-product-system/packages/shared/db/migrations/0020_clever_spot.sql +0 -27
- package/templates/assistkick-product-system/packages/shared/db/migrations/0021_graceful_hex.sql +0 -1
- package/templates/assistkick-product-system/packages/shared/db/migrations/0022_short_kingpin.sql +0 -1
- package/templates/assistkick-product-system/packages/shared/db/migrations/0023_ambiguous_sharon_carter.sql +0 -1
- package/templates/assistkick-product-system/packages/shared/db/migrations/0024_fat_unus.sql +0 -1
- package/templates/assistkick-product-system/packages/shared/db/migrations/meta/0003_snapshot.json +0 -862
- package/templates/assistkick-product-system/packages/shared/db/migrations/meta/0004_snapshot.json +0 -921
- package/templates/assistkick-product-system/packages/shared/db/migrations/meta/0005_snapshot.json +0 -1042
- package/templates/assistkick-product-system/packages/shared/db/migrations/meta/0006_snapshot.json +0 -1101
- package/templates/assistkick-product-system/packages/shared/db/migrations/meta/0007_snapshot.json +0 -1336
- package/templates/assistkick-product-system/packages/shared/db/migrations/meta/0008_snapshot.json +0 -1275
- package/templates/assistkick-product-system/packages/shared/db/migrations/meta/0009_snapshot.json +0 -1327
- package/templates/assistkick-product-system/packages/shared/db/migrations/meta/0010_snapshot.json +0 -1393
- package/templates/assistkick-product-system/packages/shared/db/migrations/meta/0011_snapshot.json +0 -1436
- package/templates/assistkick-product-system/packages/shared/db/migrations/meta/0013_snapshot.json +0 -1538
- package/templates/assistkick-product-system/packages/shared/db/migrations/meta/0014_snapshot.json +0 -1545
- package/templates/assistkick-product-system/packages/shared/db/migrations/meta/0015_snapshot.json +0 -1552
- package/templates/assistkick-product-system/packages/shared/db/migrations/meta/0016_snapshot.json +0 -1560
- package/templates/assistkick-product-system/packages/shared/db/migrations/meta/0017_snapshot.json +0 -1598
- package/templates/assistkick-product-system/packages/shared/db/migrations/meta/0018_snapshot.json +0 -1657
- package/templates/assistkick-product-system/packages/shared/db/migrations/meta/0019_snapshot.json +0 -1709
- package/templates/assistkick-product-system/packages/shared/db/migrations/meta/0020_snapshot.json +0 -1733
- package/templates/assistkick-product-system/packages/shared/db/migrations/meta/0021_snapshot.json +0 -1740
- package/templates/assistkick-product-system/packages/shared/db/migrations/meta/0022_snapshot.json +0 -1755
- package/templates/assistkick-product-system/packages/shared/db/migrations/meta/0023_snapshot.json +0 -1762
- package/templates/assistkick-product-system/packages/shared/db/migrations/meta/0024_snapshot.json +0 -1769
package/package.json
CHANGED
|
@@ -14,7 +14,7 @@ import { migrate } from 'drizzle-orm/libsql/migrator';
|
|
|
14
14
|
import { drizzle } from 'drizzle-orm/libsql';
|
|
15
15
|
import { createClient } from '@libsql/client';
|
|
16
16
|
import { getTableColumns, getTableName } from 'drizzle-orm';
|
|
17
|
-
import { existsSync, mkdirSync } from 'node:fs';
|
|
17
|
+
import { existsSync, mkdirSync, readFileSync } from 'node:fs';
|
|
18
18
|
import { join } from 'node:path';
|
|
19
19
|
import * as schema from './schema.js';
|
|
20
20
|
|
|
@@ -108,6 +108,154 @@ async function syncColumns() {
|
|
|
108
108
|
return added;
|
|
109
109
|
}
|
|
110
110
|
|
|
111
|
+
/**
|
|
112
|
+
* Read a SKILL.md file from the skills directory.
|
|
113
|
+
* Returns the content or a placeholder if the file is not found.
|
|
114
|
+
*/
|
|
115
|
+
function readSkillContent(skillsDir: string, skillFolder: string): string {
|
|
116
|
+
const skillPath = join(skillsDir, skillFolder, 'SKILL.md');
|
|
117
|
+
if (existsSync(skillPath)) {
|
|
118
|
+
return readFileSync(skillPath, 'utf-8');
|
|
119
|
+
}
|
|
120
|
+
return `Placeholder — SKILL.md not found for ${skillFolder}`;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* Escape single quotes for SQLite string literals.
|
|
125
|
+
*/
|
|
126
|
+
function sqlEscape(value: string): string {
|
|
127
|
+
return value.replace(/'/g, "''");
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* Seed default agents and workflows if they don't already exist.
|
|
132
|
+
* Uses INSERT OR IGNORE so existing rows are never overwritten.
|
|
133
|
+
*/
|
|
134
|
+
async function seedDefaults() {
|
|
135
|
+
const skillsDir = join(import.meta.dirname, '..', '..', '..', '..', '.claude', 'skills');
|
|
136
|
+
const now = new Date().toISOString();
|
|
137
|
+
|
|
138
|
+
const defaultAgents = [
|
|
139
|
+
{ id: '7f83eec8-e762-46eb-9459-9f31096d5faf', name: 'Default Developer', skill: 'assistkick-developer' },
|
|
140
|
+
{ id: 'cc66d167-b1aa-40c0-9b19-c683c432ffa4', name: 'Default Reviewer', skill: 'assistkick-code-reviewer' },
|
|
141
|
+
{ id: '055ed5fa-83bd-42c1-a913-7a0ea7540f0f', name: 'Default Debugger', skill: 'assistkick-debugger' },
|
|
142
|
+
{ id: 'a1b2c3d4-e5f6-7890-abcd-ef1234567890', name: 'Default Video Script Writer', skill: 'assistkick-video-script-writer' },
|
|
143
|
+
{ id: 'b2c3d4e5-f6a7-8901-bcde-f12345678901', name: 'Default Video Composition Agent', skill: 'assistkick-video-composition-agent' },
|
|
144
|
+
];
|
|
145
|
+
|
|
146
|
+
let seeded = 0;
|
|
147
|
+
|
|
148
|
+
for (const agent of defaultAgents) {
|
|
149
|
+
const grounding = readSkillContent(skillsDir, agent.skill);
|
|
150
|
+
const escaped = sqlEscape(grounding);
|
|
151
|
+
await client.execute(
|
|
152
|
+
`INSERT OR IGNORE INTO agents (id, name, model, skills, grounding, default_grounding, project_id, is_default, created_at, updated_at)
|
|
153
|
+
VALUES ('${agent.id}', '${sqlEscape(agent.name)}', 'claude-opus-4-6', '[]', '${escaped}', '${escaped}', NULL, 1, '${now}', '${now}')`
|
|
154
|
+
);
|
|
155
|
+
const check = await client.execute(`SELECT id FROM agents WHERE id = '${agent.id}'`);
|
|
156
|
+
if (check.rows.length > 0) seeded++;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
// Default Pipeline workflow
|
|
160
|
+
const defaultPipelineGraph = JSON.stringify({
|
|
161
|
+
nodes: [
|
|
162
|
+
{ id: 'start_1', type: 'start', position: { x: 50, y: 250 }, data: { label: 'Start' } },
|
|
163
|
+
{ id: 'transition_1', type: 'transitionCard', position: { x: 250, y: 250 }, data: { label: 'Move to In Progress', fromColumn: 'todo', toColumn: 'in_progress' } },
|
|
164
|
+
{ id: 'agent_dev', type: 'runAgent', position: { x: 500, y: 250 }, data: { label: 'Run Developer', agentId: '7f83eec8-e762-46eb-9459-9f31096d5faf' } },
|
|
165
|
+
{ id: 'transition_2', type: 'transitionCard', position: { x: 750, y: 250 }, data: { label: 'Move to In Review', fromColumn: 'in_progress', toColumn: 'in_review' } },
|
|
166
|
+
{ id: 'agent_rev', type: 'runAgent', position: { x: 1000, y: 250 }, data: { label: 'Run Reviewer', agentId: 'cc66d167-b1aa-40c0-9b19-c683c432ffa4' } },
|
|
167
|
+
{ id: 'check_pos', type: 'checkCardPosition', position: { x: 1250, y: 250 }, data: { label: 'Check Card Position' } },
|
|
168
|
+
{ id: 'end_success', type: 'end', position: { x: 1500, y: 100 }, data: { label: 'End (Success)', outcome: 'success' } },
|
|
169
|
+
{ id: 'check_cycle', type: 'checkCycleCount', position: { x: 1500, y: 400 }, data: { label: 'Check Cycle Count', maxCycles: 3 } },
|
|
170
|
+
{ id: 'set_meta', type: 'setCardMetadata', position: { x: 1750, y: 400 }, data: { label: 'Set dev_blocked', key: 'dev_blocked', value: 'true' } },
|
|
171
|
+
{ id: 'end_blocked', type: 'end', position: { x: 2000, y: 400 }, data: { label: 'End (Blocked)', outcome: 'blocked' } },
|
|
172
|
+
],
|
|
173
|
+
edges: [
|
|
174
|
+
{ id: 'e_start_t1', source: 'start_1', target: 'transition_1' },
|
|
175
|
+
{ id: 'e_t1_dev', source: 'transition_1', target: 'agent_dev' },
|
|
176
|
+
{ id: 'e_dev_t2', source: 'agent_dev', target: 'transition_2' },
|
|
177
|
+
{ id: 'e_t2_rev', source: 'transition_2', target: 'agent_rev' },
|
|
178
|
+
{ id: 'e_rev_check', source: 'agent_rev', target: 'check_pos' },
|
|
179
|
+
{ id: 'e_check_success', source: 'check_pos', target: 'end_success', sourceHandle: 'qa', data: { label: 'qa' } },
|
|
180
|
+
{ id: 'e_check_cycle', source: 'check_pos', target: 'check_cycle', sourceHandle: 'todo', data: { label: 'todo' } },
|
|
181
|
+
{ id: 'e_cycle_dev', source: 'check_cycle', target: 'agent_dev', sourceHandle: 'under_limit', data: { label: '< 3' } },
|
|
182
|
+
{ id: 'e_cycle_meta', source: 'check_cycle', target: 'set_meta', sourceHandle: 'at_limit', data: { label: '>= 3' } },
|
|
183
|
+
{ id: 'e_meta_blocked', source: 'set_meta', target: 'end_blocked' },
|
|
184
|
+
],
|
|
185
|
+
});
|
|
186
|
+
|
|
187
|
+
await client.execute(
|
|
188
|
+
`INSERT OR IGNORE INTO workflows (id, name, description, project_id, feature_type, trigger_column, is_default, graph_data, created_at, updated_at)
|
|
189
|
+
VALUES ('d4e5f6a7-b8c9-0d1e-2f3a-4b5c6d7e8f9a', 'Default Pipeline', 'Default workflow replicating the standard develop-review-loop pipeline.', NULL, NULL, NULL, 1, '${sqlEscape(defaultPipelineGraph)}', '${now}', '${now}')`
|
|
190
|
+
);
|
|
191
|
+
|
|
192
|
+
// Video Script Generation workflow
|
|
193
|
+
const videoScriptGraph = JSON.stringify({
|
|
194
|
+
nodes: [
|
|
195
|
+
{ id: 'start', type: 'start', position: { x: 50, y: 250 }, data: { label: 'Start' } },
|
|
196
|
+
{ id: 'agent_script', type: 'runAgent', position: { x: 300, y: 250 }, data: { label: 'Run Script Writer', agentId: 'a1b2c3d4-e5f6-7890-abcd-ef1234567890', agentName: 'Default Video Script Writer' } },
|
|
197
|
+
{ id: 'transition_review', type: 'transitionCard', position: { x: 600, y: 250 }, data: { label: 'Move to Review', fromColumn: 'todo', toColumn: 'in_review' } },
|
|
198
|
+
{ id: 'end_success', type: 'end', position: { x: 900, y: 250 }, data: { label: 'End (Success)', outcome: 'success' } },
|
|
199
|
+
],
|
|
200
|
+
edges: [
|
|
201
|
+
{ id: 'e1', source: 'start', target: 'agent_script' },
|
|
202
|
+
{ id: 'e2', source: 'agent_script', target: 'transition_review' },
|
|
203
|
+
{ id: 'e3', source: 'transition_review', target: 'end_success' },
|
|
204
|
+
],
|
|
205
|
+
});
|
|
206
|
+
|
|
207
|
+
await client.execute(
|
|
208
|
+
`INSERT OR IGNORE INTO workflows (id, name, description, project_id, feature_type, trigger_column, is_default, graph_data, created_at, updated_at)
|
|
209
|
+
VALUES ('wf-video-script-gen', 'Video Script Generation', 'Generate video script from feature description. Available when video feature is in TODO.', NULL, 'video', 'todo', 0, '${sqlEscape(videoScriptGraph)}', '${now}', '${now}')`
|
|
210
|
+
);
|
|
211
|
+
|
|
212
|
+
// Video Generate Preview workflow
|
|
213
|
+
const videoPreviewGraph = JSON.stringify({
|
|
214
|
+
nodes: [
|
|
215
|
+
{ id: 'start', type: 'start', position: { x: 50, y: 250 }, data: { label: 'Start' } },
|
|
216
|
+
{ id: 'agent_comp', type: 'runAgent', position: { x: 300, y: 250 }, data: { label: 'Run Composition Builder', agentId: 'b2c3d4e5-f6a7-8901-bcde-f12345678901', agentName: 'Default Video Composition Agent' } },
|
|
217
|
+
{ id: 'rebuild', type: 'rebuildBundle', position: { x: 600, y: 250 }, data: { label: 'Rebuild Bundle' } },
|
|
218
|
+
{ id: 'tts', type: 'generateTTS', position: { x: 900, y: 250 }, data: { label: 'Generate TTS', scriptPath: 'script.md', force: false, voiceId: '' } },
|
|
219
|
+
{ id: 'transition_qa', type: 'transitionCard', position: { x: 1200, y: 250 }, data: { label: 'Move to QA', fromColumn: 'in_review', toColumn: 'qa' } },
|
|
220
|
+
{ id: 'end_success', type: 'end', position: { x: 1500, y: 250 }, data: { label: 'End (Success)', outcome: 'success' } },
|
|
221
|
+
],
|
|
222
|
+
edges: [
|
|
223
|
+
{ id: 'e1', source: 'start', target: 'agent_comp' },
|
|
224
|
+
{ id: 'e2', source: 'agent_comp', target: 'rebuild' },
|
|
225
|
+
{ id: 'e3', source: 'rebuild', target: 'tts' },
|
|
226
|
+
{ id: 'e4', source: 'tts', target: 'transition_qa' },
|
|
227
|
+
{ id: 'e5', source: 'transition_qa', target: 'end_success' },
|
|
228
|
+
],
|
|
229
|
+
});
|
|
230
|
+
|
|
231
|
+
await client.execute(
|
|
232
|
+
`INSERT OR IGNORE INTO workflows (id, name, description, project_id, feature_type, trigger_column, is_default, graph_data, created_at, updated_at)
|
|
233
|
+
VALUES ('wf-video-gen-preview', 'Video Generate Preview', 'Build composition, rebuild bundle, and generate TTS audio. Available when video feature is in Review.', NULL, 'video', 'in_review', 0, '${sqlEscape(videoPreviewGraph)}', '${now}', '${now}')`
|
|
234
|
+
);
|
|
235
|
+
|
|
236
|
+
// Video Rendering Pipeline workflow
|
|
237
|
+
const videoRenderGraph = JSON.stringify({
|
|
238
|
+
nodes: [
|
|
239
|
+
{ id: 'start', type: 'start', position: { x: 50, y: 250 }, data: { label: 'Start' } },
|
|
240
|
+
{ id: 'render', type: 'renderVideo', position: { x: 300, y: 250 }, data: { label: 'Render Video', compositionId: '', resolution: '1920x1080', aspectRatio: '', fileOutputPrefix: '' } },
|
|
241
|
+
{ id: 'transition_done', type: 'transitionCard', position: { x: 600, y: 250 }, data: { label: 'Move to Done', fromColumn: 'qa', toColumn: 'done' } },
|
|
242
|
+
{ id: 'end_success', type: 'end', position: { x: 900, y: 250 }, data: { label: 'End (Success)', outcome: 'success' } },
|
|
243
|
+
],
|
|
244
|
+
edges: [
|
|
245
|
+
{ id: 'e1', source: 'start', target: 'render' },
|
|
246
|
+
{ id: 'e2', source: 'render', target: 'transition_done' },
|
|
247
|
+
{ id: 'e3', source: 'transition_done', target: 'end_success' },
|
|
248
|
+
],
|
|
249
|
+
});
|
|
250
|
+
|
|
251
|
+
await client.execute(
|
|
252
|
+
`INSERT OR IGNORE INTO workflows (id, name, description, project_id, feature_type, trigger_column, is_default, graph_data, created_at, updated_at)
|
|
253
|
+
VALUES ('wf-video-render', 'Video Rendering Pipeline', 'Render video with configurable resolution and output settings. Available when video feature is in QA.', NULL, 'video', 'qa', 0, '${sqlEscape(videoRenderGraph)}', '${now}', '${now}')`
|
|
254
|
+
);
|
|
255
|
+
|
|
256
|
+
return seeded;
|
|
257
|
+
}
|
|
258
|
+
|
|
111
259
|
async function main() {
|
|
112
260
|
console.log('Running migrations...');
|
|
113
261
|
await migrate(db, { migrationsFolder: './db/migrations' });
|
|
@@ -121,6 +269,10 @@ async function main() {
|
|
|
121
269
|
console.log('Column sync complete — all columns present.');
|
|
122
270
|
}
|
|
123
271
|
|
|
272
|
+
console.log('Seeding defaults...');
|
|
273
|
+
const seeded = await seedDefaults();
|
|
274
|
+
console.log(`Seed complete — ${seeded} default agent(s) present.`);
|
|
275
|
+
|
|
124
276
|
client.close();
|
|
125
277
|
process.exit(0);
|
|
126
278
|
}
|
package/templates/assistkick-product-system/packages/shared/db/migrations/0000_dashing_gorgon.sql
DELETED
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
CREATE TABLE `coherence_reviews` (
|
|
2
|
-
`id` text PRIMARY KEY NOT NULL,
|
|
3
|
-
`type` text NOT NULL,
|
|
4
|
-
`from_id` text,
|
|
5
|
-
`to_id` text,
|
|
6
|
-
`relation` text,
|
|
7
|
-
`proposed_node_type` text,
|
|
8
|
-
`proposed_node_name` text,
|
|
9
|
-
`target_node_id` text,
|
|
10
|
-
`proposed_description` text,
|
|
11
|
-
`confidence` text,
|
|
12
|
-
`batch_id` text,
|
|
13
|
-
`reasoning` text NOT NULL,
|
|
14
|
-
`status` text NOT NULL,
|
|
15
|
-
`created_at` text NOT NULL,
|
|
16
|
-
`resolved_at` text,
|
|
17
|
-
`project_id` text
|
|
18
|
-
);
|
|
19
|
-
--> statement-breakpoint
|
|
20
|
-
CREATE TABLE `edges` (
|
|
21
|
-
`from_id` text NOT NULL,
|
|
22
|
-
`relation` text NOT NULL,
|
|
23
|
-
`to_id` text NOT NULL,
|
|
24
|
-
`project_id` text,
|
|
25
|
-
PRIMARY KEY(`from_id`, `relation`, `to_id`)
|
|
26
|
-
);
|
|
27
|
-
--> statement-breakpoint
|
|
28
|
-
CREATE TABLE `invitations` (
|
|
29
|
-
`id` text PRIMARY KEY NOT NULL,
|
|
30
|
-
`email` text NOT NULL,
|
|
31
|
-
`token_hash` text NOT NULL,
|
|
32
|
-
`invited_by` text NOT NULL,
|
|
33
|
-
`expires_at` text NOT NULL,
|
|
34
|
-
`accepted_at` text,
|
|
35
|
-
`created_at` text NOT NULL,
|
|
36
|
-
FOREIGN KEY (`invited_by`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE no action
|
|
37
|
-
);
|
|
38
|
-
--> statement-breakpoint
|
|
39
|
-
CREATE TABLE `kanban` (
|
|
40
|
-
`node_id` text PRIMARY KEY NOT NULL,
|
|
41
|
-
`column_name` text NOT NULL,
|
|
42
|
-
`position` integer NOT NULL,
|
|
43
|
-
`project_id` text,
|
|
44
|
-
FOREIGN KEY (`node_id`) REFERENCES `nodes`(`id`) ON UPDATE no action ON DELETE no action
|
|
45
|
-
);
|
|
46
|
-
--> statement-breakpoint
|
|
47
|
-
CREATE TABLE `nodes` (
|
|
48
|
-
`id` text PRIMARY KEY NOT NULL,
|
|
49
|
-
`type` text NOT NULL,
|
|
50
|
-
`name` text NOT NULL,
|
|
51
|
-
`status` text NOT NULL,
|
|
52
|
-
`priority` text NOT NULL,
|
|
53
|
-
`completeness` real DEFAULT 0 NOT NULL,
|
|
54
|
-
`open_questions_count` integer DEFAULT 0 NOT NULL,
|
|
55
|
-
`kind` text,
|
|
56
|
-
`created_at` text NOT NULL,
|
|
57
|
-
`updated_at` text NOT NULL,
|
|
58
|
-
`body` text,
|
|
59
|
-
`project_id` text
|
|
60
|
-
);
|
|
61
|
-
--> statement-breakpoint
|
|
62
|
-
CREATE TABLE `password_reset_tokens` (
|
|
63
|
-
`id` text PRIMARY KEY NOT NULL,
|
|
64
|
-
`user_id` text NOT NULL,
|
|
65
|
-
`token_hash` text NOT NULL,
|
|
66
|
-
`expires_at` text NOT NULL,
|
|
67
|
-
`created_at` text NOT NULL,
|
|
68
|
-
`used_at` text,
|
|
69
|
-
FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE no action
|
|
70
|
-
);
|
|
71
|
-
--> statement-breakpoint
|
|
72
|
-
CREATE TABLE `pipeline_state` (
|
|
73
|
-
`feature_id` text PRIMARY KEY NOT NULL,
|
|
74
|
-
`status` text NOT NULL,
|
|
75
|
-
`cycle` integer DEFAULT 1 NOT NULL,
|
|
76
|
-
`tasks_json` text,
|
|
77
|
-
`tool_calls_json` text,
|
|
78
|
-
`work_summaries_json` text,
|
|
79
|
-
`error` text,
|
|
80
|
-
`updated_at` text NOT NULL,
|
|
81
|
-
`project_id` text
|
|
82
|
-
);
|
|
83
|
-
--> statement-breakpoint
|
|
84
|
-
CREATE TABLE `projects` (
|
|
85
|
-
`id` text PRIMARY KEY NOT NULL,
|
|
86
|
-
`name` text NOT NULL,
|
|
87
|
-
`is_default` integer DEFAULT 0 NOT NULL,
|
|
88
|
-
`archived_at` text,
|
|
89
|
-
`created_at` text NOT NULL,
|
|
90
|
-
`updated_at` text NOT NULL
|
|
91
|
-
);
|
|
92
|
-
--> statement-breakpoint
|
|
93
|
-
CREATE TABLE `refresh_tokens` (
|
|
94
|
-
`id` text PRIMARY KEY NOT NULL,
|
|
95
|
-
`user_id` text NOT NULL,
|
|
96
|
-
`token_hash` text NOT NULL,
|
|
97
|
-
`expires_at` text NOT NULL,
|
|
98
|
-
`created_at` text NOT NULL,
|
|
99
|
-
FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE no action
|
|
100
|
-
);
|
|
101
|
-
--> statement-breakpoint
|
|
102
|
-
CREATE TABLE `review_meta` (
|
|
103
|
-
`key` text PRIMARY KEY NOT NULL,
|
|
104
|
-
`value` text NOT NULL,
|
|
105
|
-
`project_id` text
|
|
106
|
-
);
|
|
107
|
-
--> statement-breakpoint
|
|
108
|
-
CREATE TABLE `sessions` (
|
|
109
|
-
`session_number` integer PRIMARY KEY NOT NULL,
|
|
110
|
-
`started_at` text NOT NULL,
|
|
111
|
-
`ended_at` text,
|
|
112
|
-
`summary` text,
|
|
113
|
-
`nodes_touched` text,
|
|
114
|
-
`questions_resolved` integer DEFAULT 0 NOT NULL,
|
|
115
|
-
`body` text,
|
|
116
|
-
`project_id` text
|
|
117
|
-
);
|
|
118
|
-
--> statement-breakpoint
|
|
119
|
-
CREATE TABLE `users` (
|
|
120
|
-
`id` text PRIMARY KEY NOT NULL,
|
|
121
|
-
`email` text NOT NULL,
|
|
122
|
-
`password_hash` text NOT NULL,
|
|
123
|
-
`role` text DEFAULT 'user' NOT NULL,
|
|
124
|
-
`created_at` text NOT NULL,
|
|
125
|
-
`updated_at` text NOT NULL
|
|
126
|
-
);
|
|
127
|
-
--> statement-breakpoint
|
|
128
|
-
CREATE UNIQUE INDEX `users_email_unique` ON `users` (`email`);
|
package/templates/assistkick-product-system/packages/shared/db/migrations/0001_vengeful_wallop.sql
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
ALTER TABLE `pipeline_state` ADD `stage_stats_json` text;
|
package/templates/assistkick-product-system/packages/shared/db/migrations/0002_greedy_excalibur.sql
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
ALTER TABLE `projects` ADD `repo_url` text;--> statement-breakpoint
|
|
2
|
-
ALTER TABLE `projects` ADD `github_installation_id` text;--> statement-breakpoint
|
|
3
|
-
ALTER TABLE `projects` ADD `github_repo_full_name` text;--> statement-breakpoint
|
|
4
|
-
ALTER TABLE `projects` ADD `base_branch` text;
|
package/templates/assistkick-product-system/packages/shared/db/migrations/0003_lonely_cyclops.sql
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
PRAGMA foreign_keys=OFF;--> statement-breakpoint
|
|
2
|
-
CREATE TABLE `__new_sessions` (
|
|
3
|
-
`session_number` integer NOT NULL,
|
|
4
|
-
`started_at` text NOT NULL,
|
|
5
|
-
`ended_at` text,
|
|
6
|
-
`summary` text,
|
|
7
|
-
`nodes_touched` text,
|
|
8
|
-
`questions_resolved` integer DEFAULT 0 NOT NULL,
|
|
9
|
-
`body` text,
|
|
10
|
-
`project_id` text NOT NULL,
|
|
11
|
-
PRIMARY KEY(`session_number`, `project_id`)
|
|
12
|
-
);
|
|
13
|
-
--> statement-breakpoint
|
|
14
|
-
INSERT INTO `__new_sessions`("session_number", "started_at", "ended_at", "summary", "nodes_touched", "questions_resolved", "body", "project_id") SELECT "session_number", "started_at", "ended_at", "summary", "nodes_touched", "questions_resolved", "body", "project_id" FROM `sessions`;--> statement-breakpoint
|
|
15
|
-
DROP TABLE `sessions`;--> statement-breakpoint
|
|
16
|
-
ALTER TABLE `__new_sessions` RENAME TO `sessions`;--> statement-breakpoint
|
|
17
|
-
PRAGMA foreign_keys=ON;
|