mirror of
https://github.com/deepseek-ai/deepseek-harness
synced 2026-08-15 21:04:50 +00:00
Once a pi-ai route became a declaration rather than a catalog lookup, adding an OpenAI-compatible gateway meant knowing its model ids up front. Most such endpoints publish that list at `GET /models`, but no seam operation could ask: every one is keyed by a registered provider route, and the provider being added has no route, no stored profile, and no stored credential — the endpoint and key are values in a form. Interrogation is therefore keyed by settings namespace, which a configuration surface already holds from the configurable-provider directory. `registerModelDiscovery` offers it per namespace, `discoverModels` asks, and the request carries the draft itself. The reply is candidates, not a catalog: every field but the id is optional because most listings disclose nothing else, and adopting one is a settings write like any other. Nothing here reads or writes settings or credentials, so `settings.yaml` still decides what a route serves. `llm.discoverModels` carries the same draft over the wire. Its apiKey is the third and last payload a secret may ride, and it is never stored, logged, or echoed; every refusal folds into `model-discovery-failed`, naming the endpoint asked but never the credential offered. The pi-ai side is a plain GET for OpenAI-compatible protocols only — their listing shape is the one gateways, self-hosted servers, and the official endpoints agree on. Others say so, sending the user to hand-entry rather than reporting a guessed shape as an empty provider. The reply is read under a four-megabyte ceiling held on the bytes actually received, because the endpoint is a URL the user typed.
18 KiB
18 KiB
Event Producer And Consumer Matrix
This matrix shows which packages dispatch each harness-owned event and which packages listen to it. It is intentionally a table rather than one large graph: events are many-to-many, and dense relation data is easier to review in rows. Receiver and event-name types also cover contained dispatch sites that deliberately bypass ctx.emit, such as subagent lifecycle containment.
Non-harness or undeclared event strings seen in package source
| Event string | Dispatchers | Listeners |
|---|---|---|
commands/changed |
runtime (emit) |
ui-command |
connection/reset |
runtime (emit) |
ui-command, ui-models, ui-permission, ui-settings-general |
credentials/changed |
runtime (emit) |
ui-models |
internal/dispatch |
- | commands, compact, fs, goal, goal-session, hook-protocol, llm-retry, permission, plan-mode, pty-local, runtime, sandbox-policy, scope, session, session-title, subagent, time-context, tool-todo, tools, user-approval, workflow |
internal/plugin |
- | hmr, loader, modules, webserver |
internal/status |
- | agent |
locale/change |
locale (emit) |
locale |
models/changed |
runtime (emit) |
ui-models |
settings/changed |
runtime (emit) |
ui-models, ui-permission, ui-settings-general |
slash/input-begin-command |
- | ui-conversation |
slash/input-consume-token |
- | ui-conversation |
slash/input-insert-reference |
- | ui-conversation |
slash/input-insert-text |
- | ui-conversation |
slots/changed |
runtime (emit) |
- |
theme/change |
ui-theme (emit) |
ui-layout, ui-theme |
Maintenance mode: generated: Cordis event declarations and producer/listener edges are resolved from the repository TypeScript Program.