Commit Graph

37 Commits

Author SHA1 Message Date
CodeWhale Bot f11657e77f fix(mistral): isolate the reasoning wire contract
Scope Mistral's polymorphic reasoning and replay behavior to exact first-party HTTPS routes, preserve stored thinking across real prompt construction, and keep DeepSeek's sanitizer from injecting a second dialect into tool-call history.

Align the current model registry, provider-scoped model override, generated facts, docs, and focused route-isolation tests. Split the large stream decoder test module so the source-structure gate remains below budget.

Signed-off-by: CodeWhale Bot <bot@codewhale.net>
2026-08-08 17:23:14 -07:00
Hunter Bown 99ae7d4f62 fix(web): map Model Studio provider variants in facts drift guards (#5230)
* fix(web): map Model Studio provider variants in facts drift guards

The train's Model Studio lane added four ApiProvider variants without
registering them in the web facts maps, failing check-facts (Lint & Type
Check on #5135). All four share the single MODELSTUDIO_API_KEY env var.

* chore(web): regenerate facts.generated.ts (providers 40, tools 68)
2026-08-03 08:56:46 -07:00
Hmbown aff2cf782c feat(web): localize the site chrome and home page for eight locales
Extracts the marketing site's hard-coded English copy into per-locale
dictionaries (19 chrome keys + 40 home keys for en, es, ja, ko, pt-BR,
ru, uk, vi) and routes nav, footer, locale switcher, sitemap, and the
home page through them.

Also:

- `lib/i18n/detect.ts` pulls Accept-Language negotiation out of
  middleware into a tested module. This fixes the pt-BR bug: a browser
  sending `pt-BR` was matched on the bare `pt` prefix against the wrong
  candidate and could land on the English page.
- page-meta derives hreflang alternates from the locale registry instead
  of a hand-maintained list, so a new locale can no longer ship without
  its alternates.
- `web/scripts/check-locales.mjs` is a new CI gate: it holds every locale
  dictionary at exact key parity with `en` and fails if a translation
  drops a `{template}` token. Wired into ci.yml and `npm run
  check:locales`.

Gates: `npm test` 168 passed (24 files), `npx tsc --noEmit` clean, `npm
run lint` clean, `node web/scripts/check-locales.mjs` PASS.

Harvested from the v0.9.2 localization lane (#3092, #4749, #4791).
2026-07-27 02:41:03 -07:00
Hunter B e805213d8e fix(web): map OpenCode Zen provider facts
Keep the public provider facts and source-candidate count aligned with the new ApiProvider variant so the hosted web gate remains truthful.

Verified: npm run check:facts; npm run check:docs; npm test (137/137); npm run lint; npm run build.
2026-07-26 16:50:13 -07:00
Hunter B 26fab52366 fix(web): carry TelecomJS through public facts
Map the contributed TelecomJS provider into both facts derivations, regenerate the committed source-candidate facts at 35 providers while preserving toolCount 66, and document its conservative fallback and isolated live catalog.

No deployment, publication, tag, or release is performed.

Signed-off-by: Hunter B <hmbown@gmail.com>
2026-07-21 22:38:13 -07:00
Hunter B 4b80259c67 docs(public): align release facts with runtime
Derive website sandbox facts from explicit runtime capability markers instead of source filenames. Document actual platform wrappers, narrow model and audit claims, and make two-package/three-command installs exact.

Verify release assets under their manifest filenames before renaming them, with an executable contract test for every Unix snippet. Refresh localized README receipts and keep source-candidate toolCount at 66.

Signed-off-by: Hunter B <hmbown@gmail.com>
2026-07-21 18:38:16 -07:00
Hunter B 218b4fc3f8 ci(web): verify exact manual deployments
Add a credential-free deployed-facts comparator, machine-readable preflight receipts, and fail-closed workflow context checks. Manual main deployments now record prior drift and verify the public worker reports the exact workflow SHA after upload.

Signed-off-by: Hunter B <hmbown@gmail.com>
2026-07-21 16:40:50 -07:00
Hunter B 17bf7b8f1f fix(web): make source facts provenance-aware
Reject malformed, legacy, and older KV snapshots before they can replace a newer deployed build. Derive runtime facts from one exact main revision, expose a public source receipt, and keep the latest published release distinct from the source candidate.

Signed-off-by: Hunter B <hmbown@gmail.com>
2026-07-21 16:40:48 -07:00
Hunter B 74862148a5 chore(web): add credential-free deploy preflight
Let contributors verify the deploy contract without possessing production Cloudflare credentials. The normal deploy check remains fail-closed.
2026-07-21 14:24:42 -07:00
Hunter B 3f6419ff1d fix(web): expose OpenCode Go in derived facts
Keep the build-time and runtime provider maps aligned with the first-class OpenCode Go provider merged for v0.9.1. Regenerate the committed website facts so the drift gate and provider inventory remain truthful.

Signed-off-by: Hunter B <hmbown@gmail.com>
2026-07-16 18:28:42 -07:00
Hunter Bown 352e86a611 Merge pull request #4366 from Hmbown/claude/codewhale-v0.8.68-test-review-zsphu7
fix(web): align site brand strings and tidy redesign leftovers
2026-07-14 06:25:59 -05:00
Hunter B e13822a385 fix(web): preserve source checkout casing
Git clones the technical CodeWhale repository slug into a case-matching directory by default, so keep the following cd command exact for case-sensitive filesystems. Extend the docs drift gate to reject future clone-directory casing mismatches.

Signed-off-by: Hunter B <hmbown@gmail.com>
2026-07-14 04:13:36 -07:00
octo-patch 47163da80f feat: add MiniMax Messages provider
Register MiniMax-M3 and MiniMax-M2.7 for the OpenAI-compatible and Messages routes. Add regional endpoint guidance, request tests, catalog limits, and tier-aware pricing.
2026-07-13 21:17:28 +08:00
Hunter B bd313ae995 fix(web): keep provider facts inventory complete
Add Meta Model API and the existing xAI route to both provider-facts maps so the generated website inventory and runtime drift path cannot silently omit them.

Verified with node web/scripts/derive-facts.mjs and node web/scripts/check-facts.mjs.
2026-07-09 11:40:45 -07:00
Nightt 7229f6e09a docs: sync Xiaomi MiMo token-plan docs (#3820)
Harvested from PR #3820 by @nightt5879

Co-authored-by: Nightt <87569709+nightt5879@users.noreply.github.com>
2026-07-08 00:51:09 -07:00
Hunter B 83a065f822 fix(catalog): surface LongCat as Meituan LongCat (#4058)
Rename the LongCat provider label in the shared provider descriptor, TUI
header, and website facts so the picker and docs show Meituan ownership.

Signed-off-by: Hunter B <hmbown@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-06 19:32:14 -07:00
Hmbown 55d0253a59 fix(web): map LongCat in provider facts drift check
Adding the LongCat ApiProvider variant tripped the web `check:facts` gate
("unmapped ApiProvider variant(s): LongCat"). Add LongCat to
PROVIDER_LABEL_MAP (web/scripts/facts-lib.mjs) and labelMap
(web/lib/facts-drift.ts), mirroring the Sakana entry, and regenerate
web/lib/facts.generated.ts. `node scripts/check-facts.mjs` now passes
(providers=30, version=0.8.67).

Signed-off-by: Hmbown <101357273+Hmbown@users.noreply.github.com>
(cherry picked from commit a54a8dec2e74e2293f95d8904efba3464fade119)
2026-07-05 11:09:18 -07:00
Hunter Bown d90560dda3 Merge pull request #3777 from Hmbown/codex/0866-3772-check-facts-providers
fix(web): fail check-facts on unmapped ApiProvider variants (#3772)
2026-06-29 11:55:01 -05:00
Hunter B c59f093f60 fix(web): fail check-facts on unmapped ApiProvider variants (#3772)
`deriveProviders()` warned about unmapped `ApiProvider` variants but returned
only the mapped subset, so `check:facts` could still pass while the public
provider map silently fell behind the Rust enum (e.g. `Openmodel`, `Sakana`).

- Map `Openmodel` and `Sakana` in both `web/scripts/facts-lib.mjs`
  (PROVIDER_LABEL_MAP) and `web/lib/facts-drift.ts` (labelMap).
- Add `unmappedProviderVariants()` (facts-lib) and hard-fail `check-facts.mjs`
  when any non-excluded variant is unmapped, naming the variants and the fix.
- The generator stays lenient (warns) so local `prebuild` is not blocked;
  the hard gate lives in the CI check.
- Regenerate `facts.generated.ts` (adds the two providers).
- Add `provider-mapping.test.ts` asserting no unmapped variants remain.

Fixes #3772
2026-06-28 23:12:39 -07:00
Hunter B 53cf6bc81b fix(web): fail check-docs on stale install snippets (#3770)
`check-docs.mjs` detected stale `codewhale --version # X` install snippets and
printed `FAIL`, but the stale branch fell through to the final
`console.log("[check-docs] PASS")` without `process.exit(1)`. CI could miss
public install-copy drift the gate exists to catch.

Mirror the `exit(1)` used by the missing-sources and version checks: on stale
snippets, print the details and exit non-zero; the final PASS is reached only
when every check passes.

Fixes #3770
2026-06-28 23:11:32 -07:00
Hunter B 1d751bedb4 ci(web): preflight cloudflare deploy env
Fail the manual website deploy job before the OpenNext build when the Cloudflare account variable or API token secret is missing or placeholder-like. This makes the GitHub Actions failure actionable while leaving Wrangler as the deploy authority.

Verification:

- npm run check:deploy-env (expected failure without env)

- env CLOUDFLARE_ACCOUNT_ID=cf50f793171d7cb3b2ce23368b69cdcb CLOUDFLARE_API_TOKEN=abcdefghijklmnopqrstuvwxyz npm run check:deploy-env

- npm run check:facts

- npm run check:docs

- npm run lint

- git diff --check
2026-06-26 13:02:39 -07:00
Hunter Bown c06d872616 Merge pull request #3543 from idling11/fix/issue-3417-docs-structure
refactor(web): promote repo docs into structured website documentation (#3417)
2026-06-24 08:50:47 -07:00
Hunter B 82351c006e fix(web,build): handle Custom meta-provider + fix default-model after config split
Follow-ons surfaced by integrating #1519 + #3311:
- #1519 added the dynamic ApiProvider::Custom meta-provider. Exclude it from the
  website provider facts (facts-lib.mjs + facts-drift.ts EXCLUDED, like
  DeepseekCN) and from the provider-table drift check (META_PROVIDER_TABLES in
  check-provider-registry.py) — it's a runtime catch-all, not a shipped provider.
- #3311 moved DEFAULT_TEXT_MODEL's definition to config/models.rs, which broke
  the web facts' loose scrape (it mis-bound to an NVIDIA base URL). Read both
  files and match the const definition precisely; default model is deepseek-v4-pro
  again.
2026-06-24 02:07:28 -07:00
Hunter B fbac2bd234 fix(web): keep prebuild facts generation deterministic
Audit #3 (scratchpad/bug-audit-2026-06-24.md): `npm run build` ran
derive-facts.mjs which always stamped a fresh generatedAt into the tracked
web/lib/facts.generated.ts, dirtying the working tree on every clean build.

Preserve the committed generatedAt when every *checked* fact (the same set the
drift gate compares, excluding generatedAt + runtime-only latestRelease) is
unchanged, so a clean rebuild leaves the tracked file byte-identical. A real
fact change still stamps a fresh timestamp.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-23 23:50:38 -07:00
Hanmiao Li 0129c44f00 refactor(web): promote repo docs into structured website documentation (#3417)
Replace the single monolithic Docs page with a hub-and-spoke structure
backed by a canonical docs-map.ts registry.

- web/lib/docs-map.ts: canonical doc registry mapping 16 topic areas to
  repo source files, with locale-aware labels and category groups
- web/app/[locale]/docs/layout.tsx: shared sidebar nav layout for all
  docs sub-pages with categorized topic links (§ for pages, ↗ for repo)
- web/app/[locale]/docs/page.tsx: rewritten from 640-line monolith into
  a hub index with categorized topic cards and source attribution
- web/app/[locale]/docs/constitution/page.tsx: standalone page
  preserving existing EN+ZH inline content
- web/app/[locale]/docs/modes/page.tsx: standalone modes + approval page
- web/app/[locale]/docs/tools/page.tsx: standalone tools catalog page
- web/scripts/check-docs.mjs: drift/parity gate verifying repo source
  files exist, version matches workspace, and install snippets are fresh
- web/package.json: add npm run check:docs
- .github/workflows/web.yml: run check:docs after prebuild in lint job
2026-06-24 14:22:16 +08:00
Hunter Bown 38f9152089 feat(web): add fact-drift CI gate for version, providers, and tool inventory (#3415) (#3481)
Extract shared derivation logic into web/scripts/facts-lib.mjs and
create a check-facts.mjs CI gate that fails when web/lib/facts.generated.ts
is stale relative to the workspace sources.

- facts-lib.mjs: single-source-of-truth derivation shared by
  derive-facts.mjs (prebuild) and check-facts.mjs (gate)
- derive-facts.mjs: slimmed to ~63 lines, imports from facts-lib.mjs
- check-facts.mjs: re-derives facts and compares against committed file;
  exits non-zero when version, providers, crates, sandboxBackends,
  defaultModel, nodeEngines, toolCount, or license have drifted
- web/package.json: add npm run check:facts script
- .github/workflows/web.yml: run check:facts after prebuild in lint job
- web/lib/check-facts.test.ts: 9 vitest tests covering stale version
  (0.8.62 vs 0.8.64), provider drift, multi-field detection, edge cases

Closes #3415

Co-authored-by: Hanmiao Li <894876246@qq.com>
2026-06-23 10:45:13 -07:00
Hunter Bown 5b8a5ac0b2 feat(provider): add DeepSeek Anthropic-compatible route
Adds a DeepSeek Anthropic-compatible provider route through the existing Messages adapter.\n\nVerification:\n- cargo fmt --all -- --check\n- git diff --check\n- python3 scripts/check-provider-registry.py\n- cargo test -p codewhale-tui --bin codewhale-tui --locked deepseek_anthropic\n- cargo test -p codewhale-tui --bin codewhale-tui --locked api_provider_metadata_helpers_follow_config_provider_metadata\n- cargo test -p codewhale-tui --bin codewhale-tui --locked provider_config_key_follows_config_provider_metadata\n- cargo clippy -p codewhale-tui --bin codewhale-tui --locked -- -D warnings -A clippy::uninlined_format_args -A clippy::too_many_arguments -A clippy::unnecessary_map_or -A clippy::assertions_on_constants\n- GitHub checks green on abe866ae0
2026-06-23 10:26:07 -07:00
Hunter Bown 0861661b60 feat(provider): add Qianfan route fixture (#3425)
* feat(provider): add Qianfan route fixture

Add Baidu Qianfan as a first-class OpenAI-compatible provider descriptor with provider-scoped auth, base URL, model env overrides, docs, and focused TUI/config regressions.

Qianfan service model IDs pass through under provider scope, while unsupported reasoning extensions stay out of request payloads.

Refs #3357.

* Add Qianfan to web facts maps

Keep the build-time and runtime facts derivation label maps in sync with the Qianfan ApiProvider variant so the release version-drift guard can derive provider facts cleanly.

Verification:

- ./scripts/release/check-versions.sh

- python3 scripts/check-provider-registry.py

- cargo test -p codewhale-config --locked qianfan

- cargo test -p codewhale-tui --bin codewhale-tui --locked qianfan

- npm run lint -- lib/facts-drift.ts scripts/derive-facts.mjs (from web/)

- cargo fmt --all -- --check

- git diff --check

* fix(provider): qianfan env-var alias fallback skips empty values

std::env::var returns Ok("") for a set-but-empty var, so the prior or_else chain
never reached BAIDU_QIANFAN_BASE_URL / BAIDU_QIANFAN_MODEL when QIANFAN_* was set
to empty. Filter each var for non-empty before falling back to the alias.
(From the Claude review on #3425.)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-23 02:13:27 -07:00
Hunter B 7c9f28caa0 fix(release): finish v0.8.61 provider and site surfaces
Complete the DeepInfra CLI/config/TUI alias path, refresh the public 25-provider README/docs/site surfaces, and clean the website production build tracing metadata for v0.8.61.

Harvested release-surface follow-up from PR #3236 by @nightt5879.

Closes #3231.

Co-authored-by: Nightt <87569709+nightt5879@users.noreply.github.com>
2026-06-16 01:16:57 -07:00
Hunter B ddbc3cfe4b docs(web): finish i18n cleanup, fix provider facts, mission framing
- Remove dead i18n dictionary code (dictionaries/{en,zh}.ts,
  get-dictionary.ts); copy is inlined per-page and these had no importers.
- Add Z.ai/StepFun/MiniMax to derive-facts + facts-drift labelMaps so the
  facts build covers all providers and 'npm run build' passes.
- Homepage/FAQ: mission-idea-in-this-version framing, 0.8.61 version refs,
  locale-prefixed fallback links; WhaleFlow stays off the homepage hero.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-15 06:26:05 -07:00
Hunter B a70d5c9e12 docs(web): harvest README + website refresh onto main (0.8.61)
Richer README front door (open-models-first framing, '## The Idea' constitution essay,
accurate 24-provider list) + website improvements (SEO opengraph/robots/sitemap routes,
nav/footer, facts-driven pages, coupled locale-layout), 3-way reconciled to 0.8.61:
provider count corrected 21->24 (verified vs crates/config), version/palette/dead-link fixes.
Conservatively deferred 3 heavily-conflicting web pages (page/faq/install) to preserve main's
richer versions. Verified: tsc --noEmit exit 0, eslint clean, cargo build clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-14 14:27:45 -07:00
Hunter B 3d503a0a24 docs: bring public surface and npm-deferred install copy 2026-06-08 08:01:18 -07:00
Hunter B 6f295e9961 docs: sync release credit surfaces 2026-05-31 17:43:46 -07:00
Hunter Bown 64c870f35c docs(web): sync v0.8.45 facts and provider surface 2026-05-25 22:07:10 -05:00
Hunter Bown 3e89ccf98e style: cargo fmt 2026-05-24 03:34:13 -05:00
Hunter Bown 190eb6b162 docs(web): refresh v0.8.32 site state 2026-05-12 14:04:17 -05:00
Hunter Bown 9e45780ba0 feat(web): community site for deepseek-tui.com (mobile + color refresh) (#1108)
First commit of the Next.js community site that powers
deepseek-tui.com, deployed via Cloudflare Workers / OpenNext.

This commit lands the scaffold and applies the visual + correctness
pass requested by community feedback:

- Palette: drop the cream/Anthropic-feel paper (#F4F1E8) for a
  DeepSeek-aligned cool white + soft gray (#FFFFFF / #F4F6FB), with
  indigo accents kept. Soften default hairlines so a pure-white
  background reads clean instead of harsh.
- Mobile: add a hamburger menu (mobile-menu.tsx) so phones can reach
  Install / Docs / Activity / Roadmap / Contribute — previously the
  link list was hidden on phones with no replacement. Tighter hero,
  flexible button row, viewport-safe code blocks, columnar grids
  collapse cleanly under 768px, and the printed-almanac center rule
  is desktop-only now (it sliced through narrow viewports).
- "How it works" diagram: replace the hand-rolled ASCII art (which
  misaligned under CJK monospace because Han characters take 2
  columns vs Latin's 1, per dhh's note in WeChat) with a real
  mermaid diagram rendered client-side via dynamic import. Uses the
  mermaid.live standard syntax 庄表伟 recommended.
- Issue #1104: the docs listed a `deepseek-cn` provider that the
  v0.8.16 binary doesn't accept (`ProviderArg` in crates/cli only
  has 9 variants; the 10th lives only in the legacy tui/config.rs).
  derive-facts.mjs now omits `deepseek-cn` until that variant is
  wired through the shared ProviderKind, and the install page's
  China-network recipe uses `base_url` / `DEEPSEEK_BASE_URL` (which
  actually works on v0.8.16) instead of the unsupported provider.

Auto-deploys via .github/workflows/deploy-web.yml on push to main.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-07 21:00:06 -05:00