OSS-first docs
These docs teach the open system first: contracts, generated surfaces, runtimes, governance, and incremental adoption. Studio shows up as the operating layer on top, not as the source of truth.
Execute a governed read-only query via a data view.
Goal
Allow safe, policy-gated data retrieval for agents and operators.
Context
Used for live data access with redaction and auditing.
Source Definition
import { ScalarTypeEnum, SchemaModel } from '@lssm-tech/lib.schema';
import { docRef } from '../../docs/registry';
import type { DocBlock } from '../../docs/types';
import { defineQuery } from '../../operations';
import {
DATABASE_DOMAIN,
DATABASE_OWNERS,
DATABASE_STABILITY,
DATABASE_TAGS,
} from '../constants';
export const DatabaseQueryReadonlyQuery = defineQuery({
meta: {
key: 'database.query.readonly',
title: 'Read-Only Data Query',
version: '1.0.0',
description: 'Execute a governed read-only query via a data view.',
goal: 'Allow safe, policy-gated data retrieval for agents and operators.',
context: 'Used for live data access with redaction and auditing.',
domain: DATABASE_DOMAIN,
owners: DATABASE_OWNERS,
tags: [...DATABASE_TAGS, 'query', 'readonly'],
stability: DATABASE_STABILITY,
docId: [docRef(DatabaseQueryReadonlyDocBlock.id)],
},
capability: {
key: 'database.context',
version: '1.0.0',
},
io: {
input: DatabaseQueryReadonlyInput,
output: DatabaseQueryReadonlyOutput,
},
policy: {
auth: 'admin',
pii: ['rows'],
},
});