@mostra/protocol 0.6.2 → 0.8.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.
Files changed (73) hide show
  1. package/dist/actions.d.ts +12 -0
  2. package/dist/actions.d.ts.map +1 -1
  3. package/dist/actions.js.map +1 -1
  4. package/dist/bridge.d.ts +25 -0
  5. package/dist/bridge.d.ts.map +1 -1
  6. package/dist/bridge.js +32 -2
  7. package/dist/bridge.js.map +1 -1
  8. package/dist/browser.d.ts +76 -0
  9. package/dist/browser.d.ts.map +1 -1
  10. package/dist/browser.js +45 -2
  11. package/dist/browser.js.map +1 -1
  12. package/dist/diagnostics/codes/hygiene.d.ts +1 -1
  13. package/dist/diagnostics/codes/hygiene.d.ts.map +1 -1
  14. package/dist/diagnostics/codes/hygiene.js +12 -1
  15. package/dist/diagnostics/codes/hygiene.js.map +1 -1
  16. package/dist/diagnostics/codes/index.d.ts +3 -2
  17. package/dist/diagnostics/codes/index.d.ts.map +1 -1
  18. package/dist/diagnostics/codes/index.js +3 -1
  19. package/dist/diagnostics/codes/index.js.map +1 -1
  20. package/dist/diagnostics/codes/share.d.ts +8 -0
  21. package/dist/diagnostics/codes/share.d.ts.map +1 -0
  22. package/dist/diagnostics/codes/share.js +88 -0
  23. package/dist/diagnostics/codes/share.js.map +1 -0
  24. package/dist/hygiene.d.ts.map +1 -1
  25. package/dist/hygiene.js +2 -1
  26. package/dist/hygiene.js.map +1 -1
  27. package/dist/ids.d.ts +5 -1
  28. package/dist/ids.d.ts.map +1 -1
  29. package/dist/ids.js +3 -1
  30. package/dist/ids.js.map +1 -1
  31. package/dist/index.d.ts +10 -5
  32. package/dist/index.js +9 -4
  33. package/dist/methods/index.d.ts.map +1 -1
  34. package/dist/methods/index.js +9 -1
  35. package/dist/methods/index.js.map +1 -1
  36. package/dist/methods/instance/status.d.ts +24 -0
  37. package/dist/methods/instance/status.d.ts.map +1 -1
  38. package/dist/methods/instance/status.js +11 -2
  39. package/dist/methods/instance/status.js.map +1 -1
  40. package/dist/methods/port/addressing-external-base.d.ts +52 -0
  41. package/dist/methods/port/addressing-external-base.d.ts.map +1 -0
  42. package/dist/methods/port/addressing-external-base.js +61 -0
  43. package/dist/methods/port/addressing-external-base.js.map +1 -0
  44. package/dist/methods/share/list.d.ts +23 -0
  45. package/dist/methods/share/list.d.ts.map +1 -0
  46. package/dist/methods/share/list.js +29 -0
  47. package/dist/methods/share/list.js.map +1 -0
  48. package/dist/methods/share/start.d.ts +96 -0
  49. package/dist/methods/share/start.d.ts.map +1 -0
  50. package/dist/methods/share/start.js +73 -0
  51. package/dist/methods/share/start.js.map +1 -0
  52. package/dist/methods/share/stop.d.ts +29 -0
  53. package/dist/methods/share/stop.d.ts.map +1 -0
  54. package/dist/methods/share/stop.js +32 -0
  55. package/dist/methods/share/stop.js.map +1 -0
  56. package/package.json +2 -2
  57. package/schemas/protocol.draft-07.json +535 -0
  58. package/schemas/protocol.schema.json +507 -0
  59. package/src/actions.ts +12 -0
  60. package/src/bridge.ts +49 -0
  61. package/src/browser.ts +118 -0
  62. package/src/diagnostics/codes/hygiene.ts +12 -0
  63. package/src/diagnostics/codes/index.ts +6 -2
  64. package/src/diagnostics/codes/share.ts +100 -0
  65. package/src/hygiene.ts +1 -0
  66. package/src/ids.ts +9 -1
  67. package/src/index.ts +39 -0
  68. package/src/methods/index.ts +8 -0
  69. package/src/methods/instance/status.ts +38 -0
  70. package/src/methods/port/addressing-external-base.ts +113 -0
  71. package/src/methods/share/list.ts +42 -0
  72. package/src/methods/share/start.ts +150 -0
  73. package/src/methods/share/stop.ts +50 -0
