For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt, and this page is available as Markdown at /docs/releases/v0.13.0.md.

v0.13.0

Released: November 18, 2026

Each service now gets two database users, so a running service can read and write its rows but never change its tables. infra:logs --follow shows new lines as they are written, on every cloud. Removing a service saves its database first, and a new command brings it back. Storage buckets log every access. Kong moves to 3.9.4, and a trace stays whole at any sample rate. New environments get names no other project can take. And the framework's Kong plugins are published on their own, for any Kong.


Live logs

infra:logs --follow prints new lines as they are written, until you press Ctrl+C.

npx tsdevstack infra:logs auth-service --env dev --follow
npx tsdevstack infra:logs --all --env dev --follow --level warn
  • It shows lines written after it starts. --level, --kind, --grep and --json work as usual. --since and --until don't work with it.
  • It stops after 1 hour. --no-time-limit keeps it going.
  • When a connection drops, it reconnects, up to 3 tries in a row.

Per cloud:

  • GCP: one live stream from Cloud Logging covers every source. Free.
  • AWS: CloudWatch Live Tail, one session per 10 log groups. AWS bills $0.01 per session minute after 1,800 free minutes a month. --all on a typical project opens 2 or 3 sessions, and the command prints the count.
  • Azure: services and workers stream live, and new replicas join within 10 seconds. Kong and the Next.js apps stream live from App Service's own log stream, about 1 to 3 seconds behind, signed in with the environment's credentials. Jobs, buckets, the edge and App Service's request log come from Log Analytics every 30 seconds, 1 to 10 minutes late. With Front Door Premium, Kong and the Next.js apps come from Log Analytics too.

Two new log sources: db-init, the database setup each deploy runs, and bucket-<name> (see Storage). The kong source leaves out the load balancer's health checks.

The MCP tool get_logs has no follow mode: a tool call returns once. See Cloud Logs.

Two database users per service

Each service with a database has two Postgres users:

  • <service> owns the tables. Migrations and Prisma's tools use it.
  • <service>_app is what the running service connects as. It reads and writes rows. It can't create, change, drop or empty tables, and it can't connect to another service's database.

So a bug or an injected query in a running service can't drop a table or change the schema.

  • Locally, sync sets up both users in each Postgres container. In .secrets.local.json, DATABASE_URL is the _app user and MIGRATION_DATABASE_URL the owner. The service's .env, which Prisma's tools read, holds the owner.
  • In the cloud, infra:deploy runs a short db-init job inside your private network on every deploy. It sets up both users and keeps their URLs in the cloud's secret store. Migration jobs connect as the owner. A running service can't read the owner's URL.
  • GCP: the job also takes away the extra rights Cloud SQL gives every user it creates. Each service's migration job runs as its own service account, which reads only that service's owner URL.
  • Azure: services and migrations connected as the server's admin user. Now they connect as their own users. The owners' URLs sit in a Key Vault of their own that only the database jobs read, so dbjobs can't be a service name.
  • infra:remove-service drops both users.

If your code changes the schema while it runs (a raw CREATE TABLE or TRUNCATE), move that into a migration. See Database users.

Removing a service keeps its data

infra:remove-service saves the service's database before it drops it, on every cloud. The file goes to a private bucket of the environment, which infra:deploy creates, and is deleted after 7 days. Deploy the service again, then put the data back:

npx tsdevstack infra:restore-database auth-service --env dev

The restore saves the database's current contents first, so you can undo it. If the save before a removal fails twice, a terminal asks whether to stop (the default), try again or remove the service without it. CI and --confirm stop. --skip-export drops the database without saving it. The MCP server has a restore_database tool. See Data of a removed service.

infra:remove-service also removes more of what a service leaves behind:

  • the migration job on GCP and Azure, and on AWS the migration log group and the service's own CloudFront distribution (SPA or Next.js),
  • the scheduled jobs that call the service,
  • the service's database on GCP and Azure, dropped in SQL.

--confirm now answers every question in a terminal too, so the MCP tool can remove a service. After it, run remove-service and infra:deploy: the deploy removes the service's routes and gives its database connections to the other services.

