Skip to content

Commit 440e2c4

Browse files
committed
chore: initial OSS release
0 parents  commit 440e2c4

269 files changed

Lines changed: 31334 additions & 0 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.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
name: Bug report
3+
about: Report something that isn’t working
4+
labels: bug
5+
---
6+
7+
## Summary
8+
9+
## Steps to reproduce
10+
11+
## Expected behavior
12+
13+
## Actual behavior
14+
15+
## Environment
16+
- macOS:
17+
- Xcode:
18+
- iOS device / simulator:
19+
- `oc-pocket` version:
20+
- `opencode` version:
21+
- Connection mode (Tailscale / Local Network / Localhost):
22+
23+
## Logs (optional)
24+
If safe to share, include relevant output (please redact tokens/pairing payloads and private URLs).
25+

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
blank_issues_enabled: true
2+
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea or improvement
4+
labels: enhancement
5+
---
6+
7+
## Problem / use case
8+
9+
## Proposed solution
10+
11+
## Alternatives considered
12+
13+
## Additional context
14+

.github/pull_request_template.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
## Summary
2+
3+
## Testing
4+
- [ ] `./gradlew :composeApp:jvmTest`
5+
- [ ] `./gradlew :composeApp:compileKotlinIosSimulatorArm64`
6+
- [ ] `xcodebuild -project iosApp/iosApp.xcodeproj -scheme iosApp -configuration Debug -destination 'generic/platform=iOS Simulator' build`
7+
- [ ] `cd companion/oc-pocket && go test ./...`
8+
9+
## Screenshots / recordings (UI changes)
10+
11+
## Notes
12+

.github/workflows/ci.yml

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- main
8+
9+
concurrency:
10+
group: ci-${{ github.ref }}
11+
cancel-in-progress: true
12+
13+
jobs:
14+
kmp:
15+
name: KMP (tests + iOS compile)
16+
# GitHub-hosted runners are billed for private repos; if billing is disabled/blocked,
17+
# jobs never start. Keep CI triggers enabled but skip all jobs until the repo is public.
18+
if: ${{ !github.event.repository.private }}
19+
runs-on: macos-latest
20+
timeout-minutes: 30
21+
steps:
22+
- uses: actions/checkout@v4
23+
24+
- uses: actions/setup-java@v4
25+
with:
26+
distribution: temurin
27+
java-version: "21"
28+
29+
- uses: gradle/actions/setup-gradle@v4
30+
31+
- name: KMP tests + iOS compile
32+
run: |
33+
./gradlew :composeApp:jvmTest :composeApp:compileKotlinIosSimulatorArm64
34+
35+
ios:
36+
name: iOS (simulator build)
37+
if: ${{ !github.event.repository.private }}
38+
runs-on: macos-latest
39+
timeout-minutes: 45
40+
steps:
41+
- uses: actions/checkout@v4
42+
43+
- uses: actions/setup-java@v4
44+
with:
45+
distribution: temurin
46+
java-version: "21"
47+
48+
- uses: gradle/actions/setup-gradle@v4
49+
50+
- name: Xcode version
51+
run: xcodebuild -version
52+
53+
- name: Build (iOS Simulator)
54+
run: |
55+
xcodebuild \
56+
-project iosApp/iosApp.xcodeproj \
57+
-scheme iosApp \
58+
-configuration Debug \
59+
-destination 'generic/platform=iOS Simulator' \
60+
build
61+
62+
oc-pocket:
63+
name: oc-pocket (go test)
64+
if: ${{ !github.event.repository.private }}
65+
runs-on: macos-latest
66+
timeout-minutes: 15
67+
steps:
68+
- uses: actions/checkout@v4
69+
70+
- uses: actions/setup-go@v5
71+
with:
72+
go-version-file: companion/oc-pocket/go.mod
73+
cache: true
74+
75+
- name: Go tests
76+
run: |
77+
cd companion/oc-pocket
78+
go test ./...
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: Release oc-pocket
2+
3+
on:
4+
push:
5+
tags:
6+
- "oc-pocket-v*"
7+
workflow_dispatch:
8+
inputs:
9+
tag:
10+
description: "Tag to build (e.g. oc-pocket-v0.1.0)"
11+
required: true
12+
type: string
13+
14+
permissions:
15+
contents: write
16+
17+
jobs:
18+
build:
19+
name: Build and publish (macOS)
20+
# GitHub-hosted runners are billed for private repos. Allow manual release builds while private,
21+
# and run automatically on tag pushes once the repo is public.
22+
if: ${{ github.event_name == 'workflow_dispatch' || !github.event.repository.private }}
23+
runs-on: macos-latest
24+
timeout-minutes: 20
25+
steps:
26+
- uses: actions/checkout@v4
27+
with:
28+
ref: ${{ github.event_name == 'workflow_dispatch' && inputs.tag || github.ref }}
29+
30+
- uses: actions/setup-go@v5
31+
with:
32+
go-version-file: companion/oc-pocket/go.mod
33+
cache: true
34+
35+
- name: Build universal binary
36+
run: |
37+
set -euo pipefail
38+
cd companion/oc-pocket
39+
40+
ref_name="${GITHUB_REF_NAME}"
41+
if [ "${GITHUB_EVENT_NAME}" = "workflow_dispatch" ]; then
42+
ref_name="${{ inputs.tag }}"
43+
fi
44+
45+
version="${ref_name#oc-pocket-}"
46+
47+
rm -rf dist
48+
mkdir -p dist
49+
50+
CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build -trimpath -ldflags "-s -w" -o dist/oc-pocket-darwin-arm64 .
51+
CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -trimpath -ldflags "-s -w" -o dist/oc-pocket-darwin-amd64 .
52+
53+
lipo -create -output dist/oc-pocket dist/oc-pocket-darwin-arm64 dist/oc-pocket-darwin-amd64
54+
chmod +x dist/oc-pocket
55+
56+
tar -C dist -czf "dist/oc-pocket-${version}-darwin-universal.tar.gz" oc-pocket
57+
# Write checksum with a filename relative to the download directory (no "dist/" prefix),
58+
# so users can run: shasum -a 256 -c oc-pocket-<version>-darwin-universal.tar.gz.sha256
59+
(cd dist && shasum -a 256 "oc-pocket-${version}-darwin-universal.tar.gz" > "oc-pocket-${version}-darwin-universal.tar.gz.sha256")
60+
61+
- name: Publish release assets
62+
uses: softprops/action-gh-release@v2
63+
with:
64+
tag_name: ${{ github.event_name == 'workflow_dispatch' && inputs.tag || github.ref_name }}
65+
files: |
66+
companion/oc-pocket/dist/oc-pocket-*-darwin-universal.tar.gz
67+
companion/oc-pocket/dist/oc-pocket-*-darwin-universal.tar.gz.sha256

