Skip to content

Commit e4b57cf

Browse files
committed
Merge remote-tracking branch 'upstream/dev' into fix/bash-process-exit-detection
# Conflicts: # packages/opencode/src/shell/shell.ts
2 parents 9da397e + d4d1292 commit e4b57cf

File tree

546 files changed

+21457
-3760
lines changed

Some content is hidden

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

546 files changed

+21457
-3760
lines changed

.github/workflows/publish.yml

Lines changed: 127 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,6 @@ jobs:
9999
with:
100100
name: opencode-cli
101101
path: packages/opencode/dist
102-
103102
outputs:
104103
version: ${{ needs.version.outputs.version }}
105104

@@ -240,11 +239,131 @@ jobs:
240239
APPLE_API_KEY: ${{ secrets.APPLE_API_KEY }}
241240
APPLE_API_KEY_PATH: ${{ runner.temp }}/apple-api-key.p8
242241

242+
build-electron:
243+
needs:
244+
- build-cli
245+
- version
246+
continue-on-error: false
247+
strategy:
248+
fail-fast: false
249+
matrix:
250+
settings:
251+
- host: macos-latest
252+
target: x86_64-apple-darwin
253+
platform_flag: --mac --x64
254+
- host: macos-latest
255+
target: aarch64-apple-darwin
256+
platform_flag: --mac --arm64
257+
- host: "blacksmith-4vcpu-windows-2025"
258+
target: x86_64-pc-windows-msvc
259+
platform_flag: --win
260+
- host: "blacksmith-4vcpu-ubuntu-2404"
261+
target: x86_64-unknown-linux-gnu
262+
platform_flag: --linux
263+
- host: "blacksmith-4vcpu-ubuntu-2404"
264+
target: aarch64-unknown-linux-gnu
265+
platform_flag: --linux
266+
runs-on: ${{ matrix.settings.host }}
267+
# if: github.ref_name == 'beta'
268+
steps:
269+
- uses: actions/checkout@v3
270+
271+
- uses: apple-actions/import-codesign-certs@v2
272+
if: runner.os == 'macOS'
273+
with:
274+
keychain: build
275+
p12-file-base64: ${{ secrets.APPLE_CERTIFICATE }}
276+
p12-password: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
277+
278+
- name: Setup Apple API Key
279+
if: runner.os == 'macOS'
280+
run: echo "${{ secrets.APPLE_API_KEY_PATH }}" > $RUNNER_TEMP/apple-api-key.p8
281+
282+
- uses: ./.github/actions/setup-bun
283+
284+
- uses: actions/setup-node@v4
285+
with:
286+
node-version: "24"
287+
288+
- name: Cache apt packages
289+
if: contains(matrix.settings.host, 'ubuntu')
290+
uses: actions/cache@v4
291+
with:
292+
path: ~/apt-cache
293+
key: ${{ runner.os }}-${{ matrix.settings.target }}-apt-electron-${{ hashFiles('.github/workflows/publish.yml') }}
294+
restore-keys: |
295+
${{ runner.os }}-${{ matrix.settings.target }}-apt-electron-
296+
297+
- name: Install dependencies (ubuntu only)
298+
if: contains(matrix.settings.host, 'ubuntu')
299+
run: |
300+
mkdir -p ~/apt-cache && chmod -R a+rw ~/apt-cache
301+
sudo apt-get update
302+
sudo apt-get install -y --no-install-recommends -o dir::cache::archives="$HOME/apt-cache" rpm
303+
sudo chmod -R a+rw ~/apt-cache
304+
305+
- name: Setup git committer
306+
id: committer
307+
uses: ./.github/actions/setup-git-committer
308+
with:
309+
opencode-app-id: ${{ vars.OPENCODE_APP_ID }}
310+
opencode-app-secret: ${{ secrets.OPENCODE_APP_SECRET }}
311+
312+
- name: Prepare
313+
run: bun ./scripts/prepare.ts
314+
working-directory: packages/desktop-electron
315+
env:
316+
OPENCODE_VERSION: ${{ needs.version.outputs.version }}
317+
OPENCODE_CHANNEL: ${{ (github.ref_name == 'beta' && 'beta') || 'prod' }}
318+
RUST_TARGET: ${{ matrix.settings.target }}
319+
GH_TOKEN: ${{ github.token }}
320+
GITHUB_RUN_ID: ${{ github.run_id }}
321+
322+
- name: Build
323+
run: bun run build
324+
working-directory: packages/desktop-electron
325+
env:
326+
OPENCODE_CHANNEL: ${{ (github.ref_name == 'beta' && 'beta') || 'prod' }}
327+
328+
- name: Package and publish
329+
if: needs.version.outputs.release
330+
run: npx electron-builder ${{ matrix.settings.platform_flag }} --publish always --config electron-builder.config.ts
331+
working-directory: packages/desktop-electron
332+
timeout-minutes: 60
333+
env:
334+
OPENCODE_CHANNEL: ${{ (github.ref_name == 'beta' && 'beta') || 'prod' }}
335+
GH_TOKEN: ${{ steps.committer.outputs.token }}
336+
CSC_LINK: ${{ secrets.APPLE_CERTIFICATE }}
337+
CSC_KEY_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
338+
APPLE_API_KEY: ${{ runner.temp }}/apple-api-key.p8
339+
APPLE_API_KEY_ID: ${{ secrets.APPLE_API_KEY }}
340+
APPLE_API_ISSUER: ${{ secrets.APPLE_API_ISSUER }}
341+
342+
- name: Package (no publish)
343+
if: ${{ !needs.version.outputs.release }}
344+
run: npx electron-builder ${{ matrix.settings.platform_flag }} --publish never --config electron-builder.config.ts
345+
working-directory: packages/desktop-electron
346+
timeout-minutes: 60
347+
env:
348+
OPENCODE_CHANNEL: ${{ (github.ref_name == 'beta' && 'beta') || 'prod' }}
349+
350+
- uses: actions/upload-artifact@v4
351+
with:
352+
name: opencode-electron-${{ matrix.settings.target }}
353+
path: packages/desktop-electron/dist/*
354+
355+
- uses: actions/upload-artifact@v4
356+
if: needs.version.outputs.release
357+
with:
358+
name: latest-yml-${{ matrix.settings.target }}
359+
path: packages/desktop-electron/dist/latest*.yml
360+
243361
publish:
244362
needs:
245363
- version
246364
- build-cli
247365
- build-tauri
366+
- build-electron
248367
runs-on: blacksmith-4vcpu-ubuntu-2404
249368
steps:
250369
- uses: actions/checkout@v3
@@ -281,6 +400,12 @@ jobs:
281400
name: opencode-cli
282401
path: packages/opencode/dist
283402

403+
- uses: actions/download-artifact@v4
404+
if: needs.version.outputs.release
405+
with:
406+
pattern: latest-yml-*
407+
path: /tmp/latest-yml
408+
284409
- name: Cache apt packages (AUR)
285410
uses: actions/cache@v4
286411
with:
@@ -308,3 +433,4 @@ jobs:
308433
GITHUB_TOKEN: ${{ steps.committer.outputs.token }}
309434
GH_REPO: ${{ needs.version.outputs.repo }}
310435
NPM_CONFIG_PROVENANCE: false
436+
LATEST_YML_DIR: /tmp/latest-yml

.opencode/glossary/tr.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# tr Glossary
2+
3+
## Sources
4+
5+
- PR #15835: https://github.com/anomalyco/opencode/pull/15835
6+
7+
## Do Not Translate (Locale Additions)
8+
9+
- `OpenCode` (preserve casing in prose, docs, and UI copy)
10+
- Keep lowercase `opencode` in commands, package names, paths, URLs, and other exact identifiers
11+
- `<TAB>` stays the literal key token in code blocks; use `Tab` for the nearby explanatory label in prose
12+
- Commands, flags, file paths, and code literals (keep exactly as written)
13+
14+
## Preferred Terms
15+
16+
These are PR-backed wording preferences and may evolve.
17+
18+
| English / Context | Preferred | Notes |
19+
| ------------------------- | --------------------------------------- | ------------------------------------------------------------- |
20+
| available in beta | `beta olarak mevcut` | Prefer this over `beta olarak kullanılabilir` |
21+
| privacy-first | `Gizlilik öncelikli tasarlandı` | Prefer this over `Önce gizlilik için tasarlandı` |
22+
| connect your local models | `yerel modellerinizi bağlayabilirsiniz` | Use the fuller, more direct action phrase |
23+
| `<TAB>` key label | `Tab` | Use `Tab` in prose; keep `<TAB>` in literal UI or code blocks |
24+
| cross-platform | `cross-platform (tüm platformlarda)` | Keep the English term, add a short clarification when helpful |
25+
26+
## Guidance
27+
28+
- Prefer natural Turkish phrasing over literal translation
29+
- Merge broken sentence fragments into one clear sentence when the source is a single thought
30+
- Keep product naming consistent: `OpenCode` in prose, `opencode` only for exact technical identifiers
31+
- When an English technical term is intentionally kept, add a short Turkish clarification only if it improves readability
32+
33+
## Avoid
34+
35+
- Avoid `beta olarak kullanılabilir` when `beta olarak mevcut` fits
36+
- Avoid `Önce gizlilik için tasarlandı`; use the more natural reviewed wording instead
37+
- Avoid `Sekme` for the translated key label in prose when referring to `<TAB>`
38+
- Avoid changing `opencode` to `OpenCode` inside commands, URLs, package names, or code literals

AGENTS.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,17 @@
2020

2121
Prefer single word names for variables and functions. Only use multiple words if necessary.
2222

23+
### Naming Enforcement (Read This)
24+
25+
THIS RULE IS MANDATORY FOR AGENT WRITTEN CODE.
26+
27+
- Use single word names by default for new locals, params, and helper functions.
28+
- Multi-word names are allowed only when a single word would be unclear or ambiguous.
29+
- Do not introduce new camelCase compounds when a short single-word alternative is clear.
30+
- Before finishing edits, review touched lines and shorten newly introduced identifiers where possible.
31+
- Good short names to prefer: `pid`, `cfg`, `err`, `opts`, `dir`, `root`, `child`, `state`, `timeout`.
32+
- Examples to avoid unless truly required: `inputPID`, `existingClient`, `connectTimeout`, `workerPath`.
33+
2334
```ts
2435
// Good
2536
const foo = 1

0 commit comments

Comments
 (0)