Skip to content

Releases

pastor 0.10.0-rc.1

pastor 0.10.0-rc.1 Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 16 Oct 22:17
v0.10.0-rc.1
78c9780

Added

  • pastor status shows the fleet on one screen: the head and its version,
    machines up and down, live tasks by state, failing jobs and exhausted
    accounts. --json prints it as an object. With no head it fails with
    not_running unless --probe is given, which probes the machines and
    reads the rest from the files here.
  • pastor answers Claude's other startup dialogs on its own, not only
    folder trust: the fullscreen renderer offer, the auto-mode nudges and
    the default-effort switch, each with the option that keeps things as
    they are, once per task and dialog, one per settle window
    (task.answered). [[agents.<name>.dialogs]] in pastor.toml adds a
    dialog or changes a built-in.
  • pastor task send --pick "<option>" answers the picker on screen by the
    text of one of its options (no_picker, no_such_option otherwise).
  • Permission profiles apply to agy agents. A task under a profile starts
    agy with --dangerously-skip-permissions --mode accept-edits, so it never
    stops at a prompt, and before launch pastor reads agy's settings on the
    machine and checks they deny what the profile denies, failing the task
    with the rules to add otherwise (agy_permissions_missing). A deny
    pattern agy has no rule for is refused when queued
    (agy_deny_unsupported). agy's rules are per machine, so a profiled agy
    task runs only on a machine whose own profile denies everything the
    task's does (agy_profile_mismatch); unpinned, it skips the others.
    make smoke-profiles takes AGY=<machine>.
  • The agy provisioner: before each launch of an agy agent under a
    permission profile, pastor appends the deny rules of the machine's own
    profile (its [[machine]] profile, else its flock's, else [defaults])
    to permissions.deny in agy's ~/.gemini/antigravity-cli/settings.json
    on that machine. Additive and idempotent: no rule is removed or moved, no
    other key changes, a file that already covers every rule is not written,
    and the write is a temp file renamed into place only if agy has not saved
    the file meanwhile. A machine whose settings pastor cannot read or write
    (a command machine, a file that is not JSON, a symlink) fails the task
    with agy_permissions_missing and the rules to add by hand.
  • version_every in pastor.toml sets how often the head asks a connected
    or polling machine for its pastor version again, after a reconcile. The
    default is 2m, down from a fixed ten minutes, so a fresh install shows in
    pastor machine list within about three minutes. pastor machine describe shows when the version was last read (version read), and the
    row carries it as pastor_read_at in --json.
  • The head reads each machine's room, its free disk under $HOME and /tmp
    and its free memory, when it connects and every minute after, and keeps
    the numbers on the machine's status with when they were read. A probe that
    fails keeps the last numbers and notes the error; it never makes the
    machine reconnect. Memory stays unknown on macOS, which has no
    /proc/meminfo. Nothing acts on the numbers yet: a floor on them comes
    separately.
  • A room floor in flock.toml: min_disk and min_memory on a
    [[machine]] entry, as sizes ("4G", "512M"), are the disk (on each
    of $HOME and /tmp) and memory the machine must have free to take a
    task. The floor is off until a machine sets one of them; the other side
    then comes from [defaults] in pastor.toml, else the built-in 4G of
    disk and 1G of memory, and "0" turns a side off. unknown_room on a
    flock or a machine says whether one whose room cannot be read counts as
    room (room, the default) or not (no_room). A bad size fails the load.
    The keys load and are checked; nothing reads a machine's room yet.

Changed

  • Every Claude task's pane gets CLAUDE_CODE_DISABLE_ALTERNATE_SCREEN=1,
    so Claude 2.1 stays on the classic renderer pastor can read and never
    offers the fullscreen one; env in [agents.<name>] overrides it.
  • Schema 18: answered_dialogs records the dialogs answered per task.
  • Any pastor task send into a task blocked while it starts holds its
    prompt for a settle window, as --trust did, so the dialog that may
    follow a person's answer is found without waiting for a reconcile.
  • own_permissions = true on an agy agent is no longer needed for a
    profile; it still means pastor adds and checks nothing.
  • A profiled opencode task on a machine whose own global opencode config or
    ~/.opencode has permission rules no longer fails the task
    (opencode_permissions_conflict): pastor reads and parses those files over
    ssh and denies every top-level permission key it finds there (in
    permission, one action for everything being the "*" key, or in the
    legacy tools block, whose write and patch are edit) in
    OPENCODE_PERMISSION too, under every profile including unrestricted,
    so a denied key can never be lifted. opencode keeps a key the machine set
    in the machine's place, ahead of pastor's, and takes the last matching
    rule, so under unrestricted on such a machine pastor sends no
    "*": "allow" of its own (it would land after the machine's keys and lift
    their denies): opencode's default allow stands for tools the lists do not
    name, and what that default asks about is allowed by name. The refusal
    remains for what that object cannot neutralise: rules under an agent or a
    mode of the machine's config, which opencode puts after pastor's; the
    machine's managed opencode config and, on macOS, its managed preferences
    (merged after OPENCODE_CONFIG_CONTENT); a file pastor found but could
    not parse; and more config than pastor reads (48 KiB in all), which used
    to read as the machine lost.
  • skills/pastor/SKILL.md and the manual say an opencode task's permission
    rule for external directories should cover both a common parent of its
    checkouts (such as ~/ghq) and any other reference directory it opens,
    such as a notes vault, so opencode's "Access external directory" dialog
    never blocks a task reading both.

Fixed

  • Saved trust now applies to a pull machine's tasks. Its headless serve
    fetches the (machine, repo) pairs pastor trust add saved on the head for
    that machine, and only those (a fetch that fails on the way, such as a
    timeout or a head restarting, keeps the last copy), answers the folder-trust prompt with the
    same marker check and once-per-task rule as the head, and its report
    makes the head emit task.trusted with the keys. Before, such a task
    stayed blocked until someone pressed the keys on the machine. IPC
    protocol 31 (pull_trust, and trusted on a task_report); a pull
    machine whose head is older leaves the prompt for a person, as before.
    Store schema 17: a task keeps the trust keys sent to it (trust_keys),
    so a pull machine reports the keys it pressed even after a restart with
    other keys in its config.
  • The FreeBSD portability check builds again: mio 1.2.4 drops the
    NOTE_PCTRLMASK constant that libc 0.2.190 no longer has, which failed
    make portability (and CI's portability step) on every branch.
  • A task on a pull machine that its agent ended with pastor task done
    no longer holds the machine's slot and its flock's seat for good. The
    task done reaches the head alone, so the machine's own serve read an
    idle agent that is not Claude as idle without task done, reported it
    blocked every tick, and once the agent was gone reported it failed
    and forgot the row while the head kept it done and counted it live.
    The serve now ends its row as the head did, with the head's summary, so
    auto-close takes the pane once the agent is idle and reports it closed;
    a failed report on an ended task closes the row on the head, its
    finish kept and with no error; a task the head ended before the serve
    started it is closed there, no agent started; and a pull machine
    counted lost has its ended tasks closed on the head, as its running
    ones go stale, so a seat never waits on a machine that is gone.
  • pastor queue explains a task pinned to a pull machine by the
    machine's slots and its flock's seat there (is full, flock F is at N of N on M, next claim: M has room), as its claims see them. It said
    machine M is not connected for every such task, since the dispatch
    pass's view of a pull machine, which it never pushes to, was reused for
    the queue. A loose task never reads a pull machine as where it goes
    next, since whether the machine takes flock work is its own serve's
    setting.
  • pastor.service sets OOMPolicy=continue, so the kernel killing a child
    the head spawned (a merge orchestrator's make check, say) no longer stops
    the head and drops every request in flight.
  • A connect to pastor.sock denied for permissions (EPERM or EACCES, most
    often a sandbox around the command) fails with socket_denied and says
    the command may be sandboxed. It was head_unresponsive, which reads as
    a sick head and sent agents into retries.

pastor 0.9.0

Choose a tag to compare

@github-actions github-actions released this 30 Sep 14:10
v0.9.0
2bf1164

Added

  • A task names the models it may fall back to: fallback = ["sonnet", "gpt"] on a [[flock]], a [[machine]], in [defaults] and under a
    job's [dispatch] (each entry a template), and pastor task run --fallback sonnet,gpt or --no-fallback. The first of the run or job,
    the machine, the flock and [defaults] that sets a list wins whole; []
    means none. Each name must be in [models] (unknown_model, or a load
    error); the task's own model is dropped from its list. task describe,
    flock describe and machine describe show it, and task --json has a
    fallback array. Nothing switches models yet. IPC protocol 27; an older
    head refuses --fallback with head_too_old.
  • make coverage prints the suite's line coverage per file and writes
    target/lcov.info, and make coverage-check fails when the total falls
    under the percentage in coverage-floor. Both need cargo-llvm-cov; see
    CONTRIBUTING.md.
  • close_failed_after in pastor.toml (default 5s, never keeps the
    panes): a failed or stale task's pane, and an orphaned t-N agent's, is
    closed once its agent has stopped for that long, freeing the machine's
    slot. The task stays failed (a stale one turns failed) and retryable, its
    worktree kept. An agent still at work is left alone. A pane herdr
    has handed to another agent is not waited on: the task drops it at the
    next check and the other agent's pane is left open. The grace is the
    agent's: another agent found in the same pane gets a full one of its own.
    A failed task whose pane is closed by someone else lets go of it, and a
    stale task never reads another agent's idle in its old pane as its own
    completion. Before each close after the first in one check the agents
    are listed again, so an agent that resumed or took the pane over while
    an earlier pane closed keeps its pane. The check reads only the failed
    and stale tasks that still record a pane, over a new index, not the
    whole failed history.
  • Queue ageing: a queued task that has waited age_after (30 minutes by
    default) goes up one level, and again after each further wait, never
    past high, so a low task behind a steady stream of normal and
    high tasks still runs; a steady stream of critical tasks still goes
    first. A task --preempt paused ages too, from when it was paused. Set it under [defaults] in pastor.toml or per [[flock]] in
    flock.toml; never turns it off. pastor queue shows an aged task's
    original level (high (was low), aged_from in --json), and task describe says it aged. The store moves to schema 14.
  • pastor task run --now --machine M starts the task on M at once, past
    its max_agents, job slots, burst and flock number, and never queues it:
    without --machine it is now_needs_machine, on a machine that is not
    connected machine_not_connected, and one the machine does not take is
    closed with now_not_started. task list, task describe and machine list (4/3 now:t-9) mark it, and it counts on the machine while it runs.
    It is meant for a person: a job has no now key, a retry queues as usual,
    and an agent or orchestrator gets now_refused. That check guards
    against mistakes only: it reads a marker the caller sets itself, so an
    agent that wants around it can get there. It starts even while
    the machine is still starting an earlier task. IPC protocol 28.
  • pastor task run --keep-pane, and keep_pane in a job's [dispatch], on a
    [[flock]] and under [defaults]: pastor leaves the task's pane and
    worktree open whatever state it ends in, until pastor task close, so you
    can go on talking to its agent. A kept done task holds no slot, shows as
    done (kept) in task list, and task describe says where the setting
    came from. Needs a head at IPC protocol 29.
  • The docs start page links the page for each use on the homepage: another
    machine, a PR fix round, urgent work first, a job every morning, board
    cards and a sandbox.
  • A usage limit is known on every machine. account = "..." under an
    [agents.<name>] table names the login the agent uses: every machine
    whose agent names the same account shares its limits, and an agent with
    none keeps a limit to the machine it was seen on (<machine>/<agent>).
    The head keeps the exhausted accounts (or one model of one) in a new
    limits table until their reset; a new task does not start on one: it
    starts on the first free model of its fallback list (task describe:
    model: gpt (fallback 2 of 2; me exhausted until 03:00)) or stays queued
    with waiting: me exhausted until 03:00 (5-hour limit, seen by t-412),
    which pastor queue shows too. An orchestrator stopped on a quota records
    its account, and one whose account is exhausted starts no agent before
    the reset.
  • pastor limit list [--json] and pastor limit clear <account> [--model m]; an agent pastor started may list but not clear. Events
    agent.exhausted and agent.reset (by: time or hand).
  • [limits] in pastor.toml: wait_under, rate_retries, rate_backoff,
    unknown_reset_wait, retry_after_no_credit, handover_lines, all
    checked on load; only the two waits are used so far.
  • IPC protocol 30 (LimitList, LimitClear, and a limit on a pull
    machine's TaskReport); an older head refuses limit list|clear with
    head_too_old.
  • A task state waiting, live and shown by default: task list reads
    waiting 03:00 (the reset in local time) and lists the waiting tasks
    first, the soonest reset first; task describe adds waiting: until 03:00 and shows the limit as limit:; --json has waiting_until.
    Events task.limited (as agent.exhausted) and task.waiting (why: no_fallback, account, model, until, shown: "waiting 03:00").
    task retry and task attach refuse a waiting task with task_waiting;
    task close closes its row, --remove-worktree its kept worktree too.
  • pastor keeps what a Claude task used. When a round ends it reads the
    task's session (and its subagents') from the machine it ran on, under the
    agent's CLAUDE_CONFIG_DIR or ~/.claude, and stores the model, API
    calls and input, cache write, cache read and output tokens.
    pastor task describe prints them as used: and tokens: lines, and
    --json of task list and task describe carries usage. Other agent
    kinds, command machines and pull machines show nothing.
  • Claude's limit picker ("Stop and wait for limit to reset", "Upgrade your
    plan", "Use extra usage"), which herdr shows as blocked: pastor reads
    the pane once a blocked spell, picks "Stop and wait" by its text wherever
    it sits in the list, emits task.input with limit_picker: true, and the
    task waits for its reset. A picker without that option, or in words
    pastor does not know, gets no key; the task stays blocked with an error
    saying it looks like a limit picker. pastor never picks extra usage or an
    upgrade, and no setting makes it.
  • A 429 or 529 that outlived Claude's own retries is retried in the task's
    pane, which keeps the conversation, its slot and its state: after each
    wait of [limits] rate_backoff (at least the wait the message names)
    pastor types "the API was busy; carry on where you left off" and Enter,
    with task.rate_limited (line, attempt, retry_at) before each. A
    turn that ends otherwise starts the count over; after rate_retries
    retries the next one is handled as a hard limit with no reset.
  • A task with a fallback list whose model hits a usage limit goes on under
    the next free model of its list, on the same machine and in the same
    worktree and branch, as a new round of the same task: in the same Claude
    session when the new model runs on the same login, else from its prompt
    with the end of the last agent's pane. It waits instead when the reset is
    within [limits] wait_under, or when no other model of its list is free
    (all_exhausted) or runs on its machine (no_fallback, on its own model).
    task.agent_switched says so, and task describe lists the rounds and why
    a task waited when it could have moved on.
  • An agy task that stops on its quota (RESOURCE_EXHAUSTED (code 429): Individual quota reached. ... Resets in 4h21m30s.) goes waiting until
    the reset instead of done, or moves to its next model, and starts again
    from its prompt with the handover, since agy keeps no session. Another
    RESOURCE_EXHAUSTED or 429 at the end of its turn is a short limit,
    retried in the pane. Only agy's last paragraph after its last prompt is
    read.
  • [agents.<name>] own_permissions = true says an agent's permissions are in
    its own settings on the machine, as agy's allow list is. A task of such an
    agent under a permission profile starts with no permission flag or mode
    added and its profile's lists not passed, and pastor task describe marks
    the lists (not applied: ...). Without it, a profiled task of an agent
    with no allow_flag or deny_flag is still refused
    (agent_tools_unsupported), and the message names the field. An older
    pastor refuses a pastor.toml with the key, so set it once every machine
    runs this release. own_permissions beside an allow_flag or deny_flag
    fails the file's load.
  • pastor reads opencode's usage limits as it reads Claude's: an opencode
    task whose provider ran out (OpenAI's quota or rate limit, Anthropic's 429
    or 529, a ChatGPT sign-in's usage limit) goes waiting or moves to its
    next model instead of done. Out of quota, it waits
    retry_after_no_credit; at its time it starts again from its prompt with
    the handover, since opencode keeps no session.
  • pastor:connector, a skill that scaffolds a pastor connector: it asks at
    most whether the source is polled or streamed and which secrets it needs,
    writes pastor-connector.toml and a poll.sh or stream.sh, and tests
    the result with pastor connector try and `pas...
Read more

pastor 0.8.0

Choose a tag to compare

@github-actions github-actions released this 29 Sep 08:26
v0.8.0
c86b628

Added

  • pastor flock join <flock> <machine> [--max N] puts a machine in a flock
    with that number (by default the one it has there, else its
    max_agents), keeping its other flocks; joining again with --max
    changes the number. pastor flock leave <flock> <machine> takes it out;
    out of its last flock the machine is back in the default one, and the
    output names the queued tasks of that flock pinned to it, which wait with
    a note. pastor flock add <name> [machines...] joins the machines named.
    The first join, leave or machine move on a machine with the old
    flock = "..." key moves it into the flock's machines with the
    machine's max_agents, keeping comments. They go through the head like
    the other fleet edits (IPC protocol 22; the CLI refuses an older head
    with head_too_old), an agent pastor started may not run them, and tab
    completion offers flocks and machines. A machine that is not in the flock
    is not_in_flock.
  • Every command works from a machine with a remote head set.
    • The flock commands, machine add|remove|move|describe, trust,
      profile and config edit go to the head and print what they would
      print there; flock edit and config edit edit the head's file, and
      config edit --local this machine's pastor.toml.
    • task attach and machine open still go to the machine directly, but
      ask the head for the task, its flock.toml and pastor.toml; the
      head's own machine is reached at the head's ssh destination.
    • machine authorized-key stays on the head and is refused here, naming
      it.
    • flock list, flock default show, profile, task attach and
      machine open need a remote head speaking IPC protocol 6.
  • The manual has a "Moving the head" runbook.
  • Orchestrators run from files: ~/.config/pastor/orchestrators/<name>.toml,
    with a required kind.
    • A scheduled orchestrator runs its pre script on every or cron.
      Only when the script prints lines that need judgment does the head start
      one agent, with the orchestrator role, on its own machine, with the
      file's prompt, skill and model, the handover note and every line.
      Its post script gets the agent's end state (done, failed or
      stale), summary and lines.
    • A run is skipped while the last agent works or its post script waits. A
      pre script that fails or prints more than 64 KiB of lines backs off as a
      failing job does. max_orchestrators in pastor.toml (default 1; each
      also takes a slot under max_agents) holds agents back, and an agent
      that stopped on a quota error holds the next until the reset.
    • session files are checked (a key of the other kind makes a file
      invalid) but not run yet.
    • New commands pastor orchestrator list | describe | run | enable | disable | note, and events
      orchestrator.started|skipped|held|quota|failed.
    • The pre and post scripts run with PASTOR_ORCHESTRATOR, which the CLI
      sends with each request, and the head applies the orchestrator role's
      table to them; PASTOR_TASK wins when both are set. The agent may keep
      its note (pastor orchestrator note).
    • pastor task list shows orchestrator tasks first, in a table of their
      own.
    • The head's IPC protocol goes to 23; the store keeps its schema
      (orchestrator state lives under state/orchestrators/<name>/).
  • A critical task started with --preempt (or preempt = true under a
    job's [dispatch]) that finds its machines full, job slots and burst
    included, pauses the newest running low Claude task on one and starts
    in its slot in the same pass. The paused task's agent is interrupted and
    its pane closed; its worktree stays. It goes to a new paused state
    (event task.paused), first among low tasks and pinned to its machine,
    and resumes its own session there (claude --resume) when a slot frees.
    A normal, opencode, done or recently resumed task is never paused.
    pastor task priority t-N critical --preempt sets the flag on a queued
    task; --preempt below critical is preempt_needs_critical. On a paused
    task task close closes the row (--remove-worktree removes the kept
    checkout), task send answers task_not_live and task attach refuses
    with task_paused. pastor queue shows paused tasks and why they wait,
    and task describe when and for which task one was paused. The store
    goes to schema 12 (preempt, paused_at, paused_for, resumed_at) and
    the head's IPC protocol to 16; the CLI refuses --preempt to an older
    head (head_too_old).
  • Task summaries: pastor task done --summary <text> (or --summary-file <path|->, through the bridge too) says how a task ended, its first line
    the outcome: done, partial, blocked or nothing to do, up to 2,000
    characters. Each round of a task keeps one, in a new task_summaries
    table (schema 13, created on first open); a round that ends without one
    keeps no summary and the pane's last lines. task describe shows it
    (--all-summaries every round's), task list --wide adds RESULT,
    --json has summary, the task.done and task.failed events carry
    it, pastor watch prints outcome= on their TASK lines, and a
    connector's [finish] stdin has summary. Needs a head speaking IPC
    protocol 17.
  • pastor asks every task for a summary: each prompt it sends ends with a
    paragraph asking for pastor task done --summary-file - in that shape,
    added when it is sent and not stored in the task's prompt, and again on a
    task send that reopens a done task. summary = "ask" | "require" | "off" in [defaults], on a flock, in a job's [dispatch] or as task run --summary (the most specific wins, stored on the task) turns it off,
    or makes a summary a condition of success: with require, the agent's own
    bare task done is refused (summary_required) and an idle finish
    without one ends the task failed ("stopped without a summary"); a
    person's task done t-N passes. task describe shows the setting.
    Config files without summary load unchanged and ask. --summary and a
    job's summary need a head speaking IPC protocol 20.
  • A machine can be in many flocks. A [[flock]] entry takes machines = { desk = 2 }: the machines it may use and at most how many of its live tasks
    each one runs. Dispatch starts a task on a machine only when the machine has
    room and the task's flock is under its number there; job slots and burst
    never pass it. A task whose flock is full waits with flock <name> is at N of N on <machine> as its note, and the next task goes. machine list
    shows every flock (--json: flocks), and an agent's task list through
    the bridge covers all its machine's flocks. The machine's old flock key
    still loads, as membership with the machine's own limits. A critical task
    with --preempt pauses a task only where that makes room for it, its
    flock's number included. Needs a head speaking IPC protocol 18 once
    flock.toml gives a flock's machines a number.
  • A label template for the herdr workspace pastor makes for a task (see
    Changed): --label on task run, label in a job's [dispatch], on a
    [[flock]] and under [defaults], the first of those that sets one
    winning. It takes {{ task.id }}, {{ flock }},
    {{ machine }}, {{ job }} and {{ item.key }}. A label that renders
    empty or with a control character falls back to t-N with a warning.
    task describe shows the label and where it came from. task run --label
    needs a head of IPC protocol 19.
  • pastor serve starts the head in the background and returns once it
    answers, logging to ~/.local/state/pastor/serve.log (rotated at 10 MiB,
    three old files kept). pastor serve --foreground (-f) keeps it in the
    terminal, as pastor serve did before. pastor serve status (with
    --json) says whether a head or headless serve runs here, its pid,
    version, service manager and log; pastor serve stop sends it SIGTERM and
    waits for it to exit, and refuses one a service runs (service_managed).
    A pastor serve started by systemd, launchd or another pid 1 stays in the
    foreground, so units installed by an older pastor keep working. The
    shipped pastor.service and pastor.serve.plist now run pastor serve --foreground. Upgrading: on each machine with a unit, re-run pastor setup systemd (or pastor setup launchd on macOS) and restart the
    service, so its unit says --foreground and pastor serve status can
    report the service.
  • Pull machines: a machine the head cannot reach over ssh runs tasks all
    the same. The head's flock.toml marks it pull = true in place of
    local, ssh or command; the head never connects to it and runs no
    actor for it, and machine list shows its HOST as pull. Its headless
    serve claims tasks each tick (TaskClaim, IPC protocol 21), runs them on
    its own herdr with the head's machine actor, and reports every change
    back (TaskReport). It takes the tasks pinned to it (task run --machine <name> or a job's machine), and also its flocks' other tasks when its
    pastor.toml has [shepherd] takes_flock_work = true or the serve runs
    with PASTOR_SHEPHERD_FLOCK_WORK=1 (or true). [shepherd] machine is
    its name in the head's flock.toml (default: the hostname), and
    [shepherd] command is a developer option in place of its herdr. One
    that neither claims nor reports for pull_lost_after (head's
    pastor.toml, default 10m) is lost, and its starting and running tasks
    go stale.
  • session orchestrators run. One keeps one agent running through its
    hours ({ start, stop }, local time): the head starts it at
    hours.start, or at once inside the hours, with the prompt, the skill,
    the note and pastor watch --now; at hours.stop its agent gets a last
    message and is closed after stop_grace. An agent that dies, goes stale
    or ends early is...
Read more

pastor 0.7.1

Choose a tag to compare

@github-actions github-actions released this 28 Sep 11:24
v0.7.1
3b51de1

Fixed

  • pastor head set and every command sent to a remote head failed with
    head_unreachable ("path ... too long for Unix domain socket") when the
    state dir was deep enough, as under a long macOS home: ssh's ControlPath
    plus its 17-byte staging suffix went past sun_path (104 bytes on macOS).
    The head's ControlPath is now shortened as the machine transport's is, and
    ssh runs without multiplexing when even the shortest one does not fit.
    In that case both the head client and the machine transport now pass
    ControlMaster=no and ControlPath=none, so a ControlMaster in
    ~/.ssh/config cannot bring the socket back.

pastor 0.7.0

Choose a tag to compare

@github-actions github-actions released this 28 Sep 10:18
v0.7.0
31adaba

Added

  • A website for pastor, a small terminal-style site built with Hugo from
    docs/manual.md and short pages under docs/website. It deploys to
    GitHub Pages from the public repo; make site builds it and make site-serve serves it locally.

  • pastor watch: one line per change an orchestrator acts on, so it stops
    building its own polling. TASK t-N <state> <machine> <job> for a task that
    is blocked, done, failed or stale (--all: every state change), from the
    head's numbered events; JOB <name> failing: ... and JOB <name> ok from
    job list; HEAD down, HEAD up and HEAD gap; and the lines of each
    connector with a [watch] command, each printed once, with CONNECTOR <id> failing and ok around failed runs. A watcher keeps a cursor under
    --name in the state dir, so one started again repeats nothing; --reset
    starts at the end of the log. --now prints what needs attention and
    exits. --json, --interval and --connector (else [[watch.connector]]
    in pastor.toml). It only reads, so an agent may run it. A connector's
    manifest takes [watch] (command, timeout), which connector describe
    shows and connector try <id> watch runs. The head's events_since
    answers newest too, so a new watcher starts at the end without reading
    the whole log.

  • Profiles reach opencode tasks: an opencode agent under a profile gets the
    lists as OPENCODE_PERMISSION in its pane, in opencode's terms and denying
    what they do not allow (under unrestricted, allowing it), with OPENCODE_CONFIG, OPENCODE_CONFIG_DIR and
    OPENCODE_CONFIG_CONTENT set empty, so it never stops at a permission
    prompt (a profiled opencode task was agent_tools_unsupported before).
    A machine whose own opencode config has permission rules fails such a task
    before anything is made there (opencode_permissions_conflict).
    make smoke-profiles runs a live review task per agent through a head.

  • Profiles reach Claude tasks: profile on a [[flock]], a [[machine]],
    a job's [dispatch], [defaults] and pastor task run --profile, settled
    like the model (run or job, machine, flock, [defaults]). The profile's
    lists go before the task's own, a deny anywhere wins, and a Claude agent
    starts with --permission-mode dontAsk and the lists as --allowedTools
    and --disallowedTools, so it never stops at a permission prompt; args
    that pick a permission mode are then profile_args_conflict. A task may
    ask for unrestricted only on a machine whose own profile (machine, flock
    or [defaults]) is unrestricted (profile_not_allowed; an unpinned task
    waits for one). An unknown name is unknown_profile, and a profile dropped
    while a task waits keeps it queued and says why. task describe (with
    where it came from), the task's JSON, machine list (PROFILE),
    machine describe and flock describe show it. Every command that can
    make the head queue a task refuses an older head (head_too_old).

  • Descriptions: an optional one-line description at the top of a job
    file and in each [[flock]] and [[machine]] entry of flock.toml
    (pastor flock add --description, pastor machine add --description).
    A task's is pastor task run --description, else its job's [dispatch] description template ({{ item.title }} by default), else the prompt's
    first line; task retry copies it. -w, --wide on task, job,
    machine, flock and connector list adds a DESCRIPTION column, cut to
    the terminal's width; every describe shows it, and every list --json
    and describe --json has a description key. fish completion shows
    descriptions beside job, flock and machine names. The tasks table gains a
    description column (schema 11), so the release that carries this needs
    an -rc first. --description is refused on an older head
    (head_too_old). The IPC protocol goes to 14.

  • Permission profiles: [profiles.<name>] in pastor.toml, each an optional
    description, extends, allow and deny, beside the built-in review,
    develop and unrestricted. A profile's lists add up along its extends
    chain, and a deny anywhere wins. pastor profile list and pastor profile describe <name> (both with --json) show them; an unknown name is
    unknown_profile, and a bad profile fails pastor.toml's load.

  • pastor queue lists the queued tasks in the order they will start: POS,
    TASK, LEVEL, WHERE (the pinned machine or the flock), FROM (task run or
    job <name>), WAITED and WHY NOT YET, from a dispatch pass played
    through on the machines as they are; --flock, --machine and --json.
    pastor queue move <task> with --top, --before <task>, --after <task> or --to <n> puts a queued task there; it takes the level of
    where it lands (lifted in front of a higher task, lowered behind a lower
    one, --top only lifts), and the answer says when the level changed.
    Refused with not_queued for a task, or an anchor, that is not queued,
    and from an agent pastor started. The IPC protocol goes to 14 (Queue,
    QueueMove); both commands refuse an older head (head_too_old).
    Completion offers the queued tasks after queue move.

  • Task priority: a task has a level, low, normal (the default), high
    or critical, and each dispatch pass takes queued tasks by level, then
    position, then age, still skipping what does not fit. The level comes from
    pastor task run --priority, a job's [dispatch] priority (a template;
    rendered empty it falls through), the priority of the machine the task
    is pinned to, of its flock, or [defaults] priority, settled when the task
    is queued. pastor task priority <task> <level> changes a queued task's
    level, refused with not_queued for any other and from an agent pastor
    started; task retry keeps it. A word that is not a level is
    unknown_priority. task describe shows the level and the layer that set
    it, task list a PRIORITY column, and --json priority,
    priority_from and queue_pos. The store goes to schema 9 (columns
    priority, priority_from and queue_pos; existing rows become normal,
    placed by id), and the IPC protocol to 9: task run --priority and task priority refuse an older head (head_too_old).

  • Job slots and burst: two keys on a flock.toml [[machine]], next to
    max_agents. job_slots (default 1) are extra slots only tasks from jobs
    take, a free one before a shared one, so long task run tasks no longer
    keep a job's tasks from starting. burst (default 1) lets a critical
    task start on a machine whose shared slots are full, while the live tasks
    outside job slots are below max_agents + burst. 0 turns either off.
    The picker takes the machine with the fewest live tasks among those with
    room for the task. machine add takes --job-slots and --burst;
    machine list shows the room as 2+1j+1b and --json has job_slots
    and burst.

  • Task roles. pastor task run --role orchestrator starts a task whose
    agent may, from its own pane, run tasks, retry and send to them, and
    disable a job; every other fleet change stays agent_refused, with a
    message naming the role, unless agents_change_fleet = true. Only a
    person starts an orchestrator: --role orchestrator, or a retry of an
    orchestrator, from any task's pane is role_refused. A retry keeps its
    task's role. task describe and task list --json show role (agent
    for every other task). The store goes to schema 10 (a role column, agent
    for existing rows) and the IPC protocol to 12; --role orchestrator
    refuses an older head (head_too_old). A guard against mistakes, not a
    boundary: the agent runs as the same user as pastor.

  • Named models: [models.<name>] in pastor.toml, each with a herdr agent
    kind and the args that select it. A task runs one with pastor task run --model <name>, a job's [dispatch] model (a template, so
    "{{ item.model }}" works), or the model of its machine, its flock or
    [defaults], in that order. The model's args go before agent_args. A
    name [models] lacks is unknown_model; a model whose kind is not the
    agent's is model_kind_mismatch, and an unpinned task only goes to
    machines whose agent has the model's kind. task describe, task list
    (MODEL, and model in --json), flock describe, machine describe and
    task events show it. The IPC protocol goes to 8, and every command that can
    make the head queue a task refuses an older head (head_too_old).

  • An agent per kind: agents = { <kind> = "<agent>" } on a [[machine]]
    or [[flock]] in flock.toml, or under [defaults] in pastor.toml, names
    the agent that runs a model whose kind differs from the default agent's.
    The kind is looked up through the machine, the flock and [defaults]: a
    layer's own agent of that kind, else its agents entry. An agent found
    this way gets agent_args only from layers whose agent is that agent. An
    unpinned task goes only to machines where the lookup finds one; with none
    in the flock it waits and task describe says why. An entry whose agent
    has another kind, or one for the kind of the layer's own agent, fails the
    load. task describe shows (from machine <m> agents.<kind>), and
    machine describe and flock describe list the entry as by kind. An
    older pastor refuses the key on a [[flock]].

  • docs/recommended-setup.md: how to set up a fleet you'll keep. It covers
    flocks per account, least-privilege credentials for agent machines (a
    deploy key and a fine-grained token for one repository, so they can't
    merge), permissions for unattended agents, fresh code for every task, and
    close_done_after for short tasks. The docs test checks its commands too.

  • pastor task attach reopens a finished Claude task. Dispatch starts a
    claude agent with --session-id <uuid> after its other args (unless they
    already choose a ses...

Read more

pastor 0.6.0

Choose a tag to compare

@github-actions github-actions released this 26 Sep 14:34
v0.6.0
2c33bb3

Added

  • Tab completion offers real names in fish and bash: pastor job describe <TAB> lists the job files, and flocks, machines, live tasks (with their
    note) and installed connectors complete the same way. The scripts ask
    pastor __complete at TAB time, which reads local files and the store and
    never waits on the head.

  • pastor connector describe <id> [--json] shows one connector in full: its
    manifest, where it came from (source, ref, commit and install time for an
    installed one, the directory for a linked one and whether it still exists),
    its connector command and hooks, its config keys, which declared secrets
    its .env is missing (names only), the jobs that use it with their last
    run and result, and its status, or why it does not load. connector install now records its origin in .<id>.install.json beside the
    checkout; a connector installed earlier shows what its checkout still
    tells, and unknown for the rest. Manifests may carry authors,
    homepage, repository and license; pastor 0.5.0 rejects them, so a
    connector that adds them should raise its min_pastor_version.

  • pastor task done lets an agent end its own task from its pane (the task
    defaults to PASTOR_TASK), the one change the fleet guard allows an agent;
    another task's is refused with agent_refused. The task is done at once
    and stays so while the agent finishes its turn, and auto-close takes its
    pane after close_done_after, freeing the machine's slot. A human may end
    any task with a pane. The store goes to schema 7 (tasks.ended).

  • place decides where a task's agent gets its pane: --place on task run
    and task retry, place in a job's [dispatch] or under [defaults] in
    pastor.toml. The default, repo, keeps an agent under the repo it works
    on: a task whose --repo a herdr workspace already shows, such as a fix
    round in a pull request's worktree, now gets a new pane in that workspace
    instead of a new top-level workspace. own always makes a workspace t-N,
    as before; pastor puts every task in one pastor workspace per machine,
    made on first use; pane:<workspace> puts it in the workspace with that
    label and fails the task if the machine has none. Closing a task closes only
    its own pane, never a workspace it joined, and a worktree task placed in a
    shared workspace still gets, and on removal loses, its worktree on disk.
    task show prints the place. A worktree another agent is working in (a
    fix round that joined its workspace) is not removed: auto-close keeps it
    with a note and task close --remove-worktree refuses.

Changed

  • Dependabot watches the crates and the GitHub Actions weekly, and a security
    report goes through GitHub's private vulnerability reporting; the issue
    template no longer offers a public fallback.

Security

  • create_private_dir, which makes the config, state and data dirs, refuses a
    directory owned by another user, or a symlink owned by another user, instead
    of using it. With PASTOR_STATE_DIR under a shared path such as /tmp,
    someone else could otherwise plant the dir that receives the ssh and IPC
    sockets. A symlink of the user's own is still followed. Before making a
    missing dir it checks the ancestors that exist and refuses a symlink owned
    by neither the user nor root, or a dir anyone can write to without the
    sticky bit that neither owns.
  • A hook hearing about a task of a job another connector owns, or of a
    one-off task, gets the task with item null and prompt empty, and its own
    @<id> scratch dir as PASTOR_CONNECTOR_STATE_DIR rather than the job's.
    A notifier no longer receives the text of every other connector's items,
    nor another connector's cursors.
  • Saved trust reads the pane before pressing an agent's trust keys, and
    presses them only while the prompt at the bottom of the pane, not its
    scrollback, shows the trust prompt's trust_marker, a new
    [agents.<name>] setting; Claude's is built in as "Yes, I trust this
    folder". A task blocked on another dialog the same keys would accept, such
    as Claude's bypass-permissions warning, is left for a human.
  • Item and pane text printed for a human has its control characters escaped:
    the NOTE column of task list (an item title, now cut to 60 characters),
    every field and the prompt of task show, and task read. one_line
    escapes every C0 and C1 control, not only CR and LF. --json is unchanged.
  • The confirmation connector install shows escapes the manifest's strings,
    shell-quotes its commands and marks the hooks that hear about every job.
    connector link shows the same, and warns when the directory or its
    manifest is group- or world-writable or owned by another user.
    connector install --ref refuses a ref that starts with -.
  • A poll connector run that returns more than 10,000 items or 64 MiB of them
    fails instead of holding it all; a stream's buffer is bounded at 64 MiB as
    well as 10,000 items, the unacked batch included, as each item arrives.
  • Every command pastor runs over ssh goes as sh -c '<command>', so a fish
    or csh login shell on a machine no longer breaks the repo check. A machine's
    session may not contain a backslash or a control character.
  • pastor.service runs with NoNewPrivileges, UMask=0077,
    LockPersonality and RestrictRealtime. pastor setup systemd leaves
    empty, relative, missing and world-writable entries out of the unit's
    PATH, looks herdr up only in the entries it keeps, refuses a value with
    a line break and writes $ in ExecStart as $$.

pastor 0.5.0

Choose a tag to compare

@github-actions github-actions released this 26 Sep 08:37
v0.5.0
7a79451

Added

  • pastor task send types into a done task whose pane is still open, and
    the task goes back to running. An agent marked done with its work
    unfinished can be told to finish in the same pane, with its context, instead
    of a new task in its worktree. A closed task, or one with no pane, is still
    task_not_live.

  • Agents pastor starts may no longer change the fleet. Every agent's pane gets
    PASTOR_TASK=t-N, and a command from it that runs, sends to, attaches to,
    retries, closes or prunes tasks, ticks (dry runs too), runs or reloads jobs,
    installs, links, uninstalls or unlinks connectors, edits machines, flocks or
    jobs, starts or sets up a head, or opens herdr's UI fails with agent_refused; reads still work. The head refuses such a
    request, and the CLI refuses the edits it makes on its own.
    agents_change_fleet = true in pastor.toml allows them again. A worktree
    task's agent now always runs in a pane split off the worktree's, since the
    mark is env and herdr's worktree calls take none.

  • A second agent skill, skills/spec (/pastor:spec once the repo is
    installed as a Claude Code plugin; .claude-plugin/plugin.json makes it
    one). It starts from a superpowers brainstorm and writes a plan whose tasks
    each carry a flock, repo, branch, model, timeout and a prompt file that
    needs no answers, run with pastor task run --prompt-file. The plan, its
    prompts and a ledger live on a plan branch so any machine can resume;
    tasks run one after another.

  • describe for one thing in full, kubectl style, each with --json:
    pastor job describe <name> (schedule, connector and its config, dispatch,
    last runs and errors, next run, recent tasks and job events),
    pastor machine describe <name> (host, flock, channel, versions, agents,
    tags, its tasks, recent errors), pastor flock describe <name> (default or
    not, its agent and args, machines, queued and running tasks), and
    pastor task describe <id>, an alias of task show.

  • edit for the files behind them: pastor job edit <name>,
    pastor flock edit and pastor config edit open a copy in $VISUAL, else
    $EDITOR, else vi, check it the way the head loads it, and only then
    replace the file atomically and reload a running head. An invalid edit
    offers to reopen with the error on top; declining keeps the file as it was
    and names where the edit is kept (invalid_edit). A symlinked job file is
    edited at its target. editor_failed and edit_conflict cover an editor
    that fails and a file changed during the edit.

  • pastor setup launchd [--herdr] installs pastor (or the herdr server) as a
    macOS LaunchAgent in ~/Library/LaunchAgents, with the same action flags
    and confirmation prompt as pastor setup systemd.

  • pastor task run --prompt-file <path> reads the prompt from a file on the
    machine running the CLI (- for stdin), so a long prompt with quotes needs
    no shell quoting. It conflicts with the positional prompt; exactly one is
    required. Trailing newlines are trimmed. An unreadable file fails with
    prompt_file_unreadable, an empty one with prompt_file_empty.

  • A machine can name its own agent: agent and agent_args under a
    [[machine]] entry in flock.toml, before its flock's and [defaults], so
    machines of one flock can run different agents. The head settles a task's
    agent again when it places it on a machine, and pastor task show prints
    where the agent and its args came from.

  • A flock can name the agent its tasks run: agent and agent_args under a
    [[flock]] entry in flock.toml. A task or job that names none takes its
    flock's, then [defaults], then the built-in claude; --agent and
    --agent-arg always win. The head settles the agent when it queues the
    task, and pastor task show prints what it resolved to.

  • Tool allow and deny lists: allow and deny (tool patterns such as
    "Bash(git:*)") under [defaults], a [[flock]] entry and a job's
    [dispatch]. They add up across the three and deny wins over allow. pastor
    passes them as the agent's own flags, --allowedTools and
    --disallowedTools for Claude, and leaves its permission mode alone;
    [agents.<name>] allow_flag and deny_flag name them for another agent,
    and a task whose agent has none for a list it carries is refused
    (agent_tools_unsupported). pastor task show prints both lists.

  • Agent definitions can set kind and env: [agents.claude-personal]
    with kind = "claude" and env = { CLAUDE_CONFIG_DIR = "~/.claude-personal" }
    starts a claude whose pane has that env, ~ expanded against the task
    machine's home. Built-in trust keys and tool flags follow the kind, and a
    task, job or flock names the definition like any agent. A worktree task
    gets the env through a pane split off the worktree's, since herdr's
    worktree calls take none.

  • A Trust model section in the manual, and a warning there on agent args
    that turn permission checks off, such as --dangerously-skip-permissions.

  • A release workflow (.github/workflows/release.yml). Pushing a vX.Y.Z
    tag builds static musl binaries for x86_64, aarch64, armv7 and riscv64
    Linux and native macOS arm64 and x86_64 binaries, packs each as
    pastor-<version>-<target>.tar.gz with SHA256SUMS, attests their build
    provenance, and drafts a GitHub release with that version's changelog
    section as notes.

  • install.sh: curl -fsSL https://raw.githubusercontent.com/cacarico/pastor/main/install.sh | sh
    picks the tarball for the OS and architecture, checks it against
    SHA256SUMS (and the provenance attestation when a logged-in gh is
    present), and installs the binary to ~/.local/bin without sudo.
    PASTOR_VERSION, PASTOR_INSTALL_DIR and PASTOR_DOWNLOAD_URL override
    the version, the directory and the download source.

  • CI runs a portability job on every pull request: cargo check of the
    whole crate for x86_64 musl, armv7 musl and x86_64 FreeBSD through zig, so
    a change that only compiles against glibc fails on the pull request, not
    on the release tag.

Changed

  • Breaking: plugins are now called connectors, everywhere, and the old names
    are gone. pastor plugin ... is pastor connector install|link|uninstall|unlink|list|run; the manifest is
    pastor-connector.toml; commands get PASTOR_CONNECTOR_ID and
    PASTOR_CONNECTOR_STATE_DIR; PASTOR_PLUGIN_GIT_BASE is
    PASTOR_CONNECTOR_GIT_BASE; the plugins/ directories under the config,
    data and state dirs are connectors/. To upgrade, rename each manifest and
    move the three plugins/ directories to connectors/, or reinstall. A
    connector still holds a connector command, event hooks, or both. "Plugin"
    is kept for a later idea: code that changes how pastor itself behaves.

  • The crate is pastor-cli on crates.io, because pastor there belongs to
    another project: cargo install pastor-cli and cargo binstall pastor-cli
    install the pastor binary. The command, the release tarballs and
    install.sh keep the name pastor, and fake-herdr is left out of the
    published package.

  • On macOS the config, state and data dirs follow the XDG layout, as on
    Linux: ~/.config/pastor, ~/.local/state/pastor, ~/.local/share/pastor
    instead of ~/Library/Application Support/pastor. A config left in the old
    place is moved once, with a note; its plugins/ goes to the new
    connectors/ dirs, and a move that fails part way is finished by the next
    run.

  • Agent args follow the agent they were written for: [defaults] agent_args
    no longer reach a task that runs another agent than [defaults] agent
    (pastor task run --agent codex used to get Claude's --model).

  • The head protocol is 2. pastor task run, pastor task retry,
    pastor tick (not --dry-run) and pastor job run refuse a head below it
    (head_too_old), which would start the agent without its tool lists:
    restart pastor serve after upgrading.

  • The head, not the CLI, settles a pastor task run task's agent, since only
    it knows the task's flock. pastor task run has the head apply any edit of
    pastor.toml or flock.toml first, so an edit still takes effect at once.

  • cargo install and make install install only the pastor binary
    (--bin pastor); fake-herdr is a test double and no longer lands on
    the PATH.

  • Release builds are stripped and link-time optimised, so a downloaded
    binary is about a third smaller.

  • Cargo.toml declares the minimum Rust version (1.88) and the repository,
    and carries cargo-binstall metadata pointing at the GitHub release
    tarballs.

Security

  • Item values rendered into a job's prompt lose every control character but
    newline and tab (C0, DEL and C1), so an issue title or chat message cannot
    type key presses into the agent's terminal. The job's own prompt text and
    pastor task send are unchanged.
  • Lines read from herdr are capped at 16 MiB and the output of the ssh probes
    (home, repo directory, pastor version) at 64 KiB per stream. Past the cap
    the connection is dropped with a protocol error, or the probe is killed,
    so one machine cannot exhaust the head's memory.
  • An item value put into repo or branch may no longer be empty (which a
    missing field renders to) or ., so it cannot point the task at the
    template's parent directory.
  • A job whose branch puts an item value in its first component, such as
    {{ item.branch }}, is invalid: the job must fix a prefix like
    pastor/{{ item.key }}, so an item cannot pick an existing branch such as
    main.
  • An ssh target that is empty, starts with -, or holds whitespace or a
    control character makes flock.toml fail to load, and every ssh command
    pastor runs passes -- before the target.
  • pastor serve logs a failed accept on its socket and keeps serving
    instead of exiting. An IPC request line is capped at 1 MiB
    (request_too_large) and must arrive within 10 seconds....
Read more

pastor 0.4.0

Choose a tag to compare

@cacarico cacarico released this 25 Sep 18:48
v0.4.0
998fd5d

Added

  • Named flocks. [[flock]] entries in flock.toml declare them, one with
    default = true, and flock = "..." puts a machine in one; a machine
    without it is in the default flock. A file with no [[flock]] entry is one
    flock named default, so existing files load unchanged.
  • A task and a job target one flock and only its machines take their tasks:
    --flock on pastor task run, flock under a job's [dispatch], else the
    pinned machine's flock, else the default. --machine outside --flock is
    refused (flock_mismatch), an unknown flock too (unknown_flock).
    pastor task retry keeps the flock, and is refused (unknown_flock) once
    it is removed. A head from before flocks is refused (head_too_old) by
    every command that talks to or reloads it while flocks are in play:
    --flock, an edit of flock.toml, or named flocks declared there. Ping
    answers the head's IPC protocol for this.
  • pastor flock list|add [--default]|remove|default, pastor machine move,
    and --flock on machine add, machine list and task list. task list,
    task show and job list show the flock, and task events carry it in the
    task row.
  • pastor task send <task> [TEXT] [--key K]... [--no-enter] types into a
    live task's agent through the head, to answer what it is waiting on without
    attaching. Only starting, running and blocked tasks take input
    (task_not_live). Each send emits task.input, which records the key
    names and the text length, never the text.
  • Saved repo trust. pastor task send <task> --trust presses the agent's
    folder-trust keys to a task blocked on its startup prompt
    (not_at_trust_prompt otherwise) and saves the task's machine and repo;
    the head then answers the trust prompt of that repo's later tasks on that
    machine on its own, once per task, and emits task.trusted. [agents.<name>] trust_keys
    in pastor.toml sets the keys (Claude's, Down then Enter, are built
    in). pastor trust list [--json] and pastor trust remove <machine> <repo> show and revoke it.
  • Events carry an optional detail object for what they add beyond their
    ids; records without one are unchanged.

Changed

  • Every command that talks to or reloads the head pings it once, first, and
    acts on that answer throughout. A head that holds the socket but does not
    answer is an error (head_unresponsive) on all of them, where tick,
    job list, task list|show, flock list|remove and job enable|disable
    used to take it for no head and work offline next to it, and machine add
    and plugin install|link|uninstall|unlink made their change and only
    warned. task prune answered daemon_unresponsive for this; it now
    answers head_unresponsive like the rest.
  • pastor machine list opens with a line about the head (its pastor and
    herdr versions, its host, the number of machines, and which machine it is
    when it is one) instead of a first table row named pastor, and has a
    FLOCK column after HOST. The head's own machine comes first. --json
    keeps its shape, with flock on each machine.
  • machine add|remove and the new flock commands edit flock.toml in place,
    keeping comments and layout; they used to rewrite the whole file.
  • The database is schema 6. Schema 4 stores each task's flock; rows from
    before flocks join the default flock. Schema 5 adds the trusted_repos
    table and a trust_sent flag on each task. Schema 6 stores whether the
    task's agent has been seen at work since its prompt (activity_seen).

Fixed

  • An agent that exits between turns (a human typing /exit once the work
    is done) leaves a running task done, not failed with "agent process
    exited". An exit while starting, blocked or working still fails the task.
  • pastor task retry of a failed worktree task no longer fails with git's
    "fatal: '' already exists": the retry reopens the old task's
    checkout with worktree.open, on its branch, when the old task made that
    checkout, it is still on disk at the same path, the old agent is gone and
    no agent is in its workspace (an earlier retry may be working there).
    Any other retry, a stale task's included, gets its own branch and
    worktree.
  • A task whose agent finished its work and sat idle, waiting for input, no
    longer stays running until the session ends when the daemon restarted,
    or the flock or settings were reloaded, while the agent worked: whether
    pastor saw the agent at work is stored with the task instead of held in
    the machine actor's memory, so the new actor settles the idle agent as
    done.

pastor 0.3.0

Choose a tag to compare

@cacarico cacarico released this 25 Sep 13:54
v0.3.0
795f1a6

Changed

  • The README is a short introduction with a recorded demo; the full reference moved to docs/manual.md. make demo records the gifs with vhs.

Added

  • An agent skill, skills/pastor/SKILL.md, for agents that drive pastor or
    were dispatched by it. pastor --skill prints the copy built into the
    binary, and pastor --help points agents at it.

  • Plugins: a directory with a pastor-plugin.toml that provides a connector,
    event hooks, or both. pastor plugin install|link|uninstall|unlink|list|run
    manages them; secrets live in ~/.config/pastor/plugins/<id>/.env and are
    redacted from the capped run logs under ~/.local/state/pastor/runs/.

  • Process connectors, poll and stream: a job names a plugin's connector with
    [connector] use = "<id>", and pastor serve and pastor tick run it.
    A stream keeps a batch until a run has persisted it; a standalone
    pastor tick refuses stream jobs, which need pastor serve.

  • Event hooks: a plugin's [[events]] commands get each matching event on
    stdin, one plugin at a time in event order, from a bounded queue.

  • pastor machine list adds a HOST column (ssh target, local, or a command
    machine's program) and a first row for the head itself, with its hostname
    and local herdr version. --json is now {"head": {...}, "machines": [...]}
    instead of a bare array.

  • Without pastor serve, pastor machine list probes each machine directly
    instead of printing the flock file with no live data. CHANNEL reads
    probed, server down, unreachable or error. pastor machine status
    is folded into it.

  • pastor machine list has a PASTOR column after HERDR: the pastor installed
    on each machine (- when there is none or it cannot be known), and the
    head's own version on the head row. The head asks each machine once per
    connect; --json carries it as pastor_version.

  • flock.toml and pastor.toml are reloaded while pastor serve runs:
    machines are added, removed or replaced and new timings and defaults apply
    without a restart. pastor tick reloads them too.

  • close_done_after in pastor.toml (default 15m, never disables it):
    pastor closes a done task's pane after the grace period, removes the
    worktree it created when it is clean, and keeps a dirty one with a note on
    the task. Failed, blocked and stale tasks are never closed on their own.

Changed

  • pastor tick under pastor serve spawns its runs, so a slow connector no
    longer holds the scheduler.
  • Item fields put into a job's repo or branch may not hold path
    separators, .., a leading - or control characters; such an item is
    skipped and reported.

Removed

  • The old spellings pastor run, pastor list, pastor attach,
    pastor reload and pastor machine status are gone. Use
    pastor task run|list|attach, pastor job reload and
    pastor machine list.

Fixed

  • A dispatch no longer fails when the new pane's shell is still starting.
    herdr answered agent.start with agent_pane_busy about a second after
    workspace.create, and pastor failed the task at once; it now retries up
    to 5 times, 500ms apart, and only then fails with herdr's message plus
    after 5 attempts.
  • pastor serve now also shuts down cleanly on SIGTERM and SIGHUP, not just
    SIGINT (ctrl-c). systemd counts all three as a clean exit; the head used to
    handle only SIGINT, so a SIGTERM (a plain kill, systemctl stop of a
    wrapper, a stray signal) killed it silently, left the socket file behind,
    and the Restart=on-failure unit never came back.
  • The pastor.service and herdr.service templates now use
    Restart=always instead of Restart=on-failure, so a head or herdr
    server killed by a signal systemd treats as clean restarts too.
    systemctl --user stop still stops it for good.
  • pastor task prune no longer deletes a worktree task whose checkout may
    still be on disk. It keeps the row, names it, and points at
    pastor task close t-N --remove-worktree, which clears the recorded
    workspace so the next prune takes it. --json reports the kept ids as
    kept_worktrees.

pastor 0.2.0

Choose a tag to compare

@cacarico cacarico released this 25 Sep 00:50
v0.2.0
9db7223

Added

  • Scheduled jobs: a job is a TOML file in ~/.config/pastor/jobs/, run on an
    every interval or a cron schedule against a connector (clock for now).
    Each new item becomes one task; items already seen never fire twice.
  • pastor job list|enable|disable|run to manage job files, and
    pastor tick [--dry-run] [--job] to run or preview a scheduler pass.
  • An events log: pastor serve appends task, job and machine events to
    ~/.local/state/pastor/events.jsonl (rotated by size), and
    pastor events [--follow] [--task t-N] [--json] reads it, even with the
    daemon down.
  • pastor setup systemd [--herdr] installs the pastor or herdr user unit,
    checks that lingering is on, and tightens config/state file permissions.
  • pastor task show t-N prints one task in full, and pastor task run --agent-arg plus a [defaults] agent_args key pass flags such as
    --model to the agent.
  • CI: make check and make test-machine run on every pull request and on
    main.

Changed

  • pastor flock add|remove|list|status is now pastor machine ...;
    flock.toml keeps its name.
  • Task and job commands move under pastor task run|list|attach and
    pastor job reload. The old top-level run, list, attach and reload
    stay as hidden, deprecated aliases for this release.
  • pastor task list (formerly pastor list) shows only live tasks by
    default; pass --all to include closed ones too.
  • pastor setup systemd gained --enable, --start, --now and --stop
    to choose the systemd action, plus --yes to skip the confirmation
    prompt for scripted and remote use.

Fixed

  • Tasks now reach done against herdr 0.9.1. herdr reports no
    completion_seq; pastor now uses state_change_seq past the prompt's
    reply, requires that it saw the agent working or blocked after the prompt,
    and confirms after the settle window. Before, finished agents stayed
    running for ever.
  • A job run whose task insert fails is reported as a failed run, is not
    counted as a connector failure, and keeps its cursor; runs of one job are
    serialised and queued in command order; an elapsed backoff makes the job
    due at once.
  • The store refuses a meta table that lost its schema version, creates any
    job tables missing from a current-version database, and reports a corrupt
    failure count against its own column instead of wrapping it.
  • The CLI tells a busy head from a missing one: a request that connected but
    timed out reports timeout and says the head may still finish it; only a
    refused or missing socket says pastor serve is not running.
  • The private ssh ControlPath directory is created before any ssh command
    that can start a master, including the daemonless CLI paths.