@stim-cli/server 1.15.0 → 1.17.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.
@@ -156,6 +156,46 @@
156
156
  "deviceKey"
157
157
  ],
158
158
  "additionalProperties": false,
159
+ "oneOf": [
160
+ {
161
+ "required": [
162
+ "backend"
163
+ ],
164
+ "properties": {
165
+ "backend": {
166
+ "const": "ios-instance"
167
+ },
168
+ "deviceKey": {
169
+ "pattern": "^ios:mobile:[a-fA-F0-9-]{36}$"
170
+ }
171
+ }
172
+ },
173
+ {
174
+ "required": [
175
+ "backend"
176
+ ],
177
+ "properties": {
178
+ "backend": {
179
+ "const": "android-instance"
180
+ },
181
+ "deviceKey": {
182
+ "pattern": "^android:mobile:emulator-[0-9]+$"
183
+ }
184
+ }
185
+ },
186
+ {
187
+ "not": {
188
+ "required": [
189
+ "backend"
190
+ ]
191
+ },
192
+ "properties": {
193
+ "deviceKey": {
194
+ "pattern": "^[A-Za-z0-9_-]+(?:\\.[A-Za-z0-9_-]+)+@[1-9][0-9]{0,9}$"
195
+ }
196
+ }
197
+ }
198
+ ],
159
199
  "properties": {
160
200
  "tenant": {
161
201
  "type": "string",
@@ -169,9 +209,14 @@
169
209
  "type": "string",
170
210
  "pattern": "^[A-Za-z0-9._-]{1,128}$"
171
211
  },
212
+ "backend": {
213
+ "enum": [
214
+ "ios-instance",
215
+ "android-instance"
216
+ ]
217
+ },
172
218
  "deviceKey": {
173
- "type": "string",
174
- "pattern": "^[A-Za-z0-9_-]+(?:\\.[A-Za-z0-9_-]+)+@[1-9][0-9]{0,9}$"
219
+ "type": "string"
175
220
  }
176
221
  }
177
222
  }
@@ -464,6 +509,28 @@
464
509
  }
465
510
  }
466
511
  },
512
+ "HostedLocalDeviceCount": {
513
+ "anyOf": [
514
+ {
515
+ "type": "integer",
516
+ "minimum": 0
517
+ },
518
+ {
519
+ "type": "object",
520
+ "required": [
521
+ "unknown"
522
+ ],
523
+ "additionalProperties": false,
524
+ "properties": {
525
+ "unknown": {
526
+ "type": "string",
527
+ "minLength": 1,
528
+ "maxLength": 4000
529
+ }
530
+ }
531
+ }
532
+ ]
533
+ },
467
534
  "HostedDeviceOffer": {
468
535
  "type": "object",
469
536
  "required": [
@@ -527,6 +594,9 @@
527
594
  "null"
528
595
  ],
529
596
  "minimum": 0
597
+ },
598
+ "localDevices": {
599
+ "$ref": "#/$defs/HostedLocalDeviceCount"
530
600
  }
531
601
  }
532
602
  },
@@ -553,6 +623,9 @@
553
623
  "null"
554
624
  ],
555
625
  "minimum": 0
626
+ },
627
+ "local": {
628
+ "$ref": "#/$defs/HostedLocalDeviceCount"
556
629
  }
557
630
  }
558
631
  }
@@ -703,6 +776,113 @@
703
776
  }
704
777
  }
705
778
  },
