@khotan/cli 0.5.0 → 0.8.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 +22 -0
- package/dist/khotan.js +945 -53
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -101,6 +101,7 @@ state is needed in CI or sandboxes:
|
|
|
101
101
|
| `KHOTAN_API_URL` | API origin (e.g. `https://app.example.com`) |
|
|
102
102
|
| `KHOTAN_API_KEY` | Organization-scoped API key |
|
|
103
103
|
| `KHOTAN_PROFILE` | Select a stored profile by name |
|
|
104
|
+
| `KHOTAN_ORG_ID` | Expected org id; the CLI asserts `whoami.organizationId` matches it and fails closed otherwise |
|
|
104
105
|
|
|
105
106
|
```bash
|
|
106
107
|
export KHOTAN_API_URL=https://app.example.com
|
|
@@ -108,6 +109,27 @@ export KHOTAN_API_KEY=khk_live_...
|
|
|
108
109
|
khotan apps list --json | jq '.apps[].id'
|
|
109
110
|
```
|
|
110
111
|
|
|
112
|
+
### Repo-local org isolation (`env.khotan.local`)
|
|
113
|
+
|
|
114
|
+
When an `env.khotan.local` file sits at (or above) the working directory, the CLI
|
|
115
|
+
auto-loads its `KHOTAN_*` values so every command is scoped to that repo's
|
|
116
|
+
organization — never a stray machine-global profile from another customer. The
|
|
117
|
+
file is authoritative: its values win over shell-exported `KHOTAN_*`, which win
|
|
118
|
+
over the stored profile, and CLI flags win over everything (`flag >
|
|
119
|
+
env.khotan.local > shell env > profile`).
|
|
120
|
+
|
|
121
|
+
```bash
|
|
122
|
+
# env.khotan.local (git-ignored; never commit secrets)
|
|
123
|
+
KHOTAN_API_URL='https://<customer>.khotan.com'
|
|
124
|
+
KHOTAN_API_KEY='<org-scoped key>'
|
|
125
|
+
KHOTAN_ORG_ID='<org id>'
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
When `KHOTAN_ORG_ID` (or `--assert-org <id>`) is set, every operation and
|
|
129
|
+
`khotan mcp serve` verifies `whoami.organizationId` matches before trusting
|
|
130
|
+
output and fails closed on mismatch (`error [org_mismatch]`). With no expected
|
|
131
|
+
org id set, behavior is unchanged.
|
|
132
|
+
|
|
111
133
|
## Command surface
|
|
112
134
|
|
|
113
135
|
Commands are grouped by domain and derived from the capability catalog, so the
|