@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.
Files changed (167) hide show
  1. package/AGENTS.md +56 -28
  2. package/README.md +1 -1
  3. package/dist/agents/container-entry.d.ts.map +1 -1
  4. package/dist/agents/container-entry.js +66 -4
  5. package/dist/agents/container-entry.js.map +1 -1
  6. package/dist/agents/container-runner.d.ts +3 -4
  7. package/dist/agents/container-runner.d.ts.map +1 -1
  8. package/dist/agents/container-runner.js +21 -33
  9. package/dist/agents/container-runner.js.map +1 -1
  10. package/dist/agents/execution-engine.d.ts +17 -0
  11. package/dist/agents/execution-engine.d.ts.map +1 -0
  12. package/dist/agents/execution-engine.js +196 -0
  13. package/dist/agents/execution-engine.js.map +1 -0
  14. package/dist/agents/git-environment.d.ts +18 -0
  15. package/dist/agents/git-environment.d.ts.map +1 -0
  16. package/dist/agents/git-environment.js +63 -0
  17. package/dist/agents/git-environment.js.map +1 -0
  18. package/dist/agents/lambda-handler.js +1 -1
  19. package/dist/agents/lambda-handler.js.map +1 -1
  20. package/dist/agents/prompt.d.ts +4 -2
  21. package/dist/agents/prompt.d.ts.map +1 -1
  22. package/dist/agents/prompt.js +57 -5
  23. package/dist/agents/prompt.js.map +1 -1
  24. package/dist/agents/runner.d.ts +7 -1
  25. package/dist/agents/runner.d.ts.map +1 -1
  26. package/dist/agents/runner.js +54 -25
  27. package/dist/agents/runner.js.map +1 -1
  28. package/dist/agents/signals.d.ts +25 -0
  29. package/dist/agents/signals.d.ts.map +1 -0
  30. package/dist/agents/signals.js +105 -0
  31. package/dist/agents/signals.js.map +1 -0
  32. package/dist/agents/status-reporter.d.ts +34 -0
  33. package/dist/agents/status-reporter.d.ts.map +1 -0
  34. package/dist/agents/status-reporter.js +64 -0
  35. package/dist/agents/status-reporter.js.map +1 -0
  36. package/dist/cli/commands/chat.js +2 -2
  37. package/dist/cli/commands/chat.js.map +1 -1
  38. package/dist/cli/commands/creds.js +3 -3
  39. package/dist/cli/commands/creds.js.map +1 -1
  40. package/dist/cli/commands/doctor.js +3 -3
  41. package/dist/cli/commands/doctor.js.map +1 -1
  42. package/dist/cli/commands/kill.d.ts +4 -0
  43. package/dist/cli/commands/kill.d.ts.map +1 -0
  44. package/dist/cli/commands/kill.js +30 -0
  45. package/dist/cli/commands/kill.js.map +1 -0
  46. package/dist/cli/commands/new.js +2 -2
  47. package/dist/cli/commands/new.js.map +1 -1
  48. package/dist/cli/commands/pause.d.ts +4 -0
  49. package/dist/cli/commands/pause.d.ts.map +1 -0
  50. package/dist/cli/commands/pause.js +30 -0
  51. package/dist/cli/commands/pause.js.map +1 -0
  52. package/dist/cli/commands/resume.d.ts +4 -0
  53. package/dist/cli/commands/resume.d.ts.map +1 -0
  54. package/dist/cli/commands/resume.js +30 -0
  55. package/dist/cli/commands/resume.js.map +1 -0
  56. package/dist/cli/commands/run.d.ts +0 -1
  57. package/dist/cli/commands/run.d.ts.map +1 -1
  58. package/dist/cli/commands/run.js +7 -18
  59. package/dist/cli/commands/run.js.map +1 -1
  60. package/dist/cli/commands/start.d.ts +0 -1
  61. package/dist/cli/commands/start.d.ts.map +1 -1
  62. package/dist/cli/commands/start.js +7 -8
  63. package/dist/cli/commands/start.js.map +1 -1
  64. package/dist/cli/commands/status.d.ts.map +1 -1
  65. package/dist/cli/commands/status.js +74 -0
  66. package/dist/cli/commands/status.js.map +1 -1
  67. package/dist/cli/main.js +25 -2
  68. package/dist/cli/main.js.map +1 -1
  69. package/dist/credentials/prompter.js +3 -3
  70. package/dist/credentials/prompter.js.map +1 -1
  71. package/dist/docker/lambda-runtime.d.ts.map +1 -1
  72. package/dist/docker/lambda-runtime.js +12 -4
  73. package/dist/docker/lambda-runtime.js.map +1 -1
  74. package/dist/docker/local-runtime.d.ts +2 -0
  75. package/dist/docker/local-runtime.d.ts.map +1 -1
  76. package/dist/docker/local-runtime.js +31 -0
  77. package/dist/docker/local-runtime.js.map +1 -1
  78. package/dist/docker/runtime.d.ts +4 -0
  79. package/dist/docker/runtime.d.ts.map +1 -1
  80. package/dist/gateway/call-store.d.ts +39 -0
  81. package/dist/gateway/call-store.d.ts.map +1 -0
  82. package/dist/gateway/call-store.js +101 -0
  83. package/dist/gateway/call-store.js.map +1 -0
  84. package/dist/gateway/index.d.ts +8 -0
  85. package/dist/gateway/index.d.ts.map +1 -1
  86. package/dist/gateway/index.js +23 -2
  87. package/dist/gateway/index.js.map +1 -1
  88. package/dist/gateway/routes/calls.d.ts +17 -0
  89. package/dist/gateway/routes/calls.d.ts.map +1 -0
  90. package/dist/gateway/routes/calls.js +63 -0
  91. package/dist/gateway/routes/calls.js.map +1 -0
  92. package/dist/gateway/routes/control.d.ts +10 -0
  93. package/dist/gateway/routes/control.d.ts.map +1 -0
  94. package/dist/gateway/routes/control.js +64 -0
  95. package/dist/gateway/routes/control.js.map +1 -0
  96. package/dist/gateway/routes/locks.d.ts.map +1 -1
  97. package/dist/gateway/routes/locks.js +12 -0
  98. package/dist/gateway/routes/locks.js.map +1 -1
  99. package/dist/gateway/routes/signals.d.ts +11 -0
  100. package/dist/gateway/routes/signals.d.ts.map +1 -0
  101. package/dist/gateway/routes/signals.js +103 -0
  102. package/dist/gateway/routes/signals.js.map +1 -0
  103. package/dist/gateway/types.d.ts +16 -0
  104. package/dist/gateway/types.d.ts.map +1 -1
  105. package/dist/scheduler/config-validator.d.ts +18 -0
  106. package/dist/scheduler/config-validator.d.ts.map +1 -0
  107. package/dist/scheduler/config-validator.js +53 -0
  108. package/dist/scheduler/config-validator.js.map +1 -0
  109. package/dist/scheduler/cron-manager.d.ts +14 -0
  110. package/dist/scheduler/cron-manager.d.ts.map +1 -0
  111. package/dist/scheduler/cron-manager.js +75 -0
  112. package/dist/scheduler/cron-manager.js.map +1 -0
  113. package/dist/scheduler/event-queue.d.ts +7 -4
  114. package/dist/scheduler/event-queue.d.ts.map +1 -1
  115. package/dist/scheduler/event-queue.js +4 -2
  116. package/dist/scheduler/event-queue.js.map +1 -1
  117. package/dist/scheduler/index.d.ts.map +1 -1
  118. package/dist/scheduler/index.js +126 -115
  119. package/dist/scheduler/index.js.map +1 -1
  120. package/dist/scheduler/runner-pool.d.ts +20 -0
  121. package/dist/scheduler/runner-pool.d.ts.map +1 -1
  122. package/dist/scheduler/runner-pool.js +32 -4
  123. package/dist/scheduler/runner-pool.js.map +1 -1
  124. package/dist/scheduler/runtime-factory.d.ts +11 -0
  125. package/dist/scheduler/runtime-factory.d.ts.map +1 -0
  126. package/dist/scheduler/runtime-factory.js +98 -0
  127. package/dist/scheduler/runtime-factory.js.map +1 -0
  128. package/dist/scheduler/shutdown-handler.d.ts +16 -0
  129. package/dist/scheduler/shutdown-handler.d.ts.map +1 -0
  130. package/dist/scheduler/shutdown-handler.js +44 -0
  131. package/dist/scheduler/shutdown-handler.js.map +1 -0
  132. package/dist/scheduler/trigger-dispatcher.d.ts +12 -0
  133. package/dist/scheduler/trigger-dispatcher.d.ts.map +1 -0
  134. package/dist/scheduler/trigger-dispatcher.js +46 -0
  135. package/dist/scheduler/trigger-dispatcher.js.map +1 -0
  136. package/dist/scheduler/types.d.ts +8 -0
  137. package/dist/scheduler/types.d.ts.map +1 -1
  138. package/dist/scheduler/webhook-setup.d.ts +28 -0
  139. package/dist/scheduler/webhook-setup.d.ts.map +1 -0
  140. package/dist/scheduler/webhook-setup.js +146 -0
  141. package/dist/scheduler/webhook-setup.js.map +1 -0
  142. package/dist/setup/prompts.js +4 -4
  143. package/dist/setup/prompts.js.map +1 -1
  144. package/dist/shared/config.d.ts +4 -0
  145. package/dist/shared/config.d.ts.map +1 -1
  146. package/dist/shared/config.js.map +1 -1
  147. package/dist/shared/credentials.d.ts +11 -31
  148. package/dist/shared/credentials.d.ts.map +1 -1
  149. package/dist/shared/credentials.js +22 -87
  150. package/dist/shared/credentials.js.map +1 -1
  151. package/dist/shared/exit-codes.d.ts +18 -0
  152. package/dist/shared/exit-codes.d.ts.map +1 -0
  153. package/dist/shared/exit-codes.js +40 -0
  154. package/dist/shared/exit-codes.js.map +1 -0
  155. package/dist/shared/filesystem-backend.d.ts +4 -0
  156. package/dist/shared/filesystem-backend.d.ts.map +1 -1
  157. package/dist/shared/filesystem-backend.js +35 -0
  158. package/dist/shared/filesystem-backend.js.map +1 -1
  159. package/dist/tui/status-tracker.d.ts +23 -0
  160. package/dist/tui/status-tracker.d.ts.map +1 -1
  161. package/dist/tui/status-tracker.js +36 -0
  162. package/dist/tui/status-tracker.js.map +1 -1
  163. package/docker/Dockerfile +1 -0
  164. package/package.json +1 -1
  165. package/skills/environment.md +1 -1
  166. package/skills/resource-locks.md +1 -1
  167. package/skills/signals.md +67 -25
