Skip to content

Commit d5c943e

Browse files
authored
Merge pull request #10 from spencerkit/develop
feat: add codex support and optimize runtime transport
2 parents a7251dd + cf7dbb0 commit d5c943e

861 files changed

Lines changed: 152690 additions & 68952 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.

.cargo/config.toml

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

.changeset/README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Changesets
2+
3+
This repository uses Changesets to maintain the CLI release PR and changelog.
4+
5+
Current policy:
6+
7+
- Normal PRs may omit a changeset.
8+
- If a PR should be released, add a changeset for `@spencer-kit/coder-studio`.
9+
- Internal workspace changes that affect the CLI should still be described under the CLI package.
10+
- Non-CLI packages are currently internal-only and must not be targeted by changesets.

.changeset/config.json

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,14 @@
11
{
2-
"$schema": "https://unpkg.com/@changesets/config@3.1.1/schema.json",
3-
"changelog": "@changesets/cli/changelog",
2+
"$schema": "https://unpkg.com/@changesets/config@3.1.4/schema.json",
3+
"changelog": [
4+
"@changesets/changelog-github",
5+
{
6+
"repo": "spencerkit/coder-studio"
7+
}
8+
],
49
"commit": false,
510
"fixed": [],
6-
"linked": [
7-
[
8-
"@spencer-kit/coder-studio",
9-
"@spencer-kit/coder-studio-linux-x64",
10-
"@spencer-kit/coder-studio-darwin-arm64",
11-
"@spencer-kit/coder-studio-darwin-x64",
12-
"@spencer-kit/coder-studio-win32-x64"
13-
]
14-
],
11+
"linked": [],
1512
"access": "public",
1613
"baseBranch": "main",
1714
"updateInternalDependencies": "patch",

.github/workflows/changesets.yml

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

.github/workflows/ci.yml

Lines changed: 32 additions & 103 deletions
Original file line numberDiff line numberDiff line change
@@ -1,120 +1,49 @@
11
name: CI
22

33
on:
4+
pull_request:
45
push:
56
branches:
67
- main
7-
pull_request:
8-
9-
permissions:
10-
contents: read
118

129
concurrency:
13-
group: ci-${{ github.workflow }}-${{ github.ref }}
10+
group: ci-${{ github.event_name }}-${{ github.ref }}
1411
cancel-in-progress: true
1512

1613
jobs:
17-
version-consistency:
18-
name: Version Consistency
19-
runs-on: ubuntu-22.04
20-
steps:
21-
- uses: actions/checkout@v4
22-
- uses: pnpm/action-setup@v4
23-
- uses: actions/setup-node@v4
24-
with:
25-
node-version: 22
26-
cache: pnpm
27-
- run: pnpm install --no-frozen-lockfile
28-
- run: pnpm version:check
14+
verify:
15+
name: Lint, test, and build
16+
runs-on: ubuntu-latest
17+
permissions:
18+
contents: read
2919

30-
cli-cross-platform:
31-
name: CLI Unit (${{ matrix.os }})
32-
runs-on: ${{ matrix.os }}
33-
needs: version-consistency
34-
strategy:
35-
fail-fast: false
36-
matrix:
37-
os:
38-
- ubuntu-22.04
39-
- macos-latest
40-
- windows-latest
4120
steps:
42-
- uses: actions/checkout@v4
43-
- uses: pnpm/action-setup@v4
44-
- uses: actions/setup-node@v4
45-
with:
46-
node-version: 22
47-
cache: pnpm
48-
- run: pnpm install --no-frozen-lockfile
49-
- run: pnpm test:cli
21+
- name: Checkout repository
22+
uses: actions/checkout@v4
5023

51-
transport-windows-smoke:
52-
name: Transport Windows Smoke
53-
runs-on: windows-2022
54-
needs: version-consistency
55-
steps:
56-
- uses: actions/checkout@v4
57-
- uses: dtolnay/rust-toolchain@stable
58-
- name: Install Windows GNU target
59-
run: rustup target add x86_64-pc-windows-gnu
60-
- uses: Swatinem/rust-cache@v2
24+
- name: Setup pnpm
25+
uses: pnpm/action-setup@v4
6126
with:
62-
workspaces: apps/server -> .build/server/target
63-
- uses: pnpm/action-setup@v4
64-
- uses: actions/setup-node@v4
65-
with:
66-
node-version: 22
67-
cache: pnpm
68-
- run: pnpm install --no-frozen-lockfile
69-
- run: npx playwright install chromium
70-
# Pin this smoke to windows-2022 because windows-latest currently tracks
71-
# windows-2025 and GitHub-hosted windows-2025 does not reliably provide WSL.
72-
- run: pnpm test:smoke:windows:transport -- --skip-wsl-preflight
27+
version: 10.33.2
28+
run_install: false
7329

74-
verify-linux:
75-
name: Verify Linux Runtime
76-
runs-on: ubuntu-22.04
77-
needs: version-consistency
78-
env:
79-
CODER_STUDIO_START_TIMEOUT_MS: 45000
80-
CODER_STUDIO_RUST_TARGET: x86_64-unknown-linux-musl
81-
steps:
82-
- uses: actions/checkout@v4
83-
- name: Install Linux build dependencies
84-
run: |
85-
sudo apt-get update
86-
sudo apt-get install -y \
87-
build-essential \
88-
curl \
89-
file \
90-
musl-tools \
91-
xvfb \
92-
wget
93-
- uses: dtolnay/rust-toolchain@stable
30+
- name: Setup Node.js
31+
uses: actions/setup-node@v4
9432
with:
95-
components: rustfmt, clippy
96-
- name: Install Linux musl target
97-
run: rustup target add x86_64-unknown-linux-musl
98-
- uses: Swatinem/rust-cache@v2
99-
with:
100-
workspaces: apps/server -> .build/server/target
101-
- uses: pnpm/action-setup@v4
102-
- uses: actions/setup-node@v4
103-
with:
104-
node-version: 22
105-
cache: pnpm
106-
- run: pnpm install --no-frozen-lockfile
107-
- run: pnpm test:cli
108-
- run: cargo fmt --manifest-path apps/server/Cargo.toml --all --check
109-
- run: cargo clippy --manifest-path apps/server/Cargo.toml --all-targets -- -D warnings
110-
- run: cargo check --manifest-path apps/server/Cargo.toml
111-
- run: cargo test --manifest-path apps/server/Cargo.toml
112-
- run: pnpm pack:local
113-
- run: xvfb-run -a pnpm test:smoke
114-
- run: npx playwright install --with-deps chromium
115-
- run: xvfb-run -a pnpm test:e2e:release
116-
- uses: actions/upload-artifact@v4
117-
if: success()
118-
with:
119-
name: release-artifacts-linux
120-
path: .artifacts/*
33+
node-version: "24"
34+
cache: "pnpm"
35+
36+
- name: Install dependencies
37+
run: pnpm install --frozen-lockfile
38+
39+
- name: Validate changesets metadata
40+
run: pnpm changeset:validate
41+
42+
- name: Run lint
43+
run: pnpm ci:lint
44+
45+
- name: Run tests
46+
run: pnpm ci:test
47+
48+
- name: Run production build
49+
run: pnpm ci:build

.github/workflows/publish.yml

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
name: Publish CLI
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
npm_tag:
7+
description: "npm dist-tag to publish under"
8+
required: true
9+
default: "latest"
10+
type: string
11+
12+
concurrency:
13+
group: publish-cli
14+
cancel-in-progress: false
15+
16+
jobs:
17+
publish:
18+
name: Publish CLI package
19+
runs-on: ubuntu-latest
20+
permissions:
21+
contents: write
22+
23+
steps:
24+
- name: Checkout repository
25+
uses: actions/checkout@v4
26+
with:
27+
fetch-depth: 0
28+
29+
- name: Ensure publish runs from main
30+
run: |
31+
if [ "${GITHUB_REF_NAME}" != "main" ]; then
32+
echo "Publish workflow must run from main" >&2
33+
exit 1
34+
fi
35+
36+
- name: Setup pnpm
37+
uses: pnpm/action-setup@v4
38+
with:
39+
version: 10.33.2
40+
run_install: false
41+
42+
- name: Setup Node.js
43+
uses: actions/setup-node@v4
44+
with:
45+
node-version: "24"
46+
cache: "pnpm"
47+
registry-url: "https://registry.npmjs.org"
48+
49+
- name: Install dependencies
50+
run: pnpm install --frozen-lockfile
51+
52+
- name: Ensure there are no pending release changesets
53+
run: |
54+
pending_changesets=$(find .changeset -maxdepth 1 -type f -name '*.md' ! -name 'README.md')
55+
if [ -n "${pending_changesets}" ]; then
56+
echo "Pending changesets exist. Merge the generated release PR before publishing." >&2
57+
echo "${pending_changesets}" >&2
58+
exit 1
59+
fi
60+
61+
- name: Run release validation
62+
run: pnpm ci:release:validate
63+
64+
- name: Read CLI version
65+
id: release
66+
run: |
67+
version=$(node --input-type=module -e "import { readFileSync } from 'node:fs'; console.log(JSON.parse(readFileSync('packages/cli/package.json', 'utf8')).version)")
68+
if [ -z "${version}" ]; then
69+
echo "Failed to determine CLI version" >&2
70+
exit 1
71+
fi
72+
echo "version=${version}" >> "${GITHUB_OUTPUT}"
73+
echo "tag=v${version}" >> "${GITHUB_OUTPUT}"
74+
75+
- name: Ensure release tag does not already exist
76+
run: |
77+
if git rev-parse --verify --quiet "refs/tags/${{ steps.release.outputs.tag }}" >/dev/null; then
78+
echo "Release tag ${{ steps.release.outputs.tag }} already exists" >&2
79+
exit 1
80+
fi
81+
82+
- name: Publish CLI to npm
83+
env:
84+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
85+
run: |
86+
if [ -z "${NODE_AUTH_TOKEN}" ]; then
87+
echo "NPM_TOKEN secret is required for publishing" >&2
88+
exit 1
89+
fi
90+
pnpm publish:cli -- --publish --no-build --tag "${{ inputs.npm_tag }}"
91+
92+
- name: Create and push release tag
93+
run: |
94+
git config user.name "github-actions[bot]"
95+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
96+
git tag "${{ steps.release.outputs.tag }}"
97+
git push origin "${{ steps.release.outputs.tag }}"
98+
99+
- name: Create GitHub release
100+
env:
101+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
102+
run: |
103+
gh release create "${{ steps.release.outputs.tag }}" \
104+
--title "@spencer-kit/coder-studio ${{ steps.release.outputs.version }}" \
105+
--generate-notes \
106+
--verify-tag

.github/workflows/release-pr.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Release PR
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
concurrency:
9+
group: release-pr-${{ github.ref }}
10+
cancel-in-progress: true
11+
12+
jobs:
13+
release-pr:
14+
name: Create or update release PR
15+
runs-on: ubuntu-latest
16+
permissions:
17+
contents: write
18+
pull-requests: write
19+
20+
steps:
21+
- name: Checkout repository
22+
uses: actions/checkout@v4
23+
with:
24+
fetch-depth: 0
25+
26+
- name: Setup pnpm
27+
uses: pnpm/action-setup@v4
28+
with:
29+
version: 10.33.2
30+
run_install: false
31+
32+
- name: Setup Node.js
33+
uses: actions/setup-node@v4
34+
with:
35+
node-version: "24"
36+
cache: "pnpm"
37+
38+
- name: Install dependencies
39+
run: pnpm install --frozen-lockfile
40+
41+
- name: Validate changesets metadata
42+
run: pnpm changeset:validate
43+
44+
- name: Create or update release PR
45+
uses: changesets/action@v1
46+
with:
47+
version: pnpm version-packages
48+
commit: "release: version packages"
49+
title: "release: version packages"
50+
env:
51+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)