pi-beyin 0.1.5 → 0.1.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/README.md CHANGED
@@ -77,8 +77,27 @@ The extensions call `beyin.py` (read-only unless the agent runs a write command)
77
77
  A vault whose `beyin.py` does not accept `--harness pi` needs `tools/pi-harness-patch.py ensure
78
78
  --vault <vault>` (the extension does this on session start).
79
79
 
80
+ ## Relationship to beyin v3
81
+
82
+ `pi-beyin` is the **pi-side** adapter; the vault, `beyin.py` and the canonical skill templates belong to
83
+ beyin v3 and keep their own release cycle.
84
+
85
+ - `tools/pi-harness-patch.py` is the only thing that touches beyin's files: it adds `pi` to the harness
86
+ list in two managed modules (plus three pi-specific fixes) and re-syncs the install manifest so
87
+ `beyin.py update` plans cleanly. **A beyin update reverts these edits**; the extension calls `ensure`
88
+ on session start, so they come back by themselves. `status` is read-only.
89
+ - The skills here are **copies for pi**, not links into the vault. beyin still installs its own copies
90
+ under `.claude/skills/` for the other harnesses; pi does not read that directory.
91
+ - Notifications stay in the adapter: the injected context, the receipt reminder, the distillation
92
+ suggestion and the `beyin_jev_*` tool descriptions ship with this package. They are written in Turkish
93
+ today (the author's language); anything a *skill* writes follows the user's language.
94
+
80
95
  ## Project memory skills
81
96
 
97
+ Skill descriptions carry bilingual trigger phrases (English + Turkish) on purpose: a description is a
98
+ **routing surface**, not output — it is the text the model uses to pick the skill, so it quotes how the
99
+ user actually speaks. Keep the lists short: every description is in the system prompt on every turn.
100
+
82
101
  The skills are written in English; what they produce is not. Every skill writes in the user's language
83
102
  and reuses the target file's headings — existing headings are never translated. The project-memory skills
84
103
  read `<project>/.pi/beyin-project.json` for paths and scopes; without a profile they fall back to `logs/`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-beyin",
3
- "version": "0.1.5",
3
+ "version": "0.1.7",
4
4
  "description": "pi-native bridge for the beyin second brain: context injection, distillation reminders, and Jev advisor tools.",
5
5
  "keywords": [
6
6
  "pi-package",
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: brain
3
- description: Vault memory procedure — find knowledge, write notes and tasks, record finished work with its sources, and keep companion notes current. Use for requests like "hatırla", "bunu kaydet", "not al", "hafızama bak", "görevi güncelle", "ne yapmıştık", "oturumu kapat", "beyne yaz", "remember this", "save this to memory", "note this down", "update the task", "what did we do", "close the session". Runs against the vault root that holds beyin.py. Also covers the optional Jev advisor and the consumption/auto-check preferences.
3
+ description: Vault memory procedure — find knowledge, write notes and tasks, record finished work with its sources, and keep companion notes current. Use for requests like "hatırla", "bunu kaydet", "ne yapmıştık", "remember this", "save this to memory", "what did we do". Runs against the vault root that holds beyin.py. Also covers the Jev advisor and the consumption/auto-check preferences.
4
4
  ---
5
5
 
6
6
  # Beyin
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: brain-doctor
3
- description: Health check for the beyin installation — does memory actually work, are sources indexed, are hook/worker, skills and updates healthy. Use for requests like "beyin doktor", "hafıza çalışıyor mu", "sağlık kontrolü", "doctor çalıştır", "neden hatırlamıyor", "hook çalışmıyor", "skill çakışması", "run a health check", "is the memory working", "why doesn't it remember", "check the hook". Never turns an indicator green by deleting data.
3
+ description: Health check for the beyin installation — is memory indexed, are sources synced, are skills and updates healthy. Use for requests like "beyin doktor", "hafıza çalışıyor mu", "neden hatırlamıyor", "run a health check", "why doesn't it remember". Never turns an indicator green by deleting data.
4
4
  ---
5
5
 
6
6
  # Beyin doctor
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: brain-update
3
- description: Update an existing beyin installation to the new official version, check the version, or roll back a failed upgrade. Use for requests like "beynimi güncelle", "yeni sürüm var mı", "sürümü kontrol et", "güncelleme kaldı", "geri dön", "rollback", "update beyin", "is there a new version", "check the version", "undo the update". One tool only — beyin.py update.
3
+ description: Update an existing beyin installation to the new official version, check the version, or roll back a failed upgrade. Use for requests like "beynimi güncelle", "yeni sürüm var mı", "geri dön", "update beyin", "rollback". One tool only — beyin.py update.
4
4
  ---
5
5
 
6
6
  # Update beyin
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: experiment-record
3
- description: Experiment and decision record standard (project memory). Use for requests like "memory", "deney kaydet", "log tut", "bu denemeyi yaz", "record this run", "sonuçları kaydet", "config/seed not al", "note the config/seed", "deney geçmişine bak", "ne denemiştim", "logs'a bak", "check the logs". Records model training, fine-tuning, ablations, dataset experiments and debugging sessions, plus decisions that must persist, in a reproducible form. Paths and scope come from the project profile (.pi/beyin-project.json).
3
+ description: Experiment and decision record standard (project memory). Use for requests like "deney kaydet", "bu denemeyi yaz", "logs'a bak", "record this run", "check the logs". Records training, fine-tuning, ablations, dataset experiments, debugging sessions and decisions that must persist, in a reproducible form. Paths and scope come from .pi/beyin-project.json.
4
4
  ---
5
5
 
6
6
  # Experiment Record — Experiment and Decision Log
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: journal
3
- description: Daily journal (raw narrative) recording procedure. Use for requests like "günlük", "bugün ne yaptık", "günlüğe ekle", "bugünü kaydet", "gün sonu", "oturumu yaz", "dün ne yapmıştık", "günlüklerime bak", "journal this", "log today", "what did we do yesterday". Detects the system date, opens `YYYY-MM-DD.md` in the journal directory (creating it if absent) and adds what was done that day — including work done through conversation — as prose. The journal is the raw narrative layer; reports/summaries are derived from it. Path and scope come from the project profile.
3
+ description: Daily journal (raw narrative) procedure. Use for requests like "günlüğe ekle", "gün sonu", "dün ne yapmıştık", "journal this", "what did we do yesterday". Opens YYYY-MM-DD.md in the journal directory (creating it if absent) and adds that day's work — including work done through conversation — as prose. The journal is the raw layer; reports derive from it. Path from the project profile.
4
4
  ---
5
5
 
6
6
  # Journal — Raw Narrative Layer
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: literature
3
- description: Literature/paper reading-task assignment and note-taking procedure. Use for requests like "literatür", "makale oku", "paper oku", "şu makaleyi oku", "okuma görevi ver", "not ekle", "şunu okudum anlatayım", "teori çalış", "read this paper", "give me a reading task", "add a note". Assigns reading tasks with focus questions; when the user explains what they read, writes an ordered note into the literature directory. Applies the "concept before tool" principle. Paths come from the project profile.
3
+ description: Literature/paper reading-task assignment and note-taking procedure. Use for requests like "makale oku", "okuma görevi ver", "şunu okudum anlatayım", "read this paper", "give me a reading task". Assigns reading tasks with focus questions; writes an ordered note when the user explains what they read. Concept before tool. Paths from the project profile.
4
4
  ---
5
5
 
6
6
  # Literature — Task Assignment and Note-Taking
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: maintenance
3
- description: System maintenance / garbage-collection PROPOSAL procedure. Use for requests like "temizlik", "bakım", "sistemi toparla", "çöplükleri temizle", "clean up", "tidy the repo", "oturumu kapat", "yeni oturuma geçmeden temizle", "kompakte et", "compact the state". Also PROPOSE maintenance to the user at natural moments such as session close or phase transition. IMPORTANT — never runs on its own or on a schedule; it only proposes, and acts after user approval. Paths come from the project profile.
3
+ description: System maintenance / garbage-collection PROPOSAL procedure. Use for requests like "temizlik", "sistemi toparla", "kompakte et", "clean up", "compact the state". Also propose maintenance at natural moments such as session close. IMPORTANT — never runs on its own or on a schedule; it only proposes, and acts after user approval. Paths from the project profile.
4
4
  ---
5
5
 
6
6
  # Maintenance — Garbage Collection PROPOSAL (runs on approval)
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: source-distillation
3
- description: Capture an external source (web doc, arXiv/paper, local PDF archive, bookmark export) and distill it into a high-quality concept note in the vault. Use for requests like "şu siteyi vault'a al", "dokümanları damıt", "makale arşivini işle", "pdf'lerden not çıkar", "bookmarklarımı damıt", "şu URL'leri tara", "distill these docs", "turn this into notes", "process the paper archive". The quality wall and the secret/privacy gate are mandatory. Raw source paths come from the project profile.
3
+ description: Capture an external source (web doc, arXiv/paper, local PDF archive, bookmark export) and distill it into a source-linked concept note in the vault. Use for requests like "dokümanları damıt", "makale arşivini işle", "bookmarklarımı damıt", "distill these docs", "process the paper archive". The quality wall and the secret/privacy gate are mandatory. Raw source paths come from the project profile.
4
4
  ---
5
5
 
6
6
  # Source distillation (external source → vault)
@@ -57,29 +57,30 @@ EDITS = {
57
57
  "('codex', 'claude', 'antigravity', 'hermes', 'opencode', 'omp', 'pi')",
58
58
  ),
59
59
  ],
60
- # Python Jev istemcisi urllib varsayılan UA'sı ('Python-urllib/x') ile CommandCode'a gidince
61
- # Cloudflare 1010 -> HTTP 403 alıyor. openai-node UA'sı (pi-native yolun kullandığı) geçiyor.
62
- # Update sonrası 'ensure' yeniden uygular. Ayrıntı: work staj/logs/0111.
60
+ # The Python Jev client sends urllib's default UA ('Python-urllib/x') to CommandCode and gets
61
+ # Cloudflare 1010 -> HTTP 403. The openai-node UA (what the pi-native path uses) passes.
62
+ # 'ensure' re-applies this after every update. Measured 2026-10-15.
63
63
  ".claude/scripts/beyin_v3_jev_client.py": [
64
64
  (
65
65
  "headers={'Authorization':'Bearer '+key,'Content-Type':'application/json'}",
66
66
  "headers={'Authorization':'Bearer '+key,'Content-Type':'application/json','User-Agent':'openai-node/4.0.0'}",
67
67
  ),
68
68
  ],
69
- # CONTEXT_LIMIT (4000) Jev'in gerçek bağlam kapasitesinin çok altındaydı: 19943 kr bağlamla dahi
70
- # kanıt Sonda olduğu hâlde doğru verdict + yüksek confidence verdi (kırpma yok, 2026-10-15 ölçümü);
71
- # ~24424 kr'da transport sınırı devreye giriyor (`max_input_chars=24000`). 4000 iken >4000 kr notlar
72
- # `source_context_incomplete` ile doğrulanamıyordu (log 0114). 12000: her mevcut notu kapsar, güvenli bölgede.
69
+ # CONTEXT_LIMIT (4000) sat far below Jev's real context capacity: even with 19943 chars of context
70
+ # and the evidence at the very end, it returned the right verdict with high confidence (no
71
+ # truncation, measured 2026-10-15). The transport limit starts around 24424 chars
72
+ # (`max_input_chars=24000`). At 4000, notes longer than that failed as
73
+ # `source_context_incomplete`. 12000 covers every current note and stays in the safe zone.
73
74
  ".claude/scripts/beyin_v3_jev.py": [
74
75
  (
75
76
  "CONTEXT_LIMIT = 4000 # Jev; a provider with a smaller window reports context_limit",
76
77
  "CONTEXT_LIMIT = 12000 # Jev; measured >=19943 kr safe (2026-10-15); transport cap max_input_chars=24000",
77
78
  ),
78
79
  ],
79
- # memory_assessment tek istekte evidence + en fazla 4 prior gönderir; toplam gövde
80
- # max_input_chars'ı (24000) aşınca `budget_exceeded` ile tüm değerlendirme düşüyordu (log 0114).
81
- # Prior'lar opsiyonel, evidence zorunlu → bütçe yetmezse prior'ları sondan düşür. Bu,
82
- # "complete context" invariant'ını bozmaz (hiçbir kaynak özetlenmez/kırpılmaz).
80
+ # memory_assessment sends evidence plus up to 4 priors in one request; when the body exceeded
81
+ # max_input_chars (24000) the whole assessment failed with `budget_exceeded`. Priors are optional,
82
+ # evidence is required -> when the budget is tight, drop priors from the end. This does not break
83
+ # the "complete context" invariant: no source is summarized or truncated.
83
84
  ".claude/scripts/beyin_v3_memory_assessment.py": [
84
85
  (
85
86
  " try:\n"