@boluo-ai/daemon 0.1.0 → 0.1.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.
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
-- Boluo initial schema. Forward-only migrations (see DESIGN.md §九).
|
|
2
|
+
-- Rules: every column NOT NULL + DEFAULT; no CHECK constraints (enums in app layer).
|
|
3
|
+
|
|
4
|
+
CREATE TABLE IF NOT EXISTS workspaces (
|
|
5
|
+
id TEXT PRIMARY KEY,
|
|
6
|
+
name TEXT NOT NULL DEFAULT '',
|
|
7
|
+
path TEXT NOT NULL DEFAULT '',
|
|
8
|
+
last_opened_at INTEGER NOT NULL DEFAULT 0,
|
|
9
|
+
created_at INTEGER NOT NULL DEFAULT 0
|
|
10
|
+
);
|
|
11
|
+
|
|
12
|
+
CREATE INDEX IF NOT EXISTS idx_workspaces_last_opened
|
|
13
|
+
ON workspaces(last_opened_at);
|
|
14
|
+
|
|
15
|
+
CREATE TABLE IF NOT EXISTS tasks (
|
|
16
|
+
id TEXT PRIMARY KEY,
|
|
17
|
+
workspace_id TEXT NOT NULL,
|
|
18
|
+
title TEXT NOT NULL DEFAULT '',
|
|
19
|
+
agent_kind TEXT NOT NULL DEFAULT '',
|
|
20
|
+
default_model TEXT NOT NULL DEFAULT '',
|
|
21
|
+
permission_mode TEXT NOT NULL DEFAULT 'bypass',
|
|
22
|
+
status TEXT NOT NULL DEFAULT 'active',
|
|
23
|
+
created_at INTEGER NOT NULL DEFAULT 0,
|
|
24
|
+
last_active_at INTEGER NOT NULL DEFAULT 0,
|
|
25
|
+
FOREIGN KEY (workspace_id) REFERENCES workspaces(id) ON DELETE CASCADE
|
|
26
|
+
);
|
|
27
|
+
|
|
28
|
+
CREATE INDEX IF NOT EXISTS idx_tasks_workspace
|
|
29
|
+
ON tasks(workspace_id, last_active_at);
|
|
30
|
+
|
|
31
|
+
CREATE TABLE IF NOT EXISTS sessions (
|
|
32
|
+
id TEXT PRIMARY KEY,
|
|
33
|
+
task_id TEXT NOT NULL,
|
|
34
|
+
agent_session_id TEXT NOT NULL DEFAULT '',
|
|
35
|
+
model TEXT NOT NULL DEFAULT '',
|
|
36
|
+
status TEXT NOT NULL DEFAULT 'idle',
|
|
37
|
+
created_at INTEGER NOT NULL DEFAULT 0,
|
|
38
|
+
FOREIGN KEY (task_id) REFERENCES tasks(id) ON DELETE CASCADE
|
|
39
|
+
);
|
|
40
|
+
|
|
41
|
+
CREATE INDEX IF NOT EXISTS idx_sessions_task
|
|
42
|
+
ON sessions(task_id, created_at);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@boluo-ai/daemon",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Boluo daemon — runs agent CLIs (Claude/Codex/Copilot) on your work machine and tunnels them through an encrypted relay.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"homepage": "https://github.com/ascdong/buoluo",
|
|
31
31
|
"scripts": {
|
|
32
32
|
"dev": "tsx watch src/cli.ts",
|
|
33
|
-
"build": "tsup",
|
|
33
|
+
"build": "tsup && cp -r src/db/migrations dist/migrations",
|
|
34
34
|
"typecheck": "tsc -b --noEmit",
|
|
35
35
|
"test": "vitest run",
|
|
36
36
|
"test:watch": "vitest",
|