@mhome/app-facade-protocol 1.153.0 → 1.155.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,946 @@
1
+ {
2
+ "note": "Fictional contract fixtures. Source shape tests do not establish executable Automation behavior.",
3
+ "valid": [
4
+ {
5
+ "name": "create draft",
6
+ "type": "AutomationDraft",
7
+ "value": {
8
+ "type": "AUTOMATION",
9
+ "operation": "CREATE",
10
+ "title": "Evening lighting",
11
+ "summary": "Suggest a lower evening brightness",
12
+ "reasons": [
13
+ "Observed manual adjustments after the evening routine"
14
+ ],
15
+ "evidence": [
16
+ {
17
+ "sourceType": "BEHAVIOR",
18
+ "sourceId": "fixture-operation-1",
19
+ "occurredAt": 1000,
20
+ "excerpt": "The user selected brightness 30 after brightness 80"
21
+ }
22
+ ],
23
+ "script": {
24
+ "script": "name: Contract fixture\ntask: []\n",
25
+ "scripts": {
26
+ "lighting": "// Fixture source bundle\n",
27
+ "empty": ""
28
+ },
29
+ "sdkVersion": "test-sdk-1",
30
+ "parseResults": []
31
+ }
32
+ }
33
+ },
34
+ {
35
+ "name": "update draft",
36
+ "type": "AutomationDraft",
37
+ "value": {
38
+ "type": "AUTOMATION",
39
+ "operation": "UPDATE",
40
+ "title": "Evening lighting",
41
+ "summary": "Suggest a lower evening brightness",
42
+ "reasons": [
43
+ "Observed manual adjustments after the evening routine"
44
+ ],
45
+ "evidence": [
46
+ {
47
+ "sourceType": "BEHAVIOR",
48
+ "sourceId": "fixture-operation-1",
49
+ "occurredAt": 1000,
50
+ "excerpt": "The user selected brightness 30 after brightness 80"
51
+ }
52
+ ],
53
+ "script": {
54
+ "script": "name: Contract fixture\ntask: []\n",
55
+ "scripts": {
56
+ "lighting": "// Fixture source bundle\n",
57
+ "empty": ""
58
+ },
59
+ "sdkVersion": "test-sdk-1",
60
+ "parseResults": []
61
+ },
62
+ "automationId": "fixture-automation",
63
+ "baseScriptHash": "fixture-source-hash"
64
+ }
65
+ },
66
+ {
67
+ "name": "complete automation",
68
+ "type": "AutomationSuggestion",
69
+ "value": {
70
+ "type": "AUTOMATION",
71
+ "operation": "CREATE",
72
+ "title": "Evening lighting",
73
+ "summary": "Suggest a lower evening brightness",
74
+ "reasons": [
75
+ "Observed manual adjustments after the evening routine"
76
+ ],
77
+ "evidence": [
78
+ {
79
+ "sourceType": "BEHAVIOR",
80
+ "sourceId": "fixture-operation-1",
81
+ "occurredAt": 1000,
82
+ "excerpt": "The user selected brightness 30 after brightness 80"
83
+ }
84
+ ],
85
+ "script": {
86
+ "script": "name: Contract fixture\ntask: []\n",
87
+ "scripts": {
88
+ "lighting": "// Fixture source bundle\n",
89
+ "empty": ""
90
+ },
91
+ "sdkVersion": "test-sdk-1",
92
+ "parseResults": []
93
+ },
94
+ "id": "fixture-suggestion-1",
95
+ "spaceId": "fixture-space",
96
+ "runId": "fixture-run",
97
+ "version": 1,
98
+ "status": "PENDING",
99
+ "createdAt": 2000,
100
+ "updatedAt": 2000
101
+ }
102
+ },
103
+ {
104
+ "name": "resolved automation",
105
+ "type": "AutomationSuggestion",
106
+ "value": {
107
+ "type": "AUTOMATION",
108
+ "operation": "CREATE",
109
+ "title": "Evening lighting",
110
+ "summary": "Suggest a lower evening brightness",
111
+ "reasons": [
112
+ "Observed manual adjustments after the evening routine"
113
+ ],
114
+ "evidence": [
115
+ {
116
+ "sourceType": "BEHAVIOR",
117
+ "sourceId": "fixture-operation-1",
118
+ "occurredAt": 1000,
119
+ "excerpt": "The user selected brightness 30 after brightness 80"
120
+ }
121
+ ],
122
+ "script": {
123
+ "script": "name: Contract fixture\ntask: []\n",
124
+ "scripts": {
125
+ "lighting": "// Fixture source bundle\n",
126
+ "empty": ""
127
+ },
128
+ "sdkVersion": "test-sdk-1",
129
+ "parseResults": []
130
+ },
131
+ "id": "fixture-suggestion-1",
132
+ "spaceId": "fixture-space",
133
+ "runId": "fixture-run",
134
+ "version": 1,
135
+ "status": "RESOLVED",
136
+ "createdAt": 2000,
137
+ "updatedAt": 3000,
138
+ "resolution": {
139
+ "action": "SAVE",
140
+ "operationId": "fixture-apply",
141
+ "handledAt": 3000,
142
+ "actor": {
143
+ "kind": "user",
144
+ "userId": "fixture-user"
145
+ },
146
+ "resourceIds": {
147
+ "automationId": "fixture-automation"
148
+ }
149
+ }
150
+ }
151
+ },
152
+ {
153
+ "name": "different generic type",
154
+ "type": "Suggestion",
155
+ "value": {
156
+ "type": "INFORMATION",
157
+ "title": "Evening lighting",
158
+ "summary": "Suggest a lower evening brightness",
159
+ "reasons": [
160
+ "Observed manual adjustments after the evening routine"
161
+ ],
162
+ "evidence": [
163
+ {
164
+ "sourceType": "BEHAVIOR",
165
+ "sourceId": "fixture-operation-1",
166
+ "occurredAt": 1000,
167
+ "excerpt": "The user selected brightness 30 after brightness 80"
168
+ }
169
+ ],
170
+ "id": "fixture-suggestion-1",
171
+ "spaceId": "fixture-space",
172
+ "runId": "fixture-run",
173
+ "version": 1,
174
+ "status": "PENDING",
175
+ "createdAt": 2000,
176
+ "updatedAt": 2000,
177
+ "text": "Another output type, used only for extension conformance"
178
+ }
179
+ },
180
+ {
181
+ "name": "mixed generic batch",
182
+ "type": "GenerationResult",
183
+ "value": {
184
+ "suggestions": [
185
+ {
186
+ "type": "AUTOMATION",
187
+ "operation": "CREATE",
188
+ "title": "Evening lighting",
189
+ "summary": "Suggest a lower evening brightness",
190
+ "reasons": [
191
+ "Observed manual adjustments after the evening routine"
192
+ ],
193
+ "evidence": [
194
+ {
195
+ "sourceType": "BEHAVIOR",
196
+ "sourceId": "fixture-operation-1",
197
+ "occurredAt": 1000,
198
+ "excerpt": "The user selected brightness 30 after brightness 80"
199
+ }
200
+ ],
201
+ "script": {
202
+ "script": "name: Contract fixture\ntask: []\n",
203
+ "scripts": {
204
+ "lighting": "// Fixture source bundle\n",
205
+ "empty": ""
206
+ },
207
+ "sdkVersion": "test-sdk-1",
208
+ "parseResults": []
209
+ }
210
+ },
211
+ {
212
+ "type": "INFORMATION",
213
+ "title": "Evening lighting",
214
+ "summary": "Suggest a lower evening brightness",
215
+ "reasons": [
216
+ "Observed manual adjustments after the evening routine"
217
+ ],
218
+ "evidence": [
219
+ {
220
+ "sourceType": "BEHAVIOR",
221
+ "sourceId": "fixture-operation-1",
222
+ "occurredAt": 1000,
223
+ "excerpt": "The user selected brightness 30 after brightness 80"
224
+ }
225
+ ],
226
+ "text": "Another output type, used only for extension conformance"
227
+ }
228
+ ]
229
+ }
230
+ },
231
+ {
232
+ "name": "empty success output",
233
+ "type": "AutomationGenerationResult",
234
+ "value": {
235
+ "suggestions": []
236
+ }
237
+ },
238
+ {
239
+ "name": "explicit input",
240
+ "type": "GenerateInput",
241
+ "value": {
242
+ "focus": "Lighting"
243
+ }
244
+ },
245
+ {
246
+ "name": "default input",
247
+ "type": "GenerateInput",
248
+ "value": {}
249
+ },
250
+ {
251
+ "name": "list filter",
252
+ "type": "ListInput",
253
+ "value": {
254
+ "types": [
255
+ "AUTOMATION"
256
+ ],
257
+ "statuses": [
258
+ "PENDING"
259
+ ],
260
+ "limit": 100
261
+ }
262
+ },
263
+ {
264
+ "name": "handle",
265
+ "type": "HandleInput",
266
+ "value": {
267
+ "suggestionId": "fixture-suggestion-1",
268
+ "expectedVersion": 1,
269
+ "action": "SAVE"
270
+ }
271
+ },
272
+ {
273
+ "name": "feedback",
274
+ "type": "FeedbackInput",
275
+ "value": {
276
+ "suggestionId": "fixture-suggestion-1",
277
+ "expectedVersion": 1,
278
+ "decision": "DISMISS",
279
+ "comment": "This was temporary"
280
+ }
281
+ },
282
+ {
283
+ "name": "success with no suggestions",
284
+ "type": "SuggestionRun",
285
+ "value": {
286
+ "runId": "fixture-run",
287
+ "status": "SUCCEEDED",
288
+ "startedAt": 1000,
289
+ "finishedAt": 2000,
290
+ "suggestionIds": []
291
+ }
292
+ },
293
+ {
294
+ "name": "failed run",
295
+ "type": "SuggestionRun",
296
+ "value": {
297
+ "runId": "fixture-run",
298
+ "status": "FAILED",
299
+ "startedAt": 1000,
300
+ "finishedAt": 2000,
301
+ "suggestionIds": [],
302
+ "errorCode": "MODEL_UNAVAILABLE"
303
+ }
304
+ },
305
+ {
306
+ "name": "running",
307
+ "type": "SuggestionRun",
308
+ "value": {
309
+ "runId": "fixture-run",
310
+ "status": "RUNNING",
311
+ "startedAt": 1000,
312
+ "suggestionIds": []
313
+ }
314
+ },
315
+ {
316
+ "name": "get_latest_run",
317
+ "type": "GenerationGetInput",
318
+ "value": {}
319
+ },
320
+ {
321
+ "name": "get_specific_run",
322
+ "type": "GenerationGetInput",
323
+ "value": {
324
+ "runId": "run-1"
325
+ }
326
+ },
327
+ {
328
+ "name": "explicit_null_focus",
329
+ "type": "GenerateInput",
330
+ "value": {
331
+ "focus": null
332
+ }
333
+ },
334
+ {
335
+ "name": "explicit_null_cursor",
336
+ "type": "ListInput",
337
+ "value": {
338
+ "cursor": null
339
+ }
340
+ },
341
+ {
342
+ "name": "explicit_null_expiry",
343
+ "type": "AutomationDraft",
344
+ "value": {
345
+ "type": "AUTOMATION",
346
+ "operation": "CREATE",
347
+ "title": "Evening lighting",
348
+ "summary": "Suggest a lower evening brightness",
349
+ "reasons": [
350
+ "Observed manual adjustments after the evening routine"
351
+ ],
352
+ "evidence": [
353
+ {
354
+ "sourceType": "BEHAVIOR",
355
+ "sourceId": "fixture-operation-1",
356
+ "occurredAt": 1000,
357
+ "excerpt": "The user selected brightness 30 after brightness 80"
358
+ }
359
+ ],
360
+ "script": {
361
+ "script": "name: Contract fixture\ntask: []\n",
362
+ "scripts": {
363
+ "lighting": "// Fixture source bundle\n",
364
+ "empty": ""
365
+ },
366
+ "sdkVersion": "test-sdk-1",
367
+ "parseResults": []
368
+ },
369
+ "expiresAt": null
370
+ }
371
+ },
372
+ {
373
+ "name": "accepted_generation",
374
+ "type": "GenerateOutput",
375
+ "value": {
376
+ "accepted": true,
377
+ "run": {
378
+ "runId": "run-1",
379
+ "status": "RUNNING",
380
+ "startedAt": 1000,
381
+ "suggestionIds": []
382
+ }
383
+ }
384
+ },
385
+ {
386
+ "name": "existing_generation_not_readmitted",
387
+ "type": "GenerateOutput",
388
+ "value": {
389
+ "accepted": false,
390
+ "run": {
391
+ "runId": "run-1",
392
+ "status": "RUNNING",
393
+ "startedAt": 1000,
394
+ "suggestionIds": []
395
+ }
396
+ }
397
+ },
398
+ {
399
+ "name": "no_generation_yet",
400
+ "type": "GenerationGetOutput",
401
+ "value": {
402
+ "run": null
403
+ }
404
+ },
405
+ {
406
+ "name": "latest_generation",
407
+ "type": "GenerationGetOutput",
408
+ "value": {
409
+ "run": {
410
+ "runId": "run-1",
411
+ "status": "RUNNING",
412
+ "startedAt": 1000,
413
+ "suggestionIds": []
414
+ }
415
+ }
416
+ },
417
+ {
418
+ "name": "BOM is not Unicode whitespace",
419
+ "type": "AutomationDraft",
420
+ "value": {
421
+ "type": "AUTOMATION",
422
+ "operation": "CREATE",
423
+ "title": "",
424
+ "summary": "Suggest a lower evening brightness",
425
+ "reasons": [
426
+ "Observed manual adjustments after the evening routine"
427
+ ],
428
+ "evidence": [
429
+ {
430
+ "sourceType": "BEHAVIOR",
431
+ "sourceId": "fixture-operation-1",
432
+ "occurredAt": 1000,
433
+ "excerpt": "The user selected brightness 30 after brightness 80"
434
+ }
435
+ ],
436
+ "script": {
437
+ "script": "name: Contract fixture\ntask: []\n",
438
+ "scripts": {
439
+ "lighting": "// Fixture source bundle\n",
440
+ "empty": ""
441
+ },
442
+ "sdkVersion": "test-sdk-1",
443
+ "parseResults": []
444
+ }
445
+ }
446
+ }
447
+ ],
448
+ "invalid": [
449
+ {
450
+ "name": "model supplies owner",
451
+ "type": "AutomationDraft",
452
+ "value": {
453
+ "type": "AUTOMATION",
454
+ "operation": "CREATE",
455
+ "title": "Evening lighting",
456
+ "summary": "Suggest a lower evening brightness",
457
+ "reasons": [
458
+ "Observed manual adjustments after the evening routine"
459
+ ],
460
+ "evidence": [
461
+ {
462
+ "sourceType": "BEHAVIOR",
463
+ "sourceId": "fixture-operation-1",
464
+ "occurredAt": 1000,
465
+ "excerpt": "The user selected brightness 30 after brightness 80"
466
+ }
467
+ ],
468
+ "script": {
469
+ "script": "name: Contract fixture\ntask: []\n",
470
+ "scripts": {
471
+ "lighting": "// Fixture source bundle\n",
472
+ "empty": ""
473
+ },
474
+ "sdkVersion": "test-sdk-1",
475
+ "parseResults": []
476
+ },
477
+ "spaceId": "forged"
478
+ }
479
+ },
480
+ {
481
+ "name": "invalid type",
482
+ "type": "AutomationDraft",
483
+ "value": {
484
+ "type": "INFORMATION",
485
+ "operation": "CREATE",
486
+ "title": "Evening lighting",
487
+ "summary": "Suggest a lower evening brightness",
488
+ "reasons": [
489
+ "Observed manual adjustments after the evening routine"
490
+ ],
491
+ "evidence": [
492
+ {
493
+ "sourceType": "BEHAVIOR",
494
+ "sourceId": "fixture-operation-1",
495
+ "occurredAt": 1000,
496
+ "excerpt": "The user selected brightness 30 after brightness 80"
497
+ }
498
+ ],
499
+ "script": {
500
+ "script": "name: Contract fixture\ntask: []\n",
501
+ "scripts": {
502
+ "lighting": "// Fixture source bundle\n",
503
+ "empty": ""
504
+ },
505
+ "sdkVersion": "test-sdk-1",
506
+ "parseResults": []
507
+ }
508
+ }
509
+ },
510
+ {
511
+ "name": "missing reasons",
512
+ "type": "AutomationDraft",
513
+ "value": {
514
+ "type": "AUTOMATION",
515
+ "operation": "CREATE",
516
+ "title": "Evening lighting",
517
+ "summary": "Suggest a lower evening brightness",
518
+ "reasons": [],
519
+ "evidence": [
520
+ {
521
+ "sourceType": "BEHAVIOR",
522
+ "sourceId": "fixture-operation-1",
523
+ "occurredAt": 1000,
524
+ "excerpt": "The user selected brightness 30 after brightness 80"
525
+ }
526
+ ],
527
+ "script": {
528
+ "script": "name: Contract fixture\ntask: []\n",
529
+ "scripts": {
530
+ "lighting": "// Fixture source bundle\n",
531
+ "empty": ""
532
+ },
533
+ "sdkVersion": "test-sdk-1",
534
+ "parseResults": []
535
+ }
536
+ }
537
+ },
538
+ {
539
+ "name": "blank source",
540
+ "type": "AutomationDraft",
541
+ "value": {
542
+ "type": "AUTOMATION",
543
+ "operation": "CREATE",
544
+ "title": "Evening lighting",
545
+ "summary": "Suggest a lower evening brightness",
546
+ "reasons": [
547
+ "Observed manual adjustments after the evening routine"
548
+ ],
549
+ "evidence": [
550
+ {
551
+ "sourceType": "BEHAVIOR",
552
+ "sourceId": "fixture-operation-1",
553
+ "occurredAt": 1000,
554
+ "excerpt": "The user selected brightness 30 after brightness 80"
555
+ }
556
+ ],
557
+ "script": {
558
+ "script": " "
559
+ }
560
+ }
561
+ },
562
+ {
563
+ "name": "unknown source field",
564
+ "type": "AutomationDraft",
565
+ "value": {
566
+ "type": "AUTOMATION",
567
+ "operation": "CREATE",
568
+ "title": "Evening lighting",
569
+ "summary": "Suggest a lower evening brightness",
570
+ "reasons": [
571
+ "Observed manual adjustments after the evening routine"
572
+ ],
573
+ "evidence": [
574
+ {
575
+ "sourceType": "BEHAVIOR",
576
+ "sourceId": "fixture-operation-1",
577
+ "occurredAt": 1000,
578
+ "excerpt": "The user selected brightness 30 after brightness 80"
579
+ }
580
+ ],
581
+ "script": {
582
+ "script": "name: Contract fixture\ntask: []\n",
583
+ "scripts": {
584
+ "lighting": "// Fixture source bundle\n",
585
+ "empty": ""
586
+ },
587
+ "sdkVersion": "test-sdk-1",
588
+ "parseResults": [],
589
+ "unsafeExecute": true
590
+ }
591
+ }
592
+ },
593
+ {
594
+ "name": "CREATE targets existing",
595
+ "type": "AutomationDraft",
596
+ "value": {
597
+ "type": "AUTOMATION",
598
+ "operation": "CREATE",
599
+ "title": "Evening lighting",
600
+ "summary": "Suggest a lower evening brightness",
601
+ "reasons": [
602
+ "Observed manual adjustments after the evening routine"
603
+ ],
604
+ "evidence": [
605
+ {
606
+ "sourceType": "BEHAVIOR",
607
+ "sourceId": "fixture-operation-1",
608
+ "occurredAt": 1000,
609
+ "excerpt": "The user selected brightness 30 after brightness 80"
610
+ }
611
+ ],
612
+ "script": {
613
+ "script": "name: Contract fixture\ntask: []\n",
614
+ "scripts": {
615
+ "lighting": "// Fixture source bundle\n",
616
+ "empty": ""
617
+ },
618
+ "sdkVersion": "test-sdk-1",
619
+ "parseResults": []
620
+ },
621
+ "automationId": "old"
622
+ }
623
+ },
624
+ {
625
+ "name": "UPDATE lacks source guard",
626
+ "type": "AutomationDraft",
627
+ "value": {
628
+ "type": "AUTOMATION",
629
+ "operation": "UPDATE",
630
+ "title": "Evening lighting",
631
+ "summary": "Suggest a lower evening brightness",
632
+ "reasons": [
633
+ "Observed manual adjustments after the evening routine"
634
+ ],
635
+ "evidence": [
636
+ {
637
+ "sourceType": "BEHAVIOR",
638
+ "sourceId": "fixture-operation-1",
639
+ "occurredAt": 1000,
640
+ "excerpt": "The user selected brightness 30 after brightness 80"
641
+ }
642
+ ],
643
+ "script": {
644
+ "script": "name: Contract fixture\ntask: []\n",
645
+ "scripts": {
646
+ "lighting": "// Fixture source bundle\n",
647
+ "empty": ""
648
+ },
649
+ "sdkVersion": "test-sdk-1",
650
+ "parseResults": []
651
+ },
652
+ "automationId": "old"
653
+ }
654
+ },
655
+ {
656
+ "name": "unregistered type is not AUTOMATION",
657
+ "type": "AutomationSuggestion",
658
+ "value": {
659
+ "type": "INFORMATION",
660
+ "title": "Evening lighting",
661
+ "summary": "Suggest a lower evening brightness",
662
+ "reasons": [
663
+ "Observed manual adjustments after the evening routine"
664
+ ],
665
+ "evidence": [
666
+ {
667
+ "sourceType": "BEHAVIOR",
668
+ "sourceId": "fixture-operation-1",
669
+ "occurredAt": 1000,
670
+ "excerpt": "The user selected brightness 30 after brightness 80"
671
+ }
672
+ ],
673
+ "id": "fixture-suggestion-1",
674
+ "spaceId": "fixture-space",
675
+ "runId": "fixture-run",
676
+ "version": 1,
677
+ "status": "PENDING",
678
+ "createdAt": 2000,
679
+ "updatedAt": 2000,
680
+ "text": "Another output type, used only for extension conformance"
681
+ }
682
+ },
683
+ {
684
+ "name": "resolved without outcome",
685
+ "type": "AutomationSuggestion",
686
+ "value": {
687
+ "type": "AUTOMATION",
688
+ "operation": "CREATE",
689
+ "title": "Evening lighting",
690
+ "summary": "Suggest a lower evening brightness",
691
+ "reasons": [
692
+ "Observed manual adjustments after the evening routine"
693
+ ],
694
+ "evidence": [
695
+ {
696
+ "sourceType": "BEHAVIOR",
697
+ "sourceId": "fixture-operation-1",
698
+ "occurredAt": 1000,
699
+ "excerpt": "The user selected brightness 30 after brightness 80"
700
+ }
701
+ ],
702
+ "script": {
703
+ "script": "name: Contract fixture\ntask: []\n",
704
+ "scripts": {
705
+ "lighting": "// Fixture source bundle\n",
706
+ "empty": ""
707
+ },
708
+ "sdkVersion": "test-sdk-1",
709
+ "parseResults": []
710
+ },
711
+ "id": "fixture-suggestion-1",
712
+ "spaceId": "fixture-space",
713
+ "runId": "fixture-run",
714
+ "version": 1,
715
+ "status": "RESOLVED",
716
+ "createdAt": 2000,
717
+ "updatedAt": 2000
718
+ }
719
+ },
720
+ {
721
+ "name": "pending with outcome",
722
+ "type": "AutomationSuggestion",
723
+ "value": {
724
+ "type": "AUTOMATION",
725
+ "operation": "CREATE",
726
+ "title": "Evening lighting",
727
+ "summary": "Suggest a lower evening brightness",
728
+ "reasons": [
729
+ "Observed manual adjustments after the evening routine"
730
+ ],
731
+ "evidence": [
732
+ {
733
+ "sourceType": "BEHAVIOR",
734
+ "sourceId": "fixture-operation-1",
735
+ "occurredAt": 1000,
736
+ "excerpt": "The user selected brightness 30 after brightness 80"
737
+ }
738
+ ],
739
+ "script": {
740
+ "script": "name: Contract fixture\ntask: []\n",
741
+ "scripts": {
742
+ "lighting": "// Fixture source bundle\n",
743
+ "empty": ""
744
+ },
745
+ "sdkVersion": "test-sdk-1",
746
+ "parseResults": []
747
+ },
748
+ "id": "fixture-suggestion-1",
749
+ "spaceId": "fixture-space",
750
+ "runId": "fixture-run",
751
+ "version": 1,
752
+ "status": "PENDING",
753
+ "createdAt": 2000,
754
+ "updatedAt": 3000,
755
+ "resolution": {
756
+ "action": "SAVE",
757
+ "operationId": "fixture-apply",
758
+ "handledAt": 3000,
759
+ "actor": {
760
+ "kind": "user",
761
+ "userId": "fixture-user"
762
+ },
763
+ "resourceIds": {
764
+ "automationId": "fixture-automation"
765
+ }
766
+ }
767
+ }
768
+ },
769
+ {
770
+ "name": "unsafe numeric version",
771
+ "type": "AutomationSuggestion",
772
+ "value": {
773
+ "type": "AUTOMATION",
774
+ "operation": "CREATE",
775
+ "title": "Evening lighting",
776
+ "summary": "Suggest a lower evening brightness",
777
+ "reasons": [
778
+ "Observed manual adjustments after the evening routine"
779
+ ],
780
+ "evidence": [
781
+ {
782
+ "sourceType": "BEHAVIOR",
783
+ "sourceId": "fixture-operation-1",
784
+ "occurredAt": 1000,
785
+ "excerpt": "The user selected brightness 30 after brightness 80"
786
+ }
787
+ ],
788
+ "script": {
789
+ "script": "name: Contract fixture\ntask: []\n",
790
+ "scripts": {
791
+ "lighting": "// Fixture source bundle\n",
792
+ "empty": ""
793
+ },
794
+ "sdkVersion": "test-sdk-1",
795
+ "parseResults": []
796
+ },
797
+ "id": "fixture-suggestion-1",
798
+ "spaceId": "fixture-space",
799
+ "runId": "fixture-run",
800
+ "version": 9007199254740992,
801
+ "status": "PENDING",
802
+ "createdAt": 2000,
803
+ "updatedAt": 2000
804
+ }
805
+ },
806
+ {
807
+ "name": "inject payer",
808
+ "type": "GenerateInput",
809
+ "value": {
810
+ "focus": "Lighting",
811
+ "payer": "owner"
812
+ }
813
+ },
814
+ {
815
+ "name": "inject trigger",
816
+ "type": "GenerateInput",
817
+ "value": {
818
+ "trigger": "SCHEDULED"
819
+ }
820
+ },
821
+ {
822
+ "name": "blank focus",
823
+ "type": "GenerateInput",
824
+ "value": {
825
+ "focus": " "
826
+ }
827
+ },
828
+ {
829
+ "name": "unbounded list",
830
+ "type": "ListInput",
831
+ "value": {
832
+ "limit": 101
833
+ }
834
+ },
835
+ {
836
+ "name": "missing reviewed version",
837
+ "type": "HandleInput",
838
+ "value": {
839
+ "suggestionId": "fixture-suggestion-1",
840
+ "action": "SAVE"
841
+ }
842
+ },
843
+ {
844
+ "name": "fake ready after error",
845
+ "type": "SuggestionRun",
846
+ "value": {
847
+ "runId": "fixture-run",
848
+ "status": "SUCCEEDED",
849
+ "startedAt": 1000,
850
+ "finishedAt": 2000,
851
+ "suggestionIds": [],
852
+ "errorCode": "TIMEOUT"
853
+ }
854
+ },
855
+ {
856
+ "name": "missing error",
857
+ "type": "SuggestionRun",
858
+ "value": {
859
+ "runId": "fixture-run",
860
+ "status": "FAILED",
861
+ "startedAt": 1000,
862
+ "finishedAt": 2000,
863
+ "suggestionIds": []
864
+ }
865
+ },
866
+ {
867
+ "name": "failed claims suggestions",
868
+ "type": "SuggestionRun",
869
+ "value": {
870
+ "runId": "fixture-run",
871
+ "status": "FAILED",
872
+ "startedAt": 1000,
873
+ "finishedAt": 2000,
874
+ "suggestionIds": [
875
+ "some"
876
+ ],
877
+ "errorCode": "TIMEOUT"
878
+ }
879
+ },
880
+ {
881
+ "name": "running claims finished",
882
+ "type": "SuggestionRun",
883
+ "value": {
884
+ "runId": "fixture-run",
885
+ "status": "RUNNING",
886
+ "startedAt": 1000,
887
+ "finishedAt": 2000,
888
+ "suggestionIds": []
889
+ }
890
+ },
891
+ {
892
+ "name": "blank_run_filter",
893
+ "type": "GenerationGetInput",
894
+ "value": {
895
+ "runId": " "
896
+ }
897
+ },
898
+ {
899
+ "name": "no_admission_disposition",
900
+ "type": "GenerateOutput",
901
+ "value": {
902
+ "run": {
903
+ "runId": "run-1",
904
+ "status": "RUNNING",
905
+ "startedAt": 1000,
906
+ "suggestionIds": []
907
+ }
908
+ }
909
+ },
910
+ {
911
+ "name": "missing_explicit_run_result",
912
+ "type": "GenerationGetOutput",
913
+ "value": {}
914
+ },
915
+ {
916
+ "name": "unicode next line is blank",
917
+ "type": "AutomationDraft",
918
+ "value": {
919
+ "type": "AUTOMATION",
920
+ "operation": "CREATE",
921
+ "title": "…",
922
+ "summary": "Suggest a lower evening brightness",
923
+ "reasons": [
924
+ "Observed manual adjustments after the evening routine"
925
+ ],
926
+ "evidence": [
927
+ {
928
+ "sourceType": "BEHAVIOR",
929
+ "sourceId": "fixture-operation-1",
930
+ "occurredAt": 1000,
931
+ "excerpt": "The user selected brightness 30 after brightness 80"
932
+ }
933
+ ],
934
+ "script": {
935
+ "script": "name: Contract fixture\ntask: []\n",
936
+ "scripts": {
937
+ "lighting": "// Fixture source bundle\n",
938
+ "empty": ""
939
+ },
940
+ "sdkVersion": "test-sdk-1",
941
+ "parseResults": []
942
+ }
943
+ }
944
+ }
945
+ ]
946
+ }