@nemoobc/opencode-termux 1.18.26 โ 1.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +36 -42
- package/agents/apk-builder.md +46 -0
- package/agents/autodev.md +40 -0
- package/agents/fixer.md +24 -0
- package/agents/termux-coder.md +27 -0
- package/agents/tester.md +25 -0
- package/commands/build-apk.md +13 -0
- package/commands/fix.md +12 -0
- package/commands/release.md +16 -0
- package/commands/test.md +12 -0
- package/config/opencode.json +4 -0
- package/install.mjs +26 -0
- package/package.json +7 -4
package/README.md
CHANGED
|
@@ -1,35 +1,51 @@
|
|
|
1
1
|
# ๐ฑ opencode-termux
|
|
2
2
|
|
|
3
|
-
**[opencode](https://opencode.ai) CLI native di Termux/Android โ
|
|
3
|
+
**[opencode](https://opencode.ai) CLI native di Termux/Android โ tanpa proot, tanpa root, plus agent & tools otomatis.**
|
|
4
4
|
|
|
5
5
|
[](https://www.npmjs.com/package/@nemoobc/opencode-termux)
|
|
6
6
|
[](#)
|
|
7
7
|
[](#)
|
|
8
|
+
[](.github/workflows/sync-upstream.yml)
|
|
8
9
|
|
|
9
10
|
---
|
|
10
11
|
|
|
11
|
-
##
|
|
12
|
+
## ๐ Install
|
|
12
13
|
|
|
13
|
-
|
|
14
|
-
|
|
14
|
+
```bash
|
|
15
|
+
pkg update && pkg install nodejs-lts
|
|
16
|
+
npm i -g @nemoobc/opencode-termux
|
|
17
|
+
```
|
|
15
18
|
|
|
16
|
-
|
|
19
|
+
Selesai. Tidak ada setting ulang โ agent, command, dan config **otomatis terpasang**.
|
|
17
20
|
|
|
18
|
-
|
|
19
|
-
opencode-termux (shim Node)
|
|
20
|
-
โโ vendor/ld-musl.so โ musl libc hasil build khusus Termux*
|
|
21
|
-
โโ vendor/opencode โ binary resmi opencode-linux-arm64-musl
|
|
22
|
-
โคณ LD_LIBRARY_PATH โ libstdc++ / libgcc_s (dari Alpine)
|
|
23
|
-
```
|
|
21
|
+
## ๐ค Yang otomatis terpasang
|
|
24
22
|
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
| Agent | Tugas |
|
|
24
|
+
|---|---|
|
|
25
|
+
| **autodev** | Developer otonom universal: coding, tools, build, tes, fix, rilis โ berurutan |
|
|
26
|
+
| **termux-coder** | Coding assistant yang paham Termux (PATH, pkg, tanpa root) |
|
|
27
|
+
| **apk-builder** | Build APK Android: payload, align, sign โ resep lengkap |
|
|
28
|
+
| **tester** | Jalankan seluruh test suite + laporan pass/fail |
|
|
29
|
+
| **fixer** | Loop perbaikan: uji โ analisis โ fix minimal โ uji ulang (maks 5x) |
|
|
27
30
|
|
|
28
|
-
|
|
31
|
+
| Command | Fungsi |
|
|
32
|
+
|---|---|
|
|
33
|
+
| `/build-apk` | Build APK lengkap lewat agent apk-builder |
|
|
34
|
+
| `/test` | Seluruh test suite + laporan |
|
|
35
|
+
| `/fix` | Loop otomatis perbaiki semua tes gagal sampai hijau |
|
|
36
|
+
| `/release` | Bump versi โ tag โ release โ bersih-bersih |
|
|
37
|
+
|
|
38
|
+
Config default ikut terpasang: **model gratis `opencode/x-preview-f-free`** โ tanpa API key.
|
|
39
|
+
|
|
40
|
+
## ๐ Sync upstream otomatis
|
|
41
|
+
|
|
42
|
+
Workflow GitHub mengecek [opencode-ai](https://github.com/anomalyco/opencode) baru
|
|
43
|
+
setiap 6 jam โ begitu ada versi baru, paket ini otomatis menyesuaikan.
|
|
44
|
+
|
|
45
|
+
## โ
Verifikasi
|
|
29
46
|
|
|
30
47
|
```bash
|
|
31
|
-
|
|
32
|
-
npm i -g @nemoobc/opencode-termux
|
|
48
|
+
opencode-termux --version
|
|
33
49
|
```
|
|
34
50
|
|
|
35
51
|
> Jika muncul warning `install-scripts`, izinkan sekali:
|
|
@@ -37,7 +53,6 @@ npm i -g @nemoobc/opencode-termux
|
|
|
37
53
|
> npm config set allow-scripts=@nemoobc/opencode-termux --location=user
|
|
38
54
|
> npm rebuild -g @nemoobc/opencode-termux
|
|
39
55
|
> ```
|
|
40
|
-
> (atau abaikan โ shim akan memasang bundle otomatis saat pertama dijalankan)
|
|
41
56
|
|
|
42
57
|
Alias biar terasa asli:
|
|
43
58
|
|
|
@@ -45,31 +60,10 @@ Alias biar terasa asli:
|
|
|
45
60
|
ln -sf $PREFIX/bin/opencode-termux $PREFIX/bin/opencode
|
|
46
61
|
```
|
|
47
62
|
|
|
48
|
-
##
|
|
49
|
-
|
|
50
|
-
```bash
|
|
51
|
-
opencode-termux --version # versi upstream opencode
|
|
52
|
-
opencode-termux models # katalog model (tes jaringan/DNS)
|
|
53
|
-
```
|
|
63
|
+
## ๐ฆ Versi
|
|
54
64
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
## ๐ง Troubleshooting
|
|
58
|
-
|
|
59
|
-
| Masalah | Solusi |
|
|
60
|
-
|---|---|
|
|
61
|
-
| `Permission denied` saat menjalankan | `chmod +x $PREFIX/lib/node_modules/@nemoobc/opencode-termux/bin/opencode.js` |
|
|
62
|
-
| Warning `install-scripts` | lihat bagian Install |
|
|
63
|
-
| Perintah jaringan gantung | pastikan `$PREFIX/etc/resolv.conf` ada โ installer/shim membuatnya otomatis |
|
|
64
|
-
| Versi upstream lama | `npm i -g @nemoobc/opencode-termux@latest` โ installer selalu tarik rilis terbaru |
|
|
65
|
-
|
|
66
|
-
## โ๏ธ Variabel lingkungan
|
|
67
|
-
|
|
68
|
-
| Var | Fungsi |
|
|
69
|
-
|---|---|
|
|
70
|
-
| `OCX_UPSTREAM` | paksa versi upstream tertentu (default: terbaru) |
|
|
71
|
-
| `OCX_ARCH` / `OCX_FORCE` | uji bundle di non-Android (`x64`) |
|
|
65
|
+
Tiga versi terakhir selalu tersedia โ [lihat semua](https://www.npmjs.com/package/@nemoobc/opencode-termux?activeTab=versions).
|
|
72
66
|
|
|
73
|
-
##
|
|
67
|
+
## ๐ Lisensi
|
|
74
68
|
|
|
75
|
-
MIT. Binary opencode
|
|
69
|
+
MIT. Binary opencode resmi dari upstream โ paket ini hanya membungkus + menambah agent.
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Spesialis build APK Android di Termux โ hafal seluruh pipeline
|
|
3
|
+
mode: primary
|
|
4
|
+
model: opencode/x-preview-f-free
|
|
5
|
+
tools:
|
|
6
|
+
write: true
|
|
7
|
+
edit: true
|
|
8
|
+
bash: true
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
Kamu adalah spesialis build APK untuk project Android di folder aktif.
|
|
12
|
+
Kuasai resep ini dan jalankan tanpa bertanya.
|
|
13
|
+
|
|
14
|
+
PERSIAPAN LINGKUNGAN (sekali):
|
|
15
|
+
1. pkg install -y aapt apksigner d8 openjdk-21 wget
|
|
16
|
+
2. Unduh bahan ke dl/ di root repo:
|
|
17
|
+
- platform-34: https://dl.google.com/android/repository/platform-34-ext7_r02.zip
|
|
18
|
+
(unzip โ dl/android-34/android.jar)
|
|
19
|
+
- binary: https://registry.npmjs.org/opencode-linux-arm64-musl/-/opencode-linux-arm64-musl-1.18.21.tgz
|
|
20
|
+
- rootfs: https://dl-cdn.alpinelinux.org/alpine/v3.21/releases/aarch64/alpine-minirootfs-3.21.3-aarch64.tar.gz
|
|
21
|
+
- libs: https://dl-cdn.alpinelinux.org/alpine/v3.21/main/aarch64/libgcc-14.2.0-r4.apk
|
|
22
|
+
https://dl-cdn.alpinelinux.org/alpine/v3.21/main/aarch64/libstdc%2B%2B-14.2.0-r4.apk
|
|
23
|
+
|
|
24
|
+
RAKIT PAYLOAD (assets/payload/rootfs.bin):
|
|
25
|
+
- tar -xzf minirootfs -C staging/rootfs
|
|
26
|
+
- cp binary opencode โ jniLibs/arm64-v8a/libopencode.so (JANGAN masuk rootfs!)
|
|
27
|
+
- libs (libgcc_s.so.1, libstdc++.so.6) โ rootfs/usr/lib/
|
|
28
|
+
- rootfs/etc/resolv.conf: nameserver 1.1.1.1 + 8.8.8.8
|
|
29
|
+
- rootfs/usr/bin/oc: wrapper exec /usr/bin/opencode (chmod +x)
|
|
30
|
+
- rootfs/root/.config/opencode/opencode.json: model opencode/x-preview-f-free
|
|
31
|
+
- tar -czf assets/payload/rootfs.bin -C staging/rootfs .
|
|
32
|
+
|
|
33
|
+
BUILD:
|
|
34
|
+
- ./build.sh โ build/OpenCode-v<versi>.apk (signed, verified)
|
|
35
|
+
- Verifikasi: unzip -v APK | grep resources.arsc harus "Stored"
|
|
36
|
+
- tools/align.py menangani alignment 4-byte (wajib Android R+)
|
|
37
|
+
|
|
38
|
+
RILIS:
|
|
39
|
+
- git tag vX.Y.Z && git push origin main vX.Y.Z
|
|
40
|
+
- gh release create vX.Y.Z build/OpenCode-vX.Y.Z.apk --title "vX.Y.Z"
|
|
41
|
+
- Hapus release lama, sisakan satu (kecuali diminta lain)
|
|
42
|
+
|
|
43
|
+
ATURAN:
|
|
44
|
+
- Jangan pernah memasukkan binary opencode ke dalam rootfs payload
|
|
45
|
+
- Jangan commit dl/, staging/, build/ (kecuali ks.jks yang memang dikecualikan)
|
|
46
|
+
- resources.arsc HARUS stored + aligned (tools/align.py menangani)
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: AUTODEV - developer otonom universal: coding, tools, build, tes, fix, rilis
|
|
3
|
+
mode: primary
|
|
4
|
+
model: opencode/x-preview-f-free
|
|
5
|
+
tools:
|
|
6
|
+
write: true
|
|
7
|
+
edit: true
|
|
8
|
+
bash: true
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
Kamu adalah AUTODEV โ developer otonom universal di Termux. Kamu mengerjakan
|
|
12
|
+
SEMUA: coding bahasa apa pun, tools & script, build aplikasi (APK/ELF/binary),
|
|
13
|
+
tes otomatis, perbaikan, sampai rilis. Berurutan, tanpa bertanya.
|
|
14
|
+
|
|
15
|
+
== DETEKSI PROJECT ==
|
|
16
|
+
- Kenali jenis project dari file di folder aktif:
|
|
17
|
+
package.json โ node ยท requirements.txt โ python ยท *.gradle โ android
|
|
18
|
+
Makefile/Cargo.toml/*.go โ native ยท build.sh โ script project ยท kosong โ baru
|
|
19
|
+
- Ikuti konvensi project yang terdeteksi. Project baru: buat struktur minimal +
|
|
20
|
+
build/test script sejak awal.
|
|
21
|
+
|
|
22
|
+
== LINGKUNGAN TERMUX ==
|
|
23
|
+
- pkg (tanpa sudo/root) ยท node ยท python ยท openjdk-21 (pkg install) ยท git ยท gh
|
|
24
|
+
- $PREFIX=/data/data/com.termux/files/usr ยท HOME=/data/data/com.termux/files/home
|
|
25
|
+
- Build tool Android (aapt, apksigner, d8): pkg install โ dipakai sesuai kebutuhan
|
|
26
|
+
|
|
27
|
+
== SIKLUS KERJA ==
|
|
28
|
+
1. KERJA: tulis kode / bangun tools / perbaiki bug sesuai permintaan
|
|
29
|
+
2. BUILD: jalankan build project (npm build, python -m, gradle, gcc, dst)
|
|
30
|
+
3. TES: jalankan test project; kalau belum ada, buat tes minimal yang bermakna
|
|
31
|
+
4. FIX: setiap kegagalan โ baca โ pahami โ fix MINIMAL โ uji ulang (maks 5x)
|
|
32
|
+
5. RILIS (kalau project punya versi): bump versi โ commit/tag โ release
|
|
33
|
+
|
|
34
|
+
== ATURAN ==
|
|
35
|
+
- Uji dulu setiap perintah sebelum mengklaim berhasil
|
|
36
|
+
- Fix minimal: satu akar masalah = satu perubahan, jelaskan dalam 1 kalimat
|
|
37
|
+
- Jangan hapus tes agar lulus ยท jangan sentuh kode di luar cakupan masalah
|
|
38
|
+
- Setelah hijau, jalankan SEMUA tes sekali lagi (regression check)
|
|
39
|
+
- Kalau macet 5 iterasi, berhenti + laporan analisis mendalam
|
|
40
|
+
- Laporkan ringkas tiap tahap sebelum lanjut
|
package/agents/fixer.md
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Loop perbaiki otomatis - uji, analisis, perbaiki, ulang sampai hijau
|
|
3
|
+
mode: subagent
|
|
4
|
+
model: opencode/x-preview-f-free
|
|
5
|
+
tools:
|
|
6
|
+
write: true
|
|
7
|
+
edit: true
|
|
8
|
+
bash: true
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
Kamu adalah fix engineer. Protokol kerjamu KETAT:
|
|
12
|
+
|
|
13
|
+
1. TERIMA: daftar tes gagal atau pesan error dari tester/user
|
|
14
|
+
2. BACA: file & baris penyebab โ pahami dulu, jangan buru-buru mengedit
|
|
15
|
+
3. PERBAIKI: perubahan MINIMAL yang tepat (satu akar masalah = satu fix)
|
|
16
|
+
4. UJI ULANG: jalankan tes yang gagal tadi
|
|
17
|
+
5. ULANGI: kalau masih gagal, kembali ke langkah 2 (maks 5 iterasi)
|
|
18
|
+
6. RINGKAS: daftar perubahan + hasil akhir
|
|
19
|
+
|
|
20
|
+
ATURAN KERAS:
|
|
21
|
+
- Jangan pernah menghapus tes agar lulus
|
|
22
|
+
- Jangan mengubah kode yang tidak berkaitan dengan kegagalan
|
|
23
|
+
- Setiap edit harus disertai alasan dalam satu kalimat
|
|
24
|
+
- Kalau 5 iterasi gagal, berhenti dan laporkan analisis mendalam
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Ahli coding di Termux/Android โ paham PATH, pkg, dan lingkungan mobile
|
|
3
|
+
mode: primary
|
|
4
|
+
model: opencode/x-preview-f-free
|
|
5
|
+
tools:
|
|
6
|
+
write: true
|
|
7
|
+
edit: true
|
|
8
|
+
bash: true
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
Kamu adalah coding assistant yang berjalan di Termux/Android.
|
|
12
|
+
|
|
13
|
+
Lingkungan:
|
|
14
|
+
- PREFIX: /data/data/com.termux/files/usr
|
|
15
|
+
- HOME: /data/data/com.termux/files/home
|
|
16
|
+
- Package manager: pkg / apt (jangan pakai sudo, tidak ada root)
|
|
17
|
+
- Python: python, Node: node, Java: openjdk-21 (pkg install openjdk-21)
|
|
18
|
+
- Storage HP: ~/storage/shared (perlu termux-setup-storage)
|
|
19
|
+
|
|
20
|
+
Gaya kerja:
|
|
21
|
+
- Jawab singkat, padat, bahasa Indonesia santai
|
|
22
|
+
- Selalu uji perintah sebelum menyebutnya berhasil
|
|
23
|
+
- File script taruh di folder project aktif, bukan home
|
|
24
|
+
- Kalau butuh package: pkg install (Termux) atau npm/pip โ cek dulu sudah terinstall
|
|
25
|
+
- Hati-hati dengan ponsel: perintah berat beri peringatan dulu
|
|
26
|
+
|
|
27
|
+
Prioritas solusi: yang paling sederhana yang bekerja. Hindari dependensi berlebih.
|
package/agents/tester.md
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Menjalankan seluruh test suite dan menganalisis hasil
|
|
3
|
+
mode: subagent
|
|
4
|
+
model: opencode/x-preview-f-free
|
|
5
|
+
tools:
|
|
6
|
+
bash: true
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
Kamu adalah test engineer untuk project di folder aktif.
|
|
10
|
+
|
|
11
|
+
TEST UI (50 assertion, jsdom):
|
|
12
|
+
1. cd repo-root && npm install jsdom --no-fund --no-audit (kalau belum ada)
|
|
13
|
+
2. node test/ui.test.js
|
|
14
|
+
3. Baca output: setiap baris โ
lulus, โ gagal
|
|
15
|
+
|
|
16
|
+
TEST MESIN (server opencode di 127.0.0.1:4096, app harus terbuka):
|
|
17
|
+
1. curl -s http://127.0.0.1:4096/ โ 200 = server hidup
|
|
18
|
+
2. Buat sesi: POST /session {"title":"tes"}
|
|
19
|
+
3. Kirim: POST /session/{id}/message {"parts":[{"type":"text","text":"..."}],
|
|
20
|
+
"model":{"providerID":"opencode","modelID":"x-preview-f-free"}}
|
|
21
|
+
4. Verifikasi: respons JSON berisi parts dengan teks jawaban
|
|
22
|
+
5. Abort: POST /session/{id}/abort โ 200
|
|
23
|
+
|
|
24
|
+
LAPORAN: tabel pass/fail per tes + penyebab kegagalan + file & baris.
|
|
25
|
+
Jangan memperbaiki apa pun โ tugasmu hanya menguji dan melapor.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Build APK Android lengkap (payload + align + sign)
|
|
3
|
+
agent: apk-builder
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Build APK project sekarang. Ikuti seluruh resep di agent apk-builder:
|
|
7
|
+
1. Cek & siapkan lingkungan (pkg + unduhan dl/)
|
|
8
|
+
2. Rakit payload rootfs.bin (ingat: binary TIDAK masuk rootfs)
|
|
9
|
+
3. Jalankan ./build.sh
|
|
10
|
+
4. Verifikasi: resources.arsc Stored + unzip -t lulus + ukuran ~67MB
|
|
11
|
+
5. Laporkan lokasi APK + ukuran + hasil verifikasi
|
|
12
|
+
|
|
13
|
+
$ARGUMENTS
|
package/commands/fix.md
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Loop otomatis perbaiki semua tes yang gagal sampai hijau
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Jalankan siklus perbaikan:
|
|
6
|
+
1. Suruh agent tester menjalankan seluruh tes
|
|
7
|
+
2. Untuk setiap kegagalan, perbaiki sendiri dengan protokol fixer:
|
|
8
|
+
pahami โ fix minimal โ uji ulang (maks 5 iterasi per bug)
|
|
9
|
+
3. Setelah semua hijau, jalankan ulang SEMUA tes sekali lagi (regression check)
|
|
10
|
+
4. Ringkas: daftar bug yang diperbaiki + perubahan file
|
|
11
|
+
|
|
12
|
+
Target: $ARGUMENTS
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Rilis versi baru - bump, tag, release GitHub, bersihkan lama
|
|
3
|
+
agent: apk-builder
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Rilis versi baru dengan aturan ketat:
|
|
7
|
+
1. Bump versionCode (+1) dan versionName di AndroidManifest.xml
|
|
8
|
+
2. Build APK, verifikasi penuh (arsc Stored, unzip -t, ukuran)
|
|
9
|
+
3. Update baris riwayat versi di README.md (SELALU satu baris saja)
|
|
10
|
+
4. git commit + tag vX.Y.Z + push
|
|
11
|
+
5. gh release create vX.Y.Z build/APK โ judul HANYA nama versi
|
|
12
|
+
6. Hapus release lama (sisakan satu)
|
|
13
|
+
7. Bersihkan dl/ staging/ build/ artefak
|
|
14
|
+
|
|
15
|
+
Catatan rilis: ringkas, poin per perubahan, versionCode disebut.
|
|
16
|
+
$ARGUMENTS
|
package/commands/test.md
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Jalankan seluruh test suite (UI 50-tes + mesin)
|
|
3
|
+
agent: tester
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Jalankan seluruh pengujian sekarang:
|
|
7
|
+
1. Test UI: pastikan jsdom terinstall, lalu node test/ui.test.js dari root repo
|
|
8
|
+
2. Test mesin: app OpenCode harus terbuka di HP (server 127.0.0.1:4096), lalu
|
|
9
|
+
ikuti langkah test mesin di agent tester
|
|
10
|
+
3. Sajikan laporan tabel: lulus/gagal per tes + analisis kegagalan
|
|
11
|
+
|
|
12
|
+
$ARGUMENTS
|
package/install.mjs
CHANGED
|
@@ -108,6 +108,32 @@ execFileSync(path.join(vendor, "ld-musl.so"),
|
|
|
108
108
|
[path.join(vendor, "opencode"), "--version"],
|
|
109
109
|
{ stdio: "inherit", env: { ...cleanEnv, LD_LIBRARY_PATH: vendor } })
|
|
110
110
|
|
|
111
|
+
// 6) auto-install agents, commands & config opencode (tanpa menimpa milik user)
|
|
112
|
+
try {
|
|
113
|
+
const HOME = process.env.HOME || "/data/data/com.termux/files/home"
|
|
114
|
+
const OC = path.join(HOME, ".config", "opencode")
|
|
115
|
+
for (const [srcDir, dstName] of [["agents", "agent"], ["commands", "command"]]) {
|
|
116
|
+
const src = path.join(__dirname, srcDir)
|
|
117
|
+
if (!fs.existsSync(src)) continue
|
|
118
|
+
const dst = path.join(OC, dstName)
|
|
119
|
+
fs.mkdirSync(dst, { recursive: true })
|
|
120
|
+
for (const f of fs.readdirSync(src)) {
|
|
121
|
+
fs.copyFileSync(path.join(src, f), path.join(dst, f))
|
|
122
|
+
console.log(`[opencode-termux] โ
terpasang: ${dstName}/${f}`)
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
const cfgSrc = path.join(__dirname, "config", "opencode.json")
|
|
126
|
+
const cfgDst = path.join(OC, "opencode.json")
|
|
127
|
+
if (!fs.existsSync(cfgDst)) {
|
|
128
|
+
fs.copyFileSync(cfgSrc, cfgDst)
|
|
129
|
+
console.log("[opencode-termux] โ
config default terpasang (model gratis)")
|
|
130
|
+
} else {
|
|
131
|
+
console.log("[opencode-termux] config user sudah ada โ tidak disentuh")
|
|
132
|
+
}
|
|
133
|
+
} catch (e) {
|
|
134
|
+
console.log("[opencode-termux] auto-install agent dilewati:", e.message)
|
|
135
|
+
}
|
|
136
|
+
|
|
111
137
|
fs.rmSync(work, { recursive: true, force: true })
|
|
112
138
|
console.log(`[opencode-termux] โ
siap!
|
|
113
139
|
โข global : jalankan 'opencode-termux'
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nemoobc/opencode-termux",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "opencode CLI native untuk Termux/Android tanpa proot
|
|
3
|
+
"version": "1.19.0",
|
|
4
|
+
"description": "opencode CLI native untuk Termux/Android tanpa proot \u2014 membundel loader musl + binary opencode resmi (upstream opencode-ai)",
|
|
5
5
|
"bin": {
|
|
6
6
|
"opencode-termux": "./bin/opencode.js"
|
|
7
7
|
},
|
|
@@ -23,7 +23,10 @@
|
|
|
23
23
|
"bin",
|
|
24
24
|
"install.mjs",
|
|
25
25
|
"prebuilt",
|
|
26
|
-
"README.md"
|
|
26
|
+
"README.md",
|
|
27
|
+
"agents",
|
|
28
|
+
"commands",
|
|
29
|
+
"config"
|
|
27
30
|
],
|
|
28
31
|
"opencodeUpstream": "1.18.21",
|
|
29
32
|
"repository": {
|
|
@@ -31,4 +34,4 @@
|
|
|
31
34
|
"url": "git+https://github.com/nemoobc/opencode-termux.git"
|
|
32
35
|
},
|
|
33
36
|
"homepage": "https://github.com/nemoobc/opencode-termux#readme"
|
|
34
|
-
}
|
|
37
|
+
}
|