ai-agentmanager 1.1.0 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,30 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.3.0 (2026-10-31)
4
+
5
+ - **Review changes:** each agent's changes in one screen: changed files, the diff file by file (new files included), line comments sent to the agent as one message, **Commit all**, and **Push & open PR** with `gh`. `agentmgr changes`, `comment`, `commit`, `pr`.
6
+ - **Land tab:** every agent's open pull request by what it needs: ready to merge, needs fixes, behind its base, waiting, drafts, with **Merge**, **Auto-merge**, **Update** (merge the base branch in and push, or ask the agent) and **Ask to fix**. `agentmgr land`.
7
+ - **Failing checks and requested changes go back to the agent:** once per commit, at most 3 times per pull request (`landing` in config.json).
8
+ - **Pull request status:** checks, review decision and conflicts on each agent's pull requests.
9
+ - **Triggers:** labeled GitHub issues start agents (in the repos or owners you list, once per issue), `/agent …` comments on an agent's pull request from the repo's owners, members or collaborators reach the agent, and `POST /api/hooks/agents` with a token starts agents from Jira automation, CI or scripts. No session watches, so no tokens are spent. **Assistant → Triggers…**, `agentmgr triggers`.
10
+ - **Linear:** Linear issue links are recognized like Jira's (the agent is named `ENG-42`, one agent per issue for the assistant), and the assistant can watch Linear issues assigned to you.
11
+ - **Repo memory:** agents record what they learn about a repository (`agentmgr learn`, allowed without a prompt), and every later agent there starts with it. **Repo memory** on an agent to view and tidy it, `agentmgr memory`.
12
+ - **Playbooks:** saved requests with `{{values}}` filled in at run time, run in several projects at once (one agent each), by hand or on a schedule (every hour, day, weekday or week). **Backlog → Playbooks**, **Save as playbook…** in New agents, `agentmgr playbook`.
13
+ - **Results:** **Results** in the top bar shows how agents did over a period: PRs opened and merged, merge rate, median time to a first PR and to merge, cost per merged PR, by engine and model, by source and by project. `agentmgr stats`.
14
+ - **Spend and budgets:** the same dialog shows today's cost, the last two weeks and the costliest agents. A budget per agent (an alert at 80%, the session closed at 100% until you raise it) and a daily limit that stops new agents from starting. `agentmgr spend`, `agentmgr edit --budget`.
15
+ - **Getting started:** with no agent open, a checklist shows what is set up (first agent, Slack alerts, assistant or triggers, phone access, a budget), each with the button that does it, and anything this machine is missing (from `agentmgr doctor`).
16
+ - **Refresh** no longer does nothing when a background refresh is already running; it waits and then checks pull requests.
17
+
18
+ ## 1.2.1 (2026-10-30)
19
+
20
+ - **Edit an agent:** **Edit** on an agent changes its name, its request (and can tell the agent about the change), priority, permission mode and model (from its next launch). `agentmgr edit`.
21
+ - **Move an agent to another project:** **✎ Move** next to its project, the Edit dialog, or `agentmgr move <agent> <project>`. Pick any known project, a new project name, or its own repo again. Only where it is listed changes; its code stays in its own repo and branch.
22
+
23
+ ## 1.2.0 (2026-10-30)
24
+
25
+ - **Assistant:** an always-on session that works on your behalf. Every few minutes it checks Jira (new assignments, comments and mentions), GitHub (review requests, failing checks on your PRs) and Slack with its own tools, and starts agents for new work, or passes the news to the agent already on it. The daemon enforces a daily cap, a cap on its running agents and one agent per Jira key; agents it starts are marked **by assistant**, and Slack alerts can announce them. **Assistant** in the top bar, or `agentmgr assistant`.
26
+ - **Project names** in the agent list are larger and bold, so they stand out from the agents under them.
27
+
3
28
  ## 1.1.0 (2026-10-30)
4
29
 
