Commit Graph
27 Commits
Author SHA1 Message Date
cat-shark 9821439603 fix: read prompt and tools from the transcript
CI / Lint, typecheck & build (push) Failing after 32s
pi 0.87 made the session transcript canonical for provider context: the
context handed to a custom provider's stream no longer carries
`systemPrompt` and `tools`; they live on the leading system message
(`sections` + `toolsAdded`). streamQoder still read the removed fields,
so every request went out with `system: ""` and `tools: []` - the model
saw no prompt and no tools and answered that it cannot access files.

- resolve the prompt with getCurrentSystemPrompt(messages) and the tool
  list with getCurrentTools(messages)
- give tool parameters a root `type: "object"`: Qoder's upstream rejects
  a union root ("schema must be a JSON Schema of 'type: \"object\"', got
  'type: null'"), e.g. the agent-browser Electron tool, which failed the
  whole request with a 400
- bump the pi-ai / pi-coding-agent devDependencies to ^0.87.1 and cover
  the transcript prompt/tools path with a regression test
2026-09-29 10:18:44 +08:00
cat-shark a0be14764c feat(models): register every /model/list scenario
Qoder's /model/list groups one account catalog by UI scenario (chat,
assistant, quest, qwork, experts, ...). The CLI only read `chat`, so the
picker hid models the IDE exposes elsewhere — GLM-5.3, GLM-5.2 and
DeepSeek-V4-Pro live under experts/qwork.

Register the union of the scenario groups, keeping the first occurrence per
upstream key (chat wins) and excluding byok_* groups, which are
bring-your-own-key providers rather than part of the shared catalog.

Also keep an explicitly enabled `auto` model: live catalogs key `configs` by
the whitespace-stripped display name, so it arrives as `Auto` instead of the
legacy raw `auto` key.

Refresh the lockfile to the 0.4.5 already in package.json.
2026-09-24 17:17:10 +08:00
Cursor Agent a238e428fe fix: load registerApiProvider dynamically for OMP
OMP rewrites @earendil-works/pi-ai/compat to a bundle without
registerApiProvider, which broke static import at install/load.
Probe the export at runtime; stock pi still registers qoder-api for
global streamSimple, while OMP relies on registerProvider(streamSimple).
2026-09-06 12:53:03 +00:00
Cursor Agent ab80759fe0 chore: bump version to 0.4.3 2026-09-06 12:37:37 +00:00
Cursor Agent dfe7308674 chore: refresh package dependencies 2026-09-06 12:36:23 +00:00
Cursor Agent b854aa4685 chore: bump version to 0.4.2 2026-09-06 09:51:20 +00:00
Cursor Agent bd3d020cee fix: register qoder-api for pi global streamSimple
Pi 0.84+ no longer registers custom APIs from registerProvider.streamSimple,
so a later agent-loop path threw No API provider registered for api: qoder-api.
2026-08-31 17:51:46 +00:00
Cursor AgentandSimon Shi 09bd3bcf07 chore: bump version to 0.4.0
Co-authored-by: Simon Shi <simonsmh@users.noreply.github.com>
2026-08-31 17:23:32 +00:00
Cursor AgentandSimon Shi fb7305b0f8 chore: refresh npm lockfile
Refresh lockfile and dependencies within existing ranges via npm update.

