@hasna/loops 0.3.2 → 0.3.4
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/README.md +8 -0
- package/dist/cli/index.js +857 -191
- package/dist/daemon/index.js +756 -167
- package/dist/index.d.ts +1 -0
- package/dist/index.js +779 -171
- package/dist/lib/executor.d.ts +11 -2
- package/dist/lib/format.d.ts +2 -1
- package/dist/lib/machines.d.ts +16 -0
- package/dist/lib/scheduler.d.ts +10 -1
- package/dist/lib/store.d.ts +21 -12
- package/dist/lib/store.js +309 -109
- package/dist/sdk/index.js +753 -165
- package/dist/types.d.ts +19 -0
- package/docs/USAGE.md +8 -0
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -170,6 +170,12 @@ loops run-now <id-or-name>
|
|
|
170
170
|
|
|
171
171
|
Use `--json` for machine-readable output. Prompt bodies and run stdout/stderr are redacted by default in status output. `loops run-now` exits non-zero when the recorded run fails or times out.
|
|
172
172
|
|
|
173
|
+
`loops run-now` reports the manual run source:
|
|
174
|
+
|
|
175
|
+
- `source=ad_hoc`: the loop was not due yet, so OpenLoops created a one-off manual slot. This is a single immediate attempt and does not schedule retries or consume the future scheduled slot.
|
|
176
|
+
- `source=due_slot`: the persisted scheduled slot was already due, so the manual run claims that slot and advances or retries the loop using normal scheduler rules.
|
|
177
|
+
- `source=retry_slot`: the loop was waiting on a failed slot retry, so the manual run claims that retry slot and advances the loop using normal retry rules.
|
|
178
|
+
|
|
173
179
|
## Daemon
|
|
174
180
|
|
|
175
181
|
```bash
|
|
@@ -207,6 +213,7 @@ On Linux this writes a user systemd service. On macOS it writes a LaunchAgent pl
|
|
|
207
213
|
- `overlap=skip` by default: a due slot records a skipped run if a previous run is still active.
|
|
208
214
|
- Each run is keyed by `(loop_id, scheduled_for)` so a slot is claimed once.
|
|
209
215
|
- Failed slots retry only when `--attempts` is greater than `1`; retries keep the original `scheduled_for` value.
|
|
216
|
+
- Failed ad-hoc manual `run-now` slots are single attempts and do not schedule retries. Due-slot and retry-slot manual runs use normal retry behavior.
|
|
210
217
|
- Running rows have leases. If a daemon dies, a later daemon marks expired running rows as `abandoned`.
|
|
211
218
|
|
|
212
219
|
## Agent Adapter Notes
|
|
@@ -218,6 +225,7 @@ The adapters intentionally use provider command surfaces instead of pretending e
|
|
|
218
225
|
- AI Copilot and OpenCode use `run --format json --pure`.
|
|
219
226
|
- Cursor is CLI-first for now via `cursor-agent -p`; treat output as less stable until a stronger public SDK contract is selected.
|
|
220
227
|
- Codex uses `codex exec --json --ephemeral --ask-for-approval never`.
|
|
228
|
+
- Agent prompts are sent through child stdin instead of argv so prompt bodies do not appear in process listings.
|
|
221
229
|
- When `--account` or a step `account` is set, OpenLoops resolves `accounts env <profile> --tool <tool>` before spawning the target, strips inherited tool home/API-key variables, and applies the selected profile only to that process. Missing account profiles fail before the provider binary receives the prompt.
|
|
222
230
|
- `--auth-profile` and step `authProfile` are provider-native auth selectors. They currently apply to Codewith and are passed to Codewith as `--auth-profile <name>` before `exec`; they do not call OpenAccounts.
|
|
223
231
|
- Daemon and scheduled runs prepend common user executable directories such as `~/.local/bin` and `~/.bun/bin` before resolving provider CLIs.
|