.gitignore

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# Gradle
2+
.gradle/
3+
build/
4+
5+
# IDE
6+
.idea/
7+
*.iml
8+
.DS_Store
9+
10+
# Kotlin
11+
*.class
12+
*.jar
13+
*.war
14+
*.nar
15+
*.ear
16+
*.zip
17+
*.tar.gz
18+
*.rar
19+
!gradle/wrapper/gradle-wrapper.jar
20+
21+
# Local configuration
22+
local.properties
23+
*.local
24+
25+
# Xcode
26+
iosApp/iosApp.xcodeproj/project.xcworkspace/
27+
iosApp/iosApp.xcodeproj/xcuserdata/
28+
iosApp/*.xcuserstate
29+
DerivedData/
30+
iosApp/.derivedData-run/
31+
*.xccheckout
32+
*.moved-aside
33+
*.pbxuser
34+
!default.pbxuser
35+
*.mode1v3
36+
!default.mode1v3
37+
*.mode2v3
38+
!default.mode2v3
39+
*.perspectivev3
40+
!default.perspectivev3
41+
xcuserdata/
42+
*.xcscmblueprint
43+
*.xccheckout
44+
45+
# CocoaPods
46+
iosApp/Pods/
47+
iosApp/Podfile.lock
48+
49+
# Android
50+
*.apk
51+
*.aab
52+
*.ap_
53+
*.dex
54+
55+
# Compose
56+
.kotlin/
57+
58+
# AI artifacts (multi-model workflows)
59+
docs/ai/
60+
.ai/plans/*
61+
62+
# oc-pocket build output
63+
companion/oc-pocket/bin/
64+
65+
# oc-pocket release/build artifacts
66+
companion/oc-pocket/dist/

AGENTS.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Repository Guidelines
2+
3+
## Project Structure & Module Organization
4+
5+
- **Reference repo (read-only):** OpenCode lives at `<PATH_TO_OPENCODE_REPO>` (do not modify). This project is building an **iOS app equivalent of OpenCode’s frontend TUI**, so use the TUI sources under `packages/opencode/src/cli/cmd/tui/` as the main UX/feature reference.
6+
7+
- `composeApp/`: Kotlin Multiplatform shared code (networking, domain models, repositories, shared ViewModels). iOS ships this as the static framework `ComposeApp` (SKIE enabled).
8+
- `composeApp/src/commonMain/...`: cross-platform Kotlin source
9+
- `composeApp/src/iosMain/...`: iOS bridges (Swift/Kotlin interop, share-extension hooks)
10+
- `composeApp/src/jvmTest/...`: JVM unit tests for shared logic
11+
- `iosApp/`: native iOS app and extensions
12+
- `iosApp/iosApp/`: SwiftUI app + some UIKit chat components
13+
- `iosApp/OCMobileShareExtension/`: Share Extension
14+
- `iosApp/iosAppTests/`: XCTest tests (run from Xcode)
15+
- `companion/`: macOS companion CLI (`oc-pocket`)
16+
17+
Notes:
18+
- Local planning notes live in gitignored folders (e.g. `docs/ai/`, `.ai/plans/`).
19+
20+
## Build, Test, and Development Commands
21+
22+
- iOS (Xcode): `open iosApp/iosApp.xcodeproj` then build/run the `iosApp` scheme.
23+
- Kotlin (iOS compile): `./gradlew :composeApp:compileKotlinIosSimulatorArm64`
24+
- Kotlin framework (simulator): `./gradlew :composeApp:linkDebugFrameworkIosSimulatorArm64`
25+
- Shared Kotlin unit tests (JVM): `./gradlew :composeApp:jvmTest`
26+
27+
## Coding Style & Naming Conventions
28+
29+
- Kotlin: 4-space indentation; `PascalCase` for types, `camelCase` for functions/properties, `UPPER_SNAKE_CASE` for constants.
30+
- Swift: follow existing SwiftUI/UIKit patterns in `iosApp/iosApp/`; keep diffs small and consistent (no formatter is enforced in-repo).
31+
- Prefer explicit names over abbreviations; avoid cross-layer leakage (UI ↔ data).
32+
33+
## Testing Guidelines
34+
35+
- Kotlin tests: place in `composeApp/src/jvmTest/kotlin/**`, name files `*Test.kt`.
36+
- iOS tests: place in `iosApp/iosAppTests`, use XCTest conventions (`*Tests.swift`), run via Xcode test actions.
37+
38+
## Commit & Pull Request Guidelines
39+
40+
- Git history may be empty on some branches; use a consistent convention going forward (recommended: Conventional Commits like `feat: …`, `fix: …`, `chore: …`).
41+
- PRs: include a short description, testing notes (commands run), and screenshots/screen recordings for UI changes. Link the issue/ticket when applicable.
42+
43+
## Configuration & Security Tips
44+
45+
- API endpoints are currently hard-coded in `composeApp/src/commonMain/kotlin/com/ratulsarna/ocmobile/data/api/ApiConfig.kt`; update for your environment and avoid committing secrets.
46+
*** End Patch

CHANGELOG.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
This project is pre-1.0 and may change rapidly.
6+
7+
## Unreleased
8+
9+
- (Add changes here)
10+
11+
## oc-pocket v0.1.6 (2026-01-11)
12+
13+
- Rename iOS app to **OpenCode Pocket**
14+
- Rename companion CLI from `oc-mobile``oc-pocket`
15+
- Rename repo slug references `opencode-mobile``opencode-pocket`
16+
17+
### Breaking changes
18+
19+
- Pairing strings and deep links now use `oc-pocket-*` prefixes (replaces `oc-mobile-*`)
20+
- Installer tag prefix is now `oc-pocket-v*` (replaces `oc-mobile-v*`)

CODE_OF_CONDUCT.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Code of Conduct
2+
3+
This project follows the **Contributor Covenant Code of Conduct**.
4+
5+
## Our pledge
6+
7+
We pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
8+
9+
## Our standards
10+
11+
Examples of behavior that contributes to a positive environment:
12+
13+
- Being respectful and considerate
14+
- Accepting constructive feedback
15+
- Focusing on what’s best for the community
16+
17+
Examples of unacceptable behavior:
18+
19+
- Harassment, insults, or discriminatory language
20+
- Publishing others’ private information
21+
- Trolling or personal attacks
22+
23+
## Enforcement
24+
25+
If you experience or witness unacceptable behavior, please report it by opening a GitHub issue and tagging it clearly as **CoC**. If the issue contains sensitive details, use GitHub’s **private security advisory** flow instead.
26+
27+
Project maintainers are responsible for clarifying standards and enforcing this Code of Conduct.
28+
29+
## Attribution
30+
31+
This Code of Conduct is adapted from the Contributor Covenant, version 2.1:
32+
<https://www.contributor-covenant.org/version/2/1/code_of_conduct.html>

0 commit comments

Comments
 (0)