@danceiny/gotry 0.0.1-rc.17 → 0.0.1-rc.19
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.
- package/README.md +185 -148
- package/README.zh-CN.md +195 -154
- package/bin/gotry-bootstrap.js +246 -26
- package/bin/gotry-inner.js +68 -38
- package/bin/gotry-runtime-resolution.d.ts +1 -1
- package/bin/gotry-runtime-resolution.js +7 -8
- package/cordis.gotry-patch.yml +15 -5
- package/data/stations-12306-verify.json +524 -0
- package/dist/capabilities/agent-reach.js +4 -4
- package/dist/capabilities/channel-health.js +103 -0
- package/dist/capabilities/channel-registry.js +213 -0
- package/dist/capabilities/doctor.js +285 -0
- package/dist/capabilities/effect.js +178 -5
- package/dist/capabilities/flyai.js +13 -0
- package/dist/capabilities/session/adapters/ctrip-hotel.js +207 -0
- package/dist/capabilities/session/adapters/rail-12306.js +285 -0
- package/dist/capabilities/session/extension-bridge.js +14 -1
- package/dist/capabilities/session/extension-channel.js +4 -2
- package/dist/capabilities/session/extension-distribution.js +1 -1
- package/dist/capabilities/session-search.js +311 -0
- package/dist/capabilities/visa-policy.js +126 -0
- package/dist/scripts/agent-planning-turn-deadline-e2e.js +304 -0
- package/dist/scripts/agent-planning-turn-deadline-tests.js +281 -0
- package/dist/scripts/benchmark-environment-bridge-e2e.js +5 -10
- package/dist/scripts/benchmark-environment-bridge-tests.js +148 -142
- package/dist/scripts/booking-copilot-availability-ledger-binding-tests.js +26 -26
- package/dist/scripts/{booking-copilot-availability-policy-v2-tests.js → booking-copilot-availability-policy-tests.js} +115 -115
- package/dist/scripts/booking-copilot-crossrepo-fixture-server.js +41 -1
- package/dist/scripts/booking-copilot-dsh-core-proof-tests.js +75 -120
- package/dist/scripts/booking-copilot-dsh-planner-proof-tests.js +370 -61
- package/dist/scripts/booking-copilot-dsh-plugin-proof-tests.js +2 -2
- package/dist/scripts/booking-copilot-event-sequence-concurrency-proof-tests.js +7 -3
- package/dist/scripts/booking-copilot-gap-code-contract-proof-tests.js +15 -9
- package/dist/scripts/booking-copilot-operation-ledger-concurrency-proof-tests.js +19 -11
- package/dist/scripts/booking-copilot-receipt-ledger-concurrency-proof-tests.js +16 -52
- package/dist/scripts/booking-copilot-runtime-proof-tests.js +3953 -155
- package/dist/scripts/booking-copilot-server-proof-tests.js +58 -23
- package/dist/scripts/booking-copilot-startup-proof-tests.js +10 -119
- package/dist/scripts/booking-surface-contract-proof-tests.js +1154 -326
- package/dist/scripts/bootstrap-tests.js +115 -44
- package/dist/scripts/build-metrics-report.js +339 -0
- package/dist/scripts/channel-probe-tests.js +148 -0
- package/dist/scripts/channel-probe.js +252 -0
- package/dist/scripts/channel-registry-tests.js +262 -0
- package/dist/scripts/doctor-tests.js +121 -0
- package/dist/scripts/effect-tests.js +274 -1
- package/dist/scripts/extension-tests.js +129 -11
- package/dist/scripts/fact-gate-tests.js +91 -2
- package/dist/scripts/flyai-tests.js +17 -1
- package/dist/scripts/hbcli-e2e-tests.js +1 -3
- package/dist/scripts/metrics-report-tests.js +288 -0
- package/dist/scripts/persona-surface-guard-tests.js +19 -0
- package/dist/scripts/session-tests.js +401 -1
- package/dist/scripts/smoke.js +100 -83
- package/dist/scripts/turn-handoff-collect-tests.js +216 -0
- package/dist/scripts/turn-handoff-collect.js +189 -0
- package/dist/scripts/turn-policy-tests.js +56 -0
- package/dist/scripts/typed-contract-canary.js +261 -0
- package/dist/scripts/visa-policy-tests.js +75 -0
- package/dist/scripts/wish-channel-gate-tests.js +111 -0
- package/dist/src/artifact-gate.js +91 -3
- package/dist/src/benchmark-agent-conformance.js +7 -4
- package/dist/src/benchmark-environment-bridge.js +68 -7
- package/dist/src/bookable-facts.js +62 -3
- package/dist/src/booking-surface/{availability-policy-v2.js → availability-policy.js} +89 -89
- package/dist/src/booking-surface/canonical-schema.js +8 -22
- package/dist/src/booking-surface/contracts.js +70 -19
- package/dist/src/booking-surface/dsh-planner.js +310 -177
- package/dist/src/booking-surface/dsh-plugin.js +3 -3
- package/dist/src/booking-surface/index.js +1 -5
- package/dist/src/booking-surface/profile.js +1 -1
- package/dist/src/booking-surface/runtime.js +1682 -247
- package/dist/src/booking-surface/server.js +371 -185
- package/dist/src/booking-surface/startup.js +17 -27
- package/dist/src/booking-surface/validation.js +270 -760
- package/dist/src/index.js +735 -149
- package/dist/src/turn-deadline.js +292 -0
- package/dist/src/turn-policy.js +146 -0
- package/dist/src/wish-pool.js +5 -0
- package/extension/background.js +23 -4
- package/extension/content-main.js +47 -9
- package/extension/manifest.json +27 -9
- package/package.json +6 -26
- package/schemas/booking.surface.schema.json +2593 -0
- package/ts/capabilities/agent-reach.ts +4 -4
- package/ts/capabilities/flyai.ts +21 -3
- package/ts/capabilities/session/action-cache.ts +1 -1
- package/ts/capabilities/session/adapters/ctrip-hotel.ts +238 -0
- package/ts/capabilities/session/adapters/rail-12306.ts +293 -0
- package/ts/capabilities/session/extension-bridge.ts +32 -2
- package/ts/capabilities/session/extension-channel.ts +9 -8
- package/ts/capabilities/session/extension-distribution.ts +3 -1
- package/ts/capabilities/session/health-watch.ts +1 -1
- package/ts/capabilities/session/read-guard.ts +1 -1
- package/ts/capabilities/session/wizard.ts +1 -1
- package/ts/capabilities/session-search.ts +323 -1
- package/ts/package.json +1 -0
- package/ts/scripts/turn-handoff-collect.ts +178 -0
- package/ts/src/artifact-gate.ts +82 -2
- package/ts/src/benchmark-agent-conformance.ts +14 -6
- package/ts/src/benchmark-environment-bridge.ts +29 -10
- package/ts/src/bookable-facts.ts +109 -5
- package/ts/src/booking-saga.ts +1 -1
- package/ts/src/booking-surface/{availability-policy-v2.ts → availability-policy.ts} +124 -125
- package/ts/src/booking-surface/canonical-schema.js +8 -22
- package/ts/src/booking-surface/contracts.ts +278 -239
- package/ts/src/booking-surface/dsh-planner.ts +333 -194
- package/ts/src/booking-surface/dsh-plugin.js +3 -3
- package/ts/src/booking-surface/index.ts +1 -5
- package/ts/src/booking-surface/profile.ts +11 -11
- package/ts/src/booking-surface/runtime.ts +1351 -351
- package/ts/src/booking-surface/server.ts +282 -175
- package/ts/src/booking-surface/startup.ts +36 -48
- package/ts/src/booking-surface/validation.ts +194 -442
- package/ts/src/contracts.ts +1 -1
- package/ts/src/index.ts +489 -171
- package/ts/src/loop.ts +1 -1
- package/ts/src/state-ledger.ts +1 -1
- package/ts/src/turn-deadline.ts +361 -0
- package/ts/src/turn-policy.ts +154 -0
- package/ts/src/wish-pool.ts +17 -4
- package/dist/scripts/agent-planning-budget-e2e.js +0 -227
- package/dist/scripts/agent-planning-budget-tests.js +0 -173
- package/dist/scripts/booking-copilot-v2-runtime-proof-tests.js +0 -3935
- package/dist/scripts/booking-surface-v2-contract-proof-tests.js +0 -1174
- package/dist/src/booking-surface/contracts-v2.js +0 -89
- package/dist/src/booking-surface/runtime-v2.js +0 -1771
- package/dist/src/booking-surface/server-v2.js +0 -334
- package/dist/src/booking-surface/validation-v2.js +0 -319
- package/dist/src/tool-budget.js +0 -136
- package/schemas/booking.surface.v1.schema.json +0 -927
- package/schemas/booking.surface.v2.schema.json +0 -61
- package/ts/src/booking-surface/contracts-v2.ts +0 -118
- package/ts/src/booking-surface/runtime-v2.ts +0 -1466
- package/ts/src/booking-surface/server-v2.ts +0 -247
- package/ts/src/booking-surface/validation-v2.ts +0 -205
- package/ts/src/tool-budget.ts +0 -165
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export const BOOKING_SURFACE_SCHEMA_VERSION = 'booking.surface
|
|
2
|
-
export const BOOKING_SURFACE_SCHEMA_SHA256 = '
|
|
1
|
+
export const BOOKING_SURFACE_SCHEMA_VERSION = 'booking.surface';
|
|
2
|
+
export const BOOKING_SURFACE_SCHEMA_SHA256 = 'f9a73339c4c51280bfd63ba67c8b9f495fbbb796573b7a24d35de572f17f5127';
|
|
3
3
|
export const BOOKING_SURFACE_VERSION_HEADER = 'x-booking-surface-version';
|
|
4
4
|
export const BOOKING_SURFACE_SCHEMA_SHA256_HEADER = 'x-booking-surface-schema-sha256';
|
|
5
5
|
export const BOOKING_SURFACES = [
|
|
@@ -8,6 +8,16 @@ export const BOOKING_SURFACES = [
|
|
|
8
8
|
'storefront',
|
|
9
9
|
'payment_link'
|
|
10
10
|
];
|
|
11
|
+
export const BOOKING_COPILOT_INGRESS_MODES = [
|
|
12
|
+
'bff-bound-turn-only',
|
|
13
|
+
'bff-ingress-binding'
|
|
14
|
+
];
|
|
15
|
+
export const BOOKING_COPILOT_ACCEPTED_TURN_KINDS = [
|
|
16
|
+
'user.turn',
|
|
17
|
+
'action.receipt.continuation'
|
|
18
|
+
];
|
|
19
|
+
export const BOOKING_COPILOT_INGRESS_TURN_KIND = 'user.turn.ingress';
|
|
20
|
+
export const BOOKING_COPILOT_MAX_OPERATIONS = 20;
|
|
11
21
|
export const BOOKING_READ_ACTION_KINDS = [
|
|
12
22
|
'search.patch',
|
|
13
23
|
'search.run',
|
|
@@ -22,24 +32,65 @@ export const BOOKING_READ_ACTION_KINDS = [
|
|
|
22
32
|
'checkout.prepare',
|
|
23
33
|
'order.observe'
|
|
24
34
|
];
|
|
25
|
-
export const
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
+
export const BOOKING_SURFACE_ALLOWED_ACTIONS = {
|
|
36
|
+
tenant: BOOKING_READ_ACTION_KINDS,
|
|
37
|
+
customer_portal: BOOKING_READ_ACTION_KINDS,
|
|
38
|
+
storefront: [
|
|
39
|
+
'search.patch',
|
|
40
|
+
'search.run',
|
|
41
|
+
'results.view.patch',
|
|
42
|
+
'hotel.focus'
|
|
43
|
+
],
|
|
44
|
+
payment_link: [
|
|
45
|
+
'search.patch',
|
|
46
|
+
'search.run',
|
|
47
|
+
'results.view.patch',
|
|
48
|
+
'hotel.focus',
|
|
49
|
+
'hotel.select'
|
|
50
|
+
]
|
|
51
|
+
};
|
|
52
|
+
export function bookingSurfaceAllowedActions(surface) {
|
|
53
|
+
return [
|
|
54
|
+
...BOOKING_SURFACE_ALLOWED_ACTIONS[surface]
|
|
55
|
+
];
|
|
56
|
+
}
|
|
57
|
+
export const BOOKING_BLOCKER_CODES = [
|
|
58
|
+
'no_hotels_matched',
|
|
59
|
+
'hotel_not_visible',
|
|
60
|
+
'hotel_rates_failed',
|
|
61
|
+
'criterion_must_not_met',
|
|
62
|
+
'offer_target_not_reached',
|
|
63
|
+
'offer_unavailable'
|
|
35
64
|
];
|
|
36
|
-
export const
|
|
37
|
-
'
|
|
38
|
-
'
|
|
39
|
-
'
|
|
40
|
-
'
|
|
41
|
-
'
|
|
42
|
-
'
|
|
65
|
+
export const BOOKING_GAP_CODES = [
|
|
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'
|
|
43
94
|
];
|
|
44
95
|
|
|
45
96
|
|