@cleocode/playbooks 2026.5.130 → 2026.5.132

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/schema.d.ts CHANGED
@@ -1,374 +1,18 @@
1
1
  /**
2
2
  * Drizzle ORM table definitions for playbook state.
3
+ *
4
+ * The canonical `sqliteTable` definitions were relocated into the consolidated
5
+ * substrate schema directory (`@cleocode/core/store/schema/playbooks`) for
6
+ * Gate 4 (Contracts Fan-Out) compliance — T11359 · E2 · SG-DB-SUBSTRATE-V2.
7
+ * This module is now a re-export shim so existing `from '../schema.js'` imports
8
+ * keep working unchanged. `@cleocode/playbooks` already depends on
9
+ * `@cleocode/core`, so importing the tables back here introduces no cycle.
10
+ *
3
11
  * Both tables are added to tasks.db via migration at
4
12
  * packages/core/migrations/drizzle-tasks/20260417220000_t889-playbook-tables/.
5
13
  *
6
14
  * @task T889 / T904 / W4-6
15
+ * @task T11359
7
16
  */
8
- export declare const playbookRuns: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
9
- name: "playbook_runs";
10
- schema: undefined;
11
- columns: {
12
- runId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
13
- name: string;
14
- tableName: "playbook_runs";
15
- dataType: "string";
16
- data: string;
17
- driverParam: string;
18
- notNull: true;
19
- hasDefault: false;
20
- isPrimaryKey: true;
21
- isAutoincrement: false;
22
- hasRuntimeDefault: false;
23
- enumValues: [string, ...string[]];
24
- baseColumn: never;
25
- identity: undefined;
26
- generated: undefined;
27
- }, {}>;
28
- playbookName: import("drizzle-orm/sqlite-core").SQLiteColumn<{
29
- name: string;
30
- tableName: "playbook_runs";
31
- dataType: "string";
32
- data: string;
33
- driverParam: string;
34
- notNull: true;
35
- hasDefault: false;
36
- isPrimaryKey: false;
37
- isAutoincrement: false;
38
- hasRuntimeDefault: false;
39
- enumValues: [string, ...string[]];
40
- baseColumn: never;
41
- identity: undefined;
42
- generated: undefined;
43
- }, {}>;
44
- playbookHash: import("drizzle-orm/sqlite-core").SQLiteColumn<{
45
- name: string;
46
- tableName: "playbook_runs";
47
- dataType: "string";
48
- data: string;
49
- driverParam: string;
50
- notNull: true;
51
- hasDefault: false;
52
- isPrimaryKey: false;
53
- isAutoincrement: false;
54
- hasRuntimeDefault: false;
55
- enumValues: [string, ...string[]];
56
- baseColumn: never;
57
- identity: undefined;
58
- generated: undefined;
59
- }, {}>;
60
- currentNode: import("drizzle-orm/sqlite-core").SQLiteColumn<{
61
- name: string;
62
- tableName: "playbook_runs";
63
- dataType: "string";
64
- data: string;
65
- driverParam: string;
66
- notNull: false;
67
- hasDefault: false;
68
- isPrimaryKey: false;
69
- isAutoincrement: false;
70
- hasRuntimeDefault: false;
71
- enumValues: [string, ...string[]];
72
- baseColumn: never;
73
- identity: undefined;
74
- generated: undefined;
75
- }, {}>;
76
- bindings: import("drizzle-orm/sqlite-core").SQLiteColumn<{
77
- name: string;
78
- tableName: "playbook_runs";
79
- dataType: "string";
80
- data: string;
81
- driverParam: string;
82
- notNull: true;
83
- hasDefault: true;
84
- isPrimaryKey: false;
85
- isAutoincrement: false;
86
- hasRuntimeDefault: false;
87
- enumValues: [string, ...string[]];
88
- baseColumn: never;
89
- identity: undefined;
90
- generated: undefined;
91
- }, {}>;
92
- errorContext: import("drizzle-orm/sqlite-core").SQLiteColumn<{
93
- name: string;
94
- tableName: "playbook_runs";
95
- dataType: "string";
96
- data: string;
97
- driverParam: string;
98
- notNull: false;
99
- hasDefault: false;
100
- isPrimaryKey: false;
101
- isAutoincrement: false;
102
- hasRuntimeDefault: false;
103
- enumValues: [string, ...string[]];
104
- baseColumn: never;
105
- identity: undefined;
106
- generated: undefined;
107
- }, {}>;
108
- status: import("drizzle-orm/sqlite-core").SQLiteColumn<{
109
- name: string;
110
- tableName: "playbook_runs";
111
- dataType: "string";
112
- data: string;
113
- driverParam: string;
114
- notNull: true;
115
- hasDefault: true;
116
- isPrimaryKey: false;
117
- isAutoincrement: false;
118
- hasRuntimeDefault: false;
119
- enumValues: [string, ...string[]];
120
- baseColumn: never;
121
- identity: undefined;
122
- generated: undefined;
123
- }, {}>;
124
- iterationCounts: import("drizzle-orm/sqlite-core").SQLiteColumn<{
125
- name: string;
126
- tableName: "playbook_runs";
127
- dataType: "string";
128
- data: string;
129
- driverParam: string;
130
- notNull: true;
131
- hasDefault: true;
132
- isPrimaryKey: false;
133
- isAutoincrement: false;
134
- hasRuntimeDefault: false;
135
- enumValues: [string, ...string[]];
136
- baseColumn: never;
137
- identity: undefined;
138
- generated: undefined;
139
- }, {}>;
140
- epicId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
141
- name: string;
142
- tableName: "playbook_runs";
143
- dataType: "string";
144
- data: string;
145
- driverParam: string;
146
- notNull: false;
147
- hasDefault: false;
148
- isPrimaryKey: false;
149
- isAutoincrement: false;
150
- hasRuntimeDefault: false;
151
- enumValues: [string, ...string[]];
152
- baseColumn: never;
153
- identity: undefined;
154
- generated: undefined;
155
- }, {}>;
156
- sessionId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
157
- name: string;
158
- tableName: "playbook_runs";
159
- dataType: "string";
160
- data: string;
161
- driverParam: string;
162
- notNull: false;
163
- hasDefault: false;
164
- isPrimaryKey: false;
165
- isAutoincrement: false;
166
- hasRuntimeDefault: false;
167
- enumValues: [string, ...string[]];
168
- baseColumn: never;
169
- identity: undefined;
170
- generated: undefined;
171
- }, {}>;
172
- startedAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
173
- name: string;
174
- tableName: "playbook_runs";
175
- dataType: "string";
176
- data: string;
177
- driverParam: string;
178
- notNull: true;
179
- hasDefault: true;
180
- isPrimaryKey: false;
181
- isAutoincrement: false;
182
- hasRuntimeDefault: false;
183
- enumValues: [string, ...string[]];
184
- baseColumn: never;
185
- identity: undefined;
186
- generated: undefined;
187
- }, {}>;
188
- completedAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
189
- name: string;
190
- tableName: "playbook_runs";
191
- dataType: "string";
192
- data: string;
193
- driverParam: string;
194
- notNull: false;
195
- hasDefault: false;
196
- isPrimaryKey: false;
197
- isAutoincrement: false;
198
- hasRuntimeDefault: false;
199
- enumValues: [string, ...string[]];
200
- baseColumn: never;
201
- identity: undefined;
202
- generated: undefined;
203
- }, {}>;
204
- };
205
- dialect: "sqlite";
206
- }>;
207
- export declare const playbookApprovals: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
208
- name: "playbook_approvals";
209
- schema: undefined;
210
- columns: {
211
- approvalId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
212
- name: string;
213
- tableName: "playbook_approvals";
214
- dataType: "string";
215
- data: string;
216
- driverParam: string;
217
- notNull: true;
218
- hasDefault: false;
219
- isPrimaryKey: true;
220
- isAutoincrement: false;
221
- hasRuntimeDefault: false;
222
- enumValues: [string, ...string[]];
223
- baseColumn: never;
224
- identity: undefined;
225
- generated: undefined;
226
- }, {}>;
227
- runId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
228
- name: string;
229
- tableName: "playbook_approvals";
230
- dataType: "string";
231
- data: string;
232
- driverParam: string;
233
- notNull: true;
234
- hasDefault: false;
235
- isPrimaryKey: false;
236
- isAutoincrement: false;
237
- hasRuntimeDefault: false;
238
- enumValues: [string, ...string[]];
239
- baseColumn: never;
240
- identity: undefined;
241
- generated: undefined;
242
- }, {}>;
243
- nodeId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
244
- name: string;
245
- tableName: "playbook_approvals";
246
- dataType: "string";
247
- data: string;
248
- driverParam: string;
249
- notNull: true;
250
- hasDefault: false;
251
- isPrimaryKey: false;
252
- isAutoincrement: false;
253
- hasRuntimeDefault: false;
254
- enumValues: [string, ...string[]];
255
- baseColumn: never;
256
- identity: undefined;
257
- generated: undefined;
258
- }, {}>;
259
- token: import("drizzle-orm/sqlite-core").SQLiteColumn<{
260
- name: string;
261
- tableName: "playbook_approvals";
262
- dataType: "string";
263
- data: string;
264
- driverParam: string;
265
- notNull: true;
266
- hasDefault: false;
267
- isPrimaryKey: false;
268
- isAutoincrement: false;
269
- hasRuntimeDefault: false;
270
- enumValues: [string, ...string[]];
271
- baseColumn: never;
272
- identity: undefined;
273
- generated: undefined;
274
- }, {}>;
275
- requestedAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
276
- name: string;
277
- tableName: "playbook_approvals";
278
- dataType: "string";
279
- data: string;
280
- driverParam: string;
281
- notNull: true;
282
- hasDefault: true;
283
- isPrimaryKey: false;
284
- isAutoincrement: false;
285
- hasRuntimeDefault: false;
286
- enumValues: [string, ...string[]];
287
- baseColumn: never;
288
- identity: undefined;
289
- generated: undefined;
290
- }, {}>;
291
- approvedAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
292
- name: string;
293
- tableName: "playbook_approvals";
294
- dataType: "string";
295
- data: string;
296
- driverParam: string;
297
- notNull: false;
298
- hasDefault: false;
299
- isPrimaryKey: false;
300
- isAutoincrement: false;
301
- hasRuntimeDefault: false;
302
- enumValues: [string, ...string[]];
303
- baseColumn: never;
304
- identity: undefined;
305
- generated: undefined;
306
- }, {}>;
307
- approver: import("drizzle-orm/sqlite-core").SQLiteColumn<{
308
- name: string;
309
- tableName: "playbook_approvals";
310
- dataType: "string";
311
- data: string;
312
- driverParam: string;
313
- notNull: false;
314
- hasDefault: false;
315
- isPrimaryKey: false;
316
- isAutoincrement: false;
317
- hasRuntimeDefault: false;
318
- enumValues: [string, ...string[]];
319
- baseColumn: never;
320
- identity: undefined;
321
- generated: undefined;
322
- }, {}>;
323
- reason: import("drizzle-orm/sqlite-core").SQLiteColumn<{
324
- name: string;
325
- tableName: "playbook_approvals";
326
- dataType: "string";
327
- data: string;
328
- driverParam: string;
329
- notNull: false;
330
- hasDefault: false;
331
- isPrimaryKey: false;
332
- isAutoincrement: false;
333
- hasRuntimeDefault: false;
334
- enumValues: [string, ...string[]];
335
- baseColumn: never;
336
- identity: undefined;
337
- generated: undefined;
338
- }, {}>;
339
- status: import("drizzle-orm/sqlite-core").SQLiteColumn<{
340
- name: string;
341
- tableName: "playbook_approvals";
342
- dataType: "string";
343
- data: string;
344
- driverParam: string;
345
- notNull: true;
346
- hasDefault: true;
347
- isPrimaryKey: false;
348
- isAutoincrement: false;
349
- hasRuntimeDefault: false;
350
- enumValues: [string, ...string[]];
351
- baseColumn: never;
352
- identity: undefined;
353
- generated: undefined;
354
- }, {}>;
355
- autoPassed: import("drizzle-orm/sqlite-core").SQLiteColumn<{
356
- name: string;
357
- tableName: "playbook_approvals";
358
- dataType: "number int53";
359
- data: number;
360
- driverParam: number;
361
- notNull: true;
362
- hasDefault: true;
363
- isPrimaryKey: false;
364
- isAutoincrement: false;
365
- hasRuntimeDefault: false;
366
- enumValues: undefined;
367
- baseColumn: never;
368
- identity: undefined;
369
- generated: undefined;
370
- }, {}>;
371
- };
372
- dialect: "sqlite";
373
- }>;
374
17
  export type { PlaybookApproval, PlaybookApprovalStatus, PlaybookRun, PlaybookRunStatus, } from '@cleocode/contracts';
