Files
codewhale/web/lib/facts.generated.ts
T
Hunter Bown f8a3c6619e fix(npm): map openharmony platform to linux binaries (#1072)
Node's `os.platform()` returns `openharmony` on HarmonyPC and on
OpenHarmony's Linux ABI-compatible userspace. The npm wrapper's
platform-asset matrix only covered `linux` / `darwin` / `win32`,
so `npm i -g deepseek-tui` aborted on those hosts with

    Unsupported platform: openharmony. Supported platforms: …

even though the existing Linux x64 / arm64 binaries run unchanged
on that environment (OpenHarmony is Linux-ABI-compatible at the
ELF level).

Added a `PLATFORM_ALIASES = { openharmony: "linux" }` indirection
that resolves the raw platform name through the alias map before
the `ASSET_MATRIX` lookup. Genuinely unsupported platforms still
report the raw `os.platform()` value in the error so OS-mismatch
bug reports stay diagnostic.

Four pure-JS regression tests pin the behaviour:

- openharmony x64 → linux x64 binaries
- openharmony arm64 → linux arm64 binaries
- known platforms unchanged by the alias map
- freebsd still reports `Unsupported platform: freebsd`

Harvested from PR #1499 by @CrepuscularIRIS

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-12 01:39:44 -05:00

102 lines
2.1 KiB
TypeScript

// AUTO-GENERATED by web/scripts/derive-facts.mjs at prebuild.
// DO NOT EDIT — re-run `npm run prebuild` (or just `npm run build`) after changing the parent repo.
// To override at runtime, write the same shape to KV under key "facts:current".
export interface ProviderFact { id: string; label: string; env: string }
export interface RepoFacts {
generatedAt: string;
version: string | null;
crates: string[];
sandboxBackends: string[];
providers: ProviderFact[];
defaultModel: string | null;
nodeEngines: string | null;
toolCount: number | null;
license: string | null;
latestRelease: string | null;
}
export const FACTS: RepoFacts = {
<<<<<<< Updated upstream
"generatedAt": "2026-05-12T03:14:50.815Z",
"version": "0.8.30",
=======
"generatedAt": "2026-05-10T15:06:44.698Z",
"version": "0.8.27",
>>>>>>> Stashed changes
"crates": [
"agent",
"app-server",
"cli",
"config",
"core",
"execpolicy",
"hooks",
"mcp",
"protocol",
"secrets",
"state",
"tools",
"tui",
"tui-core"
],
"sandboxBackends": [
"landlock (Linux)",
"seatbelt (macOS)",
"AppContainer / restricted tokens (Windows)"
],
"providers": [
{
"id": "deepseek",
"label": "DeepSeek",
"env": "DEEPSEEK_API_KEY"
},
{
"id": "nvidia-nim",
"label": "NVIDIA NIM",
"env": "NVIDIA_API_KEY"
},
{
"id": "openai",
"label": "OpenAI",
"env": "OPENAI_API_KEY"
},
{
"id": "openrouter",
"label": "OpenRouter",
"env": "OPENROUTER_API_KEY"
},
{
"id": "novita",
"label": "Novita",
"env": "NOVITA_API_KEY"
},
{
"id": "fireworks",
"label": "Fireworks",
"env": "FIREWORKS_API_KEY"
},
{
"id": "sglang",
"label": "sglang",
"env": "SGLANG_API_KEY"
},
{
"id": "vllm",
"label": "vLLM",
"env": "VLLM_API_KEY"
},
{
"id": "ollama",
"label": "Ollama",
"env": "OLLAMA_API_KEY"
}
],
"defaultModel": "deepseek-v4-pro",
"nodeEngines": ">=18",
"toolCount": 62,
"license": "MIT",
"latestRelease": null
};