Co-authored-by: Simon Shi <simonsmh@users.noreply.github.com>
2026-08-31 17:23:18 +00:00
Cursor AgentandSimon Shi 6d5cdfd171 test: add redacted Qoder protocol recorder and replays
Co-authored-by: Simon Shi <simonsmh@users.noreply.github.com>
2026-08-31 16:14:37 +00:00
dependabot[bot]andGitHub b3afbfce2b build(deps): bump undici in the npm_and_yarn group across 1 directory
Bumps the npm_and_yarn group with 1 update in the / directory: [undici](https://github.com/nodejs/undici).


Updates `undici` from 8.5.0 to 8.9.0
- [Release notes](https://github.com/nodejs/undici/releases)
- [Commits](https://github.com/nodejs/undici/compare/v8.5.0...v8.9.0)

---
updated-dependencies:
- dependency-name: undici
  dependency-version: 8.9.0
  dependency-type: indirect
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-08-08 03:41:21 +00:00
dependabot[bot]andGitHub 842750054e build(deps-dev): bump postcss
Bumps the npm_and_yarn group with 1 update in the / directory: [postcss](https://github.com/postcss/postcss).


Updates `postcss` from 8.5.15 to 8.5.25
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/postcss/compare/8.5.15...8.5.25)

---
updated-dependencies:
- dependency-name: postcss
  dependency-version: 8.5.25
  dependency-type: indirect
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-07-30 11:16:19 +00:00
Simon Shi 077e651fc7 fix: expose full Qoder model catalog 2026-07-22 20:06:05 +09:00
Simon Shi ef672a5461 fix: refresh Qoder models before startup 2026-07-22 19:54:46 +09:00
Simon Shi 55e87cbdef fix: stop adding auto as Qoder model fallback 2026-07-22 19:42:46 +09:00
Simon Shi 5ce99b0261 fix: publish 0.2.5 from npm registry 2026-07-20 22:29:18 +09:00
Simon Shi e1cfff3ecf fix: release 0.2.4 with Node 24 2026-07-20 22:27:15 +09:00
Simon Shi ab34573e82 chore: bump version to 0.2.3 2026-07-20 20:56:14 +08:00
Simon Shi c83fa0b8f3 test: add unit tests and remove dead code
- Add vitest with 98 tests across 6 test files covering:
  - cosy.ts: URL builders, mode detection, model name mapping
  - thinking-parser.ts: ThinkingTagParser with all tag variants and chunked streaming
  - transform.ts: getContentText, transformTools, transformMessagesForQoder
  - pat.ts: isPatRefresh, encodePatRefresh/decodePatRefresh roundtrip
  - qoder-encoding.ts: custom encoding correctness and edge cases
  - models.ts: static model definitions integrity checks

- Remove dead code:
  - QODER_CN_DIRECT_BASE_URL (unused export in cosy.ts)
  - THINKING_START_TAG / THINKING_END_TAG (unused constants in thinking-parser.ts)

- Add test/test:watch scripts to package.json
2026-06-27 20:03:05 +08:00
Simon Shi 2d6e1c660b chore: bump dependencies for security fixes 2026-06-26 14:50:39 +08:00
dependabot[bot]andGitHub 00be927ed5 build(deps-dev): bump esbuild
Bumps the npm_and_yarn group with 1 update in the / directory: [esbuild](https://github.com/evanw/esbuild).


Updates `esbuild` from 0.25.12 to 0.28.1
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG-2025.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.25.12...v0.28.1)

---
updated-dependencies:
- dependency-name: esbuild
  dependency-version: 0.28.1
  dependency-type: direct:development
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-06-16 05:40:33 +00:00
Simon Shi 8fb093bac0 release: v0.2.0 2026-06-16 13:39:20 +08:00
Simon Shi bcaa66091e fix: route PAT login through pi LoginDialog callbacks
The custom ctx.ui.custom login menu stole focus from pi's built-in
LoginDialog, so onPrompt never received keystrokes and PAT login
silently failed with 'No API key found'. Drive login via the provided
onPrompt/onAuth/onProgress callbacks instead, and drop login-ui.ts and
the now-unused pi-tui dependency. Also clears remaining lint warnings
by removing any-casts in models/oauth/stream/transform.
2026-06-16 13:39:16 +08:00
Simon Shi 0a4a0ddd97 release: v0.1.2 2026-06-16 13:39:09 +08:00
Simon Shi fdbc00fdcc release: v0.1.1 2026-06-16 13:39:03 +08:00
Simon Shi 032cf51904 refactor: drop redundant credentials cache and unused deps
- stream: passively rebuild stale/missing models cache on request
- oauth: read identity from pi's auth.json instead of self-managed cache
- deps: remove unused js-tiktoken; move esbuild to devDependencies
2026-06-16 13:38:55 +08:00
Simon Shi dd8c313984 feat: init pi-provider-qoder plugin with oauth, signature and WAF bypass 2026-06-16 13:38:48 +08:00