@zonease/aiworker-cli 0.12.2 → 0.13.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 +158 -350
- package/aiworker-bun.js +614 -694
- package/drizzle/worker/0000_polite_stellaris.sql +219 -0
- package/drizzle/worker/0001_red_lady_mastermind.sql +29 -0
- package/drizzle/worker/0002_concerned_slyde.sql +45 -0
- package/drizzle/worker/meta/0000_snapshot.json +1055 -194
- package/drizzle/worker/meta/0001_snapshot.json +1244 -222
- package/drizzle/worker/meta/0002_snapshot.json +1557 -273
- package/drizzle/worker/meta/_journal.json +6 -48
- package/official-apps/aiworker-hr/README.md +16 -0
- package/official-apps/aiworker-hr/capabilities/candidate-screen/prompt.md +3 -0
- package/official-apps/aiworker-hr/capabilities/candidate-screen/review.md +5 -0
- package/official-apps/aiworker-hr/capabilities/person-profile/prompt.md +3 -0
- package/official-apps/aiworker-hr/capabilities/person-profile/review.md +5 -0
- package/official-apps/aiworker-hr/dist/host-mounted.js +15677 -0
- package/official-apps/aiworker-hr/dist/index.js +15411 -0
- package/official-apps/aiworker-hr/dist/standalone.js +15451 -0
- package/official-apps/aiworker-hr/migrations/0001_hr.sql +2 -0
- package/official-apps/aiworker-hr/package.json +31 -0
- package/official-apps/aiworker-hr/packs/hr-recruiting/SOUL.md +7 -0
- package/official-apps/aiworker-hr/review/candidate-screen.md +5 -0
- package/official-apps/aiworker-hr/review/person-profile.md +5 -0
- package/official-apps/aiworker-hr/schemas/candidate-screen.schema.json +50 -0
- package/official-apps/aiworker-hr/schemas/person-profile.schema.json +50 -0
- package/official-apps/aiworker-hr/soul-app.manifest.json +374 -0
- package/official-apps/aiworker-hr/src/api.ts +1 -0
- package/official-apps/aiworker-hr/src/host-mounted.ts +308 -0
- package/official-apps/aiworker-hr/src/index.ts +152 -0
- package/official-apps/aiworker-hr/src/protocol/artifact.ts +2 -0
- package/official-apps/aiworker-hr/src/protocol/connectors.ts +2 -0
- package/official-apps/aiworker-hr/src/protocol/lifecycle.ts +2 -0
- package/official-apps/aiworker-hr/src/protocol/review.ts +2 -0
- package/official-apps/aiworker-hr/src/protocol/runtime.ts +2 -0
- package/official-apps/aiworker-hr/src/protocol/ui.ts +2 -0
- package/official-apps/aiworker-hr/src/standalone.ts +43 -0
- package/official-apps/aiworker-hr/src/ui/candidate-screen-preview.tsx +2 -0
- package/official-apps/aiworker-hr/src/ui/hr-route.tsx +1 -0
- package/official-apps/aiworker-hr/src/ui/people-widget.tsx +1 -0
- package/official-apps/aiworker-hr/src/ui/person-profile-preview.tsx +2 -0
- package/official-apps/aiworker-hr/src/ui/profile-panel.tsx +1 -0
- package/official-apps/aiworker-hr/src/ui/review-panel.tsx +1 -0
- package/official-apps/aiworker-hr/tsconfig.json +20 -0
- package/official-apps/aiworker-qa/README.md +14 -0
- package/official-apps/aiworker-qa/capabilities/regression-matrix/prompt.md +3 -0
- package/official-apps/aiworker-qa/capabilities/regression-matrix/review.md +5 -0
- package/official-apps/aiworker-qa/capabilities/release-gate/prompt.md +3 -0
- package/official-apps/aiworker-qa/capabilities/release-gate/review.md +5 -0
- package/official-apps/aiworker-qa/dist/host-mounted.js +15655 -0
- package/official-apps/aiworker-qa/dist/index.js +15395 -0
- package/official-apps/aiworker-qa/dist/standalone.js +15435 -0
- package/official-apps/aiworker-qa/migrations/0001_qa.sql +2 -0
- package/official-apps/aiworker-qa/package.json +31 -0
- package/official-apps/aiworker-qa/packs/qa-reviewer/SOUL.md +7 -0
- package/official-apps/aiworker-qa/review/regression-matrix.md +5 -0
- package/official-apps/aiworker-qa/review/release-gate.md +5 -0
- package/official-apps/aiworker-qa/schemas/regression-matrix.schema.json +50 -0
- package/official-apps/aiworker-qa/schemas/release-gate.schema.json +50 -0
- package/official-apps/aiworker-qa/soul-app.manifest.json +356 -0
- package/official-apps/aiworker-qa/src/api.ts +1 -0
- package/official-apps/aiworker-qa/src/host-mounted.ts +302 -0
- package/official-apps/aiworker-qa/src/index.ts +152 -0
- package/official-apps/aiworker-qa/src/protocol/artifact.ts +2 -0
- package/official-apps/aiworker-qa/src/protocol/connectors.ts +2 -0
- package/official-apps/aiworker-qa/src/protocol/lifecycle.ts +2 -0
- package/official-apps/aiworker-qa/src/protocol/review.ts +2 -0
- package/official-apps/aiworker-qa/src/protocol/runtime.ts +2 -0
- package/official-apps/aiworker-qa/src/protocol/ui.ts +2 -0
- package/official-apps/aiworker-qa/src/standalone.ts +43 -0
- package/official-apps/aiworker-qa/src/ui/qa-route.tsx +1 -0
- package/official-apps/aiworker-qa/src/ui/regression-matrix-preview.tsx +2 -0
- package/official-apps/aiworker-qa/src/ui/release-gate-preview.tsx +2 -0
- package/official-apps/aiworker-qa/src/ui/release-panel.tsx +1 -0
- package/official-apps/aiworker-qa/src/ui/release-review-panel.tsx +1 -0
- package/official-apps/aiworker-qa/src/ui/release-widget.tsx +1 -0
- package/official-apps/aiworker-qa/src/ui/review-panel.tsx +1 -0
- package/official-apps/aiworker-qa/tsconfig.json +20 -0
- package/package.json +5 -4
- package/web/worker/assets/index-K-y56wrL.css +2 -0
- package/web/worker/assets/index-YNnnk64n.js +18 -0
- package/web/worker/assets/markdown-preview-DFe-rfff.js +29 -0
- package/web/worker/assets/people-workbench-BzWwSc2I.js +1 -0
- package/web/worker/engine-icons/claude.svg +1 -0
- package/web/worker/engine-icons/cursor.svg +1 -0
- package/web/worker/engine-icons/gemini.svg +1 -0
- package/web/worker/engine-icons/hermesagent.svg +1 -0
- package/web/worker/engine-icons/openai.svg +1 -0
- package/web/worker/engine-icons/opencode.svg +1 -0
- package/web/worker/engine-icons/qwen.svg +1 -0
- package/web/worker/fonts/inter-latin-wght-normal.woff2 +0 -0
- package/web/worker/fonts/jetbrains-mono-latin-wght-normal.woff2 +0 -0
- package/web/worker/fonts/nunito-latin-wght-normal.woff2 +0 -0
- package/web/worker/index.html +8 -4
- package/web/worker/logo.svg +8 -0
- package/drizzle/fleet/0000_fine_havok.sql +0 -23
- package/drizzle/fleet/meta/0000_snapshot.json +0 -165
- package/drizzle/fleet/meta/_journal.json +0 -13
- package/drizzle/worker/0000_spooky_kat_farrell.sql +0 -112
- package/drizzle/worker/0001_secret_dagger.sql +0 -1
- package/drizzle/worker/0002_jazzy_moondragon.sql +0 -13
- package/drizzle/worker/0003_rare_cloak.sql +0 -7
- package/drizzle/worker/0004_daffy_thing.sql +0 -26
- package/drizzle/worker/0005_worthless_whiplash.sql +0 -20
- package/drizzle/worker/0006_fair_jetstream.sql +0 -34
- package/drizzle/worker/0007_solid_bromley.sql +0 -11
- package/drizzle/worker/0008_peaceful_titanium_man.sql +0 -14
- package/drizzle/worker/meta/0003_snapshot.json +0 -873
- package/drizzle/worker/meta/0004_snapshot.json +0 -1058
- package/drizzle/worker/meta/0005_snapshot.json +0 -1192
- package/drizzle/worker/meta/0006_snapshot.json +0 -1420
- package/drizzle/worker/meta/0007_snapshot.json +0 -1489
- package/drizzle/worker/meta/0008_snapshot.json +0 -1593
- package/web/fleet/assets/index-BTknRPEg.js +0 -1372
- package/web/fleet/assets/index-lu-9OhC0.css +0 -2
- package/web/fleet/favicon.svg +0 -4
- package/web/fleet/index.html +0 -14
- package/web/worker/assets/index-DuxsPbd7.js +0 -1382
- package/web/worker/assets/index-lu-9OhC0.css +0 -2
package/web/worker/index.html
CHANGED
|
@@ -2,11 +2,15 @@
|
|
|
2
2
|
<html lang="en">
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="UTF-8" />
|
|
5
|
-
<link rel="icon" type="image/svg+xml" href="
|
|
5
|
+
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
|
6
|
+
<link rel="preload" href="/fonts/nunito-latin-wght-normal.woff2" as="font" type="font/woff2" crossorigin />
|
|
7
|
+
<link rel="preload" href="/fonts/inter-latin-wght-normal.woff2" as="font" type="font/woff2" crossorigin />
|
|
8
|
+
<link rel="preload" href="/fonts/jetbrains-mono-latin-wght-normal.woff2" as="font" type="font/woff2" crossorigin />
|
|
6
9
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
|
-
<title>AIWorker ·
|
|
8
|
-
<script type="module" crossorigin src="
|
|
9
|
-
<link rel="
|
|
10
|
+
<title>AIWorker · Soul Workspace</title>
|
|
11
|
+
<script type="module" crossorigin src="/assets/index-YNnnk64n.js"></script>
|
|
12
|
+
<link rel="modulepreload" crossorigin href="/assets/markdown-preview-DFe-rfff.js">
|
|
13
|
+
<link rel="stylesheet" crossorigin href="/assets/index-K-y56wrL.css">
|
|
10
14
|
</head>
|
|
11
15
|
<body>
|
|
12
16
|
<div id="root"></div>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" fill="none" role="img" aria-label="AIWorker">
|
|
2
|
+
<title>AIWorker</title>
|
|
3
|
+
<rect x="8" y="8" width="48" height="48" rx="14" fill="#1A1916"/>
|
|
4
|
+
<path d="M19 43L29.2 20H35L45 43H38.8L36.9 38.2H27L25.1 43H19Z" fill="#FAF9F7"/>
|
|
5
|
+
<path d="M28.8 33.6H35.1L31.9 25.7L28.8 33.6Z" fill="#C96442"/>
|
|
6
|
+
<circle cx="46" cy="18" r="5" fill="#C96442"/>
|
|
7
|
+
<path d="M41.7 45.2L47.2 39.7" stroke="#FAF9F7" stroke-width="3" stroke-linecap="round"/>
|
|
8
|
+
</svg>
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
CREATE TABLE `audit_events` (
|
|
2
|
-
`id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
|
|
3
|
-
`at` text NOT NULL,
|
|
4
|
-
`actor` text NOT NULL,
|
|
5
|
-
`action` text NOT NULL,
|
|
6
|
-
`worker_id` text,
|
|
7
|
-
`detail` text
|
|
8
|
-
);
|
|
9
|
-
--> statement-breakpoint
|
|
10
|
-
CREATE INDEX `audit_events_worker_id_idx` ON `audit_events` (`worker_id`);--> statement-breakpoint
|
|
11
|
-
CREATE TABLE `registered_workers` (
|
|
12
|
-
`id` text PRIMARY KEY NOT NULL,
|
|
13
|
-
`base_url` text NOT NULL,
|
|
14
|
-
`display_name` text NOT NULL,
|
|
15
|
-
`api_token_enc` text NOT NULL,
|
|
16
|
-
`nonce` text NOT NULL,
|
|
17
|
-
`auth_tag` text NOT NULL,
|
|
18
|
-
`added_at` text NOT NULL,
|
|
19
|
-
`added_by` text NOT NULL,
|
|
20
|
-
`last_seen_at` text,
|
|
21
|
-
`last_seen_state` text,
|
|
22
|
-
`last_config_version` integer
|
|
23
|
-
);
|
|
@@ -1,165 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": "6",
|
|
3
|
-
"dialect": "sqlite",
|
|
4
|
-
"id": "43336a7a-f75f-44b7-bc26-13b072eff453",
|
|
5
|
-
"prevId": "00000000-0000-0000-0000-000000000000",
|
|
6
|
-
"tables": {
|
|
7
|
-
"audit_events": {
|
|
8
|
-
"name": "audit_events",
|
|
9
|
-
"columns": {
|
|
10
|
-
"id": {
|
|
11
|
-
"name": "id",
|
|
12
|
-
"type": "integer",
|
|
13
|
-
"primaryKey": true,
|
|
14
|
-
"notNull": true,
|
|
15
|
-
"autoincrement": true
|
|
16
|
-
},
|
|
17
|
-
"at": {
|
|
18
|
-
"name": "at",
|
|
19
|
-
"type": "text",
|
|
20
|
-
"primaryKey": false,
|
|
21
|
-
"notNull": true,
|
|
22
|
-
"autoincrement": false
|
|
23
|
-
},
|
|
24
|
-
"actor": {
|
|
25
|
-
"name": "actor",
|
|
26
|
-
"type": "text",
|
|
27
|
-
"primaryKey": false,
|
|
28
|
-
"notNull": true,
|
|
29
|
-
"autoincrement": false
|
|
30
|
-
},
|
|
31
|
-
"action": {
|
|
32
|
-
"name": "action",
|
|
33
|
-
"type": "text",
|
|
34
|
-
"primaryKey": false,
|
|
35
|
-
"notNull": true,
|
|
36
|
-
"autoincrement": false
|
|
37
|
-
},
|
|
38
|
-
"worker_id": {
|
|
39
|
-
"name": "worker_id",
|
|
40
|
-
"type": "text",
|
|
41
|
-
"primaryKey": false,
|
|
42
|
-
"notNull": false,
|
|
43
|
-
"autoincrement": false
|
|
44
|
-
},
|
|
45
|
-
"detail": {
|
|
46
|
-
"name": "detail",
|
|
47
|
-
"type": "text",
|
|
48
|
-
"primaryKey": false,
|
|
49
|
-
"notNull": false,
|
|
50
|
-
"autoincrement": false
|
|
51
|
-
}
|
|
52
|
-
},
|
|
53
|
-
"indexes": {
|
|
54
|
-
"audit_events_worker_id_idx": {
|
|
55
|
-
"name": "audit_events_worker_id_idx",
|
|
56
|
-
"columns": [
|
|
57
|
-
"worker_id"
|
|
58
|
-
],
|
|
59
|
-
"isUnique": false
|
|
60
|
-
}
|
|
61
|
-
},
|
|
62
|
-
"foreignKeys": {},
|
|
63
|
-
"compositePrimaryKeys": {},
|
|
64
|
-
"uniqueConstraints": {},
|
|
65
|
-
"checkConstraints": {}
|
|
66
|
-
},
|
|
67
|
-
"registered_workers": {
|
|
68
|
-
"name": "registered_workers",
|
|
69
|
-
"columns": {
|
|
70
|
-
"id": {
|
|
71
|
-
"name": "id",
|
|
72
|
-
"type": "text",
|
|
73
|
-
"primaryKey": true,
|
|
74
|
-
"notNull": true,
|
|
75
|
-
"autoincrement": false
|
|
76
|
-
},
|
|
77
|
-
"base_url": {
|
|
78
|
-
"name": "base_url",
|
|
79
|
-
"type": "text",
|
|
80
|
-
"primaryKey": false,
|
|
81
|
-
"notNull": true,
|
|
82
|
-
"autoincrement": false
|
|
83
|
-
},
|
|
84
|
-
"display_name": {
|
|
85
|
-
"name": "display_name",
|
|
86
|
-
"type": "text",
|
|
87
|
-
"primaryKey": false,
|
|
88
|
-
"notNull": true,
|
|
89
|
-
"autoincrement": false
|
|
90
|
-
},
|
|
91
|
-
"api_token_enc": {
|
|
92
|
-
"name": "api_token_enc",
|
|
93
|
-
"type": "text",
|
|
94
|
-
"primaryKey": false,
|
|
95
|
-
"notNull": true,
|
|
96
|
-
"autoincrement": false
|
|
97
|
-
},
|
|
98
|
-
"nonce": {
|
|
99
|
-
"name": "nonce",
|
|
100
|
-
"type": "text",
|
|
101
|
-
"primaryKey": false,
|
|
102
|
-
"notNull": true,
|
|
103
|
-
"autoincrement": false
|
|
104
|
-
},
|
|
105
|
-
"auth_tag": {
|
|
106
|
-
"name": "auth_tag",
|
|
107
|
-
"type": "text",
|
|
108
|
-
"primaryKey": false,
|
|
109
|
-
"notNull": true,
|
|
110
|
-
"autoincrement": false
|
|
111
|
-
},
|
|
112
|
-
"added_at": {
|
|
113
|
-
"name": "added_at",
|
|
114
|
-
"type": "text",
|
|
115
|
-
"primaryKey": false,
|
|
116
|
-
"notNull": true,
|
|
117
|
-
"autoincrement": false
|
|
118
|
-
},
|
|
119
|
-
"added_by": {
|
|
120
|
-
"name": "added_by",
|
|
121
|
-
"type": "text",
|
|
122
|
-
"primaryKey": false,
|
|
123
|
-
"notNull": true,
|
|
124
|
-
"autoincrement": false
|
|
125
|
-
},
|
|
126
|
-
"last_seen_at": {
|
|
127
|
-
"name": "last_seen_at",
|
|
128
|
-
"type": "text",
|
|
129
|
-
"primaryKey": false,
|
|
130
|
-
"notNull": false,
|
|
131
|
-
"autoincrement": false
|
|
132
|
-
},
|
|
133
|
-
"last_seen_state": {
|
|
134
|
-
"name": "last_seen_state",
|
|
135
|
-
"type": "text",
|
|
136
|
-
"primaryKey": false,
|
|
137
|
-
"notNull": false,
|
|
138
|
-
"autoincrement": false
|
|
139
|
-
},
|
|
140
|
-
"last_config_version": {
|
|
141
|
-
"name": "last_config_version",
|
|
142
|
-
"type": "integer",
|
|
143
|
-
"primaryKey": false,
|
|
144
|
-
"notNull": false,
|
|
145
|
-
"autoincrement": false
|
|
146
|
-
}
|
|
147
|
-
},
|
|
148
|
-
"indexes": {},
|
|
149
|
-
"foreignKeys": {},
|
|
150
|
-
"compositePrimaryKeys": {},
|
|
151
|
-
"uniqueConstraints": {},
|
|
152
|
-
"checkConstraints": {}
|
|
153
|
-
}
|
|
154
|
-
},
|
|
155
|
-
"views": {},
|
|
156
|
-
"enums": {},
|
|
157
|
-
"_meta": {
|
|
158
|
-
"schemas": {},
|
|
159
|
-
"tables": {},
|
|
160
|
-
"columns": {}
|
|
161
|
-
},
|
|
162
|
-
"internal": {
|
|
163
|
-
"indexes": {}
|
|
164
|
-
}
|
|
165
|
-
}
|
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
CREATE TABLE `agent_tasks` (
|
|
2
|
-
`id` text PRIMARY KEY NOT NULL,
|
|
3
|
-
`prompt` text NOT NULL,
|
|
4
|
-
`status` text NOT NULL,
|
|
5
|
-
`conversation_id` text,
|
|
6
|
-
`created_at` text NOT NULL,
|
|
7
|
-
`finished_at` text,
|
|
8
|
-
`result` text,
|
|
9
|
-
`error` text
|
|
10
|
-
);
|
|
11
|
-
--> statement-breakpoint
|
|
12
|
-
CREATE TABLE `conversations` (
|
|
13
|
-
`id` text PRIMARY KEY NOT NULL,
|
|
14
|
-
`task_id` text,
|
|
15
|
-
`channel` text NOT NULL,
|
|
16
|
-
`chat_id` text NOT NULL,
|
|
17
|
-
`thread_id` text,
|
|
18
|
-
`status` text DEFAULT 'open' NOT NULL,
|
|
19
|
-
`summary` text,
|
|
20
|
-
`started_at` text NOT NULL,
|
|
21
|
-
`last_active_at` text NOT NULL,
|
|
22
|
-
`closed_at` text,
|
|
23
|
-
FOREIGN KEY (`task_id`) REFERENCES `agent_tasks`(`id`) ON UPDATE no action ON DELETE no action
|
|
24
|
-
);
|
|
25
|
-
--> statement-breakpoint
|
|
26
|
-
CREATE TABLE `evolution_observations` (
|
|
27
|
-
`id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
|
|
28
|
-
`conversation_id` text,
|
|
29
|
-
`kind` text NOT NULL,
|
|
30
|
-
`payload` text NOT NULL,
|
|
31
|
-
`noticed_at` text NOT NULL
|
|
32
|
-
);
|
|
33
|
-
--> statement-breakpoint
|
|
34
|
-
CREATE TABLE `execution_logs` (
|
|
35
|
-
`id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
|
|
36
|
-
`conversation_id` text,
|
|
37
|
-
`tool_name` text NOT NULL,
|
|
38
|
-
`params` text,
|
|
39
|
-
`result` text,
|
|
40
|
-
`duration` integer,
|
|
41
|
-
`created_at` text NOT NULL
|
|
42
|
-
);
|
|
43
|
-
--> statement-breakpoint
|
|
44
|
-
CREATE TABLE `messages` (
|
|
45
|
-
`id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
|
|
46
|
-
`conversation_id` text NOT NULL,
|
|
47
|
-
`role` text NOT NULL,
|
|
48
|
-
`content` text NOT NULL,
|
|
49
|
-
`tool_calls` text,
|
|
50
|
-
`tool_call_id` text,
|
|
51
|
-
`tokens_in` integer,
|
|
52
|
-
`tokens_out` integer,
|
|
53
|
-
`created_at` text NOT NULL,
|
|
54
|
-
FOREIGN KEY (`conversation_id`) REFERENCES `conversations`(`id`) ON UPDATE no action ON DELETE cascade
|
|
55
|
-
);
|
|
56
|
-
--> statement-breakpoint
|
|
57
|
-
CREATE TABLE `skill_bindings` (
|
|
58
|
-
`id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
|
|
59
|
-
`source` text NOT NULL,
|
|
60
|
-
`brain_name` text,
|
|
61
|
-
`skill_name` text NOT NULL,
|
|
62
|
-
`enabled` integer DEFAULT true NOT NULL,
|
|
63
|
-
`priority` integer DEFAULT 0 NOT NULL,
|
|
64
|
-
`config` text,
|
|
65
|
-
`created_at` text NOT NULL,
|
|
66
|
-
`updated_at` text NOT NULL
|
|
67
|
-
);
|
|
68
|
-
--> statement-breakpoint
|
|
69
|
-
CREATE UNIQUE INDEX `skill_bindings_source_brain_name_idx` ON `skill_bindings` (`source`,`brain_name`,`skill_name`);--> statement-breakpoint
|
|
70
|
-
CREATE TABLE `skill_drafts` (
|
|
71
|
-
`id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
|
|
72
|
-
`proposed_name` text NOT NULL,
|
|
73
|
-
`source` text NOT NULL,
|
|
74
|
-
`body_markdown` text NOT NULL,
|
|
75
|
-
`rationale` text DEFAULT '' NOT NULL,
|
|
76
|
-
`status` text DEFAULT 'pending' NOT NULL,
|
|
77
|
-
`created_at` text NOT NULL,
|
|
78
|
-
`decided_at` text,
|
|
79
|
-
`decided_by` text
|
|
80
|
-
);
|
|
81
|
-
--> statement-breakpoint
|
|
82
|
-
CREATE TABLE `worker_config` (
|
|
83
|
-
`pk` text PRIMARY KEY DEFAULT 'default' NOT NULL,
|
|
84
|
-
`config_json` text NOT NULL,
|
|
85
|
-
`version` integer DEFAULT 1 NOT NULL,
|
|
86
|
-
`updated_at` text NOT NULL,
|
|
87
|
-
`updated_by` text
|
|
88
|
-
);
|
|
89
|
-
--> statement-breakpoint
|
|
90
|
-
CREATE TABLE `worker_identity` (
|
|
91
|
-
`pk` text PRIMARY KEY DEFAULT 'default' NOT NULL,
|
|
92
|
-
`worker_id` text NOT NULL,
|
|
93
|
-
`api_token_enc` text NOT NULL,
|
|
94
|
-
`nonce` text NOT NULL,
|
|
95
|
-
`auth_tag` text NOT NULL,
|
|
96
|
-
`bootstrap_shown_at` text NOT NULL,
|
|
97
|
-
`created_at` text NOT NULL,
|
|
98
|
-
`rotated_at` text
|
|
99
|
-
);
|
|
100
|
-
--> statement-breakpoint
|
|
101
|
-
CREATE UNIQUE INDEX `worker_identity_worker_id_unique` ON `worker_identity` (`worker_id`);--> statement-breakpoint
|
|
102
|
-
CREATE TABLE `worker_secrets` (
|
|
103
|
-
`id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
|
|
104
|
-
`key` text NOT NULL,
|
|
105
|
-
`value_enc` text NOT NULL,
|
|
106
|
-
`nonce` text NOT NULL,
|
|
107
|
-
`auth_tag` text NOT NULL,
|
|
108
|
-
`created_at` text NOT NULL,
|
|
109
|
-
`updated_at` text NOT NULL
|
|
110
|
-
);
|
|
111
|
-
--> statement-breakpoint
|
|
112
|
-
CREATE UNIQUE INDEX `worker_secrets_key_unique` ON `worker_secrets` (`key`);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
ALTER TABLE `messages` ADD `rich_metadata` text;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
CREATE TABLE `cron_jobs` (
|
|
2
|
-
`id` text PRIMARY KEY NOT NULL,
|
|
3
|
-
`expression` text NOT NULL,
|
|
4
|
-
`prompt` text NOT NULL,
|
|
5
|
-
`channel` text NOT NULL,
|
|
6
|
-
`chat_id` text NOT NULL,
|
|
7
|
-
`account_id` text NOT NULL,
|
|
8
|
-
`enabled` integer DEFAULT true NOT NULL,
|
|
9
|
-
`last_run_at` text,
|
|
10
|
-
`next_run_at` text,
|
|
11
|
-
`created_at` text NOT NULL,
|
|
12
|
-
`updated_at` text NOT NULL
|
|
13
|
-
);
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
CREATE INDEX `agent_tasks_created_at_idx` ON `agent_tasks` (`created_at`);--> statement-breakpoint
|
|
2
|
-
CREATE INDEX `conversations_lookup_idx` ON `conversations` (`channel`,`chat_id`,`thread_id`,`status`);--> statement-breakpoint
|
|
3
|
-
CREATE INDEX `conversations_last_active_at_idx` ON `conversations` (`last_active_at`);--> statement-breakpoint
|
|
4
|
-
CREATE INDEX `cron_jobs_due_idx` ON `cron_jobs` (`enabled`,`next_run_at`);--> statement-breakpoint
|
|
5
|
-
CREATE INDEX `evolution_observations_noticed_at_idx` ON `evolution_observations` (`noticed_at`);--> statement-breakpoint
|
|
6
|
-
CREATE INDEX `execution_logs_conversation_id_idx` ON `execution_logs` (`conversation_id`);--> statement-breakpoint
|
|
7
|
-
CREATE INDEX `messages_conversation_id_idx` ON `messages` (`conversation_id`);
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
CREATE TABLE `session_entries` (
|
|
2
|
-
`session_key` text PRIMARY KEY NOT NULL,
|
|
3
|
-
`current_conversation_id` text NOT NULL,
|
|
4
|
-
`channel` text NOT NULL,
|
|
5
|
-
`chat_id` text NOT NULL,
|
|
6
|
-
`thread_id` text,
|
|
7
|
-
`account_id` text,
|
|
8
|
-
`status` text DEFAULT 'active' NOT NULL,
|
|
9
|
-
`session_started_at` text NOT NULL,
|
|
10
|
-
`last_interaction_at` text NOT NULL,
|
|
11
|
-
`reset_at` text,
|
|
12
|
-
`reset_reason` text,
|
|
13
|
-
`context_tokens` integer DEFAULT 0 NOT NULL,
|
|
14
|
-
`total_tokens` integer DEFAULT 0 NOT NULL,
|
|
15
|
-
`total_tokens_fresh` integer DEFAULT 0 NOT NULL,
|
|
16
|
-
`compaction_count` integer DEFAULT 0 NOT NULL,
|
|
17
|
-
`memory_flush_at` text,
|
|
18
|
-
`memory_flush_compaction_count` integer DEFAULT 0 NOT NULL,
|
|
19
|
-
`engine_bindings` text NOT NULL,
|
|
20
|
-
`created_at` text NOT NULL,
|
|
21
|
-
`updated_at` text NOT NULL,
|
|
22
|
-
FOREIGN KEY (`current_conversation_id`) REFERENCES `conversations`(`id`) ON UPDATE no action ON DELETE no action
|
|
23
|
-
);
|
|
24
|
-
--> statement-breakpoint
|
|
25
|
-
CREATE INDEX `session_entries_current_conversation_id_idx` ON `session_entries` (`current_conversation_id`);--> statement-breakpoint
|
|
26
|
-
CREATE INDEX `session_entries_last_interaction_at_idx` ON `session_entries` (`last_interaction_at`);
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
CREATE TABLE `brain_artifacts` (
|
|
2
|
-
`id` text PRIMARY KEY NOT NULL,
|
|
3
|
-
`scope_id` text,
|
|
4
|
-
`type` text NOT NULL,
|
|
5
|
-
`ref` text NOT NULL,
|
|
6
|
-
`hash` text,
|
|
7
|
-
`source` text NOT NULL,
|
|
8
|
-
`sensitivity` text DEFAULT 'internal' NOT NULL,
|
|
9
|
-
`retention` text,
|
|
10
|
-
`status` text DEFAULT 'active' NOT NULL,
|
|
11
|
-
`summary` text,
|
|
12
|
-
`evidence_refs` text NOT NULL,
|
|
13
|
-
`metadata` text,
|
|
14
|
-
`created_at` text NOT NULL,
|
|
15
|
-
`updated_at` text NOT NULL
|
|
16
|
-
);
|
|
17
|
-
--> statement-breakpoint
|
|
18
|
-
CREATE INDEX `brain_artifacts_scope_type_idx` ON `brain_artifacts` (`scope_id`,`type`);--> statement-breakpoint
|
|
19
|
-
CREATE INDEX `brain_artifacts_status_type_idx` ON `brain_artifacts` (`status`,`type`);--> statement-breakpoint
|
|
20
|
-
CREATE INDEX `brain_artifacts_updated_at_idx` ON `brain_artifacts` (`updated_at`);
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
CREATE TABLE `brain_admission_decisions` (
|
|
2
|
-
`id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
|
|
3
|
-
`proposal_id` text NOT NULL,
|
|
4
|
-
`decision` text NOT NULL,
|
|
5
|
-
`decided_by` text NOT NULL,
|
|
6
|
-
`decided_at` text NOT NULL,
|
|
7
|
-
`reason` text,
|
|
8
|
-
`applied_at` text,
|
|
9
|
-
`failure_reason` text,
|
|
10
|
-
FOREIGN KEY (`proposal_id`) REFERENCES `brain_admission_proposals`(`id`) ON UPDATE no action ON DELETE cascade
|
|
11
|
-
);
|
|
12
|
-
--> statement-breakpoint
|
|
13
|
-
CREATE INDEX `brain_admission_decisions_proposal_id_idx` ON `brain_admission_decisions` (`proposal_id`);--> statement-breakpoint
|
|
14
|
-
CREATE INDEX `brain_admission_decisions_decided_at_idx` ON `brain_admission_decisions` (`decided_at`);--> statement-breakpoint
|
|
15
|
-
CREATE TABLE `brain_admission_proposals` (
|
|
16
|
-
`id` text PRIMARY KEY NOT NULL,
|
|
17
|
-
`scope_id` text,
|
|
18
|
-
`soul_id` text NOT NULL,
|
|
19
|
-
`kind` text NOT NULL,
|
|
20
|
-
`target` text NOT NULL,
|
|
21
|
-
`summary` text NOT NULL,
|
|
22
|
-
`evidence` text NOT NULL,
|
|
23
|
-
`risk` text DEFAULT 'high' NOT NULL,
|
|
24
|
-
`confidence` real NOT NULL,
|
|
25
|
-
`rollback` text NOT NULL,
|
|
26
|
-
`payload` text,
|
|
27
|
-
`status` text DEFAULT 'pending' NOT NULL,
|
|
28
|
-
`created_at` text NOT NULL,
|
|
29
|
-
`updated_at` text NOT NULL
|
|
30
|
-
);
|
|
31
|
-
--> statement-breakpoint
|
|
32
|
-
CREATE INDEX `brain_admission_proposals_status_kind_idx` ON `brain_admission_proposals` (`status`,`kind`);--> statement-breakpoint
|
|
33
|
-
CREATE INDEX `brain_admission_proposals_scope_id_idx` ON `brain_admission_proposals` (`scope_id`);--> statement-breakpoint
|
|
34
|
-
CREATE INDEX `brain_admission_proposals_created_at_idx` ON `brain_admission_proposals` (`created_at`);
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
CREATE TABLE `decision_pipeline_samples` (
|
|
2
|
-
`id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
|
|
3
|
-
`stage` text NOT NULL,
|
|
4
|
-
`source` text NOT NULL,
|
|
5
|
-
`evaluator` text NOT NULL,
|
|
6
|
-
`reason` text NOT NULL,
|
|
7
|
-
`fallback` integer DEFAULT false NOT NULL,
|
|
8
|
-
`created_at` text NOT NULL
|
|
9
|
-
);
|
|
10
|
-
--> statement-breakpoint
|
|
11
|
-
CREATE INDEX `decision_pipeline_samples_stage_created_at_idx` ON `decision_pipeline_samples` (`stage`,`created_at`);
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
CREATE TABLE `brain_journal_events` (
|
|
2
|
-
`id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
|
|
3
|
-
`task_id` text,
|
|
4
|
-
`conversation_id` text,
|
|
5
|
-
`kind` text NOT NULL,
|
|
6
|
-
`payload` text NOT NULL,
|
|
7
|
-
`created_at` text NOT NULL,
|
|
8
|
-
FOREIGN KEY (`task_id`) REFERENCES `agent_tasks`(`id`) ON UPDATE no action ON DELETE no action,
|
|
9
|
-
FOREIGN KEY (`conversation_id`) REFERENCES `conversations`(`id`) ON UPDATE no action ON DELETE set null
|
|
10
|
-
);
|
|
11
|
-
--> statement-breakpoint
|
|
12
|
-
CREATE INDEX `brain_journal_events_conversation_created_at_idx` ON `brain_journal_events` (`conversation_id`,`created_at`);--> statement-breakpoint
|
|
13
|
-
CREATE INDEX `brain_journal_events_kind_created_at_idx` ON `brain_journal_events` (`kind`,`created_at`);--> statement-breakpoint
|
|
14
|
-
CREATE INDEX `brain_journal_events_task_created_at_idx` ON `brain_journal_events` (`task_id`,`created_at`);
|