@struktoai/mirage-core
Version:
A Unified Virtual Filesystem For AI Agents
55 lines • 1.94 kB
TypeScript
import type { OpRecord } from './record.ts';
export declare const EVENT_VFS = "vfs";
export declare const EVENT_COMMAND = "command";
export declare const EVENT_RESULT = "result";
export declare const EVENT_CLEAR = "clear";
export declare const EVENT_DELETE = "delete";
export declare const STDOUT_TRUNCATE = 4096;
export type EventType = 'vfs' | 'command' | 'result' | 'clear' | 'delete';
export interface LogEntryInit {
type: EventType;
session: string;
timestamp: number;
cwd?: string;
id?: string;
parent?: string;
vfs?: string;
path?: string;
source?: string;
bytes?: number;
durationMs?: number;
command?: string;
exitCode?: number;
stdout?: string;
stderr?: string;
offset?: number;
}
/**
* Unified log entry for commands, their vfs calls and results, and
* history control events. A line is a `command` entry written when it
* starts, with its `id`, then a `vfs` entry for each call it made to a
* mount and a `result` entry when it ends, both naming it as their
* `parent`. Mirrors Python's `LogEntry`.
*/
export declare class LogEntry {
readonly type: EventType;
readonly session: string;
readonly timestamp: number;
readonly cwd: string | undefined;
readonly id: string | undefined;
readonly parent: string | undefined;
readonly vfs: string | undefined;
readonly path: string | undefined;
readonly source: string | undefined;
readonly bytes: number | undefined;
readonly durationMs: number | undefined;
readonly command: string | undefined;
readonly exitCode: number | undefined;
readonly stdout: string | undefined;
readonly stderr: string | undefined;
readonly offset: number | undefined;
constructor(init: LogEntryInit);
static fromOpRecord(rec: OpRecord, session: string, cwd?: string, parent?: string): LogEntry;
toJsonLine(): string;
}
//# sourceMappingURL=log_entry.d.ts.map