Skip to content

v1.33.0

Choose a tag to compare

@github-actions github-actions released this 28 Oct 08:49
· 30 commits to main since this release

Added

  • Container lifecycle commands in command-line mode: start, stop, restart, kill [-s SIG]
    and rm [-f] take several container IDs, unique ID prefixes or names, and/or repeatable
    --filter key=value predicates (name=/image= globs, status=, label=k[=v], network=,
    health=; exact matches, never substrings). The result lists one outcome per container; when
    only some of them fail, the envelope carries "partial": true and the exit status is 8.
  • Image and compose deployment commands in command-line mode: pull <image>, compose up,
    compose pull, compose restart, compose down (containers and networks; volumes kept),
    compose backup (archive saved to the current directory, absolute path returned) and
    compose restore <project> <archive>. Streaming commands run to completion and return the
    engine output (the newest 200 lines); a failure is an error that quotes the output leading to
    it. compose down and compose restore are destructive.
  • Network, volume and prune commands in command-line mode: network create <name>
    (--driver, --subnet, --gateway) and volume create <name> (--driver) return the new
    object; an existing name or a gateway outside the subnet is a usage error. image prune
    (dangling images), volume prune and system prune (stopped containers, unused networks,
    dangling images, build cache; volumes kept) are destructive.
  • Agent write policy: command-line mode is read-only by default. agent: {allowWrite, maxTier}
    in the config — globally and per saved host, the host block overriding key by key — turns write
    commands on up to a tier ceiling (read < safe < destructive; safe when unset).
    --allow-write allows writes for one command unless the config says allowWrite: false;
    read-only mode (-read-only, readOnly:, a host's read_only) always wins. A refused command
    fails with forbidden before connecting, with a hint naming the setting that blocks it;
    d9c help lists only the allowed commands and hosts ls reports each host's agent_tier.
  • Dry runs and confirmation for write commands: --dry-run prints the plan of any write
    command (targets resolved, their state noted) without changing anything, and is not blocked by
    the write policy. A destructive command without -y/--yes changes nothing and fails with
    confirmation_required (exit 7), carrying the plan in error.plan for the user to approve.
  • Audit log of write commands: each write command, whatever its outcome (done, partial,
    planned, refused, failed), appends a JSON line to agent-audit.log next to the config file
    (~/.d9c/agent-audit.log by default) with the time, host, operation, targets, arguments and
    result. A write command that cannot open the log fails before connecting.
  • exec in command-line mode: d9c exec <container> -- <cmd> [args…] runs a command without a
    terminal on every runtime (Docker/Podman API, nerdctl and crictl locally or over SSH) and returns
    its exit code, stdout and stderr, each cut at --max-bytes (64 KiB by default) with the full
    sizes reported. --timeout (60 s) ends the wait with the new error code timeout (exit 9).
    The command is destructive: it needs maxTier: destructive and --yes.
  • wait in command-line mode: d9c wait <container> --until running|healthy|exited polls the
    container until it gets there and returns its state; --timeout (60 s, 0 = check once) ends
    with timeout (exit 9) naming the state it was left in. Waiting for healthy on a container
    without a healthcheck is a usage error at once.
  • Read commands on several hosts: --host a,b or --all-hosts runs a read command on those
    saved hosts concurrently; data lists each host's result or error, a failing host does not stop
    the others, and some failures make the result partial (exit 8). With -demo every host is
    served by the demo backend.

Fixed

  • Pull reported success on a failed pull (Docker/Podman API): an error the daemon sends
    inside the progress stream (unknown manifest, registry failure mid-download) is now reported.
  • d9c stats web was a usage error: container names and IDs are now accepted as positional
    arguments, the same as --container.