@@ -185,6 +185,16 @@
185
185
  "$ref": "#/definitions/MostraShutdownResult"
186
186
  }
187
187
  },
188
+ "port/addressing.externalBase": {
189
+ "direction": "instance-to-host",
190
+ "mutating": false,
191
+ "params": {
192
+ "$ref": "#/definitions/PortAddressingExternalBaseParams"
193
+ },
194
+ "result": {
195
+ "$ref": "#/definitions/PortAddressingExternalBaseResult"
196
+ }
197
+ },
188
198
  "port/drafts.mirror": {
189
199
  "direction": "instance-to-host",
190
200
  "mutating": false,
@@ -281,6 +291,36 @@
281
291
  "$ref": "#/definitions/SecretEntry"
282
292
  }
283
293
  },
294
+ "share/list": {
295
+ "direction": "client-to-instance",
296
+ "mutating": false,
297
+ "params": {
298
+ "$ref": "#/definitions/ShareListParams"
299
+ },
300
+ "result": {
301
+ "$ref": "#/definitions/ShareListResult"
302
+ }
303
+ },
304
+ "share/start": {
305
+ "direction": "client-to-instance",
306
+ "mutating": true,
307
+ "params": {
308
+ "$ref": "#/definitions/ShareStartParams"
309
+ },
310
+ "result": {
311
+ "$ref": "#/definitions/ShareStartResult"
312
+ }
313
+ },
314
+ "share/stop": {
315
+ "direction": "client-to-instance",
316
+ "mutating": true,
317
+ "params": {
318
+ "$ref": "#/definitions/ShareStopParams"
319
+ },
320
+ "result": {
321
+ "$ref": "#/definitions/ShareStopResult"
322
+ }
323
+ },
284
324
  "state/get": {
285
325
  "direction": "client-to-instance",
286
326
  "mutating": false,
@@ -2049,6 +2089,38 @@
2049
2089
  "pattern": "^[1-9][0-9]{0,8}[smhd]$",
2050
2090
  "description": "A duration: a positive whole number and s, m, h or d, such as 30m, 24h or 7d."
2051
2091
  },
