Skip to content

feat(work): structured forms, validation rules, worker engine#1231

Open
ohdearquant wants to merge 1 commit into
mainfrom
feat/work-system
Open

feat(work): structured forms, validation rules, worker engine#1231
ohdearquant wants to merge 1 commit into
mainfrom
feat/work-system

Conversation

@ohdearquant
Copy link
Copy Markdown
Owner

Summary

  • Adds lionagi/work/ module: WorkForm (typed field containers with lifecycle FSM), Rule/RuleSet (declarative validation), WorkerDefinition (YAML/JSON loader), WorkEngine (thread-safe sync+async dispatcher), @worker decorator
  • Adds lionagi/runtime/scheduler.py: cron-based SchedulerEngine with parse_cron/next_cron_fire
  • Adds lionagi/cli/cleanup.py: li state cleanup for run dirs, team files, logs, DB vacuum
  • Wires schedule add/list/pause/resume/remove subcommands into CLI

Extracted from #1189 (stripped ADR docs and unrelated files).

Test plan

  • uv run pytest tests/work/ tests/test_work/ tests/cli/test_cleanup.py — all pass
  • CI green on this branch

🤖 Generated with Claude Code

Adds the lionagi.work module (forms, validation rules, worker definitions,
engine), lionagi.runtime.scheduler (SchedulerEngine + cron parser), and
updates the CLI with a new SchedulerEngine-backed schedule subcommand,
cleanup command, config command, and charter orchestration subcommand.

Fix: move _do_match to module level in rules.py so it is picklable on
macOS spawn-based multiprocessing (local functions cannot be pickled).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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