779
+ "HostedSessionRow": {
780
+ "type": "object",
781
+ "required": [
782
+ "id",
783
+ "client",
784
+ "platform",
785
+ "device",
786
+ "app",
787
+ "state",
788
+ "parked",
789
+ "since",
790
+ "workspace"
791
+ ],
792
+ "additionalProperties": false,
793
+ "properties": {
794
+ "id": {
795
+ "type": "string"
796
+ },
797
+ "client": {
798
+ "type": "object",
799
+ "required": [
800
+ "id",
801
+ "name"
802
+ ],
803
+ "additionalProperties": false,
804
+ "properties": {
805
+ "id": {
806
+ "type": "string"
807
+ },
808
+ "name": {
809
+ "type": "string"
810
+ }
811
+ }
812
+ },
813
+ "platform": {
814
+ "enum": [
815
+ "ios",
816
+ "android",
817
+ "macos"
818
+ ]
819
+ },
820
+ "device": {
821
+ "type": [
822
+ "string",
823
+ "null"
824
+ ]
825
+ },
826
+ "app": {
827
+ "type": [
828
+ "string",
829
+ "null"
830
+ ]
831
+ },
832
+ "state": {
833
+ "enum": [
834
+ "preparing",
835
+ "ready",
836
+ "stopping",
837
+ "stopped",
838
+ "unknown"
839
+ ]
840
+ },
841
+ "parked": {
842
+ "type": "boolean"
843
+ },
844
+ "since": {
845
+ "type": "string"
846
+ },
847
+ "workspace": {
848
+ "type": "string"
849
+ }
850
+ }
851
+ },
852
+ "HostedSessionsResult": {
853
+ "type": "object",
854
+ "required": [
855
+ "sessions"
856
+ ],
857
+ "additionalProperties": false,
858
+ "properties": {
859
+ "sessions": {
860
+ "type": "array",
861
+ "items": {
862
+ "$ref": "#/$defs/HostedSessionRow"
863
+ }
864
+ }
865
+ }
866
+ },
867
+ "HostedSessionStopResult": {
868
+ "type": "object",
869
+ "required": [
870
+ "id",
871
+ "state"
872
+ ],
873
+ "additionalProperties": false,
874
+ "properties": {
875
+ "id": {
876
+ "type": "string"
877
+ },
878
+ "state": {
879
+ "enum": [
880
+ "stopping",
881
+ "stopped"
882
+ ]
883
+ }
884
+ }
885
+ },
706
886
  "HostedDeviceSession": {
707
887
  "type": "object",
708
888
  "required": [
@@ -891,6 +1071,9 @@
891
1071
  "appAttempt": {
892
1072
  "type": "string"
893
1073
  },
1074
+ "agent": {
1075
+ "$ref": "#/$defs/HostedAppDelivery/properties/agent"
1076
+ },
894
1077
  "metroPort": {
895
1078
  "type": "integer",
896
1079
  "minimum": 1,
@@ -1013,6 +1196,12 @@
1013
1196
  "deviceName": {
1014
1197
  "type": "string",
1015
1198
  "minLength": 1
1199
+ },
1200
+ "setupTicket": {
1201
+ "type": "string",
1202
+ "minLength": 43,
1203
+ "maxLength": 43,
1204
+ "pattern": "^[A-Za-z0-9_-]{43}$"
1016
1205
  }
1017
1206
  }
1018
1207
  }
@@ -1111,9 +1300,15 @@
1111
1300
  "macos-keyboard-extended",
1112
1301
  "device-frames",
1113
1302
  "macos-hosted",
1303
+ "ios-hosted",
1304
+ "android-hosted",
1305
+ "hosted-ios-agent",
1306
+ "hosted-android-agent",
1114
1307
  "duo-frames",
1115
1308
  "workspace-diff",
1116
1309
  "hosted-congestion",
1310
+ "hosted-ios-data",
1311
+ "hosted-android-data",
1117
1312
  "server-update"
1118
1313
  ]
1119
1314
  }
@@ -1191,8 +1386,17 @@
1191
1386
  },
1192
1387
  "LogFilter": {
1193
1388
  "type": "object",
1194
- "required": [
1195
- "workspace"
1389
+ "oneOf": [
1390
+ {
1391
+ "required": [
1392
+ "workspace"
1393
+ ]
1394
+ },
1395
+ {
1396
+ "required": [
1397
+ "archive"
1398
+ ]
1399
+ }
1196
1400
  ],
1197
1401
  "additionalProperties": false,
1198
1402
  "properties": {
@@ -1200,6 +1404,12 @@
1200
1404
  "type": "string",
1201
1405
  "description": "An environment path from a status payload."
1202
1406
  },
1407
+ "archive": {
1408
+ "type": "string",
1409
+ "minLength": 1,
1410
+ "pattern": "^(?!.*\\.\\.)[^/\\\\\\u0000]+$",
1411
+ "description": "An archived[].id from a status payload; omit workspace."
1412
+ },
1203
1413
  "sources": {
1204
1414
  "type": "array",
1205
1415
  "minItems": 1,
@@ -1209,7 +1419,8 @@
1209
1419
  "client",
1210
1420
  "device",
1211
1421
  "build",
1212
- "agent"
1422
+ "agent",
1423
+ "maintenance"
1213
1424
  ]
1214
1425
  }
1215
1426
  },