18
+ export { playbookApprovals, playbookRuns } from '@cleocode/core/store/schema/playbooks.js';
package/dist/schema.js CHANGED
@@ -1,34 +1,17 @@
1
1
  /**
2
2
  * Drizzle ORM table definitions for playbook state.
3
+ *
4
+ * The canonical `sqliteTable` definitions were relocated into the consolidated
5
+ * substrate schema directory (`@cleocode/core/store/schema/playbooks`) for
6
+ * Gate 4 (Contracts Fan-Out) compliance — T11359 · E2 · SG-DB-SUBSTRATE-V2.
7
+ * This module is now a re-export shim so existing `from '../schema.js'` imports
8
+ * keep working unchanged. `@cleocode/playbooks` already depends on
9
+ * `@cleocode/core`, so importing the tables back here introduces no cycle.
10
+ *
3
11
  * Both tables are added to tasks.db via migration at
4
12
  * packages/core/migrations/drizzle-tasks/20260417220000_t889-playbook-tables/.
5
13
  *
6
14
  * @task T889 / T904 / W4-6
15
+ * @task T11359
7
16
  */
8
- import { integer, sqliteTable, text } from 'drizzle-orm/sqlite-core';
9
- export const playbookRuns = sqliteTable('playbook_runs', {
10
- runId: text('run_id').primaryKey(),
11
- playbookName: text('playbook_name').notNull(),
12
- playbookHash: text('playbook_hash').notNull(),
13
- currentNode: text('current_node'),
14
- bindings: text('bindings').notNull().default('{}'),
15
- errorContext: text('error_context'),
16
- status: text('status').notNull().default('running'),
17
- iterationCounts: text('iteration_counts').notNull().default('{}'),
18
- epicId: text('epic_id'),
19
- sessionId: text('session_id'),
20
- startedAt: text('started_at').notNull().default("(datetime('now'))"),
21
- completedAt: text('completed_at'),
22
- });
23
- export const playbookApprovals = sqliteTable('playbook_approvals', {
24
- approvalId: text('approval_id').primaryKey(),
25
- runId: text('run_id').notNull(),
26
- nodeId: text('node_id').notNull(),
27
- token: text('token').notNull().unique(),
28
- requestedAt: text('requested_at').notNull().default("(datetime('now'))"),
29
- approvedAt: text('approved_at'),
30
- approver: text('approver'),
31
- reason: text('reason'),
32
- status: text('status').notNull().default('pending'),
33
- autoPassed: integer('auto_passed').notNull().default(0),
34
- });
17
+ export { playbookApprovals, playbookRuns } from '@cleocode/core/store/schema/playbooks.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cleocode/playbooks",
3
- "version": "2026.5.130",
3
+ "version": "2026.5.132",
4
4
  "description": "Playbook DSL + runtime for CLEO — T889 Orchestration Coherence v3",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -19,8 +19,8 @@
