Files
opencode-kimi-full/package.json
T
lemon07r ed7145c9c9 Release v1.0.3: fix header fingerprint (UA, Device-Model, Os-Version)
Plugin was silently 403ing every live request with
'access_terminated_error: only available for Coding Agents'. Discovered by
capturing what kimi-cli actually sends on the wire and diffing.

Three fingerprint bugs, each sufficient on its own to trigger the 403:

* User-Agent was 'KimiCodeCLI/<v>'; upstream sends 'KimiCLI/<v>'.
  (research/kimi-cli/src/kimi_cli/constant.py::get_user_agent)
* X-Msh-Device-Model was 'x86_64'; upstream sends
  '{system} {release} {machine}' e.g. 'Linux 7.0.0 x86_64'.
  (research/kimi-cli/src/kimi_cli/auth/oauth.py::_device_model)
* X-Msh-Os-Version was '{type} {release}' e.g. 'Linux 7.0.0'; upstream
  sends platform.version() i.e. the kernel build string. Node equivalent
  is os.version().

Verified live against api.kimi.com/coding/v1 with a freshly-minted JWT:
200 OK and real K2.6 response after the fix; 403 before.

Locked in with regression tests in test/headers.test.ts and
test/constants.test.ts, and documented in AGENTS.md contract rule 1.
2026-04-17 03:51:45 -04:00

47 lines
1.1 KiB
JSON

{
"name": "opencode-kimi-full",
"version": "1.0.3",
"description": "OpenCode plugin that adds first-class support for Kimi K2.6 (kimi-for-coding) via the official Kimi OAuth device flow, matching the upstream kimi-cli 1:1.",
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/lemon07r/opencode-kimi-full.git"
},
"homepage": "https://github.com/lemon07r/opencode-kimi-full#readme",
"bugs": {
"url": "https://github.com/lemon07r/opencode-kimi-full/issues"
},
"publishConfig": {
"access": "public",
"provenance": true
},
"type": "module",
"main": "./src/index.ts",
"exports": {
".": "./src/index.ts"
},
"files": [
"src",
"README.md",
"AGENTS.md",
"LICENSE"
],
"keywords": [
"opencode",
"opencode-plugin",
"kimi",
"kimi-for-coding",
"kimi-k26",
"moonshot",
"oauth"
],
"peerDependencies": {
"@opencode-ai/plugin": ">=1.4.6"
},
"devDependencies": {
"@opencode-ai/plugin": "^1.4.7",
"typescript": "^5.6.0",
"@types/node": "^22.0.0"
}
}