@kahinmcp/kahin 0.2.0 → 0.3.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/CHANGELOG.md +85 -0
- package/README.md +53 -22
- package/package.json +3 -2
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
Tüm önemli değişiklikler bu dosyada tutulur. Format: [Keep a Changelog](https://keepachangelog.com/tr/1.1.0/) — [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
4
|
+
|
|
5
|
+
## [0.3.0] — 2026-08-03
|
|
6
|
+
|
|
7
|
+
### Eklenen
|
|
8
|
+
- **7 yeni tool (toplam 104)**:
|
|
9
|
+
- **Iframe erişimi**: 12 DOM tool'una opsiyonel `frame_id` parametresi — `Runtime.callFunction` ile hedef frame'in `executionContextId`'si üstünde evaluate; `Runtime.executionContextCreated/Destroyed/Cleared` event'lerinden frame→context map (Mirage reader loop'ta)
|
|
10
|
+
- **Dosya yükleme (2)**: `kahin_mirage_set_file_chooser_intercept`, `kahin_mirage_upload_files` — `Page.setInterceptFileChooserDialog` + `fileChooserOpened` bekleme + `Page.setFileInputFiles` (absolute path zorunlu, multi-file, timeout)
|
|
11
|
+
- **Canlı screencast (4)**: `kahin_mirage_screencast_start/frame/stop/pending` — `Page.startScreencast` (base64-JPEG frame'ler), her frame için zorunlu `screencastFrameAck` (kMaxFramesInFlight=1), FIFO frame queue, stop'ta temizlik
|
|
12
|
+
- **Erişilebilirlik (1)**: `kahin_mirage_accessibility_tree` — `Accessibility.getFullAXTree` (Camoufox-only; upstream Playwright'da yok, CDP'de de yok)
|
|
13
|
+
- **Gerçek HTTP e2e** (`tests/test_e2e_network.py`): network_requests, get_response_body, interception continue/abort — localhost stdlib server ile, dış ağ yok
|
|
14
|
+
- **Iframe e2e** (`tests/test_e2e_iframe.py`): frame tree, iframe içi query/click/type — 4 PASS
|
|
15
|
+
- **Upload e2e** (`tests/test_e2e_upload.py`): single/multi dosya byte-exact, timeout, absolute path zorunluluğu — 4 PASS
|
|
16
|
+
- **Screencast e2e** (`tests/test_e2e_screencast.py`): start/clamp, JPEG magic + ack stream, pending queue, stop temizliği — 4 PASS
|
|
17
|
+
- **A11y e2e** (`tests/test_e2e_accessibility.py`): role/name/placeholder yansıması, nodeCount/truncated — 4 PASS
|
|
18
|
+
|
|
19
|
+
### Değişen
|
|
20
|
+
- Sidecar router: `Accessibility.*` page session kuralına eklendi (önceden root'a düşüyordu → `-32000 "Handler for ... does not implement"`); 196 Zig test
|
|
21
|
+
- `Network.enable`'in Juggler'da OLMADIĞI doğrulandı (event'ler default) — network tool'ları gerçek HTTP'te as-is çalışıyor, bug yok
|
|
22
|
+
- data: URL network skip testi kaldırıldı (yerini gerçek HTTP e2e aldı)
|
|
23
|
+
|
|
24
|
+
### Düzeltilen
|
|
25
|
+
- `Accessibility.getFullAXTree` route bug'ı (page session'a yönlendirme)
|
|
26
|
+
|
|
27
|
+
## [0.2.0] — 2026-08-03
|
|
28
|
+
|
|
29
|
+
### Eklenen
|
|
30
|
+
- **65 yeni Juggler-native MCP tool** (toplam 97) — motor ayırımlı kategori dosyaları (`kahin/tools/`):
|
|
31
|
+
- DOM (12): `kahin_mirage_query`, `kahin_mirage_query_all`, `kahin_mirage_click`, `kahin_mirage_type`, `kahin_mirage_get_text`, `kahin_mirage_get_attribute`, `kahin_mirage_set_attribute`, `kahin_mirage_focus`, `kahin_mirage_hover`, `kahin_mirage_get_html`, `kahin_mirage_wait_selector`, `kahin_mirage_get_value`
|
|
32
|
+
- Input (7): mouse_click, mouse_move, mouse_down, mouse_up, key_press, key_text, scroll
|
|
33
|
+
- PageEx (6): reload, go_back, go_forward, stop, frame_tree, page_content
|
|
34
|
+
- Tab/Session (6): tab_new, tab_switch, tab_close, tab_list, tab_bring_front, context_new
|
|
35
|
+
- Network/Console (10): network_requests, get_response_body, intercept_requests, unintercept_requests, network_continue, network_abort, cache_disable, clear_cache, console_log, errors_list
|
|
36
|
+
- Storage (6): cookie_get, cookie_set, cookie_clear, storage_local_get, storage_local_set, storage_session_get
|
|
37
|
+
- Emulation (10): set_user_agent, set_viewport, set_device_scale_factor, set_media, set_touch, set_color_scheme, set_reduced_motion, set_locale, set_timezone, set_geolocation
|
|
38
|
+
- Dialog/Download/Worker/WS (7): dialog_list, dialog_accept, dialog_dismiss, download_list, download_save, worker_list, websocket_list
|
|
39
|
+
- Engine (1): `kahin_engine_health`
|
|
40
|
+
- **Phantom liveness sistemi**: `is_alive`/`on_death`, boot'ta `Browser.health` doğrulaması, ölü engine otomatik eviction + state temizliği
|
|
41
|
+
- `Mirage.call(method, params, session_id)` API'si — session yönetimi (`create_page/close_page/switch_page/list_pages`)
|
|
42
|
+
- `tests/test_phantom.py`, `tests/test_e2e_mirage.py` (gerçek Camoufox e2e: DOM, tab, cookie, dialog, kill, localStorage, emulation)
|
|
43
|
+
- pytest-asyncio dev-dep
|
|
44
|
+
|
|
45
|
+
### Değişen
|
|
46
|
+
- Sidecar wire Juggler-native: `{"id","method","params","sessionId?"}` — CDP-şekilli `domain/command` katmanı kaldırıldı
|
|
47
|
+
- No-op `Network.enable`/`Console.enable` handler'ları silindi; event adları verbatim forward
|
|
48
|
+
- `Network.getResponseBody` → `{base64body, evicted?}`; `Page.dispatchKeyEvent` zorunlu `repeat:bool`
|
|
49
|
+
- Screenshot: gerçek viewport ölçümü + `full_page` full-content clip
|
|
50
|
+
- Result-less Juggler reply'ları (`{"id":N}`) artık boş `result` olarak kabul ediliyor
|
|
51
|
+
- `Page.reload` frameId ile gönderiliyor; frame tree `d.getFrameTree` (gerçek iç içe hiyerarşi)
|
|
52
|
+
- oracle.py bootstrap-only — tool tanımları `kahin/tools/` kategori modüllerinde
|
|
53
|
+
- Versiyonlar senkronize: package.json / pyproject.toml / `kahin.__version__`
|
|
54
|
+
|
|
55
|
+
### Düzeltilen
|
|
56
|
+
- `@intCast(id)` trap riski (negatif/oversize id → `-32600`)
|
|
57
|
+
- `newPage`/`screenshot` hata yutma — artık gerçek hata yanıtı
|
|
58
|
+
- devicePixelRatio override: `Page.setViewportSize` yerine `Browser.setDefaultViewport`
|
|
59
|
+
- `engine._proc` → `_process` (shadow health pid artık gerçek)
|
|
60
|
+
- Sidecar process HUP'ta temiz exit
|
|
61
|
+
|
|
62
|
+
## [0.1.8] — 2026-08-02
|
|
63
|
+
|
|
64
|
+
### Değişen
|
|
65
|
+
- npm paketi GitLab'a taşındı + GitLab CI publish eklendi (`scripts/npm-publish.sh`, `.gitlab-ci.yml`)
|
|
66
|
+
- Versiyon farkı kontrolüyle otomatik yayın
|
|
67
|
+
|
|
68
|
+
## [0.1.7] — 2026-08-01
|
|
69
|
+
|
|
70
|
+
### Eklenen
|
|
71
|
+
- GitHub auto-publish workflow (`.github/workflows/publish.yml`)
|
|
72
|
+
- One-command install: 22 AI CLI istemcisini otomatik tespit + MCP kaydı
|
|
73
|
+
|
|
74
|
+
## [0.1.0–0.1.6] — 2026-08-01
|
|
75
|
+
|
|
76
|
+
### Eklenen
|
|
77
|
+
- Global npm launcher + auto-setup
|
|
78
|
+
- Shadow engine: gerçek Obscura binary (auto-install cascade)
|
|
79
|
+
- Mirage engine: gerçek Camoufox via Zig sidecar IPC (Faz 5)
|
|
80
|
+
- Zig Juggler harness: pipe transport, Browser/Page/Runtime/Network/Input/Emulation adapters, interception, process manager, perf + crash-recovery
|
|
81
|
+
- CDP ansiklopedisi: 56 domain, 667 komut, 237 event, 609 type (Chrome 148)
|
|
82
|
+
|
|
83
|
+
[0.2.0]: https://gitlab.com/void0x14/kahin-mcp/-/compare/v0.1.8...v0.2.0
|
|
84
|
+
[0.1.8]: https://gitlab.com/void0x14/kahin-mcp/-/compare/v0.1.7...v0.1.8
|
|
85
|
+
[0.1.7]: https://gitlab.com/void0x14/kahin-mcp/-/compare/v0.1.6...v0.1.7
|
package/README.md
CHANGED
|
@@ -16,16 +16,23 @@ 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
|
+
## 104 Tool · 4 Kategori Ailesi · 2 Engine
|
|
20
|
+
|
|
21
|
+
Tool'lar engine-ayrımlı kategori dosyalarında (`kahin/tools/`): paylaşılan çekirdek + Obscura + Camoufox aileleri.
|
|
20
22
|
|
|
21
23
|
| Kategori | Ne işe yarar | Tool sayısı |
|
|
22
24
|
|----------|-------------|-------------|
|
|
23
|
-
|
|
|
24
|
-
|
|
|
25
|
-
|
|
|
26
|
-
|
|
|
27
|
-
|
|
|
28
|
-
|
|
|
25
|
+
| GRIMOIRE — CDP Bilgi | Domain/komut/event/type sorgulama, semantik arama | 7 |
|
|
26
|
+
| SERAPH — Doğrulama | Komut doğrulama, typo tespiti, hata çözümleme | 3 |
|
|
27
|
+
| PILOT — Browser Kontrol | Chrome başlat/durdur, gezin, tıkla, kod çalıştır, ekran görüntüsü | 8 |
|
|
28
|
+
| TRAINMAN — Session | Yeni sayfa aç/kapat, session listele | 4 |
|
|
29
|
+
| DEJA_VU — Debug | CDP event geçmişi, network istekleri, console mesajları | 4 |
|
|
30
|
+
| PROPHECY — Pattern DB | Kullanım desenlerini öğren, sorgula, öner | 5 |
|
|
31
|
+
| HEALER | Hata istatistikleri | 1 |
|
|
32
|
+
| MIRAGE — Camoufox Native (72) | Juggler protokolü üstünde DOM, Input, PageEx, Tab, Network, Storage, Emulation, Dialog/Download/Worker/WS, Upload, Screencast, Accessibility, Engine sağlığı | 72 |
|
|
33
|
+
| OBSCURA — Ayrı kategori | Obscura'ya özel tool'lar (hazırlanıyor) | 0 |
|
|
34
|
+
|
|
35
|
+
**Toplam: 104 tool.**
|
|
29
36
|
|
|
30
37
|
## Bir satırda özet
|
|
31
38
|
|
|
@@ -38,7 +45,7 @@ Zorunlu: Python 3.12+ · Chrome/Chromium · Node.js 18+ (npm launcher için)
|
|
|
38
45
|
### Otomatik kurulum — tek komut
|
|
39
46
|
|
|
40
47
|
```bash
|
|
41
|
-
pnpm add -g kahin
|
|
48
|
+
pnpm add -g @kahinmcp/kahin
|
|
42
49
|
```
|
|
43
50
|
|
|
44
51
|
Bu kadar. Kurulum sonrası Kahin, sistemindeki AI CLI araçlarını otomatik tespit eder ve kendini kaydeder:
|
|
@@ -80,6 +87,20 @@ Gerisini AI halleder. Ama dilersen tool'ları direkt de çağırabilirsin:
|
|
|
80
87
|
→ kahin_error_decode(error_code=-32601) → hatayı çözümler
|
|
81
88
|
```
|
|
82
89
|
|
|
90
|
+
Camoufox (Juggler native) ile, engine `mirage` seçilince:
|
|
91
|
+
|
|
92
|
+
```
|
|
93
|
+
→ kahin_browser_start(engine="mirage")
|
|
94
|
+
→ kahin_mirage_query("#input") → kahin_mirage_type("merhaba")
|
|
95
|
+
→ kahin_mirage_click("#btn") → kahin_mirage_get_text("#result")
|
|
96
|
+
→ kahin_mirage_query("#btn", frame_id="subframe-...") # iframe içi erişim
|
|
97
|
+
→ kahin_mirage_cookie_set/get/clear → kahin_mirage_storage_local_get
|
|
98
|
+
→ kahin_mirage_set_user_agent / set_viewport / set_geolocation
|
|
99
|
+
→ kahin_mirage_set_file_chooser_intercept(true) → kahin_mirage_upload_files(["/abs/path"])
|
|
100
|
+
→ kahin_mirage_screencast_start → kahin_mirage_screencast_frame (base64 JPEG)
|
|
101
|
+
→ kahin_mirage_accessibility_tree → kahin_engine_health
|
|
102
|
+
```
|
|
103
|
+
|
|
83
104
|
Tam liste için: [AGENTS.md](AGENTS.md)
|
|
84
105
|
|
|
85
106
|
## Proje Felsefesi
|
|
@@ -91,7 +112,7 @@ Tam liste için: [AGENTS.md](AGENTS.md)
|
|
|
91
112
|
|
|
92
113
|
## Bağımlılıklar
|
|
93
114
|
|
|
94
|
-
mcp · orjson · Levenshtein · websockets · httpx · camoufox · Pillow
|
|
115
|
+
mcp · orjson · Levenshtein · websockets · httpx · camoufox · Pillow · pydantic
|
|
95
116
|
|
|
96
117
|
## Port Uyarısı
|
|
97
118
|
|
|
@@ -113,13 +134,22 @@ Kahin'de hata loglama ve kendini onarma sistemi gömülüdür:
|
|
|
113
134
|
## Mimari
|
|
114
135
|
|
|
115
136
|
```
|
|
116
|
-
oracle.py → MCP server (
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
137
|
+
oracle.py → MCP server (bootstrap: mcp instance + engine lifecycle + main)
|
|
138
|
+
tools/ → 104 tool, engine-ayrımlı kategori dosyaları
|
|
139
|
+
_common.py → _safe_cdp, _require_engine, _auto_learn
|
|
140
|
+
grimoire/seraph/prophecy/healer → CDP bilgi + doğrulama + pattern (paylaşılan)
|
|
141
|
+
pilot/trainman/dejavu → browser/session/debug (paylaşılan)
|
|
142
|
+
pilot_mirage/trainman_mirage/dejavu_mirage → Camoufox DOM+Input+PageEx / Tab / Network+Console
|
|
143
|
+
storage_mirage/emulation_mirage/dialog_mirage → Storage / Emulation / Dialog+Download+Worker+WS
|
|
144
|
+
pilot_obscura/trainman_obscura/dejavu_obscura → Obscura ayrı kategoriler (hazırlanıyor)
|
|
145
|
+
engine.py → engine_health
|
|
146
|
+
_healer.py → Hata yönetimi, loglama, kendini onarma
|
|
147
|
+
the_source/architect → CDP şema motoru (56 domain, 667 komut)
|
|
148
|
+
the_twins/shadow → Obscura engine (gerçek Obscura binary, WebSocket CDP)
|
|
149
|
+
the_twins/mirage → Mirage engine (Zig sidecar, Juggler native pipe, stealth)
|
|
150
|
+
the_twins/chassis → Ortak engine arayüzü (abstract: call/is_alive/on_death)
|
|
151
|
+
residual_self/fate → Pattern DB (öğrenme, sorgulama, önerme)
|
|
152
|
+
camoufox-harness/ → Zig sidecar (Juggler protocol, vendor binary gömülü)
|
|
123
153
|
```
|
|
124
154
|
|
|
125
155
|
---
|
|
@@ -130,15 +160,16 @@ oracle.py → MCP server (32 tool, giriş kapısı)
|
|
|
130
160
|
- [x] **Camoufox entegrasyonu tamamlandı** — gerçek Camoufox (Zig sidecar + Juggler pipe) ile native çalışıyor; engine seçimi ajan tarafından `shadow`/`mirage` parametresiyle yapılıyor
|
|
131
161
|
- [x] **Obscura entegrasyonu tamamlandı** — gerçek Obscura binary'si (WebSocket CDP) ile çalışıyor, startup problemleri giderildi
|
|
132
162
|
- [ ] **SKILLS** destekleri ve konfigre edilebilir kişsiel hazır skills oluşturma özelliği
|
|
133
|
-
- [x] **Tek tık kurulum** — `pnpm add -g kahin`, sonra `kahin` (ilk çalıştırmada Python ortamını otomatik kurar)
|
|
163
|
+
- [x] **Tek tık kurulum** — `pnpm add -g @kahinmcp/kahin`, sonra `kahin` (ilk çalıştırmada Python ortamını otomatik kurar)
|
|
134
164
|
- [ ] **Zero-dependency** hedefi (Go/Rust portu)
|
|
135
165
|
- [ ] **LSP modu** — kod içinde hata yakalama, AI'a yanlışını yüzüne vurma
|
|
136
|
-
- [
|
|
166
|
+
- [x] **Tool sayısı 104** — Camoufox Juggler-native 72 tool (DOM, Input, Network, Storage, Emulation, Dialog, Tab, Worker/WS, Upload, Screencast, Accessibility) + paylaşılan 32 çekirdek
|
|
167
|
+
- [ ] **Obscura ayrı tool'ları** — CDP-yeteneklerine özel pilot_obscura/trainman_obscura/dejavu_obscura kategorilerini doldur
|
|
137
168
|
|
|
138
169
|
- [ ] **Gerçek zamanlı izleme** — AI'ın Kahin'i nasıl kullandığını canlı gör
|
|
139
170
|
- [ ] **Web dashboard** — tool çağrıları, hata oranları, trendler
|
|
140
171
|
- [ ] **MCP Ekosistemi** — üçüncü taraf MCP'lere proxy/entegrasyon
|
|
141
|
-
- [x] **CLI aracı** — `kahin` komutu ile hızlı sorgulama (npm launcher, `pnpm add -g kahin`)
|
|
172
|
+
- [x] **CLI aracı** — `kahin` komutu ile hızlı sorgulama (npm launcher, `pnpm add -g @kahinmcp/kahin`)
|
|
142
173
|
- [ ] **Pasif tarama** — arka planda CDP event'lerini izle, değişiklik olunca bildir
|
|
143
174
|
- [ ] **Dokümantasyon sitesi** — kapsamlı kullanım kılavuzu
|
|
144
175
|
|
|
@@ -154,7 +185,7 @@ oracle.py → MCP server (32 tool, giriş kapısı)
|
|
|
154
185
|
## Geliştirme
|
|
155
186
|
|
|
156
187
|
```bash
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
188
|
+
uv run pytest tests/ # 84 test (83 pass, 1 skip)
|
|
189
|
+
uv run ruff check kahin/ # lint
|
|
190
|
+
uv run python -m kahin.oracle # manuel başlatma
|
|
160
191
|
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kahinmcp/kahin",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Kahin — CDP ansiklopedisi + anti-detect browser otomasyon MCP sunucusu. Kurulumda 22 AI CLI aracını otomatik tespit edip kendini kaydeder. Obscura ve Camoufox motorlarını kullanır, motor seçimini ajana bırakır.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"kahin": "bin/kahin.mjs"
|
|
@@ -11,7 +11,8 @@
|
|
|
11
11
|
},
|
|
12
12
|
"files": [
|
|
13
13
|
"bin",
|
|
14
|
-
"LICENSE"
|
|
14
|
+
"LICENSE",
|
|
15
|
+
"CHANGELOG.md"
|
|
15
16
|
],
|
|
16
17
|
"engines": {
|
|
17
18
|
"node": ">=18"
|