@action-llama/action-llama 0.12.1 → 0.13.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/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/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/chat.js +1 -1
- package/dist/cli/commands/chat.js.map +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 +38 -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 +37 -0
- package/dist/cli/commands/env.js.map +1 -1
- package/dist/cli/commands/kill.d.ts.map +1 -1
- package/dist/cli/commands/kill.js +1 -0
- 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 +28 -23
- package/dist/cli/commands/logs.js.map +1 -1
- package/dist/cli/commands/pause.d.ts.map +1 -1
- package/dist/cli/commands/pause.js +1 -0
- 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 +1 -1
- package/dist/cli/commands/push.js.map +1 -1
- package/dist/cli/commands/resume.d.ts.map +1 -1
- package/dist/cli/commands/resume.js +1 -0
- 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 +20 -4
- 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 +1 -0
- package/dist/cli/commands/stop.js.map +1 -1
- package/dist/cli/gateway-client.d.ts +4 -2
- package/dist/cli/gateway-client.d.ts.map +1 -1
- package/dist/cli/gateway-client.js +6 -4
- 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/hetzner-api.d.ts +144 -0
- package/dist/cloud/vps/hetzner-api.d.ts.map +1 -0
- package/dist/cloud/vps/hetzner-api.js +108 -0
- package/dist/cloud/vps/hetzner-api.js.map +1 -0
- package/dist/cloud/vps/provision.d.ts.map +1 -1
- package/dist/cloud/vps/provision.js +425 -2
- package/dist/cloud/vps/provision.js.map +1 -1
- package/dist/cloud/vps/teardown.d.ts.map +1 -1
- package/dist/cloud/vps/teardown.js +11 -1
- package/dist/cloud/vps/teardown.js.map +1 -1
- package/dist/credentials/builtins/hetzner-api-key.d.ts +4 -0
- package/dist/credentials/builtins/hetzner-api-key.d.ts.map +1 -0
- package/dist/credentials/builtins/hetzner-api-key.js +24 -0
- package/dist/credentials/builtins/hetzner-api-key.js.map +1 -0
- 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/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.js +2 -2
- package/dist/remote/bootstrap.js.map +1 -1
- package/dist/remote/push.d.ts +6 -1
- package/dist/remote/push.d.ts.map +1 -1
- package/dist/remote/push.js +130 -39
- 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 +21 -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/shared/config.d.ts +2 -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/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 +1 -1
- package/dist/webhooks/types.d.ts.map +1 -1
- package/docs/agent-config-reference.md +2 -2
- package/docs/agent-reference/AGENTS.md +8 -15
- package/docs/cloud.md +2 -1
- package/docs/credentials.md +2 -2
- package/docs/examples/dev/ACTIONS.md +55 -34
- package/docs/examples/dev/README.md +18 -4
- package/docs/examples/dev/agent-config.toml +11 -5
- package/docs/examples/index.md +2 -2
- package/docs/examples/planner/ACTIONS.md +177 -0
- package/docs/examples/planner/README.md +39 -0
- package/docs/examples/planner/agent-config.toml +31 -0
- package/docs/examples/reviewer/ACTIONS.md +137 -21
- package/docs/examples/reviewer/README.md +26 -9
- package/docs/examples/reviewer/agent-config.toml +18 -8
- package/docs/vps-deployment.md +11 -1
- package/package.json +1 -1
- 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
|
@@ -1,22 +1,39 @@
|
|
|
1
1
|
# Reviewer Agent
|
|
2
2
|
|
|
3
|
-
A code review agent that reviews open pull requests,
|
|
3
|
+
A code review agent that automatically reviews open pull requests, runs checks, fixes failures, and merges approved PRs.
|
|
4
4
|
|
|
5
5
|
## Setup
|
|
6
6
|
|
|
7
7
|
1. Copy `agent-config.toml` and `ACTIONS.md` into `agents/reviewer/` in your project
|
|
8
8
|
2. Edit `agent-config.toml`:
|
|
9
|
-
- Set `
|
|
10
|
-
-
|
|
9
|
+
- Set `orgs` to your GitHub organization
|
|
10
|
+
- Set `author` in `[params]` to filter PRs by author (optional)
|
|
11
11
|
3. Run `al doctor` to verify credentials
|
|
12
12
|
|
|
13
|
+
## Trigger modes
|
|
14
|
+
|
|
15
|
+
**Webhook (recommended):** Fires on PR events (`opened`, `synchronize`, `ready_for_review`) and when check suites complete. Requires a GitHub webhook configured in `config.toml` — see [Webhooks docs](../../docs/webhooks.md).
|
|
16
|
+
|
|
17
|
+
**Scheduled:** Runs on a cron schedule (default: hourly). Searches for open PRs across the configured organization.
|
|
18
|
+
|
|
13
19
|
## How it works
|
|
14
20
|
|
|
15
|
-
Each run, the agent:
|
|
21
|
+
Each run, the agent works on one PR:
|
|
22
|
+
|
|
23
|
+
1. Finds a PR to review (from webhook trigger or scheduled search)
|
|
24
|
+
2. Acquires a resource lock to prevent duplicate reviews
|
|
25
|
+
3. Clones the repo and checks out the PR branch
|
|
26
|
+
4. Reviews code for security issues and quality
|
|
27
|
+
5. Runs tests, lint, and build — fixes failures (up to 3 rounds)
|
|
28
|
+
6. Squash-merges if all checks pass, or comments with issues found
|
|
29
|
+
|
|
30
|
+
## Custom Dockerfile
|
|
16
31
|
|
|
17
|
-
|
|
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)
|
|
32
|
+
The reviewer 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)):
|
|
21
33
|
|
|
22
|
-
|
|
34
|
+
```dockerfile
|
|
35
|
+
FROM al-agent:latest
|
|
36
|
+
USER root
|
|
37
|
+
RUN apk add --no-cache github-cli
|
|
38
|
+
USER node
|
|
39
|
+
```
|
|
@@ -1,11 +1,21 @@
|
|
|
1
1
|
credentials = ["github_token", "git_ssh"]
|
|
2
|
-
schedule = "
|
|
2
|
+
schedule = "0 * * * *"
|
|
3
|
+
scale = 4
|
|
4
|
+
timeout = 1800
|
|
3
5
|
|
|
4
|
-
[
|
|
5
|
-
|
|
6
|
+
[[webhooks]]
|
|
7
|
+
source = "github"
|
|
8
|
+
orgs = ["your-org"]
|
|
9
|
+
events = ["pull_request"]
|
|
10
|
+
actions = ["opened", "synchronize", "ready_for_review"]
|
|
11
|
+
|
|
12
|
+
[[webhooks]]
|
|
13
|
+
source = "github"
|
|
14
|
+
orgs = ["your-org"]
|
|
15
|
+
events = ["check_suite"]
|
|
16
|
+
actions = ["completed"]
|
|
6
17
|
|
|
7
|
-
[
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
authType = "api_key"
|
|
18
|
+
[params]
|
|
19
|
+
# Organization to monitor during scheduled runs (webhook runs use repo from trigger)
|
|
20
|
+
org = "your-org"
|
|
21
|
+
author = "your-github-username"
|
package/docs/vps-deployment.md
CHANGED
|
@@ -38,7 +38,7 @@ Requirements:
|
|
|
38
38
|
|
|
39
39
|
#### Provision a new Vultr VPS
|
|
40
40
|
|
|
41
|
-
Automated provisioning with Vultr as
|
|
41
|
+
Automated provisioning with Vultr as a supported backend:
|
|
42
42
|
|
|
43
43
|
1. Configure `vultr_api_key` credential first: `al creds add vultr_api_key`
|
|
44
44
|
2. Run `al setup cloud` and select "Provision a new Vultr VPS"
|
|
@@ -46,6 +46,16 @@ Automated provisioning with Vultr as the first supported backend:
|
|
|
46
46
|
4. Instance is created with cloud-init that installs Docker automatically
|
|
47
47
|
5. Action Llama waits for the instance to become ready
|
|
48
48
|
|
|
49
|
+
#### Provision a new Hetzner VPS
|
|
50
|
+
|
|
51
|
+
Automated provisioning with Hetzner Cloud:
|
|
52
|
+
|
|
53
|
+
1. Configure `hetzner_api_key` credential first: `al creds add hetzner_api_key`
|
|
54
|
+
2. Run `al setup cloud` and select "Provision a new Hetzner VPS"
|
|
55
|
+
3. Pick server type, location, OS image, and SSH key
|
|
56
|
+
4. Server is created with cloud-init that installs Docker automatically
|
|
57
|
+
5. Action Llama waits for the server to become ready
|
|
58
|
+
|
|
49
59
|
### How It Works
|
|
50
60
|
|
|
51
61
|
| Operation | Implementation |
|
package/package.json
CHANGED
|
@@ -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"]
|