Commit Graph

578 Commits

Author SHA1 Message Date
Adrian Lyjak c9fa9b26e7 Remove migrations from statedb binary
The statedb binary is a generic SQL-over-HTTP proxy. Schema creation is
the Python client's responsibility (HttpWorkflowStore), not the database
layer's. The existing migration machinery in the agents server already
handles this.
2026-05-11 12:05:38 -04:00
Adrian Lyjak 04e1faad5d Add statedb Go binary: SQLite-over-HTTP with Litestream replication
Phase 1 of the statedb plan. A new Go binary at cmd/statedb that exposes
a SQLite database over HTTP with transaction support (forked from ws4sqlite),
Bearer token auth, backup/restore endpoints, and embedded Litestream for
continuous WAL replication to S3.

Components:
- Transaction handler: POST /db with batched statements/queries, noFail mode,
  mutex-serialized access, panic/recover for atomic rollback
- Migrations: embedded SQL files applied at startup, version-tracked
- Backup: GET /db/backup (VACUUM INTO, optional gzip compression)
- Restore: POST /db/restore (validates SQLite magic, swaps DB file, re-migrates)
- Litestream: S3 replication with 1s sync interval, restore-on-startup via
  EnsureExists, graceful shutdown with final WAL sync
- Auth: Bearer token middleware, healthz exempt
- --no-s3 flag for local dev without S3

