@kahinmcp/kahin 0.3.6 → 0.3.7
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/CHANGELOG.md +28 -0
- package/README.md +9 -7
- package/bin/kahin.mjs +10 -0
- package/bin/setup.mjs +25 -11
- package/docs/juggler-ai-native.md +5 -5
- package/lib/kahin-0.3.7-py3-none-any.whl +0 -0
- package/package.json +1 -1
- package/lib/kahin-0.3.6-py3-none-any.whl +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,32 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.3.7] — 2026-08-06
|
|
4
|
+
|
|
5
|
+
### Eklenen
|
|
6
|
+
- Gerçek Camoufox/Mirage akışı için canlı DOM snapshot/event cursor sözleşmesi;
|
|
7
|
+
stale node, reset ve dropped durumları artık ajanı yeni snapshot almaya zorlar.
|
|
8
|
+
- CI üzerinde Playwright veya sahte e2e yerine checkout'tan derlenen Zig sidecar,
|
|
9
|
+
resmi Camoufox ve zorunlu gerçek browser testlerinden oluşan release gate'i.
|
|
10
|
+
|
|
11
|
+
### Düzeltilen
|
|
12
|
+
- Mirage çağrıları, DOM/input/network/storage/screencast ve iframe işlemlerinde
|
|
13
|
+
doğru page/session sahipliğine sabitlendi; paralel sekmeler birbirine karışmaz.
|
|
14
|
+
- Sidecar IPC ve process lifecycle hataları artık yutulmadan fail-closed davranır;
|
|
15
|
+
screenshot, upload, accessibility ve network yanıtları bounded hale getirildi.
|
|
16
|
+
- npm launcher her kurulumda gömülü wheel'i günceller ve Camoufox binary'sini
|
|
17
|
+
hazırlar; npm release sorgusu ağ/auth hatalarını yanlışlıkla başarı saymaz.
|
|
18
|
+
- GitLab gerçek-browser job'u Firefox'u Docker root olarak çalıştırmaz; npm
|
|
19
|
+
publish artık release-check yanında real-e2e kapısına da bağlıdır.
|
|
20
|
+
- CI image'ına Camoufox'un GTK/DBus/audio/X11 runtime bağımlılıkları eklendi;
|
|
21
|
+
testten önce gerçek binary `--version` ile başlatılabilirliği doğrulanıyor.
|
|
22
|
+
- Network response-body çağrıları, request event'i gövde erişilebilir olmadan
|
|
23
|
+
geldğinde native completion yarışını sınırlı retry ile güvenle tamamlıyor.
|
|
24
|
+
|
|
25
|
+
### Testler
|
|
26
|
+
- Gerçek Camoufox/Mirage uygulama suite'i: 120 passed.
|
|
27
|
+
- Zig sidecar testleri: 201/201 passed; ruff, compile, shell/YAML ve npm pack
|
|
28
|
+
release kontrolleri başarılı.
|
|
29
|
+
|
|
3
30
|
## [0.3.6] — 2026-08-06
|
|
4
31
|
|
|
5
32
|
### Düzeltilen
|
|
@@ -171,3 +198,4 @@ Tüm önemli değişiklikler bu dosyada tutulur. Format: [Keep a Changelog](http
|
|
|
171
198
|
[0.1.8]: https://gitlab.com/void0x14/kahin-mcp/-/compare/v0.1.7...v0.1.8
|
|
172
199
|
[0.1.7]: https://gitlab.com/void0x14/kahin-mcp/-/compare/v0.1.6...v0.1.7
|
|
173
200
|
[0.3.6]: https://gitlab.com/void0x14/kahin-mcp/-/compare/v0.3.5...v0.3.6
|
|
201
|
+
[0.3.7]: https://gitlab.com/void0x14/kahin-mcp/-/compare/v0.3.6...v0.3.7
|
package/README.md
CHANGED
|
@@ -16,7 +16,7 @@ AI modeller Chrome'un içine girip sayfa gezip kod çalıştırabilir ama CDP'yi
|
|
|
16
16
|
|
|
17
17
|
56 domain, 667 komut, 237 event, 609 type — Chrome 148 protokolü gömülü.
|
|
18
18
|
|
|
19
|
-
##
|
|
19
|
+
## 110 Tool · 4 Kategori Ailesi · 2 Engine
|
|
20
20
|
|
|
21
21
|
Tool'lar engine-ayrımlı kategori dosyalarında (`kahin/tools/`): paylaşılan çekirdek + Obscura + Camoufox aileleri.
|
|
22
22
|
|
|
@@ -32,7 +32,7 @@ Tool'lar engine-ayrımlı kategori dosyalarında (`kahin/tools/`): paylaşılan
|
|
|
32
32
|
| MIRAGE — Camoufox Native (77) | Juggler protokolü üstünde gerçek-zamanlı DOM stream, DOM, Input, PageEx, Tab, Network, Storage, Emulation, Dialog/Download/Worker/WS, Upload, Screencast, Accessibility, Engine sağlığı | 77 |
|
|
33
33
|
| OBSCURA — Ayrı kategori | Obscura'ya özel tool'lar (hazırlanıyor) | 0 |
|
|
34
34
|
|
|
35
|
-
**Toplam:
|
|
35
|
+
**Toplam: 110 tool.**
|
|
36
36
|
|
|
37
37
|
## Bir satırda özet
|
|
38
38
|
|
|
@@ -40,7 +40,9 @@ CDP'yi bilmeyen AI'a Chrome'u kontrol etmeyi öğreten, yanlış yapınca düzel
|
|
|
40
40
|
|
|
41
41
|
## Kurulum
|
|
42
42
|
|
|
43
|
-
Zorunlu: Python 3.12+ ·
|
|
43
|
+
Zorunlu: Python 3.12+ · Node.js 18+ (npm launcher için). Kahin'in varsayılan
|
|
44
|
+
Camoufox binary'si kurulum sırasında resmi `camoufox fetch` komutuyla hazır edilir;
|
|
45
|
+
Chrome/Chromium kurulumu gerekmez.
|
|
44
46
|
|
|
45
47
|
### Otomatik kurulum — tek komut
|
|
46
48
|
|
|
@@ -156,14 +158,14 @@ Kahin'de hata loglama ve kendini onarma sistemi gömülüdür:
|
|
|
156
158
|
|
|
157
159
|
```
|
|
158
160
|
oracle.py → MCP server (bootstrap: mcp instance + engine lifecycle + main)
|
|
159
|
-
tools/ →
|
|
161
|
+
tools/ → 110 tool, engine-ayrımlı kategori dosyaları
|
|
160
162
|
_common.py → capability routing, _safe_cdp, _require_engine, _auto_learn
|
|
161
163
|
the_twins/capabilities → motor-yetenek sözleşmesi ve Mirage yükseltme matrisi
|
|
162
164
|
grimoire/seraph/prophecy/healer → CDP bilgi + doğrulama + pattern (paylaşılan)
|
|
163
165
|
pilot/trainman/dejavu → browser/session/debug (paylaşılan)
|
|
164
166
|
pilot_mirage/trainman_mirage/dejavu_mirage → Camoufox DOM+Input+PageEx / Tab / Network+Console
|
|
165
167
|
storage_mirage/emulation_mirage/dialog_mirage → Storage / Emulation / Dialog+Download+Worker+WS
|
|
166
|
-
pilot_obscura/trainman_obscura/dejavu_obscura →
|
|
168
|
+
pilot_obscura/trainman_obscura/dejavu_obscura → Shadow için ayrılmış paket sınırları; sahte tool kaydetmez
|
|
167
169
|
engine.py → engine_health
|
|
168
170
|
_healer.py → Hata yönetimi, loglama, kendini onarma
|
|
169
171
|
the_source/architect → CDP şema motoru (56 domain, 667 komut)
|
|
@@ -185,7 +187,7 @@ camoufox-harness/ → Zig sidecar (Juggler protocol, vendor binary gömül
|
|
|
185
187
|
- [x] **Tek tık kurulum** — `pnpm add -g @kahinmcp/kahin`, sonra `kahin` (ilk çalıştırmada Python ortamını otomatik kurar)
|
|
186
188
|
- [ ] **Zero-dependency** hedefi (Go/Rust portu)
|
|
187
189
|
- [ ] **LSP modu** — kod içinde hata yakalama, AI'a yanlışını yüzüne vurma
|
|
188
|
-
- [x] **Tool sayısı
|
|
190
|
+
- [x] **Tool sayısı 110** — Camoufox Juggler-native 78 tool (gerçek-zamanlı DOM stream, DOM, Input, Network, Storage, Emulation, Dialog, Tab, Worker/WS, Upload, Screencast, Accessibility) + paylaşılan 32 çekirdek
|
|
189
191
|
- [ ] **Obscura ayrı tool'ları** — CDP-yeteneklerine özel pilot_obscura/trainman_obscura/dejavu_obscura kategorilerini doldur
|
|
190
192
|
|
|
191
193
|
- [ ] **Gerçek zamanlı izleme** — AI'ın Kahin'i nasıl kullandığını canlı gör
|
|
@@ -207,7 +209,7 @@ camoufox-harness/ → Zig sidecar (Juggler protocol, vendor binary gömül
|
|
|
207
209
|
## Geliştirme
|
|
208
210
|
|
|
209
211
|
```bash
|
|
210
|
-
uv run pytest tests/
|
|
212
|
+
uv run pytest -q tests/ # gerçek motor mevcutsa E2E dahil tam suite
|
|
211
213
|
uv run ruff check kahin/ # lint
|
|
212
214
|
uv run python -m kahin.oracle # manuel başlatma
|
|
213
215
|
```
|
package/bin/kahin.mjs
CHANGED
|
@@ -14,6 +14,10 @@ const PY = process.platform === "win32" ? join(VENV, "Scripts", "python.exe") :
|
|
|
14
14
|
function sh(cmd, args, opts = {}) {
|
|
15
15
|
return new Promise((resolve) => {
|
|
16
16
|
const c = spawn(cmd, args, { stdio: ["ignore", "ignore", "pipe"], ...opts });
|
|
17
|
+
c.on("error", (err) => {
|
|
18
|
+
process.stderr.write(`[kahin] ${cmd} başlatılamadı: ${err.message}\n`);
|
|
19
|
+
resolve(1);
|
|
20
|
+
});
|
|
17
21
|
c.stderr.on("data", (d) => process.stderr.write(`[kahin] ${d}`));
|
|
18
22
|
c.on("close", (code) => resolve(code));
|
|
19
23
|
});
|
|
@@ -41,6 +45,12 @@ const args = process.argv.slice(2);
|
|
|
41
45
|
if (args[0] === "setup") {
|
|
42
46
|
const { setup: registerClients } = await import("./setup.mjs");
|
|
43
47
|
registerClients();
|
|
48
|
+
const { installPython } = await import("./setup.mjs");
|
|
49
|
+
const install = await installPython();
|
|
50
|
+
if (install && install.error) {
|
|
51
|
+
process.stderr.write(`[kahin] Python/Camoufox kurulumu başarısız (çıkış ${install.error})\n`);
|
|
52
|
+
process.exit(1);
|
|
53
|
+
}
|
|
44
54
|
process.exit(0);
|
|
45
55
|
}
|
|
46
56
|
|
package/bin/setup.mjs
CHANGED
|
@@ -324,10 +324,12 @@ export function setup() {
|
|
|
324
324
|
const KAHIN_HOME = process.env.KAHIN_HOME || join(homedir(), ".local", "share", "kahin");
|
|
325
325
|
const KAHIN_VENV = join(KAHIN_HOME, "venv");
|
|
326
326
|
const KAHIN_PY = process.platform === "win32" ? join(KAHIN_VENV, "Scripts", "python.exe") : join(KAHIN_VENV, "bin", "python");
|
|
327
|
-
const KAHIN_WHEEL = join(dirname(fileURLToPath(import.meta.url)), "..", "lib", "kahin-0.3.
|
|
327
|
+
const KAHIN_WHEEL = join(dirname(fileURLToPath(import.meta.url)), "..", "lib", "kahin-0.3.7-py3-none-any.whl");
|
|
328
328
|
|
|
329
|
-
// Gömülü wheel'i venv'e kurar
|
|
330
|
-
// PyPI'a bağımlı DEĞİL — wheel paketle birlikte gelir
|
|
329
|
+
// Gömülü wheel'i venv'e kurar ve varsayılan Camoufox binary'sini hazırlar.
|
|
330
|
+
// PyPI'a bağımlı DEĞİL — wheel paketle birlikte gelir; wheel'in bağımlılıkları
|
|
331
|
+
// (Camoufox dahil) pip tarafından kurulup resmi `camoufox fetch` ile tarayıcı
|
|
332
|
+
// cache'i doldurulur.
|
|
331
333
|
export async function installPython() {
|
|
332
334
|
if (process.env.KAHIN_SKIP_PYTHON) {
|
|
333
335
|
log("python kurulumu atlandı (KAHIN_SKIP_PYTHON)");
|
|
@@ -347,24 +349,35 @@ export async function installPython() {
|
|
|
347
349
|
return { error: code };
|
|
348
350
|
}
|
|
349
351
|
}
|
|
350
|
-
const check = await run(KAHIN_PY, ["-c", "import kahin; print(kahin.__version__)"]);
|
|
351
|
-
if (check === 0) {
|
|
352
|
-
log("kahin zaten kurulu, atlandı");
|
|
353
|
-
return { installed: true };
|
|
354
|
-
}
|
|
355
352
|
log(`wheel kuruluyor: ${KAHIN_WHEEL}`);
|
|
356
353
|
const code = await run(KAHIN_PY, ["-m", "pip", "install", "--upgrade", KAHIN_WHEEL]);
|
|
357
354
|
if (code !== 0) {
|
|
358
355
|
log(`wheel kurulamadı (çıkış ${code})`);
|
|
359
356
|
return { error: code };
|
|
360
357
|
}
|
|
361
|
-
log("kahin python paketi kuruldu");
|
|
362
|
-
|
|
358
|
+
log("kahin python paketi kuruldu/güncellendi");
|
|
359
|
+
|
|
360
|
+
if (process.env.KAHIN_SKIP_CAMOUFOX_FETCH) {
|
|
361
|
+
log("Camoufox fetch atlandı (KAHIN_SKIP_CAMOUFOX_FETCH)");
|
|
362
|
+
return { installed: true, camoufox: "skipped" };
|
|
363
|
+
}
|
|
364
|
+
log("Camoufox browser hazırlanıyor (resmi camoufox fetch)...");
|
|
365
|
+
const browserCode = await run(KAHIN_PY, ["-m", "camoufox", "fetch"]);
|
|
366
|
+
if (browserCode !== 0) {
|
|
367
|
+
log(`Camoufox browser hazırlanamadı (çıkış ${browserCode}); kahin browser_start sırasında tekrar deneyecek`);
|
|
368
|
+
return { installed: true, camoufox: "error", error: browserCode };
|
|
369
|
+
}
|
|
370
|
+
log("Camoufox browser hazır");
|
|
371
|
+
return { installed: true, camoufox: "ready" };
|
|
363
372
|
}
|
|
364
373
|
|
|
365
374
|
function run(cmd, args) {
|
|
366
375
|
return new Promise((resolve) => {
|
|
367
376
|
const c = spawn(cmd, args, { stdio: ["ignore", "ignore", "pipe"] });
|
|
377
|
+
c.on("error", (err) => {
|
|
378
|
+
process.stderr.write(`[kahin] ${cmd} başlatılamadı: ${err.message}\n`);
|
|
379
|
+
resolve(1);
|
|
380
|
+
});
|
|
368
381
|
c.stderr.on("data", (d) => process.stderr.write(`[kahin] ${d}`));
|
|
369
382
|
c.on("close", (code) => resolve(code));
|
|
370
383
|
});
|
|
@@ -372,5 +385,6 @@ function run(cmd, args) {
|
|
|
372
385
|
|
|
373
386
|
if (process.argv[1] && process.argv[1].endsWith("setup.mjs")) {
|
|
374
387
|
setup();
|
|
375
|
-
installPython();
|
|
388
|
+
const result = await installPython();
|
|
389
|
+
if (result?.error) process.exitCode = 1;
|
|
376
390
|
}
|
|
@@ -141,8 +141,8 @@ Snapshot alanlarının anlamı:
|
|
|
141
141
|
- `value`: input/textarea/select/contenteditable için gelir; password input
|
|
142
142
|
değeri `[redacted]` olur.
|
|
143
143
|
- `actions`: node'un doğrudan desteklediği `click`, `focus`, `type`, `select`
|
|
144
|
-
ipuçlarını gösterir. `select`
|
|
145
|
-
|
|
144
|
+
ipuçlarını gösterir. `select` için `kahin_mirage_dom_action(action="select", text=...)`
|
|
145
|
+
option value veya görünen metinle gerçek input/change event'lerini gönderir.
|
|
146
146
|
- `cursor`: o snapshot anındaki son sequence numarasıdır. Delta okumaya bu
|
|
147
147
|
cursor'dan devam edilir.
|
|
148
148
|
|
|
@@ -276,7 +276,7 @@ script'i ayrıca evaluate eder. Observer sayfa tarafında bounded olduğu için
|
|
|
276
276
|
|
|
277
277
|
## 6. Juggler tool kataloğu (A-Z)
|
|
278
278
|
|
|
279
|
-
Aşağıdaki liste Mirage'ın
|
|
279
|
+
Aşağıdaki liste Mirage'ın 78 Juggler-native tool'unun tamamıdır. `MIRAGE`
|
|
280
280
|
tool'ları `engine="mirage"` aktifken kullanılır.
|
|
281
281
|
|
|
282
282
|
### DOM gözlem ve adaptif action (5)
|
|
@@ -308,11 +308,11 @@ tool'ları `engine="mirage"` aktifken kullanılır.
|
|
|
308
308
|
- `kahin_mirage_reload`, `kahin_mirage_go_back`, `kahin_mirage_go_forward`
|
|
309
309
|
- `kahin_mirage_stop`, `kahin_mirage_frame_tree`, `kahin_mirage_page_content`
|
|
310
310
|
|
|
311
|
-
### Tab/session (
|
|
311
|
+
### Tab/session (7)
|
|
312
312
|
|
|
313
313
|
- `kahin_mirage_tab_new`, `kahin_mirage_tab_switch`, `kahin_mirage_tab_close`
|
|
314
314
|
- `kahin_mirage_tab_list`, `kahin_mirage_tab_bring_front`
|
|
315
|
-
- `kahin_mirage_context_new`
|
|
315
|
+
- `kahin_mirage_context_new`, `kahin_mirage_context_close`
|
|
316
316
|
|
|
317
317
|
### Network/console (10)
|
|
318
318
|
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kahinmcp/kahin",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.7",
|
|
4
4
|
"description": "Kahin \u2014 CDP ansiklopedisi + anti-detect browser otomasyon MCP sunucusu. Kurulumda 22 AI CLI arac\u0131n\u0131 otomatik tespit edip kendini kaydeder. Camoufox g\u00f6rsel varsay\u0131land\u0131r; Obscura h\u0131zl\u0131 CDP i\u015fleri i\u00e7in opt-in'dir.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"kahin": "bin/kahin.mjs"
|
|
Binary file
|