rempug 0.0.0-stage → 0.1.1
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/.claude-plugin/marketplace.json +14 -0
- package/.claude-plugin/plugin.json +6 -0
- package/.mcp.json +8 -0
- package/LICENSE +21 -0
- package/README.md +105 -2
- package/dist/src/cli.js +55 -0
- package/dist/src/commands.js +476 -0
- package/dist/src/core/agents.js +42 -0
- package/dist/src/core/bangun.js +21 -0
- package/dist/src/core/brief.js +91 -0
- package/dist/src/core/centang.js +34 -0
- package/dist/src/core/doctor.js +58 -0
- package/dist/src/core/errors.js +16 -0
- package/dist/src/core/git.js +35 -0
- package/dist/src/core/ledger.js +349 -0
- package/dist/src/core/paham.js +149 -0
- package/dist/src/core/probe.js +204 -0
- package/dist/src/core/profile.js +31 -0
- package/dist/src/core/registry.js +78 -0
- package/dist/src/core/reply.js +38 -0
- package/dist/src/core/report.js +206 -0
- package/dist/src/core/scan.js +58 -0
- package/dist/src/core/scope.js +103 -0
- package/dist/src/core/screen.js +74 -0
- package/dist/src/core/sections.js +25 -0
- package/dist/src/core/send.js +166 -0
- package/dist/src/core/tick.js +119 -0
- package/dist/src/core/tmux.js +33 -0
- package/dist/src/core/transport.js +48 -0
- package/dist/src/core/verify.js +308 -0
- package/dist/src/core/watch.js +51 -0
- package/dist/src/mcp.js +119 -0
- package/dist/src/runtime.js +31 -0
- package/hooks/hooks.json +15 -0
- package/package.json +63 -5
- package/skills/rempug/SKILL.md +107 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "rempug",
|
|
3
|
+
"owner": {
|
|
4
|
+
"name": "dianramdhani"
|
|
5
|
+
},
|
|
6
|
+
"plugins": [
|
|
7
|
+
{
|
|
8
|
+
"name": "rempug",
|
|
9
|
+
"source": "./",
|
|
10
|
+
"description": "Delegasi kerja dari agent orkestrator ke agent CLI lain lewat tmux, hemat token dan terverifikasi mesin."
|
|
11
|
+
}
|
|
12
|
+
],
|
|
13
|
+
"description": "Plugin rempug: delegasi kerja ke agent CLI lain lewat tmux."
|
|
14
|
+
}
|
package/.mcp.json
ADDED
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 rempug contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,106 @@
|
|
|
1
|
-
#
|
|
1
|
+
# rempug
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Delegasi kerja dari satu agent **orkestrator** (mis. Claude Code) ke agent CLI lain (Codex, Antigravity, opencode, Claude) yang berjalan di sesi **tmux**. Hemat token, terverifikasi mesin, dan tanpa file sampah di proyek.
|
|
4
|
+
|
|
5
|
+
Anda hanya mengetik `/rempug` sekali. Sesudah itu orkestrator mendelegasikan, menunggu, memverifikasi, mengulang, dan mengalihkan pekerjaan sendiri; Anda hanya menilai apakah hasil yang Anda minta sudah benar.
|
|
6
|
+
|
|
7
|
+
## Kenapa
|
|
8
|
+
|
|
9
|
+
- Membaca layar tmux mentah boros token dan rawan salah baca. Hasil kerja kembali lewat **perintah**, bukan lewat scrape layar.
|
|
10
|
+
- Agent berupa model murah, jadi klaim mereka tidak dipercaya. **rempug menghitung sendiri** file yang berubah, menjalankan cek penerimaan, dan mendeteksi commit diam-diam.
|
|
11
|
+
- Orkestrator tidak perlu diingatkan: `rempug watch` mendorong satu baris per kejadian, dengan kursor yang tersimpan sehingga tidak ada kejadian yang hilang.
|
|
12
|
+
- Semua status disimpan di satu berkas SQLite di luar repo. Tidak ada `tasks/`, `state/`, atau `evidence/` di proyek Anda.
|
|
13
|
+
|
|
14
|
+
## Kebutuhan
|
|
15
|
+
|
|
16
|
+
- Linux atau macOS (butuh `tmux`)
|
|
17
|
+
- Node.js 22.13 atau lebih baru (memakai `node:sqlite` bawaan, tanpa dependensi native)
|
|
18
|
+
|
|
19
|
+
## Pemasangan
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
npm i -g rempug
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Perintah `rempug` harus ada di PATH: hook sesi dan agent yang Anda delegasikan memanggilnya dari shell (`rempug doctor` memeriksanya). Lalu pasang skill dan server MCP untuk Claude Code, salah satunya:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
# A. Plugin: skill /rempug + server MCP + hook awal sesi sekaligus
|
|
29
|
+
claude plugin marketplace add dianramdhani/rempug
|
|
30
|
+
claude plugin install rempug@rempug
|
|
31
|
+
|
|
32
|
+
# B. Manual
|
|
33
|
+
rempug skill install
|
|
34
|
+
claude mcp add --scope user rempug -- rempug mcp
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Pasang salah satu saja, bukan keduanya. Mulai sesi Claude Code yang baru agar skill `/rempug` dan tool MCP-nya dimuat. Biaya tetap plugin sekitar 74 token per sesi; skema tool MCP baru dimuat penuh saat dipakai.
|
|
38
|
+
|
|
39
|
+
## Pemakaian
|
|
40
|
+
|
|
41
|
+
Siapkan sesi tmux dan jalankan agent di dalamnya (beserta apa pun yang perlu disiapkan, mis. sesi Playwright), lalu di orkestrator:
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
/rempug
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Orkestrator memindai tmux, menebak mana yang agent, bertanya **satu kali** untuk penamaan, lalu **mengukur** tiap agent (probe) dan menampilkan tabel kesiapan:
|
|
48
|
+
|
|
49
|
+
```
|
|
50
|
+
agy ✓ siap ack 1.8 dtk
|
|
51
|
+
codex ✓ siap ack 2.4 dtk
|
|
52
|
+
opencode ✗ tidak-andal teks tertahan di kotak input; 7 kombinasi dicoba
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Sesudahnya Anda cukup meminta hasil. Orkestrator memutuskan sendiri apa yang dibagi ke agent dan hanya melaporkan hasilnya: tujuan tercapai atau belum, bukti yang menentukan, dan keputusan yang butuh Anda. Hook awal sesi memulihkan status di sesi berikutnya, jadi `/rempug` tidak perlu diulang.
|
|
56
|
+
|
|
57
|
+
## Cara kerja
|
|
58
|
+
|
|
59
|
+
1. `send` memvalidasi **brief** (TUJUAN, CAKUPAN, LANGKAH, CEK, BALASAN), menolak cakupan yang beririsan dengan tugas edit lain, mengambil snapshot berkas, lalu mengetik **satu baris pointer** ke pane agent.
|
|
60
|
+
2. Agent menjalankan `rempug brief` (ini bukti pengiriman), mengonfirmasi pemahaman lewat `rempug paham`, bekerja, lalu `rempug reply`. Konfirmasi yang cocok dengan brief disetujui otomatis tanpa token orkestrator.
|
|
61
|
+
3. Verifikasi berjalan di proses terlepas: berkas yang berubah (+/−), perubahan di luar cakupan (hanya nama), cek penerimaan yang dijalankan rempug sendiri, dan commit atau pindah branch.
|
|
62
|
+
4. `watch` mencetak satu baris, mis. `T12 codex ✓ 3 file +41/−7 | scope OK | tsc ✓ vitest ✗(2)`.
|
|
63
|
+
|
|
64
|
+
Pemantau layar berjalan di dalam `watch`: mengulang pengiriman yang tertahan, melaporkan pertanyaan, prompt izin, dan limit, mengirim satu pengingat, lalu menyatakan agent macet. **Prompt izin tidak pernah dijawab otomatis.**
|
|
65
|
+
|
|
66
|
+
## Perintah
|
|
67
|
+
|
|
68
|
+
Untuk orkestrator: `scan`, `register`, `probe`, `ls`, `status`, `doctor`, `send`, `jawab`, `log`, `show`, `diff`, `report`, `layar`, `watch`, `terima`.
|
|
69
|
+
Untuk agent: `brief`, `paham`, `tunggu`, `reply`.
|
|
70
|
+
Semuanya juga tersedia sebagai tool MCP (`rempug mcp`), kecuali `watch`. Jalankan `rempug --help` untuk pemakaian lengkap.
|
|
71
|
+
|
|
72
|
+
## Konfigurasi
|
|
73
|
+
|
|
74
|
+
| Variabel | Fungsi | Bawaan |
|
|
75
|
+
|---|---|---|
|
|
76
|
+
| `XDG_STATE_HOME` | Lokasi ledger (`rempug/ledger.db`) | `~/.local/state` |
|
|
77
|
+
| `XDG_CONFIG_HOME` | Lokasi registry agent | `~/.config` |
|
|
78
|
+
| `REMPUG_RETENTION_DAYS` | Masa simpan tugas | 30 |
|
|
79
|
+
| `REMPUG_ACK_DETIK` | Batas menunggu agent membaca brief | 45 |
|
|
80
|
+
| `REMPUG_DIAM_DETIK` | Layar tidak berubah selama ini dianggap diam | 10 |
|
|
81
|
+
| `REMPUG_MACET_DETIK` | Diam selama ini tanpa balasan berarti macet | 120 |
|
|
82
|
+
| `REMPUG_WATCH_MS` | Selang `watch` | 1000 |
|
|
83
|
+
| `REMPUG_TMUX_SOCKET` | Memakai server tmux lain (`tmux -L`) | server bawaan |
|
|
84
|
+
| `CLAUDE_CONFIG_DIR` | Lokasi pemasangan skill | `~/.claude` |
|
|
85
|
+
|
|
86
|
+
## Batasan yang perlu diketahui
|
|
87
|
+
|
|
88
|
+
- **Deteksi keadaan layar bersifat heuristik** (teks tertahan, pertanyaan, prompt izin, limit). Ia teruji terhadap TUI palsu yang meniru perilaku berbeda, tetapi belum divalidasi terhadap setiap TUI sungguhan. Agent yang gagal probe ditandai `tidak-andal` dan tidak dipakai.
|
|
89
|
+
- Konfirmasi pemahaman menangkap salah paham pada **cakupan, cek, dan tindakan terlarang**, bukan salah paham makna pada TUJUAN. Untuk tugas berisiko gunakan `--teliti`; verifikasi sesudah kerja tetap menjadi jaring terakhir.
|
|
90
|
+
- Pengecekan cakupan sengaja **konservatif**: path tanpa wildcard dianggap sebagai dirinya sendiri beserta isinya.
|
|
91
|
+
- Windows tidak didukung (tmux).
|
|
92
|
+
|
|
93
|
+
## Pengembangan
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
npm ci
|
|
97
|
+
npm run check # Biome
|
|
98
|
+
npm run typecheck
|
|
99
|
+
npm test # butuh tmux; termasuk uji ujung ke ujung
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
Commit mengikuti [Conventional Commits](https://www.conventionalcommits.org/); versi, `CHANGELOG.md`, GitHub Release, dan publish npm dihasilkan otomatis oleh semantic-release dari cabang `main`.
|
|
103
|
+
|
|
104
|
+
## Lisensi
|
|
105
|
+
|
|
106
|
+
MIT
|
package/dist/src/cli.js
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { checkNodeVersion } from "./runtime.js";
|
|
3
|
+
const node = checkNodeVersion(process.versions.node);
|
|
4
|
+
if (!node.ok) {
|
|
5
|
+
console.error(node.message);
|
|
6
|
+
process.exit(1);
|
|
7
|
+
}
|
|
8
|
+
// `node:sqlite` masih eksperimental di Node 22 dan mencetak peringatan ke stderr, yang akan
|
|
9
|
+
// mengotori keluaran yang dibaca agent. Hanya peringatan itu yang dibuang.
|
|
10
|
+
const emitAsli = process.emitWarning;
|
|
11
|
+
process.emitWarning = ((peringatan, ...sisa) => {
|
|
12
|
+
const tipe = typeof sisa[0] === "string"
|
|
13
|
+
? sisa[0]
|
|
14
|
+
: sisa[0]?.type;
|
|
15
|
+
if (tipe === "ExperimentalWarning" && String(peringatan).includes("SQLite"))
|
|
16
|
+
return;
|
|
17
|
+
return emitAsli.call(process, peringatan, ...sisa);
|
|
18
|
+
});
|
|
19
|
+
const { run } = await import("./commands.js");
|
|
20
|
+
async function bacaStdin() {
|
|
21
|
+
if (process.stdin.isTTY)
|
|
22
|
+
throw new (await import("./core/errors.js")).UsageError("isi dibaca dari stdin; pipe teks ke perintah ini (mis. rempug reply T1 <<'EOF' ... EOF)");
|
|
23
|
+
const potongan = [];
|
|
24
|
+
for await (const p of process.stdin)
|
|
25
|
+
potongan.push(p);
|
|
26
|
+
return Buffer.concat(potongan).toString("utf8");
|
|
27
|
+
}
|
|
28
|
+
const kontrol = new AbortController();
|
|
29
|
+
for (const sinyal of ["SIGINT", "SIGTERM"])
|
|
30
|
+
process.on(sinyal, () => kontrol.abort());
|
|
31
|
+
/** Bilangan positif dari variabel lingkungan; nilai lain diabaikan sehingga bawaan tetap berlaku. */
|
|
32
|
+
function angka(nilai) {
|
|
33
|
+
const n = Number(nilai);
|
|
34
|
+
return Number.isFinite(n) && n > 0 ? n : undefined;
|
|
35
|
+
}
|
|
36
|
+
const ambang = Object.fromEntries(Object.entries({
|
|
37
|
+
ackDetik: angka(process.env.REMPUG_ACK_DETIK),
|
|
38
|
+
diamDetik: angka(process.env.REMPUG_DIAM_DETIK),
|
|
39
|
+
macetDetik: angka(process.env.REMPUG_MACET_DETIK),
|
|
40
|
+
}).filter(([, v]) => v !== undefined));
|
|
41
|
+
process.exitCode = await run(process.argv.slice(2), {
|
|
42
|
+
env: process.env,
|
|
43
|
+
cwd: process.cwd(),
|
|
44
|
+
tmux: process.env.REMPUG_TMUX_SOCKET
|
|
45
|
+
? { socket: process.env.REMPUG_TMUX_SOCKET }
|
|
46
|
+
: undefined,
|
|
47
|
+
sinyal: kontrol.signal,
|
|
48
|
+
tickOpsi: ambang,
|
|
49
|
+
watchMs: angka(process.env.REMPUG_WATCH_MS),
|
|
50
|
+
io: {
|
|
51
|
+
stdout: (teks) => void process.stdout.write(`${teks}\n`),
|
|
52
|
+
stderr: (teks) => void process.stderr.write(`${teks}\n`),
|
|
53
|
+
stdin: bacaStdin,
|
|
54
|
+
},
|
|
55
|
+
});
|