Skip to content

feat: implement agent workflow tracking and CAD engine lazy loading. - #15

Merged
archat-hash merged 4 commits into
mainfrom
feature/agent-workflow-tracking
Jul 11, 2026
Merged

archat-hash merged 4 commits into
mainfrom
feature/agent-workflow-tracking

Conversation

@archat-hash

Copy link
Copy Markdown
Owner

This PR introduces a robust workflow logging system to improve agent auditability and context awareness, while also optimizing how the CAD engine is initialized to prevent unnecessary resource consumption.

Key Changes

1. Agent Workflow Tracking & Logging (feat(agent))

  • AgentWorkflowService: Added a new service to track and log agent actions, as well as manage the current execution plan.
  • AgentStorage: Implemented a local file-based storage layer (.flycli/agent_logs/) that saves logs in .jsonl format. It automatically handles file rotation when logs exceed 1MB.
  • Context Summarization: The agent can now retrieve a formatted summary of its recent actions and current plan, helping it maintain context over long, persistent sessions.
  • CLI Interception: Added full CLI interception for agent auditability via the flycli agent commands.

2. FreeCAD Engine Optimization (fix(cad))

  • Lazy Loading: Implemented a lazyStart mechanism for the FreeCAD engine process in cad.js.
  • Resource Management: FreeCAD will no longer launch automatically when the CLI starts. It now only initializes when a CAD tool (like renderCadQuery or getEngineState) is explicitly invoked.
  • UX Improvements: Updated the startup banner to reflect the lazy-loading behavior, preventing unwanted application pop-ups for users not actively using CAD features.

Impact

  • Observability: Developers and the agent itself can now audit past actions and maintain a persistent plan across restarts.
  • Performance: Faster CLI startup times and reduced background resource usage by deferring FreeCAD's initialization.

- Add `AgentWorkflowService` and `AgentStorage` for JSONL log rotation
- Intercept 100% CLI execution at the top level of `index.js`
- Introduce `flycli agent` command tree (log, plan set, context)
- Add ADR 003 explaining Interface Decoration decision
- Bump version to 1.5.0
- Add comprehensive integration and unit tests for the interceptor
@archat-hash
archat-hash merged commit 0184155 into main Jul 11, 2026
2 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