Skip to content

Extract tmq from bogocat/tms into a standalone AoE plugin #2

Description

@jakecelentano

Extract tmq from bogocat/tms into a standalone AoE plugin

Scope

Replace tms/bin/tmq (930-line bash) with a first-class Agent of Empires plugin living in its own repo bogocat/tmq. Same dispatch behavior, four new affordances:

  • Discoverable via aoe plugin info bogocat.tmq + the AoE marketplace (aoe plugin discover --topic aoe-plugin)
  • Invokable from the AoE command palette (TUI/web) under Plugin: tmq
  • Live pane UI showing in-flight + recent dispatches (closes tms#35)
  • One Python package, two console_scripts: aoe-tmq-worker (daemon) + tmq (CLI)

The package is scaffolded from agent-of-empires/plugin-template (Python runtime, api_version = 8). Plugin manifest declares capabilities runtime.worker, process.spawn, net, fs.read, fs.write, notifications and the commands dispatch, review, list_repos, status. The 20-repo baseline from tms/bin/tmq ships at aoe_tmq/data/default_registry.json and is shadowed by an optional per-user JSON.

Out of scope

  • PyPI publication (Phase 4 follow-up, will file after v0.1.0 tags)
  • AoE featured-index PR (Phase 4 follow-up)
  • New dispatch topology (e.g. tmq actor parallel-dispatcher) — additive, not in v0.1.0
  • Removing tms/bin/tmq itself — that's tms#73, separate repo (open after v0.1.0)
  • Changes to the tms_review.events table schema — writer-side caller = 'tmq' field lands, but no migrations

Acceptance criteria

  • bogocat/tmq repo created with MIT LICENSE, sourced from cookiecutter gh:agent-of-empires/plugin-template (Python runtime).
  • aoe-plugin.toml validates against Agent of Empires >=1.11.0, with api_version = 8, four [[commands]], six [[settings]], one [[ui]] slot="pane".
  • aoe plugin install ./ on a clean host produces .aoe-build/venv/bin/tmq-worker, registers bogocat.tmq, and the worker daemon answers plugin.bogocat.tmq.status within 5 s.
  • The four CLI commands (tmq <repo> <n>, tmq review <repo> <pr>, tmq list, tmq status) all behave equivalently to the bash implementation -- same session naming, same worktree policy, same prompt shape, same AoE/direct-tmux fallback behavior, same event-log rows in tms_review.events.
  • --agent cc under root still fails fast by default; TMQ_ALLOW_ROOT_CC=1 / plugin setting allow_root_cc=true opts in with a stderr warning (tms#39).
  • --provider / --model only valid with --agent pi, fail fast otherwise (tms#37).
  • tmq distillery 245 --type review resolves an issue->PR with no second gh call (uses TMQ_REVIEW_PR_NUM cache shape, replaces tms#10 review P1).
  • Reviews warn when dispatched model overlaps the reviewer panel (tms#55).
  • Worker pushes ui.state.set to tmq_pane on every dispatch/review: payload includes in_flight[] (current dispatches) + recent[] (last 10 events). Verified in aoe status pane tab or via ui.state.get dump.
  • Event log emits one events row per dispatch attempt and one dispatch_failed row on every failure path (root-refused, aoe-add-failed, aoe-start-failed). caller = 'tmq', provider matches the actual --provider flag (closes tms#67).
  • Tests: pytest green; ruff check clean; ruff format --check clean; mypy src clean. Coverage of worker contract + each handler.
  • v0.1.0 tagged, GitHub Actions release workflow attaches wheel + sdist.

References

Rollout

Phase Scope Status
0 Scaffold repo + cookiecutter + manifest v0.1.0-rc this issue
1 Install on operator hosts via aoe plugin install gh:bogocat/tmq + verify pane UI follow-up
2 tms#73: deprecate + remove tms/bin/tmq, update tms/install.sh to pipx install /root/tmq follow-up
3 PyPI publication + featured-index PR follow-up

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:dispatchDispatch + worktree + AoE spawn layerarea:pluginsAgent of Empires plugin workenhancementNew feature or requestepicMulti-PR epic tracking

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions