# memo-inbox — Pi scenario profile # # STATUS: as-found mirror. This file records what the live service actually does # as of 2026-08-27. It is NOT yet the target configuration. # # The migration into this repository is deliberately zero-behaviour-change: the # service is in daily use, so its launch flags are transcribed rather than fixed. # The gaps below are tracked in docs/isolation-baseline.md and are scheduled for # a separate pass (plan phase 5). [scenario] name = "memo-inbox" description = "Routes Kai's Telegram/WeChat messages into Google Calendar, today's Obsidian todo list, or a journal memo." workspace = "/home/claw/pi-workspaces/memo-inbox" session_dir = "/home/claw/.local/share/pi-memo-telegram/sessions" service = "pi-memo-telegram.service" # "mirror": this file records what the live host does; it is not yet the source # of truth. deploy-scenario.sh refuses --apply for mirrors so that a service in # daily use cannot be changed by a migration commit. Promote to "managed" only # together with the phase-5 isolation work. deploy = "mirror" # The gateway application lives inside the agent's own cwd, which is not ideal: # the workspace an agent can read should not contain the code that drives it. # Moving it is tracked as a follow-up; it is not a configuration change. gateway = "/home/claw/pi-workspaces/memo-inbox/telegram-gateway/gateway.py" [model] provider = "zenmux" primary = "x-ai/grok-4.6" # No fallback model is configured for this scenario. thinking = "medium" [session] # Implemented in gateway.py: PI_SESSION_ROTATE_AFTER_PROMPTS, plus an # additional messageCount >= 60 check in rotate_if_oversized(). rotate_after_prompts = 24 rotate_after_messages = 60 # Uses --continue rather than --session-id, so continuity depends on "most # recent session in this project" rather than an explicit identifier. strategy = "continue" [isolation] # ---- as-found ---- # Layers 3 and 4 are correct and are the reference implementation for the other # scenarios: memo-guard.ts calls setActiveTools(ALLOWED_TOOLS) on session_start # and resources_discover, and blocks anything else in a tool_call hook. capability_guard = true # pi.setActiveTools invocation_guard = true # pi.on("tool_call") -> block read_override = true # restricted read, workspace + vault only # Layer 1 is NOT applied: user-global extensions and skills load into this # agent. Measured leak from ~/.agents/skills: find-skills, modsearch, summarize. no_extensions = false # gap no_skills = false # gap no_prompt_templates = false # gap no_themes = false # gap no_builtin_tools = false # gap — relies on setActiveTools alone approve = true # passed on the command line # Layer 2 is NOT applied: the agent runs on pi's default coding-assistant system # prompt, with AGENTS.md layered on top as project context. system_prompt_file = "" # gap — no .pi/SYSTEM.md context_files = "AGENTS.md" [env] # gateway.py inherits the full process environment, so ASR_API_KEY and whatever # else the unit carries reach the node process and every extension it loads. minimal = false # gap [tools] # Enforced by ALLOWED_TOOLS in .pi/extensions/memo-guard.ts. # Note: SKILL.md also declares an `allowed-tools:` frontmatter field, but pi # 0.84.3 does not consume it. The array below is the only real enforcement. allow = [ "read", "image_view", "document_parse", "document_ocr", "vault_search", "journal_append", "journal_batch_append", "calendar_list", "calendar_create", "calendar_update", "calendar_delete", ] # Tools whose results are user-visible state changes. gateway.py harvests their # text from tool_execution_end and reports that, instead of trusting the model's # prose — the pattern the curator scenario should adopt. receipt_tools = [ "journal_append", "journal_batch_append", "calendar_create", "calendar_update", "calendar_delete", ] [backends] parser_base_url = "http://127.0.0.1:8090" # PI_MEMO_PARSER_BASE_URL ocr_base_url = "http://192.168.50.100:8001" # PI_MEMO_OCR_BASE_URL, LAN not loopback ocr_model = "firered-ocr" vault = "/home/claw/obsidian-vault" calendar_cli = "/home/claw/.npm-global/bin/gws" [secrets] # Not in this repository. env_file = "/home/claw/.secrets/pi-memo-telegram.env"