Impl: tool-npm-package

This commit is contained in:
2026-03-19 19:12:50 +05:30
parent f1b09bf7de
commit ca753cd1ca
17 changed files with 1914 additions and 499 deletions
+93
View File
@@ -0,0 +1,93 @@
/**
* Options for launching a multi-model tmux session.
*/
export interface MultiModelOptions {
/** Name for the tmux session. */
sessionName: string;
/** List of model ids to launch. */
models: string[];
/** Binary name to use ('opencode' or 'kilo'). Defaults to 'opencode'. */
binaryName?: string;
}
/**
* Result returned after attempting to launch a multi-model session.
*/
export interface MultiModelResult {
/** Whether the launch succeeded. */
success: boolean;
/** The session name used. */
sessionName: string;
/** Window names created in the tmux session. */
windows?: string[];
/** Error message if the launch failed. */
error?: string;
/** Instructions for attaching and cleaning up the session. */
instructions?: string;
}
/**
* Options for closing a multi-model tmux session.
*/
export interface CloseSessionOptions {
/** Name of the tmux session to close. */
sessionName: string;
/** Whether to remove worktrees and delete branches. */
cleanupWorktrees?: boolean;
/** Skip confirmation prompts. */
force?: boolean;
}
/**
* Result returned after attempting to close a multi-model session.
*/
export interface CloseSessionResult {
/** Whether the close succeeded. */
success: boolean;
/** The session name that was closed. */
sessionName: string;
/** Error message if the close failed. */
error?: string;
/** Whether cleanup was performed. */
cleanupPerformed?: boolean;
/** Worktree paths that were removed. */
worktreesRemoved?: string[];
/** Branch names that were deleted. */
branchesDeleted?: string[];
/** Archive tags that were created before branch deletion. */
tagsCreated?: string[];
/** Warning messages. */
warnings?: string[];
}
/**
* Internal type for a window launch plan.
*/
export interface WindowLaunchPlan {
/** Full model id. */
model: string;
/** Unique tmux window name. */
windowName: string;
}
/**
* Result of running a shell command.
*/
export interface CommandResult {
/** Whether the command exited with code 0. */
ok: boolean;
/** Captured stdout. */
stdout: string;
/** Captured stderr. */
stderr: string;
}
/**
* Information about a git worktree.
*/
export interface WorktreeInfo {
/** Absolute path to the worktree. */
path: string;
/** Branch name associated with the worktree. */
branch: string;
}