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

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 (229) hide show
  1. package/README.md +161 -116
  2. package/README.zh-CN.md +173 -144
  3. package/bin/gotry-booking-copilot.js +53 -0
  4. package/bin/gotry-bootstrap.js +113 -66
  5. package/bin/gotry-inner.js +436 -70
  6. package/bin/gotry-runtime-resolution.d.ts +27 -0
  7. package/bin/gotry-runtime-resolution.js +50 -0
  8. package/bin/gotry.js +1 -1
  9. package/cordis.gotry-patch.yml +5 -1
  10. package/dist/capabilities/agent-reach-deep.js +1 -1
  11. package/dist/capabilities/agent-reach.js +1 -1
  12. package/dist/capabilities/anything.js +1 -1
  13. package/dist/capabilities/artifacts.js +1 -1
  14. package/dist/capabilities/effect.js +1 -1
  15. package/dist/capabilities/fact-log.js +1 -1
  16. package/dist/capabilities/flyai.js +20 -6
  17. package/dist/capabilities/hbcli.js +1 -1
  18. package/dist/capabilities/incident-log.js +1 -1
  19. package/dist/capabilities/model-override.js +18 -0
  20. package/dist/capabilities/opensky.js +1 -1
  21. package/dist/capabilities/resilience.js +1 -1
  22. package/dist/capabilities/session/action-cache.js +1 -1
  23. package/dist/capabilities/session/adapters/ctrip-flight.js +1 -1
  24. package/dist/capabilities/session/adapters/meituan-local.js +1 -1
  25. package/dist/capabilities/session/benchmark.js +1 -1
  26. package/dist/capabilities/session/extension-bridge.js +19 -6
  27. package/dist/capabilities/session/extension-channel.js +3 -3
  28. package/dist/capabilities/session/extension-distribution.js +234 -0
  29. package/dist/capabilities/session/extract.js +1 -1
  30. package/dist/capabilities/session/golden-score.js +92 -0
  31. package/dist/capabilities/session/health-watch.js +1 -1
  32. package/dist/capabilities/session/read-guard.js +1 -1
  33. package/dist/capabilities/session/static-flight-golden.js +137 -0
  34. package/dist/capabilities/session/transport.js +1 -1
  35. package/dist/capabilities/session/wizard.js +21 -251
  36. package/dist/capabilities/session-consent.js +1 -1
  37. package/dist/capabilities/session-login.js +11 -5
  38. package/dist/capabilities/session-search.js +46 -4
  39. package/dist/capabilities/weather.js +168 -46
  40. package/dist/data/session-golden-20.json +25 -0
  41. package/dist/data/sf-golden-manifest.json +102 -0
  42. package/dist/data/sf-static-routes.json +91 -0
  43. package/dist/scripts/action-cache-tests.js +1 -1
  44. package/dist/scripts/agent-planning-budget-e2e.js +227 -0
  45. package/dist/scripts/agent-planning-budget-tests.js +173 -0
  46. package/dist/scripts/agent-reach-deep-tests.js +1 -1
  47. package/dist/scripts/agent-reach-tests.js +1 -1
  48. package/dist/scripts/agent-reach-wrapper-tests.js +1 -1
  49. package/dist/scripts/anything-tests.js +1 -1
  50. package/dist/scripts/async-collect.js +1 -1
  51. package/dist/scripts/benchmark-environment-bridge-e2e.js +981 -0
  52. package/dist/scripts/benchmark-environment-bridge-tests.js +2544 -0
  53. package/dist/scripts/booking-copilot-availability-ledger-binding-tests.js +335 -0
  54. package/dist/scripts/booking-copilot-availability-policy-v2-tests.js +1355 -0
  55. package/dist/scripts/booking-copilot-bin-proof-tests.js +89 -0
  56. package/dist/scripts/booking-copilot-crossrepo-fixture-server.js +113 -0
  57. package/dist/scripts/booking-copilot-dsh-core-proof-tests.js +356 -0
  58. package/dist/scripts/booking-copilot-dsh-planner-proof-tests.js +557 -0
  59. package/dist/scripts/booking-copilot-dsh-plugin-proof-tests.js +140 -0
  60. package/dist/scripts/booking-copilot-event-sequence-concurrency-proof-tests.js +202 -0
  61. package/dist/scripts/booking-copilot-gap-code-contract-proof-tests.js +102 -0
  62. package/dist/scripts/booking-copilot-operation-ledger-concurrency-proof-tests.js +374 -0
  63. package/dist/scripts/booking-copilot-receipt-ledger-concurrency-proof-tests.js +447 -0
  64. package/dist/scripts/booking-copilot-runtime-proof-tests.js +205 -0
  65. package/dist/scripts/booking-copilot-server-proof-tests.js +317 -0
  66. package/dist/scripts/booking-copilot-startup-proof-tests.js +283 -0
  67. package/dist/scripts/booking-copilot-v2-runtime-proof-tests.js +3935 -0
  68. package/dist/scripts/booking-saga-tests.js +1 -1
  69. package/dist/scripts/booking-surface-contract-proof-tests.js +393 -0
  70. package/dist/scripts/booking-surface-v2-contract-proof-tests.js +1174 -0
  71. package/dist/scripts/bootstrap-tests.js +45 -39
  72. package/dist/scripts/build-changelog.js +1 -1
  73. package/dist/scripts/changelog-tests.js +1 -1
  74. package/dist/scripts/companion-tests.js +1 -1
  75. package/dist/scripts/diff-test.js +1 -1
  76. package/dist/scripts/dsh-runtime-closure-tests.js +225 -0
  77. package/dist/scripts/dsh-runtime-closure.js +150 -0
  78. package/dist/scripts/effect-tests.js +1 -1
  79. package/dist/scripts/engine-run.js +1 -1
  80. package/dist/scripts/engine-tests.js +1 -1
  81. package/dist/scripts/evaluation-cadence-tests.js +347 -0
  82. package/dist/scripts/evaluation-contract-tests.js +574 -0
  83. package/dist/scripts/extension-distribution-cli.js +35 -0
  84. package/dist/scripts/extension-distribution-tests.js +341 -0
  85. package/dist/scripts/extension-tests.js +128 -23
  86. package/dist/scripts/fact-gate-tests.js +1 -1
  87. package/dist/scripts/flyai-tests.js +1 -1
  88. package/dist/scripts/hbcli-e2e-tests.js +1 -1
  89. package/dist/scripts/hbcli-tests.js +1 -1
  90. package/dist/scripts/health-watch-cli.js +1 -1
  91. package/dist/scripts/i18n-tests.js +1 -1
  92. package/dist/scripts/incident-tests.js +1 -1
  93. package/dist/scripts/journey-tests.js +1 -1
  94. package/dist/scripts/ledger-tests.js +1 -1
  95. package/dist/scripts/ledger-workflow-crash.js +1 -1
  96. package/dist/scripts/memory-capture-tests.js +1 -1
  97. package/dist/scripts/memory-decay-tests.js +1 -1
  98. package/dist/scripts/memory-metrics.js +1 -1
  99. package/dist/scripts/memory-value-report.js +1 -1
  100. package/dist/scripts/model-override-e2e.js +176 -0
  101. package/dist/scripts/nightly-evidence-tests.js +1 -1
  102. package/dist/scripts/nightly-evidence.js +1 -1
  103. package/dist/scripts/nudge-digest.js +1 -1
  104. package/dist/scripts/onboarding-tests.js +21 -53
  105. package/dist/scripts/opensky-check.js +1 -1
  106. package/dist/scripts/opensky-tests.js +1 -1
  107. package/dist/scripts/pnpm-dsh-closure-proof.js +20 -0
  108. package/dist/scripts/price-drift-tests.js +1 -1
  109. package/dist/scripts/price-drift-watch.js +1 -1
  110. package/dist/scripts/probe-poi-tests.js +1 -1
  111. package/dist/scripts/product-metrics.js +1 -1
  112. package/dist/scripts/publish-preverify.js +40 -4
  113. package/dist/scripts/realtime-pricing-tests.js +1 -1
  114. package/dist/scripts/replay-async.js +1 -1
  115. package/dist/scripts/replay-real.js +1 -1
  116. package/dist/scripts/replay.js +1 -1
  117. package/dist/scripts/session-attach-diagnose.js +1 -1
  118. package/dist/scripts/session-attach-poc.js +1 -1
  119. package/dist/scripts/session-benchmark.js +1 -1
  120. package/dist/scripts/session-extract-tests.js +1 -1
  121. package/dist/scripts/session-login.js +1 -1
  122. package/dist/scripts/session-tests.js +70 -20
  123. package/dist/scripts/sf-live-benchmark.js +338 -0
  124. package/dist/scripts/sf-live-cli-tests.js +21 -0
  125. package/dist/scripts/sf-soft-score-tests.js +108 -0
  126. package/dist/scripts/sf-summary.js +93 -0
  127. package/dist/scripts/skeleton-check.js +1 -1
  128. package/dist/scripts/skeleton-integration-test.js +1 -1
  129. package/dist/scripts/skills-contract-tests.js +1 -1
  130. package/dist/scripts/smoke-session-gate-tests.js +29 -0
  131. package/dist/scripts/smoke.js +79 -33
  132. package/dist/scripts/state-cli-tests.js +1 -1
  133. package/dist/scripts/state-cli.js +1 -1
  134. package/dist/scripts/static-golden-tests.js +299 -0
  135. package/dist/scripts/time-eval-tests.js +1 -1
  136. package/dist/scripts/travel-timeline-tests.js +1 -1
  137. package/dist/scripts/unified-tests.js +1 -1
  138. package/dist/scripts/weather-tests.js +694 -44
  139. package/dist/scripts/z3-race-tests.js +1 -1
  140. package/dist/src/artifact-gate.js +1 -1
  141. package/dist/src/benchmark-agent-conformance.js +370 -0
  142. package/dist/src/benchmark-environment-bridge.js +384 -0
  143. package/dist/src/benchmark-headless-child-diagnostics.js +173 -0
  144. package/dist/src/benchmark-tool-isolation.js +124 -0
  145. package/dist/src/bookable-facts.js +1 -1
  146. package/dist/src/booking-saga.js +1 -1
  147. package/dist/src/booking-surface/availability-policy-v2.js +830 -0
  148. package/dist/src/booking-surface/canonical-schema.js +113 -0
  149. package/dist/src/booking-surface/contracts-v2.js +89 -0
  150. package/dist/src/booking-surface/contracts.js +46 -0
  151. package/dist/src/booking-surface/dsh-planner.js +453 -0
  152. package/dist/src/booking-surface/dsh-plugin.js +93 -0
  153. package/dist/src/booking-surface/error-codes.js +94 -0
  154. package/dist/src/booking-surface/index.js +15 -0
  155. package/dist/src/booking-surface/profile.js +68 -0
  156. package/dist/src/booking-surface/runtime-v2.js +1771 -0
  157. package/dist/src/booking-surface/runtime.js +351 -0
  158. package/dist/src/booking-surface/server-v2.js +334 -0
  159. package/dist/src/booking-surface/server.js +302 -0
  160. package/dist/src/booking-surface/startup.js +159 -0
  161. package/dist/src/booking-surface/validation-v2.js +319 -0
  162. package/dist/src/booking-surface/validation.js +809 -0
  163. package/dist/src/bridge.js +1 -1
  164. package/dist/src/companions.js +1 -1
  165. package/dist/src/contracts.js +1 -1
  166. package/dist/src/dsh-llm.js +1 -1
  167. package/dist/src/engine.js +1 -1
  168. package/dist/src/evaluation-cadence.js +234 -0
  169. package/dist/src/evaluation-contracts.js +906 -0
  170. package/dist/src/i18n.js +1 -1
  171. package/dist/src/index.js +50 -19
  172. package/dist/src/journey.js +1 -1
  173. package/dist/src/loop.js +1 -1
  174. package/dist/src/memory-capture.js +1 -1
  175. package/dist/src/memory-decay.js +1 -1
  176. package/dist/src/memory-utility.js +1 -1
  177. package/dist/src/mock-llm.js +1 -1
  178. package/dist/src/model.js +1 -1
  179. package/dist/src/realtime-pricing.js +1 -1
  180. package/dist/src/slot-spec.js +1 -1
  181. package/dist/src/state-ledger.js +2 -1
  182. package/dist/src/time-anchor.js +1 -1
  183. package/dist/src/tool-budget.js +136 -0
  184. package/dist/src/tool-packet.js +1 -1
  185. package/dist/src/travel-slots.js +1 -1
  186. package/dist/src/travel-timeline.js +1 -1
  187. package/dist/src/unified.js +1 -1
  188. package/dist/src/wish-pool.js +1 -1
  189. package/dist/src/z3-shared.js +1 -1
  190. package/extension/README.md +31 -7
  191. package/package.json +286 -11
  192. package/schemas/booking.surface.v1.schema.json +927 -0
  193. package/schemas/booking.surface.v2.schema.json +61 -0
  194. package/ts/capabilities/flyai.ts +16 -3
  195. package/ts/capabilities/session/extension-bridge.ts +37 -14
  196. package/ts/capabilities/session/extension-channel.ts +6 -3
  197. package/ts/capabilities/session/extension-distribution.ts +264 -0
  198. package/ts/capabilities/session/golden-score.ts +139 -0
  199. package/ts/capabilities/session/health-watch.ts +1 -1
  200. package/ts/capabilities/session/static-flight-golden.ts +209 -0
  201. package/ts/capabilities/session/wizard.ts +34 -176
  202. package/ts/capabilities/session-login.ts +15 -5
  203. package/ts/capabilities/session-search.ts +40 -3
  204. package/ts/capabilities/weather.ts +141 -52
  205. package/ts/package.json +3 -3
  206. package/ts/src/benchmark-agent-conformance.ts +448 -0
  207. package/ts/src/benchmark-environment-bridge.ts +348 -0
  208. package/ts/src/benchmark-headless-child-diagnostics.ts +184 -0
  209. package/ts/src/benchmark-tool-isolation.ts +166 -0
  210. package/ts/src/booking-surface/availability-policy-v2.ts +523 -0
  211. package/ts/src/booking-surface/canonical-schema.js +113 -0
  212. package/ts/src/booking-surface/contracts-v2.ts +118 -0
  213. package/ts/src/booking-surface/contracts.ts +380 -0
  214. package/ts/src/booking-surface/dsh-planner.ts +452 -0
  215. package/ts/src/booking-surface/dsh-plugin.js +93 -0
  216. package/ts/src/booking-surface/error-codes.ts +101 -0
  217. package/ts/src/booking-surface/index.ts +12 -0
  218. package/ts/src/booking-surface/profile.ts +42 -0
  219. package/ts/src/booking-surface/runtime-v2.ts +1466 -0
  220. package/ts/src/booking-surface/runtime.ts +483 -0
  221. package/ts/src/booking-surface/server-v2.ts +247 -0
  222. package/ts/src/booking-surface/server.ts +324 -0
  223. package/ts/src/booking-surface/startup.ts +196 -0
  224. package/ts/src/booking-surface/validation-v2.ts +205 -0
  225. package/ts/src/booking-surface/validation.ts +453 -0
  226. package/ts/src/index.ts +64 -11
  227. package/ts/src/state-ledger.ts +1 -0
  228. package/ts/src/tool-budget.ts +165 -0
  229. package/dist/scripts/wizard-bootstrap.js +0 -32
@@ -0,0 +1,927 @@
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
+ }