Skip to content

Commit 619ddee

Browse files
Merge remote-tracking branch 'origin/main' into worktree-claude-auth-respawn
# Conflicts: # apps/server/src/provider/Layers/ClaudeAdapter.ts
2 parents 5222edf + d924fe2 commit 619ddee

1,306 files changed

Lines changed: 102790 additions & 27169 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.gitattributes‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
# git autocrlf=true converts LF to CRLF on Windows, causing issues with oxfmt
22
* text=auto eol=lf
3+
# Batch files need CRLF for cmd.exe to parse them reliably.
4+
*.cmd text eol=crlf
5+
*.bat text eol=crlf

‎.github/VOUCHED.td‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,28 @@
1212
github:0x4bs3nt
1313
github:Adamulek123
1414
github:adityavardhansharma
15+
github:aoright
1516
github:arhxam
1617
github:bil0000
1718
github:binbandit
1819
github:Brechard
20+
github:btsouth
1921
github:chrisdeeming
2022
github:chuks-qua
2123
github:cursoragent
2224
github:D3OXY
25+
github:dbalders
2326
github:eggfriedrice24
2427
github:extoci
28+
github:flamboh
29+
github:FllipEis
2530
github:gbarros-dev
2631
github:gfsaaser24
2732
github:github-actions[bot]
2833
github:gsimone
2934
github:GuilhermeVieiraDev
3035
github:hwanseoc
36+
github:inayayousfi
3137
github:ipanasenko
3238
github:jakeleventhal
3339
github:jamesx0416
@@ -36,13 +42,18 @@ github:jasonLaster
3642
github:JoeEverest
3743
github:justsomelegs
3844
github:kridaydave
45+
github:lgwacker
3946
github:lnieuwenhuis
4047
github:Lucenx9
4148
github:mackinleysmith
4249
github:maria-rcks
50+
github:MatthewFeroz
4351
github:maxwellyoung
4452
github:mwolson
53+
github:myacoub91
54+
github:naMqe-h
4555
github:nateEc
56+
github:naveed949
4657
github:nmggithub
4758
github:Noojuno
4859
github:notkainoa
@@ -64,6 +75,7 @@ github:tarik02
6475
github:tris203
6576
github:tsouth89
6677
github:UtkarshUsername
78+
github:vitalyiegorov
6779
github:Yash-Singh1
6880
github:yashranaway
6981
github:Ymit24
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Setup APT mirrors
2+
description: Configure Ubuntu package downloads with automatic mirror failover.
3+
runs:
4+
using: composite
5+
steps:
6+
- shell: bash
7+
run: |
8+
# Replace the existing Blacksmith mirror list as well as direct sources.
9+
printf '%s\tpriority:%s\n' \
10+
https://archive.ubuntu.com/ubuntu 1 \
11+
https://mirrors.edge.kernel.org/ubuntu 2 \
12+
https://mirror.math.princeton.edu/pub/ubuntu 3 \
13+
| sudo tee /etc/apt/blacksmith-ubuntu-mirrors.txt > /dev/null
14+
15+
# APT's mirror transport retries each file against the next server.
16+
sudo find /etc/apt -maxdepth 2 -type f \( -name '*.list' -o -name '*.sources' \) \
17+
-exec sed -i -E \
18+
's#https?://(([^/]+\.)?archive|security)\.ubuntu\.com/ubuntu/?#mirror+file:/etc/apt/blacksmith-ubuntu-mirrors.txt#g' {} +
19+
20+
# Move on to a fallback before an unreachable server exhausts the job.
21+
printf '%s\n' 'Acquire::http::Timeout "15";' 'Acquire::https::Timeout "15";' \
22+
| sudo tee /etc/apt/apt.conf.d/80-mirror-timeouts > /dev/null

‎.github/workflows/ci.yml‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,23 @@ jobs:
4545
- name: Ensure Electron runtime is installed
4646
run: vp run --filter @t3tools/desktop ensure:electron
4747

48+
# Files/dependencies are repo-wide; export checks cover clean workspaces only.
49+
- name: Check unused code
50+
run: vp run knip:check
51+
4852
- name: Check
4953
run: vp check
5054

5155
- name: Typecheck
5256
run: vpr typecheck
5357

