Files
DeepSeek-TUI/docs/public-surface-facts.json
Hunter Bown 55b53b6c31 feat(providers): Concentrate as a first-class opt-in BYOK Responses gateway (#5725)
* feat(providers): Concentrate as a first-class opt-in BYOK Responses gateway

Adds `concentrate` (aliases `concentrate-ai`, `concentrate_ai`,
`concentrateai`) inside the existing provider authorities — no parallel
secret store, router, or runtime:

- Identity/metadata: `ProviderKind::Concentrate`, hand-written
  `impl Provider` with `WirePolicy::Fixed(WireFormat::Responses)` (the
  gateway documents the Responses API as its production surface),
  default base URL `https://api.concentrate.ai/v1`, default model
  `deepseek-v4-pro`, env `CONCENTRATE_API_KEY` (+ `CONCENTRATE_BASE_URL`,
  `CONCENTRATE_MODEL`), its own secret-store slot, credential help.
- Routing: aggregator-class pass-through. A plain catalog id lets the
  gateway choose the upstream provider, `provider/model` pins one, and
  only the gateway's own `concentrate/` namespace is stripped so
  `concentrate/auto` reaches its `auto` router while Codewhale's bare
  `auto` stays the resolver sentinel (provider default).
- Wire: the Responses body carries only documented fields — `model`,
  `input`, `stream`, `max_output_tokens`, `tools`/`tool_choice`/
  `parallel_tool_calls`, `reasoning.effort` — with the system prompt as a
  leading `system` input item (`instructions`, `store`, `include`, and
  `reasoning.summary` are absent from the gateway's parameter reference).
  Streaming rides the existing typed `response.*` SSE parser and ends on
  `response.completed` without a `[DONE]` sentinel.
- Catalog: the unauthenticated `GET /v1/models` (OpenAI list shape) joins
  the named-gateway live-catalog path; rows stay provider-scoped and
  unclaimed.
- Errors (provider-neutral): a 402 "insufficient credits/funds" body now
  classifies as quota (RateLimit) instead of falling through, and a flat
  `{"error":"<class>","message":"<detail>"}` body surfaces both halves
  in the TUI sanitizer instead of the class alone.
- Registry parity: `ProviderKind::ALL` 42→43, registry 47→48, golden
  route ids + providers-export golden regenerated,
  `scripts/check-provider-registry.py` manual-impl allowlist, web facts
  label maps + `facts.generated.ts` (providers 45→46), docs rows in
  PROVIDERS.md (+ a Concentrate Notes section) and CONFIGURATION.md,
  CHANGELOG.

Commercial boundary, preserved in code and docs: BYOK only. Concentrate's
Terms of Service forbid resale, white-label, and service-bureau use
without written consent and its AUP forbids key sharing, so there is no
Codewhale-owned key, no stored customer key, no default or managed
routing, and no markup; any hosted lane is gated on written consent,
terms, and billing approval (ops evidence
concentrate-gateway-20260829/CHECKLIST.md). A saved or environment
Concentrate key is bound to the official base URL and is never sent to
any other endpoint — a custom endpoint receives a key only when
`base_url` and `api_key` are both written into `[providers.concentrate]`.

Keyless dogfood: `scripts/concentrate-selftest.sh` boots
`scripts/concentrate-stub.py` (the documented contract on loopback:
`/v1/responses/health`, unauthenticated `/v1/models`, typed-SSE
`/v1/responses`, documented error bodies) and drives the real
`codewhale exec --auto --output-format stream-json` path through it,
asserting the URL, bearer header, verbatim model, only-documented fields,
system item first, the completed-turn receipt, and the wrong-key 401.
No network call leaves the machine; no account exists in the loop.

Contract sources (fetched 2026-08-29):
https://concentrate.ai/docs/api-reference/introduction
https://concentrate.ai/docs/api-reference/endpoint/request-parameters
https://concentrate.ai/docs/api-reference/endpoint/streaming
https://concentrate.ai/docs/api-reference/endpoint/errors
https://concentrate.ai/docs/api-reference/endpoint/list-models
https://concentrate.ai/docs/legal/terms-of-service

Verification: local, this host, CI flags (RUSTFLAGS=-Dwarnings, RUST_MIN_STACK=16MiB,
nextest --profile ci, --all-features, --locked): fmt clean; codewhale-config
624 run / 624 passed / 1 skipped (incl. new concentrate_resolves_… and
concentrate_passes_ids_through_and_strips_only_its_own_namespace, regenerated
goldens); codewhale-secrets 62/62; codewhale-tui focused (concentrate +
error_taxonomy + client::responses + llm_client + provider config + catalog
filters) 440 run / 440 passed; debug CLI built; scripts/concentrate-selftest.sh
PASS ×3 (concentrate/auto → wire `auto`, openai/gpt-5.6-sol, deepseek-v4-pro);
scripts/check-provider-registry.py PASS; clippy config+secrets and tui
(--all-targets --all-features, CI allow list) clean; web facts regenerated
(providers 46) + check-facts OK; dead-code budget PASS; git diff --check
clean.

Not done: no live Concentrate canary (needs a key and founder-gated spend);
Windows-target compile is hosted-CI-only on this host.

No-Issue: provider addition requested by the founder; no tracking issue exists.

Signed-off-by: CodeWhale Bot <bot@codewhale.net>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* test(cli): bump the provider registry counts for Concentrate (48 / 43)

Hosted `Test (ubuntu-latest)` on #5725 failed exactly one test out of
13,958: `cli_provider_helpers_follow_config_metadata` still asserted the
pre-Concentrate registry sizes (47 full / 42 catalog). The config crate's
twin assertion was updated in the parent commit; this mirrors it. The rest
of the test (env vars and secret-store slot per registry kind) already held
for `concentrate`. Local: codewhale-cli 276 run / 276 passed.

Signed-off-by: CodeWhale Bot <bot@codewhale.net>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* fix(providers): Concentrate review leftovers — alias, unauth 2xx, selftest

[providers.concentrateai] was silently ignored on both config tables.
GET /v1/models is unauthenticated, so a 2xx must not count as key proof —
the probe is unobserved and health_check issues no request. Missing stub
reply text now fails the selftest instead of exiting 0. Duplicate
CONCENTRATE_BASE_URL assignment removed; retired launch_screen row dropped
after the main merge.

Proven: concentrate_resolves_named_responses_gateway_and_environment_overrides
1 passed; concentrate_health_check_does_not_treat_unauthenticated_models_as_key_proof
plus two sibling Concentrate tests 3 passed; 0 failed.

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Signed-off-by: CodeWhale Bot <bot@codewhale.net>
Co-authored-by: CodeWhale Bot <bot@codewhale.net>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-01 11:34:24 -07:00

243 lines
6.6 KiB
JSON

{
"schemaVersion": 2,
"product": {
"name": "Codewhale",
"description": "Terminal coding agent for supported hosted and local models. One runtime on your machine. Rust, MIT.",
"positioning": "Terminal-native, model/provider-neutral, local-first coding agent",
"license": "MIT",
"terminology": {
"Pod": "who is in the roster and which member is selected",
"Workflow": "what order the work follows",
"Lane": "one running Workflow instance",
"Runtime": "where, how, and with what authority selected work executes"
},
"sources": [
"Cargo.toml",
"LICENSE",
"README.md",
"npm/codewhale/package.json",
"docs/FLEET.md"
]
},
"sourceCandidate": {
"version": "0.9.11",
"providerCount": 46,
"toolCount": 75,
"sandboxBackends": [
"seatbelt (macOS, when available)",
"bubblewrap (Linux, opt-in when installed)"
],
"sources": [
"Cargo.toml",
"crates/tui/src/config.rs",
"crates/tui/src/sandbox/mod.rs",
"web/scripts/derive-facts.mjs"
]
},
"latestPublishedRelease": {
"tag": "v0.9.11",
"version": "0.9.11",
"publishedAt": "2026-08-23T17:39:46Z",
"url": "https://github.com/Hmbown/CodeWhale/releases/tag/v0.9.11",
"sources": [
"web/data/latest-published-release.json"
]
},
"install": {
"recommended": "npm install -g codewhale",
"binaries": [
"codewhale",
"codew"
],
"channels": {
"npm": "published releases only",
"cargo": "published crates only",
"prebuiltArchives": "published GitHub Releases only",
"cnbMirror": "documented targets only"
},
"androidTermux": {
"status": "preview",
"npm": "preview",
"requiresMatchingPublishedAssets": true,
"sourceBuild": true
},
"sources": [
"README.md",
"npm/codewhale/package.json",
"npm/codewhale/README.md",
"npm/codewhale/scripts/artifacts.js",
"docs/INSTALL.md",
"docs/CNB_MIRROR.md"
]
},
"control": {
"modes": [
"Plan",
"Work",
"Operate"
],
"permissionPostures": [
"Ask",
"Auto-Review",
"Full Access"
],
"shortcuts": {
"mode": {
"chord": "Tab",
"when": "composer empty"
},
"permissionPosture": {
"chord": "Shift+Tab",
"when": "always (suppressed only under a non-Config modal)"
}
},
"sources": [
"docs/MODES.md",
"docs/KEYBINDINGS.md",
"crates/tui/src/settings.rs"
]
},
"toolSurface": {
"defaultActive": [
"read",
"write",
"edit",
"bash",
"agent",
"todo_write"
],
"schemas": {
"read": [
"path",
"offset?",
"limit?"
],
"write": [
"path",
"content"
],
"edit": [
"path",
"edits"
],
"bash": [
"command",
"timeout?"
]
},
"deferred": {
"Web": [
"search",
"fetch",
"wait"
]
},
"compatibility": {
"legacyAliases": "hidden-exact",
"modelVisible": false,
"toolSearchDiscoverable": false
},
"activationCache": {
"maximumNames": 8,
"maximumSchemaBytes": 16384,
"scope": "per conversation; each subagent owns an independent policy-filtered cache"
},
"agentConcurrency": {
"defaultConfigured": 64,
"maximumConfigured": 128,
"maximumAdmitted": 1024
},
"sources": [
"docs/TOOL_SURFACE.md",
"docs/RUNTIME_SIMPLIFICATION_DESIGN.md",
"crates/tui/src/core/engine/tool_catalog.rs",
"crates/tui/src/tools/registry.rs",
"crates/tui/src/config/subagent_limits.rs"
]
},
"surfaces": {
"availableInSourceCandidate": [
"TUI",
"codewhale exec",
"Web client",
"Runtime API",
"MCP",
"Pod"
],
"sources": [
"docs/GUIDE.md",
"docs/WEB.md",
"docs/RUNTIME_API.md",
"docs/MCP.md",
"docs/FLEET.md"
]
},
"trust": {
"localRuntime": "runtime, workspace state, and audit log stay on the user's machine",
"hostedProviderBoundary": "the selected hosted provider receives turn context required for inference",
"localInference": "a loopback local-model route can keep inference local",
"telemetry": "anonymous usage counting is on by default with a clear first-run disclosure and a durable opt-out; Codewhale does not collect conversations, code, prompts, files, file/repo/branch names, model content, credentials, or per-turn/per-tool timelines; it posts aggregate counts and closed enums to the first-party endpoint https://telemetry.codewhale.net/v1/telemetry, whose storage has no IP, country, or geo column and a fixed three-month retention; telemetry_endpoint = \"\" writes only to a local dry-run file; no mandatory hosted relay",
"account": "no account required for the local runtime",
"plan": "Plan is read-only",
"sandbox": "Seatbelt is used on macOS when available; Linux bubblewrap is opt-in and must be installed; Windows currently reports no OS sandbox",
"audit": "sensitive events append best-effort to $CODEWHALE_HOME/audit.log (default ~/.codewhale/audit.log); write failures are logged",
"usage": "provider token and cache usage is shown locally when available",
"sources": [
"docs/PROVIDERS.md",
"docs/MODES.md",
"docs/SANDBOX.md",
"docs/RUNTIME_API.md",
"docs/WEB.md",
"crates/tui/src/audit.rs",
"web/app/[locale]/faq/page.tsx",
"web/app/[locale]/install/page.tsx"
]
},
"platforms": {
"prebuilt": [
"Linux x64",
"Linux arm64",
"macOS x64",
"macOS arm64",
"Windows x64",
"Windows arm64"
],
"preview": [
"Android/Termux arm64"
],
"sources": [
"docs/INSTALL.md"
]
},
"repository": {
"canonical": "https://github.com/Hmbown/CodeWhale",
"mirrors": [
"https://cnb.cool/codewhale.net/codewhale",
"https://npmmirror.com/package/codewhale"
],
"creditSources": [
"CHANGELOG.md",
"docs/CONTRIBUTORS.md",
"web/lib/release-credits.ts"
],
"requiredCandidateCredits": [
"@bistack",
"@aboimpinto",
"@wuisabel-gif",
"@RepentStar"
]
},
"screenshot": {
"readme": "assets/screenshot.webp",
"website": "web/public/codewhale-tui.webp",
"sourceVersion": null,
"sourceCommit": null,
"terminal": "unrecorded",
"theme": "Blue Stage dark",
"capture": "current Codewhale session; exact binary identity was not recorded, so this image makes no published-release or exact-candidate claim",
"sources": [
"crates/tui"
]
}
}