@danceiny/gotry 0.0.1-rc.18 → 0.0.1-rc.20

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 (176) hide show
  1. package/README.md +42 -16
  2. package/README.zh-CN.md +37 -15
  3. package/bin/gotry-bootstrap.js +309 -30
  4. package/bin/gotry-inner.js +74 -23
  5. package/bin/gotry-runtime-resolution.d.ts +1 -1
  6. package/bin/gotry-runtime-resolution.js +7 -8
  7. package/cordis.gotry-patch.yml +22 -8
  8. package/data/stations-12306-verify.json +524 -0
  9. package/dist/capabilities/agent-reach.js +4 -4
  10. package/dist/capabilities/anything.js +62 -29
  11. package/dist/capabilities/channel-health.js +103 -0
  12. package/dist/capabilities/channel-registry.js +213 -0
  13. package/dist/capabilities/doctor.js +307 -0
  14. package/dist/capabilities/effect.js +178 -5
  15. package/dist/capabilities/flyai.js +13 -0
  16. package/dist/capabilities/hbcli.js +28 -2
  17. package/dist/capabilities/session/adapters/ctrip-hotel.js +207 -0
  18. package/dist/capabilities/session/adapters/rail-12306.js +285 -0
  19. package/dist/capabilities/session/extension-bridge.js +14 -1
  20. package/dist/capabilities/session/extension-channel.js +4 -2
  21. package/dist/capabilities/session/extension-distribution.js +1 -1
  22. package/dist/capabilities/session-search.js +311 -0
  23. package/dist/capabilities/visa-policy.js +126 -0
  24. package/dist/scripts/agent-planning-turn-deadline-e2e.js +305 -0
  25. package/dist/scripts/agent-planning-turn-deadline-tests.js +281 -0
  26. package/dist/scripts/anything-tests.js +70 -21
  27. package/dist/scripts/benchmark-environment-bridge-e2e.js +139 -37
  28. package/dist/scripts/benchmark-environment-bridge-tests.js +1099 -306
  29. package/dist/scripts/booking-copilot-availability-ledger-binding-tests.js +26 -26
  30. package/dist/scripts/{booking-copilot-availability-policy-v2-tests.js → booking-copilot-availability-policy-tests.js} +115 -115
  31. package/dist/scripts/booking-copilot-crossrepo-fixture-server.js +41 -1
  32. package/dist/scripts/booking-copilot-dsh-core-proof-tests.js +75 -120
  33. package/dist/scripts/booking-copilot-dsh-planner-proof-tests.js +370 -61
  34. package/dist/scripts/booking-copilot-dsh-plugin-proof-tests.js +2 -2
  35. package/dist/scripts/booking-copilot-event-sequence-concurrency-proof-tests.js +7 -3
  36. package/dist/scripts/booking-copilot-gap-code-contract-proof-tests.js +15 -9
  37. package/dist/scripts/booking-copilot-operation-ledger-concurrency-proof-tests.js +19 -11
  38. package/dist/scripts/booking-copilot-receipt-ledger-concurrency-proof-tests.js +16 -52
  39. package/dist/scripts/booking-copilot-runtime-proof-tests.js +3953 -155
  40. package/dist/scripts/booking-copilot-server-proof-tests.js +58 -23
  41. package/dist/scripts/booking-copilot-startup-proof-tests.js +10 -119
  42. package/dist/scripts/booking-surface-contract-proof-tests.js +1154 -326
  43. package/dist/scripts/bootstrap-tests.js +113 -2
  44. package/dist/scripts/build-metrics-report.js +339 -0
  45. package/dist/scripts/channel-probe-tests.js +148 -0
  46. package/dist/scripts/channel-probe.js +252 -0
  47. package/dist/scripts/channel-registry-tests.js +262 -0
  48. package/dist/scripts/doctor-tests.js +175 -0
  49. package/dist/scripts/effect-tests.js +274 -1
  50. package/dist/scripts/extension-tests.js +129 -11
  51. package/dist/scripts/fact-gate-tests.js +91 -2
  52. package/dist/scripts/flyai-tests.js +17 -1
  53. package/dist/scripts/hbcli-e2e-tests.js +1 -3
  54. package/dist/scripts/hbcli-tests.js +38 -1
  55. package/dist/scripts/metrics-report-tests.js +288 -0
  56. package/dist/scripts/persona-surface-guard-tests.js +19 -0
  57. package/dist/scripts/session-tests.js +401 -1
  58. package/dist/scripts/smoke.js +100 -83
  59. package/dist/scripts/turn-handoff-collect-tests.js +216 -0
  60. package/dist/scripts/turn-handoff-collect.js +189 -0
  61. package/dist/scripts/turn-policy-tests.js +56 -0
  62. package/dist/scripts/typed-contract-canary.js +261 -0
  63. package/dist/scripts/visa-policy-tests.js +75 -0
  64. package/dist/scripts/wish-channel-gate-tests.js +111 -0
  65. package/dist/src/artifact-gate.js +91 -3
  66. package/dist/src/benchmark-agent-conformance.js +39 -16
  67. package/dist/src/benchmark-environment-bridge.js +316 -52
  68. package/dist/src/bookable-facts.js +62 -3
  69. package/dist/src/booking-surface/{availability-policy-v2.js → availability-policy.js} +89 -89
  70. package/dist/src/booking-surface/canonical-schema.js +8 -22
  71. package/dist/src/booking-surface/contracts.js +70 -19
  72. package/dist/src/booking-surface/dsh-planner.js +310 -177
  73. package/dist/src/booking-surface/dsh-plugin.js +3 -3
  74. package/dist/src/booking-surface/index.js +1 -5
  75. package/dist/src/booking-surface/profile.js +1 -1
  76. package/dist/src/booking-surface/runtime.js +1682 -247
  77. package/dist/src/booking-surface/server.js +371 -185
  78. package/dist/src/booking-surface/startup.js +17 -27
  79. package/dist/src/booking-surface/validation.js +270 -760
  80. package/dist/src/index.js +739 -150
  81. package/dist/src/turn-deadline.js +292 -0
  82. package/dist/src/turn-policy.js +146 -0
  83. package/dist/src/wish-pool.js +5 -0
  84. package/extension/background.js +23 -4
  85. package/extension/content-main.js +47 -9
  86. package/extension/manifest.json +27 -9
  87. package/package.json +7 -26
  88. package/schemas/booking.surface.schema.json +2593 -0
  89. package/ts/capabilities/agent-reach.ts +4 -4
  90. package/ts/capabilities/anything.ts +89 -38
  91. package/ts/capabilities/flyai.ts +21 -3
  92. package/ts/capabilities/hbcli.ts +53 -4
  93. package/ts/capabilities/session/action-cache.ts +1 -1
  94. package/ts/capabilities/session/adapters/ctrip-hotel.ts +238 -0
  95. package/ts/capabilities/session/adapters/rail-12306.ts +293 -0
  96. package/ts/capabilities/session/extension-bridge.ts +32 -2
  97. package/ts/capabilities/session/extension-channel.ts +9 -8
  98. package/ts/capabilities/session/extension-distribution.ts +3 -1
  99. package/ts/capabilities/session/health-watch.ts +1 -1
  100. package/ts/capabilities/session/read-guard.ts +1 -1
  101. package/ts/capabilities/session/wizard.ts +1 -1
  102. package/ts/capabilities/session-search.ts +323 -1
  103. package/ts/dsh-runtime/vendor/README.md +60 -0
  104. package/ts/dsh-runtime/vendor/dsh-map-tools/LICENSE +21 -0
  105. package/ts/dsh-runtime/vendor/dsh-map-tools/README.en.md +200 -0
  106. package/ts/dsh-runtime/vendor/dsh-map-tools/README.md +202 -0
  107. package/ts/dsh-runtime/vendor/dsh-map-tools/client/client.js +216 -0
  108. package/ts/dsh-runtime/vendor/dsh-map-tools/cordis.patch.yml +5 -0
  109. package/ts/dsh-runtime/vendor/dsh-map-tools/lib/clients/amap.js +371 -0
  110. package/ts/dsh-runtime/vendor/dsh-map-tools/lib/clients/nominatim.js +63 -0
  111. package/ts/dsh-runtime/vendor/dsh-map-tools/lib/clients/osrm.js +56 -0
  112. package/ts/dsh-runtime/vendor/dsh-map-tools/lib/clients/photon.js +55 -0
  113. package/ts/dsh-runtime/vendor/dsh-map-tools/lib/config-file.js +87 -0
  114. package/ts/dsh-runtime/vendor/dsh-map-tools/lib/config-route.js +126 -0
  115. package/ts/dsh-runtime/vendor/dsh-map-tools/lib/config.js +16 -0
  116. package/ts/dsh-runtime/vendor/dsh-map-tools/lib/index.js +109 -0
  117. package/ts/dsh-runtime/vendor/dsh-map-tools/lib/settings-ns.js +27 -0
  118. package/ts/dsh-runtime/vendor/dsh-map-tools/lib/tools/geocode.js +127 -0
  119. package/ts/dsh-runtime/vendor/dsh-map-tools/lib/tools/poi.js +84 -0
  120. package/ts/dsh-runtime/vendor/dsh-map-tools/lib/tools/routes.js +170 -0
  121. package/ts/dsh-runtime/vendor/dsh-map-tools/lib/types/clients/amap.d.ts +53 -0
  122. package/ts/dsh-runtime/vendor/dsh-map-tools/lib/types/clients/nominatim.d.ts +17 -0
  123. package/ts/dsh-runtime/vendor/dsh-map-tools/lib/types/clients/osrm.d.ts +15 -0
  124. package/ts/dsh-runtime/vendor/dsh-map-tools/lib/types/clients/photon.d.ts +22 -0
  125. package/ts/dsh-runtime/vendor/dsh-map-tools/lib/types/config-file.d.ts +33 -0
  126. package/ts/dsh-runtime/vendor/dsh-map-tools/lib/types/config-route.d.ts +20 -0
  127. package/ts/dsh-runtime/vendor/dsh-map-tools/lib/types/config.d.ts +23 -0
  128. package/ts/dsh-runtime/vendor/dsh-map-tools/lib/types/index.d.ts +18 -0
  129. package/ts/dsh-runtime/vendor/dsh-map-tools/lib/types/settings-ns.d.ts +14 -0
  130. package/ts/dsh-runtime/vendor/dsh-map-tools/lib/types/tools/geocode.d.ts +11 -0
  131. package/ts/dsh-runtime/vendor/dsh-map-tools/lib/types/tools/poi.d.ts +9 -0
  132. package/ts/dsh-runtime/vendor/dsh-map-tools/lib/types/tools/routes.d.ts +16 -0
  133. package/ts/dsh-runtime/vendor/dsh-map-tools/lib/types/types.d.ts +55 -0
  134. package/ts/dsh-runtime/vendor/dsh-map-tools/lib/types.js +16 -0
  135. package/ts/dsh-runtime/vendor/dsh-map-tools/package.json +91 -0
  136. package/ts/package.json +9 -0
  137. package/ts/scripts/turn-handoff-collect.ts +178 -0
  138. package/ts/src/artifact-gate.ts +82 -2
  139. package/ts/src/benchmark-agent-conformance.ts +54 -15
  140. package/ts/src/benchmark-environment-bridge.ts +234 -46
  141. package/ts/src/bookable-facts.ts +109 -5
  142. package/ts/src/booking-saga.ts +1 -1
  143. package/ts/src/booking-surface/{availability-policy-v2.ts → availability-policy.ts} +124 -125
  144. package/ts/src/booking-surface/canonical-schema.js +8 -22
  145. package/ts/src/booking-surface/contracts.ts +278 -239
  146. package/ts/src/booking-surface/dsh-planner.ts +333 -194
  147. package/ts/src/booking-surface/dsh-plugin.js +3 -3
  148. package/ts/src/booking-surface/index.ts +1 -5
  149. package/ts/src/booking-surface/profile.ts +11 -11
  150. package/ts/src/booking-surface/runtime.ts +1351 -351
  151. package/ts/src/booking-surface/server.ts +282 -175
  152. package/ts/src/booking-surface/startup.ts +36 -48
  153. package/ts/src/booking-surface/validation.ts +194 -442
  154. package/ts/src/contracts.ts +1 -1
  155. package/ts/src/index.ts +492 -172
  156. package/ts/src/loop.ts +1 -1
  157. package/ts/src/state-ledger.ts +1 -1
  158. package/ts/src/turn-deadline.ts +365 -0
  159. package/ts/src/turn-policy.ts +154 -0
  160. package/ts/src/wish-pool.ts +17 -4
  161. package/dist/scripts/agent-planning-budget-e2e.js +0 -227
  162. package/dist/scripts/agent-planning-budget-tests.js +0 -173
  163. package/dist/scripts/booking-copilot-v2-runtime-proof-tests.js +0 -3935
  164. package/dist/scripts/booking-surface-v2-contract-proof-tests.js +0 -1174
  165. package/dist/src/booking-surface/contracts-v2.js +0 -89
  166. package/dist/src/booking-surface/runtime-v2.js +0 -1771
  167. package/dist/src/booking-surface/server-v2.js +0 -334
  168. package/dist/src/booking-surface/validation-v2.js +0 -319
  169. package/dist/src/tool-budget.js +0 -136
  170. package/schemas/booking.surface.v1.schema.json +0 -927
  171. package/schemas/booking.surface.v2.schema.json +0 -61
  172. package/ts/src/booking-surface/contracts-v2.ts +0 -118
  173. package/ts/src/booking-surface/runtime-v2.ts +0 -1466
  174. package/ts/src/booking-surface/server-v2.ts +0 -247
  175. package/ts/src/booking-surface/validation-v2.ts +0 -205
  176. package/ts/src/tool-budget.ts +0 -165
