Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 0 additions & 43 deletions .changeset/scheduler-host-seam-and-runtime-mutation.md

This file was deleted.

19 changes: 0 additions & 19 deletions .changeset/trigger-type-spawned-377.md

This file was deleted.

8 changes: 8 additions & 0 deletions packages/cli/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# herdctl

## 1.5.27

### Patch Changes

- Updated dependencies [[`247d452`](https://github.com/edspencer/herdctl/commit/247d452d3363615694bec0cc8776b64c53624c64), [`822fdfb`](https://github.com/edspencer/herdctl/commit/822fdfbd0c049886217021b07a1e9070b9bf6b29)]:
- @herdctl/core@5.21.0
- @herdctl/web@0.10.0

## 1.5.26

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "herdctl",
"version": "1.5.26",
"version": "1.5.27",
"description": "Autonomous Agent Fleet Management for Claude Code",
"license": "MIT",
"type": "module",
Expand Down
59 changes: 59 additions & 0 deletions packages/core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,64 @@
# @herdctl/core

## 5.21.0

### Minor Changes

- [#379](https://github.com/edspencer/herdctl/pull/379) [`247d452`](https://github.com/edspencer/herdctl/commit/247d452d3363615694bec0cc8776b64c53624c64) Thanks [@edspencer](https://github.com/edspencer)! - Scheduler: host-execution seam + runtime schedule mutation (additive, backward-compatible)

Make the scheduler embeddable so a host can own execution and mutate schedules at
runtime. Existing headless fleets are unchanged — every new capability is opt-in.

- **Host-execution seam (#375):** `FleetManager.setScheduleTriggerHandler(handler)`
mirrors `setSessionWakeHandler`. When set, a fired schedule routes to the host
handler (which can resume/stream the turn on its own hub) instead of the built-in
headless `ScheduleExecutor`; when unset, schedules run headless exactly as before.
Cron/interval timing is untouched. Every scheduler-fired trigger — including a
forced immediate fire — funnels through this seam.
- **Relative-wake timezone hardening (#311):** `resolveSystemTimeZone()` centralizes
the host-timezone lookup used by `calculateNextCronTrigger`/
`calculatePreviousCronTrigger`, falling back to `UTC` when an ICU-less runtime
reports no timezone (which could otherwise revive the 24h-idle bug).
- **Runtime schedule mutation (#376):** `FleetManager.setAgentSchedule(agent, name,
schedule)` and `removeAgentSchedule(agent, name)` add/remove a single schedule on a
registered agent without a whole-agent `addAgent(replace)`. `setAgentSchedule` also
normalizes a lingering persisted `disabled` status to `idle` (via the new
`armScheduleState` helper) so a set-after-disable is actually eligible to fire.
Removal prunes persisted state via the new `deleteScheduleState` helper.
- **Concurrency-safe mutation:** schedule-state read-modify-writes are now serialized
per state file (no lost sibling updates); a removed schedule with an in-flight run is
tombstoned so that run's trailing write can't resurrect deleted state; and the
in-flight run's running-set entry is retained (only warn-once bookkeeping is cleared)
so a same-name re-add can't start a second concurrent execution. The tombstone is
coordinated with the active execution generation so it is neither left set nor cleared
too early: `setAgents` lifts it for a re-armed schedule **only when no run for that key
is in flight** — so `reload()` / `addAgent({replace})` / `setAgentSchedule` re-arm a
removed name cleanly (no runaway per-tick firing from a stuck tombstone) while a still
in-flight removed generation's trailing `next_run_at`/`last_error` write stays
suppressed (can't contaminate the freshly re-added schedule); the tombstone is then
lifted by that run's own `executeJob` finally on completion, or immediately by the
remover when no run is in flight. `removeAgentSchedule` is in-memory-only (like
`addAgent`/`removeAgent`): it does not rewrite `herdctl.yaml`, so a later `reload()`
legitimately brings the schedule back.
- **Mutation gate:** a new `allowScheduleMutation` FleetManager option (default
`false`) gates the two mutation methods; when disabled they throw the new
`ScheduleMutationDisabledError`. Enable/disable of existing schedules stays ungated.

- [#380](https://github.com/edspencer/herdctl/pull/380) [`822fdfb`](https://github.com/edspencer/herdctl/commit/822fdfbd0c049886217021b07a1e9070b9bf6b29) Thanks [@edspencer](https://github.com/edspencer)! - Add `spawned` trigger type (#377)

Extend `TriggerTypeSchema` with an explicit `spawned` value so a host (e.g. paddock)
can persist run provenance for agent-spawned jobs as a first-class enum rather than
inferring it. Additive and backward-compatible — existing headless fleets are
unchanged.

- **core:** `spawned` added to `TriggerTypeSchema` (and therefore the `TriggerType`
type). `schedule` already covers scheduled runs, so no separate `scheduled` value
is introduced.
- **web:** the job-history trigger-type icon/label map renders `spawned` with a
`Bot` icon labelled "Spawned".

Supports paddock#267 (provenance badges).

## 5.20.1

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@herdctl/core",
"version": "5.20.1",
"version": "5.21.0",
"description": "Core library for herdctl fleet management",
"license": "MIT",
"type": "module",
Expand Down
24 changes: 24 additions & 0 deletions packages/web/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,29 @@
# @herdctl/web

## 0.10.0

### Minor Changes

- [#380](https://github.com/edspencer/herdctl/pull/380) [`822fdfb`](https://github.com/edspencer/herdctl/commit/822fdfbd0c049886217021b07a1e9070b9bf6b29) Thanks [@edspencer](https://github.com/edspencer)! - Add `spawned` trigger type (#377)

Extend `TriggerTypeSchema` with an explicit `spawned` value so a host (e.g. paddock)
can persist run provenance for agent-spawned jobs as a first-class enum rather than
inferring it. Additive and backward-compatible — existing headless fleets are
unchanged.

- **core:** `spawned` added to `TriggerTypeSchema` (and therefore the `TriggerType`
type). `schedule` already covers scheduled runs, so no separate `scheduled` value
is introduced.
- **web:** the job-history trigger-type icon/label map renders `spawned` with a
`Bot` icon labelled "Spawned".

Supports paddock#267 (provenance badges).

### Patch Changes

- Updated dependencies [[`247d452`](https://github.com/edspencer/herdctl/commit/247d452d3363615694bec0cc8776b64c53624c64), [`822fdfb`](https://github.com/edspencer/herdctl/commit/822fdfbd0c049886217021b07a1e9070b9bf6b29)]:
- @herdctl/core@5.21.0

## 0.9.31

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/web/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@herdctl/web",
"version": "0.9.31",
"version": "0.10.0",
"description": "Web dashboard for herdctl fleet management",
"license": "MIT",
"type": "module",
Expand Down