Ctx

tcmts.cli.mcp.Ctx · #65nlngwf · type

export interface Ctx {
  root: string;
  /** the session's branch (`tcm mcp --branch`), if this server is one */
  branch?: string;
  /** run a tcm command; `onLine` hears its output as it comes; `env` adds to its environment */
  tcm: (
    argv: string[],
    onLine?: (line: string) => void,
    env?: Record<string, string>,
  ) => Promise<{ code: number; out: string }>;
}

used by