@mostra/protocol 0.1.0 → 0.3.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 (44) hide show
  1. package/dist/artifact.d.ts.map +1 -1
  2. package/dist/artifact.js +8 -3
  3. package/dist/artifact.js.map +1 -1
  4. package/dist/diagnostics/codes/env.d.ts +1 -1
  5. package/dist/diagnostics/codes/env.d.ts.map +1 -1
  6. package/dist/diagnostics/codes/env.js +12 -1
  7. package/dist/diagnostics/codes/env.js.map +1 -1
  8. package/dist/diagnostics/codes/host.d.ts +1 -1
  9. package/dist/diagnostics/codes/host.d.ts.map +1 -1
  10. package/dist/diagnostics/codes/host.js +12 -1
  11. package/dist/diagnostics/codes/host.js.map +1 -1
  12. package/dist/diagnostics/codes/platform.js +2 -2
  13. package/dist/diagnostics/codes/platform.js.map +1 -1
  14. package/dist/index.d.ts +4 -3
  15. package/dist/index.js +3 -2
  16. package/dist/method.d.ts +12 -0
  17. package/dist/method.d.ts.map +1 -1
  18. package/dist/method.js.map +1 -1
  19. package/dist/methods/artifact/create.d.ts.map +1 -1
  20. package/dist/methods/artifact/create.js +2 -1
  21. package/dist/methods/artifact/create.js.map +1 -1
  22. package/dist/methods/index.d.ts +3 -1
  23. package/dist/methods/index.d.ts.map +1 -1
  24. package/dist/methods/index.js +22 -4
  25. package/dist/methods/index.js.map +1 -1
  26. package/dist/methods/mostra/initialize.d.ts +1 -1
  27. package/dist/methods/mostra/initialize.js.map +1 -1
  28. package/dist/methods/port/identity-resolve.d.ts +36 -0
  29. package/dist/methods/port/identity-resolve.d.ts.map +1 -0
  30. package/dist/methods/port/identity-resolve.js +35 -0
  31. package/dist/methods/port/identity-resolve.js.map +1 -0
  32. package/package.json +3 -3
  33. package/schemas/protocol.draft-07.json +416 -3
  34. package/schemas/protocol.schema.json +416 -3
  35. package/src/artifact.ts +7 -2
  36. package/src/diagnostics/codes/env.ts +12 -0
  37. package/src/diagnostics/codes/host.ts +12 -0
  38. package/src/diagnostics/codes/platform.ts +2 -2
  39. package/src/index.ts +9 -1
  40. package/src/method.ts +14 -0
  41. package/src/methods/artifact/create.ts +2 -1
  42. package/src/methods/index.ts +13 -3
  43. package/src/methods/mostra/initialize.ts +1 -1
  44. package/src/methods/port/identity-resolve.ts +67 -0
@@ -4,6 +4,381 @@
4
4
  "x-mostra-revisions": {
5
5
  "host-protocol": "2026-10-10"
6
6
  },
