March 27, 2026
Row-level security lands in Moose with the new SelectRowPolicy primitive, plus a new testing utilities package for profiling and benchmarking ClickHouse queries. The CLI now prompts before executing destructive schema changes during development.
Highlights
- New: Row-level security via
SelectRowPolicy— enforce tenant isolation with JWT claims - New: Testing utilities for ClickHouse query profiling, EXPLAIN analysis, and benchmarking
- New: Destructive operation confirmation prompts in
moose dev - Improved:
514 logsdynamically truncates output to fit your terminal
Moose
New Features
Row-level security with SelectRowPolicy (@DatGuyJonathan, @cjus)
Moose now supports row-level security (RLS) through a new SelectRowPolicy primitive. Define restrictive policies on any table that filter rows based on JWT claims — perfect for multi-tenant applications where each customer should only see their own data. Policies use ClickHouse's native row policy mechanism with getSetting(), support AND semantics when multiple policies are applied to the same table, propagate through views automatically, and work across multiple databases.
import { SelectRowPolicy, OlapTable } from "@514labs/moose-lib"; interface TenantEvent { eventId: string; timestamp: Date; org_id: string; data: string;} const TenantEvents = new OlapTable<TenantEvent>("TenantEvent"); // Only return rows where org_id matches the JWT claimexport const tenantIsolation = new SelectRowPolicy("tenant_isolation", { tables: [TenantEvents], column: "org_id", claim: "org_id",});Testing utilities for ClickHouse profiling and benchmarking (@georgevanderson)
A new @514labs/moose-lib/testing subpath export ships purpose-built tools for benchmarking, validating, and diagnosing MooseStack applications against ClickHouse. Profile query execution with percentile summaries, run EXPLAIN analysis to inspect index pruning, check table statistics, and generate structured test reports — all without bundling test code into production.
import { getMooseUtils } from "@514labs/moose-lib";import { profileBenchmark, explain, tableStats } from "@514labs/moose-lib/testing"; const { client, sql } = await getMooseUtils();const query = sql`SELECT count() FROM MyTable WHERE status = 'active'`; // Profile query execution over 12 runsconst { p50, p95 } = await profileBenchmark(client.query, query, 12);console.log(`p50: ${p50}ms, p95: ${p95}ms`); // Inspect index usageconst plan = await explain(client.query, query);console.log(`Granules: ${plan.selectedGranules}/${plan.totalGranules} (skip ${plan.granuleSkipPct}%)`);Docs: Testing Utilities
Destructive operation confirmation prompts (@phiSgr)
moose dev now detects destructive schema changes — table, column, view, and materialized view removals — and prompts for confirmation before applying them. Column renames are also detected and confirmed separately. Use --yes-all, --yes-destructive, or --yes-rename flags (or the MOOSE_ACCEPT_ALL, MOOSE_ACCEPT_DESTRUCTIVE, MOOSE_ACCEPT_RENAME environment variables) to skip prompts in CI or automated workflows.
Destructive Plan contains 1 destructive operation(s) that may cause data loss: - DROP + RECREATE `Bar` (schema change requires drop + recreate) Tip For production, consider a versioned-table migration instead: 1. Set version: "0.1" in your OlapTable config for the new schema 2. Cut readers/writers over 3. Validate parity 4. Retire the old table later ⚠ 1 destructive change(s) — type y to accept, n to reject>Improvements
- Versioned JSON output for
moose template list: The new--jsonflag outputs structured JSON with a schema version, enabling programmatic consumption by tools and agents. (@callicles) - Updated typescript-mcp template to use
OlapTable,Stream, andIngestApiinstead of the deprecatedKey<>andIngestPipelinepatterns, with improved agent skills documentation. (@oatsandsugar)
Bug Fixes
- Fix schema migration failures when modifying or removing columns with dependent indexes or projections: The migration planner now correctly drops dependent indexes and projections before altering columns, then re-creates them afterward. (@hh2110)
- Fix Docker deployment failures with private registries by copying
.npmrcto the pnpm deploy stage. (@onelesd) - Fix table name resolution in query layer. (@georgevanderson)
Fiveonefour Hosting
Improvements
- Dynamic log line truncation in
514 logs: The body column now sizes to your terminal width, with--no-truncatefor full output. (@onelesd) - Non-interactive mode for
514 agent init: Accepts input via stdin or--inputfile for automated agent setup in CI/CD. (@callicles) - Improved UI/UX of the env vars pages. (@groy-514)
- Simplified deployment list UI: Removed the
is_productionflag in favor of a clearer "live" deployment concept, with updated deployment lists and detail views. (@groy-514) - Improved
514 agent --helpoutput for better discoverability of subcommands. (@oatsandsugar) - Expanded 514 agent CLI documentation with dedicated pages for
initandremovesubcommands. (@callicles)
Bug Fixes
- Failed deployments now transition to a terminal error state sooner, preventing stale in-progress states in the UI. (@onelesd)
- Fix empty response from
514 querycommands. (@DatGuyJonathan)