2092
+ "EnterRequest": {
2093
+ "type": "object",
2094
+ "properties": {
2095
+ "ticket": {
2096
+ "type": "string",
2097
+ "minLength": 1,
2098
+ "maxLength": 64
2099
+ }
2100
+ },
2101
+ "required": [
2102
+ "ticket"
2103
+ ],
2104
+ "description": "A frame ticket to exchange."
2105
+ },
2106
+ "EnterResult": {
2107
+ "type": "object",
2108
+ "properties": {
2109
+ "session": {
2110
+ "type": "string",
2111
+ "minLength": 1
2112
+ },
2113
+ "shellOrigin": {
2114
+ "type": "string",
2115
+ "minLength": 1
2116
+ }
2117
+ },
2118
+ "required": [
2119
+ "session",
2120
+ "shellOrigin"
2121
+ ],
2122
+ "description": "A worker-mode frame session's secret and the shell's origin."
2123
+ },
2052
2124
  "EventFilter": {
2053
2125
  "type": "object",
2054
2126
  "properties": {
@@ -2307,6 +2379,25 @@
2307
2379
  "type": "object",
2308
2380
  "properties": {}
2309
2381
  },
2382
+ "ExternalBase": {
2383
+ "type": "object",
2384
+ "properties": {
2385
+ "origin": {
2386
+ "$ref": "#/definitions/OriginString"
2387
+ },
2388
+ "mode": {
2389
+ "type": "string",
2390
+ "enum": [
2391
+ "cookie",
2392
+ "worker"
2393
+ ]
2394
+ }
2395
+ },
2396
+ "required": [
2397
+ "origin"
2398
+ ],
2399
+ "description": "The origin browsers use for a listener, and how its frame authenticates there."
2400
+ },
2310
2401
  "FieldConflict": {
2311
2402
  "type": "object",
2312
2403
  "properties": {
@@ -2455,6 +2546,60 @@
2455
2546
  ],
2456
2547
  "description": "Whether the viewer follows the artifact's new versions."
2457
2548
  },
2549
+ "FrameSessionFacts": {
2550
+ "type": "object",
2551
+ "properties": {
2552
+ "csrf": {
2553
+ "type": "string",
2554
+ "minLength": 1
2555
+ },
2556
+ "artifactId": {
2557
+ "$ref": "#/definitions/ArtifactId"
2558
+ },
2559
+ "shellOrigin": {
2560
+ "type": "string",
2561
+ "minLength": 1
2562
+ },
2563
+ "scopes": {
2564
+ "readOnly": true,
2565
+ "type": "array",
2566
+ "items": {
2567
+ "type": "string"
2568
+ }
2569
+ },
2570
+ "viewer": {
2571
+ "allOf": [
2572
+ {
2573
+ "$ref": "#/definitions/Viewer"
2574
+ }
2575
+ ]
2576
+ },
2577
+ "version": {
2578
+ "allOf": [
2579
+ {
2580
+ "$ref": "#/definitions/VersionRef"
2581
+ }
2582
+ ]
2583
+ },
2584
+ "mode": {
2585
+ "type": "string",
2586
+ "enum": [
2587
+ "cookie",
2588
+ "worker"
2589
+ ]
2590
+ },
2591
+ "streams": {
2592
+ "type": "boolean"
2593
+ }
2594
+ },
2595
+ "required": [
2596
+ "csrf",
2597
+ "artifactId",
2598
+ "shellOrigin",
2599
+ "scopes"
2600
+ ],
2601
+ "description": "A frame session's CSRF token, shell origin, scopes, viewer, version and mode."
2602
+ },
2458
2603
  "FrameTicket": {
2459
2604
  "type": "object",
2460
2605
  "properties": {
@@ -2520,6 +2665,10 @@
2520
2665
  "devPreview": {
2521
2666
  "type": "boolean",
2522
2667
  "const": true
2668
+ },
2669
+ "mode": {
2670
+ "type": "string",
2671
+ "const": "worker"
2523
2672
  }
2524
2673
  },
2525
2674
  "required": [
@@ -2565,6 +2714,40 @@
2565
2714
  "origin"
2566
2715
  ]
2567
2716
  }
2717
+ },
2718
+ "faces": {
2719
+ "readOnly": true,
2720
+ "type": "array",
2721
+ "items": {
2722
+ "type": "object",
2723
+ "properties": {
2724
+ "origin": {
2725
+ "type": "string"
2726
+ },
2727
+ "local": {
2728
+ "type": "string"
2729
+ },
2730
+ "listener": {
2731
+ "type": "string",
2732
+ "enum": [
2733
+ "shell",
2734
+ "artifact"
2735
+ ]
2736
+ },
2737
+ "artifactId": {
2738
+ "type": "string"
2739
+ },
2740
+ "by": {
2741
+ "type": "string"
2742
+ }
2743
+ },
2744
+ "required": [
2745
+ "origin",
2746
+ "local",
2747
+ "listener",
2748
+ "by"
2749
+ ]
2750
+ }
2568
2751
  }
2569
2752
  },
2570
2753
  "required": [
@@ -2975,6 +3158,13 @@
2975
3158
  },
