@protolabsai/proto 0.39.0 → 0.40.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/cli.js +3772 -3033
- package/package.json +2 -2
- package/bundled/loop/SKILL.md +0 -61
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@protolabsai/proto",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.40.0",
|
|
4
4
|
"description": "proto - AI-powered coding agent",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"bundled"
|
|
22
22
|
],
|
|
23
23
|
"config": {
|
|
24
|
-
"sandboxImageUri": "ghcr.io/qwenlm/qwen-code:0.
|
|
24
|
+
"sandboxImageUri": "ghcr.io/qwenlm/qwen-code:0.40.0"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {},
|
|
27
27
|
"optionalDependencies": {
|
package/bundled/loop/SKILL.md
DELETED
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: loop
|
|
3
|
-
description: Create a recurring loop that runs a prompt on a schedule. Usage - /loop 5m check the build, /loop check the PR every 30m, /loop run tests (defaults to 10m). /loop list to show jobs, /loop clear to cancel all.
|
|
4
|
-
allowedTools:
|
|
5
|
-
- cron_create
|
|
6
|
-
- cron_list
|
|
7
|
-
- cron_delete
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
# /loop — schedule a recurring prompt
|
|
11
|
-
|
|
12
|
-
## Subcommands
|
|
13
|
-
|
|
14
|
-
If the input (after stripping the `/loop` prefix) is exactly one of these keywords, run the subcommand instead of scheduling:
|
|
15
|
-
|
|
16
|
-
- **`list`** — call CronList and display the results. Done.
|
|
17
|
-
- **`clear`** — call CronList, then call CronDelete for every job returned. Confirm how many were cancelled. Done.
|
|
18
|
-
|
|
19
|
-
Otherwise, parse the input below into `[interval] <prompt…>` and schedule it with CronCreate.
|
|
20
|
-
|
|
21
|
-
## Parsing (in priority order)
|
|
22
|
-
|
|
23
|
-
1. **Leading token**: if the first whitespace-delimited token matches `^\d+[smhd]$` (e.g. `5m`, `2h`), that's the interval; the rest is the prompt.
|
|
24
|
-
2. **Trailing "every" clause**: otherwise, if the input ends with `every <N><unit>` or `every <N> <unit-word>` (e.g. `every 20m`, `every 5 minutes`, `every 2 hours`), extract that as the interval and strip it from the prompt. Only match when what follows "every" is a time expression — `check every PR` has no interval.
|
|
25
|
-
3. **Default**: otherwise, interval is `10m` and the entire input is the prompt.
|
|
26
|
-
|
|
27
|
-
If the resulting prompt is empty, show usage `/loop [interval] <prompt>` and stop — do not call CronCreate.
|
|
28
|
-
|
|
29
|
-
Examples:
|
|
30
|
-
|
|
31
|
-
- `5m /babysit-prs` → interval `5m`, prompt `/babysit-prs` (rule 1)
|
|
32
|
-
- `check the deploy every 20m` → interval `20m`, prompt `check the deploy` (rule 2)
|
|
33
|
-
- `run tests every 5 minutes` → interval `5m`, prompt `run tests` (rule 2)
|
|
34
|
-
- `check the deploy` → interval `10m`, prompt `check the deploy` (rule 3)
|
|
35
|
-
- `check every PR` → interval `10m`, prompt `check every PR` (rule 3 — "every" not followed by time)
|
|
36
|
-
- `5m` → empty prompt → show usage
|
|
37
|
-
|
|
38
|
-
## Interval → cron
|
|
39
|
-
|
|
40
|
-
Supported suffixes: `s` (seconds, rounded up to nearest minute, min 1), `m` (minutes), `h` (hours), `d` (days). Convert:
|
|
41
|
-
|
|
42
|
-
| Interval pattern | Cron expression | Notes |
|
|
43
|
-
| ----------------- | ---------------------- | ----------------------------------------- |
|
|
44
|
-
| `Nm` where N ≤ 59 | `*/N * * * *` | every N minutes |
|
|
45
|
-
| `Nm` where N ≥ 60 | `0 */H * * *` | round to hours (H = N/60, must divide 24) |
|
|
46
|
-
| `Nh` where N ≤ 23 | `0 */N * * *` | every N hours |
|
|
47
|
-
| `Nd` | `0 0 */N * *` | every N days at midnight local |
|
|
48
|
-
| `Ns` | treat as `ceil(N/60)m` | cron minimum granularity is 1 minute |
|
|
49
|
-
|
|
50
|
-
**If the interval doesn't cleanly divide its unit** (e.g. `7m` → `*/7 * * * *` gives uneven gaps at :56→:00; `90m` → 1.5h which cron can't express), pick the nearest clean interval and tell the user what you rounded to before scheduling.
|
|
51
|
-
|
|
52
|
-
## Action
|
|
53
|
-
|
|
54
|
-
1. Call CronCreate with:
|
|
55
|
-
- `cron`: the expression from the table above
|
|
56
|
-
- `prompt`: the parsed prompt from above, verbatim (slash commands are passed through unchanged)
|
|
57
|
-
- `recurring`: `true`
|
|
58
|
-
2. Briefly confirm: what's scheduled, the cron expression, the human-readable cadence, that recurring tasks auto-expire after 3 days, and that they can cancel sooner with CronDelete (include the job ID).
|
|
59
|
-
3. **Then immediately execute the parsed prompt now** — don't wait for the first cron fire. If it's a slash command, invoke it via the Skill tool; otherwise act on it directly.
|
|
60
|
-
|
|
61
|
-
## Input
|