@basou/core 0.44.0 → 0.45.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/dist/index.d.ts +1039 -712
- package/dist/index.js +3466 -3201
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/schemas/approval.schema.json +7 -7
- package/schemas/event.schema.json +45 -45
- package/schemas/manifest.schema.json +5 -5
- package/schemas/retired/0.1.0/approval.schema.json +119 -0
- package/schemas/retired/0.1.0/manifest.schema.json +264 -0
- package/schemas/retired/0.1.0/session-import.schema.json +1703 -0
- package/schemas/retired/0.1.0/session.schema.json +254 -0
- package/schemas/retired/0.1.0/task.schema.json +84 -0
- package/schemas/retired/0.2.0/event.schema.json +1452 -0
- package/schemas/session-import.schema.json +55 -55
- package/schemas/session.schema.json +9 -9
- package/schemas/status.schema.json +2 -2
- package/schemas/task-index.schema.json +4 -4
- package/schemas/task.schema.json +5 -5
|
@@ -0,0 +1,254 @@
|
|
|
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
|
+
"pattern": "^0\\.\\d+\\.\\d+$"
|
|
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-adapter",
|
|
49
|
+
"codex-import",
|
|
50
|
+
"human",
|
|
51
|
+
"import",
|
|
52
|
+
"terminal"
|
|
53
|
+
]
|
|
54
|
+
},
|
|
55
|
+
"version": {
|
|
56
|
+
"type": "string",
|
|
57
|
+
"const": "0.1.0"
|
|
58
|
+
},
|
|
59
|
+
"external_id": {
|
|
60
|
+
"type": "string"
|
|
61
|
+
},
|
|
62
|
+
"source_size_bytes": {
|
|
63
|
+
"type": "integer",
|
|
64
|
+
"minimum": 0,
|
|
65
|
+
"maximum": 9007199254740991
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
"required": [
|
|
69
|
+
"kind",
|
|
70
|
+
"version"
|
|
71
|
+
],
|
|
72
|
+
"additionalProperties": {}
|
|
73
|
+
},
|
|
74
|
+
"started_at": {
|
|
75
|
+
"type": "string",
|
|
76
|
+
"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)))$",
|
|
77
|
+
"description": "Timestamp with an offset or Z. The pattern is normative under ECMA-262 semantics: RFC 3339 date-time with uppercase designators, no leap second, and optional seconds."
|
|
78
|
+
},
|
|
79
|
+
"ended_at": {
|
|
80
|
+
"type": "string",
|
|
81
|
+
"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)))$",
|
|
82
|
+
"description": "Timestamp with an offset or Z. The pattern is normative under ECMA-262 semantics: RFC 3339 date-time with uppercase designators, no leap second, and optional seconds."
|
|
83
|
+
},
|
|
84
|
+
"status": {
|
|
85
|
+
"type": "string",
|
|
86
|
+
"enum": [
|
|
87
|
+
"initialized",
|
|
88
|
+
"running",
|
|
89
|
+
"waiting_approval",
|
|
90
|
+
"completed",
|
|
91
|
+
"failed",
|
|
92
|
+
"interrupted",
|
|
93
|
+
"imported",
|
|
94
|
+
"archived"
|
|
95
|
+
]
|
|
96
|
+
},
|
|
97
|
+
"working_directory": {
|
|
98
|
+
"type": "string",
|
|
99
|
+
"minLength": 1
|
|
100
|
+
},
|
|
101
|
+
"invocation": {
|
|
102
|
+
"type": "object",
|
|
103
|
+
"properties": {
|
|
104
|
+
"command": {
|
|
105
|
+
"type": "string",
|
|
106
|
+
"minLength": 1
|
|
107
|
+
},
|
|
108
|
+
"args": {
|
|
109
|
+
"default": [],
|
|
110
|
+
"type": "array",
|
|
111
|
+
"items": {
|
|
112
|
+
"type": "string"
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
"exit_code": {
|
|
116
|
+
"anyOf": [
|
|
117
|
+
{
|
|
118
|
+
"type": "integer",
|
|
119
|
+
"minimum": -9007199254740991,
|
|
120
|
+
"maximum": 9007199254740991
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"type": "null"
|
|
124
|
+
}
|
|
125
|
+
]
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
"required": [
|
|
129
|
+
"command",
|
|
130
|
+
"exit_code"
|
|
131
|
+
],
|
|
132
|
+
"additionalProperties": {}
|
|
133
|
+
},
|
|
134
|
+
"related_files": {
|
|
135
|
+
"default": [],
|
|
136
|
+
"type": "array",
|
|
137
|
+
"items": {
|
|
138
|
+
"type": "string"
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
"events_log": {
|
|
142
|
+
"default": "events.jsonl",
|
|
143
|
+
"type": "string"
|
|
144
|
+
},
|
|
145
|
+
"summary": {
|
|
146
|
+
"type": [
|
|
147
|
+
"string",
|
|
148
|
+
"null"
|
|
149
|
+
]
|
|
150
|
+
},
|
|
151
|
+
"metrics": {
|
|
152
|
+
"type": "object",
|
|
153
|
+
"properties": {
|
|
154
|
+
"output_tokens": {
|
|
155
|
+
"type": "integer",
|
|
156
|
+
"minimum": 0,
|
|
157
|
+
"maximum": 9007199254740991
|
|
158
|
+
},
|
|
159
|
+
"input_tokens": {
|
|
160
|
+
"type": "integer",
|
|
161
|
+
"minimum": 0,
|
|
162
|
+
"maximum": 9007199254740991
|
|
163
|
+
},
|
|
164
|
+
"cached_input_tokens": {
|
|
165
|
+
"type": "integer",
|
|
166
|
+
"minimum": 0,
|
|
167
|
+
"maximum": 9007199254740991
|
|
168
|
+
},
|
|
169
|
+
"reasoning_output_tokens": {
|
|
170
|
+
"type": "integer",
|
|
171
|
+
"minimum": 0,
|
|
172
|
+
"maximum": 9007199254740991
|
|
173
|
+
},
|
|
174
|
+
"active_time_ms": {
|
|
175
|
+
"type": "integer",
|
|
176
|
+
"minimum": 0,
|
|
177
|
+
"maximum": 9007199254740991
|
|
178
|
+
},
|
|
179
|
+
"active_intervals": {
|
|
180
|
+
"type": "array",
|
|
181
|
+
"items": {
|
|
182
|
+
"type": "object",
|
|
183
|
+
"properties": {
|
|
184
|
+
"start": {
|
|
185
|
+
"type": "string",
|
|
186
|
+
"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)))$",
|
|
187
|
+
"description": "Timestamp with an offset or Z. The pattern is normative under ECMA-262 semantics: RFC 3339 date-time with uppercase designators, no leap second, and optional seconds."
|
|
188
|
+
},
|
|
189
|
+
"end": {
|
|
190
|
+
"type": "string",
|
|
191
|
+
"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)))$",
|
|
192
|
+
"description": "Timestamp with an offset or Z. The pattern is normative under ECMA-262 semantics: RFC 3339 date-time with uppercase designators, no leap second, and optional seconds."
|
|
193
|
+
}
|
|
194
|
+
},
|
|
195
|
+
"required": [
|
|
196
|
+
"start",
|
|
197
|
+
"end"
|
|
198
|
+
],
|
|
199
|
+
"additionalProperties": {}
|
|
200
|
+
}
|
|
201
|
+
},
|
|
202
|
+
"active_gap_cap_ms": {
|
|
203
|
+
"type": "integer",
|
|
204
|
+
"minimum": 0,
|
|
205
|
+
"maximum": 9007199254740991
|
|
206
|
+
},
|
|
207
|
+
"active_time_method": {
|
|
208
|
+
"type": "string"
|
|
209
|
+
},
|
|
210
|
+
"machine_active_time_ms": {
|
|
211
|
+
"type": "integer",
|
|
212
|
+
"minimum": 0,
|
|
213
|
+
"maximum": 9007199254740991
|
|
214
|
+
}
|
|
215
|
+
},
|
|
216
|
+
"additionalProperties": {}
|
|
217
|
+
},
|
|
218
|
+
"integrity": {
|
|
219
|
+
"type": "object",
|
|
220
|
+
"properties": {
|
|
221
|
+
"head_hash": {
|
|
222
|
+
"type": "string"
|
|
223
|
+
},
|
|
224
|
+
"event_count": {
|
|
225
|
+
"type": "integer",
|
|
226
|
+
"minimum": 0,
|
|
227
|
+
"maximum": 9007199254740991
|
|
228
|
+
}
|
|
229
|
+
},
|
|
230
|
+
"required": [
|
|
231
|
+
"head_hash",
|
|
232
|
+
"event_count"
|
|
233
|
+
],
|
|
234
|
+
"additionalProperties": false
|
|
235
|
+
}
|
|
236
|
+
},
|
|
237
|
+
"required": [
|
|
238
|
+
"id",
|
|
239
|
+
"workspace_id",
|
|
240
|
+
"source",
|
|
241
|
+
"started_at",
|
|
242
|
+
"status",
|
|
243
|
+
"working_directory",
|
|
244
|
+
"invocation"
|
|
245
|
+
],
|
|
246
|
+
"additionalProperties": {}
|
|
247
|
+
}
|
|
248
|
+
},
|
|
249
|
+
"required": [
|
|
250
|
+
"schema_version",
|
|
251
|
+
"session"
|
|
252
|
+
],
|
|
253
|
+
"additionalProperties": {}
|
|
254
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
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
|
+
"pattern": "^0\\.\\d+\\.\\d+$"
|
|
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
|
+
"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)))$",
|
|
40
|
+
"description": "Timestamp with an offset or Z. The pattern is normative under ECMA-262 semantics: RFC 3339 date-time with uppercase designators, no leap second, and optional seconds."
|
|
41
|
+
},
|
|
42
|
+
"updated_at": {
|
|
43
|
+
"type": "string",
|
|
44
|
+
"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)))$",
|
|
45
|
+
"description": "Timestamp with an offset or Z. The pattern is normative under ECMA-262 semantics: RFC 3339 date-time with uppercase designators, no leap second, and optional seconds."
|
|
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
|
+
"additionalProperties": {}
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
"required": [
|
|
80
|
+
"schema_version",
|
|
81
|
+
"task"
|
|
82
|
+
],
|
|
83
|
+
"additionalProperties": {}
|
|
84
|
+
}
|