58+
- uses: ./.github/actions/setup-apt-mirrors
59+
60+
- name: Install browser secret helper build libraries
61+
run: |
62+
sudo sed -i 's|http://|https://|g' /etc/apt/blacksmith-ubuntu-mirrors.txt /etc/apt/sources.list.d/ubuntu.sources
63+
sudo apt-get update && sudo apt-get install -y libsecret-1-dev pkg-config
64+
5465
- name: Build desktop pipeline
5566
run: vp run build:desktop
5667

@@ -85,6 +96,13 @@ jobs:
8596
- name: Ensure Electron runtime is installed
8697
run: vp run --filter @t3tools/desktop ensure:electron
8798

99+
- uses: ./.github/actions/setup-apt-mirrors
100+
101+
- name: Install browser secret helper build libraries
102+
run: |
103+
sudo sed -i 's|http://|https://|g' /etc/apt/blacksmith-ubuntu-mirrors.txt /etc/apt/sources.list.d/ubuntu.sources
104+
sudo apt-get update && sudo apt-get install -y libsecret-1-dev pkg-config
105+
88106
- name: Test
89107
run: vp run --parallel --concurrency-limit 4 --filter '!t3' --filter '!@t3tools/monorepo' test
90108

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Forward to Cursor hygiene
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
types: [opened, reopened, ready_for_review]
8+
issues:
9+
types: [opened, closed, reopened]
10+
discussion:
11+
types: [created, closed, reopened]
12+
13+
permissions:
14+
contents: read
15+
16+
jobs:
17+
forward:
18+
name: POST to Cursor
19+
runs-on: ubuntu-24.04
20+
steps:
21+
- name: POST to Cursor
22+
env:
23+
URL: ${{ secrets.CURSOR_T3CODE_WEBHOOK_URL }}
24+
AUTH: ${{ secrets.CURSOR_T3CODE_WEBHOOK_AUTH }}
25+
run: |
26+
set -euo pipefail
27+
if [ -z "${URL:-}" ] || [ -z "${AUTH:-}" ]; then
28+
echo "Missing CURSOR_T3CODE_WEBHOOK_URL or CURSOR_T3CODE_WEBHOOK_AUTH — skipping."
29+
exit 0
30+
fi
31+
curl -fsS --max-time 60 -X POST "$URL" \
32+
-H "Authorization: $AUTH" \
33+
-H "Content-Type: application/json" \
34+
-H "X-GitHub-Event: ${{ github.event_name }}" \
35+
-H "X-GitHub-Delivery: ${{ github.run_id }}-${{ github.run_attempt }}" \
36+
--data-binary @"${{ github.event_path }}"

‎.github/workflows/release.yml‎

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,11 @@ jobs:
216216
- name: Typecheck
217217
run: vp run typecheck
218218

219+
- uses: ./.github/actions/setup-apt-mirrors
220+
221+
- name: Install browser secret helper build libraries
222+
run: sudo apt-get update && sudo apt-get install -y libsecret-1-dev pkg-config
223+
219224
- name: Test
220225
run: vp run test
221226

