need dist for plugins
Signed-off-by: Dmytro Stanchiev <git@dmytros.dev>
This commit is contained in:
6
dist/shared/index.d.ts
vendored
Normal file
6
dist/shared/index.d.ts
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
export { log, getLogFilePath } from "./logger";
|
||||
export { normalizeSDKResponse } from "./normalize-sdk-response";
|
||||
export { parseJsonc, parseJsoncSafe, readJsoncFile, detectConfigFile } from "./jsonc-parser";
|
||||
export { getOpenCodeConfigDir, getOpenCodeConfigPaths, detectExistingConfigDir, isDevBuild, TAURI_APP_IDENTIFIER, TAURI_APP_IDENTIFIER_DEV, } from "./opencode-config-dir";
|
||||
export type { OpenCodeBinaryType, OpenCodeConfigDirOptions, OpenCodeConfigPaths, } from "./opencode-config-dir";
|
||||
export * from "./tmux";
|
||||
15
dist/shared/jsonc-parser.d.ts
vendored
Normal file
15
dist/shared/jsonc-parser.d.ts
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
export interface JsoncParseResult<T> {
|
||||
data: T | null;
|
||||
errors: Array<{
|
||||
message: string;
|
||||
offset: number;
|
||||
length: number;
|
||||
}>;
|
||||
}
|
||||
export declare function parseJsonc<T = unknown>(content: string): T;
|
||||
export declare function parseJsoncSafe<T = unknown>(content: string): JsoncParseResult<T>;
|
||||
export declare function readJsoncFile<T = unknown>(filePath: string): T | null;
|
||||
export declare function detectConfigFile(basePath: string): {
|
||||
format: "json" | "jsonc" | "none";
|
||||
path: string;
|
||||
};
|
||||
2
dist/shared/logger.d.ts
vendored
Normal file
2
dist/shared/logger.d.ts
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
export declare function log(message: string, data?: unknown): void;
|
||||
export declare function getLogFilePath(): string;
|
||||
4
dist/shared/normalize-sdk-response.d.ts
vendored
Normal file
4
dist/shared/normalize-sdk-response.d.ts
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
export interface NormalizeSDKResponseOptions {
|
||||
preferResponseOnMissingData?: boolean;
|
||||
}
|
||||
export declare function normalizeSDKResponse<TData>(response: unknown, fallback: TData, options?: NormalizeSDKResponseOptions): TData;
|
||||
13
dist/shared/opencode-config-dir-types.d.ts
vendored
Normal file
13
dist/shared/opencode-config-dir-types.d.ts
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
export type OpenCodeBinaryType = "opencode" | "opencode-desktop";
|
||||
export type OpenCodeConfigDirOptions = {
|
||||
binary: OpenCodeBinaryType;
|
||||
version?: string | null;
|
||||
checkExisting?: boolean;
|
||||
};
|
||||
export type OpenCodeConfigPaths = {
|
||||
configDir: string;
|
||||
configJson: string;
|
||||
configJsonc: string;
|
||||
packageJson: string;
|
||||
omoConfig: string;
|
||||
};
|
||||
8
dist/shared/opencode-config-dir.d.ts
vendored
Normal file
8
dist/shared/opencode-config-dir.d.ts
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
import type { OpenCodeBinaryType, OpenCodeConfigDirOptions, OpenCodeConfigPaths } from "./opencode-config-dir-types";
|
||||
export type { OpenCodeBinaryType, OpenCodeConfigDirOptions, OpenCodeConfigPaths, } from "./opencode-config-dir-types";
|
||||
export declare const TAURI_APP_IDENTIFIER = "ai.opencode.desktop";
|
||||
export declare const TAURI_APP_IDENTIFIER_DEV = "ai.opencode.desktop.dev";
|
||||
export declare function isDevBuild(version: string | null | undefined): boolean;
|
||||
export declare function getOpenCodeConfigDir(options: OpenCodeConfigDirOptions): string;
|
||||
export declare function getOpenCodeConfigPaths(options: OpenCodeConfigDirOptions): OpenCodeConfigPaths;
|
||||
export declare function detectExistingConfigDir(binary: OpenCodeBinaryType, version?: string | null): string | null;
|
||||
5
dist/shared/shell-env.d.ts
vendored
Normal file
5
dist/shared/shell-env.d.ts
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
export type ShellType = "unix" | "powershell" | "cmd";
|
||||
export declare function detectShellType(): ShellType;
|
||||
export declare function shellEscape(value: string, shellType: ShellType): string;
|
||||
export declare function buildEnvPrefix(env: Record<string, string>, shellType: ShellType): string;
|
||||
export declare function shellEscapeForDoubleQuotedCommand(value: string): string;
|
||||
15
dist/shared/spawn-with-windows-hide.d.ts
vendored
Normal file
15
dist/shared/spawn-with-windows-hide.d.ts
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
export interface SpawnOptions {
|
||||
cwd?: string;
|
||||
env?: Record<string, string | undefined>;
|
||||
stdin?: "pipe" | "inherit" | "ignore";
|
||||
stdout?: "pipe" | "inherit" | "ignore";
|
||||
stderr?: "pipe" | "inherit" | "ignore";
|
||||
}
|
||||
export interface SpawnedProcess {
|
||||
readonly exitCode: number | null;
|
||||
readonly exited: Promise<number>;
|
||||
readonly stdout: ReadableStream<Uint8Array> | undefined;
|
||||
readonly stderr: ReadableStream<Uint8Array> | undefined;
|
||||
kill(signal?: NodeJS.Signals): void;
|
||||
}
|
||||
export declare function spawnWithWindowsHide(command: string[], options: SpawnOptions): SpawnedProcess;
|
||||
5
dist/shared/tmux/constants.d.ts
vendored
Normal file
5
dist/shared/tmux/constants.d.ts
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
export declare const POLL_INTERVAL_BACKGROUND_MS = 2000;
|
||||
export declare const SESSION_TIMEOUT_MS: number;
|
||||
export declare const SESSION_MISSING_GRACE_MS = 6000;
|
||||
export declare const SESSION_READY_POLL_INTERVAL_MS = 500;
|
||||
export declare const SESSION_READY_TIMEOUT_MS = 10000;
|
||||
3
dist/shared/tmux/index.d.ts
vendored
Normal file
3
dist/shared/tmux/index.d.ts
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
export * from "./tmux-utils";
|
||||
export * from "./constants";
|
||||
export * from "./types";
|
||||
9
dist/shared/tmux/tmux-utils.d.ts
vendored
Normal file
9
dist/shared/tmux/tmux-utils.d.ts
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
export { isInsideTmux, getCurrentPaneId } from "./tmux-utils/environment";
|
||||
export type { SplitDirection } from "./tmux-utils/environment";
|
||||
export { isServerRunning, resetServerCheck } from "./tmux-utils/server-health";
|
||||
export { getPaneDimensions } from "./tmux-utils/pane-dimensions";
|
||||
export type { PaneDimensions } from "./tmux-utils/pane-dimensions";
|
||||
export { spawnTmuxPane } from "./tmux-utils/pane-spawn";
|
||||
export { closeTmuxPane } from "./tmux-utils/pane-close";
|
||||
export { replaceTmuxPane } from "./tmux-utils/pane-replace";
|
||||
export { applyLayout, enforceMainPaneWidth } from "./tmux-utils/layout";
|
||||
4
dist/shared/tmux/tmux-utils/environment.d.ts
vendored
Normal file
4
dist/shared/tmux/tmux-utils/environment.d.ts
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
export type SplitDirection = "-h" | "-v";
|
||||
export declare function isInsideTmuxEnvironment(environment: Record<string, string | undefined>): boolean;
|
||||
export declare function isInsideTmux(): boolean;
|
||||
export declare function getCurrentPaneId(): string | undefined;
|
||||
18
dist/shared/tmux/tmux-utils/layout.d.ts
vendored
Normal file
18
dist/shared/tmux/tmux-utils/layout.d.ts
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
import type { TmuxLayout } from "../../../config/schema";
|
||||
type TmuxSpawnCommand = (args: string[], options: {
|
||||
stdout: "ignore";
|
||||
stderr: "ignore";
|
||||
}) => {
|
||||
exited: Promise<number>;
|
||||
};
|
||||
interface LayoutDeps {
|
||||
spawnCommand?: TmuxSpawnCommand;
|
||||
}
|
||||
interface MainPaneWidthOptions {
|
||||
mainPaneSize?: number;
|
||||
mainPaneMinWidth?: number;
|
||||
agentPaneMinWidth?: number;
|
||||
}
|
||||
export declare function applyLayout(tmux: string, layout: TmuxLayout, mainPaneSize: number, deps?: LayoutDeps): Promise<void>;
|
||||
export declare function enforceMainPaneWidth(mainPaneId: string, windowWidth: number, mainPaneSizeOrOptions?: number | MainPaneWidthOptions): Promise<void>;
|
||||
export {};
|
||||
1
dist/shared/tmux/tmux-utils/pane-close.d.ts
vendored
Normal file
1
dist/shared/tmux/tmux-utils/pane-close.d.ts
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export declare function closeTmuxPane(paneId: string): Promise<boolean>;
|
||||
5
dist/shared/tmux/tmux-utils/pane-dimensions.d.ts
vendored
Normal file
5
dist/shared/tmux/tmux-utils/pane-dimensions.d.ts
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
export interface PaneDimensions {
|
||||
paneWidth: number;
|
||||
windowWidth: number;
|
||||
}
|
||||
export declare function getPaneDimensions(paneId: string): Promise<PaneDimensions | null>;
|
||||
3
dist/shared/tmux/tmux-utils/pane-replace.d.ts
vendored
Normal file
3
dist/shared/tmux/tmux-utils/pane-replace.d.ts
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import type { TmuxConfig } from "../../../config/schema";
|
||||
import type { SpawnPaneResult } from "../types";
|
||||
export declare function replaceTmuxPane(paneId: string, sessionId: string, description: string, config: TmuxConfig, serverUrl: string): Promise<SpawnPaneResult>;
|
||||
4
dist/shared/tmux/tmux-utils/pane-spawn.d.ts
vendored
Normal file
4
dist/shared/tmux/tmux-utils/pane-spawn.d.ts
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
import type { TmuxConfig } from "../../../config/schema";
|
||||
import type { SpawnPaneResult } from "../types";
|
||||
import type { SplitDirection } from "./environment";
|
||||
export declare function spawnTmuxPane(sessionId: string, description: string, config: TmuxConfig, serverUrl: string, targetPaneId?: string, splitDirection?: SplitDirection): Promise<SpawnPaneResult>;
|
||||
2
dist/shared/tmux/tmux-utils/server-health.d.ts
vendored
Normal file
2
dist/shared/tmux/tmux-utils/server-health.d.ts
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
export declare function isServerRunning(serverUrl: string): Promise<boolean>;
|
||||
export declare function resetServerCheck(): void;
|
||||
4
dist/shared/tmux/types.d.ts
vendored
Normal file
4
dist/shared/tmux/types.d.ts
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
export interface SpawnPaneResult {
|
||||
success: boolean;
|
||||
paneId?: string;
|
||||
}
|
||||
Reference in New Issue
Block a user