feat: XDG Base Directory Specification for logging#214
Closed
shuv1337 wants to merge 1 commit intoopenclaw:mainfrom
Closed
feat: XDG Base Directory Specification for logging#214shuv1337 wants to merge 1 commit intoopenclaw:mainfrom
shuv1337 wants to merge 1 commit intoopenclaw:mainfrom
Conversation
- Add resolveXdgStateHome() and resolveLogDir() to config/paths.ts - Move log directory from /tmp/clawdbot to $XDG_STATE_HOME/clawdbot/logs - Default: ~/.local/state/clawdbot/logs - Override via CLAWDBOT_LOG_DIR environment variable - Follows XDG spec: https://specifications.freedesktop.org/basedir-spec/ This enables centralized, persistent logging that survives reboots and follows the freedesktop.org standard for user state files.
dgarson
added a commit
to dgarson/clawdbot
that referenced
this pull request
Feb 7, 2026
* feat: add configurable subsystem debug log suppression * docs: add changelog entry and test script for suppressSubsystemDebugLogs * docs: add implementation summary * feat(meridia): multi-factor memory relevance scoring system Implement a comprehensive scoring system that evaluates whether experiences should become long-term memories based on five weighted factors: - **Novelty**: Is this new information or repetition? - **Impact**: Does this change understanding, behavior, or system state? - **Relational**: Does this connect to known entities/people/projects? - **Temporal**: Is this time-sensitive or evergreen? - **User Intent**: Was this explicitly marked as important? Features: - Configurable weights for each factor (normalized to sum to 1.0) - Named threshold profiles: balanced, aggressive, conservative, minimal - Override rules for specific tools (glob-pattern matching) - evaluateMemoryRelevance() as primary entry point - shouldCapture(), shouldPersistToGraph(), shouldUseLlmEval() helpers - Backward-compatible evaluateHeuristic() now delegates to scoring system - New evaluateHeuristicDetailed() returns full scoring breakdown - 37 comprehensive tests covering all factors and edge cases Files: - extensions/meridia/src/meridia/scoring/types.ts - extensions/meridia/src/meridia/scoring/config.ts - extensions/meridia/src/meridia/scoring/factors.ts - extensions/meridia/src/meridia/scoring/index.ts - extensions/meridia/src/meridia/scoring/scoring.test.ts - extensions/meridia/src/meridia/evaluate.ts (updated) * SDK runner: close message processing parity gaps with Pi embedded agent - Gap 1 (HIGH): Add streaming block replies during the event loop via blockReplyBreak/blockReplyChunking params. Supports "message_end" (flush at message boundaries) and "text_end" (per-chunk) modes, matching Pi embedded's streaming delivery. Final onBlockReply is skipped when streaming was active to avoid duplicate delivery. - Gap 2 (MEDIUM): Add onReasoningStream callback support. Extract thinking/reasoning text from SDK events classified as "system" and emit via the new callback, enabling reasoning display in UIs. - Gap 3 (MEDIUM): Reset chunks/assistantSoFar at message boundaries so onPartialReply reflects only the current message, not accumulated text from all prior turns. - Gap 5 (LOW-MED): Add enforceFinalTag support. When enabled, only content inside <final>...</final> tags is returned, preventing intermediate narration leakage from non-Claude models. Adds shared extractFinalTagContent() utility. - Gap 6 (LOW-MED): Map all payload fields (mediaUrl, mediaUrls, replyToId, replyToTag, replyToCurrent, audioAsVoice) in adaptSdkResultToPiResult to prevent silent field loss. Wire all new params through the full chain: executor.ts → AgentRuntimeRunParams → sdk-agent-runtime → sdk-runner-adapter → sdk-runner https://claude.ai/code/session_013FRzxnpzCwncubghL7GGCF * additional merge conflict resolution --------- Co-authored-by: Claude <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Move logging directory from
/tmp/clawdbotto XDG-compliant location.Changes
resolveXdgStateHome()andresolveLogDir()toconfig/paths.tslogging.tsto use XDG state directory~/.local/state/clawdbot/logsCLAWDBOT_LOG_DIRenvironment variableBenefits