@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,113 @@
1
+ /**
2
+ * Runtime projection of the canonical booking.surface.v1 JSON Schema.
3
+ *
4
+ * dsh tools need self-contained JSON Schemas, while the canonical document is
5
+ * organized with local $refs. This helper derives each action branch directly
6
+ * from those canonical bytes and recursively inlines local references. No
7
+ * model-facing action schema is maintained by hand.
8
+ */
9
+
10
+ import { readFileSync } from 'node:fs'
11
+
12
+ const schemaUrl = new URL('../../../schemas/booking.surface.v1.schema.json', import.meta.url)
13
+ export const canonicalBookingSurfaceSchemaV1 = JSON.parse(readFileSync(schemaUrl, 'utf8'))
14
+ const schemaV2Url = new URL('../../../schemas/booking.surface.v2.schema.json', import.meta.url)
15
+ export const canonicalBookingSurfaceSchemaV2 = JSON.parse(readFileSync(schemaV2Url, 'utf8'))
16
+
17
+ function clone(value) {
18
+ return JSON.parse(JSON.stringify(value))
19
+ }
20
+
21
+ function definitionFromRef(ref, schema) {
22
+ const prefix = '#/$defs/'
23
+ if (typeof ref !== 'string') {
24
+ throw new Error(`booking_schema_external_ref_forbidden:${String(ref)}`)
25
+ }
26
+ const externalV1 = 'https://gotry.dev/schemas/booking.surface.v1.schema.json#/$defs/'
27
+ const definitionSchema = ref.startsWith(prefix) ? schema : ref.startsWith(externalV1) ? canonicalBookingSurfaceSchemaV1 : undefined
28
+ if (!definitionSchema) throw new Error(`booking_schema_external_ref_forbidden:${String(ref)}`)
29
+ const name = ref.startsWith(prefix) ? ref.slice(prefix.length) : ref.slice(externalV1.length)
30
+ const definition = definitionSchema.$defs?.[name]
31
+ if (!definition) throw new Error(`booking_schema_missing_definition:${name}`)
32
+ return definition
33
+ }
34
+
35
+ function inlineLocalRefs(value, schema, stack = []) {
36
+ if (Array.isArray(value)) return value.map((item) => inlineLocalRefs(item, schema, stack))
37
+ if (typeof value !== 'object' || value === null) return value
38
+ if (typeof value.$ref === 'string') {
39
+ if (stack.includes(value.$ref)) throw new Error(`booking_schema_recursive_ref:${value.$ref}`)
40
+ const { $ref, ...siblings } = value
41
+ const definitionSchema = typeof $ref === 'string' && $ref.startsWith('https://gotry.dev/schemas/booking.surface.v1.schema.json#/$defs/') ? canonicalBookingSurfaceSchemaV1 : schema
42
+ return {
43
+ ...inlineLocalRefs(definitionFromRef($ref, schema), definitionSchema, [...stack, $ref]),
44
+ ...inlineLocalRefs(siblings, schema, stack),
45
+ }
46
+ }
47
+ return Object.fromEntries(Object.entries(value).map(([key, item]) => [key, inlineLocalRefs(item, schema, stack)]))
48
+ }
49
+
50
+ function canonicalActionSchemaForKind(kind, schema, definitionName) {
51
+ const action = schema.$defs?.[definitionName]
52
+ if (!action) throw new Error('booking_schema_action_union_missing')
53
+ if (Array.isArray(action.allOf)) {
54
+ const branch = action.allOf.find((candidate) => candidate?.if?.properties?.kind?.const === kind)
55
+ const input = branch?.then?.properties?.input
56
+ if (!input) throw new Error(`booking_schema_action_kind_missing:${kind}`)
57
+ return clone(inlineLocalRefs({
58
+ type: action.type,
59
+ required: action.required,
60
+ properties: { ...action.properties, kind: { type: 'string', const: kind }, input },
61
+ additionalProperties: action.additionalProperties,
62
+ }, schema))
63
+ }
64
+ if (!Array.isArray(action.oneOf)) throw new Error('booking_schema_action_union_missing')
65
+ const branch = action.oneOf.find((candidate) => candidate?.allOf?.some((part) => part?.properties?.kind?.const === kind))
66
+ const base = schema.$defs?.ActionBase
67
+ const input = branch?.allOf?.find((part) => part?.properties?.input)?.properties?.input
68
+ if (!base || !input) throw new Error(`booking_schema_action_kind_missing:${kind}`)
69
+ return clone(inlineLocalRefs({
70
+ ...base,
71
+ properties: { ...base.properties, kind: { type: 'string', const: kind }, input },
72
+ }, schema))
73
+ }
74
+
75
+ export function canonicalBookingActionSchemaForKind(kind) {
76
+ return canonicalActionSchemaForKind(kind, canonicalBookingSurfaceSchemaV1, 'BookingReadActionV1')
77
+ }
78
+
79
+ export function canonicalBookingActionSchemaForKindV2(kind) {
80
+ return canonicalActionSchemaForKind(kind, canonicalBookingSurfaceSchemaV2, 'Action')
81
+ }
82
+
83
+ const DSH_JSON_SCHEMA_KEYS = new Set([
84
+ 'type', 'oneOf', 'properties', 'required', 'additionalProperties', 'items',
85
+ 'enum', 'const', 'description', 'title', 'default', 'examples',
86
+ ])
87
+
88
+ function projectDshSchema(value) {
89
+ if (Array.isArray(value)) return value.map(projectDshSchema)
90
+ if (typeof value !== 'object' || value === null) return value
91
+ return Object.fromEntries(Object.entries(value)
92
+ .filter(([key]) => DSH_JSON_SCHEMA_KEYS.has(key))
93
+ .map(([key, item]) => {
94
+ if (key === 'properties') {
95
+ return [key, Object.fromEntries(Object.entries(item).map(([name, property]) => [name, projectDshSchema(property)]))]
96
+ }
97
+ return [key, projectDshSchema(item)]
98
+ }))
99
+ }
100
+
101
+ /**
102
+ * dsh-tools intentionally supports a smaller enforced JSON-Schema vocabulary.
103
+ * Keep the canonical shape/type/enum/closure guarantees at the model seam;
104
+ * the full canonical AJV validator remains the runtime authority for numeric,
105
+ * pattern, size and uniqueness constraints before an operation can be issued.
106
+ */
107
+ export function dshBookingActionSchemaForKind(kind) {
108
+ return projectDshSchema(canonicalBookingActionSchemaForKind(kind))
109
+ }
110
+
111
+ export function dshBookingActionSchemaForKindV2(kind) {
112
+ return projectDshSchema(canonicalBookingActionSchemaForKindV2(kind))
113
+ }
@@ -0,0 +1,89 @@
1
+ export const BOOKING_SURFACE_SCHEMA_VERSION_V2 = 'booking.surface.v2';
2
+ export const BOOKING_COPILOT_V2_INGRESS_MODES = [
3
+ 'bff-bound-turn-only',
4
+ 'bff-ingress-binding'
5
+ ];
6
+ export const BOOKING_COPILOT_V2_ACCEPTED_TURN_KINDS = [
7
+ 'user.turn',
8
+ 'action.receipt.continuation'
9
+ ];
10
+ export const BOOKING_COPILOT_V2_INGRESS_TURN_KIND = 'user.turn.ingress';
11
+ export const BOOKING_COPILOT_MAX_OPERATIONS_V2 = 20;
12
+ export const BOOKING_SURFACE_SCHEMA_V2_SHA256 = '45df62db1b19d30a4fd22ddc94eb550e8ff32d8a225558b5ff13ba303588fc03';
13
+ export const BOOKING_READ_ACTION_KINDS_V2 = [
14
+ 'search.patch',
15
+ 'search.run',
16
+ 'results.view.patch',
17
+ 'hotel.focus',
18
+ 'hotel.select',
19
+ 'offers.query',
20
+ 'offers.view.patch',
21
+ 'offers.compare',
22
+ 'offer.select',
23
+ 'offer.check',
24
+ 'checkout.prepare',
25
+ 'order.observe'
26
+ ];
27
+ export const BOOKING_SURFACE_ALLOWED_ACTIONS_V2 = {
28
+ tenant: BOOKING_READ_ACTION_KINDS_V2,
29
+ customer_portal: BOOKING_READ_ACTION_KINDS_V2,
30
+ storefront: [
31
+ 'search.patch',
32
+ 'search.run',
33
+ 'results.view.patch',
34
+ 'hotel.focus'
35
+ ],
36
+ payment_link: [
37
+ 'search.patch',
38
+ 'search.run',
39
+ 'results.view.patch',
40
+ 'hotel.focus',
41
+ 'hotel.select'
42
+ ]
43
+ };
44
+ export function bookingSurfaceAllowedActionsV2(surface) {
45
+ return [
46
+ ...BOOKING_SURFACE_ALLOWED_ACTIONS_V2[surface]
47
+ ];
48
+ }
49
+ export const BOOKING_V2_BLOCKER_CODES = [
50
+ 'no_hotels_matched',
51
+ 'hotel_not_visible',
52
+ 'hotel_rates_failed',
53
+ 'criterion_must_not_met',
54
+ 'offer_target_not_reached',
55
+ 'offer_unavailable'
56
+ ];
57
+ export const BOOKING_V2_GAP_CODES = [
58
+ 'byos_mapped_risk',
59
+ 'check_avail_failed',
60
+ 'check_avail_unverified',
61
+ 'component_executor_unavailable',
62
+ 'hotel_not_visible',
63
+ 'hotel_rates_failed',
64
+ 'offer_facts_changed',
65
+ 'offer_not_loaded',
66
+ 'offer_unavailable',
67
+ 'order_not_found',
68
+ 'order_outcome_not_observed',
69
+ 'order_state_unknown',
70
+ 'order_status_unavailable',
71
+ 'requested_offers_not_loaded',
72
+ 'search_failed',
73
+ 'search_form_invalid',
74
+ 'search_session_expired',
75
+ 'search_terminal_timeout',
76
+ 'stale_revision',
77
+ 'surface_adapter_failed',
78
+ 'undo_token_not_found',
79
+ 'unhandled',
80
+ 'unsupported',
81
+ 'verified_offer_required',
82
+ 'workspace_changed_during_action',
83
+ 'criterion_must_not_met',
84
+ 'no_hotels_matched',
85
+ 'offer_target_not_reached'
86
+ ];
87
+
88
+
89
+ //# sourceURL=ts/src/booking-surface/contracts-v2.ts
@@ -0,0 +1,46 @@
1
+ export const BOOKING_SURFACE_SCHEMA_VERSION = 'booking.surface.v1';
2
+ export const BOOKING_SURFACE_SCHEMA_SHA256 = 'd9c2194ec839bd1168e70e8a201581addc005039d9b299660e20650bbb65df81';
3
+ export const BOOKING_SURFACE_VERSION_HEADER = 'x-booking-surface-version';
4
+ export const BOOKING_SURFACE_SCHEMA_SHA256_HEADER = 'x-booking-surface-schema-sha256';
5
+ export const BOOKING_SURFACES = [
6
+ 'tenant',
7
+ 'customer_portal',
8
+ 'storefront',
9
+ 'payment_link'
10
+ ];
11
+ export const BOOKING_READ_ACTION_KINDS = [
12
+ 'search.patch',
13
+ 'search.run',
14
+ 'results.view.patch',
15
+ 'hotel.focus',
16
+ 'hotel.select',
17
+ 'offers.query',
18
+ 'offers.view.patch',
19
+ 'offers.compare',
20
+ 'offer.select',
21
+ 'offer.check',
22
+ 'checkout.prepare',
23
+ 'order.observe'
24
+ ];
25
+ export const BOOKING_RECEIPT_STATUSES = [
26
+ 'applied',
27
+ 'needs_input',
28
+ 'partial',
29
+ 'no_match',
30
+ 'unavailable',
31
+ 'changed',
32
+ 'stale',
33
+ 'unsupported',
34
+ 'failed'
35
+ ];
36
+ export const BOOKING_SURFACE_EVENT_KINDS = [
37
+ 'status',
38
+ 'question',
39
+ 'operation',
40
+ 'explanation',
41
+ 'terminal',
42
+ 'error'
43
+ ];
44
+
45
+
46
+ //# sourceURL=ts/src/booking-surface/contracts.ts