package/skills/signals.md CHANGED
@@ -1,56 +1,98 @@
1
1
  # Skill: Signals
2
2
 
3
- Signals are text patterns you emit in your output. The scheduler scans your output for these patterns and acts on them. They are your only communication channel back to the scheduler.
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
- ## `[RERUN]`
5
+ ## Commands
6
6
 
7
- Tells the scheduler you did work and there may be more to do requests an immediate rerun.
7
+ **`al-rerun`**Request an immediate rerun after completing work.
8
8
 
9
9
  ```
10
- [RERUN]
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 emitting `[RERUN]` and the scheduler will wait for the next scheduled run.
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 `[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.
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
- ## `[STATUS: <text>]`
19
+ ## `al-status "<text>"`
20
20
 
21
- Sends a status update to the TUI and logs.
21
+ Updates your status displayed in the TUI and logs.
22
22
 
23
23
  ```
24
- [STATUS: reviewing PR #42]
25
- [STATUS: deploying api-prod]
26
- [STATUS: waiting for CI checks]
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:** The text between `[STATUS:` and `]` is extracted verbatim. Keep it short and descriptive.
31
+ **Format:** Provide the status text as a quoted argument. Keep it short and descriptive.
32
32
 
33
- ## `[TRIGGER: <agent>]...[/TRIGGER]`
33
+ ## `al-return`
34
34
 
35
- Triggers another agent with context you provide.
35
+ Returns a value to the calling agent when you were invoked via `al-call`.
36
36
 
37
37
  ```
38
- [TRIGGER: reviewer]
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
- **When to use:** When your work creates something another agent should act on — e.g. a dev agent opens a PR and wants a reviewer agent to review it.
41
+ For multiline results, pipe via stdin:
45
42
 
46
- **Format:** The opening tag must be on its own line: `[TRIGGER: <agent-name>]`. The closing tag must also be on its own line: `[/TRIGGER]`. Everything between them becomes the context passed to the target agent.
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
- - You cannot trigger yourself self-triggers are silently skipped
50
- - If the target agent doesn't exist or is busy, the trigger is skipped
51
- - Trigger chains are bounded by `maxTriggerDepth` (default: 3) to prevent infinite loops
52
- - The target agent receives your context in an `<agent-trigger>` block with your agent name as the `source`
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 emit multiple signals in one run. For example, you might emit several `[STATUS]` updates as you work, then a `[TRIGGER]` at the end, and a `[RERUN]` if there's more work to do.
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.