@action-llama/action-llama 0.12.2 → 0.13.1
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/{docs/agent-reference → agent-docs}/AGENTS.md +31 -15
- package/{docs/agent-reference → agent-docs}/skills/README.md +1 -0
- package/agent-docs/skills/calls.md +82 -0
- package/{docs/agent-reference → agent-docs}/skills/resource-locks.md +13 -7
- package/{docs/agent-reference → agent-docs}/skills/signals.md +1 -1
- package/dist/agents/container-runner.d.ts +3 -2
- package/dist/agents/container-runner.d.ts.map +1 -1
- package/dist/agents/container-runner.js +12 -12
- package/dist/agents/container-runner.js.map +1 -1
- package/dist/agents/prompt.d.ts.map +1 -1
- package/dist/agents/prompt.js +3 -2
- package/dist/agents/prompt.js.map +1 -1
- package/dist/agents/runner.d.ts +3 -2
- package/dist/agents/runner.d.ts.map +1 -1
- package/dist/agents/runner.js +14 -14
- package/dist/agents/runner.js.map +1 -1
- package/dist/build-info.json +1 -1
- package/dist/cli/commands/doctor.d.ts +1 -0
- package/dist/cli/commands/doctor.d.ts.map +1 -1
- package/dist/cli/commands/doctor.js +53 -15
- package/dist/cli/commands/doctor.js.map +1 -1
- package/dist/cli/commands/env.d.ts +4 -0
- package/dist/cli/commands/env.d.ts.map +1 -1
- package/dist/cli/commands/env.js +41 -0
- package/dist/cli/commands/env.js.map +1 -1
- package/dist/cli/commands/kill.js +2 -2
- package/dist/cli/commands/kill.js.map +1 -1
- package/dist/cli/commands/logs.d.ts.map +1 -1
- package/dist/cli/commands/logs.js +25 -20
- package/dist/cli/commands/logs.js.map +1 -1
- package/dist/cli/commands/pause.js +2 -2
- package/dist/cli/commands/pause.js.map +1 -1
- package/dist/cli/commands/push.d.ts +1 -0
- package/dist/cli/commands/push.d.ts.map +1 -1
- package/dist/cli/commands/push.js +2 -1
- package/dist/cli/commands/push.js.map +1 -1
- package/dist/cli/commands/resume.js +2 -2
- package/dist/cli/commands/resume.js.map +1 -1
- package/dist/cli/commands/run.d.ts.map +1 -1
- package/dist/cli/commands/run.js +21 -46
- package/dist/cli/commands/run.js.map +1 -1
- package/dist/cli/commands/start.d.ts.map +1 -1
- package/dist/cli/commands/start.js +62 -2
- package/dist/cli/commands/start.js.map +1 -1
- package/dist/cli/commands/status.d.ts.map +1 -1
- package/dist/cli/commands/status.js +23 -7
- package/dist/cli/commands/status.js.map +1 -1
- package/dist/cli/commands/stop.d.ts +1 -0
- package/dist/cli/commands/stop.d.ts.map +1 -1
- package/dist/cli/commands/stop.js +3 -2
- package/dist/cli/commands/stop.js.map +1 -1
- package/dist/cli/gateway-client.d.ts +6 -0
- package/dist/cli/gateway-client.d.ts.map +1 -1
- package/dist/cli/gateway-client.js +19 -0
- package/dist/cli/gateway-client.js.map +1 -1
- package/dist/cli/main.js +12 -0
- package/dist/cli/main.js.map +1 -1
- package/dist/cloud/vps/constants.d.ts +1 -1
- package/dist/cloud/vps/constants.d.ts.map +1 -1
- package/dist/cloud/vps/constants.js +9 -0
- package/dist/cloud/vps/constants.js.map +1 -1
- package/dist/cloud/vps/hetzner-api.d.ts +14 -3
- package/dist/cloud/vps/hetzner-api.d.ts.map +1 -1
- package/dist/cloud/vps/hetzner-api.js +24 -11
- package/dist/cloud/vps/hetzner-api.js.map +1 -1
- package/dist/cloud/vps/provision.js +29 -6
- package/dist/cloud/vps/provision.js.map +1 -1
- package/dist/cloud/vps/ssh.d.ts +7 -0
- package/dist/cloud/vps/ssh.d.ts.map +1 -1
- package/dist/cloud/vps/ssh.js +15 -1
- package/dist/cloud/vps/ssh.js.map +1 -1
- package/dist/credentials/builtins/index.d.ts.map +1 -1
- package/dist/credentials/builtins/index.js +2 -0
- package/dist/credentials/builtins/index.js.map +1 -1
- package/dist/credentials/builtins/reddit-oauth.d.ts +4 -0
- package/dist/credentials/builtins/reddit-oauth.d.ts.map +1 -0
- package/dist/credentials/builtins/reddit-oauth.js +71 -0
- package/dist/credentials/builtins/reddit-oauth.js.map +1 -0
- package/dist/docker/local-runtime.d.ts +1 -0
- package/dist/docker/local-runtime.d.ts.map +1 -1
- package/dist/docker/local-runtime.js +9 -6
- package/dist/docker/local-runtime.js.map +1 -1
- package/dist/gateway/index.d.ts.map +1 -1
- package/dist/gateway/index.js +5 -4
- package/dist/gateway/index.js.map +1 -1
- package/dist/gateway/routes/logs.d.ts.map +1 -1
- package/dist/gateway/routes/logs.js +29 -111
- package/dist/gateway/routes/logs.js.map +1 -1
- package/dist/remote/bootstrap.d.ts +2 -0
- package/dist/remote/bootstrap.d.ts.map +1 -1
- package/dist/remote/bootstrap.js +7 -11
- package/dist/remote/bootstrap.js.map +1 -1
- package/dist/remote/push.d.ts +6 -0
- package/dist/remote/push.d.ts.map +1 -1
- package/dist/remote/push.js +172 -91
- package/dist/remote/push.js.map +1 -1
- package/dist/remote/ssh.d.ts +1 -0
- package/dist/remote/ssh.d.ts.map +1 -1
- package/dist/remote/ssh.js +8 -0
- package/dist/remote/ssh.js.map +1 -1
- package/dist/scheduler/index.d.ts.map +1 -1
- package/dist/scheduler/index.js +56 -7
- package/dist/scheduler/index.js.map +1 -1
- package/dist/scheduler/watcher.d.ts +1 -1
- package/dist/scheduler/watcher.d.ts.map +1 -1
- package/dist/scheduler/watcher.js +5 -6
- package/dist/scheduler/watcher.js.map +1 -1
- package/dist/setup/scaffold.js +2 -2
- package/dist/setup/scaffold.js.map +1 -1
- package/dist/shared/config.d.ts +1 -0
- package/dist/shared/config.d.ts.map +1 -1
- package/dist/shared/config.js.map +1 -1
- package/dist/shared/credentials.d.ts +8 -18
- package/dist/shared/credentials.d.ts.map +1 -1
- package/dist/shared/credentials.js +8 -62
- package/dist/shared/credentials.js.map +1 -1
- package/dist/shared/server.d.ts +2 -0
- package/dist/shared/server.d.ts.map +1 -1
- package/dist/shared/server.js.map +1 -1
- package/dist/tui/App.d.ts.map +1 -1
- package/dist/tui/App.js +1 -1
- package/dist/tui/App.js.map +1 -1
- package/dist/webhooks/definitions/github.d.ts.map +1 -1
- package/dist/webhooks/definitions/github.js +13 -0
- package/dist/webhooks/definitions/github.js.map +1 -1
- package/dist/webhooks/providers/github.d.ts.map +1 -1
- package/dist/webhooks/providers/github.js +6 -0
- package/dist/webhooks/providers/github.js.map +1 -1
- package/dist/webhooks/registry.d.ts.map +1 -1
- package/dist/webhooks/registry.js +9 -3
- package/dist/webhooks/registry.js.map +1 -1
- package/dist/webhooks/types.d.ts +3 -1
- package/dist/webhooks/types.d.ts.map +1 -1
- package/docker/bin/_http-exit +17 -0
- package/docker/bin/al-call +10 -4
- package/docker/bin/al-check +9 -3
- package/docker/bin/al-status +1 -1
- package/docker/bin/al-wait +11 -3
- package/docker/bin/rlock +9 -2
- package/docker/bin/rlock-heartbeat +9 -2
- package/docker/bin/runlock +9 -2
- package/package.json +2 -2
- package/docs/agent-config-reference.md +0 -313
- package/docs/agents.md +0 -256
- package/docs/cloud-run.md +0 -173
- package/docs/cloud.md +0 -98
- package/docs/commands.md +0 -286
- package/docs/config-reference.md +0 -241
- package/docs/creating-agents.md +0 -147
- package/docs/credentials.md +0 -167
- package/docs/docker.md +0 -323
- package/docs/ecs.md +0 -795
- package/docs/examples/dev/ACTIONS.md +0 -75
- package/docs/examples/dev/README.md +0 -28
- package/docs/examples/dev/agent-config.toml +0 -18
- package/docs/examples/devops/ACTIONS.md +0 -33
- package/docs/examples/devops/README.md +0 -23
- package/docs/examples/devops/agent-config.toml +0 -13
- package/docs/examples/index.md +0 -15
- package/docs/examples/reviewer/ACTIONS.md +0 -37
- package/docs/examples/reviewer/README.md +0 -22
- package/docs/examples/reviewer/agent-config.toml +0 -11
- package/docs/models.md +0 -191
- package/docs/vps-deployment.md +0 -285
- package/docs/web-dashboard.md +0 -113
- package/docs/webhooks.md +0 -152
- /package/{docs/agent-reference → agent-docs}/skills/credentials.md +0 -0
- /package/{docs/agent-reference → agent-docs}/skills/environment.md +0 -0
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
# Developer Agent
|
|
2
|
-
|
|
3
|
-
You are a developer agent. Your job is to pick up GitHub issues and implement the requested changes.
|
|
4
|
-
|
|
5
|
-
Your configuration is in the `<agent-config>` block at the start of your prompt.
|
|
6
|
-
Use those values for triggerLabel and assignee.
|
|
7
|
-
|
|
8
|
-
`GITHUB_TOKEN` is already set in your environment. Use `gh` CLI and `git` directly.
|
|
9
|
-
|
|
10
|
-
**You MUST complete ALL steps below.** Do not stop after reading the issue — you must implement, commit, push, and open a PR.
|
|
11
|
-
|
|
12
|
-
## Repository Context
|
|
13
|
-
|
|
14
|
-
This agent infers the repository from the issue context instead of using hardcoded configuration.
|
|
15
|
-
|
|
16
|
-
**For webhook triggers:** The repository is extracted from the `<webhook-trigger>` block's `repo` field.
|
|
17
|
-
|
|
18
|
-
**For scheduled triggers:** The agent uses the `repos` parameter from `<agent-config>` as a fallback to check for work across configured repositories.
|
|
19
|
-
|
|
20
|
-
## Setup — ensure labels exist
|
|
21
|
-
|
|
22
|
-
Before looking for work, ensure the required labels exist on the target repo. The repo is determined as follows:
|
|
23
|
-
|
|
24
|
-
- **Webhook mode:** Extract repo from `<webhook-trigger>` JSON block
|
|
25
|
-
- **Scheduled mode:** Use repos from `<agent-config>` params
|
|
26
|
-
|
|
27
|
-
Run the following (these are idempotent — they succeed silently if the label already exists):
|
|
28
|
-
|
|
29
|
-
```
|
|
30
|
-
# For webhook triggers, use the repo from webhook context
|
|
31
|
-
# For scheduled triggers, iterate through configured repos
|
|
32
|
-
gh label create "<triggerLabel>" --repo <determined-repo> --color 0E8A16 --description "Trigger label for dev agent" --force
|
|
33
|
-
gh label create "in-progress" --repo <determined-repo> --color FBCA04 --description "Agent is working on this" --force
|
|
34
|
-
gh label create "agent-completed" --repo <determined-repo> --color 1D76DB --description "Agent has opened a PR" --force
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
## Finding work
|
|
38
|
-
|
|
39
|
-
**Webhook trigger:** When you receive a `<webhook-trigger>` block, extract the repository from the `repo` field and the issue details from the trigger context. Check the issue's labels and assignee against your `triggerLabel` and `assignee` params. If the issue matches (has your trigger label and is assigned to your assignee), proceed with implementation using the extracted repository. If it does not match, stop.
|
|
40
|
-
|
|
41
|
-
**Scheduled trigger:** If `repos` parameter exists in `<agent-config>`, run `gh issue list --repo <repo> --label <triggerLabel> --assignee <assignee> --state open --json number,title,body,comments,labels --limit 1` for each configured repo. If no work found in any repo, stop. If you completed work and there may be more issues to process, run `al-rerun`.
|
|
42
|
-
|
|
43
|
-
## Workflow
|
|
44
|
-
|
|
45
|
-
**Important:** First determine the target repository from the trigger context (webhook `repo` field or configured `repos` parameter).
|
|
46
|
-
|
|
47
|
-
1. **Claim the issue** — run `gh issue edit <number> --repo <determined-repo> --add-label in-progress` to mark it as claimed.
|
|
48
|
-
|
|
49
|
-
2. **Clone and branch** — run `git clone git@github.com:<determined-repo>.git /tmp/repo && cd /tmp/repo && git checkout -b agent/<number>`.
|
|
50
|
-
|
|
51
|
-
3. **Understand the issue** — read the title, body, and comments. Note file paths, acceptance criteria, and linked issues.
|
|
52
|
-
|
|
53
|
-
4. **Read project conventions** — in the repo, read `ACTIONS.md`, `CLAUDE.md`, `CONTRIBUTING.md`, and `README.md` if they exist. Follow any conventions found there.
|
|
54
|
-
|
|
55
|
-
5. **Implement changes** — work in the repo. Make the minimum necessary changes, follow existing patterns, and write or update tests if the project has a test suite.
|
|
56
|
-
|
|
57
|
-
6. **Validate** — run the project's test suite and linters (e.g., `npm test`). Fix failures before proceeding.
|
|
58
|
-
|
|
59
|
-
7. **Commit** — `git add -A && git commit -m "fix: <description> (closes #<number>)"`
|
|
60
|
-
|
|
61
|
-
8. **Push** — `git push -u origin agent/<number>`
|
|
62
|
-
|
|
63
|
-
9. **Create a PR** — run `gh pr create --repo <determined-repo> --head agent/<number> --base main --title "<title>" --body "Closes #<number>\\n\\n<description>"`.
|
|
64
|
-
|
|
65
|
-
10. **Comment on the issue** — run `gh issue comment <number> --repo <determined-repo> --body "PR created: <pr_url>"`.
|
|
66
|
-
|
|
67
|
-
11. **Mark done** — run `gh issue edit <number> --repo <determined-repo> --remove-label in-progress --add-label agent-completed`.
|
|
68
|
-
|
|
69
|
-
## Rules
|
|
70
|
-
|
|
71
|
-
- Work on exactly ONE issue per run
|
|
72
|
-
- Never modify files outside the repo directory
|
|
73
|
-
- **You MUST complete steps 7-11.** Do not stop early.
|
|
74
|
-
- If tests fail after 2 attempts, create the PR anyway with a note about failing tests
|
|
75
|
-
- If the issue is unclear, comment asking for clarification and stop
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
# Dev Agent
|
|
2
|
-
|
|
3
|
-
A developer agent that picks up GitHub issues and implements the requested changes. It clones the repo, creates a branch, implements the fix, runs tests, and opens a PR.
|
|
4
|
-
|
|
5
|
-
## Setup
|
|
6
|
-
|
|
7
|
-
1. Copy `agent-config.toml` and `ACTIONS.md` into `agents/dev/` in your project
|
|
8
|
-
2. Edit `agent-config.toml`:
|
|
9
|
-
- Set `assignee` to your GitHub username
|
|
10
|
-
- Optionally set `repos` for scheduled mode (without webhooks)
|
|
11
|
-
3. Run `al doctor` to verify credentials
|
|
12
|
-
|
|
13
|
-
## Trigger modes
|
|
14
|
-
|
|
15
|
-
**Webhook (recommended):** Fires when an issue is labeled with `agent`. Requires a GitHub webhook configured in `config.toml` — see [Webhooks docs](../../docs/webhooks.md).
|
|
16
|
-
|
|
17
|
-
**Scheduled:** Set a `schedule` field in `agent-config.toml` (e.g., `schedule = "*/5 * * * *"`) and configure `repos` in `[params]`. The agent polls for matching issues.
|
|
18
|
-
|
|
19
|
-
## Custom Dockerfile
|
|
20
|
-
|
|
21
|
-
The dev agent uses the `gh` CLI, which isn't in the base image. Add a `Dockerfile` to the agent directory (only needed for [Docker mode](../../docs/docker.md)):
|
|
22
|
-
|
|
23
|
-
```dockerfile
|
|
24
|
-
FROM al-agent:latest
|
|
25
|
-
USER root
|
|
26
|
-
RUN apk add --no-cache github-cli
|
|
27
|
-
USER node
|
|
28
|
-
```
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
credentials = ["github_token", "git_ssh"]
|
|
2
|
-
|
|
3
|
-
[model]
|
|
4
|
-
provider = "anthropic"
|
|
5
|
-
model = "claude-sonnet-4-20250514"
|
|
6
|
-
thinkingLevel = "medium"
|
|
7
|
-
authType = "api_key"
|
|
8
|
-
|
|
9
|
-
[[webhooks]]
|
|
10
|
-
source = "my-github"
|
|
11
|
-
events = ["issues"]
|
|
12
|
-
actions = ["labeled"]
|
|
13
|
-
labels = ["agent"]
|
|
14
|
-
|
|
15
|
-
[params]
|
|
16
|
-
triggerLabel = "agent"
|
|
17
|
-
assignee = "your-github-username"
|
|
18
|
-
# repos = ["fallback/repo"] # Optional: only needed for scheduled mode without webhooks
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
# DevOps Agent
|
|
2
|
-
|
|
3
|
-
You are a DevOps monitoring agent. Your job is to detect new errors from CI/CD failures and production error tracking, then file actionable GitHub issues for each unique problem.
|
|
4
|
-
|
|
5
|
-
Your configuration is in the `<agent-config>` block at the start of your prompt.
|
|
6
|
-
Use those values for repos, sentryOrg, and sentryProjects.
|
|
7
|
-
|
|
8
|
-
`GITHUB_TOKEN` is already set in your environment. Use `gh` CLI directly.
|
|
9
|
-
If Sentry is configured, `SENTRY_AUTH_TOKEN` is set in your environment. Use `curl` for Sentry API requests.
|
|
10
|
-
|
|
11
|
-
## Workflow
|
|
12
|
-
|
|
13
|
-
1. **Poll for CI errors** — run `gh run list --repo <repo> --status failure --json databaseId,name,headBranch,conclusion,url,createdAt --limit 20` for each repo.
|
|
14
|
-
|
|
15
|
-
2. **Poll Sentry errors (if configured)** — run:
|
|
16
|
-
```
|
|
17
|
-
curl -s -H "Authorization: Bearer $SENTRY_AUTH_TOKEN" \
|
|
18
|
-
"https://sentry.io/api/0/projects/<sentryOrg>/<project>/issues/?query=is:unresolved&statsPeriod=24h"
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
3. **Deduplicate** — search existing issues to avoid duplicates: `gh issue list --repo <repo> --label agent-filed --state all --json title --limit 100`. Skip errors that already have matching issues.
|
|
22
|
-
|
|
23
|
-
4. **File GitHub issues** — for each new error, run `gh issue create --repo <repo>`:
|
|
24
|
-
- **CI failures** — `--title "[CI Failure] <workflow> on <branch>" --body "<details>" --label ci-failure,agent-filed`
|
|
25
|
-
- **Sentry errors** — `--title "[Sentry] <title>" --body "<details>" --label production-error,agent-filed`
|
|
26
|
-
|
|
27
|
-
## Rules
|
|
28
|
-
|
|
29
|
-
- Always check deduplication before filing — never create duplicate issues
|
|
30
|
-
- Include enough context for a developer to start investigating
|
|
31
|
-
- For Sentry errors, include the permalink for full details
|
|
32
|
-
- For CI failures, include the run URL for log access
|
|
33
|
-
- Do not attempt to fix errors yourself — just file issues
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
# DevOps Agent
|
|
2
|
-
|
|
3
|
-
A monitoring agent that detects errors from CI/CD failures and Sentry production alerts, then files deduplicated GitHub issues for each unique problem.
|
|
4
|
-
|
|
5
|
-
## Setup
|
|
6
|
-
|
|
7
|
-
1. Copy `agent-config.toml` and `ACTIONS.md` into `agents/devops/` in your project
|
|
8
|
-
2. Edit `agent-config.toml`:
|
|
9
|
-
- Set `repos` to the repositories to monitor
|
|
10
|
-
- Set `sentryOrg` and `sentryProjects` for Sentry integration (or remove if not using Sentry)
|
|
11
|
-
- Adjust `schedule` as needed (default: every 15 minutes)
|
|
12
|
-
3. Run `al doctor` to verify credentials
|
|
13
|
-
|
|
14
|
-
## How it works
|
|
15
|
-
|
|
16
|
-
Each run, the agent:
|
|
17
|
-
|
|
18
|
-
1. Polls for recent CI failures across configured repos
|
|
19
|
-
2. Polls Sentry for unresolved errors in the last 24 hours (if configured)
|
|
20
|
-
3. Deduplicates against existing `agent-filed` issues to avoid duplicates
|
|
21
|
-
4. Files new GitHub issues with appropriate labels (`ci-failure` or `production-error`)
|
|
22
|
-
|
|
23
|
-
The agent only files issues — it does not attempt to fix errors itself.
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
credentials = ["github_token", "git_ssh", "sentry_token"]
|
|
2
|
-
schedule = "*/15 * * * *"
|
|
3
|
-
|
|
4
|
-
[model]
|
|
5
|
-
provider = "anthropic"
|
|
6
|
-
model = "claude-sonnet-4-20250514"
|
|
7
|
-
thinkingLevel = "medium"
|
|
8
|
-
authType = "api_key"
|
|
9
|
-
|
|
10
|
-
[params]
|
|
11
|
-
repos = ["acme/app"]
|
|
12
|
-
sentryOrg = "acme"
|
|
13
|
-
sentryProjects = ["web-app", "api"]
|
package/docs/examples/index.md
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
# Example Agents
|
|
2
|
-
|
|
3
|
-
Ready-to-use agent configurations. Each directory contains everything you need to add the agent to your project:
|
|
4
|
-
|
|
5
|
-
- `agent-config.toml` — drop into `agents/<name>/`
|
|
6
|
-
- `ACTIONS.md` — the agent's system prompt (also goes in `agents/<name>/`)
|
|
7
|
-
- `README.md` — explanation, setup notes, and customization tips
|
|
8
|
-
|
|
9
|
-
## Agents
|
|
10
|
-
|
|
11
|
-
| Agent | Description | Trigger |
|
|
12
|
-
|-------|-------------|---------|
|
|
13
|
-
| [dev](dev/) | Picks up GitHub issues and implements the requested changes — clones, branches, codes, tests, and opens a PR | Webhook (issue labeled) or scheduled |
|
|
14
|
-
| [reviewer](reviewer/) | Reviews open pull requests, approves good ones, and requests changes on problematic ones | Scheduled |
|
|
15
|
-
| [devops](devops/) | Monitors CI/CD failures and Sentry errors, then files deduplicated GitHub issues | Scheduled |
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
# PR Reviewer Agent
|
|
2
|
-
|
|
3
|
-
You are a code review agent. Your job is to review open pull requests, approve good ones, and request changes on problematic ones.
|
|
4
|
-
|
|
5
|
-
Your configuration is in the `<agent-config>` block at the start of your prompt.
|
|
6
|
-
Use those values for repos.
|
|
7
|
-
|
|
8
|
-
`GITHUB_TOKEN` is already set in your environment. Use `gh` CLI directly.
|
|
9
|
-
|
|
10
|
-
## Workflow
|
|
11
|
-
|
|
12
|
-
1. **List open PRs** — run `gh pr list --repo <repo> --state open --json number,title,headRefName,headRefOid,statusCheckRollup` for each repo. If empty, stop.
|
|
13
|
-
|
|
14
|
-
2. **Review each PR:**
|
|
15
|
-
|
|
16
|
-
a. **Get the diff** — run `gh pr diff <number> --repo <repo>`.
|
|
17
|
-
|
|
18
|
-
b. **Evaluate** — review for correctness, style, tests, security, and performance.
|
|
19
|
-
|
|
20
|
-
c. **Check CI** — look at `statusCheckRollup` from step 1. Do NOT merge if CI is failing.
|
|
21
|
-
|
|
22
|
-
d. **Submit review:**
|
|
23
|
-
- **Good code + green CI** — `gh pr review <number> --repo <repo> --approve --body "<review>"`, then `gh pr merge <number> --repo <repo> --squash`
|
|
24
|
-
- **Issues found** — `gh pr review <number> --repo <repo> --request-changes --body "<review>"`
|
|
25
|
-
- **Good code + failing CI** — `gh pr review <number> --repo <repo> --comment --body "LGTM but CI must pass before merging."`
|
|
26
|
-
|
|
27
|
-
## Review Standards
|
|
28
|
-
|
|
29
|
-
- **Specific** — point to exact lines or patterns
|
|
30
|
-
- **Constructive** — suggest fixes, don't just point out problems
|
|
31
|
-
- **Proportional** — don't block for minor style nits
|
|
32
|
-
- **Thorough** — check edge cases, error handling, boundaries
|
|
33
|
-
|
|
34
|
-
## Rules
|
|
35
|
-
|
|
36
|
-
- Review ALL open PRs in a single run, not just one
|
|
37
|
-
- Never approve a PR with failing CI checks
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
# Reviewer Agent
|
|
2
|
-
|
|
3
|
-
A code review agent that reviews open pull requests, approves good ones, requests changes on problematic ones, and auto-merges approved PRs with passing CI.
|
|
4
|
-
|
|
5
|
-
## Setup
|
|
6
|
-
|
|
7
|
-
1. Copy `agent-config.toml` and `ACTIONS.md` into `agents/reviewer/` in your project
|
|
8
|
-
2. Edit `agent-config.toml`:
|
|
9
|
-
- Set `repos` to the repositories you want reviewed
|
|
10
|
-
- Adjust `schedule` as needed (default: every 5 minutes)
|
|
11
|
-
3. Run `al doctor` to verify credentials
|
|
12
|
-
|
|
13
|
-
## How it works
|
|
14
|
-
|
|
15
|
-
Each run, the agent:
|
|
16
|
-
|
|
17
|
-
1. Lists all open PRs across configured repos
|
|
18
|
-
2. Reads the diff for each PR
|
|
19
|
-
3. Evaluates correctness, style, tests, security, and performance
|
|
20
|
-
4. Submits a review: approve + merge, request changes, or comment (if CI is failing)
|
|
21
|
-
|
|
22
|
-
The agent reviews **all** open PRs in a single run and never approves a PR with failing CI.
|
package/docs/models.md
DELETED
|
@@ -1,191 +0,0 @@
|
|
|
1
|
-
# Models
|
|
2
|
-
|
|
3
|
-
Action Llama supports 8 LLM providers. Each agent can use a different provider and model — configure a project-wide default in `config.toml` under `[model]`, and override per agent in `agent-config.toml`.
|
|
4
|
-
|
|
5
|
-
## `[model]` Fields
|
|
6
|
-
|
|
7
|
-
| Field | Type | Required | Description |
|
|
8
|
-
|-------|------|----------|-------------|
|
|
9
|
-
| `provider` | string | Yes | Provider name (see table below) |
|
|
10
|
-
| `model` | string | Yes | Model ID |
|
|
11
|
-
| `authType` | string | Yes | `"api_key"`, `"oauth_token"`, or `"pi_auth"` |
|
|
12
|
-
| `thinkingLevel` | string | No | Reasoning budget (Anthropic only) |
|
|
13
|
-
|
|
14
|
-
## Providers
|
|
15
|
-
|
|
16
|
-
### Anthropic
|
|
17
|
-
|
|
18
|
-
Claude models with optional extended thinking.
|
|
19
|
-
|
|
20
|
-
```toml
|
|
21
|
-
[model]
|
|
22
|
-
provider = "anthropic"
|
|
23
|
-
model = "claude-sonnet-4-20250514"
|
|
24
|
-
thinkingLevel = "medium"
|
|
25
|
-
authType = "api_key"
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
| Model | Description |
|
|
29
|
-
|-------|-------------|
|
|
30
|
-
| `claude-opus-4-20250514` | Most capable, best for complex multi-step tasks |
|
|
31
|
-
| `claude-sonnet-4-20250514` | Balanced performance and cost (recommended) |
|
|
32
|
-
| `claude-haiku-3-5-20241022` | Fastest and cheapest |
|
|
33
|
-
|
|
34
|
-
**Credential:** `anthropic_key` (field: `token`)
|
|
35
|
-
|
|
36
|
-
**Auth types:**
|
|
37
|
-
|
|
38
|
-
| `authType` | Token format | Description |
|
|
39
|
-
|------------|-------------|-------------|
|
|
40
|
-
| `api_key` | `sk-ant-api-...` | Standard Anthropic API key |
|
|
41
|
-
| `oauth_token` | `sk-ant-oat-...` | OAuth token from `claude setup-token` |
|
|
42
|
-
| `pi_auth` | _(none)_ | Uses existing pi auth credentials (`~/.pi/agent/auth.json`). No credential file needed. |
|
|
43
|
-
|
|
44
|
-
**Note:** `pi_auth` is not supported in Docker mode. Switch to `api_key` or `oauth_token` for containerized runs.
|
|
45
|
-
|
|
46
|
-
**Thinking level:** Anthropic is the only provider that supports `thinkingLevel`. Valid values:
|
|
47
|
-
|
|
48
|
-
| Level | Description |
|
|
49
|
-
|-------|-------------|
|
|
50
|
-
| `off` | No extended thinking |
|
|
51
|
-
| `minimal` | Minimal reasoning |
|
|
52
|
-
| `low` | Light reasoning |
|
|
53
|
-
| `medium` | Balanced (recommended) |
|
|
54
|
-
| `high` | Deep reasoning |
|
|
55
|
-
| `xhigh` | Maximum reasoning budget |
|
|
56
|
-
|
|
57
|
-
If omitted, thinking is not explicitly configured. For other providers, `thinkingLevel` is ignored.
|
|
58
|
-
|
|
59
|
-
### OpenAI
|
|
60
|
-
|
|
61
|
-
```toml
|
|
62
|
-
[model]
|
|
63
|
-
provider = "openai"
|
|
64
|
-
model = "gpt-4o"
|
|
65
|
-
authType = "api_key"
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
| Model | Description |
|
|
69
|
-
|-------|-------------|
|
|
70
|
-
| `gpt-4o` | Flagship multimodal model (recommended) |
|
|
71
|
-
| `gpt-4o-mini` | Smaller, faster, cheaper |
|
|
72
|
-
| `gpt-4-turbo` | Previous generation |
|
|
73
|
-
| `o1-preview` | Reasoning model |
|
|
74
|
-
| `o1-mini` | Smaller reasoning model |
|
|
75
|
-
|
|
76
|
-
**Credential:** `openai_key` (field: `token`)
|
|
77
|
-
|
|
78
|
-
### Groq
|
|
79
|
-
|
|
80
|
-
```toml
|
|
81
|
-
[model]
|
|
82
|
-
provider = "groq"
|
|
83
|
-
model = "llama-3.3-70b-versatile"
|
|
84
|
-
authType = "api_key"
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
| Model | Description |
|
|
88
|
-
|-------|-------------|
|
|
89
|
-
| `llama-3.3-70b-versatile` | Llama 3.3 70B on Groq inference |
|
|
90
|
-
|
|
91
|
-
Groq runs open-source models at high speed. Check [Groq's docs](https://console.groq.com/docs/models) for the full list of available model IDs.
|
|
92
|
-
|
|
93
|
-
**Credential:** `groq_key` (field: `token`)
|
|
94
|
-
|
|
95
|
-
### Google Gemini
|
|
96
|
-
|
|
97
|
-
```toml
|
|
98
|
-
[model]
|
|
99
|
-
provider = "google"
|
|
100
|
-
model = "gemini-2.0-flash-exp"
|
|
101
|
-
authType = "api_key"
|
|
102
|
-
```
|
|
103
|
-
|
|
104
|
-
| Model | Description |
|
|
105
|
-
|-------|-------------|
|
|
106
|
-
| `gemini-2.0-flash-exp` | Fast experimental model |
|
|
107
|
-
|
|
108
|
-
Check [Google AI Studio](https://ai.google.dev/models) for the full list of available model IDs.
|
|
109
|
-
|
|
110
|
-
**Credential:** `google_key` (field: `token`)
|
|
111
|
-
|
|
112
|
-
### xAI
|
|
113
|
-
|
|
114
|
-
```toml
|
|
115
|
-
[model]
|
|
116
|
-
provider = "xai"
|
|
117
|
-
model = "grok-beta"
|
|
118
|
-
authType = "api_key"
|
|
119
|
-
```
|
|
120
|
-
|
|
121
|
-
| Model | Description |
|
|
122
|
-
|-------|-------------|
|
|
123
|
-
| `grok-beta` | Grok beta |
|
|
124
|
-
|
|
125
|
-
**Credential:** `xai_key` (field: `token`)
|
|
126
|
-
|
|
127
|
-
### Mistral
|
|
128
|
-
|
|
129
|
-
```toml
|
|
130
|
-
[model]
|
|
131
|
-
provider = "mistral"
|
|
132
|
-
model = "mistral-large-2411"
|
|
133
|
-
authType = "api_key"
|
|
134
|
-
```
|
|
135
|
-
|
|
136
|
-
| Model | Description |
|
|
137
|
-
|-------|-------------|
|
|
138
|
-
| `mistral-large-2411` | Mistral Large (November 2024) |
|
|
139
|
-
|
|
140
|
-
Check [Mistral's docs](https://docs.mistral.ai/getting-started/models/) for the full list of available model IDs.
|
|
141
|
-
|
|
142
|
-
**Credential:** `mistral_key` (field: `token`)
|
|
143
|
-
|
|
144
|
-
### OpenRouter
|
|
145
|
-
|
|
146
|
-
OpenRouter provides access to models from many providers through a single API.
|
|
147
|
-
|
|
148
|
-
```toml
|
|
149
|
-
[model]
|
|
150
|
-
provider = "openrouter"
|
|
151
|
-
model = "anthropic/claude-3.5-sonnet"
|
|
152
|
-
authType = "api_key"
|
|
153
|
-
```
|
|
154
|
-
|
|
155
|
-
Model IDs use the `provider/model` format. See [OpenRouter's model list](https://openrouter.ai/models) for all available models.
|
|
156
|
-
|
|
157
|
-
**Credential:** `openrouter_key` (field: `token`)
|
|
158
|
-
|
|
159
|
-
### Custom
|
|
160
|
-
|
|
161
|
-
For any provider not listed above. The model ID and API routing are handled by the underlying [pi.dev agent harness](https://github.com/badlogic/pi-mono).
|
|
162
|
-
|
|
163
|
-
```toml
|
|
164
|
-
[model]
|
|
165
|
-
provider = "custom"
|
|
166
|
-
model = "your-model-name"
|
|
167
|
-
authType = "api_key"
|
|
168
|
-
```
|
|
169
|
-
|
|
170
|
-
**Credential:** `custom_key` (field: `token`)
|
|
171
|
-
|
|
172
|
-
## Mixing Models
|
|
173
|
-
|
|
174
|
-
Each agent can use a different model. Define a project default in `config.toml`, then override in specific agents:
|
|
175
|
-
|
|
176
|
-
```
|
|
177
|
-
config.toml → [model] provider = "anthropic", model = "claude-sonnet-4-20250514"
|
|
178
|
-
dev/agent-config.toml → (no [model] section — inherits Claude Sonnet)
|
|
179
|
-
reviewer/agent-config.toml → [model] provider = "openai", model = "gpt-4o"
|
|
180
|
-
devops/agent-config.toml → [model] provider = "groq", model = "llama-3.3-70b-versatile"
|
|
181
|
-
```
|
|
182
|
-
|
|
183
|
-
If an agent defines its own `[model]` section, it fully overrides the project default — there is no field-level merging.
|
|
184
|
-
|
|
185
|
-
## Credential Setup
|
|
186
|
-
|
|
187
|
-
Each provider requires a corresponding credential in `~/.action-llama/credentials/`. Run `al doctor` to configure them interactively.
|
|
188
|
-
|
|
189
|
-
The LLM credential does not need to be listed in your agent's `credentials` array — it is loaded automatically based on the `[model]` config. The `credentials` array is for runtime credentials the agent uses during execution (GitHub tokens, SSH keys, etc.).
|
|
190
|
-
|
|
191
|
-
See [Credentials](credentials.md) for the full credential reference.
|