@openduo/duoduo 0.2.10 → 0.2.12

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.
@@ -37,7 +37,7 @@ When a queue item contains `trigger job:<id>`:
37
37
 
38
38
  1. Use `ManageJob` (action: read) to verify the job exists.
39
39
  2. Read the job's `.state.json` sidecar file (path shown in job info).
40
- 3. Set `last_run_at` to `null` in that file and write it back.
40
+ 3. Set `last_scheduled_at` to `null` in that file and write it back.
41
41
  4. The job scheduler (60-second cycle) will see it as due and spawn it.
42
42
 
43
43
  If the job doesn't exist or is already running, note the error and
@@ -34,11 +34,11 @@ To make the job scheduler pick up a job on its next 60-second scan,
34
34
  queue a state reset:
35
35
 
36
36
  ```
37
- - [ ] (cadence:fast) trigger job:<job-id> — reset last_run_at in its .state.json so the scheduler treats it as due
37
+ - [ ] (cadence:fast) trigger job:<job-id> — reset last_scheduled_at in its .state.json so the scheduler treats it as due
38
38
  ```
39
39
 
40
40
  The cadence-executor will read the job's `.state.json` sidecar
41
- (in `~/.aladuo/var/jobs/active/<job-id>.state.json`), set `last_run_at`
41
+ (in `~/.aladuo/var/jobs/active/<job-id>.state.json`), set `last_scheduled_at`
42
42
  to null, and the job scheduler spawns it within 60 seconds.
43
43
 
44
44
  ### Example: Memory Compression
@@ -32,7 +32,8 @@ created_at: 2026-02-17T10:00:00Z
32
32
 
33
33
  ```json
34
34
  {
35
- "last_run_at": "2026-02-17T12:00:00Z",
35
+ "last_scheduled_at": "2026-02-17T12:00:00Z",
36
+ "last_run_at": "2026-02-17T12:01:30Z",
36
37
  "last_result": "success",
37
38
  "run_count": 42
38
39
  }
@@ -42,27 +43,27 @@ created_at: 2026-02-17T10:00:00Z
42
43
 
43
44
  1. **Created** via `ManageJob` tool (action: create)
44
45
  2. **Scanned** by job scheduler every 60 seconds
45
- 3. **Spawned** as a session when `isJobDue(cron, last_run_at)` is true
46
+ 3. **Spawned** as a session when `isJobDue(cron, last_scheduled_at)` is true
46
47
  4. **Completed/Failed** — state updated, results routed to `notify` targets
47
48
  5. **Archived** via `ManageJob` tool (action: archive)
48
49
 
49
50
  ## How to Trigger a Job Immediately
50
51
 
51
52
  The job scheduler determines "due" by comparing `cron` against
52
- `last_run_at` in the state file. To force immediate execution:
53
+ `last_scheduled_at` in the state file. To force immediate execution:
53
54
 
54
55
  **Option A — Via cadence queue (recommended):**
55
56
 
56
57
  Drop a `.pending` file in `~/.aladuo/var/cadence/inbox/`:
57
58
 
58
59
  ```
59
- - [ ] (cadence:fast) trigger job:<job-id> — reset last_run_at so scheduler treats it as due
60
+ - [ ] (cadence:fast) trigger job:<job-id> — reset last_scheduled_at so scheduler treats it as due
60
61
  ```
61
62
 
62
63
  **Option B — Direct state edit (if you understand the implications):**
63
64
 
64
- Set `last_run_at` to `null` in `<job-id>.state.json`. The scheduler
65
- will see it as never-run and spawn it within 60 seconds.
65
+ Set `last_scheduled_at` to `null` in `<job-id>.state.json`. The scheduler
66
+ will see it as never-scheduled and spawn it within 60 seconds.
66
67
 
67
68
  Note: Option A is preferred because the cadence-executor can handle
68
69
  edge cases (check if job exists, verify it's not already running).