@baselineos/frame
v1.5.0
Published
Baseline Frame — Context & Control Layer
Readme
@baselineos/frame
The context manager for Baseline Protocol. Manages operational contexts, modes, authority levels, and environments. Every operation runs within a defined scope. Frame consumes organizational identity from baseline.config.ts (voice, industry, formality, company size) and adjusts AI behavior accordingly. Frame treats the LLM context window as a programmable operating system.
Primary Exports
| Export | Kind | Description |
|---|---|---|
| BaselineFrameSystem | class | Top-level facade -- context switching, command permission checks |
| ContextManager | class | Creates, activates, and archives named execution contexts |
| ModeManager | class | Controls run modes (development, production, etc.) |
| AuthorityManager | class | Enforces authority levels (user, admin, system) |
| EnvironmentManager | class | Detects and exposes runtime environment metadata |
Key Types
FrameSystemConfig, ContextEntry, ModeEntry, AuthorityEntry, EnvironmentEntry, FrameStatus
Usage
import { BaselineFrameSystem } from '@baselineos/frame';
const frame = new BaselineFrameSystem();
frame.switchContext('default');
const result = frame.processCommand('status');
// { success: true, context: 'default' }
// Permission-aware: system context blocks unauthorized writes
frame.switchContext('system');
frame.processCommand('write:config');
// { success: false, error: 'Permission denied by context/mode' }Integration
- Depends on:
@baselineos/protocol-core - Consumed by:
@baselineos/cli,baselineos
pnpm --filter @baselineos/frame build
pnpm --filter @baselineos/frame test