@basou/core 0.5.0 → 0.6.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,228 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://basou.dev/schemas/0.1.0/session.schema.json",
4
+ "title": "Basou Session",
5
+ "description": "A `.basou/sessions/<id>/session.yaml` session record.",
6
+ "type": "object",
7
+ "properties": {
8
+ "schema_version": {
9
+ "type": "string",
10
+ "const": "0.1.0"
11
+ },
12
+ "session": {
13
+ "type": "object",
14
+ "properties": {
15
+ "id": {
16
+ "type": "string",
17
+ "pattern": "^ses_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
18
+ "description": "Basou ses id: `ses_` followed by a 26-character Crockford Base32 ULID."
19
+ },
20
+ "label": {
21
+ "type": "string"
22
+ },
23
+ "task_id": {
24
+ "anyOf": [
25
+ {
26
+ "type": "string",
27
+ "pattern": "^task_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
28
+ "description": "Basou task id: `task_` followed by a 26-character Crockford Base32 ULID."
29
+ },
30
+ {
31
+ "type": "null"
32
+ }
33
+ ]
34
+ },
35
+ "workspace_id": {
36
+ "type": "string",
37
+ "pattern": "^ws_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
38
+ "description": "Basou ws id: `ws_` followed by a 26-character Crockford Base32 ULID."
39
+ },
40
+ "source": {
41
+ "type": "object",
42
+ "properties": {
43
+ "kind": {
44
+ "type": "string",
45
+ "enum": [
46
+ "claude-code-adapter",
47
+ "claude-code-import",
48
+ "codex-import",
49
+ "human",
50
+ "import",
51
+ "terminal"
52
+ ]
53
+ },
54
+ "version": {
55
+ "type": "string",
56
+ "const": "0.1.0"
57
+ },
58
+ "external_id": {
59
+ "type": "string"
60
+ }
61
+ },
62
+ "required": [
63
+ "kind",
64
+ "version"
65
+ ]
66
+ },
67
+ "started_at": {
68
+ "type": "string",
69
+ "format": "date-time",
70
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
71
+ },
72
+ "ended_at": {
73
+ "type": "string",
74
+ "format": "date-time",
75
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
76
+ },
77
+ "status": {
78
+ "type": "string",
79
+ "enum": [
80
+ "initialized",
81
+ "running",
82
+ "waiting_approval",
83
+ "completed",
84
+ "failed",
85
+ "interrupted",
86
+ "imported",
87
+ "archived"
88
+ ]
89
+ },
90
+ "working_directory": {
91
+ "type": "string",
92
+ "minLength": 1
93
+ },
94
+ "invocation": {
95
+ "type": "object",
96
+ "properties": {
97
+ "command": {
98
+ "type": "string",
99
+ "minLength": 1
100
+ },
101
+ "args": {
102
+ "default": [],
103
+ "type": "array",
104
+ "items": {
105
+ "type": "string"
106
+ }
107
+ },
108
+ "exit_code": {
109
+ "anyOf": [
110
+ {
111
+ "type": "integer",
112
+ "minimum": -9007199254740991,
113
+ "maximum": 9007199254740991
114
+ },
115
+ {
116
+ "type": "null"
117
+ }
118
+ ]
119
+ }
120
+ },
121
+ "required": [
122
+ "command",
123
+ "exit_code"
124
+ ]
125
+ },
126
+ "related_files": {
127
+ "default": [],
128
+ "type": "array",
129
+ "items": {
130
+ "type": "string"
131
+ }
132
+ },
133
+ "events_log": {
134
+ "default": "events.jsonl",
135
+ "type": "string"
136
+ },
137
+ "summary": {
138
+ "anyOf": [
139
+ {
140
+ "type": "string"
141
+ },
142
+ {
143
+ "type": "null"
144
+ }
145
+ ]
146
+ },
147
+ "metrics": {
148
+ "type": "object",
149
+ "properties": {
150
+ "output_tokens": {
151
+ "type": "integer",
152
+ "minimum": 0,
153
+ "maximum": 9007199254740991
154
+ },
155
+ "input_tokens": {
156
+ "type": "integer",
157
+ "minimum": 0,
158
+ "maximum": 9007199254740991
159
+ },
160
+ "cached_input_tokens": {
161
+ "type": "integer",
162
+ "minimum": 0,
163
+ "maximum": 9007199254740991
164
+ },
165
+ "reasoning_output_tokens": {
166
+ "type": "integer",
167
+ "minimum": 0,
168
+ "maximum": 9007199254740991
169
+ },
170
+ "active_time_ms": {
171
+ "type": "integer",
172
+ "minimum": 0,
173
+ "maximum": 9007199254740991
174
+ },
175
+ "active_intervals": {
176
+ "type": "array",
177
+ "items": {
178
+ "type": "object",
179
+ "properties": {
180
+ "start": {
181
+ "type": "string",
182
+ "format": "date-time",
183
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
184
+ },
185
+ "end": {
186
+ "type": "string",
187
+ "format": "date-time",
188
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
189
+ }
190
+ },
191
+ "required": [
192
+ "start",
193
+ "end"
194
+ ]
195
+ }
196
+ },
197
+ "active_gap_cap_ms": {
198
+ "type": "integer",
199
+ "minimum": 0,
200
+ "maximum": 9007199254740991
201
+ },
202
+ "active_time_method": {
203
+ "type": "string"
204
+ },
205
+ "machine_active_time_ms": {
206
+ "type": "integer",
207
+ "minimum": 0,
208
+ "maximum": 9007199254740991
209
+ }
210
+ }
211
+ }
212
+ },
213
+ "required": [
214
+ "id",
215
+ "workspace_id",
216
+ "source",
217
+ "started_at",
218
+ "status",
219
+ "working_directory",
220
+ "invocation"
221
+ ]
222
+ }
223
+ },
224
+ "required": [
225
+ "schema_version",
226
+ "session"
227
+ ]
228
+ }
@@ -0,0 +1,85 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://basou.dev/schemas/0.1.0/status.schema.json",
4
+ "title": "Basou Status",
5
+ "description": "The `.basou/status.json` workspace status snapshot.",
6
+ "type": "object",
7
+ "properties": {
8
+ "schema_version": {
9
+ "type": "string",
10
+ "const": "0.1.0"
11
+ },
12
+ "generated_at": {
13
+ "type": "string",
14
+ "format": "date-time",
15
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
16
+ },
17
+ "workspace": {
18
+ "type": "object",
19
+ "properties": {
20
+ "id": {
21
+ "type": "string",
22
+ "pattern": "^ws_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
23
+ "description": "Basou ws id: `ws_` followed by a 26-character Crockford Base32 ULID."
24
+ },
25
+ "name": {
26
+ "type": "string",
27
+ "minLength": 1
28
+ },
29
+ "basou_version": {
30
+ "type": "string",
31
+ "const": "0.1.0"
32
+ }
33
+ },
34
+ "required": [
35
+ "id",
36
+ "name",
37
+ "basou_version"
38
+ ],
39
+ "additionalProperties": false
40
+ },
41
+ "directories_present": {
42
+ "type": "object",
43
+ "properties": {
44
+ "sessions": {
45
+ "type": "boolean"
46
+ },
47
+ "tasks": {
48
+ "type": "boolean"
49
+ },
50
+ "approvals_pending": {
51
+ "type": "boolean"
52
+ },
53
+ "approvals_resolved": {
54
+ "type": "boolean"
55
+ },
56
+ "logs": {
57
+ "type": "boolean"
58
+ },
59
+ "raw": {
60
+ "type": "boolean"
61
+ },
62
+ "tmp": {
63
+ "type": "boolean"
64
+ }
65
+ },
66
+ "required": [
67
+ "sessions",
68
+ "tasks",
69
+ "approvals_pending",
70
+ "approvals_resolved",
71
+ "logs",
72
+ "raw",
73
+ "tmp"
74
+ ],
75
+ "additionalProperties": false
76
+ }
77
+ },
78
+ "required": [
79
+ "schema_version",
80
+ "generated_at",
81
+ "workspace",
82
+ "directories_present"
83
+ ],
84
+ "additionalProperties": false
85
+ }
@@ -0,0 +1,61 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://basou.dev/schemas/0.1.0/task-index.schema.json",
4
+ "title": "Basou Task Index",
5
+ "description": "The `.basou/tasks/index.json` task lookup index.",
6
+ "type": "object",
7
+ "properties": {
8
+ "schema_version": {
9
+ "type": "string",
10
+ "const": "0.1.0"
11
+ },
12
+ "tasks": {
13
+ "type": "array",
14
+ "items": {
15
+ "type": "object",
16
+ "properties": {
17
+ "id": {
18
+ "type": "string",
19
+ "pattern": "^task_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
20
+ "description": "Basou task id: `task_` followed by a 26-character Crockford Base32 ULID."
21
+ },
22
+ "status": {
23
+ "type": "string",
24
+ "enum": [
25
+ "planned",
26
+ "in_progress",
27
+ "done",
28
+ "cancelled"
29
+ ]
30
+ },
31
+ "label": {
32
+ "type": "string",
33
+ "minLength": 1
34
+ },
35
+ "updated_at": {
36
+ "type": "string",
37
+ "format": "date-time",
38
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
39
+ }
40
+ },
41
+ "required": [
42
+ "id",
43
+ "status",
44
+ "updated_at"
45
+ ],
46
+ "additionalProperties": false
47
+ }
48
+ },
49
+ "last_rebuilt_at": {
50
+ "type": "string",
51
+ "format": "date-time",
52
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
53
+ }
54
+ },
55
+ "required": [
56
+ "schema_version",
57
+ "tasks",
58
+ "last_rebuilt_at"
59
+ ],
60
+ "additionalProperties": false
61
+ }
@@ -0,0 +1,82 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://basou.dev/schemas/0.1.0/task.schema.json",
4
+ "title": "Basou Task",
5
+ "description": "The YAML front matter of a `.basou/tasks/<id>.md` task document.",
6
+ "type": "object",
7
+ "properties": {
8
+ "schema_version": {
9
+ "type": "string",
10
+ "const": "0.1.0"
11
+ },
12
+ "task": {
13
+ "type": "object",
14
+ "properties": {
15
+ "id": {
16
+ "type": "string",
17
+ "pattern": "^task_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
18
+ "description": "Basou task id: `task_` followed by a 26-character Crockford Base32 ULID."
19
+ },
20
+ "title": {
21
+ "type": "string",
22
+ "minLength": 1
23
+ },
24
+ "label": {
25
+ "type": "string",
26
+ "minLength": 1
27
+ },
28
+ "status": {
29
+ "type": "string",
30
+ "enum": [
31
+ "planned",
32
+ "in_progress",
33
+ "done",
34
+ "cancelled"
35
+ ]
36
+ },
37
+ "created_at": {
38
+ "type": "string",
39
+ "format": "date-time",
40
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
41
+ },
42
+ "updated_at": {
43
+ "type": "string",
44
+ "format": "date-time",
45
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
46
+ },
47
+ "workspace_id": {
48
+ "type": "string",
49
+ "pattern": "^ws_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
50
+ "description": "Basou ws id: `ws_` followed by a 26-character Crockford Base32 ULID."
51
+ },
52
+ "created_in_session": {
53
+ "type": "string",
54
+ "pattern": "^ses_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
55
+ "description": "Basou ses id: `ses_` followed by a 26-character Crockford Base32 ULID."
56
+ },
57
+ "linked_sessions": {
58
+ "default": [],
59
+ "type": "array",
60
+ "items": {
61
+ "type": "string",
62
+ "pattern": "^ses_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
63
+ "description": "Basou ses id: `ses_` followed by a 26-character Crockford Base32 ULID."
64
+ }
65
+ }
66
+ },
67
+ "required": [
68
+ "id",
69
+ "title",
70
+ "status",
71
+ "created_at",
72
+ "updated_at",
73
+ "workspace_id",
74
+ "created_in_session"
75
+ ]
76
+ }
77
+ },
78
+ "required": [
79
+ "schema_version",
80
+ "task"
81
+ ]
82
+ }