Initial upload with CI/CD workflow
Some checks failed
CI / test (push) Has been cancelled

This commit is contained in:
2026-02-05 19:31:35 +00:00
parent 887f546362
commit e70844b9c6

100
src/models/types.ts Normal file
View File

@@ -0,0 +1,100 @@
export type TerminalType = 'tmux' | 'screen' | 'iterm2' | 'unknown';
export interface PaneLayout {
x: number;
y: number;
width: number;
height: number;
}
export interface Pane {
id: string;
index: number;
layout: PaneLayout;
command?: string;
cwd?: string;
title?: string;
isActive?: boolean;
}
export interface Window {
id: string;
index: number;
name: string;
panes: Pane[];
layout?: string;
activePaneIndex?: number;
}
export interface Session {
id: string;
name: string;
windows: Window[];
activeWindowIndex: number;
cwd?: string;
}
export interface Layout {
version: string;
terminalType: TerminalType;
createdAt: string;
updatedAt: string;
session: Session;
metadata?: {
author?: string;
description?: string;
tags?: string[];
};
}
export interface TemplateVariable {
name: string;
description: string;
defaultValue?: string;
required: boolean;
}
export interface Template {
name: string;
displayName: string;
description: string;
variables: TemplateVariable[];
layout: Layout;
}
export interface UserConfig {
layoutDir: string;
defaultFormat: 'json' | 'yaml';
gitSyncEnabled: boolean;
templatesDir: string;
}
export interface GitSyncConfig {
enabled: boolean;
remoteUrl?: string;
branch: string;
commitMessage: string;
}
export interface LayoutFile {
name: string;
path: string;
format: 'json' | 'yaml';
layout: Layout;
createdAt: string;
updatedAt: string;
}
export interface ParserResult<T> {
success: boolean;
data?: T;
error?: string;
rawOutput?: string;
}
export interface ExecResult {
success: boolean;
stdout: string;
stderr: string;
exitCode: number;
}