7
+ "x-mostra-methods": {
8
+ "artifact/create": {
9
+ "direction": "client-to-instance",
10
+ "mutating": true,
11
+ "params": {
12
+ "$ref": "#/definitions/ArtifactCreateParams"
13
+ },
14
+ "result": {
15
+ "$ref": "#/definitions/ArtifactCreateResult"
16
+ }
17
+ },
18
+ "artifact/get": {
19
+ "direction": "client-to-instance",
20
+ "mutating": false,
21
+ "params": {
22
+ "$ref": "#/definitions/ArtifactGetParams"
23
+ },
24
+ "result": {
25
+ "$ref": "#/definitions/ArtifactDetail"
26
+ }
27
+ },
28
+ "artifact/list": {
29
+ "direction": "client-to-instance",
30
+ "mutating": false,
31
+ "params": {
32
+ "$ref": "#/definitions/ArtifactListParams"
33
+ },
34
+ "result": {
35
+ "$ref": "#/definitions/ArtifactListResult"
36
+ }
37
+ },
38
+ "artifact/publish": {
39
+ "direction": "client-to-instance",
40
+ "mutating": true,
41
+ "params": {
42
+ "$ref": "#/definitions/ArtifactPublishParams"
43
+ },
44
+ "result": {
45
+ "$ref": "#/definitions/PublishReceipt"
46
+ }
47
+ },
48
+ "artifact/verify": {
49
+ "direction": "client-to-instance",
50
+ "mutating": false,
51
+ "params": {
52
+ "$ref": "#/definitions/ArtifactVerifyParams"
53
+ },
54
+ "result": {
55
+ "$ref": "#/definitions/VerifyVerdict"
56
+ }
57
+ },
58
+ "deps/add": {
59
+ "direction": "client-to-instance",
60
+ "mutating": true,
61
+ "params": {
62
+ "$ref": "#/definitions/DepsAddParams"
63
+ },
64
+ "result": {
65
+ "$ref": "#/definitions/DepsAddResult"
66
+ }
67
+ },
68
+ "dev/start": {
69
+ "direction": "client-to-instance",
70
+ "mutating": true,
71
+ "params": {
72
+ "$ref": "#/definitions/DevStartParams"
73
+ },
74
+ "result": {
75
+ "$ref": "#/definitions/DevStartResult"
76
+ }
77
+ },
78
+ "dev/stop": {
79
+ "direction": "client-to-instance",
80
+ "mutating": true,
81
+ "params": {
82
+ "$ref": "#/definitions/DevStopParams"
83
+ },
84
+ "result": {
85
+ "$ref": "#/definitions/DevStopResult"
86
+ }
87
+ },
88
+ "events/ack": {
89
+ "direction": "client-to-instance",
90
+ "mutating": true,
91
+ "params": {
92
+ "$ref": "#/definitions/EventsAckParams"
93
+ },
94
+ "result": {
95
+ "$ref": "#/definitions/EventsAckResult"
96
+ }
97
+ },
98
+ "events/read": {
99
+ "direction": "client-to-instance",
100
+ "mutating": false,
101
+ "params": {
102
+ "$ref": "#/definitions/EventsReadParams"
103
+ },
104
+ "result": {
105
+ "$ref": "#/definitions/EventsReadResult"
106
+ }
107
+ },
108
+ "events/subscribe": {
109
+ "direction": "client-to-instance",
110
+ "mutating": false,
111
+ "params": {
112
+ "$ref": "#/definitions/EventsSubscribeParams"
113
+ },
114
+ "result": {
115
+ "$ref": "#/definitions/EventsSubscribeResult"
116
+ }
117
+ },
118
+ "events/unsubscribe": {
119
+ "direction": "client-to-instance",
120
+ "mutating": false,
121
+ "params": {
122
+ "$ref": "#/definitions/EventsUnsubscribeParams"
123
+ },
124
+ "result": {
125
+ "$ref": "#/definitions/EventsUnsubscribeResult"
126
+ }
127
+ },
128
+ "gc/run": {
129
+ "direction": "client-to-instance",
130
+ "mutating": true,
131
+ "params": {
132
+ "$ref": "#/definitions/GcRunParams"
133
+ },
134
+ "result": {
135
+ "$ref": "#/definitions/GcRunResult"
136
+ }
137
+ },
138
+ "instance/check": {
139
+ "direction": "client-to-instance",
140
+ "mutating": false,
141
+ "params": {
142
+ "$ref": "#/definitions/InstanceCheckParams"
143
+ },
144
+ "result": {
145
+ "$ref": "#/definitions/InstanceCheckResult"
146
+ }
147
+ },
148
+ "instance/status": {
149
+ "direction": "client-to-instance",
150
+ "mutating": false,
151
+ "params": {
152
+ "$ref": "#/definitions/InstanceStatusParams"
153
+ },
154
+ "result": {
155
+ "$ref": "#/definitions/InstanceStatusResult"
156
+ }
157
+ },
158
+ "live/push": {
159
+ "direction": "client-to-instance",
160
+ "mutating": true,
161
+ "params": {
162
+ "$ref": "#/definitions/LivePushParams"
163
+ },
164
+ "result": {
165
+ "$ref": "#/definitions/LivePushResult"
166
+ }
167
+ },
168
+ "mostra/initialize": {
169
+ "direction": "client-to-instance",
170
+ "mutating": false,
171
+ "params": {
172
+ "$ref": "#/definitions/MostraInitializeParams"
173
+ },
174
+ "result": {
175
+ "$ref": "#/definitions/MostraInitializeResult"
176
+ }
177
+ },
178
+ "mostra/shutdown": {
179
+ "direction": "client-to-instance",
180
+ "mutating": false,
181
+ "params": {
182
+ "$ref": "#/definitions/MostraShutdownParams"
183
+ },
184
+ "result": {
185
+ "$ref": "#/definitions/MostraShutdownResult"
186
+ }
187
+ },
188
+ "port/drafts.mirror": {
189
+ "direction": "instance-to-host",
190
+ "mutating": false,
191
+ "params": {
192
+ "$ref": "#/definitions/DraftMirror"
193
+ },
194
+ "result": {}
195
+ },
196
+ "port/identity.resolve": {
197
+ "direction": "instance-to-host",
198
+ "mutating": false,
199
+ "params": {
200
+ "$ref": "#/definitions/PortIdentityResolveParams"
201
+ },
202
+ "result": {
203
+ "$ref": "#/definitions/PortIdentityResolveResult"
204
+ }
205
+ },
206
+ "port/secrets.get": {
207
+ "direction": "instance-to-host",
208
+ "mutating": false,
209
+ "params": {
210
+ "$ref": "#/definitions/PortSecretsGetParams"
211
+ },
212
+ "result": {
213
+ "$ref": "#/definitions/PortSecretsGetResult"
214
+ }
215
+ },
216
+ "port/submissions.deliver": {
217
+ "direction": "instance-to-host",
218
+ "mutating": false,
219
+ "params": {
220
+ "$ref": "#/definitions/SubmissionEnvelope"
221
+ },
222
+ "result": {
223
+ "$ref": "#/definitions/PortSubmissionsDeliverResult"
224
+ }
225
+ },
226
+ "port/trustedControls.activated": {
227
+ "direction": "instance-to-host",
228
+ "mutating": false,
229
+ "params": {
230
+ "$ref": "#/definitions/PortTrustedControlsActivatedParams"
231
+ },
232
+ "result": {}
233
+ },
234
+ "port/trustedControls.policy": {
235
+ "direction": "instance-to-host",
236
+ "mutating": false,
237
+ "params": {
238
+ "$ref": "#/definitions/PortTrustedControlsPolicyParams"
239
+ },
240
+ "result": {
241
+ "$ref": "#/definitions/ControlsPolicy"
242
+ }
243
+ },
244
+ "results/get": {
245
+ "direction": "client-to-instance",
246
+ "mutating": false,
247
+ "params": {
248
+ "$ref": "#/definitions/ResultsGetParams"
249
+ },
250
+ "result": {
251
+ "$ref": "#/definitions/ResultsGetResult"
252
+ }
253
+ },
254
+ "secret/delete": {
255
+ "direction": "client-to-instance",
256
+ "mutating": false,
257
+ "params": {
258
+ "$ref": "#/definitions/SecretDeleteParams"
259
+ },
260
+ "result": {
261
+ "$ref": "#/definitions/SecretDeleteResult"
262
+ }
263
+ },
264
+ "secret/list": {
265
+ "direction": "client-to-instance",
266
+ "mutating": false,
267
+ "params": {
268
+ "$ref": "#/definitions/SecretListParams"
269
+ },
270
+ "result": {
271
+ "$ref": "#/definitions/SecretListResult"
272
+ }
273
+ },
274
+ "secret/set": {
275
+ "direction": "client-to-instance",
276
+ "mutating": false,
277
+ "params": {
278
+ "$ref": "#/definitions/SecretSetParams"
279
+ },
280
+ "result": {
281
+ "$ref": "#/definitions/SecretEntry"
282
+ }
283
+ },
284
+ "state/get": {
285
+ "direction": "client-to-instance",
286
+ "mutating": false,
287
+ "params": {
288
+ "$ref": "#/definitions/StateGetParams"
289
+ },
290
+ "result": {
291
+ "$ref": "#/definitions/StateGetResult"
292
+ }
293
+ },
294
+ "state/patch": {
295
+ "direction": "client-to-instance",
296
+ "mutating": true,
297
+ "params": {
298
+ "$ref": "#/definitions/StatePatchParams"
299
+ },
300
+ "result": {
301
+ "$ref": "#/definitions/MutationResult"
302
+ }
303
+ },
304
+ "view/default": {
305
+ "direction": "client-to-instance",
306
+ "mutating": true,
307
+ "params": {
308
+ "$ref": "#/definitions/ViewDefaultParams"
309
+ },
310
+ "result": {
311
+ "$ref": "#/definitions/CapabilityLink"
312
+ }
313
+ },
314
+ "view/launch": {
315
+ "direction": "client-to-instance",
316
+ "mutating": true,
317
+ "params": {
318
+ "$ref": "#/definitions/ViewLaunchParams"
319
+ },
320
+ "result": {
321
+ "$ref": "#/definitions/ViewLaunchResult"
322
+ }
323
+ },
324
+ "view/revoke": {
325
+ "direction": "client-to-instance",
326
+ "mutating": true,
327
+ "params": {
328
+ "$ref": "#/definitions/ViewRevokeParams"
329
+ },
330
+ "result": {
331
+ "$ref": "#/definitions/ViewRevokeResult"
332
+ }
333
+ },
334
+ "view/rotate": {
335
+ "direction": "client-to-instance",
336
+ "mutating": true,
337
+ "params": {
338
+ "$ref": "#/definitions/ViewRotateParams"
339
+ },
340
+ "result": {
341
+ "$ref": "#/definitions/CapabilityLink"
342
+ }
343
+ },
344
+ "view/url": {
345
+ "direction": "client-to-instance",
346
+ "mutating": true,
347
+ "params": {
348
+ "$ref": "#/definitions/ViewUrlParams"
349
+ },
350
+ "result": {
351
+ "$ref": "#/definitions/CapabilityLink"
352
+ }
353
+ },
354
+ "wait": {
355
+ "direction": "client-to-instance",
356
+ "mutating": false,
357
+ "params": {
358
+ "$ref": "#/definitions/WaitParams"
359
+ },
360
+ "result": {
361
+ "$ref": "#/definitions/WaitResult"
362
+ }
363
+ }
364
+ },
365
+ "x-mostra-notifications": {
366
+ "artifact/progress": {
367
+ "params": {
368
+ "$ref": "#/definitions/ArtifactProgressParams"
369
+ }
370
+ },
371
+ "dev/notify": {
372
+ "params": {
373
+ "$ref": "#/definitions/DevNotifyParams"
374
+ }
375
+ },
376
+ "events/notify": {
377
+ "params": {
378
+ "$ref": "#/definitions/EventsNotifyParams"
379
+ }
380
+ }
381
+ },
7
382
  "definitions": {
8
383
  "ActionError": {
9
384
  "type": "object",
@@ -74,7 +449,7 @@
74
449
  "properties": {
75
450
  "dir": {
76
451
  "type": "string",
77
- "pattern": "^\\/"
452
+ "pattern": "^(?:\\/|[A-Za-z]:[\\\\/]|\\\\\\\\[^\\\\])"
78
453
  },
79
454
  "template": {
80
455
  "type": "string",
@@ -524,7 +899,7 @@
524
899
  "properties": {
525
900
  "path": {
526
901
  "type": "string",
527
- "pattern": "^\\/"
902
+ "pattern": "^(?:\\/|[A-Za-z]:[\\\\/]|\\\\\\\\[^\\\\])"
528
903
  }
529
904
  },
530
905
  "required": [
@@ -2990,6 +3365,44 @@
2990
3365
  ],
2991
3366
  "description": "A long-poll answer: the cursor, the events after the asked one, and a snapshot."
2992
3367
  },
3368
+ "PortIdentityResolveParams": {
3369
+ "type": "object",
3370
+ "properties": {
3371
+ "artifactId": {
3372
+ "$ref": "#/definitions/ArtifactId"
3373
+ },
3374
+ "via": {
3375
+ "type": "string",
3376
+ "minLength": 1
3377
+ },
3378
+ "headers": {
3379
+ "type": "object",
3380
+ "propertyNames": {
3381
+ "type": "string"
3382
+ },
3383
+ "additionalProperties": {
3384
+ "type": "string"
3385
+ }
3386
+ }
3387
+ },
3388
+ "required": [
3389
+ "artifactId",
3390
+ "via",
3391
+ "headers"
3392
+ ],
3393
+ "description": "A browser opening a link without a viewer: the artifact, how the request arrived and its headers (no cookies, no Mostra headers)."
3394
+ },
3395
+ "PortIdentityResolveResult": {
3396
+ "anyOf": [
3397
+ {
3398
+ "$ref": "#/definitions/ViewerSpec"
3399
+ },
3400
+ {
3401
+ "type": "null"
3402
+ }
3403
+ ],
3404
+ "description": "The person the session acts for, by the host's stable key, or null for the default."
3405
+ },
2993
3406
  "PortName": {
2994
3407
  "type": "string",
2995
3408
  "pattern": "^[a-z][a-zA-Z0-9]*$",
@@ -4114,7 +4527,7 @@
4114
4527
  "properties": {
4115
4528
  "path": {
4116
4529
  "type": "string",
4117
- "pattern": "^\\/"
4530
+ "pattern": "^(?:\\/|[A-Za-z]:[\\\\/]|\\\\\\\\[^\\\\])"
4118
4531
  }
4119
4532
  },
4120
4533
  "required": [