fix(metis): switch primary model to claude-sonnet-4-6 + correct AGENTS.md inaccuracies
Source code change: - src/shared/model-requirements.ts: prepend claude-sonnet-4-6 to metis fallback chain so Sonnet becomes the default. Opus 4.7 max remains as the immediate fallback for callers who want extra reasoning. - src/shared/model-requirements.test.ts: update assertion to expect Sonnet primary + Opus secondary. AGENTS.md accuracy fixes (verified against source): - Agent modes: Sisyphus/Hephaestus are 'primary' (not 'all'); Sisyphus-Junior is 'subagent' (not 'all'). Confirmed via 'const MODE: AgentMode = ...' in each agent file. Also clarified Prometheus has no agentSources factory and is built via buildPrometheusAgentConfig. - Sisyphus fallback chain: corrected order to kimi-k2.6 → k2p5 → kimi-k2.5 → gpt-5.5 medium → glm-5 → big-pickle (was missing kimi-k2.5). - Librarian/Explore: added missing minimax-m2.7 step between -highspeed and claude-haiku-4-5. - Metis chain: removed fictitious gemini-3.1-pro entry. - Sisyphus-Junior chain: spelled out the actual fallback (was 'user-configurable'). - Temperatures: Sisyphus/Hephaestus do not set explicit temperature (model default); Sisyphus-Junior is 0.1 via SISYPHUS_JUNIOR_DEFAULTS. - Quick category default: gpt-5.4-mini (not gpt-5.4-mini-fast). Team-mode corrections: - Eligibility registry has 3 verdicts: eligible (sisyphus, atlas, sisyphus-junior), conditional (hephaestus — needs D-36 teammate permission), hard-reject (oracle, librarian, explore, multimodal-looker, metis, momus, prometheus). - Schema has 11 fields, not 4: added max_messages_per_run, max_wall_clock_minutes, max_member_turns, base_dir, message_payload_max_bytes, recipient_unread_max_bytes, mailbox_poll_interval_ms. - Hooks: 'team-session-events' is 4 sub-handlers in src/plugin/event.ts (team-idle-wake-hint, team-lead-orphan-handler, team-member-error-handler, team-member-status-handler), not a single Continuation-tier hook. - Tier counts now show base + team-mode: ToolGuard 14/15, Transform 5/7. - Total: 52 base hooks, 59 with team-mode. Doc cascade for the Metis change: - docs/guide/orchestration.md, agent-model-matching.md, installation.md - docs/reference/configuration.md, features.md
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
|
||||
## OVERVIEW
|
||||
|
||||
OpenCode plugin (npm: `oh-my-opencode`, dual-published as `oh-my-openagent` during the rename transition) extending OpenCode with 11 agents, ~50 lifecycle hooks across 57 dirs, 20–39 tools (gated by config flags including team-mode), 3-tier MCP system (built-in + .mcp.json + skill-embedded), Hashline LINE#ID edit tool, IntentGate keyword detector, Team Mode (parallel multi-agent coordination, OFF by default), and Claude Code compatibility. **1967 TypeScript files (1304 source + 663 test), 278k LOC, 120 barrel `index.ts` files.** Entry: `src/index.ts` → 7-step init.
|
||||
OpenCode plugin (npm: `oh-my-opencode`, dual-published as `oh-my-openagent` during the rename transition) extending OpenCode with 11 agents, 52–59 lifecycle hooks (base / +team-mode) across 57 dirs, 20–39 tools (gated by config flags including team-mode), 3-tier MCP system (built-in + .mcp.json + skill-embedded), Hashline LINE#ID edit tool, IntentGate keyword detector, Team Mode (parallel multi-agent coordination, OFF by default), and Claude Code compatibility. **1967 TypeScript files (1304 source + 663 test), 278k LOC, 120 barrel `index.ts` files.** Entry: `src/index.ts` → 7-step init.
|
||||
|
||||
## STRUCTURE
|
||||
|
||||
@@ -84,20 +84,32 @@ pluginModule.server(input, options)
|
||||
|
||||
OFF by default. Parallel multi-agent coordination, modeled after Claude Code Agent Teams. Enable via `team_mode.enabled` in `.opencode/oh-my-opencode.jsonc` or user config; restart OpenCode after change.
|
||||
|
||||
Full schema in [`src/config/schema/team-mode.ts`](file:///Users/yeongyu/local-workspaces/omo/src/config/schema/team-mode.ts) (11 fields):
|
||||
|
||||
```jsonc
|
||||
{
|
||||
"team_mode": {
|
||||
"enabled": true,
|
||||
"max_parallel_members": 4,
|
||||
"max_members": 8,
|
||||
"tmux_visualization": false
|
||||
"tmux_visualization": false,
|
||||
"max_parallel_members": 4, // 1..8
|
||||
"max_members": 8, // 1..8 hard cap
|
||||
"max_messages_per_run": 10000,
|
||||
"max_wall_clock_minutes": 120,
|
||||
"max_member_turns": 500,
|
||||
"base_dir": null, // override default ~/.omo/teams or <project>/.omo/teams
|
||||
"message_payload_max_bytes": 32768, // ≥1024
|
||||
"recipient_unread_max_bytes": 262144, // ≥1024
|
||||
"mailbox_poll_interval_ms": 3000 // ≥500
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Teams live as directories under `~/.omo/teams/{name}/config.json` (user) or `<project>/.omo/teams/{name}/config.json` (project; project beats user on collisions). Members declared as `kind: "subagent_type"` (direct agent) or `kind: "category"` (routed through `sisyphus-junior`).
|
||||
|
||||
**Eligible members only:** sisyphus, atlas, sisyphus-junior, hephaestus. Read-only / orchestration agents (oracle, librarian, explore, multimodal-looker, metis, momus, prometheus) are rejected at parse time — use `task` (delegate) for those.
|
||||
**Member eligibility** (from [`AGENT_ELIGIBILITY_REGISTRY`](file:///Users/yeongyu/local-workspaces/omo/src/features/team-mode/types.ts)):
|
||||
- `eligible`: sisyphus, atlas, sisyphus-junior
|
||||
- `conditional`: hephaestus (lacks `teammate: "allow"` permission by default — apply D-36 in `tool-config-handler.ts` or use `subagent_type: "sisyphus"` instead)
|
||||
- `hard-reject`: oracle, librarian, explore, multimodal-looker, metis, momus, prometheus (rejected at parse — use `task`/delegate-task)
|
||||
|
||||
**Storage layout** (`~/.omo/teams/{name}/`): `config.json` (spec), `state.json` (runtime), `mailbox/` (messages), `tasklist.jsonl` (tasks), `worktrees/` (per-member git worktrees).
|
||||
|
||||
@@ -153,7 +165,7 @@ Schema autocomplete: `"$schema": "https://raw.githubusercontent.com/code-yeongyu
|
||||
|
||||
- **Canonical agent order:** Sisyphus → Hephaestus → Prometheus → Atlas. Enforced by `installAgentSortShim()` (patches `Array.prototype.toSorted`/`.sort` narrowly when the array contains ≥2 canonical core agents). See [`src/plugin-handlers/AGENTS.md`](file:///Users/yeongyu/local-workspaces/omo/src/plugin-handlers/AGENTS.md) for the full history of why this exists.
|
||||
- **Hashline edit + read pairing:** Every `Read` tool output is tagged with `LINE#ID` content hashes; `hashline_edit` validates the hash before applying. Stale hash → reject.
|
||||
- **5-tier hook composition:** Session (24) + ToolGuard (14) + Transform (5) + Continuation (7) + Skill (2). Composed by `createCoreHooks()` + `createContinuationHooks()` + `createSkillHooks()`.
|
||||
- **5-tier hook composition:** Session (24) + ToolGuard (14) + Transform (5) + Continuation (7) + Skill (2) = 52 base. With `team_mode.enabled`: +1 ToolGuard (`team-tool-gating`), +2 Transform (`team-mode-status-injector`, `team-mailbox-injector`), +4 direct event handlers in `src/plugin/event.ts` (`team-session-events/*`) = 59 total. Composed by `createCoreHooks()` + `createContinuationHooks()` + `createSkillHooks()`.
|
||||
- **Per-session MCP isolation:** Tier-3 MCP clients keyed by `${sessionID}:${skillName}:${serverName}` so the same skill in two sessions does not share state.
|
||||
- **Two fallback systems:** `model-fallback` (proactive, chat.params) vs `runtime-fallback` (reactive, session.error). They operate independently — no direct integration.
|
||||
- **OpenClaw bidirectional:** Outbound dispatchers fire on session events; inbound daemon polls Discord/Telegram and `send-keys` replies into the tracked tmux pane.
|
||||
|
||||
Reference in New Issue
Block a user