Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
136 commits
Select commit Hold shift + click to select a range
738d6c8
feat: save prompt to history when cleared with Ctrl+C
ariane-emory Feb 2, 2026
2c6ff35
feat: add toggle to control whether cleared prompts are saved to history
ariane-emory Feb 2, 2026
39332f5
Merge branch 'dev' into feat/canceled-prompts-in-history
ariane-emory Feb 2, 2026
ded6bb6
Merge branch 'dev' into feat/canceled-prompts-in-history
ariane-emory Feb 3, 2026
f762125
Merge branch 'dev' into feat/canceled-prompts-in-history
ariane-emory Feb 3, 2026
eaba997
Merge branch 'dev' into feat/canceled-prompts-in-history
ariane-emory Feb 5, 2026
4f96975
Merge branch 'dev' into feat/canceled-prompts-in-history
ariane-emory Feb 5, 2026
0c154e6
Merge branch 'dev' into feat/canceled-prompts-in-history
ariane-emory Feb 6, 2026
d5dcadc
Merge branch 'dev' into feat/canceled-prompts-in-history
ariane-emory Feb 7, 2026
878c1b8
feat(tui): add auto-accept mode for permission requests
thdxr Feb 7, 2026
405cc3f
tui: streamline permission toggle command naming and add keyboard sho…
thdxr Feb 7, 2026
f202536
tui: show enable/disable state in permission toggle and make it searc…
thdxr Feb 7, 2026
ac244b1
tui: add searchable 'toggle' keywords to command palette and show cur…
thdxr Feb 7, 2026
ad545d0
tui: allow auto-accepting only edit permissions instead of all permis…
thdxr Feb 8, 2026
bb33823
tui: standardize autoedit indicator text styling to match other statu…
thdxr Feb 8, 2026
a531f3f
core: run command build agent now auto-accepts file edits to reduce w…
thdxr Feb 8, 2026
b8031c5
Merge branch 'dev' into feat/canceled-prompts-in-history
ariane-emory Feb 10, 2026
eaf94ed
Merge branch 'dev' into feat/canceled-prompts-in-history
ariane-emory Feb 10, 2026
ac5a5d8
Merge branch 'feat/canceled-prompts-in-history' of github.com:ariane-…
ariane-emory Feb 10, 2026
8805dfc
fix: deduplicate prompt history entries
ariane-emory Feb 11, 2026
3f37b43
Merge branch 'dev' into feat/canceled-prompts-in-history
ariane-emory Feb 11, 2026
7fb6b58
Merge branch 'dev' into feat/canceled-prompts-in-history
ariane-emory Feb 12, 2026
5cc0901
Merge branch 'dev' into feat/canceled-prompts-in-history
ariane-emory Feb 13, 2026
377812b
Merge dev into feat/canceled-prompts-in-history
ariane-emory Feb 14, 2026
459b22b
Merge branch 'dev' into feat/canceled-prompts-in-history
ariane-emory Feb 15, 2026
5ba2d7e
Merge branch 'dev' into feat/canceled-prompts-in-history
ariane-emory Feb 15, 2026
b7b016f
Merge branch 'dev' into feat/canceled-prompts-in-history
ariane-emory Feb 17, 2026
b70629a
Merge branch 'dev' into feat/canceled-prompts-in-history
ariane-emory Feb 19, 2026
3d1b121
Merge branch 'dev' into feat/canceled-prompts-in-history
ariane-emory Feb 20, 2026
01ff5b5
Merge branch 'dev' into feat/canceled-prompts-in-history
ariane-emory Feb 20, 2026
9d78b69
wip(app): beta badge
adamdotdevin Feb 20, 2026
0b06ff1
Merge branch 'dev' into feat/canceled-prompts-in-history
ariane-emory Feb 21, 2026
716f40b
Merge branch 'dev' into feat/canceled-prompts-in-history
ariane-emory Feb 26, 2026
33b3388
Merge branch 'dev' into feat/canceled-prompts-in-history
ariane-emory Feb 26, 2026
724dd66
tweak(ui): collapse questions
iamdavidhill Feb 27, 2026
8b16898
tweak(ui): active state on type your own answer
iamdavidhill Feb 27, 2026
5d419a0
tweak(ui): expand question dock toggle area
iamdavidhill Feb 27, 2026
752e449
tweak(ui): improve collpase area
iamdavidhill Mar 2, 2026
81a61f8
tweak(ui): improve collapse area
iamdavidhill Mar 2, 2026
b286c0a
tweak(ui): restore questions progress indicator
iamdavidhill Mar 2, 2026
611e616
tui: add right margin to question progress indicator so it doesn't to…
iamdavidhill Mar 2, 2026
955d859
Merge branch 'dev' into feat/canceled-prompts-in-history
ariane-emory Mar 5, 2026
f3efdff
Merge branch 'dev' into feat/canceled-prompts-in-history
ariane-emory Mar 8, 2026
a718f86
Merge branch 'dev' into feat/canceled-prompts-in-history
ariane-emory Mar 8, 2026
2531b2d
Merge branch 'dev' into feat/canceled-prompts-in-history
ariane-emory Mar 13, 2026
a9d9e4d
Merge branch 'dev' into feat/canceled-prompts-in-history
ariane-emory Mar 20, 2026
c1a3936
Merge remote-tracking branch 'origin/dev' into feat/auto-accept-permi…
thdxr Mar 20, 2026
db039db
regen js sdk
thdxr Mar 20, 2026
5792a80
Merge branch 'dev' into feat/auto-accept-permissions
thdxr Mar 20, 2026
01e3504
Merge branch 'dev' into feat/canceled-prompts-in-history
ariane-emory Mar 20, 2026
eec4c77
Merge branch 'dev' into feat/canceled-prompts-in-history
ariane-emory Mar 24, 2026
532b64c
Merge branch 'dev' into feat/canceled-prompts-in-history
ariane-emory Mar 24, 2026
6652585
Merge branch 'dev' into feat/canceled-prompts-in-history
ariane-emory Mar 24, 2026
700d0fe
tweak: use theme tokens for debug bar surface
jayair Mar 24, 2026
f45e084
feat(app): hide desktop titlebar tools behind settings
jayair Mar 24, 2026
fa9674e
feat(app): add more titlebar visibility settings
jayair Mar 24, 2026
f276a8d
feat: add APN relay MVP and experimental push bridge
R44VC0RP Mar 28, 2026
cf79208
mobile-voice commit
R44VC0RP Mar 28, 2026
d065d5a
Add Porter workflow files for APN relay project (#19547)
porter-deployment-app[bot] Mar 28, 2026
56e0e5c
Update packages json for the porter stuff
R44VC0RP Mar 28, 2026
0051b60
feat: improve mobile model download UX and relay defaults
R44VC0RP Mar 28, 2026
f080147
update for app and bun
R44VC0RP Mar 28, 2026
bd6e81f
update for env checks
R44VC0RP Mar 28, 2026
b737e87
update env again
R44VC0RP Mar 28, 2026
f1e88d3
update for the db.ts
R44VC0RP Mar 28, 2026
3a5be7a
update index.ts
R44VC0RP Mar 28, 2026
62fae6d
fix: auto-recover APNs env mismatch in relay
R44VC0RP Mar 28, 2026
0a9fcab
chore: update dependencies and enhance mobile-voice functionality
R44VC0RP Mar 28, 2026
52d1ee7
feat: use new mobile app icon and QR-only server add flow
R44VC0RP Mar 28, 2026
a45c3a0
feat: harden mobile server flow and enrich push alerts
R44VC0RP Mar 28, 2026
bd2e34f
update
R44VC0RP Mar 28, 2026
2abf110
update for whisper
R44VC0RP Mar 29, 2026
ddd30ef
update
R44VC0RP Mar 29, 2026
eadb0e2
update to the apn and server management
R44VC0RP Mar 29, 2026
9a8b2ae
update apn server
R44VC0RP Mar 29, 2026
d3ec6f7
feat: route push notifications by server and session
R44VC0RP Mar 29, 2026
cb535ee
feat: support advertised QR hosts for mobile pairing
R44VC0RP Mar 29, 2026
2f44d19
feat: support deep-link QR pairing in mobile
R44VC0RP Mar 29, 2026
ab7b1d7
Update settings
R44VC0RP Mar 30, 2026
8ee4ada
update for onboarding
R44VC0RP Mar 30, 2026
ec27518
update mobile voice quality guardrails
R44VC0RP Mar 30, 2026
785635c
refactor mobile onboarding config
R44VC0RP Mar 30, 2026
f8f9865
refactor mobile session payload parsing
R44VC0RP Mar 30, 2026
df3276f
refactor mobile web color hydration
R44VC0RP Mar 30, 2026
49b40e3
refactor mobile fire-and-forget calls
R44VC0RP Mar 30, 2026
922633e
refactor mobile derived ui state
R44VC0RP Mar 30, 2026
abf79ae
refactor mobile screen orchestration
R44VC0RP Mar 30, 2026
bcf7817
update mobile dictation controls
R44VC0RP Mar 30, 2026
aacf1d2
update app hanlding
R44VC0RP Mar 30, 2026
15fae6c
update mobile pairing flow and audio session handling
R44VC0RP Mar 30, 2026
6494f48
update
R44VC0RP Mar 30, 2026
28aebb2
update mobile voice iOS tracking
R44VC0RP Mar 31, 2026
776e61d
update to build proc
R44VC0RP Mar 31, 2026
36b51ca
Merge branch 'dev' into opencode-remote-voice
R44VC0RP Mar 31, 2026
21e7f3f
fix: use parentID matching instead of ID ordering for prompt loop exi…
MakonnenMak Feb 19, 2026
c90640e
feat: expose push pairing QR endpoints
Apr 2, 2026
4d30ad1
feat: enhance mobile voice build and UI layout
Apr 2, 2026
0b8f8bc
fix: reduce noisy push relay notifications
Apr 2, 2026
1d68cd2
fix: resolve dev merge conflicts in opencode deps
Apr 2, 2026
d1d3d42
fix: suppress subagent APN completion and error events
Apr 2, 2026
4abb464
feat: refine mobile voice reader interactions
Apr 2, 2026
0f58efe
fix: advertise MagicDNS hosts for Tailscale pairing
Apr 3, 2026
a5614f9
fix: unblock mobile EAS installs with Bun
Apr 3, 2026
97a9457
Merge branch 'dev' into feat/canceled-prompts-in-history
ariane-emory Apr 3, 2026
cd3a58a
Merge remote-tracking branch 'origin/dev' into opencode-remote-voice
Apr 3, 2026
e0894d7
feat(mobile-voice): add swipeable prompt history pager in transcripti…
Apr 4, 2026
6db0f98
fix(mobile-voice): monitoring robustness, neutral prompt history colo…
Apr 4, 2026
057208e
fix: prevent spurious session-complete notifications from APN relay
Apr 4, 2026
291e168
Merge remote-tracking branch 'upstream/dev' into fix/clock-skew-promp…
MakonnenMak Apr 6, 2026
2eca96c
Merge remote-tracking branch 'origin/dev' into opencode-remote-voice
Apr 8, 2026
d034a61
fix: add mobile app version hint to QR code scan prompt
Apr 8, 2026
f29cb81
feat(opencode): add observability logging to push relay and session s…
Apr 8, 2026
cb29742
fix(app): remove pierre diff virtualization
adamdotdevin Apr 8, 2026
13f89d5
fix(opencode): delay transient APN permission notifications
Apr 8, 2026
10a43e0
fix(app): tighter startup sequence
adamdotdevin Apr 8, 2026
943d82c
chore: simpler splash window
adamdotdevin Apr 8, 2026
39b4f86
ui: polish mobile voice app for 1.0.2
Apr 8, 2026
a8d5b14
update for beta
Apr 8, 2026
381afd6
fix(opencode): remove redundant push pair QR endpoint
Apr 8, 2026
7c18b95
feat(opencode): add mobile pairing dialogs
Apr 8, 2026
e8b4eb8
fix(mobile-voice): restore camera and discovery in dev builds
Apr 8, 2026
6f5a3d3
keep recent turns during session compaction
nexxeln Apr 10, 2026
aa86fb7
refactor compaction tail selection
nexxeln Apr 10, 2026
9819eb0
tweak: disable
rekram1-node Apr 10, 2026
211e773
Apply PR #11710: feat: Add the ability to include cleared prompts in …
opencode-agent[bot] Apr 11, 2026
4022596
Apply PR #12633: feat(tui): add auto-accept mode for permission requests
opencode-agent[bot] Apr 11, 2026
29fa965
Apply PR #14307: fix: use parentID matching instead of ID ordering fo…
opencode-agent[bot] Apr 11, 2026
86ec0cf
Apply PR #14471: [DO NOT MERGE]: beta badge for desktop app
opencode-agent[bot] Apr 11, 2026
b335b7d
Apply PR #15697: tweak(ui): make questions popup collapsible
opencode-agent[bot] Apr 11, 2026
b8d1e39
Apply PR #19029: feat(app): hide desktop titlebar tools behind settings
opencode-agent[bot] Apr 11, 2026
18705e9
Apply PR #19545: feat: opencode remote control + opencode serve depen…
opencode-agent[bot] Apr 11, 2026
da5e286
Apply PR #21537: fix(app): remove pierre diff virtualization
opencode-agent[bot] Apr 11, 2026
877b230
Apply PR #21553: fix(app): tighter startup sequence
opencode-agent[bot] Apr 11, 2026
c620fc9
Apply PR #21822: refactor: improve compaction to retain recent conver…
opencode-agent[bot] Apr 11, 2026
bb1c065
Fix beta integration
opencode-agent[bot] Apr 11, 2026
d0a2f0b
fix: prompt for pending todo updates
ahmedfe Apr 11, 2026
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
27 changes: 27 additions & 0 deletions .github/workflows/porter-app-5534-apn-relay.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
"on":
push:
branches:
- opencode-remote-voice
name: Deploy to apn-relay
jobs:
porter-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set Github tag
id: vars
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- name: Setup porter
uses: porter-dev/setup-porter@v0.1.0
- name: Deploy stack
timeout-minutes: 30
run: porter apply
env:
PORTER_APP_NAME: apn-relay
PORTER_CLUSTER: "5534"
PORTER_DEPLOYMENT_TARGET_ID: d60e67f5-b0a6-4275-8ed6-3cebaf092147
PORTER_HOST: https://dashboard.porter.run
PORTER_PROJECT: "18525"
PORTER_TAG: ${{ steps.vars.outputs.sha_short }}
PORTER_TOKEN: ${{ secrets.PORTER_APP_18525_975734319 }}
222 changes: 128 additions & 94 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -1,128 +1,162 @@
- To regenerate the JavaScript SDK, run `./packages/sdk/js/script/build.ts`.
- ALWAYS USE PARALLEL TOOLS WHEN APPLICABLE.
- The default branch in this repo is `dev`.
- Local `main` ref may not exist; use `dev` or `origin/dev` for diffs.
- Prefer automation: execute requested actions without confirmation unless blocked by missing info or safety/irreversibility.
# OpenCode Monorepo Agent Guide

## Style Guide
This file is for coding agents working in `/Users/ryanvogel/dev/opencode`.

### General Principles
## Scope And Precedence

- Keep things in one function unless composable or reusable
- Avoid `try`/`catch` where possible
- Avoid using the `any` type
- Prefer single word variable names where possible
- Use Bun APIs when possible, like `Bun.file()`
- Rely on type inference when possible; avoid explicit type annotations or interfaces unless necessary for exports or clarity
- Prefer functional array methods (flatMap, filter, map) over for loops; use type guards on filter to maintain type inference downstream
- Start with this file for repo-wide defaults.
- Then check package-local `AGENTS.md` files for stricter rules.
- Existing local guides include `packages/opencode/AGENTS.md` and `packages/app/AGENTS.md`.
- Package-specific guides override this file when they conflict.

### Naming
## Repo Facts

- Package manager: `bun` (`bun@1.3.11`).
- Monorepo tool: `turbo`.
- Default branch: `dev`.
- Root test script intentionally fails; do not run tests from root.

## Cursor / Copilot Rules

- No `.cursor/rules/` directory found.
- No `.cursorrules` file found.
- No `.github/copilot-instructions.md` file found.
- If these files are added later, treat them as mandatory project policy.

## High-Value Commands

Run commands from the correct package directory unless noted.

### Root

- Install deps: `bun install`
- Run all typechecks via turbo: `bun run typecheck`
- OpenCode dev CLI entry: `bun run dev`
- OpenCode serve (common): `bun run dev serve --hostname 0.0.0.0 --port 4096`

### `packages/opencode`

Prefer single word names for variables and functions. Only use multiple words if necessary.
- Dev CLI: `bun run dev`
- Typecheck: `bun run typecheck`
- Tests (all): `bun test --timeout 30000`
- Tests (single file): `bun test test/path/to/file.test.ts --timeout 30000`
- Tests (single test name): `bun test test/path/to/file.test.ts -t "name fragment" --timeout 30000`
- Build: `bun run build`
- Drizzle helper: `bun run db`

### Naming Enforcement (Read This)
### `packages/app`

THIS RULE IS MANDATORY FOR AGENT WRITTEN CODE.
- Dev server: `bun dev`
- Build: `bun run build`
- Typecheck: `bun run typecheck`
- Unit tests (all): `bun run test:unit`
- Unit tests (single file): `bun test --preload ./happydom.ts ./src/path/to/file.test.ts`
- Unit tests (single test name): `bun test --preload ./happydom.ts ./src/path/to/file.test.ts -t "name fragment"`
- E2E tests: `bun run test:e2e`

- Use single word names by default for new locals, params, and helper functions.
- Multi-word names are allowed only when a single word would be unclear or ambiguous.
- Do not introduce new camelCase compounds when a short single-word alternative is clear.
- Before finishing edits, review touched lines and shorten newly introduced identifiers where possible.
- Good short names to prefer: `pid`, `cfg`, `err`, `opts`, `dir`, `root`, `child`, `state`, `timeout`.
- Examples to avoid unless truly required: `inputPID`, `existingClient`, `connectTimeout`, `workerPath`.
### `packages/mobile-voice`

```ts
// Good
const foo = 1
function journal(dir: string) {}
- Start Expo: `bun run start`
- Start Expo dev client: `bunx expo start --dev-client --clear --host lan`
- iOS native run: `bun run ios`
- Android native run: `bun run android`
- Lint: `bun run lint`
- Expo doctor: `bunx expo-doctor`
- Dependency compatibility check: `bunx expo install --check`

// Bad
const fooBar = 1
function prepareJournal(dir: string) {}
```
### `packages/apn-relay`

Reduce total variable count by inlining when a value is only used once.
- Start relay: `bun run dev`
- Typecheck: `bun run typecheck`
- DB connectivity check: `bun run db:check`

```ts
// Good
const journal = await Bun.file(path.join(dir, "journal.json")).json()
## Build / Lint / Test Expectations

// Bad
const journalPath = path.join(dir, "journal.json")
const journal = await Bun.file(journalPath).json()
```
- Always run the narrowest checks that prove your change.
- For backend changes: run package typecheck + relevant tests.
- For mobile changes: run `expo lint` and at least one `expo` compile-style command if possible.
- Never claim tests passed unless you ran them in this workspace.

### Destructuring
## Single-Test Guidance

Avoid unnecessary destructuring. Use dot notation to preserve context.
- Prefer running one file first, then broaden scope.
- For Bun tests, pass the file path directly.
- For name filtering, use `-t "..."`.
- Keep original timeouts when scripts define them.

```ts
// Good
obj.a
obj.b
## Code Style Guidelines

// Bad
const { a, b } = obj
```
These conventions are already used heavily in this repo and should be preserved.

### Variables
### Formatting

Prefer `const` over `let`. Use ternaries or early returns instead of reassignment.
- Use Prettier defaults configured in root: `semi: false`, `printWidth: 120`.
- Keep imports grouped and stable; avoid noisy reorder-only edits.
- Avoid unrelated formatting churn in touched files.

```ts
// Good
const foo = condition ? 1 : 2
### Imports

// Bad
let foo
if (condition) foo = 1
else foo = 2
```
- Prefer explicit imports over dynamic imports unless runtime gating is required.
- Prefer existing alias patterns (for example `@/...`) where already configured.
- Do not introduce new dependency layers when a local util already exists.

### Types

- Avoid `any`.
- Prefer inference for local variables.
- Add explicit annotations for exported APIs and complex boundaries.
- Prefer `zod` schemas for request/response validation and parsing.

### Naming

- Follow existing repo preference for short, clear names.
- Use single-word names when readable; use multi-word only for clarity.
- Keep naming consistent with nearby code.

### Control Flow

Avoid `else` statements. Prefer early returns.
- Prefer early returns over nested `else` blocks.
- Keep functions focused; split only when it improves reuse or readability.

### Error Handling

- Fail with actionable messages.
- Avoid swallowing errors silently.
- Log enough context to debug production issues (IDs, env, status), but never secrets.
- In UI code, degrade gracefully for missing capabilities.

### Data / DB

- For Drizzle schema, use snake_case fields and columns.
- Keep migration and schema changes minimal and explicit.
- Follow package-specific DB guidance in `packages/opencode/AGENTS.md`.

```ts
// Good
function foo() {
if (condition) return 1
return 2
}
### Testing Philosophy

// Bad
function foo() {
if (condition) return 1
else return 2
}
```
- Prefer testing real behavior over mocks.
- Add regression tests for bug fixes where practical.
- Keep fixtures small and focused.

### Schema Definitions (Drizzle)
## Agent Workflow Tips

Use snake_case for field names so column names don't need to be redefined as strings.
- Read existing code paths before introducing new abstractions.
- Match local patterns first; do not impose a new style per file.
- If a package has its own `AGENTS.md`, review it before editing.
- For OpenCode Effect services, follow `packages/opencode/AGENTS.md` strictly.

```ts
// Good
const table = sqliteTable("session", {
id: text().primaryKey(),
project_id: text().notNull(),
created_at: integer().notNull(),
})
## Known Operational Notes

// Bad
const table = sqliteTable("session", {
id: text("id").primaryKey(),
projectID: text("project_id").notNull(),
createdAt: integer("created_at").notNull(),
})
```
- `packages/app/AGENTS.md` says: never restart app/server processes during that package's debugging workflow.
- `packages/app/AGENTS.md` also documents local backend+web split for UI work.
- `packages/opencode/AGENTS.md` contains mandatory Effect and database conventions.

## Testing
## Regeneration / Special Scripts

- Avoid mocks as much as possible
- Test actual implementation, do not duplicate logic into tests
- Tests cannot run from repo root (guard: `do-not-run-tests-from-root`); run from package dirs like `packages/opencode`.
- Regenerate JS SDK with: `./packages/sdk/js/script/build.ts`

## Type Checking
## Quick Checklist Before Finishing

- Always run `bun typecheck` from package directories (e.g., `packages/opencode`), never `tsc` directly.
- Ran relevant package checks.
- Updated docs/config when behavior changed.
- Avoided committing unrelated files.
- Kept edits minimal and aligned with local conventions.
Loading
Loading