Sinas 0.3.0
Connectors get OAuth 2.0, users get external identities and custom fields, and
Sinas can now be deployed on Kubernetes with no Docker socket. Plus LLM cost
visibility and a batch of correctness fixes.
Highlights
- Connector OAuth 2.0 — client-credentials and per-user authorization-code grants, so connectors can call APIs that require OAuth.
- User identities & custom fields — link external identities, exchange tokens with external auth systems, and expose per-user context to agents, functions, and queries.
- Kubernetes deployment — a Helm chart plus a
k8s_podexecutor that runs untrusted code in ephemeral, hardened Pods. No Docker socket, no privileged DinD. - LLM cost visibility — every LLM call's token usage is recorded and surfaced on the dashboard, and Anthropic prompt caching is enabled with cache-token accounting.
Features
Connectors / OAuth (#66)
- OAuth 2.0 client-credentials auth, with in-process token caching
- OAuth 2.0 authorization-code (per-user) grant with PKCE
- API-key auth in the query string (not just headers)
- Auth auto-derived from an OpenAPI spec's
securitySchemeson import - Console UI for OAuth setup and query-string API keys
Identity & auth (#89)
- User identities, custom fields, and identity management APIs
- Token-exchange endpoint for integrating external auth systems
- Per-user context (custom fields) exposed to agents, functions, and queries
custom_fieldsreturned from/auth/me- Console UI for custom fields and external identities
Kubernetes / deployment (#69)
- Helm chart (
charts/sinas) for a full single-namespace deployment k8s_podsandbox executor — one hardened, single-use Pod per untrusted execution (RBAC-scoped, network-isolated, no ServiceAccount token)inprocesstrusted executor anddocker_ephemeralsandbox — enable socket-free / single-container deployments- Configurable sandbox Pod scheduling (nodeSelector / tolerations / affinity) and per-release worker concurrency
- Compact deployment profile:
clickhouse.enabled: falseruns without ClickHouse (logging cleanly disabled), and leaner resource defaults + a documented density preset fit ~3 small instances on a 4GB node - CI builds multi-arch images (amd64 + arm64) for every version, release candidate, and
dev, plus on-demand feature-branch builds; each release ships a version-pinneddocker-compose.yml. Chart changes are lint/template-checked in CI for both profiles
LLM
- Per-call LLM token-usage tracking, with a token-usage tile on the home dashboard (#94)
- Anthropic prompt caching + cache-token tracking (#98)
Fixes
- Oversized tool results are now truncated structure-aware (whole JSON elements + a machine-readable
{"_truncated": true, "returned": X, "total": Y}marker) instead of a mid-JSON byte-slice that sent agents into retry loops; the context cap is configurable viaTOOL_RESULT_CONTEXT_MAX_SIZE(default 100KB, was a hardcoded 10KB) (#104) - Agent delegation failures now report the real error instead of masking it behind a
NameError(#104) - Eliminated delegation-slot starvation on the agent queue (#90)
- CDC polling no longer crashes on non-text poll columns (
bigint,timestamptz,uuid) — the text bookmark is now bound as text before casting to the column type (#80, thanks @aliiqbal208) - Connector OAuth security & correctness review: browser-session binding to prevent account-linking, token-cache isolation, robust token-expiry/refresh handling, fail-closed auth
- Connectors no longer send a request body on
GET/HEAD(some gateways rejected it) - Console no longer crashes rendering raw API validation errors (React #31)
⚠️ Behavior changes — read before upgrading
From the auth hardening (#102):
- Deleting a user now takes effect immediately. The delete used to persist nothing; it now deactivates the account, revokes all of that user's API keys and refresh tokens, and blocks every auth path. Re-creating the same email reactivates the account.
- Login no longer reveals whether an email exists (anti-enumeration). Unknown or inactive emails get a decoy session in OTP mode (
200+ a throwawaysession_id) and a generic401in password modes. The old403 "User not found"is gone from the login path — any client keying on that response must update. - Accounts with no password set now get the generic
401instead of a "no password" hint. - Non-admins can now update/delete their own agents (a
UUID-vs-strcomparison bug previously blocked them).
Database: this release adds users.is_active (and identity/custom-field tables). Apply migrations with a standard alembic upgrade head — the backend does this automatically on start.
Upgrading
Docker images (multi-arch, amd64 + arm64):
ghcr.io/sinas-platform/sinas/{backend,console,builder,executor}:0.3.0
docker-compose: download the pinned docker-compose-0.3.0.yml attached below, or from a checkout: IMAGE_TAG=0.3.0 docker compose up -d.
Kubernetes: helm upgrade --install sinas charts/sinas ... — see RELEASING.md and the Kubernetes deployment guide in the docs.
Existing docker-compose deployments are unaffected by the executor work — the defaults remain SANDBOX_EXECUTOR=docker_pool and TRUSTED_EXECUTOR=docker_shared. The k8s_pod / inprocess / docker_ephemeral executors are opt-in.
What's Changed
- OAuth 2.0 for Connectors (#66) by @kjeldoostra in #85
- feat(llm): track token usage of every LLM call in Postgres by @kjeldoostra in #94
- Agent delegation: sub-agent queue, depth bound, and suspend-on-delegate (#90) by @kjeldoostra in #97
- feat(providers): Anthropic prompt caching + cache token tracking by @kjeldoostra in #98
- feat(auth): user identities, custom fields, and identity APIs by @kjeldoostra in #92
- feat(context): expose user context to agents, functions, and queries by @kjeldoostra in #99
- feat(auth): token exchange endpoint for external auth systems by @kjeldoostra in #93
- fix(auth): real user soft-delete, token revocation on delete, and login anti-enumeration by @kjeldoostra in #102
- ci: build images for versions, RCs, dev, and any branch on demand by @kjeldoostra in #100
- Kubernetes deployment: k8s_pod sandbox executor, inprocess trusted executor, Helm chart (#69) by @kjeldoostra in #88
- feat(dashboard): surface LLM token usage on the home dashboard by @kjeldoostra in #103
- fix(tools): structure-aware context truncation with its own cap, and unmasked delegation errors by @lumixcb in #104
- docs: connector OAuth guide + missing env vars (0.3.0 gaps) by @kjeldoostra in #106
- fix(chart): leaner default resources for shared components + quota sizing docs by @kjeldoostra in #107
- feat(chart): clickhouse.enabled toggle, compact deployment profile, helm CI by @kjeldoostra in #108
- fix(cdc): bind poll bookmark as text before casting to column type by @aliiqbal208 in #95
- Release 0.3.0 by @kjeldoostra in #110
New Contributors
- @lumixcb made their first contribution in #104
- @aliiqbal208 made their first contribution in #95
Full Changelog: 0.2.0...0.3.0