5
30
  - **Teams:** give one problem to a team of agents in roles. An analyst writes the analysis and critics challenge it until they agree; an implementer builds it, a tester tests it, and a reviewer approves it or sends it back to the implementer. They hand off through files with a verdict line, which you can read in the team view. The team asks you only at the end (open a PR, keep the branch, or send it back) or when they can't agree within the round limits. **+ New agents → Team**, or `agentmgr team start`.
package/README.md CHANGED
@@ -27,6 +27,13 @@ Run one background [Claude Code](https://claude.com/claude-code) agent per inten
27
27
  - **Priority.** Mark agents P0–P3. P0 and P1 are highlighted, and lists sort by priority.
28
28
  - **Share for review.** One click writes an **Analysis**, **Design**, **Flow** or **Proposal** document from the agent's work. Copy it as Markdown, download it, or print it to PDF with diagrams.
29
29
  - **Human vs AI.** It splits the open questions about the work into the top 5 that need your judgment and the ones a model can answer from the evidence. It answers those, then a second model double-checks every answer.
30
+ - **Review changes.** Each agent's diff file by file, line comments sent back to the agent as one message, then **Commit all** and **Push & open PR**, without leaving the page.
31
+ - **Landing.** A **Land** tab with every agent's open pull request: ready to merge, needs fixes, behind, waiting. Failing checks and requested changes go back to the agent automatically (a few times at most); **Update**, **Ask to fix** and **Merge** in one click.
32
+ - **Triggers.** A label on a GitHub issue starts an agent for it, `/agent …` comments on an agent's pull request reach the agent, and a webhook starts agents from Jira automation or CI. No model watches, so no tokens are spent waiting.
33
+ - **Repo memory.** What one agent learns about a repo (how to run its tests, a gotcha) is recorded in one line and given to every later agent there.
34
+ - **Playbooks.** Saved requests with `{{values}}`, run in several projects at once (one agent each), by hand or every hour, day, weekday or week.
35
+ - **Results.** Merge rate, time to a first PR and to merge, and cost per merged PR, by engine and model, by source and by project.
36
+ - **Budgets.** What agents cost today and lately, a budget per agent (an alert at 80%, closed at 100%) and a daily limit for all of them.
30
37
  - **Plan review.** Optionally, the agent writes an implementation plan and waits for your approval before changing anything.
31
38
  - **Insights.** Why, What, How and Now for any agent, three memorable points each.
32
39
  - **Explain.** One click gives a plain-language explanation of the intent and the insight behind the problem and solution. It comes from a separate tool-less Claude call, so the agent isn't interrupted.
@@ -76,13 +83,13 @@ Runs on macOS and Linux; on Windows, use WSL2. Requires Node 20+, `git`, and the
76
83
 
77
84
  ```sh
78
85
  npm install -g ai-agentmanager # the latest release
79
- npm install -g ai-agentmanager@1.1.0 # or a specific one
86
+ npm install -g ai-agentmanager@1.3.0 # or a specific one
80
87
  ```
81
88
 
82
89
  Or from the repository, at a release tag:
83
90
 
84
91
  ```sh
85
- git clone --branch v1.1.0 --depth 1 https://github.com/jdmunta/ai-agentmanager-core.git
92
+ git clone --branch v1.3.0 --depth 1 https://github.com/jdmunta/ai-agentmanager-core.git
86
93
  cd ai-agentmanager-core
87
94
  npm install
88
95
  npm link # optional: puts `agentmgr` on your PATH
@@ -102,7 +109,7 @@ npm link
102
109
  | Installed with | Update |
103
110
  | --- | --- |
104
111
  | npm | `npm install -g ai-agentmanager@latest` |
105
- | A clone at a release tag | `git fetch --tags && git checkout v1.1.0 && npm install` (the tag you want) |
112
+ | A clone at a release tag | `git fetch --tags && git checkout v1.3.0 && npm install` (the tag you want) |
106
113
  | A clone of `main` | `git pull && npm install` |
107
114
 
108
115
  **Check your setup.** `agentmgr doctor` checks Node.js, Claude Code and its sign-in, git, `gh`, the data folder, the daemon's port and Chrome, and says how to fix anything missing.
@@ -369,6 +376,36 @@ Tick **Review the implementation plan first** in New agent (or the backlog), or
369
376
 
370
377
  Each card has at most **three points of about 12 words each**, so they're easy to remember and repeat. Insights uses the same context and the same separate, tool-less Claude call as Explain, so the agent isn't interrupted. Use Insights for a quick glance and Explain for the full briefing.
371
378
 
379
+ ## Review changes
380
+
381
+ **Review changes** on an agent opens its changes against where its branch started (the merge base with the branch it came from), new files included:
382
+
383
+ - **Files and diff.** The changed files on the left with lines added and removed, and the diff file by file on the right. Click a file header to fold it; very large files start folded.
384
+ - **Line comments.** Click **+** next to a line (or its line number) to comment on it, and add an overall comment if you like. **Send to agent** types them into the agent as one message, each with its file, line and the code it is about, and asks it to address them. Comments not sent yet are kept in this browser.
385
+ - **Commit all** commits everything in the worktree, new files included, with your git name and email.
386
+ - **Push & open PR** pushes the branch and opens a pull request with `gh`, against the branch the agent started from (title from your text, or from the commits; **Draft** if you like). With a pull request already open, it pushes to it. The pull request is linked to the agent.
387
+
388
+ The same from the API: `GET /api/agents/:id/changes`, `POST …/changes/comments`, `…/changes/commit`, `…/changes/pr`. Plugins can refuse a commit or a pull request (`agent.commit`, `agent.pr`).
389
+
390
+ ## Landing pull requests
391
+
392
+ The **Land** tab lists every agent's open pull request by what it needs to get merged, ready ones first:
393
+
394
+ - **Ready to merge**: checks pass and GitHub says it can merge. **Merge** merges it with `gh` (squash by default) and deletes the branch on GitHub.
395
+ - **Needs fixes**: failing checks, changes requested, or conflicts. **Ask to fix** sends them to the agent.
396
+ - **Behind its base**: **Update** merges the branch it targets into the agent's branch and pushes, when the agent is idle and its work is committed. Otherwise, or when the merge conflicts (it is undone), the agent is asked to do it.
397
+ - **Waiting** for checks or a review, and **Drafts**. **Auto-merge** turns on GitHub's auto-merge, so it merges once it may.
398
+
399
+ Each agent's pull requests show the same tags (checks, review, conflicts). Pull requests are checked every couple of minutes for running agents, and every few minutes for closed agents with a PR still open.
400
+
401
+ **Failures go back to the agent by themselves.** When checks fail on an agent's pull request, the agent is told which ones and how to read their logs; when a reviewer requests changes, it is told to read and address the review. Each commit is reported once, and at most 3 times per pull request, so an agent can't loop on a broken main. Change this at the bottom of the Land tab, with `agentmgr land set`, or in config.json:
402
+
403
+ ```json
404
+ "landing": { "fixChecks": true, "fixReviews": true, "maxFixes": 3, "mergeMethod": "squash", "deleteBranch": true }
405
+ ```
406
+
407
+ From a terminal: `agentmgr land` lists them, `agentmgr land update|fix|merge <agent>` (`--auto` for auto-merge). With `agentmgr changes`, `comment`, `commit` and `pr` you can review and open the pull request too. Plugins can refuse a merge (`agent.merge`).
408
+
372
409
  ## Results
373
410
 
374
411
  The **Results** card is the first thing in the Brief panel, and `agentmgr show` lists it too. It shows:
@@ -439,6 +476,17 @@ The sidebar groups agents into projects, shown as a tree:
439
476
  - **Ordering.** Projects needing you sort first. Collapsed projects stay collapsed.
440
477
  - **CLI.** `agentmgr ls` groups by project too.
441
478
 
479
+ ### Editing and moving agents
480
+
481
+ **Edit** on an agent changes its name, its request, priority, permission mode and model. Changing the request updates what AI Agent Manager records (and tracks any new Jira links); tick **Also tell the agent** to send it to the session as well. Permission mode and model apply from its next launch.
482
+
483
+ To list an agent under another project, use **✎ Move** next to its project (or the Edit dialog) and pick a known project, a new project name, or **Its own repo or folder** to move it back. Only the grouping changes: its code stays in its own worktree and branch.
484
+
485
+ ```bash
486
+ agentmgr edit 3fa2b1 --name login-timeout --priority P1 --intent "Fix the login timeout on slow networks" --tell
487
+ agentmgr move 3fa2b1 @billing # "" moves it back to its own project
488
+ ```
489
+
442
490
  ## Backlog
443
491
 
444
492
  Queue asks instead of starting them. Use **+ Add** in the Backlog tab, **Queue in backlog** in the New agents dialog, or `agentmgr backlog add`. Each item is one ask, plus where to do it (repo or folder, base branch, project) and a priority from P1 (high) to P3 (low).
@@ -458,6 +506,27 @@ Queue asks instead of starting them. Use **+ Add** in the Backlog tab, **Queue i
458
506
 
459
507
  The backlog is saved with the rest of the state.
460
508
 
509
+ ## Playbooks
510
+
511
+ Saved requests you run again: **Backlog → Playbooks**, **Save as playbook…** in New agents, or `agentmgr playbook`. A playbook is a request, the projects to run it in (one agent each), and optionally a model, permission mode, priority and schedule:
512
+
513
+ - **Values at run time.** Write `{{name}}` in the request for something you fill in when it runs: "Upgrade `{{package}}` to the latest version, fix what breaks and open a pull request". **Run now** asks for each value; `agentmgr playbook run Upgrade --var package=react`.
514
+ - **Several projects at once.** "Bump the Node version" in every repo starts one agent per project.
515
+ - **On a schedule.** Every hour, day, weekday or week at a time you pick ("every weekday at 9:00, triage yesterday's flaky tests"). A scheduled playbook needs a default for each `{{value}}`. A run missed while the daemon was off runs once when it is back. Budgets and the daily limit apply.
516
+
517
+ Agents started by a playbook are marked **▶ <playbook>**, and the playbook lists the agents of its last run.
518
+
519
+ ```sh
520
+ agentmgr playbook add "Flaky tests" "Find yesterday's flaky tests in CI and fix or quarantine them" --projects web,api --every weekday --at 09:00
521
+ agentmgr playbook ls
522
+ ```
523
+
524
+ ## Repo memory
525
+
526
+ Agents in the same repository share what they learn. When an agent finds out something non-obvious that would save the next one time (how to build or run the tests, a gotcha, where something lives, a convention that isn't written down), it records one line with `agentmgr learn "…"`, which it may run without asking. Every agent that starts in that repo afterwards gets the list with its instructions. Each line says which agent added it and when, and the same thing isn't added twice.
527
+
528
+ **Repo memory → View and edit** on an agent's Workspace card shows the file to tidy (keep it short and true; it is capped at 16 KB), and `agentmgr memory <agent>` prints it. The files live in `~/.agentmanager/memory/`, one per repository. Turn it off with `"memory": false` in config.json.
529
+
461
530
  ## Decision inbox
462
531
 
463
532
  The **Inbox** tab (and `agentmgr inbox`) lists what needs you, across all agents:
@@ -721,6 +790,65 @@ agentmgr leave # the hub forgets this Mac
721
790
 
722
791
  **On Railway.** `hub/Dockerfile` builds the hub alone, with no node-pty and no Claude. Set `RAILWAY_DOCKERFILE_PATH=hub/Dockerfile`, `AGENTMGR_HUB_TOKEN`, `AGENTMGR_HUB_URL` (its https address) and, for Google sign-in, the three variables above; add a volume at `/data` so enrollments survive redeploys, and join with the `https://…up.railway.app` address.
723
792
 
793
+ ## Assistant
794
+
795
+ An always-on Claude session that works on your behalf. **Assistant** in the top bar (or `agentmgr assistant start`) sets it up. Every 15 minutes the daemon asks it to check for new work, and it starts an agent for each new item, or passes the news to the agent already on it. You don't approve each one; it tells you in its activity log and, with Slack alerts on, in Slack.
796
+
797
+ | It watches | What it does |
798
+ |---|---|
799
+ | Jira issues newly assigned to you | Starts an agent in the matching project, with the issue link first so the agent is named after the issue (`OPS-7`) |
800
+ | Linear issues newly assigned to you (turn it on in the dialog) | The same, with the Linear link first (`ENG-42`) |
801
+ | New comments and mentions on your Jira issues | Passes the comment to the agent on that issue (`agentmgr tell`), or starts one if the comment asks for new work |
802
+ | GitHub pull requests waiting for your review | Starts a review agent that drafts the review for you to post |
803
+ | Failing checks on your open pull requests | Tells the agent on that PR to fix it, or starts one |
804
+ | Slack messages to you that ask for work | Starts an agent for clear requests in a known project |
805
+
806
+ It reads Jira and Slack with the tools your Claude Code already has (no credentials in agentmgr), so connect the Atlassian and Slack MCP servers at user scope, and sign in to `gh`. It runs in `~/.agentmanager/assistant` in `auto` permission mode, so it can run `agentmgr` and `gh` without asking. It never merges, approves, comments or sends messages as you.
807
+
808
+ The daemon enforces its limits, whatever the session decides: at most 10 new agents a day, at most 5 of its agents running at once, and never a second agent for the same Jira key. Agents it started are marked **by assistant**. It keeps what it has handled in `handled.json` so it never acts twice, and writes `activity.md`, shown in the dialog, with a **Needs you** list for anything it couldn't place. Use **Notes for the assistant** to say which Jira project goes to which repo. Clean up never closes the assistant.
809
+
810
+ ```bash
811
+ agentmgr assistant start # set it up, or turn it back on
812
+ agentmgr assistant # on or paused, last check, agents it started (--activity for its log)
813
+ agentmgr assistant check # check now
814
+ agentmgr assistant set --every 10 --sources jira,comments,reviews,ci --max-per-day 5 --notes "OPS is the @cc repo"
815
+ agentmgr assistant pause # stop checking and close the session
816
+ ```
817
+
818
+ Settings live in `config.json` under `"assistant"`. A running assistant reads new watch lists and notes after **Pause** and **Turn on**.
819
+
820
+ ## Triggers
821
+
822
+ Start agents from where the work lives, with no session watching and no tokens spent on it. **Assistant → Triggers…**, or `agentmgr triggers`:
823
+
824
+ - **GitHub label.** Every few minutes, open issues with a label (`agentmgr` by default) in the repos or owners you list each get an agent in that repo, named `repo#12`, asked to open a pull request that fixes the issue. A project already on that repo reuses its clone. Each issue starts one agent, once. Labeling an issue needs triage access to the repo, so that is the go-ahead. **Comment on the issue** (off by default) says an agent is on it.
825
+ - **Pull request comments.** A comment that starts with `/agent` on an agent's open pull request, from the repo's owners, members or collaborators, is typed into that agent: `/agent add a test for Safari`. On by default.
826
+ - **Webhook.** `POST /api/hooks/agents` with `Authorization: Bearer <token>` and `{"intent": "…", "project": "<shortcut>"}` (or `"repo": "<git URL>"`, optional `"name"`, `"priority"`, `"url"`) creates an agent, for Jira automation, CI or scripts. Off until you make a token (**New token**, or `agentmgr triggers set --new-token`); the token is shown once. **Only these repos** limits where it may start agents. The daemon listens on this computer only, so other machines reach it through remote access.
827
+
828
+ Agents started this way are marked **⚡ GitHub** or **⚡ webhook**, Slack alerts can announce them, and triggers start at most 20 agents a day (`maxPerDay`). Agents use your default permission mode; a webhook can't pick another. In config.json:
829
+
830
+ ```json
831
+ "triggers": {
832
+ "github": { "enabled": true, "label": "agentmgr", "repos": ["acme/web"], "owners": [], "everyMin": 5, "comment": false },
833
+ "prCommands": { "enabled": true, "prefix": "/agent" },
834
+ "webhook": { "enabled": false, "repos": [] },
835
+ "maxPerDay": 20
836
+ }
837
+ ```
838
+
839
+ ## Results and spend
840
+
841
+ **Results** in the top bar shows how agents did over the last 7, 30 or 90 days (or all time): how many started and how many opened a pull request, PRs merged and closed, the merge rate, the median time from starting an agent to its first PR and to merge, and the cost per merged PR. The same by engine and model (which one gets merged more, for less), by where agents came from (you, the assistant, triggers, the backlog, teams, races) and by project. `agentmgr stats --days 30`.
842
+
843
+ ### Spend and budgets
844
+
845
+ The same dialog shows what agents cost today, the last two weeks and the costliest agents, from the cost Claude Code records for each session (the API price, even on a subscription plan; Codex and Antigravity record none). Set limits there, with `agentmgr spend --per-agent 5 --per-day 50`, or in config.json (`"budgets": { "perAgentUsd": 5, "perDayUsd": 50 }`):
846
+
847
+ - **Each agent.** At 80% of its budget you get an alert. At its budget its session is closed, and it doesn't start or resume until you raise its budget. **Edit** on an agent (or `agentmgr edit <agent> --budget 20`) gives it its own budget.
848
+ - **All agents a day.** Once today's spend reaches it, no new agents start or resume, from the UI, the CLI, the backlog, triggers or the assistant, until tomorrow or a higher limit. Running agents go on.
849
+
850
+ Alerts for both go to Slack with **Alerts → nears or reaches its budget**.
851
+
724
852
  ## Cleaning up old agents
725
853
 
726
854
  Agents you no longer use keep a session open and a worktree on disk. **Clean up** (in the top bar, or `agentmgr cleanup`) closes agents with no activity for a while and deletes agents that stayed closed long after that. Pick a strategy:
package/docs/plugins.md CHANGED
@@ -53,6 +53,9 @@ Policies are synchronous so every code path can call them. Keep them fast; do sl
53
53
  | `agent.start` | Before an agent's engine is launched or resumed (including after a restart) | `agent`, `fresh` |
54
54
  | `agent.message` | Before a message is typed into an agent (`tell`, inbox replies) | `agent`, `text`, `source` |
55
55
  | `agent.remove` | Before an agent is deleted | `agent`, `deleteWorkspace` |
56
+ | `agent.commit` | Before Commit in the review screen commits an agent's worktree | `agent`, `message` |
57
+ | `agent.pr` | Before the review screen pushes an agent's branch and opens a pull request | `agent`, `title`, `draft` |
58
+ | `agent.merge` | Before Merge (or auto-merge) in the Land tab merges an agent's pull request | `agent`, `url`, `method`, `auto` |
56
59
  | `terminal.open` | Before a live terminal is attached (browser, CLI `attach`, hub) | `agent`, `kind` (`claude` or `shell:N`) |
57
60
  | `hub.action` | Before an action the hub asked for, after this machine's own `hub.allow` check | `action`, `agent` |
58
61
 
@@ -60,7 +63,7 @@ Policies are synchronous so every code path can call them. Keep them fast; do sl
60
63
 
61
64
  ## Daemon events (listeners)
62
65
 
63
- `agent.created`, `agent.starting`, `agent.stopping`, `agent.message`, `agent.removed`, `hub.action`, each with the same `agent` summary and an `at` timestamp.
66
+ `agent.created`, `agent.starting`, `agent.stopping`, `agent.message`, `agent.removed`, `agent.commit` (with `sha`), `agent.pr` (with `url`), `agent.merge`, `hub.action`, each with the same `agent` summary and an `at` timestamp.
64
67
 
65
68
  ## Engines
66
69
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai-agentmanager",
3
- "version": "1.1.0",
3
+ "version": "1.3.0",
4
4
  "description": "Run background coding agents (Claude Code, Codex) per intent, and keep track of them from a web UI, your phone or the CLI",
5
5
  "keywords": [
6
6
  "claude",