19
19
  "dependencies": {
20
20
  "drizzle-orm": "1.0.0-rc.3",
21
21
  "js-yaml": "^4.1.0",
22
- "@cleocode/contracts": "2026.5.130",
23
- "@cleocode/core": "2026.5.130"
22
+ "@cleocode/contracts": "2026.5.132",
23
+ "@cleocode/core": "2026.5.132"
24
24
  },
25
25
  "devDependencies": {
26
26
  "@types/js-yaml": "^4.0.9",
package/src/schema.ts CHANGED
@@ -1,44 +1,24 @@
1
1
  /**
2
2
  * Drizzle ORM table definitions for playbook state.
3
+ *
4
+ * The canonical `sqliteTable` definitions were relocated into the consolidated
5
+ * substrate schema directory (`@cleocode/core/store/schema/playbooks`) for
6
+ * Gate 4 (Contracts Fan-Out) compliance — T11359 · E2 · SG-DB-SUBSTRATE-V2.
7
+ * This module is now a re-export shim so existing `from '../schema.js'` imports
8
+ * keep working unchanged. `@cleocode/playbooks` already depends on
9
+ * `@cleocode/core`, so importing the tables back here introduces no cycle.
10
+ *
3
11
  * Both tables are added to tasks.db via migration at
4
12
  * packages/core/migrations/drizzle-tasks/20260417220000_t889-playbook-tables/.
5
13
  *
6
14
  * @task T889 / T904 / W4-6
15
+ * @task T11359
7
16
  */
8
17
 
9
- import { integer, sqliteTable, text } from 'drizzle-orm/sqlite-core';
10
-
11
- export const playbookRuns = sqliteTable('playbook_runs', {
12
- runId: text('run_id').primaryKey(),
13
- playbookName: text('playbook_name').notNull(),
14
- playbookHash: text('playbook_hash').notNull(),
15
- currentNode: text('current_node'),
16
- bindings: text('bindings').notNull().default('{}'),
17
- errorContext: text('error_context'),
18
- status: text('status').notNull().default('running'),
19
- iterationCounts: text('iteration_counts').notNull().default('{}'),
20
- epicId: text('epic_id'),
21
- sessionId: text('session_id'),
22
- startedAt: text('started_at').notNull().default("(datetime('now'))"),
23
- completedAt: text('completed_at'),
24
- });
25
-
26
- export const playbookApprovals = sqliteTable('playbook_approvals', {
27
- approvalId: text('approval_id').primaryKey(),
28
- runId: text('run_id').notNull(),
29
- nodeId: text('node_id').notNull(),
30
- token: text('token').notNull().unique(),
31
- requestedAt: text('requested_at').notNull().default("(datetime('now'))"),
32
- approvedAt: text('approved_at'),
33
- approver: text('approver'),
34
- reason: text('reason'),
35
- status: text('status').notNull().default('pending'),
36
- autoPassed: integer('auto_passed').notNull().default(0),
37
- });
38
-
39
18
  export type {
40
19
  PlaybookApproval,
41
20
  PlaybookApprovalStatus,
42
21
  PlaybookRun,
43
22
  PlaybookRunStatus,
44
23
  } from '@cleocode/contracts';
24
+ export { playbookApprovals, playbookRuns } from '@cleocode/core/store/schema/playbooks.js';