@@ -1357,15 +1568,48 @@
1357
1568
  "FrameTarget": {
1358
1569
  "type": "object",
1359
1570
  "required": [
1360
- "workspace",
1361
1571
  "platform"
1362
1572
  ],
1573
+ "oneOf": [
1574
+ {
1575
+ "required": [
1576
+ "workspace"
1577
+ ],
1578
+ "not": {
1579
+ "required": [
1580
+ "archive"
1581
+ ]
1582
+ }
1583
+ },
1584
+ {
1585
+ "required": [
1586
+ "archive",
1587
+ "at"
1588
+ ],
1589
+ "not": {
1590
+ "required": [
1591
+ "workspace"
1592
+ ]
1593
+ },
1594
+ "properties": {
1595
+ "physical": {
1596
+ "const": false
1597
+ }
1598
+ }
1599
+ }
1600
+ ],
1363
1601
  "additionalProperties": false,
1364
1602
  "properties": {
1365
1603
  "workspace": {
1366
1604
  "type": "string",
1367
1605
  "description": "An environment path from a status payload."
1368
1606
  },
1607
+ "archive": {
1608
+ "type": "string",
1609
+ "minLength": 1,
1610
+ "pattern": "^(?!.*\\.\\.)[^/\\\\\\u0000]+$",
1611
+ "description": "An archived[].id from a status payload; omit workspace."
1612
+ },
1369
1613
  "platform": {
1370
1614
  "enum": [
1371
1615
  "ios",
@@ -2821,6 +3065,11 @@
2821
3065
  "minimum": 1,
2822
3066
  "maximum": 65535
2823
3067
  },
3068
+ "clientMetroPort": {
3069
+ "type": "integer",
3070
+ "minimum": 1,
3071
+ "maximum": 65535
3072
+ },
2824
3073
  "secret": {
2825
3074
  "type": "string",
2826
3075
  "pattern": "^[a-f0-9]{64}$"
@@ -2904,6 +3153,9 @@
2904
3153
  "items": {
2905
3154
  "type": "string"
2906
3155
  }
3156
+ },
3157
+ "deviceFrame": {
3158
+ "type": "boolean"
2907
3159
  }
2908
3160
  }
2909
3161
  }
@@ -3755,14 +4007,30 @@
3755
4007
  "params": {
3756
4008
  "type": "object",
3757
4009
  "required": [
3758
- "workspace",
3759
4010
  "platform"
3760
4011
  ],
4012
+ "oneOf": [
4013
+ {
4014
+ "required": [
4015
+ "workspace"
4016
+ ]
4017
+ },
4018
+ {
4019
+ "required": [
4020
+ "archive"
4021
+ ]
4022
+ }
4023
+ ],
3761
4024
  "additionalProperties": false,
3762
4025
  "properties": {
3763
4026
  "workspace": {
3764
4027
  "type": "string"
3765
4028
  },
4029
+ "archive": {
4030
+ "type": "string",
4031
+ "minLength": 1,
4032
+ "pattern": "^(?!.*\\.\\.)[^/\\\\\\u0000]+$"
4033
+ },
3766
4034
  "platform": {
3767
4035
  "enum": [
3768
4036
  "ios",
@@ -3778,6 +4046,40 @@
3778
4046
  }
3779
4047
  }
3780
4048
  },
4049
+ {
4050
+ "type": "object",
4051
+ "required": [
4052
+ "id",
4053
+ "method",
4054
+ "params"
4055
+ ],
4056
+ "additionalProperties": false,
4057
+ "properties": {
4058
+ "id": {
4059
+ "type": [
4060
+ "integer",
4061
+ "string"
4062
+ ]
4063
+ },
4064
+ "method": {
4065
+ "const": "archive.detail"
4066
+ },
4067
+ "params": {
4068
+ "type": "object",
4069
+ "required": [
4070
+ "archive"
4071
+ ],
4072
+ "additionalProperties": false,
4073
+ "properties": {
4074
+ "archive": {
4075
+ "type": "string",
4076
+ "minLength": 1,
4077
+ "pattern": "^(?!.*\\.\\.)[^/\\\\\\u0000]+$"
4078
+ }
4079
+ }
4080
+ }
4081
+ }
4082
+ },
3781
4083
  {
3782
4084
  "type": "object",
3783
4085
  "required": [
@@ -3799,15 +4101,31 @@
3799
4101
  "params": {
3800
4102
  "type": "object",
3801
4103
  "required": [
3802
- "workspace",
3803
4104
  "platform",
3804
4105
  "at"
3805
4106
  ],
4107
+ "oneOf": [
4108
+ {
4109
+ "required": [
4110
+ "workspace"
4111
+ ]
4112
+ },
4113
+ {
4114
+ "required": [
4115
+ "archive"
4116
+ ]
4117
+ }
4118
+ ],
3806
4119
  "additionalProperties": false,
3807
4120
  "properties": {
3808
4121
  "workspace": {
3809
4122
  "type": "string"
3810
4123
  },
4124
+ "archive": {
4125
+ "type": "string",
4126
+ "minLength": 1,
4127
+ "pattern": "^(?!.*\\.\\.)[^/\\\\\\u0000]+$"
4128
+ },
3811
4129
  "platform": {
3812
4130
  "enum": [
3813
4131
  "ios",
@@ -5300,6 +5618,61 @@
5300
5618
  }
5301
5619
  }
5302
5620
  },
5621
+ {
5622
+ "type": "object",
5623
+ "required": [
5624
+ "id",
5625
+ "method"
5626
+ ],
5627
+ "additionalProperties": false,
5628
+ "properties": {
5629
+ "id": {
5630
+ "type": [
5631
+ "integer",
5632
+ "string"
5633
+ ]
5634
+ },
5635
+ "method": {
5636
+ "const": "device-host.sessions"
5637
+ },
5638
+ "params": {
5639
+ "type": "object",
5640
+ "maxProperties": 0
5641
+ }
5642
+ }
5643
+ },
5644
+ {
5645
+ "type": "object",
5646
+ "required": [
5647
+ "id",
5648
+ "method",
5649
+ "params"
5650
+ ],
5651
+ "additionalProperties": false,
5652
+ "properties": {
5653
+ "id": {
5654
+ "type": [
5655
+ "integer",
5656
+ "string"
5657
+ ]
5658
+ },
5659
+ "method": {
5660
+ "const": "device-host.sessions.stop"
5661
+ },
5662
+ "params": {
5663
+ "type": "object",
5664
+ "required": [
5665
+ "session"
5666
+ ],
5667
+ "additionalProperties": false,
5668
+ "properties": {
5669
+ "session": {
5670
+ "type": "string"
5671
+ }
5672
+ }
5673
+ }
5674
+ }
5675
+ },
5303
5676
  {
5304
5677
  "type": "object",
5305
5678
  "required": [
@@ -5513,6 +5886,12 @@
5513
5886
  {
5514
5887
  "$ref": "#/$defs/HostedDeviceSession"
5515
5888
  },
5889
+ {
5890
+ "$ref": "#/$defs/HostedSessionsResult"
5891
+ },
5892
+ {
5893
+ "$ref": "#/$defs/HostedSessionStopResult"
5894
+ },
5516
5895
  {
5517
5896
  "$ref": "#/$defs/HostedAppDelivery"
5518
5897
  },
@@ -5833,6 +6212,17 @@
5833
6212
  "event": {
5834
6213
  "const": "device-frame"
5835
6214
  },
6215
+ "platform": {
6216
+ "enum": [
6217
+ "ios",
6218
+ "android",
6219
+ "web",
6220
+ "macos"
6221
+ ]
6222
+ },
6223
+ "slot": {
6224
+ "type": "string"
6225
+ },
5836
6226
  "subscription": {
5837
6227
  "type": "string"
5838
6228
  },
@@ -5957,6 +6347,22 @@
5957
6347
  }
5958
6348
  }
5959
6349
  },
6350
+ {
6351
+ "type": "object",
6352
+ "required": [
6353
+ "event",
6354
+ "subscription"
6355
+ ],
6356
+ "additionalProperties": false,
6357
+ "properties": {
6358
+ "event": {
6359
+ "const": "logs-ended"
6360
+ },
6361
+ "subscription": {
6362
+ "type": "string"
6363
+ }
6364
+ }
6365
+ },
5960
6366
  {
5961
6367
  "type": "object",
5962
6368
  "required": [
@@ -6062,6 +6468,17 @@
6062
6468
  "event": {
6063
6469
  "const": "frame-delayed"
6064
6470
  },
6471
+ "platform": {
6472
+ "enum": [
6473
+ "ios",
6474
+ "android",
6475
+ "web",
6476
+ "macos"
6477
+ ]
6478
+ },
6479
+ "slot": {
6480
+ "type": "string"
6481
+ },
6065
6482
  "subscription": {
6066
6483
  "type": "string"
6067
6484
  },
@@ -6106,6 +6523,17 @@
6106
6523
  "event": {
6107
6524
  "const": "control-ended"
6108
6525
  },
6526
+ "platform": {
6527
+ "enum": [
6528
+ "ios",
6529
+ "android",
6530
+ "web",
6531
+ "macos"
6532
+ ]
6533
+ },
6534
+ "slot": {
6535
+ "type": "string"
6536
+ },
6109
6537
  "session": {
6110
6538
  "type": "string"
6111
6539
  },
@@ -6135,6 +6563,17 @@
6135
6563
  "event": {
6136
6564
  "const": "error"
6137
6565
  },
6566
+ "platform": {
6567
+ "enum": [
6568
+ "ios",
6569
+ "android",
6570
+ "web",
6571
+ "macos"
6572
+ ]
6573
+ },
6574
+ "slot": {
6575
+ "type": "string"
6576
+ },
6138
6577
  "subscription": {
6139
6578
  "type": "string"
6140
6579
  },
@@ -0,0 +1,34 @@
1
+ import Foundation
2
+
3
+ /// Finds DeviceKit's iPhone Duo model (V68.usdz). Xcode 27.0 does not ship it; Xcode 27.1 does.
4
+ public enum DuoModelAsset {
5
+ static let relativePath =
6
+ "SharedFrameworks/DeviceKit.framework/Versions/A/PlugIns/CoreDevicePopDeviceKitExtension.devicekitplugin/Contents/Resources/V68.usdz"
7
+
8
+ static func locate(selected: String, installed: [String], exists: (String) -> Bool) -> String? {
9
+ for developerDir in [selected] + installed.filter({ $0 != selected }) {
10
+ let path = URL(fileURLWithPath: developerDir).deletingLastPathComponent().appendingPathComponent(relativePath).path
11
+ if exists(path) { return path }
12
+ }
13
+ return nil
14
+ }
15
+
16
+ static func reason(selected: String) -> String {
17
+ "The iPhone Duo hardware model is not in the selected Xcode (\(URL(fileURLWithPath: selected).deletingLastPathComponent().deletingLastPathComponent().lastPathComponent)) or any other Xcode in /Applications. Xcode 27.1 or later includes it."
18
+ }
19
+
20
+ static var installedDeveloperDirs: [String] {
21
+ let names = (try? FileManager.default.contentsOfDirectory(atPath: "/Applications")) ?? []
22
+ return names.filter { $0.hasPrefix("Xcode") && $0.hasSuffix(".app") }.sorted(by: >)
23
+ .map { "/Applications/\($0)/Contents/Developer" }
24
+ }
25
+
26
+ static var current: URL? {
27
+ locate(selected: CoreSimulator.developerDir, installed: installedDeveloperDirs, exists: FileManager.default.fileExists)
28
+ .map { URL(fileURLWithPath: $0) }
29
+ }
30
+
31
+ public static var unavailableReason: String? {
32
+ current == nil ? reason(selected: CoreSimulator.developerDir) : nil
33
+ }
34
+ }
@@ -24,16 +24,8 @@ final class DuoModelView: SCNView {
24
24
  private var quarterTurns = 0
25
25
  var activeID: UInt32
26
26
 
27
- static var assetURL: URL {
28
- URL(fileURLWithPath: CoreSimulator.developerDir)
29
- .deletingLastPathComponent()
30
- .appendingPathComponent(
31
- "SharedFrameworks/DeviceKit.framework/Versions/A/PlugIns/CoreDevicePopDeviceKitExtension.devicekitplugin/Contents/Resources/V68.usdz"
32
- )
33
- }
34
-
35
27
  static func load(innerID: UInt32, coverID: UInt32, nativeTurns: [UInt32: Int], assetURL: URL? = nil) -> DuoModelView? {
36
- guard let source = SCNSceneSource(url: assetURL ?? Self.assetURL, options: nil),
28
+ guard let url = assetURL ?? DuoModelAsset.current, let source = SCNSceneSource(url: url, options: nil),
37
29
  let scene = source.scene(options: [.animationImportPolicy: SCNSceneSource.AnimationImportPolicy.play]),
38
30
  let inner = scene.rootNode.childNode(withName: "mQHVkATpIwJRVQx", recursively: true),
39
31
  let cover = scene.rootNode.childNode(withName: "zaWsadDZpWAUDAX", recursively: true),