{"_id":"@codewithkenzo/pi-clinepass","_rev":"2-6fe46a6dc06f49657a3559b3abe4e145","name":"@codewithkenzo/pi-clinepass","dist-tags":{"latest":"0.1.1"},"versions":{"0.1.0":{"name":"@codewithkenzo/pi-clinepass","version":"0.1.0","keywords":["pi-package","pi-extension","pi","clinepass","provider"],"_id":"@codewithkenzo/pi-clinepass@0.1.0","maintainers":[{"name":"codewithkenzo","email":"codewithkenzo@gmail.com"}],"homepage":"https://github.com/codewithkenzo/pi-clinepass#readme","bugs":{"url":"https://github.com/codewithkenzo/pi-clinepass/issues"},"pi":{"extensions":["./dist/index.js"]},"dist":{"shasum":"09881fa229211f3b81607307dac71d4182a65465","tarball":"https://registry.npmjs.org/@codewithkenzo/pi-clinepass/-/pi-clinepass-0.1.0.tgz","fileCount":4,"integrity":"sha512-+KxvYNfwn+/8dn1elgtvVTTQ/oUldiPs/cfkZdMSAbiLk/YvaoY/vCIwoW21Yft6HdrkiemKMrS5jqKGpkiAHg==","signatures":[{"sig":"MEYCIQCxFUQcZY5ju/vZmDDWPWulaeHlquu5H5gA0Po7QbkAIQIhAJC+mK3nKTl3Fe/ZEaV7gWhDg+tthkiZdaHL8GvNE/jb","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":6669302},"main":"./dist/index.js","type":"module","scripts":{"test":"bun test","build":"bun build ./src/index.ts --outfile ./dist/index.js --target node","typecheck":"tsc --noEmit"},"_npmUser":{"name":"codewithkenzo","email":"codewithkenzo@gmail.com"},"repository":{"url":"git+https://github.com/codewithkenzo/pi-clinepass.git","type":"git"},"_npmVersion":"11.16.0","description":"Native Pi provider extension for ClinePass OAuth models.","directories":{},"_nodeVersion":"26.4.0","dependencies":{"effect":"^4.0.0-beta.66"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest","typescript":"latest","@earendil-works/pi-ai":"^0.80.2","@earendil-works/pi-coding-agent":"^0.80.2"},"peerDependencies":{"@earendil-works/pi-ai":"*","@earendil-works/pi-coding-agent":"*"},"_npmOperationalInternal":{"tmp":"tmp/pi-clinepass_0.1.0_1783031390975_0.887384946987475","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@codewithkenzo/pi-clinepass","version":"0.1.1","description":"Native Pi provider extension for ClinePass OAuth models.","keywords":["clinepass","pi","pi-extension","pi-package","provider"],"homepage":"https://github.com/codewithkenzo/pi-clinepass#readme","bugs":{"url":"https://github.com/codewithkenzo/pi-clinepass/issues"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/codewithkenzo/pi-clinepass.git"},"type":"module","main":"./src/index.ts","publishConfig":{"access":"public"},"scripts":{"typecheck":"tsc --noEmit","test":"bun test","lint":"oxlint --config .oxlintrc.json --deny-warnings --report-unused-disable-directives src/ test/ scripts/","lint:type-aware":"oxlint --config .oxlintrc.json --deny-warnings --report-unused-disable-directives --type-aware --type-check src/ test/ scripts/","format":"oxfmt --write src/ test/ scripts/ package.json tsconfig.json .oxlintrc.json .oxfmtrc.json","format:check":"oxfmt --check src/ test/ scripts/ package.json tsconfig.json .oxlintrc.json .oxfmtrc.json","quality:sentinel":"bun scripts/quality-sentinel.ts","package:contract":"bun scripts/package-contract.ts","clean-room":"bun scripts/clean-room.ts"},"dependencies":{"@codewithkenzo/pi-ai-runtime":"npm:@earendil-works/pi-ai@0.80.6","effect":"^4.0.0-beta.93"},"devDependencies":{"@earendil-works/pi-coding-agent":"latest","@types/bun":"latest","oxfmt":"^0.58.0","oxlint":"^1.73.0","oxlint-tsgolint":"0.24.0","typescript":"^7.0.2"},"pi":{"extensions":["./src/index.ts"]},"gitHead":"32adc0e85e30a93e7e18b6ba0464f8af0cab746f","_id":"@codewithkenzo/pi-clinepass@0.1.1","_nodeVersion":"24.18.0","_npmVersion":"11.6.2","dist":{"integrity":"sha512-dR7+199eiQBvGVr+jYoocB+YHPHYmxzxvzmH/jxXc0LOKi7xKzOEgyg01cQ/wRMtoltQxudeNgLJKamNVOF5Cg==","shasum":"a690a8a7e6b2a5766cda8fedf2ab4e2438e5539b","tarball":"https://registry.npmjs.org/@codewithkenzo/pi-clinepass/-/pi-clinepass-0.1.1.tgz","fileCount":12,"unpackedSize":1577822,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@codewithkenzo%2fpi-clinepass@0.1.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIDwq8KwGVYi7G+DO9QKo5+KBVbgVx09xUhJs18nZzRcGAiEA2mExw7Ia60olQlikwsfJMV28MBmgogwriIhYDNVo+7A="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:78272f83-1bcf-46b8-b115-d3a12c13c16c"}},"directories":{},"maintainers":[{"name":"codewithkenzo","email":"jstkenzo@proton.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/pi-clinepass_0.1.1_1783674721015_0.46766596868346144"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-02T22:29:50.755Z","modified":"2026-07-10T09:12:01.422Z","0.1.0":"2026-07-02T22:29:51.223Z","0.1.1":"2026-07-10T09:12:01.167Z"},"bugs":{"url":"https://github.com/codewithkenzo/pi-clinepass/issues"},"homepage":"https://github.com/codewithkenzo/pi-clinepass#readme","keywords":["clinepass","pi","pi-extension","pi-package","provider"],"repository":{"type":"git","url":"git+https://github.com/codewithkenzo/pi-clinepass.git"},"description":"Native Pi provider extension for ClinePass OAuth models.","maintainers":[{"name":"codewithkenzo","email":"jstkenzo@proton.me"}],"readme":"# pi-clinepass\n\n[![npm version](https://img.shields.io/npm/v/%40codewithkenzo%2Fpi-clinepass)](https://www.npmjs.com/package/@codewithkenzo/pi-clinepass)\n[![license](https://img.shields.io/github/license/codewithkenzo/pi-clinepass)](LICENSE)\n[![CI](https://img.shields.io/github/actions/workflow/status/codewithkenzo/pi-clinepass/ci.yml?branch=main&label=CI)](https://github.com/codewithkenzo/pi-clinepass/actions/workflows/ci.yml)\n\n![pi-clinepass](assets/pi-clinepass-hero.png)\n\nUse ClinePass models (GLM-5.2, Kimi K2.7, DeepSeek V4, Qwen3.7, MiniMax M3) in Pi. Log in with a browser device code, pick a model, start coding.\n\n## Capabilities\n\n- WorkOS device-code OAuth with Cline token registration and refresh\n- Live ClinePass model discovery with static fallback metadata\n- Per-model context windows, output limits, reasoning settings, and thinking maps\n- Prompt-cache and reasoning compatibility for the ClinePass gateway\n- Provider id `clinepass`; transport `openai-completions` at `https://api.cline.bot/api/v1`\n- Credentials stored by Pi; requests use `Authorization: Bearer workos:<access>`\n\nPrimary model: `glm-5.2`.\n\n## Install locally\n\nFrom npm:\n\n```bash\npi install npm:@codewithkenzo/pi-clinepass\n```\n\nFrom GitHub:\n\n```bash\npi install git:github.com/codewithkenzo/pi-clinepass\n```\n\nFrom a checkout:\n\n```bash\nbun install\nbun run typecheck\nbun test\npi install .\n```\n\nOr add a local checkout manually to `~/.pi/agent/settings.json`:\n\n```json\n{\n  \"packages\": [\"../../dev/pi-clinepass\"]\n}\n```\n\nThen restart Pi or run `/reload`.\n\n## Login + use\n\nIn Pi:\n\n1. Run `/login`\n2. Choose **ClinePass**\n3. Open the browser/device URL and enter the shown code\n4. Run `/model`\n5. Pick `clinepass/glm-5.2`\n\nExact model string for CLI/non-interactive runs:\n\n```bash\npi --model clinepass/glm-5.2 \"Say OK\"\n```\n\n## How it works\n\n1. `/login` starts a WorkOS OAuth device authorization request.\n2. Pi shows a verification URL and one-time device code.\n3. Open the URL, enter the code, approve access.\n4. The extension polls WorkOS until authorization completes.\n5. WorkOS tokens register with Cline auth; Pi receives OAuth credentials.\n6. Later requests use refreshed Cline access tokens.\n\nWire-level detail:\n\n1. WorkOS device auth with Cline's production client id\n2. Poll WorkOS until approved\n3. `POST /api/v1/auth/register` with WorkOS tokens\n4. `POST /api/v1/auth/refresh` when access is near expiry\n5. Requests use `Authorization: Bearer workos:<access>`\n\nAccess and refresh tokens are never logged.\n\n## Model discovery\n\nThe extension fetches:\n\n```text\nhttps://api.cline.bot/api/v1/ai/cline/recommended-models\n```\n\nIt reads `clinePass[]`, dedupes model ids, then enriches context/output limits from OpenRouter's public model catalog by model slug. A static table covers known ClinePass models when OpenRouter omits fields. If the live list fails, the extension falls back to the static set and writes a stderr notice.\n\nKnown models:\n\n| Model               | Context window | Max output tokens | Reasoning |\n| ------------------- | -------------: | ----------------: | :-------: |\n| `glm-5.2`           |      1,048,576 |           131,072 |    Yes    |\n| `qwen3.7-max`       |      1,000,000 |            65,536 |    Yes    |\n| `qwen3.7-plus`      |      1,000,000 |            65,536 |    Yes    |\n| `kimi-k2.7-code`    |        262,144 |            16,384 |    Yes    |\n| `deepseek-v4-pro`   |      1,048,576 |           384,000 |    Yes    |\n| `deepseek-v4-flash` |      1,048,576 |            65,536 |    Yes    |\n| `minimax-m3`        |      1,048,576 |           512,000 |    Yes    |\n\n## ClinePass compatibility\n\nEach model is registered with:\n\n```ts\n{\n  api: \"clinepass:openai-completions\",\n  input: [\"text\"],\n  contextWindow: 1_000_000, // per-model from vendor docs\n  maxTokens: 131_072,       // per-model from vendor docs\n  reasoning: true,\n  compat: {\n    thinkingFormat: \"together\",\n    cacheControlFormat: \"anthropic\",\n    supportsUsageInStreaming: true,\n    supportsReasoningEffort: true,\n    supportsStore: false,\n    supportsDeveloperRole: false,\n    maxTokensField: \"max_tokens\"\n  }\n}\n```\n\nWhy `thinkingFormat: \"together\"`:\n\n- ClinePass accepts top-level `reasoning` objects.\n- ClinePass honors `{ reasoning: { enabled: false } }`.\n- It does not treat `{ reasoning: { effort: \"none\" } }` as disabled.\n- z.ai-native `thinking: { type: \"disabled\" }` is also ignored by ClinePass.\n\n## Development\n\n```bash\nbun install\nbun run typecheck\nbun run lint\nbun run lint:type-aware\nbun run format:check\nbun run quality:sentinel\nbun test\nbun run package:contract\nbun run clean-room\n```\n\n`package:contract` packs the real npm artifact, installs production dependencies in an isolated\nconsumer, and loads it through Pi without credentials. `clean-room` is mandatory and requires\nPodman; it runs packed-artifact smoke tests against official Pi 0.73.1 and Earendil Pi 0.80.6.\n\nUseful smoke test after local install:\n\n```bash\npi --model clinepass/glm-5.2 -p \"Reply exactly OK\"\n```\n\nIf it says `No API key found for clinepass`, the extension loaded; run `/login`.\n\n## Package surface\n\nPi loads this package through:\n\n```json\n{\n  \"pi\": {\n    \"extensions\": [\"./src/index.ts\"]\n  }\n}\n```\n\nRuntime entrypoint: `src/index.ts`.\n\n## Maintainer release setup\n\nRuntime updates run weekly from `.github/workflows/update-runtime.yml`. Configure\n`RUNTIME_UPDATE_TOKEN` as a fine-grained personal access token or GitHub App token with repository\n**Contents: read/write** and **Pull requests: read/write**. GitHub's default workflow token is not\nused because pull requests created by it do not trigger `pull_request` CI. The updater keeps one\n`automation/pi-ai-runtime` branch, pins an exact runtime version only when npm latest is newer, and\nnever downgrades or auto-merges; full CI and review remain required.\n\nnpm publication uses trusted publishing (OIDC) from `.github/workflows/publish.yml`; do not add an\n`NPM_TOKEN`. Configure that repository/workflow as the trusted publisher in npm. Create a published\nGitHub release only when its tag exactly matches `v${package.version}` (for this release, `v0.1.1`).\nThe workflow runs reusable full CI before publish, then polls npm and verifies public metadata,\ntarball integrity, production installation, and a no-auth official Pi smoke test.\n","readmeFilename":"README.md","license":"MIT"}