Skip to content

0.7.0

alquimia-runtime 0.7.0 hardens the worker trust boundary, adds topic-level content shields, improves worklog observability, and closes several registry consistency gaps.

Topic shields, worklog sessions/activity, secret requirements, and streaming error handling

Section titled “Topic shields, worklog sessions/activity, secret requirements, and streaming error handling”
  • Topic content shields — PUT /knowledge/topics/{topic_id}/shields lets editors attach shield-config entries to a topic. Shields are validated against the registry at write time and stored on TopicRegistration.shields, so retrieved knowledge chunks are screened before they reach the model context.
  • Worklog sessions — GET /worklog/sessions returns conversation-level aggregates, and GET /worklog/activity returns run counts per hour or day. GET /worklog/ now supports include_content for truncated query/result/error previews and limit/offset pagination. final_status=running selects in-progress runs by matching final_status IS NULL.
  • Secret requirements — POST /registry/secret/requirements/{assistant_id} reports every secret an agent needs, including secrets reached through model_ref, audio_ref, tool_ref, and shield_ref, with per-key resolution status. PUT /registry/secret/definition registers a secret definition without a value, which is required for agent- and user-scoped secrets.
  • Streaming error handling — browser WebSocket sessions now emit an {"event":"error"} frame when a turn fails while keeping the call open. Clean sessions close with 1000 instead of an abnormal 1006, close reasons are capped to RFC 6455 limits, and HTTPException details from agent resolution are forwarded correctly.
  • Telemetry metrics proxy — GET /telemetry/metrics, GET /telemetry/query, GET /telemetry/query_range, GET /telemetry/labels/{label}/values, and GET /telemetry/series proxy PromQL to a Prometheus-compatible store. These endpoints are restricted to platform-admin.

See:

  • Envelope signing — every Kafka CloudEvent is signed with a kid from a key ring. Verification uses KAFKA_SIGNING_KEY or KAFKA_SIGNING_KEYS (kid:hex,...). Keys must be 32 bytes. Pre-#339 signatures are rejected unless KAFKA_SIGNING_ACCEPT_LEGACY=true.
  • Replay protection — events whose signed time is outside KAFKA_EVENT_MAX_AGE_SECONDS (default 1 hour, ±5 minutes skew) go to the DLQ. (source,id) is de-duplicated with Redis SET NX, tool calls are idempotent per (task_id, control_id, step_id), and failed or timed-out dispatches release their claim so DLQ redrive works.
  • Worker output shields — MCP tool results and A2A sub-agent results go through ToolRegistration.shields. If a shield errors, the call fails closed.
  • Timeouts and ceilings — KAFKA_HANDLER_TIMEOUT_SECONDS (default 540 s), MCP_TOOL_TIMEOUT_SECONDS (default 120 s), EVALUATION_MAX_STEPS_CEILING (50), and EVALUATION_MAX_CONCURRENT_TOOLS_CEILING (16) clamp unlimited or oversized agent specs.
  • Production profile — with TLS_ENFORCE=true, sslmode below verify-full counts as plaintext, Keycloak and OTLP URLs must be HTTPS, and an encryption key plus a Kafka signing key are both required. KNOWLEDGE_AUTHZ_DEFAULT_DENY now defaults to true.
  • Channel hardening — TRUSTED_PROXY_CIDRS restricts which proxies may supply X-Forwarded-For. Browser WebSocket sessions must use single-use encrypted tickets from POST /streaming/auth-ticket (?ticket=); ?token= is refused unless STREAMING_ALLOW_QUERY_TOKEN=true.
  • Crypto — v2 envelopes bind AES-GCM AAD to the Redis key or Postgres table.column. Plaintext is refused once a key is configured unless ENCRYPTION_ALLOW_PLAINTEXT_READS=true. v1 envelopes remain readable via ENCRYPTION_ALLOW_UNBOUND_READS (default on). Channel routes, route tokens, pending approvals, Twilio stream tickets, and the new WS tickets are sealed, and ticket Redis keys are SHA-256 hashes.

See Workload hardening and Kubernetes & OpenShift.

Harden CI workflows, image supply chain and K8s identity

Section titled “Harden CI workflows, image supply chain and K8s identity”
  • Workflow permissions are minimized, actions are SHA-pinned, and agent jobs receive repo-scoped tokens.
  • docker-build scans the exact pushed image digest with Grype and fails on fixable critical vulnerabilities.
  • A new security-scan workflow runs gitleaks and osv-scanner.
  • Master and worker use separate ServiceAccounts; the worker’s ServiceAccount has automountServiceAccountToken: false.
  • Vault roles are bound one per ServiceAccount, and SPIRE ClusterStaticEntry RBAC is moved into an OpenShift-only component with a ValidatingAdmissionPolicy.
  • rclone, SPIRE, CSI and busybox images are pinned by digest; worker egress is restricted.

See Workload hardening and Kubernetes & OpenShift.

  • Registry: external publish overwrites agentspace version pointer and hydrates from wrong registry; add promote and authz for external targets — PUT /registry/publish no longer overwrites the local version pointer or hydrates from the wrong registry when the target is an external repository. A new alquimia registry promote command copies an already-published artifact to another target without re-pushing from the local workspace. External publish targets are authorized through the registry ACL.
  • Registry: publish and validate treat secrets used through model_ref / shield_ref / audio_ref / tool_ref as unused — secret usage now includes a recursive walk of all artifact registrations, so secrets referenced only by a model, shield, audio provider, or tool registration are no longer flagged as unused or deleted during validation.
  • Registry: validate returns 500 when one agent spec is invalid — migrated specs are passed to the secret-usage check, and raw specs that still fail validation fall back to a recursive $secretRef walk instead of raising.
  • Replace deprecated openapi_prefix with root_path — OPENAPI_PREFIX is mapped to FastAPI’s supported root_path parameter, fixing the studio-update workflow after the 0.6.0 release.
  • Update alquimia-core to 0.6.2, 0.7.0, and finally 0.7.1.
  • Patch previous release config in studio-update workflow.

See:

  • Bump the actions-deps group with 9 updates.