@@ -1,927 +0,0 @@
1
- {
2
- "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://gotry.dev/schemas/booking.surface.v1.schema.json",
4
- "title": "GoTry Booking Surface v1",
5
- "description": "Canonical typed contract for an embedded, read-side Booking Copilot. Text is explanatory only; executable operations are BookingReadActionV1 data objects.",
6
- "oneOf": [
7
- { "$ref": "#/$defs/BookingWorkspaceSnapshotV1" },
8
- { "$ref": "#/$defs/BookingReadActionV1" },
9
- { "$ref": "#/$defs/ActionReceiptV1" },
10
- { "$ref": "#/$defs/BookingCopilotIngressTurnV1" },
11
- { "$ref": "#/$defs/BookingCopilotTurnV1" },
12
- { "$ref": "#/$defs/BookingSurfaceEventV1" }
13
- ],
14
- "$defs": {
15
- "NonEmptyString": {
16
- "type": "string",
17
- "minLength": 1,
18
- "maxLength": 4096
19
- },
20
- "OpaqueRef": {
21
- "type": "string",
22
- "minLength": 1,
23
- "maxLength": 512
24
- },
25
- "Revision": {
26
- "type": "integer",
27
- "minimum": 0
28
- },
29
- "SchemaVersion": {
30
- "const": "booking.surface.v1"
31
- },
32
- "BookingSurfaceV1": {
33
- "enum": ["tenant", "customer_portal", "storefront", "payment_link"]
34
- },
35
- "BookingReadActionKindV1": {
36
- "enum": [
37
- "search.patch",
38
- "search.run",
39
- "results.view.patch",
40
- "hotel.focus",
41
- "hotel.select",
42
- "offers.query",
43
- "offers.view.patch",
44
- "offers.compare",
45
- "offer.select",
46
- "offer.check",
47
- "checkout.prepare",
48
- "order.observe"
49
- ]
50
- },
51
- "ActionReceiptStatusV1": {
52
- "enum": [
53
- "applied",
54
- "needs_input",
55
- "partial",
56
- "no_match",
57
- "unavailable",
58
- "changed",
59
- "stale",
60
- "unsupported",
61
- "failed"
62
- ]
63
- },
64
- "MoneyV1": {
65
- "type": "object",
66
- "required": ["amount", "currency", "sourceFactRef"],
67
- "properties": {
68
- "amount": { "type": "string", "pattern": "^-?[0-9]+(?:\\.[0-9]+)?$", "maxLength": 64 },
69
- "currency": { "type": "string", "pattern": "^[A-Z]{3}$" },
70
- "sourceFactRef": { "$ref": "#/$defs/OpaqueRef" }
71
- },
72
- "additionalProperties": false
73
- },
74
- "OccupancyRoomV1": {
75
- "type": "object",
76
- "required": ["adults", "childAges"],
77
- "properties": {
78
- "adults": { "type": "integer", "minimum": 1, "maximum": 20 },
79
- "childAges": {
80
- "type": "array",
81
- "maxItems": 20,
82
- "items": { "type": "integer", "minimum": 0, "maximum": 17 }
83
- }
84
- },
85
- "additionalProperties": false
86
- },
87
- "StringArrayCriterion": {
88
- "type": "object",
89
- "required": ["strength", "value"],
90
- "properties": {
91
- "strength": { "enum": ["must", "prefer"] },
92
- "value": {
93
- "type": "array",
94
- "minItems": 1,
95
- "maxItems": 100,
96
- "uniqueItems": true,
97
- "items": { "$ref": "#/$defs/NonEmptyString" }
98
- }
99
- },
100
- "additionalProperties": false
101
- },
102
- "BooleanCriterion": {
103
- "type": "object",
104
- "required": ["strength", "value"],
105
- "properties": {
106
- "strength": { "enum": ["must", "prefer"] },
107
- "value": { "type": "boolean" }
108
- },
109
- "additionalProperties": false
110
- },
111
- "StringCriterion": {
112
- "type": "object",
113
- "required": ["strength", "value"],
114
- "properties": {
115
- "strength": { "enum": ["must", "prefer"] },
116
- "value": { "$ref": "#/$defs/NonEmptyString" }
117
- },
118
- "additionalProperties": false
119
- },
120
- "IntegerCriterion": {
121
- "type": "object",
122
- "required": ["strength", "value"],
123
- "properties": {
124
- "strength": { "enum": ["must", "prefer"] },
125
- "value": { "type": "integer", "minimum": 0 }
126
- },
127
- "additionalProperties": false
128
- },
129
- "MoneyCriterion": {
130
- "type": "object",
131
- "required": ["strength", "value"],
132
- "properties": {
133
- "strength": { "enum": ["must", "prefer"] },
134
- "value": { "$ref": "#/$defs/MoneyV1" }
135
- },
136
- "additionalProperties": false
137
- },
138
- "SearchCriteriaPatchV1": {
139
- "type": "object",
140
- "minProperties": 1,
141
- "properties": {
142
- "destination": {
143
- "type": "object",
144
- "minProperties": 1,
145
- "properties": {
146
- "query": { "$ref": "#/$defs/NonEmptyString" },
147
- "placeRef": { "$ref": "#/$defs/OpaqueRef" }
148
- },
149
- "additionalProperties": false
150
- },
151
- "hotel": {
152
- "type": "object",
153
- "required": ["strength", "value"],
154
- "properties": {
155
- "strength": { "enum": ["must", "prefer"] },
156
- "value": {
157
- "type": "object",
158
- "minProperties": 1,
159
- "properties": {
160
- "name": { "$ref": "#/$defs/NonEmptyString" },
161
- "hotelRef": { "$ref": "#/$defs/OpaqueRef" }
162
- },
163
- "additionalProperties": false
164
- }
165
- },
166
- "additionalProperties": false
167
- },
168
- "stay": {
169
- "type": "object",
170
- "minProperties": 1,
171
- "properties": {
172
- "checkIn": { "type": "string", "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$" },
173
- "checkOut": { "type": "string", "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$" }
174
- },
175
- "additionalProperties": false
176
- },
177
- "occupancy": {
178
- "type": "object",
179
- "required": ["rooms"],
180
- "properties": {
181
- "rooms": {
182
- "type": "array",
183
- "minItems": 1,
184
- "maxItems": 20,
185
- "items": { "$ref": "#/$defs/OccupancyRoomV1" }
186
- }
187
- },
188
- "additionalProperties": false
189
- },
190
- "budget": {
191
- "type": "object",
192
- "required": ["strength", "value"],
193
- "properties": {
194
- "strength": { "enum": ["must", "prefer"] },
195
- "value": {
196
- "type": "object",
197
- "minProperties": 1,
198
- "properties": {
199
- "min": { "$ref": "#/$defs/MoneyV1" },
200
- "max": { "$ref": "#/$defs/MoneyV1" }
201
- },
202
- "additionalProperties": false
203
- }
204
- },
205
- "additionalProperties": false
206
- },
207
- "starRating": {
208
- "type": "object",
209
- "required": ["strength", "value"],
210
- "properties": {
211
- "strength": { "enum": ["must", "prefer"] },
212
- "value": {
213
- "type": "object",
214
- "minProperties": 1,
215
- "properties": {
216
- "min": { "type": "number", "minimum": 0, "maximum": 5 },
217
- "max": { "type": "number", "minimum": 0, "maximum": 5 }
218
- },
219
- "additionalProperties": false
220
- }
221
- },
222
- "additionalProperties": false
223
- },
224
- "guestRating": {
225
- "type": "object",
226
- "required": ["strength", "value"],
227
- "properties": {
228
- "strength": { "enum": ["must", "prefer"] },
229
- "value": {
230
- "type": "object",
231
- "required": ["min"],
232
- "properties": { "min": { "type": "number", "minimum": 0, "maximum": 10 } },
233
- "additionalProperties": false
234
- }
235
- },
236
- "additionalProperties": false
237
- },
238
- "facilities": {
239
- "type": "object",
240
- "required": ["strength", "value"],
241
- "properties": {
242
- "strength": { "enum": ["must", "prefer"] },
243
- "value": {
244
- "type": "object",
245
- "required": ["allOf"],
246
- "properties": {
247
- "allOf": {
248
- "type": "array",
249
- "minItems": 1,
250
- "maxItems": 100,
251
- "uniqueItems": true,
252
- "items": { "$ref": "#/$defs/NonEmptyString" }
253
- }
254
- },
255
- "additionalProperties": false
256
- }
257
- },
258
- "additionalProperties": false
259
- },
260
- "distance": {
261
- "type": "object",
262
- "required": ["strength", "value"],
263
- "properties": {
264
- "strength": { "enum": ["must", "prefer"] },
265
- "value": {
266
- "type": "object",
267
- "required": ["maxKm"],
268
- "properties": {
269
- "anchorLabel": { "$ref": "#/$defs/NonEmptyString" },
270
- "anchorRef": { "$ref": "#/$defs/OpaqueRef" },
271
- "maxKm": { "type": "number", "exclusiveMinimum": 0, "maximum": 50000 }
272
- },
273
- "additionalProperties": false
274
- }
275
- },
276
- "additionalProperties": false
277
- }
278
- },
279
- "additionalProperties": false
280
- },
281
- "ResultsViewPatchV1": {
282
- "type": "object",
283
- "minProperties": 1,
284
- "properties": {
285
- "starRating": {
286
- "type": ["object", "null"],
287
- "properties": {
288
- "min": { "type": "number", "minimum": 0, "maximum": 5 },
289
- "max": { "type": "number", "minimum": 0, "maximum": 5 }
290
- },
291
- "additionalProperties": false
292
- },
293
- "guestRatingMin": { "type": ["number", "null"], "minimum": 0, "maximum": 10 },
294
- "facilitiesAllOf": {
295
- "type": ["array", "null"],
296
- "items": { "$ref": "#/$defs/NonEmptyString" },
297
- "uniqueItems": true,
298
- "maxItems": 100
299
- },
300
- "distance": {
301
- "type": ["object", "null"],
302
- "required": ["anchorRef", "maxKm"],
303
- "properties": {
304
- "anchorRef": { "$ref": "#/$defs/OpaqueRef" },
305
- "maxKm": { "type": "number", "exclusiveMinimum": 0, "maximum": 50000 }
306
- },
307
- "additionalProperties": false
308
- },
309
- "price": {
310
- "type": ["object", "null"],
311
- "properties": {
312
- "min": { "$ref": "#/$defs/MoneyV1" },
313
- "max": { "$ref": "#/$defs/MoneyV1" }
314
- },
315
- "additionalProperties": false
316
- },
317
- "sort": { "enum": ["recommended", "price_asc", "price_desc", "rating_desc", "distance_asc"] }
318
- },
319
- "additionalProperties": false
320
- },
321
- "OfferCriteriaV1": {
322
- "type": "object",
323
- "properties": {
324
- "roomType": { "$ref": "#/$defs/StringArrayCriterion" },
325
- "bedType": { "$ref": "#/$defs/StringArrayCriterion" },
326
- "meals": { "$ref": "#/$defs/StringArrayCriterion" },
327
- "freeCancellation": { "$ref": "#/$defs/BooleanCriterion" },
328
- "freeCancellationUntil": { "$ref": "#/$defs/StringCriterion" },
329
- "totalPriceMax": { "$ref": "#/$defs/MoneyCriterion" },
330
- "roomsAvailableMin": { "$ref": "#/$defs/IntegerCriterion" },
331
- "payAtProperty": { "$ref": "#/$defs/BooleanCriterion" },
332
- "mobileRate": { "$ref": "#/$defs/BooleanCriterion" },
333
- "targetCount": { "type": "integer", "minimum": 1, "maximum": 50 },
334
- "sort": { "enum": ["best_match", "total_price_asc", "cancellation_latest"] }
335
- },
336
- "additionalProperties": false
337
- },
338
- "SurfaceCapabilitiesV1": {
339
- "type": "object",
340
- "required": ["surface", "allowedActions"],
341
- "properties": {
342
- "surface": { "$ref": "#/$defs/BookingSurfaceV1" },
343
- "allowedActions": {
344
- "type": "array",
345
- "uniqueItems": true,
346
- "maxItems": 12,
347
- "items": { "$ref": "#/$defs/BookingReadActionKindV1" }
348
- }
349
- },
350
- "additionalProperties": false
351
- },
352
- "SearchDraftSnapshotV1": {
353
- "type": "object",
354
- "properties": {
355
- "destination": {
356
- "type": "object",
357
- "properties": {
358
- "query": { "$ref": "#/$defs/NonEmptyString" },
359
- "placeRef": { "$ref": "#/$defs/OpaqueRef" }
360
- },
361
- "additionalProperties": false
362
- },
363
- "stay": {
364
- "type": "object",
365
- "properties": {
366
- "checkIn": { "type": "string", "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$" },
367
- "checkOut": { "type": "string", "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$" }
368
- },
369
- "additionalProperties": false
370
- },
371
- "occupancy": {
372
- "type": "object",
373
- "required": ["rooms"],
374
- "properties": {
375
- "rooms": { "type": "array", "items": { "$ref": "#/$defs/OccupancyRoomV1" }, "maxItems": 20 }
376
- },
377
- "additionalProperties": false
378
- },
379
- "criteria": { "$ref": "#/$defs/SearchCriteriaPatchV1" }
380
- },
381
- "additionalProperties": false
382
- },
383
- "ResultViewSnapshotV1": {
384
- "type": "object",
385
- "required": ["status"],
386
- "properties": {
387
- "status": { "enum": ["idle", "loading", "ready", "partial", "failed"] },
388
- "filters": { "$ref": "#/$defs/ResultsViewPatchV1" },
389
- "sort": { "enum": ["recommended", "price_asc", "price_desc", "rating_desc", "distance_asc"] },
390
- "resultCount": { "type": "integer", "minimum": 0 },
391
- "searchSessionRef": { "$ref": "#/$defs/OpaqueRef" }
392
- },
393
- "additionalProperties": false
394
- },
395
- "VisibleHotelFactV1": {
396
- "type": "object",
397
- "required": ["hotelRef", "name", "factRefs"],
398
- "properties": {
399
- "hotelRef": { "$ref": "#/$defs/OpaqueRef" },
400
- "name": { "$ref": "#/$defs/NonEmptyString" },
401
- "starRating": { "type": "number", "minimum": 0, "maximum": 5 },
402
- "guestRating": { "type": "number", "minimum": 0, "maximum": 10 },
403
- "distanceKm": { "type": "number", "minimum": 0 },
404
- "facilityCodes": { "type": "array", "uniqueItems": true, "items": { "$ref": "#/$defs/NonEmptyString" } },
405
- "factRefs": { "type": "array", "items": { "$ref": "#/$defs/OpaqueRef" } }
406
- },
407
- "additionalProperties": false
408
- },
409
- "LoadedOfferFactV1": {
410
- "type": "object",
411
- "required": ["offerRef", "hotelRef", "evidenceLevel", "factRefs"],
412
- "properties": {
413
- "offerRef": { "$ref": "#/$defs/OpaqueRef" },
414
- "hotelRef": { "$ref": "#/$defs/OpaqueRef" },
415
- "evidenceLevel": { "enum": ["listed", "rate_loaded", "checked"] },
416
- "factRefs": { "type": "array", "items": { "$ref": "#/$defs/OpaqueRef" } }
417
- },
418
- "additionalProperties": false
419
- },
420
- "BookingWorkspaceSnapshotV1": {
421
- "type": "object",
422
- "required": [
423
- "schemaVersion",
424
- "contextRef",
425
- "surface",
426
- "revision",
427
- "locale",
428
- "currency",
429
- "searchDraft",
430
- "results",
431
- "visibleHotels",
432
- "loadedOffers",
433
- "shortlistedOfferRefs",
434
- "capabilities"
435
- ],
436
- "properties": {
437
- "schemaVersion": { "$ref": "#/$defs/SchemaVersion" },
438
- "contextRef": { "$ref": "#/$defs/OpaqueRef" },
439
- "surface": { "$ref": "#/$defs/BookingSurfaceV1" },
440
- "revision": { "$ref": "#/$defs/Revision" },
441
- "locale": { "type": "string", "minLength": 2, "maxLength": 64 },
442
- "currency": { "type": "string", "pattern": "^[A-Z]{3}$" },
443
- "searchDraft": { "$ref": "#/$defs/SearchDraftSnapshotV1" },
444
- "results": { "$ref": "#/$defs/ResultViewSnapshotV1" },
445
- "visibleHotels": { "type": "array", "maxItems": 500, "items": { "$ref": "#/$defs/VisibleHotelFactV1" } },
446
- "loadedOffers": { "type": "array", "maxItems": 2000, "items": { "$ref": "#/$defs/LoadedOfferFactV1" } },
447
- "focusedHotelRef": { "$ref": "#/$defs/OpaqueRef" },
448
- "shortlistedOfferRefs": { "type": "array", "maxItems": 50, "uniqueItems": true, "items": { "$ref": "#/$defs/OpaqueRef" } },
449
- "selectedOfferRef": { "$ref": "#/$defs/OpaqueRef" },
450
- "verifiedOfferRef": { "$ref": "#/$defs/OpaqueRef" },
451
- "capabilities": { "$ref": "#/$defs/SurfaceCapabilitiesV1" }
452
- },
453
- "additionalProperties": false
454
- },
455
- "BookingWorkspaceIngressSnapshotV1": {
456
- "type": "object",
457
- "required": [
458
- "schemaVersion",
459
- "revision",
460
- "locale",
461
- "currency",
462
- "searchDraft",
463
- "results",
464
- "visibleHotels",
465
- "loadedOffers",
466
- "shortlistedOfferRefs"
467
- ],
468
- "properties": {
469
- "schemaVersion": { "$ref": "#/$defs/SchemaVersion" },
470
- "revision": { "$ref": "#/$defs/Revision" },
471
- "locale": { "type": "string", "minLength": 2, "maxLength": 64 },
472
- "currency": { "type": "string", "pattern": "^[A-Z]{3}$" },
473
- "searchDraft": { "$ref": "#/$defs/SearchDraftSnapshotV1" },
474
- "results": { "$ref": "#/$defs/ResultViewSnapshotV1" },
475
- "visibleHotels": { "type": "array", "maxItems": 500, "items": { "$ref": "#/$defs/VisibleHotelFactV1" } },
476
- "loadedOffers": { "type": "array", "maxItems": 2000, "items": { "$ref": "#/$defs/LoadedOfferFactV1" } },
477
- "focusedHotelRef": { "$ref": "#/$defs/OpaqueRef" },
478
- "shortlistedOfferRefs": { "type": "array", "maxItems": 50, "uniqueItems": true, "items": { "$ref": "#/$defs/OpaqueRef" } },
479
- "selectedOfferRef": { "$ref": "#/$defs/OpaqueRef" },
480
- "verifiedOfferRef": { "$ref": "#/$defs/OpaqueRef" }
481
- },
482
- "additionalProperties": false
483
- },
484
- "SearchRunInputV1": {
485
- "type": "object",
486
- "maxProperties": 0,
487
- "additionalProperties": false
488
- },
489
- "SearchPatchInputV1": {
490
- "type": "object",
491
- "required": ["patch"],
492
- "properties": { "patch": { "$ref": "#/$defs/SearchCriteriaPatchV1" } },
493
- "additionalProperties": false
494
- },
495
- "ResultsViewPatchInputV1": {
496
- "type": "object",
497
- "required": ["patch"],
498
- "properties": { "patch": { "$ref": "#/$defs/ResultsViewPatchV1" } },
499
- "additionalProperties": false
500
- },
501
- "HotelFocusInputV1": {
502
- "type": "object",
503
- "required": ["hotelRef"],
504
- "properties": { "hotelRef": { "$ref": "#/$defs/OpaqueRef" } },
505
- "additionalProperties": false
506
- },
507
- "HotelSelectInputV1": {
508
- "type": "object",
509
- "required": ["hotelRef"],
510
- "properties": { "hotelRef": { "$ref": "#/$defs/OpaqueRef" } },
511
- "additionalProperties": false
512
- },
513
- "OffersQueryInputV1": {
514
- "type": "object",
515
- "required": ["hotelRefs", "criteria"],
516
- "properties": {
517
- "hotelRefs": { "type": "array", "minItems": 1, "maxItems": 100, "uniqueItems": true, "items": { "$ref": "#/$defs/OpaqueRef" } },
518
- "criteria": { "$ref": "#/$defs/OfferCriteriaV1" }
519
- },
520
- "additionalProperties": false
521
- },
522
- "OffersViewPatchInputV1": {
523
- "type": "object",
524
- "required": ["hotelRef", "criteria"],
525
- "properties": {
526
- "hotelRef": { "$ref": "#/$defs/OpaqueRef" },
527
- "criteria": { "$ref": "#/$defs/OfferCriteriaV1" }
528
- },
529
- "additionalProperties": false
530
- },
531
- "OffersCompareInputV1": {
532
- "type": "object",
533
- "required": ["offerRefs", "requestedCount"],
534
- "properties": {
535
- "offerRefs": { "type": "array", "minItems": 1, "maxItems": 50, "uniqueItems": true, "items": { "$ref": "#/$defs/OpaqueRef" } },
536
- "requestedCount": { "type": "integer", "minimum": 1, "maximum": 50 }
537
- },
538
- "additionalProperties": false
539
- },
540
- "OfferRefInputV1": {
541
- "type": "object",
542
- "required": ["offerRef"],
543
- "properties": { "offerRef": { "$ref": "#/$defs/OpaqueRef" } },
544
- "additionalProperties": false
545
- },
546
- "CheckoutPrepareInputV1": {
547
- "type": "object",
548
- "required": ["offerRef", "verifiedOfferRef"],
549
- "properties": {
550
- "offerRef": { "$ref": "#/$defs/OpaqueRef" },
551
- "verifiedOfferRef": { "$ref": "#/$defs/OpaqueRef" }
552
- },
553
- "additionalProperties": false
554
- },
555
- "OrderObserveInputV1": {
556
- "type": "object",
557
- "required": ["orderRef"],
558
- "properties": { "orderRef": { "$ref": "#/$defs/OpaqueRef" } },
559
- "additionalProperties": false
560
- },
561
- "BookingReadActionV1": {
562
- "type": "object",
563
- "required": ["schemaVersion", "kind", "actionId", "contextRef", "expectedRevision", "reason", "factRefs", "input"],
564
- "properties": {
565
- "schemaVersion": { "$ref": "#/$defs/SchemaVersion" },
566
- "kind": { "$ref": "#/$defs/BookingReadActionKindV1" },
567
- "actionId": { "$ref": "#/$defs/OpaqueRef" },
568
- "contextRef": { "$ref": "#/$defs/OpaqueRef" },
569
- "expectedRevision": { "$ref": "#/$defs/Revision" },
570
- "reason": { "$ref": "#/$defs/NonEmptyString" },
571
- "factRefs": { "type": "array", "maxItems": 200, "uniqueItems": true, "items": { "$ref": "#/$defs/OpaqueRef" } },
572
- "input": { "type": "object" }
573
- },
574
- "additionalProperties": false,
575
- "allOf": [
576
- { "if": { "properties": { "kind": { "const": "search.patch" } }, "required": ["kind"] }, "then": { "properties": { "input": { "$ref": "#/$defs/SearchPatchInputV1" } } } },
577
- { "if": { "properties": { "kind": { "const": "search.run" } }, "required": ["kind"] }, "then": { "properties": { "input": { "$ref": "#/$defs/SearchRunInputV1" } } } },
578
- { "if": { "properties": { "kind": { "const": "results.view.patch" } }, "required": ["kind"] }, "then": { "properties": { "input": { "$ref": "#/$defs/ResultsViewPatchInputV1" } } } },
579
- { "if": { "properties": { "kind": { "const": "hotel.focus" } }, "required": ["kind"] }, "then": { "properties": { "input": { "$ref": "#/$defs/HotelFocusInputV1" } } } },
580
- { "if": { "properties": { "kind": { "const": "hotel.select" } }, "required": ["kind"] }, "then": { "properties": { "input": { "$ref": "#/$defs/HotelSelectInputV1" } } } },
581
- { "if": { "properties": { "kind": { "const": "offers.query" } }, "required": ["kind"] }, "then": { "properties": { "input": { "$ref": "#/$defs/OffersQueryInputV1" } } } },
582
- { "if": { "properties": { "kind": { "const": "offers.view.patch" } }, "required": ["kind"] }, "then": { "properties": { "input": { "$ref": "#/$defs/OffersViewPatchInputV1" } } } },
583
- { "if": { "properties": { "kind": { "const": "offers.compare" } }, "required": ["kind"] }, "then": { "properties": { "input": { "$ref": "#/$defs/OffersCompareInputV1" } } } },
584
- { "if": { "properties": { "kind": { "const": "offer.select" } }, "required": ["kind"] }, "then": { "properties": { "input": { "$ref": "#/$defs/OfferRefInputV1" } } } },
585
- { "if": { "properties": { "kind": { "const": "offer.check" } }, "required": ["kind"] }, "then": { "properties": { "input": { "$ref": "#/$defs/OfferRefInputV1" } } } },
586
- { "if": { "properties": { "kind": { "const": "checkout.prepare" } }, "required": ["kind"] }, "then": { "properties": { "input": { "$ref": "#/$defs/CheckoutPrepareInputV1" } } } },
587
- { "if": { "properties": { "kind": { "const": "order.observe" } }, "required": ["kind"] }, "then": { "properties": { "input": { "$ref": "#/$defs/OrderObserveInputV1" } } } }
588
- ]
589
- },
590
- "ActionObservationV1": {
591
- "oneOf": [
592
- {
593
- "type": "object",
594
- "required": ["kind"],
595
- "properties": {
596
- "kind": { "const": "search.state" },
597
- "searchSessionRef": { "$ref": "#/$defs/OpaqueRef" },
598
- "resultCount": { "type": "integer", "minimum": 0 }
599
- },
600
- "additionalProperties": false
601
- },
602
- {
603
- "type": "object",
604
- "required": ["kind", "hotelRef"],
605
- "properties": {
606
- "kind": { "const": "hotel.selection" },
607
- "hotelRef": { "$ref": "#/$defs/OpaqueRef" }
608
- },
609
- "additionalProperties": false
610
- },
611
- {
612
- "type": "object",
613
- "required": ["kind", "matchedHotelRefs", "visibleCount"],
614
- "properties": {
615
- "kind": { "const": "results.state" },
616
- "matchedHotelRefs": { "type": "array", "items": { "$ref": "#/$defs/OpaqueRef" } },
617
- "visibleCount": { "type": "integer", "minimum": 0 }
618
- },
619
- "additionalProperties": false
620
- },
621
- {
622
- "type": "object",
623
- "required": ["kind", "hotelRef"],
624
- "properties": {
625
- "kind": { "const": "hotel.focus" },
626
- "hotelRef": { "$ref": "#/$defs/OpaqueRef" }
627
- },
628
- "additionalProperties": false
629
- },
630
- {
631
- "type": "object",
632
- "required": ["kind", "hotelRefs", "offerRefs", "loadedHotelCount"],
633
- "properties": {
634
- "kind": { "const": "offers.state" },
635
- "hotelRefs": { "type": "array", "items": { "$ref": "#/$defs/OpaqueRef" } },
636
- "offerRefs": { "type": "array", "items": { "$ref": "#/$defs/OpaqueRef" } },
637
- "loadedHotelCount": { "type": "integer", "minimum": 0 }
638
- },
639
- "additionalProperties": false
640
- },
641
- {
642
- "type": "object",
643
- "required": ["kind", "offerRef"],
644
- "properties": {
645
- "kind": { "const": "offer.selection" },
646
- "offerRef": { "$ref": "#/$defs/OpaqueRef" }
647
- },
648
- "additionalProperties": false
649
- },
650
- {
651
- "type": "object",
652
- "required": ["kind", "offerRef", "available", "changedFactRefs"],
653
- "properties": {
654
- "kind": { "const": "offer.availability" },
655
- "offerRef": { "$ref": "#/$defs/OpaqueRef" },
656
- "verifiedOfferRef": { "$ref": "#/$defs/OpaqueRef" },
657
- "available": { "type": "boolean" },
658
- "changedFactRefs": { "type": "array", "items": { "$ref": "#/$defs/OpaqueRef" } }
659
- },
660
- "additionalProperties": false
661
- },
662
- {
663
- "type": "object",
664
- "required": ["kind", "offerRef", "verifiedOfferRef", "handoffRef"],
665
- "properties": {
666
- "kind": { "const": "checkout.handoff" },
667
- "offerRef": { "$ref": "#/$defs/OpaqueRef" },
668
- "verifiedOfferRef": { "$ref": "#/$defs/OpaqueRef" },
669
- "handoffRef": { "$ref": "#/$defs/OpaqueRef" }
670
- },
671
- "additionalProperties": false
672
- },
673
- {
674
- "type": "object",
675
- "required": ["kind", "orderRef", "state"],
676
- "properties": {
677
- "kind": { "const": "order.state" },
678
- "orderRef": { "$ref": "#/$defs/OpaqueRef" },
679
- "state": { "enum": ["pending", "verified", "failed", "unknown"] }
680
- },
681
- "additionalProperties": false
682
- },
683
- {
684
- "type": "object",
685
- "required": ["kind", "code", "factRefs"],
686
- "properties": {
687
- "kind": { "const": "gap" },
688
- "code": { "$ref": "#/$defs/NonEmptyString" },
689
- "factRefs": { "type": "array", "items": { "$ref": "#/$defs/OpaqueRef" } }
690
- },
691
- "additionalProperties": false
692
- }
693
- ]
694
- },
695
- "ResultContractV1": {
696
- "type": "object",
697
- "required": ["outcome", "hardCriteriaMet", "factRefs", "gapCodes"],
698
- "properties": {
699
- "outcome": { "enum": ["complete", "partial", "empty"] },
700
- "requestedCount": { "type": "integer", "minimum": 0 },
701
- "actualCount": { "type": "integer", "minimum": 0 },
702
- "hardCriteriaMet": { "type": "boolean" },
703
- "factRefs": { "type": "array", "items": { "$ref": "#/$defs/OpaqueRef" } },
704
- "gapCodes": { "type": "array", "items": { "$ref": "#/$defs/NonEmptyString" } }
705
- },
706
- "additionalProperties": false
707
- },
708
- "ActionReceiptV1": {
709
- "type": "object",
710
- "required": ["schemaVersion", "kind", "actionId", "contextRef", "status", "revision", "observation", "resultContract"],
711
- "properties": {
712
- "schemaVersion": { "$ref": "#/$defs/SchemaVersion" },
713
- "kind": { "const": "action.receipt" },
714
- "actionId": { "$ref": "#/$defs/OpaqueRef" },
715
- "contextRef": { "$ref": "#/$defs/OpaqueRef" },
716
- "status": { "$ref": "#/$defs/ActionReceiptStatusV1" },
717
- "revision": { "$ref": "#/$defs/Revision" },
718
- "observation": { "$ref": "#/$defs/ActionObservationV1" },
719
- "resultContract": { "$ref": "#/$defs/ResultContractV1" },
720
- "undoToken": { "$ref": "#/$defs/OpaqueRef" }
721
- },
722
- "additionalProperties": false
723
- },
724
- "UserTurnV1": {
725
- "type": "object",
726
- "required": ["schemaVersion", "kind", "workspace", "request"],
727
- "properties": {
728
- "schemaVersion": { "$ref": "#/$defs/SchemaVersion" },
729
- "kind": { "const": "user.turn" },
730
- "taskId": { "$ref": "#/$defs/OpaqueRef" },
731
- "workspace": { "$ref": "#/$defs/BookingWorkspaceSnapshotV1" },
732
- "request": {
733
- "type": "object",
734
- "required": ["text"],
735
- "properties": { "text": { "type": "string", "minLength": 1, "maxLength": 16000 } },
736
- "additionalProperties": false
737
- }
738
- },
739
- "additionalProperties": false
740
- },
741
- "BookingCopilotIngressTurnV1": {
742
- "type": "object",
743
- "required": ["schemaVersion", "kind", "surfaceHint", "workspace", "request"],
744
- "properties": {
745
- "schemaVersion": { "$ref": "#/$defs/SchemaVersion" },
746
- "kind": { "const": "user.turn.ingress" },
747
- "taskId": { "$ref": "#/$defs/OpaqueRef" },
748
- "contextRef": { "type": "null" },
749
- "surfaceHint": { "$ref": "#/$defs/BookingSurfaceV1" },
750
- "workspace": { "$ref": "#/$defs/BookingWorkspaceIngressSnapshotV1" },
751
- "request": {
752
- "type": "object",
753
- "required": ["text"],
754
- "properties": { "text": { "type": "string", "minLength": 1, "maxLength": 16000 } },
755
- "additionalProperties": false
756
- }
757
- },
758
- "additionalProperties": false
759
- },
760
- "ActionReceiptContinuationV1": {
761
- "type": "object",
762
- "required": ["schemaVersion", "kind", "taskId", "workspace", "receipt"],
763
- "properties": {
764
- "schemaVersion": { "$ref": "#/$defs/SchemaVersion" },
765
- "kind": { "const": "action.receipt.continuation" },
766
- "taskId": { "$ref": "#/$defs/OpaqueRef" },
767
- "workspace": { "$ref": "#/$defs/BookingWorkspaceSnapshotV1" },
768
- "receipt": { "$ref": "#/$defs/ActionReceiptV1" }
769
- },
770
- "additionalProperties": false
771
- },
772
- "BookingCopilotTurnV1": {
773
- "oneOf": [
774
- { "$ref": "#/$defs/UserTurnV1" },
775
- { "$ref": "#/$defs/ActionReceiptContinuationV1" }
776
- ]
777
- },
778
- "EventCommonProperties": {
779
- "type": "object",
780
- "required": ["schemaVersion", "eventId", "taskId", "contextRef", "sequence", "emittedAt", "kind"],
781
- "properties": {
782
- "schemaVersion": { "$ref": "#/$defs/SchemaVersion" },
783
- "eventId": { "$ref": "#/$defs/OpaqueRef" },
784
- "taskId": { "$ref": "#/$defs/OpaqueRef" },
785
- "contextRef": { "$ref": "#/$defs/OpaqueRef" },
786
- "sequence": { "type": "integer", "minimum": 1 },
787
- "emittedAt": { "type": "string", "minLength": 20, "maxLength": 64 },
788
- "kind": { "enum": ["status", "question", "operation", "explanation", "terminal", "error"] }
789
- }
790
- },
791
- "BookingStatusEventV1": {
792
- "type": "object",
793
- "required": ["schemaVersion", "eventId", "taskId", "contextRef", "sequence", "emittedAt", "kind", "status"],
794
- "properties": {
795
- "schemaVersion": { "$ref": "#/$defs/SchemaVersion" },
796
- "eventId": { "$ref": "#/$defs/OpaqueRef" },
797
- "taskId": { "$ref": "#/$defs/OpaqueRef" },
798
- "contextRef": { "$ref": "#/$defs/OpaqueRef" },
799
- "sequence": { "type": "integer", "minimum": 1 },
800
- "emittedAt": { "type": "string", "minLength": 20, "maxLength": 64 },
801
- "kind": { "const": "status" },
802
- "status": { "enum": ["submitted", "working", "waiting_receipt", "input_required"] }
803
- },
804
- "additionalProperties": false
805
- },
806
- "BookingQuestionEventV1": {
807
- "type": "object",
808
- "required": ["schemaVersion", "eventId", "taskId", "contextRef", "sequence", "emittedAt", "kind", "question"],
809
- "properties": {
810
- "schemaVersion": { "$ref": "#/$defs/SchemaVersion" },
811
- "eventId": { "$ref": "#/$defs/OpaqueRef" },
812
- "taskId": { "$ref": "#/$defs/OpaqueRef" },
813
- "contextRef": { "$ref": "#/$defs/OpaqueRef" },
814
- "sequence": { "type": "integer", "minimum": 1 },
815
- "emittedAt": { "type": "string", "minLength": 20, "maxLength": 64 },
816
- "kind": { "const": "question" },
817
- "question": {
818
- "type": "object",
819
- "required": ["questionId", "prompt", "missingFields"],
820
- "properties": {
821
- "questionId": { "$ref": "#/$defs/OpaqueRef" },
822
- "prompt": { "$ref": "#/$defs/NonEmptyString" },
823
- "missingFields": { "type": "array", "uniqueItems": true, "items": { "$ref": "#/$defs/NonEmptyString" } }
824
- },
825
- "additionalProperties": false
826
- }
827
- },
828
- "additionalProperties": false
829
- },
830
- "BookingOperationEventV1": {
831
- "type": "object",
832
- "required": ["schemaVersion", "eventId", "taskId", "contextRef", "sequence", "emittedAt", "kind", "action"],
833
- "properties": {
834
- "schemaVersion": { "$ref": "#/$defs/SchemaVersion" },
835
- "eventId": { "$ref": "#/$defs/OpaqueRef" },
836
- "taskId": { "$ref": "#/$defs/OpaqueRef" },
837
- "contextRef": { "$ref": "#/$defs/OpaqueRef" },
838
- "sequence": { "type": "integer", "minimum": 1 },
839
- "emittedAt": { "type": "string", "minLength": 20, "maxLength": 64 },
840
- "kind": { "const": "operation" },
841
- "action": { "$ref": "#/$defs/BookingReadActionV1" }
842
- },
843
- "additionalProperties": false
844
- },
845
- "BookingExplanationEventV1": {
846
- "type": "object",
847
- "required": ["schemaVersion", "eventId", "taskId", "contextRef", "sequence", "emittedAt", "kind", "explanation"],
848
- "properties": {
849
- "schemaVersion": { "$ref": "#/$defs/SchemaVersion" },
850
- "eventId": { "$ref": "#/$defs/OpaqueRef" },
851
- "taskId": { "$ref": "#/$defs/OpaqueRef" },
852
- "contextRef": { "$ref": "#/$defs/OpaqueRef" },
853
- "sequence": { "type": "integer", "minimum": 1 },
854
- "emittedAt": { "type": "string", "minLength": 20, "maxLength": 64 },
855
- "kind": { "const": "explanation" },
856
- "explanation": {
857
- "type": "object",
858
- "required": ["text", "factRefs"],
859
- "properties": {
860
- "text": { "$ref": "#/$defs/NonEmptyString" },
861
- "factRefs": { "type": "array", "items": { "$ref": "#/$defs/OpaqueRef" } }
862
- },
863
- "additionalProperties": false
864
- }
865
- },
866
- "additionalProperties": false
867
- },
868
- "BookingTerminalEventV1": {
869
- "type": "object",
870
- "required": ["schemaVersion", "eventId", "taskId", "contextRef", "sequence", "emittedAt", "kind", "terminal"],
871
- "properties": {
872
- "schemaVersion": { "$ref": "#/$defs/SchemaVersion" },
873
- "eventId": { "$ref": "#/$defs/OpaqueRef" },
874
- "taskId": { "$ref": "#/$defs/OpaqueRef" },
875
- "contextRef": { "$ref": "#/$defs/OpaqueRef" },
876
- "sequence": { "type": "integer", "minimum": 1 },
877
- "emittedAt": { "type": "string", "minLength": 20, "maxLength": 64 },
878
- "kind": { "const": "terminal" },
879
- "terminal": {
880
- "type": "object",
881
- "required": ["status", "summary", "factRefs"],
882
- "properties": {
883
- "status": { "enum": ["completed", "stopped"] },
884
- "summary": { "$ref": "#/$defs/NonEmptyString" },
885
- "factRefs": { "type": "array", "items": { "$ref": "#/$defs/OpaqueRef" } }
886
- },
887
- "additionalProperties": false
888
- }
889
- },
890
- "additionalProperties": false
891
- },
892
- "BookingErrorEventV1": {
893
- "type": "object",
894
- "required": ["schemaVersion", "eventId", "taskId", "contextRef", "sequence", "emittedAt", "kind", "error"],
895
- "properties": {
896
- "schemaVersion": { "$ref": "#/$defs/SchemaVersion" },
897
- "eventId": { "$ref": "#/$defs/OpaqueRef" },
898
- "taskId": { "$ref": "#/$defs/OpaqueRef" },
899
- "contextRef": { "$ref": "#/$defs/OpaqueRef" },
900
- "sequence": { "type": "integer", "minimum": 1 },
901
- "emittedAt": { "type": "string", "minLength": 20, "maxLength": 64 },
902
- "kind": { "const": "error" },
903
- "error": {
904
- "type": "object",
905
- "required": ["code", "message", "retryable"],
906
- "properties": {
907
- "code": { "$ref": "#/$defs/NonEmptyString" },
908
- "message": { "$ref": "#/$defs/NonEmptyString" },
909
- "retryable": { "type": "boolean" }
910
- },
911
- "additionalProperties": false
912
- }
913
- },
914
- "additionalProperties": false
915
- },
916
- "BookingSurfaceEventV1": {
917
- "oneOf": [
918
- { "$ref": "#/$defs/BookingStatusEventV1" },
919
- { "$ref": "#/$defs/BookingQuestionEventV1" },
920
- { "$ref": "#/$defs/BookingOperationEventV1" },
921
- { "$ref": "#/$defs/BookingExplanationEventV1" },
922
- { "$ref": "#/$defs/BookingTerminalEventV1" },
923
- { "$ref": "#/$defs/BookingErrorEventV1" }
924
- ]
925
- }
926
- }
927
- }