diff options
| author | Adam Malczewski <[email protected]> | 2026-06-27 01:12:40 +0900 |
|---|---|---|
| committer | Adam Malczewski <[email protected]> | 2026-06-27 01:12:40 +0900 |
| commit | 98b0638838a8e754927d8c030ce8bded18d63e7d (patch) | |
| tree | 0d4e21c3d4792fcd77e1040373b260e38efa34ce /packages/exec-backend/src/backend.ts | |
| parent | d92a4af6191d7d20acf861adf605ad0227b6b287 (diff) | |
| parent | 61e45e60d699ed1ca46f94a8f181c92a940317c6 (diff) | |
| download | dispatch-98b0638838a8e754927d8c030ce8bded18d63e7d.tar.gz dispatch-98b0638838a8e754927d8c030ce8bded18d63e7d.zip | |
Merge branch 'dev' into feature/heartbeat
# Conflicts:
# packages/host-bin/package.json
# packages/host-bin/src/main.ts
# packages/session-orchestrator/src/orchestrator.ts
# packages/system-prompt/src/service.test.ts
# packages/system-prompt/src/service.ts
# packages/system-prompt/src/types.ts
# packages/transport-contract/package.json
# packages/transport-http/package.json
# packages/transport-http/src/app.test.ts
# packages/transport-http/src/app.ts
# packages/transport-http/src/extension.ts
# packages/transport-http/tsconfig.json
# tsconfig.json
Diffstat (limited to 'packages/exec-backend/src/backend.ts')
| -rw-r--r-- | packages/exec-backend/src/backend.ts | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/packages/exec-backend/src/backend.ts b/packages/exec-backend/src/backend.ts index f6a807f..3eea7c0 100644 --- a/packages/exec-backend/src/backend.ts +++ b/packages/exec-backend/src/backend.ts @@ -24,30 +24,30 @@ /** A spawned process's result. Mirrors tool-shell's `SpawnResult` exactly. */ export interface ExecResult { - readonly exitCode: number | null; - readonly timedOut: boolean; - readonly aborted: boolean; + readonly exitCode: number | null; + readonly timedOut: boolean; + readonly aborted: boolean; } /** Parameters for spawning a shell command. Mirrors tool-shell's `SpawnShell` params. */ export interface SpawnParams { - readonly command: string; - readonly cwd: string; - readonly signal: AbortSignal; - readonly timeout: number; - readonly onOutput: (data: string, stream: "stdout" | "stderr") => void; + readonly command: string; + readonly cwd: string; + readonly signal: AbortSignal; + readonly timeout: number; + readonly onOutput: (data: string, stream: "stdout" | "stderr") => void; } /** Stat result — the subset read_file / write_file / edit_file need. */ export interface StatResult { - readonly isFile: boolean; - readonly isDirectory: boolean; + readonly isFile: boolean; + readonly isDirectory: boolean; } /** A directory entry — the subset read_file lists. */ export interface DirEntry { - readonly name: string; - readonly isDirectory: boolean; + readonly name: string; + readonly isDirectory: boolean; } /** @@ -56,23 +56,23 @@ export interface DirEntry { * `ToolExecuteContext.computerId` via the injected resolver. */ export interface ExecBackend { - /** Run a shell command, streaming stdout/stderr. The shell-tool seam. */ - readonly spawn: (params: SpawnParams) => Promise<ExecResult>; + /** Run a shell command, streaming stdout/stderr. The shell-tool seam. */ + readonly spawn: (params: SpawnParams) => Promise<ExecResult>; - // --- filesystem (the read_file / write_file / edit_file surface) --- + // --- filesystem (the read_file / write_file / edit_file surface) --- - /** Read a file as utf8 text. Throws node:fs-style errors with `.code`. */ - readonly readFile: (path: string) => Promise<string>; + /** Read a file as utf8 text. Throws node:fs-style errors with `.code`. */ + readonly readFile: (path: string) => Promise<string>; - /** Write utf8 text to a file. Throws on failure (e.g. missing parent dir). */ - readonly writeFile: (path: string, content: string) => Promise<void>; + /** Write utf8 text to a file. Throws on failure (e.g. missing parent dir). */ + readonly writeFile: (path: string, content: string) => Promise<void>; - /** Stat a path. Throws node:fs-style errors with `.code` (e.g. `"ENOENT"`). */ - readonly stat: (path: string) => Promise<StatResult>; + /** Stat a path. Throws node:fs-style errors with `.code` (e.g. `"ENOENT"`). */ + readonly stat: (path: string) => Promise<StatResult>; - /** List directory entries. Throws node:fs-style errors with `.code`. */ - readonly readdir: (path: string) => Promise<readonly DirEntry[]>; + /** List directory entries. Throws node:fs-style errors with `.code`. */ + readonly readdir: (path: string) => Promise<readonly DirEntry[]>; - /** Check existence without throwing (returns `false` when the path is missing). */ - readonly exists: (path: string) => Promise<boolean>; + /** Check existence without throwing (returns `false` when the path is missing). */ + readonly exists: (path: string) => Promise<boolean>; } |
