@danceiny/gotry 0.0.1-rc.9 → 0.2.0-rc.27

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 (507) hide show
  1. package/README.md +172 -219
  2. package/README.zh-CN.md +222 -0
  3. package/bin/gotry-backend.js +53 -0
  4. package/bin/gotry-booking-copilot.js +53 -0
  5. package/bin/gotry-bootstrap.js +1744 -0
  6. package/bin/gotry-inner.js +733 -83
  7. package/bin/gotry-process-liveness.d.ts +27 -0
  8. package/bin/gotry-process-liveness.js +97 -0
  9. package/bin/gotry-runtime-resolution.d.ts +27 -0
  10. package/bin/gotry-runtime-resolution.js +49 -0
  11. package/bin/gotry.js +1 -1
  12. package/client/client.js +203 -0
  13. package/cordis.gotry-patch.yml +80 -56
  14. package/data/airline-airports.json +39 -0
  15. package/data/stations-12306-verify.json +524 -0
  16. package/dist/capabilities/agent-reach-deep.js +45 -122
  17. package/dist/capabilities/agent-reach.js +101 -146
  18. package/dist/capabilities/anything.js +135 -94
  19. package/dist/capabilities/artifacts.js +370 -0
  20. package/dist/capabilities/channel-health.js +131 -0
  21. package/dist/capabilities/channel-registry.js +256 -0
  22. package/dist/capabilities/doctor.js +546 -0
  23. package/dist/capabilities/effect.js +394 -0
  24. package/dist/capabilities/external-event.js +149 -0
  25. package/dist/capabilities/fact-log.js +55 -0
  26. package/dist/capabilities/flyai-config.js +337 -0
  27. package/dist/capabilities/flyai.js +947 -110
  28. package/dist/capabilities/fx-contract.js +293 -0
  29. package/dist/capabilities/geo-atlas.js +246 -0
  30. package/dist/capabilities/ground-transfer.js +509 -0
  31. package/dist/capabilities/hbcli.js +260 -123
  32. package/dist/capabilities/hotelbyte-transaction.js +194 -0
  33. package/dist/capabilities/incident-log.js +131 -61
  34. package/dist/capabilities/itinerary-artifact.js +190 -0
  35. package/dist/capabilities/itinerary-deck-artifact.js +194 -0
  36. package/dist/capabilities/itinerary-deck-export.js +339 -0
  37. package/dist/capabilities/lavish-local.js +924 -0
  38. package/dist/capabilities/model-override.js +38 -0
  39. package/dist/capabilities/opensky.js +54 -43
  40. package/dist/capabilities/resilience.js +191 -0
  41. package/dist/capabilities/session/action-cache.js +50 -44
  42. package/dist/capabilities/session/adapters/ctrip-flight.js +120 -62
  43. package/dist/capabilities/session/adapters/ctrip-hotel.js +222 -0
  44. package/dist/capabilities/session/adapters/dida-portal.js +274 -0
  45. package/dist/capabilities/session/adapters/meituan-local.js +35 -54
  46. package/dist/capabilities/session/adapters/rail-12306.js +342 -0
  47. package/dist/capabilities/session/benchmark.js +189 -0
  48. package/dist/capabilities/session/bridge-ledger.js +224 -0
  49. package/dist/capabilities/session/extension-bridge.js +636 -0
  50. package/dist/capabilities/session/extension-channel.js +109 -0
  51. package/dist/capabilities/session/extension-distribution.js +230 -0
  52. package/dist/capabilities/session/extract.js +31 -21
  53. package/dist/capabilities/session/golden-score.js +114 -0
  54. package/dist/capabilities/session/health-watch.js +215 -0
  55. package/dist/capabilities/session/read-guard.js +75 -24
  56. package/dist/capabilities/session/static-flight-golden.js +150 -0
  57. package/dist/capabilities/session/transport.js +97 -83
  58. package/dist/capabilities/session/wizard.js +117 -0
  59. package/dist/capabilities/session-consent.js +178 -0
  60. package/dist/capabilities/session-login.js +170 -0
  61. package/dist/capabilities/session-search.js +635 -44
  62. package/dist/capabilities/spawn-bounded.js +203 -0
  63. package/dist/capabilities/sponsor-plugin.js +341 -0
  64. package/dist/capabilities/visa-policy.js +140 -0
  65. package/dist/capabilities/weather.js +243 -138
  66. package/dist/data/session-golden-20.json +25 -0
  67. package/dist/data/sf-golden-manifest.json +103 -0
  68. package/dist/data/sf-static-routes.json +91 -0
  69. package/dist/scripts/action-cache-tests.js +24 -59
  70. package/dist/scripts/agent-planning-turn-deadline-e2e.js +242 -0
  71. package/dist/scripts/agent-planning-turn-deadline-tests.js +185 -0
  72. package/dist/scripts/agent-reach-deep-tests.js +30 -40
  73. package/dist/scripts/agent-reach-error-tests.js +354 -0
  74. package/dist/scripts/agent-reach-tests.js +26 -18
  75. package/dist/scripts/agent-reach-wrapper-tests.js +50 -50
  76. package/dist/scripts/anything-tests.js +116 -60
  77. package/dist/scripts/artifact-client-contract-tests.js +220 -0
  78. package/dist/scripts/artifacts-capability-tests.js +727 -0
  79. package/dist/scripts/async-collect.js +50 -11
  80. package/dist/scripts/benchmark-environment-bridge-e2e.js +741 -0
  81. package/dist/scripts/benchmark-environment-bridge-tests.js +1452 -0
  82. package/dist/scripts/booking-copilot-availability-ledger-binding-tests.js +126 -0
  83. package/dist/scripts/booking-copilot-availability-policy-tests.js +265 -0
  84. package/dist/scripts/booking-copilot-bin-proof-tests.js +66 -0
  85. package/dist/scripts/booking-copilot-cleanup-proof-helper.js +76 -0
  86. package/dist/scripts/booking-copilot-crossrepo-fixture-server.js +144 -0
  87. package/dist/scripts/booking-copilot-dsh-core-proof-tests.js +424 -0
  88. package/dist/scripts/booking-copilot-dsh-planner-proof-tests.js +2839 -0
  89. package/dist/scripts/booking-copilot-dsh-plugin-proof-tests.js +309 -0
  90. package/dist/scripts/booking-copilot-dsh-readiness-proof.js +238 -0
  91. package/dist/scripts/booking-copilot-dsh-warmer-proof.js +123 -0
  92. package/dist/scripts/booking-copilot-event-sequence-concurrency-proof-tests.js +156 -0
  93. package/dist/scripts/booking-copilot-gap-code-contract-proof-tests.js +70 -0
  94. package/dist/scripts/booking-copilot-intent-proof-tests.js +422 -0
  95. package/dist/scripts/booking-copilot-operation-ledger-concurrency-proof-tests.js +184 -0
  96. package/dist/scripts/booking-copilot-planner-live-probe.js +95 -0
  97. package/dist/scripts/booking-copilot-proof-runtime.js +42 -0
  98. package/dist/scripts/booking-copilot-receipt-ledger-concurrency-proof-tests.js +210 -0
  99. package/dist/scripts/booking-copilot-runtime-proof-tests.js +2349 -0
  100. package/dist/scripts/booking-copilot-server-proof-tests.js +784 -0
  101. package/dist/scripts/booking-copilot-startup-proof-tests.js +94 -0
  102. package/dist/scripts/booking-executor-tests.js +80 -0
  103. package/dist/scripts/booking-recovery-chain-tests.js +182 -0
  104. package/dist/scripts/booking-saga-tests.js +125 -0
  105. package/dist/scripts/booking-surface-contract-proof-tests.js +212 -0
  106. package/dist/scripts/bootstrap-tests.js +1479 -0
  107. package/dist/scripts/bridge-events-tests.js +239 -0
  108. package/dist/scripts/bridge-ledger-tests.js +428 -0
  109. package/dist/scripts/build-changelog.js +238 -0
  110. package/dist/scripts/build-metrics-report.js +331 -0
  111. package/dist/scripts/changelog-tests.js +118 -0
  112. package/dist/scripts/channel-probe-tests.js +103 -0
  113. package/dist/scripts/channel-probe.js +169 -0
  114. package/dist/scripts/channel-registry-tests.js +208 -0
  115. package/dist/scripts/companion-tests.js +25 -70
  116. package/dist/scripts/dida-cookie-probe.js +87 -0
  117. package/dist/scripts/dida-runner-stop-tests.js +311 -0
  118. package/dist/scripts/dida-sw-probe.js +114 -0
  119. package/dist/scripts/diff-test.js +17 -12
  120. package/dist/scripts/doctor-tests.js +564 -0
  121. package/dist/scripts/dsh-artifact-e2e.js +279 -0
  122. package/dist/scripts/dsh-artifact-web-e2e.js +675 -0
  123. package/dist/scripts/dsh-http-proxy-sse-proof.js +90 -0
  124. package/dist/scripts/dsh-runtime-closure-tests.js +182 -0
  125. package/dist/scripts/dsh-runtime-closure.js +162 -0
  126. package/dist/scripts/dsh-session-v3-migration-proof.js +109 -0
  127. package/dist/scripts/dsh-subprocess-local-proof.js +150 -0
  128. package/dist/scripts/dsh-target-closure-proof.js +178 -0
  129. package/dist/scripts/effect-tests.js +539 -0
  130. package/dist/scripts/engine-run.js +1 -3
  131. package/dist/scripts/engine-tests.js +16 -10
  132. package/dist/scripts/evaluation-cadence-tests.js +174 -0
  133. package/dist/scripts/evaluation-contract-tests.js +268 -0
  134. package/dist/scripts/extension-distribution-cli.js +39 -0
  135. package/dist/scripts/extension-distribution-tests.js +443 -0
  136. package/dist/scripts/extension-tests.js +988 -0
  137. package/dist/scripts/external-event-tests.js +350 -0
  138. package/dist/scripts/fact-gate-tests.js +869 -0
  139. package/dist/scripts/fixtures/extension-bridge-unref-child.mjs +21 -0
  140. package/dist/scripts/flight-hotel-anchor-363-registered-e2e.js +169 -0
  141. package/dist/scripts/flight-malformed-tests.js +159 -0
  142. package/dist/scripts/flyai-setup-tests.js +228 -0
  143. package/dist/scripts/flyai-setup-tool-tests.js +54 -0
  144. package/dist/scripts/flyai-tests.js +692 -0
  145. package/dist/scripts/flyai-tool-registration-contract-tests.js +91 -0
  146. package/dist/scripts/fx-contract-tests.js +201 -0
  147. package/dist/scripts/g5-guard-tests.js +131 -0
  148. package/dist/scripts/g5-guard.js +189 -0
  149. package/dist/scripts/gen-lunar-anchors.js +106 -0
  150. package/dist/scripts/geo-atlas-tests.js +283 -0
  151. package/dist/scripts/gotry-backend-kernel-tests.js +206 -0
  152. package/dist/scripts/gotry-try-demo-tests.js +79 -0
  153. package/dist/scripts/gotry-try-demo.js +49 -0
  154. package/dist/scripts/ground-transfer-tests.js +956 -0
  155. package/dist/scripts/hbcli-e2e-tests.js +159 -0
  156. package/dist/scripts/hbcli-live-optin-tests.js +96 -0
  157. package/dist/scripts/hbcli-release-contract-tests.js +122 -0
  158. package/dist/scripts/hbcli-tests.js +121 -69
  159. package/dist/scripts/health-watch-cli.js +73 -0
  160. package/dist/scripts/hotel-date-gate-tests.js +496 -0
  161. package/dist/scripts/hotelbyte-reconcile-tests.js +141 -0
  162. package/dist/scripts/hotelbyte-spawn-e2e-tests.js +373 -0
  163. package/dist/scripts/i18n-tests.js +41 -0
  164. package/dist/scripts/incident-tests.js +281 -87
  165. package/dist/scripts/issue-194-job-id-guard-tests.js +106 -0
  166. package/dist/scripts/issue-233-cancel-refund-commission-tests.js +392 -0
  167. package/dist/scripts/issue-271-liveness-tests.js +569 -0
  168. package/dist/scripts/issue-289-model-retry-real-tests.js +296 -0
  169. package/dist/scripts/issue-289-model-retry-tests.js +441 -0
  170. package/dist/scripts/issue-289-web-retry-e2e.js +630 -0
  171. package/dist/scripts/issue-338-home-city-e2e.js +577 -0
  172. package/dist/scripts/issue343-real-entry-e2e.js +160 -0
  173. package/dist/scripts/issue436-persisted-routing-e2e.js +247 -0
  174. package/dist/scripts/itinerary-artifact-tests.js +368 -0
  175. package/dist/scripts/itinerary-deck-artifact-tests.js +416 -0
  176. package/dist/scripts/itinerary-deck-export-tests.js +552 -0
  177. package/dist/scripts/itinerary-deck-tests.js +435 -0
  178. package/dist/scripts/itinerary-html-tests.js +426 -0
  179. package/dist/scripts/journey-tests.js +22 -27
  180. package/dist/scripts/kernel-manifest-evidence.js +109 -0
  181. package/dist/scripts/kernel-manifest-gate.js +126 -0
  182. package/dist/scripts/kernel-manifest-tests.js +212 -0
  183. package/dist/scripts/kernel-manifest-trace-entry.js +7 -0
  184. package/dist/scripts/kernel-manifest-trace-hook.mjs +28 -0
  185. package/dist/scripts/kernel-manifest.js +369 -0
  186. package/dist/scripts/lavish-local-tests.js +1226 -0
  187. package/dist/scripts/lavish-product-tools-tests.js +537 -0
  188. package/dist/scripts/ledger-repair-apply-tests.js +316 -0
  189. package/dist/scripts/ledger-repair-plan-tests.js +375 -0
  190. package/dist/scripts/ledger-tests.js +382 -246
  191. package/dist/scripts/ledger-workflow-crash.js +10 -20
  192. package/dist/scripts/managed-dsh-cleanup-diagnostic-proof.js +184 -0
  193. package/dist/scripts/managed-dsh-close-failure-proof.js +172 -0
  194. package/dist/scripts/managed-dsh-run-port-proof.js +153 -0
  195. package/dist/scripts/managed-dsh-terminal-proof.js +252 -0
  196. package/dist/scripts/map-tools-vendor-package-proof.js +365 -0
  197. package/dist/scripts/memory-capture-tests.js +242 -61
  198. package/dist/scripts/memory-decay-tests.js +18 -52
  199. package/dist/scripts/memory-lifecycle-tests.js +657 -0
  200. package/dist/scripts/memory-lifecycle.js +196 -0
  201. package/dist/scripts/memory-metrics.js +24 -12
  202. package/dist/scripts/memory-value-report.js +631 -0
  203. package/dist/scripts/memory-value-tests.js +328 -0
  204. package/dist/scripts/metrics-report-tests.js +151 -0
  205. package/dist/scripts/model-override-e2e.js +137 -0
  206. package/dist/scripts/nightly-evidence-tests.js +161 -0
  207. package/dist/scripts/nightly-evidence.js +286 -0
  208. package/dist/scripts/nudge-digest.js +39 -28
  209. package/dist/scripts/observability-tests.js +381 -0
  210. package/dist/scripts/onboarding-tests.js +161 -0
  211. package/dist/scripts/opensky-check.js +18 -13
  212. package/dist/scripts/opensky-tests.js +28 -28
  213. package/dist/scripts/persona-surface-guard-tests.js +49 -0
  214. package/dist/scripts/pnpm-dsh-closure-proof.js +17 -0
  215. package/dist/scripts/policy-anchor-359-registered-e2e.js +214 -0
  216. package/dist/scripts/price-drift-tests.js +340 -0
  217. package/dist/scripts/price-drift-watch.js +447 -0
  218. package/dist/scripts/probe-poi-tests.js +53 -45
  219. package/dist/scripts/product-metrics.js +483 -0
  220. package/dist/scripts/publish-preverify.js +110 -0
  221. package/dist/scripts/realtime-pricing-tests.js +76 -0
  222. package/dist/scripts/recall-tests.js +513 -0
  223. package/dist/scripts/replay-async.js +20 -18
  224. package/dist/scripts/replay-real.js +18 -18
  225. package/dist/scripts/replay.js +52 -82
  226. package/dist/scripts/session-attach-diagnose.js +20 -20
  227. package/dist/scripts/session-attach-poc.js +34 -37
  228. package/dist/scripts/session-benchmark.js +180 -0
  229. package/dist/scripts/session-dida-live-e2e.js +199 -0
  230. package/dist/scripts/session-extract-tests.js +14 -35
  231. package/dist/scripts/session-link-tests.js +478 -0
  232. package/dist/scripts/session-login.js +27 -46
  233. package/dist/scripts/session-tests.js +796 -96
  234. package/dist/scripts/session-zones-tests.js +358 -0
  235. package/dist/scripts/sf-live-benchmark.js +367 -0
  236. package/dist/scripts/sf-live-challenge-stop-tests.js +453 -0
  237. package/dist/scripts/sf-live-cli-tests.js +92 -0
  238. package/dist/scripts/sf-live-options.js +46 -0
  239. package/dist/scripts/sf-manifest-tests.js +30 -0
  240. package/dist/scripts/sf-manifest.js +33 -0
  241. package/dist/scripts/sf-soft-score-tests.js +67 -0
  242. package/dist/scripts/sf-summary-tests.js +324 -0
  243. package/dist/scripts/sf-summary.js +525 -0
  244. package/dist/scripts/share-tests.js +432 -0
  245. package/dist/scripts/skeleton-check.js +16 -14
  246. package/dist/scripts/skeleton-integration-test.js +28 -11
  247. package/dist/scripts/skills-contract-tests.js +51 -46
  248. package/dist/scripts/smoke-session-gate-tests.js +21 -0
  249. package/dist/scripts/smoke.js +690 -246
  250. package/dist/scripts/spawn-bounded-abort-tests.js +241 -0
  251. package/dist/scripts/sponsor-reuse-tests.js +262 -0
  252. package/dist/scripts/state-cli-tests.js +226 -101
  253. package/dist/scripts/state-cli.js +550 -199
  254. package/dist/scripts/state-repair-cli.js +66 -0
  255. package/dist/scripts/state-repair-tests.js +140 -0
  256. package/dist/scripts/static-golden-tests.js +165 -0
  257. package/dist/scripts/time-eval-tests.js +210 -192
  258. package/dist/scripts/travel-timeline-tests.js +29 -93
  259. package/dist/scripts/turn-handoff-collect-tests.js +169 -0
  260. package/dist/scripts/turn-handoff-collect.js +161 -0
  261. package/dist/scripts/turn-policy-tests.js +55 -0
  262. package/dist/scripts/typed-contract-canary.js +176 -0
  263. package/dist/scripts/tz-resolver-sanity.js +50 -0
  264. package/dist/scripts/tz-resolver-tests.js +584 -0
  265. package/dist/scripts/unified-tests.js +23 -19
  266. package/dist/scripts/visa-policy-tests.js +62 -0
  267. package/dist/scripts/weather-tests.js +276 -41
  268. package/dist/scripts/wish-channel-gate-tests.js +54 -0
  269. package/dist/scripts/write-gate-tests.js +522 -0
  270. package/dist/scripts/z3-lifecycle-fault-tests.js +188 -0
  271. package/dist/scripts/z3-lifecycle-tests.js +170 -0
  272. package/dist/scripts/z3-race-repeat-tests.js +39 -0
  273. package/dist/scripts/z3-race-tests.js +41 -0
  274. package/dist/src/artifact-gate.js +829 -0
  275. package/dist/src/backend/kernel.js +91 -0
  276. package/dist/src/backend/modules/booking-copilot.js +92 -0
  277. package/dist/src/backend/modules/booking-executor.js +124 -0
  278. package/dist/src/backend/modules/session-search.js +551 -0
  279. package/dist/src/benchmark-agent-conformance.js +578 -0
  280. package/dist/src/benchmark-environment-bridge.js +515 -0
  281. package/dist/src/benchmark-headless-child-diagnostics.js +166 -0
  282. package/dist/src/benchmark-tool-isolation.js +151 -0
  283. package/dist/src/bookable-facts.js +533 -0
  284. package/dist/src/booking-saga.js +97 -0
  285. package/dist/src/booking-surface/availability-policy.js +697 -0
  286. package/dist/src/booking-surface/booking-intent.js +43 -0
  287. package/dist/src/booking-surface/cancel-refund-commission.js +379 -0
  288. package/dist/src/booking-surface/canonical-schema.js +116 -0
  289. package/dist/src/booking-surface/contracts.js +75 -0
  290. package/dist/src/booking-surface/dsh-planner.js +1854 -0
  291. package/dist/src/booking-surface/dsh-plugin.js +378 -0
  292. package/dist/src/booking-surface/dsh-worker.js +98 -0
  293. package/dist/src/booking-surface/error-codes.js +231 -0
  294. package/dist/src/booking-surface/index.js +9 -0
  295. package/dist/src/booking-surface/managed-dsh-cleanup-diagnostic.js +97 -0
  296. package/dist/src/booking-surface/managed-dsh-run-port.js +244 -0
  297. package/dist/src/booking-surface/profile.js +24 -0
  298. package/dist/src/booking-surface/recovery-chain.js +367 -0
  299. package/dist/src/booking-surface/runtime.js +1968 -0
  300. package/dist/src/booking-surface/server.js +674 -0
  301. package/dist/src/booking-surface/startup.js +168 -0
  302. package/dist/src/booking-surface/validation.js +261 -0
  303. package/dist/src/bridge.js +20 -13
  304. package/dist/src/companions.js +48 -74
  305. package/dist/src/contracts.js +21 -43
  306. package/dist/src/dsh-llm.js +97 -111
  307. package/dist/src/engine.js +276 -193
  308. package/dist/src/evaluation-cadence.js +97 -0
  309. package/dist/src/evaluation-contracts.js +283 -0
  310. package/dist/src/flight-pack-adapter.js +54 -0
  311. package/dist/src/flight-pack-contract.js +2 -0
  312. package/dist/src/flyai-setup-tool.js +70 -0
  313. package/dist/src/gotry-backend.js +125 -0
  314. package/dist/src/hotel-date-gate.js +118 -0
  315. package/dist/src/i18n.js +88 -0
  316. package/dist/src/index.js +2227 -882
  317. package/dist/src/itinerary-deck.js +139 -0
  318. package/dist/src/itinerary-doc-shared.js +661 -0
  319. package/dist/src/itinerary-html.js +131 -0
  320. package/dist/src/journey.js +155 -108
  321. package/dist/src/lavish-tools.js +400 -0
  322. package/dist/src/ledger-repair-apply.js +538 -0
  323. package/dist/src/ledger-repair-plan.js +463 -0
  324. package/dist/src/loop.js +319 -160
  325. package/dist/src/memory-capture.js +180 -32
  326. package/dist/src/memory-decay.js +30 -14
  327. package/dist/src/memory-lifecycle.js +1310 -0
  328. package/dist/src/memory-utility.js +27 -40
  329. package/dist/src/mock-llm.js +36 -61
  330. package/dist/src/model.js +81 -36
  331. package/dist/src/realtime-pricing.js +103 -0
  332. package/dist/src/recall/card.js +74 -0
  333. package/dist/src/recall/evaluator.js +140 -0
  334. package/dist/src/recall/integration.js +17 -0
  335. package/dist/src/recall/tick.js +166 -0
  336. package/dist/src/session-link/plan-it-action.js +48 -0
  337. package/dist/src/session-link/session-link.js +248 -0
  338. package/dist/src/session-zones.js +507 -0
  339. package/dist/src/share/adapters.js +51 -0
  340. package/dist/src/share/share-consent.js +76 -0
  341. package/dist/src/share/share-deck.js +58 -0
  342. package/dist/src/share/share-token.js +146 -0
  343. package/dist/src/slot-spec.js +84 -106
  344. package/dist/src/state-ledger.js +435 -516
  345. package/dist/src/state-repair.js +299 -0
  346. package/dist/src/subagent-job-id-guard.js +58 -0
  347. package/dist/src/time-anchor.js +231 -33
  348. package/dist/src/tool-packet.js +20 -8
  349. package/dist/src/travel-slots.js +58 -35
  350. package/dist/src/travel-timeline.js +44 -63
  351. package/dist/src/turn-deadline.js +287 -0
  352. package/dist/src/turn-policy.js +118 -0
  353. package/dist/src/tz-resolver.js +143 -0
  354. package/dist/src/unified.js +535 -359
  355. package/dist/src/wish-pool.js +42 -12
  356. package/dist/src/write-gate.js +495 -0
  357. package/dist/src/z3-shared.js +284 -0
  358. package/extension/README.md +21 -0
  359. package/extension/README.zh-CN.md +21 -0
  360. package/extension/background.js +463 -0
  361. package/extension/content-bridge.js +270 -0
  362. package/extension/content-main.js +111 -0
  363. package/extension/manifest.json +60 -0
  364. package/package.json +407 -14
  365. package/schemas/booking.intent.schema.json +193 -0
  366. package/schemas/booking.surface.schema.json +2622 -0
  367. package/ts/capabilities/agent-reach-deep.ts +114 -0
  368. package/ts/capabilities/agent-reach.ts +198 -0
  369. package/ts/capabilities/anything.ts +255 -0
  370. package/ts/capabilities/artifacts.ts +428 -0
  371. package/ts/capabilities/fact-log.ts +54 -0
  372. package/ts/capabilities/flyai-config.ts +388 -0
  373. package/ts/capabilities/flyai.ts +1274 -0
  374. package/ts/capabilities/hbcli.ts +253 -71
  375. package/ts/capabilities/incident-log.ts +88 -59
  376. package/ts/capabilities/itinerary-artifact.ts +214 -0
  377. package/ts/capabilities/itinerary-deck-artifact.ts +218 -0
  378. package/ts/capabilities/itinerary-deck-export.ts +378 -0
  379. package/ts/capabilities/opensky.ts +121 -0
  380. package/ts/capabilities/session/action-cache.ts +148 -0
  381. package/ts/capabilities/session/adapters/ctrip-flight.ts +181 -0
  382. package/ts/capabilities/session/adapters/ctrip-hotel.ts +238 -0
  383. package/ts/capabilities/session/adapters/dida-portal.ts +338 -0
  384. package/ts/capabilities/session/adapters/meituan-local.ts +70 -0
  385. package/ts/capabilities/session/adapters/rail-12306.ts +392 -0
  386. package/ts/capabilities/session/benchmark.ts +276 -0
  387. package/ts/capabilities/session/bridge-ledger.ts +333 -0
  388. package/ts/capabilities/session/extension-bridge.ts +794 -0
  389. package/ts/capabilities/session/extension-channel.ts +144 -0
  390. package/ts/capabilities/session/extension-distribution.ts +266 -0
  391. package/ts/capabilities/session/extract.ts +54 -0
  392. package/ts/capabilities/session/golden-score.ts +139 -0
  393. package/ts/capabilities/session/health-watch.ts +264 -0
  394. package/ts/capabilities/session/read-guard.ts +141 -0
  395. package/ts/capabilities/session/static-flight-golden.ts +209 -0
  396. package/ts/capabilities/session/transport.ts +146 -0
  397. package/ts/capabilities/session/wizard.ts +140 -0
  398. package/ts/capabilities/session-consent.ts +211 -0
  399. package/ts/capabilities/session-login.ts +208 -0
  400. package/ts/capabilities/session-search.ts +893 -0
  401. package/ts/capabilities/weather.ts +330 -0
  402. package/ts/dsh-runtime/vendor/README.md +68 -0
  403. package/ts/dsh-runtime/vendor/dsh-map-tools/LICENSE +21 -0
  404. package/ts/dsh-runtime/vendor/dsh-map-tools/README.en.md +405 -0
  405. package/ts/dsh-runtime/vendor/dsh-map-tools/README.md +404 -0
  406. package/ts/dsh-runtime/vendor/dsh-map-tools/client/client.js +1584 -0
  407. package/ts/dsh-runtime/vendor/dsh-map-tools/cordis.patch.yml +5 -0
  408. package/ts/dsh-runtime/vendor/dsh-map-tools/icon.svg +5 -0
  409. package/ts/dsh-runtime/vendor/dsh-map-tools/lib/clients/amap.js +595 -0
  410. package/ts/dsh-runtime/vendor/dsh-map-tools/lib/clients/nominatim.js +63 -0
  411. package/ts/dsh-runtime/vendor/dsh-map-tools/lib/clients/osrm.js +58 -0
  412. package/ts/dsh-runtime/vendor/dsh-map-tools/lib/clients/photon.js +55 -0
  413. package/ts/dsh-runtime/vendor/dsh-map-tools/lib/config-file.js +87 -0
  414. package/ts/dsh-runtime/vendor/dsh-map-tools/lib/config-route.js +131 -0
  415. package/ts/dsh-runtime/vendor/dsh-map-tools/lib/config.js +16 -0
  416. package/ts/dsh-runtime/vendor/dsh-map-tools/lib/geo.js +232 -0
  417. package/ts/dsh-runtime/vendor/dsh-map-tools/lib/index.js +120 -0
  418. package/ts/dsh-runtime/vendor/dsh-map-tools/lib/settings-ns.js +40 -0
  419. package/ts/dsh-runtime/vendor/dsh-map-tools/lib/staticmap-route.js +115 -0
  420. package/ts/dsh-runtime/vendor/dsh-map-tools/lib/tools/geocode.js +127 -0
  421. package/ts/dsh-runtime/vendor/dsh-map-tools/lib/tools/poi.js +84 -0
  422. package/ts/dsh-runtime/vendor/dsh-map-tools/lib/tools/routes.js +267 -0
  423. package/ts/dsh-runtime/vendor/dsh-map-tools/lib/types/clients/amap.d.ts +90 -0
  424. package/ts/dsh-runtime/vendor/dsh-map-tools/lib/types/clients/nominatim.d.ts +17 -0
  425. package/ts/dsh-runtime/vendor/dsh-map-tools/lib/types/clients/osrm.d.ts +15 -0
  426. package/ts/dsh-runtime/vendor/dsh-map-tools/lib/types/clients/photon.d.ts +22 -0
  427. package/ts/dsh-runtime/vendor/dsh-map-tools/lib/types/config-file.d.ts +33 -0
  428. package/ts/dsh-runtime/vendor/dsh-map-tools/lib/types/config-route.d.ts +23 -0
  429. package/ts/dsh-runtime/vendor/dsh-map-tools/lib/types/config.d.ts +23 -0
  430. package/ts/dsh-runtime/vendor/dsh-map-tools/lib/types/geo.d.ts +61 -0
  431. package/ts/dsh-runtime/vendor/dsh-map-tools/lib/types/index.d.ts +18 -0
  432. package/ts/dsh-runtime/vendor/dsh-map-tools/lib/types/settings-ns.d.ts +14 -0
  433. package/ts/dsh-runtime/vendor/dsh-map-tools/lib/types/staticmap-route.d.ts +31 -0
  434. package/ts/dsh-runtime/vendor/dsh-map-tools/lib/types/tools/geocode.d.ts +11 -0
  435. package/ts/dsh-runtime/vendor/dsh-map-tools/lib/types/tools/poi.d.ts +9 -0
  436. package/ts/dsh-runtime/vendor/dsh-map-tools/lib/types/tools/routes.d.ts +75 -0
  437. package/ts/dsh-runtime/vendor/dsh-map-tools/lib/types/types.d.ts +68 -0
  438. package/ts/dsh-runtime/vendor/dsh-map-tools/lib/types.js +16 -0
  439. package/ts/dsh-runtime/vendor/dsh-map-tools/package.json +97 -0
  440. package/ts/package.json +293 -3
  441. package/ts/scripts/async-collect.ts +91 -0
  442. package/ts/scripts/map-tools-vendor-package-proof.ts +404 -0
  443. package/ts/scripts/skeleton-check.ts +1 -1
  444. package/ts/scripts/skeleton-integration-test.ts +23 -1
  445. package/ts/scripts/state-cli.ts +568 -0
  446. package/ts/scripts/turn-handoff-collect.ts +178 -0
  447. package/ts/src/artifact-gate.ts +991 -0
  448. package/ts/src/benchmark-agent-conformance.ts +619 -0
  449. package/ts/src/benchmark-environment-bridge.ts +538 -0
  450. package/ts/src/benchmark-headless-child-diagnostics.ts +184 -0
  451. package/ts/src/benchmark-tool-isolation.ts +166 -0
  452. package/ts/src/bookable-facts.ts +837 -0
  453. package/ts/src/booking-saga.ts +133 -0
  454. package/ts/src/booking-surface/availability-policy.ts +522 -0
  455. package/ts/src/booking-surface/booking-intent.ts +86 -0
  456. package/ts/src/booking-surface/cancel-refund-commission.ts +488 -0
  457. package/ts/src/booking-surface/canonical-schema.js +116 -0
  458. package/ts/src/booking-surface/contracts.ts +475 -0
  459. package/ts/src/booking-surface/dsh-planner.ts +1949 -0
  460. package/ts/src/booking-surface/dsh-plugin.js +378 -0
  461. package/ts/src/booking-surface/dsh-worker.ts +110 -0
  462. package/ts/src/booking-surface/error-codes.ts +241 -0
  463. package/ts/src/booking-surface/index.ts +9 -0
  464. package/ts/src/booking-surface/managed-dsh-cleanup-diagnostic.ts +151 -0
  465. package/ts/src/booking-surface/managed-dsh-run-port.ts +273 -0
  466. package/ts/src/booking-surface/profile.ts +42 -0
  467. package/ts/src/booking-surface/recovery-chain.ts +409 -0
  468. package/ts/src/booking-surface/runtime.ts +1793 -0
  469. package/ts/src/booking-surface/server.ts +733 -0
  470. package/ts/src/booking-surface/startup.ts +201 -0
  471. package/ts/src/booking-surface/validation.ts +217 -0
  472. package/ts/src/companions.ts +113 -0
  473. package/ts/src/contracts.ts +13 -3
  474. package/ts/src/dsh-llm.ts +44 -11
  475. package/ts/src/flyai-setup-tool.ts +77 -0
  476. package/ts/src/index.ts +1948 -198
  477. package/ts/src/itinerary-deck.ts +189 -0
  478. package/ts/src/itinerary-doc-shared.ts +741 -0
  479. package/ts/src/itinerary-html.ts +171 -0
  480. package/ts/src/loop.ts +223 -25
  481. package/ts/src/memory-capture.ts +283 -0
  482. package/ts/src/memory-decay.ts +55 -0
  483. package/ts/src/memory-utility.ts +70 -0
  484. package/ts/src/mock-llm.ts +4 -8
  485. package/ts/src/model.ts +88 -2
  486. package/ts/src/recall/card.ts +106 -0
  487. package/ts/src/recall/evaluator.ts +170 -0
  488. package/ts/src/recall/integration.ts +35 -0
  489. package/ts/src/recall/tick.ts +213 -0
  490. package/ts/src/session-link/plan-it-action.ts +78 -0
  491. package/ts/src/session-link/session-link.ts +275 -0
  492. package/ts/src/share/adapters.ts +93 -0
  493. package/ts/src/share/share-consent.ts +105 -0
  494. package/ts/src/share/share-deck.ts +85 -0
  495. package/ts/src/share/share-token.ts +166 -0
  496. package/ts/src/slot-spec.ts +172 -0
  497. package/ts/src/state-ledger.ts +912 -0
  498. package/ts/src/subagent-job-id-guard.ts +72 -0
  499. package/ts/src/time-anchor.ts +338 -0
  500. package/ts/src/tool-packet.ts +32 -0
  501. package/ts/src/travel-slots.ts +219 -0
  502. package/ts/src/travel-timeline.ts +83 -0
  503. package/ts/src/turn-deadline.ts +366 -0
  504. package/ts/src/turn-policy.ts +154 -0
  505. package/ts/src/unified.ts +354 -88
  506. package/ts/src/wish-pool.ts +79 -0
  507. package/dist/scripts/session-attach-wait.js +0 -41
