chore: include pre-built dist for github install

This commit is contained in:
Robin Mordasiewicz
2026-03-14 04:56:50 +00:00
parent a7f0a4cf46
commit bce8ff3a75
1011 changed files with 150081 additions and 0 deletions
+3
View File
@@ -0,0 +1,3 @@
export declare const INTERACTIVE_BASH_SESSION_STORAGE: string;
export declare const OMO_SESSION_PREFIX = "omo-";
export declare function buildSessionReminderMessage(sessions: string[]): string;
+23
View File
@@ -0,0 +1,23 @@
import type { PluginInput } from "@opencode-ai/plugin";
interface ToolExecuteInput {
tool: string;
sessionID: string;
callID: string;
args?: Record<string, unknown>;
}
interface ToolExecuteOutput {
title: string;
output: string;
metadata: unknown;
}
interface EventInput {
event: {
type: string;
properties?: unknown;
};
}
export declare function createInteractiveBashSessionHook(ctx: PluginInput): {
"tool.execute.after": (input: ToolExecuteInput, output: ToolExecuteOutput) => Promise<void>;
event: ({ event }: EventInput) => Promise<void>;
};
export {};
+3
View File
@@ -0,0 +1,3 @@
export { createInteractiveBashSessionHook } from "./hook";
export { createInteractiveBashSessionTracker } from "./interactive-bash-session-tracker";
export { parseTmuxCommand } from "./tmux-command-parser";
@@ -0,0 +1,21 @@
import type { InteractiveBashSessionState } from "./types";
type AbortSession = (args: {
path: {
id: string;
};
}) => Promise<unknown>;
export declare function createInteractiveBashSessionTracker(options: {
abortSession: AbortSession;
}): {
getOrCreateState: (sessionID: string) => InteractiveBashSessionState;
handleSessionDeleted: (sessionID: string) => Promise<void>;
handleTmuxCommand: (input: {
sessionID: string;
subCommand: string;
sessionName: string | null;
toolOutput: string;
}) => {
reminderToAppend: string | null;
};
};
export {};
+26
View File
@@ -0,0 +1,26 @@
/**
* Quote-aware command tokenizer with escape handling
* Handles single/double quotes and backslash escapes
*/
export declare function tokenizeCommand(cmd: string): string[];
/**
* Normalize session name by stripping :window and .pane suffixes
* e.g., "omo-x:1" -> "omo-x", "omo-x:1.2" -> "omo-x"
*/
export declare function normalizeSessionName(name: string): string;
export declare function findFlagValue(tokens: string[], flag: string): string | null;
/**
* Extract session name from tokens, considering the subCommand
* For new-session: prioritize -s over -t
* For other commands: use -t
*/
export declare function extractSessionNameFromTokens(tokens: string[], subCommand: string): string | null;
/**
* Find the tmux subcommand from tokens, skipping global options.
* tmux allows global options before the subcommand:
* e.g., `tmux -L socket-name new-session -s omo-x`
* Global options with args: -L, -S, -f, -c, -T
* Standalone flags: -C, -v, -V, etc.
* Special: -- (end of options marker)
*/
export declare function findSubcommand(tokens: string[]): string;
@@ -0,0 +1,4 @@
import type { InteractiveBashSessionState } from "./types";
export declare function getOrCreateState(sessionID: string, sessionStates: Map<string, InteractiveBashSessionState>): InteractiveBashSessionState;
export declare function isOmoSession(sessionName: string | null): boolean;
export declare function killAllTrackedSessions(state: InteractiveBashSessionState): Promise<void>;
+4
View File
@@ -0,0 +1,4 @@
import type { InteractiveBashSessionState } from "./types";
export declare function loadInteractiveBashSessionState(sessionID: string): InteractiveBashSessionState | null;
export declare function saveInteractiveBashSessionState(state: InteractiveBashSessionState): void;
export declare function clearInteractiveBashSessionState(sessionID: string): void;
@@ -0,0 +1,4 @@
export declare function parseTmuxCommand(tmuxCommand: string): {
subCommand: string;
sessionName: string | null;
};
+10
View File
@@ -0,0 +1,10 @@
export interface InteractiveBashSessionState {
sessionID: string;
tmuxSessions: Set<string>;
updatedAt: number;
}
export interface SerializedInteractiveBashSessionState {
sessionID: string;
tmuxSessions: string[];
updatedAt: number;
}