@igorjpimenta/winch 0.0.0-stage → 2026.11.22-beta.3

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.
Files changed (88) hide show
  1. package/.migrations/0000_next_katie_power.sql +99 -0
  2. package/.migrations/0001_add-events-kind.sql +8 -0
  3. package/.migrations/0002_drop-session-budgets.sql +1 -0
  4. package/.migrations/0003_pink_siren.sql +8 -0
  5. package/.migrations/0004_salty_trauma.sql +1 -0
  6. package/.migrations/0005_classy_havok.sql +1 -0
  7. package/.migrations/0006_recursive_items.sql +265 -0
  8. package/.migrations/0007_unify_statuses.sql +35 -0
  9. package/.migrations/0008_core_dispatch.sql +61 -0
  10. package/.migrations/0009_webhooks.sql +17 -0
  11. package/.migrations/0010_dispatch_consumer_id.sql +1 -0
  12. package/.migrations/0011_dispatch_delivery_leases.sql +53 -0
  13. package/.migrations/0012_dispatch_fencing_audit.sql +32 -0
  14. package/.migrations/meta/0000_snapshot.json +658 -0
  15. package/.migrations/meta/0001_snapshot.json +665 -0
  16. package/.migrations/meta/0002_snapshot.json +604 -0
  17. package/.migrations/meta/0003_snapshot.json +656 -0
  18. package/.migrations/meta/0004_snapshot.json +664 -0
  19. package/.migrations/meta/0005_snapshot.json +671 -0
  20. package/.migrations/meta/0006_snapshot.json +1089 -0
  21. package/.migrations/meta/0007_unify_statuses_snapshot.json +1097 -0
  22. package/.migrations/meta/0008_snapshot.json +1382 -0
  23. package/.migrations/meta/0009_snapshot.json +1428 -0
  24. package/.migrations/meta/0010_snapshot.json +1435 -0
  25. package/.migrations/meta/0011_snapshot.json +1670 -0
  26. package/.migrations/meta/0012_snapshot.json +1900 -0
  27. package/.migrations/meta/_journal.json +97 -0
  28. package/README.md +480 -2
  29. package/bin/winch.js +4 -0
  30. package/package.json +36 -4
  31. package/plugins/README.md +304 -0
  32. package/plugins/openclaw/winch/README.md +71 -0
  33. package/plugins/openclaw/winch/dispatch.js +236 -0
  34. package/plugins/openclaw/winch/index.js +139 -0
  35. package/plugins/openclaw/winch/meta.js +35 -0
  36. package/plugins/openclaw/winch/openclaw.plugin.json +43 -0
  37. package/plugins/openclaw/winch/package.json +37 -0
  38. package/plugins/opencode/winch/dispatch.js +228 -0
  39. package/plugins/opencode/winch/hooks.js +22 -0
  40. package/plugins/opencode/winch/identity.js +34 -0
  41. package/plugins/opencode/winch/index.js +198 -0
  42. package/plugins/opencode/winch/package.json +26 -0
  43. package/src/cli.js +434 -0
  44. package/src/config.js +181 -0
  45. package/src/db.js +39 -0
  46. package/src/deps.js +70 -0
  47. package/src/dispatch-server.js +204 -0
  48. package/src/dispatch-webhook.js +221 -0
  49. package/src/dispatch.js +258 -0
  50. package/src/events-ws.js +269 -0
  51. package/src/identity.js +140 -0
  52. package/src/ids.js +18 -0
  53. package/src/mcp-http.js +208 -0
  54. package/src/mcp.js +107 -0
  55. package/src/merges.js +150 -0
  56. package/src/paths.js +15 -0
  57. package/src/ready-queue.js +77 -0
  58. package/src/release.js +96 -0
  59. package/src/reserved.js +23 -0
  60. package/src/schema.js +302 -0
  61. package/src/store/admission.js +314 -0
  62. package/src/store/artifacts.js +24 -0
  63. package/src/store/attempts.js +22 -0
  64. package/src/store/claims.js +182 -0
  65. package/src/store/core.js +225 -0
  66. package/src/store/delivery.js +137 -0
  67. package/src/store/deps.js +62 -0
  68. package/src/store/dispatch-events.js +38 -0
  69. package/src/store/epics.js +31 -0
  70. package/src/store/events.js +21 -0
  71. package/src/store/gates.js +85 -0
  72. package/src/store/index.js +135 -0
  73. package/src/store/items.js +303 -0
  74. package/src/store/stories.js +37 -0
  75. package/src/store/sweep.js +77 -0
  76. package/src/store/tasks.js +190 -0
  77. package/src/store/webhook.js +197 -0
  78. package/src/tools/accept-wake.js +30 -0
  79. package/src/tools/assign.js +75 -0
  80. package/src/tools/claim.js +88 -0
  81. package/src/tools/definitions.js +371 -0
  82. package/src/tools/delegate.js +147 -0
  83. package/src/tools/index.js +44 -0
  84. package/src/tools/plan.js +262 -0
  85. package/src/tools/read.js +103 -0
  86. package/src/tools/report.js +190 -0
  87. package/src/tools/shared.js +62 -0
  88. package/src/watcher.js +105 -0
