Compare commits
2 Commits
d456d3c86a
...
cc68839306
| Author | SHA1 | Date | |
|---|---|---|---|
| cc68839306 | |||
| 45196f352f |
@@ -98,6 +98,14 @@ export default definePluginEntry({
|
|||||||
lastPrompt = null;
|
lastPrompt = null;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
// Filter cron-initiated agent runs. OpenClaw's scheduled tasks fire
|
||||||
|
// agent sessions with prompts that begin "[cron:<id> ...]". These are
|
||||||
|
// automated polls (DXF email watcher, calendar reminders, etc.), not
|
||||||
|
// real user turns — they're pure noise in the AtoCore capture stream.
|
||||||
|
if (prompt.startsWith("[cron:")) {
|
||||||
|
lastPrompt = null;
|
||||||
|
return;
|
||||||
|
}
|
||||||
lastPrompt = { text: prompt, sessionKey: ctx?.sessionKey || "", ts: Date.now() };
|
lastPrompt = { text: prompt, sessionKey: ctx?.sessionKey || "", ts: Date.now() };
|
||||||
log.info("atocore-capture:prompt_buffered", { len: prompt.length });
|
log.info("atocore-capture:prompt_buffered", { len: prompt.length });
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -37,6 +37,17 @@ import urllib.error
|
|||||||
import urllib.parse
|
import urllib.parse
|
||||||
import urllib.request
|
import urllib.request
|
||||||
|
|
||||||
|
# Force UTF-8 on stdio — MCP protocol expects UTF-8 but Windows Python
|
||||||
|
# defaults stdout to cp1252, which crashes on any non-ASCII char (emojis,
|
||||||
|
# ≥, →, etc.) in tool responses. This call is a no-op on Linux/macOS
|
||||||
|
# where UTF-8 is already the default.
|
||||||
|
try:
|
||||||
|
sys.stdin.reconfigure(encoding="utf-8")
|
||||||
|
sys.stdout.reconfigure(encoding="utf-8")
|
||||||
|
sys.stderr.reconfigure(encoding="utf-8")
|
||||||
|
except Exception:
|
||||||
|
pass
|
||||||
|
|
||||||
# --- Configuration ---
|
# --- Configuration ---
|
||||||
|
|
||||||
ATOCORE_URL = os.environ.get("ATOCORE_URL", "http://dalidou:8100").rstrip("/")
|
ATOCORE_URL = os.environ.get("ATOCORE_URL", "http://dalidou:8100").rstrip("/")
|
||||||
|
|||||||
Reference in New Issue
Block a user