28 passing tests covering transactions, auth, migrations, backup/restore,
and parameter parsing.
2026-05-11 00:48:39 -04:00
llama-org-ci-bot[bot] 7a0b62e6d4 chore: version packages (#612) llama-agents-core@0.10.2 llama-agents-agentcore@0.9.3 llama-agents@0.12.3 llama-agents-appserver@0.11.4 llama-agents-control-plane@0.12.2 llamactl@0.10.0 2026-05-06 22:43:26 +00:00
Adrian Lyjak 2497225051 Update llamactl auth command docs (#626) 2026-05-06 18:41:16 -04:00
Adrian Lyjak 1452c184cb Restructure llamactl auth commands (#624) 2026-05-06 18:36:30 -04:00
Adrian Lyjak 4df3a02896 docs: refresh llamactl docs (#619) 2026-05-06 14:17:53 -04:00
Adrian Lyjak 4f6c7fd589 Preserve secret placeholders in deployments get (#623) 2026-05-06 13:26:33 -04:00
Adrian Lyjak 865baba041 Polish llamactl command output (#622) 2026-05-05 19:52:34 -04:00
Adrian Lyjak 0b673e8686 Remove dead llamactl Textual UI (#621) 2026-05-05 16:04:29 -04:00
Adrian Lyjak 474b9ee398 Drop questionary, make llamactl non-interactive-safe (#618) 2026-05-05 15:45:24 -04:00
Adrian Lyjak 0b9d6c204f llamactl: use editor loop for deployment create/edit (#617) 2026-05-04 15:09:37 -04:00
Adrian Lyjak 87ef930f8a Add env var based auth to llamactl (#615) 2026-05-03 14:10:08 -04:00
Adrian Lyjak c3fac21383 llamactl: annotate apply failures in YAML (#613) 2026-05-02 11:42:55 -04:00
Adrian Lyjak b70ace8cb3 llamactl: deployments apply -f (#604) 2026-05-01 17:55:12 -04:00
Adrian Lyjak fa2136faff llamactl: add deployment template output (#591) 2026-05-01 17:48:22 -04:00
llama-org-ci-bot[bot] d97ee82ea2 chore: version packages (#610) llama-agents-dbos@0.3.1 2026-05-01 13:29:50 -04:00
Adrian Lyjak 83d5f9f974 Use async DBOS sends for workflow ticks (#609) 2026-05-01 11:25:15 -04:00
llama-org-ci-bot[bot] 43e0bf227e chore: version packages (#605)
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and publish to npm
yourself or [setup this action to publish
automatically](https://github.com/changesets/action#with-publishing). If
you're not ready to do a release yet, that's fine, whenever you add more
changesets to main, this PR will be updated.


# Releases
## llama-agents-dbos@0.3.0

### Minor Changes

- 56701a9: Add `max_recovery_attempts` to `DBOSRuntimeConfig`. When set,
it is forwarded to the `@DBOS.workflow` decorator wrapping the runtime's
control loop.

## llamactl@0.9.1

### Patch Changes

- 0b2098b: Fix `deployments update` crashing with `Event loop is closed`
after a transient failure on the internal git push. The command now runs
`get_deployment` and `update_deployment` in a single event loop instead
of reusing the same `ProjectClient` across two `asyncio.run` calls.

Co-authored-by: llama-org-ci-bot[bot] <231146559+llama-org-ci-bot[bot]@users.noreply.github.com>
llamactl@0.9.1 llama-agents-dbos@0.3.0
2026-04-30 14:44:24 -04:00
Fede Bello 56701a9c9b DBOSRuntime: expose max_recovery_attempts on DBOSRuntimeConfig (#607)
## Summary

- Adds `max_recovery_attempts` to `DBOSRuntimeConfig`. When set, it is
forwarded to the `@DBOS.workflow` decorator wrapping the runtime's
control loop, capping how many times a workflow will be replayed after a
crash before being marked `MAX_RECOVERY_ATTEMPTS_EXCEEDED`.
- Only forwarded when explicitly set, so DBOS's own default (currently
100) keeps applying for unset configs.
- Motivated by OOM crash-loops: a workflow that exhausts pod memory gets
re-recovered on the new pod, OOMs again, and burns through ~100
recoveries before DBOS gives up. A user-tunable cap turns that into a
bounded failure.
2026-04-30 14:34:09 -04:00
Patricia 0b2098b762 llamactl: deployments update — single event loop across get + update (#602) 2026-04-30 10:53:13 -04:00
llama-org-ci-bot[bot] 24059467bd chore: version packages (#601) llama-agents-dbos@0.2.3 llama-agents@0.12.2 llama-agents-server@v0.5.0 llama-agents-agentcore@0.9.2 llama-agents-appserver@0.11.3 llama-agents-control-plane@0.12.1 llamactl@0.9.0 llama-agents-core@0.10.1 llama-agents-server@0.5.0 2026-04-29 21:02:02 -04:00
Adrian Lyjak 95d8c2bdb9 DBOSRuntime: share asyncpg pool through PoolProvider (#597) 2026-04-29 20:43:56 -04:00
Adrian Lyjak aeb4bfd4ef Stabilize async test readiness (#600) 2026-04-29 19:49:53 -04:00
Adrian Lyjak ce118e6e9a adjust qa skill to better support testing projects (#596) 2026-04-29 13:57:01 -04:00
Adrian Lyjak 974bae86ff Accept unknown deployment phase values as plain strings (#590) 2026-04-28 00:25:11 -04:00
Adrian Lyjak 9cee98dbe9 llamactl: deployments history + rollback completion (#587)
`deployments history` joins the column framework: supports
-o text|json|yaml|wide and --project <id>, sorts newest-first, formats
timestamps as Z-suffixed UTC, and shows 7-char short SHAs in text mode
(JSON keeps the full 40-char). The rich-table rendering is gone —
ReleaseDisplay carries the column annotations and render_output picks
the format.

`deployments rollback --git-sha <TAB>` now completes from the
deployment's release history (via GitShaType.shell_complete reading
deployment_id + project from the click ctx), and the questionary
fallback uses short_sha so the picker matches the new --git-sha
display.
2026-04-27 19:30:42 -04:00
Adrian Lyjak 491e2d2da9 llamactl: auth/env list and auth organizations on column framework (#589)
Drop the inline _render_text closures from auth list, auth env list,
and auth organizations; route everything through render_output via
AuthProfileDisplay, EnvDisplay, OrgDisplay. The Rich-styled tables
become plain-whitespace; -o json | yaml | wide all work.

auth list no longer leaks the api_key or OIDC tokens — auth_type
reports token / oidc / none. auth organizations gains -o for the
first time; the empty case stays an empty list ([]) instead of a Rich
"no orgs" placeholder. EnvDisplay intentionally omits
min_llamactl_version (not part of the public env-list contract).
2026-04-27 19:22:41 -04:00
Adrian Lyjak ec88970cbc llamactl: deployments get/list/logs (#586) 2026-04-27 19:16:01 -04:00
Adrian Lyjak ddcb63322e llamactl: declarative Column framework + render/log_format helpers (#585)
No user-visible CLI behavior change. Lays the foundation for
DeploymentDisplay, ReleaseDisplay, AuthProfileDisplay, EnvDisplay,
OrgDisplay (which land with their respective commands) and for the
-o text|json|yaml|wide dispatch on read commands.

- cli/display.py: Column / ResolvedColumn / resolve_columns / render_columns,
  the walker primitives that drive auto-derived tables.
- cli/render.py: render_table, gh_short, short_sha, format_iso_z, star_marker.
- cli/log_format.py: parse_log_body, trim_timestamp, render_plain. Lifted out
  of textual/deployment_monitor.py so a non-Textual `deployments logs` can
  share the structlog parser.
- cli/options.py: output_option, project_option, render_output. The
  render_output helper dispatches between framework-derived tables, JSON, and
  YAML; ``yaml`` is imported lazily to keep CLI startup cheap.
- cli/client.py: get_project_client / project_client_context now accept
  project_id_override (for --project).
- cli/param_types.py: DeploymentType.shell_complete and
  GitShaType.shell_complete read `project` off the click ctx so completion
  hits the right project.
- cli/textual/deployment_monitor.py: refactored to consume parse_log_body /
  trim_timestamp; capped the in-memory log buffer; cached container colors.
2026-04-27 18:40:34 -04:00
Adrian Lyjak 463c79d628 Add follow=false to deployments/{id}/logs (#584)
Default stays follow=true so existing streaming consumers (e.g. the TUI)
keep working. With follow=false the server returns currently-available
logs and ends the SSE stream — useful for "fetch and exit" callers that
don't want to reconnect across ReplicaSet changes.

Threads the flag through manage_client.stream_deployment_logs,
DeploymentService.stream_deployment_logs, and the underlying k8s_client
helpers (stream_replicaset_logs, stream_build_job_logs,
_stream_pod_container_logs, stream_container_logs). When follow=false,
read_namespaced_pod_log returns synchronously and 400/404 maps to an
empty generator rather than a wait-and-retry. Also hoists
_on_push_complete to module scope and tightens _get_deployment_or_raise
to skip the events fetch on a not-found / wrong-project deployment.
2026-04-27 18:36:52 -04:00
Adrian Lyjak 855f6fb88b Add llamactl-qa skill and dev-cli sync-skills helper (#583)
The skill plans and runs design QA against a real backend. The dev-cli
command symlinks .agents/skills/<name> into .claude/skills/<name> so the
checked-in copy is what Claude Code sees.
2026-04-27 18:36:01 -04:00
Adrian Lyjak 0c6afcd559 Push before save when editing an internal-repo deployment (#581) 2026-04-27 17:37:57 -04:00
Adrian Lyjak 91516a5c5e Friendly llamactl auth login error when OIDC is disabled (#579) 2026-04-27 15:31:12 -04:00
llama-org-ci-bot[bot] 550f28cdac chore: version packages (#576) llama-agents-control-plane@0.12.0 llamactl@0.8.0 llama-agents-agentcore@0.9.1 llama-agents-core@0.10.0 llama-agents-appserver@0.11.2 llama-agents@0.12.1 2026-04-27 13:24:55 -06:00
Adrian Lyjak 2280e046ba Rename deployment field llama_deploy_version to appserver_version (#575)
Canonical field on DeploymentCreate, DeploymentResponse, and DeploymentUpdate
is now appserver_version. The old name remains as a deprecated input alias
(via model_validator) and a serialized-output computed_field, so old clients
and old servers continue to interoperate.
2026-04-26 13:32:52 -04:00
dependabot[bot] 9381d4eba0 chore(deps): bump gitpython from 3.1.46 to 3.1.47 (#573)
Bumps [gitpython](https://github.com/gitpython-developers/GitPython) from 3.1.46 to 3.1.47.
- [Release notes](https://github.com/gitpython-developers/GitPython/releases)
- [Changelog](https://github.com/gitpython-developers/GitPython/blob/main/CHANGES)
- [Commits](https://github.com/gitpython-developers/GitPython/compare/3.1.46...3.1.47)

---
updated-dependencies:
- dependency-name: gitpython
  dependency-version: 3.1.47
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-25 21:30:56 -04:00
llama-org-ci-bot[bot] 6f60d59960 chore: version packages (#572)
Co-authored-by: llama-org-ci-bot[bot] <231146559+llama-org-ci-bot[bot]@users.noreply.github.com>
llamactl@0.7.3
2026-04-25 11:14:02 -04:00
dependabot[bot] d29f957205 chore(deps): bump python-dotenv from 1.2.1 to 1.2.2 (#561) 2026-04-25 11:02:53 -04:00
dependabot[bot] 4888d22eae chore(deps): bump go.opentelemetry.io/otel in /operator (#570) 2026-04-25 11:02:41 -04:00
Adrian Lyjak e75a15daae Restore VITE_/NEXT_PUBLIC_ env vars in llamactl serve (#571) 2026-04-25 11:02:23 -04:00
llama-org-ci-bot[bot] 612a36c694 chore: version packages (#565)
Co-authored-by: llama-org-ci-bot[bot] <231146559+llama-org-ci-bot[bot]@users.noreply.github.com>
llama-agents-client@0.3.7 llama-agents-server@0.4.7 llama-agents-server@v0.4.7 llama-agents@0.12.0 llama-index-workflows@2.20.0
2026-04-24 10:53:38 -04:00
Adrian Lyjak 9eda1899cc Document compatible llama-agents-crds version in llama-agents chart (#569)
Adds a `crds.version` values key auto-synced from the `llama-agents-crds`
workspace package at release time, and surfaces it in the generated README
plus install/upgrade snippets.
2026-04-24 10:50:22 -04:00
Adrian Lyjak 3ced443106 chart: optional s3proxy sidecar for non-AWS object storage (#568)
* chart: add optional s3proxy sidecar for the control plane

Gated on `s3proxy.enabled`. When on, the control plane pod gains an
s3proxy container plus an emptyDir volume, and `S3_ENDPOINT_URL` /
`S3_UNSIGNED` default to localhost / `true`. Explicit user values
still win.

Credentials go in `s3proxy.config` (raw passthrough to JCLOUDS_* env
vars). Examples for Azure Blob and GCS in docs/s3-proxy-setup.md.

* chart: trim s3proxy docs, drop MinIO mention from unsigned comment

* chart: align control plane S3 and s3proxy credentials on BYO-or-inline shape

Sidecar: add `s3proxy.secret` for BYO. Chart Secret renders only when `config`
is set and `secret` is not. Sidecar envFroms `secret` over `config`.

Control plane: add inline `controlPlane.objectStorage.s3.{accessKey,secretKey}`
rendering `llama-agents-controlplane-s3`, plus `s3.secret` for BYO. The legacy
`controlPlane.objectStorage.secretRef` keeps working as a silent alias.
Precedence: `s3.secret` > `secretRef` > inline. Partial inline errors out.

* chart: fold s3-proxy-setup.md into README

* chart: trim changeset

* chart: bump s3proxy to 3.1.0 and tighten sidecar resources
2026-04-24 10:38:54 -04:00
Adrian Lyjak ddf3accdac refactor(llama-index-workflows): Move workflow graph/event validation into representation.validate (#566) 2026-04-23 20:22:49 +00:00
Adrian Lyjak 2cc9fae570 add @catch_error handler + Context.retry_info() (#554) 2026-04-23 19:25:50 +00:00
Adrian Lyjak 9bf247af98 fix(server): prevent zombie handler resume loop and collapse duplicate rows (#564) 2026-04-23 00:31:36 -04:00
llama-org-ci-bot[bot] 8ef25463f7 chore: version packages (#563)
Co-authored-by: llama-org-ci-bot[bot] <231146559+llama-org-ci-bot[bot]@users.noreply.github.com>
llama-agents@0.11.1 llama-agents-server@0.4.6 llama-agents-dbos@0.2.2 llama-agents-server@v0.4.6 llama-agents-appserver@0.11.1 llama-agents-agentcore@0.9.0 llama-agents-client@0.3.6 llama-index-workflows@2.19.1 llamactl@0.7.2
2026-04-22 14:29:17 -04:00
llama-org-ci-bot[bot] 60cd349b65 chore: update debugger assets (#553)
Co-authored-by: llama-org-ci-bot[bot] <231146559+llama-org-ci-bot[bot]@users.noreply.github.com>
2026-04-22 14:25:08 -04:00
Adrian Lyjak 916b157fa0 fix(appserver): target the venv uv resolves, not <template>/.venv (#562) 2026-04-22 14:24:41 -04:00
Adrian Lyjak f7e037e33b perf(runtime): stream ticks during resume replay (#556) 2026-04-20 21:28:23 -04:00