Skip to content

feat(core): server deployment on the Core page, the home page and the Core docs - #18

Merged
fylorn merged 2 commits into
mainfrom
seo2/core-home-docs
Sep 25, 2026
Merged

fylorn merged 2 commits into
mainfrom
seo2/core-home-docs

Conversation

@fylorn

@fylorn fylorn commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

The Core page, the home page and the Core docs still described Core as crates plus cargo run, listed crates that no longer exist (tw-protocol, tw-provider, tw-resil, tw-crypto, tw-redact, tw-scan, tw-adopt), priced against a "snapshot table", and called ThinkWatch Enterprise "the server edition". Since v0.47.0, twcore ships prebuilt for five targets and runs on its own as a systemd service on a Linux server, managed from ThinkWatch Lite over the remote control port. This brings those pages up to date and publishes Core's own configuration reference and server guide on the site.

Core page (/core)

  • Headline and meta in the approved register: An AI API gateway engine for desktops and servers. ThinkWatch Enterprise is named, with the three crates it uses.
  • Capabilities (six): routing with format conversion, failover before the first byte (the gateway switches upstream only until the first byte reaches the client; tw-gateway server/pipeline/hop.rs) with the circuit breaker, cost accounting against the public price table refreshed daily (unknown when a request cannot be priced), outbound redaction, tool-call inspection within the five guards (off / observe / enforce), and the encrypted control plane (local socket or Windows loopback port, optional remote port, Noise NNpsk0, no certificates).
  • New Install and deploy section (#install): the Linux one-line install with a copy button; the server has to run the core version the desktop app requires, which the app shows when the versions differ, so the pinned form reads … | sudo sh -s -- --version <version> rather than naming a version the app may not pin; the follow-up commands (twcore remote enable, systemctl enable --now, twcore control-key, and later sudo twcore upgrade --version <version> --restart, which moves up or down), prebuilt binaries of the latest release for every platform with checksums and the Linux archives, and cargo build.
  • Crate layers from the 16 crates on Core main, grouped by role; dependencies only point up, and the group ThinkWatch Enterprise depends on (tw-dialect, tw-guard, tw-breaker) is marked.
  • twcore JSON-LD: installUrl, and meta.twcoreDescription is now required (a missing one throws during the build).

Home page

Docs home

  • ThinkWatch Enterprise for organizations; ThinkWatch Lite runs the gateway locally or connects to ThinkWatch Core on a server; ThinkWatch Core is the gateway engine and crates Lite is built on, three of which ThinkWatch Enterprise uses (not all of Core).

Core docs

  • Overview, Quick start, Crate layers, Development and tests rewritten against current Core (install options, pointing Claude Code and OpenAI-format clients at the gateway instead of "not yet documented", daily price-table refresh, PRs to main, the control-plane rule, releases).
  • New: Configuration reference (/docs/core/configuration) and Server deployment (/docs/core/server-deployment), published from docs/config*.md and docs/server*.md in ThinkWatch-Core, so the text exists once.

How the Core documents get here

  • src/lib/core-docs.mjs + a content collection (src/lib/core-docs-loader.ts): at build time, the four files are fetched from the latest Core release tag (raw.githubusercontent.com, the site's generic User-Agent), rendered with the site's markdown settings, the language-switch line is dropped, and links are pointed at this site (another published document) or at GitHub at the same tag. CORE_DOCS_REF previews another ref.
  • src/data/core-docs/ is a committed, byte-identical copy (with a manifest of hashes) used when GitHub cannot be reached. The build warns — and annotates the PR in Actions — when that copy differs from the latest release; pnpm core-docs refreshes it. Pages are dated by the git history of the copy; "Edit on GitHub" points at Core.
  • The scheduled deploy (every 3 hours) therefore picks up doc changes from each new Core release on its own.

Also: markdown tables now scroll sideways inside a wrapper on narrow screens instead of being clipped by the page (all docs; desktop layout unchanged).

Before merging

  • The committed copy of the Core documents is from v0.48.0, the latest Core release, which has ThinkWatch-Core#191: the desktop app keeps the control key in a private file in its data directory, and the guide speaks of macOS, Windows and Linux rather than only the Mac. The words "keychain" / "钥匙串" appear on the site only in that sentence, which says the key is not in the system keychain; the build no longer warns that the copy differs.
  • Merge order: feat(seo): social preview images for the GitHub repositories #17, then this, then Lite page and docs: the current app, remote core, and the licensing contact #19. Lite page and docs: the current app, remote core, and the licensing contact #19 links to /docs/core/server-deployment, which this pull request adds.
  • The Lite page and Lite docs are being edited in a parallel PR. Shared files touched here: src/content/docs/_meta.ts (Core entries only), src/lib/structured-data.ts (processors spelling, twcore entry), src/lib/lastmod.ts, src/layouts/DocsLayout.astro (optional editUrl), src/pages/docs/_DocArticle.astro, src/pages/docs/_lib.ts, astro.config.mjs, src/styles/global.css.

Verification

  • pnpm build (pnpm 10): 49 pages; the loader logs Core documents from v0.48.0 and no stale-copy warning. The fallback path (GitHub rate-limited, bad ref) and the stale warning were exercised earlier.
  • Built together with feat(seo): social preview images for the GitHub repositories #17 and Lite page and docs: the current app, remote core, and the licensing contact #19 on main: 51 pages, 5,132 internal links and anchors, 0 broken; 155 JSON-LD blocks, 0 problems; no "mid-stream failover", "流式故障转移", "server edition" or "Apple Silicon" left.
  • Internal links in dist/ of this branch alone: 4,892 checked including #anchors, 0 broken. 128 external ThinkWatchProject links (release downloads, blob links, the install script) all return 200.
  • JSON-LD: 149 blocks parse; /core carries SoftwareSourceCode + SoftwareApplication (twcore 0.47.0, five binaries, installUrl). The only stale wording left on this branch alone is "Apple Silicon" in the Lite description, which comes from lite.ts (Lite page and docs: the current app, remote core, and the licensing contact #19).
  • 375 px, 1024 px, 1280 px, 1440 px: no horizontal overflow on /core, /zh-CN/core, the home page or the Core docs; the configuration reference's 35 tables scroll on a phone.
  • tsc --noEmit passes.

🤖 Generated with Claude Code

fylorn and others added 2 commits September 25, 2026 12:02
… Core docs

Core page (/core)
- Headline and description in the approved register: an AI API gateway
  engine for desktops and servers, MIT-licensed crates and the twcore
  binary, which runs inside ThinkWatch Lite or as a systemd service on a
  Linux server. No "server edition": ThinkWatch Enterprise, which uses
  tw-dialect, tw-guard and tw-breaker.
- Capabilities: routing with format conversion, mid-stream failover and the
  circuit breaker, cost accounting against the public price table that is
  refreshed daily (unknown when a request cannot be priced), outbound
  redaction, tool-call inspection within the five guards, and the encrypted
  control plane (local socket or Windows loopback port, optional remote
  port, Noise handshake).
- New "Install and deploy" section (#install): the Linux one-line install
  with a copy button and a pinned-version variant, the follow-up commands
  (remote enable, systemctl, control-key, twcore upgrade), the prebuilt
  binaries of the latest release for each platform with their checksums and
  the Linux archives, and cargo build.
- Crate layers from the 16 crates on main, grouped by role; no crate depends
  on a group below its own, and the group ThinkWatch Enterprise depends on
  is marked.
- The hero shows the installed twcore (init, check, serve), not cargo run.
- The twcore JSON-LD gains installUrl, and its description is required: a
  missing meta.twcoreDescription fails the build.

Home page
- Meta and body say ThinkWatch Enterprise. Core is what both products share
  and also runs on a Linux server; its strip shows the install command with
  a copy button and a link to the server guide instead of cargo run.
- Compare table: Core is released with prebuilt binaries. Lite band: pricing
  without the retired subscription split, the five guards and the scan of
  client configurations, the remote core. "Apple silicon" throughout.

Core docs
- Overview, quick start, crate layers, and development and tests rewritten
  against the current Core: prebuilt binaries and the install script,
  pointing a client at the gateway (Claude Code, OpenAI-format clients,
  links to the Lite docs and the configuration reference), the daily price
  table refresh, pull requests to main, the control-plane rule, releases.
- New pages: Configuration reference (/docs/core/configuration) and Server
  deployment (/docs/core/server-deployment), published from docs/config*.md
  and docs/server*.md in ThinkWatch-Core rather than copied.

Publishing the Core documents
- src/lib/core-docs.mjs and a content collection (src/lib/core-docs-loader.ts)
  fetch the four files from the latest Core release at build time over
  raw.githubusercontent.com with the site's generic User-Agent, render them
  with the site's markdown settings, drop the language-switch line, and
  point links at this site (another published document) or at GitHub at
  the same tag. CORE_DOCS_REF previews another ref.
- src/data/core-docs is a committed copy, used when GitHub cannot be
  reached; the build warns (and annotates the pull request in Actions) when
  it differs from the latest release, and `pnpm core-docs` refreshes it.
  Pages are dated by the git history of that copy, and "Edit on GitHub"
  points at the Core repository.

Also: markdown tables scroll sideways inside a wrapper instead of being cut
off on narrow screens (every doc).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…equires, Core docs from v0.48.0

- Name the capability "failover before the first byte" on the Core page, in
  its meta description (and so its structured data) and in the Core docs
  overview: the gateway switches upstream only until the first byte reaches
  the client, never in the middle of a stream.
- The pinned install example no longer claims to be the version ThinkWatch
  Lite expects. The server has to run the core version the app requires,
  which the app shows when the versions differ; the page installs it with
  --version <version> and moves to it later, newer or older, with
  sudo twcore upgrade --version <version> --restart.
- Refresh the committed copy of the Core documents to v0.48.0: the desktop
  app keeps the connection key in a private file, not in the keychain, and
  the guide speaks of macOS, Windows and Linux rather than only the Mac.
- Home: the alt text of the Lite band describes the 7-day Overview
  screenshot it shows once the Lite page's screenshots are updated.
- Docs home: ThinkWatch Enterprise for organizations; ThinkWatch Lite runs
  the gateway locally or connects to ThinkWatch Core on a server; ThinkWatch
  Enterprise uses three of Core's crates, not all of them.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@fylorn
fylorn merged commit a0abf43 into main Sep 25, 2026
1 check passed
@fylorn
fylorn deleted the seo2/core-home-docs branch September 25, 2026 11:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant