Skip to content

Add cron bounded planning, skill path fixes, and color-coded agent logs#107

Merged
SergioChan merged 5 commits intomainfrom
feat/cron-bounded-plan-and-hide-package-names
Mar 12, 2026
Merged

Add cron bounded planning, skill path fixes, and color-coded agent logs#107
SergioChan merged 5 commits intomainfrom
feat/cron-bounded-plan-and-hide-package-names

Conversation

@SergioChan
Copy link
Member

@SergioChan SergioChan commented Mar 12, 2026

Summary

  • Add ANSI color-coded agent step logs and truncate verbose result output
  • Fix skill path resolution to use absolute paths instead of tilde shorthand
  • Add x-twitter-play skill

Why

Agent step logs ([thought], [decision], [result], [start], [end]) were all plain white in the terminal, making it very hard to visually scan for important information. Skill file reads also flooded the terminal with dozens of lines of content.

Changes

  • src/utils/cli-theme.ts: Add colorizeAgentLog() with per-section ANSI colors (cyan for thought, yellow for decision, green/dim/red for result variants, dim for metadata). Update runtimeTone to classify [step]/[model] lines.
  • src/agent/agent-runtime.ts: Wire logStepSection through colorizeAgentLog. Truncate multi-line result output to 4 lines + omission summary.
  • src/agent/model-client.ts: Wire model decision/thought logs through colorizeAgentLog.
  • src/skills/skill-loader.ts: Remove tilde shorthand from skill path resolution.
  • src/agent/tool-policy.ts: Use absolute paths for skill locations.
  • skills/x-twitter-play/SKILL.md: New skill definition.

Testing

  • Ran tsc --noEmit — compiles cleanly with no errors
  • Ran npm run build — dist output verified to contain colorizeAgentLog
  • Manual: restarted gateway and confirmed colored output in TTY terminal

Checklist

  • I ran relevant tests, or the Testing section explains why I did not.
  • I updated docs, or confirmed no doc changes were needed.
  • I confirmed the PR does not include secrets, credentials, or private data.

The skill loader compacts absolute paths to ~/... notation via
compactSkillPath, but path.resolve does not expand ~, causing the
agent's read tool to resolve ~/.openpocket/skills/... relative to the
workspace directory instead of the home directory. This resulted in
ENOENT when the agent tried to read local skill files.

Added expandTilde helper in resolveWorkspacePathPolicy so ~ paths
resolve correctly to os.homedir().

Made-with: Cursor
The model was stripping or misinterpreting the ~ prefix in skill paths,
using .openpocket/skills/... instead of ~/.openpocket/skills/..., which
resolved to workspace/.openpocket/... and caused ENOENT. Using absolute
paths eliminates the ambiguity entirely.

Made-with: Cursor
Agent step logs ([thought], [decision], [result], etc.) were all plain
white, making it hard to scan terminal output for important information.

- Add colorizeAgentLog() that applies per-section ANSI colors: cyan for
  thought, yellow for decision, green/dim/red for result variants, dim
  for metadata sections (start/input/end)
- Truncate multi-line result output to 4 lines with an omission summary,
  preventing skill reads and large outputs from flooding the terminal
- Update runtimeTone to classify agent/model lines for the gateway log
  path as well

Made-with: Cursor
@vercel
Copy link

vercel bot commented Mar 12, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
openpocket Ready Ready Preview, Comment Mar 12, 2026 4:33am

Request Review

@SergioChan SergioChan merged commit 0426ffd into main Mar 12, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant