Skip to content

v0.42.0

Choose a tag to compare

@github-actions github-actions released this 08 Oct 21:48
f4102b1

This release makes agent mode correct its own mistakes: failed DQL comes back rewritten, guessed commands point to real ones, and empty results explain themselves. It also lets auth login store tokens in a file on headless Linux (with consent), and stops dtctl from retrying POSTs that may already have run.

✨ Highlights

Agent mode repairs common mistakes (#672, #677)

Agents keep making the same few mistakes, so the response now carries the fix:

  • Failed queries come back rewritten. SQL and Splunk habits (stats … by, single quotes, function and command synonyms, aggregation references, a time window outside fetch) are translated into a query that runs.
  • Guessed commands name real ones. dtctl workflows, get problems or slo-status list the commands that read that resource instead of an unrelated near-match. A fetch of a platform object (workflows, SLOs, dashboards) points to dtctl get.
  • Empty results explain themselves. When a filter compares a field to a string, the response lists the values the field really has (context.empty_reason: value_not_found).
  • Results say what they are. context.window states the window searched (and notes the default 2h), an unsorted | limit N is labelled a sample, duration columns are labelled nanoseconds, and get slos points to dtctl exec slo for status.
  • --jq without -o returns JSON instead of an auto-chosen CSV/YAML string.
  • exec analyzer is trimmed. It drops the echoed input and nulls and summarizes series (--series, --precision, default summary and 4 digits).

Output outside agent mode is unchanged.

File token storage on headless Linux (#678)

With no Secret Service, auth login failed until you exported DTCTL_TOKEN_STORAGE=file in every shell. At a terminal, dtctl now asks once whether to store tokens in a file (mode 0600) and remembers the answer. It never switches silently: a locked or broken keyring, CI, non-TTY runs and --agent never prompt, and DTCTL_TOKEN_STORAGE still wins. dtctl doctor shows a remembered choice and how to undo it.

Opt-in concurrent execution for embedders (#676, #680)

pkg/engine gains engine.New and engine.WithConcurrentExecution(n), which run up to n invocations in parallel, each on its own command tree. Nothing is concurrent by default; the CLI, dtctl serve and existing callers behave as before. See docs/dev/CONCURRENT_EXECUTION.md.

🐛 Fixes

  • POST requests are no longer retried on server errors (#660, fixes #276) — a 502, 504 or dropped connection can arrive after the server already acted, so the retry could start a second workflow run, create a duplicate object or run a DQL query twice. Only idempotent methods (GET, HEAD, OPTIONS, TRACE, PUT, DELETE) are retried.
  • Browser login now sends resource on the code exchange and on refresh (#652) — without it, account APIs such as service-users answered 401 for tokens from a browser login.
  • auth status and doctor report the real token store (#661, fixes #393) — a keyring that answers reads but refuses writes (macOS security exit 44) was reported as the backend after dtctl had fallen back to the file store. doctor now warns about that case.
  • exec api and describe api --raw no longer append a newline (#651, fixes #643) — every binary download (a ZIP, say) was one byte longer than the response body, so its SHA-256 never matched the endpoint's /checksum.
  • --spill=auto measures what is actually written (#658, fixes #570) — the threshold was compared against the 2-space-indented size even when the envelope goes out compact (about 2.5× too large), and measured_bytes overstated what the agent received.
  • Remaining dry runs emit an agent envelope (#663, fixes #514) — exec api --dry-run printed prose in agent mode, and the account, create and cloud monitoring dry runs gave agents nothing to parse. They now return a JSON envelope.
  • Document UI links no longer carry a doubled slash (#655, fixes #653) when the environment URL ends in one.
  • The Nix flake builds with nixpkgs Go (#670).

📚 Documentation

  • The dtctl skill reference steers DQL text filters away from lower() (#671).

Full Changelog: v0.41.0...v0.42.0