@@ -516,20 +521,24 @@ jobs:
516521
$setupExe = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\setup.exe"
517522
$proc = Start-Process -FilePath $setupExe `
518523
-ArgumentList "modify", "--installPath", "`"$installPath`"", "--add", `
519-
"Microsoft.VisualStudio.Component.VC.Tools.x86.x64.Spectre", "--quiet", "--norestart" `
524+
"Microsoft.VisualStudio.Component.VC.Runtimes.x86.x64.Spectre", "--quiet", "--norestart" `
520525
-Wait -PassThru -NoNewWindow
521526
if ($null -eq $proc -or $proc.ExitCode -ne 0) {
522527
$code = if ($null -ne $proc) { $proc.ExitCode } else { 1 }
523528
Write-Error "Visual Studio Installer failed with exit code $code"
524529
exit $code
525530
}
526531
527-
- name: Install ImageMagick
532+
- uses: ./.github/actions/setup-apt-mirrors
533+
if: matrix.platform == 'linux'
534+
535+
- name: Install Linux desktop build libraries
528536
if: matrix.platform == 'linux'
529537
shell: bash
530538
run: |
539+
sudo apt-get update
540+
sudo apt-get install -y libsecret-1-dev pkg-config
531541
if ! command -v magick >/dev/null 2>&1 && ! command -v convert >/dev/null 2>&1; then
532-
sudo apt-get update
533542
sudo apt-get install -y imagemagick
534543
fi
535544
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
# On-demand Windows test lane. Manual only: nothing in the suite passes on
2+
# Windows yet, so this exists to give contributors (and agents) a cloud Windows
3+
# box to iterate against. Once the suite is green here, fold it into ci.yml.
4+
#
5+
# gh workflow run windows-tests.yml --ref <branch> -f package=packages/shared
6+
# gh workflow run windows-tests.yml --ref <branch> -f package=apps/server \
7+
# -f files="src/process/externalLauncher.test.ts src/cli/theme.test.ts"
8+
# gh run watch && gh run view --log-failed
9+
name: Windows Tests
10+
11+
on:
12+
workflow_dispatch:
13+
inputs:
14+
package:
15+
description: "Workspace directory to test, e.g. apps/server or packages/shared. Empty runs every package except apps/server."
16+
type: string
17+
default: ""
18+
files:
19+
description: "Space-separated test files relative to the package directory. Empty runs the package's whole suite. Requires package."
20+
type: string
21+
default: ""
22+
23+
permissions:
24+
contents: read
25+
26+
jobs:
27+
test:
28+
name: Test (${{ inputs.package || 'all non-server' }})
29+
runs-on: blacksmith-8vcpu-windows-2025
30+
timeout-minutes: 45
31+
steps:
32+
- name: Checkout
33+
uses: actions/checkout@v6
34+
with:
35+
sparse-checkout: |
36+
/*
37+
!/.repos/
38+
sparse-checkout-cone-mode: false
39+
40+
# setup-vp's own cache restores a Linux-shaped store on Windows, which is
41+
# slower than no cache (see #7975). Cache pnpm's Windows store directly.
42+
- name: Setup Vite+
43+
uses: voidzero-dev/setup-vp@v1
44+
with:
45+
node-version-file: package.json
46+
cache: false
47+
run-install: false
48+
49+
- name: Resolve package cache path
50+
id: package_cache_path
51+
shell: pwsh
52+
run: '"path=$(vp pm cache dir)" >> $env:GITHUB_OUTPUT'
53+
54+
- name: Cache packages
55+
uses: actions/cache@v6
56+
with:
57+
path: ${{ steps.package_cache_path.outputs.path }}
58+
key: windows-tests-packages-v1-${{ hashFiles('pnpm-lock.yaml') }}
59+
60+
- name: Install
61+
run: vp install
62+
63+
- name: Ensure Electron runtime is installed
64+
if: inputs.package == '' || inputs.package == 'apps/desktop'
65+
run: vp run --filter "@t3tools/desktop" ensure:electron
66+
67+
# `vp run ... test -- <files>` does not forward positional args to vitest,
68+
# so file-scoped runs call `vp test run` inside the package instead.
69+
- name: Test
70+
shell: pwsh
71+
run: |
72+
$package = '${{ inputs.package }}'
73+
$files = '${{ inputs.files }}'
74+
if ($package -eq '') {
75+
vp run --parallel --concurrency-limit 4 --filter '!t3' --filter '!@t3tools/monorepo' test
76+
} elseif ($files -eq '') {
77+
vp run --filter "./$package" test
78+
} else {
79+
Set-Location $package
80+
vp test run $files.Split(' ')
81+
}

‎AGENTS.md‎

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ The most common defect in this repo is a change that works on the path you teste
7272
- **Contracts.** Anything crossing the wire is typed in `packages/contracts`. Change the schema and the server, web, mobile, and desktop all follow.
7373
- **Reverse states.** If you added a way in, add the way out and the way to see it. Snooze needs unsnooze. Close needs reopen. A one-way door is a bug.
7474
- **Connection modes.** Local, remote/relay, and tunnel behave differently. Multi-device and multi-environment cases are real.
75-
- **Docs.** `docs/` splits by audience. Behavior changes that a user would notice belong in `docs/user/` (shipped-product voice, no repo tooling or source paths); architecture and contributor changes in `docs/internals/`; runbooks in `docs/operations/`; new vocabulary in `docs/internals/glossary.md`.
75+
- **Docs.** Check whether the change makes existing guidance inaccurate. Apply the [documentation rules](#documentation) before adding anything.
7676

7777
## Dev servers
7878

@@ -120,11 +120,22 @@ An empty database is a bad test. Seed your worktree's `.t3` with a copy of real
120120
- One concern per PR. If the description says "also", split it.
121121
- When babysitting: poll checks and comments newer than the last push, verify each bot finding against the source, fix real ones, dismiss false positives with a written reason. Stay quiet when nothing is new. Stop when the bots are green on the latest commit.
122122

123+
## Documentation
124+
125+
Most code changes do not need an internal documentation change. Agents can read the code.
126+
127+
- `docs/internals/` is for architectural decisions and their reasons, constraints that span components, and implementation traps that are hard to discover from the source. Before adding a paragraph, ask what a maintainer would get wrong without it. If reading the relevant code answers the question, leave it out.
128+
- Do not document every feature, enumerate fields or methods, narrate control flow, maintain file catalogs, or append PR summaries. Types, tests, and code already record the implementation. The glossary defines shared vocabulary; it is not a feature index.
129+
- Keep a local implementation explanation in a nearby code comment. Use an internal doc when the reasoning crosses boundaries or needs context the code cannot carry well. Link to the relevant source instead of copying it.
130+
- When a documented decision or constraint changes, rewrite or remove the affected text. Do not append another account of the new behavior. A new internal page needs a distinct, durable reason to exist.
131+
- `docs/user/` helps users accomplish tasks. Give each major feature a concise section explaining what it does, how to start, and anything unintuitive. A settings path is useful; descriptions of visible buttons, icons, layouts, animations, or every UI state are not. Before adding text, ask what task or decision it helps the user with.
132+
- Keep user docs in the shipped product's voice, without implementation details or contributor tooling. Update the relevant feature section when how to use it changes. A UI tweak does not need a documentation entry, and a new control does not need its own page.
133+
- `docs/operations/` holds maintainer setup, release, and debugging procedures. Keep instructions for operating an installed T3 Code server in the user guides.
134+
123135
## Plans and work artifacts
124136

125137
- Do not commit implementation plans, research notes, or agent scratch files. Keep temporary working material outside the worktree. `.plans/` is gitignored only as a safety net for legacy tooling.
126138
- Track active maintainer work in the GitHub issue or project item that owns it. External proposals follow `CONTRIBUTING.md` and belong in Ideas discussions.
127-
- Put durable architecture, constraints, and decisions in `docs/internals/`. Update those docs when the product changes so agents find current facts instead of abandoned intentions.
128139
- A merged PR is the implementation record. Close or update its tracking item when the work lands; do not preserve a second checklist in the repository.
129140

130141
## How it works

‎CONTRIBUTING.md‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Developer Setup
44

5-
See the [maintainer scripts guide](docs/internals/scripts.md#first-checkout) for the initial checkout,
5+
See the [development runbook](docs/operations/development.md#first-checkout) for the initial checkout,
66
development commands, tests, and platform-specific desktop packaging prerequisites.
77

88
## Read This First
@@ -49,6 +49,10 @@ Explain exactly what changed.
4949

5050
Explain exactly why the change should exist.
5151

52+
Follow the [documentation rules](AGENTS.md#documentation). Keep internal docs for decisions and
53+
hard-to-discover constraints. Update user guides when how to use a feature changes; skip descriptions
54+
of obvious controls and cosmetic changes.
55+
5256
Do not mix unrelated fixes together.
5357

5458
If the PR makes anything resembling a UI change, include clear before/after images.

‎README.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,12 +79,12 @@ Full docs live in [docs/](./docs). There's no docs site yet.
7979
- [Install and first run](./docs/user/install.md)
8080
- [Permission modes](./docs/user/permission-modes.md)
8181
- [Keyboard shortcuts](./docs/user/keybindings.md)
82-
- [Customize a project icon](./docs/user/project-settings.md)
82+
- [Project settings](./docs/user/project-settings.md)
8383
- [Remote access from a phone or another machine](./docs/user/remote-access.md)
8484
- [Keeping app and server in sync](./docs/user/updating.md)
8585
- [Source control integrations](./docs/user/source-control.md)
8686
- Multiple accounts: [Codex](./docs/user/providers-codex.md) · [Claude](./docs/user/providers-claude.md)
87-
- Linux: [run T3 Code as a background service](./docs/user/background-service.md)
87+
- [Run T3 Code as a background service](./docs/user/background-service.md)
8888

8989
Building from source? Start at [docs/internals/overview.md](./docs/internals/overview.md).
9090

0 commit comments

Comments
 (0)