@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.
Files changed (135) hide show
  1. package/dist/agents/container-runner.d.ts +3 -2
  2. package/dist/agents/container-runner.d.ts.map +1 -1
  3. package/dist/agents/container-runner.js +12 -12
  4. package/dist/agents/container-runner.js.map +1 -1
  5. package/dist/agents/runner.d.ts +3 -2
  6. package/dist/agents/runner.d.ts.map +1 -1
  7. package/dist/agents/runner.js +14 -14
  8. package/dist/agents/runner.js.map +1 -1
  9. package/dist/build-info.json +1 -1
  10. package/dist/cli/commands/chat.js +1 -1
  11. package/dist/cli/commands/chat.js.map +1 -1
  12. package/dist/cli/commands/doctor.d.ts +1 -0
  13. package/dist/cli/commands/doctor.d.ts.map +1 -1
  14. package/dist/cli/commands/doctor.js +38 -15
  15. package/dist/cli/commands/doctor.js.map +1 -1
  16. package/dist/cli/commands/env.d.ts +4 -0
  17. package/dist/cli/commands/env.d.ts.map +1 -1
  18. package/dist/cli/commands/env.js +37 -0
  19. package/dist/cli/commands/env.js.map +1 -1
  20. package/dist/cli/commands/kill.d.ts.map +1 -1
  21. package/dist/cli/commands/kill.js +1 -0
  22. package/dist/cli/commands/kill.js.map +1 -1
  23. package/dist/cli/commands/logs.d.ts.map +1 -1
  24. package/dist/cli/commands/logs.js +28 -23
  25. package/dist/cli/commands/logs.js.map +1 -1
  26. package/dist/cli/commands/pause.d.ts.map +1 -1
  27. package/dist/cli/commands/pause.js +1 -0
  28. package/dist/cli/commands/pause.js.map +1 -1
  29. package/dist/cli/commands/push.d.ts +1 -0
  30. package/dist/cli/commands/push.d.ts.map +1 -1
  31. package/dist/cli/commands/push.js +1 -1
  32. package/dist/cli/commands/push.js.map +1 -1
  33. package/dist/cli/commands/resume.d.ts.map +1 -1
  34. package/dist/cli/commands/resume.js +1 -0
  35. package/dist/cli/commands/resume.js.map +1 -1
  36. package/dist/cli/commands/run.d.ts.map +1 -1
  37. package/dist/cli/commands/run.js +21 -46
  38. package/dist/cli/commands/run.js.map +1 -1
  39. package/dist/cli/commands/start.d.ts.map +1 -1
  40. package/dist/cli/commands/start.js +62 -2
  41. package/dist/cli/commands/start.js.map +1 -1
  42. package/dist/cli/commands/status.d.ts.map +1 -1
  43. package/dist/cli/commands/status.js +20 -4
  44. package/dist/cli/commands/status.js.map +1 -1
  45. package/dist/cli/commands/stop.d.ts +1 -0
  46. package/dist/cli/commands/stop.d.ts.map +1 -1
  47. package/dist/cli/commands/stop.js +1 -0
  48. package/dist/cli/commands/stop.js.map +1 -1
  49. package/dist/cli/gateway-client.d.ts +4 -2
  50. package/dist/cli/gateway-client.d.ts.map +1 -1
  51. package/dist/cli/gateway-client.js +6 -4
  52. package/dist/cli/gateway-client.js.map +1 -1
  53. package/dist/cli/main.js +12 -0
  54. package/dist/cli/main.js.map +1 -1
  55. package/dist/cloud/vps/hetzner-api.d.ts +144 -0
  56. package/dist/cloud/vps/hetzner-api.d.ts.map +1 -0
  57. package/dist/cloud/vps/hetzner-api.js +108 -0
  58. package/dist/cloud/vps/hetzner-api.js.map +1 -0
  59. package/dist/cloud/vps/provision.d.ts.map +1 -1
  60. package/dist/cloud/vps/provision.js +425 -2
  61. package/dist/cloud/vps/provision.js.map +1 -1
  62. package/dist/cloud/vps/teardown.d.ts.map +1 -1
  63. package/dist/cloud/vps/teardown.js +11 -1
  64. package/dist/cloud/vps/teardown.js.map +1 -1
  65. package/dist/credentials/builtins/hetzner-api-key.d.ts +4 -0
  66. package/dist/credentials/builtins/hetzner-api-key.d.ts.map +1 -0
  67. package/dist/credentials/builtins/hetzner-api-key.js +24 -0
  68. package/dist/credentials/builtins/hetzner-api-key.js.map +1 -0
  69. package/dist/credentials/builtins/index.d.ts.map +1 -1
  70. package/dist/credentials/builtins/index.js +2 -0
  71. package/dist/credentials/builtins/index.js.map +1 -1
  72. package/dist/docker/local-runtime.d.ts +1 -0
  73. package/dist/docker/local-runtime.d.ts.map +1 -1
  74. package/dist/docker/local-runtime.js +9 -6
  75. package/dist/docker/local-runtime.js.map +1 -1
  76. package/dist/gateway/index.d.ts.map +1 -1
  77. package/dist/gateway/index.js +5 -4
  78. package/dist/gateway/index.js.map +1 -1
  79. package/dist/gateway/routes/logs.d.ts.map +1 -1
  80. package/dist/gateway/routes/logs.js +29 -111
  81. package/dist/gateway/routes/logs.js.map +1 -1
  82. package/dist/remote/bootstrap.js +2 -2
  83. package/dist/remote/bootstrap.js.map +1 -1
  84. package/dist/remote/push.d.ts +6 -1
  85. package/dist/remote/push.d.ts.map +1 -1
  86. package/dist/remote/push.js +130 -39
  87. package/dist/remote/push.js.map +1 -1
  88. package/dist/remote/ssh.d.ts +1 -0
  89. package/dist/remote/ssh.d.ts.map +1 -1
  90. package/dist/remote/ssh.js +8 -0
  91. package/dist/remote/ssh.js.map +1 -1
  92. package/dist/scheduler/index.d.ts.map +1 -1
  93. package/dist/scheduler/index.js +21 -7
  94. package/dist/scheduler/index.js.map +1 -1
  95. package/dist/scheduler/watcher.d.ts +1 -1
  96. package/dist/scheduler/watcher.d.ts.map +1 -1
  97. package/dist/scheduler/watcher.js +5 -6
  98. package/dist/scheduler/watcher.js.map +1 -1
  99. package/dist/shared/config.d.ts +2 -0
  100. package/dist/shared/config.d.ts.map +1 -1
  101. package/dist/shared/config.js.map +1 -1
  102. package/dist/shared/credentials.d.ts +8 -18
  103. package/dist/shared/credentials.d.ts.map +1 -1
  104. package/dist/shared/credentials.js +8 -62
  105. package/dist/shared/credentials.js.map +1 -1
  106. package/dist/shared/server.d.ts +2 -0
  107. package/dist/shared/server.d.ts.map +1 -1
  108. package/dist/shared/server.js.map +1 -1
  109. package/dist/tui/App.d.ts.map +1 -1
  110. package/dist/tui/App.js +1 -1
  111. package/dist/tui/App.js.map +1 -1
  112. package/dist/webhooks/registry.d.ts.map +1 -1
  113. package/dist/webhooks/registry.js +9 -3
  114. package/dist/webhooks/registry.js.map +1 -1
  115. package/dist/webhooks/types.d.ts +1 -1
  116. package/dist/webhooks/types.d.ts.map +1 -1
  117. package/docs/agent-config-reference.md +2 -2
  118. package/docs/agent-reference/AGENTS.md +8 -15
  119. package/docs/cloud.md +2 -1
  120. package/docs/credentials.md +2 -2
  121. package/docs/examples/dev/ACTIONS.md +55 -34
  122. package/docs/examples/dev/README.md +18 -4
  123. package/docs/examples/dev/agent-config.toml +11 -5
  124. package/docs/examples/index.md +2 -2
  125. package/docs/examples/planner/ACTIONS.md +177 -0
  126. package/docs/examples/planner/README.md +39 -0
  127. package/docs/examples/planner/agent-config.toml +31 -0
  128. package/docs/examples/reviewer/ACTIONS.md +137 -21
  129. package/docs/examples/reviewer/README.md +26 -9
  130. package/docs/examples/reviewer/agent-config.toml +18 -8
  131. package/docs/vps-deployment.md +11 -1
  132. package/package.json +1 -1
  133. package/docs/examples/devops/ACTIONS.md +0 -33
  134. package/docs/examples/devops/README.md +0 -23
  135. 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, approves good ones, requests changes on problematic ones, and auto-merges approved PRs with passing CI.
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 `repos` to the repositories you want reviewed
10
- - Adjust `schedule` as needed (default: every 5 minutes)
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
- 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)
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
- The agent reviews **all** open PRs in a single run and never approves a PR with failing CI.
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 = "*/5 * * * *"
2
+ schedule = "0 * * * *"
3
+ scale = 4
4
+ timeout = 1800
3
5
 
4
- [params]
5
- repos = ["acme/app"]
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
- [model]
8
- provider = "anthropic"
9
- model = "claude-sonnet-4-20250514"
10
- thinkingLevel = "medium"
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"
@@ -38,7 +38,7 @@ Requirements:
38
38
 
39
39
  #### Provision a new Vultr VPS
40
40
 
41
- Automated provisioning with Vultr as the first supported backend:
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,6 +1,6 @@
1
1
  {
2
2
  "name": "@action-llama/action-llama",
3
- "version": "0.12.1",
3
+ "version": "0.13.0",
4
4
  "description": "Automated development agents triggered by cron or webhooks. BYOM — bring your own model.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -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"]