docs: README and PLAN for the MyGo port; sign 0.3.0 release
- README describes the MyGo toolchain, the third_party fork's minSdk 24 patch, the cleartext rationale, and the release signing - PLAN.md records the Asuka 0.2 vs MyGo decision and the 0.3.0 status - mygo.json signs with the test keystore and sets an adaptive icon
This commit is contained in:
1 parent
6c0ee61750
commit
24a311f234
3 files changed
+70
-46
No files matched your search
@@ -1,29 +1,36 @@
|
||||
# OpenChamber Native
|
||||
|
||||
A lightweight OpenChamber client for phones, written in Go with
|
||||
[Asuka](https://asuka.egoist.dev/)'s native widgets. Android first.
|
||||
[MyGo](https://mygo.run/)'s native UI. Android first.
|
||||
|
||||
Status: 0.2.2 — multiple saved servers with a connect list (add, edit,
|
||||
delete, switch; password prompt; HTTP or SOCKS5 proxy and self-signed
|
||||
certificates per server), session search, live session list, chat with
|
||||
streaming Markdown, image and file attachments with inline previews, a
|
||||
context usage ring with a detail sheet, previews of images named by tool
|
||||
calls, permissions, model/agent switching, turn and prompt actions (copy,
|
||||
fork, revert, read aloud), new sessions, archive/delete/rename, the
|
||||
OpenChamber icon, and a UI-independent API client.
|
||||
Status: 0.3.0 — multiple saved servers with a connect list (add, edit,
|
||||
delete, switch; passwordless and password login; HTTP or SOCKS5 proxy and
|
||||
self-signed certificates per server), session search, live session list,
|
||||
chat with streaming Markdown, image and file attachments with inline
|
||||
previews, a context usage ring with a detail sheet, previews of images
|
||||
named by tool calls, permissions, model/agent switching, turn and prompt
|
||||
actions (copy, fork, revert, read aloud), new sessions,
|
||||
archive/delete/rename, the OpenChamber icon, and a UI-independent API
|
||||
client. Android 7.0 (API 24) and later.
|
||||
|
||||
## What is here
|
||||
|
||||
| Path | What |
|
||||
| --- | --- |
|
||||
| `internal/ocapi/` | OpenChamber HTTP client: auth (password → device token), sessions, messages, prompt/interrupt/model/agent, permissions, SSE events, HTTP/SOCKS5 proxy, certificate pinning |
|
||||
| `internal/storage/` | Saved servers in `asuka/sdk/store`, one device token per server in `asuka/sdk/secure` (Android Keystore), per-install id for device dedupe, migration from the single-server record |
|
||||
| `internal/appui/` | Screens: connect, sessions, chat (streaming Markdown, reasoning/tool folding, permissions) |
|
||||
| `internal/storage/` | Saved servers in `connections.json` (app data), one device token per server in `mygo.Secrets` (Android Keystore), per-install id for device dedupe |
|
||||
| `internal/appui/` | Screens: servers, sessions, chat (streaming Markdown via `ui/markdown`, reasoning/tool folding, permissions, context usage, previews) |
|
||||
| `internal/tts/` | A Kotlin TextToSpeech plugin (read-aloud), compiled into the app by `mygo build` |
|
||||
| `third_party/mygo/` | A small local fork of MyGo 0.10.0: its Android host's `minSdk` reads the `mygoMinSdk` property (24), and notifications are guarded for API < 26 |
|
||||
| `cmd/ocprobe/` | Terminal probe used to validate the API without a device |
|
||||
| `PLAN.md` | Research, API contract, architecture, milestones, risks |
|
||||
|
||||
## Run
|
||||
|
||||
MyGo requires **Go 1.27.3+**; install it with mise (`mise install go@1.27.4`),
|
||||
and make sure a stale `GOROOT` env var is not set. The `mygo` CLI is pinned as
|
||||
a Go tool in `go.mod` and builds from the local fork.
|
||||
|
||||
```bash
|
||||
# terminal probe against a running server
|
||||
go run ./cmd/ocprobe -url http://127.0.0.1:3000 health
|
||||
@@ -31,47 +38,34 @@ go run ./cmd/ocprobe -url http://127.0.0.1:3000 -limit 5 sessions
|
||||
go run ./cmd/ocprobe -url http://127.0.0.1:3000 -password secret sessions
|
||||
go run ./cmd/ocprobe -url http://127.0.0.1:3000 -seconds 20 events
|
||||
|
||||
# the app on this computer (browser / GTK window)
|
||||
asuka dev --platform web
|
||||
asuka dev
|
||||
|
||||
# headless tests, including the UI
|
||||
go test ./... -race
|
||||
```
|
||||
|
||||
`asuka` must be installed from `main`; the v0.1.1 release does not build on
|
||||
Linux:
|
||||
|
||||
```bash
|
||||
go install github.com/egoist/asuka/cmd/asuka@main
|
||||
```
|
||||
|
||||
## Android
|
||||
|
||||
The SDK lives at `~/SDK/AndroidSDK`, the JDKs at `~/SDK/jdk-21` (Gradle) and
|
||||
`~/SDK/jdk-17` (the Android toolchain; registered in
|
||||
`~/.gradle/gradle.properties` via `org.gradle.java.installations.paths`).
|
||||
The SDK lives at `~/SDK/AndroidSDK`, the JDK for Gradle at `~/SDK/jdk-21`.
|
||||
|
||||
```bash
|
||||
export PATH=$HOME/.local/share/mise/installs/go/1.27.4/bin:$PATH
|
||||
unset GOROOT
|
||||
export ANDROID_HOME=$HOME/SDK/AndroidSDK
|
||||
export JAVA_HOME=$HOME/SDK/jdk-21
|
||||
export PATH=$ANDROID_HOME/platform-tools:$ANDROID_HOME/emulator:$JAVA_HOME/bin:$PATH
|
||||
export PATH=$ANDROID_HOME/platform-tools:$JAVA_HOME/bin:$PATH
|
||||
|
||||
asuka dev --platform android --device emulator-5554 # hot reload
|
||||
asuka dev --platform android --once --no-vet # build in, launch once
|
||||
go tool mygo dev -platform android --device emulator-5554 # live reload
|
||||
|
||||
# release: a keystore is required
|
||||
export ASUKA_KEYSTORE=$HOME/SDK/test-upload.jks ASUKA_KEY_ALIAS=upload
|
||||
export ASUKA_KEYSTORE_PASSWORD=… ASUKA_KEY_PASSWORD=…
|
||||
asuka build --platform android # dist/OpenChamber.aab
|
||||
# release: dist/android/openchamber-0.3.0.apk and .aab
|
||||
export MYGO_ANDROID_KEYSTORE_PASSWORD=… MYGO_ANDROID_KEY_PASSWORD=…
|
||||
go tool mygo build -platform android
|
||||
```
|
||||
|
||||
`netcfg/` is a native module whose only job is the Android manifest: it merges
|
||||
`android:usesCleartextTraffic="true"` into **release** builds too, because
|
||||
self-hosted OpenChamber servers are often plain HTTP on a LAN. Asuka enables it
|
||||
for debug only. Delete the package (and its blank import in `main.go`) to
|
||||
require HTTPS everywhere.
|
||||
`android.minSdk` is 24 (Android 7.0). Release builds talk to plain `http://`
|
||||
LAN servers: the Go HTTP client dials sockets itself, so Android's cleartext
|
||||
policy (which applies to platform HTTP libraries) never sees the traffic —
|
||||
no manifest flag is needed. The local fork exists only to let the MyGo host
|
||||
build with `minSdk 24` (upstream pins 26) and to guard its notification code
|
||||
on API < 26.
|
||||
|
||||
Proxies are entered as `http://host:port` or `socks5://host:port`
|
||||
(no proxy authentication). Plain `http://` works in debug builds; the release
|
||||
cleartext policy is decided in M5 (see `PLAN.md`).
|
||||
The earlier Asuka version of this app lived on the `main` branch; this
|
||||
branch (`mygo`) is the 0.3 rewrite.
|
||||
Reference in new issue
Block a user