@miadi/tide-contract 0.3.4 → 0.3.6

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,1584 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://miadi.dev/schemas/tide-draft-events.schema.json",
4
+ "title": "tide draft events",
5
+ "description": "One line of <MIADI_HOME>/drafts/events.jsonl. Catalog 0.1.0, MiadiEventEnvelope 0.1.0.",
6
+ "type": "object",
7
+ "required": [
8
+ "id",
9
+ "schema_version",
10
+ "event_type",
11
+ "source",
12
+ "subject",
13
+ "occurred_at",
14
+ "observed_at",
15
+ "idempotency_key",
16
+ "privacy",
17
+ "payload"
18
+ ],
19
+ "properties": {
20
+ "id": {
21
+ "type": "string",
22
+ "pattern": "^tdev:\\d+:[0-9a-f]+$"
23
+ },
24
+ "schema_version": {
25
+ "const": "0.1.0"
26
+ },
27
+ "source": {
28
+ "type": "object",
29
+ "required": [
30
+ "kind",
31
+ "system"
32
+ ],
33
+ "properties": {
34
+ "kind": {
35
+ "const": "terminal"
36
+ },
37
+ "system": {
38
+ "const": "tide"
39
+ },
40
+ "instance": {
41
+ "type": "string"
42
+ }
43
+ }
44
+ },
45
+ "subject": {
46
+ "type": "object",
47
+ "required": [
48
+ "kind",
49
+ "id"
50
+ ],
51
+ "properties": {
52
+ "kind": {
53
+ "const": "draft"
54
+ },
55
+ "id": {
56
+ "type": "string",
57
+ "pattern": "^draft:[0-9a-f]+$"
58
+ }
59
+ }
60
+ },
61
+ "occurred_at": {
62
+ "type": "string"
63
+ },
64
+ "observed_at": {
65
+ "type": "string"
66
+ },
67
+ "actor": {
68
+ "type": "object",
69
+ "properties": {
70
+ "kind": {
71
+ "type": "string"
72
+ },
73
+ "id": {
74
+ "type": "string"
75
+ }
76
+ }
77
+ },
78
+ "correlation_id": {
79
+ "type": "string"
80
+ },
81
+ "causation_id": {
82
+ "type": "string"
83
+ },
84
+ "idempotency_key": {
85
+ "type": "string"
86
+ },
87
+ "privacy": {
88
+ "type": "object",
89
+ "required": [
90
+ "classification",
91
+ "content_included"
92
+ ],
93
+ "properties": {
94
+ "classification": {
95
+ "type": "string"
96
+ },
97
+ "content_included": {
98
+ "type": "boolean"
99
+ }
100
+ }
101
+ },
102
+ "payload": {
103
+ "type": "object"
104
+ }
105
+ },
106
+ "oneOf": [
107
+ {
108
+ "title": "tide.draft.opened",
109
+ "description": "Text appeared at a shell prompt that held none at the last observation.",
110
+ "properties": {
111
+ "event_type": {
112
+ "const": "tide.draft.opened"
113
+ },
114
+ "privacy": {
115
+ "type": "object",
116
+ "properties": {
117
+ "content_included": {
118
+ "const": false
119
+ }
120
+ }
121
+ },
122
+ "payload": {
123
+ "type": "object",
124
+ "required": [
125
+ "pane",
126
+ "chars",
127
+ "lines",
128
+ "digest",
129
+ "kind",
130
+ "in_view"
131
+ ],
132
+ "properties": {
133
+ "pane": {
134
+ "type": "string",
135
+ "description": "The pane's address, `<session>:<window>.<pane>`."
136
+ },
137
+ "chars": {
138
+ "type": "number",
139
+ "description": "Length of the draft."
140
+ },
141
+ "lines": {
142
+ "type": "number",
143
+ "description": "Lines in the draft, continuation lines included."
144
+ },
145
+ "digest": {
146
+ "type": "string",
147
+ "description": "HMAC-SHA256 of the text keyed with `<MIADI_HOME>/drafts/.key`, first 16 hex."
148
+ },
149
+ "kind": {
150
+ "type": "string",
151
+ "description": "`mctgo` when the draft starts a session on a team, else `shell`. Only a `mctgo` draft leaves the host."
152
+ },
153
+ "in_view": {
154
+ "type": "boolean",
155
+ "description": "The pane is the active pane of the active window of an attached session."
156
+ },
157
+ "reason": {
158
+ "type": "string",
159
+ "description": "Why the state changed: `idle`, `out of view`, `its pane closed`, `never restored`, …"
160
+ },
161
+ "target_team": {
162
+ "type": "string",
163
+ "description": "The team a `mctgo` draft names."
164
+ },
165
+ "target_session": {
166
+ "type": "string",
167
+ "description": "The session a `mctgo` draft names."
168
+ },
169
+ "session_id": {
170
+ "type": "string",
171
+ "description": "The agent session id mctdraft gave the draft before it was sent (Episode 548, D7, ironsilk 0.9.58); `mct new` starts the agent with it. Absent on a draft opened otherwise."
172
+ },
173
+ "labels": {
174
+ "type": "object",
175
+ "description": "What a `mctgo` draft is about (D1, ironsilk 0.9.53): `paths`, `packages`, `repositories`, `addresses`, `issues` (string arrays, each omitted when empty) and `team`. Labels, never sentences."
176
+ }
177
+ },
178
+ "additionalProperties": false
179
+ }
180
+ }
181
+ },
182
+ {
183
+ "title": "tide.draft.parked",
184
+ "description": "The draft is set aside: unchanged for the idle time, or its pane is out of view.",
185
+ "properties": {
186
+ "event_type": {
187
+ "const": "tide.draft.parked"
188
+ },
189
+ "privacy": {
190
+ "type": "object",
191
+ "properties": {
192
+ "content_included": {
193
+ "const": false
194
+ }
195
+ }
196
+ },
197
+ "payload": {
198
+ "type": "object",
199
+ "required": [
200
+ "pane",
201
+ "chars",
202
+ "lines",
203
+ "digest",
204
+ "kind",
205
+ "in_view"
206
+ ],
207
+ "properties": {
208
+ "pane": {
209
+ "type": "string",
210
+ "description": "The pane's address, `<session>:<window>.<pane>`."
211
+ },
212
+ "chars": {
213
+ "type": "number",
214
+ "description": "Length of the draft."
215
+ },
216
+ "lines": {
217
+ "type": "number",
218
+ "description": "Lines in the draft, continuation lines included."
219
+ },
220
+ "digest": {
221
+ "type": "string",
222
+ "description": "HMAC-SHA256 of the text keyed with `<MIADI_HOME>/drafts/.key`, first 16 hex."
223
+ },
224
+ "kind": {
225
+ "type": "string",
226
+ "description": "`mctgo` when the draft starts a session on a team, else `shell`. Only a `mctgo` draft leaves the host."
227
+ },
228
+ "in_view": {
229
+ "type": "boolean",
230
+ "description": "The pane is the active pane of the active window of an attached session."
231
+ },
232
+ "reason": {
233
+ "type": "string",
234
+ "description": "Why the state changed: `idle`, `out of view`, `its pane closed`, `never restored`, …"
235
+ },
236
+ "target_team": {
237
+ "type": "string",
238
+ "description": "The team a `mctgo` draft names."
239
+ },
240
+ "target_session": {
241
+ "type": "string",
242
+ "description": "The session a `mctgo` draft names."
243
+ },
244
+ "session_id": {
245
+ "type": "string",
246
+ "description": "The agent session id mctdraft gave the draft before it was sent (Episode 548, D7, ironsilk 0.9.58); `mct new` starts the agent with it. Absent on a draft opened otherwise."
247
+ },
248
+ "labels": {
249
+ "type": "object",
250
+ "description": "What a `mctgo` draft is about (D1, ironsilk 0.9.53): `paths`, `packages`, `repositories`, `addresses`, `issues` (string arrays, each omitted when empty) and `team`. Labels, never sentences."
251
+ }
252
+ },
253
+ "additionalProperties": false
254
+ }
255
+ }
256
+ },
257
+ {
258
+ "title": "tide.draft.resumed",
259
+ "description": "The text changed again while its pane is in view.",
260
+ "properties": {
261
+ "event_type": {
262
+ "const": "tide.draft.resumed"
263
+ },
264
+ "privacy": {
265
+ "type": "object",
266
+ "properties": {
267
+ "content_included": {
268
+ "const": false
269
+ }
270
+ }
271
+ },
272
+ "payload": {
273
+ "type": "object",
274
+ "required": [
275
+ "pane",
276
+ "chars",
277
+ "lines",
278
+ "digest",
279
+ "kind",
280
+ "in_view"
281
+ ],
282
+ "properties": {
283
+ "pane": {
284
+ "type": "string",
285
+ "description": "The pane's address, `<session>:<window>.<pane>`."
286
+ },
287
+ "chars": {
288
+ "type": "number",
289
+ "description": "Length of the draft."
290
+ },
291
+ "lines": {
292
+ "type": "number",
293
+ "description": "Lines in the draft, continuation lines included."
294
+ },
295
+ "digest": {
296
+ "type": "string",
297
+ "description": "HMAC-SHA256 of the text keyed with `<MIADI_HOME>/drafts/.key`, first 16 hex."
298
+ },
299
+ "kind": {
300
+ "type": "string",
301
+ "description": "`mctgo` when the draft starts a session on a team, else `shell`. Only a `mctgo` draft leaves the host."
302
+ },
303
+ "in_view": {
304
+ "type": "boolean",
305
+ "description": "The pane is the active pane of the active window of an attached session."
306
+ },
307
+ "reason": {
308
+ "type": "string",
309
+ "description": "Why the state changed: `idle`, `out of view`, `its pane closed`, `never restored`, …"
310
+ },
311
+ "target_team": {
312
+ "type": "string",
313
+ "description": "The team a `mctgo` draft names."
314
+ },
315
+ "target_session": {
316
+ "type": "string",
317
+ "description": "The session a `mctgo` draft names."
318
+ },
319
+ "session_id": {
320
+ "type": "string",
321
+ "description": "The agent session id mctdraft gave the draft before it was sent (Episode 548, D7, ironsilk 0.9.58); `mct new` starts the agent with it. Absent on a draft opened otherwise."
322
+ },
323
+ "labels": {
324
+ "type": "object",
325
+ "description": "What a `mctgo` draft is about (D1, ironsilk 0.9.53): `paths`, `packages`, `repositories`, `addresses`, `issues` (string arrays, each omitted when empty) and `team`. Labels, never sentences."
326
+ }
327
+ },
328
+ "additionalProperties": false
329
+ }
330
+ }
331
+ },
332
+ {
333
+ "title": "tide.draft.versioned",
334
+ "description": "The text, changed since its last version, became a version: the draft parked or was sent.",
335
+ "properties": {
336
+ "event_type": {
337
+ "const": "tide.draft.versioned"
338
+ },
339
+ "privacy": {
340
+ "type": "object",
341
+ "properties": {
342
+ "content_included": {
343
+ "const": true
344
+ }
345
+ }
346
+ },
347
+ "payload": {
348
+ "type": "object",
349
+ "required": [
350
+ "pane",
351
+ "chars",
352
+ "lines",
353
+ "digest",
354
+ "kind",
355
+ "in_view",
356
+ "text",
357
+ "version"
358
+ ],
359
+ "properties": {
360
+ "pane": {
361
+ "type": "string",
362
+ "description": "The pane's address, `<session>:<window>.<pane>`."
363
+ },
364
+ "chars": {
365
+ "type": "number",
366
+ "description": "Length of the draft."
367
+ },
368
+ "lines": {
369
+ "type": "number",
370
+ "description": "Lines in the draft, continuation lines included."
371
+ },
372
+ "digest": {
373
+ "type": "string",
374
+ "description": "HMAC-SHA256 of the text keyed with `<MIADI_HOME>/drafts/.key`, first 16 hex."
375
+ },
376
+ "kind": {
377
+ "type": "string",
378
+ "description": "`mctgo` when the draft starts a session on a team, else `shell`. Only a `mctgo` draft leaves the host."
379
+ },
380
+ "in_view": {
381
+ "type": "boolean",
382
+ "description": "The pane is the active pane of the active window of an attached session."
383
+ },
384
+ "reason": {
385
+ "type": "string",
386
+ "description": "Why the state changed: `idle`, `out of view`, `its pane closed`, `never restored`, …"
387
+ },
388
+ "target_team": {
389
+ "type": "string",
390
+ "description": "The team a `mctgo` draft names."
391
+ },
392
+ "target_session": {
393
+ "type": "string",
394
+ "description": "The session a `mctgo` draft names."
395
+ },
396
+ "session_id": {
397
+ "type": "string",
398
+ "description": "The agent session id mctdraft gave the draft before it was sent (Episode 548, D7, ironsilk 0.9.58); `mct new` starts the agent with it. Absent on a draft opened otherwise."
399
+ },
400
+ "labels": {
401
+ "type": "object",
402
+ "description": "What a `mctgo` draft is about (D1, ironsilk 0.9.53): `paths`, `packages`, `repositories`, `addresses`, `issues` (string arrays, each omitted when empty) and `team`. Labels, never sentences."
403
+ },
404
+ "text": {
405
+ "type": "string",
406
+ "description": "The draft's words, as typed."
407
+ },
408
+ "version": {
409
+ "type": "number",
410
+ "description": "This draft's version count, from 1."
411
+ },
412
+ "prompt": {
413
+ "type": "string",
414
+ "description": "The prompt in the tracing provider, `miadi-tracing:<domain>/prompt/<miadiRun-…-presession>` (D3).",
415
+ "x-proposed": true
416
+ },
417
+ "prompt_version": {
418
+ "type": "number",
419
+ "description": "The prompt version made from this text (D3), or that the session started from (D4).",
420
+ "x-proposed": true
421
+ }
422
+ },
423
+ "additionalProperties": false
424
+ }
425
+ }
426
+ },
427
+ {
428
+ "title": "tide.draft.restored",
429
+ "description": "After the tmux server started again, the restore typed the draft back at its prompt without Enter.",
430
+ "properties": {
431
+ "event_type": {
432
+ "const": "tide.draft.restored"
433
+ },
434
+ "privacy": {
435
+ "type": "object",
436
+ "properties": {
437
+ "content_included": {
438
+ "const": false
439
+ }
440
+ }
441
+ },
442
+ "payload": {
443
+ "type": "object",
444
+ "required": [
445
+ "pane",
446
+ "chars",
447
+ "lines",
448
+ "digest",
449
+ "kind",
450
+ "in_view",
451
+ "restores"
452
+ ],
453
+ "properties": {
454
+ "pane": {
455
+ "type": "string",
456
+ "description": "The pane's address, `<session>:<window>.<pane>`."
457
+ },
458
+ "chars": {
459
+ "type": "number",
460
+ "description": "Length of the draft."
461
+ },
462
+ "lines": {
463
+ "type": "number",
464
+ "description": "Lines in the draft, continuation lines included."
465
+ },
466
+ "digest": {
467
+ "type": "string",
468
+ "description": "HMAC-SHA256 of the text keyed with `<MIADI_HOME>/drafts/.key`, first 16 hex."
469
+ },
470
+ "kind": {
471
+ "type": "string",
472
+ "description": "`mctgo` when the draft starts a session on a team, else `shell`. Only a `mctgo` draft leaves the host."
473
+ },
474
+ "in_view": {
475
+ "type": "boolean",
476
+ "description": "The pane is the active pane of the active window of an attached session."
477
+ },
478
+ "reason": {
479
+ "type": "string",
480
+ "description": "Why the state changed: `idle`, `out of view`, `its pane closed`, `never restored`, …"
481
+ },
482
+ "target_team": {
483
+ "type": "string",
484
+ "description": "The team a `mctgo` draft names."
485
+ },
486
+ "target_session": {
487
+ "type": "string",
488
+ "description": "The session a `mctgo` draft names."
489
+ },
490
+ "session_id": {
491
+ "type": "string",
492
+ "description": "The agent session id mctdraft gave the draft before it was sent (Episode 548, D7, ironsilk 0.9.58); `mct new` starts the agent with it. Absent on a draft opened otherwise."
493
+ },
494
+ "labels": {
495
+ "type": "object",
496
+ "description": "What a `mctgo` draft is about (D1, ironsilk 0.9.53): `paths`, `packages`, `repositories`, `addresses`, `issues` (string arrays, each omitted when empty) and `team`. Labels, never sentences."
497
+ },
498
+ "restores": {
499
+ "type": "number",
500
+ "description": "How many restores typed this draft back."
501
+ },
502
+ "ready": {
503
+ "type": "boolean",
504
+ "description": "The ready flag survived the restore (ironsilk 0.9.61)."
505
+ }
506
+ },
507
+ "additionalProperties": false
508
+ }
509
+ }
510
+ },
511
+ {
512
+ "title": "tide.draft.readied",
513
+ "description": "The person flagged the draft ready: to be sent at a time, or when the scheduler judges the moment. The flag is consent for this text, by its digest.",
514
+ "properties": {
515
+ "event_type": {
516
+ "const": "tide.draft.readied"
517
+ },
518
+ "privacy": {
519
+ "type": "object",
520
+ "properties": {
521
+ "content_included": {
522
+ "const": false
523
+ }
524
+ }
525
+ },
526
+ "payload": {
527
+ "type": "object",
528
+ "required": [
529
+ "pane",
530
+ "chars",
531
+ "lines",
532
+ "digest",
533
+ "kind",
534
+ "in_view"
535
+ ],
536
+ "properties": {
537
+ "pane": {
538
+ "type": "string",
539
+ "description": "The pane's address, `<session>:<window>.<pane>`."
540
+ },
541
+ "chars": {
542
+ "type": "number",
543
+ "description": "Length of the draft."
544
+ },
545
+ "lines": {
546
+ "type": "number",
547
+ "description": "Lines in the draft, continuation lines included."
548
+ },
549
+ "digest": {
550
+ "type": "string",
551
+ "description": "HMAC-SHA256 of the text keyed with `<MIADI_HOME>/drafts/.key`, first 16 hex."
552
+ },
553
+ "kind": {
554
+ "type": "string",
555
+ "description": "`mctgo` when the draft starts a session on a team, else `shell`. Only a `mctgo` draft leaves the host."
556
+ },
557
+ "in_view": {
558
+ "type": "boolean",
559
+ "description": "The pane is the active pane of the active window of an attached session."
560
+ },
561
+ "reason": {
562
+ "type": "string",
563
+ "description": "Why the state changed: `idle`, `out of view`, `its pane closed`, `never restored`, …"
564
+ },
565
+ "target_team": {
566
+ "type": "string",
567
+ "description": "The team a `mctgo` draft names."
568
+ },
569
+ "target_session": {
570
+ "type": "string",
571
+ "description": "The session a `mctgo` draft names."
572
+ },
573
+ "session_id": {
574
+ "type": "string",
575
+ "description": "The agent session id mctdraft gave the draft before it was sent (Episode 548, D7, ironsilk 0.9.58); `mct new` starts the agent with it. Absent on a draft opened otherwise."
576
+ },
577
+ "labels": {
578
+ "type": "object",
579
+ "description": "What a `mctgo` draft is about (D1, ironsilk 0.9.53): `paths`, `packages`, `repositories`, `addresses`, `issues` (string arrays, each omitted when empty) and `team`. Labels, never sentences."
580
+ },
581
+ "send_at": {
582
+ "type": "string",
583
+ "description": "When tide may press Enter, ISO UTC. Absent for a judged flag."
584
+ },
585
+ "scheduler": {
586
+ "type": "string",
587
+ "description": "`judged`: the scheduler seat sets the moment (R3)."
588
+ },
589
+ "window_seconds": {
590
+ "type": "number",
591
+ "description": "How long after its moment the flag still holds (default 3600)."
592
+ },
593
+ "completion": {
594
+ "type": "array",
595
+ "items": {
596
+ "type": "string"
597
+ },
598
+ "description": "What the moment will complete before Enter, as labels: `a pasted copy of the prompt removed`, `a single quote closed`, … (ironsilk 0.9.77). Absent when the line is complete."
599
+ }
600
+ },
601
+ "additionalProperties": false
602
+ }
603
+ }
604
+ },
605
+ {
606
+ "title": "tide.draft.unreadied",
607
+ "description": "The flag no longer holds: the text changed, the person unflagged it, or its window closed.",
608
+ "properties": {
609
+ "event_type": {
610
+ "const": "tide.draft.unreadied"
611
+ },
612
+ "privacy": {
613
+ "type": "object",
614
+ "properties": {
615
+ "content_included": {
616
+ "const": false
617
+ }
618
+ }
619
+ },
620
+ "payload": {
621
+ "type": "object",
622
+ "required": [
623
+ "pane",
624
+ "chars",
625
+ "lines",
626
+ "digest",
627
+ "kind",
628
+ "in_view"
629
+ ],
630
+ "properties": {
631
+ "pane": {
632
+ "type": "string",
633
+ "description": "The pane's address, `<session>:<window>.<pane>`."
634
+ },
635
+ "chars": {
636
+ "type": "number",
637
+ "description": "Length of the draft."
638
+ },
639
+ "lines": {
640
+ "type": "number",
641
+ "description": "Lines in the draft, continuation lines included."
642
+ },
643
+ "digest": {
644
+ "type": "string",
645
+ "description": "HMAC-SHA256 of the text keyed with `<MIADI_HOME>/drafts/.key`, first 16 hex."
646
+ },
647
+ "kind": {
648
+ "type": "string",
649
+ "description": "`mctgo` when the draft starts a session on a team, else `shell`. Only a `mctgo` draft leaves the host."
650
+ },
651
+ "in_view": {
652
+ "type": "boolean",
653
+ "description": "The pane is the active pane of the active window of an attached session."
654
+ },
655
+ "reason": {
656
+ "type": "string",
657
+ "description": "Why the state changed: `idle`, `out of view`, `its pane closed`, `never restored`, …"
658
+ },
659
+ "target_team": {
660
+ "type": "string",
661
+ "description": "The team a `mctgo` draft names."
662
+ },
663
+ "target_session": {
664
+ "type": "string",
665
+ "description": "The session a `mctgo` draft names."
666
+ },
667
+ "session_id": {
668
+ "type": "string",
669
+ "description": "The agent session id mctdraft gave the draft before it was sent (Episode 548, D7, ironsilk 0.9.58); `mct new` starts the agent with it. Absent on a draft opened otherwise."
670
+ },
671
+ "labels": {
672
+ "type": "object",
673
+ "description": "What a `mctgo` draft is about (D1, ironsilk 0.9.53): `paths`, `packages`, `repositories`, `addresses`, `issues` (string arrays, each omitted when empty) and `team`. Labels, never sentences."
674
+ }
675
+ },
676
+ "additionalProperties": false
677
+ }
678
+ }
679
+ },
680
+ {
681
+ "title": "tide.draft.due",
682
+ "description": "A flagged draft's moment arrived: tide pressed Enter once, or held and says why.",
683
+ "properties": {
684
+ "event_type": {
685
+ "const": "tide.draft.due"
686
+ },
687
+ "privacy": {
688
+ "type": "object",
689
+ "properties": {
690
+ "content_included": {
691
+ "const": false
692
+ }
693
+ }
694
+ },
695
+ "payload": {
696
+ "type": "object",
697
+ "required": [
698
+ "pane",
699
+ "chars",
700
+ "lines",
701
+ "digest",
702
+ "kind",
703
+ "in_view",
704
+ "sent"
705
+ ],
706
+ "properties": {
707
+ "pane": {
708
+ "type": "string",
709
+ "description": "The pane's address, `<session>:<window>.<pane>`."
710
+ },
711
+ "chars": {
712
+ "type": "number",
713
+ "description": "Length of the draft."
714
+ },
715
+ "lines": {
716
+ "type": "number",
717
+ "description": "Lines in the draft, continuation lines included."
718
+ },
719
+ "digest": {
720
+ "type": "string",
721
+ "description": "HMAC-SHA256 of the text keyed with `<MIADI_HOME>/drafts/.key`, first 16 hex."
722
+ },
723
+ "kind": {
724
+ "type": "string",
725
+ "description": "`mctgo` when the draft starts a session on a team, else `shell`. Only a `mctgo` draft leaves the host."
726
+ },
727
+ "in_view": {
728
+ "type": "boolean",
729
+ "description": "The pane is the active pane of the active window of an attached session."
730
+ },
731
+ "reason": {
732
+ "type": "string",
733
+ "description": "Why the state changed: `idle`, `out of view`, `its pane closed`, `never restored`, …"
734
+ },
735
+ "target_team": {
736
+ "type": "string",
737
+ "description": "The team a `mctgo` draft names."
738
+ },
739
+ "target_session": {
740
+ "type": "string",
741
+ "description": "The session a `mctgo` draft names."
742
+ },
743
+ "session_id": {
744
+ "type": "string",
745
+ "description": "The agent session id mctdraft gave the draft before it was sent (Episode 548, D7, ironsilk 0.9.58); `mct new` starts the agent with it. Absent on a draft opened otherwise."
746
+ },
747
+ "labels": {
748
+ "type": "object",
749
+ "description": "What a `mctgo` draft is about (D1, ironsilk 0.9.53): `paths`, `packages`, `repositories`, `addresses`, `issues` (string arrays, each omitted when empty) and `team`. Labels, never sentences."
750
+ },
751
+ "sent": {
752
+ "type": "boolean",
753
+ "description": "Enter was typed."
754
+ },
755
+ "flagged_by": {
756
+ "type": "string",
757
+ "description": "The person whose ready flag this moment acts on (`--by`, ironsilk 0.9.62)."
758
+ },
759
+ "send_at": {
760
+ "type": "string",
761
+ "description": "The moment the flag named, ISO UTC."
762
+ },
763
+ "completion": {
764
+ "type": "array",
765
+ "items": {
766
+ "type": "string"
767
+ },
768
+ "description": "What tide completed before Enter (ironsilk 0.9.77): the completed line is the draft's next version."
769
+ }
770
+ },
771
+ "additionalProperties": false
772
+ }
773
+ }
774
+ },
775
+ {
776
+ "title": "tide.draft.run",
777
+ "description": "A person or an agent ran the draft now: tide completed a line left incomplete and pressed Enter once, or held and says why. An agent runs only a draft flagged judged (R3).",
778
+ "properties": {
779
+ "event_type": {
780
+ "const": "tide.draft.run"
781
+ },
782
+ "privacy": {
783
+ "type": "object",
784
+ "properties": {
785
+ "content_included": {
786
+ "const": false
787
+ }
788
+ }
789
+ },
790
+ "payload": {
791
+ "type": "object",
792
+ "required": [
793
+ "pane",
794
+ "chars",
795
+ "lines",
796
+ "digest",
797
+ "kind",
798
+ "in_view",
799
+ "sent"
800
+ ],
801
+ "properties": {
802
+ "pane": {
803
+ "type": "string",
804
+ "description": "The pane's address, `<session>:<window>.<pane>`."
805
+ },
806
+ "chars": {
807
+ "type": "number",
808
+ "description": "Length of the draft."
809
+ },
810
+ "lines": {
811
+ "type": "number",
812
+ "description": "Lines in the draft, continuation lines included."
813
+ },
814
+ "digest": {
815
+ "type": "string",
816
+ "description": "HMAC-SHA256 of the text keyed with `<MIADI_HOME>/drafts/.key`, first 16 hex."
817
+ },
818
+ "kind": {
819
+ "type": "string",
820
+ "description": "`mctgo` when the draft starts a session on a team, else `shell`. Only a `mctgo` draft leaves the host."
821
+ },
822
+ "in_view": {
823
+ "type": "boolean",
824
+ "description": "The pane is the active pane of the active window of an attached session."
825
+ },
826
+ "reason": {
827
+ "type": "string",
828
+ "description": "Why the state changed: `idle`, `out of view`, `its pane closed`, `never restored`, …"
829
+ },
830
+ "target_team": {
831
+ "type": "string",
832
+ "description": "The team a `mctgo` draft names."
833
+ },
834
+ "target_session": {
835
+ "type": "string",
836
+ "description": "The session a `mctgo` draft names."
837
+ },
838
+ "session_id": {
839
+ "type": "string",
840
+ "description": "The agent session id mctdraft gave the draft before it was sent (Episode 548, D7, ironsilk 0.9.58); `mct new` starts the agent with it. Absent on a draft opened otherwise."
841
+ },
842
+ "labels": {
843
+ "type": "object",
844
+ "description": "What a `mctgo` draft is about (D1, ironsilk 0.9.53): `paths`, `packages`, `repositories`, `addresses`, `issues` (string arrays, each omitted when empty) and `team`. Labels, never sentences."
845
+ },
846
+ "sent": {
847
+ "type": "boolean",
848
+ "description": "Enter was typed."
849
+ },
850
+ "scheduler": {
851
+ "type": "string",
852
+ "description": "`judged` when the draft was flagged for a scheduler seat."
853
+ },
854
+ "flagged_by": {
855
+ "type": "string",
856
+ "description": "The person whose ready flag it acts on, when it was flagged."
857
+ },
858
+ "completion": {
859
+ "type": "array",
860
+ "items": {
861
+ "type": "string"
862
+ },
863
+ "description": "What tide completed before Enter: the completed line is the draft's next version."
864
+ }
865
+ },
866
+ "additionalProperties": false
867
+ }
868
+ }
869
+ },
870
+ {
871
+ "title": "tide.draft.sent",
872
+ "description": "The line ran, as the screen shows it. A mctgo line naming its session is not complete: the draft is `launching`, kept for a restore, until its session starts or `unstarted` (Episode 548 D11, ironsilk 0.9.64). A line that starts no session closes here.",
873
+ "properties": {
874
+ "event_type": {
875
+ "const": "tide.draft.sent"
876
+ },
877
+ "privacy": {
878
+ "type": "object",
879
+ "properties": {
880
+ "content_included": {
881
+ "const": false
882
+ }
883
+ }
884
+ },
885
+ "payload": {
886
+ "type": "object",
887
+ "required": [
888
+ "pane",
889
+ "chars",
890
+ "lines",
891
+ "digest",
892
+ "kind",
893
+ "in_view"
894
+ ],
895
+ "properties": {
896
+ "pane": {
897
+ "type": "string",
898
+ "description": "The pane's address, `<session>:<window>.<pane>`."
899
+ },
900
+ "chars": {
901
+ "type": "number",
902
+ "description": "Length of the draft."
903
+ },
904
+ "lines": {
905
+ "type": "number",
906
+ "description": "Lines in the draft, continuation lines included."
907
+ },
908
+ "digest": {
909
+ "type": "string",
910
+ "description": "HMAC-SHA256 of the text keyed with `<MIADI_HOME>/drafts/.key`, first 16 hex."
911
+ },
912
+ "kind": {
913
+ "type": "string",
914
+ "description": "`mctgo` when the draft starts a session on a team, else `shell`. Only a `mctgo` draft leaves the host."
915
+ },
916
+ "in_view": {
917
+ "type": "boolean",
918
+ "description": "The pane is the active pane of the active window of an attached session."
919
+ },
920
+ "reason": {
921
+ "type": "string",
922
+ "description": "Why the state changed: `idle`, `out of view`, `its pane closed`, `never restored`, …"
923
+ },
924
+ "target_team": {
925
+ "type": "string",
926
+ "description": "The team a `mctgo` draft names."
927
+ },
928
+ "target_session": {
929
+ "type": "string",
930
+ "description": "The session a `mctgo` draft names."
931
+ },
932
+ "session_id": {
933
+ "type": "string",
934
+ "description": "The agent session id mctdraft gave the draft before it was sent (Episode 548, D7, ironsilk 0.9.58); `mct new` starts the agent with it. Absent on a draft opened otherwise."
935
+ },
936
+ "labels": {
937
+ "type": "object",
938
+ "description": "What a `mctgo` draft is about (D1, ironsilk 0.9.53): `paths`, `packages`, `repositories`, `addresses`, `issues` (string arrays, each omitted when empty) and `team`. Labels, never sentences."
939
+ }
940
+ },
941
+ "additionalProperties": false
942
+ }
943
+ }
944
+ },
945
+ {
946
+ "title": "tide.draft.started",
947
+ "description": "The session a sent `mctgo` draft names runs an agent, within 600 s of the send: the only completion of a draft (D11). `causation_id` is the sent event.",
948
+ "properties": {
949
+ "event_type": {
950
+ "const": "tide.draft.started"
951
+ },
952
+ "privacy": {
953
+ "type": "object",
954
+ "properties": {
955
+ "content_included": {
956
+ "const": false
957
+ }
958
+ }
959
+ },
960
+ "payload": {
961
+ "type": "object",
962
+ "required": [
963
+ "pane",
964
+ "chars",
965
+ "lines",
966
+ "digest",
967
+ "kind",
968
+ "in_view",
969
+ "session_id",
970
+ "agent_kind"
971
+ ],
972
+ "properties": {
973
+ "pane": {
974
+ "type": "string",
975
+ "description": "The pane's address, `<session>:<window>.<pane>`."
976
+ },
977
+ "chars": {
978
+ "type": "number",
979
+ "description": "Length of the draft."
980
+ },
981
+ "lines": {
982
+ "type": "number",
983
+ "description": "Lines in the draft, continuation lines included."
984
+ },
985
+ "digest": {
986
+ "type": "string",
987
+ "description": "HMAC-SHA256 of the text keyed with `<MIADI_HOME>/drafts/.key`, first 16 hex."
988
+ },
989
+ "kind": {
990
+ "type": "string",
991
+ "description": "`mctgo` when the draft starts a session on a team, else `shell`. Only a `mctgo` draft leaves the host."
992
+ },
993
+ "in_view": {
994
+ "type": "boolean",
995
+ "description": "The pane is the active pane of the active window of an attached session."
996
+ },
997
+ "reason": {
998
+ "type": "string",
999
+ "description": "Why the state changed: `idle`, `out of view`, `its pane closed`, `never restored`, …"
1000
+ },
1001
+ "target_team": {
1002
+ "type": "string",
1003
+ "description": "The team a `mctgo` draft names."
1004
+ },
1005
+ "target_session": {
1006
+ "type": "string",
1007
+ "description": "The session a `mctgo` draft names."
1008
+ },
1009
+ "session_id": {
1010
+ "type": "string",
1011
+ "description": "The agent's session id."
1012
+ },
1013
+ "labels": {
1014
+ "type": "object",
1015
+ "description": "What a `mctgo` draft is about (D1, ironsilk 0.9.53): `paths`, `packages`, `repositories`, `addresses`, `issues` (string arrays, each omitted when empty) and `team`. Labels, never sentences."
1016
+ },
1017
+ "agent_kind": {
1018
+ "type": "string",
1019
+ "description": "The agent program: claude, codex, …"
1020
+ },
1021
+ "matched_by": {
1022
+ "type": "string",
1023
+ "description": "How the session was found: `session_id` (the draft's own id) or `name` (ironsilk 0.9.58)."
1024
+ },
1025
+ "planned_session_id": {
1026
+ "type": "string",
1027
+ "description": "The id the draft carried, when the session was found by name and its agent has another id."
1028
+ },
1029
+ "prompt": {
1030
+ "type": "string",
1031
+ "description": "The prompt in the tracing provider, `miadi-tracing:<domain>/prompt/<miadiRun-…-presession>` (D3).",
1032
+ "x-proposed": true
1033
+ },
1034
+ "prompt_version": {
1035
+ "type": "number",
1036
+ "description": "The prompt version made from this text (D3), or that the session started from (D4).",
1037
+ "x-proposed": true
1038
+ }
1039
+ },
1040
+ "additionalProperties": false
1041
+ }
1042
+ }
1043
+ },
1044
+ {
1045
+ "title": "tide.draft.unstarted",
1046
+ "description": "No session started within 600 s of the send. The draft is `parked` again with its words, detached from the pane, restorable and withdrawable (D11). `causation_id` is the sent event.",
1047
+ "properties": {
1048
+ "event_type": {
1049
+ "const": "tide.draft.unstarted"
1050
+ },
1051
+ "privacy": {
1052
+ "type": "object",
1053
+ "properties": {
1054
+ "content_included": {
1055
+ "const": false
1056
+ }
1057
+ }
1058
+ },
1059
+ "payload": {
1060
+ "type": "object",
1061
+ "required": [
1062
+ "pane",
1063
+ "chars",
1064
+ "lines",
1065
+ "digest",
1066
+ "kind",
1067
+ "in_view"
1068
+ ],
1069
+ "properties": {
1070
+ "pane": {
1071
+ "type": "string",
1072
+ "description": "The pane's address, `<session>:<window>.<pane>`."
1073
+ },
1074
+ "chars": {
1075
+ "type": "number",
1076
+ "description": "Length of the draft."
1077
+ },
1078
+ "lines": {
1079
+ "type": "number",
1080
+ "description": "Lines in the draft, continuation lines included."
1081
+ },
1082
+ "digest": {
1083
+ "type": "string",
1084
+ "description": "HMAC-SHA256 of the text keyed with `<MIADI_HOME>/drafts/.key`, first 16 hex."
1085
+ },
1086
+ "kind": {
1087
+ "type": "string",
1088
+ "description": "`mctgo` when the draft starts a session on a team, else `shell`. Only a `mctgo` draft leaves the host."
1089
+ },
1090
+ "in_view": {
1091
+ "type": "boolean",
1092
+ "description": "The pane is the active pane of the active window of an attached session."
1093
+ },
1094
+ "reason": {
1095
+ "type": "string",
1096
+ "description": "Why the state changed: `idle`, `out of view`, `its pane closed`, `never restored`, …"
1097
+ },
1098
+ "target_team": {
1099
+ "type": "string",
1100
+ "description": "The team a `mctgo` draft names."
1101
+ },
1102
+ "target_session": {
1103
+ "type": "string",
1104
+ "description": "The session a `mctgo` draft names."
1105
+ },
1106
+ "session_id": {
1107
+ "type": "string",
1108
+ "description": "The agent session id mctdraft gave the draft before it was sent (Episode 548, D7, ironsilk 0.9.58); `mct new` starts the agent with it. Absent on a draft opened otherwise."
1109
+ },
1110
+ "labels": {
1111
+ "type": "object",
1112
+ "description": "What a `mctgo` draft is about (D1, ironsilk 0.9.53): `paths`, `packages`, `repositories`, `addresses`, `issues` (string arrays, each omitted when empty) and `team`. Labels, never sentences."
1113
+ }
1114
+ },
1115
+ "additionalProperties": false
1116
+ }
1117
+ }
1118
+ },
1119
+ {
1120
+ "title": "tide.draft.reopened",
1121
+ "description": "A closed draft was opened again under its own id, its words attached to the pane that shows them when one does.",
1122
+ "properties": {
1123
+ "event_type": {
1124
+ "const": "tide.draft.reopened"
1125
+ },
1126
+ "privacy": {
1127
+ "type": "object",
1128
+ "properties": {
1129
+ "content_included": {
1130
+ "const": false
1131
+ }
1132
+ }
1133
+ },
1134
+ "payload": {
1135
+ "type": "object",
1136
+ "required": [
1137
+ "pane",
1138
+ "chars",
1139
+ "lines",
1140
+ "digest",
1141
+ "kind",
1142
+ "in_view",
1143
+ "closed_as",
1144
+ "attached"
1145
+ ],
1146
+ "properties": {
1147
+ "pane": {
1148
+ "type": "string",
1149
+ "description": "The pane's address, `<session>:<window>.<pane>`."
1150
+ },
1151
+ "chars": {
1152
+ "type": "number",
1153
+ "description": "Length of the draft."
1154
+ },
1155
+ "lines": {
1156
+ "type": "number",
1157
+ "description": "Lines in the draft, continuation lines included."
1158
+ },
1159
+ "digest": {
1160
+ "type": "string",
1161
+ "description": "HMAC-SHA256 of the text keyed with `<MIADI_HOME>/drafts/.key`, first 16 hex."
1162
+ },
1163
+ "kind": {
1164
+ "type": "string",
1165
+ "description": "`mctgo` when the draft starts a session on a team, else `shell`. Only a `mctgo` draft leaves the host."
1166
+ },
1167
+ "in_view": {
1168
+ "type": "boolean",
1169
+ "description": "The pane is the active pane of the active window of an attached session."
1170
+ },
1171
+ "reason": {
1172
+ "type": "string",
1173
+ "description": "Why the state changed: `idle`, `out of view`, `its pane closed`, `never restored`, …"
1174
+ },
1175
+ "target_team": {
1176
+ "type": "string",
1177
+ "description": "The team a `mctgo` draft names."
1178
+ },
1179
+ "target_session": {
1180
+ "type": "string",
1181
+ "description": "The session a `mctgo` draft names."
1182
+ },
1183
+ "session_id": {
1184
+ "type": "string",
1185
+ "description": "The agent session id mctdraft gave the draft before it was sent (Episode 548, D7, ironsilk 0.9.58); `mct new` starts the agent with it. Absent on a draft opened otherwise."
1186
+ },
1187
+ "labels": {
1188
+ "type": "object",
1189
+ "description": "What a `mctgo` draft is about (D1, ironsilk 0.9.53): `paths`, `packages`, `repositories`, `addresses`, `issues` (string arrays, each omitted when empty) and `team`. Labels, never sentences."
1190
+ },
1191
+ "closed_as": {
1192
+ "type": "string",
1193
+ "description": "The state the draft was closed as: `sent`, `cleared`, …"
1194
+ },
1195
+ "closed_reason": {
1196
+ "type": "string",
1197
+ "description": "Why it had been closed."
1198
+ },
1199
+ "attached": {
1200
+ "type": "boolean",
1201
+ "description": "A pane showing the draft's words was found and the draft attached to it."
1202
+ }
1203
+ },
1204
+ "additionalProperties": false
1205
+ }
1206
+ }
1207
+ },
1208
+ {
1209
+ "title": "tide.draft.dismissed",
1210
+ "description": "A line tide typed itself (a resume command, marked @miadi-typed) was kept as a draft; it is closed, never restored, and not reopened while it stays on the screen.",
1211
+ "properties": {
1212
+ "event_type": {
1213
+ "const": "tide.draft.dismissed"
1214
+ },
1215
+ "privacy": {
1216
+ "type": "object",
1217
+ "properties": {
1218
+ "content_included": {
1219
+ "const": false
1220
+ }
1221
+ }
1222
+ },
1223
+ "payload": {
1224
+ "type": "object",
1225
+ "required": [
1226
+ "pane",
1227
+ "chars",
1228
+ "lines",
1229
+ "digest",
1230
+ "kind",
1231
+ "in_view"
1232
+ ],
1233
+ "properties": {
1234
+ "pane": {
1235
+ "type": "string",
1236
+ "description": "The pane's address, `<session>:<window>.<pane>`."
1237
+ },
1238
+ "chars": {
1239
+ "type": "number",
1240
+ "description": "Length of the draft."
1241
+ },
1242
+ "lines": {
1243
+ "type": "number",
1244
+ "description": "Lines in the draft, continuation lines included."
1245
+ },
1246
+ "digest": {
1247
+ "type": "string",
1248
+ "description": "HMAC-SHA256 of the text keyed with `<MIADI_HOME>/drafts/.key`, first 16 hex."
1249
+ },
1250
+ "kind": {
1251
+ "type": "string",
1252
+ "description": "`mctgo` when the draft starts a session on a team, else `shell`. Only a `mctgo` draft leaves the host."
1253
+ },
1254
+ "in_view": {
1255
+ "type": "boolean",
1256
+ "description": "The pane is the active pane of the active window of an attached session."
1257
+ },
1258
+ "reason": {
1259
+ "type": "string",
1260
+ "description": "Why the state changed: `idle`, `out of view`, `its pane closed`, `never restored`, …"
1261
+ },
1262
+ "target_team": {
1263
+ "type": "string",
1264
+ "description": "The team a `mctgo` draft names."
1265
+ },
1266
+ "target_session": {
1267
+ "type": "string",
1268
+ "description": "The session a `mctgo` draft names."
1269
+ },
1270
+ "session_id": {
1271
+ "type": "string",
1272
+ "description": "The agent session id mctdraft gave the draft before it was sent (Episode 548, D7, ironsilk 0.9.58); `mct new` starts the agent with it. Absent on a draft opened otherwise."
1273
+ },
1274
+ "labels": {
1275
+ "type": "object",
1276
+ "description": "What a `mctgo` draft is about (D1, ironsilk 0.9.53): `paths`, `packages`, `repositories`, `addresses`, `issues` (string arrays, each omitted when empty) and `team`. Labels, never sentences."
1277
+ }
1278
+ },
1279
+ "additionalProperties": false
1280
+ }
1281
+ }
1282
+ },
1283
+ {
1284
+ "title": "tide.draft.cleared",
1285
+ "description": "The prompt is empty again and the draft did not run.",
1286
+ "properties": {
1287
+ "event_type": {
1288
+ "const": "tide.draft.cleared"
1289
+ },
1290
+ "privacy": {
1291
+ "type": "object",
1292
+ "properties": {
1293
+ "content_included": {
1294
+ "const": false
1295
+ }
1296
+ }
1297
+ },
1298
+ "payload": {
1299
+ "type": "object",
1300
+ "required": [
1301
+ "pane",
1302
+ "chars",
1303
+ "lines",
1304
+ "digest",
1305
+ "kind",
1306
+ "in_view"
1307
+ ],
1308
+ "properties": {
1309
+ "pane": {
1310
+ "type": "string",
1311
+ "description": "The pane's address, `<session>:<window>.<pane>`."
1312
+ },
1313
+ "chars": {
1314
+ "type": "number",
1315
+ "description": "Length of the draft."
1316
+ },
1317
+ "lines": {
1318
+ "type": "number",
1319
+ "description": "Lines in the draft, continuation lines included."
1320
+ },
1321
+ "digest": {
1322
+ "type": "string",
1323
+ "description": "HMAC-SHA256 of the text keyed with `<MIADI_HOME>/drafts/.key`, first 16 hex."
1324
+ },
1325
+ "kind": {
1326
+ "type": "string",
1327
+ "description": "`mctgo` when the draft starts a session on a team, else `shell`. Only a `mctgo` draft leaves the host."
1328
+ },
1329
+ "in_view": {
1330
+ "type": "boolean",
1331
+ "description": "The pane is the active pane of the active window of an attached session."
1332
+ },
1333
+ "reason": {
1334
+ "type": "string",
1335
+ "description": "Why the state changed: `idle`, `out of view`, `its pane closed`, `never restored`, …"
1336
+ },
1337
+ "target_team": {
1338
+ "type": "string",
1339
+ "description": "The team a `mctgo` draft names."
1340
+ },
1341
+ "target_session": {
1342
+ "type": "string",
1343
+ "description": "The session a `mctgo` draft names."
1344
+ },
1345
+ "session_id": {
1346
+ "type": "string",
1347
+ "description": "The agent session id mctdraft gave the draft before it was sent (Episode 548, D7, ironsilk 0.9.58); `mct new` starts the agent with it. Absent on a draft opened otherwise."
1348
+ },
1349
+ "labels": {
1350
+ "type": "object",
1351
+ "description": "What a `mctgo` draft is about (D1, ironsilk 0.9.53): `paths`, `packages`, `repositories`, `addresses`, `issues` (string arrays, each omitted when empty) and `team`. Labels, never sentences."
1352
+ }
1353
+ },
1354
+ "additionalProperties": false
1355
+ }
1356
+ }
1357
+ },
1358
+ {
1359
+ "title": "tide.draft.abandoned",
1360
+ "description": "The draft's pane closed with the draft unsent.",
1361
+ "properties": {
1362
+ "event_type": {
1363
+ "const": "tide.draft.abandoned"
1364
+ },
1365
+ "privacy": {
1366
+ "type": "object",
1367
+ "properties": {
1368
+ "content_included": {
1369
+ "const": false
1370
+ }
1371
+ }
1372
+ },
1373
+ "payload": {
1374
+ "type": "object",
1375
+ "required": [
1376
+ "pane",
1377
+ "chars",
1378
+ "lines",
1379
+ "digest",
1380
+ "kind",
1381
+ "in_view"
1382
+ ],
1383
+ "properties": {
1384
+ "pane": {
1385
+ "type": "string",
1386
+ "description": "The pane's address, `<session>:<window>.<pane>`."
1387
+ },
1388
+ "chars": {
1389
+ "type": "number",
1390
+ "description": "Length of the draft."
1391
+ },
1392
+ "lines": {
1393
+ "type": "number",
1394
+ "description": "Lines in the draft, continuation lines included."
1395
+ },
1396
+ "digest": {
1397
+ "type": "string",
1398
+ "description": "HMAC-SHA256 of the text keyed with `<MIADI_HOME>/drafts/.key`, first 16 hex."
1399
+ },
1400
+ "kind": {
1401
+ "type": "string",
1402
+ "description": "`mctgo` when the draft starts a session on a team, else `shell`. Only a `mctgo` draft leaves the host."
1403
+ },
1404
+ "in_view": {
1405
+ "type": "boolean",
1406
+ "description": "The pane is the active pane of the active window of an attached session."
1407
+ },
1408
+ "reason": {
1409
+ "type": "string",
1410
+ "description": "Why the state changed: `idle`, `out of view`, `its pane closed`, `never restored`, …"
1411
+ },
1412
+ "target_team": {
1413
+ "type": "string",
1414
+ "description": "The team a `mctgo` draft names."
1415
+ },
1416
+ "target_session": {
1417
+ "type": "string",
1418
+ "description": "The session a `mctgo` draft names."
1419
+ },
1420
+ "session_id": {
1421
+ "type": "string",
1422
+ "description": "The agent session id mctdraft gave the draft before it was sent (Episode 548, D7, ironsilk 0.9.58); `mct new` starts the agent with it. Absent on a draft opened otherwise."
1423
+ },
1424
+ "labels": {
1425
+ "type": "object",
1426
+ "description": "What a `mctgo` draft is about (D1, ironsilk 0.9.53): `paths`, `packages`, `repositories`, `addresses`, `issues` (string arrays, each omitted when empty) and `team`. Labels, never sentences."
1427
+ }
1428
+ },
1429
+ "additionalProperties": false
1430
+ }
1431
+ }
1432
+ },
1433
+ {
1434
+ "title": "tide.draft.withdrawn",
1435
+ "description": "The person withdrew the draft: it is never typed back, and the same words are not reopened until they change.",
1436
+ "properties": {
1437
+ "event_type": {
1438
+ "const": "tide.draft.withdrawn"
1439
+ },
1440
+ "privacy": {
1441
+ "type": "object",
1442
+ "properties": {
1443
+ "content_included": {
1444
+ "const": false
1445
+ }
1446
+ }
1447
+ },
1448
+ "payload": {
1449
+ "type": "object",
1450
+ "required": [
1451
+ "pane",
1452
+ "chars",
1453
+ "lines",
1454
+ "digest",
1455
+ "kind",
1456
+ "in_view"
1457
+ ],
1458
+ "properties": {
1459
+ "pane": {
1460
+ "type": "string",
1461
+ "description": "The pane's address, `<session>:<window>.<pane>`."
1462
+ },
1463
+ "chars": {
1464
+ "type": "number",
1465
+ "description": "Length of the draft."
1466
+ },
1467
+ "lines": {
1468
+ "type": "number",
1469
+ "description": "Lines in the draft, continuation lines included."
1470
+ },
1471
+ "digest": {
1472
+ "type": "string",
1473
+ "description": "HMAC-SHA256 of the text keyed with `<MIADI_HOME>/drafts/.key`, first 16 hex."
1474
+ },
1475
+ "kind": {
1476
+ "type": "string",
1477
+ "description": "`mctgo` when the draft starts a session on a team, else `shell`. Only a `mctgo` draft leaves the host."
1478
+ },
1479
+ "in_view": {
1480
+ "type": "boolean",
1481
+ "description": "The pane is the active pane of the active window of an attached session."
1482
+ },
1483
+ "reason": {
1484
+ "type": "string",
1485
+ "description": "Why the state changed: `idle`, `out of view`, `its pane closed`, `never restored`, …"
1486
+ },
1487
+ "target_team": {
1488
+ "type": "string",
1489
+ "description": "The team a `mctgo` draft names."
1490
+ },
1491
+ "target_session": {
1492
+ "type": "string",
1493
+ "description": "The session a `mctgo` draft names."
1494
+ },
1495
+ "session_id": {
1496
+ "type": "string",
1497
+ "description": "The agent session id mctdraft gave the draft before it was sent (Episode 548, D7, ironsilk 0.9.58); `mct new` starts the agent with it. Absent on a draft opened otherwise."
1498
+ },
1499
+ "labels": {
1500
+ "type": "object",
1501
+ "description": "What a `mctgo` draft is about (D1, ironsilk 0.9.53): `paths`, `packages`, `repositories`, `addresses`, `issues` (string arrays, each omitted when empty) and `team`. Labels, never sentences."
1502
+ }
1503
+ },
1504
+ "additionalProperties": false
1505
+ }
1506
+ }
1507
+ },
1508
+ {
1509
+ "title": "tide.draft.expired",
1510
+ "description": "An open draft of an earlier tmux server waited 7 days and no restore typed it back.",
1511
+ "properties": {
1512
+ "event_type": {
1513
+ "const": "tide.draft.expired"
1514
+ },
1515
+ "privacy": {
1516
+ "type": "object",
1517
+ "properties": {
1518
+ "content_included": {
1519
+ "const": false
1520
+ }
1521
+ }
1522
+ },
1523
+ "payload": {
1524
+ "type": "object",
1525
+ "required": [
1526
+ "pane",
1527
+ "chars",
1528
+ "lines",
1529
+ "digest",
1530
+ "kind",
1531
+ "in_view"
1532
+ ],
1533
+ "properties": {
1534
+ "pane": {
1535
+ "type": "string",
1536
+ "description": "The pane's address, `<session>:<window>.<pane>`."
1537
+ },
1538
+ "chars": {
1539
+ "type": "number",
1540
+ "description": "Length of the draft."
1541
+ },
1542
+ "lines": {
1543
+ "type": "number",
1544
+ "description": "Lines in the draft, continuation lines included."
1545
+ },
1546
+ "digest": {
1547
+ "type": "string",
1548
+ "description": "HMAC-SHA256 of the text keyed with `<MIADI_HOME>/drafts/.key`, first 16 hex."
1549
+ },
1550
+ "kind": {
1551
+ "type": "string",
1552
+ "description": "`mctgo` when the draft starts a session on a team, else `shell`. Only a `mctgo` draft leaves the host."
1553
+ },
1554
+ "in_view": {
1555
+ "type": "boolean",
1556
+ "description": "The pane is the active pane of the active window of an attached session."
1557
+ },
1558
+ "reason": {
1559
+ "type": "string",
1560
+ "description": "Why the state changed: `idle`, `out of view`, `its pane closed`, `never restored`, …"
1561
+ },
1562
+ "target_team": {
1563
+ "type": "string",
1564
+ "description": "The team a `mctgo` draft names."
1565
+ },
1566
+ "target_session": {
1567
+ "type": "string",
1568
+ "description": "The session a `mctgo` draft names."
1569
+ },
1570
+ "session_id": {
1571
+ "type": "string",
1572
+ "description": "The agent session id mctdraft gave the draft before it was sent (Episode 548, D7, ironsilk 0.9.58); `mct new` starts the agent with it. Absent on a draft opened otherwise."
1573
+ },
1574
+ "labels": {
1575
+ "type": "object",
1576
+ "description": "What a `mctgo` draft is about (D1, ironsilk 0.9.53): `paths`, `packages`, `repositories`, `addresses`, `issues` (string arrays, each omitted when empty) and `team`. Labels, never sentences."
1577
+ }
1578
+ },
1579
+ "additionalProperties": false
1580
+ }
1581
+ }
1582
+ }
1583
+ ]
1584
+ }