@@ -0,0 +1,604 @@
1
+ {
2
+ "version": "6",
3
+ "dialect": "sqlite",
4
+ "id": "7f4d6c58-2c48-41bb-94be-bab19effc44c",
5
+ "prevId": "70a549a8-94cf-4951-ba0b-382354d1e002",
6
+ "tables": {
7
+ "deps": {
8
+ "name": "deps",
9
+ "columns": {
10
+ "from_id": {
11
+ "name": "from_id",
12
+ "type": "text",
13
+ "primaryKey": false,
14
+ "notNull": true,
15
+ "autoincrement": false
16
+ },
17
+ "from_kind": {
18
+ "name": "from_kind",
19
+ "type": "text",
20
+ "primaryKey": false,
21
+ "notNull": true,
22
+ "autoincrement": false
23
+ },
24
+ "to_id": {
25
+ "name": "to_id",
26
+ "type": "text",
27
+ "primaryKey": false,
28
+ "notNull": true,
29
+ "autoincrement": false
30
+ },
31
+ "to_kind": {
32
+ "name": "to_kind",
33
+ "type": "text",
34
+ "primaryKey": false,
35
+ "notNull": true,
36
+ "autoincrement": false
37
+ },
38
+ "created_at": {
39
+ "name": "created_at",
40
+ "type": "integer",
41
+ "primaryKey": false,
42
+ "notNull": true,
43
+ "autoincrement": false
44
+ }
45
+ },
46
+ "indexes": {
47
+ "idx_deps_from": {
48
+ "name": "idx_deps_from",
49
+ "columns": [
50
+ "from_id"
51
+ ],
52
+ "isUnique": false
53
+ },
54
+ "idx_deps_to": {
55
+ "name": "idx_deps_to",
56
+ "columns": [
57
+ "to_id"
58
+ ],
59
+ "isUnique": false
60
+ }
61
+ },
62
+ "foreignKeys": {},
63
+ "compositePrimaryKeys": {
64
+ "deps_from_id_to_id_pk": {
65
+ "columns": [
66
+ "from_id",
67
+ "to_id"
68
+ ],
69
+ "name": "deps_from_id_to_id_pk"
70
+ }
71
+ },
72
+ "uniqueConstraints": {},
73
+ "checkConstraints": {
74
+ "deps_from_kind": {
75
+ "name": "deps_from_kind",
76
+ "value": "\"deps\".\"from_kind\" IN ('epic', 'story', 'task')"
77
+ },
78
+ "deps_to_kind": {
79
+ "name": "deps_to_kind",
80
+ "value": "\"deps\".\"to_kind\" IN ('epic', 'story', 'task')"
81
+ }
82
+ }
83
+ },
84
+ "epics": {
85
+ "name": "epics",
86
+ "columns": {
87
+ "id": {
88
+ "name": "id",
89
+ "type": "text",
90
+ "primaryKey": true,
91
+ "notNull": true,
92
+ "autoincrement": false
93
+ },
94
+ "title": {
95
+ "name": "title",
96
+ "type": "text",
97
+ "primaryKey": false,
98
+ "notNull": true,
99
+ "autoincrement": false
100
+ },
101
+ "description": {
102
+ "name": "description",
103
+ "type": "text",
104
+ "primaryKey": false,
105
+ "notNull": false,
106
+ "autoincrement": false
107
+ },
108
+ "acceptance": {
109
+ "name": "acceptance",
110
+ "type": "text",
111
+ "primaryKey": false,
112
+ "notNull": false,
113
+ "autoincrement": false
114
+ },
115
+ "status": {
116
+ "name": "status",
117
+ "type": "text",
118
+ "primaryKey": false,
119
+ "notNull": true,
120
+ "autoincrement": false
121
+ },
122
+ "owner_team": {
123
+ "name": "owner_team",
124
+ "type": "text",
125
+ "primaryKey": false,
126
+ "notNull": false,
127
+ "autoincrement": false
128
+ },
129
+ "priority": {
130
+ "name": "priority",
131
+ "type": "integer",
132
+ "primaryKey": false,
133
+ "notNull": true,
134
+ "autoincrement": false,
135
+ "default": 50
136
+ },
137
+ "created_at": {
138
+ "name": "created_at",
139
+ "type": "integer",
140
+ "primaryKey": false,
141
+ "notNull": true,
142
+ "autoincrement": false
143
+ },
144
+ "updated_at": {
145
+ "name": "updated_at",
146
+ "type": "integer",
147
+ "primaryKey": false,
148
+ "notNull": true,
149
+ "autoincrement": false
150
+ },
151
+ "closed_at": {
152
+ "name": "closed_at",
153
+ "type": "integer",
154
+ "primaryKey": false,
155
+ "notNull": false,
156
+ "autoincrement": false
157
+ }
158
+ },
159
+ "indexes": {},
160
+ "foreignKeys": {},
161
+ "compositePrimaryKeys": {},
162
+ "uniqueConstraints": {},
163
+ "checkConstraints": {
164
+ "epics_status": {
165
+ "name": "epics_status",
166
+ "value": "\"epics\".\"status\" IN ('idea', 'planned', 'in_progress', 'done', 'cancelled')"
167
+ }
168
+ }
169
+ },
170
+ "events": {
171
+ "name": "events",
172
+ "columns": {
173
+ "id": {
174
+ "name": "id",
175
+ "type": "integer",
176
+ "primaryKey": true,
177
+ "notNull": true,
178
+ "autoincrement": true
179
+ },
180
+ "task_id": {
181
+ "name": "task_id",
182
+ "type": "text",
183
+ "primaryKey": false,
184
+ "notNull": true,
185
+ "autoincrement": false
186
+ },
187
+ "from_status": {
188
+ "name": "from_status",
189
+ "type": "text",
190
+ "primaryKey": false,
191
+ "notNull": false,
192
+ "autoincrement": false
193
+ },
194
+ "to_status": {
195
+ "name": "to_status",
196
+ "type": "text",
197
+ "primaryKey": false,
198
+ "notNull": true,
199
+ "autoincrement": false
200
+ },
201
+ "kind": {
202
+ "name": "kind",
203
+ "type": "text",
204
+ "primaryKey": false,
205
+ "notNull": false,
206
+ "autoincrement": false
207
+ },
208
+ "actor": {
209
+ "name": "actor",
210
+ "type": "text",
211
+ "primaryKey": false,
212
+ "notNull": false,
213
+ "autoincrement": false
214
+ },
215
+ "note": {
216
+ "name": "note",
217
+ "type": "text",
218
+ "primaryKey": false,
219
+ "notNull": false,
220
+ "autoincrement": false
221
+ },
222
+ "session_ref": {
223
+ "name": "session_ref",
224
+ "type": "text",
225
+ "primaryKey": false,
226
+ "notNull": false,
227
+ "autoincrement": false
228
+ },
229
+ "at": {
230
+ "name": "at",
231
+ "type": "integer",
232
+ "primaryKey": false,
233
+ "notNull": true,
234
+ "autoincrement": false
235
+ }
236
+ },
237
+ "indexes": {
238
+ "idx_events_task": {
239
+ "name": "idx_events_task",
240
+ "columns": [
241
+ "task_id"
242
+ ],
243
+ "isUnique": false
244
+ }
245
+ },
246
+ "foreignKeys": {},
247
+ "compositePrimaryKeys": {},
248
+ "uniqueConstraints": {},
249
+ "checkConstraints": {}
250
+ },
251
+ "stories": {
252
+ "name": "stories",
253
+ "columns": {
254
+ "id": {
255
+ "name": "id",
256
+ "type": "text",
257
+ "primaryKey": true,
258
+ "notNull": true,
259
+ "autoincrement": false
260
+ },
261
+ "epic_id": {
262
+ "name": "epic_id",
263
+ "type": "text",
264
+ "primaryKey": false,
265
+ "notNull": true,
266
+ "autoincrement": false
267
+ },
268
+ "title": {
269
+ "name": "title",
270
+ "type": "text",
271
+ "primaryKey": false,
272
+ "notNull": true,
273
+ "autoincrement": false
274
+ },
275
+ "description": {
276
+ "name": "description",
277
+ "type": "text",
278
+ "primaryKey": false,
279
+ "notNull": false,
280
+ "autoincrement": false
281
+ },
282
+ "acceptance": {
283
+ "name": "acceptance",
284
+ "type": "text",
285
+ "primaryKey": false,
286
+ "notNull": false,
287
+ "autoincrement": false
288
+ },
289
+ "status": {
290
+ "name": "status",
291
+ "type": "text",
292
+ "primaryKey": false,
293
+ "notNull": true,
294
+ "autoincrement": false
295
+ },
296
+ "size": {
297
+ "name": "size",
298
+ "type": "text",
299
+ "primaryKey": false,
300
+ "notNull": false,
301
+ "autoincrement": false
302
+ },
303
+ "priority": {
304
+ "name": "priority",
305
+ "type": "integer",
306
+ "primaryKey": false,
307
+ "notNull": true,
308
+ "autoincrement": false,
309
+ "default": 50
310
+ },
311
+ "assigned": {
312
+ "name": "assigned",
313
+ "type": "text",
314
+ "primaryKey": false,
315
+ "notNull": false,
316
+ "autoincrement": false
317
+ },
318
+ "capabilities": {
319
+ "name": "capabilities",
320
+ "type": "text",
321
+ "primaryKey": false,
322
+ "notNull": false,
323
+ "autoincrement": false
324
+ },
325
+ "created_at": {
326
+ "name": "created_at",
327
+ "type": "integer",
328
+ "primaryKey": false,
329
+ "notNull": true,
330
+ "autoincrement": false
331
+ },
332
+ "updated_at": {
333
+ "name": "updated_at",
334
+ "type": "integer",
335
+ "primaryKey": false,
336
+ "notNull": true,
337
+ "autoincrement": false
338
+ },
339
+ "closed_at": {
340
+ "name": "closed_at",
341
+ "type": "integer",
342
+ "primaryKey": false,
343
+ "notNull": false,
344
+ "autoincrement": false
345
+ }
346
+ },
347
+ "indexes": {
348
+ "idx_stories_epic": {
349
+ "name": "idx_stories_epic",
350
+ "columns": [
351
+ "epic_id"
352
+ ],
353
+ "isUnique": false
354
+ },
355
+ "idx_stories_status_assigned": {
356
+ "name": "idx_stories_status_assigned",
357
+ "columns": [
358
+ "status",
359
+ "assigned"
360
+ ],
361
+ "isUnique": false
362
+ }
363
+ },
364
+ "foreignKeys": {
365
+ "stories_epic_id_epics_id_fk": {
366
+ "name": "stories_epic_id_epics_id_fk",
367
+ "tableFrom": "stories",
368
+ "tableTo": "epics",
369
+ "columnsFrom": [
370
+ "epic_id"
371
+ ],
372
+ "columnsTo": [
373
+ "id"
374
+ ],
375
+ "onDelete": "cascade",
376
+ "onUpdate": "no action"
377
+ }
378
+ },
379
+ "compositePrimaryKeys": {},
380
+ "uniqueConstraints": {},
381
+ "checkConstraints": {
382
+ "stories_status": {
383
+ "name": "stories_status",
384
+ "value": "\"stories\".\"status\" IN ('backlog', 'ready', 'in_progress', 'review', 'done', 'blocked', 'cancelled')"
385
+ }
386
+ }
387
+ },
388
+ "tasks": {
389
+ "name": "tasks",
390
+ "columns": {
391
+ "id": {
392
+ "name": "id",
393
+ "type": "text",
394
+ "primaryKey": true,
395
+ "notNull": true,
396
+ "autoincrement": false
397
+ },
398
+ "story_id": {
399
+ "name": "story_id",
400
+ "type": "text",
401
+ "primaryKey": false,
402
+ "notNull": true,
403
+ "autoincrement": false
404
+ },
405
+ "title": {
406
+ "name": "title",
407
+ "type": "text",
408
+ "primaryKey": false,
409
+ "notNull": true,
410
+ "autoincrement": false
411
+ },
412
+ "description": {
413
+ "name": "description",
414
+ "type": "text",
415
+ "primaryKey": false,
416
+ "notNull": false,
417
+ "autoincrement": false
418
+ },
419
+ "status": {
420
+ "name": "status",
421
+ "type": "text",
422
+ "primaryKey": false,
423
+ "notNull": true,
424
+ "autoincrement": false
425
+ },
426
+ "execution_kind": {
427
+ "name": "execution_kind",
428
+ "type": "text",
429
+ "primaryKey": false,
430
+ "notNull": true,
431
+ "autoincrement": false
432
+ },
433
+ "execution_args": {
434
+ "name": "execution_args",
435
+ "type": "text",
436
+ "primaryKey": false,
437
+ "notNull": true,
438
+ "autoincrement": false,
439
+ "default": "'{}'"
440
+ },
441
+ "assigned": {
442
+ "name": "assigned",
443
+ "type": "text",
444
+ "primaryKey": false,
445
+ "notNull": false,
446
+ "autoincrement": false
447
+ },
448
+ "capabilities": {
449
+ "name": "capabilities",
450
+ "type": "text",
451
+ "primaryKey": false,
452
+ "notNull": false,
453
+ "autoincrement": false
454
+ },
455
+ "flow_id": {
456
+ "name": "flow_id",
457
+ "type": "text",
458
+ "primaryKey": false,
459
+ "notNull": false,
460
+ "autoincrement": false
461
+ },
462
+ "task_run_id": {
463
+ "name": "task_run_id",
464
+ "type": "text",
465
+ "primaryKey": false,
466
+ "notNull": false,
467
+ "autoincrement": false
468
+ },
469
+ "claim_expires_at": {
470
+ "name": "claim_expires_at",
471
+ "type": "integer",
472
+ "primaryKey": false,
473
+ "notNull": false,
474
+ "autoincrement": false
475
+ },
476
+ "lease_seconds": {
477
+ "name": "lease_seconds",
478
+ "type": "integer",
479
+ "primaryKey": false,
480
+ "notNull": false,
481
+ "autoincrement": false
482
+ },
483
+ "last_heartbeat": {
484
+ "name": "last_heartbeat",
485
+ "type": "integer",
486
+ "primaryKey": false,
487
+ "notNull": false,
488
+ "autoincrement": false
489
+ },
490
+ "attempt_count": {
491
+ "name": "attempt_count",
492
+ "type": "integer",
493
+ "primaryKey": false,
494
+ "notNull": true,
495
+ "autoincrement": false,
496
+ "default": 0
497
+ },
498
+ "gate_type": {
499
+ "name": "gate_type",
500
+ "type": "text",
501
+ "primaryKey": false,
502
+ "notNull": false,
503
+ "autoincrement": false
504
+ },
505
+ "blocked_at": {
506
+ "name": "blocked_at",
507
+ "type": "integer",
508
+ "primaryKey": false,
509
+ "notNull": false,
510
+ "autoincrement": false
511
+ },
512
+ "result_summary": {
513
+ "name": "result_summary",
514
+ "type": "text",
515
+ "primaryKey": false,
516
+ "notNull": false,
517
+ "autoincrement": false
518
+ },
519
+ "created_at": {
520
+ "name": "created_at",
521
+ "type": "integer",
522
+ "primaryKey": false,
523
+ "notNull": true,
524
+ "autoincrement": false
525
+ },
526
+ "updated_at": {
527
+ "name": "updated_at",
528
+ "type": "integer",
529
+ "primaryKey": false,
530
+ "notNull": true,
531
+ "autoincrement": false
532
+ },
533
+ "claimed_at": {
534
+ "name": "claimed_at",
535
+ "type": "integer",
536
+ "primaryKey": false,
537
+ "notNull": false,
538
+ "autoincrement": false
539
+ },
540
+ "closed_at": {
541
+ "name": "closed_at",
542
+ "type": "integer",
543
+ "primaryKey": false,
544
+ "notNull": false,
545
+ "autoincrement": false
546
+ }
547
+ },
548
+ "indexes": {
549
+ "idx_tasks_story": {
550
+ "name": "idx_tasks_story",
551
+ "columns": [
552
+ "story_id"
553
+ ],
554
+ "isUnique": false
555
+ },
556
+ "idx_tasks_status_assigned": {
557
+ "name": "idx_tasks_status_assigned",
558
+ "columns": [
559
+ "status",
560
+ "assigned"
561
+ ],
562
+ "isUnique": false
563
+ }
564
+ },
565
+ "foreignKeys": {
566
+ "tasks_story_id_stories_id_fk": {
567
+ "name": "tasks_story_id_stories_id_fk",
568
+ "tableFrom": "tasks",
569
+ "tableTo": "stories",
570
+ "columnsFrom": [
571
+ "story_id"
572
+ ],
573
+ "columnsTo": [
574
+ "id"
575
+ ],
576
+ "onDelete": "cascade",
577
+ "onUpdate": "no action"
578
+ }
579
+ },
580
+ "compositePrimaryKeys": {},
581
+ "uniqueConstraints": {},
582
+ "checkConstraints": {
583
+ "tasks_status": {
584
+ "name": "tasks_status",
585
+ "value": "\"tasks\".\"status\" IN ('todo', 'in_progress', 'done', 'blocked', 'cancelled')"
586
+ },
587
+ "tasks_execution_kind": {
588
+ "name": "tasks_execution_kind",
589
+ "value": "\"tasks\".\"execution_kind\" IN ('pipeclaw', 'subagent', 'cli', 'gate', 'manual')"
590
+ }
591
+ }
592
+ }
593
+ },
594
+ "views": {},
595
+ "enums": {},
596
+ "_meta": {
597
+ "schemas": {},
598
+ "tables": {},
599
+ "columns": {}
600
+ },
601
+ "internal": {
602
+ "indexes": {}
603
+ }
604
+ }