@fortrip/agent-contract 1.0.0-rc.1 → 1.0.0
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 +17 -3
- package/dist/index.js +1 -1
- package/package.json +8 -9
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@ paths, error reasons and field rules that the Fortrip CLI (`fortrip`), the
|
|
|
5
5
|
hosted MCP server and the store listings all share, so they cannot drift
|
|
6
6
|
apart.
|
|
7
7
|
|
|
8
|
-
It has one peer dependency, `zod` (4.4
|
|
8
|
+
It has one peer dependency, `zod` (`^4.4.0`), and runs anywhere
|
|
9
9
|
ES2023 does. The package version follows the API: `1.x` serves
|
|
10
10
|
`/api/agent/v1`.
|
|
11
11
|
|
|
@@ -16,10 +16,24 @@ API.search; // "/api/agent/v1/hotels/search"
|
|
|
16
16
|
LIMITS.rooms; // 8
|
|
17
17
|
```
|
|
18
18
|
|
|
19
|
+
It exports:
|
|
20
|
+
|
|
21
|
+
- `API`, `LIMITS`, `BOARD_CODES`, `CURRENCIES`, `SEARCH_SORTS` and
|
|
22
|
+
`ERROR_REASONS`: paths, limits and error reasons;
|
|
23
|
+
- `searchHotelsInput`, `getHotelInput`, `getRatesInput` and
|
|
24
|
+
`createBookingInput`, the zod schemas of the requests, and `bookingResult`,
|
|
25
|
+
`meResult` and `authConfig`, those of responses;
|
|
26
|
+
- `COMMANDS` and `GLOBAL_FLAGS`, the CLI's commands and flags, and `TOOLS`,
|
|
27
|
+
the MCP tools;
|
|
28
|
+
- `renderGuide(surface, topic)`, the agent guide as Markdown for `"mcp"`,
|
|
29
|
+
`"claude-skill"` or `"cli"`;
|
|
30
|
+
- field rules such as `containsCardNumber`, the guest-name rule and the date
|
|
31
|
+
helpers, and `CONTRACT_VERSION`.
|
|
32
|
+
|
|
19
33
|
Browser code that only needs the guest-name rule (`GUEST_NAME_PATTERN`,
|
|
20
34
|
`GUEST_NAME_TITLE`, `GUEST_NAME_MESSAGE`, `guestNameRe`, `normalizeGuestName`)
|
|
21
35
|
can import it from `@fortrip/agent-contract/guest-name`. That module imports
|
|
22
|
-
|
|
23
|
-
load. The root entry exports the same names.
|
|
36
|
+
no package, so it does not pull in `zod` or the schemas the root entry builds
|
|
37
|
+
at load. The root entry exports the same names.
|
|
24
38
|
|
|
25
39
|
MIT licensed. Source: <https://github.com/FortripEngineering/fortrip/tree/main/packages/contract>.
|
package/dist/index.js
CHANGED
|
@@ -972,7 +972,7 @@ var TOOLS = [
|
|
|
972
972
|
// package.json
|
|
973
973
|
var package_default = {
|
|
974
974
|
name: "@fortrip/agent-contract",
|
|
975
|
-
version: "1.0.0
|
|
975
|
+
version: "1.0.0",
|
|
976
976
|
license: "MIT",
|
|
977
977
|
description: "The contract of Fortrip's agent API (/api/agent/v1): limits, paths, input schemas and field rules.",
|
|
978
978
|
type: "module",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fortrip/agent-contract",
|
|
3
|
-
"version": "1.0.0
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "The contract of Fortrip's agent API (/api/agent/v1): limits, paths, input schemas and field rules.",
|
|
6
6
|
"type": "module",
|
|
@@ -29,13 +29,6 @@
|
|
|
29
29
|
"publishConfig": {
|
|
30
30
|
"access": "public"
|
|
31
31
|
},
|
|
32
|
-
"scripts": {
|
|
33
|
-
"embed-guide": "node --import tsx scripts/embed-guide.ts",
|
|
34
|
-
"build": "pnpm embed-guide && tsup",
|
|
35
|
-
"typecheck": "tsc --noEmit",
|
|
36
|
-
"test": "pnpm build && node --import tsx --test test/*.test.ts",
|
|
37
|
-
"prepublishOnly": "pnpm typecheck && pnpm test && pnpm build"
|
|
38
|
-
},
|
|
39
32
|
"peerDependencies": {
|
|
40
33
|
"zod": "^4.4.0"
|
|
41
34
|
},
|
|
@@ -45,5 +38,11 @@
|
|
|
45
38
|
"tsx": "^4.20.0",
|
|
46
39
|
"typescript": "^5.9.0",
|
|
47
40
|
"zod": "4.4.3"
|
|
41
|
+
},
|
|
42
|
+
"scripts": {
|
|
43
|
+
"embed-guide": "node --import tsx scripts/embed-guide.ts",
|
|
44
|
+
"build": "pnpm embed-guide && tsup",
|
|
45
|
+
"typecheck": "tsc --noEmit",
|
|
46
|
+
"test": "pnpm build && node --import tsx --test test/*.test.ts"
|
|
48
47
|
}
|
|
49
|
-
}
|
|
48
|
+
}
|