@cleocode/cleo 2026.4.107 → 2026.4.108

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,23 @@
1
+ CREATE TABLE IF NOT EXISTS `telemetry_events` (
2
+ `id` text PRIMARY KEY,
3
+ `anonymous_id` text NOT NULL,
4
+ `domain` text NOT NULL,
5
+ `gateway` text NOT NULL,
6
+ `operation` text NOT NULL,
7
+ `command` text NOT NULL,
8
+ `exit_code` integer NOT NULL DEFAULT 0,
9
+ `duration_ms` integer NOT NULL,
10
+ `error_code` text,
11
+ `timestamp` text NOT NULL DEFAULT (datetime('now'))
12
+ );
13
+ --> statement-breakpoint
14
+ CREATE TABLE IF NOT EXISTS `telemetry_schema_meta` (
15
+ `key` text PRIMARY KEY,
16
+ `value` text NOT NULL
17
+ );
18
+ --> statement-breakpoint
19
+ CREATE INDEX IF NOT EXISTS `idx_telemetry_command` ON `telemetry_events` (`command`);--> statement-breakpoint
20
+ CREATE INDEX IF NOT EXISTS `idx_telemetry_domain` ON `telemetry_events` (`domain`);--> statement-breakpoint
21
+ CREATE INDEX IF NOT EXISTS `idx_telemetry_exit_code` ON `telemetry_events` (`exit_code`);--> statement-breakpoint
22
+ CREATE INDEX IF NOT EXISTS `idx_telemetry_timestamp` ON `telemetry_events` (`timestamp`);--> statement-breakpoint
23
+ CREATE INDEX IF NOT EXISTS `idx_telemetry_duration` ON `telemetry_events` (`duration_ms`);
@@ -0,0 +1,8 @@
1
+ -- BASELINE MARKER — T1176 Hybrid Path A+ (ADR-054).
2
+ -- Schema state for telemetry captured in snapshot.json. No DDL to apply here.
3
+ -- On fresh installs, the CREATE statements from the canonical tree
4
+ -- (prior migrations in this folder) produce the target schema.
5
+ -- On existing installs, reconcileJournal Scenario 3 will see that the
6
+ -- schema already matches and insert the journal row without running DDL.
7
+ -- Snapshot.json MUST be preserved — it is the anchor for drizzle-kit
8
+ -- generate going forward.
@@ -0,0 +1,227 @@
1
+ {
2
+ "version": "7",
3
+ "dialect": "sqlite",
4
+ "id": "055dc76e-94bd-44f0-a8c8-922f3b8d1c6d",
5
+ "prevIds": [
6
+ "00000000-0000-0000-0000-000000000000"
7
+ ],
8
+ "ddl": [
9
+ {
10
+ "name": "telemetry_events",
11
+ "entityType": "tables"
12
+ },
13
+ {
14
+ "name": "telemetry_schema_meta",
15
+ "entityType": "tables"
16
+ },
17
+ {
18
+ "type": "text",
19
+ "notNull": false,
20
+ "autoincrement": false,
21
+ "default": null,
22
+ "generated": null,
23
+ "name": "id",
24
+ "entityType": "columns",
25
+ "table": "telemetry_events"
26
+ },
27
+ {
28
+ "type": "text",
29
+ "notNull": true,
30
+ "autoincrement": false,
31
+ "default": null,
32
+ "generated": null,
33
+ "name": "anonymous_id",
34
+ "entityType": "columns",
35
+ "table": "telemetry_events"
36
+ },
37
+ {
38
+ "type": "text",
39
+ "notNull": true,
40
+ "autoincrement": false,
41
+ "default": null,
42
+ "generated": null,
43
+ "name": "domain",
44
+ "entityType": "columns",
45
+ "table": "telemetry_events"
46
+ },
47
+ {
48
+ "type": "text",
49
+ "notNull": true,
50
+ "autoincrement": false,
51
+ "default": null,
52
+ "generated": null,
53
+ "name": "gateway",
54
+ "entityType": "columns",
55
+ "table": "telemetry_events"
56
+ },
57
+ {
58
+ "type": "text",
59
+ "notNull": true,
60
+ "autoincrement": false,
61
+ "default": null,
62
+ "generated": null,
63
+ "name": "operation",
64
+ "entityType": "columns",
65
+ "table": "telemetry_events"
66
+ },
67
+ {
68
+ "type": "text",
69
+ "notNull": true,
70
+ "autoincrement": false,
71
+ "default": null,
72
+ "generated": null,
73
+ "name": "command",
74
+ "entityType": "columns",
75
+ "table": "telemetry_events"
76
+ },
77
+ {
78
+ "type": "integer",
79
+ "notNull": true,
80
+ "autoincrement": false,
81
+ "default": "0",
82
+ "generated": null,
83
+ "name": "exit_code",
84
+ "entityType": "columns",
85
+ "table": "telemetry_events"
86
+ },
87
+ {
88
+ "type": "integer",
89
+ "notNull": true,
90
+ "autoincrement": false,
91
+ "default": null,
92
+ "generated": null,
93
+ "name": "duration_ms",
94
+ "entityType": "columns",
95
+ "table": "telemetry_events"
96
+ },
97
+ {
98
+ "type": "text",
99
+ "notNull": false,
100
+ "autoincrement": false,
101
+ "default": null,
102
+ "generated": null,
103
+ "name": "error_code",
104
+ "entityType": "columns",
105
+ "table": "telemetry_events"
106
+ },
107
+ {
108
+ "type": "text",
109
+ "notNull": true,
110
+ "autoincrement": false,
111
+ "default": "(datetime('now'))",
112
+ "generated": null,
113
+ "name": "timestamp",
114
+ "entityType": "columns",
115
+ "table": "telemetry_events"
116
+ },
117
+ {
118
+ "type": "text",
119
+ "notNull": false,
120
+ "autoincrement": false,
121
+ "default": null,
122
+ "generated": null,
123
+ "name": "key",
124
+ "entityType": "columns",
125
+ "table": "telemetry_schema_meta"
126
+ },
127
+ {
128
+ "type": "text",
129
+ "notNull": true,
130
+ "autoincrement": false,
131
+ "default": null,
132
+ "generated": null,
133
+ "name": "value",
134
+ "entityType": "columns",
135
+ "table": "telemetry_schema_meta"
136
+ },
137
+ {
138
+ "columns": [
139
+ "id"
140
+ ],
141
+ "nameExplicit": false,
142
+ "name": "telemetry_events_pk",
143
+ "table": "telemetry_events",
144
+ "entityType": "pks"
145
+ },
146
+ {
147
+ "columns": [
148
+ "key"
149
+ ],
150
+ "nameExplicit": false,
151
+ "name": "telemetry_schema_meta_pk",
152
+ "table": "telemetry_schema_meta",
153
+ "entityType": "pks"
154
+ },
155
+ {
156
+ "columns": [
157
+ {
158
+ "value": "command",
159
+ "isExpression": false
160
+ }
161
+ ],
162
+ "isUnique": false,
163
+ "where": null,
164
+ "origin": "manual",
165
+ "name": "idx_telemetry_command",
166
+ "entityType": "indexes",
167
+ "table": "telemetry_events"
168
+ },
169
+ {
170
+ "columns": [
171
+ {
172
+ "value": "domain",
173
+ "isExpression": false
174
+ }
175
+ ],
176
+ "isUnique": false,
177
+ "where": null,
178
+ "origin": "manual",
179
+ "name": "idx_telemetry_domain",
180
+ "entityType": "indexes",
181
+ "table": "telemetry_events"
182
+ },
183
+ {
184
+ "columns": [
185
+ {
186
+ "value": "exit_code",
187
+ "isExpression": false
188
+ }
189
+ ],
190
+ "isUnique": false,
191
+ "where": null,
192
+ "origin": "manual",
193
+ "name": "idx_telemetry_exit_code",
194
+ "entityType": "indexes",
195
+ "table": "telemetry_events"
196
+ },
197
+ {
198
+ "columns": [
199
+ {
200
+ "value": "timestamp",
201
+ "isExpression": false
202
+ }
203
+ ],
204
+ "isUnique": false,
205
+ "where": null,
206
+ "origin": "manual",
207
+ "name": "idx_telemetry_timestamp",
208
+ "entityType": "indexes",
209
+ "table": "telemetry_events"
210
+ },
211
+ {
212
+ "columns": [
213
+ {
214
+ "value": "duration_ms",
215
+ "isExpression": false
216
+ }
217
+ ],
218
+ "isUnique": false,
219
+ "where": null,
220
+ "origin": "manual",
221
+ "name": "idx_telemetry_duration",
222
+ "entityType": "indexes",
223
+ "table": "telemetry_events"
224
+ }
225
+ ],
226
+ "renames": []
227
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cleocode/cleo",
3
- "version": "2026.4.107",
3
+ "version": "2026.4.108",
4
4
  "description": "CLEO CLI — the assembled product consuming @cleocode/core",
5
5
  "type": "module",
6
6
  "main": "./dist/cli/index.js",
@@ -29,14 +29,14 @@
29
29
  "tree-sitter-ruby": "^0.23.1",
30
30
  "tree-sitter-rust": "0.23.1",
31
31
  "tree-sitter-typescript": "^0.23.2",
32
- "@cleocode/cant": "2026.4.107",
33
- "@cleocode/contracts": "2026.4.107",
34
- "@cleocode/core": "2026.4.107",
35
- "@cleocode/caamp": "2026.4.107",
36
- "@cleocode/lafs": "2026.4.107",
37
- "@cleocode/nexus": "2026.4.107",
38
- "@cleocode/playbooks": "2026.4.107",
39
- "@cleocode/runtime": "2026.4.107"
32
+ "@cleocode/caamp": "2026.4.108",
33
+ "@cleocode/cant": "2026.4.108",
34
+ "@cleocode/core": "2026.4.108",
35
+ "@cleocode/contracts": "2026.4.108",
36
+ "@cleocode/lafs": "2026.4.108",
37
+ "@cleocode/nexus": "2026.4.108",
38
+ "@cleocode/playbooks": "2026.4.108",
39
+ "@cleocode/runtime": "2026.4.108"
40
40
  },
41
41
  "engines": {
42
42
  "node": ">=24.0.0"
@@ -1,18 +0,0 @@
1
- -- T1126 — partial index for Tier-2 proposal rate-limiter COUNT query.
2
- --
3
- -- The proposal-rate-limiter.ts COUNT query filters on:
4
- -- labels_json LIKE '%sentient-tier2%'
5
- -- date(created_at) = date('now')
6
- -- status IN ('proposed', 'pending', 'active', 'done')
7
- --
8
- -- Without this index the query scans the entire tasks table every tick.
9
- -- The partial index covers only rows that could match the LIKE predicate,
10
- -- making the daily-cap check O(log n) instead of O(n).
11
- --
12
- -- Drizzle ORM schema note: partial indexes with .where() are not yet
13
- -- supported in the sqliteTable callback style used by tasks-schema.ts.
14
- -- This migration is the canonical source of truth for the index.
15
-
16
- CREATE INDEX IF NOT EXISTS `idx_tasks_sentient_proposals_today`
17
- ON `tasks` (date(`created_at`))
18
- WHERE `labels_json` LIKE '%sentient-tier2%';