Storage

  • Access logs: every read and write of a storage bucket's files is logged in the cloud, with who did it and from where: Cloud Storage's audit logs on GCP, a CloudTrail trail of its own on AWS, blob logs on Azure. infra:logs bucket-<name> reads them. A million accesses cost about $2.10 on AWS, and about $0.75 on GCP and $3.50 on Azure past their free monthly logs. See each cloud's cost page.
  • Private and HTTPS only: AWS buckets refuse requests without HTTPS, and the log buckets block public access. GCP buckets enforce public access prevention. The Terraform state bucket gets the same settings when it lacks them.
  • GCP SPAs: the SPA bucket is private, and only the load balancer reads it. An SPA needs a domain in infrastructure.json.
  • SPA deploys keep the previous build's files for a day after their last upload, on every cloud. A visitor who still has the old version open can keep loading its pages. A later deploy deletes them.

Traces stay whole at any sample rate

Kong moves from 3.8.0 to 3.9.4, the newest open-source Kong. A new framework plugin, tsdevstack-opentelemetry, lets the first hop decide which traces to keep:

  • For a request to your Next.js frontend, the frontend decides. Kong keeps every trace the frontend kept, and the services follow Kong.
  • For a request that reaches Kong any other way (a browser calling the API, a partner with an API key), Kong decides, and the services follow.

A trace a hop dropped stays dropped too, so a tracing.sampleRate below 1 gives no half traces. Each hop also sends its traceparent as X-Tsdevstack-Traceparent, which Cloud Run's front end leaves alone. Kong drops that header from outside clients, like the other trace headers. Scheduled job runs are traced at the sample rate too. See Sampling.

More in Kong:

  • A client's bad token (expired, signed with an old key, forged) still gets a 401. It's logged at info now, so it doesn't show up as an error.
  • The health route has its own rate limit, 600 a minute per address, so the load balancer's and Front Door's checks don't count against the global one.
  • Request debugging is off.
  • In the cloud, Kong's image build adds every domain in infrastructure.json that KONG_CORS_ORIGINS is missing. A domain you add later works after the next deploy, and origins you added yourself stay.
  • Kong 3.9 logs dozens of rate-limiting: config.redis_* is deprecated warnings at every start. They come from Kong itself (Kong issue 14418), not your config. Rate limiting works as configured.

Kong plugins for any Kong

The six framework plugins are open source (Apache-2.0) and published on their own, at version 1.0.0: the tsdevstack/kong-plugins repository on GitHub, LuaRocks packages (luarocks install tsdevstack-api-key), and the image ghcr.io/tsdevstack/kong, Kong 3.9.4 with the six plugins and the OIDC plugin. They work in any open-source Kong 3.9. Your project's Kong image is still built from the copy the CLI ships. See Kong Plugins.

Names no other project can take

Some cloud names are shared by every project in an account, or across the whole cloud. New environments get names that can't clash:

  • GCP: Cloud Run services, Next.js apps and workers are named {project}-{service}, migration jobs {project}-migrate-{service}, Cloud Scheduler jobs {project}-{job}. Two tsdevstack projects can share one GCP project. Storage bucket names end in 6 characters from the GCP project ID.
  • Azure: Key Vaults, the storage accounts, the container registry, the App Services, Redis and the PostgreSQL server end in 6 characters from the subscription ID.
  • AWS: the migration task and its log group carry the project name. infra:logs reads the old and the new ones.

