Repository navigation
feat(workflows): agent workflows — phase-keyed task lifecycle playbooks - #3008
Conversation
Phase-keyed workflow domain (WORKFLOW.md + frontmatter) mirroring the skills domain: parse/discover/select/workdir/ops/inject/schemas with user+project scope (project shadows user, trust-gated). Workflows bind to task lifecycle phases (on_pick_up_task/on_close_task/on_enter_directory). RPC namespace 'workflows' (list/read/create/uninstall/phase) wired into the controller registry. 36 unit tests.
…ent, i18n AgentWorkflows page (list/view/create/delete) mirroring Skills, with WorkflowCard/WorkflowDetailDrawer/CreateWorkflowModal/PhaseEditor, workflowsApi (5 RPC wrappers), workflowsSlice (thunks+selectors), /workflows route, and workflows.* i18n keys across all 12 locales. 35 Vitest tests (page 8, api 12, slice 15).
…sk hooks Thread PromptContext.workflows through all agents + render the available- workflows catalog; add workflow_load / workflow_phase agent tools (phase scripts run through the gated ShellTool so the ApprovalGate applies); register both in the session builder and the orchestrator/integrations agent.toml allowlists; add task-board status->phase detection hooks in todos/ops; self-contained run_git_sync in workdir. Verified: lib + all test targets compile; 48 workflow tests pass (36 core + 12 tool tests).
Add json_rpc_workflows_lifecycle_round_trip (create -> list -> read -> phase -> uninstall over the real axum stack, isolated under a temp HOME) and the automation.agent_workflows capability entry in the about_app catalog. Apply rustfmt across the workflow domain files.
Resolve i18n conflicts from upstream's chunk-file removal: keep the new flat-file en.ts (workflows + conversations blocks both retained), drop the obsolete chunks/<locale>-5.ts files our branch had modified. Workflow domain, RPC, UI, about_app capability, and e2e test all preserved. Verified: cargo check clean, pnpm typecheck 0 errors, i18n:check exit 0.
After upstream's chunk-file removal, the workflows.* + nav.workflows keys existed only in en.ts. Mirror them into every flat locale file (English placeholders, real translations to follow) so pnpm i18n:check passes the changed-line coverage gate.
Add a 'workflows' pill (Beta) to the Intelligence PillTabBar that renders the existing AgentWorkflows management UI inline, alongside the standalone /workflows route. Reuses the workflows slice/API. Adds the memory.tab.workflows / memory.tab.workflowsDescription i18n keys (deduped in en.ts, mirrored to all 12 locales). Verified: typecheck 0 errors, i18n:check exit 0.
|
Warning Review limit reached
More reviews will be available in 56 minutes and 54 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (92)
Comment |
Use symlink_metadata (not exists(), which dereferences) when checking the WORKFLOW.md marker so a symlinked marker inside a discovery directory is not followed and read — consistent with the non-symlink parent-dir guard in scan_root. Carried over from review feedback on the prior PR tinyhumansai#2897. Adds a unix symlink-rejection test.
Summary
Adds Agent Workflows — user/project
WORKFLOW.mdplaybooks (mirroring the skills domain) that bind behavior to a task's lifecycle phases (on_pick_up_task,on_close_task,on_enter_directory). At each phase a workflow can inject rules, run scripts through the existing approval-gated shell, scope visible tools, and surface working-directory (git) context. No bespoke executor — phase scripts reuseShellTool; everything else is context injected into the agent's turn.Changes
src/openhuman/agent_workflows/— types, frontmatter parse, user/project discovery (project-shadows-user, trust-gated), create/read/uninstall ops, phase guidance + effective tool-scope resolution, git working-dir context, prompt catalog renderer.workflows(list/read/create/uninstall/phase) wired into the controller registry (CLI + JSON-RPC).PromptContext.workflowsthreaded through agents + catalog render;workflow_load/workflow_phaseagent tools (phase scripts run through the gatedShellTool, so theApprovalGateapplies unchanged); orchestrator/integrationsagent.tomlallowlists; task-board status→phase hooks./workflowspage (list/view/create/delete) + a Workflows chip on the Intelligence page;workflowsApi,workflowsSlice;workflows.*+nav.workflows+memory.tab.workflows*i18n keys across all 12 locales.automation.agent_workflowsin the about_app catalog.Testing
cargo checkclean;agent_workflows39 unit tests +workflow_tools13 tests pass; JSON-RPC E2E round-trip (json_rpc_workflows_lifecycle_round_trip) green.pnpm typecheck0 errors; Vitest (page/api/slice, 35 tests);pnpm i18n:checkexit 0 (13 locales, 0 missing).cwd_jail::macos::seatbelt_blocks_write_outside_root(sandbox env; file untouched by this branch).Submission Checklist