Debugging
यह पृष्ठ streaming output के लिए debugging helpers को कवर करता है, विशेष रूप से जब एक provider सामान्य text में reasoning को मिलाता है।
Runtime debug overrides
Runtime-only कॉन्फ़िगरेशन overrides (memory, disk नहीं) सेट करने के लिए chat में /debug का उपयोग करें।
/debug डिफ़ॉल्ट रूप से अक्षम है; commands.debug: true के साथ सक्षम करें।
यह तब सुविधाजनक है जब आपको mayros.json संपादित किए बिना obscure settings toggle करने की आवश्यकता हो।
उदाहरण:
/debug show
/debug set messages.responsePrefix="[mayros]"
/debug unset messages.responsePrefix
/debug reset
/debug reset सभी overrides clear करता है और on-disk कॉन्फ़िगरेशन पर लौटता है।
Gateway watch mode
तेज़ iteration के लिए, file watcher के तहत gateway चलाएं:
bashpnpm gateway:watch
यह इसके लिए maps करता है:
bashnode --watch-path src --watch-path tsconfig.json --watch-path package.json --watch-preserve-output scripts/run-node.mjs gateway --force
gateway:watch के बाद कोई भी gateway CLI flags जोड़ें और उन्हें प्रत्येक restart पर pass किया जाएगा।
Dev profile + dev gateway (--dev)
State को isolate करने और debugging के लिए एक safe, disposable setup spin करने के लिए dev profile का उपयोग करें। दो --dev flags हैं:
- Global
--dev(profile):~/.mayros-devके तहत state को isolate करता है और gateway port को19001पर default करता है (derived ports इसके साथ shift होते हैं)। gateway --dev: Gateway को missing होने पर default कॉन्फ़िगरेशन + workspace auto-create करने के लिए कहता है (और BOOTSTRAP.md skip करता है)।
अनुशंसित flow (dev profile + dev bootstrap):
bashpnpm gateway:dev MAYROS_PROFILE=dev mayros tui
यदि आपके पास अभी तक global install नहीं है, तो pnpm mayros ... के माध्यम से CLI चलाएं।
यह क्या करता है:
-
Profile isolation (global
--dev)MAYROS_PROFILE=devMAYROS_STATE_DIR=~/.mayros-devMAYROS_CONFIG_PATH=~/.mayros-dev/mayros.jsonMAYROS_GATEWAY_PORT=19001(browser/canvas तदनुसार shift करते हैं)
-
Dev bootstrap (
gateway --dev)- Missing होने पर एक minimal कॉन्फ़िगरेशन लिखता है (
gateway.mode=local, bind loopback)। agent.workspaceको dev workspace पर सेट करता है।agent.skipBootstrap=trueसेट करता है (कोई BOOTSTRAP.md नहीं)।- Missing होने पर workspace files को seeds करता है:
AGENTS.md,MAYROS.md,TOOLS.md,IDENTITY.md,USER.md,HEARTBEAT.md। - डिफ़ॉल्ट identity: C3‑PO (protocol droid)।
- Dev mode में channel providers skip करता है (
MAYROS_SKIP_CHANNELS=1)।
- Missing होने पर एक minimal कॉन्फ़िगरेशन लिखता है (
Reset flow (ताज़ा शुरुआत):
bashpnpm gateway:dev:reset
नोट: --dev एक global profile flag है और कुछ runners द्वारा खाया जाता है।
यदि आपको इसे spell out करने की आवश्यकता है, तो env var form का उपयोग करें:
bashMAYROS_PROFILE=dev mayros gateway --dev --reset
--reset कॉन्फ़िगरेशन, credentials, sessions और dev workspace को wipes करता है (trash का उपयोग करके, rm नहीं), फिर डिफ़ॉल्ट dev setup को recreate करता है।
सुझाव: यदि कोई non‑dev gateway पहले से चल रहा है (launchd/systemd), तो पहले इसे रोकें:
bashmayros gateway stop
Raw stream logging (Mayros)
Mayros किसी भी filtering/formatting से पहले raw assistant stream को log कर सकता है। यह देखने का सबसे अच्छा तरीका है कि क्या reasoning plain text deltas के रूप में आ रहा है (या अलग thinking blocks के रूप में)।
इसे CLI के माध्यम से सक्षम करें:
bashpnpm gateway:watch --raw-stream
वैकल्पिक path override:
bashpnpm gateway:watch --raw-stream --raw-stream-path ~/.mayros/logs/raw-stream.jsonl
Equivalent env vars:
bashMAYROS_RAW_STREAM=1 MAYROS_RAW_STREAM_PATH=~/.mayros/logs/raw-stream.jsonl
डिफ़ॉल्ट file:
~/.mayros/logs/raw-stream.jsonl
Raw chunk logging (pi-mono)
Blocks में parse होने से पहले raw OpenAI-compat chunks को capture करने के लिए, pi-mono एक अलग logger expose करता है:
bashPI_RAW_STREAM=1
वैकल्पिक path:
bashPI_RAW_STREAM_PATH=~/.pi-mono/logs/raw-openai-completions.jsonl
डिफ़ॉल्ट file:
~/.pi-mono/logs/raw-openai-completions.jsonl
नोट: यह केवल pi-mono के
openai-completionsprovider का उपयोग करने वाली processes द्वारा emitted है।
Safety नोट्स
- Raw stream logs में पूर्ण prompts, tool output और user डेटा शामिल हो सकते हैं।
- Logs को स्थानीय रखें और debugging के बाद उन्हें delete करें।
- यदि आप logs साझा करते हैं, तो पहले secrets और PII scrub करें।