Commit 1a24eb3
feat(tools): mission tool family (engine v2)
Exposes the engine-v2 mission framework to the LLM via seven built-in
tools: mission_create, mission_list, mission_update, mission_delete,
mission_fire, mission_pause, mission_resume.
- src/tools/builtin/mission.rs (new, +705): the seven Tool impls.
Each holds an Arc<MissionManager>; cadence strings parse into
MissionCadence (cron / event: / webhook: / manual).
- src/tools/builtin/mod.rs: module + Tool re-exports.
- src/tools/registry.rs:
- PROTECTED_TOOL_NAMES gains the seven mission_* entries.
- New pub type MissionSlot — Arc<RwLock<Option<(Arc<MissionManager>,
ProjectId)>>> — for tools whose registration pre-dates the
engine's MissionManager construction.
- mission_slot field on ToolRegistry + public accessor.
- set_mission_slot(manager, project_id) to populate the slot.
- register_mission_tools(manager, project_id): instantiates all
seven tools against the supplied manager and fills the slot.
- src/bridge/router.rs init_engine(): calls
agent.tools().register_mission_tools(...) once MissionManager is
constructed, immediately before the bootstrap/resume calls.
Motivating use case: downstream integration tools (e.g. Abound's
send-wire wait-action in nearai/ironclaw-abound) need to create
missions via the generic engine-v2 surface. With this PR, a
downstream fork can register additional mission-using tools through
`ExternalToolRegistrar` (see #2871) and read the MissionManager
through the shared MissionSlot at execute time.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent d33fecb commit 1a24eb3
4 files changed
Lines changed: 815 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1826 | 1826 | | |
1827 | 1827 | | |
1828 | 1828 | | |
| 1829 | + | |
| 1830 | + | |
| 1831 | + | |
| 1832 | + | |
| 1833 | + | |
| 1834 | + | |
| 1835 | + | |
| 1836 | + | |
| 1837 | + | |
1829 | 1838 | | |
1830 | 1839 | | |
1831 | 1840 | | |
| |||
0 commit comments