kimi-code/packages/protocol/src
Haozhe 14d9e98903
feat(server): auto-refresh provider model catalog and push change events (#1207)
* feat(server): auto-refresh provider models and push change events

- add scheduled provider-model refresh in the daemon (configurable
  interval + refresh-on-start) plus manual endpoints:
  POST /providers:refresh and POST /providers/{id}:refresh
- publish global event.model_catalog.changed when a refresh changes
  the catalog so connected clients can resync
- extract the refresh orchestrator into @moonshot-ai/kimi-code-oauth so
  the CLI and server share managed/open-platform/custom-registry logic
- wire the web daemon client to the new refresh endpoints

* chore: add changeset for provider model auto-refresh

* fix(web): reload model and provider caches on catalog change events

When the daemon's scheduled refresh changes the catalog, the pushed
event.model_catalog.changed only advanced the websocket sequence, leaving
the web composer's model/provider refs stale until an unrelated reload.
Reload both caches when the event arrives.

* test(sdk): cover event.model_catalog.changed in event exhaustiveness
2026-06-30 12:29:10 +08:00
..
__tests__ feat(web): hide empty sessions from the session list (#1166) 2026-06-28 13:38:46 +08:00
rest feat(server): auto-refresh provider model catalog and push change events (#1207) 2026-06-30 12:29:10 +08:00
approval.ts feat(protocol): extract shared protocol package from agent-core (#612) 2026-06-10 14:03:38 +08:00
asyncapi.ts feat(web): introduce Kimi web app and daemon gateway (#625) 2026-06-17 20:53:46 +08:00
display.ts feat(goal): support guided goal authoring (#839) 2026-06-18 18:48:23 +08:00
envelope.ts feat(protocol): extract shared protocol package from agent-core (#612) 2026-06-10 14:03:38 +08:00
error-codes.ts feat(web): introduce Kimi web app and daemon gateway (#625) 2026-06-17 20:53:46 +08:00
events.ts feat(server): auto-refresh provider model catalog and push change events (#1207) 2026-06-30 12:29:10 +08:00
file.ts feat(protocol): extract shared protocol package from agent-core (#612) 2026-06-10 14:03:38 +08:00
fs.ts feat(protocol): extract shared protocol package from agent-core (#612) 2026-06-10 14:03:38 +08:00
index.ts feat(web): introduce Kimi web app and daemon gateway (#625) 2026-06-17 20:53:46 +08:00
message.ts feat(web): introduce Kimi web app and daemon gateway (#625) 2026-06-17 20:53:46 +08:00
modelCatalog.ts feat(web): introduce Kimi web app and daemon gateway (#625) 2026-06-17 20:53:46 +08:00
pagination.ts feat(protocol): extract shared protocol package from agent-core (#612) 2026-06-10 14:03:38 +08:00
question.ts fix(web): stop auto-dismissing pending questions and approvals on a timeout (#1070) 2026-06-24 19:15:06 +08:00
request-id.ts feat(protocol): extract shared protocol package from agent-core (#612) 2026-06-10 14:03:38 +08:00
session.ts feat(web): add session search (#895) 2026-06-18 19:23:23 +08:00
skill.ts feat(web): introduce Kimi web app and daemon gateway (#625) 2026-06-17 20:53:46 +08:00
task.ts feat(web): introduce Kimi web app and daemon gateway (#625) 2026-06-17 20:53:46 +08:00
time.ts feat(protocol): extract shared protocol package from agent-core (#612) 2026-06-10 14:03:38 +08:00
tool.ts feat(protocol): extract shared protocol package from agent-core (#612) 2026-06-10 14:03:38 +08:00
workspace.ts feat(protocol): extract shared protocol package from agent-core (#612) 2026-06-10 14:03:38 +08:00
ws-control.ts feat(web): introduce Kimi web app and daemon gateway (#625) 2026-06-17 20:53:46 +08:00