@gojinko/plugin 2.22.1 → 2.23.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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "jinko",
3
3
  "description": "Search flights, book trips, and manage bookings with the Jinko Travel API. Connects to the Jinko MCP server for live flight pricing, trip management, and payment.",
4
- "version": "2.22.1",
4
+ "version": "2.23.0",
5
5
  "author": {
6
6
  "name": "Jinko",
7
7
  "url": "https://gojinko.com"
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "jinko",
3
3
  "description": "Search flights, book trips, and manage bookings with the Jinko Travel API. Connects to the Jinko MCP server for live flight pricing, trip management, and payment.",
4
- "version": "2.22.1",
4
+ "version": "2.23.0",
5
5
  "author": {
6
6
  "name": "Jinko",
7
7
  "url": "https://gojinko.com"
package/README.md CHANGED
@@ -47,10 +47,13 @@ codex plugin install @gojinko/plugin
47
47
 
48
48
  ## Authentication
49
49
 
50
- The plugin supports two auth methods:
50
+ Authenticate with a tenant **API key** (`jnk_*`) — get one from
51
+ **dashboard.gojinko.com → Developers → API keys**:
51
52
 
52
- - **API Key**: Set `JINKO_API_KEY` environment variable with your `jnk_*` key
53
- - **OAuth**: If no API key is set, Codex will auto-discover OAuth and prompt you to sign in via browser
53
+ - Set the `JINKO_API_KEY` environment variable with your `jnk_*` key, or
54
+ - Store it via the CLI: `jinko auth login --key jnk_...`
55
+
56
+ OAuth sign-in is deprecated and no longer supported.
54
57
 
55
58
  ## MCP server
56
59
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gojinko/plugin",
3
- "version": "2.22.1",
3
+ "version": "2.23.0",
4
4
  "description": "Jinko Travel plugin for Claude Code and OpenAI Codex — flight search, booking, and trip management via MCP",
5
5
  "private": false,
6
6
  "license": "MIT",
@@ -14,7 +14,7 @@ Account management is handled through the web dashboard — there are no MCP too
14
14
  1. **Register** — go to [gojinko.com/dashboard](https://gojinko.com/dashboard) and sign up with your email.
15
15
  2. **Create an API key** — in the dashboard, go to API Keys and create a new key. The full key (prefixed `jnk_`) is shown only once — save it immediately.
16
16
  3. **Set your key** — configure your environment:
17
- - CLI: `jinko auth login` (OAuth) or set `JINKO_API_KEY=jnk_...`
17
+ - CLI: `jinko auth login --key jnk_...` (or set `JINKO_API_KEY=jnk_...`)
18
18
  - API client: pass the key when creating the client
19
19
  - MCP: use `Authorization: Bearer jnk_...` header
20
20
 
@@ -33,7 +33,10 @@ Account management is handled through the web dashboard — there are no MCP too
33
33
 
34
34
  ## CLI authentication
35
35
 
36
- The CLI supports two auth methods:
36
+ The CLI authenticates with an **API key** (`jnk_...`):
37
37
 
38
- 1. **OAuth** (recommended): `jinko auth login` — opens a browser for WorkOS login, stores token locally
39
- 2. **API key**: set `JINKO_API_KEY=jnk_...` in your environment — simpler for scripts and CI
38
+ - `jinko auth login --key jnk_...` — stores the key in `~/.jinko/config.yaml`
39
+ - `jinko auth login` (no flag) — prompts for the key interactively
40
+ - `export JINKO_API_KEY=jnk_...` — pass it via the environment (scripts and CI)
41
+
42
+ OAuth sign-in is deprecated and no longer supported.
@@ -10,14 +10,14 @@ Command-line tool for the Jinko Travel platform. Same capabilities as the MCP to
10
10
  ## Install + auth
11
11
 
12
12
  ```bash
13
- npm install -g @gojinko/cli # one-time install
14
- jinko auth login # OAuth device flow → browser login
15
- jinko auth status # verify
13
+ npm install -g @gojinko/cli # one-time install
14
+ jinko auth login --key jnk_xxx # store your API key (from dashboard.gojinko.com → Developers → API keys)
15
+ jinko auth status # verify
16
16
  ```
17
17
 
18
18
  Auth alternatives:
19
- - **API key** (for scripts / CI): `jinko --api-key jnk_xxx <command>` or `export JINKO_API_KEY=jnk_xxx`.
20
- - **OAuth (human)**: `jinko auth login` opens a browser, stores token in `~/.jinko/config.yaml`. Auto-refresh is built in. `jinko auth logout` to clear.
19
+ - **API key** (recommended): `jinko auth login --key jnk_xxx`, or per-command `jinko --api-key jnk_xxx <command>`, or `export JINKO_API_KEY=jnk_xxx`. `jinko auth login` with no flag prompts for the key interactively and stores it in `~/.jinko/config.yaml`. `jinko auth logout` to clear.
20
+ - **OAuth**: deprecated and no longer supported — use an API key.
21
21
 
22
22
  ## Environments (prod / sandbox)
23
23
 
@@ -146,7 +146,7 @@ jinko refund status --ref JNK-A7B3X9 --last-name Doe
146
146
 
147
147
  ## Common pitfalls
148
148
 
149
- - **Two auth systems.** CLI OAuth tokens (WorkOS device flow, stored in `~/.jinko/config.yaml`) are NOT interchangeable with MCP OAuth tokens (DCR, different issuer). Don't paste a CLI token into an MCP Bearer header — it will fail with issuer mismatch. Use an API key (`jnk_*`) for cross-surface programmatic access.
149
+ - **Use an API key everywhere.** A tenant API key (`jnk_*`) works across the CLI, the SDK, and MCP Bearer headers — it's the one credential to carry. (OAuth sign-in is deprecated; any legacy WorkOS CLI token in `~/.jinko/config.yaml` is NOT interchangeable with an MCP OAuth token and will fail with an issuer mismatch if pasted into an MCP Bearer header.)
150
150
  - **IATA codes**: `--from PAR` uses a CITY code (matches CDG + ORY + BVA); `--from CDG` uses an airport. `flight-search` has `--origin-type city|airport` to disambiguate.
151
151
  - **trip_item_token format**: `offer_xxx:fare_yyy` (flight) or `htl_xxx:rate_yyy` (hotel). Always the offer ID + fare/rate ID joined by colon.
152
152
  - **Token expiry**: offers cached ~30 min. If `checkout` returns a quote failure, re-run `flight-search`/`hotel-search` to get a fresh token.