2976
3159
  "idleExitAt": {
2977
3160
  "type": "string"
3161
+ },
3162
+ "shares": {
3163
+ "readOnly": true,
3164
+ "type": "array",
3165
+ "items": {
3166
+ "$ref": "#/definitions/Share"
3167
+ }
2978
3168
  }
2979
3169
  },
2980
3170
  "required": [
@@ -3310,6 +3500,12 @@
3310
3500
  ],
3311
3501
  "description": "A mutation's outcome: the revision after it, the applied field IDs, the conflicts."
3312
3502
  },
3503
+ "OriginString": {
3504
+ "type": "string",
3505
+ "maxLength": 2048,
3506
+ "pattern": "^(?!http:\\/\\/[^/]*:80$)(?!https:\\/\\/[^/]*:443$)https?:\\/\\/(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*|\\[[0-9a-f:.]+\\])(?::(?:[1-9][0-9]{0,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5]))?$",
3507
+ "description": "A web origin: scheme, host and a port only when it isn't the default."
3508
+ },
3313
3509
  "OrphanedField": {
3314
3510
  "type": "object",
3315
3511
  "properties": {
@@ -3371,6 +3567,42 @@
3371
3567
  ],
3372
3568
  "description": "A long-poll answer: the cursor, the events after the asked one, and a snapshot."
3373
3569
  },
