| 1 | /** |
| 2 | * product.ts — the copy for /product, the "what is this and what do I get" |
| 3 | * page behind the primary nav's first link. |
| 4 | * |
| 5 | * TRUTH CONTRACT: availability is stated per surface as it is today. The |
| 6 | * terminal, browser, hosted web, and desktop rows mirror the homepage's |
| 7 | * availability chapter and docs/public-surface-facts.json; the GUI row states |
| 8 | * the community graphical frontend — a separate project from this repository's |
| 9 | * own VS Code extension — exactly as README.md links it. |
| 10 | * Nothing here claims cloud execution; the hosted web app is not open; |
| 11 | * the desktop state follows data/desktop-published-release.json. |
| 12 | * Counts (providers, tools, sandbox backends) come from the facts layer at |
| 13 | * render time, never typed here. |
| 14 | */ |
| 15 | |
| 16 | import { AVAILABILITY_ROWS } from "./availability"; |
| 17 | import type { CapabilityClaim } from "../capabilities"; |
| 18 | import { FACTS } from "../facts.generated"; |
| 19 | import type { LocalizedText } from "./vocabulary"; |
| 20 | |
| 21 | const PUBLISHED_TAG = FACTS.latestPublishedRelease?.tag ?? "main"; |
| 22 | |
| 23 | export interface ProductRow { |
| 24 | title: LocalizedText; |
| 25 | body: LocalizedText; |
| 26 | capability?: CapabilityClaim; |
| 27 | } |
| 28 | |
| 29 | export type { ProductAvailabilityRow } from "./availability"; |
| 30 | |
| 31 | export const PRODUCT_COPY = { |
| 32 | metadata: { |
| 33 | title: { en: "Build and automate · Codewhale", zh: "构建与自动化 · Codewhale" }, |
| 34 | description: { |
| 35 | en: "Build apps, automate workflows and work across connected tools with an open-source agent. Bring your existing model APIs or local and self-hosted inference.", |
| 36 | zh: "用开源智能体构建应用、自动处理工作,并连接你常用的工具。使用你已有的模型 API、本地模型或自托管推理服务。", |
| 37 | }, |
| 38 | }, |
| 39 | title: { |
| 40 | en: "Build apps and automate workflows", |
| 41 | zh: "构建应用,自动化工作流", |
| 42 | }, |
| 43 | lede: { |
| 44 | en: "Codewhale works in your terminal and local browser, using the models you choose.", |
| 45 | zh: "Codewhale 在终端和本地浏览器中工作,使用你选择的模型。", |
| 46 | }, |
| 47 | |
| 48 | workHeading: { en: "Keep larger tasks moving", zh: "推进更大的任务" }, |
| 49 | workPatterns: [ |
| 50 | { |
| 51 | title: { en: "Work", zh: "Work" }, |
| 52 | body: { |
| 53 | en: "Plan, delegate and verify a larger task in Work.", |
| 54 | zh: "在 Work 中计划、委派并验证较大的任务。", |
| 55 | }, |
| 56 | href: "/docs/modes", |
| 57 | command: "/mode work", |
| 58 | capability: { feature: "modes" }, |
| 59 | }, |
| 60 | { |
| 61 | title: { en: "Fleet", zh: "Fleet" }, |
| 62 | body: { |
| 63 | en: "Give agents different roles and models, then reuse those profiles across tasks.", |
| 64 | zh: "为智能体分配不同角色和模型,再在后续任务中复用这些配置。", |
| 65 | }, |
| 66 | href: "/docs/fleet", |
| 67 | command: "/fleet setup", |
| 68 | capability: { feature: "fleet" }, |
| 69 | }, |
| 70 | { |
| 71 | title: { en: "Workflows", zh: "Workflows" }, |
| 72 | body: { |
| 73 | en: "Save steps, parallel work and review gates as a process you can run again.", |
| 74 | zh: "把步骤、并行工作与审阅关卡保存为可重复运行的流程。", |
| 75 | }, |
| 76 | href: `https://github.com/codewhale-hq/Codewhale/blob/${PUBLISHED_TAG}/docs/AUTOMATIC_WORKFLOWS.md`, |
| 77 | command: "codewhale workflow run <workflow>", |
| 78 | capability: { feature: "workflows" }, |
| 79 | }, |
| 80 | { |
| 81 | title: { en: "Skills and plugins", zh: "技能与插件" }, |
| 82 | body: { |
| 83 | en: "Save a checklist or report format in a Markdown skill, then share it inside a plugin.", |
| 84 | zh: "用 Markdown 技能保存清单或报告格式,再放进插件中分享。", |
| 85 | }, |
| 86 | href: "/docs/skills", |
| 87 | command: "SKILL.md", |
| 88 | capability: { feature: "skills" }, |
| 89 | }, |
| 90 | { |
| 91 | title: { en: "Receipts and undo", zh: "回执与撤销" }, |
| 92 | body: { |
| 93 | en: "Preview the next primary request, review recorded actions and restore available file snapshots.", |
| 94 | zh: "预览下一次主要请求、查看已记录的操作,并恢复可用的文件快照。", |
| 95 | }, |
| 96 | href: "/docs/review", |
| 97 | command: "/receipts", |
| 98 | capability: { feature: "receipts" }, |
| 99 | }, |
| 100 | ], |
| 101 | |
| 102 | availabilityHeading: { en: "Where it runs", zh: "运行平台" }, |
| 103 | availability: AVAILABILITY_ROWS.filter((row) => row.pages.includes("product")), |
| 104 | |
| 105 | controlHeading: { en: "Set permissions", zh: "设置权限" }, |
| 106 | modes: [ |
| 107 | { title: { en: "Plan", zh: "Plan" }, capability: { feature: "modes" }, body: { en: "Blocks file mutation and shell execution. Permitted research may contact external services; session state can still be saved.", zh: "禁止文件修改与 shell 执行。获准的研究可访问外部服务;会话状态仍可保存。" } }, |
| 108 | { title: { en: "Work", zh: "Work" }, capability: { feature: "modes" }, body: { en: "Edits files and runs commands within the permission you set.", zh: "在你设定的权限内修改文件、运行命令。" } }, |
| 109 | ] satisfies ProductRow[], |
| 110 | permissions: [ |
| 111 | { title: { en: "Ask", zh: "Ask" }, capability: { feature: "permission-postures" }, body: { en: "Prompts according to the active approval rules; saved permissions and hard policy boundaries still apply.", zh: "按当前审批规则询问;已保存的权限与强制策略边界仍然生效。" } }, |
| 112 | { title: { en: "Accept Edits", zh: "Accept Edits" }, capability: { feature: "permission-postures", describesCurrentRow: true }, body: { en: "Allows ordinary edits inside a git workspace and asks before commands or sensitive-file edits. New source-candidate installs use this posture; an explicit saved choice stays in control.", zh: "允许 Git 工作区内的普通文件编辑,并在运行命令或修改敏感文件前询问。新安装的源码候选版本使用此设置;明确保存的选择始终优先。" } }, |
| 113 | { title: { en: "Auto-Review", zh: "Auto-Review" }, capability: { feature: "permission-postures" }, body: { en: "Automatically reviews eligible actions and reports any action it cannot approve.", zh: "自动审核符合条件的操作,并报告无法批准的操作。" } }, |
| 114 | { title: { en: "Full Access", zh: "Full Access" }, capability: { feature: "permission-postures" }, body: { en: "Allows commands to reach anything on this computer. Managed policy and repository law still apply.", zh: "允许命令访问这台计算机上的任何内容。托管策略与仓库规则仍然适用。" } }, |
| 115 | ] satisfies ProductRow[], |
| 116 | |
| 117 | actions: { |
| 118 | install: { en: "Install Codewhale", zh: "安装 Codewhale" }, |
| 119 | models: { en: "See every provider", zh: "查看所有提供商" }, |
| 120 | docs: { en: "Read the docs", zh: "阅读文档" }, |
| 121 | }, |
| 122 | } as const; |
| 123 |