Environments deployed with v0.12.0 or earlier keep the names they have. The CLI checks which names an environment uses (on GCP from its Terraform state, on Azure from the shared Key Vault's name) and never renames anything. If the check fails, the command stops instead of guessing. See the names for GCP and Azure.

Next.js logs as JSON

logConsoleAsJson from @tsdevstack/telemetry turns the Next.js server's console lines into JSON in the cloud, in the services' shape. Each line has a level for --level and the request's trace_id for --grep, and an error is one entry with its stack. On GCP, errors reach Error Reporting. Locally nothing changes. The template calls it from instrumentation.ts. See telemetry.

Workers

  • register-detached-worker creates the worker's files (src/worker.ts, src/worker.module.ts, tsconfig.worker.json) and its two scripts when the service doesn't have them. It never overwrites a file.
  • The auth template's email processor sends up to 5 emails at a time, held to Resend's 10 requests a second. Workers scale on CPU, so a job that waits on the network should run several at once with concurrency. See Detached Workers.

Scheduled jobs

method, httpTimeout and timezone now work on every cloud:

CloudhttpTimeouttimezone
GCP15 to 1800 s, default 300Any IANA time zone
AWS15 to 890 s, default 300Any IANA time zone
Azure15 to 240 s, default 240UTC only

infra:generate stops on a value outside these, and on a job field it doesn't know. See Scheduled Jobs.

Azure

  • Database delete lock: database.deletionProtection (default true) puts a delete lock on the PostgreSQL server. infra:remove-service and infra:destroy lift it while they delete. With the lock on, a deploy that would delete a database fails at that step. See Database.
  • Kudu sites: each App Service's Kudu site (its deploy and log stream site) accepts only an Azure sign-in with deploy rights on the app. Username/password sign-in and SSH into the containers are off. App Service keeps the apps' output in its log files for 3 days, up to 100 MB.
  • infra:destroy lists the DNS zone's records the framework didn't make (Resend's, for example), with the command that saves a copy of the zone, before it asks to go ahead.
  • Deleted secrets: Key Vault keeps a deleted secret for 90 days and blocks its name. cloud-secrets:push, the deploy and db-init now recover such a secret, then write it.
  • App Service capacity: when a plan is short of machines, the deploy stops and tells you to pick another size. It no longer retries: every failed plan create counts toward an Azure limit that blocks plan creates for the subscription in that region, by Microsoft support's answers for up to 48 hours (code 51025). The deploy explains that limit too. See App Service Plans.
  • Redis cost: Managed Redis runs two nodes for high availability and bills twice the one-node price Azure lists, B0 about $26 a month. The cost pages had one node; the totals are updated.

CI

GitHub gives repositories created, renamed or transferred after 15 July 2026 a new form of the OIDC subject, with IDs: repo:ORG@OWNER_ID/REPO@REPO_ID:.... The AWS trust policy and the Azure federated credentials, as the CLI prints them and the CI/CD pages show them, now cover both forms. GCP checks the repository, not the subject, and needs nothing. See AWS CI/CD and Azure CI/CD.

Improvements

  • Every deploy starts new instances on GCP and Azure, even with the same image tag, so they read the current secrets. AWS already did.
  • Calls time out after 30 seconds: service clients in nest-common (BaseServiceClient) and the frontend template's Kong clients. A client created with its own timeout keeps it.
  • nest-common stops at once in production when DATABASE_URL or DB_POOL_MAX is missing, instead of retrying a local address for a minute.
  • AWS: infra:generate stops at a CPU and memory pair Fargate can't run.
  • AWS: a Next.js deploy clears the app's CloudFront cache.
  • init installs Next.js's next-dev-loop agent skill after the tsdevstack skills.
  • MCP server: command output is trimmed to what an agent can read: no terminal codes, no Terraform progress lines, at most 40,000 characters.
  • Auth template: logging in with an unconfirmed address goes to the confirmation page, where the user can get a new link. Asking for a new link gets the same answer for every address.
  • Account Hardening: a new page on the account-level services the framework doesn't turn on (threat detection, findings, secret rotation, DNSSEC), with their prices, and how to change a service's database password. See Account Hardening.
  • Docs: the secrets to create yourself before the first CI deploy, with their names in the cloud, and which email secrets a project without the auth template needs.

Fixes

  • infra:plan with nothing to apply no longer points to infra:deploy.
  • cloud-secrets:push counts secrets that were already set apart from pushed ones.
  • list-deployed, service-status and infra:remove-service find SPAs on every cloud.
  • GCP finds a service's workers by baseService, like AWS and Azure.
  • infra:destroy: on AWS it deletes the migration log groups and the VPC flow log's group; on GCP it no longer stops at the service databases, and deletes the db-init job.
  • GCP: infra:plan no longer shows a dashboard update every time; no MaxListenersExceededWarning at the start of commands; a status check with no answer no longer fails a deploy; list-deployed shows each service's state correctly.
  • Azure: jobs are followed until their run ends, and a failed migration says why.
  • AWS: service-status shows what each kind of app has, and lists Next.js apps as nextjs.
  • add-bucket-storage keeps room in the name for AWS's account suffix.
  • The next steps printed after infra:remove-service and during a deploy point to the right commands.

Breaking changes

Pre-1.0, so they ship in a minor version. The upgrade steps below cover each.

  • Database users: a running service connects as <service>_app and can't change the schema.
  • Scheduled jobs: httpTimeout has a range per cloud, Azure's default is 240, and Azure takes only UTC as timezone. A job field infra:generate doesn't know stops it.
  • AWS: a CPU and memory pair Fargate can't run stops infra:generate.
  • GCP: an SPA needs a domain in infrastructure.json.
  • API keys: a request with more than 1,000 headers gets Kong's own 400, "Request header or cookie too large", not the JSON too_many_headers body.
  • Service clients: a call without its own timeout gives up after 30 seconds.
  • nest-common: MetricsService's getMetrics(), collectMetrics() and getContentType() are removed. They returned placeholders; /metrics is unchanged. In production, a missing DATABASE_URL or DB_POOL_MAX stops the service at start.
  • Azure: with deletionProtection on (the default), a deploy that deletes a database fails. dbjobs can't be a service name.
  • infra:remove-service needs the bucket of saved databases, which infra:deploy creates.

Upgrading an existing project

1. Packages.

npm install -D @tsdevstack/cli@^0.13.0
npm install @tsdevstack/nest-common@^0.13.0 -w <service>
npm install @tsdevstack/telemetry@^0.2.0 -w <frontend>

Run the second command for each NestJS service and the third for each Next.js frontend.

2. Local databases.

npx tsdevstack sync

It creates the _app user in your existing databases and lets it use your tables. Your data stays where it is.

3. Next.js frontends from the template. In instrumentation.ts, turn on the JSON lines before registerTelemetry:

const { registerTelemetry, logConsoleAsJson } = await import(
  "@tsdevstack/telemetry"
);
logConsoleAsJson({ serviceName: packageJson.name });

Add timeout: 30_000 to each Kong client in lib/externalApi/. For the confirmation flow, copy these files from the template: app/api/auth/login/route.ts, app/(public)/login/login-client.tsx, app/(public)/confirm-email/page.tsx, lib/nextApi/auth.api.ts, lib/constants/auth-cookies.ts and lib/utils/read-token-claims.ts.

4. Auth services from the template. Copy src/processors/notification.processor.ts from the template (5 emails at a time). In src/auth/auth.service.ts, take the template's resendConfirmation, which gives one answer for every address.

5. Scheduled jobs. Keep httpTimeout within your cloud's range (Azure: at most 240), use UTC on Azure, and remove fields the schema doesn't list. infra:generate says what to change.

6. Cloud accounts.

  • GCP: run npx tsdevstack infra:bootstrap --env <env>. It adds the Logs Configuration Writer role, for the storage access logs.
  • AWS and Azure CI: if your repository was created, renamed or transferred after 15 July 2026, add the subject form with IDs to the AWS trust policy or as a second Azure federated credential. See AWS CI/CD and Azure CI/CD.

7. Each cloud environment.

npx tsdevstack infra:deploy --env <env>
npx tsdevstack infra:deploy-services --env <env>

infra:deploy builds Kong 3.9.4, sets up the two database users (the tables move to the owner), the bucket settings and access logs, and the bucket of saved databases. On Azure it also puts the delete lock on the database server and sets up the Kudu sites and the log files, so --follow shows Kong and the Next.js apps from then on. infra:deploy-services then moves each service to its _app user. Running services keep working in between. Run infra:deploy once before you use infra:remove-service in that environment. Your environment keeps its names.

New projects get all of this from the start.