3570
+ "PortAddressingExternalBaseParams": {
3571
+ "type": "object",
3572
+ "properties": {
3573
+ "artifactId": {
3574
+ "$ref": "#/definitions/ArtifactId"
3575
+ },
3576
+ "listener": {
3577
+ "type": "string",
3578
+ "enum": [
3579
+ "shell",
3580
+ "artifact"
3581
+ ]
3582
+ },
3583
+ "local": {
3584
+ "type": "string",
3585
+ "minLength": 1
3586
+ }
3587
+ },
3588
+ "required": [
3589
+ "artifactId",
3590
+ "listener",
3591
+ "local"
3592
+ ],
3593
+ "description": "Which listener of which artifact needs an external address, and where it listens."
3594
+ },
3595
+ "PortAddressingExternalBaseResult": {
3596
+ "anyOf": [
3597
+ {
3598
+ "$ref": "#/definitions/ExternalBase"
3599
+ },
3600
+ {
3601
+ "type": "null"
3602
+ }
3603
+ ],
3604
+ "description": "The external origin a host gives a listener, or null for loopback."
3605
+ },
3374
3606
  "PortIdentityResolveParams": {
3375
3607
  "type": "object",
3376
3608
  "properties": {
@@ -4491,6 +4723,278 @@
4491
4723
  "pattern": "^[0-9a-f]{64}$",
4492
4724
  "description": "A SHA-256 digest in lowercase hex."
4493
4725
  },
4726
+ "Share": {
4727
+ "type": "object",
4728
+ "properties": {
4729
+ "shareId": {
4730
+ "$ref": "#/definitions/ShareId"
4731
+ },
4732
+ "artifactId": {
4733
+ "$ref": "#/definitions/ArtifactId"
4734
+ },
4735
+ "via": {
4736
+ "$ref": "#/definitions/ShareVia"
4737
+ },
4738
+ "url": {
4739
+ "type": "string",
4740
+ "minLength": 1
4741
+ },
4742
+ "hostname": {
4743
+ "type": "string",
4744
+ "minLength": 1
4745
+ },
4746
+ "artifactOrigin": {
4747
+ "type": "string",
4748
+ "minLength": 1
4749
+ },
4750
+ "mode": {
4751
+ "type": "string",
4752
+ "enum": [
4753
+ "cookie",
4754
+ "worker"
4755
+ ]
4756
+ },
4757
+ "tokenId": {
4758
+ "$ref": "#/definitions/TokenId"
4759
+ },
4760
+ "startedAt": {
4761
+ "type": "string",
4762
+ "format": "date-time",
4763
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
4764
+ },
4765
+ "expiresAt": {
4766
+ "type": "string",
4767
+ "format": "date-time",
4768
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
4769
+ },
4770
+ "state": {
4771
+ "type": "string",
4772
+ "enum": [
4773
+ "active",
4774
+ "stopped"
4775
+ ]
4776
+ },
4777
+ "stoppedAt": {
4778
+ "type": "string",
4779
+ "format": "date-time",
4780
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
4781
+ },
4782
+ "stopReason": {
4783
+ "type": "string",
4784
+ "minLength": 1
4785
+ }
4786
+ },
4787
+ "required": [
4788
+ "shareId",
4789
+ "artifactId",
4790
+ "via",
4791
+ "hostname",
4792
+ "mode",
4793
+ "tokenId",
4794
+ "startedAt",
4795
+ "state"
4796
+ ],
4797
+ "description": "A share: its tunnel, link, address, frame mode and lifetime."
4798
+ },
4799
+ "ShareId": {
4800
+ "type": "string",
4801
+ "pattern": "^shr_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
4802
+ "description": "Share ID: \"shr_\" followed by a 26-character ULID."
4803
+ },
4804
+ "ShareListParams": {
4805
+ "type": "object",
4806
+ "properties": {
4807
+ "artifact": {
4808
+ "allOf": [
4809
+ {
4810
+ "$ref": "#/definitions/ArtifactRef"
4811
+ }
4812
+ ]
4813
+ },
4814
+ "all": {
4815
+ "type": "boolean"
4816
+ }
4817
+ }
4818
+ },
4819
+ "ShareListResult": {
4820
+ "type": "object",
4821
+ "properties": {
4822
+ "shares": {
4823
+ "readOnly": true,
4824
+ "type": "array",
4825
+ "items": {
4826
+ "$ref": "#/definitions/Share"
4827
+ }
4828
+ }
4829
+ },
4830
+ "required": [
4831
+ "shares"
4832
+ ],
4833
+ "description": "Shares with their links and state."
4834
+ },
4835
+ "ShareStartParams": {
4836
+ "type": "object",
4837
+ "properties": {
4838
+ "artifact": {
4839
+ "$ref": "#/definitions/ArtifactRef"
4840
+ },
4841
+ "via": {
4842
+ "$ref": "#/definitions/ShareVia"
4843
+ },
4844
+ "ttl": {
4845
+ "allOf": [
4846
+ {
4847
+ "$ref": "#/definitions/Duration"
4848
+ }
4849
+ ]
4850
+ },
4851
+ "scopes": {
4852
+ "readOnly": true,
4853
+ "minItems": 1,
4854
+ "type": "array",
4855
+ "items": {
4856
+ "$ref": "#/definitions/CapabilityScope"
4857
+ }
4858
+ },
4859
+ "viewer": {
4860
+ "allOf": [
4861
+ {
4862
+ "$ref": "#/definitions/ViewerSpec"
4863
+ }
4864
+ ]
4865
+ },
4866
+ "requestId": {
4867
+ "type": "string",
4868
+ "minLength": 1
4869
+ }
4870
+ },
4871
+ "required": [
4872
+ "artifact",
4873
+ "via"
4874
+ ]
4875
+ },
4876
+ "ShareStartResult": {
4877
+ "type": "object",
4878
+ "properties": {
4879
+ "shareId": {
4880
+ "$ref": "#/definitions/ShareId"
4881
+ },
4882
+ "artifactId": {
4883
+ "$ref": "#/definitions/ArtifactId"
4884
+ },
4885
+ "via": {
4886
+ "$ref": "#/definitions/ShareVia"
4887
+ },
4888
+ "url": {
4889
+ "type": "string",
4890
+ "minLength": 1
4891
+ },
4892
+ "hostname": {
4893
+ "type": "string",
4894
+ "minLength": 1
4895
+ },
4896
+ "artifactOrigin": {
4897
+ "type": "string",
4898
+ "minLength": 1
4899
+ },
4900
+ "mode": {
4901
+ "type": "string",
4902
+ "enum": [
4903
+ "cookie",
4904
+ "worker"
4905
+ ]
4906
+ },
4907
+ "tokenId": {
4908
+ "$ref": "#/definitions/TokenId"
4909
+ },
4910
+ "startedAt": {
4911
+ "type": "string",
4912
+ "format": "date-time",
4913
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
4914
+ },
4915
+ "expiresAt": {
4916
+ "type": "string",
4917
+ "format": "date-time",
4918
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
4919
+ },
4920
+ "state": {
4921
+ "type": "string",
4922
+ "enum": [
4923
+ "active",
4924
+ "stopped"
4925
+ ]
4926
+ },
4927
+ "stoppedAt": {
4928
+ "type": "string",
4929
+ "format": "date-time",
4930
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
4931
+ },
4932
+ "stopReason": {
4933
+ "type": "string",
4934
+ "minLength": 1
4935
+ }
4936
+ },
4937
+ "required": [
4938
+ "shareId",
4939
+ "artifactId",
4940
+ "via",
4941
+ "url",
4942
+ "hostname",
4943
+ "mode",
4944
+ "tokenId",
4945
+ "startedAt",
4946
+ "state"
4947
+ ],
4948
+ "description": "The share that started, with its capability URL."
4949
+ },
4950
+ "ShareStopParams": {
4951
+ "type": "object",
4952
+ "properties": {
4953
+ "shareId": {
4954
+ "allOf": [
4955
+ {
4956
+ "$ref": "#/definitions/ShareId"
4957
+ }
4958
+ ]
4959
+ },
4960
+ "artifact": {
4961
+ "allOf": [
4962
+ {
4963
+ "$ref": "#/definitions/ArtifactRef"
4964
+ }
4965
+ ]
4966
+ },
4967
+ "requestId": {
4968
+ "type": "string",
4969
+ "minLength": 1
4970
+ }
4971
+ }
4972
+ },
4973
+ "ShareStopResult": {
4974
+ "type": "object",
4975
+ "properties": {
4976
+ "stopped": {
4977
+ "readOnly": true,
4978
+ "type": "array",
4979
+ "items": {
4980
+ "$ref": "#/definitions/Share"
4981
+ }
4982
+ }
4983
+ },
4984
+ "required": [
4985
+ "stopped"
4986
+ ],
4987
+ "description": "The shares that ended."
4988
+ },
4989
+ "ShareVia": {
4990
+ "type": "string",
4991
+ "enum": [
4992
+ "tailnet",
4993
+ "funnel",
4994
+ "cloudflare"
4995
+ ],
4996
+ "description": "How a share reaches its viewers: tailnet, funnel or cloudflare."
4997
+ },
4494
4998
  "ShellSubmitRequest": {
4495
4999
  "type": "object",
4496
5000
  "properties": {
@@ -4673,6 +5177,37 @@
4673
5177
  ],
4674
5178
  "description": "Where a page stands: cursor, viewer, draft, artifact state and its submission."
4675
5179
  },
5180
+ "StreamTicket": {
5181
+ "type": "object",
5182
+ "properties": {
5183
+ "ticket": {
5184
+ "type": "string",
5185
+ "minLength": 1
5186
+ },
5187
+ "expiresAt": {
5188
+ "type": "string",
5189
+ "format": "date-time",
5190
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
5191
+ }
5192
+ },
5193
+ "required": [
5194
+ "ticket",
5195
+ "expiresAt"
5196
+ ],
5197
+ "description": "A single-use ticket for one stream, poll or WebSocket."
5198
+ },
5199
+ "StreamTicketRequest": {
5200
+ "type": "object",
5201
+ "properties": {
5202
+ "purpose": {
5203
+ "type": "string",
5204
+ "enum": [
5205
+ "stream",
5206
+ "socket"
5207
+ ]
5208
+ }
5209
+ }
5210
+ },
4676
5211
  "SubmissionEnvelope": {
4677
5212
  "type": "object",
4678
5213
  "properties": {