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.
Create an immutable snapshot from a context pack.
Goal
Persist a versioned, auditable context snapshot for agents.
Context
Used when launching background agents or when operators want to lock context state.
Source Definition
import { ScalarTypeEnum, SchemaModel } from '@lssm-tech/lib.schema';
import { docRef } from '../../docs/registry';
import type { DocBlock } from '../../docs/types';
import { defineCommand } from '../../operations';
import {
CONTEXT_DOMAIN,
CONTEXT_OWNERS,
CONTEXT_STABILITY,
CONTEXT_TAGS,
} from '../constants';
import { ContextSnapshotCreatedEvent } from '../events/contextSnapshotCreated.event';
export const ContextPackSnapshotCommand = defineCommand({
meta: {
key: 'context.pack.snapshot',
title: 'Create Context Snapshot',
version: '1.0.0',
description: 'Create an immutable snapshot from a context pack.',
goal: 'Persist a versioned, auditable context snapshot for agents.',
context:
'Used when launching background agents or when operators want to lock context state.',
domain: CONTEXT_DOMAIN,
owners: CONTEXT_OWNERS,
tags: [...CONTEXT_TAGS, 'snapshot', 'create'],
stability: CONTEXT_STABILITY,
docId: [docRef(ContextPackSnapshotDocBlock.id)],
},
capability: {
key: 'context.system',
version: '1.0.0',
},
io: {
input: ContextPackSnapshotInput,
output: ContextPackSnapshotOutput,
},
policy: {
auth: 'admin',
pii: [],
},
sideEffects: {
emits: [
{
ref: ContextSnapshotCreatedEvent.meta,
when: 'A new snapshot has been created and persisted.',
},
],
},
});