@assistkick/create 1.32.0 → 1.34.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/package.json +3 -1
- package/templates/assistkick-product-system/packages/backend/src/server.ts +1 -1
- package/templates/assistkick-product-system/packages/backend/src/services/chat_cli_bridge.ts +41 -16
- package/templates/assistkick-product-system/packages/backend/src/services/chat_ws_handler.ts +25 -5
- package/templates/assistkick-product-system/packages/frontend/src/components/GraphLegend.tsx +10 -3
- package/templates/assistkick-product-system/packages/frontend/src/constants/graph.ts +8 -1
- package/templates/assistkick-product-system/packages/frontend/src/hooks/use_chat_stream.ts +23 -32
- package/templates/assistkick-product-system/packages/frontend/src/lib/chat_message_helpers.test.ts +105 -0
- package/templates/assistkick-product-system/packages/frontend/src/lib/chat_message_helpers.ts +48 -1
- package/templates/assistkick-product-system/packages/shared/db/migrate.ts +46 -2
- package/templates/assistkick-product-system/packages/shared/db/migrations/0003_solid_manta.sql +1 -0
- package/templates/assistkick-product-system/packages/shared/db/migrations/meta/0003_snapshot.json +1836 -0
- package/templates/assistkick-product-system/packages/shared/db/migrations/meta/_journal.json +7 -0
- package/templates/assistkick-product-system/packages/shared/db/schema.ts +1 -0
- package/templates/assistkick-product-system/packages/shared/lib/constants.ts +12 -0
- package/templates/assistkick-product-system/packages/shared/lib/embedding_service.test.ts +75 -0
- package/templates/assistkick-product-system/packages/shared/lib/embedding_service.ts +100 -0
- package/templates/assistkick-product-system/packages/shared/lib/relevance_search.ts +50 -38
- package/templates/assistkick-product-system/packages/shared/package.json +1 -0
- package/templates/assistkick-product-system/packages/shared/tools/add_node.ts +11 -3
- package/templates/assistkick-product-system/packages/shared/tools/delete_note.ts +50 -0
- package/templates/assistkick-product-system/packages/shared/tools/save_note.ts +79 -0
- package/templates/assistkick-product-system/packages/shared/tools/search_nodes.ts +6 -1
- package/templates/assistkick-product-system/packages/shared/tools/search_notes.ts +99 -0
- package/templates/assistkick-product-system/packages/shared/tools/update_node.ts +15 -0
|
@@ -156,6 +156,31 @@ async function seedDefaults() {
|
|
|
156
156
|
if (check.rows.length > 0) seeded++;
|
|
157
157
|
}
|
|
158
158
|
|
|
159
|
+
// Default Chat Agent — system prompt for the chat bridge
|
|
160
|
+
const chatGrounding = `We are working on project-id {{projectId}}
|
|
161
|
+
|
|
162
|
+
## Project Workspace
|
|
163
|
+
The project workspace is at: {{workspacePath}}
|
|
164
|
+
All file edits (write, edit, delete, create) MUST target files inside the workspace directory above.
|
|
165
|
+
You may read files from anywhere in the project root for context, but all changes go into the workspace.
|
|
166
|
+
|
|
167
|
+
## Git Repository Structure
|
|
168
|
+
The workspace ({{workspacePath}}) has its OWN independent git repo.
|
|
169
|
+
When committing and pushing changes, always use the workspace git repo, not the top-level repo.
|
|
170
|
+
|
|
171
|
+
## Skills
|
|
172
|
+
Project skills (e.g. assistkick-interview, assistkick-developer, etc.) are available via the Skill tool.
|
|
173
|
+
To invoke a skill, always use the Skill tool (e.g. Skill with skill: "assistkick-interview"). Do NOT manually read or execute skill files — the Skill tool handles loading and execution.
|
|
174
|
+
Only edit code and project files — never modify skill definition files.`;
|
|
175
|
+
|
|
176
|
+
const chatGroundingEscaped = sqlEscape(chatGrounding);
|
|
177
|
+
await client.execute(
|
|
178
|
+
`INSERT OR IGNORE INTO agents (id, name, model, skills, grounding, default_grounding, project_id, is_default, created_at, updated_at)
|
|
179
|
+
VALUES ('chat-agent-default', 'Chat Agent', 'claude-opus-4-6', '[]', '${chatGroundingEscaped}', '${chatGroundingEscaped}', NULL, 1, '${now}', '${now}')`
|
|
180
|
+
);
|
|
181
|
+
const chatCheck = await client.execute(`SELECT id FROM agents WHERE id = 'chat-agent-default'`);
|
|
182
|
+
if (chatCheck.rows.length > 0) seeded++;
|
|
183
|
+
|
|
159
184
|
// Default Pipeline workflow
|
|
160
185
|
const defaultPipelineGraph = JSON.stringify({
|
|
161
186
|
nodes: [
|
|
@@ -256,6 +281,16 @@ async function seedDefaults() {
|
|
|
256
281
|
return seeded;
|
|
257
282
|
}
|
|
258
283
|
|
|
284
|
+
/**
|
|
285
|
+
* Backfill embeddings for all nodes that don't have one yet.
|
|
286
|
+
* Uses the embedding service to compute vectors locally.
|
|
287
|
+
*/
|
|
288
|
+
async function backfillEmbeddings() {
|
|
289
|
+
const { backfillEmbeddings: runBackfill } = await import('../lib/embedding_service.js');
|
|
290
|
+
const count = await runBackfill((msg) => console.log(msg));
|
|
291
|
+
return count;
|
|
292
|
+
}
|
|
293
|
+
|
|
259
294
|
async function main() {
|
|
260
295
|
console.log('Running migrations...');
|
|
261
296
|
await migrate(db, { migrationsFolder: './db/migrations' });
|
|
@@ -273,12 +308,21 @@ async function main() {
|
|
|
273
308
|
const seeded = await seedDefaults();
|
|
274
309
|
console.log(`Seed complete — ${seeded} default agent(s) present.`);
|
|
275
310
|
|
|
311
|
+
console.log('Backfilling embeddings...');
|
|
312
|
+
const embedded = await backfillEmbeddings();
|
|
313
|
+
if (embedded > 0) {
|
|
314
|
+
console.log(`Embedding backfill complete — embedded ${embedded} node(s).`);
|
|
315
|
+
} else {
|
|
316
|
+
console.log('Embedding backfill complete — all nodes have embeddings.');
|
|
317
|
+
}
|
|
318
|
+
|
|
276
319
|
client.close();
|
|
277
|
-
|
|
320
|
+
// Allow onnxruntime native cleanup to complete before exit
|
|
321
|
+
setTimeout(() => process.exit(0), 100);
|
|
278
322
|
}
|
|
279
323
|
|
|
280
324
|
main().catch((err) => {
|
|
281
325
|
console.error('Migration failed:', err);
|
|
282
326
|
client.close();
|
|
283
|
-
process.exit(1);
|
|
327
|
+
setTimeout(() => process.exit(1), 100);
|
|
284
328
|
});
|
package/templates/assistkick-product-system/packages/shared/db/migrations/0003_solid_manta.sql
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
ALTER TABLE `nodes` ADD `embedding` text;
|