Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ manual step after deploy.

`/results` and `/zh-CN/results` show the Wright Agent Score. The page holds no
result data: the browser fetches `https://releases.wrightkit.dev/bench/latest.json`
(`wright-agent-results/v1`, published by `wrightkit/wright`), so new results need
(`wright-agent-results/v1`, published by `wrightkit/benchmark-suite`), so new results need
no redeploy. The fields the page reads are typed in `src/lib/bench.ts`; a missing
file shows the empty state and another schema version shows the older-format
state. The release bucket must allow cross-origin `GET` from `wrightkit.dev`.
Expand Down
2 changes: 1 addition & 1 deletion src/lib/bench.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* The hosted Wright Agent Score results (`wright-agent-results/v1`, published by
* wrightkit/wright). The page holds no result data; it fetches this document in
* wrightkit/benchmark-suite). The page holds no result data; it fetches this document in
* the browser and shows only the fields declared here.
*/

Expand Down
2 changes: 1 addition & 1 deletion src/lib/components/ToolingSection.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</script>

<Section id="tooling" title={t.tooling.title} lead={t.tooling.lead}>
<ul class="mt-10 grid gap-3 sm:mt-14 sm:grid-cols-2 sm:gap-4 lg:grid-cols-4">
<ul class="mt-10 grid gap-3 sm:mt-14 sm:grid-cols-2 sm:gap-4 lg:grid-cols-3">
{#each tooling as item, i (item.id)}
<li class="surface flex flex-col p-5 sm:p-6" data-reveal style="--reveal-delay: {i * 70}ms" use:reveal>
<h3 class="text-[1.0625rem] font-semibold tracking-[-0.012em] text-ink-50">{t.tooling.items[item.id].title}</h3>
Expand Down
26 changes: 17 additions & 9 deletions src/lib/content/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,15 +86,23 @@ const en: Messages = {
items: {
analyze: {
title: 'Analyze',
body: 'Your most complex rules and the variables most rules share.'
body: 'Element cost, your most complex rules, server-load risks, and the variables most rules share. Each result says whether it is exact, static, or a heuristic.'
},
inspect: {
title: 'Inspect',
body: 'Every rule, variable, and reference in a project.'
body: 'Query rules, symbols, references, control flow, and call graphs. inspect cost breaks down each rule’s element cost and compares it with your last run.'
},
edit: {
title: 'Checked edits',
body: 'Rename a variable or subroutine, or apply lint fixes with lint --fix. Wright shows the validated diff first and writes only with --write.'
},
lookup: {
title: 'Lookup',
body: 'Turn a near spelling into the exact name and signature of an action or value, in Workshop or OverPy.'
},
lsp: {
title: 'Editor',
body: 'Errors as you type, plus go to definition, completion, and rename, in editors that support language servers. No VS Code extension yet.'
body: 'Errors as you type in editors that support language servers. Workshop files get hover, go to definition, and find references; OverPy files get navigation and rename. No VS Code extension yet.'
},
ci: {
title: 'CI',
Expand All @@ -113,12 +121,12 @@ const en: Messages = {
overpy: {
name: 'OverPy',
status: 'Partial',
body: 'Keep your .opy files. Wright checks them and compiles them to Workshop, with output held to the original OverPy compiler.'
body: 'Keep your .opy files. Wright checks, lints, analyzes, and renames them, and compiles them to Workshop with output held to the original OverPy compiler.'
},
ostw: {
name: 'OSTW',
status: 'In development',
body: 'deltin-rs is in progress. Wright support follows.'
status: 'Paused',
body: 'deltin-rs parses and type-checks OSTW, but feature work is paused. Wright does not support it yet.'
}
}
},
Expand All @@ -134,12 +142,12 @@ const en: Messages = {
body: 'Diagnostic codes, rule IDs, and exit codes an agent can rely on.'
},
{
title: 'Agent Skill',
body: 'Teach your agent Wright with the skill in wrightkit/skills.'
title: 'Agent guide and MCP',
body: 'wright agent install adds the Wright guide to your project. Add --mcp claude, cursor, or vscode to register the MCP server too.'
}
],
upcomingLabel: 'Coming soon',
upcoming: ['Request to change', 'Checked edits', 'Project queries', 'Cost estimates']
upcoming: ['From request to change']
},
install: {
title: 'Get Wright.',
Expand Down
2 changes: 1 addition & 1 deletion src/lib/content/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export interface Messages {
/** What ships today. */
capabilities: Tuple<Block, 3>;
upcomingLabel: string;
upcoming: Tuple<string, 4>;
upcoming: Tuple<string, 1>;
};
install: SectionCopy & {
platformLabel: string;
Expand Down
26 changes: 17 additions & 9 deletions src/lib/content/zh-CN.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,15 +93,23 @@ const zhCN: Messages = {
items: {
analyze: {
title: '分析',
body: '找出最复杂的规则,以及被最多规则共用的变量。'
body: '元素开销、最复杂的规则、服务器负载隐患,以及被最多规则共用的变量。每条结果都标明是精确值、静态推断还是经验估计。'
},
inspect: {
title: '结构',
body: '项目里所有规则、变量和引用。'
body: '查询规则、符号、引用、控制流和调用关系。inspect cost 列出每条规则的元素开销,并和上一次运行对比。'
},
edit: {
title: '修改先校验',
body: '重命名变量或子程序,或用 lint --fix 应用修复。Wright 先给出校验过的 diff,加 --write 才写入。'
},
lookup: {
title: '查名字',
body: '从相近的拼写查到动作或值的准确名称和签名,地图工坊和 OverPy 都能查。'
},
lsp: {
title: '编辑器',
body: '在支持语言服务器的编辑器里边写边报错,还能跳转、补全和重命名。VS Code 扩展暂时还没有。'
body: '在支持语言服务器的编辑器里边写边报错。地图工坊文件支持悬停提示、跳转到定义和查找引用;OverPy 文件支持跳转和重命名。VS Code 扩展暂时还没有。'
},
ci: {
title: 'CI',
Expand All @@ -120,12 +128,12 @@ const zhCN: Messages = {
overpy: {
name: 'OverPy',
status: '部分支持',
body: '照常写 .opy。Wright 负责检查,并编译成地图工坊代码,结果以原版 OverPy 编译器为准。'
body: '照常写 .opy。Wright 负责检查、lint、分析和重命名,并编译成地图工坊代码,结果以原版 OverPy 编译器为准。'
},
ostw: {
name: 'OSTW',
status: '开发中',
body: 'deltin-rs 开发中,之后接入 Wright。'
status: '已暂停',
body: 'deltin-rs 能解析和类型检查 OSTW,但功能开发已暂停,Wright 暂不支持。'
}
}
},
Expand All @@ -141,12 +149,12 @@ const zhCN: Messages = {
body: '诊断编号、规则 ID 和退出码固定不变,助手可以放心判断。'
},
{
title: 'Agent Skill',
body: '装上 wrightkit/skills 里的 wright skill,助手就会用 Wright。'
title: 'Agent 指南与 MCP',
body: 'wright agent install 把 Wright 指南装进项目;加上 --mcp claude、cursor 或 vscode,同时注册 MCP 服务器。'
}
],
upcomingLabel: '即将推出',
upcoming: ['从需求到改动', '修改先校验', '项目查询', '开销评估']
upcoming: ['从需求到改动']
},
install: {
title: '获取 Wright。',
Expand Down
31 changes: 18 additions & 13 deletions src/lib/site.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,19 +35,22 @@ export const pageSections = ['start', 'features', 'tooling', 'languages', 'agent
export type TerminalLineKind = 'prompt' | 'error' | 'warning' | 'info' | 'dim' | 'blank';

/**
* `wright lint rules.txt` from wright 0.2.40 on a copied Workshop rule. Evidence
* labels and source excerpts are trimmed; keep in sync with the real CLI.
* `wright lint rules.txt` from wright 0.25.2 on two copied Workshop rules, in the
* terminal renderer. Source excerpts, evidence labels, and the hint line are
* trimmed; keep in sync with the real CLI.
*/
export const terminalLines = [
{ kind: 'prompt', text: 'wright lint rules.txt' },
{ kind: 'dim', text: 'WARN lint' },
{ kind: 'dim', text: ' 2 finding(s) across 6 rule(s)' },
{ kind: 'blank', text: '' },
{ kind: 'warning', text: 'warning[min-wait-loop]: loop body waits at the workshop minimum rate; the loop runs at maximum frequency' },
{ kind: 'dim', text: ' --> rules.txt:18:3' },
{ kind: 'blank', text: '' },
{ kind: 'info', text: 'info[expensive-loop-check]: geometry predicate evaluated inside a loop body may be expensive per iteration' },
{ kind: 'dim', text: ' --> rules.txt:20:4' }
{ kind: 'dim', text: '╭─ WARN lint' },
{ kind: 'dim', text: '│ 1 warning(s), 1 info finding(s)' },
{ kind: 'dim', text: '│' },
{ kind: 'warning', text: '├─ warning[min-wait-loop]: loop body waits at the workshop minimum rate; the loop runs at maximum frequency' },
{ kind: 'dim', text: '│ --> rules.txt:27:3' },
{ kind: 'dim', text: '│' },
{ kind: 'info', text: '├─ info[expensive-loop-check]: geometry predicate evaluated inside a loop body may be expensive per iteration' },
{ kind: 'dim', text: '│ --> rules.txt:29:7' },
{ kind: 'dim', text: '│' },
{ kind: 'dim', text: '╰─ 1 file(s) affected' }
] as const satisfies readonly { kind: TerminalLineKind; text: string }[];

/** The getting-started steps; only the last one runs a command. */
Expand All @@ -59,7 +62,7 @@ export const startSteps = [
export type StartStepId = (typeof startSteps)[number]['id'];

/**
* Real findings from wright 0.2.40. Each snippet is the actions block of an
* Real findings from wright 0.25.2. Each snippet is the actions block of an
* `Ongoing - Each Player` rule, written the way the matching game client
* copies it; the finding is the first line wright prints (evidence label
* trimmed). Re-run both locales through `wright lint` when editing.
Expand All @@ -69,8 +72,8 @@ export const examples = [
id: 'typo',
kind: 'error',
finding: {
en: "error[unknown-action]: unknown action spelling 'Heall'",
'zh-CN': "error[unknown-action]: unknown action spelling '治愈'"
en: "error[unknown-action]: unknown action spelling 'Heall' for locale 'en-us' (did you mean 'Heal'?)",
'zh-CN': "error[unknown-action]: unknown action spelling '治愈' for locale 'zh-cn' (did you mean '治疗'?)"
},
code: {
en: 'Heall(Event Player, Null, 10);',
Expand Down Expand Up @@ -124,6 +127,8 @@ export type ExampleId = (typeof examples)[number]['id'];
export const tooling = [
{ id: 'analyze', command: 'wright analyze' },
{ id: 'inspect', command: 'wright inspect' },
{ id: 'edit', command: 'wright rename' },
{ id: 'lookup', command: 'wright lookup' },
{ id: 'lsp', command: 'wright-lsp' },
{ id: 'ci', command: 'wright lint' }
] as const;
Expand Down
Loading