@@ -0,0 +1,2622 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://gotry.dev/schemas/booking.surface.schema.json",
4
+ "oneOf": [
5
+ {
6
+ "$ref": "#/$defs/Workspace"
7
+ },
8
+ {
9
+ "$ref": "#/$defs/Action"
10
+ },
11
+ {
12
+ "$ref": "#/$defs/Receipt"
13
+ },
14
+ {
15
+ "$ref": "#/$defs/Ingress"
16
+ },
17
+ {
18
+ "$ref": "#/$defs/UserTurn"
19
+ },
20
+ {
21
+ "$ref": "#/$defs/Continuation"
22
+ },
23
+ {
24
+ "$ref": "#/$defs/Event"
25
+ }
26
+ ],
27
+ "$defs": {
28
+ "Ref": {
29
+ "$ref": "#/$defs/OpaqueRef"
30
+ },
31
+ "Hex64": {
32
+ "type": "string",
33
+ "pattern": "^[0-9a-f]{64}$"
34
+ },
35
+ "Surface": {
36
+ "enum": [
37
+ "tenant",
38
+ "customer_portal",
39
+ "storefront",
40
+ "payment_link"
41
+ ]
42
+ },
43
+ "Kind": {
44
+ "enum": [
45
+ "search.patch",
46
+ "search.run",
47
+ "results.view.patch",
48
+ "hotel.focus",
49
+ "hotel.select",
50
+ "offers.query",
51
+ "offers.view.patch",
52
+ "offers.compare",
53
+ "offer.select",
54
+ "offer.check",
55
+ "checkout.prepare",
56
+ "order.observe"
57
+ ]
58
+ },
59
+ "Codes": {
60
+ "type": "array",
61
+ "minItems": 0,
62
+ "maxItems": 28,
63
+ "uniqueItems": true,
64
+ "items": {
65
+ "enum": [
66
+ "byos_mapped_risk",
67
+ "check_avail_failed",
68
+ "check_avail_unverified",
69
+ "component_executor_unavailable",
70
+ "hotel_not_visible",
71
+ "hotel_rates_failed",
72
+ "offer_facts_changed",
73
+ "offer_not_loaded",
74
+ "offer_unavailable",
75
+ "order_not_found",
76
+ "order_outcome_not_observed",
77
+ "order_state_unknown",
78
+ "order_status_unavailable",
79
+ "requested_offers_not_loaded",
80
+ "search_failed",
81
+ "search_form_invalid",
82
+ "search_session_expired",
83
+ "search_terminal_timeout",
84
+ "stale_revision",
85
+ "surface_adapter_failed",
86
+ "undo_token_not_found",
87
+ "unhandled",
88
+ "unsupported",
89
+ "verified_offer_required",
90
+ "workspace_changed_during_action",
91
+ "criterion_must_not_met",
92
+ "no_hotels_matched",
93
+ "offer_target_not_reached"
94
+ ]
95
+ }
96
+ },
97
+ "LoadedOffer": {
98
+ "type": "object",
99
+ "additionalProperties": false,
100
+ "required": [
101
+ "offerRef",
102
+ "offerVersionRef",
103
+ "hotelRef",
104
+ "evidenceLevel",
105
+ "factRefs"
106
+ ],
107
+ "properties": {
108
+ "offerRef": {
109
+ "$ref": "#/$defs/Ref"
110
+ },
111
+ "offerVersionRef": {
112
+ "$ref": "#/$defs/Ref"
113
+ },
114
+ "hotelRef": {
115
+ "$ref": "#/$defs/Ref"
116
+ },
117
+ "evidenceLevel": {
118
+ "enum": [
119
+ "listed",
120
+ "rate_loaded",
121
+ "checked"
122
+ ]
123
+ },
124
+ "factRefs": {
125
+ "type": "array",
126
+ "maxItems": 64,
127
+ "uniqueItems": true,
128
+ "items": {
129
+ "$ref": "#/$defs/Ref"
130
+ }
131
+ }
132
+ }
133
+ },
134
+ "VerifiedOffer": {
135
+ "type": "object",
136
+ "additionalProperties": false,
137
+ "required": [
138
+ "offerRef",
139
+ "offerVersionRef",
140
+ "verifiedOfferRef",
141
+ "expiresAt"
142
+ ],
143
+ "properties": {
144
+ "offerRef": {
145
+ "$ref": "#/$defs/Ref"
146
+ },
147
+ "offerVersionRef": {
148
+ "$ref": "#/$defs/Ref"
149
+ },
150
+ "verifiedOfferRef": {
151
+ "$ref": "#/$defs/Ref"
152
+ },
153
+ "expiresAt": {
154
+ "type": "string",
155
+ "pattern": "^\\d{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[12]\\d|3[01])T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d{1,9})?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$"
156
+ }
157
+ }
158
+ },
159
+ "ObservableOrder": {
160
+ "type": "object",
161
+ "additionalProperties": false,
162
+ "required": [
163
+ "orderRef",
164
+ "factRefs"
165
+ ],
166
+ "properties": {
167
+ "orderRef": {
168
+ "$ref": "#/$defs/Ref"
169
+ },
170
+ "factRefs": {
171
+ "type": "array",
172
+ "maxItems": 64,
173
+ "uniqueItems": true,
174
+ "items": {
175
+ "$ref": "#/$defs/Ref"
176
+ }
177
+ }
178
+ }
179
+ },
180
+ "OfferVersionInput": {
181
+ "type": "object",
182
+ "additionalProperties": false,
183
+ "required": [
184
+ "offerRef",
185
+ "offerVersionRef"
186
+ ],
187
+ "properties": {
188
+ "offerRef": {
189
+ "$ref": "#/$defs/Ref"
190
+ },
191
+ "offerVersionRef": {
192
+ "$ref": "#/$defs/Ref"
193
+ }
194
+ }
195
+ },
196
+ "CheckoutPrepareVersionInput": {
197
+ "type": "object",
198
+ "additionalProperties": false,
199
+ "required": [
200
+ "offerRef",
201
+ "offerVersionRef",
202
+ "verifiedOfferRef"
203
+ ],
204
+ "properties": {
205
+ "offerRef": {
206
+ "$ref": "#/$defs/Ref"
207
+ },
208
+ "offerVersionRef": {
209
+ "$ref": "#/$defs/Ref"
210
+ },
211
+ "verifiedOfferRef": {
212
+ "$ref": "#/$defs/Ref"
213
+ }
214
+ }
215
+ },
216
+ "Workspace": {
217
+ "type": "object",
218
+ "additionalProperties": false,
219
+ "required": [
220
+ "schemaVersion",
221
+ "contextRef",
222
+ "surface",
223
+ "revision",
224
+ "locale",
225
+ "currency",
226
+ "searchDraft",
227
+ "results",
228
+ "visibleHotels",
229
+ "loadedOffers",
230
+ "shortlistedOfferRefs",
231
+ "capabilities"
232
+ ],
233
+ "properties": {
234
+ "schemaVersion": {
235
+ "const": "booking.surface"
236
+ },
237
+ "contextRef": {
238
+ "$ref": "#/$defs/Ref"
239
+ },
240
+ "surface": {
241
+ "$ref": "#/$defs/Surface"
242
+ },
243
+ "revision": {
244
+ "$ref": "#/$defs/Revision"
245
+ },
246
+ "locale": {
247
+ "$ref": "#/$defs/NonEmptyString"
248
+ },
249
+ "currency": {
250
+ "type": "string",
251
+ "pattern": "^[A-Z]{3}$"
252
+ },
253
+ "searchDraft": {
254
+ "$ref": "#/$defs/SearchDraftSnapshot"
255
+ },
256
+ "results": {
257
+ "$ref": "#/$defs/ResultViewSnapshot"
258
+ },
259
+ "visibleHotels": {
260
+ "type": "array",
261
+ "maxItems": 100,
262
+ "items": {
263
+ "$ref": "#/$defs/VisibleHotelFact"
264
+ }
265
+ },
266
+ "loadedOffers": {
267
+ "type": "array",
268
+ "maxItems": 200,
269
+ "items": {
270
+ "$ref": "#/$defs/LoadedOffer"
271
+ }
272
+ },
273
+ "focusedHotelRef": {
274
+ "$ref": "#/$defs/Ref"
275
+ },
276
+ "shortlistedOfferRefs": {
277
+ "type": "array",
278
+ "maxItems": 100,
279
+ "uniqueItems": true,
280
+ "items": {
281
+ "$ref": "#/$defs/Ref"
282
+ }
283
+ },
284
+ "selectedOfferRef": {
285
+ "$ref": "#/$defs/Ref"
286
+ },
287
+ "verifiedOffer": {
288
+ "$ref": "#/$defs/VerifiedOffer"
289
+ },
290
+ "observableOrders": {
291
+ "type": "array",
292
+ "maxItems": 100,
293
+ "uniqueItems": true,
294
+ "items": {
295
+ "$ref": "#/$defs/ObservableOrder"
296
+ }
297
+ },
298
+ "capabilities": {
299
+ "type": "object",
300
+ "additionalProperties": false,
301
+ "required": [
302
+ "surface",
303
+ "allowedActions"
304
+ ],
305
+ "properties": {
306
+ "surface": {
307
+ "$ref": "#/$defs/Surface"
308
+ },
309
+ "allowedActions": {
310
+ "type": "array",
311
+ "minItems": 1,
312
+ "maxItems": 12,
313
+ "uniqueItems": true,
314
+ "items": {
315
+ "$ref": "#/$defs/Kind"
316
+ }
317
+ }
318
+ }
319
+ }
320
+ }
321
+ },
322
+ "IngressWorkspace": {
323
+ "type": "object",
324
+ "additionalProperties": false,
325
+ "required": [
326
+ "schemaVersion",
327
+ "revision",
328
+ "locale",
329
+ "currency",
330
+ "searchDraft",
331
+ "results",
332
+ "visibleHotels",
333
+ "loadedOffers",
334
+ "shortlistedOfferRefs"
335
+ ],
336
+ "properties": {
337
+ "schemaVersion": {
338
+ "const": "booking.surface"
339
+ },
340
+ "revision": {
341
+ "type": "integer",
342
+ "minimum": 0
343
+ },
344
+ "locale": {
345
+ "type": "string",
346
+ "minLength": 1,
347
+ "maxLength": 64
348
+ },
349
+ "currency": {
350
+ "type": "string",
351
+ "pattern": "^[A-Z]{3}$"
352
+ },
353
+ "searchDraft": {
354
+ "$ref": "#/$defs/SearchDraftSnapshot"
355
+ },
356
+ "results": {
357
+ "$ref": "#/$defs/ResultViewSnapshot"
358
+ },
359
+ "visibleHotels": {
360
+ "type": "array",
361
+ "maxItems": 100,
362
+ "items": {
363
+ "$ref": "#/$defs/VisibleHotelFact"
364
+ }
365
+ },
366
+ "loadedOffers": {
367
+ "type": "array",
368
+ "maxItems": 200,
369
+ "items": {
370
+ "$ref": "#/$defs/LoadedOffer"
371
+ }
372
+ },
373
+ "focusedHotelRef": {
374
+ "$ref": "#/$defs/Ref"
375
+ },
376
+ "shortlistedOfferRefs": {
377
+ "type": "array",
378
+ "maxItems": 100,
379
+ "uniqueItems": true,
380
+ "items": {
381
+ "$ref": "#/$defs/Ref"
382
+ }
383
+ },
384
+ "selectedOfferRef": {
385
+ "$ref": "#/$defs/Ref"
386
+ }
387
+ }
388
+ },
389
+ "PresentationKey": {
390
+ "type": "string",
391
+ "minLength": 1,
392
+ "maxLength": 512
393
+ },
394
+ "RequestKey": {
395
+ "type": "string",
396
+ "minLength": 8,
397
+ "maxLength": 128,
398
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9:._-]{7,127}$"
399
+ },
400
+ "ApprovalRef": {
401
+ "type": "object",
402
+ "additionalProperties": false,
403
+ "required": [
404
+ "approvalId",
405
+ "blockerId",
406
+ "contextRef",
407
+ "sourceTurnId",
408
+ "presentationRequestKey",
409
+ "sourceActionId",
410
+ "targetActionId",
411
+ "sourceRevision",
412
+ "targetActionKind",
413
+ "to",
414
+ "expiresAt",
415
+ "nonce",
416
+ "sourceReceiptDigest",
417
+ "scope",
418
+ "code",
419
+ "criterionPath",
420
+ "valueDigest"
421
+ ],
422
+ "properties": {
423
+ "approvalId": {
424
+ "$ref": "#/$defs/Ref"
425
+ },
426
+ "blockerId": {
427
+ "$ref": "#/$defs/Ref"
428
+ },
429
+ "contextRef": {
430
+ "$ref": "#/$defs/Ref"
431
+ },
432
+ "sourceTurnId": {
433
+ "$ref": "#/$defs/Ref"
434
+ },
435
+ "presentationRequestKey": {
436
+ "$ref": "#/$defs/PresentationKey"
437
+ },
438
+ "sourceActionId": {
439
+ "$ref": "#/$defs/Ref"
440
+ },
441
+ "targetActionId": {
442
+ "$ref": "#/$defs/Ref"
443
+ },
444
+ "sourceRevision": {
445
+ "type": "integer",
446
+ "minimum": 0
447
+ },
448
+ "targetActionKind": {
449
+ "$ref": "#/$defs/Kind"
450
+ },
451
+ "to": {
452
+ "enum": [
453
+ "prefer",
454
+ "drop"
455
+ ]
456
+ },
457
+ "expiresAt": {
458
+ "type": "string",
459
+ "minLength": 1
460
+ },
461
+ "nonce": {
462
+ "$ref": "#/$defs/Ref"
463
+ },
464
+ "sourceReceiptDigest": {
465
+ "$ref": "#/$defs/Hex64"
466
+ },
467
+ "scope": {
468
+ "enum": [
469
+ "search",
470
+ "offer",
471
+ "availability",
472
+ "checkout"
473
+ ]
474
+ },
475
+ "code": {
476
+ "enum": [
477
+ "no_hotels_matched",
478
+ "hotel_not_visible",
479
+ "hotel_rates_failed",
480
+ "criterion_must_not_met",
481
+ "offer_target_not_reached",
482
+ "offer_unavailable"
483
+ ]
484
+ },
485
+ "criterionPath": {
486
+ "type": "string",
487
+ "pattern": "^(searchDraft|results|offers|checkout)(\\.[A-Za-z][A-Za-z0-9_]*){0,3}$",
488
+ "maxLength": 160
489
+ },
490
+ "valueDigest": {
491
+ "$ref": "#/$defs/Hex64"
492
+ }
493
+ }
494
+ },
495
+ "ActionBase": {
496
+ "type": "object",
497
+ "additionalProperties": false,
498
+ "required": [
499
+ "schemaVersion",
500
+ "kind",
501
+ "actionId",
502
+ "contextRef",
503
+ "expectedRevision",
504
+ "reason",
505
+ "factRefs",
506
+ "input"
507
+ ],
508
+ "properties": {
509
+ "schemaVersion": {
510
+ "const": "booking.surface"
511
+ },
512
+ "kind": {
513
+ "$ref": "#/$defs/Kind"
514
+ },
515
+ "actionId": {
516
+ "$ref": "#/$defs/Ref"
517
+ },
518
+ "contextRef": {
519
+ "$ref": "#/$defs/Ref"
520
+ },
521
+ "expectedRevision": {
522
+ "type": "integer",
523
+ "minimum": 0
524
+ },
525
+ "reason": {
526
+ "type": "string",
527
+ "minLength": 1,
528
+ "maxLength": 1000
529
+ },
530
+ "factRefs": {
531
+ "type": "array",
532
+ "maxItems": 64,
533
+ "uniqueItems": true,
534
+ "items": {
535
+ "$ref": "#/$defs/Ref"
536
+ }
537
+ },
538
+ "input": {
539
+ "type": "object"
540
+ },
541
+ "relaxationApprovalRef": {
542
+ "$ref": "#/$defs/ApprovalRef"
543
+ }
544
+ }
545
+ },
546
+ "Action": {
547
+ "oneOf": [
548
+ {
549
+ "allOf": [
550
+ {
551
+ "$ref": "#/$defs/ActionBase"
552
+ },
553
+ {
554
+ "type": "object",
555
+ "properties": {
556
+ "kind": {
557
+ "const": "search.patch"
558
+ },
559
+ "input": {
560
+ "$ref": "#/$defs/SearchPatchInput"
561
+ }
562
+ }
563
+ }
564
+ ]
565
+ },
566
+ {
567
+ "allOf": [
568
+ {
569
+ "$ref": "#/$defs/ActionBase"
570
+ },
571
+ {
572
+ "type": "object",
573
+ "properties": {
574
+ "kind": {
575
+ "const": "search.run"
576
+ },
577
+ "input": {
578
+ "$ref": "#/$defs/SearchRunInput"
579
+ }
580
+ }
581
+ }
582
+ ]
583
+ },
584
+ {
585
+ "allOf": [
586
+ {
587
+ "$ref": "#/$defs/ActionBase"
588
+ },
589
+ {
590
+ "type": "object",
591
+ "properties": {
592
+ "kind": {
593
+ "const": "results.view.patch"
594
+ },
595
+ "input": {
596
+ "$ref": "#/$defs/ResultsViewPatchInput"
597
+ }
598
+ }
599
+ }
600
+ ]
601
+ },
602
+ {
603
+ "allOf": [
604
+ {
605
+ "$ref": "#/$defs/ActionBase"
606
+ },
607
+ {
608
+ "type": "object",
609
+ "properties": {
610
+ "kind": {
611
+ "const": "hotel.focus"
612
+ },
613
+ "input": {
614
+ "$ref": "#/$defs/HotelFocusInput"
615
+ }
616
+ }
617
+ }
618
+ ]
619
+ },
620
+ {
621
+ "allOf": [
622
+ {
623
+ "$ref": "#/$defs/ActionBase"
624
+ },
625
+ {
626
+ "type": "object",
627
+ "properties": {
628
+ "kind": {
629
+ "const": "hotel.select"
630
+ },
631
+ "input": {
632
+ "$ref": "#/$defs/HotelSelectInput"
633
+ }
634
+ }
635
+ }
636
+ ]
637
+ },
638
+ {
639
+ "allOf": [
640
+ {
641
+ "$ref": "#/$defs/ActionBase"
642
+ },
643
+ {
644
+ "type": "object",
645
+ "properties": {
646
+ "kind": {
647
+ "const": "offers.query"
648
+ },
649
+ "input": {
650
+ "$ref": "#/$defs/OffersQueryInput"
651
+ }
652
+ }
653
+ }
654
+ ]
655
+ },
656
+ {
657
+ "allOf": [
658
+ {
659
+ "$ref": "#/$defs/ActionBase"
660
+ },
661
+ {
662
+ "type": "object",
663
+ "properties": {
664
+ "kind": {
665
+ "const": "offers.view.patch"
666
+ },
667
+ "input": {
668
+ "$ref": "#/$defs/OffersViewPatchInput"
669
+ }
670
+ }
671
+ }
672
+ ]
673
+ },
674
+ {
675
+ "allOf": [
676
+ {
677
+ "$ref": "#/$defs/ActionBase"
678
+ },
679
+ {
680
+ "type": "object",
681
+ "properties": {
682
+ "kind": {
683
+ "const": "offers.compare"
684
+ },
685
+ "input": {
686
+ "$ref": "#/$defs/OffersCompareInput"
687
+ }
688
+ }
689
+ }
690
+ ]
691
+ },
692
+ {
693
+ "allOf": [
694
+ {
695
+ "$ref": "#/$defs/ActionBase"
696
+ },
697
+ {
698
+ "type": "object",
699
+ "properties": {
700
+ "kind": {
701
+ "const": "offer.select"
702
+ },
703
+ "input": {
704
+ "$ref": "#/$defs/OfferVersionInput"
705
+ }
706
+ }
707
+ }
708
+ ]
709
+ },
710
+ {
711
+ "allOf": [
712
+ {
713
+ "$ref": "#/$defs/ActionBase"
714
+ },
715
+ {
716
+ "type": "object",
717
+ "properties": {
718
+ "kind": {
719
+ "const": "offer.check"
720
+ },
721
+ "input": {
722
+ "$ref": "#/$defs/OfferVersionInput"
723
+ }
724
+ }
725
+ }
726
+ ]
727
+ },
728
+ {
729
+ "allOf": [
730
+ {
731
+ "$ref": "#/$defs/ActionBase"
732
+ },
733
+ {
734
+ "type": "object",
735
+ "properties": {
736
+ "kind": {
737
+ "const": "checkout.prepare"
738
+ },
739
+ "input": {
740
+ "$ref": "#/$defs/CheckoutPrepareVersionInput"
741
+ }
742
+ }
743
+ }
744
+ ]
745
+ },
746
+ {
747
+ "allOf": [
748
+ {
749
+ "$ref": "#/$defs/ActionBase"
750
+ },
751
+ {
752
+ "type": "object",
753
+ "properties": {
754
+ "kind": {
755
+ "const": "order.observe"
756
+ },
757
+ "input": {
758
+ "$ref": "#/$defs/OrderObserveInput"
759
+ }
760
+ }
761
+ }
762
+ ]
763
+ }
764
+ ]
765
+ },
766
+ "Approval": {
767
+ "type": "object",
768
+ "additionalProperties": false,
769
+ "required": [
770
+ "taskId",
771
+ "contextRef",
772
+ "sourceTurnId",
773
+ "presentationRequestKey",
774
+ "optionDigest",
775
+ "approvalId",
776
+ "deliveryNonce",
777
+ "blockerId",
778
+ "sourceActionId",
779
+ "sourceReceiptDigest",
780
+ "scope",
781
+ "code",
782
+ "criterionPath",
783
+ "valueDigest",
784
+ "from",
785
+ "to",
786
+ "approved"
787
+ ],
788
+ "properties": {
789
+ "taskId": {
790
+ "$ref": "#/$defs/Ref"
791
+ },
792
+ "contextRef": {
793
+ "$ref": "#/$defs/Ref"
794
+ },
795
+ "sourceTurnId": {
796
+ "$ref": "#/$defs/Ref"
797
+ },
798
+ "presentationRequestKey": {
799
+ "$ref": "#/$defs/PresentationKey"
800
+ },
801
+ "optionDigest": {
802
+ "$ref": "#/$defs/Hex64"
803
+ },
804
+ "approvalId": {
805
+ "$ref": "#/$defs/Ref"
806
+ },
807
+ "deliveryNonce": {
808
+ "$ref": "#/$defs/Ref"
809
+ },
810
+ "blockerId": {
811
+ "$ref": "#/$defs/Ref"
812
+ },
813
+ "sourceActionId": {
814
+ "$ref": "#/$defs/Ref"
815
+ },
816
+ "sourceReceiptDigest": {
817
+ "$ref": "#/$defs/Hex64"
818
+ },
819
+ "scope": {
820
+ "enum": [
821
+ "search",
822
+ "offer",
823
+ "availability",
824
+ "checkout"
825
+ ]
826
+ },
827
+ "code": {
828
+ "enum": [
829
+ "no_hotels_matched",
830
+ "hotel_not_visible",
831
+ "hotel_rates_failed",
832
+ "criterion_must_not_met",
833
+ "offer_target_not_reached",
834
+ "offer_unavailable"
835
+ ]
836
+ },
837
+ "criterionPath": {
838
+ "type": "string",
839
+ "pattern": "^(searchDraft|results|offers|checkout)(\\.[A-Za-z][A-Za-z0-9_]*){0,3}$",
840
+ "maxLength": 160
841
+ },
842
+ "valueDigest": {
843
+ "$ref": "#/$defs/Hex64"
844
+ },
845
+ "from": {
846
+ "const": "must"
847
+ },
848
+ "to": {
849
+ "enum": [
850
+ "prefer",
851
+ "drop"
852
+ ]
853
+ },
854
+ "approved": {
855
+ "const": true
856
+ }
857
+ }
858
+ },
859
+ "Blocker": {
860
+ "type": "object",
861
+ "additionalProperties": false,
862
+ "required": [
863
+ "blockerId",
864
+ "sourceActionId",
865
+ "sourceReceiptDigest",
866
+ "scope",
867
+ "code",
868
+ "criterionPath",
869
+ "strength",
870
+ "valueDigest",
871
+ "evidence"
872
+ ],
873
+ "properties": {
874
+ "blockerId": {
875
+ "$ref": "#/$defs/Ref"
876
+ },
877
+ "sourceActionId": {
878
+ "$ref": "#/$defs/Ref"
879
+ },
880
+ "sourceReceiptDigest": {
881
+ "$ref": "#/$defs/Hex64"
882
+ },
883
+ "scope": {
884
+ "enum": [
885
+ "search",
886
+ "offer",
887
+ "availability",
888
+ "checkout"
889
+ ]
890
+ },
891
+ "code": {
892
+ "enum": [
893
+ "no_hotels_matched",
894
+ "hotel_not_visible",
895
+ "hotel_rates_failed",
896
+ "criterion_must_not_met",
897
+ "offer_target_not_reached",
898
+ "offer_unavailable"
899
+ ]
900
+ },
901
+ "criterionPath": {
902
+ "type": "string",
903
+ "pattern": "^(searchDraft|results|offers|checkout)(\\.[A-Za-z][A-Za-z0-9_]*){0,3}$",
904
+ "maxLength": 160
905
+ },
906
+ "strength": {
907
+ "const": "must"
908
+ },
909
+ "valueDigest": {
910
+ "$ref": "#/$defs/Hex64"
911
+ },
912
+ "valueLabel": {
913
+ "type": "string",
914
+ "minLength": 1,
915
+ "maxLength": 120
916
+ },
917
+ "evidence": {
918
+ "type": "object",
919
+ "additionalProperties": false,
920
+ "required": [
921
+ "factRefs",
922
+ "gapCodes"
923
+ ],
924
+ "properties": {
925
+ "factRefs": {
926
+ "type": "array",
927
+ "minItems": 1,
928
+ "maxItems": 32,
929
+ "uniqueItems": true,
930
+ "items": {
931
+ "$ref": "#/$defs/Ref"
932
+ }
933
+ },
934
+ "gapCodes": {
935
+ "$ref": "#/$defs/Codes"
936
+ },
937
+ "requested": {
938
+ "type": "integer",
939
+ "minimum": 0
940
+ },
941
+ "actual": {
942
+ "type": "integer",
943
+ "minimum": 0
944
+ }
945
+ }
946
+ }
947
+ }
948
+ },
949
+ "Result": {
950
+ "type": "object",
951
+ "additionalProperties": false,
952
+ "required": [
953
+ "outcome",
954
+ "hardCriteriaMet",
955
+ "factRefs",
956
+ "gapCodes",
957
+ "blockers",
958
+ "relaxationsApplied"
959
+ ],
960
+ "properties": {
961
+ "outcome": {
962
+ "enum": [
963
+ "complete",
964
+ "partial",
965
+ "empty"
966
+ ]
967
+ },
968
+ "requestedCount": {
969
+ "type": "integer",
970
+ "minimum": 0
971
+ },
972
+ "actualCount": {
973
+ "type": "integer",
974
+ "minimum": 0
975
+ },
976
+ "hardCriteriaMet": {
977
+ "type": "boolean"
978
+ },
979
+ "factRefs": {
980
+ "type": "array",
981
+ "maxItems": 64,
982
+ "uniqueItems": true,
983
+ "items": {
984
+ "$ref": "#/$defs/Ref"
985
+ }
986
+ },
987
+ "gapCodes": {
988
+ "$ref": "#/$defs/Codes"
989
+ },
990
+ "blockers": {
991
+ "type": "array",
992
+ "maxItems": 8,
993
+ "items": {
994
+ "$ref": "#/$defs/Blocker"
995
+ }
996
+ },
997
+ "relaxationsApplied": {
998
+ "type": "array",
999
+ "maxItems": 1,
1000
+ "items": {
1001
+ "$ref": "#/$defs/Approval"
1002
+ }
1003
+ }
1004
+ }
1005
+ },
1006
+ "Observation": {
1007
+ "oneOf": [
1008
+ {
1009
+ "type": "object",
1010
+ "additionalProperties": false,
1011
+ "required": [
1012
+ "kind"
1013
+ ],
1014
+ "properties": {
1015
+ "kind": {
1016
+ "const": "search.state"
1017
+ },
1018
+ "searchSessionRef": {
1019
+ "$ref": "#/$defs/Ref"
1020
+ },
1021
+ "resultCount": {
1022
+ "type": "integer",
1023
+ "minimum": 0
1024
+ },
1025
+ "gapCodes": {
1026
+ "$ref": "#/$defs/Codes"
1027
+ }
1028
+ }
1029
+ },
1030
+ {
1031
+ "type": "object",
1032
+ "additionalProperties": false,
1033
+ "required": [
1034
+ "kind",
1035
+ "matchedHotelRefs",
1036
+ "visibleCount"
1037
+ ],
1038
+ "properties": {
1039
+ "kind": {
1040
+ "const": "results.state"
1041
+ },
1042
+ "matchedHotelRefs": {
1043
+ "type": "array",
1044
+ "maxItems": 100,
1045
+ "items": {
1046
+ "$ref": "#/$defs/Ref"
1047
+ }
1048
+ },
1049
+ "visibleCount": {
1050
+ "type": "integer",
1051
+ "minimum": 0
1052
+ },
1053
+ "gapCodes": {
1054
+ "$ref": "#/$defs/Codes"
1055
+ }
1056
+ }
1057
+ },
1058
+ {
1059
+ "type": "object",
1060
+ "additionalProperties": false,
1061
+ "required": [
1062
+ "kind",
1063
+ "hotelRef"
1064
+ ],
1065
+ "properties": {
1066
+ "kind": {
1067
+ "enum": [
1068
+ "hotel.focus",
1069
+ "hotel.selection"
1070
+ ]
1071
+ },
1072
+ "hotelRef": {
1073
+ "$ref": "#/$defs/Ref"
1074
+ }
1075
+ }
1076
+ },
1077
+ {
1078
+ "type": "object",
1079
+ "additionalProperties": false,
1080
+ "required": [
1081
+ "kind",
1082
+ "hotelRefs",
1083
+ "offerRefs",
1084
+ "loadedHotelCount"
1085
+ ],
1086
+ "properties": {
1087
+ "kind": {
1088
+ "const": "offers.state"
1089
+ },
1090
+ "hotelRefs": {
1091
+ "type": "array",
1092
+ "maxItems": 100,
1093
+ "items": {
1094
+ "$ref": "#/$defs/Ref"
1095
+ }
1096
+ },
1097
+ "offerRefs": {
1098
+ "type": "array",
1099
+ "maxItems": 200,
1100
+ "items": {
1101
+ "$ref": "#/$defs/Ref"
1102
+ }
1103
+ },
1104
+ "loadedHotelCount": {
1105
+ "type": "integer",
1106
+ "minimum": 0
1107
+ },
1108
+ "gapCodes": {
1109
+ "$ref": "#/$defs/Codes"
1110
+ }
1111
+ }
1112
+ },
1113
+ {
1114
+ "type": "object",
1115
+ "additionalProperties": false,
1116
+ "required": [
1117
+ "kind",
1118
+ "offerRef",
1119
+ "checkedOfferVersionRef",
1120
+ "available",
1121
+ "changedFactRefs"
1122
+ ],
1123
+ "properties": {
1124
+ "kind": {
1125
+ "const": "offer.availability"
1126
+ },
1127
+ "offerRef": {
1128
+ "$ref": "#/$defs/Ref"
1129
+ },
1130
+ "checkedOfferVersionRef": {
1131
+ "$ref": "#/$defs/Ref"
1132
+ },
1133
+ "currentOfferVersionRef": {
1134
+ "$ref": "#/$defs/Ref"
1135
+ },
1136
+ "verifiedOfferRef": {
1137
+ "$ref": "#/$defs/Ref"
1138
+ },
1139
+ "available": {
1140
+ "type": "boolean"
1141
+ },
1142
+ "changedFactRefs": {
1143
+ "type": "array",
1144
+ "maxItems": 64,
1145
+ "items": {
1146
+ "$ref": "#/$defs/Ref"
1147
+ }
1148
+ },
1149
+ "gapCodes": {
1150
+ "$ref": "#/$defs/Codes"
1151
+ }
1152
+ }
1153
+ },
1154
+ {
1155
+ "type": "object",
1156
+ "additionalProperties": false,
1157
+ "required": [
1158
+ "kind",
1159
+ "code",
1160
+ "factRefs"
1161
+ ],
1162
+ "properties": {
1163
+ "kind": {
1164
+ "const": "gap"
1165
+ },
1166
+ "code": {
1167
+ "enum": [
1168
+ "byos_mapped_risk",
1169
+ "check_avail_failed",
1170
+ "check_avail_unverified",
1171
+ "component_executor_unavailable",
1172
+ "hotel_not_visible",
1173
+ "hotel_rates_failed",
1174
+ "offer_facts_changed",
1175
+ "offer_not_loaded",
1176
+ "offer_unavailable",
1177
+ "order_not_found",
1178
+ "order_outcome_not_observed",
1179
+ "order_state_unknown",
1180
+ "order_status_unavailable",
1181
+ "requested_offers_not_loaded",
1182
+ "search_failed",
1183
+ "search_form_invalid",
1184
+ "search_session_expired",
1185
+ "search_terminal_timeout",
1186
+ "stale_revision",
1187
+ "surface_adapter_failed",
1188
+ "undo_token_not_found",
1189
+ "unhandled",
1190
+ "unsupported",
1191
+ "verified_offer_required",
1192
+ "workspace_changed_during_action",
1193
+ "criterion_must_not_met",
1194
+ "no_hotels_matched",
1195
+ "offer_target_not_reached"
1196
+ ]
1197
+ },
1198
+ "factRefs": {
1199
+ "type": "array",
1200
+ "maxItems": 64,
1201
+ "items": {
1202
+ "$ref": "#/$defs/Ref"
1203
+ }
1204
+ }
1205
+ }
1206
+ }
1207
+ ]
1208
+ },
1209
+ "OfferSelectionObservation": {
1210
+ "type": "object",
1211
+ "additionalProperties": false,
1212
+ "required": [
1213
+ "kind",
1214
+ "offerRef",
1215
+ "offerVersionRef"
1216
+ ],
1217
+ "properties": {
1218
+ "kind": {
1219
+ "const": "offer.selection"
1220
+ },
1221
+ "offerRef": {
1222
+ "$ref": "#/$defs/Ref"
1223
+ },
1224
+ "offerVersionRef": {
1225
+ "$ref": "#/$defs/Ref"
1226
+ }
1227
+ }
1228
+ },
1229
+ "HandoffObservation": {
1230
+ "type": "object",
1231
+ "additionalProperties": false,
1232
+ "required": [
1233
+ "kind",
1234
+ "offerRef",
1235
+ "offerVersionRef",
1236
+ "verifiedOfferRef",
1237
+ "handoffRef"
1238
+ ],
1239
+ "properties": {
1240
+ "kind": {
1241
+ "const": "checkout.handoff"
1242
+ },
1243
+ "offerRef": {
1244
+ "$ref": "#/$defs/Ref"
1245
+ },
1246
+ "offerVersionRef": {
1247
+ "$ref": "#/$defs/Ref"
1248
+ },
1249
+ "verifiedOfferRef": {
1250
+ "$ref": "#/$defs/Ref"
1251
+ },
1252
+ "handoffRef": {
1253
+ "$ref": "#/$defs/Ref"
1254
+ }
1255
+ }
1256
+ },
1257
+ "OrderObservation": {
1258
+ "type": "object",
1259
+ "additionalProperties": false,
1260
+ "required": [
1261
+ "kind",
1262
+ "orderRef",
1263
+ "state"
1264
+ ],
1265
+ "properties": {
1266
+ "kind": {
1267
+ "const": "order.state"
1268
+ },
1269
+ "orderRef": {
1270
+ "$ref": "#/$defs/Ref"
1271
+ },
1272
+ "state": {
1273
+ "enum": [
1274
+ "pending",
1275
+ "verified",
1276
+ "failed",
1277
+ "unknown"
1278
+ ]
1279
+ },
1280
+ "gapCodes": {
1281
+ "$ref": "#/$defs/Codes"
1282
+ }
1283
+ }
1284
+ },
1285
+ "ObservationExpanded": {
1286
+ "oneOf": [
1287
+ {
1288
+ "$ref": "#/$defs/Observation"
1289
+ },
1290
+ {
1291
+ "$ref": "#/$defs/OfferSelectionObservation"
1292
+ },
1293
+ {
1294
+ "$ref": "#/$defs/HandoffObservation"
1295
+ },
1296
+ {
1297
+ "$ref": "#/$defs/OrderObservation"
1298
+ }
1299
+ ]
1300
+ },
1301
+ "Receipt": {
1302
+ "type": "object",
1303
+ "additionalProperties": false,
1304
+ "required": [
1305
+ "schemaVersion",
1306
+ "kind",
1307
+ "actionId",
1308
+ "contextRef",
1309
+ "status",
1310
+ "revision",
1311
+ "observation",
1312
+ "resultContract"
1313
+ ],
1314
+ "properties": {
1315
+ "schemaVersion": {
1316
+ "const": "booking.surface"
1317
+ },
1318
+ "kind": {
1319
+ "const": "action.receipt"
1320
+ },
1321
+ "actionId": {
1322
+ "$ref": "#/$defs/Ref"
1323
+ },
1324
+ "contextRef": {
1325
+ "$ref": "#/$defs/Ref"
1326
+ },
1327
+ "status": {
1328
+ "enum": [
1329
+ "applied",
1330
+ "needs_input",
1331
+ "partial",
1332
+ "no_match",
1333
+ "unavailable",
1334
+ "changed",
1335
+ "stale",
1336
+ "unsupported",
1337
+ "failed"
1338
+ ]
1339
+ },
1340
+ "revision": {
1341
+ "type": "integer",
1342
+ "minimum": 0
1343
+ },
1344
+ "observation": {
1345
+ "$ref": "#/$defs/ObservationExpanded"
1346
+ },
1347
+ "resultContract": {
1348
+ "$ref": "#/$defs/Result"
1349
+ },
1350
+ "undoToken": {
1351
+ "$ref": "#/$defs/Ref"
1352
+ }
1353
+ }
1354
+ },
1355
+ "Ingress": {
1356
+ "type": "object",
1357
+ "additionalProperties": false,
1358
+ "required": [
1359
+ "schemaVersion",
1360
+ "kind",
1361
+ "requestKey",
1362
+ "surfaceHint",
1363
+ "workspace",
1364
+ "request"
1365
+ ],
1366
+ "properties": {
1367
+ "schemaVersion": {
1368
+ "const": "booking.surface"
1369
+ },
1370
+ "kind": {
1371
+ "const": "user.turn.ingress"
1372
+ },
1373
+ "requestKey": {
1374
+ "$ref": "#/$defs/RequestKey"
1375
+ },
1376
+ "taskHandle": {
1377
+ "$ref": "#/$defs/Ref"
1378
+ },
1379
+ "surfaceHint": {
1380
+ "$ref": "#/$defs/Surface"
1381
+ },
1382
+ "workspace": {
1383
+ "$ref": "#/$defs/IngressWorkspace"
1384
+ },
1385
+ "request": {
1386
+ "type": "object",
1387
+ "additionalProperties": false,
1388
+ "required": [
1389
+ "text"
1390
+ ],
1391
+ "properties": {
1392
+ "text": {
1393
+ "type": "string",
1394
+ "minLength": 1,
1395
+ "maxLength": 4000
1396
+ },
1397
+ "approval": {
1398
+ "$ref": "#/$defs/Approval"
1399
+ }
1400
+ }
1401
+ }
1402
+ }
1403
+ },
1404
+ "UserTurn": {
1405
+ "type": "object",
1406
+ "additionalProperties": false,
1407
+ "required": [
1408
+ "schemaVersion",
1409
+ "kind",
1410
+ "taskId",
1411
+ "turnId",
1412
+ "workspace",
1413
+ "request"
1414
+ ],
1415
+ "properties": {
1416
+ "schemaVersion": {
1417
+ "const": "booking.surface"
1418
+ },
1419
+ "kind": {
1420
+ "const": "user.turn"
1421
+ },
1422
+ "taskId": {
1423
+ "$ref": "#/$defs/Ref"
1424
+ },
1425
+ "turnId": {
1426
+ "$ref": "#/$defs/Ref"
1427
+ },
1428
+ "workspace": {
1429
+ "$ref": "#/$defs/Workspace"
1430
+ },
1431
+ "request": {
1432
+ "type": "object",
1433
+ "additionalProperties": false,
1434
+ "required": [
1435
+ "text"
1436
+ ],
1437
+ "properties": {
1438
+ "text": {
1439
+ "type": "string",
1440
+ "minLength": 1,
1441
+ "maxLength": 4000
1442
+ },
1443
+ "approval": {
1444
+ "$ref": "#/$defs/Approval"
1445
+ }
1446
+ }
1447
+ }
1448
+ }
1449
+ },
1450
+ "Continuation": {
1451
+ "type": "object",
1452
+ "additionalProperties": false,
1453
+ "required": [
1454
+ "schemaVersion",
1455
+ "kind",
1456
+ "taskId",
1457
+ "workspace",
1458
+ "receipt"
1459
+ ],
1460
+ "properties": {
1461
+ "schemaVersion": {
1462
+ "const": "booking.surface"
1463
+ },
1464
+ "kind": {
1465
+ "const": "action.receipt.continuation"
1466
+ },
1467
+ "taskId": {
1468
+ "$ref": "#/$defs/Ref"
1469
+ },
1470
+ "workspace": {
1471
+ "$ref": "#/$defs/Workspace"
1472
+ },
1473
+ "receipt": {
1474
+ "$ref": "#/$defs/Receipt"
1475
+ }
1476
+ }
1477
+ },
1478
+ "Event": {
1479
+ "oneOf": [
1480
+ {
1481
+ "$ref": "#/$defs/StatusEvent"
1482
+ },
1483
+ {
1484
+ "$ref": "#/$defs/QuestionEvent"
1485
+ },
1486
+ {
1487
+ "$ref": "#/$defs/OperationEvent"
1488
+ },
1489
+ {
1490
+ "$ref": "#/$defs/ExplanationEvent"
1491
+ },
1492
+ {
1493
+ "$ref": "#/$defs/TerminalEvent"
1494
+ },
1495
+ {
1496
+ "$ref": "#/$defs/ErrorEvent"
1497
+ }
1498
+ ]
1499
+ },
1500
+ "EventBase": {
1501
+ "type": "object",
1502
+ "required": [
1503
+ "schemaVersion",
1504
+ "eventId",
1505
+ "taskId",
1506
+ "contextRef",
1507
+ "sequence",
1508
+ "emittedAt",
1509
+ "kind"
1510
+ ],
1511
+ "properties": {
1512
+ "schemaVersion": {
1513
+ "const": "booking.surface"
1514
+ },
1515
+ "eventId": {
1516
+ "$ref": "#/$defs/Ref"
1517
+ },
1518
+ "taskId": {
1519
+ "$ref": "#/$defs/Ref"
1520
+ },
1521
+ "contextRef": {
1522
+ "$ref": "#/$defs/Ref"
1523
+ },
1524
+ "sequence": {
1525
+ "type": "integer",
1526
+ "minimum": 1
1527
+ },
1528
+ "emittedAt": {
1529
+ "type": "string",
1530
+ "minLength": 1
1531
+ },
1532
+ "kind": {
1533
+ "enum": [
1534
+ "status",
1535
+ "question",
1536
+ "operation",
1537
+ "explanation",
1538
+ "terminal",
1539
+ "error"
1540
+ ]
1541
+ }
1542
+ }
1543
+ },
1544
+ "StatusEvent": {
1545
+ "type": "object",
1546
+ "allOf": [
1547
+ {
1548
+ "$ref": "#/$defs/EventBase"
1549
+ },
1550
+ {
1551
+ "type": "object",
1552
+ "required": [
1553
+ "kind",
1554
+ "status"
1555
+ ],
1556
+ "properties": {
1557
+ "kind": {
1558
+ "const": "status"
1559
+ },
1560
+ "status": {
1561
+ "enum": [
1562
+ "submitted",
1563
+ "working",
1564
+ "waiting_receipt",
1565
+ "input_required"
1566
+ ]
1567
+ }
1568
+ }
1569
+ }
1570
+ ],
1571
+ "unevaluatedProperties": false
1572
+ },
1573
+ "QuestionEvent": {
1574
+ "type": "object",
1575
+ "additionalProperties": false,
1576
+ "required": [
1577
+ "schemaVersion",
1578
+ "eventId",
1579
+ "taskId",
1580
+ "contextRef",
1581
+ "sequence",
1582
+ "emittedAt",
1583
+ "kind",
1584
+ "question"
1585
+ ],
1586
+ "properties": {
1587
+ "schemaVersion": {
1588
+ "const": "booking.surface"
1589
+ },
1590
+ "eventId": {
1591
+ "$ref": "#/$defs/Ref"
1592
+ },
1593
+ "taskId": {
1594
+ "$ref": "#/$defs/Ref"
1595
+ },
1596
+ "contextRef": {
1597
+ "$ref": "#/$defs/Ref"
1598
+ },
1599
+ "sequence": {
1600
+ "type": "integer",
1601
+ "minimum": 1
1602
+ },
1603
+ "emittedAt": {
1604
+ "type": "string",
1605
+ "minLength": 1
1606
+ },
1607
+ "kind": {
1608
+ "const": "question"
1609
+ },
1610
+ "question": {
1611
+ "type": "object",
1612
+ "additionalProperties": false,
1613
+ "required": [
1614
+ "questionId",
1615
+ "prompt",
1616
+ "missingFields",
1617
+ "type",
1618
+ "blocker",
1619
+ "approvalOptions"
1620
+ ],
1621
+ "properties": {
1622
+ "questionId": {
1623
+ "$ref": "#/$defs/Ref"
1624
+ },
1625
+ "prompt": {
1626
+ "type": "string",
1627
+ "minLength": 1
1628
+ },
1629
+ "missingFields": {
1630
+ "type": "array",
1631
+ "maxItems": 32,
1632
+ "items": {
1633
+ "type": "string"
1634
+ }
1635
+ },
1636
+ "type": {
1637
+ "const": "relaxation_approval_required"
1638
+ },
1639
+ "blocker": {
1640
+ "$ref": "#/$defs/Blocker"
1641
+ },
1642
+ "approvalOptions": {
1643
+ "type": "array",
1644
+ "minItems": 1,
1645
+ "maxItems": 2,
1646
+ "items": {
1647
+ "type": "object",
1648
+ "additionalProperties": false,
1649
+ "required": [
1650
+ "approval"
1651
+ ],
1652
+ "properties": {
1653
+ "approval": {
1654
+ "$ref": "#/$defs/Approval"
1655
+ }
1656
+ }
1657
+ }
1658
+ }
1659
+ }
1660
+ }
1661
+ }
1662
+ },
1663
+ "OperationEvent": {
1664
+ "type": "object",
1665
+ "allOf": [
1666
+ {
1667
+ "$ref": "#/$defs/EventBase"
1668
+ },
1669
+ {
1670
+ "type": "object",
1671
+ "required": [
1672
+ "kind",
1673
+ "action"
1674
+ ],
1675
+ "properties": {
1676
+ "kind": {
1677
+ "const": "operation"
1678
+ },
1679
+ "action": {
1680
+ "$ref": "#/$defs/Action"
1681
+ }
1682
+ }
1683
+ }
1684
+ ],
1685
+ "unevaluatedProperties": false
1686
+ },
1687
+ "ExplanationEvent": {
1688
+ "type": "object",
1689
+ "allOf": [
1690
+ {
1691
+ "$ref": "#/$defs/EventBase"
1692
+ },
1693
+ {
1694
+ "type": "object",
1695
+ "required": [
1696
+ "kind",
1697
+ "explanation"
1698
+ ],
1699
+ "properties": {
1700
+ "kind": {
1701
+ "const": "explanation"
1702
+ },
1703
+ "explanation": {
1704
+ "type": "object",
1705
+ "additionalProperties": false,
1706
+ "required": [
1707
+ "text",
1708
+ "factRefs"
1709
+ ],
1710
+ "properties": {
1711
+ "text": {
1712
+ "type": "string",
1713
+ "minLength": 1
1714
+ },
1715
+ "factRefs": {
1716
+ "type": "array",
1717
+ "maxItems": 64,
1718
+ "items": {
1719
+ "$ref": "#/$defs/Ref"
1720
+ }
1721
+ }
1722
+ }
1723
+ }
1724
+ }
1725
+ }
1726
+ ],
1727
+ "unevaluatedProperties": false
1728
+ },
1729
+ "TerminalEvent": {
1730
+ "type": "object",
1731
+ "allOf": [
1732
+ {
1733
+ "$ref": "#/$defs/EventBase"
1734
+ },
1735
+ {
1736
+ "type": "object",
1737
+ "required": [
1738
+ "kind",
1739
+ "terminal"
1740
+ ],
1741
+ "properties": {
1742
+ "kind": {
1743
+ "const": "terminal"
1744
+ },
1745
+ "terminal": {
1746
+ "type": "object",
1747
+ "additionalProperties": false,
1748
+ "required": [
1749
+ "status",
1750
+ "summary",
1751
+ "factRefs"
1752
+ ],
1753
+ "properties": {
1754
+ "status": {
1755
+ "enum": [
1756
+ "completed",
1757
+ "stopped"
1758
+ ]
1759
+ },
1760
+ "summary": {
1761
+ "type": "string",
1762
+ "minLength": 1
1763
+ },
1764
+ "factRefs": {
1765
+ "type": "array",
1766
+ "maxItems": 64,
1767
+ "items": {
1768
+ "$ref": "#/$defs/Ref"
1769
+ }
1770
+ }
1771
+ }
1772
+ }
1773
+ }
1774
+ }
1775
+ ],
1776
+ "unevaluatedProperties": false
1777
+ },
1778
+ "ErrorEvent": {
1779
+ "type": "object",
1780
+ "allOf": [
1781
+ {
1782
+ "$ref": "#/$defs/EventBase"
1783
+ },
1784
+ {
1785
+ "type": "object",
1786
+ "required": [
1787
+ "kind",
1788
+ "error"
1789
+ ],
1790
+ "properties": {
1791
+ "kind": {
1792
+ "const": "error"
1793
+ },
1794
+ "error": {
1795
+ "type": "object",
1796
+ "additionalProperties": false,
1797
+ "required": [
1798
+ "code",
1799
+ "message",
1800
+ "retryable"
1801
+ ],
1802
+ "properties": {
1803
+ "code": {
1804
+ "type": "string",
1805
+ "pattern": "^[A-Z][A-Z0-9_.-]*$"
1806
+ },
1807
+ "message": {
1808
+ "type": "string",
1809
+ "minLength": 1
1810
+ },
1811
+ "retryable": {
1812
+ "type": "boolean"
1813
+ }
1814
+ }
1815
+ }
1816
+ }
1817
+ }
1818
+ ],
1819
+ "unevaluatedProperties": false
1820
+ },
1821
+ "BooleanCriterion": {
1822
+ "type": "object",
1823
+ "required": [
1824
+ "strength",
1825
+ "value"
1826
+ ],
1827
+ "properties": {
1828
+ "strength": {
1829
+ "enum": [
1830
+ "must",
1831
+ "prefer"
1832
+ ]
1833
+ },
1834
+ "value": {
1835
+ "type": "boolean"
1836
+ }
1837
+ },
1838
+ "additionalProperties": false
1839
+ },
1840
+ "HotelFocusInput": {
1841
+ "type": "object",
1842
+ "required": [
1843
+ "hotelRef"
1844
+ ],
1845
+ "properties": {
1846
+ "hotelRef": {
1847
+ "$ref": "#/$defs/OpaqueRef"
1848
+ }
1849
+ },
1850
+ "additionalProperties": false
1851
+ },
1852
+ "HotelSelectInput": {
1853
+ "type": "object",
1854
+ "required": [
1855
+ "hotelRef"
1856
+ ],
1857
+ "properties": {
1858
+ "hotelRef": {
1859
+ "$ref": "#/$defs/OpaqueRef"
1860
+ }
1861
+ },
1862
+ "additionalProperties": false
1863
+ },
1864
+ "IntegerCriterion": {
1865
+ "type": "object",
1866
+ "required": [
1867
+ "strength",
1868
+ "value"
1869
+ ],
1870
+ "properties": {
1871
+ "strength": {
1872
+ "enum": [
1873
+ "must",
1874
+ "prefer"
1875
+ ]
1876
+ },
1877
+ "value": {
1878
+ "type": "integer",
1879
+ "minimum": 0
1880
+ }
1881
+ },
1882
+ "additionalProperties": false
1883
+ },
1884
+ "MoneyCriterion": {
1885
+ "type": "object",
1886
+ "required": [
1887
+ "strength",
1888
+ "value"
1889
+ ],
1890
+ "properties": {
1891
+ "strength": {
1892
+ "enum": [
1893
+ "must",
1894
+ "prefer"
1895
+ ]
1896
+ },
1897
+ "value": {
1898
+ "$ref": "#/$defs/Money"
1899
+ }
1900
+ },
1901
+ "additionalProperties": false
1902
+ },
1903
+ "Money": {
1904
+ "type": "object",
1905
+ "required": [
1906
+ "amount",
1907
+ "currency",
1908
+ "sourceFactRef"
1909
+ ],
1910
+ "properties": {
1911
+ "amount": {
1912
+ "type": "string",
1913
+ "pattern": "^-?[0-9]+(?:\\.[0-9]+)?$",
1914
+ "maxLength": 64
1915
+ },
1916
+ "currency": {
1917
+ "type": "string",
1918
+ "pattern": "^[A-Z]{3}$"
1919
+ },
1920
+ "sourceFactRef": {
1921
+ "$ref": "#/$defs/OpaqueRef"
1922
+ }
1923
+ },
1924
+ "additionalProperties": false
1925
+ },
1926
+ "NonEmptyString": {
1927
+ "type": "string",
1928
+ "minLength": 1,
1929
+ "maxLength": 4096
1930
+ },
1931
+ "OccupancyRoom": {
1932
+ "type": "object",
1933
+ "required": [
1934
+ "adults",
1935
+ "childAges"
1936
+ ],
1937
+ "properties": {
1938
+ "adults": {
1939
+ "type": "integer",
1940
+ "minimum": 1,
1941
+ "maximum": 20
1942
+ },
1943
+ "childAges": {
1944
+ "type": "array",
1945
+ "maxItems": 20,
1946
+ "items": {
1947
+ "type": "integer",
1948
+ "minimum": 0,
1949
+ "maximum": 17
1950
+ }
1951
+ }
1952
+ },
1953
+ "additionalProperties": false
1954
+ },
1955
+ "OfferCriteria": {
1956
+ "type": "object",
1957
+ "properties": {
1958
+ "roomType": {
1959
+ "$ref": "#/$defs/StringArrayCriterion"
1960
+ },
1961
+ "bedType": {
1962
+ "$ref": "#/$defs/StringArrayCriterion"
1963
+ },
1964
+ "meals": {
1965
+ "$ref": "#/$defs/StringArrayCriterion"
1966
+ },
1967
+ "freeCancellation": {
1968
+ "$ref": "#/$defs/BooleanCriterion"
1969
+ },
1970
+ "freeCancellationUntil": {
1971
+ "$ref": "#/$defs/StringCriterion"
1972
+ },
1973
+ "totalPriceMax": {
1974
+ "$ref": "#/$defs/MoneyCriterion"
1975
+ },
1976
+ "roomsAvailableMin": {
1977
+ "$ref": "#/$defs/IntegerCriterion"
1978
+ },
1979
+ "payAtProperty": {
1980
+ "$ref": "#/$defs/BooleanCriterion"
1981
+ },
1982
+ "mobileRate": {
1983
+ "$ref": "#/$defs/BooleanCriterion"
1984
+ },
1985
+ "targetCount": {
1986
+ "type": "integer",
1987
+ "minimum": 1,
1988
+ "maximum": 50
1989
+ },
1990
+ "sort": {
1991
+ "enum": [
1992
+ "best_match",
1993
+ "total_price_asc",
1994
+ "cancellation_latest"
1995
+ ]
1996
+ }
1997
+ },
1998
+ "additionalProperties": false
1999
+ },
2000
+ "OffersCompareInput": {
2001
+ "type": "object",
2002
+ "required": [
2003
+ "offerRefs",
2004
+ "requestedCount"
2005
+ ],
2006
+ "properties": {
2007
+ "offerRefs": {
2008
+ "type": "array",
2009
+ "minItems": 1,
2010
+ "maxItems": 50,
2011
+ "uniqueItems": true,
2012
+ "items": {
2013
+ "$ref": "#/$defs/OpaqueRef"
2014
+ }
2015
+ },
2016
+ "requestedCount": {
2017
+ "type": "integer",
2018
+ "minimum": 1,
2019
+ "maximum": 50
2020
+ }
2021
+ },
2022
+ "additionalProperties": false
2023
+ },
2024
+ "OffersQueryInput": {
2025
+ "type": "object",
2026
+ "required": [
2027
+ "hotelRefs",
2028
+ "criteria"
2029
+ ],
2030
+ "properties": {
2031
+ "hotelRefs": {
2032
+ "type": "array",
2033
+ "minItems": 1,
2034
+ "maxItems": 100,
2035
+ "uniqueItems": true,
2036
+ "items": {
2037
+ "$ref": "#/$defs/OpaqueRef"
2038
+ }
2039
+ },
2040
+ "criteria": {
2041
+ "$ref": "#/$defs/OfferCriteria"
2042
+ }
2043
+ },
2044
+ "additionalProperties": false
2045
+ },
2046
+ "OffersViewPatchInput": {
2047
+ "type": "object",
2048
+ "required": [
2049
+ "hotelRef",
2050
+ "criteria"
2051
+ ],
2052
+ "properties": {
2053
+ "hotelRef": {
2054
+ "$ref": "#/$defs/OpaqueRef"
2055
+ },
2056
+ "criteria": {
2057
+ "$ref": "#/$defs/OfferCriteria"
2058
+ }
2059
+ },
2060
+ "additionalProperties": false
2061
+ },
2062
+ "OpaqueRef": {
2063
+ "type": "string",
2064
+ "minLength": 1,
2065
+ "maxLength": 512
2066
+ },
2067
+ "OrderObserveInput": {
2068
+ "type": "object",
2069
+ "required": [
2070
+ "orderRef"
2071
+ ],
2072
+ "properties": {
2073
+ "orderRef": {
2074
+ "$ref": "#/$defs/OpaqueRef"
2075
+ }
2076
+ },
2077
+ "additionalProperties": false
2078
+ },
2079
+ "ResultViewSnapshot": {
2080
+ "type": "object",
2081
+ "required": [
2082
+ "status"
2083
+ ],
2084
+ "properties": {
2085
+ "status": {
2086
+ "enum": [
2087
+ "idle",
2088
+ "loading",
2089
+ "ready",
2090
+ "partial",
2091
+ "failed"
2092
+ ]
2093
+ },
2094
+ "filters": {
2095
+ "$ref": "#/$defs/ResultsViewPatch"
2096
+ },
2097
+ "sort": {
2098
+ "enum": [
2099
+ "recommended",
2100
+ "price_asc",
2101
+ "price_desc",
2102
+ "rating_desc",
2103
+ "distance_asc"
2104
+ ]
2105
+ },
2106
+ "resultCount": {
2107
+ "type": "integer",
2108
+ "minimum": 0
2109
+ },
2110
+ "searchSessionRef": {
2111
+ "$ref": "#/$defs/OpaqueRef"
2112
+ }
2113
+ },
2114
+ "additionalProperties": false
2115
+ },
2116
+ "ResultsViewPatchInput": {
2117
+ "type": "object",
2118
+ "required": [
2119
+ "patch"
2120
+ ],
2121
+ "properties": {
2122
+ "patch": {
2123
+ "$ref": "#/$defs/ResultsViewPatch"
2124
+ }
2125
+ },
2126
+ "additionalProperties": false
2127
+ },
2128
+ "ResultsViewPatch": {
2129
+ "type": "object",
2130
+ "minProperties": 1,
2131
+ "properties": {
2132
+ "starRating": {
2133
+ "type": [
2134
+ "object",
2135
+ "null"
2136
+ ],
2137
+ "properties": {
2138
+ "min": {
2139
+ "type": "number",
2140
+ "minimum": 0,
2141
+ "maximum": 5
2142
+ },
2143
+ "max": {
2144
+ "type": "number",
2145
+ "minimum": 0,
2146
+ "maximum": 5
2147
+ }
2148
+ },
2149
+ "additionalProperties": false
2150
+ },
2151
+ "guestRatingMin": {
2152
+ "type": [
2153
+ "number",
2154
+ "null"
2155
+ ],
2156
+ "minimum": 0,
2157
+ "maximum": 10
2158
+ },
2159
+ "facilitiesAllOf": {
2160
+ "type": [
2161
+ "array",
2162
+ "null"
2163
+ ],
2164
+ "items": {
2165
+ "$ref": "#/$defs/NonEmptyString"
2166
+ },
2167
+ "uniqueItems": true,
2168
+ "maxItems": 100
2169
+ },
2170
+ "distance": {
2171
+ "type": [
2172
+ "object",
2173
+ "null"
2174
+ ],
2175
+ "required": [
2176
+ "anchorRef",
2177
+ "maxKm"
2178
+ ],
2179
+ "properties": {
2180
+ "anchorRef": {
2181
+ "$ref": "#/$defs/OpaqueRef"
2182
+ },
2183
+ "maxKm": {
2184
+ "type": "number",
2185
+ "exclusiveMinimum": 0,
2186
+ "maximum": 50000
2187
+ }
2188
+ },
2189
+ "additionalProperties": false
2190
+ },
2191
+ "price": {
2192
+ "type": [
2193
+ "object",
2194
+ "null"
2195
+ ],
2196
+ "properties": {
2197
+ "min": {
2198
+ "$ref": "#/$defs/Money"
2199
+ },
2200
+ "max": {
2201
+ "$ref": "#/$defs/Money"
2202
+ }
2203
+ },
2204
+ "additionalProperties": false
2205
+ },
2206
+ "sort": {
2207
+ "enum": [
2208
+ "recommended",
2209
+ "price_asc",
2210
+ "price_desc",
2211
+ "rating_desc",
2212
+ "distance_asc"
2213
+ ]
2214
+ }
2215
+ },
2216
+ "additionalProperties": false
2217
+ },
2218
+ "Revision": {
2219
+ "type": "integer",
2220
+ "minimum": 0
2221
+ },
2222
+ "SearchCriteriaPatch": {
2223
+ "type": "object",
2224
+ "minProperties": 1,
2225
+ "properties": {
2226
+ "destination": {
2227
+ "type": "object",
2228
+ "minProperties": 1,
2229
+ "properties": {
2230
+ "query": {
2231
+ "$ref": "#/$defs/NonEmptyString"
2232
+ },
2233
+ "placeRef": {
2234
+ "$ref": "#/$defs/OpaqueRef"
2235
+ }
2236
+ },
2237
+ "additionalProperties": false
2238
+ },
2239
+ "hotel": {
2240
+ "type": "object",
2241
+ "required": [
2242
+ "strength",
2243
+ "value"
2244
+ ],
2245
+ "properties": {
2246
+ "strength": {
2247
+ "enum": [
2248
+ "must",
2249
+ "prefer"
2250
+ ]
2251
+ },
2252
+ "value": {
2253
+ "type": "object",
2254
+ "minProperties": 1,
2255
+ "properties": {
2256
+ "name": {
2257
+ "$ref": "#/$defs/NonEmptyString"
2258
+ },
2259
+ "hotelRef": {
2260
+ "$ref": "#/$defs/OpaqueRef"
2261
+ }
2262
+ },
2263
+ "additionalProperties": false
2264
+ }
2265
+ },
2266
+ "additionalProperties": false
2267
+ },
2268
+ "stay": {
2269
+ "type": "object",
2270
+ "minProperties": 1,
2271
+ "properties": {
2272
+ "checkIn": {
2273
+ "type": "string",
2274
+ "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$"
2275
+ },
2276
+ "checkOut": {
2277
+ "type": "string",
2278
+ "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$"
2279
+ }
2280
+ },
2281
+ "additionalProperties": false
2282
+ },
2283
+ "occupancy": {
2284
+ "type": "object",
2285
+ "required": [
2286
+ "rooms"
2287
+ ],
2288
+ "properties": {
2289
+ "rooms": {
2290
+ "type": "array",
2291
+ "minItems": 1,
2292
+ "maxItems": 20,
2293
+ "items": {
2294
+ "$ref": "#/$defs/OccupancyRoom"
2295
+ }
2296
+ }
2297
+ },
2298
+ "additionalProperties": false
2299
+ },
2300
+ "budget": {
2301
+ "type": "object",
2302
+ "required": [
2303
+ "strength",
2304
+ "value"
2305
+ ],
2306
+ "properties": {
2307
+ "strength": {
2308
+ "enum": [
2309
+ "must",
2310
+ "prefer"
2311
+ ]
2312
+ },
2313
+ "value": {
2314
+ "type": "object",
2315
+ "minProperties": 1,
2316
+ "properties": {
2317
+ "min": {
2318
+ "$ref": "#/$defs/Money"
2319
+ },
2320
+ "max": {
2321
+ "$ref": "#/$defs/Money"
2322
+ }
2323
+ },
2324
+ "additionalProperties": false
2325
+ }
2326
+ },
2327
+ "additionalProperties": false
2328
+ },
2329
+ "starRating": {
2330
+ "type": "object",
2331
+ "required": [
2332
+ "strength",
2333
+ "value"
2334
+ ],
2335
+ "properties": {
2336
+ "strength": {
2337
+ "enum": [
2338
+ "must",
2339
+ "prefer"
2340
+ ]
2341
+ },
2342
+ "value": {
2343
+ "type": "object",
2344
+ "minProperties": 1,
2345
+ "properties": {
2346
+ "min": {
2347
+ "type": "number",
2348
+ "minimum": 0,
2349
+ "maximum": 5
2350
+ },
2351
+ "max": {
2352
+ "type": "number",
2353
+ "minimum": 0,
2354
+ "maximum": 5
2355
+ }
2356
+ },
2357
+ "additionalProperties": false
2358
+ }
2359
+ },
2360
+ "additionalProperties": false
2361
+ },
2362
+ "guestRating": {
2363
+ "type": "object",
2364
+ "required": [
2365
+ "strength",
2366
+ "value"
2367
+ ],
2368
+ "properties": {
2369
+ "strength": {
2370
+ "enum": [
2371
+ "must",
2372
+ "prefer"
2373
+ ]
2374
+ },
2375
+ "value": {
2376
+ "type": "object",
2377
+ "required": [
2378
+ "min"
2379
+ ],
2380
+ "properties": {
2381
+ "min": {
2382
+ "type": "number",
2383
+ "minimum": 0,
2384
+ "maximum": 10
2385
+ }
2386
+ },
2387
+ "additionalProperties": false
2388
+ }
2389
+ },
2390
+ "additionalProperties": false
2391
+ },
2392
+ "facilities": {
2393
+ "type": "object",
2394
+ "required": [
2395
+ "strength",
2396
+ "value"
2397
+ ],
2398
+ "properties": {
2399
+ "strength": {
2400
+ "enum": [
2401
+ "must",
2402
+ "prefer"
2403
+ ]
2404
+ },
2405
+ "value": {
2406
+ "type": "object",
2407
+ "required": [
2408
+ "allOf"
2409
+ ],
2410
+ "properties": {
2411
+ "allOf": {
2412
+ "type": "array",
2413
+ "minItems": 1,
2414
+ "maxItems": 100,
2415
+ "uniqueItems": true,
2416
+ "items": {
2417
+ "$ref": "#/$defs/NonEmptyString"
2418
+ }
2419
+ }
2420
+ },
2421
+ "additionalProperties": false
2422
+ }
2423
+ },
2424
+ "additionalProperties": false
2425
+ },
2426
+ "distance": {
2427
+ "type": "object",
2428
+ "required": [
2429
+ "strength",
2430
+ "value"
2431
+ ],
2432
+ "properties": {
2433
+ "strength": {
2434
+ "enum": [
2435
+ "must",
2436
+ "prefer"
2437
+ ]
2438
+ },
2439
+ "value": {
2440
+ "type": "object",
2441
+ "required": [
2442
+ "maxKm"
2443
+ ],
2444
+ "properties": {
2445
+ "anchorLabel": {
2446
+ "$ref": "#/$defs/NonEmptyString"
2447
+ },
2448
+ "anchorRef": {
2449
+ "$ref": "#/$defs/OpaqueRef"
2450
+ },
2451
+ "maxKm": {
2452
+ "type": "number",
2453
+ "exclusiveMinimum": 0,
2454
+ "maximum": 50000
2455
+ }
2456
+ },
2457
+ "additionalProperties": false
2458
+ }
2459
+ },
2460
+ "additionalProperties": false
2461
+ }
2462
+ },
2463
+ "additionalProperties": false
2464
+ },
2465
+ "SearchDraftSnapshot": {
2466
+ "type": "object",
2467
+ "properties": {
2468
+ "destination": {
2469
+ "type": "object",
2470
+ "properties": {
2471
+ "query": {
2472
+ "$ref": "#/$defs/NonEmptyString"
2473
+ },
2474
+ "placeRef": {
2475
+ "$ref": "#/$defs/OpaqueRef"
2476
+ }
2477
+ },
2478
+ "additionalProperties": false
2479
+ },
2480
+ "stay": {
2481
+ "type": "object",
2482
+ "properties": {
2483
+ "checkIn": {
2484
+ "type": "string",
2485
+ "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$"
2486
+ },
2487
+ "checkOut": {
2488
+ "type": "string",
2489
+ "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$"
2490
+ }
2491
+ },
2492
+ "additionalProperties": false
2493
+ },
2494
+ "occupancy": {
2495
+ "type": "object",
2496
+ "required": [
2497
+ "rooms"
2498
+ ],
2499
+ "properties": {
2500
+ "rooms": {
2501
+ "type": "array",
2502
+ "items": {
2503
+ "$ref": "#/$defs/OccupancyRoom"
2504
+ },
2505
+ "maxItems": 20
2506
+ }
2507
+ },
2508
+ "additionalProperties": false
2509
+ },
2510
+ "criteria": {
2511
+ "$ref": "#/$defs/SearchCriteriaPatch"
2512
+ }
2513
+ },
2514
+ "additionalProperties": false
2515
+ },
2516
+ "SearchPatchInput": {
2517
+ "type": "object",
2518
+ "required": [
2519
+ "patch"
2520
+ ],
2521
+ "properties": {
2522
+ "patch": {
2523
+ "$ref": "#/$defs/SearchCriteriaPatch"
2524
+ }
2525
+ },
2526
+ "additionalProperties": false
2527
+ },
2528
+ "SearchRunInput": {
2529
+ "type": "object",
2530
+ "maxProperties": 0,
2531
+ "additionalProperties": false
2532
+ },
2533
+ "StringArrayCriterion": {
2534
+ "type": "object",
2535
+ "required": [
2536
+ "strength",
2537
+ "value"
2538
+ ],
2539
+ "properties": {
2540
+ "strength": {
2541
+ "enum": [
2542
+ "must",
2543
+ "prefer"
2544
+ ]
2545
+ },
2546
+ "value": {
2547
+ "type": "array",
2548
+ "minItems": 1,
2549
+ "maxItems": 100,
2550
+ "uniqueItems": true,
2551
+ "items": {
2552
+ "$ref": "#/$defs/NonEmptyString"
2553
+ }
2554
+ }
2555
+ },
2556
+ "additionalProperties": false
2557
+ },
2558
+ "StringCriterion": {
2559
+ "type": "object",
2560
+ "required": [
2561
+ "strength",
2562
+ "value"
2563
+ ],
2564
+ "properties": {
2565
+ "strength": {
2566
+ "enum": [
2567
+ "must",
2568
+ "prefer"
2569
+ ]
2570
+ },
2571
+ "value": {
2572
+ "$ref": "#/$defs/NonEmptyString"
2573
+ }
2574
+ },
2575
+ "additionalProperties": false
2576
+ },
2577
+ "VisibleHotelFact": {
2578
+ "type": "object",
2579
+ "required": [
2580
+ "hotelRef",
2581
+ "name",
2582
+ "factRefs"
2583
+ ],
2584
+ "properties": {
2585
+ "hotelRef": {
2586
+ "$ref": "#/$defs/OpaqueRef"
2587
+ },
2588
+ "name": {
2589
+ "$ref": "#/$defs/NonEmptyString"
2590
+ },
2591
+ "starRating": {
2592
+ "type": "number",
2593
+ "minimum": 0,
2594
+ "maximum": 5
2595
+ },
2596
+ "guestRating": {
2597
+ "type": "number",
2598
+ "minimum": 0,
2599
+ "maximum": 10
2600
+ },
2601
+ "distanceKm": {
2602
+ "type": "number",
2603
+ "minimum": 0
2604
+ },
2605
+ "facilityCodes": {
2606
+ "type": "array",
2607
+ "uniqueItems": true,
2608
+ "items": {
2609
+ "$ref": "#/$defs/NonEmptyString"
2610
+ }
2611
+ },
2612
+ "factRefs": {
2613
+ "type": "array",
2614
+ "items": {
2615
+ "$ref": "#/$defs/OpaqueRef"
2616
+ }
2617
+ }
2618
+ },
2619
+ "additionalProperties": false
2620
+ }
2621
+ }
2622
+ }