opencode-supertask 0.1.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.
@@ -0,0 +1,19 @@
1
+ CREATE TABLE `tasks` (
2
+ `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
3
+ `name` text NOT NULL,
4
+ `agent` text NOT NULL,
5
+ `model` text DEFAULT 'default',
6
+ `prompt` text NOT NULL,
7
+ `category` text DEFAULT 'general',
8
+ `importance` integer DEFAULT 3,
9
+ `urgency` integer DEFAULT 3,
10
+ `batch_id` text,
11
+ `depends_on` integer,
12
+ `status` text DEFAULT 'pending',
13
+ `created_at` integer,
14
+ `started_at` integer,
15
+ `finished_at` integer,
16
+ `result_log` text,
17
+ `retry_count` integer DEFAULT 0,
18
+ `max_retries` integer DEFAULT 3
19
+ );
@@ -0,0 +1 @@
1
+ ALTER TABLE `tasks` ADD `cwd` text;
@@ -0,0 +1,11 @@
1
+ CREATE TABLE `task_runs` (
2
+ `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
3
+ `task_id` integer NOT NULL,
4
+ `session_id` text,
5
+ `model` text,
6
+ `status` text DEFAULT 'running',
7
+ `started_at` integer,
8
+ `finished_at` integer,
9
+ `log` text,
10
+ FOREIGN KEY (`task_id`) REFERENCES `tasks`(`id`) ON UPDATE no action ON DELETE no action
11
+ );
@@ -0,0 +1,33 @@
1
+ CREATE TABLE `task_templates` (
2
+ `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
3
+ `name` text NOT NULL,
4
+ `agent` text NOT NULL,
5
+ `model` text DEFAULT 'default',
6
+ `prompt` text NOT NULL,
7
+ `cwd` text,
8
+ `category` text DEFAULT 'general',
9
+ `importance` integer DEFAULT 3,
10
+ `urgency` integer DEFAULT 3,
11
+ `schedule_type` text NOT NULL,
12
+ `cron_expr` text,
13
+ `interval_ms` integer,
14
+ `run_at` integer,
15
+ `max_instances` integer DEFAULT 1,
16
+ `max_retries` integer DEFAULT 3,
17
+ `retry_backoff_ms` integer DEFAULT 30000,
18
+ `last_run_at` integer,
19
+ `next_run_at` integer,
20
+ `enabled` integer DEFAULT true,
21
+ `created_at` integer,
22
+ `updated_at` integer
23
+ );
24
+ --> statement-breakpoint
25
+ ALTER TABLE `task_runs` ADD `locked_at` integer;--> statement-breakpoint
26
+ ALTER TABLE `task_runs` ADD `locked_by` text;--> statement-breakpoint
27
+ ALTER TABLE `task_runs` ADD `heartbeat_at` integer;--> statement-breakpoint
28
+ ALTER TABLE `task_runs` ADD `worker_pid` integer;--> statement-breakpoint
29
+ ALTER TABLE `task_runs` ADD `child_pid` integer;--> statement-breakpoint
30
+ ALTER TABLE `tasks` ADD `retry_after` integer;--> statement-breakpoint
31
+ ALTER TABLE `tasks` ADD `timeout_ms` integer;--> statement-breakpoint
32
+ ALTER TABLE `tasks` ADD `template_id` integer;--> statement-breakpoint
33
+ ALTER TABLE `tasks` ADD `scheduled_at` integer;
@@ -0,0 +1,154 @@
1
+ {
2
+ "version": "6",
3
+ "dialect": "sqlite",
4
+ "id": "7ec19980-b788-4b5d-a17c-38f391276b27",
5
+ "prevId": "00000000-0000-0000-0000-000000000000",
6
+ "tables": {
7
+ "tasks": {
8
+ "name": "tasks",
9
+ "columns": {
10
+ "id": {
11
+ "name": "id",
12
+ "type": "integer",
13
+ "primaryKey": true,
14
+ "notNull": true,
15
+ "autoincrement": true
16
+ },
17
+ "name": {
18
+ "name": "name",
19
+ "type": "text",
20
+ "primaryKey": false,
21
+ "notNull": true,
22
+ "autoincrement": false
23
+ },
24
+ "agent": {
25
+ "name": "agent",
26
+ "type": "text",
27
+ "primaryKey": false,
28
+ "notNull": true,
29
+ "autoincrement": false
30
+ },
31
+ "model": {
32
+ "name": "model",
33
+ "type": "text",
34
+ "primaryKey": false,
35
+ "notNull": false,
36
+ "autoincrement": false,
37
+ "default": "'default'"
38
+ },
39
+ "prompt": {
40
+ "name": "prompt",
41
+ "type": "text",
42
+ "primaryKey": false,
43
+ "notNull": true,
44
+ "autoincrement": false
45
+ },
46
+ "category": {
47
+ "name": "category",
48
+ "type": "text",
49
+ "primaryKey": false,
50
+ "notNull": false,
51
+ "autoincrement": false,
52
+ "default": "'general'"
53
+ },
54
+ "importance": {
55
+ "name": "importance",
56
+ "type": "integer",
57
+ "primaryKey": false,
58
+ "notNull": false,
59
+ "autoincrement": false,
60
+ "default": 3
61
+ },
62
+ "urgency": {
63
+ "name": "urgency",
64
+ "type": "integer",
65
+ "primaryKey": false,
66
+ "notNull": false,
67
+ "autoincrement": false,
68
+ "default": 3
69
+ },
70
+ "batch_id": {
71
+ "name": "batch_id",
72
+ "type": "text",
73
+ "primaryKey": false,
74
+ "notNull": false,
75
+ "autoincrement": false
76
+ },
77
+ "depends_on": {
78
+ "name": "depends_on",
79
+ "type": "integer",
80
+ "primaryKey": false,
81
+ "notNull": false,
82
+ "autoincrement": false
83
+ },
84
+ "status": {
85
+ "name": "status",
86
+ "type": "text",
87
+ "primaryKey": false,
88
+ "notNull": false,
89
+ "autoincrement": false,
90
+ "default": "'pending'"
91
+ },
92
+ "created_at": {
93
+ "name": "created_at",
94
+ "type": "integer",
95
+ "primaryKey": false,
96
+ "notNull": false,
97
+ "autoincrement": false
98
+ },
99
+ "started_at": {
100
+ "name": "started_at",
101
+ "type": "integer",
102
+ "primaryKey": false,
103
+ "notNull": false,
104
+ "autoincrement": false
105
+ },
106
+ "finished_at": {
107
+ "name": "finished_at",
108
+ "type": "integer",
109
+ "primaryKey": false,
110
+ "notNull": false,
111
+ "autoincrement": false
112
+ },
113
+ "result_log": {
114
+ "name": "result_log",
115
+ "type": "text",
116
+ "primaryKey": false,
117
+ "notNull": false,
118
+ "autoincrement": false
119
+ },
120
+ "retry_count": {
121
+ "name": "retry_count",
122
+ "type": "integer",
123
+ "primaryKey": false,
124
+ "notNull": false,
125
+ "autoincrement": false,
126
+ "default": 0
127
+ },
128
+ "max_retries": {
129
+ "name": "max_retries",
130
+ "type": "integer",
131
+ "primaryKey": false,
132
+ "notNull": false,
133
+ "autoincrement": false,
134
+ "default": 3
135
+ }
136
+ },
137
+ "indexes": {},
138
+ "foreignKeys": {},
139
+ "compositePrimaryKeys": {},
140
+ "uniqueConstraints": {},
141
+ "checkConstraints": {}
142
+ }
143
+ },
144
+ "views": {},
145
+ "enums": {},
146
+ "_meta": {
147
+ "schemas": {},
148
+ "tables": {},
149
+ "columns": {}
150
+ },
151
+ "internal": {
152
+ "indexes": {}
153
+ }
154
+ }
@@ -0,0 +1,161 @@
1
+ {
2
+ "version": "6",
3
+ "dialect": "sqlite",
4
+ "id": "ab477604-d13a-4b7b-9d19-69f6d9fdf341",
5
+ "prevId": "7ec19980-b788-4b5d-a17c-38f391276b27",
6
+ "tables": {
7
+ "tasks": {
8
+ "name": "tasks",
9
+ "columns": {
10
+ "id": {
11
+ "name": "id",
12
+ "type": "integer",
13
+ "primaryKey": true,
14
+ "notNull": true,
15
+ "autoincrement": true
16
+ },
17
+ "name": {
18
+ "name": "name",
19
+ "type": "text",
20
+ "primaryKey": false,
21
+ "notNull": true,
22
+ "autoincrement": false
23
+ },
24
+ "agent": {
25
+ "name": "agent",
26
+ "type": "text",
27
+ "primaryKey": false,
28
+ "notNull": true,
29
+ "autoincrement": false
30
+ },
31
+ "model": {
32
+ "name": "model",
33
+ "type": "text",
34
+ "primaryKey": false,
35
+ "notNull": false,
36
+ "autoincrement": false,
37
+ "default": "'default'"
38
+ },
39
+ "prompt": {
40
+ "name": "prompt",
41
+ "type": "text",
42
+ "primaryKey": false,
43
+ "notNull": true,
44
+ "autoincrement": false
45
+ },
46
+ "cwd": {
47
+ "name": "cwd",
48
+ "type": "text",
49
+ "primaryKey": false,
50
+ "notNull": false,
51
+ "autoincrement": false
52
+ },
53
+ "category": {
54
+ "name": "category",
55
+ "type": "text",
56
+ "primaryKey": false,
57
+ "notNull": false,
58
+ "autoincrement": false,
59
+ "default": "'general'"
60
+ },
61
+ "importance": {
62
+ "name": "importance",
63
+ "type": "integer",
64
+ "primaryKey": false,
65
+ "notNull": false,
66
+ "autoincrement": false,
67
+ "default": 3
68
+ },
69
+ "urgency": {
70
+ "name": "urgency",
71
+ "type": "integer",
72
+ "primaryKey": false,
73
+ "notNull": false,
74
+ "autoincrement": false,
75
+ "default": 3
76
+ },
77
+ "batch_id": {
78
+ "name": "batch_id",
79
+ "type": "text",
80
+ "primaryKey": false,
81
+ "notNull": false,
82
+ "autoincrement": false
83
+ },
84
+ "depends_on": {
85
+ "name": "depends_on",
86
+ "type": "integer",
87
+ "primaryKey": false,
88
+ "notNull": false,
89
+ "autoincrement": false
90
+ },
91
+ "status": {
92
+ "name": "status",
93
+ "type": "text",
94
+ "primaryKey": false,
95
+ "notNull": false,
96
+ "autoincrement": false,
97
+ "default": "'pending'"
98
+ },
99
+ "created_at": {
100
+ "name": "created_at",
101
+ "type": "integer",
102
+ "primaryKey": false,
103
+ "notNull": false,
104
+ "autoincrement": false
105
+ },
106
+ "started_at": {
107
+ "name": "started_at",
108
+ "type": "integer",
109
+ "primaryKey": false,
110
+ "notNull": false,
111
+ "autoincrement": false
112
+ },
113
+ "finished_at": {
114
+ "name": "finished_at",
115
+ "type": "integer",
116
+ "primaryKey": false,
117
+ "notNull": false,
118
+ "autoincrement": false
119
+ },
120
+ "result_log": {
121
+ "name": "result_log",
122
+ "type": "text",
123
+ "primaryKey": false,
124
+ "notNull": false,
125
+ "autoincrement": false
126
+ },
127
+ "retry_count": {
128
+ "name": "retry_count",
129
+ "type": "integer",
130
+ "primaryKey": false,
131
+ "notNull": false,
132
+ "autoincrement": false,
133
+ "default": 0
134
+ },
135
+ "max_retries": {
136
+ "name": "max_retries",
137
+ "type": "integer",
138
+ "primaryKey": false,
139
+ "notNull": false,
140
+ "autoincrement": false,
141
+ "default": 3
142
+ }
143
+ },
144
+ "indexes": {},
145
+ "foreignKeys": {},
146
+ "compositePrimaryKeys": {},
147
+ "uniqueConstraints": {},
148
+ "checkConstraints": {}
149
+ }
150
+ },
151
+ "views": {},
152
+ "enums": {},
153
+ "_meta": {
154
+ "schemas": {},
155
+ "tables": {},
156
+ "columns": {}
157
+ },
158
+ "internal": {
159
+ "indexes": {}
160
+ }
161
+ }
@@ -0,0 +1,242 @@
1
+ {
2
+ "version": "6",
3
+ "dialect": "sqlite",
4
+ "id": "ccf38e5f-3cc0-457e-b7ac-e443e91b9bf8",
5
+ "prevId": "ab477604-d13a-4b7b-9d19-69f6d9fdf341",
6
+ "tables": {
7
+ "task_runs": {
8
+ "name": "task_runs",
9
+ "columns": {
10
+ "id": {
11
+ "name": "id",
12
+ "type": "integer",
13
+ "primaryKey": true,
14
+ "notNull": true,
15
+ "autoincrement": true
16
+ },
17
+ "task_id": {
18
+ "name": "task_id",
19
+ "type": "integer",
20
+ "primaryKey": false,
21
+ "notNull": true,
22
+ "autoincrement": false
23
+ },
24
+ "session_id": {
25
+ "name": "session_id",
26
+ "type": "text",
27
+ "primaryKey": false,
28
+ "notNull": false,
29
+ "autoincrement": false
30
+ },
31
+ "model": {
32
+ "name": "model",
33
+ "type": "text",
34
+ "primaryKey": false,
35
+ "notNull": false,
36
+ "autoincrement": false
37
+ },
38
+ "status": {
39
+ "name": "status",
40
+ "type": "text",
41
+ "primaryKey": false,
42
+ "notNull": false,
43
+ "autoincrement": false,
44
+ "default": "'running'"
45
+ },
46
+ "started_at": {
47
+ "name": "started_at",
48
+ "type": "integer",
49
+ "primaryKey": false,
50
+ "notNull": false,
51
+ "autoincrement": false
52
+ },
53
+ "finished_at": {
54
+ "name": "finished_at",
55
+ "type": "integer",
56
+ "primaryKey": false,
57
+ "notNull": false,
58
+ "autoincrement": false
59
+ },
60
+ "log": {
61
+ "name": "log",
62
+ "type": "text",
63
+ "primaryKey": false,
64
+ "notNull": false,
65
+ "autoincrement": false
66
+ }
67
+ },
68
+ "indexes": {},
69
+ "foreignKeys": {
70
+ "task_runs_task_id_tasks_id_fk": {
71
+ "name": "task_runs_task_id_tasks_id_fk",
72
+ "tableFrom": "task_runs",
73
+ "tableTo": "tasks",
74
+ "columnsFrom": [
75
+ "task_id"
76
+ ],
77
+ "columnsTo": [
78
+ "id"
79
+ ],
80
+ "onDelete": "no action",
81
+ "onUpdate": "no action"
82
+ }
83
+ },
84
+ "compositePrimaryKeys": {},
85
+ "uniqueConstraints": {},
86
+ "checkConstraints": {}
87
+ },
88
+ "tasks": {
89
+ "name": "tasks",
90
+ "columns": {
91
+ "id": {
92
+ "name": "id",
93
+ "type": "integer",
94
+ "primaryKey": true,
95
+ "notNull": true,
96
+ "autoincrement": true
97
+ },
98
+ "name": {
99
+ "name": "name",
100
+ "type": "text",
101
+ "primaryKey": false,
102
+ "notNull": true,
103
+ "autoincrement": false
104
+ },
105
+ "agent": {
106
+ "name": "agent",
107
+ "type": "text",
108
+ "primaryKey": false,
109
+ "notNull": true,
110
+ "autoincrement": false
111
+ },
112
+ "model": {
113
+ "name": "model",
114
+ "type": "text",
115
+ "primaryKey": false,
116
+ "notNull": false,
117
+ "autoincrement": false,
118
+ "default": "'default'"
119
+ },
120
+ "prompt": {
121
+ "name": "prompt",
122
+ "type": "text",
123
+ "primaryKey": false,
124
+ "notNull": true,
125
+ "autoincrement": false
126
+ },
127
+ "cwd": {
128
+ "name": "cwd",
129
+ "type": "text",
130
+ "primaryKey": false,
131
+ "notNull": false,
132
+ "autoincrement": false
133
+ },
134
+ "category": {
135
+ "name": "category",
136
+ "type": "text",
137
+ "primaryKey": false,
138
+ "notNull": false,
139
+ "autoincrement": false,
140
+ "default": "'general'"
141
+ },
142
+ "importance": {
143
+ "name": "importance",
144
+ "type": "integer",
145
+ "primaryKey": false,
146
+ "notNull": false,
147
+ "autoincrement": false,
148
+ "default": 3
149
+ },
150
+ "urgency": {
151
+ "name": "urgency",
152
+ "type": "integer",
153
+ "primaryKey": false,
154
+ "notNull": false,
155
+ "autoincrement": false,
156
+ "default": 3
157
+ },
158
+ "batch_id": {
159
+ "name": "batch_id",
160
+ "type": "text",
161
+ "primaryKey": false,
162
+ "notNull": false,
163
+ "autoincrement": false
164
+ },
165
+ "depends_on": {
166
+ "name": "depends_on",
167
+ "type": "integer",
168
+ "primaryKey": false,
169
+ "notNull": false,
170
+ "autoincrement": false
171
+ },
172
+ "status": {
173
+ "name": "status",
174
+ "type": "text",
175
+ "primaryKey": false,
176
+ "notNull": false,
177
+ "autoincrement": false,
178
+ "default": "'pending'"
179
+ },
180
+ "created_at": {
181
+ "name": "created_at",
182
+ "type": "integer",
183
+ "primaryKey": false,
184
+ "notNull": false,
185
+ "autoincrement": false
186
+ },
187
+ "started_at": {
188
+ "name": "started_at",
189
+ "type": "integer",
190
+ "primaryKey": false,
191
+ "notNull": false,
192
+ "autoincrement": false
193
+ },
194
+ "finished_at": {
195
+ "name": "finished_at",
196
+ "type": "integer",
197
+ "primaryKey": false,
198
+ "notNull": false,
199
+ "autoincrement": false
200
+ },
201
+ "result_log": {
202
+ "name": "result_log",
203
+ "type": "text",
204
+ "primaryKey": false,
205
+ "notNull": false,
206
+ "autoincrement": false
207
+ },
208
+ "retry_count": {
209
+ "name": "retry_count",
210
+ "type": "integer",
211
+ "primaryKey": false,
212
+ "notNull": false,
213
+ "autoincrement": false,
214
+ "default": 0
215
+ },
216
+ "max_retries": {
217
+ "name": "max_retries",
218
+ "type": "integer",
219
+ "primaryKey": false,
220
+ "notNull": false,
221
+ "autoincrement": false,
222
+ "default": 3
223
+ }
224
+ },
225
+ "indexes": {},
226
+ "foreignKeys": {},
227
+ "compositePrimaryKeys": {},
228
+ "uniqueConstraints": {},
229
+ "checkConstraints": {}
230
+ }
231
+ },
232
+ "views": {},
233
+ "enums": {},
234
+ "_meta": {
235
+ "schemas": {},
236
+ "tables": {},
237
+ "columns": {}
238
+ },
239
+ "internal": {
240
+ "indexes": {}
241
+ }
242
+ }