Skip to content

feat: add SkillExecutor trait, session management, and skill-files parsing#5

Merged
bkataru merged 4 commits intomasterfrom
feature/skills-executor-and-sessions
Feb 1, 2026
Merged

feat: add SkillExecutor trait, session management, and skill-files parsing#5
bkataru merged 4 commits intomasterfrom
feature/skills-executor-and-sessions

Conversation

@bkataru
Copy link
Member

@bkataru bkataru commented Feb 1, 2026

Summary

This PR adds several major features to thulp-skills and thulp-workspace crates:

Skills Execution Abstraction

  • Add SkillExecutor trait for pluggable execution strategies
  • Add ExecutionContext for managing inputs/outputs/config between steps
  • Add StepResult type for individual step outcomes with timing and retry info
  • Add DefaultSkillExecutor<T, H> implementation using Transport trait

Lifecycle Hooks

  • Add ExecutionHooks trait for observing execution lifecycle
  • Add NoOpHooks, TracingHooks, and CompositeHooks implementations

Session Management (thulp-workspace)

  • Add Session type with turn counting and limits
  • Add SessionManager for async file-based persistence
  • Add session filtering and querying capabilities

Skill File Parsing (thulp-skill-files)

  • Add SKILL.md file parsing with YAML frontmatter
  • Add preprocessor for variable substitution ($ARGUMENTS, {{var}}, ${ENV})
  • Add multi-directory skill discovery with scope priority

Other Improvements

  • Add timeout and retry support for skill execution
  • Improve variable substitution to handle JSON object placeholders
  • Add Default derive for SkillStep

Testing

  • All 54 tests pass in thulp-skills
  • Clippy clean with -D warnings
  • Code formatted with rustfmt

Add configurable timeout and retry mechanisms to thulp-skills:

- TimeoutConfig: skill/step/tool level timeouts with configurable actions
- RetryConfig: max retries, backoff strategies (fixed/exponential/jitter)
- RetryableError: categorize retryable errors (network, rate limit, timeout)
- execute_with_config(): new method with full timeout/retry control
- Per-step timeout and retry overrides via SkillStep fields

This enables reliable skill execution for thulpoff evaluation runs
and ehb conversation handling.
Add comprehensive session management to thulp-workspace including:

- Session types with metadata, entries, and context storage
- SessionManager for async file-based persistence
- Turn counting with configurable limits (max turns, entries, duration)
- Session filtering by status, type, tags, and timestamps
- Entry types for user/assistant messages, tool calls, skill executions
- In-memory caching with disk persistence

This provides the foundation for tracking conversation history,
evaluation runs, and skill execution sessions across thulp tools.
Add thulp-skill-files crate for parsing Claude-style skill files:

- SkillFile parser for YAML frontmatter and markdown content
- SkillPreprocessor for $ARGUMENTS, {{variable}}, ${ENV}, and command substitution
- SkillLoader for discovering skills from multiple directories
- Scope-based priority resolution (Enterprise > Personal > Project)
- Tool restriction support via allowed-tools frontmatter
- Marketplace extensions (version, author, price, tags)

This enables thulp to load and execute skills defined in SKILL.md files
compatible with the Claude Code/OpenCode skill format.
- Add SkillExecutor trait abstracting skill execution logic
- Add ExecutionContext for managing inputs, outputs, and config between steps
- Add StepResult type for individual step outcomes with timing/retry info
- Add ExecutionHooks trait for lifecycle callbacks (before/after skill/step)
- Add DefaultSkillExecutor implementation using Transport trait
- Add NoOpHooks, TracingHooks, and CompositeHooks implementations
- Improve variable substitution to handle JSON object placeholders
- Add Default derive for SkillStep

This enables custom execution strategies and better observability
through the hooks system while maintaining backward compatibility.
@bkataru bkataru merged commit 8c52c85 into master Feb 1, 2026
4 of 10 checks passed
@bkataru bkataru deleted the feature/skills-executor-and-sessions branch February 1, 2026 06:06
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