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.

database.query.readonly

Execute a governed read-only query via a data view.

  • Type: operation (query)
  • Version: 1.0.0
  • Tags: query, readonly
  • File: packages/libs/contracts-spec/src/database/queries/databaseQueryReadonly.query.ts
  • field.key.label
    database.query.readonly
    field.version.label
    1.0.0
    field.type.label
    operation (query)
    field.title.label
    database.query.readonly
    field.description.label

    Execute a governed read-only query via a data view.

  • Type: operation (query)
  • Version: 1.0.0
  • Tags: query, readonly
  • File: packages/libs/contracts-spec/src/database/queries/databaseQueryReadonly.query.ts
  • field.tags.label
    query,readonly
    field.owners.label
    field.stability.label

    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'],
    	},
    });