#!/usr/bin/env node /** * Codeep — entry point. * * This file contains only startup/init logic. Command dispatch lives in * commands.ts and agent execution in agentExecution.ts. */ import { App } from './App'; import { type GitStatus } from '../utils/git'; import type { McpServer } from '../acp/protocol'; /** * What to tell the user when git would not run in this project, or null when * there is nothing to tell them. * * Without it the only symptom is the branch quietly missing from the header, * which reads as "not a repository" — so a repository whose own `.git/config` * names a program git would run looks like an ordinary folder, and the one * thing the user has to do (remove that key) is never said anywhere. The * refusal names the key and the `git config --unset` that clears it, so it is * passed through verbatim rather than summarised into "git failed". * * Read off `refusal` and NOT off `error`, which is the field an earlier cut * of this used. `error` is every way git can fail in a repository, and the * commonest of them is a brand-new `git init` with no commit yet: `git * rev-parse --abbrev-ref HEAD` answers `fatal: ambiguous argument 'HEAD'` * there (git 2.54), so the first thing a user does in a new project met a * warning made of git internals telling them to remove a config key that does * not exist. `refusal` is filled on the hardening path and nowhere else, so * an ordinary git failure stays as silent as it was before this notice * existed — the branch is simply missing from the header, which is what it * has always done. */ export declare function gitRefusalNotice(status: GitStatus): string | null; /** Derive a short display name from a user message (first ~5 words, max 48 chars). */ export declare function deriveSessionName(message: string): string; /** * Start the MCP servers this terminal may run, under the fixed session id * `codeep-tui`: the global servers (~/.codeep, the user's own) plus the * workspace ones once the workspace is trusted. Registering replaces the * session's whole set, so they go in one call; starting the global list and * then the workspace list stopped the global servers. Returns the workspace * servers left out because the workspace is not trusted yet. */ export declare function startTuiMcpServers(root: string, ui: Pick): Promise; /** Start the servers of a workspace the user has just trusted. A failure is * shown, not swallowed: the user asked for these servers. */ export declare function startTrustedWorkspaceMcp(root: string, ui: Pick): Promise; /** The CLI entry point. Exported so tests can drive a command without the * module starting the app on import. */ export declare function main(): Promise;