@action-llama/action-llama 0.9.2 → 0.10.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/AGENTS.md +56 -28
- package/README.md +1 -1
- package/dist/agents/container-entry.d.ts.map +1 -1
- package/dist/agents/container-entry.js +66 -4
- package/dist/agents/container-entry.js.map +1 -1
- package/dist/agents/container-runner.d.ts +3 -4
- package/dist/agents/container-runner.d.ts.map +1 -1
- package/dist/agents/container-runner.js +21 -33
- package/dist/agents/container-runner.js.map +1 -1
- package/dist/agents/execution-engine.d.ts +17 -0
- package/dist/agents/execution-engine.d.ts.map +1 -0
- package/dist/agents/execution-engine.js +196 -0
- package/dist/agents/execution-engine.js.map +1 -0
- package/dist/agents/git-environment.d.ts +18 -0
- package/dist/agents/git-environment.d.ts.map +1 -0
- package/dist/agents/git-environment.js +63 -0
- package/dist/agents/git-environment.js.map +1 -0
- package/dist/agents/lambda-handler.js +1 -1
- package/dist/agents/lambda-handler.js.map +1 -1
- package/dist/agents/prompt.d.ts +4 -2
- package/dist/agents/prompt.d.ts.map +1 -1
- package/dist/agents/prompt.js +57 -5
- package/dist/agents/prompt.js.map +1 -1
- package/dist/agents/runner.d.ts +7 -1
- package/dist/agents/runner.d.ts.map +1 -1
- package/dist/agents/runner.js +54 -25
- package/dist/agents/runner.js.map +1 -1
- package/dist/agents/signals.d.ts +25 -0
- package/dist/agents/signals.d.ts.map +1 -0
- package/dist/agents/signals.js +105 -0
- package/dist/agents/signals.js.map +1 -0
- package/dist/agents/status-reporter.d.ts +34 -0
- package/dist/agents/status-reporter.d.ts.map +1 -0
- package/dist/agents/status-reporter.js +64 -0
- package/dist/agents/status-reporter.js.map +1 -0
- package/dist/cli/commands/chat.js +2 -2
- package/dist/cli/commands/chat.js.map +1 -1
- package/dist/cli/commands/creds.js +3 -3
- package/dist/cli/commands/creds.js.map +1 -1
- package/dist/cli/commands/doctor.js +3 -3
- package/dist/cli/commands/doctor.js.map +1 -1
- package/dist/cli/commands/kill.d.ts +4 -0
- package/dist/cli/commands/kill.d.ts.map +1 -0
- package/dist/cli/commands/kill.js +30 -0
- package/dist/cli/commands/kill.js.map +1 -0
- package/dist/cli/commands/new.js +2 -2
- package/dist/cli/commands/new.js.map +1 -1
- package/dist/cli/commands/pause.d.ts +4 -0
- package/dist/cli/commands/pause.d.ts.map +1 -0
- package/dist/cli/commands/pause.js +30 -0
- package/dist/cli/commands/pause.js.map +1 -0
- package/dist/cli/commands/resume.d.ts +4 -0
- package/dist/cli/commands/resume.d.ts.map +1 -0
- package/dist/cli/commands/resume.js +30 -0
- package/dist/cli/commands/resume.js.map +1 -0
- package/dist/cli/commands/run.d.ts +0 -1
- package/dist/cli/commands/run.d.ts.map +1 -1
- package/dist/cli/commands/run.js +7 -18
- package/dist/cli/commands/run.js.map +1 -1
- package/dist/cli/commands/start.d.ts +0 -1
- package/dist/cli/commands/start.d.ts.map +1 -1
- package/dist/cli/commands/start.js +7 -8
- 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 +74 -0
- package/dist/cli/commands/status.js.map +1 -1
- package/dist/cli/main.js +25 -2
- package/dist/cli/main.js.map +1 -1
- package/dist/credentials/prompter.js +3 -3
- package/dist/credentials/prompter.js.map +1 -1
- package/dist/docker/lambda-runtime.d.ts.map +1 -1
- package/dist/docker/lambda-runtime.js +12 -4
- package/dist/docker/lambda-runtime.js.map +1 -1
- package/dist/docker/local-runtime.d.ts +2 -0
- package/dist/docker/local-runtime.d.ts.map +1 -1
- package/dist/docker/local-runtime.js +31 -0
- package/dist/docker/local-runtime.js.map +1 -1
- package/dist/docker/runtime.d.ts +4 -0
- package/dist/docker/runtime.d.ts.map +1 -1
- package/dist/gateway/call-store.d.ts +39 -0
- package/dist/gateway/call-store.d.ts.map +1 -0
- package/dist/gateway/call-store.js +101 -0
- package/dist/gateway/call-store.js.map +1 -0
- package/dist/gateway/index.d.ts +8 -0
- package/dist/gateway/index.d.ts.map +1 -1
- package/dist/gateway/index.js +23 -2
- package/dist/gateway/index.js.map +1 -1
- package/dist/gateway/routes/calls.d.ts +17 -0
- package/dist/gateway/routes/calls.d.ts.map +1 -0
- package/dist/gateway/routes/calls.js +63 -0
- package/dist/gateway/routes/calls.js.map +1 -0
- package/dist/gateway/routes/control.d.ts +10 -0
- package/dist/gateway/routes/control.d.ts.map +1 -0
- package/dist/gateway/routes/control.js +64 -0
- package/dist/gateway/routes/control.js.map +1 -0
- package/dist/gateway/routes/locks.d.ts.map +1 -1
- package/dist/gateway/routes/locks.js +12 -0
- package/dist/gateway/routes/locks.js.map +1 -1
- package/dist/gateway/routes/signals.d.ts +11 -0
- package/dist/gateway/routes/signals.d.ts.map +1 -0
- package/dist/gateway/routes/signals.js +103 -0
- package/dist/gateway/routes/signals.js.map +1 -0
- package/dist/gateway/types.d.ts +16 -0
- package/dist/gateway/types.d.ts.map +1 -1
- package/dist/scheduler/config-validator.d.ts +18 -0
- package/dist/scheduler/config-validator.d.ts.map +1 -0
- package/dist/scheduler/config-validator.js +53 -0
- package/dist/scheduler/config-validator.js.map +1 -0
- package/dist/scheduler/cron-manager.d.ts +14 -0
- package/dist/scheduler/cron-manager.d.ts.map +1 -0
- package/dist/scheduler/cron-manager.js +75 -0
- package/dist/scheduler/cron-manager.js.map +1 -0
- package/dist/scheduler/event-queue.d.ts +7 -4
- package/dist/scheduler/event-queue.d.ts.map +1 -1
- package/dist/scheduler/event-queue.js +4 -2
- package/dist/scheduler/event-queue.js.map +1 -1
- package/dist/scheduler/index.d.ts.map +1 -1
- package/dist/scheduler/index.js +126 -115
- package/dist/scheduler/index.js.map +1 -1
- package/dist/scheduler/runner-pool.d.ts +20 -0
- package/dist/scheduler/runner-pool.d.ts.map +1 -1
- package/dist/scheduler/runner-pool.js +32 -4
- package/dist/scheduler/runner-pool.js.map +1 -1
- package/dist/scheduler/runtime-factory.d.ts +11 -0
- package/dist/scheduler/runtime-factory.d.ts.map +1 -0
- package/dist/scheduler/runtime-factory.js +98 -0
- package/dist/scheduler/runtime-factory.js.map +1 -0
- package/dist/scheduler/shutdown-handler.d.ts +16 -0
- package/dist/scheduler/shutdown-handler.d.ts.map +1 -0
- package/dist/scheduler/shutdown-handler.js +44 -0
- package/dist/scheduler/shutdown-handler.js.map +1 -0
- package/dist/scheduler/trigger-dispatcher.d.ts +12 -0
- package/dist/scheduler/trigger-dispatcher.d.ts.map +1 -0
- package/dist/scheduler/trigger-dispatcher.js +46 -0
- package/dist/scheduler/trigger-dispatcher.js.map +1 -0
- package/dist/scheduler/types.d.ts +8 -0
- package/dist/scheduler/types.d.ts.map +1 -1
- package/dist/scheduler/webhook-setup.d.ts +28 -0
- package/dist/scheduler/webhook-setup.d.ts.map +1 -0
- package/dist/scheduler/webhook-setup.js +146 -0
- package/dist/scheduler/webhook-setup.js.map +1 -0
- package/dist/setup/prompts.js +4 -4
- package/dist/setup/prompts.js.map +1 -1
- package/dist/shared/config.d.ts +4 -0
- package/dist/shared/config.d.ts.map +1 -1
- package/dist/shared/config.js.map +1 -1
- package/dist/shared/credentials.d.ts +11 -31
- package/dist/shared/credentials.d.ts.map +1 -1
- package/dist/shared/credentials.js +22 -87
- package/dist/shared/credentials.js.map +1 -1
- package/dist/shared/exit-codes.d.ts +18 -0
- package/dist/shared/exit-codes.d.ts.map +1 -0
- package/dist/shared/exit-codes.js +40 -0
- package/dist/shared/exit-codes.js.map +1 -0
- package/dist/shared/filesystem-backend.d.ts +4 -0
- package/dist/shared/filesystem-backend.d.ts.map +1 -1
- package/dist/shared/filesystem-backend.js +35 -0
- package/dist/shared/filesystem-backend.js.map +1 -1
- package/dist/tui/status-tracker.d.ts +23 -0
- package/dist/tui/status-tracker.d.ts.map +1 -1
- package/dist/tui/status-tracker.js +36 -0
- package/dist/tui/status-tracker.js.map +1 -1
- package/docker/Dockerfile +1 -0
- package/package.json +1 -1
- package/skills/environment.md +1 -1
- package/skills/resource-locks.md +1 -1
- package/skills/signals.md +67 -25
package/skills/signals.md
CHANGED
|
@@ -1,56 +1,98 @@
|
|
|
1
1
|
# Skill: Signals
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Use signal commands to communicate with the scheduler and trigger actions. These commands write signal files to `$AL_SIGNAL_DIR` and optionally POST to the gateway for real-time TUI updates.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Commands
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
**`al-rerun`** — Request an immediate rerun after completing work.
|
|
8
8
|
|
|
9
9
|
```
|
|
10
|
-
|
|
10
|
+
al-rerun
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
**When to use:** When you completed work (e.g. processed an issue, merged a PR) and there may be additional items in the backlog. The scheduler will immediately re-run you (up to `maxReruns` times) to drain remaining work.
|
|
14
14
|
|
|
15
|
-
**When NOT to use:** If you found no work to do, or if you completed work but the backlog is empty. Simply end without
|
|
15
|
+
**When NOT to use:** If you found no work to do, or if you completed work but the backlog is empty. Simply end without calling `al-rerun` and the scheduler will wait for the next scheduled run.
|
|
16
16
|
|
|
17
|
-
**Default behavior:** Without `
|
|
17
|
+
**Default behavior:** Without `al-rerun`, the scheduler treats your run as complete and does not rerun. This is the safe default — errors, rate limits, and empty runs won't trigger unwanted reruns.
|
|
18
18
|
|
|
19
|
-
## `
|
|
19
|
+
## `al-status "<text>"`
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
Updates your status displayed in the TUI and logs.
|
|
22
22
|
|
|
23
23
|
```
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
al-status "reviewing PR #42"
|
|
25
|
+
al-status "deploying api-prod"
|
|
26
|
+
al-status "waiting for CI checks"
|
|
27
27
|
```
|
|
28
28
|
|
|
29
29
|
**When to use:** At natural milestones during your work — starting a new phase, switching tasks, or waiting on something. Helps the operator see what you're doing in real time.
|
|
30
30
|
|
|
31
|
-
**Format:**
|
|
31
|
+
**Format:** Provide the status text as a quoted argument. Keep it short and descriptive.
|
|
32
32
|
|
|
33
|
-
## `
|
|
33
|
+
## `al-return`
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
Returns a value to the calling agent when you were invoked via `al-call`.
|
|
36
36
|
|
|
37
37
|
```
|
|
38
|
-
|
|
39
|
-
I just opened PR #42 on acme/app. Please review it.
|
|
40
|
-
URL: https://github.com/acme/app/pull/42
|
|
41
|
-
[/TRIGGER]
|
|
38
|
+
al-return "PR looks good. Approved with minor suggestions."
|
|
42
39
|
```
|
|
43
40
|
|
|
44
|
-
|
|
41
|
+
For multiline results, pipe via stdin:
|
|
45
42
|
|
|
46
|
-
|
|
43
|
+
```
|
|
44
|
+
cat <<'EOF' | al-return
|
|
45
|
+
PR looks good. Approved with minor suggestions:
|
|
46
|
+
- Line 42: consider using a const instead of let
|
|
47
|
+
- Line 89: missing error handling for the API call
|
|
48
|
+
EOF
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
**When to use:** When you were called by another agent (you'll see an `<agent-call>` block in your prompt) and need to send back a result. Pass your return value as an argument or pipe it via stdin.
|
|
47
52
|
|
|
48
53
|
**Rules:**
|
|
49
|
-
-
|
|
50
|
-
- If
|
|
51
|
-
-
|
|
52
|
-
|
|
54
|
+
- If you call `al-return` multiple times, the last value wins
|
|
55
|
+
- If you were not called by another agent, `al-return` is a no-op
|
|
56
|
+
- Call chains are bounded by `maxCallDepth` (default: 3) to prevent infinite loops
|
|
57
|
+
|
|
58
|
+
## `al-exit [code]`
|
|
59
|
+
|
|
60
|
+
Terminates the agent with an optional exit code, indicating an unrecoverable error or intentional abort.
|
|
61
|
+
|
|
62
|
+
```
|
|
63
|
+
al-exit 10 # GitHub token is invalid or expired
|
|
64
|
+
al-exit 11 # Permission denied accessing repository
|
|
65
|
+
al-exit 15 # Unrecoverable error in build system
|
|
66
|
+
al-exit # Defaults to 15 (unrecoverable error)
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
**When to use:** When encountering errors that cannot be resolved by retrying — authentication failures, permission issues, invalid configuration, or when you need to abort due to user request or safety concerns.
|
|
70
|
+
|
|
71
|
+
**Format:** Pass the exit code as an argument, or omit for code 15 (unrecoverable error).
|
|
72
|
+
|
|
73
|
+
**Standard exit codes:**
|
|
74
|
+
- `10` — Authentication/credentials failure
|
|
75
|
+
- `11` — Permission/access denied
|
|
76
|
+
- `12` — Rate limit exceeded
|
|
77
|
+
- `13` — Configuration error
|
|
78
|
+
- `14` — Missing dependency or service error
|
|
79
|
+
- `15` — Generic unrecoverable error (default)
|
|
80
|
+
- `16` — User-requested abort
|
|
81
|
+
|
|
82
|
+
**Behavior:** The agent terminates with the specified exit code. The scheduler will not retry automatically.
|
|
83
|
+
|
|
84
|
+
**When NOT to use:** For transient errors (network timeouts, temporary rate limits) or normal completion. Use normal error handling or simply complete the run instead.
|
|
85
|
+
|
|
86
|
+
## Responses
|
|
87
|
+
|
|
88
|
+
All signal commands return JSON responses:
|
|
89
|
+
- Success: `{"ok":true}`
|
|
90
|
+
- Error: `{"ok":false,"error":"<message>"}`
|
|
53
91
|
|
|
54
92
|
## Multiple signals
|
|
55
93
|
|
|
56
|
-
You can
|
|
94
|
+
You can use multiple signal commands in one run. For example, you might run several `al-status` updates as you work, then `al-return` with your result, and `al-rerun` if there's more work to do.
|
|
95
|
+
|
|
96
|
+
## Graceful degradation
|
|
97
|
+
|
|
98
|
+
Commands gracefully degrade when `GATEWAY_URL` is not set — signal files are always written, but real-time TUI updates only work when a gateway is available. This allows agents to work in both containerized and host environments.
|