9f6d0d2281
- Bump root AGENTS.md header: 2026-05-14 → 2026-05-15, commit5ffbe0e24→53a740636, release v4.1.1 → v4.1.2 - Update file counts: 2034 (1337+697) → 2041 (1340+701), LOC ~292k → ~294k - Fix STRUCTURE: openclaw lives at src/openclaw/ (not src/features/); list more accurate feature modules in the parenthetical - Clarify interactive_bash gate: tmux binary on PATH via isInteractiveBashEnabled() (not 'tmux enabled') - Fix docs/reference/features.md hook counts: Tool Guard 14→16, Total base 52→54, total with team-mode 59→61 - Bump 'Generated' date on all 43 subdir AGENTS.md files to 2026-05-15 - Preserve promptAsync injection cautions verbatim (per request)
2.3 KiB
2.3 KiB
src/tools/call-omo-agent/ — Direct Agent Invocation Tool
Generated: 2026-05-15
OVERVIEW
23 files. The call_omo_agent tool — direct invocation of named agents (explore, librarian only). Distinct from delegate-task: no category system, no skill loading, no model selection. Fixed agent set, same execution modes (background/sync).
DISTINCTION FROM delegate-task
| Aspect | call_omo_agent |
delegate-task (task) |
|---|---|---|
| Agent selection | Named agent (explore/librarian) | Category or subagent_type |
| Skill loading | None | load_skills[] supported |
| Model selection | From agent's fallback chain | From category config |
| Use case | Quick contextual grep | Full delegation with skills |
ALLOWED AGENTS
Only explore and librarian — enforced via ALLOWED_AGENTS constant in constants.ts. Case-insensitive validation.
EXECUTION MODES
Same two modes as delegate-task:
| Mode | File | Description |
|---|---|---|
| Background | background-agent-executor.ts |
Async via BackgroundManager |
| Sync | sync-executor.ts |
Create session → wait for idle → return result |
KEY FILES
| File | Purpose |
|---|---|
tools.ts |
createCallOmoAgent() factory — validates agent, routes to executor |
background-executor.ts |
Routes to background or sync based on run_in_background |
background-agent-executor.ts |
Launch via BackgroundManager.launch() |
sync-executor.ts |
Synchronous session: create → send prompt → poll → fetch result |
session-creator.ts |
Create OpenCode session for sync execution |
subagent-session-creator.ts |
Create session with agent-specific config |
subagent-session-prompter.ts |
Inject prompt into session |
completion-poller.ts |
Poll until session idle |
session-completion-poller.ts |
Session-specific completion check |
session-message-output-extractor.ts |
Extract last assistant message as result |
message-processor.ts |
Process raw message content |
message-dir.ts + message-storage-directory.ts |
Temp storage for message exchange |
types.ts |
CallOmoAgentArgs, AllowedAgentType, ToolContextWithMetadata |
SESSION CONTINUATION
Pass session_id to resume an existing session rather than create a new one — handled in both executors.