Repository navigation
[tinyagents-slim] harness-tools: new tinyagents-harness-tools crate (todos, goals, plan_exit, use_skill, clarification, time, subagent tools) #57
Description
Parent: tinyhumansai/openhuman#8088
Context
A new crate holds every default tool tinyagents defines, together with the harness-level functionality behind them. Tool infrastructure stays in tinyagents-harness: rules, deferral, discover, select, schema prep and the timeout wrapper. This is the tool implementation side.
| Moves in | From | Lines (non-test) |
|---|---|---|
todos (TodoTool, store, TodoSequenceMiddleware, TodoList) |
tinyagents-graph/src/todos/ |
1,271 |
goals (GoalTool, GoalToolKind, store, budget, prompt block) |
tinyagents-graph/src/goals/, minus continuation.rs (deleted, no consumer) |
1,058 |
thread_locks |
tinyagents-graph/src/thread_locks/ |
104 |
AskClarificationTool, CurrentTimeTool, ResolveTimeTool |
tinyagents-harness/src/tools/ |
part of 1,160 |
PlanExitTool, PLAN_EXIT_MARKER |
tinyagents-harness/src/tool/plan_exit.rs |
— |
UseSkillTool, PackCatalog |
tinyagents-harness/src/tool/packs/ |
— |
DriverSubAgentTool, SubAgentJobsTool, SubAgentMessageTool (feature subagents, depends on orchestration) |
tinyagents-orchestration/src/subagent/invocation/{driver_tool,jobs}.rs |
tool shells only |
PerCallTool<T> (generic per-call rebuild wrapper, made generic over its context) |
OpenHuman tools/per_call.rs (204) |
204 |
WaitTool and WaitLoopTool are deleted, not moved; OpenHuman drops them. Delete the unused exports on the way: goal_tools, register_goal_tools, todo_tools, register_todo_tools, GoalProgress and TurnOutcome.
Goals gaps to close here, since OpenHuman's host goals adapter is deleted by senamakel/openhuman#209:
- A
GoalObserver(on_updated(&ThreadGoal),on_cleared(thread)) that fires on resume, clear, account and complete, not only on tool calls. - A turn-prep helper: load, auto-resume if paused,
active_goal_context_block, andGoalBudgetStopHook::for_goal. This is what the host inlines today insession_host/runtime_session/prelude.rs:213-251. - A correct budget-meter throttle. The host version compares one turn's delta against 5% of the budget instead of tracking usage since the last publish, so the meter goes stale. Make
account_turnatomic: the host reads, then accounts, and races. Take elapsed time as aDuration, not whole seconds; the host truncates sub-second turns to 0.
tinyagents-hooks' goals feature repoints at this crate.
Scope
- Create
crates/tinyagents-harness-toolswith featurestodos,goals,subagents,skills(default: all butsubagents). - Move the rows above with their tests, and port the
e2e_graph_goals/e2e_graph_todosintegration tests and thegoals_and_todosexample. - Add
GoalObserver, the turn-prep helper and the fixed throttle/atomicaccount_turn, each test-first. - Repoint
tinyagents-hooks(stop/goal_budget.rs) at the new crate. - Leave no re-export shims in graph or harness; graph is deleted by [tinyagents-slim] graph: delete the
tinyagents-graphcrate #61.
Acceptance criteria
- Test: many small turns publish a meter update once cumulative usage since the last publish crosses the threshold.
- Test: concurrent
account_turncalls produce a consistent status transition and exactly one observer event per transition. - Test:
GoalObserverfires on resume, clear, account and complete. tinyagents-harness-toolsdepends only ontinyagents-harness,tinytoolsand (featuresubagents)tinyagents-orchestration.dependency_boundary.rsis updated to assert it.
Done when: the rows above are gone from their source directories and the gates below pass.
Agent brief
Depends on: none · Blocks: #61 · #65 · senamakel/openhuman#209
Research first
- Can the subagent tool shells move without dragging
SubAgentJobRegistryalong? If not, harness-tools re-exports the registry type behindsubagentsand the registry stays in orchestration.
Files to consider
- Read:
crates/tinyagents-graph/src/{todos,goals,thread_locks}/,crates/tinyagents-harness/src/{tools,tool/plan_exit.rs,tool/packs}/ - Read: OpenHuman
crates/openhuman-core/src/agent/goals/runtime.rs(the throttle bug at ~170-180, the non-atomic account at 131-148) - Change:
Cargo.toml(workspace members),crates/tinyagents-hooks/Cargo.toml,crates/tinyagents-integration-tests/
Workflow: implementing-an-epic step; follow openhuman's migrate-to-submodule skill for the release and the OpenHuman gitlink bump
Subagents: plan-writer on Opus for the crate layout, then tdd-implementer on Sonnet, then code-reviewer before the PR.
Gates: cargo check --workspace --all-targets · cargo clippy --workspace --all-targets -- -D warnings · cargo test --workspace (in vendor/tinyagents)
Deep dive (orchestration audit)
Per-file detail of what moves from orchestration: tinyhumansai/openhuman#8088 (comment).
- Correction to the dependency rule: the moved subagent shells import
tinyagents_tasks::{TaskStore, OrchestrationTaskFilter, DetachedTaskRegistryError}andtinyinference_llm::Message(jobs.rs:16,26). harness-tools therefore depends ontinyagents-tasksandtinyinference-llmtoo, behindsubagents. - Make these registry methods
pub:wait_owned,cancel_owned,get_owned,try_get_owned,try_list_owned,send_message_owned,send_message_with_request_id,register_driver_job,mark_running,mark_driver_result,driver_job_for_key. Also makeDriverJobRegistrationandSubagentRequest::resume()public. sessions_tests.rs:217,360,414andjobs_tests.rsmove with the shells. A dev-dependency from orchestration back onto harness-tools would be circular.- Plan review and plan mode are a separate leaf, [tinyagents-slim] harness-tools: plan review and plan mode (
request_plan_review, review store, run-mode store) #70, built on this crate.
Activity
senamakel commentedon Oct 18, 2026
Integrated into the fork epic branch in merge commit 1127dd7, preserving the full history from canonical PR tinyhumansai#497 (reviewed head 2025677). All current-head hosted checks pass; local workspace tests passed 5637 tests, and affected graph/tools tests passed 609 after dependency cleanup. Independent review approved the restored behavior coverage. Canonical PR remains a genuine dependency draft until PR tinyhumansai#496 lands externally; no upstream merge was performed.